diff --git a/.gitignore b/.gitignore index 8d2f293d2098c8..566068abc766e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,17 @@ .DS_Store -node_modules - +/node_modules +docsPostProcessed/ lib/core/metadata.js lib/core/MetadataBlog.js -website/translated_docs +docsPostProcessed + +website/siteConfig.js + website/build/ website/yarn.lock website/node_modules !website/node_modules/highlight.js/lib/index.js !website/node_modules/highlight.js/lib/languages/code4d.js + 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/API/BlobClass.md b/docs/API/BlobClass.md new file mode 100644 index 00000000000000..f211fde7068ef2 --- /dev/null +++ b/docs/API/BlobClass.md @@ -0,0 +1,92 @@ +--- +id: BlobClass +title: Blob +--- + +The Blob class lets you create and manipulate [blob objects](../Concepts/dt_blob.md#blob-types) (`4D.Blob`). + +### Summary + +|| +|---| +|[](#4dblobnew)

    | +|[](#size)

    | +|[](#slice)

    | + +## 4D.Blob.new() + +

History +|Version|Changes| +|---|---| +|v19 R2|Added| +
+ + +**4D.Blob.new()** : 4D.Blob
**4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
**4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob + + + +| Parameter | Type | | Description | +| --------- | --------------- | :-: | ------------ | +| blob | Blob or 4D.Blob | -> | Blob to copy | +| Result | 4D.Blob | <- | New 4D.Blob | + + +#### Description + +`4D.Blob.new` creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). + +If the `blob` parameter is omitted, the method returns an empty 4D.Blob. + +## .size + + +**.size** : Real + +#### Description +The `.size` property returns the size of a `4D.Blob`, expressed in bytes. + +## .slice() + +
History +|Version|Changes| +|---|---| +|v19 R2|Added| +
+ + +**.slice()** : 4D.Blob
**.slice**( *start* : Real ) : 4D.Blob
**.slice**( *start* : Real; *end* : Real ) : 4D.Blob + + +| Parameter | Type ||Description | +| --------- | ------- | :-: | --- | +| start| Real | -> | index of the first byte to include in the new `4D.Blob`. | +| end| Real | -> | index of the first byte that will not be included in the new `4D.Blob` | +| Result| 4D.Blob | <- | New `4D.Blob`| + +#### Description + +`.slice()` creates and returns a `4D.Blob ` that references data from a subset of the blob on which it's called. The original blob is not altered. + +The `start` parameter is an index into the blob indicating the first byte to include in the new `4D.Blob`. If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is 0. If you specify a value for start that is larger than the size of the source blob, the returned `4D.Blob`'s size is 0, and it contains no data. + +The `end` parameter is an index into the blob indicating the first byte that will not be included in the new `4D.Blob` (i.e. the byte exactly at this index is not included). If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is the size of the blob. + +#### Example + +```4d +var $myBlob : 4D.Blob + +// Store text in a 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$is4DBlob:=OB Instance of($myBlob; 4D.Blob); //True + +$myString:=Convert to text($myBlob; "UTF-8") +// $myString contains "Hello, World!" + +// Create a new 4D.Blob from $myBlob +$myNewBlob:=$myBlob.slice(0; 5) + +$myString:=Convert to text($myNewBlob; "UTF-8") +// $myString contains "Hello" +``` diff --git a/docs/API/ClassClass.md b/docs/API/ClassClass.md new file mode 100644 index 00000000000000..b4efe13478eb28 --- /dev/null +++ b/docs/API/ClassClass.md @@ -0,0 +1,146 @@ +--- +id: ClassClass +title: Class +--- + + +When a user class is [defined](Concepts/classes.md#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of "Class" class, which has properties and a function. + + + +### Summary + + +|| +|---| +|[](#name)

    | +|[](#new)

     | +|[](#superclass)

     | + + + + +## .name + +

History +|Version|Changes| +|---|---| +|v18 R3|Added| + +
+ + +**.name** : Text + +#### Description + +The `.name` property contains the name of the `4D.Class` object. Class names are case sensitive. + +This property is **read-only**. + + + + + + +## .new() + +
History +|Version|Changes| +|---|---| +|v18 R3|Added| +
+ + +**.new**( *param* : any { *;...paramN* } ) : 4D.Class + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|param|any|->|Parameter(s) to pass to the constructor function| +|Result|4D.Class|<-|New object of the class| + + + +#### Description + +The `.new()` function creates and returns a `cs.className` object which is a new instance of the class on which it is called. This function is automatically available on all classes from the [`cs` class store](Concepts/classes.md#cs). + +You can pass one or more optional *param* parameters, which will be passed to the [class constructor](Concepts/classes.md#class-constructor) function (if any) in the className class definition. Within the constructor function, the [`This`](Concepts/classes.md#this) is bound to the new object being constructed. + +If `.new()` is called on a non-existing class, an error is returned. + +#### Examples + +To create a new instance of the Person class: + +```4d +var $person : cs.Person +$person:=cs.Person.new() //create the new instance +//$person contains functions of the class +``` + +To create a new instance of the Person class with parameters: + +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text; $age : Integer) + This.firstName:=$firstname + This.lastName:=$lastname + This.age:=$age +``` + +```4d +//In a method +var $person : cs.Person +$person:=cs.Person.new("John";"Doe";40) +//$person.firstName = "John" +//$person.lastName = "Doe" +//$person.age = 40 +``` + + + + + + + +## .superclass + +
History +|Version|Changes| +|---|---| +|v18 R3|Added| + +
+ + +**.superclass** : 4D.Class + +#### Description + +The `.superclass` property returns the parent class of the class. A superclass can be a `4D.Class` object, or a `cs.className` object. If the class does not have a parent class, the property returns **null**. + +A superclass of a user class is declared in a class by using the [`Class extends `](Concepts/classes.md#class-extends-classname) keyword. + +This property is **read-only**. + +#### Examples + +```4d +$sup:=4D.File.superclass //Document +$sup:=4D.Document.superclass //Object +$sup:=4D.Object.superclass //null + +// If you created a MyFile class +// with `Class extends File` +$sup:=cs.MyFile.superclass //File + +``` + + + +**See also:** [Super](Concepts/classes.md#super) + + + diff --git a/docs/API/CollectionClass.md b/docs/API/CollectionClass.md new file mode 100644 index 00000000000000..b8addf8e30d062 --- /dev/null +++ b/docs/API/CollectionClass.md @@ -0,0 +1,2872 @@ +--- +id: CollectionClass +title: Collection +--- + + +The Collection class manages [Collection](Concepts/dt_collection.md) type variables. + +A collection is initialized with: + +|| +|---| +|[](#new-collection)

    | +|[](#new-shared-collection)

    | + + +### Example + +```4d + var $colVar : Collection //creation of collection type 4D variable + $colVar:=New collection //initialization of the collection and assignment to the 4D variable +``` + + +### Summary + + +|| +|---| +|[](#average)

    | +|[](#clear)

     | +|[](#combine)

     | +|[](#concat)

    | +|[](#copy)

    | +|[](#count)

    | +|[](#countvalues)

    | +|[](#distinct)

    | +|[](#equal)

    | +|[](#every)

    | +|[](#extract)

    | +|[](#fill)

    | +|[](#filter)

    | +|[](#find)

    | +|[](#find)

    | +|[](#indexof)

    | +|[](#indices)

    | +|[](#insert)

    | +|[](#join)

    | +|[](#lastindexof)

    | +|[](#length)

    | +|[](#map)

    | +|[](#max)

    | +|[](#min)

    | +|[](#orderby)

    | +|[](#orderbymethod)

    | +|[](#pop)

    | +|[](#push)

    | +|[](#query)

    | +|[](#reduce)

    | +|[](#remove)

    | +|[](#resize)

    | +|[](#reverse)

    | +|[](#shift)

    | +|[](#slice)

    | +|[](#some)

    | +|[](#sort)

    | +|[](#sum)

    | +|[](#unshift)

    | + + + +## `New collection` + + + +**New collection** {( *...value* : any )} : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value|Number, Text, Date, Time, Boolean, Object, Collection, Picture, Pointer|->|Collection's value(s)| +|Result|Collection|<-|New collection| + + + +#### Description + +The `New collection` command creates a new empty or prefilled collection and returns its reference. + +If you do not pass any parameters, `New collection` creates an empty collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. + +>Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new collection by passing one or several *value*(s) as parameter(s). + +Otherwise, you can add or modify elements subsequently through assignment. For example: + +```4d + myCol[10]:="My new element" +``` + +If the new element index is beyond the last existing element of the collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of any supported type (number, text, date, picture, pointer, object, collection...). Unlike arrays, collections can mix data of different types. + +You must pay attention to the following conversion issues: + +* If you pass a pointer, it is kept "as is"; it is evaluated using the `JSON Stringify` command +* Dates are stored as "yyyy-mm-dd" dates or strings with the "YYYY-MM-DDTHH:mm:ss.SSSZ" format, according to the current "dates inside objects" database setting. When converting 4D dates into text prior to storing them in the collection, by default the program takes the local time zone into account. You can modify this behavior using the `Dates inside objects` selector of the `SET DATABASE PARAMETER` command. +* If you pass a time, it is stored as a number of milliseconds (Real). + +#### Example 1 + + + +You want to create a new empty collection and assign it to a 4D collection variable: + +```4d + var $myCol : Collection + $myCol:=New collection + //$myCol=[] +``` + +#### Example 2 + +You want to create a prefilled collection: + +```4d + var $filledColl : Collection + $filledColl:=New collection(33;"mike";"november";->myPtr;Current date) + //$filledColl=[33,"mike","november","->myPtr","2017-03-28T22:00:00.000Z"] +``` + +#### Example 3 + +You create a new collection and then add a new element: + +```4d + var $coll : Collection + $coll:=New collection("a";"b";"c") + //$coll=["a","b","c"] + $coll[9]:="z" //add a 10th element with value "z" + $vcolSize:=$coll.length //10 + //$coll=["a","b","c",null,null,null,null,null,null,"z"] +``` + + + + +## `New shared collection` + +

History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**New shared collection** {( *...value* : any )} : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value|Number, Text, Date, Time, Boolean, Shared object, Shared collection|->|Shared collection's value(s)| +|Result|Collection|<-|New shared collection| + + + +#### Description + +The `New shared collection` command creates a new empty or prefilled shared collection and returns its reference. + +Adding an element to this collection must be surrounded by the [`Use...End`](Concepts/shared.md#useend-use) use structure, otherwise an error is generated. Reading an element without a structure is, however, possible. + +>For more information on shared collections, please refer to the [Shared objects and collections](Concepts/shared.md) page. + +If you do not pass any parameters, `New shared collection` creates an empty shared collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. + +>Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new shared collection by passing one or several *value*(s) as parameter(s). Otherwise, you can add or modify elements subsequently through object notation assignment (see example). + +If the new element index is beyond the last existing element of the shared collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of the following supported types: + +* number (real, longint...). Number values are always stored as reals. +* text +* boolean +* date +* time (stored as number of milliseconds - real) +* null +* shared object(*) +* shared collection(*) + +>Unlike standard (not shared) collections, shared collections do not support pictures, pointers, and objects or collections that are not shared. + +(*)When a shared object or collection is added to a shared collection, they share the same *locking identifier*. For more information on this point, refer to the **4D Developer**'s guide. + +#### Example + +```4d + $mySharedCol:=New shared collection("alpha";"omega") + Use($mySharedCol) + $mySharedCol[1]:="beta" + End use +``` + + + + +## .average() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.average**( {*propertyPath* : Text } ) : Real + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath|Text|->|Object property path to be used for calculation| +|Result|Real, Undefined|<-|Arithmetic mean (average) of collection values| + + + + +#### Description + +The `.average()` function returns the arithmetic mean (average) of defined values in the collection instance. + + + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.average()` returns `undefined` if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + + +#### Example 1 + +```4d + var $col : Collection + $col:=New collection(10;20;"Monday";True;6) + $vAvg:=$col.average() //12 +``` + +#### Example 2 + +```4d + var $col : Collection + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $vAvg:=$col.average("salary") //23500 +``` + + + + + + +## .clear() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.clear()** : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Collection|<-|Original collection with all elements removed| + + + +#### Description + +The `.clear()` function removes all elements from the collection instance and returns an empty collection. + +>This function modifies the original collection. + +#### Example + +```4d +var $col : Collection +$col:=New collection(1;2;5) +$col.clear() +$vSize:=$col.length //$vSize=0 +``` + + + + + + + + +## .combine() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|col2|Collection|->|Collection to combine| +|index|Integer|->|Position to which insert elements to combine in collection (default=length+1)| +|Result|Collection|<-|Original collection containing combined element(s)| + + + +#### Description + +The `.combine()` function inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection. Unlike the `.insert()` function, `.combine()` adds each value of *col2* in the original collection, and not as a single collection element. + +>This function modifies the original collection. + +By default, *col2* elements are added at the end of the orginal collection. You can pass in *index* the position where you want the *col2* elements to be inserted in the collection. + +>**Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, the actual starting *index* will be set to the length of the collection. +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, *index* is set to 0. + + +#### Example + +```4d +var $c; $fruits : Collection +$c:=New collection(1;2;3;4;5;6) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$c.combine($fruits;3) //[1,2,3,"Orange","Banana","Apple","Grape",4,5,6] +``` + + + + + + + + +## .concat() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.concat**( *value* : any { *;...valueN* } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value|Number, Text, Object, Collection, Date, Time, Boolean, Picture|->|Value(s) to concatenate. If *value* is a collection, all collection elements are added to the original collection| +|Result|Collection|<-|New collection with value(s) added to the original collection| + + + +#### Description + +The `.concat()` function returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end. + +>This function does not modify the original collection. + +If *value* is a collection, all its elements are added as new elements at the end of the original collection. If *value* is not a collection, it is added itself as a new element. + + +#### Example + +```4d +var $c : Collection +$c:=New collection(1;2;3;4;5) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$fruits.push(New object("Intruder";"Tomato")) +$c2:=$c.concat($fruits) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}] +$c2:=$c.concat(6;7;8) //[1,2,3,4,5,6,7,8] +``` + + + + + + + +## .copy() + +
History +|Version|Changes| +|---|---| +|v18 R3|New *ck shared* option. New *groupWith* parameters| +|v16 R6|Added| +
+ + +**.copy**() : Collection
**.copy**( *option* : Integer ) : Collection
**.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
**.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|option|Integer|->|`ck resolve pointers`: resolve pointers before copying,
`ck shared`: return a shared collection| +|groupWithCol |Collection|->|Shared collection to be grouped with the resulting collection| +|groupWithObj |Object|->|Shared object to be grouped with the resulting collection| +|Result|Collection|<-|Deep copy of the original collection| + + + +#### Description + +The `.copy()` function returns a deep copy of the collection instance.***Deep copy*** means that objects or collections within the original collection are duplicated and do not share any reference with the returned collection. + +>This function does not modify the original collection. + +If passed, the *option* parameter can contain one of the following constants (or both): + +|option |Description| +|---|---| +|`ck resolve pointers`| If the original collection contains pointer type values, by default the copy also contains the pointers. However, you can resolve pointers when copying by passing the ck resolve pointers. In this case, each pointer present in the collection is evaluated when copying and its dereferenced value is used.| +|`ck shared`| By default, copy() returns a regular (not shared) collection, even if the command is applied to a shared collection. Pass the ck shared constant to create a shared collection. In this case, you can use the groupWith parameter to associate the shared collection with another collection or object (see below).| + +The *groupWithCol* or *groupWithObj* parameters allow you to designate a collection or an object with which the resulting collection should be associated. + + +#### Example 1 + +We want to copy the *$lastnames* regular (non shared) collection into the *$sharedObject* shared object. To do this, we must create a shared copy of the collection (*$sharedLastnames*). + +```4d +var $sharedObject : Object +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$sharedObject:=New shared object + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) //$sharedLastnames is a shared collection + +//Now we can put $sharedLastnames into $sharedObject +Use($sharedObject) + $sharedObject.lastnames:=$sharedLastnames +End use +``` + + +#### Example 2 + +We want to combine *$sharedColl1* and *$sharedColl2*. Since they belong to different shared groups, a direct combination would result in an error. Therefore, we must make a shared copy of *$sharedColl1* and designate *$sharedColl2* as a shared group for the copy. + +```4d +var $sharedColl1;$sharedColl2;$copyColl : Collection + +$sharedColl1:=New shared collection(New shared object("lastname";"Smith")) +$sharedColl2:=New shared collection(New shared object("lastname";"Brown")) + +//$copyColl belongs to the same shared group as $sharedColl2 + $copyColl:=$sharedColl1.copy(ck shared;$sharedColl2) + Use($sharedColl2) + $sharedColl2.combine($copyColl) + End use +``` + +#### Example 3 + +We have a regular collection (*$lastnames*) and we want to put it in the **Storage** of the application. To do this, we must create a shared copy beforehand (*$sharedLastnames*). + +```4d +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) // shared copy + +Use(Storage) + Storage.lastnames:=$sharedLastnames +End use +``` + +#### Example 4 + +This example illustrates the use of the `ck resolve pointers` option: + +```4d + var $col : Collection + var $p : Pointer + $p:=->$what + + $col:=New collection + $col.push(New object("alpha";"Hello";"num";1)) + $col.push(New object("beta";"You";"what";$p)) + + $col2:=$col.copy() + $col2[1].beta:="World!" + ALERT($col[0].alpha+" "+$col2[1].beta) //displays "Hello World!" + + $what:="You!" + $col3:=$col2.copy(ck resolve pointers) + ALERT($col3[0].alpha+" "+$col3[1].what) //displays "Hello You!" +``` + + + + + + + + + +## .count() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.count**( { *propertyPath* : Text } ) : Real + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath|Text|->|Object property path to be used for calculation| +|Result|Real|<-|Number of elements in the collection| + + + +#### Description + +The `.count()` function returns the number of non-null elements in the collection. + +If the collection contains objects, you can pass the *propertyPath* parameter. In this case, only elements that contain the *propertyPath* are taken into account. + +#### Example + +```4d + var $col : Collection + var $count1;$count2 : Real + $col:=New collection(20;30;Null;40) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $col.push(New object("lastName";"Henry";"salary";12000)) + $count1:=$col.count() //$count1=7 + $count2:=$col.count("name") //$count2=3 + +``` + + + + + + + + +## .countValues() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value|Text, Number, Boolean, Date, Object, Collection|->|Value to count| +|propertyPath|Text|->|Object property path to be used for calculation| +|Result|Real|<-|Number of occurrences of the value | + + + +#### Description + +The `.countValues()` function returns the number of times value is found in the collection. + +You can pass in *value*: + +* a scalar value (text, number, boolean, date), +* an object or a collection reference. + + +For an element to be found, the type of *value* must be equivalent to the type of the element; the method uses the equality operator. + +The optional *propertyPath* parameter allows you to count values inside a collection of objects: pass in *propertyPath* the path of the property whose values you want to count. + +>This function does not modify the original collection. + +#### Example 1 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection(1;2;5;5;5;3;6;4) + $vCount:=$col.countValues(5) // $vCount=3 +``` + + +#### Example 2 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection + $col.push(New object("name";"Smith";"age";5)) + $col.push(New object("name";"Wesson";"age";2)) + $col.push(New object("name";"Jones";"age";3)) + $col.push(New object("name";"Henry";"age";4)) + $col.push(New object("name";"Gross";"age";5)) + $vCount:=$col.countValues(5;"age") //$vCount=2 +``` + + +#### Example 3 + +```4d + var $numbers; $letters : Collection + var $vCount : Integer + + $letters:=New collection("a";"b";"c") + $numbers:=New collection(1;2;$letters;3;4;5) + + $vCount:=$numbers.countValues($letters) //$vCount=1 +``` + + + + + + + + + +## .distinct() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.distinct**( {*option* : Integer} ) : Collection
**.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|option|Integer|->|`ck diacritical`: diacritical evaluation ("A" # "a" for example)| +|propertyPath|Text|->|Path of attribute whose distinct values you want to get| +|Result|Collection|<-|New collection with only distinct values| + + + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the original collection. + +>This function does not modify the original collection. + +The returned collection is automatically sorted. **Null** values are not returned. + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the *option* parameter. + +If the collection contains objects, you can pass the *propertyPath* parameter to indicate the object property whose distinct values you want to get. + + + +#### Example + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push("a";"b";"c";"A";"B";"c";"b";"b") + $c.push(New object("size";1)) + $c.push(New object("size";3)) + $c.push(New object("size";1)) + $c2:=$c.distinct() //$c2=["a","b","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct(ck diacritical) //$c2=["a","A","b","B","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct("size") //$c2=[1,3] +``` + + + + + + + + +## .equal() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|collection2|Collection|->|Collection to compare| +|option|Integer|->|`ck diacritical`: diacritical evaluation ("A" # "a" for example) +|Result|Boolean|<-|True if collections are identical, false otherwise| + + + +#### Description + +The `.equal()` function compares the collection with collection2 and returns **true** if they are identical (deep comparison). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the option parameter. + +>Elements with **Null** values are not equal to Undefined elements. + +#### Example + +```4d + var $c; $c2 : Collection + var $b : Boolean + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3;4) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("1";"a";"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2) // true + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2;ck diacritical) //false +``` + + + + + + + +## .every() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
**.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom|Integer|->|Index to start the test at| +|methodName|Text|->|Name of the method to call for the test| +|param|Mixed|->|Parameter(s) to pass to methodName| +|Result|Boolean|<-|True if all elements successfully passed the test| + + + +#### Description + +The `.every()` function returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to true for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: paramN... + +*methodName* sets the following parameter(s): + +* *$1.result* (Boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (Boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In all cases, at the point when the `.every()` function encounters the first collection element returning **false** in *$1.result*, it stops calling *methodName* and returns **false**. + +By default, `.every()` tests the whole collection. Optionally, you can pass in *startFrom* the index of the element from which to start the test. + +* If *startFrom* >= the collection's length, **false** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection ( *startFrom:=startFrom+length*). +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example 1 + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("NumberGreaterThan0") //returns true +$c.push(-1) +$b:=$c.every("NumberGreaterThan0") //returns false +``` + +With the following ***NumberGreaterThan0*** method: + +```4d +$1.result:=$1.value>0 +``` + +#### Example 2 + +This example tests that all elements of a collection are of the real type: + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("TypeLookUp";Is real) //$b=true +$c:=$c.push(New object("name";"Cleveland";"zc";35049)) +$c:=$c.push(New object("name";"Blountsville";"zc";35031)) +$b:=$c.every("TypeLookUp";Is real) //$b=false +``` + +With the following ***TypeLookUp*** method: + +```4d +#DECLARE ($toEval : Object ; $param : Integer) //$1; $2 +If(Value type($toEval.value)=$param) + $toEval.result:=True +End if +``` + + + + + + + +## .extract() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
**.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath|Text|->|Object property path whose values must be extracted to the new collection| +|targetpath|Text|->|Target property path or property name| +|option|Integer|->|`ck keep null`: include null properties in the returned collection (ignored by default). Parameter ignored if *targetPath* passed.| +|Result|Collection|<-|New collection containing extracted values| + + + +#### Description + +The `.extract()` function creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects. + +>This function does not modify the original collection. + +The contents of the returned collection depends on the *targetPath* parameter: + +* If the *targetPath* parameter is omitted, `.extract()` populates the new collection with the *propertyPath* values of the original collection. + + By default, elements for which *propertyPath* is null or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as null elements in the returned collection. + + +* If one or more *targetPath* parameter(s) are passed, `.extract()` populates the new collection with the *propertyPath* properties and each element of the new collection is an object with *targetPath* properties filled with the corresponding *propertyPath* properties. Null values are kept (*option* parameter is ignored with this syntax). + + +#### Example 1 + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("name";"Cleveland")) +$c.push(New object("zip";5321)) +$c.push(New object("name";"Blountsville")) +$c.push(42) +$c2:=$c.extract("name") // $c2=[Cleveland,Blountsville] +$c2:=$c.extract("name";ck keep null) //$c2=[Cleveland,null,Blountsville,null] +``` + + +#### Example 2 + + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("zc";35060)) +$c.push(New object("name";Null;"zc";35049)) +$c.push(New object("name";"Cleveland";"zc";35049)) +$c.push(New object("name";"Blountsville";"zc";35031)) +$c.push(New object("name";"Adger";"zc";35006)) +$c.push(New object("name";"Clanton";"zc";35046)) +$c.push(New object("name";"Clanton";"zc";35045)) +$c2:=$c.extract("name";"City") //$c2=[{City:null},{City:Cleveland},{City:Blountsville},{City:Adger},{City:Clanton},{City:Clanton}] +$c2:=$c.extract("name";"City";"zc";"Zip") //$c2=[{Zip:35060},{City:null,Zip:35049},{City:Cleveland,Zip:35049},{City:Blountsville,Zip:35031},{City:Adger,Zip:35006},{City:Clanton,Zip:35046},{City:Clanton,Zip:35045}] +``` + + + + + + + + +## .fill() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.fill**( *value* : any ) : Collection
**.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection + + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value|number, Text, Collection, Object, Date, Boolean|->|Filling value| +|startFrom|Integer|->|Start index (included)| +|end|Integer|->|End index (not included)| +|Result|collection|<-|Original collection with filled values| + + + +#### Description + +The `.fill()` function fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection. + +>This function modifies the original collection. + +* If the *startFrom* parameter is omitted, *value* is set to all collection elements (*startFrom*=0). +* If the *startFrom* parameter is passed and *end* omitted, *value* is set to collection elements starting at *startFrom* to the last element of the collection (*end*=length). +* If both the *startFrom* parameter and *end* are passed, *value* is set to collection elements starting at *startFrom* to the element *end*. + +In case of inconsistency, the following rules apply: + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end* < *startFrom* (passed or calculated values), the method does nothing. + + +#### Example + +```4d + var $c : Collection + $c:=New collection(1;2;3;"Lemon";Null;"";4;5) + $c.fill("2") // $c:=[2,2,2,2,2,2,2,2] + $c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello] + $c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello] + $c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello] +``` + + + + + + + + +## .filter() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|methodName|Text|->|Name of the function to call to filter the collection| +|param|Mixed|->|Parameter(s) to pass to *methodName*| +|Result|Collection|<-|New collection containing filtered elements (shallow copy)| + + + +#### Description + +The `.filter()` function returns a new collection containing all elements of the original collection for which *methodName* method result is **true**. This function returns a ***shallow copy***, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to **true** for each element fulfilling the condition and thus, to push to the new collection. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be filtered +* in *$2*: *param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the filter condition and must be kept. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Example 1 + +You want to get the collection of text elements whose length is smaller than 6: + +```4d + var $col;$colNew : Collection + $col:=New collection("hello";"world";"red horse";66;"tim";"san jose";"miami") + $colNew:=$col.filter("LengthLessThan";6) + //$colNew=["hello","world","tim","miami"] +``` + +The code for ***LengthLessThan*** method is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Example 2 + +You want to filter elements according to their value type: + +```4d + var $c;$c2;$c3 : Collection + $c:=New collection(5;3;1;4;6;2) + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c2:=$c.filter("TypeLookUp";Is real) // $c2=[5,3,1,4,6,2] + $c3:=$c.filter("TypeLookUp";Is object) + // $c3=[{name:Cleveland,zc:35049},{name:Blountsville,zc:35031}] +``` + +The code for ***TypeLookUp*** is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(OB Get type($1;"value")=$2) + + + $1.result:=True + End if +``` + + + + + + + + +## .find() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.find**( *methodName* : Text { ; *...param* : any } ) : any
**.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom|Integer|->|Index to start the search at| +|methodName|Text|->|Name of the function to call for the find| +|param|any|->|Parameter(s) to pass to *methodName*| +|Result|any |<-|First value found, or Undefined if not found| + + + +#### Description + +The `.find()` function returns the first value in the collection for which *methodName*, applied on each element, returns **true**. + +>This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in the first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value:* element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.find()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). + **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example 1 + +You want to get the first element with a length smaller than 5: + +```4d + var $col : Collection + $col:=New collection("hello";"world";4;"red horse";"tim";"san jose") + $value:=$col.find("LengthLessThan";5) //$value="tim" +``` + +The code for ***LengthLessThan*** method is: + +```4d + var $1 : Object + var $2 : Integer + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Example 2 + +You want to find a city name within a collection: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.find("FindCity";"Clanton") //$c2={name:Clanton,zc:35046} +``` + +The code for ***FindCity*** is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 //name is a property name of objects in the collection +``` + + + + + + + + +## .findIndex() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + + +**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
**.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer + + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom|Integer|->|Index to start the search at| +|methodName|Text|->|Name of the function to call for the find| +|param|any|->|Parameter(s) to pass to *methodName*| +|Result|Integer |<-|Index of first value found, or -1 if not found| + + + +#### Description + +The `.findIndex()` function returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true**. + +>This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, using or not the parameter(s). This method receives an `Object` as first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.findIndex()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). + **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Example + +You want to find the position of the first city name within a collection: + +```4d + var $c : Collection + var $val2;$val3 : Integer + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $val2:=$c.findIndex("FindCity";"Clanton") // $val2=3 + $val3:=$c.findIndex($val2+1;"FindCity";"Clanton") //$val3=4 +``` + +The code for ***FindCity*** method is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 +``` + + + + + + + + + +## .indexOf() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|toSearch|expression|->|Expression to search in the collection| +|startFrom|Integer|->|Index to start the search at| +|Result|Integer |<-|Index of the first occurrence of toSearch in the collection, -1 if not found| + + + +#### Description + +The `.indexOf()` function searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found. + + +>This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator of the data type are applied). + +Optionally, you can pass the index of collection from which to start the search in *startFrom*. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). + **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Example + + + + + +```4d + var $col : Collection + var $i : Integer + $col:=New collection(1;2;"Henry";5;3;"Albert";6;4;"Alan";5) + $i:=$col.indexOf(3) //$i=4 + $i:=$col.indexOf(5;5) //$i=9 + $i:=$col.indexOf("al@") //$i=5 + $i:=$col.indexOf("Hello") //$i=-1 +``` + + + + + + + + +## .indices() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|queryString|Text|->|Search criteria| +|value|any|->|Value(s) to compare when using placeholder(s)| +|Result|Collection |<-|Element index(es) matching queryString in the collection| + + + +#### Description + +The `.indices()` function works exactly the same as the [`.query()`](#query) function but returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions, and not elements themselves. Indexes are returned in ascending order. + +>This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For a detailed description of the *queryString* and *value* parameters, please refer to the `dataClass.query()` function. + +#### Example + + +```4d + var $c; $icol : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $icol:=$c.indices("name = :1";"Cleveland") // $icol=[0] + $icol:=$c.indices("zc > 35040") // $icol=[0,3,4] +``` + + + + + + + +## .insert() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.insert**( *index* : Integer ; *element* : any ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|index|Integer|->|Where to insert the element| +|element|any|->|Element to insert in the collection| +|Result|Collection |<-|Original collection containing inserted element| + + + +#### Description + +The `.insert()` function inserts *element* at the specified *index* position in the collection instance and returns the edited collection. + +>This function modifies the original collection. + +In *index*, pass the position where you want the element to be inserted in the collection. + +>**Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, actual starting index will be set to the length of the collection. +* If *index* <0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, index is set to 0. + +Any type of element accepted by a collection can be inserted, even another collection. + +#### Example + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d") //$col=["a","b","c","d"] + $col.insert(2;"X") //$col=["a","b","X","c","d"] + $col.insert(-2;"Y") //$col=["a","b","X","Y","c","d"] + $col.insert(-10;"Hi") //$col=["Hi","a","b","X","Y","c","d"] +``` + + + + + + + + +## .join() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|delimiter|Text|->|Separator to use between elements| +|option|Integer|->|`ck ignore null or empty`: ignore null and empty strings in the result| +|Result|Text |<-|String containing all elements of the collection, separated by delimiter| + + + +#### Description + +The `.join()` function converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator.The function returns the resulting string. + +>This function does not modify the original collection. + +By default, null or empty elements of the collection are returned in the resulting string. Pass the `ck ignore null or empty` constant in the *option* parameter if you want to remove them from the resulting string. + +#### Example + + +```4d + var $c : Collection + var $t1;$t2 : Text + $c:=New collection(1;2;3;"Paris";Null;"";4;5) + $t1:=$c.join("|") //1|2|3|Paris|null||4|5 + $t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5 +``` + + + + + + + +## .lastIndexOf() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|toSearch|expression|->|The element that is to be searched for within the collection| +|startFrom|Integer|->|Index to start the search at| +|Result|Integer |<-|Index of last occurrence of toSearch in the collection, -1 if not found| + + + +#### Description + +The `.lastIndexOf()` function searches the *toSearch* expression among collection elements and returns the index of the last occurrence, or -1 if it was not found. + +>This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator are applied). + +Optionally, you can pass the index of collection from which to start a reverse search in *startFrom*. + +* If *startFrom* >= the collection's length minus one (coll.length-1), the whole collection is searched (default). +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, -1 is returned (the collection is not searched). + **Note:** Even if *startFrom* is negative, the collection is still searched from right to left. +* If *startFrom* = 0, -1 is returned, which means the collection is not searched. + +#### Example + + +```4d + var $col : Collection + var $pos1;$pos2;$pos3;$pos4;$pos5 : Integer + $col:=Split string("a,b,c,d,e,f,g,h,i,j,e,k,e";",") //$col.length=13 + $pos1:=$col.lastIndexOf("e") //returns 12 + $pos2:=$col.lastIndexOf("e";6) //returns 4 + $pos3:=$col.lastIndexOf("e";15) //returns 12 + $pos4:=$col.lastIndexOf("e";-2) //returns 10 + $pos5:=$col.lastIndexOf("x") //returns -1 +``` + + + + + + + +## .length + +
History +|Version|Changes| +|---|---| +|v16 R5|Added| +
+ + +**.length** : Integer + + + +#### Description + +The `.length` property returns the number of elements in the collection. + +The `.length` property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is **read-only** (you cannot use it to set the size of the collection). + +#### Example + + +```4d + var $col : Collection //$col.length initialized to 0 + $col:=New collection("one";"two";"three") //$col.length updated to 3 + $col[4]:="five" //$col.length updated to 5 + $vSize:=$col.remove(0;3).length //$vSize=2 +``` + + + + + + + +## .map() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.map**( *methodName* : Text { ; *...param* : any } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|methodName|Text|->|Name of method used to transform the collection elements| +|param|any|->|Parameter(s) for the method| +|Result|Collection |<-|Collection of transformed values| + + + +#### Description + +The `.map()` function creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection. Optionally, you can pass parameters to *methodName* using the *param* parameter(s). `.map()` always returns a collection with the same size as the original collection. + +>This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any operation, with or without the parameter(s). + +*methodName* receives the following parameters: + +* in *$1.value* (any type): element value to be mapped +* in *$2* (any type): *param* +* in *$N...* (any type): *paramN...* + +*methodName* sets the following parameter(s): + + +* *$1.result* (any type): new transformed value to add to the resulting collection +* *$1.stop* (boolean): **true** to stop the method callback. The returned value is the last calculated. + +#### Example + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;4;9;10;20) + $c2:=$c.map("Percentage";$c.sum()) + //$c2=[2.27,9.09,20.45,22.73,45.45] +``` + +Here is the ***Percentage*** method: + +```4d + var $1 : Object + var $2 : Real + $1.result:=Round(($1.value/$2)*100;2) +``` + + + + + + + + + +## .max() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.max**( { *propertyPath* : Text } ) : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath|Text|->|Object property path to be used for evaluation| +|Result|Boolean, Text, Number, Collection, Object, Date |<-|Maximum value in the collection| + + + +#### Description + +The `.max()` function returns the element with the highest value in the collection (the last element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). + +>This function does not modify the original collection. + +If the collection contains different types of values, the `.max()` function will return the maximum value within the last element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose maximum value you want to get. + +If the collection is empty, `.max()` returns *Undefined*. + +#### Example + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $max:=$col.max() //{name:Alabama,salary:10500} + $maxSal:=$col.max("salary") //50000 + $maxName:=$col.max("name") //"Wesson" +``` + + + + + + + +## .min() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.min**( { *propertyPath* : Text } ) : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath|Text|->|Object property path to be used for evaluation| +|Result|Boolean, Text, Number, Collection, Object, Date |<-|Minimum value in the collection| + + + +#### Description + +The `.min()` function returns the element with the smallest value in the collection (the first element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). + +>This function does not modify the original collection. + +If the collection contains different types of values, the `.min()` function will return the minimum value within the first element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose minimum value you want to get. + +If the collection is empty, `.min()` returns *Undefined*. + +#### Example + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $min:=$col.min() //55 + $minSal:=$col.min("salary") //10000 + $minName:=$col.min("name") //"Alabama" +``` + + + + + + + +## .orderBy() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.orderBy**( ) : Collection
**.orderBy**( *pathStrings* : Text ) : Collection
**.orderBy**( *pathObjects* : Collection ) : Collection
**.orderBy**( *ascOrDesc* : Integer ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| + +|pathStrings|Text|->|Property path(s) on which to order the collection| +|pathObjects|Collection|->|Collection of criteria objects| +|ascOrDesc|Integer|->|`ck ascending` or `ck descending` (scalar values)| +|Result|Collection |<-|Ordered copy of the collection (shallow copy)| + + + +#### Description + +The `.orderBy()` function returns a new collection containing all elements of the collection in the specified order. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +If you pass no parameter, the function orders scalar values in the collection in ascending order (other element types such as objects or collections are returned unordered). You can modify this automatic order by passing the `ck ascending` or `ck descending` constants in the *ascOrDesc* parameter (see below). + +You can also pass a criteria parameter to define how the collection elements must be sorted. Three syntaxes are supported for this parameter: + +* *pathStrings* : Text (formula). **Syntax**: `propertyPath1 {desc or asc}, propertyPath2 {desc or asc},...` (default order: asc). *pathStrings* contains a formula made of 1 to x property paths and (optionally) sort orders, separated by commas. The order in which the properties are passed determines the sorting priority of the collection elements. By default, properties are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* : Collection. You can add as many objects in the *pathObjects* collection as necessary. By default, properties are sorted in ascending order ("descending" is false). Each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +* *ascOrDesc* : Integer. You pass one of the following constants from the **Objects and collections** theme: + + |Constant| Type|Value|Comment| + |---|---|---|---| + |ck ascending|Longint|0|Elements are ordered in ascending order (default)| + |ck descending|Longint|1|Elements are ordered in descending order + + This syntax orders scalar values in the collection only (other element types such as objects or collections are returned unordered). + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Example 1 + +Ordering a collection of numbers in ascending and descending order: + +```4d + var $c; $c2; $3 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(Random) + End for + $c2:=$c.orderBy(ck ascending) + $c3:=$c.orderBy(ck descending) +``` + + +#### Example 2 + +Ordering a collection of objects based on a text formula with property names: + +```4d + var $c; $c2 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $c2:=$c.orderBy("value desc") + $c2:=$c.orderBy("value desc, id") + $c2:=$c.orderBy("value desc, id asc") +``` + +Ordering a collection of objects with a property path: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + + $c2:=$c.orderBy("phones.p1 asc") +``` + + +#### Example 3 + +Ordering a collection of objects using a collection of criteria objects: + +```4d + var $crit; $c; $c2 : COllection + $crit:=New collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $crit.push(New object("propertyPath";"value";"descending";True)) + $crit.push(New object("propertyPath";"id";"descending";False)) + $c2:=$c.orderBy($crit) +``` + +Ordering with a property path: + +```4d + var $crit; $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + $crit:=New collection(New object("propertyPath";"phones.p2";"descending";True)) + $c2:=$c.orderBy($crit) +``` + + + + + + + + + +## .orderByMethod() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|methodName|Text|->|Name of method used to specify the sorting order| +|extraParam|expression|->|Parameter(s) for the method | +|Result|Collection |<-|Sorted copy of the collection (shallow copy)| + + + +#### Description + +The `.orderByMethod()` function returns a new collection containing all elements of the collection in the order defined through the *methodName* method. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +In *methodName*, pass a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters +* *methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +#### Example 1 + +You want to sort a collection of strings in numerical order rather than alphabetical order: + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push("33";"4";"1111";"222") + $c2:=$c.orderBy() //$c2=["1111","222","33","4"], alphabetical order + $c3:=$c.orderByMethod("NumAscending") // $c3=["4","33","222","1111"] +``` + + Here is the code for ***NumAscending***: + + +```4d + $1.result:=Num($1.value)Length(String($1.value2)) +``` + +#### Example 3 + +You want to sort a collection by character code or language: + +```4d +var $strings1; $strings2 : Collection +$strings1:=New collection("Alpha";"Charlie";"alpha";"bravo";"Bravo";"charlie") + +//using the character code: +$strings2:=$strings1.orderByMethod("sortCollection";sk character codes) +// result : ["Alpha","Bravo","Charlie","alpha","bravo","charlie"] + +//using the language: +$strings2:=$string1s.orderByMethod("sortCollection";sk strict) +// result : ["alpha","Alpha","bravo","Bravo","charlie","Charlie"] +``` + +The ***sortCollection*** method: + +```4d +var$1Object +var$2Integer // sort option + +$1.result:=(Compare strings($1.value;$1.value2;$2)<0) +``` + + + + + + + + +## .pop() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + + +**.pop()** : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|any |<-|Last element of collection| + + + +#### Description + +The `.pop()` function removes the last element from the collection and returns it as the function result. + +>This function modifies the original collection. + +When applied to an empty collection, `.pop()` returns ***undefined***. + +#### Example + +`.pop()`, used in conjunction with [`.push()`](#push), can be used to implement a first-in, last-out stack feature: + +```4d + var $stack : Collection + $stack:=New collection //$stack=[] + $stack.push(1;2) //$stack=[1,2] + $stack.pop() //$stack=[1] Returns 2 + $stack.push(New collection(4;5)) //$stack=[[1,[4,5]] + $stack.pop() //$stack=[1] Returns [4,5] + $stack.pop() //$stack=[] Returns 1 +``` + + + + + + + + + +## .push() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.push**( *element* : any { ;...*elementN* } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|element|Mixed|->|Element(s) to add to the collection| +|Result|Collection |<-|Original collection containing added elements| + + + +#### Description + +The `.push()` function appends one or more *element*(s) to the end of the collection instance and returns the edited collection. + +>This function modifies the original collection. + + +#### Example 1 + +```4d + var $col : Collection + $col:=New collection(1;2) //$col=[1,2] + $col.push(3) //$col=[1,2,3] + $col.push(6;New object("firstname";"John";"lastname";"Smith")) + //$col=[1,2,3,6,{firstname:John,lastname:Smith} +``` + + + +#### Example 2 + +You want to sort the resutling collection: + +```4d + var $col; $sortedCol : Collection + $col:=New collection(5;3;9) //$col=[5,3,9] + $sortedCol:=$col.push(7;50).sort() + //$col=[5,3,9,7,50] + //$sortedCol=[3,5,7,9,50] +``` + + + + + + + + + + +## .query() + +
History +|Version|Changes| +|---|---| +|v17 R5|Support of querySettings| +|v16 R6|Added| +
+ + +**.query**( *queryString* : Text ; *...value* : any ) : Collection
**.query**( *queryString* : Text ; *querySettings* : Object ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|queryString|Text|->|Search criteria| +|value|Mixed|->|Value(s) to compare when using placeholder(s)| +|querySettings|Object|->|Query options: parameters, attributes| +|Result|Collection |<-|Element(s) matching queryString in the collection| + + + +#### Description + +The `.query()` function returns all elements of a collection of objects that match the search conditions defined by *queryString* and (optionally) *value* or *querySettings*. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For detailed information on how to build a query using *queryString*, *value* and *querySettings* parameters, please refer to the [`dataClass.query()`](DataClassClass.md#query) function description. + +> Formulas are not supported by the `collection.query()` function, neither in the *queryString* parameter nor as *formula* object parameter. + +#### Example 1 + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.query("name = :1";"Cleveland") //$c2=[{name:Cleveland,zc:35049}] + $c3:=$c.query("zc > 35040") //$c3=[{name:Cleveland,zc:35049},{name:Clanton,zc:35046},{name:Clanton,zc:35045}] +``` + + +#### Example 2 + + +```4d + var $c : Collection + $c:=New collection + $c.push(New object("name";"Smith";"dateHired";!22-05-2002!;"age";45)) + $c.push(New object("name";"Wesson";"dateHired";!30-11-2017!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) +``` + +This example returns persons whose name contains "in": + +```4d + $col:=$c.query("name = :1";"@in@") + //$col=[{name:Winch...},{name:Sterling...}] +``` + +This example returns persons whose name does not begin with a string from a variable (entered by the user, for example): + +```4d + $col:=$c.query("name # :1";$aString+"@") + //if $astring="W" + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons whose age is not known (property set to null or undefined): + +```4d + $col:=$c.query("age=null") //placeholders not allowed with "null" + //$col=[{name:Wesson...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons hired more than 90 days ago: + +```4d + $col:=$c.query("dateHired < :1";(Current date-90)) + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] if today is 01/10/2018 +``` + + +#### Example 3 + +More examples of queries can be found in the `dataClass.query()` page. + + + + + + + + +## .reduce() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.reduce**( *methodName* : Text ) : any
**.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|methodName |Text|->|Name of the function to call to process collection elements| +|initValue |Text, Number, Object, Collection, Date, Boolean|->|Value to use as the first argument to the first call of *methodName*| +|param |expression|->|Parameter(s) to pass to *methodName*| +|Result|Text, Number, Object, Collection, Date, Boolean |<-|Result of the accumulator value| + + + +#### Description + + +The `.reduce()` function applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value. + +>This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in param (optional). *methodName* takes each collection element and performs any desired operation to accumulate the result into *$1.accumulator*, which is returned in *$1.value*. + +You can pass the value to initialize the accumulator in *initValue*. If omitted, *$1.accumulator* starts with *Undefined*. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be processed +* in *$2: param* +* in *$N...*: *paramN...* + +*methodName* sets the following parameter(s): + +* *$1.accumulator*: value to be modified by the function and which is initialized by *initValue*. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Example 1 + + +```4d + C_COLLECTION($c) + $c:=New collection(5;3;5;1;3;4;4;6;2;2) + $r:=$c.reduce("Multiply";1) //returns 86400 +``` + +With the following ***Multiply*** method: + +```4d + If(Value type($1.value)=Is real) + $1.accumulator:=$1.accumulator*$1.value + End if +``` + +#### Example + +This example allows reducing several collection elements to a single one: + +```4d + var $c;$r : Collection + $c:=New collection + $c.push(New collection(0;1)) + $c.push(New collection(2;3)) + $c.push(New collection(4;5)) + $c.push(New collection(6;7)) + $r:=$c.reduce("Flatten") //$r=[0,1,2,3,4,5,6,7] +``` + +With the following ***Flatten*** method: + +```4d + If($1.accumulator=Null) + $1.accumulator:=New collection + End if + $1.accumulator.combine($1.value) +``` + + + + + + + +## .remove() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|index |Integer|->|Element at which to start removal| +|howMany |Integer|->|Number of elements to remove, or 1 element if omitted| +|Result|Collection|<-|Original collection without removed element(s)| + + + +#### Description + +The `.remove()` function removes one or more element(s) from the specified *index* position in the collection and returns the edited collection. + +>This function modifies the original collection. + +In *index*, pass the position where you want the element to be removed from the collection. + +>**Warning**: Keep in mind that collection elements are numbered from 0. If *index* is greater than the length of the collection, actual starting index will be set to the length of the collection. + +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *index* is set to 0. +* If the calculated value > the length of the collection, *index* is set to the length. + +In *howMany*, pass the number of elements to remove from *index*. If *howMany* is not specified, then one element is removed. + + + +If you try to remove an element from an empty collection, the method does nothing (no error is generated). + + +#### Example + + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d";"e";"f";"g";"h") + $col.remove(3) // $col=["a","b","c","e","f","g","h"] + $col.remove(3;2) // $col=["a","b","c","g","h"] + $col.remove(-8;1) // $col=["b","c","g","h"] + $col.remove(-3;1) // $col=["b","g","h"] +``` + + + + + + + + + +## .resize() + + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + + + +**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|size |Integer|->|New size of the collection| +|defaultValue |Number, Text, Object, Collection, Date, Boolean|->|Default value to fill new elements| +|Result|Collection|<-|Resized original collection| + + + +#### Description + +The `.resize()` function sets the collection length to the specified new size and returns the resized collection. + +>This function modifies the original collection. + +* If *size* < collection length, exceeding elements are removed from the collection. +* If *size* > collection length, the collection length is increased to size. + +By default, new elements are filled will **null** values. You can specify the value to fill in added elements using the *defaultValue* parameter. + +#### Example + + +```4d + var $c : Collection + $c:=New collection + $c.resize(10) // $c=[null,null,null,null,null,null,null,null,null,null] + + $c:=New collection + $c.resize(10;0) // $c=[0,0,0,0,0,0,0,0,0,0] + + $c:=New collection(1;2;3;4;5) + $c.resize(10;New object("name";"X")) //$c=[1,2,3,4,5,{name:X},{name:X},{name:X},{name:X},{name:X}] + + $c:=New collection(1;2;3;4;5) + $c.resize(2) //$c=[1,2] + +``` + + + + + + + + + +## .reverse() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.reverse( )** : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Collection|<-|Inverted copy of the collection| + + + +#### Description + +The `.reverse()` function returns a deep copy of the collection with all its elements in reverse order. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +#### Example + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;3;5;2;4;6) + $c2:=$c.reverse() //$c2=[6,4,2,5,3,1] +``` + + + + + + + + +## .shift() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.shift()** : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|any|<-|First element of collection| + + + +#### Description + +The `.shift()` function removes the first element of the collection and returns it as the function result. + +>This function modifies the original collection. + +If the collection is empty, this method does nothing. + +#### Example + + +```4d + var $c : Collection + var $val : Variant + $c:=New collection(1;2;4;5;6;7;8) + $val:=$c.shift() + // $val=1 + // $c=[2,4,5,6,7,8] +``` + + + + + + + + +## .slice() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom |Integer |->|Index to start the search at (included)| +|end |Integer |->|End index (not included)| +|Result|Collection|<-|New collection containing sliced elements (shallow copy)| + + + +#### Description + +The `.slice()` function returns a portion of a collection into a new collection, selected from *startFrom* index to *end* index (end not included). This function returns a *shallow copy* of the collection. If the original collection is a shared collection, the returned collection is also a shared collection. + +>This function does not modify the original collection. + +The returned collection contains the element specified by *startFrom* and all subsequent elements up to, but not including, the element specified by *end*. If only the *startFrom* parameter is specified, the returned collection contains all elements from *startFrom* to the last element of the original collection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +#### Example + + +```4d + var $c; $nc : Collection + $c:=New collection(1;2;3;4;5) + $nc:=$c.slice(0;3) //$nc=[1,2,3] + $nc:=$c.slice(3) //$nc=[4,5] + $nc:=$c.slice(1;-1) //$nc=[2,3,4] + $nc:=$c.slice(-3;-2) //$nc=[3] +``` + + + + + + + + +## .some() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
**.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom |Integer |->|Index to start the test at| +|methodName |Text |->|Name of the method to call for the test| +|param |Mixed |->|Parameter(s) to pass to *methodName*| +|Result|Boolean|<-|True if at least one element successfully passed the test| + + + +#### Description + +The `.some()` function returns true if at least one element in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` as first parameter ($1) and must set *$1.result* to **True** for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In any case, at the point where `.some()` function encounters the first collection element returning true in *$1.result*, it stops calling *methodName* and returns **true**. + +By default, `.some()` tests the whole collection. Optionally, you can pass the index of an element from which to start the test in *startFrom*. + +* If *startFrom* >= the collection's length, **False** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example + + +```4d + var $c : Collection + var $b : Boolean + $c:=New collection + $c.push(-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") // returns false + $c.push(1) + $b:=$c.some("NumberGreaterThan0") // returns true + + $c:=New collection + $c.push(1;-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") //$b=true + $b:=$c.some(1;"NumberGreaterThan0") //$b=false +``` + +With the following *NumberGreaterThan0* method: + +```4d + $1.result:=$1.value>0 +``` + + + + + + + + + +## .sort() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|methodName |Text |->|Name of method used to specify the sorting order| +|extraParam |any |->|Parameter(s) for the method| +|Result|Collection|<-|Original collection sorted| + + + +#### Description + +The `.sort()` function sorts the elements of the original collection and also returns the sorted collection. + +>This function modifies the original collection. + +If `.sort()` is called with no parameters, only scalar values (number, text, date, booleans) are sorted. Elements are sorted by default in ascending order, according to their type. + +If you want to sort the collection elements in some other order or sort any type of element, you must supply in *methodName* a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters + +*methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Example 1 + + +```4d + var $col; $col2 : Collection + $col:=New collection("Tom";5;"Mary";3;"Henry";1;"Jane";4;"Artie";6;"Chip";2) + $col2:=$col.sort() // $col2=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] + // $col=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] +``` + +#### Example 2 + +```4d + var $col; $col2 : Collection + $col:=New collection(10;20) + $col2:=$col.push(5;3;1;4;6;2).sort() //$col2=[1,2,3,4,5,6,10,20] +``` + +#### Example 3 + +```4d + var $col; $col2; $col3 : Collection + $col:=New collection(33;4;66;1111;222) + $col2:=$col.sort() //numerical sort: [4,33,66,222,1111] + $col3:=$col.sort("numberOrder") //alphabetical sort: [1111,222,33,4,66] +``` + +```4d + //numberOrder project method + var $1 : Object + $1.result:=String($1.value) + + + + + +## .sum() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.sum**( { *propertyPath* : Text } ) : Real + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|propertyPath |Text |->|Object property path to be used for calculation| +|Result|Real|<-|Sum of collection values| + + + +#### Description + +The `.sum()` function returns the sum for all values in the collection instance. + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.sum()` returns 0 if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + +#### Example 1 + + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection(10;20;"Monday";True;2) + $vSum:=$col.sum() //32 +``` + +#### Example 2 + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500,5)) + $vSum:=$col.sum("salary") //$vSum=70500,5 +``` + + + + + + + + +## .unshift() + +
History +|Version|Changes| +|---|---| +|v16 R6|Added| +
+ + +**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|value |Text, Number, Object, Collection, Date |->|Value(s) to insert at the beginning of the collection| +|Result|Real|<-|Collection containing added element(s) +| + + + +#### Description + +The `.unshift()` function inserts the given *value*(s) at the beginning of the collection and returns the modified collection. + +>This function modifies the original collection. + +If several values are passed, they are inserted all at once, which means that they appear in the resulting collection in the same order as in the argument list. + + +#### Example + + +```4d + var $c : Collection + $c:=New collection(1;2) + $c.unshift(4) // $c=[4,1,2] + $c.unshift(5) //$c=[5,4,1,2] + $c.unshift(6;7) // $c=[6,7,5,4,1,2] +``` + + + + + diff --git a/docs/API/CryptoKeyClass.md b/docs/API/CryptoKeyClass.md new file mode 100644 index 00000000000000..f68975c8035bf8 --- /dev/null +++ b/docs/API/CryptoKeyClass.md @@ -0,0 +1,385 @@ +--- +id: CryptoKeyClass +title: CryptoKey +--- + + +The `CryptoKey` class in the 4D language encapsulates an asymetric encryption key pair. + +This class is available from the `4D` class store. + +### Example + +The following sample code signs and verifies a message using a new ECDSA key pair, for example in order to make a ES256 JSON Web token. + +```4d + // Generate a new ECDSA key pair +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) + + // Get signature as base64 +$message:="hello world" +$signature:=$key.sign($message;New object("hash";"SHA256")) + + // Verify signature +$status:=$key.verify($message;$signature;New object("hash";"SHA256")) +ASSERT($status.success) +``` + + +### Summary +|| +|---| +|[](#4dcryptokeynew)

    

| +|[](#curve)

    

| +|[](#decrypt)

    

| +|[](#encrypt)

    

| +|[](#getprivatekey)

    

| +|[](#getpublickey)

    

| +|[](#sign)

    

| +|[](#size)

    

| +|[](#type)

    

| +|[](#verify)

    

| + + + + + + + + +## 4D.CryptoKey.new() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey + + +|Parameter|Type||Description| +|---|---|----|---| +|settings|Object|->|Settings to generate or load a key pair| +|result|4D.CryptoKey|<-|Object encapsulating an encryption key pair| + + +The `4D.CryptoKey.new()` function creates a new `4D.CryptoKey` object encapsulating an encryption key pair, based upon the *settings* object parameter. It allows to generate a new RSA or ECDSA key, or to load an existing key pair from a PEM definition. + +#### *settings* + +|Property|Type|Description| +|---|---|---| +|[curve](#curve)|text|Name of ECDSA curve| +|[pem](#pem)|text|PEM definition of an encryption key to load| +|[size](#size)|integer|Size of RSA key in bits| +|[type](#type)|text|Type of the key: "RSA", "ECDSA", or "PEM"| + + +#### *CryptoKey* + +The returned `CryptoKey` object encapsulates an encryption key pair. It is a shared object and can therefore be used by multiple 4D processes simultaneously. + + + + +## .curve + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ +**.curve** : Text + + + + +Defined only for ECDSA keys: the normalised curve name of the key. +Usually "prime256v1" for ES256 (default), "secp384r1" for ES384, "secp521r1" for ES512. + + + +## .decrypt() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.decrypt**( *message* : Text ; *options* : Object ) : Object + + +|Parameter|Type||Description| +|---|---|----|---| +|message|Text|->|Message string to be decoded using `options.encodingEncrypted` and decrypted.| +|options|Object|->|Decoding options| +|Result|Object|<-|Status| + + + + +The `.decrypt()` function decrypts the *message* parameter using the **private** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +#### *options* + +|Property|Type|Description| +|---|---|---| +|hash|text|Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +|encodingEncrypted|text|Encoding used to convert the `message` parameter into the binary representation to decrypt. Can be "Base64" or "Base64URL". Default is "Base64".| +|encodingDecrypted|text|Encoding used to convert the binary decrypted message into the result string. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8".| + + +#### *Result* + +The function returns a status object with `success` property set to `true` if the *message* could be successfully decrypted. + +|Property|Type|Description| +|---|---|---| +|success|boolean|True if the message has been successfully decrypted| +|result|text|Message decrypted and decoded using the `options.encodingDecrypted`| +|errors|collection|If `success` is `false`, may contain a collection of errors| + + +In case the *message* couldn't be decrypted because it was not encrypted with the same key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + + + +## .encrypt() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.encrypt**( *message* : Text ; *options* : Object ) : Text + + +|Parameter|Type||Description| +|---|---|----|---| +|message|Text|->|Message string to be encoded using `options.encodingDecrypted` and encrypted.| +|options|Object|->|Encoding options| +|Result|Text|<-|Message encrypted and encoded using the `options.encodingEncrypted`| + + +The `.encrypt()` function encrypts the *message* parameter using the **public** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +##### *options* + +|Property|Type|Description| +|---|---|---| +|hash|text|Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +|encodingEncrypted|text|Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64".| +|encodingDecrypted|text|Encoding used to convert the `message` parameter into the binary representation to encrypt. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8".| + + +#### *Result* + +The returned value is an encrypted message. + + + + + + +## .getPrivateKey() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.getPrivateKey()** : Text + + + +|Parameter|Type||Description| +|---|---|----|---| +|Result|Text|<-|Private key in PEM format| + + +The `.getPrivateKey()` function returns the private key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Result* + +The returned value is the private key. + + + + + +## .getPublicKey() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.getPublicKey( )** : Text + + +|Parameter|Type||Description| +|---|----|---|---| +|Result|Text|<-|Public key in PEM format| + + + +The `.getPublicKey()` function returns the public key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Result* + +The returned value is the public key. + + +--- + +## .pem + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.pem** : Text + + +PEM definition of an encryption key to load. If the key is a private key, the RSA or ECDSA public key will be deduced from it. + + + + + +## .sign() + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ +.**sign** (*message* : Text ; *options* : Text) : Text + + +|Parameter|Type||Description| +|---|----|---|---| +|message|Text|->|Message string to sign| +|options|Object|->|Signing options| +|Result|Text|<-|Signature in Base64 or Base64URL representation, depending on "encoding" option| + + +The `.sign()` function signs the utf8 representation of a *message* string using the `CryptoKey` object keys and provided *options*. It returns its signature in base64 or base64URL format, depending on the value of the `options.encoding` attribute you passed. + +The `CryptoKey` must contain a valid **private** key. + +#### *options* + +|Property|Type|Description| +|---|---|---| +|hash|text|Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". When used to produce a JWT, the hash size must match the PS@, ES@, RS@, or PS@ algorithm size| +|encodingEncrypted|text|Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64".| +|pss|boolean|Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when producing a JWT for PS@ algorithm| +|encoding|text|ERepresentation to be used for result signature. Possible values: "Base64" or "Base64URL". Default is "Base64".| + + +#### *Result* + +The utf8 representation of the *message* string. + + + + +## .size + + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ +**.size** : Integer + + +Defined only for RSA keys: the size of the key in bits. Typically 2048 (default). + + + +## .type + + +
History +|Version|Changes| +|---|---| +|v18 R4|Added +
+ + +**.type** : Text + + +Name of the key type - "RSA", "ECDSA", "PEM"
  • "RSA": an RSA key pair, using `settings.size` as [.size](#size).
  • "ECDSA": an Elliptic Curve Digital Signature Algorithm key pair, using `settings.curve` as [.curve](#curve). Note that ECDSA keys cannot be used for encryption but only for signature.
  • "PEM": a key pair definition in PEM format, using `settings.pem` as [.pem](#pem). + + + +## .verify() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added +
    + +**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object + + +|Parameter|Type||Description| +|---|---|---|---| +|message|Text|->|Message string that was used to produce the signature| +|signature|Text|->|Signature to verify, in Base64 or Base64URL representation, depending on `options.encoding` value| +|options|Object|->|Signing options| +|Result|Object|<-|Status of the verification| + + +The `.verify()` function verifies the base64 signature against the utf8 representation of *message* using the `CryptoKey` object keys and provided *options*. + +The `CryptoKey` must contain a valid **public** key. + + +#### *options* + +|Property|Type|Description| +|---|---|---| +|hash|text|Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". When used to produce a JWT, the hash size must match the PS@, ES@, RS@, or PS@ algorithm size| +|pss|boolean|Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when verifying a JWT for PS@ algorithm| +|encoding|text|Representation of provided signature. Possible values are "Base64" or "Base64URL". Default is "Base64". + + +#### *Result* + +The function returns a status object with `success` property set to `true` if `message` could be successfully verified (i.e. the signature matches). + +In case the signature couldn't be verified because it was not signed with the same *message*, key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + +|Property|Type|Description| +|---|---|---| +|success|boolean|True if the signature matches the message| +|errors|collection|If `success` is `false`, may contain a collection of errors| + + + diff --git a/docs/API/DataClassAttributeClass.md b/docs/API/DataClassAttributeClass.md new file mode 100644 index 00000000000000..35e0c4088bdc8a --- /dev/null +++ b/docs/API/DataClassAttributeClass.md @@ -0,0 +1,461 @@ +--- +id: DataClassAttributeClass +title: DataClassAttribute +--- + +Dataclass attributes are available as properties of their respective classes. For example: + +```4d + nameAttribute:=ds.Company.name //reference to class attribute + revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to *nameAttribute* and *revenuesAttribute* references to the name and revenues attributes of the Company class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [**Entities**](EntityClass.md). + +`DataClassAttribute` objects have properties that you can read to get information about your dataclass attributes. + +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +### Summary + +|| +|---| +|[](#autofilled)

        | +|[](#exposed)

         | +|[](#fieldnumber)

         | +|[](#fieldtype)

         | +|[](#indexed)

         | +|[](#inversename)

         | +|[](#keywordindexed)

         | +|[](#kind)

         | +|[](#mandatory)

         | +|[](#name)

         | +|[](#readonly)

         | +|[](#relateddataclass)

         | +|[](#type)

         | +|[](#unique)

         | + + + + +## .autoFilled + +

    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.autoFilled** : Boolean + + +#### Description + +The `.autoFilled` property contains True if the attribute value is automatically filled by 4D. This property corresponds to the following 4D field properties: + +* "Autoincrement", for numeric type fields +* "Auto UUID", for UUID (alpha type) fields. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Bool**(dataClassAttribute.autoFilled) to get a valid value (false) even if `.autoFilled` is not returned. + + + + + +## .exposed + +
    History +|Version|Changes| +|---|---| +|v19 R3|Added| +
    + + + +**.exposed** : Boolean + + +#### Description + +The `.exposed` property is true if the attribute is exposed in REST. + + + + + + + +## .fieldNumber + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.fieldNumber** : Integer + + +#### Description + +The `.fieldNumber` property contains the internal 4D field number of the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Num**(dataClassAttribute.fieldNumber) to get a valid value (0) even if `.fieldNumber` is not returned. + + + + + + + + +## .fieldType + +
    History +|Version|Changes| +|---|---| +|v19 R3|Support of computed attributes| +
    + + + +**.fieldType** : Integer + + +#### Description + +The `.fieldType` property contains the 4D database type of the attribute. It depends on the attribute kind (see [`.kind`](#kind)). + +**Possible values:** + +|dataClassAttribute.kind| fieldType| +|---|---| +|storage| Corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)| +|relatedEntity| 38 (`Is object`) | +|relatedEntities| 42 (`Is collection`) | +|calculated|
  • scalar: corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)
  • entity: 38 (`Is object`)
  • entity selection: 42 (`Is collection)`| + + + + +#### See also + +[`.type`](#type) + + +## .indexed + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.indexed** : Boolean + + +#### Description + +The `.indexed` property contains **True** if there is a B-tree or a Cluster B-tree index on the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Bool**(dataClassAttribute.indexed) to get a valid value (false) even if `.indexed` is not returned. + + + + + + + +## .inverseName + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.inverseName** : Text + + +#### Description + +The `.inverseName` property returns the name of the attribute which is at the other side of the relation. + +This property is not returned if `.kind` = "storage". It must be of the "relatedEntity" or "relatedEntities" kind. + +>For generic programming, you can use **String**(dataClassAttribute.inverseName) to get a valid value ("") even if `.inverseName` is not returned. + + + + + + + +## .keyWordIndexed + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.keyWordIndexed** : Boolean + + +#### Description + +The `.keyWordIndexed` property contains **True** if there is a keyword index on the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Bool**(dataClassAttribute.keyWordIndexed) to get a valid value (false) even if `.keyWordIndexed` is not returned. + + + + + + +## .kind + +
    History +|Version|Changes| +|---|---| +|v19 R3|Added "calculated"| +
    + + + +**.kind** : Text + + +#### Description + +The `.kind` property returns the category of the attribute. Returned value can be one of the following: + +* "storage": storage (or scalar) attribute, i.e. attribute storing a value, not a reference to another attribute +* "calculated": computed attribute, i.e. defined through a [`get` function](ORDA/ordaClasses.md#function-get-attributename). +* "relatedEntity": N -> 1 relation attribute (reference to an entity) +* "relatedEntities": 1 -> N relation attribute (reference to an entity selection) + + +#### Example + +Given the following table and relation: + +![](/assets/en/API/dataclassAttribute3.png) + +```4d + var $attKind : Text + $attKind:=ds.Employee.lastname.kind //$attKind="storage" + $attKind:=ds.Employee.manager.kind //$attKind="relatedEntity" + $attKind:=ds.Employee.directReports.kind //$attKind="relatedEntities" +``` + + + + + + + + +## .mandatory + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.mandatory** : Boolean + + +#### Description + +The `.mandatory` property contains True if Null value input is rejected for the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Bool**(dataClassAttribute.mandatory) to get a valid value (false) even if `.mandatory` is not returned. + +>**Warning**: This property corresponds to the "Reject NULL value input" field property at the 4D database level. It is unrelated to the existing "Mandatory" property which is a data entry control option for a table. + + + + + + + +## .name + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.name** : Text + + +#### Description + +The `.name` property returns the name of the `dataClassAttribute` object as string. + +#### Example + +```4d + var $attName : Text + $attName:=ds.Employee.lastname.name //$attName="lastname" +``` + + + + + + +## .readOnly + +
    History +|Version|Changes| +|---|---| +|v19 R3|Added| + + +
    + + + +**.readOnly** : Boolean + + +#### Description + +The `.readOnly` property is true if the attribute is read-only. + +For example, computed attributes without [`set` function](ORDA/ordaClasses.md#function-set-attributename) are read-only. + + + + + + +## .relatedDataClass + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| + + +
    + + + +**.relatedDataClass** : Text + + +#### Description + +>This property is only available with attributes of the "relatedEntity" or "relatedEntities" [`.kind`](#kind) property. + +The `.relatedDataClass` property returns the name of the dataclass related to the attribute. + +#### Example + +Given the following tables and relations: + + +![](assets/en/API/dataclassAttribute4.png) + + + +```4d + var $relClass1; $relClassN : Text + $relClass1:=ds.Employee.employer.relatedDataClass //$relClass1="Company" + $relClassN:=ds.Employee.directReports.relatedDataClass //$relClassN="Employee" +``` + + + + + + +## .type + +
    History +|Version|Changes| +|---|---| +|v19 R3|Support of computed attributes| +
    + + + +**.type** : Text + + +#### Description + +The `.type` property contains the conceptual value type of the attribute, useful for generic programming. + +The conceptual value type depends on the attribute [`.kind`](#kind). + +**Possible values:** + +|dataClassAttribute.kind| type| Comment| +|---|---|---| +|storage|"blob", "bool", "date", "image", "number", "object", or "string"| "number" is returned for any numeric types including duration. "string" is returned for uuid, alpha and text field types. "blob" attributes are [blob objects](Concepts/dt_blob.md#blob-type), they are handled using the [Blob class](BlobClass.md).| +|relatedEntity|related dataClass name|Ex: "Companies"| +|relatedEntities|related dataClass name + "Selection" suffix| Ex: "EmployeeSelection"| +|calculated|
  • storage: type ("blob", "number", etc.)
  • entity: dataClass name
  • entity selection: dataClass name + "Selection"|| + + + +#### See also + +[`.fieldType`](#fieldtype) + + + +## .unique + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + + +**.unique** : Boolean + + +#### Description + +The `.unique` property contains True if the attribute value must be unique. This property corresponds to the "Unique" 4D field property. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". + +>For generic programming, you can use **Bool**(dataClassAttribute.unique) to get a valid value (false) even if `.unique` is not returned. + + + + diff --git a/docs/API/DataClassClass.md b/docs/API/DataClassClass.md new file mode 100644 index 00000000000000..346d8e2950fccd --- /dev/null +++ b/docs/API/DataClassClass.md @@ -0,0 +1,1255 @@ +--- +id: DataClassClass +title: DataClass +--- + + +A [DataClass](ORDA/dsMapping.md#dataclass) provides an object interface to a database table. All dataclasses in a 4D application are available as a property of the `ds` [datastore](ORDA/dsMapping.md#datastore). + + + +### Summary + +|| +|---| +|[](#attributename)

         | +|[](#all)

        | +|[](#exposed)

         | +|[](#fromcollection)

         | +|[](#get)

         | +|[](#getdatastore)

         | +|[](#getinfo)

         | +|[](#new)

         | +|[](#newselection)

         | +|[](#query)

         | + + + + +## .*attributeName* + +

    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +***.attributeName*** : DataClassAttribute + + +#### Description + +The attributes of dataclasses are objects that are available directly as properties of these classes. + +The returned objects are of the [`DataClassAttribute`](DataClassAttributeClass.md) class. These objects have properties that you can read to get information about your dataclass attributes. + +>Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +#### Example 1 + +```4d +$salary:=ds.Employee.salary //returns the salary attribute in the Employee dataclass +$compCity:=ds.Company["city"] //returns the city attribute in the Company dataclass +``` + + +#### Example 2 + +Considering the following database structure: + +![](assets/en/API/dataclassAttribute.png) + + +```4d +var $firstnameAtt;$employerAtt;$employeesAtt : Object + + $firstnameAtt:=ds.Employee.firstname + //{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true, + //keyWordIndexed:false,autoFilled:false,mandatory:false,unique:false} + + $employerAtt:=ds.Employee.employer + //{name:employer,kind:relatedEntity,relatedDataClass:Company, + //fieldType:38,type:Company,inverseName:employees} + //38=Is object + + $employeesAtt:=ds.Company.employees + //{name:employees,kind:relatedEntities,relatedDataClass:Employee, + //fieldType:42,type:EmployeeSelection,inverseName:employer} + //42=Is collection +``` + +#### Example 3 + +Considering the following table properties: + +![](assets/en/API/dataclassAttribute2.png) + + +```4d + var $sequenceNumberAtt : Object + $sequenceNumberAtt=ds.Employee.sequenceNumber + //{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13, + //indexed:true,keyWordIndexed:false,autoFilled:true,mandatory:false,unique:true} +``` + + + + + + +## .all() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Support of the *settings* parameter| +|v17|Added| +
    + + + +**.all** ( { *settings* : Object } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|settings|Object|->|Build option: context| +|Result|4D.EntitySelection|<-|References on all entities related to the Dataclass| + + + +#### Description + +The `.all( )` function queries the datastore to find all the entities related to the dataclass and returns them as an entity selection. + +The entities are returned in the default order, which is initially the order in which they were created. Note however that, if entities have been deleted and new ones added, the default order does not reflect the creation order anymore. + +If no corresponding entity is found, an empty entity selection is returned. + +Lazy loading is applied. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +|Property| Type| Description| +|---|---|---| +|context|Text|Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization).| + + +#### Example + +```4d + var $allEmp : cs.EmployeeSelection + $allEmp:=ds.Employee.all() +``` + + + + + +## .exposed + +
    History +|Version|Changes| +|---|---| +|v19 R3|Added| +
    + + + +**.exposed** : Boolean + + +#### Description + +The `.exposed` property is true if the dataclass is exposed in REST. + + + + + +## .fromCollection() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Support of the *settings* parameter| +|v17|Added| +
    + + +**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|objectCol |Collection|->|Collection of objects to be mapped with entities| +|settings |Object|->|Build option: context| +|Result|4D.EntitySelection|<-|Entity selection filled from the collection| + + + +#### Description + +The `.fromCollection()` function updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection. + +In the *objectCol* parameter, pass a collection of objects to create new or update existing entities of the dataclass. The property names must be the same as attribute names in the dataclass. If a property name does not exist in the dataclass, it is ignored. If an attribute value is not defined in the collection, its value is null. + +The mapping between the objects of the collection and the entities is done on the **attribute names** and **matching types**. If an object's property has the same name as an entity's attribute but their types do not match, the entity's attribute is not filled. + +**Create or update mode** + +For each object of *objectCol*: + +* If the object contains a boolean property "\_\_NEW" set to false (or does not contain a boolean "\_\_NEW" property), the entity is updated or created with the corresponding values of the properties from the object. No check is performed in regards to the primary key: + * If the primary key is given and exists, the entity is updated. In this case, the primary key can be given as is or with a "\_\_KEY" property (filled with the primary key value). + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary key is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +* If the object contains a boolean property "\_\_NEW" set to **true**, the entity is created with the corresponding values of the attributes from the object. A check is performed in regards to the primary key: + * If the primary key is given (as is) and exists, an error is sent + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary is not given, the entity is created and the primary key value is assigned with respect to standard database rules. + + >The "\_\_KEY" property containing a value is taken into account only when the "\_\_NEW" property is set to **false** (or is omitted) and a corresponding entity exists. In all other cases, the "\_\_KEY" property value is ignored, primary key value must be passed "as is". + +**Related entities** + +The objects of *objectCol* may contain one or more nested object(s) featuring one or more related entities, which can be useful to create or update links between entities. + +The nested objects featuring related entities must contain a "\_\_KEY" property (filled with the primary key value of the related entity) or the primary key attribute of the related entity itself. The use of a \_\_KEY property allows independence from the primary key attribute name. + +>The content of the related entities cannot be created / updated through this mechanism. + +**Stamp** + +If a \_\_STAMP attribute is given, a check is performed with the stamp in the datastore and an error can be returned ("Given stamp does not match current one for record# XX of table XXXX"). For more information, see [Entity locking](ORDA/entities.md#entity-locking). + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +|Property |Type| Description| +|---|---|---| +|context|Text|Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization).| + + +#### Example 1 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is given and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=668 //Existing PK in Employee table + $emp.firstName:="Arthur" + $emp.lastName:="Martin" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 2 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is with the \_\_KEY attribute and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.__KEY:=1720 //Existing PK in Employee table + $emp.firstName:="John" + $emp.lastName:="Boorman" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 3 + +We want to simply create a new entity from a collection: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Victor" + $emp.lastName:="Hugo" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 4 + +We want to create an entity. The \_\_NEW property is True, the employee primary key is not given: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Mary" + $emp.lastName:="Smith" + $emp.employer:=New object("__KEY";121) //Existing PK in the related dataClass Company + $emp.__NEW:=True + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) + + + + + + +``` + +#### Example 5 + +We want to create an entity. The \_\_NEW property is omitted, the employee primary key is given and does not exist: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10000 //Unexisting primary key + $emp.firstName:="Françoise" + $emp.lastName:="Sagan" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 6 + +In this example, the first entity will be created and saved but the second will fail since they both use the same primary key: + +```4d + var $empsCollection : Collection + var $emp; $emp2 : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10001 // Unexisting primary key + $emp.firstName:="Simone" + $emp.lastName:="Martin" + $emp.__NEW:=True + $empsCollection.push($emp) + + $emp2:=New object + $emp2.ID:=10001 // Same primary key, already existing + $emp2.firstName:="Marc" + $emp2.lastName:="Smith" + $emp2.__NEW:=True + $empsCollection.push($emp2) + $employees:=ds.Employee.fromCollection($empsCollection) + //first entity is created + //duplicated key error for the second entity +``` + +#### See also + +[**.toCollection()**](EntitySelectionClass.md#tocollection) + + + + + +## .get() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
    **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|primaryKey |Integer OR Text|->|Primary key value of the entity to retrieve| +|settings |Object|->|Build option: context| +|Result|4D.Entity|<-|Entity matching the designated primary key| + + +#### Description + +The `.get()` function queries the dataclass to retrieve the entity matching the *primaryKey* parameter. + +In *primaryKey*, pass the primary key value of the entity to retrieve. The value type must match the primary key type set in the datastore (Integer or Text). You can also make sure that the primary key value is always returned as Text by using the [`.getKey()`](EntityClass.md#getkey) function with the `dk key as string` parameter. + +If no entity is found with *primaryKey*, a **Null** entity is returned. + +Lazy loading is applied, which means that related data is loaded from disk only when it is required. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +|Property| Type| Description| +|---|---|---| +|context| Text| Label for the automatic optimization context applied to the entity. This context will be used by the subsequent code that loads the entity so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization).| + + + +#### Example 1 + +```4d + var $entity : cs.EmployeeEntity + var $entity2 : cs.InvoiceEntity + $entity:=ds.Employee.get(167) // return the entity whose primary key value is 167 + $entity2:=ds.Invoice.get("DGGX20030") // return the entity whose primary key value is "DGGX20030" +``` + +#### Example 2 + +This example illustrates the use of the *context* property: + +```4d + var $e1; $e2; $e3; $e4 : cs.EmployeeEntity + var $settings; $settings2 : Object + + $settings:=New object("context";"detail") + $settings2:=New object("context";"summary") + + $e1:=ds.Employee.get(1;$settings) + completeAllData($e1) // In completeAllData method, an optimization is triggered and associated to context "detail" + + $e2:=ds.Employee.get(2;$settings) + completeAllData($e2) // In completeAllData method, the optimization associated to context "detail" is applied + + $e3:=ds.Employee.get(3;$settings2) + completeSummary($e3) //In completeSummary method, an optimization is triggered and associated to context "summary" + + $e4:=ds.Employee.get(4;$settings2) + completeSummary($e4) //In completeSummary method, the optimization associated to context "summary" is applied +``` + + + + + + +## .getDataStore() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.getDataStore()** : cs.DataStore + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|cs.DataStore|<-|Datastore of the dataclass| + + + +#### Description + +The `.getDataStore( )` function returns the datastore for the specified dataclass. + +The datastore can be: + +* the main datastore, as returned by the `ds` command. +* a remote datastore, opened using the `Open datastore` command. + + +#### Example + +The ***SearchDuplicate*** project method searches for duplicated values in any dataclass. + +```4d + var $pet : cs.CatsEntity + $pet:=ds.Cats.all().first() //get an entity + SearchDuplicate($pet;"Dogs") +``` + +```4d + // SearchDuplicate method + // SearchDuplicate(entity_to_search;dataclass_name) + + #DECLARE ($pet : Object ; $dataClassName : Text) + var $dataStore; $duplicates : Object + + $dataStore:=$pet.getDataClass().getDataStore() + $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name) +``` + + + + + + +## .getInfo() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.getInfo()** : Object + + +|Parameter|Type||Description| +|---|---|---|---| +|Result|Object|<-|Information on the dataclass| + + + +#### Description + +The `.getInfo( )` function returns an object providing information about the dataclass. This function is useful for setting up generic code. + +**Returned object** + +|Property| Type| Description| +|---|---|---| +|name| Text |Name of the dataclass| +|primaryKey |Text| Name of the primary key of the dataclass| +|tableNumber|Integer| Internal 4D table number| + + + +#### Example 1 + +```4d + #DECLARE ($entity : Object) + var $status : Object + + computeEmployeeNumber($entity) //do some actions on entity + + $status:=$entity.save() + if($status.success) + ALERT("Record updated in table "+$entity.getDataClass().getInfo().name) + End if +``` + +#### Example 2 + +```4d + var $settings : Object + var $es : cs.ClientsSelection + + $settings:=New object + $settings.parameters:=New object("receivedIds";getIds()) + $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey) + $es:=ds.Clients.query(":pk in :receivedIds";$settings) +``` + +#### Example 3 + +```4d + var $pk : Text + var $dataClassAttribute : Object + + $pk:=ds.Employee.getInfo().primaryKey + $dataClassAttribute:=ds.Employee[$pk] // If needed the attribute matching the primary key is accessible +``` + + + + + + +## .new() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +**.new()** : 4D.Entity + + +|Parameter|Type||Description| +|---|---|---|---| +|Result|4D.Entity|<-|New entity matching the Dataclass| + + + +#### Description + +The `.new( )` function creates in memory and returns a new blank entity related to the Dataclass. + +The entity object is created in memory and is not saved in the database until the [`.save( )`](EntityClass.md#save) function is called. If the entity is deleted before being saved, it cannot be recovered. + +**4D Server**: In client-server, if the primary key of the corresponding table is auto-incremented, it will be calculated when the entity is saved on the server. + +All attributes of the entity are initialized with the **null** value. + +> Attributes can be initialized with default values if the **Map NULL values to blank values** option is selected at the 4D database structure level. + +#### Example + +This example creates a new entity in the "Log" Dataclass and records information in the "info" attribute: + +```4d + var $entity : cs.LogEntity + $entity:=ds.Log.new() //create a reference + $entity.info:="New entry" //store some information + $entity.save() //save the entity +``` + + + + + + + +## .newSelection() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---|---|---|---| +|keepOrder |Integer |-> |`dk keep ordered`: creates an ordered entity selection,
    `dk non ordered`: creates an unordered entity selection (default if omitted) | +|Result|4D.EntitySelection|<-|New blank entity selection related to the dataclass| + + + +#### Description + +The `.newSelection( )` function creates a new, blank, non-shareable entity selection, related to the dataclass, in memory. + +> For information on non-shareable entity selections, please refer to [this section](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + + +If you want to create an ordered entity selection, pass the `dk keep ordered` selector in the *keepOrder* parameter. By default if you omit this parameter, or if you pass the `dk non ordered` selector, the method creates an unordered entity selection. Unordered entity selections are faster but you cannot rely on entity positions. For more information, please see [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + +When created, the entity selection does not contain any entities (`mySelection.length` returns 0). This method lets you build entity selections gradually by making subsequent calls to the [`add()`](EntitySelectionClass.md#add) function. + + +#### Example + + +```4d + var $USelection; $OSelection : cs.EmployeeSelection + $USelection:=ds.Employee.newSelection() //create an unordered empty entity selection + $OSelection:=ds.Employee.newSelection(dk keep ordered) //create an ordered empty entity selection +``` + + + + + + + +## .query() + +
    History +|Version|Changes| +|---|---| +|v17 R6|Support of Formula parameters| +|v17 R5|Support of placeholders for values| +|v17|Added| +
    + + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---|---|---|---| +|queryString |Text |-> |Search criteria as string| +|formula |Object |-> |Search criteria as formula object| +|value|any|->|Value(s) to use for indexed placeholder(s)| +|querySettings|Object|->|Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan| +|Result|4D.EntitySelection|<-|New entity selection made up of entities from dataclass meeting the search criteria specified in *queryString* or *formula*| + + + +#### Description + +The `.query( )` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s), for all the entities in the dataclass, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. + +If no matching entities are found, an empty `EntitySelection` is returned. + +**queryString parameter** + +The *queryString* parameter uses the following syntax: + +```4d +attributePath|formula comparator value + {logicalOperator attributePath|formula comparator value} + {order by attributePath {desc | asc}} +``` + +where: + +* **attributePath**: path of attribute on which you want to execute the query. This parameter can be a simple name (for example "country") or any valid attribute path (for example "country.name".) In case of an attribute path whose type is `Collection`, \[ ] notation is used to handle all the occurences (for example "children\[ ].age"). You can also use a **placeholder** (see below). + + >*You cannot use directly attributes whose name contains special characters such as ".", "\[ ]", or "=", ">", "#"..., because they will be incorrectly evaluated in the query string. If you need to query on such attributes, you must consider using placeholders, which allow an extended range of characters in attribute paths (see* **Using placeholders** *below).* + +* **formula**: a valid formula passed as `Text` or `Object`. The formula will be evaluated for each processed entity and must return a boolean value. Within the formula, the entity is available through the `This` object. + + * **Text**: the formula string must be preceeded by the `eval( )` statement, so that the query parser evaluates the expression correctly. For example: *"eval(length(This.lastname) >=30)"* + * **Object**: the [formula object](FunctionClass.md) is passed as a **placeholder** (see below). The formula must have been created using the [`Formula`](FunctionClass.md#formula) or [`Formula from string`](FunctionClass.md#formula-from-string) command. + + >* Keep in mind that 4D formulas only support `&` and `|` symbols as logical operators. + >* If the formula is not the only search criteria, the query engine optimizer could prior process other criteria (e.g. indexed attributes) and thus, the formula could be evaluated for only a subset of entities. + + Formulas in queries can receive parameters through $1. This point is detailed in the **formula parameter** paragraph below. + + >* You can also pass directy a `formula` parameter object instead of the `queryString` parameter (recommended when formulas are more complex). See **formula parameter** paragraph below. + >* For security reasons, formula calls within `query()` methods can be disallowed. See `querySettings` parameter description. + +* **comparator**: symbol that compares *attributePath* and *value*. The following symbols are supported: + + |Comparison| Symbol(s)| Comment| + |---|---|---| + |Equal to |=, == |Gets matching data, supports the wildcard (@), neither case-sensitive nor diacritic.| + ||===, IS| Gets matching data, considers the @ as a standard character, neither case-sensitive nor diacritic| + |Not equal to| #, != |Supports the wildcard (@)| + ||!==, IS NOT| Considers the @ as a standard character| + |Less than| <| | + |Greater than| > || + |Less than or equal to| <=|| + |Greater than or equal to| >= || + |Included in| IN |Gets data equal to at least one of the values in a collection or in a set of values, supports the wildcard (@)| + |Not condition applied on a statement| NOT| Parenthesis are mandatory when NOT is used before a statement containing several operators| + |Contains keyword| %| Keywords can be used in attributes of string or picture type| + +* **value**: the value to compare to the current value of the property of each entity in the entity selection or element in the collection. It can be a **placeholder** (see **Using placeholders** below) or any expression matching the data type property.

    +When using a constant value, the following rules must be respected: + * **text** type constant can be passed with or without simple quotes (see **Using quotes** below). To query a string within a string (a "contains" query), use the wildcard symbol (@) in value to isolate the string to be searched for as shown in this example: "@Smith@". The following keywords are forbidden for text constants: true, false. + * **boolean** type constants: **true** or **false** (case sensitive). + * **numeric** type constants: decimals are separated by a '.' (period). +date type constants: "YYYY-MM-DD" format + * **null** constant: using the "null" keyword will find **null** and **undefined** properties. + * in case of a query with an IN comparator, value must be a collection, or values matching the type of the attribute path between \[ ] separated by commas (for strings, " characters must be escaped with "\"). +* **logicalOperator**: used to join multiple conditions in the query (optional). You can use one of the following logical operators (either the name or the symbol can be used): + + |Conjunction|Symbol(s)| + |---|---| + |AND|&, &&, and| + |OR | |,||, or| + +* **order by attributePath**: you can include an order by *attributePath* statement in the query so that the resulting data will be sorted according to that statement. You can use multiple order by statements, separated by commas (e.g., order by *attributePath1* desc, *attributePath2* asc). By default, the order is ascending. Pass 'desc' to define a descending order and 'asc' to define an ascending order. + >*If you use this statement, the returned entity selection is ordered (for more information, please refer to [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection)). + +**Using quotes** + +When you use quotes within queries, you must use single quotes ' ' inside the query and double quotes " " to enclose the whole query, otherwise an error is returned. For example: + +```4d +"employee.name = 'smith' AND employee.firstname = 'john'" +``` + +>Single quotes (') are not supported in searched values since they would break the query string. For example "comp.name = 'John's pizza' " will generate an error. If you need to search on values with single quotes, you may consider using placeholders (see below). + +**Using parenthesis** + +You can use parentheses in the query to give priority to the calculation. For example, you can organize a query as follows: + +```4d +"(employee.age >= 30 OR employee.age <= 65) AND (employee.salary <= 10000 OR employee.status = 'Manager')" +``` + + +**Using placeholders** + +4D allows you to use placeholders for *attributePath*, *formula* and *value* arguments within the *queryString* parameter. A placeholder is a parameter that you insert in query strings and that is replaced by another value when the query string is evaluated. The value of placeholders is evaluated once at the beginning of the query; it is not evaluated for each element. + +Two types of placeholders can be used: **indexed placeholders** and **named placeholders**: + +|- |Indexed placeholders| Named placeholders| +|---|---|---| +|Definition |Parameters are inserted as :paramIndex (for example :1, :2...) in queryString and their corresponding values are provided by the sequence of value parameter(s). You can use up to 128 value parameters| Parameters are inserted as :paramName (for example :myparam) and their values are provided in the attributes and/or parameters objects in the querySettings parameter| +|Example|$r:=class.query(":1=:2";"city";"Chicago")| $o.attributes:=New object("att";"city")
    $o.parameters:=New object("name";"Chicago")
    $r:=class.query(":att=:name";$o)| + +You can mix all argument kinds in *queryString*. A *queryString* can contain, for *attributePath*, *formula* and *value* parameters: + + +* direct values (no placeholders), +* indexed placeholders and/or named placeholders. + +**Using placeholders in queries is recommended** for the following reasons: + +1. It prevents malicious code insertion: if you directly use user-filled variables within the query string, a user could modifiy the query conditions by entering additional query arguments. For example, imagine a query string like: + + ```4d + $vquery:="status = 'public' & name = "+myname //user enters their name + $result:=$col.query($vquery) + ``` + + This query seems secured since non-public data are filtered. However, if the user enters in the *myname* area something like *"smith OR status='private'*, the query string would be modified at the interpretation step and could return private data. + + When using placeholders, overriding security conditions is not possible: + + ```4d + $result:=$col.query("status='public' & name=:1";myname) + ``` + + In this case if the user enters *smith OR status='private'* in the *myname* area, it will not be interpreted in the query string, but only passed as a value. Looking for a person named "smith OR status='private'" will just fail. + +2. It prevents having to worry about formatting or character issues, especially when handling *attributePath* or *value* parameters that might contain non-alphanumeric characters such as ".", "['... + +3. It allows the use of variables or expressions in query arguments. Examples: + + ```4d + $result:=$col.query("address.city = :1 & name =:2";$city;$myVar+"@") + $result2:=$col.query("company.name = :1";"John's Pizzas") + ``` + +**Looking for null values** + +When you look for null values, you cannot use the placeholder syntax because the query engine considers null as an unexpected comparison value. For example, if you execute the following query: + +```4d +$vSingles:=ds.Person.query("spouse = :1";Null) // will NOT work +``` + +You will not get the expected result because the null value will be evaluated by 4D as an error resulting from the parameter evaluation (for example, an attribute coming from another query). For these kinds of queries, you must use the direct query syntax: + +```4d + $vSingles:=ds.Person.query("spouse = null") //correct syntax +``` + + +**Linking collection attribute query arguments** + +When searching in collections within object attributes using multiple query arguments joined by the AND operator, you may want to make sure that only entities containing elements that match all arguments are returned, and not entities where arguments can be found in different elements. To do this, you need to link query arguments to collection elements, so that only single elements containing linked arguments are found. + +For example, with the following two entities: + +``` +Entity 1: +ds.People.name: "martin" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"paris" + } ] } + +Entity 2: +ds.People.name: "smith" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"lyon" + } , { + "kind":"office", + "city":"paris" + } ] } +``` + +You want to find people with a "home" location kind in the city "paris". If you write: + +```4d +ds.People.query("places.locations[].kind= :1 and places.locations[].city= :2";"home";"paris") +``` + +... the query will return "martin" **and** "smith" because "smith" has a "locations" element whose "kind" is "home" and a "locations" element whose "city" is "paris", even though they are different elements. + +If you want to only get entities where matching arguments are in the same collection element, you need to **link arguments**. To link query arguments: + +- Add a letter between the \[] in the first path to link and repeat the same letter in all linked arguments. For example: `locations[a].city and locations[a].kind`. You can use any letter of the Latin alphabet (not case sensitive). +- To add different linked criteria in the same query, use another letter. You can create up to 26 combinations of criteria in a single query. + +With the above entities, if you write: + +```4d +ds.People.query("places.locations[a].kind= :1 and places.locations[a].city= :2";"home";"paris") +``` + +... the query will only return "martin" because it has a "locations" element whose "kind" is "home" and whose "city" is "paris". The query will not return "smith" because the values "home" and "paris" are not in the same collection element. + + + +**formula parameter** + +As an alternative to formula insertion within the *queryString* parameter (see above), you can pass directly a formula object as a boolean search criteria. Using a formula object for queries is **recommended** since you benefit from tokenization, and code is easier to search/read. + +The formula must have been created using the `Formula` or `Formula from string` command. In this case: + +* the *formula* is evaluated for each entity and must return true or false. During the execution of the query, if the formula's result is not a boolean, it is considered as false. +* within the *formula*, the entity is available through the `This` object. +* if the `Formula` object is **null**, the errror 1626 ("Expecting a text or formula") is generated, that you call intercept using a method installed with `ON ERR CALL`. + + >For security reasons, formula calls within `query(`) member methods can be disallowed. See *querySettings* parameter description. + +**Passing parameters to formulas** + +Any *formula* called by the `query()` class function can receive parameters: + +* Parameters must be passed through the **args** property (object) of the *querySettings* parameter. +* The formula receives this **args** object as a **$1** parameter. + +This small code shows the principles of how parameter are passed to methods: + +```4d + $settings:=New object("args";New object("exclude";"-")) //args object to pass parameters + $es:=ds.Students.query("eval(checkName($1.exclude))";$settings) //args is received in $1 +``` + +Additional examples are provided in example 3. + +**4D Server**: In client/server, formulas are executed on the server. In this context, only the `querySettings.args` object is sent to the formulas. + + + +**querySettings parameter** + +In the *querySettings* parameter, you can pass an object containing additional options. The following properties are supported: + +|Property| Type| Description| +|---|---|---| +|parameters|Object|**Named placeholders for values** used in the *queryString* or *formula*. Values are expressed as property / value pairs, where property is the placeholder name inserted for a value in the *queryString* or *formula* (":placeholder") and value is the value to compare. You can mix indexed placeholders (values directly passed in value parameters) and named placeholder values in the same query.| +|attributes|Object|**Named placeholders for attribute paths** used in the *queryString* or *formula*. Attributes are expressed as property / value pairs, where property is the placeholder name inserted for an attribute path in the *queryString* or *formula* (":placeholder"), and value can be a string or a collection of strings. Each value is a path that can designate either a scalar or a related attribute of the dataclass or a property in an object field of the dataclass

    TypeDescription
    StringattributePath expressed using the dot notation, e.g. "name" or "user.address.zipCode"
    Collection of stringsEach string of the collection represents a level of attributePath, e.g. \["name"] or \["user","address","zipCode"]. Using a collection allows querying on attributes with names that are not compliant with dot notation, e.g. \["4Dv17.1","en/fr"]
    You can mix indexed placeholders (values directly passed in *value* parameters) and named placeholder values in the same query.| +|args|Object|Parameter(s) to pass to formulas, if any. The **args** object will be received in $1 within formulas and thus its values will be available through *$1.property* (see example 3).| +|allowFormulas| Boolean|True to allow the formula calls in the query (default). Pass false to disallow formula execution. If set to false and `query()` is given a formula, an error is sent (1278 - Formula not allowed in this member method).| +|context|Text|Label for the automatic optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is designed for client/server processing; for more information, please refer to the **Client/server optimization** section.| +|queryPlan| Boolean |In the resulting entity selection, returns or does not return the detailed description of the query just before it is executed, i.e. the planned query. The returned property is an object that includes each planned query and subquery (in the case of a complex query). This option is useful during the development phase of an application. It is usually used in conjunction with queryPath. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions.| +|queryPath|Boolean| In the resulting entity selection, returns or does not return the detailed description of the query as it is actually performed. The returned property is an object that contains the actual path used for the query (usually identical to that of the queryPlan, but may differ if the engine manages to optimize the query), as well as the processing time and the number of records found. This option is useful during the development phase of an application. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions.| + +**About queryPlan and queryPath** + +The information recorded in `queryPlan`/`queryPath` include 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(s). 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. + +For example, if you execute the following query: + +```4d + $sel:=ds.Employee.query("salary < :1 and employer.name = :2 or employer.revenues > :3";\ + 50000;"Lima West Kilo";10000000;New object("queryPath";True;"queryPlan";True)) +``` + +queryPlan: + +```4d +{Or:[{And:[{item:[index : Employee.salary ] < 50000}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.name ] = Lima West Kilo}]}]}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.revenues ] > 10000000}]}]} +``` + +queryPath: + +```4d +{steps:[{description:OR,time:63,recordsfounds:1388132, + steps:[{description:AND,time:32,recordsfounds:131, + steps:[{description:[index : Employee.salary ] < 50000,time:16,recordsfounds:728260},{description:Join on Table : Company : Employee.employerID = Company.ID,time:0,recordsfounds:131, + steps:[{steps:[{description:[index : Company.name ] = Lima West Kilo,time:0,recordsfounds:1}]}]}]},{description:Join on Table : Company : Employee.employerID = Company.ID,time:31,recordsfounds:1388132, + steps:[{steps:[{description:[index : Company.revenues ] > 10000000,time:0,recordsfounds:933}]}]}]}]} +``` + +#### Example 1 + +This section provides various examples of queries. + +Query on a string: + +```4d +$entitySelection:=ds.Customer.query("firstName = 'S@'") +``` + +Query with a NOT statement: + +```4d +$entitySelection:=ds.Employee.query("not(firstName=Kim)") +``` + +Queries with dates: + +```4d +$entitySelection:=ds.Employee.query("birthDate > :1";"1970-01-01") +$entitySelection:=ds.Employee.query("birthDate <= :1";Current date-10950) +``` + +Query with indexed placeholders for values: + +```4d +$entitySelection:=ds.Customer.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@") +``` + +Query with indexed placeholders for values on a related dataclass: + +```4d +$entitySelection:=ds.Employee.query("lastName = :1 and manager.lastName = :2";"M@";"S@") +``` + +Query with indexed placeholder including a descending order by statement: + +```4d +$entitySelection:=ds.Student.query("nationality = :1 order by campus.name desc, lastname";"French") +``` + +Query with named placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings:=New object +$querySettings.parameters:=New object("userId";1234;"extraInfo";New object("name";"Smith")) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name = :extraInfo.name";$querySettings) +``` + +Query that uses both named and indexed placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings.parameters:=New object("userId";1234) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name=:1";"Smith";$querySettings) +``` + +Query with queryPlan and queryPath objects: + +```4d +$entitySelection:=ds.Employee.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@";New object("queryPlan";True;"queryPath";True)) + + //you can then get these properties in the resulting entity selection +var $queryPlan; $queryPath : Object +$queryPlan:=$entitySelection.queryPlan +$queryPath:=$entitySelection.queryPath +``` + +Query with an attribute path of Collection type: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[].name = :1";"horsebackriding") +``` + +Query with an attribute path of Collection type and linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and extraInfo.hobbies[a].level=:2";"horsebackriding";2) +``` + +Query with an attribute path of Collection type and multiple linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and + extraInfo.hobbies[a].level = :2 and extraInfo.hobbies[b].name = :3 and + extraInfo.hobbies[b].level = :4";"horsebackriding";2;"Tennis";5) +``` + +Query with an attribute path of Object type: + +```4d +$entitySelection:=ds.Employee.query("extra.eyeColor = :1";"blue") +``` + +Query with an IN statement: + +```4d +$entitySelection:=ds.Employee.query("firstName in :1";New collection("Kim";"Dixie")) +``` + +Query with a NOT (IN) statement: + +```4d +$entitySelection:=ds.Employee.query("not (firstName in :1)";New collection("John";"Jane")) +``` + +Query with indexed placeholders for attributes: + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Employee.query(":1 = 1234 and :2 = 'Smith'";"salesperson.userId";"name") + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and named placeholders for values: + +```4d +var $es : cs.EmployeeSelection +var $querySettings : Object +$querySettings:=New object +$querySettings.parameters:=New object("customerName";"Smith") +$es:=ds.Customer.query(":1 = 1234 and :2 = :customerName";"salesperson.userId";"name";$querySettings) + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and values: + + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Clients.query(":1 = 1234 and :2 = :3";"salesperson.userId";"name";"Smith") + //salesperson is a related entity +``` + +#### Example 2 + +This section illustrates queries with named placeholders for attributes. + +Given an Employee dataclass with 2 entities: + +Entity 1: + +```4d +name: "Marie" +number: 46 +softwares:{ +"Word 10.2": "Installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Entity 2: + +```4d +name: "Sophie" +number: 47 +softwares:{ +"Word 10.2": "Not installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Query with named placeholders for attributes: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + $querySettings:=New object + $querySettings.attributes:=New object("attName";"name";"attWord";New collection("softwares";"Word 10.2")) + $es:=ds.Employee.query(":attName = 'Marie' and :attWord = 'Installed'";$querySettings) + //$es.length=1 (Employee Marie) +``` + +Query with named placeholders for attributes and values: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + var $name : Text + $querySettings:=New object + //Named placeholders for values + //The user is asked for a name + $name:=Request("Please enter the name to search:") + If(OK=1) + $querySettings.parameters:=New object("givenName";$name) + //Named placeholders for attribute paths + $querySettings.attributes:=New object("attName";"name") + $es:=ds.Employee.query(":attName= :givenName";$querySettings) + End if +``` + +#### Example 3 + +These examples illustrate the various ways to use formulas with or without parameters in your queries. + +The formula is given as text with `eval()` in the *queryString* parameter: + +```4d + var $es : cs.StudentsSelection + $es:=ds.Students.query("eval(length(This.lastname) >=30) and nationality='French'") +``` + +The formula is given as a `Formula` object through a placeholder: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query(":1 and nationality='French'";$formula) +``` + +Only a `Formula` object is given as criteria: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query($formula) +``` + +Several formulas can be applied: + +```4d + var $formula1; $1; $formula2 ;$0 : Object + $formula1:=$1 + $formula2:=Formula(Length(This.firstname)>=30) + $0:=ds.Students.query(":1 and :2 and nationality='French'";$formula1;$formula2) +``` + + +A text formula in *queryString* receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query("eval(checkName($1.filter)) and nationality=:1";"French";$settings) +``` + +```4d + //checkName method + #DECLARE($exclude : Text) -> $result : Boolean + $result:=(Position($exclude;This.lastname)=0) +``` + +Using the same ***checkName*** method, a `Formula` object as placeholder receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings; $formula : Object + $formula:=Formula(checkName($1.filter)) + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) + $settings.args.filter:="*" // change the parameters without updating the $formula object + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) +``` + +We want to disallow formulas, for example when the user enters their query: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + var $queryString : Text + $queryString:=Request("Enter your query:") + if(OK=1) + $settings:=New object("allowFormulas";False) + $es:=ds.Students.query($queryString;$settings) //An error is raised if $queryString contains a formula + End if +``` + +#### See also + +[`.query()`](EntitySelectionClass.md#query) for entity selections + + + diff --git a/docs/API/DataStoreClass.md b/docs/API/DataStoreClass.md new file mode 100644 index 00000000000000..395532bb574ce5 --- /dev/null +++ b/docs/API/DataStoreClass.md @@ -0,0 +1,877 @@ +--- +id: DataStoreClass +title: DataStore +--- + +A [Datastore](ORDA/dsMapping.md#datastore) is the interface object provided by ORDA to reference and access a database. `Datastore` objects are returned by the following commands: + +* [ds](#ds): a shortcut to the main datastore +* [Open datastore](#open-datastore): to open any remote datastore + +### Summary + +|| +|---| +|[](#canceltransaction)

        | +|[](#dataclassname)

         | +|[](#encryptionstatus)

         | +|[](#getinfo)

         | +|[](#getrequestlog)

         | +|[](#makeselectionsalterable)

         | +|[](#providedatakey)

         | +|[](#setadminprotection)

         | +|[](#startrequestlog)

         | +|[](#starttransaction)

         | +|[](#stoprequestlog)

         | +|[](#validatetransaction)

         | + + + + + +## ds + +

    History +|Version|Changes| +|---|---| +|v18|Support of localID parameter| +|v17|Added| +
    + + +**ds** { ( *localID* : Text ) } : cs.DataStore + + +|Parameter|Type||Description| +|---|---|---|---| +|localID|Text|->|Local ID of the remote datastore to return| +|Result |cs.DataStore|<-|Reference to the datastore| + + + +#### Description + +The `ds` command returns a reference to the datastore matching the current 4D database or the database designated by *localID*. + +If you omit the *localID* parameter (or pass an empty string ""), the command returns a reference to the datastore matching the local 4D database (or the 4D Server database in case of opening a remote database on 4D Server). The datastore is opened automatically and available directly through `ds`. + +You can also get a reference on an open remote datastore by passing its local id in the *localID* parameter. The datastore must have been previously opened with the [`Open datastore`](#open-datastore) command by the current database (host or component). The local id is defined when using this command. + +>The scope of the local id is the database where the datastore has been opened. + +If no *localID* datastore is found, the command returns **Null**. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +#### Example 1 + +Using the main datastore on the 4D database: + +```4d + $result:=ds.Employee.query("firstName = :1";"S@") +``` + +#### Example 2 + +```4d + var $connectTo; $firstFrench; $firstForeign : Object + + var $frenchStudents; $foreignStudents : cs.DataStore + + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + //... + //... + $firstFrench:=getFirst("french";"Students") + $firstForeign:=getFirst("foreign";"Students") +``` + +```4d + //getFirst method + //getFirst(localID;dataclass) -> entity + #DECLARE( $localId : Text; $dataClassName : Text ) -> $entity : 4D.Entity + + $0:=ds($localId)[$dataClassName].all().first() +``` + + + + +## Open datastore + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**Open datastore**( *connectionInfo* : Object ; *localID* : Text ) : cs.DataStore + + +|Parameter|Type||Description| +|---|---|---|---| +|connectionInfo|Object|->|Connection properties used to reach the remote datastore| +|localID |Text|->|Id to assign to the opened datastore on the local application (mandatory)| +|Result |cs.DataStore|<-|Datastore object| + + + +#### Description + +The `Open datastore` command connects the application to the 4D database identified by the *connectionInfo* parameter and returns a matching `cs.DataStore` object associated with the *localID* local alias. + +The *connectionInfo* 4D database must be available as a remote datastore, i.e.: + +* its web server must be launched with http and/or https enabled, +* its [**Expose as REST server**](REST/configuration.md#starting-the-rest-server) option must be checked, +* at least one client license is available. + +If no matching database is found, `Open datastore` returns **Null**. + +*localID* is a local alias for the session opened on remote datastore. If *localID* already exists on the application, it is used. Otherwise, a new *localID* session is created when the datastore object is used. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +Once the session is opened, the following statements become equivalent and return a reference on the same datastore object: + +```4d + $myds:=Open datastore(connectionInfo;"myLocalId") + $myds2:=ds("myLocalId") + //$myds and $myds2 are equivalent +``` + +Pass in *connectionInfo* an object describing the remote datastore you want to connect to. It can contain the following properties (all properties are optional except *hostname*): + +|Property| Type| Description| +|---|---|---| +|hostname|Text|Name or IP address of the remote database + ":" + port number (port number is mandatory)| +|user|Text|User name +|password|Text|User password +|idleTimeout|Longint|Inactivity session timeout (in minutes), after which the session is automatically closed by 4D. If omitted, default value is 60 (1h). The value cannot be < 60 (if a lower value is passed, the timeout is set to 60). For more information, see **Closing sessions**.| +|tls|Boolean|Use secured connection(*). If omitted, false by default. Using a secured connection is recommended whenever possible.| +|type |Text |Must be "4D Server"| + +(*) If tls is true, the HTTPS protocol is used if: + +* HTTPS is enabled on the remote datastore +* the given port is the right HTTPS port configured in the database settings +* a valid certificate and private encryption key are installed in the database. Otherwise, error "1610 - A remote request to host xxx has failed" is raised + +#### Example 1 + +Connection to a remote datastore without user / password: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 2 + +Connection to a remote datastore with user / password / timeout / tls: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";\"192.168.18.11:4443";\ + "user";"marie";"password";$pwd;"idleTimeout";70;"tls";True) + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 3 + +Working with several remote datastores: + +```4d + var $connectTo : Object + var $frenchStudents; $foreignStudents : cs.DataStore + $connectTo:=New object("hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + ALERT("They are "+String($frenchStudents.Students.all().length)+" French students") + ALERT("They are "+String($foreignStudents.Students.all().length)+" foreign students") +``` + +#### Error management + +In case of error, the command returns **Null**. If the remote datastore cannot be reached (wrong address, web server not started, http and https not enabled...), error 1610 "A remote request to host XXX has failed" is raised. You can intercept this error with a method installed by `ON ERR CALL`. + + + + +## *.dataclassName* + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +***.dataclassName*** : 4D.DataClass + + +#### Description + +Each dataclass in a datastore is available as a property of the [DataStore object](ORDA/dsMapping.md#datastore)data. The returned object contains a description of the dataclass. + + +#### Example + +```4d + var $emp : cs.Employee + var $sel : cs.EmployeeSelection + $emp:=ds.Employee //$emp contains the Employee dataclass + $sel:=$emp.all() //gets an entity selection of all employees + + //you could also write directly: + $sel:=ds.Employee.all() +``` + + + + + + + + +## .cancelTransaction() + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + + +**.cancelTransaction()** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + + +#### Description + +The `.cancelTransaction()` function cancels the transaction opened by the [`.startTransaction()`](#starttransaction) function at the corresponding level in the current process for the specified datastore. + +The `.cancelTransaction()` function cancels any changes made to the data during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using the [`.validateTransaction()`](#validatetransactions) function. + + +#### Example + +See example for the [`.startTransaction()`](#starttransaction) function. + + + + + + + +## .encryptionStatus() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.encryptionStatus()**: Object + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Information about the encryption of the current datastore and of each table| + + + +#### Description + +The `.encryptionStatus()` function returns an object providing the encryption status for the current data file (i.e., the data file of the `ds` datastore). The status for each table is also provided. + +>Use the `Data file encryption status` command to determine the encryption status of any other data file. + + +**Returned value** + +The returned object contains the following properties: + +|Property | | |Type |Description| +|---|---|---|---|---| +|isEncrypted|||Boolean|True if the data file is encrypted| +|keyProvided|||Boolean|True if the encryption key matching the encrypted data file is provided(*).| +|tables| ||Object| Object containing as many properties as there are encryptable or encrypted tables.| +||*tableName*|| Object| Encryptable or Encrypted table| +|||name |Text| Name of the table| +|||num| Number |Table number| +|||isEncryptable|Boolean|True if the table is declared encryptable in the structure file| +|||isEncrypted| Boolean| True if the records of the table are encrypted in the data file| + +(*) The encryption key can be provided: + +* with the `.provideDataKey()` command, +* at the root of a connected device before opening the datastore, +* with the `Discover data key` command. + +#### Example + +You want to know the number of encrypted tables in the current data file: + +```4d + var $status : Object + + $status:=dataStore.encryptionStatus() + + If($status.isEncrypted) //the database is encrypted + C_LONGINT($vcount) + C_TEXT($tabName) + For each($tabName;$status.tables) + If($status.tables[$tabName].isEncrypted) + $vcount:=$vcount+1 + End if + End for each + ALERT(String($vcount)+" encrypted table(s) in this datastore.") + Else + ALERT("This database is not encrypted.") + End if +``` + + + + + + +## .getInfo() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.getInfo()**: Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Datastore properties| + + +#### Description + +The `.getInfo()` function returns an object providing information about the datastore. This function is useful for setting up generic code. + +**Returned object** + +|Property |Type |Description| +|---|---|---| +|type| string |
  • "4D": main datastore, available through ds
  • "4D Server": remote datastore, open with Open datastore
  • | +|networked |boolean|
  • True: the datastore is reached through a network connection.
  • False: the datastore is not reached through a network connection (local database)
  • | +|localID| text| ID of the datastore on the machine. Corresponds to the localId string given with the `Open datastore` command. Empty string ("") for main datastore.| +|connection |object|Object describing the remote datastore connection (not returned for main datastore). Available properties:

    PropertyTypeDescription
    hostnametextIP address or name of the remote datastore + ":" + port number
    tlsbooleanTrue if secured connection is used with the remote datastore
    idleTimeoutnumberSession inactivity timeout (in minutes)
    usertextUser authenticated on the remote datastore
    | + +* If the `.getInfo()` function is executed on a 4D Server or 4D single-user, `networked` is False. +* If the `.getInfo()` function is executed on a remote 4D, `networked` is True + + +#### Example 1 + +```4d + var $info : Object + + $info:=ds.getInfo() //Executed on 4D Server or 4D + //{"type":"4D","networked":false,"localID":""} + + $info:=ds.getInfo() // Executed on 4D remote + //{"type":"4D","networked":true,"localID":""} +``` + +#### Example 2 + +On a remote datastore: + +```4d + var $remoteDS : cs.DataStore + var $info; $connectTo : Object + + $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa") + $remoteDS:=Open datastore($connectTo;"students") + $info:=$remoteDS.getInfo() + + //{"type":"4D Server", + //"localID":"students", + //"networked":true, + //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}} +``` + + + + + + + +## .getRequestLog() + +

    History +|Version|Changes| +|---|---| +|v17 R6|Added| +
    + + +**.getRequestLog()** : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Collection|<-|Collection of objects, where each object describes a request| + + + +#### Description + +The `.getRequestLog()` function returns the ORDA requests logged in memory on the client side. The ORDA request logging must have previously been enabled using the [`.startRequestLog()`](#startrequestlog) function. + +This function must be called on a remote 4D, otherwise it returns an empty collection. It is designed for debugging purposes in client/server configurations. + +**Returned value** + +Collection of stacked request objects. The most recent request has index 0. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + + +#### Example + +See Example 2 of [`.startRequestLog()`](#startrequestlog). + + + + + +## .isAdminProtected() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.isAdminProtected()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if the Data Explorer access is disabled, False if it is enabled (default)| + + + +#### Description + +The `.isAdminProtected()` function returns `True` if [Data Explorer](Admin/dataExplorer.md) access has been disabled for the working session. + +By default, the Data Explorer access is granted for `webAdmin` sessions, but it can be disabled to prevent any data access from administrators (see the [`.setAdminProtection()`](#setadminprotection) function). + +#### See also + +[`.setAdminProtection()`](#setadminprotection) + + + + + + + +## .makeSelectionsAlterable() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.makeSelectionsAlterable()** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + + +#### Description + +The `.makeSelectionsAlterable()` function sets all entity selections as alterable by default in the current application datastores (including [remote datastores](ORDA/remoteDatastores.md)). It is intended to be used once, for example in the `On Startup` database method. + +When this function is not called, new entity selections can be shareable, depending on the nature of their "parent", or [how they are created](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + +> This function does not modify entity selections created by [`.copy()`](#copy) or `OB Copy` when the explicit `ck shared` option is used. + + +> **Compatibility**: This function must only be used in projects converted from 4D versions prior to 4D v18 R5 and containing [.add()](EntitySelectionClass.md#add) calls. In this context, using `.makeSelectionsAlterable()` can save time by restoring instantaneously the previous 4D behavior in existing projects. +On the other hand, using this method in new projects created in 4D v18 R5 and higher **is not recommended**, since it prevents entity selections to be shared, which provides greater performance and scalabitlity. + + + + + + +## .provideDataKey() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.provideDataKey**( *curPassPhrase* : Text ) : Object
    **.provideDataKey**( *curDataKey* : Object ) : Object + + + +|Parameter|Type||Description| +|---|---|---|---| +|curPassPhrase |Text|->|Current encryption passphrase| +|curDataKey |Object|->|Current data encryption key| +|Result|Object|<-|Result of the encryption key matching| + + + +#### Description + +The `.provideDataKey()` function allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data. This function can be used when opening an encrypted database, or when executing any encryption operation that requires the encryption key, such as re-encrypting the data file. + +>* The `.provideDataKey()` function must be called in an encrypted database. If it is called in a non-encrypted database, the error 2003 (the encryption key does not match the data.) is returned. Use the `Data file encryption status` command to determine if the database is encrypted. +>* The `.provideDataKey()` function cannot be called from a remote 4D or an encrypted remote datastore. + +If you use the *curPassPhrase* parameter, pass the string used to generate the data encryption key. When you use this parameter, an encryption key is generated. + +If you use the *curDataKey* parameter, pass an object (with *encodedKey* property) that contains the data encryption key. This key may have been generated with the `New data key` command. + +If a valid data encryption key is provided, it is added to the *keyChain* in memory and the encryption mode is enabled: + +* all data modifications in encryptable tables are encrypted on disk (.4DD, .journal. 4Dindx files) +* all data loaded from encryptable tables is decrypted in memory + + +**Result** + +The result of the command is described in the returned object: + +|Property| |Type| Description| +|---|---|---|---| +|success| | Boolean| True if the provided encryption key matches the encrypted data, False otherwise| +||||Properties below are returned only if success is *FALSE*| +|status | |Number| Error code (4 if the provided encryption key is wrong)| +|statusText| | Text| Error message| +|errors | |Collection| Stack of errors. The first error has the highest index| +||\[ ].componentSignature| Text| Internal component name| +||\[ ].errCode |Number |Error number| +||\[ ].message |Text| Error message| + +If no *curPassphrase* or *curDataKey* is given, `.provideDataKey()` returns **null** (no error is generated). + + + +#### Example + +```4d + var $keyStatus : Object + var $passphrase : Text + + $passphrase:=Request("Enter the passphrase") + If(OK=1) + $keyStatus:=ds.provideDataKey($passphrase) + If($keyStatus.success) + ALERT("You have provided a valid encryption key") + Else + ALERT("You have provided an invalid encryption key, you will not be able to work with encrypted data") + End if + End if +``` + + + + + + +## .setAdminProtection() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + +**.setAdminProtection**( *status* : Boolean ) + + + +|Parameter|Type||Description| +|---|---|---|---| +|status|Boolean|->|True to disable Data Explorer access to data on the `webAdmin` port, False (default) to grant access| + + + +#### Description + +The `.setAdminProtection()` function allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions. + +By default when the function is not called, access to data is always granted on the web administration port for a session with `WebAdmin` privilege using the Data Explorer. In some configurations, for example when the application server is hosted on a third-party machine, you might not want the administrator to be able to view your data, although they can edit the server configuration, including the [access key](Admin/webAdmin.md#access-key) settings. + +In this case, you can call this function to disable the data access from Data Explorer on the web admin port of the machine, even if the user session has the `WebAdmin` privilege. When this function is executed, the data file is immediately protected and the status is stored on disk: the data file will be protected even if the application is restarted. + + +#### Example + +You create a *protectDataFile* project method to call before deployments for example: + +```4d + ds.setAdminProtection(True) //Disables the Data Explorer data access +``` + +#### See also + +[`.isAdminProtected()`](#isadminprotected) + + + + + +## .startRequestLog() + +
    History +|Version|Changes| +|---|---| +|v17 R6|Added| +
    + + +**.startRequestLog**()
    **.startRequestLog**( *file* : 4D.File )
    **.startRequestLog**( *reqNum* : Integer ) + + + +|Parameter|Type||Description| +|---|---|---|---| +|file |4D.File|->|File object| +|reqNum |Integer|->|Number of requests to keep in memory| + + + +#### Description + +The `.startRequestLog()` function starts the logging of ORDA requests on the client side. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + +The ORDA request log can be sent to a file or to memory, depending on the parameter type: + +* If you passed a *file* object created with the `File` command, the log data is written in this file as a collection of objects (JSON format). Each object represents a request.
    If the file does not already exist, it is created. Otherwise if the file already exists, the new log data is appended to it. +If `.startRequestLog( )` is called with a file while a logging was previously started in memory, the memory log is stopped and emptied. + >A \] character must be manually appended at the end of the file to perform a JSON validation + +* If you passed a *reqNum* integer, the log in memory is emptied (if any) and a new log is initialized. It will keep *reqNum* requests in memory until the number is reached, in which case the oldest entries are emptied (FIFO stack).
    If `.startRequestLog()` is called with a *reqNum* while a logging was previously started in a file, the file logging is stopped. + +* If you did not pass any parameter, the log is started in memory. If `.startRequestLog()` was previously called with a *reqNum* (before a `.stopRequestLog()`), the log data is stacked in memory until the next time the log is emptied or `.stopRequestLog()` is called. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + +#### Example 1 + +You want to log ORDA client requests in a file and use the log sequence number: + +```4d + var $file : 4D.File + var $e : cs.PersonsEntity + + $file:=File("/LOGS/ORDARequests.txt") //logs folder + + SET DATABASE PARAMETER(Client Log Recording;1) //to trigger the global log sequence number + ds.startRequestLog($file) + $e:=ds.Persons.get(30001) //send a request + ds.stopRequestLog() + SET DATABASE PARAMETER(Client Log Recording;0) +``` + +#### Example 2 + +You want to log ORDA client requests in memory: + +```4d + var $es : cs.PersonsSelection + var $log : Collection + + ds.startRequestLog(3) //keep 3 requests in memory + + $es:=ds.Persons.query("name=:1";"Marie") + $es:=ds.Persons.query("name IN :1";New collection("Marie")) + $es:=ds.Persons.query("name=:1";"So@") + + $log:=ds.getRequestLog() + ALERT("The longest request lasted: "+String($log.max("duration"))+" ms") +``` + + + + + + + +## .startTransaction() + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**.startTransaction()** + + +|Parameter|Type||Description| +|---|---|---|---| +||||Does not require any parameters| + + + +#### Description + +The `.startTransaction()` function starts a transaction in the current process on the database matching the datastore to which it applies. Any changes made to the datastore's entities in the transaction's process are temporarily stored until the transaction is either validated or cancelled. + +>If this method is called on the main datastore (i.e. the datastore returned by the `ds` command), the transaction is applied to all operations performed on the main datastore and on the underlying database, thus including ORDA and classic languages. + +You can nest several transactions (sub-transactions). Each transaction or sub-transaction must eventually be cancelled or validated. Note that if the main transaction is cancelled, all of its sub-transactions are also cancelled even if they were validated individually using the `.validateTransaction()` function. + + +#### Example + + +```4d + var $connect; $status : Object + var $person : cs.PersonsEntity + var $ds : cs.DataStore + var $choice : Text + var $error : Boolean + + Case of + :($choice="local") + $ds:=ds + :($choice="remote") + $connect:=New object("hostname";"111.222.3.4:8044") + $ds:=Open datastore($connect;"myRemoteDS") + End case + + $ds.startTransaction() + $person:=$ds.Persons.query("lastname=:1";"Peters").first() + + If($person#Null) + $person.lastname:="Smith" + $status:=$person.save() + End if + ... + ... + If($error) + $ds.cancelTransaction() + Else + $ds.validateTransaction() + End if +``` + + + + + + + + + +## .stopRequestLog() + +
    History +|Version|Changes| +|---|---| +|v17 R6|Added| +
    + + +**.stopRequestLog()** + + +|Parameter|Type||Description| +|---|---|---|---| +||||Does not require any parameters| + + + +#### Description + +The `.stopRequestLog()` function stops any logging of ORDA requests on the client side (in file or in memory). It is particularly useful when logging in a file, since it actually closes the opened document on disk. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + + +#### Example + +See examples for [`.startRequestLog()`](#startrequestlog). + + + + + + + +## .validateTransaction() + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**.validateTransaction()** + + +|Parameter|Type||Description| +|---|---|---|---| +||||Does not require any parameters| + + + +#### Description + +The `.validateTransaction()` function accepts the transaction that was started with [`.startTransaction()`](#starttransaction) at the corresponding level on the specified datastore. + +The function saves the changes to the data on the datastore that occurred during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using this function. + + +#### Example + +See example for [`.startTransaction()`](#starttransaction). + + + + diff --git a/docs/API/Directory.md b/docs/API/Directory.md new file mode 100644 index 00000000000000..ec153062535780 --- /dev/null +++ b/docs/API/Directory.md @@ -0,0 +1,705 @@ +--- +id: Directory +title: Directory Class +--- + +## Description + + + +## .creationDate + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.creationDate** : Date + + +#### Description + +The `.creationDate` property returns the creation date of the folder. + +This property is **read-only**. + + + +--- + + +## .creationTime + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.creationTime** : Time + + + +#### Description + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + +--- + + + +## .exists + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.exists** : Boolean + + +#### Description + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +This property is **read-only**. + + + + +--- + + + +## .extension + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.extension** : Text + + +#### Description + +The `.extension` property returns the extension of the folder name (if any). An extension always starts with ".". The property returns an empty string if the folder name does not have an extension. + +This property is **read-only**. + + + + +--- + + +## .fullName + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.fullName** : Text + + +#### Description + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +This property is **read-only**. + + + + +--- + + +## .hidden + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.hidden** : Boolean + + +#### Description + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + +--- + + + +## .isAlias + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isAlias** : Boolean + + + +#### Description + +The `.isAlias` property returns always **false** for a `Folder` object. + +This property is **read-only**. + + + +--- + + +## .isFile + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isFile** : Boolean + + +#### Description + +The `.isFile` property returns always **false** for a folder. + +This property is **read-only**. + + + +--- + + +## .isFolder + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isFolder** : Boolean + + +#### Description + +The `.isFolder` property returns always **true** for a folder. + +This property is **read-only**. + + + +--- + + +## .isPackage + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isPackage** : Boolean + + +#### Description + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Otherwise, it returns false. + +On Windows, `.isPackage` always returns **false**. + +This property is **read-only**. + + + + +--- + + +## .modificationDate + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.modificationDate** : Date + + +#### Description + +The `.modificationDate` property returns the date of the folder's last modification. + +This property is **read-only**. + + + + +--- + + +## .modificationTime + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.modificationTime** : Time + + +#### Description + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + +--- + + +## .name + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + + +**.name** : Text + + +#### Description + +The `.name` property returns the name of the folder, without extension (if any). + +This property is **read-only**. + + + +--- + + +## .original + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.original** : 4D.Folder + + +#### Description + +The `.original` property returns the same Folder object as the folder. + +This property is **read-only**. + +>This property is available on folders to allow generic code to process folders or files. + + + +--- + + + +## .parent + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.parent** : 4D.Folder + + +#### Description + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +This property is **read-only**. + + + + +--- + + +## .path + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.path** : Text + + +#### Description + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + +--- + + +## .platformPath + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.platformPath** : Text + + +#### Description + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +This property is **read-only**. + + + + +--- + + + + + + +## .copyTo() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|destinationFolder |4D.Folder |->|Destination folder| +|newName|Text|->|Name for the copy| +|overwrite|Integer|->|`fk overwrite` to replace existing elements| +|Result|4D.Folder|<-|Copied file or folder| + + + +#### Description + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +|Constant|Value|Comment| +|---|---|---| +|`fk overwrite`|4|Overwrite existing elements, if any| + + +**Returned value** + +The copied `Folder` object. + +#### Example + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + + +--- + + + +## .file() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.file**( *path* : Text ) : 4D.File + + +|Parameter|Type||Description| +|---|----|---|---| +|path|Text|->|Relative POSIX file pathname| +|Result|4D.File|<-|`File` object (null if invalid path)| + + +#### Description + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `File` object or null if *path* is invalid. + +#### Example + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + + +--- + + +## .files() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.files**( { *options* : Integer } ) : Collection + + +|Parameter|Type||Description| +|---|----|---|---| +|options|Integer|->|File list options| +|Result|Collection|<-|Collection of children file objects| + + +#### Description + +The `.files()` function returns a collection of `File` objects contained in the folder. + +>Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +|Constant| Value| Comment| +|---|---|---| +|`fk recursive`|1|The collection contains files or folders of the specified folder and its subfolders| +|`fk ignore invisible`| 8|Invisible files or folders are not listed| + +**Returned value** + +Collection of `File` objects. + +#### Example 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Example 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + + +--- + + +## .folder() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.folder**( *path* : Text ) : 4D.Folder + + +|Parameter|Type||Description| +|---|----|---|---| +|path|Text|->|Relative POSIX file pathname| +|Result|4D.Folder|<-|Created folder object (null if invalid *path*)| + + +#### Description + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `Folder` object or null if *path* is invalid. + +#### Example + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + + +--- + + +## .folders() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.folders**( { *options* : Integer } ) : Collection + + +|Parameter|Type||Description| +|---|----|---|---| +|options|Integer|->|Folder list options| +|Result|Collection|<-|Collection of children folder objects| + + +#### Description + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +|Constant| Value| Comment| +|---|---|---| +|`fk recursive`| 1|The collection contains files or folders of the specified folder and its subfolders| +|`fk ignore invisible`| 8|Invisible files or folders are not listed| + +**Returned value** + +Collection of `Folder` objects. + +#### Example + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + + +--- + + +## .getIcon() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.getIcon**( { *size* : Integer } ) : Picture + + +|Parameter|Type||Description| +|---|----|---|---| +|size|Integer|->|Side length for the returned picture (pixels)| +|Result|Picture|<-|Icon| + + + +#### Description + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Returned value** + +Folder icon [picture](Concepts/dt_picture.md). + + + + + diff --git a/docs/API/Document.md b/docs/API/Document.md new file mode 100644 index 00000000000000..26caf6ac82bbd0 --- /dev/null +++ b/docs/API/Document.md @@ -0,0 +1,676 @@ +--- +id: Document +title: Document Class +--- + +## Description + + + +## .creationDate + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.creationDate** : Date + + +#### Description + +The `.creationDate` property returns the creation date of the file. + +This property is **read-only**. + + + + + +## .creationTime + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.creationTime** : Time + + +#### Description + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + + +## .exists + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.exists** : Boolean + + +#### Description + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +This property is **read-only**. + + + + + + + + + +## .extension + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.extension** : Text + +#### Description + +The `.extension` property returns the extension of the file name (if any). An extension always starts with ".". The property returns an empty string if the file name does not have an extension. + +This property is **read-only**. + + + + + + + + +## .fullName + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.fullName** : Text + +#### Description + +The `.fullName` property returns the full name of the file, including its extension (if any). + +This property is **read-only**. + + + + + + + +## .hidden + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.hidden** : Boolean + + +#### Description + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + + + +## .isAlias + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isAlias** : Boolean + + +#### Description + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +This property is **read-only**. + + + + + + +## .isFile + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isFile** : Boolean + + +#### Description + +The `.isFile` property returns always true for a file. + +This property is **read-only**. + + + + + + +## .isFolder + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isFolder** : Boolean + + +#### Description + +The `.isFolder` property returns always false for a file. + +This property is **read-only**. + + + + + + + +## .isWritable + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.isWritable** : Boolean + + +#### Description + +The `.isWritable` property returns true if the file exists on disk and is writable. + +>The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +This property is **read-only**. + +**Example** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + + + +## .modificationDate + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.modificationDate** : Date + + +#### Description + +The `.modificationDate` property returns the date of the file's last modification. + +This property is **read-only**. + + + + + + + +## .modificationTime + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.modificationTime** : Time + + +##### Description + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + +## .name + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.name** : Text + + +#### Description + +The `.name` property returns the name of the file without extension (if any). + +This property is **read-only**. + + + + + +## .original + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.original** : 4D.File
    **.original** : 4D.Folder + + +#### Description + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +This property is **read-only**. + + + + + + + +## .parent + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.parent** : 4D.Folder + + +#### Description + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +This property is **read-only**. + + + + + + + +## .path + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.path** : Text + + +#### Description + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + + + +## .platformPath + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.platformPath** : Text + + +#### Description + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +This property is **read-only**. + + + + + + + +## .size + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.size** : Real + + +#### Description + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +This property is **read-only**. + + + + + + + + + + + + + +## .copyTo() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|destinationFolder | 4D.Folder |->|Destination folder| +|newName|Text|->|Name for the copy| +|overwrite|Integer|->|`fk overwrite` to replace existing elements| +|Result|4D.File|<-|Copied file| + + + +#### Description + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +|Constant|Value|Comment| +|---|---|---| +|`fk overwrite`|4|Overwrite existing elements, if any| + + +**Returned value** + +The copied `File` object. + +#### Example + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + + + +## .getContent() + +
    History +|Version|Changes| +|---|---| +|v19 R2|Returns 4D.Blob +|v17 R5|Added +
    + + +**.getContent( )** : 4D.Blob + + +|Parameter|Type||Description| +|---|----|---|---| +|Result | 4D.Blob |<-|File content| + + + +#### Description + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Returned value** + +A `4D.Blob` object. + +#### Example + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + + + +## .getIcon() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.getIcon**( { *size* : Integer } ) : Picture + + +|Parameter|Type||Description| +|---|----|---|---| +|size|Integer|->|Side length for the returned picture (pixels)| +|Result|Picture|<-|Icon| + + + +#### Description + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Returned value** + +File icon [picture](../Concepts/picture.html). + + + + + + + + +## .getText() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
    **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + + + +|Parameter|Type||Description| +|---|---|---|---| +|charSetName |Text |-> |Name of character set| +|charSetNum |Integer |-> |Number of character set| +|breakMode|Integer |-> |Processing mode for line breaks| +|Result |Text |<- |Text from the document| + + + +#### Description +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). +If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +|Constant | Value| Comment| +|---|---|---| +|`Document unchanged`|0|No processing| +|`Document with native format`|1|(Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows| +|`Document with CRLF`|2|Line breaks are converted to Windows format: CRLF (carriage return + line feed)| +|`Document with CR`|3|Line breaks are converted to OS X format: CR (carriage return)| +|`Document with LF`|4|Line breaks are converted to Unix format: LF (line feed)| + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Returned value** + +Text of the file. + +#### Example + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + + diff --git a/docs/API/EmailObjectClass.md b/docs/API/EmailObjectClass.md new file mode 100644 index 00000000000000..d8de339c65a4b2 --- /dev/null +++ b/docs/API/EmailObjectClass.md @@ -0,0 +1,665 @@ +--- +id: EmailObjectClass +title: Email +--- + +Creating, sending or receiving emails in 4D is done by handling an `Email` object. + +`Email` objects are created when receiving mails through a *transporter* class function: + +- IMAP - [`.getMail()`](IMAPTransporterClass.md#getmail) and [`.getMails()`](IMAPTransporterClass.md#getmails) functions to get emails from an IMAP server +- POP3 - [`.getMail()`](POP3TransporterClass.md#getmail) function to get an email from a POP3 server. + +> You can also create a new, blank `Email` object by calling the [`New object`](https://doc.4d.com/4dv18/help/command/en/page1471.html) 4D command, and then fill it with [Email object properties](#email-object). + +You send `Email` objects using the SMTP [`.send()`](SMTPTransporterClass.md#send) function. + +[`MAIL Convert from MIME`](#mail-convert-from-mime) and [`MAIL Convert to MIME`](#mail-convert-to-mime) commands can be used to convert `Email` objects to and from MIME contents. + + +### Email Object + +Email objects provide the following properties: + +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the Email object. + +|| +|---| +|[](#attachments)

        | +|[](#bcc)

        | +|[](#bodystructure)

        | +|[](#bodyvalues)

        | +|[](#cc)

        | +|[](#comments)

        | +|[](#from)

        | +|[](#headers)

        | +|[](#htmlbody)

        | +|[](#id)

        | +|[](#inreplyto)

        | +|[](#keywords)

        | +|[](#messageid)

        | +|[](#receivedat)

        | +|[](#references)

        | +|[](#replyto)

        | +|[](#sendat)

        | +|[](#sender)

        | +|[](#size)

        | +|[](#subject)

        | +|[](#textbody)

        | +|[](#to)

        | + + +### Email Addresses + +All properties that contain email addresses ([`from`](#from), [`cc`](#cc), [`bcc`](#bcc), [`to`](#to), [`sender`](#sender), [`replyTo`](#replyto)) accept a value of text, object, or collection type. + +#### Text + +- single email: "somebody@domain.com" +- single display name+email: "Somebody " +- several emails: "Somebody ,me@home.org" + +#### Object + +An object with two properties: + +|Property|Type|Description| +|---|---|---| +|name|Text|Display name (can be null)| +|email|Text|Email address| + +#### Collection + +A collection of address objects. + +### Handling body part + +The [`textBody`](#textbody) and [`htmlBody`](#htmlbody) properties are only used with the [SMTP.send()](SMTPTransporterClass.md#send) function to allow sending simple mails. When both property are filled, the MIME content-type multipart/alternative is used. The email client should then recognize the multipart/alternative part and display the text part or html part as necessary. + +[`bodyStructure`](#bodystructure) and [`bodyValues`](#bodyvalues) are used for [SMTP](SMTPTransporterClass.md) when the [Email object](email-object) is built from a MIME document, e.g. when generated by the `MAIL Convert from MIME` command. In this case, both `bodyStructure` and `bodyValues` properties must be passed together, and it is not recommended to use `textBody` and `htmlBody`. + +#### Example of bodyStructure and bodyValues objects + +```json +"bodyStructure": { + "type": "multipart/mixed", + "subParts": [ + { + "partId": "p0001", + "type": "text/plain" + }, + { + "partId": "p0002", + "type": "text/html" + } + ] +}, +"bodyValues": { + "p0001": { + "value": "I have the most brilliant plan. Let me tell you all about it." + }, + "p0002": { + "value": "

    I have the most brilliant plan. Let me tell you all about it.
    " + } +} +``` + + + + + + +## .attachments + + +**.attachments** : Collection + + +#### Description + + + +The `.attachments` property contains a collection of `4D.MailAttachment` object(s). + +Attachment objects are defined through the [`MAIL New attachment`](MailAttachmentClass.md#mail-new-attachment) command. Attachment objects have specific [properties and functions](MailAttachmentClass.md). + + + + +## .bcc + + +**.bcc** : Text
    **.bcc** : Object
    **.bcc** : Collection + + +#### Description + +The `.bcc` property contains the Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email. + + + + +## .bodyStructure + + +**.bodyStructure** : Object + + +#### Description + +The `.bodyStructure` property contains the *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyStructure` object contains the following properties: + +|Property|Type|Value| +|---|---|---| +|partID|Text|Identifies the part uniquely within the email| +|type|Text|(mandatory) Value of the Content-Type header field of the part| +|charset|Text|Value of the charset parameter of the Content-Type header field| +|encoding|Text|If `isEncodingProblem=true`, the Content-Transfer-Encoding value is added (by default undefined)| +|disposition|Text|Value of the Content-Disposition header field of the part| +|language|Collection of texts|List of language tags, as defined in [RFC3282](https://tools.ietf.org/html/rfc3282), in the Content-Language header field of the part, if present.| +|location|Text|URI, as defined in [RFC2557](https://tools.ietf.org/html/rfc2557), in the Content-Location header field of the part, if present.| +|subParts|Collection of objects|Body parts of each child (collection of *EmailBodyPart* objects)| +|headers|Collection of objects|List of all header fields in the part, in the order they appear in the message (collection of *EmailHeader* objects, see [headers](#headers-) property)| + + + + +## .bodyValues + + +**.bodyValues** : Object + + +#### Description + +The `.bodyValues` property contains the *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyValues` object contains the following properties: + +|Property|Type|Value| +|---|---|---| +|*partID*.value|text|Value of the body part| +|*partID*.isEncodingProblem|boolean|True if malformed sections are found while decoding the charset, or unknown charset, or unknown content transfer-encoding. False by default| + + + + +## .cc + + +**.cc** : Text
    **.cc** : Object
    **.cc** : Collection + + +#### Description + +The `.cc` property contains the Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email. + + + + + + +## .comments + + +**.comments** : Text + + +#### Description + +The `.comments` property contains an additional comments header. + +Comments only appear within the header section of the message (keeping the message's body untouched). + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .from + + +**.from** : Text
    **.from** : Object
    **.from** : Collection + + +#### Description + +The `.from` property contains the Originating [address(es)](#email-addresses) of the email. + + +Each email you send out has both the [sender](#sender) and **from** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .headers + + +**.headers** : Collection + + +#### Description + +The `.headers` property contains a collection of `EmailHeader` objects, in the order they appear in the message. This property allows users to add extended (registered) headers or user-defined (not registered, starting with "X") headers. + +> If an `EmailHeader` object property defines a header such as "from" or "cc" which is already set as a property at the mail level, the `EmailHeader` property is ignored. + +Every object of the headers collection can contain the following properties: + +|Property|Type|Value| +|---|---|---| +|[].name|text|(mandatory) Header field name as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322). If null or undefined, the header field is not added to the MIME header.| +|[].value|text|Header field values as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322)| + + + + + + + +## .htmlBody + + +**.htmlBody** : Text + + +#### Description + +The `.htmlBody` property contains the HTML representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + + + + + +## .id + + +**.id** : Text + + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.id` property contains the unique ID from the IMAP server. + + + + + + +## .inReplyTo + + +**.inReplyTo** : Text + + +#### Description + +The `.inReplyTo` property contains the message identifier(s) of the original message(s) to which the current message is a reply. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + + + +## .keywords + + +**.keywords** : Object + + +#### Description + +The `.keywords` property contains a set of keywords as an object, where each property name is a keyword and each value is true. + +This property is the "keywords" header (see [RFC#4021](https://tools.ietf.org/html/rfc4021)). + +|Property|Type|Value| +|---|---|---| +|.\|boolean|Keyword to set (value must be true)| + +Reserved keywords: +* $draft - Indicates a message is a draft +* $seen - Indicates a message has been read +* $flagged - Indicates a message needs special attention (e.g., Urgent) +* $answered - Indicates a message has been replied to +* $deleted - Indicates a message to delete + +#### Example + +``` + $mail.keywords["$flagged"]:=True + $mail.keywords["4d"]:=True +``` + + + + +## .messageId + + +**.messageId** : Text + + +#### Description + +The `.messageId` property contains a message identifier header ("message-id"). + +This header is usually "lettersOrNumbers@domainname", e.g. "abcdef.123456@4d.com". This unique ID is used in particular on forums or public mailing lists. In general, mail servers automatically add this header to the messages they send. + + + +## .receivedAt + + +**.receivedAt** : Text + + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.receivedAt` property contains the timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z). + + + + + + +## .references + + +**.references** : Collection + + +#### Description + +The `.references` property contains the Collection of all message-ids of messages in the preceding reply chain. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .replyTo + + +**.replyTo** : Text
    **.replyTo** : Object
    **.replyTo** : Collection + + +#### Description + +The `.replyTo` property contains the [addresse(s)](#email-addresses) for responses. + + + + + +## .sendAt + + +**.sendAt** : Text + + +#### Description + +The `.sendAt` property contains the Email timestamp in ISO 8601 UTC format. + + + + +## .sender + + +**.sender** : Text
    **.sender** : Object
    **.sender** : Collection + + +#### Description + +The `.sender` property contains the email source [addresse(s)](#email-addresses) of the email. + + +Each email you send out has both the **sender** and **[from](#from)** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .size + + +**.size** : Integer + + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.size` property contains the size (expressed in bytes) of the Email object returned by the IMAP server. + + + + +## .subject + + +**.subject** : Text + + +#### Description + +The `.subject` property contains the description of topic. + + + + + +## .textBody + + +**.textBody** : Text + + +#### Description + +The `.textBody` property contains the Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + +## .to + + +**.to** : Text
    **.to** : Object
    **.to** : Collection + + +#### Description + +The `.to` property contains the primary recipient [addresse(s)](#email-addresses) of the email. + + +## MAIL Convert from MIME + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**MAIL Convert from MIME**( *mime* : Blob ) : Object
    **MAIL Convert from MIME**( *mime* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mime|Blob, Text|->|Email in MIME| +|Result|Object|<-|Email object| + + +#### Description + +The `MAIL Convert from MIME` command converts a MIME document into a valid email object. + +>4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the returned email object. + +Pass in *mime* a valid MIME document to convert. It can be provided by any mail server or application. You can pass a BLOB or a text *mime* parameter. If the MIME comes from a file, it is recommended to use a BLOB parameter to avoid issues related to charset and line break conversions. + +#### Returned object + +Email object. + +#### Example 1 + +You want to load a mail template saved as MIME in a text document and send an email: + +```4d +C_BLOB($mime) +C_OBJECT($mail;$server;$transporter;$status) + +$mime:=File("/PACKAGE/Mails/templateMail.txt").getContent()) + +$mail:=[#current_title_incode]($mime) +$mail.to:="smith@mail.com" +$mail.subject:="Hello world" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="test@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($mail) +``` + +#### Example 2 + +In this example, you send directly a 4D Write Pro document containing pictures: + +```4d +C_TEXT($mime) +C_OBJECT($email;$server;$transporter;$status) + +// Mime export of the 4D Write Pro document +WP EXPORT VARIABLE(WParea;$mime;wk mime html) + +// convert 4D Write Pro Mime variable in mail object +$email:=MAIL Convert from MIME($mime) + +// Fill your mail object headers +$email.subject:="4D Write Pro HTML body" +$email.from:="YourEmail@gmail.com" +$email.to:="RecipientEmail@mail.com" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="YourEmail@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($email) +``` + + + + + +## MAIL Convert to MIME + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +|v17 R5|Modified| +
    + + +**MAIL Convert to MIME**( *mail* : Object { ; *options* : Object } ) : Text + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mail|Object|->|Email object| +|options|Object|->|Charset and encoding mail options| +|Result|Text|<-|Email object converted to MIME| + + +#### Description + +The `MAIL Convert to MIME` command converts an email object into MIME text. This command is called internally by [SMTP_transporter.send( )](API/SMTPTransporterClass.md#send) to format the email object before sending it. It can be used to analyze the MIME format of the object. + +In *mail*, pass the content and the structure details of the email to convert. This includes information such as the email addresses (sender and recipient(s)), the message itself, and the type of display for the message. + +>4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the email object. + +In *options*, you can set a specific charset and encoding configuration for the mail. The following properties are available: + +|Property| Type| Description| +|---|---|---| +|headerCharset| Text|Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values:

    ConstantValueComment
    mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
    • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    mail mode ISO88591ISO-8859-1
    • headerCharset: ISO-8859-1 & Quoted-printable
    • bodyCharset: ISO-8859-1 & 8-bit
    mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)
    mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64
    | +|bodyCharset| Text| Charset and encoding used for the html and text body contents of the email. Possible values: Same as for headerCharset (see above)| + +If the *options* parameter is omitted, the mail mode UTF8 configuration is used for header and body parts. + + +#### Example + +```4d +C_OBJECT($mail) +C_TEXT($mime) +$mail:=New object + +// Creation of a mail +$mail.from:="tsales@massmarket.com" +$mail.subject:="Terrific Sale! This week only!" +$mail.textBody:="Text format email" +$mail.htmlBody:="HTML format email" +$mail.to:=New collection +$mail.to.push(New object ("email";"noreply@4d.com")) +$mail.to.push(New object ("email";"test@4d.com")) + +// transform the mail object in MIME +$mime:=[#current_title_incode]($mail) + +// Contents of $mime: +// MIME-Version: 1.0 +// Date: Thu, 11 Oct 2018 15:42:25 GMT +// Message-ID: <7CA5D25B2B5E0047A36F2E8CB30362E2> +// Sender: tsales@massmarket.com +// From: tsales@massmarket.com +// To: noreply@4d.com +// To: test@4d.com +// Content-Type: multipart/alternative; boundary="E0AE5773D5E95245BBBD80DD0687E218" +// Subject: Terrific Sale! This week only! +// +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/plain; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// Text format email +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/html; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// HTML format email +// --E0AE5773D5E95245BBBD80DD0687E218-- +``` + + + diff --git a/docs/API/EntityClass.md b/docs/API/EntityClass.md new file mode 100644 index 00000000000000..5553bb4f7630f5 --- /dev/null +++ b/docs/API/EntityClass.md @@ -0,0 +1,1757 @@ +--- +id: EntityClass +title: Entity +--- + +An [entity](ORDA/dsMapping.md#entity) is an instance of a [Dataclass](ORDA/dsMapping.md#dataclass), like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions. + + +### Summary + +|| +|---| +|[](#attributename)

        | +|[](#clone)

        | +|[](#diff)

        | +|[](#drop)

        | +|[](#first)

        | +|[](#fromobject)

        | +|[](#getdataclass)

        | +|[](#getkey)

        | +|[](#getselection)

        | +|[](#getstamp)

        | +|[](#indexof)

        | +|[](#isnew)

        | +|[](#last)

        | +|[](#lock)

        | +|[](#next)

        | +|[](#previous)

        | +|[](#reload)

        | +|[](#save)

        | +|[](#toobject)

        | +|[](#touched)

        | +|[](#touchedattributes)

        | +|[](#unlock)

        | + + + + + + + +## .*attributeName* + +

    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +***.attributeName*** : any + + +#### Description + +Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity. + +>Dataclass attributes can also be reached using the alternate syntax with \[ ]. + +The attribute value type depends on the attribute [kind](DataClassAttributeClass.md#kind) (relation or storage): + +* If *attributeName* kind is **storage**: +`.attributeName` returns a value of the same type as *attributeName*. +* If *attributeName* kind is **relatedEntity**: +`.attributeName` returns the related entity. Values of the related entity are directly available through cascading properties, for example "myEntity.employer.employees\[0].lastname". +* If *attributeName* kind is **relatedEntities**: +`.attributeName` returns a new entity selection of related entities. Duplications are removed (an unordered entity selection is returned). + + +#### Example + +```4d + var $myEntity : cs.EmployeeEntity + $myEntity:=ds.Employee.new() //Create a new entity + $myEntity.name:="Dupont" // assign 'Dupont' to the 'name' attribute + $myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute + $myEntity.save() //save the entity +``` + + + + + + + +## .clone() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + + +**.clone()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|New entity referencing the record| + + + +#### Description + +The `.clone()` function creates in memory a new entity referencing the same record as the original entity. This function allows you to update entities separately. + +>Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save( )`](#save) function is executed. + +This function can only be used with entities already saved in the database. It cannot be called on a newly created entity (for which [`.isNew()`](#isnew) returns **True**). + + +#### Example + +```4d + var $emp; $empCloned : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $empCloned:=$emp.clone() + + $emp.lastName:="Smith" //Updates done on $emp are not done on $empCloned + +``` + + + + + + + + +## .diff() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entityToCompare|4D.Entity|->|Entity to be compared with the original entity| +|attributesToCompare|Collection|-> |Name of attributes to be compared | +|Result|Collection|<-|Differences between the entities| + + + +#### Description + +The `.diff()` function compares the contents of two entities and returns their differences. + +In *entityToCompare*, pass the entity to be compared to the original entity. + +In *attributesToCompare*, you can designate specific attributes to compare. If provided, the comparison is done only on the specified attributes. If not provided, all differences between the entities are returned. + +The differences are returned as a collection of objects whose properties are: + +|Property name| Type| Description| +|---|---|---| +|attributeName| String| Name of the attribute +|value|any - Depends on attribute type |Value of the attribute in the entity| +|otherValue|any - Depends on attribute type|Value of the attribute in *entityToCompare*| + +Only attributes with different values are included in the collection. If no differences are found, `.diff()` returns an empty collection. + +The function applies for properties whose [kind](DataClassAttributeClass.md#kind) is **storage** or **relatedEntity**. In case a related entity has been updated (meaning the foreign key), the name of the related entity and its primary key name are returned as *attributeName* properties (*value* and *otherValue* are empty for the related entity name). + +If one of the compared entities is **Null**, an error is raised. + +#### Example 1 + + +```4d + var $diff1; $diff2 : Collection + employee:=ds.Employee.query("ID=1001").first() + $clone:=employee.clone() + employee.firstName:="MARIE" + employee.lastName:="SOPHIE" + employee.salary:=500 + $diff1:=$clone.diff(employee) // All differences are returned + $diff2:=$clone.diff(employee;New collection"firstName";"lastName")) + // Only differences on firstName and lastName are returned +``` + +$diff1: + +```4d +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + }, + { + "attributeName": "salary", + "value": 66600, + "otherValue": 500 + } +] +$diff2: + +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + } +] +``` + +#### Example 2 + +```4d + var vCompareResult1; vCompareResult2; vCompareResult3; $attributesToInspect : Collection + vCompareResult1:=New collection + vCompareResult2:=New collection + vCompareResult3:=New collection + $attributesToInspect:=New collection + + $e1:=ds.Employee.get(636) + $e2:=ds.Employee.get(636) + + $e1.firstName:=$e1.firstName+" update" + $e1.lastName:=$e1.lastName+" update" + + $c:=ds.Company.get(117) + $e1.employer:=$c + $e2.salary:=100 + + $attributesToInspect.push("firstName") + $attributesToInspect.push("lastName") + + vCompareResult1:=$e1.diff($e2) + vCompareResult2:=$e1.diff($e2;$attributesToInspect) + vCompareResult3:=$e1.diff($e2;$e1.touchedAttributes()) +``` + +vCompareResult1 (all differences are returned): + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "salary", + "value": 33500, + "otherValue": 100 + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + } +] +``` + +vCompareResult2 (only differences on $attributesToInspect are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + } +] +``` + +vCompareResult3 (only differences on $e1 touched attributes are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + + } +] +``` + + + + + + + +## .drop() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.drop**( {*mode* : Integer} ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mode|Integer|->|`dk force drop if stamp changed`: Forces the drop even if the stamp has changed| +|Result|Object|<-|Result of drop operation| + + +#### Description + +The `.drop()` function deletes the data contained in the entity from the datastore, from the table related to its Dataclass. Note that the entity remains in memory. + +In a multi-user or multi-process application, the `.drop()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk force drop if stamp changed` option in the *mode* parameter: in this case, the entity is dropped even if the stamp has changed (and the primary key is still the same). + +**Result** + +The object returned by `.drop( )` contains the following properties: + +|Property| | Type |Description| +|---|---|--- |---| +|success|| boolean|true if the drop action is successful, false otherwise.| +||||***Available only in case of error:***| +|status(*) || number| Error code, see below| +|statusText(*)|| text| Description of the error, see below| +||||***Available only in case of pessimistic lock error:***| +|LockKindText|| text| "Locked by record"| +|lockInfo|| object| Information about the lock origin| +||task_id| number| Process id| +||user_name| text| Session user name on the machine| +||user4d_alias| text| User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory| +||host_name |text| Machine name| +||task_name| text| Process name| +||client_version |text| +||||***Available only in case of serious error (serious error can be trying to duplicate a primary key, disk full...):***| +|errors || collection of objects| | +||message| text| Error message| +||component signature| text| internal component signature (e.g. "dmbg" stands for the database component)| +||errCode |number |Error code| + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +|Constant| Value| Comment| +|---|---|---| +|`dk status entity does not exist anymore`|5|The entity no longer exists in the data. This error can occur in the following cases:
  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using entity.drop( ), this error can be returned when dk force drop if stamp changed option is used. When using entity.lock( ), this error can be returned when dk reload if stamp changed option is used
  • **Associated statusText**: "Entity does not exist anymore"| +|`dk status locked`|3|The entity is locked by a pessimistic lock.
    **Associated statusText**: "Already locked"| +|`dk status serious error`| 4| A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
    **Associated statusText**: "Other error" +|`dk status stamp has changed`| 2|The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used
  • **Associated statusText**: "Stamp has changed"
  • | + + +#### Example 1 + +Example without `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop() + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 2 + +Example with `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop(dk force drop if stamp changed) + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + + + +## .first() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.first()**: 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|Reference to first entity of an entity selection (Null if not found)| + + +#### Description + +The `.first()` function returns a reference to the entity in first position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $firstEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[2] + $firstEmployee:=$employee.first() //$firstEmployee is the first entity of the $employees entity selection +``` + + + + + + +## .fromObject() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.fromObject**( *filler* : Object ) + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|filler|Object|->|Object from which to fill the entity| + + +#### Description + +The `.fromObject()` function fills an entity with the *filler* content. + +>This function modifies the original entity. + +The mapping between the object and the entity is done on the attribute names: + +* If a property of the object does not exist in the dataclass, it is ignored. +* Data types must be equivalent. If there is a type mismatch between the object and dataclass, 4D tries to convert the data whenever possible (see [`Converting data types`](Concepts/data-types.md#converting-data-types)), otherwise the attribute is left untouched. +* The primary key can be given as is or with a "__KEY" property (filled with the primary key value). If it does not already exist in the dataclass, the entity is created with the given value when [.save()](#save) is called. If the primary key is not given, the entity is created and the primary key value is assigned with respect to database rules. The auto-increment is only computed if the primary key is null. + +*filler* can handle a related entity under the following conditions: + +* *filler* contains the foreign key itself, or +* *filler* contains a property object with the same name as the related entity, containing a single property named "\_\_KEY". +* if the related entity does not exist, it is ignored. + +#### Example + +With the following $o object: + +```4d +{ + "firstName": "Mary", + "lastName": "Smith", + "salary": 36500, + "birthDate": "1958-10-27T00:00:00.000Z", + "woman": true, + "managerID": 411,// relatedEntity given with PK + "employerID": 20 // relatedEntity given with PK +} +``` + + +The following code will create an entity with manager and employer related entities. + + +```4d + var $o : Object + var $entity : cs.EmpEntity + $entity:=ds.Emp.new() + $entity.fromObject($o) + $entity.save() +``` + + +You could also use a related entity given as an object: + +```4d + +{ + "firstName": "Marie", + "lastName": "Lechat", + "salary": 68400, + "birthDate": "1971-09-03T00:00:00.000Z", + "woman": false, + "employer": {// relatedEntity given as an object + "__KEY": "21" + }, + "manager": {// relatedEntity given as an object + "__KEY": "411" + } +} +``` + + + + + + + + +## .getDataClass() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| + +
    + + +**.getDataClass()** : 4D.DataClass + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.DataClass|<-|DataClass object to which the entity belongs| + + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity. This function is useful when writing generic code. + + +#### Example + +The following generic code duplicates any entity: + +```4d + //duplicate_entity method + //duplicate_entity($entity) + + #DECLARE($entity : 4D.Entity) + var $entityNew : 4D.Entity + var $status : Object + + $entityNew:=$entity.getDataClass().new() //create a new entity in the parent dataclass + $entityNew.fromObject($entity.toObject()) //get all attributes + $entityNew[$entity.getDataClass().getInfo().primaryKey]:=Null //reset the primary key + $status:=$entityNew.save() //save the duplicated entity +``` + + + + + + + +## .getKey() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.getKey**( { *mode* : Integer } ) : Text
    **.getKey**( { *mode* : Integer } ) : Integer + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mode|Integer|->|`dk key as string`: primary key is returned as a string, no matter the primary key type| +|Result|Text|<-|Value of the text primary key of the entity| +|Result|Integer|<-|Value of the numeric primary key of the entity| + + + +#### Description + +The `.getKey()` function returns the primary key value of the entity. + +Primary keys can be numbers (Integer) or strings. You can "force" the returned primary key value to be a string, no matter the actual primary key type, by passing the `dk key as string` option in the *mode* parameter. + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees[0] + ALERT("The primary key is "+$employee.getKey(dk key as string)) +``` + + + + + + + +## .getSelection() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.getSelection()**: 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.EntitySelection|<-|Entity selection to which the entity belongs (Null if not found)| + + +#### Description + +The `.getSelection()` function returns the entity selection which the entity belongs to. + +If the entity does not belong to an entity selection, the function returns Null. + +#### Example + + +```4d + var $emp : cs.EmployeeEntity + var $employees; $employees2 : cs.EmployeeSelection + $emp:=ds.Employee.get(672) // This entity does not belong to any entity selection + $employees:=$emp.getSelection() // $employees is Null + + $employees2:=ds.Employee.query("lastName=:1";"Smith") //This entity selection contains 6 entities + $emp:=$employees2[0] // This entity belongs to an entity selection + + ALERT("The entity selection contains "+String($emp.getSelection().length)+" entities") +``` + + + + + + +## .getStamp() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.getStamp()** : Integer + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Integer|<-|Stamp of the entity (0 if entity has just been created)| + + +#### Description + +The `.getStamp()` function returns the current value of the stamp of the entity. + +The internal stamp is automatically incremented by 4D each time the entity is saved. It manages concurrent user access and modifications to the same entities (see [**Entity locking**](ORDA/entities.md#entity-locking)). + +>For a new entity (never saved), the function returns 0. To know if an entity has just been created, it is recommended to use [.isNew()](#isnew). + + +#### Example + + +```4d + var $entity : cs.EmployeeEntity + var $stamp : Integer + + $entity:=ds.Employee.new() + $entity.lastname:="Smith" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=1 + + $entity.lastname:="Wesson" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=2 +``` + + + + + + + +## .indexOf() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entitySelection|4D.EntitySelection|->|Position of the entity is given according to this entity selection| +|Result|Integer|<-|Position of the entity in an entity selection| + + +#### Description + +The `.indexOf()` function returns the position of the entity in an entity selection. + +By default if the *entitySelection* parameter is omitted, the function returns the entity's position within its own entity selection. Otherwise, it returns the position of the entity within the specified *entitySelection*. + +The resulting value is included between 0 and the length of the entity selection -1. + +* If the entity does not have an entity selection or does not belong to *entitySelection*, the function returns -1. +* If *entitySelection* is Null or does not belong to the same dataclass as the entity, an error is raised. + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] //This entity belongs to an entity selection + ALERT("The index of the entity in its own entity selection is "+String($employee.indexOf())) //1 + + $employee:=ds.Employee.get(725) //This entity does not belong to an entity selection + ALERT("The index of the entity is "+String($employee.indexOf())) // -1 +``` + + + + + + + +## .isNew() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.isNew()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if entity has just been created and not yet saved. Otherwise, False.| + + +#### Description + +The `.isNew()` function returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore. Otherwise, it returns False. + + +#### Example + + +```4d + var $emp : cs.EmployeeEntity + + $emp:=ds.Employee.new() + + If($emp.isNew()) + ALERT("This is a new entity") + End if +``` + + + + + + +## .last() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.last()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|Reference to last entity of an entity selection (Null if not found)| + + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee; $lastEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $lastEmployee:=$employee.last() //$lastEmployee is the last entity of the $employees entity selection +``` + + + + + + +## .lock() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.lock**( { *mode* : Integer } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mode|Integer|->|`dk reload if stamp changed`: Reload before locking if stamp changed| +|Result|Object|<-|Result of lock operation| + + +#### Description + +The `.lock()` function puts a pessimistic lock on the record referenced by the entity. The [lock is set](ORDA/entities.md#entity-locking) for a record and all the references of the entity in the current process. + +Other processes will see this record as locked (the `result.success` property will contain False if they try to lock the same entity using this function). Only functions executed in the "locking" session are allowed to edit and save the attributes of the entity. The entity can be loaded as read-only by other sessions, but they will not be able to enter and save values. + +A locked record is unlocked: + +* when the [`unlock()`](#unlock) function is called on a matching entity in the same process +* automatically, when it is no longer referenced by any entities in memory. For example, if the lock is put only on one local reference of an entity, the entity is unlocked when the function ends. As long as there are references to the entity in memory, the record remains locked. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk reload if stamp changed` option in the *mode* parameter: in this case, no error is returned and the entity is reloaded when the stamp has changed (if the entity still exists and the primary key is still the same). + +**Result** + +The object returned by `.lock( )` contains the following properties: + +|Property| | Type| Description| +|---|---|---|---| +|success| | boolean| true if the lock action is successful (or if the entity is already locked in the current process), false otherwise.| +||||***Available only if `dk reload if stamp changed` option is used:***| +|**wasReloaded**| |boolean|true if the entity was reloaded with success, false otherwise.| +||||***Available only in case of error:***| +|status(\*)| |number| Error code, see below| +|statusText(\*)|| text| Description of the error, see below| +||||***Available only in case of pessimistic lock error:***| +|lockKindText| | text| "Locked by record"| +|lockInfo| | object| Information about the lock origin| +||task_id| number| Process ID| +||user_name |text| Session user name on the machine| +||user4d_alias| text| Name or alias of the 4D user| +||user4d_id |number |User id in the 4D database directory| +||host_name| text| Machine name +||task_name |text |Process name| +||client_version| text || +||||***Available only in case of serious error*** (primary key already exists, disk full...):| +|errors || collection of objects || +||message |text |Error message| +||component signature| text| internal component signature (e.g. "dmbg" stands for the database component)| +||errCode |number |Error code| + + +(\*) The following values can be returned in the *status* and *statusText* properties of the *Result* object in case of error: + +|Constant |Value| Comment| +|---|---|---| +|`dk status entity does not exist anymore`| 5 |The entity no longer exists in the data. This error can occur in the following cases:
  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when dk force drop if stamp changed option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • **Associated statusText**: "Entity does not exist anymore"| +|`dk status locked`| 3 |The entity is locked by a pessimistic lock.

    **Associated statusText**: "Already locked" +|`dk status serious error`| 4 |A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

    **Associated statusText**: "Other error"| +|`dk status stamp has changed`|2|The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

  • **Associated statusText**: "Stamp has changed"| + + +#### Example 1 + +Example with error: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(716) + $status:=$employee.lock() + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + + +#### Example 2 + +Example with `dk reload if stamp changed` option: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(717) + $status:=$employee.lock(dk reload if stamp changed) + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + + +## .next() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.next()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|Reference to next entity in the entity selection (Null if not found)| + + +#### Description + +The `.next()` function returns a reference to the next entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid next entity in the entity selection (i.e. you are on the last entity of the selection), the function returns Null. If the next entity has been dropped, the function returns the next valid entity (and eventually Null). + + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $nextEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $nextEmployee:=$employee.next() //$nextEmployee is the second entity of the $employees entity selection + +``` + + + + + +## .previous() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.previous()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|Reference to previous entity in the entity selection (Null if not found)| + + +#### Description + +The `.previous()` function returns a reference to the previous entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid previous entity in the entity selection (i.e. you are on the first entity of the selection), the function returns Null. If the previous entity has been dropped, the function returns the previous valid entity (and eventually Null). + + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $previousEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] + $previousEmployee:=$employee.previous() //$previousEmployee is the first entity of the $employees entity selection +``` + + + + + + +## .reload( ) + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.reload()** : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Status object| + + +#### Description + +The `.reload()` function reloads the content of the entity in memory, according to information stored in the table related to the dataclass in the datastore. The reload is done only if the entity still exists with the same primary key. + +**Result** + +The object returned by `.reload( )` contains the following properties: + +|Property |Type| Description| +|---|---|---| +|success|boolean| True if the reload action is successful, False otherwise.

    ***Available only in case of error***:| +|status(\*)|number|Error code, see below| +|statusText(\*)|text|Description of the error, see below| + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +|Constant| Value| Comment| +|---|---|---| +|`dk status entity does not exist anymore`|5|The entity no longer exists in the data. This error can occur in the following cases:

  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • ***Associated statusText***: "Entity does not exist anymore"| +|`dk status serious error`|4| A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
    ***Associated statusText***: "Other error"| + + +#### Example + +```4d + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + var $result : Object + + $employees:=ds.Employee.query("lastName=:1";"Hollis") + $employee:=$employees[0] + $employee.firstName:="Mary" + $result:=$employee.reload() + Case of + :($result.success) + ALERT("Reload has been done") + :($result.status=dk status entity does not exist anymore) + ALERT("The entity has been dropped") + End case +``` + + + + + +## .save() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.save**( { *mode* : Integer } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mode|Integer|->|`dk auto merge`: Enables the automatic merge mode| +|Result|Object|<-|Result of save operation| + + +#### Description + +The `.save()` function saves the changes made to the entity in the table related to its dataClass. You must call this method after creating or modifying an entity if you want to save the changes made to it. + +The save operation is executed only if at least one entity attribute has been "touched" (see the [`.touched()`](#touched) and [`.touchedAttributes()`](#touchedattributes) functions). Otherwise, the function does nothing (the trigger is not called). + +In a multi-user or multi-process application, the `.save()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the method will return an error (see below) whenever the same entity has been modified by another process or user in the meantime, no matter the modified attribute(s). + +Otherwise, you can pass the `dk auto merge` option in the *mode* parameter: when the automatic merge mode is enabled, a modification done concurrently by another process/user on the same entity but on a different attribute will not result in an error. The resulting data saved in the entity will be the combination (the "merge") of all non-concurrent modifications (if modifications were applied to the same attribute, the save fails and an error is returned, even with the auto merge mode). + +>The automatic merge mode is not available for attributes of Picture, Object, and Text type when stored outside of the record. Concurrent changes in these attributes will result in a `dk status stamp has changed` error. + +**Result** + +The object returned by `.save()` contains the following properties: + +|Property | |Type| Description| +|---|---|---|---| +|success| |boolean|True if the save action is successful, False otherwise.| +||||***Available only if `dk auto merge` option is used***:| +|autoMerged| |boolean|True if an auto merge was done, False otherwise.| +||||***Available only in case of error***:| +|status| |number|Error code, [see below](#status-and-statustext)| +|statusText| |text|Description of the error, [see below](#status-and-statustext)| +||||***Available only in case of pessimistic lock error***:| +|lockKindText| |text|"Locked by record"| +|lockInfo| |object|Information about the lock origin| +||task_id| number| Process id| +||user_name |text| Session user name on the machine| +||user4d_alias| text| User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory| +||host_name |text |Machine name| +||task_name| text| Process name| +||client_version| text|| +||||***Available only in case of serious error*** (serious error - can be trying to duplicate a primary key, disk full...):| +|errors || collection of objects|| +||message| text |Error message| +||componentSignature| text| Internal component signature (e.g. "dmbg" stands for the database component)| +||errCode| number| Error code| + +##### status and statusText + +The following values can be returned in the `status` and `statusText` properties of Result object in case of error: + +|Constant| Value |Comment| +|---|---|---| +|`dk status automerge failed`| 6| (Only if the `dk auto merge` option is used) The automatic merge option failed when saving the entity.

    **Associated statusText**: "Auto merge failed"| +|`dk status entity does not exist anymore`| 5| The entity no longer exists in the data. This error can occur in the following cases:

  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • **Associated statusText**: "Entity doesnot exist anymore"| +|`dk status locked`| 3| The entity is locked by a pessimistic lock.

    **Associated statusText**: "Already locked" +|`dk status serious error`|4|A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

    **Associated statusText**: "Other error"| +|`dk status stamp has changed`|2|The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

  • **Associated statusText**: "Stamp has changed" + + +#### Example 1 + +Creating a new entity: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + $employee:=ds.Employee.new() + $employee.firstName:="Mary" + $employee.lastName:="Smith" + $status:=$employee.save() + If($status.success) + ALERT("Employee created") + End if +``` + +#### Example 2 + +Updating an entity without `dk auto merge` option: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save() + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 3 + +Updating an entity with `dk auto merge` option: + +```4d + var $status : Object + + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save(dk auto merge) + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status automerge failed) + ALERT($status.statusText) + End case +``` + + + + + + +## .toObject() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.toObject**() : Object
    **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
    **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|filterString |Text |->|Attribute(s) to extract (comma-separated string)| +|filterCol |Collection |->|Collection of attribute(s) to extract| +|options|Integer|->|`dk with primary key`: adds the \_KEY property;
    `dk with stamp`: adds the \_STAMP property| +|Result|Object|<-|Object built from the entity| + + +#### Description + +The `.toObject()` function returns an object which has been built from the entity. Property names in the object match attribute names of the entity. + +If no filter is specified, or if the *filterString* parameter contains an empty string or "*", the returned object will contain: + +* all storage entity attributes +* attributes of the `relatedEntity` [kind](DataClassAttributeClass.md#kind): you get a property with the same name as the related entity (name of the many-to-one link). Attribute is extracted with the simple form. +* attributes of the `relatedEntities` [kind](DataClassAttributeClass.md#kind): attribute is not returned. + + +In the first parameter, you pass the entity attribute(s) to extract. You can pass: + +* *filterString*: a string with property paths separated with commas: "propertyPath1, propertyPath2, ...", or +* *filterCol*: a collection of strings: \["propertyPath1","propertyPath2";...] + +If a filter is specified for attributes of the relatedEntity [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntity" -> it is extracted with simple form: an object with property \_\_KEY (primary key). +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1; relatedEntity.propertyName2; ..." -> only those properties are extracted + +If a filter is specified for attributes of the relatedEntities [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1; relatedEntities.propertyName2; ..." -> only those properties are extracted + +In the *options* parameter, you can pass the `dk with primary key` and/or` dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + + +#### Example 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Without filter parameter: + +```4d +employeeObject:=employeeSelected.toObject() +``` + +Returns: + +```4d +{ + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { // relatedEntity extracted with simple form + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + + + +#### Example 2 + +Extracting the primary key and the stamp: + +```4d +employeeObject:=employeeSelected.toObject("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +{ + "__KEY": 413, + "__STAMP": 1, + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + +#### Example 3 + +Expanding all the properties of `relatedEntities`: + +```4d +employeeObject:=employeeSelected.toObject("directReports.*") +``` + +```4d +{ + "directReports": [ + { + "ID": 418, + "firstName": "Lorena", + "lastName": "Boothe", + "salary": 44800, + "birthDate": "1970-10-02T00:00:00.000Z", + "woman": true, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 419, + "firstName": "Drew", + "lastName": "Caudill", + "salary": 41000, + "birthDate": "2030-01-12T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 420, + "firstName": "Nathan", + "lastName": "Gomes", + "salary": 46300, + "birthDate": "2010-05-29T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + } + ] +} +``` + +#### Example 4 + +Extracting some properties of `relatedEntities`: + +```4d + employeeObject:=employeeSelected.toObject("firstName, directReports.lastName") +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "directReports": [ + { + "lastName": "Boothe" + }, + { + "lastName": "Caudill" + }, + { + "lastName": "Gomes" + } + ] +} +``` + +#### Example 5 + +Extracting a `relatedEntity` with simple form: + +```4d + $coll:=New collection("firstName";"employer") + employeeObject:=employeeSelected.toObject($coll) +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "employer": { + "__KEY": 20 + } +} +``` + +#### Example 6 + +Extracting all the properties of a `relatedEntity`: + +```4d + employeeObject:=employeeSelected.toObject("employer.*") +``` + +Returns: + +```4d +{ + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } +} +``` + +#### Example 7 + +Extracting some properties of a `relatedEntity`: + +```4d + $col:=New collection + $col.push("employer.name") + $col.push("employer.revenues") + employeeObject:=employeeSelected.toObject($col) +``` + +Returns: + +```4d +{ + "employer": { + "name": "India Astral Secretary", + "revenues": 12000000 + } +} +``` + + + + + + +## .touched( ) + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.touched()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if at least one entity attribute has been modified and not yet saved, else False| + + +#### Description + +The `.touched()` function tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved. + +If an attribute has been modified or calculated, the function returns True, else it returns False. You can use this function to determine if you need to save the entity. + +This function returns False for a new entity that has just been created (with [`.new( )`](DataClassClass.md#new)). Note however that if you use a function which calculates an attribute of the entity, the `.touched()` function will then return True. For example, if you call [`.getKey()`](#getkey) to calculate the primary key, `.touched()` returns True. + +#### Example + +In this example, we check to see if it is necessary to save the entity: + +```4d + var $emp : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + + If($emp.touched()) //if at least one of the attributes has been changed + $emp.save() + End if // otherwise, no need to save the entity +``` + + + + + +## .touchedAttributes( ) + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.touchedAttributes()** : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Collection|<-|Names of touched attributes, or empty collection| + + +#### Description + +The `.touchedAttributes()` function returns the names of the attributes that have been modified since the entity was loaded into memory. + +This applies for attributes of the [kind](DataClassAttributeClass.md#kind) `storage` or `relatedEntity`. + +In the case of a related entity having been touched (i.e., the foreign key), the name of the related entity and its primary key's name are returned. + +If no entity attribute has been touched, the method returns an empty collection. + +#### Example 1 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + + $touchedAttributes:=New collection + $emp:=ds.Employee.get(725) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + $emp.lastName:="Martin" + $touchedAttributes:=$emp.touchedAttributes() + //$touchedAttributes: ["firstName","lastName"] +``` + + +#### Example 2 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + var $company : cs.CompanyEntity + + $touchedAttributes:=New collection + + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName + $emp.lastName:="Martin" + + $company:=ds.Company.get(121) + $emp.employer:=$company + + $touchedAttributes:=$emp.touchedAttributes() + + //collection $touchedAttributes: ["firstName","lastName","employer","employerID"] +``` + +In this case: + +* firstName and lastName have a `storage` kind +* employer has a `relatedEntity` kind +* employerID is the foreign key of the employer related entity + + + + + +## .unlock() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.unlock()** : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Status object| + + +#### Description + +The `.unlock()` function removes the pessimistic lock on the record matching the entity in the datastore and table related to its dataclass. + +> For more information, please refer to [Entity locking](ORDA/entities.md#entity-locking) section. + +A record is automatically unlocked when it is no longer referenced by any entities in the locking process (for example: if the lock is put only on one local reference of an entity, the entity and thus the record is unlocked when the process ends). + +>When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. For example: + +```4d + $e1:=ds.Emp.all()[0] + $e2:=ds.Emp.all()[0] + $res:=$e1.lock() //$res.success=true + $res:=$e2.unlock() //$res.success=false + $res:=$e1.unlock() //$res.success=true +``` + +**Result** + +The object returned by `.unlock()` contains the following property: + +|Property| Type |Description| +|---|---|---| +|success| Boolean| True if the unlock action is successful, False otherwise. If the unlock is done on a dropped entity, on a non locked record, or on a record locked by another process or entity, success is False.| + +#### Example + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + + $employee:=ds.Employee.get(725) + $status:=$employee.lock() + ... //processing + $status:=$employee.unlock() + If($status.success) + ALERT("The entity is now unlocked") + End if +``` + + + + + + diff --git a/docs/API/EntitySelectionClass.md b/docs/API/EntitySelectionClass.md new file mode 100644 index 00000000000000..610577c1ad871b --- /dev/null +++ b/docs/API/EntitySelectionClass.md @@ -0,0 +1,2423 @@ +--- +id: EntitySelectionClass +title: EntitySelection +--- + + +An entity selection is an object containing one or more reference(s) to [entities](ORDA/dsMapping.md#entity) belonging to the same [Dataclass](ORDA/dsMapping.md#dataclass). An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Entity selections can be created from existing selections using various functions of the [`DataClass` class](DataClassClass.md) such as [`.all()`](DataClassClass.md#all) or [`.query()`](DataClassClass.md#query), or functions of the `EntityClass` class itself, such as [`.and()`](#and) or [`orderBy()`](#orderby). You can also create blank entity selections using the [`dataClass.newSelection()`](DataClassClass.md#newselection) function or the [`Create new selection`](#create-new-selection) command. + +### Summary + +|| +|---| +|[](#91index93)

        | +|[](#attributename)

        | +|[](#add)

        | +|[](#and)

        | +|[](#average)

        | +|[](#contains)

        | +|[](#count)

        | +|[](#distinct)

        | +|[](#drop)

        | +|[](#extract)

        | +|[](#first)

        | +|[](#getdataclass)

        | +|[](#isalterable)

        | +|[](#isordered)

        | +|[](#last)

        | +|[](#length)

        | +|[](#max)

        | +|[](#min)

        | +|[](#minus)

        | +|[](#or)

        | +|[](#orderby)

        | +|[](#orderbyformula)

        | +|[](#query)

        | +|[](#querypath)

        | +|[](#queryplan)

        | +|[](#refresh)

        | +|[](#selected)

        | +|[](#slice)

        | +|[](#sum)

        | +|[](#tocollection)

        | + + + +## Create entity selection + + +**Create entity selection** ( *dsTable* : Table { ; *settings* : Object } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|dsTable|Table|->|Table in the 4D database whose current selection will be used to build the entity selection| +|settings|Object|->|Build option: context | +|Result|4D.EntitySelection|<-|Entity selection matching the dataclass related to the given table| + + + +#### Description + +The `Create entity selection` command builds and returns a new, [alterable](ORDA/entities.md#shareable-or-alterable-entity-selections) entity selection related to the dataclass matching the given *dsTable*, according to the current selection of this table. + +If the current selection is sorted, an [ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created. + +If the *dsTable* is not exposed in [`ds`](API/DataStoreClass.md#ds), an error is returned. This command cannot be used with a Remote datastore. + +In the optional *settings* parameter, you can pass an object containing the following property: + +|Property|Type|Description| +|---|---|---| +|context|Text|Label for the [optimization context](ORDA/entities.md#clientserver-optimization) applied to the entity selection.| + + +#### Example + +```4d +var $employees : cs.EmployeeSelection +ALL RECORDS([Employee]) +$employees:=Create entity selection([Employee]) +// The $employees entity selection now contains a set of reference +// on all entities related to the Employee dataclass +``` + +#### See also + +[`dataClass.newSelection()`](DataClassClass.md#newselection) + + +## [*index*] + +

    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +***[index]*** : 4D.Entity + + +#### Description + +The `EntitySelection[index]` notation allows you to access entities within the entity selection using the standard collection syntax: pass the position of the entity you want to get in the *index* parameter. + +Note that the corresponding entity is reloaded from the datastore. + +*index* can be any number between 0 and `.length`-1. + +* If *index* is out of range, an error is returned. +* If *index* corresponds to a dropped entity, a Null value is returned. + +>**Warning**: `EntitySelection[index]` is a non assignable expression, which means that it cannot be used as en editable entity reference with methods like [`.lock()`](EntityClass.md#lock) or [`.save()`](EntityClass.md#save). To work with the corresponding entity, you need to assign the returned expression to an assignable expression, such as a variable. Examples: + +```4d + $sel:=ds.Employee.all() //create the entity selection + //invalid statements: + $result:=$sel[0].lock() //will NOT work + $sel[0].lastName:="Smith" //will NOT work + $result:=$sel[0].save() //will NOT work + //valid code: + $entity:=$sel[0] //OK + $entity.lastName:="Smith" //OK + $entity.save() //OK +``` + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + $employee:=$employees[2] // The 3rd entity of the $employees entity selection is reloaded from the database +``` + + + + + + + +## .*attributeName* + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +***.attributeName*** : Collection
    ***.attributeName*** : 4D.EntitySelection + + +#### Description + +Any dataclass attribute can be used as a property of an entity selection to return a "projection" of values for the attribute in the entity selection. Projected values can be a collection or a new entity selection, depending on the [kind](DataClassAttributeClass.md#kind) (`storage` or `relation`) of the attribute. + +* If *attributeName* kind is `storage`: +`.attributeName` returns a collection of values of the same type as *attributeName*. +* If *attributeName* kind is `relatedEntity`: +`.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). +* If *attributeName* kind is `relatedEntities`: +`.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). + + +When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. In this case, if no entities are returned, the result is an empty entity selection. + +If the attribute does not exist in the entity selection, an error is returned. + + + + + + +#### Example 1 + +Projection of storage values: + + + + +```4d + var $firstNames : Collection + $entitySelection:=ds.Employee.all() + $firstNames:=$entitySelection.firstName // firstName type is string +``` + +The resulting collection is a collection of strings, for example: + +```4d +[ + "Joanna", + "Alexandra", + "Rick" +] +``` + +#### Example 2 + +Projection of related entity: + +```4d + var $es; $entitySelection : cs.EmployeeSelection + $entitySelection:=ds.Employee.all() + $es:=$entitySelection.employer // employer is related to a Company dataClass +``` + +The resulting object is an entity selection of Company with duplications removed (if any). + +#### Example 3 + +Projection of related entities: + +```4d + var $es : cs.EmployeeSelection + $es:=ds.Employee.all().directReports // directReports is related to Employee dataclass +``` + +The resulting object is an entity selection of Employee with duplications removed (if any). + + + + + + + +## .add() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Only supports alterable entity selections| +|v17|Added| +
    + + + +**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entity|4D.Entity|->|Entity to be added to the entity selection| +|Result|4D.EntitySelection|->|Entity selection including the added *entity*| + + + +#### Description + +The `.add()` function adds the specified *entity* to the entity selection and returns the modified entity selection. + +>This function modifies the original entity selection. + +**Warning:** The entity selection must be *alterable*, i.e. it has been created for example by [`.newSelection()`](DataClassClass.md#newselection) or `Create entity selection`, otherwise `.add()` will return an error. Shareable entity selections do not accept the addition of entities. For more information, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + + +* If the entity selection is ordered, *entity* is added at the end of the selection. If a reference to the same entity already belongs to the entity selection, it is duplicated and a new reference is added. +* If the entity selection is unordered, *entity* is added anywhere in the selection, with no specific order. + +>For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +The modified entity selection is returned by the function, so that function calls can be chained. + +An error occurs if *entity* and the entity selection are not related to the same Dataclass. If *entity* is Null, no error is raised. + +#### Example 1 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"S@") + $employee:=ds.Employee.new() + $employee.lastName:="Smith" + $employee.save() + $employees.add($employee) //The $employee entity is added to the $employees entity selection +``` + +#### Example 2 + +Calls to the function can be chained: + +```4d + var $sel : cs.ProductSelection + var $p1;$p2;$p3 : cs.ProductEntity + + $p1:=ds.Product.get(10) + $p2:=ds.Product.get(11) + $p3:=ds.Product.get(12) + $sel:=ds.Product.query("ID > 50") + $sel:=$sel.add($p1).add($p2).add($p3) +``` + + + + + +## .and() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +
    + + +**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entity |4D.Entity|->|Entity to intersect with| +|entitySelection |4D.EntitySelection|->|Entity selection to intersect with| +|Result|4D.EntitySelection|<-|New entity selection with the result of intersection with logical AND operator| + + + +#### Description + +The `.and()` function combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator; it returns a new, unordered entity selection that contains only the entities that are referenced in both the entity selection and the parameter. + +* If you pass *entity* as parameter, you combine this entity with the entity selection. If the entity belongs to the entity selection, a new entity selection containing only the entity is returned. Otherwise, an empty entity selection is returned. +* If you pass *entitySelection* as parameter, you combine both entity selections. A new entity selection that contains only the entities that are referenced in both selections is returned. If there is no intersecting entity, an empty entity selection is returned. + +>You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or the *entitySelection* parameter is empty, or if the *entity* is Null, an empty entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + //The $employees entity selection contains the entity + //with primary key 710 and other entities + //for ex. "Colin Hetrick" / "Grady Harness" / "Sherlock Holmes" (primary key 710) + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.and($employee) //$result is an entity selection containing + //only the entity with primary key 710 ("Sherlock Holmes") +``` + + +#### Example 2 + +We want to have a selection of employees named "Jones" who live in New York: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2) +``` + + + + + +## .average() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Returns undefined if empty entity selection| +|v17|Added| + +
    + + +**.average**( *attributePath* : Text ) : Real + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Attribute path to be used for calculation| +|Result|Real|<-|Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection)| + + +#### Description + +The `.average()` function returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection. + +Pass in the *attributePath* parameter the attribute path to evaluate. + +Only numerical values are taken into account for the calculation. Note however that, if the *attributePath* of the entity selection contains mixed value types, `.average()` takes all scalar elements into account to calculate the average value. + +>Date values are converted to numerical values (seconds) and used to calculate the average. + +`.average()` returns **undefined** if the entity selection is empty or *attributePath* does not contain numerical values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Example + +We want to obtain a list of employees whose salary is higher than the average salary: + +```4d + var $averageSalary : Real + var $moreThanAv : cs.EmployeeSelection + $averageSalary:=ds.Employee.all().average("salary") + $moreThanAv:=ds.Employee.query("salary > :1";$averageSalary) +``` + + + + + + +## .contains() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.contains**( *entity* : 4D.Entity ) : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entity|4D.Entity|->|Entity to evaluate| +|Result|Boolean|<-|True if the entity belongs to the entity selection, else False| + + +#### Description + +The `.contains()` function returns true if entity reference belongs to the entity selection, and false otherwise. + +In *entity*, specify the entity to search for in the entity selection. If entity is Null, the function will return false. + +If *entity* and the entity selection do not belong to the same dataclass, an error is raised. + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName=:1";"H@") + $employee:=ds.Employee.get(610) + + If($employees.contains($employee)) + ALERT("The entity with primary key 610 has a last name beginning with H") + Else + ALERT("The entity with primary key 610 does not have a last name beginning with H") + End if +``` + + + + + + +## .count() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.count**( *attributePath* : Text ) : Real + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Path of the attribute to be used for calculation| +|Result|Real|<-|Number of non null *attributePath* values in the entity selection| + + +#### Description + +The `.count()` function returns the number of entities in the entity selection with a non-null value in *attributePath*. + +>Only scalar values are taken into account. Object or collection type values are considered as null values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Example + +We want to find out the total number of employees for a company without counting any whose job title has not been specified: + +```4d + var $sel : cs.EmployeeSelection + var $count : Real + + $sel:=ds.Employee.query("employer = :1";"Acme, Inc") + $count:=$sel.count("jobtitle") +``` + + + + + +## .copy() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| + +
    + + +**.copy**( { *option* : Integer } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|option |Integer|->|`ck shared`: return a shareable entity selection| +|Result|4D.EntitySelection|<-|Copy of the entity selection| + + +#### Description + +The `.copy()` function returns a copy of the original entity selection. + +> This function does not modify the original entity selection. + +By default, if the *option* parameter is omitted, the function returns a new, alterable entity selection (even if the function is applied to a shareable entity selection). Pass the `ck shared` constant in the *option* parameter if you want to create a shareable entity selection. + +> For information on the shareable property of entity selections, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + +#### Example + +You create a new, empty entity selection of products when the form is loaded: + +```4d + Case of + :(Form event code=On Load) + Form.products:=ds.Products.newSelection() + End case + +``` + +Then this entity selection is updated with products and you want to share the products between several processes. You copy the Form.products entity selection as a shareable one: + +```4d + ... + // The Form.products entity selection is updated + Form.products.add(Form.selectedProduct) + + Use(Storage) + If(Storage.products=Null) + Storage.products:=New shared object() + End if + + Use(Storage.products) + Storage.products:=Form.products.copy(ck shared) + End use + End use +``` + + + + + +## .distinct() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath|Text|->|Path of attribute whose distinct values you want to get| +|option|Integer|->|`dk diacritical`: diacritical evaluation ("A" # "a" for example)| +|Result|Collection|<-|Collection with only distinct values| + + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the *attributePath* in the entity selection. + +The returned collection is automatically sorted. **Null** values are not returned. + +In the *attributePath* parameter, pass the entity attribute whose distinct values you want to get. Only scalar values (text, number, boolean, or date) can be handled. If the *attributePath* leads to an object property that contains values of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. booleans +2. strings +3. numbers +4. dates + +You can use the `[]` notation to designate a collection when *attributePath* is a path within an object (see examples). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `dk diacritical` constant in the *option* parameter. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Examples + +You want to get a collection containing a single element per country name: + +```4d + var $countries : Collection + $countries:=ds.Employee.all().distinct("address.country") +``` + +`nicknames` is a collection and `extra` is an object attribute: + +```4d +$values:=ds.Employee.all().distinct("extra.nicknames[].first") +``` + + + + + + +## .drop() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.drop**( { *mode* : Integer } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mode|Integer|->|`dk stop dropping on first error`: stops method execution on first non-droppable entity| +|Result|4D.EntitySelection|<-|Empty entity selection if successful, else entity selection containing non-droppable entity(ies) +| + + +#### Description + +The `.drop()` function removes the entities belonging to the entity selection from the table related to its dataclass within the datastore. The entity selection remains in memory. + +>Removing entities is permanent and cannot be undone. It is recommended to call this action in a transaction in order to have a rollback option. + +If a locked entity is encountered during the execution of `.drop()`, it is not removed. By default, the method processes all entities of the entity selection and returns non-droppable entities in the entity selection. If you want the method to stop execution at the first encountered non-droppable entity, pass the `dk stop dropping on first error` constant in the *mode* parameter. + +#### Example + +Example without the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop() // $notDropped is an entity selection containing all the not dropped entities + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + +Example with the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop(dk stop dropping on first error) //$notDropped is an entity selection containing the first not dropped entity + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + + + + + + + +## .extract() + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added| + +
    + + +**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
    **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Attribute path whose values must be extracted to the new collection | +|targetPath|Text|->|Target attribute path or attribute name| +|option|Integer|->|`ck keep null`: include null attributes in the returned collection (ignored by default)| +|Result|Collection|<-|Collection containing extracted values| + + +#### Description + +The `.extract()` function returns a collection containing *attributePath* values extracted from the entity selection. + +*attributePath* can refer to: + +* a scalar dataclass attribute, +* related entity, +* related entities. + +If *attributePath* is invalid, an empty collection is returned. + +This function accepts two syntaxes. + +**.extract( attributePath : Text { ; option : Integer } ) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* values of the entity selection. + +By default, entities for which *attributePath* is *null* or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as **null** elements in the returned collection. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as a collection of entities (duplications are kept). +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as a collection of entity selections. + + +**.extract ( attributePath ; targetPath { ; ...attributePathN ; ... targetPathN}) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* properties. Each element of the returned collection is an object with *targetPath* properties filled with the corresponding *attributePath* properties. Null values are kept (*option* parameter is ignored with this syntax). + +If several *attributePath* are given, a *targetPath* must be given for each. Only valid pairs \[*attributePath*, *targetPath*] are extracted. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as an entity. +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as an entity selection. + +> Entities of a collection of entities accessed by \[ ] are not reloaded from the database. + + +#### Example + +Given the following table and relation: + +![](assets/en/API/entityselection.PNG) + +```4d + var $firstnames; $addresses; $mailing; $teachers : Collection + // + // + //$firstnames is a collection of Strings + + + $firstnames:=ds.Teachers.all().extract("firstname") + // + //$addresses is a collection of entities related to dataclass Address + //Null values for address are extracted + $addresses:=ds.Teachers.all().extract("address";ck keep null) + // + // + //$mailing is a collection of objects with properties "who" and "to" + //"who" property content is String type + //"to" property content is entity type (Address dataclass) + $mailing:=ds.Teachers.all().extract("lastname";"who";"address";"to") + // + // + //$mailing is a collection of objects with properties "who" and "city" + //"who" property content is String type + //"city" property content is String type + $mailing:=ds.Teachers.all().extract("lastname";"who";"address.city";"city") + // + //$teachers is a collection of objects with properties "where" and "who" + //"where" property content is String + //"who" property content is an entity selection (Teachers dataclass) + $teachers:=ds.Address.all().extract("city";"where";"teachers";"who") + // + //$teachers is a collection of entity selections + $teachers:=ds.Address.all().extract("teachers") +``` + + + + + + +## .first() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.first()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity|<-|Reference to the first entity of the entity selection (Null if selection is empty)| + + +#### Description + +The `.first()` function returns a reference to the entity in the first position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[0] +``` + +There is, however, a difference between both statements when the selection is empty: + + +```4d + var $entitySel : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySel:=ds.Emp.query("lastName = :1";"Nonexistentname") //no matching entity + //entity selection is then empty + $entity:=$entitySel.first() //returns Null + $entity:=$entitySel[0] //generates an error +``` + +#### Example + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary > :1";100000) + If($entitySelection.length#0) + $entity:=$entitySelection.first() + End if +``` + + + + + + +## .getDataClass() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| + +
    + + +**.getDataClass()** : 4D.DataClass + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.DataClass|<-|Dataclass object to which the entity selection belongs| + + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity selection. + +This function is mainly useful in the context of generic code. + +#### Example + +The following generic code duplicates all entities of the entity selection: + +```4d + //duplicate_entities method + //duplicate_entities($entity_selection) + + #DECLARE ( $entitySelection : 4D.EntitySelection ) + var $dataClass : 4D.DataClass + var $entity; $duplicate : 4D.Entity + var $status : Object + $dataClass:=$entitySelection.getDataClass() + For each($entity;$entitySelection) + $duplicate:=$dataClass.new() + $duplicate.fromObject($entity.toObject()) + $duplicate[$dataClass.getInfo().primaryKey]:=Null //reset the primary key + $status:=$duplicate.save() + End for each +``` + + + + + +## .isAlterable() + +
    History + +|Version|Changes| +|---|---| +|v18 R5|Added| + +
    + + +**.isAlterable()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if the entity selection is alterable, False otherwise| + + +#### Description + +The `.isAlterable()` function returns True if the entity selection is alterable, and False if the entity selection is not alterable. + +For more information, please refer to [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections). + +#### Example + +You are about to display `Form.products` in a [list box](FormObjects/listbox_overview.md) to allow the user to add new products. You want to make sure it is alterable so that the user can add new products without error: + +```4d +If (Not(Form.products.isAlterable())) + Form.products:=Form.products.copy() +End if +... +Form.products.add(Form.product) +``` + + + + + + +## .isOrdered() + +
    History + +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.isOrdered()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if the entity selection is ordered, False otherwise| + + +#### Description + +The `.isOrdered()` function returns True if the entity selection is ordered, and False if it is unordered. + +>This function always returns True when the entity selection comes from a remote datastore. + +For more information, please refer to [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $isOrdered : Boolean + $employees:=ds.Employee.newSelection(dk keep ordered) + $employee:=ds.Employee.get(714) // Gets the entity with primary key 714 + + //In an ordered entity selection, we can add the same entity several times (duplications are kept) + $employees.add($employee) + $employees.add($employee) + $employees.add($employee) + + $isOrdered:=$employees.isOrdered() + If($isOrdered) + ALERT("The entity selection is ordered and contains "+String($employees.length)+" employees") + End if +``` + + + + + + + +## .last() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.last()** : 4D.Entity + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Entity |<-|Reference to the last entity of the entity selection (Null if empty entity selection)| + + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[length-1] +``` + +If the entity selection is empty, the function returns Null. + + +#### Example + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary < :1";50000) + If($entitySelection.length#0) + $entity:=$entitySelection.last() + End if +``` + + + + + + +## .length + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.length** : Integer + + +#### Description + +The `.length` property returns the number of entities in the entity selection. If the entity selection is empty, it returns 0. + +Entity selections always have a `.length` property. + + +#### Example + +```4d + var $vSize : Integer + $vSize:=ds.Employee.query("gender = :1";"male").length + ALERT(String(vSize)+" male employees found.") +``` + + + + + + +## .max() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +|v18 R6|Returns undefined if empty entity selection| + +
    + + +**.max**( *attributePath* : Text ) : any + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Path of the attribute to be used for calculation| +|Result|any|<-|Highest value of attribute| + + +#### Description + +The `.max()` function returns the highest (or maximum) value among all the values of *attributePath* in the entity selection. It actually returns the value of the last entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function. + +If you pass in *attributePath* a path to an object property containing different types of values, the `.max()` function will return the maximum value within the first scalar type in the default 4D type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.max()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + + +#### Example + +We want to find the highest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $maxSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $maxSalary:=$sel.max("salary") +``` + + + + + +## .min() + +
    History +|Version|Changes| +|---|---| +|v17|Added| +|v18 R6|Returns undefined if empty entity selection| + + +
    + + +**.min**( *attributePath* : Text ) : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Path of the attribute to be used for calculation| +|Result|any|<-|Lowest value of attribute| + + +#### Description + +The `.min()` function returns the lowest (or minimum) value among all the values of attributePath in the entity selection. It actually returns the first entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function (excluding **null** values). + +If you pass in *attributePath* a path to an object property containing different types of values, the `.min()` function will return the minimum value within the first scalar value type in the type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.min()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Example + +In this example, we want to find the lowest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $minSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $minSalary:=$sel.min("salary") +``` + + + + + +## .minus() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entity |4D.Entity|->|Entity to substract| +|entitySelection|4D.EntitySelection|->|Entity selection to substract| +|Result|4D.EntitySelection|<-|New entity selection or a new reference on the existing entity selection| + + +#### Description + +The `.minus()` function excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection. + +* If you pass *entity* as parameter, the function creates a new entity selection without *entity* (if *entity* belongs to the entity selection). If *entity* was not included in the original entity selection, a new reference to the entity selection is returned. +* If you pass *entitySelection* as parameter, the function returns an entity selection containing the entities belonging to the original entity selection without the entities belonging to *entitySelection*. + +>You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or both the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName = :1";"H@") + // The $employees entity selection contains the entity with primary key 710 and other entities + // for ex. "Colin Hetrick", "Grady Harness", "Sherlock Holmes" (primary key 710) + + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.minus($employee) //$result contains "Colin Hetrick", "Grady Harness" +``` + + +#### Example 2 + +We want to have a selection of female employees named "Jones" who live in New York : + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2).minus(ds.Employee.query("gender='male'")) +``` + + + + + +## .or() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|entity|4D.Entity|->|Entity to intersect with| +|entitySelection|4D.EntitySelection|->|Entity selection to intersect with| +|Result|4D.EntitySelection|<-|New entity selection or new reference to the original entity selection| + + +#### Description + +The `.or()` function combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator; it returns a new, unordered entity selection that contains all the entities from the entity selection and the parameter. + +* If you pass *entity* as parameter, you compare this entity with the entity selection. If the entity belongs to the entity selection, a new reference to the entity selection is returned. Otherwise, a new entity selection containing the original entity selection and the entity is returned. +* If you pass *entitySelection* as parameter, you compare entity selections. A new entity selection containing the entities belonging to the original entity selection or *entitySelection* is returned (or is not exclusive, entities referenced in both selections are not duplicated in the resulting selection). + +>You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. If the original entity selection is empty, a reference to *entitySelection* or an entity selection containing only *entity* is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + +```4d + var $employees1; $employees2; $result : cs.EmployeeSelection + $employees1:=ds.Employee.query("lastName = :1";"H@") //Returns "Colin Hetrick","Grady Harness" + $employees2:=ds.Employee.query("firstName = :1";"C@") //Returns "Colin Hetrick", "Cath Kidston" + $result:=$employees1.or($employees2) //$result contains "Colin Hetrick", "Grady Harness","Cath Kidston" +``` + +#### Example 2 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // Returns "Colin Hetrick","Grady Harness", "Sherlock Holmes" + $employee:=ds.Employee.get(686) //the entity with primary key 686 does not belong to the $employees entity selection + //It matches the employee "Mary Smith" + + $result:=$employees.or($employee) //$result contains "Colin Hetrick", "Grady Harness", "Sherlock Holmes", "Mary Smith" +``` + + + + + +## .orderBy() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
    **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|pathString |Text |->|Attribute path(s) and sorting instruction(s) for the entity selection| +|pathObjects |Collection |->|Collection of criteria objects| +|Result|4D.EntitySelection|<-|New entity selection in the specified order| + + +#### Description + +The `.orderBy()` function returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria. + +>* This method does not modify the original entity selection. +* For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +You must use a criteria parameter to define how the entities must be sorted. Two different parameters are supported: + +* *pathString* (Text) : This parameter contains a formula made of 1 to x attribute paths and (optionally) sort orders, separated by commas. The syntax is: + +```4d +"attributePath1 {desc or asc}, attributePath2 {desc or asc},..." +``` + +The order in which the attributes are passed determines the sorting priority of the entities. By default, attributes are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* (collection): each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +By default, attributes are sorted in ascending order ("descending" is false). + +You can add as many objects in the criteria collection as necessary. + +>Null values are evaluated as less than other values. + +#### Example + + +```4d +// order by formula + $sortedEntitySelection:=$entitySelection.orderBy("firstName asc, salary desc") + $sortedEntitySelection:=$entitySelection.orderBy("firstName") + + // order by collection with or without sort orders + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"firstName";"descending";False)) + $orderColl.push(New object("propertyPath";"salary";"descending";True)) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) + + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"manager.lastName")) + $orderColl.push(New object("propertyPath";"salary")) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) +``` + + + + + + +## .orderByFormula( ) + +
    History +|Version|Changes| +|---|---| +|v17 R6|Added| + +
    + + +**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
    **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|formulaString|Text|->|Formula string| +|formulaObj|Object|->|Formula object| +|sortOrder |Integer|->|`dk ascending` (default) or `dk descending`| +|settings|Object|->|Parameter(s) for the formula| +|Result|4D.EntitySelection|<-|New ordered entity selection| + + +#### Description + +The `.orderByFormula()` function returns a new, ordered entity selection containing all entities of the entity selection in the order defined through the *formulaString* or *formulaObj* and, optionally, *sortOrder* and *settings* parameters. + +>This function does not modify the original entity selection. + +You can use either a *formulaString* or a *formulaObj* parameter: + +- *formulaString*: you pass a 4D expression such as "Year of(this.birthDate)". +- *formulaObj*: pass a valid formula object created using the `Formula` or `Formula from string` command. + +The *formulaString* or *formulaObj* is executed for each entity of the entity selection and its result is used to define the position of the entity in the returned entity selection. The result must be of a sortable type (boolean, date, number, text, time, null). + +>A null result is always the smallest value. + +By default if you omit the *sortOrder* parameter, the resulting entity selection is sorted in ascending order. Optionnally, you can pass one of the following values in the *sortOrder* parameter: + +|Constant| Value| Comment| +|---|---|---| +|dk ascending| 0 |Ascending sort order (default)| +|dk descending| 1 |Descending sort order| + +Within the *formulaString* or *formulaObj*, the processed entity and thus its attributes are available through the `This` command (for example, `This.lastName`). + +You can pass parameter(s) to the formula using the `args` property (object) of the `settings` parameter: the formula receives the `settings.args` object in $1. + +#### Example 1 + +Sorting students using a formula provided as text: + +```4d + var $es1; $es2 : cs.StudentsSelection + $es1:=ds.Students.query("nationality=:1";"French") + $es2:=$es1.orderByFormula("length(this.lastname)") //ascending by default + $es2:=$es1.orderByFormula("length(this.lastname)";dk descending) +``` + +Same sort order but using a formula object: + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(Length(This.lastname)) + $es2:=$es1.orderByFormula($formula) // ascending by default + $es2:=$es1.orderByFormula($formula;dk descending) +``` + + +#### Example 2 + +A formula is given as a formula object with parameters; `settings.args` object is received as $1 in the ***computeAverage*** method. + +In this example, the "marks" object field in the **Students** dataClass contains students' grades for each subject. A single formula object is used to compute a student's average grade with different coefficients for schoolA and schoolB. + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula; $schoolA; $schoolB : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(computeAverage($1)) + + $schoolA:=New object() //settings object + $schoolA.args:=New object("english";1;"math";1;"history";1) // Coefficients to compute an average + + //Order students according to school A criteria + $es2:=$es1.entitySelection.orderByFormula($formula;$schoolA) + + $schoolB:=New object() //settings object + $schoolB.args:=New object("english";1;"math";2;"history";3) // Coefficients to compute an average + + //Order students according to school B criteria + $es2:=$es1.entitySelection.orderByFormula($formula;dk descending;$schoolB) +``` + +```4d + // + // computeAverage method + // ----------------------------- + #DECLARE ($coefList : Object) -> $result : Integer + var $subject : Text + var $average; $sum : Integer + + $average:=0 + $sum:=0 + + For each($subject;$coefList) + $sum:=$sum+$coefList[$subject] + End for each + + For each($subject;This.marks) + $average:=$average+(This.marks[$subject]*$coefList[$subject]) + End for each + + $result:=$average/$sum +``` + + + + + + +## .query() + +
    History +|Version|Changes| +|---|---| +|v17 R6|Support of Formula parameters| +|v17 R5|Support of placeholders for values| +|v17|Added| + +
    + + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|queryString |Text |-> |Search criteria as string| +|formula |Object |-> |Search criteria as formula object| +|value|any|->|Value(s) to use for indexed placeholder(s)| +|querySettings|Object|->|Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan| +|Result|4D.EntitySelection|<-|New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula*| + +#### Description + +The `.query()` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. + +>This function does not modify the original entity selection. + +If no matching entities are found, an empty `EntitySelection` is returned. + +For detailed information on how to build a query using *queryString*, *value*, and *querySettings* parameters, please refer to the DataClass [`.query()`](DataClassClass.md#query) function description. + +>By default if you omit the **order by** statement in the *queryString*, the returned entity selection is [not ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). Note however that, in Client/Server mode, it behaves like an ordered entity selection (entities are added at the end of the selection). + +#### Example 1 + + +```4d + var $entitySelectionTemp : cs.EmployeeSelection + $entitySelectionTemp:=ds.Employee.query("lastName = :1";"M@") + Form.emps:=$entitySelectionTemp.query("manager.lastName = :1";"S@") +``` + + +#### Example 2 + +More examples of queries can be found in the DataClass [`.query()`](DataClassClass.md#query) page. + +#### See also + +[`.query()`](DataClassClass.md#query) for dataclass + + + + + + +## .queryPath + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.queryPath** : Text + + +#### Description + +The `.queryPath` property contains a detailed description of the query as it was actually performed by 4D. This property is available for `EntitySelection` objects generated through queries if the `"queryPath":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + + + + +## .queryPlan + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.queryPlan** : Text + + +#### Description + +The `.queryPlan` property contains a detailed description of the query just before it is executed (i.e., the planned query). This property is available for `EntitySelection` objects generated through queries if the `"queryPlan":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + + + +## .refresh() + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added| + +
    + + +**.refresh()** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + +#### Description + +>This function only works with a remote datastore (client / server or `Open datastore` connection). + +The `.refresh()` function immediately "invalidates" the entity selection data in the local ORDA cache so that the next time 4D requires the entity selection, it will be reloaded from the database. + +By default, the local ORDA cache is invalidated after 30 seconds. In the context of client / server applications using both ORDA and the classic language, this method allows you to make sure a remote application will always work with the latest data. + +#### Example 1 + +In this example, classic and ORDA code modify the same data simultaneously: + +```4d + //On a 4D remote + + var $selection : cs.StudentsSelection + var $student : cs.StudentsEntity + + $selection:=ds.Students.query("lastname=:1";"Collins") + //The first entity is loaded in the ORDA cache + $student:=$selection.first() + + //Update with classic 4D, ORDA cache is not aware of if + QUERY([Students];[Students]lastname="Collins") + [Students]lastname:="Colin" + SAVE RECORD([Students]) + + //to get the latest version, the ORDA cache must be invalidated + $selection.refresh() + // Even if cache is not expired, the first entity is reloaded from disk + $student:=$selection.first() + + //$student.lastname contains "Colin" +``` + + +#### Example 2 + +A list box displays the Form.students entity selection and several clients work on it. + +```4d +// Form method: + Case of + :(Form event code=On Load) + Form.students:=ds.Students.all() + End case + // + // + // On client #1, the user loads, updates, and saves the first entity + // On client #2, the user loads, updates, and saves the same entity + // + // + // On client #1: + Form.students.refresh() // Invalidates the ORDA cache for the Form.students entity selection + // The list box content is refreshed from the database with update made by client #2 +``` + + + + + + +## .selected() + +
    History +|Version|Changes| +|---|---| +|v19 R3|Added| + +
    + + +**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|selectedEntities |4D.EntitySelection|->|Entity selection with entities for which to know the rank in the entity selection| +|Result|Object|<-|Range(s) of selected entities in entity selection| + + +#### Description + +The `.selected()` function returns an object describing the position(s) of *selectedEntities* in the original entity selection. + +>This function does not modify the original entity selection. + +Pass in the *selectedEntities* parameter an entity selection containing entities for which you want to know the position in the original entity selection. *selectedEntities* must be an entity selection belonging to the same dataclass as the original entity selection, otherwise an error 1587 - "The entity selection comes from an incompatible dataclass" is raised. + +#### Result + +The returned object contains the following properties: + +|Property|Type|Description +|---|---|---| +|ranges|Collection|Collection of range objects| +|ranges[].start|Integer|First entity index in the range| +|ranges[].end|Integer|Last entity index in the range| + +If a `ranges` property contains a single entity, `start` = `end`. Index starts at 0. + +The function returns an empty collection in the `ranges` property if the original entity selection or the *selectedEntities* entity selection is empty. + +#### Example + +```4d +var $invoices; $cashSel; $creditSel : cs.Invoices +var $result1; $result2 : Object + +$invoices:=ds.Invoices.all() + +$cashSelection:=ds.Invoices.query("payment = :1"; "Cash") +$creditSel:=ds.Invoices.query("payment IN :1"; New collection("Cash"; "Credit Card")) + +$result1:=$invoices.selected($cashSelection) +$result2:=$invoices.selected($creditSel) + +//$result1 = {ranges:[{start:0;end:0},{start:3;end:3},{start:6;end:6}]} +//$result2 = {ranges:[{start:0;end:1},{start:3;end:4},{start:6;end:7}]} + +``` + + + + + + + + + + +## .slice() + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|startFrom |Integer |->|Index to start the operation at (included) | +|end |Integer|->|End index (not included)| +|Result|4D.EntitySelection|<-|New entity selection containing sliced entities (shallow copy)| + + +#### Description + +The `.slice()` function returns a portion of an entity selection into a new entity selection, selected from the *startFrom* index to the *end* index (*end* is not included) or to the last entity of the entity selection. This method returns a shallow copy of the entity selection (it uses the same entity references). + +>This function does not modify the original entity selection. + +The returned entity selection contains the entities specified by *startFrom* and all subsequent entities up to, but not including, the entity specified by *end*. If only the *startFrom* parameter is specified, the returned entity selection contains all entities from *startFrom* to the last entity of the original entity selection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the entity selection). If the calculated value < 0, *startFrom* is set to 0. +* If *startFrom >= length*, the function returns an empty entity selection. +* If *end* < 0, it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +If the entity selection contains entities that were dropped in the meantime, they are also returned. + +#### Example 1 + +You want to get a selection of the first 9 entities of the entity selection: + +```4d +var $sel; $sliced : cs.EmployeeSelection +$sel:=ds.Employee.query("salary > :1";50000) +$sliced:=$sel.slice(0;9) // +``` + + +#### Example 2 + +Assuming we have ds.Employee.all().length = 10 + +```4d +var $slice : cs.EmployeeSelection +$slice:=ds.Employee.all().slice(-1;-2) //tries to return entities from index 9 to 8, but since 9 > 8, returns an empty entity selection + +``` + + + + + +## .sum( ) + +
    History +|Version|Changes| +|---|---| +|v17|Added| + + +
    + + +**.sum**( *attributePath* : Text ) : Real + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|attributePath |Text|->|Path of the attribute to be used for calculation| +|Result|Real|<-|Sum of entity selection values| + + +#### Description + + +The `.sum()` function returns the sum for all *attributePath* values in the entity selection. + +`.sum()` returns 0 if the entity selection is empty. + +The sum can only be done on values of number type. If the *attributePath* is an object property, only numerical values are taken into account for the calculation (other value types are ignored). In this case, if *attributePath* leads to a property that does not exist in the object or does not contain any numeric values, `.sum()` returns 0. + +An error is returned if: + +* *attributePath* is not a numerical or an object attribute, +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + + + +#### Example + +```4d +var $sel : cs.EmployeeSelection +var $sum : Real + +$sel:=ds.Employee.query("salary < :1";20000) +$sum:=$sel.sum("salary") +``` + + + + + +## .toCollection( ) + +
    History +|Version|Changes| +|---|---| +|v17|Added| + +
    + + +**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
    **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
    **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection* + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|filterString |Text|->|String with entity attribute path(s) to extract| +|filterCol |Collection|->|Collection of entity attribute path(s) to extract| +|options|Integer|->|`dk with primary key`: adds the primary key
    `dk with stamp`: adds the stamp| +|begin|Integer| ->|Designates the starting index| +|howMany|Integer|->|Number of entities to extract| +|Result|Collection|<-|Collection of objects containing attributes and values of entity selection| + + +#### Description + +The `.toCollection()` function creates and returns a collection where each element is an object containing a set of properties and values corresponding to the attribute names and values for the entity selection. + +If no filter parameter is passed or the first parameter contains an empty string or "*", all the attributes are extracted. Attributes with [kind](DataClassAttributeClass.md#kind) property as "relatedEntity" are extracted with the simple form: an object with property \_\_KEY (primary key). Attributes with kind property as "relatedEntities" are not extracted. + +Or, you can designate the entity attributes to extract using a filter parameter. You can use one of these two filters: + +* *filterString* --a string with property paths separated with commas: "propertyPath1, propertyPath2, ...". +* *filterCol* --a collection of strings containing property paths: \["propertyPath1","propertyPath2",...] + + +If a filter is specified for an attribute of the `relatedEntity` kind: + +* propertyPath = "relatedEntity" -> it is extracted with simple form +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1, relatedEntity.propertyName2, ..." -> only those properties are extracted + + +If a filter is specified for an attribute of the `relatedEntities` kind: + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1, relatedEntities.propertyName2, ..." -> only those properties are extracted + + + +In the *options* parameter, you can pass the `dk with primary key` and/or `dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + +The *begin* parameter allows you to indicate the starting index of the entities to extract. You can pass any value between 0 and entity selection length-1. + +The *howMany* parameter lets you specify the number of entities to extract, starting with the one specified in *begin*. Dropped entities are not returned but are taken into account according to *howMany*. For example, if *howMany*= 3 and there is 1 dropped entity, only 2 entities are extracted. + +If *howMany* > length of the entity selection, the method returns (length - *begin*) objects. + +An empty collection is returned if: + +* the entity selection is empty, or +* *begin* is greater than the length of the entity selection. + + +#### Example 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Example without filter or options parameter: + +```4d + var $employeesCollection : Collection + var $employees : cs.EmployeeSelection + + $employeesCollection:=New collection + $employees:=ds.Employee.all() + $employeesCollection:=$employees.toCollection() +``` + +Returns: + +```4d +[ + { + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + + } + }, + { + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + } +] +``` + +#### Example 2 + +Example with options: + +```4d +var $employeesCollection : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +[ + { + "__KEY": 416, + "__STAMP": 1, + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }, + { + "__KEY": 417, + "__STAMP": 1, + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }] +``` + +#### Example 3 + +Example with slicing and filtering on properties: + +```4d +var $employeesCollection; $filter : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$filter:=New collection +$filter.push("firstName") +$filter.push("lastName") + +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection($filter;0;0;2) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl" + }, + { + "firstName": "Irma", + "lastName": "Durham" + } +] + +``` + + +#### Example 4 + +Example with `relatedEntity` type with simple form: + + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName,lastName,employer") +``` + +returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "__KEY": 20 + } + } + ] +``` + +#### Example 5 + +Example with *filterCol* parameter: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection("firstName";"lastName") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Joanna", + "lastName": "Cabrera" + }, + { + "firstName": "Alexandra", + "lastName": "Coleman" + } +] +``` + +#### Example 6 + +Example with extraction of all properties of a relatedEntity: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection +$coll.push("firstName") +$coll.push("lastName") +$coll.push("employer.*") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + } + ] +``` + +#### Example 7 + +Example with extraction of some properties of a relatedEntity: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, employer.name") +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "name": "India Astral Secretary" + } + }] +``` + +#### Example 8 + +Example with extraction of some properties of `relatedEntities`: + +```4d + var $employeesCollection : Collection + $employeesCollection:=New collection + $employeesCollection:=$employees.toCollection("firstName, lastName, directReports.firstName") +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "firstName": "Gary" + }, + { + "firstName": "Sadie" + }, + { + "firstName": "Christie" + } + ] + }, + { + "firstName": "Gary", + + "lastName": "Reichert", + "directReports": [ + { + "firstName": "Rex" + }, + { + "firstName": "Jenny" + }, + { + "firstName": "Lowell" + } + ] + }] +``` + +#### Example 9 + +Example with extraction of all properties of `relatedEntities`: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, directReports.*") + +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "ID": 425, + "firstName": "Gary", + "lastName": "Reichert", + "salary": 65800, + "birthDate": "1957-12-23T00:00:00.000Z", + "woman": false, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + }, + { + "ID": 426, + "firstName": "Sadie", + "lastName": "Gallant", + "salary": 35200, + "birthDate": "2022-01-03T00:00:00.000Z", + "woman": true, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + } + ] + }, + { + "firstName": "Gary", + "lastName": "Reichert", + "directReports": [ + { + "ID": 428, + "firstName": "Rex", + "lastName": "Chance", + "salary": 71600, + "birthDate": "1968-08-09T00:00:00.000Z", + "woman": false, + + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + }, + { + "ID": 429, + "firstName": "Jenny", + "lastName": "Parks", + "salary": 51300, + "birthDate": "1984-05-25T00:00:00.000Z", + "woman": true, + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + } + ] + } +] +``` + + + + + + + + diff --git a/docs/API/FileClass.md b/docs/API/FileClass.md new file mode 100644 index 00000000000000..cfbb0c8c755a87 --- /dev/null +++ b/docs/API/FileClass.md @@ -0,0 +1,745 @@ +--- +id: FileClass +title: File +--- + +`File` objects are created with the [`File`](#file) command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the `File` command to create a new file, a valid `File` object is created but nothing is actually stored on disk until you call the [`file.create( )`](#create) function. + +### Example + +The following example creates a preferences file in the project folder: + +```code4d +var $created : Boolean +$created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + +### File object + +|| +|---| +|[](#copyto)

        | +|[](#create)

        | +|[](#createalias)

        | +|[](#creationdate)

        | +|[](#creationtime)

        | +|[](#delete)

        | +|[](#exists)

        | +|[](#extension)

        | +|[](#fullname)

        | +|[](#getappinfo)

        | +|[](#getcontent)

    | +|[](#geticon)

        | +|[](#gettext)

        | +|[](#hidden)

        | +|[](#isalias)

         +|[](#isfile)

        | +|[](#isfolder)

        | +|[](#iswritable)

        | +|[](#modificationdate)

        | +|[](#modificationtime)

        | +|[](#moveto)

        | +|[](#name)

        | +|[](#original)

        | +|[](#parent)

        | +|[](#path)

        | +|[](#platformpath)

        | +|[](#rename)

        | +|[](#setappinfo)

        | +|[](#setcontent)

        | +|[](#settext)

        | +|[](#size)

        | + + + +## File + +

    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**File** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
    **File** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|path|Text|->|File path| +|fileConstant|Integer|->|4D file constant| +|pathType|Integer|->|`fk posix path` (default) or `fk platform path`| +|*||->|* to return file of host database| +|Result|4D.File|<-|New file object| + + + +#### Description + +The `File` command creates and returns a new object of the `4D.File` type. The command accepts two syntaxes: + +**File ( path { ; pathType } { ; \* })** + +In the *path* parameter, pass a file path string. You can use a custom string or a filesystem (e.g., "/DATA/myfile.txt"). + +> Only absolute pathnames are supported with the `File` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +|Constant|Value|Comment| +|---|---|---| +|fk platform path|1|Path expressed with a platform-specific syntax (mandatory in case of platform pathname)| +|fk posix path|0|Path expressed with POSIX syntax (default) + +**File ( fileConstant { ; \* } )** + +In the *fileConstant* parameter, pass a 4D built-in or system file, using one of the following constants: + +|Constant|Value|Comment| +|---|---|---| +|Backup history file|19|Backup history file (see Configuration and trace files). Stored in the backup destination folder. | +|Backup log file|13|Current backup journal file. Stored in the application Logs folder.| +|Backup settings file|1|Default backup.4DSettings file (xml format), stored in the Settings folder of the project| +|Backup settings file for data|17|backup.4DSettings file (xml format) for the data file, stored in the Settings folder of the data folder| +|Build application log file|14|Current log file in xml format of the application builder. Stored in the Logs folder. | +|Build application settings file|20|Default settings file of the application builder ("buildApp.4DSettings"). Stored in the Settings folder of the project.| +|Compacting log file|6|Log file of the most recent compacting done with the Compact data file command or the Maintenance and security center. Stored in the Logs folder.| +|Current backup settings file|18|backup.4DSettings file currently used by the application. It can be the backup settings file (default) or a custom user backup settings file defined for the data file| +|Debug log file|12|Log file created by the `SET DATABASE PARAMETER(Debug log recording)` command. Stored in the Logs folder. | +|Diagnostic log file|11|Log file created by the `SET DATABASE PARAMETER(Diagnostic log recording)` command. Stored in the Logs folder. | +|Directory file|16|directory.json file, containing the description of users and groups (if any) for the project application. It can be located either in the user settings folder (default, global to the project), or in the data settings folder (specific to a data file). | +|HTTP debug log file|9|Log file created by the `WEB SET OPTION(Web debug log)` command. Stored in the Logs folder. | +|HTTP log file|8|Log file created by the `WEB SET OPTION(Web log recording)` command. Stored in Logs folder.| +|IMAP Log file|23|Log file created by the `SET DATABASE PARAMETER(IMAP Log)` command. Stored in the Logs folder.| +|Last backup file|2|Last backup file, named \[bkpNum].4BK, stored at a custom location.| +|Last journal integration log file|22|Full pathname of the last journal integration log file (stored in the Logs folder of the restored application), if any. This file is created, in auto-repair mode, as soon as a log file integration occurred| +|Repair log file|7|Log file of database repairs made on the database in the Maintenance and Security Center (MSC). Stored in the Logs folder.| +|Request log file|10|Standard client/server request log file (excluding Web requests) created by the `SET DATABASE PARAMETER(4D Server log recording)` or `SET DATABASE PARAMETER(Client log recording)` commands. If executed on the server, the server log file is returned (stored in the Logs folder on the server). If executed on the client, the client log file is returned (stored in the client local Logs folder). | +|SMTP log file|15|Log file created by the `SET DATABASE PARAMETER(SMTP Log)` command. Stored in the Logs folder. | +|User settings file|3|settings.4DSettings file for all data files, stored in Preferences folder next to structure file if enabled.| +|User settings file for data|4|settings.4DSettings file for current data file, stored in Preferences folder next to the data file.| +|Verification log file|5|Log files created by the `VERIFY CURRENT DATA FILE` and `VERIFY DATA FILE` commands or the Maintenance and Security Center (MSC). Stored in the Logs folder. | + +If the target *fileConstant* does not exist, a null object is returned. No errors are raised. + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.File.new() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added +
    + +**4D.File.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
    **4D.File.new** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + + +#### Description + +The `4D.File.new()` function creates and returns a new object of the `4D.File` type. It is identical to the [`File`](#file) command (shortcut). + +> It is recommended to use the [`File`](#file) shortcut command instead of `4D.File.new()`. + + + + + + + +## .create() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**Not available for ZIP archives** + + + +**.create()** : Boolean + + +|Parameter|Type||Description| +|---|---|---|---| +|Result|Boolean|<-|True if the file was created successfully, false otherwise| + + +#### Description + +The `.create()` function creates a file on disk according to the properties of the `File` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the file already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the file is created successfully; +* **False** if a file with the same name already exists or if an error occured. + +#### Example + +Creation of a preferences file in the database folder: + +```4d + var $created : Boolean + $created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + + + + + + + +## .createAlias() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + + +|Parameter|Type||Description| +|---|---|---|---| +|destinationFolder|4D.Folder|->|Destination folder for the alias or shortcut| +|aliasName|Text|->|Name of the alias or shortcut| +|aliasType|Integer|->|Type of the alias link| +|Result|4D.File|<-|Alias or shortcut file reference| + + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the file with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +|Constant|Value|Comment| +|--------|-----|-------| +|`fk alias link`|0|Alias link (default)| +|`fk symbolic link`|1|Symbolic link (macOS only)| + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Example + +You want to create an alias to a file in your database folder: + +```4d + $myFile:=Folder(fk documents folder).file("Archives/ReadMe.txt") + $aliasFile:=$myFile.createAlias(File("/PACKAGE");"ReadMe") +``` + + + + + + + + + + + + + + + +## .delete() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.delete( )** + + + +|Parameter|Type||Description| +|---|----|---|---| +| | ||Does not require any parameters| + + + +#### Description + +The `.delete()` function deletes the file. + +If the file is currently open, an error is generated. + +If the file does not exist on disk, the function does nothing (no error is generated). + +>**WARNING**: `.delete( )` can delete any file on a disk. This includes documents created with other applications, as well as the applications themselves. `.delete( )` should be used with extreme caution. Deleting a file is a permanent operation and cannot be undone. + +#### Example + +You want to delete a specific file in the database folder: + +```4d + $tempo:=File("/PACKAGE/SpecialPrefs/"+Current user+".prefs") + If($tempo.exists) + $tempo.delete() + ALERT("User preference file deleted.") + End if +``` + + + + + + + + + + + + + + + + + + + +## .getAppInfo() + +
    History +|Version|Changes| +|---|---| +|v19|Added +
    + + +**.getAppInfo**() : Object + + +|Parameter|Type||Description| +|---|---|---|---| +|Result|Object|<-|Contents of .exe/.dll version resource or .plist file| + + + +#### Description + +The `.getAppInfo()` function returns the contents of a **.exe**, **.dll** or **.plist** file information as an object. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function returns an empty object (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +**Returned object with a .exe or .dll file** + +> Reading a .exe or .dll is only possible on Windows. + +All property values are Text. + +|Property|Type| +|---|---| +|InternalName|Text| +|ProductName|Text| +|CompanyName|Text| +|LegalCopyright|Text| +|ProductVersion|Text| +|FileDescription|Text| +|FileVersion|Text| +|OriginalFilename|Text| + +**Returned object with a .plist file** + +The xml file contents is parsed and keys are returned as properties of the object, preserving their types (text, boolean, number). `.plist dict` is returned as a JSON object and `.plist array` is returned as a JSON array. + +#### Example + +```4d + // display copyright info of application .exe file (windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=$exeFile.getAppInfo() +ALERT($info.LegalCopyright) + + // display copyright info of an info.plist (any platform) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=$infoPlistFile.getAppInfo() +ALERT($info.Copyright) +``` + +#### See also + +[.setAppInfo()](#setappinfo) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## .moveTo() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File + + +|Parameter|Type||Description| +|---|----|---|---| +|destinationFolder|4D.Folder|->|Destination folder| +|newName|Text|->|Full name for the moved file| +|Result|4D.File|<-|Moved file| + + + +#### Description + +The `.moveTo()` function moves or renames the `File` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file retains its name when moved. If you want to rename the moved file, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + + +**Returned object** + +The moved `File` object. + +#### Example + + +```4d +$DocFolder:=Folder(fk documents folder) +$myFile:=$DocFolder.file("Current/Infos.txt") +$myFile.moveTo($DocFolder.folder("Archives");"Infos_old.txt") +``` + + + + + + + + + + + + + + + + + + + + + + + + + + +## .rename() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.rename**( *newName* : Text ) : 4D.File + + +|Parameter|Type||Description| +|---|---|---|---| +|newName|Text|->|New full name for the file| +|Result|4D.File|<-|Renamed file| + + +#### Description + +The `.rename()` function renames the file with the name you passed in *newName* and returns the renamed `File` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + +Note that the function modifies the full name of the file, i.e. if you do not pass an extension in *newName*, the file will have a name without an extension. + + +**Returned object** + +The renamed `File` object. + +#### Example + +You want to rename "ReadMe.txt" in "ReadMe_new.txt": + +```4d + $toRename:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + $newName:=$toRename.rename($toRename.name+"_new"+$toRename.extension) +``` + + + + +## .setAppInfo() + +
    History +|Version|Changes| +|---|---| +|v19|Added +
    + + +**.setAppInfo**( *info* : Object ) + + +|Parameter|Type||Description| +|---|---|---|---| +|info|Object|->|Properties to write in .exe/.dll version resource or .plist file| + + + +#### Description + +The `.setAppInfo()` function writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function does nothing (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +***info* parameter object with a .exe or .dll file** + +> Writing a .exe or .dll file information is only possible on Windows. + +Each valid property set in the *info* object parameter is written in the version resource of the .exe or .dll file. Available properties are (any other property will be ignored): + +|Property|Type| +|---|---| +|InternalName|Text| +|ProductName|Text| +|CompanyName|Text| +|LegalCopyright|Text| +|ProductVersion|Text| +|FileDescription|Text| +|FileVersion|Text| +|OriginalFilename|Text| + +If you pass a null or empty text as value, an empty string is written in the property. If you pass a value type different from text, it is stringified. + + +***info* parameter object with a .plist file** + +Each valid property set in the *info* object parameter is written in the .plist file as a key. Any key name is accepted. Value types are preserved when possible. + +If a key set in the *info* parameter is already defined in the .plist file, its value is updated while keeping its original type. Other existing keys in the .plist file are left untouched. + +> To define a Date type value, the format to use is a json timestamp string formated in ISO UTC without milliseconds ("2003-02-01T01:02:03Z") like in the Xcode plist editor. + +#### Example + +```4d + // set copyright and version of a .exe file (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=New object +$info.LegalCopyright:="Copyright 4D 2021" +$info.ProductVersion:="1.0.0" +$exeFile.setAppInfo($info) +``` + +```4d + // set some keys in an info.plist file (all platforms) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=New object +$info.Copyright:="Copyright 4D 2021" //text +$info.ProductVersion:=12 //integer +$info.ShipmentDate:="2021-04-22T06:00:00Z" //timestamp +$infoPlistFile.setAppInfo($info) +``` + +#### See also + +[.getAppInfo()](#getappinfo) + + +## .setContent() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.setContent** ( *content* : Blob ) + + +|Parameter|Type||Description| +|---|---|---|---| +|content|BLOB|->|New contents for the file| + + + +#### Description + +The `.setContent( )` function rewrites the entire content of the file using the data stored in the *content* BLOB. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + + +#### Example + +```4d + $myFile:=Folder(fk documents folder).file("Archives/data.txt") + $myFile.setContent([aTable]aBlobField) +``` + + + + + + + +## .setText() + + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
    **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) + + + +|Parameter|Type||Description| +|---------|----|---|--------| +|text|Text|->|Text to store in the file| +|charSetName|Text|->|Name of character set| +|charSetNum|Integer|->|Number of character set| +|breakMode|Integer|->|Processing mode for line breaks| + +#### Description + +The `.setText()` function writes *text* as the new contents of the file. + +If the file referenced in the `File` object does not exist on the disk, it is created by the function. When the file already exists on the disk, its prior contents are erased, except if it is already open, in which case, its contents are locked and an error is generated. + +In *text*, pass the text to write to the file. It can be a literal ("my text"), or a 4D text field or variable. + +Optionally, you can designate the character set to be used for writing the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If a Byte Order Mark (BOM) exists for the character set, 4D inserts it into the file unless the character set used contains the suffix "-no-bom" (e.g. "UTF-8-no-bom"). If you do not specify a character set, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters before saving them in the file. The following constants, found in the **System Documents** theme, are available: + +|Constant|Value|Comment| +|--------|-----|-------| +|`Document unchanged`|0|No processing| +|`Document with native format`|1|(Default) Line breaks are converted to the native format of the operating system: LF (carriage return) on macOS, CRLF (carriage return + line feed) on Windows| +|`Document with CRLF`|2|Line breaks are converted to CRLF (carriage return + line feed), the default Windows format| +|`Document with CR`|3|Line breaks are converted to CR (carriage return), the default Classic Mac OS format| +|`Document with LF`|4|Line breaks are converted to LF (line feed), the default Unix and macOS format| + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +> **Compatibility Note**: compatibility options are available for EOL and BOM management. See [Compatibility page](https://doc.4d.com/4dv19R/help/title/en/page3239.html) on doc.4d.com. + +#### Example + +```4d +$myFile:=File("C:\\Documents\\Hello.txt";fk platform path) +$myFile.setText("Hello world") +``` + + + + + + + + + + + diff --git a/docs/API/FolderClass.md b/docs/API/FolderClass.md new file mode 100644 index 00000000000000..87e82bded1b0b6 --- /dev/null +++ b/docs/API/FolderClass.md @@ -0,0 +1,488 @@ +--- +id: FolderClass +title: Folder +--- + + + +`Folder` objects are created with the [`Folder`](#folder) command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the `Folder` command to create a new folder, a valid `Folder` object is created but nothing is actually stored on disk until you call the [`folder.create( )`](#create-) function. + +### Example + +The following example creates a "JohnSmith" folder: + +```code4d +Form.curfolder:=Folder(fk database folder) +Form.curfolder:=Folder("C:\\Users\\JohnSmith\\";fk platform path) +``` + +### Folder object + +|| +|---| +|[](#copyto)

        | +|[](#create)

        | +|[](#createalias)

         | +|[](#creationdate)

        | +|[](#creationtime)

        | +|[](#delete)

        | +|[](#exists)

        | +|[](#extension)

        | +|[](#fullname)

        | +|[](#geticon)

        | +|[](#hidden)

        | +|[](#isalias)

        | +|[](#isfile)

        | +|[](#isfolder)

        | +|[](#ispackage)

        | +|[](#modificationdate)

        | +|[](#modificationtime)

        | +|[](#name)

        | +|[](#original)

        | +|[](#parent)

        | +|[](#path)

        | +|[](#platformpath)

        | +|[](#moveto)

        | +|[](#rename)

        | + + + +## Folder + +

    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**Folder** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
    **Folder** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|path|Text|->|Folder path| +|folderConstant|Integer|->|4D folder constant| +|pathType|Integer|->|`fk posix path` (default) or `fk platform path`| +|*||->|* to return folder of host database| +|Result|4D.Folder|<-|New folder object| + + + +#### Description + +The `Folder` command creates and returns a new object of the `4D.Folder` type. The command accepts two syntaxes: + +**Folder ( path { ; pathType } { ; \* } )** + +In the *path* parameter, pass a folder path string. You can use a custom string or a filesystem (e.g., "/DATA"). + +> Only absolute pathnames are supported with the `Folder` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +|Constant|Value|Comment| +|---|---|---| +|fk platform path|1|Path expressed with a platform-specific syntax (mandatory in case of platform pathname)| +|fk posix path|0|Path expressed with POSIX syntax (default) + +**Folder ( folderConstant { ; \* } )** + +In the *folderConstant* parameter, pass a 4D built-in or system folder, using one of the following constants: + +|Constant|Value|Comment| +|---|---|---| +|fk applications folder|116|| +|fk data folder|9|Associated filesystem: "/DATA"| +|fk database folder|4|Associated filesystem: "/PACKAGE"| +|fk desktop folder|115|| +|fk documents folder|117|Document folder of the user| +|fk licenses folder|1|Folder containing the machine's 4D license files| +|fk logs folder|7|Associated filesystem: "/LOGS"| +|fk mobileApps folder|10|Associated filesystem: "/DATA"| +|fk remote database folder|3|4D database folder created on each 4D remote machine| +|fk resources folder|6|Associated filesystem: "/RESOURCES"| +|fk system folder|100|| +|fk user preferences folder|0|4D folder that stores user preference files within the \ directory.| +|fk web root folder|8|Current Web root folder of the database: if within the package "/PACKAGE/path", otherwise full path| + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.Folder.new() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added +
    + +**4D.Folder.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
    **4D.Folder.new** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + + +#### Description + +The `4D.Folder.new()` function creates and returns a new object of the `4D.Folder` type. It is identical to the [`Folder`](#folder) command (shortcut). + +> It is recommended to use the [`Folder`](#folder) shortcut command instead of `4D.Folder.new()`. + + + + + + + +## .create() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + + +**.create()** : Boolean + + +|Parameter|Type||Description| +|---|---|---|---| +|Result|Boolean|<-|True if the folder was created successfully, false otherwise| + + + + +#### Description + +The `.create()` function creates a folder on disk according to the properties of the `Folder` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the folder already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the folder is created successfully; +* **False** if a folder with the same name already exists or if an error occured. + +#### Example 1 + +Create an empty folder in the database folder: + +```4d +var $created : Boolean +$created:=Folder("/PACKAGE/SpecialPrefs").create() +``` + +#### Example 2 + +Creation of the "/Archives2019/January/" folder in the database folder: + +```4d +$newFolder:=Folder("/PACKAGE/Archives2019/January") +If($newFolder.create()) + ALERT("The "+$newFolder.name+" folder was created.") +Else + ALERT("Impossible to create a "+$newFolder.name+" folder.") +End if +``` + + + + + + + +## .createAlias() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + + + +|Parameter|Type||Description| +|---|---|---|---| +|destinationFolder|4D.Folder|->|Destination folder for the alias or shortcut| +|aliasName|Text|->|Name of the alias or shortcut| +|aliasType|Integer|->|Type of the alias link| +|Result|4D.File|<-|Alias or shortcut reference| + + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the folder with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +|Constant|Value|Comment| +|--------|-----|-------| +|`fk alias link`|0|Alias link (default)| +|`fk symbolic link`|1|Symbolic link (macOS only)| + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Example + +You want to create an alias to an archive folder in your database folder: + +```4d +$myFolder:=Folder("C:\\Documents\\Archives\\2019\\January";fk platform path) +$aliasFile:=$myFolder.createAlias(Folder("/PACKAGE");"Jan2019") +``` + + + + + + + + + + + +## .delete() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + + +**.delete**( { *option* : Integer } ) + + + +|Parameter|Type||Description| +|---|----|---|---| +|option |Integer|->|Folder deletion option| + + + + +#### Description + +The `.delete()` function deletes the folder. + +By default, for security reasons, if you omit the option parameter, `.delete( )` only allows empty folders to be deleted. If you want the command to be able to delete folders that are not empty, you must use the option parameter with one of the following constants: + +|Constant| Value| Comment| +|---|---|---| +|`Delete only if empty`| 0| Deletes folder only when it is empty| +|`Delete with contents`| 1| Deletes folder along with everything it contains| + +When `Delete only if empty` is passed or if you omit the option parameter: + +* The folder is only deleted if it is empty; otherwise, the command does nothing and an error -47 is generated. +* If the folder does not exist, the error -120 is generated. + +When `Delete with contents` is passed: + +* The folder, along with all of its contents, is deleted. +**Warning**: Even when this folder and/or its contents are locked or set to read-only, if the current user has suitable access rights, the folder (and contents) is still deleted. +* If this folder, or any of the files it contains, cannot be deleted, deletion is aborted as soon as the first inaccessible element is detected, and an error(*) is returned. In this case, the folder may be only partially deleted. When deletion is aborted, you can use the `GET LAST ERROR STACK` command to retrieve the name and path of the offending file. +* If the folder does not exist, the command does nothing and no error is returned. +(*) Windows: -54 (Attempt to open locked file for writing) +macOS: -45 (The file is locked or the pathname is not correct) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## .moveTo() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder + + +|Parameter|Type||Description| +|---|----|---|---| +|destinationFolder|4D.Folder|->|Destination folder| +|newName|Text|->|Full name for the moved folder| +|Result|4D.Folder|<-|Moved folder| + + + +#### Description + +The `.moveTo( )` function moves or renames the `Folder` object (source folder) into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder retains its name when moved. If you want to rename the moved folder, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +**Returned object** + +The moved `Folder` object. + +#### Example + +You want to move and rename a folder: + +```4d + var $tomove; $moved : Object + $docs:=Folder(fk documents folder) + $tomove:=$docs.folder("Pictures") + $tomove2:=$tomove.moveTo($docs.folder("Archives");"Pic_Archives") +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + +## .rename() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added +
    + + +**.rename**( *newName* : Text ) : 4D.Folder + + + +|Parameter|Type||Description| +|---|---|---|---| +|newName|Text|->|New full name for the folder| +|Result|4D.Folder|<-|Renamed folder| + + + + +#### Description + +The `.rename()` function renames the folder with the name you passed in *newName* and returns the renamed `Folder` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + + +**Returned object** + +The renamed `Folder` object. + +#### Example + + +```4d + var $toRename : 4D.Folder + $toRename:=Folder("/RESOURCES/Pictures").rename("Images") +``` + + + diff --git a/docs/API/FunctionClass.md b/docs/API/FunctionClass.md new file mode 100644 index 00000000000000..cb0e8fad0251ef --- /dev/null +++ b/docs/API/FunctionClass.md @@ -0,0 +1,445 @@ +--- +id: FunctionClass +title: Formula +--- + + + +The [Formula](#formula) and [Formula from string](#formula-from-string) commands allow you to create native [`4D.Function` objects](#about-4dfunction-objects) to execute any 4D expression or code expressed as text. + + +### Formula Objects + +Formula objects can be encapsulated in object properties: + +```4d + var $f : 4D.Function + $f:=New object + $f.message:=Formula(ALERT("Hello world")) +``` + +This property is an "object function", i.e. a function which is bound to its parent object. To execute a function stored in an object property, use the **()** operator after the property name, such as: + +```4d + $f.message() //displays "Hello world" +``` + +Syntax with brackets is also supported: + +```4d + $f["message"]() //displays "Hello world" +``` + +Note that, even if it does not have parameters (see below), an object function 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 + $o:=$f.message //returns the formula object in $o +``` + +You can also execute a function using the [`apply()`](#apply) and [`call()`](#call) functions: + +```4d + $f.message.apply() //displays "Hello world" +``` + +#### Passing parameters + +You can pass parameters to your formulas using the [sequential parameter syntax](Concepts/parameters.md#sequential-parameters) based upon $1, $2...$n. For example, you can write: + +```4d + var $f : Object + $f:=New object + $f.message:=Formula(ALERT("Hello "+$1)) + $f.message("John") //displays "Hello John" +``` + +Or using the [.call()](#call) function: + +```4d + var $f : Object + $f:=Formula($1+" "+$2) + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call(Null;"Welcome to";String(Year of(Current date))) //returns "Welcome to 2019" (for example) +``` + +#### Parameters to a single method + +For more convenience, when the formula is made of a single project method, parameters can be omitted in the formula object initialization. They can just be passed when the formula is called. For example: + +```4d + var $f : 4D.Function + + $f:=Formula(myMethod) + //Writing Formula(myMethod($1;$2)) is not necessary + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call() //returns "How are you?" + + //myMethod + #DECLARE ($param1 : Text; $param2 : Text)->$return : Text + If(Count parameters=2) + $return:=$param1+" "+$param2 + Else + $return:="How are you?" + End if +``` + +Parameters are received within the method, in the order they are specified in the call. + +### About 4D.Function objects + +A `4D.Function` object contains a piece of code that can be executed from an object, either using the `()` operator, or using the [`apply()`](#apply) and [`call()`](#call) functions. 4D proposes three kinds of Function objects: + +- native functions, i.e. built-in functions from various 4D classes such as `collection.sort()` or `file.copyTo()`. +- user functions, created in user [classes](Concepts/classes.md) using the [Function keyword](Concepts/classes.md#function). +- formula functions, i.e. functions that can execute any 4D formula. + + + +### Summary + + +|| +|---| +|[](#apply)

        | +|[](#call)

         | +|[](#source)

         | + + + + +## Formula + +

    History +|Version|Changes| +|---|---| +|v17 R6|Renamed (New formula -> Formula)| +|v17 R3|Added| +
    + + +**Formula** ( *formulaExp* : Expression ) : 4D.Function + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|formulaExp|Expression|->|Formula to be returned as object| +|Result|4D.Function|<-|Native function encapsulating the formula| + + + +#### Description + +The `Formula` command creates a `4D Function` object based upon the *formulaExp* expression. *formulaExp* can be as simple as a single value or complex, such as a project method with parameters. + +Having a formula as an object allows it to be passed as a parameter (calculated attribute) to commands or methods or to be executed from various components without needing to declare them as "shared by components and host database". When called, the formula object is evaluated within the context of the database or component that created it. + +The returned formula can be called with: + +* [`.call()`](#call) or [`.apply()`](#apply) methods, or +* object notation syntax (see [formula object](#formula-object)). + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + $o:=New object("myFormula";$f) + + //three different ways to call the formula + $f.call($o) //returns 3 + $f.apply($o) //returns 3 + $o.myFormula() //returns 3 +``` + +You can pass [parameters](#passing-parameters) to the `Formula`, as seen below in [example 4](#example-4). + +You can specify the object on which the formula is executed, as seen in [example 5](#example-5). The properties of the object can then be accessed via the `This` command. + +If *formulaExp* uses local variables, their values are copied and stored in the returned formula object when it is created. When executed, the formula uses these copied values rather than the current value of the local variables. Note that using arrays as local variables is not supported. + +The object created by `Formula` can be saved, for example, in a database field or in a blob document. + + +#### Example 1 + +A simple formula: + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + + var $o : Object + $o:=New object("f";$f) + + $result:=$o.f() // returns 3 +``` + +#### Example 2 + +A formula using local variables: + +```4d + + + $value:=10 + $o:=New object("f";Formula($value)) + $value:=20 + + $result:=$o.f() // returns 10 +``` + + +#### Example 3 + +A simple formula using parameters: + +```4d + $o:=New object("f";Formula($1+$2)) + $result:=$o.f(10;20) //returns 30 +``` + + +#### Example 4 + +A formula using a project method with parameters: + +```4d + $o:=New object("f";Formula(myMethod)) + $result:=$o.f("param1";"param2") // equivalent to $result:=myMethod("param1";"param2") +``` + + +#### Example 5 + +Using `This`: + +```4d + $o:=New object("fullName";Formula(This.firstName+" "+This.lastName)) + $o.firstName:="John" + $o.lastName:="Smith" + $result:=$o.fullName() //returns "John Smith" +``` + +#### Example 6 + +Calling a formula using object notation: + +```4d + var $feta; $robot : Object + var $calc : 4D.Function + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + //sets the formula to object properties + $feta.calc:=$calc + $robot.calc:=$calc + + //call the formula + $feta.calc() // $feta={name:Feta,price:12.5,quantity:5,total:62.5,calc:"[object Formula]"} + $robot.calc() // $robot={name:Robot,price:543,quantity:2,total:1086,calc:"[object Formula]"} +``` + + + + +## Formula from string + +
    History +|Version|Changes| +|---|---| +|v17 R6|Renamed New formula from string -> Formula from string| +|v17 R3|Added| +
    + + +**Formula from string**( *formulaString* : Text ) : 4D.Function + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|formulaString|Text|->|Text formula to be returned as object| +|Result|4D.Function|<-|Native object encapsulating the formula| + + + +#### Description + +The `Formula from string` command creates a 4D.Function object based upon the *formulaString*. *formulaString* can be as simple as a single value or complex, such as a project method with parameters. + +This command is similar to [`Formula`](#formula), except that it handles a text-based formula. In most cases, it is recommended to use the `Formula` command. `Formula from string` should only be used when the original formula was expressed as text (e.g., stored externally in a JSON file). In this context, using syntax with tokens is highly advised. + +>Because local variable contents can not be accessed by name in compiled mode, they can not be used in *formulaString*. An attempt to access a local variable with `Formula from string` will result in an error (-10737). + + +#### Example + +The following code will create a dialog accepting a formula in text format: + +```4d + var $textFormula : Text + var $f : 4D.Function + $textFormula:=Request("Please type a formula") + If(ok=1) + $f:=Formula from string($textFormula) + ALERT("Result = "+String($f.call())) + End if +``` + +![](assets/en/API/formulaDialog.png) + + +...and execute the formula: + + +![](assets/en/API/formulaAlert.png) + + + + + + + +## .apply() + +
    History +|Version|Changes| +|---|---| +|v17 R3|Added| +
    + + +**.apply**() : any
    **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|thisObj|Object|->|Object to be returned by the This command in the formula| +|formulaParams |Collection|->|Collection of values to be passed as $1...$n when `formula` is executed| +|Result|any|<-|Value from formula execution| + + + +#### Description + +The `.apply()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass a collection to be used as $1...$n parameters in the formula using the optional *formulaParams* parameter. + +Note that `.apply()` is similar to [`.call()`](#call) except that parameters are passed as a collection. This can be useful for passing calculated results. + + +#### Example 1 + +```4d + var $f : 4D.Function + $f:=Formula($1+$2+$3) + + $c:=New collection(10;20;30) + $result:=$f.apply(Null;$c) // returns 60 +``` + + +#### Example 2 + +```4d + var $calc : 4D.Function + var $feta; $robot : Object + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + $calc.apply($feta) // $feta={name:Feta,price:12.5,quantity:5,total:62.5} + $calc.apply($robot) // $robot={name:Robot,price:543,quantity:2,total:1086} +``` + + + + + +## .call() + +
    History +|Version|Changes| +|---|---| +|v17 R3|Added| +
    + + +**.call**() : any
    **.call**( *thisObj* : Object { ; ...*params* : any } ) : any + + +|Parameter|Type||Description| +|---|---|---|---| +|thisObj|Object|->|Object to be returned by the This command in the formula| +|params |any|->|Value(s) to be passed as $1...$n when formula is executed| +|Result|any|<-|Value from formula execution| + + + +#### Description + +The `.call()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass values to be used as *$1...$n* parameters in the formula using the optional *params* parameter(s). + +Note that `.call()` is similar to [`.apply()`](#apply) except that parameters are passed directly. + +#### Example 1 + +```4d + var $f : 4D.Function + $f:=Formula(Uppercase($1)) + $result:=$f.call(Null;"hello") // returns "HELLO" +``` + +#### Example 2 + +```4d + $o:=New object("value";50) + $f:=Formula(This.value*2) + $result:=$f.call($o) // returns 100 +``` + + + + + + +## .source + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.source** : Text + + +#### Description + +The `.source` property contains the source expression of the `formula` as text. + +This property is **read-only**. + +#### Example + +```4d + var $of : 4D.Function + var $tf : Text + $of:=Formula(String(Current time;HH MM AM PM)) + $tf:=$of.source //"String(Current time;HH MM AM PM)" +``` + + + + + + diff --git a/docs/API/IMAPTransporterClass.md b/docs/API/IMAPTransporterClass.md new file mode 100644 index 00000000000000..bbc39432f47e72 --- /dev/null +++ b/docs/API/IMAPTransporterClass.md @@ -0,0 +1,1963 @@ +--- +id: IMAPTransporterClass +title: IMAPTransporter +--- + +The `IMAPTransporter` class allows you to retrieve messages from a IMAP email server. + + +### IMAP Transporter object + +IMAP Transporter objects are instantiated with the [IMAP New transporter](#imap-new-transporter) command. They provide the following properties and functions: + +|| +|---| +|[](#acceptunsecureconnection)

        | +|[](#addflags)

        | +|[](#append)

        | +|[](#authenticationmode)

        | +|[](#checkconnection)

        | +|[](#checkconnectiondelay)

        | +|[](#connectiontimeout)

        | +|[](#copy)

        | +|[](#createbox)

        | +|[](#delete)

        | +|[](#deletebox)

        | +|[](#expunge)

        | +|[](#getboxinfo)

        | +|[](#getboxlist)

        | +|[](#getdelimiter)

        | +|[](#getmail)

        | +|[](#getmails)

        | +|[](#getmimeasblob)

        | +|[](#host)

        | +|[](#logfile)

        | +|[](#move)

        | +|[](#numtoid)

        | +|[](#removeflags)

        | +|[](#renamebox)

        | +|[](#port)

        | +|[](#searchmails)

        | +|[](#selectbox)

        | +|[](#subscribe)

        | +|[](#unsubscribe)

        | +|[](#user)

        | + + + +## IMAP New transporter + +

    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**IMAP New transporter**( *server* : Object ) : 4D.IMAPTransporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|Object|->|Mail server information| +|Result|4D.IMAPTransporter|<-|[IMAP transporter object](#imap-transporter-object)| + + + +#### Description + +The `IMAP New transporter` command configures a new IMAP connection according to the *server* parameter and returns a new *transporter* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + +|*server*|Default value (if omitted)| +|---|---| +|[](#acceptunsecureconnection)

        |False| +|.**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[IMAP transporter](#imap-transporter-object)* object.|none| +|[](#authenticationmode)

        |the most secure authentication mode supported by the server is used| +|[](#checkconnectiondelay)

        |300| +|[](#connectiontimeout)

        |30| +|[](#host)

        |*mandatory* +|[](#logfile)

        |none| +|.**password** : Text

    User password for authentication on the server. Not returned in *[IMAP transporter](#imap-transporter-object)* object.|none| +|[](#port)

        |993| +|[](#user)

        |none| + + +>**Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + +#### Result + +The function returns an [**IMAP transporter object**](#imap-transporter-object). All returned properties are **read-only**. + +>The IMAP connection is automatically closed when the transporter object is destroyed. + +#### Example + +```4d +$server:=New object +$server.host:="imap.gmail.com" //Mandatory +$server.port:=993 +$server.user:="4d@gmail.com" +$server.password:="XXXXXXXX" +$server.logFile:="LogTest.txt" //log to save in the Logs folder + +var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + +$status:=$transporter.checkConnection() +If(Not($status.success)) + ALERT("An error occurred: "+$status.statusText) +End if +``` + + +## 4D.IMAPTransporter.new() + + + +**4D.IMAPTransporter.new**( *server* : Object ) : 4D.IMAPTransporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|Object|->|Mail server information| +|Result|4D.IMAPTransporter|<-|[IMAP transporter object](#imap-transporter-object)| + + +#### Description + +The `4D.IMAPTransporter.new()` function creates and returns a new object of the `4D.IMAPTransporter` type. It is identical to the [`IMAP New transporter`](#imap-new-transporter) command (shortcut). + + + + + +## .addFlags() + +

    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgIDs|Collection|->|Collection of strings: Message unique IDs (text)
    Text: Unique ID of a message
    Longint (IMAP all): All messages in the selected mailbox| +|keywords|Object|->|Keyword flags to add| +|Result|Object|<-|Status of the addFlags operation| + + + +#### Description + +The `.addFlags()` function adds flags to the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + |Constant |Value |Comment| + |---|---|---| + |IMAP all |1 |Select all messages in the selected mailbox| + +The `keywords` parameter lets you pass an object with keyword values for specific flags to add to `msgIDs`. You can pass any of the following keywords: + +|Parameter|Type|Description| +|---|---|---| +|$draft |Boolean |True to add the "draft" flag to the message | +|$seen |Boolean |True to add the "seen" flag to the message| +|$flagged |Boolean |True to add the "flagged" flag to the message| +|$answered |Boolean |True to add the "answered" flag to the message| +|$deleted |Boolean | True to add the "deleted" flag to the message| + +>* False values are ignored. +>* The interpretation of keyword flags may vary per mail client. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as read/seen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.addFlags(IMAP all;$flags) +``` + + + + + +## .append() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mailObj|Object|->|Email object| +|destinationBox|Text|->|Mailbox to receive Email object| +|options|Object|->|Object containing charset info | +|Result|Object|<-|Status of the delete operation| + + + +#### Description + +The `.append()` function appends a `mailObj` to the `destinationBox`. + +In the `mailObj` parameter, pass an Email object. For a comprehensive description of mail properties, see [Email object](emails.html#email-object). The `.append()` function supports keyword tags in the Email object's `keywords` attribute. + +The optional `destinationBox` parameter lets you pass the name of a mailbox where the `mailObj` will be appended. If omitted, the current mailbox is used. + +In the optional `options` parameter, you can pass an object to define the charset and encoding for specific parts of the email. Available properties: + +|Property|Type|Description| +|---|---|---| +|headerCharset|Text|Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values: See possible charsets table below| +|bodyCharset|Text|Charset and encoding used for the html and text body contents of the email. Possible values: See possible charsets table below | + +Possible charsets: + +|Constant|Value|Comment| +|---|---|---| +|mail mode ISO2022JP|US-ASCII_ISO-2022-JP_UTF8_QP|
    • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +|mail mode ISO88591|ISO-8859-1|
    • headerCharset: ISO-8859-1 & Quoted-printable
    • bodyCharset: ISO-8859-1 & 8-bit
    | +|mail mode UTF8|US-ASCII_UTF8_QP|headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)| +|mail mode UTF8 in base64|US-ASCII_UTF8_B64|headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64| + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + +#### Example + +To save an email in the Drafts mailbox: + +```4d +var $settings; $status; $msg; $imap: Object + +$settings:=New object("host"; "domain.com"; "user"; "xxxx"; "password"; "xxxx"; "port"; 993) + +$imap:=IMAP New transporter($settings) + +$msg:=New object +$msg.from:="xxxx@domain.com" +$msg.subject:="Lorem Ipsum" +$msg.textBody:="Lorem ipsum dolor sit amet, consectetur adipiscing elit." +$msg.keywords:=New object +$msg.keywords["$seen"]:=True//flag the message as read +$msg.keywords["$draft"]:=True//flag the message as a draft + +$status:=$imap.append($msg; "Drafts") +``` + + + + + + + + + + + + + + + + + + + + + +## .checkConnectionDelay + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**.checkConnectionDelay** : Integer + + +#### Description + +The `.checkConnectionDelay` property contains the maximum time (in seconds) allowed prior to checking the connection to the server. If this time is exceeded between two method calls, the connection to the server will be checked. By default, if the property has not been set in the *server* object, the value is 300. + +>**Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + + + + + + + +## .copy() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgsIDs|Collection|->|Collection of message unique IDs (strings)| +|allMsgs|Integer|->|`IMAP all`: All messages in the selected mailbox| +|destinationBox|Text|->|Mailbox to receive copied messages| +|Result|Object|<-|Status of the copy operation| + + + +#### Description + +The `.copy()` function copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to copy, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to copy all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the copies of messages will be placed. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + + +#### Example 1 + +To copy a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // copy found messages to the "documents" mailbox + $status:=$transporter.copy($mailIds;"documents") +``` + +#### Example 2 + +To copy all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + + $boxInfo:=$transporter.selectBox("inbox") + + // copy all messages to the "documents" mailbox + $status:=$transporter.copy(IMAP all;"documents") +``` + + + + + +## .createBox() + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.createBox**( *name* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|->|Name of the new mailbox| +|Result|Object|<-|Status of the mailbox creation operation| + + + +#### Description + +The `.createBox()` function creates a mailbox with the given `name`. If the IMAP server’s hierarchy separator character appears elsewhere in the mailbox name, the IMAP server will create any parent names needed to create the given mailbox. + +In other words, an attempt to create "Projects/IMAP/Doc" on a server in which "/" is the hierarchy separator character will create: + +* Only the "Doc" mailbox if "Projects" & "IMAP" already exist. +* "IMAP" & "Doc" mailboxes if only “Projects†already exists. +* "Projects" & “IMAP†& "Doc" mailboxes, if they do not already exist. + +In the `name` parameter, pass the name of the new mailbox. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + + +#### Example + +To create a new “Invoices†mailbox: + + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") +If(OK=1) +$options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$status:=$transporter.createBox("Invoices") + +If ($status.success) +ALERT("Mailbox creation successful!") +Else +ALERT("Error: "+$status.statusText) +End if +End if +``` + + + + + + + + + +## .delete() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.delete**( *msgsIDs* : Collection ) : Object
    **.delete**( *allMsgs* : Integer ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgsIDs|Collection|->|Collection of message unique IDs (strings)| +|allMsgs|Integer|->|`IMAP all`: All messages in the selected mailbox| +|Result|Object|<-|Status of the delete operation| + + + +#### Description + +The `.delete()` function sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs`. + +You can pass: + +- in the `msgsIDs` parameter, a collection containing the unique IDs of the specific messages to delete, or +- in the `allMsgs` parameter, the `IMAP all` constant (integer) to delete all messages in the selected mailbox. + +Executing this function does not actually remove messages. Messages with the "delete" flag can still be found by the [.searchMails()](#searchmails) function. Flagged messages are deleted from the IMAP server with the [`.expunge()`](#expunge) function or by selecting another mailbox or when the [transporter object](#imap-transporter-object) (created with [IMAP New transporter](#imap-new-transporter)) is destroyed. + + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + + +#### Example 1 + +To delete a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"Reports\"") + + // Delete selected messages + $status:=$transporter.delete($mailIds) +``` + +#### Example 2 + +To delete all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Junk Email") + + // delete all messages in the current mailbox + $status:=$transporter.delete(IMAP all) +``` + + + + + +## .deleteBox() + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.deleteBox**( *name* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|->|Name of the mailbox to delete| +|Result|Object|<-|Status of the mailbox deletion operation| + + + +#### Description + +The `.deleteBox()` function permanently removes the mailbox with the given `name` from the IMAP server. Attempting to delete an INBOX or a mailbox that does not exist will generate an error. + +In the `name` parameter, pass the name of the mailbox to delete. + +>* The function cannot delete a mailbox that has child mailboxes if the parent mailbox has the "\Noselect" attribute. +>* All messages in the deleted mailbox will also be deleted. +>* The ability to delete a mailbox depends on the mail server. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + + +#### Example + +To delete the "Nova Orion Industries" child mailbox from the "Bills" mailbox hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// delete mailbox +$name:="Bills"+$transporter.getDelimiter()+"Nova Orion Industries" +$status:=$transporter.deleteBox($name) + +If ($status.success) + ALERT("Mailbox deletion successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + + + +## .expunge() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.expunge()** : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Status of the expunge operation | + + +#### Description + +The `.expunge()` function removes all messages with the "deleted" flag from the IMAP mail server. The "deleted" flag can be set with the [`.delete()`](#delete) or [`.addFlags()`](#addflags) methods. + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object +var $ids : Collection + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Find and delete all seen messages in INBOX +$ids:=$transporter.searchMails("SEEN") +$status:=$transporter.delete($ids) + +// Purge all messages flagged as deleted +$status:=$transporter.expunge() +``` + + + + + +## .getBoxInfo() + +
    History +|Version|Changes| +|---|---| +|v18 R5|name is optional| +|v18 R4|Added| +
    + + +**.getBoxInfo**( { *name* : Text }) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|->|Name of the mailbox| +|Result|Object|<-|boxInfo object| + + + +#### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox *name*. This function returns the same information as [`.selectBox()`](#selectbox) without changing the current mailbox. + +In the optional *name* parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +|Property| Type| Description| +|---|---|---| +|name|text|Name of the mailbox +|mailCount| number| Number of messages in the mailbox| +|mailRecent| number| Number of messages with the "recent" flag (indicating new messages)| + + + +#### Example + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $info:=$transporter.getBoxInfo("INBOX") + ALERT("INBOX contains "+String($info.mailRecent)+" recent emails.") +``` + + + + + + + +## .getBoxList() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +|v19|Add `isSubscribed` parameter| +
    + + +**.getBoxList**( { *parameters* : Object } ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|parameters|Object|->|Parameter object| +|Result|Collection|<-|Collection of mailbox objects| + + + +#### Description + +The `.getBoxList()` function returns a collection of mailboxes describing all of the available mailboxes. This function allows you to locally manage the list of messages located on the IMAP mail server. + +In the optional `parameters` parameter, pass an object containing values to filter the returned mailboxes. You can pass: + +|Property | Type| Description | +|---|---|---| +|isSubscribed| Boolean |
  • **True** to return only subscribed mailboxes
  • **False** to return all available mailboxes
  • | + +#### Result + +Each object of the returned collection contains the following properties: + +|Property| Type|Description | +|---|---|---| +|\[].name|text|Name of the mailbox | +|\[].selectable |boolean |Indicates whether or not the access rights allow the mailbox to be selected:
    • true - the mailbox can be selected
    • false - the mailbox can not be selected
    | +|\[].inferior |boolean |Indicates whether or not the access rights allow creating a lower hierachy in the mailbox:
    • true - a lower level can be created
    • false - a lower level can not be created
    | +|\[].interesting |boolean |Indicates if the mailbox has been marked "interesting" by the server:
    • true - The mailbox has been marked "interesting" by the server. For example, it may contain new messages.
    • false - The mailbox has not been marked "interesting" by the server.
    | + + +If the account does not contain any mailboxes, an empty collection is returned. + +>* If there is no open connection, `.getBoxList()` will open a connection. +>* If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the `.checkConnection( )` function is automatically called. + + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + + + +## .getDelimiter() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**.getDelimiter()** : Text + + +|Parameter|Type||Description| +|-----|--- |:---:|------| +|Result|Text|<-|Hierarchy delimiter character| + + + +#### Description + +The `.getDelimiter()` function returns the character used to delimit levels of hierarchy in the mailbox name. + +The delimiter is a character which can be used to: + +* create lower level (inferior) mailboxes +* search higher or lower within the mailbox hierarchy + + +#### Result + +Mailbox name delimiter character. + + +>* If there is no open connection, `.getDelimiter()` will open a connection. +>* If the connection has not been used since the [designated connection delay](#checkconnectiondelay), the [`.checkConnection()`](#checkconnection) function is automatically called. + + + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + + + +## .getMail() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
    **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|->|Sequence number of the message| +|msgID|Text|->|Unique ID of the message| +|options|Object|->|Message handling instructions| +|Result|Object|<-|[Email object](EmailObjectClass.md#email-object)| + + + +#### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. This function allows you to locally handle the email contents. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *options* parameter allows you pass an object defining additional instructions for handling the message. The following properties are available: + +|Property | Type | Description | +|---|---|---| +|updateSeen|boolean|If True, the message is marked as "seen" in the mailbox. If False, the message is not marked as "seen". Default value: True| +|withBody|boolean | Pass True to return the body of the message. If False, only the message header is returned. Default value: True| + +>* The function generates an error and returns **Null** if *msgID* designates a non-existing message, +>* If no mailbox is selected with the [`.selectBox()`](#selectbox) function, an error is generated, +>* If there is no open connection, `.getMail()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox)`. + + + +#### Result + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object) with the following specific IMAP properties: *id*, *receivedAt*, and *size*. + +#### Example + +You want to get the message with ID = 1: + +```4d + var $server : Object + var $info; $mail; $boxInfo : Variant + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get Email object with ID 1 + $mail:=$transporter.getMail(1) +``` + + + + + + +## .getMails() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
    **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|ids |Collection|->|Collection of message ID| +|startMsg|Integer|->|Sequence number of the first message| +|endMsg |Integer|->|Sequence number of the last message| +|options|Object|->|Message handling instructions| +|Result|Object|<-|Object containing:
    • a collection of [Email objects](EmailObjectClass.md#email-object) and
    • a collection of IDs or numbers for missing messages, if any
    | + + + +#### Description + +The `.getMails()` function returns an object containing a collection of `Email` objects. + +**First Syntax:** + +***.getMails( ids { ; options } ) -> result*** + +The first syntax allows you to retrieve messages based on their IDs. + +In the *ids* parameter, pass a collection of IDs for the messages to return. You can get the IDs with [`.getMail()`](#getmail). + +The optional *options* parameter allows you to define the parts of the messages to be returned. See the **Options** table below for a description of the available properties. + +**Second syntax:** + + ***.getMails( startMsg ; endMsg { ; options } ) -> result*** + +The second syntax allows you to retrieve messages based on a sequential range. The values passed represent the position of the messages in the mailbox. + +In the *startMsg* parameter, pass an *integer* value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an *integer* value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + +The optional *options* parameter allows you to define the parts of the messages to be returned. + +**Options** + +|Property | Type| Description | +|---|---|---| +|updateSeen | Boolean | If True, the specified messages are marked as "seen" in the mailbox. If False, the messages are not marked as "seen". Default value: True | +|withBody | Boolean | Pass True to return the body of the specified messages. If False, only the message headers are returned. Default value: True| + +>* If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated. +>* If there is no open connection, `.getMails()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox). + + +#### Result + +`.getMails()` returns an object containing the following collections: + + +|Property | Type | Description | +|---|---|---| +|list |Collection |Collection of [`Email` objects](EmailObjectClass.md#email-object). If no Email objects are found, an empty collection is returned.| + +|notFound |Collection| Collection of:
    • first syntax - previously passed message IDs that do not exist
    • second syntax - sequence numbers of messages between startMsg and endMsg that do not exist
    An empty collection is returned if all messages are found.| + + +#### Example + +You want to retrieve the 20 most recent emails without changing their "seen" status: + +```4d + var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // retrieve the headers of the last 20 messages without marking them as read + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... + End for each + End if +``` + + + + + + +## .getMIMEAsBlob() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
    **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|-> |Sequence number of the message| +|msgID|Text|-> |Unique ID of the message| +|updateSeen|Boolean|->|If True, the message is marked "seen" in the mailbox. If False the message is left untouched.| +|Result|BLOB|<-|Blob of the MIME string returned from the mail server| + + + + + +#### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *updateSeen* parameter allows you to specify if the message is marked as "seen" in the mailbox. You can pass: + +* **True** - to mark the message as "seen" (indicating the message has been read) +* **False** - to leave the message's "seen" status untouched + + +>* The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, +>* If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated, +>* If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox()`. + + +#### Result + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +#### Example + + +```4d + var $server : Object + var $boxInfo : Variant + var $blob : Blob + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get BLOB + $blob:=$transporter.getMIMEAsBlob(1) +``` + + + + + + + + + + + + + + + +## .move() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgsIDs|Collection|->|Collection of message unique IDs (strings)| +|allMsgs|Integer|->|`IMAP all`: All messages in the selected mailbox| +|destinationBox|Text|->|Mailbox to receive moved messages| +|Result|Object|<-|Status of the move operation| + + + +#### Description + +The `.move()` function moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to move, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to move all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the messages will be moved. + +> This function is only supported by IMAP servers compliant with RFC [8474](https://tools.ietf.org/html/rfc8474). + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + + +#### Example 1 + +To move a selection of messages: + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // Move found messages from the current mailbox to the "documents" mailbox + $status:=$transporter.move($mailIds;"documents") +``` + +#### Example 2 + +To move all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + // move all messages in the current mailbox to the "documents" mailbox + $status:=$transporter.move(IMAP all;"documents") +``` + + + + + + +## .numToID() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection + + +|Parameter|Type||Description| +|-----|--- |:---:|------| +|startMsg|Integer|-> |Sequence number of the first message| +|endMsg|Integer|->|Sequence number of the last message| +|Result|Collection|<-|Collection of unique IDs| + + + +#### Description + +The `.numToID()` function converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg* in the currently selected mailbox. + +In the *startMsg* parameter, pass an integer value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an integer value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + + +#### Result + +The function returns a collection of strings (unique IDs). + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + var $server;$boxInfo;$status : Object + var $mailIds : Collection + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get IDs for 5 last messages received + $mailIds:=$transporter.numToID(($boxInfo.mailCount-5);$boxInfo.mailCount) + + //delete the messages from the current mailbox + $status:=$transporter.delete($mailIds) +``` + + + + + +## .removeFlags() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgIDs|Collection|->|Collection of strings: Message unique IDs (text)
    Text: Unique ID of a message
    Longint (IMAP all): All messages in the selected mailbox| +|keywords|Object|->|Keyword flags to remove| +|Result|Object|<-|Status of the removeFlags operation| + + + +#### Description + +The `.removeFlags()` function removes flags from the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + |Constant |Value |Comment| + |---|---|---| + |IMAP all |1 |Select all messages in the selected mailbox| + +The `keywords` parameter lets you pass an object with keyword values for specific flags to remove from `msgIDs`. You can pass any of the following keywords: + +|Parameter|Type|Description| +|---|---|---| +|$draft |Boolean |True to remove the "draft" flag from the message | +|$seen |Boolean |True to remove the "seen" flag from the message| +|$flagged |Boolean |True to remove the "flagged" flag from the message| +|$answered |Boolean |True to remove the "answered" flag from the message| +|$deleted |Boolean | True to remove the "deleted" flag from the message| + +Note that False values are ignored. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as unseen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.removeFlags(IMAP all;$flags) +``` + + + + + +## .renameBox() + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|currentName|Text|->|Name of the current mailbox| +|newName|Text|->|New mailbox name| +|Result|Object|<-|Status of the renaming operation| + + + +#### Description + +The `.renameBox()` function changes the name of a mailbox on the IMAP server. Attempting to rename a mailbox from a mailbox name that does not exist or to a mailbox name that already exists will generate an error. + +In the `currentName` parameter, pass the name of the mailbox to be renamed. + +Pass the new name for the mailbox in the `newName` parameter. + + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + +#### Example + +To to rename your “Invoices†mailbox to “Billsâ€: + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// rename mailbox +$status:=$transporter.renameBox("Invoices"; "Bills") + +If ($status.success) + ALERT("Mailbox renaming successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + + + + + + +## .searchMails() + +
    History +|Version|Changes| +|---|---| +|v18 R5|Added| +
    + + +**.searchMails**( *searchCriteria* : Text ) : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|searchCriteria|Text|-> |Search criteria| +|Result|Collection|<-|Collection of message numbers| + + + +#### Description + +> This function is based upon the specification for the [IMAP protocol](https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol). + +The `.searchMails()` function searches for messages that match the given *searchCriteria* in the current mailbox. *searchCriteria* consists of one or more search keys. + +*searchCriteria* is a text parameter listing one or more search keys (see [Authorized search-keys](#authorized-search-keys) below) associated or not with values to look for. A search key may be a single or multiple items. For example: + +``` +SearchKey1 = FLAGGED +SearchKey2 = NOT FLAGGED +SearchKey3 = FLAGGED DRAFT +``` + +> Matching is usually not case-sensitive + +- If the *searchCriteria* is a null string, the search will be equivalent to a “select allâ€. +- If the *searchCriteria* includes multiple search keys, the result is the intersection (AND function) of all the messages that match those keys. + +``` +searchCriteria = FLAGGED FROM "SMITH" +``` +... returns all messages with \Flagged flag set AND sent by Smith. +- You can use the **OR** or **NOT** operators as follows: + +``` +searchCriteria = OR SEEN FLAGGED +``` +... returns all messages with \Seen flag set OR \Flagged flag set + +``` +searchCriteria = NOT SEEN +``` +... returns all messages with \Seen flag not set. + +``` +searchCriteria = HEADER CONTENT-TYPE "MIXED" NOT HEADER CONTENT-TYPE "TEXT"... +``` +... returns message whose content-type header contains “Mixed†and does not contain “Textâ€. + +``` +searchCriteria = HEADER CONTENT-TYPE "E" NOT SUBJECT "o" NOT HEADER CONTENT-TYPE "MIXED" +``` +... returns message whose content-type header contains “ e †and whose Subject header does not contain “ o †and whose content-type header is not “ Mixed â€. + +As concerns the last two examples, notice that the result of the search is different when you remove the parentheses of the first search key list. + +- The *searchCriteria* may include the optional \[CHARSET] specification. This consists of the "CHARSET" word followed by a registered \[CHARSET] (US ASCII, ISO-8859). It indicates the charset of the *searchCriteria* string. Therefore, you must convert the *searchCriteria* string into the specified charset if you use the \[CHARSET] specification (see the `CONVERT FROM TEXT` or `Convert to text` commands). +By default, 4D encodes in Quotable Printable the searchCriteria string if it contains extended characters. + +``` +searchCriteria = CHARSET "ISO-8859" BODY "Help" +``` +... means the search criteria uses the charset iso-8859 and the server will have to convert the search criteria before searching, if necessary. + + +#### Search value types + +Search-keys may request the value to search for: + +- **Search-keys with a date value**: the date is a string that must be formatted as follows: *date-day+"-"+date-month+"-"+date-year* where date-day indicates the number of the day of the month (max. 2 characters), date-month indicates the name of the month (Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Dec) and date-year indicates the year (4 characters). +Example: `searchCriteria = SENTBEFORE 1-Feb-2020` (a date does not usually need to be quoted since it does not contain any special characters) + +- **Search-keys with a string value**: the string may contain any character and must be quoted. If the string does not contain any special characters, like the space character for instance, it does not need to be quoted. Quoting such strings will ensure that your string value will be correctly interpreted. +Example: `searchCriteria = FROM "SMITH"` +For all search keys that use strings, a message matches the key if the string is a substring of the field. Matching is not case-sensitive. + +- **Search-keys with a field-name value**: the field-name is the name of a header field. +Example: `searchCriteria = HEADER CONTENT-TYPE "MIXED"` + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. +Example: `searchCriteria = KEYWORD \Flagged \Draft` + +- **Search-keys with a message set value**: Identifies a set of messages. For message sequence numbers, these are consecutive numbers from 1 to the total number of messages in the mailbox. A comma delimits individual numbers; a colon delimits between two numbers inclusive. +Examples: +`2,4:7,9,12:*` is `2,4,5,6,7,9,12,13,14,15` for a mailbox with 15 messages. +`searchCriteria = 1:5 ANSWERED` search in message selection from message sequence number 1 to 5 for messages which have the \Answered flag set. +`searchCriteria= 2,4 ANSWERED` search in the message selection (message numbers 2 and 4) for messages which have the \Answered flag set. + + +#### Authorized search-keys + +**ALL**: All messages in the mailbox. +**ANSWERED**: Messages with the \Answered flag set. +**UNANSWERED**: Messages that do not have the \Answered flag set. +**DELETED**: Messages with the \Deleted flag set. +**UNDELETED**: Messages that do not have the \Deleted flag set. +**DRAFT**: Messages with the \Draft flag set. +**UNDRAFT**: Messages that do not have the \Draft flag set. +**FLAGGED**: Messages with the \Flagged flag set. +**UNFLAGGED**: Messages that do not have the \Flagged flag set. +**RECENT**: Messages that have the \Recent flag set. +**OLD**: Messages that do not have the \Recent flag set. +**SEEN**: Messages that have the \Seen flag set. +**UNSEEN**: Messages that do not have the \Seen flag set. +**NEW**: Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to “(RECENT UNSEEN)â€. +**KEYWORD** : Messages with the specified keyword set. +**UNKEYWORD** : Messages that do not have the specified keyword set. +**BEFORE** : Messages whose internal date is earlier than the specified date. +**ON** : Messages whose internal date is within the specified date. +**SINCE** : Messages whose internal date is within or later than the specified date. +**SENTBEFORE** : Messages whose Date header is earlier than the specified date. +**SENTON** : Messages whose Date header is within the specified date. +**SENTSINCE** : Messages whose Date header is within or later than the specified date. +**TO** : Messages that contain the specified string in the TO header. +**FROM** : Messages that contain the specified string in the FROM header. +**CC** : Messages that contain the specified string in the CC header. +**BCC** : Messages that contain the specified string in the BCC header. +**SUBJECT** : Messages that contain the specified string in the Subject header. +**BODY** : Messages that contain the specified string in the message body. +**TEXT** : Messages that contain the specified string in the header or in the message body. +**HEADER** : Messages that have a header with the specified field-name and that contain the specified string in the field-body. +**UID** : Messages with unique identifiers corresponding to the specified unique identifier set. +**LARGER** : Messages with a size larger than the specified number of bytes. +**SMALLER** : Messages with a size smaller than the specified number of bytes. +**NOT** : Messages that do not match the specified search key. +**OR** : Messages that match either search key. + + + + + + +## .selectBox() + +
    History +|Version|Changes| +|---|---| +|v18 R4|Added| +
    + + +**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|-> |Name of the mailbox| +|state|Integer|->|Mailbox access status| +|Result|Object|<-|boxInfo object| + + + +#### Description + +The `.selectBox()` function selects the `name` mailbox as the current mailbox. This function allows you to retrieve information about the mailbox. + +>To get the information from a mailbox without changing the current mailbox, use [`.getBoxInfo()`](#getboxinfo). + +In the `name` parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + +The optional `state` parameter defines the type of access to the mailbox. The possible values are: + +|Constant| Value| Comment| +|---|---|---| +|IMAP read only state|1|The selected mailbox is accessed with read only privileges. Messages with a "recent" flag (indicating new messages) remain unchanged.| +|IMAP read write state|0|The selected mailbox is accessed with read and write privileges. Messages are considered "seen" and lose the "recent" flag (indicating new messages). (Default value)| + + +>* The function generates an error and returns **Null** if name designates a non-existing mailbox. + +>* If there is no open connection, `.selectBox()` will open a connection. +>* If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the [`.checkConnection()`](#checkconnection) function is automatically called. + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +|Property | Type | Description | +|---|---|---| +|name| Text|Name of the mailbox| +|mailCount|number|Number of messages in the mailbox| +|mailRecent|number|Number of messages with the "recent" flag | + + +#### Example + + +```4d + var $server; $boxinfo : Object + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + $boxInfo:=$transporter.selectBox("INBOX") +``` + + + + + + +## .subscribe() + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.subscribe**( *name* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|-> |Name of the mailbox| +|Result|Object|<-|Status of the subscribe operation| + + + +#### Description + +The `.subscribe()` function allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes. As such, you can choose to narrow down a large list of available mailboxes by subscribing to those you usually want to see. + +In the `name` parameter, pass the name of the mailbox to add (subscribe) to your "subscribed" mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + +#### Example + +To subscribe to the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.subscribe($name) + +If ($status.success) + ALERT("Mailbox subscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + +## .unsubscribe() + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.unsubscribe**( *name* : Text ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|name|Text|-> |Name of the mailbox| +|Result|Object|<-|Status of the unsubscribe operation| + + + +#### Description + +The `.unsubscribe()` function removes a mailbox from a set of subscribed mailboxes. This allows you reduce the number of mailboxes you usually see. + +In the `name` parameter, pass the name of the mailbox to remove (unsubscribe) from your active mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the operation is successful, False otherwise +|statusText || Text|Status message returned by the IMAP server, or last error returned in the 4D error stack | +|errors ||Collection|4D error stack (not returned if a IMAP server response is received)| +| |\[].errcode|Number| 4D error code| +| |\[].message|Text|Description of the 4D error | +| |\[].componentSignature|Text|Signature of the internal component which returned the error| + + + +#### Example + +To unsubscribe from the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.unsubscribe($name) + +If ($status.success) + ALERT("Mailbox unsubscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + + + + diff --git a/docs/API/MailAttachmentClass.md b/docs/API/MailAttachmentClass.md new file mode 100644 index 00000000000000..bd50975666f870 --- /dev/null +++ b/docs/API/MailAttachmentClass.md @@ -0,0 +1,295 @@ +--- +id: MailAttachmentClass +title: MailAttachment +--- + +Attachment objects allow referencing files within a [`Email`](EmailObjectClass.md) object. Attachment objects are created using the [`MAIL New attachment`](#mail-new-attachment) command. + + +### Attachment Object + +Attachment objects provide the following read-only properties and functions: + + +|| +|---| +|[](#cid)

        | +|[](#disposition)

        | +|[](#getcontent)

        | +|[](#name)

        | +|[](#path)

        | +|[](#platformpath)

        | +|[](#type)

        | + + +## MAIL New attachment + +

    History +|Version|Changes| +|---|---| +|v19 R2|Accepts 4D.File, 4D.ZipFile, 4D.Blob +
    + + +**MAIL New attachment**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|file|4D.File|->|Attachment file| +|zipFile|4D.ZipFile|->|Attachment Zipfile| +|blob|4D.Blob|->|BLOB containing the attachment| +|path|Text|->|Path of the attachment file| +|name|Text|->|Name + extension used by the mail client to designate the attachment| +|cid|Text|->|ID of attachment (HTML messages only), or " " if no cid is required| +|type|Text|->|Value of the content-type header| +|disposition|Text|->|Value of the content-disposition header: "inline" or "attachment".| +|Result|4D.MailAttachment|<-|Attachment object| + + + +#### Description + +The `MAIL New attachment` command allows you to create an attachment object that you can add to an [Email object](EmailObjectClass.md#email-object). + +To define the attachment, you can use: + +- a *file*, pass a `4D.File` object containing the attachment file. +- a *zipfile*, pass a `4D.ZipFile` object containing the attachment file. +- a *blob*, pass a `4D.Blob` object containing the attachment itself. +- a *path*, pass a **text** value containing the path of the attachment file, expressed with the system syntax. You can pass a full path name or a simple file name (in which case 4D will search for the file in the same directory as the project file). + +The optional *name* parameter lets you pass the name and extension to be used by the mail client to designate the attachment. If *name* is omitted and: + +* you passed a file path, the name and extension of the file is used, +* you passed a BLOB, a random name without extension is automatically generated. + +The optional *cid* parameter lets you pass an internal ID for the attachment. This ID is the value of the `Content-Id` header, it will be used in HTML messages only. The cid associates the attachment with a reference defined in the message body using an HTML tag such as `\`. This means that the contents of the attachment (e.g., a picture) should be displayed within the message on the mail client. The final result may vary depending on the mail client. You can pass an empty string in *cid* if you do not want to use this parameter. + +You can use the optional *type* parameter to explicitly set the `content-type` of the attachment file. For example, you can pass a string defining a MIME type ("video/mpeg"). This content-type value will be set for the attachment, regardless of its extension. For more information about MIME types, please refer to the [MIME type page on Wikipedia](https://en.wikipedia.org/wiki/MIME). + +By default, if the *type* parameter is omitted or contains an empty string, the `content-type` of the attachment file is based on its extension. The following rules are applied for the main MIME types: + +|Extension| Content Type| +|---|---| +|jpg, jpeg| image/jpeg| +|png| image/png| +|gif| image/gif| +|pdf| application/pdf| +|doc| application/msword| +|xls| application/vnd.ms-excel| +|ppt| application/vnd.ms-powerpoint| +|zip| application/zip| +|gz| application/gzip| +|json| application/json| +|js| application/javascript| +|ps| application/postscript| +|xml| application/xml| +|htm, html| text/html| +|mp3| audio/mpeg| +|*other*| application/octet-stream| + +The optional *disposition* parameter lets you pass the `content-disposition` header of the attachment. You can pass one of the following constants from the "Mail" constant theme: + +|Constant|Value|Comment| +|---|---|---| +|mail disposition attachment|"attachment"|Set the Content-disposition header value to "attachment", which means that the attachment file must be provided as a link in the message.| +|mail disposition inline|"inline"|Set the Content-disposition header value to "inline", which means that the attachment must be rendered within the message contents, at the "cid" location. The rendering depends on the mail client.| + +By default, if the *disposition* parameter is omitted: + +* if the *cid* parameter is used, the `Content-disposition` header is set to "inline", +* if the *cid* parameter is not passed or empty, the `Content-disposition` header is set to "attachment". + +#### Example 1 + +You want to send an email with a user-selected file as an attachment and an image embedded in the HTML body: + +```4d +$doc:=Select document("";"*";"Please select a file to attach";0) +If (OK=1) //If a document was selected + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="test_user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="test_user@mail.com" +$email.to:="test_user@mail.com" +$email.subject:="This is a test message with attachments" + +//add a link to download file +$email.attachments:=New collection(MAIL New attachment(Document)) +//insert an inline picture (use a cid) +$email.attachments[1]:=MAIL New attachment("c:\\Pictures\\4D.jpg";"";"4D") + +$email.htmlBody:=""+\ +"Hello World!"+\ +""+\ +""+\ +""+\ +"" + +$transporter.send($email) //send mail + +End if +``` + +#### Example 2 + +You want to send an email with a 4D Write Pro area as an attachment: + +```4d +C_BLOB($blob) +WP EXPORT VARIABLE(WPArea;$blob;wk docx) + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="user@mail.com" +$email.to:="customer@mail.com" +$email.subject:="New annual report" +$email.textBody:="Please find enclosed our latest annual report." +$email.attachments:=New collection(MAIL New attachment($blob;"Annual report.docx")) + +$transporter.send($email) +``` + + +## 4D.MailAttachment.new() + +
    History +|Version|Changes| +|---|---| +|v19 R2|Accepts 4D.File, 4D.ZipFile, 4D.Blob +
    + + +**4D.MailAttachment.new**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|file|4D.File|->|Attachment file| +|zipFile|4D.ZipFile|->|Attachment Zipfile| +|blob|4D.Blob|->|BLOB containing the attachment| +|path|Text|->|Path of the attachment file| +|name|Text|->|Name + extension used by the mail client to designate the attachment| +|cid|Text|->|ID of attachment (HTML messages only), or " " if no cid is required| +|type|Text|->|Value of the content-type header| +|disposition|Text|->|Value of the content-disposition header: "inline" or "attachment".| +|Result|4D.MailAttachment|<-|Attachment object| + + + +#### Description + +The `4D.MailAttachment.new()` function creates and returns a new object of the `4D.MailAttachment` type. It is identical to the [`MAIL New attachment`](#mail-new-attachment) command (shortcut). + + +## .cid + + +**.cid** : Text + + +#### Description + +The `.cid` property contains the ID of the attachment. This property is used in HTML messages only. If this property is missing, the file is handled as a simple attachment (link). + + +## .disposition + + +**.disposition** : Text + + +#### Description + +The `.disposition` property contains the value of the `Content-Disposition` header. Two values are available: + +* "inline": the attachment is rendered within the message contents, at the "cid" location. The rendering depends on the mail client. +* "attachment": the attachment is provided as a link in the message. + + +## .getContent() + + +**.getContent()** : 4D.Blob + + +|Parameter|Type||Description| +|---|--- |:---:|------| +|Result|4D.Blob|<-|Content of the attachment| + + + +#### Description + +The `.getContent()` function returns the contents of the attachment object in a `4D.Blob` object. You can use this method with attachment objects received by the [`MAIL Convert from MIME`](#mail-convert-from-mime) command. + + + +## .name + + +**.name** : Text + + +#### Description + +The `.name` property contains the name and extension of the attachment. By default, it is the name of the file, unless another name was specified in the [`MAIL New attachment`](#mail-new-attachment) command. + +## .path + + +**.path** : Text + + +#### Description + +The `.path` property contains the POSIX path of the attachment file, if it exists. + + +## .platformPath + +
    History +|Version|Changes| +|---|---| +|v19|Added +
    + + +**.platformPath** : Text + + +#### Description + +The `.platformPath` property returns the path of the attachment file expressed with the current platform syntax. + + +## .type + + +**.type** : Text + + +#### Description + +The `.type` property contains the `content-type` of the attachment file. If this type is not explicitly passed to the [`MAIL New attachment`](#mail-new-attachment) command, the `content-type` is based on its file extension. + + + + diff --git a/docs/API/POP3TransporterClass.md b/docs/API/POP3TransporterClass.md new file mode 100644 index 00000000000000..6d06617cc61e41 --- /dev/null +++ b/docs/API/POP3TransporterClass.md @@ -0,0 +1,562 @@ +--- +id: POP3TransporterClass +title: POP3Transporter +--- + +The `POP3Transporter` class allows you to retrieve messages from a POP3 email server. + + +### POP3 Transporter object + +POP3 Transporter objects are instantiated with the [POP3 New transporter](#pop3-new-transporter) command. They provide the following properties and functions: + + +|| +|---| +|[](#acceptunsecureconnection)

        | +|[](#authenticationmode)

        | +|[](#checkconnection)

        | +|[](#connectiontimeout)

        | +|[](#delete)

        | +|[](#getboxinfo)

        | +|[](#getmail)

        | +|[](#getmailinfo)

        | +|[](#getmailinfolist)

        | +|[](#getmimeasblob)

        | +|[](#host)

        | +|[](#logfile)

        | +|[](#port)

        | +|[](#undeleteall)

        | +|[](#user)

        | + + + + +## POP3 New transporter + +

    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**POP3 New transporter**( *server* : Object ) : 4D.POP3Transporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|object|->|Mail server information| +|Result|4D.POP3Transporter|<-|[POP3 transporter object](#pop3-transporter-object)| + + + +#### Description + +The `POP3 New transporter` command configures a new POP3 connectionaccording to the *server* parameter and returns a new *[POP3 transporter](#pop3-transporter-object)* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + + +|*server*|Default value (if omitted)| +|---|---| +|[](#acceptunsecureconnection)

        |False| +|.**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtptransporterobject)* object.|none| +|[](#authenticationmode)

        |the most secure authentication mode supported by the server is used| +|[](#connectiontimeout)

        |30| +|[](#host)

        |*mandatory* +|[](#logfile)

        |none| +|**.password** : Text

    User password for authentication on the server. Not returned in *[SMTP transporter](#smtptransporterobject)* object.|none| +|[](#port)

        |995| +|[](#user)

        |none| + + +#### Result + +The function returns a [**POP3 transporter object**](#pop3-transporter-object). All returned properties are **read-only**. + + +>The POP3 connection is automatically closed when the transporter object is destroyed. + +#### Example + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + $server.logFile:="LogTest.txt" //log to save in the Logs folder + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + $status:=$transporter.checkConnection() + If(Not($status.success)) + ALERT("An error occurred receiving the mail: "+$status.statusText) + End if +``` + + + +## 4D.POP3Transporter.new() + + + +**4D.POP3Transporter.new**( *server* : Object ) : 4D.POP3Transporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|Object|->|Mail server information| +|Result|4D.POP3Transporter|<-|[POP3 transporter object](#pop3-transporter-object)| + + +#### Description + +The `4D.POP3Transporter.new()` function creates and returns a new object of the `4D.POP3Transporter` type. It is identical to the [`POP3 New transporter`](#pop3-new-transporter) command (shortcut). + + + + + + + + + + + + +#### Example + +```4d + var $pw : Text + var $options : Object + $options:=New object + + $pw:=Request("Please enter your password:") + if(OK=1) + $options.host:="pop3.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=POP3 New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success) + ALERT("POP3 connection check successful!") + Else + ALERT("Error: "+$status.statusText) + End if + End if +``` + + + + + + + +## .delete() + +

    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.delete**( *msgNumber* : Integer ) + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|->|Number of the message to delete| + + + +##### Description + +The `.delete( )` function flags the *msgNumber* email for deletion from the POP3 server. + +In the *msgNumber* parameter, pass the number of the email to delete. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +Executing this method does not actually remove any email. The flagged email will be deleted from the POP3 server only when the `POP3_transporter` object (created with `POP3 New transporter`) is destroyed. The flag could be also be removed using the `.undeleteAll()` method. + +>If the current session unexpectedly terminates and the connection is closed (e.g., timeout, network failure, etc.), an error message is generated and messages marked for deletion will remain on the POP3 server. + +##### Example + +```4d + $mailInfoList:=$POP3_transporter.getMailInfoList() + For each($mailInfo;$mailInfoList) + // Mark your mail as "to be deleted at the end of the session" + $POP3_transporter.delete($mailInfo.number) + End for each + // Force the session closure to delete the mails marked for deletion + CONFIRM("Selected messages will be deleted.";"Delete";"Undo") + If(OK=1) //deletion confirmed + $POP3_transporter:=Null + Else + $POP3_transporter.undeleteAll() //remove deletion flags + End if +``` + + + + +## .getBoxInfo() + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.getBoxInfo()** : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|boxInfo object| + + + +##### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the mailbox. + +The `boxInfo` object returned contains the following properties: + +|Property| Type| Description| +|---|---|---| +|mailCount| Number| Number of messages in the mailbox| +|size| Number| Message size in bytes| + + + +##### Example + +```4d + var $server; $boxinfo : Object + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + //mailbox info + $boxInfo:=$transporter.getBoxInfo() + ALERT("The mailbox contains "+String($boxInfo.mailCount)+" messages.") +``` + + + + +## .getMail() + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.getMail**( *msgNumber* : Integer ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|->|Number of the message in the list | +|Result|Object|<-|[Email object](EmailObjectClass.md#email-object)| + + + +##### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally handle the email contents. + +Pass in *msgNumber* the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) function. + +The method returns Null if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +**Returned object** + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object). + + +##### Example + +You want to know the sender of the first mail of the mailbox: + +```4d + var $server; $transporter : Object + var $mailInfo : Collection + var $sender : Variant + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $sender:=$transporter.getMail($mailInfo[0].number).from +``` + + + + +## .getMailInfo() + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.getMailInfo**( *msgNumber* : Integer ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|->|Number of the message in the list | +|Result|Object|<-|mailInfo object| + + + +##### Description + +The `.getMailInfo()` function returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the email. + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfo) method. + +The `mailInfo` object returned contains the following properties: + +|Property|Type|Description| +|---|---|---| +|size| Number| Message size in bytes| +|id| Text| Unique ID of the message | + +The method returns **Null** if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +##### Example + + +```4d + var $server; $mailInfo : Object + var $mailNumber : Integer + + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + //message info + $mailInfo:=$transporter.getMailInfo(1) //get the first mail + If($mailInfo #Null) + ALERT("First mail size is:"+String($mailInfo.size)+" bytes.") + End if +``` + + + + +## .getMailInfoList() + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.getMailInfoList()** : Collection + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Collection|<-|Collection of `mailInfo` objects| + + + +##### Description + +The `.getMailInfoList()` function returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally manage the list of messages located on the POP3 mail server. + +Each `mailInfo` object in the returned collection contains the following properties: + +|Property| Type| Description| +|---|---|---| +|\[ ].size|Number|Message size in bytes| +|\[ ].number|Number|Message number| +|\[ ].id|Text|Unique ID of the message (useful if you store the message locally)| + +If the mailbox does not contain a message, an empty collection is returned. + + + +#### number and ID properties + +*number* is the number of a message in the mailbox at the time the `POP3_transporter` was created. The *number* property is not a static value in relation to any specific message and will change from session to session dependent on its relation to other messages in the mailbox at the time the session was opened. The numbers assigned to the messages are only valid during the lifetime of the [`POP3_transporter`](#pop3-transporter-object). At the time the `POP3_transporter` is deleted any message marked for deletion will be removed. When the user logs back into the server, the current messages in the mailbox will be renumbered from 1 to x. + +The *id* however is a unique number assigned to the message when it was received by the server. This number is calculated using the time and date that the message is received and is a value assigned by your POP3 server. Unfortunately, POP3 servers do not use the *id* as the primary reference to their messages. Throughout the POP3 sessions you will need to specify the *number* as the reference to messages on the server. Developers may need to take some care if developing solutions which bring references to messages into a database but leave the body of the message on the server. + + +##### Example + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + C_COLLECTION($mailInfo) + C_LONGINT($vNum;$vSize) + + $mailInfo:=$transporter.getMailInfoList() + $vNum:=$mailInfo.length + $vSize:=$mailInfo.sum("size") + + ALERT("The mailbox contains "+String($vNum)+" message(s) for "+String($vSize)+" bytes.") +``` + + + + +## .getMIMEAsBlob() + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added| +
    + + +**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|msgNumber|Integer|-> |Number of the message in the list| +|Result|Blob|<-|Blob of the MIME string returned from the mail server| + + + +##### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object). + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +The method returns an empty BLOB if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete()`. + + +**Returned BLOB** + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +##### Example + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + var $mailInfo : Collection + var $blob : Blob + var $transporter : 4D.POP3Transporter + + $server:=New object + $server.host:="pop.gmail.com" + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $blob:=$transporter.getMIMEAsBlob($mailInfo[0].number) +``` + + + + + + + + + + + + + + + + + + + + + +## .undeleteAll() + +
    History +|Version|Changes| +|---|---| +|v18 R2|Added| +
    + + +**.undeleteAll()** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + + +##### Description + +The `.undeleteAll()` function removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object). + + + + + + + + + + diff --git a/docs/API/SMTPTransporterClass.md b/docs/API/SMTPTransporterClass.md new file mode 100644 index 00000000000000..642b5a983c6db9 --- /dev/null +++ b/docs/API/SMTPTransporterClass.md @@ -0,0 +1,299 @@ +--- +id: SMTPTransporterClass +title: SMTPTransporter +--- +The `SMTPTransporter` class allows you to configure SMTP connections and send emails through *SMTP transporter* objects. + + + +### SMTP Transporter object + +SMTP Transporter objects are instantiated with the [SMTP New transporter](#smtp-new-transporter) command. They provide the following properties and functions: + + +|| +|---| +|[](#acceptunsecureconnection)

        | +|[](#authenticationmode)

        | +|[](#bodycharset)

        | +|[](#checkconnection)

        | +|[](#connectiontimeout)

        | +|[](#headercharset)

        | +|[](#host)

        | +|[](#keepalive)

        | +|[](#logfile)

        | +|[](#port)

        | +|[](#send)

        | +|[](#sendtimeout)

        | +|[](#user)

        | + + + + +## SMTP New transporter + +

    History +|Version|Changes| +|---|---| +|v18|New logFile property| +|v17 R5|New bodyCharset and headerCharset properties| +|v17 R4|Added| +
    + + +**SMTP New transporter**( *server* : Object ) : 4D.SMTPTransporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|Object|->|Mail server information| +|Result|4D.SMTPTransporter|<-|[SMTP transporter object](#smtp-transporter-object)| + + + +#### Description + +The `SMTP New transporter` command configures a new SMTP connection according to the *server* parameter and returns a new *[SMTP transporter](#smtp-transporter-object)* object. The returned transporter object will then usually be used to send emails. + +> This command does not open any connection to the SMTP server. The SMTP connection is actually opened when the [`.send()`](#send) function is executed. +> +>The SMTP connection is automatically closed: +> * when the transporter object is destroyed if the [`keepAlive`](#keepalive) property is true (default), +> * after each [`.send( )`](#send) function execution if the [`keepAlive`](#keepalive) property is set to false. + + + + +In the *server* parameter, pass an object containing the following properties: + +|*server*|Default value (if omitted)| +|---|---| +|[](#acceptunsecureconnection)

        |False| +|.**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtp-transporter-object)* object.|none| +|[](#authenticationmode)

        |the most secure authentication mode supported by the server is used| +|[](#bodycharset)

        |`mail mode UTF8` (US-ASCII_UTF8_QP)| +|[](#connectiontimeout)

        |30| +|[](#headercharset)

        |`mail mode UTF8` (US-ASCII_UTF8_QP)| +|[](#host)

        |*mandatory* +|[](#keepalive)

        |True| +|[](#logfile)

        |none| +|**password** : Text

    User password for authentication on the server. Not returned in *[SMTP transporter](#smtp-transporter-object)* object.|none| +|[](#port)

        |587| +|[](#sendtimeout)

        |100| +|[](#user)

        |none| + + + +#### Result + +The function returns a [**SMTP transporter object**](#smtp-transporter-object). All returned properties are **read-only**. + + +#### Example + +```4d + $server:=New object + $server.host:="smtp.gmail.com" //Mandatory + $server.port:=465 + $server.user:="4D@gmail.com" + $server.password:="XXXX" + $server.logFile:="LogTest.txt" //Extended log to save in the Logs folder + + var $transporter : 4D.SMTPTransporter + $transporter:=SMTP New transporter($server) + + $email:=New object + $email.subject:="my first mail " + $email.from:="4d@gmail.com" + $email.to:="4d@4d.com;test@4d.com" + $email.textBody:="Hello World" + $email.htmlBody:="

    Hello World

    'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'

    \ +

    There are many variations of passages of Lorem Ipsum available."\ + +"The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

    " + + $status:=$transporter.send($email) + If(Not($status.success)) + ALERT("An error occurred sending the mail: "+$status.message) + End if +``` + + + +## 4D.SMTPTransporter.new() + + + +**4D.SMTPTransporter.new**( *server* : Object ) : 4D.SMTPTransporter + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|server|Object|->|Mail server information| +|Result|4D.SMTPTransporter|<-|[SMTP transporter object](#smtp-transporter-object)| + + +#### Description + +The `4D.SMTPTransporter.new()` function creates and returns a new object of the `4D.SMTPTransporter` type. It is identical to the [`SMTP New transporter`](#smtp-new-transporter) command (shortcut). + + + + + + + + + + + + + + + + + + + +For information about SMTP status codes, please refer to [this page](https://www.usps.org/info/smtp_status.html). + +#### Example + +```4d + var $pw : Text + var $options : Object + var $transporter : 4D.SMTPTransporter + $options:=New object + + $pw:=Request("Please enter your password:") + $options.host:="smtp.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=SMTP New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success=True) + ALERT("SMTP connection check successful!") + Else + ALERT("Error # "+String($status.status)+", "+$status.statusText) + End if +``` + + + + + + + + + + + + + + + + + + + + + +## .keepAlive + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added +
    + + +**.keepAlive** : Boolean + + +#### Description + +The `.keepAlive` property contains **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed, and **False** otherwise. By default, if the `keepAlive` property has not been set in the `server` object (used to create the `transporter` object with `SMTP New transporter`), it is **True**. + +The SMTP connection is automatically closed: + +* when the `transporter` object is destroyed if the `.keepAlive` property is true, +* after each `.send( )` function execution if the `.keepAlive` property is set to false. + + + + + + + + + + + + + + + + +## .send() + +
    History +|Version|Changes| +|---|---| +|v17 R5|Support of mime contents| +|v17 R4|Added| +
    + + +**.send**( *mail* : Object ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|mail|Object|->|[Email](EmailObjectClass.md#email-object) to send| +|Result|Object|<-|SMTP status| + + + +#### Description + +The `.send()` function sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object. + +>The `transporter` object must have already been created using the `SMTP New transporter` command. + +The method creates the SMTP connection if it is not already alive. If the `.keepAlive` property of the `transporter` object is **false**, the SMTP connection is automatically closed after the execution of `.send()`, otherwise it stays alive until the `transporter` object is destroyed. For more information, please refer to the [`SMTP New transporter`](#smtp-new-transporter) command description. + +In *mail*, pass a valid [`Email` object](EmailObjectClass.md#email-object) to send. The origination (where the email is coming from) and destination (one or more recipients) properties must be included, the remaining properties are optional. + + +#### Returned object + +The function returns an object describing the SMTP status of the operation. This object can contain the following properties: + +|Property|Type|Description| +|---|---|---| +|success|boolean|True if the send is successful, False otherwise| +|status|number|Status code returned by the SMTP server (0 in case of an issue unrelated to the mail processing)| +|statusText|text|Status message returned by the SMTP server| + +In case of an issue unrelated to the SMTP processing (e.g. a mandatory property is missing in mail), 4D generates an error that you can intercept using a method installed by the `ON ERR CALL` command. Use the `GET LAST ERROR STACK` command for information about the error. + +In this case, the resulting status object contains the following values: + +|Property|Value| +|---|---| +|success|False| +|status|0| +|statusText|"Failed to send email"| + + + + + + + + + + + diff --git a/docs/API/SessionClass.md b/docs/API/SessionClass.md new file mode 100644 index 00000000000000..ede79ab28f79c6 --- /dev/null +++ b/docs/API/SessionClass.md @@ -0,0 +1,407 @@ +--- +id: SessionClass +title: Session +--- + +Session objects are returned by the [`Session`](#session) command when [scalable sessions are enabled in your project](WebServer/sessions.md#enabling-sessions). The Session object is automatically created and maintained by the 4D web server to control the session of a web client (e.g. a browser). This object provides the web developer with an interface to the user session, allowing to manage privileges, store contextual data, share information between processes, and launch session-related preemptive processes. + +For detailed information about the session implementation, please refer to the [web server Sessions](WebServer/sessions.md) section. + +### Summary + + +|| +|---| +|[](#clearprivileges)

        | +|[](#expirationdate)

        | +|[](#hasprivilege)

        | +|[](#idletimeout)

        | +|[](#isguest)

        | +|[](#setprivileges)

        | +|[](#storage)

        | +|[](#username)

        | + + + + +## Session + +

    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**Session** : 4D.Session + + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|4D.Session|<-|Session object| + + + +#### Description + +The `Session` command returns the `Session` object corresponding to the current scalable user web session. + +This command only works when [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions). It returns *Null* when sessions are disabled or when legacy sessions are used. + +When scalable sessions are enabled, the `Session` object is available from any web processes in the following contexts: + +- `On Web Authentication`, `On Web Connection`, and `On REST Authentication` database methods, +- ORDA [Data Model Class functions](ORDA/ordaClasses.md) called with REST requests, +- code processed through 4D tags in semi-dynamic pages (4DTEXT, 4DHTML, 4DEVAL, 4DSCRIPT/, 4DCODE) +- project methods with the "Available through 4D tags and URLs (4DACTION...)" attribute and called through 4DACTION/ urls. + + +#### Example + +You have defined the `action_Session` method with attribute "Available through 4D tags and URLs". You call the method by entering the following URL in your browser: + +``` +IP:port/4DACTION/action_Session +``` + +```4d + //action_Session method + Case of + :(Session#Null) + If(Session.hasPrivilege("WebAdmin")) //calling the hasPrivilege function + WEB SEND TEXT("4DACTION --> Session is WebAdmin") + Else + WEB SEND TEXT("4DACTION --> Session is not WebAdmin") + End if + Else + WEB SEND TEXT("4DACTION --> Sesion is null") + End case +``` + + + + +## .clearPrivileges() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.clearPrivileges()** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + + +#### Description + +The `.clearPrivileges()` function removes all the privileges associated to the session. As a result, the session automatically becomes a Guest session. + + +#### Example + +```4d +//Invalidate a session +var $isGuest : Boolean + +Session.clearPrivileges() +$isGuest:=Session.isGuest() //$isGuest is True +``` + + + + + + +## .expirationDate + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.expirationDate** : Text + +#### Description + +The `.expirationDate` property contains the expiration date and time of the session cookie. The value is expressed as text in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.mmmZ`. + +This property is **read-only**. It is automatically recomputed if the [`.idleTimeout`](#idletimeout) property value is modified. + +#### Example + +```4d +var $expiration : Text +$expiration:=Session.expirationDate //eg "2021-11-05T17:10:42Z" +``` + + + + + + + +## .hasPrivilege() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| +
    + + +**.hasPrivilege**( *privilege* : Text ) : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|privilege|Text|<-|Name of the privilege to verify| +|Result|Boolean|<-|True if session has *privilege*, False otherwise| + + + +#### Description + +The `.hasPrivilege()` function returns True if the privilege is associated to the session, and False otherwise. + + +#### Example + +You want to check if the "WebAdmin" privilege is associated to the session: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page + +End if +``` + + + + +## .idleTimeout + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.idleTimeout** : Integer + +#### Description + +The `.idleTimeout` property contains the inactivity session timeout (in minutes), after which the session is automatically closed by 4D. + +If this property is not set, the default value is 60 (1h). + +When this property is set, the [`.expirationDate`](#expirationdate) property is updated accordingly. + +> The value cannot be less than 60: if a lower value is set, the timeout is raised up to 60. + + +This property is **read write**. + +#### Example + +```4d +If (Session.isGuest()) + // A Guest session will close after 60 minutes of inactivity + Session.idleTimeout:=60 +Else + // Other sessions will close after 120 minutes of inactivity + Session.idleTimeout:=120 +End if + +``` + + + + + +## .isGuest() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.isGuest()** : Boolean + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Boolean|<-|True if session is a Guest one, False otherwise| + + +#### Description + +The `.isGuest()` function returns True if the session is a Guest session (i.e. it has no privileges). + + +#### Example + +In the `On Web Connection` database method: + +```4d +If (Session.isGuest()) + //Do something for Guest user +End if +``` + + + + + + +## .setPrivileges() + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.setPrivileges**( *privilege* : Text )
    **.setPrivileges**( *privileges* : Collection )
    **.setPrivileges**( *settings* : Object ) + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|privilege|Text|->|Privilege name| +|privileges|Collection|->|Collection of privilege names| +|settings|Object|->|Object with a "privileges" property (string or collection)| + + +#### Description + +The `.setPrivileges()` function associates the privilege(s) defined in the parameter to the session. + +- In the *privilege* parameter, pass a string containing a privilege name (or several comma-separated privilege names). + +- In the *privileges* parameter, pass a collection of strings containing privilege names. + +- In the *settings* parameter, pass an object containing the following properties: + +|Property|Type|Description| +|---|---|---| +|privileges|Text or Collection|
  • String containing a privilege name, or
  • Collection of strings containing privilege names
  • | +|userName|Text|User name to associate to the session (optional)| + +If the `privileges` property contains an invalid privilege name, it is ignored. + +> In the current implementation, only the "WebAdmin" privilege is available. + +By default when no privilege is associated to the session, the session is a [Guest session](#isguest). + +The [`userName`](#username) property is available at session object level (read-only). + +#### Example + +In a custom authentication method, you set the "WebAdmin" privilege to the user: + +```4d +var $userOK : Boolean + +... //Authenticate the user + +If ($userOK) //The user has been approved + var $info : Object + $info:=New object() + $info.privileges:=New collection("WebAdmin") + Session.setPrivileges($info) +End if + +``` + + + + + +## .storage + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.storage** : Object + +#### Description + +The `.storage` property contains a shared object that can be used to store information available to all requests of the web client. + +When a `Session` object is created, the `.storage` property is empty. Since it is a shared object, this property will be available in the `Storage` object of the server. + +> Like the `Storage` object of the server, the `.storage` property is always "single": adding a shared object or a shared collection to `.storage` does not create a shared group. + +This property is **read only** itself but it returns a read-write object. + +#### Example + +You want to store the client IP in the `.storage` property. You can write in the `On Web Authentication` database method: + +```4d +If (Session.storage.clientIP=Null) //first access + Use (Session.storage) + Session.storage.clientIP:=New shared object("value"; $clientIP) + End use +End if + +``` + + + + + + + + +## .userName + +
    History +|Version|Changes| +|---|---| +|v18 R6|Added| + +
    + + +**.userName** : Text + +#### Description + +The `.userName` property contains the user name associated to the session. You can use it to identify the user within your code. + +This property is an empty string by default. It can be set using the `privileges` property of the [`setPrivileges()`](#setprivileges) function. + +This property is **read only**. + + + + + + + diff --git a/docs/API/SignalClass.md b/docs/API/SignalClass.md new file mode 100644 index 00000000000000..e1599b35e17571 --- /dev/null +++ b/docs/API/SignalClass.md @@ -0,0 +1,282 @@ +--- +id: SignalClass +title: Signal +--- + +Signals are tools provided by the 4D language to manage interactions and avoid conflicts between processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal. + +> Semaphores can also be used to manage interactions. Semaphores allow you to make sure that two or more processes do not modify the same resource (file, record...) at the same time. Only the process that sets the semaphore can remove it. + + +### Signal Object + +A signal is a shared object that must be passed as a parameter to commands that call or create workers or processes. + +A `4D.Signal` object contains the following built-in methods and properties: + +- [`.wait()`](#wait) +- [`.trigger()`](#trigger) +- [`.signaled`](#signaled) +- [`.description`](#description). + +Any worker/process calling the `.wait()` method will suspend its execution until the `.signaled` property is true. While waiting for a signal, the calling process does not use any CPU. This can be very interesting for performance in multiprocess applications. The `.signaled` property becomes true when any worker/process calls the `.trigger()` method. + +Note that to avoid blocking situations, the `.wait()` can also return after a defined timeout has been reached. + +Signal objects are created with the [New signal](#new-signal) command. + + +### Working with signals + +In 4D, you create a new signal object by calling the [`New signal`](#new-signal) command. Once created, this signal must be passed as a parameter to the `New process` or `CALL WORKER` commands so that they can modify it when they have finished the task you want to wait for. + +- `signal.wait()` must be called from the worker/process that needs another worker/process to finish a task in order to continue. +- `signal.trigger()` must be called from the worker/process that finished its execution in order to release all others. + + +![](assets/en/API/signal.png) + +Once a signal has been released using a `signal.trigger()` call, it cannot be reused again. If you want to set another signal, you need to call the `New signal` command again. + +Since a signal object is a [shared object](Concepts/shared.md), you can use it to return results from called workers/processes, provided that you do not forget to write values within a `Use...End use` structure (see example). + +### Example + +```4d + var $signal : 4D.Signal + + // Creation of a signal + $signal:=New signal + + // call main process and execute OpenForm method + CALL WORKER(1;"OpenForm";$signal) + // do another calculation + ... + // Waiting for the end of the process + $signaled:=$signal.wait() + + // Processing of the results + $calc:=$signal.result+... +``` + +***OpenForm*** method : + +```4d + #DECLARE ($signal : 4D.Signal) + var $form : Object + $form:=New object("value";0) + + // Open the form + $win:=Open form window("Information";Movable form dialog box) + DIALOG("Information";$form) + CLOSE WINDOW($win) + + // Add a new attribute to your $signal shared object to pass your result to the other process: + Use($signal) + $signal.result:=$form.value + End use + + // Trigger the signal to the waiting process + $signal.trigger() +``` + +### Summary + + +|| +|---| +|[](#description)

        | +|[](#signaled)

         | +|[](#trigger)

         | +|[](#wait)

         | + + + + + +## New signal + + +

    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**New signal** { ( *description* : Text ) } : 4D.Signal + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|description|Text|->|Description for the signal| +|Result|4D.Signal|<-|Native object encapsulating the signal| + + + +#### Description + +The `New signal` command creates a `4D.Signal` object. + +A signal is a shared object which can be passed as parameter from a worker or process to another worker or process, so that: + +* the called worker/process can update the signal object after specific processing has completed +* the calling worker/process can stop its execution and wait until the signal is updated, without consuming any CPU resources. + +Optionally, in the *description* parameter you can pass a custom text describing the signal. This text can also be defined after signal creation. + +Since the signal object is a shared object, it can also be used to maintain user properties, including the [`.description`](#description) property, by calling the `Use...End use` structure. + + +**Returned value** + +A new [`4D.Signal` object](#signal-object). + +#### Example + +Here is a typical example of a worker that sets a signal: + +```4d + var $signal : 4D.Signal + $signal:=New signal("This is my first signal") + + CALL WORKER("myworker";"doSomething";$signal) + $signaled:=$signal.wait(1) //wait for 1 second max + + If($signaled) + ALERT("myworker finished the work. Result: "+$signal.myresult) + Else + ALERT("myworker has not finished in less than 1s") + End if +``` + + +The ***doSomething*** method could be like: + +```4d + #DECLARE ($signal : 4D.Signal) + //any processing + //... + Use($signal) + $signal.myresult:=$processingResult //return the result + End use + $signal.trigger() // The work is finished +``` + + + + + +## .description + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.description** : Text + +#### Description + +The `.description` property contains a custom description for the `Signal` object.. + +`.description` can be set at the creation of the signal object or at any moment. Note that since the `Signal` object is a shared object, any write-mode access to the `.description` property must be surrounded by a `Use...End use` structure. + +This property is **read-write**. + + + + + + +## .signaled + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| + +
    + + +**.signaled** : Boolean + +#### Description + +The `.signaled` property contains the current state of the `Signal` object. When the signal is created, `.signaled` is **False**. It becomes **True** when the `.trigger( )` is called on the object. + +This property is **read-only**. + + + + + + +## .trigger() + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.trigger( )** + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +||||Does not require any parameters| + + + +#### Description + +The `.trigger( )` function sets the `signaled` property of the signal object to **true** and awakens all workers or processes waiting for this signal. + +If the signal is already in the signaled state (i.e., the `signaled` property is already **true**), the function does nothing. + + + + + + +## .wait() + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.wait**( { *timeout* : Real } ) : Boolean + + +|Parameter|Type||Description| +|---|---|---|---| +|timeout|Real|->|Maximum waiting time for the signal in seconds| +|Result|Boolean|<-|State of the `.signaled` property| + + + +#### Description + +The `.wait( )` function makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire. + +To prevent blocking code, you can pass a maximum waiting time in seconds in the *timeout* parameter (decimals are accepted). + +>**Warning**: Calling `.wait( )` without a *timeout* in the 4D main process is not recommended because it could freeze the whole 4D application. + +If the signal is already in the signaled state (i.e. the `.signaled` property is already **true**), the function returns immediately, without waiting. + +The function returns the value of the `.signaled` property. Evaluating this value allows knowing if the function returned because the `.trigger( )` has been called (`.signaled` is **true**) or if the *timeout* expired (`.signaled` is **false**). + +>The state of a process that waits for a signal is `Waiting for internal flag`. + + + + + diff --git a/docs/API/Transporter.md b/docs/API/Transporter.md new file mode 100644 index 00000000000000..bd9a47955b1537 --- /dev/null +++ b/docs/API/Transporter.md @@ -0,0 +1,397 @@ +--- +id: Transporter +title: Transporter Class +--- + +## Description + + + +## .acceptUnsecureConnection + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added +
    + + +**.acceptUnsecureConnection** : Boolean + + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + +--- + + +## .authenticationMode + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +|Value|Constants|Comment| +|---|---|---| +|CRAM-MD5|`IMAP authentication CRAM MD5`|Authentication using CRAM-MD5 protocol| +|LOGIN|`IMAP authentication login`|Authentication using LOGIN protocol| +|OAUTH2|`IMAP authentication OAUTH2`|Authentication using OAuth2 protocol| +|PLAIN|`IMAP authentication plain`|Authentication using PLAIN protocol| + + + +--- + + +## .authenticationMode + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +|Value|Constants|Comment| +|---|---|---| +|APOP|`POP3 authentication APOP`|Authentication using APOP protocol (POP3 only)| +|CRAM-MD5|`POP3 authentication CRAM-MD5`|Authentication using CRAM-MD5 protocol| +|LOGIN|`POP3 authentication login`|Authentication using LOGIN protocol| +|OAUTH2|`POP3 authentication OAUTH2`|Authentication using OAuth2 protocol| +|PLAIN|`POP3 authentication plain`|Authentication using PLAIN protocol| + + + +--- + + +## .authenticationMode + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +|Value|Constants|Comment| +|---|---|---| +|CRAM-MD5|`SMTP authentication CRAM MD5`|Authentication using CRAM-MD5 protocol| +|LOGIN|`SMTP authentication login`|Authentication using LOGIN protocol| +|OAUTH2|`SMTP authentication OAUTH2`|Authentication using OAuth2 protocol| +|PLAIN|`SMTP authentication plain`|Authentication using PLAIN protocol| + + + +--- + + +## .bodyCharset + +
    History +|Version|Changes| +|---|---| +|v18|Support for UTF8 base64| +|v17 R5|Added| +
    + + +**.bodyCharset** : Text + + +#### Description + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +|Constant| Value| Comment| +|---|---|---| +|mail mode ISO2022JP| US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +|mail mode ISO88591 |ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +|mail mode UTF8 |US-ASCII_UTF8_QP|*headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)| +|mail mode UTF8 in base64|US-ASCII_UTF8_B64|*headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64| + + + +--- + + + +## .connectionTimeOut + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.connectionTimeOut** : Integer + + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + +--- + + +## .headerCharset + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.headerCharset** : Text + + +#### Description + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +|Constant| Value| Comment| +|---|---|---| +|mail mode ISO2022JP| US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +|mail mode ISO88591 |ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +|mail mode UTF8 |US-ASCII_UTF8_QP|*headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value)| +|mail mode UTF8 in base64| US-ASCII_UTF8_B64|*headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64| + + + +--- + + + +## .host + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.host** : Text + + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + +--- + + +## .logFile + +
    History +|Version|Changes| +|---|---| +|v17 R5|Added| +
    + + +**.logFile** : Text + + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + +--- + + +## .port + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.port** : Integer + + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + +--- + + + +## .sendTimeOut + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added +
    + + +**.sendTimeOut** : Integer + + +#### Description +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + + +--- + + + +## .user + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.user** : Text + + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + +--- + + +## .checkConnection() + +
    History +|Version|Changes| +|---|---| +|v17 R4|Added| +
    + + +**.checkConnection()** : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|Result|Object|<-|Status of the transporter object connection| + + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +|Property||Type|Description| +|---|---|---|---| +|success||boolean|True if the check is successful, False otherwise| +|status||number|(SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing)| +|statusText| |text|Status message returned by the mail server, or last error returned in the 4D error stack| +|errors ||collection|4D error stack (not returned if a mail server response is received)| +||\[ ].errCode|number|4D error code| +||\[ ].message|text|Description of the 4D error| +||\[ ].componentSignature|text|Signature of the internal component which returned the error| + + + + + + + diff --git a/docs/API/WebServerClass.md b/docs/API/WebServerClass.md new file mode 100644 index 00000000000000..390830b98808f7 --- /dev/null +++ b/docs/API/WebServerClass.md @@ -0,0 +1,881 @@ +--- +id: WebServerClass +title: WebServer +--- + + +The `WebServer` class API allows you to start and monitor a web server for the main (host) application as well as each hosted component (see the [Web Server object](WebServer/webServerObject.md) overview). This class is available from the `4D` class store. + + + +### Web Server object + +Web server objects are instantiated with the [`WEB Server`](#web-server) command. + +They provide the following properties and functions: + + +### Summary +|| +|---| +|[](#accesskeydefined)

        | +|[](#certificatefolder)

        | +|[](#characterset)

        | +|[](#ciphersuite)

        | +|[](#corsenabled)

        | +|[](#corssettings)

         | +|[](#debuglog)

        | +|[](#defaulthomepage)

        | +|[](#hstsenabled)

         | +|[](#hstsmaxage)

        | +|[](#httpcompressionlevel)

        | +|[](#httpcompressionthreshold)

        | +|[](#httpenabled)

        | +|[](#httpport)

        | +|[](#httptrace)

        | +|[](#httpsenabled)

        | +|[](#httpsport)

        | +|[](#inactiveprocesstimeout)

        | +|[](#inactivesessiontimeout)

        | +|[](#ipaddresstolisten)

        | +|[](#isrunning)

        | +|[](#keepsession)

        | +|[](#logrecording)

        | +|[](#maxconcurrentprocesses)

        | +|[](#maxrequestsize)

        | +|[](#maxsessions)

        | +|[](#mintlsversion)

        | +|[](#name)

        | +|[](#opensslversion)

        | +|[](#perfectforwardsecrecy)

        | +|[](#rootfolder)

        | +|[](#scalablesession)

        | +[](#sessioncookiedomain)

        | +|[](#sessioncookiename)

        | +|[](#sessioncookiepath)

        | +|[](#sessioncookiesamesite)

        | +|[](#sessionipaddressvalidation)

        | +|[](#start)

        | +|[](#stop)

        | + + + +## WEB Server + +

    History +|Version|Changes| +|---|---| +|v18 R3|Added| +|v19|support for .sessionCookieSameSite| + +
    + + +**WEB Server** : 4D.WebServer
    **WEB Server**( *option* : Integer ) : 4D.WebServer + + + + +|Parameter|Type||Description| +|---|---|----|---| +|option|Integer|->|Web server to get (default if omitted = `Web server database`)| +|Result|4D.WebServer|<-|Web server object| + + + +The `WEB Server` command returns the default Web server object, or the Web server object defined through the *option* parameter. + +By default, if the *option* parameter is omitted, the command returns a reference to the Web server of the database, i.e. the default Web server. To designate the Web server to return, you can pass one of the following constants in the *option* parameter: + +|Constant|Value|Comment| +|---|---|---| +|`Web server database`|1|Current database Web server (default if omitted)| +|`Web server host database`|2|Web server of the host database of a component| +|`Web server receiving request`|3|Web server that received the request (target Web server)| + +The returned Web server object contains the current values of the Web server properties. + +#### Example + +From your component, you want to know if the Web server of the host database is started: + +```4d + // Method of a component + var $hostWS : 4D.WebServer + $hostWS:=WEB Server(Web server host database) + If($hostWS.isRunning) + ... + End if +``` + +## WEB Server list + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added +
    + + +**WEB Server list** : Collection + + + + +|Parameter|Type||Description| +|---|---|----|---| +|Result|Collection|<-|Collection of the available Web server objects| + + + +The `WEB Server list` command returns a collection of all Web server objects available in the 4D application. + +A 4D application can contain anywhere from one to several Web servers: + +- one Web server for the host database (default Web server) +- one Web server for each component. + +All available Web servers are returned by the `WEB Server list` command, whether they are actually running or not. + +> The default Web server object is automatically loaded by 4D at startup. On the other hand, each component Web server that you want to use must be instantiated using the [`WEB Server`](#web-server) command. + +You can use the [.name](#name) property of the Web server object to identify the project or component to which each Web server object in the list is attached. + + +#### Example + +We want to know how many running web servers are available: + +```4d + var $wSList : Collection + var $vRun : Integer + + $wSList:=WEB Server list + $vRun:=$wSList.countValues(True;"isRunning") + ALERT(String($vRun)+" web server(s) running on "+String($wSList.length)+" available.") + +``` + + + + +## .accessKeyDefined + + + +**.accessKeyDefined** : Boolean + + +The **.accessKeyDefined** property contains true if an access key is defined in the settings of the web server. This property is used by the WebAdmin web server to validate the security configuration of the administration interface. + + + + +## .certificateFolder + + + + +**.certificateFolder** : Text + + +Path of the folder where the certificate files are located. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter of the [`.start()`](#start) function, it can be a [`Folder` object](FolderClass.md). + + + + + + +## .characterSet + + + +**.characterSet** : Number
    **.characterSet** : Text + + +The character set that the 4D Web Server should use to communicate with browsers connecting to the application. The default value actually depends on the language of the OS. Can be a MIBEnum integer or a Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets/character-sets.xhtml). Here is the list of identifiers corresponding to the character sets supported by the 4D Web Server: + +* 4 = ISO-8859-1 +* 12 = ISO-8859-9 +* 13 = ISO-8859-10 +* 17 = Shift-JIS +* 2024 = Windows-31J +* 2026 = Big5 +* 38 = euc-kr +* 106 = UTF-8 +* 2250 = Windows-1250 +* 2251 = Windows-1251 +* 2253 = Windows-1253 +* 2255 = Windows-1255 +* 2256 = Windows-1256 + + + + + + +## .cipherSuite + + + +**.cipherSuite** : Text + + +The cipher list used for the secure protocol. Sets the priority of ciphering algorithms implemented by the 4D web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + + + + + + + +## .CORSEnabled + + +**.CORSEnabled** : Boolean + + +The CORS (*Cross-origin resource sharing*) service status for the web server. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled (True), XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see `CORSSettings` below). When disabled (False, default), all cross site requests sent with CORS are ignored. When enabled (True) and a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +Default: False (disabled) + +For more information about CORS, please refer to the [Cross-origin resource sharing page](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + + + + + + +## .CORSSettings + + + +**.CORSSettings** : Collection + + +A list of allowed hosts and methods for the CORS service (see [`CORSEnabled`](#corsenabled) property). Each object must contain a **host** property and, optionally, a **methods** property: + +* **host** (text, mandatory): Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. If *host* is not present or empty, the object is ignored. Several syntaxes are supported: + - 192.168.5.17:8081 + - 192.168.5.17 + - 192.168.* + - 192.168.*:8081 + - http://192.168.5.17:8081 + - http://*.myDomain.com + - http://myProject.myDomain.com + - *.myDomain.com + - myProject.myDomain.com + - \* + +* **methods** (text, optional): Accepted HTTP method(s) for the corresponding CORS host. Separate each method with a ";" (e,g,: "post;get"). If *methods* is empty, null, or undefined, all methods are enabled. + + + + + + +## .debugLog + + + +**.debugLog** : Number + + +The status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). + +* 0 = disabled +* 1 = enabled without body parts (body size is provided in this case) +* 3 = enabled with body parts in response only +* 5 = enabled with body parts in request only +* 7 = enabled with body parts in response and request + + + + + + +## .defaultHomepage + + + +**.defaultHomepage** : Text + + +The name of the default home page or "" to not send the custom home page. + + + + + + +## .HSTSEnabled + + +**.HSTSEnabled** : Boolean + + +The HTTP Strict Transport Security (HSTS) status. HSTS allows the Web server to declare that browsers should only interact with it via secure HTTPS connections. Browsers will record the HSTS information the first time they receive a response from the web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the `HSTSMaxAge` property. HSTS requires that HTTPS is enabled on the server. HTTP must also be enabled to allow initial client connections. + + + + + + +## .HSTSMaxAge + + +**.HSTSMaxAge** : Number + + +The maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. + +Default value: 63072000 (2 years). + + + + + + +## .HTTPCompressionLevel + + +**.HTTPCompressionLevel** : Number + + +The compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). + +Possible values: + +* 1 to 9 (where 1 is the fastest compression and 9 the highest). +* -1 = set a compromise between speed and rate of compression. + +Default = 1 (faster compression). + + + + + + +## .HTTPCompressionThreshold + + +**.HTTPCompressionThreshold** : Number + + +The size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Default compression threshold = 1024 bytes + + + + + + +## .HTTPEnabled + + + +**.HTTPEnabled** : Boolean + + +The HTTP protocol state. + + + + + + + +## .HTTPPort + + + +**.HTTPPort** : Number + + +The listening IP port number for HTTP. + +Default = 80 + + + + + + +## .HTTPTrace + + +**.HTTPTrace** : Boolean + + +The activation of `HTTP TRACE`. For security reasons, by default the Web server rejects `HTTP TRACE` requests with an error 405. When enabled, the web server replies to `HTTP TRACE` requests with the request line, header, and body. + + + + + + +## .HTTPSEnabled + + + +**.HTTPSEnabled** : Boolean + +The HTTPS protocol state. + + + + + + +## .HTTPSPort + + + +**.HTTPSPort** : Number + +The listening IP port number for HTTPS. + +Default = 443 + + + + + + +## .inactiveProcessTimeout + + +**.inactiveProcessTimeout** : Number + +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of the inactive legacy session processes. At the end of the timeout, the process is killed on the server, the `On Web Legacy Close Session` database method is called, then the legacy session context is destroyed. + +Default = 480 minutes + + + + + + +## .inactiveSessionTimeout + + +**.inactiveSessionTimeout** : Number + +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of inactive legacy sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default = 480 minutes + + + + + + +## .IPAddressToListen + + + +**.IPAddressToListen** : Text + + +The IP address on which the 4D Web Server will receive HTTP requests. By default, no specific address is defined. Both IPv6 string formats and IPv4 string formats are supported. + + + + + + + +## .isRunning + + + +**.isRunning** : Boolean + + +*Read-only property* + +The web server running state. + + + + + + +## .keepSession + + +**.keepSession** : Boolean + + +True if legacy sessions are enabled in the web server, False otherwise. + +##### See also: +[.scalableSession](#scalablesession) + + + + + + +## .logRecording + + + +**.logRecording** : Number + + +The log requests (logweb.txt) recording value. + +* 0 = Do not record (default) +* 1 = Record in CLF format +* 2 = Record in DLF format +* 3 = Record in ELF format +* 4 = Record in WLF format + + + + + + +## .maxConcurrentProcesses + + + +**.maxConcurrentProcesses** : Number + + +The maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. + +Possible values: 10 - 32000 + +Default = 100 + + + + + + +## .maxRequestSize + + + +**.maxRequestSize** : Number + + +The maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process. Passing the maximum value (2147483647) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. + +Possible values: 500000 - 2147483647 + + + + + + +## .maxSessions + + +**.maxSessions** : Number + +> This property is not returned in [scalable sessions mode](#scalablesession). + +The maximum number of simultaneous legacy sessions. When you reach the limit, the oldest legacy session is closed (and `On Web Legacy Close Session` database method is called) if the web server needs to create a new one. The number of simultaneous legacy sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default) + + + + + + +## .minTLSVersion + + +**.minTLSVersion** : Number + + +The minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +* 1 = TLSv1_0 +* 2 = TLSv1_1 +* 3 = TLSv1_2 (default) +* 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + + + + + + +## .name + + + +**.name** : Text + + +*Read-only property* + +The name of the web server application. + + + + + + + +## .openSSLVersion + + +**.openSSLVersion** : Text + + +*Read-only property* + +The version of the OpenSSL library used. + + + + + + +## .perfectForwardSecrecy + + + +**.perfectForwardSecrecy** : Boolean + + +*Read-only property* + +The PFS availability on the server. + + + + + +## .rootFolder + + + +**.rootFolder** : Text + + +The path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object. + + + + +## .scalableSession + + + +**.scalableSession** : Boolean + + +True if scalable sessions are used in the web server, and False otherwise. + +##### See also: +[.keepSession](#keepsession) + + + + +## .sessionCookieDomain + + + +**.sessionCookieDomain** : Text + + +The "domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + + + + + +## .sessionCookieName + + + +**.sessionCookieName** : Text + + +The name of the cookie used for storing the session ID. + +*Read-only property* + + + + + + +## .sessionCookiePath + + + +**.sessionCookiePath** : Text + + +The "path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + + + + + +## .sessionCookieSameSite + +
    History +|Version|Changes| +|---|---| +|v19|Added| +
    + + +**.sessionCookieSameSite** : Text + + +The "SameSite" session cookie value. Possible values (using constants): + +|Constant|Value|Description| +|---|---|---| +|Web SameSite Strict|"Strict"|*Default value* - Cookies are only sent in a first-party context| +|Web SameSite Lax|"Lax"|Cookies are also sent on cross-site subrequests but only when a user is navigating to the origin site (i.e. when following a link).| +|Web SameSite None|"None"|Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. + +See the [Session Cookie SameSite](WebServer/webServerConfig.md#session-cookie-samesite) description for detailed information. + + + + + + +## .sessionIPAddressValidation + + + +**.sessionIPAddressValidation** : Boolean + + +The IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between WiFi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change (this setting lowers the security level of your application). + + + + + + +## .start() + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added +
    + + + +**.start**() : Object
    **.start**( *settings* : Object ) : Object + + + + + +|Parameter|Type||Description| +|---|---|----|---| +|settings|Object|->|Web server settings to set at startup| +|Result|Object|<-|Status of the web server startup| + + + +The `.start()` function starts the web server on which it is applied, using properties set in the optional *settings* object parameter. + +The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session. + +All settings of [Web Server objects](#web-server-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName(#sessioncookiename)]). + +Customized session settings will be reset when the [`.stop()`](#stop) function is called. + + +#### Returned object + +The function returns an object describing the Web server launch status. This object can contain the following properties: + +|Property|| Type| Description| +|---|---|---|---| +|success||Boolean|True if the web server was correctly started, False otherwise +|errors ||Collection|4D error stack (not returned if the web server started successfully)| +||\[].errCode|Number| 4D error code| +||\[].message|Text|Description of the 4D error | +||\[].componentSignature|Text|Signature of the internal component which returned the error| + +>If the Web server was already launched, an error is returned. + +#### Example + +```4d + var $settings;$result : Object + var $webServer : 4D.WebServer + + $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html") + + $webServer:=WEB Server + $result:=$webServer.start($settings) + If($result.success) + //... + End if +``` + + + + + + +## .stop() + +
    History +|Version|Changes| +|---|---| +|v18 R3|Added +
    + + +**.stop()** + + + +|Parameter|Type||Description| +|---|---|----|---| +||||Does not require any parameters| + + + +The `.stop()` function stops the web server on which it is applied. + +If the web server was started, all web connections and web processes are closed, once the currently handled requests are finished. If the web server was not started, the method does nothing. + +>This function resets the customized web settings defined for the session using the *settings* parameter of the [`.start()`](#start) function, if any. + + +#### Example + +To stop the database Web server: + +```4d + var $webServer : 4D.WebServer + + $webServer:=WEB Server(Web server database) + $webServer.stop() +``` + + + + + + + diff --git a/docs/API/ZipArchiveClass.md b/docs/API/ZipArchiveClass.md new file mode 100644 index 00000000000000..059fae4d6aefde --- /dev/null +++ b/docs/API/ZipArchiveClass.md @@ -0,0 +1,273 @@ +--- +id: ZipArchiveClass +title: ZIPArchive +--- + + +A 4D ZIP archive is a `File` or `Folder` object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save disk space or transfer files via mediums which may have size limitations (e.g., email or network). + +- You create a 4D ZIP archive with the [ZIP Create archive](#zip-create-archive) command. +- 4D [`ZIPFile`](ZipFileClass.md) and [`ZIPFolder`](ZipFolderClass.md) instances are available through the [`root`](#root) property (`ZIPFolder`) of the object returned by [ZIP Read archive](#zip-read-archive) command. + + +### Example + +To retrieve and view the contents of a ZIP file object: + +```4d +var $path; $archive : 4D.File +var $zipFile : 4D.ZipFile +var $zipFolder : 4D.ZipFolder +var $txt : Text + +$path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") +$archive:=ZIP Read archive($path) +$zipFolder:=$archive.root // store the zip main folder +$zipFile:=$zipFolder.files()[0] //read the first zipped file + +If($zipFile.extension=".txt") + $txt:=$zipFile.getText() +End if +``` + +### Summary + +|| +|---| +|[](#root)

        | + + +## ZIP Create archive + +

    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**ZIP Create archive** ( *fileToZip* : 4D.File ; *destinationFile* : 4D.File ) : Object
    **ZIP Create archive** ( *folderToZip* : 4D.Folder ; *destinationFile* : 4D.File { ; *options* : Integer }) : Object
    **ZIP Create archive** ( *zipStructure* : Object ; *destinationFile* : 4D.File ) : Object + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|fileToZip|4D.File|->|File or Folder object to compress| +|folderToZip|4D.Folder|->|File or Folder object to compress| +|zipStructure|Object|->|File or Folder object to compress| +|destinationFile|4D.File|->|Destination file for the archive| +|options|Integer|->|*folderToZip* option: `ZIP Without enclosing folder`| +|Result|Object|<-|Status object| + + + +#### Description + +The `ZIP Create archive` command creates a compressed ZIP archive object and returns the status of the operation. + +You can pass a 4D.File, a 4D.Folder, or a zip structure object as first parameter: + +- *fileToZip*: You simply pass a `4D.File` to compress. + +- *folderToZip*: You pass a `4D.Folder` to compress. In this case, the *options* parameter allows you to compress only the contents of the folder (i.e., exclude the enclosing folder). By default, `ZIP Create archive` will compress the folder and its contents, so that the decompressing operation will recreate a folder. If you want the decompressing operation to restore only the contents of the folder, pass the `ZIP Without enclosing folder` constant in the *options* parameter. + +- *zipStructure*: You pass an object describing the ZIP archive object. The following properties are available to define the structure: + +|Property|Type|Description| +|---|---|---| +|compression|Text|
  • `ZIP Compression none`: No compression
  • `ZIP Compression standard`: Standard compression (default)
  • | +|encryption|Text|The encryption to use if a password is set:
  • `ZIP Encryption AES128`: AES encryption using 128-bit key.
  • `ZIP Encryption AES192`: AES encryption using 192-bit key.
  • `ZIP Encryption AES256`: AES encryption using 256-bit key (default if password is set).
  • `ZIP Encryption none`: Data is not encrypted (default if no password is set)
  • | +|password|Text|A password to use if encryption is required.| +|files|Collection|
  • a collection of `4D.File` or `4D.Folder` objects or
  • a collection of objects with the following properties:
  • PropertyTypeDescription
    source4D.File or 4D.FolderFile or Folder
    destinationText(optional) - Specify a relative filepath to change the organization of the contents of the archive
    optionnumber(optional) - `ZIP Ignore invisible files` or 0 to compress all of the file
    | +|callback|4D.Function|A callback formula that will receive the compression progress (0 - 100) in $1.| + +In the *destinationFile* parameter, pass a `4D.File` object describing the ZIP archive to create (name, location, etc.). It is advised to use the ".zip" extension if you want the ZIP archive to be processed automatically by any software. + +Once an archive is created, you can use the [ZIP Read archive](#zip-read-archive) command to access it. + +**Status object** + +The returned status object contains the following properties: + +|Property|Type|Description| +|---|---|---| +|statusText|Text|Error message (if any):
  • Cannot open ZIP archive
  • Cannot create ZIP archive
  • Password is required for encryption +|status|Integer|Status code| +|success|Boolean|True if archive created successfully, else false| + + +#### Example 1 + +To compress a `4D.File`: + +```4d + var $file; $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/file.zip") + $file:=Folder(fk desktop folder).file("MyDocs/text.txt") + + $status:=ZIP Create archive($file;$destination) +``` + + +#### Example 2 + +To compress a `4D.Folder` without the folder itself: + +```4D + var $folder : 4D.Folder + var $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/Images.zip") + $folder:=Folder(fk desktop folder).folder("MyDocs/Images") + + $status:=ZIP Create archive($folder;$destination;ZIP Without enclosing folder) +``` + +#### Example 3 + +To compress a ZIP archive structure with a password and progress bar: + +```4d + var $destination : 4D.File + var $zip;$status : Object + var progID : Integer + + $destination:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + + $zip:=New object + $zip.files:=Folder(fk desktop folder).folder("MyDocs/Resources").folders() + $zip.password:="password" + $zip.callback:=Formula(myFormulaCompressingMethod($1)) + + progID:=Progress New //we use the 4D Progress component + + $status:=ZIP Create archive($zip;$destination) + + Progress QUIT(progID) +``` + +`myFormulaCompressingMethod`: + +```4d + var $1 : Integer + Progress SET PROGRESS(progID;Num($1/100)) +``` + + +#### Example 4 + +You want to pass a collection of folders and files to compress to the *zipStructure* object: + +```4d + var $destination : 4D.File + var $zip;$err : Object + $zip:=New object + $zip.files:=New collection + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text2.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Images/image.png"))) + + $destination:=Folder(fk desktop folder).file("file.zip") + $err:=ZIP Create archive($zip;$destination) +``` + + + + +## ZIP Read archive + +
    History +|Version|Changes| +|---|---| +|v18|Added| +
    + + +**ZIP Read archive** ( *zipFile* : 4D.File { ; *password* : Text }) : 4D.ZipArchive + + +|Parameter|Type||Description| +|---------|--- |:---:|------| +|zipFile|4D.File|->|Zip archive file| +|password|Text|->|ZIP archive password if any| +|Result|4D.ZipArchive|<-|Archive object| + + + +#### Description + +The `ZIP Read archive` command retrieves the contents of *zipFile* and returns it as a `4D.ZipArchive` object. + +> This command does not uncompress the ZIP archive, it only provides a view of its contents. To extract the contents of an archive, you need to use methods such as [file.copyTo()](Document.md#copyto) or [folder.copyTo()](Directory.md#copyto). + +Pass a `4D.File` object referencing the compressed ZIP archive in the *zipFile* parameter. The target archive file will be opened until the `ZIP Read archive` has finished executing and all contents/references have been extracted/released, then it will be closed automatically. + +If the *zipFile* is password protected, you need to use the optional *password* parameter to provide a password. If a password is required but not passed when trying to read the contents of the archive, an error is generated. + + +**Archive object** + +The returned `4D.ZipArchive` object contains a single [`root`](#root) property whose value is a `4D.ZipFolder` object. This folder describes the whole contents of the ZIP archive. + + + +#### Example + +To retrieve and view the contents of a ZIP file object: + +```4d + var $archive : 4D.ZipArchive + var $path : 4D.File + + $path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + $archive:=ZIP Read archive($path) +``` + +To retrieve the list of the files and folders in the archive: + +```4d + $folders:=$archive.root.folders() + $files:=$archive.root.files() +``` + +To read the contents of a file without extracting it from the root folder: + +```4d + + If($files[$i].extension=".txt") + $txt:=$files[$i].getText() + Else + $blob:=$files[$i].getContent() + End if +``` + +To extract from the root folder: + +```4d + //extract a file + $folderResult:=$files[$i].copyTo(Folder(fk desktop folder).folder("MyDocs")) + + //extract all files + $folderResult:=$archive.root.copyTo(Folder(fk desktop folder).folder("MyDocs")) +``` + + + +## .root + + +**.root** : 4D.ZipFolder + + +#### Description + +The `.root` property contains a virtual folder providing access to the contents of the ZIP archive. + +The `root` folder and its contents can be manipulated with the [ZipFile](ZipFileClass.md) and [ZipFolder](ZipFolderClass.md) functions and properties. + +This property is **read-only**. + + + diff --git a/docs/API/ZipFileClass.md b/docs/API/ZipFileClass.md new file mode 100644 index 00000000000000..af02c1956755e8 --- /dev/null +++ b/docs/API/ZipFileClass.md @@ -0,0 +1,33 @@ +--- +id: ZipFileClass +title: ZIPFile +--- + +The following properties and functions from the [File](FileClass.md) class are available to `ZIPFile` objects: + +|Available [File](FileClass.md) APIs for ZIPFile|Comment | +|---|---| +|[](FileClass.md#copyto)|| +|[](FileClass.md#creationdate)|| +|[](FileClass.md#creationtime)|| +|[](FileClass.md#exists)|| +|[](FileClass.md#extension)|| +|[](FileClass.md#fullname)|| +|[](FileClass.md#getcontent)|| +|[](FileClass.md#geticon)|| +|[](FileClass.md#gettext)|| +|[](FileClass.md#hidden)|| +|[](FileClass.md#isalias)|| +|[](FileClass.md#isfile)|| +|[](FileClass.md#isfolder)|| +|[](FileClass.md#iswritable)|Always false with ZIP archive| +|[](FileClass.md#modificationdate)|| +|[](FileClass.md#modificationtime)|| +|[](FileClass.md#name)|| +|[](FileClass.md#original)|| +|[](FileClass.md#parent)|| +|[](FileClass.md#path)|Returns a path relative to the archive| +|[](FileClass.md#platformpath)|| + + + diff --git a/docs/API/ZipFolderClass.md b/docs/API/ZipFolderClass.md new file mode 100644 index 00000000000000..b3fd96949144e4 --- /dev/null +++ b/docs/API/ZipFolderClass.md @@ -0,0 +1,37 @@ +--- +id: ZipFolderClass +title: ZIPFolder +--- + + +The following properties and functions from the [Folder](FolderClass.md) class are available to `ZIPFolder` objects: + + +|Available [Folder](FolderClass.md) APIs for ZIPFolder|Comment | +|---|---| +|[](FolderClass.md#copyto)|| +|[](FolderClass.md#creationdate)|Date may be different for the `root` folder from a folder within the archive| +|[](FolderClass.md#creationtime)|Time may be different for the `root` folder from a folder within the archive| +|[](FolderClass.md#exists)|| +|[](FolderClass.md#extension)|| +|[](FolderClass.md#file)|| +|[](FolderClass.md#files)|| +|[](FolderClass.md#folder)|| +|[](FolderClass.md#folders)|| +|[](FolderClass.md#fullname)|| +|[](FolderClass.md#geticon)|| +|[](FolderClass.md#hidden)|| +|[](FolderClass.md#isalias)|| +|[](FolderClass.md#isfile)|| +|[](FolderClass.md#isfolder)|| +|[](FolderClass.md#ispackage)|| +|[](FolderClass.md#modificationdate)|Date may be different for the `root` folder from a folder within the archive| +|[](FolderClass.md#modificationtime)|Time may be different for the `root` folder from a folder within the archive| +|[](FolderClass.md#name)|| +|[](FolderClass.md#original)|| +|[](FolderClass.md#parent)|The archive's virtual `root` folder has no parent. However, the folders within the archive may have a parent other than the root.| +|[](FolderClass.md#path)|Returns a path relative to the archive| +|[](FolderClass.md#platformpath)|| + + + diff --git a/docs/API/overview.md b/docs/API/overview.md new file mode 100644 index 00000000000000..fa409df5ca8e9a --- /dev/null +++ b/docs/API/overview.md @@ -0,0 +1,27 @@ +--- +id: overview +title: Class API Overview +--- + +This section describes the built-in 4D class API as well as the associated constructor commands. 4D class functions and properties are available through class instance objects. + +- functions must be called on instances with the () operator. For example, `collection.sort()`. + +- properties are accessed without parentheses, for example `file.creationTime`. You can also use the \[] syntax, for example `file["creationTime"]`. + +## Writing conventions + +The following conventions are used in the function syntax: + +- the `{ }` characters (braces) indicate optional parameters. For example, `.delete( { option : Integer } )` means that the *option* parameter may be omitted when calling the function. +- the `{ ; ...param }` notation indicates an unlimited number of parameters. For example, `.concat( value : any { ;...valueN } ) : Collection` means that an unlimited number of values of any type can be passed to the function. +- the `any` keyword is used for parameters that can be of any type that can be stored within attributes (number, text, boolean, date, time, object, collection...). + +## Other resources + +For an overall presentation of the 4D Language basics and concepts, please go to the [4D Language Concepts](Concepts/about.md) section. + +For a description of the 4D "classic" language, please go to the *4D Language Reference* on [doc.4d.com](https://doc.4d.com). + + + diff --git a/docs/Admin/cli.md b/docs/Admin/cli.md new file mode 100644 index 00000000000000..215b97372784c2 --- /dev/null +++ b/docs/Admin/cli.md @@ -0,0 +1,188 @@ +--- +id: cli +title: Command Line Interface +--- + +You can use the macOS Terminal or the Windows console to drive your 4D applications (4D and 4D Server) using command lines. More particularly, this functionality allows you to: + +- launch a database remotely, which can be especially useful for administering Web servers. +- run automatic tests for your applications. + +## Basic information + +You can execute command lines for 4D applications using the macOS Terminal or the Windows Console. + +- Under macOS, you should use the `open` command. +- Under Windows, you can just pass the arguments directly. + +> Under macOS, you can pass the arguments directly by going to the folder where the application is found inside the package (Contents/MacOS path), which allows to address the stderr stream. For example, if the 4D package is located in the `MyFolder` folder, you must write the command line as follows: `/MyFolder/4D.app/Contents/MacOS/4D`. However, we recommend that you use the `open` command whenever you do not need to access the stderr stream. + +## Launch a 4D application + +Here is a description of command lines and the arguments supported to launch 4D applications. + +Syntax: +``` + [--version] [--help] [--project] [ [--data ]] +[--opening-mode interpreted | compiled] [--create-data] [--user-param ] [--headless] [--dataless] +[--webadmin-settings-file] [--webadmin-access-key] [--webadmin-auto-start] [--webadmin-store-settings] +``` +|Argument                              |Value|Description| +|-------------|---|---| +|`applicationPath`|Path of the 4D, 4D Server or merged application|Launches the application. Identical to double-clicking the 4D application. When called without structure file argument, the application is executed and the 'select database' dialog box appears.| +|`--version`||Dispays application version and exits| +|`--help`||Dispays help and exits. Alternate arguments: -?, -h| +|`--project`|projectPath | packagePath | 4dlinkPath|Project file to open with the current data file. No dialog box appears.| +|`--data`|dataPath|Data file to open with the designated project file. If not specified, 4D uses the last opened data file.| +|`--opening-mode`|interpreted | compiled|Requests database to open in interpreted or compiled mode. No error is thrown if the requested mode is unavailable.| +|`--create-data`||Automatically creates a new data file if no valid data file is found. No dialog box appears. 4D uses the file name passed in the "--data" argument if any (generates an error if a file with the same name already exists).| +|`--user-param`|Custom user string|A string that will be available within the 4D application through the Get database parameter command (the string must not start with a "-" character, which is reserved). | +|`--headless`||Launches the 4D, 4D Server or merged application without interface (headless mode). In this mode:
  • The Design mode is not available, database starts in Application mode
  • No toolbar, menu bar, MDI window or splash screen is displayed
  • No icon is displayed in the dock or task bar
  • The opened database is not registered in the "Recent databases" menu
  • The diagnostic log is automatically started (see [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html), selector 79)
  • Every call to a dialog box is intercepted and an automatic response it provided (e.g. OK for the [ALERT](https://doc.4d.com/4dv19/help/command/en/page41.html) command, Abort for an error dialog...). All intercepted commands(*) are logged in the diagnostic log.

  • For maintenance needs, you can send any text to standard output streams using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. Note that headless 4D applications can only be closed by a call to [QUIT 4D](https://doc.4d.com/4dv19/help/command/en/page291.html) or using the OS task manager.| +|`--dataless`||Launches 4D, 4D Server or merged application in dataless mode. Dataless mode is useful when 4D runs tasks with no need for data (project compilation for example). In this mode:
  • No file containing data is opened, even if specified in the command line or the `.4DLink` file, or when using the `CREATE DATA FILE` and `OPEN DATA FILE` commands.
  • Commands that manipulate data will throw an error. For example, `CREATE RECORD` throws “no table to apply the command toâ€.

  • **Note**:
  • If passed in the command line, dataless mode applies to all databases opened in 4D, as long as the application is not closed.
  • If passed using the `.4DLink` file, dataless mode only applies to the database specified in the `.4DLink` file. For more information on `.4DLink` files, see [Project opening shortcuts](../Project/creating.md#project-opening-shortcuts).
  • | +|`--webadmin-settings-file`|File path|Path of the custom WebAdmin `.4DSettings` file for the [WebAdmin web server](webAdmin.md)| +|`--webadmin-access-key`|String|Access key for the [WebAdmin web server](webAdmin.md)| +|`--webadmin-auto-start`|Boolean|Status of the automatic startup for the [WebAdmin web server](webAdmin.md)| +|`--webadmin-store-settings`||Store the access key and automatic starting parameters in the currently used settings file (i.e. the default [`WebAdmin.4DSettings`](webAdmin.md#webadmin-settings) file or a custom file designated with the `--webadmin-settings-path` parameter). Use the `--webadmin-store-settings` argument to save these settings if necessary| +(*) Some dialogs are displayed before the database is opened, so that it's impossible to write into the [Diagnostic log file](debugLogFiles.md#4ddiagnosticlogtxt) (licence alert, conversion dialog, database selection, data file selection). In such case, an error message is thrown both in the stderr stream and the system event log, and then the application quits. + +### Examples + +These examples assume that your 4D application is stored on the desktop and that the database to be opened is found in the "Documents" folder. + +> The current folder of the user is reached using the "~ " command under macOS and the "%HOMEPATH%" command under Windows. + +Launch application: + +* macOS: + + +```bash +open ~/Desktop/4D.app +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe +``` + +Launch application with a package file on macOS: + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myDB.4dbase +``` + +Launch application with a project file: + +* macOS: + + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myProj/Project/myProj.4DProject +``` + + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myProj\Project\myProj.4DProject +``` + + + +Launch application with a project file and a data file: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD +or: +%HOMEPATH%\Desktop\4D\4D.exe /project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject /data %HOMEPATH%\Documents\data\myData.4DD +``` + +Launch application with a .4DLink file: + +* macOS: + + +```bash +open ~/Desktop/4D.app MyDatabase.4DLink +``` + +```bash +open "~/Desktop/4D Server.app" MyDatabase.4DLink +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D.exe MyDatabase.4DLink +``` + +```bash +%HOMEPATH%\Desktop\4D Server.exe" MyDatabase.4DLink +``` + +Launch application in compiled mode and create a data file if not available: + +* macOS: + + +```bash +open ~/Desktop/4D.app ~/Documents/myBase.4dbase --args --opening-mode compiled --create-data true +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myBase.4dbase\myDB.4db --opening-mode compiled --create-data true +``` + +Launch application with a project file and a data file and pass a string as a user parameter: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --user-param "Hello world" +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --user-param "Hello world" +``` + +Launch application without interface (headless mode): + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --headless +``` + +```bash +open ~/Desktop/MyBuiltRemoteApp −−headless +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --headless +%HOMEPATH%\Desktop\4D\MyBuiltRemoteApp.exe --headless +``` diff --git a/docs/Admin/dataExplorer.md b/docs/Admin/dataExplorer.md new file mode 100644 index 00000000000000..378a9d2b37cb79 --- /dev/null +++ b/docs/Admin/dataExplorer.md @@ -0,0 +1,195 @@ +--- +id: dataExplorer +title: Web Data Explorer +--- + +> **Preview**: The Web Data Explorer is provided as a preview feature. Using this feature in production is not recommended. The final implementation could be slightly different. + + +The Data Explorer provides a web interface to view and query data in your project datastore. Using this tool, you can easily browse among all your entities and search, order, or filter attribute values. It helps you to control data and quickly identify issues at any step of the development process. + +![alt-text](assets/en/Admin/dataExplorer1.png) + + +## Access Configuration + +The Data Explorer relies on the [`WebAdmin`](webAdmin.md) web server component for the configuration and authentication settings. + +- **configuration**: the Data Explorer configuration reuses the [`WebAdmin` web server settings](webAdmin.md#webadmin-settings), +- **authentication**: access to the Data Explorer is granted when the [session user is authenticated](webAdmin.md#authentication-and-session) and has the "WebAdmin" privilege. When the Data Explorer is accessed through the **Data Explorer** menu item (see below), an automatic authentication is provided. + +> The Data Explorer access can be disabled using the [`.setAdminProtection()`](API/DataStoreClass.md#setadminprotection) function. + + +## Opening the Data Explorer + +The Data Explorer page is automatically available when [the `WebAdmin` web server is started](webAdmin.md#starting-the-webadmin-web-server). + +To connect to the Data Explorer web page: + +- if you use a 4D application with interface, select **Data Explorer...** command from: + - the **Records** menu (in 4D stand-alone) + - the **Window** menu (in 4D Server) + +- whether you use a headless 4D application or not, you can open your web browser and enter the following address: + + `IPaddress:HTTPPort/dataexplorer` +or + `IPaddress:HTTPSPort/dataexplorer` + + In this context, you will be prompted to enter the [access key](webAdmin.md#access-key) to open a `WebAdmin` session on the server: + +![alt-text](assets/en/Admin/accessKeyEnter.png) + +> [HTTPPort](webAdmin.md#http-port) and [HTTPSPort](webAdmin.md#https-port) values are configured in the `WebAdmin` settings. + + + +## Using the Data Explorer + +In addition to a comprehensive and customizable view of your data, the Data Explorer allows you to query and order your data. + +### Requirements + +The Data Explorer supports the following web browsers: + +- Chrome +- Safari +- Edge +- FireFox + +The minimum resolution to use the Data Explorer is 1280x720. Recommended resolution is 1920x1080. + +### Basics + +The Data Explorer provides an overall access to the ORDA data model with respect to the [ORDA mapping rules](ORDA/dsMapping.md#general-rules). + +You can switch to the **dark mode** display theme using the selector at the bottom of the page: + +![alt-text](assets/en/Admin/dark.png) + +![alt-text](assets/en/Admin/dataExplorer2.png) + +The page contains several areas: + +- On the left side are the **Dataclasses area** and **Attributes area**, allowing you can select the dataclasses and attributes to display. Attributes are ordered according to the underlying structure creation order. Primary key and indexed attributes have a specific icon. You can filter the list of proposed dataclass names and attribute names using the respective search areas. +![alt-text](assets/en/Admin/dataExplorer3.png) + +- The central part contains the **Search area** and the **Data grid** (list of entities of the selected dataclass). Each column of the grid represents a datastore attribute. + - By default, all entities are displayed. You can filter the displayed entities using the search area. Two query modes are available: [Query on attributes](#query-on-attributes) (selected by default), and the [Advanced query with expression](#advanced-query-with-expression). You select the query mode by clicking on the corresponding button (the **X** button allows you to reset the query area and thus stop filtering): + ![alt-text](assets/en/Admin/dataExplorer4b.png) + + - The name of the selected dataclass is added as a tab above the data grid. Using these tabs, you can switch between dataclasses that have been already selected. You can remove a referenced dataclass by clicking the "remove" icon at the right of the dataclass name. + - You can reduce the number of columns by unchecking attributes in the left side. You can also switch the columns in the data grid using drag and drop. You can click on a column header to [sort entities](#ordering-entities) according to its values (when possible). + - If an operation requires a long time, a progress bar is displayed. You can stop the running operation at any moment by clicking on the red button: + +![alt-text](assets/en/Admin/dataExplorer5.png) + + + +- On the right side is the **Details area**: it displays the attribute values of the currently selected entity. +All attribute types are displayed, including pictures and objects (expressed in json). You can browse between the entities of the dataclass by clicking the **First** / **Previous** / **Next** / **Last** links at the bottom of the area. + + + +### Updating contents + +When the ORDA model or data is modified on the database side (table added, record edited or deleted, etc.), you just need to refresh the Data Explorer page in the browser (using the F5 key, for example). + + +### Ordering entities + +You can reorder the displayed entity list according to attribute values. All types of attributes can be used for a sort, except picture and object. + +- Click on a column header to order entities according to the corresponding attribute values. By default, the sort is ascending. Click twice for a descending sort. A column used to sort entities is displayed with a small icon and its name is in *italics*. + +![alt-text](assets/en/Admin/dataExplorer7.png) + +- You can sort attributes on several levels. For example, you can sort employees by city and then by salary. To do that, hold down the **Shift** key and click sequentially on each column header to include in the sort order. + + +### Query on attributes + +In this mode, you can filter entities by entering values to find (or to exclude) in the areas above the attribute list. You can filter on one or several attributes. The entity list is automatically updated when you type in. + +![alt-text](assets/en/Admin/dataExplorer6.png) + +If you enter several attributes, a AND is automatically applied. For example, the following filter displays entities with *firstname* attribute starting with "flo" AND *salary* attribute value > 50000: + +![alt-text](assets/en/Admin/dataExplorer9.png) + +The **X** button allows you to remove entered attributes and thus stop filtering. + +Different operators and query options are available, depending on the data type of the attribute. + +> You cannot filter on picture or object attributes. + +#### Numeric operators + +With numeric, date, and time attributes, the "=" operator is selected by default. However, you can select another operator from the operator list (click on the "=" icon to display the list): + +![alt-text](assets/en/Admin/DEFilter1.png) + +#### Dates + +With date attributes, you can enter the date to use through a datepicker widget (click on the date area to display the calendar): + +![alt-text](assets/en/Admin/DEFilter2.png) + +#### Booleans + +When you click on a boolean attribute area, you can filter on **true**/**false** values but also on **null**/**not null** values: + +![alt-text](assets/en/Admin/DEFilter3.png) + +- **null** indicates that the attribute value was not defined +- **not null** indicates that the attribute value is defined (thus true or false). + +#### Text + +Text filters are not diacritic (a = A). + +The filter is of the "starts with" type. For example, entering "Jim" will show "Jim" and "Jimmy" values. + +You can also use the wildcard character (@) to replace one or more starting characters. For example: + +|A filter with|Finds| +|---|---| +|Bel|All values beginning with “Belâ€| +|@do|All values containing “doâ€| +|Bel@do|All values starting with “Bel†and containing “doâ€| + +If you want to create more specific queries, such as "is exactly", you may need to use the advanced queries feature. + + +### Advanced queries with expression + +When you select this option, a query area is displayed above the entity list, allowing you to enter any expression to use to filter the contents: + +![alt-text](assets/en/Admin/dataExplorer8.png) + +You can enter advanced queries that are not available as attribute queries. For example, if you want to find entities with *firstname* attribute containing "Jim" but not "Jimmy", you can write: + +``` +firstname=="Jim" +``` + +You can use any ORDA query expression as [documented with the `query()` function](API/DataClassClass.md#query), with the following limitations or differences: + +- For security, you cannot execute formulas using `eval()`. +- Placeholders cannot be used; you have to write a *queryString* with values. +- String values containing space characters must be embedded in double quotes (""). + +For example, with the Employee dataclass, you can write: + +``` +firstname = "Marie Sophie" AND manager.lastname = "@th" +``` + +You can click on the `v` icon to display both [`queryPlan`](API/DataClassClass.md#queryplan) and [`queryPath`](API/DataClassClass.md#querypath). In the area, you can hover over the subquery blocks to have detailed information per subquery: + +![alt-text](assets/en/Admin/dataExplorer12.png) + +Right-click in the query area to display the previous valid queries: + +![alt-text](assets/en/Admin/dataExplorer11.png) diff --git a/docs/Admin/debugLogFiles.md b/docs/Admin/debugLogFiles.md new file mode 100644 index 00000000000000..70aef0be0fec6d --- /dev/null +++ b/docs/Admin/debugLogFiles.md @@ -0,0 +1,522 @@ +--- +id: debugLogFiles +title: Description of log files +--- + +4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) or [WEB SET OPTION](https://doc.4d.com/4dv19/help/command/en/page1210.html) commands and are stored in the [Logs folder](Project/architecture.md#logs-folder) of the database. + +Information logged needs to be analyzed to detect and fix issues. This section provides a comprehensive description of the following log files: + +* [4DRequestsLog.txt](#4drequestslogtxt) +* [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) +* [HTTPDebugLog.txt](#httpdebuglogtxt) +* 4DDebugLog.txt ([standard](#4ddebuglogtxt-standard) & [tabular](#4ddebuglogtxt-tabular)) +* [4DDiagnosticLog.txt](#4ddiagnosticlogtxt) +* [4DIMAPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DPOP3Log.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DSMTPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [ORDA client requests log file](#orda-client-requests) + +> When a log file can be generated either on 4D Server or on the remote client, the word "Server" is added to the server-side log file name, for example "4DRequestsLogServer.txt" + +Log files share some fields so that you can establish a chronology and make connections between entries while debugging: + +* `sequence_number`: this number is unique over all debug logs and is incremented for each new entry whatever the log file, so that you can know the exact sequence of the operations. +* `connection_uuid`: for any 4D process created on a 4D client that connects to a server, this connection UUID is logged on both server and client side. It allows you to easily identify the remote client that launched each process. + +## 4DRequestsLog.txt + +This log file records standard requests carried out by the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) +//server side +``` + + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) +//remote side +``` + +>This statement also starts the [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) log file. + +#### Headers + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + +#### Contents + +For each request, the following fields are logged: + +|Field name |Description| +|---|---| +|sequence_number |Unique and sequential operation number in the logging session| +|time |Date and time using ISO 8601 format: 'YYYY-MM-DDTHH:MM:SS.mmm'| +|systemid| System ID| +|component| Component signature (e.g., '4SQLS' or 'dbmg')| +|process\_info_|index Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process.| +|request| Request ID in C/S or message string for SQL requests or `LOG EVENT` messages| +|bytes_in| Number of bytes received| +|bytes_out| Number of bytes sent| +|server\_duration | exec\_duration| Depends on where the log is generated:

  • *server\_duration* when generated on the client --Time taken in microseconds for the server to process the request and return a response. B to F in image below, OR
  • *exec\_duration* when generated on the server --Time taken in microseconds for the server to process the request. B to E in image below.
  • | +|write\_duration| Time taken in microseconds for sending the:

  • Request (when run on the client). A to B in image below.
  • Response (when run on the server). E to F in image below.
  • | +|task_kind| Preemptive or cooperative (respectively 'p' or 'c')| +|rtt| Time estimate in microseconds for the client to send the request and the server to acknowledge it. A to D and E to H in image below.

  • Only measured when using the ServerNet network layer, returns 0 when used with the legacy network layer.
  • For Windows versions prior to Windows 10 or Windows Server 2016, the call will return 0.
  • | + +Request flow: + +![](assets/en/Admin/logRequestFlow.PNG) + +## 4DRequestsLog_ProcessInfo.txt + +This log file records information on each process created on the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) //server side +``` + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) //remote side +``` + +>This statement also starts the [4DRequestsLog.txt](#4drequestslogtxt) log file. + +#### Headers + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + + +#### Contents + +For each process, the following fields are logged: + +|Field name| Description| +|---|---| +|sequence_number| Unique and sequential operation number in the logging session| +|time| Date and time using ISO 8601 format: "YYYY-MM-DDTHH:MM:SS.mmm"| +|process\_info_index| Unique and sequential process number| +|CDB4DBaseContext| DB4D component database context UUID| +|systemid| System ID| +|server\_process\_id| Process ID on Server| +|remote\_process\_id| Process ID on Client| +|process\_name| Process name| +|cID| Identifier of 4D Connection| +|uID |Identifier of 4D Client| +|IP Client| IPv4/IPv6 address| +|host_name| Client hostname| +|user_name| User Login Name on client| +|connection\_uuid| UUID identifier of process connection| +|server\_process\_unique\_id |Unique process ID on Server| + +## HTTPDebugLog.txt + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +How to start this log: + +```4d +WEB SET OPTION(Web debug log;wdl enable without body) +//other values are available +``` + +The following fields are logged for both Request and Response: + +|Field name| Description| +|---|---| +|SocketID |ID of socket used for communication| +|PeerIP |IPv4 address of host (client)| +|PeerPort| Port used by host (client) +|TimeStamp| Timestamp in milliseconds (since system startup)| +|ConnectionID| Connection UUID (UUID of VTCPSocket used for communication)| +|SequenceNumber| Unique and sequential operation number in the logging session| + +## 4DDebugLog.txt (standard) + +This log file records each event occurring at the 4D programming level. Standard mode provides a basic view of events. + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2) +//standard, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2) +//standard, current process only +``` + +The following fields are logged for each event: + +|Column # |Description| +|---|---| +|1| Unique and sequential operation number in the logging session| +|2| Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm)| +|3| Process ID (p=xx) and unique process ID (puid=xx)| +|4| Stack level| +|5| Can be Command Name/ Method Name/Message/ Task Start Stop info/Plugin Name, event or Callback/Connection UUID| +|6| Time taken for logging operation in milliseconds| + +## 4DDebugLog.txt (tabular) + +This log file records each event occurring at the 4D programming level in a tabbed, compact format that includes additional information (compared to the standard format). + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2+4) +//extended tabbed format, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2+4) +//extended, current process only +``` + +The following fields are logged for each event: + +|Column #|Field name|Description| +|---|---|---| +|1| sequence_number| Unique and sequential operation number in the logging session | + +|2| time| Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +|3| ProcessID|Process ID| +|4| unique_processID|Unique process ID| +|5| stack_level|Stack level +|6| operation_type| Log operation type. This value may be an absolute value:

    1. Command
    2. Method (project method, database method, etc.)
    3. Message (sent by [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command only)
    4. PluginMessage
    5. PluginEvent
    6. PluginCommand
    7. PluginCallback
    8. Task
    9. Member method (method attached to a collection or an object)

    When closing a stack level, the `operation_type`, `operation` and `operation_parameters` columns have the same value as the opening stack level logged in the `stack_opening_sequence_number` column. For example:

    1. 121 15:16:50:777 5 8 1 2 CallMethod Parameters 0
    2. 122 15:16:50:777 5 8 2 1 283 0
    3. 123 15:16:50:777 5 8 2 1 283 0 122 3
    4. 124 15:16:50:777 5 8 1 2 CallMethod Parameters 0 121 61

    The 1st and 2nd lines open a stack level, the 3rd and 4th lines close a stack level. Values in the columns 6, 7 and 8 are repeated in the closing stack level line. The column 10 contains the stack level opening sequence numbers, i.e. 122 for the 3rd line and 121 for the 4th.| +|7|operation|May represent (depending on operation type):
  • a Language Command ID (when type=1)
  • a Method Name (when type=2)
  • a combination of pluginIndex;pluginCommand (when type=4, 5, 6 or 7). May contain something like '3;2'
  • a Task Connection UUID (when type=8)
  • +|8|operation_parameters|Parameters passed to commands, methods, or plugins| +|9|form_event|Form event if any; empty in other cases (suppose that column is used when code is executed in a form method or object method)| +|10|stack_opening_sequence_number|Only for the closing stack levels: Sequence number of the corresponding opening stack level| +|11|stack_level_execution_time|Only for the closing stack levels: Elapsed time in micro seconds of the current logged action; only for the closing stack levels (see 10th columns in lines 123 and 124 in the log above)| + +## 4DDiagnosticLog.txt + +This log file records many events related to the internal application operation and is human-readable. You can include custom information in this file using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. + +How to start this log: + +```4d + SET DATABASE PARAMETER(Diagnostic log recording;1) //start recording +``` + +The following fields are logged for each event: + +|Field Name|Description| +|---| ---| +|sequenceNumber|Unique and sequential operation number in the logging session| +|timestamp|Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm)| +|loggerID|Optional| +|componentSignature|Optional - internal component signature| +|messageLevel|Info, Warning, Error| +|message|Description of the log entry| + +Depending on the event, various other fields can also be logged, such as task, socket, etc. + +## 4DSMTPLog.txt, 4DPOP3Log.txt, and 4DIMAPLog.txt + +These log files record each exchange between the 4D application and the mail server (SMTP, POP3, IMAP) that has been initiated by the following commands: + +* SMTP - [SMTP New transporter](API/SMTPTransporterClass.md#smtp-new-transporter) +* POP3 - [POP3 New transporter](API/POP3TransporterClass.md#pop3-new-transporter) +* IMAP - [IMAP New transporter](API/IMAPTransporterClass.md#imap-new-transporter) + +The log files can be produced in two versions: + +* a regular version: + * named 4DSMTPLog.txt, 4DPOP3Log.txt, or 4DIMAPLog.txt + * no attachments + * uses an automatic circular file recycling each 10 MB + * intended for usual debugging + + To start this log: + + ```4d + SET DATABASE PARAMETER(SMTP Log;1) //start SMTP log + SET DATABASE PARAMETER(POP3 Log;1) //start POP3 log + SET DATABASE PARAMETER(IMAP Log;1) //start IMAP log + ``` + + 4D Server: Click on the **Start Request and Debug Logs** button in the [Maintenance Page](https://doc.4d.com/4Dv18R5/4D/18-R5/Maintenance-Page.300-5149308.en.html) of the 4D Server administration window. + + This log path is returned by the `Get 4D file` command. + +* an extended version: + * attachment(s) included +no automatic recycling + * custom name + * reserved for specific purposes + + To start this log: + + ```4d + $server:=New object + ... + //SMTP + $server.logFile:="MySMTPAuthLog.txt" + $transporter:=SMTP New transporter($server) + + // POP3 + $server.logFile:="MyPOP3AuthLog.txt" + $transporter:=POP3 New transporter($server) + + //IMAP + $server.logFile:="MyIMAPAuthLog.txt" + $transporter:=IMAP New transporter($server) + ``` + +#### Contents + +For each request, the following fields are logged: + +|Column #| Description| +|---|---| +|1| Unique and sequential operation number in the logging session| +|2| Date and time in RFC3339 format (yyyy-mm-ddThh:mm:ss.ms)| +|3| 4D Process ID| +|4| Unique process ID| +|5|
    • SMTP,POP3, or IMAP session startup information, including server host name, TCP port number used to connect to SMTP,POP3, or IMAP server and TLS status,or
    • data exchanged between server and client, starting with "S <" (data received from the SMTP,POP3, or IMAP server) or "C >" (data sent by the SMTP,POP3, or IMAP client): authentication mode list sent by the server and selected authentication mode, any error reported by the SMTP,POP3, or IMAP Server, header information of sent mail (standard version only) and if the mail is saved on the server,or
    • SMTP,POP3, or IMAP session closing information.
    | + +## ORDA client requests + +This log records each ORDA request sent from a remote machine. You can direct log information to memory or to a file on disk. The name and location of this log file are your choice. + +How to start this log: + +```4d +//to be executed on a remote machine +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory +``` + +If you want to use the unique sequence number in ORDA request log, you need to trigger it: + +```4d +//to be executed on a remote machine + +SET DATABASE PARAMETER(Client Log Recording;1) +//to enable log sequence number + +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory + +SET DATABASE PARAMETER(Client Log Recording;0) +//disabling sequence number +``` + +The following fields are logged for each request: + +|Field name| Description |Example| +|---|---|---| +|sequenceNumber| Unique and sequential operation number in the logging session |104| +|url| Client ORDA request URL| "rest/Persons(30001)"| +|startTime| Starting date and time using ISO 8601 format| "2019-05-28T08:25:12.346Z"| +|endTime| Ending date and time using ISO 8601 format| "2019-05-28T08:25:12.371Z"| +|duration| Client processing duration (ms) |25| +|response| Server response object |{"status":200,"body":{"__entityModel":"Persons",\[...]}}| + + + +## Using a log configuration file + +You can use a **log configuration file** to easily manage log recording in a production environment. This file is preconfigured by the developer. Typically, it can be sent to customers so that they just need to select it or copy it in a local folder. Once enabled, the log configuration file triggers the recording of specific logs. + +### How to enable the file + +There are several ways to enable the log configuration file: + +- On 4D Server with interface, you can open the Maintenance page and click on the [Load logs configuration file](Admin/server-admin.md#load-logs-configuration-file) button, then select the file. In this case, you can use any name for the configuration file. It is immediately enabled on the server. +- You can copy the log configuration file in the [Settings folder](Project/architecture.md#settings-1) of the project. In this case, the file must be named `logConfig.json`. It is enabled at project startup (only on the server in client/server). +- With a built application, you can copy the `logConfig.json` file in the following folder: + + Windows: `Users\[userName]\AppData\Roaming\[application]` + + macOS: `/Users/[userName]/Library/ApplicationSupport/[application]` + +> If you want to enable the log configuration file for all projects in stand-alone, server and remote 4D applications, you can copy the `logConfig.json` file in the following folder: +> - Windows: `Users\[userName]\AppData\Roaming\4D or \4D Server ` +> - macOS: `/Users/[userName]/Library/ApplicationSupport/4D or /4D Server` + +### JSON file description + +The log configuration file is a `.json` file that can contain the following properties: + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Logs Configuration File", + "description": "A file that controls the state of different types of logs in 4D clients and servers", + "type": "object", + "properties": { + "forceLoggingConfiguration": { + "description": "Forcing the logs configuration described in the file ingoring changes coming from code or user interface", + "type": "boolean", + "default": true + }, + "requestLogs": { + "description": "Configuration for request logs", + "type": "object", + "properties": { + "clientState": { + "description": "Enable/Disable client request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + }, + "serverState": { + "description": "Enable/Disable server request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "debugLogs": { + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "commandList": { + "description": "Commands to log or not log", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "state": { + "description": "integer to specify type of debuglog and options", + + "type": "integer", + "minimum": 0 + } + } + }, + "diagnosticLogs":{ + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "state":{ + "description": "Enable/Disable diagnostic logs 0 or 1 (0 = do not record, 1 = record)", + "type": "integer", + "minimum": 0 + } + } + }, + "httpDebugLogs": { + "description": "Configuration for http debug logs", + "type": "object", + "properties": { + "level": { + "description": "Configure http request logs", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "state": { + "description": "Enable/Disable recording of web requests", + "type": "integer", + "minimum": 0, + "maximum": 4 + } + } + }, + "POP3Logs": { + "description": "Configuration for POP3 logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable POP3 logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "SMTPLogs": { + "description": "Configuration for SMTP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable SMTP log recording (form 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "IMAPLogs": { + "description": "Configuration for IMAP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable IMAP log recording (form 0 to N)", + "type": "integer" + } + } + }, + "ORDALogs": { + "description": "Configuration for ORDA logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable ORDA logs (0 or 1)", + "type": "integer" + }, + "filename": { + "type": "string" + } + } + } + } +} +``` + +### Example + +Here is an example of log configuration file: + +```json +{ + "forceLoggingConfiguration": false, + "requestLogs": { + "clientState": 1, + "serverState": 1 + }, + "debugLogs": { + "commandList":["322","311","112"], + "state": 4 + }, + "diagnosticLogs":{ + "state" : 1 + }, + "httpDebugLogs": { + "level": 5, + "state" : 1 + }, + "POP3Logs": { + "state" : 1 + }, + "SMTPLogs": { + "state" : 1 + }, + "IMAPLogs": { + "state" : 1 + }, + "ORDALogs": { + "state" : 1, + "filename": "ORDALog.txt" + } +} +``` \ No newline at end of file diff --git a/docs/Admin/licenses.md b/docs/Admin/licenses.md new file mode 100644 index 00000000000000..c09ec47ab1879b --- /dev/null +++ b/docs/Admin/licenses.md @@ -0,0 +1,148 @@ +--- +id: licenses +title: Managing 4D Licenses +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/Installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example if: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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 application project with no access to the Design environment. + + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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 diff --git a/docs/Admin/server-admin.md b/docs/Admin/server-admin.md new file mode 100644 index 00000000000000..b6695c57a9a3db --- /dev/null +++ b/docs/Admin/server-admin.md @@ -0,0 +1,529 @@ +--- +id: server-admin +title: 4D Server Administration Window +--- + + +When 4D Server is launched with interface under Windows or macOS, a graphical administration window is available, providing many analysis and control tools for the published 4D application. To display the 4D Server Administration window for the opened project, select the **Window > Administration** menu item, or press **Ctrl+U**. + +> The 4D Server administration window can be accessed from a remote 4D. For more information about this point, please refer to Administration from Remote Machines. + + +## Monitor Page + +The **Monitor** page displays dynamic information concerning database use as well as information about the system and the 4D Server application. + +![](assets/en/Admin/server-admin.png) + +> On Windows, some of the system information displayed on this page are retrieved via the Windows "Performance Analyzer" tools. These tools can only be accessed when the user that opened the session where 4D Server was launched has the necessary administration authorization. + +#### Graphic area + +The graphic area lets you see the evolution in real time of several parameters: the CPU usage, network traffic and memory. You select the parameter to be displayed via a menu found in the center of the window: + +![](assets/en/Admin/server-graphic.png) + +- **CPU Usage**: Overall CPU usage of the machine, for all applications taken together. The specific part of 4D Server in this usage rate is provided in the "Processors" information area. +- **Network**: Number of bytes received per second by the machine (server or client). The number of bytes sent is provided in the "Network" information area. +- **Physical memory**: Quantity of RAM memory of machine used by 4D Server. A more detailed view of memory use is provided in the "Memory" information area. +- **Virtual memory**: Quantity of virtual memory used by the 4D Server application. This memory is allocated by the system according to the application needs. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the maximum quantity of usable virtual memory. The maximum value is calculated dynamically according to the general memory settings of the application. +- **Cache**: Quantity of cache memory used by the 4D Server application. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the total size of the cache memory, as set via the Settings. + +Note that when this option is selected, the graph area scrolling is slowed down since an efficient analysis of the cache is generally carried out over a fairly long observation period. + + +#### Overview Area + +The "Overview" area provides various information concerning the system, application and licenses installed on the 4D Server machine. + +- **System Information**: Computer, system and IP address of server +- **Application Information**: Internal version number of 4D Server and Volume Shadow Copy status +- **Maximum connections**: Number of simultaneous connections allowed by type of server +- **License**: Description of license. When the product license or one of its attached expansions expires in less than 10 days, e.g. in case of a subscription-license, 4D Server tries to automatically renew the license from the 4D user account. In this case, if the automatic renewal failed for some reason (connection error, invalid account status, non-prolongated contract...), a warning icon is displayed next to the license to alert the server administrator. Additional information about the license renewal status can be displayed in a tip when you hover the mouse over the area: + +![](assets/en/Admin/server-licence-failed.png) + +Usually, you will need to check the [**Licences Manager**](licenses.md). + +#### Details Area + +The "Details" area repeats part of the information displayed in the graphic area and provides additional information as well. + +- **Hard drive**: Overall capacity of the hard disk and distribution of the space used by the database data (data file + data index), the space used by other files and the free space available. +- **Memory**: RAM memory installed on the machine and amount of memory used by 4D Server, by other applications or that is free. The memory used by 4D Server can also be displayed dynamically in the graphic area. +- **Processors**: Instant occupancy rate for processor(s) of the machine by 4D Server and by other applications. This rate is constantly recalculated. The occupancy rate by 4D Server can also be displayed dynamically in the graphic area. +- **Network**: Instantaneous number of bytes sent and received by the machine (server or client). This value is updated constantly. The number of bytes received by can also be displayed dynamically in the graphic area. + + +## Users Page + +The **Users** page lists the 4D users connected to the server. + + +![](assets/en/Admin/server-users.png) + +The "Users" button indicates, in parentheses, the total number of users connected to the server (this number does not take into account any display filters applied to the window). The page also contains a dynamic search area and control buttons. You can modify the order of the columns by dragging and dropping their header areas. + +You can also sort the list of column values by clicking on its header. Click several times to specify in turn an ascending/descending order. + +![](assets/en/Admin/server-users-sort.png) + +### List of Users + +For each user connected to the server, the list provides the following information: + +- System of the client machine (macOS or Windows) as an icon. +- **4D User**: Name of the 4D user, or alias if set with the [`SET USER ALIAS`](https://doc.4d.com/4dv19/help/command/en/page1666.html) command on the user machine. If passwords are not activated and no alias has been set, all users are named "Designer". +- **Machine name**: Name of the remote machine. +- **Session name**: Name of the session opened on the remote machine. +- **IP Address**: IP address of the remote machine. +- **Login date**: Date and time of the remote machine connection. +- **CPU Time**: CPU time consumed by this user since connecting. +- **Activity**: Ratio of time that 4D Server devotes to this user (dynamic display). "Sleeping" if the remote machine has switched to sleep mode (see below). + +#### Managing sleeping users + +4D Server specifically handles cases where a machine running a 4D remote application switches to sleep mode while its connection to the server machine is still active. In this case, the connected 4D remote application automatically notifies 4D Server of its imminent disconnection. On the server, the connected user changes to a **Sleeping** activity status: + +![](assets/en/Admin/server-sleeping.png) + +This status frees up resources on the server. In addition, the 4D remote application reconnects to 4D Server automatically after waking up from sleep mode. + +The following scenario is supported: a remote user stops working for awhile, for example during a lunch break, but keeps the connection to the server open. The machine switches to sleep mode. When the user returns, they wake the machine up and the 4D remote application automatically recovers its connection to the server as well as the session context. + +> A sleeping remote session is automatically dropped by the server after 48 hours of inactivity. You can modify this default timeout using the [`SET DATABASE PARAMETER`](https://doc.4d.com/4dv19/help/command/en/page642.html) command with the `Remote connection sleep timeout` selector. + + +### Search/filtering Area + +This feature can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The area indicates the columns where the search/filtering will be carried out. On the Users page, it will be the 4D User, Machine name and Session name columns. + +The list is updated in real time as you enter text in the area. It is possible to enter more than one value to be searched for: separate the values with a semi-colon. The `OR` type operator is used in this case. For example, if you enter "John;Mary;Peter," only rows with John OR Mary OR Peter in the target columns will be kept. + + +### Administration Buttons + +This page includes three control buttons. These are active if at least one row is selected. You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) key for a non-adjacent selection. + +#### Send message + +This button can be used to send a message to the 4D users selected in the window. If no user is selected, the button is not active. When you click on this button, a dialog box appears that lets you enter the message. The dialog box indicates the number of users that will receive this message: + +![](assets/en/Admin/server-message.png) + +The message will be displayed as an alert on the remote machines. + +> You can perfom the same action for remote users with the [`SEND MESSAGE TO REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1632.html) command. + + +#### Watch Processes + +This button can be used to directly show the processes of the user(s) selected on the [**Processes** page](#process-page) of the window. When you click on this button, 4D Server switches to the Processes page and enters the selected user names in the search/filtering area. + +#### Drop user + +This button can be used to force the selected user(s) to disconnect. When you click on this button, a warning dialog box appears so that you can confirm or cancel this operation (hold down **Alt** key while clicking on the **Drop user** button to disconnect the selected user(s) directly without displaying the confirmation dialog box). + +> You can perfom the same action for remote users with the [`DROP REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1633.html) command. + + + +## Processes Page + +The **Processes** page lists all the processes underway. + +![](assets/en/Admin/server-admin-process-page.png) + + +The "Processes" button indicates, in parentheses, the total number of processes running in the server (this number does not take into account any display filters applied to the window nor the state of the **Display processes by groups** option). + +You can change the order of the columns by simply dragging and dropping the column header areas. You can also sort the list of column values by clicking on its header. + +Like the Users page, this page contains a dynamic [search/filtering area](#searchfiltering-area) that can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The search/filtering is carried out in the Session and Process name columns. + +There are also three shortcut buttons that can be used to filter by the type of process displayed in the window: + +![](assets/en/Admin/server-process-buttons.png) + +- **Users processes**: Processes generated by and for the user sessions. These processes are preceded by an icon in the form of a figure. +- **4D Processes**: Processes generated by the 4D Server engine. These processes are preceded by an icon in the form of a notched wheel. +- **Spare processes**: Processes that are inactive but kept temporarily and that can be reused at any time. This mechanism optimizes the reactivity of 4D Server. These processes are preceded by an icon in the form of a dimmed figure. + +The **Display processes by groups** option lets you group together the internal processes of 4D Server as well as the client processes, for better readability. When you check this option: + +- the "twinned" 4D client processes (main 4D client process and 4D client base process, see [Process Type](#process-type)) are grouped as one, +- a "Task managers" group is created; it includes the internal processes dedicated to dividing up tasks (Shared balancer, Net session manager, Exclusive pool worker), +- a "Client managers" group is created; it includes various client internal processes. + +The lower area of the window is used to display the graphic representation of the activity of the selected process(es). + +> You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) for a non-adjacent selection. + +The activity of the process is the percentage of time that 4D Server has devoted to this process (ratio). The window provides the following information for each process: + +- Type of process (see below), +- Session/Info: + - 4D process - blank, + - User process - 4D user name, + - Web process - URL path, +- Name of the process, +- Number of the process (as returned by the [`New process`](https://doc.4d.com/4dv19/help/command/en/page317.html) command for example). The process number is the number assigned on the server. In the case of a global process, this number may be different from that assigned on the client machine. +- Current state of the process, +- Running time (in seconds) of the process since its creation, +- Percentage of time that 4D Server has devoted to this process (ratio). + +### Process Type + +Each process is identified by an icon as well as a type. The color and form of the icon indicates the type of process: + +|icon|type| +|---|---| +|![](assets/en/Admin/server-icon-1.png)|Application server| +|![](assets/en/Admin/server-icon-2.png)|SQL Server| +|![](assets/en/Admin/server-icon-3.png)|DB4D Server (database engine)| +|![](assets/en/Admin/server-icon-4.png)|Web Server| +|![](assets/en/Admin/server-icon-5.png)|SOAP Server| +|![](assets/en/Admin/server-icon-6.png)|Protected 4D client process (development process of a connected 4D)| +|![](assets/en/Admin/server-icon-7.png)|Main 4D client process (main process of a connected 4D). Collaborative process, equivalent on the server of the process created on the client machine)| +|![](assets/en/Admin/server-icon-8.png)|4D client base process (process parallel to a 4D client process. Preemptive process responsible for controlling the corresponding main 4D client process)| +|![](assets/en/Admin/server-icon-9.png)|Spare process (former or future "4D client database process")| +|![](assets/en/Admin/server-icon-10.png)|SQL server worker process| +|![](assets/en/Admin/server-icon-11.png)|HTTP server worker process| +|![](assets/en/Admin/server-icon-12.png)|4D client process (process running on the connected 4D)| +|![](assets/en/Admin/server-icon-13.png)|Stored procedure (process launched by a connected 4D and running on the server)| +|![](assets/en/Admin/server-icon-14.png)|Web method (launched by a 4DACTION for example)| +|![](assets/en/Admin/server-icon-15.png)|Web method (preemptive)| +|![](assets/en/Admin/server-icon-16.png)|SOAP method (launched by a Web Service)| +|![](assets/en/Admin/server-icon-17.png)|SOAP method (preemptive)| +|![](assets/en/Admin/server-icon-18.png)|Logger| +|![](assets/en/Admin/server-icon-19.png)|TCP connection listener| +|![](assets/en/Admin/server-icon-20.png)|TCP session manager| +|![](assets/en/Admin/server-icon-21.png)|Other process| +|![](assets/en/Admin/server-icon-22.png)|Worker process (cooperative)| +|![](assets/en/Admin/server-icon-23.png)|4D client process (preemptive)| +|![](assets/en/Admin/server-icon-24.png)|Stored procedure (preemptive process)| +|![](assets/en/Admin/server-icon-25.png)|Worker process (preemptive)| + +> Each main 4D client process and its "twinned" 4D client base process are grouped together when the **Display processes by groups** option is checked. + + +### Administration Buttons + +The page also has five control buttons that act on the selected process(es). Note that only user processes can be acted upon. + +![](assets/en/Admin/server-process-actions.png) + +- **Abort Process**: can be used to abort the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. + +> You can also abort the selected process(es) directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button, or by using the [`ABORT PROCESS BY ID`](https://doc.4d.com/4dv19/help/command/en/page1634.html) command. + +- **Pause Process**: can be used to pause the selected process(es). +- **Activate Process**: can be used to reactivate the selected process(es). The processes must have been paused previously (using the button above or by programming); otherwise, this button has no effect. +- **Debug Process**: can be used to open on the server machine one or more debugger windows for the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. Note that the debugger window is only displayed when the 4D code is actually executed on the server machine (for example in a trigger or the execution of a method having the "Execute on Server" attribute). + +> You can also debug a process directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button. + +- **Watch users**: used to display, on the [Users page](#users-page), all the processes of the selected user(s). This button is active when at least one user process is selected. + + +## Maintenance Page + +The **Maintenance** page of the 4D Server Administration window provides information concerning the current operation of the application. It also provides access to basic maintenance functions: + +![](assets/en/Admin/server-maintenance.png) + + +### Last verification/compacting + +These areas indicate the date, time and status of the last [data verification](MSC/verify.md) and [compacting operation](MSC/compact.md) carried out on the database. + +#### Verify Records and Indexes + +This button can be used to launch the verification operation directly, without interrupting the server. Note that the server may be noticeably slowed down during the operation. + +All the records and all the indexes of the database are verified. If you want to be able to target the verification or have additional options available, you will need to use the [Maintenance and Security Center](MSC/overview.md) (MSC). + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +This area indicates the date, time and status of the last carried out on the database data. + +#### Compact Data... + +Thus button can be used to launch a data compacting operation directly. This operation requires stopping the server: when you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation: + +![](assets/en/Admin/server-shut.png) + +After the actual interruption of the application service, 4D Server carries out a standard compacting operation on the database data. If you want to have additional options available, you will need to use the [MSC](MSC/overview.md). + +Once the compacting is finished, 4D Server automatically restarts the application. The 4D users can then be reconnected. + +> If the request for compacting was carried out from a remote 4D remote machine, this machine is automatically reconnected by 4D Server. + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +### Uptime + +This area indicates the duration of the 4D Server application execution since the last time it was started (days, hours and minutes). + + +#### Restart server... + +This button can be used to immediately close and restart the project. When you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation. After validation, 4D Server automatically closes and reopens the project. The 4D users can then be reconnected. + +> If the request for restarting was carried out from a remote 4D machine, this machine is automatically reconnected by 4D Server. + +### Last backup + +This area indicates the date and time of the [last backup](MSC/backup.md) of the database and provides information about the next scheduled automatic backup (if any). Automatic backups are configured using the **Scheduler** page of the structure settings. + +- **Last backup**: date and time of last backup. +- **Next backup**: date and time of next scheduled backup. +- **Needed space**: estimated space needed for the backup. The actual size of the backup file may vary according to the settings (compression, etc.) and according to variations of the data file. +- **Available space**: space available on the backup volume. + + +The **Start backup** button can be used to backup the database immediately using the current backup parameters (files backed up, location of archives, options, etc.). You can view these parameters by clicking on the **Settings...** button. During a backup on the server, the client machines are "blocked" (but not disconnected) and it is not possible for any new clients to connect. + + +### Request and Debug logs + +This area indicates the server log files recording duration (when log files are activated) and allows you to control their activation. + +Refer to the [**Description of log files**](debugLogFiles.md) section for details on log files. + +#### Start/Stop Request and Debug Logs + +The **Start Request and Debug Logs** button starts log files. Since this may noticeably deteriorate server performance, it is to be reserved for the development phase of the application. + +> This button only logs operations that are executed on the server. + +When the logs have been activated, the button title changes to **Stop Request and Debug Logs**, so that you can stop recording requests at any time. Pay attention to the fact that restarting the log after stopping it "erases" the previous file. + +#### View Report + +The **View Report** button (named **Download report** if the operation was carried out from a remote desktop client) lets you open a system window displaying the request log file. + +#### Load logs configuration file + +This button allows you to load a special server [log configuration file](debugLogFiles.md#using-a-log-configuration-file) (`.json` file). Such a file can be provided by 4D technical services to monitor and study specific cases. + + +#### Pause logging + +This button suspends all currently logging operations started on the server. This feature can be useful to temporarily lighten the server tasks. + +When the logs have been paused, the button title changes to **Resume logging**, so that you can resume the logging operations. + +> You can pause and resume logging using the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) command. + + +## Application Server Page + +The Application Server page groups together information about the desktop application published by 4D Server and can be used to manage this publication. + +![](assets/en/Admin/server-admin-application-page.png) + + +The upper part of the page provides information about the current status of the 4D Server application server. + +- **State**: Started or Stopped. +- **Starting time**: Date and time the application server was launched. This date corresponds to the opening of the project by 4D Server. +- **Uptime**: Time elapsed since last opening of the project by the server. + +### Accept/Reject New Connections + +This button toggles and can be used to manage the access of new desktop client machines to the application server. + +By default, when the project is published: +- The button is titled "Reject new connections." +- New desktop clients can connect freely (within the limit of the connections permitted by the license). +- The project name is published in the remote connection dialog box (if the "At Startup Publish Database Name in the Connection Dialog" option is checked in the Preferences). + +If you click on the **Reject new connections** button: +- The button title changes to "Accept new connections." +- No new desktop client can then connect. Clients attempting to connect will receive the following message: + +![](assets/en/Admin/server-error.png) + +- The project name no longer appears in the remote connection dialog box. +- Desktop clients that are already connected are not disconnected and can continue to work normally. + +> You can perform the same action with the [`REJECT NEW REMOTE CONNECTIONS`](https://doc.4d.com/4dv19/help/command/en/page1635.html) command. + +- If you click on the **Accept new connections button**, the application server returns to its default state. + +This feature permits, for example, an administrator to carry out various maintenance operations (verification, compacting, etc.) just after having started the server. If the administrator uses a remote connection, they can be certain to be the only one modifying the data. It is also possible to use this function in preparation of a maintenance operation which requires that there be no desktop client machine connected. + +### Information + +#### Configuration + +This area provides information about the 4D project published by the server: name and location of data and structure files and name of database log file. You can click on the structure or data file name in order to view its complete pathname. + +The **Mode** field indicates the current execution mode of the application: compiled or interpreted. + +The lower part of the area indicates the server configuration parameters (launched as service, port and IP address) and the enabling of TLS for client-server connections (does not concern SQL nor HTTP connections). + +#### Memory + +This area indicates the **Total cache memory** (parameter set in the settings) and the **Used cache memory** (dynamic allocation by 4D Server according to its needs). + + +#### Application Server Connections + +- **Maximum**: maximum number of simultaneous client connections allowed for the application server. This value depends on the license installed on the server machine. +- **Used**: actual number of connections currently being used. + + +## SQL Server Page + +The SQL Server page groups together information about the integrated SQL server of 4D Server. It also includes a button that can be used to control the activation of the server. + +![](assets/en/Admin/server-admin-sql-page.png) + + +The upper part of the page provides information about the current status of the SQL server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the SQL server was last launched. +- **Uptime**: Time elapsed since last startup of the SQL server. + +### Start / Stop SQL Server + +This button toggles and can be used to control the activation of the 4D Server SQL server. + +- When the SQL server state is "Started," the button is titled **Stop SQL Server**. If you click on this button, the 4D Server SQL server is immediately stopped; it no longer replies to any external SQL requests received on the designated TCP port. +- When the SQL server state is "Stopped," the button is titled **Start SQL Server**. If you click on this button, the 4D Server SQL server is immediately started; it replies to any external SQL queries received on the designated TCP port. Note that you will need a suitable license to be able to use the 4D SQL server. + +> The SQL server can also be launched automatically on application startup (option in the Settings) or by programming. + +### Information + +#### Configuration + +This area provides information about the SQL server configuration parameters: automatic launching on startup, listening IP address, TCP port (19812 by default) and enabling of SSL for SQL connections (does not concern 4D nor HTTP connections). + +These parameters can be modified via the 4D Settings. + +#### Connections + +Number of SQL connections currently open on 4D Server. + +#### Maximum Connections + +Maximum number of simultaneous SQL connections allowed. This value depends on the license installed on the server machine. + +## HTTP Server Page + +The HTTP Server page groups together information about the operation of the Web server and SOAP server of 4D Server. The Web server lets you publish Web content such as HTML pages or pictures for Web browsers, and to handle REST requests. The SOAP server manages the publication of Web Services. These servers rely on the internal HTTP server of 4D Server. + +![](assets/en/Admin/server-admin-web-page.png) + + +The upper part of the page provides information about the current status of the HTTP server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the HTTP server was last launched. +- **Uptime**: Time elapsed since last startup of the HTTP server. +- **Total HTTP hits**: Number of (low level) HTTP hits received by the HTTP server since it was started. + + +### Start/Stop HTTP Server + +This button toggles and can be used to control the activation of the 4D Server HTTP server. + +- When the HTTP server state is "Started," the button is titled **Stop HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately stopped; the Web server, REST server, and SOAP server no longer accept any requests. +- When the HTTP server state is "Stopped," the button is titled **Start HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately started; Web, REST, and SOAP requests are accepted. + +> You must have a suitable license in order to be able to start the HTTP server. +> +> The HTTP server can also be launched automatically on application startup (Settings) or by programming. + +### Web Information + +This area provides specific information about the Web server of 4D Server. + +- **Web requests**: Accepted or Rejected. This information indicates whether the Web server is activated. Since the Web server is directly linked to the HTTP server, Web requests are accepted when the HTTP server is started and rejected when it is stopped. +- **Maximum connections**: Maximum number of Web connections allowed. This value depends on the license installed on the server machine. + +### SOAP Information + +This area provides specific information about the SOAP server of 4D Server and includes a control button. + +- **SOAP requests**: Accepted or Rejected. This information indicates whether the SOAP server is activated. In order for SOAP requests to be accepted, the HTTP server must be started and the SOAP server must explicitly accept the requests (see the Accept/Reject button). +- **Maximum connections**: Maximum number of SOAP connections allowed. This value depends on the license installed on the server machine. +- **Accept/Reject SOAP requests** button: This button toggles and can be used to control the activation of the 4D Server SOAP server. This button modifies the value of the **Allow Web Services Requests** option on the "Web Services" page of the Settings (and vice versa). You can also use the [`SOAP REJECT NEW REQUESTS`](https://doc.4d.com/4dv19/help/command/en/page1636.html) command to refuse new SOAP requests, however this does not modify the value of the **Allow Web Services Requests** option. + +If you click on the **Accept SOAP requests** button and the HTTP server is stopped, 4D automatically starts it. + +### HTTP Server Configuration + +This area provides information about the configuration parameters and operation of the HTTP server: + +- **Auto-launched at startup**: parameter set via the Settings. +- **HTTP Server processes (used/total)**: number of HTTP processes created on the server (current number of processes / total of all processes created). +- **Cache memory**: size of HTTP server cache memory, when it is activated (size actually used by cache / maximum size theoretically allocated to the cache in the Settings). You can click on the **Clear Cache** button to empty the current cache. +- **Listening to IP**, **HTTP Port** (80 by default), **TLS enabled** for HTTP connections (does not concern 4D nor SQL connections) and **HTTPS Port** used: current [configuration parameters](WebServer/webServerConfig.md) of the HTTP server, specified through the Settings or by programming. +- **Log file information**: name, format and date of the next automatic log backup of the HTTP server (logweb.txt file). + + +## Real Time Monitor Page + +The Real Time Monitor page monitors the progress of "long" operations performed by the application in real time. These operations are, for example, sequential queries, execution of formulas, etc. + +![](assets/en/Admin/server-admin-monitor-page.png) + + +>This page is available in the administration window of the server machine and also from a remote 4D machine. In the case of a remote machine, this page displays data from operations performed on the server machine. + +A line is added for each long operation performed on the data. This line automatically disappears when the operation is complete (you can check the **Display operations at least 5 seconds** option to keep quick operations on screen for 5 seconds, see below). + +The following information is provided for each line: + +- **Start Time**: starting time of operation in the format: "dd/mm/yyyy - hh:mm:ss" +- **Duration** (ms): duration in milliseconds of operation in progress +- **Information**: title of operation. +- **Details**: this area displays detailed information which will vary according to the type of operation selected. More specifically: + + **Created on**: indidates whether the operation results from a client action (Created on client) or if it was started explicitly on the server by means of a stored procedure or the "Execute on server" option (Created on server). + + **Operation Details**: Operation type and (for query operations) query plan. + + **Sub-operations** (if any): Dependent operations of the selected operation (e.g. deleting related records before a parent record). + + **Process Details**: Additional information concerning the table, field, process or client, depending on the type of operation + +> Real-time monitoring page uses the [`GET ACTIVITY SNAPSHOT`](https://doc.4d.com/4dv19/help/command/en/page1277.html) command internally. More information can be found in this command description. + +The page is active and updated permanently as soon as it is displayed. It should be noted that its operation can significantly slow the execution of the application. It is possible to suspend the updating of this page in one of the following ways: + +- clicking on the **Pause** button, +- clicking in the list, +- pressing the space bar. + +When you pause the page, a "PAUSED" message appears and the button label changes to **Resume**. +You can resume monitoring of the operations by performing the same action as for pausing. + +#### Advanced mode + +The RTM page can display additional information, if necessary, for each listed operation. + +To access the advanced mode for an operation, press **Shift** and select the desired operation. All available information is then displayed in the "Process Details" area without any filtering (as returned by the `GET ACTIVITY SNAPSHOT` command). Available information depends on the operation selected. + +Here is an example of information displayed in standard mode: + +![](assets/en/Admin/server-admin-monitor-adv1.png) + + +In advanced mode (**Shift+Click** on the operation), additional information is displayed: + +![](assets/en/Admin/server-admin-monitor-adv2.png) + +#### Snapshot button + +The **Snapshot** button allows you to copy to the clipboard all the operations displayed in the RTM panel, as well as their related details (process and sub-operation info): + +![](assets/en/Admin/server-admin-monitor-snapshot.png) + + +#### Display operations at least 5 seconds + +If you check the **Display operations at least 5 seconds** option, any listed operation will be displayed on the page for at least five seconds, even after its execution is finished. Retained operations appear dimmed in the operation list. This feature is useful for getting information about operations that execute very quickly. diff --git a/docs/Admin/tls.md b/docs/Admin/tls.md new file mode 100644 index 00000000000000..fa47037bdc0bed --- /dev/null +++ b/docs/Admin/tls.md @@ -0,0 +1,113 @@ +--- +id: tls +title: TLS Protocol (HTTPS) +--- + +All 4D servers can communicate in secured mode through the TLS (Transport Layer Security) protocol: + +- the web server +- the application server (client-server desktop applications) +- the SQL server + +## Overview + +The TLS protocol (successor of SSL) has been designed to secure data exchanges between two applications —mainly between a web server and a browser. This protocol is widely used and is compatible with most web browsers. + +At the network level, the security protocol is inserted between the TCP/IP layer (low level) and the HTTP high level protocol. It has been designed mainly to work with HTTP. + +Network configuration using TSL: + +![](assets/en/WebServer/tls1.png) + +The TLS protocol is designed to authenticate the sender and receiver and to guarantee the confidentiality and integrity of the exchanged information: + +* **Authentication**: The sender and receiver identities are confirmed. +* **Confidentiality**: The sent data is encrypted so that no third person can understand the message. +* **Integrity**: The received data has not been changed, by accident or malevolently. + +TLS uses a public key encryption technique based on a pair of asymmetric keys for encryption and decryption: a public key and a private key. The private key is used to encrypt data. The sender (the website) does not give it to anyone. The public key is used to decrypt the information and is sent to the receivers (web browsers) through a certificate. When using TLS with the Internet, the certificate is delivered through a certification authority, such as Verisign®. The website pays the Certificate Authority to deliver a certificate which guaranties the server authentication and contains the public key allowing to exchange data in a secured mode. + +>For more information on the encryption method and the public and private key issues, refer to the `ENCRYPT BLOB` command description. + +## Minimum version + +By default, the minimum version of the secured protocol accepted by the server is TLS 1.2. You can modify this value by using the `Min TLS version` selector with the `SET DATABASE PARAMETER command`. + +You can control the level of security of your web server by defining the [minimum TLS version](WebServer/webServerConfig.md#minimum-tls-version) accepted for connections. + +## How to get a certificate? + +A server working in secured mode means that you need a digital certificate from a certification authority. This certificate contains various information such as the site ID as well as the public key used to communicate with the server. This certificate is transmitted to the clients (e.g. Web browsers) connecting to this server. Once the certificate has been identified and accepted, the communication is made in secured mode. + +>Web browsers authorize only the certificates issued by a certification authority referenced in their properties. + +![](assets/en/WebServer/tls2.png) + +The certification authority is chosen according to several criteria. If the certification authority is well known, the certificate will be authorized by many browsers, however the price to pay will be expensive. + +To get a digital certificate: + +1. Generate a private key using the `GENERATE ENCRYPTION KEYPAIR` command. + +>**Warning**: For security reasons, the private key should always be kept secret. Actually, it should always remain with the server machine. For the Web server, the Key.pem file must be placed in the Project folder. + +2. Use the `GENERATE CERTIFICATE REQUEST` command to issue a certificate request. + +3. Send the certificate request to the chosen certificate authority.

    +To fill in a certificate request, you might need to contact the certification authority. The certification authority checks that the information transmitted are correct. The certificate request is generated in a BLOB using the PKCS format encoded in base64 (PEM format). This principle allows you to copy and paste the keys as text and to send them via E-mail without modifying the key content. For example, you can save the BLOB containing the certificate request in a text document (using the `BLOB TO DOCUMENT` command), then open and copy and paste its content in a mail or a Web form to be sent to the certification authority. + +4. Once you get your certificate, create a text file named “cert.pem†and paste the contents of the certificate into it.

    +You can receive a certificate in different ways (usually by email or HTML form). 4D accepts all platform-related text formats for certificates (OS X, PC, Linux, etc.). However, the certificate must be in PEM format, *i.e.*, PKCS encoded in base64. + + >CR line-ending characters are not supported on their own; you must use CRLF or LF. + +5. Place the “cert.pem†file in the [appropriate location](#installation-and-activation). + +The 4D server can now work in a secured mode. A certificate is valid between 3 months to a year. + +## Installation and activation + +### Installing `key.pem` and `cert.pem` files + +To be able to use the TLS protocol with the server, you must install the **key.pem** (document containing the private encryption key) and **cert.pem** (document containing the certificate) at the appropriate location(s). Different locations are required depending on the server on which you want to use TLS. + +>Default *key.pem* and *cert.pem* files are provided with 4D. For a higher level of security, we strongly recommend that you replace these files with your own certificates. + +#### With the web server + +To be used by the 4D web server, the **key.pem** and **cert.pem** files must be placed: + +- with 4D in local mode or 4D Server, next to the [project folder](Project/architecture.md#project-folder) +- with 4D in remote mode, in the client database folder on the remote machine (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +You must copy these files manually on the remote machine. + +#### With the application server (client-server desktop applications) + +To be used by the 4D application server, the **key.pem** and **cert.pem** files must be placed: + +- in the [**Resources** folder](Project/architecture.md#resources) of the 4D Server application +- and in the **Resources** folder on each remote 4D application (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +#### With the SQL server + +To be used by the 4D SQL server, the **key.pem** and **cert.pem** files must be placed next to the [project folder](Project/architecture.md#project-folder). + + +### Enabling TLS + +The installation of **key.pem** and **cert.pem** files makes it possible to use TLS with the 4D server. However, in order for TLS connections to be accepted by the server, you must enable them: + +- With the 4D web server, you must [enable HTTPS](WebServer/webServerConfig.md#enable-https). You can set the [HSTS option](WebServer/webServerConfig.md#enable-hsts) to redirect browsers trying to connect in http mode. +- With the application server, you must select the **Encrypt Client-Server Communications** option in the "Client-server/Network options" page of the Settings dialog box. +- With the SQL server, you must select the **Enable TLS** option in the "SQL" page of the Settings dialog box. + +> The 4D web server also supports [HSTS option](WebServer/webServerConfig.md#enable-hsts) to declare that browsers should only interact with it via secure HTTPS connections. + +## Perfect Forward Secrecy (PFS) + +[PFS](https://en.wikipedia.org/wiki/Forward_secrecy) adds an additional layer of security to your communications. Rather than using pre-established exchange keys, PFS creates session keys cooperatively between the communicating parties using Diffie-Hellman (DH) algorithms. The joint manner in which the keys are constructed creates a "shared secret" which impedes outside parties from being able to compromise them. + +When TLS is enabled on the server, PFS is automatically enabled. If the *dhparams.pem* file (document containing the server's DH private key) does not already exist, 4D will automatically generate it with a key size of 2048. The initial generation of this file could take several minutes. The file is placed with the [*key.pem* and *cert.pem* files](#key-pem-and-cert-pem-files). + +If you use a [custom cipher list](WebServer/webServerConfig.md##cipher-list) and want to enable PFS, you must verify that it contains entries with DH or ECDH (Elliptic-curve Diffie–Hellman) algorithms. diff --git a/docs/Admin/webAdmin.md b/docs/Admin/webAdmin.md new file mode 100644 index 00000000000000..18d4a766281ad1 --- /dev/null +++ b/docs/Admin/webAdmin.md @@ -0,0 +1,156 @@ +--- +id: webAdmin +title: Web Administration +--- + + +An embedded web server component, named `WebAdmin`, is used by 4D and 4D Server to provide a secured web access to specific management features such as the [Data Explorer](dataExplorer.md). You can connect locally or remotely to this web server from a browser or any web application and access the associated 4D application. + +The WebAdmin handles the authentication of users with "WebAdmin" privileges, so that they can open administration sessions and access dedicated interfaces. + +This feature can be used in 4D applications running headless as well as 4D applications running with interfaces. + + +## Starting the WebAdmin web server + +By default, the `WebAdmin` web server is not launched. You need to configure the launch at startup, or (in versions with interface) launch it manually using a menu item. + + +### Launch at startup + +You can configure the `WebAdmin` web server to be launched at 4D or 4D Server application startup (before any project is loaded). + +- If you use a 4D application with interface, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +Check the **Web server administration automatic startup** option in the settings dialog box: + +![alt-text](assets/en/Admin/waSettings.png) + +- Whether you use 4D application which is headless or not, you can enable the automatic startup mode using the following *Command Line Interface* argument: + + +``` +open ~/Desktop/4D.app --webadmin-auto-start true +``` + +> If the TCP port used by the `WebAdmin` web server ([HTTPS](#https-port) or [HTTP](#http-port), depending on the settings) is not free at startup, 4D will try successively the 20 following ports, and use the first one that is available. If no port is available, the web server is not launched and an error is displayed or (headless application) logged in the console. + + +### Start and stop + +If you use a 4D application with interface, you can start or stop the `WebAdmin` web server for your project at any moment: + +Select the **File > Web Administration > Start Server** menu item. + +![alt-text](assets/en/Admin/waMenu2.png) + +The menu item becomes **Stop Server** when the server is launched; select **Stop Server** to stop the `WebAdmin` web server. + + + +## WebAdmin Settings + +Configuring the `WebAdmin` component is mandatory in particular to define the [**access key**](#access-key). By default when the access key is not set, access via a URL is not allowed. + +You can configure the `WebAdmin` component using the [Web Administration settings dialog box](#settings-dialog-box) (see below). + +> If you use a headless 4D application, you can use [*Command Line Interface* arguments](#webadmin-headless-configuration) to define basic settings. You will have to customize the settings file to define advanced parameters. + + +### Settings dialog box + +To open the Web Administration settings dialog box, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +The following dialog box is displayed: + +![alt-text](assets/en/Admin/waSettings2.png) + +#### Web server administration automatic startup + +Check this option if you want the `WebAdmin` web server to be automatically launched when the 4D or 4D Server application starts ([see above](#launching-at-startup)). By default, this option is not checked. + +#### Accept HTTP connections on localhost + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTP on the same machine as the 4D application. By default, this option is checked. + +**Notes:** +- Connections with HTTP other than localhost are never accepted. +- Even if this option is checked, when [Accept HTTPS](#accept-https) is checked and the TLS configuration is valid, localhost connections use HTTPS. + + +#### HTTP Port + +Port number to use for connections through HTTP to the `WebAdmin` web server when the **Accept HTTP connections on localhost** option is checked. Default value is 7080. + + +#### Accept HTTPS + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTPS. By default, this option is checked. + +#### HTTPS Port + +Port number to use for connections through HTTPS to the `WebAdmin` web server when the **Accept HTTPS** option is checked. Default value is 7443. + + +#### Certificate folder path + +Path of the folder where the TLS certificate files are located. By default, the certificate folder path is empty and 4D or 4D Server uses the certificate files embedded in the 4D application (custom certificates must be stored next to the project folder). + +#### Debug log mode + +Status or format of the HTTP request log file (HTTPDebugLog_*nn*.txt, stored in the "Logs" folder of the application -- *nn* is the file number). The following options are available: + +- **Disable** (default) +- **With all body parts** - enabled with body parts in response and request +- **Without body parts** - enabled without body parts (body size is provided) +- **With request body** - enabled with body part in request only +- **With response body** - enabled with body part in response only + +#### Access Key + +Defining an access key is mandatory to unlock access to the `WebAdmin` web server through a URL (access via a 4D menu command does not require an access key). When no access key is defined, no web client is allowed to connect through a URL to a web administration interface like the [Data Explorer page](dataExplorer.md). An error page is returned in case of connection request: + +![alt-text](assets/en/Admin/accessKey.png) + +An access key is similar to a password but not associated to a login. + +- To define a new access key: click the **Define** button, enter the access key string in the dialog box and click **OK**. The button label becomes **Modify**. +- To modify the access key: click the **Modify** button, enter the new access key string in the dialog box and click **OK**. +- To delete the access key: click the **Modify** button, let the access key area empty and click **OK**. + + +## WebAdmin Headless Configuration + +All [WebAdmin settings](#webadmin-settings) are stored in the `WebAdmin.4DSettings` file. There is one default `WebAdmin.4DSettings` file per 4D and 4D Server application, so that it is possible to deploy multiple applications on the same host machine. + +When running a 4D or 4D Server application headless, you can set and use the default `WebAdmin.4DSettings` file, or designate a custom `.4DSettings` file. + +To set the file contents, you can use the [WebAdmin settings dialog](#settings-dialog-box) of the 4D application with interface and run it headless afterwards. The default `WebAdmin.4DSettings` file is then used. + +Or, you can set a custom `.4DSettings` file (xml format) and use it instead of the default file. Several dedicated arguments are available in the [Command line interface](cli.md) to support this feature. + +> The access key is not stored in clear in the `.4DSettings` file. + +Example: + +``` +"%HOMEPATH%\Desktop\4D Server.exe" MyApp.4DLink --webadmin-access-key + "my Fabulous AccessKey" --webadmin-auto-start true + --webadmin-store-settings + +``` + + +## Authentication and Session + +- When a web management page is accessed by entering a URL and without prior identification, an authentication is required. The user must enter the [access key](#access-key) in an authentication dialog box. If the access key was not defined in the `WebAdmin` settings, no access via URL is possible. + +- When a web management page is accessed directly from a 4D or 4D Server menu item (such as **Records > Data Explorer** or **Window > Data Explorer** (4D Server)), access is granted without authentication, the user is automatically authenticated. + +Once the access is granted, a web [session](WebServer/sessions.md) with the "WebAdmin" privilege is created on the 4D application. As long as the current session has "WebAdmin" privilege, the `WebAdmin` component delivers requested pages. + + diff --git a/docs/Backup/backup.md b/docs/Backup/backup.md index 48e9d0eb97faec..e90781c9945f33 100644 --- a/docs/Backup/backup.md +++ b/docs/Backup/backup.md @@ -3,18 +3,15 @@ id: backup title: Backup --- - -## Starting a backup - A backup can be started in three ways: - 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, +- Automatically, using the scheduler that can be set in the Settings, - Programmatically, using the `BACKUP` command. > 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. -### Manual backup +## Manual backup 1. Select the **Backup...** command in the 4D **File** menu. The backup window appears: @@ -23,21 +20,21 @@ You can see the location of the backup folder using the pop-up menu next to the - You can also open the [Maintenance and Security Center](MSC/overview.md) of 4D and display the [Backup page](MSC/backup.md). -The **Database properties...** button causes the Backup/Configuration page of the Database Settings to be displayed. +The **Database properties...** button causes the Backup/Configuration page of the Structure Settings to be displayed. 2. Click **Backup** to start the backup using current parameters. -### Scheduled automatic backup +## Scheduled automatic backup -Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Database Settings**. +Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Settings**. 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). -### BACKUP command +## BACKUP command -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). +When the `BACKUP` 4D language command is executed from any method, the backup starts using the current parameters as defined in the 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 @@ -52,47 +49,46 @@ The **Stop** button lets the user interrupt the backup at any time (refer to [Ha 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**. -### Accessing the database during backup +### Accessing the application during 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. +During a backup, access to the application 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. -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: +Conversely, if only the data file is being backed up, access to the structure is still allowed. In this case, the application access possibilities are as follows: -- 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. +- With the 4D single-user version, the application is locked for both read and write; all processes are frozen. No actions can be performed. +- With 4D Server, the application 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 application 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 data. > 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). ### Handling backup issues 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 **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. +- **Attached file not found**: When an attached file cannot be found, 4D performs a partial backup (backup of application files and accessible attached files) and returns an error. +- **Backup impossible** (disk is full or write-protected, missing disk, disk failure, incomplete transaction, application 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 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. ## 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. +To make following up and verifying 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. -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. +The backup journal is named "Backup Journal[001].txt" and is placed in the "Logs" folder of the project. The backup journal can be opened with any text editor. #### Management of backup journal size 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. +- **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 project. 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. +All information regarding the latest backup and restore operations are stored in the application'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. 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: diff --git a/docs/Backup/log.md b/docs/Backup/log.md index 03b77e9413f55f..a8c41de4c9833d 100644 --- a/docs/Backup/log.md +++ b/docs/Backup/log.md @@ -3,17 +3,17 @@ id: log title: Log file (.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. +A continuously-used application is always recording 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 data. -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. +In addition, 4D works continuously with a data cache in memory. Any changes made to the application data 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 application 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 application entirely. -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. +Finally, 4D has functions that analyze the contents of the log file, making it possible to rollback the operations carried out on the application data. These functions area available in the MSC: refer to the [Activity analysis](MSC/analysis.md) page and the [Rollback](MSC/rollback.md) page. ## How the log file works -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. +The log file generated by 4D contains a description of all operations performed on the data of journaled tables, 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. -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: +As such, each operation performed by a user causes two simultaneous actions: the first one in the data file (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. An application can only work with one log file at a time. The log file records the following action types: - Opening and closing of the data file, - Opening and closing of the process (contexts), @@ -34,49 +34,50 @@ The following illustration sums up how the log file works: 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. +- It keeps log files corresponding to backups in order to be able to parse or repair an application at a later point in time. The integration of a log file can only be done in the application 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. ## Creating the log file -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. +By default, any application project 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. +You can find out if your application uses a log file at any time: just check whether the **Use Log** option is selected on the **Backup/Configuration** page of the Settings. If you deselected this option, or if you use an application without a log file and wish to set up a backup strategy with a log file, you will have to create one. To create a log file: -1. On the **Backup/Configuration** page of the Database Settings, check the **Use Log** option. +1. On the **Backup/Configuration** page of the Structure 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*. 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. +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 application project. If the application hard drive is lost, you can still recall your log file. 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. -4. Validate the Database Settings dialog box. +4. Validate the Settings dialog box. -In order for you to be able to create a log file directly, the database must be in one of the following situations: +In order for you to be able to create a log file directly, the data must be in one of the following situations: - The data file is blank, -- You just performed a backup of the database and no changes have yet been made to the data. +- You just performed a backup and no changes have yet been made to the data. -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. +In all other cases, when you validate the 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 application. This precaution is indispensable because, in order to restore an application after any incidents, you will need a copy of the application into which the operations recorded in the log file will be integrated. -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. +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 application is opened. 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). + ## Stopping a log file -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. +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 Settings. 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: ![](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). +If you click **Stop**, the current log file is immediately closed (the Settings dialog box does not need to be validated afterwards). 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. diff --git a/docs/Backup/overview.md b/docs/Backup/overview.md index 70099d8ed25a8e..ca67ff56f2f4e5 100644 --- a/docs/Backup/overview.md +++ b/docs/Backup/overview.md @@ -3,17 +3,17 @@ id: overview title: Overview --- -4D includes a full database backup and restore module. +4D includes a full application backup and restore module. -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. +This module allows backing up an application 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 Settings. 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. -Databases can be restored automatically when a damaged database is opened. +Applications can be restored automatically when a damaged application is opened. -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. +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 an application in use, any operations missing in the data file are automatically reintegrated the next time the application is opened. You can view the journal file contents at any time. -> 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: +> You can also implement alternative solutions for replicating and synchronizing data in order to maintain identical versions of applications 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) diff --git a/docs/Backup/restore.md b/docs/Backup/restore.md index c004efbc3d325d..98c31290f9ecca 100644 --- a/docs/Backup/restore.md +++ b/docs/Backup/restore.md @@ -3,29 +3,29 @@ id: restore title: Restore --- -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 allows you to restore entire sets of application data in case of any incidents, regardless of the cause of the incident. Two primary categories of incidents can occur: -- 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. +- The unexpected stoppage of an application 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 application can require different operations: + - If the cache was empty, the application opens normally. Any changes made in the application 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. +- The loss of application file(s). This incident can occur because of defective sectors on the disk containing the application, a virus, manipulation error, etc. The last backup must be restored and then the current log file must be integrated. To find out if an application was damaged following an incident, simply relaunch the application 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 application in the exact state it was in before the incident. -> 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. +> 4D can launch procedures automatically to recover applications following incidents. These mechanisms are managed using two options available on the **Backup/Backup & Restore** page of the 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 data file using the "rollback" function in the log file. This function is available on the [Rollback](MSC/rollback.md) page of the MSC. ## Manually restoring a backup (standard dialog) 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. +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 application can be restored. -To restore a database manually via a standard dialog box: +To restore an application manually via a standard dialog box: 1. Choose **Restore...** in the 4D application **File** menu. -It is not mandatory that a database be open. +It is not mandatory that an application project be open. OR Execute the `RESTORE` command from a 4D method. A standard Open file dialog box appears. @@ -38,19 +38,24 @@ You can also click on the **[...]** button to specify a different location. 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. + +4.(Optional) Click **OK** to integrate the log file into the restored application. If the restore and integration were carried out correctly, 4D displays a dialog box indicating that the operation was successful. 5. 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. +> Any content related to the data file (files and `Settings` folder) are automatically restored in a `Data` subfolder within the destination folder. + + ## Manually restoring a backup (MSC) -You can manually restore an archive of the current database using the [Restore page](MSC/restore.md) of the Maintenance and Security Center (MSC). +You can manually restore an archive of the current application using the [Restore page](MSC/restore.md) of the Maintenance and Security Center (MSC). ## Manually integrating the log -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. +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 application when 4D notices that the log file contains more operations than have been carried out in the data file. ![](assets/en/Backup/backup08.png) diff --git a/docs/Backup/settings.md b/docs/Backup/settings.md index 02ac660dd55206..b49c0b090e9cc6 100644 --- a/docs/Backup/settings.md +++ b/docs/Backup/settings.md @@ -3,7 +3,7 @@ id: settings title: Backup Settings --- -Backup settings are defined through three pages in the Database Settings dialog box. You can set: +Backup settings are defined through three pages in the Settings dialog box. You can set: - the scheduler for automatic backups - the files to include in every backup @@ -13,15 +13,15 @@ Backup settings are defined through three pages in the Database Settings dialog ## Scheduler -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. +You can automate the backup of applications 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. -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)). +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 Settings (refer to [Handling backup issues](backup.md#handling-backup-issues)). -The scheduler backup settings are defined on the **Backup/Scheduler** page of the Database Settings: +The scheduler backup settings are defined on the **Backup/Scheduler** page of the Structure Settings: ![](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: +The options found on this tab let you set and configure scheduled automatic backups of the application. 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: - **Never**: The scheduled backup feature is disabled. - **Every Hour**: Programs an automatic backup every hour, starting with the next hour. @@ -33,10 +33,13 @@ 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 -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. +The Backup/Configuration page of the Structure Settings lets you set the backup files and their location, as well as that of the log file. These parameters are specific to each application opened by 4D or 4D Server. ![](assets/en/Backup/backup03.png) @@ -45,12 +48,14 @@ The Backup/Configuration page of the Database Settings lets you set the backup f ### Content 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. +- **Data**: Application data file. When this option is checked, the following elements are automatically backed up at the same time as the data: + - the current log file of the application (if it exists), + - the full `Settings` folder located [next to the data file](Project/architecture.md#settings-folder) (if it exists), i.e. the *user settings for data*. +- **Structure**: Application project folders and files. In cases where projects are compiled, this option allows you to backup the .4dz file. When this option is checked, the full `Settings` folder located [at the same level as the Project folder](Project/architecture.md#settings-folder-1), i.e. the *user settings*, is automatically backed up. - **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. +- **Attachments**: This area allows you to specify a set of files and/or folders to be backed up at the same time as the application. 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 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 application files. - **Add file...**: Displays a dialog box that allows you to select a file to add to the backup. @@ -64,11 +69,11 @@ To modify the location where these files are stored, click the **...** button. A ### Log management -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. +The **Use Log** option, when checked, indicates that the application uses a log file. Its pathname is specified below the option. When this option is checked, it is not possible to open the application without a log file. -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. +By default, any project created with 4D uses a log file (option **Use Log File** checked in the **General Page** of the **Preferences**). The log file is named *data.journal* and is placed in the Data folder. -> 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. +> Activating a new log file requires the data of the application 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 application. ## Backup & Restore @@ -82,10 +87,10 @@ Modifying backup and restore options is optional. Their default values correspon - **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. +>This parameter concerns both application and log file backups. -- **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. +- **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 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 applications 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 application and log file backups. - **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. @@ -95,20 +100,20 @@ To disable the mechanism, simply deselect the option. - **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. -> 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 considers a backup as failed if the application was not launched at the time when the scheduled automatic backup was set to be carried out. ### Archive These options apply to main backup files and to log backup files. - **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. +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 MyApplication[xxxx-yyyy].4BK, where xxxx is the backup number and yyyy is the segment number. For example, the three segments of the MyApplication backup are called MyApplication[0006-0001].4BK, MyApplication[0006-0002].4BK and MyApplication[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**). - **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. + - **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). @@ -118,11 +123,19 @@ By default, 4D compresses backups to help save disk space. However, the file com ### Automatic Restore -- **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. +- **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 application, if an anomaly is detected (corrupted file, for example) during application launch. No intervention is required on the part of the user; however, the operation is logged in the backup journal. + +- **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 application. + - When opening an application, 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 an application, 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. -- **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. +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. -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 +> In the case of an automatic restore, only the following elements are restored: +> - .4DD file +> - .4DIndx file +> - .4DSyncData file +> - .4DSyncHeader file +> - External Data folder +> +> If you wish to get the attached files or the project files, you must perform a [manual restore](restore.md#manually-restoring-a-backup-standard-dialog). diff --git a/docs/Concepts/about.md b/docs/Concepts/about.md index d50f17c6699f79..ecd8ea13863da3 100644 --- a/docs/Concepts/about.md +++ b/docs/Concepts/about.md @@ -3,22 +3,22 @@ id: about title: About the 4D Language --- -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: +The 4D built-in language, consisting of more than 1300 commands, makes 4D a powerful development tool for web, mobile, or desktop applications. You can use the 4D language for many different tasks—from performing simple calculations to creating complex custom user interfaces. For example, you can: - 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, +- Import and export data between 4D applications and other applications, - Incorporate procedures written in other languages into the 4D programming language. -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. +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 applications. Experienced developers can use this powerful programming language to add sophisticated features and capabilities to their applications, including file transfer, communications, monitoring. Developers with programming experience in other languages can add their own commands to the 4D language. ## 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. +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 application and data. 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. @@ -32,16 +32,16 @@ Then why do we need a 4D language? Here are some of its uses: - 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. +- Create applications: You can create easy-to-use, customized applications that run stand-alone. - Add functionality to the built-in 4D Web server: build and update dynamic web pages filled with your data. -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. +The language lets you take complete control over the design and operation of your application. 4D provides powerful “generic†editors, but the language lets you customize your application to whatever degree you require. ## Taking Control of Your Data -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. +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 application. -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. +The commands in the 4D language provide access to the standard record management editors. For example, when you use the `QUERY` 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, `QUERY([People];[People]Last Name="Smith")` will find all the people named Smith in your database. 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. @@ -56,8 +56,8 @@ If you are familiar with traditional computer languages, this section may be of 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. -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. +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 project. You may start by adding a method to a form, then later add a few more methods. As your application 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. -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. +Traditional languages force you to define and pre-declare interface 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. 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 diff --git a/docs/Concepts/arrays.md b/docs/Concepts/arrays.md index 59fbf41dd6b9c2..35c1e700e3ccdf 100644 --- a/docs/Concepts/arrays.md +++ b/docs/Concepts/arrays.md @@ -4,6 +4,7 @@ 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. + > 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. @@ -84,8 +85,6 @@ Here is another example: you want to initialize a form object with a text value Each of the array declaration commands can create or resize one-dimensional or two-dimensional arrays. Example: ```4d - - ARRAY TEXT(atTopics;100;50) // Creates a text array composed of 100 rows of 50 columns ``` @@ -154,7 +153,7 @@ Doing the same thing with arrays would be prohibitive for the following reasons: - 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. +- Again, because an array is always held in memory in its entirety, each time the application 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. **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. diff --git a/docs/Concepts/cf_branching.md b/docs/Concepts/cf_branching.md index b3a5a787b38791..aec5ff761ade95 100644 --- a/docs/Concepts/cf_branching.md +++ b/docs/Concepts/cf_branching.md @@ -3,6 +3,9 @@ id: branching title: Branching structures --- +A branching structure allows methods to test a condition and take alternative paths, depending on the result. + + ## If...Else...End if The formal syntax of the `If...Else...End if` control flow structure is: diff --git a/docs/Concepts/cf_looping.md b/docs/Concepts/cf_looping.md index b934ff2553d853..4e77c7eaf58c22 100644 --- a/docs/Concepts/cf_looping.md +++ b/docs/Concepts/cf_looping.md @@ -3,7 +3,11 @@ id: looping title: Looping structures --- +Looping structures repeat a sequence of statements until a condition is met or a number of times is reached. + + ## While...End while + The formal syntax of the `While...End while` control flow structure is: ```4d While(Boolean_Expression) @@ -47,6 +51,7 @@ A `Repeat...Until` loop is similar to a [While...End while](flow-control#whileen The other difference with a `Repeat...Until` loop is that the loop continues until the Boolean expression is TRUE. ### 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. ```4d @@ -56,6 +61,7 @@ Compare the following example with the example for the `While...End while` loop. ``` ## For...End for + The formal syntax of the `For...End for` control flow structure is: ```4d @@ -79,6 +85,7 @@ The `For...End for` loop is a loop controlled by a counter variable: - 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. ### Basic examples + 1. The following example executes 100 iterations: ```4d @@ -120,7 +127,7 @@ The `For...End for` loop is a loop controlled by a counter variable: End for ``` -Most of the `For...End for` loops you will write in your databases will look like the ones listed in these examples. +Most of the `For...End for` loops you will write in your projects will look like the ones listed in these examples. ### Decrementing variable counter @@ -264,6 +271,7 @@ Here are two examples: ``` ## For each...End for each + The formal syntax of the `For each...End for each` control flow structure is: ```4d @@ -418,7 +426,9 @@ For example: End for each //$col2=[1,2,3,"a","b","c","d"] ``` + ### Until and While conditions + 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`. You can pass either keyword depending on your needs: diff --git a/docs/Concepts/classes.md b/docs/Concepts/classes.md index 1353d0ff6c3921..300254966eed16 100644 --- a/docs/Concepts/classes.md +++ b/docs/Concepts/classes.md @@ -8,126 +8,68 @@ title: Classes The 4D language supports the concept of **classes**. In a programming language, using a class allows you to define an object behaviour with associated properties and functions. -Once a class is defined, you can **instantiate** objects of this class anywhere in your code. Each object is an instance of its class. A class can `extend` another class, and then inherits from its functions. +Once a user class is defined, you can **instantiate** objects of this class anywhere in your code. Each object is an instance of its class. A class can [`extend`](#class-extends-classname) another class, and then inherits from its [functions](#function) and properties ([static](#class-constructor) and [computed](#function-get-and-function-set)). -The class model in 4D is similar to classes in JavaScript, and based on a chain of prototypes. +> The class model in 4D is similar to classes in JavaScript, and based on a chain of prototypes. -### Class object - -A class is an object itself, of "Class" class. A class object has the following properties and methods: - -- `name` which must be ECMAScript compliant -- `superclass` object (optional, null if none) -- `new()` method, allowing to instantiate class objects. - -In addition, a class object can reference: -- a `constructor` object (optional) -- a `prototype` object, containing named function objects (optional). - -A class object is a shared object and can therefore be accessed from different 4D processes simultaneously. - - -### Property lookup and prototype - -All objects in 4D are internally linked to a class object. When 4D does not find a property in an object, it searches in the prototype object of its class; if not found, 4D continues searching in the prototype object of its superclass, and so on until there is no more superclass. - -All objects inherit from the class "Object" as their inheritance tree top class. - -```4d - //Class: Polygon -Class constructor -C_LONGINT($1;$2) -This.area:=$1*$2 - - //C_OBJECT($poly) -C_BOOLEAN($instance) -$poly:=cs.Polygon.new(4;3) - -$instance:=OB Instance of($poly;cs.Polygon) - // true -$instance:=OB Instance of($poly;4D.Object) - // true -``` - -When enumerating properties of an object, its class prototype is not enumerated. As a consequence, `For each` statement and `JSON Stringify` command do not return properties of the class prototype object. The prototype object property of a class is an internal hidden property. - -### Class definition - -A user class file defines a model of object that can be instantiated in the database code by calling the `new()` class member method. -You will usually use specific [class keywords](#class-keywords) and [class commands](#class-commands) in the class file. - -For example: +For example, you could create a `Person` class with the following definition: ```4d //Class: Person.4dm -Class constructor - C_TEXT($1) // FirstName - C_TEXT($2) // LastName - This.firstName:=$1 - This.lastName:=$2 -``` - -In a method, creating a "Person": +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -``` -C_OBJECT($o) -$o:=cs.Person.new("John";"Doe") -// $o: {firstName: "John";lastName: "Doe" } +Function get fullName() -> $fullName : text + $fullName:=This.firstName+" "+This.lastName + +Function sayHello()->$welcome : Text + $welcome:="Hello "+This.fullName ``` -Note that you could create an empty class file, and instantiate empty objects. For example, if you create the following `Empty.4dm` class file: +In a method, creating a "Person": -```4d -//Empty.4dm class file -//Nothing ``` - -You could write in a method: - - -```4d -$o:=cs.Empty.new() -//$o : {} -$cName:=OB Class($o).name //"Empty" +var $person : cs.Person //object of Person class +var $hello : Text +$person:=cs.Person.new("John";"Doe") +// $person:{firstName: "John"; lastName: "Doe"; fullName: "John Doe"} +$hello:=$person.sayHello() //"Hello John Doe" ``` -## Class stores - -Available classes are accessible from their class stores. The following class stores are available: - -- a class store for built-in 4D classes. It is returned by the `4D` command. -- a class store for each opened database or component. It is returned by the `cs` command. These are "user classes". -For example, you create a new instance of an object of myClass using the `cs.myClass.new()` statement (`cs` means *classtore*). +## Managing classes +### Class definition -## Handling user classes +A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. -### Class files +When naming classes, you should keep in mind the following rules: -A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. +- A [class name](identifiers.md#classes) must be compliant with [property naming rules](identifiers.md#object-properties). +- Class names are case sensitive. +- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. For example, if you want to define a class named "Polygon", you need to create the following file: -- Database folder +- Project folder + Project * Sources - Classes + Polygon.4dm -### Class names +### Deleting a class -When naming classes, you should keep in mind the following rules: +To delete an existing class, you can: -- A class name must be ECMAScript compliant. -- Class names are case sensitive. -- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. +- on your disk, remove the .4dm class file from the "Classes" folder, +- in the 4D Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. -### 4D Developer interface +### Using 4D interface -Class files are automatically stored at the appropriate location when created through the 4D Developer interface, either via the **File** menu or the Explorer. +Class files are automatically stored at the appropriate location when created through the 4D interface, either via the **File** menu or the Explorer. #### File menu and toolbar @@ -148,7 +90,7 @@ To create a new class, you can: #### Class code support -In the various 4D Developer windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: +In the various 4D windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: - In the code editor: - a class cannot be run @@ -157,124 +99,292 @@ In the various 4D Developer windows (code editor, compiler, debugger, runtime ex - **Search references** on class function declaration searches for the function used as object member; for example, "Function f" will find "$o.f()". - In the Runtime explorer and Debugger, class functions are displayed with the \ constructor or \.\ format. +## Class stores -### Deleting a class +Available classes are accessible from their class stores. Two class stores are available: -To delete an existing class, you can: +- `cs` for user class store +- `4D` for built-in class store -- on your disk, remove the .4dm class file from the "Classes" folder, -- in the Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. + + +### `cs` + +#### cs -> classStore + +|Parameter|Type||Description| +|---|---|---|---| +|classStore|object|<-|User class store for the project or component| + +The `cs` command returns the user class store for the current project or component. It returns all user classes [defined](#class-definition) in the opened project or component. By default, only project [ORDA classes](ORDA/ordaClasses.md) are available. + +#### Example + +You want to create a new instance of an object of `myClass`: + +```4d +$instance:=cs.myClass.new() +``` + +### `4D` + +#### 4D -> classStore + +|Parameter|Type||Description| +|---|---|---|---| +|classStore|object|<-|4D class store| + +The `4D` command returns the class store for available built-in 4D classes. It provides access to specific APIs such as [CryptoKey](API/CryptoKeyClass.md). + +#### Example + +You want to create a new key in the `CryptoKey ` class: + +```4d +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) +``` + + + + +## Class object + +When a class is [defined](#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of ["Class" class](API/ClassClass.md). A class object has the following properties and function: + +- [`name`](API/ClassClass.md#name) string +- [`superclass`](API/ClassClass.md#superclass) object (null if none) +- [`new()`](API/ClassClass.md#new) function, allowing to instantiate class objects. + +In addition, a class object can reference a [`constructor`](#class-constructor) object (optional). + +A class object is a [shared object](shared.md) and can therefore be accessed from different 4D processes simultaneously. + +### Inheritance + +If a class inherits from another class (i.e. the [Class extends](classes.md#class-extends-classname) keyword is used in its definition), the parent class is its [`superclass`](API/ClassClass.md#superclass). + +When 4D does not find a function or a property in a class, it searches it in its [`superclass`](API/ClassClass.md#superclass); if not found, 4D continues searching in the superclass of the superclass, and so on until there is no more superclass (all objects inherit from the "Object" superclass). ## Class keywords Specific 4D keywords can be used in class definitions: -- `Function ` to define member methods of the objects. -- `Class constructor` to define the properties of the objects (i.e. the prototype). +- `Function ` to define class functions of the objects. +- `Function get ` and `Function set ` to define computed properties of the objects. +- `Class constructor` to define static properties of the objects. - `Class extends ` to define inheritance. -### Class Function +### `Function` #### Syntax -```js -Function +```4d +Function ({$parameterName : type; ...}){->$parameterName : type} // code ``` -Class functions are properties of the prototype object of the owner class. They are objects of the "Function" class. +Class functions are specific properties of the class. They are objects of the [4D.Function](API/FunctionClass.md#about-4dfunction-objects) class. + +In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). -In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be ECMAScript compliant. +> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features in the 4D code editor. For example, if you declare `Function _myPrivateFunction` in `MyClass`, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. -> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features. For example, if you declare `Function _myPrivateFunction` in MyClass, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. +Immediately following the function name, [parameters](#parameters) for the function can be declared with an assigned name and data type, including the return parameter (optional). For example: + +```4d +Function computeArea($width : Integer; $height : Integer)->$area : Integer +``` -Within a class function, the `This` is used as the object instance. For example: +Within a class function, the `This` command is used as the object instance. For example: ```4d -Function getFullName - C_TEXT($0) - $0:=This.firstName+" "+Uppercase(This.lastName) - -Function getAge - C_LONGINT($0) - $0:=(Current date-This.birthdate)/365.25 +Function setFullname($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function getFullname()->$fullname : Text + $fullname:=This.firstName+" "+Uppercase(This.lastName) ``` For a class function, the `Current method name` command returns: "*\.\*", for example "MyClass.myMethod". -In the database code, class functions are called as member methods of the object instance and can receive parameters if any. The following syntaxes are supported: +In the application code, class functions are called as member methods of the object instance and can receive [parameters](#class-function-parameters) if any. The following syntaxes are supported: -- use of the `()` operator. For example `myObject.methodName("hello")`. -- use of a "Function" class member method - - `apply()` - - `call()` - - -> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: +- use of the `()` operator. For example, `myObject.methodName("hello")` +- use of a "4D.Function" class member method: + - [`apply()`](API/FunctionClass.md#apply) + - [`call()`](API/FunctionClass.md#call) + +> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: > - the compiler does not generate any error (which is different compared to regular methods), > - an error is thrown by 4D only at runtime. + + +#### Parameters + +Function parameters are declared using the parameter name and the parameter type, separated by a colon. The parameter name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). Multiple parameters (and types) are separated by semicolons (;). + +```4d +Function add($x; $y : Variant; $z : Integer; $xy : Object) +``` + + +>If the type is not stated, the parameter will be defined as `Variant`. + +You declare the return parameter (optional) by adding an arrow (->) and the return parameter definition after the input parameter(s) list. For example: + +```4d +Function add($x : Variant; $y : Integer)->$result : Integer +``` + +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through $0. For example: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + +>The [classic 4D syntax](parameters.md#sequential-parameters) for method parameters can be used to declare class function parameters. Both syntaxes can be mixed. For example: +> +>```4d +>Function add($x : Integer) +> var $2; $value : Integer +> var $0 : Text +> $value:=$x+$2 +> $0:=String($value) +>``` + + + #### Example ```4d // Class: Rectangle -Class Constructor - C_LONGINT($1;$2) +Class constructor($width : Integer; $height : Integer) This.name:="Rectangle" - This.height:=$1 - This.width:=$2 - -// Function definition -Function getArea - C_LONGINT($0) - $0:=(This.height)*(This.width) + This.height:=$height + This.width:=$width +// Function definition +Function getArea()->$result : Integer + $result:=(This.height)*(This.width) ``` ```4d // In a project method -C_OBJECT($o) -C_REAL($area) -$o:=cs.Rectangle.new() -$area:=$o.getArea(50;100) //5000 +var $rect : cs.Rectangle +var $area : Real + +$rect:=cs.Rectangle.new(50;100) +$area:=$rect.getArea() //5000 +``` + + +### `Function get` and `Function set` + +#### Syntax + +```4d +Function get ()->$result : type +// code +``` + +```4d +Function set ($parameterName : type) +// code +``` + +`Function get` and `Function set` are accessors defining **computed properties** in the class. A computed property is a named property with a data type that masks a calculation. When a computed property value is accessed, 4D substitutes the corresponding accessor's code: + +- when the property is read, the `Function get` is executed, +- when the property is written, the `Function set` is executed. + +If the property is not accessed, the code never executes. + +Computed properties are designed to handle data that do not necessary need to be kept in memory. They are usually based upon persistent properties. For example, if a class object contains as persistent property the *gross price* and the *VAT rate*, the *net price* could be handled by a computed property. + +In the class definition file, computed property declarations use the `Function get` (the *getter*) and `Function set` (the *setter*) keywords, followed by the name of the property. The name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). + +`Function get` returns a value of the property type and `Function set` takes a parameter of the property type. Both arguments must comply with standard [function parameters](#parameters). + +When both functions are defined, the computed property is **read-write**. If only a `Function get` is defined, the computed property is **read-only**. In this case, an error is returned if the code tries to modify the property. If only a `Function set` is defined, 4D returns *undefined* when the property is read. + +The type of the computed property is defined by the `$return` type declaration of the *getter*. It can be of the following types: + +- Text +- Boolean +- Date +- Number +- Object +- Collection +- Image +- Blob + +> Assigning *undefined* to an object property clears its value while preserving its type. In order to do that, the `Function get` is first called to retrieve the value type, then the `Function set` is called with an empty value of that type. + +#### Examples + +```4d +//Class: Person.4dm + +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function get fullName() -> $fullName : Text + $fullName:=This.firstName+" "+This.lastName + +Function set fullName( $fullName : text ) + $p:=Position(" "; $fullName) + This.firstName:=Substring($fullName; 1; $p-1) + This.lastName:=Substring($fullName; $p+1) + +``` + +```4d +//in a project method +$fullName:=$person.fullName // Function get fullName() is called +$person.fullName:="John Smith" // Function set fullName() is called ``` -### Class constructor +### `Class Constructor` #### Syntax -```js +```4d // Class: MyClass -Class Constructor +Class Constructor({$parameterName : type; ...}) // code ``` -A class constructor function, which can accept parameters, can be used to define a user class. +A class constructor function, which can accept [parameters](#parameters), can be used to define a user class. -In that case, when you call the `new()` class member method, the class constructor is called with the parameters optionally passed to the `new()` function. +In that case, when you call the [`new()`](API/ClassClass.md#new) function, the class constructor is called with the parameters optionally passed to the `new()` function. -For a class constructor function, the `Current method name` command returns: "*\.constructor*", for example "MyClass.constructor". +For a class constructor function, the `Current method name` command returns: "*\:constructor*", for example "MyClass:constructor". + #### Example: ```4d // Class: MyClass // Class constructor of MyClass -Class Constructor -C_TEXT($1) -This.name:=$1 +Class Constructor ($name : Text) + This.name:=$name ``` ```4d // In a project method // You can instantiate an object -C_OBJECT($o) +var $o : cs.MyClass $o:=cs.MyClass.new("HelloWorld") // $o = {"name":"HelloWorld"} ``` @@ -282,11 +392,11 @@ $o:=cs.MyClass.new("HelloWorld") -### Class extends \ +### `Class extends ` #### Syntax -```js +```4d // Class: ChildClass Class extends ``` @@ -296,11 +406,11 @@ The `Class extends` keyword is used in class declaration to create a user class Class extension must respect the following rules: - A user class cannot extend a built-in class (except 4D.Object which is extended by default for user classes) -- A user class cannot extend a user class from another database or component. +- A user class cannot extend a user class from another project or component. - A user class cannot extend itself. - It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). -Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax' will throw an error in this case. +Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax` will throw an error in this case. An extended class can call the constructor of its parent class using the [`Super`](#super) command. @@ -309,27 +419,28 @@ An extended class can call the constructor of its parent class using the [`Super This example creates a class called `Square` from a class called `Polygon`. ```4d - //Class: Square - //path: Classes/Square.4dm +//Class: Square - Class extends Polygon - - Class constructor - C_LONGINT($1) - - // It calls the parent class's constructor with lengths - // provided for the Polygon's width and height -Super($1;$1) - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +//path: Classes/Square.4dm + +Class extends Polygon -Function getArea -C_LONGINT($0) -$0:=This.height*This.width +Class constructor ($side : Integer) + + // It calls the parent class's constructor with lengths + // provided for the Polygon's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" + + Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -### Super +### `Super` + #### Super {( param{;...;paramN} )} {-> Object} @@ -345,20 +456,21 @@ The `Super` keyword allows calls to the `superclass`, i.e. the parent class. - inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. When used in a constructor, the `Super` command appears alone and must be used before the `This` keyword is used. - If all class constructors in the inheritance tree are not properly called, error -10748 is generated. It's 4D developer to make sure calls are valid. - If the `This` command is called on an object whose superclasses have not been constructed, error -10743 is generated. + - If `Super` is called out of an object scope, or on an object whose superclass constructor has already been called, error -10746 is generated. ```4d - // inside myClass constructor - C_TEXT($1;$2) - Super($1) //calls superclass constructor with a text param - This.param:=$2 // use second param +// inside myClass constructor +var $text1; $text2 : Text +Super($text1) //calls superclass constructor with a text param +This.param:=$text2 // use second param ``` - inside a [class member function](#class-function), `Super` designates the prototype of the superclass and allows to call a function of the superclass hierarchy. ```4d - Super.doSomething(42) //calls "doSomething" function - //declared in superclasses +Super.doSomething(42) //calls "doSomething" function +//declared in superclasses ``` #### Example 1 @@ -366,37 +478,39 @@ The `Super` keyword allows calls to the `superclass`, i.e. the parent class. This example illustrates the use of `Super` in a class constructor. The command is called to avoid duplicating the constructor parts that are common between `Rectangle` and `Square` classes. ```4d - //Class: Rectangle - - Class constructor - C_LONGINT($1;$2) - This.name:="Rectangle" - This.height:=$1 - This.width:=$2 +// Class: Rectangle +Class constructor($width : Integer; $height : Integer) + This.name:="Rectangle" + This.height:=$height + This.width:=$width + - Function sayName - ALERT("Hi, I am a "+This.name+".") +Function sayName() + ALERT("Hi, I am a "+This.name+".") - Function getArea - C_LONGINT($0) - $0:=This.height*This.width +// Function definition +Function getArea() + var $0 : Integer + $0:=(This.height)*(This.width) ``` ```4d - //Class: Square - - Class extends Rectangle +//Class: Square - Class constructor - C_LONGINT($1) +Class extends Rectangle - // It calls the parent class's constructor with lengths - // provided for the Rectangle's width and height - Super($1;$1) +Class constructor ($side : Integer) - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" + // It calls the parent class's constructor with lengths + // provided for the Rectangle's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" + +Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` #### Example 2 @@ -404,35 +518,35 @@ This example illustrates the use of `Super` in a class constructor. The command This example illustrates the use of `Super` in a class member method. You created the `Rectangle` class with a function: ```4d - //Class: Rectangle +//Class: Rectangle - Function nbSides - C_TEXT($0) - $0:="I have 4 sides" +Function nbSides() + var $0 : Text + $0:="I have 4 sides" ``` You also created the `Square` class with a function calling the superclass function: ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Function description - C_TEXT($0) - $0:=Super.nbSides()+" which are all equal" +Function description() + var $0 : Text + $0:=Super.nbSides()+" which are all equal" ``` Then you can write in a project method: ```4d - C_OBJECT($square) - C_TEXT($message) - $square:=cs.Square.new() - $message:=$square.description() //I have 4 sides which are all equal +var $square : Object +var $message : Text +$square:=cs.Square.new() +$message:=$square.description() //I have 4 sides which are all equal ``` -### This +### `This` #### This -> Object @@ -451,19 +565,20 @@ $o:=New object("prop";42;"f";Formula(This.prop)) $val:=$o.f() //42 ``` -When a [class constructor](#class-constructor) function is used (with the `new()` keyword), its `This` is bound to the new object being constructed. +When a [class constructor](#class-constructor) function is used (with the [`new()`](API/ClassClass.md#new) function), its `This` is bound to the new object being constructed. ```4d - //Class: ob +//Class: ob Class Constructor + // Create properties on This as // desired by assigning to them This.a:=42 ``` ```4d - // in a 4D method +// in a 4D method $o:=cs.ob.new() $val:=$o.a //42 ``` @@ -474,10 +589,10 @@ $val:=$o.a //42 In any cases, `This` refers to the object the method was called on, as if the method were on the object. ```4d - //Class: ob +//Class: ob - Function f - $0:=This.a+This.b +Function f() + $0:=This.a+This.b ``` Then you can write in a project method: @@ -496,14 +611,14 @@ In this example, the object assigned to the variable $o doesn't have its own *f* Several commands of the 4D language allows you to handle class features. -### OB Class +### `OB Class` #### OB Class ( object ) -> Object | Null `OB Class` returns the class of the object passed in parameter. -### OB Instance of +### `OB Instance of` #### OB Instance of ( object ; class ) -> Boolean diff --git a/docs/Concepts/components.md b/docs/Concepts/components.md index affd41f7e62276..9674e609a33d46 100644 --- a/docs/Concepts/components.md +++ b/docs/Concepts/components.md @@ -3,57 +3,109 @@ id: components title: Components --- -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. +A 4D component is a set of 4D methods and forms representing one or more functionalities that can be installed in different applications. For example, you can develop a 4D e-mail component that manages every aspect of sending, receiving and storing e-mails in 4D applications. + +## Presentation + +### Definitions + +- **Matrix Project**: 4D project used for developing the component. The matrix project is a standard project with no specific attributes. A matrix project forms a single component. +- **Host Project**: Application project in which a component is installed and used. +- **Component**: Matrix project, compiled or not, copied into the [`Components`](Project/architecture.md) folder of the host application and whose contents are used in the host application. + +### Principles 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: -- 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. +- A component consists of a regular 4D project file. +- To install a component, you simply need to copy it into the [`Components` folder of the project](Project/architecture.md). You can use aliases or shortcuts. +- A project can be both a “matrix†and a “host,†in other words, a matrix project can itself use one or more components. However, a component cannot use “sub-components†itself. +- A component can call on most of the 4D elements: project methods, project forms, menu bars, choice lists, 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. +- A host project running in interpreted mode can use either interpreted or compiled components. A host project running in compiled mode cannot use interpreted components. In this case, only compiled components can be used. -## Definitions + -The component management mechanisms in 4D require the implementation of the following terms and concepts: +## Scope of language commands -- **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. +Except for [Unusable commands](#unusable-commands), a component can use any command of the 4D language. -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. +When commands are called from a component, they are executed in the context of the component, except for the `EXECUTE METHOD` or `EXECUTE FORMULA` command that use 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 project (a component does not have its own users and groups). +The `SET DATABASE PARAMETER` and `Get database parameter` commands are an exception: their scope is global to the application. When these commands are called from a component, they are applied to the host application project. -### Protection of components: compilation +Furthermore, specific measures have been specified for the `Structure file` and `Get 4D folder` commands when they are used in the framework of components. -By default, all the project methods of a matrix database installed as a component are potentially visible from the host database. In particular: +The `COMPONENT LIST` command can be used to obtain the list of components that are loaded by the host project. -- 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. -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: +### 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â€: + +- `ON EVENT CALL` +- `Method called on event` +- `SET PICTURE TO LIBRARY` +- `REMOVE PICTURE FROM LIBRARY` +- `SAVE LIST` +- `ARRAY TO LIST` +- `EDIT FORM` +- `CREATE USER FORM` +- `DELETE USER FORM` +- `CHANGE PASSWORD` +- `EDIT ACCESS` +- `Set group properties` +- `Set user properties` +- `DELETE USER` +- `CHANGE LICENSES` +- `BLOB TO USERS` +- `SET PLUGIN ACCESS` + +**Notes:** + +- 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 project. However, they are supported with external databases (see `CREATE DATABASE` SQL command). -- 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. ## Sharing of project methods -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. -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. +All the project methods of a matrix project are by definition included in the component (the project is the component), which means that they can be called and executed by the component. + +On the other hand, by default these project methods will not be visible, and they can't be called in the host project. In the matrix project, you must explicitly designate the methods that you want to share with the host project. These project methods can be called in the code of the host project (but they cannot be modified in the Method editor of the host project). 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. +Conversely, for security reasons, by default a component cannot execute project methods belonging to the host project. In certain cases, you may need to allow a component to access the project methods of your host project. To do this, you must explicitly designate which project methods of the host project you want to make accessible to the components (in the method properties, check the **Shared by components and host project** box). ![](assets/en/Concepts/pict516563.en.png) +Once the project methods of the host projects are available to the components, you can execute a host method from inside a component using the `EXECUTE FORMULA` or `EXECUTE METHOD` commands. For example: + +```4d +// Host Method +component_method("host_method_name") +``` + + +```4d +// component_method + C_TEXT($1) + EXECUTE METHOD($1) +``` + +> An interpreted host database that contains interpreted components can be compiled or syntax checked if it does not call methods of the interpreted component. Otherwise, a warning dialog box appears when you attempt to launch the compilation or a syntax check and it will not be possible to carry out the operation. +> Keep in mind that an interpreted method can call a compiled method, but not the reverse, except via the use of the `EXECUTE METHOD` and `EXECUTE FORMULA` commands. + + + ## Passing variables -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. +The local, process and interprocess variables are not shared between components and host projects. The only way to modify component variables from the host project and vice versa is using pointers. Example using an array: ```4d -//In the host database: +//In the host project: ARRAY INTEGER(MyArray;10) AMethod(->MyArray) @@ -64,23 +116,36 @@ Example using an array: Examples using variables: ```4d - C_TEXT(myvariable) - component_method1(->myvariable) - C_POINTER($p) - $p:=component_method2(...) +C_TEXT(myvariable) +component_method1(->myvariable) +``` + +```4d +C_POINTER($p) +$p:=component_method2(...) ``` +Without a pointer, a component can still access the value of a host database variable (but not the variable itself) and vice versa: -When you use pointers to allow components and the host database to communicate, you need to take the following specificities into account: +```4d +//In the host database +C_TEXT($input_t) +$input_t:="DoSomething" +component_method($input_t) +// component_method gets "DoSomething" in $1 (but not the $input_t variable) +``` -- 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. -- 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. +When you use pointers to allow components and the host project 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 project if it is called from a component and vice versa. + +- The component architecture allows the coexistence, within the same interpreted project, of both interpreted and compiled components (conversely, only compiled components can be used in a compiled project). 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 project. - 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: +- 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 project (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: ```4d RESOLVE POINTER(myptr1;vVarName1;vtablenum1;vfieldnum1) @@ -93,9 +158,14 @@ In this case, it is necessary to use the comparison of pointers: If(myptr1=myptr2) //This test returns False ``` -## Access to tables of the host database +## Error handling + +An [error-handling method](Concepts/error-handling.md) installed by the `ON ERR CALL` command only applies to the running application. In the case of an error generated by a component, the `ON ERR CALL` error-handling method of the host project is not called, and vice versa. + -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: +## Access to tables of the host project + +Although components cannot use tables, pointers can allow host projects and components to communicate with each other. For example, here is a method that could be called from a component: ```4d // calling a component method @@ -105,8 +175,8 @@ methCreateRec(->[PEOPLE];->[PEOPLE]Name;"Julie Andrews") Within the component, the code of the `methCreateRec` method: ```4d -C_POINTER($1) //Pointer on a table in host database -C_POINTER($2) //Pointer on a field in host database +C_POINTER($1) //Pointer on a table in host project +C_POINTER($2) //Pointer on a field in host project C_TEXT($3) // Value to insert $tablepointer:=$1 @@ -117,62 +187,11 @@ $fieldpointer->:=$3 SAVE RECORD($tablepointer->) ``` -## Scope of language commands - -Except for [Unusable commands](#unusable-commands), a component can use any command of the 4D language. - -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). - -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. - -Furthermore, specific measures have been specified for the `Structure file` and `Get 4D folder` commands when they are used in the framework of components. - -The `COMPONENT LIST` command can be used to obtain the list of components that are loaded by the host database. - - -### 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â€: - -- `ON EVENT CALL` -- `Method called on event` -- `SET PICTURE TO LIBRARY` -- `REMOVE PICTURE FROM LIBRARY` -- `SAVE LIST` -- `ARRAY TO LIST` -- `EDIT FORM` -- `CREATE USER FORM` -- `DELETE USER FORM` -- `CHANGE PASSWORD` -- `EDIT ACCESS` -- `Set group properties` -- `Set user properties` -- `DELETE USER` -- `CHANGE LICENSES` -- `BLOB TO USERS` -- `SET PLUGIN ACCESS` - -**Notes:** - -- 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). - -## Error handling - -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. - -## Use of forms - -- 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. - -**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. - -- 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. +> In the context of a component, 4D assumes that a reference to a table form is a reference to the host table form (as components can't have tables.) ## Use of tables and fields -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. +A component cannot use the tables and fields defined in the 4D structure of the matrix project. 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 project that is independent from the main 4D project, but that you can work with from the main 4D project. 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. ### Example @@ -208,7 +227,7 @@ Creating the external database: Writing in the external database: ```4d - $Ptr_1:=$2 // retrieves data from the host database through pointers + $Ptr_1:=$2 // retrieves data from the host project through pointers $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -230,7 +249,7 @@ Writing in the external database: Reading from an external database: ```4d - $Ptr_1:=$2 // accesses data of the host database through pointers + $Ptr_1:=$2 // accesses data of the host project through pointers $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -249,17 +268,48 @@ Reading from an external database: End SQL ``` + +## Use of forms + +- 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 project can be used by the component. +- A component can call table forms of the host project. 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. + +> If a component uses the `ADD RECORD` command, the current Input form of the host project will be displayed, in the context of the host project. Consequently, if the form includes variables, the component will not have access to it. + +- You can publish component forms as subforms in the host projects. 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. + +> In the context of a component, any referenced project form must belong to the component. For example, inside a component, referencing a host project form using `DIALOG` or `Open form window` will throw an error. + + ## 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. +Components can use resources located in the Resources folder of the component. Automatic mechanisms are operational: the XLIFF files found in the Resources folder of a component will be loaded by this component. -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. +In a host project containing one or more components, each component as well as the host projects has its own “resources string.†Resources are partitioned between the different projects: it is not possible to access the resources of component A from component B or the host project. + + +## Executing initialization code + +A component can execute 4D code automatically when opening or closing the host database, for example in order to load and/or save the preferences or user states related to the operation of the host database. + +Executing initialization or closing code is done by means of the `On Host Database Event` database method. + +> For security reasons, you must explicitly authorize the execution of the `On Host Database Event` database method in the host database in order to be able to call it. To do this, you must check the **Execute "On Host Database Event" method of the components** option on the Security page the Settings. + + +## Protection of components: compilation + +By default, all the project methods of a matrix project installed as a component are potentially visible from the host project. 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 project. Their contents can be selected and copied in the preview area of the Explorer. They can also be viewed in the debugger. However, it's not possible to open them in the Method editor or modify them. +- The other project methods of the matrix project do not appear in the Explorer but they too can be viewed in the debugger of the host project. + +To protect the project methods of a component effectively, simply compile the matrix project and provide it in the form of a .4dz file. When a compiled matrix project is installed as a component: + +- The shared project methods are shown on the Methods Page of the Explorer and can be called in the methods of the host project. However, their contents will not appear in the preview area and in the debugger. +- The other project methods of the matrix project will never appear. + -## On-line help for components -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: -- 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 diff --git a/docs/Concepts/data-types.md b/docs/Concepts/data-types.md index d2754936c1127d..4c61cf4a9c65ab 100644 --- a/docs/Concepts/data-types.md +++ b/docs/Concepts/data-types.md @@ -7,25 +7,25 @@ In 4D, data are handled according to their type in two places: database fields a 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`| +|Data Types |Database support(1) |Language support|[`var` declaration](variables.md#using-the-var-keyword) |[`C_` or `ARRAY` declaration](variables.md#using-a-c_-directive)| +|---|----|---|---|---| +|[Alphanumeric](dt_string.md) |Yes |Converted to text|-|- +|[Text](Concepts/dt_string.md) |Yes |Yes|`Text`|`C_TEXT`, `ARRAY TEXT` +|[Date](Concepts/dt_date.md) |Yes |Yes|`Date`|`C_DATE`, `ARRAY DATE` +|[Time](Concepts/dt_time.md) |Yes |Yes|`Time`|`C_TIME`, `ARRAY TIME` +|[Boolean](Concepts/dt_boolean.md) |Yes |Yes|`Boolean`|`C_BOOLEAN`, `ARRAY BOOLEAN` +|[Integer](Concepts/dt_number.md) |Yes |Converted to longint|`Integer`|`ARRAY INTEGER` +|[Longint](Concepts/dt_number.md) |Yes |Yes|`Integer`|`C_LONGINT`, `ARRAY LONGINT` +|[Longint 64 bits](Concepts/dt_number.md) |Yes (SQL) |Converted to real|-|- +|[Real](Concepts/dt_number.md) |Yes |Yes|`Real`|`C_REAL`, `ARRAY REAL` +|[Undefined](Concepts/dt_null_undefined.md) |- |Yes|-|- +|[Null](Concepts/dt_null_undefined.md) |- |Yes|-|- +|[Pointer](Concepts/dt_pointer.md) |- |Yes|`Pointer`|`C_POINTER`, `ARRAY POINTER` +|[Picture](Concepts/dt_picture.md) |Yes |Yes|`Picture`|`C_PICTURE`, `ARRAY PICTURE` +|[BLOB](Concepts/dt_blob.md) |Yes |Yes|`Blob`, `4D.Blob`|`C_BLOB`, `ARRAY BLOB` +|[Object](Concepts/dt_object.md) |Yes |Yes|`Object`|`C_OBJECT`, `ARRAY OBJECT` +|[Collection](Concepts/dt_collection.md) |- |Yes|`Collection`|`C_COLLECTION` +|[Variant](Concepts/dt_variant.md)(2) |- |Yes|`Variant`|`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. @@ -72,11 +72,11 @@ The following table lists the basic data types, the data types to which they can |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|||| +|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. diff --git a/docs/Concepts/dt_blob.md b/docs/Concepts/dt_blob.md index 3063f8cd16fa34..e1b7f692276d92 100644 --- a/docs/Concepts/dt_blob.md +++ b/docs/Concepts/dt_blob.md @@ -3,59 +3,186 @@ 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. +A BLOB (Binary Large OBject) field, variable or expression is a contiguous series of bytes that can be treated as one whole object, or whose bytes can be addressed individually. -## Parameter passing, Pointers and function results +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. -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. +Like 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. -To pass a BLOB to your own methods, you can also define a pointer to the BLOB and pass the pointer as parameter. +## Blob Types + +Using the 4D language, there are two ways to handle a blob: + +- **as a scalar value**: a blob can be stored in a Blob variable or field and altered. +- **as an object (`4D.Blob`)**: a `4D.Blob` is a blob object. You can encapsulate a blob or part of it in a `4D.Blob` without altering the original blob. This method is called [boxing](). For more info on how to instantiate a `4D.Blob`, see [Blob Class](../API/BlobClass.md). + +Each blob type has its advantages. Use the following table to determine which one suits your needs: + +| | Blob | 4D.Blob | +| ------------------------------------ | :--: | :-----: | +| Alterable | Yes | No | +| Shareable in objects and collections | No | Yes | +| Passed by reference\* | No | Yes | +| Performance when accessing bytes | + | - | +| Maximum size | 2GB | Memory | + +\*Unlike the 4D commands designed to take a scalar blob as a parameter, passing a scalar blob to a method duplicates it in memory. When working with methods, using blob objects (`4D.Blob`) is more efficient, as they are passed by reference. + +> By default, 4D sets the maximum size of scalar blobs to 2GB, but this size limit may be lower depending on your OS and how much space is available. + +You cannot use operators on blobs. + +## Checking if a variable holds a scalar blob or a `4D.Blob` + +Use the [Value type](https://doc.4d.com/4dv19R/help/command/en/page1509.html) command to determine if a value is of type Blob or Object. +To check that an object is a blob object (`4D.Blob`), use [OB instance of](https://doc.4d.com/4dv19R/help/command/en/page1731.html): + +```4d +var $myBlob: Blob +var $myBlobObject: 4D.Blob + +$type:= Value type($myblobObject) // 38 (object) +$is4DBlob:= OB Instance of($myblobObject; 4D.Blob) //True +``` + +## Passing blobs as parameters + +Scalar blobs and blob objects can be passed as parameters to 4D commands or plug-in routines that expect blob parameters. + +### Passing blobs and blob objects to 4D commands + +You can pass a scalar blob or a `4D.Blob` to any 4D command that takes a blob as a parameter: + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text( $myBlob ; UTF8 text without length ) +``` + +Some 4D commands alter the original blob, and thus do not support the `4D.Blob` type: + +- [DELETE FROM BLOB](https://doc.4d.com/4dv19/help/command/en/page560.html) +- [INSERT IN BLOB](https://doc.4d.com/4dv19/help/command/en/page559.html) +- [INTEGER TO BLOB](https://doc.4d.com/4dv19/help/command/en/page548.html) +- [LONGINT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page550.html) +- [REAL TO BLOB](https://doc.4d.com/4dv19/help/command/en/page552.html) +- [SET BLOB SIZE](https://doc.4d.com/4dv19/help/command/en/page606.html) +- [TEXT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page554.html) +- [VARIABLE TO BLOB](https://doc.4d.com/4dv19/help/command/en/page532.html) +- [LIST TO BLOB](https://doc.4d.com/4dv19/help/command/en/page556.html) +- [SOAP DECLARATION](https://doc.4d.com/4dv19/help/command/en/page782.html) +- [WEB SERVICE SET PARAMETER](https://doc.4d.com/4dv19/help/command/en/page777.html) + +### Passing blobs and blob objects to methods + +You can pass blobs and blob objects (`4D.Blob`) to methods. Keep in mind that unlike blob objects, which are passed by reference, scalar blobs are duplicated in memory when passed to methods. + +### Passing a scalar blob by reference using a pointer + +To pass a scalar blob to your own methods without duplicating it in memory, define a pointer to the variable that stores it and pass the pointer as a parameter. **Examples:** + +```4d +// Declare a variable of type Blob +var $myBlobVar: Blob +// Pass the blob as parameter to a 4D command + SET BLOB SIZE($myBlobVar;1024*1024) +``` + ```4d - ` Declare a variable of type BLOB - C_BLOB(anyBlobVar) - ` The BLOB is passed as parameter to a 4D command - SET BLOB SIZE(anyBlobVar;1024*1024) - ` The BLOB is passed as parameter to an external routine - $errCode:=Do Something With This BLOB(anyBlobVar) - ` The BLOB is passed as a parameter to a method that returns a BLOB - C_BLOB(retrieveBlob) - retrieveBlob:=Fill_Blob(anyBlobVar) - ` A pointer to the BLOB is passed as parameter to a user method - COMPUTE BLOB(->anyBlobVar) +// Pass the blob as parameter to an external routine + $errCode:=Do Something With This blob($myBlobVar) ``` + +```4d +// Pass the blob as a parameter to a method that returns a blob + var $retrieveBlob: Blob + retrieveBlob:=Fill_Blob($myBlobVar) +``` + +```4d +// Pass a pointer to the blob as a parameter to your own method, +COMPUTE BLOB(->$myBlobVar) +``` + **Note for Plug-in developers:** A BLOB parameter is declared as “&O†(the letter “Oâ€, not the digit “0â€). -## Assignment operator +## Assigning a blob variable to another -You can assign BLOBs to each other. +You can assign a Blob variable to another: **Example:** + +```4d +// Declare two variables of type Blob + var $vBlobA; $vBlobB : Blob +// Set the size of the first blob to 10K + SET BLOB SIZE($vBlobA;10*1024) +// Assign the first blob to the second one + $vBlobB:=$vBlobA +``` + +## Automatic conversion of blob type + +4D automatically converts scalar blobs to blob objects, and vice versa, when they're assigned to each other. For example: + +```4d +// Create a variable of type Blob and an object variable +var $myBlob: Blob +var $myObject : Object + +// Assign that blob to a property of $myObject named "blob" +$myObject:=New object("blob"; $myBlob) + +// The blob stored in $myBlob is automatically converted to a 4D.Blob +$type:= OB Instance of($myObject.blob; 4D.Blob) //True + +// Conversion from 4D.Blob to Blob +$myBlob:= $myObject.blob +$type:= Value type($myBlob) // Blob +``` + +> When converting a `4D.Blob` to a scalar blob, if the size of the `4D.Blob` exceeds the maximum size for scalar blobs, the resulting scalar blob is empty. +> For example, when the maximum size for scalar blobs is 2GB, if you convert a `4D.Blob` of 2.5GB to a scalar blob, you obtain an empty blob. + +## Modifying a scalar blob + +Unlike blob objects, scalar blobs can be altered. For example: + ```4d - ` Declare two variables of type BLOB - C_BLOB(vBlobA;vBlobB) - ` Set the size of the first BLOB to 10K - SET BLOB SIZE(vBlobA;10*1024) - ` Assign the first BLOB to the second one - vBlobB:=vBlobA +var $myBlob : Blob +SET BLOB SIZE ($myBlob ; 16*1024) ``` -However, no operator can be applied to BLOBs. +## Individually accessing bytes in a blob + +#### Accessing a scalar blob's bytes -## Addressing BLOB contents +You can access individual bytes of a scalar blob using curly brackets. Within a blob, bytes are numbered from 0 to N-1, where N is the size of the BLOB: -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: ```4d - ` Declare a variable of type BLOB - C_BLOB(vBlob) - ` Set the size of the BLOB to 256 bytes - SET BLOB SIZE(vBlob;256) - ` The loop below initializes the 256 bytes of the BLOB to zero - For(vByte;0;BLOB size(vBlob)-1) - vBlob{vByte}:=0 + // Declare a variable of type Blob + var $vBlob : Blob + // Set the size of the blob to 256 bytes + SET BLOB SIZE($vBlob;256) + // The following code loops through the blob to set each byte to 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. + +Since you can address all the bytes of a blob individually, you can store whatever you want in a Blob variable or field. + +#### Accessing a `4D.Blob`'s bytes + +Use square brackets to directly access a specific byte in a `4D.Blob` + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text ( $myBlob ; UTF8 text without length ) +$byte:=$myBlob[5] +``` + +Since a `4D.Blob` cannot be altered, you can read the bytes of a `4D.Blob` using this syntax, but not modify them. diff --git a/docs/Concepts/dt_collection.md b/docs/Concepts/dt_collection.md index 2fa53514ecb6f3..7f77c95abd1f1d 100644 --- a/docs/Concepts/dt_collection.md +++ b/docs/Concepts/dt_collection.md @@ -3,9 +3,9 @@ id: collection title: Collection --- -Collections are ordered lists of values of similar or mixed types (text, number, object, boolean, collection, or null). +Collections are ordered lists of values of similar or mixed types (text, number, date, object, boolean, collection, or null). -To manage Collection type variables you must use object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). +Collection type variables are managed using object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). To access a collection element, you need to pass the element number inside square brackets: @@ -13,7 +13,7 @@ To access a collection element, you need to pass the element number inside squar collectionRef[expression] ``` -You can pass any valid 4D expression which returns a positive integer in expression. Examples: +You can pass any valid 4D expression which returns a positive integer in *expression*. Examples: ```4d myCollection[5] //access to 6th element of the collection @@ -22,7 +22,7 @@ You can pass any valid 4D expression which returns a positive integer in express **Warning:** Collection elements are numbered from 0. -You can assign a value to a collection element or get a collection element value using object notation: +You can assign a value to a collection element or get a collection element value: ```4d myCol[10]:="My new element" @@ -32,7 +32,7 @@ You can assign a value to a collection element or get a collection element value 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: ```4d - C_COLLECTION(myCol) + var myCol : Collection myCol:=New collection("A";"B") myCol[5]:="Z" //myCol[2]=null @@ -45,8 +45,9 @@ If you assign an element's index that surpasses the last existing element of the 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: + ```4d - C_COLLECTION($colVar) //creation of collection type 4D variable + var $colVar : Collection //creation of collection type 4D variable $colVar:=New collection //initialization of the collection and assignment to the 4D variable ``` @@ -54,17 +55,14 @@ Example: You can create two types of collections: -- 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. - -## Collection methods +- regular (non-shared) collections, using the [`New collection`](API/CollectionClass.md#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`](API/CollectionClass.md#new-shared-collection) command. These collections can be shared between processes, including preemptive threads. Access to these collections is controlled by [`Use...End use`](Concepts/shared.md#useend-use) structures. -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: +For more information, refer to the [Shared objects and collections](Concepts/shared.md) section. -> {$result:=}myCollection.memberFunction( {params} ) +## Collection functions -Note that, even if it does not have parameters, a member function must be called with () parenthesis, otherwise a syntax error is generated. +4D collection references benefit from special class functions (sometimes named *member functions*). Collection functions are listed in the [Class API Reference](API/CollectionClass.md) section. For example: @@ -73,7 +71,7 @@ $newCol:=$col.copy() //deep copy of $col to $newCol $col.push(10;100) //add 10 and 100 to the collection ``` -Some methods return the original collection after modification, so that you can run the calls in a sequence: +Some functions return the original collection after modification, so that you can run the calls in a sequence: ```4d $col:=New collection(5;20) @@ -84,12 +82,12 @@ Some methods return the original collection after modification, so that you can ### propertyPath parameter -Several methods accept a _propertyPath_ as parameter. This parameter stands for: +Several functions accept a _propertyPath_ as parameter. This parameter stands for: - 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". -**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: +**Warning:** When using functions and propertyPath parameters, you cannot use ".", "[ ]", or spaces in property names since it will prevent 4D from correctly parsing the path: ```4d $vmin:=$col.min("My.special.property") //undefined diff --git a/docs/Concepts/dt_date.md b/docs/Concepts/dt_date.md index a17702995f501a..1f2712531c9738 100644 --- a/docs/Concepts/dt_date.md +++ b/docs/Concepts/dt_date.md @@ -3,8 +3,9 @@ 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. +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. **Note:** In the 4D Language Reference manual, Date parameters in command descriptions are denoted as Date, except when marked otherwise. diff --git a/docs/Concepts/dt_null_undefined.md b/docs/Concepts/dt_null_undefined.md index d9a6ca2b790144..610f907157bd47 100644 --- a/docs/Concepts/dt_null_undefined.md +++ b/docs/Concepts/dt_null_undefined.md @@ -3,6 +3,8 @@ id: null-undefined title: Null and Undefined --- +Null and Undefined are data types that handle cases where the value of an expression is not known. + ## 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. 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 ac4fbc5c7f41ba..df0bc29adcb9ee 100644 --- a/docs/Concepts/dt_object.md +++ b/docs/Concepts/dt_object.md @@ -5,28 +5,30 @@ title: Object 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: -- A property name is always a text, for example "Name". +- A property name is always a text, for example "Name". It must follow [specific rules](identifiers.md#object-properties). - A property value can be of the following type: - number (Real, Integer, etc.) - text - null - - Boolean + - 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(*) + - object(1) (objects can be nested on several levels) + - picture(2) - collection -(*)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". +(1)ORDA objects such as [entities](ORDA/dsMapping.md#entity) or [entity selections](ORDA/dsMapping.md#entity-selection) cannot be stored in **object fields**; however, they are fully supported in **object variables** in memory. + +(2)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". **Warning:** Keep in mind that attribute names differentiate between upper and lower case. -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. +You manage Object type variables, fields or expressions using the [object notation](dt_object.md#syntax-basics) or the classic commands available in the **Objects (Language)** theme. 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. -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: +Each property value accessed through the object notation is considered an expression. You can use such values wherever 4D expressions are expected: -- 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 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). @@ -47,6 +49,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. @@ -94,6 +98,7 @@ Object notation is available on any language element that can contains or return - **4D commands** that return objects. Example: + ```4d $measures:=Get database measures.DB.tables ``` @@ -118,6 +123,7 @@ Object notation is available on any language element that can contains or return ``` ### 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. Using object notation with pointers is very similar to using object notation directly with objects, except that the "dot" symbol must be omitted. @@ -218,21 +224,9 @@ When expressions of a given type are expected in your 4D code, you can make sure //to avoid errors in the code ``` -## 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): - -- 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. - -**Note:** - -- 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. - ## Examples + Using object notation simplifies the 4D code while handling objects. Note however that the command-based notation is still fully supported. - Writing and reading objects (this example compares object notation and command notation): diff --git a/docs/Concepts/dt_string.md b/docs/Concepts/dt_string.md index 9d163484cce065..790233bacf0e14 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/dt_time.md b/docs/Concepts/dt_time.md index 4f38bd140c975a..2bf8d3276ed7c1 100644 --- a/docs/Concepts/dt_time.md +++ b/docs/Concepts/dt_time.md @@ -3,11 +3,13 @@ id: time title: Time --- -- 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. +A Time field, variable or expression can be in the range of 00:00:00 to 596,000:00:00. -**Note:** In the 4D Language Reference manual, Time parameters in command descriptions are denoted as Time, except when marked otherwise. +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. + +**Note:** In the *4D Language Reference* manual, Time parameters in command descriptions are denoted as Time, except when marked otherwise. ## Time literals diff --git a/docs/Concepts/error-handling.md b/docs/Concepts/error-handling.md index ec6f234438a107..0d1cebd06eac89 100644 --- a/docs/Concepts/error-handling.md +++ b/docs/Concepts/error-handling.md @@ -12,6 +12,14 @@ Error handling meets two main needs: >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. + +## Error or status + +Many 4D class functions, such as `entity.save()` or `transporter.send()`, return a *status* object. This object is used to store "predictable" errors in the runtime context, e.g. invalid password, locked entity, etc., that do not stop program execution. This category of errors can be handled by regular code. + +Other "unpredictable" errors include disk write error, network failure, or in general any unexpected interruption. This category of errors generates exceptions and needs to be handled through an error-handling method. + + ## Installing an error-handling method In 4D, all errors can be catched and handled in a specific project method, the **error-handling** (or **error-catching**) method. @@ -27,13 +35,7 @@ To stop catching errors and give back hand to 4D, call `ON ERR CALL` with an emp ON ERR CALL("") //gives back control to 4D ``` -### Scope and components - -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. - -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. - -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: +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 generic code because it enables you to temporarily change and then restore the error-catching method: ```4d $methCurrent:=Method called on error @@ -45,6 +47,13 @@ The `Method called on error` command allows to know the name of the method inst ``` +### Scope and components + +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. + +An error-handling method installed by the `ON ERR CALL` command only applies to the running application. In the case of an error generated by a **component**, the `ON ERR CALL` error-handling method of the host application is not called, and vice versa. + + ### Handling errors within the method Within the custom error method, you have access to several information that will help you identifying the error: @@ -58,7 +67,8 @@ Within the custom error method, you have access to several information that will (*) 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 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 5f51e756e81b4c..d825c2232161f2 100644 --- a/docs/Concepts/identifiers.md +++ b/docs/Concepts/identifiers.md @@ -2,223 +2,94 @@ id: identifiers title: Identifiers --- -This section describes the conventions and rules for naming various elements in the 4D language (variables, tables, objects, forms, etc.). +This section describes the conventions and rules for naming various elements in the 4D language (variables, object properties, tables, forms, etc.). -## Basic Rules -The following rules apply for all 4D frameworks. +> If non-Roman characters are used in the names of the identifiers, their maximum length may be smaller. -- 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. - -### Additional rules for object property and ORDA names -- Space characters are not allowed. -- Periods (".") and brackets ("[ ]") are not allowed. -- Names are case sensitive. - -### Additional rules for SQL -- Only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted -- Names must not include any SQL keywords (command, attribute, etc.). - -**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 - -You designate a table by placing its name between brackets: [...]. A table name can contain up to 31 characters. - -Examples: -```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. - -Examples: -```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. -The name of an interprocess variable can be up to 31 characters, not including the <> symbols. +## Arrays -Examples: -```4d -<>vlProcessID:=Current process -<>vsKey:=Char(KeyCode) -If(<>vtName#"") -``` +Array names follow the same rules as [variables](#variables). -## Process Variables -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. +## Classes -Examples: -```4d -<>vrGrandTotal:=Sum([Accounts]Amount) -If(bValidate=1) -vsCurrentName:="" -``` +The name of a class can contain up to 31 characters. -## 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. - -Examples: -```4d -For($vlRecord;1;100) -If($vsTempVar="No") -$vsMyString:="Hello there" -``` +A class name must be compliant with standard [property naming rules](#object-properties) for dot notation. -## Arrays +> Giving the same name to a class and a [database table](#tables) is not recommended, in order to prevent any conflict. -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. -### Interprocess Arrays -The name of an interprocess array is preceded by the symbols (<>) — a “less than†sign followed by a “greater than†sign. +## Functions -An interprocess array name can contain up to 31 characters, not including the <> symbols. +Function names must be compliant with standard [property naming rules](#object-properties) for dot notation. -Examples: -```4d -ARRAY TEXT(<>atSubjects;Records in table([Topics])) -SORT ARRAY(<>asKeywords;>) -ARRAY INTEGER(<>aiBigArray;10000) -``` +> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features in the 4D code editor. -### 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: -```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. +## Object properties -Examples: -```4d -ARRAY TEXT($atSubjects;Records in table([Topics])) -SORT ARRAY($asKeywords;>) -ARRAY INTEGER($aiBigArray;10000) -``` +The name of an object property (also called object *attribute*) can contain up to 255 characters. -### Elements of arrays -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. +Object properties can reference scalar values, ORDA elements, class functions, other objects, etc. Whatever their nature, object property names must follow the following rules **if you want to use the [dot notation](dt_object.md#object-properties)**: -Examples: -```4d - //Addressing an element of an interprocess array -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") -atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=aiBigArray{Size of array(aiBigArray)} - - //Addressing an element of a local array -If($asKeywords{1}="Stop") -$atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{Size of array($aiBigArray)} -``` +- A property name must begin with a letter, an underscore, or a dollar "$". +- Thereafter, the name can include any letter, digit, the underscore character ("_"), or the dollar character ("$"). +- Property names are case sensitive. -### 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: -```4d - //Addressing an element of a two-dimensional interprocess array -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") -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") -$atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{$vlSet}{Size of array($aiBigArray{$vlSet})} -``` - -## Object attributes -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: ```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). +> If you use **string notation** within square brackets, property names can contain any characters (ex: `myObject["1. First property"]`). -## Forms +See also [ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6). -You designate a form by using a string expression that represents its name. A form name can contain up to 31 characters. +## Parameters -Examples: -```4d -FORM SET INPUT([People];"Input") -FORM SET OUTPUT([People];"Output") -DIALOG([Storage];"Note box"+String($vlStage)) -``` +Parameter names must start with a `$` character and follow the same rules as [variable names](#variables). -## 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. +Examples: -Example: ```4d -OBJECT SET FONT(*;"Binfo";"Times") +Function getArea($width : Integer; $height : Integer)-> $area : Integer + +#DECLARE ($i : Integer ; $param : Date) -> $myResult : Object ``` -**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. ## Project methods -You designate a project method (procedure or function) by using its name. A method name can contain up to 31 characters. +The name of a project method name contain up to 31 characters. -**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. +- A project method name must begin with a letter, a digit, or an underscore +- Thereafter, the name can include any letter or digit, the underscore character ("_"), or the space character. +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Project method names are case insensitive. Examples: + ```4d If(New client) 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. +**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 returns a value, capitalize the first character of its name. By doing so, when you reopen a project 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: + > 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 plug-in commands, expect the name of a method as a string when a method parameter is passed. Examples: + ```4d //This command expects a method (function) or formula QUERY BY FORMULA([aTable];Special query) @@ -228,162 +99,80 @@ APPLY TO SELECTION([Employees];INCREASE SALARIES) 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. - -Inside a function, the $0 local variable contains the value to be returned. - -Examples: -```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 -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. - -Examples: -```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 -### Interprocess Sets -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. +## Tables and Fields -An interprocess set name can contain up to 255 characters, not including the <> symbols. +You designate a table by placing its name between brackets: \[...]. You designate a field by first specifying the table to which it belongs (the field name immediately follows the table name). -### Process Sets -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. +A table name and field name can contain up to 31 characters. -### Client Sets -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. +- A table or field name must begin with a letter, an underscore, or a dollar ("$") +- Thereafter, the name can include alphabetic characters, numeric characters, the space character, and the underscore character ("_"). +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Additional rules must be respected when the database must be handled via SQL: only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted, and the name must not include any SQL keywords (command, attribute, etc.). -**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. Examples: + ```4d - //Interprocess sets -USE SET("<>Deleted Records") -CREATE SET([Customers];"<>Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Process sets -USE SET("Deleted Records") -CREATE SET([Customers];"Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Client sets -USE SET("$Deleted Records") -CREATE SET([Customers];"$Customer Orders") -If(Records in set("$Selection"+String($i))>0) -``` +FORM SET INPUT([Clients];"Entry") +ADD RECORD([Letters]) +[Orders]Total:=Sum([Line]Amount) +QUERY([Clients];[Clients]Name="Smith") +[Letters]Text:=Capitalize text([Letters]Text) -## Named Selections +``` -From the scope point of view, there are two types of named selections: +> Giving the same name to a table and a [class](#classes) is not recommended, in order to prevent any conflict. -- Interprocess named selections -- Process named selections. +## Variables -### Interprocess Named Selections -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. +The name of a variable can be up to 31 characters, not including the scope symbols ($ or <>). -An interprocess named selection name can contain up to 255 characters, not including the <> symbols. +- A variable name must begin with a letter, an underscore, or a dollar ("$") for [parameters](parameters.md) and [local variables](variables.md#local-variables), or "<>" for [interprocess variables](variables.md#interprocess-variables). +- A digit as first character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Thereafter, the name can include any letter or digit, and the underscore character ("_"). +- Space character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Variable names are case insensitive. -### 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: + ```4d - //Interprocess Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") - //Process Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") +For($vlRecord;1;100) //local variable +$vsMyString:="Hello there" //local variable +var $vName; $vJob : Text //local variales +If(bValidate=1) //process variable +<>vlProcessID:=Current process() //interprocess variable ``` -## Processes - -In the single-user version, or in Client/Server on the Client side, there are two types of processes: +## Other names -- Global processes -- Local processes. +In the 4D language, several elements have their names handled as strings: **forms**, **form objects**, **named selections**, **processes**, **sets**, **menu bars**, etc. -### Global Processes -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. +Such string names can contain up to 255 characters, not including the "$" or "<>" characters (if any). -### Local Processes -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. +- String names can contain any characters. +- String names are case insensitive. Examples: + ```4d +DIALOG([Storage];"Note box"+String($vlStage)) +OBJECT SET FONT(*;"Binfo";"Times") +USE NAMED SELECTION([Customers];"Closed")//Process Named Selection +USE NAMED SELECTION([Customers];"<>ByZipcode") //Interprocess Named Selection //Starting the global process "Add Customers" $vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") //Starting the local process "$Follow Mouse Moves" $vlProcessID:=New process("P_MOUSE_SNIFFER";16*1024;"$Follow Mouse Moves") -``` +CREATE SET([Customers];"Customer Orders")//Process set +USE SET("<>Deleted Records") //Interprocess set +If(Records in set("$Selection"+String($i))>0) //Client set -## 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. +``` diff --git a/docs/Concepts/interpreted.md b/docs/Concepts/interpreted.md index 356b163f13098b..1a15f1ec8c2e3d 100644 --- a/docs/Concepts/interpreted.md +++ b/docs/Concepts/interpreted.md @@ -10,10 +10,10 @@ title: Interpreted and Compiled modes 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. +- **Speed**: Your application can run from 3 to 1,000 times faster. +- **Code checking**: Your application is scanned for the consistency of code. Both logical and syntactical conflicts are detected. +- **Protection**: Once your application is compiled, you can delete the interpreted code. Then, the compiled application 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 applications can also be transformed into stand-alone applications (.EXE files) with their own icon. - **Preemptive mode**: only compiled code can be executed in preemptive processes. ## Differences between interpreted and compiled code @@ -32,9 +32,9 @@ Although application will work the same way in interpreted and compiled modes, t ## 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. +Compiler directives are not required for uncompiled applications. The interpreter automatically types each variable according to how it is used in each statement, and a variable can be freely retyped throughout the application project. -Because of this flexibility, it is possible that a database can perform differently in interpreted and compiled modes. +Because of this flexibility, it is possible that an application can perform differently in interpreted and compiled modes. For example, if you write: @@ -42,7 +42,7 @@ For example, if you write: C_LONGINT(MyInt) ``` -and elsewhere in the database, you write: +and elsewhere in the project, you write: ```4d MyInt:=3.1416 ``` @@ -51,7 +51,7 @@ 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. +The order in which the two statements appear is irrelevant to the compiler, because it first scans the entire project 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 project so that your compiler directives are executed prior to any statements containing declared variables. ## Using pointers to avoid retyping diff --git a/docs/Concepts/methods.md b/docs/Concepts/methods.md index a3e35dd86fa0c1..8d5e2de0a8be4a 100644 --- a/docs/Concepts/methods.md +++ b/docs/Concepts/methods.md @@ -4,35 +4,41 @@ title: Methods --- -A method is basically a piece of code that executes one or several actions. In the 4D Language, there are two categories of methods: - -- **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. - -- **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. +A method is basically a piece of code that executes one or several actions. 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. 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 method is limited to 2 GB of text or 32,000 lines of code. -**Note:** 4D also provides specific methods that are automatically executed depending on database or form events. See [Specialized methods](#specialized-methods). +## Method Types + +In the 4D Language, there are several categories of methods. The category depends on how they can be called: + +|Type|Calling context|Accepts parameters|Description| +|----|-----|-----|----| +|**Project method**|On demand, when the project method name is called (see [Calling project methods](#calling-project-methods))|Yes|Can contain any code to execute any custom actions. Once a project method is created, it becomes part of the language of the project.| +|**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| + + +> The 4D Language also supports **Class functions**, that can be called in the context of an object instance. Class functions can be built-in (*e.g.* `collection.orderBy()` or `entity.save()`), or [created by the 4D developer](classes.md#class-function). ## Calling Project Methods 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 +- Subroutine +- Object formula - Menu method - Process method - Event or Error catching method -### Subroutines and functions +### Subroutines + 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. +When you create a project method, it becomes part of the language of the project in which you create it. You can then call the project method from another method (project method, object method...) in the same way that you call 4D’s built-in commands. A project method used in this way is called a subroutine. You use subroutines to: @@ -41,7 +47,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: +For example, let’s say you have a project of customers. As you customize the project, 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: ```4d // Look for a customer @@ -52,30 +58,31 @@ 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 there are ten places in your project 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 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: +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: ```4d - MODIFY CUSTOMER + 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. 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. -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. +If you need to change your method of finding customers in this example project, you will need to change only one method, not ten. 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. Consider the following code from a checking account project: ```4d - FIND CLEARED CHECKS ` Find the cleared checks - RECONCILE ACCOUNT ` Reconcile the account - PRINT CHECK BOOK REPORT ` Print a checkbook report + FIND_CLEARED_CHECKS //Find the cleared checks + RECONCILE_ACCOUNT //Reconcile the account + PRINT_CHECK_BOOK_REPORT //Print a checkbook report ``` -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. +Even for someone who doesn’t know the project, 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. + -### Methods attached to objects +### Object formulas You can encapsulate your project methods in **formula** objects and call them from your objects. @@ -87,7 +94,9 @@ To execute a method stored in an object property, use the **( )** operator after //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)) @@ -107,7 +116,9 @@ You can also [pass parameters](Concepts/parameters.md) to your formula when you 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)) @@ -115,6 +126,7 @@ $result:=$o.full_name("John";"Smith") //$result = "John Smith" // equivalent to $result:=fullName("param1";"param2") ``` + Combined with the `This`function, such object methods allow writing powerful generic code. For example: ```4d @@ -122,6 +134,7 @@ Combined with the `This`function, such object methods allow writing powerful gen 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 @@ -142,11 +155,11 @@ $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. By creating custom menus with menu methods that perform specific actions, you create custom interfaces for your desktop applications. 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. Using custom menus, you can automate task sequences and thus provide more guidance to users of the application. ### Process Methods @@ -233,15 +246,3 @@ Some typical uses of recursion in 4D are: - Browsing documents and folders on your disk, using the commands `FOLDER LIST` and `DOCUMENT LIST`. A folder may contain folders and documents, the subfolders can themselves contain folders and documents, and so on. **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: - -|Type|Calling context|Accepts parameters|Description| -|----|-----|-----|----| -|**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| diff --git a/docs/Concepts/parameters.md b/docs/Concepts/parameters.md index d5ed11a929cbd7..a27bb7d966d273 100644 --- a/docs/Concepts/parameters.md +++ b/docs/Concepts/parameters.md @@ -4,87 +4,191 @@ title: Parameters --- -## Using parameters +You'll often find that you need to pass data to your methods and functions. This is easily done with parameters. -You'll often find that you need to pass data to your methods. This is easily done with parameters. +## Overview -**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: +**Parameters** (or **arguments**) are pieces of data that a method or a class function 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: ```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: +Parameters are passed to methods or class functions in the same way. For example, if a class function named `getArea()` accepts two parameters, a call to the class function might look like this: -```4d -DO SOMETHING(WithThis;AndThat;ThisWay) ``` -The parameters are separated by semicolons (;). Their value is evaluated at the moment of the call. +$area:=$o.getArea(50;100) +``` -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. +Or, if a project method named `DO_SOMETHING` accepts three parameters, a call to the method might look like this: ```4d - //Code of the method DO SOMETHING - //Assuming all parameters are of the text type - 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 +DO_SOMETHING($WithThis;$AndThat;$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`). +The input parameters are separated by semicolons (;). The same principles are used when methods are executed through dedicated commands, for example: ```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 +EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/20!) +//pass the !05/05/20! date as parameter to the SetCalendarDate +//in the context of a subform ``` -**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). +Data can also be **returned** from methods and class functions. For example, the following line is a statement that uses the built-in command, `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: +```4d +MyLength:=Length("How did I get here?") +``` -### Supported expressions +Any subroutine can return a value. Only one single output parameter can be declared per method or class function. -You can use any [expression](Concepts/quick-tour.md#expression-types) as parameter, except: +Input and output values are [evaluated](#values-or-references) at the moment of the call and copied into local variables within the called class function or method. Two syntaxes are proposed to declare variable parameters in the called code: + +- [named variables](#named-parameters) (recommended in most cases) or +- [sequentially numbered variables](#sequential-parameters). + + +Both [named](#named-parameters) and [sequential](#sequential-parameters) syntaxes can be mixed with no restriction to declare parameters. For example: + +```4d +Function add($x : Integer) + var $0;$2 : Integer + $0:=$x+$2 +``` -- tables -- arrays -Tables or array expressions can only be passed [as reference using a pointer](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). -## Functions +## Named parameters -Data can be returned from methods. A method that returns a value is called a function. +Inside called methods or class functions, parameter values are assigned to local variables. You can declare parameters using a **parameter name** along with a **parameter type**, separated by colon. -4D or 4D Plug-in commands that return a value are also called functions. +- For class functions, parameters are declared along with the `Function` keyword. +- For methods (project methods, form object methods, database methods, and triggers), parameters are declared using the `#DECLARE` keyword at the beginning of the method code. -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: +Examples: ```4d -MyLength:=Length("How did I get here?") +Function getArea($width : Integer; $height : Integer) -> $area : Integer +``` + +```4d + //myProjectMethod +#DECLARE ($i : Integer) -> $myResult : Object +``` + + +The following rules apply: + +- The declaration line must be the first line of the method or function code, otherwise an error is displayed (only comments or line breaks can precede the declaration). +- Parameter names must start with a `$` character and be compliant with [property naming rules](dt_object.md#object-property-identifiers). +- Multiple parameters (and types) are separated by semicolons (;). +- Multiline syntaxes are supported (using "\\" character). + + +For example, when you call a `getArea()` function with two parameters: + +```4d +$area:=$o.getArea(50;100) +``` + +In the class function code, the value of each parameter is copied into the corresponding declared parameter: + +```4d +// Class: Polygon +Function getArea($width : Integer; $height : Integer)-> $area : Integer + $area:=$width*$height +``` + +>If the type is not defined, the parameter will be defined as [`Variant`](dt_variant.md). + +All 4D method kinds support the `#DECLARE` keyword, including database methods. For example, in the `On Web Authentication` database method, you can declare named parameters: + +```4d + // On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean +$entitySelection:=ds.User.query("login=:1"; $user) +// Check hash password... +``` + +### Returned value + +You declare the return parameter of a function by adding an arrow (->) and the parameter definition after the input parameter(s) list. For example: + +```4d +Function add($x : Variant; $y : Integer) -> $result : Integer +``` + +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through `$0` ([see sequential syntax below](#returned-value-1)). For example: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + +### Supported data types + +With named parameters, you can use the same data types as those which are [supported by the `var` keyword](variables.md#using-the-var-keyword), including class objects. For example: + +```4d +Function saveToFile($entity : cs.ShapesEntity; $file : 4D.File) ``` -Any subroutine can return a value. The value to be returned is put into the local variable `$0`. -For example, the following function, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: + + + +## Sequential parameters + +As an alternative to [named parameters](#named-parameters) syntax, you can declare parameters using sequentially numbered variables: **$1**, **$2**, **$3**, and so on. The numbering of the local variables represents the order of the parameters. + +> Although this syntax is supported by class functions, it is recommended to use [named parameters](#named-parameters) syntax in this case. + +For example, when you call a `DO_SOMETHING` project method with three parameters: + +```4d +DO_SOMETHING($WithThis;$AndThat;$ThisWay) +``` + +In the method code, the value of each parameter is automatically copied into $1, $2, $3 variables: + +```4d + //Code of the method DO_SOMETHING + //Assuming all parameters are of the text type + 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 +``` + + +### Returned value + +The value to be returned is automatically put into the local variable `$0`. + + +For example, the following method, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: ```4d $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -The following is an example that uses the Uppercase4 function: +The following is an example that uses the Uppercase4 method: ```4d -NewPhrase:=Uppercase4("This is good.") +$NewPhrase:=Uppercase4("This is good.") ``` -In this example, the variable *NewPhrase* gets “THIS is good.†+In this example, the variable *$NewPhrase* gets “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, you can write: +The returned value, `$0`, is a local variable within the subroutine. It can be used as such within the subroutine. For example, you can write: ```4d // Do_something @@ -95,23 +199,95 @@ ALERT($0) In this example, `$0` is 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. -## Declaring parameters +### Supported data types + +You can use any [expression](quick-tour.md#expression-types) as sequential parameter, except: + +- tables +- arrays + +Tables or array expressions can only be passed [as reference using a pointer](dt_pointer.md#pointers-as-parameters-to-methods). + +## Parameter indirection (${N}) + +4D project methods accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression. `${N}` is called a **generic parameter**. + -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. -In the following example, the `OneMethodAmongOthers` project method declares three parameters: +### Using generic parameters + +For example, consider a method 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. + +Here is the method, named `MySum`: ```4d - // OneMethodAmongOthers Project Method - // 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 + #DECLARE($format : Text) -> $result : Text + $sum:=0 + For($i;2;Count parameters) + $sum:=$sum+${$i} + End for + $result:=String($sum;$format) ``` -In the following example, the `Capitalize` project method accepts a text parameter and returns a text result: +The method's parameters must be passed in the correct order, first the format and then a variable number of values: + +```4d + Result:=MySum("##0.00";125,2;33,5;24) //"182.70" + Result:=MySum("000";1;2;200) //"203" +``` + +Note that even if you declared 0, 1, or more parameters in the method, you can always pass the number of parameters that you want. Parameters are all available within the called method through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using a [compiler directive](#declaring-generic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command. For example: + +```4d +//foo method +#DECLARE($p1: Text;$p2 : Text; $p3 : Date) +For($i;1;Count parameters) + ALERT("param "+String($i)+" = "+String(${$i})) +End for +``` + +This method can be called: + +```4d +foo("hello";"world";!01/01/2021!;42;?12:00:00?) //extra parameters are passed +``` + +> 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. + + +### 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. Non-declared generic parameters automatically get the [Variant](dt_variant.md) type. + +To declare generic parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter. + +```4d + C_TEXT(${4}) +``` + +> Declaring generic parameters can only be done with the [sequential syntax](#sequential-parameters). + +This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of text 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 text, even if for you it was, for instance, of the data type Real. + +> The number in the declaration has to be a constant and not a variable. + + + + + +## Declaring parameters for compiled mode + +Even if it is not mandatory in [interpreted mode](interpreted.md), you must declare each parameter in the called methods or functions to prevent any trouble. + +When using the [named variable syntax](#named-parameters), parameters are automatically declared through the `#DECLARE` keyword or `Function` prototype. For example: + +```4d +Function add($x : Variant; $y : Integer)-> $result : Integer + // all parameters are declared with their type +``` + + +When using the [sequential variable syntax](#sequential-parameters), you need to make sure all parameters are properly declared. In the following example, the `Capitalize` project method accepts a text parameter and returns a text result: ```4d // Capitalize Project Method @@ -142,28 +318,29 @@ 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: -```4d +> 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: +```4d + // Compiler_method C_REAL(OneMethodAmongOthers;$1) ``` -See [Interpreted and compiled modes](Concepts/interpreted.md) page for more information. +See [Interpreted and compiled modes](interpreted.md) page for more information. 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): +- 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): ```4d // 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. +> You can also use [named parameters](#named-parameters) with the `#DECLARE` keyword. -- 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 declare it, you must do so in the object method. +- 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 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) If(Form event=On Drag Over) @@ -176,84 +353,40 @@ The $0 parameter (Longint), which is the result of the `On Drag Over` form event End if ``` -## Values or references - -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: - -```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) - - //Here is the code of the method 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`. -There are two ways to make the method `DO_SOMETHING` change the value of the field: +## Wrong parameter type -1. Rather than passing the field to the method, you pass a pointer to it, so you would write: +Calling a parameter with an wrong type is an [error](error-handling.md) that prevents correct execution. For example, if you write the following methods: ```4d - //Here is some code from the method MY_METHOD - DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Last Name) - - //Here the code of the method DO_SOMETHING - $1->:=Uppercase($1->) - ALERT($1->) +// method1 +#DECLARE($value : Text) ``` -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". - -2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: - ```4d - //Here is some code from the method MY METHOD - [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Name) - - //Here the code of the method DO SOMETHING - $0:=Uppercase($1) - ALERT($0) +// method2 +method1(42) //wrong type, text expected ``` -This second technique of returning a value by a subroutine is called “using a function.†This is described in the [Functions](#functions) paragraph. +This case is handled by 4D depending on the context: +- in [compiled projects](interpreted.md), an error is generated at the compilation step whenever possible. Otherwise, an error is generated when the method is called. +- in interpreted projects: + + if the parameter was declared using the [named syntax](#named-parameters) (`#DECLARE` or `Function`), an error is generated when the method is called. + + if the parameter was declared using the [sequential syntax](#sequential-parameters) (`C_XXX`), no error is generated, the called method receives an empty value of the expected type. -### Particular cases: objects and collections -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*). - -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. - -For example, consider the `CreatePerson` method that creates an object and sends it as a parameter: -```4d - //CreatePerson - C_OBJECT($person) - $person:=New object("Name";"Smith";"Age";40) - ChangeAge($person) - ALERT(String($person.Age)) -``` -The `ChangeAge` method adds 10 to the Age attribute of the received object -```4d - //ChangeAge - C_OBJECT($1) - $1.Age:=$1.Age+10 - ALERT(String($1.Age)) -``` +## Input/Output variables -When you execute the `CreatePerson` method, both alert boxes will read "50" since the same object reference is handled by both methods. +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`). -**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 +## Using object properties as named parameters Using objects as parameters allow you to handle **named parameters**. This programming style is simple, flexible, and easy to read. @@ -261,16 +394,17 @@ For example, using the `CreatePerson` method: ```4d //CreatePerson - C_OBJECT($person) + var $person : Object $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) ALERT(String($person.Age)) ``` + In the `ChangeAge` method you can write: ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=$para.Age+10 ALERT($para.Name+" is "+String($para.Age)+" years old.") @@ -285,7 +419,7 @@ In the `ChangeAge` method above, both Age and Name properties are mandatory and ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=Num($para.Age)+10 ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") @@ -299,7 +433,7 @@ $person:=New object("Name";"Smith";"Age";40;"toAdd";10) ChangeAge($person) //ChangeAge -C_OBJECT($1;$para) +var $1;$para : Object $para:=$1 If ($para.toAdd=Null) $para.toAdd:=10 @@ -307,22 +441,37 @@ End if $para.Age:=Num($para.Age)+$para.toAdd ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` + 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. 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: + ```4d ALERT("Are you sure?";"Yes I am") //2 parameters ALERT("Time is over") //1 parameter ``` -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. +4D methods and functions also accept such optional parameters. You can declare any number of parameters. If you call a method or function with less parameters than declared, missing parameters are processed as default values in the called code, [according to their type](data-types.md#default-values). For example: -> 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. +```4d +// "concate" function of myClass +Function concate ($param1 : Text ; $param2 : Text)->$result : Text +$result:=$param1+" "+$param2 +``` +```4d + // Calling method + $class:=cs.myClass.new() + $class.concate("Hello") // "Hello " + $class.concate() // Displays " " +``` + +> You can also call a method or function with more parameters than declared. They will be available within the called code through the [${N} syntax](#parameter-indirection-n). 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. @@ -333,15 +482,14 @@ The following example displays a text message and can insert the text into a doc // APPEND TEXT ( Text { ; Text { ; Object } } ) // APPEND TEXT ( Message { ; Path { ; 4DWPArea } } ) - C_TEXT($1;$2) - C_OBJECT($3) + Method($message : Text; $path : Text; $wpArea : Object) - ALERT($1) + ALERT($message) If(Count parameters>=3) - WP SET TEXT($3;$1;wk append) + WP SET TEXT($wpArea;$1;wk append) Else If(Count parameters>=2) - TEXT TO DOCUMENT($2;$1) + TEXT TO DOCUMENT($path;$message) End if End if ``` @@ -353,65 +501,84 @@ APPEND TEXT(vtSomeText;$path) //Displays text message and appends it to document APPEND TEXT(vtSomeText;"";$wpArea) //Displays text message and writes it to $wpArea ``` +> When optional parameters are needed in your methods, you might also consider using [object properties as named parameters](#using-objects-properties-as-named-parameters) which provide a flexible way to handle variable numbers of parameters. + -## 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. +## Values or references -In the following example, the project method `SEND PACKETS` accepts a time parameter followed by a variable number of text parameters: +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 local variables in the class function or subroutine. 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 class function/subroutine, it does not change the value in the calling method. For example: ```4d - //SEND PACKETS Project Method - //SEND PACKETS ( Time ; Text { ; Text2... ; TextN } ) - //SEND PACKETS ( docRef ; Data { ; Data2... ; DataN } ) - - C_TIME($1) - C_TEXT(${2}) - C_LONGINT($vlPacket) + //Here is some code from the method MY_METHOD +DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" +ALERT([People]Name) - For($vlPacket;2;Count parameters) - SEND PACKET($1;${$vlPacket}) - End for + //Here is the code of the method DO_SOMETHING + $1:=Uppercase($1) + ALERT($1) ``` -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**. +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`. -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. +There are two ways to make the method `DO_SOMETHING` change the value of the field: -This function is called in the following manner: +1. Rather than passing the field to the method, you pass a pointer to it, so you would write: ```4d - Result:=MySum("##0.00";125,2;33,5;24) - + //Here is some code from the method MY_METHOD + DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Last Name) + + //Here the code of the method DO_SOMETHING + $1->:=Uppercase($1->) + ALERT($1->) ``` -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 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". + +2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: -Here is the function, named `MySum`: ```4d - $Sum:=0 - For($i;2;Count parameters) - $Sum:=$Sum+${$i} - End for - $0:=String($Sum;$1) + //Here is some code from the method MY METHOD + [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Name) + + //Here the code of the method DO SOMETHING + $0:=Uppercase($1) + ALERT($0) ``` -This function can now be called in various ways: +This second technique of returning a value by a subroutine is called “using a function.†This is described in the [Returning values](#returning-values) paragraph. -```4d - Result:=MySum("##0.00";125,2;33,5;24) - Result:=MySum("000";1;18;4;23;17) -``` +### Particular cases: objects and collections -### Declaring generic parameters +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*). + +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](dt_pointer.md#pointers-as-parameters-to-methods), except that `$1, $2...` parameters do not need to be dereferenced in the subroutine. -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. +For example, consider the `CreatePerson` method that creates an object and sends it as a parameter: ```4d - C_LONGINT(${4}) + //CreatePerson + var $person : Object + $person:=New object("Name";"Smith";"Age";40) + ChangeAge($person) + ALERT(String($person.Age)) +``` + +The `ChangeAge` method adds 10 to the Age attribute of the received object + +```4d + //ChangeAge + #DECLARE ($person : Object) + $person.Age:=$person.Age+10 + ALERT(String($person.Age)) ``` -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. +When you execute the `CreatePerson` method, both alert boxes will read "50" since the same object reference is handled by both methods. + +**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. + -**Note:** The number in the declaration has to be a constant and not a variable. diff --git a/docs/Concepts/plug-ins.md b/docs/Concepts/plug-ins.md index 9184ceadb22eae..f472a6455ba288 100644 --- a/docs/Concepts/plug-ins.md +++ b/docs/Concepts/plug-ins.md @@ -30,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. 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 application. ## How to create a plug-in? @@ -43,19 +43,19 @@ 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. 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. -You can put the PlugIns folder in two different places: +You can put the Plugins folder in two different places: - 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. + - Under macOS: at the first level of the Contents folder inside the application package. +In this case, plug-ins are available in every project opened by this application. +- At the same level as the Project folder. In this case, plug-ins are only available in this particular project. 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 +Then open your project 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 diff --git a/docs/Concepts/quick-tour.md b/docs/Concepts/quick-tour.md index 5b96243173eaef..4e58e008ba69cf 100644 --- a/docs/Concepts/quick-tour.md +++ b/docs/Concepts/quick-tour.md @@ -232,7 +232,7 @@ This.width:=$2 This.name:="Rectangle" ``` -A class can inherit from another class by using `Class inherits `. Superclasses can be called using the `Super` command. For example: +A class can extend another class by using `Class extends `. Superclasses can be called using the `Super` command. For example: ```4d //in the Square.4dm file diff --git a/docs/Concepts/shared.md b/docs/Concepts/shared.md index 68de1a60bf4eea..07377ab563f545 100644 --- a/docs/Concepts/shared.md +++ b/docs/Concepts/shared.md @@ -3,7 +3,6 @@ id: shared title: Shared objects and collections --- -## Overview **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: @@ -15,12 +14,14 @@ Shared objects and shared collections can be stored in variables declared with s 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. +A unique, global catalog returned by the `Storage` command is always available throughout the application and its components, and can be used to store all shared objects and collections. ## Using shared objects or collections + 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, @@ -35,11 +36,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` locks the shared object/collection from other threads, while `End use` unlocks the shared object/collection (if the locking counter is at 0, see below). . 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. +- Calling `Use` on a shared object/collection belonging to a group locks properties/elements of all shared objects/collections of the group and increments its locking counter. Calling `End use` decrements the locking counter of the group and when the counter is at 0, all the linked shared objects/collections are unlocked. - 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. @@ -48,14 +49,17 @@ 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 + 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. ### 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. @@ -63,6 +67,7 @@ Note that, unlike standard shared objects, the `storage` object does not create For more information, refer to the `Storage` command description. ## Use...End use + The formal syntax of the `Use...End use` structure is: ```4d @@ -79,8 +84,8 @@ Shared objects and shared collections are designed to allow communication betwee - 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. +- The **End use** line unlocks the _Shared_object_or_Shared_collection_ properties and all objects of the same group. +- Several **Use...End use** structures can be nested in the 4D code. In the case of a group, each **Use** increments the locking counter of the group and each **End use** decrements it; all properties/elements will be released only when the last **End use** call sets the locking counter to 0. **Note:** If a collection method modifies a shared collection, an internal **Use** is automatically called for this shared collection while the function is executed. diff --git a/docs/Concepts/variables.md b/docs/Concepts/variables.md index 1b4f5f1d134956..f55986c964926b 100644 --- a/docs/Concepts/variables.md +++ b/docs/Concepts/variables.md @@ -7,7 +7,7 @@ Data in 4D is stored in two fundamentally different ways. **Fields** store data When you set up your 4D database, you specify the names and types of fields that you want to use. Variables are much the same—you also give them names and different types (see [Data types](Concepts/data-types.md)). -Once created, you can use a variable wherever you need it in your database. For example, you might need to store a text variable in a field of same type: +Once created, you can use a variable wherever you need it in your application. For example, you might need to store a text variable in a field of same type: ```4d [MyTable]MyField:=MyText @@ -21,7 +21,7 @@ Variables are language objects; you can create and use variables that will never You create variables by declaring them. The 4D language offers two ways to declare variables: - using the `var` keyword (recommended, specially if your code uses objects and classes), -- using one of the "Compiler" or "Arrays" theme 4D language commands (deprecated, classic language only). +- using one of the "Compiler" or "Arrays" theme 4D language commands (classic language only). **Note:** Although it is usually not recommended, you can create basic variables simply by using them; you do not necessarily need to formally define them. For example, to declare a variable that will hold the current date plus 30 days, you can write: @@ -38,13 +38,13 @@ Declaring variables using the `var` keyword is recommended since this syntax all To declare a variable of any type with the `var` keyword, use the following syntax: -` var {, ,...}{ : }` +` var {; ;...}{ : }` For example: ```4d var $myText : Text //a text variable -var myDate1, myDate2 : Date //several date variables +var myDate1; myDate2 : Date //several date variables var $myFile : 4D.File //a file class object variable var $myVar //a variant variable ``` @@ -63,27 +63,27 @@ The following table lists all supported `varType` values: |varType|Contents| |---|---| -|Text|Text value| -|Date|Date value| -|Time|Time value| -|Boolean|Boolean value| -|Integer|Long integer value| -|Real|Real value| -|Pointer|Pointer value| -|Picture|Picture value| -|Blob|BLOB value| -|Collection|Collection value| -|Variant|Variant value| -|Object|Object with default class (4D.Object)| -|4D.\|Object of the 4D class name| -|cs.\|Object of the user class name| +|`Text`|Text value| +|`Date`|Date value| +|`Time`|Time value| +|`Boolean`|Boolean value| +|`Integer`|Long integer value| +|`Real`|Real value| +|`Pointer`|Pointer value| +|`Picture`|Picture value| +|`Blob`|BLOB value| +|`Collection`|Collection value| +|`Variant`|Variant value| +|`Object`|Object with default class (4D.Object)| +|`4D.`|Object of the 4D class name| +|`cs.`|Object of the user class name| #### Examples - To declare local and process basic variables: ```4d -var $myText, myText, $vt : Text +var $myText; myText; $vt : Text var myVar //variant var $o : Object @@ -110,7 +110,7 @@ var $entity : cs.EmployeeEntity ### Using a C_ directive -> **Compatibility Note:** This feature is deprecated as of 4D v18 R3. It is now recommended to use the [var](#using-the-var-keyword) keyword. +> **Compatibility Note:** This feature is not recommended to declare variables inside methods. It is recommended to use the [var](#using-the-var-keyword) keyword. Directives from the "Compiler" theme commands allow you to declare variables of basic types. @@ -128,10 +128,9 @@ The following are some basic variable declarations: 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 ``` -**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). +**Note:** Arrays are a particular type of variables (an array is an ordered series of variables of the same type). Arrays are declared with specific commands, such as `ARRAY LONGINT(alAnArray;10)`. For more information, please refer to [Arrays](Concepts/arrays.md). ## Assigning Data @@ -178,9 +177,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. +When you are working in an application project 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. -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: +Frequently, in an application, 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: ```4d $vsID:=Request("Please enter your ID:") @@ -211,7 +210,7 @@ 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. +Interprocess variables are available throughout the project and are shared across all cooperative processes. 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. diff --git a/docs/Debugging/basics.md b/docs/Debugging/basics.md new file mode 100644 index 00000000000000..9dc7d047a181ba --- /dev/null +++ b/docs/Debugging/basics.md @@ -0,0 +1,97 @@ +--- +id: basics +title: Basics +--- + +Errors are common. It would be unusual to write a substantial number of lines of code without generating any errors. Conversely, treating and/or fixing errors is normal, too! + +The 4D development environment provides several debugging tools for all types of errors. + +## Error types + +### Typing errors + +Typing errors are detected by the Method editor. They are displayed in red and additional information is provided at the bottom of the window. Here's a typing error: + +![break-point](assets/en/Debugging/typing-error.png) + + +Such typing errors usually cause syntax errors (in the above image, the name of the table is unknown). You get the description of the error when you validate the line of code. When this occurs, fix the typing error and type Enter to validate the fix. + +### Syntax Errors + +Some errors can be caught only when you execute the method. The [Syntax Error Window](#syntax-error-window) appears when an error occurs during code execution. For example: + +![syntax-error](assets/en/Debugging/syntax-error.png) + +Expand the **Details** area to display the last error and its number. + +### Environmental Errors + +Occasionally, there may not be enough memory to create a BLOB. Or, when you access a document on disk, the document may not exist or may already be opened by another application. These environmental errors do not directly occur because of your code or the way you wrote it. Most of the time, these errors are easy to treat with an [error catching method](Concepts/error-handling.md) installed using the `ON ERR CALL` command. + +### Design or Logic Errors + +These are generally the most difficult type of error to find. Except for typing errors, all the error types listed above are to a certain extent covered by the expression "Design or logic error". Use the [Debugger](debugger.md) to detect them. For example: + +- A *syntax error* may occur when you try to use a variable that is not yet initialized. +- An *environmental error* can occur when you try to open a document, because that document's name is received by a subroutine that did not get the right value as a parameter. + +Design or logic errors also include such situations as: + +- A record is not properly updated because, while calling `SAVE RECORD`, you forgot to first test whether or not the record was locked. +- A method does not do exactly what you expect, because the presence of an optional parameter is not tested. + +Sometimes the piece of code that displays the error may be different than the code that is actually the origin of the problem. + +### Runtime Errors + +In Application mode, you might obtain errors that you don't see in interpreted mode. Here's an example: + +![runtime-error](assets/en/Debugging/runtimeError.png) + +To quickly find the origin of the problem, reopen the interpreted version of the structure file, open the method and go to the corresponding line. + +## Syntax Error Window + +The Syntax error window automatically appears when the execution of a method is interrupted. This can happen when: + +- an error prevents further code execution +- the method produces a false assertion (see the `ASSERT` command) + +![syntax-error](assets/en/Debugging/syntax-error.png) + +The upper text area displays a message describing the error. The lower text area shows the line that was executing when the error occurred; the area where the error occurred is highlighted. The expanded Details section contains the "stack" of errors related to the process. + +The syntax error window proposes several options: + +- **Edit**: Stops all method execution. 4D switches to the Design environment and the method with the error opens in the Method editor, allowing you to fix it. Use this option when you immediately recognize the mistake and can fix it without further investigation. + +- **Trace**: Enters Trace/Debugger mode. The [Debugger](debugger.md) window is displayed. If the current line has only executed partially, you may have to click the **Trace** button several times. + +- **Continue**: Execution continues. The line with the error may be partially executed, depending on where the error is located. Continue with caution: the error may prevent the rest of your method from executing properly. We recommend clicking **Continue** only if the error is in a trivial call (such as `SET WINDOW TITLE`) that does not prevent executing and testing the rest of your code. + +> Tip: To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error. + +- **Abort**: Stops method execution and returns to the state before the method started executing: + + - If a form method or object method is executing in response to an event, it is stopped and you return to the form. + - If the method is executing from within the Application environment, you return to that environment. + +- **Copy**: Copies the debugging information into the clipboard. The info describes the internal environment of the error (number, internal component, etc.). It is formatted as tabbed text. + +- **Save...**: Saves the contents of the syntax error window and the call chain in a `.txt` file. + +## Debugger + +A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Method Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the **Debugger**. + +The Debugger allows you to step through methods slowly. It displays all the information you need in order to understand why an error occurred. Once you have this information, you know how to fix the error. + +Another reason to use the Debugger is for developing code. Sometimes you may write an algorithm that is more complex than usual. Despite all feelings of accomplishment, you can't be totally sure that your coding is 100% correct. Instead of running it "blind", you can use the `TRACE` command at the beginning of your code, then execute it step by step to keep an eye on what happens. + +## Breaks + +In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. "$myVar > 1000"), or every time a specific 4D command is called. + +These needs are covered by **breakpoints** and **command catching** features. They can be configured from the method editor, the debugger, or the Runtime Explorer. \ No newline at end of file diff --git a/docs/Debugging/breakpoints.md b/docs/Debugging/breakpoints.md new file mode 100644 index 00000000000000..1de92fa8d3524e --- /dev/null +++ b/docs/Debugging/breakpoints.md @@ -0,0 +1,126 @@ +--- +id: breakpoints +title: Breakpoints and Command Catching +--- + +## Overview + + +Breakpoints and command catching are very efficient debugging techniques. Both have the same effect: they pause the code execution (and display the debugger window if not already displayed) at a desired step. + +You set breakpoints on any line of code where you want the execution to be paused. You can associate a condition to the break point. + +Catching a command enables you to start tracing the execution of any process as soon as a command is called by that process. + + + +## Breakpoints + + +To create a break point, click in the left margin of the Source Code pane in the debugger or in the Method editor. + +In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If ($in.dataClass#Null)`: + +![break-point](assets/en/Debugging/break.png) + +In the above example, clicking the [**No Trace**](./debugger.md/#no-trace) button resumes normal execution up to the line marked with the break point. That line is not executed itself — you are taken back to trace mode. Setting a break point beyond the program counter and clicking the **No Trace** button allows you to skip portions of the method being traced. + +To remove a break point, click the corresponding bullet. + + +### Breakpoint Properties + +You can edit the behavior of a breakpoint using the Breakpoint Properties window: + +![breakpoint-properties](assets/en/Debugging/breakpoint-properties.png) + +This window is available from the Method Editor or the [Source Code Pane](debugger.md#source-code-pane). You can: + +- right-click a line and select **Edit Breakpoint** in the contextual menu, or +- `Alt+click` (Windows) or `Option+click` (macOS) in the left margin. + +If a break point already exists, the window is displayed for that break point. Otherwise, a break point is created and the window is displayed for the newly created break point. + +Here is a description of the properties: + +* **Location**: indicates the name of the method and the line number attached to the breakpoint. +* **Break when following expression is true**: You can create **conditional breakpoints** by entering a 4D formula that returns `True` or `False`. For example, insert `Records in selection(\[aTable])=0` to make sure the break occurs only if there no record selected for the table \[aTable]. Breakpoint conditions are available in the **Condition** column of the [Break list](#break-list). +* **Number of times to skip before breaking**: You can attach a breakpoint to a line located in a loop structure (While, Repeat, or For) or located in subroutine or function called from within a loop. +* **Breakpoint is disabled**: If you currently do not need a break point, but might need it later, you can temporarily disable it. A disabled break point appears as a dash (-) instead of a bullet (•)| + + +### Breakpoints in remote debugging + +The break point list is stored locally. In remote debugging mode, if the attached debugger is a remote 4D, the remote break point list replaces temporarily the server break point list during the debugging session. + +The server break point list is automatically restored if it becomes again the attached debugger. + +### Break List + +The Break list is a page of the Runtime Explorer that lets you manage the breakpoints created in the Debugger Window or in the Method Editor. For more information on the Runtime Explorer, see its dedicated page in [the Design reference manual](https://doc.4d.com/4Dv19/4D/19/Runtime-Explorer.200-5416614.en.html). + +To open the Break list page: + +1. From the **Run menu**, click **Runtime Explorer...** + +2. Click the **Break** tab to display the Break list: + +![break-list-runtime-explorer](assets/en/Debugging/break-list.png) + +Using this window, you can: + +* Set conditions for breakpoints in the **Conditions** column +* Enable or disable breakpoints by clicking the bullets in the margin. Disabled breakpoints display transparent bullets +* Delete breakpoints by pressing the `Delete` or `Backspace` key, or click on the **Delete** button below the list. +* Open the methods where the breakpoint are located by double-clicking any line in the list + +You cannot add new breakpoints from this window. Breakpoints can only be created from within the Debugger window or the Method Editor. + + +## Catching Commands + +The **Catch** tab of the Runtime Explorer lets you add additional breaks to your code by catching calls to 4D commands. Unlike a break point, which is located in a particular project method (and therefore triggers a trace exception only when it is reached), the scope of catching a command includes all the processes that execute 4D code and call that command. + +Catching a command is a convenient way to trace large portions of code without setting break points at arbitrary locations. For example, if a record that should not be deleted is deleted after you've executed one or several processes, you can try to reduce the field of your investigation by catching commands such as `DELETE RECORD` and `DELETE SELECTION`. Each time these commands are called, you can check if the record in question has been deleted, and thus isolate the faulty part of the code. + +Feel free to combine breakpoints and command catching. + +To open the Caught Commands page: + +1. Choose **Run** > **Runtime explorer...** to open the Runtime Explorer. + +2. Click **Catch** to display the Caught Commands List: + +![runtime-explorer-window](assets/en/Debugging/catch-command.png) + +This page lists the commands to be caught during execution. It is composed of two columns: + +* The left column displays the Enable/Disable status of the caught command, followed by the name of the command +* The right column displays the condition associated with the caught command, if any + +To add a command to be caught: + +1. Click on the **Add New Catch** button (in the shape of a +) located below the list. A new entry is added to the list with the `ALERT` command as default +2. Click the **ALERT** label, type the name of the command you want to catch, then press **Enter**. + +To enable or disable a caught command, click on the bullet (•) in front of the command label. +The bullet is transparent when the command is disabled. + +> Disabling a caught command has almost the same effect as deleting it. During execution, the debugger spends almost no time on the entry. The advantage of disabling an entry is that you do not have to recreate it when you need it again. + +To delete a caught command: + +1. Select a command in the list. +2. Press **Backspace** or **Delete** on your keyboard or click on the **Delete** button beneath the list (**Delete All** removes all commands in the list). + +### Setting a Condition for catching a command + +1. Click on the entry in the right column +2. Enter a 4D formula (expression, command call or project method) that returns a Boolean value. + +> To remove a condition, delete its formula. + +Adding conditions allows you to stop execution when the command is invoked only if the condition is met. For example, if you associate the condition `Records in selection(\[Emp]>10)` with the break point on the `DELETE SELECTION` command, the code will not be stopped during execution of the `DELETE SELECTION` command if the current selection of the \[Emp] table only contains 9 records (or less). + +Adding conditions to caught commands slows the execution, because the condition has to be evaluated each time an exception is met. On the other hand, adding conditions accelerates the debugging process, because 4D automatically skips occurrences that do not match the conditions. + diff --git a/docs/Debugging/debugger.md b/docs/Debugging/debugger.md new file mode 100644 index 00000000000000..d0f99fbfc6003d --- /dev/null +++ b/docs/Debugging/debugger.md @@ -0,0 +1,441 @@ +--- +id: debugger +title: Debugger +--- + +The debugger is useful when you need to spot errors or monitor the execution of methods. It allows you to step through methods slowly and examine the information. This process is called "tracing". + +![debugger-window-local](assets/en/Debugging/debugger-Window-local.png) + + +## Calling the Debugger + +There are multiple ways to get the Debugger to display: + +* Clicking the **Trace** button in the [Syntax Error window](basics.md#syntax-error-window) +* Using the [`TRACE`](https://doc.4d.com/4dv19/help/command/en/page157.html) command +* Clicking the **Debug** button in the Execute Method window or selecting **Run and debug...** button in the Method editor +* Using **Alt+Shift+Right click** (Windows) or **Ctrl+Option+Cmd+Click** (macOS) while a method is executing, then selecting the process to trace in the pop-up menu: + +![open-debugger](assets/en/Debugging/openDebugger.png) + +* Clicking the **Trace** button when a process is selected in the Process page of the Runtime Explorer. +* Adding a break point in the Method Editor window or in the Break and Catch pages of the Runtime Explorer. + +When called, the debugger window provides the name of the method or class function you're currently tracing, and the action causing the initial appearance of the Debugger window. For example, in the above debugger window: + +* *Clients_BuildLogo* is the method being traced +* The debugger window appeared because it detected a call to the `C_PICTURE` command and this command was one of the commands to be caught + + +Displaying a new debugger window uses the same configuration as the last window displayed in the same session. If you run several user processes, you can trace them independently and have one debugger window open for each process. + +The Debugger window is usually displayed on the machine where the code is executed. With a single-user application, it is always displayed on the machine running the application. With a client/server application, it is displayed: + +- on the remote 4D for code running locally +- on the server machine for code running on the server (for example, a method with the **execute on server** option). + +> If the server is running headless, no debugger window can be displayed on the server, you need to use the remote debugger. See [Debugging from remote machines](./debugging-remote.md). + +## Tool bar Buttons + +The debugger's tool bar includes several buttons, associated with default shortcuts: + +![execution-control-toolbar-buttons](assets/en/Debugging/executionToolbarButtons.png) + +> Default shortcuts can be customized in the Shortcuts Page of the Preferences dialog box. + +#### No Trace + +Tracing stops and normal method execution resumes. + +> **Shift** + **F5** or **Shift** + clicking the **No Trace** button resumes execution. It also disables all the subsequent TRACE calls for the current process. + +#### Step Over + +Executes the current method line, indicated by the program counter (the yellow arrow). The Debugger steps to the next line. + +The Step Over button does not step into subroutines and functions, it stays at the level of the method you're currently tracing. If you want to also trace subroutines and functions calls, use the **Step Into** button. + +In remote debugging, if the method executes on the server, the parent method is called after the last line of the child method executes. If the parent method is executed on the remote side, the **Step Over** button has the same effect as the **No Trace** button. + +#### Step Into + +When a line that calls another method (subroutine or function) is executed, click this button to display the the other method and step through it. + +The new method becomes the current (top) method in the [Call Chain Pane](#call-chain-pane) of the Debugger window. + +When executing a line that does not call another method, this button has the same effect as the **Step Over** button. + +#### Abort + +Stops method execution, and returns to the state before the method started executing: +* When tracing a form or object method executing in response to an event: Stops and returns to the form. +* When tracing a method executing from within the Application environment: Stops and returns to the environment. + +#### Abort and Edit + + +Pauses method execution. The method that is executing when you click the **Abort and Edit** button opens in the Method Editor. + +>**Tip**: Use this button when you know which changes are required in your code, and when these changes are required to pursue the testing of your methods. After you're finished with the changes, rerun the method. + +#### Edit + +Pauses method execution. The method that is executing at the time you click the Edit button opens in the Method Editor. + +If you use this button to modify a method, the modifications are only effective the next time it executes. + +> **Tip:** Use this button when you know which changes are required in your code and when they don't interfere with the rest of the code to be executed or traced. + +#### Save Settings + +Saves the current configuration of the debugger window and makes it the default configuration. This includes: +* the size and position of the window +* the position of the division lines and the contents of the area that evaluates the expressions + +These parameters are stored in the project. + +This action is not available in remote debugging mode (see [Debugging from Remote Machines]()). + +## Watch Pane + +The **Watch pane** is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. Here is an example: + +![watch-pane](assets/en/Debugging/watchPane.png) + +> This pane is not available in remote debugging mode. + +The **Watch Pane** displays useful general information about the system, the 4D environment, and the execution environment. + +The **Expression** column displays the names of the objects and expressions. The **Value** column displays their current corresponding values. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. + +At any point, you can drag and drop themes, theme sublists (if any), and theme items to the [Custom Watch Pane](#custom-watch-pane). + +### Expression list + +#### Line Objects + +This theme lets you keep track of the values of the objects or expressions: + +* used in the line of code to be executed (the one marked with the program counter—the yellow arrow in the [Source Code Pane](#source-code-pane)), +* used in the previous line of code + +Since the previous line of code is the one that was just executed before, this theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: + +```4d +TRACE +$a:=1 +$b:=a+1 +$c:=a+b +``` + +1. A Debugger window opens with the program counter set to the line with `a:=1`. At this point the **Line Objects** theme displays: + + |$a|Undefined| + |---|---| + + The `$a` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +2. You click the **Step Over** button. The program counter is now set to the line `b:=a+1`. At this point, the theme displays: + + |$a|1| + |---|---| + |$b|Undefined| + + The value of the `$a` variable is now 1. The `$b` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +3. You click the **Step Over** button again. The program counter is now set on the line with c:=a+b. At this point the Line Objects theme displays: + + |$c|Undefined| + |---|---| + |$a|1| + |$b|2| + + The value of the `$b` variable is now 2. The `$c` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +#### Variables + +This theme is composed of the following subthemes: + +|Subtheme|Description|Can the values be modified? +|---|---|---| +|Interprocess|List of interprocess variables being used at this point|Yes| +|Process|List of process variables used by the current process|Yes| +|Local|List of local variables used by the method being traced|Yes| +|Parameters|List of parameters received by the method|Yes| +|Self| Pointer to the current object, when tracing an Object Method|No| + +Arrays, like other variables, appear in the Interprocess, Process, and Local subthemes, depending on their scope. The debugger displays the first 100 elements. Inside the **Value** column, you can modify the values of array elements, but not the size of the arrays. + +To display the variable types and their internal names, right click and check the **Show Types** option in the context menu: + +![show-types-menu-item](assets/en/Debugging/showTypes.png) + +Here's the result: + +![dynamic-variable-names](assets/en/Debugging/dynamicVariableNames.png) + +#### Current Form Values + +This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: + +![current-form-value](assets/en/Debugging/current-form-values.png) + +Some objects, such as list box arrays, can be presented as two distinct objects, the variable of the object itself and its data source. + +#### Constants + +Like the Constants page of the Explorer window, this theme displays predefined constants provided by 4D. The expressions from this theme cannot be modified. + +#### Semaphores + +This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. The expressions from this theme cannot be modified. Global semaphores are not displayed. + +#### Processes + +This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. + +#### Tables and Fields + +This theme lists the tables and fields in the 4D database. For each Table item, the Value column displays the size of the current selection for the current process as well as the number of **locked records**. + +For each Field item, the Value column displays the value of the field for the current record (except picture and BLOB). You can modify the field values but not the the tables' information. + +#### Sets + +This theme lists the sets defined in the current process (the one you're currently tracing) and the interprocess sets. For each set, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Named Selections + +This theme lists the named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Information + +This theme contains general information regarding database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. + +#### Web + +This theme displays information regarding the main Web server of the application (only available if the Web server is active): + +* Web File To Send: name of Web file waiting to be sent (if any) +* Web Cache Usage: number of pages present in Web cache as well as its use percentage +* Web Server Elapsed Time: duration of Web server use in hours:minutes:seconds format +* Web Hits Count: total number of HTTP requests received since Web server launch, as well as the instantaneous number of requests per second +* Number of active Web processes: number of active Web processes, all Web processes together + +The expressions contained within this theme cannot be modified. + +### Contextual Menu + +Additional options are available from the contextual menu of the Watch pane. + +![context-menu](assets/en/Debugging/contextual-menu.png) + +* **Collapse All**: Collapses all levels of the hierarchical list. +* **Expand All**: Expand all levels of the hierarchical list. +* **Show Types**: Displays the type of each item (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field. Useful if you work with table or field numbers, or with pointers using commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the object type for each object. You can turn this option off in order to speed up the display, or just because you prefer to use only the **Show Types** option. +* **Sorted Tables and Fields**: Sorts the tables and fields in alphabetical order within their respective lists. +* **Show Integers in Hexadecimal**: Numbers are usually displayed in decimal notation. This option displays them in hexadecimal notation. Note: To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. +* **Enable activity monitoring**: Activates the monitoring of activity (advanced checking of internal activity of the application) and displays the information retrieved in the additional themes: **Scheduler**, **Web** and **Network**. + +## Call Chain Pane + +A method may call other methods or class functions, which may call other methods or functions. The Call Chain pane lets you keep track of that hierarchy. + +![call-chain-pane](assets/en/Debugging/call-chain-example.png) + +Each main level item is the name of a method or class function. The top item is the one you are currently tracing, the next main level item is the name of the caller (the method or function that called the one you are currently tracing), the next one is the caller's caller, and so on. + +In the image above: + +* `thirdMethod` has not received any parameter +* `$0` is currently undefined, as the method did not assign any value to `$0` (because it has not executed this assignment yet or because the method is a subroutine and not a function) +* `secondMethod` has received three parameters from `firstMethod`: + * $1 is a pointer to the `[Employee]` table + * $2 is a pointer to the `ID` field in the `[Employee]` table + * $3 is an alphanumeric parameter whose value is "Z" + +You can double-click the name of any method to display its contents in the [Source Code Pane](#source-code-pane). + +Clicking the icon next to a method or function name expands or collapses the parameters and the result (if any). Values appear on the right side of the pane. Clicking on any value on the right side allows you to change the value of any parameter or function result. + +To display the parameter type, check the **Show types** option in the contextual menu: + +![call-chain-show-types](assets/en/Debugging/callChainShowTypes.png) + +After you deploy the list of parameters, you can drag and drop parameters and function results to the [Custom Watch Pane](#custom-watch-pane). + +You can also use the [Get call chain](https://doc.4d.com/4dv19/help/command/en/page1662.html) command to retrieve the call chain programmatically. + +## Custom Watch Pane + +The Custom Watch Pane is useful for evaluating expressions. It is similar to the [Watch Pane](#watch-pane), except here you decide which expressions are displayed. Any type of expression can be evaluated: + +* field +* variable +* pointer +* calculation +* 4D command +* method +* and anything else that returns a value + +![custom-Watch-pane](assets/en/Debugging/custom-watch-pane.png) + +You can evaluate any expression that can be shown in text form. This does not cover picture and BLOB fields or variables. To display BLOB contents, you can use BLOB commands, such as [BLOB to text](https://doc.4d.com/4dv19/help/command/en/page555.html). + +### Handling expressions + +There are several ways to add expressions to the list: + +* Drag and drop an object or expression from the Watch Pane or the Call Chain Pane +* Select an expression in the [Source Code pane](#source-code-pane) and press **ctrl+D** (Windows) or **cmd+D** (macOS) +* Double-click somewhere in the empty space of the Custom Watch Pane (adds an expression with a placeholder name that you can edit) + +You can enter any formula that returns a result. + +To edit an expression, click on it to select it, then click again or press **Enter** on your keyboard. + +To delete an expression, click on it to select it, then press **Backspace** or **Delete** on your keyboard. + +>**Warning:** Be careful when you evaluate a 4D expression modifying the value of one of the System Variables (for instance, the OK variable) because the execution of the rest of the method may be altered. + +### Contextual Menu + +The Custom Watch Pane’s context menu gives you access the 4D formula editor and other options: + +![custom-watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-context-menu.png) + +**New Expression**: This inserts a new expression and displays the 4D Formula Editor. + +![custom-Watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-formula-editor.png) + +For more information on the Formula Editor, see the 4D Design Reference manual. + +* **Insert Command**: Shortcut for inserting a 4D command as a new expression. +* **Delete All**: Removes all expressions from the Custom Watch Pane. +* **Standard Expressions**: Copies the Watch Pane's list of expressions. +> This option is not available in remote debugging mode (see [Debugging from Remote Machines](https://doc.4d.com/4Dv19/4D/19/Debugging-from-Remote-Machines.300-5422483.en.html)). +* **Collapse All/Expand All**: Collapses or Expands all the hierarchical lists. +* **Show Types**: Displays the type of each item in the list (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field of the **Fields**. Useful if you work with tables, field numbers or pointers using the commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the type of each item. +* **Sorted Tables and Fields**: Displays the table and fields in alphabetical order. +* **Show Integers in Hexadecimal**: Displays numbers using hexadecimal notation. To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. + +## Source Code Pane + +The Source Code Pane shows the source code of the method or function currently being traced. + +This area also allows you to add or remove [**break points**](breakpoints.md). + +### Tool tip + +Hover your pointer over any expression to display a tool tip that indicates: + +* the declared type of the expression +* the current value of the expression + +![source-code-pane](assets/en/Debugging/sourceCodePane.png) + +This also works with selections: + +![source-code-pane-tip](assets/en/Debugging/sourcePaneTip.png) + +### Adding expressions to the Custom Watch Pane + +You can copy any selected expression from the Source Code Pane to the [Custom Watch Pane](#custom-watch-pane). + +1. In the Source code pane, select the expression to evaluate +2. Do one of the following: + * Drag and drop the selected text to the Expression area of the Custom Watch Pane + * Press **Ctrl+D** (Windows) or **Cmd+D** (macOS) + * Right-click the selected text **>** **Copy to Expression Pane** + +### Program Counter + +The yellow arrow in the left margin of the Source Code pane is called the program counter. It marks the next line to be executed. + +By default, the program counter line (also called the running line) is highlighted in the debugger. You can customize the highlight color in the [Methods page of the Preferences](Preferences/methods.md). + +#### Moving the program counter + +For debugging purposes, you can move the program counter for the method at the top of the call chain (the method currently executing). To do so, click and drag the yellow arrow to another line. + +This only tells the debugger to pursue tracing or executing from a different point. It does not execute lines or cancel their execution. All current settings, fields, variables, etc. are not impacted. + +For example: + +```4d + // ... + If(This condition) + DO_SOMETHING + Else + DO_SOMETHING_ELSE + End if + // ... +``` + +Say the program counter is set to the line `If (This condition)`. +When you click the **Step over** button, the program counter moves directly to the `DO_SOMETHING_ELSE` line. +To examine the results of the `DO_SOMETHING` line, you can move the program counter to that line and execute it. + +### Contextual menu + +The contextual menu of the Source Code Pane provides access to several functions that are useful when executing methods in Trace mode: + +![source-code-pane-context-window](assets/en/Debugging/sourceCodePaneContext.png) + +* **Goto Definition**: Goes to where the selected object is defined. This command is available for: + * *Project methods:* displays method contents in a new window of the Method editor + * *Fields:* Displays field properties in the inspector of the Structure window + * *Tables:* Displays table properties in the inspector of the Structure window + * *Forms:* Displays form in the Form editor + * *Variables* (local, process, interprocess or $n parameter): displays the line in the current method or among the compiler methods where the variable is declared +* **Search References** (also available in Method editor): Searches all project objects (methods and forms) in which the current element of the method is referenced. The current element is the one selected or the one where the cursor is located. This can be the name of a field, variable, command, string, and so on. Search results are displayed in a new standard results window. +* **Copy**: Standard copy of the selected expression to the pasteboard. +* **Copy to Expression Pane**: Copy the selected expression to the Custom Watch Pane. +* **Run to Cursor**:Executes statements found between the program counter and the selected line of the method (where the cursor is found). +* **Set Next Statement**:Moves program counter to the selected line without executing this line or any intermediate ones. The designated line is only run if the user clicks on one of the execution buttons. +* **Toggle Breakpoint** (also available in Method editor): Alternately inserts or removes the breakpoint corresponding to the selected line. This modifies the breakpoint permanently: for instance, if you remove a breakpoint in the debugger, it no longer appears in the original method. +* **Edit Breakpoint** (also available in Method editor): Displays the Breakpoint Properties dialog box. Any changes made modify the breakpoint permanently. + +### Find Next/Previous + +Specific shortcuts allow you to find strings identical to the one selected: + +* To search for the next identical strings, press **Ctrl+E** (Windows) or **Cmd+E** (macOS) +* To search for the previous identical strings, press **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) + +The search is carried out only if you select at least one character in the Source code pane. + +## Shortcuts + +This section lists all the shortcuts available in the debugger window. + +> The tool bar also has [shortcuts](#tool-bar-buttons). + +#### Watch Pane & Custom Watch Pane + +* **Double-click** an item in the Watch Pane to copy it to the Custom Watch Pane +* **Double-Click** in the Custom Watch Pane to create a new expression + +#### Source Code Pane + +* Click in the left margin to set or remove break points. +* **Alt+Shift+Click** (Windows) or **Option+Shift+Click** (macOS) sets a temporary break point. +* **Alt-Click** (Windows) or **Option-Click** displays the Edit Break window for a new or existing break point. +* A selected expression or object can be copied to the Custom Watch Pane by simple drag and drop. +* **Ctrl+D** (Windows) or **Cmd+D** (macOS) key combinations copy the selected text to the Custom Watch Pane. +* **Ctrl+E** (Windows) or **Cmd+E** (macOS) key combinations find the next strings identical to the one selected. +* **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) key combinations find the previous strings identical to the one selected. + +#### All Panes + +- **Ctrl** + **+/-** (Windows) or **Command** + **+/-** (macOS) increases or decreases the font size for a better readability. The modified font size is also applied to the Method editor and is stored in the Preferences. +- **Ctrl + \*** (Windows) or **Command + \*** (macOS) forces the updating of the Watch Pane. +- When no item is selected in any pane, press **Enter** to step over. +- When an item value is selected, use the arrows keys to navigate through the list. +- When editing an item, use the arrow keys to move the cursor. Use Ctrl-A/X/C/V (Windows) or Command-A/X/C/V (macOS) as shortcuts to the Select All/Cut/Copy/Paste menu commands of the Edit menu. \ No newline at end of file diff --git a/docs/Debugging/debugging-remote.md b/docs/Debugging/debugging-remote.md new file mode 100644 index 00000000000000..eca1e23d4ca28a --- /dev/null +++ b/docs/Debugging/debugging-remote.md @@ -0,0 +1,84 @@ +--- +id: debugging-remote +title: Debugging from remote machines +--- + +## Overview + +When a 4D database is running on 4D Server, you can debug the 4D code running on the server from a remote 4D client logged to the project. You just need to attach the debugger to a specific remote machine, and the code execution can be monitored in the debugger directly on the remote machine. + +On a remote machine, the [debugger window](debugger.md) displays a specific server icon and a blue background color to indicate that you are debugging server code: + +![debugger-window-remote](assets/en/Debugging/debuggerWindowRemote.png) + +This feature is particularly useful when 4D Server runs in headless mode (see [Command Line Interface](../Admin/cli.md)), or when access to the server machine is not easy. + + +## Attached debugger + +Only one debugger can debug a 4D Server application at a given time. It is called the **attached debugger**. The attached debugger can be: + +* the local 4D Server debugger (default) - if the server is not running headless. +* the debugger of a remote 4D client - if the remote session has access to Design mode. + +The attached debugger is called whenever a 4D Server encounters: +* a break point +* a `TRACE` command +* a caught command +* an error + +Keep in mind that error messages are sent to the attached debugger machine. This means that in the case of a remote debugger, server error messages are displayed on the remote 4D client. + +Note that: +* The code executed in the `On Server Startup Database` Method cannot be debugged remotely. It can only be debugged on the server side +* If no debugger is attached, the running code is not stopped by debugging commands + +## Attaching the debugger to a remote 4D client + +By default, the debugger is not attached to a remote 4D client: +* If 4D Server is not running headless, the debugger is attached to the server +* If 4D Server is running headless, no debugger is attached + +You can attach the debugger to any remote 4D client allowed to connect to the 4D Server application. + +> The remote 4D client's user session must have access to the Design environment of the database. + +To attach the debugger to a remote 4D client: + +* In the 4D Server menu bar, select **Edit** > **Detach Debugger** so that the debugger becomes available to remote machines. + - This step is useless if the 4D Server is running headless. + - You can attach the debugger back to the server by selecting **Edit** > **Attach debugger** (if not attached to a remote 4D client, see [Rejected attachment requests](#rejected-attachment-requests)). +* In a remote 4D client connected to the server, select **Run** > **Attach Remote Debugger** + +If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the menu command becomes **Detach Remote Debugger**. + +The debugger is then attached to the remote 4D client: +* until the end of the user session +* until you select `Detach Remote Debugger` + +## Attach Debugger or Remote Debugger at Startup + +4D allows you to automatically attach the debugger to a remote 4D client or the server at startup: + +* On the server (if not headless), this option is named **Attach Debugger At Startup**. When the server is started, it automatically attaches the debugger (default). + +> **Warning**: If this option is selected for a server which is subsequently launched in headless mode, the debugger won't be available for this server. + +* On a remote 4D client, this option is named **Attach Remote Debugger At Startup**. When selected, the remote 4D client will automatically try to attach the remote debugger at each subsequent connection to the same 4D Server database. If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the remote debugger is automatically attached to the remote 4D client and the **Detach Remote Debugger option is displayed**. + +> This setting is applied per project and is stored locally in the [`.4DPreferences`](Project/architecture.md#userpreferencesusername) file. + +## Rejected attachment requests + +While the debugger is already attached to a remote 4D client, or to 4D Server (default), no other machine can attach the debugger. + +If a machine tries to attach the debugger while it is already attached, the attachment is rejected and a dialog box appears: + +![attach-debugger-dialog](assets/en/Debugging/attach-debugger-dialog.png) + +![attach-debugger-dialog-2](assets/en/Debugging/attach-debugger-dialog-2.png) + +Attaching the debugger in this case requires that: + +* the attached debugger is detached from the remote 4D client using the **Detach remote debugger** menu command or from the server using the **Detach debugger** command +* the attached remote 4D client session is closed diff --git a/docs/Project/building.md b/docs/Desktop/building.md similarity index 68% rename from docs/Project/building.md rename to docs/Desktop/building.md index 29bab16ec536c1..1c5f143f428e44 100644 --- a/docs/Project/building.md +++ b/docs/Desktop/building.md @@ -1,29 +1,33 @@ --- id: building -title: Building a project package +title: Build Application --- -4D Developer includes a final application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. +4D includes an application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. The application builder allows you to: -* Build a compiled database, without interpreted code, +* Build a compiled structure, 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 different applications from the same compiled structure 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). +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible by default in compiled applications. However, you can build specific applications that support local modifications by using the `PackProject` XML key (see [doc.4d.com](https://doc.4d.com)). -## Build application overview +## 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, -- or the [Build Application window](#application-builder). +- either the [`BUILD APPLICATION`](https://doc.4d.com/4dv19/help/command/en/page871.html) command, +- or the [Build Application dialog](#application-builder). -To display the Build Application dialog, select **Design** > **Build Application...** from the menu bar. + +### Build application dialog + +To display the Build application dialog, select **Design** > **Build Application...** from the menu bar. ![](assets/en/Project/buildappProj.png) @@ -32,25 +36,31 @@ 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. +Building can only be carried out once the project is compiled. If you select this command without having previously compiled the project, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the project must be (re)compiled. ### 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. -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. +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 project. + +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/4dv19/help/command/en/page871.html) command. -XML keys provide additional options besides those displayed in the Build Application dialog box. The description of these keys are detailed in the [4D XML Keys BuildApplication](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML-Keys-BuildApplication.100-4465602.en.html) manual. +XML keys provide additional options besides those displayed in the Build Application dialog box. The description of these keys are detailed in the [4D XML Keys BuildApplication](https://doc.4d.com/4Dv19/4D/19/4D-XML-Keys-BuildApplication.100-5447429.en.html) manual. ### 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: +When an application is built, 4D generates a log file named *BuildApp.log.xml* in the **Logs** folder of the project. 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. +- Any errors that occurred, +- Any signing issues (e.g. a non-signed plug-in). + +Checking this file may help you saving time during the subsequent deployment steps, for example if you intend to notarize your application. +> Use the `Get 4D file(Build application log file)` command to get the log file location. ## Application name and destination folder @@ -72,27 +82,33 @@ This tab allows you to build a standard compiled structure file and/or a compile ### Build compiled structure -Builds a database containing only compiled code. +Builds an application containing only compiled code. -This feature creates a *.4dz* file within a *Compiled Database* folder. If you have named your application “MyProjectâ€, 4D will create: +This feature creates a *.4dz* file within a *Compiled Database/\* folder. For example, if you have named your application “MyProjectâ€, 4D will create: + +*\/Compiled Database/MyProject/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. The compact and optimized size of .4dz files makes project packages easy to deploy. + +> When generating .4dz files, 4D uses a **standard** zip format by default. The advantage of this format is that it is easily readable by any unzip tool. If you do not want to use this standard format, add the `UseStandardZipFormat` XML key with value `False` in your [`buildApp.4DSettings`](#build-application-settings) file (for more information, see the *4D XML Keys Backup* manual on [doc.4d.com](https://doc.4d.com)). -*\/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. #### 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). +When you check this option, any folders related to the project are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to the [description of project architecture](Project/architecture.md). ### 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. Once the component has been configured and installed in another 4D project (the host application project), its functionalities are accessible from the host project. -If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: *\/Components/name.4dbase/\.4DZ*. +If you have named your application, *MyComponent*, 4D will create a *Components* folder containing *MyComponent.4dbase* folder: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. The *MyComponent.4dbase* folder contains: - *MyComponent.4DZ* file @@ -107,7 +123,7 @@ This tab allows you can build a stand-alone, single-user version of your applica ### 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. +Checking the **Build stand-alone Application** option and clicking **Build** will create a stand-alone (double-clickable) application directly from your application project. The following elements are required for the build: - 4D Volume Desktop (the 4D database engine), @@ -154,16 +170,16 @@ If you have specified "MyProject" as the name of the application, you will find * *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. + * Database folder - Includes a Resources folder and MyProject.4DZ file. They make up the compiled structure of the project as well as the project 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. + * (Optional) Components folder and/or Plugins folder - Contains any components and/or plug-in files included in the project. 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* - - 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). + - 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/4Dv18R4/4D/18-R4/Application-file.301-4982855.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 @@ -181,7 +197,7 @@ When building a stand-alone application, 4D copies the contents of the 4D Volume 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: -* *cert.pem* and *key.pem* files (optional): These files are used for SSL connections and by data encryption commands, +* *cert.pem* and *key.pem* files (optional): These files are used for TLS connections and by data encryption commands, * default Web root folder. Items must be installed: @@ -203,19 +219,21 @@ On this tab, you can build customized client-server applications that are homoge A client/server application comes from the combination of three items: -- A compiled 4D database, +- A compiled 4D project, - The 4D Server application, - The 4D Volume Desktop application (macOS and/or Windows). 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). +> If you want to deploy a client/server application in an heterogeneous environment (client applications running on Intel/AMD and Apple Silicon machines), it is recommended to [compile the project for all processors](Project/compiler.md#compilation-target) on a macOS machine, so that all client applications will run natively. + 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. +- To launch the server portion, the user simply double-clicks on the server application. The project file 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 server 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)). +- 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). You only need to create and distribute an initial version of the client application, subsequent updates are handled using the automatic update mechanism. +- 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/4dv19/help/command/en/page1291.html) and [RESTART 4D]((https://doc.4d.com/4dv19/help/command/en/page1292.html)). @@ -230,7 +248,21 @@ Click on the **[...]** button and use the *Browse for folder* dialog box to loca #### Current version 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)). - + +#### Allow connection of Silicon Mac clients + +When building a server on Windows, check this option to allow Apple Silicon clients to connect to your server application. You can then specify a path to the structure compiled for Apple Silicon/Intel. + +To allow Apple Silicon clients to connect to a Server application built on Windows, you must first build a client application on macOS, with a project compiled for Apple Silicon and Intel. This automatically creates a compiled structure, identical to the one created with the **[Build compiled structure](#build-compiled-structure)** option (without the related folders). + +Then, you can copy that structure to your Windows machine, and use it to build the server application: + +![](assets/en/Desktop/allow-mac-clients.png) + +#### Compiled structure location + +Path to the compiled structure of the Apple Silicon/Intel client application. + #### Data linking mode This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: @@ -246,27 +278,53 @@ For more information about the data linking mode, refer to the [Last data file o Checking this option generates the client part of your application during the building phase. -#### 4D Volume Desktop +You can check this option: -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). +- along with the [**Build server application**](#build-server-application) option to build matching server and client parts for the current platform and (optionally) include the automatic update archive files, +- without selecting the [**Build server application**](#build-server-application) option, usually to build the update archive file to be selected from the "concurrent" platform when building the server part. -> 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. +#### 4D Volume Desktop Location -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. +Designates the location on your disk of the 4D Volume Desktop application to be used to build the client part of your application. -#### Copy of client applications in the server application +> The 4D Volume Desktop version number must match the 4D Developer Edition version number. For example, if you use 4D v19, you must select a 4D Volume Desktop v19. -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. +The 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 the "concurrent" platform, you must carry out an additional build operation using a 4D application running on that platform. -- **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. - -* **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. +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`](https://doc.4d.com/4dv19/help/command/en/page871.html) 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 inside the server application + +The options of this area set up the mechanism for updating the client part(s) of your client/server applications using the network each time a new version of the application is generated. These options are only enabled when the **Build client application** option is checked. + +- **Allow automatic update of Windows client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Windows platform in case of update. +- **Allow automatic update of Macintosh client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Macintosh platform in case of update. + +The `.4darchive` is copied at the following location: + +``` +_Build/Client Server executable/Upgrade4DClient/ +``` + +#### Selecting client archive for the concurrent platform + + + + +You can check the **Allow automatic update...** option for client applications running on the concurrent platform. This option is only enabled if: + +- the **Build server application** option is checked, +- the **Allow automatic update...** option for client applications running on the current platform is checked. + +This feature requires that you click on the **[...]** button and designate the location on your disk of the file to use for the update. The file to select depends on the current server platform: + +|Current server platform|Required file|Details| +|---|---|---| +|macOS|Windows 4D Volume Desktop *or* Windows client update archive|By default, you select the `4D Volume Desktop` application for Windows. To select a `.4darchive` file previously built on Windows, press **Shift** while clicking on [...]| +|Windows|macOS client update archive|Select a signed `.4darchive` file previously built on macOS| + +You can build specific a `.4darchive` file on the concurrent platform by selecting only the [**Build client application**](#build-client-application) and the appropriate [**Allow automatic update...**](#copy-of-client-applications-inside-the-server-application) option. - 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 @@ -287,7 +345,7 @@ In some cases, you may want to prevent client applications from being able to ca To force the update, simply exclude the current version number of client applications (X-1 and earlier) in the version number range compatible with the server application. In this case, the update mechanism will not allow non-updated client applications to connect. For example, if the new version of the client-server application is 6, you can stipulate that any client application with a version number lower than 6 will not be allowed to connect. -The [current version number](build-server-application) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). +The [current version number](#current_version) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). #### Update Error @@ -317,13 +375,6 @@ The contents of these folders vary depending on the current platform: 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. -#### Customizing 4D Volume Desktop folder - -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: - -- Install a 4D Volume Desktop version corresponding to a specific language; -- Add a custom PlugIns folder; -- Customize the contents of the Resources folder. #### Location of Web files @@ -342,6 +393,63 @@ Items must be installed: * **Client application** - next to the *\Client* software package. +### Embedding a single-user client application + +4D allows you to embed a compiled structure in the Client application. This feature can be used, for example, to provide users with a "portal" application, that gives access to different server applications thanks to the `OPEN DATABASE` command executing a `.4dlink` file. + +To enable this feature, add the `DatabaseToEmbedInClientWinFolder` and/or `DatabaseToEmbedInClientMacFolder` keys in the *buildApp* settings file. When one of these keys is present, the client application building process generates a single-user application: the compiled structure, instead of the *EnginedServer.4Dlink* file, is placed in the "Database" folder. + +- If a default data folder exists in the single-user application, a licence is embedded. +- If no default data folder exists in the single-user application, it will be executed without data file and without licence. + +The basic scenario is: + +1. In the Build application dialog box, select the "Build compiled structure" option to produce a .4DZ or .4DC for the application to be used in single-user mode. +2. In the *buildApp.4DSettings* file of the client-server application, use following xml key(s) to indicate the path to the folder containing the compiled single user application: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Build the client-server application. This will have following effects: + - the whole folder of the single user application is copied inside the "Database" folder of the merged client + - the *EnginedServer.4Dlink* file of the "Database" folder is not generated + - the .4DC, .4DZ, .4DIndy files of the single user application copy are renamed using the name of the merged client + - the `PublishName` key is not copied in the *info.plist* of the merged client + - if the single-user application does not have a "Default data" folder, the merged client will run with no data. + +Automatic update 4D Server features ([Current version](#current-version) number, `SET UPDATE FOLDER` command...) work with single-user application as with standard remote application. At connection, the single-user application compares its `CurrentVers` key to the 4D Server version range. If outside the range, the updated client application is downloaded from the server and the Updater launches the local update process. + + +### Customizing client and/or server cache folder names + +Client and server cache folders are used to store shared elements such as resources or components. They are required to manage exchanges between server and remote clients. Client/server applications use default pathnames for both client and server system cache folders. + +In some specific cases, you might need to customize the names of these folders to implement specific architectures (see below). 4D provides you with the `ClientServerSystemFolderName` and `ServerStructureFolderName` keys to be set in the *buildApp* settings file. + + +#### Client cache folder + +Customizing the client-side cache folder name can be useful when your client application is used to connect to several merged servers which are similar but use different data sets. In this case, to save multiple unnecessary downloads of identical local resources, you can use the same custom local cache folder. + +- Default configuration (*for each connection to a server, a specific cache folder is downloaded/updated*): + +![](assets/en/Admin/cachea.png) + +- Using the `ClientServerSystemFolderName` key (*a single cache folder is used for all servers*): + +![](assets/en/Admin/cacheb.png) + + +#### Server cache folder + +Customizing the server-side cache folder name is useful when you run several identical server applications built with different 4D versions on the same computer. If you want each server to use its own set of resources, you need to customize the server cache folder. + +- Default configuration (*same server applications share the same cache folder*): + +![](assets/en/Admin/cacheServera.png) + +- Using the `ServerStructureFolderName` key (*a dedicated cache folder is used for each server application*): + +![](assets/en/Admin/cacheServerb.png) + @@ -355,6 +463,8 @@ The page lists the elements loaded by the current 4D application: * **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. + + * **Plugins and components** column - Displays the name of the plug-in/component. * **ID** column - Displays the plug-in/component's identification number (if any). @@ -379,8 +489,7 @@ The Licences & Certificate page can be used to: * 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) +![](assets/en/Admin/buildappCertif.png) ### Licenses @@ -410,11 +519,11 @@ After the application is built, a new deployment license file is automatically i ### OS X signing certificate -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). +The application builder can sign merged 4D applications under macOS (single-user applications, components, 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). - 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: -![](assets/en/Project/buildapposxcertProj.png) +![](assets/en/Admin/buildapposxcertProj.png) This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. @@ -426,19 +535,27 @@ To obtain a developer certificate from Apple, Inc., you can use the commands of >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. +* **Generate self-signed certificate** - runs the "Certificate Assistant" that allows you to generate a self-signed certificate. If you do not have an Apple developer certificate, you need to provide a self-signed certificate. With this certificate, no alert message is displayed if the application is deployed internally. If the application is deployed externally (i.e. through http or email), at launch macOS displays an alert message that the application's developer is unidentified. The user can "force" the opening of the application.

    In the "Certificate Assistant", be sure to select the appropriate options: +![](assets/en/Admin/Cert1.png) +![](assets/en/Admin/Cert2.png) + +> 4D recommends to subscribe to the Apple Developer Program to get access to Developer Certificates that are necessary to notarize applications (see below). + #### 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. -The **Sign application** option of the 4D application builder lets you generate applications that are compatible with this option by default. +> On Apple Silicon machines, 4D [components](#components) need to be actually signed. An unsigned component will generate an error at application startup ("lib4d-arm64.dylib can't be opened..."). + +The **Sign application** option of the 4D application builder lets you generate applications and components that are compatible with this option by default. #### About Notarization 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. -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. +The 4D [built-in signing features](#os-x-signing-certificate) have been adapted 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. 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). @@ -490,6 +607,7 @@ Any standalone or server applications built with 4D stores the path of the last The location of the application's user preferences folder corresponds to the path returned by the following statement: + ```4d userPrefs:=Get 4D folder(Active 4D Folder) ``` @@ -535,7 +653,7 @@ More specifically, the following cases are covered: To define and use a default data file: -- 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. +- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the application project folder. This file must be provided along with all other necessary files, depending on the project 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. The following graphic illustrates this feature: diff --git a/docs/Desktop/clientServer.md b/docs/Desktop/clientServer.md new file mode 100644 index 00000000000000..45227ccb1d2bec --- /dev/null +++ b/docs/Desktop/clientServer.md @@ -0,0 +1,97 @@ +--- +id: clientServer +title: Client/Server Management +--- + + +4D Desktop applications can be used in a Client/Server configuration, either as merged client/server applications or as remote projects. + +- **merged client/server applications** are generated by the [Build Application manager](building.md#clientserver-page). They are used for application deployments. + +- **remote projects** are [.4DProject](Project/architecture.md) files opened by 4D Server and accessed with 4D in remote mode. The server sends a .4dz version of the project ([compressed format](building.md#build-compiled-structure)) to the remote 4D, thus structure files are read-only. This configuration is usually used for application testing. + +![](assets/en/getStart/localremote.png) + +> Connecting to a remote projet from the **same machine as 4D Server** allows modifying the project files. This [specific feature](#using-4d-and-4d-server-on-the-same-machine) allows to develop a client/server application in the same context as the deployment context. + + + +## Opening a merged client/server application + +A merged client/server application is customized and its starting is simplified: + +- To launch the server portion, the user simply double-clicks on the server application. The project file 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. + +These principles are detailed in the [Build Application](building.md#what-is-a-clientserver-application) page. + + +## Opening a remote project + +The first time you connect to a 4D Server project via a remote 4D, you will usually use the standard connection dialog. Thereafter, you will be able to connect directly using the **Open Recent Projects** menu or a 4DLink shortcut file. + +To connect remotely to a 4D Server project: + +1. Select **Connect to 4D Server** in the Welcome Wizard dialog,

    OR

    +Select **Open/Remote Project...** from the **File** menu or the **Open** toolbar button. + +The 4D Server connection dialog appears. This dialog has three tabs: **Recent**, **Available**, and **Custom**. + +If 4D Server is connected to the same network as the remote 4D, select **Available**. 4D Server includes a built-in TCP/IP broadcasting system that, by default, publishes the name of the 4D Server projects available over the network. The list is sorted by order of appearance and updated dynamically. + +![](assets/en/getStart/serverConnect.png) + +To connect to a server from the list, double-click on its name or select it and click the **OK** button. + +> A circumflex accent (^) is placed before the name of projects published with the encryption option enabled. + +If the published project is not displayed in the **Available** list, select **Custom**. The Custom page allows you to connect to a published server on the network using its network address and assigning it a customized name. + +![](assets/en/getStart/serverConnect2.png) + + +- **Project name**: Defines the local name of the 4D Server project. This name will be used in the **Recent** page when referring to the project. +- **Network address**: The IP address of the machine where the 4D Server was launched.

    If two servers are executed simultaneously on the same machine, the IP address must be followed by a colon and port number, for example: `192.168.92.104:19814`.

    By default, the publishing port of a 4D Server is 19813. This number can be modified in the Project settings. + +Once this page assigns a server, clicking the **OK** button will allow you to connect to the server. + +> If the project is published with the encryption option enabled, you must add a circumflex accent (^) before the name, otherwise the connection will be refused. For more information, refer to the Encrypting Client/Server Connections section. + +Once a connection to the server has been established, the remote project will be listed on the **Recent** tab. + +### Updating project files on the server + +4D Server automatically creates and sends the remote machines a [.4dz version](building.md#build-compiled-structure) of the *.4DProject* project file (not compressed) in interpreted mode. + +- An updated .4dz version of the project is automatically produced when necessary, *i.e.* when the project has been modified and reloaded by 4D Server. The project is reloaded: + - automatically, when the 4D Server application window comes to the front of the OS or when the 4D application on the same machine saves a modification (see below). + - when the `RELOAD PROJECT` command is executed. Calling this command is necessary for example when you have pulled a new version of the project from the source control platform. + + + + +### Updating project files on remote machines + +When an updated .4dz version of the project has been produced on 4D Server, connected remote 4D machines must log out and reconnect to 4D Server in order to benefit from the updated version. + + +## Using 4D and 4D Server on the same machine + +When 4D connects to a 4D Server on the same machine, the application behaves as 4D in single user mode and the design environment allows you to edit project files. This feature allows you to develop a client/server application in the same context as the deployment context. + +Each time 4D performs a **Save all** action from the design environment (explicitly from **File** menu or implicitly by switching to application mode for example), 4D Server synchronously reloads project files. 4D waits for 4D Server to finish reloading the project files before it continues. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](Project/architecture.md): + +- the userPreferences.{username} folder used by 4D is not the same folder used by 4D Server in the project folder. Instead, it is a dedicated folder, named "userPreferences", stored in the project system folder (i.e., the same location as when opening a .4dz project). +- the folder used by 4D for derived data is not the folder named "DerivedData" in the project folder. Instead it is a dedicated folder named "DerivedDataRemote" located in the project system folder. +- the catalog.4DCatalog file is not edited by 4D but by 4D Server. Catalog information is synchronised using client/server requests +- the directory.json file is not edited by 4D but by 4D Server. Directory information is synchronised using client/server requests +- 4D uses its own internal components and plug-ins instead of those in 4D Server. + +> It is not recommended to install plug-ins or components at the 4D or 4D Server application level. + + + + + diff --git a/docs/Events/onActivate.md b/docs/Events/onActivate.md index 1a3d25af692d06..055f3b53ed7d95 100644 --- a/docs/Events/onActivate.md +++ b/docs/Events/onActivate.md @@ -5,7 +5,7 @@ title: On Activate |Code|Can be called by|Definition| |---|---|---| -|11|Form|The form's window becomes the frontmost window| +|11|Form|The form's window becomes the frontmost window or the subform's container gets the focus| ## Description @@ -13,3 +13,5 @@ title: On Activate If the window of a form was sent to the background, this event is called when the window becomes the frontmost window. This event applies to the form as a whole and not to a particular object. Consequently, if the `On Activate` form event property is selected, only the form will have its form method called. + +In the case of a subform, this event is passed to the subform when the container gets the focus (if it has the [focusable](FormObjects/properties_Entry.md#focusable) property). \ No newline at end of file diff --git a/docs/Events/onAfterKeystroke.md b/docs/Events/onAfterKeystroke.md index b17137b8312520..5fe8272e00a422 100644 --- a/docs/Events/onAfterKeystroke.md +++ b/docs/Events/onAfterKeystroke.md @@ -7,6 +7,13 @@ title: On After Keystroke |---|---|---| |28|[4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns)|A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **including** this character.| +

    History + +|Version|Changes| +|---|---| +|v18 R5|- Support in non-enterable list boxes

    - The event is now triggered after IME validation +

    + ## Description @@ -14,11 +21,21 @@ title: On After Keystroke After the [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` event properties are selected for an object, you can detect and handle the keystrokes within the object, using the `FORM event` command that will return `On Before Keystroke` and then `On After Keystroke` (for more information, please refer to the description of the `Get edited text` command). -These events are also activated by language commands that simulate a user action like `POST KEY`. +> These events are also activated by language commands that simulate a user action like `POST KEY`. + +The `On After Keystroke` event is not generated: + +- in [list box columns](FormObjects/listbox_overview.md#list-box-columns) method except when a cell is being edited (however it is generated in any cases in the [list box](FormObjects/listbox_overview.md) method), +- when user modifications are not carried out using the keyboard (paste, drag-and-drop, checkbox, drop down list, combo box). To process these events, you must use [`On After Edit`](onAfterEdit.md). + + +### Keystroke sequence + +When an entry requires a sequence of keystrokes, the [`On Before Keystroke`](onBeforeKeystroke.md) and [`On After Keystroke event`] events are generated only when the entry is fully validaded by the user. The `Keystroke` command returns the validated character. This case mainly occurs: -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +- when using "dead" keys such as ^ or ~: events are generated only when the extended character is eventuelly entered (e.g. "ê" or ñ), +- when an IME (Input method editor) displays an intermediary dialog box where the user can enter a combination of characters: events are generated only when the IME dialog is validated. -> The [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. ### See also [On Before Keystroke](onBeforeKeystroke.md). \ No newline at end of file diff --git a/docs/Events/onBeforeKeystroke.md b/docs/Events/onBeforeKeystroke.md index 543a3871edc656..8bcc186cd1e5b8 100644 --- a/docs/Events/onBeforeKeystroke.md +++ b/docs/Events/onBeforeKeystroke.md @@ -7,16 +7,38 @@ title: On Before Keystroke |---|---|---| |17|[4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns)|A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **without** this character.| +
    History + +|Version|Changes| +|---|---| +|v18 R5|- Support in non-enterable list boxes

    - The event is now triggered after IME validation +

    + ## Description -After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) properties are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). +After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) events are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). Within the `On Before Keystroke` event, the `FILTER KEYSTROKE` command can be used to filter typed chars. + +> These events are also activated by language commands that simulate a user action like `POST KEY`. + +The `On Before Keystroke` event is not generated: + +- in a [list box column](FormObjects/listbox_overview.md#list-box-columns) method except when a cell is being edited (however it is generated in any cases in the [list box](FormObjects/listbox_overview.md) method), +- when user modifications are not carried out using the keyboard (paste, drag-and-drop, checkbox, drop down list, combo box). To process these events, you must use [`On After Edit`](onAfterEdit.md). + + +### Non-enterable objects + +The `On Before Keystroke` event can be generated in non-enterable objects, e.g. in a list box even if the list box cells are not enterable, or rows are not selectable. This allows you to build interfaces where the user can scroll dynamically to a specific row in a list box by entering the first letters of a value. In case where the list box cells are enterable, you can use the `Is editing text` command to know if the user is actually entering text in a cell or is using the type-ahead feature and then, execute appropriate code. + + +### Keystroke sequence -These events are also activated by language commands that simulate a user action like `POST KEY`. +When an entry requires a sequence of keystrokes, the `On Before Keystroke` and [`On After Keystroke`](onAfterKeystroke.md) events are generated only when the entry is fully validaded by the user. The `Keystroke` command returns the validated character. This case mainly occurs: -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +- when using "dead" keys such as ^ or ~: events are generated only when the extended character is eventuelly entered (e.g. "ê" or ñ), +- when an IME (Input method editor) displays an intermediary dialog box where the user can enter a combination of characters: events are generated only when the IME dialog is validated. -> The `On Before Keystroke` and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. ### See also diff --git a/docs/Events/onClicked.md b/docs/Events/onClicked.md index 870960460490b1..8f920ab9c93a72 100644 --- a/docs/Events/onClicked.md +++ b/docs/Events/onClicked.md @@ -20,7 +20,7 @@ The `On Clicked` event usually occurs once the mouse button is released. However - [Rulers](FormObjects/ruler.md): If the [Execute object method](FormObjects/properties_Action.md#execute-object-method) option is set to **true**, the `On Clicked` event occurs as soon as the click is made. - [Combo boxes](FormObjects/comboBox_overview.md): The `On Clicked` event occurs only if the user selects another value in the associated menu. A [combo box](FormObjects/comboBox_overview.md) must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the `On Before Keystroke`, `On After Keystroke` and `On Data Change` events. - [Drop-down lists](FormObjects/dropdownList_Overview.md): The `On Clicked` event occurs only if the user selects another value in the menu. The `On Data Change` event allows you to detect the activation of the object when a value different from the current value is selected -- The `On Clicked` event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a list box [column](FormObjects/listbox_overview.md#list-box-columns) or [column header](FormObjects/listbox_overview.md#list-box-headers). +- When a list box input cell is [being edited](FormObjects/listbox_overview.md#managing-entry), the `On Clicked` event is generated when the mouse button is pressed, allowing to use the `Contextual click` command for example. In the context of an `On Clicked` event, you can test the number of clicks made by the user by means of the `Clickcount` command. diff --git a/docs/Events/onHeaderClick.md b/docs/Events/onHeaderClick.md index 52b46a4dbdfdd6..94d3e344698c9a 100644 --- a/docs/Events/onHeaderClick.md +++ b/docs/Events/onHeaderClick.md @@ -14,8 +14,6 @@ title: On Header Click This event is generated when a click occurs on the header of a column in the list box. In this case, the `Self` command lets you find out the header of the column that was clicked. -> The [`On Clicked`](onClicked.md) event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a column or column header. You can test the number of clicks made by the user by means of the `Clickcount` command. - If the [Sortable](FormObjects/properties_Action.md#sortable) property was selected for the list box, you can decide whether or not to authorize a standard sort of the column by passing the value 0 or -1 in the `$0` variable: - If `$0` equals 0, a standard sort is performed. diff --git a/docs/Events/onVpRangeChanged.md b/docs/Events/onVpRangeChanged.md new file mode 100644 index 00000000000000..42b68c098817fc --- /dev/null +++ b/docs/Events/onVpRangeChanged.md @@ -0,0 +1,28 @@ +--- +id: onVpRangeChanged +title: On VP Range Changed +--- + +|Code|Can be called by|Definition| +|---|---|---| +|61|[4D View Pro Area](FormObjects/viewProArea_overview.md)|The 4D View Pro cell range has changed (e.g., a formula calculation, value removed from a cell, etc.)| + + +## Description + + +This event is generated when a change occurs within a cell range in the 4D View Pro document. + +The object returned by the FORM Event command contains: + +|Property| Type| Description| +|---|---|---| +|objectName |text|4D View Pro area name| +|code|longint|On VP Range Changed| +|description|text|"On VP Range Changed"| +|sheetName|text|Name of the sheet of the event| +|range|object|Cell range of the change| +|changedCells|object|Range containing only the changed cells. It can be a combined range.| +|action|text|The type of operation generating the event:

  • "clear" - A clear range value operation
  • "dragDrop" - A drag and drop operation
  • "dragFill" - A drag fill operation
  • "evaluateFormula" - Setting a formula in a specified cell range
  • "paste" - A paste operation
  • "setArrayFormula" - Setting a formula in a specified cell range
  • "sort" - Sorting a range of cells
  • | + +>See also [On After Edit](onAfterEdit.md). diff --git a/docs/Events/overview.md b/docs/Events/overview.md index 9e207ef55ece15..de5735dca9ff2a 100644 --- a/docs/Events/overview.md +++ b/docs/Events/overview.md @@ -27,7 +27,10 @@ objectName|text|Name of the object triggering the event - Not included if the ev |code|longint|Numeric value of the form event. Also returned by the `Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| -Additional properties are returned when the event occurs on specific objects. For example, the [On After Edit](onAfterEdit.md) event object returned by a [4D View Pro area](FormObjects/viewProArea_overview.md) contains `sheetName` or `action` properties. +Additional properties are returned when the event occurs on specific objects. In particular: + +- [list boxes](FormObjects/listbox_overview.md#supported-form-events) and [list box columns](FormObjects/listbox_overview.md#supported-form-events-1) return [additional properties](FormObjects/listbox_overview.md#additional-properties) such as `columnName` or `isRowSelected`. +- [4D View Pro areas](FormObjects/viewProArea_overview.md) return for example `sheetName` or `action` properties in the [On After Edit](onAfterEdit.md) event object. ## Events and Methods @@ -106,6 +109,7 @@ The following table summarizes how object and form methods are called for each e |On End URL Loading|Yes (Web Area)|Never|Involved object only| |On Open External Link|Yes (Web Area)|Never|Involved object only| |On Window Opening Denied|Yes (Web Area)|Never|Involved object only| +|On VP Range Changed|Yes (4D View Pro Area)|Never|Involved object only| |On VP Ready|Yes (4D View Pro Area)|Never|Involved object only| |On Row Resize|Yes (4D View Pro Area)|Never|Involved object only| diff --git a/docs/FormEditor/createStylesheet.md b/docs/FormEditor/createStylesheet.md index 269fb595a8620d..dfefddea4ede23 100644 --- a/docs/FormEditor/createStylesheet.md +++ b/docs/FormEditor/createStylesheet.md @@ -3,7 +3,6 @@ id: stylesheets title: Style sheets --- -## Overview A style sheet groups together a combination of attributes for form objects — from text attributes to nearly any available object attribute. @@ -13,7 +12,7 @@ In addition to harmonizing an application's interface, style sheets provide thre * 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. -### Style Sheet Files +## Style Sheet Files 4D accepts three, specific style sheet files: @@ -23,12 +22,12 @@ In addition to harmonizing an application's interface, style sheets provide thre |styleSheets_mac.css|For defining macOS only specific attribute styles| |styleSheets_windows.css|For defining Windows only specific attribute styles| -These files are stored in the project's "/SOURCES" folder. +These files are stored in the project's "/SOURCES" folder. They can also be accessed directly via the [CSS Preview](formEditor.md#css-preview) in the Form editor toobar. -### Style Sheet Architecture +## Style Sheet Architecture -While adapted to meet the specific needs of 4D forms, style sheets for project databases generally follow CSS2 syntax and grammar. +While adapted to meet the specific needs of 4D forms, style sheets for application projects generally follow CSS2 syntax and grammar. Every style rule in a style sheet contains two parts: @@ -183,43 +182,87 @@ All objects of the text type with a text attribute whose value starts with "Hell text[text|=Hello] { stroke: yellow; + + } ``` ## Style Sheet Declarations +### Media Queries + +Media queries are used to apply color schemes to an application. + +A media query is composed of a media feature and a value (e.g., \:\ ). + + +Available media features: + +* `prefers-color-scheme` + + +Available media feature expressions: + +* **light**
    For using a light scheme +* **dark**
    For using a dark scheme + +> Color schemes are only supported on macOS. + +##### Example + +This CSS defines a color combination for text and text background in the light scheme (default) and another combination when the dark scheme is selected: + +``` +@media (prefers-color-scheme: light) { + .textScheme { + fill: LightGrey; + stroke: Black; + } +} + +@media (prefers-color-scheme: dark) { + .textScheme { + fill: DarkSlateGray; + stroke: LightGrey; + } +} +``` + + +### Object Attributes + 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) + - `method` + - `type` + - `class` + - `event` + - `choiceList`, `excludedList`, `labels`, `list`, `requiredList` (list type) -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. +Form object attributes can be declared with their [JSON name](FormObjects/properties_Reference.md) as CSS attributes (not including object types, methods, events, and lists). -### Attribute Mapping +#### Attribute Mapping The attributes listed below are able to accept either the 4D name or the CSS name. |4D|CSS| |---|---| -|borderStyle|border-style| -|fill|background-color| -|fontFamily|font-family| -|fontSize|font-size| -|fontStyle|font-style| -|fontWeight|font-weight| -|stroke|color| -|textAlign|text-align| -|textDecoration|text-decoration| -|verticalAlign|vertical-align| +|`borderStyle`|`border-style`| +|`fill`|`background-color`| +|`fontFamily`|`font-family`| +|`fontSize`|`font-size`| +|`fontStyle`|`font-style`| +|`fontWeight`|`font-weight`| +|`stroke`|`color`| +|`textAlign`|`text-align`| +|`textDecoration`|`text-decoration`| +|`verticalAlign`|`vertical-align`| ->4D-specific values (*e.g.*, "sunken") are not supported when using CSS attribute names. +>4D-specific values (*e.g.*, `sunken`) are not supported when using CSS attribute names. -### Specific Attribute Values +#### Specific Attribute Values - For `icon`, `picture`, and `customBackgroundPicture` attributes that support a path to an image, the syntax is: @@ -230,8 +273,8 @@ icon: url("edit.png"); /* relative path to the form file */ - For `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` and `verticalLineStroke`, three syntaxes are supported: - - css color name: `fill: red;` - - hexa value: `fill: #FF0000;` + - 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: @@ -256,7 +299,6 @@ To override this behavior, the style value must be followed with an `!important` |---|---|---| |`"text": "Button",`|`text: Edit;`| `"Button"`| - **Example 2:** |JSON form description|Style Sheet|4D displays| @@ -265,6 +307,7 @@ To override this behavior, the style value must be followed with an `!important` + ### Multiple Style Sheets At runtime, 4D automatically prioritizes style sheets in the following order: @@ -302,12 +345,6 @@ At runtime, 4D automatically prioritizes style sheets in the following order: >* For security reasons, only filesystem paths are accepted for absolute paths. (*e.g.*, "/RESOURCES", "/DATA") - - - - - - ## Creating or Editing Style Sheets You can create style sheets using your preferred text editor and saving the file with a ".css" extension in the project's "/SOURCES" folder. diff --git a/docs/FormEditor/formEditor.md b/docs/FormEditor/formEditor.md index ea7f982d2bbf49..f2850c6a033a81 100644 --- a/docs/FormEditor/formEditor.md +++ b/docs/FormEditor/formEditor.md @@ -3,6 +3,481 @@ id: formEditor title: Form Editor --- +4D provides a full-featured Form editor that allows you to modify your form until you achieve the effect that you want. With the Form editor, you can create and delete form objects, manipulate them directly, and set form and object properties. + + +## Interface + +The Form editor interface displays each JSON form in its own window, which has both an object and tool bar. You can have several forms open at the same time. + +### Display options + +You can show or hide several interface elements on the current page of the form: + +- **Inherited Form**: Inherited form objects (if there is an [inherited form](forms.md#inherited-forms)). +- **Page 0**: Objects from [page 0](forms.md#form-pages). This option allows you to distinguish between the objects on the form’s current page and those on page 0. +- **Paper**: Borders of the printing page, which are shown as gray lines. This element can only be displayed by default in ["for printing" type](properties_FormProperties.md#form-type) forms. +- **Rulers**: Rulers of the Form editor’s window. +- **Markers**: Output control lines and associated markers that show the limits of the form’s different areas. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Marker Labels**: Marker labels, available only when the output control lines are displayed. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Limits**: Form’s limits. When this option is selected, the form is displayed in the Form editor as it appears in Application mode. This way you can adjust your form without having to switch to the Application mode in order to see the result. + +>The [**Size Based on**](properties_FormSize.md#size-based-on), [**Hor. margin**](properties_FormSize.md#hor-margin) and [**Vert. margin**](properties_FormSize.md#vert-margin) settings of the form properties affect the form’s limits. When using these settings, the limits are based on the objects in the form. When you modify the size of an object that is located next to the form’s border, it is modified to reflect that change. + +#### Default display + +When a form is opened in the editor, interface elements are displayed or hidden by default, depending on: + +- the **New form default display** options set in the Preferences - unchecked options cannot be displayed by default. +- the current [form type](properties_FormProperties.md#form-type): + - Markers and marker labels are always displayed by default on list forms + - Paper is displayed by default on "for printing" forms. + +#### Display/Hide elements + +You can display or hide elements at any moment in the Form editor’s current window by selecting **Display** from the **Form** menu or the Form editor's context menu: + +![](assets/en/FormEditor/showHideElements.png) + + +### Rulers + +The rulers on the side and bottom help you position objects in the form. They can be [displayed or hidden](#display-options). + +Select **Ruler definition...** from the **Form** menu to change measurement units so that the form displays inches, centimeters, or pixels. + +### Toolbar + +The toolbar of the Form editor offers a set of tools to manipulate and modify the form. Each window has its own toolbar. + +![](assets/en/FormEditor/toolbar.png) + +The toolbar contains the following elements: + +|Icon |Name|Description | +|---|---|---| +|![](assets/en/FormEditor/execute.png)| Execute the form| Used to test the execution of the form. When you click on this button, 4D opens a new window and displays the form in its context (list of records for a list form and current record page for a detail form). The form is executed in the main process.| +|![](assets/en/FormEditor/selection.png)| [Selection tool](#selecting-objects)|Allows selecting, moving and resizing form objects.

    **Note**: When an object of the Text or Group Box type is selected, pressing the **Enter** key lets you switch to editing mode.| +|![](assets/en/FormEditor/zOrder.png)| [Entry order](#data-entry-order)| Switches to “Entry order†mode, where it is possible to view and change the current entry order of the form. Note that shields allow viewing the current entry order, while still working in the form. | +|![](assets/en/FormEditor/moving.png)| [Moving](#moving-objects)| Switches to “Move†mode, where it is possible to reach any part of the form quickly by using drag and drop in the window. The cursor takes the shape of a hand. This navigation mode is particularly useful when zooming in the form.| +|![](assets/en/FormEditor/zoom.png)| [Zoom](#zoom)| Allows modifying the form display percentage (100% by default). You can switch to “Zoom†mode by clicking on the magnifying glass or by clicking directly on the desired bar. This feature is detailed in previous section.| +|![](assets/en/FormEditor/alignment.png)| [Alignment](#aligning-objects)| This button is linked to a menu that allows aligning objects in the form. It is enabled (or not) depending on the objects selected.

    Available only with CSS Preview None| +|![](assets/en/FormEditor/distribution.png)| [Distribution](#distributing-objects)| This button is linked to a menu that allows distributing objects in the form. It is enabled (or not) depending on the objects selected.

    Available only with CSS Preview None| +|![](assets/en/FormEditor/level.png)| [Level](#layering-objects)| This button is linked to a menu that allows changing the level of objects in the form. It is enabled (or not) depending on the objects selected. | +|![](assets/en/FormEditor/group.png)| [Group/Ungroup](#grouping-objects)| This button is linked to a menu that allows grouping and ungrouping selections of objects in the form. It is enabled (or not) depending on the objects selected. | +|![](assets/en/FormEditor/displyAndPage.png)| [Display and page management](forms.html#form-pages)| This area allows passing from one form page to another and adding pages. To navigate among form pages, click the arrow buttons, or click the central area and choose the page to display from the menu that appears. If you click the right arrow button while the last form page is displayed, 4D allows you to add a page. | +|![](assets/en/FormEditor/cssPreviewicon.png) |[CSS Preview](#css-preview)|This button is used to select the CSS Mode to use. | +|![](assets/en/FormEditor/views.png)| [Managing views](#views)|This button displays or hides the views palette. This function is detailed in Using object views .| +|![](assets/en/FormEditor/shields2.png)| [Displaying shields](#shields)| Each click on this button causes the successive display of each type of form shield. The button is also linked to a menu that allows directly selecting the type of shield to display. | +|![](assets/en/FormEditor/library.png)| [Preconfigured object library](objectLibrary.html)| This button displays the preconfigured object library that provides numerous objects with certain properties that have been predefined. | +|![](assets/en/FormEditor/listBoxBuilder1.png)|[List Box Builder](#list-box-builder)|This button creates new entity selection list boxes. | + +### Object bar + +The object bar contains all the active and inactive objects that can be used in 4D forms. Some objects are grouped together by themes. Each theme includes several alternatives that you can choose between. When the object bar has the focus, you can select the buttons using the keys of the keyboard. The following table describes the object groups available and their associated shortcut key. + +|Button |Group |Key| +|---|---|:---:| +|![](assets/en/FormEditor/text.png)|[Text](FormObjects/text.md) / [Group Box](FormObjects/groupBox.md)|T| +|![](assets/en/FormEditor/input.png)|[Input](FormObjects/input_overview.md)|F| +|![](assets/en/FormEditor/listbox.png)|[Hierarchical List](FormObjects/list_overview.md) / [List Box](FormObjects/listbox_overview.md)|L| +|![](assets/en/FormEditor/combo.png)|[Combo Box](FormObjects/comboBox_overview.md) / [Drop-down List](FormObjects/dropdownList_Overview.md) / [Picture Pop-up Menu](FormObjects/picturePopupMenu_overview.md)|P| +|![](assets/en/FormEditor/button.png)| [Button](FormObjects/button_overview.md) / [Picture Button](FormObjects/pictureButton_overview.md) / [Button Grid](FormObjects/buttonGrid_overview.md)|B| +|![](assets/en/FormEditor/radio.png)|[Radio Button](FormObjects/radio_overview.md)| R| +|![](assets/en/FormEditor/checkbox.png)|[Check Box](FormObjects/checkbox_overview.md)|C| +|![](assets/en/FormEditor/indicator.png)|[Progress Indicator](FormObjects/progressIndicator.md) / [Ruler](FormObjects/ruler.md) / [Stepper](FormObjects/stepper.md) / [Spinner](FormObjects/spinner.md)| I +|![](assets/en/FormEditor/rectangle.png)| [Rectangle](FormObjects/shapes_overview.md#rectangle) / [Line](FormObjects/shapes_overview.md#line) / [Oval](FormObjects/shapes_overview.md#oval) |S| +|![](assets/en/FormEditor/splitter.png)|[Splitter](FormObjects/splitters.md) / [Tab Control](FormObjects/tabControl.md)| D| +|![](assets/en/FormEditor/plugin.png)| [Plug-in Area](FormObjects/pluginArea_overview.md) / [Subform](FormObjects/subform_overview.md) / [Web Area](FormObjects/webArea_overview.md) / [4D Write Pro](FormObjects/writeProArea_overview.md) / [4D View Pro](FormObjects/viewProArea_overview.md)| X| + +To draw an object type, select the corresponding button and then trace the object in the form. After creating an object, you can modify its type using the Property List. Hold down the **Shift** key as you draw to constrain the object to a regular shape. Lines are constrained to horizontal, 45°, or vertical, rectangles are constrained to squares, and ovals are constrained to circles. + +The current variant of the theme is the object that will be inserted in the form. When you click the right side of a button, you access the variant menu: + +![](assets/en/FormEditor/objectBar.png) + +You can click twice on the button so that it remains selected even after you have traced an object in the form (continual selection). This function makes creating several successive objects of the same type easier. To cancel a continual selection, click on another object or tool. + +### Property List + +Both forms and form objects have properties that control access to the form, the appearance of the form, and the behavior of the form when it is used. Form properties include, for example, the form’s name, its menu bar, and its size. Object Properties include, for example, an object’s name, its dimensions, its background color, and its font. + +You can display and modify form and object properties using the Property List. It displays either form or objects properties depending on what you select in the editor window. + +To display/hide the Property List, choose **Property List** from the **Form** menu or from the context menu of the Form editor. You can also display it by double-clicking in an empty area of the form. + +#### Navigation shortcuts + +You can navigate in the Property List using the following shortcuts: + +* **Arrow key**s ↑ ↓: Used to go from one cell to another. +* **Arrow keys** ↠→: Used to expand/collapse themes or enter edit mode. +* **PgUp** and **PgDn**: Used to scroll the Property List contents. +* **Home** and **End**: Used to scroll the Property List so that the first or last cell is displayed. +* **Ctrl+click** (Windows) or **Command+click** (Mac OS) on an event: Used to select/deselect every event in the list, according to the initial state of the event on which you clicked. +* **Ctrl+click** (Windows) or **Command+click** (Mac OS) on a theme label: Used to Collapse/Expand every theme in the list. + + + +## Manipulating Form Objects + +### Adding objects + +You can add objects to forms in several ways: + +* By drawing the object directly in the form after selecting its type in the object bar (see [Using the object bar](#using-the-object-bar)) +* By dragging and dropping the object from the object bar +* By drag-and-drop or copy-paste operations on an object selected from the preconfigured [object library](objectLibrary.md), +* By dragging and dropping an object from another form, +* By dragging and dropping an object from the Explorer (fields) or from other editors in the Design environment (lists, pictures, etc.) + +Once the object is placed in the form, you can modify its characteristics using the Form editor. + +You can work with two types of objects in your forms: + +* **Static objects** (lines, frames, background pictures, etc.): These objects are generally used for setting the appearance of the form and its labels as well as for the graphic interface. They are available in the object bar of the Form editor. You can also set their graphic attributes (size, color, font, etc.) and their resizing properties using the Property List. Static objects do not have associated variables like active objects. However, you can insert dynamic objects into static objects. + +* **Active objects**: These objects perform tasks or functions in the interface and can take many forms: fields, buttons, scrollable lists, etc. Each active object is associated with either a field or a variable. + +### Selecting objects + +Before you can perform any operation on an object (such as changing a line width or font), you need to select the object that you want to modify. + +To select an object using the toolbar: + +1. Click the Arrow tool in the toolbar.

    ![](assets/en/FormEditor/selection.png)

    +When you move the pointer into the form area, it becomes a standard arrow-shaped pointer. +2. Click the object you want to select. Resizing handles identify the selected object.

    ![](assets/en/FormEditor/selectResize.png) + +To select an object using the Property List: + +1. Choose the object’s name from the Object List drop-down list located at the top of the Property List.

    Using these two methods, you can select an object that is hidden by other objects or located outside the visible area of the current window. +To deselect an object, click outside the object’s boundary or **Shift+click** the object. + +>It is also possible to select objects by double-clicking them in the result window of ""Find in design" operation. + +### Selecting multiple objects + +You may want to perform the same operation on more than one form object — for example, to move the objects, align them, or change their appearance. 4D lets you select several objects at the same time. There are several ways to select multiple objects: + +* Choose **Select All** from the Edit menu to select all the objects. +* Right-click on the object and choose the **Select Similar Objects** command in the context menu. +* Hold down the **Shift** key and click the objects you want to select. +* Start at a location outside the group of objects you want to select and drag a marquee (sometimes called a selection rectangle) around the objects. When you release the mouse button, if any part of an object lies within or touches the boundaries of the selection rectangle, that object is selected. +* Hold down the **Alt** key (Windows) or the **Option** key (macOS) and draw a marquee. Any object that is completely enclosed by the marquee is selected. + +The figure below shows a marquee being drawn to select two objects: + +![](assets/en/FormEditor/selectMultiple.png) + +To deselect an object that is part of a set of selected objects, hold down the **Shift** key and click the object. The other objects remain selected. To deselect all the selected objects, click outside the boundaries of all the objects. + + +### Duplicating objects + +You can duplicate any object in the form, including active objects. Copies of active objects retain all the properties of the original, including name, type, standard action, display format, and object method. + +You can duplicate an object directly using the Duplicate tool in the Tools palette or use the Duplicate Many dialog box to duplicate an object more than once. Also, using this dialog box, you can set the distance between two copies. + +To duplicate one or more objects: + +1. Select the object or objects that you want to duplicate. +2. Choose **Duplicate** from the **Edit** menu. 4D creates a copy of each selected object and places the copy in front and slightly to the side of the original. +3. Move the copy (or copies) to the desired location. +If you choose the Duplicate menu item again, 4D creates another copy of each object and moves it the exact same distance and direction from the first copy. If you need to distribute copies of the object along a line, you should use the following procedure. Duplicate the original object, move the copy to another location in the form, and then duplicate the copy. The second copy is automatically placed in the same relation to the first copy as the first copy was in relation to the original object. Subsequent copies are also placed in the same relation to their originals. The figure below shows how this relative placement of copies works: + +![](assets/en/FormEditor/duplicateObjects.png) + + +#### Duplicate Many + +The "Duplicate Many" dialog box appears when you select one or more object(s) and choose the **Duplicate Many...** command from the **Object** menu. + +![](assets/en/FormEditor/duplcateMany.png) + +* In the upper area, enter the number of columns and lines (rows) of objects you want to get.

    For example, if you want three columns and two lines of objects, enter 3 in the Column(s) area and 2 in the Line(s) area. If you want three horizontal new copies of an object, enter 4 in the Column(s) area and leave the default value, 1, in the Line(s) area. + +* For lines and columns, define the offset that you wish to leave between each copy.

    The value must be expressed in points. It will be applied to each copy, or copies, in relation to the original object.

    For example, if you want to leave a vertical offset of 20 points between each object and the height of the source object is 50 points, enter 70 in the column’s “Offset†area. + +* If you wish to create a matrix of variables, select the **Number Variables** option and select the direction in which the variables are to be numbered, either by line(s) or by column(s). +This option is active only when the selected object is a variable. For more information on this option, refer to **Duplicating on a matrix** in the *Design Reference*. + + +### Moving objects + +You can move any graphic or active object in the form including fields and objects created with a template. When moving an object, you have the following options: + +* Move the object by dragging it, +* Move the object one pixel at a time using the arrow keys, +* Move the object by steps using the arrow keys (20-pixel steps by default), + +As you begin dragging the selected object, its handles disappear. 4D displays markers that show the location of the object’s boundaries in the rulers so that you can place the object exactly where you want it. Be careful not to drag a handle. Dragging a handle resizes the object. You can press the **Shift** key to carry out the move with a constraint. + +When the [Magnetic Grid](#using-the-magnetic-grid) is on, objects are moved in stages indicating noticeable locations. + +To move an object one pixel at a time: + +* Select the object or objects and use the arrow keys on the keyboard to move the object. Each time you press an arrow key, the object moves one pixel in the direction of the arrow. + +To move an object by steps: + +* Select the object or objects you want to move and hold down the **Shift** key and use the arrow keys to move the object by steps. By default, steps are 20 pixels at a time. You can change this value on the Forms Page of the Preferences. + + +### Grouping objects + +4D lets you group objects so that you can select, move, and modify the group as a single object. Objects that are grouped retain their position in relation to each other. You would typically group a field and its label, an invisible button and its icon, and so forth. + +When you resize a group, all the objects in the group are resized proportionally (except text areas, which are resized in steps according to their font sizes. + +You can ungroup a group of objects to treat them as individual objects again. + +An active object that has been grouped must be ungrouped before you can access its properties or method. However, it is possible to select an object belonging to a group without degrouping the set: to do this, **Ctrl+click** (Windows) or **Command+click** (macOS) on the object (the group must be selected beforehand). + +Grouping only affects objects in the Form editor. When the form is executed, all grouped objects act as if they were ungrouped. + +>It is not possible to group objects belonging to different views and only those objects belonging to the current view can be grouped (see [Views](#views) ). + +To group objects: + +1. Select the objects that you want to group. +2. Choose **Group** from the Object menu.

    OR

    +Click the Group button in the toolbar of the Form editor:

    ![](assets/en/FormEditor/group.png)

    +4D marks the boundary of the newly grouped objects with handles. No handles mark the boundary of any of the individual objects within the group. Now, when you modify the grouped object, you change all the objects that make up the group. + +To ungroup an object: + +1. Select the grouped object that you want to ungroup. +2. Choose **Ungroup** from the **Object** menu.

    OR

    Click the **Ungroup** button (variant of the **Group** button) in the toolbar of the Form editor.

    If **Ungroup** is dimmed, this means that the selected object is already separated into its simplest form.

    4D marks the boundaries of the individual objects with handles. + + +### Aligning objects + +You can align objects with each other or using an invisible grid on the form. + +* When you align one object to another, you can align it to the top, bottom, side, or horizontal or vertical center of the other object. You can directly align a selection of objects using the alignment tools or apply more advanced alignment settings using the Alignment Assistant. The latter option allows you, for example, to set the object that will be used as the position reference and to preview the alignment in the form before applying it. +* When you use the invisible grid, each object can be aligned manually with others based on “noticeable†positions which are depicted with dotted lines that appear when the object being moved approaches other objects. + +#### Using the instantaneous alignment tools + +The alignment tools in the toolbar and in the Align submenu of the Object menu allow you to quickly align selected objects. + +![](assets/en/FormEditor/alignmentMenu.png) + +When 4D aligns objects, it leaves one selected object in place and aligns the remaining objects to that one. This object is the “anchor.†It uses the object that is the furthest in the alignment’s direction as the anchor and aligns the other objects to that object. For instance, if you want to perform a right alignment on a set of objects, the rightmost object will be used as the anchor. +The figure below shows objects with no alignment, "aligned left", "aligned horizontally by centers", and "aligned right": + +![](assets/en/FormEditor/alignmentTools.png) + +#### Using the alignment assistant + +The Alignment Assistant allows you to perform any type of alignment and/or distribution of objects. + +![](assets/en/FormEditor/alignmentAssistant.png) + + +To display this dialog box, select the objects you want to align then choose the **Alignment** command from the **Align** submenu in the **Object** menu or from the context menu of the editor. + +* In the “Left/Right Alignment†and/or “Top/Bottom Alignment†areas, click the icon that corresponds to the alignment you want to perform.

    The example area displays the results of your selection. + +* To perform an alignment that uses the standard anchor scheme, click **Preview** or **Apply**.

    In this case 4D uses the object that is the furthest in the alignment’s direction as the anchor and aligns the other objects to that object. For instance, if you want to perform a right alignment on a set of objects, the rightmost object will be used as the anchor.

    OR:

    To align objects to a specific object, select the **Align on** option and select the object to which you want the other objects to be aligned from the object list. In this case, the position of the reference object will not be altered. + +You can preview the results of the alignment by clicking the **Preview** button. The objects are then aligned in the Form editor but since the dialog box does not go away, you can still cancel or apply the alignment. + +>This dialog box allows you to align and distribute objects in one operation. For more information on how to distribute objects, refer to [Distributing objects](#distributing-objects). + +#### Using the Magnetic Grid + +The Form editor provides a virtual magnetic grid that can help you place and align objects in a form. Magnetic alignment of objects is based on their position in relation to each other. The magnetic grid can only be used when at least two objects are present in the form. + +This works as follows: When you move an object in the form, 4D indicates possible locations for this object based on noticeable alignments with other form objects. A noticeable alignment is established each time that: + +* Horizontally, the edges or centers of two objects coincide, +* Vertically, the edges of two objects coincide. + +When this happens, 4D places the object at the location and displays a red line indicating the noticeable alignment taken into account: + +![](assets/en/FormEditor/magneticGrid1.png) + +Concerning the distribution of objects, 4D proposes a distance based on interface standards. Like with magnetic alignment, red lines indicate the noticeable differences once they are reached. + +![](assets/en/FormEditor/magneticGrid2.png) + +This operation applies to all types of form objects. The Magnetic Grid can be enabled or disabled at any time using the **Magnetic Grid** command in the **Form** menu or in the editor context menu. It is also possible to set the activation of this feature by default on the **Preferences** > **Forms** page (**Activate auto alignment by default** option). You can manually activate or deactivate the magnetic grid when an object is selected by pressing the **Ctrl** (Windows) or **Control** (macOS) key . + +>The Magnetic Grid also influences the manual resizing of objects. + +### Distributing objects + +You can distribute objects so that they are set out with an equal amount of space between them. To do this, you can distribute objects using either the Distribute tools in the Tools palette or the Alignment Assistant. The latter allows you to align and distribute objects in one operation. + +>When the [Magnetic Grid](#using-the-magnetic-grid) is on, a visual guide is also provided for distribution when an object is moved manually. + +To distribute objects with equal spacing: + +1. Select three or more objects and click the desired Distribute tool. + +2. In the toolbar, click on the distribution tool that corresponds to the distribution you want to apply.

    ![](assets/en/FormEditor/distributionTool.png)

    OR

    Select a distribution menu command from the **Align** submenu in the **Object** menu or from the context menu of the editor.

    4D distributes the objects accordingly. Objects are distributed using the distance to their centers and the largest distance between two consecutive objects is used as a reference. + +To distribute objects using the Align and Distribute dialog box: + +1. Select the objects you want to distribute. + +2. Choose the **Alignment** command from the **Align** submenu in the **Object** menu or from the context menu of the editor.

    The following dialog box appears:![](assets/en/FormEditor/alignmentAssistant.png) + +3. In the Left/Right Alignment and/or Top/Bottom Alignment areas, click the standard distribution icon: ![](assets/en/FormEditor/horizontalDistribution.png)

    (Standard horizontal distribution icon)

    The example area displays the results of your selection. + +4. To perform a distribution that uses the standard scheme, click **Preview** or *Apply*.

    In this case 4D will perform a standard distribution, so that the objects are set out with an equal amount of space between them.

    OR:

    To execute a specific distribution, select the **Distribute** option (for example if you want to distribute the objects based on the distance to their right side). This option acts like a switch. If the Distribute check box is selected, the icons located below it perform a different function: + + * Horizontally, the icons correspond to the following distributions: evenly with respect to left sides, centers (hor.) and right sides of the selected objects. + * Vertically, the icons correspond to the following distributions: evenly with respect to top edges, centers (vert.) and bottom edges of the selected objects. + + You can preview the actual result of your settings by clicking on the **Preview** button: the operation is carried out in the Form editor but the dialog box stays in the foreground. You can then **Cancel** or **Apply** the modifications. + +>This dialog box lets you combine object alignment and distribution. For more information about alignment, refer to [Aligning objects](#aligning-objects). + + +### Layering objects + +You will sometimes have to rearrange objects that are obstructing your view of other objects in the form. For example, you may have a graphic that you want to appear behind the fields in a form. 4D provides four menu items, **Move to Back**, **Move to Front**, **Up One Level** and **Down One Level** that let you “layer†objects on the form. These layers also determine the default entry order (see Modifying data entry order). The figure below shows objects in front of and behind other objects: + +![](assets/en/FormEditor/layering.png) + +To move an object to another level, select it and choose: + +* One of the **Move to Back**, **Move to Front**, **Up One Level** and **Down One Level** commands of the Object menu, +* One of the commands in the **Level>** submenu in the context menu of the editor, +* One of the commands associated with the level management button of the toolbar. + +![](assets/en/FormEditor/level2.png) + +>When several objects are superimposed, the **Ctrl+Shift+click** / **Command+Shift+click** shortcut can be used to select each object successively by going down a layer with each click. + +When ordering different levels, 4D always goes from the background to the foreground. As a result, the previous level moves the selection of objects one level towards the background. The next level moves the selection one level towards the foreground of the form. + +### Data entry order + +The data entry order is the order in which fields, subforms, and other active objects are selected as you hit the **Tab** or the **Carriage return** key in an input form. It is possible to move through the form in the opposite direction (reverse data entry order) by pressing the **Shift+Tab** or **Shift+Carriage** return keys. + +> You can change the entry order at runtime using the `FORM SET ENTRY ORDER` and `FORM GET ENTRY ORDER` commands. + +Every object that supports the focusable property is included in the data entry order by default. + +Setting the entry order for a JSON form is done with the [`entryOrder`](properties_JSONref.md) property. + +If you don’t specify a custom entry order, by default 4D uses the layering of the objects to determine the entry order in the direction “background towards foreground.†The standard entry order thus corresponds to the order in which the objects were created in the form. + +In some forms, a custom data entry order is needed. Below, for example, additional fields related to the address have been added after the creation of the form. The resulting standard entry order thus becomes illogical and forces the user to enter the information in an awkward manner: + +![](assets/en/FormEditor/entryOrder1.png) + +In cases such as this, a custom data entry order allows you to enter the information in a more logical order: + +![](assets/en/FormEditor/entryOrder2.png) + +#### Viewing and changing the data entry order + +You can view the current entry order either using the “Entry order†shields, or by using the “Entry order†mode. However, you can only modify the entry order using the “Entry order†mode. + +This paragraph describes viewing and modifying the entry order using the “Entry order†mode. For more information about viewing the entry order using shields, refer to [Using shields](#using-shields). + +To view or change the entry order: + +1. Choose **Entry Order** from the **Form** menu or click on the Entry Order button in the toolbar of the window:

    ![](assets/en/FormEditor/zOrder.png)

    The pointer turns into an entry order pointer and 4D draws a line in the form showing the order in which it selects objects during data entry.

    Viewing and changing the data entry order are the only actions you can perform until you click any tool in the Tools palette. + +2. To change the data entry order, position the pointer on an object in the form and, while holding down the mouse button, drag the pointer to the object you want next in the data entry order.

    ![](assets/en/FormEditor/entryOrder3.png)

    4D will adjust the entry order accordingly. + +3. Repeat step 2 as many times as necessary to set the data entry order you want. + +4. When you are satisfied with the data entry order, click any unselected tool in the toolbar or choose **Entry Order** from the **Form** menu.

    4D returns to normal operation of the Form editor. + +> Only the entry order of the current page of the form is displayed. If the form contains enterable objects on page 0 or coming from an inherited form, the default entry order is as follows: Objects from page 0 of the inherited form > Objects from page 1 of the inherited form > Objects from page 0 of the open form > Objects from the current page of the open form. + + +#### Using a data entry group + +While you are changing the data entry order, you can select a group of objects in a form so that the standard data entry order applies to the objects within the group. This allows you to easily set the data entry order on forms in which fields are separated into groups or columns. + +To create a data entry group: + +1. Choose **Entry Order** from the *Form* menu or click the button in the toolbar. +2. Draw a marquee around the objects you want to group for data entry. + +When you release the mouse button, the objects enclosed or touched by the rectangle follow the standard data entry order. The data entry order for the remaining objects adjusts as necessary. + +#### Excluding an object from the entry order + +By default, all objects that support the focusable property are included in the entry order. To exclude an object from the entry order: + +1. Select the Entry order mode, then + +2. **shift-click** on the object + +3. **right-click** on the object and select **Remove from entry order** option from the context menu + + + +## CSS Preview + +The Form editor allows you to view your forms with or without applied CSS values. + +When [style sheets](createStylesheet.md) have been defined, forms (including inherited forms and subforms) are opened in the CSS Preview mode for your operating system by default. + + +### Selecting CSS Preview Mode + +The Form editor toolbar provides a CSS button for viewing styled objects: + +![](assets/en/FormEditor/cssToolbar.png) + +Select one of the following preview modes from the menu: + +|Toolbar Icon|CSS Preview Mode |Description| +|---|---|---| +|![](assets/en/FormEditor/cssNo.png)|None|No CSS values are applied in the form and no CSS values or icons displayed in the Property List.| +|![](assets/en/FormEditor/cssWin.png)|Windows|CSS values for Windows platform are applied in the form. CSS values and icons displayed in the Property List.| +|![](assets/en/FormEditor/cssMac.png)|macOS|CSS values for macOS platform are applied in the form. CSS values and icons displayed in the Property List.| + + +>If a font size too large for an object is defined in a style sheet or JSON, the object will automatically be rendered to accommodate the font, however the size of the object will not be changed. + +The CSS preview mode reflects the priority order applied to style sheets vs JSON attributes as defined in the [JSON vs Style Sheet](stylesheets.html#json-vs-style-sheet) section. + +Once a CSS preview mode is selected, objects are automatically displayed with the styles defined in a style sheet (if any). + +>When copying or duplicating objects, only the CSS references (if any) and the JSON values are copied. + + +### CSS support in the Property List + +In CSS Preview mode, if the value of an attribute has been defined in a style sheet, the attribute's name will appear with a CSS icon displayed next to it in the Property List. For example, the attribute values defined in this style sheet: + +```4d +.myButton { +font-family: comic sans; +font-size: 14; +stroke: #800080; +} +``` + +are displayed with a CSS icon in the Property List: + +![](assets/en/FormEditor/cssPpropList.png) + +An attribute value defined in a style sheet can be overridden in the JSON form description (except if the CSS includes the `!important` declaration, see below). In this case, the Property List displays the JSON form value in **bold**. You can reset the value to its style sheet definition with the **Ctrl + click** (Windows) or **Command + click** (macOs) shortcuts. + +>If an attribute has been defined with the `!important` declaration for a group, an object within a group, or any object within a selection of multiple objects, that attribute value is locked and cannot be changed in the Property List. + +#### Property List CSS Icons + +|Icon|Description| +|---|---| +|![](assets/en/FormEditor/cssIcon.png)|Indicates that an attribute value has been defined in a style sheet| +|![](assets/en/FormEditor/cssImportant.png)|Indicates that an attribute value has been defined in a style sheet with the `!important` declaration| +|![](assets/en/FormEditor/cssIconMixed.png)|Displayed when an attribute value defined in a style sheet for at least one item in a group or a selection of multiple objects is different from the other objects| + + + ## List Box Builder You can create new entity selection list boxes quickly with the **List box builder**. The new list box can be used immediately or it can be edited via the Form Editor. @@ -53,6 +528,13 @@ The final list box: ![](assets/en/FormEditor/listboxBuilderListbox.png) + + + + + + + ## Shields The 4D Form Editor uses shields to make viewing object properties easier. You can find them on the form toolbar: @@ -60,6 +542,8 @@ The 4D Form Editor uses shields to make viewing object properties easier. You ca ![](assets/en/FormEditor/shields.png) + + This function works as follows: Each shield is associated with a property (for example, **Views**, which means the object “is in the current viewâ€). When you activate a shield, 4D displays a small icon (shield) in the upper left of each object of the form where the property is applied. ![](assets/en/FormEditor/shield.png) @@ -84,6 +568,7 @@ Here is a description of each type of shield: |![](assets/en/FormEditor/resizing.png) |Resizing|For objects with at least one resizing property, indicates the combination of current properties | |![](assets/en/FormEditor/entryOrder.png)|Entry Order|For enterable objects, indicates the number of entry order | |![](assets/en/FormEditor/viewNumber.png) |Current View|For all objects in the current view | +|![](assets/en/FormEditor/cssShield.png)|[Style Sheet](stylesheets.html)|For objects with one or more attribute values overridden by a style sheet.| |![](assets/en/FormEditor/filter.png) |Filter|For enterable objects with an associated entry filter | |![](assets/en/FormEditor/helpTip.png) |Help Tip|For objects with an associated tip | |![](assets/en/FormEditor/localized.png)|Localized|For objects whose label comes from a reference (label beginning with “:â€). The reference can be of the resource (STR#) or XLIFF type | @@ -98,8 +583,6 @@ For example, you can distribute objects according to type (fields, variables, st There is no limit on the number of views per form. You can create as many different views as you need. Additionally, each view can be displayed, hidden, and/or locked. - - View management is handled via the View palette. ![](assets/en/FormEditor/viewEditor.png) @@ -306,6 +789,20 @@ To lock the objects of a view, click the *Lock/Unlock* icon. The padlock is shut To unlock a view that is locked, simply select it or click on the *Lock/Unlock* icon for that view. +## Zoom + +You can zoom in the current form. Switch to “Zoom†mode by clicking on the magnifying glass icon or clicking directly on the desired percentage bar (50%, 100%, 200%, 400% and 800%): + +![](assets/en/FormEditor/zoom.png) + +* When you click on the magnifying glass, the cursor changes into one. You can then click in the form to increase the display or hold down Shift and click to reduce the display percentage. +* When you click on a percentage bar, the display is immediately modified. + +In Zoom mode, all Form editor functions remain available(*). + +(*) For technical reasons, it is not possible to select list box elements (headers, columns, footers) when the Form editor is in Zoom mode. + + diff --git a/docs/FormEditor/forms.md b/docs/FormEditor/forms.md index 94a9067f803626..9ecb75b51510be 100644 --- a/docs/FormEditor/forms.md +++ b/docs/FormEditor/forms.md @@ -3,7 +3,6 @@ id: forms title: About 4D Forms --- -## Overview Forms provide the interface through which information is entered, modified, and printed in a desktop application. Users interact with the data in a database using forms and print reports using forms. Forms can be used to create custom dialog boxes, palettes, or any featured custom window. @@ -58,6 +57,8 @@ You can add or modify 4D forms using the following elements: "action": "Cancel", "left": 60, "top": 160, + + "width": 100, "height": 20 } @@ -92,7 +93,7 @@ You can create multiple pages for an input form. If you have more fields or vari - Place the most important information on the first page and less important information on other pages. - Organize each topic on its own page. -- Reduce or eliminate scrolling during data entry. +- Reduce or eliminate scrolling during data entry by setting the [entry order](../FormEditor/formEditor.html#data-entry-order). - Provide space around the form elements for an attractive screen design. Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed. @@ -117,7 +118,7 @@ When a form is executed, the objects are loaded and combined in the following or 3. Page zero of the open form 4. Current page of the open form. -This order determines the default entry order of objects in the form. +This order determines the default [entry order](../FormEditor/formEditor.html#data-entry-order) of objects in the form. > Only pages 0 and 1 of an inherited form can appear in other forms. diff --git a/docs/FormEditor/macros.md b/docs/FormEditor/macros.md new file mode 100644 index 00000000000000..facd4dc945d25e --- /dev/null +++ b/docs/FormEditor/macros.md @@ -0,0 +1,335 @@ +--- +id: macros +title: Form Editor Macros +--- + + +The 4D Form editor supports macros. A macro is a set of instructions to perform an action or a sequence of actions. When called upon, the macro will execute its instructions and automatically perform the action(s). + +For example if you have a recurring report with specific formatting (e.g., certain text must appear in red and certain text must appear in green), you can create a macro to automatically set the color. You can create macros for the 4D Form editor that can: + +* Create and execute 4D code +* Display dialogs +* Select form objects +* Add / delete / modify forms, form objects as well as their properties +* Modify project files (update, delete) + +Macros code supports [class functions](Concepts/classes.md) and [form object properties in JSON](FormObjects/properties_Reference.md) to let you define any custom feature in the Form editor. + +Macros can been defined for the host project or for components within the project. Usually, you will create a macro and install it within the components you use for development. + +When called, a macro overrides any previously specified behaviors. + +## Hands-on example + +In this short example, you'll see how to create and call a macro that adds a "Hello World!" alert button in the top left corner of your form. + +1. In a `formMacros.json` file within the `Sources` folder of your project, you write: + +```js +{ + "macros": { + "Add Hello World button": { + "class": "AddButton" + } + } +} +``` + +2. Create a 4D class named `AddButton`. + +3. Within the `AddButton` class, write the following function: + +```4d +Function onInvoke($editor : Object)->$result : Object + + var $btnHello : Object + + // Create a "Hello" button + $btnHello:=New object("type"; "button"; \ + "text"; "Hello World!"; \ + "method"; New object("source"; "ALERT(\"Hello World!\")"); \ + "events"; New collection("onClick"); \ + "width"; 120; \ + "height"; 20; \ + "top"; 0; \ + "left"; 0) + + // Add button in the current page + $editor.editor.currentPage.objects.btnHello:=$btnHello + + // Select the new button in the form editor + $editor.editor.currentSelection.clear() //unselect elements + $editor.editor.currentSelection.push("btnHello") + + // Notify the modification to the 4D Form editor + $result:=New object("currentSelection"; $editor.editor.currentSelection;\ + "currentPage"; $editor.editor.currentPage) +``` + +You can then call the macro: +![](assets/en/FormEditor/macroex1.png) +![](assets/en/FormEditor/macroex2.png) + + +## Calling macros in the Form editor + +When macros are defined in your 4D project, you can call a macro using the contextual menu of the Form editor: + +![](assets/en/FormEditor/macroSelect.png) + +This menu is built upon the `formMacros.json` [macro definition file(s)](#location-of-macros). Macro items are sorted in alphabetical order. + +This menu can be called in an empty area or a selection in the form. Selected object are passed to `$editor.currentSelection` or `$editor.target` in the [`onInvoke`](#oninvoke) function of the macro. + +A single macro can execute several operations. If selected, the **Undo** feature of the Form editor can be used to reverse macro operations globally. + +## Location of macro file + +All 4D Form Editor macros are defined within a single JSON file per project or component: `FormMacros.json`. + +This file must be located in the host or component's **Project** > **Sources** folder: + +![](assets/en/FormEditor/macroStructure.png) + + + +## Declaring macros + +The structure of the `formMacros.json` file is the following: + +```js +{ + "macros": { + : { + "class": , + : + } + } +} +``` + +Here is the description of the JSON file contents: + +|Attribute|||Type|Description| +|---|---|---|---|---| +|macros|||object|list of defined macros| +||``||object|macro definition| +|||class|string|macro class name| +|||``|any|(optional) custom value to retrieve in the constructor + +Custom properties, when used, are passed to the [constructor](#class-constructor) function of the macro. + +### Example + +```js +{ + "macros": { + "Open Macros file": { + "class": "OpenMacro" + }, + "Align to Right on Target Object": { + "class": "AlignOnTarget", + "myParam": "right" + }, + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + + + +## Instantiating macros in 4D + +Each macro you want to instantiate in your project or component must be declared as a [4D class](Concepts/classes.md). + +The class name must match the name defined using the [class](#creating-macros) attribute of the `formMacros.json` file. + +Macros are instantiated at application startup. Consequently, if you modify the macro class structure (add a function, modify a parameter...) or the [constructor](#class-constructor), you will have to restart the application to apply the changes. + + + + +## Macro Functions + +Every macro class can contain a `Class constructor` and two functions: `onInvoke()` and `onError()`. + + +### Class constructor + +#### Class constructor($macro : Object) + +|Parameter|Type|Description| +|---|---|---| +|$macro|Object|Macro declaration object (in the `formMacros.json` file)| + +Macros are instantiated using a [class constructor](Concepts/classes.md#class-constructor) function, if it exists. + +The class constructor is called once during class instantiation, which occurs at application startup. + +Custom properties added to the [macro declaration](#declaring-macros) are returned in the parameter of the class contructor function. + + + +#### Example + +In the `formMacros.json` file: + +```js +{ + "macros": { + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + +You can write: + +```4d +// Class "AlignOnTarget" +Class constructor($macro : Object) + This.myParameter:=$macro.myParam //left + ... +``` + + +### onInvoke() + +#### onInvoke($editor : Object) -> $result : Object + +|Parameter|Type|Description| +|---|---|---| +|$editor|Object|Form Editor Macro Proxy object containing the form properties| +|$result|Object|Form Editor Macro Proxy object returning properties modified by the macro (optional)| + +The `onInvoke` function is automatically executed each time the macro is called. + +When the function is called, it receives in the `$editor.editor` property a copy of all the elements of the form with their current values. You can then execute any operation on these properties. + +Once operations are completed, if the macro results in modifying, adding, or removing objects, you can pass the resulting edited properties in `$result`. The macro processor will parse the returned properties and apply necessary operations in the form. Obviously, the less properties you return, the less time processing will require. + +Here are the properties returned in the *$editor* parameter: + +|Property|Type|Description| +|---|---|---| +|$editor.editor.form|Object|The entire form +|$editor.editor.file|File|File object of the form file| +|$editor.editor.name|String|Name of the form| +|$editor.editor.table|number|Table number of the form, 0 for project form| +|$editor.editor.currentPageNumber|number|The number of the current page| +|$editor.editor.currentPage|Object|The current page, containing all the form objects and the entry order of the page| +|$editor.editor.currentSelection|Collection|Collection of names of selected objects| +|$editor.editor.formProperties|Object|Properties of the current form| +|$editor.editor.target|string|Name of the object under the mouse when clicked on a macro| + +Here are the properties that you can pass in the `$result` object if you want the macro processor to execute a modification. All properties are optional: + +|Property|Type|Description| +|---|---|---| +|currentPage |Object |currentPage including objects modified by the macro, if any| +|currentSelection |Collection |currentSelection if modified by the macro| +|formProperties |Object |formProperties if modified by the macro| +|editor.groups |Object |group info, if groups are modified by the macro| +|editor.views |Object |view info, if views are modified by the macro| +|editor.activeView |String |Active view name| + + +For example, if objects of the current page and groups have been modified, you can write: + +```4d + $result:=New object("currentPage"; $editor.editor.currentPage ; \ + "editor"; New object("groups"; $editor.editor.form.editor.groups)) + +``` + + +#### `method` attribute + +When handling the `method` attribute of form objects, you can define the attribute value in two ways in macros: + +- Using a [string containing the method file name/path](FormObjects/properties_Action.md#method). + +- Using an object with the following structure: + +|Property|Type|Description| +|---|---|---| +source|String|method code| + +4D will create a file using the object name in the "objectMethods" folder with the content of `source` attribute. This feature is only available for macro code. + +#### `$4dId` property in `currentPage.objects` + +The `$4dId` property defines a unique ID for each object in the current page. This key is used by the macro processor to control changes in `$result.currentPage`: + +- if the `$4dId` key is missing in both the form and an object in `$result`, the object is created. +- if the `$4dId` key exists in the form but is missing in `$result`, the object is deleted. +- if the `$4dId` key exists in both the form and an object in `$result`, the object is modified. + + +#### Example + +You want to define a macro function that will apply the red color and italic font style to any selected object(s). + +```4d +Function onInvoke($editor : Object)->$result : Object + var $name : Text + + If ($editor.editor.currentSelection.length>0) + // Set stroke to red and style to italic for each selected object + For each ($name; $editor.editor.currentSelection) + $editor.editor.currentPage.objects[$name].stroke:="red" + $editor.editor.currentPage.objects[$name].fontStyle:="italic" + + End for each + + Else + ALERT("Please select a form object.") + End if + + // Notify to 4D the modification + $result:=New object("currentPage"; $editor.editor.currentPage) +``` + + +### onError() + +#### onError($editor : Object; $resultMacro : Object ; $error : Collection) + +|Parameter||Type|Description| +|---|---|---|---| +|$editor||Object|Object send to [onInvoke](#oninvoke)| +|$resultMacro||Object|Object returned by [onInvoke](#oninvoke)| +|$error||Collection|Error stack | +||[].errCode|Number|Error code | +||[].message|Text|Description of the error | +||[].componentSignature|Text|Internal component signature | + +The `onError` function is executed when the macros processor encounters an error. + +When executing a macro, if 4D encounters an error which prevents the macro from being cancelled, it does not execute the macro. It is the case for example if executing a macro would result in: + +- deleting or modifying a script whose file is read-only. +- creating two objects with the same internal ID. + +#### Example + +In a macro class definition, you can write the following generic error code: + +```4d +Function onError($editor : Object; $resultMacro : Object; $error : Collection) + var $obj : Object + var $txt : Text + $txt:="" + + For each ($obj; $error) + $txt:=$txt+$obj.message+" \n" + End for each + + ALERT($txt) +``` diff --git a/docs/FormEditor/objectLibrary.md b/docs/FormEditor/objectLibrary.md index cd962e8fe6a600..0ea35d6c73cfce 100644 --- a/docs/FormEditor/objectLibrary.md +++ b/docs/FormEditor/objectLibrary.md @@ -3,7 +3,6 @@ id: objectLibrary title: Object libraries --- -## Overview 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. @@ -58,7 +57,7 @@ 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. +A given object library can only be opened by one project at a time. However, several different libraries can be opened in the same project. 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** diff --git a/docs/FormEditor/pictures.md b/docs/FormEditor/pictures.md index 883fc4c4099963..c21f1ab79ae5d1 100644 --- a/docs/FormEditor/pictures.md +++ b/docs/FormEditor/pictures.md @@ -3,6 +3,9 @@ id: pictures title: Pictures --- +4D includes specific support for pictures used in your forms. + + ## 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. @@ -62,7 +65,7 @@ High resolution pictures with the @nx convention can be used in the following ob -### DPI (macOs and Windows) +### DPI (macOS and Windows) While 4D automatically prioritizes the highest resolution, there are, however, some behavioral differences depending on screen and image dpi*(\*)*, and picture format: @@ -74,6 +77,18 @@ While 4D automatically prioritizes the highest resolution, there are, however, *(\*) Typically, macOS = 72dpi, Windows = 96dpi* +## Dark mode pictures (macOS only) + +You can define specific pictures and icons to be used instead of standard pictures when [forms use the dark scheme](properties_FormProperties.md#color-scheme). + +A dark mode picture is defined in the following way: + +- dark mode picture has the same name as the standard (light scheme) version with the suffix "`_dark`" +- dark mode picture is stored next to the standard version. + +At runtime, 4D will automatically load the light or dark image according to the [current form color scheme](https://doc.4d.com/4dv19/help/command/en/1761.html). + +![](assets/en/FormEditor/darkicon.png) diff --git a/docs/FormEditor/properties_FormProperties.md b/docs/FormEditor/properties_FormProperties.md index ace13f9d015797..2403a992b7aaea 100644 --- a/docs/FormEditor/properties_FormProperties.md +++ b/docs/FormEditor/properties_FormProperties.md @@ -5,6 +5,25 @@ title: Form Properties --- +## Color Scheme + +>Color scheme property is only applied on macOS. + +This property defines the color scheme for the form. By default when the property is not set, the value for a color scheme is **inherited** (the form uses the scheme defined at the [application level](https://doc.4d.com/4dv19/help/command/en/page1762.html)). This can be changed for the form to one of the following two options: + +* dark - light text on a dark background +* light - dark text on a light background + +>A defined color scheme can not be overridden by a CSS. + +#### JSON Grammar + +|Name|Data Type|Possible Values| +|---|---|---| +|colorScheme |string |"dark", "light"| + +--- + ## Pages Each form has is made of at least two pages: @@ -104,7 +123,7 @@ Set to **\** in the Property List (or " " in JSON) to inherited from a pro ## Published as Subform -For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host database, it must have been explicitly shared. When this property is selected, the form will be published in the host database. +For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host application, it must have been explicitly shared. When this property is selected, the form will be published in the host application. Only project forms can be specified as published subforms. diff --git a/docs/FormEditor/properties_JSONref.md b/docs/FormEditor/properties_JSONref.md index f3e6201c903e50..654090a54d15da 100644 --- a/docs/FormEditor/properties_JSONref.md +++ b/docs/FormEditor/properties_JSONref.md @@ -7,43 +7,47 @@ This page provides a comprehensive list of all form properties, sorted by their >In the "Form Properties" chapter, properties are sorted according to their names and themes in the Property List. +[a](#a) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [h](#h) - [i](#i) - [m](#m) - [p](#p) - [r](#r) - [s](#s) - [w](#w) |Property|Description|Possible Values| |---|---|---| |**a**||| -|[bottomMargin](properties_FormSize.md#vert-margin)|Vertical margin value (in pixels)|minimum: 0| -|**d**||| -|[destination](properties_FormProperties.md#form-type)|Form type|"detailScreen", "listScreen", "detailPrinter", "listPrinter"| -|**e**||| -|[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"...].| -|**f**||| -|[formSizeAnchor](properties_FormSize.md#form-size)|Name of the object whose position determines the size of the form. (minimum length: 1)|Name of a 4D object| -|**h**||| -|[height](properties_FormSize.md#height)|Height of the form|minimum: 0| -|**i**||| -|[inheritedForm](properties_FormProperties.md#inherited-form-name)|Designates the form to inherit|Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form| -|[inheritedFormTable](properties_FormProperties.md#inherited-form-table)|Designates the table an inherited form will use|A table name or number| -|**m**||| -|[markerBody](properties_Markers.md#form-detail)|Detail marker position|minimum: 0 | -|[markerBreak](properties_Markers.md#form-break)|Break marker position(s)|minimum: 0 | -|[markerFooter](properties_Markers.md#form-footer)|Footer marker position|minimum: 0 | -|[markerHeader](properties_Markers.md#forrm-header)|Header marker position(s)|integer minimum: 0; integer array minimum: 0 | -|[memorizeGeometry](properties_FormProperties.md#memorize-geometry)|Saves the form parameters when the form window is closed |true, false | -|[menuBar](properties_Menu.md#associated-menu-bar)|Menu bar to associate to the form|Name of a valid menu bar | -|[method](properties_Action.md#method)|A project method name. |The name of an existing project method| -|**p**||| -|[pages](properties_FormProperties.md#pages)|Collection of pages (each page is an object)|Page objects| -|[pageFormat](properties_Print.md#settings)|object|Available print properties| -|**r**||| -|[rightMargin](properties_FormSize.md#hor-margin)|Horizontal margin value (in pixels)|minimum: 0| -|**s**||| -|[shared](properties_FormProperties.md#published-as-subform)|Specifies if a form can be used as a subform|true, false| -|**w**||| -|[width](properties_FormSize.md#width)|Width of the form|minimum: 0| -|[windowMaxHeight](properties_FormProperties.md#maximum-height)|Form window's largest allowable height|minimum: 0| -|[windowMaxWidth](properties_FormProperties.md#maximum-width)|Form window's largest allowable width|minimum: 0| -|[windowMinHeight](properties_FormProperties.md#minimum-height)|Form window's smallest allowable height|minimum: 0| -|[windowMinWidth](properties_FormProperties.md#minimum-width)|Form window's smallest allowable width|minimum: 0| -|[windowSizingX](properties_WindowSize.md#fixed-width)|Form window's vertical sizing|"fixed", "variable"| -|[windowSizingY](properties_WindowSize.md#fixed-height)|Form window's horizontal sizing|"fixed", "variable"| -|[windowTitle](properties_FormProperties.md#window-title)|Designates a form window's title|A name for the form window| \ No newline at end of file +|[`bottomMargin`](properties_FormSize.md#vert-margin)|Vertical margin value (in pixels)|minimum: 0| +|**c**||| +|[`colorScheme`](properties_FormProperties.md#color-scheme)|Color scheme for the form|"dark", "light"| +|**d**||| +|[`destination`](properties_FormProperties.md#form-type)|Form type|"detailScreen", "listScreen", "detailPrinter", "listPrinter"| +|**e**| +|[`entryOrder`](formEditor.md#data-entry-order)|The order in which active objects are selected when the **Tab** or the **Carriage return** key is used in an input form |Collection of 4D Form object names | +|[`events`](Events/overview.md)|List of all events selected for the object or form|Collection of event names, e.g. ["onClick","onDataChange"...].| +|**f**||| +|[`formSizeAnchor`](properties_FormSize.md#form-size)|Name of the object whose position determines the size of the form. (minimum length: 1)|Name of a 4D object| +|**h**||| +|[`height`](properties_FormSize.md#height)|Height of the form|minimum: 0| +|**i**||| +|[`inheritedForm`](properties_FormProperties.md#inherited-form-name)|Designates the form to inherit|Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form| +|[`inheritedFormTable`](properties_FormProperties.md#inherited-form-table)|Designates the table an inherited form will use|A table name or number| +|**m**||| +|[`markerBody`](properties_Markers.md#form-detail)|Detail marker position|minimum: 0 | +|[`markerBreak`](properties_Markers.md#form-break)|Break marker position(s)|minimum: 0 | +|[`markerFooter`](properties_Markers.md#form-footer)|Footer marker position|minimum: 0 | +|[`markerHeader`](properties_Markers.md#forrm-header)|Header marker position(s)|integer minimum: 0; integer array minimum: 0 | +|[`memorizeGeometry`](properties_FormProperties.md#memorize-geometry)|Saves the form parameters when the form window is closed |true, false | +|[`menuBar`](properties_Menu.md#associated-menu-bar)|Menu bar to associate to the form|Name of a valid menu bar | +|[`method`](properties_Action.md#method)|A project method name. |The name of an existing project method| +|**p**||| +|[`pages`](properties_FormProperties.md#pages)|Collection of pages (each page is an object)|Page objects| +|[`pageFormat`](properties_Print.md#settings)|object|Available print properties| +|**r**||| +|[`rightMargin`](properties_FormSize.md#hor-margin)|Horizontal margin value (in pixels)|minimum: 0| +|**s**||| +|[`shared`](properties_FormProperties.md#published-as-subform)|Specifies if a form can be used as a subform|true, false| +|**w**||| +|[`width`](properties_FormSize.md#width)|Width of the form|minimum: 0| +|[`windowMaxHeight`](properties_FormProperties.md#maximum-height)|Form window's largest allowable height|minimum: 0| +|[`windowMaxWidth`](properties_FormProperties.md#maximum-width)|Form window's largest allowable width|minimum: 0| +|[`windowMinHeight`](properties_FormProperties.md#minimum-height)|Form window's smallest allowable height|minimum: 0| +|[`windowMinWidth`](properties_FormProperties.md#minimum-width)|Form window's smallest allowable width|minimum: 0| +|[`windowSizingX`](properties_WindowSize.md#fixed-width)|Form window's vertical sizing|"fixed", "variable"| +|[`windowSizingY`](properties_WindowSize.md#fixed-height)|Form window's horizontal sizing|"fixed", "variable"| +|[`windowTitle`](properties_FormProperties.md#window-title)|Designates a form window's title|A name for the form window| \ No newline at end of file diff --git a/docs/FormEditor/properties_Markers.md b/docs/FormEditor/properties_Markers.md index 2590baa4c00244..cfd4777b94aab4 100644 --- a/docs/FormEditor/properties_Markers.md +++ b/docs/FormEditor/properties_Markers.md @@ -105,18 +105,18 @@ Break at level 0 zero takes in all the records; it occurs after all the records A Break level 1 occurs after the records grouped by the first sorted field are printed. |Label|Description|Prints after groups created by:| -|---|---| -Form Break 1|Break at level 1|First sorted field -Form Break 2|Break at level 2|Second sorted field -Form Break 3|Break at level 3|Third sorted field| +|---|---|---| +|Form Break 1|Break at level 1|First sorted field| +|Form Break 2|Break at level 2|Second sorted field| +|Form Break 3|Break at level 3|Third sorted field| Additional Header areas are associated with Breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. |Label|Description|Prints after groups created by:| -|---|---| -Form Header 1|Header at level 1|First sorted field -Form Header 2|Header at level 2|Second sorted field -Form Header 3|Header at level 3|Third sorted field| +|---|---|---| +|Form Header 1|Header at level 1|First sorted field| +|Form Header 2|Header at level 2|Second sorted field| +|Form Header 3|Header at level 3|Third sorted field| If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. diff --git a/docs/FormObjects/buttonGrid_overview.md b/docs/FormObjects/buttonGrid_overview.md index 3f7ce6938d6915..269d3f8f8fae53 100644 --- a/docs/FormObjects/buttonGrid_overview.md +++ b/docs/FormObjects/buttonGrid_overview.md @@ -2,7 +2,6 @@ id: buttonGridOverview title: Button Grid --- -## Overview 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: @@ -32,4 +31,4 @@ You can assign the ``gotoPage`` [standard action](https://doc.4d.com/4Dv17R5/4D/ ## 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 +[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) - [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 diff --git a/docs/FormObjects/button_overview.md b/docs/FormObjects/button_overview.md index a4567b64440e3c..275c30eb5af157 100644 --- a/docs/FormObjects/button_overview.md +++ b/docs/FormObjects/button_overview.md @@ -20,6 +20,8 @@ Normally, you would activate the `On Clicked` event and the method would run onl The [variable](properties_Object.md#variable-or-expression) associated with a button is automatically set to **0** when the form is executed for the first time in Design or Application mode. When the user clicks a button, its variable is set to **1**. + + > 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. @@ -183,11 +185,11 @@ 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. +The OS X Gradient button style is nearly identical to the [Bevel](#bevel) style. 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 on the right side of the button. ![](assets/en/FormObjects/button_osxgradient.png) @@ -212,7 +214,7 @@ 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. +The OS X Textured button style is nearly identical to the [Bevel](#bevel) style but with a smaller size (maximum size is the size of a standard macOS system button). 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: @@ -362,5 +364,5 @@ Additional specific properties are available, depending on the [button style](#b - [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) +- [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) diff --git a/docs/FormObjects/checkbox_overview.md b/docs/FormObjects/checkbox_overview.md index 69f90678021c05..0327092ed41edf 100644 --- a/docs/FormObjects/checkbox_overview.md +++ b/docs/FormObjects/checkbox_overview.md @@ -2,13 +2,12 @@ id: checkboxOverview title: Check Box --- -## Overview -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). +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](#three-states-check-box) can be defined. ![](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. +Check boxes are controlled by methods or [standard actions](#using-a-standard-action). The method associated with it executes when the check box is selected. Like all buttons, a check box variable is set to 0 when the form is first opened. 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)). @@ -20,12 +19,12 @@ 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 -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. +Check box objects with [Regular](checkbox_overview.md#regular) and [Flat](checkbox_overview.md#flat) [button style](properties_TextAndPicture.md#button-style) 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) @@ -75,19 +74,19 @@ Only actions that can represent a true/false status ("checkable" actions) are su |visibleReferences || |widowAndOrphanControlEnabled |4D Write Pro areas only| -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. +For detailed information on these actions, please refer to the [Standard actions](properties_Action.md#standard-action) section. ## Check box button styles -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. +Check boxes use [button styles](properties_TextAndPicture.md#button-style) to 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. 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. -4D provides check boxes in the following predefined styles: +4D provides check boxes in the following predefined button styles: ### Regular -The Regular check box style is a standard system check box (*i.e.*, a rectangle with a descriptive title): +The Regular check box button style is a standard system check box (*i.e.*, a rectangle with a descriptive title): ![](assets/en/FormObjects/checkbox_regular.png) @@ -111,7 +110,7 @@ The Regular check box style is a standard system check box (*i.e.*, a rectangle ### 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. +The Flat check box button 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) @@ -132,11 +131,11 @@ The Flat check box style is a minimalist appearance. The Flat style's graphic na -### Toolbar button +### Toolbar Button -The Toolbar button check box style is primarily intended for integration in a toolbar. +The Toolbar Button check box button 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). +The Toolbar Button check box button style has a transparent background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example with states unchecked / checked / highlighted: @@ -163,9 +162,9 @@ Example with states unchecked / checked / highlighted: ### Bevel -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 check box button style combines the appearance of the [Regular](#regular) button style (*i.e.*, a rectangle with a descriptive title) with the [Toolbar Button](#toolbar-button) button 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). +The Bevel button style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example with states unchecked / checked / highlighted: @@ -192,15 +191,15 @@ Example with states unchecked / checked / highlighted: ### Rounded Bevel -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. +The Rounded Bevel check box button style is nearly identical to the [Bevel](#bevel) button style except, depending on the OS, the corners of the button may be rounded. As with the Bevel button style, the Rounded Bevel button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -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). +The Rounded Bevel button style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example on macOS: ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) -> on Windows, the Rounded Bevel style is identical to the [Bevel](#bevel) style. +> On Windows, the Rounded Bevel button style is identical to the [Bevel](#bevel) button style. #### JSON Example: @@ -223,13 +222,13 @@ 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. +The OS X Gradient check box button style is nearly identical to the [Bevel](#bevel) button style. As with the Bevel button style, the OS X Gradient button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -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). +The OS X Gradient button style has a light gray background with a title and may be 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) -> On Windows, this style is identical to the [Bevel](#bevel) style. +> On Windows, this check box button style is identical to the [Bevel](#bevel) button style. #### JSON Example: @@ -253,15 +252,15 @@ The OS X Gradient style has a light gray background with a title and is displaye ### OS X Textured -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. +The OS X Textured button style is similar to the [Bevel](#bevel) button style but with a smaller size (maximum size is the size of a standard macOS system button). As with the Bevel button style, the OS X Textured button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -By default, the OS X Textured style appears as: +By default, the OS X Textured button style appears as: - *Windows* - a standard system button with a light blue background with a title in the center. ![](assets/en/FormObjects/checkbox_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. Its height is predefined: it is not possible to enlarge or reduce it. ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) @@ -284,9 +283,9 @@ By default, the OS X Textured style appears as: ### Office XP -The Office XP check box style combines the appearance of the [Regular](#regular) style with the [Toolbar](#toolbar) style's behavior. +The Office XP button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button 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: +The colors (highlight and background) of a check box with the Office XP button style are based on the system colors. The appearance of the check box 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: @@ -317,9 +316,9 @@ The colors (highlight and background) of a button with the Office XP style are b ### Collapse / Expand -This check box style can be used to add a standard collapse/expand icon. These buttons are used natively in hierarchical lists. +This check box button style can be used to add a standard collapse/expand icon. These icons are used natively in hierarchical lists. - - *Windows* - the button looks like a [+] or a [-] + - *Windows* - the icon looks like a [+] or a [-] ![](assets/en/FormObjects/checkbox_collapse.png) @@ -346,7 +345,7 @@ This check box style can be used to add a standard collapse/expand icon. These b ### 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. +In macOS and Windows, a check box with the "Disclosure" button 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. - *Windows* @@ -374,9 +373,9 @@ In macOS and Windows, a check box with the "Disclosure" style appears as a stand ### Custom -The Custom check box style accepts a personalized background picture and allows managing specific properties: +The Custom button style accepts a personalized background picture and allows managing specific properties: -- [Background pathname](properties_TextAndPicture.md#backgroundPathname) +- [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) @@ -410,11 +409,11 @@ It is usually associated with a [4-state picture](properties_TextAndPicture.md#n All check boxes 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) - [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) - [Save value](properties_Object.md#save-value) - [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) +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [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) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Save value](properties_Object.md#save-value) - [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): - [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 +- [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) diff --git a/docs/FormObjects/comboBox_overview.md b/docs/FormObjects/comboBox_overview.md index b33436bdb20c91..c18b4143935f4e 100644 --- a/docs/FormObjects/comboBox_overview.md +++ b/docs/FormObjects/comboBox_overview.md @@ -2,24 +2,59 @@ id: comboBoxOverview title: Combo Box --- -## Overview 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. ![](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. +Fundamentally, you treat a combo box as an enterable area that uses its object, array or a choice list as the set of default values. -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. +## Handling combo boxes -## Options for combo boxes +Use the [`On Data Change`](Events/onDataChange.md) event to manage entries into the enterable area, as you would for any input form object. -Combo box type objects accept two specific options concerning choice lists associated with them: +You initialize a combo box in exactly the same way as a [drop-down list](dropdownList_Overview.md#overview): using an object, an array, or a choice list. -- [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. +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a combo box. The object must contain the following properties: + +|Property|Type|Description| +|---|---|---| +|`values`|Collection|Mandatory - Collection of scalar values. All values must be of the same type. Supported types:

  • strings
  • numbers
  • dates
  • times
  • If empty or not defined, the combo box is empty| +|`currentValue`|same as Collection|Text entered by the user| + +If the object contains other properties, they are ignored. + +When the user enters text into the combo box, the `currentValue` property of the object gets the entered text. + +### Using an array + +Please refer to **Using an array** in the [drop-down list page](dropdownList_Overview.md#using-an-array) for information about how to initialize the array. + +When the user enters text into the combo box, the 0th element of the array gets the entered text. + +### Using a choice list + +If you want to use a combo box to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the form object's data source. This makes it easier to manage listed fields/variables. + +>If you use a hierarchical list, only the first level is displayed and can be selected. + +To associate 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 form object in the Property List. + +When the form is executed, 4D automatically manages the 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 combo box when the form is displayed: + +Please refer to **Using a choice** in the [drop-down list page](dropdownList_Overview.md#using-a-choice-list) for more information. + + +## Options + +Combo box type objects accept two specific options: + +- [Automatic insertion](properties_DataSource.md#automatic-insertion): enables automatically adding a value to the data source when a user enters a value that is not found in the 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. ->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. +>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 [drop-down list](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 +[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [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) - [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) - [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 diff --git a/docs/FormObjects/dropdownList_Overview.md b/docs/FormObjects/dropdownList_Overview.md index 0ddb186c0123ba..4658387837f8d7 100644 --- a/docs/FormObjects/dropdownList_Overview.md +++ b/docs/FormObjects/dropdownList_Overview.md @@ -2,43 +2,103 @@ id: dropdownListOverview title: Drop-down List --- -## Overview -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. +Drop-down lists are form objects that allow the user to select from a list. You manage the items displayed in the drop-down list using an object, an array, a choice list, or a standard action. 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: ![](assets/en/FormObjects/popupDropdown_appearance.png) -## Using an array +## Drop-down list types -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. +You can create different types of drop-down lists with different features. To define a type, select the appropriate **Expression Type** and **Data Type** values in the Property list, or use their JSON equivalent. -Drop-down list objects are initialized by loading a list of values into an array. You can do this in several ways: +|Type|Features|Expression Type|Data Type|JSON definition| +|---|---|---|---|---| +|Object|Built upon a collection|Object|Numeric, Text, Date, or Time|`dataSourceTypeHint: object` + `numberFormat: ` or `textFormat: ` or `dateFormat: ` or `timeFormat: `| +|Array|Built upon an array|Array|Numeric, Text, Date, or Time|`dataSourceTypeHint: arrayNumber` or `arrayText` or `arrayDate` or `arrayTime`| +|Choice list saved as value|Built upon a choice list (standard)|List|Selected item value|`dataSourceTypeHint: text` + `saveAs: value`| +|Choice list saved as reference|Built upon a choice list. Item position is saved|List|Selected item reference|`dataSourceTypeHint: integer` + `saveAs: reference`| +|Hierarchical choice list|Can display hierarchical contents|List|List reference|`dataSourceTypeHint: integer`| +|Standard action|Automatically built by the action|*any*|*any except List reference*|any definition + `action: ` (+ `focusable: false` for actions applying to other areas)| + + + +## Handling drop-down lists + +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a drop-down list. The object must contain the following properties: + +|Property|Type|Description| +|---|---|---| +|`values`|Collection|Mandatory - Collection of scalar values. All values must be of the same type. Supported types:
  • strings
  • numbers
  • dates
  • times
  • If empty or not defined, the drop-down list is empty| +|`index`|number|Index of the currently selected item (value between 0 and `collection.length-1`). If you set -1, `currentValue` is displayed as a placeholder string| +|`currentValue`|same as Collection|Currently selected item (used as placeholder value if set by code)| + +If the object contains other properties, they are ignored. + +To initialize the object associated to the drop-down list, you can: + +* 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 object automatically. + +* Execute code that creates the object and its properties. For example, if "myList" is the [variable](properties_Object.md#variable-or-expression) associated to the drop-down list, you can write in the [On Load](Events/onLoad.md) form event: + +```4d +// Form.myDrop is the datasource of the form object + +Form.myDrop:=New object +Form.myDrop.values:=New collection("apples"; "nuts"; "pears"; "oranges"; "carrots") +Form.myDrop.index:=-1 //currentValue is a placeholder +Form.myDrop.currentValue:="Select a fruit" +``` + +The drop-down list is displayed with the placeholder string: + +![](assets/en/FormObjects/fruits2.png) + +After the user selects a value: + +![](assets/en/FormObjects/fruits3.png) + +```4d +Form.myDrop.values // ["apples","nuts","pears","oranges","carrots"] +Form.myDrop.currentValue //"oranges" +Form.myDrop.index //3 +``` + + + +### 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 can display an array as a list of values when you click on it. + +To initialize the array associated to the drop-down list, you can: * 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. * Before the object is displayed, execute code that assigns values to the array elements. For example: ```4d - ARRAY TEXT($aCities;6) - $aCities{1}:="Philadelphia" - $aCities{2}:="Pittsburg" - $aCities{3}:="Grand Blanc" - $aCities{4}:="Bad Axe" - $aCities{5}:="Frostbite Falls" - $aCities{6}:="Green Bay" + ARRAY TEXT(aCities;6) + aCities{1}:="Philadelphia" + aCities{2}:="Pittsburg" + aCities{3}:="Grand Blanc" + aCities{4}:="Bad Axe" + aCities{5}:="Frostbite Falls" + aCities{6}:="Green Bay" ``` -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. + +In this case, the name of the [variable](properties_Object.md#variable-or-expression) 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: +* Before the object is displayed, load the values of a list into the array using the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command. For example: ```4d - LIST TO ARRAY("Cities";$aCities) + 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. +In this case also, the name of the [variable](properties_Object.md#variable-or-expression) associated with the object in the form must be `aCities`. This code would be run in place of the assignment statements shown above. 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: @@ -60,32 +120,56 @@ 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. +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. + +### Using a choice list -## Using a choice list +If you want to use a drop-down list to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the drop-down list's [data source](properties_Object.md#variable-or-expression). This makes it easier to manage listed fields/variables. -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. +For example, in the case of a "Color" field that can only contain the values "White", "Blue", "Green" or "Red", it is possible to create a list containing these values and associate it with a drop-down list that references the 4D "Color" field. 4D then automatically takes care of managing the input and display of the current value in the form. ->If you use a hierarchical list, only the first level is displayed and can be selected. +>If you use a hierarchical list, only the first level is displayed and can be selected. If you want to display hierarchical contents, you need to use a [hierarchical choice list](#using-a-hierarchical-choice-list). -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. +To associate a drop-down list with a field or variable, enter the name of the field or variable directly as the [Variable or Expression](properties_Object.md#variable-or-expression) field of the drop-down list in the Property List. -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. +>It is not possible to use this feature with an object or an array drop-down list. If you enter a field name in the "Variable or Expression" area, then you must use a choice list. -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: +When the form is executed, 4D automatically manages the drop-down list during input or display: when a user chooses a value, it is saved in the field; this field value is shown in the drop-down list when the form is displayed: ![](assets/en/FormObjects/popupDropdown_choiceList.png) ->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. +#### Selected item value or Selected item reference + +When you have associated a drop-down list with a choice list and with a field or a variable, you can set the [**Data Type**](properties_DataSource.md#data-type) property to **Selected item value** or **Selected item reference**. This option lets you optimize the size of the data saved. + +### Using a hierarchical choice list -## 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. +A hierarchical drop-down list has a sublist associated with each item in the list. Here is an example of a hierarchical drop-down list: -For more information, please refer to the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section. +![](assets/en/FormObjects/popupDropdown_hierar.png) + +> In forms, hierarchical drop-down lists are limited to two levels. + +You can assign the hierarchical choice list to the drop-down list object using the [Choice List](properties_DataSource.md#choice-list) field of the Property List. + +You manage hierarchical drop-down lists using the **Hierarchical Lists** commands of the 4D Language. All commands that support the `(*; "name")` syntax can be used with hierarchical drop-down lists, e.g. [`List item parent`](https://doc.4d.com/4dv19/help/command/en/page633.html). + + +### Using a standard action + +You can build automatically a drop-down list using a [standard action](properties_Action.md#standard-action). This feature is supported in the following contexts: + +- Use of the `gotoPage` standard action. In this case, 4D will automatically display the [page of the form](FormEditor/forms.md#form-pages) that corresponds to the number of the item that is selected. For example, if the user selects the 3rd item, 4D will display the third page of the current form (if it exists). At runtime, by default the drop-down list displays the page numbers (1, 2...). + +- Use of a standard action that displays a sublist of items, for example `backgroundColor`. This feature requires that: + - a styled text area ([4D Write Pro area](writeProArea_overview.md) or [input](input_overview.md) with [multistyle](properties_Text.md#multi-style) property) is present in the form as the standard action target. + - the [focusable](properties_Entry.md#focusable) property is not set to the drop-down list. +At runtime the drop-down list will display an automatic list of values, e.g. background colors. You can override this automatic list by assigning in addition a choice list in which each item has been assigned a custom standard action. + +> This feature cannot be used with a hierarchical drop-down list. ## 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) - [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) - [Save value](properties_Object.md#save-value) - [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 + +[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) - [Data Type (expression type)](properties_DataSource.md#data-type-expression-type) - [Data Type (list)](properties_DataSource.md#data-type-list) - [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 value](properties_Object.md#save-value) - [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 diff --git a/docs/FormObjects/input_overview.md b/docs/FormObjects/input_overview.md index faf778c0ff08f9..f31ecd40b7cddd 100644 --- a/docs/FormObjects/input_overview.md +++ b/docs/FormObjects/input_overview.md @@ -3,7 +3,6 @@ id: inputOverview title: Input --- -## Overview 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: @@ -31,7 +30,8 @@ You can manage the data with object or form [methods](Concepts/methods.md). ## 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) + +[Allow font/color picker](properties_Text.md#allow-font-color-picker) - [Alpha Format](properties_Display.md#alpha-format) - [Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Bold](properties_Text.md#bold) - [Test when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [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) - [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) - [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) --- diff --git a/docs/FormObjects/list_overview.md b/docs/FormObjects/list_overview.md index a3456ddfafb31f..3a35070a0597ad 100644 --- a/docs/FormObjects/list_overview.md +++ b/docs/FormObjects/list_overview.md @@ -3,7 +3,6 @@ id: listOverview title: Hierarchical List --- -## Overview 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. @@ -30,10 +29,10 @@ 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. For example, if you have associated the mylist [variable](properties_Object.md#variable-or-expression) to the form object, you can write: ```4d -$mylist:=New list +mylist:=New list ``` Each representation of the list has its own specific characteristics and shares common characteristics with all the other representations. The following characteristics are specific to each representation of the list: @@ -157,4 +156,4 @@ You can control whether hierarchical list items can be modified by the user by u ## 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 +[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) - [Help Tip](properties_Help.md#help-tip) - [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 diff --git a/docs/FormObjects/listbox_overview.md b/docs/FormObjects/listbox_overview.md index ce1326630cceb1..c31f9341b3c5a0 100644 --- a/docs/FormObjects/listbox_overview.md +++ b/docs/FormObjects/listbox_overview.md @@ -3,14 +3,15 @@ id: listboxOverview title: List Box --- -## Overview -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 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 management, customized appearance, moving of columns, 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). +## Overview + ### Basic user features 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: @@ -73,7 +74,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 +82,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. @@ -322,6 +323,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) @@ -537,24 +539,26 @@ By default, a list box automatically handles standard column sorts when the head You can prevent standard user sorts by deselecting the [Sortable](properties_Action.md#sortable) property of the 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. +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`](https://doc.4d.com/4dv19/help/command/en/page1606.html) command) and relevant 4D commands. -> 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. +> The [Sortable](properties_Action.md#sortable) property only affects the standard user sorts; the [`LISTBOX SORT COLUMNS`](https://doc.4d.com/4dv19/help/command/en/page916.html) command does not take this property into account. 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. -- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed; +- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed. ![](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; +- 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) -- If the variable is set to 2, the column is sorted in descending order and the sort arrow is displayed. +- 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) -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. +> Only declared or dynamic [variables](Concepts/variables.md) can be used as header column variables. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.sortValue` are not supported. + +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. -> 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. +> The [`OBJECT SET FORMAT`](https://doc.4d.com/4dv19/help/command/en/page236.html) command offers specific support for icons in list box headers, which can be useful when you want to work with a customized sort icon. ## Managing row colors, styles, and display diff --git a/docs/FormObjects/pictureButton_overview.md b/docs/FormObjects/pictureButton_overview.md index 56adb0674ed894..90e61a159ac099 100644 --- a/docs/FormObjects/pictureButton_overview.md +++ b/docs/FormObjects/pictureButton_overview.md @@ -2,7 +2,6 @@ id: pictureButtonOverview title: Picture Button --- -## Overview 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. diff --git a/docs/FormObjects/picturePopupMenu_overview.md b/docs/FormObjects/picturePopupMenu_overview.md index cfac411ac4228f..a51991ea473710 100644 --- a/docs/FormObjects/picturePopupMenu_overview.md +++ b/docs/FormObjects/picturePopupMenu_overview.md @@ -2,7 +2,6 @@ id: picturePopupMenuOverview title: Picture Pop-up Menu --- -## Overview 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. diff --git a/docs/FormObjects/pluginArea_overview.md b/docs/FormObjects/pluginArea_overview.md index 72eb72849fdce4..17aa9ec6fec235 100644 --- a/docs/FormObjects/pluginArea_overview.md +++ b/docs/FormObjects/pluginArea_overview.md @@ -3,11 +3,10 @@ id: pluginAreaOverview title: Plug-in Area --- -## Overview 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: +When opening an application, 4D creates an internal list of the plug-ins [installed in your application](#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: ![](assets/en/FormObjects/pluginArea.png) @@ -16,7 +15,7 @@ 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 +## Advanced properties 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. diff --git a/docs/FormObjects/progressIndicator.md b/docs/FormObjects/progressIndicator.md index 8453e87fef3a4c..0880f224295a6e 100644 --- a/docs/FormObjects/progressIndicator.md +++ b/docs/FormObjects/progressIndicator.md @@ -2,28 +2,28 @@ id: progressIndicator title: Progress Indicator --- -## Overview + 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 +## Using indicators 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. The variable associated with the indicator controls the display. You place values into, or use values from, the indicator using methods. For example, a method for a field or enterable object could be used to control a progress indicator: ```4d - $vTherm:=[Employees]Salary + 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. +This method assigns the value of the Salary field to the vTherm variable. 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: ```4d - [Employees]Salary:=$vTherm + [Employees]Salary:=vTherm ``` 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. @@ -40,7 +40,7 @@ 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) - [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](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") - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Italic](properties_Text.md#italic) - [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) - [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) ## Barber shop @@ -58,8 +58,9 @@ When the form is executed, the object is not animated. You manage the animation * 1 (or any value other than 0) = Start animation, * 0 = Stop animation. + ### Supported Properties -[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) +[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") - [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) - [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) ## See also diff --git a/docs/FormObjects/properties_Action.md b/docs/FormObjects/properties_Action.md index a9252ec4bb786d..89138a6bc3874c 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. @@ -117,7 +117,7 @@ In this case, 4D does not provide automatic support for object operations. #### 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) - [Forms](forms.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) +[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) - [Forms](FormEditor/forms.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) diff --git a/docs/FormObjects/properties_BackgroundAndBorder.md b/docs/FormObjects/properties_BackgroundAndBorder.md index b4db68efdcea0a..7a32af099c597f 100644 --- a/docs/FormObjects/properties_BackgroundAndBorder.md +++ b/docs/FormObjects/properties_BackgroundAndBorder.md @@ -11,7 +11,7 @@ Allows setting a different background color for odd-numbered rows/columns in a l |Name|Data Type|Possible Values| |---|---|---| -|alternateFill|string|any css value; "transparent"; "automatic"| +|alternateFill|string|any css value; "transparent"; "automatic"; "automaticAlternate"| #### Objects Supported [List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) @@ -112,6 +112,7 @@ You can remove these empty rows by selecting this option. The bottom of the list ![](assets/en/FormObjects/property_hideExtraBlankRows2.png) + #### JSON Grammar |Name|Data Type|Possible Values| diff --git a/docs/FormObjects/properties_DataSource.md b/docs/FormObjects/properties_DataSource.md index 043e3814e4ecc3..d224ed6be3e1a3 100644 --- a/docs/FormObjects/properties_DataSource.md +++ b/docs/FormObjects/properties_DataSource.md @@ -5,20 +5,22 @@ title: Data Source --- ## 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. +When this option is selected, if a user enters a value that is not found in the list associated with the object, this value is automatically added to the list stored in memory. + +When the **automatic insertion** option is not set (default), the value entered is stored in the form object but not in the list in memory. + +This property is supported by: + +- [Combo box](comboBox_overview.md) and [list box column](listbox_overview.md#list-box-columns) form objects associated to a choice list. +- [Combo box](comboBox_overview.md) form objects whose associated list is filled by their array or object datasource. For example, given a choice list containing "France, Germany, Italy" that is associated with a "Countries" combo box: if the **automatic insertion** property is set and a user enters "Spain", then the value "Spain" is automatically added to the list in memory: ![](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 choice list was created from a list defined in Design mode, the original list is not modified. ->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 @@ -38,6 +40,9 @@ When the **automatic insertion** option is not selected (default), the value ent Associates a choice list with an object. It can be a choice list name (a list reference) or a collection of default values. +You can also associate choice lists to objects using the [OBJECT SET LIST BY NAME](https://doc.4d.com/4dv19/help/command/en/page237.html) or [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4dv19/help/command/en/page1266.html) commands. + + #### JSON Grammar |Name|Data Type|Possible Values| @@ -116,17 +121,61 @@ Specifies a variable or expression that will be assigned a longint indicating th --- -## Data Type +## Data Type (expression type) -Please refer to [Expression Type](properties_Object.md#expression-type) section. +Defines the data type for the displayed expression. This property is used with: + +- [List box columns](listbox_overview.md#list-box-columns) of the selection and collection types. +- [Drop-down lists](dropdownList_Overview.md) associated to objects or arrays. + +See also [**Expression Type**](properties_Object.md#expression-type) section. + +#### JSON Grammar + +|Name|Data Type|Possible Values| +|---|---|---| +|dataSourceTypeHint |string |
  • **list box columns:** "boolean", "number", "picture", "text", date", "time". *Array/selection list box only*: "integer", "object"
  • **drop-down lists:** "object", "arrayText", "arrayDate", "arrayTime", "arrayNumber"
  • | + #### Objects Supported -[List Box Column](listbox_overview.md#list-box-columns) +[Drop-down Lists](dropdownList_Overview.md) associated to objects or arrays - [List Box column](listbox_overview.md#list-box-columns) + + + +--- +## Data Type (list) + +Defines the type of data to save in the field or variable associated to the [drop-down list](dropdownList_Overview.md). This property is used with: +- Drop-down lists [associated to a choice list](dropdownList_Overview.md#using-a-choice-list). +- Drop-down lists [associated to a hierarchical choice list](dropdownList_Overview.md#using-a-hierarchical-choice-list). +Three options are available: +- **List reference**: declares that the drop-down list is hierarchical. It means that the drop-down list can display up to two hierarchical levels and its contents can be managed by the 4D language commands of the **Hierarchical Lists** theme. +- **Selected item value** (default): the drop-down list is not hierarchical and the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. +- **Selected item reference**: the drop-down list is not hierarchical and the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. +Using the **Selected item reference** option requires compliance with the following principles: +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. +- Valid and unique references must be associated with list items. +- The drop-down list must be associated with a field or a variable. + + +#### JSON Grammar + +|Name|Data Type|Possible Values| +|---|---|---| +|saveAs| string|"value", "reference"| + + +> Setting only `"dataSourceTypeHint" : "integer"` with a `"type": "dropdown"` form object will declare a hierarchical drop-down list. + + +#### Objects Supported + +[Drop-down Lists](dropdownList_Overview.md) associated to lists --- @@ -230,7 +279,6 @@ All database tables can be used, regardless of whether the form is related to a ## Save as - This property is available in the following conditions: - a [choice list](#choice-list) is associated with the object @@ -239,15 +287,14 @@ This property is available in the following conditions: This property specifies, in the context of a field or variable associated with a list of values, the type of contents to save: - **Save as Value** (default option): the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. -- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the `APPEND TO LIST` or `SET LIST ITEM` commands, or in the lists editor. +- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. Using this property requires compliance with the following principles: -- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. - 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 @@ -257,7 +304,7 @@ Using this property requires compliance with the following principles: |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) +[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) diff --git a/docs/FormObjects/properties_Entry.md b/docs/FormObjects/properties_Entry.md index dd6b6d1ee0bbc8..1eab817ad428d8 100644 --- a/docs/FormObjects/properties_Entry.md +++ b/docs/FormObjects/properties_Entry.md @@ -71,7 +71,7 @@ When this property is disabled, any pop-up menus associated with a list box colu #### 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) +[4D Write Pro areas](writeProArea_overview.md) - [Check Box](checkbox_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) --- @@ -130,7 +130,7 @@ Here is a table that explains each of the entry filter choices in the Entry Filt #### 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) +[Check Box](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) diff --git a/docs/FormObjects/properties_Object.md b/docs/FormObjects/properties_Object.md index 3af4e0c9f28e1d..a9876d069292ae 100644 --- a/docs/FormObjects/properties_Object.md +++ b/docs/FormObjects/properties_Object.md @@ -79,7 +79,7 @@ Here is the list of objects whose value can be saved: --- ## Variable or Expression -> See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. +> See also **[Expression](properties_DataSource.md#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. @@ -90,9 +90,18 @@ The form object variables allow you to control and monitor the objects. For exam Variables or expressions can be enterable or non-enterable and can receive data of the Text, Integer, Numeric, Date, Time, Picture, Boolean, or Object type. + +#### JSON Grammar + +|Name|Data Type|Possible Values| +|---|---|---| +|dataSource|string, or string array|
  • 4D variable, field name, or any 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]| + + + ### 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). +You can use an [expression](Concepts/quick-tour.md#expressions) as data source for an object. Any valid 4D expression is allowed: simple expression, object property, 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. @@ -131,17 +140,11 @@ 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 - -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 -|Name|Data Type|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 @@ -152,13 +155,19 @@ Using a string array (collection of arrays names) as *dataSource* value for a li + + + + + + --- ## Expression Type -> This property is called **Data Type** in the Property List for Selection and collection type list box columns. +> This property is called [**Data Type**](properties_DataSource.md#data-type-expression-type) in the Property List for [selection](listbox_overview.md#selection-list-boxes) and [collection](listbox_overview.md#collection-or-entity-selection-list-boxes) type list box columns and for [Drop-down Lists](dropdownList_Overview.md) associated to an [object](FormObjects/dropdownList_Overview.md#using-an-object) or an [array](FormObjects/dropdownList_Overview.md#using-an-array). -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. +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 project compilation, you must [declare the variable](Concepts/variables.md#declaring-variables). However, this property has a typing function in the following specific cases: @@ -172,7 +181,7 @@ Otherwise, the picture variable will not be displayed correctly (only in interpr |Name|Data Type|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"| +|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", "time". *Array/selection list box only*: "integer", "object"| #### Objects Supported @@ -182,7 +191,7 @@ Otherwise, the picture variable will not be displayed correctly (only in interpr --- ## CSS Class -A list of space-separated words used as class selectors in css files. +A list of space-separated words used as class selectors in [css files](FormEditor/createStylesheet.md#style-sheet-files). #### JSON Grammar @@ -306,7 +315,7 @@ 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)). +For application 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 @@ -329,15 +338,15 @@ For database translation purposes, you can enter an XLIFF reference in the title 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. +>The calculation for footers can also be set using the [`LISTBOX SET FOOTER CALCULATION`](https://doc.4d.com/4dv19/help/command/en/page1140.html) 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| +|Minimum|X|X|X|X|X||Same as column type| +|Maximum|X|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| @@ -347,14 +356,25 @@ There are several types of calculations available. The following table shows whi (*) 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. +> Only declared or dynamic [variables](Concepts/variables.md) can be used to display footer calculations. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.value` are not supported. + +Automatic calculations ignore the shown/hidden state of list box rows. If you want to restrict a calculation to only visible rows, you must use a custom calculation. + +*Null* values are not taken into account for any calculations. + +If the column contains different types of values (collection-based column for example): + +- Average and Sum only take numerical elements into account (other element types are ignored). +- Minimum and Maximum return a result according to the usual type list order as defined in the [collection.sort()](API/CollectionClass.md#sort) function. + +Using automatic calculations in footers of columns based upon expressions has the following limitations: + +- it is **supported** with all list box types when the expression is "simple" (such as `[table]field` or `this.attribute`), +- it is **supported but not recommended** for performance reasons with collection/entity selection list boxes when the expression is "complex" (other than `this.attribute`) and the list box contains a large number of rows, +- it is **not supported** with current selection/named selection list boxes when the expression is "complex". You need to use custom calculations. -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. +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 diff --git a/docs/FormObjects/properties_Picture.md b/docs/FormObjects/properties_Picture.md index 6f1303fd05022e..083dd66f493f50 100644 --- a/docs/FormObjects/properties_Picture.md +++ b/docs/FormObjects/properties_Picture.md @@ -9,7 +9,7 @@ Pathname of a static source picture for a [picture button](pictureButton_overvie 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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. diff --git a/docs/FormObjects/properties_Reference.md b/docs/FormObjects/properties_Reference.md index 587e2baa4511a2..fd352c840882dc 100644 --- a/docs/FormObjects/properties_Reference.md +++ b/docs/FormObjects/properties_Reference.md @@ -35,191 +35,192 @@ You will find in this page a comprehensive list of all object properties sorted |Property|Description|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| +|[`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"; "automaticAlternate"| +|[`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. |minimum: 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).|minimum: 0| +|[`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. |minimum: 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).|minimum: 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.|minimum: 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.|minimum: 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.|minimum: 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. |minimum: 0| -|[customProperties](properties_Plugins.md#advanced-properties)|Advanced properties (if any) |JSON string or base64 encoded string| +|[`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.|minimum: 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.|minimum: 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.|minimum: 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. |minimum: 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)| +|[`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-expression-type) (list box column, drop-down list)|Indicates the variable type.|"integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "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| -|[entryFilter](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.| +|[`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| +|[`entryFilter`](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`](Events/overview.md)|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| +|[`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| +|[`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"| +|[`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| +|[`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"| +|[`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"| +|[`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| +|[`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) (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"| +|[`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)| +|[`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| +|[`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)| +|[`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.| +|[`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| +|[`saveAs`](properties_DataSource.md#save-as) (list box column)
    [`saveAs`](properties_DataSource.md#data-type-list) (drop-down list)|The type of contents to save in the field or variable associated to the form object|"value", "reference"| +|[`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.|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_Text.md#font-color) (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**||| -|[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| +|[`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"| +|[`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"| +|[`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"| +|[`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)| +|[`zoom`](properties_Appearance.md#zoom)|Zoom percentage for displaying 4D Write Pro area|number (minimum=0)| diff --git a/docs/FormObjects/properties_Subform.md b/docs/FormObjects/properties_Subform.md index b860e2ced69e66..ec61590f414bcb 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 4a5af304afa526..a117ac2163c70c 100644 --- a/docs/FormObjects/properties_Text.md +++ b/docs/FormObjects/properties_Text.md @@ -276,7 +276,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) --- @@ -327,26 +327,17 @@ Specifies an expression or a variable which will be evaluated for each row displ |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: - -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` +**Example** -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")) @@ -356,7 +347,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. diff --git a/docs/FormObjects/properties_WebArea.md b/docs/FormObjects/properties_WebArea.md index 8dcf7a633270de..f82908e02f6c6e 100644 --- a/docs/FormObjects/properties_WebArea.md +++ b/docs/FormObjects/properties_WebArea.md @@ -82,16 +82,13 @@ The URL variable produces the same effects as the [WA OPEN URL](https://doc.4d.c 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. +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 WebKit ones. +* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google (CEF). 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. + +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). +- 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/radio_overview.md b/docs/FormObjects/radio_overview.md index 475013fbd23d31..aa99be7844820c 100644 --- a/docs/FormObjects/radio_overview.md +++ b/docs/FormObjects/radio_overview.md @@ -2,7 +2,6 @@ id: radiobuttonOverview title: Radio Button --- -## Overview Radio buttons are objects that allow the user to select one of a group of buttons. @@ -119,7 +118,7 @@ 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 behavior. +The Office XP button style combines the appearance of the [Regular](#regular) style (standard system button) 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: diff --git a/docs/FormObjects/ruler.md b/docs/FormObjects/ruler.md index 7de74313fc7567..cf96f3775783ac 100644 --- a/docs/FormObjects/ruler.md +++ b/docs/FormObjects/ruler.md @@ -2,7 +2,7 @@ id: ruler title: Ruler --- -## Overview + The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. @@ -13,8 +13,10 @@ 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 + - [progress indicators](progressIndicator.md) - [steppers](stepper.md) \ No newline at end of file diff --git a/docs/FormObjects/spinner.md b/docs/FormObjects/spinner.md index d7316c6489997c..2e59c4fada5631 100644 --- a/docs/FormObjects/spinner.md +++ b/docs/FormObjects/spinner.md @@ -2,7 +2,6 @@ id: spinner title: Spinner --- -## Overview The spinner is a circular indicator that displays a continuous animation, like the [Barber shop](progressIndicator.md#barber-shop). @@ -16,5 +15,6 @@ 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 diff --git a/docs/FormObjects/splitters.md b/docs/FormObjects/splitters.md index 62286b46b26e6d..ed304c4d7f7ff5 100644 --- a/docs/FormObjects/splitters.md +++ b/docs/FormObjects/splitters.md @@ -3,9 +3,9 @@ id: splitters title: Splitter --- -## Overview -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. The splitter takes into account each object’s resizing properties, which means that you can completely customize your application's interface. A splitter may or may not be a “pusher.†Splitter are used for example in output forms so that columns can be resized: @@ -36,7 +36,8 @@ 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) + +[Border Line Style](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [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) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [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) ## Interaction with the properties of neighboring objects @@ -54,6 +55,7 @@ In a form, splitters interact with the objects that are around them according to ## Managing splitters programmatically + 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. diff --git a/docs/FormObjects/staticPicture.md b/docs/FormObjects/staticPicture.md index 35fcbb59dfc360..8498c173210387 100644 --- a/docs/FormObjects/staticPicture.md +++ b/docs/FormObjects/staticPicture.md @@ -2,7 +2,7 @@ id: staticPicture title: Static picture --- -## Overview + 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: @@ -11,7 +11,7 @@ Static pictures are [static objects](formObjects_overview.md#active-and-static-o 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. Either way, your application will run faster than if the picture was pasted into each page. @@ -21,7 +21,7 @@ The original picture must be stored in a format managed natively by 4D (4D recog 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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. diff --git a/docs/FormObjects/stepper.md b/docs/FormObjects/stepper.md index 8f24cabfc75d90..d853f5fe809ff3 100644 --- a/docs/FormObjects/stepper.md +++ b/docs/FormObjects/stepper.md @@ -2,7 +2,6 @@ id: stepper title: Stepper --- -## Overview A stepper lets the user scroll through numeric values, durations (times) or dates by predefined steps by clicking on the arrow buttons. @@ -15,9 +14,9 @@ You can assign the variable associated with the object to an enterable area (fie 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) + * [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 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. @@ -25,7 +24,7 @@ A stepper can be associated directly with a number, time or date variable. 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) - [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) +[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) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [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 diff --git a/docs/FormObjects/subform_overview.md b/docs/FormObjects/subform_overview.md index 16ef96427cb21e..fb5fb71e1d1cff 100644 --- a/docs/FormObjects/subform_overview.md +++ b/docs/FormObjects/subform_overview.md @@ -3,12 +3,11 @@ id: subformOverview title: Subform --- -## Overview A subform is a form included in another form. -### Terminology +## Terminology In order to clearly define the concepts implemented with subforms, here are some definitions for certain terms used: diff --git a/docs/FormObjects/tabControl.md b/docs/FormObjects/tabControl.md index 3bdab4df2c62a7..9e626a3abed63b 100644 --- a/docs/FormObjects/tabControl.md +++ b/docs/FormObjects/tabControl.md @@ -11,7 +11,7 @@ The following multi-page form uses a tab control object: To navigate from screen to screen, the user simply clicks the desired tab. -The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command or the `gotoPage` standard action would be used when a user clicks a tab. +The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [`FORM GOTO` PAGE](https://doc.4d.com/4dv19/help/command/en/page247.html) command or the `gotoPage` standard action would be used when a user clicks a tab. Another use of the tab control is to control the data that is displayed in a subform. For example, a Rolodex could be implemented using a tab control. The tabs would display the letters of the alphabet and the tab control’s action would be to load the data corresponding to the letter that the user clicked. @@ -43,10 +43,40 @@ 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: +To supply the labels for a tab control, you can use: -* 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. +- an object +- a choice list +- an array + +### Using an object + +You can assign an [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) as the [data source](properties_Object.md#variable-or-expression) of the tab control. The object must contain the following properties: + +|Property|Type|Description| +|---|---|---| +|`values`|Collection|Mandatory - Collection of scalar values. Only string values are supported. If invalid, empty or not defined, the tab control is empty| +|`index`|number|Index of the currently tab control page (value between 0 and `collection.length-1`)| +|`currentValue`|Text|Currently selected value| + +The initialization code must be executed before the form is presented to the user. + +In the following example, `Form.tabControl` has been defined as tab control [expression](properties_Object.md#variable-or-expression). You can associate the [`gotoPage` standard action](#goto-page-action) to the form object: + +```4d +Form.tabControl:=New object +Form.tabControl.values:=New collection("Page 1"; "Page 2"; "Page 3") +Form.tabControl.index:=2 //start on page 3 +``` + + +### Using a choice list + +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 to a json list ("$ref"). Icons associated with list items in the Lists editor will be displayed in the tab control. + +### Using a Text array + +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) @@ -55,20 +85,20 @@ There are several ways to supply the labels for a tab control: 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. +>You can also store the names of the pages in a hierarchical list and use the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command to load the values into the array. -## Managing tabs programmatically +## Goto page features ### FORM GOTO PAGE command -You can use the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command in the tab control’s method: +You can use the [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/en/page247.html) command in the tab control’s method: ```4d FORM GOTO PAGE(arrPages) ``` -The command is executed when the `On Clicked` event occurs. You should then clear the array when the `On Unload` event occurs. +The command is executed when the [`On Clicked`](Events/onClicked.md) event occurs. You should then clear the array when the [`On Unload`](Events/onUnload.md) event occurs. Here is an example object method: @@ -90,5 +120,7 @@ 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) - [Save value](properties_Object.md#save-value) - [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) - [Save value](properties_Object.md#save-value) - [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/FormObjects/text.md b/docs/FormObjects/text.md index 1b5b9dfb22738f..6b66b8be56b862 100644 --- a/docs/FormObjects/text.md +++ b/docs/FormObjects/text.md @@ -3,7 +3,6 @@ id: text title: Text --- -## Overview 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). @@ -42,4 +41,4 @@ Once a text is rotated, you can still change its size or position, as well as al ## 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) +[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) - [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) - [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) diff --git a/docs/FormObjects/webArea_overview.md b/docs/FormObjects/webArea_overview.md index 05864cd64cd36d..a611fdf37031da 100644 --- a/docs/FormObjects/webArea_overview.md +++ b/docs/FormObjects/webArea_overview.md @@ -3,7 +3,6 @@ id: webAreaOverview title: Web Area --- -## Overview 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). @@ -29,16 +28,15 @@ You can choose between [two rendering engines](properties_WebArea.md#use-embedde Selecting the embedded web rendering engine allows you to call 4D methods from the web area. ### 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. -> This property is only available if the web area [uses the embedded web rendering engine](#use-embedded-web-rendering-engine). +> This property is only available if the web area [uses the embedded web rendering engine](properties_WebArea.md#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. +The [4D embedded web rendering engine](properties_WebArea.md#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. For example, to call the `HelloWorld` 4D method, you just execute the following statement: @@ -64,6 +62,7 @@ These parameters can be of any type supported by JavaScript (string, number, arr `` #### Example 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: @@ -128,27 +127,27 @@ $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). +Four specific standard actions are available for managing web areas automatically: `Open Back URL`, `Open Forward 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 Specific form events are intended for programmed management of web areas, more particularly concerning the activation of links: -- `On Begin URL Loading` -- `On URL Resource Loading` -- `On End URL Loading` -- `On URL Loading Error` -- `On URL Filtering` -- `On Open External Link` -- `On Window Opening Denied` +- [`On Begin URL Loading`](Events/onBeginUrlLoading.md) +- [`On URL Resource Loading`](Events/onUrlResourceLoading.md) +- [`On End URL Loading`](Events/onEndUrlLoading.md) +- [`On URL Loading Error`](Events/onUrlLoadingError.md) +- [`On URL Filtering`](Events/onUrlFiltering.md) +- [`On Open External Link`](Events/onOpenExternalLink.md) +- [`On Window Opening Denied`](Events/onWindowOpeningDenied.md) In addition, web areas support the following generic form events: -- `On Load` -- `On Unload` -- `On Getting Focus` -- `On Losing Focus` +- [`On Load`](Events/onLoad.md) +- [`On Unload`](Events/onUnload.md) +- [`On Getting Focus`](Events/onGettingFocus.md) +- [`On Losing Focus`](Events/onLosingFocus.md) ## Web area rules @@ -163,6 +162,7 @@ When the form is executed, standard browser interface functions are available to 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 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 web area. ### Subforms + For reasons related to window redrawing mechanisms, the insertion of a web area into a subform is subject to the following constraints: - The subform must not be able to scroll @@ -172,19 +172,19 @@ For reasons related to window redrawing mechanisms, the insertion of a web area ### Web Area and Web server conflict (Windows) -In 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 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. +In 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. ### Insertion of protocol (macOS) The URLs handled by programming in web areas in 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 in your forms or in offscreen web areas. The web inspector is a debugger which is provided by the embedded Web engine. It allows parsing the code and the flow of information of the web pages. ### Displaying the web inspector + To display the web inspector, you can either execute the `WA OPEN WEB INSPECTOR` command, or use the context menu of the web area. - **Execute the `WA OPEN WEB INSPECTOR` command**
    @@ -204,6 +204,7 @@ This feature can only be used with onscreen web areas and requires that the foll For more information, refer to the description of the `WA SET PREFERENCE` command. ### Using the web inspector + 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. diff --git a/docs/FormObjects/writeProArea_overview.md b/docs/FormObjects/writeProArea_overview.md index 4d2b5d8c9793fc..c874987036b153 100644 --- a/docs/FormObjects/writeProArea_overview.md +++ b/docs/FormObjects/writeProArea_overview.md @@ -3,7 +3,7 @@ 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 offers 4D users an advanced word-processing tool, fully integrated with your 4D application. 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) @@ -15,5 +15,5 @@ title: 4D Write Pro area ## 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) +[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) - [Draggable](properties_Action.md#draggable) - [Droppable](properties_Action.md#droppable) - [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 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) - [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) diff --git a/docs/GettingStarted/Installation.md b/docs/GettingStarted/Installation.md new file mode 100644 index 00000000000000..6315f010530c3e --- /dev/null +++ b/docs/GettingStarted/Installation.md @@ -0,0 +1,48 @@ +--- +id: installation +title: Installation +--- + +Welcome to 4D! On this page, you will find all of the necessary information about installing and launching your 4D product. + + +## Required configuration + +The [Product Download](https://us.4d.com/product-download) page on the 4D website provides information about the minimum macOS / Windows system requirements for your 4D series. + +Additional technical details are available on the 4D website's [Resources page](https://us.4d.com/resources/feature-release). + + +## Installation on disk + +4D products are installed from the 4D website: + +1. Connect to the 4D website and go to the [Downloads](https://us.4d.com/product-download) page. + +2. Click on the download link for your 4D product and follow the on-screen instructions. + + +## Sign in + +Once you have completed the installation, you can start 4D and sign in. To do so, double-click on the 4D product icon. + +![](assets/en/getStart/logo4d.png) + +The Welcome Wizard then appears: + +![](assets/en/getStart/welcome2.png) + +- If you want to discover and explore 4D, click on the **free trial** link. You will only be asked to sign in or to create a 4D account. + +- If you already have a 4D account, click on the **Sign in** link in the upper right side of the Welcome Wizard dialog and enter your account information. Any already registered 4D licenses are automatically updated (or additional expansion packs loaded) on your machine. + +Expand the **Open or create project application** area and select the action you want to perform: + +- **Connect to 4D Server** - use 4D as a remote client and connect to an application that is already loaded by 4D Server. + +- **Open a local application project** - load an existing application project stored on your disk. + +- **Create a new application project** - create a new, empty application project on your disk. + +Enjoy your 4D experience! + diff --git a/docs/MSC/analysis.md b/docs/MSC/analysis.md index 804f04724d2d8a..83407e727b042e 100644 --- a/docs/MSC/analysis.md +++ b/docs/MSC/analysis.md @@ -4,7 +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. This function is useful for parsing the use of an application or detecting the operation(s) that caused errors or malfunctions. In the case of an application 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). @@ -40,6 +40,5 @@ This information allows you to identify the source and context of each operation ***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. - +Click on **Analyze** to update the contents of the current log file of the selected application (named by default dataname.journal). The Browse button can be used to select and open another log file for the application. The **Export...** button can be used to export the contents of the file as text. diff --git a/docs/MSC/backup.md b/docs/MSC/backup.md index 3e4184ade21146..12ee71aca78800 100644 --- a/docs/MSC/backup.md +++ b/docs/MSC/backup.md @@ -10,8 +10,8 @@ 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. +- **Backup File Destination**: displays information about the location of the application 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 application. - **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. diff --git a/docs/MSC/compact.md b/docs/MSC/compact.md index 066eb2b9ce7865..30af57d5dce5f3 100644 --- a/docs/MSC/compact.md +++ b/docs/MSC/compact.md @@ -16,7 +16,7 @@ The “Information†area summarizes the data concerning the fragmentation of t - **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. If you attempt to carry out this operation in standard mode, a warning dialog box will inform you that the application will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the application (see [Compact records and indexes](#compact-records-and-indexes) below). ## Standard compacting @@ -29,7 +29,7 @@ To directly begin the compacting of the data file, click on the compacting butto 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. The application 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. @@ -37,9 +37,9 @@ When the operation is completed, the compacted files automatically replace the o ## 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: +After compacting is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". When you click on the **Open log file** button, 4D displays the most recent log file in the default browser of the machine. @@ -76,5 +76,5 @@ This option completely rebuilds the address table for the records during compact 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. +>- 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 application 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. diff --git a/docs/MSC/encrypt.md b/docs/MSC/encrypt.md index b53c3ada08158c..0f877bce31b872 100644 --- a/docs/MSC/encrypt.md +++ b/docs/MSC/encrypt.md @@ -4,14 +4,14 @@ 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. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section in the *Design Reference* manual. 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). 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 +>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 application 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. +- Encrypting a data file is a lengthy operation. It displays a progress indicator (which could be interrupted by the user). Note also that an application 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. ## Encrypting data for the first time @@ -22,7 +22,7 @@ Encrypting your data for the first time using the MSC requires the following ste 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) +![](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. @@ -35,16 +35,16 @@ The security level indicator can help you evaluate the strength of your passphra (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. If the MSC was opened in standard mode, the application is reopened in maintenance mode. 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. If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the application folder beforehand. ## Encryption maintenance operations -When a database is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. +When an application is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](assets/en/MSC/MSC_encrypt6.png) @@ -97,17 +97,17 @@ The data file is fully decrypted and a confirmation message is displayed: ## 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. Storing this file on an external device such a USB key will facilitate the use of an encrypted application, since the user would only need to connect the device to provide the key before opening the application 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. +- when the application is encrypted for the first time, +- when the application is re-encrypted with a new passphrase. 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*". +After an encryption operation has been completed, 4D generates a file in the Logs folder of the application. It is created in XML format and named "*ApplicationName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*ApplicationName_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. diff --git a/docs/MSC/information.md b/docs/MSC/information.md index d3f2065bde526c..9835dd01b407e3 100644 --- a/docs/MSC/information.md +++ b/docs/MSC/information.md @@ -8,9 +8,9 @@ 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). +The central part of the window indicates the name and location of the 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 current 4D user. - **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) @@ -37,9 +37,8 @@ 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. * +- **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 MSC.* - **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.* diff --git a/docs/MSC/overview.md b/docs/MSC/overview.md index c70b92ed303acb..d57063bb1fd095 100644 --- a/docs/MSC/overview.md +++ b/docs/MSC/overview.md @@ -8,36 +8,35 @@ The Maintenance and Security Center (MSC) window contains all the tools needed f **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. The way it is accessed also determines the way the application project is opened: in “maintenance†mode or “standard†mode. In maintenance mode, the project is not opened by 4D, only its reference is provided to the MSC. In standard mode, the project is opened by 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)). +In maintenance mode, only the MSC window is displayed (the project is not opened by the 4D application). This means that projects 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 project to be opened in maintenance mode (see [Feature availability](#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: +- **From the standard project opening dialog box** +The standard Open 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) +- **Help/Maintenance Security Center** menu or **MSC** button in the tool bar (project 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. + When you call this function, a standard Open file dialog appears so that you can select the *.4DProject* or *.4dz* file of the to be examined. The project will not be opened by 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: +In standard mode, a project 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). - -- Use the ```OPEN SECURITY CENTER``` language command. +- Use the “msc†standard action that it is possible to associate with a menu command or a form object. +- 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. +- Backup function is only available when the project 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 project 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. diff --git a/docs/MSC/repair.md b/docs/MSC/repair.md index 146bbf44a6aaa6..41f2cba63c7eee 100644 --- a/docs/MSC/repair.md +++ b/docs/MSC/repair.md @@ -4,31 +4,31 @@ 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. ->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. If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the application 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 -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. 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. ### 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. It will be placed in a subfolder named “Replaced files (repairing)†in the application 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. +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 (application 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. +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 application immediately. ![](assets/en/MSC/MSC_RepairOK.png) ## Recover by record headers @@ -36,8 +36,9 @@ Use this low-level repair option only when the data file is severely damaged and 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**. +> If you have deselected the **Records definitively deleted** option in the properties of a table in the 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: @@ -69,9 +70,9 @@ Use the **Ignore records** button to remove the association made manually betwee ## 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: +After repair is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". -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/docs/MSC/restore.md b/docs/MSC/restore.md index f613f5c8d6d90f..059c717048a40a 100644 --- a/docs/MSC/restore.md +++ b/docs/MSC/restore.md @@ -4,34 +4,32 @@ title: Restore Page sidebar_label: Restore Page --- -## 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: +You can manually restore an archive of the current application using the **Restore** page. This page provides several options that can be used to control the restoration: ![](assets/en/MSC/MSC_restore.png) -> 4D automatic recovery systems restore databases and include data log file when necessary. +> 4D automatic recovery systems restore applications and include data log file when necessary. -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. +The list found in the left part of the window displays any existing backups of the application. 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. +- **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 Project folder. 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 -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. +The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into an application. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 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. 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 -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. +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 application. Matching encryption keys must always be provided. When restoring a backup and integrating the current log file in a encrypted database: @@ -43,7 +41,7 @@ The following sequence illustrates the principles of a multi-key backup/restore |Operation|Generated files|Comment| |---|----|----| -|New database||| +|New data file||| |Add data (record # 1)||| |Backup database|0000.4BL and 0001.4BK|| |Add data (record # 2)||| diff --git a/docs/MSC/rollback.md b/docs/MSC/rollback.md index ce56dc746aa5a8..df34c4d21053d1 100644 --- a/docs/MSC/rollback.md +++ b/docs/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. +This function is only available when the application functions with a data log file. ![](assets/en/MSC/MSC_rollback1.png) diff --git a/docs/MSC/verify.md b/docs/MSC/verify.md index e0f0cb1d010262..64e89bc9f540cf 100644 --- a/docs/MSC/verify.md +++ b/docs/MSC/verify.md @@ -24,9 +24,9 @@ The page contains action buttons that provide direct access to the verification ## 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: +Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the application. 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: *ApplicationName*_Verify_Log_*yyyy-mm-dd hh-mm-ss*.xml where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". 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/docs/Menus/bars.md b/docs/Menus/bars.md index adb0bb51bf3355..f2afddbcc0460f 100644 --- a/docs/Menus/bars.md +++ b/docs/Menus/bars.md @@ -27,7 +27,7 @@ If you choose Open, a standard Open file dialog box will appear so that you can 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. +> You can choose whether to display or hide this window using the **Display toolbar** option in the 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. diff --git a/docs/Menus/creating.md b/docs/Menus/creating.md index 551df8142fcc1d..f73cfe3e6b371c 100644 --- a/docs/Menus/creating.md +++ b/docs/Menus/creating.md @@ -13,9 +13,9 @@ You can combine both features and use menus created in structure as templates to ## 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. By default, when you create a new project, 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. +This allows the user to access the Application environment as soon as the project is created. Menu Bar #1 is called automatically when the **Test Application** command is chosen in the **Run** menu. The default menu bar includes three menus: diff --git a/docs/Menus/overview.md b/docs/Menus/overview.md index cbf81696050fcb..c5512953fd3bd9 100644 --- a/docs/Menus/overview.md +++ b/docs/Menus/overview.md @@ -3,13 +3,13 @@ id: overview title: Overview --- -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. +You can create menu bars and menus for your 4D applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your applications easier to use and will make them feel familiar to users. ![](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 have many separate menu bars for each application. For example, you can use one menu bar that contains menus for standard operations on the database 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). diff --git a/docs/Menus/properties.md b/docs/Menus/properties.md index 490f33e478b7b0..0b4e1fb43f38a8 100644 --- a/docs/Menus/properties.md +++ b/docs/Menus/properties.md @@ -46,7 +46,7 @@ Each menu command can have a project method or a standard action attached to it. If you do not assign a method or a standard action to a menu command, choosing that menu command causes 4D to exit the Application environment and go to the Design environment. If only the Application environment is available, this means quitting to the Desktop. -Standard actions can be used to carry out various current operations linked to system functions (copy, quit, etc.) or to those of the 4D database (add record, select all, etc.). +Standard actions can be used to carry out various current operations linked to system functions (copy, quit, etc.) or to those of the database (add record, select all, etc.). You can assign both a standard action and a project method to a menu command. In this case, the standard action is never executed; however, 4D uses this action to enable/disable the menu command according to the current context and to associate a specific operation with it according to the platform. When a menu command is deactivated, the associated project method cannot be executed. @@ -176,7 +176,7 @@ You can associate an icon with a menu item. It will displayed directly in the me ![](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. If you select a picture file that is not already stored in the project resources folder, it is automatically copied in that folder. Once set, the item icon appears in the preview area: ![](assets/en/Menus/iconpreview.png) diff --git a/docs/Menus/sdi.md b/docs/Menus/sdi.md index 7c421d1e2fc86b..ee43ba119f28d4 100644 --- a/docs/Menus/sdi.md +++ b/docs/Menus/sdi.md @@ -3,13 +3,13 @@ id: sdi title: SDI mode on Windows --- -## Overview 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 +## SDI mode availability + The SDI mode is available in the following execution environment only: - Windows @@ -19,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. Check the **Use SDI mode on Windows** option in the "Interface" page of the Settings dialog box. 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. @@ -40,7 +40,7 @@ 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. +- If the **Splash screen** interface option was selected in the 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. ### Automatic quit diff --git a/docs/Notes/updates.md b/docs/Notes/updates.md new file mode 100644 index 00000000000000..817efbe94524d5 --- /dev/null +++ b/docs/Notes/updates.md @@ -0,0 +1,35 @@ +--- +id: updates +title: Documentation updates +--- + +The list of main updates in this documentation. For general information about new features in the 4D products, see the **release notes** on [doc.4d.com](https://doc.4d.com). + +## 4D v19 R2 + +- A [default .gitignore file](Preferences/general.md#create-gitignore-file) can be created with new projects +- New [Blob class API](API/BlobClass.md) to handle new [`4D.Blob` objects](Concepts/dt_blob.md#blob-types) +- `no-bom` support and new default end-of-line characters in [`.setText()`](API/FileClass.md#settext) + + +## 4D v19 + +- [IMAPTransporter Class](API/IMAPTransporterClass.md): new `.createBox()`, `.deleteBox()`, `.renameBox()`, `.subscribe()`, and `.unsubscribe()` functions. +- [File Class](API/FileClass.md): new `setAppInfo()` and `getAppInfo()` functions. +- New [4DEACH](Tags/tags.md#4deach-and-4dendeach) transformation tag. +- Web Server: new [SameSite session cookie](WebServer/webServerConfig.md#session-cookie-samesite) setting. +- Dark and light color scheme support for [forms](FormEditor/properties_FormProperties.md#color-scheme) and [style sheets](FormEditor/createStylesheet.md#media-queries) +- New default dark and light themes in [method editor preferences](Preferences/methods.md#theme-list). +- [Native compilation](Project/compiler.md#compiler-methods-for) for Silicon processors. +- [Variable calculation](FormObjects/properties_Object.md#variable-calculation) property is now supported by entity selection list box columns. +- New, comprehensive [CLI](Admin/cli.md) page. + + +## 4D v18 R6 + +- [Entity Selection Class](API/EntitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/IMAPTransporterClass.md), [POP3 Mail](API/POP3TransporterClass.md) and [SMTP Mail](API/SMTPTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/IMAPTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/SessionClass.md). diff --git a/docs/ORDA/dsMapping.md b/docs/ORDA/dsMapping.md new file mode 100644 index 00000000000000..29cb21dbbed5da --- /dev/null +++ b/docs/ORDA/dsMapping.md @@ -0,0 +1,261 @@ +--- +id: dsmapping +title: Data Model Objects +--- + +The ORDA technology is based upon an automatic mapping of an underlying database structure. It also provides access to data through entity and entity selection objects. As a result, ORDA exposes the whole database as a set of data model objects. + + +## Structure mapping + +When you call a datastore using the [`ds`](API/DataStoreClass.md#ds) or the [`Open datastore`](API/DataStoreClass.md#open-datastore) command, 4D automatically references tables and fields of the corresponding 4D structure as properties of the returned [datastore](#datastore) object: + +* Tables are mapped to dataclasses. +* Fields are mapped to storage attributes. +* Relations are mapped to relation attributes - relation names, defined in the Structure editor, are used as relation attribute names. + +![](assets/en/ORDA/datastoreMapping.png) + + +### General rules + +The following rules are applied for any conversions: + +* Table, field, and relation names are mapped to object property names. Make sure that such names comply with general object naming rules, as explained in the [object naming conventions](Concepts/identifiers.md) section. +* A datastore only references tables with a single primary key. The following tables are not referenced: + * Tables without a primary key + * Tables with composite primary keys. +* BLOB fields are automatically available as attributes of the [Blob object](Concepts/dt_blob.md#blob-types) type. + +> ORDA mapping does not take into account: +> - the "Invisible" option for tables or fields, +> - the virtual structure defined through `SET TABLE TITLES` or `SET FIELD TITLES`, +> - the "Manual" or "Automatic" property of relations. + + +### Rules for remote access control + +When accessing a remote datastore through the `Open datastore` command or [REST requests](REST/gettingStarted.md), only tables and fields with the **Expose as REST resource** property are available remotely. + +This option must be selected at the 4D structure level for each table and each field that you want to be exposed as dataclass and attribute in the datastore: + +![](assets/en/ORDA/ExposeDataclass.png) + + +### Data model update + +Any modifications applied at the level of the database structure invalidate the current ORDA model layer. These modifications include: + +* adding or removing a table, a field, or a relation +* renaming of a table, a field, or a relation +* changing a core property of a field (type, unique, index, autoincrement, null value support) + +When the current ORDA model layer has been invalidated, it is automatically reloaded and updated in subsequent calls of the local `ds` datastore on 4D and 4D Server. Note that existing references to ORDA objects such as entities or entity selections will continue to use the model from which they have been created, until they are regenerated. + +However, the updated ORDA model layer is not automatically available in the following contexts: + +* a remote 4D application connected to 4D Server -- the remote application must reconnect to the server. +* a remote datastore opened using `Open datastore` or through [REST calls](REST/gettingStarted.md) -- a new session must be opened. + + +## Object definition + +### Datastore + +The datastore is the interface object to a database. It builds a representation of the whole database as object. A datastore is made of a **model** and **data**: + +- The model contains and describes all the dataclasses that make up the datastore. It is independant from the underlying database itself. +- Data refers to the information that is going to be used and stored in this model. For example, names, addresses, and birthdates of employees are pieces of data that you can work with in a datastore. + +When handled through the code, the datastore is an object whose properties are all of the [dataclasses](#dataclass) which have been specifically exposed. + +4D allows you to handle the following datastores: + +- the local datastore, based on the current 4D database, returned by the `ds` command (the main datastore). +- one or more remote datastore(s) exposed as REST resources in remote 4D databases, returned by the `Open datastore` command. + +A datastore references only a single local or remote database. + +The datastore object itself cannot be copied as an object: + +```4d +$mydatastore:=OB Copy(ds) //returns null +``` + + +The datastore properties are however enumerable: + + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds;$prop) + //$prop contains the names of all the dataclasses +``` + + + +The main (default) datastore is always available through the `ds` command, but the `Open datastore` command allows referencing any remote datastore. + +### Dataclass + +A dataclass is the equivalent of a table. It is used as an object model and references all fields as attributes, including relational attributes (attributes built upon relations between dataclasses). Relational attributes can be used in queries like any other attribute. + +All dataclasses in a 4D project are available as a property of the `ds` datastore. For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each exposed table that you want to be exposed as dataclass in the datastore. + +For example, consider the following table in the 4D structure: + +![](assets/en/ORDA/companyTable.png) + +The `Company` table is automatically available as a dataclass in the `ds` datastore. You can write: + +```4d +var $compClass : cs.Company //declares a $compClass object variable of the Company class +$compClass:=ds.Company //assigns the Company dataclass reference to $compClass +``` + +A dataclass object can contain: + +* attributes +* relation attributes + +The dataclass offers an abstraction of the physical database and allows handling a conceptual data model. The dataclass is the only means to query the datastore. A query is done from a single dataclass. Queries are built around attributes and relation attribute names of the dataclasses. So the relation attributes are the means to involve several linked tables in a query. + +The dataclass object itself cannot be copied as an object: + +```4d +$mydataclass:=OB Copy(ds.Employee) //returns null +``` + +The dataclass properties are however enumerable: + +```code4d +ARRAY TEXT($prop;0) +OB GET PROPERTY NAMES(ds.Employee;$prop) +//$prop contains the names of all the dataclass attributes +``` + + +### Attribute + +Dataclass properties are attribute objects describing the underlying fields or relations. For example: + +```4d + $nameAttribute:=ds.Company.name //reference to class attribute + $revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to `$nameAttribute` and `$revenuesAttribute` references to the name and revenues attributes of the `Company` class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [Entities](#entity). + +All eligible fields in a table are available as attributes of their parent [dataclass](#dataclass). For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each field that you want to be exposed as a dataclass attribute. + + +#### Storage and Relation attributes + +Dataclass attributes come in several kinds: storage, relatedEntity, and relatedEntities. Attributes that are scalar (*i.e.*, provide only a single value) support all the standard 4D data types (integer, text, object, etc.). + +* A **storage attribute** is equivalent to a field in the 4D database and can be indexed. Values assigned to a storage attribute are stored as part of the entity when it is saved. When a storage attribute is accessed, its value comes directly from the datastore. Storage attributes are the most basic building block of an entity and are defined by name and data type. +* A **relation attribute** provides access to other entities. Relation attributes can result in either a single entity (or no entity) or an entity selection (0 to N entities). Relation attributes are built upon "classic" relations in the relational structure to provide direct access to related entity or related entities. Relation attributes are directy available in ORDA using their names. + +For example, consider the following partial database structure and the relation properties: + +![](assets/en/ORDA/relationProperties.png) + +All storage attributes will be automatically available: + +* in the Project dataclass: "ID", "name", and "companyID" +* in the Company dataclass: "ID", "name", and "discount" + +In addition, the following relation attributes will also be automatically available: + +* in the Project dataclass: **theClient** attribute, of the "relatedEntity" kind; there is at most one Company for each Project (the client) +* in the Company dataclass: **companyProjects** attribute, of the "relatedEntities" kind; for each Company there is any number of related Projects. + +>The Manual or Automatic property of a database relation has no effect in ORDA. + +All dataclass attributes are exposed as properties of the dataclass: + +![](assets/en/ORDA/dataclassProperties.png) + +Keep in mind that these objects describe attributes, but do not give access to data. Reading or writing data is done through [entity objects](entities.md#using-entity-attributes). + +#### Computed attributes + +[Computed attributes](ordaClasses.md#computed-attributes) are declared using a `get ` function in the [Entity class definition](ordaClasses.md#entity-class). Their value is not stored but evaluated each time they are accessed. They do not belong to the underlying database structure, but are built upon it and can be used as any attribute of the data model. + + +### Entity + +An entity is the equivalent of a record. It is actually an object that references a record in the database. It can be seen as an instance of a [dataclass](#dataclass), like a record of the table matching the dataclass. However, an entity also contains data correlated to the database related to the datastore. + +The purpose of the entity is to manage data (create, update, delete). When an entity reference is obtained by means of an entity selection, it also retains information about the entity selection which allows iteration through the selection. + +The entity object itself cannot be copied as an object: + +```4d + $myentity:=OB Copy(ds.Employee.get(1)) //returns null +``` + +The entity properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.get(1);$prop) + //$prop contains the names of all the entity attributes +``` + + +### Entity selection + +An entity selection is an object containing one or more reference(s) to entities belonging to the same dataclass. It is usually created as a result of a query or returned from a relation attribute. An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Example: + +```4d +var $e : cs.EmployeeSelection //declares a $e object variable of the EmployeeSelection class type +$e:=ds.Employee.all() //assigns the resulting entity selection reference to the $e variable +``` + +Entity selections can be: + +- "shareable" or "non-shareable", +- "sorted" or "unsorted". + +These points are discussed below. + +The entity selection object itself cannot be copied as an object: + +```4d + $myentitysel:=OB Copy(ds.Employee.all()) //returns null +``` + +The entity selection properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.all();$prop) + //$prop contains the names of the entity selection properties + //("length", 00", "01"...) +``` + + +#### Ordered or unordered entity selection + +For optimization reasons, by default 4D ORDA usually creates unordered entity selections, except when you use the `orderBy( )` method or use specific options. In this documentation, unless specified, "entity selection" usually refers to an "unordered entity selection". + +Ordered entity selections are created only when necessary or when specifically requested using options, i.e. in the following cases: + +* result of an `orderBy()` on a selection (of any type) or an `orderBy()` on a dataclass +* result of the `newSelection()` method with the `dk keep ordered` option + +Unordered entity selections are created in the following cases: + +* result of a standard `query()` on a selection (of any type) or a `query()` on a dataclass, +* result of the `newSelection()` method without option, +* result of any of the comparison methods, whatever the input selection types: `or()`, `and()`, `minus()`. + +>The following entity selections are always **ordered**: +> +>* entity selections returned by 4D Server to a remote client +>* entity selections built upon remote datastores. + +Note that when an ordered entity selection becomes an unordered entity selection, any repeated entity references are removed. diff --git a/docs/ORDA/entities.md b/docs/ORDA/entities.md new file mode 100644 index 00000000000000..186638f246194e --- /dev/null +++ b/docs/ORDA/entities.md @@ -0,0 +1,501 @@ +--- +id: entities +title: Working with data +--- + +In ORDA, you access data through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). These objects allow you to create, update, query, or sort the data of the datastore. + + +## Creating an entity + +There are two ways to create a new entity in a dataclass: + +* Since entities are references to database records, you can create entities by creating records using the "classic" 4D language and then reference them with ORDA methods such as `entity.next( )` or `entitySelection.first( )`. +* You can also create an entity using the `dataClass.new( )` method. + +Keep in mind that the entity is only created in memory. If you want to add it to the datastore, you must call the `entity.save( )` method. + +Entity attributes are directly available as properties of the entity object. For more information, please refer to [Using entity attributes](#using-entity-attributes). + +For example, we want to create a new entity in the "Employee" dataclass in the current datastore with "John" and "Dupont" assigned to the firstname and name attributes: + +```4d +var $myEntity : cs.EmployeeEntity +$myEntity:=ds.Employee.new() //Create a new object of the entity type +$myEntity.name:="Dupont" //assign 'Dupont' to the 'name' attribute +$myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute +$myEntity.save() //save the entity +``` + +>An entity is defined only in the process where it was created. You cannot, for example, store a reference to an entity in an interprocess variable and use it in another process. + +## Entities and references + +An entity contains a reference to a 4D record. Different entities can reference the same 4D record. Also, since an entity can be stored in a 4D object variable, different variables can contain a reference to the same entity. + +If you execute the following code: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) //access the employee with ID 1 + $e2:=$e1 + $e1.name:="Hammer" + //both variables $e1 and $e2 share the reference to the same entity + //$e2.name contains "Hammer" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef1.png) + +Now if you execute: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) + $e2:=ds.Employee.get(1) + $e1.name:="Hammer" + //variable $e1 contains a reference to an entity + //variable $e2 contains another reference to another entity + //$e2.name contains "smith" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef2.png) + +Note however that entities refer to the same record. In all cases, if you call the `entity.save( )` method, the record will be updated (except in case of conflict, see [Entity locking](#entity-locking)). + +In fact, `$e1` and `$e2` are not the entity itself, but a reference to the entity. It means that you can pass them directly to any function or method, and it will act like a pointer, and faster than a 4D pointer. For example: + +```4d + For each($entity;$selection) + do_Capitalize($entity) + End for each +``` + +And the method is: + +```4d + $entity:=$1 + $name:=$entity.lastname + If(Not($name=Null)) + $name:=Uppercase(Substring($name;1;1))+Lowercase(Substring($name;2)) + End if + $entity.lastname:=$name +``` + +You can handle entities like any other object in 4D and pass their references directly as [parameters](Concepts/parameters.md). + +>With the entities, there is no concept of "current record" as in the classic 4D language. You can use as many entities as you need, at the same time. There is also no automatic lock on an entity (see [Entity locking](#entity-locking)). When an entity is loaded, it uses the [lazy loading](glossary.md#lazy-loading) mechanism, which means that only the needed information is loaded. Nevertheless, in client/server, the entity can be automatically loaded directly if necessary. + + +## Using entity attributes + +Entity attributes store data and map corresponding fields in the corresponding table. Entity attributes of the storage kind can be set or get as simple properties of the entity object, while entity of the **relatedEntity** or **relatedEntities** kind will return an entity or an entity selection. + +>For more information on the attribute kind, please refer to the [Storage and Relation attributes](dsMapping.md#storage-and-relation-attributes) paragraph. + +For example, to set a storage attribute: + +```4d + $entity:=ds.Employee.get(1) //get employee attribute with ID 1 + $name:=$entity.lastname //get the employee name, e.g. "Smith" + $entity.lastname:="Jones" //set the employee name + $entity.save() //save the modifications +``` + +> Database Blob fields ([scalar blobs](Concepts/blob.md) are automatically converted to and from blob object attributes ([`4D.Blob`](Concepts/blob.md)) when handled through ORDA. When saving a blob object attribute, keep in mind that, unlike blob object size which is only limited by the available memory, Blob field size is limited to 2GB. + +Accessing a related attribute depends on the attribute kind. For example, with the following structure: + +![](assets/en/ORDA/entityAttributes.png) + +You can access data through the related object(s): + +```4d + $entity:=ds.Project.all().first().theClient //get the Company entity associated to the project + $EntitySel:=ds.Company.all().first().companyProjects //get the selection of projects for the company +``` + +Note that both *theClient* and *companyProjects* in the above example are primary relation attributes and represent a direct relationship between the two dataclasses. However, relation attributes can also be built upon paths through relationships at several levels, including circular references. For example, consider the following structure: + +![](assets/en/ORDA/entityAttributes2.png) + +Each employee can be a manager and can have a manager. To get the manager of the manager of an employee, you can simply write: + +```4d + $myEmp:=ds.Employee.get(50) + $manLev2:=$myEmp.manager.manager.lastname +``` + +## Assigning values to relation attributes + +In the ORDA architecture, relation attributes directly contain data related to entities: + +* An N->1 type relation attribute (**relatedEntity** kind) contains an entity +* A 1->N type relation attribute (**relatedEntities** kind) contains an entity selection + +Let's look at the following (simplified) structure: + +![](assets/en/ORDA/entityAttributes3.png) + +In this example, an entity in the "Employee" dataclass contains an object of type Entity in the "employer" attribute (or a null value). An entity in the "Company" dataclass contains an object of type EntitySelection in the "staff" attribute (or a null value). + +>In ORDA, the Automatic or Manual property of relations has no effect. + +To assign a value directly to the "employer" attribute, you must pass an existing entity from the "Company" dataclass. For example: + +```4d + $emp:=ds.Employee.new() // create an employee + $emp.lastname:="Smith" // assign a value to an attribute + $emp.employer:=ds.Company.query("name =:1";"4D")[0] //assign a company entity + $emp.save() +``` + +4D provides an additional facility for entering a relation attribute for an N entity related to a "1" entity: you pass the primary key of the "1" entity directly when assigning a value to the relation attribute. For this to work, you pass data of type Number or Text (the primary key value) to the relation attribute. 4D then automatically takes care of searching for the corresponding entity in the dataclass. For example: + +```4d + $emp:=ds.Employee.new() + $emp.lastname:="Wesson" + $emp.employer:=2 // assign a primary key to the relation attribute + //4D looks for the company whose primary key (in this case, its ID) is 2 + //and assigns it to the employee + $emp.save() +``` + +This is particularly useful when you are importing large amounts of data from a relational database. This type of import usually contains an "ID" column, which references a primary key that you can then assign directly to a relation attribute. + +This also means that you can assign primary keys in the N entities without corresponding entities having already been created in the 1 datastore class. If you assign a primary key that does not exist in the related datastore class, it is nevertheless stored and assigned by 4D as soon as this "1" entity is created. + +You can assign or modify the value of a "1" related entity attribute from the "N" dataclass directly through the related attribute. For example, if you want to modify the name attribute of a related Company entity of an Employee entity, you can write: + +```code4d + $emp:=ds.Employee.get(2) // load the Employee entity with primary key 2 + $emp.employer.name:="4D, Inc." //modify the name attribute of the related Company + $emp.employer.save() //save the related attribute + //the related entity is updated +``` + +## Creating an entity selection + +You can create an object of type [entity selection](dsMapping.md#entity-selection) as follows: + +* Querying the entities [in a dataclass](API/DataClassClass.md#query) or in an [existing entity selection](API/EntitySelectionClass.md#query); +* Using the [`.all()`](API/DataClassClass.md#all) dataclass function to select all the entities in a dataclass; +* Using the `Create entity selection` command or the [`.newSelection()`](API/DataClassClass.md#newselection) dataclass function to create a blank entity selection; +* Using the [`.copy()`](API/EntitySelectionClass.md#copy) function to duplicate an existing entity selection; +* Using one of the various functions from the [Entity selection class](API/EntitySelectionClass.md) that returns a new entity selection, such as [`.or()`](API/EntitySelectionClass.md#or); +* Using a relation attribute of type "related entities" (see below). + +You can simultaneously create and use as many different entity selections as you want for a dataclass. Keep in mind that an entity selection only contains references to entities. Different entity selections can contain references to the same entities. + +### Shareable or alterable entity selections + +An entity selection can be **shareable** (readable by multiple processes, but not alterable after creation) or **alterable** (supports the [`.add()`](API/EntitySelectionClass.md#add) function, but only usable by the current process). + +#### Properties + +A **shareable** entity selection has the following characteristics: + +- it can be stored in a shared object or shared collection, and can be passed as parameter between several processes or workers; +- it can be stored in several shared objects or collections, or in a shared object or collection which already belongs to a group (it does not have a *locking identifier*); +- it does not allow the addition of new entities. Trying to add an entity to a shareable entity selection will trigger an error (1637 - This entity selection cannot be altered). To add an entity to a shareable entity selection, you must first transform it into a non-shareable entity selection using the [`.copy()`](API/EntitySelectionClass.md#copy) function, before calling [`.add()`](API/EntitySelectionClass.md#add). + +> Most entity selection functions (such as [`.slice()`](API/EntitySelectionClass.md#slice), [`.and()`](API/EntitySelectionClass.md#and)...) support shareable entity selections since they do not need to alter the original entity selection (they return a new one). + +An **alterable** entity selection has the following characteristics: + +- it cannot be shared between processes, nor be stored in a shared object or collection. Trying to store a non-shareable entity selection in a shared object or collection will trigger an error (-10721 - Not supported value type in a shared object or shared collection); +- it accepts the addition of new entities, i.e. it is supports the [`.add()`](API/EntitySelectionClass.md#add) function. + + +#### How are they defined? + +The **shareable** or **alterable** nature of an entity selection is defined when the entity selection is created (it cannot be modified afterwards). You can know the nature of an entity selection using the [.isAlterable()](API/EntitySelectionClass.md#isalterable) function or the `OB Is shared` command. + + +A new entity selection is **shareable** in the following cases: + +- the new entity selection results from an ORDA class function applied to a dataClass: [dataClass.all()](API/DataClassClass.md#all), [dataClass.fromCollection()](API/DataClassClass.md#fromcollection), [dataClass.query()](API/DataClassClass.md#query), +- the new entity selection is based upon a relation [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute but the entity does not belong to an entity selection. +- the new entity selection is explicitely copied as shareable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. with the `ck shared` option). + +Example: +```4d +$myComp:=ds.Company.get(2) //$myComp does not belong to an entity selection +$employees:=$myComp.employees //$employees is shareable +``` + +A new entity selection is **alterable** in the following cases: + +- the new entity selection created blank using the [dataClass.newSelection()](API/DataClassClass.md#newselection) function or `Create entity selection` command, +- the new entity selection is explicitely copied as alterable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. without the `ck shared` option). + +Example: +```4d +$toModify:=ds.Company.all().copy() //$toModify is alterable +``` + + +A new entity selection **inherits** from the original entity selection nature in the following cases: + +- the new entity selection results from one of the various ORDA class functions applied to an existing entity selection ([.query()](API/EntitySelectionClass.md#query), [.slice()](API/EntitySelectionClass.md#slice), etc.) . +- the new entity selection is based upon a relation: + - [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute and the entity belongs to an entity selection (same nature as [.getSelection()](API/EntityClass.md#getselection) entity selection), + - [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (e.g. "employees.employer") when *attributeName* is a related attribute (same nature as the entity selection), + - [.extract()](API/EntitySelectionClass.md#extract) when the resulting collection contains entity selections (same nature as the entity selection). + +Examples: + +```4d +$highSal:=ds.Employee.query("salary >= :1"; 1000000) + //$highSal is shareable because of the query on dataClass +$comp:=$highSal.employer //$comp is shareable because $highSal is shareable + +$lowSal:=ds.Employee.query("salary <= :1"; 10000).copy() + //$lowSal is alterable because of the copy() +$comp2:=$lowSal.employer //$comp2 is alterable because $lowSal is alterable +``` + + +#### Sharing an entity selection between processes (example) + +You work with two entity selections that you want to pass to a worker process so that it can send mails to appropriate persons: + +```4d + +var $paid; $unpaid : cs.InvoicesSelection +//We get entity selections for paid and unpaid invoices +$paid:=ds.Invoices.query("status=:1"; "Paid") +$unpaid:=ds.Invoices.query("status=:1"; "Unpaid") + +//We pass entity selection references as parameters to the worker +CALL WORKER("mailing"; "sendMails"; $paid; $unpaid) + +``` + +The `sendMails` method: + +```4d + + #DECLARE ($paid : cs.InvoicesSelection; $unpaid : cs.InvoicesSelection) + var $invoice : cs.InvoicesEntity + + var $server; $transporter; $email; $status : Object + + //Prepare emails + $server:=New object() + $server.host:="exchange.company.com" + $server.user:="myName@company.com" + $server.password:="my!!password" + $transporter:=SMTP New transporter($server) + $email:=New object() + $email.from:="myName@company.com" + + //Loops on entity selections + For each($invoice;$paid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Payment OK for invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each + + For each($invoice;$unpaid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Please pay invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each +``` + + +### Entity selections and Storage attributes + +All storage attributes (text, number, boolean, date) are available as properties of entity selections as well as entities. When used in conjunction with an entity selection, a scalar attribute returns a collection of scalar values. For example: + +```4d + $locals:=ds.Person.query("city = :1";"San Jose") //entity selection of people + $localEmails:=$locals.emailAddress //collection of email addresses (strings) +``` + +This code returns in *$localEmails* a collection of email addresses as strings. + +### Entity selections and Relation attributes + +In addition to the variety of ways you can query, you can also use relation attributes as properties of entity selections to return new entity selections. For example, consider the following structure: + +![](assets/en/ORDA/entitySelectionRelationAttributes.png) + +```4d + $myParts:=ds.Part.query("ID < 100") //Return parts with ID less than 100 + $myInvoices:=$myParts.invoiceItems.invoice + //All invoices with at least one line item related to a part in $myParts +``` + +The last line will return in $myInvoices an entity selection of all invoices that have at least one invoice item related to a part in the entity selection myParts. When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. When a relation attribute is used as a property of an entity selection and no entities are returned, the result is an empty entity selection, not null. + + +## Entity Locking + +You often need to manage possible conflicts that might arise when several users or processes load and attempt to modify the same entities at the same time. Record locking is a methodology used in relational databases to avoid inconsistent updates to data. The concept is to either lock a record upon read so that no other process can update it, or alternatively, to check when saving a record to verify that some other process hasn’t modified it since it was read. The former is referred to as **pessimistic record locking** and it ensures that a modified record can be written at the expense of locking records to other users. The latter is referred to as **optimistic record locking** and it trades the guarantee of write privileges to the record for the flexibility of deciding write privileges only if the record needs to be updated. In pessimistic record locking, the record is locked even if there is no need to update it. In optimistic record locking, the validity of a record’s modification is decided at update time. + +ORDA provides you with two entity locking modes: + +- an automatic "optimistic" mode, suitable for most applications, +- a "pessimistic" mode allowing you to lock entities prior to their access. + +### Automatic optimistic lock + +This automatic mechanism is based on the concept of "optimistic locking" which is particularly suited to the issues of web applications. This concept is characterized by the following operating principles: + +* All entities can always be loaded in read-write; there is no *a priori* "locking" of entities. +* Each entity has an internal locking stamp that is incremented each time it is saved. +* When a user or process tries to save an entity using the `entity.save( )` method, 4D compares the stamp value of the entity to be saved with that of the entity found in the data (in the case of a modification): + * When the values match, the entity is saved and the internal stamp value is incremented. + * When the values do not match, it means that another user has modified this entity in the meantime. The save is not performed and an error is returned. + +The following diagram illustrates optimistic locking: + +1. Two processes load the same entity.

    ![](assets/en/ORDA/optimisticLock1.png) + +2. The first process modifies the entity and validates the change. The `entity.save( )` method is called. The 4D engine automatically compares the internal stamp value of the modified entity with that of the entity stored in the data. Since they match, the entity is saved and its stamp value is incremented.

    ![](assets/en/ORDA/optimisticLock2.png) + +3. The second process also modifies the loaded entity and validates its changes. The `entity.save( )` method is called. Since the stamp value of the modified entity does not match the one of the entity stored in the data, the save is not performed and an error is returned.

    ![](assets/en/ORDA/optimisticLock3.png) + + +This can also be illustrated by the following code: + +```4d + $person1:=ds.Person.get(1) //Reference to entity + $person2:=ds.Person.get(1) //Other reference to same entity + $person1.name:="Bill" + $result:=$person1.save() //$result.success=true, change saved + $person2.name:="William" + $result:=$person2.save() //$result.success=false, change not saved +``` + +In this example, we assign to $person1 a reference to the person entity with a key of 1. Then, we assign another reference of the same entity to variable $person2. Using $person1, we change the first name of the person and save the entity. When we attempt to do the same thing with $person2, 4D checks to make sure the entity on disk is the same as when the reference in $person1 was first assigned. Since it isn't the same, it returns false in the success property and doesn’t save the second modification. + +When this situation occurs, you can, for example, reload the entity from the disk using the `entity.reload()` method so that you can try to make the modification again. The `entity.save()` method also proposes an "automerge" option to save the entity in case processes modified attributes that were not the same. + +> Record stamps are not used in **transactions** because only a single copy of a record exists in this context. Whatever the number of entities that reference a record, the same copy is modified thus `entity.save()` operations will never generate stamp errors. + +### Pessimistic lock + +You can lock and unlock entities on demand when accessing data. When an entity is getting locked by a process, it is loaded in read/write in this process but it is locked for all other processes. The entity can only be loaded in read-only mode in these processes; its values cannot be edited or saved. + +This feature is based upon two methods of the `Entity` class: + +* `entity.lock()` +* `entity.unlock()` + +For more information, please refer to the descriptions for these methods. + + +### Concurrent use of 4D classic locks and ORDA pessimistic locks + +Using both classic and ORDA commands to lock records is based upon the following principles: + +* A lock set with a classic 4D command on a record prevents ORDA to lock the entity matching the record. +* A lock set with ORDA on an entity prevents classic 4D commands to lock the record matching the entity. + +These principles are shown in the following diagram: + +![](assets/en/ORDA/concurrent1.png) + +**Transaction locks** also apply to both classic and ORDA commands. In a multiprocess or a multi-user application, a lock set within a transaction on a record by a classic command will result in preventing any other processes to lock entities related to this record (or conversely), until the transaction is validated or canceled. + +* Example with a lock set by a classic command:

    ![](assets/en/ORDA/concurrent2.png) +* Example with a lock set by an ORDA method:

    ![](assets/en/ORDA/concurrent3.png) + + + +## Client/server optimization + +4D provides an automatic optimization for ORDA requests that use entity selections or load entities in client/server configurations. This optimization speeds up the execution of your 4D application by reducing drastically the volume of information transmitted over the network. + +The following optimization mechanisms are implemented: + +* When a client requests an entity selection from the server, 4D automatically "learns" which attributes of the entity selection are actually used on the client side during the code execution, and builds a corresponding "optimization context". This context is attached to the entity selection and stores the used attributes. It will be dynamically updated if other attributes are used afterwards. + +* Subsequent requests sent to the server on the same entity selection automatically reuse the optimization context and only get necessary attributes from the server, which accelerates the processing. For example in an entity selection-based list box, the learning phase takes place during the display of the first rows, next rows display is very optimized. + +* An existing optimization context can be passed as a property to another entity selection of the same dataclass, thus bypassing the learning phase and accelerating the application (see [Using the context property](#using-the-context-property) below). + +The following methods automatically associate the optimization context of the source entity selection to the returned entity selection: + +* `entitySelection.and()` +* `entitySelection.minus()` +* `entitySelection.or()` +* `entitySelection.orderBy()` +* `entitySelection.slice()` +* `entitySelection.drop()` + + + +**Example** + +Given the following code: + +```4d + $sel:=$ds.Employee.query("firstname = ab@") + For each($e;$sel) + $s:=$e.firstname+" "+$e.lastname+" works for "+$e.employer.name // $e.employer refers to Company table + End for each +``` + +Thanks to the optimization, this request will only get data from used attributes (firstname, lastname, employer, employer.name) in *$sel* after a learning phase. + + + +### Using the context property + +You can increase the benefits of the optimization by using the **context** property. This property references an optimization context "learned" for an entity selection. It can be passed as parameter to ORDA methods that return new entity selections, so that entity selections directly request used attributes to the server and bypass the learning phase. + +A same optimization context property can be passed to unlimited number of entity selections on the same dataclass. All ORDA methods that handle entity selections support the **context** property (for example `dataClass.query( )` or `dataClass.all( )` method). Keep in mind, however, that a context is automatically updated when new attributes are used in other parts of the code. Reusing the same context in different codes could result in overloading the context and then, reduce its efficiency. + + +>A similar mechanism is implemented for entities that are loaded, so that only used attributes are requested (see the `dataClass.get( )` method). + + + +**Example with `dataClass.query( )` method:** + +```4d + var $sel1; $sel2; $sel3; $sel4; $querysettings; $querysettings2 : Object + var $data : Collection + $querysettings:=New object("context";"shortList") + $querysettings2:=New object("context";"longList") + + $sel1:=ds.Employee.query("lastname = S@";$querysettings) + $data:=extractData($sel1) // In extractData method an optimization is triggered and associated to context "shortList" + + $sel2:=ds.Employee.query("lastname = Sm@";$querysettings) + $data:=extractData($sel2) // In extractData method the optimization associated to context "shortList" is applied + + $sel3:=ds.Employee.query("lastname = Smith";$querysettings2) + $data:=extractDetailedData($sel3) // In extractDetailedData method an optimization is triggered and associated to context "longList" + + $sel4:=ds.Employee.query("lastname = Brown";$querysettings2) + $data:=extractDetailedData($sel4) // In extractDetailedData method the optimization associated to context "longList" is applied +``` + +### Entity selection-based list box + +Entity selection optimization is automatically applied to entity selection-based list boxes in client/server configurations, when displaying and scrolling a list box content: only the attributes displayed in the list box are requested from the server. + +A specific "page mode" context is also provided when loading the current entity through the **Current item** property expression of the list box (see [Collection or entity selection type list boxes](FormObjects/listbox_overview.md#list-box-types)). This feature allows you to not overload the list box initial context in this case, especially if the "page" requests additional attributes. Note that only the use of **Current item** expression will create/use the page context (access through `entitySelection\[index]` will alter the entity selection context). + +Subsequent requests to server sent by entity browsing methods will also support this optimization. The following methods automatically associate the optimization context of the source entity to the returned entity: + +* `entity.next( )` +* `entity.first( )` +* `entity.last( )` +* `entity.previous( )` + +For example, the following code loads the selected entity and allows browsing in the entity selection. Entities are loaded in a separate context and the list box initial context is left untouched: + +```4d + $myEntity:=Form.currentElement //current item expression + //... do something + $myEntity:=$myEntity.next() //loads the next entity using the same context +``` diff --git a/docs/ORDA/glossary.md b/docs/ORDA/glossary.md new file mode 100644 index 00000000000000..9ffde6c0c9c683 --- /dev/null +++ b/docs/ORDA/glossary.md @@ -0,0 +1,212 @@ +--- +id: glossary +title: Glossary +--- + +## Main concepts at a glance + +![](assets/en/ORDA/mainConcepts.png) + + + +## Attribute + +An attribute is the smallest storage cell in a relational database (see also [Relation attribute](#relation-attribute)). Do not confuse dataclass attributes and entity attributes: + +* In a dataclass object, each property is a dataclass attribute that maps to a corresponding field in the corresponding table (same name and type). +* In an entity object, entity attributes are properties that contain values for the corresponding datastore attributes. + +>*Attributes* and *properties* are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## AttributePath + +An attributePath is the path of an attribute inside a given dataclass or entity. See also [PropertyPath](#propertyPath). + + +## Class code + +Code for the user class function(s). + + +## Computed attribute + +A computed attribute doesn't actually store information. Instead, it determines its value based on other values from the same entity or from other entities, attributes or functions. When a computed attribute is referenced, the underlying "computation" is evaluated to determine the value. Computed attributes may even be assigned values where user-defined code determines what to do during the assignment. + +## Data model class + +Extended class available for a data model object. + +## Data model object + +Database objects available through the ORDA concept, i.e. datastore, dataclasses, entities and entity selections. + +## Data model function + +Function of an ORDA data model class. + +## Dataclass + +A dataclass is an object model that describes the data. Tables in the database provided by the datastore are handled through dataclasses. Each table in the database provided by the datastore has a corresponding dataclass with the same name. Each field of the table is an attribute of the dataclass. + +A dataclass is related to a single datastore. + + +## DataClass class + +Class for specific dataclass objects, in which you can add custom functions. + +## Datastore + +A datastore is the interface object provided by ORDA to reference a structure and access its data. The main database, returned by the `ds` command, is available as a datastore (the main datastore). + +A datastore provides: + +* a connection to the 4D database +* a set of dataclasses to work with the database + +The database can be a 4D local database (the Main datastore), or a 4D Server database exposed as REST resource (a Remote datastore). + +A datastore references only a single database. It is, however, possible to open several datastores to access several databases. + +## DataStore class + +Class for datastore objects, in which you can add custom functions. + + +## DataStoreImplementation + +Internal name of the generic DataStore class in the `4D` class store. + +## Deep copy + +A deep copy duplicates an object and all the references it contains. After a deep copy, a copied collection contains duplicated elements and thus, new references, of all of the orginal elements. See also Shallow copy. + +## ds + +`ds` is the 4D language command that returns a [datastore](dsMapping.md#datastore) object reference. It matches the datastore available upon the 4D main database. + +## Entity + +An entity is an object that corresponds to a dataclass model. An entity contains the same attributes as the dataclass. + +An entity can be seen as an instance of the dataclass, like a record of the table matching the dataclass in its associated datastore. However, an entity also contains related data. The purpose of the entity is to manage data (create, update, delete). + +For more information, see Entities. + +## Entity selection + +An entity selection is an object. When querying the datastore, an entity selection is returned. An entity selection is a set of references to entities related to the same dataclass. + +An entity selection contains: + +* a set of 0 to X entity references, +* a length property (always), +* queryPlan and queryPath properties (if asked while querying). + +An entity selection can also be empty. + + +## Generic class + +Built-in class for ORDA objects such as entities, or dataclasses. Functions and properties of generic classes are automatically available in user extended classes, e.g. `EmployeeEntity`. + + +## Lazy loading + +Since entities are managed as references, data is loaded only when necessary, i.e. when accessing it in the code or through interface widgets. This optimization principle is called lazy loading. + +## Main datastore + +The Datastore object matching the opened 4D database (standalone or client/server). The main datastore is returned by the ds command. + +## Method + +ORDA objects such as datastores, dataclasses, entity selections, and entities, define classes of objects. They provide specific methods to directly interact with them. These methods are also called member functions. Such methods are used by calling them on an instance of the object. + +For example, the `query()` method is a dataclass member function. If you have stored a dataclass object in the `$myClass` variable, you can write: + +```code4d +$myClass.query("name = smith") +``` + +## Mixed data type + +In this documentation, "Mixed" data type is used to designate the various type of values that can be stored within dataclass attributes. It includes: + +* number +* text +* null +* boolean +* date +* object +* collection +* picture(\*) + +*(\*) picture type is not supported by statistical methods such as* `entitySelection.max( )`. + +## Optimistic Lock + +In "optimistic lock" mode, entities are not locked explicitly before updating them. Each entity has an internal stamp that is automatically incremented each time the entity is saved on disk. The entity.save( ) or entity.drop( ) methods will return an error if the stamp of the loaded entity (in memory) and the stamp of the entity on disk do not match, or if the entity has been dropped. Optimistic locking is only available in ORDA implementation. See also "Pessimistic lock". + +## Pessimistic Lock + +A "pessimistic lock" means that an entity is locked prior to its being accessed, using the entity.lock( ) method. Other processes can neither update nor drop the entity until it is unlocked. The classic 4D language only allows pessimistic locks. See "Optimistic lock". + +## Property + +See [Attribute](#attribute). + +>Attributes and properties are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## PropertyPath + +A propertyPath is the path to a property in a given object. If the property is nested in several levels, each level separated is by a dot ("."). + +## Regular class + +User class not related to an ORDA object. + +## Related dataclass + +These are dataclasses linked by relation attributes. + +## Relation attribute + +Relation attributes are used to conceptualize relations between dataclasses (many-to-one and one-to-many). + +* Many-to-one relation (dataclassA references an occurrence of dataclassB): a relation attribute is available in dataclassA and references one instance of dataclassB. +* One-to-many relation (an occurence of dataclassB references several occurrences of dataclassA): a relation attribute is available in dataclassB and references several instances of dataclassA. + +A dataclass can have recursive relation attributes. + +In an entity, the value of a relation attribute can be an entity or an entity selection. + +## Related entities + +A related entity can be seen as the instance of a relation attribute in a dataclass. + +Entity selections may refer to related entities according to the relation attributes defined in the corresponding dataclasses. + +## Remote datastore + +A 4D database opened on a 4D or 4D Server (available through HTTP) and exposed as a REST resource. This database can be referenced locally as a Datastore from other workstations, where it is assigned a locaID. The remote datastore can be used through ORDA concepts (datastore, dataclass, entity selection...). This use is submitted to a licencing system. + +## Session + +When the 4D application connects to a Remote datastore, a session is created on the 4D Server (HTTP). A session cookie is generated and associated to the local datastore id. + +Each time a new session is opened, a license is used. Each time a session is closed, the license is freed. + +Inactive sessions are automatically closed after a timeout. The default timeout is 48 hours, it can be set by the developer (it must be >= 60 minutes). + +## Shallow copy + +A shallow copy only duplicates the structure of elements, and keeps the same internal references. After a shallow copy, two collections will both share the individual elements. See also Deep copy. + +## Stamp + +Used in "optimistic" locking technology. All entities have an internal counter, the stamp, which is incremented each time the entity is saved. By automatically comparing stamps between an entity being saved and its version stored on disk, 4D can prevent concurrent modifications on the same entities. + +## Storage attribute + +A storage attribute (sometimes referred to as a scalar attribute) is the most basic type of attribute in a datastore class and most directly corresponds to a field in a relational database. A storage attribute holds a single value for each entity in the class. diff --git a/docs/ORDA/ordaClasses.md b/docs/ORDA/ordaClasses.md new file mode 100644 index 00000000000000..57d2d4f1d8681b --- /dev/null +++ b/docs/ORDA/ordaClasses.md @@ -0,0 +1,799 @@ +--- +id: ordaClasses +title: Data Model Classes +--- + + + +ORDA allows you to create high-level class functions above the data model. This allows you to write business-oriented code and "publish" it just like an API. Datastore, dataclasses, entity selections, and entities are all available as class objects that can contain functions. + +For example, you could create a `getNextWithHigherSalary()` function in the `EmployeeEntity` class to return employees with a salary higher than the selected one. It would be as simple as calling: + +```4d +$nextHigh:=ds.Employee(1).getNextWithHigherSalary() +``` + +Developers can not only use these functions in local datastores, but also in client/server and remote architectures (see the full example [below](#example-with-remote-datastore)): + +```4d + //$cityManager is the reference of a remote datastore +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) +``` + +Thanks to this feature, the entire business logic of your 4D application can be stored as a independent layer so that it can be easily maintained and reused with a high level of security: + +- You can "hide" the overall complexity of the underlying physical structure and only expose understandable and ready-to-use functions. + +- If the physical structure evolves, you can simply adapt function code and client applications will continue to call them transparently. + +- By default, all of your data model class functions (including [computed attribute functions](#computed-attributes)) are **not exposed** to remote applications and cannot be called from REST requests. You must explicitly declare each public function with the [`exposed`](#exposed-vs-non-exposed-functions) keyword. + +![](assets/en/ORDA/api.png) + + +In addition, 4D [automatically pre-creates](#creating-classes) the classes for each available data model object. + + +## Architecture + +ORDA provides **generic classes** exposed through the **`4D`** [class store](Concepts/classes.md#class-stores), as well as **user classes** (extending generic classes) exposed in the **`cs`** [class store](Concepts/classes.md#class-stores): + +![](assets/en/ORDA/ClassDiagramImage.png) + +All ORDA data model classes are exposed as properties of the **`cs`** class store. The following ORDA classes are available: + +|Class|Example name|Instantiated by| +|---|---|---| +|cs.DataStore|cs.DataStore|[`ds`](API/DataStoreClass.md#ds) command| +|cs.*DataClassName*|cs.Employee|[`dataStore.DataClassName`](API/DataStoreClass.md#dataclassname), `dataStore[DataClassName]`| +|cs.*DataClassName*Entity|cs.EmployeeEntity|[`dataClass.get()`](API/DataClassClass.md#get), [`dataClass.new()`](API/DataClassClass.md#new), [`entitySelection.first()`](API/EntitySelectionClass.md#first), [`entitySelection.last()`](API/EntitySelectionClass.md#last), [`entity.previous()`](API/EntityClass.md#previous), [`entity.next()`](API/EntityClass.md#next), [`entity.first()`](API/EntityClass.md#first), [`entity.last()`](API/EntityClass.md#last), [`entity.clone()`](API/EntityClass.md#clone)| +|cs.*DataClassName*Selection|cs.EmployeeSelection|[`dataClass.query()`](API/DataClassClass.md#query), [`entitySelection.query()`](API/EntitySelectionClass.md#query), [`dataClass.all()`](API/DataClassClass.md#all), [`dataClass.fromCollection()`](API/DataClassClass.md#fromcollection), [`dataClass.newSelection()`](API/DataClassClass.md#newselection), [`entitySelection.drop()`](API/EntitySelectionClass.md#drop), [`entity.getSelection()`](API/EntityClass.md#getselection), [`entitySelection.and()`](API/EntitySelectionClass.md#and), [`entitySelection.minus()`](API/EntitySelectionClass.md#minus), [`entitySelection.or()`](API/EntitySelectionClass.md#or), [`entitySelection.orderBy()`](API/EntitySelectionClass.md#or), [`entitySelection.orderByFormula()`](API/EntitySelectionClass.md#orderbyformula), [`entitySelection.slice()`](API/EntitySelectionClass.md#slice), `Create entity selection`| + +> ORDA user classes are stored as regular class files (.4dm) in the Classes subfolder of the project [(see below)](#class-files). + +Also, object instances from ORDA data model user classes benefit from their parent's properties and functions: + +- a Datastore class object can call functions from the [ORDA Datastore generic class](API/DataStoreClass.md). +- a Dataclass class object can call functions from the [ORDA Dataclass generic class](API/DataClassClass.md). +- an Entity selection class object can call functions from the [ORDA Entity selection generic class](API/EntitySelectionClass.md). +- an Entity class object can call functions from the [ORDA Entity generic class](API/EntityClass.md). + + + +## Class Description + +

    History + +|Version|Changes| +|---|---| +|v18 R5|Data model class functions are not exposed to REST by default. New `exposed` and `local` keywords. +
    + + +### DataStore Class + + +A 4D database exposes its own DataStore class in the `cs` class store. + +- **Extends**: 4D.DataStoreImplementation +- **Class name**: cs.DataStore + +You can create functions in the DataStore class that will be available through the `ds` object. + +#### Example + +```4d +// cs.DataStore class + +Class extends DataStoreImplementation + +Function getDesc + $0:="Database exposing employees and their companies" +``` + + +This function can then be called: + +```4d +$desc:=ds.getDesc() //"Database exposing..." +``` + + + +### DataClass Class + +Each table exposed with ORDA offers a DataClass class in the `cs` class store. + +- **Extends**: 4D.DataClass +- **Class name**: cs.*DataClassName* (where *DataClassName* is the table name) +- **Example name**: cs.Employee + + + +#### Example + +```4D +// cs.Company class + + +Class extends DataClass + +// Returns companies whose revenue is over the average +// Returns an entity selection related to the Company DataClass + +Function GetBestOnes() + $sel:=This.query("revenues >= :1";This.all().average("revenues")); + $0:=$sel +``` + +Then you can get an entity selection of the "best" companies by executing: + +```4d + var $best : cs.CompanySelection + $best:=ds.Company.GetBestOnes() +``` + +> [Computed attributes](#computed-attributes) are defined in the [Entity Class](#entity-class). + + +#### Example with a remote datastore + +The following *City* catalog is exposed in a remote datastore (partial view): + +![](assets/en/ORDA/Orda_example.png) + +The `City Class` provides an API: + +```4d +// cs.City class + +Class extends DataClass + +Function getCityName() + var $1; $zipcode : Integer + var $zip : 4D.Entity + var $0 : Text + + $zipcode:=$1 + $zip:=ds.ZipCode.get($zipcode) + $0:="" + + If ($zip#Null) + $0:=$zip.city.name + End if +``` + +The client application opens a session on the remote datastore: + +```4d +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +``` + +Then a client application can use the API to get the city matching a zip code (for example) from a form: + +```4d +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) + +``` + + +### EntitySelection Class + +Each table exposed with ORDA offers an EntitySelection class in the `cs` class store. + +- **Extends**: 4D.EntitySelection +- **Class name**: *DataClassName*Selection (where *DataClassName* is the table name) +- **Example name**: cs.EmployeeSelection + + +#### Example + +```4d +// cs.EmployeeSelection class + + +Class extends EntitySelection + +//Extract the employees with a salary greater than the average from this entity selection + +Function withSalaryGreaterThanAverage + C_OBJECT($0) + $0:=This.query("salary > :1";This.average("salary")).orderBy("salary") + +``` + +Then you can get employees with a salary greater than the average in any entity selection by executing: + +```4d +$moreThanAvg:=ds.Company.all().employees.withSalaryGreaterThanAverage() +``` + +### Entity Class + +Each table exposed with ORDA offers an Entity class in the `cs` class store. + +- **Extends**: 4D.Entity +- **Class name**: *DataClassName*Entity (where *DataClassName* is the table name) +- **Example name**: cs.CityEntity + +Entity classes allow you to define **computed attributes** using specific keywords: + +- `Function get` *attributeName* +- `Function set` *attributeName* +- `Function query` *attributeName* +- `Function orderBy` *attributeName* + +For more information, please refer to the [Computed attributes](#computed-attributes) section. + +#### Example + +```4d +// cs.CityEntity class + +Class extends Entity + +Function getPopulation() + $0:=This.zips.sum("population") + + +Function isBigCity +C_BOOLEAN($0) +// The getPopulation() function is usable inside the class +$0:=This.getPopulation()>50000 +``` + +Then you can call this code: + +```4d +var $cityManager; $city : Object + +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +$city:=$cityManager.City.getCity("Caguas") + +If ($city.isBigCity()) + ALERT($city.name + " is a big city") +End if +``` + +### Specific rules + +When creating or editing data model classes, you must pay attention to the following rules: + +- Since they are used to define automatic DataClass class names in the **cs** [class store](Concepts/classes.md#class-stores), 4D tables must be named in order to avoid any conflict in the **cs** namespace. In particular: + - Do not give the same name to a 4D table and to a [user class name](Concepts/classes.md#class-names). If such a case occurs, the constructor of the user class becomes unusable (a warning is returned by the compiler). + - Do not use a reserved name for a 4D table (e.g., "DataClass"). + +- When defining a class, make sure the [`Class extends`](Concepts/classes.md#class-extends-classnameclass) statement exactly matches the parent class name (remember that they're case sensitive). For example, `Class extends EntitySelection` for an entity selection class. + +- You cannot instantiate a data model class object with the `new()` keyword (an error is returned). You must use a regular method as listed in the [`Instantiated by` column of the ORDA class table](#architecture). + +- You cannot override a native ORDA class function from the **`4D`** [class store](Concepts/classes.md#class-stores) with a data model user class function. + + +## Computed attributes + + +### Overview + +A computed attribute is a dataclass attribute with a data type that masks a calculation. [Standard 4D classes](Concepts/classes.md) implement the concept of computed properties with `get` (*getter*) and `set` (*setter*) [accessor functions](Concepts/classes.md#function-get-and-function-set). ORDA dataclass attributes benefit from this feature and extend it with two additional functions: `query` and `orderBy`. + +At the very minimum, a computed attribute requires a `get` function that describes how its value will be calculated. When a *getter* function is supplied for an attribute, 4D does not create the underlying storage space in the datastore but instead substitutes the function's code each time the attribute is accessed. If the attribute is not accessed, the code never executes. + +A computed attribute can also implement a `set` function, which executes whenever a value is assigned to the attribute. The *setter* function describes what to do with the assigned value, usually redirecting it to one or more storage attributes or in some cases other entities. + +Just like storage attributes, computed attributes may be included in **queries**. By default, when a computed attribute is used in a ORDA query, the attribute is calculated once per entity examined. In some cases this is sufficient. However for better performance, especially in client/server, computed attributes can implement a `query` function that relies on actual dataclass attributes and benefits from their indexes. + +Similarly, computed attributes can be included in **sorts**. When a computed attribute is used in a ORDA sort, the attribute is calculated once per entity examined. Just like in queries, computed attributes can implement an `orderBy` function that substitutes other attributes during the sort, thus increasing performance. + + +### How to define computed attributes + +You create a computed attribute by defining a `get` accessor in the [**entity class**](#entity-class) of the dataclass. The computed attribute will be automatically available in the dataclass attributes and in the entity attributes. + +Other computed attribute functions (`set`, `query`, and `orderBy`) can also be defined in the entity class. They are optional. + +Within computed attribute functions, [`This`](Concepts/classes.md#this) designates the entity. Computed attributes can be used and handled as any dataclass attribute, i.e. they will be processed by [entity class](API/EntityClass.md) or [entity selection class](API/EntitySelectionClass.md) functions. + +> ORDA computed attribute functions can be [**exposed**](#exposed-vs-non-exposed-functions) or not. + + +### `Function get ` + +#### Syntax + +```4d +Function get ({$event : Object}) -> $result : type +// code +``` +The *getter* function is mandatory to declare the *attributeName* computed attribute. Whenever the *attributeName* is accessed, 4D evaluates the `Function get` code and returns the *$result* value. Since this code becomes part of the attribute’s definition, it need not be referenced again in the application. + +> A computed attribute can use the value of other computed attribute(s). However, only one level is allowed, recursive calls generate errors. + +The *getter* function defines the data type of the computed attribute thanks to the *$result* parameter. The following resulting types are allowed: + +- Scalar (text, boolean, date, number) +- Object +- Image +- BLOB +- Entity class (i.e. cs.EmployeeEntity) +- Entity selection class (i.e. cs.EmployeeSelection) + +The *$event* parameter contains the following properties: + +|Property|Type|Description| +|---|---|---| +|attributeName|Text|Computed attribute name| +|dataClassName|Text|Dataclass name| +|kind|Text|"get"| +|result|Variant|Add this property with Null value if you want the attribute to return Null| + + +#### Examples + +- *fullName* computed attribute: + +```4d +Function get fullName($event : Object)-> $fullName : Text + + Case of + : (This.firstName=Null) & (This.lastName=Null) + $fullName:="" + : (This.firstName=Null) + $fullName:=This.lastName + : (This.lastName=Null) + $fullName:=This.firstName + Else + $fullName:=This.firstName+" "+This.lastName + End case +``` + +- A computed attribute can be based upon a related attribute: + +```4d +Function get bigBoss($event : Object)-> $result: cs.EmployeeEntity + If (This.manager.manager=Null) + $event.result:=Null + Else + $result:=This.manager.manager + End if + +``` + +- A computed attribute can be based upon related attributes: + +```4d +Function get coWorkers($event : Object)-> $result: cs.EmployeeSelection + If (This.manager.manager=Null) + $result:=ds.Employee.newSelection() + Else + $result:=This.manager.directReports.minus(this) + End if +``` + +### `Function set ` + +#### Syntax + +```4d +Function set ($value : Variant {; $event : Object}) +// code +``` + +The *setter* function executes whenever a value is assigned to the attribute. This function usually processes the input value(s) and the result is dispatched between one or more other attributes. + +The *$value* parameter receives the value assigned to the attribute. + +The *$event* parameter contains the following properties: + +|Property|Type|Description| +|---|---|---| +|attributeName|Text|Computed attribute name| +|dataClassName|Text|Dataclass name| +|kind|Text|"set"| +|value|Variant|Value to be handled by the computed attribute| + +#### Example + +```4d +Function set fullName($value : Text; $event : Object) + var $p : Integer + $p:=Position(" "; $value) + This.firstname:=Substring($value; 1; $p-1) // "" if $p<0 + This.lastname:=Substring($value; $p+1) +``` + + + +### `Function query ` + +#### Syntax + +```4d +Function query ($event : Object) +Function query ($event : Object) -> $result : Text +Function query ($event : Object) -> $result : Object +// code +``` + +This function supports three syntaxes: + +- With the first syntax, you handle the whole query through the `$event.result` object property. +- With the second and third syntaxes, the function returns a value in *$result*: + - If *$result* is a Text, it must be a valid query string + - If *$result* is an Object, it must contain two properties: + + |Property|Type|Description| + |---|---|---| + |$result.query|Text|Valid query string with placeholders (:1, :2, etc.)| + |$result.parameters|Collection|values for placeholders| + +The `query` function executes whenever a query using the computed attribute is launched. It is useful to customize and optimize queries by relying on indexed attributes. When the `query` function is not implemented for a computed attribute, the search is always sequential (based upon the evaluation of all values using the `get ` function). + +> The following features are not supported: +> - calling a `query` function on computed attributes of type Entity class or Entity selection class +> - using the `order by` keyword in the resulting query string. + +The *$event* parameter contains the following properties: + +|Property|Type|Description| +|---|---|---| +|attributeName|Text|Computed attribute name| +|dataClassName|Text|Dataclass name| +|kind|Text|"query"| +|value|Variant|Value to be handled by the computed attribute| +|operator|Text|Query operator (see also the [`query` class function](API/DataClassClass.md#query)). Possible values:
  • == (equal to, @ is wildcard)
  • === (equal to, @ is not wildcard)
  • != (not equal to, @ is wildcard)
  • !== (not equal to, @ is not wildcard)
  • < (less than)
  • <= (less than or equal to)
  • > (greater than)
  • >= (greater than or equal to)
  • IN (included in)
  • %% (contains keyword)
  • | +|result|Variant|Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default query (always sequential for computed attributes).| + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + +#### Examples + +- Query on the *fullName* computed attribute. The result is returned as Text (query string). + +```4d +Function query fullName($event : Object)-> $result : Text + var $vals : Collection + var $oper; $result : Text + + $vals:=Split string($event.value; " "; sk ignore empty strings) + $oper:=$event.operator + $result:="" + + If (($oper="==") | ($oper="===")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" and lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName == '' and lastName == ''" + End if + + Else + If (($oper="!=") | ($oper="!==")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" or lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName != '' or lastName != ''" + End if + Else + $result:="firstName "+$oper+" '"+$vals[0]+"'" + End if + + End if + +``` + +Calling code, for example: + +```4d +$emps:=ds.Employee.query("fullName = :1"; "Flora Pionsin") +``` + +- This function handles queries on the *age* computed attribute and returns an object with parameters: + +```4d +Function query age($event : Object)->$result : Object + + var $operator : Text + var $age : Integer + var $_ages : Collection + + $operator:=$event.operator + + $age:=Num($event.value) // integer + $d1:=Add to date(Current date; -$age-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + $parameters:=New collection($d1; $d2) + + Case of + + : ($operator="==") + $query:="birthday > :1 and birthday <= :2" // after d1 and before or egal d2 + + : ($operator="===") + $query:="birthday = :2" // d2 = second calculated date (= birthday date) + + : ($operator=">=") + $query:="birthday <= :2" + + //... other operators + + + End case + + + If (Undefined($event.result)) + $result:=New object + $result.query:=$query + $result.parameters:=$parameters + End if + +``` + +Calling code, for example: + +```4d +// people aged between 20 and 21 years (-1 day) +$twenty:=people.query("age = 20") // calls the "==" case + +// people aged 20 years today +$twentyToday:=people.query("age === 20") // equivalent to people.query("age is 20") + +``` + + +### `Function orderBy ` + +#### Syntax + +```4d +Function orderBy ($event : Object) +Function orderBy ($event : Object)-> $result : Text + +// code +``` + +The `orderBy` function executes whenever the computed attribute needs to be ordered. It allows sorting the computed attribute. For example, you can sort *fullName* on first names then last names, or conversely. +When the `orderBy` function is not implemented for a computed attribute, the sort is always sequential (based upon the evaluation of all values using the `get ` function). + +> Calling an `orderBy` function on computed attributes of type Entity class or Entity selection class **is not supported**. + +The *$event* parameter contains the following properties: + +|Property|Type|Description| +|---|---|---| +|attributeName|Text|Computed attribute name| +|dataClassName|Text|Dataclass name| +|kind|Text|"orderBy"| +|value|Variant|Value to be handled by the computed attribute| +|operator|Text|"desc" or "asc" (default)| +|descending|Boolean|`true` for descending order, `false` for ascending order| +|result|Variant|Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default sort .| + +You can return the `orderBy` string either in the `$event.result` object property or in the *$result* function result. + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + + +#### Example + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + If ($event.descending=True) + $result:="firstName desc, lastName desc" + Else + $result:="firstName, lastName" + End if +``` + +You can also write compact code: + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + $result:="firstName "+$event.operator+", "lastName "+$event.operator + +``` + + + +## Exposed vs non-exposed functions + +For security reasons, all of your data model class functions are **not exposed** (i.e., private) by default to remote requests. + +Remote requests include: + +- Requests sent by remote 4D applications connected through `Open datastore` +- REST requests + +> Regular 4D client/server requests are not impacted. Data model class functions are always available in this architecture. + +A function that is not exposed is not available on remote applications and cannot be called on any object instance from a REST request. If a remote application tries to access a non-exposed function, the "-10729 - Unknown member method" error is returned. + +To allow a data model class function to be called by a remote request, you must explicitly declare it using the `exposed` keyword. The formal syntax is: + +```4d +// declare an exposed function +exposed Function +``` + +> The `exposed` keyword can only be used with Data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +### Example + +You want an exposed function to use a private function in a dataclass class: + +```4d +Class extends DataClass + +//Public function +exposed Function registerNewStudent($student : Object) -> $status : Object + +var $entity : cs.StudentsEntity + +$entity:=ds.Students.new() +$entity.fromObject($student) +$entity.school:=This.query("name=:1"; $student.schoolName).first() +$entity.serialNumber:=This.computeSerialNumber() +$status:=$entity.save() + +//Not exposed (private) function +Function computeIDNumber()-> $id : Integer +//compute a new ID number +$id:=... + +``` + +When the code is called: + +```4d +var $remoteDS; $student; $status : Object +var $id : Integer + +$remoteDS:=Open datastore(New object("hostname"; "127.0.0.1:8044"); "students") +$student:=New object("firstname"; "Mary"; "lastname"; "Smith"; "schoolName"; "Math school") + +$status:=$remoteDS.Schools.registerNewStudent($student) // OK +$id:=$remoteDS.Schools.computeIDNumber() // Error "Unknown member method" +``` + + +## Local functions + +By default in client/server architecture, ORDA data model functions are executed **on the server**. It usually provides the best performance since only the function request and the result are sent over the network. + +However, it could happen that a function is fully executable on the client side (e.g., when it processes data that's already in the local cache). In this case, you can save requests to the server and thus, enhance the application performance by inserting the `local` keyword. The formal syntax is: + +```4d +// declare a function to execute locally in client/server +local Function +``` + +With this keyword, the function will always be executed on the client side. + +> The `local` keyword can only be used with data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +Note that the function will work even if it eventually requires to access the server (for example if the ORDA cache is expired). However, it is highly recommended to make sure that the local function does not access data on the server, otherwise the local execution could not bring any performance benefit. A local function that generates many requests to the server is less efficient than a function executed on the server that would only return the resulting values. For example, consider the following function on the Schools entity class: + +```4d +// Get the youngest students +// Inappropriate use of local keyword +local Function getYoungest + var $0 : Object + $0:=This.students.query("birthDate >= :1"; !2000-01-01!).orderBy("birthDate desc").slice(0; 5) +``` +- **without** the `local` keyword, the result is given using a single request +- **with** the `local` keyword, 4 requests are necessary: one to get the Schools entity students, one for the `query()`, one for the `orderBy()`, and one for the `slice()`. In this example, using the `local` keyword is inappropriate. + + +### Examples + +#### Calculating age + +Given an entity with a *birthDate* attribute, we want to define an `age()` function that would be called in a list box. This function can be executed on the client, which avoids triggering a request to the server for each line of the list box. + +On the *StudentsEntity* class: + +```4d +Class extends Entity + +local Function age() -> $age: Variant + +If (This.birthDate#!00-00-00!) + $age:=Year of(Current date)-Year of(This.birthDate) +Else + $age:=Null +End if +``` + +#### Checking attributes + +We want to check the consistency of the attributes of an entity loaded on the client and updated by the user before requesting the server to save them. + +On the *StudentsEntity* class, the local `checkData()` function checks the Student's age: + +```4d +Class extends Entity + +local Function checkData() -> $status : Object + +$status:=New object("success"; True) +Case of + : (This.age()=Null) + $status.success:=False + $status.statusText:="The birthdate is missing" + + :((This.age() <15) | (This.age()>30) ) + $status.success:=False + $status.statusText:="The student must be between 15 and 30 - This one is "+String(This.age()) +End case +``` + +Calling code: + +```4d +var $status : Object + +//Form.student is loaded with all its attributes and updated on a Form +$status:=Form.student.checkData() +If ($status.success) + $status:=Form.student.save() // call the server +End if +``` + + + +## Support in 4D projects + + +### Class files + +An ORDA data model user class is defined by adding, at the [same location as regular class files](Concepts/classes.md#class-files) (*i.e.* in the `/Sources/Classes` folder of the project folder), a .4dm file with the name of the class. For example, an entity class for the `Utilities` dataclass will be defined through a `UtilitiesEntity.4dm` file. + + +### Creating classes + +4D automatically pre-creates empty classes in memory for each available data model object. + +![](assets/en/ORDA/ORDA_Classes-3.png) + +> By default, empty ORDA classes are not displayed in the Explorer. To show them you need to select **Show all data classes** from the Explorer's options menu: +![](assets/en/ORDA/showClass.png) + +ORDA user classes have a different icon from regular classes. Empty classes are dimmed: + +![](assets/en/ORDA/classORDA2.png) + +To create an ORDA class file, you just need to double-click on the corresponding predefined class in the Explorer. 4D creates the class file and add the `extends` code. For example, for an Entity class: + +``` +Class extends Entity +``` + +Once a class is defined, its name is no longer dimmed in the Explorer. + + +### Editing classes + +To open a defined ORDA class in the 4D method editor, select or double-click on an ORDA class name and use **Edit...** from the contextual menu/options menu of the Explorer window: + +![](assets/en/ORDA/classORDA4.png) + +For ORDA classes based upon the local datastore (`ds`), you can directly access the class code from the 4D Structure window: + +![](assets/en/ORDA/classORDA5.png) + + +### Method editor + +In the 4D method editor, variables typed as an ORDA class automatically benefit from autocompletion features. Example with an Entity class variable: + +![](assets/en/ORDA/AutoCompletionEntity.png) + diff --git a/docs/ORDA/overview.md b/docs/ORDA/overview.md new file mode 100644 index 00000000000000..ef94bf2891162c --- /dev/null +++ b/docs/ORDA/overview.md @@ -0,0 +1,34 @@ +--- +id: overview +title: What is ORDA? +--- + +ORDA stands for **Object Relational Data Access**. It is an enhanced technology allowing to access both the model and the data of a database through objects. + +Relations are transparently included in the concept, in combination with [lazy loading](glossary.md#lazy-loading), to remove all the typical hassles of data selection or transfer from the developer. + +With ORDA, data is accessed through an abstraction layer, the [datastore](dsMapping.md#datastore). A datastore is an object that provides an interface to the database model and data through objects and classes. For example, a table is mapped to a [dataclass](dsMapping.md#dataclass) object, a field is an [attribute](dsMapping.md##attribute) of a dataclass, and records are accessed through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). + + +## Why use ORDA? + +Instead of representing information as tables, records, and fields, ORDA uses an alternate approach that more accurately maps data to real-world concepts. + +Imagine the ability to denormalize a relational structure, yet not affect efficiency. Imagine describing everything about the business objects in your application in such a way that using the data becomes simple and straightforward and removes the need for a complete understanding of the relational structure. + +In the ORDA data model, a single dataclass can incorporate all of the elements that make up a traditional relational database table, but can also include values from related parent entities, and direct references to related entities and entity selections. + +A query returns a list of entities called an entity selection, which fulfills the role of a SQL query’s row set. The difference is that each entity "knows" where it belongs in the data model and "understands" its relationship to all other entities. This means that a developer does not need to explain in a query how to relate the various pieces of information, nor in an update how to write modified values back to the relational structure. + +In addition, ORDA objects such as entity selections or entities can be easily bound to UI objects such as list boxes or variables. Combined with powerful features such as the `This` and `Form` commands, they allow the building modern and modular interfaces based upon objects and collections. + +## How to use ORDA? + +Basically, ORDA handles objects. In ORDA, all main concepts, including the datastore itself, are available through objects. In 4D, the datastore is automatically [mapped upon the 4D structure](dsMapping.md). + +ORDA objects can be handled like 4D standard objects, but they automatically benefit from specific properties and methods. + +ORDA objects are created and instanciated when necessary by 4D methods (you do not need to create them). However, ORDA data model objects are associated with [classes where you can add custom functions](ordaClasses.md). + + + diff --git a/docs/ORDA/quickTour.md b/docs/ORDA/quickTour.md new file mode 100644 index 00000000000000..5dc144e2489f38 --- /dev/null +++ b/docs/ORDA/quickTour.md @@ -0,0 +1,213 @@ +--- +id: quickTour +title: A Quick Tour in ORDA +--- + +Since ORDA is object-based, using ORDA requires basic knowledge in object programmming. + +## Exploring the datastore + +The ORDA datastore is automatically based upon a 4D database structure, provided it complies with the [ORDA prerequisites](overview.md#orda-prerequisites). + +This example will use the following simple 4D database structure: + +![](assets/en/ORDA/struc.png) + +To know what is exposed as the datastore, create a new project method, write the following line: + +```code4d +TRACE +``` + +Execute the method -- it simply calls the debugger window. +In the Expression area, double-click to insert an expression and enter `ds`. It returns the datastore object. +Deploy the object, you can see that tables and fields are automatically exposed by ORDA as properties of the `ds` object: + +![](assets/en/ORDA/debug1.png) + +It means for example that, whenever you need to refer to the city field of the [Company] table, in ORDA you just need to write: + +```code4d +ds.Company.city //returns the name of the city +``` + +> In the ORDA world, ds.Company is a **dataclass**. ds.Company.city is an **attribute**. + +> ORDA is case sensitive. `ds.company.city` will not refer to the ds.Company.city attribute. + +You have also noticed the extra `hires` property in the ds.Company dataclass. It does not correspond to a field. `hires` is actually the name of the *One to many* relation between Company and Employee: + +![](assets/en/ORDA/struc2s.png) +*Name of the relation as defined in the Inspector* + +It means that, whenever you need to access the list of employees working for a company, in ORDA you just need to write: + +```code4d +ds.Company.hires //returns the list of employees +``` + +But don't go too fast. Let's see now how to record data in ORDA dataclasses. + + +## Adding data + +In ORDA, you can add a record to a dataclass using the `new()` command. + +>In the ORDA world, a record is an **entity** -- an entity is itself an object. A command that is attached to a specific object is called a **member method**. + +```code4d +$entity:=ds.Company.new() //create a new entity reference +//in the Company dataclass +//and assign it to the $entity variable +``` + +A new entity object contains a "copy" of all attributes of its parent dataclass, thus you can assign values to them: + +```code4d +$entity.name:="ACME, inc." +$entity.city:="London" +//$entity.ID is automatically filled +``` + +Right now, the entity only exists in memory. To store it in the data file, you need to save it using the `save()` member method: + +```code4d +$status:=$entity.save() +``` + + + + + + + + +The editor for users is located in the Toolbox of 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. 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. 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 adds a new user to the list, named "New userX" by default. + +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. 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. + +> 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. 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 + +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) + +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. + +### 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. + +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. + +> 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. + +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. + + +### 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. + +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. + +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. + +![](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. + + +### 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. + +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) + +- 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) + +- 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) + +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. diff --git a/docs/ORDA/remoteDatastores.md b/docs/ORDA/remoteDatastores.md new file mode 100644 index 00000000000000..9743eeb5311675 --- /dev/null +++ b/docs/ORDA/remoteDatastores.md @@ -0,0 +1,61 @@ +--- +id: datastores +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/ORDA/sessions.png) + +> For sessions opened by REST requests, please refer to [Users and sessions](REST/authUsers.md). + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/ORDA/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). +If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/docs/Preferences/forms.md b/docs/Preferences/forms.md new file mode 100644 index 00000000000000..1e6401ac557315 --- /dev/null +++ b/docs/Preferences/forms.md @@ -0,0 +1,35 @@ +--- +id: forms +title: Forms Page +--- + + +This page lets you set the default operation and display of the 4D Form editor. + +## Move + +This group of options sets parameters for moving objects using the keyboard or the mouse in the Form editor. + +### Step using keyboard + +This option allows setting the value (in points) of the step used for moving or resizing an object using the keyboard and the **Shift** key. + +### When moving beyond window limits + +This option allows setting the behavior of the Form editor when moving an object using the mouse beyond window limits. + +* **Autoscroll**: When this option is checked, this action causes the scroll of the form in the window, as if you clicked on the scroll bars. This behavior is useful for moving objects in large forms. +* **Start drag and drop**: When this option is checked, this action is interpreted as a drag and drop. The form window is not modified and the moved object can be dropped in another window (if its contents are compatible), for example, in another form. This behavior is useful for recycling objects among several forms or using object libraries (see [Creating and using custom object libraries](FormEditor/objectLibrary.md#creating-and-using-custom-object-libraries)). + +You can configure this option depending on your work habits and development needs. + +### Activate auto alignment by default + +This option activates auto alignment by default in each new window of the Form editor. It is possible to modify this option individually in each window (refer to [Using the magnetic grid](FormEditor/formEditor.md#using-the-magnetic-grid)). + +## New form default display + +- **Limits**, **Rulers**, ...: check items that must be displayed by default in each new window of the Form editor. It is possible to modify the display of each window individually using the **Display** hierarchical menu of the Form editor. +- **Color for marker lines**: modifies the color of the marker lines used in the Form editor to define the different areas (header, breaks, detail and footer, etc.). For more information about markers, refer to [Using output control lines](https://doc.4d.com/4Dv18R6/4D/18-R6/Using-output-control-lines.300-5217678.en.html). +- **Default display shield**: sets which shields to display by default in each new window of the Form editor. For more information about shields, refer to [Using shields](FormEditor/formEditor.md#using-shields). + diff --git a/docs/Preferences/general.md b/docs/Preferences/general.md new file mode 100644 index 00000000000000..2904058b6eccf5 --- /dev/null +++ b/docs/Preferences/general.md @@ -0,0 +1,148 @@ +--- +id: general +title: General Page +--- + +This page contains various options to configure the general operation of your 4D application. + +## Options + +### At startup + +This option allows you to configure the default 4D display at startup, when the user launches only the application. + +* **Do nothing**: Only the application window appears, empty. +* **Open Local Project dialog**: 4D displays a standard open document dialog box, allowing you to select a local project. +* **Open last used project**: 4D directly opens the last project used; no opening dialog box appears. + >To force the display of the opening dialog box when this option is selected, hold down the **Alt** (Windows) or **Option** (macOS) key while launching the project. +* **Open Remote Project dialog**: 4D displays the standard 4D Server logon dialog, allowing you to select a project published on the network. +* **Open Welcome Wizard dialog** (factory setting): 4D displays the Welcome Wizard dialog box. + +>**4D Server**: The 4D Server application ignores this option. In this environment, the **Do nothing** mode is always used. + +### Automatic form creation + +> This option is only used in binary databases; it is ignored in project architecture. See doc.4d.com. + +### Window tabbing (macOS only) + +Starting with macOS Sierra, Mac applications can benefit from the Automatic Window Tabbing feature that helps organizing multiple windows: document windows are stacked into a single parent window and can be browsed through tabs. This feature is useful on small screens and/or when using a trackpad. + +You can benefit from this feature in the following environments (with 4D 64-bit versions only): + +* Method Editor windows +* Form Editor windows + +All windows from these editors can be put in tab form: + +![](assets/en/Preferences/general2.png) + +A set of commands in the **Window** menu allows managing the tabs: + +![](assets/en/Preferences/general3.png) + +In the 4D's Preferences dialog box, the **Window tabbing** option allows you to control this feature: + +![](assets/en/Preferences/general4.png) + +Three options are available: + +* **According to System Preferences** (default): 4D windows will behave like defined in the macOS System Preferences (In full screen, Always, or Manually). +* **Never**: Opening a new document in 4D form editor or method editor will always result in creating a new window (tabs are never created). +* **Always**: Opening a new document in 4D form editor or method editors will always result in creating a new tab. + +### Appearance (macOS only) + +This menu lets you select the color scheme to use for the **4D development** environment. The specified scheme will be applied to all editors and windows of the Design mode. + +> You can also set the color scheme to use in your **desktop applications** in the "Interface" page of the Settings dialog box. + +Three options are available: + +* **According to System Color Scheme Preferences** (default): Use the color scheme defined in the macOS System Preferences. +* **Light**: Use the Light Theme +* **Dark**: Use the Dark Theme + +> This preference is only supported on macOS. On Windows, the "Light" scheme is always used. + + +### Exit Design when going to Application Environment + +If this option is checked, when the user switches to the Application environment using the **Test Application** menu command, all the windows of the Design environment are closed. If this option is not checked (factory setting), the windows of the Design environment remain visible in the background of the Application environment. + + +### Enable binary database creation + +If you check this option, two items are added in the **File > New** menu and the **New** toolbar button: + +* **Database...** +* **Database from Structure Definition...** + +![](assets/en/Preferences/general5.png) + +These items allow you to create binary databases (see [Creating a new database](https://doc.4d.com/4Dv18R6/4D/18-R6/Creating-a-new-database.300-5217610.en.html) section). They are no longer proposed by default because 4D recommends using project-based architecture for new developments. + +## When creating a new project + +### Use Log File + +When this option is checked, a log file is automatically started and used when a new database is created. For more information, please refer to [Log file (.journal)](Backup/log.md). + +### Create package + +When this option is checked, 4D databases are automatically created in a folder suffixed .4dbase. + +Thanks to this principle, under macOS the database folders appear as packages having specific properties. Under Windows, this has no particular impact. + +### Create `.gitignore` file + +You might need or want git to ignore some files in your new projects. + +You can set this preference by checking the **Create .gitignore file** option. + +![](assets/en/Preferences/gitignore.png) + +When a project is created in 4D and that box is checked, 4D creates a `.gitignore` file at the same level as the `Project` folder (see [Architecture of a Project](Project/architecture.md#gitignore-file-optional)). + +You can define the default contents of the `.gitignore` file by clicking the pencil icon. This will open the .gitignore configuration file in your text editor. The contents of this file will be used to generate the `.gitignore` files in your new projects. + +The [official git documentation](https://git-scm.com/docs/gitignore) is a great resource to understand how `.gitignore` files work. + +### Language of text comparison + +This parameter configures the default language used for character string processing and comparison in new databases. The language choice has a direct influence on the sorting and searching of text, as well as the character case, but it has no effect on the translation of texts or on the date, time or currency formats, which remain in the system language. By default (factory setting), 4D uses the current user language set in the system. + +A 4D database can thus operate in a language different from that of the system. When a database is opened, the 4D engine detects the language used by the data file and provides it to the language (interpreter or compiled mode). Text comparisons, regardless of whether they are carried out by the database engine or the language, are done in the same language. + +When creating a new data file, 4D uses the language previously set in this menu. When opening a data file that is not in the same language as the structure, the data file language is used and the language code is copied into the structure. + +>You can modify this parameter for the open database using the Database Settings (see [Text comparison](https://doc.4d.com/4Dv18R6/4D/18-R6/DatabaseData-storage-page.300-5217842.en.html#460252)). + +## Documentation Location + +This area configures access to the 4D HTML documentation displayed in your current browser: + +* When you hit the **F1** key while the cursor is inserted in a 4D class function or command name in the Method editor; +* When you double-click on a 4D command in the **Commands Page** of the Explorer. + + +### Documentation language + +Language of the HTML documentation to display. You can select a documentation in a different language from the application language. + +### Look in the local folder first + +> This option is only taken into account for command documentation access (excluding class functions). + +Sets where 4D will look for documentation pages. + +* When checked (default), 4D first looks for the page in the local folder (see below). If it is found, 4D displays the page in the current browser. If not, 4D automatically looks for it in the on-line documentation Web site. This makes it possible to access the documentation even when you are offline. +* When not checked, 4D looks for the desired page directly in the on-line documentation Web site and displays it in the current browser. If it is not found, 4D displays an error message in the browser. + +### Local folder + +> This option is only taken into account for command documentation access (excluding class functions). + +Indicates the location of the static HTML documentation. By default, this is the \Help\Command\language subfolder. You can view the location by clicking on the menu associated with the area. If this subfolder is not present, the location is shown in red. + +You can modify this location as desired, for example if you want to display the documentation in a language different from that of the application. The static HTML documentation can be located on another volume, on a web server, etc. To designate a different location, click on the **[...]** button next to the entry area and choose a documentation root folder (folder corresponding to the language: `fr`, `en`, `es`, `de` or `ja`). diff --git a/docs/Preferences/methods.md b/docs/Preferences/methods.md new file mode 100644 index 00000000000000..87e01cb5dcd99d --- /dev/null +++ b/docs/Preferences/methods.md @@ -0,0 +1,186 @@ +--- +id: methods +title: Methods Page +--- + +This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into two sections accessed using the Theme and Options tabs. + +## Themes + +This page allows selecting, creating, or configuring Method editor themes. A theme defines the font, font size, colors and styles of items displayed in the code editor. + +![](assets/en/Preferences/themes.png) + +### Theme list + +In this list, you select the theme to apply to the code editor. All available themes are displayed, including custom themes (if any). 4D provides two themes by default: + +* **Default Light Theme** +* **Default Dark Theme** + +> Default themes cannot be modified or deleted. + +A **myTheme** theme is automatically added if you already customized method editor styles in previous 4D releases. + +### Creating custom themes + +You can create themes that you can fully customize. To create a theme, select an existing theme and click on the **+** at the bottom of the theme list. You can also add customized themes by copying theme files in the `4D Editor Themes` folder (see below). + +### Custom theme files + +Each custom theme is stored in a single JSON file named *themeName.json* The JSON files for custom themes are stored in the `4D Editor Themes` folder located at the same level as the 4D [preferences file](overview.md#storage). + +If key values are not defined in a custom theme, they default to the values from the *Default Light Theme*. If a JSON theme file is invalid, the *Default Light Theme* is loaded and an error is generated. + +> When a theme file is modified by an external editor, 4D must be restarted to take the modification(s) into account. + +## Theme definition + +Defining a theme means: + +- setting a global font and font size for the whole code editor, +- assigning specific styles and colors to each 4D language element (fields, tables, variables, parameters, SQL, etc.), SQL language element (keywords, functions, etc.), and color backgrounds. + +Combining different colors and styles is particularly useful for code maintenance purposes. + +### Font and Font size + +The **font** and **font size** menus allows you to select the font name and size used in the Method editor entry area for all categories. + +### 4D Language and SQL Language + +You can set different font styles and colors (font color or background color) for each type of language element. You can select the element(s) to customize in the Category list. + + +### Other Styles + +These options configure the various colors used in the Method editor and debugger interfaces. + +![](assets/en/Preferences/categories.png) + + +| |Description| +|---|---| +|**Background color**|Background color of Method editor window.| +|**Border of the running line in the debugger**| Color of the border surrounding the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options) page.| +|**Cursor line background color**|Background color of line containing the cursor.| +|**Execution line background color**|Background color of line being executed in the debugger.| +|**Highlight of the found words**| Highlight color of words found in a search.| +|**Highlight of the parentheses**| Highlight color of corresponding parentheses (used when pairs of parentheses are signaled by highlighting, see [Options](#options)). +|**Highlight of the blocks**|Highlight color for selected logical blocks when the "Highlight logical blocks" option is enabled in the [Options](#options).| +|**Highlight of the same variable or field**|Highlight color for other occurrences of the same variable or field text when one of the "Highlighting variables and text" option is enabled in the [Options](#options).| +|**Highlight of the running line in the debugger**| Highlight color of the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options).| +|**Selection back color**|Background color of selection.| +|**Suggested text**|Color of autocomplete text suggested by the Method editor.| + + + +## Options + + +This page configures Method editor display options. + +![](assets/en/Preferences/options.png) + + +### Options + + + +#### 4D Programming Language (Use regional system settings) + +Allows you to disable/enable the "international" code settings for the local 4D application. +- **unchecked** (default): English-US settings and the English programming language are used in 4D methods. +- **checked**: Regional settings are used in 4D methods. + +> If you modify this option, you need to restart the 4D application so that the change is taken into account. + +#### Indentation + +Changes the indentation value for the 4D code in the Method editor. The width must be specified in points (10 by default). + +4D code is automatically indented in order to reveal its structure: + +![](assets/en/Preferences/optionsIndent.png) + +Modifying this default value can be useful if your methods contain complex algorithms with many levels of embedding. Narrower indentation can be used in order to limit horizontal scrolling. + +#### Show Line Numbers + +Lets you display the line numbers by default in each window of the Method editor. You can also show/hide line numbers for the current window directly from the Method editor. + +#### Show Lists + +Lets you choose whether or not to show the lists of objects (Commands, Tables and fields, etc.) by default when the Method editor window is opened. You can also show or hide each list directly from the Method editor. + +#### Highlight the logical blocks + +When checked, the whole code belonging to a logical block (If/End if for example) is highlighted when the mouse is placed over the expanded node: + +![](assets/en/Preferences/optionsLogicalBlocks.png) + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Always show block lines + +Allows to hide vertical block lines permanently. The block lines are designed to visually connect nodes. By default, they are always displayed (except when collapse/expand icons are hidden, see below). + +![](assets/en/Preferences/optionsBlockLines.png) + +#### Hide collapse/expand icons + +Allows you to hide all expand/collapse icons by default when displaying code. When the option is checked, node icons (as well as local block lines, see above), are displayed temporarily when the mouse is placed over a node: + +![](assets/en/Preferences/optionsHideIcons.png) + +#### Insert () and closing } ) ] " + +Enables automatic insertion of () and closing braces while typing code. This option controls two automatic features: + +- **parentheses pair ()**: Added after a 4D command, keyword or project method inserted from a suggestion or completion list, if the inserted element requires one or more mandatory arguments. For example, if you type "C_OB" and press Tab, 4D writes "C_OBJECT()" and sets the insertion point inside the (). + +- **closing }, ), ], or "**: Character added when you type respectively an opening {, (, ], or ". This feature allows inserting matching pairs of symbols at the insertion point or surrounding a selected text. For example, if you highlight a string and type a single ", the whole selected string will be enclosed in "": + +![](assets/en/Preferences/optionsClosing.png) -> " -> ![](assets/en/Preferences/optionsClosing2.png) + +#### Matching [](){}"" + +Sets the graphic signaling of matching braces and double quotes in the code. This signaling appears whenever a square bracket, parenthesis, curly bracket, or double quote is selected. +The following options are available: + +- **None**: No signaling +- **Rectangle** (default): Braces/double quotes surrounded by a black line + ![](assets/en/Preferences/optionsRectangle.png) +- **Background Color**: Braces/double quotes highlighted (the color is set in the [Theme](#theme-definition) page). +- **Bold**: Braces/double quotes displayed in bold. + +#### Highlighted variables and fields + +Allows to highlight all occurrences of the same variable or field in an open method window. + +![](assets/en/Preferences/optionsVariables.png) + +- **No**(default): No highlight +- **On cursor**: All occurrences are highlighted when the text is clicked +- **On selection**: All occurrences are highlighted when the text is selected + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Debug (Highlight the line running) + +Highlights the line that is currenty running in the debugger in addition to the regular yellow arrow indicator. + +![](assets/en/Preferences/optionsLine.png) + +If you deselect this option, only the yellow arrow is shown. + +### Suggestions + +This area lets you configure autocomplete mechanisms in the Method editor to adapt it to your own work habits. + +| |Description| +|---|---| +|Automatic opening of window for|Triggers the automatic display of the suggestion window for:

    • Constants
    • Variables (local and interprocess) and object attributes
    • Tables
    • Prototypes (*i.e.*, class functions)

    For example, when the "Variables (local or interprocess) and object attributes" option is checked, a list of suggestions appears when you type the $ character:

    ![](assets/en/Preferences/suggestionsAutoOpen.png)

    You can disable this functioning for certain elements of the language by deselecting their corresponding option.| +|Validation of a suggestion for| Sets the entry context that allows the Method editor to validate automatically the current suggestion displayed in the autocomplete window.

    • **Tab and delimiters**
      When this option is selected, you can validate the current selection with the Tab key or any delimiter that is relevant to the context. For example, if you enter "ALE" and then "(", 4D automatically writes "ALERT(" in the editor. Here is the list of delimiters that are taken into account:
      ( ; : = < [ {
    • **Tab only**
      When this option is selected, you can only use the Tab key to insert the current suggestion. This can be used more particularly to facilitate the entry of delimiter characters in element names, such as ${1}.

      **Note**: You can also double-click in the window or press the Carriage return key to validate a suggestion.

    | + + diff --git a/docs/Preferences/overview.md b/docs/Preferences/overview.md new file mode 100644 index 00000000000000..e01b8da70ecfa9 --- /dev/null +++ b/docs/Preferences/overview.md @@ -0,0 +1,44 @@ +--- +id: overview +title: Overview +--- + +User preferences specify various settings affecting your working environment, e.g. default options, display themes, method editor features, shortcuts, etc. They are applied to all projects opened with your 4D or 4D Server application. + +**4D Server**: Object locking occurs when two or more users try to modify the settings in the Preferences dialog box at the same time. Only one user can use the Preferences dialog box at a time. + +>4D offers a different set of parameters specific to the open projet: **Settings** (available from the **Design** menu). For more information, refer to the Settings chapter. + +## Access + +You can access the Preferences dialog box from the **Edit > Preferences...** menu (Windows) or the **4D** Application menu (macOS): + +![](assets/en/Preferences/overviewAccess.png) + +This menu option is available even when there is no open project. + +You can also display the Preferences dialog box in Application mode using the "Preferences" standard action (associated with a menu item or a button) or using the `OPEN SETTINGS WINDOW` command. + +## Storage + +Settings made in the Preferences dialog box are saved in an XML format preferences file named **4D Preferences vXX.4DPreferences** that is stored in the active 4D folder of the current user, as returned by the [`Get 4D folder`](https://doc.4d.com/4Dv18R6/4D/18-R6/Get-4D-folder.301-5198423.en.html) command: + +* Windows: `{disk}\Users\{UserName}\AppData\Roaming\4D` +* macOS: `{disk}:Users:{UserName}:Library:Application Support:4D` + +## Customizing parameters and reset settings + +In settings dialog boxes, parameters whose values have been modified appear in bold: + +![](assets/en/Preferences/overviewUser.png) + +Preferences indicated as customized may have been modified directly in the dialog box, or may have been modified previously in the case of a converted database. + +A parameter still appears in bold even when its value is replaced manually with its default values. This way it is always possible to visually identify any parameters that have been customized. + +To reset the parameters to their default values and remove the bold style indicating that they have been customized, click on the **Reset to factory settings** button: + +![](assets/en/Preferences/overviewSettings.png) + +This button resets all the parameters of the current page. It becomes active when at least one parameter has been modified on the current page. + diff --git a/docs/Preferences/shortcuts.md b/docs/Preferences/shortcuts.md new file mode 100644 index 00000000000000..600f3642994082 --- /dev/null +++ b/docs/Preferences/shortcuts.md @@ -0,0 +1,14 @@ +--- +id: shortcuts +title: Shortcuts Page +--- + +This page lists all the shortcuts used in the 4D Design environment (except for standard "system" shortcuts, such as Ctrl+C/Command+C for the Copy command). + +![](assets/en/Preferences/shortcuts.png) + +To modify a shortcut, you can select/deselect the item to modify (Shift, Alt or letter key) in the list. You can also double-click on a shortcut to configure it using a specific dialog box. + +Note that each shortcut implicitly includes the **Ctrl** (Windows) or **Command** (macOS) key. + +If you edit this list, your custom shortcuts settings are stored in a *4DShortcutsvXX.xml* file, created at the same level as the [user preferences file](overview.md#storage). Hence, each time 4D is updated your keyboard shortcut preferences remain. \ No newline at end of file diff --git a/docs/Preferences/structure.md b/docs/Preferences/structure.md new file mode 100644 index 00000000000000..0d3a104cd7d6ae --- /dev/null +++ b/docs/Preferences/structure.md @@ -0,0 +1,26 @@ +--- +id: structure +title: Structure Page +--- + +## Primary key + +These options in the preferences modify the default name and type of the primary key fields that are added automatically by 4D when new tables are created or by means of the [Primary key manager](https://doc.4d.com/4Dv18R6/4D/18-R6/Primary-key-manager.300-5217742.en.html)). + +The following options are available: + +* **Name** ("ID" by default): Sets the default name of primary key fields. You can use any name you want, as long as it respects the [4D naming rules](Concepts/identifiers.md#tables-and-fields). +* **Type** ([Longint](Concepts/dt_number.md) by default): Sets the default type of primary key fields. You can choose the UUID type. In this case, the primary key fields created by default are of the [Alpha type](Concepts/dt_string.md) and have the **UUID Format** and **Auto UUID** field properties checked. + +## Structure editor + +This group of options configures the display of the 4D Structure editor. + +### Graphic quality of the structure + +This option varies the level of graphic detail in the Structure editor. By default, the quality is set to **High**. You can select Standard quality in order to give priority to display speed. The effect of this setting is mainly perceptible when using the zoom function (see the "Zoom" paragraph in [Structure editor](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html)). + +### When a folder is dimmed, its contents are: + +This option sets the appearance of dimmed tables in the Structure editor, when you carry out selections by folder (see [Highlight/dim tables by folder](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html#4592928)). The possible options are Dimmed (a shadow replaces the table image) and Invisible (the table disappears completely). + diff --git a/docs/Project/architecture.md b/docs/Project/architecture.md index 58bd1357ef9208..c68677333a0458 100644 --- a/docs/Project/architecture.md +++ b/docs/Project/architecture.md @@ -1,25 +1,25 @@ --- id: architecture -title: Architecture of a 4D project +title: Architecture of a project --- -A 4D project is made of several folders and files, stored within a single parent database folder (package folder). For example: +A 4D project is made of several folders and files, stored within a single parent application folder (package folder). For example: - MyProject - - Components - - Data - - Logs - - Settings - - Documentation - - Plugins - - Project - - DerivedData - - Sources - - Trash - - Resources - - Settings - - userPreference.username - - WebFolder + - `Components` + - `Data` + - `Logs` + - `Settings` + - `Documentation` + - `Plugins` + - `Project` + - `DerivedData` + - `Sources` + - `Trash` + - `Resources` + - `Settings` + - `userPreferences.jSmith` + - `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). @@ -28,36 +28,36 @@ A 4D project is made of several folders and files, stored within a single parent The Project folder typically contains the following hierarchy: -- *databaseName*.4DProject file -- Sources - + Classes - + DatabaseMethods - + Methods - + Forms - + TableForms - + Triggers -- DerivedData -- Trash (if any) +- `.4DProject` file +- `Sources` + + `Classes` + + `DatabaseMethods` + + `Methods` + + `Forms` + + `TableForms` + + `Triggers` +- `DerivedData` +- `Trash` (if any) -### *databaseName*.4DProject file +### `.4DProject` file 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 +- 4D Server (read-only, see [Opening a remote project](Desktop/clientServer.md#opening-a-remote-project)) -**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. +> In 4D projects, development is done with 4D and multi-user development is managed through source control tools. 4D Server can open .4DProject files for testing purposes. -### Sources folder +### `Sources` 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 @@ -66,26 +66,26 @@ 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 +#### `DatabaseMethods` Contents|Description|Format --------|-------|---- -*databaseMethodName*.4dm|Database methods defined in the database. One file per database method|text +*databaseMethodName*.4dm|Database methods defined in the project. One file per database method|text -#### Methods folder +#### `Methods` Contents|Description|Format --------|-------|---- -*methodName*.4dm|Project methods defined in the database. One file per method|text +*methodName*.4dm|Project methods defined in the project. One file per method|text -#### Classes folder +#### `Classes` 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 -#### Forms folder +#### `Forms` Contents|Description|Format --------|-------|---- @@ -94,7 +94,7 @@ Contents|Description|Format *formName*/Images/*pictureName*|Project form static picture|picture *formName*/ObjectMethods/*objectName*.4dm|Object methods. One file per object method|text -#### TableForms folder +#### `TableForms` Contents|Description|Format --------|-------|---- @@ -107,45 +107,50 @@ Contents|Description|Format *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 -#### Triggers folder +#### `Triggers` Contents|Description|Format --------|-------|---- -table_*n*.4dm|Trigger methods defined in the database. One trigger file per table (n is the table number)|text +table_*n*.4dm|Trigger methods defined in the project. One trigger file per table (n is the table number)|text **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 +### `Trash` The Trash folder contains methods and forms that were deleted from the project (if any). It can contain the following folders: -- Methods -- Forms -- TableForms +- `Methods` +- `Forms` +- `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 +### `DerivedData` 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. +## `Libraries` -## Resources folder +> This folder is used on macOS only. -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*. +The Librairies folder contains the file resulting from a compilation with the [Silicon compiler](compiler.md#silicon-compiler) on macOS. + +## `Resources` + +The Resources folder contains any custom project 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*. Contents|Description|Format --------|-------|---- -*item*|Database resource files and folders|various +*item*|Project 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 (*) only if the project was exported from a .4db binary database. -## Data folder +## `Data` The data folder contains the data file and all files and folders relating to the data. @@ -157,21 +162,20 @@ 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 +### `Settings` -This folder contains **user settings files for data** used for database administration. +This folder contains **user settings files for data** used for application administration. -> These settings take priority over **[user settings files](#settings-folder-1)** and **structure settings** files. +> These settings take priority over **[user settings files](#settings-folder-1)** and **[structure settings](#sources-folder)** files. 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| - +directory.json|Description of 4D groups, users, and their access rights when the application is run with this data file.|JSON| +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| -### Logs folder +### `Logs` The Logs folder contains all log files used by the project. Log files include, in particular: @@ -181,56 +185,61 @@ 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. +> An additional Logs folder is available in the system user preferences folder (active 4D folder, see [Get 4D folder](https://doc.4d.com/4Dv18R4/4D/18-R4/Get-4D-folder.301-4982857.en.html) command) for maintenance log files and in cases where data folder is read-only. -## Settings folder +## `Settings` -This folder contains **user settings files** used for database administration. File are added to the folder when necessary. +This folder contains **user settings files** used for application administration. -> If a data settings file exists in a Settings folder [in the data folder](#settings-folder), it takes priority over user settings file. +> These settings take priority over **[structure settings](#sources-folder)** files. However, if a **[user settings file for data](#settings-folder)** exists, it takes priority over user settings file. 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 +directory.json|Description of 4D groups and users for the application, as well as their access rights|JSON| 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 +## `userPreferences.` -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 ---------|-------|---- -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 +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| +preferences.4DPreferences|Current data path and main window positions|XML| +CompilerIntermediateFiles|Intermediate files resulting from Apple Silicon compilation|Folder| -## Components folder +## `Components` -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. +This folder contains the components to be available in the application project. It must be stored at the same level as the Project folder. -> 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. +> An application project can be used itself as a component: +> - for development: put an alias of the .4dproject file in the Components folder of the host project. +> - for deployment: [build the component](Desktop/building.md#build-component) and put the resulting .4dz file in a .4dbase folder in the Components folder of the host application. -## Plugins folder +## `Plugins` -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. +This folder contains the plug-ins to be available in the application project. It must be stored at the same level as the Project folder. -## Documentation folder +## `Documentation` This folder contains all documentation files (.md) created for the project elements such as classes, methods, or forms. Documentation files are managed and displayed in the 4D Explorer. For more information, refer to [Documenting a project](Project/documentation.md). -## WebFolder +## `WebFolder` + +Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. + +## `.gitignore` file (optional) -Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. \ No newline at end of file +File that specifies which files will be ignored by git. You can include a gitignore file in your projects using the **Create .gitignore file** option on the **General** page of the preferences. To configure the contents of that file, see [Create `.gitignore` file](Preferences/general.md#create-gitignore-file). diff --git a/docs/Project/compiler.md b/docs/Project/compiler.md new file mode 100644 index 00000000000000..765d9c2fb9a088 --- /dev/null +++ b/docs/Project/compiler.md @@ -0,0 +1,334 @@ +--- +id: compiler +title: Compilation +--- + +You can compile your projects, i.e., translate all of your methods into machine language. Compiling a project lets you check the consistency of the code and accelerate its execution, as well as making it possible to obfuscate the code in its entirety. Compilation is an indispensable step between the development of projects using 4D and their deployment as stand-alone applications. + + +## Compile + +The compilation is handled from your 4D application and is entirely automatic. + +> On macOS, the compilation requires that you install `Xcode`. See [this section](#silicon-compiler) for more information about this requirement. + +1. Open the compiler window by selecting the **Compiler...** command in the **Design** menu or the **Compiler** toolbar button. + + ![](assets/en/Project/compilerWin1.png) + + ![](assets/en/Project/comp1.png) + +> You can also launch directly the compilation by selecting the **Start Compilation** menu item from the **Design** menu. + +2. Click the **Compile** button to launch the compilation using the current [compilation settings](#compiler-settings). + +If no errors are detected, the actual compilation begins and the "Compilation successful" message is displayed at the bottom of the window when the compilation is completed: + +![](assets/en/Project/success.png) + +You can immediately [run your application in compiled mode](#run-compiled) and see how faster it is. + +If errors are detected, the process is stopped and the "Compilation failed" message is displayed. The information area of the window displays the method names and line numbers concerned in a hierarchical list: + +![](assets/en/Project/compilerWin2.png) + +Double-click on each error detected to open the method or class concerned directly in the 4D method editor. The line containing the error is highlighted and the type of error is displayed in the syntax area of the window. + +Use the **Previous Error** / **Next Error** commands of the **Method** menu to navigate from one error to the next. + +The number of errors found during your first compilations may be daunting, but do not let this put you off. You will soon discover that they often spring from the same source, i.e., non-compliance with certain project conventions. The compiler always provides a [precise diagnosis](#error-files) of the errors in order to help you correct them. + +> Compilation requires an appropriate license. Without this license, it is not possible to carry out a compilation (buttons are disabled). Nevertheless, it is still possible to check the syntax and generate Typing methods. + +## Run Compiled + +Once a project is compiled, it is possible to switch from [interpreted mode to compiled mode](Concepts/interpreted.md), and vice versa, at any time and without having to quit the 4D application (except when the interpreted code has been removed). To do this, use tge **Restart Interpreted** and **Restart Compiled** commands of the **Run** menu. The [Open project dialog box](creating.md#options) also offers a choice between interpreted or compiled mode for database startup. + +When you switch from one mode to the other, 4D closes the current mode and opens the new one. This is equivalent to exiting and reopening the application. Each time you change from one mode to another, 4D executes the two following database methods (if specified) in this order: `On Exit` -> `On Startup`. + +If you modify your project in interpreted mode, you must recompile it in order to have your edits taken into account in compiled mode. + +## Compiler window features + +In addition to the [**Compile** button](#compile), the Compiler window provides additional features that are useful during the project development phase. + +### Check Syntax + +The **Check Syntax** button starts the execution of the syntax-checking phase. At the end of the checking process, any errors detected are listed in the information area. You can double–click on an error line in order to display the corresponding method. + +Syntax checking can also be launched directly using the **Check Syntax** command associated with the **Compiler** toolbar button. This option is the only one available if you do not have a suitable license to allow the compilation of applications. + +### Generate Typing + +The **Generate Typing** button creates or updates typing compiler methods. Compiler methods are project methods that group together all the variable and array typing declarations (process and interprocess), as well as the method parameters. These methods, when they exist, are used directly by the compiler during code compilation, resulting in faster compilation times. + +The name of these methods must begin with `Compiler_`. You can set the default name for each of the 5 compiler methods in the [compiler settings window](#compiler-methods-for). The compiler methods that are generated and maintained by 4D automatically have the `Invisible` attribute: + +![](assets/en/Project/compilerWin3.png) + +Only the necessary compiler methods (i.e., those for which items already exist in the project) are generated. + +The information area indicates any errors found during method creation or updating. Double-clicking on an error line causes the method and line concerned to be displayed in the Method editor. + + +### Clear compiled code + +The **Clear compiled code** button deletes the compiled code of the project. When you click on it, all of the [code generated during compilation](#classic-compiler) is deleted, the **Restart Compiled** command of the **Run** menu is disabled and the "Compiled Project" option is not available at startup. + + +### Show/Hide Warnings + +Warnings are specific messages generated by the compiler when it checks the syntax. These messages are intended to draw your attention to statements that might lead to execution errors. They do not prevent compilation. + +Depending on circumstances and the programming style used, these warnings may be more or less relevant. You can toggle the warnings on or off by clicking the **Show/Hide Warnings** button: + +![](assets/en/Project/compilerWin4.png) + +When this option is checked, the warnings (if any) are displayed in the window, after the other error types. They appear in italics: + +![](assets/en/Project/compilerWin5.png) + +Double-clicking a warning opens the corresponding method. + +#### Disabling warnings during compilation + +You can selectively disable certain warnings during compilation by inserting the following into the code of a 4D method: + +```4d + //%W- +``` + +Only warnings with numbers can be disabled. Warning numbers are specified at the end of each message in the list of compilation errors. For example, to disable the following warning: + +*1: Pointer in an array declaration (518.5)* + +... you just need to write the following comment in a 4D method, preferably a `COMPILER_xxx` method (method compiled first): + +```4d + //%W-518.5 +``` + + + +## Compiler Settings + +The "Compiler" page of the Settings dialog box lets you set parameters related to project compilation. You can directly open this page from the [compiler window](#compiler-window) by clicking on the **Compiler Settings** button: + +![](assets/en/Project/compilerWin6.png) + + +### Compilation options + +This area groups the generic options used during the compilation process. + +#### Generate the symbol file + +Used to generate the symbol file (see [symbol file](#symbol-file)). The symbol file is created in the project folder with the name `ProjectName_symbols.txt`. + +#### Generate error file + +Used to generate the error file (see [error file](#symbol-file)) at the time of syntax checking. The error file is created in the project folder with the name `ProjectName_errors.xml`. + + +#### Compilation Path + +Used to set the number of passes (code parsing) performed by the compiler and thus the duration of compilation. + +- **Type the variables**: Passes by all the stages that make compilation possible. +- **Process and interprocess are typed**: The pass for typing process and interprocess variables is not carried out. This option can be used when you have already carried out the typing of all your process and interprocess variables either yourself or using the function for automatic generation of compiler methods. +- **All variables are typed**: The pass for typing local, process and interprocess variables is not carried out. Use this option when you are certain that all the process, interprocess and local variables have been clearly typed. + +#### Compilation Target + +

    History +|Version|Changes| +|---|---| +|v19|Added| +
    + +This setting allows you to select the processor family for which your 4D project must be natively compiled. The 4D compiler can build native code for two processor families: + +- **Intel/AMD** processors (all machines), +- **Apple Silicon** processors. + +Two target options are proposed. The result depends on the processor of the machine on which 4D is running. + +|*Option*|*on Windows Intel/AMD*|*on macOS Intel*|*on macOS Silicon*| +|---|---|---|---| +|**All processors (Intel/AMD and Apple Silicon)**|Code for Intel/AMD
    *It is not possible to produce Apple Silicon code on Windows*|Code for Apple Silicon + Code for Intel/AMD
    *Two compiled codes will be available*|Code for Apple Silicon + Code for Intel/AMD
    *Two compiled codes will be available*| +|**My processor (processor)**|Code for Intel/AMD|Code for Intel/AMD|Code for Apple Silicon| + +> Apple Silicon compiler target requires that the **Clang** application be installed on your machine. Clang comes with the latest version of Xcode. See the [Silicon compiler requirements](#requirements) for more information. + +### Default typing + +Use this area to set the default type for ambiguous database objects. + +- **Numeric**: Used to force numeric typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. You can optimize the running of your database by choosing the Longint type. +- **Button**: Used to force button typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. This type applies to buttons as well as check boxes, picture buttons, button grids, radio buttons, picture pop-up menus and drop-down lists. + +### Compiler Methods for... + +This area lets you rename the Compiler methods that are generated automatically by the compiler when you click [Generate Typing](#generate-typing). + +Up to 5 compiler methods may be generated; a compiler method is only generated if the project contains the following items: + +- **Variables**: Groups together process variable declarations; +- **Interprocess Variables**: Groups together interprocess variable declarations; +- **Arrays**: Groups together process array declarations; +- **Interprocess Arrays**: Groups together interprocess array declarations; +- **Methods**: Groups together method parameter declarations (for instance, `C_LONGINT(mymethod;$1;$2)`). + +You can rename each of these methods in the corresponding areas, but they will always be preceded by the label `Compiler_` (non-modifiable). The name of each method (prefix included) must be no longer than 31 characters. It must also be unique and comply with [4D rules for naming methods](Concepts/identifiers.md#project-methods). + + +## Compilation tools + +### Symbol file + +If you check the [**Generate the symbol file**](#generate-the-symbol-file) option in the compiler settings, a symbol file called `ProjectName_symbols.txt` is created in the project folder during compilation. It is divided into several parts: + +#### List of process and interprocess variables + +These two lists contain four columns: + +- Names of process and interprocess variables and arrays used in your project. These variables are listed in alphabetical order. +- Type of the variable. Types are set by compiler directive commands or are determined by the compiler based on the use of the variable. If the type of a variable cannot be determined, the column is empty. +- Number of dimensions if the variable is an array. +- Reference to the context in which the compiler established the type of the variable. If the variable is used in several contexts, the context mentioned is the one used by the compiler to determine its type. + - If the variable was found in a database method, the database method name is given, preceded by (M)*. + - If the variable was found in a project method, the method is identified as it has been defined in 4D, preceded by (M). + - If the variable was found in a trigger, the table name is given, preceded by (TM). + - If the variable was found in a form method, the form name is given, preceded by the table name and (FM). + - If the variable was found in an object method, the object method’s name is given, preceded by the form name, table name, and by (OM). + - If the variable is an object in a form and does not appear in any project, form, object method, or trigger, the name of the form in which it appears is given, preceded by (F). +At the end of each list, you can find the sizes of the process and interprocess variables in bytes. + +> When compiling, the compiler cannot determine in which process a given process variable is used. A process variable can have a different value in each process. Consequently, all process variables are systematically duplicated as each new process is launched: it is thus advisable to watch out for the amount of memory that they will take up. Also, keep in mind that the space for process variables is not related to the stack size for the process. + +#### List of local variables + +The list of local variables is sorted by database method, project method, trigger, form method, and object method, in the same order as in 4D. + +This list is divided into three columns: + +- list of local variables used in the method; +- type of the variable; +- number of dimensions if the variable is an array. + +#### Complete list of methods + +A complete list of your database and project methods is given at the end of the file with: + +- their type (procedure or function returning a value) +- the data types of their parameters and the returned result +- the number of calls +- the Thread Safe or Thread Unsafe property. + +This information appears as follows: + +``` +Procedure or Function (parameter data types): +result data type, number of calls, Thread Safe or Thread Unsafe +``` + +### Error file + +You can choose whether or not to generate an error file during compilation using the [**Generate error file**](#generate-error-file) option in the compiler settings. The error file is automatically named `projectName_errors.xml` and is placed in the project folder. + +Although the errors can be accessed directly via the [compiler window](#compile), it can be useful to have an error file that can be transmitted from one machine to another. The error file is generated in XML format in order to facilitate automatic parsing of its contents. It also allows the creation of customized error display interfaces. + +The length of the error file depends on the number of errors and warnings issued by the compiler. + +The structure of the error file is as follows: + +- At the top of the file is the list of errors and warnings, sorted by method and in their order of creation in 4D. In the ***General errors*** section, all the typing impossibilities and identity ambiguities are grouped together. These errors and warnings are listed using the following format: + - line number in the method (0 indicates general errors) + - warning attribute indicating whether the detected anomaly is a warning (warning="true") or an error (warning="false") + - diagnostic describing the error + +If your project does not have any general errors, the file will not have a *General errors* section. + +An error file may contain three types of messages: + +- **Errors linked to a specific line**: these errors are displayed in context — the line in which they were found — with an explanation. The compiler reports this type of error when it encounters an expression in which it sees an inconsistency related to data type or syntax. In the compiler window, double–click on each error detected in order to open the method concerned directly in the 4D Method editor, with the line containing the error highlighted. + +- **General errors**: These are errors that make it impossible to compile the project. There are two cases in which the compiler reports a general error: + - The data type of a process variable could not be determined. + - Two different kinds of objects have the same name. +General errors are so named because they cannot be linked to any specific method. In the first case, the compiler could not perform a specified typing anywhere in the project. In the second, it was unable to decide whether to associate a given name with one object rather than with another. + +- **Warnings**: Warnings are not errors. They do not prevent the project from being compiled, but simply point out potential code errors. In the compiler window, warnings appear in italics. Double-click on each warning to open the method concerned directly in the 4D Method editor, with the line containing the warning highlighted. + + + + +### Range checking + +The code generated by the 4D compiler automatically checks that every access to an array element or a character reference is done within the actual range of array elements or string characters. Out of range accesses will provoke runtime execution errors. + +In some cases, you might prefer range checking not to apply to certain parts of the code that are considered to be reliable. More particularly, in the case of loops that are repeated a great number of times, and when running the compiled database on older machines, range checking can significantly slow down processing. If you are absolutely certain that the code concerned is reliable and cannot cause system errors, you can disable range checking locally. + +To do this, you must surround the code to be excluded from range checking with the special comments `//%R-` and `//%R+`. The `//%R-` comment disables range checking and `//%R+` enables it again: + +```4d + // %R- to disable range checking + + ... //Place the code to be excluded from range checking here + + // %R+ to enable range checking again for the rest +``` + +## About Compilers + +4D contains two compilers: + +- a "classic" compiler, used to compile native code for Intel/AMD processors; +- a Silicon compiler, used to compile native code for Apple Silicon processors. + +The classic compiler can be used on any platform, while the Silicon compiler can only be used on a Mac machine: + +||Compile for Windows|Compile for Intel Mac|Compile for Silicon Mac| +|---|:---:|:---:|:---:| +|On Windows|✓|✓|✗| +|On Intel Mac|✓|✓|✓| +|On Silicon Mac|✓|✓|✓| + + +Both compilers are integrated into 4D. The appropriate compiler is automatically selected depending on the [compilation target](#compilation-target) option. + + + +### Classic Compiler + +The classic compiler generates native compiled code for Intel/AMD processors on any machines. It does not require any specific configuration. + +Resulting compiled code is stored in the [DerivedData](architecture.md#deriveddata-folder) folder of the project. + + +### Silicon Compiler + +The Silicon compiler generates native compiled code for Apple Silicon processors, such as *Apple M1*. + +Resulting compiled code is stored in the [Libraries](architecture.md#libraries-folder), folder of the project. + + +#### Requirements + +- **Apple machine**: The Silicon compiler can only be run from an Apple machine. +- **4D Project architecture**: The Silicon compiler is only available for 4D developments using [project architecture](architecture.md). +- **Xcode or Developer Tools**: The Silicon compiler calls the **Clang** open-source macOS compiler to compile the project from C++ code at the [second step](#two-step-incremental-compiler) of compilation. *clang* requires Apple native libraries, which are provided by either the **Xcode** or **Developer Tools** package. + - **If you already have** Xcode or Developer Tools installed on your computer, you only need to make sure that its version is compliant with 4D requirements. + - **If you do not have** any of these tools installed on your computer, you will need to download one of them from the Apple Developer web site. + +> We recommend to install **Xcode**, which is quite simple to install. You can decide to install **Developer Tools** which is more compact, however its installation is a little more complex. + +In any cases, the 4D Silicon compiler will warn you if your configuration does not comply with its requirements. + + +#### Incremental compiler + +The Silicon compiler is incremental, which means that: + +- During the very first compilation, **all 4D methods** are compiled. This step could take a certain time. However it only occurs once. +- During all subsequent compilations, only **new or modified methods** are processed, thus reducing drastically the compilation time. \ No newline at end of file diff --git a/docs/Project/components.md b/docs/Project/components.md new file mode 100644 index 00000000000000..ea19b3e4a51373 --- /dev/null +++ b/docs/Project/components.md @@ -0,0 +1,29 @@ +--- +id: components +title: 4D Components Library +--- + +4D includes an extended library of built-in 4D components. A [component](Concepts/components.md) provides additional functionalities to your 4D projects. + +## List of 4D Components + +|Component Name|Description|Where to find documentation| +|---|---|---| +|4D Mobile App Server|Set of utility classes and functions to authenticate, manage sessions, and develop mobile applications |[4d-go-mobile github repository](https://github.com/4d-go-mobile/4D-Mobile-App-Server)| +|4D Progress|Open one or more progress bars in the same window|[doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Progress.100-5461799.en.html)| +|4D SVG|Create and manipulate common svg graphic objects|[doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-SVG-Component.300-5462064.en.html)| +|4D ViewPro|Spreadsheet features in your forms|[doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-View-Pro-Reference.100-5442901.en.html)| +|4D Widgets|Manage DatePicker, TimePicker, SearchPicker 4D widgets|[doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Widgets.100-5462909.en.html)| +|4D WritePro Interface|Manage 4D Write Pro palettes|[4d github repository](https://github.com/4d/4D-WritePro-Interface)| + + +> You can develop and install your own 4D components. See [this section](Concepts/components.md) for more information. + + +## Documentation in the Explorer + +When an installed component contains methods, they appear in the **Component Methods** theme of the Explorer's Methods page. + +Select a component method and click on the **Documentation** button of the Explorer to get information about it, [if any](documentation.md). + +![alt-text](assets/en/Project/compDoc.png) \ No newline at end of file diff --git a/docs/Project/creating.md b/docs/Project/creating.md index 4f1a939869e78d..2985c30d327162 100644 --- a/docs/Project/creating.md +++ b/docs/Project/creating.md @@ -1,30 +1,121 @@ --- id: creating -title: Creating a 4D project +title: Working with a project --- -## Requirements +4D projects are created and developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). **4D Server** can also create new, empty projects. -New 4D projects can only be created from **4D Developer** (see [Developing a project](developing.md)). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -**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). +## Creating a project -> You can create project databases by exporting existing binary databases. See "Export from a 4D database" on [doc.4d.com](https://doc.4d.com). +New 4D application projects can be created from **4D** or **4D Server**. In any case, project files are stored on the local machine. -## Creating the project files +To create a new project: -To create a new database project: +1. Launch 4D or 4D Server. +2. Select **New > Project...** from the **File** menu:

    ![](assets/en/getStart/projectCreate1.png)

    OR

    (4D only) Select **Project...** from the **New** toolbar button:

    ![](assets/en/getStart/projectCreate2.png)

    A standard **Save** dialog appears so you can choose the name and location of the 4D project's main folder. -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. -1. Enter the name of your project folder and click **Save**. +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. + - as the name of the entire project folder, + - as the name of the .4DProject file at the first level of the "Project" folder. -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). + You can choose any name allowed by your operating system. However, if your 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. -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. +When you validate the **Save** dialog, 4D closes the current project (if any), creates a project folder at the indicated location, and puts all files needed for the project into it. For more information, refer to [Architecture of a 4D Project](Project/architecture.md). + +You can then start developing your project. + +## Opening a project + +To open an existing project from 4D: + +1. Select **Open a local application project** in the Welcome Wizard dialog,

    OR

    +Select **Open/Local Project...** from the **File** menu or the **Open** toolbar button.

    +The standard Open dialog appears. + +2. Select the project's `.4dproject` file and click **Open**.

    +By default, the project is opened with its current data file. Other file types are suggested: + + - *Packed project files*: `.4dz` extension - deployment projects + - *Shortcut files*: `.4DLink` extension - store additional parameters needed for opening projects or applications (addresses, identifiers, etc.) + - *Binary files*: `.4db` or `.4dc` extension - legacy 4D database formats + +### Options + +In addition to standard system options, the *Open* dialog in 4D provides two menus with specific options that are available using the **Open** button and the **Data file** menu. + +- **Open** - opening mode of the project: + - **Interpreted** or **Compiled**: These options are available when the selected project contains both [interpreted and compiled code](Concepts/interpreted.md). + - **[Maintenance Security Center](MSC/overview.md)**: Opening in secure mode allowing access to damaged projects in order to perform any necessary repairs. + +- **Data file** - specifies the data file to be used with the project. By default, the **Current data file** option is selected. + +## Project opening shortcuts + +4D offers several ways to open projects directly and bypass the Open dialog: + +- via menu options: + - *Menu bar* - **File** > **Open Recent Projects / {project name}** + - *4D Tool bar* - Select the project from the menu associated with the **Open** button + +- via preferences: + - Set the **At startup** general preference to **Open last used project**. + +- using a `.4DLink` file. + +### Opening a Project with a 4DLink file + +You can use a [`.4DLink` file](#about-4DLink-files) to launch the 4D application and open the target 4D project. There are two ways to do this: + +- double-click or drag and drop the `.4DLink` file onto the 4D application +- go to **File** > **Open Recent Projects** and select a project + +![open-recent-projects](assets/en/Project/4Dlinkfiles.png) + +A .4DLink file of "remote project" type can be copied and used on several machines. + +>It's also possible to select a 4DLink file in the 4D and 4D Server opening dialog box (opening local project only). + +## About 4DLink Files + +Files with the `.4DLink` extension are XML files that contain parameters intended to automate and simplify opening local or remote 4D projects. + +`.4DLink` files can save the address of a 4D project as well as its connection identifiers and opening mode, saving you time when opening projects. + +4D automatically generates a `.4DLink` file when a local project is opened for the first time or when connecting to a server for the first time. The file is stored in the local preferences folder at the following location: + +- Windows 7 and higher: C:\Users\UserName\AppData\Roaming\4D\Favorites vXX\ +- OS X: Users/UserName/Library/Application Support/4D/Favorites vXX/ + +XX represents the version number of the application. For example, "Favorites v19" for 4D v19. + +That folder is divided into two subfolders: +- the **Local** folder contains the `.4DLink` files that can be used to open local projects +- the **Remote** folder contains the `.4DLink` files of recent remote projects + +`.4DLink` files can also be created with an XML editor. + +4D provides a DTD describing the XML keys that can be used to build a `.4DLink` file. This DTD is named database_link.dtd and is found in the \Resources\DTD\ subfolder of the 4D application. + + +## File saving + +When working on a project in 4D, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Modifications are saved to disk when you select a **Save** menu item, or when the editor's window loses or gets the focus. + +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 development framework includes a file access manager to control concurrent access: + +- if an open file 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 when trying to save the changes: + +![](assets/en/Project/projectReload.png) + - **Yes**: discard editor changes and reload the modified version + - **No**: save changes and overwrite the other version + - **Cancel**: do not save + +This feature is enabled for all built-in 4D editors (Structure, Form, Method, Settings, and Toolbox). \ No newline at end of file diff --git a/docs/Project/developing.md b/docs/Project/developing.md deleted file mode 100644 index cdcd2084c8c90c..00000000000000 --- a/docs/Project/developing.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: developing -title: Developing a project ---- - -## Development tools - - -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. - -Multi-user development is managed through standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. - - - -## Project file access - -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 - - **No**: save changes and overwrite the other version - - **Cancel**: do not save - -This feature is enabled for all built-in editors: - -- Structure editor -- Form editor -- Method editor -- Settings editor -- Toolbox editor diff --git a/docs/Project/documentation.md b/docs/Project/documentation.md index 21059bb766c22b..5d78d548e722e0 100644 --- a/docs/Project/documentation.md +++ b/docs/Project/documentation.md @@ -3,10 +3,9 @@ id: documentation title: Documenting a project --- -## Overview -In project databases, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for databases being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the database. +In application projects, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for projects being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the application. The following project elements accept documentation: @@ -38,24 +37,24 @@ All documentation files are stored in the `Documentation` folder, located at the The `Documentation` folder architecture is the following: -- **Documentation** - + **Classes** +- `Documentation` + + `Classes` * myClass.md - + **DatabaseMethods** + + `DatabaseMethods` * onStartup.md * ... - + **Forms** + + `Forms` * loginDial.md * ... - + **Methods** + + `Methods` * myMethod.md * ... - + **TableForms** + + `TableForms` * **1** - input.md - ... * ... - + **Triggers** + + `Triggers` * table1.md * ... @@ -127,7 +126,7 @@ New documentation files are created with the following default contents: |Line|Description| |---|---| -|\|HTML comment. Used in priority as the method description in the [code editor tips](#viewing-documentation-in-the-code-editor)| +|"\"|HTML comment. Used in priority as the method description in the [code editor tips](#viewing-documentation-in-the-code-editor)| |## Description|Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used| |## Example|Heading level 2, you can use this area to show sample code| |\```4D
    Type your example here \```|Used to format 4D code examples (uses highlight.js library)| @@ -168,6 +167,7 @@ _italic_ | toolbar | String |Toolbar name | ``` + - The link tag is supported: ``` diff --git a/docs/Project/overview.md b/docs/Project/overview.md index 80541544621400..21b849d974ab2c 100644 --- a/docs/Project/overview.md +++ b/docs/Project/overview.md @@ -3,37 +3,31 @@ id: overview title: Overview --- -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. - -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). +A 4D project contains all of the source code of a 4D application, whatever its deployement type (web, mobile, or desktop), from the database structure to the user interface, including code, forms, menus, user settings, or any required resources. A 4D project is primarily made of text-based files. ## 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... +4D project files are open and edited using regular 4D platform applications (4D or 4D Server). With 4D, full-featured editors are available to manage files, including a structure editor, a method editor, a form editor, a menu editor... -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 +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. -4D project files make it easier to program generically, create application templates, and share code. +In addition, 4D project files make it easier to program generically, create application templates, and share code. Project are organized internally in [folders and files](Project/architecture.md). -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: -- Versioning -- Revision comparisons -- Rollbacks +## Development +4D projects are developed using the **4D** application. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project generator, and an application runtime, allowing to develop, test, and debug any kind of project. -## Working with projects +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -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). +## Final application -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 files can be [compiled](compiler.md) and easily deployed. 4D allows you to create three types of applications from your projects: -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). +- [web](WebServer/webServer.md) applications, +- [mobile](https://developer.4d.com/4d-for-ios/) applications, +- [desktop](Desktop/building.md) applications (client/server or single-user). +Back end applications can be deployed using 4D Server, 4D, or merged with 4D Volume license. \ No newline at end of file diff --git a/docs/Project/pictures.md b/docs/Project/pictures.md deleted file mode 100644 index 07d3eb836c36a5..00000000000000 --- a/docs/Project/pictures.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -id: pictures -title: Pictures ---- - -## 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: static pictures, pictures pasted into forms in Design mode, pictures pasted into fields or variables in Application mode, etc. - -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. - -* Windows, 4D uses WIC (Windows Imaging Component). -* macOS, 4D uses ImageIO. - -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. - -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. Note that the list of available codecs for reading and writing can be different since encoding codecs may require specific licenses. - ->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. - - -### Picture Codec IDs - -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â€) - -The form returned for each format will depend on the way the Codec is recorded at the operating system level. - -Most of the 4D picture management commands can receive a Codec ID as a parameter. It is therefore imperative to use the system ID returned by the `PICTURE CODEC LIST` command. - - - - -### 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: - -![](assets/en/Project/picNoFormat.png) - -The icon is automatically used wherever the picture is meant to be displayed: - -![](assets/en/Project/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. - - - -### Picture Resolution - -4D supports high resolution displays on both macOS and Windows platforms for the following: - -* Static pictures -* 3D buttons/radio/check boxes -* Picture buttons/pop-ups -* Tab controls -* Menu icons -* List box headers - -High resolution displays have a higher pixel density than traditional standard displays. For pictures to render correctly on high resolution displays, the number of pixels in the picture must be multiplied by the *scale factor* (*i.e.*, two times larger, three times larger, etc.). - -The following table demonstrates the difference between display resolution and picture pixel density. - -|Display Type| Scale Factor|Example -|---|---|---| -|Standard Resolution|1:1 pixel density.| **1x**
    ![](assets/en/Project/pictureScale1.png)
    *circle.png* -|High Resolution| Pixel density increased by a factor of 2 or 3.|
    2x3x
    ![](assets/en/Project/pictureScale2.png)
    *circle@2x.png*
    ![](assets/en/Project/pictureScale3.png)
    *circle@3x.png*
    - -When using high resolution pictures, the scale factor is specified by adding "@nx" in the picture's name (*n* designates the scale factor). In the table above, you can see that the scale factor is indicated in the names of the high resolution pictures, *circle@2x.png* and *circle@3x.png*. - -4D automatically prioritizes pictures with the highest resolution. -

    **Example**: When using two screens (one high resolution display, one standard display) and you move a form from one screen to another, 4D automatically renders the highest possible resolution of the picture. Even if a command or property specifies *circle.png*, *circle@3x.png* will be used (if it exists). - ->Note that this prioritization occurs only for displaying pictures onscreen, there is no automatic prioritization made when printing. - -This resolution behavior is supported for project databases by all [4D form objects](../FormObjects/formObjectsOverview.html) which support images. - - - - -## Mouse Coordinates in a Picture - -4D lets you retrieve the local coordinates of the mouse in a picture field or variable 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. - -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*. - -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. - -## Picture Operators - -4D allows you to carry out **operations** on 4D pictures, such as concatenation, superimposing, etc. This point is covered in the *Picture Operators* section of the *4D Language Reference*. - 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 50b73a57a19f58..f9a8a5537de136 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,23 +221,20 @@ 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.| +|path |String |Name of the dataclass for a relatedEntity attribute, or name of the relation for a relatedEntities 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. ### 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/$upload.md b/docs/REST/$upload.md index 8cc0ed88fb19f0..7abc8ef95a88d9 100644 --- a/docs/REST/$upload.md +++ b/docs/REST/$upload.md @@ -6,41 +6,47 @@ title: $upload Returns an ID of the file uploaded to the server -## Description +## Description + 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`. +You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout` parameter. + +## Uploading scenario + +Imagine you want to upload an image to update the picture attribute of an entity. -## 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. +To upload an image (or any binary file), you must first select the file from the client application. The file itlself must be passed in the **body** of the request. -Then, we upload the selected image to 4D Server: +Then, you upload the selected image to 4D Server using a request such as: `POST /rest/$upload?$rawPict=true` + +As a result, the server returns an ID that identifies the file: -**Result**: +**Response**: `{ "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. The request looks like: `POST /rest/Employee/?$method=update` **POST data**: -```` +``` { __KEY: "12", __STAMP: 4, photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } } -```` +``` **Response**: The modified entity is returned: -```` +``` { "__KEY": "12", "__STAMP": 5, @@ -56,5 +62,46 @@ The modified entity is returned: "image": true } },} -```` +``` +## Example with a 4D HTTP client + +The following example shows how to upload a *.pdf* file to the server using the 4D HTTP client. + +```4d +var $params : Text +var $response : Object +var $result : Integer +var $blob : Blob + + +ARRAY TEXT($headerNames; 1) +ARRAY TEXT($headerValues; 1) + +$url:="localhost:80/rest/$upload?$binary=true" //prepare the REST request + +$headerNames{1}:="Content-Type" +$headerValues{1}:="application/octet-stream" + +DOCUMENT TO BLOB("c:\\invoices\\inv003.pdf"; $blob) //Load the binary + + //Execute the first POST request to upload the file +$result:=HTTP Request(HTTP POST method; $url; $blob; $response; $headerNames; $headerValues) + +If ($result=200) + var $data : Object + $data:=New object + $data.__KEY:="3" + $data.__STAMP:="3" + $data.pdf:=New object("ID"; String($response.ID)) + + $url:="localhost:80/rest/Invoices?$method=update" //second request to update the entity + + $headerNames{1}:="Content-Type" + $headerValues{1}:="application/json" + + $result:=HTTP Request(HTTP POST method; $url; $data; $response; $headerNames; $headerValues) +Else + ALERT(String($result)+" Error") +End if +``` diff --git a/docs/REST/ClassFunctions.md b/docs/REST/ClassFunctions.md new file mode 100644 index 00000000000000..9520485025fde3 --- /dev/null +++ b/docs/REST/ClassFunctions.md @@ -0,0 +1,583 @@ +--- +id: classFunctions +title: Calling ORDA class functions +--- + + +You can call [data model class functions](ORDA/ordaClasses.md) defined for the ORDA Data Model through your REST requests, so that you can benefit from the exposed API of the targeted 4D application. + +Functions are simply called in POST requests on the appropriate ORDA interface, without (). For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: + +`/rest/City/getCity` + +with data in the body of the POST request: `["Aguada"]` + +In 4D language, this call is equivalent to, : + +```4d +$city:=ds.City.getCity("Aguada") +``` + +> Only functions with the `exposed` keyword can be directly called from REST requests. See [Exposed vs non-exposed functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) section. + +## Function calls + +Functions must always be called using REST **POST** requests (a GET request will receive an error). + +Functions are called on the corresponding object on the server datastore. + +|Class function|Syntax| +|---|----| +|[datastore class](ORDA/ordaClasses.md#datastore-class)|`/rest/$catalog/DataStoreClassFunction`| +|[dataclass class](ORDA/ordaClasses.md#dataclass-class)|`/rest/{dataClass}/DataClassClassFunction`| +|[entitySelection class](ORDA/ordaClasses.md#entityselection-class)|`/rest/{dataClass}/EntitySelectionClassFunction`| +||`/rest/{dataClass}/EntitySelectionClassFunction/$entityset/entitySetNumber`| +||`/rest/{dataClass}/EntitySelectionClassFunction/$filter`| +||`/rest/{dataClass}/EntitySelectionClassFunction/$orderby`| +|[entity class](ORDA/ordaClasses.md#entity-class)|`/rest/{dataClass}(key)/EntityClassFunction/`| + + + +> `/rest/{dataClass}/Function` can be used to call either a dataclass or an entity selection function (`/rest/{dataClass}` returns all entities of the DataClass as an entity selection). +The function is searched in the entity selection class first. If not found, it is searched in the dataclass. In other words, if a function with the same name is defined in both the DataClass class and the EntitySelection class, the dataclass class function will never be executed. + + +## Parameters + + + +You can send parameters to functions defined in ORDA user classes. On the server side, they will be received in the class functions in regular $1, $2, etc. parameters. + +The following rules apply: + +- Parameters must be passed in the **body of the POST request** +- Parameters must be enclosed within a collection (JSON format) +- All scalar data types supported in JSON collections can be passed as parameters. +- Entity and entity selection can be passed as parameters. The JSON object must contain specific attributes used by the REST server to assign data to the corresponding ORDA objects: __DATACLASS, __ENTITY, __ENTITIES, __DATASET. + +See [this example](#request-receiving-an-entity-as-parameter) and [this example](#request-receiving-an-entity-selection-as-parameter). + + +### Scalar value parameter + +Parameter(s) must simply be enclosed in a collection defined in the body. For example, with a dataclass function `getCities()` receiving text parameters: +`/rest/City/getCities` + +**Parameters in body:** ["Aguada","Paris"] + +All JSON data types are supported in parameters, including JSON pointers. Dates can be passed as strings in ISO 8601 date format (e.g. "2020-08-22T22:00:000Z"). + + +### Entity parameter + +Entities passed in parameters are referenced on the server through their key (*i.e.* __KEY property). If the key parameter is omitted in a request, a new entity is loaded in memory the server. +You can also pass values for any attributes of the entity. These values will automatically be used for the entity handled on the server. + +> If the request sends modified attribute values for an existing entity on the server, the called ORDA data model function will be automatically executed on the server with modified values. This feature allows you, for example, to check the result of an operation on an entity, after applying all business rules, from the client application. You can then decide to save or not the entity on the server. + + +|Properties|Type|Description| +|---|---|---| +|Attributes of the entity|mixed|Optional - Values to modify| +|__DATACLASS|String|Mandatory - Indicates the Dataclass of the entity| +|__ENTITY|Boolean|Mandatory - True to indicate to the server that the parameter is an entity| +|__KEY|mixed (same type as the primary key)|Optional - Primary key of the entity| + +- If __KEY is not provided, a new entity is created on the server with the given attributes. +- If __KEY is provided, the entity corresponding to __KEY is loaded on the server with the given attributes + +See examples for [creating](#creating-an-entity) or [updating](#updating-an-entity) entities. + +#### Related entity parameter + +Same properties as for an [entity parameter](#entity-parameter). In addition, the related entity must exist and is referenced by __KEY containing its primary key. + +See examples for [creating](#creating-an-entity-with-a-related-entity) or [updating](#updating-an-entity-with-a-related-entity) entities with related entities. + + +### Entity selection parameter + +The entity selection must have been defined beforehand using [$method=entityset]($method.md#methodentityset). + +> If the request sends a modified entity selection to the server, the called ORDA data model function will be automatically executed on the server with the modified entity selection. + + +|Properties|Type|Description| +|---|---|---| +|Attributes of the entity|mixed|Optional - Values to modify| +|__DATASET|String|Mandatory - entitySetID (UUID) of the entity selection| +|__ENTITIES|Boolean|Mandatory - True to indicate to the server that the parameter is an entity selection| + +See example for [receiving an entity selection](#receiving-an-entity-selection-as-parameter). + + +## Request examples + +This database is exposed as a remote datastore on localhost (port 8111): + +![alt-text](assets/en/REST/ordastructure.png) + +### Using a datastore class function + +The US_Cities `DataStore` class provides an API: + +``` +// DataStore class + +Class extends DataStoreImplementation + +exposed Function getName() + $0:="US cities and zip codes manager" +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/$catalog/getName` + +#### Result + +``` +{ +"result": "US cities and zip codes manager" +} +``` + +### Using a dataclass class function + +The Dataclass class `City` provides an API that returns a city entity from a name passed in parameter: + +``` +// City class + +Class extends DataClass + +exposed Function getCity() + var $0 : cs.CityEntity + var $1,$nameParam : text + $nameParam:=$1 + $0:=This.query("name = :1";$nameParam).first() +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getCity` + +Body of the request: ["Aguada"] + +#### Result + +The result is an entity: +``` +{ + "__entityModel": "City", + "__DATACLASS": "City", + "__KEY": "1", + "__TIMESTAMP": "2020-03-09T08:03:19.923Z", + "__STAMP": 1, + "ID": 1, + "name": "Aguada", + "countyFIPS": 72003, + "county": { + "__deferred": { + "uri": "/rest/County(72003)", + "__KEY": "72003" + } + }, + "zips": { + "__deferred": { + "uri": "/rest/City(1)/zips?$expand=zips" + } + } +} +``` + +### Using an entity class function + +The Entity class `CityEntity` provides an API: + +``` +// CityEntity class + +Class extends Entity + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City(2)/getPopulation` + +#### Result + +``` +{ + "result": 48814 +} +``` + + +### Using an entitySelection class function + +The EntitySelection class `CitySelection` provides an API: + +``` +// CitySelection class + +Class extends EntitySelection + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getPopulation/?$filter="ID<3"` + +#### Result + +``` +{ + "result": 87256 +} +``` + +### Using an entitySelection class function and an entitySet + +The `StudentsSelection` class has a `getAgeAverage` function: + +``` +// StudentsSelection Class + +Class extends EntitySelection + +exposed Function getAgeAverage + C_LONGINT($sum;$0) + C_OBJECT($s) + + $sum:=0 + For each ($s;This) + $sum:=$sum+$s.age() + End for each + $0:=$sum/This.length +``` + +Once you have created an entityset, you can run this request: + +**POST** `127.0.0.1:8044/rest/Students/getAgeAverage/$entityset/17E83633FFB54ECDBF947E5C620BB532` + +#### Result + +``` +{ + "result": 34 +} +``` + +### Using an entitySelection class function and an orderBy + +The `StudentsSelection` class has a `getLastSummary` function: + +``` +// StudentsSelection Class + + +Class extends EntitySelection + +exposed Function getLastSummary + C_TEXT($0) + C_OBJECT($last) + + $last:=This.last() + $0:=$last.firstname+" - "+$last.lastname+" is ... "+String($last.age()) +``` + +You can then run this request: + +**POST** `127.0.0.1:8044/rest/Students/getLastSummary/$entityset/?$filter="lastname=b@"&$orderby="lastname"` + + +#### Result + +``` +{ + "result": "Wilbert - Bull is ... 21" +} +``` + + +### Using an entity to be created on the server + + +The Dataclass class `Students` has the function `pushData()` receiving an entity containing data from the client. The `checkData()` method runs some controls. If they are OK, the entity is saved and returned. + +``` +// Students Class + +Class extends DataClass + +exposed Function pushData + var $1, $entity, $status, $0 : Object + + $entity:=$1 + + $status:=checkData($entity) // $status is an object with a success boolean property + + $0:=$status + + If ($status.success) + $status:=$entity.save() + If ($status.success) + $0:=$entity + End if + End if + +``` + +You run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: + +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"Ann", +"lastname":"Brown" +}] +``` + +Since no `__KEY` is given, a new Students entity is loaded on the server **with the attributes received from the client**. Because the `pushData()` function runs a `save()` action, the new entity is created. + + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T10:54:41.805Z", + "__STAMP": 1, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWN", + "schoolID": null, + "school": null +} +``` + +### Using an entity to be updated on the server + +Same as above but with a __KEY attribute + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"lastname":"Brownie", +"__KEY":55 +}] +``` + +Since `__KEY` is given, the Students entity with primary key 55 is loaded **with the lastname value received from the client**. Because the function runs a `save()` action, the entity is updated. + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T11:10:21.679Z", + "__STAMP": 3, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWNIE", + "schoolID": null, + "school": null +} +``` + +### Creating an entity with a related entity + +In this example, we create a new Students entity with the Schools entity having primary key 2. + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"John", +"lastname":"Smith", +"school":{"__KEY":2} +}] +``` + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "56", + "__TIMESTAMP": "2020-06-16T11:16:47.601Z", + "__STAMP": 1, + "ID": 56, + "firstname": "John", + "lastname": "SMITH", + "schoolID": 2, + "school": { + "__deferred": { + "uri": "/rest/Schools(2)", + "__KEY": "2" + } + } +} +``` + + +### Updating an entity with a related entity + +In this example, we associate an existing school to a Students entity. The `StudentsEntity` class has an API: + +``` +// StudentsEntity class + +Class extends Entity + +exposed Function putToSchool() + var $1, $school , $0, $status : Object + + //$1 is a Schools entity + $school:=$1 + //Associate the related entity school to the current Students entity + This.school:=$school + + $status:=This.save() + + $0:=$status +``` + +You run this request, called on a Students entity : +**POST** `http://127.0.0.1:8044/rest/Students(1)/putToSchool` +Body of the request: +``` +[{ +"__DATACLASS":"Schools", +"__ENTITY":true, +"__KEY":2 +}] +``` + +#### Result + +``` +{ + "result": { + "success": true + } +} +``` + + +### Receiving an entity selection as parameter + +In the `Students` Dataclass class, the `setFinalExam()` function updates a received entity selection ($1). It actually updates the *finalExam* attribute with the received value ($2). It returns the primary keys of the updated entities. + +``` +// Students class + +Class extends DataClass + +exposed Function setFinalExam() + + var $1, $es, $student, $status : Object + var $2, $examResult : Text + + var $keys, $0 : Collection + + //Entity selection + $es:=$1 + + $examResult:=$2 + + $keys:=New collection() + + //Loop on the entity selection + For each ($student;$es) + $student.finalExam:=$examResult + $status:=$student.save() + If ($status.success) + $keys.push($student.ID) + End if + End for each + + $0:=$keys +``` + +An entity set is first created with this request: + +`http://127.0.0.1:8044/rest/Students/?$filter="ID<3"&$method=entityset` + +Then you can run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/setFinalExam` + +Body of the request: + +``` +[ +{ +"__ENTITIES":true, +"__DATASET":"9B9C053A111E4A288E9C1E48965FE671" +}, +"Passed" +] + +``` + +#### Result + +The entities with primary keys 1 and 2 have been updated. + +``` +{ + "result": [ + 1, + 2 + ] +} +``` + +### Using an entity selection updated on the client + +Using the `getAgeAverage()` function [defined above](#using-an-entityselection-class-function-and-an-entityset). + +```4d +var $remoteDS, $newStudent, $students : Object +var $ageAverage : Integer + +$remoteDS:=Open datastore(New object("hostname";"127.0.0.1:8044");"students") + +// $newStudent is a student entity to procees +$newStudent:=... +$students:=$remoteDS.Students.query("school.name = :1";"Math school") +// We add an entity to the $students entity selection on the client +$students.add($newStudent) + +// We call a function on the StudentsSelection class returning the age average of the students in the entity selection +// The function is executed on the server on the updated $students entity selection which included the student added from the client +$ageAverage:=$students.getAgeAverage() +``` \ No newline at end of file diff --git a/docs/REST/REST_requests.md b/docs/REST/REST_requests.md index c725999e4a85e0..9e5a6062f5e5dd 100644 --- a/docs/REST/REST_requests.md +++ b/docs/REST/REST_requests.md @@ -6,21 +6,14 @@ title: About REST Requests The following structures are supported for REST requests: -|URI |Resource |{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)| -| | | |[$entityset/{entitySetID}](entityset.html#entitysetentitysetid)| -| | | |[?$filter]($filter.md)| -| | | [{attribute}](manData.html#selecting-attributes-to-get)/|[?$compute]($compute.md)| -| |[{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)/| [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | -| |[{dataClass}:{attribute}(value)](%7BdataClass%7D%7Battribute%7D_value.html)| | | -| |[$catalog]($catalog.md)| | | -| |[$directory]($directory.md)| | | -| |[$info]($info.md)| | | - - -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. +|URI |Resource (Input)| /? or &{filter} (Output)| +|---|---|---| +|http://{servername}:{port}/rest/ |[{dataClass}](%7BdataClass%7D.html)|[$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)...| +| |[{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid)|[$method=...]($method.md)| +| |[{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)|[$attributes]($attributes.md)| +| |[{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue)|| + +While all REST requests must contain the URI and Resource parameters, the Output (which filters the data returned) is optional. As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. For example: @@ -28,7 +21,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/authUsers.md b/docs/REST/authUsers.md index 8a2d2244ca781e..5d2dafadfe3161 100644 --- a/docs/REST/authUsers.md +++ b/docs/REST/authUsers.md @@ -3,87 +3,112 @@ id: authUsers title: Users and sessions --- - -## Authenticating users +REST requests can benefit from [web user sessions](WebServer/sessions.md), providing extra features such as multiple requests handling, data sharing between the web client processes, and user privileges. As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. -You log in a user to your application by passing the user's name and password to [`$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. - -The session will automatically be closed once the timeout is reached. -## Session cookie - -Each REST request is handled through a specific session on the 4D server. +## Authenticating users -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: +You log in a user to your application by calling [`$directory/login`]($directory.md#directorylogin) in a POST request including the user's name and password in the header. This request calls the `On REST Authentication` database method (if it exists), where you can check the user's credentials (see example below). + +## Opening sessions + +When [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions) (recommended), if the `On REST Authentication` database method returns `true`, a user session is then automatically opened and you can handle it through the `Session` object and the [Session API](API/SessionClass.md). Subsequent REST requests will reuse the same session cookie. + +If the `On REST Authentication` database method has not been defined, a `guest` session is opened. + + +## Example + +In this example, the user enters their email and password in an html page that requests [`$directory/login`]($directory.md#directorylogin) in a POST (it is recommended to use an HTTPS connection to send the html page). The `On REST Authentication` database method is called to validate the credentials and to set the session. + +The HTML login page: + +![alt-text](assets/en/REST/login.png) + + +```html + + +

    +
    +Email:
    +Password:
    + + +
    +
    + + ``` -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. -### Example - -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. +When the login page is sent to the server, the `On REST Authentication` database method is called: ```4d -// Creating headers -ARRAY TEXT(headerNames;0) -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(headerValues;"60") -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" -$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 -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;*) + //On REST Authentication + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + //A '/rest' URL has been called with headers username-4D and password-4D +If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if ``` -```4d -// buildHeader project method - -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> As soon as it has been called and returned `True`, the `On REST Authentication` database method is no longer called in the session. -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +The `fillSession` project method initializes the user session, for example: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use ``` - - - diff --git a/docs/REST/configuration.md b/docs/REST/configuration.md index d5bdc73fc5a3a5..64be12d18140d9 100644 --- a/docs/REST/configuration.md +++ b/docs/REST/configuration.md @@ -3,19 +3,19 @@ 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. +Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your application directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. To start using the REST features, you need to start and configure the 4D REST server. > - 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. +> - On 4D single-user, you can open up to three REST sessions for testing purposes. +> - You need to manage the [session](authUsers.md) for your requesting application. ## 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. +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 structure settings in order for REST requests to be processed. ![alt-text](assets/en/REST/Settings.png) @@ -29,29 +29,29 @@ The warning message "Caution, check the access privileges" is displayed when you By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. 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; +- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Structure 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. +> 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 Structure Settings is ignored. -### Using the Database settings +### Using the Structure Settings -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. +The **Read/Write** menu in the "Web/REST resource" page of the structure settings specifies a group of 4D users that is authorized to establish the link to the 4D application using REST queries. -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. +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. -> 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. +> 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 Structure 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. +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 application 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 -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: +Once REST services are enabled in the 4D application, by default a REST session can access all tables and fields of the 4D database through the [datastore interface](ORDA/dsMapping.md#datastore). Thus, it can 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" 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/gettingStarted.md b/docs/REST/gettingStarted.md index db5dd7ed88a6d4..3ff363dce27130 100644 --- a/docs/REST/gettingStarted.md +++ b/docs/REST/gettingStarted.md @@ -3,21 +3,21 @@ id: gettingStarted title: Getting Started --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D provides you with a powerful REST server, that allows direct access to data stored in your 4D applications. -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). +The REST server is included in 4D and 4D Server, it is automatically available in your 4D applications [once it is configured](configuration.md). This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +- create and configure a basic 4D application project +- access data from the 4D project through REST using a standard browser. -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. +To keep the example simple, we’re going to use 4D 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 +## Creating and configuring the 4D project -1. Launch your 4D or 4D Server application and create a new database. You can name it "Emp4D", for example. +1. Launch your 4D or 4D Server application and create a new project. You can name it "Emp4D", for example. 2. In the Structure editor, create an [Employees] table and add the following fields to it: - Lastname (Alpha) @@ -32,7 +32,7 @@ To keep the example simple, we’re going to use a 4D application and a browser ![](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. +4. Display the **Web/REST resource** page of the 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**. @@ -135,4 +135,4 @@ You have many possibilities to filter data to receive. For example, to get only } ``` -The 4D [REST API](REST_requests.md) provides various commands to interact with the 4D database. +The 4D [REST API](REST_requests.md) provides various commands to interact with the 4D applications. diff --git a/docs/REST/manData.md b/docs/REST/manData.md index 3ffb14c9874849..36493d5e22bce6 100644 --- a/docs/REST/manData.md +++ b/docs/REST/manData.md @@ -3,7 +3,7 @@ id: manData title: Manipulating Data --- -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. +All [exposed dataclasses, attributes](configuration.md#exposing-tables-and-fields) and [functions](ClassFunctions.md) can be accessed through REST. Dataclass, attribute, and function names are case-sensitive; however, the data for queries is not. ## Querying data @@ -18,11 +18,11 @@ 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 [class function](ClassFunctions.md#function-calls) that returns an entity selection (or a collection). -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). +Before returning a selection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). ## Navigating data @@ -62,47 +62,24 @@ By using [`$compute`]($compute.md), you can compute the **average**, **count**, 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: `/rest/Employee/salary/?$compute=$all` -## Getting data from methods +## Calling Data model class functions -You can call 4D project methods that are [exposed as REST Service](%7BdataClass%7D.html#4d-configuration). A 4D method can return in $0: +You can call ORDA Data Model [user class functions](ClassFunctions.md) through POST requests, so that you can benefit from the exposed API of the targeted application. For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: -- an object -- a collection +`/rest/City/getCity` -The following example is a dataclass method that reveives parameters and returns an object: +with data in the body of the request: `["Paris"]` -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$lastname:=$2 -$0:=ds.Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() -``` +> Calls to 4D project methods that are exposed as REST Service are still supported but are deprecated. -The method properties are configured accordingly on the 4D project side: - -![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: - -```4d -C_TEXT($content) -C_OBJECT($response) - -$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 @@ -132,7 +109,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/` @@ -198,6 +175,7 @@ The following requests returns only the first name and last name from the People #### 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/` @@ -244,7 +222,7 @@ The following request returns only the first name and last name attributes from 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 + `GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer` ## Viewing an image attribute diff --git a/docs/REST/{dataClass}.md b/docs/REST/{dataClass}.md index aaa7d4d52ae319..f372b1d66c248e 100644 --- a/docs/REST/{dataClass}.md +++ b/docs/REST/{dataClass}.md @@ -5,7 +5,7 @@ title: {dataClass} -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +Dataclass names can be used directly in the REST requests to work with entities and entity selections, or class functions of the dataclass. ## Available syntaxes @@ -14,9 +14,11 @@ Dataclass names can be used directly in the REST requests to work with entities, |[**{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}/{DataClassClassFunction}**](ClassFunctions.md#function-calls)|`/City/getCity`|Executes a dataclass class function | +|[**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls)|`/City/getPopulation/?$filter="ID<3"`|Executes an entity selection class function| +|[**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls)|`City(2)/getPopulation`|Executes an entity class function| +> Function calls are detailed in the [Calling ORDA class functions](ClassFunctions.md) section. @@ -32,8 +34,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 +44,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 +56,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,9 +146,9 @@ 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). +For more information about the data returned, refer to [{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: @@ -158,7 +160,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)` @@ -211,133 +213,3 @@ The following request returns all the public data of the employee named "Jones". `GET /rest/Employee:lastname(Jones)` - -## {dataClass}/{method} and {dataClass}({key})/{method} - -Returns an object or a collection based on a project method. - -### Description - -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 - -![alt-text](assets/en/REST/MethodProp.png) - - -### Passing Parameters to a Method - -You can also pass parameters to a method in a POST. - -`POST /rest/Employee/addEmployee` - -You can POST data in the body part of the request, for example: - -["John","Smith"] - - - - -### Examples - -#### Table scope - -Call of a `getAverage` method: -- on [Employee] table -- with **Table** scope - - -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` - -`POST /rest/Employee/getAverage` - -Result: -``` -{ - "result": { - "ageAverage": 44.125 - } -} -``` - - - -#### Current record scope - -Call of a `getFullName` method: -- on [Employee] table -- with **Current record** scope - -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` - -`POST /rest/Employee(3)/getFullName` - -Result: -``` -{ - "result": { - "fullName": "John Smith" - } -} -``` - - - -#### Current selection scope - -Call of a `updateSalary` method: -- on [Employee] table -- with **Current selection** scope - -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` - -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` - -POST data (in the request body): -[1.5] - -Result: -``` -{ - "result": { - "updated": 42 - } -} -``` - diff --git a/docs/Tags/tags.md b/docs/Tags/tags.md new file mode 100644 index 00000000000000..2f25038b4cd6ad --- /dev/null +++ b/docs/Tags/tags.md @@ -0,0 +1,766 @@ +--- +id: tags +title: Transformation tags +--- + +4D provides a set of transformation tags which allow you to insert references to 4D variables or expressions, or to perform different types of processing within a source text, referred to as a "template". These tags are interpreted when the source text is executed and generate an output text. + +This principle is used in particular by the 4D Web server to build [web template pages](WebServer/templates.md). + +These tags are generally be inserted as HTML type comments (``) but an [xml-compliant alternative syntax](#alternative-syntax-for-4dtext-4dhtml-4deval) is available for some of them. + +It is possible to mix several types of tags. For example, the following HTML structure is entirely feasible: + +```html + + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + (Loop on the current selection) + (If [TABLE]ValNum>10) + (Subpage insertion) + (Else) + Value:
    (Field display) + + ](End for) + + +``` + + + +## Principles for using tags + +### Parsing + +Parsing the contents of a *template* source is done in two contexts: + +- Using the `PROCESS 4D TAGS` command; this command accepts a *template* as input, as well as optional parameters and returns a text resulting from the processing. + +- Using 4D's integrated HTTP server: [template pages](WebServer/templates.md) sent by means of the `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB), `WEB SEND TEXT` commands, or called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to parse HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, http://www.server.com/dir/page.shtm). + + +### Recursive processing + +4D tags are interpreted recursively: 4D always attempts to reinterpret the result of a transformation and, if a new transformation has taken place, an additional interpretation is performed, and so on until the product obtained no longer requires any further transformation. For example, given the following statement: + +```html + +``` + +If the `[Mail]Letter_type` text field itself contains a tag, for example ``, this tag will be evaluated recursively after the interpretation of the 4DHTML tag. + +This powerful principle meets most needs related to text transformation. Note, however, that in some cases this can also allow malicious code to be inserted in the web context, [which can be avoided](WebServer/templates.md#prevention-of-malicious-code-insertion). + + +### Identifiers with tokens + +To ensure the correct evaluation of expressions processed via tags, regardless of the language or 4D version, it's recommended to use the tokenized syntax for elements whose name may vary over versions (commands, tables, fields, constants). For example, to insert the `Current time` command, enter `Current time:C178`. + +### Using the "." as decimal separator + +4D always uses the period character (.) as a decimal separator when evaluating a numerical expression using a 4D tag `4DTEXT`, `4DHTML`, and `4DEVAL`. Regional settings are ignored. This feature facilitates code maintenance and compatibility between 4D languages and versions. + + +## 4DBASE + +#### Syntax: `` + +The `` tag designates the working directory to be used by the `` tag. + +When it is called in a Web page, the `` tag modifies all subsequent `` calls on this page, until the next `, if any. If the `` folder is modified from within an included file, it retrieves its original value from the parent file. + +The *folderPath* parameter must contain a pathname relative to the current page and it must end with a slash (/). The designated folder must be located inside the Web folder. + +Pass the "WEBFOLDER" keyword to restore the default path (relative to the page). + +The following code, which must specify a relative path for each call: + +```html + + + + + +``` +... is equivalent to: + +```html + + + + + + + + +``` + +For example, to set a directory for the home page: + +```html +/* Index.html */ + + + + + + + + +``` + +In the "head.html" file, the current folder is modified through ``, without this changing its value in "Index.html": + +```html +/* Head.htm */ +/* the working directory here is relative to the included file (FR/ or US/) */ + + + + + + +``` + + +## 4DCODE + +#### Syntax: `` + +The `4DCODE` tag allows you to insert a multi-line 4D code block in a template. + +When a `` sequence. The code block itself can contain carriage returns, line feeds, or both; it will be interpreted sequentially by 4D. + +For example, you can write in a template: + +```html + +``` + + +Here are the 4DCODE tag features: + +- The `TRACE` command is supported and activates the 4D debugger, thus allowing you to debug your template code. +- Any error will display the standard error dialog that lets the user stop code execution or enter debugging mode. +- The text in between `` is split into lines accepting any line-ending convention (cr, lf, or crlf). +- The text is tokenized within the context of the database that called `PROCESS 4D TAGS`. This is important for recognition of project methods for example. The [Available through tags and 4D URLs (4DACTION ...)](WebServer/allowProject.md) method property is not taken into account. +- Even if the text always uses English-US, it is recommended to use the token syntax (:Cxxx) for command and constant names to protect against potential problems due to commands or constants being renamed from one version of 4D to another. + +> The fact that 4DCODE tags can call any of the 4D language commands or project methods could be seen as a security issue, especially when the database is available through HTTP. However, since it executes server-side code called from your own template files, the tag itself does not represent a security issue. In this context, as for any Web server, security is mainly handled at the level of remote accesses to server files. + + +## 4DEACH and 4DENDEACH + +#### Syntax: `` `` + +The `` comment allows iterating a specified item over all values of the *expression*. The item is set to a *variable* whose type depends on the *expression* type. + +The `` comment can iterate through three expression types: + +- [collections](#--4deach-item-in-collection--): loop through each element of the collection, +- [entity selections](#--4deach-entity-in-entityselection--): loop through each entity, +- [objects](#--4deach-property-in-object--): loop through each object property. + +The number of iterations 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. + + +### `` + +This syntax iterates on each *item* of the *collection*. The code portion located between `` and `` is repeated for each collection element. + +The *item* parameter is a variable of the same type as the collection elements. + +The collection must contain only **elements of the same type**, otherwise an error is returned as soon as the *item* variable is assigned the first mismatched value type. + +The number of loops is based on the number of elements of the collection. At each iteration, the *item* variable is automatically filled with the matching element of the collection. The following points must be taken into account: + +- If the *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 *item* variable gets the same type as the first collection element. If any collection element 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 is generated if the *item* variable type does not support Null values (such as longint variables). + +#### Example with a collection of scalar values + +*getNames* returns a collection of strings. The method has been declared as "[available through 4D tags and URLs](WebServer/allowProject.md)". + + +```html + + + + + + + + + +
    Name
    +``` + +#### Example with a collection of objects + +*getSalesPersons* returns a collection of objects. + +```html + + + + + + + + + + + +
    IDFirstnameLastname
    +``` + + +### `` + +This syntax iterates on each *entity* of the *entitySelection*. The code portion located between `` and `` is repeated for each entity of the entity selection. + +The *entity* parameter is an object variable of the entity selection class. + + +The number of loops is based on the number of entities of the entity selection. At each iteration, the *entity* object variable is automatically filled with the matching entity of the entity selection. + +#### Example with a html table + +```html + + + + + + + + + + + +
    IDNameTotal purchase
    +``` + +#### Example with `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +This syntax iterates on each *property* of the *object*. The code portion located between `` and `` is repeated for each property of the object. + +The *property* parameter is a text variable automatically filled with the name of the currently processed property. + +The properties of the object are processed according to their creation order. 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. + +#### Example with the properties of an object + +*getGamers* is a project method that returns an object like ("Mary"; 10; "Ann"; 20; "John"; 40) to figure gamer scores. + +```html + + + + + + + + + + + +
    GamersScores
    +``` + + + + +## 4DEVAL + +#### Syntax: `` +#### Alternative syntax: `$4DEVAL(expression)` + +The `4DEVAL` tag allows you to assess a 4D variable or expression. Like the [`4DHTML`](#4dhtml) tag, `4DEVAL` does not escape HTML characters when returning text. However, unlike `4DHTML` or [`4DTEXT`](#4dtext), `4DEVAL` allows you to execute any valid 4D statement, including assignments and expressions that do not return any value. + +For example, you can execute: + +``` + $input:="" //assignment + $input:=$input+"" //calculation + PROCESS 4D TAGS($input;$output) + //$output = "43" +``` + +In case of an error during interpretation, the text inserted will be in the form: `: ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DHTML + +#### Syntax: `` +#### Alternative syntax: `$4DHTML(expression)` + + +Just like the `4DTEXT` tag, this tag lets you assess a 4D variable or expression that returns a value, and insert it as an HTML expression. Unlike the `4DTEXT` tag, this tag does not escape HTML special characters (e.g. ">"). + +For example, here are the processing results of the 4D text variable myvar with the available tags: + +|myvar Value|Tags|Result| +|---|---|---| +|`myvar:=""`|``|`<B>`| +|`myvar:=""`|``|``| + +In case of an interpretation error, the inserted text will be ` : ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DIF, 4DELSE, 4DELSEIF and 4DENDIF + +#### Syntax: `` {`...`} {``} `` + +Used with the `` (optional), `` (optional) and `` comments, the `` comment offers the possibility to execute portions of code conditionally. + +The *expression* parameter can contain any valid 4D expression returning a Boolean value. It must be indicated within parenthesis and comply with the 4D syntax rules. + +The `` ... `` blocks can be nested in several levels. Like in 4D, each `` must match a ``. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. Likewise, if there are not as many `` as ``, the text "``: 4DENDIF expected" is inserted instead of the contents located between `` and ``. + +Using the `` tag, you can test an unlimited number of conditions. Only the code that follows the first condition evaluated as `True` is executed. If no conditions are true, no statement is executed (if there is no final ``). +You can use a tag after the last . If all the conditions are false, the statements following the are executed. + +The two following codes are equivalent. + +Code using 4DELSE only: + +```html + + /* Condition1 is true*/ + + + /* Condition2 is true*/ + + + /* Condition3 is true */ + + /*None of the conditions are true*/ + + + +``` + +Similar code using the `4DELSEIF` tag: + +``` + + /* Condition1 is true*/ + + /* Condition2 is true*/ + + /* Condition3 is true */ + + /* None of the conditions are true*/ + +``` + +This example of code inserted in a static HTML page displays a different label according the `vname#""` expression result: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +This example inserts different pages depending on which user is connected: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### Syntax: `` + +This tag is mainly designed to include an HTML page (indicated by the *path* parameter) in another HTML page. By default, only the body of the specified HTML page, i.e. the contents found within the `` and `` tags, is included (the tags themselves are not included). This lets you avoid conflicts related to meta tags present in the headers. + +However, if the HTML page specified does not contain ```` tags, the entire page is included. It is up to you to verify the consistency of the meta tags. + +The `` comment is very useful for tests (``) or loops (``). It is very convenient to include banners according to a criteria or randomly. +When including, regardless of the file name extension, 4D analyzes the called page and then inserts the contents (modified or not) in the page originating the `4DINCLUDE` call. + +An included page with the `` comment is loaded in the Web server cache the same way as pages called via a URL or sent with the `WEB SEND FILE` command. + +In *path*, put the path leading to the document to include. Warning: In the case of a `4DINCLUDE` call, the path is relative to the document being analyzed, that is, the "parent" document. Use the slash character (/) as a folder separator and the two dots (..) to go up one level (HTML syntax). When you use the `4DINCLUDE` tag with the `PROCESS 4D TAGS` command, the default folder is the project folder. + +> You can modify the default folder used by the `4DINCLUDE` tag in the current page, using the `` tag (see below). + +The number of `` within a page is unlimited. However, the `` calls can be made only at one level. This means that, for example, you cannot insert `` in the *mydoc2.html* body page, which is called by `` inserted in *mydoc1.html*. Furthermore, 4D verifies that inclusions are not recursive. + +In case of error, the inserted text is "`` :The document cannot be opened". + +Examples: + +```html + + + +``` + + + +## 4DLOOP and 4DENDLOOP + +#### Syntax: `` `` + +This comment allows repetition of a portion of code as long as the condition is fulfilled. The portion is delimited by `` and ``. + +The `` ... `` blocks can be nested. Like in 4D, each `` must match a ``. + +There are five kinds of conditions: + +### `` + +This syntax makes a loop for each record from the table current selection in the current process. The code portion located between the two comments is repeated for each current selection record. + +> When the `4DLOOP` tag is used with a table, records are loaded in "Read only" mode. + +The following code: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +This syntax makes a loop for each array item. The array current item is increased when each code portion is repeated. + +> This syntax cannot be used with two dimension arrays. In this case, it is better to combine a method with nested loops. + +The following code example: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +This syntax makes a loop as long as the method returns `True`. The method takes a Long Integer parameter type. First it is called with the value 0 to allow an initialization stage (if necessary); it is then called with the values 1 ,then 2, then 3 and so on, as long as it returns `True`. + +For security reasons, within a Web process, the `On Web Authentication` database method can be called once just before the initialization stage (method execution with 0 as parameter). If the authentication is OK, the initialization stage will proceed. + +`C_BOOLEAN($0)` and `C_LONGINT($1)` MUST be declared within the method for compilation purposes. + +The following code example: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +The `my_method` method can be as follows: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +With this syntax, the `4DLOOP` tag makes a loop as long as the *expression* returns `True`. The expression can be any valid Boolean expression and must contain a variable part to be evaluated in each loop to avoid infinite loops. + +For example, the following code: + +```html + + + + + +``` + +...produces the following result: + +``` +0 +1 +2 +3 +``` + +### `` + +In this case, the `4DLOOP` tag works like it does with an array: it makes a loop for each element of the array referenced by the pointer. The current array element is increased each time the portion of code is repeated. + +This syntax is useful when you pass an array pointer as a parameter to the `PROCESS 4D TAGS` command. + +Example: + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +In case of an interpretation error, the text "``: description" is inserted instead of the contents located between `` and ``. + +The following messages can be displayed: + +- Unexpected expression type (standard error); +- Incorrect table name (error on the table name); +- An array was expected (the variable is not an array or is a two dimension array); +- The method does not exist; +- Syntax error (when the method is executing); +- Access error (you do not have the appropriate access privileges to access the table or the method). +- 4DENDLOOP expected (the `` number does not match the ``). + +## 4DSCRIPT/ + +#### Syntax: `` + +The `4DSCRIPT` tag allows you to execute 4D methods when processing the template. The presence of the `` tag as an HTML comment launches the execution of the `MyMethod` method with the `Param` parameter as a string in `$1`. + +> If the tag is called in the context of a Web process, when the page is loaded, 4D calls the `On Web Authentication` database method (if it exists). If it returns True, 4D executes the method. + +The method must return text in `$0`. If the string starts with the code character 1, it is considered as HTML (the same principle is true for the `4DHTML` tag). + +For example, let’s say that you insert the following comment `“Today is â€` into a template Web page. When loading the page, 4D calls the `On Web Authentication` database method, then calls the `MYMETH` method and passes the string “/MYPARAM†as the parameter `$1`. The method returns text in $0 (for example "12/31/21"); the expression "`Today is ` comments as you want in a template. + + + +## 4DTEXT + +#### Syntax: `` +#### Alternative syntax: `$4DTEXT(expression)` + + +The tag `` allows you to insert a reference to a 4D variable or expression returning a value. For example, if you write (in an HTML page): + +```html +

    Welcome to !

    +``` + +The value of the 4D variable `vtSiteName` will be inserted in the HTML page when it is sent. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +You can also insert 4D expressions. You can for example directly insert the contents of a field (``), an array element (``) or a method returning a value (``). The expression conversion follows the same rules as the variable ones. Moreover, the expression must comply with 4D syntax rules. + +> For security reasons, it is recommended to use this tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + +In case of an evaluation error, the inserted text will appear as ` : ## error # error code`. + +- You must use process variables. +- You can display the content of a picture field. However, it is not possible to display the content of a picture array item. +- It is possible to display the contents of an object field by means of a 4D formula. For example, you can write ``. +- You will usually work with Text variables. However, you can also use BLOB variables. You just need to generate BLOBs in `Text without length` mode. + + + + + + +## Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL + +Several existing 4D transformation tags can be expressed using a $-based syntax: + +#### $4dtag (expression) +can be used instead of +#### `` + +This alternative syntax is available only for tags used to return processed values: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(Other tags, such as 4DIF or 4DSCRIPT, must be written with the regular syntax). + +For example, you can write: + +```html +$4DEVAL(UserName) +``` + +instead of: + +```html + +``` + +The main advantage of this syntax is that it allows you to write XML-compliant templates. Some 4D developers need to create and validate XML-based templates using standard XML parser tools. Since the "<" character is invalid in an XML attribute value, it was not possible to use the "``" syntax of 4D tags without breaking the document syntax. On the other hand, escaping the "<" character will prevent 4D from interpreting the tags correctly. + +For example, the following code would cause an XML parsing error because of the first "<" character in the attribute value: + +```xml + +``` + +Using the $ syntax, the following code is validated by the parser: + +```xml + +``` + +Note that `$4dtag` and `<--#4dtag -->` are not strictly equivalent: unlike `<--#4dtag -->`, `$4dtag` processing does not interpret 4D tags [recursively](#recursive-processing). `$` tags are always evaluated once and the result is considered as plain text. + +The reason for this difference is to prevent malicious code injection. As [explained below](#prevention-of-malicious-code-insertion), it is strongly recommended to use `4DTEXT` tags instead of `4DHTML` tags when handling user text to protect against unwanted reinterpretation of tags: with `4DTEXT`, special characters such as "<" are escaped, thus any 4D tags using the `` syntax will lose their particular meaning. However, since `4DTEXT` does not escape the `$` symbol, we decided to break support for recursion in order to prevent malicious injection using the `$4dtag (expression)` syntax. + +The following examples show the result of processing depending on the syntax and tag used: + +```4d + // example 1 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //4D will quit! +``` +```4d + // example 2 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: " +``` +```4d + // example 3 + myName:="$4DEVAL(QUIT 4D)" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: $4DEVAL(QUIT 4D)" +``` + +Note that the `$4dtag` syntax supports matching pairs of enclosed quotes or parenthesis. For example, suppose that you need to evaluate the following complex (unrealistic) string: + +``` +String(1) + "\"(hello)\"" +``` + +You can write: + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + -->output is 1"(hello)" +``` + + diff --git a/docs/Users/handling_users_groups.md b/docs/Users/handling_users_groups.md index eb20c56b35c471..65507a035402e2 100644 --- a/docs/Users/handling_users_groups.md +++ b/docs/Users/handling_users_groups.md @@ -3,13 +3,15 @@ id: editing title: Managing 4D users and groups --- -## 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. -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. + +## Designer and Administrator + +The most powerful user is named **Designer**. No aspect of the application is closed to the Designer. The Designer can: -- access all database servers without restriction, +- access all application servers without restriction, - create users and groups, - assign access privileges to groups, - access the Design environment. @@ -25,12 +27,12 @@ The Administrator can: The Administrator cannot: - 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. +- by default, access to protected parts of the application. 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 application. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. -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: +Both the Designer and Administrator are available by default in all applications. 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. @@ -64,12 +66,12 @@ Right-click in the list of users and choose **Add** or **Duplicate** in the cont 4D adds a new user to the list, named "New userX" by default. 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. +This name will be used by the user to open the application. 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. 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. -> 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. +> Users can change their password at any time according to the options in the "Security" page of the structure settings, or using the `CHANGE PASSWORD` command. 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. @@ -78,6 +80,7 @@ The membership of users to different groups can also be set by group on the [Gro ### Deleting a user + 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) @@ -87,8 +90,7 @@ Deleted user names no longer appear in the Users editor. Note that the IDs for d - **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. +- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the application (optional). This method can be used for example to load the user preferences. ## Groups editor @@ -104,7 +106,7 @@ Keep in mind that once a group has been created, it cannot be deleted. If you wa 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. +4D displays the groups editor window. The list of groups displays all the groups of the application project. 2. Click on the ![](assets/en/Users/PlussNew.png) button located below the list of groups. OR @@ -136,7 +138,7 @@ To remove a user or group from another group, you just need to deselect the corr ### 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. +You can assign a group privileges to any plug-ins installed in the project. This includes all the 4D plug-ins and any third-party plug-ins. 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. @@ -151,7 +153,7 @@ The **4D Client Web Server** and **4D Client SOAP Server** items lets you contro ### 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. +The best way to ensure the security of your application 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. diff --git a/docs/Users/overview.md b/docs/Users/overview.md index 4f1ae170fc8738..d65a4ade720105 100644 --- a/docs/Users/overview.md +++ b/docs/Users/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -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. +If more than one person uses an application, 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 application or to application operations. > For an overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). @@ -13,9 +13,9 @@ If more than one person uses a database, which is usually the case in client-ser ## 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. +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 application. -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. +Groups can then be assigned access privileges to specific parts or features of the application (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: @@ -27,18 +27,18 @@ The following example shows Design and Runtime explorer access rights being assi 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. +Until you give the Designer a password, all application access are done with the Designer's access rights, even if you have set up users and groups (when the application opens, no ID is required). Any part of the application can be opened. -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. +When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the application, remote users must enter a password. To disable the password access system, you just need to remove the Designer password. ## 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: +In project applications (.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 with 4D Server. The following table lists the main users and groups features and their availability: -||4D Developer (single-user)|4D Server| +||4D (single-user)|4D Server| |---|---|---| |Adding/editing users and groups|yes|yes| |Assigning user/group access to servers|yes|yes| @@ -62,12 +62,12 @@ The editors for users and groups are located in the toolbox of 4D. These editors ## Directory.json file -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +Users, groups, as well as their access rights are stored in a specific project file named **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. +- in the user settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the application. +- 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 settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by an application upgrade. -> If users and groups management is not active, the directory.json is not created. +> If users and groups management is not active, the **directory.json** is not created. diff --git a/docs/WebServer/allowProject.md b/docs/WebServer/allowProject.md new file mode 100644 index 00000000000000..998ac269103b31 --- /dev/null +++ b/docs/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: Allowing project methods +--- + + +The 4D tags such as `4DEVAL`, `4DTEXT`, `4DHTML`... as well as the [`/4DACTION URL`](httpRequests.md#/4daction) allow you to trigger the execution of any project method of a 4D project published on the Web. For example, the request *http://www.server.com/4DACTION/login* causes the execution of the ***login*** project method, if it exists. + +This mechanism therefore presents a security risk for the application, in particular if an Internet user intentionally (or unintentionally) triggers a method not intended for execution via the web. You can avoid this risk in the following ways: + +* Filter the methods called via the URLS using the [`On Web Authentication`](authentication.md#on-web-authentication) database method. Drawbacks: If the database includes a great number of methods, this system may be difficult to manage. + +* Use the **Available through 4D tags and URLs (4DACTION...)** option found in the Method properties dialog box: + +![](assets/en/WebServer/methodProperties.png) + +This option is used to individually designate each project method that can be called using the `4DACTION` special URL, or the `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF` or `4DLOOP` tags. When it is not checked, the project method concerned cannot be directly executed through an HTTP request. Conversely, it can be executed using other types of calls (formulas, other methods, etc.). + +This option is unchecked by default. Methods that can be executed through `4DACTION` or specific tags must be specifically indicated. + +In the Explorer, Project methods with this property are given a specific icon: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/docs/WebServer/authentication.md b/docs/WebServer/authentication.md new file mode 100644 index 00000000000000..ba0d63693c718e --- /dev/null +++ b/docs/WebServer/authentication.md @@ -0,0 +1,207 @@ +--- +id: authentication +title: Authentication +--- + +Authenticating users is necessary when you want to provide specific access rights to web users. Authentication designates the way the information concerning the user credentials (usually name and password) are collected and processed. + + +## Authentication modes + +The 4D web server proposes three authentication modes, that you can select in the **Web**/**Options (I)** page of the Settings dialog box: + +![](assets/en/WebServer/authentication.png) + +> Using a **custom** authentication is recommended. + +### Overview + +The operation of the 4D web server's access system is summarized in the following diagram: + +![](assets/en/WebServer/serverAccess.png) + +> Requests starting with `rest/` are directly handled by the [REST server](REST/configuration.md). + + +### Custom (default) + +Basically in this mode, it's up to the developer to define how to authenticate users. 4D only evaluates HTTP requests [that require an authentication](#method-calls). + +This authentication mode is the most flexible because it allows you to: + +- either, delegate the user authentication to a third-party application (e.g. a social network, SSO); +- or, provide an interface to the user (e.g. a web form) so that they can create their account in your customer database; then, you can authenticate users with any custom algorithm (see [this example](sessions.md#example) from the "User sessions" chapter). The important thing is that you never store the password in clear, using such code: + +```4d +//... user account creation +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +See also [this example](gettingStarted.md#authenticating-users) from the "Getting started" chapter. + +If no custom authentication is provided, 4D calls the [`On Web Authentication`](#on-web-authentication) database method (if it exists). In addition to $1 and $2, only the IP addresses of the browser and the server ($3 and $4) are provided, the user name and password ($5 and $6) are empty. The method must return **True** in $0 if the user is successfully authenticated, then the resquested resource is served, or **False** in $0 if the authentication failed. + +> **Warning:** If the `On Web Authentication` database method does not exist, connections are automatically accepted (test mode). + + +### Basic protocol + +When a user connects to the server, a standard dialog box appears on their browser in order for them to enter their user name and password. + +> The name and password entered by the user are sent unencrypted in the HTTP request header. This mode typically requires HTTPS to provide confidentiality. + +Entered values are then evaluated: + +- If the **Include 4D passwords** option is checked, user credentials will be first evaluated against the [internal 4D users table](Users/overview.md). + - If the user name sent by the browser exists in the table of 4D users and the password is correct, the connection is accepted. If the password is incorrect, the connection is refused. + - If the user name does not exist in the table of 4D users, the [`On Web Authentication`](#on-web-authentication) database method is called. If the `On Web Authentication` database method does not exist, connections are rejected. + +- If the **Include 4D passwords** option is not checked, user credentials are sent to the [`On Web Authentication`](#on-web-authentication) database method along with the other connection parameters (IP address and port, URL...) so that you can process them. If the `On Web Authentication` database method does not exist, connections are rejected. + +>With the 4D Client web server, keep in mind that all the sites published by the 4D Client machines will share the same table of users. Validation of users/passwords is carried out by the 4D Server application. + +### DIGEST protocol + +This mode provides a greater level of security since the authentication information is processed by a one-way process called hashing which makes their contents impossible to decipher. + +As in BASIC mode, users must enter their name and password when they connect. The [`On Web Authentication`](#on-web-authentication) database method is then called. When the DIGEST mode is activated, the $6 parameter (password) is always returned empty. In fact, when using this mode, this information does not pass by the network as clear text (unencrypted). It is therefore imperative in this case to evaluate connection requests using the `WEB Validate digest` command. + +>You must restart the web server in order for the changes made to these parameters to be taken into account. + + + +## On Web Authentication + +The `On Web Authentication` database method is in charge of managing web server engine access. It is called by 4D or 4D Server when a dynamic HTTP request is received. + +### Database method calls + +The `On Web Authentication` database method is automatically called when a request or processing requires the execution of some 4D code (except for REST calls). It is also called when the web server receives an invalid static URL (for example, if the static page requested does not exist). + +The `On Web Authentication` database method is therefore called: + +- when the web server receives a URL requesting a resource that does not exist +- when the web server receives a URL beginning with `4DACTION/`, `4DCGI/`... +- when the web server receives a root access URL and no home page has been set in the Settings or by means of the `WEB SET HOME PAGE` command +- when the web server processes a tag executing code (e.g `4DSCRIPT`) in a semi-dynamic page. + +The `On Web Authentication` database method is NOT called: + +- when the web server receives a URL requesting a valid static page. +- when the web server reveives a URL beginning with `rest/` and the REST server is launched (in this case, the authentication is handled through the [`On REST Authentication` database method](REST/configuration.md#using-the-on-rest-authentication-database-method) or [Structure settings](REST/configuration.md#using-the-structure-settings)). + + +### Syntax + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +|Parameters|Type||Description| +|---|---|:---:|---| +|$1|Text|<-|URL | +|$2|Text|<-|HTTP headers + HTTP body (up to 32 kb limit) | +|$3|Text|<-|IP address of the web client (browser) | +|$4|Text|<-|IP address of the server | +|$5|Text|<-|User name | +|$6|Text|<-|Password | +|$0|Boolean|->|True = request accepted, False = request rejected| + +You must declare these parameters as follows: + +```4d +//On Web Authentication database method + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` + +>All the `On Web Authentication` database method's parameters are not necessarily filled in. The information received by the database method depends on the selected [authentication mode](#authentication-mode)). + + +#### $1 - URL + +The first parameter (`$1`) is the URL received by the server, from which the host address has been removed. + +Let’s take the example of an Intranet connection. Suppose that the IP address of your 4D Web Server machine is 123.45.67.89. The following table shows the values of $1 depending on the URL entered in the Web browser: + +|URL entered in web browser|Value of parameter $1| +|---|---| +|123.45.67.89|/ | +|http://123.45.67.89|/ | +|123.45.67.89/Customers|/Customers | +|http://123.45.67.89/Customers/Add|/Customers/Add | +|123.45.67.89/Do_This/If_OK/Do_That|/Do_This/If_OK/Do_That | + +#### $2 - Header and Body of the HTTP request + +The second parameter (`$2`) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Authentication` database method as it is. Its contents will vary depending on the nature of the web browser which is attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. + +>For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + +#### $3 - Web client IP address + +The `$3` parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. + +>4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + + +#### $4 - Server IP address + +The `$4` parameter receives the IP address used to call the web server. 4D allows for multi-homing, which allows you to exploit machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.md#ip-address-to-listen). + + +#### $5 and $6 - User Name and Password + +The `$5` and `$6` parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser. This dialog box appears for each connection, if [basic](#basic-protocol) or [digest](#digest-protocol) authentication is selected. + +>If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + +#### $0 parameter + +The `On Web Authentication` database method returns a boolean in $0: + +* If $0 is True, the connection is accepted. + +* If $0 is False, the connection is refused. + +The `On Web Connection` database method is only executed if the connection has been accepted by `On Web Authentication`. + +>**WARNING**
    If no value is set to $0 or if $0 is not defined in the `On Web Authentication` database method, the connection is considered as accepted and the `On Web Connection` database method is executed. + +>* Do not call any interface elements in the `On Web Authentication` database method (`ALERT`, `DIALOG`, etc.) because otherwise its execution will be interrupted and the connection refused. The same thing will happen if an error occurs during its processing. + + +### Example + +Example of the `On Web Authentication` database method in [DIGEST mode](#digest-protocol): + +```4d + // On Web Authentication Database Method + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // User is found + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // User does not exist + End if +``` diff --git a/docs/WebServer/errorPages.md b/docs/WebServer/errorPages.md new file mode 100644 index 00000000000000..1549495ea9b67b --- /dev/null +++ b/docs/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: Custom HTTP Error Pages +--- + +The 4D Web Server allows you to customize HTTP error pages sent to clients, based on the status code of the server response. Error pages refer to: + +* status codes starting with 4 (client errors), for example 404 + +* status codes starting with 5 (server errors), for example 501. + +For a full description of HTTP error status codes, you can refer to the [List of HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (Wikipedia). + + +## Replacing default pages + +To replace default 4D Web Server error pages with your own pages you just need to: + +* put custom HTML pages at the first level of the application's web folder, + +* name the custom pages "{statusCode}.html" (for example, "404.html"). + +You can define one error page per status code and/or a generic error page for a range of errors, named "{number}xx.html". For example, you can create "4xx.html" for generic client errors. The 4D Web Server will first look for a {statusCode}.html page then, if it does not exist, a generic page. + +For example, when an HTTP response returns a status code 404: + +1. 4D Web Server tries to send a "404.html" page located in the application's web folder. + +2. If it is not found, 4D Web Server tries to send a "4xx.html" page located in the application's web folder. + +3. If not found, 4D Web Server then uses its default error page. + +## Example + +If you define the following custom pages in your web folder: + +![](assets/en/WebServer/errorPage.png) + +* the "403.html" or "404.html" pages will be served when 403 or 404 HTTP responses are returned respectively, + +* the "4xx.html" page will be served for any other 4xx error status (400, 401, etc.), + +* the "5xx.html" page will be served for any 5xx error status. + diff --git a/docs/WebServer/gettingStarted.md b/docs/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..09ebac35a1a727 --- /dev/null +++ b/docs/WebServer/gettingStarted.md @@ -0,0 +1,286 @@ +--- +id: gettingStarted +title: Getting Started +--- + +This "Getting started" section is geared at first-time users who want an overall overview on how to go from zero to a 4D website that handles data from the database. Let's start! + + +## Hello World Example + +Let's start by making the web server send "Hello World" to the browser. The most simple way to do this is to create a project, start the web server and write a small code that returns a text in the `On Web Connection` database method. + +### Starting the web server + +To start the 4D web server: + +1. Launch your 4D application and create a new, empty 4D project. +2. In the **Run** menu, select **Start Web Server**. + +That's all! The web server is started (you can see that the menu item has become **Stop Web Server**). It is now ready to handle requests. To check it, we'll display the default home page. + +### Displaying the default home page + +The 4D web server creates automatically a default `index.html` page in the default `WebFolder` root folder, created at the same level as the Project folder. + +1. Launch a web browser and connect to the web server IP address (default http port for 4D web server is 80). If the web server and the browser are on the same machine, you can select **Test Web Server** in the **Run** menu. + +The default home page is displayed: + +![](assets/en/WebServer/defaultHomePage.png) + +### Displaying Hello World + +1. Open the Explorer, display the Database Methods list and double-click on `On Web Connection`. + +2. Enter the following code: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // Error 404 for example +End case +``` + +The [`On Web Connection`](httpRequests.md#on-web-connection) database method is called for incoming requests and receives the target URL in the `$1` parameter. This very simple code only sends the text to the browser. + +3. In your browser, enter the following URL: + +``` +http://localhost/hello +``` + +The web server handles the request and returns: + +![](assets/en/WebServer/hello.png) + + +## Getting data from the database + +Now we'll see how simple it is to get data from the database. First, we will create a table and fill it with some data. + +Create a basic database with, for example, a single table containing some records: + +![](assets/en/WebServer/hello2.png) +![](assets/en/WebServer/hello3.png) + +### Displaying data in a page + +The most simple solution to display data is to call a [template page](templates.md) containing tags. + +1. Using any text editor, create a file containing the following lines: + +```html + + + + +
    + + + +``` + +2. Name the file "friends.shtml" and save it in the **WebFolder** of your project. +3. In your browser, enter the following URL: + +``` +http://localhost/friends.shtml +``` + +`.shtml` pages are automatically processed by the web server. Your page filled with data is returned: + +![](assets/en/WebServer/hello3bis.png) + +### REST request + +If we not only want to *display* data, but to *use* it, we can use ORDA and the REST server. Thanks to the [ORDA concept](ORDA/overview.md), the `Friends` table is automatically mapped to a dataclass and is available through [REST](REST/gettingStarted.md). + + +1. We will use the REST server to access data: go the "Settings" dialog box, select the "Web/Rest resource" page, and check the **Expose as REST server** option. + +![](assets/en/WebServer/hello5.png) + +2. In your browser, enter the following URL: + +``` +http://localhost/rest/$catalog +``` + +The web server returns the results in JSON: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +You get the catalog, i.e. the list of exposed dataclasses and attributes in the datastore. + +You can also get any data. + +3. Enter the following URL: + +``` +http://localhost/rest/Friends +``` + +The server returns the entities, i.e. the data, from the Friends dataclass: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +This very simple example shows how the web server interacts transparently with the [REST server](REST/gettingStarted.md) to return any requested data, provided it is exposed. In your web interfaces, you can easily bind the javascript or html code with returned data. See the built-in [Web Data Explorer](Admin/dataExplorer.md) to have an example of sophisticated web interface bound to dataclasses. + + + + +## Login and session + +In the above sections, we get free access to the application from web requests. However, in the world of web applications, data access security is the first priority. When connecting to the 4D web server, users must be authentified and their navigation controlled. + +### Creating a table of users + +The most simple and secured way to log a user on the 4D web server is based upon the following scenario: + +- Users are stored in a dedicated, unexposed table (named *WebUsers* for example) +- The *WebUsers* table could be [encrypted](MSC/encrypt.md) and stores the user login and a hash of their password. + +1. Create a table with some fields, for example: + +![](assets/en/WebServer/helloUsers.png) + +2. Write and execute the following code to create a user: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// the password would be entered by the user +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### Authenticating users + +> To be secure from end to end, it is necessary that the whole connection is established via [https](webServerConfig.md#enable-https). + +1. Open the Explorer and create a project method named "login". + +3. Write the following code: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// get values sent in the header of the request +WEB GET VARIABLES($anames; $avalues) + +// look for header login fields +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +//look for a user with the entered name in the users table +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) //a user was found + //check the password + If (Verify password hash($password; $user.password)) + //password ok, fill the session + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + //You can use the user session to store any information + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. Display the method properties by clicking on the **[i]** button in the code editor, check the `4D tags and URLs (4DACTION...)` option and click **OK**. + +![](assets/en/WebServer/hello0.png) + + +4. In your browser, enter the following URL: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> Using such URLs is not recommended, it is only presented here to keep the example simple. A more realistic login request must be handled through a web form and a POST request. See [this page](sessions.md#example) for an example of form POST. + +Then you will be logged for the session: + +![](assets/en/WebServer/login1.png) + +Wrong credentials would be rejected: + +![](assets/en/WebServer/login2.png) + +Once a user is logged, you can handle the associated session using the `WEB Get Current Session ID` method. See the [User sessions](sessions.md) page. + diff --git a/docs/WebServer/httpRequests.md b/docs/WebServer/httpRequests.md new file mode 100644 index 00000000000000..ab318386f48b4b --- /dev/null +++ b/docs/WebServer/httpRequests.md @@ -0,0 +1,358 @@ +--- +id: httpRequests +title: Processing HTTP requests +--- + +The 4D web server provides several features to handle HTTP requests: + +- the `On Web Connection` database method, a router for your web application, +- the `/4DACTION` URL to call server-side code +- `WEB GET VARIABLES` to get values from HTML objects sent to the server +- other commands such as `WEB GET HTTP BODY`, `WEB GET HTTP HEADER`, or `WEB GET BODY PART` allow to customize the request processing, including cookies. +- the *COMPILER_WEB* project method, to declare your variables. + + +## On Web Connection + +The `On Web Connection` database method can be used as the entry point for the 4D Web server. + +### Database method calls + +The `On Web Connection` database method is automatically called when the server reveives any URL that is not a path to an existing page on the server. The database method is called with the URL. + +For example, the URL "*a/b/c*" will call the database method, but "*a/b/c.html*" will not call the database method if the page "c.html" exists in the "a/b" subfolder of the [WebFolder](webServerConfig.md#root-folder). + +> The request should have previously been accepted by the [`On Web Authentication`](authentication.md#on-web-authentication) database method (if it exists) and the web server must be launched. + +### Syntax + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +|Parameters|Type||Description| +|---|---|:---:|---| +|$1|Text|<-|URL | +|$2|Text|<-|HTTP headers + HTTP body (up to 32 kb limit) | +|$3|Text|<-|IP address of the web client (browser) | +|$4|Text|<-|IP address of the server | +|$5|Text|<-|User name | +|$6|Text|<-|Password | + + +You must declare these parameters as shown below: + +```4d +//On Web Connection database method + + C_TEXT($1;$2;$3;$4;$5;$6) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Connection database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> Calling a 4D command that displays an interface element (`DIALOG`, `ALERT`, etc.) is not allowed and ends the method processing. + + +### $1 - URL extra data + +The first parameter ($1) is the URL entered by users in the address area of their web browser, without the host address. + +Let’s use an intranet connection as an example. Suppose that the IP address of your 4D Web Server machine is 123.4.567.89. The following table shows the values of $1 depending on the URL entered in the web browser: + +|URL entered in web browser|Value of parameter $1| +|---|---| +|123.4.567.89|/ | +|http://123.4.567.89|/ | +|123.4.567.89/Customers|/Customers | +|http://123.4.567.89/Customers/Add|/Customers/Add | +|123.4.567.89/Do_This/If_OK/Do_That|/Do_This/If_OK/Do_That | + +Note that you are free to use this parameter at your convenience. 4D simply ignores the value passed beyond the host part of the URL. For example, you can establish a convention where the value "*/Customers/Add*" means “go directly to add a new record in the `[Customers]` table.†By supplying the web users with a list of possible values and/or default bookmarks, you can provide shortcuts to different parts of your application. This way, web users can quickly access resources of your website without going through the entire navigation path each time they make a new connection. + + +### $2 - Header and Body of the HTTP request + +The second parameter ($2) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Connection` database method "as is". Its contents will vary depending on the nature of the web browser attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. + +>For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + + +### $3 - Web client IP address + +The $3 parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. + +>4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + +### $4 - Server IP address + +The $4 parameter receives the IP address requested by the 4D Web Server. 4D allows for multi-homing, which allows you to use machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.html#ip-address-to-listen). + +### $5 and $6 - User Name and Password + +The $5 and $6 parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser, if applicable (see the [authentication page](authentication.md)). + +>If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + + + + +## /4DACTION + +**/4DACTION/***MethodName*
    +**/4DACTION/***MethodName/Param* + +|Parameters|Type||Description| +|---|---|:---:|---| +|MethodName|Text|->|Name of the 4D project method to be executed | +|Param|Text|->|Text parameter to pass to the project method| + +**Usage:** URL or Form action. + +This URL allows you to call the *MethodName* 4D project method with an optional *Param* text parameter. The method will receive this parameter in *$1*. + +- The 4D project method must have been [allowed for web requests](allowProject.md): the “Available through 4D tags and URLs (4DACTION...)†attribute value must have been checked in the properties of the method. If the attribute is not checked, the web request is rejected. +- When 4D receives a `/4DACTION/MethodName/Param` request, the `On Web Authentication` database method (if it exists) is called. + +`4DACTION/` can be associated with a URL in a static Web page: + +```html +Do Something +``` + +The `MyMethod` project method should generally return a "reply" (sending of an HTML page using `WEB SEND FILE` or `WEB SEND TEXT`, etc.). Be sure to make the processing as short as possible in order not to block the browser. + +> A method called by `/4DACTION` must not call interface elements (`DIALOG`, `ALERT`, etc.). + +#### Example + +This example describes the association of the `/4DACTION` URL with an HTML picture object in order to dynamically display a picture in the page. You insert the following instructions in a static HTML page: + +```html + +``` + +The `getPhoto` method is as follows: + +```4d +C_TEXT($1) // This parameter must always be declared +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + //find the picture in the Images folder within the Resources folder +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) //put the picture in the picture variable +PICTURE TO BLOB($PictVar;$BLOB;".png") //convert the picture to ".png" format +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION to post forms + +The 4D Web server also allows you to use “posted†forms, which are static HTML pages that send data to the Web server, and to easily retrieve all the values. The POST type must be associated to them and the form’s action must imperatively start with /4DACTION/MethodName. + +A form can be submitted through two methods (both can be used with 4D): +- POST, usually used to send data to the Web server, +- GET, usually used to request data from the Web server. + +> When the Web server receives a posted form, it calls the `On Web Authentication` database method (if it exists). + +In the called method, you must call the `WEB GET VARIABLES` command in order to [retrieve the names and values](#getting-values-from-the-requests) of all the fields included in an HTML page submitted to the server. + +Example to define the action of a form: + +```html +
    +``` + +#### Example + +In a Web application, we would like for the browsers to be able to search among the records by using a static HTML page. This page is called “search.htmâ€. The application contains other static pages that allow you to, for example, display the search result (“results.htmâ€). The POST type has been associated to the page, as well as the `/4DACTION/SEARCH` action. + +Here is the HTML code that corresponds to this page: + +```html + +
    +Whole word
    + +
    +``` + +During data entry, type “ABCD†in the data entry area, check the "Whole word" option and validate it by clicking the **Search** button. In the request sent to the Web server: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D calls the `On Web Authentication` database method (if it exists), then the `processForm` project method is called, which is as follows: + +```4d + C_TEXT($1) //mandatory for compiled mode + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) //we retrieve all the variables of the form + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) //If the option has not been checked + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
    " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") //Send the list to the results.htm form + //which contains a reference to the variable vLIST, + //for example + //... +End if +``` + + + + +## Getting values from HTTP requests + +4D's Web server lets you recover data sent through POST or GET requests, using Web forms or URLs. + +When the Web server receives a request with data in the header or in the URL, 4D can retrieve the values of any HTML objects it contains. This principle can be implemented in the case of a Web form, sent for example using `WEB SEND FILE` or `WEB SEND BLOB`, where the user enters or modifies values, then clicks on the validation button. + +In this case, 4D can retrieve the values of the HTML objects found in the request using the `WEB GET VARIABLES` command. The `WEB GET VARIABLES` command retrieves the values as text. + +Consider the following HTML page source code: + +```html + + + Welcome + + + +
    +

    Welcome to Spiders United

    +

    Please enter your name: +

    +

    + + +

    +

    + + + +

    +
    + + +``` + +When 4D sends the page to a Web Browser, it looks like this: + +![](assets/en/WebServer/spiders.png) + +The main features of this page are: + +- It includes three **Submit** buttons: `vsbLogOn`, `vsbRegister` and `vsbInformation`. +- When you click **Log On**, the submission of the form is first processed by the JavaScript function `LogOn`. If no name is entered, the form is not even submitted to 4D, and a JavaScript alert is displayed. +- The form has a POST 4D method as well as a Submit script (*GetBrowserInformation*) that copies the browser properties to the four hidden objects whose names starts with *vtNav_App*. +It also includes the `vtUserName` object. + +Let’s examine the 4D method `WWW_STD_FORM_POST` that is called when the user clicks on one of the buttons on the HTML form. + +```4d + // Retrieval of value of variables + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // The Log On button was clicked + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // The WWW POST EVENT method saves the information in a database table + Else + + $0:=WWW Register + // The WWW Register method lets a new Web user register + End if + + // The Register button was clicked + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // The Information button was clicked + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +The features of this method are: + +- The values of the variables *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, and *vtNav_userAgent* (bound to the HTML objects having the same names) are retrieved using the `WEB GET VARIABLES` command from HTML objects created by the *GetBrowserInformation* JavaScript script. +- Out of the *vsbLogOn*, *vsbRegister* and *vsbInformation* variables bound to the three Submit buttons, only the one corresponding to the button that was clicked will be retrieved by the `WEB GET VARIABLES` command. When the submit is performed by one of these buttons, the browser returns the value of the clicked button to 4D. This tells you which button was clicked. + +Keep in main that with HTML, all objects are text objects. If you use a SELECT object, it is the value of the highlighted element in the object that is returned in the `WEB GET VARIABLES` command, and not the position of the element in the array as in 4D. `WEB GET VARIABLES` always returns values of the Text type. + + +## Other Web Server Commands + +The 4D web server provides several low-level web commands allowing you to develop custom processing of requests: + +- the `WEB GET HTTP BODY` command returns the body as raw text, allowing any parsing you may need +- the `WEB GET HTTP HEADER` command return the headers of the request. It is useful to handle custom cookies, for example (along with the `WEB SET HTTP HEADER` command). +- the `WEB GET BODY PART` and `WEB Get body part count` commands to parse the body part of a multi-part request and retrieve text values, but also files posted, using BLOBs. + +These commands are summarized in the following graphic: + +![](assets/en/WebServer/httpCommands.png) + +The 4D web server supports files uploaded in chunked transfer encoding from any Web client. Chunked transfer encoding is a data transfer mechanism specified in HTTP/1.1. It allows data to be transferred in a series of "chunks" (parts) without knowing the final data size. The 4D Web Server also supports chunked transfer encoding from the server to Web clients (using `WEB SEND RAW DATA`). + +## COMPILER_WEB Project Method + +The COMPILER\_WEB method, if it exists, is systematically called when the HTTP server receives a dynamic request and calls the 4D engine. This is the case, for example, when the 4D Web server receives a posted form or a URL to process in [`On Web Connection`](#on-web-connection). This method is intended to contain typing and/or variable initialization directives used during Web exchanges. It is used by the compiler when the application is compiled. The COMPILER\_WEB method is common to all the Web forms. By default, the COMPILER_WEB method does not exist. You must explicitly create it. + +> The COMPILER_WEB project method is also called, if it exists, for each SOAP request accepted. + + diff --git a/docs/WebServer/preemptiveWeb.md b/docs/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..a226d917f26fce --- /dev/null +++ b/docs/WebServer/preemptiveWeb.md @@ -0,0 +1,96 @@ +--- +id: preemptiveWeb +title: Using preemptive web processes +--- + + +The 4D Web Server allows you to take full advantage of multi-core computers by using preemptive web processes in your compiled applications. You can configure your web-related code, including 4D tags and web database methods, to run simultaneously on as many cores as possible. + +For in-depth information on preemptive process in 4D, please refer to the *Preemptive 4D processes* section in the *Language Reference*. + +## Availability of preemptive mode for web processes + +The use of preemptive mode for web processes is only available in the following contexts: + +* use of 4D Server or 4D local mode (4D in remote mode does not support preemptive mode) + +* use of a compiled database (except [on 4D Server when sessions are enabled](sessions.md#preemptive-mode)) + +* **Use preemptive processes** database setting checked (see below) + +* all web-related database methods and project methods are confirmed thread-safe by 4D Compiler + +If any requirement is missing, the web server will use cooperative processes. + +## Enabling the preemptive mode for the web server + +To enable the preemptive mode for your application's web server code, you must check the **Use preemptive processes** option on the "Web/Options (I)" page of the Database Settings dialog box: + +![](assets/en/WebServer/preemptive.png) + +When this option is checked, the 4D compiler will automatically evaluate the thread-safety property of each piece of web-related code (see below) and return errors in case of incompatibility. + +>This option does not apply to web service processes (server or client). Preemptive mode is supported by web service processes at method level: you just have to select "Can be run in preemptive processes" property for published SOAP server methods (see *Publishing a Web Service with 4D*) or proxy client methods (see *Subscribing to a Web Service in 4D*) and make sure they are confirmed thread-safe by the compiler. + +## Writing thread-safe web server code + +All 4D code executed by the web server must be thread-safe if you want your web processes to be run in preemptive mode. When the **Use preemptive processes** option is checked in the Settings dialog box, the following parts of the application will be automatically evaluated by the 4D compiler: + +* All web-related database methods: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* The `compiler_web` project method (regardless of its actual "Execution mode" property); + +* Basically any code processed by the `PROCESS 4D TAGS` command in the web context, for example through .shtml pages. + +* Any project method with the "Available through 4D tags and URLS (`4DACTION`, etc.)" attribute + +* Triggers for tables with "Expose as REST resource" attribute + +* Project methods available through REST ("REST Server" property checked) + +For each of these methods and code parts, the compiler will check if the thread-safety rules are respected, and will return errors in case of issues. For more information about thread-safety rules, please refer to the *Writing a thread-safe method* paragraph in the *Processes* chapter. + +## Thread-safety of 4D web code + +Most of the web-related 4D commands and functions, database methods and URLs are thread-safe and can be used in preemptive mode. + +### 4D commands and database methods + +All 4D web-related commands are thread-safe, *i.e.*: + +* all commands from the *Web Server* theme, +* all commands from the *HTTP Client* theme. + +The web-related database methods are thread-safe and can be used in preemptive mode (see below): `On Web Authentication`, `On Web Connection`, `On REST Authentication`...). + +Of course, the code executed by these methods must also be thread-safe. + + +### Web Server URLs + +The following 4D Web Server URLs are thread-safe and can be used in preemptive mode: + +* *4daction/* (the called project method must also be thread-safe) +* *4dcgi/* (the called database methods must also be thread-safe) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (generated by `PROCESS 4D TAGS` for web request on picture fields) +* *4dimg/* (generated by `PROCESS 4D TAGS` for web request on picture variables) + +### Preemptive web process icon + +Both the Runtime Explorer and the 4D Server administration window display a specific icon for preemptive web processes: + +|Process type|Icon| +|---|---| +|Preemptive web method| ![](assets/en/WebServer/processIcon.png)| + + diff --git a/docs/WebServer/sessions.md b/docs/WebServer/sessions.md new file mode 100644 index 00000000000000..64160423dc980e --- /dev/null +++ b/docs/WebServer/sessions.md @@ -0,0 +1,182 @@ +--- +id: sessions +title: User sessions +--- + +The 4D web server provides built-in features for managing **user sessions**. Creating and maintaining user sessions allows you to control and improve the user experience on your web application. When user sessions are enabled, web clients can reuse the same server context from one request to another. + +Web server user sessions allow to: + +- handle multiple requests simultaneously from the same web client through an unlimited number of preemptive processes (web server sessions are **scalable**), +- share data between the processes of a web client, +- associate privileges to user sessions, +- handle access through a `Session` object and the [Session API](API/SessionClass.md). + +> **Note:** The current implementation is only the first step of an upcoming comprehensive feature allowing developers to manage hierarchical user permissions through sessions in the whole web application. + + +## Enabling sessions + +The session management feature can be enabled and disabled on your 4D web server. There are different ways to enable session management: + +- Using the **Scalable sessions** option on the "Web/Options (I)" page of the Settings (permanent setting): +![alt-text](assets/en/WebServer/settingsSession.png) + +This option is selected by default in new projects. It can however be disabled by selecting the **No sessions** option, in which case the web session features are disabled (no `Session` object is available). + +- Using the [`.scalableSession`](API/WebServerClass.md#scalablesession) property of the Web Server object (to pass in the *settings* parameter of the [`.start()`](API/WebServerClass.md#start) function). In this case, this setting overrides the option defined in the Settings dialog box for the Web Server object (it is not stored on disk). + +> The `WEB SET OPTION` command can also set the session mode for the main Web server. + +In any cases, the setting is local to the machine; so it can be different on the 4D Server Web server and the Web servers of remote 4D machines. + +> **Compatibility**: A **Legacy sessions** option is available in projects created with a 4D version prior to 4D v18 R6 (for more information, please refer to the [doc.4d.com](https://doc.4d.com) web site). + + +## Session implementation + +When [sessions are enabled](#enabling-sessions), automatic mechanisms are implemented, based upon a private cookie set by 4D itself: "4DSID_*AppName*", where *AppName* is the name of the application project. This cookie references the current web session for the application. + +> The cookie name can be get using the [`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) property. + +1. In each web client request, the Web server checks for the presence and the value of the private "4DSID_*AppName*" cookie. + +2. If the cookie has a value, 4D looks for the session that created this cookie among the existing sessions; if this session is found, it is reused for the call. + +2. If the client request does not correspond to an already opened session: + +- a new session with a private "4DSID_*AppName*" cookie is created on the web server +- a new Guest `Session` object is created and is dedicated to the scalable web session. + +The current `Session` object can then be accessed through the [`Session`](API/SessionClass.md#session) command in the code of any web processes. + +![alt-text](assets/en/WebServer/schemaSession.png) + +Web processes usually do not end, they are recycled in a pool for efficiency. When a process finishes executing a request, it is put back in the pool and made available for the next request. Since a web process can be reused by any session, [process variables](Concepts/variables.md#process-variables) must be cleared by your code at the end of its execution (using [`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/en/page89.html) for example). This cleanup is necessary for any process related information, such as a reference to an opened file. This is the reason why **it is recommended** to use the [Session](API/SessionClass.md) object when you want to keep session related information. + +### Preemptive mode + +On 4D Server, Web server sessions are automatically handled through preemptive processes, **even in interpreted mode**. You need to make sure that your web server code is [compliant with a preemptive execution](preemptiveWeb.md#writing-thread-safe-web-server-code). + +> To debug the web server code on 4D Server, make sure the debugger is [attached to the server](Debugging/debugging-remote.md). In this context, web processes switch to cooperative mode and the web server code can be debugged. + + + +## Sharing information + +Each `Session` object provides a [`.storage`](API/SessionClass.md#storage) property which is a [shared object](Concepts/shared.md). This property allows you to share information between all processes handled by the session. + +## Session lifetime + +A scalable web session is closed when: + +- the web server is stopped, +- the timeout of the session cookie has been reached. + +The lifespan of an inactive cookie is 60 minutes by default, which means that the web server will automatically close inactive sessions after 60 minutes. + +This timeout can be set using the [`.idleTimeout`](API/SessionClass.md#idletimeout) property of the `Session` object (the timeout cannot be less than 60 minutes). + +When a scalable web session is closed, if the [`Session`](API/SessionClass.md#session) command is called afterwards: + +- the `Session` object does not contain privileges (it is a Guest session) +- the [`.storage`](API/SessionClass.md#storage) property is empty +- a new session cookie is associated to the session + + +## Privileges + +Privileges can be associated to sessions. On the web server, you can provide specific access or features depending on the privileges of the session. + +You can assign privileges usign the [`.setPrivileges()`](API/SessionClass.md#setprivileges) function. In your code, you can check the session's privileges to allow or deny access using the [`.hasPrivilege()`](API/SessionClass.md#hasprivilege) function. By default, new sessions do not have any privilege: they are **guest** sessions ([`.isGuest()`](API/SessionClass.md#isguest) function returns true). + +> In the current implementation (v18 R6), only the "WebAdmin" privilege is available. + +Example: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page +End if +``` + + +## Example + +In a CRM application, each salesperson manages their own client portfolio. The datastore contains at least two linked dataclasses: Customers and SalesPersons (a salesperson has several customers). + +![alt-text](assets/en/WebServer/exampleSession.png) + +We want a salesperson to authenticate, open a session on the web server, and have the top 3 customers be loaded in the session. + + +1. We run this URL to open a session: + +``` +http://localhost:8044/authenticate.shtml +``` + +> In a production environment, it it necessary to use a [HTTPS connection](API/WebServerClass.md#httpsenabled) to avoid any uncrypted information to circulate on the network. + + +2. The `authenticate.shtml` page is a form containing *userId* et *password* input fields and sending a 4DACTION POST action: + + + +```html + + + +
    + UserId:
    + Password:
    + +
    + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. The authenticate project method looks for the *userID* person and validates the password against the hashed value already stored in the *SalesPersons* table: + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` diff --git a/docs/WebServer/templates.md b/docs/WebServer/templates.md new file mode 100644 index 00000000000000..a712592b7a7706 --- /dev/null +++ b/docs/WebServer/templates.md @@ -0,0 +1,96 @@ +--- +id: templates +title: Template pages +--- + +4D's Web server allows you to use HTML template pages containing tags, i.e. a mix of static HTML code and 4D references added by means of [transformation tags](Tags/tags.md) such as 4DTEXT, 4DIF, or 4DINCLUDE. These tags are usually inserted as HTML type comments (``) into the HTML source code. + +When these pages are sent by the HTTP server, they are parsed and the tags they contain are executed and replaced with the resulting data. The pages received by the browsers are thus a combination of static elements and values coming from 4D processing. + +For example, if you write in an HTML page: + +```html +

    Welcome to !

    +``` + +The value of the 4D variable *vtSiteName* will be inserted in the HTML page. + + +## Tags for templates + +The following 4D tags are available: + +- 4DTEXT, to insert 4D variables and expressions as text, +- 4DHTML, to insert HTML code, +- 4DEVAL, to evaluate any 4D expression, +- 4DSCRIPT, to execute a 4D method, +- 4DINCLUDE, to include a page within another one, +- 4DBASE, to modify the default folder used by the 4DINCLUDE tag, +- 4DCODE, to insert 4D code, +- 4DIF, 4DELSE, 4DELSEIF and 4DENDIF, to insert conditions in the HTML code, +- 4DLOOP and 4DENDLOOP, to make loops in the HTML code, +- 4DEACH and 4DENDEACH, to loop in collections, entity selections, or object properties. + +These tags are described in the [Transformation Tags](Tags/tags.md) page. + +It is possible to mix tags. For example, the following HTML code is allowed: + +```html + +... + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + + (loop on the current selection) + (If [TABLE]ValNum>10) + (subpage insertion) + (Else) + Value:
    + (Field display) + + (End for) + + +``` + + +## Tag parsing + +For optimization reasons, the parsing of the HTML source code is not carried out by the 4D Web server when HTML pages are called using simple URLs that are suffixed with “.HTML†or “.HTMâ€. + +Parsing of the contents of template pages sent by 4D web server takes place when `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB) or `WEB SEND TEXT` commands are called, as well as when sending pages called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to "force" the parsing of HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, `http://www.server.com/dir/page.shtm`). An example of the use of this type of page is given in the description of the `WEB GET STATISTICS` command. XML pages (.xml, .xsl) are also supported and always parsed by 4D. + +You can also carry out parsing outside of the Web context when you use the `PROCESS 4D TAGS` command. + +Internally, the parser works with UTF-16 strings, but the data to parse may have been encoded differently. When tags contain text (for example `4DHTML`), 4D converts the data when necessary depending on its origin and the information available (charset). Below are the cases where 4D parses the tags contained in the HTML pages, as well as any conversions carried out: + +|Action / Command|Content analysis of the sent pages|Support of $ syntax(*)|Character set used for parsing tags| +|----|----|----|---| +|Pages called via URLs|X, except for pages with “.htm†or “.html†extensions|X, except for pages with “.htm†or “.html†extensions|Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server| +|`WEB SEND FILE`|X|-|Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server| +|`WEB SEND TEXT`|X|-|No conversion necessary| +|`WEB SEND BLOB`|X, if BLOB is of the “text/html†type|-|Use of charset set in the "Content-Type" header of the response. Otherwise, use of default character set for the HTTP server| +|Inclusion by the `` tag|X|X|Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server| +|`PROCESS 4D TAGS`|X|X|Text data: no conversion. BLOB data: automatic conversion from the Mac-Roman character set for compatibility| + +(*) The alternative $-based syntax is available for 4DHTML, 4DTEXT and 4DEVAL tags. + +## Accessing 4D methods via the Web + +Executing a 4D method with `4DEACH`, `4DELSEIF`, `4DEVAL`, `4DHTML`, `4DIF`, `4DLOOP`, `4DSCRIPT`, or `4DTEXT` from a web request is subject to the [Available through 4D tags and URLs (4DACTION...)](allowProject.md) attribute value defined in the properties of the method. If the attribute is not checked for the method, it can not be called from a web request. + + +## Prevention of malicious code insertion + +4D tags accept different types of data as parameters: text, variables, methods, command names, etc. When this data is provided by your own code, there is no risk of malicious code insertion since you control the input. However, your database code often works with data that was, at one time or another, introduced through an external source (user input, import, etc.). + +In this case, it is advisable to **not use** tags such as `4DEVAL` or `4DSCRIPT`, which evaluate parameters, directly with this sort of data. + +In addition, according to the [principle of recursion](Tags/tags.md#recursive-processing), malicious code may itself include transformation tags. In this case, it is imperative to use the `4DTEXT` tag. Imagine, for example, a Web form field named "Name", where users must enter their name. This name is then displayed using a `` tag in the page. If text of the "\" type is inserted instead of the name, interpreting this tag will cause the application to be exited. To avoid this risk, you can just use the `4DTEXT` tag systematically in this case. Since this tag escapes the special HTML characters, any malicious recursive code that may have been inserted will not be reinterpreted. To refer to the previous example, the "Name" field will contain, in this case, "`<!--#4DEVAL QUIT 4D-->`" which will not be transformed. diff --git a/docs/WebServer/webServer.md b/docs/WebServer/webServer.md new file mode 100644 index 00000000000000..4e4902820371d3 --- /dev/null +++ b/docs/WebServer/webServer.md @@ -0,0 +1,63 @@ +--- +id: webServer +title: Overview +--- + +4D in local mode, 4D in remote mode and 4D Server include a web server engine (aka http server) that enables you to design and publish powerful web applications that can make the most of your 4D databases. + +## Easy Monitoring + +You can start or stop publication of the web application at any time. To do so, you just need to select a menu command or execute a single line of code. + +Monitoring the 4D web server is easy and can be done using the 4D Server administration window or through [special URLs](webServerAdmin.md#administration-urls). + +## Ready-to-use + +The 4D web server automatically creates a default root folder and a default home page for an instantaneous availability. + +## Security + +Data security is present at every stage of the 4D web server implementations. Security levels are scalable and default settings usually select the most secure options. The 4D web server security is based upon the following elements: + +* Extended support of the [**TLS Protocol (HTTPS)**](Admin/tls.md), + +* **Authentication**: flexible and customizable [authentication features](authentication.md) based upon built-it settings as well as fallback database methods ([`On Web Authentication`](authentication.md#on-web-authentication) for the web server and [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) for the REST server), + +* **Control of exposed contents**: only elements that you expose explicitely can be available from direct web or REST requests. You must declare: + - [Project methods](templates.md#allowing-project-methods) exposed through HTTP requests + - [ORDA functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) exposed through REST requests + - [Tables and fields](REST/configuration.md#exposing-tables-and-fields) that you don't want to be available to REST requests. + +* **Sandboxing** through the definition of a [HTML Root](webServerConfig.md#root-folder) folder by default, + +* **Control of server resource usage** (e.g. [maximum concurrent web processes](webServerConfig.html#maximum-concurrent-web-processes) option). + +>For a general overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). + + +## User Sessions + +The 4D web server includes complete automatic features for easily managing [web sessions](sessions.md) (user sessions) based on cookies. + + +## Gateway to REST Requests + +The 4D web server allows accessing data stored in your 4D applications through REST requests. REST requests provide direct access to any database operation such as adding, reading, editing, ordering, or searching data. + +REST requests are detailed in the [REST server](REST/gettingStarted.md) section. + +## Extended settings + +The 4D web server configuration is defined through a comprehensive set of application-level settings that can also be customized for the session using the `webServer` object properties or the `WEB SET OPTION` command. + +## Templates and URLs + +The 4D web server supports access to data stored in your 4D applications through template pages and specific URLs. + +- Template pages contain [special tags](templates.md) that initiate web server processing at the time when they are sent to browsers. + +- [specific URLs](httpRequests) enable 4D to be called in order to execute any action; these URLs can also be used as form actions to trigger processing when the user posts HTML forms. + +## Dedicated Database Methods + +`On Web Authentication`, `On Web Connection`, as well as `On REST Authentication` database methods are the entry points of requests in the web server; they can be used to evaluate and route any type of request. diff --git a/docs/WebServer/webServerAdmin.md b/docs/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..2293f71b563871 --- /dev/null +++ b/docs/WebServer/webServerAdmin.md @@ -0,0 +1,257 @@ +--- +id: webServerAdmin +title: Administration +--- + +4D provides several integrated tools to start, stop, or monitor the integrated web server. + + +## Starting the 4D Web Server + +> To be able to launch the web server of 4D or 4D Server, you must have a "4D Web Application" license. For more information, please refer to the [4D Web site](https://www.4d.com). + + +A 4D project can start and monitor a web server for the main (host) application as well as for each hosted component. + +The main 4D web server can be started in different ways: + +* Using a button/menu command. + * 4D: **Run\>Start Web Server** menu
    ![](assets/en/WebServer/start1.png) + * 4D Server: **Start HTTP server** button of the HTTP Server page
    ![](assets/en/WebServer/start2.png) + +* Automatically starting it each time the 4D application is opened. To do this, display the **Web\/Configuration** page of the Settings and select the **Launch Web Server at Startup** check box:
    ![](assets/en/WebServer/config.png) + +* Programmatically, by calling the [`webServer.start()`](API/WebServerClass.md#start) function or `WEB START SERVER` command. + +The web server of any component can be launched by calling the [`webServer.start()`](API/WebServerClass.md#start) function on the component's web server object. + +>You do not need to relaunch the 4D application to start or stop the web server. + +## Stopping the 4D Web Server + +The main 4D web server can be stopped in different ways: + +* Using the **Run\>Stop Web Server** menu of 4D or the **Stop HTTP server** button of the HTTP Server page of 4D Server (both items show **Start...** when the server is not already started). + +* Programmatically, by calling the [`webServer.stop()`](API/WebServerClass.md#stop) function or `WEB STOP SERVER` command. + +The web server of any component can be stopped by calling the `webServer.stop()` function on the component's web server object. + + +## Testing the 4D Web Server + +The **Test Web Server** command can be used to make sure the built-in web server is functioning correctly (4D only). This command is accessible in the **Run** menu when the web server is launched: + +![](assets/en/WebServer/test1.png) + + +When you select this command, the home page of the website published by the 4D application is displayed in a window of your default web browser: + +![](assets/en/WebServer/defaultHomePage.png) + + +This command lets you verify that the web server, home page display, etc. work correctly. The page is called using the *localhost* URL, which is the standard shortcut designating the IP address of the machine on which the web browser is executed. The command takes into account the [TCP publication port](#http-port) number specified in the settings. + + + +## Clearing the Cache + +At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). + +To do so, you can: + +- 4D: click on the **Clear Cache** button in the Web/Options (I) page of the Settings dialog box. +- 4D Server: click on the **Clear Cache** button in the HTTP page of the [4D Server Administration window](Admin/server-admin.md#http-server-page). + +The cache is then immediately cleared. + +>You can also use the [/4DCACHECLEAR](#cacheclear) URL. + + + +## Runtime Explorer + +The **Watch** page (**Web** heading) in the Runtime Explorer displays web server information, particularly: + +* **Web Cache Usage**: indicates the number of pages present in the web cache as well as its use percentage. This information is only available if the web server is active and if the cache size is greater than 0. + +* **Web Server Elapsed Time**: indicates the duration of use (in hours:minutes:seconds format) of the Web server. This information is only available if the web server is active. + +* **Web Hits Count**: indicates the total number of HTTP requests received since the web server boot, as well as an instantaneous number of requests per second (measure taken between two Runtime Explorer updates). This information is only available if the web server is active. + + + + +## Administration URLs + +Website administration URLS allow you to control the website published on your server. 4D Web Server accepts four particular URLs: */4DSTATS*, */4DHTMLSTATS*, /*4DCACHECLEAR* and */4DWEBTEST*. + +> */4DSTATS*, */4DHTMLSTATS* and */4DCACHECLEAR* are only available to the Designer and Administrator of the database. If the 4D password system has not been activated, these URLs are available to all the users. /4DWEBTEST is always available. + + +### /4DSTATS + +The **/4DSTATS** URL returns several items of information in an HTML table (displayable in a browser): + +|Item|Description| +|---|---| +|Cache Current Size|Current size of web server cache (in bytes)| +|Cache Max Size|Maximum size of cache (in bytes)| +|Cached Object Max Size|Maximum size of each object in the cache (in bytes)| +|Cache Use|Percentage of cache used| +|Cached Objects|Number of objects found in the cache, **including pictures**| + +This information can allow you to check the functioning of your server and eventually adapt the corresponding parameters. + +>The `WEB GET STATISTICS` command allows you to also obtain information about how the cache is being used for static pages. + +### /4DHTMLSTATS + +The */4DHTMLSTATS* URL returns, also as an HTML table, the same information as the */4DSTATS* URL. The difference is that the **Cached Objects** field only counts HTML pages (without counting picture files). Moreover, this URL returns the **Filtered Objects** field. + +|Item|Description| +|---|---| +|Cache Current Size|Current size of web server cache (in bytes)| +|Cache Max Size|Maximum size of cache (in bytes)| +|Cached Object Max Size|Maximum size of each object in the cache (in bytes)| +|Cache Use|Percentage of cache used| +|Cached Objects|Number of objects found in the cache, **without pictures**| +|Filtered Objects|Number of objects in cache not counted by URL, in particular, pictures| + + +### /4DCACHECLEAR + +The */4DCACHECLEAR* URL immediately clears the cache of the static pages and images. It allows you to therefore “force†the update of the pages that have been modified. + +### /4DWEBTEST + +The */4DWEBTEST* URL is designed to check the web server status. When this URL is called, 4D returns a text file with the following HTTP fields filled: + +|HTTP Field|Description|Example| +|---|---|---| +|Date|current date at the RFC 822 format|Mon, 7 Dec 2020 13:12:50 GMT +|Server|4D/version number|4D/18.5.0 (Build 18R5.257368) +|User-Agent|name and version @ IP client address|Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1| + + + +## Logs + +4D allows you to generate two logs of web requests: + +- a debug log, useful in the web server development phase (*HTTPDebugLog.txt*), +- a standardized web request log, rather used for statistic purposes (*logweb.txt*). + +Both log files are automatically created in the **Logs** folder of the application project. + +### HTTPDebugLog.txt + +The [http debug file](webServerConfig.md#debug-log) can be enabled using the [`web server` object](webServerObject.md) or the `WEB SET OPTION` command. + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +The following fields are logged for both Request and Response: + +|Field name|Description| +|---|---| +|SocketID|ID of socket used for communication| +|PeerIP|IPv4 address of host (client)| +|PeerPort|Port used by host (client)| +|TimeStamp|Timestamp in milliseconds (since system startup)| +|ConnectionID|Connection UUID (UUID of VTCPSocket used for communication)| +|SequenceNumber|Unique and sequential operation number in the logging session| + + +### logweb.txt + +The [web log recording file](webServerConfig.md#log-recording) can be enabled using the [`web server` object](webServerObject.md), the `WEB SET OPTION` command, or the **Web/Log (type)** page of the settings. You need to select the log format. + +#### CLF/DLF + +Each line of the file represents a request, such as: +*host rfc931 user \[DD/MMM/YYYY:HH:MM:SS] "request" state length* +Each field is separated by a space and each line ends by the CR/LF sequence (character 13, character 10). + +DLF (Combined Log Format) format is similar to CLF (Common Log Format) format and uses exactly the same structure. It simply adds two additional HTTP fields at the end of each request: Referer and User-agent. Here is the description of CLF/DLF formats (not customizable): + +|Field name|Description| +|---|---| +|host|IP address of the client (ex. 192.100.100.10)| +|rfc931|information not generated by 4D, it’s always - (a minus sign| +|user|user name as it is authenticated, or else it is - (a minus sign). If the user name contains spaces, they will be replaced by _ (an underscore).| +|DD/MMM/YYYY:HH:MM:SS|DD: day, MMM: a 3-letter abbreviation for the month name (Jan, Feb,...), YYYY: year, HH: hour, MM: minutes, SS: seconds. The date and time are local to the server.| +|request|request sent by the client (ex. GET /index.htm HTTP/1.0| +|state|reply given by the server| +|length|size of the data returned (except the HTTP header) or 0| +|Referer|DLF only- Contains the URL of the page pointing to the requested document.| +|User-agent|DLF only- Contains the name and version of the browser or software of the client at the origin of the request| + +#### ELF/WLF + +The ELF (Extended Log Format) format is very widespread in the world of HTTP browsers. It can be used to build sophisticated logs that meet specific needs. For this reason, the ELF format can be customized: it is possible to choose the fields to be recorded as well as their order of insertion into the file. + +The WLF (WebStar Log Format) was developed specifically for the 4D WebSTAR server. + +##### Configuring the fields + +When you choose the ELF or WLF format, the “Web Log Token Selection†area displays the fields available for the chosen format. You will need to select each field to be included in the log. To do so, check the desired fields. + +>You cannot select the same field twice. + +The following table lists the fields available for each format (in alphabetical order) and describes its contents: + +|Field|ELF|WLF|Value| +|---|---|---|---| +|BYTES_RECEIVED| | X| Number of bytes received by the server| +BYTES_SENT| X| X| Number of bytes sent by the server to the client| +C_DNS| X| X |IP address of the DNS (ELF: field identical to the C_IP field)| +C_IP| X| X| IP address of the client (for example 192.100.100.10)| +CONNECTION_ID| |X| Connection ID number| +CS(COOKIE)| X| X| Information about cookies contained in the HTTP request| +CS(HOST)| X| X| Host field of the HTTP request| +CS(REFERER)| X| X| URL of the page pointing to the requested document| +CS(USER_AGENT)| X| X| Information about the software and operating system of the client| +CS_SIP| X| X| IP address of the server| +CS_URI| X| X| URI on which the request is made| +CS_URI_QUERY| X| X| Request query parameters| +CS_URI_STEM| X| X| Part of request without query parameters| +DATE| X| X| DD: day, MMM: 3-letter abbreviation for month (Jan, Feb, etc.), YYYY: year| +METHOD| X| X| HTTP method used for the request sent to the server| +PATH_ARGS| | X| CGI parameters: string located after the “$†character| +STATUS| X| X| Reply provided by the server| +TIME| X| X| HH: hour, MM: minutes, SS: seconds| +TRANSFER_TIME| X| X| Time requested by server to generate the reply| +USER| X| X| User name if authenticated; otherwise - (minus sign).

    If the user name contains spaces, they are replaced by _ (underlines)| +URL | |X| URL requested by the client| + +>Dates and times are given in GMT. + + +#### Backup Frequency + +Since a *logweb.txt* file can become considerably large, it is possible to set up an automatic archiving mechanism. The triggering of a backup can be based on a certain period of time (expressed in hours, days, week or months), or based on the file size; when the set deadline (or file size) is reached, 4D automatically closes and archives the current log file and creates a new one. + +When the web log file backup is triggered, the log file is archived in a folder named "Logweb Archives," which is created at the same level as the *logweb.txt* file. + +The archived file is renamed based on the following example: “DYYYY_MM_DD_Thh_mm_ss.txt.†For instance, for a file archived on September 4, 2020 at 3:50 p.m. and 7 seconds: “D2020_09_04_T15_50_07.txt.†+ +#### Backup Parameters + +The automatic backup parameters for the logweb.txt are set on the **Web/Log (backup)** page of the Settings: + +![](assets/en/WebServer/backup.png) + +First you must choose the frequency (days, weeks, etc.) or the file size limit criterion by clicking on the corresponding radio button. You must then specify the precise moment of the backup if necessary. + +* **No Backup**: The scheduled backup function is deactivated. + +* **Every X hour(s)**: This option is used to program backups on an hourly basis. You can enter a value between 1 and 24 . + * **starting at**: Used to set the time at which the first back up will begin. + +* **Every X day(s) at X**: This option is used to program backups on a daily basis. Enter 1 if you want to perform a daily backup. When this option is checked, you must indicate the time when the backup must be started. + +* **Every X week(s), day at X**: This option is used to program backups on a weekly basis. Enter 1 if you want to perform a weekly backup. When this option is checked, you must indicate the day(s) of the week and the time when each backup must be started. You can select several days of the week if desired. For example, you can use this option to set two weekly backups: one on Wednesdays and one on Fridays. + +* **Every X month(s), Xth day at X**: This option is used to program 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 must be started. + +* **Every X MB**: This option is used to program backups based on the size of the current request log file. A backup is automatically triggered when the file reaches the set size. You can set a size limit of 1, 10, 100 or 1000 MB. diff --git a/docs/WebServer/webServerConfig.md b/docs/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..5ecc18c7d17ef8 --- /dev/null +++ b/docs/WebServer/webServerConfig.md @@ -0,0 +1,667 @@ +--- +id: webServerConfig +title: Configuration +--- + +The 4D web server settings include security parameters, listening ports, defaults paths, and various options covering all the server features. 4D provides default values for every settings. + + +## Where to configure settings? + +There are different ways to configure the 4D web server settings, depending on the scope and the server you want to set: + +|Setting location|Scope|Involved web server| +|---|----|---| +|[webServer object](webServerObject.md)|Temporary (current session)|Any web server, including component web servers| +|`WEB SET OPTION` or a `WEB XXX` command|Temporary (current session)|Main server| +|**Settings** dialog box (**Web** pages)|Permanent (all sessions, stored on disk)|Main server| + +> Some settings are not available from all locations. + +## Cache + +|Can be set with|Name|Comments| +|---|---|---| +|Settings dialog box|Configuration page/Use the 4D Web cache|| +|Settings dialog box|Configuration page/Page Cache Size|| + +Enables and configures the web page cache. + +The 4D web server has a cache that allows you to load static pages, GIF images, JPEG images (<512 kb) and style sheets (.css files) in memory, as they are requested. Using the cache allows you to significantly increase the web server’s performance when sending static pages. The cache is shared between all the web processes. + +You can modify the size of the cache in the **Pages Cache Size** area. The value you set depends on the number and size of your website’s static pages, as well as the resources that the host machines has at its disposal. + +>While using your web database, you can check the performance of the cache by using the `WEB GET STATISTICS` command. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. The [/4DSTATS] and [/4DHTMLSTATS] URLs allow you to also obtain information about the cache’s state. + + +## Certificate folder + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|`certificateFolder`|Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function. + +Folder where the TLS certificate files for the web server are located. + +By default with 4D or 4D Server, these files must be placed next to the [project folder](Project/architecture.md#project-folder). + +With 4D in remote mode, these files must be located in the local resources folder of the database on the remote machine (see `4D Client Database Folder` paragraph of the `Get 4D folder` command). You must copy these files manually on the remote machine. + +> TLS certificate files are *key.pem* (document containing the private encryption key) and *cert.pem* (document containing the certificate). + + +## Character Set + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|`characterSet`|MIBEnum integer or Name string| +|`WEB SET OPTION`|`Web character set`|MIBEnum integer or Name string| +|Settings dialog box|Options (II) page/Standard Set|Pop up menu| + +Defines the set of characters to be used by the 4D web server. The default value actually depends on the language of the OS. + +>This setting is also used for generating Quick Reports in HTML format . + + +## Cipher list + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`cipherSuite`](API/WebServerClass.md#ciphersuite)|Text| + +Cipher list used for the secure protocol; sets the priority of ciphering algorithms implemented by the web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + +> The default cipher list used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server, client/server connections, as well as the HTTP client and all the 4D commands that make use of the secure protocol. + +## CORS Settings + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`CORSSettings`](API/WebServerClass.md#corssettings)|Collection of objects (List of allowed hosts and methods for the CORS service)| +|`WEB SET OPTION`|`Web CORS settings`|Collection of objects (List of allowed hosts and methods for the CORS service)| +|Settings dialog box|Options (II) page/Domain names and HTTP methods allowed|Click on the [+] button to add an allowed domain name and its method(s)| + +List of allowed hosts and methods for the CORS service. + +#### Domain names (host property) + +Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. Several syntaxes are supported: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### HTTP methods allowed (methods property) + +Accepted HTTP method(s) for the corresponding CORS host. The following HTTP methods are supported: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +Separate each method with a ";" (e,g,: "post;get"). If methods is empty, null, or undefined, all methods are enabled. + +#### See also + +[Enable CORS Service](#enable-cors-service) + + + +## Debug log + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|`debugLog`|number| +|`WEB SET OPTION`|`Web debug log`|number| + +Status of the HTTP request log file of the web server (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). It is useful for debugging issues related to the Web server. It records each request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +|Value|Constant|Description| +|---|---|---| +|0|wdl disable|Web HTTP debug log is disabled| + + + +|1|wdl enable without body|Web HTTP debug log is enabled without body parts (body size is provided in this case)| +|3|wdl enable with response body|Web HTTP debug log is enabled with body part in response only| +|5|wdl enable with request body|Web HTTP debug log is enabled with body part in request only| +|7|wdl enable with all body parts|Web HTTP debug log is enabled with body parts in response and request| + + +## Defaut Home page + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`defaultHomepage`](API/WebServerClass.md#defaulthomepage)|Text| +|`WEB SET HOME PAGE`||Can be different for each web process| +|Settings dialog box|Configuration page/Default Home Page|| + +Designate a default home page for the web server. This page can be static or [semi-dynamic]. + +By default, when the web server is launched for the first time, 4D creates a home page named "index.html" and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the web server will obtain the following page: + +![](assets/en/WebServer/defaultHomePage.png) + +You can designate another default home page by entering its pathname. + +- The path is relative to the [default HTML root folder](#root-folder). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- The path must neither start not end with a slash. + +For example, if you want the default home page to be "MyHome.htm", and it is located in the "Web" folder (itself located in the default HTML root folder), use "Web/MyHome.htm". + +If you do not specify any default home page, the `On Web Connection` database method is called. It is up to you to process the request procedurally. + +## Enable CORS Service + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`CORSEnabled`](API/WebServerClass.md#corsenabled)|Boolean, true to enable the CORS (false by default)| +|`WEB SET OPTION`|`Web CORS enabled`|0 (disabled, default) or 1 (enabled)| +|Settings dialog box|Options (II) page/Enable CORS|Unchecked by default| + +The 4D web server implements cross-origin resource sharing (CORS) to allow specific Web pages served from another domain to access the current Web application's resources via XHR calls, e.g., using REST. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled, XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see CORS Settings below). In this case, if a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +When disabled (default), all cross site requests sent with CORS are ignored. + +For more information about CORS, please refer to the [Cross-origin resource sharing page](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + +#### See also +[CORS Settings](#cors-settings) + +## Enable HTTP + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPEnabled`](API/WebServerClass.md#httpenabled)|boolean| +|`WEB SET OPTION`|`Web HTTP enabled`|| +|Settings dialog box|Configuration page/Enable HTTP|| + +Indicates whether or not the web server will accept non-secure connections. + + +## Enable HTTPS + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPSEnabled`](API/WebServerClass.md#httpsenabled)|boolean| +|`WEB SET OPTION`|`Web HTTPS enabled`|| +|Settings dialog box|Configuration page/Enable HTTPS|| + +Status for communication over HTTPS. This option is described in [this section](Admin/tls.md). + + +## Enable HSTS + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HSTSEnabled`](API/WebServerClass.md#hstsenabled)|Boolean, true to enable HSTS (default is false)| +|`WEB SET OPTION`|`Web HSTS enabled`|0 (disabled, default) or 1 (enabled)| + +HTTP Strict Transport Security (HSTS) status. + +When [HTTPS is enabled](#enable-https), keep in mind that if [HTTP is also enabled](#enable-http), the browser can still switch between HTTPS and HTTP (for example, in the browser URL area, the user can replace "https" by "http"). To forbid http redirections, you can [disable HTTP](#enable-http), however in this case an error message is displayed to client HTTP requests. + +HSTS allows the 4D web server to declare that browsers should only interact with it via secure HTTPS connections. Once activated, the 4D web server will automatically add HSTS-related information to all response headers. Browsers will record the HSTS information the first time they receive a response from the 4D web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the Web **HSTS max age** setting. + +> HSTS requires that HTTPS is [enabled](enable-https) on the server. [HTTP](enable-http) must also be enabled to allow client initial connections. + +> You can get the current connection mode using the `WEB Is secured connection` command. + + +## HSTS Max Age + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage)|number in seconds| +|`WEB SET OPTION`|`Web HSTS max age`|number in seconds| + +Specifies the maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. +Default value is 63072000 (2 years) + +> **Warning:** Once HSTS is enabled, client connections will continue to use this mechanism for the specified duration. When you are testing your applications, it is recommended to set a short duration to be able to switch between secured and non-secured connection modes if necessary. + + + + + +## HTTP Compression Level + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel)|| +|`WEB SET OPTION`|`Web HTTP compression level`|Applies to Web and Web Service | + +Compression level for all compressed HTTP exchanges for the 4D web server (client requests or server replies). This setting lets you optimize exchanges by either privileging speed of execution (less compression) or the amount of compression (less speed). The choice of a value depends on the size and type of data exchanged. + +Pass 1 to 9 as value where 1 is the fastest compression and 9 the highest. You can also pass -1 to get a compromise between speed and rate of compression. By default, the compression level is 1 (faster compression). + +## HTTP Compression Threshold + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold)|| +|`WEB SET OPTION`|`Web HTTP compression threshold`|| + +In the framework of optimized HTTP exchanges, size threshold for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Pass the size expressed in bytes as value. By default, the compression threshold is set to 1024 bytes. + + +## HTTP Port + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPPort`](API/WebServerClass.md#httpport)|number| +|`WEB SET OPTION`|`Web port ID`|| +|Settings dialog box|Configuration page/HTTP Port|| + +Listening IP (TCP) port number for HTTP. By default, 4D publishes a web application on the regular Web HTTP Port (TCP port), which is port 80. If that port is already used by another web service, you need to change the HTTP Port used by 4D for this database. + +> In macOS, modifying the HTTP port allows you to start the 4D web server without being the root user of the machine (see [macOS HelperTool](#macos-helpertool)). + +From a web browser, you need to include the non-default HTTP port number into the address you enter for connecting to the web application. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the HTTP port number 8080, you will specify "123.4.567.89:8080". + +>**Warning**: If you use TCP port numbers other than the default numbers (80 for standard HTTP and 443 for HTTPS), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals (for example, in the 2000's or 3000's). + +If you specify 0, 4D will use the default HTTP port number 80. + + +## HTTP Trace + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPTrace`](API/WebServerClass.md#httptrace)|Boolean, default = false | +|`WEB SET OPTION`|`Web HTTP TRACE`|Integer, default = 0 (disabled)| + +HTTP TRACE method activation in the 4D web server. For security reasons, by default the 4D web server rejects HTTP TRACE requests with an error 405. If necessary, you can enable the HTTP TRACE method, in which case the 4D Web server replies to HTTP TRACE requests with the request line, header, and body. + + + + +## HTTPS Port + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`HTTPSPort`](API/WebServerClass.md#httpsport)|number| +|`WEB SET OPTION`|`Web HTTPS port ID`|| +|Settings dialog box|Configuration page/HTTPS Port|| + +Listening IP port number for HTTPS connections via TLS. By default, the value is 443 (standard value). See also [HTTP Port](#http-port) for information on port numbers. + + +## Inactive Process Timeout + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout)|| +|`WEB SET OPTION`|`Web inactive process timeout`|| +|Settings dialog box|Options (I) page/Inactive Process Timeout|Slider| + +Life duration (in minutes) of inactive processes associated with sessions. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. + +Default: 480 minutes (pass 0 to restore the default value) + + +## Inactive Session Timeout + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout)|| +|`WEB SET OPTION`|`Web inactive session timeout`|| + +Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default: 480 minutes (pass 0 to restore the default value) + + +## IP Address to listen + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten)|| +|`WEB SET OPTION`|`Web IP address to listen`|| +|Settings dialog box|Configuration page/IP Address|Pop up menu| + +IP address strings on which the 4D web server will receive HTTP requests (4D local and 4D Server). + +By default, no specific address is defined (**Any** value in the Settings dialog box), which means that the server responds to all IP addresses. When you designate a specific address, the server only responds to requests sent to this address. This feature is designed for 4D web servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most host providers. + +Possible values: IP address string. Both IPv6 string formats (e.g. "2001:0db8:0000:0000:0000:ff00:0042:8329") and IPv4 string formats (e.g. "123.45.67.89") are supported. + +#### About IPv6 support + +* **No warning when TCP port is occupied**
    +When the server is set to respond on "Any" IP addresses, if the TCP port is being used by another application, this is not indicated when the server is started. In fact, 4D server does not detect any error in this case because the port remains free on the IPv6 address. However, it is not possible to access it using the IPv4 address of the machine, nor by means of the local address: 127.0.0.1.

    +If your 4D server does not seem to be responding on the port defined, you can test the address [::1] on the server machine (equivalent to 127.0.0.1 for IPv6, add [:portNum] to test another port number). If 4D responds, it is likely that another application is using the port in IPv4. + +* **IPv4-mapped IPv6 addresses**
    +To standardize processing, 4D provides a standard hybrid representation of IPv4 addresses in IPv6. These addresses are written with a 96-bit prefix in IPv6 format, followed by 32 bits written in the dot-decimal notation of IPv4. For example, ::ffff:192.168.2.34 represents the IPv4 address 192.168.2.34. + +* **Indication of port numbers**
    +Since IPv6 notation uses colons (:), adding port numbers may lead to some confusion, for example: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6 address + 2001:0DB8::85a3:0:ac1f:8001:8081 // IPv6 address with port 8081 +``` + +To avoid this confusion, we recommend using the [ ] notation whenever you combine an IPv6 address with a port number, for instance: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 //IPv6 address with port 8081 +``` + +## Keep Session + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`keepSession`](API/WebServerClass.md#keepsession)|| +|`WEB SET OPTION`|`Web keep session`|| +|Settings dialog box|Options (I) page/Automatic Session Management|| + +Session management enabling status for the 4D web server. Session mechanism is described in the [Session Management](sessions.md) section. + +Default is true (enabled). + +> When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). + + +## Log Recording + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`logRecording`](API/WebServerClass.md#logrecording)|| +|`WEB SET OPTION`|`Web log recording`|| +|Settings dialog box|Log (type) page/Log Format|Pop up menu| + +Starts or stops the recording of requests received by the 4D web server in the *logweb.txt* file and sets its format. By default, requests are not recorded (0/No Log File). When enabled, the *logweb.txt* file is automatically placed in the Logs folder. + +This setting allows you to select the format of this file. Available values are: + +|Value|Format name|Description| +|---|---|---| +|0|No Log File|Default| +|1|Record in CLF format|Common Log Format - Each line of the file represents a request, such as: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - Each field is separated by a space and each line ends by the CR/LF sequence.| +|2|Record in DLF format|Combined Log Format - Similar to CLF format but adds two additional HTTP fields at the end of each request: Referer and User-agent.| +|3|Record in ELF format|Extended Log Format - To be customized in the Settings dialog box| +|4|Record in WLF format|WebStar Log Format - To be customized in the Settings dialog box| + +> Formats 3 and 4 are custom formats whose contents must be set beforehand in the Settings dialog box. If you use one of these formats without any of its fields having been selected on this page, the log file will not be generated. + + +## Maximum Concurrent Web Processes + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses)|| +|`WEB SET OPTION`|`Web max concurrent processes`|| +|Settings dialog box|Options (I) page/Maximum Concurrent Web Processes|| + +Strictly high limit of concurrent web processes that can be simultaneously open on the server. This parameter allows prevention of server saturation as the result of massive number of requests. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the HTTP status `503 - Service Unavailable` to all new requests. + +By default, the value is 100. You can set the number anywhere between 10 and 32000. + + +## Maximum Request Size + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`maxRequestSize`](API/WebServerClass.md#maxrequestsize)|| +|`WEB SET OPTION`|`Web maximum requests size`|| + +Maximum size (in bytes) of incoming HTTP requests (POST) that the web server is authorized to process. By default, the value is 2 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147 483 648) means that, in practice, no limit is set. + +This limit is used to avoid web server saturation due to incoming requests that are too large. When a request reaches this limit, the 4D web server rejects it. + +Possible values: 500 000 to 2 147 483 648. + + +## Maximum Session Number + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`maxSessions`](API/WebServerClass.md#maxsessions)|| +|`WEB SET OPTION`|`Web max sessions `|| + +Maximum number of simultaneous sessions. When you reach the limit set, the oldest session is closed (and `On Web Close Process` database method is called) if the Web server needs to create a new one. The number of simultaneous sessions cannot exceed the [maximum number of Web processes](#maximum-concurrent-web-processes) (100 by default). + +Default value: 100 (pass 0 to restore the default value). + + +## Minimum TLS Version + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`minTLSVersion`](API/WebServerClass.md#mintlsversion)|number| + +Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (default) +- 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + +> The minimum TLS version used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server and client/server connections. + + +## Name + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`name`](API/WebServerClass.md#name)|| + + +Name of the web server application. Useful when component web servers are started. + +## OpenSSL Version + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`openSSLVersion`](API/WebServerClass.md#opensslversion)|Read-only| + +Version of the OpenSSL library used. + + +## Perfect Forward Secrecy + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy)|Boolean, read-only| + +True if PFS is available on the web server (see [TLS](Admin/tls.md#perfect-forward-secrecy-pfs) section). + + +## Robots.txt + +Certain robots (query engines, spiders...) scroll through web servers and static pages. If you do not want robots to be able to access your entire site, you can define which URLs they are not allowed to access. + +To do so, put the ROBOTS.TXT file at the server's root. This file must be structured in the following manner: + +```4d + User-Agent: + Disallow: or +``` + +For example: + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* “User-Agent: *†- all robots are affected. +* “Disallow: /4D†- robots are not allowed to access URLs beginning with /4D. +* “Disallow: /%23%23†- robots are not allowed to access URLs beginning with /%23%23. +* “Disallow: /GIFS/’ - robots are not allowed to access the /GIFS/ folder or its subfolders. + +Another example: + +```code4d + User-Agent: * + Disallow: / +``` + +In this case, robots are not allowed to access the entire site. + + +## Root Folder + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`rootFolder`](API/WebServerClass.md#rootfolder)|Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function| +|`WEB SET ROOT FOLDER`||| +|Settings dialog box|Configuration page/Default HTML Root|| + +Path of web server root folder, i.e. the folder in which 4D will search for the static and semi-dynamic HTML pages, pictures, etc., to send to the browsers. The path is formatted in POSIX full path. The web server will need to be restarted in order for the new root folder to be taken into account. + +Moreover, the HTML root folder defines, on the web server hard drive, the hierarchical level above which the files will not be accessible. If a requested URL or a 4D command tries to access a file located above the HTML root folder, an error is returned indicating that the file has not been found. + +By default, 4D defines a HTML Root folder named **WebFolder**. If it does not already exist, the HTML root folder is physically created on disk at the moment the Web server is launched for the first time. The root folder is created: +- with 4D (local) and 4D Server, at the same level as the [Project folder](Project/architecture.md#project-folder). +- with 4D in remote mode, in the local resources folder. + +You can designate another default HTML root folder by entering its pathname. + +- The path is relative to the [Project folder](Project/architecture.md#project-folder) (4D local and 4D Server) or to the folder containing the 4D application or software package (4D in remote mode). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- To "go up" one level in the folder hierarchy, enter “..†(two periods) before the folder name +- The path must not start with a slash (except if you want the HTML root folder to be the Project or 4D remote folder, but for access to the folders above to be forbidden, in which case you can pass "/" as the root folder). + +For example, if you want the HTML root folder to be the "Web" subfolder in the "MyWebApp" folder, enter "MyWebApp/Web". + +> When the HTML root folder is modified, the cache is cleared so as to not store files whose access is restricted. + + + +## Session Cookie Domain + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain)|| +|`WEB SET OPTION`|`Web session cookie domain`|| + +Value of the "domain" field of the session cookie. Useful for controlling the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + +## Session Cookie Name + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`sessionCookieName`](API/WebServerClass.md#sessioncookiename)|| +|`WEB SET OPTION`|`Web session cookie name`|| + +Name of the cookie used for saving the session ID. Default = "4DSID". + + +## Session Cookie Path + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath)|| +|`WEB SET OPTION`|`Web session cookie path`|| + +"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + +## Session Cookie SameSite + +|Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite)|| + +Value of the `SameSite` attribute value of the session cookie. This attribute allows you to declare if your cookie should be restricted to a first-party or same-site context, as a protection from some cross-site request forgery ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) attacks. + +> For a detailed description of the `SameSite` attribute, please refer to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) or [this web.dev page](https://web.dev/samesite-cookies-explained/). + +Three values are available: + +- "Strict" (default `SameSite` attribute value for 4D session cookies): cookies will only be sent in the first-party context, i.e. context matching the domain of the current site, and never to third-party websites. +- "Lax": Cookies are not sent on cross-site subrequests (for example to load images or frames into a third-party site), but are sent when a user is navigating to the origin site (i.e. they follow a link). +- "None": Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. When "None" value is used, the cookie `Secure` attribute must also be set (or the cookie will be blocked). + +The `Secure` attribute value of the session cookie is automatically set to "True" if the connection is HTTPS (whatever the `SameSite` attribute value). + +> It is not recommended to set `SameSite=None` on a HTTP server since the `Secure` attribute will be missing (used in HTTPS only) and cookies will be blocked. + + + +## Session IP Address Validation + +Can be set with|Name|Comments| +|---|---|---| +|webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| +|`WEB SET OPTION`|`Web session enable IP address validation`|| + +IP address validation status for session cookies. For security reasons, by default the 4D web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 4G/5G networks, their IP address will change. In this case, you must pass 0 in this option to allow clients to be able to continue using their Web sessions even when the IP addresses change. Note that this setting lowers the security level of your application. + +When it is modified, this setting is effective immediately (you do not need to restart the HTTP server). + +Possible values: 0 (disabled) or 1 (enabled, default). + + + + +## Deprecated Settings + +The following settings are still supported but rely on deprecated features or technologies. It is usually recommended to keep default values. + +#### Allow database Access through 4DSYNC URLs + +This option controls the support of HTTP synchronization requests containing deprecated */4DSYNC* URLs. + + +#### Reuse temporary contexts (in remote mode) + +Allows you to optimize the operation of the 4D Web Server in remote mode by reusing web processes created for processing previous web requests. In fact, the web server in 4D needs a specific web process for the handling of each web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. + +When the **Reuse Temporary Contexts** option is checked, in remote mode 4D maintains the specific web processes and reuses them for subsequent requests. By removing the process creation stage, web server performance is improved. + +In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. + +>* This option is checked (and locked) automatically when the **Automatic Session Management** option is checked. In fact, the session management mechanism is actually based on the principle of recycling web processes: each session uses the same process that is maintained during the lifespan of the session. However, note that session processes cannot be "shared" between different sessions: once the session is over, the process is automatically killed (and not reused). It is therefore unnecessary to reset the selections or variables in this case. +> +>* This option only has an effect with a 4D web server in remote mode. With a 4D in local mode, all web processes (other than session processes) are killed after their use. + + + +#### Send Extended Characters Directly + +When this option is checked, the web server sends extended characters “as is†in semi-dynamic pages, without converting them into HTML entities. This option has shown a speed increase on most foreign operating systems (especially the Japanese system). + + +#### Keep-Alive Connections + +The 4D Web Server can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the web browser and the server to save system resources and to optimize transfers. + +The **Use Keep-Alive Connections** option enables or disables keep-alive TCP connections for the web server. This option is enabled by default. In most cases, it is advisable to keep this option check since it accelerates the exchanges. If the web browser does not support connection keep alive, the 4D Web Server automatically switches to HTTP/1.0. + +The 4D Web Server keep-alive function concerns all TCP/IP connections (HTTP, HTTPS). Note however that keep-alive connections are not always used for all 4D web processes. + +In some cases, other optimized internal functions may be invoked. Keep-alive connections are useful mainly for static pages. + +Two options allow you to set how the keep-alive connections work: + +* **Number of requests by connection**: Allows you to set the maximum number of requests and responses able to travel over a connection keep alive. Limiting the number of requests per connection allows you to prevent server flooding due to a large number of incoming requests (a technique used by hackers).

    +The default value (100) can be increased or decreased depending on the resources of the machine hosting the 4D Web Server. + +* **Timeout**: This value defines the maximum wait period (in seconds) during which the web server maintains an open TCP connection without receiving any requests from the web browser. Once this period is over, the server closes the connection.

    +If the web browser sends a request after the connection is closed, a new TCP connection is automatically created. This operation is not visible for the user. + diff --git a/docs/WebServer/webServerObject.md b/docs/WebServer/webServerObject.md index c4aefe6af39536..519120a9ff7209 100644 --- a/docs/WebServer/webServerObject.md +++ b/docs/WebServer/webServerObject.md @@ -3,57 +3,58 @@ id: webServerObject title: Web Server object --- -## Overview -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +A 4D project can start and monitor a web server for the main (host) application as well as each hosted component. -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +For example, if you installed two components in your main application, you can start and monitor up to three independant web servers from your application: -- one web server for the host database, +- one web server for the host application, - one web server for the component #1, - one web server for the component #2. -Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D application project. -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +Each 4D web server, including the main application's web server, is exposed as a specific **object** of the `4D.WebServer` class. Once instantiated, a web server object can be handled from the current application or from any component using a [large number of properties and functions](API/WebServerClass.md). -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). +> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot select the web server to which they apply (see below). -Each web server (host database or component) can be used in its own separate context, including: +Each web server (host application or component) can be used in its own separate context, including: - `On Web Authentication` and `On Web Connection` database method calls - 4D tags processing and method calls, -- managing web sessions and TLS protocols. +- web sessions and TLS protocol management. -This feature allows you to develop independant components and features that come with their own web interfaces. +This allows you to develop independant components and features that come with their own web interfaces. ## Instantiating a web server object -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +The web server object of the host application (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created project: ```4d $nbSrv:=WEB Server list.length //$nbSrv value is 1 ``` -To instantiate a web server object, call the `WEB Server` command: +To instantiate a web server object, call the [`WEB Server`](API/WebServerClass.md#web-server) command: ```4d -C_OBJECT(webServer) + //create an object variable of the 4D.WebServer class +var webServer : 4D.WebServer //call the web server from the current context webServer:=WEB Server + //equivalent to webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: -- the host database's web server from a component or +If the application uses components and you want to call: +- the host application's web server from a component or - the server that received the request (whatever the server), you can also use: ```4d -C_OBJECT(webServer) +var webServer : 4D.WebServer //call the host web server from a component webServer:=WEB Server(Web server host database) //call the target web server @@ -61,19 +62,19 @@ webServer:=WEB Server(Web server receiving request) ``` -## Web server methods +## Web server functions -A web server object contains the following member methods: +A [web server class object](API/WebServerClass.md#web-server-object) contains the following functions: -|Method|Parameter|Return value|Description| +|Functions|Parameter|Return value|Description| |---|---|---|---| -|`start()`|settings (object)|status (object)|Starts the web server| -|`stop()`|-|-|Stops the web server| +|[`start()`](API/WebServerClass.md#start)|settings (object)|status (object)|Starts the web server| +|[`stop()`](API/WebServerClass.md#start)|-|-|Stops the web server| -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +To start and stop a web server, just call the [`start()`](API/WebServerClass.md#start) and [`stop()`](API/WebServerClass.md#stop) functions of the web server object: ```4d -C_OBJECT($status) +var $status : Object //to start a web server with default settings $status:=webServer.start() //to start the web server with custom settings @@ -87,53 +88,18 @@ $status:=webServer.stop() ## Web server properties -A web server object contains the following properties. - -|Property|Type|Description| -|---|---|---| -|certificateFolder|text|Folder where the certificate files are located. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| -|characterSet|number or text|Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server:

  • 4 = ISO-8859-1
  • 12 = ISO-8859-9
  • 13 = ISO-8859-10
  • 17 = Shift-JIS
  • 2024 = Windows-31J
  • 2026 = Big5
  • 38 = euc-kr
  • 106 = UTF-8
  • 2250 = Windows-1250
  • 2251 = Windows-1251
  • 2253 = Windows-1253
  • 2255 = Windows-1255
  • 2256 = Windows-1256| -|cipherSuite|text|Cipher list used for the secure protocol. Sets the priority of ciphering algorithms implemented by the web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site.| -|debugLog|number|Status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number).
  • 0 = disabled
  • 1 = enabled without body parts (body size is provided in this case)
  • 3 = enabled with body parts in response only
  • 5 = enabled with body parts in request only
  • 7 = enabled with body parts in response and request
  • | -|defaultHomepage|text|Name of the default home page or "" to not send the custom home page| -|HSTSEnabled|boolean|HTTP Strict Transport Security (HSTS) status. HSTS allows the Web server to declare that browsers should only interact with it via secure HTTPS connections. Browsers will record the HSTS information the first time they receive a response from the web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the `HSTSMaxAge` property. HSTS requires that HTTPS is enabled on the server. HTTP must also be enabled to allow initial client connections.| -|HSTSMaxAge|number|Maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration.

    Default value: 63072000 (2 years)| -|HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed).

    Possible values:

    • 1 to 9 (where 1 is the fastest compression and 9 the highest).
    • -1 = set a compromise between speed and rate of compression.
    Default = 1 (faster compression).| -|HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges.

    Default compression threshold = 1024 bytes| -|HTTPEnabled|boolean|HTTP protocol state| -|HTTPPort|number|Listening IP port number for HTTP.

    Default = 80| -|HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| -|HTTPSEnabled|boolean|HTTPS protocol state| -|HTTPSPort|number|Listening IP port number for HTTPS.

    Default = 443| -|inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed.

    Default = 480 minutes| -|inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client.

    Default = 480 minutes| -|IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| -|*isRunning*|boolean|Web server running state| -|keepSession|boolean|Session management enabling status

    Default = true| -|logRecording|number|Log requests (logweb.txt) recording value.

  • 0 = Do not record (default)
  • 1 = Record in CLF format
  • 2 = Record in DLF format
  • 3 = Record in ELF format
  • 4 = Record in WLF format
  • | -|maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests.

    Possible values: 10 - 32000

    Default = 100| -|maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it.

    Possible values: 500000 - 2147483648| -|maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| -|minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected.

    Possible values:

  • 1 = `TLSv1_0`
  • 2 = `TLSv1_1`
  • 3 = `TLSv1_2` (default)
  • If modified, the server must be restarted to use the new value.| -|*name*|text|Name of the web server database| -|*openSSLVersion*|text|Version of the OpenSSL library used| -|*perfectForwardSecrecy*|boolean|PFS availability on the server| -|rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| -|sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| -|sessionCookieName|text|Name of the cookie used for storing the session ID.

    Default = "4DSID"| -|sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| -|sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change.

    Note: this setting lowers the security level of your application| +A web server object contains [various properties](API/WebServerClass.md#web-server-object) which configure the web server. These properties are defined: -1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), -2. if not used, using the `WEB SET OPTION` command (host databases only), -3. if not used, in the database settings of the host database or the component. +1. using the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function (except for read-only properties, see below), +2. if not used, using the `WEB SET OPTION` command (host applications only), +3. if not used, in the settings of the host application or the component. - If the web server is not started, the properties contain the values that will be used at the next web server startup. -- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. +- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function. -> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. +> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the [`start()`](API/WebServerClass.md#start) function. ## Scope of the 4D Web commands @@ -142,30 +108,30 @@ The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-S |Command|Scope| |---|---| -|`SET DATABASE PARAMETER`|Host database web server| +|`SET DATABASE PARAMETER`|Host application web server| |`WEB CLOSE SESSION`|Web server that received the request| |`WEB GET BODY PART`|Web server that received the request| |`WEB Get body part count`|Web server that received the request| |`WEB Get Current Session ID`|Web server that received the request| |`WEB GET HTTP BODY`|Web server that received the request| |`WEB GET HTTP HEADER`|Web server that received the request| -|`WEB GET OPTION`|Host database web server| -|`WEB Get server info`|Host database web server| +|`WEB GET OPTION`|Host application web server| +|`WEB Get server info`|Host application web server| |`WEB GET SESSION EXPIRATION`|Web server that received the request| |`WEB Get session process count`|Web server that received the request| -|`WEB GET STATISTICS`|Host database web server| +|`WEB GET STATISTICS`|Host application web server| |`WEB GET VARIABLES`|Web server that received the request| |`WEB Is secured connection`|Web server that received the request| -|`WEB Is server running`|Host database web server| +|`WEB Is server running`|Host application web server| |`WEB SEND BLOB`|Web server that received the request| |`WEB SEND FILE`|Web server that received the request| |`WEB SEND HTTP REDIRECT`|Web server that received the request| |`WEB SEND RAW DATA`|Web server that received the request| |`WEB SEND TEXT`|Web server that received the request| -|`WEB SET HOME PAGE`|Host database web server| +|`WEB SET HOME PAGE`|Host application web server| |`WEB SET HTTP HEADER`|Web server that received the request| -|`WEB SET OPTION`|Host database web server| -|`WEB SET ROOT FOLDER`|Host database web server| -|`WEB START SERVER`|Host database web server| -|`WEB STOP SERVER`|Host database web server| +|`WEB SET OPTION`|Host application web server| +|`WEB SET ROOT FOLDER`|Host application web server| +|`WEB START SERVER`|Host application web server| +|`WEB STOP SERVER`|Host application web server| |`WEB Validate digest`|Web server that received the request| diff --git a/docs/assets/de/API/AutoCompletionEntity.png b/docs/assets/de/API/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/de/API/AutoCompletionEntity.png differ diff --git a/docs/assets/de/API/ClassDiagramImage.png b/docs/assets/de/API/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/de/API/ClassDiagramImage.png differ diff --git a/docs/assets/de/API/ORDA_Classes-3.png b/docs/assets/de/API/ORDA_Classes-3.png new file mode 100644 index 00000000000000..fe5e80712a8f7c Binary files /dev/null and b/docs/assets/de/API/ORDA_Classes-3.png differ diff --git a/docs/assets/de/API/Orda_example.png b/docs/assets/de/API/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/de/API/Orda_example.png differ diff --git a/docs/assets/de/API/api.png b/docs/assets/de/API/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/de/API/api.png differ diff --git a/docs/assets/de/API/classORDA1.png b/docs/assets/de/API/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/de/API/classORDA1.png differ diff --git a/docs/assets/de/API/classORDA2.png b/docs/assets/de/API/classORDA2.png new file mode 100644 index 00000000000000..7204647d1353e7 Binary files /dev/null and b/docs/assets/de/API/classORDA2.png differ diff --git a/docs/assets/de/API/classORDA3.png b/docs/assets/de/API/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/de/API/classORDA3.png differ diff --git a/docs/assets/de/API/classORDA4.png b/docs/assets/de/API/classORDA4.png new file mode 100644 index 00000000000000..67f7d923a46e6d Binary files /dev/null and b/docs/assets/de/API/classORDA4.png differ diff --git a/docs/assets/de/API/classORDA5.png b/docs/assets/de/API/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/de/API/classORDA5.png differ diff --git a/docs/assets/de/API/dataclassAttribute.png b/docs/assets/de/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/de/API/dataclassAttribute.png differ diff --git a/docs/assets/de/API/dataclassAttribute2.png b/docs/assets/de/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/de/API/dataclassAttribute2.png differ diff --git a/docs/assets/de/API/dataclassAttribute3.png b/docs/assets/de/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/de/API/dataclassAttribute3.png differ diff --git a/docs/assets/de/API/dataclassAttribute4.png b/docs/assets/de/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/de/API/dataclassAttribute4.png differ diff --git a/docs/assets/de/API/dsDiagram.png b/docs/assets/de/API/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/de/API/dsDiagram.png differ diff --git a/docs/assets/de/API/formulaAlert.png b/docs/assets/de/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/de/API/formulaAlert.png differ diff --git a/docs/assets/de/API/formulaDialog.png b/docs/assets/de/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/de/API/formulaDialog.png differ diff --git a/docs/assets/de/API/showClass.png b/docs/assets/de/API/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/de/API/showClass.png differ diff --git a/docs/assets/de/API/signal.png b/docs/assets/de/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/de/API/signal.png differ diff --git a/docs/assets/de/Admin/2021-07-27_18h31_35.png b/docs/assets/de/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/de/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/de/Admin/Cert1.png b/docs/assets/de/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/de/Admin/Cert1.png differ diff --git a/docs/assets/de/Admin/Cert2.png b/docs/assets/de/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/de/Admin/Cert2.png differ diff --git a/docs/assets/de/Admin/DEFilter1.png b/docs/assets/de/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/de/Admin/DEFilter1.png differ diff --git a/docs/assets/de/Admin/DEFilter2.png b/docs/assets/de/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/de/Admin/DEFilter2.png differ diff --git a/docs/assets/de/Admin/DEFilter3.png b/docs/assets/de/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/de/Admin/DEFilter3.png differ diff --git a/docs/assets/de/Admin/accessKey.png b/docs/assets/de/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/de/Admin/accessKey.png differ diff --git a/docs/assets/de/Admin/accessKeyEnter.png b/docs/assets/de/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/de/Admin/accessKeyEnter.png differ diff --git a/docs/assets/de/Admin/buildappCertif.png b/docs/assets/de/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/de/Admin/buildappCertif.png differ diff --git a/docs/assets/de/Admin/buildapposxcertProj.png b/docs/assets/de/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/de/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/de/Admin/cacheServera.png b/docs/assets/de/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/de/Admin/cacheServera.png differ diff --git a/docs/assets/de/Admin/cacheServerb.png b/docs/assets/de/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/de/Admin/cacheServerb.png differ diff --git a/docs/assets/de/Admin/cachea.png b/docs/assets/de/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/de/Admin/cachea.png differ diff --git a/docs/assets/de/Admin/cacheb.png b/docs/assets/de/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/de/Admin/cacheb.png differ diff --git a/docs/assets/de/Admin/dark.png b/docs/assets/de/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/de/Admin/dark.png differ diff --git a/docs/assets/de/Admin/dataExplorer1.png b/docs/assets/de/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer1.png differ diff --git a/docs/assets/de/Admin/dataExplorer10.png b/docs/assets/de/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer10.png differ diff --git a/docs/assets/de/Admin/dataExplorer11.png b/docs/assets/de/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer11.png differ diff --git a/docs/assets/de/Admin/dataExplorer12.png b/docs/assets/de/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer12.png differ diff --git a/docs/assets/de/Admin/dataExplorer2.png b/docs/assets/de/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer2.png differ diff --git a/docs/assets/de/Admin/dataExplorer3.png b/docs/assets/de/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer3.png differ diff --git a/docs/assets/de/Admin/dataExplorer4.png b/docs/assets/de/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer4.png differ diff --git a/docs/assets/de/Admin/dataExplorer4b.png b/docs/assets/de/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer4b.png differ diff --git a/docs/assets/de/Admin/dataExplorer5.png b/docs/assets/de/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer5.png differ diff --git a/docs/assets/de/Admin/dataExplorer6.png b/docs/assets/de/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer6.png differ diff --git a/docs/assets/de/Admin/dataExplorer7.png b/docs/assets/de/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer7.png differ diff --git a/docs/assets/de/Admin/dataExplorer8.png b/docs/assets/de/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer8.png differ diff --git a/docs/assets/de/Admin/dataExplorer9.png b/docs/assets/de/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/de/Admin/dataExplorer9.png differ diff --git a/docs/assets/de/Admin/server-admin-application-page.png b/docs/assets/de/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/de/Admin/server-admin-application-page.png differ diff --git a/docs/assets/de/Admin/server-admin-monitor-adv1.png b/docs/assets/de/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/de/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/de/Admin/server-admin-monitor-adv2.png b/docs/assets/de/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/de/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/de/Admin/server-admin-monitor-page.png b/docs/assets/de/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/de/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/de/Admin/server-admin-monitor-snapshot.png b/docs/assets/de/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/de/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/de/Admin/server-admin-process-page.png b/docs/assets/de/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/de/Admin/server-admin-process-page.png differ diff --git a/docs/assets/de/Admin/server-admin-sql-page.png b/docs/assets/de/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/de/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/de/Admin/server-admin-web-page.png b/docs/assets/de/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/de/Admin/server-admin-web-page.png differ diff --git a/docs/assets/de/Admin/server-admin.png b/docs/assets/de/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/de/Admin/server-admin.png differ diff --git a/docs/assets/de/Admin/server-error.png b/docs/assets/de/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/de/Admin/server-error.png differ diff --git a/docs/assets/de/Admin/server-graphic.png b/docs/assets/de/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/de/Admin/server-graphic.png differ diff --git a/docs/assets/de/Admin/server-icon-1.png b/docs/assets/de/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-1.png differ diff --git a/docs/assets/de/Admin/server-icon-10.png b/docs/assets/de/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-10.png differ diff --git a/docs/assets/de/Admin/server-icon-11.png b/docs/assets/de/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/de/Admin/server-icon-11.png differ diff --git a/docs/assets/de/Admin/server-icon-12.png b/docs/assets/de/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/de/Admin/server-icon-12.png differ diff --git a/docs/assets/de/Admin/server-icon-13.png b/docs/assets/de/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-13.png differ diff --git a/docs/assets/de/Admin/server-icon-14.png b/docs/assets/de/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-14.png differ diff --git a/docs/assets/de/Admin/server-icon-15.png b/docs/assets/de/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/de/Admin/server-icon-15.png differ diff --git a/docs/assets/de/Admin/server-icon-16.png b/docs/assets/de/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/de/Admin/server-icon-16.png differ diff --git a/docs/assets/de/Admin/server-icon-17.png b/docs/assets/de/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/de/Admin/server-icon-17.png differ diff --git a/docs/assets/de/Admin/server-icon-18.png b/docs/assets/de/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/de/Admin/server-icon-18.png differ diff --git a/docs/assets/de/Admin/server-icon-19.png b/docs/assets/de/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-19.png differ diff --git a/docs/assets/de/Admin/server-icon-2.png b/docs/assets/de/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-2.png differ diff --git a/docs/assets/de/Admin/server-icon-20.png b/docs/assets/de/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/de/Admin/server-icon-20.png differ diff --git a/docs/assets/de/Admin/server-icon-21.png b/docs/assets/de/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-21.png differ diff --git a/docs/assets/de/Admin/server-icon-22.png b/docs/assets/de/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-22.png differ diff --git a/docs/assets/de/Admin/server-icon-23.png b/docs/assets/de/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-23.png differ diff --git a/docs/assets/de/Admin/server-icon-24.png b/docs/assets/de/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-24.png differ diff --git a/docs/assets/de/Admin/server-icon-25.png b/docs/assets/de/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/de/Admin/server-icon-25.png differ diff --git a/docs/assets/de/Admin/server-icon-3.png b/docs/assets/de/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-3.png differ diff --git a/docs/assets/de/Admin/server-icon-4.png b/docs/assets/de/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-4.png differ diff --git a/docs/assets/de/Admin/server-icon-5.png b/docs/assets/de/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/de/Admin/server-icon-5.png differ diff --git a/docs/assets/de/Admin/server-icon-6.png b/docs/assets/de/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-6.png differ diff --git a/docs/assets/de/Admin/server-icon-7.png b/docs/assets/de/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/de/Admin/server-icon-7.png differ diff --git a/docs/assets/de/Admin/server-icon-8.png b/docs/assets/de/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-8.png differ diff --git a/docs/assets/de/Admin/server-icon-9.png b/docs/assets/de/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/de/Admin/server-icon-9.png differ diff --git a/docs/assets/de/Admin/server-licence-failed.png b/docs/assets/de/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/de/Admin/server-licence-failed.png differ diff --git a/docs/assets/de/Admin/server-maintenance.png b/docs/assets/de/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/de/Admin/server-maintenance.png differ diff --git a/docs/assets/de/Admin/server-message.png b/docs/assets/de/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/de/Admin/server-message.png differ diff --git a/docs/assets/de/Admin/server-process-actions.png b/docs/assets/de/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/de/Admin/server-process-actions.png differ diff --git a/docs/assets/de/Admin/server-process-buttons.png b/docs/assets/de/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/de/Admin/server-process-buttons.png differ diff --git a/docs/assets/de/Admin/server-shut.png b/docs/assets/de/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/de/Admin/server-shut.png differ diff --git a/docs/assets/de/Admin/server-sleeping.png b/docs/assets/de/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/de/Admin/server-sleeping.png differ diff --git a/docs/assets/de/Admin/server-users-sort.png b/docs/assets/de/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/de/Admin/server-users-sort.png differ diff --git a/docs/assets/de/Admin/server-users.png b/docs/assets/de/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/de/Admin/server-users.png differ diff --git a/docs/assets/de/Admin/waMenu1.png b/docs/assets/de/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/de/Admin/waMenu1.png differ diff --git a/docs/assets/de/Admin/waMenu2.png b/docs/assets/de/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/de/Admin/waMenu2.png differ diff --git a/docs/assets/de/Admin/waSettings.png b/docs/assets/de/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/de/Admin/waSettings.png differ diff --git a/docs/assets/de/Admin/waSettings2.png b/docs/assets/de/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/de/Admin/waSettings2.png differ diff --git a/docs/assets/de/Debugging/attach-debugger-dialog-2.png b/docs/assets/de/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/de/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/de/Debugging/attach-debugger-dialog.png b/docs/assets/de/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/de/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/de/Debugging/attachRemoteDebugger.png b/docs/assets/de/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/de/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/de/Debugging/break-list.png b/docs/assets/de/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/de/Debugging/break-list.png differ diff --git a/docs/assets/de/Debugging/break-point.png b/docs/assets/de/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/de/Debugging/break-point.png differ diff --git a/docs/assets/de/Debugging/break.png b/docs/assets/de/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/de/Debugging/break.png differ diff --git a/docs/assets/de/Debugging/breakpoint-properties.png b/docs/assets/de/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/de/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/de/Debugging/call-chain-example.png b/docs/assets/de/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/de/Debugging/call-chain-example.png differ diff --git a/docs/assets/de/Debugging/callChainShowTypes.png b/docs/assets/de/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/de/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/de/Debugging/catch-command.png b/docs/assets/de/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/de/Debugging/catch-command.png differ diff --git a/docs/assets/de/Debugging/contextual-menu.png b/docs/assets/de/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/de/Debugging/contextual-menu.png differ diff --git a/docs/assets/de/Debugging/current-form-values.png b/docs/assets/de/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/de/Debugging/current-form-values.png differ diff --git a/docs/assets/de/Debugging/currentFormValues.png b/docs/assets/de/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/de/Debugging/currentFormValues.png differ diff --git a/docs/assets/de/Debugging/custom-watch-pane-context-menu.png b/docs/assets/de/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/de/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/de/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/de/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/de/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/de/Debugging/custom-watch-pane.png b/docs/assets/de/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/de/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/de/Debugging/customWatchPaneContext.png b/docs/assets/de/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/de/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/de/Debugging/debugger-window-local-to-remove.png b/docs/assets/de/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/de/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/de/Debugging/debugger-window-local.png b/docs/assets/de/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/de/Debugging/debugger-window-local.png differ diff --git a/docs/assets/de/Debugging/debuggerShortcuts.png b/docs/assets/de/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/de/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/de/Debugging/debuggerWindowRemote.png b/docs/assets/de/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/de/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/de/Debugging/dynamicVariableNames.png b/docs/assets/de/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/de/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/de/Debugging/executionToolbarButtons.png b/docs/assets/de/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/de/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/de/Debugging/newCaughtCommand.png b/docs/assets/de/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/de/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/de/Debugging/openDebugger.png b/docs/assets/de/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/de/Debugging/openDebugger.png differ diff --git a/docs/assets/de/Debugging/remote-debugging.png b/docs/assets/de/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/de/Debugging/remote-debugging.png differ diff --git a/docs/assets/de/Debugging/runtime-explorer.png b/docs/assets/de/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/de/Debugging/runtime-explorer.png differ diff --git a/docs/assets/de/Debugging/runtimeError.png b/docs/assets/de/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/de/Debugging/runtimeError.png differ diff --git a/docs/assets/de/Debugging/showTypes.png b/docs/assets/de/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/de/Debugging/showTypes.png differ diff --git a/docs/assets/de/Debugging/sourceCodePane.png b/docs/assets/de/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/de/Debugging/sourceCodePane.png differ diff --git a/docs/assets/de/Debugging/sourceCodePaneContext.png b/docs/assets/de/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/de/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/de/Debugging/sourcePaneTip.png b/docs/assets/de/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/de/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/de/Debugging/syntax-error.png b/docs/assets/de/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/de/Debugging/syntax-error.png differ diff --git a/docs/assets/de/Debugging/syntax-error2.png b/docs/assets/de/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/de/Debugging/syntax-error2.png differ diff --git a/docs/assets/de/Debugging/typing-error.png b/docs/assets/de/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/de/Debugging/typing-error.png differ diff --git a/docs/assets/de/Debugging/watchPane.png b/docs/assets/de/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/de/Debugging/watchPane.png differ diff --git a/docs/assets/de/Debugging/watchPaneOptions.png b/docs/assets/de/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/de/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/de/Desktop/allow-mac-clients.png b/docs/assets/de/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..f1153490abf3f9 Binary files /dev/null and b/docs/assets/de/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/de/FormEditor/alignment.png b/docs/assets/de/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/de/FormEditor/alignment.png differ diff --git a/docs/assets/de/FormEditor/alignmentAssistant.png b/docs/assets/de/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/de/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/de/FormEditor/alignmentContextMenu.png b/docs/assets/de/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/de/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/de/FormEditor/alignmentMenu.png b/docs/assets/de/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/de/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/de/FormEditor/alignmentTools.png b/docs/assets/de/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/de/FormEditor/alignmentTools.png differ diff --git a/docs/assets/de/FormEditor/button.png b/docs/assets/de/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/de/FormEditor/button.png differ diff --git a/docs/assets/de/FormEditor/checkbox.png b/docs/assets/de/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/de/FormEditor/checkbox.png differ diff --git a/docs/assets/de/FormEditor/combo.png b/docs/assets/de/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/de/FormEditor/combo.png differ diff --git a/docs/assets/de/FormEditor/cssIcon.png b/docs/assets/de/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/de/FormEditor/cssIcon.png differ diff --git a/docs/assets/de/FormEditor/cssIconMixed.png b/docs/assets/de/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/de/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/de/FormEditor/cssImportant.png b/docs/assets/de/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/de/FormEditor/cssImportant.png differ diff --git a/docs/assets/de/FormEditor/cssInvalidSyntax.png b/docs/assets/de/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/de/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/de/FormEditor/cssMac.png b/docs/assets/de/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/de/FormEditor/cssMac.png differ diff --git a/docs/assets/de/FormEditor/cssNo.png b/docs/assets/de/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/de/FormEditor/cssNo.png differ diff --git a/docs/assets/de/FormEditor/cssPpropList.png b/docs/assets/de/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/de/FormEditor/cssPpropList.png differ diff --git a/docs/assets/de/FormEditor/cssPpropListImportant.png b/docs/assets/de/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/de/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/de/FormEditor/cssPreview.png b/docs/assets/de/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/de/FormEditor/cssPreview.png differ diff --git a/docs/assets/de/FormEditor/cssPreview_list.png b/docs/assets/de/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/de/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/de/FormEditor/cssPreviewicon.png b/docs/assets/de/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/de/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/de/FormEditor/cssShield.png b/docs/assets/de/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/de/FormEditor/cssShield.png differ diff --git a/docs/assets/de/FormEditor/cssToolbar.png b/docs/assets/de/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/de/FormEditor/cssToolbar.png differ diff --git a/docs/assets/de/FormEditor/cssWin.png b/docs/assets/de/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/de/FormEditor/cssWin.png differ diff --git a/docs/assets/de/FormEditor/darkicon.png b/docs/assets/de/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/de/FormEditor/darkicon.png differ diff --git a/docs/assets/de/FormEditor/displyAndPage.png b/docs/assets/de/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/de/FormEditor/displyAndPage.png differ diff --git a/docs/assets/de/FormEditor/distribution.png b/docs/assets/de/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/de/FormEditor/distribution.png differ diff --git a/docs/assets/de/FormEditor/distributionTool.png b/docs/assets/de/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/de/FormEditor/distributionTool.png differ diff --git a/docs/assets/de/FormEditor/duplcateMany.png b/docs/assets/de/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/de/FormEditor/duplcateMany.png differ diff --git a/docs/assets/de/FormEditor/duplicateObjects.png b/docs/assets/de/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/de/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/de/FormEditor/entryOrder1.png b/docs/assets/de/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/de/FormEditor/entryOrder1.png differ diff --git a/docs/assets/de/FormEditor/entryOrder2.png b/docs/assets/de/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/de/FormEditor/entryOrder2.png differ diff --git a/docs/assets/de/FormEditor/entryOrder3.png b/docs/assets/de/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/de/FormEditor/entryOrder3.png differ diff --git a/docs/assets/de/FormEditor/execute.png b/docs/assets/de/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/de/FormEditor/execute.png differ diff --git a/docs/assets/de/FormEditor/group.png b/docs/assets/de/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/de/FormEditor/group.png differ diff --git a/docs/assets/de/FormEditor/horizontalDistribution.png b/docs/assets/de/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/de/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/de/FormEditor/indicator.png b/docs/assets/de/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/de/FormEditor/indicator.png differ diff --git a/docs/assets/de/FormEditor/input.png b/docs/assets/de/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/de/FormEditor/input.png differ diff --git a/docs/assets/de/FormEditor/layering.png b/docs/assets/de/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/de/FormEditor/layering.png differ diff --git a/docs/assets/de/FormEditor/level.png b/docs/assets/de/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/de/FormEditor/level.png differ diff --git a/docs/assets/de/FormEditor/level2.png b/docs/assets/de/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/de/FormEditor/level2.png differ diff --git a/docs/assets/de/FormEditor/library.png b/docs/assets/de/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/de/FormEditor/library.png differ diff --git a/docs/assets/de/FormEditor/listBoxBuilder1.png b/docs/assets/de/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/de/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/de/FormEditor/listbox.png b/docs/assets/de/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/de/FormEditor/listbox.png differ diff --git a/docs/assets/de/FormEditor/macroClass.png b/docs/assets/de/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/de/FormEditor/macroClass.png differ diff --git a/docs/assets/de/FormEditor/macroSelect.png b/docs/assets/de/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/de/FormEditor/macroSelect.png differ diff --git a/docs/assets/de/FormEditor/macroStructure.png b/docs/assets/de/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/de/FormEditor/macroStructure.png differ diff --git a/docs/assets/de/FormEditor/macroex1.png b/docs/assets/de/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/de/FormEditor/macroex1.png differ diff --git a/docs/assets/de/FormEditor/macroex2.png b/docs/assets/de/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/de/FormEditor/macroex2.png differ diff --git a/docs/assets/de/FormEditor/magneticGrid1.png b/docs/assets/de/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/de/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/de/FormEditor/magneticGrid2.png b/docs/assets/de/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/de/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/de/FormEditor/moving.png b/docs/assets/de/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/de/FormEditor/moving.png differ diff --git a/docs/assets/de/FormEditor/objectBar.png b/docs/assets/de/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/de/FormEditor/objectBar.png differ diff --git a/docs/assets/de/FormEditor/objectLibrary.png b/docs/assets/de/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/de/FormEditor/objectLibrary.png differ diff --git a/docs/assets/de/FormEditor/plugin.png b/docs/assets/de/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/de/FormEditor/plugin.png differ diff --git a/docs/assets/de/FormEditor/radio.png b/docs/assets/de/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/de/FormEditor/radio.png differ diff --git a/docs/assets/de/FormEditor/rectangle.png b/docs/assets/de/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/de/FormEditor/rectangle.png differ diff --git a/docs/assets/de/FormEditor/selectMultiple.png b/docs/assets/de/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/de/FormEditor/selectMultiple.png differ diff --git a/docs/assets/de/FormEditor/selectResize.png b/docs/assets/de/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/de/FormEditor/selectResize.png differ diff --git a/docs/assets/de/FormEditor/selection.png b/docs/assets/de/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/de/FormEditor/selection.png differ diff --git a/docs/assets/de/FormEditor/shields.png b/docs/assets/de/FormEditor/shields.png index 21c805438c888a..aaae4df4f580ed 100644 Binary files a/docs/assets/de/FormEditor/shields.png and b/docs/assets/de/FormEditor/shields.png differ diff --git a/docs/assets/de/FormEditor/shields2.png b/docs/assets/de/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/de/FormEditor/shields2.png differ diff --git a/docs/assets/de/FormEditor/showHideElements.png b/docs/assets/de/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/de/FormEditor/showHideElements.png differ diff --git a/docs/assets/de/FormEditor/splitter.png b/docs/assets/de/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/de/FormEditor/splitter.png differ diff --git a/docs/assets/de/FormEditor/text.png b/docs/assets/de/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/de/FormEditor/text.png differ diff --git a/docs/assets/de/FormEditor/toolbar.png b/docs/assets/de/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/de/FormEditor/toolbar.png differ diff --git a/docs/assets/de/FormEditor/views.png b/docs/assets/de/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/de/FormEditor/views.png differ diff --git a/docs/assets/de/FormEditor/zOrder.png b/docs/assets/de/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/de/FormEditor/zOrder.png differ diff --git a/docs/assets/de/FormEditor/zoom.png b/docs/assets/de/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/de/FormEditor/zoom.png differ diff --git a/docs/assets/de/FormObjects/fruits1.png b/docs/assets/de/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/de/FormObjects/fruits1.png differ diff --git a/docs/assets/de/FormObjects/fruits2.png b/docs/assets/de/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/de/FormObjects/fruits2.png differ diff --git a/docs/assets/de/FormObjects/fruits3.png b/docs/assets/de/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/de/FormObjects/fruits3.png differ diff --git a/docs/assets/de/FormObjects/popupDropdown_hierar.png b/docs/assets/de/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/de/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/de/ORDA/AutoCompletionEntity.png b/docs/assets/de/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..9e096b1c07fe78 Binary files /dev/null and b/docs/assets/de/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/de/ORDA/ClassDiagramImage.png b/docs/assets/de/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/de/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/de/ORDA/ExposeDataclass.png b/docs/assets/de/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/de/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/de/ORDA/ORDA_Classes-3.png b/docs/assets/de/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/de/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/de/ORDA/Orda_example.png b/docs/assets/de/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/de/ORDA/Orda_example.png differ diff --git a/docs/assets/de/ORDA/api.png b/docs/assets/de/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/de/ORDA/api.png differ diff --git a/docs/assets/de/ORDA/classORDA1.png b/docs/assets/de/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/de/ORDA/classORDA1.png differ diff --git a/docs/assets/de/ORDA/classORDA2.png b/docs/assets/de/ORDA/classORDA2.png new file mode 100644 index 00000000000000..fa0a6f6f82607f Binary files /dev/null and b/docs/assets/de/ORDA/classORDA2.png differ diff --git a/docs/assets/de/ORDA/classORDA3.png b/docs/assets/de/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/de/ORDA/classORDA3.png differ diff --git a/docs/assets/de/ORDA/classORDA4.png b/docs/assets/de/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/de/ORDA/classORDA4.png differ diff --git a/docs/assets/de/ORDA/classORDA5.png b/docs/assets/de/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/de/ORDA/classORDA5.png differ diff --git a/docs/assets/de/ORDA/companyTable.png b/docs/assets/de/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/de/ORDA/companyTable.png differ diff --git a/docs/assets/de/ORDA/concurrent1.png b/docs/assets/de/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/de/ORDA/concurrent1.png differ diff --git a/docs/assets/de/ORDA/concurrent2.png b/docs/assets/de/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/de/ORDA/concurrent2.png differ diff --git a/docs/assets/de/ORDA/concurrent3.png b/docs/assets/de/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/de/ORDA/concurrent3.png differ diff --git a/docs/assets/de/ORDA/dataclassProperties.png b/docs/assets/de/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/de/ORDA/dataclassProperties.png differ diff --git a/docs/assets/de/ORDA/datastoreMapping.png b/docs/assets/de/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/de/ORDA/datastoreMapping.png differ diff --git a/docs/assets/de/ORDA/debug1.png b/docs/assets/de/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/de/ORDA/debug1.png differ diff --git a/docs/assets/de/ORDA/deezer.png b/docs/assets/de/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/de/ORDA/deezer.png differ diff --git a/docs/assets/de/ORDA/dsDiagram.png b/docs/assets/de/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/de/ORDA/dsDiagram.png differ diff --git a/docs/assets/de/ORDA/entityAttributes.png b/docs/assets/de/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/de/ORDA/entityAttributes.png differ diff --git a/docs/assets/de/ORDA/entityAttributes2.png b/docs/assets/de/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/de/ORDA/entityAttributes2.png differ diff --git a/docs/assets/de/ORDA/entityAttributes3.png b/docs/assets/de/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/de/ORDA/entityAttributes3.png differ diff --git a/docs/assets/de/ORDA/entityRef1.png b/docs/assets/de/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/de/ORDA/entityRef1.png differ diff --git a/docs/assets/de/ORDA/entityRef2.png b/docs/assets/de/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/de/ORDA/entityRef2.png differ diff --git a/docs/assets/de/ORDA/entitySelectionRelationAttributes.png b/docs/assets/de/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/de/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/de/ORDA/mainConcepts.png b/docs/assets/de/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/de/ORDA/mainConcepts.png differ diff --git a/docs/assets/de/ORDA/optimisticLock1.png b/docs/assets/de/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/de/ORDA/optimisticLock1.png differ diff --git a/docs/assets/de/ORDA/optimisticLock2.png b/docs/assets/de/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/de/ORDA/optimisticLock2.png differ diff --git a/docs/assets/de/ORDA/optimisticLock3.png b/docs/assets/de/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/de/ORDA/optimisticLock3.png differ diff --git a/docs/assets/de/ORDA/relationProperties.png b/docs/assets/de/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/de/ORDA/relationProperties.png differ diff --git a/docs/assets/de/ORDA/sessionAdmin.png b/docs/assets/de/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/de/ORDA/sessionAdmin.png differ diff --git a/docs/assets/de/ORDA/sessions.png b/docs/assets/de/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/de/ORDA/sessions.png differ diff --git a/docs/assets/de/ORDA/showClass.png b/docs/assets/de/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/de/ORDA/showClass.png differ diff --git a/docs/assets/de/ORDA/struc.png b/docs/assets/de/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/de/ORDA/struc.png differ diff --git a/docs/assets/de/ORDA/struc2.png b/docs/assets/de/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/de/ORDA/struc2.png differ diff --git a/docs/assets/de/ORDA/struc2s.png b/docs/assets/de/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/de/ORDA/struc2s.png differ diff --git a/docs/assets/de/Preferences/categories.png b/docs/assets/de/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/de/Preferences/categories.png differ diff --git a/docs/assets/de/Preferences/general1.png b/docs/assets/de/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/de/Preferences/general1.png differ diff --git a/docs/assets/de/Preferences/general2.png b/docs/assets/de/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/de/Preferences/general2.png differ diff --git a/docs/assets/de/Preferences/general3.png b/docs/assets/de/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/de/Preferences/general3.png differ diff --git a/docs/assets/de/Preferences/general4.png b/docs/assets/de/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/de/Preferences/general4.png differ diff --git a/docs/assets/de/Preferences/general5.png b/docs/assets/de/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/de/Preferences/general5.png differ diff --git a/docs/assets/de/Preferences/gitignore.png b/docs/assets/de/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/de/Preferences/gitignore.png differ diff --git a/docs/assets/de/Preferences/langCateg.png b/docs/assets/de/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/de/Preferences/langCateg.png differ diff --git a/docs/assets/de/Preferences/options.png b/docs/assets/de/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/de/Preferences/options.png differ diff --git a/docs/assets/de/Preferences/optionsBlockLines.png b/docs/assets/de/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/de/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/de/Preferences/optionsClosing.png b/docs/assets/de/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/de/Preferences/optionsClosing.png differ diff --git a/docs/assets/de/Preferences/optionsClosing2.png b/docs/assets/de/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/de/Preferences/optionsClosing2.png differ diff --git a/docs/assets/de/Preferences/optionsHideIcons.png b/docs/assets/de/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/de/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/de/Preferences/optionsIndent.png b/docs/assets/de/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/de/Preferences/optionsIndent.png differ diff --git a/docs/assets/de/Preferences/optionsLine.png b/docs/assets/de/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/de/Preferences/optionsLine.png differ diff --git a/docs/assets/de/Preferences/optionsLogicalBlocks.png b/docs/assets/de/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/de/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/de/Preferences/optionsRectangle.png b/docs/assets/de/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/de/Preferences/optionsRectangle.png differ diff --git a/docs/assets/de/Preferences/optionsVariables.png b/docs/assets/de/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/de/Preferences/optionsVariables.png differ diff --git a/docs/assets/de/Preferences/overviewAccess.png b/docs/assets/de/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/de/Preferences/overviewAccess.png differ diff --git a/docs/assets/de/Preferences/overviewSettings.png b/docs/assets/de/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/de/Preferences/overviewSettings.png differ diff --git a/docs/assets/de/Preferences/overviewUser.png b/docs/assets/de/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/de/Preferences/overviewUser.png differ diff --git a/docs/assets/de/Preferences/shortcuts.png b/docs/assets/de/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/de/Preferences/shortcuts.png differ diff --git a/docs/assets/de/Preferences/suggestionsAutoOpen.png b/docs/assets/de/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/de/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/de/Preferences/themes.png b/docs/assets/de/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/de/Preferences/themes.png differ diff --git a/docs/assets/de/Project/4Dlinkfiles.png b/docs/assets/de/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/de/Project/4Dlinkfiles.png differ diff --git a/docs/assets/de/Project/buildappCSProj.png b/docs/assets/de/Project/buildappCSProj.png index bbbdd0dbc38997..2ee87c60eefb8c 100644 Binary files a/docs/assets/de/Project/buildappCSProj.png and b/docs/assets/de/Project/buildappCSProj.png differ diff --git a/docs/assets/de/Project/comp1.png b/docs/assets/de/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/de/Project/comp1.png differ diff --git a/docs/assets/de/Project/compDoc.png b/docs/assets/de/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/de/Project/compDoc.png differ diff --git a/docs/assets/de/Project/compileModes.png b/docs/assets/de/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/de/Project/compileModes.png differ diff --git a/docs/assets/de/Project/compilerWin1.png b/docs/assets/de/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/de/Project/compilerWin1.png differ diff --git a/docs/assets/de/Project/compilerWin2.png b/docs/assets/de/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/de/Project/compilerWin2.png differ diff --git a/docs/assets/de/Project/compilerWin3.png b/docs/assets/de/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/de/Project/compilerWin3.png differ diff --git a/docs/assets/de/Project/compilerWin4.png b/docs/assets/de/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/de/Project/compilerWin4.png differ diff --git a/docs/assets/de/Project/compilerWin5.png b/docs/assets/de/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/de/Project/compilerWin5.png differ diff --git a/docs/assets/de/Project/compilerWin6.png b/docs/assets/de/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/de/Project/compilerWin6.png differ diff --git a/docs/assets/de/Project/success.png b/docs/assets/de/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/de/Project/success.png differ diff --git a/docs/assets/de/REST/login.png b/docs/assets/de/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/de/REST/login.png differ diff --git a/docs/assets/de/REST/ordastructure.png b/docs/assets/de/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/de/REST/ordastructure.png differ diff --git a/docs/assets/de/WebServer/authenticate.png b/docs/assets/de/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/de/WebServer/authenticate.png differ diff --git a/docs/assets/de/WebServer/authenticate2.png b/docs/assets/de/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/de/WebServer/authenticate2.png differ diff --git a/docs/assets/de/WebServer/authenticate3.png b/docs/assets/de/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/de/WebServer/authenticate3.png differ diff --git a/docs/assets/de/WebServer/authentication.png b/docs/assets/de/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/de/WebServer/authentication.png differ diff --git a/docs/assets/de/WebServer/backup.png b/docs/assets/de/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/de/WebServer/backup.png differ diff --git a/docs/assets/de/WebServer/config.png b/docs/assets/de/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/de/WebServer/config.png differ diff --git a/docs/assets/de/WebServer/defaultHomePage.png b/docs/assets/de/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/de/WebServer/defaultHomePage.png differ diff --git a/docs/assets/de/WebServer/errorPage.png b/docs/assets/de/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/de/WebServer/errorPage.png differ diff --git a/docs/assets/de/WebServer/exampleSession.png b/docs/assets/de/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/de/WebServer/exampleSession.png differ diff --git a/docs/assets/de/WebServer/hello.png b/docs/assets/de/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/de/WebServer/hello.png differ diff --git a/docs/assets/de/WebServer/hello0.png b/docs/assets/de/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/de/WebServer/hello0.png differ diff --git a/docs/assets/de/WebServer/hello2.png b/docs/assets/de/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/de/WebServer/hello2.png differ diff --git a/docs/assets/de/WebServer/hello3.png b/docs/assets/de/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/de/WebServer/hello3.png differ diff --git a/docs/assets/de/WebServer/hello3bis.png b/docs/assets/de/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/de/WebServer/hello3bis.png differ diff --git a/docs/assets/de/WebServer/hello4.png b/docs/assets/de/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/de/WebServer/hello4.png differ diff --git a/docs/assets/de/WebServer/hello5.png b/docs/assets/de/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/de/WebServer/hello5.png differ diff --git a/docs/assets/de/WebServer/hello6.png b/docs/assets/de/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/de/WebServer/hello6.png differ diff --git a/docs/assets/de/WebServer/helloUsers.png b/docs/assets/de/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/de/WebServer/helloUsers.png differ diff --git a/docs/assets/de/WebServer/httpCommands.png b/docs/assets/de/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/de/WebServer/httpCommands.png differ diff --git a/docs/assets/de/WebServer/loadBalance.png b/docs/assets/de/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/de/WebServer/loadBalance.png differ diff --git a/docs/assets/de/WebServer/log.png b/docs/assets/de/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/de/WebServer/log.png differ diff --git a/docs/assets/de/WebServer/login1.png b/docs/assets/de/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/de/WebServer/login1.png differ diff --git a/docs/assets/de/WebServer/login2.png b/docs/assets/de/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/de/WebServer/login2.png differ diff --git a/docs/assets/de/WebServer/methodIcon.png b/docs/assets/de/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/de/WebServer/methodIcon.png differ diff --git a/docs/assets/de/WebServer/methodProperties.png b/docs/assets/de/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/de/WebServer/methodProperties.png differ diff --git a/docs/assets/de/WebServer/option1.png b/docs/assets/de/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/de/WebServer/option1.png differ diff --git a/docs/assets/de/WebServer/option2.png b/docs/assets/de/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/de/WebServer/option2.png differ diff --git a/docs/assets/de/WebServer/preemptive.png b/docs/assets/de/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/de/WebServer/preemptive.png differ diff --git a/docs/assets/de/WebServer/processIcon.png b/docs/assets/de/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/de/WebServer/processIcon.png differ diff --git a/docs/assets/de/WebServer/restResource.png b/docs/assets/de/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/de/WebServer/restResource.png differ diff --git a/docs/assets/de/WebServer/schemaSession.png b/docs/assets/de/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/de/WebServer/schemaSession.png differ diff --git a/docs/assets/de/WebServer/serverAccess.png b/docs/assets/de/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/de/WebServer/serverAccess.png differ diff --git a/docs/assets/de/WebServer/session1.png b/docs/assets/de/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/de/WebServer/session1.png differ diff --git a/docs/assets/de/WebServer/settingsSession.png b/docs/assets/de/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/de/WebServer/settingsSession.png differ diff --git a/docs/assets/de/WebServer/spiders.png b/docs/assets/de/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/de/WebServer/spiders.png differ diff --git a/docs/assets/de/WebServer/start1.png b/docs/assets/de/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/de/WebServer/start1.png differ diff --git a/docs/assets/de/WebServer/start2.png b/docs/assets/de/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/de/WebServer/start2.png differ diff --git a/docs/assets/de/WebServer/start3.png b/docs/assets/de/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/de/WebServer/start3.png differ diff --git a/docs/assets/de/WebServer/stop1.png b/docs/assets/de/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/de/WebServer/stop1.png differ diff --git a/docs/assets/de/WebServer/tempo_codeHTML.png b/docs/assets/de/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/de/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/de/WebServer/test1.png b/docs/assets/de/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/de/WebServer/test1.png differ diff --git a/docs/assets/de/WebServer/tls1.png b/docs/assets/de/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/de/WebServer/tls1.png differ diff --git a/docs/assets/de/WebServer/tls2.png b/docs/assets/de/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/de/WebServer/tls2.png differ diff --git a/docs/assets/de/WebServer/tls3.png b/docs/assets/de/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/de/WebServer/tls3.png differ diff --git a/docs/assets/de/WebServer/webServices.png b/docs/assets/de/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/de/WebServer/webServices.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/localremote.png b/docs/assets/de/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/de/getStart/localremote.png differ diff --git a/docs/assets/de/getStart/logo4d.png b/docs/assets/de/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/de/getStart/logo4d.png differ diff --git a/docs/assets/de/getStart/projectCreate1.png b/docs/assets/de/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/de/getStart/projectCreate1.png differ diff --git a/docs/assets/de/getStart/projectCreate2.png b/docs/assets/de/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/de/getStart/projectCreate2.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/de/getStart/serverConnect.png b/docs/assets/de/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/de/getStart/serverConnect.png differ diff --git a/docs/assets/de/getStart/serverConnect2.png b/docs/assets/de/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/de/getStart/serverConnect2.png differ diff --git a/docs/assets/de/getStart/welcome.png b/docs/assets/de/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/de/getStart/welcome.png differ diff --git a/docs/assets/de/getStart/welcome2.png b/docs/assets/de/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/de/getStart/welcome2.png differ diff --git a/docs/assets/de/web-studio/add-component.png b/docs/assets/de/web-studio/add-component.png new file mode 100644 index 00000000000000..37598b30e917f1 Binary files /dev/null and b/docs/assets/de/web-studio/add-component.png differ diff --git a/docs/assets/de/web-studio/breadcrumbs.png b/docs/assets/de/web-studio/breadcrumbs.png new file mode 100644 index 00000000000000..cdd1cfb0bec624 Binary files /dev/null and b/docs/assets/de/web-studio/breadcrumbs.png differ diff --git a/docs/assets/de/web-studio/canvas.png b/docs/assets/de/web-studio/canvas.png new file mode 100644 index 00000000000000..54e414c2fd53d1 Binary files /dev/null and b/docs/assets/de/web-studio/canvas.png differ diff --git a/docs/assets/de/web-studio/components.png b/docs/assets/de/web-studio/components.png new file mode 100644 index 00000000000000..103b70caa82ec1 Binary files /dev/null and b/docs/assets/de/web-studio/components.png differ diff --git a/docs/assets/de/web-studio/data-sources.png b/docs/assets/de/web-studio/data-sources.png new file mode 100644 index 00000000000000..d3356f2909f6cd Binary files /dev/null and b/docs/assets/de/web-studio/data-sources.png differ diff --git a/docs/assets/de/web-studio/events.png b/docs/assets/de/web-studio/events.png new file mode 100644 index 00000000000000..bce05ed645dc50 Binary files /dev/null and b/docs/assets/de/web-studio/events.png differ diff --git a/docs/assets/de/web-studio/explorer.png b/docs/assets/de/web-studio/explorer.png new file mode 100644 index 00000000000000..af8c807e0419e9 Binary files /dev/null and b/docs/assets/de/web-studio/explorer.png differ diff --git a/docs/assets/de/web-studio/image-server-side.png b/docs/assets/de/web-studio/image-server-side.png new file mode 100644 index 00000000000000..ce7e66427d61ac Binary files /dev/null and b/docs/assets/de/web-studio/image-server-side.png differ diff --git a/docs/assets/de/web-studio/number-1-icon.png b/docs/assets/de/web-studio/number-1-icon.png new file mode 100644 index 00000000000000..d391add818165e Binary files /dev/null and b/docs/assets/de/web-studio/number-1-icon.png differ diff --git a/docs/assets/de/web-studio/properties-panel.png b/docs/assets/de/web-studio/properties-panel.png new file mode 100644 index 00000000000000..6ddf6991a32d75 Binary files /dev/null and b/docs/assets/de/web-studio/properties-panel.png differ diff --git a/docs/assets/de/web-studio/style-panel.png b/docs/assets/de/web-studio/style-panel.png new file mode 100644 index 00000000000000..9144cb5055b941 Binary files /dev/null and b/docs/assets/de/web-studio/style-panel.png differ diff --git a/docs/assets/de/web-studio/styles-library.png b/docs/assets/de/web-studio/styles-library.png new file mode 100644 index 00000000000000..675a8ad4bb9f98 Binary files /dev/null and b/docs/assets/de/web-studio/styles-library.png differ diff --git a/docs/assets/de/web-studio/tabs.png b/docs/assets/de/web-studio/tabs.png new file mode 100644 index 00000000000000..59879dedd4c48b Binary files /dev/null and b/docs/assets/de/web-studio/tabs.png differ diff --git a/docs/assets/de/web-studio/web-event-1.png b/docs/assets/de/web-studio/web-event-1.png new file mode 100644 index 00000000000000..bc91acf07754c2 Binary files /dev/null and b/docs/assets/de/web-studio/web-event-1.png differ diff --git a/docs/assets/de/web-studio/web-event-2.png b/docs/assets/de/web-studio/web-event-2.png new file mode 100644 index 00000000000000..8f4cd0251c5c60 Binary files /dev/null and b/docs/assets/de/web-studio/web-event-2.png differ diff --git a/docs/assets/de/web-studio/web-form-object.png b/docs/assets/de/web-studio/web-form-object.png new file mode 100644 index 00000000000000..325e330b0a44f8 Binary files /dev/null and b/docs/assets/de/web-studio/web-form-object.png differ diff --git a/docs/assets/de/web-studio/web-studio-interface.png b/docs/assets/de/web-studio/web-studio-interface.png new file mode 100644 index 00000000000000..7f6232ae4541d0 Binary files /dev/null and b/docs/assets/de/web-studio/web-studio-interface.png differ diff --git a/docs/assets/de/web-studio/web-studio-intro.png b/docs/assets/de/web-studio/web-studio-intro.png new file mode 100644 index 00000000000000..c1b21f201f0ac0 Binary files /dev/null and b/docs/assets/de/web-studio/web-studio-intro.png differ diff --git a/docs/assets/de/web-studio/web-studio.png b/docs/assets/de/web-studio/web-studio.png new file mode 100644 index 00000000000000..997c8548e46cfa Binary files /dev/null and b/docs/assets/de/web-studio/web-studio.png differ diff --git a/docs/assets/de/web-studio/webstudio-home.png b/docs/assets/de/web-studio/webstudio-home.png new file mode 100644 index 00000000000000..a3c85415d866ed Binary files /dev/null and b/docs/assets/de/web-studio/webstudio-home.png differ diff --git a/docs/assets/en/API/dataclassAttribute.png b/docs/assets/en/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/en/API/dataclassAttribute.png differ diff --git a/docs/assets/en/API/dataclassAttribute2.png b/docs/assets/en/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/en/API/dataclassAttribute2.png differ diff --git a/docs/assets/en/API/dataclassAttribute3.png b/docs/assets/en/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/en/API/dataclassAttribute3.png differ diff --git a/docs/assets/en/API/dataclassAttribute4.png b/docs/assets/en/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/en/API/dataclassAttribute4.png differ diff --git a/docs/assets/en/API/entityselection.PNG b/docs/assets/en/API/entityselection.PNG new file mode 100644 index 00000000000000..cfea73675da203 Binary files /dev/null and b/docs/assets/en/API/entityselection.PNG differ diff --git a/docs/assets/en/API/formulaAlert.png b/docs/assets/en/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/en/API/formulaAlert.png differ diff --git a/docs/assets/en/API/formulaDialog.png b/docs/assets/en/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/en/API/formulaDialog.png differ diff --git a/docs/assets/en/API/signal.png b/docs/assets/en/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/en/API/signal.png differ diff --git a/docs/assets/en/Admin/2021-07-27_18h31_35.png b/docs/assets/en/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/en/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/en/Admin/Cert1.png b/docs/assets/en/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/en/Admin/Cert1.png differ diff --git a/docs/assets/en/Admin/Cert2.png b/docs/assets/en/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/en/Admin/Cert2.png differ diff --git a/docs/assets/en/Admin/DEFilter1.png b/docs/assets/en/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/en/Admin/DEFilter1.png differ diff --git a/docs/assets/en/Admin/DEFilter2.png b/docs/assets/en/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/en/Admin/DEFilter2.png differ diff --git a/docs/assets/en/Admin/DEFilter3.png b/docs/assets/en/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/en/Admin/DEFilter3.png differ diff --git a/docs/assets/en/Admin/accessKey.png b/docs/assets/en/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/en/Admin/accessKey.png differ diff --git a/docs/assets/en/Admin/accessKeyEnter.png b/docs/assets/en/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/en/Admin/accessKeyEnter.png differ diff --git a/docs/assets/en/Admin/buildappCertif.png b/docs/assets/en/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/en/Admin/buildappCertif.png differ diff --git a/docs/assets/en/Admin/buildapposxcertProj.png b/docs/assets/en/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/en/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/en/Admin/cacheServera.png b/docs/assets/en/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/en/Admin/cacheServera.png differ diff --git a/docs/assets/en/Admin/cacheServerb.png b/docs/assets/en/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/en/Admin/cacheServerb.png differ diff --git a/docs/assets/en/Admin/cachea.png b/docs/assets/en/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/en/Admin/cachea.png differ diff --git a/docs/assets/en/Admin/cacheb.png b/docs/assets/en/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/en/Admin/cacheb.png differ diff --git a/docs/assets/en/Admin/dark.png b/docs/assets/en/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/en/Admin/dark.png differ diff --git a/docs/assets/en/Admin/dataExplorer1.png b/docs/assets/en/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer1.png differ diff --git a/docs/assets/en/Admin/dataExplorer10.png b/docs/assets/en/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer10.png differ diff --git a/docs/assets/en/Admin/dataExplorer11.png b/docs/assets/en/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer11.png differ diff --git a/docs/assets/en/Admin/dataExplorer12.png b/docs/assets/en/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer12.png differ diff --git a/docs/assets/en/Admin/dataExplorer2.png b/docs/assets/en/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer2.png differ diff --git a/docs/assets/en/Admin/dataExplorer3.png b/docs/assets/en/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer3.png differ diff --git a/docs/assets/en/Admin/dataExplorer4.png b/docs/assets/en/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer4.png differ diff --git a/docs/assets/en/Admin/dataExplorer4b.png b/docs/assets/en/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer4b.png differ diff --git a/docs/assets/en/Admin/dataExplorer5.png b/docs/assets/en/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer5.png differ diff --git a/docs/assets/en/Admin/dataExplorer6.png b/docs/assets/en/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer6.png differ diff --git a/docs/assets/en/Admin/dataExplorer7.png b/docs/assets/en/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer7.png differ diff --git a/docs/assets/en/Admin/dataExplorer8.png b/docs/assets/en/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer8.png differ diff --git a/docs/assets/en/Admin/dataExplorer9.png b/docs/assets/en/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/en/Admin/dataExplorer9.png differ diff --git a/docs/assets/en/Admin/logRequestFlow.PNG b/docs/assets/en/Admin/logRequestFlow.PNG new file mode 100644 index 00000000000000..78895eec878023 Binary files /dev/null and b/docs/assets/en/Admin/logRequestFlow.PNG differ diff --git a/docs/assets/en/Admin/server-admin-application-page.png b/docs/assets/en/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/en/Admin/server-admin-application-page.png differ diff --git a/docs/assets/en/Admin/server-admin-monitor-adv1.png b/docs/assets/en/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/en/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/en/Admin/server-admin-monitor-adv2.png b/docs/assets/en/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/en/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/en/Admin/server-admin-monitor-page.png b/docs/assets/en/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/en/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/en/Admin/server-admin-monitor-snapshot.png b/docs/assets/en/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/en/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/en/Admin/server-admin-process-page.png b/docs/assets/en/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/en/Admin/server-admin-process-page.png differ diff --git a/docs/assets/en/Admin/server-admin-sql-page.png b/docs/assets/en/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/en/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/en/Admin/server-admin-web-page.png b/docs/assets/en/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/en/Admin/server-admin-web-page.png differ diff --git a/docs/assets/en/Admin/server-admin.png b/docs/assets/en/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/en/Admin/server-admin.png differ diff --git a/docs/assets/en/Admin/server-error.png b/docs/assets/en/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/en/Admin/server-error.png differ diff --git a/docs/assets/en/Admin/server-graphic.png b/docs/assets/en/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/en/Admin/server-graphic.png differ diff --git a/docs/assets/en/Admin/server-icon-1.png b/docs/assets/en/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-1.png differ diff --git a/docs/assets/en/Admin/server-icon-10.png b/docs/assets/en/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-10.png differ diff --git a/docs/assets/en/Admin/server-icon-11.png b/docs/assets/en/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/en/Admin/server-icon-11.png differ diff --git a/docs/assets/en/Admin/server-icon-12.png b/docs/assets/en/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/en/Admin/server-icon-12.png differ diff --git a/docs/assets/en/Admin/server-icon-13.png b/docs/assets/en/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-13.png differ diff --git a/docs/assets/en/Admin/server-icon-14.png b/docs/assets/en/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-14.png differ diff --git a/docs/assets/en/Admin/server-icon-15.png b/docs/assets/en/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/en/Admin/server-icon-15.png differ diff --git a/docs/assets/en/Admin/server-icon-16.png b/docs/assets/en/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/en/Admin/server-icon-16.png differ diff --git a/docs/assets/en/Admin/server-icon-17.png b/docs/assets/en/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/en/Admin/server-icon-17.png differ diff --git a/docs/assets/en/Admin/server-icon-18.png b/docs/assets/en/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/en/Admin/server-icon-18.png differ diff --git a/docs/assets/en/Admin/server-icon-19.png b/docs/assets/en/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-19.png differ diff --git a/docs/assets/en/Admin/server-icon-2.png b/docs/assets/en/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-2.png differ diff --git a/docs/assets/en/Admin/server-icon-20.png b/docs/assets/en/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/en/Admin/server-icon-20.png differ diff --git a/docs/assets/en/Admin/server-icon-21.png b/docs/assets/en/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-21.png differ diff --git a/docs/assets/en/Admin/server-icon-22.png b/docs/assets/en/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-22.png differ diff --git a/docs/assets/en/Admin/server-icon-23.png b/docs/assets/en/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-23.png differ diff --git a/docs/assets/en/Admin/server-icon-24.png b/docs/assets/en/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-24.png differ diff --git a/docs/assets/en/Admin/server-icon-25.png b/docs/assets/en/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/en/Admin/server-icon-25.png differ diff --git a/docs/assets/en/Admin/server-icon-3.png b/docs/assets/en/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-3.png differ diff --git a/docs/assets/en/Admin/server-icon-4.png b/docs/assets/en/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-4.png differ diff --git a/docs/assets/en/Admin/server-icon-5.png b/docs/assets/en/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/en/Admin/server-icon-5.png differ diff --git a/docs/assets/en/Admin/server-icon-6.png b/docs/assets/en/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-6.png differ diff --git a/docs/assets/en/Admin/server-icon-7.png b/docs/assets/en/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/en/Admin/server-icon-7.png differ diff --git a/docs/assets/en/Admin/server-icon-8.png b/docs/assets/en/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-8.png differ diff --git a/docs/assets/en/Admin/server-icon-9.png b/docs/assets/en/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/en/Admin/server-icon-9.png differ diff --git a/docs/assets/en/Admin/server-licence-failed.png b/docs/assets/en/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/en/Admin/server-licence-failed.png differ diff --git a/docs/assets/en/Admin/server-maintenance.png b/docs/assets/en/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/en/Admin/server-maintenance.png differ diff --git a/docs/assets/en/Admin/server-message.png b/docs/assets/en/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/en/Admin/server-message.png differ diff --git a/docs/assets/en/Admin/server-process-actions.png b/docs/assets/en/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/en/Admin/server-process-actions.png differ diff --git a/docs/assets/en/Admin/server-process-buttons.png b/docs/assets/en/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/en/Admin/server-process-buttons.png differ diff --git a/docs/assets/en/Admin/server-shut.png b/docs/assets/en/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/en/Admin/server-shut.png differ diff --git a/docs/assets/en/Admin/server-sleeping.png b/docs/assets/en/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/en/Admin/server-sleeping.png differ diff --git a/docs/assets/en/Admin/server-users-sort.png b/docs/assets/en/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/en/Admin/server-users-sort.png differ diff --git a/docs/assets/en/Admin/server-users.png b/docs/assets/en/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/en/Admin/server-users.png differ diff --git a/docs/assets/en/Admin/waMenu1.png b/docs/assets/en/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/en/Admin/waMenu1.png differ diff --git a/docs/assets/en/Admin/waMenu2.png b/docs/assets/en/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/en/Admin/waMenu2.png differ diff --git a/docs/assets/en/Admin/waSettings.png b/docs/assets/en/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/en/Admin/waSettings.png differ diff --git a/docs/assets/en/Admin/waSettings2.png b/docs/assets/en/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/en/Admin/waSettings2.png differ diff --git a/docs/assets/en/Debugging/attach-debugger-dialog-2.png b/docs/assets/en/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/en/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/en/Debugging/attach-debugger-dialog.png b/docs/assets/en/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/en/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/en/Debugging/attachRemoteDebugger.png b/docs/assets/en/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/en/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/en/Debugging/break-list.png b/docs/assets/en/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/en/Debugging/break-list.png differ diff --git a/docs/assets/en/Debugging/break-point.png b/docs/assets/en/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/en/Debugging/break-point.png differ diff --git a/docs/assets/en/Debugging/break.png b/docs/assets/en/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/en/Debugging/break.png differ diff --git a/docs/assets/en/Debugging/breakpoint-properties.png b/docs/assets/en/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/en/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/en/Debugging/call-chain-example.png b/docs/assets/en/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/en/Debugging/call-chain-example.png differ diff --git a/docs/assets/en/Debugging/callChainShowTypes.png b/docs/assets/en/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/en/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/en/Debugging/catch-command.png b/docs/assets/en/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/en/Debugging/catch-command.png differ diff --git a/docs/assets/en/Debugging/contextual-menu.png b/docs/assets/en/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/en/Debugging/contextual-menu.png differ diff --git a/docs/assets/en/Debugging/current-form-values.png b/docs/assets/en/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/en/Debugging/current-form-values.png differ diff --git a/docs/assets/en/Debugging/currentFormValues.png b/docs/assets/en/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/en/Debugging/currentFormValues.png differ diff --git a/docs/assets/en/Debugging/custom-watch-pane-context-menu.png b/docs/assets/en/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/en/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/en/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/en/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/en/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/en/Debugging/custom-watch-pane.png b/docs/assets/en/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/en/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/en/Debugging/customWatchPaneContext.png b/docs/assets/en/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/en/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/en/Debugging/debugger-window-local-to-remove.png b/docs/assets/en/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/en/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/en/Debugging/debugger-window-local.png b/docs/assets/en/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/en/Debugging/debugger-window-local.png differ diff --git a/docs/assets/en/Debugging/debuggerShortcuts.png b/docs/assets/en/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/en/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/en/Debugging/debuggerWindowRemote.png b/docs/assets/en/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/en/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/en/Debugging/dynamicVariableNames.png b/docs/assets/en/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/en/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/en/Debugging/executionToolbarButtons.png b/docs/assets/en/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/en/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/en/Debugging/newCaughtCommand.png b/docs/assets/en/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/en/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/en/Debugging/openDebugger.png b/docs/assets/en/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/en/Debugging/openDebugger.png differ diff --git a/docs/assets/en/Debugging/remote-debugging.png b/docs/assets/en/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/en/Debugging/remote-debugging.png differ diff --git a/docs/assets/en/Debugging/runtime-explorer.png b/docs/assets/en/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/en/Debugging/runtime-explorer.png differ diff --git a/docs/assets/en/Debugging/runtimeError.png b/docs/assets/en/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/en/Debugging/runtimeError.png differ diff --git a/docs/assets/en/Debugging/showTypes.png b/docs/assets/en/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/en/Debugging/showTypes.png differ diff --git a/docs/assets/en/Debugging/sourceCodePane.png b/docs/assets/en/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/en/Debugging/sourceCodePane.png differ diff --git a/docs/assets/en/Debugging/sourceCodePaneContext.png b/docs/assets/en/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/en/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/en/Debugging/sourcePaneTip.png b/docs/assets/en/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/en/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/en/Debugging/syntax-error.png b/docs/assets/en/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/en/Debugging/syntax-error.png differ diff --git a/docs/assets/en/Debugging/syntax-error2.png b/docs/assets/en/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/en/Debugging/syntax-error2.png differ diff --git a/docs/assets/en/Debugging/typing-error.png b/docs/assets/en/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/en/Debugging/typing-error.png differ diff --git a/docs/assets/en/Debugging/watchPane.png b/docs/assets/en/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/en/Debugging/watchPane.png differ diff --git a/docs/assets/en/Debugging/watchPaneOptions.png b/docs/assets/en/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/en/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/en/Desktop/allow-mac-clients.png b/docs/assets/en/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..93e99eee2d00c5 Binary files /dev/null and b/docs/assets/en/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/en/FormEditor/alignment.png b/docs/assets/en/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/en/FormEditor/alignment.png differ diff --git a/docs/assets/en/FormEditor/alignmentAssistant.png b/docs/assets/en/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/en/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/en/FormEditor/alignmentContextMenu.png b/docs/assets/en/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/en/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/en/FormEditor/alignmentMenu.png b/docs/assets/en/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/en/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/en/FormEditor/alignmentTools.png b/docs/assets/en/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/en/FormEditor/alignmentTools.png differ diff --git a/docs/assets/en/FormEditor/button.png b/docs/assets/en/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/en/FormEditor/button.png differ diff --git a/docs/assets/en/FormEditor/checkbox.png b/docs/assets/en/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/en/FormEditor/checkbox.png differ diff --git a/docs/assets/en/FormEditor/combo.png b/docs/assets/en/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/en/FormEditor/combo.png differ diff --git a/docs/assets/en/FormEditor/cssIcon.png b/docs/assets/en/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/en/FormEditor/cssIcon.png differ diff --git a/docs/assets/en/FormEditor/cssIconMixed.png b/docs/assets/en/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/en/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/en/FormEditor/cssImportant.png b/docs/assets/en/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/en/FormEditor/cssImportant.png differ diff --git a/docs/assets/en/FormEditor/cssInvalidSyntax.png b/docs/assets/en/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/en/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/en/FormEditor/cssMac.png b/docs/assets/en/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/en/FormEditor/cssMac.png differ diff --git a/docs/assets/en/FormEditor/cssNo.png b/docs/assets/en/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/en/FormEditor/cssNo.png differ diff --git a/docs/assets/en/FormEditor/cssPpropList.png b/docs/assets/en/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/en/FormEditor/cssPpropList.png differ diff --git a/docs/assets/en/FormEditor/cssPpropListImportant.png b/docs/assets/en/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/en/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/en/FormEditor/cssPreview.png b/docs/assets/en/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/en/FormEditor/cssPreview.png differ diff --git a/docs/assets/en/FormEditor/cssPreview_list.png b/docs/assets/en/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/en/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/en/FormEditor/cssPreviewicon.png b/docs/assets/en/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/en/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/en/FormEditor/cssShield.png b/docs/assets/en/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/en/FormEditor/cssShield.png differ diff --git a/docs/assets/en/FormEditor/cssToolbar.png b/docs/assets/en/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/en/FormEditor/cssToolbar.png differ diff --git a/docs/assets/en/FormEditor/cssWin.png b/docs/assets/en/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/en/FormEditor/cssWin.png differ diff --git a/docs/assets/en/FormEditor/darkicon.png b/docs/assets/en/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/en/FormEditor/darkicon.png differ diff --git a/docs/assets/en/FormEditor/displyAndPage.png b/docs/assets/en/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/en/FormEditor/displyAndPage.png differ diff --git a/docs/assets/en/FormEditor/distribution.png b/docs/assets/en/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/en/FormEditor/distribution.png differ diff --git a/docs/assets/en/FormEditor/distributionTool.png b/docs/assets/en/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/en/FormEditor/distributionTool.png differ diff --git a/docs/assets/en/FormEditor/duplcateMany.png b/docs/assets/en/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/en/FormEditor/duplcateMany.png differ diff --git a/docs/assets/en/FormEditor/duplicateObjects.png b/docs/assets/en/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/en/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/en/FormEditor/entryOrder1.png b/docs/assets/en/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/en/FormEditor/entryOrder1.png differ diff --git a/docs/assets/en/FormEditor/entryOrder2.png b/docs/assets/en/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/en/FormEditor/entryOrder2.png differ diff --git a/docs/assets/en/FormEditor/entryOrder3.png b/docs/assets/en/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/en/FormEditor/entryOrder3.png differ diff --git a/docs/assets/en/FormEditor/execute.png b/docs/assets/en/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/en/FormEditor/execute.png differ diff --git a/docs/assets/en/FormEditor/group.png b/docs/assets/en/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/en/FormEditor/group.png differ diff --git a/docs/assets/en/FormEditor/horizontalDistribution.png b/docs/assets/en/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/en/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/en/FormEditor/indicator.png b/docs/assets/en/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/en/FormEditor/indicator.png differ diff --git a/docs/assets/en/FormEditor/input.png b/docs/assets/en/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/en/FormEditor/input.png differ diff --git a/docs/assets/en/FormEditor/layering.png b/docs/assets/en/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/en/FormEditor/layering.png differ diff --git a/docs/assets/en/FormEditor/level.png b/docs/assets/en/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/en/FormEditor/level.png differ diff --git a/docs/assets/en/FormEditor/level2.png b/docs/assets/en/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/en/FormEditor/level2.png differ diff --git a/docs/assets/en/FormEditor/library.png b/docs/assets/en/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/en/FormEditor/library.png differ diff --git a/docs/assets/en/FormEditor/listBoxBuilder1.png b/docs/assets/en/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/en/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/en/FormEditor/listbox.png b/docs/assets/en/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/en/FormEditor/listbox.png differ diff --git a/docs/assets/en/FormEditor/listboxBuilderIcon.png b/docs/assets/en/FormEditor/listboxBuilderIcon.png index 4c11a5989f23eb..40daf8fccf2aa0 100644 Binary files a/docs/assets/en/FormEditor/listboxBuilderIcon.png and b/docs/assets/en/FormEditor/listboxBuilderIcon.png differ diff --git a/docs/assets/en/FormEditor/macroClass.png b/docs/assets/en/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/en/FormEditor/macroClass.png differ diff --git a/docs/assets/en/FormEditor/macroSelect.png b/docs/assets/en/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/en/FormEditor/macroSelect.png differ diff --git a/docs/assets/en/FormEditor/macroStructure.png b/docs/assets/en/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/en/FormEditor/macroStructure.png differ diff --git a/docs/assets/en/FormEditor/macroex1.png b/docs/assets/en/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/en/FormEditor/macroex1.png differ diff --git a/docs/assets/en/FormEditor/macroex2.png b/docs/assets/en/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/en/FormEditor/macroex2.png differ diff --git a/docs/assets/en/FormEditor/magneticGrid1.png b/docs/assets/en/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/en/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/en/FormEditor/magneticGrid2.png b/docs/assets/en/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/en/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/en/FormEditor/moving.png b/docs/assets/en/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/en/FormEditor/moving.png differ diff --git a/docs/assets/en/FormEditor/objectBar.png b/docs/assets/en/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/en/FormEditor/objectBar.png differ diff --git a/docs/assets/en/FormEditor/objectLibrary.png b/docs/assets/en/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/en/FormEditor/objectLibrary.png differ diff --git a/docs/assets/en/FormEditor/plugin.png b/docs/assets/en/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/en/FormEditor/plugin.png differ diff --git a/docs/assets/en/FormEditor/radio.png b/docs/assets/en/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/en/FormEditor/radio.png differ diff --git a/docs/assets/en/FormEditor/rectangle.png b/docs/assets/en/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/en/FormEditor/rectangle.png differ diff --git a/docs/assets/en/FormEditor/selectMultiple.png b/docs/assets/en/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/en/FormEditor/selectMultiple.png differ diff --git a/docs/assets/en/FormEditor/selectResize.png b/docs/assets/en/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/en/FormEditor/selectResize.png differ diff --git a/docs/assets/en/FormEditor/selection.png b/docs/assets/en/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/en/FormEditor/selection.png differ diff --git a/docs/assets/en/FormEditor/shields.png b/docs/assets/en/FormEditor/shields.png index 21c805438c888a..aaae4df4f580ed 100644 Binary files a/docs/assets/en/FormEditor/shields.png and b/docs/assets/en/FormEditor/shields.png differ diff --git a/docs/assets/en/FormEditor/shields2.png b/docs/assets/en/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/en/FormEditor/shields2.png differ diff --git a/docs/assets/en/FormEditor/showHideElements.png b/docs/assets/en/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/en/FormEditor/showHideElements.png differ diff --git a/docs/assets/en/FormEditor/splitter.png b/docs/assets/en/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/en/FormEditor/splitter.png differ diff --git a/docs/assets/en/FormEditor/text.png b/docs/assets/en/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/en/FormEditor/text.png differ diff --git a/docs/assets/en/FormEditor/toolbar.png b/docs/assets/en/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/en/FormEditor/toolbar.png differ diff --git a/docs/assets/en/FormEditor/views.png b/docs/assets/en/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/en/FormEditor/views.png differ diff --git a/docs/assets/en/FormEditor/zOrder.png b/docs/assets/en/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/en/FormEditor/zOrder.png differ diff --git a/docs/assets/en/FormEditor/zoom.png b/docs/assets/en/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/en/FormEditor/zoom.png differ diff --git a/docs/assets/en/FormObjects/fruits1.png b/docs/assets/en/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/en/FormObjects/fruits1.png differ diff --git a/docs/assets/en/FormObjects/fruits2.png b/docs/assets/en/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/en/FormObjects/fruits2.png differ diff --git a/docs/assets/en/FormObjects/fruits3.png b/docs/assets/en/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/en/FormObjects/fruits3.png differ diff --git a/docs/assets/en/FormObjects/popupDropdown_hierar.png b/docs/assets/en/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/en/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/en/ORDA/AutoCompletionEntity.png b/docs/assets/en/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..9e096b1c07fe78 Binary files /dev/null and b/docs/assets/en/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/en/ORDA/ClassDiagramImage.png b/docs/assets/en/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/en/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/en/ORDA/ExposeDataclass.png b/docs/assets/en/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/en/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/en/ORDA/ORDA_Classes-3.png b/docs/assets/en/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/en/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/en/ORDA/Orda_example.png b/docs/assets/en/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/en/ORDA/Orda_example.png differ diff --git a/docs/assets/en/ORDA/api.png b/docs/assets/en/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/en/ORDA/api.png differ diff --git a/docs/assets/en/ORDA/classORDA1.png b/docs/assets/en/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/en/ORDA/classORDA1.png differ diff --git a/docs/assets/en/ORDA/classORDA2.png b/docs/assets/en/ORDA/classORDA2.png new file mode 100644 index 00000000000000..fa0a6f6f82607f Binary files /dev/null and b/docs/assets/en/ORDA/classORDA2.png differ diff --git a/docs/assets/en/ORDA/classORDA3.png b/docs/assets/en/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/en/ORDA/classORDA3.png differ diff --git a/docs/assets/en/ORDA/classORDA4.png b/docs/assets/en/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/en/ORDA/classORDA4.png differ diff --git a/docs/assets/en/ORDA/classORDA5.png b/docs/assets/en/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/en/ORDA/classORDA5.png differ diff --git a/docs/assets/en/ORDA/companyTable.png b/docs/assets/en/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/en/ORDA/companyTable.png differ diff --git a/docs/assets/en/ORDA/concurrent1.png b/docs/assets/en/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/en/ORDA/concurrent1.png differ diff --git a/docs/assets/en/ORDA/concurrent2.png b/docs/assets/en/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/en/ORDA/concurrent2.png differ diff --git a/docs/assets/en/ORDA/concurrent3.png b/docs/assets/en/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/en/ORDA/concurrent3.png differ diff --git a/docs/assets/en/ORDA/dataclassProperties.png b/docs/assets/en/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/en/ORDA/dataclassProperties.png differ diff --git a/docs/assets/en/ORDA/datastoreMapping.png b/docs/assets/en/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/en/ORDA/datastoreMapping.png differ diff --git a/docs/assets/en/ORDA/debug1.png b/docs/assets/en/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/en/ORDA/debug1.png differ diff --git a/docs/assets/en/ORDA/deezer.png b/docs/assets/en/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/en/ORDA/deezer.png differ diff --git a/docs/assets/en/ORDA/dsDiagram.png b/docs/assets/en/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/en/ORDA/dsDiagram.png differ diff --git a/docs/assets/en/ORDA/entityAttributes.png b/docs/assets/en/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/en/ORDA/entityAttributes.png differ diff --git a/docs/assets/en/ORDA/entityAttributes2.png b/docs/assets/en/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/en/ORDA/entityAttributes2.png differ diff --git a/docs/assets/en/ORDA/entityAttributes3.png b/docs/assets/en/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/en/ORDA/entityAttributes3.png differ diff --git a/docs/assets/en/ORDA/entityRef1.png b/docs/assets/en/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/en/ORDA/entityRef1.png differ diff --git a/docs/assets/en/ORDA/entityRef2.png b/docs/assets/en/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/en/ORDA/entityRef2.png differ diff --git a/docs/assets/en/ORDA/entitySelectionRelationAttributes.png b/docs/assets/en/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/en/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/en/ORDA/mainConcepts.png b/docs/assets/en/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/en/ORDA/mainConcepts.png differ diff --git a/docs/assets/en/ORDA/optimisticLock1.png b/docs/assets/en/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/en/ORDA/optimisticLock1.png differ diff --git a/docs/assets/en/ORDA/optimisticLock2.png b/docs/assets/en/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/en/ORDA/optimisticLock2.png differ diff --git a/docs/assets/en/ORDA/optimisticLock3.png b/docs/assets/en/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/en/ORDA/optimisticLock3.png differ diff --git a/docs/assets/en/ORDA/relationProperties.png b/docs/assets/en/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/en/ORDA/relationProperties.png differ diff --git a/docs/assets/en/ORDA/sessionAdmin.png b/docs/assets/en/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/en/ORDA/sessionAdmin.png differ diff --git a/docs/assets/en/ORDA/sessions.png b/docs/assets/en/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/en/ORDA/sessions.png differ diff --git a/docs/assets/en/ORDA/showClass.png b/docs/assets/en/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/en/ORDA/showClass.png differ diff --git a/docs/assets/en/ORDA/struc.png b/docs/assets/en/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/en/ORDA/struc.png differ diff --git a/docs/assets/en/ORDA/struc2.png b/docs/assets/en/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/en/ORDA/struc2.png differ diff --git a/docs/assets/en/ORDA/struc2s.png b/docs/assets/en/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/en/ORDA/struc2s.png differ diff --git a/docs/assets/en/Preferences/categories.png b/docs/assets/en/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/en/Preferences/categories.png differ diff --git a/docs/assets/en/Preferences/general1.png b/docs/assets/en/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/en/Preferences/general1.png differ diff --git a/docs/assets/en/Preferences/general2.png b/docs/assets/en/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/en/Preferences/general2.png differ diff --git a/docs/assets/en/Preferences/general3.png b/docs/assets/en/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/en/Preferences/general3.png differ diff --git a/docs/assets/en/Preferences/general4.png b/docs/assets/en/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/en/Preferences/general4.png differ diff --git a/docs/assets/en/Preferences/general5.png b/docs/assets/en/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/en/Preferences/general5.png differ diff --git a/docs/assets/en/Preferences/gitignore-icon.PNG b/docs/assets/en/Preferences/gitignore-icon.PNG new file mode 100644 index 00000000000000..48512ca5362899 Binary files /dev/null and b/docs/assets/en/Preferences/gitignore-icon.PNG differ diff --git a/docs/assets/en/Preferences/gitignore.png b/docs/assets/en/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/en/Preferences/gitignore.png differ diff --git a/docs/assets/en/Preferences/langCateg.png b/docs/assets/en/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/en/Preferences/langCateg.png differ diff --git a/docs/assets/en/Preferences/options.png b/docs/assets/en/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/en/Preferences/options.png differ diff --git a/docs/assets/en/Preferences/optionsBlockLines.png b/docs/assets/en/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/en/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/en/Preferences/optionsClosing.png b/docs/assets/en/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/en/Preferences/optionsClosing.png differ diff --git a/docs/assets/en/Preferences/optionsClosing2.png b/docs/assets/en/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/en/Preferences/optionsClosing2.png differ diff --git a/docs/assets/en/Preferences/optionsHideIcons.png b/docs/assets/en/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/en/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/en/Preferences/optionsIndent.png b/docs/assets/en/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/en/Preferences/optionsIndent.png differ diff --git a/docs/assets/en/Preferences/optionsLine.png b/docs/assets/en/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/en/Preferences/optionsLine.png differ diff --git a/docs/assets/en/Preferences/optionsLogicalBlocks.png b/docs/assets/en/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/en/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/en/Preferences/optionsRectangle.png b/docs/assets/en/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/en/Preferences/optionsRectangle.png differ diff --git a/docs/assets/en/Preferences/optionsVariables.png b/docs/assets/en/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/en/Preferences/optionsVariables.png differ diff --git a/docs/assets/en/Preferences/overviewAccess.png b/docs/assets/en/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/en/Preferences/overviewAccess.png differ diff --git a/docs/assets/en/Preferences/overviewSettings.png b/docs/assets/en/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/en/Preferences/overviewSettings.png differ diff --git a/docs/assets/en/Preferences/overviewUser.png b/docs/assets/en/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/en/Preferences/overviewUser.png differ diff --git a/docs/assets/en/Preferences/shortcuts.png b/docs/assets/en/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/en/Preferences/shortcuts.png differ diff --git a/docs/assets/en/Preferences/suggestionsAutoOpen.png b/docs/assets/en/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/en/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/en/Preferences/themeCopy.PNG b/docs/assets/en/Preferences/themeCopy.PNG new file mode 100644 index 00000000000000..4bd1bf4b38058f Binary files /dev/null and b/docs/assets/en/Preferences/themeCopy.PNG differ diff --git a/docs/assets/en/Preferences/themes.png b/docs/assets/en/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/en/Preferences/themes.png differ diff --git a/docs/assets/en/Project/4Dlinkfiles.png b/docs/assets/en/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/en/Project/4Dlinkfiles.png differ diff --git a/docs/assets/en/Project/buildappCSProj.png b/docs/assets/en/Project/buildappCSProj.png index bbbdd0dbc38997..d82887b7730e80 100644 Binary files a/docs/assets/en/Project/buildappCSProj.png and b/docs/assets/en/Project/buildappCSProj.png differ diff --git a/docs/assets/en/Project/comp1.png b/docs/assets/en/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/en/Project/comp1.png differ diff --git a/docs/assets/en/Project/compDoc.png b/docs/assets/en/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/en/Project/compDoc.png differ diff --git a/docs/assets/en/Project/compileModes.png b/docs/assets/en/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/en/Project/compileModes.png differ diff --git a/docs/assets/en/Project/compilerWin1.png b/docs/assets/en/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/en/Project/compilerWin1.png differ diff --git a/docs/assets/en/Project/compilerWin2.png b/docs/assets/en/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/en/Project/compilerWin2.png differ diff --git a/docs/assets/en/Project/compilerWin3.png b/docs/assets/en/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/en/Project/compilerWin3.png differ diff --git a/docs/assets/en/Project/compilerWin4.png b/docs/assets/en/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/en/Project/compilerWin4.png differ diff --git a/docs/assets/en/Project/compilerWin5.png b/docs/assets/en/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/en/Project/compilerWin5.png differ diff --git a/docs/assets/en/Project/compilerWin6.png b/docs/assets/en/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/en/Project/compilerWin6.png differ diff --git a/docs/assets/en/Project/success.png b/docs/assets/en/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/en/Project/success.png differ diff --git a/docs/assets/en/REST/login.png b/docs/assets/en/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/en/REST/login.png differ diff --git a/docs/assets/en/REST/ordastructure.png b/docs/assets/en/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/en/REST/ordastructure.png differ diff --git a/docs/assets/en/WebServer/authenticate.png b/docs/assets/en/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/en/WebServer/authenticate.png differ diff --git a/docs/assets/en/WebServer/authenticate2.png b/docs/assets/en/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/en/WebServer/authenticate2.png differ diff --git a/docs/assets/en/WebServer/authenticate3.png b/docs/assets/en/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/en/WebServer/authenticate3.png differ diff --git a/docs/assets/en/WebServer/authentication.png b/docs/assets/en/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/en/WebServer/authentication.png differ diff --git a/docs/assets/en/WebServer/backup.png b/docs/assets/en/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/en/WebServer/backup.png differ diff --git a/docs/assets/en/WebServer/config.png b/docs/assets/en/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/en/WebServer/config.png differ diff --git a/docs/assets/en/WebServer/defaultHomePage.png b/docs/assets/en/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/en/WebServer/defaultHomePage.png differ diff --git a/docs/assets/en/WebServer/errorPage.png b/docs/assets/en/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/en/WebServer/errorPage.png differ diff --git a/docs/assets/en/WebServer/exampleSession.png b/docs/assets/en/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/en/WebServer/exampleSession.png differ diff --git a/docs/assets/en/WebServer/hello.png b/docs/assets/en/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/en/WebServer/hello.png differ diff --git a/docs/assets/en/WebServer/hello0.png b/docs/assets/en/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/en/WebServer/hello0.png differ diff --git a/docs/assets/en/WebServer/hello2.png b/docs/assets/en/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/en/WebServer/hello2.png differ diff --git a/docs/assets/en/WebServer/hello3.png b/docs/assets/en/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/en/WebServer/hello3.png differ diff --git a/docs/assets/en/WebServer/hello3bis.png b/docs/assets/en/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/en/WebServer/hello3bis.png differ diff --git a/docs/assets/en/WebServer/hello4.png b/docs/assets/en/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/en/WebServer/hello4.png differ diff --git a/docs/assets/en/WebServer/hello5.png b/docs/assets/en/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/en/WebServer/hello5.png differ diff --git a/docs/assets/en/WebServer/hello6.png b/docs/assets/en/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/en/WebServer/hello6.png differ diff --git a/docs/assets/en/WebServer/helloUsers.png b/docs/assets/en/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/en/WebServer/helloUsers.png differ diff --git a/docs/assets/en/WebServer/httpCommands.png b/docs/assets/en/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/en/WebServer/httpCommands.png differ diff --git a/docs/assets/en/WebServer/loadBalance.png b/docs/assets/en/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/en/WebServer/loadBalance.png differ diff --git a/docs/assets/en/WebServer/log.png b/docs/assets/en/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/en/WebServer/log.png differ diff --git a/docs/assets/en/WebServer/login1.png b/docs/assets/en/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/en/WebServer/login1.png differ diff --git a/docs/assets/en/WebServer/login2.png b/docs/assets/en/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/en/WebServer/login2.png differ diff --git a/docs/assets/en/WebServer/methodIcon.png b/docs/assets/en/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/en/WebServer/methodIcon.png differ diff --git a/docs/assets/en/WebServer/methodProperties.png b/docs/assets/en/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/en/WebServer/methodProperties.png differ diff --git a/docs/assets/en/WebServer/option1.png b/docs/assets/en/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/en/WebServer/option1.png differ diff --git a/docs/assets/en/WebServer/option2.png b/docs/assets/en/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/en/WebServer/option2.png differ diff --git a/docs/assets/en/WebServer/preemptive.png b/docs/assets/en/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/en/WebServer/preemptive.png differ diff --git a/docs/assets/en/WebServer/processIcon.png b/docs/assets/en/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/en/WebServer/processIcon.png differ diff --git a/docs/assets/en/WebServer/restResource.png b/docs/assets/en/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/en/WebServer/restResource.png differ diff --git a/docs/assets/en/WebServer/schemaSession.png b/docs/assets/en/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/en/WebServer/schemaSession.png differ diff --git a/docs/assets/en/WebServer/serverAccess.png b/docs/assets/en/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/en/WebServer/serverAccess.png differ diff --git a/docs/assets/en/WebServer/session1.png b/docs/assets/en/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/en/WebServer/session1.png differ diff --git a/docs/assets/en/WebServer/settingsSession.png b/docs/assets/en/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/en/WebServer/settingsSession.png differ diff --git a/docs/assets/en/WebServer/spiders.png b/docs/assets/en/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/en/WebServer/spiders.png differ diff --git a/docs/assets/en/WebServer/start1.png b/docs/assets/en/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/en/WebServer/start1.png differ diff --git a/docs/assets/en/WebServer/start2.png b/docs/assets/en/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/en/WebServer/start2.png differ diff --git a/docs/assets/en/WebServer/start3.png b/docs/assets/en/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/en/WebServer/start3.png differ diff --git a/docs/assets/en/WebServer/stop1.png b/docs/assets/en/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/en/WebServer/stop1.png differ diff --git a/docs/assets/en/WebServer/tempo_codeHTML.png b/docs/assets/en/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/en/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/en/WebServer/test1.png b/docs/assets/en/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/en/WebServer/test1.png differ diff --git a/docs/assets/en/WebServer/tls1.png b/docs/assets/en/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/en/WebServer/tls1.png differ diff --git a/docs/assets/en/WebServer/tls2.png b/docs/assets/en/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/en/WebServer/tls2.png differ diff --git a/docs/assets/en/WebServer/tls3.png b/docs/assets/en/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/en/WebServer/tls3.png differ diff --git a/docs/assets/en/WebServer/webServices.png b/docs/assets/en/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/en/WebServer/webServices.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/localremote.png b/docs/assets/en/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/en/getStart/localremote.png differ diff --git a/docs/assets/en/getStart/logo4d.png b/docs/assets/en/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/en/getStart/logo4d.png differ diff --git a/docs/assets/en/getStart/projectCreate1.png b/docs/assets/en/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/en/getStart/projectCreate1.png differ diff --git a/docs/assets/en/getStart/projectCreate2.png b/docs/assets/en/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/en/getStart/projectCreate2.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/en/getStart/serverConnect.png b/docs/assets/en/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/en/getStart/serverConnect.png differ diff --git a/docs/assets/en/getStart/serverConnect2.png b/docs/assets/en/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/en/getStart/serverConnect2.png differ diff --git a/docs/assets/en/getStart/welcome.png b/docs/assets/en/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/en/getStart/welcome.png differ diff --git a/docs/assets/en/getStart/welcome2.png b/docs/assets/en/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/en/getStart/welcome2.png differ diff --git a/docs/assets/es/API/AutoCompletionEntity.png b/docs/assets/es/API/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/es/API/AutoCompletionEntity.png differ diff --git a/docs/assets/es/API/ClassDiagramImage.png b/docs/assets/es/API/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/es/API/ClassDiagramImage.png differ diff --git a/docs/assets/es/API/ORDA_Classes-3.png b/docs/assets/es/API/ORDA_Classes-3.png new file mode 100644 index 00000000000000..fe5e80712a8f7c Binary files /dev/null and b/docs/assets/es/API/ORDA_Classes-3.png differ diff --git a/docs/assets/es/API/Orda_example.png b/docs/assets/es/API/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/es/API/Orda_example.png differ diff --git a/docs/assets/es/API/api.png b/docs/assets/es/API/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/es/API/api.png differ diff --git a/docs/assets/es/API/classORDA1.png b/docs/assets/es/API/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/es/API/classORDA1.png differ diff --git a/docs/assets/es/API/classORDA2.png b/docs/assets/es/API/classORDA2.png new file mode 100644 index 00000000000000..7204647d1353e7 Binary files /dev/null and b/docs/assets/es/API/classORDA2.png differ diff --git a/docs/assets/es/API/classORDA3.png b/docs/assets/es/API/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/es/API/classORDA3.png differ diff --git a/docs/assets/es/API/classORDA4.png b/docs/assets/es/API/classORDA4.png new file mode 100644 index 00000000000000..67f7d923a46e6d Binary files /dev/null and b/docs/assets/es/API/classORDA4.png differ diff --git a/docs/assets/es/API/classORDA5.png b/docs/assets/es/API/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/es/API/classORDA5.png differ diff --git a/docs/assets/es/API/dataclassAttribute.png b/docs/assets/es/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/es/API/dataclassAttribute.png differ diff --git a/docs/assets/es/API/dataclassAttribute2.png b/docs/assets/es/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/es/API/dataclassAttribute2.png differ diff --git a/docs/assets/es/API/dataclassAttribute3.png b/docs/assets/es/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/es/API/dataclassAttribute3.png differ diff --git a/docs/assets/es/API/dataclassAttribute4.png b/docs/assets/es/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/es/API/dataclassAttribute4.png differ diff --git a/docs/assets/es/API/dsDiagram.png b/docs/assets/es/API/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/es/API/dsDiagram.png differ diff --git a/docs/assets/es/API/formulaAlert.png b/docs/assets/es/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/es/API/formulaAlert.png differ diff --git a/docs/assets/es/API/formulaDialog.png b/docs/assets/es/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/es/API/formulaDialog.png differ diff --git a/docs/assets/es/API/showClass.png b/docs/assets/es/API/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/es/API/showClass.png differ diff --git a/docs/assets/es/API/signal.png b/docs/assets/es/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/es/API/signal.png differ diff --git a/docs/assets/es/Admin/2021-07-27_18h31_35.png b/docs/assets/es/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/es/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/es/Admin/Cert1.png b/docs/assets/es/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/es/Admin/Cert1.png differ diff --git a/docs/assets/es/Admin/Cert2.png b/docs/assets/es/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/es/Admin/Cert2.png differ diff --git a/docs/assets/es/Admin/DEFilter1.png b/docs/assets/es/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/es/Admin/DEFilter1.png differ diff --git a/docs/assets/es/Admin/DEFilter2.png b/docs/assets/es/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/es/Admin/DEFilter2.png differ diff --git a/docs/assets/es/Admin/DEFilter3.png b/docs/assets/es/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/es/Admin/DEFilter3.png differ diff --git a/docs/assets/es/Admin/accessKey.png b/docs/assets/es/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/es/Admin/accessKey.png differ diff --git a/docs/assets/es/Admin/accessKeyEnter.png b/docs/assets/es/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/es/Admin/accessKeyEnter.png differ diff --git a/docs/assets/es/Admin/buildappCertif.png b/docs/assets/es/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/es/Admin/buildappCertif.png differ diff --git a/docs/assets/es/Admin/buildapposxcertProj.png b/docs/assets/es/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/es/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/es/Admin/cacheServera.png b/docs/assets/es/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/es/Admin/cacheServera.png differ diff --git a/docs/assets/es/Admin/cacheServerb.png b/docs/assets/es/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/es/Admin/cacheServerb.png differ diff --git a/docs/assets/es/Admin/cachea.png b/docs/assets/es/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/es/Admin/cachea.png differ diff --git a/docs/assets/es/Admin/cacheb.png b/docs/assets/es/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/es/Admin/cacheb.png differ diff --git a/docs/assets/es/Admin/dark.png b/docs/assets/es/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/es/Admin/dark.png differ diff --git a/docs/assets/es/Admin/dataExplorer1.png b/docs/assets/es/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer1.png differ diff --git a/docs/assets/es/Admin/dataExplorer10.png b/docs/assets/es/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer10.png differ diff --git a/docs/assets/es/Admin/dataExplorer11.png b/docs/assets/es/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer11.png differ diff --git a/docs/assets/es/Admin/dataExplorer12.png b/docs/assets/es/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer12.png differ diff --git a/docs/assets/es/Admin/dataExplorer2.png b/docs/assets/es/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer2.png differ diff --git a/docs/assets/es/Admin/dataExplorer3.png b/docs/assets/es/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer3.png differ diff --git a/docs/assets/es/Admin/dataExplorer4.png b/docs/assets/es/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer4.png differ diff --git a/docs/assets/es/Admin/dataExplorer4b.png b/docs/assets/es/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer4b.png differ diff --git a/docs/assets/es/Admin/dataExplorer5.png b/docs/assets/es/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer5.png differ diff --git a/docs/assets/es/Admin/dataExplorer6.png b/docs/assets/es/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer6.png differ diff --git a/docs/assets/es/Admin/dataExplorer7.png b/docs/assets/es/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer7.png differ diff --git a/docs/assets/es/Admin/dataExplorer8.png b/docs/assets/es/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer8.png differ diff --git a/docs/assets/es/Admin/dataExplorer9.png b/docs/assets/es/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/es/Admin/dataExplorer9.png differ diff --git a/docs/assets/es/Admin/server-admin-application-page.png b/docs/assets/es/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/es/Admin/server-admin-application-page.png differ diff --git a/docs/assets/es/Admin/server-admin-monitor-adv1.png b/docs/assets/es/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/es/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/es/Admin/server-admin-monitor-adv2.png b/docs/assets/es/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/es/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/es/Admin/server-admin-monitor-page.png b/docs/assets/es/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/es/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/es/Admin/server-admin-monitor-snapshot.png b/docs/assets/es/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/es/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/es/Admin/server-admin-process-page.png b/docs/assets/es/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/es/Admin/server-admin-process-page.png differ diff --git a/docs/assets/es/Admin/server-admin-sql-page.png b/docs/assets/es/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/es/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/es/Admin/server-admin-web-page.png b/docs/assets/es/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/es/Admin/server-admin-web-page.png differ diff --git a/docs/assets/es/Admin/server-admin.png b/docs/assets/es/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/es/Admin/server-admin.png differ diff --git a/docs/assets/es/Admin/server-error.png b/docs/assets/es/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/es/Admin/server-error.png differ diff --git a/docs/assets/es/Admin/server-graphic.png b/docs/assets/es/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/es/Admin/server-graphic.png differ diff --git a/docs/assets/es/Admin/server-icon-1.png b/docs/assets/es/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-1.png differ diff --git a/docs/assets/es/Admin/server-icon-10.png b/docs/assets/es/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-10.png differ diff --git a/docs/assets/es/Admin/server-icon-11.png b/docs/assets/es/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/es/Admin/server-icon-11.png differ diff --git a/docs/assets/es/Admin/server-icon-12.png b/docs/assets/es/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/es/Admin/server-icon-12.png differ diff --git a/docs/assets/es/Admin/server-icon-13.png b/docs/assets/es/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-13.png differ diff --git a/docs/assets/es/Admin/server-icon-14.png b/docs/assets/es/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-14.png differ diff --git a/docs/assets/es/Admin/server-icon-15.png b/docs/assets/es/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/es/Admin/server-icon-15.png differ diff --git a/docs/assets/es/Admin/server-icon-16.png b/docs/assets/es/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/es/Admin/server-icon-16.png differ diff --git a/docs/assets/es/Admin/server-icon-17.png b/docs/assets/es/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/es/Admin/server-icon-17.png differ diff --git a/docs/assets/es/Admin/server-icon-18.png b/docs/assets/es/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/es/Admin/server-icon-18.png differ diff --git a/docs/assets/es/Admin/server-icon-19.png b/docs/assets/es/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-19.png differ diff --git a/docs/assets/es/Admin/server-icon-2.png b/docs/assets/es/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-2.png differ diff --git a/docs/assets/es/Admin/server-icon-20.png b/docs/assets/es/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/es/Admin/server-icon-20.png differ diff --git a/docs/assets/es/Admin/server-icon-21.png b/docs/assets/es/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-21.png differ diff --git a/docs/assets/es/Admin/server-icon-22.png b/docs/assets/es/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-22.png differ diff --git a/docs/assets/es/Admin/server-icon-23.png b/docs/assets/es/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-23.png differ diff --git a/docs/assets/es/Admin/server-icon-24.png b/docs/assets/es/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-24.png differ diff --git a/docs/assets/es/Admin/server-icon-25.png b/docs/assets/es/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/es/Admin/server-icon-25.png differ diff --git a/docs/assets/es/Admin/server-icon-3.png b/docs/assets/es/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-3.png differ diff --git a/docs/assets/es/Admin/server-icon-4.png b/docs/assets/es/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-4.png differ diff --git a/docs/assets/es/Admin/server-icon-5.png b/docs/assets/es/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/es/Admin/server-icon-5.png differ diff --git a/docs/assets/es/Admin/server-icon-6.png b/docs/assets/es/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-6.png differ diff --git a/docs/assets/es/Admin/server-icon-7.png b/docs/assets/es/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/es/Admin/server-icon-7.png differ diff --git a/docs/assets/es/Admin/server-icon-8.png b/docs/assets/es/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-8.png differ diff --git a/docs/assets/es/Admin/server-icon-9.png b/docs/assets/es/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/es/Admin/server-icon-9.png differ diff --git a/docs/assets/es/Admin/server-licence-failed.png b/docs/assets/es/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/es/Admin/server-licence-failed.png differ diff --git a/docs/assets/es/Admin/server-maintenance.png b/docs/assets/es/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/es/Admin/server-maintenance.png differ diff --git a/docs/assets/es/Admin/server-message.png b/docs/assets/es/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/es/Admin/server-message.png differ diff --git a/docs/assets/es/Admin/server-process-actions.png b/docs/assets/es/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/es/Admin/server-process-actions.png differ diff --git a/docs/assets/es/Admin/server-process-buttons.png b/docs/assets/es/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/es/Admin/server-process-buttons.png differ diff --git a/docs/assets/es/Admin/server-shut.png b/docs/assets/es/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/es/Admin/server-shut.png differ diff --git a/docs/assets/es/Admin/server-sleeping.png b/docs/assets/es/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/es/Admin/server-sleeping.png differ diff --git a/docs/assets/es/Admin/server-users-sort.png b/docs/assets/es/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/es/Admin/server-users-sort.png differ diff --git a/docs/assets/es/Admin/server-users.png b/docs/assets/es/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/es/Admin/server-users.png differ diff --git a/docs/assets/es/Admin/waMenu1.png b/docs/assets/es/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/es/Admin/waMenu1.png differ diff --git a/docs/assets/es/Admin/waMenu2.png b/docs/assets/es/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/es/Admin/waMenu2.png differ diff --git a/docs/assets/es/Admin/waSettings.png b/docs/assets/es/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/es/Admin/waSettings.png differ diff --git a/docs/assets/es/Admin/waSettings2.png b/docs/assets/es/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/es/Admin/waSettings2.png differ diff --git a/docs/assets/es/Debugging/attach-debugger-dialog-2.png b/docs/assets/es/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/es/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/es/Debugging/attach-debugger-dialog.png b/docs/assets/es/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/es/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/es/Debugging/attachRemoteDebugger.png b/docs/assets/es/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/es/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/es/Debugging/break-list.png b/docs/assets/es/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/es/Debugging/break-list.png differ diff --git a/docs/assets/es/Debugging/break-point.png b/docs/assets/es/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/es/Debugging/break-point.png differ diff --git a/docs/assets/es/Debugging/break.png b/docs/assets/es/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/es/Debugging/break.png differ diff --git a/docs/assets/es/Debugging/breakpoint-properties.png b/docs/assets/es/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/es/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/es/Debugging/call-chain-example.png b/docs/assets/es/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/es/Debugging/call-chain-example.png differ diff --git a/docs/assets/es/Debugging/callChainShowTypes.png b/docs/assets/es/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/es/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/es/Debugging/catch-command.png b/docs/assets/es/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/es/Debugging/catch-command.png differ diff --git a/docs/assets/es/Debugging/contextual-menu.png b/docs/assets/es/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/es/Debugging/contextual-menu.png differ diff --git a/docs/assets/es/Debugging/current-form-values.png b/docs/assets/es/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/es/Debugging/current-form-values.png differ diff --git a/docs/assets/es/Debugging/currentFormValues.png b/docs/assets/es/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/es/Debugging/currentFormValues.png differ diff --git a/docs/assets/es/Debugging/custom-watch-pane-context-menu.png b/docs/assets/es/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/es/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/es/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/es/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/es/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/es/Debugging/custom-watch-pane.png b/docs/assets/es/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/es/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/es/Debugging/customWatchPaneContext.png b/docs/assets/es/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/es/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/es/Debugging/debugger-window-local-to-remove.png b/docs/assets/es/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/es/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/es/Debugging/debugger-window-local.png b/docs/assets/es/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/es/Debugging/debugger-window-local.png differ diff --git a/docs/assets/es/Debugging/debuggerShortcuts.png b/docs/assets/es/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/es/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/es/Debugging/debuggerWindowRemote.png b/docs/assets/es/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/es/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/es/Debugging/dynamicVariableNames.png b/docs/assets/es/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/es/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/es/Debugging/executionToolbarButtons.png b/docs/assets/es/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/es/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/es/Debugging/newCaughtCommand.png b/docs/assets/es/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/es/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/es/Debugging/openDebugger.png b/docs/assets/es/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/es/Debugging/openDebugger.png differ diff --git a/docs/assets/es/Debugging/remote-debugging.png b/docs/assets/es/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/es/Debugging/remote-debugging.png differ diff --git a/docs/assets/es/Debugging/runtime-explorer.png b/docs/assets/es/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/es/Debugging/runtime-explorer.png differ diff --git a/docs/assets/es/Debugging/runtimeError.png b/docs/assets/es/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/es/Debugging/runtimeError.png differ diff --git a/docs/assets/es/Debugging/showTypes.png b/docs/assets/es/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/es/Debugging/showTypes.png differ diff --git a/docs/assets/es/Debugging/sourceCodePane.png b/docs/assets/es/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/es/Debugging/sourceCodePane.png differ diff --git a/docs/assets/es/Debugging/sourceCodePaneContext.png b/docs/assets/es/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/es/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/es/Debugging/sourcePaneTip.png b/docs/assets/es/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/es/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/es/Debugging/syntax-error.png b/docs/assets/es/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/es/Debugging/syntax-error.png differ diff --git a/docs/assets/es/Debugging/syntax-error2.png b/docs/assets/es/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/es/Debugging/syntax-error2.png differ diff --git a/docs/assets/es/Debugging/typing-error.png b/docs/assets/es/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/es/Debugging/typing-error.png differ diff --git a/docs/assets/es/Debugging/watchPane.png b/docs/assets/es/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/es/Debugging/watchPane.png differ diff --git a/docs/assets/es/Debugging/watchPaneOptions.png b/docs/assets/es/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/es/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/es/Desktop/allow-mac-clients.png b/docs/assets/es/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..f1153490abf3f9 Binary files /dev/null and b/docs/assets/es/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/es/FormEditor/alignment.png b/docs/assets/es/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/es/FormEditor/alignment.png differ diff --git a/docs/assets/es/FormEditor/alignmentAssistant.png b/docs/assets/es/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/es/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/es/FormEditor/alignmentContextMenu.png b/docs/assets/es/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/es/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/es/FormEditor/alignmentMenu.png b/docs/assets/es/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/es/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/es/FormEditor/alignmentTools.png b/docs/assets/es/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/es/FormEditor/alignmentTools.png differ diff --git a/docs/assets/es/FormEditor/button.png b/docs/assets/es/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/es/FormEditor/button.png differ diff --git a/docs/assets/es/FormEditor/checkbox.png b/docs/assets/es/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/es/FormEditor/checkbox.png differ diff --git a/docs/assets/es/FormEditor/combo.png b/docs/assets/es/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/es/FormEditor/combo.png differ diff --git a/docs/assets/es/FormEditor/cssIcon.png b/docs/assets/es/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/es/FormEditor/cssIcon.png differ diff --git a/docs/assets/es/FormEditor/cssIconMixed.png b/docs/assets/es/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/es/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/es/FormEditor/cssImportant.png b/docs/assets/es/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/es/FormEditor/cssImportant.png differ diff --git a/docs/assets/es/FormEditor/cssInvalidSyntax.png b/docs/assets/es/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/es/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/es/FormEditor/cssMac.png b/docs/assets/es/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/es/FormEditor/cssMac.png differ diff --git a/docs/assets/es/FormEditor/cssNo.png b/docs/assets/es/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/es/FormEditor/cssNo.png differ diff --git a/docs/assets/es/FormEditor/cssPpropList.png b/docs/assets/es/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/es/FormEditor/cssPpropList.png differ diff --git a/docs/assets/es/FormEditor/cssPpropListImportant.png b/docs/assets/es/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/es/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/es/FormEditor/cssPreview.png b/docs/assets/es/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/es/FormEditor/cssPreview.png differ diff --git a/docs/assets/es/FormEditor/cssPreview_list.png b/docs/assets/es/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/es/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/es/FormEditor/cssPreviewicon.png b/docs/assets/es/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/es/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/es/FormEditor/cssShield.png b/docs/assets/es/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/es/FormEditor/cssShield.png differ diff --git a/docs/assets/es/FormEditor/cssToolbar.png b/docs/assets/es/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/es/FormEditor/cssToolbar.png differ diff --git a/docs/assets/es/FormEditor/cssWin.png b/docs/assets/es/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/es/FormEditor/cssWin.png differ diff --git a/docs/assets/es/FormEditor/darkicon.png b/docs/assets/es/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/es/FormEditor/darkicon.png differ diff --git a/docs/assets/es/FormEditor/displyAndPage.png b/docs/assets/es/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/es/FormEditor/displyAndPage.png differ diff --git a/docs/assets/es/FormEditor/distribution.png b/docs/assets/es/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/es/FormEditor/distribution.png differ diff --git a/docs/assets/es/FormEditor/distributionTool.png b/docs/assets/es/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/es/FormEditor/distributionTool.png differ diff --git a/docs/assets/es/FormEditor/duplcateMany.png b/docs/assets/es/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/es/FormEditor/duplcateMany.png differ diff --git a/docs/assets/es/FormEditor/duplicateObjects.png b/docs/assets/es/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/es/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/es/FormEditor/entryOrder1.png b/docs/assets/es/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/es/FormEditor/entryOrder1.png differ diff --git a/docs/assets/es/FormEditor/entryOrder2.png b/docs/assets/es/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/es/FormEditor/entryOrder2.png differ diff --git a/docs/assets/es/FormEditor/entryOrder3.png b/docs/assets/es/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/es/FormEditor/entryOrder3.png differ diff --git a/docs/assets/es/FormEditor/execute.png b/docs/assets/es/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/es/FormEditor/execute.png differ diff --git a/docs/assets/es/FormEditor/group.png b/docs/assets/es/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/es/FormEditor/group.png differ diff --git a/docs/assets/es/FormEditor/horizontalDistribution.png b/docs/assets/es/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/es/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/es/FormEditor/indicator.png b/docs/assets/es/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/es/FormEditor/indicator.png differ diff --git a/docs/assets/es/FormEditor/input.png b/docs/assets/es/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/es/FormEditor/input.png differ diff --git a/docs/assets/es/FormEditor/layering.png b/docs/assets/es/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/es/FormEditor/layering.png differ diff --git a/docs/assets/es/FormEditor/level.png b/docs/assets/es/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/es/FormEditor/level.png differ diff --git a/docs/assets/es/FormEditor/level2.png b/docs/assets/es/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/es/FormEditor/level2.png differ diff --git a/docs/assets/es/FormEditor/library.png b/docs/assets/es/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/es/FormEditor/library.png differ diff --git a/docs/assets/es/FormEditor/listBoxBuilder1.png b/docs/assets/es/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/es/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/es/FormEditor/listbox.png b/docs/assets/es/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/es/FormEditor/listbox.png differ diff --git a/docs/assets/es/FormEditor/macroClass.png b/docs/assets/es/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/es/FormEditor/macroClass.png differ diff --git a/docs/assets/es/FormEditor/macroSelect.png b/docs/assets/es/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/es/FormEditor/macroSelect.png differ diff --git a/docs/assets/es/FormEditor/macroStructure.png b/docs/assets/es/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/es/FormEditor/macroStructure.png differ diff --git a/docs/assets/es/FormEditor/macroex1.png b/docs/assets/es/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/es/FormEditor/macroex1.png differ diff --git a/docs/assets/es/FormEditor/macroex2.png b/docs/assets/es/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/es/FormEditor/macroex2.png differ diff --git a/docs/assets/es/FormEditor/magneticGrid1.png b/docs/assets/es/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/es/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/es/FormEditor/magneticGrid2.png b/docs/assets/es/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/es/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/es/FormEditor/moving.png b/docs/assets/es/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/es/FormEditor/moving.png differ diff --git a/docs/assets/es/FormEditor/objectBar.png b/docs/assets/es/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/es/FormEditor/objectBar.png differ diff --git a/docs/assets/es/FormEditor/objectLibrary.png b/docs/assets/es/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/es/FormEditor/objectLibrary.png differ diff --git a/docs/assets/es/FormEditor/plugin.png b/docs/assets/es/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/es/FormEditor/plugin.png differ diff --git a/docs/assets/es/FormEditor/radio.png b/docs/assets/es/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/es/FormEditor/radio.png differ diff --git a/docs/assets/es/FormEditor/rectangle.png b/docs/assets/es/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/es/FormEditor/rectangle.png differ diff --git a/docs/assets/es/FormEditor/selectMultiple.png b/docs/assets/es/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/es/FormEditor/selectMultiple.png differ diff --git a/docs/assets/es/FormEditor/selectResize.png b/docs/assets/es/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/es/FormEditor/selectResize.png differ diff --git a/docs/assets/es/FormEditor/selection.png b/docs/assets/es/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/es/FormEditor/selection.png differ diff --git a/docs/assets/es/FormEditor/shields.png b/docs/assets/es/FormEditor/shields.png index 21c805438c888a..aaae4df4f580ed 100644 Binary files a/docs/assets/es/FormEditor/shields.png and b/docs/assets/es/FormEditor/shields.png differ diff --git a/docs/assets/es/FormEditor/shields2.png b/docs/assets/es/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/es/FormEditor/shields2.png differ diff --git a/docs/assets/es/FormEditor/showHideElements.png b/docs/assets/es/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/es/FormEditor/showHideElements.png differ diff --git a/docs/assets/es/FormEditor/splitter.png b/docs/assets/es/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/es/FormEditor/splitter.png differ diff --git a/docs/assets/es/FormEditor/text.png b/docs/assets/es/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/es/FormEditor/text.png differ diff --git a/docs/assets/es/FormEditor/toolbar.png b/docs/assets/es/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/es/FormEditor/toolbar.png differ diff --git a/docs/assets/es/FormEditor/views.png b/docs/assets/es/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/es/FormEditor/views.png differ diff --git a/docs/assets/es/FormEditor/zOrder.png b/docs/assets/es/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/es/FormEditor/zOrder.png differ diff --git a/docs/assets/es/FormEditor/zoom.png b/docs/assets/es/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/es/FormEditor/zoom.png differ diff --git a/docs/assets/es/FormObjects/fruits1.png b/docs/assets/es/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/es/FormObjects/fruits1.png differ diff --git a/docs/assets/es/FormObjects/fruits2.png b/docs/assets/es/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/es/FormObjects/fruits2.png differ diff --git a/docs/assets/es/FormObjects/fruits3.png b/docs/assets/es/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/es/FormObjects/fruits3.png differ diff --git a/docs/assets/es/FormObjects/popupDropdown_hierar.png b/docs/assets/es/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/es/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/es/ORDA/AutoCompletionEntity.png b/docs/assets/es/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/es/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/es/ORDA/ClassDiagramImage.png b/docs/assets/es/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/es/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/es/ORDA/ExposeDataclass.png b/docs/assets/es/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/es/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/es/ORDA/ORDA_Classes-3.png b/docs/assets/es/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/es/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/es/ORDA/Orda_example.png b/docs/assets/es/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/es/ORDA/Orda_example.png differ diff --git a/docs/assets/es/ORDA/api.png b/docs/assets/es/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/es/ORDA/api.png differ diff --git a/docs/assets/es/ORDA/classORDA1.png b/docs/assets/es/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/es/ORDA/classORDA1.png differ diff --git a/docs/assets/es/ORDA/classORDA2.png b/docs/assets/es/ORDA/classORDA2.png new file mode 100644 index 00000000000000..2730f8ba17cd66 Binary files /dev/null and b/docs/assets/es/ORDA/classORDA2.png differ diff --git a/docs/assets/es/ORDA/classORDA3.png b/docs/assets/es/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/es/ORDA/classORDA3.png differ diff --git a/docs/assets/es/ORDA/classORDA4.png b/docs/assets/es/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/es/ORDA/classORDA4.png differ diff --git a/docs/assets/es/ORDA/classORDA5.png b/docs/assets/es/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/es/ORDA/classORDA5.png differ diff --git a/docs/assets/es/ORDA/companyTable.png b/docs/assets/es/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/es/ORDA/companyTable.png differ diff --git a/docs/assets/es/ORDA/concurrent1.png b/docs/assets/es/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/es/ORDA/concurrent1.png differ diff --git a/docs/assets/es/ORDA/concurrent2.png b/docs/assets/es/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/es/ORDA/concurrent2.png differ diff --git a/docs/assets/es/ORDA/concurrent3.png b/docs/assets/es/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/es/ORDA/concurrent3.png differ diff --git a/docs/assets/es/ORDA/dataclassProperties.png b/docs/assets/es/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/es/ORDA/dataclassProperties.png differ diff --git a/docs/assets/es/ORDA/datastoreMapping.png b/docs/assets/es/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/es/ORDA/datastoreMapping.png differ diff --git a/docs/assets/es/ORDA/debug1.png b/docs/assets/es/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/es/ORDA/debug1.png differ diff --git a/docs/assets/es/ORDA/deezer.png b/docs/assets/es/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/es/ORDA/deezer.png differ diff --git a/docs/assets/es/ORDA/dsDiagram.png b/docs/assets/es/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/es/ORDA/dsDiagram.png differ diff --git a/docs/assets/es/ORDA/entityAttributes.png b/docs/assets/es/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/es/ORDA/entityAttributes.png differ diff --git a/docs/assets/es/ORDA/entityAttributes2.png b/docs/assets/es/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/es/ORDA/entityAttributes2.png differ diff --git a/docs/assets/es/ORDA/entityAttributes3.png b/docs/assets/es/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/es/ORDA/entityAttributes3.png differ diff --git a/docs/assets/es/ORDA/entityRef1.png b/docs/assets/es/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/es/ORDA/entityRef1.png differ diff --git a/docs/assets/es/ORDA/entityRef2.png b/docs/assets/es/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/es/ORDA/entityRef2.png differ diff --git a/docs/assets/es/ORDA/entitySelectionRelationAttributes.png b/docs/assets/es/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/es/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/es/ORDA/mainConcepts.png b/docs/assets/es/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/es/ORDA/mainConcepts.png differ diff --git a/docs/assets/es/ORDA/optimisticLock1.png b/docs/assets/es/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/es/ORDA/optimisticLock1.png differ diff --git a/docs/assets/es/ORDA/optimisticLock2.png b/docs/assets/es/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/es/ORDA/optimisticLock2.png differ diff --git a/docs/assets/es/ORDA/optimisticLock3.png b/docs/assets/es/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/es/ORDA/optimisticLock3.png differ diff --git a/docs/assets/es/ORDA/relationProperties.png b/docs/assets/es/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/es/ORDA/relationProperties.png differ diff --git a/docs/assets/es/ORDA/sessionAdmin.png b/docs/assets/es/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/es/ORDA/sessionAdmin.png differ diff --git a/docs/assets/es/ORDA/sessions.png b/docs/assets/es/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/es/ORDA/sessions.png differ diff --git a/docs/assets/es/ORDA/showClass.png b/docs/assets/es/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/es/ORDA/showClass.png differ diff --git a/docs/assets/es/ORDA/struc.png b/docs/assets/es/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/es/ORDA/struc.png differ diff --git a/docs/assets/es/ORDA/struc2.png b/docs/assets/es/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/es/ORDA/struc2.png differ diff --git a/docs/assets/es/ORDA/struc2s.png b/docs/assets/es/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/es/ORDA/struc2s.png differ diff --git a/docs/assets/es/Preferences/categories.png b/docs/assets/es/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/es/Preferences/categories.png differ diff --git a/docs/assets/es/Preferences/general1.png b/docs/assets/es/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/es/Preferences/general1.png differ diff --git a/docs/assets/es/Preferences/general2.png b/docs/assets/es/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/es/Preferences/general2.png differ diff --git a/docs/assets/es/Preferences/general3.png b/docs/assets/es/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/es/Preferences/general3.png differ diff --git a/docs/assets/es/Preferences/general4.png b/docs/assets/es/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/es/Preferences/general4.png differ diff --git a/docs/assets/es/Preferences/general5.png b/docs/assets/es/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/es/Preferences/general5.png differ diff --git a/docs/assets/es/Preferences/gitignore.png b/docs/assets/es/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/es/Preferences/gitignore.png differ diff --git a/docs/assets/es/Preferences/langCateg.png b/docs/assets/es/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/es/Preferences/langCateg.png differ diff --git a/docs/assets/es/Preferences/options.png b/docs/assets/es/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/es/Preferences/options.png differ diff --git a/docs/assets/es/Preferences/optionsBlockLines.png b/docs/assets/es/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/es/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/es/Preferences/optionsClosing.png b/docs/assets/es/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/es/Preferences/optionsClosing.png differ diff --git a/docs/assets/es/Preferences/optionsClosing2.png b/docs/assets/es/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/es/Preferences/optionsClosing2.png differ diff --git a/docs/assets/es/Preferences/optionsHideIcons.png b/docs/assets/es/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/es/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/es/Preferences/optionsIndent.png b/docs/assets/es/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/es/Preferences/optionsIndent.png differ diff --git a/docs/assets/es/Preferences/optionsLine.png b/docs/assets/es/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/es/Preferences/optionsLine.png differ diff --git a/docs/assets/es/Preferences/optionsLogicalBlocks.png b/docs/assets/es/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/es/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/es/Preferences/optionsRectangle.png b/docs/assets/es/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/es/Preferences/optionsRectangle.png differ diff --git a/docs/assets/es/Preferences/optionsVariables.png b/docs/assets/es/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/es/Preferences/optionsVariables.png differ diff --git a/docs/assets/es/Preferences/overviewAccess.png b/docs/assets/es/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/es/Preferences/overviewAccess.png differ diff --git a/docs/assets/es/Preferences/overviewSettings.png b/docs/assets/es/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/es/Preferences/overviewSettings.png differ diff --git a/docs/assets/es/Preferences/overviewUser.png b/docs/assets/es/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/es/Preferences/overviewUser.png differ diff --git a/docs/assets/es/Preferences/shortcuts.png b/docs/assets/es/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/es/Preferences/shortcuts.png differ diff --git a/docs/assets/es/Preferences/suggestionsAutoOpen.png b/docs/assets/es/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/es/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/es/Preferences/themes.png b/docs/assets/es/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/es/Preferences/themes.png differ diff --git a/docs/assets/es/Project/4Dlinkfiles.png b/docs/assets/es/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/es/Project/4Dlinkfiles.png differ diff --git a/docs/assets/es/Project/buildappCSProj.png b/docs/assets/es/Project/buildappCSProj.png index bbbdd0dbc38997..2ee87c60eefb8c 100644 Binary files a/docs/assets/es/Project/buildappCSProj.png and b/docs/assets/es/Project/buildappCSProj.png differ diff --git a/docs/assets/es/Project/comp1.png b/docs/assets/es/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/es/Project/comp1.png differ diff --git a/docs/assets/es/Project/compDoc.png b/docs/assets/es/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/es/Project/compDoc.png differ diff --git a/docs/assets/es/Project/compileModes.png b/docs/assets/es/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/es/Project/compileModes.png differ diff --git a/docs/assets/es/Project/compilerWin1.png b/docs/assets/es/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/es/Project/compilerWin1.png differ diff --git a/docs/assets/es/Project/compilerWin2.png b/docs/assets/es/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/es/Project/compilerWin2.png differ diff --git a/docs/assets/es/Project/compilerWin3.png b/docs/assets/es/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/es/Project/compilerWin3.png differ diff --git a/docs/assets/es/Project/compilerWin4.png b/docs/assets/es/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/es/Project/compilerWin4.png differ diff --git a/docs/assets/es/Project/compilerWin5.png b/docs/assets/es/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/es/Project/compilerWin5.png differ diff --git a/docs/assets/es/Project/compilerWin6.png b/docs/assets/es/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/es/Project/compilerWin6.png differ diff --git a/docs/assets/es/Project/success.png b/docs/assets/es/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/es/Project/success.png differ diff --git a/docs/assets/es/REST/login.png b/docs/assets/es/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/es/REST/login.png differ diff --git a/docs/assets/es/REST/ordastructure.png b/docs/assets/es/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/es/REST/ordastructure.png differ diff --git a/docs/assets/es/WebServer/authenticate.png b/docs/assets/es/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/es/WebServer/authenticate.png differ diff --git a/docs/assets/es/WebServer/authenticate2.png b/docs/assets/es/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/es/WebServer/authenticate2.png differ diff --git a/docs/assets/es/WebServer/authenticate3.png b/docs/assets/es/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/es/WebServer/authenticate3.png differ diff --git a/docs/assets/es/WebServer/authentication.png b/docs/assets/es/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/es/WebServer/authentication.png differ diff --git a/docs/assets/es/WebServer/backup.png b/docs/assets/es/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/es/WebServer/backup.png differ diff --git a/docs/assets/es/WebServer/config.png b/docs/assets/es/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/es/WebServer/config.png differ diff --git a/docs/assets/es/WebServer/defaultHomePage.png b/docs/assets/es/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/es/WebServer/defaultHomePage.png differ diff --git a/docs/assets/es/WebServer/errorPage.png b/docs/assets/es/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/es/WebServer/errorPage.png differ diff --git a/docs/assets/es/WebServer/exampleSession.png b/docs/assets/es/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/es/WebServer/exampleSession.png differ diff --git a/docs/assets/es/WebServer/hello.png b/docs/assets/es/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/es/WebServer/hello.png differ diff --git a/docs/assets/es/WebServer/hello0.png b/docs/assets/es/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/es/WebServer/hello0.png differ diff --git a/docs/assets/es/WebServer/hello2.png b/docs/assets/es/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/es/WebServer/hello2.png differ diff --git a/docs/assets/es/WebServer/hello3.png b/docs/assets/es/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/es/WebServer/hello3.png differ diff --git a/docs/assets/es/WebServer/hello3bis.png b/docs/assets/es/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/es/WebServer/hello3bis.png differ diff --git a/docs/assets/es/WebServer/hello4.png b/docs/assets/es/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/es/WebServer/hello4.png differ diff --git a/docs/assets/es/WebServer/hello5.png b/docs/assets/es/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/es/WebServer/hello5.png differ diff --git a/docs/assets/es/WebServer/hello6.png b/docs/assets/es/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/es/WebServer/hello6.png differ diff --git a/docs/assets/es/WebServer/helloUsers.png b/docs/assets/es/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/es/WebServer/helloUsers.png differ diff --git a/docs/assets/es/WebServer/httpCommands.png b/docs/assets/es/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/es/WebServer/httpCommands.png differ diff --git a/docs/assets/es/WebServer/loadBalance.png b/docs/assets/es/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/es/WebServer/loadBalance.png differ diff --git a/docs/assets/es/WebServer/log.png b/docs/assets/es/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/es/WebServer/log.png differ diff --git a/docs/assets/es/WebServer/login1.png b/docs/assets/es/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/es/WebServer/login1.png differ diff --git a/docs/assets/es/WebServer/login2.png b/docs/assets/es/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/es/WebServer/login2.png differ diff --git a/docs/assets/es/WebServer/methodIcon.png b/docs/assets/es/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/es/WebServer/methodIcon.png differ diff --git a/docs/assets/es/WebServer/methodProperties.png b/docs/assets/es/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/es/WebServer/methodProperties.png differ diff --git a/docs/assets/es/WebServer/option1.png b/docs/assets/es/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/es/WebServer/option1.png differ diff --git a/docs/assets/es/WebServer/option2.png b/docs/assets/es/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/es/WebServer/option2.png differ diff --git a/docs/assets/es/WebServer/preemptive.png b/docs/assets/es/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/es/WebServer/preemptive.png differ diff --git a/docs/assets/es/WebServer/processIcon.png b/docs/assets/es/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/es/WebServer/processIcon.png differ diff --git a/docs/assets/es/WebServer/restResource.png b/docs/assets/es/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/es/WebServer/restResource.png differ diff --git a/docs/assets/es/WebServer/schemaSession.png b/docs/assets/es/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/es/WebServer/schemaSession.png differ diff --git a/docs/assets/es/WebServer/serverAccess.png b/docs/assets/es/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/es/WebServer/serverAccess.png differ diff --git a/docs/assets/es/WebServer/session1.png b/docs/assets/es/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/es/WebServer/session1.png differ diff --git a/docs/assets/es/WebServer/settingsSession.png b/docs/assets/es/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/es/WebServer/settingsSession.png differ diff --git a/docs/assets/es/WebServer/spiders.png b/docs/assets/es/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/es/WebServer/spiders.png differ diff --git a/docs/assets/es/WebServer/start1.png b/docs/assets/es/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/es/WebServer/start1.png differ diff --git a/docs/assets/es/WebServer/start2.png b/docs/assets/es/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/es/WebServer/start2.png differ diff --git a/docs/assets/es/WebServer/start3.png b/docs/assets/es/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/es/WebServer/start3.png differ diff --git a/docs/assets/es/WebServer/stop1.png b/docs/assets/es/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/es/WebServer/stop1.png differ diff --git a/docs/assets/es/WebServer/tempo_codeHTML.png b/docs/assets/es/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/es/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/es/WebServer/test1.png b/docs/assets/es/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/es/WebServer/test1.png differ diff --git a/docs/assets/es/WebServer/tls1.png b/docs/assets/es/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/es/WebServer/tls1.png differ diff --git a/docs/assets/es/WebServer/tls2.png b/docs/assets/es/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/es/WebServer/tls2.png differ diff --git a/docs/assets/es/WebServer/tls3.png b/docs/assets/es/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/es/WebServer/tls3.png differ diff --git a/docs/assets/es/WebServer/webServices.png b/docs/assets/es/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/es/WebServer/webServices.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/localremote.png b/docs/assets/es/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/es/getStart/localremote.png differ diff --git a/docs/assets/es/getStart/logo4d.png b/docs/assets/es/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/es/getStart/logo4d.png differ diff --git a/docs/assets/es/getStart/projectCreate1.png b/docs/assets/es/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/es/getStart/projectCreate1.png differ diff --git a/docs/assets/es/getStart/projectCreate2.png b/docs/assets/es/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/es/getStart/projectCreate2.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/es/getStart/serverConnect.png b/docs/assets/es/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/es/getStart/serverConnect.png differ diff --git a/docs/assets/es/getStart/serverConnect2.png b/docs/assets/es/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/es/getStart/serverConnect2.png differ diff --git a/docs/assets/es/getStart/welcome.png b/docs/assets/es/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/es/getStart/welcome.png differ diff --git a/docs/assets/es/getStart/welcome2.png b/docs/assets/es/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/es/getStart/welcome2.png differ diff --git a/docs/assets/es/web-studio/add-component.png b/docs/assets/es/web-studio/add-component.png new file mode 100644 index 00000000000000..37598b30e917f1 Binary files /dev/null and b/docs/assets/es/web-studio/add-component.png differ diff --git a/docs/assets/es/web-studio/breadcrumbs.png b/docs/assets/es/web-studio/breadcrumbs.png new file mode 100644 index 00000000000000..cdd1cfb0bec624 Binary files /dev/null and b/docs/assets/es/web-studio/breadcrumbs.png differ diff --git a/docs/assets/es/web-studio/canvas.png b/docs/assets/es/web-studio/canvas.png new file mode 100644 index 00000000000000..54e414c2fd53d1 Binary files /dev/null and b/docs/assets/es/web-studio/canvas.png differ diff --git a/docs/assets/es/web-studio/components.png b/docs/assets/es/web-studio/components.png new file mode 100644 index 00000000000000..103b70caa82ec1 Binary files /dev/null and b/docs/assets/es/web-studio/components.png differ diff --git a/docs/assets/es/web-studio/data-sources.png b/docs/assets/es/web-studio/data-sources.png new file mode 100644 index 00000000000000..d3356f2909f6cd Binary files /dev/null and b/docs/assets/es/web-studio/data-sources.png differ diff --git a/docs/assets/es/web-studio/events.png b/docs/assets/es/web-studio/events.png new file mode 100644 index 00000000000000..bce05ed645dc50 Binary files /dev/null and b/docs/assets/es/web-studio/events.png differ diff --git a/docs/assets/es/web-studio/explorer.png b/docs/assets/es/web-studio/explorer.png new file mode 100644 index 00000000000000..af8c807e0419e9 Binary files /dev/null and b/docs/assets/es/web-studio/explorer.png differ diff --git a/docs/assets/es/web-studio/image-server-side.png b/docs/assets/es/web-studio/image-server-side.png new file mode 100644 index 00000000000000..ce7e66427d61ac Binary files /dev/null and b/docs/assets/es/web-studio/image-server-side.png differ diff --git a/docs/assets/es/web-studio/number-1-icon.png b/docs/assets/es/web-studio/number-1-icon.png new file mode 100644 index 00000000000000..d391add818165e Binary files /dev/null and b/docs/assets/es/web-studio/number-1-icon.png differ diff --git a/docs/assets/es/web-studio/properties-panel.png b/docs/assets/es/web-studio/properties-panel.png new file mode 100644 index 00000000000000..6ddf6991a32d75 Binary files /dev/null and b/docs/assets/es/web-studio/properties-panel.png differ diff --git a/docs/assets/es/web-studio/style-panel.png b/docs/assets/es/web-studio/style-panel.png new file mode 100644 index 00000000000000..9144cb5055b941 Binary files /dev/null and b/docs/assets/es/web-studio/style-panel.png differ diff --git a/docs/assets/es/web-studio/styles-library.png b/docs/assets/es/web-studio/styles-library.png new file mode 100644 index 00000000000000..675a8ad4bb9f98 Binary files /dev/null and b/docs/assets/es/web-studio/styles-library.png differ diff --git a/docs/assets/es/web-studio/tabs.png b/docs/assets/es/web-studio/tabs.png new file mode 100644 index 00000000000000..59879dedd4c48b Binary files /dev/null and b/docs/assets/es/web-studio/tabs.png differ diff --git a/docs/assets/es/web-studio/web-event-1.png b/docs/assets/es/web-studio/web-event-1.png new file mode 100644 index 00000000000000..bc91acf07754c2 Binary files /dev/null and b/docs/assets/es/web-studio/web-event-1.png differ diff --git a/docs/assets/es/web-studio/web-event-2.png b/docs/assets/es/web-studio/web-event-2.png new file mode 100644 index 00000000000000..8f4cd0251c5c60 Binary files /dev/null and b/docs/assets/es/web-studio/web-event-2.png differ diff --git a/docs/assets/es/web-studio/web-form-object.png b/docs/assets/es/web-studio/web-form-object.png new file mode 100644 index 00000000000000..325e330b0a44f8 Binary files /dev/null and b/docs/assets/es/web-studio/web-form-object.png differ diff --git a/docs/assets/es/web-studio/web-studio-interface.png b/docs/assets/es/web-studio/web-studio-interface.png new file mode 100644 index 00000000000000..7f6232ae4541d0 Binary files /dev/null and b/docs/assets/es/web-studio/web-studio-interface.png differ diff --git a/docs/assets/es/web-studio/web-studio-intro.png b/docs/assets/es/web-studio/web-studio-intro.png new file mode 100644 index 00000000000000..c1b21f201f0ac0 Binary files /dev/null and b/docs/assets/es/web-studio/web-studio-intro.png differ diff --git a/docs/assets/es/web-studio/web-studio.png b/docs/assets/es/web-studio/web-studio.png new file mode 100644 index 00000000000000..997c8548e46cfa Binary files /dev/null and b/docs/assets/es/web-studio/web-studio.png differ diff --git a/docs/assets/es/web-studio/webstudio-home.png b/docs/assets/es/web-studio/webstudio-home.png new file mode 100644 index 00000000000000..a3c85415d866ed Binary files /dev/null and b/docs/assets/es/web-studio/webstudio-home.png differ diff --git a/docs/assets/fr/API/AutoCompletionEntity.png b/docs/assets/fr/API/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/fr/API/AutoCompletionEntity.png differ diff --git a/docs/assets/fr/API/ClassDiagramImage.png b/docs/assets/fr/API/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/fr/API/ClassDiagramImage.png differ diff --git a/docs/assets/fr/API/ORDA_Classes-3.png b/docs/assets/fr/API/ORDA_Classes-3.png new file mode 100644 index 00000000000000..fe5e80712a8f7c Binary files /dev/null and b/docs/assets/fr/API/ORDA_Classes-3.png differ diff --git a/docs/assets/fr/API/Orda_example.png b/docs/assets/fr/API/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/fr/API/Orda_example.png differ diff --git a/docs/assets/fr/API/api.png b/docs/assets/fr/API/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/fr/API/api.png differ diff --git a/docs/assets/fr/API/classORDA1.png b/docs/assets/fr/API/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/fr/API/classORDA1.png differ diff --git a/docs/assets/fr/API/classORDA2.png b/docs/assets/fr/API/classORDA2.png new file mode 100644 index 00000000000000..7204647d1353e7 Binary files /dev/null and b/docs/assets/fr/API/classORDA2.png differ diff --git a/docs/assets/fr/API/classORDA3.png b/docs/assets/fr/API/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/fr/API/classORDA3.png differ diff --git a/docs/assets/fr/API/classORDA4.png b/docs/assets/fr/API/classORDA4.png new file mode 100644 index 00000000000000..67f7d923a46e6d Binary files /dev/null and b/docs/assets/fr/API/classORDA4.png differ diff --git a/docs/assets/fr/API/classORDA5.png b/docs/assets/fr/API/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/fr/API/classORDA5.png differ diff --git a/docs/assets/fr/API/dataclassAttribute.png b/docs/assets/fr/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/fr/API/dataclassAttribute.png differ diff --git a/docs/assets/fr/API/dataclassAttribute2.png b/docs/assets/fr/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/fr/API/dataclassAttribute2.png differ diff --git a/docs/assets/fr/API/dataclassAttribute3.png b/docs/assets/fr/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/fr/API/dataclassAttribute3.png differ diff --git a/docs/assets/fr/API/dataclassAttribute4.png b/docs/assets/fr/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/fr/API/dataclassAttribute4.png differ diff --git a/docs/assets/fr/API/dsDiagram.png b/docs/assets/fr/API/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/fr/API/dsDiagram.png differ diff --git a/docs/assets/fr/API/formulaAlert.png b/docs/assets/fr/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/fr/API/formulaAlert.png differ diff --git a/docs/assets/fr/API/formulaDialog.png b/docs/assets/fr/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/fr/API/formulaDialog.png differ diff --git a/docs/assets/fr/API/showClass.png b/docs/assets/fr/API/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/fr/API/showClass.png differ diff --git a/docs/assets/fr/API/signal.png b/docs/assets/fr/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/fr/API/signal.png differ diff --git a/docs/assets/fr/Admin/2021-07-27_18h31_35.png b/docs/assets/fr/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/fr/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/fr/Admin/Cert1.png b/docs/assets/fr/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/fr/Admin/Cert1.png differ diff --git a/docs/assets/fr/Admin/Cert2.png b/docs/assets/fr/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/fr/Admin/Cert2.png differ diff --git a/docs/assets/fr/Admin/DEFilter1.png b/docs/assets/fr/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/fr/Admin/DEFilter1.png differ diff --git a/docs/assets/fr/Admin/DEFilter2.png b/docs/assets/fr/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/fr/Admin/DEFilter2.png differ diff --git a/docs/assets/fr/Admin/DEFilter3.png b/docs/assets/fr/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/fr/Admin/DEFilter3.png differ diff --git a/docs/assets/fr/Admin/accessKey.png b/docs/assets/fr/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/fr/Admin/accessKey.png differ diff --git a/docs/assets/fr/Admin/accessKeyEnter.png b/docs/assets/fr/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/fr/Admin/accessKeyEnter.png differ diff --git a/docs/assets/fr/Admin/buildappCertif.png b/docs/assets/fr/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/fr/Admin/buildappCertif.png differ diff --git a/docs/assets/fr/Admin/buildapposxcertProj.png b/docs/assets/fr/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/fr/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/fr/Admin/cacheServera.png b/docs/assets/fr/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/fr/Admin/cacheServera.png differ diff --git a/docs/assets/fr/Admin/cacheServerb.png b/docs/assets/fr/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/fr/Admin/cacheServerb.png differ diff --git a/docs/assets/fr/Admin/cachea.png b/docs/assets/fr/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/fr/Admin/cachea.png differ diff --git a/docs/assets/fr/Admin/cacheb.png b/docs/assets/fr/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/fr/Admin/cacheb.png differ diff --git a/docs/assets/fr/Admin/dark.png b/docs/assets/fr/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/fr/Admin/dark.png differ diff --git a/docs/assets/fr/Admin/dataExplorer1.png b/docs/assets/fr/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer1.png differ diff --git a/docs/assets/fr/Admin/dataExplorer10.png b/docs/assets/fr/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer10.png differ diff --git a/docs/assets/fr/Admin/dataExplorer11.png b/docs/assets/fr/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer11.png differ diff --git a/docs/assets/fr/Admin/dataExplorer12.png b/docs/assets/fr/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer12.png differ diff --git a/docs/assets/fr/Admin/dataExplorer2.png b/docs/assets/fr/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer2.png differ diff --git a/docs/assets/fr/Admin/dataExplorer3.png b/docs/assets/fr/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer3.png differ diff --git a/docs/assets/fr/Admin/dataExplorer4.png b/docs/assets/fr/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer4.png differ diff --git a/docs/assets/fr/Admin/dataExplorer4b.png b/docs/assets/fr/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer4b.png differ diff --git a/docs/assets/fr/Admin/dataExplorer5.png b/docs/assets/fr/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer5.png differ diff --git a/docs/assets/fr/Admin/dataExplorer6.png b/docs/assets/fr/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer6.png differ diff --git a/docs/assets/fr/Admin/dataExplorer7.png b/docs/assets/fr/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer7.png differ diff --git a/docs/assets/fr/Admin/dataExplorer8.png b/docs/assets/fr/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer8.png differ diff --git a/docs/assets/fr/Admin/dataExplorer9.png b/docs/assets/fr/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/fr/Admin/dataExplorer9.png differ diff --git a/docs/assets/fr/Admin/server-admin-application-page.png b/docs/assets/fr/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-application-page.png differ diff --git a/docs/assets/fr/Admin/server-admin-monitor-adv1.png b/docs/assets/fr/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/fr/Admin/server-admin-monitor-adv2.png b/docs/assets/fr/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/fr/Admin/server-admin-monitor-page.png b/docs/assets/fr/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/fr/Admin/server-admin-monitor-snapshot.png b/docs/assets/fr/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/fr/Admin/server-admin-process-page.png b/docs/assets/fr/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-process-page.png differ diff --git a/docs/assets/fr/Admin/server-admin-sql-page.png b/docs/assets/fr/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/fr/Admin/server-admin-web-page.png b/docs/assets/fr/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/fr/Admin/server-admin-web-page.png differ diff --git a/docs/assets/fr/Admin/server-admin.png b/docs/assets/fr/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/fr/Admin/server-admin.png differ diff --git a/docs/assets/fr/Admin/server-error.png b/docs/assets/fr/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/fr/Admin/server-error.png differ diff --git a/docs/assets/fr/Admin/server-graphic.png b/docs/assets/fr/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/fr/Admin/server-graphic.png differ diff --git a/docs/assets/fr/Admin/server-icon-1.png b/docs/assets/fr/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-1.png differ diff --git a/docs/assets/fr/Admin/server-icon-10.png b/docs/assets/fr/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-10.png differ diff --git a/docs/assets/fr/Admin/server-icon-11.png b/docs/assets/fr/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-11.png differ diff --git a/docs/assets/fr/Admin/server-icon-12.png b/docs/assets/fr/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-12.png differ diff --git a/docs/assets/fr/Admin/server-icon-13.png b/docs/assets/fr/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-13.png differ diff --git a/docs/assets/fr/Admin/server-icon-14.png b/docs/assets/fr/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-14.png differ diff --git a/docs/assets/fr/Admin/server-icon-15.png b/docs/assets/fr/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-15.png differ diff --git a/docs/assets/fr/Admin/server-icon-16.png b/docs/assets/fr/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-16.png differ diff --git a/docs/assets/fr/Admin/server-icon-17.png b/docs/assets/fr/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-17.png differ diff --git a/docs/assets/fr/Admin/server-icon-18.png b/docs/assets/fr/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-18.png differ diff --git a/docs/assets/fr/Admin/server-icon-19.png b/docs/assets/fr/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-19.png differ diff --git a/docs/assets/fr/Admin/server-icon-2.png b/docs/assets/fr/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-2.png differ diff --git a/docs/assets/fr/Admin/server-icon-20.png b/docs/assets/fr/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-20.png differ diff --git a/docs/assets/fr/Admin/server-icon-21.png b/docs/assets/fr/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-21.png differ diff --git a/docs/assets/fr/Admin/server-icon-22.png b/docs/assets/fr/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-22.png differ diff --git a/docs/assets/fr/Admin/server-icon-23.png b/docs/assets/fr/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-23.png differ diff --git a/docs/assets/fr/Admin/server-icon-24.png b/docs/assets/fr/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-24.png differ diff --git a/docs/assets/fr/Admin/server-icon-25.png b/docs/assets/fr/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-25.png differ diff --git a/docs/assets/fr/Admin/server-icon-3.png b/docs/assets/fr/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-3.png differ diff --git a/docs/assets/fr/Admin/server-icon-4.png b/docs/assets/fr/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-4.png differ diff --git a/docs/assets/fr/Admin/server-icon-5.png b/docs/assets/fr/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-5.png differ diff --git a/docs/assets/fr/Admin/server-icon-6.png b/docs/assets/fr/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-6.png differ diff --git a/docs/assets/fr/Admin/server-icon-7.png b/docs/assets/fr/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-7.png differ diff --git a/docs/assets/fr/Admin/server-icon-8.png b/docs/assets/fr/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-8.png differ diff --git a/docs/assets/fr/Admin/server-icon-9.png b/docs/assets/fr/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/fr/Admin/server-icon-9.png differ diff --git a/docs/assets/fr/Admin/server-licence-failed.png b/docs/assets/fr/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/fr/Admin/server-licence-failed.png differ diff --git a/docs/assets/fr/Admin/server-maintenance.png b/docs/assets/fr/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/fr/Admin/server-maintenance.png differ diff --git a/docs/assets/fr/Admin/server-message.png b/docs/assets/fr/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/fr/Admin/server-message.png differ diff --git a/docs/assets/fr/Admin/server-process-actions.png b/docs/assets/fr/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/fr/Admin/server-process-actions.png differ diff --git a/docs/assets/fr/Admin/server-process-buttons.png b/docs/assets/fr/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/fr/Admin/server-process-buttons.png differ diff --git a/docs/assets/fr/Admin/server-shut.png b/docs/assets/fr/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/fr/Admin/server-shut.png differ diff --git a/docs/assets/fr/Admin/server-sleeping.png b/docs/assets/fr/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/fr/Admin/server-sleeping.png differ diff --git a/docs/assets/fr/Admin/server-users-sort.png b/docs/assets/fr/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/fr/Admin/server-users-sort.png differ diff --git a/docs/assets/fr/Admin/server-users.png b/docs/assets/fr/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/fr/Admin/server-users.png differ diff --git a/docs/assets/fr/Admin/waMenu1.png b/docs/assets/fr/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/fr/Admin/waMenu1.png differ diff --git a/docs/assets/fr/Admin/waMenu2.png b/docs/assets/fr/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/fr/Admin/waMenu2.png differ diff --git a/docs/assets/fr/Admin/waSettings.png b/docs/assets/fr/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/fr/Admin/waSettings.png differ diff --git a/docs/assets/fr/Admin/waSettings2.png b/docs/assets/fr/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/fr/Admin/waSettings2.png differ diff --git a/docs/assets/fr/Debugging/attach-debugger-dialog-2.png b/docs/assets/fr/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/fr/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/fr/Debugging/attach-debugger-dialog.png b/docs/assets/fr/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/fr/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/fr/Debugging/attachRemoteDebugger.png b/docs/assets/fr/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/fr/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/fr/Debugging/break-list.png b/docs/assets/fr/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/fr/Debugging/break-list.png differ diff --git a/docs/assets/fr/Debugging/break-point.png b/docs/assets/fr/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/fr/Debugging/break-point.png differ diff --git a/docs/assets/fr/Debugging/break.png b/docs/assets/fr/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/fr/Debugging/break.png differ diff --git a/docs/assets/fr/Debugging/breakpoint-properties.png b/docs/assets/fr/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/fr/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/fr/Debugging/call-chain-example.png b/docs/assets/fr/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/fr/Debugging/call-chain-example.png differ diff --git a/docs/assets/fr/Debugging/callChainShowTypes.png b/docs/assets/fr/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/fr/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/fr/Debugging/catch-command.png b/docs/assets/fr/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/fr/Debugging/catch-command.png differ diff --git a/docs/assets/fr/Debugging/contextual-menu.png b/docs/assets/fr/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/fr/Debugging/contextual-menu.png differ diff --git a/docs/assets/fr/Debugging/current-form-values.png b/docs/assets/fr/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/fr/Debugging/current-form-values.png differ diff --git a/docs/assets/fr/Debugging/currentFormValues.png b/docs/assets/fr/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/fr/Debugging/currentFormValues.png differ diff --git a/docs/assets/fr/Debugging/custom-watch-pane-context-menu.png b/docs/assets/fr/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/fr/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/fr/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/fr/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/fr/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/fr/Debugging/custom-watch-pane.png b/docs/assets/fr/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/fr/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/fr/Debugging/customWatchPaneContext.png b/docs/assets/fr/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/fr/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/fr/Debugging/debugger-window-local-to-remove.png b/docs/assets/fr/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/fr/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/fr/Debugging/debugger-window-local.png b/docs/assets/fr/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/fr/Debugging/debugger-window-local.png differ diff --git a/docs/assets/fr/Debugging/debuggerShortcuts.png b/docs/assets/fr/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/fr/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/fr/Debugging/debuggerWindowRemote.png b/docs/assets/fr/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/fr/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/fr/Debugging/dynamicVariableNames.png b/docs/assets/fr/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/fr/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/fr/Debugging/executionToolbarButtons.png b/docs/assets/fr/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/fr/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/fr/Debugging/newCaughtCommand.png b/docs/assets/fr/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/fr/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/fr/Debugging/openDebugger.png b/docs/assets/fr/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/fr/Debugging/openDebugger.png differ diff --git a/docs/assets/fr/Debugging/remote-debugging.png b/docs/assets/fr/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/fr/Debugging/remote-debugging.png differ diff --git a/docs/assets/fr/Debugging/runtime-explorer.png b/docs/assets/fr/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/fr/Debugging/runtime-explorer.png differ diff --git a/docs/assets/fr/Debugging/runtimeError.png b/docs/assets/fr/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/fr/Debugging/runtimeError.png differ diff --git a/docs/assets/fr/Debugging/showTypes.png b/docs/assets/fr/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/fr/Debugging/showTypes.png differ diff --git a/docs/assets/fr/Debugging/sourceCodePane.png b/docs/assets/fr/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/fr/Debugging/sourceCodePane.png differ diff --git a/docs/assets/fr/Debugging/sourceCodePaneContext.png b/docs/assets/fr/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/fr/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/fr/Debugging/sourcePaneTip.png b/docs/assets/fr/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/fr/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/fr/Debugging/syntax-error.png b/docs/assets/fr/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/fr/Debugging/syntax-error.png differ diff --git a/docs/assets/fr/Debugging/syntax-error2.png b/docs/assets/fr/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/fr/Debugging/syntax-error2.png differ diff --git a/docs/assets/fr/Debugging/typing-error.png b/docs/assets/fr/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/fr/Debugging/typing-error.png differ diff --git a/docs/assets/fr/Debugging/watchPane.png b/docs/assets/fr/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/fr/Debugging/watchPane.png differ diff --git a/docs/assets/fr/Debugging/watchPaneOptions.png b/docs/assets/fr/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/fr/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/fr/Desktop/allow-mac-clients.png b/docs/assets/fr/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..f1153490abf3f9 Binary files /dev/null and b/docs/assets/fr/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/fr/FormEditor/alignment.png b/docs/assets/fr/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/fr/FormEditor/alignment.png differ diff --git a/docs/assets/fr/FormEditor/alignmentAssistant.png b/docs/assets/fr/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/fr/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/fr/FormEditor/alignmentContextMenu.png b/docs/assets/fr/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/fr/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/fr/FormEditor/alignmentMenu.png b/docs/assets/fr/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/fr/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/fr/FormEditor/alignmentTools.png b/docs/assets/fr/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/fr/FormEditor/alignmentTools.png differ diff --git a/docs/assets/fr/FormEditor/button.png b/docs/assets/fr/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/fr/FormEditor/button.png differ diff --git a/docs/assets/fr/FormEditor/checkbox.png b/docs/assets/fr/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/fr/FormEditor/checkbox.png differ diff --git a/docs/assets/fr/FormEditor/combo.png b/docs/assets/fr/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/fr/FormEditor/combo.png differ diff --git a/docs/assets/fr/FormEditor/cssIcon.png b/docs/assets/fr/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssIcon.png differ diff --git a/docs/assets/fr/FormEditor/cssIconMixed.png b/docs/assets/fr/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/fr/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/fr/FormEditor/cssImportant.png b/docs/assets/fr/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/fr/FormEditor/cssImportant.png differ diff --git a/docs/assets/fr/FormEditor/cssInvalidSyntax.png b/docs/assets/fr/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/fr/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/fr/FormEditor/cssMac.png b/docs/assets/fr/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssMac.png differ diff --git a/docs/assets/fr/FormEditor/cssNo.png b/docs/assets/fr/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssNo.png differ diff --git a/docs/assets/fr/FormEditor/cssPpropList.png b/docs/assets/fr/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssPpropList.png differ diff --git a/docs/assets/fr/FormEditor/cssPpropListImportant.png b/docs/assets/fr/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/fr/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/fr/FormEditor/cssPreview.png b/docs/assets/fr/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/fr/FormEditor/cssPreview.png differ diff --git a/docs/assets/fr/FormEditor/cssPreview_list.png b/docs/assets/fr/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/fr/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/fr/FormEditor/cssPreviewicon.png b/docs/assets/fr/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/fr/FormEditor/cssShield.png b/docs/assets/fr/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssShield.png differ diff --git a/docs/assets/fr/FormEditor/cssToolbar.png b/docs/assets/fr/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssToolbar.png differ diff --git a/docs/assets/fr/FormEditor/cssWin.png b/docs/assets/fr/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/fr/FormEditor/cssWin.png differ diff --git a/docs/assets/fr/FormEditor/darkicon.png b/docs/assets/fr/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/fr/FormEditor/darkicon.png differ diff --git a/docs/assets/fr/FormEditor/displyAndPage.png b/docs/assets/fr/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/fr/FormEditor/displyAndPage.png differ diff --git a/docs/assets/fr/FormEditor/distribution.png b/docs/assets/fr/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/fr/FormEditor/distribution.png differ diff --git a/docs/assets/fr/FormEditor/distributionTool.png b/docs/assets/fr/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/fr/FormEditor/distributionTool.png differ diff --git a/docs/assets/fr/FormEditor/duplcateMany.png b/docs/assets/fr/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/fr/FormEditor/duplcateMany.png differ diff --git a/docs/assets/fr/FormEditor/duplicateObjects.png b/docs/assets/fr/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/fr/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/fr/FormEditor/entryOrder1.png b/docs/assets/fr/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/fr/FormEditor/entryOrder1.png differ diff --git a/docs/assets/fr/FormEditor/entryOrder2.png b/docs/assets/fr/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/fr/FormEditor/entryOrder2.png differ diff --git a/docs/assets/fr/FormEditor/entryOrder3.png b/docs/assets/fr/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/fr/FormEditor/entryOrder3.png differ diff --git a/docs/assets/fr/FormEditor/execute.png b/docs/assets/fr/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/fr/FormEditor/execute.png differ diff --git a/docs/assets/fr/FormEditor/group.png b/docs/assets/fr/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/fr/FormEditor/group.png differ diff --git a/docs/assets/fr/FormEditor/horizontalDistribution.png b/docs/assets/fr/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/fr/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/fr/FormEditor/indicator.png b/docs/assets/fr/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/fr/FormEditor/indicator.png differ diff --git a/docs/assets/fr/FormEditor/input.png b/docs/assets/fr/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/fr/FormEditor/input.png differ diff --git a/docs/assets/fr/FormEditor/layering.png b/docs/assets/fr/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/fr/FormEditor/layering.png differ diff --git a/docs/assets/fr/FormEditor/level.png b/docs/assets/fr/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/fr/FormEditor/level.png differ diff --git a/docs/assets/fr/FormEditor/level2.png b/docs/assets/fr/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/fr/FormEditor/level2.png differ diff --git a/docs/assets/fr/FormEditor/library.png b/docs/assets/fr/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/fr/FormEditor/library.png differ diff --git a/docs/assets/fr/FormEditor/listBoxBuilder1.png b/docs/assets/fr/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/fr/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/fr/FormEditor/listbox.png b/docs/assets/fr/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/fr/FormEditor/listbox.png differ diff --git a/docs/assets/fr/FormEditor/macroClass.png b/docs/assets/fr/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/fr/FormEditor/macroClass.png differ diff --git a/docs/assets/fr/FormEditor/macroSelect.png b/docs/assets/fr/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/fr/FormEditor/macroSelect.png differ diff --git a/docs/assets/fr/FormEditor/macroStructure.png b/docs/assets/fr/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/fr/FormEditor/macroStructure.png differ diff --git a/docs/assets/fr/FormEditor/macroex1.png b/docs/assets/fr/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/fr/FormEditor/macroex1.png differ diff --git a/docs/assets/fr/FormEditor/macroex2.png b/docs/assets/fr/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/fr/FormEditor/macroex2.png differ diff --git a/docs/assets/fr/FormEditor/magneticGrid1.png b/docs/assets/fr/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/fr/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/fr/FormEditor/magneticGrid2.png b/docs/assets/fr/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/fr/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/fr/FormEditor/moving.png b/docs/assets/fr/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/fr/FormEditor/moving.png differ diff --git a/docs/assets/fr/FormEditor/objectBar.png b/docs/assets/fr/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/fr/FormEditor/objectBar.png differ diff --git a/docs/assets/fr/FormEditor/objectLibrary.png b/docs/assets/fr/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/fr/FormEditor/objectLibrary.png differ diff --git a/docs/assets/fr/FormEditor/plugin.png b/docs/assets/fr/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/fr/FormEditor/plugin.png differ diff --git a/docs/assets/fr/FormEditor/radio.png b/docs/assets/fr/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/fr/FormEditor/radio.png differ diff --git a/docs/assets/fr/FormEditor/rectangle.png b/docs/assets/fr/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/fr/FormEditor/rectangle.png differ diff --git a/docs/assets/fr/FormEditor/selectMultiple.png b/docs/assets/fr/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/fr/FormEditor/selectMultiple.png differ diff --git a/docs/assets/fr/FormEditor/selectResize.png b/docs/assets/fr/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/fr/FormEditor/selectResize.png differ diff --git a/docs/assets/fr/FormEditor/selection.png b/docs/assets/fr/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/fr/FormEditor/selection.png differ diff --git a/docs/assets/fr/FormEditor/shields2.png b/docs/assets/fr/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/fr/FormEditor/shields2.png differ diff --git a/docs/assets/fr/FormEditor/showHideElements.png b/docs/assets/fr/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/fr/FormEditor/showHideElements.png differ diff --git a/docs/assets/fr/FormEditor/splitter.png b/docs/assets/fr/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/fr/FormEditor/splitter.png differ diff --git a/docs/assets/fr/FormEditor/text.png b/docs/assets/fr/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/fr/FormEditor/text.png differ diff --git a/docs/assets/fr/FormEditor/toolbar.png b/docs/assets/fr/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/fr/FormEditor/toolbar.png differ diff --git a/docs/assets/fr/FormEditor/views.png b/docs/assets/fr/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/fr/FormEditor/views.png differ diff --git a/docs/assets/fr/FormEditor/zOrder.png b/docs/assets/fr/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/fr/FormEditor/zOrder.png differ diff --git a/docs/assets/fr/FormEditor/zoom.png b/docs/assets/fr/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/fr/FormEditor/zoom.png differ diff --git a/docs/assets/fr/FormObjects/fruits1.png b/docs/assets/fr/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/fr/FormObjects/fruits1.png differ diff --git a/docs/assets/fr/FormObjects/fruits2.png b/docs/assets/fr/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/fr/FormObjects/fruits2.png differ diff --git a/docs/assets/fr/FormObjects/fruits3.png b/docs/assets/fr/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/fr/FormObjects/fruits3.png differ diff --git a/docs/assets/fr/FormObjects/popupDropdown_hierar.png b/docs/assets/fr/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/fr/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/fr/ORDA/AutoCompletionEntity.png b/docs/assets/fr/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/fr/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/fr/ORDA/ClassDiagramImage.png b/docs/assets/fr/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/fr/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/fr/ORDA/ExposeDataclass.png b/docs/assets/fr/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/fr/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/fr/ORDA/ORDA_Classes-3.png b/docs/assets/fr/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/fr/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/fr/ORDA/Orda_example.png b/docs/assets/fr/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/fr/ORDA/Orda_example.png differ diff --git a/docs/assets/fr/ORDA/api.png b/docs/assets/fr/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/fr/ORDA/api.png differ diff --git a/docs/assets/fr/ORDA/classORDA1.png b/docs/assets/fr/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/fr/ORDA/classORDA1.png differ diff --git a/docs/assets/fr/ORDA/classORDA2.png b/docs/assets/fr/ORDA/classORDA2.png new file mode 100644 index 00000000000000..2730f8ba17cd66 Binary files /dev/null and b/docs/assets/fr/ORDA/classORDA2.png differ diff --git a/docs/assets/fr/ORDA/classORDA3.png b/docs/assets/fr/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/fr/ORDA/classORDA3.png differ diff --git a/docs/assets/fr/ORDA/classORDA4.png b/docs/assets/fr/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/fr/ORDA/classORDA4.png differ diff --git a/docs/assets/fr/ORDA/classORDA5.png b/docs/assets/fr/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/fr/ORDA/classORDA5.png differ diff --git a/docs/assets/fr/ORDA/companyTable.png b/docs/assets/fr/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/fr/ORDA/companyTable.png differ diff --git a/docs/assets/fr/ORDA/concurrent1.png b/docs/assets/fr/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/fr/ORDA/concurrent1.png differ diff --git a/docs/assets/fr/ORDA/concurrent2.png b/docs/assets/fr/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/fr/ORDA/concurrent2.png differ diff --git a/docs/assets/fr/ORDA/concurrent3.png b/docs/assets/fr/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/fr/ORDA/concurrent3.png differ diff --git a/docs/assets/fr/ORDA/dataclassProperties.png b/docs/assets/fr/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/fr/ORDA/dataclassProperties.png differ diff --git a/docs/assets/fr/ORDA/datastoreMapping.png b/docs/assets/fr/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/fr/ORDA/datastoreMapping.png differ diff --git a/docs/assets/fr/ORDA/debug1.png b/docs/assets/fr/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/fr/ORDA/debug1.png differ diff --git a/docs/assets/fr/ORDA/deezer.png b/docs/assets/fr/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/fr/ORDA/deezer.png differ diff --git a/docs/assets/fr/ORDA/dsDiagram.png b/docs/assets/fr/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/fr/ORDA/dsDiagram.png differ diff --git a/docs/assets/fr/ORDA/entityAttributes.png b/docs/assets/fr/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/fr/ORDA/entityAttributes.png differ diff --git a/docs/assets/fr/ORDA/entityAttributes2.png b/docs/assets/fr/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/fr/ORDA/entityAttributes2.png differ diff --git a/docs/assets/fr/ORDA/entityAttributes3.png b/docs/assets/fr/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/fr/ORDA/entityAttributes3.png differ diff --git a/docs/assets/fr/ORDA/entityRef1.png b/docs/assets/fr/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/fr/ORDA/entityRef1.png differ diff --git a/docs/assets/fr/ORDA/entityRef2.png b/docs/assets/fr/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/fr/ORDA/entityRef2.png differ diff --git a/docs/assets/fr/ORDA/entitySelectionRelationAttributes.png b/docs/assets/fr/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/fr/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/fr/ORDA/mainConcepts.png b/docs/assets/fr/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/fr/ORDA/mainConcepts.png differ diff --git a/docs/assets/fr/ORDA/optimisticLock1.png b/docs/assets/fr/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/fr/ORDA/optimisticLock1.png differ diff --git a/docs/assets/fr/ORDA/optimisticLock2.png b/docs/assets/fr/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/fr/ORDA/optimisticLock2.png differ diff --git a/docs/assets/fr/ORDA/optimisticLock3.png b/docs/assets/fr/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/fr/ORDA/optimisticLock3.png differ diff --git a/docs/assets/fr/ORDA/relationProperties.png b/docs/assets/fr/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/fr/ORDA/relationProperties.png differ diff --git a/docs/assets/fr/ORDA/sessionAdmin.png b/docs/assets/fr/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/fr/ORDA/sessionAdmin.png differ diff --git a/docs/assets/fr/ORDA/sessions.png b/docs/assets/fr/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/fr/ORDA/sessions.png differ diff --git a/docs/assets/fr/ORDA/showClass.png b/docs/assets/fr/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/fr/ORDA/showClass.png differ diff --git a/docs/assets/fr/ORDA/struc.png b/docs/assets/fr/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/fr/ORDA/struc.png differ diff --git a/docs/assets/fr/ORDA/struc2.png b/docs/assets/fr/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/fr/ORDA/struc2.png differ diff --git a/docs/assets/fr/ORDA/struc2s.png b/docs/assets/fr/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/fr/ORDA/struc2s.png differ diff --git a/docs/assets/fr/Preferences/categories.png b/docs/assets/fr/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/fr/Preferences/categories.png differ diff --git a/docs/assets/fr/Preferences/general1.png b/docs/assets/fr/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/fr/Preferences/general1.png differ diff --git a/docs/assets/fr/Preferences/general2.png b/docs/assets/fr/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/fr/Preferences/general2.png differ diff --git a/docs/assets/fr/Preferences/general3.png b/docs/assets/fr/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/fr/Preferences/general3.png differ diff --git a/docs/assets/fr/Preferences/general4.png b/docs/assets/fr/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/fr/Preferences/general4.png differ diff --git a/docs/assets/fr/Preferences/general5.png b/docs/assets/fr/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/fr/Preferences/general5.png differ diff --git a/docs/assets/fr/Preferences/gitignore.png b/docs/assets/fr/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/fr/Preferences/gitignore.png differ diff --git a/docs/assets/fr/Preferences/langCateg.png b/docs/assets/fr/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/fr/Preferences/langCateg.png differ diff --git a/docs/assets/fr/Preferences/options.png b/docs/assets/fr/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/fr/Preferences/options.png differ diff --git a/docs/assets/fr/Preferences/optionsBlockLines.png b/docs/assets/fr/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/fr/Preferences/optionsClosing.png b/docs/assets/fr/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/fr/Preferences/optionsClosing.png differ diff --git a/docs/assets/fr/Preferences/optionsClosing2.png b/docs/assets/fr/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/fr/Preferences/optionsClosing2.png differ diff --git a/docs/assets/fr/Preferences/optionsHideIcons.png b/docs/assets/fr/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/fr/Preferences/optionsIndent.png b/docs/assets/fr/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsIndent.png differ diff --git a/docs/assets/fr/Preferences/optionsLine.png b/docs/assets/fr/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsLine.png differ diff --git a/docs/assets/fr/Preferences/optionsLogicalBlocks.png b/docs/assets/fr/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/fr/Preferences/optionsRectangle.png b/docs/assets/fr/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/fr/Preferences/optionsRectangle.png differ diff --git a/docs/assets/fr/Preferences/optionsVariables.png b/docs/assets/fr/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/fr/Preferences/optionsVariables.png differ diff --git a/docs/assets/fr/Preferences/overviewAccess.png b/docs/assets/fr/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/fr/Preferences/overviewAccess.png differ diff --git a/docs/assets/fr/Preferences/overviewSettings.png b/docs/assets/fr/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/fr/Preferences/overviewSettings.png differ diff --git a/docs/assets/fr/Preferences/overviewUser.png b/docs/assets/fr/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/fr/Preferences/overviewUser.png differ diff --git a/docs/assets/fr/Preferences/shortcuts.png b/docs/assets/fr/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/fr/Preferences/shortcuts.png differ diff --git a/docs/assets/fr/Preferences/suggestionsAutoOpen.png b/docs/assets/fr/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/fr/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/fr/Preferences/themes.png b/docs/assets/fr/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/fr/Preferences/themes.png differ diff --git a/docs/assets/fr/Project/4Dlinkfiles.png b/docs/assets/fr/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/fr/Project/4Dlinkfiles.png differ diff --git a/docs/assets/fr/Project/buildappCSProj.png b/docs/assets/fr/Project/buildappCSProj.png index bbbdd0dbc38997..2ee87c60eefb8c 100644 Binary files a/docs/assets/fr/Project/buildappCSProj.png and b/docs/assets/fr/Project/buildappCSProj.png differ diff --git a/docs/assets/fr/Project/comp1.png b/docs/assets/fr/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/fr/Project/comp1.png differ diff --git a/docs/assets/fr/Project/compDoc.png b/docs/assets/fr/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/fr/Project/compDoc.png differ diff --git a/docs/assets/fr/Project/compileModes.png b/docs/assets/fr/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/fr/Project/compileModes.png differ diff --git a/docs/assets/fr/Project/compilerWin1.png b/docs/assets/fr/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/fr/Project/compilerWin1.png differ diff --git a/docs/assets/fr/Project/compilerWin2.png b/docs/assets/fr/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/fr/Project/compilerWin2.png differ diff --git a/docs/assets/fr/Project/compilerWin3.png b/docs/assets/fr/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/fr/Project/compilerWin3.png differ diff --git a/docs/assets/fr/Project/compilerWin4.png b/docs/assets/fr/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/fr/Project/compilerWin4.png differ diff --git a/docs/assets/fr/Project/compilerWin5.png b/docs/assets/fr/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/fr/Project/compilerWin5.png differ diff --git a/docs/assets/fr/Project/compilerWin6.png b/docs/assets/fr/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/fr/Project/compilerWin6.png differ diff --git a/docs/assets/fr/Project/success.png b/docs/assets/fr/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/fr/Project/success.png differ diff --git a/docs/assets/fr/REST/login.png b/docs/assets/fr/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/fr/REST/login.png differ diff --git a/docs/assets/fr/REST/ordastructure.png b/docs/assets/fr/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/fr/REST/ordastructure.png differ diff --git a/docs/assets/fr/WebServer/authenticate.png b/docs/assets/fr/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/fr/WebServer/authenticate.png differ diff --git a/docs/assets/fr/WebServer/authenticate2.png b/docs/assets/fr/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/fr/WebServer/authenticate2.png differ diff --git a/docs/assets/fr/WebServer/authenticate3.png b/docs/assets/fr/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/fr/WebServer/authenticate3.png differ diff --git a/docs/assets/fr/WebServer/authentication.png b/docs/assets/fr/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/fr/WebServer/authentication.png differ diff --git a/docs/assets/fr/WebServer/backup.png b/docs/assets/fr/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/fr/WebServer/backup.png differ diff --git a/docs/assets/fr/WebServer/config.png b/docs/assets/fr/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/fr/WebServer/config.png differ diff --git a/docs/assets/fr/WebServer/defaultHomePage.png b/docs/assets/fr/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/fr/WebServer/defaultHomePage.png differ diff --git a/docs/assets/fr/WebServer/errorPage.png b/docs/assets/fr/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/fr/WebServer/errorPage.png differ diff --git a/docs/assets/fr/WebServer/exampleSession.png b/docs/assets/fr/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/fr/WebServer/exampleSession.png differ diff --git a/docs/assets/fr/WebServer/hello.png b/docs/assets/fr/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/fr/WebServer/hello.png differ diff --git a/docs/assets/fr/WebServer/hello0.png b/docs/assets/fr/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/fr/WebServer/hello0.png differ diff --git a/docs/assets/fr/WebServer/hello2.png b/docs/assets/fr/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/fr/WebServer/hello2.png differ diff --git a/docs/assets/fr/WebServer/hello3.png b/docs/assets/fr/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/fr/WebServer/hello3.png differ diff --git a/docs/assets/fr/WebServer/hello3bis.png b/docs/assets/fr/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/fr/WebServer/hello3bis.png differ diff --git a/docs/assets/fr/WebServer/hello4.png b/docs/assets/fr/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/fr/WebServer/hello4.png differ diff --git a/docs/assets/fr/WebServer/hello5.png b/docs/assets/fr/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/fr/WebServer/hello5.png differ diff --git a/docs/assets/fr/WebServer/hello6.png b/docs/assets/fr/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/fr/WebServer/hello6.png differ diff --git a/docs/assets/fr/WebServer/helloUsers.png b/docs/assets/fr/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/fr/WebServer/helloUsers.png differ diff --git a/docs/assets/fr/WebServer/httpCommands.png b/docs/assets/fr/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/fr/WebServer/httpCommands.png differ diff --git a/docs/assets/fr/WebServer/loadBalance.png b/docs/assets/fr/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/fr/WebServer/loadBalance.png differ diff --git a/docs/assets/fr/WebServer/log.png b/docs/assets/fr/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/fr/WebServer/log.png differ diff --git a/docs/assets/fr/WebServer/login1.png b/docs/assets/fr/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/fr/WebServer/login1.png differ diff --git a/docs/assets/fr/WebServer/login2.png b/docs/assets/fr/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/fr/WebServer/login2.png differ diff --git a/docs/assets/fr/WebServer/methodIcon.png b/docs/assets/fr/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/fr/WebServer/methodIcon.png differ diff --git a/docs/assets/fr/WebServer/methodProperties.png b/docs/assets/fr/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/fr/WebServer/methodProperties.png differ diff --git a/docs/assets/fr/WebServer/option1.png b/docs/assets/fr/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/fr/WebServer/option1.png differ diff --git a/docs/assets/fr/WebServer/option2.png b/docs/assets/fr/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/fr/WebServer/option2.png differ diff --git a/docs/assets/fr/WebServer/preemptive.png b/docs/assets/fr/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/fr/WebServer/preemptive.png differ diff --git a/docs/assets/fr/WebServer/processIcon.png b/docs/assets/fr/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/fr/WebServer/processIcon.png differ diff --git a/docs/assets/fr/WebServer/restResource.png b/docs/assets/fr/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/fr/WebServer/restResource.png differ diff --git a/docs/assets/fr/WebServer/schemaSession.png b/docs/assets/fr/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/fr/WebServer/schemaSession.png differ diff --git a/docs/assets/fr/WebServer/serverAccess.png b/docs/assets/fr/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/fr/WebServer/serverAccess.png differ diff --git a/docs/assets/fr/WebServer/session1.png b/docs/assets/fr/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/fr/WebServer/session1.png differ diff --git a/docs/assets/fr/WebServer/settingsSession.png b/docs/assets/fr/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/fr/WebServer/settingsSession.png differ diff --git a/docs/assets/fr/WebServer/spiders.png b/docs/assets/fr/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/fr/WebServer/spiders.png differ diff --git a/docs/assets/fr/WebServer/start1.png b/docs/assets/fr/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/fr/WebServer/start1.png differ diff --git a/docs/assets/fr/WebServer/start2.png b/docs/assets/fr/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/fr/WebServer/start2.png differ diff --git a/docs/assets/fr/WebServer/start3.png b/docs/assets/fr/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/fr/WebServer/start3.png differ diff --git a/docs/assets/fr/WebServer/stop1.png b/docs/assets/fr/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/fr/WebServer/stop1.png differ diff --git a/docs/assets/fr/WebServer/tempo_codeHTML.png b/docs/assets/fr/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/fr/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/fr/WebServer/test1.png b/docs/assets/fr/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/fr/WebServer/test1.png differ diff --git a/docs/assets/fr/WebServer/tls1.png b/docs/assets/fr/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/fr/WebServer/tls1.png differ diff --git a/docs/assets/fr/WebServer/tls2.png b/docs/assets/fr/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/fr/WebServer/tls2.png differ diff --git a/docs/assets/fr/WebServer/tls3.png b/docs/assets/fr/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/fr/WebServer/tls3.png differ diff --git a/docs/assets/fr/WebServer/webServices.png b/docs/assets/fr/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/fr/WebServer/webServices.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/localremote.png b/docs/assets/fr/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/fr/getStart/localremote.png differ diff --git a/docs/assets/fr/getStart/logo4d.png b/docs/assets/fr/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/fr/getStart/logo4d.png differ diff --git a/docs/assets/fr/getStart/projectCreate1.png b/docs/assets/fr/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/fr/getStart/projectCreate1.png differ diff --git a/docs/assets/fr/getStart/projectCreate2.png b/docs/assets/fr/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/fr/getStart/projectCreate2.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/fr/getStart/serverConnect.png b/docs/assets/fr/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/fr/getStart/serverConnect.png differ diff --git a/docs/assets/fr/getStart/serverConnect2.png b/docs/assets/fr/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/fr/getStart/serverConnect2.png differ diff --git a/docs/assets/fr/getStart/welcome.png b/docs/assets/fr/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/fr/getStart/welcome.png differ diff --git a/docs/assets/fr/getStart/welcome2.png b/docs/assets/fr/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/fr/getStart/welcome2.png differ diff --git a/docs/assets/fr/web-studio/add-component.png b/docs/assets/fr/web-studio/add-component.png new file mode 100644 index 00000000000000..37598b30e917f1 Binary files /dev/null and b/docs/assets/fr/web-studio/add-component.png differ diff --git a/docs/assets/fr/web-studio/breadcrumbs.png b/docs/assets/fr/web-studio/breadcrumbs.png new file mode 100644 index 00000000000000..cdd1cfb0bec624 Binary files /dev/null and b/docs/assets/fr/web-studio/breadcrumbs.png differ diff --git a/docs/assets/fr/web-studio/canvas.png b/docs/assets/fr/web-studio/canvas.png new file mode 100644 index 00000000000000..54e414c2fd53d1 Binary files /dev/null and b/docs/assets/fr/web-studio/canvas.png differ diff --git a/docs/assets/fr/web-studio/components.png b/docs/assets/fr/web-studio/components.png new file mode 100644 index 00000000000000..103b70caa82ec1 Binary files /dev/null and b/docs/assets/fr/web-studio/components.png differ diff --git a/docs/assets/fr/web-studio/data-sources.png b/docs/assets/fr/web-studio/data-sources.png new file mode 100644 index 00000000000000..d3356f2909f6cd Binary files /dev/null and b/docs/assets/fr/web-studio/data-sources.png differ diff --git a/docs/assets/fr/web-studio/events.png b/docs/assets/fr/web-studio/events.png new file mode 100644 index 00000000000000..bce05ed645dc50 Binary files /dev/null and b/docs/assets/fr/web-studio/events.png differ diff --git a/docs/assets/fr/web-studio/explorer.png b/docs/assets/fr/web-studio/explorer.png new file mode 100644 index 00000000000000..af8c807e0419e9 Binary files /dev/null and b/docs/assets/fr/web-studio/explorer.png differ diff --git a/docs/assets/fr/web-studio/image-server-side.png b/docs/assets/fr/web-studio/image-server-side.png new file mode 100644 index 00000000000000..ce7e66427d61ac Binary files /dev/null and b/docs/assets/fr/web-studio/image-server-side.png differ diff --git a/docs/assets/fr/web-studio/number-1-icon.png b/docs/assets/fr/web-studio/number-1-icon.png new file mode 100644 index 00000000000000..d391add818165e Binary files /dev/null and b/docs/assets/fr/web-studio/number-1-icon.png differ diff --git a/docs/assets/fr/web-studio/properties-panel.png b/docs/assets/fr/web-studio/properties-panel.png new file mode 100644 index 00000000000000..6ddf6991a32d75 Binary files /dev/null and b/docs/assets/fr/web-studio/properties-panel.png differ diff --git a/docs/assets/fr/web-studio/style-panel.png b/docs/assets/fr/web-studio/style-panel.png new file mode 100644 index 00000000000000..9144cb5055b941 Binary files /dev/null and b/docs/assets/fr/web-studio/style-panel.png differ diff --git a/docs/assets/fr/web-studio/styles-library.png b/docs/assets/fr/web-studio/styles-library.png new file mode 100644 index 00000000000000..675a8ad4bb9f98 Binary files /dev/null and b/docs/assets/fr/web-studio/styles-library.png differ diff --git a/docs/assets/fr/web-studio/tabs.png b/docs/assets/fr/web-studio/tabs.png new file mode 100644 index 00000000000000..59879dedd4c48b Binary files /dev/null and b/docs/assets/fr/web-studio/tabs.png differ diff --git a/docs/assets/fr/web-studio/web-event-1.png b/docs/assets/fr/web-studio/web-event-1.png new file mode 100644 index 00000000000000..bc91acf07754c2 Binary files /dev/null and b/docs/assets/fr/web-studio/web-event-1.png differ diff --git a/docs/assets/fr/web-studio/web-event-2.png b/docs/assets/fr/web-studio/web-event-2.png new file mode 100644 index 00000000000000..8f4cd0251c5c60 Binary files /dev/null and b/docs/assets/fr/web-studio/web-event-2.png differ diff --git a/docs/assets/fr/web-studio/web-form-object.png b/docs/assets/fr/web-studio/web-form-object.png new file mode 100644 index 00000000000000..325e330b0a44f8 Binary files /dev/null and b/docs/assets/fr/web-studio/web-form-object.png differ diff --git a/docs/assets/fr/web-studio/web-studio-interface.png b/docs/assets/fr/web-studio/web-studio-interface.png new file mode 100644 index 00000000000000..7f6232ae4541d0 Binary files /dev/null and b/docs/assets/fr/web-studio/web-studio-interface.png differ diff --git a/docs/assets/fr/web-studio/web-studio-intro.png b/docs/assets/fr/web-studio/web-studio-intro.png new file mode 100644 index 00000000000000..c1b21f201f0ac0 Binary files /dev/null and b/docs/assets/fr/web-studio/web-studio-intro.png differ diff --git a/docs/assets/fr/web-studio/web-studio.png b/docs/assets/fr/web-studio/web-studio.png new file mode 100644 index 00000000000000..997c8548e46cfa Binary files /dev/null and b/docs/assets/fr/web-studio/web-studio.png differ diff --git a/docs/assets/fr/web-studio/webstudio-home.png b/docs/assets/fr/web-studio/webstudio-home.png new file mode 100644 index 00000000000000..a3c85415d866ed Binary files /dev/null and b/docs/assets/fr/web-studio/webstudio-home.png differ diff --git a/docs/assets/ja/API/AutoCompletionEntity.png b/docs/assets/ja/API/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/ja/API/AutoCompletionEntity.png differ diff --git a/docs/assets/ja/API/ClassDiagramImage.png b/docs/assets/ja/API/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/ja/API/ClassDiagramImage.png differ diff --git a/docs/assets/ja/API/ORDA_Classes-3.png b/docs/assets/ja/API/ORDA_Classes-3.png new file mode 100644 index 00000000000000..fe5e80712a8f7c Binary files /dev/null and b/docs/assets/ja/API/ORDA_Classes-3.png differ diff --git a/docs/assets/ja/API/Orda_example.png b/docs/assets/ja/API/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/ja/API/Orda_example.png differ diff --git a/docs/assets/ja/API/api.png b/docs/assets/ja/API/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/ja/API/api.png differ diff --git a/docs/assets/ja/API/classORDA1.png b/docs/assets/ja/API/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/ja/API/classORDA1.png differ diff --git a/docs/assets/ja/API/classORDA2.png b/docs/assets/ja/API/classORDA2.png new file mode 100644 index 00000000000000..7204647d1353e7 Binary files /dev/null and b/docs/assets/ja/API/classORDA2.png differ diff --git a/docs/assets/ja/API/classORDA3.png b/docs/assets/ja/API/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/ja/API/classORDA3.png differ diff --git a/docs/assets/ja/API/classORDA4.png b/docs/assets/ja/API/classORDA4.png new file mode 100644 index 00000000000000..67f7d923a46e6d Binary files /dev/null and b/docs/assets/ja/API/classORDA4.png differ diff --git a/docs/assets/ja/API/classORDA5.png b/docs/assets/ja/API/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/ja/API/classORDA5.png differ diff --git a/docs/assets/ja/API/dataclassAttribute.png b/docs/assets/ja/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/ja/API/dataclassAttribute.png differ diff --git a/docs/assets/ja/API/dataclassAttribute2.png b/docs/assets/ja/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/ja/API/dataclassAttribute2.png differ diff --git a/docs/assets/ja/API/dataclassAttribute3.png b/docs/assets/ja/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/ja/API/dataclassAttribute3.png differ diff --git a/docs/assets/ja/API/dataclassAttribute4.png b/docs/assets/ja/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/ja/API/dataclassAttribute4.png differ diff --git a/docs/assets/ja/API/dsDiagram.png b/docs/assets/ja/API/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/ja/API/dsDiagram.png differ diff --git a/docs/assets/ja/API/formulaAlert.png b/docs/assets/ja/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/ja/API/formulaAlert.png differ diff --git a/docs/assets/ja/API/formulaDialog.png b/docs/assets/ja/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/ja/API/formulaDialog.png differ diff --git a/docs/assets/ja/API/showClass.png b/docs/assets/ja/API/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/ja/API/showClass.png differ diff --git a/docs/assets/ja/API/signal.png b/docs/assets/ja/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/ja/API/signal.png differ diff --git a/docs/assets/ja/Admin/2021-07-27_18h31_35.png b/docs/assets/ja/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/ja/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/ja/Admin/Cert1.png b/docs/assets/ja/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/ja/Admin/Cert1.png differ diff --git a/docs/assets/ja/Admin/Cert2.png b/docs/assets/ja/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/ja/Admin/Cert2.png differ diff --git a/docs/assets/ja/Admin/DEFilter1.png b/docs/assets/ja/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/ja/Admin/DEFilter1.png differ diff --git a/docs/assets/ja/Admin/DEFilter2.png b/docs/assets/ja/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/ja/Admin/DEFilter2.png differ diff --git a/docs/assets/ja/Admin/DEFilter3.png b/docs/assets/ja/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/ja/Admin/DEFilter3.png differ diff --git a/docs/assets/ja/Admin/accessKey.png b/docs/assets/ja/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/ja/Admin/accessKey.png differ diff --git a/docs/assets/ja/Admin/accessKeyEnter.png b/docs/assets/ja/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/ja/Admin/accessKeyEnter.png differ diff --git a/docs/assets/ja/Admin/buildappCertif.png b/docs/assets/ja/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/ja/Admin/buildappCertif.png differ diff --git a/docs/assets/ja/Admin/buildapposxcertProj.png b/docs/assets/ja/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/ja/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/ja/Admin/cacheServera.png b/docs/assets/ja/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/ja/Admin/cacheServera.png differ diff --git a/docs/assets/ja/Admin/cacheServerb.png b/docs/assets/ja/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/ja/Admin/cacheServerb.png differ diff --git a/docs/assets/ja/Admin/cachea.png b/docs/assets/ja/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/ja/Admin/cachea.png differ diff --git a/docs/assets/ja/Admin/cacheb.png b/docs/assets/ja/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/ja/Admin/cacheb.png differ diff --git a/docs/assets/ja/Admin/dark.png b/docs/assets/ja/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/ja/Admin/dark.png differ diff --git a/docs/assets/ja/Admin/dataExplorer1.png b/docs/assets/ja/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer1.png differ diff --git a/docs/assets/ja/Admin/dataExplorer10.png b/docs/assets/ja/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer10.png differ diff --git a/docs/assets/ja/Admin/dataExplorer11.png b/docs/assets/ja/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer11.png differ diff --git a/docs/assets/ja/Admin/dataExplorer12.png b/docs/assets/ja/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer12.png differ diff --git a/docs/assets/ja/Admin/dataExplorer2.png b/docs/assets/ja/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer2.png differ diff --git a/docs/assets/ja/Admin/dataExplorer3.png b/docs/assets/ja/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer3.png differ diff --git a/docs/assets/ja/Admin/dataExplorer4.png b/docs/assets/ja/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer4.png differ diff --git a/docs/assets/ja/Admin/dataExplorer4b.png b/docs/assets/ja/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer4b.png differ diff --git a/docs/assets/ja/Admin/dataExplorer5.png b/docs/assets/ja/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer5.png differ diff --git a/docs/assets/ja/Admin/dataExplorer6.png b/docs/assets/ja/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer6.png differ diff --git a/docs/assets/ja/Admin/dataExplorer7.png b/docs/assets/ja/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer7.png differ diff --git a/docs/assets/ja/Admin/dataExplorer8.png b/docs/assets/ja/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer8.png differ diff --git a/docs/assets/ja/Admin/dataExplorer9.png b/docs/assets/ja/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/ja/Admin/dataExplorer9.png differ diff --git a/docs/assets/ja/Admin/server-admin-application-page.png b/docs/assets/ja/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-application-page.png differ diff --git a/docs/assets/ja/Admin/server-admin-monitor-adv1.png b/docs/assets/ja/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/ja/Admin/server-admin-monitor-adv2.png b/docs/assets/ja/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/ja/Admin/server-admin-monitor-page.png b/docs/assets/ja/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/ja/Admin/server-admin-monitor-snapshot.png b/docs/assets/ja/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/ja/Admin/server-admin-process-page.png b/docs/assets/ja/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-process-page.png differ diff --git a/docs/assets/ja/Admin/server-admin-sql-page.png b/docs/assets/ja/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/ja/Admin/server-admin-web-page.png b/docs/assets/ja/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/ja/Admin/server-admin-web-page.png differ diff --git a/docs/assets/ja/Admin/server-admin.png b/docs/assets/ja/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/ja/Admin/server-admin.png differ diff --git a/docs/assets/ja/Admin/server-error.png b/docs/assets/ja/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/ja/Admin/server-error.png differ diff --git a/docs/assets/ja/Admin/server-graphic.png b/docs/assets/ja/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/ja/Admin/server-graphic.png differ diff --git a/docs/assets/ja/Admin/server-icon-1.png b/docs/assets/ja/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-1.png differ diff --git a/docs/assets/ja/Admin/server-icon-10.png b/docs/assets/ja/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-10.png differ diff --git a/docs/assets/ja/Admin/server-icon-11.png b/docs/assets/ja/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-11.png differ diff --git a/docs/assets/ja/Admin/server-icon-12.png b/docs/assets/ja/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-12.png differ diff --git a/docs/assets/ja/Admin/server-icon-13.png b/docs/assets/ja/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-13.png differ diff --git a/docs/assets/ja/Admin/server-icon-14.png b/docs/assets/ja/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-14.png differ diff --git a/docs/assets/ja/Admin/server-icon-15.png b/docs/assets/ja/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-15.png differ diff --git a/docs/assets/ja/Admin/server-icon-16.png b/docs/assets/ja/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-16.png differ diff --git a/docs/assets/ja/Admin/server-icon-17.png b/docs/assets/ja/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-17.png differ diff --git a/docs/assets/ja/Admin/server-icon-18.png b/docs/assets/ja/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-18.png differ diff --git a/docs/assets/ja/Admin/server-icon-19.png b/docs/assets/ja/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-19.png differ diff --git a/docs/assets/ja/Admin/server-icon-2.png b/docs/assets/ja/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-2.png differ diff --git a/docs/assets/ja/Admin/server-icon-20.png b/docs/assets/ja/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-20.png differ diff --git a/docs/assets/ja/Admin/server-icon-21.png b/docs/assets/ja/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-21.png differ diff --git a/docs/assets/ja/Admin/server-icon-22.png b/docs/assets/ja/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-22.png differ diff --git a/docs/assets/ja/Admin/server-icon-23.png b/docs/assets/ja/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-23.png differ diff --git a/docs/assets/ja/Admin/server-icon-24.png b/docs/assets/ja/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-24.png differ diff --git a/docs/assets/ja/Admin/server-icon-25.png b/docs/assets/ja/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-25.png differ diff --git a/docs/assets/ja/Admin/server-icon-3.png b/docs/assets/ja/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-3.png differ diff --git a/docs/assets/ja/Admin/server-icon-4.png b/docs/assets/ja/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-4.png differ diff --git a/docs/assets/ja/Admin/server-icon-5.png b/docs/assets/ja/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-5.png differ diff --git a/docs/assets/ja/Admin/server-icon-6.png b/docs/assets/ja/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-6.png differ diff --git a/docs/assets/ja/Admin/server-icon-7.png b/docs/assets/ja/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-7.png differ diff --git a/docs/assets/ja/Admin/server-icon-8.png b/docs/assets/ja/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-8.png differ diff --git a/docs/assets/ja/Admin/server-icon-9.png b/docs/assets/ja/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/ja/Admin/server-icon-9.png differ diff --git a/docs/assets/ja/Admin/server-licence-failed.png b/docs/assets/ja/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/ja/Admin/server-licence-failed.png differ diff --git a/docs/assets/ja/Admin/server-maintenance.png b/docs/assets/ja/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/ja/Admin/server-maintenance.png differ diff --git a/docs/assets/ja/Admin/server-message.png b/docs/assets/ja/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/ja/Admin/server-message.png differ diff --git a/docs/assets/ja/Admin/server-process-actions.png b/docs/assets/ja/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/ja/Admin/server-process-actions.png differ diff --git a/docs/assets/ja/Admin/server-process-buttons.png b/docs/assets/ja/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/ja/Admin/server-process-buttons.png differ diff --git a/docs/assets/ja/Admin/server-shut.png b/docs/assets/ja/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/ja/Admin/server-shut.png differ diff --git a/docs/assets/ja/Admin/server-sleeping.png b/docs/assets/ja/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/ja/Admin/server-sleeping.png differ diff --git a/docs/assets/ja/Admin/server-users-sort.png b/docs/assets/ja/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/ja/Admin/server-users-sort.png differ diff --git a/docs/assets/ja/Admin/server-users.png b/docs/assets/ja/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/ja/Admin/server-users.png differ diff --git a/docs/assets/ja/Admin/waMenu1.png b/docs/assets/ja/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/ja/Admin/waMenu1.png differ diff --git a/docs/assets/ja/Admin/waMenu2.png b/docs/assets/ja/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/ja/Admin/waMenu2.png differ diff --git a/docs/assets/ja/Admin/waSettings.png b/docs/assets/ja/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/ja/Admin/waSettings.png differ diff --git a/docs/assets/ja/Admin/waSettings2.png b/docs/assets/ja/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/ja/Admin/waSettings2.png differ diff --git a/docs/assets/ja/Debugging/attach-debugger-dialog-2.png b/docs/assets/ja/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/ja/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/ja/Debugging/attach-debugger-dialog.png b/docs/assets/ja/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/ja/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/ja/Debugging/attachRemoteDebugger.png b/docs/assets/ja/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/ja/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/ja/Debugging/break-list.png b/docs/assets/ja/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/ja/Debugging/break-list.png differ diff --git a/docs/assets/ja/Debugging/break-point.png b/docs/assets/ja/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/ja/Debugging/break-point.png differ diff --git a/docs/assets/ja/Debugging/break.png b/docs/assets/ja/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/ja/Debugging/break.png differ diff --git a/docs/assets/ja/Debugging/breakpoint-properties.png b/docs/assets/ja/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/ja/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/ja/Debugging/call-chain-example.png b/docs/assets/ja/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/ja/Debugging/call-chain-example.png differ diff --git a/docs/assets/ja/Debugging/callChainShowTypes.png b/docs/assets/ja/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/ja/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/ja/Debugging/catch-command.png b/docs/assets/ja/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/ja/Debugging/catch-command.png differ diff --git a/docs/assets/ja/Debugging/contextual-menu.png b/docs/assets/ja/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/ja/Debugging/contextual-menu.png differ diff --git a/docs/assets/ja/Debugging/current-form-values.png b/docs/assets/ja/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/ja/Debugging/current-form-values.png differ diff --git a/docs/assets/ja/Debugging/currentFormValues.png b/docs/assets/ja/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/ja/Debugging/currentFormValues.png differ diff --git a/docs/assets/ja/Debugging/custom-watch-pane-context-menu.png b/docs/assets/ja/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/ja/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/ja/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/ja/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/ja/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/ja/Debugging/custom-watch-pane.png b/docs/assets/ja/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/ja/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/ja/Debugging/customWatchPaneContext.png b/docs/assets/ja/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/ja/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/ja/Debugging/debugger-window-local-to-remove.png b/docs/assets/ja/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/ja/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/ja/Debugging/debugger-window-local.png b/docs/assets/ja/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/ja/Debugging/debugger-window-local.png differ diff --git a/docs/assets/ja/Debugging/debuggerShortcuts.png b/docs/assets/ja/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/ja/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/ja/Debugging/debuggerWindowRemote.png b/docs/assets/ja/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/ja/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/ja/Debugging/dynamicVariableNames.png b/docs/assets/ja/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/ja/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/ja/Debugging/executionToolbarButtons.png b/docs/assets/ja/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/ja/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/ja/Debugging/newCaughtCommand.png b/docs/assets/ja/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/ja/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/ja/Debugging/openDebugger.png b/docs/assets/ja/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/ja/Debugging/openDebugger.png differ diff --git a/docs/assets/ja/Debugging/remote-debugging.png b/docs/assets/ja/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/ja/Debugging/remote-debugging.png differ diff --git a/docs/assets/ja/Debugging/runtime-explorer.png b/docs/assets/ja/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/ja/Debugging/runtime-explorer.png differ diff --git a/docs/assets/ja/Debugging/runtimeError.png b/docs/assets/ja/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/ja/Debugging/runtimeError.png differ diff --git a/docs/assets/ja/Debugging/showTypes.png b/docs/assets/ja/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/ja/Debugging/showTypes.png differ diff --git a/docs/assets/ja/Debugging/sourceCodePane.png b/docs/assets/ja/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/ja/Debugging/sourceCodePane.png differ diff --git a/docs/assets/ja/Debugging/sourceCodePaneContext.png b/docs/assets/ja/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/ja/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/ja/Debugging/sourcePaneTip.png b/docs/assets/ja/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/ja/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/ja/Debugging/syntax-error.png b/docs/assets/ja/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/ja/Debugging/syntax-error.png differ diff --git a/docs/assets/ja/Debugging/syntax-error2.png b/docs/assets/ja/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/ja/Debugging/syntax-error2.png differ diff --git a/docs/assets/ja/Debugging/typing-error.png b/docs/assets/ja/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/ja/Debugging/typing-error.png differ diff --git a/docs/assets/ja/Debugging/watchPane.png b/docs/assets/ja/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/ja/Debugging/watchPane.png differ diff --git a/docs/assets/ja/Debugging/watchPaneOptions.png b/docs/assets/ja/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/ja/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/ja/Desktop/allow-mac-clients.png b/docs/assets/ja/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..f1153490abf3f9 Binary files /dev/null and b/docs/assets/ja/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/ja/FormEditor/alignment.png b/docs/assets/ja/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/ja/FormEditor/alignment.png differ diff --git a/docs/assets/ja/FormEditor/alignmentAssistant.png b/docs/assets/ja/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/ja/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/ja/FormEditor/alignmentContextMenu.png b/docs/assets/ja/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/ja/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/ja/FormEditor/alignmentMenu.png b/docs/assets/ja/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/ja/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/ja/FormEditor/alignmentTools.png b/docs/assets/ja/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/ja/FormEditor/alignmentTools.png differ diff --git a/docs/assets/ja/FormEditor/button.png b/docs/assets/ja/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/ja/FormEditor/button.png differ diff --git a/docs/assets/ja/FormEditor/checkbox.png b/docs/assets/ja/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/ja/FormEditor/checkbox.png differ diff --git a/docs/assets/ja/FormEditor/combo.png b/docs/assets/ja/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/ja/FormEditor/combo.png differ diff --git a/docs/assets/ja/FormEditor/cssIcon.png b/docs/assets/ja/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssIcon.png differ diff --git a/docs/assets/ja/FormEditor/cssIconMixed.png b/docs/assets/ja/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/ja/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/ja/FormEditor/cssImportant.png b/docs/assets/ja/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/ja/FormEditor/cssImportant.png differ diff --git a/docs/assets/ja/FormEditor/cssInvalidSyntax.png b/docs/assets/ja/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/ja/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/ja/FormEditor/cssMac.png b/docs/assets/ja/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssMac.png differ diff --git a/docs/assets/ja/FormEditor/cssNo.png b/docs/assets/ja/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssNo.png differ diff --git a/docs/assets/ja/FormEditor/cssPpropList.png b/docs/assets/ja/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssPpropList.png differ diff --git a/docs/assets/ja/FormEditor/cssPpropListImportant.png b/docs/assets/ja/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/ja/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/ja/FormEditor/cssPreview.png b/docs/assets/ja/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/ja/FormEditor/cssPreview.png differ diff --git a/docs/assets/ja/FormEditor/cssPreview_list.png b/docs/assets/ja/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/ja/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/ja/FormEditor/cssPreviewicon.png b/docs/assets/ja/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/ja/FormEditor/cssShield.png b/docs/assets/ja/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssShield.png differ diff --git a/docs/assets/ja/FormEditor/cssToolbar.png b/docs/assets/ja/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssToolbar.png differ diff --git a/docs/assets/ja/FormEditor/cssWin.png b/docs/assets/ja/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/ja/FormEditor/cssWin.png differ diff --git a/docs/assets/ja/FormEditor/darkicon.png b/docs/assets/ja/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/ja/FormEditor/darkicon.png differ diff --git a/docs/assets/ja/FormEditor/displyAndPage.png b/docs/assets/ja/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/ja/FormEditor/displyAndPage.png differ diff --git a/docs/assets/ja/FormEditor/distribution.png b/docs/assets/ja/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/ja/FormEditor/distribution.png differ diff --git a/docs/assets/ja/FormEditor/distributionTool.png b/docs/assets/ja/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/ja/FormEditor/distributionTool.png differ diff --git a/docs/assets/ja/FormEditor/duplcateMany.png b/docs/assets/ja/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/ja/FormEditor/duplcateMany.png differ diff --git a/docs/assets/ja/FormEditor/duplicateObjects.png b/docs/assets/ja/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/ja/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/ja/FormEditor/entryOrder1.png b/docs/assets/ja/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/ja/FormEditor/entryOrder1.png differ diff --git a/docs/assets/ja/FormEditor/entryOrder2.png b/docs/assets/ja/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/ja/FormEditor/entryOrder2.png differ diff --git a/docs/assets/ja/FormEditor/entryOrder3.png b/docs/assets/ja/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/ja/FormEditor/entryOrder3.png differ diff --git a/docs/assets/ja/FormEditor/execute.png b/docs/assets/ja/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/ja/FormEditor/execute.png differ diff --git a/docs/assets/ja/FormEditor/group.png b/docs/assets/ja/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/ja/FormEditor/group.png differ diff --git a/docs/assets/ja/FormEditor/horizontalDistribution.png b/docs/assets/ja/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/ja/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/ja/FormEditor/indicator.png b/docs/assets/ja/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/ja/FormEditor/indicator.png differ diff --git a/docs/assets/ja/FormEditor/input.png b/docs/assets/ja/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/ja/FormEditor/input.png differ diff --git a/docs/assets/ja/FormEditor/layering.png b/docs/assets/ja/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/ja/FormEditor/layering.png differ diff --git a/docs/assets/ja/FormEditor/level.png b/docs/assets/ja/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/ja/FormEditor/level.png differ diff --git a/docs/assets/ja/FormEditor/level2.png b/docs/assets/ja/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/ja/FormEditor/level2.png differ diff --git a/docs/assets/ja/FormEditor/library.png b/docs/assets/ja/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/ja/FormEditor/library.png differ diff --git a/docs/assets/ja/FormEditor/listBoxBuilder1.png b/docs/assets/ja/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/ja/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/ja/FormEditor/listbox.png b/docs/assets/ja/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/ja/FormEditor/listbox.png differ diff --git a/docs/assets/ja/FormEditor/macroClass.png b/docs/assets/ja/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/ja/FormEditor/macroClass.png differ diff --git a/docs/assets/ja/FormEditor/macroSelect.png b/docs/assets/ja/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/ja/FormEditor/macroSelect.png differ diff --git a/docs/assets/ja/FormEditor/macroStructure.png b/docs/assets/ja/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/ja/FormEditor/macroStructure.png differ diff --git a/docs/assets/ja/FormEditor/macroex1.png b/docs/assets/ja/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/ja/FormEditor/macroex1.png differ diff --git a/docs/assets/ja/FormEditor/macroex2.png b/docs/assets/ja/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/ja/FormEditor/macroex2.png differ diff --git a/docs/assets/ja/FormEditor/magneticGrid1.png b/docs/assets/ja/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/ja/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/ja/FormEditor/magneticGrid2.png b/docs/assets/ja/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/ja/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/ja/FormEditor/moving.png b/docs/assets/ja/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/ja/FormEditor/moving.png differ diff --git a/docs/assets/ja/FormEditor/objectBar.png b/docs/assets/ja/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/ja/FormEditor/objectBar.png differ diff --git a/docs/assets/ja/FormEditor/objectLibrary.png b/docs/assets/ja/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/ja/FormEditor/objectLibrary.png differ diff --git a/docs/assets/ja/FormEditor/plugin.png b/docs/assets/ja/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/ja/FormEditor/plugin.png differ diff --git a/docs/assets/ja/FormEditor/radio.png b/docs/assets/ja/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/ja/FormEditor/radio.png differ diff --git a/docs/assets/ja/FormEditor/rectangle.png b/docs/assets/ja/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/ja/FormEditor/rectangle.png differ diff --git a/docs/assets/ja/FormEditor/selectMultiple.png b/docs/assets/ja/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/ja/FormEditor/selectMultiple.png differ diff --git a/docs/assets/ja/FormEditor/selectResize.png b/docs/assets/ja/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/ja/FormEditor/selectResize.png differ diff --git a/docs/assets/ja/FormEditor/selection.png b/docs/assets/ja/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/ja/FormEditor/selection.png differ diff --git a/docs/assets/ja/FormEditor/shields.png b/docs/assets/ja/FormEditor/shields.png index 21c805438c888a..aaae4df4f580ed 100644 Binary files a/docs/assets/ja/FormEditor/shields.png and b/docs/assets/ja/FormEditor/shields.png differ diff --git a/docs/assets/ja/FormEditor/shields2.png b/docs/assets/ja/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/ja/FormEditor/shields2.png differ diff --git a/docs/assets/ja/FormEditor/showHideElements.png b/docs/assets/ja/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/ja/FormEditor/showHideElements.png differ diff --git a/docs/assets/ja/FormEditor/splitter.png b/docs/assets/ja/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/ja/FormEditor/splitter.png differ diff --git a/docs/assets/ja/FormEditor/text.png b/docs/assets/ja/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/ja/FormEditor/text.png differ diff --git a/docs/assets/ja/FormEditor/toolbar.png b/docs/assets/ja/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/ja/FormEditor/toolbar.png differ diff --git a/docs/assets/ja/FormEditor/views.png b/docs/assets/ja/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/ja/FormEditor/views.png differ diff --git a/docs/assets/ja/FormEditor/zOrder.png b/docs/assets/ja/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/ja/FormEditor/zOrder.png differ diff --git a/docs/assets/ja/FormEditor/zoom.png b/docs/assets/ja/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/ja/FormEditor/zoom.png differ diff --git a/docs/assets/ja/FormObjects/fruits1.png b/docs/assets/ja/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/ja/FormObjects/fruits1.png differ diff --git a/docs/assets/ja/FormObjects/fruits2.png b/docs/assets/ja/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/ja/FormObjects/fruits2.png differ diff --git a/docs/assets/ja/FormObjects/fruits3.png b/docs/assets/ja/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/ja/FormObjects/fruits3.png differ diff --git a/docs/assets/ja/FormObjects/popupDropdown_hierar.png b/docs/assets/ja/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/ja/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/ja/ORDA/AutoCompletionEntity.png b/docs/assets/ja/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..9e096b1c07fe78 Binary files /dev/null and b/docs/assets/ja/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/ja/ORDA/ClassDiagramImage.png b/docs/assets/ja/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/ja/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/ja/ORDA/ExposeDataclass.png b/docs/assets/ja/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/ja/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/ja/ORDA/ORDA_Classes-3.png b/docs/assets/ja/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/ja/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/ja/ORDA/Orda_example.png b/docs/assets/ja/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/ja/ORDA/Orda_example.png differ diff --git a/docs/assets/ja/ORDA/api.png b/docs/assets/ja/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/ja/ORDA/api.png differ diff --git a/docs/assets/ja/ORDA/classORDA1.png b/docs/assets/ja/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/ja/ORDA/classORDA1.png differ diff --git a/docs/assets/ja/ORDA/classORDA2.png b/docs/assets/ja/ORDA/classORDA2.png new file mode 100644 index 00000000000000..fa0a6f6f82607f Binary files /dev/null and b/docs/assets/ja/ORDA/classORDA2.png differ diff --git a/docs/assets/ja/ORDA/classORDA3.png b/docs/assets/ja/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/ja/ORDA/classORDA3.png differ diff --git a/docs/assets/ja/ORDA/classORDA4.png b/docs/assets/ja/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/ja/ORDA/classORDA4.png differ diff --git a/docs/assets/ja/ORDA/classORDA5.png b/docs/assets/ja/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/ja/ORDA/classORDA5.png differ diff --git a/docs/assets/ja/ORDA/companyTable.png b/docs/assets/ja/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/ja/ORDA/companyTable.png differ diff --git a/docs/assets/ja/ORDA/concurrent1.png b/docs/assets/ja/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/ja/ORDA/concurrent1.png differ diff --git a/docs/assets/ja/ORDA/concurrent2.png b/docs/assets/ja/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/ja/ORDA/concurrent2.png differ diff --git a/docs/assets/ja/ORDA/concurrent3.png b/docs/assets/ja/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/ja/ORDA/concurrent3.png differ diff --git a/docs/assets/ja/ORDA/dataclassProperties.png b/docs/assets/ja/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/ja/ORDA/dataclassProperties.png differ diff --git a/docs/assets/ja/ORDA/datastoreMapping.png b/docs/assets/ja/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/ja/ORDA/datastoreMapping.png differ diff --git a/docs/assets/ja/ORDA/debug1.png b/docs/assets/ja/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/ja/ORDA/debug1.png differ diff --git a/docs/assets/ja/ORDA/deezer.png b/docs/assets/ja/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/ja/ORDA/deezer.png differ diff --git a/docs/assets/ja/ORDA/dsDiagram.png b/docs/assets/ja/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/ja/ORDA/dsDiagram.png differ diff --git a/docs/assets/ja/ORDA/entityAttributes.png b/docs/assets/ja/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/ja/ORDA/entityAttributes.png differ diff --git a/docs/assets/ja/ORDA/entityAttributes2.png b/docs/assets/ja/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/ja/ORDA/entityAttributes2.png differ diff --git a/docs/assets/ja/ORDA/entityAttributes3.png b/docs/assets/ja/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/ja/ORDA/entityAttributes3.png differ diff --git a/docs/assets/ja/ORDA/entityRef1.png b/docs/assets/ja/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/ja/ORDA/entityRef1.png differ diff --git a/docs/assets/ja/ORDA/entityRef2.png b/docs/assets/ja/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/ja/ORDA/entityRef2.png differ diff --git a/docs/assets/ja/ORDA/entitySelectionRelationAttributes.png b/docs/assets/ja/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/ja/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/ja/ORDA/mainConcepts.png b/docs/assets/ja/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/ja/ORDA/mainConcepts.png differ diff --git a/docs/assets/ja/ORDA/optimisticLock1.png b/docs/assets/ja/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/ja/ORDA/optimisticLock1.png differ diff --git a/docs/assets/ja/ORDA/optimisticLock2.png b/docs/assets/ja/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/ja/ORDA/optimisticLock2.png differ diff --git a/docs/assets/ja/ORDA/optimisticLock3.png b/docs/assets/ja/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/ja/ORDA/optimisticLock3.png differ diff --git a/docs/assets/ja/ORDA/relationProperties.png b/docs/assets/ja/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/ja/ORDA/relationProperties.png differ diff --git a/docs/assets/ja/ORDA/sessionAdmin.png b/docs/assets/ja/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/ja/ORDA/sessionAdmin.png differ diff --git a/docs/assets/ja/ORDA/sessions.png b/docs/assets/ja/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/ja/ORDA/sessions.png differ diff --git a/docs/assets/ja/ORDA/showClass.png b/docs/assets/ja/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/ja/ORDA/showClass.png differ diff --git a/docs/assets/ja/ORDA/struc.png b/docs/assets/ja/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/ja/ORDA/struc.png differ diff --git a/docs/assets/ja/ORDA/struc2.png b/docs/assets/ja/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/ja/ORDA/struc2.png differ diff --git a/docs/assets/ja/ORDA/struc2s.png b/docs/assets/ja/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/ja/ORDA/struc2s.png differ diff --git a/docs/assets/ja/Preferences/categories.png b/docs/assets/ja/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/ja/Preferences/categories.png differ diff --git a/docs/assets/ja/Preferences/general1.png b/docs/assets/ja/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/ja/Preferences/general1.png differ diff --git a/docs/assets/ja/Preferences/general2.png b/docs/assets/ja/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/ja/Preferences/general2.png differ diff --git a/docs/assets/ja/Preferences/general3.png b/docs/assets/ja/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/ja/Preferences/general3.png differ diff --git a/docs/assets/ja/Preferences/general4.png b/docs/assets/ja/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/ja/Preferences/general4.png differ diff --git a/docs/assets/ja/Preferences/general5.png b/docs/assets/ja/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/ja/Preferences/general5.png differ diff --git a/docs/assets/ja/Preferences/gitignore.png b/docs/assets/ja/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/ja/Preferences/gitignore.png differ diff --git a/docs/assets/ja/Preferences/langCateg.png b/docs/assets/ja/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/ja/Preferences/langCateg.png differ diff --git a/docs/assets/ja/Preferences/options.png b/docs/assets/ja/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/ja/Preferences/options.png differ diff --git a/docs/assets/ja/Preferences/optionsBlockLines.png b/docs/assets/ja/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/ja/Preferences/optionsClosing.png b/docs/assets/ja/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/ja/Preferences/optionsClosing.png differ diff --git a/docs/assets/ja/Preferences/optionsClosing2.png b/docs/assets/ja/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/ja/Preferences/optionsClosing2.png differ diff --git a/docs/assets/ja/Preferences/optionsHideIcons.png b/docs/assets/ja/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/ja/Preferences/optionsIndent.png b/docs/assets/ja/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsIndent.png differ diff --git a/docs/assets/ja/Preferences/optionsLine.png b/docs/assets/ja/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsLine.png differ diff --git a/docs/assets/ja/Preferences/optionsLogicalBlocks.png b/docs/assets/ja/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/ja/Preferences/optionsRectangle.png b/docs/assets/ja/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/ja/Preferences/optionsRectangle.png differ diff --git a/docs/assets/ja/Preferences/optionsVariables.png b/docs/assets/ja/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/ja/Preferences/optionsVariables.png differ diff --git a/docs/assets/ja/Preferences/overviewAccess.png b/docs/assets/ja/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/ja/Preferences/overviewAccess.png differ diff --git a/docs/assets/ja/Preferences/overviewSettings.png b/docs/assets/ja/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/ja/Preferences/overviewSettings.png differ diff --git a/docs/assets/ja/Preferences/overviewUser.png b/docs/assets/ja/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/ja/Preferences/overviewUser.png differ diff --git a/docs/assets/ja/Preferences/shortcuts.png b/docs/assets/ja/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/ja/Preferences/shortcuts.png differ diff --git a/docs/assets/ja/Preferences/suggestionsAutoOpen.png b/docs/assets/ja/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/ja/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/ja/Preferences/themes.png b/docs/assets/ja/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/ja/Preferences/themes.png differ diff --git a/docs/assets/ja/Project/4Dlinkfiles.png b/docs/assets/ja/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/ja/Project/4Dlinkfiles.png differ diff --git a/docs/assets/ja/Project/buildappCSProj.png b/docs/assets/ja/Project/buildappCSProj.png index bbbdd0dbc38997..2ee87c60eefb8c 100644 Binary files a/docs/assets/ja/Project/buildappCSProj.png and b/docs/assets/ja/Project/buildappCSProj.png differ diff --git a/docs/assets/ja/Project/comp1.png b/docs/assets/ja/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/ja/Project/comp1.png differ diff --git a/docs/assets/ja/Project/compDoc.png b/docs/assets/ja/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/ja/Project/compDoc.png differ diff --git a/docs/assets/ja/Project/compileModes.png b/docs/assets/ja/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/ja/Project/compileModes.png differ diff --git a/docs/assets/ja/Project/compilerWin1.png b/docs/assets/ja/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/ja/Project/compilerWin1.png differ diff --git a/docs/assets/ja/Project/compilerWin2.png b/docs/assets/ja/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/ja/Project/compilerWin2.png differ diff --git a/docs/assets/ja/Project/compilerWin3.png b/docs/assets/ja/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/ja/Project/compilerWin3.png differ diff --git a/docs/assets/ja/Project/compilerWin4.png b/docs/assets/ja/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/ja/Project/compilerWin4.png differ diff --git a/docs/assets/ja/Project/compilerWin5.png b/docs/assets/ja/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/ja/Project/compilerWin5.png differ diff --git a/docs/assets/ja/Project/compilerWin6.png b/docs/assets/ja/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/ja/Project/compilerWin6.png differ diff --git a/docs/assets/ja/Project/success.png b/docs/assets/ja/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/ja/Project/success.png differ diff --git a/docs/assets/ja/REST/login.png b/docs/assets/ja/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/ja/REST/login.png differ diff --git a/docs/assets/ja/REST/ordastructure.png b/docs/assets/ja/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/ja/REST/ordastructure.png differ diff --git a/docs/assets/ja/WebServer/authenticate.png b/docs/assets/ja/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/ja/WebServer/authenticate.png differ diff --git a/docs/assets/ja/WebServer/authenticate2.png b/docs/assets/ja/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/ja/WebServer/authenticate2.png differ diff --git a/docs/assets/ja/WebServer/authenticate3.png b/docs/assets/ja/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/ja/WebServer/authenticate3.png differ diff --git a/docs/assets/ja/WebServer/authentication.png b/docs/assets/ja/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/ja/WebServer/authentication.png differ diff --git a/docs/assets/ja/WebServer/backup.png b/docs/assets/ja/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/ja/WebServer/backup.png differ diff --git a/docs/assets/ja/WebServer/config.png b/docs/assets/ja/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/ja/WebServer/config.png differ diff --git a/docs/assets/ja/WebServer/defaultHomePage.png b/docs/assets/ja/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/ja/WebServer/defaultHomePage.png differ diff --git a/docs/assets/ja/WebServer/errorPage.png b/docs/assets/ja/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/ja/WebServer/errorPage.png differ diff --git a/docs/assets/ja/WebServer/exampleSession.png b/docs/assets/ja/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/ja/WebServer/exampleSession.png differ diff --git a/docs/assets/ja/WebServer/hello.png b/docs/assets/ja/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/ja/WebServer/hello.png differ diff --git a/docs/assets/ja/WebServer/hello0.png b/docs/assets/ja/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/ja/WebServer/hello0.png differ diff --git a/docs/assets/ja/WebServer/hello2.png b/docs/assets/ja/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/ja/WebServer/hello2.png differ diff --git a/docs/assets/ja/WebServer/hello3.png b/docs/assets/ja/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/ja/WebServer/hello3.png differ diff --git a/docs/assets/ja/WebServer/hello3bis.png b/docs/assets/ja/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/ja/WebServer/hello3bis.png differ diff --git a/docs/assets/ja/WebServer/hello4.png b/docs/assets/ja/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/ja/WebServer/hello4.png differ diff --git a/docs/assets/ja/WebServer/hello5.png b/docs/assets/ja/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/ja/WebServer/hello5.png differ diff --git a/docs/assets/ja/WebServer/hello6.png b/docs/assets/ja/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/ja/WebServer/hello6.png differ diff --git a/docs/assets/ja/WebServer/helloUsers.png b/docs/assets/ja/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/ja/WebServer/helloUsers.png differ diff --git a/docs/assets/ja/WebServer/httpCommands.png b/docs/assets/ja/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/ja/WebServer/httpCommands.png differ diff --git a/docs/assets/ja/WebServer/loadBalance.png b/docs/assets/ja/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/ja/WebServer/loadBalance.png differ diff --git a/docs/assets/ja/WebServer/log.png b/docs/assets/ja/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/ja/WebServer/log.png differ diff --git a/docs/assets/ja/WebServer/login1.png b/docs/assets/ja/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/ja/WebServer/login1.png differ diff --git a/docs/assets/ja/WebServer/login2.png b/docs/assets/ja/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/ja/WebServer/login2.png differ diff --git a/docs/assets/ja/WebServer/methodIcon.png b/docs/assets/ja/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/ja/WebServer/methodIcon.png differ diff --git a/docs/assets/ja/WebServer/methodProperties.png b/docs/assets/ja/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/ja/WebServer/methodProperties.png differ diff --git a/docs/assets/ja/WebServer/option1.png b/docs/assets/ja/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/ja/WebServer/option1.png differ diff --git a/docs/assets/ja/WebServer/option2.png b/docs/assets/ja/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/ja/WebServer/option2.png differ diff --git a/docs/assets/ja/WebServer/preemptive.png b/docs/assets/ja/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/ja/WebServer/preemptive.png differ diff --git a/docs/assets/ja/WebServer/processIcon.png b/docs/assets/ja/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/ja/WebServer/processIcon.png differ diff --git a/docs/assets/ja/WebServer/restResource.png b/docs/assets/ja/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/ja/WebServer/restResource.png differ diff --git a/docs/assets/ja/WebServer/schemaSession.png b/docs/assets/ja/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/ja/WebServer/schemaSession.png differ diff --git a/docs/assets/ja/WebServer/serverAccess.png b/docs/assets/ja/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/ja/WebServer/serverAccess.png differ diff --git a/docs/assets/ja/WebServer/session1.png b/docs/assets/ja/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/ja/WebServer/session1.png differ diff --git a/docs/assets/ja/WebServer/settingsSession.png b/docs/assets/ja/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/ja/WebServer/settingsSession.png differ diff --git a/docs/assets/ja/WebServer/spiders.png b/docs/assets/ja/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/ja/WebServer/spiders.png differ diff --git a/docs/assets/ja/WebServer/start1.png b/docs/assets/ja/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/ja/WebServer/start1.png differ diff --git a/docs/assets/ja/WebServer/start2.png b/docs/assets/ja/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/ja/WebServer/start2.png differ diff --git a/docs/assets/ja/WebServer/start3.png b/docs/assets/ja/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/ja/WebServer/start3.png differ diff --git a/docs/assets/ja/WebServer/stop1.png b/docs/assets/ja/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/ja/WebServer/stop1.png differ diff --git a/docs/assets/ja/WebServer/tempo_codeHTML.png b/docs/assets/ja/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/ja/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/ja/WebServer/test1.png b/docs/assets/ja/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/ja/WebServer/test1.png differ diff --git a/docs/assets/ja/WebServer/tls1.png b/docs/assets/ja/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/ja/WebServer/tls1.png differ diff --git a/docs/assets/ja/WebServer/tls2.png b/docs/assets/ja/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/ja/WebServer/tls2.png differ diff --git a/docs/assets/ja/WebServer/tls3.png b/docs/assets/ja/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/ja/WebServer/tls3.png differ diff --git a/docs/assets/ja/WebServer/webServices.png b/docs/assets/ja/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/ja/WebServer/webServices.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/localremote.png b/docs/assets/ja/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/ja/getStart/localremote.png differ diff --git a/docs/assets/ja/getStart/logo4d.png b/docs/assets/ja/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/ja/getStart/logo4d.png differ diff --git a/docs/assets/ja/getStart/projectCreate1.png b/docs/assets/ja/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/ja/getStart/projectCreate1.png differ diff --git a/docs/assets/ja/getStart/projectCreate2.png b/docs/assets/ja/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/ja/getStart/projectCreate2.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/ja/getStart/serverConnect.png b/docs/assets/ja/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/ja/getStart/serverConnect.png differ diff --git a/docs/assets/ja/getStart/serverConnect2.png b/docs/assets/ja/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/ja/getStart/serverConnect2.png differ diff --git a/docs/assets/ja/getStart/welcome.png b/docs/assets/ja/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/ja/getStart/welcome.png differ diff --git a/docs/assets/ja/getStart/welcome2.png b/docs/assets/ja/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/ja/getStart/welcome2.png differ diff --git a/docs/assets/ja/web-studio/add-component.png b/docs/assets/ja/web-studio/add-component.png new file mode 100644 index 00000000000000..37598b30e917f1 Binary files /dev/null and b/docs/assets/ja/web-studio/add-component.png differ diff --git a/docs/assets/ja/web-studio/breadcrumbs.png b/docs/assets/ja/web-studio/breadcrumbs.png new file mode 100644 index 00000000000000..cdd1cfb0bec624 Binary files /dev/null and b/docs/assets/ja/web-studio/breadcrumbs.png differ diff --git a/docs/assets/ja/web-studio/canvas.png b/docs/assets/ja/web-studio/canvas.png new file mode 100644 index 00000000000000..54e414c2fd53d1 Binary files /dev/null and b/docs/assets/ja/web-studio/canvas.png differ diff --git a/docs/assets/ja/web-studio/components.png b/docs/assets/ja/web-studio/components.png new file mode 100644 index 00000000000000..103b70caa82ec1 Binary files /dev/null and b/docs/assets/ja/web-studio/components.png differ diff --git a/docs/assets/ja/web-studio/data-sources.png b/docs/assets/ja/web-studio/data-sources.png new file mode 100644 index 00000000000000..d3356f2909f6cd Binary files /dev/null and b/docs/assets/ja/web-studio/data-sources.png differ diff --git a/docs/assets/ja/web-studio/events.png b/docs/assets/ja/web-studio/events.png new file mode 100644 index 00000000000000..bce05ed645dc50 Binary files /dev/null and b/docs/assets/ja/web-studio/events.png differ diff --git a/docs/assets/ja/web-studio/explorer.png b/docs/assets/ja/web-studio/explorer.png new file mode 100644 index 00000000000000..af8c807e0419e9 Binary files /dev/null and b/docs/assets/ja/web-studio/explorer.png differ diff --git a/docs/assets/ja/web-studio/image-server-side.png b/docs/assets/ja/web-studio/image-server-side.png new file mode 100644 index 00000000000000..ce7e66427d61ac Binary files /dev/null and b/docs/assets/ja/web-studio/image-server-side.png differ diff --git a/docs/assets/ja/web-studio/number-1-icon.png b/docs/assets/ja/web-studio/number-1-icon.png new file mode 100644 index 00000000000000..d391add818165e Binary files /dev/null and b/docs/assets/ja/web-studio/number-1-icon.png differ diff --git a/docs/assets/ja/web-studio/properties-panel.png b/docs/assets/ja/web-studio/properties-panel.png new file mode 100644 index 00000000000000..6ddf6991a32d75 Binary files /dev/null and b/docs/assets/ja/web-studio/properties-panel.png differ diff --git a/docs/assets/ja/web-studio/style-panel.png b/docs/assets/ja/web-studio/style-panel.png new file mode 100644 index 00000000000000..9144cb5055b941 Binary files /dev/null and b/docs/assets/ja/web-studio/style-panel.png differ diff --git a/docs/assets/ja/web-studio/styles-library.png b/docs/assets/ja/web-studio/styles-library.png new file mode 100644 index 00000000000000..675a8ad4bb9f98 Binary files /dev/null and b/docs/assets/ja/web-studio/styles-library.png differ diff --git a/docs/assets/ja/web-studio/tabs.png b/docs/assets/ja/web-studio/tabs.png new file mode 100644 index 00000000000000..59879dedd4c48b Binary files /dev/null and b/docs/assets/ja/web-studio/tabs.png differ diff --git a/docs/assets/ja/web-studio/web-event-1.png b/docs/assets/ja/web-studio/web-event-1.png new file mode 100644 index 00000000000000..bc91acf07754c2 Binary files /dev/null and b/docs/assets/ja/web-studio/web-event-1.png differ diff --git a/docs/assets/ja/web-studio/web-event-2.png b/docs/assets/ja/web-studio/web-event-2.png new file mode 100644 index 00000000000000..8f4cd0251c5c60 Binary files /dev/null and b/docs/assets/ja/web-studio/web-event-2.png differ diff --git a/docs/assets/ja/web-studio/web-form-object.png b/docs/assets/ja/web-studio/web-form-object.png new file mode 100644 index 00000000000000..325e330b0a44f8 Binary files /dev/null and b/docs/assets/ja/web-studio/web-form-object.png differ diff --git a/docs/assets/ja/web-studio/web-studio-interface.png b/docs/assets/ja/web-studio/web-studio-interface.png new file mode 100644 index 00000000000000..7f6232ae4541d0 Binary files /dev/null and b/docs/assets/ja/web-studio/web-studio-interface.png differ diff --git a/docs/assets/ja/web-studio/web-studio-intro.png b/docs/assets/ja/web-studio/web-studio-intro.png new file mode 100644 index 00000000000000..c1b21f201f0ac0 Binary files /dev/null and b/docs/assets/ja/web-studio/web-studio-intro.png differ diff --git a/docs/assets/ja/web-studio/web-studio.png b/docs/assets/ja/web-studio/web-studio.png new file mode 100644 index 00000000000000..997c8548e46cfa Binary files /dev/null and b/docs/assets/ja/web-studio/web-studio.png differ diff --git a/docs/assets/ja/web-studio/webstudio-home.png b/docs/assets/ja/web-studio/webstudio-home.png new file mode 100644 index 00000000000000..a3c85415d866ed Binary files /dev/null and b/docs/assets/ja/web-studio/webstudio-home.png differ diff --git a/docs/assets/pt/API/AutoCompletionEntity.png b/docs/assets/pt/API/AutoCompletionEntity.png new file mode 100644 index 00000000000000..fbcc8c62956a69 Binary files /dev/null and b/docs/assets/pt/API/AutoCompletionEntity.png differ diff --git a/docs/assets/pt/API/ClassDiagramImage.png b/docs/assets/pt/API/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/pt/API/ClassDiagramImage.png differ diff --git a/docs/assets/pt/API/ORDA_Classes-3.png b/docs/assets/pt/API/ORDA_Classes-3.png new file mode 100644 index 00000000000000..fe5e80712a8f7c Binary files /dev/null and b/docs/assets/pt/API/ORDA_Classes-3.png differ diff --git a/docs/assets/pt/API/Orda_example.png b/docs/assets/pt/API/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/pt/API/Orda_example.png differ diff --git a/docs/assets/pt/API/api.png b/docs/assets/pt/API/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/pt/API/api.png differ diff --git a/docs/assets/pt/API/classORDA1.png b/docs/assets/pt/API/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/pt/API/classORDA1.png differ diff --git a/docs/assets/pt/API/classORDA2.png b/docs/assets/pt/API/classORDA2.png new file mode 100644 index 00000000000000..7204647d1353e7 Binary files /dev/null and b/docs/assets/pt/API/classORDA2.png differ diff --git a/docs/assets/pt/API/classORDA3.png b/docs/assets/pt/API/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/pt/API/classORDA3.png differ diff --git a/docs/assets/pt/API/classORDA4.png b/docs/assets/pt/API/classORDA4.png new file mode 100644 index 00000000000000..67f7d923a46e6d Binary files /dev/null and b/docs/assets/pt/API/classORDA4.png differ diff --git a/docs/assets/pt/API/classORDA5.png b/docs/assets/pt/API/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/pt/API/classORDA5.png differ diff --git a/docs/assets/pt/API/dataclassAttribute.png b/docs/assets/pt/API/dataclassAttribute.png new file mode 100644 index 00000000000000..9d49fff0ca7453 Binary files /dev/null and b/docs/assets/pt/API/dataclassAttribute.png differ diff --git a/docs/assets/pt/API/dataclassAttribute2.png b/docs/assets/pt/API/dataclassAttribute2.png new file mode 100644 index 00000000000000..789f60ee400b4b Binary files /dev/null and b/docs/assets/pt/API/dataclassAttribute2.png differ diff --git a/docs/assets/pt/API/dataclassAttribute3.png b/docs/assets/pt/API/dataclassAttribute3.png new file mode 100644 index 00000000000000..f5420acae4d852 Binary files /dev/null and b/docs/assets/pt/API/dataclassAttribute3.png differ diff --git a/docs/assets/pt/API/dataclassAttribute4.png b/docs/assets/pt/API/dataclassAttribute4.png new file mode 100644 index 00000000000000..a786f815697fb6 Binary files /dev/null and b/docs/assets/pt/API/dataclassAttribute4.png differ diff --git a/docs/assets/pt/API/dsDiagram.png b/docs/assets/pt/API/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/pt/API/dsDiagram.png differ diff --git a/docs/assets/pt/API/formulaAlert.png b/docs/assets/pt/API/formulaAlert.png new file mode 100644 index 00000000000000..930574332603ac Binary files /dev/null and b/docs/assets/pt/API/formulaAlert.png differ diff --git a/docs/assets/pt/API/formulaDialog.png b/docs/assets/pt/API/formulaDialog.png new file mode 100644 index 00000000000000..ee527b7127eff6 Binary files /dev/null and b/docs/assets/pt/API/formulaDialog.png differ diff --git a/docs/assets/pt/API/showClass.png b/docs/assets/pt/API/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/pt/API/showClass.png differ diff --git a/docs/assets/pt/API/signal.png b/docs/assets/pt/API/signal.png new file mode 100644 index 00000000000000..60e7ac67d13398 Binary files /dev/null and b/docs/assets/pt/API/signal.png differ diff --git a/docs/assets/pt/Admin/2021-07-27_18h31_35.png b/docs/assets/pt/Admin/2021-07-27_18h31_35.png new file mode 100644 index 00000000000000..cc391b5994ff78 Binary files /dev/null and b/docs/assets/pt/Admin/2021-07-27_18h31_35.png differ diff --git a/docs/assets/pt/Admin/Cert1.png b/docs/assets/pt/Admin/Cert1.png new file mode 100644 index 00000000000000..9ecfaa66259a5b Binary files /dev/null and b/docs/assets/pt/Admin/Cert1.png differ diff --git a/docs/assets/pt/Admin/Cert2.png b/docs/assets/pt/Admin/Cert2.png new file mode 100644 index 00000000000000..74f1adda99dc93 Binary files /dev/null and b/docs/assets/pt/Admin/Cert2.png differ diff --git a/docs/assets/pt/Admin/DEFilter1.png b/docs/assets/pt/Admin/DEFilter1.png new file mode 100644 index 00000000000000..10be7f947f5b59 Binary files /dev/null and b/docs/assets/pt/Admin/DEFilter1.png differ diff --git a/docs/assets/pt/Admin/DEFilter2.png b/docs/assets/pt/Admin/DEFilter2.png new file mode 100644 index 00000000000000..393f3e02e3bc7e Binary files /dev/null and b/docs/assets/pt/Admin/DEFilter2.png differ diff --git a/docs/assets/pt/Admin/DEFilter3.png b/docs/assets/pt/Admin/DEFilter3.png new file mode 100644 index 00000000000000..e0c9c418f0718a Binary files /dev/null and b/docs/assets/pt/Admin/DEFilter3.png differ diff --git a/docs/assets/pt/Admin/accessKey.png b/docs/assets/pt/Admin/accessKey.png new file mode 100644 index 00000000000000..c524aae101d9d4 Binary files /dev/null and b/docs/assets/pt/Admin/accessKey.png differ diff --git a/docs/assets/pt/Admin/accessKeyEnter.png b/docs/assets/pt/Admin/accessKeyEnter.png new file mode 100644 index 00000000000000..293036a14b5daa Binary files /dev/null and b/docs/assets/pt/Admin/accessKeyEnter.png differ diff --git a/docs/assets/pt/Admin/buildappCertif.png b/docs/assets/pt/Admin/buildappCertif.png new file mode 100644 index 00000000000000..76d00104566f9d Binary files /dev/null and b/docs/assets/pt/Admin/buildappCertif.png differ diff --git a/docs/assets/pt/Admin/buildapposxcertProj.png b/docs/assets/pt/Admin/buildapposxcertProj.png new file mode 100644 index 00000000000000..de58a3d1eb1733 Binary files /dev/null and b/docs/assets/pt/Admin/buildapposxcertProj.png differ diff --git a/docs/assets/pt/Admin/cacheServera.png b/docs/assets/pt/Admin/cacheServera.png new file mode 100644 index 00000000000000..21f382e429e4fb Binary files /dev/null and b/docs/assets/pt/Admin/cacheServera.png differ diff --git a/docs/assets/pt/Admin/cacheServerb.png b/docs/assets/pt/Admin/cacheServerb.png new file mode 100644 index 00000000000000..28ff469f1ab1c5 Binary files /dev/null and b/docs/assets/pt/Admin/cacheServerb.png differ diff --git a/docs/assets/pt/Admin/cachea.png b/docs/assets/pt/Admin/cachea.png new file mode 100644 index 00000000000000..0b8cf9c320ad8d Binary files /dev/null and b/docs/assets/pt/Admin/cachea.png differ diff --git a/docs/assets/pt/Admin/cacheb.png b/docs/assets/pt/Admin/cacheb.png new file mode 100644 index 00000000000000..482f4344495073 Binary files /dev/null and b/docs/assets/pt/Admin/cacheb.png differ diff --git a/docs/assets/pt/Admin/dark.png b/docs/assets/pt/Admin/dark.png new file mode 100644 index 00000000000000..1265c39d425a52 Binary files /dev/null and b/docs/assets/pt/Admin/dark.png differ diff --git a/docs/assets/pt/Admin/dataExplorer1.png b/docs/assets/pt/Admin/dataExplorer1.png new file mode 100644 index 00000000000000..570b2397ed6a90 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer1.png differ diff --git a/docs/assets/pt/Admin/dataExplorer10.png b/docs/assets/pt/Admin/dataExplorer10.png new file mode 100644 index 00000000000000..884b6b984d2cbf Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer10.png differ diff --git a/docs/assets/pt/Admin/dataExplorer11.png b/docs/assets/pt/Admin/dataExplorer11.png new file mode 100644 index 00000000000000..b9812739980653 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer11.png differ diff --git a/docs/assets/pt/Admin/dataExplorer12.png b/docs/assets/pt/Admin/dataExplorer12.png new file mode 100644 index 00000000000000..bcfc815da53c70 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer12.png differ diff --git a/docs/assets/pt/Admin/dataExplorer2.png b/docs/assets/pt/Admin/dataExplorer2.png new file mode 100644 index 00000000000000..8dd493034cd843 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer2.png differ diff --git a/docs/assets/pt/Admin/dataExplorer3.png b/docs/assets/pt/Admin/dataExplorer3.png new file mode 100644 index 00000000000000..3d1ce76ffae5e1 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer3.png differ diff --git a/docs/assets/pt/Admin/dataExplorer4.png b/docs/assets/pt/Admin/dataExplorer4.png new file mode 100644 index 00000000000000..4da0c878d90ed0 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer4.png differ diff --git a/docs/assets/pt/Admin/dataExplorer4b.png b/docs/assets/pt/Admin/dataExplorer4b.png new file mode 100644 index 00000000000000..cdac25e1230f4c Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer4b.png differ diff --git a/docs/assets/pt/Admin/dataExplorer5.png b/docs/assets/pt/Admin/dataExplorer5.png new file mode 100644 index 00000000000000..196079963e706a Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer5.png differ diff --git a/docs/assets/pt/Admin/dataExplorer6.png b/docs/assets/pt/Admin/dataExplorer6.png new file mode 100644 index 00000000000000..312d82467c6ae7 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer6.png differ diff --git a/docs/assets/pt/Admin/dataExplorer7.png b/docs/assets/pt/Admin/dataExplorer7.png new file mode 100644 index 00000000000000..56de1037ec43e4 Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer7.png differ diff --git a/docs/assets/pt/Admin/dataExplorer8.png b/docs/assets/pt/Admin/dataExplorer8.png new file mode 100644 index 00000000000000..fbaea40ef3268b Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer8.png differ diff --git a/docs/assets/pt/Admin/dataExplorer9.png b/docs/assets/pt/Admin/dataExplorer9.png new file mode 100644 index 00000000000000..1506ad75e5cb9c Binary files /dev/null and b/docs/assets/pt/Admin/dataExplorer9.png differ diff --git a/docs/assets/pt/Admin/server-admin-application-page.png b/docs/assets/pt/Admin/server-admin-application-page.png new file mode 100644 index 00000000000000..082e219772909c Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-application-page.png differ diff --git a/docs/assets/pt/Admin/server-admin-monitor-adv1.png b/docs/assets/pt/Admin/server-admin-monitor-adv1.png new file mode 100644 index 00000000000000..f2c802563aed42 Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-monitor-adv1.png differ diff --git a/docs/assets/pt/Admin/server-admin-monitor-adv2.png b/docs/assets/pt/Admin/server-admin-monitor-adv2.png new file mode 100644 index 00000000000000..e051c91df13bd1 Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-monitor-adv2.png differ diff --git a/docs/assets/pt/Admin/server-admin-monitor-page.png b/docs/assets/pt/Admin/server-admin-monitor-page.png new file mode 100644 index 00000000000000..40679badba7f15 Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-monitor-page.png differ diff --git a/docs/assets/pt/Admin/server-admin-monitor-snapshot.png b/docs/assets/pt/Admin/server-admin-monitor-snapshot.png new file mode 100644 index 00000000000000..6aef318504c4ac Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-monitor-snapshot.png differ diff --git a/docs/assets/pt/Admin/server-admin-process-page.png b/docs/assets/pt/Admin/server-admin-process-page.png new file mode 100644 index 00000000000000..8ccec5344074b8 Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-process-page.png differ diff --git a/docs/assets/pt/Admin/server-admin-sql-page.png b/docs/assets/pt/Admin/server-admin-sql-page.png new file mode 100644 index 00000000000000..dd72f4e4feb53c Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-sql-page.png differ diff --git a/docs/assets/pt/Admin/server-admin-web-page.png b/docs/assets/pt/Admin/server-admin-web-page.png new file mode 100644 index 00000000000000..2d1d1193d30819 Binary files /dev/null and b/docs/assets/pt/Admin/server-admin-web-page.png differ diff --git a/docs/assets/pt/Admin/server-admin.png b/docs/assets/pt/Admin/server-admin.png new file mode 100644 index 00000000000000..89235e890b0bbc Binary files /dev/null and b/docs/assets/pt/Admin/server-admin.png differ diff --git a/docs/assets/pt/Admin/server-error.png b/docs/assets/pt/Admin/server-error.png new file mode 100644 index 00000000000000..d9eba48a841724 Binary files /dev/null and b/docs/assets/pt/Admin/server-error.png differ diff --git a/docs/assets/pt/Admin/server-graphic.png b/docs/assets/pt/Admin/server-graphic.png new file mode 100644 index 00000000000000..e281733015da78 Binary files /dev/null and b/docs/assets/pt/Admin/server-graphic.png differ diff --git a/docs/assets/pt/Admin/server-icon-1.png b/docs/assets/pt/Admin/server-icon-1.png new file mode 100644 index 00000000000000..9f2a0fba83cc59 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-1.png differ diff --git a/docs/assets/pt/Admin/server-icon-10.png b/docs/assets/pt/Admin/server-icon-10.png new file mode 100644 index 00000000000000..54fa5559007aa4 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-10.png differ diff --git a/docs/assets/pt/Admin/server-icon-11.png b/docs/assets/pt/Admin/server-icon-11.png new file mode 100644 index 00000000000000..4e267d81142d7c Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-11.png differ diff --git a/docs/assets/pt/Admin/server-icon-12.png b/docs/assets/pt/Admin/server-icon-12.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-12.png differ diff --git a/docs/assets/pt/Admin/server-icon-13.png b/docs/assets/pt/Admin/server-icon-13.png new file mode 100644 index 00000000000000..819fa9f8da49e1 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-13.png differ diff --git a/docs/assets/pt/Admin/server-icon-14.png b/docs/assets/pt/Admin/server-icon-14.png new file mode 100644 index 00000000000000..689047fa1d9827 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-14.png differ diff --git a/docs/assets/pt/Admin/server-icon-15.png b/docs/assets/pt/Admin/server-icon-15.png new file mode 100644 index 00000000000000..49c972d6cbf9af Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-15.png differ diff --git a/docs/assets/pt/Admin/server-icon-16.png b/docs/assets/pt/Admin/server-icon-16.png new file mode 100644 index 00000000000000..15ab7db33c4cdd Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-16.png differ diff --git a/docs/assets/pt/Admin/server-icon-17.png b/docs/assets/pt/Admin/server-icon-17.png new file mode 100644 index 00000000000000..f0085439e0e43d Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-17.png differ diff --git a/docs/assets/pt/Admin/server-icon-18.png b/docs/assets/pt/Admin/server-icon-18.png new file mode 100644 index 00000000000000..5a6cd69681228c Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-18.png differ diff --git a/docs/assets/pt/Admin/server-icon-19.png b/docs/assets/pt/Admin/server-icon-19.png new file mode 100644 index 00000000000000..ebde9f635ca2e8 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-19.png differ diff --git a/docs/assets/pt/Admin/server-icon-2.png b/docs/assets/pt/Admin/server-icon-2.png new file mode 100644 index 00000000000000..22a594c724c976 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-2.png differ diff --git a/docs/assets/pt/Admin/server-icon-20.png b/docs/assets/pt/Admin/server-icon-20.png new file mode 100644 index 00000000000000..bb93bd6ea20d3a Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-20.png differ diff --git a/docs/assets/pt/Admin/server-icon-21.png b/docs/assets/pt/Admin/server-icon-21.png new file mode 100644 index 00000000000000..c9d655938b8298 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-21.png differ diff --git a/docs/assets/pt/Admin/server-icon-22.png b/docs/assets/pt/Admin/server-icon-22.png new file mode 100644 index 00000000000000..b587af1e39e251 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-22.png differ diff --git a/docs/assets/pt/Admin/server-icon-23.png b/docs/assets/pt/Admin/server-icon-23.png new file mode 100644 index 00000000000000..0b0bb63eab15c0 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-23.png differ diff --git a/docs/assets/pt/Admin/server-icon-24.png b/docs/assets/pt/Admin/server-icon-24.png new file mode 100644 index 00000000000000..62b5f4f21cc951 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-24.png differ diff --git a/docs/assets/pt/Admin/server-icon-25.png b/docs/assets/pt/Admin/server-icon-25.png new file mode 100644 index 00000000000000..bddb357ca91fea Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-25.png differ diff --git a/docs/assets/pt/Admin/server-icon-3.png b/docs/assets/pt/Admin/server-icon-3.png new file mode 100644 index 00000000000000..9657f58d424085 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-3.png differ diff --git a/docs/assets/pt/Admin/server-icon-4.png b/docs/assets/pt/Admin/server-icon-4.png new file mode 100644 index 00000000000000..c7597cb5a0eff3 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-4.png differ diff --git a/docs/assets/pt/Admin/server-icon-5.png b/docs/assets/pt/Admin/server-icon-5.png new file mode 100644 index 00000000000000..2de3e859c3710b Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-5.png differ diff --git a/docs/assets/pt/Admin/server-icon-6.png b/docs/assets/pt/Admin/server-icon-6.png new file mode 100644 index 00000000000000..96bb37e174ec83 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-6.png differ diff --git a/docs/assets/pt/Admin/server-icon-7.png b/docs/assets/pt/Admin/server-icon-7.png new file mode 100644 index 00000000000000..bc112a9cff429f Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-7.png differ diff --git a/docs/assets/pt/Admin/server-icon-8.png b/docs/assets/pt/Admin/server-icon-8.png new file mode 100644 index 00000000000000..675de66aba0010 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-8.png differ diff --git a/docs/assets/pt/Admin/server-icon-9.png b/docs/assets/pt/Admin/server-icon-9.png new file mode 100644 index 00000000000000..de78399e161b26 Binary files /dev/null and b/docs/assets/pt/Admin/server-icon-9.png differ diff --git a/docs/assets/pt/Admin/server-licence-failed.png b/docs/assets/pt/Admin/server-licence-failed.png new file mode 100644 index 00000000000000..7cbace02afb433 Binary files /dev/null and b/docs/assets/pt/Admin/server-licence-failed.png differ diff --git a/docs/assets/pt/Admin/server-maintenance.png b/docs/assets/pt/Admin/server-maintenance.png new file mode 100644 index 00000000000000..4916a5874483ed Binary files /dev/null and b/docs/assets/pt/Admin/server-maintenance.png differ diff --git a/docs/assets/pt/Admin/server-message.png b/docs/assets/pt/Admin/server-message.png new file mode 100644 index 00000000000000..fa4f93e4675815 Binary files /dev/null and b/docs/assets/pt/Admin/server-message.png differ diff --git a/docs/assets/pt/Admin/server-process-actions.png b/docs/assets/pt/Admin/server-process-actions.png new file mode 100644 index 00000000000000..476747eb553e6b Binary files /dev/null and b/docs/assets/pt/Admin/server-process-actions.png differ diff --git a/docs/assets/pt/Admin/server-process-buttons.png b/docs/assets/pt/Admin/server-process-buttons.png new file mode 100644 index 00000000000000..930ca3fc1172e9 Binary files /dev/null and b/docs/assets/pt/Admin/server-process-buttons.png differ diff --git a/docs/assets/pt/Admin/server-shut.png b/docs/assets/pt/Admin/server-shut.png new file mode 100644 index 00000000000000..190501029e00a4 Binary files /dev/null and b/docs/assets/pt/Admin/server-shut.png differ diff --git a/docs/assets/pt/Admin/server-sleeping.png b/docs/assets/pt/Admin/server-sleeping.png new file mode 100644 index 00000000000000..64af8a4d82d223 Binary files /dev/null and b/docs/assets/pt/Admin/server-sleeping.png differ diff --git a/docs/assets/pt/Admin/server-users-sort.png b/docs/assets/pt/Admin/server-users-sort.png new file mode 100644 index 00000000000000..5bc774639452b7 Binary files /dev/null and b/docs/assets/pt/Admin/server-users-sort.png differ diff --git a/docs/assets/pt/Admin/server-users.png b/docs/assets/pt/Admin/server-users.png new file mode 100644 index 00000000000000..f85d70cdcb29d8 Binary files /dev/null and b/docs/assets/pt/Admin/server-users.png differ diff --git a/docs/assets/pt/Admin/waMenu1.png b/docs/assets/pt/Admin/waMenu1.png new file mode 100644 index 00000000000000..0645742e8324e4 Binary files /dev/null and b/docs/assets/pt/Admin/waMenu1.png differ diff --git a/docs/assets/pt/Admin/waMenu2.png b/docs/assets/pt/Admin/waMenu2.png new file mode 100644 index 00000000000000..d74712032cb922 Binary files /dev/null and b/docs/assets/pt/Admin/waMenu2.png differ diff --git a/docs/assets/pt/Admin/waSettings.png b/docs/assets/pt/Admin/waSettings.png new file mode 100644 index 00000000000000..76fc97bc915129 Binary files /dev/null and b/docs/assets/pt/Admin/waSettings.png differ diff --git a/docs/assets/pt/Admin/waSettings2.png b/docs/assets/pt/Admin/waSettings2.png new file mode 100644 index 00000000000000..87507ad60180b9 Binary files /dev/null and b/docs/assets/pt/Admin/waSettings2.png differ diff --git a/docs/assets/pt/Debugging/attach-debugger-dialog-2.png b/docs/assets/pt/Debugging/attach-debugger-dialog-2.png new file mode 100644 index 00000000000000..832ec9669122bd Binary files /dev/null and b/docs/assets/pt/Debugging/attach-debugger-dialog-2.png differ diff --git a/docs/assets/pt/Debugging/attach-debugger-dialog.png b/docs/assets/pt/Debugging/attach-debugger-dialog.png new file mode 100644 index 00000000000000..efbfffa137f0c3 Binary files /dev/null and b/docs/assets/pt/Debugging/attach-debugger-dialog.png differ diff --git a/docs/assets/pt/Debugging/attachRemoteDebugger.png b/docs/assets/pt/Debugging/attachRemoteDebugger.png new file mode 100644 index 00000000000000..be9e11545c1fe8 Binary files /dev/null and b/docs/assets/pt/Debugging/attachRemoteDebugger.png differ diff --git a/docs/assets/pt/Debugging/break-list.png b/docs/assets/pt/Debugging/break-list.png new file mode 100644 index 00000000000000..483836d6c7ee1b Binary files /dev/null and b/docs/assets/pt/Debugging/break-list.png differ diff --git a/docs/assets/pt/Debugging/break-point.png b/docs/assets/pt/Debugging/break-point.png new file mode 100644 index 00000000000000..9fec60f02c0d97 Binary files /dev/null and b/docs/assets/pt/Debugging/break-point.png differ diff --git a/docs/assets/pt/Debugging/break.png b/docs/assets/pt/Debugging/break.png new file mode 100644 index 00000000000000..87f2c7ec6cc15d Binary files /dev/null and b/docs/assets/pt/Debugging/break.png differ diff --git a/docs/assets/pt/Debugging/breakpoint-properties.png b/docs/assets/pt/Debugging/breakpoint-properties.png new file mode 100644 index 00000000000000..b0283999c3f727 Binary files /dev/null and b/docs/assets/pt/Debugging/breakpoint-properties.png differ diff --git a/docs/assets/pt/Debugging/call-chain-example.png b/docs/assets/pt/Debugging/call-chain-example.png new file mode 100644 index 00000000000000..ff3e3cd11c35c7 Binary files /dev/null and b/docs/assets/pt/Debugging/call-chain-example.png differ diff --git a/docs/assets/pt/Debugging/callChainShowTypes.png b/docs/assets/pt/Debugging/callChainShowTypes.png new file mode 100644 index 00000000000000..0958c5bf761d4c Binary files /dev/null and b/docs/assets/pt/Debugging/callChainShowTypes.png differ diff --git a/docs/assets/pt/Debugging/catch-command.png b/docs/assets/pt/Debugging/catch-command.png new file mode 100644 index 00000000000000..ef636a7ba493a2 Binary files /dev/null and b/docs/assets/pt/Debugging/catch-command.png differ diff --git a/docs/assets/pt/Debugging/contextual-menu.png b/docs/assets/pt/Debugging/contextual-menu.png new file mode 100644 index 00000000000000..35222f97254a0d Binary files /dev/null and b/docs/assets/pt/Debugging/contextual-menu.png differ diff --git a/docs/assets/pt/Debugging/current-form-values.png b/docs/assets/pt/Debugging/current-form-values.png new file mode 100644 index 00000000000000..ece814650da8a2 Binary files /dev/null and b/docs/assets/pt/Debugging/current-form-values.png differ diff --git a/docs/assets/pt/Debugging/currentFormValues.png b/docs/assets/pt/Debugging/currentFormValues.png new file mode 100644 index 00000000000000..850b85e996b688 Binary files /dev/null and b/docs/assets/pt/Debugging/currentFormValues.png differ diff --git a/docs/assets/pt/Debugging/custom-watch-pane-context-menu.png b/docs/assets/pt/Debugging/custom-watch-pane-context-menu.png new file mode 100644 index 00000000000000..f4372b543ee6b7 Binary files /dev/null and b/docs/assets/pt/Debugging/custom-watch-pane-context-menu.png differ diff --git a/docs/assets/pt/Debugging/custom-watch-pane-formula-editor.png b/docs/assets/pt/Debugging/custom-watch-pane-formula-editor.png new file mode 100644 index 00000000000000..7370205592dc44 Binary files /dev/null and b/docs/assets/pt/Debugging/custom-watch-pane-formula-editor.png differ diff --git a/docs/assets/pt/Debugging/custom-watch-pane.png b/docs/assets/pt/Debugging/custom-watch-pane.png new file mode 100644 index 00000000000000..282eef4ee9e9f9 Binary files /dev/null and b/docs/assets/pt/Debugging/custom-watch-pane.png differ diff --git a/docs/assets/pt/Debugging/customWatchPaneContext.png b/docs/assets/pt/Debugging/customWatchPaneContext.png new file mode 100644 index 00000000000000..b7a182e9889c20 Binary files /dev/null and b/docs/assets/pt/Debugging/customWatchPaneContext.png differ diff --git a/docs/assets/pt/Debugging/debugger-window-local-to-remove.png b/docs/assets/pt/Debugging/debugger-window-local-to-remove.png new file mode 100644 index 00000000000000..7f89c0e23f1525 Binary files /dev/null and b/docs/assets/pt/Debugging/debugger-window-local-to-remove.png differ diff --git a/docs/assets/pt/Debugging/debugger-window-local.png b/docs/assets/pt/Debugging/debugger-window-local.png new file mode 100644 index 00000000000000..1a7a57de58cdaa Binary files /dev/null and b/docs/assets/pt/Debugging/debugger-window-local.png differ diff --git a/docs/assets/pt/Debugging/debuggerShortcuts.png b/docs/assets/pt/Debugging/debuggerShortcuts.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/pt/Debugging/debuggerShortcuts.png differ diff --git a/docs/assets/pt/Debugging/debuggerWindowRemote.png b/docs/assets/pt/Debugging/debuggerWindowRemote.png new file mode 100644 index 00000000000000..5790890448635f Binary files /dev/null and b/docs/assets/pt/Debugging/debuggerWindowRemote.png differ diff --git a/docs/assets/pt/Debugging/dynamicVariableNames.png b/docs/assets/pt/Debugging/dynamicVariableNames.png new file mode 100644 index 00000000000000..0b8f0cc8560f61 Binary files /dev/null and b/docs/assets/pt/Debugging/dynamicVariableNames.png differ diff --git a/docs/assets/pt/Debugging/executionToolbarButtons.png b/docs/assets/pt/Debugging/executionToolbarButtons.png new file mode 100644 index 00000000000000..3ebacf28c5868d Binary files /dev/null and b/docs/assets/pt/Debugging/executionToolbarButtons.png differ diff --git a/docs/assets/pt/Debugging/newCaughtCommand.png b/docs/assets/pt/Debugging/newCaughtCommand.png new file mode 100644 index 00000000000000..f4ff447a58fcbc Binary files /dev/null and b/docs/assets/pt/Debugging/newCaughtCommand.png differ diff --git a/docs/assets/pt/Debugging/openDebugger.png b/docs/assets/pt/Debugging/openDebugger.png new file mode 100644 index 00000000000000..b6b6e826206260 Binary files /dev/null and b/docs/assets/pt/Debugging/openDebugger.png differ diff --git a/docs/assets/pt/Debugging/remote-debugging.png b/docs/assets/pt/Debugging/remote-debugging.png new file mode 100644 index 00000000000000..9051c3743a8aad Binary files /dev/null and b/docs/assets/pt/Debugging/remote-debugging.png differ diff --git a/docs/assets/pt/Debugging/runtime-explorer.png b/docs/assets/pt/Debugging/runtime-explorer.png new file mode 100644 index 00000000000000..407128073bae4e Binary files /dev/null and b/docs/assets/pt/Debugging/runtime-explorer.png differ diff --git a/docs/assets/pt/Debugging/runtimeError.png b/docs/assets/pt/Debugging/runtimeError.png new file mode 100644 index 00000000000000..454b8f67ab88de Binary files /dev/null and b/docs/assets/pt/Debugging/runtimeError.png differ diff --git a/docs/assets/pt/Debugging/showTypes.png b/docs/assets/pt/Debugging/showTypes.png new file mode 100644 index 00000000000000..8005146d9bb724 Binary files /dev/null and b/docs/assets/pt/Debugging/showTypes.png differ diff --git a/docs/assets/pt/Debugging/sourceCodePane.png b/docs/assets/pt/Debugging/sourceCodePane.png new file mode 100644 index 00000000000000..e69bf41855704b Binary files /dev/null and b/docs/assets/pt/Debugging/sourceCodePane.png differ diff --git a/docs/assets/pt/Debugging/sourceCodePaneContext.png b/docs/assets/pt/Debugging/sourceCodePaneContext.png new file mode 100644 index 00000000000000..704002e1efdbe2 Binary files /dev/null and b/docs/assets/pt/Debugging/sourceCodePaneContext.png differ diff --git a/docs/assets/pt/Debugging/sourcePaneTip.png b/docs/assets/pt/Debugging/sourcePaneTip.png new file mode 100644 index 00000000000000..128118d49300bc Binary files /dev/null and b/docs/assets/pt/Debugging/sourcePaneTip.png differ diff --git a/docs/assets/pt/Debugging/syntax-error.png b/docs/assets/pt/Debugging/syntax-error.png new file mode 100644 index 00000000000000..ea1cf37644811c Binary files /dev/null and b/docs/assets/pt/Debugging/syntax-error.png differ diff --git a/docs/assets/pt/Debugging/syntax-error2.png b/docs/assets/pt/Debugging/syntax-error2.png new file mode 100644 index 00000000000000..bda349d7e49159 Binary files /dev/null and b/docs/assets/pt/Debugging/syntax-error2.png differ diff --git a/docs/assets/pt/Debugging/typing-error.png b/docs/assets/pt/Debugging/typing-error.png new file mode 100644 index 00000000000000..573c3dd5e54b73 Binary files /dev/null and b/docs/assets/pt/Debugging/typing-error.png differ diff --git a/docs/assets/pt/Debugging/watchPane.png b/docs/assets/pt/Debugging/watchPane.png new file mode 100644 index 00000000000000..b70d73b8d2d592 Binary files /dev/null and b/docs/assets/pt/Debugging/watchPane.png differ diff --git a/docs/assets/pt/Debugging/watchPaneOptions.png b/docs/assets/pt/Debugging/watchPaneOptions.png new file mode 100644 index 00000000000000..8bd58a5198545c Binary files /dev/null and b/docs/assets/pt/Debugging/watchPaneOptions.png differ diff --git a/docs/assets/pt/Desktop/allow-mac-clients.png b/docs/assets/pt/Desktop/allow-mac-clients.png new file mode 100644 index 00000000000000..f1153490abf3f9 Binary files /dev/null and b/docs/assets/pt/Desktop/allow-mac-clients.png differ diff --git a/docs/assets/pt/FormEditor/alignment.png b/docs/assets/pt/FormEditor/alignment.png new file mode 100644 index 00000000000000..2c6801e4b6d620 Binary files /dev/null and b/docs/assets/pt/FormEditor/alignment.png differ diff --git a/docs/assets/pt/FormEditor/alignmentAssistant.png b/docs/assets/pt/FormEditor/alignmentAssistant.png new file mode 100644 index 00000000000000..c772227a6b705a Binary files /dev/null and b/docs/assets/pt/FormEditor/alignmentAssistant.png differ diff --git a/docs/assets/pt/FormEditor/alignmentContextMenu.png b/docs/assets/pt/FormEditor/alignmentContextMenu.png new file mode 100644 index 00000000000000..90333cdfe117f1 Binary files /dev/null and b/docs/assets/pt/FormEditor/alignmentContextMenu.png differ diff --git a/docs/assets/pt/FormEditor/alignmentMenu.png b/docs/assets/pt/FormEditor/alignmentMenu.png new file mode 100644 index 00000000000000..7d634dff19abef Binary files /dev/null and b/docs/assets/pt/FormEditor/alignmentMenu.png differ diff --git a/docs/assets/pt/FormEditor/alignmentTools.png b/docs/assets/pt/FormEditor/alignmentTools.png new file mode 100644 index 00000000000000..7e1a7d65063d53 Binary files /dev/null and b/docs/assets/pt/FormEditor/alignmentTools.png differ diff --git a/docs/assets/pt/FormEditor/button.png b/docs/assets/pt/FormEditor/button.png new file mode 100644 index 00000000000000..3fbd04534b7868 Binary files /dev/null and b/docs/assets/pt/FormEditor/button.png differ diff --git a/docs/assets/pt/FormEditor/checkbox.png b/docs/assets/pt/FormEditor/checkbox.png new file mode 100644 index 00000000000000..3eb0de226c7fd0 Binary files /dev/null and b/docs/assets/pt/FormEditor/checkbox.png differ diff --git a/docs/assets/pt/FormEditor/combo.png b/docs/assets/pt/FormEditor/combo.png new file mode 100644 index 00000000000000..51d02ff161a166 Binary files /dev/null and b/docs/assets/pt/FormEditor/combo.png differ diff --git a/docs/assets/pt/FormEditor/cssIcon.png b/docs/assets/pt/FormEditor/cssIcon.png new file mode 100644 index 00000000000000..1f8cef6dfca1d0 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssIcon.png differ diff --git a/docs/assets/pt/FormEditor/cssIconMixed.png b/docs/assets/pt/FormEditor/cssIconMixed.png new file mode 100644 index 00000000000000..92f4826c35a04a Binary files /dev/null and b/docs/assets/pt/FormEditor/cssIconMixed.png differ diff --git a/docs/assets/pt/FormEditor/cssImportant.png b/docs/assets/pt/FormEditor/cssImportant.png new file mode 100644 index 00000000000000..45af7a98ff0b1c Binary files /dev/null and b/docs/assets/pt/FormEditor/cssImportant.png differ diff --git a/docs/assets/pt/FormEditor/cssInvalidSyntax.png b/docs/assets/pt/FormEditor/cssInvalidSyntax.png new file mode 100644 index 00000000000000..8be7c28617624b Binary files /dev/null and b/docs/assets/pt/FormEditor/cssInvalidSyntax.png differ diff --git a/docs/assets/pt/FormEditor/cssMac.png b/docs/assets/pt/FormEditor/cssMac.png new file mode 100644 index 00000000000000..0d35ff7b764499 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssMac.png differ diff --git a/docs/assets/pt/FormEditor/cssNo.png b/docs/assets/pt/FormEditor/cssNo.png new file mode 100644 index 00000000000000..00cb72372be053 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssNo.png differ diff --git a/docs/assets/pt/FormEditor/cssPpropList.png b/docs/assets/pt/FormEditor/cssPpropList.png new file mode 100644 index 00000000000000..aba337f0be6695 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssPpropList.png differ diff --git a/docs/assets/pt/FormEditor/cssPpropListImportant.png b/docs/assets/pt/FormEditor/cssPpropListImportant.png new file mode 100644 index 00000000000000..5d8c3354f1c5da Binary files /dev/null and b/docs/assets/pt/FormEditor/cssPpropListImportant.png differ diff --git a/docs/assets/pt/FormEditor/cssPreview.png b/docs/assets/pt/FormEditor/cssPreview.png new file mode 100644 index 00000000000000..22f7417ff3541c Binary files /dev/null and b/docs/assets/pt/FormEditor/cssPreview.png differ diff --git a/docs/assets/pt/FormEditor/cssPreview_list.png b/docs/assets/pt/FormEditor/cssPreview_list.png new file mode 100644 index 00000000000000..96171a6c9645dc Binary files /dev/null and b/docs/assets/pt/FormEditor/cssPreview_list.png differ diff --git a/docs/assets/pt/FormEditor/cssPreviewicon.png b/docs/assets/pt/FormEditor/cssPreviewicon.png new file mode 100644 index 00000000000000..5a1a114d897b28 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssPreviewicon.png differ diff --git a/docs/assets/pt/FormEditor/cssShield.png b/docs/assets/pt/FormEditor/cssShield.png new file mode 100644 index 00000000000000..53c81da5d89945 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssShield.png differ diff --git a/docs/assets/pt/FormEditor/cssToolbar.png b/docs/assets/pt/FormEditor/cssToolbar.png new file mode 100644 index 00000000000000..0bf58437873e04 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssToolbar.png differ diff --git a/docs/assets/pt/FormEditor/cssWin.png b/docs/assets/pt/FormEditor/cssWin.png new file mode 100644 index 00000000000000..d030988e3f0839 Binary files /dev/null and b/docs/assets/pt/FormEditor/cssWin.png differ diff --git a/docs/assets/pt/FormEditor/darkicon.png b/docs/assets/pt/FormEditor/darkicon.png new file mode 100644 index 00000000000000..2ac639212f1320 Binary files /dev/null and b/docs/assets/pt/FormEditor/darkicon.png differ diff --git a/docs/assets/pt/FormEditor/displyAndPage.png b/docs/assets/pt/FormEditor/displyAndPage.png new file mode 100644 index 00000000000000..927aec2a167098 Binary files /dev/null and b/docs/assets/pt/FormEditor/displyAndPage.png differ diff --git a/docs/assets/pt/FormEditor/distribution.png b/docs/assets/pt/FormEditor/distribution.png new file mode 100644 index 00000000000000..1bbdba0e5b57fc Binary files /dev/null and b/docs/assets/pt/FormEditor/distribution.png differ diff --git a/docs/assets/pt/FormEditor/distributionTool.png b/docs/assets/pt/FormEditor/distributionTool.png new file mode 100644 index 00000000000000..0c65eb9e22cbc6 Binary files /dev/null and b/docs/assets/pt/FormEditor/distributionTool.png differ diff --git a/docs/assets/pt/FormEditor/duplcateMany.png b/docs/assets/pt/FormEditor/duplcateMany.png new file mode 100644 index 00000000000000..111f15d9f6c4e6 Binary files /dev/null and b/docs/assets/pt/FormEditor/duplcateMany.png differ diff --git a/docs/assets/pt/FormEditor/duplicateObjects.png b/docs/assets/pt/FormEditor/duplicateObjects.png new file mode 100644 index 00000000000000..788b29657e9e6f Binary files /dev/null and b/docs/assets/pt/FormEditor/duplicateObjects.png differ diff --git a/docs/assets/pt/FormEditor/entryOrder1.png b/docs/assets/pt/FormEditor/entryOrder1.png new file mode 100644 index 00000000000000..6ee5f9ab3f5a04 Binary files /dev/null and b/docs/assets/pt/FormEditor/entryOrder1.png differ diff --git a/docs/assets/pt/FormEditor/entryOrder2.png b/docs/assets/pt/FormEditor/entryOrder2.png new file mode 100644 index 00000000000000..411c4ee6998578 Binary files /dev/null and b/docs/assets/pt/FormEditor/entryOrder2.png differ diff --git a/docs/assets/pt/FormEditor/entryOrder3.png b/docs/assets/pt/FormEditor/entryOrder3.png new file mode 100644 index 00000000000000..5514b448ed8272 Binary files /dev/null and b/docs/assets/pt/FormEditor/entryOrder3.png differ diff --git a/docs/assets/pt/FormEditor/execute.png b/docs/assets/pt/FormEditor/execute.png new file mode 100644 index 00000000000000..7339697f7d3f4e Binary files /dev/null and b/docs/assets/pt/FormEditor/execute.png differ diff --git a/docs/assets/pt/FormEditor/group.png b/docs/assets/pt/FormEditor/group.png new file mode 100644 index 00000000000000..50f4f54c2e1ba1 Binary files /dev/null and b/docs/assets/pt/FormEditor/group.png differ diff --git a/docs/assets/pt/FormEditor/horizontalDistribution.png b/docs/assets/pt/FormEditor/horizontalDistribution.png new file mode 100644 index 00000000000000..a7581b40e4fb2d Binary files /dev/null and b/docs/assets/pt/FormEditor/horizontalDistribution.png differ diff --git a/docs/assets/pt/FormEditor/indicator.png b/docs/assets/pt/FormEditor/indicator.png new file mode 100644 index 00000000000000..0778ac0454daac Binary files /dev/null and b/docs/assets/pt/FormEditor/indicator.png differ diff --git a/docs/assets/pt/FormEditor/input.png b/docs/assets/pt/FormEditor/input.png new file mode 100644 index 00000000000000..93b003e16449b5 Binary files /dev/null and b/docs/assets/pt/FormEditor/input.png differ diff --git a/docs/assets/pt/FormEditor/layering.png b/docs/assets/pt/FormEditor/layering.png new file mode 100644 index 00000000000000..c343dcb86d00b6 Binary files /dev/null and b/docs/assets/pt/FormEditor/layering.png differ diff --git a/docs/assets/pt/FormEditor/level.png b/docs/assets/pt/FormEditor/level.png new file mode 100644 index 00000000000000..04c1f9d50f116c Binary files /dev/null and b/docs/assets/pt/FormEditor/level.png differ diff --git a/docs/assets/pt/FormEditor/level2.png b/docs/assets/pt/FormEditor/level2.png new file mode 100644 index 00000000000000..39c90c6c1781a9 Binary files /dev/null and b/docs/assets/pt/FormEditor/level2.png differ diff --git a/docs/assets/pt/FormEditor/library.png b/docs/assets/pt/FormEditor/library.png new file mode 100644 index 00000000000000..33ec8dc67f880d Binary files /dev/null and b/docs/assets/pt/FormEditor/library.png differ diff --git a/docs/assets/pt/FormEditor/listBoxBuilder1.png b/docs/assets/pt/FormEditor/listBoxBuilder1.png new file mode 100644 index 00000000000000..6a56635755707e Binary files /dev/null and b/docs/assets/pt/FormEditor/listBoxBuilder1.png differ diff --git a/docs/assets/pt/FormEditor/listbox.png b/docs/assets/pt/FormEditor/listbox.png new file mode 100644 index 00000000000000..f2f297e6bc7f1e Binary files /dev/null and b/docs/assets/pt/FormEditor/listbox.png differ diff --git a/docs/assets/pt/FormEditor/macroClass.png b/docs/assets/pt/FormEditor/macroClass.png new file mode 100644 index 00000000000000..af6b91d02a6c96 Binary files /dev/null and b/docs/assets/pt/FormEditor/macroClass.png differ diff --git a/docs/assets/pt/FormEditor/macroSelect.png b/docs/assets/pt/FormEditor/macroSelect.png new file mode 100644 index 00000000000000..6a9f1c4093662f Binary files /dev/null and b/docs/assets/pt/FormEditor/macroSelect.png differ diff --git a/docs/assets/pt/FormEditor/macroStructure.png b/docs/assets/pt/FormEditor/macroStructure.png new file mode 100644 index 00000000000000..238f6103b51935 Binary files /dev/null and b/docs/assets/pt/FormEditor/macroStructure.png differ diff --git a/docs/assets/pt/FormEditor/macroex1.png b/docs/assets/pt/FormEditor/macroex1.png new file mode 100644 index 00000000000000..a63a9e1d554dd5 Binary files /dev/null and b/docs/assets/pt/FormEditor/macroex1.png differ diff --git a/docs/assets/pt/FormEditor/macroex2.png b/docs/assets/pt/FormEditor/macroex2.png new file mode 100644 index 00000000000000..3650e1a1ae3bdf Binary files /dev/null and b/docs/assets/pt/FormEditor/macroex2.png differ diff --git a/docs/assets/pt/FormEditor/magneticGrid1.png b/docs/assets/pt/FormEditor/magneticGrid1.png new file mode 100644 index 00000000000000..a144915e6e4a96 Binary files /dev/null and b/docs/assets/pt/FormEditor/magneticGrid1.png differ diff --git a/docs/assets/pt/FormEditor/magneticGrid2.png b/docs/assets/pt/FormEditor/magneticGrid2.png new file mode 100644 index 00000000000000..5698d4d0b06628 Binary files /dev/null and b/docs/assets/pt/FormEditor/magneticGrid2.png differ diff --git a/docs/assets/pt/FormEditor/moving.png b/docs/assets/pt/FormEditor/moving.png new file mode 100644 index 00000000000000..d13033764953d7 Binary files /dev/null and b/docs/assets/pt/FormEditor/moving.png differ diff --git a/docs/assets/pt/FormEditor/objectBar.png b/docs/assets/pt/FormEditor/objectBar.png new file mode 100644 index 00000000000000..eb3b25be51b713 Binary files /dev/null and b/docs/assets/pt/FormEditor/objectBar.png differ diff --git a/docs/assets/pt/FormEditor/objectLibrary.png b/docs/assets/pt/FormEditor/objectLibrary.png new file mode 100644 index 00000000000000..a285750533d17b Binary files /dev/null and b/docs/assets/pt/FormEditor/objectLibrary.png differ diff --git a/docs/assets/pt/FormEditor/plugin.png b/docs/assets/pt/FormEditor/plugin.png new file mode 100644 index 00000000000000..8ef7134452439f Binary files /dev/null and b/docs/assets/pt/FormEditor/plugin.png differ diff --git a/docs/assets/pt/FormEditor/radio.png b/docs/assets/pt/FormEditor/radio.png new file mode 100644 index 00000000000000..06f1d6d1f17118 Binary files /dev/null and b/docs/assets/pt/FormEditor/radio.png differ diff --git a/docs/assets/pt/FormEditor/rectangle.png b/docs/assets/pt/FormEditor/rectangle.png new file mode 100644 index 00000000000000..0f8e94ad0078e9 Binary files /dev/null and b/docs/assets/pt/FormEditor/rectangle.png differ diff --git a/docs/assets/pt/FormEditor/selectMultiple.png b/docs/assets/pt/FormEditor/selectMultiple.png new file mode 100644 index 00000000000000..bffa261613180c Binary files /dev/null and b/docs/assets/pt/FormEditor/selectMultiple.png differ diff --git a/docs/assets/pt/FormEditor/selectResize.png b/docs/assets/pt/FormEditor/selectResize.png new file mode 100644 index 00000000000000..2ed73d44e8bf93 Binary files /dev/null and b/docs/assets/pt/FormEditor/selectResize.png differ diff --git a/docs/assets/pt/FormEditor/selection.png b/docs/assets/pt/FormEditor/selection.png new file mode 100644 index 00000000000000..c8f49d232f2f87 Binary files /dev/null and b/docs/assets/pt/FormEditor/selection.png differ diff --git a/docs/assets/pt/FormEditor/shields.png b/docs/assets/pt/FormEditor/shields.png index 21c805438c888a..aaae4df4f580ed 100644 Binary files a/docs/assets/pt/FormEditor/shields.png and b/docs/assets/pt/FormEditor/shields.png differ diff --git a/docs/assets/pt/FormEditor/shields2.png b/docs/assets/pt/FormEditor/shields2.png new file mode 100644 index 00000000000000..219248f59143f5 Binary files /dev/null and b/docs/assets/pt/FormEditor/shields2.png differ diff --git a/docs/assets/pt/FormEditor/showHideElements.png b/docs/assets/pt/FormEditor/showHideElements.png new file mode 100644 index 00000000000000..d0472d1247b8eb Binary files /dev/null and b/docs/assets/pt/FormEditor/showHideElements.png differ diff --git a/docs/assets/pt/FormEditor/splitter.png b/docs/assets/pt/FormEditor/splitter.png new file mode 100644 index 00000000000000..ff69b9571cc4a9 Binary files /dev/null and b/docs/assets/pt/FormEditor/splitter.png differ diff --git a/docs/assets/pt/FormEditor/text.png b/docs/assets/pt/FormEditor/text.png new file mode 100644 index 00000000000000..becbe937835b07 Binary files /dev/null and b/docs/assets/pt/FormEditor/text.png differ diff --git a/docs/assets/pt/FormEditor/toolbar.png b/docs/assets/pt/FormEditor/toolbar.png new file mode 100644 index 00000000000000..0d80a710b43201 Binary files /dev/null and b/docs/assets/pt/FormEditor/toolbar.png differ diff --git a/docs/assets/pt/FormEditor/views.png b/docs/assets/pt/FormEditor/views.png new file mode 100644 index 00000000000000..4d629ea7653705 Binary files /dev/null and b/docs/assets/pt/FormEditor/views.png differ diff --git a/docs/assets/pt/FormEditor/zOrder.png b/docs/assets/pt/FormEditor/zOrder.png new file mode 100644 index 00000000000000..f660f3f0d4ea6b Binary files /dev/null and b/docs/assets/pt/FormEditor/zOrder.png differ diff --git a/docs/assets/pt/FormEditor/zoom.png b/docs/assets/pt/FormEditor/zoom.png new file mode 100644 index 00000000000000..a2dab285fc79fa Binary files /dev/null and b/docs/assets/pt/FormEditor/zoom.png differ diff --git a/docs/assets/pt/FormObjects/fruits1.png b/docs/assets/pt/FormObjects/fruits1.png new file mode 100644 index 00000000000000..df3d883cf15583 Binary files /dev/null and b/docs/assets/pt/FormObjects/fruits1.png differ diff --git a/docs/assets/pt/FormObjects/fruits2.png b/docs/assets/pt/FormObjects/fruits2.png new file mode 100644 index 00000000000000..f20cc006564b2b Binary files /dev/null and b/docs/assets/pt/FormObjects/fruits2.png differ diff --git a/docs/assets/pt/FormObjects/fruits3.png b/docs/assets/pt/FormObjects/fruits3.png new file mode 100644 index 00000000000000..3f796d60f4feb8 Binary files /dev/null and b/docs/assets/pt/FormObjects/fruits3.png differ diff --git a/docs/assets/pt/FormObjects/popupDropdown_hierar.png b/docs/assets/pt/FormObjects/popupDropdown_hierar.png new file mode 100644 index 00000000000000..e5acb86ef8c235 Binary files /dev/null and b/docs/assets/pt/FormObjects/popupDropdown_hierar.png differ diff --git a/docs/assets/pt/ORDA/AutoCompletionEntity.png b/docs/assets/pt/ORDA/AutoCompletionEntity.png new file mode 100644 index 00000000000000..9e096b1c07fe78 Binary files /dev/null and b/docs/assets/pt/ORDA/AutoCompletionEntity.png differ diff --git a/docs/assets/pt/ORDA/ClassDiagramImage.png b/docs/assets/pt/ORDA/ClassDiagramImage.png new file mode 100644 index 00000000000000..ba29e2db0769ce Binary files /dev/null and b/docs/assets/pt/ORDA/ClassDiagramImage.png differ diff --git a/docs/assets/pt/ORDA/ExposeDataclass.png b/docs/assets/pt/ORDA/ExposeDataclass.png new file mode 100644 index 00000000000000..79cae05f9e6eb8 Binary files /dev/null and b/docs/assets/pt/ORDA/ExposeDataclass.png differ diff --git a/docs/assets/pt/ORDA/ORDA_Classes-3.png b/docs/assets/pt/ORDA/ORDA_Classes-3.png new file mode 100644 index 00000000000000..8f973586fbdc70 Binary files /dev/null and b/docs/assets/pt/ORDA/ORDA_Classes-3.png differ diff --git a/docs/assets/pt/ORDA/Orda_example.png b/docs/assets/pt/ORDA/Orda_example.png new file mode 100644 index 00000000000000..5ab40e99f278ff Binary files /dev/null and b/docs/assets/pt/ORDA/Orda_example.png differ diff --git a/docs/assets/pt/ORDA/api.png b/docs/assets/pt/ORDA/api.png new file mode 100644 index 00000000000000..eb38e7c7e5fbb4 Binary files /dev/null and b/docs/assets/pt/ORDA/api.png differ diff --git a/docs/assets/pt/ORDA/classORDA1.png b/docs/assets/pt/ORDA/classORDA1.png new file mode 100644 index 00000000000000..e4d493ef9a6859 Binary files /dev/null and b/docs/assets/pt/ORDA/classORDA1.png differ diff --git a/docs/assets/pt/ORDA/classORDA2.png b/docs/assets/pt/ORDA/classORDA2.png new file mode 100644 index 00000000000000..fa0a6f6f82607f Binary files /dev/null and b/docs/assets/pt/ORDA/classORDA2.png differ diff --git a/docs/assets/pt/ORDA/classORDA3.png b/docs/assets/pt/ORDA/classORDA3.png new file mode 100644 index 00000000000000..6d3dd9cd80110f Binary files /dev/null and b/docs/assets/pt/ORDA/classORDA3.png differ diff --git a/docs/assets/pt/ORDA/classORDA4.png b/docs/assets/pt/ORDA/classORDA4.png new file mode 100644 index 00000000000000..ff2aeb9cdadda3 Binary files /dev/null and b/docs/assets/pt/ORDA/classORDA4.png differ diff --git a/docs/assets/pt/ORDA/classORDA5.png b/docs/assets/pt/ORDA/classORDA5.png new file mode 100644 index 00000000000000..cc6e2cb3407c59 Binary files /dev/null and b/docs/assets/pt/ORDA/classORDA5.png differ diff --git a/docs/assets/pt/ORDA/companyTable.png b/docs/assets/pt/ORDA/companyTable.png new file mode 100644 index 00000000000000..9c2571f9d2d59a Binary files /dev/null and b/docs/assets/pt/ORDA/companyTable.png differ diff --git a/docs/assets/pt/ORDA/concurrent1.png b/docs/assets/pt/ORDA/concurrent1.png new file mode 100644 index 00000000000000..669f31feb75d8b Binary files /dev/null and b/docs/assets/pt/ORDA/concurrent1.png differ diff --git a/docs/assets/pt/ORDA/concurrent2.png b/docs/assets/pt/ORDA/concurrent2.png new file mode 100644 index 00000000000000..699c5a298367b9 Binary files /dev/null and b/docs/assets/pt/ORDA/concurrent2.png differ diff --git a/docs/assets/pt/ORDA/concurrent3.png b/docs/assets/pt/ORDA/concurrent3.png new file mode 100644 index 00000000000000..01ba179ccf71cd Binary files /dev/null and b/docs/assets/pt/ORDA/concurrent3.png differ diff --git a/docs/assets/pt/ORDA/dataclassProperties.png b/docs/assets/pt/ORDA/dataclassProperties.png new file mode 100644 index 00000000000000..098398e5847c41 Binary files /dev/null and b/docs/assets/pt/ORDA/dataclassProperties.png differ diff --git a/docs/assets/pt/ORDA/datastoreMapping.png b/docs/assets/pt/ORDA/datastoreMapping.png new file mode 100644 index 00000000000000..f8505d0fa3c038 Binary files /dev/null and b/docs/assets/pt/ORDA/datastoreMapping.png differ diff --git a/docs/assets/pt/ORDA/debug1.png b/docs/assets/pt/ORDA/debug1.png new file mode 100644 index 00000000000000..b3e7f8dbe3b08b Binary files /dev/null and b/docs/assets/pt/ORDA/debug1.png differ diff --git a/docs/assets/pt/ORDA/deezer.png b/docs/assets/pt/ORDA/deezer.png new file mode 100644 index 00000000000000..2cefbaf6b3f2ef Binary files /dev/null and b/docs/assets/pt/ORDA/deezer.png differ diff --git a/docs/assets/pt/ORDA/dsDiagram.png b/docs/assets/pt/ORDA/dsDiagram.png new file mode 100644 index 00000000000000..1f2acce33edccb Binary files /dev/null and b/docs/assets/pt/ORDA/dsDiagram.png differ diff --git a/docs/assets/pt/ORDA/entityAttributes.png b/docs/assets/pt/ORDA/entityAttributes.png new file mode 100644 index 00000000000000..ed79627b4bdf9c Binary files /dev/null and b/docs/assets/pt/ORDA/entityAttributes.png differ diff --git a/docs/assets/pt/ORDA/entityAttributes2.png b/docs/assets/pt/ORDA/entityAttributes2.png new file mode 100644 index 00000000000000..4fc72a4fda05a5 Binary files /dev/null and b/docs/assets/pt/ORDA/entityAttributes2.png differ diff --git a/docs/assets/pt/ORDA/entityAttributes3.png b/docs/assets/pt/ORDA/entityAttributes3.png new file mode 100644 index 00000000000000..4e92556695eeae Binary files /dev/null and b/docs/assets/pt/ORDA/entityAttributes3.png differ diff --git a/docs/assets/pt/ORDA/entityRef1.png b/docs/assets/pt/ORDA/entityRef1.png new file mode 100644 index 00000000000000..753f5ea46bbcea Binary files /dev/null and b/docs/assets/pt/ORDA/entityRef1.png differ diff --git a/docs/assets/pt/ORDA/entityRef2.png b/docs/assets/pt/ORDA/entityRef2.png new file mode 100644 index 00000000000000..bbb9aab9154c58 Binary files /dev/null and b/docs/assets/pt/ORDA/entityRef2.png differ diff --git a/docs/assets/pt/ORDA/entitySelectionRelationAttributes.png b/docs/assets/pt/ORDA/entitySelectionRelationAttributes.png new file mode 100644 index 00000000000000..c8b61945196b61 Binary files /dev/null and b/docs/assets/pt/ORDA/entitySelectionRelationAttributes.png differ diff --git a/docs/assets/pt/ORDA/mainConcepts.png b/docs/assets/pt/ORDA/mainConcepts.png new file mode 100644 index 00000000000000..d94b3d9cf975ad Binary files /dev/null and b/docs/assets/pt/ORDA/mainConcepts.png differ diff --git a/docs/assets/pt/ORDA/optimisticLock1.png b/docs/assets/pt/ORDA/optimisticLock1.png new file mode 100644 index 00000000000000..26a56f140e0ed7 Binary files /dev/null and b/docs/assets/pt/ORDA/optimisticLock1.png differ diff --git a/docs/assets/pt/ORDA/optimisticLock2.png b/docs/assets/pt/ORDA/optimisticLock2.png new file mode 100644 index 00000000000000..e0afef8604fbfa Binary files /dev/null and b/docs/assets/pt/ORDA/optimisticLock2.png differ diff --git a/docs/assets/pt/ORDA/optimisticLock3.png b/docs/assets/pt/ORDA/optimisticLock3.png new file mode 100644 index 00000000000000..c1df35199067c7 Binary files /dev/null and b/docs/assets/pt/ORDA/optimisticLock3.png differ diff --git a/docs/assets/pt/ORDA/relationProperties.png b/docs/assets/pt/ORDA/relationProperties.png new file mode 100644 index 00000000000000..b0a5ddf2e593d0 Binary files /dev/null and b/docs/assets/pt/ORDA/relationProperties.png differ diff --git a/docs/assets/pt/ORDA/sessionAdmin.png b/docs/assets/pt/ORDA/sessionAdmin.png new file mode 100644 index 00000000000000..9e93d2845d618a Binary files /dev/null and b/docs/assets/pt/ORDA/sessionAdmin.png differ diff --git a/docs/assets/pt/ORDA/sessions.png b/docs/assets/pt/ORDA/sessions.png new file mode 100644 index 00000000000000..91e6d433933bca Binary files /dev/null and b/docs/assets/pt/ORDA/sessions.png differ diff --git a/docs/assets/pt/ORDA/showClass.png b/docs/assets/pt/ORDA/showClass.png new file mode 100644 index 00000000000000..af5fe77c6d3ca5 Binary files /dev/null and b/docs/assets/pt/ORDA/showClass.png differ diff --git a/docs/assets/pt/ORDA/struc.png b/docs/assets/pt/ORDA/struc.png new file mode 100644 index 00000000000000..ad36436aa00890 Binary files /dev/null and b/docs/assets/pt/ORDA/struc.png differ diff --git a/docs/assets/pt/ORDA/struc2.png b/docs/assets/pt/ORDA/struc2.png new file mode 100644 index 00000000000000..708bfa6ea2f884 Binary files /dev/null and b/docs/assets/pt/ORDA/struc2.png differ diff --git a/docs/assets/pt/ORDA/struc2s.png b/docs/assets/pt/ORDA/struc2s.png new file mode 100644 index 00000000000000..2c1a4f8804eef1 Binary files /dev/null and b/docs/assets/pt/ORDA/struc2s.png differ diff --git a/docs/assets/pt/Preferences/categories.png b/docs/assets/pt/Preferences/categories.png new file mode 100644 index 00000000000000..6e1d9bff30e371 Binary files /dev/null and b/docs/assets/pt/Preferences/categories.png differ diff --git a/docs/assets/pt/Preferences/general1.png b/docs/assets/pt/Preferences/general1.png new file mode 100644 index 00000000000000..1e091040423d5b Binary files /dev/null and b/docs/assets/pt/Preferences/general1.png differ diff --git a/docs/assets/pt/Preferences/general2.png b/docs/assets/pt/Preferences/general2.png new file mode 100644 index 00000000000000..b400d4189e14a5 Binary files /dev/null and b/docs/assets/pt/Preferences/general2.png differ diff --git a/docs/assets/pt/Preferences/general3.png b/docs/assets/pt/Preferences/general3.png new file mode 100644 index 00000000000000..5a0c3d7adb7554 Binary files /dev/null and b/docs/assets/pt/Preferences/general3.png differ diff --git a/docs/assets/pt/Preferences/general4.png b/docs/assets/pt/Preferences/general4.png new file mode 100644 index 00000000000000..991533111eb3ba Binary files /dev/null and b/docs/assets/pt/Preferences/general4.png differ diff --git a/docs/assets/pt/Preferences/general5.png b/docs/assets/pt/Preferences/general5.png new file mode 100644 index 00000000000000..5430cb588fd2e7 Binary files /dev/null and b/docs/assets/pt/Preferences/general5.png differ diff --git a/docs/assets/pt/Preferences/gitignore.png b/docs/assets/pt/Preferences/gitignore.png new file mode 100644 index 00000000000000..6440a6bdb002e0 Binary files /dev/null and b/docs/assets/pt/Preferences/gitignore.png differ diff --git a/docs/assets/pt/Preferences/langCateg.png b/docs/assets/pt/Preferences/langCateg.png new file mode 100644 index 00000000000000..417b56c2121a5a Binary files /dev/null and b/docs/assets/pt/Preferences/langCateg.png differ diff --git a/docs/assets/pt/Preferences/options.png b/docs/assets/pt/Preferences/options.png new file mode 100644 index 00000000000000..6fb4c31a287054 Binary files /dev/null and b/docs/assets/pt/Preferences/options.png differ diff --git a/docs/assets/pt/Preferences/optionsBlockLines.png b/docs/assets/pt/Preferences/optionsBlockLines.png new file mode 100644 index 00000000000000..d5ab257181ca16 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsBlockLines.png differ diff --git a/docs/assets/pt/Preferences/optionsClosing.png b/docs/assets/pt/Preferences/optionsClosing.png new file mode 100644 index 00000000000000..d5ed0e7eb61c4e Binary files /dev/null and b/docs/assets/pt/Preferences/optionsClosing.png differ diff --git a/docs/assets/pt/Preferences/optionsClosing2.png b/docs/assets/pt/Preferences/optionsClosing2.png new file mode 100644 index 00000000000000..b9d9aa80c3109f Binary files /dev/null and b/docs/assets/pt/Preferences/optionsClosing2.png differ diff --git a/docs/assets/pt/Preferences/optionsHideIcons.png b/docs/assets/pt/Preferences/optionsHideIcons.png new file mode 100644 index 00000000000000..95730cecd5b371 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsHideIcons.png differ diff --git a/docs/assets/pt/Preferences/optionsIndent.png b/docs/assets/pt/Preferences/optionsIndent.png new file mode 100644 index 00000000000000..d6d649fff71981 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsIndent.png differ diff --git a/docs/assets/pt/Preferences/optionsLine.png b/docs/assets/pt/Preferences/optionsLine.png new file mode 100644 index 00000000000000..a9d8daaa30c249 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsLine.png differ diff --git a/docs/assets/pt/Preferences/optionsLogicalBlocks.png b/docs/assets/pt/Preferences/optionsLogicalBlocks.png new file mode 100644 index 00000000000000..03128cb9c9e119 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsLogicalBlocks.png differ diff --git a/docs/assets/pt/Preferences/optionsRectangle.png b/docs/assets/pt/Preferences/optionsRectangle.png new file mode 100644 index 00000000000000..ce053ab630d4e2 Binary files /dev/null and b/docs/assets/pt/Preferences/optionsRectangle.png differ diff --git a/docs/assets/pt/Preferences/optionsVariables.png b/docs/assets/pt/Preferences/optionsVariables.png new file mode 100644 index 00000000000000..00bf5e5180b64e Binary files /dev/null and b/docs/assets/pt/Preferences/optionsVariables.png differ diff --git a/docs/assets/pt/Preferences/overviewAccess.png b/docs/assets/pt/Preferences/overviewAccess.png new file mode 100644 index 00000000000000..445d0c48bc6d45 Binary files /dev/null and b/docs/assets/pt/Preferences/overviewAccess.png differ diff --git a/docs/assets/pt/Preferences/overviewSettings.png b/docs/assets/pt/Preferences/overviewSettings.png new file mode 100644 index 00000000000000..c5a90516281dcc Binary files /dev/null and b/docs/assets/pt/Preferences/overviewSettings.png differ diff --git a/docs/assets/pt/Preferences/overviewUser.png b/docs/assets/pt/Preferences/overviewUser.png new file mode 100644 index 00000000000000..e0d0823cef91d8 Binary files /dev/null and b/docs/assets/pt/Preferences/overviewUser.png differ diff --git a/docs/assets/pt/Preferences/shortcuts.png b/docs/assets/pt/Preferences/shortcuts.png new file mode 100644 index 00000000000000..1dba357bd65166 Binary files /dev/null and b/docs/assets/pt/Preferences/shortcuts.png differ diff --git a/docs/assets/pt/Preferences/suggestionsAutoOpen.png b/docs/assets/pt/Preferences/suggestionsAutoOpen.png new file mode 100644 index 00000000000000..c33861c3102d39 Binary files /dev/null and b/docs/assets/pt/Preferences/suggestionsAutoOpen.png differ diff --git a/docs/assets/pt/Preferences/themes.png b/docs/assets/pt/Preferences/themes.png new file mode 100644 index 00000000000000..5c775ae429cd41 Binary files /dev/null and b/docs/assets/pt/Preferences/themes.png differ diff --git a/docs/assets/pt/Project/4Dlinkfiles.png b/docs/assets/pt/Project/4Dlinkfiles.png new file mode 100644 index 00000000000000..0ea98ee48835d4 Binary files /dev/null and b/docs/assets/pt/Project/4Dlinkfiles.png differ diff --git a/docs/assets/pt/Project/buildappCSProj.png b/docs/assets/pt/Project/buildappCSProj.png index bbbdd0dbc38997..2ee87c60eefb8c 100644 Binary files a/docs/assets/pt/Project/buildappCSProj.png and b/docs/assets/pt/Project/buildappCSProj.png differ diff --git a/docs/assets/pt/Project/comp1.png b/docs/assets/pt/Project/comp1.png new file mode 100644 index 00000000000000..44b9c36a470fac Binary files /dev/null and b/docs/assets/pt/Project/comp1.png differ diff --git a/docs/assets/pt/Project/compDoc.png b/docs/assets/pt/Project/compDoc.png new file mode 100644 index 00000000000000..52a31ace379877 Binary files /dev/null and b/docs/assets/pt/Project/compDoc.png differ diff --git a/docs/assets/pt/Project/compileModes.png b/docs/assets/pt/Project/compileModes.png new file mode 100644 index 00000000000000..38a927760c084a Binary files /dev/null and b/docs/assets/pt/Project/compileModes.png differ diff --git a/docs/assets/pt/Project/compilerWin1.png b/docs/assets/pt/Project/compilerWin1.png new file mode 100644 index 00000000000000..5471226329b1c0 Binary files /dev/null and b/docs/assets/pt/Project/compilerWin1.png differ diff --git a/docs/assets/pt/Project/compilerWin2.png b/docs/assets/pt/Project/compilerWin2.png new file mode 100644 index 00000000000000..6a036995f6bad9 Binary files /dev/null and b/docs/assets/pt/Project/compilerWin2.png differ diff --git a/docs/assets/pt/Project/compilerWin3.png b/docs/assets/pt/Project/compilerWin3.png new file mode 100644 index 00000000000000..0dd231ca19dd39 Binary files /dev/null and b/docs/assets/pt/Project/compilerWin3.png differ diff --git a/docs/assets/pt/Project/compilerWin4.png b/docs/assets/pt/Project/compilerWin4.png new file mode 100644 index 00000000000000..4c1222c4cc83a0 Binary files /dev/null and b/docs/assets/pt/Project/compilerWin4.png differ diff --git a/docs/assets/pt/Project/compilerWin5.png b/docs/assets/pt/Project/compilerWin5.png new file mode 100644 index 00000000000000..a27fac846672a7 Binary files /dev/null and b/docs/assets/pt/Project/compilerWin5.png differ diff --git a/docs/assets/pt/Project/compilerWin6.png b/docs/assets/pt/Project/compilerWin6.png new file mode 100644 index 00000000000000..593b8d0b528d2a Binary files /dev/null and b/docs/assets/pt/Project/compilerWin6.png differ diff --git a/docs/assets/pt/Project/success.png b/docs/assets/pt/Project/success.png new file mode 100644 index 00000000000000..c92a0131aeb9d9 Binary files /dev/null and b/docs/assets/pt/Project/success.png differ diff --git a/docs/assets/pt/REST/login.png b/docs/assets/pt/REST/login.png new file mode 100644 index 00000000000000..d6468df5305aca Binary files /dev/null and b/docs/assets/pt/REST/login.png differ diff --git a/docs/assets/pt/REST/ordastructure.png b/docs/assets/pt/REST/ordastructure.png new file mode 100644 index 00000000000000..44b1a3caa9766f Binary files /dev/null and b/docs/assets/pt/REST/ordastructure.png differ diff --git a/docs/assets/pt/WebServer/authenticate.png b/docs/assets/pt/WebServer/authenticate.png new file mode 100644 index 00000000000000..be55cce749b95c Binary files /dev/null and b/docs/assets/pt/WebServer/authenticate.png differ diff --git a/docs/assets/pt/WebServer/authenticate2.png b/docs/assets/pt/WebServer/authenticate2.png new file mode 100644 index 00000000000000..eede6996f67ac5 Binary files /dev/null and b/docs/assets/pt/WebServer/authenticate2.png differ diff --git a/docs/assets/pt/WebServer/authenticate3.png b/docs/assets/pt/WebServer/authenticate3.png new file mode 100644 index 00000000000000..8a2851d7abe951 Binary files /dev/null and b/docs/assets/pt/WebServer/authenticate3.png differ diff --git a/docs/assets/pt/WebServer/authentication.png b/docs/assets/pt/WebServer/authentication.png new file mode 100644 index 00000000000000..b9e8bb961d2035 Binary files /dev/null and b/docs/assets/pt/WebServer/authentication.png differ diff --git a/docs/assets/pt/WebServer/backup.png b/docs/assets/pt/WebServer/backup.png new file mode 100644 index 00000000000000..16738fa143868e Binary files /dev/null and b/docs/assets/pt/WebServer/backup.png differ diff --git a/docs/assets/pt/WebServer/config.png b/docs/assets/pt/WebServer/config.png new file mode 100644 index 00000000000000..f0c3f6bc6eed10 Binary files /dev/null and b/docs/assets/pt/WebServer/config.png differ diff --git a/docs/assets/pt/WebServer/defaultHomePage.png b/docs/assets/pt/WebServer/defaultHomePage.png new file mode 100644 index 00000000000000..fa449c1cfd3487 Binary files /dev/null and b/docs/assets/pt/WebServer/defaultHomePage.png differ diff --git a/docs/assets/pt/WebServer/errorPage.png b/docs/assets/pt/WebServer/errorPage.png new file mode 100644 index 00000000000000..2fca7862badfc6 Binary files /dev/null and b/docs/assets/pt/WebServer/errorPage.png differ diff --git a/docs/assets/pt/WebServer/exampleSession.png b/docs/assets/pt/WebServer/exampleSession.png new file mode 100644 index 00000000000000..c2a352a29fb3a3 Binary files /dev/null and b/docs/assets/pt/WebServer/exampleSession.png differ diff --git a/docs/assets/pt/WebServer/hello.png b/docs/assets/pt/WebServer/hello.png new file mode 100644 index 00000000000000..4ab10be2c9b6a3 Binary files /dev/null and b/docs/assets/pt/WebServer/hello.png differ diff --git a/docs/assets/pt/WebServer/hello0.png b/docs/assets/pt/WebServer/hello0.png new file mode 100644 index 00000000000000..17240ac473bb1d Binary files /dev/null and b/docs/assets/pt/WebServer/hello0.png differ diff --git a/docs/assets/pt/WebServer/hello2.png b/docs/assets/pt/WebServer/hello2.png new file mode 100644 index 00000000000000..9ed116c3f8ec6b Binary files /dev/null and b/docs/assets/pt/WebServer/hello2.png differ diff --git a/docs/assets/pt/WebServer/hello3.png b/docs/assets/pt/WebServer/hello3.png new file mode 100644 index 00000000000000..ffce63461daa1b Binary files /dev/null and b/docs/assets/pt/WebServer/hello3.png differ diff --git a/docs/assets/pt/WebServer/hello3bis.png b/docs/assets/pt/WebServer/hello3bis.png new file mode 100644 index 00000000000000..4c45cd47aaf937 Binary files /dev/null and b/docs/assets/pt/WebServer/hello3bis.png differ diff --git a/docs/assets/pt/WebServer/hello4.png b/docs/assets/pt/WebServer/hello4.png new file mode 100644 index 00000000000000..b0b786472d108c Binary files /dev/null and b/docs/assets/pt/WebServer/hello4.png differ diff --git a/docs/assets/pt/WebServer/hello5.png b/docs/assets/pt/WebServer/hello5.png new file mode 100644 index 00000000000000..ad1f45d3e37738 Binary files /dev/null and b/docs/assets/pt/WebServer/hello5.png differ diff --git a/docs/assets/pt/WebServer/hello6.png b/docs/assets/pt/WebServer/hello6.png new file mode 100644 index 00000000000000..b452ff3ea3df2e Binary files /dev/null and b/docs/assets/pt/WebServer/hello6.png differ diff --git a/docs/assets/pt/WebServer/helloUsers.png b/docs/assets/pt/WebServer/helloUsers.png new file mode 100644 index 00000000000000..432b49f27850da Binary files /dev/null and b/docs/assets/pt/WebServer/helloUsers.png differ diff --git a/docs/assets/pt/WebServer/httpCommands.png b/docs/assets/pt/WebServer/httpCommands.png new file mode 100644 index 00000000000000..eb5c351f9a9f15 Binary files /dev/null and b/docs/assets/pt/WebServer/httpCommands.png differ diff --git a/docs/assets/pt/WebServer/loadBalance.png b/docs/assets/pt/WebServer/loadBalance.png new file mode 100644 index 00000000000000..763f3752dbe04e Binary files /dev/null and b/docs/assets/pt/WebServer/loadBalance.png differ diff --git a/docs/assets/pt/WebServer/log.png b/docs/assets/pt/WebServer/log.png new file mode 100644 index 00000000000000..c9964244666609 Binary files /dev/null and b/docs/assets/pt/WebServer/log.png differ diff --git a/docs/assets/pt/WebServer/login1.png b/docs/assets/pt/WebServer/login1.png new file mode 100644 index 00000000000000..406fc5a2d299a8 Binary files /dev/null and b/docs/assets/pt/WebServer/login1.png differ diff --git a/docs/assets/pt/WebServer/login2.png b/docs/assets/pt/WebServer/login2.png new file mode 100644 index 00000000000000..57c1a9412b60c2 Binary files /dev/null and b/docs/assets/pt/WebServer/login2.png differ diff --git a/docs/assets/pt/WebServer/methodIcon.png b/docs/assets/pt/WebServer/methodIcon.png new file mode 100644 index 00000000000000..d9980adf94d312 Binary files /dev/null and b/docs/assets/pt/WebServer/methodIcon.png differ diff --git a/docs/assets/pt/WebServer/methodProperties.png b/docs/assets/pt/WebServer/methodProperties.png new file mode 100644 index 00000000000000..9796515d989579 Binary files /dev/null and b/docs/assets/pt/WebServer/methodProperties.png differ diff --git a/docs/assets/pt/WebServer/option1.png b/docs/assets/pt/WebServer/option1.png new file mode 100644 index 00000000000000..64e0e0b7d9fcd6 Binary files /dev/null and b/docs/assets/pt/WebServer/option1.png differ diff --git a/docs/assets/pt/WebServer/option2.png b/docs/assets/pt/WebServer/option2.png new file mode 100644 index 00000000000000..59bf1060a71af4 Binary files /dev/null and b/docs/assets/pt/WebServer/option2.png differ diff --git a/docs/assets/pt/WebServer/preemptive.png b/docs/assets/pt/WebServer/preemptive.png new file mode 100644 index 00000000000000..0d3e96d62c96b9 Binary files /dev/null and b/docs/assets/pt/WebServer/preemptive.png differ diff --git a/docs/assets/pt/WebServer/processIcon.png b/docs/assets/pt/WebServer/processIcon.png new file mode 100644 index 00000000000000..d929f7d5dc6a82 Binary files /dev/null and b/docs/assets/pt/WebServer/processIcon.png differ diff --git a/docs/assets/pt/WebServer/restResource.png b/docs/assets/pt/WebServer/restResource.png new file mode 100644 index 00000000000000..d3cbdc57848bb1 Binary files /dev/null and b/docs/assets/pt/WebServer/restResource.png differ diff --git a/docs/assets/pt/WebServer/schemaSession.png b/docs/assets/pt/WebServer/schemaSession.png new file mode 100644 index 00000000000000..ec509c721a1b10 Binary files /dev/null and b/docs/assets/pt/WebServer/schemaSession.png differ diff --git a/docs/assets/pt/WebServer/serverAccess.png b/docs/assets/pt/WebServer/serverAccess.png new file mode 100644 index 00000000000000..ea35fdbab1271d Binary files /dev/null and b/docs/assets/pt/WebServer/serverAccess.png differ diff --git a/docs/assets/pt/WebServer/session1.png b/docs/assets/pt/WebServer/session1.png new file mode 100644 index 00000000000000..0bccf5094cb92d Binary files /dev/null and b/docs/assets/pt/WebServer/session1.png differ diff --git a/docs/assets/pt/WebServer/settingsSession.png b/docs/assets/pt/WebServer/settingsSession.png new file mode 100644 index 00000000000000..89968c1f6f3e66 Binary files /dev/null and b/docs/assets/pt/WebServer/settingsSession.png differ diff --git a/docs/assets/pt/WebServer/spiders.png b/docs/assets/pt/WebServer/spiders.png new file mode 100644 index 00000000000000..4ef8ba4f1a92a7 Binary files /dev/null and b/docs/assets/pt/WebServer/spiders.png differ diff --git a/docs/assets/pt/WebServer/start1.png b/docs/assets/pt/WebServer/start1.png new file mode 100644 index 00000000000000..56544bf9f93aa5 Binary files /dev/null and b/docs/assets/pt/WebServer/start1.png differ diff --git a/docs/assets/pt/WebServer/start2.png b/docs/assets/pt/WebServer/start2.png new file mode 100644 index 00000000000000..3b6aa54bfbaff1 Binary files /dev/null and b/docs/assets/pt/WebServer/start2.png differ diff --git a/docs/assets/pt/WebServer/start3.png b/docs/assets/pt/WebServer/start3.png new file mode 100644 index 00000000000000..d0cbea924de79e Binary files /dev/null and b/docs/assets/pt/WebServer/start3.png differ diff --git a/docs/assets/pt/WebServer/stop1.png b/docs/assets/pt/WebServer/stop1.png new file mode 100644 index 00000000000000..0452782e46f6fa Binary files /dev/null and b/docs/assets/pt/WebServer/stop1.png differ diff --git a/docs/assets/pt/WebServer/tempo_codeHTML.png b/docs/assets/pt/WebServer/tempo_codeHTML.png new file mode 100644 index 00000000000000..93ae55ec028536 Binary files /dev/null and b/docs/assets/pt/WebServer/tempo_codeHTML.png differ diff --git a/docs/assets/pt/WebServer/test1.png b/docs/assets/pt/WebServer/test1.png new file mode 100644 index 00000000000000..73850a87d9fd8a Binary files /dev/null and b/docs/assets/pt/WebServer/test1.png differ diff --git a/docs/assets/pt/WebServer/tls1.png b/docs/assets/pt/WebServer/tls1.png new file mode 100644 index 00000000000000..068f3ad82c6a8b Binary files /dev/null and b/docs/assets/pt/WebServer/tls1.png differ diff --git a/docs/assets/pt/WebServer/tls2.png b/docs/assets/pt/WebServer/tls2.png new file mode 100644 index 00000000000000..3d8b509e2fdd29 Binary files /dev/null and b/docs/assets/pt/WebServer/tls2.png differ diff --git a/docs/assets/pt/WebServer/tls3.png b/docs/assets/pt/WebServer/tls3.png new file mode 100644 index 00000000000000..31001fc62be599 Binary files /dev/null and b/docs/assets/pt/WebServer/tls3.png differ diff --git a/docs/assets/pt/WebServer/webServices.png b/docs/assets/pt/WebServer/webServices.png new file mode 100644 index 00000000000000..d4124de7e80ab2 Binary files /dev/null and b/docs/assets/pt/WebServer/webServices.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/localremote.png b/docs/assets/pt/getStart/localremote.png new file mode 100644 index 00000000000000..c94892dc90f50e Binary files /dev/null and b/docs/assets/pt/getStart/localremote.png differ diff --git a/docs/assets/pt/getStart/logo4d.png b/docs/assets/pt/getStart/logo4d.png new file mode 100644 index 00000000000000..1a28982a413cd5 Binary files /dev/null and b/docs/assets/pt/getStart/logo4d.png differ diff --git a/docs/assets/pt/getStart/projectCreate1.png b/docs/assets/pt/getStart/projectCreate1.png new file mode 100644 index 00000000000000..0df58ae93ad23c Binary files /dev/null and b/docs/assets/pt/getStart/projectCreate1.png differ diff --git a/docs/assets/pt/getStart/projectCreate2.png b/docs/assets/pt/getStart/projectCreate2.png new file mode 100644 index 00000000000000..b1ed968a97d24c Binary files /dev/null and b/docs/assets/pt/getStart/projectCreate2.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/docs/assets/pt/getStart/serverConnect.png b/docs/assets/pt/getStart/serverConnect.png new file mode 100644 index 00000000000000..f0c152cbe70a0f Binary files /dev/null and b/docs/assets/pt/getStart/serverConnect.png differ diff --git a/docs/assets/pt/getStart/serverConnect2.png b/docs/assets/pt/getStart/serverConnect2.png new file mode 100644 index 00000000000000..e3eaef0bc67874 Binary files /dev/null and b/docs/assets/pt/getStart/serverConnect2.png differ diff --git a/docs/assets/pt/getStart/welcome.png b/docs/assets/pt/getStart/welcome.png new file mode 100644 index 00000000000000..952202c1e54a27 Binary files /dev/null and b/docs/assets/pt/getStart/welcome.png differ diff --git a/docs/assets/pt/getStart/welcome2.png b/docs/assets/pt/getStart/welcome2.png new file mode 100644 index 00000000000000..1dff789e4a54db Binary files /dev/null and b/docs/assets/pt/getStart/welcome2.png differ diff --git a/docs/assets/pt/web-studio/add-component.png b/docs/assets/pt/web-studio/add-component.png new file mode 100644 index 00000000000000..37598b30e917f1 Binary files /dev/null and b/docs/assets/pt/web-studio/add-component.png differ diff --git a/docs/assets/pt/web-studio/breadcrumbs.png b/docs/assets/pt/web-studio/breadcrumbs.png new file mode 100644 index 00000000000000..cdd1cfb0bec624 Binary files /dev/null and b/docs/assets/pt/web-studio/breadcrumbs.png differ diff --git a/docs/assets/pt/web-studio/canvas.png b/docs/assets/pt/web-studio/canvas.png new file mode 100644 index 00000000000000..54e414c2fd53d1 Binary files /dev/null and b/docs/assets/pt/web-studio/canvas.png differ diff --git a/docs/assets/pt/web-studio/components.png b/docs/assets/pt/web-studio/components.png new file mode 100644 index 00000000000000..103b70caa82ec1 Binary files /dev/null and b/docs/assets/pt/web-studio/components.png differ diff --git a/docs/assets/pt/web-studio/data-sources.png b/docs/assets/pt/web-studio/data-sources.png new file mode 100644 index 00000000000000..d3356f2909f6cd Binary files /dev/null and b/docs/assets/pt/web-studio/data-sources.png differ diff --git a/docs/assets/pt/web-studio/events.png b/docs/assets/pt/web-studio/events.png new file mode 100644 index 00000000000000..bce05ed645dc50 Binary files /dev/null and b/docs/assets/pt/web-studio/events.png differ diff --git a/docs/assets/pt/web-studio/explorer.png b/docs/assets/pt/web-studio/explorer.png new file mode 100644 index 00000000000000..af8c807e0419e9 Binary files /dev/null and b/docs/assets/pt/web-studio/explorer.png differ diff --git a/docs/assets/pt/web-studio/image-server-side.png b/docs/assets/pt/web-studio/image-server-side.png new file mode 100644 index 00000000000000..ce7e66427d61ac Binary files /dev/null and b/docs/assets/pt/web-studio/image-server-side.png differ diff --git a/docs/assets/pt/web-studio/number-1-icon.png b/docs/assets/pt/web-studio/number-1-icon.png new file mode 100644 index 00000000000000..d391add818165e Binary files /dev/null and b/docs/assets/pt/web-studio/number-1-icon.png differ diff --git a/docs/assets/pt/web-studio/properties-panel.png b/docs/assets/pt/web-studio/properties-panel.png new file mode 100644 index 00000000000000..6ddf6991a32d75 Binary files /dev/null and b/docs/assets/pt/web-studio/properties-panel.png differ diff --git a/docs/assets/pt/web-studio/style-panel.png b/docs/assets/pt/web-studio/style-panel.png new file mode 100644 index 00000000000000..9144cb5055b941 Binary files /dev/null and b/docs/assets/pt/web-studio/style-panel.png differ diff --git a/docs/assets/pt/web-studio/styles-library.png b/docs/assets/pt/web-studio/styles-library.png new file mode 100644 index 00000000000000..675a8ad4bb9f98 Binary files /dev/null and b/docs/assets/pt/web-studio/styles-library.png differ diff --git a/docs/assets/pt/web-studio/tabs.png b/docs/assets/pt/web-studio/tabs.png new file mode 100644 index 00000000000000..59879dedd4c48b Binary files /dev/null and b/docs/assets/pt/web-studio/tabs.png differ diff --git a/docs/assets/pt/web-studio/web-event-1.png b/docs/assets/pt/web-studio/web-event-1.png new file mode 100644 index 00000000000000..bc91acf07754c2 Binary files /dev/null and b/docs/assets/pt/web-studio/web-event-1.png differ diff --git a/docs/assets/pt/web-studio/web-event-2.png b/docs/assets/pt/web-studio/web-event-2.png new file mode 100644 index 00000000000000..8f4cd0251c5c60 Binary files /dev/null and b/docs/assets/pt/web-studio/web-event-2.png differ diff --git a/docs/assets/pt/web-studio/web-form-object.png b/docs/assets/pt/web-studio/web-form-object.png new file mode 100644 index 00000000000000..325e330b0a44f8 Binary files /dev/null and b/docs/assets/pt/web-studio/web-form-object.png differ diff --git a/docs/assets/pt/web-studio/web-studio-interface.png b/docs/assets/pt/web-studio/web-studio-interface.png new file mode 100644 index 00000000000000..7f6232ae4541d0 Binary files /dev/null and b/docs/assets/pt/web-studio/web-studio-interface.png differ diff --git a/docs/assets/pt/web-studio/web-studio-intro.png b/docs/assets/pt/web-studio/web-studio-intro.png new file mode 100644 index 00000000000000..c1b21f201f0ac0 Binary files /dev/null and b/docs/assets/pt/web-studio/web-studio-intro.png differ diff --git a/docs/assets/pt/web-studio/web-studio.png b/docs/assets/pt/web-studio/web-studio.png new file mode 100644 index 00000000000000..997c8548e46cfa Binary files /dev/null and b/docs/assets/pt/web-studio/web-studio.png differ diff --git a/docs/assets/pt/web-studio/webstudio-home.png b/docs/assets/pt/web-studio/webstudio-home.png new file mode 100644 index 00000000000000..a3c85415d866ed Binary files /dev/null and b/docs/assets/pt/web-studio/webstudio-home.png differ diff --git a/docs/preprocessing.conf b/docs/preprocessing.conf new file mode 100644 index 00000000000000..a6443ea7e8743f --- /dev/null +++ b/docs/preprocessing.conf @@ -0,0 +1,39 @@ +Transporter +POP3Transporter +IMAPTransporter +SMTPTransporter +MailAttachment +File +Blob +ZipFile +ZipFolder +ZipArchive +Document +Folder +CryptoKey +Function +Collection +Directory +Signal +Session + +Entity +EntitySelection +DataClass +DataStore +DataClassAttribute +Class +WebServer + + + +Document +Directory +Document +Directory +Transporter +Transporter +Transporter + + + diff --git a/website/build/docs/blog/2016/03/11/blog-post.html b/website/build/docs/blog/2016/03/11/blog-post.html new file mode 100644 index 00000000000000..99ea802774d618 --- /dev/null +++ b/website/build/docs/blog/2016/03/11/blog-post.html @@ -0,0 +1,94 @@ +Blog Title · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/blog/2017/04/10/blog-post-two.html b/website/build/docs/blog/2017/04/10/blog-post-two.html new file mode 100644 index 00000000000000..ba83e4816254e2 --- /dev/null +++ b/website/build/docs/blog/2017/04/10/blog-post-two.html @@ -0,0 +1,94 @@ +New Blog Post · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/blog/2017/09/25/testing-rss.html b/website/build/docs/blog/2017/09/25/testing-rss.html new file mode 100644 index 00000000000000..cf78f130d07e74 --- /dev/null +++ b/website/build/docs/blog/2017/09/25/testing-rss.html @@ -0,0 +1,92 @@ +Adding RSS Support - RSS Truncation Test · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/blog/2017/09/26/adding-rss.html b/website/build/docs/blog/2017/09/26/adding-rss.html new file mode 100644 index 00000000000000..749d8a0420fd26 --- /dev/null +++ b/website/build/docs/blog/2017/09/26/adding-rss.html @@ -0,0 +1,90 @@ +Adding RSS Support · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/blog/2017/10/24/new-version-1.0.0.html b/website/build/docs/blog/2017/10/24/new-version-1.0.0.html new file mode 100644 index 00000000000000..04783dce42af4e --- /dev/null +++ b/website/build/docs/blog/2017/10/24/new-version-1.0.0.html @@ -0,0 +1,89 @@ +New Version 1.0.0 · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/blog/atom.xml b/website/build/docs/blog/atom.xml new file mode 100644 index 00000000000000..80c5925a0c2a7d --- /dev/null +++ b/website/build/docs/blog/atom.xml @@ -0,0 +1,70 @@ + + + https://4d.github.io/docs/alpha/blog + 4D Documentation Blog + 2017-10-24T06:00:00.000Z + https://github.com/jpmonette/feed + + The best place to stay up-to-date with the latest 4D Documentation news and events. + https://4d.github.io/docs/alpha/undefined + © 2021 4D SAS - All rights reserved + + <![CDATA[New Version 1.0.0]]> + https://4d.github.io/docs/alpha/blog/2017/10/24/new-version-1.0.0.html + + 2017-10-24T06:00:00.000Z + This blog post will test file name parsing issues when periods are present.

    ]]>
    + + Eric Nakagawa + http://twitter.com/ericnakagawa + +
    + + <![CDATA[Adding RSS Support]]> + https://4d.github.io/docs/alpha/blog/2017/09/26/adding-rss.html + + 2017-09-26T06:00:00.000Z + This is a test post.

    A whole bunch of other information.

    ]]>
    + + Eric Nakagawa + http://twitter.com/ericnakagawa + +
    + + <![CDATA[Adding RSS Support - RSS Truncation Test]]> + https://4d.github.io/docs/alpha/blog/2017/09/25/testing-rss.html + + 2017-09-25T06:00:00.000Z + 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

    +

    This should be truncated.

    +]]>
    + + Eric Nakagawa + http://twitter.com/ericnakagawa + +
    + + <![CDATA[New Blog Post]]> + https://4d.github.io/docs/alpha/blog/2017/04/10/blog-post-two.html + + 2017-04-10T06:00:00.000Z + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.

    +]]>
    + + Blog Author + http://twitter.com/ + +
    + + <![CDATA[Blog Title]]> + https://4d.github.io/docs/alpha/blog/2016/03/11/blog-post.html + + 2016-03-11T06:00:00.000Z + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.

    +]]>
    + + Blog Author + http://twitter.com/ + +
    +
    \ No newline at end of file diff --git a/website/build/docs/blog/feed.xml b/website/build/docs/blog/feed.xml new file mode 100644 index 00000000000000..635f5d2bcfbeb2 --- /dev/null +++ b/website/build/docs/blog/feed.xml @@ -0,0 +1,56 @@ + + + + 4D Documentation Blog + https://4d.github.io/docs/alpha/blog + The best place to stay up-to-date with the latest 4D Documentation news and events. + Tue, 24 Oct 2017 06:00:00 GMT + https://validator.w3.org/feed/docs/rss2.html + https://github.com/jpmonette/feed + + 4D Documentation Blog + https://4d.github.io/docs/alpha/undefined + https://4d.github.io/docs/alpha/blog + + © 2021 4D SAS - All rights reserved + + <![CDATA[New Version 1.0.0]]> + https://4d.github.io/docs/alpha/blog/2017/10/24/new-version-1.0.0.html + https://4d.github.io/docs/alpha/blog/2017/10/24/new-version-1.0.0.html + Tue, 24 Oct 2017 06:00:00 GMT + This blog post will test file name parsing issues when periods are present.

    ]]>
    +
    + + <![CDATA[Adding RSS Support]]> + https://4d.github.io/docs/alpha/blog/2017/09/26/adding-rss.html + https://4d.github.io/docs/alpha/blog/2017/09/26/adding-rss.html + Tue, 26 Sep 2017 06:00:00 GMT + This is a test post.

    A whole bunch of other information.

    ]]>
    +
    + + <![CDATA[Adding RSS Support - RSS Truncation Test]]> + https://4d.github.io/docs/alpha/blog/2017/09/25/testing-rss.html + https://4d.github.io/docs/alpha/blog/2017/09/25/testing-rss.html + Mon, 25 Sep 2017 06:00:00 GMT + 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

    +

    This should be truncated.

    +]]>
    +
    + + <![CDATA[New Blog Post]]> + https://4d.github.io/docs/alpha/blog/2017/04/10/blog-post-two.html + https://4d.github.io/docs/alpha/blog/2017/04/10/blog-post-two.html + Mon, 10 Apr 2017 06:00:00 GMT + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.

    +]]>
    +
    + + <![CDATA[Blog Title]]> + https://4d.github.io/docs/alpha/blog/2016/03/11/blog-post.html + https://4d.github.io/docs/alpha/blog/2016/03/11/blog-post.html + Fri, 11 Mar 2016 06:00:00 GMT + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus elementum massa eget nulla aliquet sagittis. Proin odio tortor, vulputate ut odio in, ultrices ultricies augue. Cras ornare ultrices lorem malesuada iaculis. Etiam sit amet libero tempor, pulvinar mauris sed, sollicitudin sapien.

    +]]>
    +
    +
    +
    \ No newline at end of file diff --git a/website/build/docs/blog/index.html b/website/build/docs/blog/index.html new file mode 100644 index 00000000000000..959c3b9ab8d204 --- /dev/null +++ b/website/build/docs/blog/index.html @@ -0,0 +1,95 @@ +Blog · 4D Documentation

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/css/main.css b/website/build/docs/css/main.css new file mode 100644 index 00000000000000..574a49f14c380e --- /dev/null +++ b/website/build/docs/css/main.css @@ -0,0 +1 @@ +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}body{color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:16px;line-height:1.5;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;word-wrap:break-word}*{box-sizing:border-box}b,strong{font-weight:600}[type=checkbox]{box-sizing:border-box;padding:0}a,a:hover{color:#004289}a:hover{text-decoration:none}a:active,a:hover{outline-width:0}a:not([href]){color:inherit;text-decoration:none}p{margin-bottom:1em;margin-top:0}h1,h2,h3,h4,h5,h6{color:inherit;font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:1.5em}h1{font-size:32px}h2{font-size:24px}h3{font-size:20px}h4{font-size:16px}h5{font-size:14px}h6{font-size:13.6px}ol,ul{margin-bottom:1em;margin-top:0;padding-left:2em}ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin-bottom:0;margin-top:0}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}li{word-wrap:break-all}li>p{margin-top:1em}li+li{margin-top:.25em}img{border-style:none;box-sizing:content-box;max-width:100%}img[align=right]{padding-left:1.25em}img[align=left]{padding-right:1.25em}table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:16px;margin-top:0;overflow:auto;width:100%}table tr{background-color:transparent;border-top:1px solid #dfe2e5}table tr:nth-child(2n){background-color:#f6f8fa}table td,table th{border:1px solid #dfe2e5;padding:6px 13px}table th{background-color:inherit;font-weight:600}table td,table th{color:inherit}blockquote{color:#6a737d;font-size:16px;margin:0 0 16px;padding:0 1em}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}code{background-color:rgba(27,31,35,.05);border-radius:3px;color:inherit;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:85%;margin:0;padding:3.2px 6.4px}pre{margin-bottom:16px}pre code{background-color:transparent;border:0;display:inline;font-size:85%;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0;white-space:pre;word-break:normal;word-wrap:normal}kbd{background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;display:inline-block;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:68.75%;line-height:10px;padding:3px 5px;vertical-align:middle}hr{border:1px solid #dfe2e5;box-sizing:content-box;margin:1.5em 0;overflow:hidden;padding:0}hr:after,hr:before{content:"";display:table}hr:after{clear:both}body{background-color:#fff;min-height:100vh;text-rendering:optimizeLegibility}@media only screen and (min-width:736px){body{display:flex;flex-direction:column}}article:after,article:before{content:"";display:table}article:after{clear:both}article>:first-child{margin-top:0}article>:last-child{margin-bottom:0}article iframe,article p img{display:block;margin-left:auto;margin-right:auto;max-width:100%}.anchor{display:block;position:relative;top:-80px}.hash-link{line-height:1;margin-left:-20px;opacity:0;padding-right:4px;transition:opacity .3s}.hash-link:hover{opacity:1!important;transition:none}.hash-link .hash-link-icon{vertical-align:middle}.button{border:1px solid #004289;border-radius:3px;color:#004289;display:inline-block;font-size:14px;font-weight:400;line-height:1.2em;padding:10px;text-decoration:none!important;text-transform:uppercase;transition:background .3s,color .3s}.button:hover{background:#004289;color:#fff}h1:hover .hash-link,h2:hover .hash-link,h3:hover .hash-link,h4:hover .hash-link{opacity:.5;transition:none}blockquote{background-color:rgba(255,229,100,.3);border-left:8px solid #ffe564;padding:15px 30px 15px 15px}.wrapper{margin:0 auto;max-width:1100px;padding:0 20px}.wrapper blockquote>p:first-child{padding-top:0}.center{display:block}.center,.homeContainer{text-align:center}.homeContainer .homeWrapper{padding:2em 10px}.homeContainer .homeWrapper .wrapper{margin:0 auto;max-width:900px;padding:0 20px}.homeContainer .homeWrapper .projectLogo img{height:100px;margin-bottom:0}.homeContainer .homeWrapper #project_title{font-size:300%;letter-spacing:-.08em;line-height:1em;margin-bottom:80px}.homeContainer .homeWrapper #project_tagline{font-size:200%;letter-spacing:-.04em;line-height:1em}.projectLogo{display:none;pointer-events:none}.projectLogo img{height:100px;margin-bottom:0}.projectIntro{margin:40px 0}.projectTitle{color:#004289;font-size:250%;line-height:1em}.projectTitle>small{display:block;font-weight:400;font-size:50%;line-height:1em;margin:.7em 0 1.3em}@media only screen and (min-width:480px){.projectTitle{font-size:300%;margin:.3em 0}.projectLogo img{height:200px;margin-bottom:10px}.homeContainer .homeWrapper{padding-left:10px;padding-right:10px}}@media only screen and (min-width:736px){.homeContainer .homeWrapper{position:relative}.homeContainer .homeWrapper #inner{max-width:600px;padding-right:40px}}@media only screen and (min-width:1200px){.homeContainer .homeWrapper #inner{max-width:750px}.homeContainer .homeWrapper .projectLogo{align-items:center;bottom:0;display:flex;justify-content:flex-end;left:0;padding:2em 100px 4em;position:absolute;right:0;top:0}.homeContainer .homeWrapper .projectLogo img{height:100%;max-height:250px}}@media only screen and (min-width:1500px){.homeContainer .homeWrapper #inner{max-width:1100px;padding-bottom:40px;padding-top:40px}.wrapper{max-width:1400px}}.mainContainer{flex:1 1 0%;max-width:100%;padding:40px 0}.mainContainer .wrapper{text-align:left}.mainContainer .wrapper .allShareBlock{padding:10px 0}.mainContainer .wrapper .allShareBlock .pluginBlock{margin:12px 0;padding:0}.mainContainer .wrapper .post{position:relative}.mainContainer .wrapper .post.basicPost{margin-top:30px}.mainContainer .wrapper .post .postHeader{margin-bottom:16px}.mainContainer .wrapper .post .postHeaderTitle{margin-top:0;padding:0}.docsContainer .wrapper .post .postHeader:before,.docsContainer .wrapper .post .postHeaderTitle:before{content:"";display:block;height:90px;margin-top:-90px;visibility:hidden;pointer-events:none}.mainContainer .wrapper .post .postSocialPlugins{padding-top:1em}.mainContainer .wrapper .post .docPagination{background:#004289;bottom:0;left:0;position:absolute;right:0}.mainContainer .wrapper .post .docPagination .pager{display:inline-block;width:50%}.mainContainer .wrapper .post .docPagination .pagingNext{float:right;text-align:right}.mainContainer .wrapper .post .docPagination a{border:none;color:#fff;display:block;padding:4px 12px}.mainContainer .wrapper .post .docPagination a:hover{background-color:#f9f9f9;color:#393939}.mainContainer .wrapper .post .docPagination a .pagerLabel{display:inline}.mainContainer .wrapper .post .docPagination a .pagerTitle{display:none}@media only screen and (min-width:480px){.mainContainer .wrapper .post .docPagination a .pagerLabel{display:none}.mainContainer .wrapper .post .docPagination a .pagerTitle{display:inline}}@media only screen and (min-width:1024px){.mainContainer .wrapper .post{display:block}.mainContainer .wrapper .posts .post{width:100%}}@media only screen and (max-width:1023px){.docsContainer .wrapper .post .postHeader:before,.docsContainer .wrapper .post .postHeaderTitle:before{content:"";display:block;height:200px;margin-top:-200px;visibility:hidden;pointer-events:none}}.fixedHeaderContainer{background:#004289;color:#fff;min-height:50px;padding:8px 0;position:fixed;width:100%;z-index:9999;transform:translateZ(0)}@media only screen and (min-width:1024px){.fixedHeaderContainer{flex-shrink:0}}.fixedHeaderContainer a{align-items:center;border:0;color:#fff;display:flex;flex-flow:row nowrap;height:34px;z-index:10000}.fixedHeaderContainer header{display:flex;flex-flow:row nowrap;position:relative;text-align:left}.fixedHeaderContainer header img{height:100%;margin-right:10px}.fixedHeaderContainer header .headerTitle{font-size:1.25em;margin:0}.fixedHeaderContainer header .headerTitleWithLogo{display:block;font-size:1.25em;line-height:18px;margin:0;position:relative;z-index:9999}.fixedHeaderContainer header h3{color:#fff;font-size:16px;margin:0 0 0 10px;text-decoration:underline}@media (max-width:480px){.headerTitle{font-size:17px}.headerTitleWithLogo{display:none!important}}.promoSection{display:flex;flex-flow:column wrap;font-size:125%;line-height:1.6em;position:relative;z-index:99}.promoSection .promoRow{padding:10px 0}.promoSection .promoRow .pluginWrapper{display:block}.promoSection .promoRow .pluginWrapper.ghStarWrapper,.promoSection .promoRow .pluginWrapper.ghWatchWrapper{height:28px}.promoSection .promoRow .pluginRowBlock{display:flex;flex-wrap:wrap;justify-content:center;margin:0 -2px}.promoSection .promoRow .pluginRowBlock .pluginWrapper{padding:0 2px}.promoSection .promoRow .pluginRowBlock iframe{margin-left:2px;margin-top:5px}input[type=search]{-moz-appearance:none;-webkit-appearance:none}.navSearchWrapper{align-items:center;align-self:center;display:flex;justify-content:center;padding-left:10px;position:absolute;right:10px;top:10px}.navSearchWrapper:before{border:3px solid #e5e5e5;border-radius:50%;content:" ";display:block;height:6px;left:15px;position:absolute;top:50%;transform:translateY(-58%);width:6px;z-index:1}.navSearchWrapper:after{background:#e5e5e5;content:" ";height:7px;left:24px;position:absolute;top:55%;transform:rotate(-45deg);width:3px;z-index:1}.navSearchWrapper .aa-dropdown-menu{background:#f9f9f9;border:3px solid rgba(57,57,57,.25);color:#393939;font-size:14px;left:auto!important;line-height:1.2em;right:0!important}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--category-header{background:#004289;color:#fff;font-size:14px;font-weight:400}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight{background-color:#004289;color:#fff}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--subcategory-column .algolia-docsearch-suggestion--highlight,.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--title .algolia-docsearch-suggestion--highlight{color:#004289}.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion--subcategory-column,.navSearchWrapper .aa-dropdown-menu .algolia-docsearch-suggestion__secondary{border-color:rgba(57,57,57,.3)}input#search_input_react{background-color:rgba(0,0,0,.2);border:none;border-radius:20px;color:#fff;font-size:14px;font-weight:300;line-height:20px;outline:none;padding-left:25px;position:relative;transition:width .5s ease;width:170px}.navSearchWrapper:before{left:24px}.navSearchWrapper:after{left:35px}input#search_input_react:active,input#search_input_react:focus{color:#fff;width:220px}.navigationSlider .slidingNav .navSearchWrapper .algolia-docsearch-footer a{height:auto}@media only screen and (max-width:735px){.navSearchWrapper{width:40%}}input::-moz-placeholder{color:#e5e5e5}input:-ms-input-placeholder{color:#e5e5e5}input::-ms-input-placeholder{color:#e5e5e5}input::placeholder{color:#e5e5e5}.hljs{padding:1.25rem 1.5rem}.gridBlock{padding:0}.gridBlock>*{box-sizing:border-box}.gridBlock .fourByGridBlock img,.gridBlock .threeByGridBlock img,.gridBlock .twoByGridBlock img{max-width:100%}.gridBlock .gridClear{clear:both}@media only screen and (max-width:735px){.gridBlock .fourByGridBlock{flex:1 0 26%}}@media only screen and (min-width:736px){.gridBlock{display:flex;flex-direction:row;flex-wrap:wrap}.gridBlock>*{margin:0 12px}.gridBlock>:first-child{margin-left:0}.gridBlock>:last-child{margin-right:0}.gridBlock .twoByGridBlock{flex:1 0 40%}.gridBlock .threeByGridBlock{flex:1 0 26%}.gridBlock .fourByGridBlock{flex:1 0 20%}h2+.gridBlock{padding-top:20px}}@media only screen and (min-width:1400px){.gridBlock{display:flex;flex-direction:row;flex-wrap:wrap}}.alignCenter{text-align:center}.alignRight{text-align:right}.imageAlignSide{display:flex;flex-flow:row wrap}.blockImage{max-width:730px}.imageAlignSide .blockImage{flex:0 1 500px;max-width:500px}@media only screen and (max-width:735px){.imageAlignSide .blockImage{display:none}}.imageAlignSide .blockContent{flex:1 1}.imageAlignBottom .blockImage{margin:0 auto 20px;max-width:730px}.imageAlignBottom.alignCenter .blockImage{margin-left:auto;margin-right:auto}.imageAlignTop .blockImage{margin-bottom:20px;max-width:80px}.imageAlignTop.alignCenter .blockImage{margin-left:auto;margin-right:auto}.imageAlignRight .blockImage{margin-left:40px}.imageAlignLeft .blockImage{margin-right:40px}.container .gridBlock .blockContent p{padding:0}.container .wrapper .alignCenter h2{text-align:center}.container .wrapper .imageAlignSide h2{text-align:left}.container .wrapper .imageAlignSide p{margin:0 0 40px;max-width:560px}.highlightBackground{background:rgba(153,66,79,.7);color:#fff}.highlightBackground a{font-weight:800}.container.highlightBackground .wrapper h1,.container.highlightBackground .wrapper h2,.container.highlightBackground .wrapper h3,.container.highlightBackground .wrapper h4,.container.highlightBackground .wrapper h5,.highlightBackground a{border-color:#fff;color:#fff}.lightBackground{background:#f7f7f7}.darkBackground{background:grey;color:#fff}.darkBackground a,.darkBackground code{color:#d6b3b8}.container.darkBackground .wrapper h1,.container.darkBackground .wrapper h2,.container.darkBackground .wrapper h3,.container.darkBackground .wrapper h4,.container.darkBackground .wrapper h5{border-color:#fff;color:#fff}.container.paddingAll{padding:40px}.container.paddingBottom{padding-bottom:80px}.container.paddingLeft{padding-left:40px}.container.paddingRight{padding-right:40px}.container.paddingTop{padding-top:80px}@media only screen and (max-width:735px){.container.paddingBottom{padding-bottom:40px}.container.paddingTop{padding-top:20px}}@media only screen and (max-width:1023px){.responsiveList .blockContent{position:relative}.responsiveList .blockContent>div{padding-left:20px}.responsiveList .blockContent:before{content:"\2022";position:absolute}}.navigationSlider .navSlideout{cursor:pointer;padding-top:4px;position:absolute;right:10px;top:0;transition:top .3s;z-index:101}.navigationSlider .slidingNav{bottom:auto;box-sizing:border-box;left:0;position:fixed;right:0;top:0}.navigationSlider .slidingNav.slidingNavActive{height:auto;padding-top:42px;width:300px}.navigationSlider .slidingNav ul{background:#696969;box-sizing:border-box;color:#fff;display:flex;flex-wrap:nowrap;list-style:none;margin-top:50px;padding:0;width:100%}.navigationSlider .slidingNav.slidingNavActive ul{display:block}.navigationSlider .slidingNav ul li{flex:1 1 auto;margin:0;text-align:center;white-space:nowrap}.navigationSlider .slidingNav ul li a{align-items:center;box-sizing:border-box;color:#004289;color:inherit;display:flex;font-size:.9em;height:auto;height:50px;justify-content:center;margin:0;padding:10px;transition:background-color .3s}.navigationSlider .slidingNav ul li.siteNavGroupActive>a,.navigationSlider .slidingNav ul li.siteNavItemActive>a,.navigationSlider .slidingNav ul li>a:focus,.navigationSlider .slidingNav ul li>a:hover{background-color:#004289}.languages-icon{width:20px}#languages-dropdown{pointer-events:none;position:absolute;width:100%}#languages-dropdown.visible{display:flex}#languages-dropdown.hide{display:none}#languages-dropdown-items{background-color:#004289;display:flex;flex-direction:column;min-width:120px;pointer-events:all}#languages li{display:block}.navPusher{left:0;min-height:100%;padding-top:100px;position:relative;z-index:99}.singleRowMobileNav.navPusher{padding-top:50px}.navPusher:after{background:rgba(0,0,0,.4);content:"";height:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .5s,width .1s .5s,height .1s .5s;width:0}@media screen and (min-width:1024px){.navPusher{display:flex;flex-direction:column;min-height:calc(100vh - 50px);padding-top:50px}.navPusher,.navPusher>:first-child{flex-grow:1}}.sliderActive .navPusher:after{height:100%;opacity:1;transition:opacity .5s;width:100%;z-index:100}@media only screen and (max-width:1024px){.reactNavSearchWrapper input#search_input_react{background-color:rgba(242,196,178,.25);border:none;border-radius:20px;box-sizing:border-box;color:#393939;font-size:14px;line-height:20px;outline:none;padding-left:38px;position:relative;transition:background-color .2s cubic-bezier(.68,-.55,.265,1.55),width .2s cubic-bezier(.68,-.55,.265,1.55),color .2s ease;width:100%;height:30px}.reactNavSearchWrapper input#search_input_react:active,.reactNavSearchWrapper input#search_input_react:focus{background-color:#004289;color:#fff}.reactNavSearchWrapper .algolia-docsearch-suggestion--subcategory-inline{display:none}.reactNavSearchWrapper>span{width:100%}.reactNavSearchWrapper .aa-dropdown-menu{font-size:12px;line-height:2em;padding:0;border-width:1px;min-width:500px}.reactNavSearchWrapper .algolia-docsearch-suggestion__secondary{border-top:none}.aa-suggestions{min-height:140px;max-height:60vh;-webkit-overflow-scrolling:touch;overflow-y:scroll}#languages-dropdown{left:0;top:50px}#languages-dropdown-items{background-color:#004289;display:flex;flex-direction:row}}@media only screen and (min-width:1024px){.navSearchWrapper{padding-left:10px;position:relative;right:auto;top:auto}.reactNavSearchWrapper input#search_input_react{height:100%;padding-top:8px;padding-bottom:8px;padding-left:38px}.navSearchWrapper .algolia-autocomplete{display:block}.navigationSlider{height:34px;margin-left:auto;position:relative}.navigationSlider .navSlideout{display:none}.navigationSlider nav.slidingNav{background:none;height:auto;position:relative;right:auto;top:auto;width:auto}.navigationSlider .slidingNav ul{background:none;display:flex;flex-flow:row nowrap;margin:0;padding:0;width:auto}.navigationSlider .slidingNav ul li a{border:0;color:hsla(0,0%,100%,.8);display:flex;font-size:16px;font-size:1em;font-weight:300;height:32px;line-height:1.2em;margin:0;padding:6px 10px}.navigationSlider .slidingNav ul li.siteNavGroupActive a,.navigationSlider .slidingNav ul li.siteNavItemActive a,.navigationSlider .slidingNav ul li a:hover{color:#fff}}@media only screen and (max-width:735px){.navigationSlider .slidingNav ul{overflow-x:auto}.navigationSlider .slidingNav ul::-webkit-scrollbar{display:none}.reactNavSearchWrapper .aa-dropdown-menu{min-width:400px}}@media only screen and (max-width:475px){.reactNavSearchWrapper .aa-dropdown-menu{min-width:300px}}.docMainWrapper .wrapper{padding-left:0;padding-right:0;padding-top:10px}@media only screen and (min-width:1024px){.docMainWrapper{width:100%}.docMainWrapper>*{margin:0 24px}.docMainWrapper>:first-child{margin-left:0}.docMainWrapper>:last-child{margin-right:0}.docMainWrapper .mainContainer{min-width:0}}.edit-page-link{float:right;font-size:10px;font-weight:400;margin-top:3px;text-decoration:none}@media only screen and (max-width:1023px){.edit-page-link{display:none}}.docLastUpdate{font-size:13px;font-style:italic;margin:20px 0;text-align:right}.docs-prevnext{margin:20px 0}.docs-prevnext:after{clear:both;content:" ";display:table}.docs-next{float:right}.docs-prev{float:left}@media only screen and (max-width:735px){.docs-next{clear:both;float:left}.docs-next,.docs-prev{margin:10px 0}.arrow-next{float:right;margin-left:10px}.arrow-prev{float:left;margin-right:10px}.function-name-prevnext{width:200px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.hide{display:none}.collapsible{cursor:pointer}.collapsible .arrow{float:right;margin-right:8px;margin-top:-4px;transform:rotate(90deg);transition:transform .2s linear}.collapsible .arrow.rotate{transform:rotate(180deg)}@media only screen and (max-width:1023px){.docsNavContainer{background:#fff;left:0;position:fixed;width:100%;z-index:100}}@media only screen and (min-width:1024px){.docsNavContainer{flex:0 0 240px;height:calc(100vh - 50px);position:-webkit-sticky;position:sticky;overflow-y:auto;top:50px}}.docsSliderActive.docsNavContainer{box-sizing:border-box;height:100%;-webkit-overflow-scrolling:touch;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding-bottom:50px}.docsNavContainer .toc .navBreadcrumb{background-color:#f1f1f1;box-sizing:border-box;display:flex;flex-flow:row nowrap;font-size:12px;height:48px;overflow:hidden;padding:8px 20px}.docsNavContainer .toc .navWrapper{padding:0}@media only screen and (min-width:1024px){.docsNavContainer .toc .navBreadcrumb{display:none}.navBreadcrumb h2{padding:0 10px}.separateOnPageNav .docsNavContainer{flex:0 0 240px}}.navBreadcrumb a,.navBreadcrumb span{border:0;color:#393939}@media only screen and (max-width:735px){.anchor{top:-144px}}@media only screen and (min-width:1024px){.toc{padding:40px 0}}.toc section{padding:0;position:relative}.toc section .navGroups{display:none;padding:48px 20px 60px}.toc .toggleNav{color:#393939;position:relative}.toc .toggleNav .navToggle{cursor:pointer;height:32px;margin-right:10px;position:relative;text-align:left;width:18px}.hamburger-menu{position:absolute;top:6px;width:100%}.line1,.line2,.line3{width:100%;height:3px;background-color:#393939;margin:3px 0;transition:.4s;border-radius:10px}.docsSliderActive .hamburger-menu{top:12px}.docsSliderActive .line1{position:absolute;top:50%;transform:rotate(-45deg)}.docsSliderActive .line2{display:none}.docsSliderActive .line3{position:absolute;top:50%;transform:rotate(45deg)}.toggleNav h2 i{padding:0 4px}.toc .toggleNav .navGroup{margin-bottom:16px}.toc .toggleNav .subNavGroup{margin-bottom:0}.toc .toggleNav .navGroup .navGroupCategoryTitle{color:#393939;font-size:18px;font-weight:500;line-height:1.2em;margin-bottom:8px;margin-top:0}.toc .toggleNav .navGroup .navGroupSubcategoryTitle{color:#393939;font-size:14px;font-weight:500;line-height:1.5;margin-bottom:0;margin-top:0;padding:4px 0}.toc .toggleNav .navGroup .navListItem{margin:0}.toc .toggleNav .navGroup h3 i:not(:empty){box-sizing:border-box;color:rgba(57,57,57,.5);display:inline-block;height:16px;margin-right:10px;text-align:center;transition:color .2s;width:16px}.toc .toggleNav ul{padding:0 8px}.docsSliderActive .toc .toggleNav ul{padding-left:0}.toc .toggleNav ul li{list-style-type:none;padding:0}.toc .toggleNav ul li a{border:none;color:#717171;display:block;font-size:14px;padding:4px 0;transition:color .3s}.toc .toggleNav ul li.navListItemActive a,.toc .toggleNav ul li a:focus,.toc .toggleNav ul li a:hover{color:#004289}.docsSliderActive .toc .navBreadcrumb,.tocActive .navBreadcrumb{border-bottom:1px solid #ccc;margin-bottom:20px;position:fixed;width:100%}.toc .toggleNav .navBreadcrumb h2{border:0;flex-grow:1;font-size:16px;font-weight:600;line-height:32px;margin:0;padding:0}.docsSliderActive .toc section .navGroups{display:block;padding-top:60px}.tocToggler{cursor:pointer;height:32px;line-height:32px;margin-right:-10px;padding:0 10px}.icon-toc{box-sizing:border-box;display:inline-block;line-height:normal;position:relative;top:-1px;vertical-align:middle}.icon-toc,.icon-toc:after,.icon-toc:before{background-color:currentColor;border:1px solid;border-radius:50%;box-sizing:border-box;height:4px;width:4px}.icon-toc:after,.icon-toc:before{content:"";position:absolute}.icon-toc:before{left:-1px;top:-7px}.icon-toc:after{left:-1px;top:5px}.tocActive .icon-toc{border-radius:0;height:16px;transform:rotate(45deg);width:3px}.tocActive .icon-toc:before{border-radius:0;height:3px;left:50%;top:50%;transform:translate(-50%,-50%);width:16px}.tocActive .icon-toc:after{content:""}@media only screen and (min-width:1024px){.docMainWrapper{display:flex;flex-flow:row nowrap}.docMainWrapper .wrapper{padding-top:0;padding-left:0;padding-right:0}}.onPageNav{display:none;margin-bottom:40px}.onPageNav::-webkit-scrollbar{width:7px}.onPageNav::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.onPageNav::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.onPageNav::-webkit-scrollbar-thumb:hover{background:#555}.onPageNav a{color:#717171}.onPageNav .toc-headings>li>a.active,.onPageNav .toc-headings>li>a.hover{font-weight:600;color:#004289}.onPageNav ul{list-style:none}.onPageNav ul li{font-size:12px;line-height:16px;padding-bottom:8px}.onPageNav ul ul{padding:8px 0 0 20px}.onPageNav ul ul li{padding-bottom:5px}@media only screen and (min-width:1024px){.toc section .navGroups{display:block;padding:8px 0 0}.navBreadcrumb h2{padding:0 10px}}@supports ((position: -webkit-sticky) or (position: sticky)){@media only screen and (max-width:1023px){.tocActive .onPageNav{background:#fff;bottom:0;display:block;left:0;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding:0 20px;position:fixed;right:0;top:148px;z-index:10;margin-bottom:0}.tocActive .singleRowMobileNav .onPageNav{top:98px}.tocActive .navBreadcrumb h2,.tocActive .navToggle{visibility:hidden}.tocActive .onPageNav>.toc-headings{padding:12px 0}}@media only screen and (min-width:1024px){.separateOnPageNav .headerWrapper.wrapper,.separateOnPageNav .wrapper{max-width:1400px}.separateOnPageNav .toc{width:auto}.separateOnPageNav.sideNavVisible .navPusher .mainContainer{flex:1 auto;max-width:100%;min-width:0}.onPageNav{align-self:flex-start;display:block;flex:0 0 240px;max-height:calc(100vh - 90px);overflow-y:auto;position:-webkit-sticky;position:sticky;top:90px}.onPageNav>.toc-headings{border-left:1px solid #e0e0e0;padding:10px 0 2px 15px}.tocToggler{display:none}}}.blog .wrapper{max-width:1100px}.blogContainer .posts .post{border-bottom:1px solid #e0e0e0;border-radius:3px;margin-bottom:20px;padding-bottom:20px}.blogContainer .postHeader{margin-bottom:10px}.blogContainer .postHeaderTitle{margin-top:0}.blogContainer .postHeader p.post-meta{margin-bottom:10px;padding:0}.blogContainer .postHeader .authorBlock{display:flex}.blogContainer .postHeader .post-authorName{color:rgba(57,57,57,.7);display:flex;flex-direction:column;font-size:14px;font-weight:400;justify-content:center;margin-right:10px;margin-top:0;margin-bottom:0;padding:0}.blogContainer .postHeader .authorPhoto{border-radius:50%;height:30px;overflow:hidden;width:30px}.blogContainer .postHeader .authorPhoto.authorPhotoBig{height:50px;width:50px}.blog-recent{margin:20px 0}.blog-recent>a{float:left}@media only screen and (max-width:735px){.blog-recent{height:40px}}.blogSocialSection{display:block;padding:36px 0}.blogSocialSection .blogSocialSectionItem{padding-bottom:5px}.fb-like{display:block;margin-bottom:20px;width:100%}.more-users{margin:0 auto;max-width:560px;text-align:center}.productShowcaseSection{padding:0 20px;text-align:center}.productShowcaseSection.paddingTop{padding-top:20px}.productShowcaseSection.paddingBottom{padding-bottom:80px}.productShowcaseSection h2{color:#004289;font-size:30px;line-height:1em;margin-top:20px;padding:10px 0;text-align:center}.productShowcaseSection p{margin:0 auto;max-width:560px;padding:.8em 0}.productShowcaseSection .logos{align-items:center;display:flex;flex-flow:row wrap;justify-content:center;padding:20px}.productShowcaseSection .logos img{max-height:110px;padding:20px;width:110px}@media only screen and (max-width:735px){.productShowcaseSection .logos img{max-height:64px;padding:20px;width:64px}}.showcaseSection{margin:0 auto;max-width:900px}.showcaseSection,.showcaseSection .prose h1{text-align:center}.showcaseSection .prose{margin:0 auto;max-width:560px;text-align:center}.showcaseSection .logos{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.showcaseSection .logos img{max-height:128px;padding:20px;width:128px}@media only screen and (max-width:735px){.showcaseSection .logos img{max-height:64px;padding:20px;width:64px}}.nav-footer{background:#20232a;border:none;color:#202020;font-size:15px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:400;line-height:24px;padding-bottom:2em;padding-top:2em;position:relative}@media only screen and (min-width:1024px){.nav-footer{flex-shrink:0}}.nav-footer .sitemap{display:flex;justify-content:space-between;margin:0 auto 3em;max-width:1080px}.nav-footer .sitemap div{flex:1}.nav-footer .sitemap .nav-home{display:table;height:72px;margin:-12px 20px 0 0;opacity:.4;padding:10px;transition:opacity .15s ease-in-out;width:72px}.nav-footer .sitemap .nav-home:focus,.nav-footer .sitemap .nav-home:hover{opacity:1}@media only screen and (max-width:735px){.nav-footer .sitemap{display:flex;flex-direction:column;margin:0 2em 3em;width:calc(100% - 4em)}.nav-footer .sitemap>div{margin-bottom:18px}}.nav-footer .sitemap a{color:hsla(0,0%,100%,.6);display:block;margin:2px 0;padding:3px 0}.nav-footer .sitemap a:focus,.nav-footer .sitemap a:hover,.nav-footer .sitemap h5>a:focus,.nav-footer .sitemap h5>a:hover{color:#fff;text-decoration:none}.nav-footer .sitemap h5,.nav-footer .sitemap h6{margin:0 0 10px}.nav-footer .sitemap h5,.nav-footer .sitemap h5>a,.nav-footer .sitemap h6,.nav-footer .sitemap h6>a{color:#fff}.nav-footer .sitemap h5>a,.nav-footer .sitemap h6>a{margin:0 -10px}.nav-footer .fbOpenSource{display:block;margin:1em auto;opacity:.4;transition:opacity .15s ease-in-out;width:170px}.nav-footer .fbOpenSource:hover{opacity:1}.nav-footer .copyright{color:hsla(0,0%,100%,.4);text-align:center}.nav-footer .social{padding:5px 0}.tabs{border-top:1px solid #cfcfcf}.nav-tabs{display:flex;border-bottom:4px solid #e0e0e0;width:100%;padding:0;overflow-x:auto;white-space:nowrap;max-height:100%}.nav-tabs::-webkit-scrollbar{display:none}.tabs .tab-pane:focus{outline:none}.tabs .nav-tabs>div{font-size:14px;line-height:1.14286;padding:12px 16px;text-decoration:none;display:block;cursor:pointer}.tabs .nav-tabs>div.active{border-bottom:4px solid #004289}.tab-pane{display:none}.tab-pane.active{display:block}.tab-pane>pre{white-space:pre-wrap}.tab-pane>pre>code{margin-top:0;border-radius:0;box-shadow:none}pre{position:relative}pre .btnIcon{position:absolute;top:4px;z-index:2;cursor:pointer;border:1px solid transparent;padding:0;color:grey;background-color:transparent;height:30px;transition:all .25s ease-out}pre .btnIcon:hover{text-decoration:none}.btnIcon__body{align-items:center;display:flex}.btnIcon svg{fill:currentColor;margin-right:.4em}.btnIcon__label{font-size:11px}.btnClipboard{right:10px}em,i{font-style:italic}a{text-decoration:none;color:#1e90ff}summary{color:grey;font-size:12px}details{font-size:12px;font-color:grey}summary::-webkit-details-marker{color:grey}.headerTitle{background:none}.copyright{font-size:12px;text-align:center}a.cp2{text-decoration:underline;color:grey}a.cp2:hover{color:#fff}.blockImage{height:110px}.imageAlignTop .blockImage{max-width:60%}@@media only screen and (max-width: 735px){.showcase .link{height:134px}.showcase .link img{max-height:64px;padding:20px;width:64px}}.announcement{background-color:#20232a;color:#fff;font-weight:700;font-size:24px;padding:48px;margin:0 auto -40px;text-align:center}.announcement-inner{margin:0 auto;max-width:768px}.index-hero{background-color:#2b3137;padding:48px}.index-hero-inner{margin:0 auto;max-width:1100px;padding:0 20px}.index-hero-project-tagline{color:#fff;font-size:54px;font-weight:700;margin:0}.doc-updates,.index-hero-project-keywords{color:#004289}.doc-updates{text-align:center;font-style:italic}@-webkit-keyframes jackInTheBox{0%{opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{opacity:1;transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{opacity:1;transform:scale(1)}}.index-hero-logo{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox;float:left;margin-top:0;padding:0;width:350px}.index-ctas{margin-top:24px}.index-ctas-get-started-button{border-radius:8px;border-width:2px;color:#fff;font-size:24px;font-weight:700;margin-right:24px;padding:18px 36px}.index-ctas-github-button{vertical-align:sub}@media only screen and (max-width:768px){.announcement{font-size:18px;padding:20px}.index-hero{padding:20px}.index-hero-inner{padding:0}.index-hero-project-tagline{font-size:36px;text-align:center}.index-hero-logo{display:block;float:none;margin:0 auto}.index-ctas{text-align:center}.index-ctas-github-button{display:none}.docImage{margin:3rem auto;max-width:400px}} \ No newline at end of file diff --git a/website/build/docs/css/prism.css b/website/build/docs/css/prism.css new file mode 100644 index 00000000000000..2a84ffb1855ad8 --- /dev/null +++ b/website/build/docs/css/prism.css @@ -0,0 +1,115 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * Modified prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ + +code[class*='language-'], +pre[class*='language-'] { + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +/* Inline code */ +:not(pre) > code[class*='language-'] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #999; +} + +.namespace { + opacity: 0.7; +} + +.token.property, +.token.tag, +.token.boolean, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} + +.token.selector, +.token.number, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} + +.token.function, +.token.class-name { + color: #dd4a68; +} + +.token.regex, +.token.important, +.token.variable { + color: #e90; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} diff --git a/website/build/docs/de/index.html b/website/build/docs/de/index.html new file mode 100644 index 00000000000000..f78fa8a5e06adc --- /dev/null +++ b/website/build/docs/de/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/de/searchAPI.html b/website/build/docs/de/searchAPI.html new file mode 100644 index 00000000000000..6e7213ebb781cd --- /dev/null +++ b/website/build/docs/de/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/en/index.html b/website/build/docs/en/index.html new file mode 100644 index 00000000000000..5462bf7248b7c1 --- /dev/null +++ b/website/build/docs/en/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/en/searchAPI.html b/website/build/docs/en/searchAPI.html new file mode 100644 index 00000000000000..21702059d85d0d --- /dev/null +++ b/website/build/docs/en/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/es/index.html b/website/build/docs/es/index.html new file mode 100644 index 00000000000000..a6647fa8f52b3f --- /dev/null +++ b/website/build/docs/es/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/es/searchAPI.html b/website/build/docs/es/searchAPI.html new file mode 100644 index 00000000000000..a77febbc87c458 --- /dev/null +++ b/website/build/docs/es/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/fr/index.html b/website/build/docs/fr/index.html new file mode 100644 index 00000000000000..3bf68f84d6de6f --- /dev/null +++ b/website/build/docs/fr/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation pour Développeurs 4D

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/fr/searchAPI.html b/website/build/docs/fr/searchAPI.html new file mode 100644 index 00000000000000..add7dd59fda424 --- /dev/null +++ b/website/build/docs/fr/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation pour Développeurs 4D

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/img/4DLogo.gif b/website/build/docs/img/4DLogo.gif new file mode 100644 index 00000000000000..9551a5e708713e Binary files /dev/null and b/website/build/docs/img/4DLogo.gif differ diff --git a/website/build/docs/img/4DlogoK.gif b/website/build/docs/img/4DlogoK.gif new file mode 100644 index 00000000000000..5bbcb59c5cd557 Binary files /dev/null and b/website/build/docs/img/4DlogoK.gif differ diff --git a/website/build/docs/img/4d.gif b/website/build/docs/img/4d.gif new file mode 100644 index 00000000000000..72271db3319dff Binary files /dev/null and b/website/build/docs/img/4d.gif differ diff --git a/website/build/docs/img/4dlogo.png b/website/build/docs/img/4dlogo.png new file mode 100644 index 00000000000000..5af016069db147 Binary files /dev/null and b/website/build/docs/img/4dlogo.png differ diff --git a/website/build/docs/img/banner-object.png b/website/build/docs/img/banner-object.png new file mode 100644 index 00000000000000..b54ffbb24bdd54 Binary files /dev/null and b/website/build/docs/img/banner-object.png differ diff --git a/website/build/docs/img/favicon.ico b/website/build/docs/img/favicon.ico new file mode 100644 index 00000000000000..be74abd69ad6a3 Binary files /dev/null and b/website/build/docs/img/favicon.ico differ diff --git a/website/build/docs/img/favicon/favicon.ico b/website/build/docs/img/favicon/favicon.ico new file mode 100644 index 00000000000000..eaced0fd8e0c75 Binary files /dev/null and b/website/build/docs/img/favicon/favicon.ico differ diff --git a/website/build/docs/img/illu_Administration.png b/website/build/docs/img/illu_Administration.png new file mode 100644 index 00000000000000..2b0f80d200dc56 Binary files /dev/null and b/website/build/docs/img/illu_Administration.png differ diff --git a/website/build/docs/img/illu_Core.png b/website/build/docs/img/illu_Core.png new file mode 100644 index 00000000000000..d04904ddf3e853 Binary files /dev/null and b/website/build/docs/img/illu_Core.png differ diff --git a/website/build/docs/img/illu_CoreDevelopment.png b/website/build/docs/img/illu_CoreDevelopment.png new file mode 100644 index 00000000000000..286bf932eb4589 Binary files /dev/null and b/website/build/docs/img/illu_CoreDevelopment.png differ diff --git a/website/build/docs/img/illu_DesktopApplication.png b/website/build/docs/img/illu_DesktopApplication.png new file mode 100644 index 00000000000000..f5a1a5217ea82f Binary files /dev/null and b/website/build/docs/img/illu_DesktopApplication.png differ diff --git a/website/build/docs/img/illu_Extensions.png b/website/build/docs/img/illu_Extensions.png new file mode 100644 index 00000000000000..9e9c2deae85262 Binary files /dev/null and b/website/build/docs/img/illu_Extensions.png differ diff --git a/website/build/docs/img/illu_GettingStarted.png b/website/build/docs/img/illu_GettingStarted.png new file mode 100644 index 00000000000000..4683204837b919 Binary files /dev/null and b/website/build/docs/img/illu_GettingStarted.png differ diff --git a/website/build/docs/img/illu_MobileApplication.png b/website/build/docs/img/illu_MobileApplication.png new file mode 100644 index 00000000000000..eae999264e4ed1 Binary files /dev/null and b/website/build/docs/img/illu_MobileApplication.png differ diff --git a/website/build/docs/img/illu_WebApplication.png b/website/build/docs/img/illu_WebApplication.png new file mode 100644 index 00000000000000..d307b7ab9b874c Binary files /dev/null and b/website/build/docs/img/illu_WebApplication.png differ diff --git a/website/build/docs/img/language.svg b/website/build/docs/img/language.svg new file mode 100644 index 00000000000000..66195932ab03b2 --- /dev/null +++ b/website/build/docs/img/language.svg @@ -0,0 +1,3 @@ + + + diff --git a/website/build/docs/img/logo.png b/website/build/docs/img/logo.png new file mode 100644 index 00000000000000..bda50178e695ae Binary files /dev/null and b/website/build/docs/img/logo.png differ diff --git a/website/build/docs/img/logohome.png b/website/build/docs/img/logohome.png new file mode 100644 index 00000000000000..8b019ba54e76e2 Binary files /dev/null and b/website/build/docs/img/logohome.png differ diff --git a/website/build/docs/img/oss_logo.png b/website/build/docs/img/oss_logo.png new file mode 100644 index 00000000000000..8183e289b139e5 Binary files /dev/null and b/website/build/docs/img/oss_logo.png differ diff --git a/website/build/docs/img/undraw_code_review.svg b/website/build/docs/img/undraw_code_review.svg new file mode 100644 index 00000000000000..4ac4576d9d583d --- /dev/null +++ b/website/build/docs/img/undraw_code_review.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_monitor.svg b/website/build/docs/img/undraw_monitor.svg new file mode 100644 index 00000000000000..eb2f49e40e2829 --- /dev/null +++ b/website/build/docs/img/undraw_monitor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_note_list.svg b/website/build/docs/img/undraw_note_list.svg new file mode 100644 index 00000000000000..308a618de3b636 --- /dev/null +++ b/website/build/docs/img/undraw_note_list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_online.svg b/website/build/docs/img/undraw_online.svg new file mode 100644 index 00000000000000..8f11b3c736436e --- /dev/null +++ b/website/build/docs/img/undraw_online.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_open_source.svg b/website/build/docs/img/undraw_open_source.svg new file mode 100644 index 00000000000000..40336319a793f3 --- /dev/null +++ b/website/build/docs/img/undraw_open_source.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_operating_system.svg b/website/build/docs/img/undraw_operating_system.svg new file mode 100644 index 00000000000000..6a144c2f141e5b --- /dev/null +++ b/website/build/docs/img/undraw_operating_system.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_react.svg b/website/build/docs/img/undraw_react.svg new file mode 100644 index 00000000000000..d924b4a8e41a43 --- /dev/null +++ b/website/build/docs/img/undraw_react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_tweetstorm.svg b/website/build/docs/img/undraw_tweetstorm.svg new file mode 100644 index 00000000000000..977db8cc34d91b --- /dev/null +++ b/website/build/docs/img/undraw_tweetstorm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_typewriter.svg b/website/build/docs/img/undraw_typewriter.svg new file mode 100644 index 00000000000000..b1cef21744ed14 --- /dev/null +++ b/website/build/docs/img/undraw_typewriter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/img/undraw_youtube_tutorial.svg b/website/build/docs/img/undraw_youtube_tutorial.svg new file mode 100644 index 00000000000000..2d66eec8a03724 --- /dev/null +++ b/website/build/docs/img/undraw_youtube_tutorial.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/build/docs/index.html b/website/build/docs/index.html new file mode 100644 index 00000000000000..5462bf7248b7c1 --- /dev/null +++ b/website/build/docs/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/ja/index.html b/website/build/docs/ja/index.html new file mode 100644 index 00000000000000..0a64cfdf5a06d2 --- /dev/null +++ b/website/build/docs/ja/index.html @@ -0,0 +1,66 @@ +4D Documentation · 4D 開発リファレンス

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/ja/searchAPI.html b/website/build/docs/ja/searchAPI.html new file mode 100644 index 00000000000000..49e839c2b99b11 --- /dev/null +++ b/website/build/docs/ja/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · 4D 開発リファレンス

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/js/code-blocks-buttons.js b/website/build/docs/js/code-blocks-buttons.js new file mode 100644 index 00000000000000..8ab3ba0243a3f4 --- /dev/null +++ b/website/build/docs/js/code-blocks-buttons.js @@ -0,0 +1,48 @@ +// Turn off ESLint for this file because it's sent down to users as-is. +/* eslint-disable */ + +window.addEventListener('load', function() { + function button(label, ariaLabel, icon, className) { + const btn = document.createElement('button'); + btn.classList.add('btnIcon', className); + btn.setAttribute('type', 'button'); + btn.setAttribute('aria-label', ariaLabel); + btn.innerHTML = + '
    ' + + icon + + '' + + label + + '' + + '
    '; + return btn; + } + + function addButtons(codeBlockSelector, btn) { + document.querySelectorAll(codeBlockSelector).forEach(function(code) { + code.parentNode.appendChild(btn.cloneNode(true)); + }); + } + + const copyIcon = + ''; + + addButtons( + '.hljs', + button('Copy', 'Copy code to clipboard', copyIcon, 'btnClipboard'), + ); + + const clipboard = new ClipboardJS('.btnClipboard', { + target: function(trigger) { + return trigger.parentNode.querySelector('code'); + }, + }); + + clipboard.on('success', function(event) { + event.clearSelection(); + const textEl = event.trigger.querySelector('.btnIcon__label'); + textEl.textContent = 'Copied'; + setTimeout(function() { + textEl.textContent = 'Copy'; + }, 2000); + }); +}); \ No newline at end of file diff --git a/website/build/docs/js/codetabs.js b/website/build/docs/js/codetabs.js new file mode 100644 index 00000000000000..4fcdc46131b31d --- /dev/null +++ b/website/build/docs/js/codetabs.js @@ -0,0 +1,31 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +// Turn off ESLint for this file because it's sent down to users as-is. + +/* eslint-disable */ +window.addEventListener('load', function () { + // add event listener for all tab + document.querySelectorAll('.nav-link').forEach(function (el) { + el.addEventListener('click', function (e) { + var groupId = e.target.getAttribute('data-group'); + document + .querySelectorAll('.nav-link[data-group='.concat(groupId, ']')) + .forEach(function (el) { + el.classList.remove('active'); + }); + document + .querySelectorAll('.tab-pane[data-group='.concat(groupId, ']')) + .forEach(function (el) { + el.classList.remove('active'); + }); + e.target.classList.add('active'); + document + .querySelector('#'.concat(e.target.getAttribute('data-tab'))) + .classList.add('active'); + }); + }); +}); diff --git a/website/build/docs/js/comment.js b/website/build/docs/js/comment.js new file mode 100644 index 00000000000000..37dd5dd2ac144e --- /dev/null +++ b/website/build/docs/js/comment.js @@ -0,0 +1,67 @@ +function getFlags($code){ + $code = $code.toUpperCase(); + if($code == 'DE') return '🇩🇪'; //'(de)' + if($code == 'EN') return ''; //'🇬🇧' + if($code == 'ES') return '🇪🇸'; + if($code == 'FR') return '🇫🇷'; + if($code == 'JA') return '🇯🇵'; + if($code == 'PT') return '🇵🇹'; + //if($code == 'US') return '🇺🇸'; + return 'ðŸ³'; +} +function getCommentTrad($code){ + $code = $code.toUpperCase(); + if($code == 'DE') return 'Comment'; + if($code == 'EN') return 'Comment'; + if($code == 'ES') return 'Comment'; + if($code == 'FR') return 'Comment'; + if($code == 'JA') return 'Comment'; + if($code == 'PT') return 'Comment'; + //if($code == 'US') return 'Comment'; + return 'Comment'; +} +function replaceLast(string, find, replace) { + var lastIndex = string.lastIndexOf(find); + if (lastIndex === -1) { + return string; + } + var beginString = string.substring(0, lastIndex); + var endString = string.substring(lastIndex + find.length); + return beginString + replace + endString; +} + +$( document ).ready(function() { + var lang = $('html').attr('lang'); + var editButton=$(".edit-page-link"); + + //var commentButton=editButton.clone(); + editButton.text(getCommentTrad(lang)); + + // from https://github.com/4D/docs/edit/Rx/docs/Project/overview.md + // to /4d/docs/blob/master/docs/Project/overview.md + var pageLink = editButton.attr("href"); + pageLink=pageLink.replace("https://github.com", ""); + pageLink=pageLink.replace("docs/edit/", "docs/blob/"); + + var pageName = pageLink.substring(pageLink.lastIndexOf('/') + 1); + var pageHeader = $(".postHeaderTitle").text(); + + // construct issue + var issueTitle="Comment on: "+pageHeader; + //var issueBody=`- 🇬🇧 [${pageName}](${pageLink})\n`; + var issueBody=`- [${pageName}](${pageLink})\n`; + + if(lang != "en") { + // from https://github.com/4D/docs/edit/Rx/docs/Project/overview.md + // to /4d/docs/blob/Rx/website/translated_docs//Project/overview.md + pageLink=replaceLast(pageLink,"/docs/", "/website/translated_docs/"+lang+"/"); + issueBody+=`- ${getFlags(lang)} [${pageName}](${pageLink})`; + } + issueBody+=`\n\n`+"Enter your comment here:"+`\n`; + var commentLink = `https://github.com/4d/docs/issues/new?title=${encodeURIComponent(issueTitle)}&body=${encodeURIComponent(issueBody)}` + + editButton.attr("href", commentLink); + + // editButton.after(commentButton); // if want to insert + //editButton.replaceWith(commentButton); +}); \ No newline at end of file diff --git a/website/build/docs/js/scrollSpy.js b/website/build/docs/js/scrollSpy.js new file mode 100644 index 00000000000000..1f278b26cf5d8e --- /dev/null +++ b/website/build/docs/js/scrollSpy.js @@ -0,0 +1,83 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/* eslint-disable */ +(function scrollSpy() { + var OFFSET = 10; + var timer; + var headingsCache; + + var findHeadings = function findHeadings() { + return headingsCache || document.querySelectorAll('.toc-headings > li > a'); + }; + + var onScroll = function onScroll() { + if (timer) { + // throttle + return; + } + + timer = setTimeout(function () { + timer = null; + var activeNavFound = false; + var headings = findHeadings(); // toc nav anchors + + /** + * On every call, try to find header right after <-- next header + * the one whose content is on the current screen <-- highlight this + */ + + for (var i = 0; i < headings.length; i++) { + // headings[i] is current element + // if an element is already active, then current element is not active + // if no element is already active, then current element is active + var currNavActive = !activeNavFound; + /** + * Enter the following check up only when an active nav header is not yet found + * Then, check the bounding rectangle of the next header + * The headers that are scrolled passed will have negative bounding rect top + * So the first one with positive bounding rect top will be the nearest next header + */ + + if (currNavActive && i < headings.length - 1) { + var heading = headings[i + 1]; + var next = decodeURIComponent(heading.href.split('#')[1]); + var nextHeader = document.getElementById(next); + + if (nextHeader) { + var top = nextHeader.getBoundingClientRect().top; + currNavActive = top > OFFSET; + } else { + console.error('Can not find header element', { + id: next, + heading: heading, + }); + } + } + /** + * Stop searching once a first such header is found, + * this makes sure the highlighted header is the most current one + */ + + if (currNavActive) { + activeNavFound = true; + headings[i].classList.add('active'); + } else { + headings[i].classList.remove('active'); + } + } + }, 100); + }; + + document.addEventListener('scroll', onScroll); + document.addEventListener('resize', onScroll); + document.addEventListener('DOMContentLoaded', function () { + // Cache the headings once the page has fully loaded. + headingsCache = findHeadings(); + onScroll(); + }); +})(); diff --git a/website/build/docs/pt/index.html b/website/build/docs/pt/index.html new file mode 100644 index 00000000000000..ede1baeb1c7507 --- /dev/null +++ b/website/build/docs/pt/index.html @@ -0,0 +1,66 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/pt/searchAPI.html b/website/build/docs/pt/searchAPI.html new file mode 100644 index 00000000000000..e97c47dfa01a7e --- /dev/null +++ b/website/build/docs/pt/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/searchAPI.html b/website/build/docs/searchAPI.html new file mode 100644 index 00000000000000..21702059d85d0d --- /dev/null +++ b/website/build/docs/searchAPI.html @@ -0,0 +1,54 @@ +4D Documentation · Documentation for 4D Developers

    4D Documentation

    \ No newline at end of file diff --git a/website/build/docs/sitemap.xml b/website/build/docs/sitemap.xml new file mode 100644 index 00000000000000..6b0ecf7e7d1199 --- /dev/null +++ b/website/build/docs/sitemap.xml @@ -0,0 +1 @@ +https://4d.github.io/index.htmlweekly0.5https://4d.github.io/searchAPI.htmlweekly0.5https://4d.github.io/blog/2017/10/24/new-version-1.0.0.htmlweekly0.3https://4d.github.io/blog/2017/09/26/adding-rss.htmlweekly0.3https://4d.github.io/blog/2017/09/25/testing-rss.htmlweekly0.3https://4d.github.io/blog/2017/04/10/blog-post-two.htmlweekly0.3https://4d.github.io/blog/2016/03/11/blog-post.htmlweekly0.3 \ No newline at end of file diff --git a/website/i18n/de.json b/website/i18n/de.json index 77f1a8432979a1..00f2847d739040 100644 --- a/website/i18n/de.json +++ b/website/i18n/de.json @@ -5,6 +5,108 @@ "previous": "Previous", "tagline": "Documentation for 4D Developers", "docs": { + "Admin/cli": { + "title": "Command Line Interface" + }, + "Admin/dataExplorer": { + "title": "Web Data Explorer" + }, + "Admin/debugLogFiles": { + "title": "Description of log files" + }, + "Admin/licenses": { + "title": "Managing 4D Licenses" + }, + "Admin/server-admin": { + "title": "4D Server Administration Window" + }, + "Admin/tls": { + "title": "TLS Protocol (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web Administration" + }, + "API/BlobClass": { + "title": "Blob" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Collection" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Directory Class" + }, + "API/Document": { + "title": "Document Class" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "Class API Overview" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Transporter Class" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "Backup/backup": { "title": "Backup" }, @@ -12,7 +114,7 @@ "title": "Log file (.journal)" }, "Backup/overview": { - "title": "Overview" + "title": "Überblick" }, "Backup/restore": { "title": "Restore" @@ -78,7 +180,7 @@ "title": "Variant" }, "Concepts/error-handling": { - "title": "Error handling" + "title": "Fehlerverwaltung" }, "Concepts/control-flow": { "title": "Ablaufsteuerung Überblick" @@ -87,27 +189,45 @@ "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" }, + "Debugging/basics": { + "title": "Basics" + }, + "Debugging/breakpoints": { + "title": "Breakpoints and Command Catching" + }, + "Debugging/debugger": { + "title": "Debugger" + }, + "Debugging/debugging-remote": { + "title": "Debugging from remote machines" + }, + "Desktop/building": { + "title": "Build Application" + }, + "Desktop/clientServer": { + "title": "Client/Server Management" + }, "Events/onActivate": { "title": "On Activate" }, @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "On Validate" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -286,7 +409,7 @@ "title": "On Window Opening Denied" }, "Events/overview": { - "title": "Overview" + "title": "Überblick" }, "FormEditor/stylesheets": { "title": "Style sheets" @@ -297,11 +420,14 @@ "FormEditor/forms": { "title": "About 4D Forms" }, + "FormEditor/macros": { + "title": "Form Editor Macros" + }, "FormEditor/objectLibrary": { "title": "Object libraries" }, "FormEditor/pictures": { - "title": "Pictures" + "title": "Bilder" }, "FormEditor/action": { "title": "Aktion" @@ -415,13 +541,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" @@ -489,6 +615,9 @@ "FormObjects/writeProAreaOverview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Installation" + }, "Menus/bars": { "title": "Menu bar features" }, @@ -496,7 +625,7 @@ "title": "Creating menus and menu bars" }, "Menus/overview": { - "title": "Overview" + "title": "Überblick" }, "Menus/properties": { "title": "Menu item properties" @@ -525,8 +654,8 @@ "sidebar_label": "Seite Information" }, "MSC/overview": { - "title": "Overview", - "sidebar_label": "Overview" + "title": "Überblick", + "sidebar_label": "Überblick" }, "MSC/repair": { "title": "Seite Reparieren", @@ -544,26 +673,65 @@ "title": "Seite Prüfen", "sidebar_label": "Seite Prüfen" }, + "Notes/updates": { + "title": "Documentation updates" + }, + "ORDA/dsmapping": { + "title": "Data Model Objects" + }, + "ORDA/entities": { + "title": "Working with data" + }, + "ORDA/glossary": { + "title": "Glossary" + }, + "ORDA/ordaClasses": { + "title": "Data Model Classes" + }, + "ORDA/overview": { + "title": "What is ORDA?" + }, + "ORDA/quickTour": { + "title": "A Quick Tour in ORDA" + }, + "ORDA/datastores": { + "title": "Using a remote datastore" + }, + "Preferences/forms": { + "title": "Forms Page" + }, + "Preferences/general": { + "title": "General Page" + }, + "Preferences/methods": { + "title": "Methods Page" + }, + "Preferences/overview": { + "title": "Überblick" + }, + "Preferences/shortcuts": { + "title": "Shortcuts Page" + }, + "Preferences/structure": { + "title": "Structure Page" + }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Architecture of a project" }, - "Project/building": { - "title": "Building a project package" + "Project/compiler": { + "title": "Compilation" }, - "Project/creating": { - "title": "Creating a 4D project" + "Project/components": { + "title": "4D Components Library" }, - "Project/developing": { - "title": "Developing a project" + "Project/creating": { + "title": "Working with a project" }, "Project/documentation": { "title": "Documenting a project" }, "Project/overview": { - "title": "Overview" - }, - "Project/pictures": { - "title": "Pictures" + "title": "Überblick" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -643,6 +811,9 @@ "REST/authUsers": { "title": "Users and sessions" }, + "REST/classFunctions": { + "title": "Calling ORDA class functions" + }, "REST/configuration": { "title": "Server Configuration" }, @@ -658,36 +829,89 @@ "REST/REST_requests": { "title": "About REST Requests" }, + "Tags/tags": { + "title": "Transformation tags" + }, "Users/editing": { "title": "Managing 4D users and groups" }, "Users/overview": { - "title": "Overview" + "title": "Überblick" + }, + "WebServer/allowProject": { + "title": "Allowing project methods" + }, + "WebServer/authentication": { + "title": "Authentication" + }, + "WebServer/errorPages": { + "title": "Custom HTTP Error Pages" + }, + "WebServer/gettingStarted": { + "title": "Getting Started" + }, + "WebServer/httpRequests": { + "title": "Processing HTTP requests" + }, + "WebServer/preemptiveWeb": { + "title": "Using preemptive web processes" + }, + "WebServer/sessions": { + "title": "User sessions" + }, + "WebServer/templates": { + "title": "Template pages" + }, + "WebServer/webServer": { + "title": "Überblick" + }, + "WebServer/webServerAdmin": { + "title": "Administration" + }, + "WebServer/webServerConfig": { + "title": "Configuration" }, "WebServer/webServerObject": { "title": "Web Server object" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { - "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", + "Getting Started": "Getting Started", + "Project Management": "Project Management", + "4D Language Concepts": "Konzepte der 4D Programmiersprache", + "ORDA": "ORDA", + "Class API Reference": "Class API Reference", + "Debugging": "Debugging", + "Access Rights": "Access Rights", + "Preferences": "Preferences", + "Administration": "Administration", + "MSC": "MSC", + "Backup and Restore": "Backup and Restore", + "Web Server": "Web Server", + "Web Development": "Web Development", + "REST Server": "REST Server", + "Client/Server": "Client/Server", "Forms": "Formulare", "Form Properties": "Form Properties", "Form Objects": "Form Objects", "Form Object Properties": "Form Object Properties", "Form Events": "Form Events", "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "Web Server": "Web Server", - "REST Server": "REST Server" + "Build Application": "Build Application" } }, "pages-strings": { + "Installation|in index page Getting started": "Installation", + "Starting 4D|in index page Getting started": "Starting 4D", "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Project Management|in index page Getting started": "Project Management", + "Object Relational Data Access (ORDA)|in index page Getting started": "Object Relational Data Access (ORDA)", + "Class API Reference|no description given": "Class API Reference", "Forms|no description given": "Formulare", "Form Properties|no description given": "Form Properties", "Form Events|no description given": "Form Events", @@ -695,15 +919,31 @@ "Form Object Properties|no description given": "Form Object Properties", "Menus|no description given": "Menus", "Web Server|no description given": "Web Server", + "Web Development|no description given": "Web Development", "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", + "License Management|no description given": "License Management", + "Build Application|no description given": "Build Application", + "Web Administration|no description given": "Web Administration", + "4D Server Administration Window|no description given": "4D Server Administration Window", + "4D Components Library|no description given": "4D Components Library", + "Client/Server|no description given": "Client/Server", + "TLS Protocol (HTTPS)|no description given": "TLS Protocol (HTTPS)", + "Debugging|no description given": "Debugging", + "Web Data Explorer|no description given": "Web Data Explorer", + "Language Reference (4D Doc Center)|no description given": "Programmiersprache (4D Doc Center)", + "Access Rights|no description given": "Access Rights", + "Description of log files|no description given": "Description of log files", + "Command Line Interface|no description given": "Command Line Interface", + "Preferences|no description given": "Preferences", "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", + "Core Development|no description given": "Core Development", "Administration|no description given": "Administration", + "Web applications|no description given": "Web applications", + "Mobile applications|no description given": "Mobile applications", + "Desktop applications|no description given": "Desktop applications", + "Documentation updates|no description given": "Documentation updates", "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" diff --git a/website/i18n/en.json b/website/i18n/en.json index 0c45a7e672dbdb..d1c9de80a1478e 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -5,6 +5,108 @@ "previous": "Previous", "tagline": "Documentation for 4D Developers", "docs": { + "Admin/cli": { + "title": "Command Line Interface" + }, + "Admin/dataExplorer": { + "title": "Web Data Explorer" + }, + "Admin/debugLogFiles": { + "title": "Description of log files" + }, + "Admin/licenses": { + "title": "Managing 4D Licenses" + }, + "Admin/server-admin": { + "title": "4D Server Administration Window" + }, + "Admin/tls": { + "title": "TLS Protocol (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web Administration" + }, + "API/BlobClass": { + "title": "Blob" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Collection" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Directory Class" + }, + "API/Document": { + "title": "Document Class" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "Class API Overview" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Transporter Class" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "Backup/backup": { "title": "Backup" }, @@ -108,6 +210,24 @@ "Concepts/variables": { "title": "Variables" }, + "Debugging/basics": { + "title": "Basics" + }, + "Debugging/breakpoints": { + "title": "Breakpoints and Command Catching" + }, + "Debugging/debugger": { + "title": "Debugger" + }, + "Debugging/debugging-remote": { + "title": "Debugging from remote machines" + }, + "Desktop/building": { + "title": "Building a project package" + }, + "Desktop/clientServer": { + "title": "Client/Server Management" + }, "Events/onActivate": { "title": "On Activate" }, @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "On Validate" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -297,6 +420,9 @@ "FormEditor/forms": { "title": "About 4D Forms" }, + "FormEditor/macros": { + "title": "Form Editor Macros" + }, "FormEditor/objectLibrary": { "title": "Object libraries" }, @@ -489,6 +615,9 @@ "FormObjects/writeProAreaOverview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Installation" + }, "Menus/bars": { "title": "Menu bar features" }, @@ -544,17 +673,59 @@ "title": "Verify Page", "sidebar_label": "Verify Page" }, + "Notes/updates": { + "title": "Documentation updates" + }, + "ORDA/dsmapping": { + "title": "Data Model Objects" + }, + "ORDA/entities": { + "title": "Working with data" + }, + "ORDA/glossary": { + "title": "Glossary" + }, + "ORDA/ordaClasses": { + "title": "Data Model Classes" + }, + "ORDA/overview": { + "title": "What is ORDA?" + }, + "ORDA/quickTour": { + "title": "A Quick Tour in ORDA" + }, + "ORDA/datastores": { + "title": "Using a remote datastore" + }, + "Preferences/forms": { + "title": "Forms Page" + }, + "Preferences/general": { + "title": "General Page" + }, + "Preferences/methods": { + "title": "Methods Page" + }, + "Preferences/overview": { + "title": "Overview" + }, + "Preferences/shortcuts": { + "title": "Shortcuts Page" + }, + "Preferences/structure": { + "title": "Structure Page" + }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Architecture of a project" }, - "Project/building": { - "title": "Building a project package" + "Project/compiler": { + "title": "Compilation" }, - "Project/creating": { - "title": "Creating a 4D project" + "Project/components": { + "title": "4D Components Library" }, - "Project/developing": { - "title": "Developing a project" + "Project/creating": { + "title": "Working with a project" }, "Project/documentation": { "title": "Documenting a project" @@ -562,9 +733,6 @@ "Project/overview": { "title": "Overview" }, - "Project/pictures": { - "title": "Pictures" - }, "REST/{dataClass}": { "title": "{dataClass}" }, @@ -643,6 +811,9 @@ "REST/authUsers": { "title": "Users and sessions" }, + "REST/classFunctions": { + "title": "Calling ORDA class functions" + }, "REST/configuration": { "title": "Server Configuration" }, @@ -658,36 +829,89 @@ "REST/REST_requests": { "title": "About REST Requests" }, + "Tags/tags": { + "title": "Transformation tags" + }, "Users/editing": { "title": "Managing 4D users and groups" }, "Users/overview": { "title": "Overview" }, + "WebServer/allowProject": { + "title": "Allowing project methods" + }, + "WebServer/authentication": { + "title": "Authentication" + }, + "WebServer/errorPages": { + "title": "Custom HTTP Error Pages" + }, + "WebServer/gettingStarted": { + "title": "Getting Started" + }, + "WebServer/httpRequests": { + "title": "Processing HTTP requests" + }, + "WebServer/preemptiveWeb": { + "title": "Using preemptive web processes" + }, + "WebServer/sessions": { + "title": "User sessions" + }, + "WebServer/templates": { + "title": "Template pages" + }, + "WebServer/webServer": { + "title": "Overview" + }, + "WebServer/webServerAdmin": { + "title": "Administration" + }, + "WebServer/webServerConfig": { + "title": "Configuration" + }, "WebServer/webServerObject": { "title": "Web Server object" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { + "Getting Started": "Getting Started", + "Project Management": "Project Management", "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", + "ORDA": "ORDA", + "Class API Reference": "Class API Reference", + "Debugging": "Debugging", + "Access Rights": "Access Rights", + "Preferences": "Preferences", + "Administration": "Administration", + "MSC": "MSC", + "Backup and Restore": "Backup and Restore", + "Web Server": "Web Server", + "Web Development": "Web Development", + "REST Server": "REST Server", + "Client/Server": "Client/Server", "Forms": "Forms", "Form Properties": "Form Properties", "Form Objects": "Form Objects", "Form Object Properties": "Form Object Properties", "Form Events": "Form Events", "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "Web Server": "Web Server", - "REST Server": "REST Server" + "Build application": "Build application" } }, "pages-strings": { + "Installation|in index page Getting started": "Installation", + "Starting 4D|in index page Getting started": "Starting 4D", "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Project Management|in index page Getting started": "Project Management", + "Object Relational Data Access (ORDA)|in index page Getting started": "Object Relational Data Access (ORDA)", + "Class API Reference|no description given": "Class API Reference", "Forms|no description given": "Forms", "Form Properties|no description given": "Form Properties", "Form Events|no description given": "Form Events", @@ -695,15 +919,31 @@ "Form Object Properties|no description given": "Form Object Properties", "Menus|no description given": "Menus", "Web Server|no description given": "Web Server", + "Web Development|no description given": "Web Development", "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", + "License Management|no description given": "License Management", + "Build Application|no description given": "Build Application", + "Web Administration|no description given": "Web Administration", + "4D Server Administration Window|no description given": "4D Server Administration Window", + "4D Components Library|no description given": "4D Components Library", + "Client/Server|no description given": "Client/Server", + "TLS Protocol (HTTPS)|no description given": "TLS Protocol (HTTPS)", + "Debugging|no description given": "Debugging", + "Web Data Explorer|no description given": "Web Data Explorer", + "Language Reference (4D Doc Center)|no description given": "Language Reference (4D Doc Center)", + "Access Rights|no description given": "Access Rights", + "Description of log files|no description given": "Description of log files", + "Command Line Interface|no description given": "Command Line Interface", + "Preferences|no description given": "Preferences", "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", + "Core Development|no description given": "Core Development", "Administration|no description given": "Administration", + "Web applications|no description given": "Web applications", + "Mobile applications|no description given": "Mobile applications", + "Desktop applications|no description given": "Desktop applications", + "Documentation updates|no description given": "Documentation updates", "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" diff --git a/website/i18n/es.json b/website/i18n/es.json index 0c45a7e672dbdb..e4469d64032eac 100644 --- a/website/i18n/es.json +++ b/website/i18n/es.json @@ -1,113 +1,233 @@ { - "_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": { + "Admin/cli": { + "title": "Command Line Interface" + }, + "Admin/dataExplorer": { + "title": "Web Data Explorer" + }, + "Admin/debugLogFiles": { + "title": "Description of log files" + }, + "Admin/licenses": { + "title": "Gestión de licencias 4D" + }, + "Admin/server-admin": { + "title": "4D Server Administration Window" + }, + "Admin/tls": { + "title": "Protocolo TLS (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web Administration" + }, + "API/BlobClass": { + "title": "Blob" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Colección" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Directory Class" + }, + "API/Document": { + "title": "Document Class" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "Class API Overview" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Transporter Class" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "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/classes": { - "title": "Classes" + "title": "Clases" }, "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" + "title": "Colección" }, "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": "Object" + "title": "Objeto" }, "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" }, + "Debugging/basics": { + "title": "Basics" + }, + "Debugging/breakpoints": { + "title": "Breakpoints and Command Catching" + }, + "Debugging/debugger": { + "title": "Debugger" + }, + "Debugging/debugging-remote": { + "title": "Debugging from remote machines" + }, + "Desktop/building": { + "title": "Generador de aplicaciones" + }, + "Desktop/clientServer": { + "title": "Client/Server Management" + }, "Events/onActivate": { "title": "On Activate" }, @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "On Validate" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -286,52 +409,55 @@ "title": "On Window Opening Denied" }, "Events/overview": { - "title": "Overview" + "title": "Generalidades" }, "FormEditor/stylesheets": { - "title": "Style sheets" + "title": "Hojas de estilo" }, "FormEditor/formEditor": { - "title": "Form Editor" + "title": "Editor de formularios" }, "FormEditor/forms": { - "title": "About 4D Forms" + "title": "Acerca de los formularios 4D" + }, + "FormEditor/macros": { + "title": "Form Editor Macros" }, "FormEditor/objectLibrary": { - "title": "Object libraries" + "title": "Librerías de objetos" }, "FormEditor/pictures": { - "title": "Pictures" + "title": "Imágenes" }, "FormEditor/action": { - "title": "Action" + "title": "Acción" }, "FormEditor/propertiesForm": { - "title": "Form Properties" + "title": "Propiedades de los formularios" }, "FormEditor/formSize": { "title": "Form Size" }, "FormEditor/jsonReference": { - "title": "JSON property list" + "title": "Lista de propiedades JSON" }, "FormEditor/markers": { - "title": "Markers" + "title": "Marcadores" }, "FormEditor/menu": { - "title": "Menu" + "title": "Menú" }, "FormEditor/print": { - "title": "Print" + "title": "Imprimir" }, "FormEditor/windowSize": { - "title": "Window Size" + "title": "Tamaño de la ventana" }, "FormObjects/buttonOverview": { - "title": "Button" + "title": "Botón" }, "FormObjects/buttonGridOverview": { - "title": "Button Grid" + "title": "Rejilla de botones" }, "FormObjects/checkboxOverview": { "title": "Check Box" @@ -340,230 +466,272 @@ "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" + "title": "Ãrea 4D View Pro" }, "FormObjects/webAreaOverview": { - "title": "Web Area" + "title": "Ãrea Web" }, "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "title": "Ãrea 4D Write Pro" + }, + "GettingStarted/installation": { + "title": "Instalació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" + }, + "Notes/updates": { + "title": "Actualizaciones de la documentación" + }, + "ORDA/dsmapping": { + "title": "Data Model Objects" + }, + "ORDA/entities": { + "title": "Trabajar con los datos" + }, + "ORDA/glossary": { + "title": "Glosario" + }, + "ORDA/ordaClasses": { + "title": "Clases del modelo de datos" + }, + "ORDA/overview": { + "title": "What is ORDA?" + }, + "ORDA/quickTour": { + "title": "Un recorrido rápido en ORDA" + }, + "ORDA/datastores": { + "title": "Utilizar un almacén de datos remoto" + }, + "Preferences/forms": { + "title": "Forms Page" + }, + "Preferences/general": { + "title": "General Page" + }, + "Preferences/methods": { + "title": "Methods Page" + }, + "Preferences/overview": { + "title": "Generalidades" + }, + "Preferences/shortcuts": { + "title": "Shortcuts Page" + }, + "Preferences/structure": { + "title": "Structure Page" }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Arquitectura de un proyecto" }, - "Project/building": { - "title": "Building a project package" + "Project/compiler": { + "title": "Compilation" }, - "Project/creating": { - "title": "Creating a 4D project" + "Project/components": { + "title": "4D Components Library" }, - "Project/developing": { - "title": "Developing a project" + "Project/creating": { + "title": "Working with a project" }, "Project/documentation": { - "title": "Documenting a project" + "title": "Documentar un proyecto" }, "Project/overview": { - "title": "Overview" - }, - "Project/pictures": { - "title": "Pictures" + "title": "Generalidades" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -641,71 +809,143 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "Usuarios y sesiones" + }, + "REST/classFunctions": { + "title": "Llamar a las funciones de clase ORDA" }, "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" + }, + "Tags/tags": { + "title": "Transformation tags" }, "Users/editing": { - "title": "Managing 4D users and groups" + "title": "Gestión de usuarios y grupos 4D" }, "Users/overview": { - "title": "Overview" + "title": "Generalidades" + }, + "WebServer/allowProject": { + "title": "Permitir métodos proyecto" + }, + "WebServer/authentication": { + "title": "Autenticación" + }, + "WebServer/errorPages": { + "title": "Custom HTTP Error Pages" + }, + "WebServer/gettingStarted": { + "title": "Comencemos" + }, + "WebServer/httpRequests": { + "title": "Processing HTTP requests" + }, + "WebServer/preemptiveWeb": { + "title": "Using preemptive web processes" + }, + "WebServer/sessions": { + "title": "User sessions" + }, + "WebServer/templates": { + "title": "Template pages" + }, + "WebServer/webServer": { + "title": "Generalidades" + }, + "WebServer/webServerAdmin": { + "title": "Administración" + }, + "WebServer/webServerConfig": { + "title": "Configuración" }, "WebServer/webServerObject": { - "title": "Web Server object" + "title": "Objeto servidor web" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { - "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", - "Forms": "Forms", - "Form Properties": "Form Properties", - "Form Objects": "Form Objects", - "Form Object Properties": "Form Object Properties", - "Form Events": "Form Events", - "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "Web Server": "Web Server", - "REST Server": "REST Server" + "Getting Started": "Comencemos", + "Project Management": "Gestión de proyecto", + "4D Language Concepts": "Conceptos del lenguaje 4D", + "ORDA": "ORDA", + "Class API Reference": "Clases API", + "Debugging": "Debugging", + "Access Rights": "Derechos de acceso", + "Preferences": "Preferencias", + "Administration": "Administración", + "MSC": "CSM", + "Backup and Restore": "Copia de seguridad y restauración", + "Web Server": "Servidor Web", + "Web Development": "Desarrollo web", + "REST Server": "Servidor REST", + "Client/Server": "Cliente/Servidor", + "Forms": "Formularios", + "Form Properties": "Propiedades de los formularios", + "Form Objects": "Objetos formularios", + "Form Object Properties": "Propiedades de los objetos formulario", + "Form Events": "Eventos formulario", + "Menus": "Menús", + "Build Application": "Generador de aplicaciones" } }, "pages-strings": { - "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", - "Forms|no description given": "Forms", - "Form Properties|no description given": "Form Properties", - "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|in index page Getting started": "Instalación", + "Starting 4D|in index page Getting started": "Iniciar 4D", + "Language Concepts|in index page Getting started": "Conceptos del lenguaje", + "Project Management|in index page Getting started": "Gestión de proyecto", + "Object Relational Data Access (ORDA)|in index page Getting started": "Object Relational Data Access (ORDA)", + "Class API Reference|no description given": "Clases API", + "Forms|no description given": "Formularios", + "Form Properties|no description given": "Propiedades de los 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", + "Web Development|no description given": "Desarrollo 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", + "License Management|no description given": "Gestión de licencias", + "Build Application|no description given": "Generador de aplicaciones", + "Web Administration|no description given": "Web Administration", + "4D Server Administration Window|no description given": "4D Server Administration Window", + "4D Components Library|no description given": "4D Components Library", + "Client/Server|no description given": "Cliente/Servidor", + "TLS Protocol (HTTPS)|no description given": "Protocolo TLS (HTTPS)", + "Debugging|no description given": "Debugging", + "Web Data Explorer|no description given": "Web Data Explorer", + "Language Reference (4D Doc Center)|no description given": "Lenguaje (4D Doc Center)", + "Access Rights|no description given": "Derechos de acceso", + "Description of log files|no description given": "Description of log files", + "Command Line Interface|no description given": "Command Line Interface", + "Preferences|no description given": "Preferencias", + "Getting started|no description given": "Comencemos", + "Core Development|no description given": "Desarrollo", + "Administration|no description given": "Administración", + "Web applications|no description given": "Aplicaciones Web", + "Mobile applications|no description given": "Aplicaciones móbiles", + "Desktop applications|no description given": "Aplicaciones de escritorio", + "Documentation updates|no description given": "Actualizaciones de la documentació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 69461aef1ea959..f80834dfd61620 100644 --- a/website/i18n/fr.json +++ b/website/i18n/fr.json @@ -5,6 +5,108 @@ "previous": "Précédent", "tagline": "Documentation pour Développeurs 4D", "docs": { + "Admin/cli": { + "title": "Interface de ligne de commande" + }, + "Admin/dataExplorer": { + "title": "Explorateur de données Web" + }, + "Admin/debugLogFiles": { + "title": "Description des fichiers historiques" + }, + "Admin/licenses": { + "title": "Gestion des licences 4D" + }, + "Admin/server-admin": { + "title": "Fenêtre d'administration de 4D Server" + }, + "Admin/tls": { + "title": "TLS Protocol (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web Administration" + }, + "API/BlobClass": { + "title": "Blob" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Collection" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Classe Directory" + }, + "API/Document": { + "title": "Document Class" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "Aperçu - API des classes" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Classe Transporter" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "Backup/backup": { "title": "Sauvegarde" }, @@ -108,6 +210,24 @@ "Concepts/variables": { "title": "Variables" }, + "Debugging/basics": { + "title": "Basics" + }, + "Debugging/breakpoints": { + "title": "Breakpoints and Command Catching" + }, + "Debugging/debugger": { + "title": "Debugger" + }, + "Debugging/debugging-remote": { + "title": "Debugging from remote machines" + }, + "Desktop/building": { + "title": "Générateur d'application" + }, + "Desktop/clientServer": { + "title": "Client/Server Management" + }, "Events/onActivate": { "title": "Sur activation" }, @@ -127,7 +247,7 @@ "title": "Sur avant saisie" }, "Events/onBeforeKeystroke": { - "title": "Sue avant frappe clavier" + "title": "Sur avant frappe clavier" }, "Events/onBeginDragOver": { "title": "Sur début survol" @@ -235,7 +355,7 @@ "title": "Sur changement page" }, "Events/onPlugInArea": { - "title": "Sur appel zone du plug in\t" + "title": "Sur appel zone du plug in" }, "Events/onPrintingBreak": { "title": "On Printing Break" @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "Sur validation" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -297,6 +420,9 @@ "FormEditor/forms": { "title": "A propos des formulaires 4D" }, + "FormEditor/macros": { + "title": "Form Editor Macros" + }, "FormEditor/objectLibrary": { "title": "Bibliothèques d'objets" }, @@ -352,7 +478,7 @@ "title": "Input" }, "FormObjects/listOverview": { - "title": "Hierarchical List" + "title": "Liste hiérarchique" }, "FormObjects/listboxOverview": { "title": "List Box" @@ -379,7 +505,7 @@ "title": "Apparence" }, "FormObjects/propertiesBackgroundAndBorder": { - "title": "Background and Border" + "title": "Fond et bordure" }, "FormObjects/propertiesCoordinatesAndSizing": { "title": "Coordonnées et dimensions" @@ -391,7 +517,7 @@ "title": "Source de données" }, "FormObjects/propertiesDisplay": { - "title": "Display" + "title": "Affichage" }, "FormObjects/propertiesEntry": { "title": "Saisie" @@ -439,7 +565,7 @@ "title": "Echelle" }, "FormObjects/propertiesSubform": { - "title": "Subform" + "title": "Sous-formulaire" }, "FormObjects/propertiesText": { "title": "Texte" @@ -472,7 +598,7 @@ "title": "Stepper" }, "FormObjects/subformOverview": { - "title": "Subform" + "title": "Sous-formulaire" }, "FormObjects/tabControl": { "title": "Onglets" @@ -481,13 +607,16 @@ "title": "Texte" }, "FormObjects/viewProAreaOverview": { - "title": "4D View Pro area" + "title": "Zone 4D View Pro" }, "FormObjects/webAreaOverview": { "title": "Zone Web" }, "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "title": "Zone 4D Write Pro" + }, + "GettingStarted/installation": { + "title": "Installation" }, "Menus/bars": { "title": "Barres de menus" @@ -544,17 +673,59 @@ "title": "Page Vérification", "sidebar_label": "Page Vérification" }, + "Notes/updates": { + "title": "Documentation updates" + }, + "ORDA/dsmapping": { + "title": "Data Model Objects" + }, + "ORDA/entities": { + "title": "Travailler avec des données" + }, + "ORDA/glossary": { + "title": "Glossaire" + }, + "ORDA/ordaClasses": { + "title": "Classes du modèle de données" + }, + "ORDA/overview": { + "title": "Que signifie ORDA ?" + }, + "ORDA/quickTour": { + "title": "Tour d'horizon d'ORDA" + }, + "ORDA/datastores": { + "title": "Utiliser un datastore distant" + }, + "Preferences/forms": { + "title": "Forms Page" + }, + "Preferences/general": { + "title": "General Page" + }, + "Preferences/methods": { + "title": "Methods Page" + }, + "Preferences/overview": { + "title": "Aperçu" + }, + "Preferences/shortcuts": { + "title": "Shortcuts Page" + }, + "Preferences/structure": { + "title": "Structure Page" + }, "Project/architecture": { - "title": "Architecture d'un projet 4D" + "title": "Architecture of a project" }, - "Project/building": { - "title": "Générer un package projet" + "Project/compiler": { + "title": "Compilation" }, - "Project/creating": { - "title": "Créer un projet 4D" + "Project/components": { + "title": "4D Components Library" }, - "Project/developing": { - "title": "Développer un projet" + "Project/creating": { + "title": "Working with a project" }, "Project/documentation": { "title": "Documenter un projet" @@ -562,9 +733,6 @@ "Project/overview": { "title": "Aperçu" }, - "Project/pictures": { - "title": "Images" - }, "REST/{dataClass}": { "title": "{dataClass}" }, @@ -641,7 +809,10 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "Sessions et utilisateurs" + }, + "REST/classFunctions": { + "title": "Appeler des fonctions de classe ORDA" }, "REST/configuration": { "title": "Configuration du serveur" @@ -658,36 +829,89 @@ "REST/REST_requests": { "title": "A propos des requêtes REST" }, + "Tags/tags": { + "title": "Transformation tags" + }, "Users/editing": { "title": "Gestion des groupes et utilisateurs 4D" }, "Users/overview": { "title": "Aperçu" }, + "WebServer/allowProject": { + "title": "Allowing project methods" + }, + "WebServer/authentication": { + "title": "Authentification" + }, + "WebServer/errorPages": { + "title": "Custom HTTP Error Pages" + }, + "WebServer/gettingStarted": { + "title": "Prise en main" + }, + "WebServer/httpRequests": { + "title": "Processing HTTP requests" + }, + "WebServer/preemptiveWeb": { + "title": "Using preemptive web processes" + }, + "WebServer/sessions": { + "title": "User sessions" + }, + "WebServer/templates": { + "title": "Template pages" + }, + "WebServer/webServer": { + "title": "Aperçu" + }, + "WebServer/webServerAdmin": { + "title": "Administration" + }, + "WebServer/webServerConfig": { + "title": "Configuration" + }, "WebServer/webServerObject": { "title": "Objet Serveur Web" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { + "Getting Started": "Prise en main", + "Project Management": "Gestion de projet", "4D Language Concepts": "Concepts du langage 4D", - "Project Databases": "Bases projet", + "ORDA": "ORDA", + "Class API Reference": "Classes API", + "Debugging": "Debugging", + "Access Rights": "Droits d'accès", + "Preferences": "Préférences", + "Administration": "Administration", + "MSC": "CSM", + "Backup and Restore": "Sauvegarde et restitution", + "Web Server": "Serveur Web", + "Web Development": "Développement Web", + "REST Server": "Serveur REST", + "Client/Server": "Client/Server", "Forms": "Formulaires", "Form Properties": "Propriétés des formulaires", "Form Objects": "Objets formulaires", "Form Object Properties": "Propriétés des objets formulaire", "Form Events": "Evénements formulaire", "Menus": "Menus", - "MSC": "CSM", - "Backup and Restore": "Sauvegarde et restitution", - "Users and Groups": "Groupes et utilisateurs", - "Web Server": "Serveur Web", - "REST Server": "Serveur REST" + "Build Application": "Générateur d'application" } }, "pages-strings": { + "Installation|in index page Getting started": "Installation", + "Starting 4D|in index page Getting started": "Démarrer 4D", "Language Concepts|in index page Getting started": "Concepts du langage", - "Project databases|in index page Getting started": "Bases projets", + "Project Management|in index page Getting started": "Gestion de projet", + "Object Relational Data Access (ORDA)|in index page Getting started": "Object Relational Data Access (ORDA)", + "Class API Reference|no description given": "Classes API", "Forms|no description given": "Formulaires", "Form Properties|no description given": "Propriétés des formulaires", "Form Events|no description given": "Evénements formulaire", @@ -695,15 +919,31 @@ "Form Object Properties|no description given": "Propriétés des objets formulaire", "Menus|no description given": "Menus", "Web Server|no description given": "Serveur Web", + "Web Development|no description given": "Développement Web", "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", - "Users and Groups|no description given": "Groupes et utilisateurs", + "License Management|no description given": "Gestion des licences", + "Build Application|no description given": "Générateur d'application", + "Web Administration|no description given": "Web Administration", + "4D Server Administration Window|no description given": "Fenêtre d'administration de 4D Server", + "4D Components Library|no description given": "4D Components Library", + "Client/Server|no description given": "Client/Server", + "TLS Protocol (HTTPS)|no description given": "TLS Protocol (HTTPS)", + "Debugging|no description given": "Debugging", + "Web Data Explorer|no description given": "Explorateur de données Web", + "Language Reference (4D Doc Center)|no description given": "Langage (4D Doc Center)", + "Access Rights|no description given": "Droits d'accès", + "Description of log files|no description given": "Description des fichiers historiques", + "Command Line Interface|no description given": "Interface de ligne de commande", + "Preferences|no description given": "Préférences", "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", - "Developing a Mobile application|no description given": "Développer une application mobile", + "Core Development|no description given": "Développement", "Administration|no description given": "Administration", + "Web applications|no description given": "Applications Web", + "Mobile applications|no description given": "Applications Mobile", + "Desktop applications|no description given": "Applications Desktop", + "Documentation updates|no description given": "Documentation updates", "Help Translate|recruit community translators for your project": "Aidez-nous à traduire", "Edit this Doc|recruitment message asking to edit the doc source": "Modifier", "Translate this Doc|recruitment message asking to translate the docs": "Traduire" diff --git a/website/i18n/ja.json b/website/i18n/ja.json index 54ca620cd96463..7cb64bfa7d0333 100644 --- a/website/i18n/ja.json +++ b/website/i18n/ja.json @@ -5,20 +5,122 @@ "previous": "å‰ã¸", "tagline": " 4D 開発リファレンス", "docs": { + "Admin/cli": { + "title": "コマンドライン・インターフェース" + }, + "Admin/dataExplorer": { + "title": "Webデータエクスプローラー" + }, + "Admin/debugLogFiles": { + "title": "ログファイルã®è©³ç´°" + }, + "Admin/licenses": { + "title": "4D ライセンスã®ç®¡ç†" + }, + "Admin/server-admin": { + "title": "4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦" + }, + "Admin/tls": { + "title": "TLSプロトコル (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web 管ç†" + }, + "API/BlobClass": { + "title": "BLOB" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Collection" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Directory クラス" + }, + "API/Document": { + "title": "Document クラス" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "クラス API ã®æ¦‚è¦" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Transporter クラス" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "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 ランゲージã«ã¤ã„ã¦" @@ -69,7 +171,7 @@ "title": "ãƒã‚¤ãƒ³ã‚¿ãƒ¼" }, "Concepts/string": { - "title": "文字列" + "title": "String" }, "Concepts/time": { "title": "時間" @@ -108,6 +210,24 @@ "Concepts/variables": { "title": "変数" }, + "Debugging/basics": { + "title": "ç”»é¢ã®èª¬æ˜Ž" + }, + "Debugging/breakpoints": { + "title": "ブレークãƒã‚¤ãƒ³ãƒˆã¨ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰" + }, + "Debugging/debugger": { + "title": "デãƒãƒƒã‚¬ãƒ¼" + }, + "Debugging/debugging-remote": { + "title": "リモートマシンã‹ã‚‰ã®ãƒ‡ãƒãƒƒã‚°" + }, + "Desktop/building": { + "title": "アプリケーションビルド" + }, + "Desktop/clientServer": { + "title": "クライアント/サーãƒãƒ¼ç®¡ç†" + }, "Events/onActivate": { "title": "On Activate" }, @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "On Validate" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -295,7 +418,10 @@ "title": "フォームエディター" }, "FormEditor/forms": { - "title": "About 4D Forms" + "title": "4D フォームã«ã¤ã„ã¦" + }, + "FormEditor/macros": { + "title": "フォームエディターマクロ" }, "FormEditor/objectLibrary": { "title": "オブジェクトライブラリ" @@ -307,25 +433,25 @@ "title": "動作" }, "FormEditor/propertiesForm": { - "title": "Form Properties" + "title": "フォームプロパティ" }, "FormEditor/formSize": { - "title": "Form Size" + "title": "フォームサイズ" }, "FormEditor/jsonReference": { - "title": "JSON property list" + "title": "JSON プロパティリスト" }, "FormEditor/markers": { - "title": "Markers" + "title": "マーカー" }, "FormEditor/menu": { - "title": "Menu" + "title": "メニュー" }, "FormEditor/print": { - "title": "Print" + "title": "å°åˆ·" }, "FormEditor/windowSize": { - "title": "Window Size" + "title": "ウィンドウサイズ" }, "FormObjects/buttonOverview": { "title": "ボタン" @@ -358,64 +484,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": "動作" }, "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": "ピクãƒãƒ£ãƒ¼" @@ -424,22 +550,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": "テキスト" @@ -448,123 +574,165 @@ "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" + "title": "4D View Pro エリア" }, "FormObjects/webAreaOverview": { - "title": "Web Area" + "title": "Webエリア" }, "FormObjects/writeProAreaOverview": { - "title": "4D Write Pro area" + "title": "4D Write Pro エリア" + }, + "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": "検査ページ" + }, + "Notes/updates": { + "title": "ドキュメンテーション更新情報" + }, + "ORDA/dsmapping": { + "title": "データモデルオブジェクト" + }, + "ORDA/entities": { + "title": "データæ“作" + }, + "ORDA/glossary": { + "title": "用語集" + }, + "ORDA/ordaClasses": { + "title": "データモデルクラス" + }, + "ORDA/overview": { + "title": "ORDAã¨ã¯ä½•ã‹" + }, + "ORDA/quickTour": { + "title": "ORDA ã®æ¦‚è¦" + }, + "ORDA/datastores": { + "title": "リモートデータストアã®åˆ©ç”¨" + }, + "Preferences/forms": { + "title": "フォームページ" + }, + "Preferences/general": { + "title": "一般ページ" + }, + "Preferences/methods": { + "title": "メソッドページ" + }, + "Preferences/overview": { + "title": "概è¦" + }, + "Preferences/shortcuts": { + "title": "ショートカットページ" + }, + "Preferences/structure": { + "title": "ストラクãƒãƒ£ãƒ¼ãƒšãƒ¼ã‚¸" }, "Project/architecture": { - "title": "4D プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼" + "title": "プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼" }, - "Project/building": { - "title": "プロジェクトパッケージã®ãƒ“ルド" + "Project/compiler": { + "title": "コンパイル" }, - "Project/creating": { - "title": "4D プロジェクトã®ä½œæˆ" + "Project/components": { + "title": "4D コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリ" }, - "Project/developing": { - "title": "プロジェクトã®é–‹ç™º" + "Project/creating": { + "title": "プロジェクトを開発ã™ã‚‹" }, "Project/documentation": { - "title": "プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³" + "title": "ドキュメンテーション" }, "Project/overview": { "title": "概è¦" }, - "Project/pictures": { - "title": "ピクãƒãƒ£ãƒ¼" - }, "REST/{dataClass}": { "title": "{dataClass}" }, @@ -641,69 +809,141 @@ "title": "$version" }, "REST/authUsers": { - "title": "Users and sessions" + "title": "ユーザーã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³" + }, + "REST/classFunctions": { + "title": "ORDAクラス関数ã®å‘¼ã³å‡ºã—" }, "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リクエストã«ã¤ã„ã¦" + }, + "Tags/tags": { + "title": "変æ›ã‚¿ã‚°" }, "Users/editing": { - "title": "Managing 4D users and groups" + "title": "4Dユーザー&グループã®ç®¡ç†" }, "Users/overview": { "title": "概è¦" }, + "WebServer/allowProject": { + "title": "プロジェクトメソッドã®è¨±å¯" + }, + "WebServer/authentication": { + "title": "èªè¨¼" + }, + "WebServer/errorPages": { + "title": "カスタム HTTPエラーページ" + }, + "WebServer/gettingStarted": { + "title": "ã¯ã˜ã‚ã«" + }, + "WebServer/httpRequests": { + "title": "HTTPリクエストã®å‡¦ç†" + }, + "WebServer/preemptiveWeb": { + "title": "プリエンプティブWebプロセスã®ä½¿ç”¨" + }, + "WebServer/sessions": { + "title": "ユーザーセッション" + }, + "WebServer/templates": { + "title": "テンプレートページ" + }, + "WebServer/webServer": { + "title": "概è¦" + }, + "WebServer/webServerAdmin": { + "title": "管ç†" + }, + "WebServer/webServerConfig": { + "title": "設定" + }, "WebServer/webServerObject": { - "title": "Web Server object" + "title": "Webサーãƒãƒ¼ã‚ªãƒ–ジェクト" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { + "Getting Started": "ã¯ã˜ã‚ã«", + "Project Management": "プロジェクト管ç†", "4D Language Concepts": "ランゲージã®ã‚³ãƒ³ã‚»ãƒ—ト", - "Project Databases": "プロジェクトデータベース", + "ORDA": "ORDA", + "Class API Reference": "クラス API リファレンス", + "Debugging": "デãƒãƒƒã‚¬ãƒ¼", + "Access Rights": "アクセス権é™", + "Preferences": "環境設定", + "Administration": "管ç†", + "MSC": "MSC", + "Backup and Restore": "ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒ", + "Web Server": "Web サーãƒãƒ¼", + "Web Development": "Web 開発", + "REST Server": "REST サーãƒãƒ¼", + "Client/Server": "クライアント/サーãƒãƒ¼", "Forms": "フォーム", - "Form Properties": "Form Properties", + "Form Properties": "フォームプロパティ", "Form Objects": "フォームオブジェクト", - "Form Object Properties": "Form Object Properties", - "Form Events": "Form Events", - "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "Web Server": "Web Server", - "REST Server": "REST Server" + "Form Object Properties": "フォームオブジェクトプロパティ", + "Form Events": "フォームイベント", + "Menus": "メニュー", + "Build Application": "アプリケーションビルド" } }, "pages-strings": { - "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Installation|in index page Getting started": "インストール", + "Starting 4D|in index page Getting started": "4D ã‚’å§‹ã‚ã‚‹", + "Language Concepts|in index page Getting started": "ランゲージã®ã‚³ãƒ³ã‚»ãƒ—ト", + "Project Management|in index page Getting started": "プロジェクト管ç†", + "Object Relational Data Access (ORDA)|in index page Getting started": "ORDA", + "Class API Reference|no description given": "クラス API リファレンス", "Forms|no description given": "フォーム", - "Form Properties|no description given": "Form Properties", - "Form Events|no description given": "Form Events", + "Form Properties|no description given": "フォームプロパティ", + "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 サーãƒãƒ¼", + "Web Development|no description given": "Web 開発", + "REST Server|no description given": "REST サーãƒãƒ¼", + "Maintenance and Security Center|no description given": "メンテナンス&セキュリティセンター", + "Backup and Restore|no description given": "ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒ", + "License Management|no description given": "ライセンス管ç†", + "Build Application|no description given": "アプリケーションビルド", + "Web Administration|no description given": "Web 管ç†", + "4D Server Administration Window|no description given": "4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦", + "4D Components Library|no description given": "4D コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリ", + "Client/Server|no description given": "クライアント/サーãƒãƒ¼", + "TLS Protocol (HTTPS)|no description given": "TLSプロトコル (HTTPS)", + "Debugging|no description given": "デãƒãƒƒã‚¬ãƒ¼", + "Web Data Explorer|no description given": "Webデータエクスプローラー", + "Language Reference (4D Doc Center)|no description given": "ランゲージリファレンス (4D Doc Center)", + "Access Rights|no description given": "アクセス権é™", + "Description of log files|no description given": "ログファイルã®è©³ç´°", + "Command Line Interface|no description given": "コマンドライン・インターフェース", + "Preferences|no description given": "環境設定", "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": "データベース管ç†", + "Core Development|no description given": "コア開発", + "Administration|no description given": "管ç†", + "Web applications|no description given": "Web アプリ", + "Mobile applications|no description given": "モãƒã‚¤ãƒ«ã‚¢ãƒ—リ", + "Desktop applications|no description given": "デスクトップアプリ", + "Documentation updates|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 0c45a7e672dbdb..cb8100c8663ee6 100644 --- a/website/i18n/pt.json +++ b/website/i18n/pt.json @@ -5,14 +5,116 @@ "previous": "Previous", "tagline": "Documentation for 4D Developers", "docs": { + "Admin/cli": { + "title": "Command Line Interface" + }, + "Admin/dataExplorer": { + "title": "Web Data Explorer" + }, + "Admin/debugLogFiles": { + "title": "Description of log files" + }, + "Admin/licenses": { + "title": "Managing 4D Licenses" + }, + "Admin/server-admin": { + "title": "4D Server Administration Window" + }, + "Admin/tls": { + "title": "TLS Protocol (HTTPS)" + }, + "Admin/webAdmin": { + "title": "Web Administration" + }, + "API/BlobClass": { + "title": "Blob" + }, + "API/ClassClass": { + "title": "Class" + }, + "API/CollectionClass": { + "title": "Collection" + }, + "API/CryptoKeyClass": { + "title": "CryptoKey" + }, + "API/DataClassAttributeClass": { + "title": "DataClassAttribute" + }, + "API/DataClassClass": { + "title": "DataClass" + }, + "API/DataStoreClass": { + "title": "DataStore" + }, + "API/Directory": { + "title": "Directory Class" + }, + "API/Document": { + "title": "Document Class" + }, + "API/EmailObjectClass": { + "title": "Email" + }, + "API/EntityClass": { + "title": "Entity" + }, + "API/EntitySelectionClass": { + "title": "EntitySelection" + }, + "API/FileClass": { + "title": "File" + }, + "API/FolderClass": { + "title": "Folder" + }, + "API/FunctionClass": { + "title": "Formula" + }, + "API/IMAPTransporterClass": { + "title": "IMAPTransporter" + }, + "API/MailAttachmentClass": { + "title": "MailAttachment" + }, + "API/overview": { + "title": "Class API Overview" + }, + "API/POP3TransporterClass": { + "title": "POP3Transporter" + }, + "API/SessionClass": { + "title": "Session" + }, + "API/SignalClass": { + "title": "Signal" + }, + "API/SMTPTransporterClass": { + "title": "SMTPTransporter" + }, + "API/Transporter": { + "title": "Transporter Class" + }, + "API/WebServerClass": { + "title": "WebServer" + }, + "API/ZipArchiveClass": { + "title": "ZIPArchive" + }, + "API/ZipFileClass": { + "title": "ZIPFile" + }, + "API/ZipFolderClass": { + "title": "ZIPFolder" + }, "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" @@ -108,6 +210,24 @@ "Concepts/variables": { "title": "Variables" }, + "Debugging/basics": { + "title": "Basics" + }, + "Debugging/breakpoints": { + "title": "Breakpoints and Command Catching" + }, + "Debugging/debugger": { + "title": "Debugger" + }, + "Debugging/debugging-remote": { + "title": "Debugging from remote machines" + }, + "Desktop/building": { + "title": "Build Application" + }, + "Desktop/clientServer": { + "title": "Client/Server Management" + }, "Events/onActivate": { "title": "On Activate" }, @@ -279,6 +399,9 @@ "Events/onValidate": { "title": "On Validate" }, + "Events/onVpRangeChanged": { + "title": "On VP Range Changed" + }, "Events/onVpReady": { "title": "On VP Ready" }, @@ -286,7 +409,7 @@ "title": "On Window Opening Denied" }, "Events/overview": { - "title": "Overview" + "title": "Visão Geral" }, "FormEditor/stylesheets": { "title": "Style sheets" @@ -297,6 +420,9 @@ "FormEditor/forms": { "title": "About 4D Forms" }, + "FormEditor/macros": { + "title": "Form Editor Macros" + }, "FormEditor/objectLibrary": { "title": "Object libraries" }, @@ -489,6 +615,9 @@ "FormObjects/writeProAreaOverview": { "title": "4D Write Pro area" }, + "GettingStarted/installation": { + "title": "Installation" + }, "Menus/bars": { "title": "Menu bar features" }, @@ -496,7 +625,7 @@ "title": "Creating menus and menu bars" }, "Menus/overview": { - "title": "Overview" + "title": "Visão Geral" }, "Menus/properties": { "title": "Menu item properties" @@ -525,8 +654,8 @@ "sidebar_label": "Information Page" }, "MSC/overview": { - "title": "Overview", - "sidebar_label": "Overview" + "title": "Visão Geral", + "sidebar_label": "Visão Geral" }, "MSC/repair": { "title": "Repair Page", @@ -544,26 +673,65 @@ "title": "Verify Page", "sidebar_label": "Verify Page" }, + "Notes/updates": { + "title": "Documentation updates" + }, + "ORDA/dsmapping": { + "title": "Data Model Objects" + }, + "ORDA/entities": { + "title": "Working with data" + }, + "ORDA/glossary": { + "title": "Glossary" + }, + "ORDA/ordaClasses": { + "title": "Data Model Classes" + }, + "ORDA/overview": { + "title": "What is ORDA?" + }, + "ORDA/quickTour": { + "title": "A Quick Tour in ORDA" + }, + "ORDA/datastores": { + "title": "Using a remote datastore" + }, + "Preferences/forms": { + "title": "Forms Page" + }, + "Preferences/general": { + "title": "General Page" + }, + "Preferences/methods": { + "title": "Methods Page" + }, + "Preferences/overview": { + "title": "Visão Geral" + }, + "Preferences/shortcuts": { + "title": "Shortcuts Page" + }, + "Preferences/structure": { + "title": "Structure Page" + }, "Project/architecture": { - "title": "Architecture of a 4D project" + "title": "Architecture of a project" }, - "Project/building": { - "title": "Building a project package" + "Project/compiler": { + "title": "Compilation" }, - "Project/creating": { - "title": "Creating a 4D project" + "Project/components": { + "title": "4D Components Library" }, - "Project/developing": { - "title": "Developing a project" + "Project/creating": { + "title": "Working with a project" }, "Project/documentation": { "title": "Documenting a project" }, "Project/overview": { - "title": "Overview" - }, - "Project/pictures": { - "title": "Pictures" + "title": "Visão Geral" }, "REST/{dataClass}": { "title": "{dataClass}" @@ -643,6 +811,9 @@ "REST/authUsers": { "title": "Users and sessions" }, + "REST/classFunctions": { + "title": "Calling ORDA class functions" + }, "REST/configuration": { "title": "Server Configuration" }, @@ -658,36 +829,89 @@ "REST/REST_requests": { "title": "About REST Requests" }, + "Tags/tags": { + "title": "Transformation tags" + }, "Users/editing": { "title": "Managing 4D users and groups" }, "Users/overview": { - "title": "Overview" + "title": "Visão Geral" + }, + "WebServer/allowProject": { + "title": "Allowing project methods" + }, + "WebServer/authentication": { + "title": "Authentication" + }, + "WebServer/errorPages": { + "title": "Custom HTTP Error Pages" + }, + "WebServer/gettingStarted": { + "title": "Getting Started" + }, + "WebServer/httpRequests": { + "title": "Processing HTTP requests" + }, + "WebServer/preemptiveWeb": { + "title": "Using preemptive web processes" + }, + "WebServer/sessions": { + "title": "User sessions" + }, + "WebServer/templates": { + "title": "Template pages" + }, + "WebServer/webServer": { + "title": "Visão Geral" + }, + "WebServer/webServerAdmin": { + "title": "Administration" + }, + "WebServer/webServerConfig": { + "title": "Configuration" }, "WebServer/webServerObject": { "title": "Web Server object" } }, - "links": {}, + "links": { + "v19 R2 BETA": "v19 R2 BETA", + "v19": "v19", + "v18": "v18" + }, "categories": { + "Getting Started": "Getting Started", + "Project Management": "Project Management", "4D Language Concepts": "4D Language Concepts", - "Project Databases": "Project Databases", + "ORDA": "ORDA", + "Class API Reference": "Class API Reference", + "Debugging": "Debugging", + "Access Rights": "Access Rights", + "Preferences": "Preferences", + "Administration": "Administration", + "MSC": "MSC", + "Backup and Restore": "Backup and Restore", + "Web Server": "Web Server", + "Web Development": "Web Development", + "REST Server": "REST Server", + "Client/Server": "Client/Server", "Forms": "Forms", "Form Properties": "Form Properties", "Form Objects": "Form Objects", "Form Object Properties": "Form Object Properties", "Form Events": "Form Events", "Menus": "Menus", - "MSC": "MSC", - "Backup and Restore": "Backup and Restore", - "Users and Groups": "Users and Groups", - "Web Server": "Web Server", - "REST Server": "REST Server" + "Build Application": "Build Application" } }, "pages-strings": { + "Installation|in index page Getting started": "Installation", + "Starting 4D|in index page Getting started": "Starting 4D", "Language Concepts|in index page Getting started": "Language Concepts", - "Project databases|in index page Getting started": "Project databases", + "Project Management|in index page Getting started": "Project Management", + "Object Relational Data Access (ORDA)|in index page Getting started": "Object Relational Data Access (ORDA)", + "Class API Reference|no description given": "Class API Reference", "Forms|no description given": "Forms", "Form Properties|no description given": "Form Properties", "Form Events|no description given": "Form Events", @@ -695,15 +919,31 @@ "Form Object Properties|no description given": "Form Object Properties", "Menus|no description given": "Menus", "Web Server|no description given": "Web Server", + "Web Development|no description given": "Web Development", "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", + "License Management|no description given": "License Management", + "Build Application|no description given": "Build Application", + "Web Administration|no description given": "Web Administration", + "4D Server Administration Window|no description given": "4D Server Administration Window", + "4D Components Library|no description given": "4D Components Library", + "Client/Server|no description given": "Client/Server", + "TLS Protocol (HTTPS)|no description given": "TLS Protocol (HTTPS)", + "Debugging|no description given": "Debugging", + "Web Data Explorer|no description given": "Web Data Explorer", + "Language Reference (4D Doc Center)|no description given": "Language Reference (4D Doc Center)", + "Access Rights|no description given": "Access Rights", + "Description of log files|no description given": "Description of log files", + "Command Line Interface|no description given": "Command Line Interface", + "Preferences|no description given": "Preferences", "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", + "Core Development|no description given": "Core Development", "Administration|no description given": "Administration", + "Web applications|no description given": "Web applications", + "Mobile applications|no description given": "Mobile applications", + "Desktop applications|no description given": "Desktop applications", + "Documentation updates|no description given": "Documentation updates", "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" diff --git a/website/package-lock.json b/website/package-lock.json index f18f49d73d230f..f471d646668239 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -2,322 +2,357 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@4dsas/doc_preprocessing": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@4dsas/doc_preprocessing/-/doc_preprocessing-1.0.13.tgz", + "integrity": "sha512-AdZJVM1FGU4oT0JekanFj9GjNYJrrVRNOToUwS8I2MubuXzlq/3IumJ8XKqfxWAEP/60PlaSi6k+kgfdmrWeNA==", + "dev": true, + "requires": { + "yargs": "^15.3.1" + } + }, "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.8.3" + "@babel/highlight": "^7.10.4" } }, "@babel/compat-data": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.5.tgz", - "integrity": "sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.11.0.tgz", + "integrity": "sha512-TPSvJfv73ng0pfnEOh17bYMPQbI95+nGWc71Ss4vZdRBHTDqmM9Z8ZV4rYz8Ks7sfzc95n30k6ODIq5UGnXcYQ==", "dev": true, "requires": { - "browserslist": "^4.8.5", + "browserslist": "^4.12.0", "invariant": "^2.2.4", "semver": "^5.5.0" } }, "@babel/core": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.4.tgz", - "integrity": "sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", - "@babel/helpers": "^7.8.4", - "@babel/parser": "^7.8.4", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.1.tgz", + "integrity": "sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.11.0", + "@babel/helper-module-transforms": "^7.11.0", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.11.1", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.11.0", + "@babel/types": "^7.11.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", - "json5": "^2.1.0", - "lodash": "^4.17.13", + "json5": "^2.1.2", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" } }, "@babel/generator": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.4.tgz", - "integrity": "sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz", + "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==", "dev": true, "requires": { - "@babel/types": "^7.8.3", + "@babel/types": "^7.11.0", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", - "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-builder-react-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.8.3.tgz", - "integrity": "sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz", + "integrity": "sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg==", "dev": true, "requires": { - "@babel/types": "^7.8.3", - "esutils": "^2.0.0" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/types": "^7.10.4" } }, - "@babel/helper-call-delegate": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", - "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", + "@babel/helper-builder-react-jsx-experimental": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.10.5.tgz", + "integrity": "sha512-Buewnx6M4ttG+NLkKyt7baQn7ScC/Td+e99G914fRU8fGIUivDDgVIQeDHFa5e4CRSJQt58WpNHhsAZgtzVhsg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-module-imports": "^7.10.4", + "@babel/types": "^7.10.5" } }, "@babel/helper-compilation-targets": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz", - "integrity": "sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.4.tgz", + "integrity": "sha512-a3rYhlsGV0UHNDvrtOXBg8/OpfV0OKTkxKPzIplS1zpx7CygDcWWxckxZeDd3gzPzC4kUT0A4nVFDK0wGMh4MQ==", "dev": true, "requires": { - "@babel/compat-data": "^7.8.4", - "browserslist": "^4.8.5", + "@babel/compat-data": "^7.10.4", + "browserslist": "^4.12.0", "invariant": "^2.2.4", "levenary": "^1.1.1", "semver": "^5.5.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz", - "integrity": "sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz", + "integrity": "sha512-0nkdeijB7VlZoLT3r/mY3bUkw3T8WG/hNw+FATs/6+pG2039IJWjTYL0VTISqsNHMUTEnwbVnc89WIJX9Qed0A==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.10.5", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", - "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz", + "integrity": "sha512-2/hu58IEPKeoLF45DBwx3XFqsbCXmkdAay4spVr2x0jYgRxrSNp+ePwvSsy9g6YSaNDcKIQVPXk1Ov8S2edk2g==", "dev": true, "requires": { - "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.6.0" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-regex": "^7.10.4", + "regexpu-core": "^4.7.0" } }, "@babel/helper-define-map": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", - "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/types": "^7.8.3", - "lodash": "^4.17.13" + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", - "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz", + "integrity": "sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A==", "dev": true, "requires": { - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-hoist-variables": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", - "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", + "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.11.0" } }, "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", + "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-module-transforms": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", - "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", + "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-simple-access": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3", - "lodash": "^4.17.13" + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/template": "^7.10.4", + "@babel/types": "^7.11.0", + "lodash": "^4.17.19" } }, "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-plugin-utils": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", - "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/helper-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", - "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz", + "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==", "dev": true, "requires": { - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/helper-remap-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", - "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz", + "integrity": "sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-wrap-function": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-replace-supers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", - "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", + "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", + "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz", + "integrity": "sha512-0XIdiQln4Elglgjbwo9wuJpL/K7AGCY26kmEt0+pRP0TAj4jjyNq1MjoRvikrTVqKcx4Gysxt4cXvVFXP/JO2Q==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" } }, "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.8.3" + "@babel/types": "^7.11.0" } }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, "@babel/helper-wrap-function": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", - "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz", + "integrity": "sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helpers": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", - "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", + "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", "dev": true, "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.4", - "@babel/types": "^7.8.3" + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/highlight": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", - "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -329,6 +364,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -338,100 +388,142 @@ } }, "@babel/parser": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.4.tgz", - "integrity": "sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==", + "version": "7.11.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz", + "integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", - "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.5.tgz", + "integrity": "sha512-cNMCVezQbrRGvXJwm9fu/1sJj9bHdGAgKodZdLqOQIpfoH3raqmRPBM17+lh7CzhiKRRBrGtZL9WcjxSoGYUSg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.10.4", "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", - "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.4.tgz", + "integrity": "sha512-vhwkEROxzcHGNu2mzUC0OFFNXdZ4M23ib8aRRcJSsW8BZK9pQMD7QB7csl97NBbgGZO7ZyHUyKDnxzOaP4IrCg==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", - "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.4.tgz", + "integrity": "sha512-up6oID1LeidOOASNXgv/CFbgBqTuKJ0cJjz6An5tWD+NVBNlp3VNSBxv2ZdU7SYl3NxJC7agAQDApZusV6uFwQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.10.4.tgz", + "integrity": "sha512-aNdf0LY6/3WXkhh0Fdb6Zk9j1NMD8ovj3F6r0+3j837Pn1S1PdNtcwJ5EG9WkVPNHPxyJDaxMaAOVq4eki0qbg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, "@babel/plugin-proposal-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", - "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.4.tgz", + "integrity": "sha512-fCL7QF0Jo83uy1K0P2YXrfX11tj3lkpN7l4dMv9Y9VkowkhkQDwFHFd8IiwyK5MZjE8UpbgokkgtcReH88Abaw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.0" } }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.11.0.tgz", + "integrity": "sha512-/f8p4z+Auz0Uaf+i8Ekf1iM7wUNLcViFUGiPxKeXvxTSl63B875YPiVdUDdem7hREcI0E0kSpEhS8tF5RphK7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.4.tgz", + "integrity": "sha512-wq5n1M3ZUlHl9sqT2ok1T2/MTt6AXE0e1Lz4WzWBr95LsAZ5qDXe4KnFuauYyEyLiohvXFMdbsOTMyLZs91Zlw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.4.tgz", + "integrity": "sha512-73/G7QoRoeNkLZFxsoCCvlg4ezE4eM+57PnOqgaPOozd5myfj7p0muD1mRVJvbUWbOzD+q3No2bWbaKy+DJ8DA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz", + "integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.10.4" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.4.tgz", + "integrity": "sha512-LflT6nPh+GK2MnFiKDyLiqSqVHkQnVf7hdoAvyTnnKj9xB3docGRsdPuxp6qqqW19ifK3xgc9U5/FwrSaCNX5g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", - "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.11.0.tgz", + "integrity": "sha512-v9fZIu3Y8562RRwhm1BbMRxtqZNFmFA2EG+pT2diuU8PT3H6T/KXoZ54KgYisfOFZHV6PfvAiBIZ9Rcz+/JCxA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, + "@babel/plugin-proposal-private-methods": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.4.tgz", + "integrity": "sha512-wh5GJleuI8k3emgTg5KkJK6kHNsGEr0uBTDBuQUBJwckk9xs1ez79ioheEVVxMLyPscB0LfkbVHslQqIzWV6Bw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", - "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.4.tgz", + "integrity": "sha512-H+3fOgPnEXFL9zGYtKQe4IDOPKYlZdF1kqFDQRRb8PK4B8af1vAGK04tF5iQAAsui+mHNBQSAtd2/ndEDe9wuA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-async-generators": { @@ -443,6 +535,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-class-properties": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz", + "integrity": "sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -452,6 +553,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -462,12 +572,21 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz", - "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.10.4.tgz", + "integrity": "sha512-KCg9mio9jwiARCB7WAcQ7Y1q+qicILjoK8LP/VkPkEKaf5dkaZZK1EcTe91a3JJlZ3qy6L5s9X52boEYi8DM9g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-nullish-coalescing-operator": { @@ -479,6 +598,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", @@ -507,498 +635,563 @@ } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", - "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.4.tgz", + "integrity": "sha512-ni1brg4lXEmWyafKr0ccFWkJG0CeMt4WV1oyeBW6EFObF4oOHclbkj5cARxAPQyAQ2UTuplJyK4nfkXIMMFvsQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", - "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz", + "integrity": "sha512-9J/oD1jV0ZCBcgnoFWFq1vJd4msoKb/TCpGNFyyLt0zABdcvgK3aYikZ8HjzB14c26bc7E3Q1yugpwGy2aTPNA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", - "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz", + "integrity": "sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3" + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.10.4" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", - "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz", + "integrity": "sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", - "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.11.1.tgz", + "integrity": "sha512-00dYeDE0EVEHuuM+26+0w/SCL0BH2Qy7LwHuI4Hi4MH5gkC8/AqMN5uWFJIsoXZrAphiMm1iXzBw6L2T+eA0ew==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "lodash": "^4.17.13" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-classes": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", - "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.4.tgz", + "integrity": "sha512-2oZ9qLjt161dn1ZE0Ms66xBncQH4In8Sqw1YWgBUZuGVJJS5c0OFZXL6dP2MRHrkU/eKhWg8CzFJhRQl50rQxA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-define-map": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", - "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.4.tgz", + "integrity": "sha512-JFwVDXcP/hM/TbyzGq3l/XWGut7p46Z3QvqFMXTfk6/09m7xZHJUN9xHfsv7vqqD4YnfI5ueYdSJtXqqBLyjBw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", - "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.4.tgz", + "integrity": "sha512-+WmfvyfsyF603iPa6825mq6Qrb7uLjTOsa3XOFzlYcYDHSS4QmpOWOL0NNBY5qMbvrcf3tq0Cw+v4lxswOBpgA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", - "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.4.tgz", + "integrity": "sha512-ZEAVvUTCMlMFAbASYSVQoxIbHm2OkG2MseW6bV2JjIygOjdVv8tuxrCTzj1+Rynh7ODb8GivUy7dzEXzEhuPaA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", - "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.4.tgz", + "integrity": "sha512-GL0/fJnmgMclHiBTTWXNlYjYsA7rDrtsazHG6mglaGSTh0KsrW04qml+Bbz9FL0LcJIRwBWL5ZqlNHKTkU3xAA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", - "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.4.tgz", + "integrity": "sha512-S5HgLVgkBcRdyQAHbKj+7KyuWx8C6t5oETmUuwz1pt3WTWJhsUV0WIIXuVvfXMxl/QQyHKlSCNNtaIamG8fysw==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-for-of": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz", - "integrity": "sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz", + "integrity": "sha512-ItdQfAzu9AlEqmusA/65TqJ79eRcgGmpPPFvBnGILXZH975G0LNjP1yjHvGgfuCxqrPPueXOPe+FsvxmxKiHHQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", - "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.4.tgz", + "integrity": "sha512-OcDCq2y5+E0dVD5MagT5X+yTRbcvFjDI2ZVAottGH6tzqjx/LKpgkUepu3hp/u4tZBzxxpNGwLsAvGBvQ2mJzg==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", - "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.4.tgz", + "integrity": "sha512-Xd/dFSTEVuUWnyZiMu76/InZxLTYilOSr1UlHV+p115Z/Le2Fi1KXkJUYz0b42DfndostYlPub3m8ZTQlMaiqQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", - "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.4.tgz", + "integrity": "sha512-0bFOvPyAoTBhtcJLr9VcwZqKmSjFml1iVxvPL0ReomGU53CX53HsM4h2SzckNdkQcHox1bpAqzxBI1Y09LlBSw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", - "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.5.tgz", + "integrity": "sha512-elm5uruNio7CTLFItVC/rIzKLfQ17+fX7EVz5W0TMgIHFo1zY0Ozzx+lgwhL4plzl8OzVn6Qasx5DeEFyoNiRw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", - "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.4.tgz", + "integrity": "sha512-Xj7Uq5o80HDLlW64rVfDBhao6OX89HKUmb+9vWYaLXBZOma4gA6tw4Ni1O5qVDoZWUV0fxMYA0aYzOawz0l+1w==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-simple-access": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", - "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.5.tgz", + "integrity": "sha512-f4RLO/OL14/FP1AEbcsWMzpbUz6tssRaeQg11RH1BP/XnPpRoVwgeYViMFacnkaw4k4wjRSjn3ip1Uw9TaXuMw==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", - "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.4.tgz", + "integrity": "sha512-mohW5q3uAEt8T45YT7Qc5ws6mWgJAaL/8BfWD9Dodo1A3RKWli8wTS+WiQ/knF+tXlPirW/1/MqzzGfCExKECA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-module-transforms": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", - "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.4.tgz", + "integrity": "sha512-V6LuOnD31kTkxQPhKiVYzYC/Jgdq53irJC/xBSmqcNcqFGV+PER4l6rU5SH2Vl7bH9mLDHcc0+l9HUOe4RNGKA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.10.4" } }, "@babel/plugin-transform-new-target": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", - "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.4.tgz", + "integrity": "sha512-YXwWUDAH/J6dlfwqlWsztI2Puz1NtUAubXhOPLQ5gjR/qmQ5U96DY4FQO8At33JN4XPBhrjB8I4eMmLROjjLjw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-object-super": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", - "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.4.tgz", + "integrity": "sha512-5iTw0JkdRdJvr7sY0vHqTpnruUpTea32JHmq/atIWqsnNussbRzjEDyWep8UNztt1B5IusBYg8Irb0bLbiEBCQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4" } }, "@babel/plugin-transform-parameters": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz", - "integrity": "sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.5.tgz", + "integrity": "sha512-xPHwUj5RdFV8l1wuYiu5S9fqWGM2DrYc24TMvUiRrPVm+SM3XeqU9BcokQX/kEUe+p2RBwy+yoiR1w/Blq6ubw==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.8.3", - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-property-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", - "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.4.tgz", + "integrity": "sha512-ofsAcKiUxQ8TY4sScgsGeR2vJIsfrzqvFb9GvJ5UdXDzl+MyYCaBj/FGzXuv7qE0aJcjWMILny1epqelnFlz8g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-react-display-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz", - "integrity": "sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.10.4.tgz", + "integrity": "sha512-Zd4X54Mu9SBfPGnEcaGcOrVAYOtjT2on8QZkLKEq1S/tHexG39d9XXGZv19VfRrDjPJzFmPfTAqOQS1pfFOujw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.8.3.tgz", - "integrity": "sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.10.4.tgz", + "integrity": "sha512-L+MfRhWjX0eI7Js093MM6MacKU4M6dnCRa/QPDwYMxjljzSCzzlzKzj9Pk4P3OtrPcxr2N3znR419nr3Xw+65A==", + "dev": true, + "requires": { + "@babel/helper-builder-react-jsx": "^7.10.4", + "@babel/helper-builder-react-jsx-experimental": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-jsx": "^7.10.4" + } + }, + "@babel/plugin-transform-react-jsx-development": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.10.4.tgz", + "integrity": "sha512-RM3ZAd1sU1iQ7rI2dhrZRZGv0aqzNQMbkIUCS1txYpi9wHQ2ZHNjo5TwX+UD6pvFW4AbWqLVYvKy5qJSAyRGjQ==", "dev": true, "requires": { - "@babel/helper-builder-react-jsx": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3" + "@babel/helper-builder-react-jsx-experimental": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-jsx": "^7.10.4" } }, "@babel/plugin-transform-react-jsx-self": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.8.3.tgz", - "integrity": "sha512-01OT7s5oa0XTLf2I8XGsL8+KqV9lx3EZV+jxn/L2LQ97CGKila2YMroTkCEIE0HV/FF7CMSRsIAybopdN9NTdg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.10.4.tgz", + "integrity": "sha512-yOvxY2pDiVJi0axdTWHSMi5T0DILN+H+SaeJeACHKjQLezEzhLx9nEF9xgpBLPtkZsks9cnb5P9iBEi21En3gg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-jsx": "^7.10.4" } }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.8.3.tgz", - "integrity": "sha512-PLMgdMGuVDtRS/SzjNEQYUT8f4z1xb2BAT54vM1X5efkVuYBf5WyGUMbpmARcfq3NaglIwz08UVQK4HHHbC6ag==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.10.5.tgz", + "integrity": "sha512-wTeqHVkN1lfPLubRiZH3o73f4rfon42HpgxUSs86Nc+8QIcm/B9s8NNVXu/gwGcOyd7yDib9ikxoDLxJP0UiDA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-jsx": "^7.10.4" + } + }, + "@babel/plugin-transform-react-pure-annotations": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.10.4.tgz", + "integrity": "sha512-+njZkqcOuS8RaPakrnR9KvxjoG1ASJWpoIv/doyWngId88JoFlPlISenGXjrVacZUIALGUr6eodRs1vmPnF23A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-regenerator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", - "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.4.tgz", + "integrity": "sha512-3thAHwtor39A7C04XucbMg17RcZ3Qppfxr22wYzZNcVIkPHfpM9J0SO8zuCV6SZa265kxBJSrfKTvDCYqBFXGw==", "dev": true, "requires": { - "regenerator-transform": "^0.14.0" + "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", - "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.4.tgz", + "integrity": "sha512-hGsw1O6Rew1fkFbDImZIEqA8GoidwTAilwCyWqLBM9f+e/u/sQMQu7uX6dyokfOayRuuVfKOW4O7HvaBWM+JlQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", - "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.4.tgz", + "integrity": "sha512-AC2K/t7o07KeTIxMoHneyX90v3zkm5cjHJEokrPEAGEy3UCp8sLKfnfOIGdZ194fyN4wfX/zZUWT9trJZ0qc+Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", - "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.11.0.tgz", + "integrity": "sha512-UwQYGOqIdQJe4aWNyS7noqAnN2VbaczPLiEtln+zPowRNlD+79w3oi2TWfYe0eZgd+gjZCbsydN7lzWysDt+gw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.11.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", - "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.4.tgz", + "integrity": "sha512-Ddy3QZfIbEV0VYcVtFDCjeE4xwVTJWTmUtorAJkn6u/92Z/nWJNV+mILyqHKrUxXYKA2EoCilgoPePymKL4DvQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-regex": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-regex": "^7.10.4" } }, "@babel/plugin-transform-template-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", - "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.5.tgz", + "integrity": "sha512-V/lnPGIb+KT12OQikDvgSuesRX14ck5FfJXt6+tXhdkJ+Vsd0lDCVtF6jcB4rNClYFzaB2jusZ+lNISDk2mMMw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", - "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.4.tgz", + "integrity": "sha512-QqNgYwuuW0y0H+kUE/GWSR45t/ccRhe14Fs/4ZRouNNQsyd4o3PG4OtHiIrepbM2WKUBDAXKCAK/Lk4VhzTaGA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz", + "integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", - "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.4.tgz", + "integrity": "sha512-wNfsc4s8N2qnIwpO/WP2ZiSyjfpTamT2C9V9FDH/Ljub9zw6P3SjkXcFmc0RQUt96k2fmIvtla2MMjgTwIAC+A==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/polyfill": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.3.tgz", - "integrity": "sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.10.4.tgz", + "integrity": "sha512-8BYcnVqQ5kMD2HXoHInBH7H1b/uP3KdnwCYXOqFnXqguOyuu443WXusbIUbWEfY3Z0Txk0M1uG/8YuAMhNl6zg==", "dev": true, "requires": { "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.2" + "regenerator-runtime": "^0.13.4" } }, "@babel/preset-env": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.4.tgz", - "integrity": "sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.8.4", - "@babel/helper-compilation-targets": "^7.8.4", - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-proposal-async-generator-functions": "^7.8.3", - "@babel/plugin-proposal-dynamic-import": "^7.8.3", - "@babel/plugin-proposal-json-strings": "^7.8.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.8.3", - "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.8.3", - "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.0.tgz", + "integrity": "sha512-2u1/k7rG/gTh02dylX2kL3S0IJNF+J6bfDSp4DI2Ma8QN6Y9x9pmAax59fsCk6QUQG0yqH47yJWA+u1I1LccAg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.11.0", + "@babel/helper-compilation-targets": "^7.10.4", + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-proposal-async-generator-functions": "^7.10.4", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-dynamic-import": "^7.10.4", + "@babel/plugin-proposal-export-namespace-from": "^7.10.4", + "@babel/plugin-proposal-json-strings": "^7.10.4", + "@babel/plugin-proposal-logical-assignment-operators": "^7.11.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", + "@babel/plugin-proposal-numeric-separator": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.11.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.10.4", + "@babel/plugin-proposal-optional-chaining": "^7.11.0", + "@babel/plugin-proposal-private-methods": "^7.10.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.10.4", "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.8.3", - "@babel/plugin-transform-arrow-functions": "^7.8.3", - "@babel/plugin-transform-async-to-generator": "^7.8.3", - "@babel/plugin-transform-block-scoped-functions": "^7.8.3", - "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.8.3", - "@babel/plugin-transform-computed-properties": "^7.8.3", - "@babel/plugin-transform-destructuring": "^7.8.3", - "@babel/plugin-transform-dotall-regex": "^7.8.3", - "@babel/plugin-transform-duplicate-keys": "^7.8.3", - "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.8.4", - "@babel/plugin-transform-function-name": "^7.8.3", - "@babel/plugin-transform-literals": "^7.8.3", - "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.8.3", - "@babel/plugin-transform-modules-commonjs": "^7.8.3", - "@babel/plugin-transform-modules-systemjs": "^7.8.3", - "@babel/plugin-transform-modules-umd": "^7.8.3", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", - "@babel/plugin-transform-new-target": "^7.8.3", - "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.8.4", - "@babel/plugin-transform-property-literals": "^7.8.3", - "@babel/plugin-transform-regenerator": "^7.8.3", - "@babel/plugin-transform-reserved-words": "^7.8.3", - "@babel/plugin-transform-shorthand-properties": "^7.8.3", - "@babel/plugin-transform-spread": "^7.8.3", - "@babel/plugin-transform-sticky-regex": "^7.8.3", - "@babel/plugin-transform-template-literals": "^7.8.3", - "@babel/plugin-transform-typeof-symbol": "^7.8.4", - "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/types": "^7.8.3", - "browserslist": "^4.8.5", + "@babel/plugin-syntax-top-level-await": "^7.10.4", + "@babel/plugin-transform-arrow-functions": "^7.10.4", + "@babel/plugin-transform-async-to-generator": "^7.10.4", + "@babel/plugin-transform-block-scoped-functions": "^7.10.4", + "@babel/plugin-transform-block-scoping": "^7.10.4", + "@babel/plugin-transform-classes": "^7.10.4", + "@babel/plugin-transform-computed-properties": "^7.10.4", + "@babel/plugin-transform-destructuring": "^7.10.4", + "@babel/plugin-transform-dotall-regex": "^7.10.4", + "@babel/plugin-transform-duplicate-keys": "^7.10.4", + "@babel/plugin-transform-exponentiation-operator": "^7.10.4", + "@babel/plugin-transform-for-of": "^7.10.4", + "@babel/plugin-transform-function-name": "^7.10.4", + "@babel/plugin-transform-literals": "^7.10.4", + "@babel/plugin-transform-member-expression-literals": "^7.10.4", + "@babel/plugin-transform-modules-amd": "^7.10.4", + "@babel/plugin-transform-modules-commonjs": "^7.10.4", + "@babel/plugin-transform-modules-systemjs": "^7.10.4", + "@babel/plugin-transform-modules-umd": "^7.10.4", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.4", + "@babel/plugin-transform-new-target": "^7.10.4", + "@babel/plugin-transform-object-super": "^7.10.4", + "@babel/plugin-transform-parameters": "^7.10.4", + "@babel/plugin-transform-property-literals": "^7.10.4", + "@babel/plugin-transform-regenerator": "^7.10.4", + "@babel/plugin-transform-reserved-words": "^7.10.4", + "@babel/plugin-transform-shorthand-properties": "^7.10.4", + "@babel/plugin-transform-spread": "^7.11.0", + "@babel/plugin-transform-sticky-regex": "^7.10.4", + "@babel/plugin-transform-template-literals": "^7.10.4", + "@babel/plugin-transform-typeof-symbol": "^7.10.4", + "@babel/plugin-transform-unicode-escapes": "^7.10.4", + "@babel/plugin-transform-unicode-regex": "^7.10.4", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.11.0", + "browserslist": "^4.12.0", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", "levenary": "^1.1.1", "semver": "^5.5.0" } }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, "@babel/preset-react": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.8.3.tgz", - "integrity": "sha512-9hx0CwZg92jGb7iHYQVgi0tOEHP/kM60CtWJQnmbATSPIQQ2xYzfoCI3EdqAhFBeeJwYMdWQuDUHMsuDbH9hyQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.10.4.tgz", + "integrity": "sha512-BrHp4TgOIy4M19JAfO1LhycVXOPWdDbTRep7eVyatf174Hff+6Uk53sDyajqZPu8W1qXRBiYOfIamek6jA7YVw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-transform-react-display-name": "^7.8.3", - "@babel/plugin-transform-react-jsx": "^7.8.3", - "@babel/plugin-transform-react-jsx-self": "^7.8.3", - "@babel/plugin-transform-react-jsx-source": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-transform-react-display-name": "^7.10.4", + "@babel/plugin-transform-react-jsx": "^7.10.4", + "@babel/plugin-transform-react-jsx-development": "^7.10.4", + "@babel/plugin-transform-react-jsx-self": "^7.10.4", + "@babel/plugin-transform-react-jsx-source": "^7.10.4", + "@babel/plugin-transform-react-pure-annotations": "^7.10.4" } }, "@babel/register": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.8.3.tgz", - "integrity": "sha512-t7UqebaWwo9nXWClIPLPloa5pN33A2leVs8Hf0e9g9YwUP8/H9NeR7DJU+4CXo23QtjChQv5a3DjEtT83ih1rg==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.10.5.tgz", + "integrity": "sha512-eYHdLv43nyvmPn9bfNfrcC4+iYNwdQ8Pxk1MFJuU/U5LpSYl/PH4dFMazCYZDFVi8ueG3shvO+AQfLrxpYulQw==", "dev": true, "requires": { "find-cache-dir": "^2.0.0", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "make-dir": "^2.1.0", "pirates": "^4.0.0", "source-map-support": "^0.5.16" } }, + "@babel/runtime": { + "version": "7.11.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", + "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.4.tgz", - "integrity": "sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", + "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", "dev": true, "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.4", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.4", - "@babel/types": "^7.8.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.11.0", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.11.0", + "@babel/types": "^7.11.0", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", + "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", "dev": true, "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, @@ -1025,9 +1218,9 @@ "dev": true }, "@types/cheerio": { - "version": "0.22.16", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.16.tgz", - "integrity": "sha512-bSbnU/D4yzFdzLpp3+rcDj0aQQMIRUBNJU7azPxdqMpnexjUSvGJyDuOBQBHeOZh1mMKgsJm6Dy+LLh80Ew4tQ==", + "version": "0.22.21", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.21.tgz", + "integrity": "sha512-aGI3DfswwqgKPiEOTaiHV2ZPC9KEhprpgEbJnv0fZl3SGX0cGgEva1126dGrMC6AJM6v/aihlUgJn9M5DbDZ/Q==", "dev": true, "requires": { "@types/node": "*" @@ -1040,15 +1233,15 @@ "dev": true }, "@types/node": { - "version": "13.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", - "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==", + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.0.tgz", + "integrity": "sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA==", "dev": true }, "@types/q": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz", - "integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", "dev": true }, "accepts": { @@ -1068,9 +1261,9 @@ "dev": true }, "ajv": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz", - "integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==", + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", + "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -1101,18 +1294,19 @@ } }, "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, "ansi-wrap": { @@ -1143,9 +1337,9 @@ } }, "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.2.tgz", + "integrity": "sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==", "dev": true }, "archive-type": { @@ -1289,37 +1483,18 @@ } }, "autoprefixer": { - "version": "9.7.4", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz", - "integrity": "sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g==", + "version": "9.8.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", + "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", "dev": true, "requires": { - "browserslist": "^4.8.3", - "caniuse-lite": "^1.0.30001020", - "chalk": "^2.4.2", + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.26", - "postcss-value-parser": "^4.0.2" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" } }, "aws-sign2": { @@ -1329,9 +1504,9 @@ "dev": true }, "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", "dev": true }, "babel-code-frame": { @@ -1345,6 +1520,12 @@ "js-tokens": "^3.0.2" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -1376,6 +1557,15 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -1385,9 +1575,9 @@ } }, "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, "requires": { "object.assign": "^4.1.0" @@ -1852,20 +2042,21 @@ } }, "browserslist": { - "version": "4.8.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz", - "integrity": "sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.0.tgz", + "integrity": "sha512-pUsXKAF2lVwhmtpeA3LJrZ76jXuusrNyhduuQs7CDFf9foT4Y38aQOserd2lMe5DSSrjf3fx34oHwryuvxAUgQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001023", - "electron-to-chromium": "^1.3.341", - "node-releases": "^1.1.47" + "caniuse-lite": "^1.0.30001111", + "electron-to-chromium": "^1.3.523", + "escalade": "^3.0.2", + "node-releases": "^1.1.60" } }, "buffer": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", - "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", "dev": true, "requires": { "base64-js": "^1.0.2", @@ -2009,9 +2200,9 @@ "dev": true }, "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "camelcase-keys": { @@ -2022,6 +2213,14 @@ "requires": { "camelcase": "^2.0.0", "map-obj": "^1.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + } } }, "caniuse-api": { @@ -2037,9 +2236,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001027", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001027.tgz", - "integrity": "sha512-7xvKeErvXZFtUItTHgNtLgS9RJpVnwBlWX8jSo/BO8VsF6deszemZSkJJJA1KOKrXuzZH4WALpAJdq5EyfgMLg==", + "version": "1.0.30001115", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001115.tgz", + "integrity": "sha512-NZrG0439ePYna44lJX8evHX2L7Z3/z3qjVLnHgbBb/duNEnGo348u+BQS5o4HTWcrb++100dHFrU36IesIrC1Q==", "dev": true }, "caseless": { @@ -2070,44 +2269,19 @@ "supports-color": "^7.1.0" }, "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" + "has-flag": "^4.0.0" } } } @@ -2247,15 +2421,15 @@ } }, "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", "dev": true }, "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", + "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", "dev": true, "optional": true, "requires": { @@ -2264,6 +2438,17 @@ "tiny-emitter": "^2.0.0" } }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -2284,6 +2469,15 @@ "q": "^1.1.2" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2295,6 +2489,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2327,21 +2536,38 @@ "requires": { "color-convert": "^1.9.1", "color-string": "^1.5.2" + }, + "dependencies": { + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "color-string": { @@ -2354,6 +2580,12 @@ "simple-swizzle": "^0.2.2" } }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2487,12 +2719,12 @@ "dev": true }, "core-js-compat": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", - "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", + "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", "dev": true, "requires": { - "browserslist": "^4.8.3", + "browserslist": "^4.8.5", "semver": "7.0.0" }, "dependencies": { @@ -2542,6 +2774,17 @@ "request": "^2.53.0", "yamljs": "^0.2.1", "yargs": "^2.3.0" + }, + "dependencies": { + "yargs": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", + "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", + "dev": true, + "requires": { + "wordwrap": "0.0.2" + } + } } }, "css-color-names": { @@ -2596,22 +2839,16 @@ } } }, - "css-unit-converter": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/css-unit-converter/-/css-unit-converter-1.1.1.tgz", - "integrity": "sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY=", - "dev": true - }, "css-what": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", - "integrity": "sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.3.0.tgz", + "integrity": "sha512-pv9JPyatiPaQ6pf4OvD/dbfm0o5LviWmwxNWzblYf/1u9QZd0ihV+PMwy5jdQWQ3349kZmKEx9WXuSka2dM4cg==", "dev": true }, "cssesc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz", - "integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, "cssnano": { @@ -2692,12 +2929,36 @@ "dev": true }, "csso": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.2.tgz", - "integrity": "sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz", + "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==", "dev": true, "requires": { - "css-tree": "1.0.0-alpha.37" + "css-tree": "1.0.0-alpha.39" + }, + "dependencies": { + "css-tree": { + "version": "1.0.0-alpha.39", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz", + "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==", + "dev": true, + "requires": { + "mdn-data": "2.0.6", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz", + "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "currently-unhandled": { @@ -2740,9 +3001,9 @@ "dev": true }, "decompress": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.0.tgz", - "integrity": "sha1-eu3YVCflqS2s/lVnSnxQXpbQH50=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "dev": true, "requires": { "decompress-tar": "^4.0.0", @@ -3009,21 +3270,21 @@ } }, "docusaurus": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.4.tgz", - "integrity": "sha512-KALmrlZBc0E+AB0ITR4POGKv8WcrcSSxvmgq7nC3TdpS+S2hrlXN/2tV3tVOZ8q8m+zhcMs7l9mAIhGFQyQwIw==", - "dev": true, - "requires": { - "@babel/core": "^7.7.4", - "@babel/plugin-proposal-class-properties": "^7.7.4", - "@babel/plugin-proposal-object-rest-spread": "^7.7.4", - "@babel/polyfill": "^7.7.0", - "@babel/preset-env": "^7.7.4", - "@babel/preset-react": "^7.7.4", - "@babel/register": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", - "autoprefixer": "^9.7.2", + "version": "1.14.6", + "resolved": "https://registry.npmjs.org/docusaurus/-/docusaurus-1.14.6.tgz", + "integrity": "sha512-Hpo6xqYIHwazwuhXW25AKYv/os+dWoJ87qql/m1j1xp83h/BnfYV2l8PA8zLggF1wGUbJQbTx7GWo6QvD8z+4Q==", + "dev": true, + "requires": { + "@babel/core": "^7.9.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.0", + "@babel/polyfill": "^7.8.7", + "@babel/preset-env": "^7.9.0", + "@babel/preset-react": "^7.9.4", + "@babel/register": "^7.9.0", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0", + "autoprefixer": "^9.7.5", "babylon": "^6.18.0", "chalk": "^3.0.0", "classnames": "^2.2.6", @@ -3054,7 +3315,7 @@ "react-dom": "^16.8.4", "remarkable": "^2.0.0", "request": "^2.88.0", - "shelljs": "^0.8.3", + "shelljs": "^0.8.4", "sitemap": "^3.2.2", "tcp-port-used": "^1.0.1", "tiny-lr": "^1.1.1", @@ -3106,12 +3367,12 @@ } }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz", + "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==", "dev": true, "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" } }, "download": { @@ -3157,9 +3418,9 @@ } }, "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, "duplexer3": { @@ -3185,15 +3446,15 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.349", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.349.tgz", - "integrity": "sha512-uEb2zs6EJ6OZIqaMsCSliYVgzE/f7/s1fLWqtvRtHg/v5KBF2xds974fUnyatfxIDgkqzQVwFtam5KExqywx0Q==", + "version": "1.3.534", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.534.tgz", + "integrity": "sha512-7x2S3yUrspNHQOoPk+Eo+iHViSiJiEGPI6BpmLy1eT2KRNGCkBt/NUYqjfXLd1DpDCQp7n3+LfA1RkbG+LqTZQ==", "dev": true }, "emoji-regex": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", - "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "emojis-list": { @@ -3218,9 +3479,9 @@ } }, "entities": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", - "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", "dev": true }, "error": { @@ -3242,22 +3503,22 @@ } }, "es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", "object-inspect": "^1.7.0", "object-keys": "^1.1.1", "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, "es-to-primitive": { @@ -3271,6 +3532,12 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3654,9 +3921,9 @@ "dev": true }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-glob": { @@ -3698,9 +3965,9 @@ } }, "feed": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/feed/-/feed-4.1.0.tgz", - "integrity": "sha512-dAXWXM8QMxZ1DRnAxDmy1MaWZFlh1Ku7TU3onbXgHrVJynsxkNGPUed1AxszVW8AXo43xExronVkIqK+ACsoBA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/feed/-/feed-4.2.1.tgz", + "integrity": "sha512-l28KKcK1J/u3iq5dRDmmoB2p7dtBfACC2NqJh4dI2kFptxH0asfjmOfcxqh5Sv8suAlVa73gZJ4REY5RrafVvg==", "dev": true, "requires": { "xml-js": "^1.6.11" @@ -3827,12 +4094,13 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "find-versions": { @@ -3872,6 +4140,15 @@ "worker-rpc": "^0.1.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -3883,6 +4160,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3957,561 +4249,14 @@ "dev": true }, "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, "optional": true, "requires": { "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } + "nan": "^2.12.1" } }, "function-bind": { @@ -4535,6 +4280,12 @@ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", "dev": true }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-proxy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", @@ -4623,12 +4374,20 @@ } }, "github-slugger": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.2.1.tgz", - "integrity": "sha512-SsZUjg/P03KPzQBt7OxJPasGw6NRO5uOgiZ5RGXVud5iSIZ0eNZeNp5rTwCxtavrRUa/A77j8mePVc5lEvk0KQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.3.0.tgz", + "integrity": "sha512-gwJScWVNhFYSRDvURk/8yhcFBee6aFjye2a7Lhb2bUyRulpIoek9p0I9Kt7PT67d/nUlZbFu8L9RLiA0woQN8Q==", "dev": true, "requires": { "emoji-regex": ">=6.0.0 <=6.1.1" + }, + "dependencies": { + "emoji-regex": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-6.1.1.tgz", + "integrity": "sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4=", + "dev": true + } } }, "glob": { @@ -4722,9 +4481,9 @@ } }, "globule": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.0.tgz", - "integrity": "sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz", + "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==", "dev": true, "requires": { "glob": "~7.1.1", @@ -4765,15 +4524,9 @@ } }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", - "dev": true - }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, "gray-matter": { @@ -4828,12 +4581,12 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -4853,6 +4606,14 @@ "dev": true, "requires": { "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + } } }, "has-flag": { @@ -4921,21 +4682,21 @@ "dev": true }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "version": "9.18.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.3.tgz", + "integrity": "sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ==", "dev": true }, "highlightjs-4d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/highlightjs-4d/-/highlightjs-4d-1.0.0.tgz", - "integrity": "sha512-P7A4qrxP7Tob/YtWsqf3p3QM13NZ78ml0UwqHWn0rnI7SXUVwFLYsSo3IsVaWCXma38OjlxmbUUqiaZ4Aed70g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/highlightjs-4d/-/highlightjs-4d-1.0.6.tgz", + "integrity": "sha512-CLLwv21UNx4T7lXL6+cjMMGUOvLwupCc9qPVrZNEHofsuWmvQTGmA0A2lmNNk1vgoWeTitaV7vsmOq58HDT6SQ==", "dev": true }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "hsl-regex": { @@ -4977,9 +4738,9 @@ "dev": true }, "readable-stream": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz", - "integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -5017,9 +4778,9 @@ } }, "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.2.tgz", + "integrity": "sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ==", "dev": true }, "http-signature": { @@ -5121,13 +4882,24 @@ } }, "imagemin-svgo": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.0.0.tgz", - "integrity": "sha512-+iGJFaPIMx8TjFW6zN+EkOhlqcemdL7F3N3Y0wODvV2kCUBuUtZK7DRZc1+Zfu4U2W/lTMUyx2G8YMOrZntIWg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/imagemin-svgo/-/imagemin-svgo-7.1.0.tgz", + "integrity": "sha512-0JlIZNWP0Luasn1HT82uB9nU9aa+vUj6kpT+MjPW11LbprXC+iC4HDwn1r4Q2/91qj4iy9tRZNsFySMlEpLdpg==", "dev": true, "requires": { - "is-svg": "^3.0.0", - "svgo": "^1.0.5" + "is-svg": "^4.2.1", + "svgo": "^1.3.2" + }, + "dependencies": { + "is-svg": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.1.tgz", + "integrity": "sha512-PHx3ANecKsKNl5y5+Jvt53Y4J7MfMpbNZkv384QNiswMKAWIbvcqbPz+sYbFKJI8Xv3be01GSFniPmoaP+Ai5A==", + "dev": true, + "requires": { + "html-comment-regex": "^1.1.2" + } + } } }, "immer": { @@ -5211,11 +4983,20 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5227,6 +5008,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -5242,6 +5038,33 @@ "escape-string-regexp": "^1.0.5" } }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -5249,14 +5072,22 @@ "dev": true, "requires": { "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } } } } }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "into-stream": { @@ -5285,9 +5116,9 @@ "dev": true }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, "is-absolute-url": { @@ -5338,9 +5169,9 @@ "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", "dev": true }, "is-color-stop": { @@ -5427,9 +5258,9 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "is-gif": { @@ -5483,9 +5314,9 @@ } }, "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, "is-object": { @@ -5515,19 +5346,13 @@ "integrity": "sha1-1XSxK/J1wDUEVVcLDltXqwYgd84=", "dev": true }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has": "^1.0.3" + "has-symbols": "^1.0.1" } }, "is-resolvable": { @@ -5665,9 +5490,9 @@ "dev": true }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -5723,12 +5548,12 @@ "dev": true }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" } }, "jsonfile": { @@ -5891,19 +5716,18 @@ } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "lodash._reinterpolate": { @@ -6208,9 +6032,9 @@ "dev": true }, "merge2": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "methods": { @@ -6253,18 +6077,18 @@ "dev": true }, "mime-db": { - "version": "1.43.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", "dev": true }, "mime-types": { - "version": "2.1.26", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", - "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", "dev": true, "requires": { - "mime-db": "1.43.0" + "mime-db": "1.44.0" } }, "mimic-fn": { @@ -6289,9 +6113,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "mixin-deep": { @@ -6316,20 +6140,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "ms": { @@ -6345,9 +6161,9 @@ "dev": true }, "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", "dev": true, "optional": true }, @@ -6389,21 +6205,10 @@ "dev": true }, "node-releases": { - "version": "1.1.49", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.49.tgz", - "integrity": "sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg==", - "dev": true, - "requires": { - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } + "version": "1.1.60", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.60.tgz", + "integrity": "sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA==", + "dev": true }, "normalize-package-data": { "version": "2.5.0", @@ -6521,9 +6326,9 @@ } }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", "dev": true }, "object-keys": { @@ -6683,21 +6488,21 @@ "dev": true }, "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-map-series": { @@ -6765,9 +6570,9 @@ "dev": true }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "path-is-absolute": { @@ -6860,6 +6665,42 @@ "dev": true, "requires": { "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } }, "pkg-up": { @@ -6913,18 +6754,24 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true } } }, "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", "dev": true, "requires": { "async": "^2.6.2", "debug": "^3.1.1", - "mkdirp": "^0.5.1" + "mkdirp": "^0.5.5" }, "dependencies": { "debug": { @@ -6945,9 +6792,9 @@ "dev": true }, "postcss": { - "version": "7.0.26", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.26.tgz", - "integrity": "sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA==", + "version": "7.0.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", + "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -6955,6 +6802,15 @@ "supports-color": "^6.1.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -6977,6 +6833,21 @@ } } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7001,23 +6872,14 @@ } }, "postcss-calc": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.1.tgz", - "integrity": "sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.3.tgz", + "integrity": "sha512-IB/EAEmZhIMEIhG7Ov4x+l47UaXOS1n2f4FBUk/aKllQhtSCxWhTzn0nJgkqN7fo/jcWySvWTSB6Syk9L+31bA==", "dev": true, "requires": { - "css-unit-converter": "^1.1.1", - "postcss": "^7.0.5", - "postcss-selector-parser": "^5.0.0-rc.4", - "postcss-value-parser": "^3.3.1" - }, - "dependencies": { - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", - "dev": true - } + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" } }, "postcss-colormin": { @@ -7130,12 +6992,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -7215,12 +7077,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -7442,12 +7304,12 @@ } }, "postcss-selector-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz", - "integrity": "sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", "dev": true, "requires": { - "cssesc": "^2.0.0", + "cssesc": "^3.0.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -7484,9 +7346,9 @@ } }, "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", "dev": true }, "prepend-http": { @@ -7496,20 +7358,14 @@ "dev": true }, "prismjs": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.19.0.tgz", - "integrity": "sha512-IVFtbW9mCWm9eOIaEkNyo2Vl4NnEifis2GQ7/MLRG5TQe6t+4Sj9J5QWI9i3v+SS43uZBlCAOn+zYTVYQcPXJw==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.21.0.tgz", + "integrity": "sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw==", "dev": true, "requires": { "clipboard": "^2.0.0" } }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -7534,13 +7390,13 @@ "dev": true }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "pseudomap": { @@ -7550,9 +7406,9 @@ "dev": true }, "psl": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", - "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "pump": { @@ -7595,9 +7451,9 @@ } }, "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "randomatic": { @@ -7638,9 +7494,9 @@ } }, "react": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.12.0.tgz", - "integrity": "sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -7696,6 +7552,15 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "browserslist": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", @@ -7718,6 +7583,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -7737,6 +7617,40 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -7749,27 +7663,27 @@ } }, "react-dom": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.12.0.tgz", - "integrity": "sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", + "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.18.0" + "scheduler": "^0.19.1" } }, "react-error-overlay": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.5.tgz", - "integrity": "sha512-+DMR2k5c6BqMDSMF8hLH0vYKtKTeikiFW+fj0LClN+XZg4N9b8QUAdHC62CGWNLTi/gnuuemNcNcTFrCvK1f+A==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.7.tgz", + "integrity": "sha512-TAv1KJFh3RhqxNvhzxj6LeT5NWklP6rDr2a0jaTfsZ5wSZWHOGeqQyejUp3xxLfPt2UpyJEcVQB/zyPcmonNFA==", "dev": true }, "react-is": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", - "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, "read-pkg": { @@ -7888,33 +7802,33 @@ } }, "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", + "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==", "dev": true }, "regenerate-unicode-properties": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", - "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" } }, "regenerator-runtime": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", - "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, "regenerator-transform": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", - "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "private": "^0.1.6" + "@babel/runtime": "^7.8.4" } }, "regex-not": { @@ -7928,29 +7842,29 @@ } }, "regexpu-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", - "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.1.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" + "unicode-match-property-value-ecmascript": "^1.2.0" } }, "regjsgen": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", - "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, "regjsparser": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.2.tgz", - "integrity": "sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -7965,9 +7879,9 @@ } }, "remarkable": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.0.tgz", - "integrity": "sha512-3gvKFAgL4xmmVRKAMNm6UzDo/rO2gPVkZrWagp6AXEA4JvCcMcRx9aapYbb7AJAmLLvi/u06+EhzqoS7ha9qOg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", "dev": true, "requires": { "argparse": "^1.0.10", @@ -7975,9 +7889,9 @@ }, "dependencies": { "autolinker": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.11.1.tgz", - "integrity": "sha512-6sAmetStorjXvwmV8MBxI5DGICHKD1B5EjdkIrq34X6YBDN6jj54EUHnoHgNqmNCclcf8c409zuVMNy449u80g==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.1.tgz", + "integrity": "sha512-yvsRHIaY51EYDml6MGlbqyJGfl4n7zezGYf+R7gvM8c5LNpRGc4SISkvgAswSS8SWxk/OrGCylKV9mJyVstz7w==", "dev": true, "requires": { "tslib": "^1.9.3" @@ -8013,9 +7927,9 @@ } }, "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", "dev": true }, "request": { @@ -8046,6 +7960,18 @@ "uuid": "^3.3.2" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -8053,9 +7979,9 @@ "dev": true }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -8120,18 +8046,15 @@ } }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true }, "rxjs": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", - "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", + "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -8171,9 +8094,9 @@ "dev": true }, "scheduler": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.18.0.tgz", - "integrity": "sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -8181,22 +8104,19 @@ } }, "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", "dev": true, "requires": { - "commander": "~2.8.1" + "commander": "^2.8.1" }, "dependencies": { "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dev": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true } } }, @@ -8286,6 +8206,12 @@ "send": "0.17.1" } }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "set-getter": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz", @@ -8346,9 +8272,9 @@ "dev": true }, "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", "dev": true, "requires": { "glob": "^7.0.0", @@ -8357,9 +8283,9 @@ } }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "simple-swizzle": { @@ -8582,9 +8508,9 @@ } }, "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -8606,9 +8532,9 @@ "dev": true }, "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -8616,15 +8542,15 @@ } }, "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -8663,6 +8589,12 @@ "lpad-align": "^1.0.1" }, "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", @@ -8688,6 +8620,15 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -8759,50 +8700,34 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5" } }, - "string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "dev": true, "requires": { "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "es-abstract": "^1.17.5" } }, "string_decoder": { @@ -8815,12 +8740,12 @@ } }, "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "ansi-regex": "^5.0.0" } }, "strip-bom": { @@ -8891,12 +8816,12 @@ }, "dependencies": { "postcss-selector-parser": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz", - "integrity": "sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", "dev": true, "requires": { - "dot-prop": "^4.1.1", + "dot-prop": "^5.2.0", "indexes-of": "^1.0.1", "uniq": "^1.0.1" } @@ -8933,6 +8858,15 @@ "util.promisify": "~1.0.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -8944,6 +8878,21 @@ "supports-color": "^5.3.0" } }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -9180,18 +9129,18 @@ } }, "tree-node-cli": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.2.5.tgz", - "integrity": "sha512-Yhv4bfLa3WYdJLS4FkCj0h72duPGMUjC6Ld8eBlT9BA3CfjeQyHNBfgtzQvDrw1OkQva2JSpUyslZHuweCRtGQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/tree-node-cli/-/tree-node-cli-1.4.0.tgz", + "integrity": "sha512-hBc/cp7rTSHFSFvaTzmHNYyJv87UJBsxsfCoq2DtDQuMES4vhnLuvXZit/asGtZG8edWTCydWeFWoBz9LYkJdQ==", "dev": true, "requires": { - "commander": "^2.15.1" + "commander": "^5.0.0" }, "dependencies": { "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", "dev": true } } @@ -9230,9 +9179,9 @@ } }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", "dev": true }, "tunnel-agent": { @@ -9267,9 +9216,9 @@ "dev": true }, "unbzip2-stream": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", - "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "requires": { "buffer": "^5.2.1", @@ -9293,15 +9242,15 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, "union-value": { @@ -9508,20 +9457,20 @@ "dev": true }, "websocket-driver": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", - "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", "dev": true, "requires": { - "http-parser-js": ">=0.4.0 <0.4.11", + "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "whatwg-url": { @@ -9544,6 +9493,12 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", @@ -9559,6 +9514,17 @@ "microevent.ts": "~0.1.1" } }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -9586,6 +9552,12 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", @@ -9603,12 +9575,32 @@ } }, "yargs": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-2.3.0.tgz", - "integrity": "sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s=", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { - "wordwrap": "0.0.2" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, "yauzl": { diff --git a/website/package.json b/website/package.json index c0f841ce03a3c7..6f81645678330c 100644 --- a/website/package.json +++ b/website/package.json @@ -4,15 +4,17 @@ "crowdin-upload": "crowdin --config ../crowdin.yaml upload sources --auto-update -b master", "crowdin-download": "crowdin --config ../crowdin.yaml download -b master", "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", + "build": "doc_preprocess --path ../docs/ --syntax='./syntax/' --config='../docs/preprocessing.conf' --output ../docs/ && doc_preprocess --path 'translated_docs/*' --syntax='./syntax/' --config='../docs/preprocessing.conf' --output translated_docs/ && docusaurus-build", + "start": "doc_preprocess --path ../docs/ --output ../docsPostProcessed/ && docusaurus-start", + "doc": "doc_preprocess --path ../docs/ --output ../docsPostProcessed/", "publish-gh-pages": "docusaurus-publish", "write-translations": "docusaurus-write-translations", "version": "docusaurus-version", "rename-version": "docusaurus-rename-version" }, "devDependencies": { - "docusaurus": "^1.14.4", - "highlightjs-4d": "^1.0.0" + "@4dsas/doc_preprocessing": "^1.0.13", + "docusaurus": "^1.14.6", + "highlightjs-4d": "^1.0.6" } } diff --git a/website/pages/en/index.js b/website/pages/en/index.js index b84a699199fce9..7cb4de24116580 100644 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -37,19 +37,37 @@ class Index extends React.Component { const {config: siteConfig, language = 'en'} = this.props; const pinnedUsersToShowcase = siteConfig.users.filter(user => user.pinned); var subContents={ + installation: Installation, + start: Starting 4D, languageConcepts: Language Concepts, - projectDatabases: Project databases, - formEditor: Forms, + projectDatabases: Project Management, + ORDA: Object Relational Data Access (ORDA), + class: Class API Reference, + formEditor: Forms, formProperties: Form Properties, events: Form Events, formObjects: Form Objects, formObjectProperties: Form Object Properties, menus: Menus, webServer: Web Server, + webDev: Web Development, restServer: REST Server, msc: Maintenance and Security Center, backup: Backup and Restore, - users: Users and Groups + licenses: License Management, + buildApp: Build Application, + webAdmin: Web Administration, + serverAdmin: 4D Server Administration Window, + components: 4D Components Library, + cs: Client/Server, + tls: TLS Protocol (HTTPS), + debugging: Debugging, + dataExplorer: Web Data Explorer, + langRef: Language Reference (4D Doc Center), + users: Access Rights, + debugLogFiles: Description of log files, + cli: Command Line Interface, + preferences:Preferences }; @@ -63,27 +81,41 @@ 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)`, image: `${siteConfig.baseUrl}img/illu_GettingStarted.png`, imageAlign: 'top', imageAlt: 'Get started', title: Getting started, }, { - - content: `[${subContents.formEditor}](${siteConfig.baseUrl}${this.props.language}/FormEditor/forms.html)
    [${subContents.formProperties}](${siteConfig.baseUrl}${this.props.language}/FormEditor/jsonReference.html)
    [${subContents.formObjects}](${siteConfig.baseUrl}${this.props.language}/FormObjects/formObjectsOverview.html)
    [${subContents.formObjectProperties}](${siteConfig.baseUrl}${this.props.language}/FormObjects/propertiesReference.html)
    [${subContents.events}](${siteConfig.baseUrl}${this.props.language}/Events/overview.html)
    [${subContents.menus}](${siteConfig.baseUrl}${this.props.language}/Menus/overview.html)`, - //image: `${siteConfig.baseUrl}img/illu_DesktopApplication.png`, - image: `${siteConfig.baseUrl}img/illu_DesktopApplication.png`, - imageAlign: 'top', - imageAlt: 'Desktop', - title: Developing a Desktop application, + content: `[${subContents.projectDatabases}](${siteConfig.baseUrl}${this.props.language}/Project/overview.html)
    + [${subContents.languageConcepts}](${siteConfig.baseUrl}${this.props.language}/Concepts/about.html)
    + [${subContents.langRef}](https://doc.4d.com/4Dv19/4D/19/4D-Language-Reference.100-5391516.en.html)
    + [${subContents.ORDA}](${siteConfig.baseUrl}${this.props.language}/ORDA/overview.html)
    + [${subContents.class}](${siteConfig.baseUrl}${this.props.language}/API/overview.html)
    + [${subContents.debugging}](${siteConfig.baseUrl}${this.props.language}/Debugging/basics.html)
    + [${subContents.users}](${siteConfig.baseUrl}${this.props.language}/Users/overview.html)
    + [${subContents.preferences}](${siteConfig.baseUrl}${this.props.language}/Preferences/overview.html)
    + [${subContents.components}](${siteConfig.baseUrl}${this.props.language}/Project/components.html)`, + image: `${siteConfig.baseUrl}img/illu_CoreDevelopment.png`, + imageAlign: 'top', + imageAlt: 'Core', + title: Core Development, }, { - content: `[${subContents.webServer}](${siteConfig.baseUrl}${this.props.language}/WebServer/webServerObject.html)
    [${subContents.restServer}](${siteConfig.baseUrl}${this.props.language}/REST/gettingStarted.html)`, - image: `${siteConfig.baseUrl}img/illu_WebApplication.png`, + content: `[${subContents.webAdmin}](${siteConfig.baseUrl}${this.props.language}/Admin/webAdmin.html)
    + [${subContents.dataExplorer}](${siteConfig.baseUrl}${this.props.language}/Admin/dataExplorer.html)
    + [${subContents.serverAdmin}](${siteConfig.baseUrl}${this.props.language}/Admin/server-admin.html)
    + [${subContents.licenses}](${siteConfig.baseUrl}${this.props.language}/Admin/licenses.html)
    + [${subContents.tls}](${siteConfig.baseUrl}${this.props.language}/Admin/tls.html)
    + [${subContents.cli}](${siteConfig.baseUrl}${this.props.language}/Admin/cli.html)
    + [${subContents.debugLogFiles}](${siteConfig.baseUrl}${this.props.language}/Admin/debugLogFiles.html)
    + [${subContents.msc}](${siteConfig.baseUrl}${this.props.language}/MSC/overview.html)
    + [${subContents.backup}](${siteConfig.baseUrl}${this.props.language}/Backup/overview.html)
    `, + image: `${siteConfig.baseUrl}img/illu_Administration.png`, imageAlign: 'top', - imageAlt: 'Web', - title: Developing a Web application, + imageAlt: 'Admin', + title: Administration, }, ]} layout="threeColumn" @@ -94,25 +126,48 @@ class Index extends React.Component { align="left" contents={[ { - content: `[4D for iOS](https://developer.4d.com/4d-for-ios/docs/${this.props.language}/overview.html)`, + content: `[${subContents.webServer}](${siteConfig.baseUrl}${this.props.language}/WebServer/webServer.html)
    + [${subContents.webDev}](${siteConfig.baseUrl}${this.props.language}/WebServer/gettingStarted.html)
    + [${subContents.restServer}](${siteConfig.baseUrl}${this.props.language}/REST/gettingStarted.html)`, + image: `${siteConfig.baseUrl}img/illu_WebApplication.png`, + imageAlign: 'top', + imageAlt: 'Web', + title: Web applications, + }, + { + content: `[Go Mobile with 4D (Beta)](https://developer.4d.com/go-mobile)
    + [4D for iOS](https://developer.4d.com/4d-for-ios/docs/${this.props.language}/overview.html)`, image: `${siteConfig.baseUrl}img/illu_MobileApplication.png`, imageAlign: 'top', imageAlt: 'Mobile', - title: Developing a Mobile application, + title: Mobile applications, }, { - content: `[${subContents.msc}](${siteConfig.baseUrl}${this.props.language}/MSC/overview.html)
    [${subContents.backup}](${siteConfig.baseUrl}${this.props.language}/Backup/overview.html)
    [${subContents.users}](${siteConfig.baseUrl}${this.props.language}/Users/overview.html)`, - image: `${siteConfig.baseUrl}img/illu_Administration.png`, - imageAlign: 'top', - imageAlt: 'Admin', - title: Administration, + content: `[${subContents.cs}](${siteConfig.baseUrl}${this.props.language}/Desktop/clientServer.html)
    + [${subContents.formEditor}](${siteConfig.baseUrl}${this.props.language}/FormEditor/forms.html)
    + [${subContents.formProperties}](${siteConfig.baseUrl}${this.props.language}/FormEditor/jsonReference.html)
    + [${subContents.formObjects}](${siteConfig.baseUrl}${this.props.language}/FormObjects/formObjectsOverview.html)
    + [${subContents.formObjectProperties}](${siteConfig.baseUrl}${this.props.language}/FormObjects/propertiesReference.html)
    + [${subContents.events}](${siteConfig.baseUrl}${this.props.language}/Events/overview.html)
    + [${subContents.menus}](${siteConfig.baseUrl}${this.props.language}/Menus/overview.html)
    + [${subContents.buildApp}](${siteConfig.baseUrl}${this.props.language}/Desktop/building.html)`, + //image: `${siteConfig.baseUrl}img/illu_DesktopApplication.png`, + image: `${siteConfig.baseUrl}img/illu_DesktopApplication.png`, + imageAlign: 'top', + imageAlt: 'Desktop', + title: Desktop applications, }, {}, ]} layout="threeColumn" /> - + + ); } diff --git a/website/pages/en/searchAPI.js b/website/pages/en/searchAPI.js new file mode 100644 index 00000000000000..904b3521bcff94 --- /dev/null +++ b/website/pages/en/searchAPI.js @@ -0,0 +1,43 @@ + +const React = require("react"); + +class RedirectAPI extends React.Component { + render() { + const l = JSON.stringify(this.props.config.headerLinks) + const language = this.props.language + return ( + + -//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;*) ``` +When the login page is sent to the server, the `On REST Authentication` database method is called: + ```4d -// buildHeader project method + //On REST Authentication + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + //A '/rest' URL has been called with headers username-4D and password-4D +If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if +``` -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> As soon as it has been called and returned `True`, the `On REST Authentication` database method is no longer called in the session. -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +The `fillSession` project method initializes the user session, for example: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use +``` diff --git a/website/translated_docs/de/REST/configuration.md b/website/translated_docs/de/REST/configuration.md index 74e38a86a6e29e..337842aef03785 100644 --- a/website/translated_docs/de/REST/configuration.md +++ b/website/translated_docs/de/REST/configuration.md @@ -3,18 +3,19 @@ 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. +Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your application directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. To start using the REST features, you need to start and configure the 4D REST server. -> - 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. +> - 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](authUsers.md) for your requesting application. + + ## 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. +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 structure settings in order for REST requests to be processed. ![alt-text](assets/en/REST/Settings.png) @@ -22,37 +23,39 @@ For security reasons, by default, 4D does not respond to REST requests. If you w 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. + ## Configuring REST access By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. 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; +- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Structure 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. +> 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 Structure Settings is ignored. -### Using the Database settings -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. +### Using the Structure Settings -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. +The **Read/Write** menu in the "Web/REST resource" page of the structure settings specifies a group of 4D users that is authorized to establish the link to the 4D application using REST queries. -> 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. +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. + +> 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 Structure 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 application 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). + -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 -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: +Once REST services are enabled in the 4D application, by default a REST session can access all tables and fields of the 4D database through the [datastore interface](ORDA/dsMapping.md#datastore). Thus, it can 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" +``` This request will return all employees whose salary field is higher than 10000. > 4D tables and/or fields that have the "Invisible" attribute are also exposed in REST by default. @@ -71,6 +74,7 @@ To remove the REST exposure for a table: 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. @@ -83,4 +87,4 @@ To remove the REST exposure for a field: 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. -> 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 +> 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. diff --git a/website/translated_docs/de/REST/genInfo.md b/website/translated_docs/de/REST/genInfo.md index 477366e99cc0c7..a91a4d1f398541 100644 --- a/website/translated_docs/de/REST/genInfo.md +++ b/website/translated_docs/de/REST/genInfo.md @@ -10,12 +10,13 @@ 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: `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. @@ -29,7 +30,6 @@ Beispiel: `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. diff --git a/website/translated_docs/de/REST/gettingStarted.md b/website/translated_docs/de/REST/gettingStarted.md index fa4aa595dd5b63..abc25c50c7872e 100644 --- a/website/translated_docs/de/REST/gettingStarted.md +++ b/website/translated_docs/de/REST/gettingStarted.md @@ -3,23 +3,23 @@ id: gettingStarted title: Getting Started --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D provides you with a powerful REST server, that allows direct access to data stored in your 4D applications. -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). +The REST server is included in 4D and 4D Server, it is automatically available in your 4D applications [once it is configured](configuration.md). This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: +- create and configure a basic 4D application project +- access data from the 4D project through REST using a standard browser. -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +To keep the example simple, we’re going to use 4D and a browser that are running on the same machine. Of course, you could also use a remote architecture. -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. +## Creating and configuring the 4D project + +1. Launch your 4D or 4D Server application and create a new project. You can name it "Emp4D", for example. 2. In the Structure editor, create an [Employees] table and add the following fields to it: - - Lastname (Alpha) - Firstname (Alpha) - Salary (Longint) @@ -32,99 +32,107 @@ To keep the example simple, we’re going to use a 4D application and a browser ![](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. +4. Display the **Web/REST resource** page of the 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 - +``` +http://127.0.0.1/rest/$catalog +``` The REST server replies: - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - +``` +{ + "__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 - +``` +/rest/$catalog/Employees +``` If you want to get all entities of the Employee dataclass, you write: - /rest/Employees - +``` +/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 - } - +``` +{ + "__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 - +``` +/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 +``` +{ + "__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 applications. diff --git a/website/translated_docs/de/REST/manData.md b/website/translated_docs/de/REST/manData.md index c0b5eb48025ab5..94f1525fe6361c 100644 --- a/website/translated_docs/de/REST/manData.md +++ b/website/translated_docs/de/REST/manData.md @@ -3,7 +3,7 @@ id: manData title: Manipulating Data --- -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. +All [exposed dataclasses, attributes](configuration.md#exposing-tables-and-fields) and [functions](ClassFunctions.md) can be accessed through REST. Dataclass, attribute, and function names are case-sensitive; however, the data for queries is not. ## Querying data @@ -11,20 +11,26 @@ To query data directly, you can do so using the [`$filter`]($filter.md) function `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). +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 a single entity in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a [class function](ClassFunctions.md#function-calls) that returns an entity selection (or a collection). -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 a selection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). ## Navigating data 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. + + ## Creating and managing entity set 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. @@ -35,6 +41,7 @@ To access the entity set, you must use `$entityset/{entitySetID}`, for example: `/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). @@ -47,52 +54,32 @@ Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityse 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. 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: `/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 - -The following example is a dataclass method that reveives parameters and returns an object: - -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$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: +## Calling Data model class functions -![alt-text](assets/en/REST/methodProp_ex.png) +You can call ORDA Data Model [user class functions](ClassFunctions.md) through POST requests, so that you can benefit from the exposed API of the targeted application. For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +`/rest/City/getCity` -```4d -C_TEXT($content) -C_OBJECT($response) +with data in the body of the request: `["Paris"]` -$content:="[\"Toni\",\"Dickey\"]" -$statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) -``` +> Calls to 4D project methods that are exposed as REST Service are still supported but are deprecated. -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. ## Selecting Attributes to get @@ -108,11 +95,10 @@ You can apply this filter in the following ways: | | {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. -### Beispiele +### Beispiele 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: @@ -123,118 +109,127 @@ 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/` -`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" - } - ] - } - +```` +{ + __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@'"/` **Result**: - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +```` +{ + __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/` + `GET /rest/People(3)/firstName,lastName/` **Result**: - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + -`GET /rest/People(3)/` + `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" - } - }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - +```` +{ + __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 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 + `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` For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). @@ -242,10 +237,13 @@ For more information about the image formats, refer to [`$imageformat`]($imagefo 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 -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: +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. Sie schreiben zum Beispiel: -`GET /rest/Company:companyCode("Acme001")` \ No newline at end of file + `GET /rest/Company:companyCode("Acme001")` + + diff --git a/website/translated_docs/de/REST/{dataClass}.md b/website/translated_docs/de/REST/{dataClass}.md index 826c2930653281..e2776fc90d785f 100644 --- a/website/translated_docs/de/REST/{dataClass}.md +++ b/website/translated_docs/de/REST/{dataClass}.md @@ -7,321 +7,211 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +Dataclass names can be used directly in the REST requests to work with entities and entity selections, or class functions of the dataclass. ## Available syntaxes -| Syntax | Beispiel | 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 | +| Syntax | Beispiel | Beschreibung | +| ---------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------- | +| [**{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}/{DataClassClassFunction}**](ClassFunctions.md#function-calls) | `/City/getCity` | Executes a dataclass class function | +| [**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls) | `/City/getPopulation/?$filter="ID<3"` | Executes an entity selection class function | +| [**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls) | `City(2)/getPopulation` | Executes an entity class function | + +> Function calls are detailed in the [Calling ORDA class functions](ClassFunctions.md) section. + ## {dataClass} Returns all the data (by default the first 100 entities) for a specific dataclass (*e.g.*, `Company`) -### Description +### Beschreibung 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). Here is a description of the data returned: -| Property | Typ | Description | +| Property | Typ | Beschreibung | | ------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| __entityModel | String | Name of the datastore class. | -| __COUNT | Zahl | Number of entities in the datastore class. | +| __entityModel | String | Name of the dataclass. | +| __COUNT | Zahl | Number of entities in the dataclass. | | __SENT | Zahl | 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 | Zahl | 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. | - Each entity contains the following properties: -| Property | Typ | Description | +| Property | Typ | Beschreibung | | ----------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| __KEY | String | Value of the primary key defined for the datastore class. | +| __KEY | String | Value of the primary key defined for the dataclass. | | __TIMESTAMP | Datum | Timestamp of the last modification of the entity | | __STAMP | Zahl | Internal stamp that is needed when you modify any of the values in the entity when using `$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). Beispiel: -`GET /rest/Company/name,address` + `GET /rest/Company/name,address` + + ### Beispiel -Return all the data for a specific datastore class. +Return all the data for a specific dataclass. -`GET /rest/Company` + `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")` -### Description +### Beschreibung -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). +For more information about the data returned, refer to [{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). Beispiel: -`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: -`GET /rest/Company(1)/name,address,staff?$expand=staff` + `GET /rest/Company(1)/name,address,staff?$expand=staff` ### Beispiel -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)` + `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 -### Description +### Beschreibung 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)` 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). Beispiel: -`GET /rest/Company:companyCode(Acme001)/name,address` + `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: -`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` + `GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` ### Beispiel The following request returns all the public data of the employee named "Jones". -`GET /rest/Employee:lastname(Jones)` - -## {dataClass}/{method} and {dataClass}({key})/{method} - -Returns an object or a collection based on a project method. - -### Description - -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 - -![alt-text](assets/en/REST/MethodProp.png) - -### Passing Parameters to a Method - -You can also pass parameters to a method in a POST. - -`POST /rest/Employee/addEmployee` - -You can POST data in the body part of the request, for example: + `GET /rest/Employee:lastname(Jones)` -["John","Smith"] - -### Beispiele - -#### Table scope - -Call of a `getAverage` method: - -- on [Employee] table -- with **Table** scope - -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` - -`POST /rest/Employee/getAverage` - -Result: - - { - "result": { - "ageAverage": 44.125 - } - } - - -#### Current record scope - -Call of a `getFullName` method: - -- on [Employee] table -- with **Current record** scope - -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` - -`POST /rest/Employee(3)/getFullName` - -Result: - - { - "result": { - "fullName": "John Smith" - } - } - - -#### Current selection scope - -Call of a `updateSalary` method: - -- on [Employee] table -- with **Current selection** scope - -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` - -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` - -POST data (in the request body): [1.5] - -Result: - - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/de/ReleaseNotes/whatsNew.md b/website/translated_docs/de/ReleaseNotes/whatsNew.md new file mode 100644 index 00000000000000..2861cfd8570dee --- /dev/null +++ b/website/translated_docs/de/ReleaseNotes/whatsNew.md @@ -0,0 +1,15 @@ +--- +id: whatsNew +title: What's New +--- + +The list of new or modified 4D features that are covered in this documentation. + +## 4D v18 R6 + +- [Entity Selection Class](API/entitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/imapTransporterClass.md), [POP3 Mail](API/pop3TransporterClass.md) and [SMTP Mail](API/smtpTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/imapTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/sessionClass.md). \ No newline at end of file diff --git a/website/translated_docs/de/Tags/tags.md b/website/translated_docs/de/Tags/tags.md new file mode 100644 index 00000000000000..4e61b4cf054842 --- /dev/null +++ b/website/translated_docs/de/Tags/tags.md @@ -0,0 +1,764 @@ +--- +id: tags +title: Transformation tags +--- + +4D provides a set of transformation tags which allow you to insert references to 4D variables or expressions, or to perform different types of processing within a source text, referred to as a "template". These tags are interpreted when the source text is executed and generate an output text. + +This principle is used in particular by the 4D Web server to build [web template pages](WebServer/templates.md). + +These tags are generally be inserted as HTML type comments (``) but an [xml-compliant alternative syntax](#alternative-syntax-for-4dtext-4dhtml-4deval) is available for some of them. + +It is possible to mix several types of tags. For example, the following HTML structure is entirely feasible: + +```html + + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + (Loop on the current selection) + (If [TABLE]ValNum>10) + (Subpage insertion) + (Else) + Value:
    (Field display) + + ](End for) + + +``` + + + +## Principles for using tags + +### Parsing + +Parsing the contents of a *template* source is done in two contexts: + +- Using the `PROCESS 4D TAGS` command; this command accepts a *template* as input, as well as optional parameters and returns a text resulting from the processing. + +- Using 4D's integrated HTTP server: [template pages](WebServer/templates.md) sent by means of the `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB), `WEB SEND TEXT` commands, or called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to parse HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, http://www.server.com/dir/page.shtm). + + +### Recursive processing + +4D tags are interpreted recursively: 4D always attempts to reinterpret the result of a transformation and, if a new transformation has taken place, an additional interpretation is performed, and so on until the product obtained no longer requires any further transformation. For example, given the following statement: + +```html + +``` + +If the `[Mail]Letter_type` text field itself contains a tag, for example ``, this tag will be evaluated recursively after the interpretation of the 4DHTML tag. + +This powerful principle meets most needs related to text transformation. Note, however, that in some cases this can also allow malicious code to be inserted in the web context, [which can be avoided](WebServer/templates.md#prevention-of-malicious-code-insertion). + + +### Identifiers with tokens + +To ensure the correct evaluation of expressions processed via tags, regardless of the language or 4D version, it's recommended to use the tokenized syntax for elements whose name may vary over versions (commands, tables, fields, constants). For example, to insert the `Current time` command, enter `Current time:C178`. + +### Using the "." as decimal separator + +4D always uses the period character (.) as a decimal separator when evaluating a numerical expression using a 4D tag `4DTEXT`, `4DHTML`, and `4DEVAL`. Regional settings are ignored. This feature facilitates code maintenance and compatibility between 4D languages and versions. + + +## 4DBASE + +#### Syntax: `` + +The `` tag designates the working directory to be used by the `` tag. + +When it is called in a Web page, the `` tag modifies all subsequent `` calls on this page, until the next `, if any. If the`` folder is modified from within an included file, it retrieves its original value from the parent file. + +The *folderPath* parameter must contain a pathname relative to the current page and it must end with a slash (/). The designated folder must be located inside the Web folder. + +Pass the "WEBFOLDER" keyword to restore the default path (relative to the page). + +The following code, which must specify a relative path for each call: + +```html + + + + + +``` +... is equivalent to: + +```html + + + + + + + + +``` + +For example, to set a directory for the home page: + +```html +/* Index.html */ + + + + + + + + +``` + +In the "head.html" file, the current folder is modified through ``, without this changing its value in "Index.html": + +```html +/* Head.htm */ +/* the working directory here is relative to the included file (FR/ or US/) */ + + + + + + +``` + + +## 4DCODE + +#### Syntax: `` + +The `4DCODE` tag allows you to insert a multi-line 4D code block in a template. + +When a `` sequence. The code block itself can contain carriage returns, line feeds, or both; it will be interpreted sequentially by 4D. + +For example, you can write in a template: + +```html + +``` + + +Here are the 4DCODE tag features: + +- The `TRACE` command is supported and activates the 4D debugger, thus allowing you to debug your template code. +- Any error will display the standard error dialog that lets the user stop code execution or enter debugging mode. +- The text in between `` is split into lines accepting any line-ending convention (cr, lf, or crlf). +- The text is tokenized within the context of the database that called `PROCESS 4D TAGS`. This is important for recognition of project methods for example. The [Available through tags and 4D URLs (4DACTION ...)](WebServer/allowProject.md) method property is not taken into account. +- Even if the text always uses English-US, it is recommended to use the token syntax (:Cxxx) for command and constant names to protect against potential problems due to commands or constants being renamed from one version of 4D to another. + +> The fact that 4DCODE tags can call any of the 4D language commands or project methods could be seen as a security issue, especially when the database is available through HTTP. However, since it executes server-side code called from your own template files, the tag itself does not represent a security issue. In this context, as for any Web server, security is mainly handled at the level of remote accesses to server files. + + +## 4DEACH and 4DENDEACH + +#### Syntax: `` `` + +The `` comment allows iterating a specified item over all values of the *expression*. The item is set to a *variable* whose type depends on the *expression* type. + +The `` comment can iterate through three expression types: + +- [collections](#--4deach-item-in-collection--): loop through each element of the collection, +- [entity selections](#--4deach-entity-in-entityselection--): loop through each entity, +- [objects](#--4deach-property-in-object--): loop through each object property. + +The number of iterations is evaluated at startup and will not change during the processing. Einträge während der Schleife hinzufügen oder entfernen wird generell nicht empfohlen, da dies zu fehlenden oder überflüssigen Wiederholungen führen kann. + + +### `` + +This syntax iterates on each *item* of the *collection*. The code portion located between `` and `` is repeated for each collection element. + +The *item* parameter is a variable of the same type as the collection elements. + +The collection must contain only **elements of the same type**, otherwise an error is returned as soon as the *item* variable is assigned the first mismatched value type. + +The number of loops is based on the number of elements of the collection. At each iteration, the *item* variable is automatically filled with the matching element of the collection. Dabei müssen Sie folgende Punkte berücksichtigen: + +- If the *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). Bei einer Variablen mit einem skalaren Typ wird nur die Variable geändert. +- The *item* variable gets the same type as the first collection element. If any collection element 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 is generated if the *item* variable type does not support Null values (such as longint variables). + +#### Example with a collection of scalar values + +*getNames* returns a collection of strings. The method has been declared as "[available through 4D tags and URLs](WebServer/allowProject.md)". + + +```html + + + + + + + + + +
    Name
    +``` + +#### Example with a collection of objects + +*getSalesPersons* returns a collection of objects. + +```html + + + + + + + + + + + +
    IDFirstnameLastname
    +``` + + +### `` + +This syntax iterates on each *entity* of the *entitySelection*. The code portion located between `` and `` is repeated for each entity of the entity selection. + +The *entity* parameter is an object variable of the entity selection class. + + +The number of loops is based on the number of entities of the entity selection. At each iteration, the *entity* object variable is automatically filled with the matching entity of the entity selection. + +#### Example with a html table + +```html + + + + + + + + + + + +
    IDNameTotal purchase
    +``` + +#### Example with `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +This syntax iterates on each *property* of the *object*. The code portion located between `` and `` is repeated for each property of the object. + +The *property* parameter is a text variable automatically filled with the name of the currently processed property. + +The properties of the object are processed according to their creation order. Während der Schleife lassen sich Eigenschaften im Objekt hinzufügen oder daraus entfernen. Das verändert nicht die Anzahl Schleifen, diese basiert weiterhin auf der ursprünglichen Anzahl Eigenschaften für das Objekt. + +#### Example with the properties of an object + +*getGamers* is a project method that returns an object like ("Mary"; 10; "Ann"; 20; "John"; 40) to figure gamer scores. + +```html + + + + + + + + + + + +
    GamersScores
    +``` + + + + +## 4DEVAL + +#### Syntax: `` +#### Alternative syntax: `$4DEVAL(expression)` + +The `4DEVAL` tag allows you to assess a 4D variable or expression. Like the [`4DHTML`](#4dhtml) tag, `4DEVAL` does not escape HTML characters when returning text. However, unlike `4DHTML` or [`4DTEXT`](#4dtext), `4DEVAL` allows you to execute any valid 4D statement, including assignments and expressions that do not return any value. + +For example, you can execute: + +``` + $input:="" //assignment + $input:=$input+"" //calculation + PROCESS 4D TAGS($input;$output) + //$output = "43" +``` + +In case of an error during interpretation, the text inserted will be in the form: `: ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DHTML + +#### Syntax: `` +#### Alternative syntax: `$4DHTML(expression)` + + +Just like the `4DTEXT` tag, this tag lets you assess a 4D variable or expression that returns a value, and insert it as an HTML expression. Unlike the `4DTEXT` tag, this tag does not escape HTML special characters (e.g. ">"). + +For example, here are the processing results of the 4D text variable myvar with the available tags: + +| myvar Value | Tags | Ergebnis | +| -------------------- | ---------------------------- | ------------------- | +| `myvar:=""` | `` | `<B>` | +| `myvar:=""` | `` | `` | + +In case of an interpretation error, the inserted text will be ` : ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DIF, 4DELSE, 4DELSEIF and 4DENDIF + +#### Syntax: `` {`...`} {``} `` + +Used with the `` (optional), `` (optional) and `` comments, the `` comment offers the possibility to execute portions of code conditionally. + +The *expression* parameter can contain any valid 4D expression returning a Boolean value. It must be indicated within parenthesis and comply with the 4D syntax rules. + +The `` ... `` blocks can be nested in several levels. Like in 4D, each `` must match a ``. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. Likewise, if there are not as many `` as ``, the text "``: 4DENDIF expected" is inserted instead of the contents located between `` and ``. + +Using the `` tag, you can test an unlimited number of conditions. Only the code that follows the first condition evaluated as `True` is executed. If no conditions are true, no statement is executed (if there is no final ``). You can use a tag after the last . If all the conditions are false, the statements following the are executed. + +The two following codes are equivalent. + +Code using 4DELSE only: + +```html + + /* Condition1 is true*/ + + + /* Condition2 is true*/ + + + /* Condition3 is true */ + + /*None of the conditions are true*/ + + + +``` + +Similar code using the `4DELSEIF` tag: + +``` + + /* Condition1 is true*/ + + /* Condition2 is true*/ + + /* Condition3 is true */ + + /* None of the conditions are true*/ + +``` + +This example of code inserted in a static HTML page displays a different label according the `vname#""` expression result: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +This example inserts different pages depending on which user is connected: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### Syntax: `` + +This tag is mainly designed to include an HTML page (indicated by the *path* parameter) in another HTML page. By default, only the body of the specified HTML page, i.e. the contents found within the `` and `` tags, is included (the tags themselves are not included). This lets you avoid conflicts related to meta tags present in the headers. + +However, if the HTML page specified does not contain ```` tags, the entire page is included. It is up to you to verify the consistency of the meta tags. + +The `` comment is very useful for tests (``) or loops (``). It is very convenient to include banners according to a criteria or randomly. When including, regardless of the file name extension, 4D analyzes the called page and then inserts the contents (modified or not) in the page originating the `4DINCLUDE` call. + +An included page with the `` comment is loaded in the Web server cache the same way as pages called via a URL or sent with the `WEB SEND FILE` command. + +In *path*, put the path leading to the document to include. Warning: In the case of a `4DINCLUDE` call, the path is relative to the document being analyzed, that is, the "parent" document. Use the slash character (/) as a folder separator and the two dots (..) to go up one level (HTML syntax). When you use the `4DINCLUDE` tag with the `PROCESS 4D TAGS` command, the default folder is the project folder. + +> You can modify the default folder used by the `4DINCLUDE` tag in the current page, using the `` tag (see below). + +The number of `` within a page is unlimited. However, the `` calls can be made only at one level. This means that, for example, you cannot insert `` in the *mydoc2.html* body page, which is called by `` inserted in *mydoc1.html*. Furthermore, 4D verifies that inclusions are not recursive. + +In case of error, the inserted text is "`` :The document cannot be opened". + +Beispiele: + +```html + + + +``` + + + +## 4DLOOP and 4DENDLOOP + +#### Syntax: `` `` + +This comment allows repetition of a portion of code as long as the condition is fulfilled. The portion is delimited by `` and ``. + +The `` ... `` blocks can be nested. Like in 4D, each `` must match a ``. + +There are five kinds of conditions: + +### `` + +This syntax makes a loop for each record from the table current selection in the current process. The code portion located between the two comments is repeated for each current selection record. + +> When the `4DLOOP` tag is used with a table, records are loaded in "Read only" mode. + +The following code: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +This syntax makes a loop for each array item. The array current item is increased when each code portion is repeated. + +> This syntax cannot be used with two dimension arrays. In this case, it is better to combine a method with nested loops. + +The following code example: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +This syntax makes a loop as long as the method returns `True`. The method takes a Long Integer parameter type. First it is called with the value 0 to allow an initialization stage (if necessary); it is then called with the values 1 ,then 2, then 3 and so on, as long as it returns `True`. + +For security reasons, within a Web process, the `On Web Authentication` database method can be called once just before the initialization stage (method execution with 0 as parameter). If the authentication is OK, the initialization stage will proceed. + +`C_BOOLEAN($0)` and `C_LONGINT($1)` MUST be declared within the method for compilation purposes. + +The following code example: + +```html + +
    + +``` + +... could be expressed in 4D language in the following way: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +The `my_method` method can be as follows: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +With this syntax, the `4DLOOP` tag makes a loop as long as the *expression* returns `True`. The expression can be any valid Boolean expression and must contain a variable part to be evaluated in each loop to avoid infinite loops. + +For example, the following code: + +```html + + + + + +``` + +...produces the following result: + +``` +0 +1 +2 +3 +``` + +### `` + +In this case, the `4DLOOP` tag works like it does with an array: it makes a loop for each element of the array referenced by the pointer. The current array element is increased each time the portion of code is repeated. + +This syntax is useful when you pass an array pointer as a parameter to the `PROCESS 4D TAGS` command. + +Beispiel: + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +In case of an interpretation error, the text "``: description" is inserted instead of the contents located between `` and ``. + +The following messages can be displayed: + +- Unexpected expression type (standard error); +- Incorrect table name (error on the table name); +- An array was expected (the variable is not an array or is a two dimension array); +- The method does not exist; +- Syntax error (when the method is executing); +- Access error (you do not have the appropriate access privileges to access the table or the method). +- 4DENDLOOP expected (the `` number does not match the ``). + +## 4DSCRIPT/ + +#### Syntax: `` + +The `4DSCRIPT` tag allows you to execute 4D methods when processing the template. The presence of the `` tag as an HTML comment launches the execution of the `MyMethod` method with the `Param` parameter as a string in `$1`. + +> If the tag is called in the context of a Web process, when the page is loaded, 4D calls the `On Web Authentication` database method (if it exists). If it returns True, 4D executes the method. + +The method must return text in `$0`. If the string starts with the code character 1, it is considered as HTML (the same principle is true for the `4DHTML` tag). + +For example, let’s say that you insert the following comment `“Today is â€` into a template Web page. When loading the page, 4D calls the `On Web Authentication` database method, then calls the `MYMETH` method and passes the string “/MYPARAM†as the parameter `$1`. The method returns text in $0 (for example "12/31/21"); the expression "`Today is` comments as you want in a template. + + + +## 4DTEXT + +#### Syntax: `` +#### Alternative syntax: `$4DTEXT(expression)` + + +The tag `` allows you to insert a reference to a 4D variable or expression returning a value. For example, if you write (in an HTML page): + +```html +

    Welcome to !

    +``` + +The value of the 4D variable `vtSiteName` will be inserted in the HTML page when it is sent. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +You can also insert 4D expressions. You can for example directly insert the contents of a field (``), an array element (``) or a method returning a value (``). The expression conversion follows the same rules as the variable ones. Moreover, the expression must comply with 4D syntax rules. + +> For security reasons, it is recommended to use this tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + +In case of an evaluation error, the inserted text will appear as ` : ## error # error code`. + +- You must use process variables. +- You can display the content of a picture field. However, it is not possible to display the content of a picture array item. +- It is possible to display the contents of an object field by means of a 4D formula. For example, you can write ``. +- You will usually work with Text variables. However, you can also use BLOB variables. You just need to generate BLOBs in `Text without length` mode. + + + + + + +## Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL + +Several existing 4D transformation tags can be expressed using a $-based syntax: + +#### $4dtag (expression) +can be used instead of +#### `` + +This alternative syntax is available only for tags used to return processed values: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(Other tags, such as 4DIF or 4DSCRIPT, must be written with the regular syntax). + +Sie schreiben zum Beispiel: + +```html +$4DEVAL(UserName) +``` + +instead of: + +```html + +``` + +The main advantage of this syntax is that it allows you to write XML-compliant templates. Some 4D developers need to create and validate XML-based templates using standard XML parser tools. Since the "<" character is invalid in an XML attribute value, it was not possible to use the "``" syntax of 4D tags without breaking the document syntax. On the other hand, escaping the "<" character will prevent 4D from interpreting the tags correctly. + +For example, the following code would cause an XML parsing error because of the first "<" character in the attribute value: + +```xml + +``` + +Using the $ syntax, the following code is validated by the parser: + +```xml + +``` + +Note that `$4dtag` and `<--#4dtag -->` are not strictly equivalent: unlike `<--#4dtag -->`, `$4dtag` processing does not interpret 4D tags [recursively](#recursive-processing). `$` tags are always evaluated once and the result is considered as plain text. + +The reason for this difference is to prevent malicious code injection. As [explained below](#prevention-of-malicious-code-insertion), it is strongly recommended to use `4DTEXT` tags instead of `4DHTML` tags when handling user text to protect against unwanted reinterpretation of tags: with `4DTEXT`, special characters such as "<" are escaped, thus any 4D tags using the `` syntax will lose their particular meaning. However, since `4DTEXT` does not escape the `$` symbol, we decided to break support for recursion in order to prevent malicious injection using the `$4dtag (expression)` syntax. + +The following examples show the result of processing depending on the syntax and tag used: + +```4d + // example 1 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //4D will quit! +``` +```4d + // example 2 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: " +``` +```4d + // example 3 + myName:="$4DEVAL(QUIT 4D)" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: $4DEVAL(QUIT 4D)" +``` + +Note that the `$4dtag` syntax supports matching pairs of enclosed quotes or parenthesis. For example, suppose that you need to evaluate the following complex (unrealistic) string: + +``` +String(1) + "\"(hello)\"" +``` + +Sie schreiben: + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + -->output is 1"(hello)" +``` + + diff --git a/website/translated_docs/de/Users/handling_users_groups.md b/website/translated_docs/de/Users/handling_users_groups.md index 5300d323e1018c..a8c41fc4ea2ff7 100644 --- a/website/translated_docs/de/Users/handling_users_groups.md +++ b/website/translated_docs/de/Users/handling_users_groups.md @@ -3,39 +3,40 @@ id: editing title: Managing 4D users and groups --- -## 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. -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. The Designer can: -- 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. +## Designer and Administrator + +The most powerful user is named **Designer**. No aspect of the application is closed to the Designer. The Designer can: +- access all application 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. 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. The Administrator can: - -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +- 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: - - 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. +- by default, access to protected parts of the application. 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 application. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. -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: +Both the Designer and Administrator are available by default in all applications. 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. 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. @@ -48,7 +49,7 @@ You use the users editor to create user accounts, set their properties and assig To add a user from the Toolbox : -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. +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). @@ -58,11 +59,11 @@ The list of users displays all the users, including the [Designer and the Admini 4D adds a new user to the list, named "New userX" by default. -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. +3. Enter the user name. This name will be used by the user to open the application. 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. 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. -> 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. +> Users can change their password at any time according to the options in the "Security" page of the structure settings, or using the `CHANGE PASSWORD` command. 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. @@ -70,6 +71,7 @@ The membership of users to different groups can also be set by group on the [Gro ### Deleting a user + 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) 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. @@ -78,7 +80,8 @@ Deleted user names no longer appear in the Users editor. Note that the IDs for d - **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. +- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the application (optional). This method can be used for example to load the user preferences. + ## Groups editor @@ -92,11 +95,11 @@ Keep in mind that once a group has been created, it cannot be deleted. If you wa 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. 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 application project. 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. + OR + Right-click in the list of groups and choose the **Add** or **Duplicate** command in the context menu. > The Duplicate command can be used to create several groups having the same characteristics quickly. @@ -104,6 +107,7 @@ To create a group: 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. + ### 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. @@ -120,7 +124,7 @@ To remove a user or group from another group, you just need to deselect the corr ### 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. +You can assign a group privileges to any plug-ins installed in the project. This includes all the 4D plug-ins and any third-party plug-ins. 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. @@ -132,9 +136,10 @@ 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. +The best way to ensure the security of your application 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. @@ -148,4 +153,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/de/Users/overview.md b/website/translated_docs/de/Users/overview.md index 13acd4f77cc987..f2114c2c425804 100644 --- a/website/translated_docs/de/Users/overview.md +++ b/website/translated_docs/de/Users/overview.md @@ -1,37 +1,44 @@ --- id: overview -title: Overview +title: Überblick --- -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. +If more than one person uses an application, 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 application or to application operations. > For an overview of 4D's security features, see the [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. +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 application. -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. +Groups can then be assigned access privileges to specific parts or features of the application (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: ![](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. +Until you give the Designer a password, all application access are done with the Designer's access rights, even if you have set up users and groups (when the application opens, no ID is required). Any part of the application can be opened. -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. +When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the application, remote users must enter a password. To disable the password access system, you just need to remove the Designer password. + ## 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: +In project applications (.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 with 4D Server. The following table lists the main users and groups features and their availability: -| | 4D Developer (single-user) | 4D Server | +| | 4D (single-user) | 4D Server | | ------------------------------------------------------------- | ---------------------------- | --------- | | Adding/editing users and groups | yes | yes | | Assigning user/group access to servers | yes | yes | @@ -39,6 +46,9 @@ In project databases (.4DProject or .4dz files), 4D users and groups can be conf | Access control once the Designer has been assigned a password | no (all access are Designer) | yes | + + + ## 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. @@ -47,13 +57,16 @@ The editors for users and groups are located in the toolbox of 4D. These editors > 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. The whole users and groups configuration can also be edited during application execution using 4D language commands of the [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.en.html) theme. + + ## Directory.json file -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +Users, groups, as well as their access rights are stored in a specific project file named **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. +- in the user settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the application. +- 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 settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by an application upgrade. + +> If users and groups management is not active, the **directory.json** is not created. -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file diff --git a/website/translated_docs/de/WebServer/allowProject.md b/website/translated_docs/de/WebServer/allowProject.md new file mode 100644 index 00000000000000..52edfc870af610 --- /dev/null +++ b/website/translated_docs/de/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: Allowing project methods +--- + + +The 4D tags such as `4DEVAL`, `4DTEXT`, `4DHTML`... as well as the [`/4DACTION URL`](httpRequests.md#/4daction) allow you to trigger the execution of any project method of a 4D project published on the Web. For example, the request *http://www.server.com/4DACTION/login* causes the execution of the ***login*** project method, if it exists. + +This mechanism therefore presents a security risk for the application, in particular if an Internet user intentionally (or unintentionally) triggers a method not intended for execution via the web. You can avoid this risk in the following ways: + +* Filter the methods called via the URLS using the [`On Web Authentication`](authentication.md#on-web-authentication) database method. Drawbacks: If the database includes a great number of methods, this system may be difficult to manage. + +* Use the **Available through 4D tags and URLs (4DACTION...)** option found in the Method properties dialog box: + +![](assets/en/WebServer/methodProperties.png) + +This option is used to individually designate each project method that can be called using the `4DACTION` special URL, or the `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF` or `4DLOOP` tags. When it is not checked, the project method concerned cannot be directly executed through an HTTP request. Conversely, it can be executed using other types of calls (formulas, other methods, etc.). + +This option is unchecked by default. Methods that can be executed through `4DACTION` or specific tags must be specifically indicated. + +In the Explorer, Project methods with this property are given a specific icon: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/website/translated_docs/de/WebServer/authentication.md b/website/translated_docs/de/WebServer/authentication.md new file mode 100644 index 00000000000000..291826133eafad --- /dev/null +++ b/website/translated_docs/de/WebServer/authentication.md @@ -0,0 +1,199 @@ +--- +id: authentication +title: Authentication +--- + +Authenticating users is necessary when you want to provide specific access rights to web users. Authentication designates the way the information concerning the user credentials (usually name and password) are collected and processed. + + +## Authentication modes + +The 4D web server proposes three authentication modes, that you can select in the **Web**/**Options (I)** page of the Settings dialog box: + +![](assets/en/WebServer/authentication.png) + +> Using a **custom** authentication is recommended. + +### Überblick + +The operation of the 4D web server's access system is summarized in the following diagram: + +![](assets/en/WebServer/serverAccess.png) + +> Requests starting with `rest/` are directly handled by the [REST server](REST/configuration.md). + + +### Custom (default) + +Basically in this mode, it's up to the developer to define how to authenticate users. 4D only evaluates HTTP requests [that require an authentication](#method-calls). + +This authentication mode is the most flexible because it allows you to: + +- either, delegate the user authentication to a third-party application (e.g. a social network, SSO); +- or, provide an interface to the user (e.g. a web form) so that they can create their account in your customer database; then, you can authenticate users with any custom algorithm (see [this example](sessions.md#example) from the "User sessions" chapter). The important thing is that you never store the password in clear, using such code: + +```4d +//... user account creation +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +See also [this example](gettingStarted.md#authenticating-users) from the "Getting started" chapter. + +If no custom authentication is provided, 4D calls the [`On Web Authentication`](#on-web-authentication) database method (if it exists). In addition to $1 and $2, only the IP addresses of the browser and the server ($3 and $4) are provided, the user name and password ($5 and $6) are empty. The method must return **True** in $0 if the user is successfully authenticated, then the resquested resource is served, or **False** in $0 if the authentication failed. + +> **Warning:** If the `On Web Authentication` database method does not exist, connections are automatically accepted (test mode). + + +### Basic protocol + +When a user connects to the server, a standard dialog box appears on their browser in order for them to enter their user name and password. + +> The name and password entered by the user are sent unencrypted in the HTTP request header. This mode typically requires HTTPS to provide confidentiality. + +Entered values are then evaluated: + +- If the **Include 4D passwords** option is checked, user credentials will be first evaluated against the [internal 4D users table](Users/overview.md). + - If the user name sent by the browser exists in the table of 4D users and the password is correct, the connection is accepted. If the password is incorrect, the connection is refused. + - If the user name does not exist in the table of 4D users, the [`On Web Authentication`](#on-web-authentication) database method is called. If the `On Web Authentication` database method does not exist, connections are rejected. + +- If the **Include 4D passwords** option is not checked, user credentials are sent to the [`On Web Authentication`](#on-web-authentication) database method along with the other connection parameters (IP address and port, URL...) so that you can process them. If the `On Web Authentication` database method does not exist, connections are rejected. +> With the 4D Client web server, keep in mind that all the sites published by the 4D Client machines will share the same table of users. Validation of users/passwords is carried out by the 4D Server application. + +### DIGEST protocol + +This mode provides a greater level of security since the authentication information is processed by a one-way process called hashing which makes their contents impossible to decipher. + +As in BASIC mode, users must enter their name and password when they connect. The [`On Web Authentication`](#on-web-authentication) database method is then called. When the DIGEST mode is activated, the $6 parameter (password) is always returned empty. In fact, when using this mode, this information does not pass by the network as clear text (unencrypted). It is therefore imperative in this case to evaluate connection requests using the `WEB Validate digest` command. +> You must restart the web server in order for the changes made to these parameters to be taken into account. + + + +## On Web Authentication + +The `On Web Authentication` database method is in charge of managing web server engine access. It is called by 4D or 4D Server when a dynamic HTTP request is received. + +### Database method calls + +The `On Web Authentication` database method is automatically called when a request or processing requires the execution of some 4D code (except for REST calls). It is also called when the web server receives an invalid static URL (for example, if the static page requested does not exist). + +The `On Web Authentication` database method is therefore called: + +- when the web server receives a URL requesting a resource that does not exist +- when the web server receives a URL beginning with `4DACTION/`, `4DCGI/`... +- when the web server receives a root access URL and no home page has been set in the Settings or by means of the `WEB SET HOME PAGE` command +- when the web server processes a tag executing code (e.g `4DSCRIPT`) in a semi-dynamic page. + +The `On Web Authentication` database method is NOT called: + +- when the web server receives a URL requesting a valid static page. +- when the web server reveives a URL beginning with `rest/` and the REST server is launched (in this case, the authentication is handled through the [`On REST Authentication` database method](REST/configuration.md#using-the-on-rest-authentication-database-method) or [Structure settings](REST/configuration.md#using-the-structure-settings)). + + +### Syntax + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +| Parameter | Typ | | Beschreibung | +| --------- | ------- |:--:| ------------------------------------------------- | +| $1 | Text | <- | URL | +| $2 | Text | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Text | <- | IP address of the web client (browser) | +| $4 | Text | <- | IP address of the server | +| $5 | Text | <- | User name | +| $6 | Text | <- | Password | +| $0 | Boolean | -> | True = request accepted, False = request rejected | + +You must declare these parameters as follows: + +```4d +//On Web Authentication database method + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` +> All the `On Web Authentication` database method's parameters are not necessarily filled in. The information received by the database method depends on the selected [authentication mode](#authentication-mode)). + + +#### $1 - URL + +The first parameter (`$1`) is the URL received by the server, from which the host address has been removed. + +Let’s take the example of an Intranet connection. Suppose that the IP address of your 4D Web Server machine is 123.45.67.89. The following table shows the values of $1 depending on the URL entered in the Web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.45.67.89 | / | +| http://123.45.67.89 | / | +| 123.45.67.89/Customers | /Customers | +| http://123.45.67.89/Customers/Add | /Customers/Add | +| 123.45.67.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +#### $2 - Header and Body of the HTTP request + +The second parameter (`$2`) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Authentication` database method as it is. Its contents will vary depending on the nature of the web browser which is attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + +#### $3 - Web client IP address + +The `$3` parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + + +#### $4 - Server IP address + +The `$4` parameter receives the IP address used to call the web server. 4D allows for multi-homing, which allows you to exploit machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.md#ip-address-to-listen). + + +#### $5 and $6 - User Name and Password + +The `$5` and `$6` parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser. This dialog box appears for each connection, if [basic](#basic-protocol) or [digest](#digest-protocol) authentication is selected. +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + +#### $0 parameter + +The `On Web Authentication` database method returns a boolean in $0: + +* If $0 is True, the connection is accepted. + +* If $0 is False, the connection is refused. + +The `On Web Connection` database method is only executed if the connection has been accepted by `On Web Authentication`. +> **WARNING**
    If no value is set to $0 or if $0 is not defined in the `On Web Authentication` database method, the connection is considered as accepted and the `On Web Connection` database method is executed. +> * Do not call any interface elements in the `On Web Authentication` database method (`ALERT`, `DIALOG`, etc.) because otherwise its execution will be interrupted and the connection refused. The same thing will happen if an error occurs during its processing. + + +### Beispiel + +Example of the `On Web Authentication` database method in [DIGEST mode](#digest-protocol): + +```4d + // On Web Authentication Database Method + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // User is found + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // User does not exist + End if +``` diff --git a/website/translated_docs/de/WebServer/errorPages.md b/website/translated_docs/de/WebServer/errorPages.md new file mode 100644 index 00000000000000..8c5d09718e7377 --- /dev/null +++ b/website/translated_docs/de/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: Custom HTTP Error Pages +--- + +The 4D Web Server allows you to customize HTTP error pages sent to clients, based on the status code of the server response. Error pages refer to: + +* status codes starting with 4 (client errors), for example 404 + +* status codes starting with 5 (server errors), for example 501. + +For a full description of HTTP error status codes, you can refer to the [List of HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (Wikipedia). + + +## Replacing default pages + +To replace default 4D Web Server error pages with your own pages you just need to: + +* put custom HTML pages at the first level of the application's web folder, + +* name the custom pages "{statusCode}.html" (for example, "404.html"). + +You can define one error page per status code and/or a generic error page for a range of errors, named "{number}xx.html". For example, you can create "4xx.html" for generic client errors. The 4D Web Server will first look for a {statusCode}.html page then, if it does not exist, a generic page. + +For example, when an HTTP response returns a status code 404: + +1. 4D Web Server tries to send a "404.html" page located in the application's web folder. + +2. If it is not found, 4D Web Server tries to send a "4xx.html" page located in the application's web folder. + +3. If not found, 4D Web Server then uses its default error page. + +## Beispiel + +If you define the following custom pages in your web folder: + +![](assets/en/WebServer/errorPage.png) + +* the "403.html" or "404.html" pages will be served when 403 or 404 HTTP responses are returned respectively, + +* the "4xx.html" page will be served for any other 4xx error status (400, 401, etc.), + +* the "5xx.html" page will be served for any 5xx error status. + diff --git a/website/translated_docs/de/WebServer/gettingStarted.md b/website/translated_docs/de/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..261da12b41f023 --- /dev/null +++ b/website/translated_docs/de/WebServer/gettingStarted.md @@ -0,0 +1,285 @@ +--- +id: gettingStarted +title: Getting Started +--- + +This "Getting started" section is geared at first-time users who want an overall overview on how to go from zero to a 4D website that handles data from the database. Let's start! + + +## Hello World Example + +Let's start by making the web server send "Hello World" to the browser. The most simple way to do this is to create a project, start the web server and write a small code that returns a text in the `On Web Connection` database method. + +### Starting the web server + +To start the 4D web server: + +1. Launch your 4D application and create a new, empty 4D project. +2. In the **Run** menu, select **Start Web Server**. + +That's all! The web server is started (you can see that the menu item has become **Stop Web Server**). It is now ready to handle requests. To check it, we'll display the default home page. + +### Displaying the default home page + +The 4D web server creates automatically a default `index.html` page in the default `WebFolder` root folder, created at the same level as the Project folder. + +1. Launch a web browser and connect to the web server IP address (default http port for 4D web server is 80). If the web server and the browser are on the same machine, you can select **Test Web Server** in the **Run** menu. + +The default home page is displayed: + +![](assets/en/WebServer/defaultHomePage.png) + +### Displaying Hello World + +1. Open the Explorer, display the Database Methods list and double-click on `On Web Connection`. + +2. Enter the following code: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // Error 404 for example +End case +``` + +The [`On Web Connection`](httpRequests.md#on-web-connection) database method is called for incoming requests and receives the target URL in the `$1` parameter. This very simple code only sends the text to the browser. + +3. In your browser, enter the following URL: + +``` +http://localhost/hello +``` + +The web server handles the request and returns: + +![](assets/en/WebServer/hello.png) + + +## Getting data from the database + +Now we'll see how simple it is to get data from the database. First, we will create a table and fill it with some data. + +Create a basic database with, for example, a single table containing some records: + +![](assets/en/WebServer/hello2.png) ![](assets/en/WebServer/hello3.png) + +### Displaying data in a page + +The most simple solution to display data is to call a [template page](templates.md) containing tags. + +1. Using any text editor, create a file containing the following lines: + +```html + + + + +
    + + + +``` + +2. Name the file "friends.shtml" and save it in the **WebFolder** of your project. +3. In your browser, enter the following URL: + +``` +http://localhost/friends.shtml +``` + +`.shtml` pages are automatically processed by the web server. Your page filled with data is returned: + +![](assets/en/WebServer/hello3bis.png) + +### REST request + +If we not only want to *display* data, but to *use* it, we can use ORDA and the REST server. Thanks to the [ORDA concept](ORDA/overview.md), the `Friends` table is automatically mapped to a dataclass and is available through [REST](REST/gettingStarted.md). + + +1. We will use the REST server to access data: go the "Settings" dialog box, select the "Web/Rest resource" page, and check the **Expose as REST server** option. + +![](assets/en/WebServer/hello5.png) + +2. In your browser, enter the following URL: + +``` +http://localhost/rest/$catalog +``` + +The web server returns the results in JSON: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +You get the catalog, i.e. the list of exposed dataclasses and attributes in the datastore. + +You can also get any data. + +3. Enter the following URL: + +``` +http://localhost/rest/Friends +``` + +The server returns the entities, i.e. the data, from the Friends dataclass: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +This very simple example shows how the web server interacts transparently with the [REST server](REST/gettingStarted.md) to return any requested data, provided it is exposed. In your web interfaces, you can easily bind the javascript or html code with returned data. See the built-in [Web Data Explorer](Admin/dataExplorer.md) to have an example of sophisticated web interface bound to dataclasses. + + + + +## Login and session + +In the above sections, we get free access to the application from web requests. However, in the world of web applications, data access security is the first priority. When connecting to the 4D web server, users must be authentified and their navigation controlled. + +### Creating a table of users + +The most simple and secured way to log a user on the 4D web server is based upon the following scenario: + +- Users are stored in a dedicated, unexposed table (named *WebUsers* for example) +- The *WebUsers* table could be [encrypted](MSC/encrypt.md) and stores the user login and a hash of their password. + +1. Create a table with some fields, for example: + +![](assets/en/WebServer/helloUsers.png) + +2. Write and execute the following code to create a user: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// the password would be entered by the user +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### Authenticating users + +> To be secure from end to end, it is necessary that the whole connection is established via [https](webServerConfig.md#enable-https). + +1. Open the Explorer and create a project method named "login". + +3. Write the following code: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// get values sent in the header of the request +WEB GET VARIABLES($anames; $avalues) + +// look for header login fields +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +//look for a user with the entered name in the users table +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) //a user was found + //check the password + If (Verify password hash($password; $user.password)) + //password ok, fill the session + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + //You can use the user session to store any information + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. Display the method properties by clicking on the **[i]** button in the code editor, check the `4D tags and URLs (4DACTION...)` option and click **OK**. + +![](assets/en/WebServer/hello0.png) + + +4. In your browser, enter the following URL: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> Using such URLs is not recommended, it is only presented here to keep the example simple. A more realistic login request must be handled through a web form and a POST request. See [this page](sessions.md#example) for an example of form POST. + +Then you will be logged for the session: + +![](assets/en/WebServer/login1.png) + +Wrong credentials would be rejected: + +![](assets/en/WebServer/login2.png) + +Once a user is logged, you can handle the associated session using the `WEB Get Current Session ID` method. See the [User sessions](sessions.md) page. + diff --git a/website/translated_docs/de/WebServer/httpRequests.md b/website/translated_docs/de/WebServer/httpRequests.md new file mode 100644 index 00000000000000..42204d941f94c5 --- /dev/null +++ b/website/translated_docs/de/WebServer/httpRequests.md @@ -0,0 +1,353 @@ +--- +id: httpRequests +title: Processing HTTP requests +--- + +The 4D web server provides several features to handle HTTP requests: + +- the `On Web Connection` database method, a router for your web application, +- the `/4DACTION` URL to call server-side code +- `WEB GET VARIABLES` to get values from HTML objects sent to the server +- other commands such as `WEB GET HTTP BODY`, `WEB GET HTTP HEADER`, or `WEB GET BODY PART` allow to customize the request processing, including cookies. +- the *COMPILER_WEB* project method, to declare your variables. + + +## On Web Connection + +The `On Web Connection` database method can be used as the entry point for the 4D Web server. + +### Database method calls + +The `On Web Connection` database method is automatically called when the server reveives any URL that is not a path to an existing page on the server. The database method is called with the URL. + +For example, the URL "*a/b/c*" will call the database method, but "*a/b/c.html*" will not call the database method if the page "c.html" exists in the "a/b" subfolder of the [WebFolder](webServerConfig.md#root-folder). + +> The request should have previously been accepted by the [`On Web Authentication`](authentication.md#on-web-authentication) database method (if it exists) and the web server must be launched. + +### Syntax + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +| Parameter | Typ | | Beschreibung | +| --------- | ---- |:--:| -------------------------------------------- | +| $1 | Text | <- | URL | +| $2 | Text | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Text | <- | IP address of the web client (browser) | +| $4 | Text | <- | IP address of the server | +| $5 | Text | <- | User name | +| $6 | Text | <- | Password | + + +You must declare these parameters as shown below: + +```4d +//On Web Connection database method + + C_TEXT($1;$2;$3;$4;$5;$6) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Connection database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> Calling a 4D command that displays an interface element (`DIALOG`, `ALERT`, etc.) is not allowed and ends the method processing. + + +### $1 - URL extra data + +The first parameter ($1) is the URL entered by users in the address area of their web browser, without the host address. + +Let’s use an intranet connection as an example. Suppose that the IP address of your 4D Web Server machine is 123.4.567.89. The following table shows the values of $1 depending on the URL entered in the web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.4.567.89 | / | +| http://123.4.567.89 | / | +| 123.4.567.89/Customers | /Customers | +| http://123.4.567.89/Customers/Add | /Customers/Add | +| 123.4.567.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +Note that you are free to use this parameter at your convenience. 4D simply ignores the value passed beyond the host part of the URL. For example, you can establish a convention where the value "*/Customers/Add*" means “go directly to add a new record in the `[Customers]` table.†By supplying the web users with a list of possible values and/or default bookmarks, you can provide shortcuts to different parts of your application. This way, web users can quickly access resources of your website without going through the entire navigation path each time they make a new connection. + + +### $2 - Header and Body of the HTTP request + +The second parameter ($2) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Connection` database method "as is". Its contents will vary depending on the nature of the web browser attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + + +### $3 - Web client IP address + +The $3 parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + +### $4 - Server IP address + +The $4 parameter receives the IP address requested by the 4D Web Server. 4D allows for multi-homing, which allows you to use machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.html#ip-address-to-listen). + +### $5 and $6 - User Name and Password + +The $5 and $6 parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser, if applicable (see the [authentication page](authentication.md)). +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + + + + +## /4DACTION + +***/4DACTION/***MethodName***
    **/4DACTION/******MethodName/Param* + +| Parameter | Typ | | Beschreibung | +| ---------- | ---- |:--:| -------------------------------------------- | +| MethodName | Text | -> | Name of the 4D project method to be executed | +| Param | Text | -> | Text parameter to pass to the project method | + +**Usage:** URL or Form action. + +This URL allows you to call the *MethodName* 4D project method with an optional *Param* text parameter. The method will receive this parameter in *$1*. + +- The 4D project method must have been [allowed for web requests](allowProject.md): the “Available through 4D tags and URLs (4DACTION...)†attribute value must have been checked in the properties of the method. If the attribute is not checked, the web request is rejected. +- When 4D receives a `/4DACTION/MethodName/Param` request, the `On Web Authentication` database method (if it exists) is called. + +`4DACTION/` can be associated with a URL in a static Web page: + +```html +Do Something +``` + +The `MyMethod` project method should generally return a "reply" (sending of an HTML page using `WEB SEND FILE` or `WEB SEND TEXT`, etc.). Be sure to make the processing as short as possible in order not to block the browser. + +> A method called by `/4DACTION` must not call interface elements (`DIALOG`, `ALERT`, etc.). + +#### Beispiel + +This example describes the association of the `/4DACTION` URL with an HTML picture object in order to dynamically display a picture in the page. You insert the following instructions in a static HTML page: + +```html + +``` + +The `getPhoto` method is as follows: + +```4d +C_TEXT($1) // This parameter must always be declared +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + //find the picture in the Images folder within the Resources folder +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) //put the picture in the picture variable +PICTURE TO BLOB($PictVar;$BLOB;".png") //convert the picture to ".png" format +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION to post forms + +The 4D Web server also allows you to use “posted†forms, which are static HTML pages that send data to the Web server, and to easily retrieve all the values. The POST type must be associated to them and the form’s action must imperatively start with /4DACTION/MethodName. + +A form can be submitted through two methods (both can be used with 4D): +- POST, usually used to send data to the Web server, +- GET, usually used to request data from the Web server. + +> When the Web server receives a posted form, it calls the `On Web Authentication` database method (if it exists). + +In the called method, you must call the `WEB GET VARIABLES` command in order to [retrieve the names and values](#getting-values-from-the-requests) of all the fields included in an HTML page submitted to the server. + +Example to define the action of a form: + +```html +
    +``` + +#### Beispiel + +In a Web application, we would like for the browsers to be able to search among the records by using a static HTML page. This page is called “search.htmâ€. The application contains other static pages that allow you to, for example, display the search result (“results.htmâ€). The POST type has been associated to the page, as well as the `/4DACTION/SEARCH` action. + +Here is the HTML code that corresponds to this page: + +```html + +
    +Whole word
    + +
    +``` + +During data entry, type “ABCD†in the data entry area, check the "Whole word" option and validate it by clicking the **Search** button. In the request sent to the Web server: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D calls the `On Web Authentication` database method (if it exists), then the `processForm` project method is called, which is as follows: + +```4d + C_TEXT($1) //mandatory for compiled mode + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) //we retrieve all the variables of the form + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) //If the option has not been checked + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
    " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") //Send the list to the results.htm form + //which contains a reference to the variable vLIST, + //for example + //... +End if +``` + + + + +## Getting values from HTTP requests + +4D's Web server lets you recover data sent through POST or GET requests, using Web forms or URLs. + +When the Web server receives a request with data in the header or in the URL, 4D can retrieve the values of any HTML objects it contains. This principle can be implemented in the case of a Web form, sent for example using `WEB SEND FILE` or `WEB SEND BLOB`, where the user enters or modifies values, then clicks on the validation button. + +In this case, 4D can retrieve the values of the HTML objects found in the request using the `WEB GET VARIABLES` command. The `WEB GET VARIABLES` command retrieves the values as text. + +Consider the following HTML page source code: + +```html + + + Welcome + + + +
    +

    Welcome to Spiders United

    +

    Please enter your name: +

    +

    + + +

    +

    + + + +

    +
    + + +``` + +When 4D sends the page to a Web Browser, it looks like this: + +![](assets/en/WebServer/spiders.png) + +The main features of this page are: + +- It includes three **Submit** buttons: `vsbLogOn`, `vsbRegister` and `vsbInformation`. +- When you click **Log On**, the submission of the form is first processed by the JavaScript function `LogOn`. If no name is entered, the form is not even submitted to 4D, and a JavaScript alert is displayed. +- The form has a POST 4D method as well as a Submit script (*GetBrowserInformation*) that copies the browser properties to the four hidden objects whose names starts with *vtNav_App*. It also includes the `vtUserName` object. + +Let’s examine the 4D method `WWW_STD_FORM_POST` that is called when the user clicks on one of the buttons on the HTML form. + +```4d + // Retrieval of value of variables + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // The Log On button was clicked + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // The WWW POST EVENT method saves the information in a database table + Else + + $0:=WWW Register + // The WWW Register method lets a new Web user register + End if + + // The Register button was clicked + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // The Information button was clicked + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +The features of this method are: + +- The values of the variables *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, and *vtNav_userAgent* (bound to the HTML objects having the same names) are retrieved using the `WEB GET VARIABLES` command from HTML objects created by the *GetBrowserInformation* JavaScript script. +- Out of the *vsbLogOn*, *vsbRegister* and *vsbInformation* variables bound to the three Submit buttons, only the one corresponding to the button that was clicked will be retrieved by the `WEB GET VARIABLES` command. When the submit is performed by one of these buttons, the browser returns the value of the clicked button to 4D. This tells you which button was clicked. + +Keep in main that with HTML, all objects are text objects. If you use a SELECT object, it is the value of the highlighted element in the object that is returned in the `WEB GET VARIABLES` command, and not the position of the element in the array as in 4D. `WEB GET VARIABLES` always returns values of the Text type. + + +## Other Web Server Commands + +The 4D web server provides several low-level web commands allowing you to develop custom processing of requests: + +- the `WEB GET HTTP BODY` command returns the body as raw text, allowing any parsing you may need +- the `WEB GET HTTP HEADER` command return the headers of the request. It is useful to handle custom cookies, for example (along with the `WEB SET HTTP HEADER` command). +- the `WEB GET BODY PART` and `WEB Get body part count` commands to parse the body part of a multi-part request and retrieve text values, but also files posted, using BLOBs. + +These commands are summarized in the following graphic: + +![](assets/en/WebServer/httpCommands.png) + +The 4D web server supports files uploaded in chunked transfer encoding from any Web client. Chunked transfer encoding is a data transfer mechanism specified in HTTP/1.1. It allows data to be transferred in a series of "chunks" (parts) without knowing the final data size. The 4D Web Server also supports chunked transfer encoding from the server to Web clients (using `WEB SEND RAW DATA`). + +## COMPILER_WEB Project Method + +The COMPILER\_WEB method, if it exists, is systematically called when the HTTP server receives a dynamic request and calls the 4D engine. This is the case, for example, when the 4D Web server receives a posted form or a URL to process in [`On Web Connection`](#on-web-connection). This method is intended to contain typing and/or variable initialization directives used during Web exchanges. It is used by the compiler when the application is compiled. The COMPILER\_WEB method is common to all the Web forms. By default, the COMPILER_WEB method does not exist. You must explicitly create it. + +> The COMPILER_WEB project method is also called, if it exists, for each SOAP request accepted. + + diff --git a/website/translated_docs/de/WebServer/preemptiveWeb.md b/website/translated_docs/de/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..97c2f4ef1625bb --- /dev/null +++ b/website/translated_docs/de/WebServer/preemptiveWeb.md @@ -0,0 +1,95 @@ +--- +id: preemptiveWeb +title: Using preemptive web processes +--- + + +The 4D Web Server allows you to take full advantage of multi-core computers by using preemptive web processes in your compiled applications. You can configure your web-related code, including 4D tags and web database methods, to run simultaneously on as many cores as possible. + +For in-depth information on preemptive process in 4D, please refer to the *Preemptive 4D processes* section in the *Language Reference*. + +## Availability of preemptive mode for web processes + +The use of preemptive mode for web processes is only available in the following contexts: + +* use of 4D Server or 4D local mode (4D in remote mode does not support preemptive mode) + +* use of a compiled database + +* **Use preemptive processes** database setting checked (see below) + +* all web-related database methods and project methods are confirmed thread-safe by 4D Compiler + +If any requirement is missing, the web server will use cooperative processes. + +## Enabling the preemptive mode for the web server + +To enable the preemptive mode for your application's web server code, you must check the **Use preemptive processes** option on the "Web/Options (I)" page of the Database Settings dialog box: + +![](assets/en/WebServer/preemptive.png) + +When this option is checked, the 4D compiler will automatically evaluate the thread-safety property of each piece of web-related code (see below) and return errors in case of incompatibility. +> This option does not apply to web service processes (server or client). Preemptive mode is supported by web service processes at method level: you just have to select "Can be run in preemptive processes" property for published SOAP server methods (see *Publishing a Web Service with 4D*) or proxy client methods (see *Subscribing to a Web Service in 4D*) and make sure they are confirmed thread-safe by the compiler. + +## Writing thread-safe web server code + +All 4D code executed by the web server must be thread-safe if you want your web processes to be run in preemptive mode. When the **Use preemptive processes** option is checked in the Settings dialog box, the following parts of the application will be automatically evaluated by the 4D compiler: + +* All web-related database methods: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* The `compiler_web` project method (regardless of its actual "Execution mode" property); + +* Basically any code processed by the `PROCESS 4D TAGS` command in the web context, for example through .shtml pages. + +* Any project method with the "Available through 4D tags and URLS (`4DACTION`, etc.)" attribute + +* Triggers for tables with "Expose as REST resource" attribute + +* Project methods available through REST ("REST Server" property checked) + +For each of these methods and code parts, the compiler will check if the thread-safety rules are respected, and will return errors in case of issues. For more information about thread-safety rules, please refer to the *Writing a thread-safe method* paragraph in the *Processes* chapter. + +## Thread-safety of 4D web code + +Most of the web-related 4D commands and functions, database methods and URLs are thread-safe and can be used in preemptive mode. + +### 4D commands and database methods + +All 4D web-related commands are thread-safe, *i.e.*: + +* all commands from the *Web Server* theme, +* all commands from the *HTTP Client* theme. + +The web-related database methods are thread-safe and can be used in preemptive mode (see below): `On Web Authentication`, `On Web Connection`, `On REST Authentication`...). + +Of course, the code executed by these methods must also be thread-safe. + + +### Web Server URLs + +The following 4D Web Server URLs are thread-safe and can be used in preemptive mode: + +* *4daction/* (the called project method must also be thread-safe) +* *4dcgi/* (the called database methods must also be thread-safe) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (generated by `PROCESS 4D TAGS` for web request on picture fields) +* *4dimg/* (generated by `PROCESS 4D TAGS` for web request on picture variables) + +### Preemptive web process icon + +Both the Runtime Explorer and the 4D Server administration window display a specific icon for preemptive web processes: + +| Process type | Icon | +| --------------------- | ---------------------------------------- | +| Preemptive web method | ![](assets/en/WebServer/processIcon.png) | + + diff --git a/website/translated_docs/de/WebServer/sessions.md b/website/translated_docs/de/WebServer/sessions.md new file mode 100644 index 00000000000000..2144798ed8233c --- /dev/null +++ b/website/translated_docs/de/WebServer/sessions.md @@ -0,0 +1,172 @@ +--- +id: sessions +title: User sessions +--- + +The 4D web server provides built-in features for managing **user sessions**. Creating and maintaining user sessions allows you to control and improve the user experience on your web application. When user sessions are enabled, web clients can reuse the same server context from one request to another. + +Web server user sessions allow to: + +- handle multiple requests simultaneously from the same web client through an unlimited number of preemptive processes (web server sessions are **scalable**), +- share data between the processes of a web client, +- associate privileges to user sessions, +- handle access through a `Session` object and the [Session API](API/SessionClass.md). + +> **Note:** The current implementation is only the first step of an upcoming comprehensive feature allowing developers to manage hierarchical user permissions through sessions in the whole web application. + + +## Enabling sessions + +The session management feature can be enabled and disabled on your 4D web server. There are different ways to enable session management: + +- Using the **Scalable sessions** option on the "Web/Options (I)" page of the Settings (permanent setting): ![alt-text](assets/en/WebServer/settingsSession.png) + +This option is selected by default in new projects. It can however be disabled by selecting the **No sessions** option, in which case the web session features are disabled (no `Session` object is available). + +- Using the [`.scalableSession`](API/WebServerClass.md#scalablesession) property of the Web Server object (to pass in the *settings* parameter of the [`.start()`](API/WebServerClass.md#start) function). In this case, this setting overrides the option defined in the Settings dialog box for the Web Server object (it is not stored on disk). + +> The `WEB SET OPTION` command can also set the session mode for the main Web server. + +In any cases, the setting is local to the machine; so it can be different on the 4D Server Web server and the Web servers of remote 4D machines. + +> **Compatibility**: A **Legacy sessions** option is available in projects created with a 4D version prior to 4D v18 R6 (for more information, please refer to the [doc.4d.com](https://doc.4d.com) web site). + + +## Session implementation + +When [sessions are enabled](#enabling-sessions), automatic mechanisms are implemented, based upon a private cookie set by 4D itself: "4DSID_*AppName*", where *AppName* is the name of the application project. This cookie references the current web session for the application. + +> The cookie name can be get using the [`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) property. + +1. In each web client request, the Web server checks for the presence and the value of the private "4DSID_*AppName*" cookie. + +2. If the cookie has a value, 4D looks for the session that created this cookie among the existing sessions; if this session is found, it is reused for the call. + +2. If the client request does not correspond to an already opened session: + +- a new session with a private "4DSID_*AppName*" cookie is created on the web server +- a new Guest `Session` object is created and is dedicated to the scalable web session. + +The current `Session` object can then be accessed through the [`Session`](API/SessionClass.md#session) command in the code of any web processes. + +![alt-text](assets/en/WebServer/schemaSession.png) + +> Web processes usually do not end, they are recycled in a pool for efficiency. When a process finishes executing a request, it is put back in the pool and made available for the next request. Since a web process can be reused by any session, [process variables](Concepts/variables.md#process-variables) must be cleared by your code at the end of its execution (using [`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/en/page89.html) for example). This cleanup is necessary for any process related information, such as a reference to an opened file. This is the reason why **it is recommended** to use the [Session](API/SessionClass.md) object when you want to keep session related information. + + +## Sharing information + +Each `Session` object provides a [`.storage`](API/SessionClass.md#storage) property which is a [shared object](Concepts/shared.md). This property allows you to share information between all processes handled by the session. + +## Session lifetime + +A scalable web session is closed when: + +- the web server is stopped, +- the timeout of the session cookie has been reached. + +The lifespan of an inactive cookie is 60 minutes by default, which means that the web server will automatically close inactive sessions after 60 minutes. + +This timeout can be set using the [`.idleTimeout`](API/SessionClass.md#idletimeout) property of the `Session` object (the timeout cannot be less than 60 minutes). + +When a scalable web session is closed, if the [`Session`](API/SessionClass.md#session) command is called afterwards: + +- the `Session` object does not contain privileges (it is a Guest session) +- the [`.storage`](API/SessionClass.md#storage) property is empty +- a new session cookie is associated to the session + + +## Privileges + +Privileges can be associated to sessions. On the web server, you can provide specific access or features depending on the privileges of the session. + +You can assign privileges usign the [`.setPrivileges()`](API/SessionClass.md#setprivileges) function. In your code, you can check the session's privileges to allow or deny access using the [`.hasPrivilege()`](API/SessionClass.md#hasprivilege) function. By default, new sessions do not have any privilege: they are **guest** sessions ([`.isGuest()`](API/SessionClass.md#isguest) function returns true). + +> In the current implementation (v18 R6), only the "WebAdmin" privilege is available. + +Beispiel: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page +End if +``` + + +## Beispiel + +In a CRM application, each salesperson manages their own client portfolio. The datastore contains at least two linked dataclasses: Customers and SalesPersons (a salesperson has several customers). + +![alt-text](assets/en/WebServer/exampleSession.png) + +We want a salesperson to authenticate, open a session on the web server, and have the top 3 customers be loaded in the session. + + +1. We run this URL to open a session: + +``` +http://localhost:8044/authenticate.shtml +``` + +> In a production environment, it it necessary to use a [HTTPS connection](API/WebServerClass.md#httpsenabled) to avoid any uncrypted information to circulate on the network. + + +2. The `authenticate.shtml` page is a form containing *userId* et *password* input fields and sending a 4DACTION POST action: + +```html + + + +
    + UserId:
    + Password:
    + +
    + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. The authenticate project method looks for the *userID* person and validates the password against the hashed value already stored in the *SalesPersons* table: + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` \ No newline at end of file diff --git a/website/translated_docs/de/WebServer/templates.md b/website/translated_docs/de/WebServer/templates.md new file mode 100644 index 00000000000000..39ad7b2fcc8189 --- /dev/null +++ b/website/translated_docs/de/WebServer/templates.md @@ -0,0 +1,96 @@ +--- +id: templates +title: Template pages +--- + +4D's Web server allows you to use HTML template pages containing tags, i.e. a mix of static HTML code and 4D references added by means of [transformation tags](Tags/tags.md) such as 4DTEXT, 4DIF, or 4DINCLUDE. These tags are usually inserted as HTML type comments (``) into the HTML source code. + +When these pages are sent by the HTTP server, they are parsed and the tags they contain are executed and replaced with the resulting data. The pages received by the browsers are thus a combination of static elements and values coming from 4D processing. + +For example, if you write in an HTML page: + +```html +

    Welcome to !

    +``` + +The value of the 4D variable *vtSiteName* will be inserted in the HTML page. + + +## Tags for templates + +The following 4D tags are available: + +- 4DTEXT, to insert 4D variables and expressions as text, +- 4DHTML, to insert HTML code, +- 4DEVAL, to evaluate any 4D expression, +- 4DSCRIPT, to execute a 4D method, +- 4DINCLUDE, to include a page within another one, +- 4DBASE, to modify the default folder used by the 4DINCLUDE tag, +- 4DCODE, to insert 4D code, +- 4DIF, 4DELSE, 4DELSEIF and 4DENDIF, to insert conditions in the HTML code, +- 4DLOOP and 4DENDLOOP, to make loops in the HTML code, +- 4DEACH and 4DENDEACH, to loop in collections, entity selections, or object properties. + +These tags are described in the [Transformation Tags](Tags/tags.md) page. + +It is possible to mix tags. For example, the following HTML code is allowed: + +```html + +... + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + + (loop on the current selection) + (If [TABLE]ValNum>10) + (subpage insertion) + (Else) + Value:
    + (Field display) + + (End for) + + +``` + + +## Tag parsing + +For optimization reasons, the parsing of the HTML source code is not carried out by the 4D Web server when HTML pages are called using simple URLs that are suffixed with “.HTML†or “.HTMâ€. + +Parsing of the contents of template pages sent by 4D web server takes place when `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB) or `WEB SEND TEXT` commands are called, as well as when sending pages called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to "force" the parsing of HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, `http://www.server.com/dir/page.shtm`). An example of the use of this type of page is given in the description of the `WEB GET STATISTICS` command. XML pages (.xml, .xsl) are also supported and always parsed by 4D. + +You can also carry out parsing outside of the Web context when you use the `PROCESS 4D TAGS` command. + +Internally, the parser works with UTF-16 strings, but the data to parse may have been encoded differently. When tags contain text (for example `4DHTML`), 4D converts the data when necessary depending on its origin and the information available (charset). Below are the cases where 4D parses the tags contained in the HTML pages, as well as any conversions carried out: + +| Action / Command | Content analysis of the sent pages | Support of $ syntax(*) | Character set used for parsing tags | +| ---------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pages called via URLs | X, except for pages with “.htm†or “.html†extensions | X, except for pages with “.htm†or “.html†extensions | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND FILE` | X | - | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND TEXT` | X | - | No conversion necessary | +| `WEB SEND BLOB` | X, if BLOB is of the “text/html†type | - | Use of charset set in the "Content-Type" header of the response. Otherwise, use of default character set for the HTTP server | +| Inclusion by the `` tag | X | X | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `PROCESS 4D TAGS` | X | X | Text data: no conversion. BLOB data: automatic conversion from the Mac-Roman character set for compatibility | + +(*) The alternative $-based syntax is available for 4DHTML, 4DTEXT and 4DEVAL tags. + +## Accessing 4D methods via the Web + +Executing a 4D method with `4DEACH`, `4DELSEIF`, `4DEVAL`, `4DHTML`, `4DIF`, `4DLOOP`, `4DSCRIPT`, or `4DTEXT` from a web request is subject to the [Available through 4D tags and URLs (4DACTION...)](allowProject.md) attribute value defined in the properties of the method. If the attribute is not checked for the method, it can not be called from a web request. + + +## Prevention of malicious code insertion + +4D tags accept different types of data as parameters: text, variables, methods, command names, etc. When this data is provided by your own code, there is no risk of malicious code insertion since you control the input. However, your database code often works with data that was, at one time or another, introduced through an external source (user input, import, etc.). + +In this case, it is advisable to **not use** tags such as `4DEVAL` or `4DSCRIPT`, which evaluate parameters, directly with this sort of data. + +In addition, according to the [principle of recursion](Tags/tags.md#recursive-processing), malicious code may itself include transformation tags. In this case, it is imperative to use the `4DTEXT` tag. Imagine, for example, a Web form field named "Name", where users must enter their name. This name is then displayed using a `` tag in the page. If text of the "\" type is inserted instead of the name, interpreting this tag will cause the application to be exited. To avoid this risk, you can just use the `4DTEXT` tag systematically in this case. Since this tag escapes the special HTML characters, any malicious recursive code that may have been inserted will not be reinterpreted. To refer to the previous example, the "Name" field will contain, in this case, "`<!--#4DEVAL QUIT 4D-->`" which will not be transformed. diff --git a/website/translated_docs/de/WebServer/webServer.md b/website/translated_docs/de/WebServer/webServer.md new file mode 100644 index 00000000000000..301f921ae0b1ab --- /dev/null +++ b/website/translated_docs/de/WebServer/webServer.md @@ -0,0 +1,62 @@ +--- +id: webServer +title: Überblick +--- + +4D in local mode, 4D in remote mode and 4D Server include a web server engine (aka http server) that enables you to design and publish powerful web applications that can make the most of your 4D databases. + +## Easy Monitoring + +You can start or stop publication of the web application at any time. To do so, you just need to select a menu command or execute a single line of code. + +Monitoring the 4D web server is easy and can be done using the 4D Server administration window or through [special URLs](webServerAdmin.md#administration-urls). + +## Ready-to-use + +The 4D web server automatically creates a default root folder and a default home page for an instantaneous availability. + +## Security + +Data security is present at every stage of the 4D web server implementations. Security levels are scalable and default settings usually select the most secure options. The 4D web server security is based upon the following elements: + +* Extended support of the [**TLS Protocol (HTTPS)**](Admin/tls.md), + +* **Authentication**: flexible and customizable [authentication features](authentication.md) based upon built-it settings as well as fallback database methods ([`On Web Authentication`](authentication.md#on-web-authentication) for the web server and [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) for the REST server), + +* **Control of exposed contents**: only elements that you expose explicitely can be available from direct web or REST requests. You must declare: + - [Project methods](templates.md#allowing-project-methods) exposed through HTTP requests + - [ORDA functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) exposed through REST requests + - [Tables and fields](REST/configuration.md#exposing-tables-and-fields) that you don't want to be available to REST requests. + +* **Sandboxing** through the definition of a [HTML Root](webServerConfig.md#root-folder) folder by default, + +* **Control of server resource usage** (e.g. [maximum concurrent web processes](webServerConfig.html#maximum-concurrent-web-processes) option). +> For a general overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). + + +## User Sessions + +The 4D web server includes complete automatic features for easily managing [web sessions](sessions.md) (user sessions) based on cookies. + + +## Gateway to REST Requests + +The 4D web server allows accessing data stored in your 4D applications through REST requests. REST requests provide direct access to any database operation such as adding, reading, editing, ordering, or searching data. + +REST requests are detailed in the [REST server](REST/gettingStarted.md) section. + +## Extended settings + +The 4D web server configuration is defined through a comprehensive set of application-level settings that can also be customized for the session using the `webServer` object properties or the `WEB SET OPTION` command. + +## Templates and URLs + +The 4D web server supports access to data stored in your 4D applications through template pages and specific URLs. + +- Template pages contain [special tags](templates.md) that initiate web server processing at the time when they are sent to browsers. + +- [specific URLs](httpRequests) enable 4D to be called in order to execute any action; these URLs can also be used as form actions to trigger processing when the user posts HTML forms. + +## Dedicated Database Methods + +`On Web Authentication`, `On Web Connection`, as well as `On REST Authentication` database methods are the entry points of requests in the web server; they can be used to evaluate and route any type of request. diff --git a/website/translated_docs/de/WebServer/webServerAdmin.md b/website/translated_docs/de/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..2726f330d5fdb7 --- /dev/null +++ b/website/translated_docs/de/WebServer/webServerAdmin.md @@ -0,0 +1,231 @@ +--- +id: webServerAdmin +title: Administration +--- + +4D provides several integrated tools to start, stop, or monitor the integrated web server. + + +## Starting the 4D Web Server + +> To be able to launch the web server of 4D or 4D Server, you must have a "4D Web Application" license. For more information, please refer to the [4D Web site](https://www.4d.com). + + +A 4D project can start and monitor a web server for the main (host) application as well as for each hosted component. + +The main 4D web server can be started in different ways: + +* Using a button/menu command. + * 4D: **Run\>Start Web Server** menu
    ![](assets/en/WebServer/start1.png) + * 4D Server: **Start HTTP server** button of the HTTP Server page
    ![](assets/en/WebServer/start2.png) + +* Automatically starting it each time the 4D application is opened. To do this, display the **Web\/Configuration** page of the Settings and select the **Launch Web Server at Startup** check box:
    ![](assets/en/WebServer/config.png) + +* Programmatically, by calling the [`webServer.start()`](API/WebServerClass.md#start) function or `WEB START SERVER` command. + +The web server of any component can be launched by calling the [`webServer.start()`](API/WebServerClass.md#start) function on the component's web server object. +> You do not need to relaunch the 4D application to start or stop the web server. + +## Stopping the 4D Web Server + +The main 4D web server can be stopped in different ways: + +* Using the **Run\>Stop Web Server** menu of 4D or the **Stop HTTP server** button of the HTTP Server page of 4D Server (both items show **Start...** when the server is not already started). + +* Programmatically, by calling the [`webServer.stop()`](API/WebServerClass.md#stop) function or `WEB STOP SERVER` command. + +The web server of any component can be stopped by calling the `webServer.stop()` function on the component's web server object. + + +## Testing the 4D Web Server + +The **Test Web Server** command can be used to make sure the built-in web server is functioning correctly (4D only). This command is accessible in the **Run** menu when the web server is launched: + +![](assets/en/WebServer/test1.png) + + +When you select this command, the home page of the website published by the 4D application is displayed in a window of your default web browser: + +![](assets/en/WebServer/defaultHomePage.png) + + +This command lets you verify that the web server, home page display, etc. work correctly. The page is called using the *localhost* URL, which is the standard shortcut designating the IP address of the machine on which the web browser is executed. The command takes into account the [TCP publication port](#http-port) number specified in the settings. + + + +## Clearing the Cache + +At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). + +To do so, you can: + +- 4D: click on the **Clear Cache** button in the Web/Options (I) page of the Settings dialog box. +- 4D Server: click on the **Clear Cache** button in the HTTP page of the [4D Server Administration window](Admin/server-admin.md#http-server-page). + +The cache is then immediately cleared. +> You can also use the [/4DCACHECLEAR](#cacheclear) URL. + + + +## Runtime Explorer + +The **Watch** page (**Web** heading) in the Runtime Explorer displays web server information, particularly: + +* **Web Cache Usage**: indicates the number of pages present in the web cache as well as its use percentage. This information is only available if the web server is active and if the cache size is greater than 0. + +* **Web Server Elapsed Time**: indicates the duration of use (in hours:minutes:seconds format) of the Web server. This information is only available if the web server is active. + +* **Web Hits Count**: indicates the total number of HTTP requests received since the web server boot, as well as an instantaneous number of requests per second (measure taken between two Runtime Explorer updates). This information is only available if the web server is active. + + + + +## Administration URLs + +Website administration URLS allow you to control the website published on your server. 4D Web Server accepts four particular URLs: */4DSTATS*, */4DHTMLSTATS*, /*4DCACHECLEAR* and */4DWEBTEST*. + +> */4DSTATS*, */4DHTMLSTATS* and */4DCACHECLEAR* are only available to the Designer and Administrator of the database. If the 4D password system has not been activated, these URLs are available to all the users. /4DWEBTEST is always available. + + +### /4DSTATS + +The **/4DSTATS** URL returns several items of information in an HTML table (displayable in a browser): + +| Item | Beschreibung | +| ---------------------- | ------------------------------------------------------------ | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **including pictures** | + +This information can allow you to check the functioning of your server and eventually adapt the corresponding parameters. +> The `WEB GET STATISTICS` command allows you to also obtain information about how the cache is being used for static pages. + +### /4DHTMLSTATS + +The */4DHTMLSTATS* URL returns, also as an HTML table, the same information as the */4DSTATS* URL. The difference is that the **Cached Objects** field only counts HTML pages (without counting picture files). Moreover, this URL returns the **Filtered Objects** field. + +| Item | Beschreibung | +| ---------------------- | ---------------------------------------------------------------------- | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **without pictures** | +| Filtered Objects | Number of objects in cache not counted by URL, in particular, pictures | + + +### /4DCACHECLEAR + +The */4DCACHECLEAR* URL immediately clears the cache of the static pages and images. It allows you to therefore “force†the update of the pages that have been modified. + +### /4DWEBTEST + +The */4DWEBTEST* URL is designed to check the web server status. When this URL is called, 4D returns a text file with the following HTTP fields filled: + +| HTTP Field | Beschreibung | Beispiel | +| ---------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| Datum | current date at the RFC 822 format | Mon, 7 Dec 2020 13:12:50 GMT | +| Server | 4D/version number | 4D/18.5.0 (Build 18R5.257368) | +| User-Agent | name and version @ IP client address | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1 | + + + +## Logs + +4D allows you to generate two logs of web requests: + +- a debug log, useful in the web server development phase (*HTTPDebugLog.txt*), +- a standardized web request log, rather used for statistic purposes (*logweb.txt*). + +Both log files are automatically created in the **Logs** folder of the application project. + +### HTTPDebugLog.txt + +The [http debug file](webServerConfig.md#debug-log) can be enabled using the [`web server` object](webServerObject.md) or the `WEB SET OPTION` command. + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +The following fields are logged for both Request and Response: + +| Field name | Beschreibung | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + + +### logweb.txt + +The [web log recording file](webServerConfig.md#log-recording) can be enabled using the [`web server` object](webServerObject.md), the `WEB SET OPTION` command, or the **Web/Log (type)** page of the settings. You need to select the log format. + +#### CLF/DLF + +Each line of the file represents a request, such as: *host rfc931 user \[DD/MMM/YYYY:HH:MM:SS] "request" state length* Each field is separated by a space and each line ends by the CR/LF sequence (character 13, character 10). + +DLF (Combined Log Format) format is similar to CLF (Common Log Format) format and uses exactly the same structure. It simply adds two additional HTTP fields at the end of each request: Referer and User-agent. Here is the description of CLF/DLF formats (not customizable): + +| Field name | Beschreibung | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| host | IP address of the client (ex. 192.100.100.10) | +| rfc931 | information not generated by 4D, it’s always - (a minus sign | +| user | user name as it is authenticated, or else it is - (a minus sign). If the user name contains spaces, they will be replaced by _ (an underscore). | +| DD/MMM/YYYY:HH:MM:SS | DD: day, MMM: a 3-letter abbreviation for the month name (Jan, Feb,...), YYYY: year, HH: hour, MM: minutes, SS: seconds. The date and time are local to the server. | +| request | request sent by the client (ex. GET /index.htm HTTP/1.0 | +| state | reply given by the server | +| length | size of the data returned (except the HTTP header) or 0 | +| Referer | DLF only- Contains the URL of the page pointing to the requested document. | +| User-agent | DLF only- Contains the name and version of the browser or software of the client at the origin of the request | + +#### ELF/WLF + +The ELF (Extended Log Format) format is very widespread in the world of HTTP browsers. It can be used to build sophisticated logs that meet specific needs. For this reason, the ELF format can be customized: it is possible to choose the fields to be recorded as well as their order of insertion into the file. + +The WLF (WebStar Log Format) was developed specifically for the 4D WebSTAR server. + +##### Configuring the fields + +When you choose the ELF or WLF format, the “Web Log Token Selection†area displays the fields available for the chosen format. You will need to select each field to be included in the log. To do so, check the desired fields. +> You cannot select the same field twice. + +The following table lists the fields available for each format (in alphabetical order) and describes its contents: + +| Datenfeld | ELF | WLF | Wert | +| -------------- | --- | --- | -------------------------------------- | +| BYTES_RECEIVED | | X | Number of bytes received by the server | + BYTES_SENT| X| X| Number of bytes sent by the server to the client| C_DNS| X| X |IP address of the DNS (ELF: field identical to the C_IP field)| C_IP| X| X| IP address of the client (for example 192.100.100.10)| CONNECTION_ID| |X| Connection ID number| CS(COOKIE)| X| X| Information about cookies contained in the HTTP request| CS(HOST)| X| X| Host field of the HTTP request| CS(REFERER)| X| X| URL of the page pointing to the requested document| CS(USER_AGENT)| X| X| Information about the software and operating system of the client| CS_SIP| X| X| IP address of the server| CS_URI| X| X| URI on which the request is made| CS_URI_QUERY| X| X| Request query parameters| CS_URI_STEM| X| X| Part of request without query parameters| DATE| X| X| DD: day, MMM: 3-letter abbreviation for month (Jan, Feb, etc.), YYYY: year| METHOD| X| X| HTTP method used for the request sent to the server| PATH_ARGS| | X| CGI parameters: string located after the “$†character| STATUS| X| X| Reply provided by the server| TIME| X| X| HH: hour, MM: minutes, SS: seconds| TRANSFER_TIME| X| X| Time requested by server to generate the reply| USER| X| X| User name if authenticated; otherwise - (minus sign).

    If the user name contains spaces, they are replaced by _ (underlines)| URL | |X| URL requested by the client| +> Dates and times are given in GMT. + + +#### Backup Frequency + +Since a *logweb.txt* file can become considerably large, it is possible to set up an automatic archiving mechanism. The triggering of a backup can be based on a certain period of time (expressed in hours, days, week or months), or based on the file size; when the set deadline (or file size) is reached, 4D automatically closes and archives the current log file and creates a new one. + +When the web log file backup is triggered, the log file is archived in a folder named "Logweb Archives," which is created at the same level as the *logweb.txt* file. + +The archived file is renamed based on the following example: “DYYYY_MM_DD_Thh_mm_ss.txt.†For instance, for a file archived on September 4, 2020 at 3:50 p.m. and 7 seconds: “D2020_09_04_T15_50_07.txt.†+ +#### Backup Parameters + +The automatic backup parameters for the logweb.txt are set on the **Web/Log (backup)** page of the Settings: + +![](assets/en/WebServer/backup.png) + +First you must choose the frequency (days, weeks, etc.) or the file size limit criterion by clicking on the corresponding radio button. You must then specify the precise moment of the backup if necessary. + +* **No Backup**: The scheduled backup function is deactivated. + +* **Every X hour(s)**: This option is used to program backups on an hourly basis. You can enter a value between 1 and 24 . + * **starting at**: Used to set the time at which the first back up will begin. + +* **Every X day(s) at X**: This option is used to program backups on a daily basis. Enter 1 if you want to perform a daily backup. When this option is checked, you must indicate the time when the backup must be started. + +* **Every X week(s), day at X**: This option is used to program backups on a weekly basis. Enter 1 if you want to perform a weekly backup. When this option is checked, you must indicate the day(s) of the week and the time when each backup must be started. You can select several days of the week if desired. For example, you can use this option to set two weekly backups: one on Wednesdays and one on Fridays. + +* **Every X month(s), Xth day at X**: This option is used to program 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 must be started. + +* **Every X MB**: This option is used to program backups based on the size of the current request log file. A backup is automatically triggered when the file reaches the set size. You can set a size limit of 1, 10, 100 or 1000 MB. diff --git a/website/translated_docs/de/WebServer/webServerConfig.md b/website/translated_docs/de/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..e1276a06598094 --- /dev/null +++ b/website/translated_docs/de/WebServer/webServerConfig.md @@ -0,0 +1,650 @@ +--- +id: webServerConfig +title: Configuration +--- + +The 4D web server settings include security parameters, listening ports, defaults paths, and various options covering all the server features. 4D provides default values for every settings. + + +## Where to configure settings? + +There are different ways to configure the 4D web server settings, depending on the scope and the server you want to set: + +| Setting location | Scope | Involved web server | +| --------------------------------------- | ---------------------------------------- | ----------------------------------------------- | +| [webServer object](webServerObject.md) | Temporary (current session) | Any web server, including component web servers | +| `WEB SET OPTION` or a `WEB XXX` command | Temporary (current session) | Main server | +| **Settings** dialog box (**Web** pages) | Permanent (all sessions, stored on disk) | Main server | + +> Some settings are not available from all locations. + +## Cache + +| Can be set with | Name | Kommentare | +| ------------------- | --------------------------------------- | ---------- | +| Settings dialog box | Configuration page/Use the 4D Web cache | | +| Settings dialog box | Configuration page/Page Cache Size | | + +Enables and configures the web page cache. + +The 4D web server has a cache that allows you to load static pages, GIF images, JPEG images (<512 kb) and style sheets (.css files) in memory, as they are requested. Using the cache allows you to significantly increase the web server’s performance when sending static pages. The cache is shared between all the web processes. + +You can modify the size of the cache in the **Pages Cache Size** area. The value you set depends on the number and size of your website’s static pages, as well as the resources that the host machines has at its disposal. +> While using your web database, you can check the performance of the cache by using the `WEB GET STATISTICS` command. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. The [/4DSTATS] and [/4DHTMLSTATS] URLs allow you to also obtain information about the cache’s state. + + +## Certificate folder + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | `certificateFolder` | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function. | + +Folder where the TLS certificate files for the web server are located. + +By default with 4D or 4D Server, these files must be placed next to the [project folder](Project/architecture.md#project-folder). + +With 4D in remote mode, these files must be located in the local resources folder of the database on the remote machine (see `4D Client Database Folder` paragraph of the `Get 4D folder` command). You must copy these files manually on the remote machine. + +> TLS certificate files are *key.pem* (document containing the private encryption key) and *cert.pem* (document containing the certificate). + + +## Character Set + +| Can be set with | Name | Kommentare | +| ------------------- | ------------------------------ | ------------------------------ | +| webServer object | `characterSet` | MIBEnum integer or Name string | +| `WEB SET OPTION` | `Web character set` | MIBEnum integer or Name string | +| Settings dialog box | Options (II) page/Standard Set | Pop up menu | + +Defines the set of characters to be used by the 4D web server. The default value actually depends on the language of the OS. +> This setting is also used for generating Quick Reports in HTML format . + + +## Cipher list + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------- | ---------- | +| webServer object | [`cipherSuite`](API/WebServerClass.md#ciphersuite) | Text | + +Cipher list used for the secure protocol; sets the priority of ciphering algorithms implemented by the web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + +> The default cipher list used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server, client/server connections, as well as the HTTP client and all the 4D commands that make use of the secure protocol. + +## CORS Settings + +| Can be set with | Name | Kommentare | +| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ | +| webServer object | [`CORSSettings`](API/WebServerClass.md#corssettings) | Collection of objects (List of allowed hosts and methods for the CORS service) | +| `WEB SET OPTION` | `Web CORS settings` | Collection of objects (List of allowed hosts and methods for the CORS service) | +| Settings dialog box | Options (II) page/Domain names and HTTP methods allowed | Click on the [+] button to add an allowed domain name and its method(s) | + +List of allowed hosts and methods for the CORS service. + +#### Domain names (host property) + +Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. Several syntaxes are supported: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### HTTP methods allowed (methods property) + +Accepted HTTP method(s) for the corresponding CORS host. The following HTTP methods are supported: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +Separate each method with a ";" (e,g,: "post;get"). If methods is empty, null, or undefined, all methods are enabled. + +#### See also + +[Enable CORS Service](#enable-cors-service) + + + +## Debug log + +| Can be set with | Name | Kommentare | +| ---------------- | --------------- | ---------- | +| webServer object | `debugLog` | number | +| `WEB SET OPTION` | `Web debug log` | number | + +Status of the HTTP request log file of the web server (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). It is useful for debugging issues related to the Web server. It records each request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +| Wert | Constant | Beschreibung | +| ---- | ----------- | ------------------------------ | +| 0 | wdl disable | Web HTTP debug log is disabled | + + + +|1|wdl enable without body|Web HTTP debug log is enabled without body parts (body size is provided in this case)| |3|wdl enable with response body|Web HTTP debug log is enabled with body part in response only| |5|wdl enable with request body|Web HTTP debug log is enabled with body part in request only| |7|wdl enable with all body parts|Web HTTP debug log is enabled with body parts in response and request| + + +## Defaut Home page + +| Can be set with | Name | Kommentare | +| ------------------- | ---------------------------------------------------------- | ------------------------------------- | +| webServer object | [`defaultHomepage`](API/WebServerClass.md#defaulthomepage) | Text | +| `WEB SET HOME PAGE` | | Can be different for each web process | +| Settings dialog box | Configuration page/Default Home Page | | + +Designate a default home page for the web server. This page can be static or [semi-dynamic]. + +By default, when the web server is launched for the first time, 4D creates a home page named "index.html" and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the web server will obtain the following page: + +![](assets/en/WebServer/defaultHomePage.png) + +You can designate another default home page by entering its pathname. + +- The path is relative to the [default HTML root folder](#root-folder). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- The path must neither start not end with a slash. + +For example, if you want the default home page to be "MyHome.htm", and it is located in the "Web" folder (itself located in the default HTML root folder), use "Web/MyHome.htm". + +If you do not specify any default home page, the `On Web Connection` database method is called. It is up to you to process the request procedurally. + +## Enable CORS Service + +| Can be set with | Name | Kommentare | +| ------------------- | -------------------------------------------------- | --------------------------------------------------- | +| webServer object | [`CORSEnabled`](API/WebServerClass.md#corsenabled) | Boolean, true to enable the CORS (false by default) | +| `WEB SET OPTION` | `Web CORS enabled` | 0 (disabled, default) or 1 (enabled) | +| Settings dialog box | Options (II) page/Enable CORS | Unchecked by default | + +The 4D web server implements cross-origin resource sharing (CORS) to allow specific Web pages served from another domain to access the current Web application's resources via XHR calls, e.g., using REST. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled, XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see CORS Settings below). In this case, if a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +When disabled (default), all cross site requests sent with CORS are ignored. + +For more information about CORS, please refer to the [Cross-origin resource sharing page](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + +#### See also +[CORS Settings](#cors-settings) + +## Enable HTTP + +| Can be set with | Name | Kommentare | +| ------------------- | -------------------------------------------------- | ---------- | +| webServer object | [`HTTPEnabled`](API/WebServerClass.md#httpenabled) | Boolean | +| `WEB SET OPTION` | `Web HTTP enabled` | | +| Settings dialog box | Configuration page/Enable HTTP | | + +Indicates whether or not the web server will accept non-secure connections. + + +## Enable HTTPS + +| Can be set with | Name | Kommentare | +| ------------------- | ---------------------------------------------------- | ---------- | +| webServer object | [`HTTPSEnabled`](API/WebServerClass.md#httpsenabled) | Boolean | +| `WEB SET OPTION` | `Web HTTPS enabled` | | +| Settings dialog box | Configuration page/Enable HTTPS | | + +Status for communication over HTTPS. This option is described in [this section](Admin/tls.md). + + +## Enable HSTS + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------- | ----------------------------------------------- | +| webServer object | [`HSTSEnabled`](API/WebServerClass.md#hstsenabled) | Boolean, true to enable HSTS (default is false) | +| `WEB SET OPTION` | `Web HSTS enabled` | 0 (disabled, default) or 1 (enabled) | + +HTTP Strict Transport Security (HSTS) status. + +When [HTTPS is enabled](#enable-https), keep in mind that if [HTTP is also enabled](#enable-http), the browser can still switch between HTTPS and HTTP (for example, in the browser URL area, the user can replace "https" by "http"). To forbid http redirections, you can [disable HTTP](#enable-http), however in this case an error message is displayed to client HTTP requests. + +HSTS allows the 4D web server to declare that browsers should only interact with it via secure HTTPS connections. Once activated, the 4D web server will automatically add HSTS-related information to all response headers. Browsers will record the HSTS information the first time they receive a response from the 4D web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the Web **HSTS max age** setting. + +> HSTS requires that HTTPS is [enabled](enable-https) on the server. [HTTP](enable-http) must also be enabled to allow client initial connections. + +> You can get the current connection mode using the `WEB Is secured connection` command. + + +## HSTS Max Age + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------------------------------------ | ----------------- | +| webServer object | [`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage) | number in seconds | +| `WEB SET OPTION` | `Web HSTS max age` | number in seconds | + +Specifies the maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. Default value is 63072000 (2 years) + +> **Warning:** Once HSTS is enabled, client connections will continue to use this mechanism for the specified duration. When you are testing your applications, it is recommended to set a short duration to be able to switch between secured and non-secured connection modes if necessary. + + + + + +## HTTP Compression Level + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------------------------- | ------------------------------ | +| webServer object | [`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel) | | +| `WEB SET OPTION` | `Web HTTP compression level` | Applies to Web and Web Service | + +Compression level for all compressed HTTP exchanges for the 4D web server (client requests or server replies). This setting lets you optimize exchanges by either privileging speed of execution (less compression) or the amount of compression (less speed). The choice of a value depends on the size and type of data exchanged. + +Pass 1 to 9 as value where 1 is the fastest compression and 9 the highest. You can also pass -1 to get a compromise between speed and rate of compression. By default, the compression level is 1 (faster compression). + +## HTTP Compression Threshold + +| Can be set with | Name | Kommentare | +| ---------------- | ---------------------------------------------------------------------------- | ---------- | +| webServer object | [`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold) | | +| `WEB SET OPTION` | `Web HTTP compression threshold` | | + +In the framework of optimized HTTP exchanges, size threshold for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Pass the size expressed in bytes as value. By default, the compression threshold is set to 1024 bytes. + + +## HTTP Port + +| Can be set with | Name | Kommentare | +| ------------------- | -------------------------------------------- | ---------- | +| webServer object | [`HTTPPort`](API/WebServerClass.md#httpport) | number | +| `WEB SET OPTION` | `Web port ID` | | +| Settings dialog box | Configuration page/HTTP Port | | + +Listening IP (TCP) port number for HTTP. By default, 4D publishes a web application on the regular Web HTTP Port (TCP port), which is port 80. If that port is already used by another web service, you need to change the HTTP Port used by 4D for this database. + +> In macOS, modifying the HTTP port allows you to start the 4D web server without being the root user of the machine (see [macOS HelperTool](#macos-helpertool)). + +From a web browser, you need to include the non-default HTTP port number into the address you enter for connecting to the web application. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the HTTP port number 8080, you will specify "123.4.567.89:8080". +> **Warning**: If you use TCP port numbers other than the default numbers (80 for standard HTTP and 443 for HTTPS), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals (for example, in the 2000's or 3000's). + +If you specify 0, 4D will use the default HTTP port number 80. + + +## HTTP Trace + +| Can be set with | Name | Kommentare | +| ---------------- | ---------------------------------------------- | ------------------------------- | +| webServer object | [`HTTPTrace`](API/WebServerClass.md#httptrace) | Boolean, default = false | +| `WEB SET OPTION` | `Web HTTP TRACE` | Integer, default = 0 (disabled) | + +HTTP TRACE method activation in the 4D web server. For security reasons, by default the 4D web server rejects HTTP TRACE requests with an error 405. If necessary, you can enable the HTTP TRACE method, in which case the 4D Web server replies to HTTP TRACE requests with the request line, header, and body. + + + + +## HTTPS Port + +| Can be set with | Name | Kommentare | +| ------------------- | ---------------------------------------------- | ---------- | +| webServer object | [`HTTPSPort`](API/WebServerClass.md#httpsport) | number | +| `WEB SET OPTION` | `Web HTTPS port ID` | | +| Settings dialog box | Configuration page/HTTPS Port | | + +Listening IP port number for HTTPS connections via TLS. By default, the value is 443 (standard value). See also [HTTP Port](#http-port) for information on port numbers. + + +## Inactive Process Timeout + +| Can be set with | Name | Kommentare | +| ------------------- | ------------------------------------------------------------------------ | ---------- | +| webServer object | [`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout) | | +| `WEB SET OPTION` | `Web inactive process timeout` | | +| Settings dialog box | Options (I) page/Inactive Process Timeout | Slider | + +Life duration (in minutes) of inactive processes associated with sessions. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. + +Default: 480 minutes (pass 0 to restore the default value) + + +## Inactive Session Timeout + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------------------------------------------------------------ | ---------- | +| webServer object | [`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout) | | +| `WEB SET OPTION` | `Web inactive session timeout` | | + +Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default: 480 minutes (pass 0 to restore the default value) + + +## IP Address to listen + +| Can be set with | Name | Kommentare | +| ------------------- | -------------------------------------------------------------- | ----------- | +| webServer object | [`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten) | | +| `WEB SET OPTION` | `Web IP address to listen` | | +| Settings dialog box | Configuration page/IP Address | Pop up menu | + +IP address strings on which the 4D web server will receive HTTP requests (4D local and 4D Server). + +By default, no specific address is defined (**Any** value in the Settings dialog box), which means that the server responds to all IP addresses. When you designate a specific address, the server only responds to requests sent to this address. This feature is designed for 4D web servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most host providers. + +Possible values: IP address string. Both IPv6 string formats (e.g. "2001:0db8:0000:0000:0000:ff00:0042:8329") and IPv4 string formats (e.g. "123.45.67.89") are supported. + +#### About IPv6 support + +* **No warning when TCP port is occupied**
    When the server is set to respond on "Any" IP addresses, if the TCP port is being used by another application, this is not indicated when the server is started. In fact, 4D server does not detect any error in this case because the port remains free on the IPv6 address. However, it is not possible to access it using the IPv4 address of the machine, nor by means of the local address: 127.0.0.1.

    If your 4D server does not seem to be responding on the port defined, you can test the address [::1] on the server machine (equivalent to 127.0.0.1 for IPv6, add [:portNum] to test another port number). If 4D responds, it is likely that another application is using the port in IPv4. + +* **IPv4-mapped IPv6 addresses**
    To standardize processing, 4D provides a standard hybrid representation of IPv4 addresses in IPv6. These addresses are written with a 96-bit prefix in IPv6 format, followed by 32 bits written in the dot-decimal notation of IPv4. For example, ::ffff:192.168.2.34 represents the IPv4 address 192.168.2.34. + +* **Indication of port numbers**
    Since IPv6 notation uses colons (:), adding port numbers may lead to some confusion, for example: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6 address + 2001:0DB8::85a3:0:ac1f:8001:8081 // IPv6 address with port 8081 +``` + +To avoid this confusion, we recommend using the [ ] notation whenever you combine an IPv6 address with a port number, for instance: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 //IPv6 address with port 8081 +``` + +## Keep Session + +| Can be set with | Name | Kommentare | +| ------------------- | -------------------------------------------------- | ---------- | +| webServer object | [`keepSession`](API/WebServerClass.md#keepsession) | | +| `WEB SET OPTION` | `Web keep session` | | +| Settings dialog box | Options (I) page/Automatic Session Management | | + +Session management enabling status for the 4D web server. Session mechanism is described in the [Session Management](sessions.md) section. + +Default is true (enabled). + +> When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). + + +## Log Recording + +| Can be set with | Name | Kommentare | +| ------------------- | ---------------------------------------------------- | ----------- | +| webServer object | [`logRecording`](API/WebServerClass.md#logrecording) | | +| `WEB SET OPTION` | `Web log recording` | | +| Settings dialog box | Log (type) page/Log Format | Pop up menu | + +Starts or stops the recording of requests received by the 4D web server in the *logweb.txt* file and sets its format. By default, requests are not recorded (0/No Log File). When enabled, the *logweb.txt* file is automatically placed in the Logs folder. + +This setting allows you to select the format of this file. Available values are: + +| Wert | Format name | Beschreibung | +| ---- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0 | No Log File | Default | +| 1 | Record in CLF format | Common Log Format - Each line of the file represents a request, such as: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - Each field is separated by a space and each line ends by the CR/LF sequence. | +| 2 | Record in DLF format | Combined Log Format - Similar to CLF format but adds two additional HTTP fields at the end of each request: Referer and User-agent. | +| 3 | Record in ELF format | Extended Log Format - To be customized in the Settings dialog box | +| 4 | Record in WLF format | WebStar Log Format - To be customized in the Settings dialog box | + +> Formats 3 and 4 are custom formats whose contents must be set beforehand in the Settings dialog box. If you use one of these formats without any of its fields having been selected on this page, the log file will not be generated. + + +## Maximum Concurrent Web Processes + +| Can be set with | Name | Kommentare | +| ------------------- | ------------------------------------------------------------------------ | ---------- | +| webServer object | [`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses) | | +| `WEB SET OPTION` | `Web max concurrent processes` | | +| Settings dialog box | Options (I) page/Maximum Concurrent Web Processes | | + +Strictly high limit of concurrent web processes that can be simultaneously open on the server. This parameter allows prevention of server saturation as the result of massive number of requests. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the HTTP status `503 - Service Unavailable` to all new requests. + +By default, the value is 100. You can set the number anywhere between 10 and 32000. + + +## Maximum Request Size + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------------- | ---------- | +| webServer object | [`maxRequestSize`](API/WebServerClass.md#maxrequestsize) | | +| `WEB SET OPTION` | `Web maximum requests size` | | + +Maximum size (in bytes) of incoming HTTP requests (POST) that the web server is authorized to process. By default, the value is 2 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147 483 648) means that, in practice, no limit is set. + +This limit is used to avoid web server saturation due to incoming requests that are too large. When a request reaches this limit, the 4D web server rejects it. + +Possible values: 500 000 to 2 147 483 648. + + +## Maximum Session Number + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------- | ---------- | +| webServer object | [`maxSessions`](API/WebServerClass.md#maxsessions) | | +| `WEB SET OPTION` | `Web max sessions` | | + +Maximum number of simultaneous sessions. When you reach the limit set, the oldest session is closed (and `On Web Close Process` database method is called) if the Web server needs to create a new one. The number of simultaneous sessions cannot exceed the [maximum number of Web processes](#maximum-concurrent-web-processes) (100 by default). + +Default value: 100 (pass 0 to restore the default value). + + +## Minimum TLS Version + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------------------------------------------ | ---------- | +| webServer object | [`minTLSVersion`](API/WebServerClass.md#mintlsversion) | number | + +Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (default) +- 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + +> The minimum TLS version used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server and client/server connections. + + +## Name + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------------------------ | ---------- | +| webServer object | [`name`](API/WebServerClass.md#name) | | + + +Name of the web server application. Useful when component web servers are started. + +## OpenSSL Version + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------------- | ---------- | +| webServer object | [`openSSLVersion`](API/WebServerClass.md#opensslversion) | Read-only | + +Version of the OpenSSL library used. + + +## Perfect Forward Secrecy + +| Can be set with | Name | Kommentare | +| ---------------- | ---------------------------------------------------------------------- | ------------------ | +| webServer object | [`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy) | Boolean, read-only | + +True if PFS is available on the web server (see [TLS](Admin/tls.md#perfect-forward-secrecy-pfs) section). + + +## Robots.txt + +Certain robots (query engines, spiders...) scroll through web servers and static pages. If you do not want robots to be able to access your entire site, you can define which URLs they are not allowed to access. + +To do so, put the ROBOTS.TXT file at the server's root. This file must be structured in the following manner: + +```4d + User-Agent: + Disallow: or +``` + +Beispiel: + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* “User-Agent: *†- all robots are affected. +* “Disallow: /4D†- robots are not allowed to access URLs beginning with /4D. +* “Disallow: /%23%23†- robots are not allowed to access URLs beginning with /%23%23. +* “Disallow: /GIFS/’ - robots are not allowed to access the /GIFS/ folder or its subfolders. + +Another example: + +```code4d + User-Agent: * + Disallow: / +``` + +In this case, robots are not allowed to access the entire site. + + +## Root Folder + +| Can be set with | Name | Kommentare | +| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | [`rootFolder`](API/WebServerClass.md#rootfolder) | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function | +| `WEB SET ROOT FOLDER` | | | +| Settings dialog box | Configuration page/Default HTML Root | | + +Path of web server root folder, i.e. the folder in which 4D will search for the static and semi-dynamic HTML pages, pictures, etc., to send to the browsers. The path is formatted in POSIX full path. The web server will need to be restarted in order for the new root folder to be taken into account. + +Moreover, the HTML root folder defines, on the web server hard drive, the hierarchical level above which the files will not be accessible. If a requested URL or a 4D command tries to access a file located above the HTML root folder, an error is returned indicating that the file has not been found. + +By default, 4D defines a HTML Root folder named **WebFolder**. If it does not already exist, the HTML root folder is physically created on disk at the moment the Web server is launched for the first time. The root folder is created: +- with 4D (local) and 4D Server, at the same level as the [Project folder](Project/architecture.md#project-folder). +- with 4D in remote mode, in the local resources folder. + +You can designate another default HTML root folder by entering its pathname. + +- The path is relative to the [Project folder](Project/architecture.md#project-folder) (4D local and 4D Server) or to the folder containing the 4D application or software package (4D in remote mode). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- To "go up" one level in the folder hierarchy, enter “..†(two periods) before the folder name +- The path must not start with a slash (except if you want the HTML root folder to be the Project or 4D remote folder, but for access to the folders above to be forbidden, in which case you can pass "/" as the root folder). + +For example, if you want the HTML root folder to be the "Web" subfolder in the "MyWebApp" folder, enter "MyWebApp/Web". + +> When the HTML root folder is modified, the cache is cleared so as to not store files whose access is restricted. + + + +## Session Cookie Domain + +| Can be set with | Name | Kommentare | +| ---------------- | ------------------------------------------------------------------ | ---------- | +| webServer object | [`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain) | | +| `WEB SET OPTION` | `Web session cookie domain` | | + +Value of the "domain" field of the session cookie. Useful for controlling the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + +## Session Cookie Name + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------------------- | ---------- | +| webServer object | [`sessionCookieName`](API/WebServerClass.md#sessioncookiename) | | +| `WEB SET OPTION` | `Web session cookie name` | | + +Name of the cookie used for saving the session ID. Default = "4DSID". + + +## Session Cookie Path + +| Can be set with | Name | Kommentare | +| ---------------- | -------------------------------------------------------------- | ---------- | +| webServer object | [`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath) | | +| `WEB SET OPTION` | `Web session cookie path` | | + +"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + +## Session Cookie SameSite + +| Can be set with | Name | Kommentare | +| ---------------- | ---------------------------------------------------------------------- | ---------- | +| webServer object | [`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite) | | + +Value of the `SameSite` attribute value of the session cookie. This attribute allows you to declare if your cookie should be restricted to a first-party or same-site context, as a protection from some cross-site request forgery ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) attacks. + +> For a detailed description of the `SameSite` attribute, please refer to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) or [this web.dev page](https://web.dev/samesite-cookies-explained/). + +Three values are available: + +- "Strict" (default `SameSite` attribute value for 4D session cookies): cookies will only be sent in the first-party context, i.e. context matching the domain of the current site, and never to third-party websites. +- "Lax": Cookies are not sent on cross-site subrequests (for example to load images or frames into a third-party site), but are sent when a user is navigating to the origin site (i.e. they follow a link). +- "None": Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. When "None" value is used, the cookie `Secure` attribute must also be set (or the cookie will be blocked). + +The `Secure` attribute value of the session cookie is automatically set to "True" if the connection is HTTPS (whatever the `SameSite` attribute value). + +> It is not recommended to set `SameSite=None` on a HTTP server since the `Secure` attribute will be missing (used in HTTPS only) and cookies will be blocked. + + + +## Session IP Address Validation + +Can be set with|Name|Comments| |---|---|---| |webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| |`WEB SET OPTION`|`Web session enable IP address validation`|| + +IP address validation status for session cookies. For security reasons, by default the 4D web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 4G/5G networks, their IP address will change. In this case, you must pass 0 in this option to allow clients to be able to continue using their Web sessions even when the IP addresses change. Note that this setting lowers the security level of your application. + +When it is modified, this setting is effective immediately (you do not need to restart the HTTP server). + +Possible values: 0 (disabled) or 1 (enabled, default). + + + + +## Deprecated Settings + +The following settings are still supported but rely on deprecated features or technologies. It is usually recommended to keep default values. + +#### Allow database Access through 4DSYNC URLs + +This option controls the support of HTTP synchronization requests containing deprecated */4DSYNC* URLs. + + +#### Reuse temporary contexts (in remote mode) + +Allows you to optimize the operation of the 4D Web Server in remote mode by reusing web processes created for processing previous web requests. In fact, the web server in 4D needs a specific web process for the handling of each web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. + +When the **Reuse Temporary Contexts** option is checked, in remote mode 4D maintains the specific web processes and reuses them for subsequent requests. By removing the process creation stage, web server performance is improved. + +In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. +> * This option is checked (and locked) automatically when the **Automatic Session Management** option is checked. In fact, the session management mechanism is actually based on the principle of recycling web processes: each session uses the same process that is maintained during the lifespan of the session. However, note that session processes cannot be "shared" between different sessions: once the session is over, the process is automatically killed (and not reused). It is therefore unnecessary to reset the selections or variables in this case. +> +> * This option only has an effect with a 4D web server in remote mode. With a 4D in local mode, all web processes (other than session processes) are killed after their use. + + + +#### Send Extended Characters Directly + +When this option is checked, the web server sends extended characters “as is†in semi-dynamic pages, without converting them into HTML entities. This option has shown a speed increase on most foreign operating systems (especially the Japanese system). + + +#### Keep-Alive Connections + +The 4D Web Server can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the web browser and the server to save system resources and to optimize transfers. + +The **Use Keep-Alive Connections** option enables or disables keep-alive TCP connections for the web server. This option is enabled by default. In most cases, it is advisable to keep this option check since it accelerates the exchanges. If the web browser does not support connection keep alive, the 4D Web Server automatically switches to HTTP/1.0. + +The 4D Web Server keep-alive function concerns all TCP/IP connections (HTTP, HTTPS). Note however that keep-alive connections are not always used for all 4D web processes. + +In some cases, other optimized internal functions may be invoked. Keep-alive connections are useful mainly for static pages. + +Two options allow you to set how the keep-alive connections work: + +* **Number of requests by connection**: Allows you to set the maximum number of requests and responses able to travel over a connection keep alive. Limiting the number of requests per connection allows you to prevent server flooding due to a large number of incoming requests (a technique used by hackers).

    The default value (100) can be increased or decreased depending on the resources of the machine hosting the 4D Web Server. + +* **Timeout**: This value defines the maximum wait period (in seconds) during which the web server maintains an open TCP connection without receiving any requests from the web browser. Once this period is over, the server closes the connection.

    If the web browser sends a request after the connection is closed, a new TCP connection is automatically created. This operation is not visible for the user. + diff --git a/website/translated_docs/de/WebServer/webServerObject.md b/website/translated_docs/de/WebServer/webServerObject.md index ed3864e1491e52..4fd670f3cf1718 100644 --- a/website/translated_docs/de/WebServer/webServerObject.md +++ b/website/translated_docs/de/WebServer/webServerObject.md @@ -3,78 +3,78 @@ id: webServerObject title: Web Server object --- -## Overview -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +A 4D project can start and monitor a web server for the main (host) application as well as each hosted component. -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +For example, if you installed two components in your main application, you can start and monitor up to three independant web servers from your application: -- one web server for the host database, +- one web server for the host application, - one web server for the component #1, - one web server for the component #2. -Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D application project. -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +Each 4D web server, including the main application's web server, is exposed as a specific **object** of the `4D.WebServer` class. Once instantiated, a web server object can be handled from the current application or from any component using a [large number of properties and functions](API/WebServerClass.md). -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). - -Each web server (host database or component) can be used in its own separate context, including: +> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot select the web server to which they apply (see below). +Each web server (host application or component) can be used in its own separate context, including: - `On Web Authentication` and `On Web Connection` database method calls - 4D tags processing and method calls, -- managing web sessions and TLS protocols. +- web sessions and TLS protocol management. + +This allows you to develop independant components and features that come with their own web interfaces. -This feature allows you to develop independant components and features that come with their own web interfaces. ## Instantiating a web server object -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +The web server object of the host application (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created project: ```4d $nbSrv:=WEB Server list.length //$nbSrv value is 1 ``` -To instantiate a web server object, call the `WEB Server` command: +To instantiate a web server object, call the [`WEB Server`](API/WebServerClass.md#web-server) command: ```4d -C_OBJECT(webServer) + //create an object variable of the 4D.WebServer class +var webServer : 4D.WebServer //call the web server from the current context webServer:=WEB Server + //equivalent to webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: - -- the host database's web server from a component or -- the server that received the request (whatever the server), +If the application uses components and you want to call: +- the host application's web server from a component or +- the server that received the request (whatever the server), you can also use: ```4d -C_OBJECT(webServer) +var webServer : 4D.WebServer //call the host web server from a component webServer:=WEB Server(Web server host database) //call the target web server webServer:=WEB Server(Web server receiving request) ``` -## Web server methods -A web server object contains the following member methods: +## Web server functions -| Method | Parameter | Return value | Description | -| --------- | ----------------- | --------------- | --------------------- | -| `start()` | settings (object) | status (object) | Starts the web server | -| `stop()` | - | - | Stops the web server | +A [web server class object](API/WebServerClass.md#web-server-object) contains the following functions: +| Funktionen | Parameter | Return value | Beschreibung | +| ---------------------------------------- | ----------------- | --------------- | --------------------- | +| [`start()`](API/WebServerClass.md#start) | settings (object) | status (object) | Starts the web server | +| [`stop()`](API/WebServerClass.md#start) | - | - | Stops the web server | -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +To start and stop a web server, just call the [`start()`](API/WebServerClass.md#start) and [`stop()`](API/WebServerClass.md#stop) functions of the web server object: ```4d -C_OBJECT($status) +var $status : Object //to start a web server with default settings $status:=webServer.start() //to start the web server with custom settings @@ -85,202 +85,53 @@ webServer.start($settings) $status:=webServer.stop() ``` + ## Web server properties -A web server object contains the following properties. - -Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server: - -- 4 = ISO-8859-1 -- 12 = ISO-8859-9 -- 13 = ISO-8859-10 -- 17 = Shift-JIS -- 2024 = Windows-31J -- 2026 = Big5 -- 38 = euc-kr -- 106 = UTF-8 -- 2250 = Windows-1250 -- 2251 = Windows-1251 -- 2253 = Windows-1253 -- 2255 = Windows-1255 -- 2256 = Windows-1256 - - - < - - p> - - < - - p>Default value: 63072000 (2 years)| |HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). - - < - - p> - - < - - p>Possible values: - - - 1 to 9 (where 1 is the fastest compression and 9 the highest). - - -1 = set a compromise between speed and rate of compression. - - Default = 1 (faster compression).| |HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. - - < - - p> - - < - - p>Default compression threshold = 1024 bytes| |HTTPEnabled|boolean|HTTP protocol state| |HTTPPort|number|Listening IP port number for HTTP. - - < - - p> - - < - - p>Default = 80| |HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| |HTTPSEnabled|boolean|HTTPS protocol state| |HTTPSPort|number|Listening IP port number for HTTPS. - - < - - p> - - < - - p>Default = 443| |inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. - - < - - p> - - < - - p>Default = 480 minutes| |inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. - - < - - p> - - < - - p>Default = 480 minutes| |IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| |*isRunning*|boolean|Web server running state| |keepSession|boolean|Session management enabling status - - < - - p> - - < - - p>Default = true| |logRecording|number|Log requests (logweb.txt) recording value. - - - 0 = Do not record (default) - - 1 = Record in CLF format - - 2 = Record in DLF format - - 3 = Record in ELF format - - 4 = Record in WLF format| |maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. - - < - - p> - - < - - p>Possible values: 10 - 32000 - - < - - p> - - < - - p>Default = 100| |maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. - - < - - p> - - < - - p>Possible values: 500000 - 2147483648| |maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| |minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. - - < - - p> - - < - - p>Possible values: - - - 1 = `TLSv1_0` - - 2 = `TLSv1_1` - - 3 = `TLSv1_2` (default) - - < - - p> - - < - - p>If modified, the server must be restarted to use the new value.| |*name*|text|Name of the web server database| |*openSSLVersion*|text|Version of the OpenSSL library used| |*perfectForwardSecrecy*|boolean|PFS availability on the server| |rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| |sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| |sessionCookieName|text|Name of the cookie used for storing the session ID. - - < - - p> - - < - - p>Default = "4DSID"| |sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| |sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change. - - < - - p> - - < - - p>Note: this setting lowers the security level of your application| - - These properties are defined: - - 1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), - 2. if not used, using the `WEB SET OPTION` command (host databases only), - 3. if not used, in the database settings of the host database or the component. - - If the web server is not started, the properties contain the values that will be used at the next web server startup. - - If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. - - > *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. - - ## Scope of the 4D Web commands - - The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. - - | Command | Scope | - | ------------------------------- | ------------------------------------ | - | `SET DATABASE PARAMETER` | Host database web server | - | `WEB CLOSE SESSION` | Web server that received the request | - | `WEB GET BODY PART` | Web server that received the request | - | `WEB Get body part count` | Web server that received the request | - | `WEB Get Current Session ID` | Web server that received the request | - | `WEB GET HTTP BODY` | Web server that received the request | - | `WEB GET HTTP HEADER` | Web server that received the request | - | `WEB GET OPTION` | Host database web server | - | `WEB Get server info` | Host database web server | - | `WEB GET SESSION EXPIRATION` | Web server that received the request | - | `WEB Get session process count` | Web server that received the request | - | `WEB GET STATISTICS` | Host database web server | - | `WEB GET VARIABLES` | Web server that received the request | - | `WEB Is secured connection` | Web server that received the request | - | `WEB Is server running` | Host database web server | - | `WEB SEND BLOB` | Web server that received the request | - | `WEB SEND FILE` | Web server that received the request | - | `WEB SEND HTTP REDIRECT` | Web server that received the request | - | `WEB SEND RAW DATA` | Web server that received the request | - | `WEB SEND TEXT` | Web server that received the request | - | `WEB SET HOME PAGE` | Host database web server | - | `WEB SET HTTP HEADER` | Web server that received the request | - | `WEB SET OPTION` | Host database web server | - | `WEB SET ROOT FOLDER` | Host database web server | - | `WEB START SERVER` | Host database web server | - | `WEB STOP SERVER` | Host database web server | - | `WEB Validate digest` | Web server that received the request | \ No newline at end of file +A web server object contains [various properties](API/WebServerClass.md#web-server-object) which configure the web server. + +These properties are defined: + +1. using the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function (except for read-only properties, see below), +2. if not used, using the `WEB SET OPTION` command (host applications only), +3. if not used, in the settings of the host application or the component. + +- If the web server is not started, the properties contain the values that will be used at the next web server startup. +- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function. + +> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the [`start()`](API/WebServerClass.md#start) function. + + +## Scope of the 4D Web commands + +The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. + +| Command | Scope | +| ------------------------------- | ------------------------------------ | +| `SET DATABASE PARAMETER` | Host application web server | +| `WEB CLOSE SESSION` | Web server that received the request | +| `WEB GET BODY PART` | Web server that received the request | +| `WEB Get body part count` | Web server that received the request | +| `WEB Get Current Session ID` | Web server that received the request | +| `WEB GET HTTP BODY` | Web server that received the request | +| `WEB GET HTTP HEADER` | Web server that received the request | +| `WEB GET OPTION` | Host application web server | +| `WEB Get server info` | Host application web server | +| `WEB GET SESSION EXPIRATION` | Web server that received the request | +| `WEB Get session process count` | Web server that received the request | +| `WEB GET STATISTICS` | Host application web server | +| `WEB GET VARIABLES` | Web server that received the request | +| `WEB Is secured connection` | Web server that received the request | +| `WEB Is server running` | Host application web server | +| `WEB SEND BLOB` | Web server that received the request | +| `WEB SEND FILE` | Web server that received the request | +| `WEB SEND HTTP REDIRECT` | Web server that received the request | +| `WEB SEND RAW DATA` | Web server that received the request | +| `WEB SEND TEXT` | Web server that received the request | +| `WEB SET HOME PAGE` | Host application web server | +| `WEB SET HTTP HEADER` | Web server that received the request | +| `WEB SET OPTION` | Host application web server | +| `WEB SET ROOT FOLDER` | Host application web server | +| `WEB START SERVER` | Host application web server | +| `WEB STOP SERVER` | Host application web server | +| `WEB Validate digest` | Web server that received the request | diff --git a/website/translated_docs/es/API/BlobClass.md b/website/translated_docs/es/API/BlobClass.md new file mode 100644 index 00000000000000..038f0e7264e8a6 --- /dev/null +++ b/website/translated_docs/es/API/BlobClass.md @@ -0,0 +1,77 @@ +--- +id: BlobClass +title: Blob +--- + +The Blob class lets you create and manipulate [blob objects](../Concepts/dt_blob.md#blob-types) (`4D.Blob`). + +### Summary + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**4D.Blob.new()** : 4D.Blob
    **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
    **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob](#4dblobnew)

        creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). | +| [**.size** : Real](#size)

        returns the size of a `4D.Blob`, expressed in bytes. | +| [**.slice()** : 4D.Blob
    **.slice**( *start* : Real ) : 4D.Blob
    **.slice**( *start* : Real; *end* : Real ) : 4D.Blob](#slice)

         creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. | + +## 4D.Blob.new() + +

    History +| Version | Changes | +| ------- | ------- | +| v19 R2 | Added | +
    + +**4D.Blob.new()** : 4D.Blob
    **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
    **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob + +| Parameter | Tipo | | Descripción | +| --------- | --------------- |:--:| ------------ | +| blob | Blob or 4D.Blob | -> | Blob to copy | +| Resultado | 4D.Blob | <- | New 4D.Blob | + +#### Descripción + +`4D.Blob.new` creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). If the `blob` parameter is omitted, the method returns an empty 4D.Blob. + +## .size + +**.size** : Real +#### Descripción +The `.size` property returns the size of a `4D.Blob`, expressed in bytes. +## .slice() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 R2 | Added | +
    + +**.slice()** : 4D.Blob
    **.slice**( *start* : Real ) : 4D.Blob
    **.slice**( *start* : Real; *end* : Real ) : 4D.Blob +| Parameter | Tipo | | Descripción | +| --------- | ------- |:--:| ---------------------------------------------------------------------- | +| start | Real | -> | index of the first byte to include in the new `4D.Blob`. | +| end | Real | -> | index of the first byte that will not be included in the new `4D.Blob` | +| Resultado | 4D.Blob | <- | New `4D.Blob` | +#### Descripción + +`.slice()` creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. The `start` parameter is an index into the blob indicating the first byte to include in the new `4D.Blob`. If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is 0. If you specify a value for start that is larger than the size of the source blob, the returned `4D.Blob`'s size is 0, and it contains no data. + +The `end` parameter is an index into the blob indicating the first byte that will not be included in the new `4D.Blob` (i.e. the byte exactly at this index is not included). If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is the size of the blob. + +#### Ejemplo + +```4d +var $myBlob : 4D.Blob + +// Store text in a 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$is4DBlob:=OB Instance of($myBlob; 4D.Blob); //True + +$myString:=Convert to text($myBlob; "UTF-8") +// $myString contains "Hello, World!" + +// Create a new 4D.Blob from $myBlob +$myNewBlob:=$myBlob.slice(0; 5) + +$myString:=Convert to text($myNewBlob; "UTF-8") +// $myString contains "Hello" +``` diff --git a/website/translated_docs/es/API/ClassClass.md b/website/translated_docs/es/API/ClassClass.md new file mode 100644 index 00000000000000..8f634ef9c7ec73 --- /dev/null +++ b/website/translated_docs/es/API/ClassClass.md @@ -0,0 +1,132 @@ +--- +id: ClassClass +title: Class +--- + + +When a user class is [defined](Concepts/classes.md#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of "Class" class, which has properties and a function. + + + +### Summary + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.name** : Text](#name)

        contains the name of the `4D.Class` object | +| [**.new**( *param* : any { *;...paramN* } ) : 4D.Class](#new)

        creates and returns a `cs.className` object which is a new instance of the class on which it is called | +| [**.superclass** : 4D.Class](#superclass)

        returns the parent class of the class | + + + +## .name + +

    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
    + +**.name** : Text +#### Descripción + +The `.name` property contains the name of the `4D.Class` object. Class names are case sensitive. + +This property is **read-only**. + + + + +## .new() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
    + +**.new**( *param* : any { *;...paramN* } ) : 4D.Class +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ------------------------------------------------ | +| param | any | -> | Parameter(s) to pass to the constructor function | +| Resultado | 4D.Class | <- | New object of the class | + + +#### Descripción + +The `.new()` function creates and returns a `cs.className` object which is a new instance of the class on which it is called. This function is automatically available on all classes from the [`cs` class store](Concepts/classes.md#cs). + +You can pass one or more optional *param* parameters, which will be passed to the [class constructor](Concepts/classes.md#class-constructor) function (if any) in the className class definition. Within the constructor function, the [`This`](Concepts/classes.md#this) is bound to the new object being constructed. + +If `.new()` is called on a non-existing class, an error is returned. + +#### Ejemplos + +To create a new instance of the Person class: + +```4d +var $person : cs.Person +$person:=cs.Person.new() //create the new instance +//$person contains functions of the class +``` + +To create a new instance of the Person class with parameters: + +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text; $age : Integer) + This.firstName:=$firstname + This.lastName:=$lastname + This.age:=$age +``` + +```4d +//In a method +var $person : cs.Person +$person:=cs.Person.new("John";"Doe";40) +//$person.firstName = "John" +//$person.lastName = "Doe" +//$person.age = 40 +``` + + + + + +## .superclass + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
    + +**.superclass** : 4D.Class +#### Descripción + +The `.superclass` property returns the parent class of the class. A superclass can be a `4D.Class` object, or a `cs.className` object. If the class does not have a parent class, the property returns **null**. + +A superclass of a user class is declared in a class by using the [`Class extends `](Concepts/classes.md#class-extends-classname) keyword. + +This property is **read-only**. + +#### Ejemplos + +```4d +$sup:=4D.File.superclass //Document +$sup:=4D.Document.superclass //Object +$sup:=4D.Object.superclass //null + +// If you created a MyFile class +// with `Class extends File` +$sup:=cs.MyFile.superclass //File + +``` + + + +**See also:** [Super](Concepts/classes.md#super) + + diff --git a/website/translated_docs/es/API/CollectionClass.md b/website/translated_docs/es/API/CollectionClass.md new file mode 100644 index 00000000000000..48d8c37fb1959f --- /dev/null +++ b/website/translated_docs/es/API/CollectionClass.md @@ -0,0 +1,2582 @@ +--- +id: CollectionClass +title: Colección +--- + + +The Collection class manages [Collection](Concepts/dt_collection.md) type variables. + +A collection is initialized with: + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**New collection** {( *...value* : any )} : Collection](#new-collection)

         creates a new empty or prefilled collection | +| [**New shared collection** {( *...value* : any )} : Collection](#new-shared-collection)

         creates a new empty or prefilled shared collection | + + +### Ejemplo + +```4d + var $colVar : Collection //creation of collection type 4D variable + $colVar:=New collection //initialization of the collection and assignment to the 4D variable +``` + + +### Summary + + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.average**( {*propertyPath* : Text } ) : Real](#average)

        returns the arithmetic mean (average) of defined values in the collection instance | +| [**.clear()** : Collection](#clear)

        removes all elements from the collection instance and returns an empty collection | +| [**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection](#combine)

        inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection | +| [**.concat**( *value* : any { *;...valueN* } ) : Collection](#concat)

        returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end | +| [**.copy**() : Collection
    **.copy**( *option* : Integer ) : Collection
    **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
    **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection](#copy)

         returns a deep copy of the collection instance | +| [**.count**( { *propertyPath* : Text } ) : Real](#count)

        returns the number of non-null elements in the collection | +| [**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real](#countvalues)

        returns the number of times value is found in the collection | +| [**.distinct**( {*option* : Integer} ) : Collection
    **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection](#distinct)

        returns a collection containing only distinct (different) values from the original collection | +| [**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean](#equal)

        compares the collection with collection2 | +| [**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
    **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean](#every)

        returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method | +| [**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
    **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection](#extract)

        creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects | +| [**.fill**( *value* : any ) : Collection
    **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection](#fill)

        fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection | +| [**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection](#filter)

        returns a new collection containing all elements of the original collection for which *methodName* method result is **true** | +| [**.find**( *methodName* : Text { ; *...param* : any } ) : any
    **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any](#find)

        returns the first value in the collection for which *methodName*, applied on each element, returns **true** | +| [**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
    **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer](#find)

        returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true** | +| [**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#indexof)

        searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found | +| [**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection ](#indices)

        returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions | +| [**.insert**( *index* : Integer ; *element* : any ) : Collection ](#insert)

         inserts *element* at the specified *index* position in the collection instance and returns the edited collection | +| [**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text ](#join)

        converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator | +| [**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#lastindexof)

        searches the *toSearch* expression among collection elements and returns the index of the last occurrence | +| [**.length** : Integer](#length)

        returns the number of elements in the collection | +| [**.map**( *methodName* : Text { ; *...param* : any } ) : Collection ](#map)

        creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection | +| [**.max**( { *propertyPath* : Text } ) : any ](#max)

        returns the element with the highest value in the collection | +| [**.min**( { *propertyPath* : Text } ) : any ](#min)

        returns the element with the smallest value in the collection | +| [**.orderBy**( ) : Collection
    **.orderBy**( *pathStrings* : Text ) : Collection
    **.orderBy**( *pathObjects* : Collection ) : Collection
    **.orderBy**( *ascOrDesc* : Integer ) : Collection ](#orderby)

        returns a new collection containing all elements of the collection in the specified order | +| [**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection ](#orderbymethod)

        returns a new collection containing all elements of the collection in the order defined through the *methodName* method | +| [**.pop()** : any ](#pop)

        removes the last element from the collection and returns it as the function result | +| [**.push**( *element* : any { ;...*elementN* } ) : Collection ](#push)

        appends one or more *element*(s) to the end of the collection instance and returns the edited collection | +| [**.query**( *queryString* : Text ; *...value* : any ) : Collection
    **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection ](#query)

        returns all elements of a collection of objects that match the search conditions | +| [**.reduce**( *methodName* : Text ) : any
    **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any ](#reduce)

        applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value | +| [**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection ](#remove)

        removes one or more element(s) from the specified *index* position in the collection and returns the edited collection | +| [**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection ](#resize)

        sets the collection length to the specified new size and returns the resized collection | +| [**.reverse( )** : Collection ](#reverse)

        returns a deep copy of the collection with all its elements in reverse order | +| [**.shift()** : any](#shift)

        removes the first element of the collection and returns it as the function result | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection](#slice)

        returns a portion of a collection into a new collection | +| [**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
    **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean](#some)

        returns true if at least one element in the collection successfully passed a test | +| [**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection ](#sort)

        sorts the elements of the original collection | +| [**.sum**( { *propertyPath* : Text } ) : Real](#sum)

        returns the sum for all values in the collection instance | +| [**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection](#unshift)

        inserts the given *value*(s) at the beginning of the collection | + + + +## `New collection` + + +**New collection** {( *...value* : any )} : Collection +| Parameter | Tipo | | Descripción | +| --------- | ----------------------------------------------------------------------- |:--:| --------------------- | +| value | Number, Text, Date, Time, Boolean, Object, Collection, Picture, Pointer | -> | Collection's value(s) | +| Resultado | Colección | <- | New collection | + + +#### Descripción + +The `New collection` command creates a new empty or prefilled collection and returns its reference. + +If you do not pass any parameters, `New collection` creates an empty collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. +> Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new collection by passing one or several *value*(s) as parameter(s). + +Otherwise, you can add or modify elements subsequently through assignment. Por ejemplo: + +```4d + myCol[10]:="My new element" +``` + +If the new element index is beyond the last existing element of the collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of any supported type (number, text, date, picture, pointer, object, collection...). Unlike arrays, collections can mix data of different types. + +You must pay attention to the following conversion issues: + +* If you pass a pointer, it is kept "as is"; it is evaluated using the `JSON Stringify` command +* Dates are stored as "yyyy-mm-dd" dates or strings with the "YYYY-MM-DDTHH:mm:ss.SSSZ" format, according to the current "dates inside objects" database setting. When converting 4D dates into text prior to storing them in the collection, by default the program takes the local time zone into account. You can modify this behavior using the `Dates inside objects` selector of the `SET DATABASE PARAMETER` command. +* If you pass a time, it is stored as a number of milliseconds (Real). + +#### Ejemplo 1 + + + +You want to create a new empty collection and assign it to a 4D collection variable: + +```4d + var $myCol : Collection + $myCol:=New collection + //$myCol=[] +``` + +#### Ejemplo 2 + +You want to create a prefilled collection: + +```4d + var $filledColl : Collection + $filledColl:=New collection(33;"mike";"november";->myPtr;Current date) + //$filledColl=[33,"mike","november","->myPtr","2017-03-28T22:00:00.000Z"] +``` + +#### Example 3 + +You create a new collection and then add a new element: + +```4d + var $coll : Collection + $coll:=New collection("a";"b";"c") + //$coll=["a","b","c"] + $coll[9]:="z" //add a 10th element with value "z" + $vcolSize:=$coll.length //10 + //$coll=["a","b","c",null,null,null,null,null,null,"z"] +``` + + + + +## `New shared collection` + +

    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**New shared collection** {( *...value* : any )} : Collection +| Parameter | Tipo | | Descripción | +| --------- | ------------------------------------------------------------------- |:--:| ---------------------------- | +| value | Number, Text, Date, Time, Boolean, Shared object, Shared collection | -> | Shared collection's value(s) | +| Resultado | Colección | <- | New shared collection | + + +#### Descripción + +The `New shared collection` command creates a new empty or prefilled shared collection and returns its reference. + +Adding an element to this collection must be surrounded by the [`Use...End`](Concepts/shared.md#useend-use) use structure, otherwise an error is generated. Reading an element without a structure is, however, possible. +> For more information on shared collections, please refer to the [Shared objects and collections](Concepts/shared.md) page. + +If you do not pass any parameters, `New shared collection` creates an empty shared collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. +> Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new shared collection by passing one or several *value*(s) as parameter(s). Otherwise, you can add or modify elements subsequently through object notation assignment (see example). + +If the new element index is beyond the last existing element of the shared collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of the following supported types: + +* number (real, longint...). Number values are always stored as reals. +* texto +* booleano +* fecha +* time (stored as number of milliseconds - real) +* null +* shared object(*) +* shared collection(*) +> Unlike standard (not shared) collections, shared collections do not support pictures, pointers, and objects or collections that are not shared. + +(*)When a shared object or collection is added to a shared collection, they share the same *locking identifier*. For more information on this point, refer to the **4D Developer**'s guide. + +#### Ejemplo + +```4d + $mySharedCol:=New shared collection("alpha";"omega") + Use($mySharedCol) + $mySharedCol[1]:="beta" + End use +``` + + + +## .average() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.average**( {*propertyPath* : Text } ) : Real + +| Parameter | Tipo | | Descripción | +| ------------ | --------------- |:--:| ----------------------------------------------- | +| propertyPath | Texto | -> | Object property path to be used for calculation | +| Resultado | Real, Undefined | <- | Arithmetic mean (average) of collection values | + + + +#### Descripción + +The `.average()` function returns the arithmetic mean (average) of defined values in the collection instance. + + + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.average()` returns `undefined` if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + + +#### Ejemplo 1 + +```4d + var $col : Collection + $col:=New collection(10;20;"Monday";True;6) + $vAvg:=$col.average() //12 +``` + +#### Ejemplo 2 + +```4d + var $col : Collection + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $vAvg:=$col.average("salary") //23500 +``` + + + + +## .clear() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.clear()** : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| --------------------------------------------- | +| Resultado | Colección | <- | Original collection with all elements removed | + + +#### Descripción + +The `.clear()` function removes all elements from the collection instance and returns an empty collection. +> This function modifies the original collection. + +#### Ejemplo + +```4d +var $col : Collection +$col:=New collection(1;2;5) +$col.clear() +$vSize:=$col.length //$vSize=0 +``` + + + + + + +## .combine() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection + +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ----------------------------------------------------------------------------- | +| col2 | Colección | -> | Collection to combine | +| index | Entero | -> | Position to which insert elements to combine in collection (default=length+1) | +| Resultado | Colección | <- | Original collection containing combined element(s) | + + +#### Descripción + +The `.combine()` function inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection. Unlike the `.insert()` function, `.combine()` adds each value of *col2* in the original collection, and not as a single collection element. +> This function modifies the original collection. + +By default, *col2* elements are added at the end of the orginal collection. You can pass in *index* the position where you want the *col2* elements to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, the actual starting *index* will be set to the length of the collection. +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, *index* is set to 0. + + +#### Ejemplo + +```4d +var $c; $fruits : Collection +$c:=New collection(1;2;3;4;5;6) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$c.combine($fruits;3) //[1,2,3,"Orange","Banana","Apple","Grape",4,5,6] +``` + + + + + + +## .concat() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.concat**( *value* : any { *;...valueN* } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | -------------------------------------------------------------- |:--:| ----------------------------------------------------------------------------------------------------------------- | +| value | Number, Text, Object, Collection, Date, Time, Boolean, Picture | -> | Value(s) to concatenate. If *value* is a collection, all collection elements are added to the original collection | +| Resultado | Colección | <- | New collection with value(s) added to the original collection | + + +#### Descripción + +The `.concat()` function returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end. +> This function does not modify the original collection. + +If *value* is a collection, all its elements are added as new elements at the end of the original collection. If *value* is not a collection, it is added itself as a new element. + + +#### Ejemplo + +```4d +var $c : Collection +$c:=New collection(1;2;3;4;5) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$fruits.push(New object("Intruder";"Tomato")) +$c2:=$c.concat($fruits) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}] +$c2:=$c.concat(6;7;8) //[1,2,3,4,5,6,7,8] +``` + + + + + +## .copy() + +
    History +| Version | Changes | +| ------- | -------------------------------------------------- | +| v18 R3 | New *ck shared* option. New *groupWith* parameters | +| v16 R6 | Added | +
    + +**.copy**() : Collection
    **.copy**( *option* : Integer ) : Collection
    **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
    **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------ | --------- |:--:| -------------------------------------------------------------------------------------------------------- | +| option | Entero | -> | `ck resolve pointers`: resolve pointers before copying,
    `ck shared`: return a shared collection | +| groupWithCol | Colección | -> | Shared collection to be grouped with the resulting collection | +| groupWithObj | Objeto | -> | Shared object to be grouped with the resulting collection | +| Resultado | Colección | <- | Deep copy of the original collection | + + +#### Descripción + +The `.copy()` function returns a deep copy of the collection instance.***Deep copy*** means that objects or collections within the original collection are duplicated and do not share any reference with the returned collection. +> This function does not modify the original collection. + +If passed, the *option* parameter can contain one of the following constants (or both): + +| option | Descripción | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ck resolve pointers` | If the original collection contains pointer type values, by default the copy also contains the pointers. However, you can resolve pointers when copying by passing the ck resolve pointers. In this case, each pointer present in the collection is evaluated when copying and its dereferenced value is used. | +| `ck shared` | By default, copy() returns a regular (not shared) collection, even if the command is applied to a shared collection. Pass the ck shared constant to create a shared collection. In this case, you can use the groupWith parameter to associate the shared collection with another collection or object (see below). | + +The *groupWithCol* or *groupWithObj* parameters allow you to designate a collection or an object with which the resulting collection should be associated. + + +#### Ejemplo 1 + +We want to copy the *$lastnames* regular (non shared) collection into the *$sharedObject* shared object. To do this, we must create a shared copy of the collection (*$sharedLastnames*). + +```4d +var $sharedObject : Object +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$sharedObject:=New shared object + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) //$sharedLastnames is a shared collection + +//Now we can put $sharedLastnames into $sharedObject +Use($sharedObject) + $sharedObject.lastnames:=$sharedLastnames +End use +``` + + +#### Ejemplo 2 + +We want to combine *$sharedColl1* and *$sharedColl2*. Since they belong to different shared groups, a direct combination would result in an error. Therefore, we must make a shared copy of *$sharedColl1* and designate *$sharedColl2* as a shared group for the copy. + +```4d +var $sharedColl1;$sharedColl2;$copyColl : Collection + +$sharedColl1:=New shared collection(New shared object("lastname";"Smith")) +$sharedColl2:=New shared collection(New shared object("lastname";"Brown")) + +//$copyColl belongs to the same shared group as $sharedColl2 + $copyColl:=$sharedColl1.copy(ck shared;$sharedColl2) + Use($sharedColl2) + $sharedColl2.combine($copyColl) + End use +``` + +#### Example 3 + +We have a regular collection (*$lastnames*) and we want to put it in the **Storage** of the application. To do this, we must create a shared copy beforehand (*$sharedLastnames*). + +```4d +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) // shared copy + +Use(Storage) + Storage.lastnames:=$sharedLastnames +End use +``` + +#### Example 4 + +This example illustrates the use of the `ck resolve pointers` option: + +```4d + var $col : Collection + var $p : Pointer + $p:=->$what + + $col:=New collection + $col.push(New object("alpha";"Hello";"num";1)) + $col.push(New object("beta";"You";"what";$p)) + + $col2:=$col.copy() + $col2[1].beta:="World!" + ALERT($col[0].alpha+" "+$col2[1].beta) //displays "Hello World!" + + $what:="You!" + $col3:=$col2.copy(ck resolve pointers) + ALERT($col3[0].alpha+" "+$col3[1].what) //displays "Hello You!" +``` + + + + + + + +## .count() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.count**( { *propertyPath* : Text } ) : Real + +| Parameter | Tipo | | Descripción | +| ------------ | ----- |:--:| ----------------------------------------------- | +| propertyPath | Texto | -> | Object property path to be used for calculation | +| Resultado | Real | <- | Number of elements in the collection | + + +#### Descripción + +The `.count()` function returns the number of non-null elements in the collection. + +If the collection contains objects, you can pass the *propertyPath* parameter. In this case, only elements that contain the *propertyPath* are taken into account. + +#### Ejemplo + +```4d + var $col : Collection + var $count1;$count2 : Real + $col:=New collection(20;30;Null;40) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $col.push(New object("lastName";"Henry";"salary";12000)) + $count1:=$col.count() //$count1=7 + $count2:=$col.count("name") //$count2=3 + +``` + + + + + + +## .countValues() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real + +| Parameter | Tipo | | Descripción | +| ------------ | ----------------------------------------------- |:--:| ----------------------------------------------- | +| value | Text, Number, Boolean, Date, Object, Collection | -> | Value to count | +| propertyPath | Texto | -> | Object property path to be used for calculation | +| Resultado | Real | <- | Number of occurrences of the value | + + +#### Descripción + +The `.countValues()` function returns the number of times value is found in the collection. + +You can pass in *value*: + +* a scalar value (text, number, boolean, date), +* an object or a collection reference. + + +For an element to be found, the type of *value* must be equivalent to the type of the element; the method uses the equality operator. + +The optional *propertyPath* parameter allows you to count values inside a collection of objects: pass in *propertyPath* the path of the property whose values you want to count. +> This function does not modify the original collection. + +#### Ejemplo 1 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection(1;2;5;5;5;3;6;4) + $vCount:=$col.countValues(5) // $vCount=3 +``` + + +#### Ejemplo 2 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection + $col.push(New object("name";"Smith";"age";5)) + $col.push(New object("name";"Wesson";"age";2)) + $col.push(New object("name";"Jones";"age";3)) + $col.push(New object("name";"Henry";"age";4)) + $col.push(New object("name";"Gross";"age";5)) + $vCount:=$col.countValues(5;"age") //$vCount=2 +``` + + +#### Example 3 + +```4d + var $numbers; $letters : Collection + var $vCount : Integer + + $letters:=New collection("a";"b";"c") + $numbers:=New collection(1;2;$letters;3;4;5) + + $vCount:=$numbers.countValues($letters) //$vCount=1 +``` + + + + + + + +## .distinct() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.distinct**( {*option* : Integer} ) : Collection
    **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------ | --------- |:--:| ---------------------------------------------------------------- | +| option | Entero | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| propertyPath | Texto | -> | Path of attribute whose distinct values you want to get | +| Resultado | Colección | <- | New collection with only distinct values | + + +#### Descripción + +The `.distinct()` function returns a collection containing only distinct (different) values from the original collection. +> This function does not modify the original collection. + +The returned collection is automatically sorted. **Null** values are not returned. + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the *option* parameter. + +If the collection contains objects, you can pass the *propertyPath* parameter to indicate the object property whose distinct values you want to get. + + + +#### Ejemplo + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push("a";"b";"c";"A";"B";"c";"b";"b") + $c.push(New object("size";1)) + $c.push(New object("size";3)) + $c.push(New object("size";1)) + $c2:=$c.distinct() //$c2=["a","b","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct(ck diacritical) //$c2=["a","A","b","B","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct("size") //$c2=[1,3] +``` + + + + + + +## .equal() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean +| Parameter | Tipo | | Descripción | +| ----------- | --------- |:--:| ---------------------------------------------------------------- | +| collection2 | Colección | -> | Collection to compare | +| option | Entero | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| Resultado | Booleano | <- | True if collections are identical, false otherwise | + + +#### Descripción + +The `.equal()` function compares the collection with collection2 and returns **true** if they are identical (deep comparison). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the option parameter. +> Elements with **Null** values are not equal to Undefined elements. + +#### Ejemplo + +```4d + var $c; $c2 : Collection + var $b : Boolean + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3;4) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("1";"a";"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2) // true + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2;ck diacritical) //false +``` + + + + + +## .every() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
    **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean +| Parameter | Tipo | | Descripción | +| ---------- | -------- |:--:| ------------------------------------------------- | +| startFrom | Integer | -> | Index to start the test at | +| methodName | Text | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to methodName | +| Resultado | Booleano | <- | True if all elements successfully passed the test | + + +#### Descripción + +The `.every()` function returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to true for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: paramN... + +*methodName* sets the following parameter(s): + +* *$1.result* (Boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (Boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In all cases, at the point when the `.every()` function encounters the first collection element returning **false** in *$1.result*, it stops calling *methodName* and returns **false**. + +By default, `.every()` tests the whole collection. Optionally, you can pass in *startFrom* the index of the element from which to start the test. + +* If *startFrom* >= the collection's length, **false** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection ( *startFrom:=startFrom+length*). +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Ejemplo 1 + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("NumberGreaterThan0") //returns true +$c.push(-1) +$b:=$c.every("NumberGreaterThan0") //returns false +``` + +With the following ***NumberGreaterThan0*** method: + +```4d +$1.result:=$1.value>0 +``` + +#### Ejemplo 2 + +This example tests that all elements of a collection are of the real type: + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("TypeLookUp";Is real) //$b=true +$c:=$c.push(New object("name";"Cleveland";"zc";35049)) +$c:=$c.push(New object("name";"Blountsville";"zc";35031)) +$b:=$c.every("TypeLookUp";Is real) //$b=false +``` + +With the following ***TypeLookUp*** method: + +```4d +#DECLARE ($toEval : Object ; $param : Integer) //$1; $2 +If(Value type($toEval.value)=$param) + $toEval.result:=True +End if +``` + + + + + +## .extract() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
    **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------ | --------- |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| propertyPath | Texto | -> | Object property path whose values must be extracted to the new collection | +| targetpath | Texto | -> | Target property path or property name | +| option | Entero | -> | `ck keep null`: include null properties in the returned collection (ignored by default). Parameter ignored if *targetPath* passed. | +| Resultado | Colección | <- | New collection containing extracted values | + + +#### Descripción + +The `.extract()` function creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects. +> This function does not modify the original collection. + +The contents of the returned collection depends on the *targetPath* parameter: + +* If the *targetPath* parameter is omitted, `.extract()` populates the new collection with the *propertyPath* values of the original collection. + + By default, elements for which *propertyPath* is null or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as null elements in the returned collection. + + +* If one or more *targetPath* parameter(s) are passed, `.extract()` populates the new collection with the *propertyPath* properties and each element of the new collection is an object with *targetPath* properties filled with the corresponding *propertyPath* properties. Null values are kept (*option* parameter is ignored with this syntax). + + +#### Ejemplo 1 + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("name";"Cleveland")) +$c.push(New object("zip";5321)) +$c.push(New object("name";"Blountsville")) +$c.push(42) +$c2:=$c.extract("name") // $c2=[Cleveland,Blountsville] +$c2:=$c.extract("name";ck keep null) //$c2=[Cleveland,null,Blountsville,null] +``` + + +#### Ejemplo 2 + + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("zc";35060)) +$c.push(New object("name";Null;"zc";35049)) +$c.push(New object("name";"Cleveland";"zc";35049)) +$c.push(New object("name";"Blountsville";"zc";35031)) +$c.push(New object("name";"Adger";"zc";35006)) +$c.push(New object("name";"Clanton";"zc";35046)) +$c.push(New object("name";"Clanton";"zc";35045)) +$c2:=$c.extract("name";"City") //$c2=[{City:null},{City:Cleveland},{City:Blountsville},{City:Adger},{City:Clanton},{City:Clanton}] +$c2:=$c.extract("name";"City";"zc";"Zip") //$c2=[{Zip:35060},{City:null,Zip:35049},{City:Cleveland,Zip:35049},{City:Blountsville,Zip:35031},{City:Adger,Zip:35006},{City:Clanton,Zip:35046},{City:Clanton,Zip:35045}] +``` + + + + + + +## .fill() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.fill**( *value* : any ) : Collection
    **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection + + +| Parameter | Tipo | | Descripción | +| --------- | ----------------------------------------------- |:--:| -------------------------------------- | +| value | number, Text, Collection, Object, Date, Boolean | -> | Filling value | +| startFrom | Entero | -> | Start index (included) | +| end | Entero | -> | End index (not included) | +| Resultado | colección | <- | Original collection with filled values | + + +#### Descripción + +The `.fill()` function fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection. +> This function modifies the original collection. + +* If the *startFrom* parameter is omitted, *value* is set to all collection elements (*startFrom*=0). +* If the *startFrom* parameter is passed and *end* omitted, *value* is set to collection elements starting at *startFrom* to the last element of the collection (*end*=length). +* If both the *startFrom* parameter and *end* are passed, *value* is set to collection elements starting at *startFrom* to the element *end*. + +In case of inconsistency, the following rules apply: + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end* < *startFrom* (passed or calculated values), the method does nothing. + + +#### Ejemplo + +```4d + var $c : Collection + $c:=New collection(1;2;3;"Lemon";Null;"";4;5) + $c.fill("2") // $c:=[2,2,2,2,2,2,2,2] + $c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello] + $c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello] + $c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello] +``` + + + + + + +## .filter() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Parameter | Tipo | | Descripción | +| ---------- | --------- |:--:| ---------------------------------------------------------- | +| methodName | Texto | -> | Name of the function to call to filter the collection | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Resultado | Colección | <- | New collection containing filtered elements (shallow copy) | + + +#### Descripción + +The `.filter()` function returns a new collection containing all elements of the original collection for which *methodName* method result is **true**. This function returns a ***shallow copy***, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to **true** for each element fulfilling the condition and thus, to push to the new collection. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be filtered +* in *$2*: *param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the filter condition and must be kept. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Ejemplo 1 + +You want to get the collection of text elements whose length is smaller than 6: + +```4d + var $col;$colNew : Collection + $col:=New collection("hello";"world";"red horse";66;"tim";"san jose";"miami") + $colNew:=$col.filter("LengthLessThan";6) + //$colNew=["hello","world","tim","miami"] +``` + +The code for ***LengthLessThan*** method is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Ejemplo 2 + +You want to filter elements according to their value type: + +```4d + var $c;$c2;$c3 : Collection + $c:=New collection(5;3;1;4;6;2) + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c2:=$c.filter("TypeLookUp";Is real) // $c2=[5,3,1,4,6,2] + $c3:=$c.filter("TypeLookUp";Is object) + // $c3=[{name:Cleveland,zc:35049},{name:Blountsville,zc:35031}] +``` + +The code for ***TypeLookUp*** is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(OB Get type($1;"value")=$2) + + + $1.result:=True + End if +``` + + + + + + +## .find() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.find**( *methodName* : Text { ; *...param* : any } ) : any
    **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any + +| Parameter | Tipo | | Descripción | +| ---------- | ------ |:--:| -------------------------------------------- | +| startFrom | Entero | -> | Index to start the search at | +| methodName | Texto | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Resultado | any | <- | First value found, or Undefined if not found | + + +#### Descripción + +The `.find()` function returns the first value in the collection for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in the first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value:* element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.find()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Ejemplo 1 + +You want to get the first element with a length smaller than 5: + +```4d + var $col : Collection + $col:=New collection("hello";"world";4;"red horse";"tim";"san jose") + $value:=$col.find("LengthLessThan";5) //$value="tim" +``` + +The code for ***LengthLessThan*** method is: + +```4d + var $1 : Object + var $2 : Integer + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Ejemplo 2 + +You want to find a city name within a collection: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.find("FindCity";"Clanton") //$c2={name:Clanton,zc:35046} +``` + +The code for ***FindCity*** is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 //name is a property name of objects in the collection +``` + + + + + + +## .findIndex() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + + +**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
    **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer + + +| Parameter | Tipo | | Descripción | +| ---------- | ------ |:--:| ---------------------------------------------- | +| startFrom | Entero | -> | Index to start the search at | +| methodName | Texto | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Resultado | Entero | <- | Index of first value found, or -1 if not found | + + +#### Descripción + +The `.findIndex()` function returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, using or not the parameter(s). This method receives an `Object` as first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.findIndex()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Ejemplo + +You want to find the position of the first city name within a collection: + +```4d + var $c : Collection + var $val2;$val3 : Integer + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $val2:=$c.findIndex("FindCity";"Clanton") // $val2=3 + $val3:=$c.findIndex($val2+1;"FindCity";"Clanton") //$val3=4 +``` + +The code for ***FindCity*** method is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 +``` + + + + + + + +## .indexOf() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Parameter | Tipo | | Descripción | +| --------- | ---------- |:--:| ---------------------------------------------------------------------------- | +| toSearch | expression | -> | Expression to search in the collection | +| startFrom | Entero | -> | Index to start the search at | +| Resultado | Entero | <- | Index of the first occurrence of toSearch in the collection, -1 if not found | + + +#### Descripción + +The `.indexOf()` function searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator of the data type are applied). + +Optionally, you can pass the index of collection from which to start the search in *startFrom*. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Ejemplo + + + +```4d + var $col : Collection + var $i : Integer + $col:=New collection(1;2;"Henry";5;3;"Albert";6;4;"Alan";5) + $i:=$col.indexOf(3) //$i=4 + $i:=$col.indexOf(5;5) //$i=9 + $i:=$col.indexOf("al@") //$i=5 + $i:=$col.indexOf("Hello") //$i=-1 +``` + + + + + + +## .indices() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection + +| Parameter | Tipo | | Descripción | +| ----------- | --------- |:--:| -------------------------------------------------------- | +| queryString | Texto | -> | Search criteria | +| value | any | -> | Value(s) to compare when using placeholder(s) | +| Resultado | Colección | <- | Element index(es) matching queryString in the collection | + + +#### Descripción + +The `.indices()` function works exactly the same as the [`.query()`](#query) function but returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions, and not elements themselves. Indexes are returned in ascending order. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For a detailed description of the *queryString* and *value* parameters, please refer to the `dataClass.query()` function. + +#### Ejemplo + + +```4d + var $c; $icol : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $icol:=$c.indices("name = :1";"Cleveland") // $icol=[0] + $icol:=$c.indices("zc > 35040") // $icol=[0,3,4] +``` + + + + + +## .insert() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.insert**( *index* : Integer ; *element* : any ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ----------------------------------------------- | +| index | Entero | -> | Where to insert the element | +| element | any | -> | Element to insert in the collection | +| Resultado | Colección | <- | Original collection containing inserted element | + + +#### Descripción + +The `.insert()` function inserts *element* at the specified *index* position in the collection instance and returns the edited collection. +> This function modifies the original collection. + +In *index*, pass the position where you want the element to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, actual starting index will be set to the length of the collection. +* If *index* <0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, index is set to 0. + +Any type of element accepted by a collection can be inserted, even another collection. + +#### Ejemplo + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d") //$col=["a","b","c","d"] + $col.insert(2;"X") //$col=["a","b","X","c","d"] + $col.insert(-2;"Y") //$col=["a","b","X","Y","c","d"] + $col.insert(-10;"Hi") //$col=["Hi","a","b","X","Y","c","d"] +``` + + + + + + +## .join() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------------------------------ | +| delimiter | Texto | -> | Separator to use between elements | +| option | Entero | -> | `ck ignore null or empty`: ignore null and empty strings in the result | +| Resultado | Texto | <- | String containing all elements of the collection, separated by delimiter | + + +#### Descripción + +The `.join()` function converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator.The function returns the resulting string. +> This function does not modify the original collection. + +By default, null or empty elements of the collection are returned in the resulting string. Pass the `ck ignore null or empty` constant in the *option* parameter if you want to remove them from the resulting string. + +#### Ejemplo + + +```4d + var $c : Collection + var $t1;$t2 : Text + $c:=New collection(1;2;3;"Paris";Null;"";4;5) + $t1:=$c.join("|") //1|2|3|Paris|null||4|5 + $t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5 +``` + + + + + +## .lastIndexOf() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Parameter | Tipo | | Descripción | +| --------- | ---------- |:--:| ----------------------------------------------------------------------- | +| toSearch | expression | -> | The element that is to be searched for within the collection | +| startFrom | Entero | -> | Index to start the search at | +| Resultado | Entero | <- | Index of last occurrence of toSearch in the collection, -1 if not found | + + +#### Descripción + +The `.lastIndexOf()` function searches the *toSearch* expression among collection elements and returns the index of the last occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator are applied). + +Optionally, you can pass the index of collection from which to start a reverse search in *startFrom*. + +* If *startFrom* >= the collection's length minus one (coll.length-1), the whole collection is searched (default). +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, -1 is returned (the collection is not searched). **Note:** Even if *startFrom* is negative, the collection is still searched from right to left. +* If *startFrom* = 0, -1 is returned, which means the collection is not searched. + +#### Ejemplo + + +```4d + var $col : Collection + var $pos1;$pos2;$pos3;$pos4;$pos5 : Integer + $col:=Split string("a,b,c,d,e,f,g,h,i,j,e,k,e";",") //$col.length=13 + $pos1:=$col.lastIndexOf("e") //returns 12 + $pos2:=$col.lastIndexOf("e";6) //returns 4 + $pos3:=$col.lastIndexOf("e";15) //returns 12 + $pos4:=$col.lastIndexOf("e";-2) //returns 10 + $pos5:=$col.lastIndexOf("x") //returns -1 +``` + + + + + +## .length + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R5 | Added | +
    + +**.length** : Integer + + +#### Descripción + +The `.length` property returns the number of elements in the collection. + +The `.length` property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is **read-only** (you cannot use it to set the size of the collection). + +#### Ejemplo + + +```4d + var $col : Collection //$col.length initialized to 0 + $col:=New collection("one";"two";"three") //$col.length updated to 3 + $col[4]:="five" //$col.length updated to 5 + $vSize:=$col.remove(0;3).length //$vSize=2 +``` + + + + + +## .map() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.map**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Parameter | Tipo | | Descripción | +| ---------- | --------- |:--:| -------------------------------------------------------- | +| methodName | Texto | -> | Name of method used to transform the collection elements | +| param | any | -> | Parameter(s) for the method | +| Resultado | Colección | <- | Collection of transformed values | + + +#### Descripción + +The `.map()` function creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection. Optionally, you can pass parameters to *methodName* using the *param* parameter(s). `.map()` always returns a collection with the same size as the original collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any operation, with or without the parameter(s). + +*methodName* receives the following parameters: + +* in *$1.value* (any type): element value to be mapped +* in *$2* (any type): *param* +* in *$N...* (any type): *paramN...* + +*methodName* sets the following parameter(s): + + +* *$1.result* (any type): new transformed value to add to the resulting collection +* *$1.stop* (boolean): **true** to stop the method callback. The returned value is the last calculated. + +#### Ejemplo + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;4;9;10;20) + $c2:=$c.map("Percentage";$c.sum()) + //$c2=[2.27,9.09,20.45,22.73,45.45] +``` + +Here is the ***Percentage*** method: + +```4d + var $1 : Object + var $2 : Real + $1.result:=Round(($1.value/$2)*100;2) +``` + + + + + + + +## .max() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.max**( { *propertyPath* : Text } ) : any +| Parameter | Tipo | | Descripción | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Texto | -> | Object property path to be used for evaluation | +| Resultado | Boolean, Text, Number, Collection, Object, Date | <- | Maximum value in the collection | + + +#### Descripción + +The `.max()` function returns the element with the highest value in the collection (the last element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.max()` function will return the maximum value within the last element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose maximum value you want to get. + +If the collection is empty, `.max()` returns *Undefined*. + +#### Ejemplo + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $max:=$col.max() //{name:Alabama,salary:10500} + $maxSal:=$col.max("salary") //50000 + $maxName:=$col.max("name") //"Wesson" +``` + + + + + +## .min() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.min**( { *propertyPath* : Text } ) : any +| Parameter | Tipo | | Descripción | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Texto | -> | Object property path to be used for evaluation | +| Resultado | Boolean, Text, Number, Collection, Object, Date | <- | Minimum value in the collection | + + +#### Descripción + +The `.min()` function returns the element with the smallest value in the collection (the first element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.min()` function will return the minimum value within the first element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose minimum value you want to get. + +If the collection is empty, `.min()` returns *Undefined*. + +#### Ejemplo + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $min:=$col.min() //55 + $minSal:=$col.min("salary") //10000 + $minName:=$col.min("name") //"Alabama" +``` + + + + + +## .orderBy() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.orderBy**( ) : Collection
    **.orderBy**( *pathStrings* : Text ) : Collection
    **.orderBy**( *pathObjects* : Collection ) : Collection
    **.orderBy**( *ascOrDesc* : Integer ) : Collection + +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ----------- | +| | | | | + +|pathStrings|Text|->|Property path(s) on which to order the collection| |pathObjects|Collection|->|Collection of criteria objects| |ascOrDesc|Integer|->|`ck ascending` or `ck descending` (scalar values)| |Result|Collection |<-|Ordered copy of the collection (shallow copy)| + + +#### Descripción + +The `.orderBy()` function returns a new collection containing all elements of the collection in the specified order. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +If you pass no parameter, the function orders scalar values in the collection in ascending order (other element types such as objects or collections are returned unordered). You can modify this automatic order by passing the `ck ascending` or `ck descending` constants in the *ascOrDesc* parameter (see below). + +You can also pass a criteria parameter to define how the collection elements must be sorted. Three syntaxes are supported for this parameter: + +* *pathStrings* : Text (formula). **Syntax**: `propertyPath1 {desc or asc}, propertyPath2 {desc or asc},...` (default order: asc). *pathStrings* contains a formula made of 1 to x property paths and (optionally) sort orders, separated by commas. The order in which the properties are passed determines the sorting priority of the collection elements. By default, properties are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* : Collection. You can add as many objects in the *pathObjects* collection as necessary. By default, properties are sorted in ascending order ("descending" is false). Each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +* *ascOrDesc* : Integer. You pass one of the following constants from the **Objects and collections** theme: + + | Constant | Tipo | Valor | Comment | + | ------------- | ------- | ----- | ------------------------------------------------- | + | ck ascending | Longint | 0 | Elements are ordered in ascending order (default) | + | ck descending | Longint | 1 | Elements are ordered in descending order | + + This syntax orders scalar values in the collection only (other element types such as objects or collections are returned unordered). + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Ejemplo 1 + +Ordering a collection of numbers in ascending and descending order: + +```4d + var $c; $c2; $3 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(Random) + End for + $c2:=$c.orderBy(ck ascending) + $c3:=$c.orderBy(ck descending) +``` + + +#### Ejemplo 2 + +Ordering a collection of objects based on a text formula with property names: + +```4d + var $c; $c2 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $c2:=$c.orderBy("value desc") + $c2:=$c.orderBy("value desc, id") + $c2:=$c.orderBy("value desc, id asc") +``` + +Ordering a collection of objects with a property path: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + + $c2:=$c.orderBy("phones.p1 asc") +``` + + +#### Example 3 + +Ordering a collection of objects using a collection of criteria objects: + +```4d + var $crit; $c; $c2 : COllection + $crit:=New collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $crit.push(New object("propertyPath";"value";"descending";True)) + $crit.push(New object("propertyPath";"id";"descending";False)) + $c2:=$c.orderBy($crit) +``` + +Ordering with a property path: + +```4d + var $crit; $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + $crit:=New collection(New object("propertyPath";"phones.p2";"descending";True)) + $c2:=$c.orderBy($crit) +``` + + + + + + + +## .orderByMethod() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection + +| Parameter | Tipo | | Descripción | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| methodName | Texto | -> | Name of method used to specify the sorting order | +| extraParam | expression | -> | Parameter(s) for the method | +| Resultado | Colección | <- | Sorted copy of the collection (shallow copy) | + + +#### Descripción + +The `.orderByMethod()` function returns a new collection containing all elements of the collection in the order defined through the *methodName* method. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters +* *methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +#### Ejemplo 1 + +You want to sort a collection of strings in numerical order rather than alphabetical order: + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push("33";"4";"1111";"222") + $c2:=$c.orderBy() //$c2=["1111","222","33","4"], alphabetical order + $c3:=$c.orderByMethod("NumAscending") // $c3=["4","33","222","1111"] +``` + + Here is the code for ***NumAscending***: + + +```4d + $1.result:=Num($1.value)Length(String($1.value2)) +``` + +#### Example 3 + +You want to sort a collection by character code or language: + +```4d +var $strings1; $strings2 : Collection +$strings1:=New collection("Alpha";"Charlie";"alpha";"bravo";"Bravo";"charlie") + +//using the character code: +$strings2:=$strings1.orderByMethod("sortCollection";sk character codes) +// result : ["Alpha","Bravo","Charlie","alpha","bravo","charlie"] + +//using the language: +$strings2:=$string1s.orderByMethod("sortCollection";sk strict) +// result : ["alpha","Alpha","bravo","Bravo","charlie","Charlie"] +``` + +The ***sortCollection*** method: + +```4d +var$1Object +var$2Integer // sort option + +$1.result:=(Compare strings($1.value;$1.value2;$2)<0) +``` + + + + + + +## .pop() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + + +**.pop()** : any +| Parameter | Tipo | | Descripción | +| --------- | ---- |:--:| -------------------------- | +| Resultado | any | <- | Last element of collection | + + +#### Descripción + +The `.pop()` function removes the last element from the collection and returns it as the function result. +> This function modifies the original collection. + +When applied to an empty collection, `.pop()` returns ***undefined***. + +#### Ejemplo + +`.pop()`, used in conjunction with [`.push()`](#push), can be used to implement a first-in, last-out stack feature: + +```4d + var $stack : Collection + $stack:=New collection //$stack=[] + $stack.push(1;2) //$stack=[1,2] + $stack.pop() //$stack=[1] Returns 2 + $stack.push(New collection(4;5)) //$stack=[[1,[4,5]] + $stack.pop() //$stack=[1] Returns [4,5] + $stack.pop() //$stack=[] Returns 1 +``` + + + + + + + +## .push() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.push**( *element* : any { ;...*elementN* } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| --------------------------------------------- | +| element | Mixed | -> | Element(s) to add to the collection | +| Resultado | Colección | <- | Original collection containing added elements | + + +#### Descripción + +The `.push()` function appends one or more *element*(s) to the end of the collection instance and returns the edited collection. +> This function modifies the original collection. + + +#### Ejemplo 1 + +```4d + var $col : Collection + $col:=New collection(1;2) //$col=[1,2] + $col.push(3) //$col=[1,2,3] + $col.push(6;New object("firstname";"John";"lastname";"Smith")) + //$col=[1,2,3,6,{firstname:John,lastname:Smith} +``` + + + +#### Ejemplo 2 + +You want to sort the resutling collection: + +```4d + var $col; $sortedCol : Collection + $col:=New collection(5;3;9) //$col=[5,3,9] + $sortedCol:=$col.push(7;50).sort() + //$col=[5,3,9,7,50] + //$sortedCol=[3,5,7,9,50] +``` + + + + + + + + +## .query() + +
    History +| Version | Changes | +| ------- | ------------------------ | +| v17 R5 | Support of querySettings | +| v16 R6 | Added | +
    + +**.query**( *queryString* : Text ; *...value* : any ) : Collection
    **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------- | --------- |:--:| ------------------------------------------------- | +| queryString | Texto | -> | Search criteria | +| value | Mixed | -> | Value(s) to compare when using placeholder(s) | +| querySettings | Objeto | -> | Query options: parameters, attributes | +| Resultado | Colección | <- | Element(s) matching queryString in the collection | + + +#### Descripción + +The `.query()` function returns all elements of a collection of objects that match the search conditions defined by *queryString* and (optionally) *value* or *querySettings*. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For detailed information on how to build a query using *queryString*, *value* and *querySettings* parameters, please refer to the [`dataClass.query()`](DataClassClass.md#query) function description. + +> Formulas are not supported by the `collection.query()` function, neither in the *queryString* parameter nor as *formula* object parameter. + +#### Ejemplo 1 + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.query("name = :1";"Cleveland") //$c2=[{name:Cleveland,zc:35049}] + $c3:=$c.query("zc > 35040") //$c3=[{name:Cleveland,zc:35049},{name:Clanton,zc:35046},{name:Clanton,zc:35045}] +``` + + +#### Ejemplo 2 + + +```4d + var $c : Collection + $c:=New collection + $c.push(New object("name";"Smith";"dateHired";!22-05-2002!;"age";45)) + $c.push(New object("name";"Wesson";"dateHired";!30-11-2017!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) +``` + +This example returns persons whose name contains "in": + +```4d + $col:=$c.query("name = :1";"@in@") + //$col=[{name:Winch...},{name:Sterling...}] +``` + +This example returns persons whose name does not begin with a string from a variable (entered by the user, for example): + +```4d + $col:=$c.query("name # :1";$aString+"@") + //if $astring="W" + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons whose age is not known (property set to null or undefined): + +```4d + $col:=$c.query("age=null") //placeholders not allowed with "null" + //$col=[{name:Wesson...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons hired more than 90 days ago: + +```4d + $col:=$c.query("dateHired < :1";(Current date-90)) + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] if today is 01/10/2018 +``` + + +#### Example 3 + +More examples of queries can be found in the `dataClass.query()` page. + + + + + + +## .reduce() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.reduce**( *methodName* : Text ) : any
    **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any + +| Parameter | Tipo | | Descripción | +| ---------- | ----------------------------------------------- |:--:| -------------------------------------------------------------------- | +| methodName | Texto | -> | Name of the function to call to process collection elements | +| initValue | Text, Number, Object, Collection, Date, Boolean | -> | Value to use as the first argument to the first call of *methodName* | +| param | expression | -> | Parameter(s) to pass to *methodName* | +| Resultado | Text, Number, Object, Collection, Date, Boolean | <- | Result of the accumulator value | + + +#### Descripción + + +The `.reduce()` function applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in param (optional). *methodName* takes each collection element and performs any desired operation to accumulate the result into *$1.accumulator*, which is returned in *$1.value*. + +You can pass the value to initialize the accumulator in *initValue*. If omitted, *$1.accumulator* starts with *Undefined*. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be processed +* in *$2: param* +* in *$N...*: *paramN...* + +*methodName* sets the following parameter(s): + +* *$1.accumulator*: value to be modified by the function and which is initialized by *initValue*. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Ejemplo 1 + + +```4d + C_COLLECTION($c) + $c:=New collection(5;3;5;1;3;4;4;6;2;2) + $r:=$c.reduce("Multiply";1) //returns 86400 +``` + +With the following ***Multiply*** method: + +```4d + If(Value type($1.value)=Is real) + $1.accumulator:=$1.accumulator*$1.value + End if +``` + +#### Ejemplo + +This example allows reducing several collection elements to a single one: + +```4d + var $c;$r : Collection + $c:=New collection + $c.push(New collection(0;1)) + $c.push(New collection(2;3)) + $c.push(New collection(4;5)) + $c.push(New collection(6;7)) + $r:=$c.reduce("Flatten") //$r=[0,1,2,3,4,5,6,7] +``` + +With the following ***Flatten*** method: + +```4d + If($1.accumulator=Null) + $1.accumulator:=New collection + End if + $1.accumulator.combine($1.value) +``` + + + + + +## .remove() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection + +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ----------------------------------------------------- | +| index | Entero | -> | Element at which to start removal | +| howMany | Entero | -> | Number of elements to remove, or 1 element if omitted | +| Resultado | Colección | <- | Original collection without removed element(s) | + + +#### Descripción + +The `.remove()` function removes one or more element(s) from the specified *index* position in the collection and returns the edited collection. +> This function modifies the original collection. + +In *index*, pass the position where you want the element to be removed from the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. If *index* is greater than the length of the collection, actual starting index will be set to the length of the collection. + +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *index* is set to 0. +* If the calculated value > the length of the collection, *index* is set to the length. + +In *howMany*, pass the number of elements to remove from *index*. If *howMany* is not specified, then one element is removed. + + + +If you try to remove an element from an empty collection, the method does nothing (no error is generated). + + +#### Ejemplo + + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d";"e";"f";"g";"h") + $col.remove(3) // $col=["a","b","c","e","f","g","h"] + $col.remove(3;2) // $col=["a","b","c","g","h"] + $col.remove(-8;1) // $col=["b","c","g","h"] + $col.remove(-3;1) // $col=["b","g","h"] +``` + + + + + + + +## .resize() + + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + + + +**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection +| Parameter | Tipo | | Descripción | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------- | +| size | Entero | -> | New size of the collection | +| defaultValue | Number, Text, Object, Collection, Date, Boolean | -> | Default value to fill new elements | +| Resultado | Colección | <- | Resized original collection | + + +#### Descripción + +The `.resize()` function sets the collection length to the specified new size and returns the resized collection. +> This function modifies the original collection. + +* If *size* < collection length, exceeding elements are removed from the collection. +* If *size* > collection length, the collection length is increased to size. + +By default, new elements are filled will **null** values. You can specify the value to fill in added elements using the *defaultValue* parameter. + +#### Ejemplo + + +```4d + var $c : Collection + $c:=New collection + $c.resize(10) // $c=[null,null,null,null,null,null,null,null,null,null] + + $c:=New collection + $c.resize(10;0) // $c=[0,0,0,0,0,0,0,0,0,0] + + $c:=New collection(1;2;3;4;5) + $c.resize(10;New object("name";"X")) //$c=[1,2,3,4,5,{name:X},{name:X},{name:X},{name:X},{name:X}] + + $c:=New collection(1;2;3;4;5) + $c.resize(2) //$c=[1,2] + +``` + + + + + + + +## .reverse() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.reverse( )** : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------- | +| Resultado | Colección | <- | Inverted copy of the collection | + + +#### Descripción + +The `.reverse()` function returns a deep copy of the collection with all its elements in reverse order. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +#### Ejemplo + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;3;5;2;4;6) + $c2:=$c.reverse() //$c2=[6,4,2,5,3,1] +``` + + + + + + +## .shift() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.shift()** : any +| Parameter | Tipo | | Descripción | +| --------- | ---- |:--:| --------------------------- | +| Resultado | any | <- | First element of collection | + + +#### Descripción + +The `.shift()` function removes the first element of the collection and returns it as the function result. +> This function modifies the original collection. + +If the collection is empty, this method does nothing. + +#### Ejemplo + + +```4d + var $c : Collection + var $val : Variant + $c:=New collection(1;2;4;5;6;7;8) + $val:=$c.shift() + // $val=1 + // $c=[2,4,5,6,7,8] +``` + + + + + + +## .slice() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------- | +| startFrom | Entero | -> | Index to start the search at (included) | +| end | Entero | -> | End index (not included) | +| Resultado | Colección | <- | New collection containing sliced elements (shallow copy) | + + +#### Descripción + +The `.slice()` function returns a portion of a collection into a new collection, selected from *startFrom* index to *end* index (end not included). This function returns a *shallow copy* of the collection. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +The returned collection contains the element specified by *startFrom* and all subsequent elements up to, but not including, the element specified by *end*. If only the *startFrom* parameter is specified, the returned collection contains all elements from *startFrom* to the last element of the original collection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +#### Ejemplo + + +```4d + var $c; $nc : Collection + $c:=New collection(1;2;3;4;5) + $nc:=$c.slice(0;3) //$nc=[1,2,3] + $nc:=$c.slice(3) //$nc=[4,5] + $nc:=$c.slice(1;-1) //$nc=[2,3,4] + $nc:=$c.slice(-3;-2) //$nc=[3] +``` + + + + + + +## .some() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
    **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean + +| Parameter | Tipo | | Descripción | +| ---------- | -------- |:--:| --------------------------------------------------------- | +| startFrom | Entero | -> | Index to start the test at | +| methodName | Texto | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Resultado | Booleano | <- | True if at least one element successfully passed the test | + + +#### Descripción + +The `.some()` function returns true if at least one element in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). Este método recibe un `Object` como primer parámetro ($1) y debe definir *$ 1.result* en **True** para cada elemento que cumpla la prueba. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In any case, at the point where `.some()` function encounters the first collection element returning true in *$1.result*, it stops calling *methodName* and returns **true**. + +By default, `.some()` tests the whole collection. Optionally, you can pass the index of an element from which to start the test in *startFrom*. + +* If *startFrom* >= the collection's length, **False** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Ejemplo + + +```4d + var $c : Collection + var $b : Boolean + $c:=New collection + $c.push(-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") // returns false + $c.push(1) + $b:=$c.some("NumberGreaterThan0") // returns true + + $c:=New collection + $c.push(1;-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") //$b=true + $b:=$c.some(1;"NumberGreaterThan0") //$b=false +``` + +With the following *NumberGreaterThan0* method: + +```4d + $1.result:=$1.value>0 +``` + + + + + + + +## .sort() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection + +| Parameter | Tipo | | Descripción | +| ---------- | --------- |:--:| ------------------------------------------------ | +| methodName | Texto | -> | Name of method used to specify the sorting order | +| extraParam | any | -> | Parameter(s) for the method | +| Resultado | Colección | <- | Original collection sorted | + + +#### Descripción + +The `.sort()` function sorts the elements of the original collection and also returns the sorted collection. +> This function modifies the original collection. + +If `.sort()` is called with no parameters, only scalar values (number, text, date, booleans) are sorted. Elements are sorted by default in ascending order, according to their type. + +If you want to sort the collection elements in some other order or sort any type of element, you must supply in *methodName* a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters + +*methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Ejemplo 1 + + +```4d + var $col; $col2 : Collection + $col:=New collection("Tom";5;"Mary";3;"Henry";1;"Jane";4;"Artie";6;"Chip";2) + $col2:=$col.sort() // $col2=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] + // $col=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] +``` + +#### Ejemplo 2 + +```4d + var $col; $col2 : Collection + $col:=New collection(10;20) + $col2:=$col.push(5;3;1;4;6;2).sort() //$col2=[1,2,3,4,5,6,10,20] +``` + +#### Example 3 + +```4d + var $col; $col2; $col3 : Collection + $col:=New collection(33;4;66;1111;222) + $col2:=$col.sort() //numerical sort: [4,33,66,222,1111] + $col3:=$col.sort("numberOrder") //alphabetical sort: [1111,222,33,4,66] +``` + +```4d + //numberOrder project method + var $1 : Object + $1.result:=String($1.value)History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | + + +**.sum**( { *propertyPath* : Text } ) : Real +| Parameter | Tipo | | Descripción | +| ------------ | ----- |:--:| ----------------------------------------------- | +| propertyPath | Texto | -> | Object property path to be used for calculation | +| Resultado | Real | <- | Sum of collection values | + + +#### Descripción + +The `.sum()` function returns the sum for all values in the collection instance. + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.sum()` returns 0 if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + +#### Ejemplo 1 + + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection(10;20;"Monday";True;2) + $vSum:=$col.sum() //32 +``` + +#### Ejemplo 2 + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500,5)) + $vSum:=$col.sum("salary") //$vSum=70500,5 +``` + + + + + + +## .unshift() + +
    History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
    + +**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | -------------------------------------- |:--:| ----------------------------------------------------- | +| value | Text, Number, Object, Collection, Date | -> | Value(s) to insert at the beginning of the collection | +| Resultado | Real | <- | Collection containing added element(s) | + + +#### Descripción + +The `.unshift()` function inserts the given *value*(s) at the beginning of the collection and returns the modified collection. +> This function modifies the original collection. + +If several values are passed, they are inserted all at once, which means that they appear in the resulting collection in the same order as in the argument list. + + +#### Ejemplo + + +```4d + var $c : Collection + $c:=New collection(1;2) + $c.unshift(4) // $c=[4,1,2] + $c.unshift(5) //$c=[5,4,1,2] + $c.unshift(6;7) // $c=[6,7,5,4,1,2] +``` + + + + diff --git a/website/translated_docs/es/API/CryptoKeyClass.md b/website/translated_docs/es/API/CryptoKeyClass.md new file mode 100644 index 00000000000000..233f9d7e484aed --- /dev/null +++ b/website/translated_docs/es/API/CryptoKeyClass.md @@ -0,0 +1,340 @@ +--- +id: CryptoKeyClass +title: CryptoKey +--- + + +The `CryptoKey` class in the 4D language encapsulates an asymetric encryption key pair. + +This class is available from the `4D` class store. + +### Ejemplo + +The following sample code signs and verifies a message using a new ECDSA key pair, for example in order to make a ES256 JSON Web token. + +```4d + // Generate a new ECDSA key pair +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) + + // Get signature as base64 +$message:="hello world" +$signature:=$key.sign($message;New object("hash";"SHA256")) + + // Verify signature +$status:=$key.verify($message;$signature;New object("hash";"SHA256")) +ASSERT($status.success) +``` + + +### Summary +| | +| --------------------------------------------------------------------------------------------------------------------- | +| [**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey](#4dcryptokeynew)

        creates a new `4D.CryptoKey` object encapsulating an encryption key pair

    | +| [**.curve** : Text](#curve)

        normalised curve name of the key.

    | +| [**.decrypt**( *message* : Text ; *options* : Object ) : Object](#decrypt)

        decrypts the *message* parameter using the **private** key

    | +| [**.encrypt**( *message* : Text ; *options* : Object ) : Text](#encrypt)

        encrypts the *message* parameter using the **public** key

    | +| [**.getPrivateKey()** : Text](#getprivatekey)

        returns the private key of the `CryptoKey` object

    | +| [**.getPublicKey( )** : Text](#getpublickey)

        returns the public key of the `CryptoKey` object

    | +| [.**sign** (*message* : Text ; *options* : Text) : Text](#sign)

        signs the utf8 representation of a *message* string

    | +| [**.size** : Integer](#size)

        the size of the key in bits

    | +| [**.type** : Text](#type)

        Name of the key type - "RSA", "ECDSA", "PEM"

    | +| [**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object](#verify)

        verifies the base64 signature against the utf8 representation of *message*

    | + + + + + + + + +## 4D.CryptoKey.new() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey +| Parameter | Tipo | | Descripción | +| ---------- | ------------ | -- | ------------------------------------------- | +| parámetros | Objeto | -> | Settings to generate or load a key pair | +| result | 4D.CryptoKey | <- | Object encapsulating an encryption key pair | + +The `4D.CryptoKey.new()` function creates a new `4D.CryptoKey` object encapsulating an encryption key pair, based upon the *settings* object parameter. It allows to generate a new RSA or ECDSA key, or to load an existing key pair from a PEM definition. + +#### *parámetros* + +| Propiedad | Tipo | Descripción | +| --------------- | ------- | ---------------------------------------------- | +| [curve](#curve) | text | Name of ECDSA curve | +| [pem](#pem) | text | PEM definition of an encryption key to load | +| [size](#size) | integer | Size of RSA key in bits | +| [type](#type) | text | Type of the key: "RSA", "ECDSA", or "PEM" | + + +#### *CryptoKey* + +The returned `CryptoKey` object encapsulates an encryption key pair. It is a shared object and can therefore be used by multiple 4D processes simultaneously. + + + +## .curve + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.curve** : Text + + + +Defined only for ECDSA keys: the normalised curve name of the key. Usually "prime256v1" for ES256 (default), "secp384r1" for ES384, "secp521r1" for ES512. + + +## .decrypt() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.decrypt**( *message* : Text ; *options* : Object ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ----------------------------------------------------------------------------- | +| message | Texto | -> | Message string to be decoded using `options.encodingEncrypted` and decrypted. | +| options | Objeto | -> | Decoding options | +| Resultado | Objeto | <- | Status | + + + +The `.decrypt()` function decrypts the *message* parameter using the **private** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +#### *options* + +| Propiedad | Tipo | Descripción | +| ----------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Codificación utilizada para convertir el parámetro `mensaje` en la representación binaria a descifrar. Puede ser "Base64", o "Base64URL". Default is "Base64". | +| encodingDecrypted | text | Encoding used to convert the binary decrypted message into the result string. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8". | + + +#### *Resultado* + +The function returns a status object with `success` property set to `true` if the *message* could be successfully decrypted. + +| Propiedad | Tipo | Descripción | +| --------- | ---------- | ------------------------------------------------------------------- | +| success | boolean | True if the message has been successfully decrypted | +| result | text | Message decrypted and decoded using the `options.encodingDecrypted` | +| errors | collection | If `success` is `false`, may contain a collection of errors | + + +In case the *message* couldn't be decrypted because it was not encrypted with the same key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + + +## .encrypt() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.encrypt**( *message* : Text ; *options* : Object ) : Text +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ----------------------------------------------------------------------------- | +| message | Texto | -> | Message string to be encoded using `options.encodingDecrypted` and encrypted. | +| options | Objeto | -> | Encoding options | +| Resultado | Texto | <- | Message encrypted and encoded using the `options.encodingEncrypted` | + +The `.encrypt()` function encrypts the *message* parameter using the **public** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +##### *options* + +| Propiedad | Tipo | Descripción | +| ----------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64". | +| encodingDecrypted | text | Encoding used to convert the `message` parameter into the binary representation to encrypt. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8". | + + +#### *Resultado* + +The returned value is an encrypted message. + + + + +## .getPrivateKey() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.getPrivateKey()** : Text + +| Parameter | Tipo | | Descripción | +| --------- | ----- | -- | ------------------------- | +| Resultado | Texto | <- | Private key in PEM format | + +The `.getPrivateKey()` function returns the private key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Resultado* + +The returned value is the private key. + + + +## .getPublicKey() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.getPublicKey( )** : Text +| Parameter | Tipo | | Descripción | +| --------- | ---- | -- | ------------------------ | +| Resultado | Text | <- | Public key in PEM format | + + +The `.getPublicKey()` function returns the public key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Resultado* + +The returned value is the public key. + +--- +## .pem + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.pem** : Text + +PEM definition of an encryption key to load. If the key is a private key, the RSA or ECDSA public key will be deduced from it. + + + +## .sign() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +.**sign** (*message* : Text ; *options* : Text) : Text +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ------------------------------------------------------------------------------- | +| message | Texto | -> | Message string to sign | +| options | Objeto | -> | Signing options | +| Resultado | Texto | <- | Signature in Base64 or Base64URL representation, depending on "encoding" option | + +The `.sign()` function signs the utf8 representation of a *message* string using the `CryptoKey` object keys and provided *options*. It returns its signature in base64 or base64URL format, depending on the value of the `options.encoding` attribute you passed. + +The `CryptoKey` must contain a valid **private** key. + +#### *options* + +| Propiedad | Tipo | Descripción | +| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". Cuando se utiliza para producir un JWT, el tamaño del hash debe coincidir con el tamaño del algoritmo PS@, ES@, RS@ o PS@ | +| encodingEncrypted | texto | Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64". | +| pss | booleano | Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when producing a JWT for PS@ algorithm | +| encoding | texto | ERepresentation to be used for result signature. Los valores posibles son "Base64" o "Base64URL". Default is "Base64". | + + +#### *Resultado* + +The utf8 representation of the *message* string. + + +## .size + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.size** : Integer + +Defined only for RSA keys: the size of the key in bits. Typically 2048 (default). + + +## .type + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + + +**.type** : Text +Name of the key type - "RSA", "ECDSA", "PEM"
  • "RSA": an RSA key pair, using `settings.size` as [.size](#size).
  • "ECDSA": an Elliptic Curve Digital Signature Algorithm key pair, using `settings.curve` as [.curve](#curve). Note that ECDSA keys cannot be used for encryption but only for signature.
  • "PEM": a key pair definition in PEM format, using `settings.pem` as [.pem](#pem). + + +## .verify() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ------------------------------------------------------------------------------------------------- | +| message | Texto | -> | Message string that was used to produce the signature | +| signature | Texto | -> | Signature to verify, in Base64 or Base64URL representation, depending on `options.encoding` value | +| options | Objeto | -> | Signing options | +| Resultado | Objeto | <- | Status of the verification | + +The `.verify()` function verifies the base64 signature against the utf8 representation of *message* using the `CryptoKey` object keys and provided *options*. + +The `CryptoKey` must contain a valid **public** key. + + +#### *options* + +| Propiedad | Tipo | Descripción | +| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| hash | texto | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". Cuando se utiliza para producir un JWT, el tamaño del hash debe coincidir con el tamaño del algoritmo PS@, ES@, RS@ o PS@ | +| pss | booleano | Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when verifying a JWT for PS@ algorithm | +| encoding | texto | Representación de la firma facilitada. Puede ser "Base64" o "Base64URL". Default is "Base64". | + + +#### *Resultado* + +The function returns a status object with `success` property set to `true` if `message` could be successfully verified (i.e. the signature matches). + +In case the signature couldn't be verified because it was not signed with the same *message*, key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + +| Propiedad | Tipo | Descripción | +| --------- | --------- | ----------------------------------------------------------- | +| success | booleano | True if the signature matches the message | +| errors | colección | If `success` is `false`, may contain a collection of errors | + + diff --git a/website/translated_docs/es/API/DataClassAttributeClass.md b/website/translated_docs/es/API/DataClassAttributeClass.md new file mode 100644 index 00000000000000..3a3388e7d2481e --- /dev/null +++ b/website/translated_docs/es/API/DataClassAttributeClass.md @@ -0,0 +1,394 @@ +--- +id: DataClassAttributeClass +title: DataClassAttribute +--- + +Dataclass attributes are available as properties of their respective classes. Por ejemplo: + +```4d + nameAttribute:=ds.Company.name //reference to class attribute + revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to *nameAttribute* and *revenuesAttribute* references to the name and revenues attributes of the Company class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [**Entities**](EntityClass.md). + +`DataClassAttribute` objects have properties that you can read to get information about your dataclass attributes. + +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +### Summary + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.autoFilled** : Boolean](#autofilled)

        contains True if the attribute value is automatically filled by 4D | +| [**.exposed** : Boolean](#exposed)

        true if the attribute is exposed in REST | +| [**.fieldNumber** : Integer](#fieldnumber)

        contains the internal 4D field number of the attribute | +| [**.fieldType** : Integer](#fieldtype)

        contains the 4D database type of the attribute | +| [**.indexed** : Boolean](#indexed)

        contains **True** if there is a B-tree or a Cluster B-tree index on the attribute | +| [**.inverseName** : Text](#inversename)

        returns the name of the attribute which is at the other side of the relation | +| [**.keyWordIndexed** : Boolean](#keywordindexed)

        contains **True** if there is a keyword index on the attribute | +| [**.kind** : Text](#kind)

        returns the category of the attribute | +| [**.mandatory** : Boolean](#mandatory)

        contains True if Null value input is rejected for the attribute | +| [**.name** : Text](#name)

        returns the name of the `dataClassAttribute` object as string | +| [**.readOnly** : Boolean](#readonly)

        true if the attribute is read-only | +| [**.relatedDataClass** : Text](#relateddataclass)

        returns the name of the dataclass related to the attribute | +| [**.type** : Text](#type)

        contains the conceptual value type of the attribute | +| [**.unique** : Boolean](#unique)

        contains True if the attribute value must be unique | + + + +## .autoFilled + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.autoFilled** : Boolean + +#### Descripción + +The `.autoFilled` property contains True if the attribute value is automatically filled by 4D. This property corresponds to the following 4D field properties: + +* "Autoincrement", for numeric type fields +* "Auto UUID", for UUID (alpha type) fields. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.autoFilled) to get a valid value (false) even if `.autoFilled` is not returned. + + + +## .exposed + +
    History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | +
    + + +**.exposed** : Boolean + +#### Descripción + +The `.exposed` property is true if the attribute is exposed in REST. + + + + + +## .fieldNumber + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.fieldNumber** : Integer + +#### Descripción + +The `.fieldNumber` property contains the internal 4D field number of the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Num**(dataClassAttribute.fieldNumber) to get a valid value (0) even if `.fieldNumber` is not returned. + + + + + + +## .fieldType + +
    History +| Version | Changes | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
    + + +**.fieldType** : Integer + +#### Descripción + +The `.fieldType` property contains the 4D database type of the attribute. It depends on the attribute kind (see [`.kind`](#kind)). + +**Possible values:** + +| dataClassAttribute.kind | fieldType | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | +| storage | Corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html) | +| relatedEntity | 38 (`Is object`) | +| relatedEntities | 42 (`Is collection`) | +| calculated |
  • scalar: corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)
  • entity: 38 (`Is object`)
  • entity selection: 42 (`Is collection)` | + + + +#### Ver también + +[`.type`](#type) + +## .indexed + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.indexed** : Boolean + +#### Descripción + +The `.indexed` property contains **True** if there is a B-tree or a Cluster B-tree index on the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.indexed) to get a valid value (false) even if `.indexed` is not returned. + + + + + +## .inverseName + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.inverseName** : Text + +#### Descripción + +The `.inverseName` property returns the name of the attribute which is at the other side of the relation. + +This property is not returned if `.kind` = "storage". It must be of the "relatedEntity" or "relatedEntities" kind. +> For generic programming, you can use **String**(dataClassAttribute.inverseName) to get a valid value ("") even if `.inverseName` is not returned. + + + + + +## .keyWordIndexed + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.keyWordIndexed** : Boolean + +#### Descripción + +The `.keyWordIndexed` property contains **True** if there is a keyword index on the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.keyWordIndexed) to get a valid value (false) even if `.keyWordIndexed` is not returned. + + + + +## .kind + +
    History +| Version | Changes | +| ------- | ------------------ | +| v19 R3 | Added "calculated" | +
    + + +**.kind** : Text + +#### Descripción + +The `.kind` property returns the category of the attribute. Returned value can be one of the following: + +* "storage": storage (or scalar) attribute, i.e. attribute storing a value, not a reference to another attribute +* "calculated": computed attribute, i.e. defined through a [`get` function](ORDA/ordaClasses.md#function-get-attributename). +* "relatedEntity": N -> 1 relation attribute (reference to an entity) +* "relatedEntities": 1 -> N relation attribute (reference to an entity selection) + + +#### Ejemplo + +Given the following table and relation: + +![](/assets/en/API/dataclassAttribute3.png) + +```4d + var $attKind : Text + $attKind:=ds.Employee.lastname.kind //$attKind="storage" + $attKind:=ds.Employee.manager.kind //$attKind="relatedEntity" + $attKind:=ds.Employee.directReports.kind //$attKind="relatedEntities" +``` + + + + + + +## .mandatory + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.mandatory** : Boolean + +#### Descripción + +The `.mandatory` property contains True if Null value input is rejected for the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.mandatory) to get a valid value (false) even if `.mandatory` is not returned. +> **Warning**: This property corresponds to the "Reject NULL value input" field property at the 4D database level. It is unrelated to the existing "Mandatory" property which is a data entry control option for a table. + + + + + +## .name + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.name** : Text + +#### Descripción + +The `.name` property returns the name of the `dataClassAttribute` object as string. + +#### Ejemplo + +```4d + var $attName : Text + $attName:=ds.Employee.lastname.name //$attName="lastname" +``` + + + + +## .readOnly + +
    History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | + + +
    + + +**.readOnly** : Boolean + +#### Descripción + +The `.readOnly` property is true if the attribute is read-only. + +For example, computed attributes without [`set` function](ORDA/ordaClasses.md#function-set-attributename) are read-only. + + + + +## .relatedDataClass + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + + +
    + + +**.relatedDataClass** : Text + +#### Descripción +> This property is only available with attributes of the "relatedEntity" or "relatedEntities" [`.kind`](#kind) property. + +The `.relatedDataClass` property returns the name of the dataclass related to the attribute. + +#### Ejemplo + +Given the following tables and relations: + + +![](assets/en/API/dataclassAttribute4.png) + +```4d + var $relClass1; $relClassN : Text + $relClass1:=ds.Employee.employer.relatedDataClass //$relClass1="Company" + $relClassN:=ds.Employee.directReports.relatedDataClass //$relClassN="Employee" +``` + + + + +## .type + +
    History +| Version | Changes | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
    + + +**.type** : Text + +#### Descripción + +The `.type` property contains the conceptual value type of the attribute, useful for generic programming. + +The conceptual value type depends on the attribute [`.kind`](#kind). + +**Possible values:** + +| dataClassAttribute.kind | type | Comment | +| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| storage | "blob", "bool", "date", "image", "number", "object", or "string" | "number" is returned for any numeric types including duration. "string" is returned for uuid, alpha and text field types. "blob" attributes are [blob objects](Concepts/dt_blob.md#blob-type), they are handled using the [Blob class](BlobClass.md). | +| relatedEntity | related dataClass name | Ex: "Companies" | +| relatedEntities | related dataClass name + "Selection" suffix | Ex: "EmployeeSelection" | +| calculated |
  • storage: type ("blob", "number", etc.)
  • entity: dataClass name
  • entity selection: dataClass name + "Selection" | | + + +#### Ver también + +[`.fieldType`](#fieldtype) + + +## .unique + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.unique** : Boolean + +#### Descripción + +The `.unique` property contains True if the attribute value must be unique. This property corresponds to the "Unique" 4D field property. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.unique) to get a valid value (false) even if `.unique` is not returned. + + + diff --git a/website/translated_docs/es/API/DataClassClass.md b/website/translated_docs/es/API/DataClassClass.md new file mode 100644 index 00000000000000..984379b7b10136 --- /dev/null +++ b/website/translated_docs/es/API/DataClassClass.md @@ -0,0 +1,1189 @@ +--- +id: DataClassClass +title: DataClass +--- + + +A [DataClass](ORDA/dsMapping.md#dataclass) provides an object interface to a database table. All dataclasses in a 4D application are available as a property of the `ds` [datastore](ORDA/dsMapping.md#datastore). + + + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : DataClassAttribute](#attributename)

        objects that are available directly as properties | +| [**.all** ( { *settings* : Object } ) : 4D.EntitySelection](#all)

        queries the datastore to find all the entities related to the dataclass and returns them as an entity selection | +| [**.exposed** : Boolean](#exposed)

        true if the dataclass is exposed in REST | +| [**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection](#fromcollection)

        updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection | +| [**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
    **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity](#get)

        queries the dataclass to retrieve the entity matching the *primaryKey* parameter | +| [**.getDataStore()** : cs.DataStore](#getdatastore)

        returns the datastore for the specified dataclass | +| [**.getInfo()** : Object ](#getinfo)

        returns an object providing information about the dataclass | +| [**.new()** : 4D.Entity ](#new)

        creates in memory and returns a new blank entity related to the Dataclass | +| [**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection ](#newselection)

        creates a new, blank, non-shareable entity selection, related to the dataclass, in memory | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection ](#query)

        searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) | + + + +## .*attributeName* + +

    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +***.attributeName*** : DataClassAttribute + +#### Descripción + +The attributes of dataclasses are objects that are available directly as properties of these classes. + +The returned objects are of the [`DataClassAttribute`](DataClassAttributeClass.md) class. These objects have properties that you can read to get information about your dataclass attributes. +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +#### Ejemplo 1 + +```4d +$salary:=ds.Employee.salary //returns the salary attribute in the Employee dataclass +$compCity:=ds.Company["city"] //returns the city attribute in the Company dataclass +``` + + +#### Ejemplo 2 + +Considering the following database structure: + +![](assets/en/API/dataclassAttribute.png) + + +```4d +var $firstnameAtt;$employerAtt;$employeesAtt : Object + + $firstnameAtt:=ds.Employee.firstname + //{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true, + //keyWordIndexed:false,autoFilled:false,mandatory:false,unique:false} + + $employerAtt:=ds.Employee.employer + //{name:employer,kind:relatedEntity,relatedDataClass:Company, + //fieldType:38,type:Company,inverseName:employees} + //38=Is object + + $employeesAtt:=ds.Company.employees + //{name:employees,kind:relatedEntities,relatedDataClass:Employee, + //fieldType:42,type:EmployeeSelection,inverseName:employer} + //42=Is collection +``` + +#### Example 3 + +Considering the following table properties: + +![](assets/en/API/dataclassAttribute2.png) + + +```4d + var $sequenceNumberAtt : Object + $sequenceNumberAtt=ds.Employee.sequenceNumber + //{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13, + //indexed:true,keyWordIndexed:false,autoFilled:true,mandatory:false,unique:true} +``` + + + + +## .all() + +
    History +| Version | Changes | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Added | +
    + + +**.all** ( { *settings* : Object } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| parámetros | Objeto | -> | Build option: context | +| Resultado | 4D.EntitySelection | <- | References on all entities related to the Dataclass | + + +#### Descripción + +The `.all( )` function queries the datastore to find all the entities related to the dataclass and returns them as an entity selection. + +The entities are returned in the default order, which is initially the order in which they were created. Note however that, if entities have been deleted and new ones added, the default order does not reflect the creation order anymore. + +If no corresponding entity is found, an empty entity selection is returned. + +Lazy loading is applied. + +**parámetros** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propiedad | Tipo | Descripción | +| --------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Ejemplo + +```4d + var $allEmp : cs.EmployeeSelection + $allEmp:=ds.Employee.all() +``` + + + +## .exposed + +
    History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | +
    + + +**.exposed** : Boolean + +#### Descripción + +The `.exposed` property is true if the dataclass is exposed in REST. + + + +## .fromCollection() + +
    History +| Version | Changes | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Added | +
    + +**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection + +| Parameter | Tipo | | Descripción | +| ---------- | ------------------ |:--:| ------------------------------------------------ | +| objectCol | Colección | -> | Collection of objects to be mapped with entities | +| parámetros | Objeto | -> | Build option: context | +| Resultado | 4D.EntitySelection | <- | Entity selection filled from the collection | + + +#### Descripción + +The `.fromCollection()` function updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection. + +In the *objectCol* parameter, pass a collection of objects to create new or update existing entities of the dataclass. The property names must be the same as attribute names in the dataclass. If a property name does not exist in the dataclass, it is ignored. If an attribute value is not defined in the collection, its value is null. + +The mapping between the objects of the collection and the entities is done on the **attribute names** and **matching types**. If an object's property has the same name as an entity's attribute but their types do not match, the entity's attribute is not filled. + +**Create or update mode** + +For each object of *objectCol*: + +* If the object contains a boolean property "\_\_NEW" set to false (or does not contain a boolean "\_\_NEW" property), the entity is updated or created with the corresponding values of the properties from the object. No check is performed in regards to the primary key: + * If the primary key is given and exists, the entity is updated. In this case, the primary key can be given as is or with a "\_\_KEY" property (filled with the primary key value). + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary key is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +* If the object contains a boolean property "\_\_NEW" set to **true**, the entity is created with the corresponding values of the attributes from the object. A check is performed in regards to the primary key: + * If the primary key is given (as is) and exists, an error is sent + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +> The "\_\_KEY" property containing a value is taken into account only when the "\_\_NEW" property is set to **false** (or is omitted) and a corresponding entity exists. In all other cases, the "\_\_KEY" property value is ignored, primary key value must be passed "as is". + +**Related entities** + +The objects of *objectCol* may contain one or more nested object(s) featuring one or more related entities, which can be useful to create or update links between entities. + +The nested objects featuring related entities must contain a "\_\_KEY" property (filled with the primary key value of the related entity) or the primary key attribute of the related entity itself. The use of a \_\_KEY property allows independence from the primary key attribute name. +> The content of the related entities cannot be created / updated through this mechanism. + +**Stamp** + +If a \_\_STAMP attribute is given, a check is performed with the stamp in the datastore and an error can be returned ("Given stamp does not match current one for record# XX of table XXXX"). For more information, see [Entity locking](ORDA/entities.md#entity-locking). + +**parámetros** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propiedad | Tipo | Descripción | +| --------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Ejemplo 1 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is given and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=668 //Existing PK in Employee table + $emp.firstName:="Arthur" + $emp.lastName:="Martin" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Ejemplo 2 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is with the \_\_KEY attribute and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.__KEY:=1720 //Existing PK in Employee table + $emp.firstName:="John" + $emp.lastName:="Boorman" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 3 + +We want to simply create a new entity from a collection: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Victor" + $emp.lastName:="Hugo" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 4 + +We want to create an entity. The \_\_NEW property is True, the employee primary key is not given: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Mary" + $emp.lastName:="Smith" + $emp.employer:=New object("__KEY";121) //Existing PK in the related dataClass Company + $emp.__NEW:=True + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) + + + + + + +``` + +#### Example 5 + +We want to create an entity. The \_\_NEW property is omitted, the employee primary key is given and does not exist: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10000 //Unexisting primary key + $emp.firstName:="Françoise" + $emp.lastName:="Sagan" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 6 + +In this example, the first entity will be created and saved but the second will fail since they both use the same primary key: + +```4d + var $empsCollection : Collection + var $emp; $emp2 : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10001 // Unexisting primary key + $emp.firstName:="Simone" + $emp.lastName:="Martin" + $emp.__NEW:=True + $empsCollection.push($emp) + + $emp2:=New object + $emp2.ID:=10001 // Same primary key, already existing + $emp2.firstName:="Marc" + $emp2.lastName:="Smith" + $emp2.__NEW:=True + $empsCollection.push($emp2) + $employees:=ds.Employee.fromCollection($empsCollection) + //first entity is created + //duplicated key error for the second entity +``` + +#### Ver también + +[**.toCollection()**](EntitySelectionClass.md#tocollection) + + + +## .get() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
    **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity + +| Parameter | Tipo | | Descripción | +| ---------- | --------------- |:--:| ------------------------------------------- | +| primaryKey | Integer OR Text | -> | Primary key value of the entity to retrieve | +| parámetros | Objeto | -> | Build option: context | +| Resultado | 4D.Entity | <- | Entity matching the designated primary key | + +#### Descripción + +The `.get()` function queries the dataclass to retrieve the entity matching the *primaryKey* parameter. + +In *primaryKey*, pass the primary key value of the entity to retrieve. The value type must match the primary key type set in the datastore (Integer or Text). You can also make sure that the primary key value is always returned as Text by using the [`.getKey()`](EntityClass.md#getkey) function with the `dk key as string` parameter. + +If no entity is found with *primaryKey*, a **Null** entity is returned. + +Lazy loading is applied, which means that related data is loaded from disk only when it is required. + +**parámetros** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propiedad | Tipo | Descripción | +| --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Texto | Label for the automatic optimization context applied to the entity. This context will be used by the subsequent code that loads the entity so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + + +#### Ejemplo 1 + +```4d + var $entity : cs.EmployeeEntity + var $entity2 : cs.InvoiceEntity + $entity:=ds.Employee.get(167) // return the entity whose primary key value is 167 + $entity2:=ds.Invoice.get("DGGX20030") // return the entity whose primary key value is "DGGX20030" +``` + +#### Ejemplo 2 + +This example illustrates the use of the *context* property: + +```4d + var $e1; $e2; $e3; $e4 : cs.EmployeeEntity + var $settings; $settings2 : Object + + $settings:=New object("context";"detail") + $settings2:=New object("context";"summary") + + $e1:=ds.Employee.get(1;$settings) + completeAllData($e1) // In completeAllData method, an optimization is triggered and associated to context "detail" + + $e2:=ds.Employee.get(2;$settings) + completeAllData($e2) // In completeAllData method, the optimization associated to context "detail" is applied + + $e3:=ds.Employee.get(3;$settings2) + completeSummary($e3) //In completeSummary method, an optimization is triggered and associated to context "summary" + + $e4:=ds.Employee.get(4;$settings2) + completeSummary($e4) //In completeSummary method, the optimization associated to context "summary" is applied +``` + + + + +## .getDataStore() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getDataStore()** : cs.DataStore +| Parameter | Tipo | | Descripción | +| --------- | ------------ |:--:| -------------------------- | +| Resultado | cs.DataStore | <- | Datastore of the dataclass | + + +#### Descripción + +The `.getDataStore( )` function returns the datastore for the specified dataclass. + +The datastore can be: + +* the main datastore, as returned by the `ds` command. +* a remote datastore, opened using the `Open datastore` command. + + +#### Ejemplo + +The ***SearchDuplicate*** project method searches for duplicated values in any dataclass. + +```4d + var $pet : cs.CatsEntity + $pet:=ds.Cats.all().first() //get an entity + SearchDuplicate($pet;"Dogs") +``` + +```4d + // SearchDuplicate method + // SearchDuplicate(entity_to_search;dataclass_name) + + #DECLARE ($pet : Object ; $dataClassName : Text) + var $dataStore; $duplicates : Object + + $dataStore:=$pet.getDataClass().getDataStore() + $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name) +``` + + + + +## .getInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getInfo()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ---------------------------- | +| Resultado | Objeto | <- | Information on the dataclass | + + +#### Descripción + +The `.getInfo( )` function returns an object providing information about the dataclass. This function is useful for setting up generic code. + +**Returned object** + +| Propiedad | Tipo | Descripción | +| ----------- | ------ | ---------------------------------------- | +| name | Texto | Name of the dataclass | +| primaryKey | Texto | Name of the primary key of the dataclass | +| tableNumber | Entero | Internal 4D table number | + + + +#### Ejemplo 1 + +```4d + #DECLARE ($entity : Object) + var $status : Object + + computeEmployeeNumber($entity) //do some actions on entity + + $status:=$entity.save() + if($status.success) + ALERT("Record updated in table "+$entity.getDataClass().getInfo().name) + End if +``` + +#### Ejemplo 2 + +```4d + var $settings : Object + var $es : cs.ClientsSelection + + $settings:=New object + $settings.parameters:=New object("receivedIds";getIds()) + $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey) + $es:=ds.Clients.query(":pk in :receivedIds";$settings) +``` + +#### Example 3 + +```4d + var $pk : Text + var $dataClassAttribute : Object + + $pk:=ds.Employee.getInfo().primaryKey + $dataClassAttribute:=ds.Employee[$pk] // If needed the attribute matching the primary key is accessible +``` + + + + +## .new() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +**.new()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | --------------------------------- | +| Resultado | 4D.Entity | <- | New entity matching the Dataclass | + + +#### Descripción + +The `.new( )` function creates in memory and returns a new blank entity related to the Dataclass. + +The entity object is created in memory and is not saved in the database until the [`.save( )`](EntityClass.md#save) function is called. If the entity is deleted before being saved, it cannot be recovered. + +**4D Server**: In client-server, if the primary key of the corresponding table is auto-incremented, it will be calculated when the entity is saved on the server. + +All attributes of the entity are initialized with the **null** value. + +> Attributes can be initialized with default values if the **Map NULL values to blank values** option is selected at the 4D database structure level. + +#### Ejemplo + +This example creates a new entity in the "Log" Dataclass and records information in the "info" attribute: + +```4d + var $entity : cs.LogEntity + $entity:=ds.Log.new() //create a reference + $entity.info:="New entry" //store some information + $entity.save() //save the entity +``` + + + + + +## .newSelection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| keepOrder | Entero | -> | `dk keep ordered`: creates an ordered entity selection,
    `dk non ordered`: creates an unordered entity selection (default if omitted) | +| Resultado | 4D.EntitySelection | <- | New blank entity selection related to the dataclass | + + +#### Descripción + +The `.newSelection( )` function creates a new, blank, non-shareable entity selection, related to the dataclass, in memory. + +> For information on non-shareable entity selections, please refer to [this section](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + + +If you want to create an ordered entity selection, pass the `dk keep ordered` selector in the *keepOrder* parameter. By default if you omit this parameter, or if you pass the `dk non ordered` selector, the method creates an unordered entity selection. Unordered entity selections are faster but you cannot rely on entity positions. For more information, please see [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + +When created, the entity selection does not contain any entities (`mySelection.length` returns 0). This method lets you build entity selections gradually by making subsequent calls to the [`add()`](EntitySelectionClass.md#add) function. + + +#### Ejemplo + + +```4d + var $USelection; $OSelection : cs.EmployeeSelection + $USelection:=ds.Employee.newSelection() //create an unordered empty entity selection + $OSelection:=ds.Employee.newSelection(dk keep ordered) //create an ordered empty entity selection +``` + + + + + +## .query() + +
    History +| Version | Changes | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Added | +
    + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ------------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------- | +| queryString | Texto | -> | Search criteria as string | +| formula | Objeto | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Objeto | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Resultado | 4D.EntitySelection | <- | New entity selection made up of entities from dataclass meeting the search criteria specified in *queryString* or *formula* | + + +#### Descripción + +The `.query( )` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s), for all the entities in the dataclass, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. + +If no matching entities are found, an empty `EntitySelection` is returned. + +**queryString parameter** + +The *queryString* parameter uses the following syntax: + +```4d +attributePath|formula comparator value + {logicalOperator attributePath|formula comparator value} + {order by attributePath {desc | asc}} +``` + +where: + +* **attributePath**: path of attribute on which you want to execute the query. This parameter can be a simple name (for example "country") or any valid attribute path (for example "country.name".) In case of an attribute path whose type is `Collection`, \[ ] notation is used to handle all the occurences (for example "children\[ ].age"). You can also use a **placeholder** (see below). +> *You cannot use directly attributes whose name contains special characters such as ".", "\[ ]", or "=", ">", "#"..., because they will be incorrectly evaluated in the query string. If you need to query on such attributes, you must consider using placeholders, which allow an extended range of characters in attribute paths (see* **Using placeholders** *below).* + +* **formula**: a valid formula passed as `Text` or `Object`. The formula will be evaluated for each processed entity and must return a boolean value. Within the formula, the entity is available through the `This` object. + + * **Text**: the formula string must be preceeded by the `eval( )` statement, so that the query parser evaluates the expression correctly. For example: *"eval(length(This.lastname) >=30)"* + * **Object**: the [formula object](FunctionClass.md) is passed as a **placeholder** (see below). The formula must have been created using the [`Formula`](FunctionClass.md#formula) or [`Formula from string`](FunctionClass.md#formula-from-string) command. +> * Keep in mind that 4D formulas only support `&` and `|` symbols as logical operators. +> * If the formula is not the only search criteria, the query engine optimizer could prior process other criteria (e.g. indexed attributes) and thus, the formula could be evaluated for only a subset of entities. + + Formulas in queries can receive parameters through $1. This point is detailed in the **formula parameter** paragraph below. +> * You can also pass directy a `formula` parameter object instead of the `queryString` parameter (recommended when formulas are more complex). See **formula parameter** paragraph below. +> * For security reasons, formula calls within `query()` methods can be disallowed. See `querySettings` parameter description. + +* **comparator**: symbol that compares *attributePath* and *value*. The following symbols are supported: + + | Comparison | Symbol(s) | Comment | + | ------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------- | + | Equal to | =, == | Gets matching data, supports the wildcard (@), neither case-sensitive nor diacritic. | + | | ===, IS | Gets matching data, considers the @ as a standard character, neither case-sensitive nor diacritic | + | Not equal to | #, != | Supports the wildcard (@) | + | | !==, IS NOT | Considers the @ as a standard character | + | Menor que | < | | + | Mayor que | > | | + | Menor o igual que | <= | | + | Mayor o igual que | >= | | + | Included in | IN | Gets data equal to at least one of the values in a collection or in a set of values, supports the wildcard (@) | + | Not condition applied on a statement | NOT | Parenthesis are mandatory when NOT is used before a statement containing several operators | + | Contiene palabra clave | % | Keywords can be used in attributes of string or picture type | + +* **value**: the value to compare to the current value of the property of each entity in the entity selection or element in the collection. It can be a **placeholder** (see **Using placeholders** below) or any expression matching the data type property.

    When using a constant value, the following rules must be respected: + * **text** type constant can be passed with or without simple quotes (see **Using quotes** below). To query a string within a string (a "contains" query), use the wildcard symbol (@) in value to isolate the string to be searched for as shown in this example: "@Smith@". The following keywords are forbidden for text constants: true, false. + * **boolean** type constants: **true** or **false** (case sensitive). + * **numeric** type constants: decimals are separated by a '.' (period). date type constants: "YYYY-MM-DD" format + * **null** constant: using the "null" keyword will find **null** and **undefined** properties. + * in case of a query with an IN comparator, value must be a collection, or values matching the type of the attribute path between \[ ] separated by commas (for strings, " characters must be escaped with "\"). +* **logicalOperator**: used to join multiple conditions in the query (optional). You can use one of the following logical operators (either the name or the symbol can be used): + + | Conjunction | Symbol(s) | + | ----------- | ----------------------- | + | AND | &, &&, and | + | O | |,||, or | + +* **order by attributePath**: you can include an order by *attributePath* statement in the query so that the resulting data will be sorted according to that statement. You can use multiple order by statements, separated by commas (e.g., order by *attributePath1* desc, *attributePath2* asc). By default, the order is ascending. Pass 'desc' to define a descending order and 'asc' to define an ascending order. +> *If you use this statement, the returned entity selection is ordered (for more information, please refer to [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection)). + +**Using quotes** + +When you use quotes within queries, you must use single quotes ' ' inside the query and double quotes " " to enclose the whole query, otherwise an error is returned. Por ejemplo: + +```4d +"employee.name = 'smith' AND employee.firstname = 'john'" +``` +> Single quotes (') are not supported in searched values since they would break the query string. For example "comp.name = 'John's pizza' " will generate an error. If you need to search on values with single quotes, you may consider using placeholders (see below). + +**Using parenthesis** + +You can use parentheses in the query to give priority to the calculation. For example, you can organize a query as follows: + +```4d +"(employee.age >= 30 OR employee.age <= 65) AND (employee.salary <= 10000 OR employee.status = 'Manager')" +``` + + +**Using placeholders** + +4D allows you to use placeholders for *attributePath*, *formula* and *value* arguments within the *queryString* parameter. A placeholder is a parameter that you insert in query strings and that is replaced by another value when the query string is evaluated. The value of placeholders is evaluated once at the beginning of the query; it is not evaluated for each element. + +Two types of placeholders can be used: **indexed placeholders** and **named placeholders**: + +| - | Indexed placeholders | Named placeholders | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Definición | Parameters are inserted as :paramIndex (for example :1, :2...) in queryString and their corresponding values are provided by the sequence of value parameter(s). You can use up to 128 value parameters | Parameters are inserted as :paramName (for example :myparam) and their values are provided in the attributes and/or parameters objects in the querySettings parameter | +| Ejemplo | $r:=class.query(":1=:2";"city";"Chicago") | $o.attributes:=New object("att";"city")
    $o.parameters:=New object("name";"Chicago")
    $r:=class.query(":att=:name";$o) | + +You can mix all argument kinds in *queryString*. A *queryString* can contain, for *attributePath*, *formula* and *value* parameters: + + +* direct values (no placeholders), +* indexed placeholders and/or named placeholders. + +**Using placeholders in queries is recommended** for the following reasons: + +1. It prevents malicious code insertion: if you directly use user-filled variables within the query string, a user could modifiy the query conditions by entering additional query arguments. For example, imagine a query string like: + + ```4d + $vquery:="status = 'public' & name = "+myname //user enters their name + $result:=$col.query($vquery) + ``` + + This query seems secured since non-public data are filtered. However, if the user enters in the *myname* area something like *"smith OR status='private'*, the query string would be modified at the interpretation step and could return private data. + + When using placeholders, overriding security conditions is not possible: + + ```4d + $result:=$col.query("status='public' & name=:1";myname) + ``` + + In this case if the user enters *smith OR status='private'* in the *myname* area, it will not be interpreted in the query string, but only passed as a value. Looking for a person named "smith OR status='private'" will just fail. + +2. It prevents having to worry about formatting or character issues, especially when handling *attributePath* or *value* parameters that might contain non-alphanumeric characters such as ".", "['... + +3. It allows the use of variables or expressions in query arguments. Ejemplos: + + ```4d + $result:=$col.query("address.city = :1 & name =:2";$city;$myVar+"@") + $result2:=$col.query("company.name = :1";"John's Pizzas") + ``` + +**Looking for null values** + +When you look for null values, you cannot use the placeholder syntax because the query engine considers null as an unexpected comparison value. For example, if you execute the following query: + +```4d +$vSingles:=ds.Person.query("spouse = :1";Null) // will NOT work +``` + +You will not get the expected result because the null value will be evaluated by 4D as an error resulting from the parameter evaluation (for example, an attribute coming from another query). For these kinds of queries, you must use the direct query syntax: + +```4d + $vSingles:=ds.Person.query("spouse = null") //correct syntax +``` + + +**Linking collection attribute query arguments** + +When searching in collections within object attributes using multiple query arguments joined by the AND operator, you may want to make sure that only entities containing elements that match all arguments are returned, and not entities where arguments can be found in different elements. To do this, you need to link query arguments to collection elements, so that only single elements containing linked arguments are found. + +For example, with the following two entities: + +``` +Entity 1: +ds.People.name: "martin" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"paris" + } ] } + +Entity 2: +ds.People.name: "smith" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"lyon" + } , { + "kind":"office", + "city":"paris" + } ] } +``` + +You want to find people with a "home" location kind in the city "paris". If you write: + +```4d +ds.People.query("places.locations[].kind= :1 and places.locations[].city= :2";"home";"paris") +``` + +... the query will return "martin" **and** "smith" because "smith" has a "locations" element whose "kind" is "home" and a "locations" element whose "city" is "paris", even though they are different elements. + +If you want to only get entities where matching arguments are in the same collection element, you need to **link arguments**. To link query arguments: + +- Add a letter between the \[] in the first path to link and repeat the same letter in all linked arguments. For example: `locations[a].city and locations[a].kind`. You can use any letter of the Latin alphabet (not case sensitive). +- To add different linked criteria in the same query, use another letter. You can create up to 26 combinations of criteria in a single query. + +With the above entities, if you write: + +```4d +ds.People.query("places.locations[a].kind= :1 and places.locations[a].city= :2";"home";"paris") +``` + +... the query will only return "martin" because it has a "locations" element whose "kind" is "home" and whose "city" is "paris". The query will not return "smith" because the values "home" and "paris" are not in the same collection element. + + + +**formula parameter** + +As an alternative to formula insertion within the *queryString* parameter (see above), you can pass directly a formula object as a boolean search criteria. Using a formula object for queries is **recommended** since you benefit from tokenization, and code is easier to search/read. + +The formula must have been created using the `Formula` or `Formula from string` command. In this case: + +* the *formula* is evaluated for each entity and must return true or false. During the execution of the query, if the formula's result is not a boolean, it is considered as false. +* within the *formula*, the entity is available through the `This` object. +* if the `Formula` object is **null**, the errror 1626 ("Expecting a text or formula") is generated, that you call intercept using a method installed with `ON ERR CALL`. +> For security reasons, formula calls within `query(`) member methods can be disallowed. See *querySettings* parameter description. + +**Passing parameters to formulas** + +Any *formula* called by the `query()` class function can receive parameters: + +* Parameters must be passed through the **args** property (object) of the *querySettings* parameter. +* The formula receives this **args** object as a **$1** parameter. + +This small code shows the principles of how parameter are passed to methods: + +```4d + $settings:=New object("args";New object("exclude";"-")) //args object to pass parameters + $es:=ds.Students.query("eval(checkName($1.exclude))";$settings) //args is received in $1 +``` + +Additional examples are provided in example 3. + +**4D Server**: In client/server, formulas are executed on the server. In this context, only the `querySettings.args` object is sent to the formulas. + + + +**querySettings parameter** + +In the *querySettings* parameter, you can pass an object containing additional options. The following properties are supported: + +| Propiedad | Tipo | Descripción | +| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| parameters | Objeto | **Named placeholders for values** used in the *queryString* or *formula*. Values are expressed as property / value pairs, where property is the placeholder name inserted for a value in the *queryString* or *formula* (":placeholder") and value is the value to compare. You can mix indexed placeholders (values directly passed in value parameters) and named placeholder values in the same query. | +| attributes | Objeto | **Named placeholders for attribute paths** used in the *queryString* or *formula*. Attributes are expressed as property / value pairs, where property is the placeholder name inserted for an attribute path in the *queryString* or *formula* (":placeholder"), and value can be a string or a collection of strings. Each value is a path that can designate either a scalar or a related attribute of the dataclass or a property in an object field of the dataclass

    TipoDescripción
    CadenaattributePath expressed using the dot notation, e.g. "name" or "user.address.zipCode"
    Collection of stringsEach string of the collection represents a level of attributePath, e.g. \["name"] or \["user","address","zipCode"]. Using a collection allows querying on attributes with names that are not compliant with dot notation, e.g. \["4Dv17.1","en/fr"]
    You can mix indexed placeholders (values directly passed in *value* parameters) and named placeholder values in the same query. | +| args | Objeto | Parameter(s) to pass to formulas, if any. The **args** object will be received in $1 within formulas and thus its values will be available through *$1.property* (see example 3). | +| allowFormulas | Booleano | True to allow the formula calls in the query (default). Pass false to disallow formula execution. If set to false and `query()` is given a formula, an error is sent (1278 - Formula not allowed in this member method). | +| context | Texto | Label for the automatic optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is designed for client/server processing; for more information, please refer to the **Client/server optimization** section. | +| queryPlan | Booleano | In the resulting entity selection, returns or does not return the detailed description of the query just before it is executed, i.e. the planned query. The returned property is an object that includes each planned query and subquery (in the case of a complex query). This option is useful during the development phase of an application. It is usually used in conjunction with queryPath. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | +| queryPath | Booleano | In the resulting entity selection, returns or does not return the detailed description of the query as it is actually performed. The returned property is an object that contains the actual path used for the query (usually identical to that of the queryPlan, but may differ if the engine manages to optimize the query), as well as the processing time and the number of records found. This option is useful during the development phase of an application. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | + +**About queryPlan and queryPath** + +The information recorded in `queryPlan`/`queryPath` include 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(s). 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. + +For example, if you execute the following query: + +```4d + $sel:=ds.Employee.query("salary < :1 and employer.name = :2 or employer.revenues > :3";\ + 50000;"Lima West Kilo";10000000;New object("queryPath";True;"queryPlan";True)) +``` + +queryPlan: + +```4d +{Or:[{And:[{item:[index : Employee.salary ] < 50000}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.name ] = Lima West Kilo}]}]}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.revenues ] > 10000000}]}]} +``` + +queryPath: + +```4d +{steps:[{description:OR,time:63,recordsfounds:1388132, + steps:[{description:AND,time:32,recordsfounds:131, + steps:[{description:[index : Employee.salary ] < 50000,time:16,recordsfounds:728260},{description:Join on Table : Company : Employee.employerID = Company.ID,time:0,recordsfounds:131, + steps:[{steps:[{description:[index : Company.name ] = Lima West Kilo,time:0,recordsfounds:1}]}]}]},{description:Join on Table : Company : Employee.employerID = Company.ID,time:31,recordsfounds:1388132, + steps:[{steps:[{description:[index : Company.revenues ] > 10000000,time:0,recordsfounds:933}]}]}]}]} +``` + +#### Ejemplo 1 + +This section provides various examples of queries. + +Query on a string: + +```4d +$entitySelection:=ds.Customer.query("firstName = 'S@'") +``` + +Query with a NOT statement: + +```4d +$entitySelection:=ds.Employee.query("not(firstName=Kim)") +``` + +Queries with dates: + +```4d +$entitySelection:=ds.Employee.query("birthDate > :1";"1970-01-01") +$entitySelection:=ds.Employee.query("birthDate <= :1";Current date-10950) +``` + +Query with indexed placeholders for values: + +```4d +$entitySelection:=ds.Customer.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@") +``` + +Query with indexed placeholders for values on a related dataclass: + +```4d +$entitySelection:=ds.Employee.query("lastName = :1 and manager.lastName = :2";"M@";"S@") +``` + +Query with indexed placeholder including a descending order by statement: + +```4d +$entitySelection:=ds.Student.query("nationality = :1 order by campus.name desc, lastname";"French") +``` + +Query with named placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings:=New object +$querySettings.parameters:=New object("userId";1234;"extraInfo";New object("name";"Smith")) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name = :extraInfo.name";$querySettings) +``` + +Query that uses both named and indexed placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings.parameters:=New object("userId";1234) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name=:1";"Smith";$querySettings) +``` + +Query with queryPlan and queryPath objects: + +```4d +$entitySelection:=ds.Employee.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@";New object("queryPlan";True;"queryPath";True)) + + //you can then get these properties in the resulting entity selection +var $queryPlan; $queryPath : Object +$queryPlan:=$entitySelection.queryPlan +$queryPath:=$entitySelection.queryPath +``` + +Query with an attribute path of Collection type: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[].name = :1";"horsebackriding") +``` + +Query with an attribute path of Collection type and linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and extraInfo.hobbies[a].level=:2";"horsebackriding";2) +``` + +Query with an attribute path of Collection type and multiple linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and + extraInfo.hobbies[a].level = :2 and extraInfo.hobbies[b].name = :3 and + extraInfo.hobbies[b].level = :4";"horsebackriding";2;"Tennis";5) +``` + +Query with an attribute path of Object type: + +```4d +$entitySelection:=ds.Employee.query("extra.eyeColor = :1";"blue") +``` + +Query with an IN statement: + +```4d +$entitySelection:=ds.Employee.query("firstName in :1";New collection("Kim";"Dixie")) +``` + +Query with a NOT (IN) statement: + +```4d +$entitySelection:=ds.Employee.query("not (firstName in :1)";New collection("John";"Jane")) +``` + +Query with indexed placeholders for attributes: + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Employee.query(":1 = 1234 and :2 = 'Smith'";"salesperson.userId";"name") + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and named placeholders for values: + +```4d +var $es : cs.EmployeeSelection +var $querySettings : Object +$querySettings:=New object +$querySettings.parameters:=New object("customerName";"Smith") +$es:=ds.Customer.query(":1 = 1234 and :2 = :customerName";"salesperson.userId";"name";$querySettings) + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and values: + + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Clients.query(":1 = 1234 and :2 = :3";"salesperson.userId";"name";"Smith") + //salesperson is a related entity +``` + +#### Ejemplo 2 + +This section illustrates queries with named placeholders for attributes. + +Given an Employee dataclass with 2 entities: + +Entity 1: + +```4d +name: "Marie" +number: 46 +softwares:{ +"Word 10.2": "Installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Entity 2: + +```4d +name: "Sophie" +number: 47 +softwares:{ +"Word 10.2": "Not installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Query with named placeholders for attributes: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + $querySettings:=New object + $querySettings.attributes:=New object("attName";"name";"attWord";New collection("softwares";"Word 10.2")) + $es:=ds.Employee.query(":attName = 'Marie' and :attWord = 'Installed'";$querySettings) + //$es.length=1 (Employee Marie) +``` + +Query with named placeholders for attributes and values: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + var $name : Text + $querySettings:=New object + //Named placeholders for values + //The user is asked for a name + $name:=Request("Please enter the name to search:") + If(OK=1) + $querySettings.parameters:=New object("givenName";$name) + //Named placeholders for attribute paths + $querySettings.attributes:=New object("attName";"name") + $es:=ds.Employee.query(":attName= :givenName";$querySettings) + End if +``` + +#### Example 3 + +These examples illustrate the various ways to use formulas with or without parameters in your queries. + +The formula is given as text with `eval()` in the *queryString* parameter: + +```4d + var $es : cs.StudentsSelection + $es:=ds.Students.query("eval(length(This.lastname) >=30) and nationality='French'") +``` + +The formula is given as a `Formula` object through a placeholder: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query(":1 and nationality='French'";$formula) +``` + +Only a `Formula` object is given as criteria: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query($formula) +``` + +Several formulas can be applied: + +```4d + var $formula1; $1; $formula2 ;$0 : Object + $formula1:=$1 + $formula2:=Formula(Length(This.firstname)>=30) + $0:=ds.Students.query(":1 and :2 and nationality='French'";$formula1;$formula2) +``` + + +A text formula in *queryString* receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query("eval(checkName($1.filter)) and nationality=:1";"French";$settings) +``` + +```4d + //checkName method + #DECLARE($exclude : Text) -> $result : Boolean + $result:=(Position($exclude;This.lastname)=0) +``` + +Using the same ***checkName*** method, a `Formula` object as placeholder receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings; $formula : Object + $formula:=Formula(checkName($1.filter)) + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) + $settings.args.filter:="*" // change the parameters without updating the $formula object + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) +``` + +We want to disallow formulas, for example when the user enters their query: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + var $queryString : Text + $queryString:=Request("Enter your query:") + if(OK=1) + $settings:=New object("allowFormulas";False) + $es:=ds.Students.query($queryString;$settings) //An error is raised if $queryString contains a formula + End if +``` + +#### Ver también + +[`.query()`](EntitySelectionClass.md#query) for entity selections + + diff --git a/website/translated_docs/es/API/DataStoreClass.md b/website/translated_docs/es/API/DataStoreClass.md new file mode 100644 index 00000000000000..22e1b8404e5687 --- /dev/null +++ b/website/translated_docs/es/API/DataStoreClass.md @@ -0,0 +1,788 @@ +--- +id: DataStoreClass +title: DataStore +--- + +A [Datastore](ORDA/dsMapping.md#datastore) is the interface object provided by ORDA to reference and access a database. `Datastore` objects are returned by the following commands: + +* [ds](#ds): a shortcut to the main datastore +* [Open datastore](#open-datastore): to open any remote datastore + +### Summary + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cancelTransaction()**](#canceltransaction)

        cancels the transaction | +| [***.dataclassName*** : 4D.DataClass](#dataclassname)

        contains a description of the dataclass | +| [**.encryptionStatus()**: Object](#encryptionstatus)

        returns an object providing the encryption status for the current data file | +| [**.getInfo()**: Object](#getinfo)

        returns an object providing information about the datastore | +| [**.getRequestLog()** : Collection](#getrequestlog)

        returns the ORDA requests logged in memory on the client side | +| [**.makeSelectionsAlterable()**](#makeselectionsalterable)

        sets all entity selections as alterable by default in the current application datastores | +| [**.provideDataKey**( *curPassPhrase* : Text ) : Object
    **.provideDataKey**( *curDataKey* : Object ) : Object ](#providedatakey)

        allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data | +| [**.setAdminProtection**( *status* : Boolean )](#setadminprotection)

        allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions | +| [**.startRequestLog**()
    **.startRequestLog**( *file* : 4D.File )
    **.startRequestLog**( *reqNum* : Integer )](#startrequestlog)

        starts the logging of ORDA requests on the client side | +| [**.startTransaction()**](#starttransaction)

        starts a transaction in the current process on the database matching the datastore to which it applies | +| [**.stopRequestLog()** ](#stoprequestlog)

        stops any logging of ORDA requests on the client side | +| [**.validateTransaction()** ](#validatetransaction)

        accepts the transaction | + + + + + +## ds + +

    History +| Version | Changes | +| ------- | ---------------------------- | +| v18 | Support of localID parameter | +| v17 | Added | +
    + +**ds** { ( *localID* : Text ) } : cs.DataStore +| Parameter | Tipo | | Descripción | +| --------- | ------------ | -- | ------------------------------------------ | +| localID | Texto | -> | Local ID of the remote datastore to return | +| Resultado | cs.DataStore | <- | Reference to the datastore | + + +#### Descripción + +The `ds` command returns a reference to the datastore matching the current 4D database or the database designated by *localID*. + +If you omit the *localID* parameter (or pass an empty string ""), the command returns a reference to the datastore matching the local 4D database (or the 4D Server database in case of opening a remote database on 4D Server). The datastore is opened automatically and available directly through `ds`. + +You can also get a reference on an open remote datastore by passing its local id in the *localID* parameter. The datastore must have been previously opened with the [`Open datastore`](#open-datastore) command by the current database (host or component). The local id is defined when using this command. +> The scope of the local id is the database where the datastore has been opened. + +If no *localID* datastore is found, the command returns **Null**. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +#### Ejemplo 1 + +Using the main datastore on the 4D database: + +```4d + $result:=ds.Employee.query("firstName = :1";"S@") +``` + +#### Ejemplo 2 + +```4d + var $connectTo; $firstFrench; $firstForeign : Object + + var $frenchStudents; $foreignStudents : cs.DataStore + + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + //... + //... + $firstFrench:=getFirst("french";"Students") + $firstForeign:=getFirst("foreign";"Students") +``` + +```4d + //getFirst method + //getFirst(localID;dataclass) -> entity + #DECLARE( $localId : Text; $dataClassName : Text ) -> $entity : 4D.Entity + + $0:=ds($localId)[$dataClassName].all().first() +``` + + + + +## Open datastore + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**Open datastore**( *connectionInfo* : Object ; *localID* : Text ) : cs.DataStore +| Parameter | Tipo | | Descripción | +| -------------- | ------------ | -- | ------------------------------------------------------------------------- | +| connectionInfo | Objeto | -> | Connection properties used to reach the remote datastore | +| localID | Texto | -> | Id to assign to the opened datastore on the local application (mandatory) | +| Resultado | cs.DataStore | <- | Datastore object | + + +#### Descripción + +The `Open datastore` command connects the application to the 4D database identified by the *connectionInfo* parameter and returns a matching `cs.DataStore` object associated with the *localID* local alias. + +The *connectionInfo* 4D database must be available as a remote datastore, i.e.: + +* its web server must be launched with http and/or https enabled, +* its [**Expose as REST server**](REST/configuration.md#starting-the-rest-server) option must be checked, +* at least one client license is available. + +If no matching database is found, `Open datastore` returns **Null**. + +*localID* is a local alias for the session opened on remote datastore. If *localID* already exists on the application, it is used. Otherwise, a new *localID* session is created when the datastore object is used. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +Once the session is opened, the following statements become equivalent and return a reference on the same datastore object: + +```4d + $myds:=Open datastore(connectionInfo;"myLocalId") + $myds2:=ds("myLocalId") + //$myds and $myds2 are equivalent +``` + +Pass in *connectionInfo* an object describing the remote datastore you want to connect to. It can contain the following properties (all properties are optional except *hostname*): + +| Propiedad | Tipo | Descripción | +| ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hostname | Text | Name or IP address of the remote database + ":" + port number (port number is mandatory) | +| user | Text | User name | +| password | Text | User password | +| idleTimeout | Longint | Inactivity session timeout (in minutes), after which the session is automatically closed by 4D. If omitted, default value is 60 (1h). The value cannot be < 60 (if a lower value is passed, the timeout is set to 60). For more information, see **Closing sessions**. | +| tls | Boolean | Use secured connection(*). If omitted, false by default. Using a secured connection is recommended whenever possible. | +| type | Text | Must be "4D Server" | + +(*) If tls is true, the HTTPS protocol is used if: + +* HTTPS is enabled on the remote datastore +* the given port is the right HTTPS port configured in the database settings +* a valid certificate and private encryption key are installed in the database. Otherwise, error "1610 - A remote request to host xxx has failed" is raised + +#### Ejemplo 1 + +Connection to a remote datastore without user / password: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Ejemplo 2 + +Connection to a remote datastore with user / password / timeout / tls: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";\"192.168.18.11:4443";\ + "user";"marie";"password";$pwd;"idleTimeout";70;"tls";True) + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 3 + +Working with several remote datastores: + +```4d + var $connectTo : Object + var $frenchStudents; $foreignStudents : cs.DataStore + $connectTo:=New object("hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + ALERT("They are "+String($frenchStudents.Students.all().length)+" French students") + ALERT("They are "+String($foreignStudents.Students.all().length)+" foreign students") +``` + +#### Error management + +In case of error, the command returns **Null**. If the remote datastore cannot be reached (wrong address, web server not started, http and https not enabled...), error 1610 "A remote request to host XXX has failed" is raised. You can intercept this error with a method installed by `ON ERR CALL`. + + + +## *.dataclassName* + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +***.dataclassName*** : 4D.DataClass + +#### Descripción + +Each dataclass in a datastore is available as a property of the [DataStore object](ORDA/dsMapping.md#datastore)data. The returned object contains a description of the dataclass. + + +#### Ejemplo + +```4d + var $emp : cs.Employee + var $sel : cs.EmployeeSelection + $emp:=ds.Employee //$emp contains the Employee dataclass + $sel:=$emp.all() //gets an entity selection of all employees + + //you could also write directly: + $sel:=ds.Employee.all() +``` + + + + + + +## .cancelTransaction() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + + +**.cancelTransaction()** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.cancelTransaction()` function cancels the transaction opened by the [`.startTransaction()`](#starttransaction) function at the corresponding level in the current process for the specified datastore. + +The `.cancelTransaction()` function cancels any changes made to the data during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using the [`.validateTransaction()`](#validatetransactions) function. + + +#### Ejemplo + +See example for the [`.startTransaction()`](#starttransaction) function. + + + + + +## .encryptionStatus() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.encryptionStatus()**: Object + +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------------------------------------------------------------- | +| Resultado | Objeto | <- | Information about the encryption of the current datastore and of each table | + + +#### Descripción + +The `.encryptionStatus()` function returns an object providing the encryption status for the current data file (i.e., the data file of the `ds` datastore). The status for each table is also provided. +> Use the `Data file encryption status` command to determine the encryption status of any other data file. + + +**Returned value** + +The returned object contains the following properties: + +| Propiedad | | | Tipo | Descripción | +| ----------- | ----------- | ------------- | -------- | ---------------------------------------------------------------------------------- | +| isEncrypted | | | Booleano | True if the data file is encrypted | +| keyProvided | | | Booleano | True if the encryption key matching the encrypted data file is provided(*). | +| tablas | | | Objeto | Object containing as many properties as there are encryptable or encrypted tables. | +| | *tableName* | | Objeto | Encryptable or Encrypted table | +| | | name | Texto | Name of the table | +| | | num | Número | Table number | +| | | isEncryptable | Booleano | True if the table is declared encryptable in the structure file | +| | | isEncrypted | Booleano | True if the records of the table are encrypted in the data file | + +(*) The encryption key can be provided: + +* with the `.provideDataKey()` command, +* at the root of a connected device before opening the datastore, +* with the `Discover data key` command. + +#### Ejemplo + +You want to know the number of encrypted tables in the current data file: + +```4d + var $status : Object + + $status:=dataStore.encryptionStatus() + + If($status.isEncrypted) //the database is encrypted + C_LONGINT($vcount) + C_TEXT($tabName) + For each($tabName;$status.tables) + If($status.tables[$tabName].isEncrypted) + $vcount:=$vcount+1 + End if + End for each + ALERT(String($vcount)+" encrypted table(s) in this datastore.") + Else + ALERT("This database is not encrypted.") + End if +``` + + + + +## .getInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.getInfo()**: Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| -------------------- | +| Resultado | Objeto | <- | Datastore properties | + +#### Descripción + +The `.getInfo()` function returns an object providing information about the datastore. This function is useful for setting up generic code. + +**Returned object** + +| Propiedad | Tipo | Descripción | +| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | cadena |
  • "4D": main datastore, available through ds
  • "4D Server": remote datastore, open with Open datastore
  • | +| networked | booleano |
  • True: the datastore is reached through a network connection.
  • False: the datastore is not reached through a network connection (local database)
  • | +| localID | texto | ID of the datastore on the machine. Corresponds to the localId string given with the `Open datastore` command. Empty string ("") for main datastore. | +| connection | objeto | Object describing the remote datastore connection (not returned for main datastore). Available properties:

    PropiedadTipoDescripción
    hostnametextoIP address or name of the remote datastore + ":" + port number
    tlsbooleanoTrue if secured connection is used with the remote datastore
    idleTimeoutnumberSession inactivity timeout (in minutes)
    usertextoUser authenticated on the remote datastore
    | + +* If the `.getInfo()` function is executed on a 4D Server or 4D single-user, `networked` is False. +* If the `.getInfo()` function is executed on a remote 4D, `networked` is True + + +#### Ejemplo 1 + +```4d + var $info : Object + + $info:=ds.getInfo() //Executed on 4D Server or 4D + //{"type":"4D","networked":false,"localID":""} + + $info:=ds.getInfo() // Executed on 4D remote + //{"type":"4D","networked":true,"localID":""} +``` + +#### Ejemplo 2 + +On a remote datastore: + +```4d + var $remoteDS : cs.DataStore + var $info; $connectTo : Object + + $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa") + $remoteDS:=Open datastore($connectTo;"students") + $info:=$remoteDS.getInfo() + + //{"type":"4D Server", + //"localID":"students", + //"networked":true, + //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}} +``` + + + + + +## .getRequestLog() + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
    + +**.getRequestLog()** : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------------------ | +| Resultado | Colección | <- | Collection of objects, where each object describes a request | + + +#### Descripción + +The `.getRequestLog()` function returns the ORDA requests logged in memory on the client side. The ORDA request logging must have previously been enabled using the [`.startRequestLog()`](#startrequestlog) function. + +This function must be called on a remote 4D, otherwise it returns an empty collection. It is designed for debugging purposes in client/server configurations. + +**Returned value** + +Collection of stacked request objects. The most recent request has index 0. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + + +#### Ejemplo + +See Example 2 of [`.startRequestLog()`](#startrequestlog). + + + +## .isAdminProtected() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.isAdminProtected()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ------------------------------------------------------------------------------ | +| Resultado | Booleano | <- | True if the Data Explorer access is disabled, False if it is enabled (default) | + + +#### Descripción + +The `.isAdminProtected()` function returns `True` if [Data Explorer](Admin/dataExplorer.md) access has been disabled for the working session. + +By default, the Data Explorer access is granted for `webAdmin` sessions, but it can be disabled to prevent any data access from administrators (see the [`.setAdminProtection()`](#setadminprotection) function). + +#### Ver también + +[`.setAdminProtection()`](#setadminprotection) + + + + + +## .makeSelectionsAlterable() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.makeSelectionsAlterable()** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.makeSelectionsAlterable()` function sets all entity selections as alterable by default in the current application datastores (including [remote datastores](ORDA/remoteDatastores.md)). It is intended to be used once, for example in the `On Startup` database method. + +When this function is not called, new entity selections can be shareable, depending on the nature of their "parent", or [how they are created](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + +> This function does not modify entity selections created by [`.copy()`](#copy) or `OB Copy` when the explicit `ck shared` option is used. + + +> **Compatibility**: This function must only be used in projects converted from 4D versions prior to 4D v18 R5 and containing [.add()](EntitySelectionClass.md#add) calls. In this context, using `.makeSelectionsAlterable()` can save time by restoring instantaneously the previous 4D behavior in existing projects. On the other hand, using this method in new projects created in 4D v18 R5 and higher **is not recommended**, since it prevents entity selections to be shared, which provides greater performance and scalabitlity. + + + + +## .provideDataKey() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.provideDataKey**( *curPassPhrase* : Text ) : Object
    **.provideDataKey**( *curDataKey* : Object ) : Object + +| Parameter | Tipo | | Descripción | +| ------------- | ------ | -- | ------------------------------------- | +| curPassPhrase | Texto | -> | Current encryption passphrase | +| curDataKey | Objeto | -> | Current data encryption key | +| Resultado | Objeto | <- | Result of the encryption key matching | + + +#### Descripción + +The `.provideDataKey()` function allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data. This function can be used when opening an encrypted database, or when executing any encryption operation that requires the encryption key, such as re-encrypting the data file. +> * The `.provideDataKey()` function must be called in an encrypted database. If it is called in a non-encrypted database, the error 2003 (the encryption key does not match the data.) is returned. Use the `Data file encryption status` command to determine if the database is encrypted. +> * The `.provideDataKey()` function cannot be called from a remote 4D or an encrypted remote datastore. + +If you use the *curPassPhrase* parameter, pass the string used to generate the data encryption key. When you use this parameter, an encryption key is generated. + +If you use the *curDataKey* parameter, pass an object (with *encodedKey* property) that contains the data encryption key. This key may have been generated with the `New data key` command. + +If a valid data encryption key is provided, it is added to the *keyChain* in memory and the encryption mode is enabled: + +* all data modifications in encryptable tables are encrypted on disk (.4DD, .journal. 4Dindx files) +* all data loaded from encryptable tables is decrypted in memory + + +**Resultado** + +The result of the command is described in the returned object: + +| Propiedad | | Tipo | Descripción | +| ---------- | ------------------------ | --------- | ------------------------------------------------------------------------------- | +| success | | Booleano | True if the provided encryption key matches the encrypted data, False otherwise | +| | | | Properties below are returned only if success is *FALSE* | +| status | | Número | Error code (4 if the provided encryption key is wrong) | +| statusText | | Texto | Error message | +| errors | | Colección | Stack of errors. The first error has the highest index | +| | \[ ].componentSignature | Texto | Internal component name | +| | \[ ].errCode | Número | Error number | +| | \[ ].message | Texto | Error message | + +If no *curPassphrase* or *curDataKey* is given, `.provideDataKey()` returns **null** (no error is generated). + + + +#### Ejemplo + +```4d + var $keyStatus : Object + var $passphrase : Text + + $passphrase:=Request("Enter the passphrase") + If(OK=1) + $keyStatus:=ds.provideDataKey($passphrase) + If($keyStatus.success) + ALERT("You have provided a valid encryption key") + Else + ALERT("You have provided an invalid encryption key, you will not be able to work with encrypted data") + End if + End if +``` + + + + +## .setAdminProtection() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.setAdminProtection**( *status* : Boolean ) + +| Parameter | Tipo | | Descripción | +| --------- | -------- | -- | ---------------------------------------------------------------------------------------------------- | +| status | Booleano | -> | True to disable Data Explorer access to data on the `webAdmin` port, False (default) to grant access | + + +#### Descripción + +The `.setAdminProtection()` function allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions. + +By default when the function is not called, access to data is always granted on the web administration port for a session with `WebAdmin` privilege using the Data Explorer. In some configurations, for example when the application server is hosted on a third-party machine, you might not want the administrator to be able to view your data, although they can edit the server configuration, including the [access key](Admin/webAdmin.md#access-key) settings. + +In this case, you can call this function to disable the data access from Data Explorer on the web admin port of the machine, even if the user session has the `WebAdmin` privilege. When this function is executed, the data file is immediately protected and the status is stored on disk: the data file will be protected even if the application is restarted. + + +#### Ejemplo + +You create a *protectDataFile* project method to call before deployments for example: + +```4d + ds.setAdminProtection(True) //Disables the Data Explorer data access +``` + +#### Ver también + +[`.isAdminProtected()`](#isadminprotected) + + + +## .startRequestLog() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
    + +**.startRequestLog**()
    **.startRequestLog**( *file* : 4D.File )
    **.startRequestLog**( *reqNum* : Integer ) + +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | ------------------------------------ | +| file | 4D.File | -> | File object | +| reqNum | Entero | -> | Number of requests to keep in memory | + + +#### Descripción + +The `.startRequestLog()` function starts the logging of ORDA requests on the client side. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + +The ORDA request log can be sent to a file or to memory, depending on the parameter type: + +* If you passed a *file* object created with the `File` command, the log data is written in this file as a collection of objects (JSON format). Each object represents a request.
    If the file does not already exist, it is created. Otherwise if the file already exists, the new log data is appended to it. If `.startRequestLog( )` is called with a file while a logging was previously started in memory, the memory log is stopped and emptied. +> A \] character must be manually appended at the end of the file to perform a JSON validation + +* If you passed a *reqNum* integer, the log in memory is emptied (if any) and a new log is initialized. It will keep *reqNum* requests in memory until the number is reached, in which case the oldest entries are emptied (FIFO stack).
    If `.startRequestLog()` is called with a *reqNum* while a logging was previously started in a file, the file logging is stopped. + +* If you did not pass any parameter, the log is started in memory. If `.startRequestLog()` was previously called with a *reqNum* (before a `.stopRequestLog()`), the log data is stacked in memory until the next time the log is emptied or `.stopRequestLog()` is called. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + +#### Ejemplo 1 + +You want to log ORDA client requests in a file and use the log sequence number: + +```4d + var $file : 4D.File + var $e : cs.PersonsEntity + + $file:=File("/LOGS/ORDARequests.txt") //logs folder + + SET DATABASE PARAMETER(Client Log Recording;1) //to trigger the global log sequence number + ds.startRequestLog($file) + $e:=ds.Persons.get(30001) //send a request + ds.stopRequestLog() + SET DATABASE PARAMETER(Client Log Recording;0) +``` + +#### Ejemplo 2 + +You want to log ORDA client requests in memory: + +```4d + var $es : cs.PersonsSelection + var $log : Collection + + ds.startRequestLog(3) //keep 3 requests in memory + + $es:=ds.Persons.query("name=:1";"Marie") + $es:=ds.Persons.query("name IN :1";New collection("Marie")) + $es:=ds.Persons.query("name=:1";"So@") + + $log:=ds.getRequestLog() + ALERT("The longest request lasted: "+String($log.max("duration"))+" ms") +``` + + + + + +## .startTransaction() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**.startTransaction()** +| Parameter | Tipo | | Descripción | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.startTransaction()` function starts a transaction in the current process on the database matching the datastore to which it applies. Any changes made to the datastore's entities in the transaction's process are temporarily stored until the transaction is either validated or cancelled. +> If this method is called on the main datastore (i.e. the datastore returned by the `ds` command), the transaction is applied to all operations performed on the main datastore and on the underlying database, thus including ORDA and classic languages. + +You can nest several transactions (sub-transactions). Each transaction or sub-transaction must eventually be cancelled or validated. Note that if the main transaction is cancelled, all of its sub-transactions are also cancelled even if they were validated individually using the `.validateTransaction()` function. + + +#### Ejemplo + + +```4d + var $connect; $status : Object + var $person : cs.PersonsEntity + var $ds : cs.DataStore + var $choice : Text + var $error : Boolean + + Case of + :($choice="local") + $ds:=ds + :($choice="remote") + $connect:=New object("hostname";"111.222.3.4:8044") + $ds:=Open datastore($connect;"myRemoteDS") + End case + + $ds.startTransaction() + $person:=$ds.Persons.query("lastname=:1";"Peters").first() + + If($person#Null) + $person.lastname:="Smith" + $status:=$person.save() + End if + ... + ... + If($error) + $ds.cancelTransaction() + Else + $ds.validateTransaction() + End if +``` + + + + + + + +## .stopRequestLog() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
    + +**.stopRequestLog()** +| Parameter | Tipo | | Descripción | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.stopRequestLog()` function stops any logging of ORDA requests on the client side (in file or in memory). It is particularly useful when logging in a file, since it actually closes the opened document on disk. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + + +#### Ejemplo + +See examples for [`.startRequestLog()`](#startrequestlog). + + + + + +## .validateTransaction() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**.validateTransaction()** +| Parameter | Tipo | | Descripción | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.validateTransaction()` function accepts the transaction that was started with [`.startTransaction()`](#starttransaction) at the corresponding level on the specified datastore. + +The function saves the changes to the data on the datastore that occurred during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using this function. + + +#### Ejemplo + +See example for [`.startTransaction()`](#starttransaction). + + + diff --git a/website/translated_docs/es/API/Directory.md b/website/translated_docs/es/API/Directory.md new file mode 100644 index 00000000000000..f4db51684dc811 --- /dev/null +++ b/website/translated_docs/es/API/Directory.md @@ -0,0 +1,599 @@ +--- +id: Directory +title: Directory Class +--- + +## Descripción + + +## .creationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationDate** : Date + +#### Descripción + +The `.creationDate` property returns the creation date of the folder. + +This property is **read-only**. + + +--- + + ## .creationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationTime** : Time + + +#### Descripción + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + +--- + + +## .exists + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.exists** : Boolean + +#### Descripción + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +This property is **read-only**. + + + +--- + + +## .extension + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.extension** : Text + +#### Descripción + +The `.extension` property returns the extension of the folder name (if any). An extension always starts with ".". The property returns an empty string if the folder name does not have an extension. + +This property is **read-only**. + + + +--- + +## .fullName + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.fullName** : Text + +#### Descripción + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +This property is **read-only**. + + + +--- + +## .hidden + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.hidden** : Boolean + +#### Descripción + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + +--- + + +## .isAlias + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isAlias** : Boolean + + +#### Descripción + +The `.isAlias` property returns always **false** for a `Folder` object. + +This property is **read-only**. + + +--- + +## .isFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFile** : Boolean + +#### Descripción + +The `.isFile` property returns always **false** for a folder. + +This property is **read-only**. + + +--- + +## .isFolder + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFolder** : Boolean + +#### Descripción + +The `.isFolder` property returns always **true** for a folder. + +This property is **read-only**. + + +--- + +## .isPackage + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isPackage** : Boolean + +#### Descripción + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Otherwise, it returns false. + +On Windows, `.isPackage` always returns **false**. + +This property is **read-only**. + + + +--- + +## .modificationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationDate** : Date + +#### Descripción + +The `.modificationDate` property returns the date of the folder's last modification. + +This property is **read-only**. + + + +--- + +## .modificationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationTime** : Time + +#### Descripción + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + +--- + +## .name + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + + +**.name** : Text + +#### Descripción + +The `.name` property returns the name of the folder, without extension (if any). + +This property is **read-only**. + + +--- + +## .original + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.original** : 4D.Folder + +#### Descripción + +The `.original` property returns the same Folder object as the folder. + +This property is **read-only**. +> This property is available on folders to allow generic code to process folders or files. + + +--- + + +## .parent + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.parent** : 4D.Folder + +#### Descripción + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +This property is **read-only**. + + + +--- + +## .path + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.path** : Text + +#### Descripción + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + +--- + +## .platformPath + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.platformPath** : Text + +#### Descripción + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +This property is **read-only**. + + + +--- + + + + + +## .copyTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Parameter | Tipo | | Descripción | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Name for the copy | +| overwrite | Entero | -> | `fk overwrite` to replace existing elements | +| Resultado | 4D.Folder | <- | Copied file or folder | + + +#### Descripción + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valor | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `Folder` object. + +#### Ejemplo + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + +--- + + +## .file() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.file**( *path* : Text ) : 4D.File +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | ------------------------------------ | +| path | Texto | -> | Relative POSIX file pathname | +| Resultado | 4D.File | <- | `File` object (null if invalid path) | + +#### Descripción + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `File` object or null if *path* is invalid. + +#### Ejemplo + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + +--- + +## .files() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.files**( { *options* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ----------------------------------- | +| options | Entero | -> | File list options | +| Resultado | Colección | <- | Collection of children file objects | + +#### Descripción + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valor | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `File` objects. + +#### Ejemplo 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Ejemplo 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + +--- + +## .folder() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.folder**( *path* : Text ) : 4D.Folder +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ---------------------------------------------- | +| path | Texto | -> | Relative POSIX file pathname | +| Resultado | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Descripción + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `Folder` object or null if *path* is invalid. + +#### Ejemplo + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + +--- + +## .folders() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.folders**( { *options* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ------------------------------------- | +| options | Entero | -> | Folder list options | +| Resultado | Colección | <- | Collection of children folder objects | + +#### Descripción + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valor | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `Folder` objects. + +#### Ejemplo + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + +--- + +## .getIcon() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | --------------------------------------------- | +| size | Entero | -> | Side length for the returned picture (pixels) | +| Resultado | Imagen | <- | Icono | + + +#### Descripción + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Returned value** + +Folder icon [picture](Concepts/dt_picture.md). + + + + diff --git a/website/translated_docs/es/API/Document.md b/website/translated_docs/es/API/Document.md new file mode 100644 index 00000000000000..cf9334a7a6f3dd --- /dev/null +++ b/website/translated_docs/es/API/Document.md @@ -0,0 +1,578 @@ +--- +id: Document +title: Document Class +--- + +## Descripción + + +## .creationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationDate** : Date + +#### Descripción + +The `.creationDate` property returns the creation date of the file. + +This property is **read-only**. + + + + ## .creationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationTime** : Time + +#### Descripción + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .exists + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.exists** : Boolean + +#### Descripción + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +This property is **read-only**. + + + + + + + +## .extension + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.extension** : Text +#### Descripción + +The `.extension` property returns the extension of the file name (if any). An extension always starts with ".". The property returns an empty string if the file name does not have an extension. + +This property is **read-only**. + + + + + + +## .fullName + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.fullName** : Text +#### Descripción + +The `.fullName` property returns the full name of the file, including its extension (if any). + +This property is **read-only**. + + + + + +## .hidden + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.hidden** : Boolean + +#### Descripción + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + +## .isAlias + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isAlias** : Boolean + +#### Descripción + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +This property is **read-only**. + + + + +## .isFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFile** : Boolean + +#### Descripción + +The `.isFile` property returns always true for a file. + +This property is **read-only**. + + + + +## .isFolder + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFolder** : Boolean + +#### Descripción + +The `.isFolder` property returns always false for a file. + +This property is **read-only**. + + + + + +## .isWritable + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isWritable** : Boolean + +#### Descripción + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +This property is **read-only**. + +**Ejemplo** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + +## .modificationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationDate** : Date + +#### Descripción + +The `.modificationDate` property returns the date of the file's last modification. + +This property is **read-only**. + + + + + +## .modificationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationTime** : Time + +##### Descripción + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + +## .name + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.name** : Text + +#### Descripción + +The `.name` property returns the name of the file without extension (if any). + +This property is **read-only**. + + + +## .original + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.original** : 4D.File
    **.original** : 4D.Folder + +#### Descripción + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +This property is **read-only**. + + + + + +## .parent + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.parent** : 4D.Folder + +#### Descripción + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +This property is **read-only**. + + + + + +## .path + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.path** : Text + +#### Descripción + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + +## .platformPath + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.platformPath** : Text + +#### Descripción + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +This property is **read-only**. + + + + + +## .size + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.size** : Real + +#### Descripción + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +This property is **read-only**. + + + + + + + + + + + +## .copyTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Parameter | Tipo | | Descripción | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Name for the copy | +| overwrite | Entero | -> | `fk overwrite` to replace existing elements | +| Resultado | 4D.File | <- | Copied file | + + +#### Descripción + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valor | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `File` object. + +#### Ejemplo + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + +## .getContent() + +
    History +| Version | Changes | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Added | +
    + +**.getContent( )** : 4D.Blob +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | ------------ | +| Resultado | 4D.Blob | <- | File content | + + +#### Descripción + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Returned value** + +A `4D.Blob` object. + +#### Ejemplo + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + +## .getIcon() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | --------------------------------------------- | +| size | Entero | -> | Side length for the returned picture (pixels) | +| Resultado | Imagen | <- | Icono | + + +#### Descripción + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Returned value** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
    **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Parameter | Tipo | | Descripción | +| ----------- | ------ | -- | ------------------------------- | +| charSetName | Texto | -> | Name of character set | +| charSetNum | Entero | -> | Number of character set | +| breakMode | Entero | -> | Processing mode for line breaks | +| Resultado | Texto | <- | Text from the document | + + +#### Descripción +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Valor | Comment | +| ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Returned value** + +Text of the file. + +#### Ejemplo + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + diff --git a/website/translated_docs/es/API/EmailObjectClass.md b/website/translated_docs/es/API/EmailObjectClass.md new file mode 100644 index 00000000000000..f1f67fbd95f9cb --- /dev/null +++ b/website/translated_docs/es/API/EmailObjectClass.md @@ -0,0 +1,611 @@ +--- +id: EmailObjectClass +title: Email +--- + +Creating, sending or receiving emails in 4D is done by handling an `Email` object. + +`Email` objects are created when receiving mails through a *transporter* class function: + +- IMAP - [`.getMail()`](IMAPTransporterClass.md#getmail) and [`.getMails()`](IMAPTransporterClass.md#getmails) functions to get emails from an IMAP server +- POP3 - [`.getMail()`](POP3TransporterClass.md#getmail) function to get an email from a POP3 server. + +> You can also create a new, blank `Email` object by calling the [`New object`](https://doc.4d.com/4dv18/help/command/en/page1471.html) 4D command, and then fill it with [Email object properties](#email-object). + +You send `Email` objects using the SMTP [`.send()`](SMTPTransporterClass.md#send) function. + +[`MAIL Convert from MIME`](#mail-convert-from-mime) and [`MAIL Convert to MIME`](#mail-convert-to-mime) commands can be used to convert `Email` objects to and from MIME contents. + + +### Email Object + +Email objects provide the following properties: + +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the Email object. + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.attachments** : Collection](#attachments)

        collection of `4D.MailAttachment` object(s) | +| [**.bcc** : Text
    **.bcc** : Object
    **.bcc** : Collection](#bcc)

        Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email | +| [**.bodyStructure** : Object](#bodystructure)

        *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional) | +| [**.bodyValues** : Object](#bodyvalues)

        *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional) | +| [**.cc** : Text
    **.cc** : Object
    **.cc** : Collection](#cc)

        Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email | +| [**.comments** : Text](#comments)

        additional comments header | +| [**.from** : Text
    **.from** : Object
    **.from** : Collection](#from)

        Originating [address(es)](#email-addresses) of the email | +| [**.headers** : Collection](#headers)

        collection of `EmailHeader` objects, in the order they appear in the message | +| [**.htmlBody** : Text](#htmlbody)

        HTML representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.id** : Text](#id)

        unique ID from the IMAP server | +| [**.inReplyTo** : Text](#inreplyto)

        message identifier(s) of the original message(s) to which the current message is a reply | +| [**.keywords** : Object](#keywords)

        set of keywords as an object, where each property name is a keyword and each value is true | +| [**.messageId** : Text](#messageid)

        message identifier header ("message-id") | +| [**.receivedAt** : Text](#receivedat)

        timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z) | +| [**.references** : Collection](#references)

        Collection of all message-ids of messages in the preceding reply chain | +| [**.replyTo** : Text
    **.replyTo** : Object
    **.replyTo** : Collection](#replyto)

        [addresse(s)](#email-addresses) for responses | +| [**.sendAt** : Text](#sendat)

        Email timestamp in ISO 8601 UTC format | +| [**.sender** : Text
    **.sender** : Object
    **.sender** : Collection](#sender)

        email source [addresse(s)](#email-addresses) of the email | +| [**.size** : Integer](#size)

        size (expressed in bytes) of the Email object returned by the IMAP server | +| [**.subject** : Text](#subject)

        description of topic | +| [**.textBody** : Text](#textbody)

        Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.to** : Text
    **.to** : Object
    **.to** : Collection](#to)

        primary recipient [addresse(s)](#email-addresses) of the email | + + +### Email Addresses + +All properties that contain email addresses ([`from`](#from), [`cc`](#cc), [`bcc`](#bcc), [`to`](#to), [`sender`](#sender), [`replyTo`](#replyto)) accept a value of text, object, or collection type. + +#### Texto + +- single email: "somebody@domain.com" +- single display name+email: "Somebody " +- several emails: "Somebody ,me@home.org" + +#### Objeto + +An object with two properties: + +| Propiedad | Tipo | Descripción | +| --------- | ----- | -------------------------- | +| name | Texto | Display name (can be null) | +| email | Texto | Email address | + +#### Colección + +A collection of address objects. + +### Handling body part + +The [`textBody`](#textbody) and [`htmlBody`](#htmlbody) properties are only used with the [SMTP.send()](SMTPTransporterClass.md#send) function to allow sending simple mails. When both property are filled, the MIME content-type multipart/alternative is used. The email client should then recognize the multipart/alternative part and display the text part or html part as necessary. + +[`bodyStructure`](#bodystructure) and [`bodyValues`](#bodyvalues) are used for [SMTP](SMTPTransporterClass.md) when the [Email object](email-object) is built from a MIME document, e.g. when generated by the `MAIL Convert from MIME` command. In this case, both `bodyStructure` and `bodyValues` properties must be passed together, and it is not recommended to use `textBody` and `htmlBody`. + +#### Example of bodyStructure and bodyValues objects + +```json +"bodyStructure": { + "type": "multipart/mixed", + "subParts": [ + { + "partId": "p0001", + "type": "text/plain" + }, + { + "partId": "p0002", + "type": "text/html" + } + ] +}, +"bodyValues": { + "p0001": { + "value": "I have the most brilliant plan. Let me tell you all about it." + }, + "p0002": { + "value": "

    I have the most brilliant plan. Let me tell you all about it.
    " + } +} +``` + + + + + + +## .attachments + +**.attachments** : Collection + +#### Descripción + + + +The `.attachments` property contains a collection of `4D.MailAttachment` object(s). + +Attachment objects are defined through the [`MAIL New attachment`](MailAttachmentClass.md#mail-new-attachment) command. Attachment objects have specific [properties and functions](MailAttachmentClass.md). + + + + +## .bcc + +**.bcc** : Text
    **.bcc** : Object
    **.bcc** : Collection + +#### Descripción + +The `.bcc` property contains the Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email. + + + + +## .bodyStructure + +**.bodyStructure** : Object + +#### Descripción + +The `.bodyStructure` property contains the *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyStructure` object contains the following properties: + +| Propiedad | Tipo | Valor | +| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| partID | Texto | Identifies the part uniquely within the email | +| type | Texto | (mandatory) Value of the Content-Type header field of the part | +| charset | Texto | Value of the charset parameter of the Content-Type header field | +| encoding | Texto | If `isEncodingProblem=true`, the Content-Transfer-Encoding value is added (by default undefined) | +| disposition | Texto | Value of the Content-Disposition header field of the part | +| language | Collection of texts | List of language tags, as defined in [RFC3282](https://tools.ietf.org/html/rfc3282), in the Content-Language header field of the part, if present. | +| location | Texto | URI, as defined in [RFC2557](https://tools.ietf.org/html/rfc2557), in the Content-Location header field of the part, if present. | +| subParts | Collection of objects | Body parts of each child (collection of *EmailBodyPart* objects) | +| headers | Collection of objects | List of all header fields in the part, in the order they appear in the message (collection of *EmailHeader* objects, see [headers](#headers-) property) | + + + + +## .bodyValues + +**.bodyValues** : Object + +#### Descripción + +The `.bodyValues` property contains the *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyValues` object contains the following properties: + +| Propiedad | Tipo | Valor | +| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| *partID*.value | texto | Value of the body part | +| *partID*.isEncodingProblem | booleano | True if malformed sections are found while decoding the charset, or unknown charset, or unknown content transfer-encoding. False by default | + + + + +## .cc + +**.cc** : Text
    **.cc** : Object
    **.cc** : Collection + +#### Descripción + +The `.cc` property contains the Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email. + + + + + + +## .comments + +**.comments** : Text + +#### Descripción + +The `.comments` property contains an additional comments header. + +Comments only appear within the header section of the message (keeping the message's body untouched). + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .from + +**.from** : Text
    **.from** : Object
    **.from** : Collection + +#### Descripción + +The `.from` property contains the Originating [address(es)](#email-addresses) of the email. + + +Each email you send out has both the [sender](#sender) and **from** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .headers + +**.headers** : Collection + +#### Descripción + +The `.headers` property contains a collection of `EmailHeader` objects, in the order they appear in the message. This property allows users to add extended (registered) headers or user-defined (not registered, starting with "X") headers. + +> If an `EmailHeader` object property defines a header such as "from" or "cc" which is already set as a property at the mail level, the `EmailHeader` property is ignored. + +Every object of the headers collection can contain the following properties: + +| Propiedad | Tipo | Valor | +| --------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [].name | texto | (mandatory) Header field name as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322). If null or undefined, the header field is not added to the MIME header. | +| [].value | texto | Header field values as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322) | + + + + + + + +## .htmlBody + +**.htmlBody** : Text + +#### Descripción + +The `.htmlBody` property contains the HTML representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + + + + + +## .id + +**.id** : Text + +#### Descripción + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.id` property contains the unique ID from the IMAP server. + + + + + + +## .inReplyTo + +**.inReplyTo** : Text + +#### Descripción + +The `.inReplyTo` property contains the message identifier(s) of the original message(s) to which the current message is a reply. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + + + +## .keywords + +**.keywords** : Object + +#### Descripción + +The `.keywords` property contains a set of keywords as an object, where each property name is a keyword and each value is true. + +This property is the "keywords" header (see [RFC#4021](https://tools.ietf.org/html/rfc4021)). + +| Propiedad | Tipo | Valor | +| -------------- | -------- | ----------------------------------- | +| .\ | booleano | Keyword to set (value must be true) | + +Reserved keywords: +* $draft - Indicates a message is a draft +* $seen - Indicates a message has been read +* $flagged - Indicates a message needs special attention (e.g., Urgent) +* $answered - Indicates a message has been replied to +* $deleted - Indicates a message to delete + +#### Ejemplo + +``` + $mail.keywords["$flagged"]:=True + $mail.keywords["4d"]:=True +``` + + + + +## .messageId + +**.messageId** : Text + +#### Descripción + +The `.messageId` property contains a message identifier header ("message-id"). + +This header is usually "lettersOrNumbers@domainname", e.g. "abcdef.123456@4d.com". This unique ID is used in particular on forums or public mailing lists. In general, mail servers automatically add this header to the messages they send. + + + +## .receivedAt + +**.receivedAt** : Text + +#### Descripción + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.receivedAt` property contains the timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z). + + + + + + +## .references + +**.references** : Collection + +#### Descripción + +The `.references` property contains the Collection of all message-ids of messages in the preceding reply chain. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .replyTo + +**.replyTo** : Text
    **.replyTo** : Object
    **.replyTo** : Collection + +#### Descripción + +The `.replyTo` property contains the [addresse(s)](#email-addresses) for responses. + + + + + +## .sendAt + +**.sendAt** : Text + +#### Descripción + +The `.sendAt` property contains the Email timestamp in ISO 8601 UTC format. + + + + +## .sender + +**.sender** : Text
    **.sender** : Object
    **.sender** : Collection + +#### Descripción + +The `.sender` property contains the email source [addresse(s)](#email-addresses) of the email. + + +Each email you send out has both the **sender** and **[from](#from)** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .size + +**.size** : Integer + +#### Descripción + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.size` property contains the size (expressed in bytes) of the Email object returned by the IMAP server. + + + + +## .subject + +**.subject** : Text + +#### Descripción + +The `.subject` property contains the description of topic. + + + + + +## .textBody + +**.textBody** : Text + +#### Descripción + +The `.textBody` property contains the Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + +## .to + +**.to** : Text
    **.to** : Object
    **.to** : Collection + +#### Descripción + +The `.to` property contains the primary recipient [addresse(s)](#email-addresses) of the email. + + +## MAIL Convert from MIME + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**MAIL Convert from MIME**( *mime* : Blob ) : Object
    **MAIL Convert from MIME**( *mime* : Text ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ---------- |:--:| ------------- | +| mime | Blob, Text | -> | Email in MIME | +| Resultado | Objeto | <- | Email object | + +#### Descripción + +The `MAIL Convert from MIME` command converts a MIME document into a valid email object. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the returned email object. + +Pass in *mime* a valid MIME document to convert. It can be provided by any mail server or application. You can pass a BLOB or a text *mime* parameter. If the MIME comes from a file, it is recommended to use a BLOB parameter to avoid issues related to charset and line break conversions. + +#### Returned object + +Email object. + +#### Ejemplo 1 + +You want to load a mail template saved as MIME in a text document and send an email: + +```4d +C_BLOB($mime) +C_OBJECT($mail;$server;$transporter;$status) + +$mime:=File("/PACKAGE/Mails/templateMail.txt").getContent()) + +$mail:=[#current_title_incode]($mime) +$mail.to:="smith@mail.com" +$mail.subject:="Hello world" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="test@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($mail) +``` + +#### Ejemplo 2 + +In this example, you send directly a 4D Write Pro document containing pictures: + +```4d +C_TEXT($mime) +C_OBJECT($email;$server;$transporter;$status) + +// Mime export of the 4D Write Pro document +WP EXPORT VARIABLE(WParea;$mime;wk mime html) + +// convert 4D Write Pro Mime variable in mail object +$email:=MAIL Convert from MIME($mime) + +// Fill your mail object headers +$email.subject:="4D Write Pro HTML body" +$email.from:="YourEmail@gmail.com" +$email.to:="RecipientEmail@mail.com" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="YourEmail@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($email) +``` + + + + + +## MAIL Convert to MIME + +
    History +| Version | Changes | +| ------- | -------- | +| v17 R4 | Added | +| v17 R5 | Modified | +
    + +**MAIL Convert to MIME**( *mail* : Object { ; *options* : Object } ) : Text +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------------------- | +| mail | Objeto | -> | Email object | +| options | Objeto | -> | Charset and encoding mail options | +| Resultado | Texto | <- | Email object converted to MIME | + +#### Descripción + +The `MAIL Convert to MIME` command converts an email object into MIME text. This command is called internally by [SMTP_transporter.send( )](API/SMTPTransporterClass.md#send) to format the email object before sending it. It can be used to analyze the MIME format of the object. + +In *mail*, pass the content and the structure details of the email to convert. This includes information such as the email addresses (sender and recipient(s)), the message itself, and the type of display for the message. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the email object. + +In *options*, you can set a specific charset and encoding configuration for the mail. The following properties are available: + +| Propiedad | Tipo | Descripción | +| ------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| headerCharset | Texto | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values:

    ConstantValorComment
    mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
    • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    mail mode ISO88591ISO-8859-1
    • headerCharset: ISO-8859-1 & Quoted-printable
    • bodyCharset: ISO-8859-1 & 8-bit
    mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)
    mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64
    | +| bodyCharset | Texto | Charset and encoding used for the html and text body contents of the email. Possible values: Same as for headerCharset (see above) | + +If the *options* parameter is omitted, the mail mode UTF8 configuration is used for header and body parts. + + +#### Ejemplo + +```4d +C_OBJECT($mail) +C_TEXT($mime) +$mail:=New object + +// Creation of a mail +$mail.from:="tsales@massmarket.com" +$mail.subject:="Terrific Sale! This week only!" +$mail.textBody:="Text format email" +$mail.htmlBody:="HTML format email" +$mail.to:=New collection +$mail.to.push(New object ("email";"noreply@4d.com")) +$mail.to.push(New object ("email";"test@4d.com")) + +// transform the mail object in MIME +$mime:=[#current_title_incode]($mail) + +// Contents of $mime: +// MIME-Version: 1.0 +// Date: Thu, 11 Oct 2018 15:42:25 GMT +// Message-ID: <7CA5D25B2B5E0047A36F2E8CB30362E2> +// Sender: tsales@massmarket.com +// From: tsales@massmarket.com +// To: noreply@4d.com +// To: test@4d.com +// Content-Type: multipart/alternative; boundary="E0AE5773D5E95245BBBD80DD0687E218" +// Subject: Terrific Sale! This week only! +// +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/plain; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// Text format email +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/html; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// HTML format email +// --E0AE5773D5E95245BBBD80DD0687E218-- +``` + + + diff --git a/website/translated_docs/es/API/EntityClass.md b/website/translated_docs/es/API/EntityClass.md new file mode 100644 index 00000000000000..3d11b83dcb9b12 --- /dev/null +++ b/website/translated_docs/es/API/EntityClass.md @@ -0,0 +1,1618 @@ +--- +id: EntityClass +title: Entity +--- + +An [entity](ORDA/dsMapping.md#entity) is an instance of a [Dataclass](ORDA/dsMapping.md#dataclass), like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions. + + +### Summary + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : any](#attributename)

        stores the attribute value for the entity | +| [**.clone()** : 4D.Entity](#clone)

        creates in memory a new entity referencing the same record as the original entity | +| [**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection](#diff)

        compares the contents of two entities and returns their differences | +| [**.drop**( {*mode* : Integer} ) : Object](#drop)

        deletes the data contained in the entity from the datastore | +| [**.first()**: 4D.Entity](#first)

        returns a reference to the entity in first position of the entity selection which the entity belongs to | +| [**.fromObject**( *filler* : Object )](#fromobject)

        fills an entity with the *filler* content | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

        returns the dataclass of the entity | +| [**.getKey**( { *mode* : Integer } ) : Text
    **.getKey**( { *mode* : Integer } ) : Integer](#getkey)

        returns the primary key value of the entity | +| [**.getSelection()**: 4D.EntitySelection](#getselection)

        returns the entity selection which the entity belongs to | +| [**.getStamp()** : Integer](#getstamp)

         returns the current value of the stamp of the entity | +| [**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer](#indexof)

        returns the position of the entity in an entity selection | +| [**.isNew()** : Boolean](#isnew)

         returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore | +| [**.last()** : 4D.Entity](#last)

        returns a reference to the entity in last position of the entity selection which the entity belongs to | +| [**.lock**( { *mode* : Integer } ) : Object](#lock)

        puts a pessimistic lock on the record referenced by the entity | +| [**.next()** : 4D.Entity](#next)

        returns a reference to the next entity in the entity selection which the entity belongs to | +| [**.previous()** : 4D.Entity](#previous)

         returns a reference to the previous entity in the entity selection which the entity belongs to | +| [**.reload()** : Object](#reload)

        reloads the content of the entity in memory | +| [**.save**( { *mode* : Integer } ) : Object](#save)

        saves the changes made to the entity | +| [**.toObject**() : Object
    **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
    **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object](#toobject)

        returns an object which has been built from the entity | +| [**.touched()** : Boolean](#touched)

        tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved | +| [**.touchedAttributes()** : Collection](#touchedattributes)

        returns the names of the attributes that have been modified since the entity was loaded into memory | +| [**.unlock()** : Object](#unlock)

        removes the pessimistic lock on the record matching the entity | + + + + + + +## .*attributeName* + +

    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +***.attributeName*** : any + +#### Descripción + +Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity. +> Dataclass attributes can also be reached using the alternate syntax with \[ ]. + +The attribute value type depends on the attribute [kind](DataClassAttributeClass.md#kind) (relation or storage): + +* If *attributeName* kind is **storage**: `.attributeName` returns a value of the same type as *attributeName*. +* If *attributeName* kind is **relatedEntity**: `.attributeName` returns the related entity. Values of the related entity are directly available through cascading properties, for example "myEntity.employer.employees\[0].lastname". +* If *attributeName* kind is **relatedEntities**: `.attributeName` returns a new entity selection of related entities. Duplications are removed (an unordered entity selection is returned). + + +#### Ejemplo + +```4d + var $myEntity : cs.EmployeeEntity + $myEntity:=ds.Employee.new() //Create a new entity + $myEntity.name:="Dupont" // assign 'Dupont' to the 'name' attribute + $myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute + $myEntity.save() //save the entity +``` + + + + + +## .clone() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + + +**.clone()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| --------------------------------- | +| Resultado | 4D.Entity | <- | New entity referencing the record | + + +#### Descripción + +The `.clone()` function creates in memory a new entity referencing the same record as the original entity. This function allows you to update entities separately. +> Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save( )`](#save) function is executed. + +This function can only be used with entities already saved in the database. It cannot be called on a newly created entity (for which [`.isNew()`](#isnew) returns **True**). + + +#### Ejemplo + +```4d + var $emp; $empCloned : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $empCloned:=$emp.clone() + + $emp.lastName:="Smith" //Updates done on $emp are not done on $empCloned + +``` + + + + + + +## .diff() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------------- | --------- |:--:| ---------------------------------------------- | +| entityToCompare | 4D.Entity | -> | Entity to be compared with the original entity | +| attributesToCompare | Colección | -> | Name of attributes to be compared | +| Resultado | Colección | <- | Differences between the entities | + + +#### Descripción + +The `.diff()` function compares the contents of two entities and returns their differences. + +In *entityToCompare*, pass the entity to be compared to the original entity. + +In *attributesToCompare*, you can designate specific attributes to compare. If provided, the comparison is done only on the specified attributes. If not provided, all differences between the entities are returned. + +The differences are returned as a collection of objects whose properties are: + +| Property name | Tipo | Descripción | +| ------------- | ------------------------------- | ------------------------------------------- | +| attributeName | Cadena | Name of the attribute | +| value | any - Depends on attribute type | Value of the attribute in the entity | +| otherValue | any - Depends on attribute type | Value of the attribute in *entityToCompare* | + +Only attributes with different values are included in the collection. If no differences are found, `.diff()` returns an empty collection. + +The function applies for properties whose [kind](DataClassAttributeClass.md#kind) is **storage** or **relatedEntity**. In case a related entity has been updated (meaning the foreign key), the name of the related entity and its primary key name are returned as *attributeName* properties (*value* and *otherValue* are empty for the related entity name). + +If one of the compared entities is **Null**, an error is raised. + +#### Ejemplo 1 + + +```4d + var $diff1; $diff2 : Collection + employee:=ds.Employee.query("ID=1001").first() + $clone:=employee.clone() + employee.firstName:="MARIE" + employee.lastName:="SOPHIE" + employee.salary:=500 + $diff1:=$clone.diff(employee) // All differences are returned + $diff2:=$clone.diff(employee;New collection"firstName";"lastName")) + // Only differences on firstName and lastName are returned +``` + +$diff1: + +```4d +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + }, + { + "attributeName": "salary", + "value": 66600, + "otherValue": 500 + } +] +$diff2: + +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + } +] +``` + +#### Ejemplo 2 + +```4d + var vCompareResult1; vCompareResult2; vCompareResult3; $attributesToInspect : Collection + vCompareResult1:=New collection + vCompareResult2:=New collection + vCompareResult3:=New collection + $attributesToInspect:=New collection + + $e1:=ds.Employee.get(636) + $e2:=ds.Employee.get(636) + + $e1.firstName:=$e1.firstName+" update" + $e1.lastName:=$e1.lastName+" update" + + $c:=ds.Company.get(117) + $e1.employer:=$c + $e2.salary:=100 + + $attributesToInspect.push("firstName") + $attributesToInspect.push("lastName") + + vCompareResult1:=$e1.diff($e2) + vCompareResult2:=$e1.diff($e2;$attributesToInspect) + vCompareResult3:=$e1.diff($e2;$e1.touchedAttributes()) +``` + +vCompareResult1 (all differences are returned): + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "salary", + "value": 33500, + "otherValue": 100 + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + } +] +``` + +vCompareResult2 (only differences on $attributesToInspect are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + } +] +``` + +vCompareResult3 (only differences on $e1 touched attributes are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + + } +] +``` + + + + + +## .drop() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.drop**( {*mode* : Integer} ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------------------------------------- | +| mode | Entero | -> | `dk force drop if stamp changed`: Forces the drop even if the stamp has changed | +| Resultado | Objeto | <- | Result of drop operation | + +#### Descripción + +The `.drop()` function deletes the data contained in the entity from the datastore, from the table related to its Dataclass. Note that the entity remains in memory. + +In a multi-user or multi-process application, the `.drop()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk force drop if stamp changed` option in the *mode* parameter: in this case, the entity is dropped even if the stamp has changed (and the primary key is still the same). + +**Resultado** + +The object returned by `.drop( )` contains the following properties: + +| Propiedad | | Tipo | Descripción | +| ------------- | ------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------- | +| success | | booleano | true if the drop action is successful, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(*) | | number | Error code, see below | +| statusText(*) | | texto | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| LockKindText | | texto | "Locked by record" | +| lockInfo | | objeto | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | texto | Session user name on the machine | +| | user4d_alias | texto | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | texto | Machine name | +| | task_name | texto | Process name | +| | client_version | texto | | +| | | | ***Available only in case of serious error (serious error can be trying to duplicate a primary key, disk full...):*** | +| errors | | collection of objects | | +| | message | texto | Error message | +| | component signature | texto | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Valor | Comment | +| ----------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using entity.drop( ), this error can be returned when dk force drop if stamp changed option is used. When using entity.lock( ), this error can be returned when dk reload if stamp changed option is used
  • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.
    **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
    **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used
  • **Associated statusText**: "Stamp has changed"
  • | + + +#### Ejemplo 1 + +Example without `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop() + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Ejemplo 2 + +Example with `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop(dk force drop if stamp changed) + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + +## .first() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.first()**: 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------------------- | +| Resultado | 4D.Entity | <- | Reference to first entity of an entity selection (Null if not found) | + +#### Descripción + +The `.first()` function returns a reference to the entity in first position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + +#### Ejemplo + +```4d + var $employees : cs.EmployeeSelection + var $employee; $firstEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[2] + $firstEmployee:=$employee.first() //$firstEmployee is the first entity of the $employees entity selection +``` + + + + +## .fromObject() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.fromObject**( *filler* : Object ) +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------ | +| filler | Objeto | -> | Object from which to fill the entity | + +#### Descripción + +The `.fromObject()` function fills an entity with the *filler* content. +> This function modifies the original entity. + +The mapping between the object and the entity is done on the attribute names: + +* If a property of the object does not exist in the dataclass, it is ignored. +* Data types must be equivalent. If there is a type mismatch between the object and dataclass, 4D tries to convert the data whenever possible (see [`Converting data types`](Concepts/data-types.md#converting-data-types)), otherwise the attribute is left untouched. +* The primary key can be given as is or with a "__KEY" property (filled with the primary key value). If it does not already exist in the dataclass, the entity is created with the given value when [.save()](#save) is called. If the primary key is not given, the entity is created and the primary key value is assigned with respect to database rules. The auto-increment is only computed if the primary key is null. + +*filler* can handle a related entity under the following conditions: + +* *filler* contains the foreign key itself, or +* *filler* contains a property object with the same name as the related entity, containing a single property named "\_\_KEY". +* if the related entity does not exist, it is ignored. + +#### Ejemplo + +With the following $o object: + +```4d +{ + "firstName": "Mary", + "lastName": "Smith", + "salary": 36500, + "birthDate": "1958-10-27T00:00:00.000Z", + "woman": true, + "managerID": 411,// relatedEntity given with PK + "employerID": 20 // relatedEntity given with PK +} +``` + + +The following code will create an entity with manager and employer related entities. + + +```4d + var $o : Object + var $entity : cs.EmpEntity + $entity:=ds.Emp.new() + $entity.fromObject($o) + $entity.save() +``` + + +You could also use a related entity given as an object: + +```4d + +{ + "firstName": "Marie", + "lastName": "Lechat", + "salary": 68400, + "birthDate": "1971-09-03T00:00:00.000Z", + "woman": false, + "employer": {// relatedEntity given as an object + "__KEY": "21" + }, + "manager": {// relatedEntity given as an object + "__KEY": "411" + } +} +``` + + + + + + +## .getDataClass() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + +
    + +**.getDataClass()** : 4D.DataClass +| Parameter | Tipo | | Descripción | +| --------- | ------------ |:--:| -------------------------------------------- | +| Resultado | 4D.DataClass | <- | DataClass object to which the entity belongs | + +#### Descripción + +The `.getDataClass()` function returns the dataclass of the entity. This function is useful when writing generic code. + + +#### Ejemplo + +The following generic code duplicates any entity: + +```4d + //duplicate_entity method + //duplicate_entity($entity) + + #DECLARE($entity : 4D.Entity) + var $entityNew : 4D.Entity + var $status : Object + + $entityNew:=$entity.getDataClass().new() //create a new entity in the parent dataclass + $entityNew.fromObject($entity.toObject()) //get all attributes + $entityNew[$entity.getDataClass().getInfo().primaryKey]:=Null //reset the primary key + $status:=$entityNew.save() //save the duplicated entity +``` + + + + + +## .getKey() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.getKey**( { *mode* : Integer } ) : Text
    **.getKey**( { *mode* : Integer } ) : Integer +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------------------------------------------------------------------------- | +| mode | Entero | -> | `dk key as string`: primary key is returned as a string, no matter the primary key type | +| Resultado | Texto | <- | Value of the text primary key of the entity | +| Resultado | Entero | <- | Value of the numeric primary key of the entity | + + +#### Descripción + +The `.getKey()` function returns the primary key value of the entity. + +Primary keys can be numbers (Integer) or strings. You can "force" the returned primary key value to be a string, no matter the actual primary key type, by passing the `dk key as string` option in the *mode* parameter. + +#### Ejemplo + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees[0] + ALERT("The primary key is "+$employee.getKey(dk key as string)) +``` + + + + + +## .getSelection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.getSelection()**: 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| ---------------------------------------------------------------- | +| Resultado | 4D.EntitySelection | <- | Entity selection to which the entity belongs (Null if not found) | + +#### Descripción + +The `.getSelection()` function returns the entity selection which the entity belongs to. + +If the entity does not belong to an entity selection, the function returns Null. + +#### Ejemplo + + +```4d + var $emp : cs.EmployeeEntity + var $employees; $employees2 : cs.EmployeeSelection + $emp:=ds.Employee.get(672) // This entity does not belong to any entity selection + $employees:=$emp.getSelection() // $employees is Null + + $employees2:=ds.Employee.query("lastName=:1";"Smith") //This entity selection contains 6 entities + $emp:=$employees2[0] // This entity belongs to an entity selection + + ALERT("The entity selection contains "+String($emp.getSelection().length)+" entities") +``` + + + + +## .getStamp() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.getStamp()** : Integer +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------------- | +| Resultado | Entero | <- | Stamp of the entity (0 if entity has just been created) | + +#### Descripción + +The `.getStamp()` function returns the current value of the stamp of the entity. + +The internal stamp is automatically incremented by 4D each time the entity is saved. It manages concurrent user access and modifications to the same entities (see [**Entity locking**](ORDA/entities.md#entity-locking)). +> For a new entity (never saved), the function returns 0. To know if an entity has just been created, it is recommended to use [.isNew()](#isnew). + + +#### Ejemplo + + +```4d + var $entity : cs.EmployeeEntity + var $stamp : Integer + + $entity:=ds.Employee.new() + $entity.lastname:="Smith" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=1 + + $entity.lastname:="Wesson" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=2 +``` + + + + + +## .indexOf() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer +| Parameter | Tipo | | Descripción | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------ | +| entitySelection | 4D.EntitySelection | -> | Position of the entity is given according to this entity selection | +| Resultado | Entero | <- | Position of the entity in an entity selection | + +#### Descripción + +The `.indexOf()` function returns the position of the entity in an entity selection. + +By default if the *entitySelection* parameter is omitted, the function returns the entity's position within its own entity selection. Otherwise, it returns the position of the entity within the specified *entitySelection*. + +The resulting value is included between 0 and the length of the entity selection -1. + +* If the entity does not have an entity selection or does not belong to *entitySelection*, the function returns -1. +* If *entitySelection* is Null or does not belong to the same dataclass as the entity, an error is raised. + +#### Ejemplo + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] //This entity belongs to an entity selection + ALERT("The index of the entity in its own entity selection is "+String($employee.indexOf())) //1 + + $employee:=ds.Employee.get(725) //This entity does not belong to an entity selection + ALERT("The index of the entity is "+String($employee.indexOf())) // -1 +``` + + + + + +## .isNew() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.isNew()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ------------------------------------------------------------------------- | +| Resultado | Booleano | <- | True if entity has just been created and not yet saved. Otherwise, False. | + +#### Descripción + +The `.isNew()` function returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore. Otherwise, it returns False. + + +#### Ejemplo + + +```4d + var $emp : cs.EmployeeEntity + + $emp:=ds.Employee.new() + + If($emp.isNew()) + ALERT("This is a new entity") + End if +``` + + + + +## .last() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.last()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------------------------- | +| Resultado | 4D.Entity | <- | Reference to last entity of an entity selection (Null if not found) | + +#### Descripción + +The `.last()` function returns a reference to the entity in last position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + + +#### Ejemplo + + +```4d + var $employees : cs.EmployeeSelection + var $employee; $lastEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $lastEmployee:=$employee.last() //$lastEmployee is the last entity of the $employees entity selection +``` + + + + +## .lock() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.lock**( { *mode* : Integer } ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| -------------------------------------------------------------------- | +| mode | Entero | -> | `dk reload if stamp changed`: Reload before locking if stamp changed | +| Resultado | Objeto | <- | Result of lock operation | + +#### Descripción + +The `.lock()` function puts a pessimistic lock on the record referenced by the entity. The [lock is set](ORDA/entities.md#entity-locking) for a record and all the references of the entity in the current process. + +Other processes will see this record as locked (the `result.success` property will contain False if they try to lock the same entity using this function). Only functions executed in the "locking" session are allowed to edit and save the attributes of the entity. The entity can be loaded as read-only by other sessions, but they will not be able to enter and save values. + +A locked record is unlocked: + +* when the [`unlock()`](#unlock) function is called on a matching entity in the same process +* automatically, when it is no longer referenced by any entities in memory. For example, if the lock is put only on one local reference of an entity, the entity is unlocked when the function ends. As long as there are references to the entity in memory, the record remains locked. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk reload if stamp changed` option in the *mode* parameter: in this case, no error is returned and the entity is reloaded when the stamp has changed (if the entity still exists and the primary key is still the same). + +**Resultado** + +The object returned by `.lock( )` contains the following properties: + +| Propiedad | | Tipo | Descripción | +| ---------------- | ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------- | +| success | | booleano | true if the lock action is successful (or if the entity is already locked in the current process), false otherwise. | +| | | | ***Available only if `dk reload if stamp changed` option is used:*** | +| **wasReloaded** | | booleano | true if the entity was reloaded with success, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(\*) | | number | Error code, see below | +| statusText(\*) | | texto | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| lockKindText | | texto | "Locked by record" | +| lockInfo | | objeto | Information about the lock origin | +| | task_id | number | Process ID | +| | user_name | texto | Session user name on the machine | +| | user4d_alias | texto | Name or alias of the 4D user | +| | user4d_id | number | User id in the 4D database directory | +| | host_name | texto | Machine name | +| | task_name | texto | Process name | +| | client_version | texto | | +| | | | ***Available only in case of serious error*** (primary key already exists, disk full...): | +| errors | | collection of objects | | +| | message | texto | Error message | +| | component signature | texto | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + + +(\*) The following values can be returned in the *status* and *statusText* properties of the *Result* object in case of error: + +| Constant | Valor | Comment | +| ----------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when dk force drop if stamp changed option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

    **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

    **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

  • **Associated statusText**: "Stamp has changed" | + + +#### Ejemplo 1 + +Example with error: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(716) + $status:=$employee.lock() + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + + +#### Ejemplo 2 + +Example with `dk reload if stamp changed` option: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(717) + $status:=$employee.lock(dk reload if stamp changed) + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + +## .next() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.next()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------------------- | +| Resultado | 4D.Entity | <- | Reference to next entity in the entity selection (Null if not found) | + +#### Descripción + +The `.next()` function returns a reference to the next entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid next entity in the entity selection (i.e. you are on the last entity of the selection), the function returns Null. If the next entity has been dropped, the function returns the next valid entity (and eventually Null). + + +#### Ejemplo + +```4d + var $employees : cs.EmployeeSelection + var $employee; $nextEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $nextEmployee:=$employee.next() //$nextEmployee is the second entity of the $employees entity selection + +``` + + + +## .previous() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.previous()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------------------------------ | +| Resultado | 4D.Entity | <- | Reference to previous entity in the entity selection (Null if not found) | + +#### Descripción + +The `.previous()` function returns a reference to the previous entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid previous entity in the entity selection (i.e. you are on the first entity of the selection), the function returns Null. If the previous entity has been dropped, the function returns the previous valid entity (and eventually Null). + + +#### Ejemplo + +```4d + var $employees : cs.EmployeeSelection + var $employee; $previousEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] + $previousEmployee:=$employee.previous() //$previousEmployee is the first entity of the $employees entity selection +``` + + + + +## .reload( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.reload()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------- | +| Resultado | Objeto | <- | Status object | + +#### Descripción + +The `.reload()` function reloads the content of the entity in memory, according to information stored in the table related to the dataclass in the datastore. The reload is done only if the entity still exists with the same primary key. + +**Resultado** + +The object returned by `.reload( )` contains the following properties: + +| Propiedad | Tipo | Descripción | +| ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | booleano | True if the reload action is successful, False otherwise.

    ***Available only in case of error***: | +| status(\*) | number | Error code, see below | +| statusText(\*) | texto | Description of the error, see below | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Valor | Comment | +| ----------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • ***Associated statusText***: "Entity does not exist anymore" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
    ***Associated statusText***: "Other error" | + + +#### Ejemplo + +```4d + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + var $result : Object + + $employees:=ds.Employee.query("lastName=:1";"Hollis") + $employee:=$employees[0] + $employee.firstName:="Mary" + $result:=$employee.reload() + Case of + :($result.success) + ALERT("Reload has been done") + :($result.status=dk status entity does not exist anymore) + ALERT("The entity has been dropped") + End case +``` + + + +## .save() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.save**( { *mode* : Integer } ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------- | +| mode | Entero | -> | `dk auto merge`: Enables the automatic merge mode | +| Resultado | Objeto | <- | Result of save operation | + +#### Descripción + +The `.save()` function saves the changes made to the entity in the table related to its dataClass. You must call this method after creating or modifying an entity if you want to save the changes made to it. + +The save operation is executed only if at least one entity attribute has been "touched" (see the [`.touched()`](#touched) and [`.touchedAttributes()`](#touchedattributes) functions). Otherwise, the function does nothing (the trigger is not called). + +In a multi-user or multi-process application, the `.save()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the method will return an error (see below) whenever the same entity has been modified by another process or user in the meantime, no matter the modified attribute(s). + +Otherwise, you can pass the `dk auto merge` option in the *mode* parameter: when the automatic merge mode is enabled, a modification done concurrently by another process/user on the same entity but on a different attribute will not result in an error. The resulting data saved in the entity will be the combination (the "merge") of all non-concurrent modifications (if modifications were applied to the same attribute, the save fails and an error is returned, even with the auto merge mode). +> The automatic merge mode is not available for attributes of Picture, Object, and Text type when stored outside of the record. Concurrent changes in these attributes will result in a `dk status stamp has changed` error. + +**Resultado** + +The object returned by `.save()` contains the following properties: + +| Propiedad | | Tipo | Descripción | +| ------------ | ------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| success | | booleano | True if the save action is successful, False otherwise. | +| | | | ***Available only if `dk auto merge` option is used***: | +| autoMerged | | booleano | True if an auto merge was done, False otherwise. | +| | | | ***Available only in case of error***: | +| status | | number | Error code, [see below](#status-and-statustext) | +| statusText | | texto | Description of the error, [see below](#status-and-statustext) | +| | | | ***Available only in case of pessimistic lock error***: | +| lockKindText | | texto | "Locked by record" | +| lockInfo | | objeto | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | texto | Session user name on the machine | +| | user4d_alias | texto | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | texto | Machine name | +| | task_name | texto | Process name | +| | client_version | texto | | +| | | | ***Available only in case of serious error*** (serious error - can be trying to duplicate a primary key, disk full...): | +| errors | | collection of objects | | +| | message | texto | Error message | +| | componentSignature | texto | Internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +##### status and statusText + +The following values can be returned in the `status` and `statusText` properties of Result object in case of error: + +| Constant | Valor | Comment | +| ----------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status automerge failed` | 6 | (Only if the `dk auto merge` option is used) The automatic merge option failed when saving the entity.

    **Associated statusText**: "Auto merge failed" | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

  • the entity has been dropped (the stamp has changed and the memory space is now free)
  • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

  • **Associated statusText**: "Entity doesnot exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

    **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

    **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

  • with `.save( )`: error only if the `dk auto merge` option is not used
  • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
  • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

  • **Associated statusText**: "Stamp has changed" | + + +#### Ejemplo 1 + +Creating a new entity: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + $employee:=ds.Employee.new() + $employee.firstName:="Mary" + $employee.lastName:="Smith" + $status:=$employee.save() + If($status.success) + ALERT("Employee created") + End if +``` + +#### Ejemplo 2 + +Updating an entity without `dk auto merge` option: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save() + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 3 + +Updating an entity with `dk auto merge` option: + +```4d + var $status : Object + + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save(dk auto merge) + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status automerge failed) + ALERT($status.statusText) + End case +``` + + + + +## .toObject() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.toObject**() : Object
    **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
    **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object +| Parameter | Tipo | | Descripción | +| ------------ | --------- |:--:| ------------------------------------------------------------------------------------------------------- | +| filterString | Texto | -> | Attribute(s) to extract (comma-separated string) | +| filterCol | Colección | -> | Collection of attribute(s) to extract | +| options | Entero | -> | `dk with primary key`: adds the \_KEY property;
    `dk with stamp`: adds the \_STAMP property | +| Resultado | Objeto | <- | Object built from the entity | + +#### Descripción + +The `.toObject()` function returns an object which has been built from the entity. Property names in the object match attribute names of the entity. + +If no filter is specified, or if the *filterString* parameter contains an empty string or "*", the returned object will contain: + +* all storage entity attributes +* attributes of the `relatedEntity` [kind](DataClassAttributeClass.md#kind): you get a property with the same name as the related entity (name of the many-to-one link). Attribute is extracted with the simple form. +* attributes of the `relatedEntities` [kind](DataClassAttributeClass.md#kind): attribute is not returned. + + +In the first parameter, you pass the entity attribute(s) to extract. You can pass: + +* *filterString*: a string with property paths separated with commas: "propertyPath1, propertyPath2, ...", or +* *filterCol*: a collection of strings: \["propertyPath1","propertyPath2";...] + +If a filter is specified for attributes of the relatedEntity [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntity" -> it is extracted with simple form: an object with property \_\_KEY (primary key). +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1; relatedEntity.propertyName2; ..." -> only those properties are extracted + +If a filter is specified for attributes of the relatedEntities [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1; relatedEntities.propertyName2; ..." -> only those properties are extracted + +In the *options* parameter, you can pass the `dk with primary key` and/or`dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + + +#### Ejemplo 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Without filter parameter: + +```4d +employeeObject:=employeeSelected.toObject() +``` + +Returns: + +```4d +{ + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { // relatedEntity extracted with simple form + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + + + +#### Ejemplo 2 + +Extracting the primary key and the stamp: + +```4d +employeeObject:=employeeSelected.toObject("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +{ + "__KEY": 413, + "__STAMP": 1, + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + +#### Example 3 + +Expanding all the properties of `relatedEntities`: + +```4d +employeeObject:=employeeSelected.toObject("directReports.*") +``` + +```4d +{ + "directReports": [ + { + "ID": 418, + "firstName": "Lorena", + "lastName": "Boothe", + "salary": 44800, + "birthDate": "1970-10-02T00:00:00.000Z", + "woman": true, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 419, + "firstName": "Drew", + "lastName": "Caudill", + "salary": 41000, + "birthDate": "2030-01-12T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 420, + "firstName": "Nathan", + "lastName": "Gomes", + "salary": 46300, + "birthDate": "2010-05-29T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + } + ] +} +``` + +#### Example 4 + +Extracting some properties of `relatedEntities`: + +```4d + employeeObject:=employeeSelected.toObject("firstName, directReports.lastName") +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "directReports": [ + { + "lastName": "Boothe" + }, + { + "lastName": "Caudill" + }, + { + "lastName": "Gomes" + } + ] +} +``` + +#### Example 5 + +Extracting a `relatedEntity` with simple form: + +```4d + $coll:=New collection("firstName";"employer") + employeeObject:=employeeSelected.toObject($coll) +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "employer": { + "__KEY": 20 + } +} +``` + +#### Example 6 + +Extracting all the properties of a `relatedEntity`: + +```4d + employeeObject:=employeeSelected.toObject("employer.*") +``` + +Returns: + +```4d +{ + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } +} +``` + +#### Example 7 + +Extracting some properties of a `relatedEntity`: + +```4d + $col:=New collection + $col.push("employer.name") + $col.push("employer.revenues") + employeeObject:=employeeSelected.toObject($col) +``` + +Returns: + +```4d +{ + "employer": { + "name": "India Astral Secretary", + "revenues": 12000000 + } +} +``` + + + + +## .touched( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.touched()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ------------------------------------------------------------------------------------- | +| Resultado | Booleano | <- | True if at least one entity attribute has been modified and not yet saved, else False | + +#### Descripción + +The `.touched()` function tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved. + +If an attribute has been modified or calculated, the function returns True, else it returns False. You can use this function to determine if you need to save the entity. + +This function returns False for a new entity that has just been created (with [`.new( )`](DataClassClass.md#new)). Note however that if you use a function which calculates an attribute of the entity, the `.touched()` function will then return True. For example, if you call [`.getKey()`](#getkey) to calculate the primary key, `.touched()` returns True. + +#### Ejemplo + +In this example, we check to see if it is necessary to save the entity: + +```4d + var $emp : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + + If($emp.touched()) //if at least one of the attributes has been changed + $emp.save() + End if // otherwise, no need to save the entity +``` + + + +## .touchedAttributes( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.touchedAttributes()** : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------ | +| Resultado | Colección | <- | Names of touched attributes, or empty collection | + +#### Descripción + +The `.touchedAttributes()` function returns the names of the attributes that have been modified since the entity was loaded into memory. + +This applies for attributes of the [kind](DataClassAttributeClass.md#kind) `storage` or `relatedEntity`. + +In the case of a related entity having been touched (i.e., the foreign key), the name of the related entity and its primary key's name are returned. + +If no entity attribute has been touched, the method returns an empty collection. + +#### Ejemplo 1 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + + $touchedAttributes:=New collection + $emp:=ds.Employee.get(725) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + $emp.lastName:="Martin" + $touchedAttributes:=$emp.touchedAttributes() + //$touchedAttributes: ["firstName","lastName"] +``` + + +#### Ejemplo 2 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + var $company : cs.CompanyEntity + + $touchedAttributes:=New collection + + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName + $emp.lastName:="Martin" + + $company:=ds.Company.get(121) + $emp.employer:=$company + + $touchedAttributes:=$emp.touchedAttributes() + + //collection $touchedAttributes: ["firstName","lastName","employer","employerID"] +``` + +In this case: + +* firstName and lastName have a `storage` kind +* employer has a `relatedEntity` kind +* employerID is the foreign key of the employer related entity + + + +## .unlock() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.unlock()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------- | +| Resultado | Objeto | <- | Status object | + +#### Descripción + +The `.unlock()` function removes the pessimistic lock on the record matching the entity in the datastore and table related to its dataclass. + +> For more information, please refer to [Entity locking](ORDA/entities.md#entity-locking) section. + +A record is automatically unlocked when it is no longer referenced by any entities in the locking process (for example: if the lock is put only on one local reference of an entity, the entity and thus the record is unlocked when the process ends). +> When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. Por ejemplo: + +```4d + $e1:=ds.Emp.all()[0] + $e2:=ds.Emp.all()[0] + $res:=$e1.lock() //$res.success=true + $res:=$e2.unlock() //$res.success=false + $res:=$e1.unlock() //$res.success=true +``` + +**Resultado** + +The object returned by `.unlock()` contains the following property: + +| Propiedad | Tipo | Descripción | +| --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | Booleano | True if the unlock action is successful, False otherwise. If the unlock is done on a dropped entity, on a non locked record, or on a record locked by another process or entity, success is False. | + +#### Ejemplo + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + + $employee:=ds.Employee.get(725) + $status:=$employee.lock() + ... //processing + $status:=$employee.unlock() + If($status.success) + ALERT("The entity is now unlocked") + End if +``` + + + + + diff --git a/website/translated_docs/es/API/EntitySelectionClass.md b/website/translated_docs/es/API/EntitySelectionClass.md new file mode 100644 index 00000000000000..a179bad8c0479b --- /dev/null +++ b/website/translated_docs/es/API/EntitySelectionClass.md @@ -0,0 +1,2219 @@ +--- +id: EntitySelectionClass +title: EntitySelection +--- + + +An entity selection is an object containing one or more reference(s) to [entities](ORDA/dsMapping.md#entity) belonging to the same [Dataclass](ORDA/dsMapping.md#dataclass). An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Entity selections can be created from existing selections using various functions of the [`DataClass` class](DataClassClass.md) such as [`.all()`](DataClassClass.md#all) or [`.query()`](DataClassClass.md#query), or functions of the `EntityClass` class itself, such as [`.and()`](#and) or [`orderBy()`](#orderby). You can also create blank entity selections using the [`dataClass.newSelection()`](DataClassClass.md#newselection) function or the [`Create new selection`](#create-new-selection) command. + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [***[index]*** : 4D.Entity](#91index93)

        allows you to access entities within the entity selection using the standard collection syntax | +| [***.attributeName*** : Collection
    ***.attributeName*** : 4D.EntitySelection](#attributename)

        a "projection" of values for the attribute in the entity selection | +| [**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection](#add)

        adds the specified *entity* to the entity selection and returns the modified entity selection | +| [**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#and)

        combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator | +| [**.average**( *attributePath* : Text ) : Real](#average)

        returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection | +| [**.contains**( *entity* : 4D.Entity ) : Boolean](#contains)

        returns true if entity reference belongs to the entity selection | +| [**.count**( *attributePath* : Text ) : Real](#count)

        returns the number of entities in the entity selection with a non-null value in *attributePath* | +| [**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection](#distinct)

        returns a collection containing only distinct (different) values from the *attributePath* in the entity selection | +| [**.drop**( { *mode* : Integer } ) : 4D.EntitySelection](#drop)

        removes the entities belonging to the entity selection from the table related to its dataclass within the datastore | +| [**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
    **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection](#extract)

        returns a collection containing *attributePath* values extracted from the entity selection | +| [**.first()** : 4D.Entity](#first)

        returns a reference to the entity in the first position of the entity selection | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

        returns the dataclass of the entity selection | +| [**.isAlterable()** : Boolean](#isalterable)

        returns True if the entity selection is alterable | +| [**.isOrdered()** : Boolean](#isordered)

        returns True if the entity selection is ordered | +| [**.last()** : 4D.Entity](#last)

        returns a reference to the entity in last position of the entity selection | +| [**.length** : Integer](#length)

        returns the number of entities in the entity selection | +| [**.max**( *attributePath* : Text ) : any](#max)

        returns the highest (or maximum) value among all the values of *attributePath* in the entity selection | +| [**.min**( *attributePath* : Text ) : any](#min)

         returns the lowest (or minimum) value among all the values of attributePath in the entity selection | +| [**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#minus)

        excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection | +| [**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#or)

        combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator | +| [**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
    **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection](#orderby)

        returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria | +| [**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
    **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection](#orderbyformula)

        returns a new, ordered entity selection | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection](#query)

        searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection | +| [**.queryPath** : Text](#querypath)

        contains a detailed description of the query as it was actually performed by 4D | +| [**.queryPlan** : Text](#queryplan)

         contains a detailed description of the query just before it is executed (i.e., the planned query) | +| [**.refresh()**](#refresh)

        immediately "invalidates" the entity selection data in the local ORDA cache | +| [**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object](#selected)

        returns an object describing the position(s) of *selectedEntities* in the original entity selection | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection](#slice)

        returns a portion of an entity selection into a new entity selection | +| [**.sum**( *attributePath* : Text ) : Real](#sum)

        returns the sum for all *attributePath* values in the entity selection | +| [**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
    **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
    **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*](#tocollection)

        creates and returns a collection where each element is an object containing a set of properties and values | + + + +## Create entity selection + +**Create entity selection** ( *dsTable* : Table { ; *settings* : Object } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ---------- | ------------------ |:--:| ------------------------------------------------------------------------------------------- | +| dsTable | Tabla | -> | Table in the 4D database whose current selection will be used to build the entity selection | +| parámetros | Objeto | -> | Build option: context | +| Resultado | 4D.EntitySelection | <- | Entity selection matching the dataclass related to the given table | + + +#### Descripción + +The `Create entity selection` command builds and returns a new, [alterable](ORDA/entities.md#shareable-or-alterable-entity-selections) entity selection related to the dataclass matching the given *dsTable*, according to the current selection of this table. + +If the current selection is sorted, an [ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created. + +If the *dsTable* is not exposed in [`ds`](API/DataStoreClass.md#ds), an error is returned. This command cannot be used with a Remote datastore. + +In the optional *settings* parameter, you can pass an object containing the following property: + +| Propiedad | Tipo | Descripción | +| --------- | ----- | ----------------------------------------------------------------------------------------------------------------- | +| context | Texto | Label for the [optimization context](ORDA/entities.md#clientserver-optimization) applied to the entity selection. | + + +#### Ejemplo + +```4d +var $employees : cs.EmployeeSelection +ALL RECORDS([Employee]) +$employees:=Create entity selection([Employee]) +// The $employees entity selection now contains a set of reference +// on all entities related to the Employee dataclass +``` + +#### Ver también + +[`dataClass.newSelection()`](DataClassClass.md#newselection) + +## [*index*] + +

    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +***[index]*** : 4D.Entity + +#### Descripción + +The `EntitySelection[index]` notation allows you to access entities within the entity selection using the standard collection syntax: pass the position of the entity you want to get in the *index* parameter. + +Note that the corresponding entity is reloaded from the datastore. + +*index* can be any number between 0 and `.length`-1. + +* If *index* is out of range, an error is returned. +* If *index* corresponds to a dropped entity, a Null value is returned. +> **Warning**: `EntitySelection[index]` is a non assignable expression, which means that it cannot be used as en editable entity reference with methods like [`.lock()`](EntityClass.md#lock) or [`.save()`](EntityClass.md#save). To work with the corresponding entity, you need to assign the returned expression to an assignable expression, such as a variable. Ejemplos: + +```4d + $sel:=ds.Employee.all() //create the entity selection + //invalid statements: + $result:=$sel[0].lock() //will NOT work + $sel[0].lastName:="Smith" //will NOT work + $result:=$sel[0].save() //will NOT work + //valid code: + $entity:=$sel[0] //OK + $entity.lastName:="Smith" //OK + $entity.save() //OK +``` + +#### Ejemplo + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + $employee:=$employees[2] // The 3rd entity of the $employees entity selection is reloaded from the database +``` + + + + + +## .*attributeName* + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +***.attributeName*** : Collection
    ***.attributeName*** : 4D.EntitySelection + +#### Descripción + +Any dataclass attribute can be used as a property of an entity selection to return a "projection" of values for the attribute in the entity selection. Projected values can be a collection or a new entity selection, depending on the [kind](DataClassAttributeClass.md#kind) (`storage` or `relation`) of the attribute. + +* If *attributeName* kind is `storage`: `.attributeName` returns a collection of values of the same type as *attributeName*. +* If *attributeName* kind is `relatedEntity`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). +* If *attributeName* kind is `relatedEntities`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). + + +When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. In this case, if no entities are returned, the result is an empty entity selection. + +If the attribute does not exist in the entity selection, an error is returned. + + + + + + +#### Ejemplo 1 + +Projection of storage values: + + +```4d + var $firstNames : Collection + $entitySelection:=ds.Employee.all() + $firstNames:=$entitySelection.firstName // firstName type is string +``` + +The resulting collection is a collection of strings, for example: + +```4d +[ + "Joanna", + "Alexandra", + "Rick" +] +``` + +#### Ejemplo 2 + +Projection of related entity: + +```4d + var $es; $entitySelection : cs.EmployeeSelection + $entitySelection:=ds.Employee.all() + $es:=$entitySelection.employer // employer is related to a Company dataClass +``` + +The resulting object is an entity selection of Company with duplications removed (if any). + +#### Example 3 + +Projection of related entities: + +```4d + var $es : cs.EmployeeSelection + $es:=ds.Employee.all().directReports // directReports is related to Employee dataclass +``` + +The resulting object is an entity selection of Employee with duplications removed (if any). + + + + + +## .add() + +
    History +| Version | Changes | +| ------- | ----------------------------------------- | +| v18 R5 | Only supports alterable entity selections | +| v17 | Added | +
    + + +**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------- | +| entity | 4D.Entity | -> | Entity to be added to the entity selection | +| Resultado | 4D.EntitySelection | -> | Entity selection including the added *entity* | + + +#### Descripción + +The `.add()` function adds the specified *entity* to the entity selection and returns the modified entity selection. +> This function modifies the original entity selection. + +**Warning:** The entity selection must be *alterable*, i.e. it has been created for example by [`.newSelection()`](DataClassClass.md#newselection) or `Create entity selection`, otherwise `.add()` will return an error. Shareable entity selections do not accept the addition of entities. For more information, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + + +* If the entity selection is ordered, *entity* is added at the end of the selection. If a reference to the same entity already belongs to the entity selection, it is duplicated and a new reference is added. +* If the entity selection is unordered, *entity* is added anywhere in the selection, with no specific order. +> For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +The modified entity selection is returned by the function, so that function calls can be chained. + +An error occurs if *entity* and the entity selection are not related to the same Dataclass. If *entity* is Null, no error is raised. + +#### Ejemplo 1 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"S@") + $employee:=ds.Employee.new() + $employee.lastName:="Smith" + $employee.save() + $employees.add($employee) //The $employee entity is added to the $employees entity selection +``` + +#### Ejemplo 2 + +Calls to the function can be chained: + +```4d + var $sel : cs.ProductSelection + var $p1;$p2;$p3 : cs.ProductEntity + + $p1:=ds.Product.get(10) + $p2:=ds.Product.get(11) + $p3:=ds.Product.get(12) + $sel:=ds.Product.query("ID > 50") + $sel:=$sel.add($p1).add($p2).add($p3) +``` + + + +## .and() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
    + +**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + +| Parameter | Tipo | | Descripción | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Resultado | 4D.EntitySelection | <- | New entity selection with the result of intersection with logical AND operator | + + +#### Descripción + +The `.and()` function combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator; it returns a new, unordered entity selection that contains only the entities that are referenced in both the entity selection and the parameter. + +* If you pass *entity* as parameter, you combine this entity with the entity selection. If the entity belongs to the entity selection, a new entity selection containing only the entity is returned. Otherwise, an empty entity selection is returned. +* If you pass *entitySelection* as parameter, you combine both entity selections. A new entity selection that contains only the entities that are referenced in both selections is returned. If there is no intersecting entity, an empty entity selection is returned. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or the *entitySelection* parameter is empty, or if the *entity* is Null, an empty entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Ejemplo 1 + + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + //The $employees entity selection contains the entity + //with primary key 710 and other entities + //for ex. "Colin Hetrick" / "Grady Harness" / "Sherlock Holmes" (primary key 710) + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.and($employee) //$result is an entity selection containing + //only the entity with primary key 710 ("Sherlock Holmes") +``` + + +#### Ejemplo 2 + +We want to have a selection of employees named "Jones" who live in New York: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2) +``` + + + +## .average() + +
    History +| Version | Changes | +| ------- | ------------------------------------------- | +| v18 R6 | Returns undefined if empty entity selection | +| v17 | Added | + +
    + +**.average**( *attributePath* : Text ) : Real +| Parameter | Tipo | | Descripción | +| ------------- | ----- |:--:| ------------------------------------------------------------------------------------------ | +| attributePath | Texto | -> | Attribute path to be used for calculation | +| Resultado | Real | <- | Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection) | + +#### Descripción + +The `.average()` function returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection. + +Pass in the *attributePath* parameter the attribute path to evaluate. + +Only numerical values are taken into account for the calculation. Note however that, if the *attributePath* of the entity selection contains mixed value types, `.average()` takes all scalar elements into account to calculate the average value. +> Date values are converted to numerical values (seconds) and used to calculate the average. + +`.average()` returns **undefined** if the entity selection is empty or *attributePath* does not contain numerical values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Ejemplo + +We want to obtain a list of employees whose salary is higher than the average salary: + +```4d + var $averageSalary : Real + var $moreThanAv : cs.EmployeeSelection + $averageSalary:=ds.Employee.all().average("salary") + $moreThanAv:=ds.Employee.query("salary > :1";$averageSalary) +``` + + + + +## .contains() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.contains**( *entity* : 4D.Entity ) : Boolean +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to evaluate | +| Resultado | Booleano | <- | True if the entity belongs to the entity selection, else False | + +#### Descripción + +The `.contains()` function returns true if entity reference belongs to the entity selection, and false otherwise. + +In *entity*, specify the entity to search for in the entity selection. If entity is Null, the function will return false. + +If *entity* and the entity selection do not belong to the same dataclass, an error is raised. + +#### Ejemplo + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName=:1";"H@") + $employee:=ds.Employee.get(610) + + If($employees.contains($employee)) + ALERT("The entity with primary key 610 has a last name beginning with H") + Else + ALERT("The entity with primary key 610 does not have a last name beginning with H") + End if +``` + + + + +## .count() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.count**( *attributePath* : Text ) : Real +| Parameter | Tipo | | Descripción | +| ------------- | ----- |:--:| ----------------------------------------------------------------- | +| attributePath | Texto | -> | Path of the attribute to be used for calculation | +| Resultado | Real | <- | Number of non null *attributePath* values in the entity selection | + +#### Descripción + +The `.count()` function returns the number of entities in the entity selection with a non-null value in *attributePath*. +> Only scalar values are taken into account. Object or collection type values are considered as null values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Ejemplo + +We want to find out the total number of employees for a company without counting any whose job title has not been specified: + +```4d + var $sel : cs.EmployeeSelection + var $count : Real + + $sel:=ds.Employee.query("employer = :1";"Acme, Inc") + $count:=$sel.count("jobtitle") +``` + + + +## .copy() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | + +
    + +**.copy**( { *option* : Integer } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| ------------------------------------------------ | +| option | Entero | -> | `ck shared`: return a shareable entity selection | +| Resultado | 4D.EntitySelection | <- | Copy of the entity selection | + +#### Descripción + +The `.copy()` function returns a copy of the original entity selection. + +> This function does not modify the original entity selection. + +By default, if the *option* parameter is omitted, the function returns a new, alterable entity selection (even if the function is applied to a shareable entity selection). Pass the `ck shared` constant in the *option* parameter if you want to create a shareable entity selection. + +> For information on the shareable property of entity selections, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + +#### Ejemplo + +You create a new, empty entity selection of products when the form is loaded: + +```4d + Case of + :(Form event code=On Load) + Form.products:=ds.Products.newSelection() + End case + +``` + +Then this entity selection is updated with products and you want to share the products between several processes. You copy the Form.products entity selection as a shareable one: + +```4d + ... + // The Form.products entity selection is updated + Form.products.add(Form.selectedProduct) + + Use(Storage) + If(Storage.products=Null) + Storage.products:=New shared object() + End if + + Use(Storage.products) + Storage.products:=Form.products.copy(ck shared) + End use + End use +``` + + + +## .distinct() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| ------------- | --------- |:--:| ---------------------------------------------------------------- | +| attributePath | Texto | -> | Path of attribute whose distinct values you want to get | +| option | Entero | -> | `dk diacritical`: diacritical evaluation ("A" # "a" for example) | +| Resultado | Colección | <- | Collection with only distinct values | + +#### Descripción + +The `.distinct()` function returns a collection containing only distinct (different) values from the *attributePath* in the entity selection. + +The returned collection is automatically sorted. **Null** values are not returned. + +In the *attributePath* parameter, pass the entity attribute whose distinct values you want to get. Only scalar values (text, number, boolean, or date) can be handled. If the *attributePath* leads to an object property that contains values of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. booleans +2. strings +3. numbers +4. dates + +You can use the `[]` notation to designate a collection when *attributePath* is a path within an object (see examples). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `dk diacritical` constant in the *option* parameter. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Ejemplos + +You want to get a collection containing a single element per country name: + +```4d + var $countries : Collection + $countries:=ds.Employee.all().distinct("address.country") +``` + +`nicknames` is a collection and `extra` is an object attribute: + +```4d +$values:=ds.Employee.all().distinct("extra.nicknames[].first") +``` + + + + +## .drop() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.drop**( { *mode* : Integer } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| ------------------------------------------------------------------------------------------------ | +| mode | Entero | -> | `dk stop dropping on first error`: stops method execution on first non-droppable entity | +| Resultado | 4D.EntitySelection | <- | Empty entity selection if successful, else entity selection containing non-droppable entity(ies) | + +#### Descripción + +The `.drop()` function removes the entities belonging to the entity selection from the table related to its dataclass within the datastore. The entity selection remains in memory. +> Removing entities is permanent and cannot be undone. It is recommended to call this action in a transaction in order to have a rollback option. + +If a locked entity is encountered during the execution of `.drop()`, it is not removed. By default, the method processes all entities of the entity selection and returns non-droppable entities in the entity selection. If you want the method to stop execution at the first encountered non-droppable entity, pass the `dk stop dropping on first error` constant in the *mode* parameter. + +#### Ejemplo + +Example without the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop() // $notDropped is an entity selection containing all the not dropped entities + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + +Example with the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop(dk stop dropping on first error) //$notDropped is an entity selection containing the first not dropped entity + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + + + + + +## .extract() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
    + + +**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
    **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection + +| Parameter | Tipo | | Descripción | +| ------------- | --------- |:--:| --------------------------------------------------------------------------------------- | +| attributePath | Texto | -> | Attribute path whose values must be extracted to the new collection | +| targetPath | Texto | -> | Target attribute path or attribute name | +| option | Entero | -> | `ck keep null`: include null attributes in the returned collection (ignored by default) | +| Resultado | Colección | <- | Collection containing extracted values | + +#### Descripción + +The `.extract()` function returns a collection containing *attributePath* values extracted from the entity selection. + +*attributePath* can refer to: + +* a scalar dataclass attribute, +* related entity, +* related entities. + +If *attributePath* is invalid, an empty collection is returned. + +This function accepts two syntaxes. + +**.extract( attributePath : Text { ; option : Integer } ) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* values of the entity selection. + +By default, entities for which *attributePath* is *null* or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as **null** elements in the returned collection. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as a collection of entities (duplications are kept). +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as a collection of entity selections. + + +**.extract ( attributePath ; targetPath { ; ...attributePathN ; ... targetPathN}) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* properties. Each element of the returned collection is an object with *targetPath* properties filled with the corresponding *attributePath* properties. Null values are kept (*option* parameter is ignored with this syntax). + +If several *attributePath* are given, a *targetPath* must be given for each. Only valid pairs \[*attributePath*, *targetPath*] are extracted. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as an entity. +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as an entity selection. + +> Entities of a collection of entities accessed by \[ ] are not reloaded from the database. + + +#### Ejemplo + +Given the following table and relation: + +![](assets/en/API/entityselection.PNG) + +```4d + var $firstnames; $addresses; $mailing; $teachers : Collection + // + // + //$firstnames is a collection of Strings + + + $firstnames:=ds.Teachers.all().extract("firstname") + // + //$addresses is a collection of entities related to dataclass Address + //Null values for address are extracted + $addresses:=ds.Teachers.all().extract("address";ck keep null) + // + // + //$mailing is a collection of objects with properties "who" and "to" + //"who" property content is String type + //"to" property content is entity type (Address dataclass) + $mailing:=ds.Teachers.all().extract("lastname";"who";"address";"to") + // + // + //$mailing is a collection of objects with properties "who" and "city" + //"who" property content is String type + //"city" property content is String type + $mailing:=ds.Teachers.all().extract("lastname";"who";"address.city";"city") + // + //$teachers is a collection of objects with properties "where" and "who" + //"where" property content is String + //"who" property content is an entity selection (Teachers dataclass) + $teachers:=ds.Address.all().extract("city";"where";"teachers";"who") + // + //$teachers is a collection of entity selections + $teachers:=ds.Address.all().extract("teachers") +``` + + + + +## .first() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.first()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ---------------------------------------------------------------------------------- | +| Resultado | 4D.Entity | <- | Reference to the first entity of the entity selection (Null if selection is empty) | + +#### Descripción + +The `.first()` function returns a reference to the entity in the first position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[0] +``` + +There is, however, a difference between both statements when the selection is empty: + + +```4d + var $entitySel : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySel:=ds.Emp.query("lastName = :1";"Nonexistentname") //no matching entity + //entity selection is then empty + $entity:=$entitySel.first() //returns Null + $entity:=$entitySel[0] //generates an error +``` + +#### Ejemplo + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary > :1";100000) + If($entitySelection.length#0) + $entity:=$entitySelection.first() + End if +``` + + + + +## .getDataClass() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + +
    + +**.getDataClass()** : 4D.DataClass + +| Parameter | Tipo | | Descripción | +| --------- | ------------ |:--:| ------------------------------------------------------ | +| Resultado | 4D.DataClass | <- | Dataclass object to which the entity selection belongs | + +#### Descripción + +The `.getDataClass()` function returns the dataclass of the entity selection. + +This function is mainly useful in the context of generic code. + +#### Ejemplo + +The following generic code duplicates all entities of the entity selection: + +```4d + //duplicate_entities method + //duplicate_entities($entity_selection) + + #DECLARE ( $entitySelection : 4D.EntitySelection ) + var $dataClass : 4D.DataClass + var $entity; $duplicate : 4D.Entity + var $status : Object + $dataClass:=$entitySelection.getDataClass() + For each($entity;$entitySelection) + $duplicate:=$dataClass.new() + $duplicate.fromObject($entity.toObject()) + $duplicate[$dataClass.getInfo().primaryKey]:=Null //reset the primary key + $status:=$duplicate.save() + End for each +``` + + + +## .isAlterable() + +
    History + +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | + +
    + +**.isAlterable()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ---------------------------------------------------------- | +| Resultado | Booleano | <- | True if the entity selection is alterable, False otherwise | + +#### Descripción + +The `.isAlterable()` function returns True if the entity selection is alterable, and False if the entity selection is not alterable. + +For more information, please refer to [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections). + +#### Ejemplo + +You are about to display `Form.products` in a [list box](FormObjects/listbox_overview.md) to allow the user to add new products. You want to make sure it is alterable so that the user can add new products without error: + +```4d +If (Not(Form.products.isAlterable())) + Form.products:=Form.products.copy() +End if +... +Form.products.add(Form.product) +``` + + + + +## .isOrdered() + +
    History + +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.isOrdered()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| -------------------------------------------------------- | +| Resultado | Booleano | <- | True if the entity selection is ordered, False otherwise | + +#### Descripción + +The `.isOrdered()` function returns True if the entity selection is ordered, and False if it is unordered. +> This function always returns True when the entity selection comes from a remote datastore. + +For more information, please refer to [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + + +#### Ejemplo + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $isOrdered : Boolean + $employees:=ds.Employee.newSelection(dk keep ordered) + $employee:=ds.Employee.get(714) // Gets the entity with primary key 714 + + //In an ordered entity selection, we can add the same entity several times (duplications are kept) + $employees.add($employee) + $employees.add($employee) + $employees.add($employee) + + $isOrdered:=$employees.isOrdered() + If($isOrdered) + ALERT("The entity selection is ordered and contains "+String($employees.length)+" employees") + End if +``` + + + + + +## .last() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.last()** : 4D.Entity +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------------------------------------------- | +| Resultado | 4D.Entity | <- | Reference to the last entity of the entity selection (Null if empty entity selection) | + +#### Descripción + +The `.last()` function returns a reference to the entity in last position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[length-1] +``` + +If the entity selection is empty, the function returns Null. + + +#### Ejemplo + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary < :1";50000) + If($entitySelection.length#0) + $entity:=$entitySelection.last() + End if +``` + + + + +## .length + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.length** : Integer + +#### Descripción + +The `.length` property returns the number of entities in the entity selection. If the entity selection is empty, it returns 0. + +Entity selections always have a `.length` property. + + +#### Ejemplo + +```4d + var $vSize : Integer + $vSize:=ds.Employee.query("gender = :1";"male").length + ALERT(String(vSize)+" male employees found.") +``` + + + + +## .max() + +
    History +| Version | Changes | +| ------- | ------------------------------------------- | +| v17 | Added | +| v18 R6 | Returns undefined if empty entity selection | + +
    + +**.max**( *attributePath* : Text ) : any + +| Parameter | Tipo | | Descripción | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texto | -> | Path of the attribute to be used for calculation | +| Resultado | any | <- | Highest value of attribute | + +#### Descripción + +The `.max()` function returns the highest (or maximum) value among all the values of *attributePath* in the entity selection. It actually returns the value of the last entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function. + +If you pass in *attributePath* a path to an object property containing different types of values, the `.max()` function will return the maximum value within the first scalar type in the default 4D type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.max()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + + +#### Ejemplo + +We want to find the highest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $maxSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $maxSalary:=$sel.max("salary") +``` + + + +## .min() + +
    History +| Version | Changes | +| ------- | ------------------------------------------- | +| v17 | Added | +| v18 R6 | Returns undefined if empty entity selection | + + +
    + +**.min**( *attributePath* : Text ) : any +| Parameter | Tipo | | Descripción | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texto | -> | Path of the attribute to be used for calculation | +| Resultado | any | <- | Lowest value of attribute | + +#### Descripción + +The `.min()` function returns the lowest (or minimum) value among all the values of attributePath in the entity selection. It actually returns the first entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function (excluding **null** values). + +If you pass in *attributePath* a path to an object property containing different types of values, the `.min()` function will return the minimum value within the first scalar value type in the type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.min()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Ejemplo + +In this example, we want to find the lowest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $minSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $minSalary:=$sel.min("salary") +``` + + + +## .minus() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to substract | +| entitySelection | 4D.EntitySelection | -> | Entity selection to substract | +| Resultado | 4D.EntitySelection | <- | New entity selection or a new reference on the existing entity selection | + +#### Descripción + +The `.minus()` function excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection. + +* If you pass *entity* as parameter, the function creates a new entity selection without *entity* (if *entity* belongs to the entity selection). If *entity* was not included in the original entity selection, a new reference to the entity selection is returned. +* If you pass *entitySelection* as parameter, the function returns an entity selection containing the entities belonging to the original entity selection without the entities belonging to *entitySelection*. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or both the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Ejemplo 1 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName = :1";"H@") + // The $employees entity selection contains the entity with primary key 710 and other entities + // for ex. "Colin Hetrick", "Grady Harness", "Sherlock Holmes" (primary key 710) + + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.minus($employee) //$result contains "Colin Hetrick", "Grady Harness" +``` + + +#### Ejemplo 2 + +We want to have a selection of female employees named "Jones" who live in New York : + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2).minus(ds.Employee.query("gender='male'")) +``` + + + +## .or() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
    **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------------- | ------------------ |:--:| ---------------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Resultado | 4D.EntitySelection | <- | New entity selection or new reference to the original entity selection | + +#### Descripción + +The `.or()` function combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator; it returns a new, unordered entity selection that contains all the entities from the entity selection and the parameter. + +* If you pass *entity* as parameter, you compare this entity with the entity selection. If the entity belongs to the entity selection, a new reference to the entity selection is returned. Otherwise, a new entity selection containing the original entity selection and the entity is returned. +* If you pass *entitySelection* as parameter, you compare entity selections. A new entity selection containing the entities belonging to the original entity selection or *entitySelection* is returned (or is not exclusive, entities referenced in both selections are not duplicated in the resulting selection). +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. If the original entity selection is empty, a reference to *entitySelection* or an entity selection containing only *entity* is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Ejemplo 1 + +```4d + var $employees1; $employees2; $result : cs.EmployeeSelection + $employees1:=ds.Employee.query("lastName = :1";"H@") //Returns "Colin Hetrick","Grady Harness" + $employees2:=ds.Employee.query("firstName = :1";"C@") //Returns "Colin Hetrick", "Cath Kidston" + $result:=$employees1.or($employees2) //$result contains "Colin Hetrick", "Grady Harness","Cath Kidston" +``` + +#### Ejemplo 2 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // Returns "Colin Hetrick","Grady Harness", "Sherlock Holmes" + $employee:=ds.Employee.get(686) //the entity with primary key 686 does not belong to the $employees entity selection + //It matches the employee "Mary Smith" + + $result:=$employees.or($employee) //$result contains "Colin Hetrick", "Grady Harness", "Sherlock Holmes", "Mary Smith" +``` + + + +## .orderBy() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
    **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ----------- | ------------------ |:--:| --------------------------------------------------------------------- | +| pathString | Texto | -> | Attribute path(s) and sorting instruction(s) for the entity selection | +| pathObjects | Colección | -> | Collection of criteria objects | +| Resultado | 4D.EntitySelection | <- | New entity selection in the specified order | + +#### Descripción + +The `.orderBy()` function returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria. +> * This method does not modify the original entity selection. +* For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +You must use a criteria parameter to define how the entities must be sorted. Two different parameters are supported: + +* *pathString* (Text) : This parameter contains a formula made of 1 to x attribute paths and (optionally) sort orders, separated by commas. The syntax is: + +```4d +"attributePath1 {desc or asc}, attributePath2 {desc or asc},..." +``` + +The order in which the attributes are passed determines the sorting priority of the entities. By default, attributes are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* (collection): each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +By default, attributes are sorted in ascending order ("descending" is false). + +You can add as many objects in the criteria collection as necessary. +> Null values are evaluated as less than other values. + +#### Ejemplo + + +```4d +// order by formula + $sortedEntitySelection:=$entitySelection.orderBy("firstName asc, salary desc") + $sortedEntitySelection:=$entitySelection.orderBy("firstName") + + // order by collection with or without sort orders + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"firstName";"descending";False)) + $orderColl.push(New object("propertyPath";"salary";"descending";True)) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) + + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"manager.lastName")) + $orderColl.push(New object("propertyPath";"salary")) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) +``` + + + + +## .orderByFormula( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | + +
    + +**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
    **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ------------- | ------------------ |:--:| ------------------------------------------- | +| formulaString | Texto | -> | Formula string | +| formulaObj | Objeto | -> | Formula object | +| sortOrder | Entero | -> | `dk ascending` (default) or `dk descending` | +| parámetros | Objeto | -> | Parameter(s) for the formula | +| Resultado | 4D.EntitySelection | <- | New ordered entity selection | + +#### Descripción + +The `.orderByFormula()` function returns a new, ordered entity selection containing all entities of the entity selection in the order defined through the *formulaString* or *formulaObj* and, optionally, *sortOrder* and *settings* parameters. +> This function does not modify the original entity selection. + +You can use either a *formulaString* or a *formulaObj* parameter: + +- *formulaString*: you pass a 4D expression such as "Year of(this.birthDate)". +- *formulaObj*: pass a valid formula object created using the `Formula` or `Formula from string` command. + +The *formulaString* or *formulaObj* is executed for each entity of the entity selection and its result is used to define the position of the entity in the returned entity selection. The result must be of a sortable type (boolean, date, number, text, time, null). +> A null result is always the smallest value. + +By default if you omit the *sortOrder* parameter, the resulting entity selection is sorted in ascending order. Optionnally, you can pass one of the following values in the *sortOrder* parameter: + +| Constant | Valor | Comment | +| ------------- | ----- | ------------------------------ | +| dk ascending | 0 | Ascending sort order (default) | +| dk descending | 1 | Descending sort order | + +Within the *formulaString* or *formulaObj*, the processed entity and thus its attributes are available through the `This` command (for example, `This.lastName`). + +You can pass parameter(s) to the formula using the `args` property (object) of the `settings` parameter: the formula receives the `settings.args` object in $1. + +#### Ejemplo 1 + +Sorting students using a formula provided as text: + +```4d + var $es1; $es2 : cs.StudentsSelection + $es1:=ds.Students.query("nationality=:1";"French") + $es2:=$es1.orderByFormula("length(this.lastname)") //ascending by default + $es2:=$es1.orderByFormula("length(this.lastname)";dk descending) +``` + +Same sort order but using a formula object: + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(Length(This.lastname)) + $es2:=$es1.orderByFormula($formula) // ascending by default + $es2:=$es1.orderByFormula($formula;dk descending) +``` + + +#### Ejemplo 2 + +A formula is given as a formula object with parameters; `settings.args` object is received as $1 in the ***computeAverage*** method. + +In this example, the "marks" object field in the **Students** dataClass contains students' grades for each subject. A single formula object is used to compute a student's average grade with different coefficients for schoolA and schoolB. + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula; $schoolA; $schoolB : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(computeAverage($1)) + + $schoolA:=New object() //settings object + $schoolA.args:=New object("english";1;"math";1;"history";1) // Coefficients to compute an average + + //Order students according to school A criteria + $es2:=$es1.entitySelection.orderByFormula($formula;$schoolA) + + $schoolB:=New object() //settings object + $schoolB.args:=New object("english";1;"math";2;"history";3) // Coefficients to compute an average + + //Order students according to school B criteria + $es2:=$es1.entitySelection.orderByFormula($formula;dk descending;$schoolB) +``` + +```4d + // + // computeAverage method + // ----------------------------- + #DECLARE ($coefList : Object) -> $result : Integer + var $subject : Text + var $average; $sum : Integer + + $average:=0 + $sum:=0 + + For each($subject;$coefList) + $sum:=$sum+$coefList[$subject] + End for each + + For each($subject;This.marks) + $average:=$average+(This.marks[$subject]*$coefList[$subject]) + End for each + + $result:=$average/$sum +``` + + + + +## .query() + +
    History +| Version | Changes | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Added | + +
    + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
    **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| ------------- | ------------------ |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| queryString | Texto | -> | Search criteria as string | +| formula | Objeto | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Objeto | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Resultado | 4D.EntitySelection | <- | New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula* | +#### Descripción + +The `.query()` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. +> This function does not modify the original entity selection. + +If no matching entities are found, an empty `EntitySelection` is returned. + +For detailed information on how to build a query using *queryString*, *value*, and *querySettings* parameters, please refer to the DataClass [`.query()`](DataClassClass.md#query) function description. +> By default if you omit the **order by** statement in the *queryString*, the returned entity selection is [not ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). Note however that, in Client/Server mode, it behaves like an ordered entity selection (entities are added at the end of the selection). + +#### Ejemplo 1 + + +```4d + var $entitySelectionTemp : cs.EmployeeSelection + $entitySelectionTemp:=ds.Employee.query("lastName = :1";"M@") + Form.emps:=$entitySelectionTemp.query("manager.lastName = :1";"S@") +``` + + +#### Ejemplo 2 + +More examples of queries can be found in the DataClass [`.query()`](DataClassClass.md#query) page. + +#### Ver también + +[`.query()`](DataClassClass.md#query) for dataclass + + + + +## .queryPath + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.queryPath** : Text + +#### Descripción + +The `.queryPath` property contains a detailed description of the query as it was actually performed by 4D. This property is available for `EntitySelection` objects generated through queries if the `"queryPath":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + + +## .queryPlan + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.queryPlan** : Text + +#### Descripción + +The `.queryPlan` property contains a detailed description of the query just before it is executed (i.e., the planned query). This property is available for `EntitySelection` objects generated through queries if the `"queryPlan":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + +## .refresh() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
    + +**.refresh()** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + +#### Descripción +> This function only works with a remote datastore (client / server or `Open datastore` connection). + +The `.refresh()` function immediately "invalidates" the entity selection data in the local ORDA cache so that the next time 4D requires the entity selection, it will be reloaded from the database. + +By default, the local ORDA cache is invalidated after 30 seconds. In the context of client / server applications using both ORDA and the classic language, this method allows you to make sure a remote application will always work with the latest data. + +#### Ejemplo 1 + +In this example, classic and ORDA code modify the same data simultaneously: + +```4d + //On a 4D remote + + var $selection : cs.StudentsSelection + var $student : cs.StudentsEntity + + $selection:=ds.Students.query("lastname=:1";"Collins") + //The first entity is loaded in the ORDA cache + $student:=$selection.first() + + //Update with classic 4D, ORDA cache is not aware of if + QUERY([Students];[Students]lastname="Collins") + [Students]lastname:="Colin" + SAVE RECORD([Students]) + + //to get the latest version, the ORDA cache must be invalidated + $selection.refresh() + // Even if cache is not expired, the first entity is reloaded from disk + $student:=$selection.first() + + //$student.lastname contains "Colin" +``` + + +#### Ejemplo 2 + +A list box displays the Form.students entity selection and several clients work on it. + +```4d +// Form method: + Case of + :(Form event code=On Load) + Form.students:=ds.Students.all() + End case + // + // + // On client #1, the user loads, updates, and saves the first entity + // On client #2, the user loads, updates, and saves the same entity + // + // + // On client #1: + Form.students.refresh() // Invalidates the ORDA cache for the Form.students entity selection + // The list box content is refreshed from the database with update made by client #2 +``` + + + + +## .selected() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | + +
    + +**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object +| Parameter | Tipo | | Descripción | +| ---------------- | ------------------ |:--:| --------------------------------------------------------------------------------- | +| selectedEntities | 4D.EntitySelection | -> | Entity selection with entities for which to know the rank in the entity selection | +| Resultado | Objeto | <- | Range(s) of selected entities in entity selection | + +#### Descripción + +The `.selected()` function returns an object describing the position(s) of *selectedEntities* in the original entity selection. +> This function does not modify the original entity selection. + +Pass in the *selectedEntities* parameter an entity selection containing entities for which you want to know the position in the original entity selection. *selectedEntities* must be an entity selection belonging to the same dataclass as the original entity selection, otherwise an error 1587 - "The entity selection comes from an incompatible dataclass" is raised. + +#### Resultado + +The returned object contains the following properties: + +| Propiedad | Tipo | Descripción | +| -------------- | --------- | ------------------------------- | +| ranges | Colección | Collection of range objects | +| ranges[].start | Entero | First entity index in the range | +| ranges[].end | Entero | Last entity index in the range | + +If a `ranges` property contains a single entity, `start` = `end`. Index starts at 0. + +The function returns an empty collection in the `ranges` property if the original entity selection or the *selectedEntities* entity selection is empty. + +#### Ejemplo + +```4d +var $invoices; $cashSel; $creditSel : cs.Invoices +var $result1; $result2 : Object + +$invoices:=ds.Invoices.all() + +$cashSelection:=ds.Invoices.query("payment = :1"; "Cash") +$creditSel:=ds.Invoices.query("payment IN :1"; New collection("Cash"; "Credit Card")) + +$result1:=$invoices.selected($cashSelection) +$result2:=$invoices.selected($creditSel) + +//$result1 = {ranges:[{start:0;end:0},{start:3;end:3},{start:6;end:6}]} +//$result2 = {ranges:[{start:0;end:1},{start:3;end:4},{start:6;end:7}]} + +``` + + + + + + + + +## .slice() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| -------------------------------------------------------------- | +| startFrom | Entero | -> | Index to start the operation at (included) | +| end | Entero | -> | End index (not included) | +| Resultado | 4D.EntitySelection | <- | New entity selection containing sliced entities (shallow copy) | + +#### Descripción + +The `.slice()` function returns a portion of an entity selection into a new entity selection, selected from the *startFrom* index to the *end* index (*end* is not included) or to the last entity of the entity selection. This method returns a shallow copy of the entity selection (it uses the same entity references). +> This function does not modify the original entity selection. + +The returned entity selection contains the entities specified by *startFrom* and all subsequent entities up to, but not including, the entity specified by *end*. If only the *startFrom* parameter is specified, the returned entity selection contains all entities from *startFrom* to the last entity of the original entity selection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the entity selection). If the calculated value < 0, *startFrom* is set to 0. +* If *startFrom >= length*, the function returns an empty entity selection. +* If *end* < 0, it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +If the entity selection contains entities that were dropped in the meantime, they are also returned. + +#### Ejemplo 1 + +You want to get a selection of the first 9 entities of the entity selection: + +```4d +var $sel; $sliced : cs.EmployeeSelection +$sel:=ds.Employee.query("salary > :1";50000) +$sliced:=$sel.slice(0;9) // +``` + + +#### Ejemplo 2 + +Assuming we have ds.Employee.all().length = 10 + +```4d +var $slice : cs.EmployeeSelection +$slice:=ds.Employee.all().slice(-1;-2) //tries to return entities from index 9 to 8, but since 9 > 8, returns an empty entity selection + +``` + + + +## .sum( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + + +
    + +**.sum**( *attributePath* : Text ) : Real +| Parameter | Tipo | | Descripción | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texto | -> | Path of the attribute to be used for calculation | +| Resultado | Real | <- | Sum of entity selection values | + +#### Descripción + + +The `.sum()` function returns the sum for all *attributePath* values in the entity selection. + +`.sum()` returns 0 if the entity selection is empty. + +The sum can only be done on values of number type. If the *attributePath* is an object property, only numerical values are taken into account for the calculation (other value types are ignored). In this case, if *attributePath* leads to a property that does not exist in the object or does not contain any numeric values, `.sum()` returns 0. + +An error is returned if: + +* *attributePath* is not a numerical or an object attribute, +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + + + +#### Ejemplo + +```4d +var $sel : cs.EmployeeSelection +var $sum : Real + +$sel:=ds.Employee.query("salary < :1";20000) +$sum:=$sel.sum("salary") +``` + + + +## .toCollection( ) + +
    History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
    + +**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
    **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
    **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection* +| Parameter | Tipo | | Descripción | +| ------------ | --------- |:--:| ------------------------------------------------------------------------------------ | +| filterString | Texto | -> | String with entity attribute path(s) to extract | +| filterCol | Colección | -> | Collection of entity attribute path(s) to extract | +| options | Entero | -> | `dk with primary key`: adds the primary key
    `dk with stamp`: adds the stamp | +| begin | Entero | -> | Designates the starting index | +| howMany | Entero | -> | Number of entities to extract | +| Resultado | Colección | <- | Collection of objects containing attributes and values of entity selection | + +#### Descripción + +The `.toCollection()` function creates and returns a collection where each element is an object containing a set of properties and values corresponding to the attribute names and values for the entity selection. + +If no filter parameter is passed or the first parameter contains an empty string or "*", all the attributes are extracted. Attributes with [kind](DataClassAttributeClass.md#kind) property as "relatedEntity" are extracted with the simple form: an object with property \_\_KEY (primary key). Attributes with kind property as "relatedEntities" are not extracted. + +Or, you can designate the entity attributes to extract using a filter parameter. You can use one of these two filters: + +* *filterString* --a string with property paths separated with commas: "propertyPath1, propertyPath2, ...". +* *filterCol* --a collection of strings containing property paths: \["propertyPath1","propertyPath2",...] + + +If a filter is specified for an attribute of the `relatedEntity` kind: + +* propertyPath = "relatedEntity" -> it is extracted with simple form +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1, relatedEntity.propertyName2, ..." -> only those properties are extracted + + +If a filter is specified for an attribute of the `relatedEntities` kind: + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1, relatedEntities.propertyName2, ..." -> only those properties are extracted + + + +In the *options* parameter, you can pass the `dk with primary key` and/or `dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + +The *begin* parameter allows you to indicate the starting index of the entities to extract. You can pass any value between 0 and entity selection length-1. + +The *howMany* parameter lets you specify the number of entities to extract, starting with the one specified in *begin*. Dropped entities are not returned but are taken into account according to *howMany*. For example, if *howMany*= 3 and there is 1 dropped entity, only 2 entities are extracted. + +If *howMany* > length of the entity selection, the method returns (length - *begin*) objects. + +An empty collection is returned if: + +* the entity selection is empty, or +* *begin* is greater than the length of the entity selection. + + +#### Ejemplo 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Example without filter or options parameter: + +```4d + var $employeesCollection : Collection + var $employees : cs.EmployeeSelection + + $employeesCollection:=New collection + $employees:=ds.Employee.all() + $employeesCollection:=$employees.toCollection() +``` + +Returns: + +```4d +[ + { + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + + } + }, + { + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + } +] +``` + +#### Ejemplo 2 + +Example with options: + +```4d +var $employeesCollection : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +[ + { + "__KEY": 416, + "__STAMP": 1, + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }, + { + "__KEY": 417, + "__STAMP": 1, + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }] +``` + +#### Example 3 + +Example with slicing and filtering on properties: + +```4d +var $employeesCollection; $filter : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$filter:=New collection +$filter.push("firstName") +$filter.push("lastName") + +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection($filter;0;0;2) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl" + }, + { + "firstName": "Irma", + "lastName": "Durham" + } +] + +``` + + +#### Example 4 + +Example with `relatedEntity` type with simple form: + + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName,lastName,employer") +``` + +returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "__KEY": 20 + } + } + ] +``` + +#### Example 5 + +Example with *filterCol* parameter: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection("firstName";"lastName") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Joanna", + "lastName": "Cabrera" + }, + { + "firstName": "Alexandra", + "lastName": "Coleman" + } +] +``` + +#### Example 6 + +Example with extraction of all properties of a relatedEntity: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection +$coll.push("firstName") +$coll.push("lastName") +$coll.push("employer.*") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + } + ] +``` + +#### Example 7 + +Example with extraction of some properties of a relatedEntity: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, employer.name") +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "name": "India Astral Secretary" + } + }] +``` + +#### Example 8 + +Example with extraction of some properties of `relatedEntities`: + +```4d + var $employeesCollection : Collection + $employeesCollection:=New collection + $employeesCollection:=$employees.toCollection("firstName, lastName, directReports.firstName") +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "firstName": "Gary" + }, + { + "firstName": "Sadie" + }, + { + "firstName": "Christie" + } + ] + }, + { + "firstName": "Gary", + + "lastName": "Reichert", + "directReports": [ + { + "firstName": "Rex" + }, + { + "firstName": "Jenny" + }, + { + "firstName": "Lowell" + } + ] + }] +``` + +#### Example 9 + +Example with extraction of all properties of `relatedEntities`: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, directReports.*") + +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "ID": 425, + "firstName": "Gary", + "lastName": "Reichert", + "salary": 65800, + "birthDate": "1957-12-23T00:00:00.000Z", + "woman": false, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + }, + { + "ID": 426, + "firstName": "Sadie", + "lastName": "Gallant", + "salary": 35200, + "birthDate": "2022-01-03T00:00:00.000Z", + "woman": true, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + } + ] + }, + { + "firstName": "Gary", + "lastName": "Reichert", + "directReports": [ + { + "ID": 428, + "firstName": "Rex", + "lastName": "Chance", + "salary": 71600, + "birthDate": "1968-08-09T00:00:00.000Z", + "woman": false, + + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + }, + { + "ID": 429, + "firstName": "Jenny", + "lastName": "Parks", + "salary": 51300, + "birthDate": "1984-05-25T00:00:00.000Z", + "woman": true, + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + } + ] + } +] +``` + + + + + + + diff --git a/website/translated_docs/es/API/FileClass.md b/website/translated_docs/es/API/FileClass.md new file mode 100644 index 00000000000000..cfa1188d5a3390 --- /dev/null +++ b/website/translated_docs/es/API/FileClass.md @@ -0,0 +1,1168 @@ +--- +id: FileClass +title: File +--- + +`File` objects are created with the [`File`](#file) command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the `File` command to create a new file, a valid `File` object is created but nothing is actually stored on disk until you call the [`file.create( )`](#create) function. + +### Ejemplo + +The following example creates a preferences file in the project folder: + +```code4d +var $created : Boolean +$created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + +### File object + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](#copyto)

        copies the `File` object into the specified *destinationFolder* | +| [**.create()** : Boolean ](#create)

        creates a file on disk according to the properties of the `File` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

        creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

        the creation date of the file | +| [**.creationTime** : Time](#creationtime)

        the creation time of the file | +| [**.delete( )**](#delete)

        deletes the file | +| [**.exists** : Boolean](#exists)

        true if the file exists on disk | +| [**.extension** : Text](#extension)

        the extension of the file name (if any) | +| [**.fullName** : Text](#fullname)

        the full name of the file, including its extension (if any) | +| [**.getAppInfo**() : Object](#getappinfo)

        returns the contents of a **.exe**, **.dll** or **.plist** file information as an object | +| [**.getContent( )** : 4D.Blob](#getcontent)

    returns a `4D.Blob` object containing the entire content of a file | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

        the icon of the file | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
    **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](#gettext)

        returns the contents of the file as text | +| [**.hidden** : Boolean](#hidden)

        true if the file is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

        true if the file is an alias, a shortcut, or a symbolic link | +| [**.isFile** : Boolean](#isfile)

        always true for a file | +| [**.isFolder** : Boolean](#isfolder)

        always false for a file | +| [**.isWritable** : Boolean](#iswritable)

        true if the file exists on disk and is writable | +| [**.modificationDate** : Date](#modificationdate)

        the date of the file's last modification | +| [**.modificationTime** : Time](#modificationtime)

        the time of the file's last modification | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File](#moveto)

        moves or renames the `File` object into the specified *destinationFolder* | +| [**.name** : Text](#name)

        the name of the file without extension (if any) | +| [**.original** : 4D.File
    **.original** : 4D.Folder](#original)

        the target element for an alias, a shortcut, or a symbolic link file | +| [**.parent** : 4D.Folder](#parent)

        the parent folder object of the file | +| [**.path** : Text](#path)

        the POSIX path of the file | +| [**.platformPath** : Text](#platformpath)

        the path of the file expressed with the current platform syntax | +| [**.rename**( *newName* : Text ) : 4D.File](#rename)

        renames the file with the name you passed in *newName* and returns the renamed `File` object | +| [**.setAppInfo**( *info* : Object )](#setappinfo)

        writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file | +| [**.setContent** ( *content* : Blob ) ](#setcontent)

        rewrites the entire content of the file using the data stored in the *content* BLOB | +| [**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
    **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) ](#settext)

        writes *text* as the new contents of the file | +| [**.size** : Real](#size)

        the size of the file expressed in bytes | + + + +## File + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**File** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
    **File** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +| Parameter | Tipo | | Descripción | +| ------------ | ------- |:--:| ----------------------------------------------- | +| path | Texto | -> | File path | +| fileConstant | Entero | -> | 4D file constant | +| pathType | Entero | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return file of host database | +| Resultado | 4D.File | <- | New file object | + + +#### Descripción + +The `File` command creates and returns a new object of the `4D.File` type. The command accepts two syntaxes: + +**File ( path { ; pathType } { ; \* })** + +In the *path* parameter, pass a file path string. You can use a custom string or a filesystem (e.g., "/DATA/myfile.txt"). + +> Only absolute pathnames are supported with the `File` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Valor | Comment | +| ---------------- | ----- | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**File ( fileConstant { ; \* } )** + +In the *fileConstant* parameter, pass a 4D built-in or system file, using one of the following constants: + +| Constant | Valor | Comment | +| --------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Backup history file | 19 | Backup history file (see Configuration and trace files). Stored in the backup destination folder. | +| Backup log file | 13 | Current backup journal file. Stored in the application Logs folder. | +| Backup settings file | 1 | Default backup.4DSettings file (xml format), stored in the Settings folder of the project | +| Backup settings file for data | 17 | backup.4DSettings file (xml format) for the data file, stored in the Settings folder of the data folder | +| Build application log file | 14 | Current log file in xml format of the application builder. Stored in the Logs folder. | +| Build application settings file | 20 | Default settings file of the application builder ("buildApp.4DSettings"). Stored in the Settings folder of the project. | +| Compacting log file | 6 | Log file of the most recent compacting done with the Compact data file command or the Maintenance and security center. Stored in the Logs folder. | +| Current backup settings file | 18 | backup.4DSettings file currently used by the application. It can be the backup settings file (default) or a custom user backup settings file defined for the data file | +| Debug log file | 12 | Log file created by the `SET DATABASE PARAMETER(Debug log recording)` command. Stored in the Logs folder. | +| Diagnostic log file | 11 | Log file created by the `SET DATABASE PARAMETER(Diagnostic log recording)` command. Stored in the Logs folder. | +| Directory file | 16 | directory.json file, containing the description of users and groups (if any) for the project application. It can be located either in the user settings folder (default, global to the project), or in the data settings folder (specific to a data file). | +| HTTP debug log file | 9 | Log file created by the `WEB SET OPTION(Web debug log)` command. Stored in the Logs folder. | +| HTTP log file | 8 | Log file created by the `WEB SET OPTION(Web log recording)` command. Stored in Logs folder. | +| IMAP Log file | 23 | Log file created by the `SET DATABASE PARAMETER(IMAP Log)` command. Stored in the Logs folder. | +| Last backup file | 2 | Last backup file, named \[bkpNum].4BK, stored at a custom location. | +| Last journal integration log file | 22 | Full pathname of the last journal integration log file (stored in the Logs folder of the restored application), if any. This file is created, in auto-repair mode, as soon as a log file integration occurred | +| Repair log file | 7 | Log file of database repairs made on the database in the Maintenance and Security Center (MSC). Stored in the Logs folder. | +| Request log file | 10 | Standard client/server request log file (excluding Web requests) created by the `SET DATABASE PARAMETER(4D Server log recording)` or `SET DATABASE PARAMETER(Client log recording)` commands. If executed on the server, the server log file is returned (stored in the Logs folder on the server). If executed on the client, the client log file is returned (stored in the client local Logs folder). | +| SMTP log file | 15 | Log file created by the `SET DATABASE PARAMETER(SMTP Log)` command. Stored in the Logs folder. | +| User settings file | 3 | settings.4DSettings file for all data files, stored in Preferences folder next to structure file if enabled. | +| User settings file for data | 4 | settings.4DSettings file for current data file, stored in Preferences folder next to the data file. | +| Verification log file | 5 | Log files created by the `VERIFY CURRENT DATA FILE` and `VERIFY DATA FILE` commands or the Maintenance and Security Center (MSC). Stored in the Logs folder. | + +If the target *fileConstant* does not exist, a null object is returned. No errors are raised. + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.File.new() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**4D.File.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
    **4D.File.new** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +#### Descripción + +The `4D.File.new()` function creates and returns a new object of the `4D.File` type. It is identical to the [`File`](#file) command (shortcut). + +> It is recommended to use the [`File`](#file) shortcut command instead of `4D.File.new()`. + + +## .copyTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Parameter | Tipo | | Descripción | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Name for the copy | +| overwrite | Entero | -> | `fk overwrite` to replace existing elements | +| Resultado | 4D.File | <- | Copied file | + + +#### Descripción + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valor | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `File` object. + +#### Ejemplo + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + + +## .create() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**Not available for ZIP archives** + +**.create()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- | -- | ---------------------------------------------------------- | +| Resultado | Booleano | <- | True if the file was created successfully, false otherwise | + +#### Descripción + +The `.create()` function creates a file on disk according to the properties of the `File` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the file already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the file is created successfully; +* **False** if a file with the same name already exists or if an error occured. + +#### Ejemplo + +Creation of a preferences file in the database folder: + +```4d + var $created : Boolean + $created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + + + + + +## .createAlias() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File +| Parameter | Tipo | | Descripción | +| ----------------- | --------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Texto | -> | Name of the alias or shortcut | +| aliasType | Entero | -> | Type of the alias link | +| Resultado | 4D.File | <- | Alias or shortcut file reference | + + +#### Descripción + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the file with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Valor | Comment | +| ------------------ | ----- | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Ejemplo + +You want to create an alias to a file in your database folder: + +```4d + $myFile:=Folder(fk documents folder).file("Archives/ReadMe.txt") + $aliasFile:=$myFile.createAlias(File("/PACKAGE");"ReadMe") +``` + + + + +## .creationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationDate** : Date + +#### Descripción + +The `.creationDate` property returns the creation date of the file. + +This property is **read-only**. + + + + + + +## .creationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationTime** : Time + +#### Descripción + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .delete() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.delete( )** + +| Parameter | Tipo | | Descripción | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.delete()` function deletes the file. + +If the file is currently open, an error is generated. + +If the file does not exist on disk, the function does nothing (no error is generated). +> **WARNING**: `.delete( )` can delete any file on a disk. This includes documents created with other applications, as well as the applications themselves. `.delete( )` should be used with extreme caution. Deleting a file is a permanent operation and cannot be undone. + +#### Ejemplo + +You want to delete a specific file in the database folder: + +```4d + $tempo:=File("/PACKAGE/SpecialPrefs/"+Current user+".prefs") + If($tempo.exists) + $tempo.delete() + ALERT("User preference file deleted.") + End if +``` + + + + +## .exists + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.exists** : Boolean + +#### Descripción + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +This property is **read-only**. + + + + + + + +## .extension + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.extension** : Text +#### Descripción + +The `.extension` property returns the extension of the file name (if any). An extension always starts with ".". The property returns an empty string if the file name does not have an extension. + +This property is **read-only**. + + + + + + +## .fullName + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.fullName** : Text +#### Descripción + +The `.fullName` property returns the full name of the file, including its extension (if any). + +This property is **read-only**. + + + + +## .getAppInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.getAppInfo**() : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ----------------------------------------------------- | +| Resultado | Objeto | <- | Contents of .exe/.dll version resource or .plist file | + + +#### Descripción + +The `.getAppInfo()` function returns the contents of a **.exe**, **.dll** or **.plist** file information as an object. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function returns an empty object (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +**Returned object with a .exe or .dll file** + +> Reading a .exe or .dll is only possible on Windows. + +All property values are Text. + +| Propiedad | Tipo | +| ---------------- | ----- | +| InternalName | Texto | +| ProductName | Texto | +| CompanyName | Texto | +| LegalCopyright | Texto | +| ProductVersion | Texto | +| FileDescription | Texto | +| FileVersion | Texto | +| OriginalFilename | Texto | + +**Returned object with a .plist file** + +The xml file contents is parsed and keys are returned as properties of the object, preserving their types (text, boolean, number). `.plist dict` is returned as a JSON object and `.plist array` is returned as a JSON array. + +#### Ejemplo + +```4d + // display copyright info of application .exe file (windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=$exeFile.getAppInfo() +ALERT($info.LegalCopyright) + + // display copyright info of an info.plist (any platform) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=$infoPlistFile.getAppInfo() +ALERT($info.Copyright) +``` + +#### Ver también + +[.setAppInfo()](#setappinfo) + + + +## .getContent() + +
    History +| Version | Changes | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Added | +
    + +**.getContent( )** : 4D.Blob +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | ------------ | +| Resultado | 4D.Blob | <- | File content | + + +#### Descripción + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Returned value** + +A `4D.Blob` object. + +#### Ejemplo + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + + + +## .getIcon() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | --------------------------------------------- | +| size | Entero | -> | Side length for the returned picture (pixels) | +| Resultado | Imagen | <- | Icono | + + +#### Descripción + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Returned value** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
    **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Parameter | Tipo | | Descripción | +| ----------- | ------ | -- | ------------------------------- | +| charSetName | Texto | -> | Name of character set | +| charSetNum | Entero | -> | Number of character set | +| breakMode | Entero | -> | Processing mode for line breaks | +| Resultado | Texto | <- | Text from the document | + + +#### Descripción +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Valor | Comment | +| ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Returned value** + +Text of the file. + +#### Ejemplo + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + +## .hidden + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.hidden** : Boolean + +#### Descripción + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + +## .isAlias + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isAlias** : Boolean + +#### Descripción + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +This property is **read-only**. + + + + + +## .isFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFile** : Boolean + +#### Descripción + +The `.isFile` property returns always true for a file. + +This property is **read-only**. + + + + + + +## .isFolder + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFolder** : Boolean + +#### Descripción + +The `.isFolder` property returns always false for a file. + +This property is **read-only**. + + + + + + +## .isWritable + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isWritable** : Boolean + +#### Descripción + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +This property is **read-only**. + +**Ejemplo** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + + +## .modificationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationDate** : Date + +#### Descripción + +The `.modificationDate` property returns the date of the file's last modification. + +This property is **read-only**. + + + + + + +## .modificationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationTime** : Time + +##### Descripción + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + +## .moveTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File +| Parameter | Tipo | | Descripción | +| ----------------- | --------- | -- | ---------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Full name for the moved file | +| Resultado | 4D.File | <- | Moved file | + + +#### Descripción + +The `.moveTo()` function moves or renames the `File` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file retains its name when moved. If you want to rename the moved file, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + + +**Returned object** + +The moved `File` object. + +#### Ejemplo + + +```4d +$DocFolder:=Folder(fk documents folder) +$myFile:=$DocFolder.file("Current/Infos.txt") +$myFile.moveTo($DocFolder.folder("Archives");"Infos_old.txt") +``` + + + + +## .name + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.name** : Text + +#### Descripción + +The `.name` property returns the name of the file without extension (if any). + +This property is **read-only**. + + + + + +## .original + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.original** : 4D.File
    **.original** : 4D.Folder + +#### Descripción + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +This property is **read-only**. + + + + + +## .parent + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.parent** : 4D.Folder + +#### Descripción + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +This property is **read-only**. + + + + + +## .path + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.path** : Text + +#### Descripción + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + + +## .platformPath + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.platformPath** : Text + +#### Descripción + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +This property is **read-only**. + + + + + +## .rename() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.rename**( *newName* : Text ) : 4D.File +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | -------------------------- | +| newName | Texto | -> | New full name for the file | +| Resultado | 4D.File | <- | Renamed file | + +#### Descripción + +The `.rename()` function renames the file with the name you passed in *newName* and returns the renamed `File` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + +Note that the function modifies the full name of the file, i.e. if you do not pass an extension in *newName*, the file will have a name without an extension. + + +**Returned object** + +The renamed `File` object. + +#### Ejemplo + +You want to rename "ReadMe.txt" in "ReadMe_new.txt": + +```4d + $toRename:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + $newName:=$toRename.rename($toRename.name+"_new"+$toRename.extension) +``` + + +## .setAppInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.setAppInfo**( *info* : Object ) +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ---------------------------------------------------------------- | +| info | Objeto | -> | Properties to write in .exe/.dll version resource or .plist file | + + +#### Descripción + +The `.setAppInfo()` function writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function does nothing (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +***info* parameter object with a .exe or .dll file** + +> Writing a .exe or .dll file information is only possible on Windows. + +Each valid property set in the *info* object parameter is written in the version resource of the .exe or .dll file. Available properties are (any other property will be ignored): + +| Propiedad | Tipo | +| ---------------- | ----- | +| InternalName | Texto | +| ProductName | Texto | +| CompanyName | Texto | +| LegalCopyright | Texto | +| ProductVersion | Texto | +| FileDescription | Texto | +| FileVersion | Texto | +| OriginalFilename | Texto | + +If you pass a null or empty text as value, an empty string is written in the property. If you pass a value type different from text, it is stringified. + + +***info* parameter object with a .plist file** + +Each valid property set in the *info* object parameter is written in the .plist file as a key. Any key name is accepted. Value types are preserved when possible. + +If a key set in the *info* parameter is already defined in the .plist file, its value is updated while keeping its original type. Other existing keys in the .plist file are left untouched. + +> To define a Date type value, the format to use is a json timestamp string formated in ISO UTC without milliseconds ("2003-02-01T01:02:03Z") like in the Xcode plist editor. + +#### Ejemplo + +```4d + // set copyright and version of a .exe file (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=New object +$info.LegalCopyright:="Copyright 4D 2021" +$info.ProductVersion:="1.0.0" +$exeFile.setAppInfo($info) +``` + +```4d + // set some keys in an info.plist file (all platforms) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=New object +$info.Copyright:="Copyright 4D 2021" //text +$info.ProductVersion:=12 //integer +$info.ShipmentDate:="2021-04-22T06:00:00Z" //timestamp +$infoPlistFile.setAppInfo($info) +``` + +#### Ver también + +[.getAppInfo()](#getappinfo) + +## .setContent() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.setContent** ( *content* : Blob ) +| Parameter | Tipo | | Descripción | +| --------- | ---- | -- | ------------------------- | +| content | BLOB | -> | New contents for the file | + + +#### Descripción + +The `.setContent( )` function rewrites the entire content of the file using the data stored in the *content* BLOB. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + + +#### Ejemplo + +```4d + $myFile:=Folder(fk documents folder).file("Archives/data.txt") + $myFile.setContent([aTable]aBlobField) +``` + + + + + +## .setText() + + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
    **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) + +| Parameter | Tipo | | Descripción | +| ----------- | ------ | -- | ------------------------------- | +| texto | Texto | -> | Text to store in the file | +| charSetName | Texto | -> | Name of character set | +| charSetNum | Entero | -> | Number of character set | +| breakMode | Entero | -> | Processing mode for line breaks | +#### Descripción + +The `.setText()` function writes *text* as the new contents of the file. + +If the file referenced in the `File` object does not exist on the disk, it is created by the function. When the file already exists on the disk, its prior contents are erased, except if it is already open, in which case, its contents are locked and an error is generated. + +In *text*, pass the text to write to the file. It can be a literal ("my text"), or a 4D text field or variable. + +Optionally, you can designate the character set to be used for writing the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If a Byte Order Mark (BOM) exists for the character set, 4D inserts it into the file unless the character set used contains the suffix "-no-bom" (e.g. "UTF-8-no-bom"). If you do not specify a character set, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters before saving them in the file. The following constants, found in the **System Documents** theme, are available: + +| Constant | Valor | Comment | +| ----------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: LF (carriage return) on macOS, CRLF (carriage return + line feed) on Windows | +| `Document with CRLF` | 2 | Line breaks are converted to CRLF (carriage return + line feed), the default Windows format | +| `Document with CR` | 3 | Line breaks are converted to CR (carriage return), the default Classic Mac OS format | +| `Document with LF` | 4 | Line breaks are converted to LF (line feed), the default Unix and macOS format | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +> **Compatibility Note**: compatibility options are available for EOL and BOM management. See [Compatibility page](https://doc.4d.com/4dv19R/help/title/en/page3239.html) on doc.4d.com. + +#### Ejemplo + +```4d +$myFile:=File("C:\\Documents\\Hello.txt";fk platform path) +$myFile.setText("Hello world") +``` + + + + + +## .size + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.size** : Real + +#### Descripción + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +This property is **read-only**. + + + + + + diff --git a/website/translated_docs/es/API/FolderClass.md b/website/translated_docs/es/API/FolderClass.md new file mode 100644 index 00000000000000..d26eff8dce4b73 --- /dev/null +++ b/website/translated_docs/es/API/FolderClass.md @@ -0,0 +1,957 @@ +--- +id: FolderClass +title: Folder +--- + + + +`Folder` objects are created with the [`Folder`](#folder) command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the `Folder` command to create a new folder, a valid `Folder` object is created but nothing is actually stored on disk until you call the [`folder.create( )`](#create-) function. + +### Ejemplo + +The following example creates a "JohnSmith" folder: + +```code4d +Form.curfolder:=Folder(fk database folder) +Form.curfolder:=Folder("C:\\Users\\JohnSmith\\";fk platform path) +``` + +### Folder object + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](#copyto)

        copies the `Folder` object into the specified *destinationFolder* | +| [**.create()** : Boolean](#create)

        creates a folder on disk according to the properties of the `Folder` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

        creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

        the creation date of the folder | +| [**.creationTime** : Time](#creationtime)

        the creation time of the folder | +| [**.delete**( { *option* : Integer } )](#delete)

        deletes the folder | +| [**.exists** : Boolean](#exists)

        true if the folder exists on disk | +| [**.extension** : Text](#extension)

        returns the extension of the folder name (if any) | +| [**.fullName** : Text](#fullname)

        returns the full name of the folder, including its extension (if any) | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

        returns the icon of the folder | +| [**.hidden** : Boolean](#hidden)

         true if the folder is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

        always **false** for a `Folder` object | +| [**.isFile** : Boolean](#isfile)

        always **false** for a folder | +| [**.isFolder** : Boolean](#isfolder)

        always **true** for a folder | +| [**.isPackage** : Boolean](#ispackage)

        true if the folder is a package on macOS (and exists on disk) | +| [**.modificationDate** : Date](#modificationdate)

         the date of the folder's last modification | +| [**.modificationTime** : Time](#modificationtime)

        the time of the folder's last modification | +| [**.name** : Text](#name)

         the name of the folder, without extension (if any) | +| [**.original** : 4D.Folder](#original)

        the same Folder object as the folder | +| [**.parent** : 4D.Folder](#parent)

        the parent folder object of the folder | +| [**.path** : Text](#path)

        the POSIX path of the folder | +| [**.platformPath** : Text](#platformpath)

        the path of the folder expressed with the current platform syntax | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder](#moveto)

        moves or renames the `Folder` object (source folder) into the specified *destinationFolder* | +| [**.rename**( *newName* : Text ) : 4D.Folder](#rename)

        renames the folder with the name you passed in *newName* and returns the renamed `Folder` object | + + + +## Folder + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**Folder** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
    **Folder** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +| Parameter | Tipo | | Descripción | +| -------------- | --------- |:--:| ----------------------------------------------- | +| path | Texto | -> | Folder path | +| folderConstant | Entero | -> | 4D folder constant | +| pathType | Entero | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return folder of host database | +| Resultado | 4D.Folder | <- | New folder object | + + +#### Descripción + +The `Folder` command creates and returns a new object of the `4D.Folder` type. The command accepts two syntaxes: + +**Folder ( path { ; pathType } { ; \* } )** + +In the *path* parameter, pass a folder path string. You can use a custom string or a filesystem (e.g., "/DATA"). + +> Only absolute pathnames are supported with the `Folder` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Valor | Comment | +| ---------------- | ----- | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**Folder ( folderConstant { ; \* } )** + +In the *folderConstant* parameter, pass a 4D built-in or system folder, using one of the following constants: + +| Constant | Valor | Comment | +| -------------------------- | ----- | --------------------------------------------------------------------------------------------------- | +| fk applications folder | 116 | | +| fk data folder | 9 | Associated filesystem: "/DATA" | +| fk database folder | 4 | Associated filesystem: "/PACKAGE" | +| fk desktop folder | 115 | | +| fk documents folder | 117 | Document folder of the user | +| fk licenses folder | 1 | Folder containing the machine's 4D license files | +| fk logs folder | 7 | Associated filesystem: "/LOGS" | +| fk mobileApps folder | 10 | Associated filesystem: "/DATA" | +| fk remote database folder | 3 | 4D database folder created on each 4D remote machine | +| fk resources folder | 6 | Associated filesystem: "/RESOURCES" | +| fk system folder | 100 | | +| fk user preferences folder | 0 | 4D folder that stores user preference files within the \ directory. | +| fk web root folder | 8 | Current Web root folder of the database: if within the package "/PACKAGE/path", otherwise full path | + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.Folder.new() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**4D.Folder.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
    **4D.Folder.new** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +#### Descripción + +The `4D.Folder.new()` function creates and returns a new object of the `4D.Folder` type. It is identical to the [`Folder`](#folder) command (shortcut). + +> It is recommended to use the [`Folder`](#folder) shortcut command instead of `4D.Folder.new()`. + + +## .copyTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Parameter | Tipo | | Descripción | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Name for the copy | +| overwrite | Entero | -> | `fk overwrite` to replace existing elements | +| Resultado | 4D.Folder | <- | Copied file or folder | + + +#### Descripción + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valor | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `Folder` object. + +#### Ejemplo + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + + + + +## .create() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + + +**.create()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- | -- | ------------------------------------------------------------ | +| Resultado | Booleano | <- | True if the folder was created successfully, false otherwise | + + + +#### Descripción + +The `.create()` function creates a folder on disk according to the properties of the `Folder` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the folder already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the folder is created successfully; +* **False** if a folder with the same name already exists or if an error occured. + +#### Ejemplo 1 + +Create an empty folder in the database folder: + +```4d +var $created : Boolean +$created:=Folder("/PACKAGE/SpecialPrefs").create() +``` + +#### Ejemplo 2 + +Creation of the "/Archives2019/January/" folder in the database folder: + +```4d +$newFolder:=Folder("/PACKAGE/Archives2019/January") +If($newFolder.create()) + ALERT("The "+$newFolder.name+" folder was created.") +Else + ALERT("Impossible to create a "+$newFolder.name+" folder.") +End if +``` + + + + + +## .createAlias() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + +| Parameter | Tipo | | Descripción | +| ----------------- | --------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Texto | -> | Name of the alias or shortcut | +| aliasType | Entero | -> | Type of the alias link | +| Resultado | 4D.File | <- | Alias or shortcut reference | + + +#### Descripción + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the folder with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Valor | Comment | +| ------------------ | ----- | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Ejemplo + +You want to create an alias to an archive folder in your database folder: + +```4d +$myFolder:=Folder("C:\\Documents\\Archives\\2019\\January";fk platform path) +$aliasFile:=$myFolder.createAlias(Folder("/PACKAGE");"Jan2019") +``` + + +## .creationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationDate** : Date + +#### Descripción + +The `.creationDate` property returns the creation date of the folder. + +This property is **read-only**. + + + + +## .creationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.creationTime** : Time + + +#### Descripción + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .delete() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + + +**.delete**( { *option* : Integer } ) + +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | ---------------------- | +| option | Entero | -> | Folder deletion option | + + + +#### Descripción + +The `.delete()` function deletes the folder. + +By default, for security reasons, if you omit the option parameter, `.delete( )` only allows empty folders to be deleted. If you want the command to be able to delete folders that are not empty, you must use the option parameter with one of the following constants: + +| Constant | Valor | Comment | +| ---------------------- | ----- | ------------------------------------------------ | +| `Delete only if empty` | 0 | Deletes folder only when it is empty | +| `Delete with contents` | 1 | Deletes folder along with everything it contains | + +When `Delete only if empty` is passed or if you omit the option parameter: + +* The folder is only deleted if it is empty; otherwise, the command does nothing and an error -47 is generated. +* If the folder does not exist, the error -120 is generated. + +When `Delete with contents` is passed: + +* The folder, along with all of its contents, is deleted. **Warning**: Even when this folder and/or its contents are locked or set to read-only, if the current user has suitable access rights, the folder (and contents) is still deleted. +* If this folder, or any of the files it contains, cannot be deleted, deletion is aborted as soon as the first inaccessible element is detected, and an error(*) is returned. In this case, the folder may be only partially deleted. When deletion is aborted, you can use the `GET LAST ERROR STACK` command to retrieve the name and path of the offending file. +* If the folder does not exist, the command does nothing and no error is returned. (*) Windows: -54 (Attempt to open locked file for writing) macOS: -45 (The file is locked or the pathname is not correct) + + + + +## .exists + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.exists** : Boolean + +#### Descripción + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +This property is **read-only**. + + + + + +## .extension + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.extension** : Text + +#### Descripción + +The `.extension` property returns the extension of the folder name (if any). An extension always starts with ".". The property returns an empty string if the folder name does not have an extension. + +This property is **read-only**. + + + + + +## .file() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.file**( *path* : Text ) : 4D.File +| Parameter | Tipo | | Descripción | +| --------- | ------- | -- | ------------------------------------ | +| path | Texto | -> | Relative POSIX file pathname | +| Resultado | 4D.File | <- | `File` object (null if invalid path) | + +#### Descripción + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `File` object or null if *path* is invalid. + +#### Ejemplo + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + + + + +## .files() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.files**( { *options* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ----------------------------------- | +| options | Entero | -> | File list options | +| Resultado | Colección | <- | Collection of children file objects | + +#### Descripción + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valor | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `File` objects. + +#### Ejemplo 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Ejemplo 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + + + + +## .folder() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.folder**( *path* : Text ) : 4D.Folder +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ---------------------------------------------- | +| path | Texto | -> | Relative POSIX file pathname | +| Resultado | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Descripción + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `Folder` object or null if *path* is invalid. + +#### Ejemplo + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + + + + +## .folders() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.folders**( { *options* : Integer } ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ------------------------------------- | +| options | Entero | -> | Folder list options | +| Resultado | Colección | <- | Collection of children folder objects | + +#### Descripción + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valor | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `Folder` objects. + +#### Ejemplo + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + + + + +## .fullName + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.fullName** : Text + +#### Descripción + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +This property is **read-only**. + + + + + +## .getIcon() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | --------------------------------------------- | +| size | Entero | -> | Side length for the returned picture (pixels) | +| Resultado | Imagen | <- | Icono | + + +#### Descripción + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Returned value** + +Folder icon [picture](Concepts/dt_picture.md). + + + + + +## .hidden + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.hidden** : Boolean + +#### Descripción + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + + +## .isAlias + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isAlias** : Boolean + + +#### Descripción + +The `.isAlias` property returns always **false** for a `Folder` object. + +This property is **read-only**. + + + + + + +## .isFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFile** : Boolean + +#### Descripción + +The `.isFile` property returns always **false** for a folder. + +This property is **read-only**. + + + + + + +## .isFolder + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isFolder** : Boolean + +#### Descripción + +The `.isFolder` property returns always **true** for a folder. + +This property is **read-only**. + + + + + + +## .isPackage + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.isPackage** : Boolean + +#### Descripción + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Otherwise, it returns false. + +On Windows, `.isPackage` always returns **false**. + +This property is **read-only**. + + + + + + +## .modificationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationDate** : Date + +#### Descripción + +The `.modificationDate` property returns the date of the folder's last modification. + +This property is **read-only**. + + + + + + +## .modificationTime + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.modificationTime** : Time + +#### Descripción + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + +## .moveTo() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder +| Parameter | Tipo | | Descripción | +| ----------------- | --------- | -- | ------------------------------ | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texto | -> | Full name for the moved folder | +| Resultado | 4D.Folder | <- | Moved folder | + + +#### Descripción + +The `.moveTo( )` function moves or renames the `Folder` object (source folder) into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder retains its name when moved. If you want to rename the moved folder, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +**Returned object** + +The moved `Folder` object. + +#### Ejemplo + +You want to move and rename a folder: + +```4d + var $tomove; $moved : Object + $docs:=Folder(fk documents folder) + $tomove:=$docs.folder("Pictures") + $tomove2:=$tomove.moveTo($docs.folder("Archives");"Pic_Archives") +``` + + +## .name + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + + + +**.name** : Text + +#### Descripción + +The `.name` property returns the name of the folder, without extension (if any). + +This property is **read-only**. + + + + + + +## .original + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.original** : 4D.Folder + +#### Descripción + +The `.original` property returns the same Folder object as the folder. + +This property is **read-only**. +> This property is available on folders to allow generic code to process folders or files. + + + + + + +## .parent + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.parent** : 4D.Folder + +#### Descripción + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +This property is **read-only**. + + + + + + +## .path + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.path** : Text + +#### Descripción + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + + +## .platformPath + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.platformPath** : Text + +#### Descripción + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +This property is **read-only**. + + + + + + +## .rename() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.rename**( *newName* : Text ) : 4D.Folder + +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ---------------------------- | +| newName | Texto | -> | New full name for the folder | +| Resultado | 4D.Folder | <- | Renamed folder | + + + +#### Descripción + +The `.rename()` function renames the folder with the name you passed in *newName* and returns the renamed `Folder` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + + +**Returned object** + +The renamed `Folder` object. + +#### Ejemplo + + +```4d + var $toRename : 4D.Folder + $toRename:=Folder("/RESOURCES/Pictures").rename("Images") +``` + + diff --git a/website/translated_docs/es/API/FunctionClass.md b/website/translated_docs/es/API/FunctionClass.md new file mode 100644 index 00000000000000..dd9e7425a7b1fe --- /dev/null +++ b/website/translated_docs/es/API/FunctionClass.md @@ -0,0 +1,420 @@ +--- +id: FunctionClass +title: Formula +--- + + + +The [Formula](#formula) and [Formula from string](#formula-from-string) commands allow you to create native [`4D.Function` objects](#about-4dfunction-objects) to execute any 4D expression or code expressed as text. + + +### Formula Objects + +Formula objects can be encapsulated in object properties: + +```4d + var $f : 4D.Function + $f:=New object + $f.message:=Formula(ALERT("Hello world")) +``` + +This property is an "object function", i.e. a function which is bound to its parent object. To execute a function stored in an object property, use the **()** operator after the property name, such as: + +```4d + $f.message() //displays "Hello world" +``` + +También se admite la sintaxis con paréntesis: + +```4d + $f["message"]() //muestra "Hello world" +``` + +Note that, even if it does not have parameters (see below), an object function to be executed must be called with ( ) parenthesis. Llamar sólo a la propiedad del objeto devolverá una nueva referencia a la fórmula (y no la ejecutará): + +```4d + $o:=$f.message //devuelve el objeto fórmula en $o +``` + +You can also execute a function using the [`apply()`](#apply) and [`call()`](#call) functions: + +```4d + $f.message.apply() //muestra "Hello world" +``` + +#### Passing parameters + +You can pass parameters to your formulas using the [sequential parameter syntax](Concepts/parameters.md#sequential-parameters) based upon $1, $2...$n. For example, you can write: + +```4d + var $f : Object + $f:=New object + $f.message:=Formula(ALERT("Hello "+$1)) + $f.message("John") //muestra "Hello John" +``` + +Or using the [.call()](#call) function: + +```4d + var $f : Object + $f:=Formula($1+" "+$2) + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call(Null;"Welcome to";String(Year of(Current date))) //returns "Welcome to 2019" (for example) +``` + +#### Parameters to a single method + +For more convenience, when the formula is made of a single project method, parameters can be omitted in the formula object initialization. They can just be passed when the formula is called. Por ejemplo: + +```4d + var $f : 4D.Function + + $f:=Formula(myMethod) + //Writing Formula(myMethod($1;$2)) is not necessary + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call() //returns "How are you?" + + //myMethod + #DECLARE ($param1 : Text; $param2 : Text)->$return : Text + If(Count parameters=2) + $return:=$param1+" "+$param2 + Else + $return:="How are you?" + End if +``` + +Parameters are received within the method, in the order they are specified in the call. + +### About 4D.Function objects + +A `4D.Function` object contains a piece of code that can be executed from an object, either using the `()` operator, or using the [`apply()`](#apply) and [`call()`](#call) functions. 4D proposes three kinds of Function objects: + +- native functions, i.e. built-in functions from various 4D classes such as `collection.sort()` or `file.copyTo()`. +- user functions, created in user [classes](Concepts/classes.md) using the [Function keyword](Concepts/classes.md#function). +- formula functions, i.e. functions that can execute any 4D formula. + + + +### Summary + + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.apply**() : any
    **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any](#apply)

        executes the `formula` object to which it is applied and returns the resulting value | +| [**.call**() : any
    **.call**( *thisObj* : Object { ; ...*params* : any } ) : any](#call)

        executes the `formula` object to which it is applied and returns the resulting value | +| [**.source** : Text ](#source)

        contains the source expression of the `formula` as text | + + + + +## Formula + +

    History +| Version | Changes | +| ------- | -------------------------------- | +| v17 R6 | Renamed (New formula -> Formula) | +| v17 R3 | Added | +
    + +**Formula** ( *formulaExp* : Expression ) : 4D.Function +| Parameter | Tipo | | Descripción | +| ---------- | ----------- |:--:| ----------------------------------------- | +| formulaExp | Expresión | -> | Formula to be returned as object | +| Resultado | 4D.Function | <- | Native function encapsulating the formula | + + +#### Descripción + +The `Formula` command creates a `4D Function` object based upon the *formulaExp* expression. *formulaExp* can be as simple as a single value or complex, such as a project method with parameters. + +Having a formula as an object allows it to be passed as a parameter (calculated attribute) to commands or methods or to be executed from various components without needing to declare them as "shared by components and host database". When called, the formula object is evaluated within the context of the database or component that created it. + +The returned formula can be called with: + +* [`.call()`](#call) or [`.apply()`](#apply) methods, or +* object notation syntax (see [formula object](#formula-object)). + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + $o:=New object("myFormula";$f) + + //three different ways to call the formula + $f.call($o) //returns 3 + $f.apply($o) //returns 3 + $o.myFormula() //returns 3 +``` + +You can pass [parameters](#passing-parameters) to the `Formula`, as seen below in [example 4](#example-4). + +You can specify the object on which the formula is executed, as seen in [example 5](#example-5). The properties of the object can then be accessed via the `This` command. + +If *formulaExp* uses local variables, their values are copied and stored in the returned formula object when it is created. When executed, the formula uses these copied values rather than the current value of the local variables. Note that using arrays as local variables is not supported. + +The object created by `Formula` can be saved, for example, in a database field or in a blob document. + + +#### Ejemplo 1 + +A simple formula: + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + + var $o : Object + $o:=New object("f";$f) + + $result:=$o.f() // devuelve 3 +``` + +#### Ejemplo 2 + +A formula using local variables: + +```4d + + + $value:=10 + $o:=New object("f";Formula($value)) + $value:=20 + + $result:=$o.f() // devuelve 10 +``` + + +#### Example 3 + +A simple formula using parameters: + +```4d + $o:=New object("f";Formula($1+$2)) + $result:=$o.f(10;20) //devuleve 30 +``` + + +#### Example 4 + +A formula using a project method with parameters: + +```4d + $o:=New object("f";Formula(myMethod)) + $result:=$o.f("param1";"param2") // equivalent to $result:=myMethod("param1";"param2") +``` + + +#### Example 5 + +Using `This`: + +```4d + $o:=New object("fullName";Formula(This.firstName+" "+This.lastName)) + $o.firstName:="John" + $o.lastName:="Smith" + $result:=$o.fullName() //returns "John Smith" +``` + +#### Example 6 + +Calling a formula using object notation: + +```4d + var $feta; $robot : Object + var $calc : 4D.Function + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + //sets the formula to object properties + $feta.calc:=$calc + $robot.calc:=$calc + + //call the formula + $feta.calc() // $feta={name:Feta,price:12.5,quantity:5,total:62.5,calc:"[object Formula]"} + $robot.calc() // $robot={name:Robot,price:543,quantity:2,total:1086,calc:"[object Formula]"} +``` + + + + +## Formula from string + +
    History +| Version | Changes | +| ------- | ------------------------------------------------------ | +| v17 R6 | Renamed New formula from string -> Formula from string | +| v17 R3 | Added | +
    + +**Formula from string**( *formulaString* : Text ) : 4D.Function +| Parameter | Tipo | | Descripción | +| ------------- | ----------- |:--:| --------------------------------------- | +| formulaString | Texto | -> | Text formula to be returned as object | +| Resultado | 4D.Function | <- | Native object encapsulating the formula | + + +#### Descripción + +The `Formula from string` command creates a 4D.Function object based upon the *formulaString*. *formulaString* can be as simple as a single value or complex, such as a project method with parameters. + +This command is similar to [`Formula`](#formula), except that it handles a text-based formula. In most cases, it is recommended to use the `Formula` command. `Formula from string` should only be used when the original formula was expressed as text (e.g., stored externally in a JSON file). In this context, using syntax with tokens is highly advised. +> Because local variable contents can not be accessed by name in compiled mode, they can not be used in *formulaString*. An attempt to access a local variable with `Formula from string` will result in an error (-10737). + + +#### Ejemplo + +The following code will create a dialog accepting a formula in text format: + +```4d + var $textFormula : Text + var $f : 4D.Function + $textFormula:=Request("Please type a formula") + If(ok=1) + $f:=Formula from string($textFormula) + ALERT("Result = "+String($f.call())) + End if +``` + +![](assets/en/API/formulaDialog.png) + + +...and execute the formula: + + +![](assets/en/API/formulaAlert.png) + + + + + + +## .apply() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R3 | Added | +
    + +**.apply**() : any
    **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any +| Parameter | Tipo | | Descripción | +| ------------- | --------- |:--:| ----------------------------------------------------------------------- | +| thisObj | Objeto | -> | Object to be returned by the This command in the formula | +| formulaParams | Colección | -> | Collection of values to be passed as $1...$n when `formula` is executed | +| Resultado | any | <- | Value from formula execution | + + +#### Descripción + +The `.apply()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass a collection to be used as $1...$n parameters in the formula using the optional *formulaParams* parameter. + +Note that `.apply()` is similar to [`.call()`](#call) except that parameters are passed as a collection. This can be useful for passing calculated results. + + +#### Ejemplo 1 + +```4d + var $f : 4D.Function + $f:=Formula($1+$2+$3) + + $c:=New collection(10;20;30) + $result:=$f.apply(Null;$c) // devuelve 60 +``` + + +#### Ejemplo 2 + +```4d + var $calc : 4D.Function + var $feta; $robot : Object + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + $calc.apply($feta) // $feta={name:Feta,price:12.5,quantity:5,total:62.5} + $calc.apply($robot) // $robot={name:Robot,price:543,quantity:2,total:1086} +``` + + + +## .call() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R3 | Added | +
    + +**.call**() : any
    **.call**( *thisObj* : Object { ; ...*params* : any } ) : any +| Parameter | Tipo | | Descripción | +| --------- | ------ | -- | --------------------------------------------------------- | +| thisObj | Objeto | -> | Object to be returned by the This command in the formula | +| params | any | -> | Value(s) to be passed as $1...$n when formula is executed | +| Resultado | any | <- | Value from formula execution | + + +#### Descripción + +The `.call()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass values to be used as *$1...$n* parameters in the formula using the optional *params* parameter(s). + +Note that `.call()` is similar to [`.apply()`](#apply) except that parameters are passed directly. + +#### Ejemplo 1 + +```4d + var $f : 4D.Function + $f:=Formula(Uppercase($1)) + $result:=$f.call(Null;"hello") // devuelve "HELLO" +``` + +#### Ejemplo 2 + +```4d + $o:=New object("value";50) + $f:=Formula(This.value*2) + $result:=$f.call($o) // devuelve 100 +``` + + + + +## .source + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.source** : Text + +#### Descripción + +The `.source` property contains the source expression of the `formula` as text. + +This property is **read-only**. + +#### Ejemplo + +```4d + var $of : 4D.Function + var $tf : Text + $of:=Formula(String(Current time;HH MM AM PM)) + $tf:=$of.source //"String(Current time;HH MM AM PM)" +``` + + + + + diff --git a/website/translated_docs/es/API/IMAPTransporterClass.md b/website/translated_docs/es/API/IMAPTransporterClass.md new file mode 100644 index 00000000000000..c684fa67c37aae --- /dev/null +++ b/website/translated_docs/es/API/IMAPTransporterClass.md @@ -0,0 +1,1966 @@ +--- +id: IMAPTransporterClass +title: IMAPTransporter +--- + +The `IMAPTransporter` class allows you to retrieve messages from a IMAP email server. + + +### IMAP Transporter object + +IMAP Transporter objects are instantiated with the [IMAP New transporter](#imap-new-transporter) command. They provide the following properties and functions: + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | +| [**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#addflags)

        adds flags to the `msgIDs` for the specified `keywords` | +| [**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object](#append)

        appends a `mailObj` to the `destinationBox` | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

         checks the connection using information stored in the transporter object | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

        the maximum time (in seconds) allowed prior to checking the connection to the server | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#copy)

        copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server | +| [**.createBox**( *name* : Text ) : Object](#createbox)

        creates a mailbox with the given `name` | +| [**.delete**( *msgsIDs* : Collection ) : Object
    **.delete**( *allMsgs* : Integer ) : Object](#delete)

        sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs` | +| [**.deleteBox**( *name* : Text ) : Object](#deletebox)

        permanently removes the mailbox with the given `name` from the IMAP server | +| [**.expunge()** : Object](#expunge)

        removes all messages with the "deleted" flag from the IMAP mail server. | +| [**.getBoxInfo**( { *name* : Text }) : Object](#getboxinfo)

        returns a `boxInfo` object corresponding to the mailbox *name* | +| [**.getBoxList**( { *parameters* : Object } ) : Collection](#getboxlist)

        returns a collection of mailboxes describing all of the available mailboxes | +| [**.getDelimiter()** : Text](#getdelimiter)

        returns the character used to delimit levels of hierarchy in the mailbox name | +| [**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
    **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object](#getmail)

        returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
    **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object](#getmails)

        returns an object containing a collection of `Email` objects | +| [**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
    **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob](#getmimeasblob)

        returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.host** : Text](#host)

        the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | +| [ | + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#move)

        moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server| |[**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection](#numtoid)

        converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg*| |[**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#removeflags)

        removes flags from the `msgIDs` for the specified `keywords`| |[**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object](#renamebox)

        changes the name of a mailbox on the IMAP server| |[**.port** : Integer](#port)

         the port number used for mail transactions| |[**.searchMails**( *searchCriteria* : Text ) : Collection](#searchmails)

        searches for messages that match the given *searchCriteria* in the current mailbox| |[**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object](#selectbox)

        selects the `name` mailbox as the current mailbox| |[**.subscribe**( *name* : Text ) : Object](#subscribe)

        allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes| |[**.unsubscribe**( *name* : Text ) : Object](#unsubscribe)

        removes a mailbox from a set of subscribed mailboxes| |[**.user** : Text](#user)

         the user name used for authentication on the mail server| + + + +## IMAP New transporter + +

    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**IMAP New transporter**( *server* : Object ) : 4D.IMAPTransporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objeto | -> | Mail server information | +| Resultado | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + + +#### Descripción + +The `IMAP New transporter` command configures a new IMAP connection according to the *server* parameter and returns a new *transporter* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

        the maximum time (in seconds) allowed prior to checking the connection to the server | 300 | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

        the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | none | +| .**password** : Text

    User password for authentication on the server. Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.port** : Integer](#port)

         the port number used for mail transactions | 993 | +| [**.user** : Text](#user)

         the user name used for authentication on the mail server | none | +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + +#### Resultado + +The function returns an [**IMAP transporter object**](#imap-transporter-object). All returned properties are **read-only**. +> The IMAP connection is automatically closed when the transporter object is destroyed. + +#### Ejemplo + +```4d +$server:=New object +$server.host:="imap.gmail.com" //Mandatory +$server.port:=993 +$server.user:="4d@gmail.com" +$server.password:="XXXXXXXX" +$server.logFile:="LogTest.txt" //log to save in the Logs folder + +var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + +$status:=$transporter.checkConnection() +If(Not($status.success)) + ALERT("An error occurred: "+$status.statusText) +End if +``` + + +## 4D.IMAPTransporter.new() + + +**4D.IMAPTransporter.new**( *server* : Object ) : 4D.IMAPTransporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objeto | -> | Mail server information | +| Resultado | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + +#### Descripción + +The `4D.IMAPTransporter.new()` function creates and returns a new object of the `4D.IMAPTransporter` type. It is identical to the [`IMAP New transporter`](#imap-new-transporter) command (shortcut). + +## .acceptUnsecureConnection + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.acceptUnsecureConnection** : Boolean + +#### Descripción + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + +## .addFlags() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Colección | -> | Collection of strings: Message unique IDs (text)
    Text: Unique ID of a message
    Longint (IMAP all): All messages in the selected mailbox | +| keywords | Objeto | -> | Keyword flags to add | +| Resultado | Objeto | <- | Status of the addFlags operation | + + +#### Descripción + +The `.addFlags()` function adds flags to the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Valor | Comment | + | -------- | ----- | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to add to `msgIDs`. You can pass any of the following keywords: + +| Parameter | Tipo | Descripción | +| --------- | -------- | ---------------------------------------------- | +| $draft | Boolean | True to add the "draft" flag to the message | +| $seen | Booleano | True to add the "seen" flag to the message | +| $flagged | Boolean | True to add the "flagged" flag to the message | +| $answered | Boolean | True to add the "answered" flag to the message | +| $deleted | Boolean | True to add the "deleted" flag to the message | +> * False values are ignored. +> * The interpretation of keyword flags may vary per mail client. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Ejemplo + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as read/seen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.addFlags(IMAP all;$flags) +``` + + + +## .append() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object +| Parameter | Tipo | | Descripción | +| -------------- | ------ |:--:| ------------------------------- | +| mailObj | Objeto | -> | Email object | +| destinationBox | Texto | -> | Mailbox to receive Email object | +| options | Objeto | -> | Object containing charset info | +| Resultado | Objeto | <- | Status of the delete operation | + + +#### Descripción + +The `.append()` function appends a `mailObj` to the `destinationBox`. + +In the `mailObj` parameter, pass an Email object. For a comprehensive description of mail properties, see [Email object](emails.html#email-object). The `.append()` function supports keyword tags in the Email object's `keywords` attribute. + +The optional `destinationBox` parameter lets you pass the name of a mailbox where the `mailObj` will be appended. If omitted, the current mailbox is used. + +In the optional `options` parameter, you can pass an object to define the charset and encoding for specific parts of the email. Available properties: + +| Propiedad | Tipo | Descripción | +| ------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| headerCharset | Text | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values: See possible charsets table below | +| bodyCharset | Text | Charset and encoding used for the html and text body contents of the email. Possible values: See possible charsets table below | + +Possible charsets: + +| Constant | Valor | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
    • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +| mail mode ISO88591 | ISO-8859-1 |
    • headerCharset: ISO-8859-1 & Quoted-printable
    • bodyCharset: ISO-8859-1 & 8-bit
    | +| mail mode UTF8 | US-ASCII_UTF8_QP | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64 | + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Ejemplo + +To save an email in the Drafts mailbox: + +```4d +var $settings; $status; $msg; $imap: Object + +$settings:=New object("host"; "domain.com"; "user"; "xxxx"; "password"; "xxxx"; "port"; 993) + +$imap:=IMAP New transporter($settings) + +$msg:=New object +$msg.from:="xxxx@domain.com" +$msg.subject:="Lorem Ipsum" +$msg.textBody:="Lorem ipsum dolor sit amet, consectetur adipiscing elit." +$msg.keywords:=New object +$msg.keywords["$seen"]:=True//flag the message as read +$msg.keywords["$draft"]:=True//flag the message as a draft + +$status:=$imap.append($msg; "Drafts") +``` + + + + + + + + + + +## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.authenticationMode** : Text +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + + + + + + +## .checkConnection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.checkConnection()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------- | +| Resultado | Objeto | <- | Status of the transporter object connection | + + +#### Descripción + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propiedad | | Tipo | Descripción | +| ---------- | ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------ | +| success | | booleano | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | texto | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | colección | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | texto | Description of the 4D error | +| | \[ ].componentSignature | texto | Signature of the internal component which returned the error | + + + + + + + +## .checkConnectionDelay + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.checkConnectionDelay** : Integer + +#### Descripción + +The `.checkConnectionDelay` property contains the maximum time (in seconds) allowed prior to checking the connection to the server. If this time is exceeded between two method calls, the connection to the server will be checked. By default, if the property has not been set in the *server* object, the value is 300. +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + + +## .connectionTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.connectionTimeOut** : Integer + + +#### Descripción + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + +## .copy() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Parameter | Tipo | | Descripción | +| -------------- | --------- |:--:| ------------------------------------------------ | +| msgsIDs | Colección | -> | Collection of message unique IDs (strings) | +| allMsgs | Entero | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Texto | -> | Mailbox to receive copied messages | +| Resultado | Objeto | <- | Status of the copy operation | + + +#### Descripción + +The `.copy()` function copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to copy, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to copy all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the copies of messages will be placed. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Ejemplo 1 + +To copy a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // copy found messages to the "documents" mailbox + $status:=$transporter.copy($mailIds;"documents") +``` + +#### Ejemplo 2 + +To copy all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + + $boxInfo:=$transporter.selectBox("inbox") + + // copy all messages to the "documents" mailbox + $status:=$transporter.copy(IMAP all;"documents") +``` + + + +## .createBox() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.createBox**( *name* : Text ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ---------------------------------------- | +| name | Texto | -> | Name of the new mailbox | +| Resultado | Objeto | <- | Status of the mailbox creation operation | + + +#### Descripción + +The `.createBox()` function creates a mailbox with the given `name`. If the IMAP server’s hierarchy separator character appears elsewhere in the mailbox name, the IMAP server will create any parent names needed to create the given mailbox. + +In other words, an attempt to create "Projects/IMAP/Doc" on a server in which "/" is the hierarchy separator character will create: + +* Only the "Doc" mailbox if "Projects" & "IMAP" already exist. +* "IMAP" & "Doc" mailboxes if only “Projects†already exists. +* "Projects" & “IMAP†& "Doc" mailboxes, if they do not already exist. + +In the `name` parameter, pass the name of the new mailbox. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Ejemplo + +To create a new “Invoices†mailbox: + + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") +If(OK=1) +$options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$status:=$transporter.createBox("Invoices") + +If ($status.success) +ALERT("Mailbox creation successful!") +Else +ALERT("Error: "+$status.statusText) +End if +End if +``` + + + + + + + +## .delete() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.delete**( *msgsIDs* : Collection ) : Object
    **.delete**( *allMsgs* : Integer ) : Object +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------ | +| msgsIDs | Colección | -> | Collection of message unique IDs (strings) | +| allMsgs | Entero | -> | `IMAP all`: All messages in the selected mailbox | +| Resultado | Objeto | <- | Status of the delete operation | + + +#### Descripción + +The `.delete()` function sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs`. + +You can pass: + +- in the `msgsIDs` parameter, a collection containing the unique IDs of the specific messages to delete, or +- in the `allMsgs` parameter, the `IMAP all` constant (integer) to delete all messages in the selected mailbox. + +Executing this function does not actually remove messages. Messages with the "delete" flag can still be found by the [.searchMails()](#searchmails) function. Flagged messages are deleted from the IMAP server with the [`.expunge()`](#expunge) function or by selecting another mailbox or when the [transporter object](#imap-transporter-object) (created with [IMAP New transporter](#imap-new-transporter)) is destroyed. + + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Ejemplo 1 + +To delete a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"Reports\"") + + // Delete selected messages + $status:=$transporter.delete($mailIds) +``` + +#### Ejemplo 2 + +To delete all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Junk Email") + + // delete all messages in the current mailbox + $status:=$transporter.delete(IMAP all) +``` + + + +## .deleteBox() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.deleteBox**( *name* : Text ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ---------------------------------------- | +| name | Texto | -> | Name of the mailbox to delete | +| Resultado | Objeto | <- | Status of the mailbox deletion operation | + + +#### Descripción + +The `.deleteBox()` function permanently removes the mailbox with the given `name` from the IMAP server. Attempting to delete an INBOX or a mailbox that does not exist will generate an error. + +In the `name` parameter, pass the name of the mailbox to delete. +> * The function cannot delete a mailbox that has child mailboxes if the parent mailbox has the "\Noselect" attribute. +> * All messages in the deleted mailbox will also be deleted. +> * The ability to delete a mailbox depends on the mail server. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + + + +#### Ejemplo + +To delete the "Nova Orion Industries" child mailbox from the "Bills" mailbox hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// delete mailbox +$name:="Bills"+$transporter.getDelimiter()+"Nova Orion Industries" +$status:=$transporter.deleteBox($name) + +If ($status.success) + ALERT("Mailbox deletion successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .expunge() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.expunge()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------- | +| Resultado | Objeto | <- | Status of the expunge operation | + +#### Descripción + +The `.expunge()` function removes all messages with the "deleted" flag from the IMAP mail server. The "deleted" flag can be set with the [`.delete()`](#delete) or [`.addFlags()`](#addflags) methods. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + +#### Ejemplo + +```4d +var $options;$transporter;$boxInfo;$status : Object +var $ids : Collection + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Find and delete all seen messages in INBOX +$ids:=$transporter.searchMails("SEEN") +$status:=$transporter.delete($ids) + +// Purge all messages flagged as deleted +$status:=$transporter.expunge() +``` + + + +## .getBoxInfo() + +
    History +| Version | Changes | +| ------- | ---------------- | +| v18 R5 | name is optional | +| v18 R4 | Added | +
    + +**.getBoxInfo**( { *name* : Text }) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------- | +| name | Texto | -> | Name of the mailbox | +| Resultado | Objeto | <- | boxInfo object | + + +#### Descripción + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox *name*. This function returns the same information as [`.selectBox()`](#selectbox) without changing the current mailbox. + +In the optional *name* parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Propiedad | Tipo | Descripción | +| ---------- | ------ | ------------------------------------------------------------------- | +| name | text | Name of the mailbox | +| mailCount | number | Number of messages in the mailbox | +| mailRecent | number | Number of messages with the "recent" flag (indicating new messages) | + + + +#### Ejemplo + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $info:=$transporter.getBoxInfo("INBOX") + ALERT("INBOX contains "+String($info.mailRecent)+" recent emails.") +``` + + + + + +## .getBoxList() + +
    History +| Version | Changes | +| ------- | ---------------------------- | +| v18 R4 | Added | +| v19 | Add `isSubscribed` parameter | +
    + +**.getBoxList**( { *parameters* : Object } ) : Collection +| Parameter | Tipo | | Descripción | +| ---------- | --------- |:--:| ----------------------------- | +| parameters | Objeto | -> | Parameter object | +| Resultado | Colección | <- | Collection of mailbox objects | + + +#### Descripción + +The `.getBoxList()` function returns a collection of mailboxes describing all of the available mailboxes. This function allows you to locally manage the list of messages located on the IMAP mail server. + +In the optional `parameters` parameter, pass an object containing values to filter the returned mailboxes. You can pass: + +| Propiedad | Tipo | Descripción | +| ------------ | -------- | ---------------------------------------------------- | +| isSubscribed | Booleano |
  • **True** to return only subscribed mailboxes
  • **False** to return all available mailboxes
  • | + +#### Resultado + +Each object of the returned collection contains the following properties: + +| Propiedad | Tipo | Descripción | +| ---------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | +| \[].name | texto | Name of the mailbox | +| \[].selectable | booleano | Indicates whether or not the access rights allow the mailbox to be selected:
    • true - the mailbox can be selected
    • false - the mailbox can not be selected
    | +| \[].inferior | booleano | Indicates whether or not the access rights allow creating a lower hierachy in the mailbox:
    • true - a lower level can be created
    • false - a lower level can not be created
    | +| \[].interesting | booleano | Indicates if the mailbox has been marked "interesting" by the server:
    • true - The mailbox has been marked "interesting" by the server. For example, it may contain new messages.
    • false - The mailbox has not been marked "interesting" by the server.
    | + + +If the account does not contain any mailboxes, an empty collection is returned. +> * If there is no open connection, `.getBoxList()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the `.checkConnection( )` function is automatically called. + + +#### Ejemplo + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getDelimiter() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.getDelimiter()** : Text +| Parameter | Tipo | | Descripción | +| --------- | ----- |:--:| ----------------------------- | +| Resultado | Texto | <- | Hierarchy delimiter character | + + +#### Descripción + +The `.getDelimiter()` function returns the character used to delimit levels of hierarchy in the mailbox name. + +The delimiter is a character which can be used to: + +* create lower level (inferior) mailboxes +* search higher or lower within the mailbox hierarchy + + +#### Resultado + +Mailbox name delimiter character. +> * If there is no open connection, `.getDelimiter()` will open a connection. +> * If the connection has not been used since the [designated connection delay](#checkconnectiondelay), the [`.checkConnection()`](#checkconnection) function is automatically called. + + + +#### Ejemplo + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getMail() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
    **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------ | +| msgNumber | Entero | -> | Sequence number of the message | +| msgID | Texto | -> | Unique ID of the message | +| options | Objeto | -> | Message handling instructions | +| Resultado | Objeto | <- | [Email object](EmailObjectClass.md#email-object) | + + +#### Descripción + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. This function allows you to locally handle the email contents. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *options* parameter allows you pass an object defining additional instructions for handling the message. The following properties are available: + +| Propiedad | Tipo | Descripción | +| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | booleano | If True, the message is marked as "seen" in the mailbox. If False, the message is not marked as "seen". Default value: True | +| withBody | booleano | Pass True to return the body of the message. If False, only the message header is returned. Default value: True | +> * The function generates an error and returns **Null** if *msgID* designates a non-existing message, +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) function, an error is generated, +> * If there is no open connection, `.getMail()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox)`. + + + +#### Resultado + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object) with the following specific IMAP properties: *id*, *receivedAt*, and *size*. + +#### Ejemplo + +You want to get the message with ID = 1: + +```4d + var $server : Object + var $info; $mail; $boxInfo : Variant + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get Email object with ID 1 + $mail:=$transporter.getMail(1) +``` + + + + +## .getMails() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
    **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------------------------ | +| ids | Colección | -> | Collection of message ID | +| startMsg | Entero | -> | Sequence number of the first message | +| endMsg | Entero | -> | Sequence number of the last message | +| options | Objeto | -> | Message handling instructions | +| Resultado | Objeto | <- | Object containing:
    • a collection of [Email objects](EmailObjectClass.md#email-object) and
    • a collection of IDs or numbers for missing messages, if any
    | + + +#### Descripción + +The `.getMails()` function returns an object containing a collection of `Email` objects. + +**First Syntax:** + +***.getMails( ids { ; options } ) -> result*** + +The first syntax allows you to retrieve messages based on their IDs. + +In the *ids* parameter, pass a collection of IDs for the messages to return. You can get the IDs with [`.getMail()`](#getmail). + +The optional *options* parameter allows you to define the parts of the messages to be returned. See the **Options** table below for a description of the available properties. + +**Second syntax:** + + ***.getMails( startMsg ; endMsg { ; options } ) -> result*** + +The second syntax allows you to retrieve messages based on a sequential range. The values passed represent the position of the messages in the mailbox. + +In the *startMsg* parameter, pass an *integer* value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an *integer* value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + +The optional *options* parameter allows you to define the parts of the messages to be returned. + +**Options** + +| Propiedad | Tipo | Descripción | +| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | Booleano | Si True, los mensajes especificados se marcan como "vistos" en el buzón. Si False, los mensajes no se marcan como "vistos". Default value: True | +| withBody | Booleano | Pass True to return the body of the specified messages. If False, only the message headers are returned. Default value: True | +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated. +> * If there is no open connection, `.getMails()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox). + + +#### Resultado + +`.getMails()` returns an object containing the following collections: + + +| Propiedad | Tipo | Descripción | +| --------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| list | Colección | Collection of [`Email` objects](EmailObjectClass.md#email-object). If no Email objects are found, an empty collection is returned. | + +|notFound |Collection| Collection of:
    • first syntax - previously passed message IDs that do not exist
    • second syntax - sequence numbers of messages between startMsg and endMsg that do not exist
    An empty collection is returned if all messages are found.| + + +#### Ejemplo + +You want to retrieve the 20 most recent emails without changing their "seen" status: + +```4d + var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // retrieve the headers of the last 20 messages without marking them as read + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... + End for each + End if +``` + + + + +## .getMIMEAsBlob() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
    **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob + +| Parameter | Tipo | | Descripción | +| ---------- | -------- |:--:| --------------------------------------------------------------------------------------------- | +| msgNumber | Entero | -> | Sequence number of the message | +| msgID | Texto | -> | Unique ID of the message | +| updateSeen | Booleano | -> | If True, the message is marked "seen" in the mailbox. If False the message is left untouched. | +| Resultado | BLOB | <- | Blob of the MIME string returned from the mail server | + + + + +#### Descripción + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *updateSeen* parameter allows you to specify if the message is marked as "seen" in the mailbox. You can pass: + +* **True** - to mark the message as "seen" (indicating the message has been read) +* **False** - para dejar intacto el estado "visto" del mensaje +> * The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated, +> * If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox()`. + + +#### Resultado + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +#### Ejemplo + + +```4d + var $server : Object + var $boxInfo : Variant + var $blob : Blob + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get BLOB + $blob:=$transporter.getMIMEAsBlob(1) +``` + + + + +## .host + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.host** : Text + +#### Descripción + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + +## .logFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.logFile** : Text + +#### Descripción + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .move() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
    **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Parameter | Tipo | | Descripción | +| -------------- | --------- |:--:| ------------------------------------------------ | +| msgsIDs | Colección | -> | Collection of message unique IDs (strings) | +| allMsgs | Entero | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Texto | -> | Mailbox to receive moved messages | +| Resultado | Objeto | <- | Status of the move operation | + + +#### Descripción + +The `.move()` function moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to move, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to move all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the messages will be moved. + +> This function is only supported by IMAP servers compliant with RFC [8474](https://tools.ietf.org/html/rfc8474). + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Ejemplo 1 + +To move a selection of messages: + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // Move found messages from the current mailbox to the "documents" mailbox + $status:=$transporter.move($mailIds;"documents") +``` + +#### Ejemplo 2 + +To move all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + // move all messages in the current mailbox to the "documents" mailbox + $status:=$transporter.move(IMAP all;"documents") +``` + + + + +## .numToID() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| ------------------------------------ | +| startMsg | Entero | -> | Sequence number of the first message | +| endMsg | Entero | -> | Sequence number of the last message | +| Resultado | Colección | <- | Collection of unique IDs | + + +#### Descripción + +The `.numToID()` function converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg* in the currently selected mailbox. + +In the *startMsg* parameter, pass an integer value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an integer value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + + +#### Resultado + +The function returns a collection of strings (unique IDs). + +#### Ejemplo + + +```4d + var $transporter : 4D.IMAPTransporter + var $server;$boxInfo;$status : Object + var $mailIds : Collection + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get IDs for 5 last messages received + $mailIds:=$transporter.numToID(($boxInfo.mailCount-5);$boxInfo.mailCount) + + //delete the messages from the current mailbox + $status:=$transporter.delete($mailIds) +``` + + + +## .removeFlags() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
    **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Colección | -> | Collection of strings: Message unique IDs (text)
    Text: Unique ID of a message
    Longint (IMAP all): All messages in the selected mailbox | +| keywords | Objeto | -> | Keyword flags to remove | +| Resultado | Objeto | <- | Status of the removeFlags operation | + + +#### Descripción + +The `.removeFlags()` function removes flags from the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Valor | Comment | + | -------- | ----- | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to remove from `msgIDs`. You can pass any of the following keywords: + +| Parameter | Tipo | Descripción | +| --------- | -------- | --------------------------------------------------- | +| $draft | Booleano | True to remove the "draft" flag from the message | +| $seen | Booleano | True to remove the "seen" flag from the message | +| $flagged | Booleano | True to remove the "flagged" flag from the message | +| $answered | Booleano | True to remove the "answered" flag from the message | +| $deleted | Booleano | True to remove the "deleted" flag from the message | + +Note that False values are ignored. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + +#### Ejemplo + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as unseen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.removeFlags(IMAP all;$flags) +``` + + + +## .renameBox() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object +| Parameter | Tipo | | Descripción | +| ----------- | ------ |:--:| -------------------------------- | +| currentName | Texto | -> | Name of the current mailbox | +| newName | Texto | -> | New mailbox name | +| Resultado | Objeto | <- | Status of the renaming operation | + + +#### Descripción + +The `.renameBox()` function changes the name of a mailbox on the IMAP server. Attempting to rename a mailbox from a mailbox name that does not exist or to a mailbox name that already exists will generate an error. + +In the `currentName` parameter, pass the name of the mailbox to be renamed. + +Pass the new name for the mailbox in the `newName` parameter. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + +#### Ejemplo + +To to rename your “Invoices†mailbox to “Billsâ€: + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// rename mailbox +$status:=$transporter.renameBox("Invoices"; "Bills") + +If ($status.success) + ALERT("Mailbox renaming successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .port + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.port** : Integer + +#### Descripción + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + +## .searchMails() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
    + +**.searchMails**( *searchCriteria* : Text ) : Collection +| Parameter | Tipo | | Descripción | +| -------------- | --------- |:--:| ----------------------------- | +| searchCriteria | Texto | -> | Search criteria | +| Resultado | Colección | <- | Collection of message numbers | + + +#### Descripción + +> This function is based upon the specification for the [IMAP protocol](https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol). + +The `.searchMails()` function searches for messages that match the given *searchCriteria* in the current mailbox. *searchCriteria* consists of one or more search keys. + +*searchCriteria* is a text parameter listing one or more search keys (see [Authorized search-keys](#authorized-search-keys) below) associated or not with values to look for. A search key may be a single or multiple items. Por ejemplo: + +``` +SearchKey1 = FLAGGED +SearchKey2 = NOT FLAGGED +SearchKey3 = FLAGGED DRAFT +``` + +> Matching is usually not case-sensitive + +- If the *searchCriteria* is a null string, the search will be equivalent to a “select allâ€. +- If the *searchCriteria* includes multiple search keys, the result is the intersection (AND function) of all the messages that match those keys. + +``` +searchCriteria = FLAGGED FROM "SMITH" +``` +... returns all messages with \Flagged flag set AND sent by Smith. +- You can use the **OR** or **NOT** operators as follows: + +``` +searchCriteria = OR SEEN FLAGGED +``` +... returns all messages with \Seen flag set OR \Flagged flag set + +``` +searchCriteria = NOT SEEN +``` +... returns all messages with \Seen flag not set. + +``` +searchCriteria = HEADER CONTENT-TYPE "MIXED" NOT HEADER CONTENT-TYPE "TEXT"... +``` +... returns message whose content-type header contains “Mixed†and does not contain “Textâ€. + +``` +searchCriteria = HEADER CONTENT-TYPE "E" NOT SUBJECT "o" NOT HEADER CONTENT-TYPE "MIXED" +``` +... returns message whose content-type header contains “ e †and whose Subject header does not contain “ o †and whose content-type header is not “ Mixed â€. + +As concerns the last two examples, notice that the result of the search is different when you remove the parentheses of the first search key list. + +- The *searchCriteria* may include the optional \[CHARSET] specification. This consists of the "CHARSET" word followed by a registered \[CHARSET] (US ASCII, ISO-8859). It indicates the charset of the *searchCriteria* string. Therefore, you must convert the *searchCriteria* string into the specified charset if you use the \[CHARSET] specification (see the `CONVERT FROM TEXT` or `Convert to text` commands). By default, 4D encodes in Quotable Printable the searchCriteria string if it contains extended characters. + +``` +searchCriteria = CHARSET "ISO-8859" BODY "Help" +``` +... means the search criteria uses the charset iso-8859 and the server will have to convert the search criteria before searching, if necessary. + + +#### Search value types + +Search-keys may request the value to search for: + +- **Search-keys with a field-name value**: the field-name is the name of a header field. Ejemplo: `searchCriteria = SENTBEFORE 1-Feb-2020` (una fecha no suele necesitar comillas, ya que no contiene caracteres especiales) + +- **Search-keys with a string value**: the string may contain any character and must be quoted. If the string does not contain any special characters, like the space character for instance, it does not need to be quoted. Quoting such strings will ensure that your string value will be correctly interpreted. Ejemplo: `criterios de búsqueda = FROM "SMITH"` Para todas las llaves de búsqueda que utilizan cadenas, un mensaje coincide con la llave si la cadena es una subcadena del campo. Matching is not case-sensitive. + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. Example: `searchCriteria = HEADER CONTENT-TYPE "MIXED"` + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. Example: `searchCriteria = KEYWORD \Flagged \Draft` + +- **Search-keys with a message set value**: Identifies a set of messages. For message sequence numbers, these are consecutive numbers from 1 to the total number of messages in the mailbox. A comma delimits individual numbers; a colon delimits between two numbers inclusive. Ejemplos: `2,4:7,9,12:*` es `2,4,5,6,7,9,12,13,14,15` para un buzón con 15 mensajes. `searchCriteria = 1:5 ANSWERED` search in message selection from message sequence number 1 to 5 for messages which have the \Answered flag set. `searchCriteria= 2,4 ANSWERED` search in the message selection (message numbers 2 and 4) for messages which have the \Answered flag set. + + +#### Authorized search-keys + +**ALL**: All messages in the mailbox. +**ANSWERED**: Messages with the \Answered flag set. +**UNANSWERED**: Messages that do not have the \Answered flag set. +**DELETED**: Messages with the \Deleted flag set. +**UNDELETED**: Messages that do not have the \Deleted flag set. +**DRAFT**: Messages with the \Draft flag set. +**UNDRAFT**: Messages that do not have the \Draft flag set. +**FLAGGED**: Messages with the \Flagged flag set. +**UNFLAGGED**: Messages that do not have the \Flagged flag set. +**RECENT**: Messages that have the \Recent flag set. +**OLD**: Messages that do not have the \Recent flag set. +**SEEN**: Messages that have the \Seen flag set. +**UNSEEN**: Messages that do not have the \Seen flag set. +**NEW**: Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to “(RECENT UNSEEN)â€. +**KEYWORD** : Messages with the specified keyword set. +**UNKEYWORD** : Messages that do not have the specified keyword set. +**BEFORE** : Messages whose internal date is earlier than the specified date. +**ON** : Messages whose internal date is within the specified date. +**SINCE** : Messages whose internal date is within or later than the specified date. +**SENTBEFORE** : Messages whose Date header is earlier than the specified date. +**SENTON** : Messages whose Date header is within the specified date. +**SENTSINCE** : Messages whose Date header is within or later than the specified date. +**TO** : Messages that contain the specified string in the TO header. +**FROM** : Messages that contain the specified string in the FROM header. +**CC** : Messages that contain the specified string in the CC header. +**BCC** : Messages that contain the specified string in the BCC header. +**SUBJECT** : Messages that contain the specified string in the Subject header. +**BODY** : Messages that contain the specified string in the message body. +**TEXT** : Messages that contain the specified string in the header or in the message body. +**HEADER** : Messages that have a header with the specified field-name and that contain the specified string in the field-body. +**UID** : Messages with unique identifiers corresponding to the specified unique identifier set. +**LARGER** : Messages with a size larger than the specified number of bytes. +**SMALLER** : Messages with a size smaller than the specified number of bytes. +**NOT** : Messages that do not match the specified search key. +**O** : Messages that match either search key. + + + + +## .selectBox() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
    + +**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------- | +| name | Texto | -> | Name of the mailbox | +| state | Entero | -> | Mailbox access status | +| Resultado | Objeto | <- | boxInfo object | + + +#### Descripción + +The `.selectBox()` function selects the `name` mailbox as the current mailbox. This function allows you to retrieve information about the mailbox. +> To get the information from a mailbox without changing the current mailbox, use [`.getBoxInfo()`](#getboxinfo). + +In the `name` parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + +The optional `state` parameter defines the type of access to the mailbox. The possible values are: + +| Constant | Valor | Comment | +| --------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IMAP read only state | 1 | The selected mailbox is accessed with read only privileges. Messages with a "recent" flag (indicating new messages) remain unchanged. | +| IMAP read write state | 0 | The selected mailbox is accessed with read and write privileges. Messages are considered "seen" and lose the "recent" flag (indicating new messages). (Valor por defecto) | +> * The function generates an error and returns **Null** if name designates a non-existing mailbox. +> * If there is no open connection, `.selectBox()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the [`.checkConnection()`](#checkconnection) function is automatically called. + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Propiedad | Tipo | Descripción | +| ---------- | ------ | ----------------------------------------- | +| name | Texto | Name of the mailbox | +| mailCount | number | Number of messages in the mailbox | +| mailRecent | number | Number of messages with the "recent" flag | + + +#### Ejemplo + + +```4d + var $server; $boxinfo : Object + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + $boxInfo:=$transporter.selectBox("INBOX") +``` + + + + +## .subscribe() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.subscribe**( *name* : Text ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------------------- | +| name | Texto | -> | Name of the mailbox | +| Resultado | Objeto | <- | Status of the subscribe operation | + + +#### Descripción + +The `.subscribe()` function allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes. As such, you can choose to narrow down a large list of available mailboxes by subscribing to those you usually want to see. + +In the `name` parameter, pass the name of the mailbox to add (subscribe) to your "subscribed" mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + + +#### Ejemplo + +To subscribe to the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.subscribe($name) + +If ($status.success) + ALERT("Mailbox subscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + +## .unsubscribe() + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.unsubscribe**( *name* : Text ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ----------------------------------- | +| name | Texto | -> | Name of the mailbox | +| Resultado | Objeto | <- | Status of the unsubscribe operation | + + +#### Descripción + +The `.unsubscribe()` function removes a mailbox from a set of subscribed mailboxes. This allows you reduce the number of mailboxes you usually see. + +In the `name` parameter, pass the name of the mailbox to remove (unsubscribe) from your active mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propiedad | | Tipo | Descripción | +| ---------- | ----------------------- | --------- | ---------------------------------------------------------------------------------------- | +| success | | Booleano | True if the operation is successful, False otherwise | +| statusText | | Texto | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Colección | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | + + + +#### Ejemplo + +To unsubscribe from the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.unsubscribe($name) + +If ($status.success) + ALERT("Mailbox unsubscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + +## .user + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.user** : Text + +#### Descripción +The `.user` property contains the user name used for authentication on the mail server. + + + + + + + diff --git a/website/translated_docs/es/API/MailAttachmentClass.md b/website/translated_docs/es/API/MailAttachmentClass.md new file mode 100644 index 00000000000000..15e79ebd8ce796 --- /dev/null +++ b/website/translated_docs/es/API/MailAttachmentClass.md @@ -0,0 +1,271 @@ +--- +id: MailAttachmentClass +title: MailAttachment +--- + +Attachment objects allow referencing files within a [`Email`](EmailObjectClass.md) object. Attachment objects are created using the [`MAIL New attachment`](#mail-new-attachment) command. + + +### Attachment Object + +Attachment objects provide the following read-only properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cid** : Text](#cid)

         the ID of the attachment | +| [**.disposition** : Text](#disposition)

        the value of the `Content-Disposition` header | +| [**.getContent()** : 4D.Blob](#getcontent)

        returns the contents of the attachment object in a `4D.Blob` object | +| [**.name** : Text](#name)

        the name and extension of the attachment | +| [**.path** : Text](#path)

        the POSIX path of the attachment file, if it exists | +| [**.platformPath** : Text](#platformpath)

        the path of the attachment file expressed with the current platform syntax | +| [**.type** : Text](#type)

        the `content-type` of the attachment file | + + +## MAIL New attachment + +

    History +| Version | Changes | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
    + +**MAIL New attachment**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **MAIL New attachment**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Parameter | Tipo | | Descripción | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Texto | -> | Value of the content-disposition header: "inline" or "attachment". | +| Resultado | 4D.MailAttachment | <- | Attachment object | + + +#### Descripción + +The `MAIL New attachment` command allows you to create an attachment object that you can add to an [Email object](EmailObjectClass.md#email-object). + +To define the attachment, you can use: + +- a *file*, pass a `4D.File` object containing the attachment file. +- a *zipfile*, pass a `4D.ZipFile` object containing the attachment file. +- a *blob*, pass a `4D.Blob` object containing the attachment itself. +- a *path*, pass a **text** value containing the path of the attachment file, expressed with the system syntax. You can pass a full path name or a simple file name (in which case 4D will search for the file in the same directory as the project file). + +The optional *name* parameter lets you pass the name and extension to be used by the mail client to designate the attachment. If *name* is omitted and: + +* you passed a file path, the name and extension of the file is used, +* you passed a BLOB, a random name without extension is automatically generated. + +The optional *cid* parameter lets you pass an internal ID for the attachment. This ID is the value of the `Content-Id` header, it will be used in HTML messages only. The cid associates the attachment with a reference defined in the message body using an HTML tag such as `\`. This means that the contents of the attachment (e.g., a picture) should be displayed within the message on the mail client. The final result may vary depending on the mail client. You can pass an empty string in *cid* if you do not want to use this parameter. + +You can use the optional *type* parameter to explicitly set the `content-type` of the attachment file. For example, you can pass a string defining a MIME type ("video/mpeg"). This content-type value will be set for the attachment, regardless of its extension. For more information about MIME types, please refer to the [MIME type page on Wikipedia](https://en.wikipedia.org/wiki/MIME). + +By default, if the *type* parameter is omitted or contains an empty string, the `content-type` of the attachment file is based on its extension. The following rules are applied for the main MIME types: + +| Extension | Content Type | +| --------- | ----------------------------- | +| jpg, jpeg | image/jpeg | +| png | image/png | +| gif | image/gif | +| pdf | application/pdf | +| doc | application/msword | +| xls | application/vnd.ms-excel | +| ppt | application/vnd.ms-powerpoint | +| zip | application/zip | +| gz | application/gzip | +| json | application/json | +| js | application/javascript | +| ps | application/postscript | +| xml | application/xml | +| htm, html | text/html | +| mp3 | audio/mpeg | +| *other* | application/octet-stream | + +The optional *disposition* parameter lets you pass the `content-disposition` header of the attachment. You can pass one of the following constants from the "Mail" constant theme: + +| Constant | Valor | Comment | +| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| mail disposition attachment | "attachment" | Set the Content-disposition header value to "attachment", which means that the attachment file must be provided as a link in the message. | +| mail disposition inline | "inline" | Set the Content-disposition header value to "inline", which means that the attachment must be rendered within the message contents, at the "cid" location. The rendering depends on the mail client. | + +By default, if the *disposition* parameter is omitted: + +* if the *cid* parameter is used, the `Content-disposition` header is set to "inline", +* if the *cid* parameter is not passed or empty, the `Content-disposition` header is set to "attachment". + +#### Ejemplo 1 + +You want to send an email with a user-selected file as an attachment and an image embedded in the HTML body: + +```4d +$doc:=Select document("";"*";"Please select a file to attach";0) +If (OK=1) //If a document was selected + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="test_user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="test_user@mail.com" +$email.to:="test_user@mail.com" +$email.subject:="This is a test message with attachments" + +//add a link to download file +$email.attachments:=New collection(MAIL New attachment(Document)) +//insert an inline picture (use a cid) +$email.attachments[1]:=MAIL New attachment("c:\\Pictures\\4D.jpg";"";"4D") + +$email.htmlBody:=""+\ +"Hello World!"+\ +""+\ +""+\ +""+\ +"" + +$transporter.send($email) //send mail + +End if +``` + +#### Ejemplo 2 + +You want to send an email with a 4D Write Pro area as an attachment: + +```4d +C_BLOB($blob) +WP EXPORT VARIABLE(WPArea;$blob;wk docx) + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="user@mail.com" +$email.to:="customer@mail.com" +$email.subject:="New annual report" +$email.textBody:="Please find enclosed our latest annual report." +$email.attachments:=New collection(MAIL New attachment($blob;"Annual report.docx")) + +$transporter.send($email) +``` + + +## 4D.MailAttachment.new() + +
    History +| Version | Changes | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
    + +**4D.MailAttachment.new**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
    **4D.MailAttachment.new**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Parameter | Tipo | | Descripción | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Text | -> | Value of the content-disposition header: "inline" or "attachment". | +| Resultado | 4D.MailAttachment | <- | Attachment object | + + +#### Descripción + +The `4D.MailAttachment.new()` function creates and returns a new object of the `4D.MailAttachment` type. It is identical to the [`MAIL New attachment`](#mail-new-attachment) command (shortcut). + + +## .cid + +**.cid** : Text + +#### Descripción + +The `.cid` property contains the ID of the attachment. This property is used in HTML messages only. If this property is missing, the file is handled as a simple attachment (link). + + +## .disposition + +**.disposition** : Text + +#### Descripción + +The `.disposition` property contains the value of the `Content-Disposition` header. Two values are available: + +* "inline": the attachment is rendered within the message contents, at the "cid" location. The rendering depends on the mail client. +* "attachment": the attachment is provided as a link in the message. + + +## .getContent() + +**.getContent()** : 4D.Blob +| Parameter | Tipo | | Descripción | +| --------- | ------- |:--:| ------------------------- | +| Resultado | 4D.Blob | <- | Content of the attachment | + + +#### Descripción + +The `.getContent()` function returns the contents of the attachment object in a `4D.Blob` object. You can use this method with attachment objects received by the [`MAIL Convert from MIME`](#mail-convert-from-mime) command. + + + +## .name + +**.name** : Text + +#### Descripción + +The `.name` property contains the name and extension of the attachment. By default, it is the name of the file, unless another name was specified in the [`MAIL New attachment`](#mail-new-attachment) command. + +## .path + +**.path** : Text + +#### Descripción + +The `.path` property contains the POSIX path of the attachment file, if it exists. + + +## .platformPath + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.platformPath** : Text + +#### Descripción + +The `.platformPath` property returns the path of the attachment file expressed with the current platform syntax. + + +## .type + +**.type** : Text + +#### Descripción + +The `.type` property contains the `content-type` of the attachment file. If this type is not explicitly passed to the [`MAIL New attachment`](#mail-new-attachment) command, the `content-type` is based on its file extension. + + + + diff --git a/website/translated_docs/es/API/POP3TransporterClass.md b/website/translated_docs/es/API/POP3TransporterClass.md new file mode 100644 index 00000000000000..f55cb699a692d6 --- /dev/null +++ b/website/translated_docs/es/API/POP3TransporterClass.md @@ -0,0 +1,694 @@ +--- +id: POP3TransporterClass +title: POP3Transporter +--- + +The `POP3Transporter` class allows you to retrieve messages from a POP3 email server. + + +### POP3 Transporter object + +POP3 Transporter objects are instantiated with the [POP3 New transporter](#pop3-new-transporter) command. They provide the following properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

         checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.delete**( *msgNumber* : Integer )](#delete)

        flags the *msgNumber* email for deletion from the POP3 server | +| [**.getBoxInfo()** : Object](#getboxinfo)

        returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMail**( *msgNumber* : Integer ) : Object](#getmail)

        returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfo**( *msgNumber* : Integer ) : Object](#getmailinfo)

        returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfoList()** : Collection](#getmailinfolist)

        returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob](#getmimeasblob)

        returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object) | +| [**.host** : Text](#host)

        the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

         the port number used for mail transactions | +| [**.undeleteAll()**](#undeleteall)

        removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object) | +| [**.user** : Text](#user)

         the user name used for authentication on the mail server | + + + +## POP3 New transporter + +

    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**POP3 New transporter**( *server* : Object ) : 4D.POP3Transporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | objeto | -> | Mail server information | +| Resultado | 4D.POP3Transporter | <- | [POP3 transporter object](#pop3-transporter-object) | + + +#### Descripción + +The `POP3 New transporter` command configures a new POP3 connectionaccording to the *server* parameter and returns a new *[POP3 transporter](#pop3-transporter-object)* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + + +| *server* | Default value (if omitted) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

        the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | none | +| **.password** : Text

    User password for authentication on the server. Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.port** : Integer](#port)

         the port number used for mail transactions | 995 | +| [**.user** : Text](#user)

         the user name used for authentication on the mail server | none | + + +#### Resultado + +The function returns a [**POP3 transporter object**](#pop3-transporter-object). All returned properties are **read-only**. +> The POP3 connection is automatically closed when the transporter object is destroyed. + +#### Ejemplo + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + $server.logFile:="LogTest.txt" //log to save in the Logs folder + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + $status:=$transporter.checkConnection() + If(Not($status.success)) + ALERT("An error occurred receiving the mail: "+$status.statusText) + End if +``` + + +## 4D.POP3Transporter.new() + + +**4D.POP3Transporter.new**( *server* : Object ) : 4D.POP3Transporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objeto | -> | Mail server information | +| Resultado | 4D.POP3Transporter | <- | [POP3 transporter object](#pop3-transporter-object) | + +#### Descripción + +The `4D.POP3Transporter.new()` function creates and returns a new object of the `4D.POP3Transporter` type. It is identical to the [`POP3 New transporter`](#pop3-new-transporter) command (shortcut). + +## .acceptUnsecureConnection + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.acceptUnsecureConnection** : Boolean + +#### Descripción + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + + +## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + + +**.authenticationMode** : Text + +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + + + + +## .checkConnection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.checkConnection()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------- | +| Resultado | Objeto | <- | Status of the transporter object connection | + + +#### Descripción + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propiedad | | Tipo | Descripción | +| ---------- | ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------ | +| success | | booleano | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | texto | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | colección | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | texto | Description of the 4D error | +| | \[ ].componentSignature | texto | Signature of the internal component which returned the error | + + + + + +#### Ejemplo + +```4d + var $pw : Text + var $options : Object + $options:=New object + + $pw:=Request("Please enter your password:") + if(OK=1) + $options.host:="pop3.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=POP3 New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success) + ALERT("POP3 connection check successful!") + Else + ALERT("Error: "+$status.statusText) + End if + End if +``` + + +## .connectionTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.connectionTimeOut** : Integer + + +#### Descripción + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + +## .delete() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.delete**( *msgNumber* : Integer ) +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------- | +| msgNumber | Entero | -> | Number of the message to delete | + + +##### Descripción + +The `.delete( )` function flags the *msgNumber* email for deletion from the POP3 server. + +In the *msgNumber* parameter, pass the number of the email to delete. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +Executing this method does not actually remove any email. The flagged email will be deleted from the POP3 server only when the `POP3_transporter` object (created with `POP3 New transporter`) is destroyed. The flag could be also be removed using the `.undeleteAll()` method. +> If the current session unexpectedly terminates and the connection is closed (e.g., timeout, network failure, etc.), an error message is generated and messages marked for deletion will remain on the POP3 server. + +##### Ejemplo + +```4d + $mailInfoList:=$POP3_transporter.getMailInfoList() + For each($mailInfo;$mailInfoList) + // Mark your mail as "to be deleted at the end of the session" + $POP3_transporter.delete($mailInfo.number) + End for each + // Force the session closure to delete the mails marked for deletion + CONFIRM("Selected messages will be deleted.";"Delete";"Undo") + If(OK=1) //deletion confirmed + $POP3_transporter:=Null + Else + $POP3_transporter.undeleteAll() //remove deletion flags + End if +``` + + + + +## .getBoxInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.getBoxInfo()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| -------------- | +| Resultado | Objeto | <- | boxInfo object | + + +##### Descripción + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the mailbox. + +The `boxInfo` object returned contains the following properties: + +| Propiedad | Tipo | Descripción | +| --------- | ------ | --------------------------------- | +| mailCount | Number | Number of messages in the mailbox | +| size | Number | Message size in bytes | + + + +##### Ejemplo + +```4d + var $server; $boxinfo : Object + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + //mailbox info + $boxInfo:=$transporter.getBoxInfo() + ALERT("The mailbox contains "+String($boxInfo.mailCount)+" messages.") +``` + + + + +## .getMail() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.getMail**( *msgNumber* : Integer ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------ | +| msgNumber | Entero | -> | Number of the message in the list | +| Resultado | Objeto | <- | [Email object](EmailObjectClass.md#email-object) | + + +##### Descripción + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally handle the email contents. + +Pass in *msgNumber* the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) function. + +The method returns Null if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +**Returned object** + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object). + + +##### Ejemplo + +You want to know the sender of the first mail of the mailbox: + +```4d + var $server; $transporter : Object + var $mailInfo : Collection + var $sender : Variant + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $sender:=$transporter.getMail($mailInfo[0].number).from +``` + + + + +## .getMailInfo() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.getMailInfo**( *msgNumber* : Integer ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| --------------------------------- | +| msgNumber | Entero | -> | Number of the message in the list | +| Resultado | Objeto | <- | mailInfo object | + + +##### Descripción + +The `.getMailInfo()` function returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the email. + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfo) method. + +The `mailInfo` object returned contains the following properties: + +| Propiedad | Tipo | Descripción | +| --------- | ------ | ------------------------ | +| size | Número | Message size in bytes | +| id | Texto | Unique ID of the message | + +The method returns **Null** if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +##### Ejemplo + + +```4d + var $server; $mailInfo : Object + var $mailNumber : Integer + + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + //message info + $mailInfo:=$transporter.getMailInfo(1) //get the first mail + If($mailInfo #Null) + ALERT("First mail size is:"+String($mailInfo.size)+" bytes.") + End if +``` + + + + +## .getMailInfoList() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.getMailInfoList()** : Collection +| Parameter | Tipo | | Descripción | +| --------- | --------- |:--:| -------------------------------- | +| Resultado | Colección | <- | Collection of `mailInfo` objects | + + +##### Descripción + +The `.getMailInfoList()` function returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally manage the list of messages located on the POP3 mail server. + +Each `mailInfo` object in the returned collection contains the following properties: + +| Propiedad | Tipo | Descripción | +| ------------ | ------ | ------------------------------------------------------------------ | +| \[ ].size | Número | Message size in bytes | +| \[ ].number | Número | Message number | +| \[ ].id | Texto | Unique ID of the message (useful if you store the message locally) | + +If the mailbox does not contain a message, an empty collection is returned. + + + +#### number and ID properties + +*number* is the number of a message in the mailbox at the time the `POP3_transporter` was created. The *number* property is not a static value in relation to any specific message and will change from session to session dependent on its relation to other messages in the mailbox at the time the session was opened. The numbers assigned to the messages are only valid during the lifetime of the [`POP3_transporter`](#pop3-transporter-object). At the time the `POP3_transporter` is deleted any message marked for deletion will be removed. When the user logs back into the server, the current messages in the mailbox will be renumbered from 1 to x. + +The *id* however is a unique number assigned to the message when it was received by the server. This number is calculated using the time and date that the message is received and is a value assigned by your POP3 server. Unfortunately, POP3 servers do not use the *id* as the primary reference to their messages. Throughout the POP3 sessions you will need to specify the *number* as the reference to messages on the server. Developers may need to take some care if developing solutions which bring references to messages into a database but leave the body of the message on the server. + + +##### Ejemplo + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + C_COLLECTION($mailInfo) + C_LONGINT($vNum;$vSize) + + $mailInfo:=$transporter.getMailInfoList() + $vNum:=$mailInfo.length + $vSize:=$mailInfo.sum("size") + + ALERT("The mailbox contains "+String($vNum)+" message(s) for "+String($vSize)+" bytes.") +``` + + + + +## .getMIMEAsBlob() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
    + +**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob +| Parámetros | Tipo | | Descripción | +| ---------- | ------ |:--:| ----------------------------------------------------- | +| msgNumber | Entero | -> | Number of the message in the list | +| Resultado | Blob | <- | Blob of the MIME string returned from the mail server | + + +##### Descripción + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object). + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +The method returns an empty BLOB if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete()`. + + +**Returned BLOB** + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +##### Ejemplo + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + var $mailInfo : Collection + var $blob : Blob + var $transporter : 4D.POP3Transporter + + $server:=New object + $server.host:="pop.gmail.com" + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $blob:=$transporter.getMIMEAsBlob($mailInfo[0].number) +``` + + + +## .host + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.host** : Text + +#### Descripción + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + + +## .logFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.logFile** : Text + +#### Descripción + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .port + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.port** : Integer + +#### Descripción + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + + +## .undeleteAll() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
    + +**.undeleteAll()** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +##### Descripción + +The `.undeleteAll()` function removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object). + + + + +## .user + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.user** : Text + +#### Descripción +The `.user` property contains the user name used for authentication on the mail server. + + + + + + diff --git a/website/translated_docs/es/API/SMTPTransporterClass.md b/website/translated_docs/es/API/SMTPTransporterClass.md new file mode 100644 index 00000000000000..387a7814a50b78 --- /dev/null +++ b/website/translated_docs/es/API/SMTPTransporterClass.md @@ -0,0 +1,523 @@ +--- +id: SMTPTransporterClass +title: SMTPTransporter +--- + +The `SMTPTransporter` class allows you to configure SMTP connections and send emails through *SMTP transporter* objects. + + + +### SMTP Transporter object + +SMTP Transporter objects are instantiated with the [SMTP New transporter](#smtp-new-transporter) command. They provide the following properties and functions: + + +| | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | +| [**.bodyCharset** : Text](#bodycharset)

         the charset and encoding used for the body part of the email | +| [**.checkConnection()** : Object](#checkconnection)

         checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.headerCharset** : Text](#headercharset)

         the charset and encoding used for the email header | +| [**.host** : Text](#host)

        the name or the IP address of the host server | +| [**.keepAlive** : Boolean](#keepalive)

        **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

         the port number used for mail transactions | +| [**.send**( *mail* : Object ) : Object](#send)

        sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object | +| [**.sendTimeOut** : Integer](#sendtimeout)

         the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | +| [**.user** : Text](#user)

         the user name used for authentication on the mail server | + + + +## SMTP New transporter + +

    History +| Version | Changes | +| ------- | -------------------------------------------- | +| v18 | New logFile property | +| v17 R5 | New bodyCharset and headerCharset properties | +| v17 R4 | Added | +
    + +**SMTP New transporter**( *server* : Object ) : 4D.SMTPTransporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objeto | -> | Mail server information | +| Resultado | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + + +#### Descripción + +The `SMTP New transporter` command configures a new SMTP connection according to the *server* parameter and returns a new *[SMTP transporter](#smtp-transporter-object)* object. The returned transporter object will then usually be used to send emails. + +> This command does not open any connection to the SMTP server. The SMTP connection is actually opened when the [`.send()`](#send) function is executed. +> +> The SMTP connection is automatically closed: * when the transporter object is destroyed if the [`keepAlive`](#keepalive) property is true (default), * after each [`.send( )`](#send) function execution if the [`keepAlive`](#keepalive) property is set to false. + + + + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

        **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
    .**accessTokenOAuth2**: Object

    Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

        the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.bodyCharset** : Text](#bodycharset)

         the charset and encoding used for the body part of the email | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

        the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.headerCharset** : Text](#headercharset)

         the charset and encoding used for the email header | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.host** : Text](#host)

        the name or the IP address of the host server | *mandatory* | +| [**.keepAlive** : Boolean](#keepalive)

        **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | True | +| [**.logFile** : Text](#logfile)

        the path of the extended log file defined (if any) for the mail connection | none | +| **password** : Text

    User password for authentication on the server. Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.port** : Integer](#port)

         the port number used for mail transactions | 587 | +| [**.sendTimeOut** : Integer](#sendtimeout)

         the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | 100 | +| [**.user** : Text](#user)

         the user name used for authentication on the mail server | none | + + + +#### Resultado + +The function returns a [**SMTP transporter object**](#smtp-transporter-object). All returned properties are **read-only**. + + +#### Ejemplo + +```4d + $server:=New object + $server.host:="smtp.gmail.com" //Mandatory + $server.port:=465 + $server.user:="4D@gmail.com" + $server.password:="XXXX" + $server.logFile:="LogTest.txt" //Extended log to save in the Logs folder + + var $transporter : 4D.SMTPTransporter + $transporter:=SMTP New transporter($server) + + $email:=New object + $email.subject:="my first mail " + $email.from:="4d@gmail.com" + $email.to:="4d@4d.com;test@4d.com" + $email.textBody:="Hello World" + $email.htmlBody:="

    Hello World

    'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'

    \ +

    There are many variations of passages of Lorem Ipsum available."\ + +"The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

    " + + $status:=$transporter.send($email) + If(Not($status.success)) + ALERT("An error occurred sending the mail: "+$status.message) + End if +``` + + +## 4D.SMTPTransporter.new() + + +**4D.SMTPTransporter.new**( *server* : Object ) : 4D.SMTPTransporter +| Parameter | Tipo | | Descripción | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objeto | -> | Mail server information | +| Resultado | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + +#### Descripción + +The `4D.SMTPTransporter.new()` function creates and returns a new object of the `4D.SMTPTransporter` type. It is identical to the [`SMTP New transporter`](#smtp-new-transporter) command (shortcut). + + + +## .acceptUnsecureConnection + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.acceptUnsecureConnection** : Boolean + +#### Descripción + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + +## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + + +**.authenticationMode** : Text + +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + + + + +## .bodyCharset + +
    History +| Version | Changes | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Added | +
    + +**.bodyCharset** : Text + +#### Descripción + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Valor | Comment | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +| mail mode ISO88591 | ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + + +## .checkConnection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.checkConnection()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------- | +| Resultado | Objeto | <- | Status of the transporter object connection | + + +#### Descripción + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propiedad | | Tipo | Descripción | +| ---------- | ------------------------ | --------- | ------------------------------------------------------------------------------------------------------------ | +| success | | booleano | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | texto | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | colección | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | texto | Description of the 4D error | +| | \[ ].componentSignature | texto | Signature of the internal component which returned the error | + + + + + +For information about SMTP status codes, please refer to [this page](https://www.usps.org/info/smtp_status.html). + +#### Ejemplo + +```4d + var $pw : Text + var $options : Object + var $transporter : 4D.SMTPTransporter + $options:=New object + + $pw:=Request("Please enter your password:") + $options.host:="smtp.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=SMTP New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success=True) + ALERT("SMTP connection check successful!") + Else + ALERT("Error # "+String($status.status)+", "+$status.statusText) + End if +``` + + + +## .connectionTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.connectionTimeOut** : Integer + + +#### Descripción + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + + + +## .headerCharset + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.headerCharset** : Text + +#### Descripción + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Valor | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +| mail mode ISO88591 | ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + +## .host + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.host** : Text + +#### Descripción + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + +## .keepAlive + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.keepAlive** : Boolean + +#### Descripción + +The `.keepAlive` property contains **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed, and **False** otherwise. By default, if the `keepAlive` property has not been set in the `server` object (used to create the `transporter` object with `SMTP New transporter`), it is **True**. + +The SMTP connection is automatically closed: + +* when the `transporter` object is destroyed if the `.keepAlive` property is true, +* after each `.send( )` function execution if the `.keepAlive` property is set to false. + + + + + + +## .logFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.logFile** : Text + +#### Descripción + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + + +## .port + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.port** : Integer + +#### Descripción + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + +## .send() + +
    History +| Version | Changes | +| ------- | ------------------------ | +| v17 R5 | Support of mime contents | +| v17 R4 | Added | +
    + +**.send**( *mail* : Object ) : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------------- | +| mail | Objeto | -> | [Email](EmailObjectClass.md#email-object) to send | +| Resultado | Objeto | <- | SMTP status | + + +#### Descripción + +The `.send()` function sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object. +> The `transporter` object must have already been created using the `SMTP New transporter` command. + +The method creates the SMTP connection if it is not already alive. If the `.keepAlive` property of the `transporter` object is **false**, the SMTP connection is automatically closed after the execution of `.send()`, otherwise it stays alive until the `transporter` object is destroyed. For more information, please refer to the [`SMTP New transporter`](#smtp-new-transporter) command description. + +In *mail*, pass a valid [`Email` object](EmailObjectClass.md#email-object) to send. The origination (where the email is coming from) and destination (one or more recipients) properties must be included, the remaining properties are optional. + + +#### Returned object + +The function returns an object describing the SMTP status of the operation. This object can contain the following properties: + +| Propiedad | Tipo | Descripción | +| ---------- | -------- | ------------------------------------------------------------------------------------------------ | +| success | booleano | True if the send is successful, False otherwise | +| status | number | Status code returned by the SMTP server (0 in case of an issue unrelated to the mail processing) | +| statusText | texto | Status message returned by the SMTP server | + +In case of an issue unrelated to the SMTP processing (e.g. a mandatory property is missing in mail), 4D generates an error that you can intercept using a method installed by the `ON ERR CALL` command. Use the `GET LAST ERROR STACK` command for information about the error. + +In this case, the resulting status object contains the following values: + +| Propiedad | Valor | +| ---------- | ---------------------- | +| success | False | +| status | 0 | +| statusText | "Failed to send email" | + + +## .sendTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.sendTimeOut** : Integer + +#### Descripción +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + + + + + +## .user + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.user** : Text + +#### Descripción +The `.user` property contains the user name used for authentication on the mail server. + + + + + diff --git a/website/translated_docs/es/API/SessionClass.md b/website/translated_docs/es/API/SessionClass.md new file mode 100644 index 00000000000000..a01a2228884629 --- /dev/null +++ b/website/translated_docs/es/API/SessionClass.md @@ -0,0 +1,363 @@ +--- +id: SessionClass +title: Session +--- + +Session objects are returned by the [`Session`](#session) command when [scalable sessions are enabled in your project](WebServer/sessions.md#enabling-sessions). The Session object is automatically created and maintained by the 4D web server to control the session of a web client (e.g. a browser). This object provides the web developer with an interface to the user session, allowing to manage privileges, store contextual data, share information between processes, and launch session-related preemptive processes. + +For detailed information about the session implementation, please refer to the [web server Sessions](WebServer/sessions.md) section. + +### Summary + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.clearPrivileges()**](#clearprivileges)

        removes all the privileges associated to the session | +| [**.expirationDate** : Text](#expirationdate)

        the expiration date and time of the session cookie | +| [**.hasPrivilege**( *privilege* : Text ) : Boolean](#hasprivilege)

        returns True if the privilege is associated to the session, and False otherwise | +| [**.idleTimeout** : Integer](#idletimeout)

        the inactivity session timeout (in minutes), after which the session is automatically closed by 4D | +| [**.isGuest()** : Boolean](#isguest)

        returns True if the session is a Guest session (i.e. it has no privileges) | +| [**.setPrivileges**( *privilege* : Text )
    **.setPrivileges**( *privileges* : Collection )
    **.setPrivileges**( *settings* : Object )](#setprivileges)

        associates the privilege(s) defined in the parameter to the session | +| [**.storage** : Object](#storage)

        a shared object that can be used to store information available to all requests of the web client | +| [**.userName** : Text](#username)

        the user name associated to the session | + + + + +## Session + +

    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**Session** : 4D.Session + +| Parameter | Tipo | | Descripción | +| --------- | ---------- |:--:| -------------- | +| Resultado | 4D.Session | <- | Session object | + + +#### Descripción + +The `Session` command returns the `Session` object corresponding to the current scalable user web session. + +This command only works when [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions). It returns *Null* when sessions are disabled or when legacy sessions are used. + +When scalable sessions are enabled, the `Session` object is available from any web processes in the following contexts: + +- `On Web Authentication`, `On Web Connection`, and `On REST Authentication` database methods, +- ORDA [Data Model Class functions](ORDA/ordaClasses.md) called with REST requests, +- code processed through 4D tags in semi-dynamic pages (4DTEXT, 4DHTML, 4DEVAL, 4DSCRIPT/, 4DCODE) +- project methods with the "Available through 4D tags and URLs (4DACTION...)" attribute and called through 4DACTION/ urls. + + +#### Ejemplo + +You have defined the `action_Session` method with attribute "Available through 4D tags and URLs". You call the method by entering the following URL in your browser: + +``` +IP:port/4DACTION/action_Session +``` + +```4d + //action_Session method + Case of + :(Session#Null) + If(Session.hasPrivilege("WebAdmin")) //calling the hasPrivilege function + WEB SEND TEXT("4DACTION --> Session is WebAdmin") + Else + WEB SEND TEXT("4DACTION --> Session is not WebAdmin") + End if + Else + WEB SEND TEXT("4DACTION --> Sesion is null") + End case +``` + + + +## .clearPrivileges() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.clearPrivileges()** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.clearPrivileges()` function removes all the privileges associated to the session. As a result, the session automatically becomes a Guest session. + + +#### Ejemplo + +```4d +//Invalidate a session +var $isGuest : Boolean + +Session.clearPrivileges() +$isGuest:=Session.isGuest() //$isGuest is True +``` + + + + +## .expirationDate + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.expirationDate** : Text +#### Descripción + +The `.expirationDate` property contains the expiration date and time of the session cookie. The value is expressed as text in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.mmmZ`. + +This property is **read-only**. It is automatically recomputed if the [`.idleTimeout`](#idletimeout) property value is modified. + +#### Ejemplo + +```4d +var $expiration : Text +$expiration:=Session.expirationDate //eg "2021-11-05T17:10:42Z" +``` + + + + + +## .hasPrivilege() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
    + +**.hasPrivilege**( *privilege* : Text ) : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ------------------------------------------------ | +| privilege | Texto | <- | Name of the privilege to verify | +| Resultado | Booleano | <- | True if session has *privilege*, False otherwise | + + +#### Descripción + +The `.hasPrivilege()` function returns True if the privilege is associated to the session, and False otherwise. + + +#### Ejemplo + +You want to check if the "WebAdmin" privilege is associated to the session: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page + +End if +``` + + +## .idleTimeout + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.idleTimeout** : Integer +#### Descripción + +The `.idleTimeout` property contains the inactivity session timeout (in minutes), after which the session is automatically closed by 4D. + +If this property is not set, the default value is 60 (1h). + +When this property is set, the [`.expirationDate`](#expirationdate) property is updated accordingly. + +> The value cannot be less than 60: if a lower value is set, the timeout is raised up to 60. + + +This property is **read write**. + +#### Ejemplo + +```4d +If (Session.isGuest()) + // A Guest session will close after 60 minutes of inactivity + Session.idleTimeout:=60 +Else + // Other sessions will close after 120 minutes of inactivity + Session.idleTimeout:=120 +End if + +``` + + + +## .isGuest() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.isGuest()** : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- |:--:| ----------------------------------------------- | +| Resultado | Booleano | <- | True if session is a Guest one, False otherwise | + +#### Descripción + +The `.isGuest()` function returns True if the session is a Guest session (i.e. it has no privileges). + + +#### Ejemplo + +In the `On Web Connection` database method: + +```4d +If (Session.isGuest()) + //Do something for Guest user +End if +``` + + + + +## .setPrivileges() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.setPrivileges**( *privilege* : Text )
    **.setPrivileges**( *privileges* : Collection )
    **.setPrivileges**( *settings* : Object ) +| Parameter | Tipo | | Descripción | +| ---------- | --------- |:--:| ---------------------------------------------------------- | +| privilege | Texto | -> | Privilege name | +| privileges | Colección | -> | Collection of privilege names | +| parámetros | Objeto | -> | Object with a "privileges" property (string or collection) | + +#### Descripción + +The `.setPrivileges()` function associates the privilege(s) defined in the parameter to the session. + +- In the *privilege* parameter, pass a string containing a privilege name (or several comma-separated privilege names). + +- In the *privileges* parameter, pass a collection of strings containing privilege names. + +- In the *settings* parameter, pass an object containing the following properties: + +| Propiedad | Tipo | Descripción | +| ---------- | ------------------ | -------------------------------------------------- | +| privileges | Text or Collection |
  • String containing a privilege name, or
  • Collection of strings containing privilege names
  • | +| userName | Texto | User name to associate to the session (optional) | + +If the `privileges` property contains an invalid privilege name, it is ignored. + +> In the current implementation, only the "WebAdmin" privilege is available. + +By default when no privilege is associated to the session, the session is a [Guest session](#isguest). + +The [`userName`](#username) property is available at session object level (read-only). + +#### Ejemplo + +In a custom authentication method, you set the "WebAdmin" privilege to the user: + +```4d +var $userOK : Boolean + +... //Authenticate the user + +If ($userOK) //The user has been approved + var $info : Object + $info:=New object() + $info.privileges:=New collection("WebAdmin") + Session.setPrivileges($info) +End if + +``` + + + +## .storage + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.storage** : Object +#### Descripción + +The `.storage` property contains a shared object that can be used to store information available to all requests of the web client. + +When a `Session` object is created, the `.storage` property is empty. Since it is a shared object, this property will be available in the `Storage` object of the server. + +> Like the `Storage` object of the server, the `.storage` property is always "single": adding a shared object or a shared collection to `.storage` does not create a shared group. + +This property is **read only** itself but it returns a read-write object. + +#### Ejemplo + +You want to store the client IP in the `.storage` property. You can write in the `On Web Authentication` database method: + +```4d +If (Session.storage.clientIP=Null) //first access + Use (Session.storage) + Session.storage.clientIP:=New shared object("value"; $clientIP) + End use +End if + +``` + + + + + + +## .userName + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
    + +**.userName** : Text +#### Descripción + +The `.userName` property contains the user name associated to the session. You can use it to identify the user within your code. + +This property is an empty string by default. It can be set using the `privileges` property of the [`setPrivileges()`](#setprivileges) function. + +This property is **read only**. + + + + + + diff --git a/website/translated_docs/es/API/SignalClass.md b/website/translated_docs/es/API/SignalClass.md new file mode 100644 index 00000000000000..3fe4a420430279 --- /dev/null +++ b/website/translated_docs/es/API/SignalClass.md @@ -0,0 +1,254 @@ +--- +id: SignalClass +title: Signal +--- + +Signals are tools provided by the 4D language to manage interactions and avoid conflicts between processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal. + +> Semaphores can also be used to manage interactions. Semaphores allow you to make sure that two or more processes do not modify the same resource (file, record...) at the same time. Only the process that sets the semaphore can remove it. + + +### Signal Object + +A signal is a shared object that must be passed as a parameter to commands that call or create workers or processes. + +A `4D.Signal` object contains the following built-in methods and properties: + +- [`.wait()`](#wait) +- [`.trigger()`](#trigger) +- [`.signaled`](#signaled) +- [`.description`](#description). + +Any worker/process calling the `.wait()` method will suspend its execution until the `.signaled` property is true. While waiting for a signal, the calling process does not use any CPU. This can be very interesting for performance in multiprocess applications. The `.signaled` property becomes true when any worker/process calls the `.trigger()` method. + +Note that to avoid blocking situations, the `.wait()` can also return after a defined timeout has been reached. + +Signal objects are created with the [New signal](#new-signal) command. + + +### Working with signals + +In 4D, you create a new signal object by calling the [`New signal`](#new-signal) command. Once created, this signal must be passed as a parameter to the `New process` or `CALL WORKER` commands so that they can modify it when they have finished the task you want to wait for. + +- `signal.wait()` must be called from the worker/process that needs another worker/process to finish a task in order to continue. +- `signal.trigger()` must be called from the worker/process that finished its execution in order to release all others. + + +![](assets/en/API/signal.png) + +Once a signal has been released using a `signal.trigger()` call, it cannot be reused again. If you want to set another signal, you need to call the `New signal` command again. + +Since a signal object is a [shared object](Concepts/shared.md), you can use it to return results from called workers/processes, provided that you do not forget to write values within a `Use...End use` structure (see example). + +### Ejemplo + +```4d + var $signal : 4D.Signal + + // Creation of a signal + $signal:=New signal + + // call main process and execute OpenForm method + CALL WORKER(1;"OpenForm";$signal) + // do another calculation + ... + // Waiting for the end of the process + $signaled:=$signal.wait() + + // Processing of the results + $calc:=$signal.result+... +``` + +***OpenForm*** method : + +```4d + #DECLARE ($signal : 4D.Signal) + var $form : Object + $form:=New object("value";0) + + // Open the form + $win:=Open form window("Information";Movable form dialog box) + DIALOG("Information";$form) + CLOSE WINDOW($win) + + // Add a new attribute to your $signal shared object to pass your result to the other process: + Use($signal) + $signal.result:=$form.value + End use + + // Trigger the signal to the waiting process + $signal.trigger() +``` + +### Summary + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.description** : Text](#description)

        contains a custom description for the `Signal` object. | +| [**.signaled** : Boolean](#signaled)

        contains the current state of the `Signal` object | +| [**.trigger( )**](#trigger)

        sets the `signaled` property of the signal object to **true** | +| [**.wait**( { *timeout* : Real } ) : Boolean ](#wait)

        makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire | + + + + +## New signal + + +

    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**New signal** { ( *description* : Text ) } : 4D.Signal +| Parameter | Tipo | | Descripción | +| ----------- | --------- |:--:| -------------------------------------- | +| description | Texto | -> | Description for the signal | +| Resultado | 4D.Signal | <- | Native object encapsulating the signal | + + +#### Descripción + +The `New signal` command creates a `4D.Signal` object. + +A signal is a shared object which can be passed as parameter from a worker or process to another worker or process, so that: + +* the called worker/process can update the signal object after specific processing has completed +* the calling worker/process can stop its execution and wait until the signal is updated, without consuming any CPU resources. + +Optionally, in the *description* parameter you can pass a custom text describing the signal. This text can also be defined after signal creation. + +Since the signal object is a shared object, it can also be used to maintain user properties, including the [`.description`](#description) property, by calling the `Use...End use` structure. + + +**Returned value** + +A new [`4D.Signal` object](#signal-object). + +#### Ejemplo + +Here is a typical example of a worker that sets a signal: + +```4d + var $signal : 4D.Signal + $signal:=New signal("This is my first signal") + + CALL WORKER("myworker";"doSomething";$signal) + $signaled:=$signal.wait(1) //wait for 1 second max + + If($signaled) + ALERT("myworker finished the work. Result: "+$signal.myresult) + Else + ALERT("myworker has not finished in less than 1s") + End if +``` + + +The ***doSomething*** method could be like: + +```4d + #DECLARE ($signal : 4D.Signal) + //any processing + //... + Use($signal) + $signal.myresult:=$processingResult //return the result + End use + $signal.trigger() // The work is finished +``` + + + +## .description + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.description** : Text +#### Descripción + +The `.description` property contains a custom description for the `Signal` object.. + +`.description` can be set at the creation of the signal object or at any moment. Note that since the `Signal` object is a shared object, any write-mode access to the `.description` property must be surrounded by a `Use...End use` structure. + +This property is **read-write**. + + + + +## .signaled + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | + +
    + +**.signaled** : Boolean +#### Descripción + +The `.signaled` property contains the current state of the `Signal` object. When the signal is created, `.signaled` is **False**. It becomes **True** when the `.trigger( )` is called on the object. + +This property is **read-only**. + + + + +## .trigger() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.trigger( )** +| Parameter | Tipo | | Descripción | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Descripción + +The `.trigger( )` function sets the `signaled` property of the signal object to **true** and awakens all workers or processes waiting for this signal. + +If the signal is already in the signaled state (i.e., the `signaled` property is already **true**), the function does nothing. + + + + +## .wait() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.wait**( { *timeout* : Real } ) : Boolean +| Parameter | Tipo | | Descripción | +| --------- | -------- | -- | ---------------------------------------------- | +| timeout | Real | -> | Maximum waiting time for the signal in seconds | +| Resultado | Booleano | <- | State of the `.signaled` property | + + +#### Descripción + +The `.wait( )` function makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire. + +To prevent blocking code, you can pass a maximum waiting time in seconds in the *timeout* parameter (decimals are accepted). +> **Warning**: Calling `.wait( )` without a *timeout* in the 4D main process is not recommended because it could freeze the whole 4D application. + +If the signal is already in the signaled state (i.e. the `.signaled` property is already **true**), the function returns immediately, without waiting. + +The function returns the value of the `.signaled` property. Evaluating this value allows knowing if the function returned because the `.trigger( )` has been called (`.signaled` is **true**) or if the *timeout* expired (`.signaled` is **false**). +> The state of a process that waits for a signal is `Waiting for internal flag`. + + + + diff --git a/website/translated_docs/es/API/Transporter.md b/website/translated_docs/es/API/Transporter.md new file mode 100644 index 00000000000000..31f43aa5d4148b --- /dev/null +++ b/website/translated_docs/es/API/Transporter.md @@ -0,0 +1,347 @@ +--- +id: Transporter +title: Transporter Class +--- + +## Descripción + + +## .acceptUnsecureConnection + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.acceptUnsecureConnection** : Boolean + +#### Descripción + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + +--- + + ## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.authenticationMode** : Text +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + + +**.authenticationMode** : Text + +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + + +**.authenticationMode** : Text + +#### Descripción + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valor | Constantes | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + +--- + +## .bodyCharset + +
    History +| Version | Changes | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Added | +
    + +**.bodyCharset** : Text + +#### Descripción + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Valor | Comment | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +| mail mode ISO88591 | ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .connectionTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.connectionTimeOut** : Integer + + +#### Descripción + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + +--- + +## .headerCharset + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.headerCharset** : Text + +#### Descripción + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Valor | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
    • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
    • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
    | +| mail mode ISO88591 | ISO-8859-1 |
    • *headerCharset*: ISO-8859-1 & Quoted-printable
    • *bodyCharset*: ISO-8859-1 & 8-bit
    | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .host + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.host** : Text + +#### Descripción + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + +--- + +## .logFile + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
    + +**.logFile** : Text + +#### Descripción + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + +--- + +## .port + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.port** : Integer + +#### Descripción + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + +--- + + +## .sendTimeOut + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.sendTimeOut** : Integer + +#### Descripción +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + +--- + + +## .user + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.user** : Text + +#### Descripción +The `.user` property contains the user name used for authentication on the mail server. + + +--- + +## .checkConnection() + +
    History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
    + +**.checkConnection()** : Object +| Parameter | Tipo | | Descripción | +| --------- | ------ |:--:| ------------------------------------------- | +| Resultado | Objeto | <- | Status of the transporter object connection | + + +#### Descripción + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propiedad | | Tipo | Descripción | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + + diff --git a/website/translated_docs/es/API/WebServerClass.md b/website/translated_docs/es/API/WebServerClass.md new file mode 100644 index 00000000000000..e1bb2d9977b49d --- /dev/null +++ b/website/translated_docs/es/API/WebServerClass.md @@ -0,0 +1,707 @@ +--- +id: WebServerClass +title: WebServer +--- + + +The `WebServer` class API allows you to start and monitor a web server for the main (host) application as well as each hosted component (see the [Web Server object](WebServer/webServerObject.md) overview). This class is available from the `4D` class store. + + + +### Objeto servidor web + +Web server objects are instantiated with the [`WEB Server`](#web-server) command. + +They provide the following properties and functions: + + +### Summary +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.accessKeyDefined** : Boolean](#accesskeydefined)

        true if an access key is defined in the settings of the web server | +| [**.certificateFolder** : Text](#certificatefolder)

        folder where the certificate files are located | +| [**.characterSet** : Number
    **.characterSet** : Text](#characterset)

        character set that the 4D Web Server should use to communicate with browsers connecting to the application | +| [**.cipherSuite** : Text](#ciphersuite)

        cipher list used for the secure protocol | +| [**.CORSEnabled** : Boolean](#corsenabled)

        CORS (*Cross-origin resource sharing*) service status for the web server | +| [**.CORSSettings** : Collection](#corssettings)

        list of allowed hosts and methods for the CORS service | +| [**.debugLog** : Number](#debuglog)

        status of the HTTP request log file | +| [**.defaultHomepage** : Text](#defaulthomepage)

        name of the default home page | +| [**.HSTSEnabled** : Boolean](#hstsenabled)

        HTTP Strict Transport Security (HSTS) status | +| [**.HSTSMaxAge** : Number](#hstsmaxage)

        maximum length of time (in seconds) that HSTS is active for each new client connection | +| [**.HTTPCompressionLevel** : Number](#httpcompressionlevel)

        compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies) | +| [**.HTTPCompressionThreshold** : Number](#httpcompressionthreshold)

        size threshold (bytes) for requests below which exchanges should not be compressed | +| [**.HTTPEnabled** : Boolean](#httpenabled)

        HTTP protocol state | +| [**.HTTPPort** : Number](#httpport)

        listening IP port number for HTTP | +| [**.HTTPTrace** : Boolean](#httptrace)

        activation of `HTTP TRACE` | +| [**.HTTPSEnabled** : Boolean](#httpsenabled)

        HTTPS protocol state | +| [**.HTTPSPort** : Number](#httpsport)

        listening IP port number for HTTPS | +| [**.inactiveProcessTimeout** : Number](#inactiveprocesstimeout)

        life duration (in minutes) of the inactive legacy session processes | +| [**.inactiveSessionTimeout** : Number](#inactivesessiontimeout)

        life duration (in minutes) of inactive legacy sessions (duration set in cookie) | +| [**.IPAddressToListen** : Text](#ipaddresstolisten)

        IP address on which the 4D Web Server will receive HTTP requests | +| [**.isRunning** : Boolean](#isrunning)

        web server running state | +| [**.keepSession** : Boolean](#keepsession)

        True if legacy sessions are enabled in the web server, False otherwise | +| [**.logRecording** : Number](#logrecording)

        log requests (logweb.txt) recording value | +| [**.maxConcurrentProcesses** : Number](#maxconcurrentprocesses)

        maximum number of concurrent web processes supported by the web server | +| [**.maxRequestSize** : Number](#maxrequestsize)

        maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process | +| [**.maxSessions** : Number](#maxsessions)

        maximum number of simultaneous legacy sessions | +| [**.minTLSVersion** : Number](#mintlsversion)

        minimum TLS version accepted for connections | +| [**.name** : Text](#name)

        name of the web server application | +| [**.openSSLVersion** : Text](#opensslversion)

        version of the OpenSSL library used | +| [**.perfectForwardSecrecy** : Boolean](#perfectforwardsecrecy)

        PFS availability on the server | +| [**.rootFolder** : Text](#rootfolder)

        path of web server root folder | +| [**.scalableSession** : Boolean](#scalablesession)

        True if scalable sessions are used in the web server, and False otherwise | + + +[**.sessionCookieDomain** : Text](#sessioncookiedomain)

        "domain" field of the session cookie| |[**.sessionCookieName** : Text](#sessioncookiename)

        name of the cookie used for storing the session ID| |[**.sessionCookiePath** : Text](#sessioncookiepath)

        "path" field of the session cookie| |[**.sessionCookieSameSite** : Text](#sessioncookiesamesite)

        "SameSite" session cookie value| |[**.sessionIPAddressValidation** : Boolean](#sessionipaddressvalidation)

        IP address validation for session cookies| |[ **.start**() : Object
    **.start**( *settings* : Object ) : Object](#start)

        starts the web server on which it is applied| |[**.stop()** ](#stop)

        stops the web server on which it is applied| + + + +## WEB Server + +

    History +| Version | Changes | +| ------- | ---------------------------------- | +| v18 R3 | Added | +| v19 | support for .sessionCookieSameSite | + +
    + +**WEB Server** : 4D.WebServer
    **WEB Server**( *option* : Integer ) : 4D.WebServer + + +| Parameter | Tipo | | Descripción | +| --------- | ------------ | -- | -------------------------------------------------------------- | +| option | Entero | -> | Web server to get (default if omitted = `Web server database`) | +| Resultado | 4D.WebServer | <- | Web server object | + + +The `WEB Server` command returns the default Web server object, or the Web server object defined through the *option* parameter. + +By default, if the *option* parameter is omitted, the command returns a reference to the Web server of the database, i.e. the default Web server. To designate the Web server to return, you can pass one of the following constants in the *option* parameter: + +| Constant | Valor | Comment | +| ------------------------------ | ----- | -------------------------------------------------------- | +| `Web server database` | 1 | Current database Web server (default if omitted) | +| `Web server host database` | 2 | Web server of the host database of a component | +| `Web server receiving request` | 3 | Web server that received the request (target Web server) | + +The returned Web server object contains the current values of the Web server properties. + +#### Ejemplo + +From your component, you want to know if the Web server of the host database is started: + +```4d + // Method of a component + var $hostWS : 4D.WebServer + $hostWS:=WEB Server(Web server host database) + If($hostWS.isRunning) + ... + End if +``` + +## WEB Server list + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
    + +**WEB Server list** : Collection + + +| Parameter | Tipo | | Descripción | +| --------- | --------- | -- | ---------------------------------------------- | +| Resultado | Colección | <- | Collection of the available Web server objects | + + +The `WEB Server list` command returns a collection of all Web server objects available in the 4D application. + +A 4D application can contain anywhere from one to several Web servers: + +- one Web server for the host database (default Web server) +- one Web server for each component. + +All available Web servers are returned by the `WEB Server list` command, whether they are actually running or not. + +> The default Web server object is automatically loaded by 4D at startup. On the other hand, each component Web server that you want to use must be instantiated using the [`WEB Server`](#web-server) command. + +You can use the [.name](#name) property of the Web server object to identify the project or component to which each Web server object in the list is attached. + + +#### Ejemplo + +We want to know how many running web servers are available: + +```4d + var $wSList : Collection + var $vRun : Integer + + $wSList:=WEB Server list + $vRun:=$wSList.countValues(True;"isRunning") + ALERT(String($vRun)+" web server(s) running on "+String($wSList.length)+" available.") + +``` + + + + +## .accessKeyDefined + + +**.accessKeyDefined** : Boolean + +The **.accessKeyDefined** property contains true if an access key is defined in the settings of the web server. This property is used by the WebAdmin web server to validate the security configuration of the administration interface. + + + +## .certificateFolder + + + +**.certificateFolder** : Text + +Path of the folder where the certificate files are located. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter of the [`.start()`](#start) function, it can be a [`Folder` object](FolderClass.md). + + + + +## .characterSet + + +**.characterSet** : Number
    **.characterSet** : Text + +The character set that the 4D Web Server should use to communicate with browsers connecting to the application. The default value actually depends on the language of the OS. Can be a MIBEnum integer or a Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets/character-sets.xhtml). Here is the list of identifiers corresponding to the character sets supported by the 4D Web Server: + +* 4 = ISO-8859-1 +* 12 = ISO-8859-9 +* 13 = ISO-8859-10 +* 17 = Shift-JIS +* 2024 = Windows-31J +* 2026 = Big5 +* 38 = euc-kr +* 106 = UTF-8 +* 2250 = Windows-1250 +* 2251 = Windows-1251 +* 2253 = Windows-1253 +* 2255 = Windows-1255 +* 2256 = Windows-1256 + + + + +## .cipherSuite + + +**.cipherSuite** : Text + +The cipher list used for the secure protocol. Sets the priority of ciphering algorithms implemented by the 4D web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + + + + + +## .CORSEnabled + +**.CORSEnabled** : Boolean + +The CORS (*Cross-origin resource sharing*) service status for the web server. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled (True), XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see `CORSSettings` below). When disabled (False, default), all cross site requests sent with CORS are ignored. When enabled (True) and a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +Default: False (disabled) + +For more information about CORS, please refer to the [Cross-origin resource sharing page](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + + + + +## .CORSSettings + + +**.CORSSettings** : Collection + +A list of allowed hosts and methods for the CORS service (see [`CORSEnabled`](#corsenabled) property). Each object must contain a **host** property and, optionally, a **methods** property: + +* **host** (text, mandatory): Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. If *host* is not present or empty, the object is ignored. Several syntaxes are supported: + - 192.168.5.17:8081 + - 192.168.5.17 + - 192.168.* + - 192.168.*:8081 + - http://192.168.5.17:8081 + - http://*.myDomain.com + - http://myProject.myDomain.com + - *.myDomain.com + - myProject.myDomain.com + - \* + +* **methods** (text, optional): Accepted HTTP method(s) for the corresponding CORS host. Separate each method with a ";" (e,g,: "post;get"). If *methods* is empty, null, or undefined, all methods are enabled. + + + + +## .debugLog + + +**.debugLog** : Number + +The status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). + +* 0 = disabled +* 1 = enabled without body parts (body size is provided in this case) +* 3 = enabled with body parts in response only +* 5 = enabled with body parts in request only +* 7 = enabled with body parts in response and request + + + + +## .defaultHomepage + + +**.defaultHomepage** : Text + +The name of the default home page or "" to not send the custom home page. + + + + +## .HSTSEnabled + +**.HSTSEnabled** : Boolean + +The HTTP Strict Transport Security (HSTS) status. HSTS allows the Web server to declare that browsers should only interact with it via secure HTTPS connections. Browsers will record the HSTS information the first time they receive a response from the web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the `HSTSMaxAge` property. HSTS requires that HTTPS is enabled on the server. HTTP must also be enabled to allow initial client connections. + + + + +## .HSTSMaxAge + +**.HSTSMaxAge** : Number + +The maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. + +Default value: 63072000 (2 years). + + + + +## .HTTPCompressionLevel + +**.HTTPCompressionLevel** : Number + +The compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). + +Possible values: + +* 1 to 9 (where 1 is the fastest compression and 9 the highest). +* -1 = set a compromise between speed and rate of compression. + +Default = 1 (faster compression). + + + + +## .HTTPCompressionThreshold + +**.HTTPCompressionThreshold** : Number + +The size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Default compression threshold = 1024 bytes + + + + +## .HTTPEnabled + + +**.HTTPEnabled** : Boolean + +The HTTP protocol state. + + + + + +## .HTTPPort + + +**.HTTPPort** : Number + +The listening IP port number for HTTP. + +Default = 80 + + + + +## .HTTPTrace + +**.HTTPTrace** : Boolean + +The activation of `HTTP TRACE`. For security reasons, by default the Web server rejects `HTTP TRACE` requests with an error 405. When enabled, the web server replies to `HTTP TRACE` requests with the request line, header, and body. + + + + +## .HTTPSEnabled + + +**.HTTPSEnabled** : Boolean The HTTPS protocol state. + + + + +## .HTTPSPort + + +**.HTTPSPort** : Number The listening IP port number for HTTPS. + +Default = 443 + + + + +## .inactiveProcessTimeout + +**.inactiveProcessTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of the inactive legacy session processes. At the end of the timeout, the process is killed on the server, the `On Web Legacy Close Session` database method is called, then the legacy session context is destroyed. + +Default = 480 minutes + + + + +## .inactiveSessionTimeout + +**.inactiveSessionTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of inactive legacy sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default = 480 minutes + + + + +## .IPAddressToListen + + +**.IPAddressToListen** : Text + +The IP address on which the 4D Web Server will receive HTTP requests. By default, no specific address is defined. Both IPv6 string formats and IPv4 string formats are supported. + + + + + +## .isRunning + + +**.isRunning** : Boolean + +*Read-only property* + +The web server running state. + + + + +## .keepSession + +**.keepSession** : Boolean + +True if legacy sessions are enabled in the web server, False otherwise. + +##### See also: +[.scalableSession](#scalablesession) + + + + +## .logRecording + + +**.logRecording** : Number + +The log requests (logweb.txt) recording value. + +* 0 = Do not record (default) +* 1 = Record in CLF format +* 2 = Record in DLF format +* 3 = Record in ELF format +* 4 = Record in WLF format + + + + +## .maxConcurrentProcesses + + +**.maxConcurrentProcesses** : Number + +The maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. + +Possible values: 10 - 32000 + +Default = 100 + + + + +## .maxRequestSize + + +**.maxRequestSize** : Number + +The maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process. Passing the maximum value (2147483647) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. + +Possible values: 500000 - 2147483647 + + + + +## .maxSessions + +**.maxSessions** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The maximum number of simultaneous legacy sessions. When you reach the limit, the oldest legacy session is closed (and `On Web Legacy Close Session` database method is called) if the web server needs to create a new one. The number of simultaneous legacy sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default) + + + + +## .minTLSVersion + +**.minTLSVersion** : Number + +The minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +* 1 = TLSv1_0 +* 2 = TLSv1_1 +* 3 = TLSv1_2 (default) +* 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + + + + +## .name + + +**.name** : Text + +*Read-only property* + +The name of the web server application. + + + + + +## .openSSLVersion + +**.openSSLVersion** : Text + +*Read-only property* + +The version of the OpenSSL library used. + + + + +## .perfectForwardSecrecy + + +**.perfectForwardSecrecy** : Boolean + +*Read-only property* + +The PFS availability on the server. + + + +## .rootFolder + + +**.rootFolder** : Text + +The path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object. + + +## .scalableSession + + +**.scalableSession** : Boolean + +True if scalable sessions are used in the web server, and False otherwise. + +##### See also: +[.keepSession](#keepsession) + + +## .sessionCookieDomain + + +**.sessionCookieDomain** : Text + +The "domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + + + +## .sessionCookieName + + +**.sessionCookieName** : Text + +The name of the cookie used for storing the session ID. + +*Read-only property* + + + + +## .sessionCookiePath + + +**.sessionCookiePath** : Text + +The "path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + + + +## .sessionCookieSameSite + +
    History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
    + +**.sessionCookieSameSite** : Text + +The "SameSite" session cookie value. Possible values (using constants): + +| Constant | Valor | Descripción | +| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| Web SameSite Strict | "Strict" | *Default value* - Cookies are only sent in a first-party context | +| Web SameSite Lax | "Lax" | Cookies are also sent on cross-site subrequests but only when a user is navigating to the origin site (i.e. when following a link). | +| Web SameSite None | "None" | Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. | + +See the [Session Cookie SameSite](WebServer/webServerConfig.md#session-cookie-samesite) description for detailed information. + + + + +## .sessionIPAddressValidation + + +**.sessionIPAddressValidation** : Boolean + +The IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between WiFi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change (this setting lowers the security level of your application). + + + + +## .start() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
    + + +**.start**() : Object
    **.start**( *settings* : Object ) : Object + + + +| Parameter | Tipo | | Descripción | +| ---------- | ------ | -- | ------------------------------------- | +| parámetros | Objeto | -> | Web server settings to set at startup | +| Resultado | Objeto | <- | Status of the web server startup | + + +The `.start()` function starts the web server on which it is applied, using properties set in the optional *settings* object parameter. + +The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session. + +All settings of [Web Server objects](#web-server-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName(#sessioncookiename)]). + +Customized session settings will be reset when the [`.stop()`](#stop) function is called. + + +#### Returned object + +The function returns an object describing the Web server launch status. This object can contain the following properties: + +| Propiedad | | Tipo | Descripción | +| --------- | ----------------------- | --------- | -------------------------------------------------------------------- | +| success | | Booleano | True if the web server was correctly started, False otherwise | +| errors | | Colección | 4D error stack (not returned if the web server started successfully) | +| | \[].errCode | Número | 4D error code | +| | \[].message | Texto | Description of the 4D error | +| | \[].componentSignature | Texto | Signature of the internal component which returned the error | +> If the Web server was already launched, an error is returned. + +#### Ejemplo + +```4d + var $settings;$result : Object + var $webServer : 4D.WebServer + + $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html") + + $webServer:=WEB Server + $result:=$webServer.start($settings) + If($result.success) + //... + End if +``` + + + + +## .stop() + +
    History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
    + +**.stop()** + +| Parameter | Tipo | | Descripción | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +The `.stop()` function stops the web server on which it is applied. + +If the web server was started, all web connections and web processes are closed, once the currently handled requests are finished. If the web server was not started, the method does nothing. +> This function resets the customized web settings defined for the session using the *settings* parameter of the [`.start()`](#start) function, if any. + + +#### Ejemplo + +To stop the database Web server: + +```4d + var $webServer : 4D.WebServer + + $webServer:=WEB Server(Web server database) + $webServer.stop() +``` + + + + + + diff --git a/website/translated_docs/es/API/ZipArchiveClass.md b/website/translated_docs/es/API/ZipArchiveClass.md new file mode 100644 index 00000000000000..49fc87d58edea9 --- /dev/null +++ b/website/translated_docs/es/API/ZipArchiveClass.md @@ -0,0 +1,374 @@ +--- +id: ZipArchiveClass +title: ZIPArchive +--- + + +A 4D ZIP archive is a `File` or `Folder` object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save disk space or transfer files via mediums which may have size limitations (e.g., email or network). + +- You create a 4D ZIP archive with the [ZIP Create archive](#zip-create-archive) command. +- 4D [`ZIPFile`](ZipFileClass.md) and [`ZIPFolder`](ZipFolderClass.md) instances are available through the [`root`](#root) property (`ZIPFolder`) of the object returned by [ZIP Read archive](#zip-read-archive) command. + + +### Ejemplo + +To retrieve and view the contents of a ZIP file object: + +```4d +var $path; $archive : 4D.File +var $zipFile : 4D.ZipFile +var $zipFolder : 4D.ZipFolder +var $txt : Text + +$path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") +$archive:=ZIP Read archive($path) +$zipFolder:=$archive.root // store the zip main folder +$zipFile:=$zipFolder.files()[0] //read the first zipped file + +If($zipFile.extension=".txt") + $txt:=$zipFile.getText() +End if +``` + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.root** : 4D.ZipFolder](#root)

        a virtual folder providing access to the contents of the ZIP archive | + + +## ZIP Create archive + +

    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**ZIP Create archive** ( *fileToZip* : 4D.File ; *destinationFile* : 4D.File ) : Object
    **ZIP Create archive** ( *folderToZip* : 4D.Folder ; *destinationFile* : 4D.File { ; *options* : Integer }) : Object
    **ZIP Create archive** ( *zipStructure* : Object ; *destinationFile* : 4D.File ) : Object +| Parameter | Tipo | | Descripción | +| --------------- | --------- |:--:| ---------------------------------------------------- | +| fileToZip | 4D.File | -> | File or Folder object to compress | +| folderToZip | 4D.Folder | -> | File or Folder object to compress | +| zipStructure | Objeto | -> | File or Folder object to compress | +| destinationFile | 4D.File | -> | Destination file for the archive | +| options | Entero | -> | *folderToZip* option: `ZIP Without enclosing folder` | +| Resultado | Objeto | <- | Status object | + + +#### Descripción + +The `ZIP Create archive` command creates a compressed ZIP archive object and returns the status of the operation. + +You can pass a 4D.File, a 4D.Folder, or a zip structure object as first parameter: + +- *fileToZip*: You simply pass a `4D.File` to compress. + +- *folderToZip*: You pass a `4D.Folder` to compress. In this case, the *options* parameter allows you to compress only the contents of the folder (i.e., exclude the enclosing folder). By default, `ZIP Create archive` will compress the folder and its contents, so that the decompressing operation will recreate a folder. If you want the decompressing operation to restore only the contents of the folder, pass the `ZIP Without enclosing folder` constant in the *options* parameter. + +- *zipStructure*: You pass an object describing the ZIP archive object. The following properties are available to define the structure:
  • a collection of `4D.File` or `4D.Folder` objects or
  • a collection of objects with the following properties:
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Propiedad + + Tipo + + Descripción +
    + source + + 4D.File o 4D.Folder + + + File or Folder +
    + destination + + Text + + (optional) - Specify a relative filepath to change the organization of the contents of the archive +
    + option + + number + + (optional) - `ZIP Ignore invisible files` or 0 to compress all of the file +
    + + + + + + callback + + + + 4D.Function + + + + A callback formula that will receive the compression progress (0 - 100) in $1. + + + + +In the *destinationFile* parameter, pass a `4D.File` object describing the ZIP archive to create (name, location, etc.). It is advised to use the ".zip" extension if you want the ZIP archive to be processed automatically by any software. + +Once an archive is created, you can use the [ZIP Read archive](#zip-read-archive) command to access it. + +**Status object** + +The returned status object contains the following properties: + +| Propiedad | Tipo | Descripción | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| statusText | Text | Error message (if any):
  • Cannot open ZIP archive
  • Cannot create ZIP archive
  • Password is required for encryption | +| status | Integer | Status code | +| success | Boolean | True if archive created successfully, else false | + + + + + +#### Ejemplo 1 + +To compress a `4D.File`: + + + +```4d + var $file; $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/file.zip") + $file:=Folder(fk desktop folder).file("MyDocs/text.txt") + + $status:=ZIP Create archive($file;$destination) +``` + + + + + +#### Ejemplo 2 + +To compress a `4D.Folder` without the folder itself: + + + +```4D + var $folder : 4D.Folder + var $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/Images.zip") + $folder:=Folder(fk desktop folder).folder("MyDocs/Images") + + $status:=ZIP Create archive($folder;$destination;ZIP Without enclosing folder) +``` + + + + +#### Example 3 + +To compress a ZIP archive structure with a password and progress bar: + + + +```4d + var $destination : 4D.File + var $zip;$status : Object + var progID : Integer + + $destination:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + + $zip:=New object + $zip.files:=Folder(fk desktop folder).folder("MyDocs/Resources").folders() + $zip.password:="password" + $zip.callback:=Formula(myFormulaCompressingMethod($1)) + + progID:=Progress New //we use the 4D Progress component + + $status:=ZIP Create archive($zip;$destination) + + Progress QUIT(progID) +``` + + +`myFormulaCompressingMethod`: + + + +```4d + var $1 : Integer + Progress SET PROGRESS(progID;Num($1/100)) +``` + + + + + +#### Example 4 + +You want to pass a collection of folders and files to compress to the *zipStructure* object: + + + +```4d + var $destination : 4D.File + var $zip;$err : Object + $zip:=New object + $zip.files:=New collection + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text2.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Images/image.png"))) + + $destination:=Folder(fk desktop folder).file("file.zip") + $err:=ZIP Create archive($zip;$destination) +``` + + + + + + + +## ZIP Read archive + +
    History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
    + +**ZIP Read archive** ( *zipFile* : 4D.File { ; *password* : Text }) : 4D.ZipArchive + +| Parameter | Tipo | | Descripción | +| --------- | ------------- |:--:| --------------------------- | +| zipFile | 4D.File | -> | Zip archive file | +| password | Texto | -> | ZIP archive password if any | +| Resultado | 4D.ZipArchive | <- | Archive object | + + + + + +#### Descripción + +The `ZIP Read archive` command retrieves the contents of *zipFile* and returns it as a `4D.ZipArchive` object. + + + +> This command does not uncompress the ZIP archive, it only provides a view of its contents. To extract the contents of an archive, you need to use methods such as [file.copyTo()](Document.md#copyto) or [folder.copyTo()](Directory.md#copyto). + +Pass a `4D.File` object referencing the compressed ZIP archive in the *zipFile* parameter. The target archive file will be opened until the `ZIP Read archive` has finished executing and all contents/references have been extracted/released, then it will be closed automatically. + +If the *zipFile* is password protected, you need to use the optional *password* parameter to provide a password. If a password is required but not passed when trying to read the contents of the archive, an error is generated. + +**Archive object** + +The returned `4D.ZipArchive` object contains a single [`root`](#root) property whose value is a `4D.ZipFolder` object. This folder describes the whole contents of the ZIP archive. + + + + + +#### Ejemplo + +To retrieve and view the contents of a ZIP file object: + + + +```4d + var $archive : 4D.ZipArchive + var $path : 4D.File + + $path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + $archive:=ZIP Read archive($path) +``` + + +To retrieve the list of the files and folders in the archive: + + + +```4d + $folders:=$archive.root.folders() + $files:=$archive.root.files() +``` + + +To read the contents of a file without extracting it from the root folder: + + + +```4d + + If($files[$i].extension=".txt") + $txt:=$files[$i].getText() + Else + $blob:=$files[$i].getContent() + End if +``` + + +To extract from the root folder: + + + +```4d + //extract a file + $folderResult:=$files[$i].copyTo(Folder(fk desktop folder).folder("MyDocs")) + + //extract all files + $folderResult:=$archive.root.copyTo(Folder(fk desktop folder).folder("MyDocs")) +``` + + + + + + +## .root + +**.root** : 4D.ZipFolder + + + +#### Descripción + +The `.root` property contains a virtual folder providing access to the contents of the ZIP archive. + +The `root` folder and its contents can be manipulated with the [ZipFile](ZipFileClass.md) and [ZipFolder](ZipFolderClass.md) functions and properties. + +This property is **read-only**. + + + diff --git a/website/translated_docs/es/API/ZipFileClass.md b/website/translated_docs/es/API/ZipFileClass.md new file mode 100644 index 00000000000000..763aab543a3954 --- /dev/null +++ b/website/translated_docs/es/API/ZipFileClass.md @@ -0,0 +1,33 @@ +--- +id: ZipFileClass +title: ZIPFile +--- + +The following properties and functions from the [File](FileClass.md) class are available to `ZIPFile` objects: + +| Available [File](FileClass.md) APIs for ZIPFile | Comment | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](FileClass.md#copyto) | | +| [**.creationDate** : Date](FileClass.md#creationdate) | | +| [**.creationTime** : Time](FileClass.md#creationtime) | | +| [**.exists** : Boolean](FileClass.md#exists) | | +| [**.extension** : Text](FileClass.md#extension) | | +| [**.fullName** : Text](FileClass.md#fullname) | | +| [**.getContent( )** : 4D.Blob](FileClass.md#getcontent) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FileClass.md#geticon) | | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
    **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](FileClass.md#gettext) | | +| [**.hidden** : Boolean](FileClass.md#hidden) | | +| [**.isAlias** : Boolean](FileClass.md#isalias) | | +| [**.isFile** : Boolean](FileClass.md#isfile) | | +| [**.isFolder** : Boolean](FileClass.md#isfolder) | | +| [**.isWritable** : Boolean](FileClass.md#iswritable) | Always false with ZIP archive | +| [**.modificationDate** : Date](FileClass.md#modificationdate) | | +| [**.modificationTime** : Time](FileClass.md#modificationtime) | | +| [**.name** : Text](FileClass.md#name) | | +| [**.original** : 4D.File
    **.original** : 4D.Folder](FileClass.md#original) | | +| [**.parent** : 4D.Folder](FileClass.md#parent) | | +| [**.path** : Text](FileClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FileClass.md#platformpath) | | + + + diff --git a/website/translated_docs/es/API/ZipFolderClass.md b/website/translated_docs/es/API/ZipFolderClass.md new file mode 100644 index 00000000000000..7e6b7a913e731d --- /dev/null +++ b/website/translated_docs/es/API/ZipFolderClass.md @@ -0,0 +1,37 @@ +--- +id: ZipFolderClass +title: ZIPFolder +--- + + +The following properties and functions from the [Folder](FolderClass.md) class are available to `ZIPFolder` objects: + + +| Available [Folder](FolderClass.md) APIs for ZIPFolder | Comment | +| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](FolderClass.md#copyto) | | +| [**.creationDate** : Date](FolderClass.md#creationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.creationTime** : Time](FolderClass.md#creationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.exists** : Boolean](FolderClass.md#exists) | | +| [**.extension** : Text](FolderClass.md#extension) | | +| [**.file**( *path* : Text ) : 4D.File](FolderClass.md#file) | | +| [**.files**( { *options* : Integer } ) : Collection](FolderClass.md#files) | | +| [**.folder**( *path* : Text ) : 4D.Folder](FolderClass.md#folder) | | +| [**.folders**( { *options* : Integer } ) : Collection](FolderClass.md#folders) | | +| [**.fullName** : Text](FolderClass.md#fullname) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FolderClass.md#geticon) | | +| [**.hidden** : Boolean](FolderClass.md#hidden) | | +| [**.isAlias** : Boolean](FolderClass.md#isalias) | | +| [**.isFile** : Boolean](FolderClass.md#isfile) | | +| [**.isFolder** : Boolean](FolderClass.md#isfolder) | | +| [**.isPackage** : Boolean](FolderClass.md#ispackage) | | +| [**.modificationDate** : Date](FolderClass.md#modificationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.modificationTime** : Time](FolderClass.md#modificationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.name** : Text](FolderClass.md#name) | | +| [**.original** : 4D.Folder](FolderClass.md#original) | | +| [**.parent** : 4D.Folder](FolderClass.md#parent) | The archive's virtual `root` folder has no parent. However, the folders within the archive may have a parent other than the root. | +| [**.path** : Text](FolderClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FolderClass.md#platformpath) | | + + + diff --git a/website/translated_docs/es/API/overview.md b/website/translated_docs/es/API/overview.md new file mode 100644 index 00000000000000..d00def4a57c93f --- /dev/null +++ b/website/translated_docs/es/API/overview.md @@ -0,0 +1,27 @@ +--- +id: generalidades +title: Class API Overview +--- + +This section describes the built-in 4D class API as well as the associated constructor commands. 4D class functions and properties are available through class instance objects. + +- functions must be called on instances with the () operator. For example, `collection.sort()`. + +- properties are accessed without parentheses, for example `file.creationTime`. You can also use the \[] syntax, for example `file["creationTime"]`. + +## Writing conventions + +The following conventions are used in the function syntax: + +- the `{ }` characters (braces) indicate optional parameters. For example, `.delete( { option : Integer } )` means that the *option* parameter may be omitted when calling the function. +- the `{ ; ...param }` notation indicates an unlimited number of parameters. For example, `.concat( value : any { ;...valueN } ) : Collection` means that an unlimited number of values of any type can be passed to the function. +- the `any` keyword is used for parameters that can be of any type that can be stored within attributes (number, text, boolean, date, time, object, collection...). + +## Other resources + +For an overall presentation of the 4D Language basics and concepts, please go to the [4D Language Concepts](Concepts/about.md) section. + +For a description of the 4D "classic" language, please go to the *4D Language Reference* on [doc.4d.com](https://doc.4d.com). + + + diff --git a/website/translated_docs/es/Admin/building.md b/website/translated_docs/es/Admin/building.md new file mode 100644 index 00000000000000..3967ed82ae9383 --- /dev/null +++ b/website/translated_docs/es/Admin/building.md @@ -0,0 +1,648 @@ +--- +id: building +title: Building a project package +--- + +4D includes a final application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. + +The application builder allows you to: + +* Build a compiled structure, 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 structure 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). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible in compiled applications. + + +## Build application overview + +Building a project package can be carried out using: + +- either the [BUILD APPLICATION](https://doc.4d.com/4Dv18R4/4D/18-R4/BUILD-APPLICATION.301-4982852.en.html) command, +- or the [Build Application window](#application-builder). + +To display the Build Application dialog, select **Design** > **Build Application...** from the menu bar. + +![](assets/en/Project/buildappProj.png) + +The Build Application dialog includes several pages that can be accessed using tabs: + +![](assets/en/Project/appbuilderProj.png) + + +Building can only be carried out once the project is compiled. If you select this command without having previously compiled the project, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the project must be (re)compiled. + + +### 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 project. + +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. + +XML keys provide additional options besides those displayed in the Build Application dialog box. The description of these keys are detailed in the [4D XML Keys BuildApplication](https://doc.4d.com/4Dv18R4/4D/18-R4/4D-XML-Keys-BuildApplication.100-5068211.en.html) manual. + +### Log file + +When an application is built, 4D generates a log file named *BuildApp.log.xml* in the **Logs** folder of the project. 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, +- Any signing issues (e.g. a non-signed plug-in). + +Checking this file may help you saving time during the subsequent deployment steps, for example if you intend to notarize your application. + +> Use the `Get 4D file(Build application log file)` command to get the log file location. + + + +## Application name and destination folder + +![](assets/en/Project/buidappstructureProj.png) + +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 an application containing only compiled code. + +This feature creates a *.4dz* file within a *Compiled Database/\* folder. For example, if you have named your application “MyProjectâ€, 4D will create: + +*\/Compiled Database/MyProject/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. 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 project are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to the [description of project architecture](Project/architecture.md). + + +### 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 project (the host application project), its functionalities are accessible from the host project. + +If you have named your application, *MyComponent*, 4D will create a *Components* folder containing *MyComponent.4dbase* folder: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +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). + + +## 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 application project. + +The following elements are required for the build: +- 4D Volume Desktop (the 4D database engine), +- an [appropriate license](#licenses) + +On Windows, this feature creates an executable file (.exe). On macOS, it handles the creation of software packages. + +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/). + +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). + +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). + +#### 4D Volume Desktop Location + +In order to build a stand-alone application, you must first designate the folder containing the 4D Volume Desktop file: + +* *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. + +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). + +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. + +> 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. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +#### Generated files + +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. + +If you have specified "MyProject" as the name of the application, you will find the following files in this subfolder (aka MyProject): + +* *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 project as well as the project 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 project. 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* + - 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/4Dv18R4/4D/18-R4/Application-file.301-4982855.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 + +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: + +* Install a 4D Volume Desktop version corresponding to a specific language; +* Add a custom *PlugIns* folder; +* Customize the contents of the *Resources* folder. +> 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 + +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: + +* *cert.pem* and *key.pem* files (optional): These files are used for TLS connections and by data encryption commands, +* default Web root folder. + +Items must be installed: + +- **on Windows**: in the *Final Application\MyProject\Database* subfolder. +- **on macOS**: next to the *MyProject.app* software package. + + + + + +## Client/Server page + +On this tab, you can build customized client-server applications that are homogenous, cross-platform and with an automatic update option. + +![](assets/en/Project/buildappCSProj.png) + +### What is a Client/Server application? + +A client/server application comes from the combination of three items: + +- A compiled 4D project, +- The 4D Server application, +- The 4D Volume Desktop application (macOS and/or Windows). + +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 project file 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 server 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)). + + + +### Build server application + +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). + +#### 4D Server location + +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. + +#### Current version + +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)). + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +### Build client application + +Checking this option generates the client part of your application during the building phase. + +#### 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). + +> 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. + +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. + +- **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. + +* **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). If you have followed the process for generating a cross-platform client application, a .*4darchive* update file is available for each platform: + +To trigger client application update notifications, simply replace the old version of the server application with the new one and then execute it. The rest of the process is automatic. + +On the client side, when the “old†client application tries to connect to the updated server application, a dialog box is displayed on the client machine, indicating that a new version is available. The user can either update their version or cancel the dialog box. + +* If the user clicks **OK**, the new version is downloaded to the client machine over the network. Once the download is complete, the old client application is closed and the new version is launched and connects to the server. The old version of the application is then placed in the machine’s recycle bin. +* If the user clicks **Cancel**, the update is cancelled; if the old version of the client application is not in the range of versions accepted by the server (please refer to the following paragraph), the application is closed and connection is impossible. Otherwise (by default), the connection is established. + +#### Forcing automatic updates + +In some cases, you may want to prevent client applications from being able to cancel the update download. For example, if you used a new version of the 4D Server source application, the new version of the client application must absolutely be installed on each client machine. + +To force the update, simply exclude the current version number of client applications (X-1 and earlier) in the version number range compatible with the server application. In this case, the update mechanism will not allow non-updated client applications to connect. For example, if the new version of the client-server application is 6, you can stipulate that any client application with a version number lower than 6 will not be allowed to connect. + +The [current version number](build-server-application) is set on the Client/Server page of the Build Application dialog box. + +The [current version number](#current_version) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). + + +#### Update Error + +If 4D cannot carry out the update of the client application, the client machine displays the following error message: “The update of the client application failed. The application is now going to quit.†+ +There are many possible causes for this error. When you get this message, it is advisable to check the following parameters first off: + +* **Pathnames** - Check the validity of the pathnames set in the application project via the Application builder dialog box or via XML keys (for example *ClientMacFolderToWin*). More particularly, check the pathnames to the versions of 4D Volume Desktop. +* **Read/write privileges** - On the client machine, check that the current user has write access rights for the client application update. + + +### Generated files + +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*. +> 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. + +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. + +The contents of these folders vary depending on the current platform: + +* *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. + +If you checked the “Allow automatic update of client application†option, an additional subfolder called *Upgrade4DClient* is added in the *\Server* folder/package.
  • + +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. + + +#### Location of Web files + +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* 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 application** - in the *Client Server executable\ \Client* subfolder. + +* **on macOS** + * **Server application** - next to the *\Server* software package. + * **Client application** - next to the *\Client* software package. + + +### Embedding a single-user client application + +4D allows you to embed a compiled structure in the Client application. This feature can be used, for example, to provide users with a "portal" application, that gives access to different server applications thanks to the `OPEN DATABASE` command executing a `.4dlink` file. + +To enable this feature, add the `DatabaseToEmbedInClientWinFolder` and/or `DatabaseToEmbedInClientMacFolder` keys in the *buildApp* settings file. When one of these keys is present, the client application building process generates a single-user application: the compiled structure, instead of the *EnginedServer.4Dlink* file, is placed in the "Database" folder. + +- If a default data folder exists in the single-user application, a licence is embedded. +- If no default data folder exists in the single-user application, it will be executed without data file and without licence. + +The basic scenario is: + +1. In the Build application dialog box, select the "Build compiled structure" option to produce a .4DZ or .4DC for the application to be used in single-user mode. +2. In the *buildApp.4DSettings* file of the client-server application, use following xml key(s) to indicate the path to the folder containing the compiled single user application: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Build the client-server application. This will have following effects: + - the whole folder of the single user application is copied inside the "Database" folder of the merged client + - the *EnginedServer.4Dlink* file of the "Database" folder is not generated + - the .4DC, .4DZ, .4DIndy files of the single user application copy are renamed using the name of the merged client + - the `PublishName` key is not copied in the *info.plist* of the merged client + - if the single-user application does not have a "Default data" folder, the merged client will run with no data. + +Automatic update 4D Server features ([Current version](#current-version) number, `SET UPDATE FOLDER` command...) work with single-user application as with standard remote application. At connection, the single-user application compares its `CurrentVers` key to the 4D Server version range. If outside the range, the updated client application is downloaded from the server and the Updater launches the local update process. + + +### Customizing client and/or server cache folder names + +Client and server cache folders are used to store shared elements such as resources or components. They are required to manage exchanges between server and remote clients. Client/server applications use default pathnames for both client and server system cache folders. + +In some specific cases, you might need to customize the names of these folders to implement specific architectures (see below). 4D provides you with the `ClientServerSystemFolderName` and `ServerStructureFolderName` keys to be set in the *buildApp* settings file. + + +#### Client cache folder + +Customizing the client-side cache folder name can be useful when your client application is used to connect to several merged servers which are similar but use different data sets. In this case, to save multiple unnecessary downloads of identical local resources, you can use the same custom local cache folder. + +- Default configuration (*for each connection to a server, a specific cache folder is downloaded/updated*): + +![](assets/en/Admin/cachea.png) + +- Using the `ClientServerSystemFolderName` key (*a single cache folder is used for all servers*): + +![](assets/en/Admin/cacheb.png) + + +#### Server cache folder + +Customizing the server-side cache folder name is useful when you run several identical server applications built with different 4D versions on the same computer. If you want each server to use its own set of resources, you need to customize the server cache folder. + +- Default configuration (*same server applications share the same cache folder*): + +![](assets/en/Admin/cacheServera.png) + +- Using the `ServerStructureFolderName` key (*a dedicated cache folder is used for each server application*): + +![](assets/en/Admin/cacheServerb.png) + + + + +## 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: + +![](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. + +* **Plugins and components** column - Displays the name of the plug-in/component. + +* **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: + +* 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/Admin/buildappCertif.png) + +### Licenses + +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. + +To remove or add a license, use the **[+]** and **[-]** buttons at the bottom of the window. + +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. + +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. + +Once you have selected a file, the list will indicate the characteristics of the license that it contains. + +* **License #** - Product license number +* **License** - Name of the product +* **Expiration date** - Expiration date of the license (if any) +* **Path** - Location on disk + +If a license is not valid, a message will warn you. + +You can designate as many valid files as you want. When building an executable application, 4D will use the most appropriate license available. +> Dedicated "R" licenses are required to build applications based upon "R-release" versions (license numbers for "R" products start with "R-4DDP"). + +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 + +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). + +- 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: + +![](assets/en/Admin/buildapposxcertProj.png) + +This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. + +* **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): + +![](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: [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). +> 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. + +* **Generate self-signed certificate** - runs the "Certificate Assistant" that allows you to generate a self-signed certificate. If you do not have an Apple developer certificate, you need to provide a self-signed certificate. With this certificate, no alert message is displayed if the application is deployed internally. If the application is deployed externally (i.e. through http or email), at launch macOS displays an alert message that the application's developer is unidentified. The user can "force" the opening of the application.

    In the "Certificate Assistant", be sure to select the appropriate options: ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> 4D recommends to subscribe to the Apple Developer Program to get access to Developer Certificates that are necessary to notarize applications (see below). + + + +#### 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. + +The **Sign application** option of the 4D application builder lets you generate applications that are compatible with this option by default. + + +#### About Notarization + +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. + +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. + +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). + +## Customizing application icons + +4D associates a default icon with stand-alone, server, and client applications, however you can customize the icon for each application. + +* **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** - 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. + +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: + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- 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. + +The opening sequence for launching a merged application is: + +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. + + +### Last data file opened + +#### Path of last 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: + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +The data file path is stored in a dedicated file, named *lastDataPath.xml*. + +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. + +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). + +#### Configuring the data linking mode + +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**. + +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. + +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**. + +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). + + +*Duplication when data linked by application name:* ![](assets/en/Project/datalinking1.png) + +*Duplication when data linked by application path:* ![](assets/en/Project/datalinking2.png) + +You can select the data linking mode during the build application process. You can either: + +- 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). + + +### Defining a default data folder + +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: + +- 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). + + +To define and use a default data file: + +- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the application project folder. This file must be provided along with all other necessary files, depending on the project 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. + +The following graphic illustrates this feature: + +![](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. + + +## 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. + +### Connection scenario + +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: + +- 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. + +### Storing the last server path + +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: + +```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. + +> - 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 + +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: + +- **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) + +- **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) diff --git a/website/translated_docs/es/Admin/cli.md b/website/translated_docs/es/Admin/cli.md new file mode 100644 index 00000000000000..b9a517a78232e5 --- /dev/null +++ b/website/translated_docs/es/Admin/cli.md @@ -0,0 +1,190 @@ +--- +id: cli +title: Command Line Interface +--- + +You can use the macOS Terminal or the Windows console to drive your 4D applications (4D and 4D Server) using command lines. More particularly, this functionality allows you to: + +- launch a database remotely, which can be especially useful for administering Web servers. +- run automatic tests for your applications. + +## Basic information + +You can execute command lines for 4D applications using the macOS Terminal or the Windows Console. + +- Under macOS, you should use the `open` command. +- Under Windows, you can just pass the arguments directly. + +> Under macOS, you can pass the arguments directly by going to the folder where the application is found inside the package (Contents/MacOS path), which allows to address the stderr stream. For example, if the 4D package is located in the `MyFolder` folder, you must write the command line as follows: `/MyFolder/4D.app/Contents/MacOS/4D`. However, we recommend that you use the `open` command whenever you do not need to access the stderr stream. + +## Launch a 4D application + +Here is a description of command lines and the arguments supported to launch 4D applications. + +Syntax: +``` + [--version] [--help] [--project] [ [--data ]] +[--opening-mode interpreted | compiled] [--create-data] [--user-param ] [--headless] [--dataless] +[--webadmin-settings-file] [--webadmin-access-key] [--webadmin-auto-start] [--webadmin-store-settings] +``` +| Argument                               | Valor | Descripción | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `applicationPath` | Path of the 4D, 4D Server or merged application | Launches the application. Identical to double-clicking the 4D application. When called without structure file argument, the application is executed and the 'select database' dialog box appears. | +| `--version` | | Dispays application version and exits | +| `--help` | | Dispays help and exits. Alternate arguments: -?, -h | +| `--project` | projectPath | packagePath | 4dlinkPath | Project file to open with the current data file. No dialog box appears. | +| `--data` | dataPath | Data file to open with the designated project file. If not specified, 4D uses the last opened data file. | +| `--opening-mode` | interpreted | compiled | Requests database to open in interpreted or compiled mode. No error is thrown if the requested mode is unavailable. | +| `--create-data` | | Automatically creates a new data file if no valid data file is found. No dialog box appears. 4D uses the file name passed in the "--data" argument if any (generates an error if a file with the same name already exists). | +| `--user-param` | Custom user string | A string that will be available within the 4D application through the Get database parameter command (the string must not start with a "-" character, which is reserved). | +| `--headless` | | Launches the 4D, 4D Server or merged application without interface (headless mode). In this mode:

  • The Design mode is not available, database starts in Application mode
  • No toolbar, menu bar, MDI window or splash screen is displayed
  • No icon is displayed in the dock or task bar
  • The opened database is not registered in the "Recent databases" menu
  • The diagnostic log is automatically started (see [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html), selector 79)
  • Every call to a dialog box is intercepted and an automatic response it provided (e.g. OK for the [ALERT](https://doc.4d.com/4dv19/help/command/en/page41.html) command, Abort for an error dialog...). All intercepted commands(*) are logged in the diagnostic log.

  • For maintenance needs, you can send any text to standard output streams using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. Note that headless 4D applications can only be closed by a call to [QUIT 4D](https://doc.4d.com/4dv19/help/command/en/page291.html) or using the OS task manager. | +| `--dataless` | | Launches 4D, 4D Server or merged application in dataless mode. Dataless mode is useful when 4D runs tasks with no need for data (project compilation for example). In this mode:
  • No file containing data is opened, even if specified in the command line or the `.4DLink` file, or when using the `CREATE DATA FILE` and `OPEN DATA FILE` commands.
  • Commands that manipulate data will throw an error. For example, `CREATE RECORD` throws “no table to apply the command toâ€.

  • **Note**:
  • If passed in the command line, dataless mode applies to all databases opened in 4D, as long as the application is not closed.
  • If passed using the `.4DLink` file, dataless mode only applies to the database specified in the `.4DLink` file. For more information on `.4DLink` files, see [Project opening shortcuts](../Project/creating.md#project-opening-shortcuts).
  • | +| `--webadmin-settings-file` | File path | Path of the custom WebAdmin `.4DSettings` file for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-access-key` | Cadena | Access key for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-auto-start` | Booleano | Status of the automatic startup for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-store-settings` | | Store the access key and automatic starting parameters in the currently used settings file (i.e. the default [`WebAdmin.4DSettings`](webAdmin.md#webadmin-settings) file or a custom file designated with the `--webadmin-settings-path` parameter). Use the `--webadmin-store-settings` argument to save these settings if necessary | + (*) Some dialogs are displayed before the database is opened, so that it's impossible to write into the + +[Diagnostic log file](debugLogFiles.md#4ddiagnosticlogtxt) (licence alert, conversion dialog, database selection, data file selection). In such case, an error message is thrown both in the stderr stream and the system event log, and then the application quits. + +### Ejemplos + +These examples assume that your 4D application is stored on the desktop and that the database to be opened is found in the "Documents" folder. + +> The current folder of the user is reached using the "~ " command under macOS and the "%HOMEPATH%" command under Windows. + +Launch application: + +* macOS: + + +```bash +open ~/Desktop/4D.app +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe +``` + +Launch application with a package file on macOS: + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myDB.4dbase +``` + +Launch application with a project file: + +* macOS: + + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myProj/Project/myProj.4DProject +``` + + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myProj\Project\myProj.4DProject +``` + + + +Launch application with a project file and a data file: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD +or: +%HOMEPATH%\Desktop\4D\4D.exe /project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject /data %HOMEPATH%\Documents\data\myData.4DD +``` + +Launch application with a .4DLink file: + +* macOS: + + +```bash +open ~/Desktop/4D.app MyDatabase.4DLink +``` + +```bash +open "~/Desktop/4D Server.app" MyDatabase.4DLink +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D.exe MyDatabase.4DLink +``` + +```bash +%HOMEPATH%\Desktop\4D Server.exe" MyDatabase.4DLink +``` + +Launch application in compiled mode and create a data file if not available: + +* macOS: + + +```bash +open ~/Desktop/4D.app ~/Documents/myBase.4dbase --args --opening-mode compiled --create-data true +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myBase.4dbase\myDB.4db --opening-mode compiled --create-data true +``` + +Launch application with a project file and a data file and pass a string as a user parameter: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --user-param "Hello world" +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --user-param "Hello world" +``` + +Launch application without interface (headless mode): + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --headless +``` + +```bash +open ~/Desktop/MyBuiltRemoteApp −−headless +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --headless +%HOMEPATH%\Desktop\4D\MyBuiltRemoteApp.exe --headless +``` diff --git a/website/translated_docs/es/Admin/dataExplorer.md b/website/translated_docs/es/Admin/dataExplorer.md new file mode 100644 index 00000000000000..aad8b3295a6a70 --- /dev/null +++ b/website/translated_docs/es/Admin/dataExplorer.md @@ -0,0 +1,190 @@ +--- +id: dataExplorer +title: Web Data Explorer +--- + +> **Preview**: The Web Data Explorer is provided as a preview feature. Using this feature in production is not recommended. The final implementation could be slightly different. + + +The Data Explorer provides a web interface to view and query data in your project datastore. Using this tool, you can easily browse among all your entities and search, order, or filter attribute values. It helps you to control data and quickly identify issues at any step of the development process. + +![alt-text](assets/en/Admin/dataExplorer1.png) + + +## Access Configuration + +The Data Explorer relies on the [`WebAdmin`](webAdmin.md) web server component for the configuration and authentication settings. + +- **configuration**: the Data Explorer configuration reuses the [`WebAdmin` web server settings](webAdmin.md#webadmin-settings), +- **authentication**: access to the Data Explorer is granted when the [session user is authenticated](webAdmin.md#authentication-and-session) and has the "WebAdmin" privilege. When the Data Explorer is accessed through the **Data Explorer** menu item (see below), an automatic authentication is provided. + +> The Data Explorer access can be disabled using the [`.setAdminProtection()`](API/DataStoreClass.md#setadminprotection) function. + + +## Opening the Data Explorer + +The Data Explorer page is automatically available when [the `WebAdmin` web server is started](webAdmin.md#starting-the-webadmin-web-server). + +To connect to the Data Explorer web page: + +- if you use a 4D application with interface, select **Data Explorer...** command from: + - the **Records** menu (in 4D stand-alone) + - the **Window** menu (in 4D Server) + +- whether you use a headless 4D application or not, you can open your web browser and enter the following address: + + `IPaddress:HTTPPort/dataexplorer` or `IPaddress:HTTPSPort/dataexplorer` + + In this context, you will be prompted to enter the [access key](webAdmin.md#access-key) to open a `WebAdmin` session on the server: + +![alt-text](assets/en/Admin/accessKeyEnter.png) + +> [HTTPPort](webAdmin.md#http-port) and [HTTPSPort](webAdmin.md#https-port) values are configured in the `WebAdmin` settings. + + + +## Using the Data Explorer + +In addition to a comprehensive and customizable view of your data, the Data Explorer allows you to query and order your data. + +### Requisitos + +The Data Explorer supports the following web browsers: + +- Chrome +- Safari +- Edge +- FireFox + +The minimum resolution to use the Data Explorer is 1280x720. Recommended resolution is 1920x1080. + +### Basics + +The Data Explorer provides an overall access to the ORDA data model with respect to the [ORDA mapping rules](ORDA/dsMapping.md#general-rules). + +You can switch to the **dark mode** display theme using the selector at the bottom of the page: + +![alt-text](assets/en/Admin/dark.png) + +![alt-text](assets/en/Admin/dataExplorer2.png) + +The page contains several areas: + +- On the left side are the **Dataclasses area** and **Attributes area**, allowing you can select the dataclasses and attributes to display. Attributes are ordered according to the underlying structure creation order. Primary key and indexed attributes have a specific icon. You can filter the list of proposed dataclass names and attribute names using the respective search areas. ![alt-text](assets/en/Admin/dataExplorer3.png) + +- The central part contains the **Search area** and the **Data grid** (list of entities of the selected dataclass). Each column of the grid represents a datastore attribute. + - By default, all entities are displayed. You can filter the displayed entities using the search area. Two query modes are available: [Query on attributes](#query-on-attributes) (selected by default), and the [Advanced query with expression](#advanced-query-with-expression). You select the query mode by clicking on the corresponding button (the **X** button allows you to reset the query area and thus stop filtering): ![alt-text](assets/en/Admin/dataExplorer4b.png) + + - The name of the selected dataclass is added as a tab above the data grid. Using these tabs, you can switch between dataclasses that have been already selected. You can remove a referenced dataclass by clicking the "remove" icon at the right of the dataclass name. + - You can reduce the number of columns by unchecking attributes in the left side. You can also switch the columns in the data grid using drag and drop. You can click on a column header to [sort entities](#ordering-entities) according to its values (when possible). + - If an operation requires a long time, a progress bar is displayed. You can stop the running operation at any moment by clicking on the red button: + +![alt-text](assets/en/Admin/dataExplorer5.png) + + + +- On the right side is the **Details area**: it displays the attribute values of the currently selected entity. All attribute types are displayed, including pictures and objects (expressed in json). You can browse between the entities of the dataclass by clicking the **First** / **Previous** / **Next** / **Last** links at the bottom of the area. + + + +### Updating contents + +When the ORDA model or data is modified on the database side (table added, record edited or deleted, etc.), you just need to refresh the Data Explorer page in the browser (using the F5 key, for example). + + +### Ordering entities + +You can reorder the displayed entity list according to attribute values. All types of attributes can be used for a sort, except picture and object. + +- Click on a column header to order entities according to the corresponding attribute values. By default, the sort is ascending. Click twice for a descending sort. A column used to sort entities is displayed with a small icon and its name is in *italics*. + +![alt-text](assets/en/Admin/dataExplorer7.png) + +- You can sort attributes on several levels. For example, you can sort employees by city and then by salary. To do that, hold down the **Shift** key and click sequentially on each column header to include in the sort order. + + +### Query on attributes + +In this mode, you can filter entities by entering values to find (or to exclude) in the areas above the attribute list. You can filter on one or several attributes. The entity list is automatically updated when you type in. + +![alt-text](assets/en/Admin/dataExplorer6.png) + +If you enter several attributes, a AND is automatically applied. For example, the following filter displays entities with *firstname* attribute starting with "flo" AND *salary* attribute value > 50000: + +![alt-text](assets/en/Admin/dataExplorer9.png) + +The **X** button allows you to remove entered attributes and thus stop filtering. + +Different operators and query options are available, depending on the data type of the attribute. + +> You cannot filter on picture or object attributes. + +#### Numeric operators + +With numeric, date, and time attributes, the "=" operator is selected by default. However, you can select another operator from the operator list (click on the "=" icon to display the list): + +![alt-text](assets/en/Admin/DEFilter1.png) + +#### Dates + +With date attributes, you can enter the date to use through a datepicker widget (click on the date area to display the calendar): + +![alt-text](assets/en/Admin/DEFilter2.png) + +#### Booleans + +When you click on a boolean attribute area, you can filter on **true**/**false** values but also on **null**/**not null** values: + +![alt-text](assets/en/Admin/DEFilter3.png) + +- **null** indicates that the attribute value was not defined +- **not null** indicates that the attribute value is defined (thus true or false). + +#### Texto + +Text filters are not diacritic (a = A). + +The filter is of the "starts with" type. For example, entering "Jim" will show "Jim" and "Jimmy" values. + +You can also use the wildcard character (@) to replace one or more starting characters. Por ejemplo: + +| A filter with | Finds | +| ------------- | -------------------------------------------------- | +| Bel | All values beginning with “Bel†| +| @do | All values containing “do†| +| Bel@do | All values starting with “Bel†and containing “do†| + +If you want to create more specific queries, such as "is exactly", you may need to use the advanced queries feature. + + +### Advanced queries with expression + +When you select this option, a query area is displayed above the entity list, allowing you to enter any expression to use to filter the contents: + +![alt-text](assets/en/Admin/dataExplorer8.png) + +You can enter advanced queries that are not available as attribute queries. For example, if you want to find entities with *firstname* attribute containing "Jim" but not "Jimmy", you can write: + +``` +firstname=="Jim" +``` + +You can use any ORDA query expression as [documented with the `query()` function](API/DataClassClass.md#query), with the following limitations or differences: + +- For security, you cannot execute formulas using `eval()`. +- Placeholders cannot be used; you have to write a *queryString* with values. +- String values containing space characters must be embedded in double quotes (""). + +For example, with the Employee dataclass, you can write: + +``` +firstname = "Marie Sophie" AND manager.lastname = "@th" +``` + +You can click on the `v` icon to display both [`queryPlan`](API/DataClassClass.md#queryplan) and [`queryPath`](API/DataClassClass.md#querypath). In the area, you can hover over the subquery blocks to have detailed information per subquery: + +![alt-text](assets/en/Admin/dataExplorer12.png) + +Right-click in the query area to display the previous valid queries: + +![alt-text](assets/en/Admin/dataExplorer11.png) diff --git a/website/translated_docs/es/Admin/debugLogFiles.md b/website/translated_docs/es/Admin/debugLogFiles.md new file mode 100644 index 00000000000000..6c95f553b52dd5 --- /dev/null +++ b/website/translated_docs/es/Admin/debugLogFiles.md @@ -0,0 +1,509 @@ +--- +id: debugLogFiles +title: Description of log files +--- + +4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) or [WEB SET OPTION](https://doc.4d.com/4dv19/help/command/en/page1210.html) commands and are stored in the [Logs folder](Project/architecture.md#logs-folder) of the database. + +Information logged needs to be analyzed to detect and fix issues. This section provides a comprehensive description of the following log files: + +* [4DRequestsLog.txt](#4drequestslogtxt) +* [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) +* [HTTPDebugLog.txt](#httpdebuglogtxt) +* 4DDebugLog.txt ([standard](#4ddebuglogtxt-standard) & [tabular](#4ddebuglogtxt-tabular)) +* [4DDiagnosticLog.txt](#4ddiagnosticlogtxt) +* [4DIMAPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DPOP3Log.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DSMTPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [ORDA client requests log file](#orda-client-requests) + +> When a log file can be generated either on 4D Server or on the remote client, the word "Server" is added to the server-side log file name, for example "4DRequestsLogServer.txt" + +Log files share some fields so that you can establish a chronology and make connections between entries while debugging: + +* `sequence_number`: this number is unique over all debug logs and is incremented for each new entry whatever the log file, so that you can know the exact sequence of the operations. +* `connection_uuid`: for any 4D process created on a 4D client that connects to a server, this connection UUID is logged on both server and client side. It allows you to easily identify the remote client that launched each process. + +## 4DRequestsLog.txt + +This log file records standard requests carried out by the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) +//server side +``` + + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) +//remote side +``` +> This statement also starts the [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) log file. + +#### Encabezados + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + +#### Contents + +For each request, the following fields are logged: + +| Field name | Descripción | +| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: 'YYYY-MM-DDTHH:MM:SS.mmm' | +| systemid | System ID | +| component | Component signature (e.g., '4SQLS' or 'dbmg') | +| process\_info_ | index Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process. | +| request | Request ID in C/S or message string for SQL requests or `LOG EVENT` messages | +| bytes_in | Number of bytes received | +| bytes_out | Number of bytes sent | +| server\_duration | exec\_duration | Depends on where the log is generated:

  • *server\_duration* when generated on the client --Time taken in microseconds for the server to process the request and return a response. B to F in image below, OR
  • *exec\_duration* when generated on the server --Time taken in microseconds for the server to process the request. B to E in image below.
  • | +| write\_duration | Time taken in microseconds for sending the:

  • Request (when run on the client). A to B in image below.
  • Response (when run on the server). E to F in image below.
  • | +| task_kind | Preemptive or cooperative (respectively 'p' or 'c') | +| rtt | Time estimate in microseconds for the client to send the request and the server to acknowledge it. A to D and E to H in image below.

  • Only measured when using the ServerNet network layer, returns 0 when used with the legacy network layer.
  • For Windows versions prior to Windows 10 or Windows Server 2016, the call will return 0.
  • | + +Request flow: + +![](assets/en/Admin/logRequestFlow.PNG) + +## 4DRequestsLog_ProcessInfo.txt + +This log file records information on each process created on the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) //server side +``` + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) //remote side +``` +> This statement also starts the [4DRequestsLog.txt](#4drequestslogtxt) log file. + +#### Encabezados + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + + +#### Contents + +For each process, the following fields are logged: + +| Field name | Descripción | +| --------------------------------- | -------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: "YYYY-MM-DDTHH:MM:SS.mmm" | +| process\_info_index | Unique and sequential process number | +| CDB4DBaseContext | DB4D component database context UUID | +| systemid | System ID | +| server\_process\_id | Process ID on Server | +| remote\_process\_id | Process ID on Client | +| process\_name | Process name | +| cID | Identifier of 4D Connection | +| uID | Identifier of 4D Client | +| IP Client | IPv4/IPv6 address | +| host_name | Client hostname | +| user_name | User Login Name on client | +| connection\_uuid | UUID identifier of process connection | +| server\_process\_unique\_id | Unique process ID on Server | + +## HTTPDebugLog.txt + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +How to start this log: + +```4d +WEB SET OPTION(Web debug log;wdl enable without body) +//other values are available +``` + +The following fields are logged for both Request and Response: + +| Field name | Descripción | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + +## 4DDebugLog.txt (standard) + +This log file records each event occurring at the 4D programming level. Standard mode provides a basic view of events. + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2) +//standard, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2) +//standard, current process only +``` + +The following fields are logged for each event: + +| Column # | Descripción | +| -------- | ------------------------------------------------------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| 3 | Process ID (p=xx) and unique process ID (puid=xx) | +| 4 | Stack level | +| 5 | Can be Command Name/ Method Name/Message/ Task Start Stop info/Plugin Name, event or Callback/Connection UUID | +| 6 | Time taken for logging operation in milliseconds | + +## 4DDebugLog.txt (tabular) + +This log file records each event occurring at the 4D programming level in a tabbed, compact format that includes additional information (compared to the standard format). + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2+4) +//extended tabbed format, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2+4) +//extended, current process only +``` + +The following fields are logged for each event: + +| Column # | Field name | Descripción | +| -------- | --------------- | ------------------------------------------------------------- | +| 1 | sequence_number | Unique and sequential operation number in the logging session | + +|2| time| Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | |3| ProcessID|Process ID| |4| unique_processID|Unique process ID| |5| stack_level|Stack level |6| operation_type| Log operation type. This value may be an absolute value:

    1. Command
    2. Method (project method, database method, etc.)
    3. Message (sent by [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command only)
    4. PluginMessage
    5. PluginEvent
    6. PluginCommand
    7. PluginCallback
    8. Task
    9. Member method (method attached to a collection or an object)

    When closing a stack level, the `operation_type`, `operation` and `operation_parameters` columns have the same value as the opening stack level logged in the `stack_opening_sequence_number` column. Por ejemplo:

    1. 121 15:16:50:777 5 8 1 2 CallMethod Parameters 0
    2. 122 15:16:50:777 5 8 2 1 283 0
    3. 123 15:16:50:777 5 8 2 1 283 0 122 3
    4. 124 15:16:50:777 5 8 1 2 CallMethod Parameters 0 121 61

    The 1st and 2nd lines open a stack level, the 3rd and 4th lines close a stack level. Values in the columns 6, 7 and 8 are repeated in the closing stack level line. The column 10 contains the stack level opening sequence numbers, i.e. 122 for the 3rd line and 121 for the 4th.| |7|operation|May represent (depending on operation type):
  • a Language Command ID (when type=1)
  • a Method Name (when type=2)
  • a combination of pluginIndex;pluginCommand (when type=4, 5, 6 or 7). May contain something like '3;2'
  • a Task Connection UUID (when type=8)
  • +|8|operation_parameters|Parameters passed to commands, methods, or plugins| |9|form_event|Form event if any; empty in other cases (suppose that column is used when code is executed in a form method or object method)| |10|stack_opening_sequence_number|Only for the closing stack levels: Sequence number of the corresponding opening stack level| |11|stack_level_execution_time|Only for the closing stack levels: Elapsed time in micro seconds of the current logged action; only for the closing stack levels (see 10th columns in lines 123 and 124 in the log above)| + +## 4DDiagnosticLog.txt + +This log file records many events related to the internal application operation and is human-readable. You can include custom information in this file using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. + +How to start this log: + +```4d + SET DATABASE PARAMETER(Diagnostic log recording;1) //start recording +``` + +The following fields are logged for each event: + +| Field Name | Descripción | +| ------------------ | ------------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | +| timestamp | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| loggerID | Optional | +| componentSignature | Optional - internal component signature | +| messageLevel | Info, Warning, Error | +| message | Description of the log entry | + +Depending on the event, various other fields can also be logged, such as task, socket, etc. + +## 4DSMTPLog.txt, 4DPOP3Log.txt, and 4DIMAPLog.txt + +These log files record each exchange between the 4D application and the mail server (SMTP, POP3, IMAP) that has been initiated by the following commands: + +* SMTP - [SMTP New transporter](API/SMTPTransporterClass.md#smtp-new-transporter) +* POP3 - [POP3 New transporter](API/POP3TransporterClass.md#pop3-new-transporter) +* IMAP - [IMAP New transporter](API/IMAPTransporterClass.md#imap-new-transporter) + +The log files can be produced in two versions: + +* a regular version: + * named 4DSMTPLog.txt, 4DPOP3Log.txt, or 4DIMAPLog.txt + * no attachments + * uses an automatic circular file recycling each 10 MB + * intended for usual debugging + + To start this log: + + ```4d + SET DATABASE PARAMETER(SMTP Log;1) //start SMTP log + SET DATABASE PARAMETER(POP3 Log;1) //start POP3 log + SET DATABASE PARAMETER(IMAP Log;1) //start IMAP log + ``` + + 4D Server: Click on the **Start Request and Debug Logs** button in the [Maintenance Page](https://doc.4d.com/4Dv18R5/4D/18-R5/Maintenance-Page.300-5149308.en.html) of the 4D Server administration window. + + This log path is returned by the `Get 4D file` command. + +* an extended version: + * attachment(s) included no automatic recycling + * custom name + * reserved for specific purposes + + To start this log: + + ```4d + $server:=New object + ... + //SMTP + $server.logFile:="MySMTPAuthLog.txt" + $transporter:=SMTP New transporter($server) + + // POP3 + $server.logFile:="MyPOP3AuthLog.txt" + $transporter:=POP3 New transporter($server) + + //IMAP + $server.logFile:="MyIMAPAuthLog.txt" + $transporter:=IMAP New transporter($server) + ``` + +#### Contents + +For each request, the following fields are logged: + +| Column # | Descripción | +| -------- | ------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in RFC3339 format (yyyy-mm-ddThh:mm:ss.ms) | +| 3 | 4D Process ID | +| 4 | Unique process ID | +| 5 |
    • SMTP,POP3, or IMAP session startup information, including server host name, TCP port number used to connect to SMTP,POP3, or IMAP server and TLS status,or
    • data exchanged between server and client, starting with "S <" (data received from the SMTP,POP3, or IMAP server) or "C >" (data sent by the SMTP,POP3, or IMAP client): authentication mode list sent by the server and selected authentication mode, any error reported by the SMTP,POP3, or IMAP Server, header information of sent mail (standard version only) and if the mail is saved on the server,or
    • SMTP,POP3, or IMAP session closing information.
    | + +## ORDA client requests + +This log records each ORDA request sent from a remote machine. You can direct log information to memory or to a file on disk. The name and location of this log file are your choice. + +How to start this log: + +```4d +//to be executed on a remote machine +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory +``` + +If you want to use the unique sequence number in ORDA request log, you need to trigger it: + +```4d +//to be executed on a remote machine + +SET DATABASE PARAMETER(Client Log Recording;1) +//to enable log sequence number + +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory + +SET DATABASE PARAMETER(Client Log Recording;0) +//disabling sequence number +``` + +The following fields are logged for each request: + +| Field name | Descripción | Ejemplo | +| -------------- | ------------------------------------------------------------- | --------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | 104 | +| url | Client ORDA request URL | "rest/Persons(30001)" | +| startTime | Starting date and time using ISO 8601 format | "2019-05-28T08:25:12.346Z" | +| endTime | Ending date and time using ISO 8601 format | "2019-05-28T08:25:12.371Z" | +| duration | Client processing duration (ms) | 25 | +| response | Server response object | {"status":200,"body":{"__entityModel":"Persons",\[...]}} | + + + +## Using a log configuration file + +You can use a **log configuration file** to easily manage log recording in a production environment. This file is preconfigured by the developer. Typically, it can be sent to customers so that they just need to select it or copy it in a local folder. Once enabled, the log configuration file triggers the recording of specific logs. + +### How to enable the file + +There are several ways to enable the log configuration file: + +- On 4D Server with interface, you can open the Maintenance page and click on the [Load logs configuration file](Admin/server-admin.md#load-logs-configuration-file) button, then select the file. In this case, you can use any name for the configuration file. It is immediately enabled on the server. +- You can copy the log configuration file in the [Settings folder](Project/architecture.md#settings-1) of the project. In this case, the file must be named `logConfig.json`. It is enabled at project startup (only on the server in client/server). +- With a built application, you can copy the `logConfig.json` file in the following folder: + + Windows: `Users\[userName]\AppData\Roaming\[application]` + + macOS: `/Users/[userName]/Library/ApplicationSupport/[application]` + +> If you want to enable the log configuration file for all projects in stand-alone, server and remote 4D applications, you can copy the `logConfig.json` file in the following folder: - Windows: `Users\[userName]\AppData\Roaming\4D or \4D Server` - macOS: `/Users/[userName]/Library/ApplicationSupport/4D or /4D Server` + +### JSON file description + +The log configuration file is a `.json` file that can contain the following properties: + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Logs Configuration File", + "description": "A file that controls the state of different types of logs in 4D clients and servers", + "type": "object", + "properties": { + "forceLoggingConfiguration": { + "description": "Forcing the logs configuration described in the file ingoring changes coming from code or user interface", + "type": "boolean", + "default": true + }, + "requestLogs": { + "description": "Configuration for request logs", + "type": "object", + "properties": { + "clientState": { + "description": "Enable/Disable client request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + }, + "serverState": { + "description": "Enable/Disable server request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "debugLogs": { + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "commandList": { + "description": "Commands to log or not log", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "state": { + "description": "integer to specify type of debuglog and options", + + "type": "integer", + "minimum": 0 + } + } + }, + "diagnosticLogs":{ + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "state":{ + "description": "Enable/Disable diagnostic logs 0 or 1 (0 = do not record, 1 = record)", + "type": "integer", + "minimum": 0 + } + } + }, + "httpDebugLogs": { + "description": "Configuration for http debug logs", + "type": "object", + "properties": { + "level": { + "description": "Configure http request logs", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "state": { + "description": "Enable/Disable recording of web requests", + "type": "integer", + "minimum": 0, + "maximum": 4 + } + } + }, + "POP3Logs": { + "description": "Configuration for POP3 logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable POP3 logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "SMTPLogs": { + "description": "Configuration for SMTP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable SMTP log recording (form 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "IMAPLogs": { + "description": "Configuration for IMAP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable IMAP log recording (form 0 to N)", + "type": "integer" + } + } + }, + "ORDALogs": { + "description": "Configuration for ORDA logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable ORDA logs (0 or 1)", + "type": "integer" + }, + "filename": { + "type": "string" + } + } + } + } +} +``` + +### Ejemplo + +Here is an example of log configuration file: + +```json +{ + "forceLoggingConfiguration": false, + "requestLogs": { + "clientState": 1, + "serverState": 1 + }, + "debugLogs": { + "commandList":["322","311","112"], + "state": 4 + }, + "diagnosticLogs":{ + "state" : 1 + }, + "httpDebugLogs": { + "level": 5, + "state" : 1 + }, + "POP3Logs": { + "state" : 1 + }, + "SMTPLogs": { + "state" : 1 + }, + "IMAPLogs": { + "state" : 1 + }, + "ORDALogs": { + "state" : 1, + "filename": "ORDALog.txt" + } +} +``` \ No newline at end of file diff --git a/website/translated_docs/es/Admin/licenses.md b/website/translated_docs/es/Admin/licenses.md new file mode 100644 index 00000000000000..ec27c5af2ca93e --- /dev/null +++ b/website/translated_docs/es/Admin/licenses.md @@ -0,0 +1,148 @@ +--- +id: licenses +title: Gestión de licencias 4D +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/Installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example if: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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 application project with no access to the Design environment. + + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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. + +### Gestión de licencias + +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 diff --git a/website/translated_docs/es/Admin/server-admin.md b/website/translated_docs/es/Admin/server-admin.md new file mode 100644 index 00000000000000..a14c309a45c1d9 --- /dev/null +++ b/website/translated_docs/es/Admin/server-admin.md @@ -0,0 +1,526 @@ +--- +id: server-admin +title: 4D Server Administration Window +--- + + +When 4D Server is launched with interface under Windows or macOS, a graphical administration window is available, providing many analysis and control tools for the published 4D application. To display the 4D Server Administration window for the opened project, select the **Window > Administration** menu item, or press **Ctrl+U**. + +> The 4D Server administration window can be accessed from a remote 4D. For more information about this point, please refer to Administration from Remote Machines. + + +## Monitor Page + +The **Monitor** page displays dynamic information concerning database use as well as information about the system and the 4D Server application. + +![](assets/en/Admin/server-admin.png) + +> On Windows, some of the system information displayed on this page are retrieved via the Windows "Performance Analyzer" tools. These tools can only be accessed when the user that opened the session where 4D Server was launched has the necessary administration authorization. + +#### Graphic area + +The graphic area lets you see the evolution in real time of several parameters: the CPU usage, network traffic and memory. You select the parameter to be displayed via a menu found in the center of the window: + +![](assets/en/Admin/server-graphic.png) + +- **CPU Usage**: Overall CPU usage of the machine, for all applications taken together. The specific part of 4D Server in this usage rate is provided in the "Processors" information area. +- **Network**: Number of bytes received per second by the machine (server or client). The number of bytes sent is provided in the "Network" information area. +- **Physical memory**: Quantity of RAM memory of machine used by 4D Server. A more detailed view of memory use is provided in the "Memory" information area. +- **Virtual memory**: Quantity of virtual memory used by the 4D Server application. This memory is allocated by the system according to the application needs. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the maximum quantity of usable virtual memory. The maximum value is calculated dynamically according to the general memory settings of the application. +- **Cache**: Quantity of cache memory used by the 4D Server application. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the total size of the cache memory, as set via the Settings. + +Note that when this option is selected, the graph area scrolling is slowed down since an efficient analysis of the cache is generally carried out over a fairly long observation period. + + +#### Overview Area + +The "Overview" area provides various information concerning the system, application and licenses installed on the 4D Server machine. + +- **System Information**: Computer, system and IP address of server +- **Application Information**: Internal version number of 4D Server and Volume Shadow Copy status +- **Maximum connections**: Number of simultaneous connections allowed by type of server +- **License**: Description of license. When the product license or one of its attached expansions expires in less than 10 days, e.g. in case of a subscription-license, 4D Server tries to automatically renew the license from the 4D user account. In this case, if the automatic renewal failed for some reason (connection error, invalid account status, non-prolongated contract...), a warning icon is displayed next to the license to alert the server administrator. Additional information about the license renewal status can be displayed in a tip when you hover the mouse over the area: + +![](assets/en/Admin/server-licence-failed.png) + +Usually, you will need to check the [**Licences Manager**](licenses.md). + +#### Details Area + +The "Details" area repeats part of the information displayed in the graphic area and provides additional information as well. + +- **Hard drive**: Overall capacity of the hard disk and distribution of the space used by the database data (data file + data index), the space used by other files and the free space available. +- **Memory**: RAM memory installed on the machine and amount of memory used by 4D Server, by other applications or that is free. The memory used by 4D Server can also be displayed dynamically in the graphic area. +- **Processors**: Instant occupancy rate for processor(s) of the machine by 4D Server and by other applications. This rate is constantly recalculated. The occupancy rate by 4D Server can also be displayed dynamically in the graphic area. +- **Network**: Instantaneous number of bytes sent and received by the machine (server or client). This value is updated constantly. The number of bytes received by can also be displayed dynamically in the graphic area. + + +## Users Page + +The **Users** page lists the 4D users connected to the server. + + +![](assets/en/Admin/server-users.png) + +The "Users" button indicates, in parentheses, the total number of users connected to the server (this number does not take into account any display filters applied to the window). The page also contains a dynamic search area and control buttons. You can modify the order of the columns by dragging and dropping their header areas. + +You can also sort the list of column values by clicking on its header. Click several times to specify in turn an ascending/descending order. + +![](assets/en/Admin/server-users-sort.png) + +### List of Users + +For each user connected to the server, the list provides the following information: + +- System of the client machine (macOS or Windows) as an icon. +- **4D User**: Name of the 4D user, or alias if set with the [`SET USER ALIAS`](https://doc.4d.com/4dv19/help/command/en/page1666.html) command on the user machine. If passwords are not activated and no alias has been set, all users are named "Designer". +- **Machine name**: Name of the remote machine. +- **Session name**: Name of the session opened on the remote machine. +- **IP Address**: IP address of the remote machine. +- **Login date**: Date and time of the remote machine connection. +- **CPU Time**: CPU time consumed by this user since connecting. +- **Activity**: Ratio of time that 4D Server devotes to this user (dynamic display). "Sleeping" if the remote machine has switched to sleep mode (see below). + +#### Managing sleeping users + +4D Server specifically handles cases where a machine running a 4D remote application switches to sleep mode while its connection to the server machine is still active. In this case, the connected 4D remote application automatically notifies 4D Server of its imminent disconnection. On the server, the connected user changes to a **Sleeping** activity status: + +![](assets/en/Admin/server-sleeping.png) + +This status frees up resources on the server. In addition, the 4D remote application reconnects to 4D Server automatically after waking up from sleep mode. + +The following scenario is supported: a remote user stops working for awhile, for example during a lunch break, but keeps the connection to the server open. The machine switches to sleep mode. When the user returns, they wake the machine up and the 4D remote application automatically recovers its connection to the server as well as the session context. + +> A sleeping remote session is automatically dropped by the server after 48 hours of inactivity. You can modify this default timeout using the [`SET DATABASE PARAMETER`](https://doc.4d.com/4dv19/help/command/en/page642.html) command with the `Remote connection sleep timeout` selector. + + +### Search/filtering Area + +This feature can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The area indicates the columns where the search/filtering will be carried out. On the Users page, it will be the 4D User, Machine name and Session name columns. + +The list is updated in real time as you enter text in the area. It is possible to enter more than one value to be searched for: separate the values with a semi-colon. The `OR` type operator is used in this case. For example, if you enter "John;Mary;Peter," only rows with John OR Mary OR Peter in the target columns will be kept. + + +### Administration Buttons + +This page includes three control buttons. These are active if at least one row is selected. You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) key for a non-adjacent selection. + +#### Send message + +This button can be used to send a message to the 4D users selected in the window. If no user is selected, the button is not active. When you click on this button, a dialog box appears that lets you enter the message. The dialog box indicates the number of users that will receive this message: + +![](assets/en/Admin/server-message.png) + +The message will be displayed as an alert on the remote machines. + +> You can perfom the same action for remote users with the [`SEND MESSAGE TO REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1632.html) command. + + +#### Watch Processes + +This button can be used to directly show the processes of the user(s) selected on the [**Processes** page](#process-page) of the window. When you click on this button, 4D Server switches to the Processes page and enters the selected user names in the search/filtering area. + +#### Drop user + +This button can be used to force the selected user(s) to disconnect. When you click on this button, a warning dialog box appears so that you can confirm or cancel this operation (hold down **Alt** key while clicking on the **Drop user** button to disconnect the selected user(s) directly without displaying the confirmation dialog box). + +> You can perfom the same action for remote users with the [`DROP REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1633.html) command. + + + +## Processes Page + +The **Processes** page lists all the processes underway. + +![](assets/en/Admin/server-admin-process-page.png) + + +The "Processes" button indicates, in parentheses, the total number of processes running in the server (this number does not take into account any display filters applied to the window nor the state of the **Display processes by groups** option). + +You can change the order of the columns by simply dragging and dropping the column header areas. You can also sort the list of column values by clicking on its header. + +Like the Users page, this page contains a dynamic [search/filtering area](#searchfiltering-area) that can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The search/filtering is carried out in the Session and Process name columns. + +There are also three shortcut buttons that can be used to filter by the type of process displayed in the window: + +![](assets/en/Admin/server-process-buttons.png) + +- **Users processes**: Processes generated by and for the user sessions. These processes are preceded by an icon in the form of a figure. +- **4D Processes**: Processes generated by the 4D Server engine. These processes are preceded by an icon in the form of a notched wheel. +- **Spare processes**: Processes that are inactive but kept temporarily and that can be reused at any time. This mechanism optimizes the reactivity of 4D Server. These processes are preceded by an icon in the form of a dimmed figure. + +The **Display processes by groups** option lets you group together the internal processes of 4D Server as well as the client processes, for better readability. When you check this option: + +- the "twinned" 4D client processes (main 4D client process and 4D client base process, see [Process Type](#process-type)) are grouped as one, +- a "Task managers" group is created; it includes the internal processes dedicated to dividing up tasks (Shared balancer, Net session manager, Exclusive pool worker), +- a "Client managers" group is created; it includes various client internal processes. + +The lower area of the window is used to display the graphic representation of the activity of the selected process(es). + +> You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) for a non-adjacent selection. + +The activity of the process is the percentage of time that 4D Server has devoted to this process (ratio). The window provides the following information for each process: + +- Type of process (see below), +- Session/Info: + - 4D process - blank, + - User process - 4D user name, + - Web process - URL path, +- Name of the process, +- Number of the process (as returned by the [`New process`](https://doc.4d.com/4dv19/help/command/en/page317.html) command for example). The process number is the number assigned on the server. In the case of a global process, this number may be different from that assigned on the client machine. +- Current state of the process, +- Running time (in seconds) of the process since its creation, +- Percentage of time that 4D Server has devoted to this process (ratio). + +### Process Type + +Each process is identified by an icon as well as a type. The color and form of the icon indicates the type of process: + +| icon | type | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/Admin/server-icon-1.png) | Application server | +| ![](assets/en/Admin/server-icon-2.png) | SQL Server | +| ![](assets/en/Admin/server-icon-3.png) | DB4D Server (database engine) | +| ![](assets/en/Admin/server-icon-4.png) | Servidor Web | +| ![](assets/en/Admin/server-icon-5.png) | SOAP Server | +| ![](assets/en/Admin/server-icon-6.png) | Protected 4D client process (development process of a connected 4D) | +| ![](assets/en/Admin/server-icon-7.png) | Main 4D client process (main process of a connected 4D). Collaborative process, equivalent on the server of the process created on the client machine) | +| ![](assets/en/Admin/server-icon-8.png) | 4D client base process (process parallel to a 4D client process. Preemptive process responsible for controlling the corresponding main 4D client process) | +| ![](assets/en/Admin/server-icon-9.png) | Spare process (former or future "4D client database process") | +| ![](assets/en/Admin/server-icon-10.png) | SQL server worker process | +| ![](assets/en/Admin/server-icon-11.png) | HTTP server worker process | +| ![](assets/en/Admin/server-icon-12.png) | 4D client process (process running on the connected 4D) | +| ![](assets/en/Admin/server-icon-13.png) | Stored procedure (process launched by a connected 4D and running on the server) | +| ![](assets/en/Admin/server-icon-14.png) | Web method (launched by a 4DACTION for example) | +| ![](assets/en/Admin/server-icon-15.png) | Web method (preemptive) | +| ![](assets/en/Admin/server-icon-16.png) | SOAP method (launched by a Web Service) | +| ![](assets/en/Admin/server-icon-17.png) | SOAP method (preemptive) | +| ![](assets/en/Admin/server-icon-18.png) | Logger | +| ![](assets/en/Admin/server-icon-19.png) | TCP connection listener | +| ![](assets/en/Admin/server-icon-20.png) | TCP session manager | +| ![](assets/en/Admin/server-icon-21.png) | Other process | +| ![](assets/en/Admin/server-icon-22.png) | Worker process (cooperative) | +| ![](assets/en/Admin/server-icon-23.png) | 4D client process (preemptive) | +| ![](assets/en/Admin/server-icon-24.png) | Stored procedure (preemptive process) | +| ![](assets/en/Admin/server-icon-25.png) | Worker process (preemptive) | + +> Each main 4D client process and its "twinned" 4D client base process are grouped together when the **Display processes by groups** option is checked. + + +### Administration Buttons + +The page also has five control buttons that act on the selected process(es). Note that only user processes can be acted upon. + +![](assets/en/Admin/server-process-actions.png) + +- **Abort Process**: can be used to abort the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. + +> You can also abort the selected process(es) directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button, or by using the [`ABORT PROCESS BY ID`](https://doc.4d.com/4dv19/help/command/en/page1634.html) command. + +- **Pause Process**: can be used to pause the selected process(es). +- **Activate Process**: can be used to reactivate the selected process(es). The processes must have been paused previously (using the button above or by programming); otherwise, this button has no effect. +- **Debug Process**: can be used to open on the server machine one or more debugger windows for the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. Note that the debugger window is only displayed when the 4D code is actually executed on the server machine (for example in a trigger or the execution of a method having the "Execute on Server" attribute). + +> You can also debug a process directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button. + +- **Watch users**: used to display, on the [Users page](#users-page), all the processes of the selected user(s). This button is active when at least one user process is selected. + + +## Maintenance Page + +The **Maintenance** page of the 4D Server Administration window provides information concerning the current operation of the application. It also provides access to basic maintenance functions: + +![](assets/en/Admin/server-maintenance.png) + + +### Last verification/compacting + +These areas indicate the date, time and status of the last [data verification](MSC/verify.md) and [compacting operation](MSC/compact.md) carried out on the database. + +#### Verify Records and Indexes + +This button can be used to launch the verification operation directly, without interrupting the server. Note that the server may be noticeably slowed down during the operation. + +All the records and all the indexes of the database are verified. If you want to be able to target the verification or have additional options available, you will need to use the [Maintenance and Security Center](MSC/overview.md) (MSC). + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +This area indicates the date, time and status of the last carried out on the database data. + +#### Compact Data... + +Thus button can be used to launch a data compacting operation directly. This operation requires stopping the server: when you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation: + +![](assets/en/Admin/server-shut.png) + +After the actual interruption of the application service, 4D Server carries out a standard compacting operation on the database data. If you want to have additional options available, you will need to use the [MSC](MSC/overview.md). + +Once the compacting is finished, 4D Server automatically restarts the application. The 4D users can then be reconnected. + +> If the request for compacting was carried out from a remote 4D remote machine, this machine is automatically reconnected by 4D Server. + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +### Uptime + +This area indicates the duration of the 4D Server application execution since the last time it was started (days, hours and minutes). + + +#### Restart server... + +This button can be used to immediately close and restart the project. When you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation. After validation, 4D Server automatically closes and reopens the project. The 4D users can then be reconnected. + +> If the request for restarting was carried out from a remote 4D machine, this machine is automatically reconnected by 4D Server. + +### Last backup + +This area indicates the date and time of the [last backup](MSC/backup.md) of the database and provides information about the next scheduled automatic backup (if any). Automatic backups are configured using the **Scheduler** page of the structure settings. + +- **Last backup**: date and time of last backup. +- **Next backup**: date and time of next scheduled backup. +- **Needed space**: estimated space needed for the backup. The actual size of the backup file may vary according to the settings (compression, etc.) and according to variations of the data file. +- **Available space**: space available on the backup volume. + + +The **Start backup** button can be used to backup the database immediately using the current backup parameters (files backed up, location of archives, options, etc.). You can view these parameters by clicking on the **Settings...** button. During a backup on the server, the client machines are "blocked" (but not disconnected) and it is not possible for any new clients to connect. + + +### Request and Debug logs + +This area indicates the server log files recording duration (when log files are activated) and allows you to control their activation. + +Refer to the [**Description of log files**](debugLogFiles.md) section for details on log files. + +#### Start/Stop Request and Debug Logs + +The **Start Request and Debug Logs** button starts log files. Since this may noticeably deteriorate server performance, it is to be reserved for the development phase of the application. + +> This button only logs operations that are executed on the server. + +When the logs have been activated, the button title changes to **Stop Request and Debug Logs**, so that you can stop recording requests at any time. Pay attention to the fact that restarting the log after stopping it "erases" the previous file. + +#### View Report + +The **View Report** button (named **Download report** if the operation was carried out from a remote desktop client) lets you open a system window displaying the request log file. + +#### Load logs configuration file + +This button allows you to load a special server [log configuration file](debugLogFiles.md#using-a-log-configuration-file) (`.json` file). Such a file can be provided by 4D technical services to monitor and study specific cases. + + +#### Pause logging + +This button suspends all currently logging operations started on the server. This feature can be useful to temporarily lighten the server tasks. + +When the logs have been paused, the button title changes to **Resume logging**, so that you can resume the logging operations. + +> You can pause and resume logging using the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) command. + + +## Application Server Page + +The Application Server page groups together information about the desktop application published by 4D Server and can be used to manage this publication. + +![](assets/en/Admin/server-admin-application-page.png) + + +The upper part of the page provides information about the current status of the 4D Server application server. + +- **State**: Started or Stopped. +- **Starting time**: Date and time the application server was launched. This date corresponds to the opening of the project by 4D Server. +- **Uptime**: Time elapsed since last opening of the project by the server. + +### Accept/Reject New Connections + +This button toggles and can be used to manage the access of new desktop client machines to the application server. + +By default, when the project is published: +- The button is titled "Reject new connections." +- New desktop clients can connect freely (within the limit of the connections permitted by the license). +- The project name is published in the remote connection dialog box (if the "At Startup Publish Database Name in the Connection Dialog" option is checked in the Preferences). + +If you click on the **Reject new connections** button: +- The button title changes to "Accept new connections." +- No new desktop client can then connect. Clients attempting to connect will receive the following message: + +![](assets/en/Admin/server-error.png) + +- The project name no longer appears in the remote connection dialog box. +- Desktop clients that are already connected are not disconnected and can continue to work normally. + +> You can perform the same action with the [`REJECT NEW REMOTE CONNECTIONS`](https://doc.4d.com/4dv19/help/command/en/page1635.html) command. + +- If you click on the **Accept new connections button**, the application server returns to its default state. + +This feature permits, for example, an administrator to carry out various maintenance operations (verification, compacting, etc.) just after having started the server. If the administrator uses a remote connection, they can be certain to be the only one modifying the data. It is also possible to use this function in preparation of a maintenance operation which requires that there be no desktop client machine connected. + +### Information + +#### Configuración + +This area provides information about the 4D project published by the server: name and location of data and structure files and name of database log file. You can click on the structure or data file name in order to view its complete pathname. + +The **Mode** field indicates the current execution mode of the application: compiled or interpreted. + +The lower part of the area indicates the server configuration parameters (launched as service, port and IP address) and the enabling of TLS for client-server connections (does not concern SQL nor HTTP connections). + +#### Memory + +This area indicates the **Total cache memory** (parameter set in the settings) and the **Used cache memory** (dynamic allocation by 4D Server according to its needs). + + +#### Application Server Connections + +- **Maximum**: maximum number of simultaneous client connections allowed for the application server. This value depends on the license installed on the server machine. +- **Used**: actual number of connections currently being used. + + +## SQL Server Page + +The SQL Server page groups together information about the integrated SQL server of 4D Server. It also includes a button that can be used to control the activation of the server. + +![](assets/en/Admin/server-admin-sql-page.png) + + +The upper part of the page provides information about the current status of the SQL server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the SQL server was last launched. +- **Uptime**: Time elapsed since last startup of the SQL server. + +### Start / Stop SQL Server + +This button toggles and can be used to control the activation of the 4D Server SQL server. + +- When the SQL server state is "Started," the button is titled **Stop SQL Server**. If you click on this button, the 4D Server SQL server is immediately stopped; it no longer replies to any external SQL requests received on the designated TCP port. +- When the SQL server state is "Stopped," the button is titled **Start SQL Server**. If you click on this button, the 4D Server SQL server is immediately started; it replies to any external SQL queries received on the designated TCP port. Note that you will need a suitable license to be able to use the 4D SQL server. + +> The SQL server can also be launched automatically on application startup (option in the Settings) or by programming. + +### Information + +#### Configuración + +This area provides information about the SQL server configuration parameters: automatic launching on startup, listening IP address, TCP port (19812 by default) and enabling of SSL for SQL connections (does not concern 4D nor HTTP connections). + +These parameters can be modified via the 4D Settings. + +#### Connections + +Number of SQL connections currently open on 4D Server. + +#### Maximum Connections + +Maximum number of simultaneous SQL connections allowed. This value depends on the license installed on the server machine. + +## HTTP Server Page + +The HTTP Server page groups together information about the operation of the Web server and SOAP server of 4D Server. The Web server lets you publish Web content such as HTML pages or pictures for Web browsers, and to handle REST requests. The SOAP server manages the publication of Web Services. These servers rely on the internal HTTP server of 4D Server. + +![](assets/en/Admin/server-admin-web-page.png) + + +The upper part of the page provides information about the current status of the HTTP server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the HTTP server was last launched. +- **Uptime**: Time elapsed since last startup of the HTTP server. +- **Total HTTP hits**: Number of (low level) HTTP hits received by the HTTP server since it was started. + + +### Start/Stop HTTP Server + +This button toggles and can be used to control the activation of the 4D Server HTTP server. + +- When the HTTP server state is "Started," the button is titled **Stop HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately stopped; the Web server, REST server, and SOAP server no longer accept any requests. +- When the HTTP server state is "Stopped," the button is titled **Start HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately started; Web, REST, and SOAP requests are accepted. + +> You must have a suitable license in order to be able to start the HTTP server. +> +> The HTTP server can also be launched automatically on application startup (Settings) or by programming. + +### Web Information + +This area provides specific information about the Web server of 4D Server. + +- **Web requests**: Accepted or Rejected. This information indicates whether the Web server is activated. Since the Web server is directly linked to the HTTP server, Web requests are accepted when the HTTP server is started and rejected when it is stopped. +- **Maximum connections**: Maximum number of Web connections allowed. This value depends on the license installed on the server machine. + +### SOAP Information + +This area provides specific information about the SOAP server of 4D Server and includes a control button. + +- **SOAP requests**: Accepted or Rejected. This information indicates whether the SOAP server is activated. In order for SOAP requests to be accepted, the HTTP server must be started and the SOAP server must explicitly accept the requests (see the Accept/Reject button). +- **Maximum connections**: Maximum number of SOAP connections allowed. This value depends on the license installed on the server machine. +- **Accept/Reject SOAP requests** button: This button toggles and can be used to control the activation of the 4D Server SOAP server. This button modifies the value of the **Allow Web Services Requests** option on the "Web Services" page of the Settings (and vice versa). You can also use the [`SOAP REJECT NEW REQUESTS`](https://doc.4d.com/4dv19/help/command/en/page1636.html) command to refuse new SOAP requests, however this does not modify the value of the **Allow Web Services Requests** option. + +If you click on the **Accept SOAP requests** button and the HTTP server is stopped, 4D automatically starts it. + +### HTTP Server Configuration + +This area provides information about the configuration parameters and operation of the HTTP server: + +- **Auto-launched at startup**: parameter set via the Settings. +- **HTTP Server processes (used/total)**: number of HTTP processes created on the server (current number of processes / total of all processes created). +- **Cache memory**: size of HTTP server cache memory, when it is activated (size actually used by cache / maximum size theoretically allocated to the cache in the Settings). You can click on the **Clear Cache** button to empty the current cache. +- **Listening to IP**, **HTTP Port** (80 by default), **TLS enabled** for HTTP connections (does not concern 4D nor SQL connections) and **HTTPS Port** used: current [configuration parameters](WebServer/webServerConfig.md) of the HTTP server, specified through the Settings or by programming. +- **Log file information**: name, format and date of the next automatic log backup of the HTTP server (logweb.txt file). + + +## Real Time Monitor Page + +The Real Time Monitor page monitors the progress of "long" operations performed by the application in real time. These operations are, for example, sequential queries, execution of formulas, etc. + +![](assets/en/Admin/server-admin-monitor-page.png) +> This page is available in the administration window of the server machine and also from a remote 4D machine. In the case of a remote machine, this page displays data from operations performed on the server machine. + +A line is added for each long operation performed on the data. This line automatically disappears when the operation is complete (you can check the **Display operations at least 5 seconds** option to keep quick operations on screen for 5 seconds, see below). + +The following information is provided for each line: + +- **Start Time**: starting time of operation in the format: "dd/mm/yyyy - hh:mm:ss" +- **Duration** (ms): duration in milliseconds of operation in progress +- **Information**: title of operation. +- **Details**: this area displays detailed information which will vary according to the type of operation selected. More specifically: + + **Created on**: indidates whether the operation results from a client action (Created on client) or if it was started explicitly on the server by means of a stored procedure or the "Execute on server" option (Created on server). + + **Operation Details**: Operation type and (for query operations) query plan. + + **Sub-operations** (if any): Dependent operations of the selected operation (e.g. deleting related records before a parent record). + + **Process Details**: Additional information concerning the table, field, process or client, depending on the type of operation + +> Real-time monitoring page uses the [`GET ACTIVITY SNAPSHOT`](https://doc.4d.com/4dv19/help/command/en/page1277.html) command internally. More information can be found in this command description. + +The page is active and updated permanently as soon as it is displayed. It should be noted that its operation can significantly slow the execution of the application. It is possible to suspend the updating of this page in one of the following ways: + +- clicking on the **Pause** button, +- clicking in the list, +- pressing the space bar. + +When you pause the page, a "PAUSED" message appears and the button label changes to **Resume**. You can resume monitoring of the operations by performing the same action as for pausing. + +#### Modo avanzado + +The RTM page can display additional information, if necessary, for each listed operation. + +To access the advanced mode for an operation, press **Shift** and select the desired operation. All available information is then displayed in the "Process Details" area without any filtering (as returned by the `GET ACTIVITY SNAPSHOT` command). Available information depends on the operation selected. + +Here is an example of information displayed in standard mode: + +![](assets/en/Admin/server-admin-monitor-adv1.png) + + +In advanced mode (**Shift+Click** on the operation), additional information is displayed: + +![](assets/en/Admin/server-admin-monitor-adv2.png) + +#### Snapshot button + +The **Snapshot** button allows you to copy to the clipboard all the operations displayed in the RTM panel, as well as their related details (process and sub-operation info): + +![](assets/en/Admin/server-admin-monitor-snapshot.png) + + +#### Display operations at least 5 seconds + +If you check the **Display operations at least 5 seconds** option, any listed operation will be displayed on the page for at least five seconds, even after its execution is finished. Retained operations appear dimmed in the operation list. This feature is useful for getting information about operations that execute very quickly. diff --git a/website/translated_docs/es/Admin/tls.md b/website/translated_docs/es/Admin/tls.md new file mode 100644 index 00000000000000..e9765d410c0944 --- /dev/null +++ b/website/translated_docs/es/Admin/tls.md @@ -0,0 +1,106 @@ +--- +id: tls +title: Protocolo TLS (HTTPS) +--- + +All 4D servers can communicate in secured mode through the TLS (Transport Layer Security) protocol: + +- the web server +- the application server (client-server desktop applications) +- the SQL server + +## Generalidades + +The TLS protocol (successor of SSL) has been designed to secure data exchanges between two applications —mainly between a web server and a browser. This protocol is widely used and is compatible with most web browsers. + +At the network level, the security protocol is inserted between the TCP/IP layer (low level) and the HTTP high level protocol. It has been designed mainly to work with HTTP. + +Network configuration using TSL: + +![](assets/en/WebServer/tls1.png) + +The TLS protocol is designed to authenticate the sender and receiver and to guarantee the confidentiality and integrity of the exchanged information: + +* **Authentication**: The sender and receiver identities are confirmed. +* **Confidentiality**: The sent data is encrypted so that no third person can understand the message. +* **Integrity**: The received data has not been changed, by accident or malevolently. + +TLS uses a public key encryption technique based on a pair of asymmetric keys for encryption and decryption: a public key and a private key. The private key is used to encrypt data. The sender (the website) does not give it to anyone. The public key is used to decrypt the information and is sent to the receivers (web browsers) through a certificate. When using TLS with the Internet, the certificate is delivered through a certification authority, such as Verisign®. The website pays the Certificate Authority to deliver a certificate which guaranties the server authentication and contains the public key allowing to exchange data in a secured mode. +> For more information on the encryption method and the public and private key issues, refer to the `ENCRYPT BLOB` command description. + +## Minimum version + +By default, the minimum version of the secured protocol accepted by the server is TLS 1.2. You can modify this value by using the `Min TLS version` selector with the `SET DATABASE PARAMETER command`. + +You can control the level of security of your web server by defining the [minimum TLS version](WebServer/webServerConfig.md#minimum-tls-version) accepted for connections. + +## How to get a certificate? + +A server working in secured mode means that you need a digital certificate from a certification authority. This certificate contains various information such as the site ID as well as the public key used to communicate with the server. This certificate is transmitted to the clients (e.g. Web browsers) connecting to this server. Once the certificate has been identified and accepted, the communication is made in secured mode. +> Web browsers authorize only the certificates issued by a certification authority referenced in their properties. + +![](assets/en/WebServer/tls2.png) + +The certification authority is chosen according to several criteria. If the certification authority is well known, the certificate will be authorized by many browsers, however the price to pay will be expensive. + +To get a digital certificate: + +1. Generate a private key using the `GENERATE ENCRYPTION KEYPAIR` command. +> **Warning**: For security reasons, the private key should always be kept secret. Actually, it should always remain with the server machine. For the Web server, the Key.pem file must be placed in the Project folder. + +2. Use the `GENERATE CERTIFICATE REQUEST` command to issue a certificate request. + +3. Send the certificate request to the chosen certificate authority.

    To fill in a certificate request, you might need to contact the certification authority. The certification authority checks that the information transmitted are correct. The certificate request is generated in a BLOB using the PKCS format encoded in base64 (PEM format). This principle allows you to copy and paste the keys as text and to send them via E-mail without modifying the key content. For example, you can save the BLOB containing the certificate request in a text document (using the `BLOB TO DOCUMENT` command), then open and copy and paste its content in a mail or a Web form to be sent to the certification authority. + +4. Once you get your certificate, create a text file named “cert.pem†and paste the contents of the certificate into it.

    You can receive a certificate in different ways (usually by email or HTML form). 4D accepts all platform-related text formats for certificates (OS X, PC, Linux, etc.). However, the certificate must be in PEM format, *i.e.*, PKCS encoded in base64. +> CR line-ending characters are not supported on their own; you must use CRLF or LF. + +5. Place the “cert.pem†file in the [appropriate location](#installation-and-activation). + +The 4D server can now work in a secured mode. A certificate is valid between 3 months to a year. + +## Instalación y activación + +### Installing `key.pem` and `cert.pem` files + +To be able to use the TLS protocol with the server, you must install the **key.pem** (document containing the private encryption key) and **cert.pem** (document containing the certificate) at the appropriate location(s). Different locations are required depending on the server on which you want to use TLS. +> Default *key.pem* and *cert.pem* files are provided with 4D. For a higher level of security, we strongly recommend that you replace these files with your own certificates. + +#### With the web server + +To be used by the 4D web server, the **key.pem** and **cert.pem** files must be placed: + +- with 4D in local mode or 4D Server, next to the [project folder](Project/architecture.md#project-folder) +- with 4D in remote mode, in the client database folder on the remote machine (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +You must copy these files manually on the remote machine. + +#### With the application server (client-server desktop applications) + +To be used by the 4D application server, the **key.pem** and **cert.pem** files must be placed: + +- in the [**Resources** folder](Project/architecture.md#resources) of the 4D Server application +- and in the **Resources** folder on each remote 4D application (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +#### With the SQL server + +To be used by the 4D SQL server, the **key.pem** and **cert.pem** files must be placed next to the [project folder](Project/architecture.md#project-folder). + + +### Enabling TLS + +The installation of **key.pem** and **cert.pem** files makes it possible to use TLS with the 4D server. However, in order for TLS connections to be accepted by the server, you must enable them: + +- With the 4D web server, you must [enable HTTPS](WebServer/webServerConfig.md#enable-https). You can set the [HSTS option](WebServer/webServerConfig.md#enable-hsts) to redirect browsers trying to connect in http mode. +- With the application server, you must select the **Encrypt Client-Server Communications** option in the "Client-server/Network options" page of the Settings dialog box. +- With the SQL server, you must select the **Enable TLS** option in the "SQL" page of the Settings dialog box. + +> The 4D web server also supports [HSTS option](WebServer/webServerConfig.md#enable-hsts) to declare that browsers should only interact with it via secure HTTPS connections. + +## Perfect Forward Secrecy (PFS) + +[PFS](https://en.wikipedia.org/wiki/Forward_secrecy) adds an additional layer of security to your communications. Rather than using pre-established exchange keys, PFS creates session keys cooperatively between the communicating parties using Diffie-Hellman (DH) algorithms. The joint manner in which the keys are constructed creates a "shared secret" which impedes outside parties from being able to compromise them. + +When TLS is enabled on the server, PFS is automatically enabled. If the *dhparams.pem* file (document containing the server's DH private key) does not already exist, 4D will automatically generate it with a key size of 2048. The initial generation of this file could take several minutes. The file is placed with the [*key.pem* and *cert.pem* files](#key-pem-and-cert-pem-files). + +If you use a [custom cipher list](WebServer/webServerConfig.md##cipher-list) and want to enable PFS, you must verify that it contains entries with DH or ECDH (Elliptic-curve Diffie–Hellman) algorithms. diff --git a/website/translated_docs/es/Admin/webAdmin.md b/website/translated_docs/es/Admin/webAdmin.md new file mode 100644 index 00000000000000..62172bca410f6c --- /dev/null +++ b/website/translated_docs/es/Admin/webAdmin.md @@ -0,0 +1,156 @@ +--- +id: webAdmin +title: Web Administration +--- + + +An embedded web server component, named `WebAdmin`, is used by 4D and 4D Server to provide a secured web access to specific management features such as the [Data Explorer](dataExplorer.md). You can connect locally or remotely to this web server from a browser or any web application and access the associated 4D application. + +The WebAdmin handles the authentication of users with "WebAdmin" privileges, so that they can open administration sessions and access dedicated interfaces. + +This feature can be used in 4D applications running headless as well as 4D applications running with interfaces. + + +## Starting the WebAdmin web server + +By default, the `WebAdmin` web server is not launched. You need to configure the launch at startup, or (in versions with interface) launch it manually using a menu item. + + +### Launch at startup + +You can configure the `WebAdmin` web server to be launched at 4D or 4D Server application startup (before any project is loaded). + +- If you use a 4D application with interface, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +Check the **Web server administration automatic startup** option in the settings dialog box: + +![alt-text](assets/en/Admin/waSettings.png) + +- Whether you use 4D application which is headless or not, you can enable the automatic startup mode using the following *Command Line Interface* argument: + + +``` +open ~/Desktop/4D.app --webadmin-auto-start true +``` + +> If the TCP port used by the `WebAdmin` web server ([HTTPS](#https-port) or [HTTP](#http-port), depending on the settings) is not free at startup, 4D will try successively the 20 following ports, and use the first one that is available. If no port is available, the web server is not launched and an error is displayed or (headless application) logged in the console. + + +### Start and stop + +If you use a 4D application with interface, you can start or stop the `WebAdmin` web server for your project at any moment: + +Select the **File > Web Administration > Start Server** menu item. + +![alt-text](assets/en/Admin/waMenu2.png) + +The menu item becomes **Stop Server** when the server is launched; select **Stop Server** to stop the `WebAdmin` web server. + + + +## WebAdmin Settings + +Configuring the `WebAdmin` component is mandatory in particular to define the [**access key**](#access-key). By default when the access key is not set, access via a URL is not allowed. + +You can configure the `WebAdmin` component using the [Web Administration settings dialog box](#settings-dialog-box) (see below). + +> If you use a headless 4D application, you can use [*Command Line Interface* arguments](#webadmin-headless-configuration) to define basic settings. You will have to customize the settings file to define advanced parameters. + + +### Settings dialog box + +To open the Web Administration settings dialog box, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +The following dialog box is displayed: + +![alt-text](assets/en/Admin/waSettings2.png) + +#### Web server administration automatic startup + +Check this option if you want the `WebAdmin` web server to be automatically launched when the 4D or 4D Server application starts ([see above](#launching-at-startup)). By default, this option is not checked. + +#### Accept HTTP connections on localhost + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTP on the same machine as the 4D application. By default, this option is checked. + +**Notas:** +- Connections with HTTP other than localhost are never accepted. +- Even if this option is checked, when [Accept HTTPS](#accept-https) is checked and the TLS configuration is valid, localhost connections use HTTPS. + + +#### HTTP Port + +Port number to use for connections through HTTP to the `WebAdmin` web server when the **Accept HTTP connections on localhost** option is checked. Default value is 7080. + + +#### Accept HTTPS + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTPS. By default, this option is checked. + +#### HTTPS Port + +Port number to use for connections through HTTPS to the `WebAdmin` web server when the **Accept HTTPS** option is checked. Default value is 7443. + + +#### Certificate folder path + +Path of the folder where the TLS certificate files are located. By default, the certificate folder path is empty and 4D or 4D Server uses the certificate files embedded in the 4D application (custom certificates must be stored next to the project folder). + +#### Debug log mode + +Status or format of the HTTP request log file (HTTPDebugLog_*nn*.txt, stored in the "Logs" folder of the application -- *nn* is the file number). The following options are available: + +- **Disable** (default) +- **With all body parts** - enabled with body parts in response and request +- **Without body parts** - enabled without body parts (body size is provided) +- **With request body** - enabled with body part in request only +- **With response body** - enabled with body part in response only + +#### Access Key + +Defining an access key is mandatory to unlock access to the `WebAdmin` web server through a URL (access via a 4D menu command does not require an access key). When no access key is defined, no web client is allowed to connect through a URL to a web administration interface like the [Data Explorer page](dataExplorer.md). An error page is returned in case of connection request: + +![alt-text](assets/en/Admin/accessKey.png) + +An access key is similar to a password but not associated to a login. + +- To define a new access key: click the **Define** button, enter the access key string in the dialog box and click **OK**. The button label becomes **Modify**. +- To modify the access key: click the **Modify** button, enter the new access key string in the dialog box and click **OK**. +- To delete the access key: click the **Modify** button, let the access key area empty and click **OK**. + + +## WebAdmin Headless Configuration + +All [WebAdmin settings](#webadmin-settings) are stored in the `WebAdmin.4DSettings` file. There is one default `WebAdmin.4DSettings` file per 4D and 4D Server application, so that it is possible to deploy multiple applications on the same host machine. + +When running a 4D or 4D Server application headless, you can set and use the default `WebAdmin.4DSettings` file, or designate a custom `.4DSettings` file. + +To set the file contents, you can use the [WebAdmin settings dialog](#settings-dialog-box) of the 4D application with interface and run it headless afterwards. The default `WebAdmin.4DSettings` file is then used. + +Or, you can set a custom `.4DSettings` file (xml format) and use it instead of the default file. Several dedicated arguments are available in the [Command line interface](cli.md) to support this feature. + +> The access key is not stored in clear in the `.4DSettings` file. + +Ejemplo: + +``` +"%HOMEPATH%\Desktop\4D Server.exe" MyApp.4DLink --webadmin-access-key + "my Fabulous AccessKey" --webadmin-auto-start true + --webadmin-store-settings + +``` + + +## Authentication and Session + +- When a web management page is accessed by entering a URL and without prior identification, an authentication is required. The user must enter the [access key](#access-key) in an authentication dialog box. If the access key was not defined in the `WebAdmin` settings, no access via URL is possible. + +- When a web management page is accessed directly from a 4D or 4D Server menu item (such as **Records > Data Explorer** or **Window > Data Explorer** (4D Server)), access is granted without authentication, the user is automatically authenticated. + +Once the access is granted, a web [session](WebServer/sessions.md) with the "WebAdmin" privilege is created on the 4D application. As long as the current session has "WebAdmin" privilege, the `WebAdmin` component delivers requested pages. + + diff --git a/website/translated_docs/es/Backup/backup.md b/website/translated_docs/es/Backup/backup.md index e19eed131c5eaf..9793816d968837 100644 --- a/website/translated_docs/es/Backup/backup.md +++ b/website/translated_docs/es/Backup/backup.md @@ -1,95 +1,95 @@ --- id: backup -title: Backup +title: Copia de seguridad --- +Una copia de seguridad puede iniciarse de tres maneras: -## Starting a backup +- Manualmente, utilizando el comando **Copia de seguridad...** del menú 4D **Archivo** o el botón **Copia de seguridad** del [Centro de mantenimiento y seguridad](MSC/backup.md). +- Automáticamente, utilizando el programador que se puede definir en las Propiedades, +- Por programación, utilizando el comando `BACKUP`. -A backup can be started in three ways: +> 4D Server: es posible iniciar una copia de seguridad manualmente desde una máquina remota mediante un método que llama al comando `BACKUP`. El comando se ejecutará, en todos los casos, en el servidor. -- 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. +## Copia de seguridad manual -> 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. +1. Seleccione el comando **Backup...** en el menú 4D **Archivo**. + Aparece la ventana de copia de seguridad: ![](assets/en/Backup/backup01.png) Puede ver la ubicación de la carpeta de la copia de seguridad mediante el menú emergente situado junto al área "Destino de la copia de seguridad". Esta ubicación se define en la página **Copia de seguridad/configuración** de las Propiedades de la base. -### Manual backup +- También puede abrir el [Centro de mantenimiento y seguridad](MSC/overview.md) de 4D y mostrar la [página de copias de seguridad](MSC/backup.md). -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. +El botón **Propiedades de la base...**hace que se muestre la página Copia de seguridad/Configuración de las Propiedades de la estructura. -- You can also open the [Maintenance and Security Center](MSC/overview.md) of 4D and display the [Backup page](MSC/backup.md). + 2. Haga clic en **Copia de seguridad** para iniciar la copia de seguridad utilizando los parámetros actuales. -The **Database properties...** button causes the Backup/Configuration page of the Database Settings to be displayed. -2. Click **Backup** to start the backup using current parameters. +## Backup automático periódico -### Scheduled automatic backup +Las copias de seguridad programadas se inician automáticamente. Se configuran en la página **Backup/Planificador** de las ** Propiedades**. -Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Database Settings**. +Las copias de seguridad se realizan automáticamente a las horas definidas en esta página sin ningún tipo de intervención del usuario. Para más información sobre el uso de esta caja de diálogo, consulte [Definir las copias de seguridad periódicas](settings.md#scheduler). -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). -### BACKUP command +## Comando BACKUP -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). +Cuando el comando `BACKUP` del lenguaje 4D se ejecuta desde un método, la copia de seguridad se inicia utilizando los parámetros actuales definidos en las propiedades. Puede utilizar los métodos base `On Backup Startup` and `On Backup Shutdown` para controlar el proceso de copia de seguridad (consulte el manual *Lenguaje de 4D*). -## Managing the backup processing -Once a backup is started, 4D displays a dialog box with a thermometer indicating the progress of the backup: +## Cómo funciona la copia de seguridad + +Una vez iniciada la copia de seguridad, 4D muestra una caja de diálogo con un termómetro que indica el progreso de la copia de seguridad: ![](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. +Este termómetro también se muestra en la página [Backup del CSM](MSC/backup.md) si ha utilizado esta caja de diálogo. + +El botón **Parar** permite al usuario interrumpir la copia de seguridad en cualquier momento (consulte [Manejar los problemas de la copia de seguridad](backup.md#handling-backup-issues) más adelante). -The **Stop** button lets the user interrupt the backup at any time (refer to [Handling backup issues](backup.md#handling-backup-issues) below). +El estado de la última copia de seguridad (correcta o fallida) se almacena en el área de información de la [página de copias de seguridad en el CSM](MSC/backup.md) o en la **página de mantenimiento** de 4D Server. También se registra en la base **Backup journal.txt**. -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**. +### Acceso a la aplicación durante la copia de seguridad -### Accessing the database during backup +Durante una copia de seguridad, el acceso a la aplicación está restringido por 4D en función del contexto. 4D bloquea los procesos relacionados con los tipos de archivos incluidos en la copia de seguridad: si sólo se hace una copia de seguridad de los archivos del proyecto, no se podrá acceder a la estructura pero sí a los datos. -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. +Por el contrario, si sólo se hace una copia de seguridad del archivo de datos, se sigue permitiendo el acceso a la estructura. En este caso, las posibilidades de acceso a la aplicación son las siguientes: -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: +- Con 4D versión monopuesto, la aplicación está bloqueada tanto para lectura como para escritura; todos los procesos están congelados. No se puede realizar ninguna acción. +- Con 4D Server, la aplicaci´n sólo está bloqueada en escritura; las máquinas cliente pueden ver los datos. Si una máquina cliente envía una petición de adición, eliminación o cambio al servidor, aparece una ventana que pide al usuario que espere hasta el final de la copia de seguridad. Una vez guardada la aplicación, la ventana desaparece y se realiza la acción. Para cancelar la petición en proceso y no esperar a que finalice la copia de seguridad, basta con hacer clic en el botón **Cancelar la operación**. Sin embargo, si la acción que espera ser ejecutada proviene de un método lanzado antes de la copia de seguridad, no debe cancelarla porque sólo se cancelan las operaciones que quedan por realizar. Además, un método parcialmente ejecutado puede causar inconsistencias lógicas en los datos. > Cuando la acción que espera ser ejecutada proviene de un método y el usuario hace clic en el botón **Cancelar operación**, 4D Server devuelve el error -9976 (Este comando no puede ejecutarse porque la copia de seguridad de la base está en progreso). -- 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). +### Gestión de los problemas de las copias de seguridad -### Handling backup issues +Puede ocurrir que una copia de seguridad no se ejecute correctamente. Puede haber varias causas de fallo en la copia de seguridad: interrupción del usuario, archivo adjunto no encontrado, problemas en el disco de destino, transacción incompleta, etc. 4D procesa la incidencia según la causa. -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. +En todos los casos, tenga en cuenta que el estado de la última copia de seguridad (correcta o fallida) se almacena en el área de información de la [página de copias de seguridad en el CSM](MSC/backup.md) o en la **página de mantenimiento** de 4D Server, así como en el **Backup journal.txt**. -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. +- **Interrupción del usuario**: el botón **Parar** de la caja de diálogo de progreso permite a los usuarios interrumpir la copia de seguridad en cualquier momento. En este caso, la copia de elementos se detiene y se genera el error 1406. Puedes interceptar este error en el método base `On Backup Shutdown`. +- **Archivo adjunto no encontrado**: cuando no se encuentra un archivo adjunto, 4D realiza una copia de seguridad parcial (copia de seguridad de los archivos de la aplicación y de los archivos adjuntos accesibles) y devuelve un error. +- **Copia de seguridad imposible** (disco lleno o protegido contra escritura, disco ausente, fallo de disco, transacción incompleta, aplicación no lanzada en el momento de la copia de seguridad automática programada, etc.): si se trata de un primer error, 4D hará un segundo intento de realizar la copia de seguridad. La espera entre los dos intentos se define en la página **Backup/Backup y Restauración** de las Propiedades. Si el segundo intento falla, se muestra una caja de diálogo de alerta del sistema y se genera un error. Puedes interceptar este error en el método base `On Backup Shutdown`. -- **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. +## Historial de copias de seguridad (Backup Journal) -## Backup Journal +Para facilitar el seguimiento y la verificación de las copias de seguridad, el módulo de copia de seguridad escribe un resumen de cada operación realizada en un archivo especial, que es similar a un diario de actividades. Al igual que un manual de a bordo, todas las operaciones de la base de datos (copias de seguridad, restauraciones, integraciones de archivos de registro) se registran en este archivo, tanto si se han programado como si se han realizado manualmente. La fecha y la hora en que se produjeron estas operaciones también se anotan en el diario. -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. +El historial de copia de seguridad se llama "Backup Journal[001].txt" y se coloca en la carpeta "Logs" del proyecto. El historial de copias de seguridad puede abrirse con cualquier editor de texto. -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. +#### Gestión del tamaño del historial de copias de seguridad -#### Management of backup journal size +En determinadas estrategias de copia de seguridad (por ejemplo, en el caso de que se realicen copias de seguridad de numerosos archivos adjuntos), el historial de copias de seguridad puede alcanzar rápidamente un gran tamaño. Se pueden utilizar dos mecanismos para controlar este tamaño: + +- **Copia de seguridad automática**: antes de cada copia de seguridad, la aplicación examina el tamaño del archivo historial de copia de seguridad actual. Si es superior a 10 MB, se archiva el archivo actual y se crea un nuevo archivo con el número [xxx] incrementado, por ejemplo "Backup Journal[002].txtâ€. Una vez alcanzado el número de archivo 999, la numeración vuelve a empezar por el 1 y los archivos existentes serán sustituidos. +- **Posibilidad de reducir la cantidad de información registrada**: para ello, basta con modificar el valor de la llave `VerboseMode` en el archivo *Backup.4DSettings* del proyecto. Por defecto, esta llave está definida como True. Si cambia el valor de esta llave a False, sólo se almacenará en el diario de copias de seguridad la información principal: fecha y hora de inicio de la operación y los errores encontrados. Las llaves XML relativas a la configuración de la copia de seguridad se describen en el manual *Backup de las llaves 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 la información relativa a las últimas operaciones de copia de seguridad y restauración se almacena en el archivo **backupHistory.json** de la aplicación. Registra la ruta de cada archivo guardado (incluidos los adjuntos), así como el número, la fecha, la hora, la duración y el estado de cada operación. Para limitar el tamaño del archivo, el número de operaciones registradas es el mismo que el número de copias de seguridad disponibles ("Conservar sólo los últimos X archivos de copia de seguridad") definido en las propiedades de la copia de seguridad. -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: +El archivo **backupHistory.json** se crea en la carpeta de destino de la copia de seguridad actual. Puede obtener la ruta real de este archivo utilizando la siguiente declaración: ```4d $backupHistory:=Get 4D file(Backup history file) ``` - -> **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 +> **Atención** +> La eliminación o el desplazamiento del archivo **backupHistory.json** hará que se reinicie el siguiente número de copia de seguridad. +> El archivo **backupHistory.json** está formateado para ser utilizado por la aplicación 4D. Si lo que busca es un informe legible en las operaciones de copia de seguridad, quizá le resulte más preciso el diario de copias de seguridad. diff --git a/website/translated_docs/es/Backup/log.md b/website/translated_docs/es/Backup/log.md index d8aead277fe24d..51ce9e785316ae 100644 --- a/website/translated_docs/es/Backup/log.md +++ b/website/translated_docs/es/Backup/log.md @@ -1,77 +1,81 @@ --- id: log -title: Log file (.journal) +title: Archivo de historial (.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. +Una aplicación de uso continuo siempre está registrando cambios, adiciones o supresiones. Realizar copias de seguridad periódicas de los datos es importante, pero no permite (en caso de incidente) restaurar los datos introducidos desde la última copia de seguridad. Para responder a esta necesidad, 4D ofrece ahora una herramienta específica: el archivo de historial. Este archivo permite garantizar la seguridad permanente de los datos. -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. +Además, 4D trabaja continuamente con una caché de datos en la memoria. Todos los cambios realizados en los datos de la aplicación se almacenan temporalmente en la caché antes de escribirse en el disco duro. Esto acelera el funcionamiento de las aplicaciones; de hecho, el acceso a la memoria es más rápido que el acceso al disco duro. Si se produce un incidente en la aplicación antes de que los datos almacenados en la caché puedan escribirse en el disco, deberá incluir el archivo de historial actual para poder recuperar la aplicación 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 dispone de funciones que analizan el contenido del archivo de historial, permitiendo revertir las operaciones realizadas sobre los datos de la aplicación. Estas funciones están disponibles en el CSM: consulte la página [Análisis de actividades](MSC/analysis.md) y la página [Rollback](MSC/rollback.md). -## How the log file works +## Funcionamiento del archivo de historial -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. +El archivo de historial generado por 4D contiene una descripción de todas las operaciones realizadas en los datos de las tablas registradas en el diario, que se registran de forma secuencial. Por defecto, todas las tablas se registran en el diario, es decir, se incluyen en el archivo de historial, pero puede anular la selección de tablas individuales mediante la propiedad **Incluir en el archivo de historial**. -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: +Así, cada operación realizada por un usuario provoca dos acciones simultáneas: la primera en el archivo de datos (la instrucción se ejecuta normalmente) y la segunda en el archivo de historial (se registra la descripción de la operación). El archivo de historial se crea de forma independiente, sin perturbar ni ralentizar el trabajo del usuario. Una aplicación sólo puede trabajar con un archivo de historial a la vez. El archivo de historial registra los siguientes tipos de acciones: -- 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. +- Apertura y cierre del archivo de datos, +- Apertura y cierre del proceso (contextos), +- Adición de registros o BLOBs, +- Modificación de registros, +- Eliminación de registros, +- Creación y cierre de transacciones. -For more information about these actions, refer to the [Activity analysis](MSC/analysis.md) page of the MSC. +Para más información sobre estas acciones, consulte la página [Análisis de actividades](MSC/analysis.md) del 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 gestiona el archivo de historial. Tiene en cuenta todas las operaciones que afectan al archivo de datos por igual, independientemente de las manipulaciones realizadas por un usuario, métodos 4D, el motor SQL, los plug-ins, o un navegador web o una aplicación móvil. -The following illustration sums up how the log file works: +La siguiente ilustración resume el funcionamiento del archivo 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. +El archivo de historial actual se guarda automáticamente con el archivo de datos actual. Este mecanismo tiene dos ventajas distintas: -## Creating the log file +- Evitar la saturación del volumen de disco donde se almacena el archivo de historial. Sin una copia de seguridad, el archivo de historial se haría cada vez más grande con el uso, y acabaría utilizando todo el espacio disponible en el disco. Para cada copia de seguridad del archivo de datos, 4D o 4D Server cierra el archivo de historial actual e inmediatamente inicia un nuevo archivo vacío, evitando así el riesgo de saturación. A continuación, el archivo de historial antiguo se archiva y, finalmente, se destruye en función del mecanismo de gestión de los conjuntos de copias de seguridad. +- Conservar los archivos de historial correspondientes a las copias de seguridad para poder analizar o reparar una aplicación en un momento posterior. La integración de un archivo de historial sólo puede hacerse en la aplicación a la que corresponde. Para poder integrar correctamente un archivo de historial en una copia de seguridad, es importante que las copias de seguridad y los archivos de historial se archiven simultáneamente. -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. +## Crear el archivo de historial -To create a log file: +Por defecto, toda aplicación creada con 4D utiliza un archivo de historial (opción definida en la página **General** de las Preferencias). El archivo de historial se llama *data.journal* y se coloca en la carpeta 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*. +Puede averiguar si su aplicación utiliza un archivo de historial en cualquier momento: sólo tiene que comprobar si la opción **Utilizar el archivo de historial** está seleccionada en la página **Backup/Configuración** de las Propiedades. Si deselecciona esta opción, o si utiliza una aplicación sin archivo de historial y desea configurar una estrategia de copia de seguridad con un archivo de historial, tendrá que crear uno. -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 crear un archivo de historial: -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. En la página **Copia de seguridad/Configuración** de las Propiedades de estructura, marque la opción **Utilizar el archivo de historial**. El programa muestra una caja de diálogo estándar de abrir/nuevo archivo. Por defecto, el archivo de historial se llama *data.journal*. -4. Validate the Database Settings dialog box. +2. Mantenga el nombre por defecto o cambie el nombre, y luego seleccione la ubicación del archivo. Si tiene al menos dos discos duros, se recomienda colocar el archivo de historial en un disco distinto al que contiene el proyecto de aplicación. Si se pierde el disco duro de la aplicación, aún puede recuperar su archivo de historial. -In order for you to be able to create a log file directly, the database must be in one of the following situations: +3. Haga clic en **Guardar**. El disco y el nombre del archivo de historial abierto se muestran ahora en el área **Utilizar historial** de la caja de diálogo. Puede hacer clic en esta área para que aparezca un menú emergente con la ruta del historial en el 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 la caja de diálogo de las Propiedades. -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 crear directamente un archivo de historial, los datos deben estar en una de las siguientes situaciones: -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. +- El archivo de datos está en blanco, +- Acaba de realizar una copia de seguridad y aún no se han realizado cambios en los datos. -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). +En todos los demás casos, al validar el cuadro de diálogo de las Propiedades, aparecerá un cuadro de diálogo de alerta para informarle que es necesario realizar una copia de seguridad. Si hace clic en **Aceptar**, la copia de seguridad comienza inmediatamente, y luego se activa el archivo de historial. Si hace clic en **Cancelar**, la solicitud se guarda pero la creación del archivo de historial se pospone y en realidad sólo se creará después de la siguiente copia de seguridad de la aplicación. Esta precaución es indispensable porque, para restaurar una aplicación después de algún incidente, necesitará una copia de la aplicación en la que se integrarán las operaciones registradas en el archivo de historial. -## Stopping a log file +Sin tener que hacer nada más, todas las operaciones realizadas sobre los datos se registran en este archivo y se utilizarán en el futuro cuando se abra la aplicación. -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. +Debe crear otro archivo de historial si crea un nuevo archivo de datos. Debe establecer o crear otro archivo de historial si abre otro archivo de datos que no está asociado a un archivo de historial (o si falta el archivo de historial). -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: + + +## Cerrar el historial + +Si desea dejar de registrar las operaciones en el archivo de historial actual, sólo tiene que anular la selección de la opción **Utilizar el archivo de historial** en la página **Copia de seguridad/Configuración** de las Propiedades. + +4D muestra entonces un mensaje de alerta para recordarle que esta acción le impide aprovechar la seguridad que ofrece el archivo de historial: ![](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). +Si hace clic en el botón **Parar**, el archivo de historial actual se cierra inmediatamente (la caja de dialogo de las Propiedades no necesita ser validada después). -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. +Si desea cerrar el archivo de historial actual porque es demasiado grande, puede considerar la posibilidad de realizar una copia de seguridad del archivo de datos, lo que hará que el archivo de historial se copie también. -> **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:** el comando `New log file` cierra automáticamente el archivo de historial actual e inicia uno nuevo. Si por alguna razón el archivo de historial no está disponible durante una sesión de trabajo, se genera el error 1274 y 4D Server no permite a los usuarios escribir más datos. Cuando el archivo de historial está disponible de nuevo, es necesario hacer una copia de seguridad. \ No newline at end of file diff --git a/website/translated_docs/es/Backup/overview.md b/website/translated_docs/es/Backup/overview.md index ddfd2050b102c8..e1aeb211f00259 100644 --- a/website/translated_docs/es/Backup/overview.md +++ b/website/translated_docs/es/Backup/overview.md @@ -1,20 +1,21 @@ --- -id: overview -title: Overview +id: generalidades +title: Generalidades --- -4D includes a full database backup and restore module. +4D incluye un módulo completo de copia de seguridad y de restauración de la aplicación. -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. +Este módulo permite hacer una copia de seguridad de una aplicación en uso sin tener que salir de ella. Cada copia de seguridad puede incluir la carpeta del proyecto, el archivo de datos y cualquier archivo o carpeta adicional. Estos parámetros se definen primero en las Propiedades. -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. +Las copias de seguridad pueden iniciarse de forma manual o automática a intervalos regulares sin intervención del usuario. Los comandos específicos del lenguaje, así como los métodos base específicos, permiten integrar las funciones de copia de seguridad en una interfaz personalizada. -Databases can be restored automatically when a damaged database is opened. +Las aplicaciones pueden restaurarse automáticamente cuando se abre una aplicación dañada. -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. +Además, el módulo de copia de seguridad integrado puede aprovechar el archivo .journal ([de historial](log.md)). Este archivo mantiene un registro de todas las operaciones realizadas en los datos y también garantiza una seguridad total entre dos copias de seguridad. En caso de problemas con una aplicación en uso, las operaciones que falten en el archivo de datos se reintegran automáticamente la próxima vez que se abra la aplicación. Puede ver el contenido del archivo de historial en cualquier 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 +> También puede implementar soluciones alternativas para replicar y sincronizar los datos con el fin de mantener versiones idénticas de las aplicaciones con fines de copia de seguridad. Estas soluciones pueden basarse en los siguientes mecanismos y tecnologías: +> - Configuración de una réplica lógica con 4D Server (utilizando los mecanismos del módulo de copia de seguridad integrado) +> - Sincronización utilizando SQL - Sincronización utilizando HTTP (/rest/url) + + +> Para una visión general de las funciones de seguridad de 4D, consulte la [Guía de seguridad de 4D](https://blog.4d.com/4d-security-guide/). diff --git a/website/translated_docs/es/Backup/restore.md b/website/translated_docs/es/Backup/restore.md index 62fba87941bae5..2058028ba68fde 100644 --- a/website/translated_docs/es/Backup/restore.md +++ b/website/translated_docs/es/Backup/restore.md @@ -1,48 +1,56 @@ --- -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 le permite restaurar conjuntos enteros de datos de una aplicaci´n en caso de que se presente un incidente, independientemente de sus causas. Pueden producirse dos categorías principales 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. +- La parada inesperada de la aplicación mientras está en uso. Este incidente puede producirse por un corte de luz, un fallo de un elemento del sistema, etc. En este caso, dependiendo del estado actual de la caché de datos en el momento del incidente, la restauración de la aplicación puede requerir diferentes operaciones: + - Si la caché estaba vacía, la aplicación se abre normalmente. Se registraron todos los cambios realizados en la aplicación. Este caso no requiere ninguna operación particular. + - Si la caché contiene operaciones, el archivo de datos está intacto pero requiere integrar el archivo de historial actual. + - Si la caché estaba en proceso de escritura, es probable que el archivo de datos esté dañado. Hay que restaurar la última copia de seguridad e integrar el archivo de historial actual. -> 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. +- La pérdida de archivo(s) de la aplicación. Este incidente puede producirse por sectores defectuosos en el disco que contiene la aplicación, un virus, un error de manipulación, etc. Hay que restaurar la última copia de seguridad y luego integrar el archivo de historial actual. Para saber si una aplicación ha sido dañada tras un incidente, basta con relanzarla con 4D. El programa realiza un auto diagnóstico y detalla las operaciones de reparación a realizar. En modo automático, estas operaciones se realizan directamente sin ninguna intervención por parte del usuario. Si se ha puesto en marcha una estrategia regular de copias de seguridad, las herramientas de restauración de 4D le permitirán (en la mayoría de los casos) recuperar la aplicación en el estado exacto en que se encontraba antes del incidente. -## Manually restoring a backup (standard dialog) +> 4D puede lanzar procedimientos automáticamente de recuperación de las aplicaciones tras los incidentes. Estos mecanismos se gestionan mediante dos opciones disponibles en la página **Backup/Backup y Restauración** de las Propiedades. Para más información, consulte el párrafo [Restauración automática](settings.md#automatic-restore). +> Si la incidencia es el resultado de una operación inadecuada realizada sobre los datos (eliminación de un registro, por ejemplo), puede intentar reparar el archivo de datos utilizando la función "rollback" del archivo de historial. Esta función está disponible en la página [Rollback](MSC/rollback.md) del CSM. -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. +## Restitución manual de una copia de seguridad (diálogo estándar) -To restore a database manually via a standard dialog box: +Puede restaurar manualmente el contenido de un archivo generado por el módulo de copia de seguridad. Una restauración manual puede ser necesaria, por ejemplo, para restaurar todo el contenido de un archivo (archivos de proyecto y archivos adjuntos), o para realizar búsquedas entre los archivos. La restauración manual también puede realizarse junto con la integración del archivo de registro actual. -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: +La restauración manual de las copias de seguridad puede realizarse a través de la caja de diálogo estándar de apertura de documento, o a través de la página [Restitución](MSC/restore) del CSM. La restitución a través del CSM ofrece más opciones y permite previsualizar el contenido del archivo. Por otro lado, sólo se pueden restaurar los archivos asociados a la aplicación abierta. + +Para restaurar manualmente una aplicación a través de una caja de diálogo estándar: + +1. Elija **Restituir...** en el menú de la aplicación 4D **Archivo**. It is not mandatory that an application project be open. O Ejecute el comando `RESTORE` desde un método 4D. Aparece una caja de diálogo estándar de apertura de archivos. +2. Seleccione un archivo de copia de seguridad (.4bk) o un archivo de copia de seguridad del historial (.4bl) que desee restaurar y haga clic en **Abrir**. Aparece una caja de diálogo que permite especificar la ubicación donde se restaurarán los archivos. Por defecto, 4D restaura los archivos en una carpeta llamada *Nomarchivo* (sin extensión) situada junto al archivo. Puede mostrar la ruta de acceso: ![](assets/en/Backup/backup07.png) -You can also click on the **[...]** button to specify a different location. +También puede hacer clic en el botón **[...]** para especificar una ubicación diferente. +3. Haga clic en el botón **Restaurar**. 4D extrae todos los archivos de copia de seguridad de la ubicación especificada. Si el archivo de historial actual o un archivo de copia de seguridad del historial tiene el mismo número que el archivo de copia de seguridad se almacena en la misma carpeta, 4D examina su contenido. Si contiene operaciones que no están presentes en el archivo de datos, el programa le pregunta si desea integrar estas operaciones. La integración se realiza automáticamente si la opción **de integración automática del historial** está seleccionada (ver [Restauración automática](settings.md#automatic-restore)). + +4.(Opcional) Haga clic en **OK** para integrar el archivo de historial en la aplicación restaurada. Si la restauración y la integración se han realizado correctamente, 4D muestra una caja de diálogo que indica que la operación se ha realizado con éxito. +5. Haga clic en **OK**. + +Se muestra la carpeta de destino. Durante la restauración, 4D coloca todos los archivos de la copia de seguridad en esta carpeta, independientemente de la posición de los archivos originales en el disco cuando se inicia la copia de seguridad. De esta manera, encontrará sus archivos con mayor facilidad. + +> Todo el contenido relacionado con el archivo de datos (carpeta archivos y `Settings`) se restaura automáticamente en una subcarpeta `Data` dentro de la carpeta de destino. + -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 una copia de seguridad (CSM) -## Manually restoring a backup (MSC) +Puede restaurar manualmente un archivo de la aplicación actual utilizando la página [Restauración](MSC/restore.md) del Centro de Mantenimiento y Seguridad (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 +## Integración manual del historial -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. +Si no ha marcado la opción de integración automática del archivo de historial en la página Restaurar del CSM (ver [Integración sucesiva de varios archivos de historial](MSC/restore.md#successive-intergration-of-several-data-log-files)), aparece una caja de diálogo de advertencia durante la apertura de la aplicación cuando 4D advierte que el archivo de historial contiene más operaciones de las que se han realizado en el archivo de datos. ![](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 este mecanismo funcione, 4D debe poder acceder al archivo de historial en su ubicación actual. -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 +Puede elegir si integrar o no el archivo de historial actual. No integrar el archivo de historial actual permite evitar la reproducción de los errores cometidos en los datos. \ No newline at end of file diff --git a/website/translated_docs/es/Backup/settings.md b/website/translated_docs/es/Backup/settings.md index b8b5d2e5a851bb..24c2a45d7c1b24 100644 --- a/website/translated_docs/es/Backup/settings.md +++ b/website/translated_docs/es/Backup/settings.md @@ -1,127 +1,129 @@ --- -id: settings -title: Backup Settings +id: parámetros +title: Parámetros de la copia de seguridad --- -Backup settings are defined through three pages in the Database Settings dialog box. You can set: +Los parámetros de copia de seguridad se definen a través de tres páginas en la caja de diálogo de las Propiedades. Puede definir: -- the scheduler for automatic backups -- the files to include in every backup -- the advanced features allowing to execute automatic tasks +- la periodicidad de las copias de seguridad automáticas +- los archivos a incluir en cada copia de seguridad +- las funcionalidades avanzadas permiten ejecutar tareas 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). +> Las propiedades definidas en esta caja de diálogo se escriben en el archivo *Backup.4DSettings*, guardado en la carpeta [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. +Puede automatizar la copia de seguridad de las aplicaciones abiertas con 4D o 4D Server (incluso cuando no hay máquinas cliente conectadas). Esto implica definir una frecuencia de copia de seguridad (en horas, días, semanas o meses); para cada sesión, 4D inicia automáticamente una copia de seguridad utilizando la configuración de copia de seguridad actual. -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)). +Si esta aplicación no se inició en el momento teórico de la copia de seguridad, la próxima vez que se inicie 4D, considerará que la copia de seguridad ha fallado y procederá según lo establecido en las Propiedades (consulte [Manejo de problemas de la copia de seguridad](backup.md#handling-backup-issues)). -The scheduler backup settings are defined on the **Backup/Scheduler** page of the Database Settings: +Los parámetros de copia de seguridad periódicos se definen en la página **Backup/Periodicidad** de las Propiedades: ![](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: +Las opciones que se encuentran en esta pestaña le permiten establecer y configurar las copias de seguridad periódicas automáticas de la aplicación. Puede elegir una configuración rápida estándar o puede personalizarla completamente. Aparecen varias opciones en función de la elección realizada en el menú **Copia de seguridad 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**: la función de copia de seguridad programada está inactiva. +- **Cada hora**: programa una copia de seguridad automática cada hora, a partir de la hora siguiente. +- **Cada día**: programa una copia de seguridad automática cada día. A continuación, puede introducir la hora a la que debe comenzar la copia de seguridad. +- **Todas las semanas**: programa una copia de seguridad automática cada semana. Dos áreas de entrada adicionales le permiten indicar el día y la hora en que debe comenzar la copia de seguridad. +- **Todos los meses**: programa una copia de seguridad automática cada mes. Dos áreas de entrada adicionales le permiten indicar el día del mes y la hora en que debe comenzar la copia de seguridad. +- **Personalizado**: sirve para configurar las copias de seguridad automáticas "a medida". Al seleccionar esta opción, aparecen varias áreas de entrada adicionales: + + **Cada X hora(s)**: permite programar las copias de seguridad con una base horaria. Puede introducir un valor entre 1 y 24. + - **Cada X día(s) a las x**: permite programar las copias de seguridad con una base diaria. Por ejemplo, introduzca 1 si desea realizar una copia de seguridad diaria. Cuando esta opción está marcada, debe introducir la hora a la que debe comenzar la copia de seguridad. + - **Cada X semana(s) a las x**: permite programar las copias de seguridad con una base semanal. Introduzca 1 si desea realizar una copia de seguridad semanal. Cuando esta opción está marcada, debe introducir el día(s) de la semana y la hora que debe comenzar la copia de seguridad. Si lo desea, puede seleccionar varios días de la semana. Por ejemplo, puede utilizar esta opción para definir dos copias de seguridad semanales: una el miércoles y otra el viernes. + - **Cada X mes(es), X día a x**: Permite programar copias de seguridad de forma mensual. Introduzca 1 si desea realizar una copia de seguridad mensual. Cuando esta opción está marcada, debe indicar el día de cada mes y la hora a la cual debe comenzar la copia de seguridad. -## Configuration +> 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. -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. + +## Configuración + +La página Copia de seguridad/Configuración de las Propiedades permite designar los archivos de copia de seguridad y su ubicación, así como la del archivo de historial. Estos parámetros son específicos de cada aplicación abierta por 4D o 4D Server. ![](assets/en/Backup/backup03.png) > **4D Server:** These parameters can only be set from the 4D Server machine. -### Content +### Contenido +Esta área le permite determinar qué archivos y/o carpetas deben copiarse durante la siguiente copia de seguridad. -This area allows you to set which files and/or folders to copy during the next backup. +- **Datos**: archivo de datos de la aplicación. Cuando esta opción está marcada, los siguientes elementos se copian automáticamente al mismo tiempo que los datos: + - el archivo de historial actual de la aplicación (si existe), + - la carpeta `Settings` completa situada [junto al archivo de datos](Project/architecture.md#settings-folder) (si existe), es decir, *los parámetros usuario para los datos*. +- **Estructura**: carpetas y archivos proyecto de la aplicación. En el caso de proyectos compilados, esta opción permite hacer una copia de seguridad del archivo .4dz. Cuando esta opción está marcada, se hace una copia de seguridad automática de la carpeta completa `Settings` situada [en el mismo nivel que la carpeta Project ](Project/architecture.md#settings-folder-1), es decir, los *parámetros usuario*. +- **Archivo de estructura usuario (sólo para bases binaria)**: *funcionalidad obsoleta* +- **Adjuntos**: esta área permite especificar un conjunto de archivos y/o carpetas que se respaldarán al mismo tiempo que la aplicación. Estos archivos pueden ser de cualquier tipo (documentos o plantillas de plug-ins, etiquetas, informes, imágenes, etc.). Puede definir archivos individuales o carpetas cuyo contenido se respaldará completamente. Cada elemento adjunto aparece con su ruta de acceso completa en el área "Adjuntos ". + - **Eliminar**: retira el archivo seleccionado de la lista de archivos adjuntos. + - **Añadir carpeta...**: muestra una caja de diálogo que permite seleccionar una carpeta para añadirla a la copia de seguridad. En el caso de una restitución, la carpeta se recuperará con su estructura interna. Puede seleccionar toda carpeta o volumen conectado a la máquina, a excepción de la carpeta que contiene los archivos de la aplicación. + - **Añadir archivo...**: muestra una caja de diálogo que permite seleccionar un archivo para añadirlo a la copia de seguridad. -- **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. -### Backup File Destination Folder +### Carpeta de destino del archivo de copia de seguridad -This area lets you view and change the location where backup files as well as log backup files (where applicable) will be stored. +Esta área le permite visualizar y cambiar la ubicación en la que se almacenarán los archivos de copia de seguridad, así como los archivos de copia de seguridad del archivo historial (si procede). -To view the location of the files, click in the area in order to display their pathname as a pop-up menu. +Para ver la ubicación de los archivos, haga clic en la área para que aparezca su ruta de acceso en un menú emergente. -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. +Para modificar la ubicación donde se almacenan estos archivos, haga clic en el botón **...**. Aparece una caja de diálogo de selección, que permite seleccionar la carpeta o el disco donde se colocarán las copias de seguridad. Las áreas "Espacio utilizado" y "Espacio libre" se actualizan automáticamente e indican el espacio restante en el disco de la carpeta seleccionada. -### Log management +### Gestión del archivo de historial -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. +La opción **Utilizar el archivo de historial**, cuando está marcada, indica que la aplicación utiliza un archivo de historial. Su ruta de acceso se especifica debajo de la opción. Cuando esta opción está marcada, no es posible abrir la aplicación sin un archivo de historial. -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. +Por defecto, todo proyecto creado con 4D utiliza un archivo de historial (opción **Utilizar archivo de historial**seleccionada en la **página General** de las **Preferencias**). El archivo de historial se llama *data.journal* y se coloca en la carpeta Data. -> 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. +> Activating a new log file requires the data of the application 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 application. -## Backup & Restore -Modifying backup and restore options is optional. Their default values correspond to a standard use of the function. +## Copia de seguridad y restitución + +La modificación de las opciones de copia de seguridad y restauración es opcional. Sus valores por defecto corresponden a un uso estándar de la función. ![](assets/en/Backup/backup04.png) -### General settings +### Parámetros generales + +- **Conservar únicamente los últimos X archivos de copia de seguridad**: este parámetro activa y configura el mecanismo utilizado para eliminar los archivos de copia de seguridad más antiguos, lo que evita el riesgo de saturar la unidad de disco. Esta funcionalidad opera de la siguiente manera: una vez finalizado el backup actual, 4D elimina el archivo más antiguo si se encuentra en la misma ubicación que el archivo del que se está haciendo el backup y tiene el mismo nombre (puede solicitar que el archivo más antiguo se elimine antes del backup para ahorrar espacio). Si, por ejemplo, el número de conjuntos se define en 3, las tres primeras copias de seguridad crean los archivos MyBase-0001, MyBase-0002 y MyBase-0003 respectivamente. Durante la cuarta copia de seguridad, se crea el archivo MyBase-0004 y se elimina MyBase-0001. Por defecto, el mecanismo de eliminación de conjuntos está activado y 4D guarda 3 conjuntos de copia de seguridad. Para desactivar el mecanismo, basta con deseleccionar la opción. +> Este parámetro se refiere tanto a las copias de seguridad de la aplicación como de los archivos del historial. -- **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. +- **Copia de seguridad sólo si el archivo de datos ha sido modificado**: cuando se marca esta opción, 4D inicia las copias de seguridad programadas sólo si se han añadido, modificado o eliminado datos desde la última copia de seguridad. De lo contrario, la copia de seguridad programada se cancela y se pospone hasta la siguiente copia de seguridad programada. No se genera ningún error; sin embargo, el diario de copias de seguridad señala que la copia de seguridad se ha pospuesto. Esta opción también permite ahorrar tiempo de máquina para la copia de seguridad de las aplicaciones utilizadas principalmente para su visualización. Tenga en cuenta que al activar esta opción no se tienen en cuenta las modificaciones realizadas en los archivos de estructura o en los archivos adjuntos. +> Este parámetro se refiere tanto a las copias de seguridad de la aplicación como de los archivos del historial. -- **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. +- **Eliminar el archivo de copia de seguridad más antiguo antes/después de la copia de seguridad**: esta opción sólo se utiliza si la opción "Conservar sólo los últimos X archivos de copia de seguridad" está marcada. Especifica si 4D debe comenzar borrando el archivo más antiguo antes de iniciar la copia de seguridad (**antes** opción) o si el borrado debe tener lugar una vez finalizada la copia de seguridad (opción **después**). Para que este mecanismo funcione, el archivo más antiguo no debe haber sido renombrado o movido. -- **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. +- **Si falla la copia de seguridad**: esta opción permite configurar el mecanismo utilizado para gestionar las copias de seguridad fallidas (copia de seguridad imposible). Cuando no se puede realizar una copia de seguridad, 4D le permite realizar un nuevo intento. + - **Reintentar en la siguiente fecha y hora programada**: esta opción sólo tiene sentido cuando se trabaja con copias de seguridad automáticas programadas. Equivale a anular la copia de seguridad fallida. Se genera un error. + - **Reintentar después de X segundo(s), minuto(s) u hora(s)**: cuando se marca esta opción, se ejecuta un nuevo intento de copia de seguridad después del periodo de espera. Este mecanismo permite anticipar ciertas circunstancias que pueden bloquear la copia de seguridad. Puede establecer un periodo de espera en segundos, minutos u horas utilizando el menú correspondiente. Si el nuevo intento también falla, se genera un error y se anota el fallo en el área de estado de la última copia de seguridad y en el archivo del diario de copias de seguridad. + - **Cancelar la operación después de X intentos**: este parámetro se utiliza para definir el número máximo de intentos de copia de seguridad fallidos. Si la copia de seguridad no se ha realizado con éxito una vez alcanzado el número máximo de intentos establecido, se cancela y se genera el error 1401 ("Se ha alcanzado el número máximo de intentos de copia de seguridad; la copia de seguridad automática está temporalmente desactivada"). En este caso, no se intentará realizar una nueva copia de seguridad automática mientras no se haya reiniciado la aplicación o se haya realizado con éxito una copia de seguridad manual. Este parámetro es útil para evitar un caso en el que un problema prolongado (que requiera la intervención humana) que impidiera la realización de una copia de seguridad hubiera llevado a la aplicación a intentar repetidamente la copia de seguridad en detrimento de su rendimiento general. Por defecto, este parámetro no está seleccionado. -- **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. +> 4D considers a backup as failed if the application was not launched at the time when the scheduled automatic backup was set to be carried out. -> 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. +### Archivo +Estas opciones se aplican a los archivos de copia de seguridad principales y a los archivos de copia de seguridad del historial. -### Archive +- **Tamaño del segmento (Mb)** 4D le permite segmentar los archivos, es decir, cortarlos en tamaños más pequeños. Este funcionamiento permite, por ejemplo, almacenar una copia de seguridad en varios discos diferentes (DVD, dispositivos usb, etc.). Durante la restauración, 4D fusionará automáticamente los segmentos. Cada segmento se llama MyApplication[xxxx-yyyy].4BK, donde xxxx es el número de copia de seguridad e yyyy es el número de segmento. Por ejemplo, los tres segmentos de la copia de seguridad de la base MyApplication se llaman MyApplication[0006-0001].4BK, MyApplication[0006-0002].4BK y MyApplication[0006-0003].4BK. El menú **Tamaño del segmento** es un combo box que permite establecer el tamaño en MB de cada segmento de la copia de seguridad. Puede elegir uno de los tamaños preestablecidos o introducir un tamaño específico entre 0 y 2048. Si se pasa 0, no se produce ninguna segmentación (esto equivale a pasar **Ninguna**). -These options apply to main backup files and to log backup files. +- **Tasa de compresión** Por defecto, 4D comprime las copias de seguridad para ayudar a ahorrar espacio en el disco. Sin embargo, la fase de compresión de archivos puede ralentizar notablemente las copias de seguridad cuando se trata de grandes volúmenes de datos. La opción **Tasa de compresión** permite ajustar la compresión de los archivos: + - **Ninguna:** no se aplica ninguna compresión de archivos. La copia de seguridad es más rápida, pero los archivos son considerablemente más grandes. + - **Rápido** (por defecto): esta opción es un compromiso entre la velocidad de la copia de seguridad y el tamaño del archivo. + - **Compactado**: la tasa de compresión máxima se aplica a los archivos. Los ficheros de archivos ocupan el menor espacio posible en el disco, pero la copia de seguridad se ralentiza notablemente. -- **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**). +- **Tasa de entrelazamiento y tasa de redundancia** 4D genera archivos mediante algoritmos específicos que se basan en mecanismos de optimización (entrelazamiento) y seguridad (redundancia). Puedes configurar estos mecanismos en función de sus necesidades. Los menús asociados a estas opciones contienen índices de **Bajo**, **Medio**, **Alto** y **Ninguno** (por defecto). + - **Tasa de entrelazamiento**: el entrelazamiento consiste en almacenar los datos en sectores no adyacentes para limitar los riesgos en caso de daño de los sectores. Cuanto mayor sea la tasa, mayor será la seguridad; sin embargo, el procesamiento de datos utilizará más memoria. + - **Tasa de redundancia**: la redundancia permite asegurar los datos presentes en un fichero repitiendo varias veces la misma información. Cuanto mayor sea la tasa de redundancia, mayor será la seguridad de los archivos; sin embargo, el almacenamiento será más lento y el tamaño de los archivos aumentará en consecuencia. -- **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. -- **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. +### Restauración automática -### Automatic Restore +- **Restaurar la última copia de seguridad si la base está dañada**: cuando se marca esta opción, el programa inicia automáticamente la restauración del archivo de datos de la última copia de seguridad válida de la aplicación, si se detecta una anomalía (archivo dañado, por ejemplo) durante el lanzamiento de la aplicación. No se requiere ninguna intervención por parte del usuario; sin embargo, la operación se registra en el diario de copias de seguridad. -- **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. +- **Integrar el último archivo de historial si la base está incompleta**: cuando se marca esta opción, el programa integra automáticamente el archivo de historial al abrir o restaurar la aplicación. + - Durante la apertura de una aplicación, el archivo de historial actual se integra automáticamente si 4D detecta que hay operaciones almacenadas en el archivo de historial que no están presentes en los datos. Esta situación se produce, por ejemplo, si se produce un corte de energía cuando hay operaciones en la caché de datos que aún no se han escrito en el disco. + - Al restaurar la aplicación, si el archivo de historial actual o un archivo de copia de seguridad del historial que tiene el mismo número que el archivo de copia de seguridad se almacena en la misma carpeta, 4D examina su contenido. Si contiene operaciones que no se encuentran en el archivo de datos, el programa las integra automáticamente. -- **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. +El usuario no ve ninguna caja de diálogo; la operación es completamente automática. El objetivo es facilitar al máximo su uso. La operación se registra en el diario de copias de seguridad. -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 +> En el caso de una restauración automática, sólo se restauran los siguientes elementos: - Archivo .4DD - archivo .4DIndx - Archivo .4DSyncData - Archivo .4DSyncHeader - Carpeta de datos externos +> +> If you wish to get the attached files or the project files, you must perform a [manual restore](restore.md#manually-restoring-a-backup-standard-dialog). diff --git a/website/translated_docs/es/Concepts/about.md b/website/translated_docs/es/Concepts/about.md index 81a47c85f9c787..1ec7bf3dfe5ebf 100644 --- a/website/translated_docs/es/Concepts/about.md +++ b/website/translated_docs/es/Concepts/about.md @@ -1,61 +1,62 @@ --- id: about -title: About the 4D Language +title: Acerca del lenguaje 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: +El lenguaje integrado de 4D, que consta de más de 1300 comandos, convierte a 4D en una poderosa herramienta de desarrollo para aplicaciones web, móvil o de escritorio. Puede utilizar el lenguaje 4D para muchas tareas diferentes, desde la realización de cálculos sencillos hasta la creación de complejas interfaces de usuario personalizadas. Por ejemplo, puede: -- 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. +- Acceder por programación a cualquiera de los editores de gestión de registros (ordenar por, buscar, etc.), +- Cree e imprima informes y etiquetas complejas con la información de la base, +- Comunicarse con otros dispositivos, +- Enviar correos electrónicos, +- Gestionar documentos y páginas web, +- Importación y exportación de datos entre las aplicaciones 4D y otras aplicaciones, +- Incorporar al lenguaje de programación 4D procedimientos escritos en otros lenguajes. -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. +La flexibilidad y el poder del lenguaje de programación 4D lo convierten en la herramienta ideal para todos los niveles de usuarios y desarrolladores para realizar una completa gama de tareas de gestión de la información. Los usuarios principiantes pueden realizar rápidamente los cálculos. Los usuarios experimentados sin experiencia en programación pueden personalizar sus aplicaciones. Los desarrolladores experimentados pueden utilizar este poderoso lenguaje de programación para añadir sofisticadas funciones y capacidades a sus aplicaciones, como la transferencia de archivos, las comunicaciones y la supervisión. Los desarrolladores con experiencia en programación en otros lenguajes pueden añadir sus propios comandos al lenguaje 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. +## ¿Qué es un lenguaje? -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. +El lenguaje de 4D no es muy diferente del lenguaje hablado que utilizamos a diario. Es una forma de comunicación utilizada para expresar ideas, informar y dar instrucciones. Como un lenguaje hablado, 4D tiene su propio vocabulario, gramática y sintaxis; usted lo utiliza para decirle a 4D cómo manejar su aplicación y sus datos. -## Why use a Language? +No es necesario conocer todo el lenguaje para trabajar eficazmente con 4D. Para hablar, no es necesario conocer todo el idioma inglés; de hecho, se puede tener un vocabulario reducido y seguir siendo bastante elocuente. El lenguaje 4D es muy parecido: sólo se necesita conocer una pequeña parte del lenguaje para ser productivo, y se puede aprender el resto a medida que surja la necesidad. -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 qué utilizar un lenguaje? -Then why do we need a 4D language? Here are some of its uses: +Al principio puede parecer que no es necesario un lenguaje de programación en 4D. En el entorno Diseño, 4D ofrece herramientas flexibles que no requieren programación para realizar una gran variedad de tareas de gestión de datos. Las operaciones fundamentales, como la entrada de datos, las búsquedas, la clasificación y los informes, se realizan con facilidad. De hecho, hay muchas funciones adicionales disponibles, como la validación de datos, las ayudas para la introducción de datos, los gráficos y la generación 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. +Entonces, ¿por qué necesitamos un lenguaje 4D? Estos son algunos de sus 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 las tareas repetitivas: por ejemplo, la modificación de datos, la generación de informes complejos y la realización desatendida de largas series de operaciones. +- Controla la interfaz de usuario: puede gestionar las ventanas y los menús, y controlar los formularios y los objetos de la interfaz. +- Realizar una gestión de datos sofisticada: estas tareas incluyen el procesamiento de transacciones, la validación de datos complejos, la gestión multiusuario, los conjuntos y las operaciones de selección temporales. +- Controlar el ordenador: puede controlar las comunicaciones del puerto serie, la gestión de documentos y la gestión de errores. +- Crear aplicaciones: puede crear aplicaciones fáciles de usar y personalizadas que se ejecutan de forma autónoma. +- Añadir funcionalidades al servidor web 4D integrado: construir y actualizar páginas web dinámicas llenas de sus datos. -## Taking Control of Your Data +El lenguaje le permite tener un control total sobre el diseño y el funcionamiento de su aplicación. 4D ofrece poderosos editores "genéricos", pero el lenguaje le permite personalizar su aplicación al grado que requiera. -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 el control de sus datos -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. +El lenguaje 4D le permite tomar el control total de sus datos de una manera poderosa y elegante. El lenguaje es lo suficientemente fácil para un principiante y lo suficientemente sofisticado para un desarrollador de aplicaciones experimentado. Ofrece transiciones suaves desde las funciones de la base de datos integrada hasta una aplicación completamente personalizada. -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. +Los comandos del lenguaje 4D permiten acceder a los editores estándar de gestión de registros. Por ejemplo, cuando se utiliza el comando `QUERY`, se presenta el Editor de búsquedas (al que se puede acceder en el modo Diseño utilizando el comando Query del menú Registros. Puede indicar al comando que busque los datos descritos explícitamente. Por ejemplo, `QUERY([People];[People]Last Name="Smith")` encontrará todas las personas de apellido Smith en su base. -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. +El lenguaje 4D es muy poderoso: un solo comando sustituye a menudo cientos o incluso miles de líneas de código escritas en los lenguajes informáticos tradicionales. Sorprendentemente, este poder viene acompañado de la simplicidad: los comandos tienen nombres en inglés. Por ejemplo, para realizar una búsqueda, se utiliza el comando `QUERY`; para añadir un nuevo registro, se utiliza el 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. +El lenguaje está diseñado para que pueda realizar fácilmente casi cualquier tarea. Añadir un registro, ordenar los registros, buscar datos y operaciones similares son definidas con comandos simples y directos. Pero el lenguaje también puede controlar los puertos serie, leer documentos en el disco, controlar el procesamiento de transacciones complejas y mucho más. -## Is it a “Traditional†Computer Language? +El lenguaje 4D realiza incluso las tareas más sofisticadas con relativa sencillez. Realizar estas tareas sin utilizar el lenguaje sería inimaginable para muchos. Incluso con los poderosos comandos del lenguaje, algunas tareas pueden ser complejas y difíciles. Una herramienta por sí misma no hace posible una tarea; la propia tarea puede ser un reto y la herramienta sólo puede facilitar el proceso. Por ejemplo, un procesador de textos hace que escribir un libro sea más rápido y fácil, pero no escribirá el libro por usted. El uso del lenguaje 4D facilitará el proceso de gestión de sus datos y le permitirá abordar tareas complicadas con confianza. -If you are familiar with traditional computer languages, this section may be of interest. If not, you may want to skip it. +## ¿Es un lenguaje informático "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. +Si está familiarizado con los lenguajes informáticos tradicionales, esta sección puede ser de interés. Si no es así, es mejor que pase al siguiente párrafo. -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. +El lenguaje 4D no es un lenguaje informático tradicional. Es uno de los lenguajes más innovadores y flexibles que existen actualmente en un ordenador. Está diseñado para adaptarse a usted, y no al revés. -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 utilizar los lenguajes tradicionales, hay que hacer una amplia preparación. De hecho, la planificación es uno de los principales pasos del desarrollo. 4D le permite empezar a utilizar el lenguaje en cualquier momento y en cualquier parte de su proyecto. Puede comenzar añadiendo un método a un formulario, y más tarde añadir algunos métodos más. A medida que su aplicación se vuelve más sofisticada, podría añadir un método proyecto controlado por un menú. Puede utilizar el lenguaje tan poco o tanto como quiera. No es un "todo o nada", como ocurre con muchas otras bases de datos. -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 +Los lenguajes tradicionales obligan a definir y pre-declarar objetos de interfaz en términos sintácticos formales. En 4D, usted simplemente crea un objeto, como un botón, y lo utiliza. 4D gestiona automáticamente el objeto por usted. Por ejemplo, para utilizar un botón, lo dibuja en un formulario y le da un nombre. Cuando el usuario hace clic en el botón, el lenguaje notifica automáticamente sus métodos. + +Los lenguajes tradicionales suelen ser rígidos e inflexibles y exigen que los comandos se introduzcan con un estilo muy formal y restrictivo. El lenguaje 4D rompe con la tradición, y los beneficios son para usted. \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/arrays.md b/website/translated_docs/es/Concepts/arrays.md index a88ee3e740013e..36fce1f2a131d6 100644 --- a/website/translated_docs/es/Concepts/arrays.md +++ b/website/translated_docs/es/Concepts/arrays.md @@ -3,35 +3,34 @@ 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. +Un **array** es una serie ordenada de **variables** del mismo tipo. Cada variable se llama un **elemento** del array. Un array recibe su tamaño cuando se crea; luego se puede redimensionar tantas veces como sea necesario añadiendo, insertando o eliminando elementos, o redimensionando el array utilizando el mismo comando utilizado para crearlo. Los elementos del array se numeran de 1 a N, siendo N el tamaño del array. Un array siempre tiene un [elemento cero](#using-the-element-zero-of-an-array) especial. Los arrays son variables 4D. Como toda variable, un array tiene un alcance y sigue las reglas del lenguaje 4D, aunque con algunas diferencias únicas. -> 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. +> En la mayoría de los casos, se recomienda utilizar **colecciones** en lugar de **arrays**. Las colecciones son más flexibles y ofrecen una amplia gama de métodos dedicados. Para más información, consulte la sección [Colección](Concepts/dt_collection.md). -## Creating 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. +## Crear arrays -The following line of code creates (declares) an Integer array of 10 elements: +Se crea un array con uno de los comandos de declaración del tema "Arrays". Cada comando de declaración de arrays puede crear o redimensionar arrays unidimensionales o bidimensionales. Para más información sobre los arrays bidimensionales, consulte la sección [arrays bidimensionales](#two-dimensional-arrays). + +La siguiente línea de código crea (declara) un array de enteros de 10 elementos: ```4d ARRAY INTEGER(aiAnArray;10) ``` -Then, the following code resizes that same array to 20 elements: - +A continuación, el siguiente código redimensiona ese mismo array a 20 elementos: ```4d ARRAY INTEGER(aiAnArray;20) ``` -Then, the following code resizes that same array to no elements: - +A continuación, el siguiente código redimensiona ese mismo array a 0 elementos: ```4d ARRAY INTEGER(aiAnArray;0) ``` -## Assigning values in arrays +## Asignar valores en 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: +Para referirse a los elementos de un array se utilizan llaves ({...}). Dentro de las llaves se utiliza un número para dirigirse a un elemento concreto; este número se denomina número de elemento. Las siguientes líneas ponen cinco nombres en el array llamado atNames y luego los muestran en ventanas de alerta: ```4d ARRAY TEXT(atNames;5) @@ -44,80 +43,81 @@ 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 ``` +Tenga en cuenta la sintaxis atNames{$vlElem}. En lugar de especificar un literal numérico como atNames{3}, puede utilizar una variable numérica para indicar a qué elemento de un array se dirige. Utilizando la iteración que ofrece una estructura de bucle ( `For...End for`, `Repeat...Until` o `While...End while`), las piezas compactas de código pueden dirigirse a todos o a parte de los elementos de un 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:** tenga cuidado de no confundir el operador de asignación (:=) con el operador de comparación, igual (=). La asignación y la comparación son operaciones muy 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 +### Asignación de un array a otro array +A diferencia de las variables de tipo texto o cadena, no se puede asignar un array a otro. Para copiar (asignar) un array a otro, utilice `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 +## Utilizar el elemento cero de un 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. +Un array siempre tiene un elemento cero. Aunque el elemento cero no se muestra cuando un array soporta un objeto de formulario, no hay ninguna restricción(*) para utilizarlo en el lenguaje. -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: +He aquí otro ejemplo: quiere inicializar un objeto de formulario con un valor texto pero sin definir un valor por defecto. Puede utilizar el elemento cero del array: ```4d - // method for a combo box or drop-down list - // bound to atName variable array + // método para un combo box o una lista desplegable + // vinculado al array de variables atName Case of :(Form event code=On Load) - // Initialize the array (as shown further above) - // But use the element zero + // Inicializar el array (como se muestra más arriba) + // Pero utiliza el elemento cero ARRAY TEXT(atName;5) - atName{0}:=Please select an item" - atName{1}:="Text1" - atName{2}:="Text2" - atName{3}:="Text3" - atName{4}:="Text4" - atName{5}:="Text5" - // Position the array to element 0 + atName{0}:=Seleccione un elemento" + atName{1}:="Texto1" + atName{2}:="Texto2" + atName{3}:="Texto3" + atName{4}:="Texto4" + atName{5}:="Texto5" + // Posicionar el array en el 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. +(*) Sin embargo, hay una excepción: en un array tipo List Box, el elemento cero se utiliza internamente para almacenar el valor anterior de un elemento que se está editando, por lo que no es posible utilizarlo en este contexto particular. -## Two-dimensional Arrays -Each of the array declaration commands can create or resize one-dimensional or two-dimensional arrays. Example: +## Arrays de dos dimensiones + +Cada comando de declaración de arrays puede crear o redimensionar arrays unidimensionales o bidimensionales. Ejemplo: ```4d -

    ARRAY TEXT(atTopics;100;50) // Creates a text array composed of 100 rows of 50 columns + ARRAY TEXT(atTopics;100;50) // Crear un array texto compuesto por 100 líneas de 50 columnas ``` -Two-dimensional arrays are essentially language objects; you can neither display nor print them. +Los arrays de dos dimensiones son esencialmente objetos de lenguaje; no se pueden mostrar ni imprimir. -In the previous example: +En el ejemplo 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 es una array de dos dimensiones +- atTopics{8}{5} es el 5º elemento (5ª columna...) de la 8ª fila +- atTopics{20} es la vigésima fila y es a su vez un array de una dimensión +- `Tamaño del array(atTopics)` devuelve 100, que es el número de filas +- `Tamaño de array(atTopics{17})` devuelve 50, que es el número de columnas de la línea 17 -In the following example, a pointer to each field of each table in the database is stored in a two-dimensional array: +En el siguiente ejemplo, un puntero a cada campo de cada tabla de la base se almacena en un array de dos dimensiones: ```4d C_LONGINT($vlLastTable;$vlLastField) C_LONGINT($vlFieldNumber) - // Create as many rows (empty and without columns) as there are tables + // Crear tantas líneas (vacías y sin columnas) como tablas haya $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 con X líneas y cero columnas + // Para cada tabla For($vlTable;1;$vlLastTable) If(Is table number valid($vlTable)) - $vlLastField:=Get last field number($vlTable) - // Give value of elements + $vlLastField:=Obtener el número del último campo($vlTable) + // Dar valor a los 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 + //Inserta una columna en una línea de la tabla en curso INSERT IN ARRAY(<>apFields{$vlTable};$vlColumnNumber;1) - //Assign the "cell" with the pointer + //Asignar la "celda" con el puntero <>apFields{$vlTable}{$vlColumnNumber}:=Field($vlTable;$vlField) End if End for @@ -125,12 +125,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: +Siempre que se haya inicializado este array de dos dimensiones, se pueden obtener los punteros a los campos de una tabla concreta de la siguiente manera: ```4d - // Get the pointers to the fields for the table currently displayed at the screen: + // Obtener los punteros a los campos para la tabla que se muestra actualmente en la pantalla: COPY ARRAY(â—ŠapFields{Table(Current form table)};$apTheFieldsIamWorkingOn) - // Initialize Boolean and Date fields + // Inicializar los campos booleanos y de fecha For($vlElem;1;Size of array($apTheFieldsIamWorkingOn)) Case of :(Type($apTheFieldsIamWorkingOn{$vlElem}->)=Is date) @@ -141,41 +141,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 sugiere este ejemplo, las líneas de un array de dos dimensiones pueden tener el mismo tamaño o diferentes tamaños. -Unlike the data you store on disk using tables and records, an array is always held in memory in its entirety. +## Arrays y memoria -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 diferencia de los datos que se almacenan en el disco mediante tablas y registros, un array se mantiene siempre en memoria en su totalidad. -Doing the same thing with arrays would be prohibitive for the following reasons: +Por ejemplo, si se introdujeran todos los códigos postales de EE. UU. en la tabla [Zip Codes], ésta contendría unos 100.000 registros. Además, esa tabla incluiría varios campos: el propio código postal y la ciudad, el condado y el estado correspondientes. Si selecciona sólo los códigos postales de California, el motor de la base 4D crea la correspondiente selección de registros dentro de la tabla [Zip Codes], y luego carga los registros sólo cuando se necesitan (es decir, cuando se visualizan o imprimen). En palabras de orden, se trabaja con una serie ordenada de valores (del mismo tipo para cada campo) que se carga parcialmente desde el disco a la memoria por el motor de la base 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. +Hacer lo mismo con arrays sería prohibido por las siguientes razones: -**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 mantener los cuatro tipos de información (código postal, ciudad, condado, estado), habría que mantener cuatro grandes arrays en memoria. +- Como un array se mantiene siempre en memoria en su totalidad, habría que mantener toda la información de los códigos postales en memoria durante toda la sesión de trabajo, aunque los datos no estén siempre en uso. +- De nuevo, dado que un array se mantiene siempre en memoria en su totalidad, cada vez que se inicia la aplicación y se sale de ella, los cuatro arrays tendrían que cargarse y luego guardarse en el disco, aunque los datos no se utilicen ni se modifiquen durante la sesión de trabajo. -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: +**Conclusión:** los arrays están pensados para mantener cantidades razonables de datos durante un corto periodo de tiempo. Por otro lado, como los arrays se mantienen en memoria, son fáciles de manejar y 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 | +Sin embargo, en algunas circunstancias, puede ser necesario trabajar con arrays que contengan cientos o miles de elementos. La siguiente tabla muestra las fórmulas utilizadas para calcular la cantidad de memoria utilizada para cada tipo de array: +| Tipo de array | Fórmula para determinar el uso de la memoria en bytes | +| --------------- | ------------------------------------------------------------------------ | +| Blob | (1+número de elementos) * 12 + Suma del tamaño de cada blob | +| Booleano | (31+número de elementos)\N8 | +| Fecha | (1+número de elementos) * 6 | +| Entero | (1+número de elementos) * 2 | +| Entero largo | (1+número de elementos) * 4 | +| Objeto | (1+número de elementos) * 8 + Suma del tamaño de cada objeto | +| Imagen | (1+número de elementos) * 8 + Suma del tamaño de cada imagen | +| Puntero | (1+número de elementos) * 8 + Suma del tamaño de cada puntero | +| Real | (1+número de elementos) * 8 | +| Texto | (1+número de elementos) * 20 + (suma de la longitud de cada texto) * 2 | +| Hora | (1+número de elementos) * 4 | +| Dos dimensiones | (1+número de elementos) * 16 + Suma del tamaño 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 +- El tamaño de un texto en memoria se calcula con esta fórmula ((Longitud + 1) * 2) +- Se requieren algunos bytes adicionales para llevar la cuenta del elemento seleccionado, el número de elementos y el propio array. \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/cf_branching.md b/website/translated_docs/es/Concepts/cf_branching.md index 5a0a37baa7cda4..84fa832e6abd7a 100644 --- a/website/translated_docs/es/Concepts/cf_branching.md +++ b/website/translated_docs/es/Concepts/cf_branching.md @@ -1,11 +1,14 @@ --- id: branching -title: Branching structures +title: Estructuras condicionales --- +Una estructura de ramificación permite que los métodos prueben una condición y tomen caminos alternativos, en función del resultado. + + ## If...Else...End if -The formal syntax of the `If...Else...End if` control flow structure is: +La sintaxis de la estructura condicional `If...Else...End if` es: ```4d If(Boolean_Expression) @@ -15,17 +18,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: - +Tenga en cuenta que la parte `Else` es opcional; puede escribir: ```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`. +La estructura `If...Else...End if` permite a su método elegir entre dos acciones, dependiendo de si una prueba (una expresión booleana) es TRUE o FALSE. Cuando la expresión booleana es TRUE, se ejecutan las sentencias que siguen inmediatamente a la prueba. Si la expresión booleana es FALSE, se ejecutan las instrucciones que siguen a la línea Else. El `Else` es opcional; si se omite Else, la ejecución continúa con la primera instrucción (si la hay) que sigue al `End if`. -Note that the Boolean expression is always fully evaluated. Consider in particular the following test: +Tenga en cuenta que la expresión booleana siempre se evalúa completamente. Considere en particular la siguiente prueba: ```4d If(MethodA & MethodB) @@ -33,7 +35,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: +la expresión es TRUE sólo si ambos métodos son TRUE. Sin embargo, incluso si _MethodA_ devuelve FALSE, 4D seguirá evaluando _MethodB_, lo que supone una pérdida de tiempo inútil. En este caso, es más interesante utilizar una estructura como: ```4d If(MethodA) @@ -43,21 +45,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. +El resultado es similar y _MethodB_ se evalúa sólo si es necesario. -### Example +### Ejemplo ```4d - // Ask the user to enter a name + // Pedir al usuario que introduzca un nombre $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("No ha introducido un nombre.") 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: +**Consejo:** la ramificación puede realizarse sin que las instrucciones se ejecuten en un caso u otro. Al desarrollar un algoritmo o una aplicación especializada, nada le impide escribir: ```4d If(Boolean_Expression) @@ -65,8 +67,7 @@ The result is similar and *MethodB* is evaluated only if necessary. statement(s) End if ``` - -or: +o: ```4d If(Boolean_Expression) @@ -77,8 +78,7 @@ or: ## Case of...Else...End case -The formal syntax of the `Case of...Else...End case` control flow structure is: - +La sintaxis de la estructura condicional `Case of...Else...End case` es: ```4d Case of :(Boolean_Expression) @@ -96,8 +96,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: - +Tenga en cuenta que la parte `Else` es opcional; puede escribir: ```4d Case of :(Boolean_Expression) @@ -112,82 +111,80 @@ Note that the `Else` part is optional; you can write: statement(s) End case ``` +Al igual que la estructura `If...Else...End if`, la estructura `Case of...Else...End case` también permite a su método elegir entre acciones alternativas. A diferencia de la estructura `If...Else...End`, la estructura `Case of...Else...End case` puede probar un número razonablemente ilimitado de expresiones booleanas y realizar una acción dependiendo de cuál sea 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 expresión booleana va precedida de dos puntos (`:`). Esta combinación de los dos puntos y la expresión booleana se llama un caso. Por ejemplo, la siguiente línea es un 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ólo se ejecutarán las instrucciones que sigan al primer caso TRUE (y hasta el siguiente). Si ninguno de los casos es TRUE, no se ejecutará ninguna de las instrucciones (si no se incluye la parte `Else`). -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. +Puede incluir una instrucción Else después del último caso. Si todos los casos son FALSE, se ejecutarán las instrucciones siguientes al `Else`. -### Example +### Ejemplo -This example tests a numeric variable and displays an alert box with a word in it: +Este ejemplo comprueba una variable numérica y muestra un cuadro de alerta con una palabra: ```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) //Probar si el número es 1 + ALERT("One.") //Si es 1, mostrar una alerta + :(vResult=2) //Probar si el número es 2 + ALERT("Two.") //Si es 2, mostrar una alerta + :(vResult=3) //Probar si el número es 3 + ALERT("Three.") //Si es 3, mostrar una alerta + Else //Si no es 1, 2 o 3, mostrar una 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: +Para comparar, aquí está la versión `If...Else...End if` del mismo método: ```4d - If(vResult=1) //Test if the number is 1 - ALERT("One.") //If it is 1, display an alert + If(vResult=1) //Probar si el número es 1 + ALERT("One.") //Si es 1, mostrar una alerta Else - If(vResult=2) //Test if the number is 2 - ALERT("Two.") //If it is 2, display an alert + If(vResult=2) //Probar si el número es 2 + ALERT("Two.") //Si es 2, mostrar una 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 - ALERT("It was not one, two, or three.") + If(vResult=3) //Probar si el número es 3 + ALERT("Three.") //Si es 3, mostrar una alerta + Else //Si no es 1, 2 o 3, mostrar una 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. +Recuerde que con una estructura `Case of...Else...End case`, sólo se ejecuta el primer caso TRUE. Aunque dos o más casos sean TRUE, sólo se ejecutarán las instrucciones que siguen al primer caso TRUE. -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: +En consecuencia, cuando quiera implementar pruebas jerárquicas, debe asegurarse de que las declaraciones de condición que están más abajo en el esquema jerárquico aparezcan primero en la secuencia de pruebas. Por ejemplo, si se quiere procesar el caso simple (vResult=1) y el caso complejo (vResult=1) & (vCondition#2) y se estructura el método de la siguiente manera: Por ejemplo, el siguiente código nunca verá detectada su última condición: ```4d Case of :(vResult=1) ... //statement(s) - :((vResult=1) & (vCondition#2)) //this case will never be detected + :((vResult=1) & (vCondition#2)) //este caso nunca será detectado ... //statement(s) 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: +En el código anterior, la presencia de la segunda condición no se detecta, ya que la prueba "vResult=1" ramifica el código antes de cualquier otra prueba. Para que el código funcione correctamente, puedes escribirlo así: ```4d Case of - :((vResult=1) & (vCondition#2)) //this case will be detected first + :((vResult=1) & (vCondition#2)) //este caso será detectado primero ... //statement(s) :(vResult=1) ... //statement(s) End case ``` -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: +Además, si quiere implementar pruebas jerárquicas, puede considerar el uso de código jerárquico. +**Consejo:** la ramificación puede realizarse sin que las instrucciones se ejecuten en un caso u otro. Al desarrollar un algoritmo o una aplicación especializada, nada le impide escribir: ```4d Case of :(Boolean_Expression) @@ -201,8 +198,7 @@ Also, if you want to implement hierarchical testing, you may consider using hier End case ``` -or: - +o: ```4d Case of :(Boolean_Expression) @@ -216,11 +212,10 @@ or: End case ``` -or: - +o: ```4d Case of Else statement(s) End case -``` \ No newline at end of file +``` diff --git a/website/translated_docs/es/Concepts/cf_looping.md b/website/translated_docs/es/Concepts/cf_looping.md index e2b96c050d06d4..1de587402ef7f2 100644 --- a/website/translated_docs/es/Concepts/cf_looping.md +++ b/website/translated_docs/es/Concepts/cf_looping.md @@ -1,60 +1,58 @@ --- id: looping -title: Looping structures +title: Estructuras repetitivas (bucles) --- -## While...End while +Las estructuras en bucle repiten una secuencia de instrucciones hasta que se cumple una condición o se alcanza un número de veces. + -The formal syntax of the `While...End while` control flow structure is: +## While...End while +La sintaxis de la estructura condicional `While...End while` es: ```4d While(Boolean_Expression) statement(s) End while ``` +Un bucle `While...End while` ejecuta las instrucciones dentro del bucle mientras la expresión booleana sea TRUE. Comprueba la expresión booleana al inicio del bucle y no entra en el bucle si la expresión es 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: +Es común inicializar el valor probado en la expresión booleana inmediatamente antes de entrar en el bucle `While...End while`. Inicializar el valor significa asignarle un contenido adecuado, normalmente para que la expresión booleana sea TRUE y `While...End while` ejecute el bucle. +El valor de la expresión booleana debe poder ser modificado por un elemento dentro del bucle, de lo contrario se ejecutará indefinidamente. El siguiente bucle continúa para siempre porque _NeverStop_ es siempre 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. +Si se encuentra en una situación de este tipo, en la que un método se ejecuta de forma incontrolada, puede utilizar las funciones de rastreo para detener el bucle y localizar el problema. Para más información sobre el seguimiento de un método, consulte la página [Gestión de errores](error-handling.md). -### Example +### Ejemplo ```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("¿Añadir un nuevo registro?") //¿El usuario quiere añadir un registro? + While(OK=1) //Bucle mientras el usuario quiera + ADD RECORD([aTable]) /Añadir un nuevo registro + End while //El bucle siempre termina con 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. +En este ejemplo, el valor de la variable sistema `OK` es definido por el comando `CONFIRM` antes de que se inicie el bucle. Si el usuario hace clic en el botón **OK** de la caja de diálogo de confirmación, la variable del sistema `OK` toma el valor 1 y se inicia el bucle. En caso contrario, la variable del sistema `OK` toma el valor 0 y se omite el bucle. Una vez se inicia el bucle, el comando `ADD RECORD` permite continuar la ejecución del bucle porque se define la variable sistema `OK` en 1 cuando el usuario guarda el registro. Cuando el usuario cancela (no guarda) el último registro, la variable del sistema `OK` toma el valor 0 y el bucle se detiene. ## Repeat...Until -The formal syntax of the `Repeat...Until` control flow structure is: - +La sintaxis de la estructura condicional `Repeat...Until` es: ```4d Repeat statement(s) Until(Boolean_Expression) ``` +Un bucle `Repeat...Until` es similar a un bucle [While...End while](flow-control#whileend-while), excepto que comprueba la expresión booleana después del bucle en lugar de antes. Así, un bucle `Repeat...Until` siempre ejecuta el bucle una vez, mientras que si la expresión booleana es inicialmente False, un bucle `While...End while` no ejecuta el bucle en absoluto. -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. +La otra diferencia con un bucle `Repeat...Until` es que el bucle continúa hasta que la expresión booleana sea TRUE. -### Example +### Ejemplo -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. +Compara el siguiente ejemplo con el ejemplo del bucle `While...End while`. Tenga en cuenta que la expresión booleana no necesita ser inicializada-no hay un comando `CONFIRM` para inicializar la variable `OK`. ```4d Repeat @@ -64,7 +62,7 @@ Compare the following example with the example for the `While...End while` loop. ## For...End for -The formal syntax of the `For...End for` control flow structure is: +La sintaxis de la estructura condicional `For...End for` es: ```4d For(Counter_Variable;Start_Expression;End_Expression{;Increment_Expression}) @@ -72,189 +70,186 @@ 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: +El bucle `For...End for` es un bucle controlado por un 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. +- La variable contador *Counter_Variable* es una variable numérica (Real o Entero largo) inicializada por `For...End for` con el valor especificado por *Start_Expression*. +- Cada vez que se ejecuta el bucle, la variable del contador se incrementa en el valor especificado en el valor opcional *Increment_Expression*. Si no se especifica *Increment_Expression*, la variable del contador se incrementa en uno (1), que es el valor predeterminado. +- Cuando la variable del contador pasa el valor *End_Expression*, el bucle se detiene. -**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:** las expresiones numéricas *Start_Expression*, *End_Expression* y *Increment_Expression* se evalúan una vez al principio del bucle. Si estas expresiones son variables, el cambio de una de estas variables dentro del bucle no afectará al bucle. -**Tip:** However, for special purposes, you can change the value of the counter variable *Counter_Variable* within the loop; this will affect the loop. +**Consejo:** Sin embargo, para fines especiales, puede cambiar el valor de la variable *Counter_Variable* dentro del bucle; esto afectará al bucle. -- 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. +- Normalmente *Start_Expression* es menor que *End_Expression*. +- Si *Start_Expression* y *End_Expression* son iguales, el bucle se ejecutará sólo una vez. +- Si *Start_Expression* es mayor que *End_Expression*, el bucle no se ejecutará en absoluto a menos que se especifique una *Increment_Expression* negativa. Ver los ejemplos. -### Basic examples +### Ejemplos básicos -1. The following example executes 100 iterations: +1. El siguiente ejemplo ejecuta 100 iteraciones: ```4d For(vCounter;1;100) - //Do something + //Hacer algo End for ``` -2. The following example goes through all elements of the array anArray: +2. El siguiente ejemplo recorre todos los elementos del array anArray: ```4d For($vlElem;1;Size of array(anArray)) - //Do something with the element + //Hacer algo con el elemento anArray{$vlElem}:=... End for ``` -3. The following example goes through all the characters of the text vtSomeText: +3. El siguiente ejemplo recorre todos los caracteres del texto vtSomeText: ```4d For($vlChar;1;Length(vtSomeText)) - //Do something with the character if it is a TAB + //Hacer algo con el carácter si es un 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. El siguiente ejemplo recorre los registros seleccionados para la tabla [aTable]: ```4d FIRST RECORD([aTable]) For($vlRecord;1;Records in selection([aTable])) - //Do something with the record + //Hacer algo con el registro SEND RECORD([aTable]) //... - //Go to the next record + //Ir al siguiente 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. +La mayoría de los bucles `For...End for` que escribirá en sus proyectos se parecerán a los que se presentan en estos ejemplos. -### Decrementing variable counter +### Disminuir la variable 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: +En algunos casos, puede querer tener un bucle cuya variable de contador sea decreciente en lugar de creciente. Para ello, debe especificar *Start_Expression* mayor que *End_Expression* y *Increment_Expression* debe ser negativa. Los siguientes ejemplos hacen lo mismo que los anteriores, pero en orden inverso: -5. The following example executes 100 iterations: +5. El siguiente ejemplo ejecuta 100 iteraciones: ```4d For(vCounter;100;1;-1) - //Do something + //Hacer algo End for ``` -6. The following example goes through all elements of the array anArray: +6. El siguiente ejemplo recorre todos los elementos del array anArray: ```4d For($vlElem;Size of array(anArray);1;-1) - //Do something with the element + //Hacer algo con el elemento anArray{$vlElem}:=... End for ``` -7. The following example goes through all the characters of the text vtSomeText: +7. El siguiente ejemplo recorre todos los caracteres del texto vtSomeText: ```4d For($vlChar;Length(vtSomeText);1;-1) - //Do something with the character if it is a TAB + //Hacer algo con el carácter si es un 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. El siguiente ejemplo recorre los registros seleccionados para la tabla [aTable]: ```4d LAST RECORD([aTable]) - For($vlRecord;Records in selection([aTable]);1;-1) - //Do something with the record + For($vlRecord;1;Records in selection([aTable])) + //Hacer algo con el registro SEND RECORD([aTable]) //... - //Go to the previous record + //Ir al registro anterior PREVIOUS RECORD([aTable]) End for ``` -### Incrementing the counter variable by more than one +### Incrementar la variable del contador en más de uno -If you need to, you can use an *Increment_Expression* (positive or negative) whose absolute value is greater than one. +Si lo requiere, puede utilizar una *Increment_Expression* (positiva o negativa) cuyo valor absoluto sea mayor que uno. -9. The following loop addresses only the even elements of the array anArray: +9. El siguiente bucle aborda sólo los elementos pares del array anArray: ```4d For($vlElem;2;Size of array(anArray);2) - //Do something with the element #2,#4...#2n + //Hacer algo con el 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: +### Comparación de estructuras de bucle +Volvamos al primer ejemplo de `For...End for`. El siguiente ejemplo ejecuta 100 iteraciones: ```4d For(vCounter;1;100) - //Do something + //Hacer 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: - +Es interesante ver cómo el bucle `While...End while` y el bucle `Repeat...Until` realizarían la misma acción. Aquí está el bucle 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 //Inicializar el contador + While($i<=100) //Bucle 100 veces + //Hacer algo + $i:=$i+1 //Necesita incrementar el contador End while ``` -Here is the equivalent `Repeat...Until` loop: - +Aquí está el bucle equivalente `Repeat...Until`: ```4d - $i:=1 //Initialize the counter + $i:=1 //Inicializar el contador Repeat - //Do something - $i:=$i+1 //Need to increment the counter - Until($i=100) //Loop 100 times + //Hacer algo + $i:=$i+1 //Necesita incrementar el contador + Until($i=100) //Bucle 100 veces ``` +**Consejo:** el bucle `For...End for` suele ser más rápido que los bucles `While...End while` y `Repeat...Until`, porque 4D comprueba la condición internamente en cada ciclo del bucle e incrementa el contador. Por lo tanto, utilice el bucle `For...End for` siempre que sea posible. -**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 +### Optimizar la ejecución de los bucles 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. +Puede utilizar variables reales y enteras, así como contadores interproceso, de proceso y de variables locales. Para bucles repetitivos largos, especialmente en modo compilado, utilice variables locales de tipo Entero largo. -10. Here is an example: +10. Aquí un ejemplo: ```4d - C_LONGINT($vlCounter) //use local Long Integer variables + C_LONGINT($vlCounter) //Utilización de variables locales de tipo Entero largo For($vlCounter;1;10000) - //Do something + //Hacer algo End for ``` -### Nested For...End for looping structures +### Estructuras For... End anidadas -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. +Puede anidar tantas estructuras de control como necesite (razonablemente). Esto incluye la anidación de bucles `For...End for`. Para evitar errores, asegúrese de utilizar diferentes variables de contador para cada estructura de bucle. -Here are two examples: +He aquí dos ejemplos: -11. The following example goes through all the elements of a two-dimensional array: +11. El siguiente ejemplo recorre todos los elementos de un array de dos dimensiones: ```4d For($vlElem;1;Size of array(anArray)) //... - //Do something with the row + //Hacer algo con la línea //... For($vlSubElem;1;Size of array(anArray{$vlElem})) - //Do something with the element + //Hacer algo con el 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. El siguiente ejemplo construye un array de punteros a todos los campos de fecha presentes en la base: ```4d ARRAY POINTER($apDateFields;0) @@ -277,53 +272,51 @@ Here are two examples: ## For each...End for each -The formal syntax of the `For each...End for each` control flow structure is: +La sintaxis de la estructura condicional `For each...End for each` es: ```4d For each(Current_Item;Expression{;begin{;end}}){Until|While}(Boolean_Expression)} - statement(s) + instrucción(es) 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`: +La estructura `For each...End for each` ejecuta un *Current_item* especificado sobre todos los valores de *Expression*. El tipo *Current_item* depende del tipo *Expression*. El bucle `For each...End for each` puede iterar a través de tres tipos de *Expression*: -| | 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 | +- colecciones: bucle en cada elemento de la colección, +- selecciones de entidades: bucle en cada entidad, +- objetos: bucle en cada propiedad del objeto. +La siguiente tabla compara los tres 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. +| | Bucle en las colecciones | Bucle en las selecciones de entidades | Bucle en los objetos | +| --------------------------------- | --------------------------------------------------------- | ------------------------------------- | -------------------------------- | +| Tipo Current_Item | Variable del mismo tipo que los elementos de la colección | Entity | Variable texto | +| Tipos de expresiones | Colección (con elementos del mismo tipo) | Entity selection | Objeto | +| Número de bucles (por defecto) | Número de elementos de la colección | Número de entidades en la selección | Número de propiedades del objeto | +| Soporte de parámetros begin / end | Sí | Sí | No | -### Loop through collections +- El número de bucles se evalúa al inicio y no cambiará durante el proceso. La adición o eliminación de elementos durante el bucle no suele ser recomendable, ya que puede resultar en redundancia o perdidas de iteraciones. +- Por defecto, la(s) _instrucciónes_ adjuntas se ejecutan para cada valor de *Expresión*. Sin embargo, es posible salir del bucle comprobando una condición al principio del bucle ( `While`) o al final del bucle (`Until`). +- Los parámetros opcionales *begin* y *end* pueden utilizarse con colecciones y selecciones de entidades para definir los límites del bucle. +- El bucle `For each...End for each` puede utilizarse en una **colección compartida** o en un **objeto compartido**. Si su código necesita modificar uno o más elementos de la colección o de las propiedades del objeto, debe utilizar las palabras clave `Use...End use`. Dependiendo de sus necesidades, puede llamar a las palabras clave `Use...End use`: + - antes de entrar en el bucle, si los elementos deben modificarse juntos por razones de integridad, o + - dentro del bucle cuando sólo hay que modificar algunos elementos/propiedades y no es necesario gestionar la integridad. -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. +### Bucle en las colecciones -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. +Cuando `For each...End for each` se utiliza con una _Expression_ del tipo _Collection_, el parámetro _Current_Item_ es una variable del mismo tipo que los elementos de la colección. Por defecto, el número de bucles se basa en el número de elementos de la colección. -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: +La colección debe contener sólo elementos del mismo tipo, de lo contrario se devolverá un error en cuanto a la variable _Current_Item_ se le asigne el primer tipo de valor diferente. -- 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). +En cada iteración del bucle, la variable _Current_Item_ se llena automáticamente con el elemento correspondiente de la colección. Hay que tener en cuenta los siguientes puntos: -#### Example +- Si la variable _Current_Item_ es de tipo objeto o de tipo colección (es decir, si _Expresión_ es una colección de objetos o de colecciones), al modificar esta variable se modificará automáticamente el elemento coincidente de la colección (porque los objetos y las colecciones comparten las mismas referencias). Si la variable es de tipo escalar, sólo se modificará la variable. +- La variable _Current_Item_ debe ser del mismo tipo que los elementos de la colección. Si algún elemento de la colección no es del mismo tipo que la variable, se genera un error y el bucle se detiene. +- Si la colección contiene elementos con un valor **Null**, se generará un error si el tipo de variable _Current_Item_ no soporta valores **Null** (como las variables de tipo entero largo). -You want to compute some statistics for a collection of numbers: +#### Ejemplo +Usted quiere calcular algunas estadísticas para una colección de números: ```4d C_COLLECTION($nums) $nums:=New collection(10;5001;6665;33;1;42;7850) @@ -345,20 +338,19 @@ You want to compute some statistics for a collection of numbers: //$vUnder=4,$vOver=2 ``` -### Loop through entity selections +### Bucle en las selecciones 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. +Cuando `For each...End for each` se utiliza con una _Expression_ del tipo _Collection_, el parámetro _Current_Item_ es una variable del mismo tipo que los elementos de la colección. -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. +El número de bucles se basa en el número de entidades de la selección de entidades. En cada iteración del bucle, el parámetro *Current_Item* se llena automáticamente con la entidad de la selección de entidades que se procesa actualmente. -**Note:** If the entity selection contains an entity that was removed meanwhile by another process, it is automatically skipped during the loop. +**Nota:** si la selección de entidades contiene una entidad que fue eliminada mientras tanto por otro proceso, se salta automáticamente durante el bucle. -Keep in mind that any modifications applied on the current entity must be saved explicitly using `entity.save( )`. +Tenga en cuenta que cualquier modificación aplicada en la entidad actual debe ser guardada explícitamente utilizando `entity.save( )`. -#### Example - -You want to raise the salary of all British employees in an entity selection: +#### Ejemplo +Quiere aumentar el salario de todos los empleados británicos en una selección de entidades: ```4d C_OBJECT(emp) For each(emp;ds.Employees.query("country='UK'")) @@ -367,16 +359,15 @@ You want to raise the salary of all British employees in an entity selection: 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. +### Bucles en las propiedades 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. +Cuando se utiliza `For each...End for each` con una *Expression* de tipo Object, el parámetro *Current_Item* es una variable texto que se llena automáticamente con el nombre de la propiedad actualmente procesada. -#### Example +Las propiedades del objeto se procesan de acuerdo con su orden de creación. Durante el bucle, se pueden añadir o eliminar propiedades en el objeto, sin modificar el número de bucles que quedarán en función del número original de propiedades del objeto. -You want to switch the names to uppercase in the following object: +#### Ejemplo +Quiere pasar los nombres a mayúsculas en el siguiente objeto: ```4d { "firstname": "gregory", @@ -384,9 +375,7 @@ You want to switch the names to uppercase in the following object: "age": 20 } ``` - You can write: - ```4d For each(property;vObject) If(Value type(vObject[property])=Is text) @@ -394,32 +383,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). +Puede definir los límites de la iteración utilizando los parámetros opcionales inicio y fin. -- 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:**los parámetros *inicio* y *fin* sólo pueden utilizarse en iteraciones a través de colecciones y selecciones de entidades (se ignoran en las propiedades 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` +- En el parámetro *begin*, pase la posición del elemento en *Expression* en la que se iniciará la iteración (se incluye *begin*). +- En el parámetro *end*, también se puede pasar la posición del elemento en *Expression* en la que se debe detener la iteración (se excluye *end*). -For example: +Si se omite *fin* o si es mayor que el número de elementos de , se iteran los elementos desde *inicio* hasta el último (incluido). Si los parámetros *inicio* y *fin* son valores positivos, representan posiciones reales de elementos en *Expression*. Si *comienzo* es un valor negativo, se recalcula como `comienzo:=comienzo+tamaño de la expresión` (se considera como el desplazamiento desde el final de *Expression*). Si el valor calculado es negativo, *inicio* toma el valor 0. **Nota:** aunque inicio sea negativo, la iteración se sigue realizando en el orden estándar. Si *fin* es un valor negativo, se recalcula como `fin:=fin+tamaño de la expresión` -- 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 ejemplo: +- una colección contiene 10 elementos (numerados de 0 a 9) +- begin=-4 > -> begin=-4+10=6 >-> la iteración comienza en el sexto elemento (#5) +- end=-2 -> end=-2+10=8 -> la iteración se detiene antes del 8º elemento (#7), es decir, en el 7º elemento. -#### Example +#### Ejemplo ```4d C_COLLECTION($col;$col2) @@ -436,29 +423,30 @@ For example: //$col2=[1,2,3,"a","b","c","d"] ``` -### Until and While conditions +### Condiciones Until y While -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`. +Puede controlar la ejecución de `For each...End for each` añadiendo una condición `Until` o una condición `While` al bucle. Cuando una instrucción `Until(condición)` está asociada al bucle, la iteración se detendrá tan pronto como la condición se evalúe como `True`, mientras que cuando se trata de una instrucción `While(condición)`, la iteración se detendrá cuando la condición se evalúe por primera vez como `False`. -You can pass either keyword depending on your needs: +Puede pasar cualquiera de las dos palabras clave en función de sus necesidades: -- 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. +- La condición `Until` se comprueba al final de cada iteración, por lo que si *Expression* no está vacía o es nula, el bucle se ejecutará al menos una vez. +- La condición `While` se prueba al principio de cada iteración, por lo que según el resultado de la condición, el bucle puede no ejecutarse en absoluto. -#### Example +#### Ejemplo ```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) //probada al inicio $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) //probada al 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/es/Concepts/classes.md b/website/translated_docs/es/Concepts/classes.md index b17c63ef373dd6..e747ee4c48c413 100644 --- a/website/translated_docs/es/Concepts/classes.md +++ b/website/translated_docs/es/Concepts/classes.md @@ -1,280 +1,395 @@ --- -id: classes -title: Classes +id: clases +title: Clases --- -## Overview +## Generalidades -The 4D language supports the concept of **classes**. In a programming language, using a class allows you to define an object behaviour with associated properties and functions. +El lenguaje 4D soporta el concepto de **clases**. En un lenguaje de programación, el uso de una clase permite definir el comportamiento de un objeto con propiedades y funciones asociadas. -Once a class is defined, you can **instantiate** objects of this class anywhere in your code. Each object is an instance of its class. A class can `extend` another class, and then inherits from its functions. +Una vez definida una clase usuario, puede **instanciar** los objetos de esta clase en cualquier parte de su código. Cada objeto es una instancia de su clase. A class can [`extend`](#class-extends-classname) another class, and then inherits from its [functions](#function) and properties ([static](#class-constructor) and [computed](#function-get-and-function-set)). -The class model in 4D is similar to classes in JavaScript, and based on a chain of prototypes. +> El modelo de clases en 4D es similar al de las clases en JavaScript, y se basa en una cadena de prototipos. -### Class object +Por ejemplo, puede crear una clase `Person` con la siguiente definición: -A class is an object itself, of "Class" class. A class object has the following properties and methods: +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -- `name` which must be ECMAScript compliant -- `superclass` object (optional, null if none) -- `new()` method, allowing to instantiate class objects. +Function get fullName() -> $fullName : text + $fullName:=This.firstName+" "+This.lastName -In addtion, a class object can reference: +Function sayHello()->$welcome : Text + $welcome:="Hello "+This.fullName +``` -- a `constructor` object (optional) -- a `prototype` object, containing named function objects (optional). +En un método, creando una "Persona": -A class object is a shared object and can therefore be accessed from different 4D processes simultaneously. +``` +var $person : cs.Person //object of Person class +var $hello : Text +$person:=cs.Person.new("John";"Doe") +// $person:{firstName: "John"; lastName: "Doe"; fullName: "John Doe"} +$hello:=$person.sayHello() //"Hello John Doe" +``` -### Property lookup and prototype -All objects in 4D are internally linked to a class object. When 4D does not find a property in an object, it searches in the prototype object of its class; if not found, 4D continue searching in the prototype object of its superclass, and so on until there is no more superclass. -All objects inherit from the class "Object" as their inheritance tree top class. +## Gestión de clases -```4d - //Class: Polygon -Class constructor -C_LONGINT($1;$2) -This.area:=$1*$2 +### Definición de una clase - //C_OBJECT($poly) -C_BOOLEAN($instance) -$poly:=cs.Polygon.new(4;3) +Una clase usuario en 4D está definida por un archivo de método específico (.4dm), almacenado en la carpeta `/Project/Sources/Classes/`. El nombre del archivo es el nombre de la clase. -$instance:=OB Instance of($poly;cs.Polygon) - // true -$instance:=OB Instance of($poly;4D.Object) - // true -``` +Al nombrar las clases, debe tener en cuenta las siguientes reglas: -When enumerating properties of an object, its class prototype is not enumerated. As a consequence, `For each` statement and `JSON Stringify` command do not return properties of the class prototype object. The prototype object property of a class is an internal hidden property. +- Un [nombre de clase](identifiers.md#classes) debe cumplir con [reglas de denominación de las propiedades](identifiers.md#object-properties). +- Class names are case sensitive. +- No se recomienda dar el mismo nombre a una clase y a una tabla de la base, para evitar conflictos. -### Class definition +Por ejemplo, si quiere definir una clase llamada "Polygon", tiene que crear el siguiente archivo: -A user class file defines a model of object that can be instantiated in the database code by calling the `new()` class member method. You will usually use specific [class keywords](#class-keywords) and [class commands](#class-commands) in the class file. +- Project folder + + Project + * Sources + - Clases + + Polygon.4dm -For example: +### Borrar una clase -```4d -//Class: Person.4dm -Class constructor - C_TEXT($1) // FirstName - C_TEXT($2) // LastName - This.firstName:=$1 - This.lastName:=$2 -``` +Para eliminar una clase existente, puede: -In a method, creating a "Person": +- en su disco, elimine el archivo de clase .4dm de la carpeta "Classes", +- en el Explorador 4D, seleccionar la clase y hacer clic en ![](assets/en/Users/MinussNew.png) o elegir **Mover a la papelera** en el menú contextual. - C_OBJECT($o) - $o:=cs.Person.new("John";"Doe") - // $o: {firstName: "John";lastName: "Doe" } - -Note that you could create an empty class file, and instantiate empty objects. For example, if you create the following `Empty.4dm` class file: +### Utilizar la interfaz 4D -```4d -//Empty.4dm class file -//Nothing -``` +Los archivos de clase se almacenan automáticamente en la ubicación adecuada cuando se crean a través de la interfaz de 4D, ya sea a través del menú **Archivo** o del Explorador. -You could write in a method: +#### Menú Archivo y barra de herramientas -```4d -$o:=cs.Empty.new() -//$o : {} -$cName:=OB Class($o).name //"Empty" -``` +Puede crear un nuevo archivo de clase para el proyecto seleccionando **Nuevo > Clase...** en el menú **Archivo** de 4D Developer o en la barra de herramientas. + +También puede utilizar el atajo **Ctrl+Mayús+Alt+k**. + +#### Explorador + +En la página **Métodos** del Explorador, las clases se agrupan en la categoría **Clases**. + +Para crear una nueva clase, puede: + +- seleccione la categoría **Clases** y haga clic en el botón ![](assets/en/Users/PlussNew.png). +- seleccione **Nueva clase...** en el menú de acciones de la parte inferior de la ventana del Explorador, o en el menú contextual del grupo Clases. ![](assets/en/Concepts/newClass.png) +- seleccione **Nueva > Clase...** en el menú contextual de la página de inicio del Explorador. + +#### Soporte del código de clase + +En las diferentes ventanas 4D (editor de código, compilador, depurador, explorador de ejecución), el código de la clase se maneja básicamente como un método proyecto con algunas especificidades: + +- En el editor de código: + - una clase no puede ser ejecutada + - una función de clase es un bloque de código + - **Ir a la definición** en un objeto miembro busca las declaraciones de función de clase; por ejemplo, "$o.f()" encontrará "Function f". + - **Buscar referencias** en la declaración de función de clase busca la función utilizada como miembro de objeto; por ejemplo, "Function f" encontrará "$o.f()". +- En el explorador de ejecución y el depurador, las funciones de clase se muestran con el formato \ constructor o \.\ formato. ## Class stores -Available classes are accessible from their class stores. The following class stores are available: +Las clases disponibles son accesibles desde sus class stores. Hay dos class stores disponibles: -- a class store for built-in 4D classes. It is returned by the `4D` command. -- a class store for each opened database or component. It is returned by the `cs` command. These are "user classes". +- `cs` para el class store usuario +- `4D` para el class store integrado -For example, you create a new instance of an object of myClass using the `cs.myClass.new()` statement (`cs` means *classtore*). -## Handling user classes -### Class files +### `cs` -A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. +#### cs -> classStore -For example, if you want to define a class named "Polygon", you need to create the following file: +| Parameter | Tipo | | Descripción | +| ---------- | ------ | -- | ------------------------------------------------- | +| classStore | objeto | <- | Class store usuario para el proyecto o componente | -- Database folder - + Project - * Sources - - Classes - + Polygon.4dm +El comando `cs` devuelve la class store usuario para el proyecto o componente actual. Devuelve todas las clases de usuario [definidas](#class-definition) en el proyecto o componente abierto. Por defecto, sólo las [clases ORDA](ORDA/ordaClasses.md) están disponibles. -### Class names +#### Ejemplo -When naming classes, you should keep in mind the following rules: +Quiere crear una nueva instancia de un objeto de `myClass`: -- A class name must be ECMAScript compliant. -- Class names are case sensitive. -- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. +```4d +$instance:=cs.myClass.new() +``` + +### `4D` -### 4D Developer interface +#### 4D -> classStore -Class files are automatically stored at the appropriate location when created through the 4D Developer interface, either via the **File** menu or the Explorer. +| Parameter | Tipo | | Descripción | +| ---------- | ------ | -- | -------------- | +| classStore | objeto | <- | Class store 4D | -#### File menu and toolbar +El comando `4D` devuelve la class store 4D integrada disponible. It provides access to specific APIs such as [CryptoKey](API/CryptoKeyClass.md). -You can create a new class file for the project by selecting **New > Class...** in the 4D Developer **File** menu or from the toolbar. +#### Ejemplo -You can also use the **Ctrl+Shift+Alt+k** shortcut. +Quiere crear una nueva llave en la clase `CryptoKey`: -#### Explorer +```4d +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) +``` -In the **Methods** page of the Explorer, classes are grouped in the **Classes** category. -To create a new class, you can: -- select the **Classes** category and click on the ![](assets/en/Users/PlussNew.png) button. -- select **New Class...** from the action menu at the bottom of the Explorer window, or from the contexual menu of the Classes group. ![](assets/en/Concepts/newClass.png) -- select **New > Class...** from the contexual menu of the Explorer's Home page. -#### Class code support +## El objeto clase -In the various 4D Developer windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: +Cuando una clase es [definida](#class-definition) en el proyecto, se carga en el entorno del lenguaje 4D. A class is an object itself, of ["Class" class](API/ClassClass.md). Un objeto class tiene las propiedades y funciones siguientes: -- In the code editor: - - a class cannot be run - - a class function is a code block - - **Goto definition** on an object member searches for class Function declarations; for example, "$o.f()" will find "Function f". - - **Search references** on class function declaration searches for the function used as object member; for example, "Function f" will find "$o.f()". -- In the Runtime explorer and Debugger, class functions are displayed with the \ constructor or \.\ format. +- [`name`](API/ClassClass.md#name) string +- [`superclass`](API/ClassClass.md#superclass) object (null if none) +- [`new()`](API/ClassClass.md#new) function, allowing to instantiate class objects. -### Deleting a class +Además, un objeto clase puede hacer referencia a un objeto [`constructor`](#class-constructor) (opcional). -To delete an existing class, you can: +Un objeto de clase es un [objeto compartido](shared.md) y, por tanto, se puede acceder a él desde diferentes procesos de 4D simultáneamente. -- on your disk, remove the .4dm class file from the "Classes" folder, -- in the Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. +### Herencia -## Class keywords +If a class inherits from another class (i.e. the [Class extends](classes.md#class-extends-classname) keyword is used in its definition), the parent class is its [`superclass`](API/ClassClass.md#superclass). -Specific 4D keywords can be used in class definitions: +When 4D does not find a function or a property in a class, it searches it in its [`superclass`](API/ClassClass.md#superclass); if not found, 4D continues searching in the superclass of the superclass, and so on until there is no more superclass (all objects inherit from the "Object" superclass). -- `Function ` to define member methods of the objects. -- `Class constructor` to define the properties of the objects (i.e. the prototype). -- `Class extends ` to define inheritance. -### Class Function +## Palabras clave de clase -#### Syntax +En las definiciones de clase se pueden utilizar palabras claves específicas de 4D: + +- `Function ` para definir las funciones de clase de los objetos. +- `Function get ` and `Function set ` to define computed properties of the objects. +- `Class constructor` to define static properties of the objects. +- `Class extends ` para definir la herencia. + + +### `Function` + +#### Sintaxis -```js -Function +```4d +Function ({$parameterName : type; ...}){->$parameterName : type} // code ``` -Class functions are properties of the prototype object of the owner class. They are objects of the "Function" class. +Las funciones de clase son propiedades específicas de la clase. They are objects of the [4D.Function](API/FunctionClass.md#about-4dfunction-objects) class. -In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be ECMAScript compliant. +En el archivo de definición de clase, las declaraciones de función utilizan la palabra clave `Function`, y el nombre de la función. El nombre de la función debe cumplir con las [reglas de nomenclatura de las propiedades](Concepts/identifiers.md#object-properties). -> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features. For example, if you declare `Function _myPrivateFunction` in MyClass, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. +> **Consejo:** comenzar el nombre de la función con un carácter de subrayado ("_") excluirá la función de las funcionalidades de autocompletado en el editor de código 4D. Por ejemplo, si declara `Function _myPrivateFunction` en `MyClass`, no se propondrá en el editor de código cuando digite en `"cs.MyClass. "`. -Within a class function, the `This` is used as the object instance. For example: +Inmediatamente después del nombre de la función, los [parámetros](#parameters) de la función se pueden declarar con un nombre y un tipo de datos asignados, incluido el parámetro de retorno (opcional). Por ejemplo: ```4d -Function getFullName - C_TEXT($0) - $0:=This.firstName+" "+Uppercase(This.lastName) +Function computeArea($width : Integer; $height : Integer)->$area : Integer +``` + +En una función de clase, el comando `This` se utiliza como instancia del objeto. Por ejemplo: + +```4d +Function setFullname($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -Function getAge - C_LONGINT($0) - $0:=(Current date-This.birthdate)/365.25 +Function getFullname()->$fullname : Text + $fullname:=This.firstName+" "+Uppercase(This.lastName) ``` -For a class function, the `Current method name` command returns: "*\.\*", for example "MyClass.myMethod". +Para una función de clase, el comando `Current method name` devuelve: "*\.\*", por ejemplo "MyClass.myMethod". + +En el código de la aplicación, las funciones de clase se llaman como métodos miembros de la instancia del objeto y pueden recibir los [parámetros](#class-function-parameters) si los hay. Se soportan las siguientes sintaxis: + +- uso del operador `()`. For example, `myObject.methodName("hello")` +- use of a "4D.Function" class member method: + - [`apply()`](API/FunctionClass.md#apply) + - [`call()`](API/FunctionClass.md#call) + +> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: - the compiler does not generate any error (which is different compared to regular methods), - an error is thrown by 4D only at runtime. -In the database code, class functions are called as member methods of the object instance and can receive parameters if any. The following syntaxes are supported: -- use of the `()` operator. For example `myObject.methodName("hello")`. -- use of a "Function" class member method - - `apply()` - - `call()` -> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: -> - the compiler does not generate any error (which is different compared to regular methods), -< +#### Parameters + +Function parameters are declared using the parameter name and the parameter type, separated by a colon. El nombre del parámetro debe cumplir con las [reglas de nomenclatura de las propiedades](Concepts/identifiers.md#object-properties). Múltiples parámetros (y tipos) están separados por punto y coma (;). + +```4d +Function add($x; $y : Variant; $z : Integer; $xy : Object) +``` +> Si no se indica el tipo, el parámetro se definirá como `Variant`. + +Declare el parámetro de retorno (opcional) añadiendo una flecha (->) y la definición del parámetro de retorno después de la lista de parámetros de entrada. Por ejemplo: + +```4d +Function add($x : Variant; $y : Integer)->$result : Integer +``` + +También puedes declarar el parámetro de retorno sólo añadiendo `: type`, en cuyo caso estará disponible automáticamente vía $0. Por ejemplo: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` +> La[sintaxis 4D clásica ](parameters.md#sequential-parameters) de los parámetros de método puede utilizarse para declarar los parámetros de las funciones de clase. Ambas sintaxis pueden mezclarse. For example: +> +> ```4d +> Function add($x : Integer) +> var $2; $value : Integer +> var $0 : Text +> $value:=$x+$2 +> $0:=String($value) +> ``` -p> -> - an error is thrown by 4D only at runtime. #### Example ```4d // Class: Rectangle -Class Constructor - C_LONGINT($1;$2) +Class constructor($width : Integer; $height : Integer) This.name:="Rectangle" - This.height:=$1 - This.width:=$2 + This.height:=$height + This.width:=$width // Function definition -Function getArea - C_LONGINT($0) - $0:=(This.height)*(This.width) - +Function getArea()->$result : Integer + $result:=(This.height)*(This.width) ``` ```4d // In a project method -C_OBJECT($o) -C_REAL($area) -$o:=cs.Rectangle.new() -$area:=$o.getArea(50;100) //5000 +var $rect : cs.Rectangle +var $area : Real + +$rect:=cs.Rectangle.new(50;100) +$area:=$rect.getArea() //5000 +``` + + +### `Function get` and `Function set` + +#### Syntax + +```4d +Function get ()->$result : type +// code +``` + +```4d +Function set ($parameterName : type) +// code +``` + +`Function get` and `Function set` are accessors defining **computed properties** in the class. A computed property is a named property with a data type that masks a calculation. When a computed property value is accessed, 4D substitutes the corresponding accessor's code: + +- when the property is read, the `Function get` is executed, +- when the property is written, the `Function set` is executed. + +If the property is not accessed, the code never executes. + +Computed properties are designed to handle data that do not necessary need to be kept in memory. They are usually based upon persistent properties. For example, if a class object contains as persistent property the *gross price* and the *VAT rate*, the *net price* could be handled by a computed property. + +In the class definition file, computed property declarations use the `Function get` (the *getter*) and `Function set` (the *setter*) keywords, followed by the name of the property. The name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). + +`Function get` returns a value of the property type and `Function set` takes a parameter of the property type. Both arguments must comply with standard [function parameters](#parameters). + +When both functions are defined, the computed property is **read-write**. If only a `Function get` is defined, the computed property is **read-only**. In this case, an error is returned if the code tries to modify the property. If only a `Function set` is defined, 4D returns *undefined* when the property is read. + +The type of the computed property is defined by the `$return` type declaration of the *getter*. It can be of the following types: + +- Text +- Boolean +- Date +- Number +- Object +- Collection +- Image +- Blob + +> Assigning *undefined* to an object property clears its value while preserving its type. In order to do that, the `Function get` is first called to retrieve the value type, then the `Function set` is called with an empty value of that type. + +#### Examples + +```4d +//Class: Person.4dm + +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function get fullName() -> $fullName : Text + $fullName:=This.firstName+" "+This.lastName + +Function set fullName( $fullName : text ) + $p:=Position(" "; $fullName) + This.firstName:=Substring($fullName; 1; $p-1) + This.lastName:=Substring($fullName; $p+1) + ``` -### Class constructor +```4d +//in a project method +$fullName:=$person.fullName // Function get fullName() is called +$person.fullName:="John Smith" // Function set fullName() is called +``` + + +### `Class Constructor` #### Syntax -```js +```4d // Class: MyClass -Class Constructor +Class Constructor({$parameterName : type; ...}) // code ``` -A class constructor function, which can accept parameters, can be used to define a user class. +Una función class constructor, que puede aceptar los [parámetros](#parameters), puede utilizarse para definir una clase usuario. + +In that case, when you call the [`new()`](API/ClassClass.md#new) function, the class constructor is called with the parameters optionally passed to the `new()` function. + +For a class constructor function, the `Current method name` command returns: "*\:constructor*", for example "MyClass:constructor". -In that case, when you call the `new()` class member method, the class constructor is called with the parameters optionnally passed to the `new()` function. -For a class constructor function, the `Current method name` command returns: "*\.constructor*", for example "MyClass.constructor". #### Example: ```4d // Class: MyClass // Class constructor of MyClass -Class Constructor -C_TEXT($1) -This.name:=$1 +Class Constructor ($name : Text) + This.name:=$name ``` ```4d // In a project method // You can instantiate an object -C_OBJECT($o) +var $o : cs.MyClass $o:=cs.MyClass.new("HelloWorld") // $o = {"name":"HelloWorld"} ``` -### Class extends \ + + + +### `Class extends ` #### Syntax -```js +```4d // Class: ChildClass Class extends ``` @@ -284,11 +399,11 @@ The `Class extends` keyword is used in class declaration to create a user class Class extension must respect the following rules: - A user class cannot extend a built-in class (except 4D.Object which is extended by default for user classes) -- A user class cannot extend a user class from another database or component. +- A user class cannot extend a user class from another project or component. - A user class cannot extend itself. -- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). +- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). -Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax' will throw an error in this case. +Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax` will throw an error in this case. An extended class can call the constructor of its parent class using the [`Super`](#super) command. @@ -297,27 +412,28 @@ An extended class can call the constructor of its parent class using the [`Super This example creates a class called `Square` from a class called `Polygon`. ```4d - //Class: Square - //path: Classes/Square.4dm +//Class: Square - Class extends Polygon +//path: Classes/Square.4dm - Class constructor - C_LONGINT($1) +Class extends Polygon - // It calls the parent class's constructor with lengths - // provided for the Polygon's width and height -Super($1;$1) - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +Class constructor ($side : Integer) -Function getArea -C_LONGINT($0) -$0:=This.height*This.width + // It calls the parent class's constructor with lengths + // provided for the Polygon's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" + + Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -### Super +### `Super` + #### Super {( param{;...;paramN} )} {-> Object} @@ -326,102 +442,104 @@ $0:=This.height*This.width | param | mixed | -> | Parameter(s) to pass to the parent constructor | | Result | object | <- | Object's parent | - The `Super` keyword allows calls to the `superclass`, i.e. the parent class. `Super` serves two different purposes: -- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. When used in a constructor, the `Super` command appears alone and must be used before the `This` keyword is used. - - If all class constructors in the inheritance tree are not properly called, error -10748 is generated. It's 4D developer to make sure calls are valid. - - If the `This` command is called on an object whose superclasses have not been constructed, error -10743 is generated. - - If `Super` is called out of an object scope, or on an object whose superclass constructor has already been called, error -10746 is generated. +- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. Cuando se utiliza en un constructor, el comando `Super` aparece solo y debe utilizarse antes de la palabra clave `This`. + - Si todos los constructores de clase del árbol de herencia no se llaman correctamente, se genera el error -10748. Es desarrollador de 4D para asegurarse de que las llamadas son válidas. + - Si se llama al comando `This` en un objeto cuyas superclases no han sido construidas, se genera el error -10743. + + - Si `Super` se llama fuera del alcance de un objeto, o en un objeto cuyo constructor de la superclase ya ha sido llamado, se genera el error. ```4d - // inside myClass constructor - C_TEXT($1;$2) - Super($1) //calls superclass constructor with a text param - This.param:=$2 // use second param +// dentro del constructor myClass +var $text1; $text2 : Text +Super($text1) //llama al superclass constructor con un parámetro texto +This.param:=$text2 // utiliza el segundo parámetro ``` -- inside a [class member function](#class-function), `Super` designates the prototype of the superclass and allows to call a function of the superclass hierarchy. +- dentro de una [función miembro de clase](#class-function), `Super` designa el prototipo de la superclase y permite llamar una función de la jerarquía de la superclase. ```4d - Super.doSomething(42) //calls "doSomething" function - //declared in superclasses +Super.doSomething(42) //llama a la función "doSomething" +//declarada en las superclasses ``` -#### Example 1 +#### Ejemplo 1 -This example illustrates the use of `Super` in a class constructor. The command is called to avoid duplicating the constructor parts that are common between `Rectangle` and `Square` classes. +Este ejemplo ilustra el uso de `Super` en un class constructor. El comando se llama para evitar duplicar las partes del constructor que son comunes entre las clases `Rectangle` y `Square`. ```4d - //Class: Rectangle +// Class: Rectangle +Class constructor($width : Integer; $height : Integer) + This.name:="Rectangle" + This.height:=$height + This.width:=$width - Class constructor - C_LONGINT($1;$2) - This.name:="Rectangle" - This.height:=$1 - This.width:=$2 - Function sayName - ALERT("Hi, I am a "+This.name+".") +Function sayName() + ALERT("Hi, I am a "+This.name+".") - Function getArea - C_LONGINT($0) - $0:=This.height*This.width +// Definición de la función +Function getArea() + var $0 : Integer + $0:=(This.height)*(This.width) ``` ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // It calls the parent class's constructor with lengths - // provided for the Rectangle's width and height - Super($1;$1) + // Llama al constructor de la clase padre con las longitudes + // suministradas para el ancho y el alto del Rectángulot + Super($side;$side) + // En las clases derivadas, Super debe ser llamado antes + // de que pueda usar 'This' + This.name:="Square" - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -#### Example 2 +#### Ejemplo 2 -This example illustrates the use of `Super` in a class member method. You created the `Rectangle` class with a function: +Este ejemplo ilustra el uso de `Super` en un método miembro de clase. You created the `Rectangle` class with a function: ```4d - //Class: Rectangle +//Class: Rectangle - Function nbSides - C_TEXT($0) - $0:="I have 4 sides" +Function nbSides() + var $0 : Text + $0:="I have 4 sides" ``` You also created the `Square` class with a function calling the superclass function: ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Function description - C_TEXT($0) - $0:=Super.nbSides()+" which are all equal" +Function description() + var $0 : Text + $0:=Super.nbSides()+" which are all equal" ``` Then you can write in a project method: ```4d - C_OBJECT($square) - C_TEXT($message) - $square:=cs.Square.new() - $message:=$square.description() //I have 4 sides which are all equal +var $square : Object +var $message : Text +$square:=cs.Square.new() +$message:=$square.description() //I have 4 sides which are all equal ``` -### This +### `This` #### This -> Object @@ -429,47 +547,48 @@ Then you can write in a project method: | --------- | ------ | -- | -------------- | | Result | object | <- | Current object | +The `This` keyword returns a reference to the currently processed object. En 4D, se puede utilizar en [diferentes contextos](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). -The `This` keyword returns a reference to the currently processed object. In 4D, it can be used in [different contexts](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). - -In most cases, the value of `This` is determined by how a function is called. It can't be set by assignment during execution, and it may be different each time the function is called. +En la mayoría de los casos, el valor de `This` viene determinado por cómo se llama a una función. No se puede definir por asignación durante la ejecución, y puede ser diferente cada vez que se llame a la función. -When a formula is called as a member method of an object, its `This` is set to the object the method is called on. For example: +Cuando se llama a una fórmula como método miembro de un objeto, su `This` se define en el objeto al que se llama el método. For example: ```4d $o:=New object("prop";42;"f";Formula(This.prop)) $val:=$o.f() //42 ``` -When a [class constructor](#class-constructor) function is used (with the `new()` keyword), its `This` is bound to the new object being constructed. +When a [class constructor](#class-constructor) function is used (with the [`new()`](API/ClassClass.md#new) function), its `This` is bound to the new object being constructed. ```4d - //Class: ob +//Class: ob Class Constructor + // Create properties on This as // desired by assigning to them This.a:=42 ``` ```4d - // in a 4D method +// in a 4D method $o:=cs.ob.new() $val:=$o.a //42 ``` -> When calling the superclass constructor in a constructor using the [Super](#super) keyword, keep in mind that `This` must not be called before the superclass constructor, otherwise an error is generated. See [this example](#example-1). +> When calling the superclass constructor in a constructor using the [Super](#super) keyword, keep in mind that `This` must not be called before the superclass constructor, otherwise an error is generated. Ver [este ejemplo](#example-1). + -In any cases, `This` refers to the object the method was called on, as if the method were on the object. +En todos los casos, `Esto` se refiere al objeto al que el método fue llamado, como si el método estuviera en el objeto.. ```4d - //Class: ob +//Class: ob - Function f +Function f() $0:=This.a+This.b ``` -Then you can write in a project method: +Luego puede escribir en un método proyecto: ```4d $o:=cs.ob.new() @@ -477,21 +596,23 @@ $o.a:=5 $o.b:=3 $val:=$o.f() //8 ``` +En este ejemplo, el objeto asignado a la variable $o no tiene su propia propiedad *f*, la hereda de su clase. Since *f* is called as a method of $o, its `This` refers to $o. -In this example, the object assigned to the variable $o doesn't have its own *f* property, it inherits it from its class. Since *f* is called as a method of $o, its `This` refers to $o. ## Class commands Several commands of the 4D language allows you to handle class features. -### OB Class + +### `OB Class` #### OB Class ( object ) -> Object | Null `OB Class` returns the class of the object passed in parameter. -### OB Instance of + +### `OB Instance of` #### OB Instance of ( object ; class ) -> Boolean -`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise. \ No newline at end of file +`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise. diff --git a/website/translated_docs/es/Concepts/components.md b/website/translated_docs/es/Concepts/components.md index 465d945c61f7e1..3d9d200be4996d 100644 --- a/website/translated_docs/es/Concepts/components.md +++ b/website/translated_docs/es/Concepts/components.md @@ -1,188 +1,209 @@ --- -id: components -title: Components +id: componentes +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. +Un componente 4D es un conjunto de métodos y formularios 4D que representan una o varias funcionalidades que pueden instalarse en diferentes aplicaciones. Por ejemplo, puede desarrollar un componente 4D de correo electrónico que gestione todos los aspectos del envío, la recepción y el almacenamiento de correos electrónicos en aplicaciones 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: +## Presentation -- 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. +### Definiciones -## Definitions +- **Base proyecto**: proyecto 4D utilizado para desarrollar el componente. El proyecto matriz es una base estándar sin atributos específicos. Un proyecto matricial forma un único componente. +- **Proyecto local**: proyecto aplicación en la que se instala y utiliza un componente. +- **Component**: Matrix project, compiled or not, copied into the [`Components`](Project/architecture.md) folder of the host application and whose contents are used in the host application. -The component management mechanisms in 4D require the implementation of the following terms and concepts: +### Principles -- **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. +La creación e instalación de componentes 4D se realiza directamente desde 4D. Básicamente, los componentes se gestionan como [plug-ins](Concepts/plug-ins.md) según los siguientes principios: -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. +- A component consists of a regular 4D project file. +- To install a component, you simply need to copy it into the [`Components` folder of the project](Project/architecture.md). You can use aliases or shortcuts. +- A project can be both a “matrix†and a “host,†in other words, a matrix project can itself use one or more components. Sin embargo, un componente no puede utilizar "subcomponentes" por sí mismo. +- Un componente puede llamar a la mayoría de los elementos de 4D: métodos proyecto, formularios proyecto, barras de menú, listas de selección, etc. No puede llamar a los métodos base ni a los triggers. +- No se pueden utilizar tablas o archivos de datos estándar en los componentes 4D. Sin embargo, un componente puede crear y/o utilizar tablas, campos y archivos de datos utilizando mecanismos de bases externas. Se trata de bases 4D independientes con las que se trabaja utilizando comandos SQL. +- A host project running in interpreted mode can use either interpreted or compiled components. A host project running in compiled mode cannot use interpreted components. In this case, only compiled components can be used. -### Protection of components: compilation -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. -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: +## Alcance de los comandos del lenguaje -- 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. +A excepción de los [comandos no utilizables](#comandos-inutilizables), un componente puede utilizar cualquier comando del lenguaje 4D. -## Sharing of project methods +When commands are called from a component, they are executed in the context of the component, except for the `EXECUTE METHOD` or `EXECUTE FORMULA` command that use the context of the method specified by the command. También hay que tener en cuenta que los comandos de lectura del tema "Usuarios y grupos" se pueden utilizar desde un componente, pero leerán los usuarios y grupos del proyecto local (un componente no tiene sus propios usuarios y grupos). -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. +Los comandos `SET DATABASE PARAMETER` y `Get database parameter` son una excepción: su alcance es global a la aplicación. Cuando estos comandos se llaman desde un componente, se aplican al proyecto de la aplicación local. -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. +Además, se han especificado medidas específicas para los comandos `Structure file` y `Get 4D folder` cuando se utilizan en el marco de los componentes. -**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. +El comando `COMPONENT LIST` puede utilizarse para obtener la lista de componentes cargados por el proyecto local. -![](assets/en/Concepts/pict516563.en.png) -## Passing variables +### Comandos no utilizables -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. +Los siguientes comandos no son compatibles para su uso dentro de un componente porque modifican el archivo de estructura - que está abierto en sólo lectura. Su ejecución en un componente generará el error -10511, "El comando NomComando no puede ser llamado desde un componente": -Example using an array: +- `ON EVENT CALL` +- `Method called on event` +- `SET PICTURE TO LIBRARY` +- `REMOVE PICTURE FROM LIBRARY` +- `SAVE LIST` +- `ARRAY TO LIST` +- `EDIT FORM` +- `CREATE USER FORM` +- `DELETE USER FORM` +- `CHANGE PASSWORD` +- `EDIT ACCESS` +- `Set group properties` +- `Set user properties` +- `DELETE USER` +- `CHANGE LICENSES` +- `BLOB TO USERS` +- `SET PLUGIN ACCESS` -```4d -//In the host database: - ARRAY INTEGER(MyArray;10) - AMethod(->MyArray) +**Notas:** -//In the component, the AMethod project method contains: - APPEND TO ARRAY($1->;2) -``` +- El comando `Current form table` devuelve `Nil` cuando se llama en el contexto de un formulario proyecto. Por consiguiente, no puede utilizarse en un componente. +- Los comandos SQL de definición de datos (`CREATE TABLE`, `DROP TABLE`, etc.) no pueden utilizarse en el proyecto componente. Sin embargo, se soportan con bases de datos externas (ver el comando SQL `CREATE DATABASE`). -Examples using variables: -```4d - C_TEXT(myvariable) - component_method1(->myvariable) - C_POINTER($p) - $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: +## Compartir métodos proyecto -- 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. +Todos los métodos proyecto de un proyecto matricial son por definición incluidos en el componente (el proyecto es el componente), lo que significa que pueden ser llamados y ejecutados por el componente. -- 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: +On the other hand, by default these project methods will not be visible, and they can't be called in the host project. En el proyecto matriz, debe designar explícitamente los métodos que desea compartir con el proyecto local. Estos métodos proyecto se pueden llamar en el código del proyecto local (pero no se pueden modificar en el editor de métodos del proyecto local). Estos métodos forman los **puntos de entrada** en el componente. -```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 +Por el contrario, por razones de seguridad, por defecto un componente no puede ejecutar métodos proyecto que pertenezcan al proyecto local. En algunos casos, puede ser necesario permitir que un componente acceda a los métodos proyecto de su proyecto local. To do this, you must explicitly designate which project methods of the host project you want to make accessible to the components (in the method properties, check the **Shared by components and host project** box). + +![](assets/en/Concepts/pict516563.en.png) + +Once the project methods of the host projects are available to the components, you can execute a host method from inside a component using the `EXECUTE FORMULA` or `EXECUTE METHOD` commands. Por ejemplo: + +```4d +// Host Method +component_method("host_method_name") ``` -In this case, it is necessary to use the comparison of pointers: ```4d - If(myptr1=myptr2) //This test returns False +// component_method + C_TEXT($1) + EXECUTE METHOD($1) ``` -## Access to tables of the host database +> An interpreted host database that contains interpreted components can be compiled or syntax checked if it does not call methods of the interpreted component. Otherwise, a warning dialog box appears when you attempt to launch the compilation or a syntax check and it will not be possible to carry out the operation. +> Keep in mind that an interpreted method can call a compiled method, but not the reverse, except via the use of the `EXECUTE METHOD` and `EXECUTE FORMULA` commands. + -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: + +## Paso de variables + +Las variables locales, proceso e interproceso no se comparten entre los componentes y los proyectos locales. La única forma de modificar las variables del componente desde el proyecto local y viceversa es utilizando punteros. + +Ejemplo utilizando un array: ```4d -// calling a component method -methCreateRec(->[PEOPLE];->[PEOPLE]Name;"Julie Andrews") +//En el proyecto local: + ARRAY INTEGER( MyArray;10) + AMethod(-> MyArray) + +//En el componente, el método proyecto AMethod contiene: + APPEND TO ARRAY($1->;2) ``` -Within the component, the code of the `methCreateRec` method: +Ejemplos utilizando variables: ```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_TEXT(myvariable) +component_method1(->myvariable) +``` -$tablepointer:=$1 -$fieldpointer:=$2 -CREATE RECORD($tablepointer->) +```4d +C_POINTER($p) +$p:=component_method2(...) +``` -$fieldpointer->:=$3 -SAVE RECORD($tablepointer->) +Without a pointer, a component can still access the value of a host database variable (but not the variable itself) and vice versa: + +```4d +//In the host database +C_TEXT($input_t) +$input_t:="DoSomething" +component_method($input_t) +// component_method gets "DoSomething" in $1 (but not the $input_t variable) ``` -## Scope of language commands -Except for [Unusable commands](#unusable-commands), a component can use any command of the 4D language. +Cuando se utilizan punteros para que los componentes y el proyecto local se comuniquen, hay que tener en cuenta las siguientes particularidades: -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). +- El comando `Get pointer` no devolverá un puntero a una variable del proyecto local si se llama desde un componente y viceversa. -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. +- La arquitectura de componentes permite la coexistencia, dentro del mismo proyecto interpretado, de componentes interpretados y compilados (a la inversa, en un proyecto compilado sólo pueden utilizarse componentes compilados). Para utilizar punteros en este caso, debe respetar el siguiente principio: el intérprete puede desanclar un puntero construido en modo compilado; sin embargo, en modo compilado, no puede desanclar un puntero construido en modo interpretado. Ilustremos este principio con el siguiente ejemplo: dados dos componentes, C (compilado) e I (interpretado), instalados en el mismo proyecto local. + - Si el componente C define la variable `myCvar`, el componente I puede acceder al valor de esta variable utilizando el puntero `->myCvar`. + - Si el componente C define la variable `myIvar`, el componente C no puede acceder a esta variable utilizando el puntero `->myIvar`. Esta sintaxis provoca un error de ejecución. -Furthermore, specific measures have been specified for the `Structure file` and `Get 4D folder` commands when they are used in the framework of components. +- La comparación de punteros utilizando el comando `RESOLVE POINTER` no se recomienda con los componentes, ya que el principio de partición de variables permite la coexistencia de variables con el mismo nombre pero con contenidos radicalmente diferentes en un componente y en el proyecto local (u otro componente). El tipo de la variable puede incluso ser diferente en ambos contextos. Si los punteros `myptr1` y `myptr2` apuntan cada uno a una variable, la siguiente comparación producirá un resultado incorrecto: -The `COMPONENT LIST` command can be used to obtain the list of components that are loaded by the host database. +```4d + RESOLVE POINTER(myptr1;vVarName1;vtablenum1;vfieldnum1) + RESOLVE POINTER(myptr2;vVarName2;vtablenum2;vfieldnum2) + If(vVarName1=vVarName2) + //Esta prueba devuelve True aunque las variables sean diferentes +``` +En este caso, es necesario utilizar la comparación de punteros: +```4d + If(myptr1=myptr2) //Esta prueba devuelve False +``` -### Unusable commands +## Gestión de errores -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â€: +Un [método de gestión de errores](Concepts/error-handling.md) instalado por el comando `ON ERR CALL` sólo se aplica a la aplicación en ejecución. En el caso de un error generado por un componente, no se llama al método de gestión de errores `ON ERR CALL` del proyecto local, y viceversa. -- `ON EVENT CALL` -- `Method called on event` -- `SET PICTURE TO LIBRARY` -- `REMOVE PICTURE FROM LIBRARY` -- `SAVE LIST` -- `ARRAY TO LIST` -- `EDIT FORM` -- `CREATE USER FORM` -- `DELETE USER FORM` -- `CHANGE PASSWORD` -- `EDIT ACCESS` -- `Set group properties` -- `Set user properties` -- `DELETE USER` -- `CHANGE LICENSES` -- `BLOB TO USERS` -- `SET PLUGIN ACCESS` -**Notes:** +## Acceso a las tablas del proyecto local -- 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). +Aunque los componentes no pueden utilizar tablas, los punteros pueden permitir que los proyectos locales y los componentes se comuniquen entre sí. Por ejemplo, este es un método que podría ser llamado desde un componente: -## Error handling +```4d +// llamar a un método componente +methCreateRec(->[PEOPLE];->[PEOPLE]Name;"Julie Andrews") +``` -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. +Dentro del componente, el código del método `methCreateRec`: -## Use of forms +```4d +C_POINTER($1) //Puntero a una tabla del proyecto local +C_POINTER($2) //Puntero a un campo del proyecto local +C_TEXT($3) // Valor a insertar -- 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. +$tablepointer:=$1 +$fieldpointer:=$2 +CREATE RECORD($tablepointer->) -**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. +$fieldpointer->:=$3 +SAVE RECORD($tablepointer->) +``` -- 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. +> In the context of a component, 4D assumes that a reference to a table form is a reference to the host table form (as components can't have tables.) -## Use of tables and fields +## Uso de tablas y 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. +Un componente no puede utilizar las tablas y campos definidos en la estructura 4D del proyecto matriz. Sin embargo, puede crear y utilizar bases externas, y luego utilizar sus tablas y campos según sus necesidades. Puede crear y gestionar bases externas utilizando SQL. Una base externa es un proyecto 4D independiente del proyecto 4D principal, pero con la que se puede trabajar desde el proyecto 4D principal. Utilizar una base externa significa designar temporalmente esta base como base actual, es decir, como la base de destino para las consultas SQL ejecutadas por 4D. Las bases externas se crean con el comando SQL `CREATE DATABASE`. -### Example +### Ejemplo -The following code is included in a component and performs three basic actions with an external database: +El siguiente código se incluye en un componente y realiza tres acciones básicas con una base de datos externa: -- creates the external database if it does not already exist, -- adds data to the external database, -- reads data from the external database. +- creación de la base de datos externa si aún no existe, +- añade datos a la base de datos externa, +- lectura de datos desde la base de datos externa. -Creating the external database: +Creación de la base de datos externa: ```4d -<>MyDatabase:=Get 4D folder+"\MyDB" // (Windows) stores the data in an authorized directory +<>MyDatabase:=Get 4D folder+"\MyDB" // (Windows) almacena los datos en un directorio autorizado Begin SQL CREATE DATABASE IF NOT EXISTS DATAFILE :[<>MyDatabase]; USE DATABASE DATAFILE :[<>MyDatabase]; @@ -202,10 +223,10 @@ Creating the external database: End SQL ``` -Writing in the external database: +Escritura en la base de datos externa: ```4d - $Ptr_1:=$2 // retrieves data from the host database through pointers + $Ptr_1:=$2 // recupera datos del proyecto local mediante punteros $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -224,10 +245,10 @@ Writing in the external database: End SQL ``` -Reading from an external database: +Lectura en una base de datos externa: ```4d - $Ptr_1:=$2 // accesses data of the host database through pointers + $Ptr_1:=$2 // accede a los datos del proyecto local a través de punteros $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -246,18 +267,48 @@ 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. +## Utilización de formularios + +- Sólo los "formularios de proyecto" (formularios que no están asociados a ninguna tabla específica) pueden utilizarse en un componente. Todos los formularios proyecto presentes en el proyecto matriz pueden ser utilizados por el componente. +- Un componente puede llamar a formularios tabla del proyecto local. Tenga en cuenta que en este caso es necesario utilizar punteros en lugar de nombres de tablas entre paréntesis [] para especificar los formularios en el código del componente. + +> Si un componente utiliza el comando `ADD RECORD`, se mostrará el formulario de entrada actual del proyecto local, en el contexto del proyecto local. Por consiguiente, si el formulario incluye variables, el componente no tendrá acceso a ellas. + +- Puede publicar formularios de componentes como subformularios en los proyectos locales. Esto significa que puede, más concretamente, desarrollar componentes que ofrezcan objetos gráficos. Por ejemplo, los Widgets que ofrece 4D se basan en el uso de subformularios en los componentes. + +> En el contexto de un componente, cualquier formulario de proyecto referenciado debe pertenecer al componente. For example, inside a component, referencing a host project form using `DIALOG` or `Open form window` will throw an error. + + +## Utilización de recursos + +Components can use resources located in the Resources folder of the component. + +Los mecanismos automáticos son operacionales: los archivos XLIFF encontrados en la carpeta Resources de un componente serán cargados por este componente. + +En un proyecto local que contiene uno o más componentes, cada componente, así como los proyectos locales, tiene su propia "cadena de recursos." Los recursos están divididos entre las diferentes proyectos: no es posible acceder a los recursos del componente A desde el componente B o desde el proyecto local. + + +## Executing initialization code + +A component can execute 4D code automatically when opening or closing the host database, for example in order to load and/or save the preferences or user states related to the operation of the host database. + +Executing initialization or closing code is done by means of the `On Host Database Event` database method. + +> For security reasons, you must explicitly authorize the execution of the `On Host Database Event` database method in the host database in order to be able to call it. To do this, you must check the **Execute "On Host Database Event" method of the components** option on the Security page the Settings. + + +## Protección de los componentes: compilación + +Por defecto, todos los métodos proyecto de un proyecto matriz instalado como componente son potencialmente visibles desde el proyecto local. En particular: + +- Los métodos proyecto compartido se encuentran en la Página Métodos del Explorador y pueden ser llamados en los métodos del proyecto local. Su contenido puede ser seleccionado y copiado en el área de vista previa del Explorador. También se pueden ver en el depurador. However, it's not possible to open them in the Method editor or modify them. +- Los otros métodos proyecto del proyecto matriz no aparecen en el Explorador, pero también pueden verse en el depurador del proyecto local. -Automatic mechanisms are operational: the XLIFF files found in the Resources folder of a component will be loaded by this component. +Para proteger eficazmente los métodos proyecto de un componente, basta con compilar el proyecto de la matriz y entregarlo en forma de archivo .4dz. Cuando se instala un proyecto matricial compilado como un componente: -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. +- Los métodos proyecto compartidos se muestran en la Página Métodos del Explorador y pueden ser llamados en los métodos del proyecto local. Sin embargo, su contenido no aparecerá en el área de vista previa ni en el depurador. +- Los otros métodos proyecto del proyecto matriz nunca aparecerán. -## On-line help for components -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: -- 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 diff --git a/website/translated_docs/es/Concepts/data-types.md b/website/translated_docs/es/Concepts/data-types.md index 8ac39a33e22ca4..dfdbe921b516ec 100644 --- a/website/translated_docs/es/Concepts/data-types.md +++ b/website/translated_docs/es/Concepts/data-types.md @@ -1,86 +1,84 @@ --- id: data-types -title: Data types overview +title: Tipos de datos --- -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 +En 4D, los datos se manejan según su tipo en dos lugares: los campos de la base y el lenguaje 4D. + +Aunque suelen ser equivalentes, algunos tipos de datos disponibles en la base no están disponibles directamente en el lenguaje y se convierten automáticamente. Por el contrario, algunos tipos de datos sólo pueden manejarse a través del lenguaje. La siguiente tabla lista todos los tipos de datos disponibles y cómo se soportan/declaran: + +| Tipos de datos | Soporte para la base (1) | Soporte para el lenguaje | [declaración `var`](variables.md#using-the-var-keyword) | [declaración `C_` o `ARRAY`](variables.md#using-a-c_-directive) | +| --------------------------------------------- | ------------------------ | -------------------------- | ------------------------------------------------------- | --------------------------------------------------------------- | +| [Alfanumérico](dt_string.md) | Sí | Convertido en texto | - | - | +| [Texto](Concepts/dt_string.md) | Sí | Sí | `Texto` | `C_TEXT`, `ARRAY TEXT` | +| [Fecha](Concepts/dt_date.md) | Sí | Sí | `Fecha` | `C_DATE`, `ARRAY DATE` | +| [Hora](Concepts/dt_time.md) | Sí | Sí | `Hora` | `C_TIME`, `ARRAY TIME` | +| [Booleano](Concepts/dt_boolean.md) | Sí | Sí | `Booleano` | `C_BOOLEAN`, `ARRAY BOOLEAN` | +| [Entero](Concepts/dt_number.md) | Sí | Convertido en entero largo | `Entero` | `ARRAY INTEGER` | +| [Entero largo](Concepts/dt_number.md) | Sí | Sí | `Entero` | `C_LONGINT`, `ARRAY LONGINT` | +| [Entero largo 64 bits](Concepts/dt_number.md) | Sí (SQL) | Convertido en real | - | - | +| [Real](Concepts/dt_number.md) | Sí | Sí | `Real` | `C_REAL`, `ARRAY REAL` | +| [Indefinido](Concepts/dt_null_undefined.md) | - | Sí | - | - | +| [Null](Concepts/dt_null_undefined.md) | - | Sí | - | - | +| [Puntero](Concepts/dt_pointer.md) | - | Sí | `Puntero` | `C_POINTER`, `ARRAY POINTER` | +| [Imagen](Concepts/dt_picture.md) | Sí | Sí | `Imagen` | `C_PICTURE`, `ARRAY PICTURE` | +| [BLOB](Concepts/dt_blob.md) | Sí | Sí | `Blob`, `4D.Blob` | `C_BLOB`, `ARRAY BLOB` | +| [Objeto](Concepts/dt_object.md) | Sí | Sí | `Objeto` | `C_OBJECT`, `ARRAY OBJECT` | +| [Colección](Concepts/dt_collection.md) | - | Sí | `Colección` | `C_COLLECTION` | +| [Variant](Concepts/dt_variant.md)(2) | - | Sí | `Variant` | `C_VARIANT` | + +(1) Tenga en cuenta que ORDA maneja los campos de la base a través de objetos (entidades) y por lo tanto, sólo soporta los tipos de datos disponibles para estos objetos. Para más información, consulte la descripción del tipo de datos [Objeto](Concepts/dt_object.md). + +(2) La variante no es en realidad un tipo de *datos* sino un tipo de *variable* que puede contener un valor de cualquier otro tipo de datos. + +## Valores por defecto + +Cuando las variables se introducen mediante una directiva del compilador, reciben un valor por defecto, que mantendrán durante la sesión mientras no hayan sido asignadas. + +El valor por defecto depende del tipo y la categoría de la variable, su contexto de ejecución (interpretada o compilada), así como, para el modo compilado, las opciones de compilación definidas en la página Compilador de las Propiedades de la base: + +- Las variables proceso e interproceso se ponen siempre "en cero" (lo que significa, según el caso, "0", una cadena vacía, un Blob vacío, un puntero Nil, una fecha en blanco (00-00-00), etc.) +- Se establecen las variables locales: + - en modo interpretado: en cero + - en modo compilado, dependiendo de la opción **Inicializar variables locales** de las Propiedades de la base: + - "en cero": en cero (ver arriba), + - "a un valor aleatorio": 0x72677267 para números y horas, siempre True para booleanos, igual que "en cero" para los demás, + - "no": no hay inicialización, lo que significa que lo que está en la RAM se utiliza para las variables, como los valores utilizados antes para otras variables. **Nota:** 4D recomienda utilizar "en cero". + +La siguiente tabla ilustra estos valores por defecto: + +| Tipo | Interproceso/Proceso (interpretado/compilado), Local (interpretado/compilado "en cero") | Local compilado "aleatorio" | Local compilado "no" | +| ------------ | --------------------------------------------------------------------------------------- | --------------------------- | --------------------------- | +| Booleano | False | True | True (varía) | +| Fecha | 00-00-00 | 00-00-00 | 00-00-00 | +| Entero largo | 0 | 1919382119 | 909540880 (varía) | +| Hora | 00:00:00 | 533161:41:59 | 249345:34:24 (varía) | +| Imagen | picture size=0 | picture size=0 | picture size=0 | +| Real | 0 | 1.250753659382e+243 | 1.972748538022e-217 (varía) | +| Puntero | Nil=true | Nil=true | Nil=true | +| Texto | "" | "" | "" | +| Blob | Tamaño Blob=0 | Tamaño Blob=0 | Tamaño Blob=0 | +| Objeto | null | null | null | +| Colección | null | null | null | +| Variant | indefinido | indefinido | indefinido | + + +## Convertir los tipos de datos + +El lenguaje 4D contiene operadores y comandos para convertir entre tipos de datos, cuando dichas conversiones tienen sentido. El lenguaje 4D aplica la verificación de tipos de datos. Por ejemplo, no se puede escribir: "abc"+0.5+!12/25/96!-?00:30:45?. Esto generará errores de sintaxis. + +La siguiente tabla lista los tipos de datos básicos, los tipos de datos a los que se pueden convertir y los comandos utilizados para hacerlo: + +| Tipos a convertir | en Cadena | en Número | en Fecha | en Hora | en Booleano | +| ----------------- | --------- | --------- | -------- | ------- | ----------- | +| String (1) | | `Num` | `Fecha` | `Hora` | `Bool` | +| Número (2) | `Cadena` | | | | `Bool` | +| Fecha | `Cadena` | | | | `Bool` | +| Hora | `Cadena` | | | | `Bool` | +| Booleano | | `Num` | | | | + +(1) Las cadenas formateadas en JSON pueden convertirse en datos escalares, objetos o colecciones, utilizando el comando `JSON Parse`. + +(2) Los valores de tipo Hora pueden tratarse como números. + +**Nota:** además de las conversiones de datos listadas en esta tabla, se pueden obtener conversiones de datos más sofisticadas combinando operadores y otros comandos. diff --git a/website/translated_docs/es/Concepts/dt_blob.md b/website/translated_docs/es/Concepts/dt_blob.md index 5db336561d1294..1be03f578fc85a 100644 --- a/website/translated_docs/es/Concepts/dt_blob.md +++ b/website/translated_docs/es/Concepts/dt_blob.md @@ -3,64 +3,184 @@ 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. +A BLOB (Binary Large OBject) field, variable or expression is a contiguous series of bytes that can be treated as one whole object, or whose bytes can be addressed individually. -## Parameter passing, Pointers and function results +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. -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. +Like 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. -To pass a BLOB to your own methods, you can also define a pointer to the BLOB and pass the pointer as parameter. +## Blob Types -**Examples:** +Using the 4D language, there are two ways to handle a blob: + +- **as a scalar value**: a blob can be stored in a Blob variable or field and altered. +- **as an object (`4D.Blob`)**: a `4D.Blob` is a blob object. You can encapsulate a blob or part of it in a `4D.Blob` without altering the original blob. This method is called [boxing](https://en.wikipedia.org/wiki/Object_type_(object-oriented_programming)#Boxing). For more info on how to instantiate a `4D.Blob`, see [Blob Class](../API/BlobClass.md). + +Each blob type has its advantages. Use the following table to determine which one suits your needs: + +| | Blob | 4D.Blob | +| ------------------------------------ |:----:|:-------:| +| Alterable | Sí | No | +| Shareable in objects and collections | No | Sí | +| Passed by reference\* | No | Sí | +| Performance when accessing bytes | + | - | +| Maximum size | 2GB | Memory | + +\*Unlike the 4D commands designed to take a scalar blob as a parameter, passing a scalar blob to a method duplicates it in memory. When working with methods, using blob objects (`4D.Blob`) is more efficient, as they are passed by reference. + +> By default, 4D sets the maximum size of scalar blobs to 2GB, but this size limit may be lower depending on your OS and how much space is available. + +You cannot use operators on blobs. + +## Checking if a variable holds a scalar blob or a `4D.Blob` + +Use the [Value type](https://doc.4d.com/4dv19R/help/command/en/page1509.html) command to determine if a value is of type Blob or Object. To check that an object is a blob object (`4D.Blob`), use [OB instance of](https://doc.4d.com/4dv19R/help/command/en/page1731.html): ```4d - ` Declare a variable of type BLOB - C_BLOB(anyBlobVar) - ` The BLOB is passed as parameter to a 4D command - SET BLOB SIZE(anyBlobVar;1024*1024) - ` The BLOB is passed as parameter to an external routine - $errCode:=Do Something With This BLOB(anyBlobVar) - ` The BLOB is passed as a parameter to a method that returns a BLOB - C_BLOB(retrieveBlob) - retrieveBlob:=Fill_Blob(anyBlobVar) - ` A pointer to the BLOB is passed as parameter to a user method - COMPUTE BLOB(->anyBlobVar) +var $myBlob: Blob +var $myBlobObject: 4D.Blob + +$type:= Value type($myblobObject) // 38 (object) +$is4DBlob:= OB Instance of($myblobObject; 4D.Blob) //True ``` -**Note for Plug-in developers:** A BLOB parameter is declared as “&O†(the letter “Oâ€, not the digit “0â€). +## Passing blobs as parameters -## Assignment operator +Scalar blobs and blob objects can be passed as parameters to 4D commands or plug-in routines that expect blob parameters. -You can assign BLOBs to each other. +### Passing blobs and blob objects to 4D commands -**Example:** +You can pass a scalar blob or a `4D.Blob` to any 4D command that takes a blob as a parameter: ```4d - ` Declare two variables of type BLOB - C_BLOB(vBlobA;vBlobB) - ` Set the size of the first BLOB to 10K - SET BLOB SIZE(vBlobA;10*1024) - ` Assign the first BLOB to the second one - vBlobB:=vBlobA +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text( $myBlob ; UTF8 text without length ) ``` -However, no operator can be applied to BLOBs. +Some 4D commands alter the original blob, and thus do not support the `4D.Blob` type: + +- [DELETE FROM BLOB](https://doc.4d.com/4dv19/help/command/en/page560.html) +- [INSERT IN BLOB](https://doc.4d.com/4dv19/help/command/en/page559.html) +- [INTEGER TO BLOB](https://doc.4d.com/4dv19/help/command/en/page548.html) +- [LONGINT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page550.html) +- [REAL TO BLOB](https://doc.4d.com/4dv19/help/command/en/page552.html) +- [SET BLOB SIZE](https://doc.4d.com/4dv19/help/command/en/page606.html) +- [TEXT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page554.html) +- [VARIABLE TO BLOB](https://doc.4d.com/4dv19/help/command/en/page532.html) +- [LIST TO BLOB](https://doc.4d.com/4dv19/help/command/en/page556.html) +- [SOAP DECLARATION](https://doc.4d.com/4dv19/help/command/en/page782.html) +- [WEB SERVICE SET PARAMETER](https://doc.4d.com/4dv19/help/command/en/page777.html) + +### Passing blobs and blob objects to methods + +You can pass blobs and blob objects (`4D.Blob`) to methods. Keep in mind that unlike blob objects, which are passed by reference, scalar blobs are duplicated in memory when passed to methods. + +### Passing a scalar blob by reference using a pointer + +To pass a scalar blob to your own methods without duplicating it in memory, define a pointer to the variable that stores it and pass the pointer as a parameter. -## Addressing BLOB contents +**Ejemplos:** -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: +```4d +// Declare a variable of type Blob +var $myBlobVar: Blob +// Pass the blob as parameter to a 4D command + SET BLOB SIZE($myBlobVar;1024*1024) +``` + +```4d +// Pass the blob as parameter to an external routine + $errCode:=Do Something With This blob($myBlobVar) +``` + +```4d +// Pass the blob as a parameter to a method that returns a blob + var $retrieveBlob: Blob + retrieveBlob:=Fill_Blob($myBlobVar) +``` ```4d - ` Declare a variable of type BLOB - C_BLOB(vBlob) - ` Set the size of the BLOB to 256 bytes - SET BLOB SIZE(vBlob;256) - ` The loop below initializes the 256 bytes of the BLOB to zero - For(vByte;0;BLOB size(vBlob)-1) - vBlob{vByte}:=0 +// Pass a pointer to the blob as a parameter to your own method, +COMPUTE BLOB(->$myBlobVar) +``` + +**Nota para los desarrolladores de plugins:** un parámetro BLOB se declara como "&O" (la letra "O", no el dígito "0"). + +## Assigning a blob variable to another + +You can assign a Blob variable to another: + +**Ejemplo:** + +```4d +// Declare two variables of type Blob + var $vBlobA; $vBlobB : Blob +// Set the size of the first blob to 10K + SET BLOB SIZE($vBlobA;10*1024) +// Assign the first blob to the second one + $vBlobB:=$vBlobA +``` + +## Automatic conversion of blob type + +4D automatically converts scalar blobs to blob objects, and vice versa, when they're assigned to each other. Por ejemplo: + +```4d +// Create a variable of type Blob and an object variable +var $myBlob: Blob +var $myObject : Object + +// Assign that blob to a property of $myObject named "blob" +$myObject:=New object("blob"; $myBlob) + +// The blob stored in $myBlob is automatically converted to a 4D.Blob +$type:= OB Instance of($myObject.blob; 4D.Blob) //True + +// Conversion from 4D.Blob to Blob +$myBlob:= $myObject.blob +$type:= Value type($myBlob) // Blob +``` + +> When converting a `4D.Blob` to a scalar blob, if the size of the `4D.Blob` exceeds the maximum size for scalar blobs, the resulting scalar blob is empty. For example, when the maximum size for scalar blobs is 2GB, if you convert a `4D.Blob` of 2.5GB to a scalar blob, you obtain an empty blob. + +## Modifying a scalar blob + +Unlike blob objects, scalar blobs can be altered. Por ejemplo: + +```4d +var $myBlob : Blob +SET BLOB SIZE ($myBlob ; 16*1024) +``` + +## Individually accessing bytes in a blob + +#### Accessing a scalar blob's bytes + +You can access individual bytes of a scalar blob using curly brackets. Within a blob, bytes are numbered from 0 to N-1, where N is the size of the BLOB: + +```4d + // Declare a variable of type Blob + var $vBlob : Blob + // Set the size of the blob to 256 bytes + SET BLOB SIZE($vBlob;256) + // The following code loops through the blob to set each byte to 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 +Since you can address all the bytes of a blob individually, you can store whatever you want in a Blob variable or field. + +#### Accessing a `4D.Blob`'s bytes + +Use square brackets to directly access a specific byte in a `4D.Blob` + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text ( $myBlob ; UTF8 text without length ) +$byte:=$myBlob[5] +``` + +Since a `4D.Blob` cannot be altered, you can read the bytes of a `4D.Blob` using this syntax, but not modify them. diff --git a/website/translated_docs/es/Concepts/dt_boolean.md b/website/translated_docs/es/Concepts/dt_boolean.md index 0d6ab9c850c7ee..7ff38db23cd157 100644 --- a/website/translated_docs/es/Concepts/dt_boolean.md +++ b/website/translated_docs/es/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. +Un campo, variable o expresión booleana puede ser TRUE o FALSE. -## Boolean functions +## Funciones 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 ofrece las funciones booleanas `True`, `False` y `Not` en el tema dedicado **Booleanos**. Para más información, consulte las descripciones de estos comandos -### Example +### Ejemplo -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. +Este ejemplo define una variable booleana basada en el valor de un botón. Devuelve True en myBoolean si el botón myButton fue presionado y False si el botón no fue presionado. Cuando se hace clic en un botón, la variable del botón toma el valor 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) //Si se ha presionado el botón + myBoolean:=True //myBoolean toma el valor True + Else //Si el botón no fue pulsado + myBoolean:=False //myBoolean toma el valor False End if ``` -The previous example can be simplified into one line. +El ejemplo anterior puede simplificarse en una línea. ```4d myBoolean:=(myButton=1) ``` -## Logical operators +## Operadores lógicos -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 soporta dos operadores lógicos que trabajan sobre expresiones booleanas: la conjunción (AND) y la disyunción inclusiva (OR). Un AND lógico devuelve TRUE si ambas expresiones son TRUE. Un OR lógico devuelve TRUE si al menos una de las expresiones es TRUE. La siguiente tabla muestra los 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 | +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| --------- | ------------------------- | -------- | ---------------------------- | ----- | +| AND | Booleano & Booleano | Booleano | ("A" = "A") & (15 # 3) | True | +| | | | ("A" = "B") & (15 # 3) | False | +| | | | ("A" = "B") & (15 = 3) | False | +| O | Booleano | Booleano | 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: +La siguiente es la tabla de verdad del 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: +La siguiente es la tabla de verdad del 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: +**Consejo:** si necesita calcular la conjunción exclusiva entre Expr1 y Expr2, escriba: ```4d (Expr1|Expr2) & Not(Expr1 & Expr2) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/es/Concepts/dt_collection.md b/website/translated_docs/es/Concepts/dt_collection.md index 79186bb90f8038..88a4adc5d9fe77 100644 --- a/website/translated_docs/es/Concepts/dt_collection.md +++ b/website/translated_docs/es/Concepts/dt_collection.md @@ -1,38 +1,38 @@ --- -id: collection -title: Collection +id: colección +title: Colección --- -Collections are ordered lists of values of similar or mixed types (text, number, object, boolean, collection, or null). +Las colecciones son listas ordenadas de valores de tipos similares o diferentes (texto, número, fecha, objeto, booleano, colección o null). -To manage Collection type variables you must use object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). +Para manipular las variables de tipo Colección, debe utilizar la notación objeto (ver [Sintaxis-básica](Conceptos/dt_object.md#sintaxis-básica)). -To access a collection element, you need to pass the element number inside square brackets: +Para acceder a un elemento de la colección, hay que pasar el número del elemento entre corchetes: ```4d collectionRef[expression] ``` -You can pass any valid 4D expression which returns a positive integer in expression. Examples: +Puede pasar toda expresión 4D válida que devuelva un entero positivo en *expresión*. Ejemplos: ```4d - myCollection[5] //access to 6th element of the collection + myCollection[5] //acceso al 6º elemento de la colección myCollection[$var] ``` -**Warning:** Collection elements are numbered from 0. +**Atención:** los elementos de la colección están numerados desde 0. -You can assign a value to a collection element or get a collection element value using object notation: +Puede asignar un valor a un elemento de la colección u obtener el valor de un elemento de colección: ```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: +Si se asigna un índice de elemento que sobrepasa el último elemento existente de la colección, la colección se redimensiona automáticamente y a todos los nuevos elementos intermedios se les asigna un valor nulo: ```4d - C_COLLECTION(myCol) + var myCol : Collection myCol:=New collection("A";"B") myCol[5]:="Z" //myCol[2]=null @@ -40,56 +40,56 @@ If you assign an element's index that surpasses the last existing element of the //myCol[4]=null ``` -## Initialization +## Inicialización -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. +Las colecciones deben haber sido inicializadas, por ejemplo utilizando el comando `New collection`, de lo contrario al intentar leer o modificar sus elementos se generará un error de sintaxis. -Example: +Ejemplo: ```4d - C_COLLECTION($colVar) //creation of collection type 4D variable + var $colVar : Collection //creation of collection type 4D variable $colVar:=New collection //initialization of the collection and assignment to the 4D variable ``` -### Regular or shared collection +### Colección estándar o compartida -You can create two types of collections: +Puede crear dos tipos de colecciones: -- 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. +- regular (non-shared) collections, using the [`New collection`](API/CollectionClass.md#new-collection) command. Estas colecciones pueden ser editadas sin ningún control de acceso específico, pero no pueden ser compartidas entre procesos. +- shared collections, using the [`New shared collection`](API/CollectionClass.md#new-shared-collection) command. Estas colecciones pueden ser compartidas entre procesos, incluidos los hilos apropiativos. El acceso a estas colecciones se controla mediante estructuras [`Use...End use`](Concepts/shared.md#useend-use). -## Collection methods +Para más información, consulte la sección [Objetos y colecciones compartidos](Concepts/shared.md). -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: +## Funciones de colección -> {$result:=}myCollection.memberFunction( {params} ) +Las referencias a colecciones 4D se benefician de funciones de clase específicas (a veces llamados *funciones métodos*). Collection functions are listed in the [Class API Reference](API/CollectionClass.md) section. -Note that, even if it does not have parameters, a member function must be called with () parenthesis, otherwise a syntax error is generated. - -For example: +Por ejemplo: ```4d -$newCol:=$col.copy() //deep copy of $col to $newCol -$col.push(10;100) //add 10 and 100 to the collection +$newCol:=$col.copy() //copia de $col a $newCol +$col.push(10;100) //añade de 10 y 100 a la colección ``` -Some methods return the original collection after modification, so that you can run the calls in a sequence: +Ciertas funciones devuelven la colección original después de la modificación, para que pueda ejecutar las llamadas en una secuencia: ```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 rutaPropiedad + + +Varias funciones aceptan una _propertyPath_ como parámetro. Este parámetro significa: -- 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". +- o bien un nombre de propiedad del objeto, por ejemplo "apellido" +- o una ruta de propiedades del objeto, es decir, una secuencia jerárquica de subpropiedades vinculadas con caracteres de punto, por ejemplo "empleado.hijos.nombre". -**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: +**Atención:** cuando se utilizan funciones y parámetros propertyPath, no se puede utilizar ".", "[ ]", o espacios en los nombres de las propiedades ya que impedirá que 4D analice correctamente la ruta: ```4d - $vmin:=$col.min("My.special.property") //undefined + $vmin:=$col.min("My.special.property") //indefinido $vmin:=$col.min(["My.special.property"]) //error ``` \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/dt_date.md b/website/translated_docs/es/Concepts/dt_date.md index cf3e890c6e6d19..f3cd1e8f4eb227 100644 --- a/website/translated_docs/es/Concepts/dt_date.md +++ b/website/translated_docs/es/Concepts/dt_date.md @@ -1,16 +1,17 @@ --- -id: date -title: Date +id: fecha +title: Fecha --- -- 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. +Las variables, campos o expresiones de tipo fecha pueden estar comprendidas entre 1/1/100 y 31/12/32.767. -**Note:** In the 4D Language Reference manual, Date parameters in command descriptions are denoted as Date, except when marked otherwise. +Aunque el modo de representación de fechas por C_DATE permite trabajar con fechas hasta el año 32 767, ciertas operaciones que pasan por el sistema imponen un límite inferior. -## Date literals +**Nota:** en el manual de Referencia del Lenguaje 4D, los parámetros de tipo Fecha en las descripciones de los comandos se denominan Fecha, salvo que se indique lo contrario. -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: +## Constantes literales de tipo fecha + +Una constante literal de tipo fecha está rodeada de signos de exclamación (!...!). Una fecha debe estar estructurada utilizando el formato ISO (!AAAA-MM-DD!). Estos son algunos ejemplos de constantes de fechas: ```4d !1976-01-01! @@ -18,31 +19,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 +Una fecha nula es especificada por _!00-00-00!_. + +**Consejo:** el Editor de métodos incluye un acceso directo para introducir una fecha nula. Para escribir una fecha nula, introduzca el carácter de exclamación (!) y pulse Intro. + +**Notas:** + +- Por razones de compatibilidad, 4D acepta que se introduzcan años de dos dígitos. Se asume que un año de dos dígitos se encuentra en el siglo XX o en el XXI según sea mayor o menor de 30, a menos que esta configuración por defecto se haya cambiado utilizando el comando `SET DEFAULT CENTURY`. +- Si ha marcado la opción "Utilizar la configuración regional del sistema" ( ver Página Métodos), debe utilizar el formato de fecha definido en su sistema. Generalmente, en un entorno estadounidense, las fechas se introducen en la forma mes/día/año, con una barra "/" que separa los valores. + +## Operadores de fechas + +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| ----------------- | ---------------- | -------- | ---------------------------- | ------------ | +| Diferencia | Fecha – Fecha | Número | !2017-01-20! - !2017-01-01! | 19 | +| Adición | Fecha + Número | Fecha | !2017-01-20! + 9 | !2017-01-29! | +| Resta | Fecha - Número | Fecha | !2017-01-20! - 9 | !2017-01-11! | +| Igual | Fecha = Fecha | Booleano | !2017-01-01! =!2017-01-01! | True | +| | | | !2017-01-20! = !2017-01-01! | False | +| Desigualdad | Fecha # Fecha | Booleano | !2017-01-20! # !2017-01-01! | True | +| | | | !2017-01-20! # !2017-01-20! | False | +| Mayor que | Fecha > Fecha | Booleano | !2017-01-20! > !2017-01-01! | True | +| | | | !2017-01-20! > !2017-01-20! | False | +| Menor que | Fecha < Fecha | Booleano | !2017-01-01! < !2017-01-20! | True | +| | | | !2017-01-20! < !2017-01-20! | False | +| Mayor o igual que | Fecha >= Fecha | Booleano | !2017-01-20! >=!2017-01-01! | True | +| | | | !2017-01-01!>=!2017-01-20! | False | +| Menor o igual que | Fecha \<= Fecha | Booleano | !2017-01-01!\<=!2017-01-20! | True | +| | | | !2017-01-20!\<=!2017-01-01! | False | diff --git a/website/translated_docs/es/Concepts/dt_null_undefined.md b/website/translated_docs/es/Concepts/dt_null_undefined.md index 3c499a1275db22..2377d106b23aa1 100644 --- a/website/translated_docs/es/Concepts/dt_null_undefined.md +++ b/website/translated_docs/es/Concepts/dt_null_undefined.md @@ -1,25 +1,27 @@ --- id: null-undefined -title: Null and Undefined +title: Null e indefinido --- +Null e Indefinido son tipos de datos que manejan los casos en los que no se conoce el valor de una expresión. + ## 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 es un tipo de datos especial con un solo valor posible: **null**. Este valor es devuelto por una expresión que no contiene ningún 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: +En el lenguaje 4D y para los atributos de los campos de los objetos, los valores nulos se gestionan a través de la función `Null`. Esta función puede utilizarse con las siguientes expresiones para definir o comparar el valor nulo: -- object attributes -- collection elements -- variables of the object, collection, pointer, picture, or variant type. +- atributos de objetos +- elementos de colecciones +- variables de tipo objeto, colección, puntero, imagen o 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 no es realmente un tipo de datos. Denota una variable que aún no ha sido definida. Una función (un método proyecto que devuelve un resultado) puede devolver un valor indefinido si, dentro del método, se asigna al resultado de la función ($0) una expresión indefinida (una expresión calculada con al menos una variable indefinida). Un campo no puede ser indefinido (el comando `Undefined` siempre devuelve False para un campo). Una variable variant tiene **indefinido** como valor por defecto. -## Examples +## Ejemplos -Here are the different results of the `Undefined` command as well as the `Null` command with object properties, depending on the context: +Aquí están los diferentes resultados del comando `Undefined` así como del comando `Null` con las propiedades de los objetos, dependiendo del contexto: ```4d C_OBJECT($vEmp) @@ -35,4 +37,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/es/Concepts/dt_number.md b/website/translated_docs/es/Concepts/dt_number.md index 100a3982b80996..5ab333f0e13657 100644 --- a/website/translated_docs/es/Concepts/dt_number.md +++ b/website/translated_docs/es/Concepts/dt_number.md @@ -1,23 +1,24 @@ --- id: number -title: Number (Real, Longint, Integer) +title: Número (Real, Entero largo, Entero) --- -Number is a generic term that stands for: +Número es un término 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). +- Los campos, variables o expresiones de tipo real. El rango del tipo Real es ±1,7e±308 (13 dígitos significativos). +- Los campos, variables o expresiones de tipo Entero largo. El rango para el tipo de datos Entero largo (4 bytes) es -2^31..(2^31)-1. +- Los campos, variables o expresiones de tipo Entero. El rango para el tipo de datos Entero (2 bytes) es -32.768..32.767 (2^15..(2^15)-1). -**Note:** Integer field values are automatically converted in Long integers when used in the 4D Language. +**Nota:** los valores de los campos enteros se convierten automáticamente en enteros largos cuando se utilizan en el lenguaje 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. +Puede asignar cualquier tipo de dato numérico a otro; 4D realiza la conversión, truncando o redondeando si es necesario. Sin embargo, cuando los valores están fuera del rango, la conversión no devolverá un valor válido. Se pueden mezclar los tipos de datos numéricos en las expresiones. -**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:** en el manual de referencia del lenguaje 4D, sin importar el tipo de datos real, los parámetros de tipo Real, Entero y Entero largo en las descripciones de los comandos se indican como número, salvo que se indique lo contrario. -## Number literals -A numeric literal constant is written as a real number. Here are some examples of numeric constants: +## Constantes literales numéricas + +Una constante literal numérica se escribe como un número real. Estos son algunos ejemplos 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. +> El separador decimal por defecto es el punto (.), independientemente del lenguaje del sistema. Si ha marcado la opción "Utilizar la configuración regional del sistema" en la página de Métodos de las Preferencias, debe utilizar el separador definido en su sistema. -Negative numbers are specified with the minus sign (-). For example: +Los números negativos se especifican con el signo menos (-). Por ejemplo: ```4d -27 @@ -35,151 +36,113 @@ Negative numbers are specified with the minus sign (-). For example: -0.0076 ``` -## Number operators +## Operadores numéricos + +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| ----------------- | ---------------- | -------- | --------- | ----- | +| Adición | Número + Número | Número | 2 + 3 | 5 | +| Resta | Número - Número | Número | 3 – 2 | 1 | +| Multiplicación | Número * Número | Número | 5 * 2 | 10 | +| División | Número / Número | Número | 5 / 2 | 2.5 | +| División entera | Número \ Número | Número | 5 \ 2 | 2 | +| Módulo | Número % Número | Número | 5 % 2 | 1 | +| Exponenciación | Número ^ Número | Número | 2 ^ 3 | 8 | +| Igual | Número = Número | Booleano | 10 = 10 | True | +| | | | 10 = 11 | False | +| Desigualdad | Número # Número | Booleano | 10 #11 | True | +| | | | 10 # 10 | False | +| Mayor que | Número > Número | Booleano | 11 > 10 | True | +| | | | 10 > 11 | False | +| Menor que | Número < Número | Booleano | 10 < 11 | True | +| | | | 11 < 10 | False | +| Mayor o igual que | Número >= Número | Booleano | 11 >= 10 | True | +| | | | 10 >= 11 | False | +| Menor o igual que | Número <= Número | Booleano | 10 <= 11 | True | +| | | | 11 <= 10 | False | + +El operador modulo % divide el primer número entre el segundo y devuelve un resto de número entero. He aquí algunos ejemplos: + +- 10 % 2 devuelve 0 porque 10 está dividido uniformemente por 2. +- 10 % 3 devuelve 1 porque el resto es 1. +- 10,5 % 2 devuelve 0 porque el resto no es un número entero. + +**ATENCIÓN:** +- El operador modulo % devuelve valores significativos con números que están en el rango de los enteros largos (de –2^31 hasta 2^31 menos 1). Para calcular el módulo con números fuera de este rango, utilice el comando `Mod`. +- El operador de división entero largo \ devuelve valores significativos sólo con números enteros. + +### Prioridad + +El orden en que se evalúa una expresión se llama prioridad. 4D tiene una precedencia estricta de izquierda a derecha, en la que no se aplica el orden algebraico. Por ejemplo: -| 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 +``` +devuelve 35, porque la expresión se evalúa como 3 + 4, dando como resultado 7, que luego se multiplica por 5, con el 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 la precedencia de izquierda a derecha, DEBE utilizar paréntesis. Por ejemplo: -- 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:** +devuelve 23 porque la expresión (4 * 5) se evalúa primero, debido a los paréntesis. El resultado es 20, que se suma a 3 para el 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. +Los paréntesis pueden anidarse dentro de otros conjuntos de paréntesis. Asegúrese de que cada paréntesis de la izquierda tenga un paréntesis de la derecha que coincida para garantizar la evaluación correcta de las expresiones. La falta o el uso incorrecto de los paréntesis puede provocar resultados inesperados o expresiones no válidas. Además, si pretende compilar sus aplicaciones, debe tener paréntesis coincidentes: el compilador detecta la falta de paréntesis como un error de sintaxis. -### 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 de bits -```4d - 3+4*5 -``` +Los operadores de bits operan sobre expresiones o valores **Entero largo**. -returns 35, because the expression is evaluated as 3 + 4, yielding 7, which is then multiplied by 5, with the final result of 35. +> Si se pasa un valor de tipo Entero o Real a un operador de tipo bit, 4D evalúa el valor como un valor de tipo Entero Largo antes de calcular el resultado de la expresión. -To override the left-to-right precedence, you MUST use parentheses. For example: +Cuando se utilizan los operadores de bits, hay que pensar en un valor de tipo Entero largo como un array de 32 bits. Los bits están numerados de 0 a 31, de derecha a izquierda. -```4d - 3+(4*5) -``` +Dado que cada bit puede ser igual a 0 o 1, también se puede pensar en un valor Entero largo como un valor en el que se pueden almacenar 32 valores booleanos. Un bit igual a 1 significa **Verdadero** y un bit igual a 0 significa **Falso**. + +Una expresión que utiliza un operador bitwise devuelve un valor Entero largo, excepto para el operador Bit Test, donde la expresión devuelve un valor Booleano. La siguiente tabla lista los operadores a nivel de bits y su sintaxis: + +| Operación | Operador | Sintaxis | Devuelve | +| ----------------- | --------- | ------------------- | --------------------- | +| Y | & | Long & Long | Largo | +| O (inclusive) | | | Long | Long | Largo | +| O (exclusivo) | \^| | Long \^| Long | Largo | +| 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) | +| Poner el bit en 0 | ?- | Long ?- Long | Long (ver nota 2) | +| Probar bit | ?? | Largo?? Largo | Booleano (ver nota 2) | + +#### Notas + +1. Para las operaciones `Left Bit Shift` and `Right Bit Shift`, el segundo operando indica el número de posiciones en que se desplazarán los bits del primer operando en el valor resultante. Por lo tanto, este segundo operando debe estar entre 0 y 31. Tenga en cuenta, sin embargo, que el desplazamiento de 0 devuelve un valor sin cambios y el desplazamiento de más de 31 bits devuelve 0x00000000 porque todos los bits se pierden. Si se pasa otro valor como segundo operando, el resultado no es significativo. +2. En las operaciones `Bit Set`, `Bit Clear` y `Bit Test` , el segundo operando indica el número del bit sobre el que hay que actuar. Por lo tanto, este segundo operando debe estar entre 0 y 31; de lo contrario, el resultado de la expresión no es significativo. + + + +La siguiente tabla lista los operadores a nivel de bits y sus efectos: + +| Operación | Descripción | +| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Y | Cada bit resultante es el resultado de la operación AND lógica aplicada a los bits de los dos operandos.

    Aquí está la tabla del AND lógico:

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

    Es decir, el bit resultante es 1 si los dos bits del operando son 1; en caso contrario, el bit resultante es 0. | +| O (inclusive) | Cada bit resultante es el resultado de la operación OR lógica aplicada a los dos bits operandos.

    Aquí está la tabla del OR lógico:

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

    Es decir, el bit resultante es 1 si al menos uno de los dos bits del operando es 1; en caso contrario, el bit resultante es 0. | +| O (exclusivo) | Cada bit resultante es el resultado de la operación XOR lógica aplicada a los dos bits operandos.

    Aquí está la tabla del XOR lógico:

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

    Es decir, el bit resultante es 1 si solo uno de los dos bits del operando es 1; en caso contrario, el bit resultante es 0. | +| Left Bit Shift | El valor resultante se ajusta al valor del primer operando, luego los bits resultantes se desplazan a la izquierda el número de posiciones indicado por el segundo operando. Los bits de la izquierda se pierden y los nuevos bits de la derecha se ponen en 0.

    **Nota:** teniendo en cuenta sólo los valores positivos, desplazar a la izquierda N bits es lo mismo que multiplicar por 2^N. | +| Right Bit Shift | El valor resultante se ajusta al valor del primer operando, luego los bits resultantes se desplazan a la derecha el número de posición indicado por el segundo operando. Los bits de la derecha se pierden y los nuevos bits de la izquierda se ponen en 0.

    **Nota:** teniendo en cuenta sólo los valores positivos, desplazar a la derecha N bits es lo mismo que dividir por 2^N. | +| Bit Set | El valor resultante se establece en el valor del primer operando, luego el bit resultante, cuyo número es indicado por el segundo operando, se coloca en 1. Los demás bits no se modifican. | +| Poner el bit en 0 | El valor resultante se establece en el valor del primer operando, luego el bit resultante, cuyo número es indicado por el segundo operando, se coloca en 0. Los demás bits no se modifican. | +| Probar bit | Devuelve True si, en el primer operando, el bit cuyo número indica el segundo operando es igual a 1. Devuelve False si, en el primer operando, el bit cuyo número indica el segundo operando es igual a 0. | + +### Ejemplos -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 +| Operación | Ejemplo | Resultado | +| ----------------- | ------------------------------- | ---------- | +| Y | 0x0000FFFF & 0xFF00FF00 | 0x0000FF00 | +| O (inclusive) | 0x0000FFFF | 0xFF00FF00 | 0xFF00FFFF | +| O (exclusivo) | 0x0000FFFF \^| 0xFF00FF00 | 0xFF0000FF | +| Left Bit Shift | 0x0000FFFF << 8 | 0x00FFFF00 | +| Right Bit Shift | 0x0000FFFF >> 8 | 0x000000FF | +| Bit Set | 0x00000000 ?+ 16 | 0x00010000 | +| Poner el bit en 0 | 0x00010000 ?- 16 | 0x00000000 | +| Probar bit | 0x00010000 ?? 16 | True | diff --git a/website/translated_docs/es/Concepts/dt_object.md b/website/translated_docs/es/Concepts/dt_object.md index 0d5a81bb262439..35870f73ecf9b4 100644 --- a/website/translated_docs/es/Concepts/dt_object.md +++ b/website/translated_docs/es/Concepts/dt_object.md @@ -1,107 +1,104 @@ --- -id: object -title: Object +id: objeto +title: Objeto --- -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: +Las variables, campos o expresiones de tipo objeto pueden contener datos de diversos tipos. La estructura de los objetos "nativos" 4D se basa en el principio clásico de los pares "propiedad/valor". La sintaxis de estos objetos se basa en la notación JSON: -- A property name is always a text, for example "Name". +- El nombre de una propiedad es siempre un texto, por ejemplo "Name". Debe seguir [reglas específicas](identifiers.md#object-properties). -- A property value can be of the following type: - - - number (Real, Integer, etc.) - - text +- Un valor de propiedad puede ser del tipo siguiente: + - número (Real, Entero, etc.) + - 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 + - puntero (almacenado como tal, evaluado con el comando `JSON Stringify` o al copiar), + - fecha (tipo fecha o cadena en formato fecha ISO) + - objeto(1) (los objetos pueden ser anidados en varios niveles) + - imagen(2) + - colección -(*)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". +(1)Los objetos ORDA como [entidades](ORDA/dsMapping.md#entity) o las [selecciones de entidades](ORDA/dsMapping.md#entity-selection) no pueden almacenarse en **campos objeto**; sin embargo, se soportan completamente en las **variables objeto** en memoria. -**Warning:** Keep in mind that attribute names differentiate between upper and lower case. +(2)Cuando se expone como texto en el depurador o se exporta a JSON, las propiedades de los objetos de tipo imagen indican "[objeto Imagen]". -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. +**Atención:** recuerde que los nombres de atributos diferencian entre mayúsculas y minúsculas. -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: +Las variables, campos o expresiones de tipo Objeto se gestionan utilizando la [notación objeto](dt_object.md#syntax-basics) o los comandos clásicos disponibles en el tema **Objetos (Lenguaje)**. Tenga en cuenta que se pueden utilizar comandos específicos del tema **Búsquedas**, como `QUERY BY ATTRIBUTE`, `QUERY SELECTION BY ATTRIBUTE`, o `ORDER BY ATTRIBUTE` para llevar a cabo el procesamiento de los campos objetos. -- 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). +Cada valor de propiedad al que se accede a través de la notación de objeto se considera una expresión. Puede utilizar estos valores siempre que se esperen expresiones 4D: -## Initialization +- en código 4D, ya sea escrito en los métodos (editor de métodos) o externalizado (fórmulas, archivos de etiquetas procesados por `PROCESS 4D TAGS` o el servidor web, archivos de exportación, documentos 4D Write Pro...), +- en las áreas de expresiones del depurador y del explorador de ejecución, +- en la lista de propiedades del editor de formularios para los objetos formulario: campo Variable o Expresión, así como diversas expresiones de list box y columnas (fuente de datos, color de fondo, estilo o color de fuente). -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. +## Inicialización -Example: +Los objetos deben haber sido inicializados, por ejemplo utilizando el comando `New object`, de lo contrario al intentar leer o modificar sus propiedades se generará un error de sintaxis. +Ejemplo: ```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) //creación de una variable 4D de tipo objeto + $obVar:=New object //inicialización del objeto y asignación a la variable 4D ``` -### Regular or shared object +### Objeto estándar o compartido -You can create two types of objects: +Puede crear dos 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 estándar (no compartidos), utilizando el comando `New object`. Estos objetos pueden ser editados sin ningún control de acceso específico, pero no pueden ser compartidos entre procesos. +- objetos compartidos, utilizando el comando `New shared object`. Estos objetos pueden ser compartidos entre procesos, incluidos los hilos apropiativos. El acceso a estos objetos se controla mediante estructuras `Use...End use`. Para más información, consulte la sección [Objetos y colecciones compartidos](Concepts/shared.md). -## Syntax basics -Object notation can be used to access object property values through a chain of tokens. +## Principios de la sintaxis -### Object properties +La notación de objetos puede utilizarse para acceder a los valores de las propiedades de objetos a través de una cadena de tokens. -With object notation, object properties can be accessed in two ways: +### Propiedades de los objetos -- using a "dot" symbol: > object.propertyName +Con la notación de objetos, se puede acceder a las propiedades de los objetos de dos maneras: -Example: +- utilizando un símbolo "punto": > object.propertyName +Ejemplo: ```4d employee.name:="Smith" ``` -- using a string within square brackets: > object["propertyName"] - -Examples: +- utilizando una cadena entre corchetes: > object["propertyName"] +Ejemplos: ```4d $vName:=employee["name"] - //or also: + //o también: $property:="name" $vName:=employee[$property] ``` -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: - +Como el valor de una propiedad de objeto puede ser un objeto o una colección, la notación objeto acepta una secuencia de símbolos para acceder a subpropiedades, por ejemplo: ```4d $vAge:=employee.children[2].age ``` +La notación de objetos está disponible en cualquier elemento del lenguaje que pueda contener o devolver un objeto, es decir: -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: +- con los **Objetos** mismos (almacenados en variables, campos, propiedades de objetos, arrays de objetos o elementos de colecciones). Ejemplos: ```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 + $addr:=[Emp]data_obj.address //campo + $city:=$addr.city //propiedad de un objeto + $pop:=$aObjCountries{2}.population //array de objetos + $val:=$myCollection[3].subvalue //elemento de colección ``` +- **comandos 4D** que devuelven objetos. Ejemplo: -- **4D commands** that return objects. Example: ```4d $measures:=Get database measures.DB.tables ``` -- **Project methods** that return objects. Example: +- **Métodos proyecto** que devuelven objetos. Ejemplo: ```4d // MyMethod1 @@ -112,27 +109,25 @@ Object notation is available on any language element that can contains or return $result:=MyMethod1.a //10 ``` -- **Collections** Example: +- **Collections** Ejemplo: ```4d - myColl.length //size of the collection + myColl.length //tamaño de la colección ``` -### Pointers +### Punteros -**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. +**Nota preliminar:** dado que los objetos se pasan siempre por referencia, no suele ser necesario utilizar punteros. Al pasar el objeto, internamente 4D utiliza automáticamente un mecanismo similar a un puntero, minimizando la necesidad de memoria y permitiendo modificar el parámetro y devolver las modificaciones. Como resultado, no es necesario utilizar punteros. Sin embargo, en caso de querer utilizar punteros, se puede acceder a los valores de las propiedades mediante punteros. -Using object notation with pointers is very similar to using object notation directly with objects, except that the "dot" symbol must be omitted. +El uso de la notación de objetos con punteros es muy similar al uso de la notación de objetos directamente con objetos, excepto que el símbolo "punto" debe omitirse. -- Direct access: - - > pointerOnObject->propertyName +- Acceso directo: +> pointerOnObject->propertyName -- Access by name: - - > pointerOnObject->["propertyName"] +- Acceso por nombre: +> pointerOnObject->["propertyName"] -Example: +Ejemplo: ```4d C_OBJECT(vObj) @@ -143,50 +138,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: +Cuando se utiliza la notación de objetos, se soporta el valor **null** con el comando **Null**. Este comando puede utilizarse para asignar o comparar el valor nulo a propiedades de objetos o a elementos de colecciones, por ejemplo: ```4d myObject.address.zip:=Null If(myColl[2]=Null) ``` -For more information, please refer to the `Null` command description. +Para más información, consulte la descripción del comando `Null`. -### Undefined value +### Valor indefinido -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: +La evaluación de una propiedad de un objeto puede producir a veces un valor indefinido. Normalmente, al intentar leer o asignar expresiones indefinidas, 4D generará errores. Esto no ocurre en los siguientes casos: -- 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 `CLEAR VARIABLE` with them: +- La lectura de una propiedad de un objeto o valor indefinido devuelve un indefinido; la asignación de un valor indefinido a variables (excepto arrays) tiene el mismo efecto que llamar `CLEAR VARIABLE` con ellas: ```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.a //$o. es indefinido (no hay error), y la asignación de este valor borra la variable //$val=0 ``` -- Reading the **length** property of an undefined collection produces 0: +- La lectura de la propiedad **length** de una colección indefinida produce 0: ```4d - C_COLLECTION($c) //variable created but no collection is defined + C_COLLECTION($c) //variable creada pero no se ha definido ninguna colección $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. +- Un valor indefinido pasado como parámetro a un método proyecto se convierte automáticamente en 0 o "" según el tipo de parámetro declarado. ```4d C_OBJECT($o) - mymethod($o.a) //pass an undefined parameter + mymethod($o.a) //pasa un parámetro indefinido - //In mymethod method - C_TEXT($1) //parameter type is text - // $1 contains "" + //En el método mymethod + C_TEXT($1) //Parámetro de tipo texto + // $1 contiene "" ``` -- A condition expression is automatically converted to false when evaluating to undefined with the If and Case of keywords: +- Una expresión de condición se convierte automáticamente en falsa cuando se evalúa a indefinido con las palabras clave If y Case of: ```4d C_OBJECT($o) @@ -197,15 +192,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 - - 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 +- La asignación de un valor indefinido a una propiedad de objeto existente reinicializa o borra su valor, dependiendo de su tipo: + - Objeto, colección, puntero: Null + - Imagen: imagen vacía + - Booleano: False + - Cadena: "" + - Número: 0 + - Fecha: !00-00-00! si la opción "Utilizar el tipo fecha en lugar del formato fecha ISO en los objetos" está activada, de lo contrario "" + - Hora: 0 (número de ms) + - Indefinido, Null: sin cambios ```4d C_OBJECT($o) @@ -213,79 +208,66 @@ 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. +- La asignación de un valor indefinido a una propiedad de objeto no existente no hace 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: +Cuando se esperan expresiones de un tipo determinado en su código 4D, puede asegurarse de que tienen el tipo correcto incluso cuando se evalúan como indefinidas, rodeándolas con el comando de transformación 4D apropiado: `String`, `Num`, `Date`, `Time`, `Bool`. Estos comandos devuelven un valor vacío del tipo especificado cuando la expresión se evalúa como indefinida. Por ejemplo: ```4d - $myString:=Lowercase(String($o.a.b)) //make sure you get a string value even if undefined - //to avoid errors in the code + $myString:=Lowercase(String($o.a.b)) //asegurarse de obtener un valor de cadena aunque sea indefinido + //para evitar errores en el código ``` -## 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): - -- 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. -**Note:** +## Ejemplos -- 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. +La utilización de la notación de objetos simplifica el código 4D en el manejo de los mismos. Sin embargo, tenga en cuenta que la notación basada en comandos sigue siendo totalmente soportada. -## Examples - -Using object notation simplifies the 4D code while handling objects. Note however that the command-based notation is still fully supported. - -- Writing and reading objects (this example compares object notation and command notation): +- Escritura y lectura de propiedades de objetos (este ejemplo compara la notación de objetos y la notación de comandos): ```4d - // Using the object notation - C_OBJECT($myObj) //declares a 4D variable object - $myObj:=New object //creates an object and assigns to the variable + // Utilizando la notación de objeto + C_OBJECT($myObj) //declaración de una variable objeto 4D + $myObj:=New object //crea un objeto y lo asigna a la variable $myObj.age:=56 $age:=$myObj.age //56 - // Using the command notation - C_OBJECT($myObj2) //declares a 4D variable object - OB SET($myObj2;"age";42) //creates an object and adds the age property + // Usando la notación por comando + C_OBJECT($myObj2) //declara una variable objeto 4D + OB SET($myObj2;"age";42) //crea un objeto y añade la propiedad age $age:=OB Get($myObj2;"age") //42 - // Of course, both notations can be mixed + // Por supuesto, se pueden mezclar ambas notaciones C_OBJECT($myObj3) OB SET($myObj3;"age";10) $age:=$myObj3.age //10 ``` -- Create a property and assign values, including objects: +- Creación de propiedades y asignación de valores, incluyendo objetos: ```4d C_OBJECT($Emp) $Emp:=New object - $Emp.city:="London" //creates the city property and sets its value to "London" - $Emp.city:="Paris" //modifies the city property + $Emp.city:="London" //crea la propiedad city con el valor "London" + $Emp.city:="Paris" //modifica la propiedad city $Emp.phone:=New object("office";"123456789";"home";"0011223344") - //creates the phone property and sets its value to an object + //crea la propiedad phone y define su valor para un objeto ``` -- Get a value in a sub-object is very simple using the object notation: +- Obtener un valor en un subobjeto es muy sencillo utilizando la notación de objetos: ```4d $vCity:=$Emp.city //"Paris" $vPhone:=$Emp.phone.home //"0011223344" ``` - -- You can access properties as strings using the [ ] operator +- Puede acceder a las propiedades como cadenas utilizando el operador [ ] ```4d - $Emp["city"]:="Berlin" //modifies the city property - //this can be useful for creating properties through variables + $Emp["city"]:="Berlin" //modifica la propiedad city + //esto puede ser útil para crear propiedades a través de variables C_TEXT($addr) $addr:="address" For($i;1;4) - $Emp[$addr+String($i)]:="" + $Emp[$addr+String($i)]:=" End for - // creates 4 empty properties "address1...address4" in the $Emp object -``` \ No newline at end of file + // crea 4 propiedades vacías "dirección1...dirección4" en el objeto $Emp +``` diff --git a/website/translated_docs/es/Concepts/dt_picture.md b/website/translated_docs/es/Concepts/dt_picture.md index ecb8d4d42162e7..0e4bdaf0355830 100644 --- a/website/translated_docs/es/Concepts/dt_picture.md +++ b/website/translated_docs/es/Concepts/dt_picture.md @@ -1,129 +1,119 @@ --- -id: picture -title: Picture +id: imagen +title: Imagen --- -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`. +Un campo, variable o expresión de tipo Imagen puede ser cualquier imagen de Windows o Macintosh. En general, esto incluye toda imagen que pueda ser puesta en el portapapeles o leída desde el disco utilizando comandos 4D como `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. +4D utiliza APIs nativas para codificar (escribir) y decodificar (leer) los campos y las variables de las imágenes tanto en Windows como en macOS. Estas implementaciones dan acceso a numerosos formatos nativos, incluido el formato RAW, utilizado actualmente por las cámaras digitales. -* on Windows, 4D uses WIC (Windows Imaging Component). -* on macOS, 4D uses ImageIO. +* en Windows, 4D utiliza WIC (Windows Imaging Component). +* en macOS, 4D utiliza 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. +WIC e ImageIO permiten el uso de metadatos en las imágenes. Dos comandos, `SET PICTURE METADATA` y `GET PICTURE METADATA`, le permiten beneficiarse de los metadatos en sus desarrollos. -## Picture Codec IDs +## Identificadores de códecs de imágenes -4D supports natively a wide set of [picture formats](FormEditor/pictures.md#native-formats-supported), such as .jpeg, .png, or .svg. +4D soporta de forma nativa un amplio conjunto de [formatos de imagen](FormEditor/pictures.md#native-formats-supported), como .jpeg, .png o .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: +Los formatos de imágenes reconocidos por 4D son devueltos por el comando `PICTURE CODEC LIST` como identificadores de códecs de imágenes. Se pueden devolver de las siguientes formas: -* As an extension (for example “.gifâ€) -* As a MIME type (for example “image/jpegâ€) +* Como una extensión (por ejemplo ".gif") +* Como un tipo MIME (por ejemplo, "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. +La forma devuelta para cada formato dependerá de la forma en que se registre el códec a nivel del sistema operativo. Tenga en cuenta que la lista de códecs disponibles para lectura y escritura puede ser diferente, ya que los códecs de codificación pueden requerir licencias específicas. -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. +La mayoría de los comandos de gestión de imágenes [4D](https://doc.4d.com/4Dv18/4D/18/Pictures.201-4504337.en.html) pueden recibir un Codec ID como parámetro. Por lo tanto, es imperativo utilizar el ID del sistema devuelto por el comando `PICTURE CODEC LIST`. Los formatos de imágenes reconocidos por 4D son devueltos por el comando `PICTURE CODEC LIST`. -## 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 | +## Operadores de imágenes -**Notes :** +| Operación | Sintaxis | Devuelve | Acción | +| ------------------------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Concatenación horizontal | Imagen1 + Imagen2 | Imagen | Añadir Imagen2 a la derecha de Imagen1 | +| Concatenación vertical | Imagen1 / Imagen2 | Imagen | Añadir Imagen2 debajo de Imagen1 | +| Superposición exclusiva | Imagen1 & Imagen2 | Imagen | Superpone Imagen2 sobre Imagen1 (Imagen2 en primer plano). Produce el mismo resultado que `COMBINE PICTURES(pict3;pict1;Superimposition;pict2)` | +| Superposición inclusiva | Imagen1 | Imagen2 | Imagen | Superpone Imagen2 sobre Imagen1 y devuelve la máscara resultante si ambas imágenes tienen el mismo tamaño. Produce el mismo resultado que `$equal:=Equal pictures(Pict1;Pict2;Pict3)` | +| Desplazamiento horizontal | Imagen + Número | Imagen | Mover la imagen horizontalmente un Número de píxeles | +| Movimiento vertical | Imagen / Número | Imagen | Mover la imagen verticalmente un Número de píxeles | +| Redimensionamiento | Imagen * Número | Imagen | Redimensiona la imagen según el porcentaje Número | +| Escala horizontal | Imagen *+ Número | Imagen | Redimensionar la imagen horizontalmente al porcentaje Número | +| Escala vertical | Imagen *| Número | Imagen | Redimensionar la imagen verticalmente al porcentaje Número | -- 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. +**Notas:** -### Examples +- Para poder utilizar el operador |, Imag1 e Imag2 deben tener exactamente la misma dimensión. Si ambas imágenes tienen un tamaño diferente, la operación Imagen1 | Imagen2 produce una imagen en blanco. +- El comando `COMBINE PICTURES` puede utilizarse para superponer imágenes manteniendo las características de cada imagen fuente en la imagen resultante. +- Se pueden realizar operaciones adicionales en las imágenes utilizando el comando `TRANSFORM PICTURE`. +- No hay operadores de comparación de imágenes, sin embargo 4D propone el comando `Equal picture` para comparar dos imágenes. -Horizontal concatenation +### Ejemplos + +Concatenación horizontal ```4d - circle+rectangle //Place the rectangle to the right of the circle - rectangle+circle //Place the circle to the right of the rectangle + circle+rectangle //Colocar el rectángulo a la derecha del círculo + rectangle+circle //Colocar el círculo a la derecha del rectángulo ``` - ![](assets/en/Concepts/concatHor.en.png) ![](assets/en/Concepts/concatHor2.en.png) -Vertical concatenation - +Concatenación vertical ```4d - circle/rectangle //Place the rectangle under the circle - rectangle/circle //Place the circle under the rectangle + circle+rectangle //Colocar el rectángulo debajo del círculo + rectangle+circle //Colocar el círculo debajo del rectángulo ``` - ![](assets/en/Concepts/concatVer.en.png) ![](assets/en/Concepts/concatVer2.en.png) -Exclusive superimposition - +Superposición exclusiva ```4d -Pict3:=Pict1 & Pict2 // Superimposes Pict2 on top of Pict1 +Pict3:=Pict1 & Pict2 // Superponer Pict2 sobre Pict1 ``` - ![](assets/en/Concepts/superimpoExc.fr.png) -Inclusive superimposition - +Superposición inclusiva ```4d -Pict3:=Pict1|Pict2 // Recovers resulting mask from superimposing two pictures of the same size +Pict3:=Pict1|Pict2 // Recupera la máscara resultante de la superposición de dos imágenes del mismo tamaño ``` - ![](assets/en/Concepts/superimpoInc.fr.png) -Horizontal move - +Desplazamiento horizontal ```4d -rectangle+50 //Move the rectangle 50 pixels to the right -rectangle-50 //Move the rectangle 50 pixels to the left +rectangle+50 //Mover el rectángulo 50 píxeles a la derecha +rectangle-50 //Mover el rectángulo 50 píxeles a la izquierda ``` - ![](assets/en/Concepts/hormove.en.png) -Vertical move +Movimiento vertical ```4d -rectangle/50 //Move the rectangle down by 50 pixels -rectangle/-20 //Move the rectangle up by 20 pixels +rectangle/50 //Mover el rectángulo 50 píxeles hacia abajo +rectangle/-20 //Mover el rectángulo 20 píxeles hacia arriba ``` - ![](assets/en/Concepts/vertmove.en.png)![](assets/en/Concepts/vertmove2.en.png) -Resize +Redimensionamiento ```4d -rectangle*1.5 //The rectangle becomes 50% bigger -rectangle*0.5 //The rectangle becomes 50% smaller +rectangle*1.5 //El rectángulo se hace un 50% más grande +rectangle*0.5 //El rectángulo se hace un 50% más pequeño ``` - ![](assets/en/Concepts/resize.en.png)![](assets/en/Concepts/resisze2.en.png) -Horizontal scaling +Escala horizontal ```4d -circle*+3 //The circle becomes 3 times wider -circle*+0.25 //The circle's width becomes a quarter of what it was +circle*+3 //El círculo se hace 3 veces más ancho +circle*+0,25 //El ancho del círculo se convierte en una cuarta parte de lo que era ``` ![](assets/en/Concepts/Horscaling.en.png)![](assets/en/Concepts/Horscaling2.en.png) -Vertical scaling +Escala vertical ```4d -circle*|2 //The circle becomes twice as tall -circle*|0.25 //The circle's height becomes a quarter of what it was +circle*|2 //El círculo pasa a ser el doble de alto +circle*|0.25 //La altura del círculo pasa a ser un cuarto de lo que era ``` -![](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/es/Concepts/dt_pointer.md b/website/translated_docs/es/Concepts/dt_pointer.md index f5d4ecff5fea8a..54ef2bad6c23b8 100644 --- a/website/translated_docs/es/Concepts/dt_pointer.md +++ b/website/translated_docs/es/Concepts/dt_pointer.md @@ -1,227 +1,188 @@ --- -id: pointer -title: Pointer +id: puntero +title: Puntero --- -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. +Una variable o expresión puntero es una referencia a otra variable (incluyendo arrays y elementos de arrays), tabla, campo u objeto. No hay ningún campo de tipo Puntero. -Pointers provide an advanced way (in programming) to refer to data. When you use the language, you access various objects—in particular, tables, fields, variables, objects, and arrays—by simply using their names. However, it is often useful to refer to these elements and access them without knowing their names. This is what pointers let you do. +Los punteros ofrecen una forma avanzada (en programación) de referirse a los datos. Cuando se utiliza el lenguaje, se accede a varios objetos -en particular, tablas, campos, variables, objetos y arrays- simplemente utilizando sus nombres. Sin embargo, con frecuencia es útil referirse a estos elementos y acceder a ellos sin conocer sus nombres. Esto es lo que los punteros le permiten hacer. -The concept behind pointers is not that uncommon in everyday life. You often refer to something without knowing its exact identity. For example, you might say to a friend, “Let’s go for a ride in your car†instead of “Let’s go for a ride in the car with license plate 123ABD.†In this case, you are referencing the car with license plate 123ABD by using the phrase “your car.†The phrase “car with license plate 123ABD†is like the name of an object, and using the phrase “your car†is like using a pointer to reference the object. +El concepto de los punteros no es tan raro en la vida cotidiana. A menudo se hace referencia a algo sin conocer su identidad exacta. Por ejemplo, puede decirle a un amigo: "Vamos a dar una vuelta en tu coche" en lugar de "Vamos a dar una vuelta en el coche con matrícula 123ABD." En este caso, se refiere al coche con matrícula 123ABD utilizando la frase " tu coche." La frase "coche con matrícula 123ABD" es como el nombre de un objeto, y usar la frase "tu coche" es como usar un puntero para referenciar el objeto. -Being able to refer to something without knowing its exact identity is very useful. In fact, your friend could get a new car, and the phrase “your car†would still be accurate—it would still be a car and you could still take a ride in it. Pointers work the same way. For example, a pointer could at one time refer to a numeric field called Age, and later refer to a numeric variable called Old Age. In both cases, the pointer references numeric data that could be used in a calculation. +Poder referirse a algo sin conocer su identidad exacta es muy útil. De hecho, su amigo podría comprarse un coche nuevo, y la frase " tu coche" seguiría siendo correcta: seguiría siendo un coche y usted podría seguir dando un paseo en él. Los punteros funcionan de la misma manera. Por ejemplo, un puntero podría referirse en un momento dado a un campo numérico llamado Edad, y más tarde referirse a una variable numérica llamada Vejez. En ambos casos, el puntero hace referencia a datos numéricos que podrían utilizarse en un cálculo. -You can use pointers to reference tables, fields, variables, arrays, array elements, and objects. The following table gives an example of each data type: +Puede utilizar punteros para referenciar tablas, campos, variables, arrays, elementos de arrays y objetos. La siguiente tabla ofrece un ejemplo de cada tipo de datos: -| Type | To Reference | To Use | To Assign | -| ------------- | ----------------------- | ------------------------ | ------------------------ | -| Table | vpTable:=->[Table] | DEFAULT TABLE(vpTable->) | n/a | -| Field | 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" | +| Tipo | Referenciación | Uso | Asignación | +| ----------- | ----------------------- | ------------------------ | ------------------------ | +| Tabla | 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->) | +| Elem. array | vpElem:=->Array{1} | ALERT (vpElem->) | vpElem->:="John" | +| Objeto | vpObj:=->myObject | ALERT (vpObj->myProp) | vpObj->myProp:="John" | -## Using a pointer: Basic example +## Utilizar punteros: ejemplo básico -It is easiest to explain the use of pointers through an example. This example shows how to access a variable through a pointer. We start by creating a variable: +Lo más fácil es explicar el uso de los punteros mediante un ejemplo. Este ejemplo muestra cómo acceder a una variable a través de un puntero. Comenzamos creando una variable: ```4d $MyVar:="Hello" ``` - -$MyVar is now a variable containing the string “Hello.†We can now create a pointer to $MyVar: +$MyVar es ahora una variable que contiene la cadena “Hello.†Ahora podemos crear un puntero a $MyVar: ```4d C_POINTER($MyPointer) $MyPointer:=->$MyVar ``` +El símbolo -> significa "obtener un puntero a." Este símbolo está formado por un guión seguido de un signo "mayor que". En este caso, obtiene el puntero que hace referencia o "apunta" a $MyVar. Este puntero se asigna a MyPointer con el operador de asignación. -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: - +$MyPointer es ahora una variable que contiene un puntero a $MyVar. $MyPointer no contiene " Hello ", que es el valor en $MyVar, pero se puede utilizar $MyPointer para obtener este valor. La siguiente expresión devuelve el valor de $MyVar: ```4d $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: +En este caso, devuelve la cadena "Hello". El símbolo ->, cuando sigue a un puntero, hace referencia al objeto apuntado. Esto se llama desreferenciación. +Es importante entender que se puede utilizar un puntero seguido del símbolo -> en cualquier lugar donde se podría haber utilizado el objeto al que apunta el puntero. Esto significa que podría utilizar la expresión $MyPointer-> en cualquier lugar en el que pudiera utilizar la variable original $MyVar. Por ejemplo, la siguiente línea muestra un cuadro de alerta con la palabra Hello: ```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: - +También puede utilizar $MyPointer para cambiar los datos en $MyVar. Por ejemplo, la siguiente instrucción almacena la cadena "Goodbye" en la 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: +Si examina los dos usos de la expresión $MyPointer->, verá que actúa igual que si hubiera utilizado $MyVar en su lugar. En resumen, las dos líneas siguientes realizan la misma acción: ambas muestran un cuadro de alerta con el valor actual de la variable $MyVar: ```4d ALERT($MyPointer->) ALERT($MyVar) ``` - -The following two lines perform the same action— both assign the string "Goodbye" to $MyVar: - +Las siguientes dos líneas realizan la misma acción - ambas asignan la cadena "Goodbye" a $MyVar: ```4d $MyPointer->:="Goodbye" $MyVar:="Goodbye" ``` -## Pointer operators - -With: +## Operadores en punteros +Con: ```4d - ` vPtrA and vPtrB point to the same object + ` vPtrA y vPtrB apuntan al mismo objeto vPtrA:=->anObject vPtrB:=->anObject - ` vPtrC points to another object + ` vPtrC apunta a otro objeto 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 | - - -## 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: +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| ----------- | ----------------- | -------- | ------------- | ----- | +| Igual | Puntero = Puntero | Booleano | vPtrA = vPtrB | True | +| | | | vPtrA = vPtrC | False | +| Desigualdad | Puntero # Puntero | Booleano | vPtrA # vPtrC | True | +| | | | vPtrA # vPtrB | False | +## Principales usos +### Punteros a tablas +En cualquier lugar en el que el lenguaje espere ver una tabla, se puede utilizar un puntero desreferenciado a la tabla. Se crea un puntero a una tabla utilizando una línea de instrucción como esta: ```4d $TablePtr:=->[anyTable] ``` - -You can also get a pointer to a table by using the `Table` command: - -```4d +También puede obtener un puntero a una tabla utilizando el comando `Table`: +```4d $TablePtr:=Table(20) ``` - -You can use the dereferenced pointer in commands, like this: - -```4d +Puedes utilizar el puntero desreferenciado en los comandos, así: +```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: - +### Punteros a campos +En cualquier lugar en el que el lenguaje espere ver un campo, se puede utilizar un puntero desreferenciado para referenciar el campo. Se crea un puntero a un campo utilizando una línea de instrucción como esta: ```4d $FieldPtr:=->[aTable]ThisField ``` -You can also get a pointer to a field by using the `Field` command, for example: - +También puede obtener un puntero a un campo utilizando el comando `Campo`, por ejemplo: ```4d $FieldPtr:=Field(1;2) ``` -You can use the dereferenced pointer in commands, like this: - +Puedes utilizar el puntero desreferenciado en los comandos, así: ```4d OBJECT SET FONT($FieldPtr->;"Arial") ``` -### Pointers to local variables +### Punteros a variables locales -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: +Cuando se utilizan punteros a variables de proceso o locales, hay que asegurarse de que la variable a la que se apunta ya está definida cuando se utilice el puntero. Tenga en cuenta que las variables locales se borran cuando el método que las creó ha terminado su ejecución y las variables de proceso se borran al final del proceso que las creó. Cuando un puntero llama a una variable que ya no existe, esto provoca un error de sintaxis en modo interpretado (variable no definida) pero puede generar un error más grave en modo compilado. +Los punteros a variables locales permiten guardar las variables del proceso en muchos casos. Los punteros a variables locales sólo pueden utilizarse dentro del mismo proceso. En el depurador, cuando se muestra un puntero a una variable local que ha sido declarada en otro método, el nombre del método original se indica entre paréntesis, después del puntero. Por ejemplo, si se escribe en Method1: ```4d $MyVar:="Hello world" Method2(->$MyVar) ``` - -In Method2, the debugger will display $1 as follows: +En Method2, el depurador mostrará $1 de la siguiente manera: | $1 | ->$MyVar (Method1) | | -- | ------------------ | | | | - -The value of $1 will be: +El valor de 1 dólar será: | $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: - +### Punteros a elementos del array +Puede crear un puntero a un elemento del array. Por ejemplo, las siguientes líneas crean un array y asignan un puntero al primer elemento del array a una variable llamada $ElemPtr: ```4d -ARRAY REAL($anArray;10) //Create an array -$ElemPtr:=->$anArray{1} //Create a pointer to the array element +ARRAY REAL($anArray;10) //Crear un array +$ElemPtr:=->$anArray{1} //Crear un puntero al elemento de array ``` -You could use the dereferenced pointer to assign a value to the element, like this: - +Puede utilizar el puntero desreferenciado para asignar un valor al elemento, así: ```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: - +### Punteros a arrays +Puede crear un puntero a un array. Por ejemplo, las siguientes líneas crean un array y asignan un puntero al array a una variable llamada $ArrPtr: ```4d -ARRAY REAL($anArray;10) //Create an array -$ArrPtr:=->$anArray //Create a pointer to the array +ARRAY REAL($anArray;10) //Crear un array +$ArrPtr:=->$anArray //Crear un puntero al 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: - +Es importante entender que el puntero apunta al array; no apunta a un elemento del array. Por ejemplo, puede utilizar el puntero desreferenciado de las líneas anteriores de esta manera: ```4d -SORT ARRAY($ArrPtr->;>) //Sort the array +SORT ARRAY($ArrPtr->;>) //Ordenar el array ``` - -If you need to refer to the fourth element in the array by using the pointer, you do this: - +Si debe referirse al cuarto elemento del array utilizando el puntero, haga lo siguiente: ```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: - +### Punteros como parámetros a los métodos +Puede pasar un puntero como parámetro de un método. Dentro del método, puede modificar el objeto referenciado por el puntero. Por ejemplo, el siguiente método, `takeTwo`, toma dos parámetros que son punteros. Cambia el objeto referenciado por el primer parámetro a caracteres en mayúsculas, y el objeto referenciado por el segundo parámetro a caracteres en minúsculas. Este es el método del proyecto: ```4d - //takeTwo project method - //$1 – Pointer to a string field or variable. Change this to uppercase. - //$2 – Pointer to a string field or variable. Change this to lowercase. + //Método proyecto takeTwo + //$1 – Puntero a un campo o variable de tipo cadena. Cambia la cadena a mayúsculas. + //$2 - Puntero a un campo o variable de tipo cadena. Cambia la cadena a minúsculas. $1->:=Uppercase($1->) $2->:=Lowercase($2->) ``` -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) - - -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. +La siguiente línea utiliza el método `takeTwo` para cambiar un campo a mayúsculas y para cambiar una variable a minúsculas: +``` +takeTwo(->[myTable]myField;->$MyVar) +``` -### Pointers to pointers +Si el campo [myTable]myField contenía la cadena "jones", se cambiaría por la cadena "JONES". Si la variable $MyVar contenía la cadena "HELLO", se cambiaría por la cadena "hello". -If you really like to complicate things, you can use pointers to reference other pointers. Consider this example: +En el método takeTwo, y de hecho, siempre que se utilicen punteros, es importante que el tipo de datos del objeto al que se hace referencia sea correcto. En el ejemplo anterior, los punteros deben apuntar a algo que contenga una cadena o texto. +### Punteros a punteros +Si realmente le gusta complicar las cosas, puede utilizar punteros para referenciar otros punteros. Considere este ejemplo: ```4d $MyVar:="Hello" $PointerOne:=->$MyVar @@ -229,26 +190,24 @@ If you really like to complicate things, you can use pointers to reference other ($PointerTwo->)->:="Goodbye" ALERT(($PointerTwo->)->) ``` +Muestra un cuadro de alerta con la palabra "Goodbye". -It displays an alert box with the word “Goodbye†in it. - -Here is an explanation of each line of the example: - -- $MyVar:="Hello" --> This line puts the string "Hello" into the variable $MyVar. -- $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. +A continuación se explica cada línea del ejemplo: -The following line puts "Hello" into $MyVar: +- $MyVar:="Hello" --> Esta línea pone la cadena "Hello" en la variable $MyVar. +- $PointerOne:=->$MyVar --> $PointerOne ahora contiene un puntero a $MyVar. +- $PointerTwo:=->$PointerOne --> $PointerTwo (una nueva variable) contiene un puntero a $PointerOne, que a su vez apunta a $MyVar. +- ($PointerTwo->)->:="Goodbye" --> $PointerTwo-> referencia el contenido de $PointerOne, que a su vez referencia $MyVar. Por lo tanto, ($PointerTwo->)-> referencia el contenido de $MyVar. Así que en este caso, a $MyVar se le asigna "Goodbye". +- ALERT (($PointerTwo->)->) --> Lo mismo que: $PointerTwo-> referencia el contenido de $PointerOne, que a su vez referencia $MyVar. Por lo tanto, ($PointerTwo->)-> referencia el contenido de $MyVar. En este caso, la caja de alerta muestra el contenido de $MyVar. +La siguiente línea pone "Hello" en $MyVar: ```4d ($PointerTwo->)->:="Hello" ``` -The following line gets "Hello" from $MyVar and puts it into $NewVar: - - $NewVar:=($PointerTwo->)-> - +La siguiente línea obtiene "Hello de $MyVar y lo pone en $NewVar: +``` +$NewVar:=($PointerTwo->)-> +``` -**Important:** Multiple dereferencing requires parentheses. \ No newline at end of file +**Importante:** la desreferenciación múltiple requiere paréntesis. diff --git a/website/translated_docs/es/Concepts/dt_string.md b/website/translated_docs/es/Concepts/dt_string.md index d816fd1e56b7be..7dab12284bf3ee 100644 --- a/website/translated_docs/es/Concepts/dt_string.md +++ b/website/translated_docs/es/Concepts/dt_string.md @@ -1,100 +1,96 @@ --- -id: string -title: String +id: cadena +title: Cadena --- -String is a generic term that stands for: +Cadena es un término genérico utilizado para: -- Text fields or variables: a Text field, variable, or expression may contain from 0 to 2 GB of text. -- Alphanumeric fields: an Alphanumeric field may contain from 0 to 255 characters (limit set when field is defined). +- Los campos o variables de tipo texto: un campo, variable o expresión de tipo texto puede contener de 0 a 2 GB de texto. +- Campos alfanuméricos: un campo alfanumérico puede contener de 0 a 255 caracteres (límite fijado al definir el campo). -## String literals +## Constantes literales de tipo cadena -A string literal is enclosed in double, straight quotation marks ("..."). Here are some examples of string literals: +Una constante literal de tipo cadena se encierra entre comillas dobles y rectas ("..."). Estos son algunos ejemplos: ```4d -"Add Records" -"No records found." -"Invoice" +"Añadir registros" +"No se han encontrado registros." +"Factura" ``` -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 | -| --------------- | -------------------- | -| \n | LF (Line feed) | -| \t | HT (Tab) | -| \r | CR (Carriage return) | -| \\\ | \ (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 (*) | - - -(*) If the keyword "Mer" is associated with the picture stored in the picture expression (field or variable). - -## String comparisons - -- Strings are compared on a character-by-character basis (except in the case of searching by [keywords](dt_string.md#keywords), see below). -- When strings are compared, the case of the characters is ignored; thus, "a"="A" returns `TRUE`. To test if the case of two characters is different, compare their character codes. For example, the following expression returns `FALSE`: +Una cadena vacía se especifica con dos comillas sin nada entre ellas (""). + +### Secuencias de escape +Las siguientes secuencias de escape pueden utilizarse dentro de las cadenas: + +| Secuencias de escape | Carácter reemplazado | +| -------------------- | -------------------- | +| \n | LF (Retorno línea) | +| \t | HT (Tabulación) | +| \r | CR (Retorno carro) | +| \\\ | \ (Barra invertida) | +| \\" | " (Comillas) | + +**Nota:** el carácter \ (barra invertida) se utiliza como separador en las rutas de acceso en Windows. Por lo tanto, debe utilizar una doble barra invertida \\\ en las rutas cuando quiera tener una barra invertida delante de un caracter utilizado en una de las secuencias de escape reconocidas por 4D (por ejemplo, "C:\\MisDocumentos\\\Nuevos.txt"). + +## Operadores de cadenas + +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| ---------------------- | ---------------- | -------- | ----------------------- | -------- | +| Concatenación | Cadena + Cadena | Cadena | "abc" + "def" | "abcdef" | +| Repetición | Cadena * Número | Cadena | "ab" * 3 | "ababab" | +| Igual | Cadena = Cadena | Booleano | "abc" = "abc" | True | +| | | | "abc" = "abd" | False | +| Desigualdad | Cadena # Cadena | Booleano | "abc" # "abd" | True | +| | | | "abc" # "abc" | False | +| Mayor que | Cadena > Cadena | Booleano | "abd" > "abc" | True | +| | | | "abc" > "abc" | False | +| Menor que | Cadena < Cadena | Booleano | "abc" < "abd" | True | +| | | | "abc" < "abc" | False | +| Mayor o igual que | Cadena >= Cadena | Booleano | "abd" >= "abc" | True | +| | | | "abc" >= "abd" | False | +| Menor o igual que | Cadena <= Cadena | Booleano | "abc" <= "abd" | True | +| | | | "abd" <= "abc" | False | +| Contiene palabra clave | Cadena % Cadena | Booleano | "Alpha Bravo" % "Bravo" | True | +| | | | "Alpha Bravo" % "ravo" | False | +| | Imagen % Cadena | Booleano | Picture_expr % "Mer" | True (*) | + +(*) Si la palabra clave "Mer" está asociada a la imagen almacenada en la expresión imagen (campo o variable). + +## Comparaciones de cadenas + +- Las cadenas se comparan caracter por caracter (excepto en el caso de la búsqueda por [palabras clave](dt_string.md#keywords), ver más abajo). +- Cuando se comparan cadenas, se ignoran las mayúsculas y minúsculas de los caracteres; así, "a"="A" devuelve `TRUE`. Para saber si los caracteres están en mayúsculas o minúsculas, compare sus códigos de caracteres. Por ejemplo, la siguiente expresión devuelve `FALSE`: ```4d -Character code("A")=Character code("a") // because 65 is not equal to 97 +Character code("A")=Character code("a") // porque 65 no es igual a 97 ``` - -- When strings are compared, diacritical characters are taken into account. For example, the following expressions return `TRUE`: +- Cuando se comparan las cadenas, se tienen en cuenta los caracteres diacríticos. Por ejemplo, las siguientes expresiones devuelven `TRUE`: ```4d "n"="ñ" "n"="Ñ" "A"="Ã¥" - // and so on + // etc ``` -**Note:** String comparison takes into account specificities of the language **defined for the 4D data file** (which is not always the same as the language defined for the system). +**Nota:** la comparación de cadenas tiene en cuenta las especificidades del lenguaje **definido para el archivo de datos 4D** (que no siempre es el mismo que el lenguaje definido para el sistema). -### Wilcard character (@) +### Arroba (@) -The 4D language supports **@** as a wildcard character. This character can be used in any string comparison to match any number of characters. For example, the following expression is `TRUE`: +El lenguaje 4D soporta **@** como carácter comodín. Este carácter se puede utilizar en cualquier comparación de cadenas para que coincida con cualquier número de caracteres. Por ejemplo, la siguiente expresión es `TRUE`: ```4d "abcdefghij"="abc@" ``` -The wildcard character must be used within the second operand (the string on the right side) in order to match any number of characters. The following expression is `FALSE`, because the @ is considered only as a one character in the first operand: +El carácter comodín debe utilizarse dentro del segundo operando (la cadena de la derecha) para que coincida con cualquier número de caracteres. La siguiente expresión es `FALSE`, porque la @ se considera sólo como un carácter en el primer operando: ```4d "abc@"="abcdefghij" ``` -The wildcard means "one or more characters or nothing". The following expressions are `TRUE`: +El comodín significa "uno o más caracteres o nada". Las expresiones siguientes son `TRUE`: ```4d "abcdefghij"="abcdefghij@" @@ -104,72 +100,69 @@ The wildcard means "one or more characters or nothing". The following expression "abcdefghij"="@abcde@fghij@" ``` -On the other hand, whatever the case, a string comparison with two consecutive wildcards will always return `FALSE`. The following expression is `FALSE`: +Por otro lado, sea cual sea el caso, una comparación de cadenas con dos comodines consecutivos siempre devolverá `FALSE`. La siguiente expresión es `FALSE`: ```4d "abcdefghij"="abc@@fg" ``` -When the comparison operator is or contains a < or > symbol, only comparison with a single wildcard located at the end of the operand is supported: +Cuando el operador de comparación es o contiene un símbolo < o >, sólo se soporta la comparación con un único comodín situado al final del operando: ```4d - "abcd"<="abc@" // Valid comparison - "abcd"<="abc@ef" //Not a valid comparison + "abcd"<="abc@" // Comparación válida + "abcd"<="abc@ef" //No es una comparación válida ``` -If you want to execute comparisons or queries using @ as a character (and not as a wildcard), you need to use the `Character code(At sign)` instruction. Imagine, for example, that you want to know if a string ends with the @ character. The following expression (if $vsValue is not empty) is always `TRUE`: +Si desea ejecutar comparaciones o consultas utilizando @ como carácter (y no como comodín), debe utilizar la instrucción `Character code(At sign)`. Imagine, por ejemplo, que quiere saber si una cadena termina con el carácter @. La siguiente expresión (si $vsValue no está vacío) es siempre `TRUE`: ```4d ($vsValue[[Length($vsValue)]]="@") ``` -The following expression will be evaluated correctly: +La siguiente expresión se evaluará correctamente: ```4d (Character code($vsValue[[Length($vsValue)]])#64) ``` +**Nota:** una opción 4D del modo Diseño permite definir cómo se interpreta el carácter @ cuando se incluye en una cadena de caracteres. -**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. +### Palabras claves -### Keywords - -Unlike other string comparisons, searching by keywords looks for "words" in "texts": words are considered both individually and as a whole. The **%** operator always returns `False` if the query concerns several words or only part of a word (for example, a syllable). The “words†are character strings surrounded by “separators,†which are spaces and punctuation characters and dashes. An apostrophe, like in “Today'sâ€, is usually considered as part of the word, but will be ignored in certain cases (see the rules below). Numbers can be searched for because they are evaluated as a whole (including decimal symbols). Other symbols (currency, temperature, and so on) will be ignored. +A diferencia de otras comparaciones de cadenas, la búsqueda por palabras clave busca "palabras" en los "textos": las palabras se consideran tanto individualmente como en su conjunto. El operador **%** siempre devuelve `False` si la consulta se refiere a varias palabras o sólo a una parte de ellas (por ejemplo, una sílaba). Las "palabras" son cadenas de caracteres rodeadas de "separadores", que son espacios y caracteres de puntuación y guiones. Un apóstrofe, como en "Today's", se considera normalmente como parte de la palabra, pero se ignorará en ciertos casos (ver las reglas más abajo). Los números se pueden buscar porque se evalúan como un todo (incluidos los símbolos decimales). Los demás símbolos (moneda, temperatura, etc.) serán ignorados. ```4d - "Alpha Bravo Charlie"%"Bravo" // Returns True - "Alpha Bravo Charlie"%"vo" // Returns False - "Alpha Bravo Charlie"%"Alpha Bravo" // Returns False - "Alpha,Bravo,Charlie"%"Alpha" // Returns True - "Software and Computers"%"comput@" // Returns True + "Alpha Bravo Charlie"%"Bravo" // DevuelveTrue + "Alpha Bravo Charlie"%"vo" // Devuelve False + "Alpha Bravo Charlie"%"Alpha Bravo" // Devuelve False + "Alpha,Bravo,Charlie"%"Alpha" // Devuelve True + "Software and Computers"%"comput@" // Devuelve True ``` +> **Notas:** - 4D utiliza la librería ICU para comparar cadenas (utilizando operadores <>=#) y detectar palabras claves. Para más información sobre las normas aplicadas, consulte la siguiente dirección: http://www.unicode.org/reports/tr29/#Word_Boundaries. - En la versión japonesa, en lugar de ICU, 4D utiliza por defecto Mecab para detectar las palabras claves. -> **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. - -## Character Reference Symbols +## Símbolos de indice de cadena +Los símbolos de indice de cadena son: [[...]] -The character reference symbols: [[...]] +Estos símbolos se utilizan para referirse a un solo carácter dentro de una cadena. Esta sintaxis permite direccionar individualmente los caracteres en un campo o una variable de tipo Alfa o Texto. -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. - -If the character reference symbols appear on the left side of the assignment operator (:=), a character is assigned to the referenced position in the string. For example, if vsName is not an empty string, the following line sets the first character of vsName to uppercase: +Si los símbolos de referencia de caracteres aparecen a la izquierda del operador de asignación (:=), se asigna un carácter a la posición referenciada en la cadena. Por ejemplo, si vsName no es una cadena vacía, la siguiente línea pone el primer carácter de vsName en mayúsculas: ```4d -If(vsName#"") - vsName[[1]]:=Uppercase(vsName[[1]]) +If(vsNom#"") + vsNom[[1]]:=Uppercase(vsNom[[1]]) 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: +En caso contrario, si los símbolos de referencia de caracteres aparecen dentro de una expresión, devuelven el caracter (al que se refieren) como una cadena de 1 caracter. Por ejemplo: ```4d -//The following example tests if the last character of vtText is an At sign "@" +//El siguiente ejemplo comprueba si el último caracter de vtText es una arroba "@". If(vtText#"") If(Character code(Substring(vtText;Length(vtText);1))=At sign) //... End if End if - //Using the character reference syntax, you would write in a simpler manner: + //Utilizando la sintaxis de los caracteres de indice, se escribiría de forma más sencilla: If(vtText#"") If(Character code(vtText[[Length(vtText)]])=At sign) // ... @@ -177,31 +170,33 @@ Otherwise, if the character reference symbols appear within an expression, they End if ``` -### Advanced note about invalid character reference +### Nota avanzada sobre la referencia de caracteres inválidos -When you use the character reference symbols, you must address existing characters in the string in the same way you address existing elements of an array. For example if you address the 20th character of a string variable, this variable MUST contain at least 20 characters. +Al utilizar los símbolos de indice de cadena, debe dirigirse a los caracteres existentes en la cadena de la misma manera que se dirige a los elementos existentes de un array. Por ejemplo, si se referencia el 20º carácter de una variable cadena, esta variable DEBE contener al menos 20 caracteres. -- Failing to do so, in interpreted mode, does not cause a syntax error. -- 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: +- No hacerlo, en modo interpretado, no causa un error de sintaxis. +- No hacerlo, en modo compilado (sin opciones), puede llevar a la corrupción de la memoria, si, por ejemplo, se escribe un caracter más allá del final de una cadena o un texto. +- Si no lo hace, en el modo compilado, se produce un error con la opción Range Checking On. Por ejemplo, ejecutando el siguiente código: - //Very bad and nasty thing to do, boo! - vsAnyText:="" - vsAnyText[[1]]:="A" - +``` +//Muy malo y desagradable, ¡Boo! + vsAnyText:="" + vsAnyText[[1]]:="A" +``` -will trigger the Runtime Error shown here: +provocará el error de tiempo de ejecución que se muestra aquí: ![alt-text](assets/en/Concepts/Syntax_Error.en.png) -### Example +### Ejemplo + -The following project method capitalizes the first character of each word of the text received as parameter and returns the resulting capitalized text: +El siguiente método proyecto pone en mayúsculas el primer carácter de cada palabra del texto recibido como parámetro y devuelve el texto resultante en mayúsculas: ```4d - //Capitalize_text project method - //Capitalize_text ( Text ) -> Text - //Capitalize_text ( Source text ) -> Capitalized text + //Método proyecto Capitalize_text + //Capitalize_text ( Texto ) -> Texto + //Capitalize_text ( Texto fuente ) -> Texto en mayúsculas $0:=$1 $vlLen:=Length($0) @@ -215,12 +210,12 @@ The following project method capitalizes the first character of each word of the End if ``` -For example, the line: +Por ejemplo, la línea: ```4d -ALERT(Capitalize_text("hello, my name is jane doe and i'm running for president!")) +ALERT(Capitalize_text("hola, me llamo jane doe y me presento a la presidencia")) ``` -displays the alert shown here: +muestra la alerta que aparece aquí: -![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/es/Concepts/dt_time.md b/website/translated_docs/es/Concepts/dt_time.md index 54d8735da1e992..e31210929f8bda 100644 --- a/website/translated_docs/es/Concepts/dt_time.md +++ b/website/translated_docs/es/Concepts/dt_time.md @@ -1,87 +1,89 @@ --- 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. +Las variables, campos o expresiones de tipo Hora pueden estar comprendidas entre 00:00:00 y 596,000:00:00. -**Note:** In the 4D Language Reference manual, Time parameters in command descriptions are denoted as Time, except when marked otherwise. +Las horas están en formato de 24 horas. -## Time literals +Un valor de tiempo puede ser tratado como un número. El número devuelto de una hora es el número de segundos desde la medianoche (00:00:00) que representa esa hora. -A time literal constant is enclosed by question marks (?...?). +**Nota:** en el manual de *referencia del lenguaje 4D*, los parámetros de tipo Hora en las descripciones de los comandos se llaman Hora, excepto cuando se indique lo contrario. -A time literal constant is ordered hour:minute:second, with a colon (:) setting off each part. Times are specified in 24-hour format. +## Constantes literales de tipo hora -Here are some examples of time literals: +Una constante hora está rodeada de signos de interrogación (?...?). + +Una constante hora se ordena hora:minuto:segundo, con dos puntos (:) para separar cada parte. Las horas se especifican en formato de 24 horas. + +Estos son algunos ejemplos de constantes de tipo hora: ```4d -?00:00:00? ` midnight +?00:00:00? ` media noche ?09:30:00? ` 9:30 am -?13:01:59? ` 1 pm, 1 minute, and 59 seconds +?13:01:59? ` 1 pm, 1 minuto, y 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: +Una hora nula se escribe ?00:00:00? + +**Consejo:** el Editor de métodos incluye un acceso directo para introducir una hora nula. Para escribir una hora nula, introduzca el carácter de interrogante (?) y pulse Intro. + +## Operadores de horas + +| Operación | Sintaxis | Devuelve | Expresión | Valor | +| ----------------- | -------------- | -------- | ----------------------- | ---------- | +| Adición | Hora + Hora | Hora | ?02:03:04? + ?01:02:03? | ?03:05:07? | +| Resta | Hora – Hora | Hora | ?02:03:04? – ?01:02:03? | ?01:01:01? | +| Adición | Hora + Número | Número | ?02:03:04? + 65 | 7449 | +| Resta | Hora – Número | Número | ?02:03:04? – 65 | 7319 | +| Multiplicación | Hora * Número | Número | ?02:03:04? * 2 | 14768 | +| División | Hora / Número | Número | ?02:03:04? / 2 | 3692 | +| División entera | Hora \ Número | Número | ?02:03:04? \ 2 | 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 | +| Desigualdad | Hora # Hora | Booleano | ?01:02:03? # ?01:02:04? | True | +| | | | ?01:02:03? # ?01:02:03? | False | +| Mayor que | Hora > Hora | Booleano | ?01:02:04? > ?01:02:03? | 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 | +| Mayor o igual que | Hora >= Hora | Booleano | ?01:02:03? >=?01:02:03? | True | +| | | | ?01:02:03? >=?01:02:04? | False | +| Menor o igual que | Hora <= Hora | Booleano | ?01:02:03? <=?01:02:03? | True | +| | | | ?01:02:04? <=?01:02:03? | False | + +### Ejemplo 1 + +Para obtener una expresión de tipo hora a partir de una expresión que combina una expresión de hora con un número, utilice los comandos `Time` y `Time string`. + +Puede combinar expresiones de los tipos hora y número utilizando las funciones `Time` o `Current time`: ```4d - //The following line assigns to $vlSeconds the number of seconds - //that will be elapsed between midnight and one hour from now + //La siguiente línea asigna a $vlSeconds el número de segundos + //que transcurrirán entre la medianoche y una hora a partir de ahora $vlSeconds:=Current time+3600 - //The following line assigns to $vHSoon the time it will be in one hour + //La siguiente línea asigna a $vHSoon la hora que será dentro de una hora $vhSoon:=Time(Current time+3600) ``` -The second line could be written in a simpler way: +La segunda línea podría escribirse de forma más sencilla: ```4d - // The following line assigns to $vHSoon the time it will be in one hour + // La siguiente línea asigna a $vHSoon la hora que será en una hora $vhSoon:=Current time+?01:00:00? ``` -### Example 2 +### Ejemplo 2 -The Modulo operator can be used, more specifically, to add times that take the 24-hour format into account: +El operador Modulo puede utilizarse, más concretamente, para sumar tiempos que tengan en cuenta el 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? // Son las 23:00 p.m. + // Queremos añadir 2 horas y media +$t2:=$t1 +?02:30:00? // Con una simple adición, $t2 es ?25:30:00? +$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 es ?01:30:00? y es 1:30 a.m. a la mañana siguiente +``` + diff --git a/website/translated_docs/es/Concepts/dt_variant.md b/website/translated_docs/es/Concepts/dt_variant.md index 4895ad0482a0a6..f73c1fa12e1b49 100644 --- a/website/translated_docs/es/Concepts/dt_variant.md +++ b/website/translated_docs/es/Concepts/dt_variant.md @@ -3,27 +3,27 @@ id: variant title: Variant --- -Variant is a variable type which allows encapsulating data of any valid regular type in a variable. Typically, this variable type can be used to write generic code returning or receiving values for which the type is not known. This is the case for example for code handling object attributes. +Variant es un tipo de variable que permite encapsular datos de todo tipo válido y estándar en una variable. Normalmente, este tipo de variable puede utilizarse para escribir código genérico que devuelva o reciba valores cuyo tipo no se conoce. Este es el caso, por ejemplo, del código que maneja los atributos de objeto. -A variant type variable can contain a value of the following data types: +Una variable de tipo variant puede contener un valor de los tipos de datos siguientes: - BLOB -- boolean -- collection -- date -- longint -- object -- picture -- pointer +- booleano +- colección +- fecha +- entero largo +- objeto +- imagen +- puntero - real -- text +- texto - time - null -- undefined +- indefinido -> Arrays cannot be stored in variant variables. +> Las matrices no pueden almacenarse en variables de tipo variant. -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: +Tanto en modo interpretado como en compilado, a una misma variable variant se le pueden asignar contenidos de diferentes tipos. A diferencia de los tipos de variable estándar, el tipo de contenido de la variable variant es diferente del tipo de variable variant mismo. Por ejemplo: ```4d C_VARIANT($variant) @@ -37,18 +37,18 @@ $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: +Se pueden utilizar variables variant en cualquier lugar donde se esperen variables, sólo hay que asegurarse de que el tipo de datos del contenido de la variable es del tipo esperado. Al acceder a las variables de las variantes, sólo se tiene en cuenta su valor actual. Por ejemplo: ```4d C_VARIANT($v) $v:="hello world" -$v2:=$v //assign variable to another variable +$v2:=$v //asignar una variable a otra variable $t:=Type($v) // 12 (Is variant) $t2:=Type($v2) // 2 (Is text) ``` -Variant can be used to declare method parameters ($0, $1,...) that can be of various types. In this case, you can build your code by testing the parameter value type, for example: +Variant se puede utilizar para declarar parámetros de métodos ($0, $1,...) que pueden ser de varios tipos. En este caso, puede construir su código probando el tipo de valor del parámetro, por ejemplo: ```4d C_VARIANT($1) @@ -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 +> Cuando las variables variant no son necesarias (es decir, cuando se conoce el tipo de datos), se recomienda utilizar variables de tipo estándar. Las variables de tipo estándar ofrecen un mejor rendimiento, hacen que el código sea más claro y son útiles para que el compilador evite los errores relacionados con el paso de tipos de datos inesperados. \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/error-handling.md b/website/translated_docs/es/Concepts/error-handling.md index 09da737d7955ac..f1124496930717 100644 --- a/website/translated_docs/es/Concepts/error-handling.md +++ b/website/translated_docs/es/Concepts/error-handling.md @@ -1,93 +1,104 @@ --- id: error-handling -title: Error handling +title: Gestión de errores --- -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. +El manejo de errores es el proceso de anticipar y responder a los errores que puedan ocurrir en su aplicación. 4D soporta de forma completa la detección y notificación de errores en tiempo de ejecución, así como el análisis de sus condiciones. -Error handling meets two main needs: +La gestión de errores responde a dos necesidades principales: -- 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. +- descubrir y corregir posibles errores y fallos en el código durante la fase de desarrollo, +- detectar y recuperar errores inesperados en las aplicaciones desplegadas; en particular, puede sustituir los diálogos de error del sistema (disco lleno, archivo perdido, etc.) por su propia interfaz. +> Es muy recomendable instalar un método de gestión de errores en 4D Server, para todo el código que se ejecute en el servidor. Este método evitaría la aparición de cajas de diálogo inesperadas en el servidor, y podría registrar los errores en un archivo específico para su posterior análisis. -> 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. -## Installing an error-handling method +## Error o estado -In 4D, all errors can be catched and handled in a specific project method, the **error-handling** (or **error-catching**) method. +Muchas funciones de clase 4D, como `entity.save()` o `transporter.send()`, devuelven un objeto *status*. Este objeto se utiliza para almacenar errores "predecibles" en el contexto de ejecución, por ejemplo, una contraseña no válida, una entidad bloqueada, etc., que no detienen la ejecución del programa. Esta categoría de errores puede ser manejada por el código habitual. -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: +Otros errores "imprevisibles" son el error de escritura en el disco, el fallo de la red o, en general, cualquier interrupción inesperada. Esta categoría de errores genera excepciones y necesita ser manejada a través de un método de gestión de errores. -```4d -ON ERR CALL("IO_ERRORS") //Installs the error-handling method -``` -To stop catching errors and give back hand to 4D, call `ON ERR CALL` with an empty string: +## Instalación de un método de gestión de errores -```4d -ON ERR CALL("") //gives back control to 4D -``` +En 4D, todos los errores pueden ser capturados y manejados en un método proyecto específico, el método **gestión de errores** (o **captura de errores**). -### Scope and components +Este método proyecto se instala para el proceso actual y será llamado automáticamente para cualquier error que se produzca en el proceso, en modo interpretado o compilado. Para *instalar* este método proyecto, basta con llamar al comando `ON ERR CALL` con el nombre del método proyecto como parámetro. Por ejemplo: -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. +```4d +ON ERR CALL("IO_ERRORS") //Instala el método de gestión de errores +``` -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. +Para dejar de detectar errores y devolver el control a 4D, llame a `ON ERR CALL` con una cadena vacía: +```4d +ON ERR CALL("") //devuelve el control a 4D +``` -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: +El comando `Method called on error` permite conocer el nombre del método instalado por `ON ERR CALL` para el proceso actual. Es particularmente útil en el contexto de código genérico porque permite cambiar temporalmente y luego restaurar el método de captura de error: ```4d $methCurrent:=Method called on error ON ERR CALL("NewMethod") - //If the document cannot be opened, an error is generated + //Si no se puede abrir el documento, se genera un error $ref:=Open document("MyDocument") - //Reinstallation of previous method + //Reinstalación del método anterior ON ERR CALL($methCurrent) ``` -### Handling errors within the method +### Alcance y componentes + +Se puede definir un único método de captura de errores para toda la aplicación o diferentes métodos por módulo de aplicación. Sin embargo, sólo se puede instalar un método por proceso. -Within the custom error method, you have access to several information that will help you identifying the error: +Un método de gestión de errores instalado por el comando `ON ERR CALL` sólo se aplica únicamente a la aplicación en ejecución. En el caso de un error generado por un **componente**, no se llama al método `ON ERR CALL` de gestión de errores de la aplicación local, y viceversa. -- 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*. +### Manejo de errores dentro del método -- the `GET LAST ERROR STACK` command that returns information about the current stack of errors of the 4D application. +Dentro del método de error personalizado, tiene acceso a varias informaciones que le ayudarán a identificar el error: -#### Example +- variables sistema (*): -Here is a simple error-handling system: + - `Error` (entero largo): código de error + - `Error method`(texto): nombre del método que ha provocado el error + - `Error line` (entero largo): número de línea del método que ha provocado el error + - `Error formula` (texto): fórmula del código 4D (texto bruto) que está en el origen del error. + +(*) 4D mantiene automáticamente una serie de variables llamadas **variables sistema**, que responden a diferentes necesidades. Consulte el *Manual del lenguaje de 4D*. + +- el comando `GET LAST ERROR STACK` que devuelve información sobre la pila de errores actual de la aplicación 4D. +- el comando `Get call chain` que devuelve una colección de objetos que describen cada paso de la cadena de llamadas a métodos dentro del proceso actual. + + +#### Ejemplo + +He aquí un sistema de gestión de errores sencillo: ```4d -//installing the error handling method +//instalar el método de gestión de errores ON ERR CALL("errorMethod") - //... executing code + //... ejecutar el código ON ERR CALL("") //giving control back to 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 proyecto errorMethod + If(Error#1006) //esto no es una interrupción del usuario + ALERT("Se ha producido el error "+String(Error)+". El código en cuestión es: \""+Error formula+"\"") End if ``` -### Using an empty error-handling method +### Utilizar un método de gestión de errores vacío -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: +Si desea principalmente que la caja de diálogo de error estándar esté oculta, puede instalar un método de gestión de errores vacío. La variable sistema `Error` puede ser probada en cualquier método, es decir, fuera del método de gestión de errores: ```4d -ON ERR CALL("emptyMethod") //emptyMethod exists but is empty +ON ERR CALL("emptyMethod") //emptyMethod existe pero está vacío $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/es/Concepts/flow-control.md b/website/translated_docs/es/Concepts/flow-control.md index 5fa846b66ed35a..f57ec143f6d6a1 100644 --- a/website/translated_docs/es/Concepts/flow-control.md +++ b/website/translated_docs/es/Concepts/flow-control.md @@ -1,17 +1,16 @@ --- id: control-flow -title: Control flow overview +title: Condiciones y bucles --- -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: +Independientemente de la simplicidad o la complejidad de un método, siempre utilizará uno o varios de los tres tipos de estructuras de programación. Las estructuras de programación determinan el flujo de ejecución, si se ejecutan y el orden de las líneas de instrucciones dentro de un método. Hay tres tipos de estructuras: -- **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: +- **Secuencial**: una estructura secuencial es una estructura simple y lineal. Una secuencia es una serie de sentencias que 4D ejecuta una tras otra, de la primera a la última. Una instrucción de una línea, utilizada frecuentemente para los métodos de los objetos, es el caso más simple de una estructura secuencial. Por ejemplo: `[People]lastName:=Uppercase([People]lastName)` +- **[Branching](Concepts/cf_branching.md)**: una estructura de bifurcación permite que los métodos prueben una condición y tomen caminos alternativos, dependiendo del resultado. La condición es una expresión booleana, una expresión que evalúa TRUE o FALSE. Una estructura condicional es la estructura `If...Else...End if`, que dirige el flujo del programa a lo largo de uno de los dos caminos. La otra estructura condicional es la estructura `Case of...Else...End case`, que dirige el flujo del programa a una de las muchas alternativas. +- **[Bucle](Concepts/cf_looping.md)**: cuando se escriben métodos, es muy común encontrarse con que se necesita que una secuencia de sentencias se repita un número de veces. Para hacer frente a esta necesidad, el lenguaje 4D ofrece las siguientes estructuras de bucle: - `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. + - `For each...End for each`
    Los bucles se controlan de dos maneras: o bien hacen un bucle hasta que se cumpla una condición, o bien hacen un bucle un número determinado de veces. Cada estructura de bucle puede utilizarse de cualquier manera, pero los bucles `While` y los bucles `Repeat` son más apropiados para repetir hasta que se cumpla una condición, y los bucles `For` son más apropiados para hacer un bucle un número determinado de veces. `For each...End for each` permite la mezcla en ambos sentidos y está diseñado para realizar bucles dentro de objetos y colecciones. -**Note:** 4D allows you to embed programming structures up to a "depth" of 512 levels. \ No newline at end of file +**Nota:** 4D permite anidar estructuras de programación hasta una "profundidad" de 512 niveles. diff --git a/website/translated_docs/es/Concepts/identifiers.md b/website/translated_docs/es/Concepts/identifiers.md index 8f098e354b22a7..de80fb446f3e2d 100644 --- a/website/translated_docs/es/Concepts/identifiers.md +++ b/website/translated_docs/es/Concepts/identifiers.md @@ -1,233 +1,82 @@ --- id: identifiers -title: Identifiers +title: Identificadores --- -This section describes the conventions and rules for naming various elements in the 4D language (variables, tables, objects, forms, etc.). +Esta sección describe las convenciones y reglas para nombrar los distintos elementos del lenguaje 4D (variables, propiedades objeto, tablas, formularios, etc.). -## Basic Rules +> Si se utilizan caracteres no romanos en los nombres de los identificadores, su longitud máxima puede ser menor. -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). -- 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. - -### Additional rules for object property and ORDA names - -- Space characters are not allowed. -- Periods (".") and brackets ("[ ]") are not allowed. -- Names are case sensitive. - -### Additional rules for SQL - -- Only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted -- Names must not include any SQL keywords (command, attribute, etc.). - -**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 - -You designate a table by placing its name between brackets: [...]. A table name can contain up to 31 characters. - -Examples: - -```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. - -Examples: - -```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. - -The name of an interprocess variable can be up to 31 characters, not including the <> symbols. - -Examples: - -```4d -<>vlProcessID:=Current process -<>vsKey:=Char(KeyCode) -If(<>vtName#"") -``` - -## Process Variables - -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: - -```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. - -Examples: - -```4d -For($vlRecord;1;100) -If($vsTempVar="No") -$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. +Los nombres de los arrays siguen las mismas reglas que las [variables](#variables). -### Interprocess Arrays -The name of an interprocess array is preceded by the symbols (<>) — a “less than†sign followed by a “greater than†sign. +## Clases -An interprocess array name can contain up to 31 characters, not including the <> symbols. +El nombre de una clase puede contener hasta 31 caracteres. -Examples: +Un nombre de clase debe cumplir con el estándar [reglas de nomenclatura de propiedades](#object-properties) para la notación de puntos. -```4d -ARRAY TEXT(<>atSubjects;Records in table([Topics])) -SORT ARRAY(<>asKeywords;>) -ARRAY INTEGER(<>aiBigArray;10000) -``` +> No se recomienda dar el mismo nombre a una clase y a una [tabla de la base](#tables), para evitar conflictos. -### 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: - -```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: - -```4d -ARRAY TEXT($atSubjects;Records in table([Topics])) -SORT ARRAY($asKeywords;>) -ARRAY INTEGER($aiBigArray;10000) -``` -### Elements of arrays +## Funciones -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. +Los nombres de función deben cumplir con el estándar [reglas de nomenclatura de propiedades](#object-properties) para la notación de puntos. -Examples: +> **Consejo:** comenzar el nombre de la función con un carácter de subrayado ("_") excluirá la función de las funcionalidades de autocompletado en el editor de código 4D. -```4d - //Addressing an element of an interprocess array -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") -atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=aiBigArray{Size of array(aiBigArray)} - - //Addressing an element of a local array -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. +## Propiedades de los objetos -Examples: +El nombre de una propiedad objeto (también llamado objeto *atributo*) puede contener hasta 255 caracteres. -```4d - //Addressing an element of a two-dimensional interprocess array -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") -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") -$atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{$vlSet}{Size of array($aiBigArray{$vlSet})} -``` +Las propiedades de los objetos pueden hacer referencia a valores escalares, elementos ORDA, funciones de clase, otros objetos, etc. Sea cual sea su naturaleza, los nombres de las propiedades de los objetos deben seguir las siguientes reglas **si se quiere utilizar la [notación de punto](dt_object.md#object-properties)**: -## Object attributes +- El nombre de una propiedad debe comenzar con una letra, un guión bajo o un dólar "$". +- A partir de ahí, el nombre puede incluir cualquier letra, dígito, el caracter de subrayado ("_"), o el caracter de dólar ("$"). +- Los nombres de propiedades son sensibles a las mayúsculas y minúsculas. -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: +Ejemplos: ```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 - -You designate a form by using a string expression that represents its name. A form name can contain up to 31 characters. +> Si utiliza **notación de cadena** entre corchetes, los nombres de las propiedades pueden contener cualquier caracter (ej.: `miObjeto["1. First property"]`). -Examples: +Ver también [ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6). -```4d -FORM SET INPUT([People];"Input") -FORM SET OUTPUT([People];"Output") -DIALOG([Storage];"Note box"+String($vlStage)) -``` - -## Form objects +## Parámetros -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. +Los nombres de los parámetros deben comenzar con un caracter `$` y seguir las mismas reglas que los [nombres de variables](#variables). -Example: +Ejemplos: ```4d -OBJECT SET FONT(*;"Binfo";"Times") +Function getArea($width : Integer; $height : Integer)-> $area : Integer + +#DECLARE ($i : Integer ; $param : Date) -> $myResult : Object ``` -**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. -## Project methods +## Métodos proyecto -You designate a project method (procedure or function) by using its name. A method name can contain up to 31 characters. +El nombre de un método proyecto puede contener hasta 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. +- Un nombre de método proyecto debe comenzar por una letra, un dígito o un guión bajo +- A partir de ahí, el nombre puede incluir cualquier letra o dígito, el caracter de subrayado ("_"), o el caracter de espacio. +- No utilice nombres reservados, es decir, nombres de comandos 4D (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), o nombres de constantes (`Euro`, `Black`, `Friday`, etc.). +- Los nombres de métodos proyecto son sensibles a las mayúsculas y minúsculas. -Examples: +Ejemplos: ```4d If(New client) @@ -235,189 +84,95 @@ 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. +**Consejo:** es una buena técnica de programación adoptar la misma convención de nomenclatura que la utilizada por 4D para los métodos integrados. Utilice mayúsculas para nombrar sus métodos; sin embargo, si un método devuelve un valor, ponga en mayúscula el primer carácter de su nombre. De este modo, cuando vuelva a abrir un proyecto para su mantenimiento después de unos meses, ya sabrá si un método devuelve un resultado simplemente mirando su nombre en la ventana del Explorador. -**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: + > Cuando se llama a un método, sólo hay que escribir su nombre. Sin embargo, algunos comandos integrados en 4D, como `ON EVENT CALL`, así como también todos los comandos del plug-in, esperan el nombre de un método como una cadena cuando se pasa un parámetro de tipo método. -Examples: +Ejemplos: ```4d - //This command expects a method (function) or formula + //Este comando espera un método (función) o una fórmula QUERY BY FORMULA([aTable];Special query) - //This command expects a method (procedure) or statement + //Este comando espera un método (procedimiento) o una instrucción APPLY TO SELECTION([Employees];INCREASE SALARIES) - //But this command expects a method name + //Pero este comando espera un nombre 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. - -Inside a function, the $0 local variable contains the value to be returned. - -Examples: - -```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 -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. - -Examples: - -```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 -### Interprocess Sets -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. +## Tables and Fields -An interprocess set name can contain up to 255 characters, not including the <> symbols. +Una tabla se designa colocando su nombre entre paréntesis: \[...]. Para designar un campo hay que especificar primero la tabla a la que pertenece (el nombre del campo sigue inmediatamente al nombre de la tabla). -### Process Sets +Un nombre de tabla y un nombre de campo pueden contener hasta 31 caracteres. -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. +- A table or field name must begin with a letter, an underscore, or a dollar ("$") +- A partir de ahí, el nombre puede incluir caracteres alfabéticos, numéricos, el carácter espacio y el carácter de subrayado ("_"). +- No utilice nombres reservados, es decir, nombres de comandos 4D (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), o nombres de constantes (`Euro`, `Black`, `Friday`, etc.). +- Deben respetarse reglas adicionales cuando la base deba manejarse vía SQL: sólo se aceptan los caracteres _0123456789abcdefghijklmnopqrstuvwxyz, y el nombre no debe incluir ninguna palabra clave SQL (comando, atributo, etc.). -### Client Sets -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. - -**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. - -Examples: +Ejemplos: ```4d - //Interprocess sets -USE SET("<>Deleted Records") -CREATE SET([Customers];"<>Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Process sets -USE SET("Deleted Records") -CREATE SET([Customers];"Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Client sets -USE SET("$Deleted Records") -CREATE SET([Customers];"$Customer Orders") -If(Records in set("$Selection"+String($i))>0) -``` - -## Named Selections - -From the scope point of view, there are two types of named selections: +FORM SET INPUT([Clients];"Entry") +ADD RECORD([Letters]) +[Orders]Total:=Sum([Line]Amount) +QUERY([Clients];[Clients]Name="Smith") +[Letters]Text:=Capitalize text([Letters]Text) -- Interprocess named selections -- Process named selections. +``` -### Interprocess Named Selections +> No se recomienda dar el mismo nombre a una tabla y a una [clase](#classes), para evitar conflictos. -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. +## Variables -An interprocess named selection name can contain up to 255 characters, not including the <> symbols. +El nombre de una variable puede tener hasta 31 caracteres, sin incluir los símbolos de alcance ($ o <>). -### Process Named Selections +- Un nombre de variable debe comenzar con una letra, un guión bajo o un dólar ("$") para [parámetros](parameters.md) y [variables locales](variables.md#local-variables), o "<>" para [variables de interproceso](variables.md#interprocess-variables). +- Un dígito como primer carácter está permitido pero no se recomienda, y no es soportado por la [ sintaxis de declaración `var` ](variables.md#using-the-var-keyword). +- A partir de ahí, el nombre puede incluir cualquier letra o dígito, y el caracter de subrayado ("_"). +- Un caracter de espacio está permitido pero no se recomienda, y no es soportado por la [ sintaxis de declaración `var` ](variables.md#using-the-var-keyword). +- No utilice nombres reservados, es decir, nombres de comandos 4D (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), o nombres de constantes (`Euro`, `Black`, `Friday`, etc.). +- Los nombres de las variables son sensibles a las mayúsculas y minúsculas. -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: +Ejemplos: ```4d - //Interprocess Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") - //Process Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") +For($vlRecord;1;100) //variable local +$vsMyString:="Hello there" //variable local +var $vName; $vJob : Text //variables locales +If(bValidate=1) //variable proceso +<>vlProcessID:=Current process() //variable interproceso ``` -## Processes - -In the single-user version, or in Client/Server on the Client side, there are two types of processes: - -- Global processes -- Local processes. +## Otros nombres -### Global Processes +En el lenguaje 4D, varios elementos tienen sus nombres manejados como cadenas: **formularios**, **objetos de formulario**, **selecciones temporales**, **procesos**, **conjuntos**, **barras de menú**, etc. -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. +Estos nombres de cadena pueden contener hasta 255 caracteres, sin incluir los caracteres "$" o "<>" (si los hay). -### Local Processes +- Los nombres de las cadenas pueden contener cualquier carácter. +- Los nombres de las cadenas son sensibles a las mayúsculas y minúsculas. -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: +Ejemplos: ```4d +DIALOG([Storage];"Note box"+String($vlStage)) +OBJECT SET FONT(*;"Binfo";"Times") +USE NAMED SELECTION([Customers];"Closed")//Process Named Selection +USE NAMED SELECTION([Customers];"<>ByZipcode") //Interprocess Named Selection //Starting the global process "Add Customers" $vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") //Starting the local process "$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" | +CREATE SET([Customers];"Customer Orders")//Process set +USE SET("<>Deleted Records") //Interprocess set +If(Records in set("$Selection"+String($i))>0) //Client set +``` -**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 diff --git a/website/translated_docs/es/Concepts/interpreted.md b/website/translated_docs/es/Concepts/interpreted.md index 9a015e7355cf20..cc8e148692ae61 100644 --- a/website/translated_docs/es/Concepts/interpreted.md +++ b/website/translated_docs/es/Concepts/interpreted.md @@ -1,64 +1,62 @@ --- id: interpreted-compiled -title: Interpreted and Compiled modes +title: Modos interpretado y compilado --- -4D applications can work in **interpreted** or **compiled** mode: +Las aplicaciones 4D pueden funcionar en modo **interpretado** o **compilado**: -- 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. +- en modo interpretado, las declaraciones se leen y se traducen en lenguaje máquina en el momento de su ejecución. Puede añadir o modificar el código siempre que lo necesite, la aplicación se actualiza automáticamente. +- en modo compilado, todos los métodos se leen y traducen una vez, en el paso de compilación. Después, la aplicación sólo contiene instrucciones a nivel de ensamblaje, ya no es posible editar el código. -The advantages of the compilation are: +Las ventajas de la compilación son: -- **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. -- **Preemptive mode**: only compiled code can be executed in preemptive processes. +- **Velocidad**: su base aplicación se ejecuta de 3 a 1.000 veces más rápido. +- **Verificación del código**: su aplicación se analiza para comprobar la consistencia del código. Se detectan tanto los conflictos lógicos como los sintácticos. +- **Protección:**: una vez compilada su aplicación, puede eliminar el código interpretado. Entonces, la aplicación compilada es funcionalmente idéntica a la original, excepto que la estructura y los métodos no pueden ser vistos o modificados, deliberada o inadvertidamente. +- **Aplicaciones independientes con doble clic**: las aplicaciones compiladas también pueden transformarse en aplicaciones independientes (archivos.EXE) con su propio icono. +- **Modo apropiativo**: sólo se puede ejecutar código compilado en procesos apropiativos. -## Differences between interpreted and compiled code +## Diferencias entre el código interpretado y el compilado +Aunque la aplicación funcionará de la misma manera en modo interpretado y compilado, hay algunas diferencias que hay que conocer cuando se escribe código que será compilado. El intérprete de 4D suele ser más flexible que el compilador. -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. +| Compilado | Interpretado | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| No se puede tener un método con el mismo nombre que una variable. | No se genera ningún error, pero se da prioridad al método | +| Todas las variables deben ser tipificadas, ya sea a través de una directiva del compilador (ej.: `C_LONGINT`), o por el compilador en tiempo de compilación. | Las variables se pueden escribir sobre la marcha (no se recomienda) | +| No se puede cambiar el tipo de datos de ninguna variable o array. | Es posible cambiar el tipo de datos de una variable o un array (no se recomienda) | +| No se puede cambiar un array unidimensional a uno bidimensional, ni cambiar un array bidimensional a uno unidimensional. | Posible | +| Aunque el compilador escribirá la variable por usted, debe especificar el tipo de datos de una variable utilizando directivas del compilador cuando el tipo de datos sea ambiguo, como en un formulario. | | +| La función `Undefined` siempre devuelve False para las variables. Las variables siempre están definidas. | | +| Si has marcado la propiedad "Puede ser ejecutado en procesos apropiativos" para el método, el código no debe llamar a ningún comando hilo no seguro u otros métodos hilo no seguro. | Se ignoran las propiedades de los procesos preventivos | +| El comando `IDLE` es necesario para llamar a 4D en bucles específicos | Siempre es posible interrumpir 4D | -| Compiled | Interpreted | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| You cannot have a method with the same name as a variable. | No error is generated, but priority is given to the method | -| All variables must by typed, either through a compiler directive (ex: `C_LONGINT`), or by the compiler at compilation time. | Variables can be typed on-the-fly (not recommended) | -| You cannot change the data type of any variable or array. | Changing the data type of a variable or an array is possible (not recommended) | -| You cannot change a one-dimensional array to a two-dimensional array, or change a two-dimensional array to a one-dimensional array. | Possible | -| Although the compiler will type the variable for you, you should specify the data type of a variable by using compiler directives where the data type is ambiguous, such as in a form. | | -| The `Undefined` function always returns False for variables. Variables are always defined. | | -| 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 | +## Utilizar las directivas del compilador con el intérprete +Las aplicaciones no compiladas no requieren directivas del compilador. El intérprete digita automáticamente cada variable en función de cómo se utilice en cada declaración, y una variable puede volver a escribirse libremente en el proyecto de aplicación. -## Using Compiler Directives with the Interpreter +Debido a esta flexibilidad, es posible que una aplicación tenga un rendimiento diferente en modo interpretado y compilado. -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. - -Because of this flexibility, it is possible that a database can perform differently in interpreted and compiled modes. - -For example, if you write: +Por ejemplo, si se escribe: ```4d C_LONGINT(MyInt) ``` -and elsewhere in the database, you write: - +y en otra parte del proyecto, escribe: ```4d MyInt:=3.1416 ``` -In this example, `MyInt` is assigned the same value (3) in both the interpreted and compiled modes, provided the compiler directive is interpreted *prior* to the assignment statement. +En este ejemplo, `MyInt` se asigna el mismo valor (3) tanto en el modo interpretado como en el compilado, siempre que la directiva del compilador se interprete *antes* de la declaración de asignación. -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. +El intérprete 4D utiliza directivas de compilador para escribir las variables. Cuando el intérprete encuentra una directiva de compilador, escribe la variable según la directiva. Si una declaración posterior intenta asignar un valor incorrecto (por ejemplo, asignar un valor alfanumérico a una variable numérica) la asignación no tendrá lugar y generará un 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. +El orden en el que aparecen las dos declaraciones es irrelevante para el compilador, porque primero busca en todo el proyecto para las directivas del compilador. El intérprete, sin embargo, no es sistemático. Interpreta las declaraciones en el orden de ejecución. Ese orden, por supuesto, puede cambiar de una sesión a otra, dependiendo de lo que haga el usuario. Por esta razón, es importante diseñar su proyecto de manera que las directivas del compilador se ejecuten antes de cualquier declaración que contenga las variables declaradas. -## Using pointers to avoid retyping -A variable cannot be retyped. However, it is possible to use a pointer to refer to variables of different data types. For example, the following code is allowed in both interpreted and compiled modes: +## Utilización de punteros para evitar la reescritura + +Una variable no se puede volver a escribir. Sin embargo, es posible utilizar un puntero para referirse a variables de diferentes tipos de datos. Por ejemplo, el siguiente código está permitido tanto en modo interpretado como compilado: ```4d C_POINTER($p) @@ -68,19 +66,19 @@ C_LONGINT($age) $name:="Smith" $age:=50 -$p:=->$name //text target for the pointer -$p->:="Wesson" //assigns a text value +$p:=->$name //texto objetivo para el puntero +$p->:="Wesson" //asigna un valor texto $p:=->$age -// new target of different type for the pointer -$p->:=55 //assigns a number value +// nuevo objetivo de tipo diferente para el puntero +$p->:=55 //asigna un valor numérico ``` -Imagine a function that returns the length (number of charaters) of values that can be of any type. +Imagine una función que devuelve la longitud (número de caracteres) de valores de todo tipo. ```4d - // Calc_Length (how many characters) - // $1 = pointer to flexible variable type, numeric, text, time, boolean + // Calc_Length (cuántos caracteres) + // $1 = puntero a tipo de variable flexible, numérica, texto, hora, booleana C_POINTER($1) C_TEXT($result) @@ -89,8 +87,7 @@ $result:=String($1->) $0:=Length($result) ``` -Then this method can be called: - +Entonces se puede llamar a este método: ```4d $var1:="my text" $var2:=5.3 @@ -100,4 +97,4 @@ $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 +``` diff --git a/website/translated_docs/es/Concepts/methods.md b/website/translated_docs/es/Concepts/methods.md index 46f38a2651ceeb..25b280744727e6 100644 --- a/website/translated_docs/es/Concepts/methods.md +++ b/website/translated_docs/es/Concepts/methods.md @@ -1,116 +1,123 @@ --- 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: +Un método es básicamente un trozo de código que ejecuta una o varias acciones. Un método se compone de varias líneas de instrucciones, cada una de las cuales consta de una línea en el método. Una línea de instrucción realiza una acción, y puede ser simple o compleja. Aunque una instrucción es siempre una línea, esa línea puede ser tan larga como sea necesario (hasta 32.000 caracteres, lo que probablemente sea suficiente para la mayoría de las tareas). -- **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. +El tamaño máximo de un método está limitado a 2 GB de texto o 32.000 líneas de código. -- **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. +## Tipos de métodos -**Note:** 4D also provides specific methods that are automatically executed depending on database or form events. See [Specialized methods](#specialized-methods). +En el lenguaje 4D, hay varias categorías de métodos. La categoría depende de cómo se les pueda llamar: -## Calling Project Methods +| Tipo | Contexto de llamada | Acepta los parámetros | Descripción | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Métodos proyecto** | Por demanda, cuando se llama al nombre del método proyecto (ver [Llamando a métodos proyecto](#calling-project-methods)) | Sí | Puede contener código para ejecutar acciones personalizadas. Una vez creado un método proyecto, pasa a formar parte del lenguaje del proyecto. | +| **Método objeto (widget)** | Automático, cuando un evento involucra al objeto al que se asocia el método | No | Propiedad de un objeto formulario (también llamado widget) | +| **Método formulario** | Automático, cuando un evento involucra al formulario al que se asocia el método | No | Propiedad de un formulario. Puede utilizar un método formulario para gestionar datos y objetos, pero generalmente es más sencillo y eficiente utilizar un método objeto para estos fines. | +| **Trigger** (o *método tabla*) | Automático, cada vez que se manipulan los registros de una tabla (Añadir, Eliminar y Modificar) | No | Propiedad de una tabla. Los triggers son métodos que pueden evitar operaciones "ilegales" con los registros de su base. | +| **Método base** | Automático, cuando se produce un evento de la sesión de trabajo | Sí (predefinido) | Hay 16 métodos base en 4D. Véase la sección métodos base | -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 -- Menu method -- Process method -- Event or Error catching method +> El Lenguaje 4D también soporta **Funciones de clase**, que pueden ser llamadas en el contexto de una instancia objeto. Las funciones de clase pueden estar integradas (*por ejemplo,* `collection.orderBy()` o `entity.save()`), o [creadas por el desarrollador 4D](classes.md#class-function). -### Subroutines and functions -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. +## Métodos proyecto -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. +Un método proyecto puede tener uno de los siguientes papeles, dependiendo de cómo se ejecute y utilice: -You use subroutines to: +- Subrutina +- Objeto fórmula +- Método de menú +- Método de gestión de proceso +- Métodos de gestión de eventos o errores -- Reduce repetitive coding -- Clarify your methods -- Facilitate changes to your methods -- Modularize your code +### Subrutinas -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: +Una subrutina es un método proyecto que puede considerarse como un ayudante. Realiza aquellas tareas que otros métodos le solicitan. Una función es una subrutina que devuelve un valor al método que la llamó. + +Cuando crea un método proyecto, éste pasa a formar parte del lenguaje del proyecto en el que lo crea. Entonces puede llamar al método proyecto desde otros métodos (método proyecto, método objeto, etc.), de la misma manera que llama a los comandos integrados de 4D. Un método proyecto utilizado de este manera se llama una subrutina. + +Se utilizan subrutinas para: + +- Reducción del código repetitivo +- Clarificación de los métodos +- Facilitar los cambios en sus métodos +- Modularizar el código + +Por ejemplo, supongamos que tiene un proyecto de clientes. Al personalizar el proyecto, se da cuenta de que hay algunas tareas que realiza reiteradamente, como la búsqueda de un cliente y la modificación de su registro. El código para hacer esto podría ser: ```4d - // Look for a customer + // Búsqueda de un cliente QUERY BY EXAMPLE([Customers]) - // Select the input form + // Selección del formulario entrada FORM SET INPUT([Customers];"Data Entry") - // Modify the customer's record + // Modificación del registro del cliente 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. +Si no utiliza subrutinas, tendrá que escribir el código cada vez que quiera modificar el registro de un cliente. Si hay diez lugares en su proyecto donde necesita hacer esto, tendrá que escribir el código diez veces. Si utiliza subrutinas, sólo tendrá que escribirlas una vez. Esta es la primera ventaja de las subrutinas: reducir la cantidad de código. -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: +Si el código descrito anteriormente fuera un método llamado `MODIFY_CUSTOMER`, se ejecutaría simplemente utilizando el nombre del método en otro método. Por ejemplo, para modificar el registro de un cliente y luego imprimir el registro, se escribiría este método: ```4d - MODIFY CUSTOMER + 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. +Esta posibilidad simplifica enormemente sus métodos. En el ejemplo, no es necesario saber cómo funciona el método `MODIFY_CUSTOMER`, sólo lo que hace. Esta es la segunda razón para utilizar subrutinas: clarificar sus métodos. De este modo, sus métodos se convierten en extensiones del lenguaje 4D. -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. +Si necesita cambiar su método de búsqueda de clientes en este proyecto de ejemplo, tendrá que cambiar sólo un método, no diez. Esta es la siguiente razón para utilizar subrutinas: facilitar los cambios en sus métodos. -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: +Utilizando las subrutinas, hace que su código sea modular. Esto significa simplemente dividir el código en módulos (subrutinas), cada una de las cuales realiza una tarea lógica. Considere el siguiente código de un proyecto de de cuentas corrientes: ```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 los cheques emitidos + RECONCILE_ACCOUNT //Reconciliar la cuenta + PRINT_CHECK_BOOK_REPORT //Imprimir un informe de la chequera ``` -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. +Incluso para alguien que no conozca el proyecto, está claro lo que hace este código. No es necesario examinar cada subrutina. Cada subrutina puede tener muchas líneas y realizar algunas operaciones complejas, pero aquí sólo es importante que realice su tarea. Le recomendamos que divida su código en tareas lógicas, o módulos, siempre que sea posible. -### Methods attached to objects -You can encapsulate your project methods in **formula** objects and call them from your objects. +### Objeto fórmula -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. +Puede encapsular los métodos de su proyecto en objetos **fórmula** y llamarlos desde sus objetos. -To execute a method stored in an object property, use the **( )** operator after the property name. For example: +Los comandos `Formula` o `Formula from string` permiten crear objetos de fórmula nativos que se pueden encapsular en las propiedades de los objetos. Permite implementar métodos objetos personalizados. + +Para ejecutar un método almacenado en una propiedad objeto, utilice el operador **( )** después del nombre de la propiedad. Por ejemplo: ```4d //myAlert ALERT("Hello world!") ``` -Then `myAlert` can be encapsulated in any object and called: +Luego `myAlert` puede encapsularse en cualquier objeto y llamarse: ```4d C_OBJECT($o) $o:=New object("custom_Alert";Formula(myAlert)) -$o.custom_Alert() //displays "Hello world!" +$o.custom_Alert() //muestra "Hello world!" ``` -Syntax with brackets is also supported: +También se admite la sintaxis con paréntesis: ```4d -$o["custom_Alert"]() //displays "Hello world!" +$o["custom_Alert"]() //muestra "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: +También puede [pasar parámetros](Concepts/parameters.md) a su fórmula cuando la llame utilizando $1, $2... al igual que con los métodos proyecto 4D: ```4d -//fullName method +//método fullName C_TEXT($0;$1;$2) $0:=$1+" "+$2 ``` -You can encapsulate `fullName` in an object: +Puede encapsular `fullName` en un objeto: ```4d C_OBJECT($o) @@ -120,103 +127,103 @@ $result:=$o.full_name("John";"Smith") // equivalent to $result:=fullName("param1";"param2") ``` -Combined with the `This`function, such object methods allow writing powerful generic code. For example: +Combinados con la función `This`, estos métodos objetos permiten escribir un código genérico muy poderoso. Por ejemplo: ```4d -//fullName2 method +//método fullName2 C_TEXT($0) $0:=This.firstName+" "+This.lastName ``` -Then the method acts like a new, calculated attribute that can be added to other attributes: +Luego el método actúa como un nuevo atributo calculado que se puede añadir a otros atributos: ```4d C_OBJECT($o) $o:=New object("firstName";"Jim";"lastName";"Wesson") -$o.fullName:=Formula(fullName2) //add the method +$o.fullName:=Formula(fullName2) //añadir el 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 -$o:=$f.message //returns the formula object in $o -``` -### Menu Methods +Tenga en cuenta que, aunque no tenga parámetros, un método objeto a ejecutar debe ser llamado con paréntesis ( ). Llamar sólo a la propiedad del objeto devolverá una nueva referencia a la fórmula (y no la ejecutará): -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. +```4d +$o:=$f.message //devuelve el objeto fórmula en $o +``` -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. +### Métodos de menú +Un método de menú se llama cuando se selecciona el comando de menú personalizado al que está asociado. El método se asigna al comando del menú utilizando el editor de menús o un comando del tema "Menús". El método se ejecuta cuando se elige el comando del menú. Al crear menús personalizados con métodos de menú que realizan acciones específicas, usted crea interfaces personalizadas para sus aplicaciones de escritorio. -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. +Los comandos de menú personalizados pueden hacer que se realicen una o varias actividades. Por ejemplo, un comando de menú de entrada de registros puede llamar a un método que realice dos tareas: mostrar el formulario de entrada apropiado y llamar al comando `ADD RECORD` hasta que el usuario cancele la actividad de entrada de datos. -### Process Methods +La automatización de secuencias de actividades es una capacidad muy poderosa del lenguaje de programación. Utilizando los menús personalizados, se pueden automatizar las secuencias de tareas y, por lo tanto, ofrecer más orientación a los usuarios de la aplicación. -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 +### Métodos de gestión de proceso -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`. +Un **método proyecto** es un método proyecto que se llama cuando se inicia un proceso. El proceso dura sólo mientras el método continúa ejecutándose, excepto si se trata de un proceso Worker. Tenga en cuenta que un método de menú asociado a un comando de menú con la propiedad *Iniciar un nuevo proceso* es también el método de gestión de proceso para el proceso recién creado. -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`. +### Métodos de gestión de eventos y errores +Un **método de gestión de eventos** es un método dedicado a la gestión de eventos, que se ejecuta en un proceso diferente del método de gestión de procesos. Generalmente, para la gestión de eventos, 4D se encarga de la mayor parte. Por ejemplo, durante la entrada de datos, 4D detecta las pulsaciones de las teclas y los clics, y luego llama a los métodos objeto y formulario correspondientes para que usted pueda responder adecuadamente a los eventos desde estos métodos. Para más información, consulte la descripción del comando `ON EVENT CALL`. -## Recursive Project Methods +Un **método de gestión de errores** es un método proyecto basado en interrupciones. Cada vez que se produce un error o una excepción, se ejecuta dentro del proceso en el que se instaló. Para más información, consulte la descripción del comando `ON ERR CALL`. -Project methods can call themselves. For example: +## Métodos proyecto recursivos -- 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. +Los métodos proyecto pueden llamarse a sí mismos. Por ejemplo: -This is called recursion. The 4D language fully supports recursion. +- El método A puede llamar al método B que puede llamar a A, por lo que A volverá a llamar a B y así sucesivamente. +- Un método puede llamarse a sí mismo. -Here is an example. Let’s say you have a `[Friends and Relatives]` table composed of this extremely simplified set of fields: +Esto se llama recursividad. El lenguaje 4D soporta totalmente la recursividad. +Aquí un ejemplo. Digamos que tiene una tabla `[Friends and Relatives]` compuesta por este conjunto de campos extremadamente simplificado: - `[Friends and Relatives]Name` - `[Friends and Relatives]ChildrensName` -For this example, we assume the values in the fields are unique (there are no two persons with the same name). Given a name, you want to build the sentence “A friend of mine, John who is the child of Paul who is the child of Jane who is the child of Robert who is the child of Eleanor, does this for a living!â€: +Para este ejemplo, suponemos que los valores de los campos son únicos (no hay dos personas con el mismo nombre). A partir de un nombre, quiere escribir la frase "Un amigo mío, Juan, que es hijo de Pablo, que es hijo de Juana, que es hijo de Roberto, que es hijo de Leonor, se gana la vida así": -1. You can build the sentence in this way: +1. Puede proceder de esta manera: ```4d - $vsName:=Request("Enter the name:";"John") + $vsName:=Request("Introduzca el nombre:";"John") If(OK=1) QUERY([Friends and Relatives];[Friends and Relatives]Name=$vsName) If(Records in selection([Friends and Relatives])>0) - $vtTheWholeStory:="A friend of mine, "+$vsName + $vtTheWholeStory:="Un amigo mío, "+$vsName Repeat QUERY([Friends and Relatives];[Friends and Relatives]ChildrensName=$vsName) $vlQueryResult:=Records in selection([Friends and Relatives]) If($vlQueryResult>0) - $vtTheWholeStory:=$vtTheWholeStory+" who is the child of "+[Friends and Relatives]Name + $vtTheWholeStory:=$vtTheWholeStory+" que es hijo de "+[Friends and Relatives]Name $vsName:=[Friends and Relatives]Name End if Until($vlQueryResult=0) - $vtTheWholeStory:=$vtTheWholeStory+", does this for a living!" + $vtTheWholeStory:=$vtTheWholeStory+", ¡se gana la vida con esto!" ALERT($vtTheWholeStory) End if End if ``` -2. You can also build it this way: +2. También puede proceder así: ```4d $vsName:=Request("Enter the name:";"John") If(OK=1) QUERY([Friends and Relatives];[Friends and Relatives]Name=$vsName) If(Records in selection([Friends and Relatives])>0) - ALERT("A friend of mine, "+Genealogy of($vsName)+", does this for a living!") + ALERT("Un amigo, "+Genealogy of($vsName)+", hace esto para vivir") End if End if ``` -with the recursive function `Genealogy of` listed here: +con la función recursiva `Genealogy of` siguiente: ```4d - ` Genealogy of project method + ` Método proyecto Genealogy of ` Genealogy of ( String ) -> Text ` Genealogy of ( Name ) -> Part of sentence @@ -227,26 +234,15 @@ with the recursive function `Genealogy of` listed here: End if ``` -Note the `Genealogy of` method which calls itself. - -The first way is an **iterative algorithm**. The second way is a **recursive algorithm**. - -When implementing code for cases like the previous example, it is important to note that you can always write methods using iteration or recursion. Typically, recursion provides more concise, readable, and maintainable code, but using it is not mandatory. - -Some typical uses of recursion in 4D are: +Note que el método `Genealogy of` se llama a sí mismo. -- Treating records within tables that relate to each other in the same way as in the example. -- Browsing documents and folders on your disk, using the commands `FOLDER LIST` and `DOCUMENT LIST`. A folder may contain folders and documents, the subfolders can themselves contain folders and documents, and so on. +La primera forma es un **algoritmo iterativo**. La segunda forma es un **algoritmo recursivo**. -**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). +Cuando implemente el código para casos como el del ejemplo anterior, es importante tener en cuenta que siempre puede escribir métodos utilizando los algoritmos iterativos o recursivos. Normalmente, la recursividad ofrece un código más conciso, legible y mantenible, pero su uso no es obligatorio. -## Specialized Methods +En 4D, algunos usos típicos de la recursividad son: -In addition to generic **project methods**, 4D supports several specific method types, that are automatically called depending on events: +- Tratar los registros dentro de las tablas que se relacionan entre sí de la misma manera que en el ejemplo. +- Navegar por los documentos y las carpetas del disco, utilizando los comandos `FOLDER LIST` y `DOCUMENT LIST`. Una carpeta puede contener carpetas y documentos, las subcarpetas pueden a su vez contener carpetas y documentos, y así sucesivamente. -| Type | Calling context | Accepts parameters | Description | -| -------------------------------- | ---------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **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 +**Importante:** Las llamadas recursivas deben terminar siempre en algún punto. En el ejemplo, el método `Genealogy of` deja de llamarse a sí mismo cuando la consulta no devuelve ningún registro. Sin esta prueba condicional, el método se llamaría a sí mismo indefinidamente; eventualmente, 4D devolvería un error "Pila llena" porque ya no tendría espacio para "apilar" las llamadas (así como los parámetros y las variables locales utilizadas en el método). diff --git a/website/translated_docs/es/Concepts/parameters.md b/website/translated_docs/es/Concepts/parameters.md index 080aaae3402f86..45d44c7baffda3 100644 --- a/website/translated_docs/es/Concepts/parameters.md +++ b/website/translated_docs/es/Concepts/parameters.md @@ -1,89 +1,193 @@ --- id: parameters -title: Parameters +title: Parámetros --- -## Using parameters +A menudo encontrará que necesita pasar datos a sus métodos y funciones. Esto se hace fácilmente con parámetros. -You'll often find that you need to pass data to your methods. This is easily done with parameters. +## Generalidades -**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: +**Los parámetros** (o **argumentos**) son piezas de datos que un método o una función de clase necesita para realizar su tarea. Los términos *parámetros* y *argumentos* se utilizan indistintamente en este manual. Los parámetros también se pasan a los comandos integrados de 4D. En este ejemplo, la cadena "Hello" es un argumento para el 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: +Los parámetros se pasan de la misma manera a los métodos o las funciones de clase. Por ejemplo, si una función de clase llamada `getArea()` acepta dos parámetros, una llamada a la función de clase podría verse así: + +``` +$area:=$o.getArea(50;100) +``` + +O, si un método proyecto llamado `DO_SOMETHING` acepta tres parámetros, una llamada al método podría verse así: ```4d -DO SOMETHING(WithThis;AndThat;ThisWay) +DO_SOMETHING($WithThis;$AndThat;$ThisWay) ``` -The parameters are separated by semicolons (;). Their value is evaluated at the moment of the call. +Los parámetros de entrada están separados por punto y coma (;). -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. +Los mismos principios se aplican cuando los métodos se ejecutan a través de comandos dedicados, por ejemplo: ```4d - //Code of the method DO SOMETHING - //Assuming all parameters are of the text type - 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 +EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/20!) +//pase la fecha !05/05/20! como parámetro de SetCalendarDate +//en el contexto de un subformulario +``` + +Los datos también pueden ser **devueltos**desde métodos y funciones de clase. Por ejemplo, la siguiente línea de instrucción utiliza el comando integrado, `Length`, para devolver la longitud de una cadena. La instrucción pone el valor devuelto por `Length` en una variable llamada *MyLength*. Esta es la instrucción: + +```4d +MyLength:=Length("How did I get here?") ``` -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`). +Any subroutine can return a value. Sólo se puede declarar un único parámetro de salida por método o función de clase. -The same principles are used when methods are executed through dedicated commands, for example: +Los valores de entrada y salida son [evaluados](#values-or-references) en el momento de la llamada y copiados en variables locales dentro de la función o método de la clase llamada. Se proponen dos sintaxis para declarar los parámetros de las variables en el código llamado: + +- [named variables](#named-parameters) (recomendado en la mayoría de los casos) o +- [variables numeradas secuencialmente](#sequential-parameters). + + +Both [named](#named-parameters) and [sequential](#sequential-parameters) syntaxes can be mixed with no restriction to declare parameters. Por ejemplo: ```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 +Function add($x : Integer) + var $0;$2 : Integer + $0:=$x+$2 ``` -**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). -### Supported expressions -You can use any [expression](Concepts/quick-tour.md#expression-types) as parameter, except: -- tables -- arrays +## Parámetro con nombre + +En los métodos llamados o en las funciones de clase, los valores de los parámetros se asignan a las variables locales. Puedes declarar parámetros utilizando un **nombre de parámetro** con un **tipo de parámetro**, separados por dos puntos. + +- Para las funciones de clase, los parámetros se declaran junto con la palabra clave `Function`. +- Para los métodos (métodos proyecto, métodos objeto formulario, métodos base y triggers), los parámetros se declaran utilizando la palabra clave `#DECLARE` al principio del código del método. + +Ejemplos: + +```4d +Function getArea($width : Integer; $height : Integer) -> $area : Integer +``` + +```4d + //myProjectMethod +#DECLARE ($i : Integer) -> $myResult : Object +``` -Tables or array expressions can only be passed [as reference using a pointer](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). -## Functions +The following rules apply: -Data can be returned from methods. A method that returns a value is called a function. +- La línea de declaración debe ser la primera línea del código del método o de la función, de lo contrario se mostrará un error (sólo los comentarios o los saltos de línea pueden preceder la declaración). +- Los nombres de los parámetros deben comenzar con un carácter `$` y cumplir con [reglas de denominación de las propiedades](dt_object.md#object-property-identifiers). +- Múltiples parámetros (y tipos) están separados por punto y coma (;). +- Las sintaxis multilínea están soportadas (utilizando el carácter "\\"). -4D or 4D Plug-in commands that return a value are also called functions. -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: +For example, when you call a `getArea()` function with two parameters: ```4d -MyLength:=Length("How did I get here?") +$area:=$o.getArea(50;100) +``` + +In the class function code, the value of each parameter is copied into the corresponding declared parameter: + +```4d +// Class: Polygon +Function getArea($width : Integer; $height : Integer)-> $area : Integer + $area:=$width*$height +``` +> If the type is not defined, the parameter will be defined as [`Variant`](dt_variant.md). + +All 4D method kinds support the `#DECLARE` keyword, including database methods. For example, in the `On Web Authentication` database method, you can declare named parameters: + +```4d + // On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean +$entitySelection:=ds.User.query("login=:1"; $user) +// Check hash password... +``` + +### Returned value + +You declare the return parameter of a function by adding an arrow (->) and the parameter definition after the input parameter(s) list. Por ejemplo: + +```4d +Function add($x : Variant; $y : Integer) -> $result : Integer +``` + +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through `$0` ([see sequential syntax below](#returned-value-1)). Por ejemplo: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + +### Tipos de datos soportados + +With named parameters, you can use the same data types as those which are [supported by the `var` keyword](variables.md#using-the-var-keyword), including class objects. Por ejemplo: + +```4d +Function saveToFile($entity : cs.ShapesEntity; $file : 4D.File) +``` + + + + + +## Parámetros secuenciales + +As an alternative to [named parameters](#named-parameters) syntax, you can declare parameters using sequentially numbered variables: **$1**, **$2**, **$3**, and so on. La numeración de las variables locales representa el orden de los parámetros. + +> Although this syntax is supported by class functions, it is recommended to use [named parameters](#named-parameters) syntax in this case. + +For example, when you call a `DO_SOMETHING` project method with three parameters: + +```4d +DO_SOMETHING($WithThis;$AndThat;$ThisWay) +``` + +In the method code, the value of each parameter is automatically copied into $1, $2, $3 variables: + +```4d + //Code of the method DO_SOMETHING + //Assuming all parameters are of the text type + 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 ``` -Any subroutine can return a value. The value to be returned is put into the local variable `$0`. -For example, the following function, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: +### Returned value + +The value to be returned is automatically put into the local variable `$0`. + + +For example, the following method, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: ```4d $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -The following is an example that uses the Uppercase4 function: +The following is an example that uses the Uppercase4 method: ```4d -NewPhrase:=Uppercase4("This is good.") +$NewPhrase:=Uppercase4("This is good.") ``` -In this example, the variable *NewPhrase* gets “THIS is good.†+In this example, the variable *$NewPhrase* gets “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, you can write: +The returned value, `$0`, is a local variable within the subroutine. Puede utilizarse como tal dentro de la subrutina. For example, you can write: ```4d // Do_something @@ -91,36 +195,109 @@ $0:=Uppercase($1) ALERT($0) ``` -In this example, `$0` is 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. +In this example, `$0` is first assigned the value of `$1`, then used as parameter to the `ALERT` command. Dentro de la subrutina, puede utilizar `$0` de la misma manera que utilizaría cualquier otra variable local. Es 4D quien devuelve el valor de `$0` (tal y como está cuando la subrutina termina) al método llamado. + + +### Tipos de datos soportados + +You can use any [expression](quick-tour.md#expression-types) as sequential parameter, except: + +- tablas +- arrays + +Tables or array expressions can only be passed [as reference using a pointer](dt_pointer.md#pointers-as-parameters-to-methods). + +## Parameter indirection (${N}) + +4D project methods accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression. `${N}` is called a **generic parameter**. + + + +### Using generic parameters + +For example, consider a method that adds values and returns the sum formatted according to a format that is passed as a parameter. Cada vez que se llama a este método, el número de valores a sumar puede variar. Debemos pasar los valores como parámetros al método y el formato en forma de cadena de caracteres. El número de valores puede variar de una llamada a otra. + +Here is the method, named `MySum`: + +```4d + #DECLARE($format : Text) -> $result : Text + $sum:=0 + For($i;2;Count parameters) + $sum:=$sum+${$i} + End for + $result:=String($sum;$format) +``` -## Declaring parameters +The method's parameters must be passed in the correct order, first the format and then a variable number of values: -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. +```4d + Result:=MySum("##0.00";125,2;33,5;24) //"182.70" + Result:=MySum("000";1;2;200) //"203" +``` -In the following example, the `OneMethodAmongOthers` project method declares three parameters: +Note that even if you declared 0, 1, or more parameters in the method, you can always pass the number of parameters that you want. Parameters are all available within the called method through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using a [compiler directive](#declaring-generic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command. Por ejemplo: ```4d - // OneMethodAmongOthers Project Method - // OneMethodAmongOthers ( Real ; Date { ; Long } ) - // OneMethodAmongOthers ( Amount ; Date { ; Ratio } ) +//foo method +#DECLARE($p1: Text;$p2 : Text; $p3 : Date) +For($i;1;Count parameters) + ALERT("param "+String($i)+" = "+String(${$i})) +End for +``` + +This method can be called: - 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 +```4d +foo("hello";"world";!01/01/2021!;42;?12:00:00?) //extra parameters are passed ``` -In the following example, the `Capitalize` project method accepts a text parameter and returns a text result: +> La indirección de parámetros se gestiona mejor si se respeta la siguiente convención: si sólo algunos de los parámetros se dirigen por indirección, deben pasarse después de los demás. + + +### Declaración de parámetros genéricos + +Al igual que con otras variables locales, no es obligatorio declarar los parámetros genéricos mediante una directiva del compilador. Sin embargo, se recomienda para evitar toda ambigüedad. Non-declared generic parameters automatically get the [Variant](dt_variant.md) type. + +To declare generic parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter. ```4d - // Capitalize Project Method - // Capitalize ( Text ) -> Text - // Capitalize ( Source string ) -> Capitalized string + C_TEXT(${4}) +``` + +> Declaring generic parameters can only be done with the [sequential syntax](#sequential-parameters). + +This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of text type. $1, $2 y $3 pueden ser de cualquier tipo de datos. Sin embargo, si se utiliza $2 por indirección, el tipo de datos utilizado será el tipo genérico. Thus, it will be of the data type text, even if for you it was, for instance, of the data type Real. + +> El número en la declaración tiene que ser una constante y no una variable. + + + + + +## Declaración de los parámetros para el modo compilado + +Aunque no sea obligatorio en [modo interpretado](interpreted.md), debe declarar cada parámetro en los métodos o funciones llamados para evitar problemas. + +When using the [named variable syntax](#named-parameters), parameters are automatically declared through the `#DECLARE` keyword or `Function` prototype. Por ejemplo: + +```4d +Function add($x : Variant; $y : Integer)-> $result : Integer + // todos los parámetros se declaran con su tipo +``` + + +When using the [sequential variable syntax](#sequential-parameters), you need to make sure all parameters are properly declared. En el siguiente ejemplo, el método `Capitalize` proyecto acepta un parámetro texto y devuelve un resultado texto: + +```4d + // Método proyecto Mayusculas + // Mayusculas( Texto ) -> Texto + // Mayusculas( Cadena fuente ) -> Cadena con la primera letra en mayú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: +La utilización de comandos tales como `New process` con métodos proceso que aceptan parámetros también requiere que los parámetros se declaren explícitamente en el método llamado. Por ejemplo: ```4d C_TEXT($string) @@ -130,7 +307,7 @@ 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 puede ser ejecutado en modo compilado sólo si "foo_method" declara sus parámetros: ```4d //foo_method @@ -140,26 +317,27 @@ 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: - -```4d +> En modo compilado, puede agrupar todos los parámetros de las variables locales de los métodos proyecto en un método específico con un nombre que empiece por "Compiler". Dentro de este método, se pueden predeclarar los parámetros de cada método, por ejemplo: +```4d + // Compiler_method C_REAL(OneMethodAmongOthers;$1) ``` +Ver la página [Modos interpretado y compilado](interpreted.md) para más información. -See [Interpreted and compiled modes](Concepts/interpreted.md) page for more information. +La declaración de parámetros también es obligatoria en los siguientes contextos (estos contextos no soportan la declaración en un 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 base - Por ejemplo, el `método base On Web Connection` recibe seis parámetros, de $1 a $6, de tipo Texto. Al principio del método base, debe escribir (incluso si no se utilizan todos los parámetros): ```4d // 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. +> You can also use [named parameters](#named-parameters) with the `#DECLARE` keyword. + +- Triggers - El parámetro $0 (Entero largo), que es el resultado de un trigger, será digitado por el compilador si el parámetro no ha sido declarado explícitamente. Sin embargo, si quiere declararlo, debe hacerlo en el propio trigger. -- 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 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: +- Objetos formulario que aceptan el evento formulario `On Drag Over` - El parámetro $0 (Entero largo), que es el resultado del evento formulario `On Drag Over`, será digitado por el compilador si el parámetro no ha sido declarado explícitamente. Sin embargo, si quiere declararlo, debe hacerlo en el propio método proyecto. **Nota:** el compilador no inicializa el parámetro $0. Por lo tanto, tan pronto como utilice el evento formulario `On Drag Over`, debe inicializar $0. Por ejemplo: ```4d C_LONGINT($0) @@ -173,131 +351,87 @@ C_TEXT($1;$2;$3;$4;$5;$6) End if ``` -## Values or references - -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: - -```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) - - //Here is the code of the method 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`. -There are two ways to make the method `DO_SOMETHING` change the value of the field: +## Wrong parameter type -1. Rather than passing the field to the method, you pass a pointer to it, so you would write: +Calling a parameter with an wrong type is an [error](error-handling.md) that prevents correct execution. For example, if you write the following methods: ```4d - //Here is some code from the method MY_METHOD - DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Last Name) - - //Here the code of the method DO_SOMETHING - $1->:=Uppercase($1->) - ALERT($1->) +// method1 +#DECLARE($value : Text) ``` -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". - -2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: - ```4d - //Here is some code from the method MY METHOD - [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Name) - - //Here the code of the method DO SOMETHING - $0:=Uppercase($1) - ALERT($0) +// method2 +method1(42) //wrong type, text expected ``` -This second technique of returning a value by a subroutine is called “using a function.†This is described in the [Functions](#functions) paragraph. +This case is handled by 4D depending on the context: -### Particular cases: objects and collections +- in [compiled projects](interpreted.md), an error is generated at the compilation step whenever possible. Otherwise, an error is generated when the method is called. +- in interpreted projects: + + if the parameter was declared using the [named syntax](#named-parameters) (`#DECLARE` or `Function`), an error is generated when the method is called. + + if the parameter was declared using the [sequential syntax](#sequential-parameters) (`C_XXX`), no error is generated, the called method receives an empty value of the expected type. -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*). -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. -For example, consider the `CreatePerson` method that creates an object and sends it as a parameter: -```4d - //CreatePerson - C_OBJECT($person) - $person:=New object("Name";"Smith";"Age";40) - ChangeAge($person) - ALERT(String($person.Age)) -``` -The `ChangeAge` method adds 10 to the Age attribute of the received object +## Variables de entrada/salida -```4d - //ChangeAge - C_OBJECT($1) - $1.Age:=$1.Age+10 - ALERT(String($1.Age)) -``` +Dentro de la subrutina, puede utilizar los parámetros $1, $2... de la misma manera que utilizaría cualquier otra variable local. Sin embargo, en el caso de que utilice comandos que modifiquen el valor de la variable pasada como parámetro (por ejemplo `Find in field`), los parámetros $1, $2, etc. no pueden utilizarse directamente. Primero debe copiarlos en las variables locales estándar (por ejemplo: `$myvar:=$1`). -When you execute the `CreatePerson` method, both alert boxes will read "50" since the same object reference is handled by both methods. -**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 +## Utilización de las propiedades de objeto como parámetros con nombre -Using objects as parameters allow you to handle **named parameters**. This programming style is simple, flexible, and easy to read. +La utilización de objetos como parámetros permite manejar **parámetros con nombre**. Este estilo de programación es simple, flexible y fácil de leer. -For example, using the `CreatePerson` method: +Por ejemplo, utilizando el método `CreatePerson`: ```4d //CreatePerson - C_OBJECT($person) + var $person : Object $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) ALERT(String($person.Age)) ``` -In the `ChangeAge` method you can write: +En el método `ChangeAge` puede escribir: ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=$para.Age+10 ALERT($para.Name+" is "+String($para.Age)+" years old.") ``` -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 +Esto ofrece una poderosa manera de definir [parámetros opcionales](#optional-parameters) (ver también abajo). Para manejar los parámetros que faltan, puede: +- verificar si se suministran todos los parámetros esperados comparándolos con el valor `Null`, o +- predefinir los valores de los parámetros, o - use them as empty values. -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: +En el método `ChangeAge` anterior, las propiedades Age y Name son obligatorias y producirían errores si faltaran. Para evitar este caso, puede escribir simplemente: ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=Num($para.Age)+10 ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` +Entonces ambos parámetros son opcionales; si no se llenan, el resultado será " is 10 years old", pero no se generará ningún error. -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: +Por último, con los parámetros con nombre, el mantenimiento o la reproducción de las aplicaciones es muy sencillo y seguro. Imagine que más adelante se da cuenta de que añadir 10 años no siempre es apropiado. Necesita otro parámetro para definir cuántos años hay que añadir. Escriba: ```4d $person:=New object("Name";"Smith";"Age";40;"toAdd";10) ChangeAge($person) //ChangeAge -C_OBJECT($1;$para) +var $1;$para : Object $para:=$1 If ($para.toAdd=Null) $para.toAdd:=10 @@ -306,111 +440,143 @@ $para.Age:=Num($para.Age)+$para.toAdd ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` -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. +El poder aquí es que no tendrá que cambiar su código existente. Siempre funcionará como en la versión anterior, pero si es necesario, puede utilizar otro valor que no sea 10 años. + +Con las variables con nombre, cualquier parámetro puede ser opcional. En el ejemplo anterior, todos los parámetros son opcionales y se puede dar cualquiera, en cualquier orden. + -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 +## Parámetros opcionales -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: +En el manual *Lenguaje de 4D*, los caracteres { } (llaves) indican parámetros opcionales. Por ejemplo, `ALERT (message{; okButtonTitle})` significa que el parámetro *okButtonTitle* puede omitirse al llamar al comando. Se puede llamar de las siguientes maneras: ```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 methods and functions also accept such optional parameters. The issue with optional parameters is how to handle the case where some of them are missing in the called code. By default, if you call a method or function with less parameters than declared, missing parameters are processed as default values in the called code, [according to their type](data-types.md#default-values). Por ejemplo: + +```4d +// "concate" function of myClass +Function concate ($param1 : Text ; $param2 : Text)->$result : Text +$result:=$param1+" "+$param2 +``` +```4d + // Calling method + $class:=cs.myClass.new() + $class.concate("Hello") // "Hello " + $class.concate() // Displays " " ``` -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. -> 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. +> Cuando los parámetros opcionales son necesarios en sus métodos, también puede considerar el uso de [propiedades de objeto como parámetros con nombre](#using-objects-properties-as-named-parameters) que ofrecen una forma flexible de manejar un número variable 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 el comando `Count parameters` desde dentro del método llamado, puede detectar el número real de parámetros y realizar diferentes operaciones dependiendo de lo que haya recibido. -The following example displays a text message and can insert the text into a document on disk or in a 4D Write Pro area: +El siguiente ejemplo muestra un mensaje de texto y puede insertar el texto en un documento en el disco o en un área de 4D Write Pro: ```4d // APPEND TEXT Project Method // APPEND TEXT ( Text { ; Text { ; Object } } ) // APPEND TEXT ( Message { ; Path { ; 4DWPArea } } ) - C_TEXT($1;$2) - C_OBJECT($3) + Method($message : Text; $path : Text; $wpArea : Object) - ALERT($1) + ALERT($message) If(Count parameters>=3) - WP SET TEXT($3;$1;wk append) + WP SET TEXT($wpArea;$1;wk append) Else If(Count parameters>=2) - TEXT TO DOCUMENT($2;$1) + TEXT TO DOCUMENT($path;$message) End if End if ``` +Después de añadir este método proyecto a su aplicación, puede escribir: -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ólo mostrará el mensaje +APPEND TEXT(vtSomeText;$path) //Muestra el mensaje y el anexo al documento en $path +APPEND TEXT(vtSomeText;"";$wpArea) //Muestra el mensaje y lo escribe en $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. -In the following example, the project method `SEND PACKETS` accepts a time parameter followed by a variable number of text parameters: -```4d - //SEND PACKETS Project Method - //SEND PACKETS ( Time ; Text { ; Text2... ; TextN } ) - //SEND PACKETS ( docRef ; Data { ; Data2... ; DataN } ) +## Valores o referencias - C_TIME($1) - C_TEXT(${2}) - C_LONGINT($vlPacket) +Cuando pasa un parámetro, 4D siempre evalúa la expresión del parámetro en el contexto del método que llama y define el **valor resultante** en las variables locales en la función de clase o la subrutina. Las variables/parámetros locales no son los campos, variables o expresiones reales pasados por el método que llama; sólo contienen los valores que se han pasado. Como su alcance es local, si el valor de un parámetro se modifica en la función/subrutina de la clase, no cambia el valor en el método que lo llama. Por ejemplo: - For($vlPacket;2;Count parameters) - SEND PACKET($1;${$vlPacket}) - End for +```4d + //Esta es una parte del código del método MY_METHOD +DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" +ALERT([People]Name) + + //Este es el código del método DO_SOMETHING + $1:=Uppercase($1) + ALERT($1) ``` -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**. +La caja de alerta mostrada por `DO_SOMETHING` dirá "WILLIAMS" y la caja de alerta mostrada por `MY_METHOD` dirá "williams". El método cambió localmente el valor del parámetro $1, pero esto no afecta al valor del campo `[People]Name` pasado como parámetro por el método `MY_METHOD`. -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. +Hay dos formas de hacer que el método `DO_SOMETHING` cambie el valor del campo: -This function is called in the following manner: +1. En lugar de pasar el campo al método, se pasa un puntero al mismo, por lo que se escribiría: ```4d - Result:=MySum("##0.00";125,2;33,5;24) + //Esta es una parte del código del método MY_METHOD + DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Last Name) + //Este es el código del método DO_SOMETHING + $1->:=Uppercase($1->) + ALERT($1->) ``` -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. +Aquí el parámetro no es el campo, sino un puntero al mismo. Por lo tanto, dentro del método `DO SOMETHING`, $1 ya no es el valor del campo sino un puntero al campo. El objeto **referenciado** por $1 ($1-> en el código anterior) es el campo real. Por lo tanto, cambiar el objeto referenciado va más allá del alcance de la subrutina, y el campo real se ve afectado. En este ejemplo, las dos cajas de alerta dirán "WILLIAMS". -Here is the function, named `MySum`: +2. En lugar de que el método `DO_SOMETHING` "haga algo", puede reescribir el método para que devuelva un valor. Por lo tanto, escribiría: ```4d - $Sum:=0 - For($i;2;Count parameters) - $Sum:=$Sum+${$i} - End for - $0:=String($Sum;$1) + //Esta es una parte del código del método MY_METHO + [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Name) + + //Este es el código del método DO_SOMETHING + $0:=Uppercase($1) + ALERT($0) ``` -This function can now be called in various ways: +Esta segunda técnica de retornar un valor por una subrutina se llama " utilizar una función" Se describe en el párrafo [Valores devueltos](#returning-values). + + +### Casos particulares: objetos y colecciones + +Debe prestar atención al hecho de que los tipos de datos Objeto y Colección sólo pueden manejarse a través de una referencia (es decir, un *puntero* interno). + +Por consiguiente, cuando se utilizan estos tipos de datos como parámetros, `$1, $2...` no contienen *valores* sino *referencias*. La modificación del valor de los parámetros `$1, $2...` dentro de la subrutina se propagará a cualquier lugar donde se utilice el objeto o colección fuente. Este es el mismo principio que para [los punteros](dt_pointer.md#pointers-as-parameters-to-methods), excepto que los parámetros `$1, $2...` no necesitan ser desreferenciados en la subrutina. + +Por ejemplo, considere el método `CreatePerson` que crea un objeto y lo envía como parámetro: ```4d - Result:=MySum("##0.00";125,2;33,5;24) - Result:=MySum("000";1;18;4;23;17) + //CreatePerson + var $person : Object + $person:=New object("Name";"Smith";"Age";40) + ChangeAge($person) + ALERT(String($person.Age)) ``` -### 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. +El método `ChangeAge` añade 10 al atributo Age del objeto recibido ```4d - C_LONGINT(${4}) + //ChangeAge + #DECLARE ($person : Object) + $person.Age:=$person.Age+10 + ALERT(String($person.Age)) ``` -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. +Cuando se ejecuta el método `CreatePerson`, las dos cajas de alerta dirán "50" ya que la misma referencia de objeto es manejada por ambos métodos. + +**4D Server:** cuando se pasan parámetros entre métodos que no se ejecutan en la misma máquina (utilizando por ejemplo la opción "Ejecutar en el servidor"), las referencias no son utilizables. En estos casos, se envían copias de los parámetros de objetos y colecciones en lugar de referencias. + -**Note:** The number in the declaration has to be a constant and not a variable. \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/plug-ins.md b/website/translated_docs/es/Concepts/plug-ins.md index 10de5810c8138f..1927814a6006ad 100644 --- a/website/translated_docs/es/Concepts/plug-ins.md +++ b/website/translated_docs/es/Concepts/plug-ins.md @@ -3,59 +3,57 @@ id: plug-ins title: Plug-ins --- -As you develop a 4D application, you will discover many capabilities that you did not notice when you started. You can even augment the standard version of 4D by adding **plug-ins** to your 4D development environment. +A medida que desarrolle una aplicación 4D, descubrirá muchas funcionalidades de las que no se percató cuando empezó. Incluso puede extender la versión estándar de 4D añadiendo **plug-ins** a su entorno de desarrollo 4D. -## Why the need for a plug-in? +## ¿Por qué es necesario un plug-in? -Although 4D provides hundred of built-in methods used to manipulate objects, records and implement user interface, some special use or feature (sometimes platform dependant) may be needed: one may need ODBC under Windows, another may need Apple services under macOS, while yet another may want to implement specific statistics tools, social network login, payment platform, file access over the network, a special user interface, or a private picture structure. +Aunque 4D ofrece cientos de métodos integrados para manipular objetos, registros e implementar la interfaz de usuario, es posible que se necesite algún uso o característica especial (que a veces depende de la plataforma): uno puede necesitar ODBC en Windows, otro puede necesitar los servicios de Apple en macOS, mientras que otro puede querer implementar herramientas estadísticas específicas, inicio de sesión en redes sociales, plataforma de pago, acceso a archivos a través de la red, una interfaz de usuario especial o una estructura de imagen privada. -It is obvious that covering all areas of both the macOS and Windows operating systems by way of 4D commands would certainly lead to a product with thousands of commands, and at the same time, most users would have no need for such a large set of capabilities. Also, creating such an all-encompassing tool would make the 4D environment incredibly complex and would take most users months of study before useful results could be expected. +Es evidente que cubrir todas las áreas de los sistemas operativos macOS y Windows por medio de los comandos de 4D sin duda conduciría a un producto con miles de comandos, y al mismo tiempo, la mayoría de los usuarios no tendrían necesidad de un conjunto tan grande de funcionalidades. Además, la creación de una herramienta tan completa haría que el entorno 4D fuera increíblemente complejo y llevaría a la mayoría de los usuarios meses de estudio antes de poder esperar resultados útiles. -The modular nature of the 4D environment allows the creation of basic applications but does not preclude the development of highly complex systems. The 4D Plug-in architecture opens the 4D environment to any type of application or user. 4D Plug-ins multiply that application or user's power and productivity. +La naturaleza modular del entorno 4D permite la creación de aplicaciones básicas, pero no impide el desarrollo de sistemas muy complejos. La arquitectura del plug-in 4D abre el entorno 4D a todo tipo de aplicaciones o de usuario. Los plug-ins 4D multiplican la potencia y la productividad de la aplicación o del usuario. -## What is a plug-in and what can it do? +## ¿Qué es un plug-in y qué puede hacer? -A plug-in is a piece of code that 4D launches at start up. It adds functionality to 4D and thus increases its capacity. +Un plug-in es una pieza de código que 4D lanza al inicio. Añade funcionalidad a 4D y aumenta así su capacidad. -Usually, a plug-in does things that: +Normalmente, un plug-in hace cosas que: +- 4D no puede efectuar (es decir, una tecnología de plataforma específica), +- será muy difícil de escribir sólo con 4D, +- sólo están disponibles como punto de entrada del plug-in -- 4D cannot do (ie, specific platform technology), -- will be very hard to write just using 4D, -- are only available as Plug-in Entrypoint +Un plug-in suele contener un conjunto de rutinas entregadas al desarrollador 4D. Puede manejar un Ãrea Externa y ejecutar un proceso externo. -A plug-in usually contains a set of routines given to the 4D Developer. It can handle an External Area and run an external process. +- Una **rutina de conexión** es una rutina escrita en lenguaje nativo (normalmente C o C++) que provoca una acción. +- Un **área externa** es una parte de un formulario que puede mostrar casi todo e interactuar con el usuario cuando sea necesario. +- Un **proceso externo** es un proceso que se ejecuta solo, normalmente en un bucle, haciendo casi todo lo que quiere. Todo el código del proceso pertenece al plug-in, 4D simplemente está presente para recibir/enviar eventos al proceso. -- A **plug-in routine** is a routine written in native language (usually C or C++) that causes an action. -- An **external area** is a part of a form that can display almost everything and interact with the user when necessary. -- An **external process** is a process that runs alone, usually in a loop, doing almost everything it wants. All process code belongs to the plug-in, 4D is simply present to receive/send events to the process. +### Nota importante -### Important note +Un plug-in puede ser muy sencillo, con una sola rutina que realice una tarea muy pequeña, o puede ser muy complejo, con cientos de rutinas y áreas. Prácticamente no hay límite para lo que puede hacer un plug-in, sin embargo todo desarrollador de plug-ins debe recordar que un plug-in es una parte de código "de muestra". Es el plug-in que se ejecuta dentro de 4D, no lo contrario. Como parte de código, es el anfitrión de 4D; no es una aplicación independiente. Comparte el tiempo de la CPU y la memoria con 4D y otros plug-ins, por lo tanto, debería ser un código conciso, utilizando sólo lo necesario para funcionar. Por ejemplo, en los bucles largos, un plug-in debe llamar a `PA_Yield()` para dar tiempo al planificador 4D a menos que su tarea sea crítica tanto para él como para la aplicación. -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. +## ¿Cómo crear un plug-in? -## How to create a plug-in? +4D ofrece en GitHub un código abierto [**plug-in SDK**](https://github.com/4d/4D-Plugin-SDK), que contiene el plug-in API 4D y el asistente de plugins 4D: -4D provides on GitHub an open-source [**plug-in SDK**](https://github.com/4d/4D-Plugin-SDK), containing the 4D Plugin API and the 4D Plugin Wizard: +- el [**Plugin API de 4D **](https://github.com/4d/4D-Plugin-SDK/blob/master/4D%20Plugin%20API), escrito en C, añade más de 400 funciones que le ayudan a crear fácilmente sus propios plug-ins para añadir nuevas funcionalidades a su aplicación 4D. Las funciones del plug-in de API de 4D gestionan todas las interacciones entre la aplicación 4D y su plug-in. +- [**El Asistente de plug-in 4D**](https://github.com/4d/4D-Plugin-SDK/blob/master/4D%20Plugin%20Wizard) es una herramienta esencial que simplifica la tarea de desarrollar plugins 4D. Escribe el código que 4D necesita para cargar e interactuar correctamente con un plug-in, permitiéndole concentrarse en su propio código. -- the [**4D Plugin API**](https://github.com/4d/4D-Plugin-SDK/blob/master/4D%20Plugin%20API), written in C, adds more than 400 functions that help you to easily create your own plug-ins to add new functionnalities to your 4D application. 4D Plug-in API functions manage all the interactions between the 4D application and your plug-in. -- The [**4D Plugin Wizard**](https://github.com/4d/4D-Plugin-SDK/blob/master/4D%20Plugin%20Wizard) is an essential tool that simplifies the task of developing 4D plug-ins. It writes the code 4D needs to correctly load and interact with a plug-in, allowing you to concentrate on your own code. +## ¿Cómo instalar un plug-in? -## How to install a plug-in? +Los plug-ins se instalan en el entorno 4D copiando sus archivos en la carpeta correspondiente. -You install plug-ins in the 4D environment by copying their files into the appropriate folder. +Las carpetas "PluginName.bundle" contienen las versiones para Windows y macOS de los plug-ins 4D. Su arquitectura interna específica permite a 4D Server cargar la versión adecuada según la plataforma en la que se ejecutará la máquina cliente. Para instalar un plug-in en su entorno, sólo tiene que poner la carpeta "PluginName.bundle" o el paquete correspondiente en la carpeta **Plugins** deseada. -“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. +Puede colocar la carpeta Plugins en dos lugares diferentes: -You can put the PlugIns folder in two different places: +- A nivel de la aplicación 4D ejecutable, es decir: + - En Windows: junto al archivo .exe + - En macOS: en el primer nivel de la carpeta Contents dentro del paquete de la aplicación. En este caso, los plug-ins están disponibles en cada proyecto abierto por esta aplicación. +- En el mismo nivel que la carpeta Project. En este caso, los plug-ins sólo están disponibles en esta aplicación en particular. -- 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. +La elección de la ubicación depende de cómo quiera utilizar el plug-in. -The choice of location depends on how you want to use the plug-in. +Si se coloca el mismo plug-in en ambas ubicaciones, 4D sólo cargará el que esté situado junto a la estructura. En una aplicación compilada y fusionada con 4D Volume Desktop, si hay varias instancias del mismo plug-in presentes, esto impedirá que la aplicación se abra. -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 +Los plug-ins son cargados por 4D cuando se lanza la aplicación, por lo que tendrá que salir de su aplicación 4D antes de instalarlos. A continuación, abra su proyecto con 4D. Si algún plug-in requiere una licencia específica, se cargará pero no estará disponible para su uso. \ No newline at end of file diff --git a/website/translated_docs/es/Concepts/quick-tour.md b/website/translated_docs/es/Concepts/quick-tour.md index 3ec4f463f3e91b..cad2211d77abd5 100644 --- a/website/translated_docs/es/Concepts/quick-tour.md +++ b/website/translated_docs/es/Concepts/quick-tour.md @@ -1,70 +1,72 @@ --- id: quick-tour -title: A Quick Tour -sidebar_label: A Quick Tour +title: Un recorrido rápido +sidebar_label: Un recorrido rápido --- -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: +Utilizando el lenguaje 4D, la impresión del tradicional mensaje "Hello, world!" en pantalla puede hacerse de varias maneras. Lo más sencillo es probablemente escribir la siguiente línea única en un método de proyecto: -```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: +Este código mostrará una caja de diálogo de alerta estándar de la plataforma con el mensaje "Hello, World!", que contiene un botón de OK. Para ejecutar el código, basta con hacer clic en el botón de ejecución en el editor de métodos: ![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! +O bien, podría adjuntar este código a un botón de formulario y ejecutarlo, en cuyo caso al hacer clic en el botón se mostraría la caja de diálogo de alerta. En todo caso, ¡acaba de ejecutar su primera línea de código 4D! + -## Assigning Values +## Asignar los 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. +Los datos pueden introducirse y copiarse en variables, campos, elementos de arrays... Poner datos en una variable se llama asignar los datos a la variable y se hace con el operador de asignación (:=). El operador de asignación también se utiliza para asignar datos a campos o elementos de 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 //asigna 3 a la variable MyNumber +[Products]Size:=$MyNumber //asigna la variable MyNumber al campo [Products]Size +arrDays{2}:="Tuesday" //asigna la cadena "Tuesday" al segundo elemento de arrDays +MyVar:=Length("Acme") //asigna el resultado de la función (4) a MyVar +$myDate:=!2018/01/21! //asigna una fecha literal +$myHour:=?08:12:55? //asigna una 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. +Debe distinguir el operador de asignación := de los demás operadores. En lugar de combinar expresiones en una nueva expresión, el operador de asignación copia el valor de la expresión a la derecha del operador de asignación en la variable o campo a la izquierda del 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:** no confunda el operador de asignación (:=) con el signo igual (=). Se ha elegido deliberadamente un operador de asignación diferente (y no =) para evitar los problemas y la confusión que suelen producirse con == o === en otros lenguajes de programación. Estos errores son a menudo difíciles de reconocer por el compilador y conducen a una solución de problemas que requiere mucho tiempo. ## Variables -The 4D language is strongly typed, although some flexibility is allowed in many cases. You create a typed variable using the `var` keyword. For example, to create a variable of the date type, you can write: +El lenguaje 4D es estricto con los tipos de datos, aunque se permite cierta flexibilidad en muchos casos. Se crea una variable digitada utilizando la palabra clave `var`. Por ejemplo, para crear una variable de tipo fecha, puede escribir: ```4d var MyDate : Date ``` -The `var` keyword allows declaring object variables of a defined class type, for example: +La palabra clave `var` permite declarar variables objeto de un tipo de clase definido, por ejemplo: ```4d var myPerson : cs.Person -//variable of the Person user class +//de la clase de usuario Person ``` -Even if it is usually not recommended, you can declare variables simply by using them; you do not necessarily need to formally define them. For example, if you want a variable that will hold the current date plus 30 days, you can write: + +Aunque no se suele recomendar, se pueden declarar variables simplemente utilizándolas; no es necesario definirlas formalmente. Por ejemplo, si desea una variable que contenga la fecha actual más 30 días, puede escribir: ```4d MyOtherDate:=Current date+30 ``` -The line of code reads “MyOtherDate gets the current date plus 30 days.†This line declares the variable, assigns it with both the (temporary) date type and a content. A variable declared 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 `var` cannot change the type. In [compiled mode](interpreted.md) however, the type can never be changed, regardless of how the variable was declared. +La línea de código dice "MyOtherDate obtiene la fecha actual más 30 días" Esta línea declara la variable, la asigna con el tipo de fecha (temporal) y un contenido. Una variable declarada por asignación se interpreta como sin tipo, es decir, puede ser asignada con otros tipos en otras líneas y entonces cambia el tipo dinámicamente. Una variable digitada con `var` no puede cambiar de tipo. Sin embargo, en [modo compilado](interpreted.md), el tipo nunca puede cambiarse, independientemente de cómo se haya declarado la variable. -## 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: +Los comandos 4D son métodos integrados para realizar una acción. Todos los comandos 4D, como `CREATE RECORD`, o `ALERT`, se describen en el manual _Lenguaje de 4D_, agrupados por temas. Los comandos se utilizan a menudo con parámetros, que se pasan entre corchetes () y separados por punto y coma (;). Ejemplo: ```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: +Algunos comandos se adjuntan a colecciones u objetos, en cuyo caso son métodos temporales que se utilizan con la notación de puntos. Por ejemplo: ```4d $c:=New collection(1;2;3;4;5) @@ -73,142 +75,143 @@ $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. +Puede utilizar los plug-ins o los componentes 4D que añaden nuevos comandos a su entorno de desarrollo 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: +Hay muchos plug-ins propuestos por la comunidad de usuarios de 4D o por desarrolladores terceros. Por ejemplo, utilizando el [4d-plugin-pdf-pages](https://github.com/miyako/4d-plugin-pdf-pages) en macOS: ```4d PDF REMOVE PAGE(path;page) ``` -4D SVG is an example of a utility component extending the capabilities of your application: +4D SVG es un ejemplo de componente utilitario que aumenta las capacidades de su aplicación: ```4d -//drawing a picture +//hacer un dibujo svgRef:=SVG_New objectRef:=SVG_New_arc(svgRef;100;100;90;90;180) ``` +4D SVG está incluido en 4D. -4D SVG is included in 4D. - -## Constants +## Constantes -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 ofrece un conjunto extensivo de constantes predefinidas, cuyos valores son accesibles por nombre. Por ejemplo, `Read Mode` es una constante (valor 2). Las constantes predefinidas aparecen subrayadas por defecto en el editor de métodos 4D. Permiten escribir un código más legible. ```4d -vRef:=Open document("PassFile";"TEXT";Read Mode) // open doc in read only mode +vRef:=Open document("PassFile";"TEXT";Read Mode) // abrir el documento en modo de sólo lectura ``` -## 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 ofrece un gran número de métodos (o comandos) integrados, pero también le permite crear sus propios **métodos de proyecto**. Los métodos de proyecto son métodos definidos por el usuario que contienen comandos, operadores y otras partes del lenguaje. Los métodos proyecto son métodos genéricos, pero hay otros tipos de métodos: métodos objeto, métodos formulario, métodos tabla (Triggers) y 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. +Un método se compone de varias líneas de instrucciones, cada una de las cuales consta de una línea en el método. Una línea de instrucción realiza una acción, y puede ser simple o compleja. -For example, the following line is a statement that will display a confirmation dialog box: +Por ejemplo, la siguiente línea es una sentencia que mostrará una caja de diálogo de confirmación: ```4d -CONFIRM("Do you really want to close this account?";"Yes";"No") +CONFIRM("¿Realmente quiere cerrar esta cuenta?"; "Sí"; "No") ``` -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`: +Un método también contiene pruebas y bucles que controlan el flujo de ejecución. Los métodos 4D soportan las estructuras `If...Else...End if` y `Case of...Else...End case`, así como los bucles: `While...End while`, `Repeat...Until`, `For...End for`, y `For each...End for each`: -The following example goes through all the characters of the text vtSomeText: +El siguiente ejemplo recorre todos los caracteres del texto vtSomeText: ```4d For($vlChar;1;Length(vtSomeText)) - //Do something with the character if it is a TAB + //Hacer algo con el carácter si es un TAB If(Character code(vtSomeText[[$vlChar]])=Tab) //... End if 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: +Un método proyecto puede llamar a otro método proyecto con o sin parámetros (argumentos). Los parámetros se pasan al método entre paréntesis, a continuación del nombre del método. Cada parámetro está separado del siguiente por un punto y coma (;). Los parámetros están disponibles dentro del método llamado como variables locales numeradas secuencialmente: $1, $2,..., $n. Un método puede devolver un único valor en el parámetro $0. Cuando se llama a un método, sólo hay que escribir su nombre: ```4d $myText:="hello" -$myText:=Do_Something($myText) //Call the Do_Something method +$myText:=Do_Something($myText) //Llama al método Do_Something ALERT($myText) //"HELLO" - //Here the code of the method Do_Something + //Este es el código del método Do_Something $0:=Uppercase($1) ``` -## 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 datos -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. +En el lenguaje, los distintos tipos de datos que se pueden manejar se denominan tipos de datos. Existen tipos de datos básicos (cadena, numérico, fecha, hora, booleano, imagen, punteros, arrays), y también tipos de datos compuestos (BLOBs, objetos, colecciones). -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. +Tenga en cuenta que los datos de tipo cadena y numérico pueden asociarse a más de un tipo de campo. Cuando se introducen datos en un campo, el lenguaje convierte automáticamente los datos en el tipo correcto para el campo. Por ejemplo, si se utiliza un campo entero, sus datos se tratan automáticamente como numéricos. En otras palabras, no tiene que preocuparse por mezclar tipos de campos similares al utilizar el lenguaje; éste los gestionará por usted. -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: +Sin embargo, al utilizar el lenguaje es importante no mezclar los diferentes tipos de datos. Del mismo modo que no tiene sentido almacenar "ABC" en un campo de fecha, tampoco tiene sentido poner "ABC" en una variable utilizada para fechas. En la mayoría de los casos, 4D es muy tolerante y tratará de dar sentido a lo que está haciendo. Por ejemplo, si añade un número a una fecha, 4D asumirá que quiere añadir ese número de días a la fecha, pero si intenta añadir una cadena a una fecha, 4D le dirá que la operación no puede funcionar. + +Hay casos en los que es necesario almacenar datos como un tipo y utilizarlos como otro. El lenguaje contiene un conjunto completo de comandos que permiten convertir de un tipo de datos a otro. Por ejemplo, es posible que necesite crear un número de pieza que empiece por un número y termine con caracteres como "abc". En este caso, podría escribir: ```4d [Products]Part Number:=String(Number)+"abc" ``` -If *Number* is 17, then *[Products]Part Number* will get the string “17abcâ€. +Si _Number_ es 17, then _[Products]Part Number_ obtendrá el valor “17abcâ€. -The data types are fully defined in the section [Data Types](Concepts/data-types.md). +Los tipos de datos están completamente definidos en la sección [Tipos de datos](Concepts/data-types.md). -## Objects and collections +## Objetos y colecciones -You can handle 4D language objects and collections using the object notation to get or to set their values. For example: +Puedes manejar objetos y colecciones del lenguaje 4D utilizando la notación objeto para obtener o definir sus valores. Por ejemplo: ```4d employee.name:="Smith" ``` -You can also use a string within square brackets, for example: +También puede utilizar una cadena entre corchetes, por ejemplo: ```4d $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: +Como el valor de una propiedad de objeto puede ser un objeto o una colección, la notación objeto acepta una secuencia de símbolos para acceder a subpropiedades, por ejemplo: ```4d $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: +Tenga en cuenta que si el valor de la propiedad del objeto es un objeto que encapsula un método (una fórmula), debe añadir paréntesis () al nombre de la propiedad para ejecutar el método: - $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!" +``` -To access a collection element, you have to pass the element number embedded in square brackets: +Para acceder a un elemento de la colección, debe pasar el número del elemento entre corchetes: ```4d C_COLLECTION(myColl) myColl:=New collection("A";"B";1;2;Current time) -myColl[3] //access to 4th element of the collection +myColl[3] //acceso al 4º elemento de la colección ``` -## Classes +## Clases -The 4D language supports object classes. Add a `myClass.4dm` file in the Project/Sources/Classes folder of a project to create a class named "myClass". +El lenguaje 4D soporta las clases de objetos. Añade un archivo `myClass.4dm` en la carpeta Project/Sources/Classes de un proyecto para crear una clase llamada "myClass". -To instantiate an object of the class in a method, call the user class from the *class store* (`cs`) and use the `new()` member function. You can pass parameters. +To instantiate an object of the class in a method, call the user class from the *class store* (`cs`) and use the `new()` member function. Se pueden pasar parámetros. -```4d -// in a 4D method +```4d +// en un método 4D $o:=cs.myClass.new() ``` -In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. A class member method can receive and return parameters like any method, and use `This` as the object instance. +In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. Un método miembro de clase puede recibir y devolver parámetros como cualquier método, y utilizar `This` como instancia del objeto. -```4d -//in the myClass.4dm file +```4d +//en el archivo myClass.4dm Function hello C_TEXT($0) $0:="Hello "+This.who ``` -To execute a class member method, just use the `()` operator on the member method of the object instance. +Para ejecutar un método miembro de clase, basta con utilizar el operador `()` en el método miembro de la instancia del objeto. ```4d $o:=cs.myClass.new() @@ -219,8 +222,8 @@ $message:=$o.myClass.hello() Optionally, use the `Class constructor` keyword to declare properties of the object. -```4d -//in the Rectangle.4dm file +```4d +//en el archivo Rectangle.4dm Class constructor C_LONGINT($1;$2) This.height:=$1 @@ -228,9 +231,9 @@ This.width:=$2 This.name:="Rectangle" ``` -A class can inherit from another class by using `Class inherits `. Superclasses can be called using the `Super` command. For example: +A class can extend another class by using `Class extends `. Superclasses can be called using the `Super` command. Por ejemplo: -```4d +```4d //in the Square.4dm file Class extends rectangle @@ -244,93 +247,91 @@ Super($1;$1) This.name:="Square" ``` -## Operators - -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 | - - -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 | -| --------------- | ------------- | ---------------------------------------------------------------------------------------------------- | -| Number | 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 | - - -## Expressions - -Simply put, expressions return a value. In fact, when using the 4D language, you use expressions all the time and tend to think of them only in terms of the value they represent. Expressions are also sometimes referred to as formulas. - -Expressions are made up of almost all the other parts of the language: commands, operators, variables, fields, object properties, and collection elements. You use expressions to build statements (lines of code), which in turn are used to build methods. The language uses expressions wherever it needs a piece of data. - -Expressions rarely “stand alone.†There are several places in 4D where an expression can be used by itself. It includes: - -- Formula editor (apply formula, query with formula, order by formula) -- The `EXECUTE FORMULA` command -- The Property list, where an expression can be used as a data source for most of widgets -- Debugger where the value of expressions can be checked -- Quick Report editor as a formula for a column - -### 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 | -| ------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| “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. | -| !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) | -| 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: - -```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 +## Operadores +Cuando se utiliza el lenguaje, es raro que se quiera simplemente un dato. Es más probable que quiera hacer algo con esos datos. Estos cálculos se realizan con operadores. Los operadores, en general, toman dos datos y realizan una operación sobre ellos que da como resultado un nuevo dato. Usted ya conoce a la mayoría de los operadores. Por ejemplo, 1 + 2 utiliza el operador de adición (o signo más) para sumar dos números, y el resultado es 3. Esta tabla muestra algunos operadores numéricos comunes: + +| Operador | Operación | Ejemplo | +| -------- | -------------- | --------- | +| + | Adición | 1 + 2 = 3 | +| – | Resta | 3 - 2 = 1 | +| * | Multiplicación | 2 * 3 = 6 | +| / | División | 6 / 2 = 3 | + +Los operadores numéricos son sólo un tipo de operador disponible. 4D soporta múltiples tipos de datos, como números, texto, fechas e imágenes, por lo que existen operadores que realizan operaciones con estos diferentes tipos de datos. + +Los mismos símbolos se utilizan a menudo para diferentes operaciones, dependiendo del tipo de datos. Por ejemplo, el signo más (+) realiza diferentes operaciones con diferentes datos: + +| Tipos de datos | Operación | Ejemplo | +| -------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------- | +| Número | Adición | 1 + 2 suma los números y da como resultado 3 | +| Cadena | Concatenación | "Hola" + "a todos" concatena (une) las cadenas y da como resultado "Hola a todos" | +| Fecha y Número | Adición de fecha | !1989-01-01! + 20 añade 20 días a la fecha del 1 de enero de 1989 y da como resultado la fecha del 21 de enero de 1989 | + + +## Expresiones + +En pocas palabras, las expresiones devuelven un valor. De hecho, al utilizar el lenguaje 4D, se utilizan expresiones todo el tiempo y se tiende a pensar en ellas sólo en términos del valor que representan. Las expresiones también se llaman fórmulas. + +Las expresiones se componen de casi todas las demás partes del lenguaje: comandos, operadores, variables, campos, propiedades de objetos y elementos de colección. Se utilizan expresiones para escribir líneas de código, que a su vez se utilizan para construir métodos. El lenguaje utiliza expresiones siempre que necesita un dato. + +Las expresiones son rara vez "autónomas." Hay varios lugares en 4D donde una expresión puede ser utilizada por sí misma. It includes: + +- Editor de fórmulas (apply formula, query with formula, order by formula) +- El comando `EXECUTE FORMULA` +- La lista de propiedades, donde se puede utilizar una expresión como fuente de datos para la mayoría de los widgets +- Depurador donde se puede comprobar el valor de las expresiones +- En el editor de informes rápidos como fórmula para una columna + + +### Tese de expresiones +Se hace referencia a una expresión por el tipo de datos que devuelve. Hay varios tipos de expresiones. En la siguiente tabla se dan ejemplos de cada tipo de expresión. + +| Expresión | Tipo | Descripción | +| ------------------------ | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| “Hello†| Cadena | La palabra Hola es una constante cadena, indicada por las comillas dobles. | +| “Hello †+ “there†| Cadena | Dos cadenas, "Hola" y "a todos", se suman (concatenan) con el operador de concatenación de cadenas (+). Se devuelve la cadena "Hola". | +| “Sr. †+ [People]Name | Cadena | Se concatenan dos cadenas: la cadena "Sr." y el valor actual del campo Nombre de la tabla Personas. Si el campo contiene "Smith", la expresión devuelve "Mr. Smith". | +| Uppercase("smith") | Cadena | Esta expresión utiliza `Uppercase`, un comando del lenguaje, para convertir la cadena "smith" a mayúsculas. Devuelve “SMITHâ€. | +| 4 | Número | Se trata de una constante numérica, 4. | +| 4 * 2 | Número | Dos números, 4 y 2, se multiplican utilizando el operador de multiplicación (*). El resultado es el número 8. | +| myButton | Número | Es una variable asociada a un botón. Devuelve el valor actual del botón: 1 si se ha hecho clic, 0 si no. | +| !1997-01-25! | Fecha | Esta es una constante fecha para la fecha 1/25/97 (25 de enero de 1997). | +| Current date+ 30 | Fecha | Esta es una expresión de tipo Fecha que utiliza el comando `Current date` para obtener la fecha de hoy. Añade 30 días a la fecha de hoy y devuelve la nueva fecha. | +| ?8:05:30? | Hora | Es una constante hora que representa 8 horas, 5 minutos y 30 segundos. | +| ?2:03:04? + ?1:02:03? | Hora | Esta expresión suma dos horas y devuelve la hora 3:05:07. | +| True | Booleano | Este comando devuelve el valor booleano TRUE. | +| 10 # 20 | Booleano | Se trata de una comparación lógica entre dos números. El símbolo número (#) significa "es diferente de". Como 10 "es diferente de" 20, la expresión devuelve TRUE. | +| “ABC†= “XYZ†| Booleano | Se trata de una comparación lógica entre dos cadenas. Son diferentes, por lo que la expresión devuelve FALSE. | +| My Picture + 50 | Imagen | Esta expresión toma la imagen en My Picture, la mueve 50 píxeles a la derecha y devuelve la imagen resultante. | +| ->[People]Name | Puntero | Esta expresión devuelve un puntero al campo llamado [People]Name. | +| Table (1) | Puntero | Este es un comando que devuelve un puntero a la primera tabla. | +| JSON Parse (MyString) | Objeto | Este es un comando que devuelve MyString como un objeto (si el formato es el adecuado) | +| JSON Parse (MyJSONArray) | Colección | Este es un comando que devuelve MyJSONArray en forma de colección (si el formato es el adecuado) | +| Form.pageNumber | Propiedad objeto | Una propiedad objeto es una expresión que puede ser de todo tipo soportado | +| Col[5] | Elementos de colección | Un elemento de colección es una expresión que puede ser de todo tipo soportado | +| $entitySel[0] | Entity | Un elemento de una selección de entidades ORDA es una expresión de tipo entidad. Este tipo de expresión es **no asignable** | + +### Expresiones asignables y no asignables + +Una expresión puede ser simplemente una constante literal, como el número 4 o la cadena "Hello", o una variable como `$myButton`. También puede utilizar los operadores. Por ejemplo, 4 + 2 es una expresión que utiliza el operador de adición para sumar dos números y devolver el resultado 6. En todos los casos, estas expresiones son **no asignables**, lo que significa que no se les puede asignar un valor. En 4D, las expresiones pueden ser **asignables**. Una expresión es asignable cuando puede utilizarse a la derecha de una asignación. Por ejemplo: + +```4d +//La variable $myVar es asignable, puede escribir: +$myVar:="Hola" //asignar "Hola" a myVar +//Form.pageNumber es asignable, puede escribir: +Form.pageNumber:=10 //asignar 10 a Form.pageNumber +//Form.pageTotal-Form.pageNumber no es asignable: +Form.pageTotal- Form.pageNumber:=10 //error, no asignable ``` +En general, las expresiones que utilizan un operador no son asignables. Por ejemplo, `[Person]FirstName+" "+[Person]LastName` no es asignable. -In general, expressions that use an operator are non-assignable. For example, `[Person]FirstName+" "+[Person]LastName` is not assignable. -## Pointers +## Punteros -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. +El lenguaje 4D ofrece una implementación avanzada de punteros, que permite escribir código poderoso y modular. Puede utilizar punteros para referenciar tablas, campos, variables, arrays y elementos de arrays. -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. +Un puntero a un elemento se crea añadiendo un símbolo "->" antes del nombre del elemento, y se puede desreferenciar añadiendo el símbolo "->" después del nombre del puntero. ```4d MyVar:="Hello" @@ -338,50 +339,50 @@ MyPointer:=->MyVar ALERT(MyPointer->) ``` -## Comments +## Comentarios -Comments are inactive lines of code. These lines are not interpreted by the 4D language and are not executed when the code is called. +Los comentarios son líneas de instrucciones inactivas. Estas líneas no son interpretadas por el programa 4D y no se ejecutan cuando el código se llama. -There are two ways to create comments: +Hay dos maneras de crear comentarios: -- `//` for single line comments -- `/*...*/` for inline or multiline commnents. +- `//` para crear una línea de comentario +- `/*...*/` para los bloques de comentarios en línea o multilínea. -Both styles of comments can be used simultaneously. +Ambos estilos de comentarios pueden utilizarse simultáneamente. -#### Single line comments (//) +#### Línea de comentario (//) -Insert `//` at the beginning of a line or after a statement to add a single line comment. Example: +Inserte `//` al principio de una línea o después de una instrucción para añadir una línea de comentario. Ejemplo: ```4d -//This is a comment -For($vCounter;1;100) //Starting loop +//Este es un comentario +For($vCounter;1;100) //Inicio del bucle //comment //comment //comment End for ``` -#### Inline or multiline comments (/* */) +#### Comentarios en línea o multilínea (/* */) -Surround contents with `/*` ... `*/` characters to create inline comments or multiline comment blocks. Both inline and multiline comment blocks begin with `/*` and end with `*/`. +Rodea el contenido con los caracteres `/*` ... `*/` para crear comentarios en línea o bloques de comentarios multilínea. Tanto los bloques de comentarios en línea como los multilínea comienzan con `/*` y terminan con `*/`. -- **Inline comments** can be inserted anywhere in the code. Example: +- Las **líneas de comentarios en línea** se pueden insertar en cualquier parte del código. Ejemplo: ```4d -For /* inline comment */ ($vCounter;1;100) +For /* línea de comentario */ ($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: +- Los **bloques de comentarios multilíneas** permiten comentar un número ilimitado de líneas. Los bloques de comentarios pueden anidarse (útil desde que el editor de código 4D soporta los bloques contraídos). Ejemplo: ```4d For ($vCounter;1;100) /* -comments +comentarios /* - other comments + otros comentarios */ */ ... diff --git a/website/translated_docs/es/Concepts/shared.md b/website/translated_docs/es/Concepts/shared.md index 564c9c7762397f..e94bd5110e34bc 100644 --- a/website/translated_docs/es/Concepts/shared.md +++ b/website/translated_docs/es/Concepts/shared.md @@ -1,35 +1,33 @@ --- id: shared -title: Shared objects and collections +title: Objetos y colecciones compartidos --- -## Overview +**Los objetos compartidos** y **las colecciones compartidas** son [objetos](Concepts/dt_object.md) y [colecciones](Concepts/dt_collection.md) específicas cuyo contenido se comparte entre procesos. A diferencia de las [variables interproceso](Concepts/variables.md#interprocess-variables), los objetos compartidos y las colecciones compartidas tienen la ventaja de ser compatibles con los **procesos 4D apropiativos**: pueden pasarse por referencia como parámetros a comandos como `New process` o `CALL WORKER`. -**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`. +Los objetos compartidos y las colecciones compartidas pueden almacenarse en variables declaradas con los comandos estándar `C_OBJECT` y `C_COLLECTION`, pero deben instanciarse utilizando comandos específicos: -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: +- para crear un objeto compartido, utilice el comando `New shared object`, +- para crear una colección compartida, utilice el comando `New shared collection`. -- to create a shared object, use the `New shared object` command, -- to create a shared collection, use the `New shared collection` command. +**Nota:** los objetos y colecciones compartidos pueden definirse como propiedades de objetos o colecciones estándar (no compartidos). -**Note:** Shared objects and collections can be set as properties of standard (not shared) objects or collections. +Para modificar un objeto/colección compartido, se debe llamar a la estructura **Use...End use**. La lectura de un valor de objeto/colección compartido no requiere **Use...End use**. -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**. +Un catálogo único y global devuelto por el comando `Storage` está siempre disponible en toda la aplicación y sus componentes, y puede utilizarse para almacenar todos los objetos y colecciones compartidos. -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. +## Utilización de objetos o colecciones compartidos -## Using shared objects or collections +Una vez instanciado con los comandos `Nuevo objeto compartido` o `Nueva colección compartida`, las propiedades y elementos del objeto compartido/colección pueden ser modificados o leídos desde cualquier proceso de la aplicación. -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. +### Modificación -### Modification +Las siguientes modificaciones pueden efectuarse en objetos y colecciones compartidos: -Modifications can be applied to shared objects and shared collections: +- añadir o eliminar propiedades de los objetos, +- añadir o editar valores (siempre que se soporten en objetos compartidos), incluyendo otros objetos compartidos o colecciones (lo que crea un grupo compartido, ver abajo). -- 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. +Sin embargo, todas las instrucciones de modificación en un objeto compartido o colección deben estar rodeadas por las palabras clave `Use...End use`, de lo contrario se genera un error. ```4d $s_obj:=New shared object("prop1";"alpha") @@ -38,66 +36,67 @@ 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. +Un objeto/una colección compartido(a) sólo puede modificarse por un proceso a la vez. `Use` locks the shared object/collection from other threads, while `End use` unlocks the shared object/collection (if the locking counter is at 0, see below). . Intentar modificar un objeto/colección compartido sin al menos un `Use...End use` genera un error. Cuando un proceso llama a `Use...End use` en un objeto/colección compartido que ya está en uso por otro proceso, simplemente se pone en espera hasta que el `End use` lo desbloquee (no se genera ningún error). En consecuencia, las instrucciones dentro de las estructuras `Use...End use` deben ejecutarse rápidamente y desbloquear los elementos lo antes posible. Por lo tanto, se recomienda enfáticamente evitar modificar un objeto o colección compartido directamente desde la interfaz, por ejemplo, a través de una caja de diálogo. -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: +La asignación de objetos/colecciones compartidos a propiedades o elementos de otros objetos/colecciones compartidos está permitida y crea **grupos compartidos**. Un grupo compartido se crea automáticamente cuando un objeto/colección compartido se define como valor de propiedad o elemento de otro objeto/colección compartido. Los grupos compartidos permiten anidar objetos y colecciones compartidos, pero imponen reglas adicionales: -- Calling `Use` on a shared object/collection of a group will lock properties/elements of all shared objects/collections belonging to the same group. -- 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. +- Al llamar a `Use` en un objeto/colección compartido que pertenece a un grupo se bloquean las propiedades/elementos de todos los objetos/colecciones del grupo y se incrementa su conteo de bloqueo. Calling `End use` decrements the locking counter of the group and when the counter is at 0, all the linked shared objects/collections are unlocked. +- Un objeto/colección compartido sólo puede pertenecer a un grupo compartido. Se devuelve un error si se intenta asignar un objeto/colección compartido ya agrupado a un grupo diferente. +- Los objetos/colecciones compartidos agrupados no se pueden desagrupar. Una vez incluido en un grupo compartido, un objeto/colección compartido queda vinculado permanentemente a ese grupo durante toda la sesión. Incluso si todas las referencias de un objeto/colección se eliminan del objeto/colección padre, seguirán vinculadas. -Please refer to example 2 for an illustration of shared group rules. +Consulte el ejemplo 2 para ver una ilustración de las reglas de los grupos compartidos. -**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. +**Nota:** Los grupos compartidos se gestionan a través de una propiedad interna llamada *locking identifier*. Para obtener información detallada sobre este valor, consulte la guía del desarrollador de 4D. -### Read +### Lectura -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. +Se permite la lectura de propiedades o elementos de un objeto/colección compartida sin tener que llamar a la estructura `Use...End use`, incluso si el objeto/colección compartida está en uso por otro proceso. -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. +Sin embargo, cuando varios valores son interdependientes y deben ser leídos simultáneamente, es necesario enmarcar el acceso de lectura con una estructura `Use...End use` por coherencia. ### 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). +Llamar a `OB Copy` con un objeto compartido (o con un objeto cuyas propiedades son objetos compartidos) es posible, pero en este caso se devuelve un objeto estándar (no compartido). ### 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. +**Storage** es un objeto compartido único, disponible automáticamente en cada aplicación y máquina. Este objeto compartido es devuelto por el comando `Storage`. Puede utilizar este objeto para hacer referencia a todos los objetos/colecciones compartidos definidos durante la sesión que desee que estén disponibles desde cualquier proceso preventivo o estándar. -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. +Tenga en cuenta que, a diferencia de los objetos compartidos estándar, el objeto `Storage` no crea un grupo compartido cuando se añaden objetos/colecciones compartidos como sus propiedades. Esta excepción permite utilizar el objeto **Storage** sin bloquear todos los objetos o colecciones compartidos conectados. -For more information, refer to the `Storage` command description. +Para más información, consulte la descripción del comando `Storage`. ## Use...End use -The formal syntax of the `Use...End use` structure is: +La sintaxis de la estructura `Use...End use` es: ```4d Use(Shared_object_or_Shared_collection) - statement(s) + instrucción(es) 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. +La estructura `Use...End use` define una secuencia de instrucciones que ejecutarán tareas sobre el parámetro *Shared_object_or_Shared_collection* bajo la protección de un semáforo interno. *Shared_object_or_Shared_collection* puede ser cualquier objeto o colección compartido válido. + +Los objetos compartidos y las colecciones compartidas están diseñados para permitir la comunicación entre procesos, en particular, **procesos 4D preferentes**. Se pueden pasar por referencia como parámetros de un proceso a otro. Para obtener información detallada sobre los objetos compartidos o las colecciones compartidas, consulte la página **Objetos y colecciones compartidos**. Es obligatorio rodear las modificaciones en los objetos o colecciones compartidas con las palabras clave `Use...End use` para evitar el acceso concurrente entre procesos. -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. +- Una vez que se ejecuta con éxito la línea **Use**, todas las propiedades/elementos de _Shared_object_or_Shared_collection_ se bloquean para el resto de procesos en acceso de escritura hasta que se ejecute la línea `End use` correspondiente. +- La secuencia _de instrucciones_ puede ejecutar cualquier modificación en las propiedades/elementos de Shared_object_o_Shared_collection sin riesgo de acceso concurrente. +- Si se añade otro objeto o colección compartida como propiedad del parámetro _Shared_object_or_Shared_collection_, se conectan dentro del mismo grupo compartido (ver **Uso de objetos o colecciones compartidos**). +- Si otro proceso intenta acceder a una de las propiedades _Objeto_compartido_o_Colección_compartida_ o una propiedad conectad mientras se está ejecutando una secuencia **Use... End use**, se pone automáticamente en espera y espera hasta que la secuencia actual finalice. +- La línea **End use** desbloquea las propiedades _Shared_object_or_Shared_collection_ y todos los objetos del mismo grupo. +- En el código 4D se pueden anidar varias estructuras **Use...End use**. En el caso de un grupo, cada **Use** incrementa el contador de bloqueo del grupo y cada **End use** lo disminuye; todas las propiedades/elementos se liberarán sólo cuando la última llamada **End use** ponga el contador de bloqueo a 0. -- 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. +**Nota:** si un método de una colección modifica una colección compartida, se llama automáticamente un **Use** interno para esta colección compartida mientras se ejecuta la función. -**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 +## Ejemplo 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: +Se desea lanzar varios procesos que realicen una tarea de inventario en diferentes productos y que actualicen el mismo objeto compartido. El proceso principal instancia un objeto compartido vacío y luego, lanza los otros procesos, pasando el objeto compartido y los productos a contar como parámetros: ```4d ARRAY TEXT($_items;0) - ... //fill the array with items to count + ... //llenar el array con los elementos a contar $nbItems:=Size of array($_items) C_OBJECT($inventory) $inventory:=New shared object @@ -105,59 +104,59 @@ You want to launch several processes that perform an inventory task on different $inventory.nbItems:=$nbItems End use - //Create processes + //Crear procesos For($i;1;$nbItems) $ps:=New process("HowMany";0;"HowMany_"+$_items{$i};$_items{$i};$inventory) //$inventory object sent by reference End for ``` -In the "HowMany" method, inventory is done and the $inventory shared object is updated as soon as possible: +En el método "HowMany", el inventario se realiza y el objeto compartido $inventory se actualiza lo antes posible: ```4d C_TEXT($1) C_TEXT($what) C_OBJECT($2) C_OBJECT($inventory) - $what:=$1 //for better readability + $what:=$1 //para una mejor legibilidad $inventory:=$2 - $count:=CountMethod($what) //method to count products - Use($inventory) //use shared object - $inventory[$what]:=$count //save the results for this item + $count:=CountMethod($what) //método para contar productos + Use($inventory) //utilizar el objeto compartido + $inventory[$what]:=$count //guardar los resultados de este artículo End use ``` -## Example 2 +## Ejemplo 2 -The following examples highlight specific rules when handling shared groups: +Los siguientes ejemplos ilustran las reglas específicas para el manejo de los grupos compartidos: ```4d $ob1:=New shared object $ob2:=New shared object Use($ob1) - $ob1.a:=$ob2 //group 1 is created + $ob1.a:=$ob2 //se crea el grupo 1 End use $ob3:=New shared object $ob4:=New shared object Use($ob3) - $ob3.a:=$ob4 //group 2 is created + $ob3.a:=$ob4 //se crea el grupo 2 End use - Use($ob1) //use an object from group 1 + Use($ob1) //utilizar un objeto del grupo 1 $ob1.b:=$ob4 //ERROR - //$ob4 already belongs to another group - //assignment is not allowed + //$ob4 ya pertenece a otro grupo + //la asignación no está permitida End use Use($ob3) - $ob3.a:=Null //remove any reference to $ob4 from group 2 + $ob3.a:=Null //eliminar cualquier referencia a $ob4 del grupo 2 End use - Use($ob1) //use an object from group 1 + Use($ob1) //utilizar un objeto del grupo 1 $ob1.b:=$ob4 //ERROR - //$ob4 still belongs to group 2 - //assignment is not allowed + //$ob4 aún pertenece al grupo 2 + //la asignación no está permitida End use -``` \ No newline at end of file +``` diff --git a/website/translated_docs/es/Concepts/variables.md b/website/translated_docs/es/Concepts/variables.md index 7c19d22ca92d36..fedad441807473 100644 --- a/website/translated_docs/es/Concepts/variables.md +++ b/website/translated_docs/es/Concepts/variables.md @@ -3,26 +3,27 @@ id: variables title: Variables --- -Data in 4D is stored in two fundamentally different ways. **Fields** store data permanently on disk; **variables** store data temporarily in memory. +Los datos en 4D se almacenan de dos formas fundamentalmente diferentes. **Los campos** almacenan los datos permanentemente en el disco; **las variables** almacenan los datos en la memoria de forma temporal. -When you set up your 4D database, you specify the names and types of fields that you want to use. Variables are much the same—you also give them names and different types (see [Data types](Concepts/data-types.md)). +Cuando define su base, especifique a 4D los nombres y los tipos de campos que desea utilizar. Las variables son muy parecidas, también se les da nombres y tipos diferentes (ver [Tipos de datos](Concepts/data-types.md)). -Once created, you can use a variable wherever you need it in your database. For example, you might need to store a text variable in a field of same type: +Una vez creada, puede utilizar una variable dondequiera que la necesite en su aplicación. Por ejemplo, podría necesitar almacenar una variable texto en un campo del mismo tipo: ```4d [MyTable]MyField:=MyText ``` -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. -## Declaring Variables +Las variables son objetos del lenguaje; puede crear y utilizar variables que nunca aparecerán en la pantalla. En sus formularios, puede mostrar variables en la pantalla (excepto de los punteros y de los BLOB), introducir datos en ellas e imprimirlas en informes. De este modo, las variables de área introducibles y no introducibles actúan igual que los campos, y los mismos controles integrados están disponibles al crearlos. Las variables de formulario también pueden controlar botones, list boxes, áreas de desplazamiento, botones imagen, etc., o mostrar los resultados de cálculos que no necesitan ser guardados. -You create variables by declaring them. The 4D language offers two ways to declare variables: +## Declaración de variables -- using the `var` keyword (recommended, specially if your code uses objects and classes), -- using one of the "Compiler" or "Arrays" theme 4D language commands (deprecated, classic language only). +Las variables se crean declarándolas. El lenguaje 4D ofrece dos formas de declarar las variables: -**Note:** Although it is usually not recommended, you can create basic variables simply by using them; you do not necessarily need to formally define them. For example, to declare a variable that will hold the current date plus 30 days, you can write: +- utilizando la palabra clave `var` (recomendado, especialmente si su código utiliza objetos y clases), +- utilizando uno de los comandos del lenguaje 4D del tema "Compilador" o "Arrays" (lenguaje clásico únicamente). + +**Note:** aunque no se suele recomendar, puede crear variables básicas simplemente utilizándolas; no es necesario definirlas formalmente. Por ejemplo, si declara una variable que contenga la fecha actual más 30 días, puede escribir: ```4d MyDate:=Current date+30 //MyDate is created @@ -30,199 +31,65 @@ You create variables by declaring them. The 4D language offers two ways to decla // and assigns the current date plus 30 days ``` -### Using the `var` keyword -Declaring variables using the `var` keyword is recommended since this syntax allows you to bind object variables with classes. Using this syntax enhances code editor suggestions and type-ahead features. +### Utilizando la palabra clave `var` + +Se recomienda declarar las variables utilizando la palabra clave `var` ya que esta sintaxis permite vincular las variables objeto con las clases. Using this syntax enhances code editor suggestions and type-ahead features. -To declare a variable of any type with the `var` keyword, use the following syntax: +Para declarar una variable de cualquier tipo con la palabra clave `var`, utilice la siguiente sintaxis: -`var {, ,...}{ : }` +`var {; ;...}{ : }` -For example: +Por ejemplo: ```4d -var $myText : Text //a text variable -var myDate1, myDate2 : Date //several date variables -var $myFile : 4D.File //a file class object variable -var $myVar //a variant variable +var $myText : Text //una variable texto +var myDate1; myDate2 : Date //varias variables fecha +var $myFile : 4D.File //una variable objeto clase archivo +var $myVar //una variable variant ``` -`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. +`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. This syntax only supports [local and process variables](#local-process-and-interprocess-variables) declarations, thus excluding [interprocess variables](#interprocess-variables) and [arrays](Concepts/arrays.md). -`varType` can be: +`varType` puede ser: -- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, +- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, - a [class reference](Concepts/classes.md) (4D class or user class), in which case the variable contains a reference to an object of the defined class. If `varType` is omitted, a variable of the **variant** type is created. -The following table lists all supported `varType` values: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - varType - - Contents -
    - Text - - Text value -
    - Date - - Date value -
    - Time - - Time value -
    - Boolean - - Boolean value -
    - Integer - - Long integer value -
    - Real - - Real value -
    - Pointer - - Pointer value -
    - Picture - - Picture value -
    - Blob - - BLOB value -
    - Collection - - Collection value -
    - Variant - - Variant value -
    - Object - - Object with default class (4D.Object) -
    - 4D.\ - - Object of the 4D class name -
    - cs.\ - - Object of the user class name -
    - -#### Examples - -- To declare local and process basic variables: +La siguiente tabla enumera todos los valores `varType` soportados: + +| varType | Contents | +| ---------------------- | ---------------------------------------- | +| `Texto` | Valor texto | +| `Fecha` | Valor fecha | +| `Hora` | Valor Hora | +| `Booleano` | Valor booleano | +| `Entero` | Valor entero largo | +| `Real` | Valor real | +| `Puntero` | Valor puntero | +| `Imagen` | Valor imagen | +| `Blob` | Valor BLOB | +| `Colección` | Valor colección | +| `Variant` | Valor variant | +| `Objeto` | Objeto con clase por defecto (4D.object) | +| `4D.` | Objeto del nombre de la clase 4D | +| `cs.` | Objeto del nombre de la clase usuario | + +#### Ejemplos + +- Para declarar variables básicas locales y de proceso: ```4d -var $myText, myText, $vt : Text +var $myText; myText; $vt : Text var myVar //variant var $o : Object -//equivalent to: +//equivalente a: var $o : 4D.Object -//also equivalent to C_OBJECT($o) +//también equivalente a C_OBJECT($o) ``` - To declare object variables of 4D class: @@ -240,112 +107,115 @@ var $dataclass : cs.Employee var $entity : cs.EmployeeEntity ``` -### Using a C_ directive -> **Compatibility Note:** This feature is deprecated as of 4D v18 R3. It is now recommended to use the [var](#using-the-var-keyword) keyword. +### Utilizando un C_ directive + +> **Nota de compatibilidad:** no se recomienda esta funcionalidad para declarar variables dentro de métodos. Se recomienda utilizar la palabra clave [var](#using-the-var-keyword). Directives from the "Compiler" theme commands allow you to declare variables of basic types. -For example, if you want to define a text variable, you write: +Por ejemplo, si se quiere definir una variable de tipo texto, se escribe: ```4d C_TEXT(myText) ``` -The following are some basic variable declarations: +A continuación se presentan algunas declaraciones de variables básicas: ```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) // La variable proceso vxMyBlob se declara como una variable de tipo BLOB +C_DATE($vdCurDate) // La variable local $vdCurDate se declara como una variable de tipo Fecha + C_LONGINT(vg1;vg2;vg3) // Las 3 variables de proceso vg1, vg2 y vg3 se declaran como variables de tipo Entero largo + C_OBJECT($vObj) // La variable local $vObj se declara como una variable de tipo Objeto + C_COLLECTION($vCol) // La variable local $vCol se declara como una variable de tipo Colección ``` -**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:** los array son un tipo particular de variables (un array es una serie ordenada de variables del mismo tipo). Los arrays se declaran con comandos específicos, como `ARRAY LONGINT(alAnArray;10)`. Para más información, consulte [Arrays](Concepts/arrays.md). -## 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. +## Asignar los valores -The assignment operator is a 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: +Los datos pueden introducirse y copiarse en variables y arrays. Poner datos en una variable se llama **asignar los datos a la variable** y se hace con el operador de asignación (:=). El operador de asignación también se utiliza para asignar datos a campos. + +El operador de asignación es un primer medio para crear una variable e introducir datos en ella. Se escribe el nombre de la variable que se quiere crear a la izquierda del operador de asignación. Por ejemplo: ```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. +crea la variable _MyNumber_ y pone en ella el número 3. Si MyNumber ya existe, entonces toma el valor 3. -> It is usually not recommended to create variables without [declaring their type](#creating-variables). +> Normalmente no se recomienda crear variables sin [declarar su tipo](#crear-variables). -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: +Por supuesto, las variables no serían muy útiles si no se pudieran obtener valores de ellas. Una vez más, se utiliza el operador de asignación. Si necesita poner el valor de MyNumber en un campo llamado [Products]Size, escribiría _MyNumber_ a la derecha del operador de asignación: ```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. +En este caso, _[Products]Size_ sería igual a 3. Este ejemplo es bastante sencillo, pero ilustra la forma fundamental en que se transfieren los datos de un lugar a otro utilizando el lenguaje. -You assign data to array elements by using curly braces ({...}): +Los valores se asignan a los elementos del array utilizando llaves ({...}): ```4d atNames{1}:="Richard" ``` -## Local, Process, and Interprocess variables +## Variables locales, proceso e interproceso -You can create three types of variables: **local**, **process**, and **interprocess**. The difference between the three types of elements is their scope, or the objects to which they are available. +Puedes crear tres tipos de variables: **local**, **proceso**, e **interproceso**. La diferencia entre los tres tipos de elementos es su alcance, o los objetos para los que están disponibles. -### Local variables +### Variables locales -A local variable is, as its name implies, local to a method—accessible only within the method in which it was created and not accessible outside of that method. Being local to a method is formally referred to as being “local in scope.†Local variables are used to restrict a variable so that it works only within the method. +Una variable local, como su nombre indica, es local a un método, accesible sólo dentro del método en el que fue creada y no accesible fuera de ese método. Ser local a un método se conoce formalmente como ser de "alcance local." Las variables locales se utilizan para restringir una variable para que funcione sólo dentro del método. -You may want to use a local variable to: +Es posible que desee utilizar una variable local para: -- Avoid conflicts with the names of other variables -- Use data temporarily -- Reduce the number of process variables +- Evitar conflictos con los nombres de otras variables +- Utilizar los datos temporalmente +- Reducir el número de variables proceso -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. +El nombre de una variable local siempre comienza por el signo dólar ($) y puede contener hasta 31 caracteres adicionales. Si introduce un nombre más largo, 4D lo trunca a la longitud adecuada. -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. +Cuando se trabaja en un proyecto de aplicación con muchos métodos y variables, a menudo se encuentra que se necesita utilizar una variable sólo dentro del método en el que se está trabajando. Puede crear y utilizar una variable local en el método sin preocuparse de si ha utilizado el mismo nombre de variable en otro lugar. -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: +Con frecuencia, en una aplicación, se necesitan pequeñas piezas de información del usuario. El comando `Request` puede obtener esta información. Muestra una caja de diálogo con un mensaje que solicita al usuario una respuesta. Cuando el usuario introduce la respuesta, el comando devuelve la información que el usuario introdujo. Generalmente no es necesario mantener esta información en sus métodos durante mucho tiempo. Esta es una forma típica de utilizar una variable local. Aquí un ejemplo: ```4d - $vsID:=Request("Please enter your ID:") + $vsID:=Request("Introduzca su identificación:") If(OK=1) QUERY([People];[People]ID =$vsID) End if ``` -This method simply asks the user to enter an ID. It puts the response into a local variable, $vsID, and then searches for the ID that the user entered. When this method finishes, the $vsID local variable is erased from memory. This is fine, because the variable is needed only once and only in this method. +Este método simplemente pide al usuario que introduzca un ID. Pone la respuesta en una variable local, $vsID, y luego busca el ID que el usuario introdujo. Cuando este método termina, la variable local $vsID se borra de la memoria. Este funcionamiento está bien, porque la variable se necesita sólo una vez y sólo en este método. + +**Nota:** los parámetros $1, $2... pasados a los métodos son variables locales. Para más información, consulte [Parámetros](Concepts/parameters.md). + +### Variables proceso -**Note:** Parameters $1, $2... passed to methods are local variables. For more information, please refer to [Parameters](Concepts/parameters.md). +Una variable proceso sólo está disponible dentro de un proceso. Es accesible al método del proceso y a todos los métodos llamados desde el proceso. -### Process variables +Una variable proceso no tiene un prefijo antes de su nombre. Un nombre de variable proceso puede contener hasta 31 caracteres. -A process variable is available only within a process. It is accessible to the process method and any other method called from within the process. +En modo interpretado, las variables se mantienen dinámicamente; se crean y se borran de la memoria "sobre la marcha". En modo compilado, todos los procesos que se crean (procesos usuario) comparten la misma definición de variables proceso, pero cada proceso tiene una instancia diferente para cada variable. Por ejemplo, la variable miVar es una variable en el proceso P_1 y otra en el proceso P_2. -A process variable does not have a prefix before its name. A process variable name can contain up to 31 characters. +Un proceso puede leer y escribir las variables proceso de otro proceso utilizando los comandos `GET PROCESS VARIABLE` y `SET PROCESS VARIABLE`. Es una buena práctica de programación restringir el uso de estos comandos a la situación para la que fueron creados en 4D: -In interpreted mode, variables are maintained dynamically; they are created and erased from memory “on the fly.†In compiled mode, all processes you create (user processes) share the same definition of process variables, but each process has a different instance for each variable. For example, the variable myVar is one variable in the process P_1 and another one in the process P_2. +- Comunicación interprocesos en lugares específicos de su código +- Gestión de arrastrar y soltar interproceso +- En Cliente/Servidor, la comunicación entre los procesos en las máquinas cliente y los procedimientos almacenados ejecutados en las máquinas servidoras -A process can “peek and poke†process variables from another process using the commands `GET PROCESS VARIABLE` and `SET PROCESS VARIABLE`. It is good programming practice to restrict the use of these commands to the situation for which they were added to 4D: +Para más información, consulte el capítulo **Procesos** y la descripción de estos comandos. -- Interprocess communication at specific places or your code -- Handling of interprocess drag and drop -- In Client/Server, communication between processes on client machines and the stored procedures running on the server machines +### Variables interproceso -For more information, see the chapter **Processes** and the description of these commands. +Las variables interproceso están disponibles en todo el proyecto y son compartidas por todos los procesos cooperativos. Se utilizan principalmente para compartir información entre procesos. -### Interprocess variables +> No se recomienda el uso de variables interproceso, ya que no están disponibles para los procesos apropiativos y tienden a hacer que el código sea menos mantenible. -Interprocess variables are available throughout the database and are shared across all cooperative processes. They are primarily used to share information between processes. +El nombre de una variable interproceso siempre comienza con los símbolos (<>) -un signo "menor que" seguido de un signo "mayor que"- seguido de 31 caracteres. -> Use of interprocess variables is not recommended since they are not available from preemptive processes and tend to make the code less maintainable. +En modo cliente/servidor, cada máquina (cliente y servidor) comparten la misma definición de las variables interproceso, pero cada máquina tiene una instancia diferente para cada variable. -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 diff --git a/website/translated_docs/es/Debugging/basics.md b/website/translated_docs/es/Debugging/basics.md new file mode 100644 index 00000000000000..2d2e6c11b65ce3 --- /dev/null +++ b/website/translated_docs/es/Debugging/basics.md @@ -0,0 +1,97 @@ +--- +id: basics +title: Basics +--- + +Errors are common. It would be unusual to write a substantial number of lines of code without generating any errors. Conversely, treating and/or fixing errors is normal, too! + +The 4D development environment provides several debugging tools for all types of errors. + +## Error types + +### Typing errors + +Typing errors are detected by the Method editor. They are displayed in red and additional information is provided at the bottom of the window. Here's a typing error: + +![break-point](assets/en/Debugging/typing-error.png) + + +Such typing errors usually cause syntax errors (in the above image, the name of the table is unknown). You get the description of the error when you validate the line of code. When this occurs, fix the typing error and type Enter to validate the fix. + +### Syntax Errors + +Some errors can be caught only when you execute the method. The [Syntax Error Window](#syntax-error-window) appears when an error occurs during code execution. Por ejemplo: + +![syntax-error](assets/en/Debugging/syntax-error.png) + +Expand the **Details** area to display the last error and its number. + +### Environmental Errors + +Occasionally, there may not be enough memory to create a BLOB. Or, when you access a document on disk, the document may not exist or may already be opened by another application. These environmental errors do not directly occur because of your code or the way you wrote it. Most of the time, these errors are easy to treat with an [error catching method](Concepts/error-handling.md) installed using the `ON ERR CALL` command. + +### Design or Logic Errors + +These are generally the most difficult type of error to find. Except for typing errors, all the error types listed above are to a certain extent covered by the expression "Design or logic error". Use the [Debugger](debugger.md) to detect them. Por ejemplo: + +- A *syntax error* may occur when you try to use a variable that is not yet initialized. +- An *environmental error* can occur when you try to open a document, because that document's name is received by a subroutine that did not get the right value as a parameter. + +Design or logic errors also include such situations as: + +- A record is not properly updated because, while calling `SAVE RECORD`, you forgot to first test whether or not the record was locked. +- A method does not do exactly what you expect, because the presence of an optional parameter is not tested. + +Sometimes the piece of code that displays the error may be different than the code that is actually the origin of the problem. + +### Runtime Errors + +In Application mode, you might obtain errors that you don't see in interpreted mode. Here's an example: + +![runtime-error](assets/en/Debugging/runtimeError.png) + +To quickly find the origin of the problem, reopen the interpreted version of the structure file, open the method and go to the corresponding line. + +## Syntax Error Window + +The Syntax error window automatically appears when the execution of a method is interrupted. This can happen when: + +- an error prevents further code execution +- the method produces a false assertion (see the `ASSERT` command) + +![syntax-error](assets/en/Debugging/syntax-error.png) + +The upper text area displays a message describing the error. The lower text area shows the line that was executing when the error occurred; the area where the error occurred is highlighted. The expanded Details section contains the "stack" of errors related to the process. + +The syntax error window proposes several options: + +- **Edit**: Stops all method execution. 4D switches to the Design environment and the method with the error opens in the Method editor, allowing you to fix it. Use this option when you immediately recognize the mistake and can fix it without further investigation. + +- **Trace**: Enters Trace/Debugger mode. The [Debugger](debugger.md) window is displayed. If the current line has only executed partially, you may have to click the **Trace** button several times. + +- **Continue**: Execution continues. The line with the error may be partially executed, depending on where the error is located. Continue with caution: the error may prevent the rest of your method from executing properly. We recommend clicking **Continue** only if the error is in a trivial call (such as `SET WINDOW TITLE`) that does not prevent executing and testing the rest of your code. + +> Tip: To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error. + +- **Abort**: Stops method execution and returns to the state before the method started executing: + + - If a form method or object method is executing in response to an event, it is stopped and you return to the form. + - If the method is executing from within the Application environment, you return to that environment. + +- **Copy**: Copies the debugging information into the clipboard. The info describes the internal environment of the error (number, internal component, etc.). It is formatted as tabbed text. + +- **Save...**: Saves the contents of the syntax error window and the call chain in a `.txt` file. + +## Debugger + +A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Method Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the **Debugger**. + +The Debugger allows you to step through methods slowly. It displays all the information you need in order to understand why an error occurred. Once you have this information, you know how to fix the error. + +Another reason to use the Debugger is for developing code. Sometimes you may write an algorithm that is more complex than usual. Despite all feelings of accomplishment, you can't be totally sure that your coding is 100% correct. Instead of running it "blind", you can use the `TRACE` command at the beginning of your code, then execute it step by step to keep an eye on what happens. + +## Breaks + +In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. "$myVar > 1000"), or every time a specific 4D command is called. + +These needs are covered by **breakpoints** and **command catching** features. They can be configured from the method editor, the debugger, or the Runtime Explorer. \ No newline at end of file diff --git a/website/translated_docs/es/Debugging/breakpoints.md b/website/translated_docs/es/Debugging/breakpoints.md new file mode 100644 index 00000000000000..5868ff530b0fff --- /dev/null +++ b/website/translated_docs/es/Debugging/breakpoints.md @@ -0,0 +1,125 @@ +--- +id: breakpoints +title: Breakpoints and Command Catching +--- + +## Generalidades + + +Breakpoints and command catching are very efficient debugging techniques. Both have the same effect: they pause the code execution (and display the debugger window if not already displayed) at a desired step. + +You set breakpoints on any line of code where you want the execution to be paused. You can associate a condition to the break point. + +Catching a command enables you to start tracing the execution of any process as soon as a command is called by that process. + + + +## Breakpoints + + +To create a break point, click in the left margin of the Source Code pane in the debugger or in the Method editor. + +In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If ($in.dataClass#Null)`: + +![break-point](assets/en/Debugging/break.png) + +In the above example, clicking the [**No Trace**](./debugger.md/#no-trace) button resumes normal execution up to the line marked with the break point. That line is not executed itself — you are taken back to trace mode. Setting a break point beyond the program counter and clicking the **No Trace** button allows you to skip portions of the method being traced. + +To remove a break point, click the corresponding bullet. + + +### Breakpoint Properties + +You can edit the behavior of a breakpoint using the Breakpoint Properties window: + +![breakpoint-properties](assets/en/Debugging/breakpoint-properties.png) + +This window is available from the Method Editor or the [Source Code Pane](debugger.md#source-code-pane). You can: + +- right-click a line and select **Edit Breakpoint** in the contextual menu, or +- `Alt+click` (Windows) or `Option+click` (macOS) in the left margin. + +If a break point already exists, the window is displayed for that break point. Otherwise, a break point is created and the window is displayed for the newly created break point. + +Here is a description of the properties: + +* **Location**: indicates the name of the method and the line number attached to the breakpoint. +* **Break when following expression is true**: You can create **conditional breakpoints** by entering a 4D formula that returns `True` or `False`. For example, insert `Records in selection(\[aTable])=0` to make sure the break occurs only if there no record selected for the table \[aTable]. Breakpoint conditions are available in the **Condition** column of the [Break list](#break-list). +* **Number of times to skip before breaking**: You can attach a breakpoint to a line located in a loop structure (While, Repeat, or For) or located in subroutine or function called from within a loop. +* **Breakpoint is disabled**: If you currently do not need a break point, but might need it later, you can temporarily disable it. A disabled break point appears as a dash (-) instead of a bullet (•)| + + +### Breakpoints in remote debugging + +The break point list is stored locally. In remote debugging mode, if the attached debugger is a remote 4D, the remote break point list replaces temporarily the server break point list during the debugging session. + +The server break point list is automatically restored if it becomes again the attached debugger. + +### Break List + +The Break list is a page of the Runtime Explorer that lets you manage the breakpoints created in the Debugger Window or in the Method Editor. For more information on the Runtime Explorer, see its dedicated page in [the Design reference manual](https://doc.4d.com/4Dv19/4D/19/Runtime-Explorer.200-5416614.en.html). + +To open the Break list page: + +1. From the **Run menu**, click **Runtime Explorer...** + +2. Click the **Break** tab to display the Break list: + +![break-list-runtime-explorer](assets/en/Debugging/break-list.png) + +Using this window, you can: + +* Set conditions for breakpoints in the **Conditions** column +* Enable or disable breakpoints by clicking the bullets in the margin. Disabled breakpoints display transparent bullets +* Delete breakpoints by pressing the `Delete` or `Backspace` key, or click on the **Delete** button below the list. +* Open the methods where the breakpoint are located by double-clicking any line in the list + +You cannot add new breakpoints from this window. Breakpoints can only be created from within the Debugger window or the Method Editor. + + +## Catching Commands + +The **Catch** tab of the Runtime Explorer lets you add additional breaks to your code by catching calls to 4D commands. Unlike a break point, which is located in a particular project method (and therefore triggers a trace exception only when it is reached), the scope of catching a command includes all the processes that execute 4D code and call that command. + +Catching a command is a convenient way to trace large portions of code without setting break points at arbitrary locations. For example, if a record that should not be deleted is deleted after you've executed one or several processes, you can try to reduce the field of your investigation by catching commands such as `DELETE RECORD` and `DELETE SELECTION`. Each time these commands are called, you can check if the record in question has been deleted, and thus isolate the faulty part of the code. + +Feel free to combine breakpoints and command catching. + +To open the Caught Commands page: + +1. Choose **Run** > **Runtime explorer...** to open the Runtime Explorer. + +2. Click **Catch** to display the Caught Commands List: + +![runtime-explorer-window](assets/en/Debugging/catch-command.png) + +This page lists the commands to be caught during execution. It is composed of two columns: + +* The left column displays the Enable/Disable status of the caught command, followed by the name of the command +* The right column displays the condition associated with the caught command, if any + +To add a command to be caught: + +1. Click on the **Add New Catch** button (in the shape of a +) located below the list. A new entry is added to the list with the `ALERT` command as default +2. Click the **ALERT** label, type the name of the command you want to catch, then press **Enter**. + +To enable or disable a caught command, click on the bullet (•) in front of the command label. The bullet is transparent when the command is disabled. + +> Disabling a caught command has almost the same effect as deleting it. During execution, the debugger spends almost no time on the entry. The advantage of disabling an entry is that you do not have to recreate it when you need it again. + +To delete a caught command: + +1. Select a command in the list. +2. Press **Backspace** or **Delete** on your keyboard or click on the **Delete** button beneath the list (**Delete All** removes all commands in the list). + +### Setting a Condition for catching a command + +1. Click on the entry in the right column +2. Enter a 4D formula (expression, command call or project method) that returns a Boolean value. + +> To remove a condition, delete its formula. + +Adding conditions allows you to stop execution when the command is invoked only if the condition is met. For example, if you associate the condition `Records in selection(\[Emp]>10)` with the break point on the `DELETE SELECTION` command, the code will not be stopped during execution of the `DELETE SELECTION` command if the current selection of the \[Emp] table only contains 9 records (or less). + +Adding conditions to caught commands slows the execution, because the condition has to be evaluated each time an exception is met. On the other hand, adding conditions accelerates the debugging process, because 4D automatically skips occurrences that do not match the conditions. + diff --git a/website/translated_docs/es/Debugging/debugger.md b/website/translated_docs/es/Debugging/debugger.md new file mode 100644 index 00000000000000..020a72b04d3dfd --- /dev/null +++ b/website/translated_docs/es/Debugging/debugger.md @@ -0,0 +1,438 @@ +--- +id: debugger +title: Debugger +--- + +The debugger is useful when you need to spot errors or monitor the execution of methods. It allows you to step through methods slowly and examine the information. This process is called "tracing". + +![debugger-window-local](assets/en/Debugging/debugger-Window-local.png) + + +## Calling the Debugger + +There are multiple ways to get the Debugger to display: + +* Clicking the **Trace** button in the [Syntax Error window](basics.md#syntax-error-window) +* Using the [`TRACE`](https://doc.4d.com/4dv19/help/command/en/page157.html) command +* Clicking the **Debug** button in the Execute Method window or selecting **Run and debug...** button in the Method editor +* Using **Alt+Shift+Right click** (Windows) or **Ctrl+Option+Cmd+Click** (macOS) while a method is executing, then selecting the process to trace in the pop-up menu: + +![open-debugger](assets/en/Debugging/openDebugger.png) + +* Clicking the **Trace** button when a process is selected in the Process page of the Runtime Explorer. +* Adding a break point in the Method Editor window or in the Break and Catch pages of the Runtime Explorer. + +When called, the debugger window provides the name of the method or class function you're currently tracing, and the action causing the initial appearance of the Debugger window. For example, in the above debugger window: + +* *Clients_BuildLogo* is the method being traced +* The debugger window appeared because it detected a call to the `C_PICTURE` command and this command was one of the commands to be caught + + +Displaying a new debugger window uses the same configuration as the last window displayed in the same session. If you run several user processes, you can trace them independently and have one debugger window open for each process. + +The Debugger window is usually displayed on the machine where the code is executed. With a single-user application, it is always displayed on the machine running the application. With a client/server application, it is displayed: + +- on the remote 4D for code running locally +- on the server machine for code running on the server (for example, a method with the **execute on server** option). + +> If the server is running headless, no debugger window can be displayed on the server, you need to use the remote debugger. See [Debugging from remote machines](./debugging-remote.md). + +## Tool bar Buttons + +The debugger's tool bar includes several buttons, associated with default shortcuts: + +![execution-control-toolbar-buttons](assets/en/Debugging/executionToolbarButtons.png) + +> Default shortcuts can be customized in the Shortcuts Page of the Preferences dialog box. + +#### No Trace + +Tracing stops and normal method execution resumes. + +> **Shift** + **F5** or **Shift** + clicking the **No Trace** button resumes execution. It also disables all the subsequent TRACE calls for the current process. + +#### Step Over + +Executes the current method line, indicated by the program counter (the yellow arrow). The Debugger steps to the next line. + +The Step Over button does not step into subroutines and functions, it stays at the level of the method you're currently tracing. If you want to also trace subroutines and functions calls, use the **Step Into** button. + +In remote debugging, if the method executes on the server, the parent method is called after the last line of the child method executes. If the parent method is executed on the remote side, the **Step Over** button has the same effect as the **No Trace** button. + +#### Step Into + +When a line that calls another method (subroutine or function) is executed, click this button to display the the other method and step through it. + +The new method becomes the current (top) method in the [Call Chain Pane](#call-chain-pane) of the Debugger window. + +When executing a line that does not call another method, this button has the same effect as the **Step Over** button. + +#### Abort + +Stops method execution, and returns to the state before the method started executing: +* When tracing a form or object method executing in response to an event: Stops and returns to the form. +* When tracing a method executing from within the Application environment: Stops and returns to the environment. + +#### Abort and Edit + + +Pauses method execution. The method that is executing when you click the **Abort and Edit** button opens in the Method Editor. +> **Tip**: Use this button when you know which changes are required in your code, and when these changes are required to pursue the testing of your methods. After you're finished with the changes, rerun the method. + +#### Editar + +Pauses method execution. The method that is executing at the time you click the Edit button opens in the Method Editor. + +If you use this button to modify a method, the modifications are only effective the next time it executes. + +> **Tip:** Use this button when you know which changes are required in your code and when they don't interfere with the rest of the code to be executed or traced. + +#### Save Settings + +Saves the current configuration of the debugger window and makes it the default configuration. This includes: +* the size and position of the window +* the position of the division lines and the contents of the area that evaluates the expressions + +These parameters are stored in the project. + +This action is not available in remote debugging mode (see [Debugging from Remote Machines]()). + +## Watch Pane + +The **Watch pane** is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. Aquí un ejemplo: + +![watch-pane](assets/en/Debugging/watchPane.png) + +> This pane is not available in remote debugging mode. + +The **Watch Pane** displays useful general information about the system, the 4D environment, and the execution environment. + +The **Expression** column displays the names of the objects and expressions. The **Value** column displays their current corresponding values. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. + +At any point, you can drag and drop themes, theme sublists (if any), and theme items to the [Custom Watch Pane](#custom-watch-pane). + +### Expression list + +#### Line Objects + +This theme lets you keep track of the values of the objects or expressions: + +* used in the line of code to be executed (the one marked with the program counter—the yellow arrow in the [Source Code Pane](#source-code-pane)), +* used in the previous line of code + +Since the previous line of code is the one that was just executed before, this theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: + +```4d +TRACE +$a:=1 +$b:=a+1 +$c:=a+b +``` + +1. A Debugger window opens with the program counter set to the line with `a:=1`. At this point the **Line Objects** theme displays: + + | $a | Indefinido | + | -- | ---------- | + | | | + + The `$a` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +2. You click the **Step Over** button. The program counter is now set to the line `b:=a+1`. At this point, the theme displays: + + | $a | 1 | + | -- | ---------- | + | $b | Indefinido | + + The value of the `$a` variable is now 1. The `$b` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +3. You click the **Step Over** button again. The program counter is now set on the line with c:=a+b. At this point the Line Objects theme displays: + + | $c | Indefinido | + | -- | ---------- | + | $a | 1 | + | $b | 2 | + + The value of the `$b` variable is now 2. The `$c` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +#### Variables + +This theme is composed of the following subthemes: + +| Subtheme | Descripción | Can the values be modified? | +| ------------ | ------------------------------------------------------------ | --------------------------- | +| Interprocess | List of interprocess variables being used at this point | Sí | +| Process | List of process variables used by the current process | Sí | +| Local | List of local variables used by the method being traced | Sí | +| Parámetros | List of parameters received by the method | Sí | +| Self | Pointer to the current object, when tracing an Object Method | No | + +Arrays, like other variables, appear in the Interprocess, Process, and Local subthemes, depending on their scope. The debugger displays the first 100 elements. Inside the **Value** column, you can modify the values of array elements, but not the size of the arrays. + +To display the variable types and their internal names, right click and check the **Show Types** option in the context menu: + +![show-types-menu-item](assets/en/Debugging/showTypes.png) + +Here's the result: + +![dynamic-variable-names](assets/en/Debugging/dynamicVariableNames.png) + +#### Current Form Values + +This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: + +![current-form-value](assets/en/Debugging/current-form-values.png) + +Some objects, such as list box arrays, can be presented as two distinct objects, the variable of the object itself and its data source. + +#### Constantes + +Like the Constants page of the Explorer window, this theme displays predefined constants provided by 4D. The expressions from this theme cannot be modified. + +#### Semaphores + +This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. The expressions from this theme cannot be modified. Global semaphores are not displayed. + +#### Procesos + +This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. + +#### Tables and Fields + +This theme lists the tables and fields in the 4D database. For each Table item, the Value column displays the size of the current selection for the current process as well as the number of **locked records**. + +For each Field item, the Value column displays the value of the field for the current record (except picture and BLOB). You can modify the field values but not the the tables' information. + +#### Conjuntos + +This theme lists the sets defined in the current process (the one you're currently tracing) and the interprocess sets. For each set, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Selecciones temporales + +This theme lists the named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Information + +This theme contains general information regarding database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. + +#### Web + +This theme displays information regarding the main Web server of the application (only available if the Web server is active): + +* Web File To Send: name of Web file waiting to be sent (if any) +* Web Cache Usage: number of pages present in Web cache as well as its use percentage +* Web Server Elapsed Time: duration of Web server use in hours:minutes:seconds format +* Web Hits Count: total number of HTTP requests received since Web server launch, as well as the instantaneous number of requests per second +* Number of active Web processes: number of active Web processes, all Web processes together + +The expressions contained within this theme cannot be modified. + +### Contextual Menu + +Additional options are available from the contextual menu of the Watch pane. + +![context-menu](assets/en/Debugging/contextual-menu.png) + +* **Collapse All**: Collapses all levels of the hierarchical list. +* **Expand All**: Expand all levels of the hierarchical list. +* **Show Types**: Displays the type of each item (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field. Useful if you work with table or field numbers, or with pointers using commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the object type for each object. You can turn this option off in order to speed up the display, or just because you prefer to use only the **Show Types** option. +* **Sorted Tables and Fields**: Sorts the tables and fields in alphabetical order within their respective lists. +* **Show Integers in Hexadecimal**: Numbers are usually displayed in decimal notation. This option displays them in hexadecimal notation. Note: To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. +* **Enable activity monitoring**: Activates the monitoring of activity (advanced checking of internal activity of the application) and displays the information retrieved in the additional themes: **Scheduler**, **Web** and **Network**. + +## Call Chain Pane + +A method may call other methods or class functions, which may call other methods or functions. The Call Chain pane lets you keep track of that hierarchy. + +![call-chain-pane](assets/en/Debugging/call-chain-example.png) + +Each main level item is the name of a method or class function. The top item is the one you are currently tracing, the next main level item is the name of the caller (the method or function that called the one you are currently tracing), the next one is the caller's caller, and so on. + +In the image above: + +* `thirdMethod` has not received any parameter +* `$0` is currently undefined, as the method did not assign any value to `$0` (because it has not executed this assignment yet or because the method is a subroutine and not a function) +* `secondMethod` has received three parameters from `firstMethod`: + * $1 is a pointer to the `[Employee]` table + * $2 is a pointer to the `ID` field in the `[Employee]` table + * $3 is an alphanumeric parameter whose value is "Z" + +You can double-click the name of any method to display its contents in the [Source Code Pane](#source-code-pane). + +Clicking the icon next to a method or function name expands or collapses the parameters and the result (if any). Values appear on the right side of the pane. Clicking on any value on the right side allows you to change the value of any parameter or function result. + +To display the parameter type, check the **Show types** option in the contextual menu: + +![call-chain-show-types](assets/en/Debugging/callChainShowTypes.png) + +After you deploy the list of parameters, you can drag and drop parameters and function results to the [Custom Watch Pane](#custom-watch-pane). + +You can also use the [Get call chain](https://doc.4d.com/4dv19/help/command/en/page1662.html) command to retrieve the call chain programmatically. + +## Custom Watch Pane + +The Custom Watch Pane is useful for evaluating expressions. It is similar to the [Watch Pane](#watch-pane), except here you decide which expressions are displayed. Any type of expression can be evaluated: + +* field +* variable +* puntero +* calculation +* 4D command +* method +* and anything else that returns a value + +![custom-Watch-pane](assets/en/Debugging/custom-watch-pane.png) + +You can evaluate any expression that can be shown in text form. This does not cover picture and BLOB fields or variables. To display BLOB contents, you can use BLOB commands, such as [BLOB to text](https://doc.4d.com/4dv19/help/command/en/page555.html). + +### Handling expressions + +There are several ways to add expressions to the list: + +* Drag and drop an object or expression from the Watch Pane or the Call Chain Pane +* Select an expression in the [Source Code pane](#source-code-pane) and press **ctrl+D** (Windows) or **cmd+D** (macOS) +* Double-click somewhere in the empty space of the Custom Watch Pane (adds an expression with a placeholder name that you can edit) + +You can enter any formula that returns a result. + +To edit an expression, click on it to select it, then click again or press **Enter** on your keyboard. + +To delete an expression, click on it to select it, then press **Backspace** or **Delete** on your keyboard. +> **Warning:** Be careful when you evaluate a 4D expression modifying the value of one of the System Variables (for instance, the OK variable) because the execution of the rest of the method may be altered. + +### Contextual Menu + +The Custom Watch Pane’s context menu gives you access the 4D formula editor and other options: + +![custom-watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-context-menu.png) + +**New Expression**: This inserts a new expression and displays the 4D Formula Editor. + +![custom-Watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-formula-editor.png) + +For more information on the Formula Editor, see the 4D Design Reference manual. + +* **Insert Command**: Shortcut for inserting a 4D command as a new expression. +* **Delete All**: Removes all expressions from the Custom Watch Pane. +* **Standard Expressions**: Copies the Watch Pane's list of expressions. +> This option is not available in remote debugging mode (see [Debugging from Remote Machines](https://doc.4d.com/4Dv19/4D/19/Debugging-from-Remote-Machines.300-5422483.en.html)). +* **Collapse All/Expand All**: Collapses or Expands all the hierarchical lists. +* **Show Types**: Displays the type of each item in the list (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field of the **Fields**. Useful if you work with tables, field numbers or pointers using the commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the type of each item. +* **Sorted Tables and Fields**: Displays the table and fields in alphabetical order. +* **Show Integers in Hexadecimal**: Displays numbers using hexadecimal notation. To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. + +## Source Code Pane + +The Source Code Pane shows the source code of the method or function currently being traced. + +This area also allows you to add or remove [**break points**](breakpoints.md). + +### Tool tip + +Hover your pointer over any expression to display a tool tip that indicates: + +* the declared type of the expression +* the current value of the expression + +![source-code-pane](assets/en/Debugging/sourceCodePane.png) + +This also works with selections: + +![source-code-pane-tip](assets/en/Debugging/sourcePaneTip.png) + +### Adding expressions to the Custom Watch Pane + +You can copy any selected expression from the Source Code Pane to the [Custom Watch Pane](#custom-watch-pane). + +1. In the Source code pane, select the expression to evaluate +2. Do one of the following: + * Drag and drop the selected text to the Expression area of the Custom Watch Pane + * Press **Ctrl+D** (Windows) or **Cmd+D** (macOS) + * Right-click the selected text **>** **Copy to Expression Pane** + +### Program Counter + +The yellow arrow in the left margin of the Source Code pane is called the program counter. It marks the next line to be executed. + +By default, the program counter line (also called the running line) is highlighted in the debugger. You can customize the highlight color in the [Methods page of the Preferences](Preferences/methods.md). + +#### Moving the program counter + +For debugging purposes, you can move the program counter for the method at the top of the call chain (the method currently executing). To do so, click and drag the yellow arrow to another line. + +This only tells the debugger to pursue tracing or executing from a different point. It does not execute lines or cancel their execution. All current settings, fields, variables, etc. are not impacted. + +Por ejemplo: + +```4d + // ... + If(This condition) + DO_SOMETHING + Else + DO_SOMETHING_ELSE + End if + // ... +``` + +Say the program counter is set to the line `If (This condition)`. When you click the **Step over** button, the program counter moves directly to the `DO_SOMETHING_ELSE` line. To examine the results of the `DO_SOMETHING` line, you can move the program counter to that line and execute it. + +### Contextual menu + +The contextual menu of the Source Code Pane provides access to several functions that are useful when executing methods in Trace mode: + +![source-code-pane-context-window](assets/en/Debugging/sourceCodePaneContext.png) + +* **Goto Definition**: Goes to where the selected object is defined. This command is available for: + * *Project methods:* displays method contents in a new window of the Method editor + * *Fields:* Displays field properties in the inspector of the Structure window + * *Tables:* Displays table properties in the inspector of the Structure window + * *Forms:* Displays form in the Form editor + * *Variables* (local, process, interprocess or $n parameter): displays the line in the current method or among the compiler methods where the variable is declared +* **Search References** (also available in Method editor): Searches all project objects (methods and forms) in which the current element of the method is referenced. The current element is the one selected or the one where the cursor is located. This can be the name of a field, variable, command, string, and so on. Search results are displayed in a new standard results window. +* **Copy**: Standard copy of the selected expression to the pasteboard. +* **Copy to Expression Pane**: Copy the selected expression to the Custom Watch Pane. +* **Run to Cursor**:Executes statements found between the program counter and the selected line of the method (where the cursor is found). +* **Set Next Statement**:Moves program counter to the selected line without executing this line or any intermediate ones. The designated line is only run if the user clicks on one of the execution buttons. +* **Toggle Breakpoint** (also available in Method editor): Alternately inserts or removes the breakpoint corresponding to the selected line. This modifies the breakpoint permanently: for instance, if you remove a breakpoint in the debugger, it no longer appears in the original method. +* **Edit Breakpoint** (also available in Method editor): Displays the Breakpoint Properties dialog box. Any changes made modify the breakpoint permanently. + +### Find Next/Previous + +Specific shortcuts allow you to find strings identical to the one selected: + +* To search for the next identical strings, press **Ctrl+E** (Windows) or **Cmd+E** (macOS) +* To search for the previous identical strings, press **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) + +The search is carried out only if you select at least one character in the Source code pane. + +## Shortcuts + +This section lists all the shortcuts available in the debugger window. + +> The tool bar also has [shortcuts](#tool-bar-buttons). + +#### Watch Pane & Custom Watch Pane + +* **Double-click** an item in the Watch Pane to copy it to the Custom Watch Pane +* **Double-Click** in the Custom Watch Pane to create a new expression + +#### Source Code Pane + +* Click in the left margin to set or remove break points. +* **Alt+Shift+Click** (Windows) or **Option+Shift+Click** (macOS) sets a temporary break point. +* **Alt-Click** (Windows) or **Option-Click** displays the Edit Break window for a new or existing break point. +* A selected expression or object can be copied to the Custom Watch Pane by simple drag and drop. +* **Ctrl+D** (Windows) or **Cmd+D** (macOS) key combinations copy the selected text to the Custom Watch Pane. +* **Ctrl+E** (Windows) or **Cmd+E** (macOS) key combinations find the next strings identical to the one selected. +* **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) key combinations find the previous strings identical to the one selected. + +#### All Panes + +- **Ctrl** + **+/-** (Windows) or **Command** + **+/-** (macOS) increases or decreases the font size for a better readability. The modified font size is also applied to the Method editor and is stored in the Preferences. +- **Ctrl + \*** (Windows) or **Command + \*** (macOS) forces the updating of the Watch Pane. +- When no item is selected in any pane, press **Enter** to step over. +- When an item value is selected, use the arrows keys to navigate through the list. +- When editing an item, use the arrow keys to move the cursor. Use Ctrl-A/X/C/V (Windows) or Command-A/X/C/V (macOS) as shortcuts to the Select All/Cut/Copy/Paste menu commands of the Edit menu. \ No newline at end of file diff --git a/website/translated_docs/es/Debugging/debugging-remote.md b/website/translated_docs/es/Debugging/debugging-remote.md new file mode 100644 index 00000000000000..a225bc916eb148 --- /dev/null +++ b/website/translated_docs/es/Debugging/debugging-remote.md @@ -0,0 +1,84 @@ +--- +id: debugging-remote +title: Debugging from remote machines +--- + +## Generalidades + +When a 4D database is running on 4D Server, you can debug the 4D code running on the server from a remote 4D client logged to the project. You just need to attach the debugger to a specific remote machine, and the code execution can be monitored in the debugger directly on the remote machine. + +On a remote machine, the [debugger window](debugger.md) displays a specific server icon and a blue background color to indicate that you are debugging server code: + +![debugger-window-remote](assets/en/Debugging/debuggerWindowRemote.png) + +This feature is particularly useful when 4D Server runs in headless mode (see [Command Line Interface](../Admin/cli.md)), or when access to the server machine is not easy. + + +## Attached debugger + +Only one debugger can debug a 4D Server application at a given time. It is called the **attached debugger**. The attached debugger can be: + +* the local 4D Server debugger (default) - if the server is not running headless. +* the debugger of a remote 4D client - if the remote session has access to Design mode. + +The attached debugger is called whenever a 4D Server encounters: +* a break point +* a `TRACE` command +* a caught command +* an error + +Keep in mind that error messages are sent to the attached debugger machine. This means that in the case of a remote debugger, server error messages are displayed on the remote 4D client. + +Note that: +* The code executed in the `On Server Startup Database` Method cannot be debugged remotely. It can only be debugged on the server side +* If no debugger is attached, the running code is not stopped by debugging commands + +## Attaching the debugger to a remote 4D client + +By default, the debugger is not attached to a remote 4D client: +* If 4D Server is not running headless, the debugger is attached to the server +* If 4D Server is running headless, no debugger is attached + +You can attach the debugger to any remote 4D client allowed to connect to the 4D Server application. + +> The remote 4D client's user session must have access to the Design environment of the database. + +To attach the debugger to a remote 4D client: + +* In the 4D Server menu bar, select **Edit** > **Detach Debugger** so that the debugger becomes available to remote machines. + - This step is useless if the 4D Server is running headless. + - You can attach the debugger back to the server by selecting **Edit** > **Attach debugger** (if not attached to a remote 4D client, see [Rejected attachment requests](#rejected-attachment-requests)). +* In a remote 4D client connected to the server, select **Run** > **Attach Remote Debugger** + +If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the menu command becomes **Detach Remote Debugger**. + +The debugger is then attached to the remote 4D client: +* until the end of the user session +* until you select `Detach Remote Debugger` + +## Attach Debugger or Remote Debugger at Startup + +4D allows you to automatically attach the debugger to a remote 4D client or the server at startup: + +* On the server (if not headless), this option is named **Attach Debugger At Startup**. When the server is started, it automatically attaches the debugger (default). + +> **Warning**: If this option is selected for a server which is subsequently launched in headless mode, the debugger won't be available for this server. + +* On a remote 4D client, this option is named **Attach Remote Debugger At Startup**. When selected, the remote 4D client will automatically try to attach the remote debugger at each subsequent connection to the same 4D Server database. If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the remote debugger is automatically attached to the remote 4D client and the **Detach Remote Debugger option is displayed**. + +> This setting is applied per project and is stored locally in the [`.4DPreferences`](Project/architecture.md#userpreferencesusername) file. + +## Rejected attachment requests + +While the debugger is already attached to a remote 4D client, or to 4D Server (default), no other machine can attach the debugger. + +If a machine tries to attach the debugger while it is already attached, the attachment is rejected and a dialog box appears: + +![attach-debugger-dialog](assets/en/Debugging/attach-debugger-dialog.png) + +![attach-debugger-dialog-2](assets/en/Debugging/attach-debugger-dialog-2.png) + +Attaching the debugger in this case requires that: + +* the attached debugger is detached from the remote 4D client using the **Detach remote debugger** menu command or from the server using the **Detach debugger** command +* the attached remote 4D client session is closed diff --git a/website/translated_docs/es/Desktop/building.md b/website/translated_docs/es/Desktop/building.md new file mode 100644 index 00000000000000..0ebfc0a164d4cf --- /dev/null +++ b/website/translated_docs/es/Desktop/building.md @@ -0,0 +1,694 @@ +--- +id: building +title: Generador de aplicaciones +--- + +4D includes an application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. + +The application builder allows you to: + +* Build a compiled structure, 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 structure 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). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible by default in compiled applications. Sin embargo, puede crear aplicaciones específicas que soporten modificaciones locales utilizando la llave XML `PackProject` (ver [doc.4d.com](https://doc.4d.com)). + + +## Generalidades + +Building a project package can be carried out using: + +- either the [`BUILD APPLICATION`](https://doc.4d.com/4dv19/help/command/en/page871.html) command, +- or the [Build Application dialog](#application-builder). + + +### Build application dialog + +To display the Build application dialog, select **Design** > **Build Application...** from the menu bar. + +![](assets/en/Project/buildappProj.png) + +The Build Application dialog includes several pages that can be accessed using tabs: + +![](assets/en/Project/appbuilderProj.png) + + +Building can only be carried out once the project is compiled. If you select this command without having previously compiled the project, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the project must be (re)compiled. + + +### 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 project. + +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/4dv19/help/command/en/page871.html) command. + +XML keys provide additional options besides those displayed in the Build Application dialog box. La descripción de estas llaves se detalla en el manual [4D XML Keys BuildApplication](https://doc.4d.com/4Dv19/4D/19/4D-XML-Keys-BuildApplication.100-5447429.en.html). + +### Log file + +When an application is built, 4D generates a log file named *BuildApp.log.xml* in the **Logs** folder of the project. 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, +- Any signing issues (e.g. a non-signed plug-in). + +Checking this file may help you saving time during the subsequent deployment steps, for example if you intend to notarize your application. + +> Use the `Get 4D file(Build application log file)` command to get the log file location. + + +## Application name and destination folder + +![](assets/en/Project/buidappstructureProj.png) + +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 an application containing only compiled code. + +This feature creates a *.4dz* file within a *Compiled Database/\* folder. For example, if you have named your application “MyProjectâ€, 4D will create: + +*\/Compiled Database/MyProject/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. The compact and optimized size of .4dz files makes project packages easy to deploy. + +> When generating .4dz files, 4D uses a **standard** zip format by default. The advantage of this format is that it is easily readable by any unzip tool. If you do not want to use this standard format, add the `UseStandardZipFormat` XML key with value `False` in your [`buildApp.4DSettings`](#build-application-settings) file (for more information, see the *4D XML Keys Backup* manual on [doc.4d.com](https://doc.4d.com)). + + + + +#### Include related folders + +When you check this option, any folders related to the project are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to the [description of project architecture](Project/architecture.md). + + +### 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 project (the host application project), its functionalities are accessible from the host project. + +If you have named your application, *MyComponent*, 4D will create a *Components* folder containing *MyComponent.4dbase* folder: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +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). + + +## 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 application project. + +The following elements are required for the build: +- 4D Volume Desktop (the 4D database engine), +- an [appropriate license](#licenses) + +On Windows, this feature creates an executable file (.exe). On macOS, it handles the creation of software packages. + +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/). + +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). + +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). + +#### 4D Volume Desktop Location + +In order to build a stand-alone application, you must first designate the folder containing the 4D Volume Desktop file: + +* *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. + +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). + +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. + +> 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. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +#### Generated files + +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. + +If you have specified "MyProject" as the name of the application, you will find the following files in this subfolder (aka MyProject): + +* *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 project as well as the project 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 project. 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* + - 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/4Dv18R4/4D/18-R4/Application-file.301-4982855.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 + +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: + +* Install a 4D Volume Desktop version corresponding to a specific language; +* Add a custom *PlugIns* folder; +* Customize the contents of the *Resources* folder. +> 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 + +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: + +* *cert.pem* and *key.pem* files (optional): These files are used for TLS connections and by data encryption commands, +* default Web root folder. + +Items must be installed: + +- **on Windows**: in the *Final Application\MyProject\Database* subfolder. +- **on macOS**: next to the *MyProject.app* software package. + + + + + +## Client/Server page + +On this tab, you can build customized client-server applications that are homogenous, cross-platform and with an automatic update option. + +![](assets/en/Project/buildappCSProj.png) + +### What is a Client/Server application? + +A client/server application comes from the combination of three items: + +- A compiled 4D project, +- The 4D Server application, +- The 4D Volume Desktop application (macOS and/or Windows). + +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). + +> If you want to deploy a client/server application in an heterogeneous environment (client applications running on Intel/AMD and Apple Silicon machines), it is recommended to [compile the project for all processors](Project/compiler.md#compilation-target) on a macOS machine, so that all client applications will run natively. + +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 project file 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 server 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). You only need to create and distribute an initial version of the client application, subsequent updates are handled using the automatic update mechanism. +- 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/4dv19/help/command/en/page1291.html) and [RESTART 4D]((https://doc.4d.com/4dv19/help/command/en/page1292.html)). + + + +### Build server application + +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). + +#### 4D Server location + +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. + +#### Current version + +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. El intervalo de compatibilidad de las aplicaciones del cliente y del servidor se define mediante el uso de [llaves XML](#build-application-settings) específicas). + +#### Allow connection of Silicon Mac clients + +When building a server on Windows, check this option to allow Apple Silicon clients to connect to your server application. You can then specify a path to the structure compiled for Apple Silicon/Intel. + +To allow Apple Silicon clients to connect to a Server application built on Windows, you must first build a client application on macOS, with a project compiled for Apple Silicon and Intel. This automatically creates a compiled structure, identical to the one created with the **[Build compiled structure](#build-compiled-structure)** option (without the related folders). + +Then, you can copy that structure to your Windows machine, and use it to build the server application: + +![](assets/en/Desktop/allow-mac-clients.png) + +#### Compiled structure location + +Path to the compiled structure of the Apple Silicon/Intel client application. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +### Build client application + +Checking this option generates the client part of your application during the building phase. + +You can check this option: + +- along with the [**Build server application**](#build-server-application) option to build matching server and client parts for the current platform and (optionally) include the automatic update archive files, +- without selecting the [**Build server application**](#build-server-application) option, usually to build the update archive file to be selected from the "concurrent" platform when building the server part. + +#### 4D Volume Desktop Location + +Designates the location on your disk of the 4D Volume Desktop application to be used to build the client part of your application. + +> The 4D Volume Desktop version number must match the 4D Developer Edition version number. Por ejemplo, si utiliza 4D v19, debe seleccionar un 4D Volume Desktop v19. + +The 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 the "concurrent" platform, you must carry out an additional build operation using a 4D application running on that platform. + +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. Para más información sobre este archivo, consulte la descripción del comando [`BUILD APPLICATION`](https://doc.4d.com/4dv19/help/command/en/page871.html). 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 inside the server application + +The options of this area set up the mechanism for updating the client part(s) of your client/server applications using the network each time a new version of the application is generated. These options are only enabled when the **Build client application** option is checked. + +- **Allow automatic update of Windows client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Windows platform in case of update. +- **Allow automatic update of Macintosh client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Macintosh platform in case of update. + +The `.4darchive` is copied at the following location: + +``` +_Build/Client Server executable/Upgrade4DClient/ +``` + +#### Selecting client archive for the concurrent platform + + + + +You can check the **Allow automatic update...** option for client applications running on the concurrent platform. This option is only enabled if: + +- the **Build server application** option is checked, +- the **Allow automatic update...** option for client applications running on the current platform is checked. + +This feature requires that you click on the **[...]** button and designate the location on your disk of the file to use for the update. The file to select depends on the current server platform: + +| Current server platform | Required file | Details | +| ----------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| macOS | Windows 4D Volume Desktop *or* Windows client update archive | By default, you select the `4D Volume Desktop` application for Windows. To select a `.4darchive` file previously built on Windows, press **Shift** while clicking on [...] | +| Windows | macOS client update archive | Select a signed `.4darchive` file previously built on macOS | + +You can build specific a `.4darchive` file on the concurrent platform by selecting only the [**Build client application**](#build-client-application) and the appropriate [**Allow automatic update...**](#copy-of-client-applications-inside-the-server-application) option. + + +#### 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). If you have followed the process for generating a cross-platform client application, a .*4darchive* update file is available for each platform: + +To trigger client application update notifications, simply replace the old version of the server application with the new one and then execute it. The rest of the process is automatic. + +On the client side, when the “old†client application tries to connect to the updated server application, a dialog box is displayed on the client machine, indicating that a new version is available. The user can either update their version or cancel the dialog box. + +* If the user clicks **OK**, the new version is downloaded to the client machine over the network. Once the download is complete, the old client application is closed and the new version is launched and connects to the server. The old version of the application is then placed in the machine’s recycle bin. +* If the user clicks **Cancel**, the update is cancelled; if the old version of the client application is not in the range of versions accepted by the server (please refer to the following paragraph), the application is closed and connection is impossible. Otherwise (by default), the connection is established. + +#### Forcing automatic updates + +In some cases, you may want to prevent client applications from being able to cancel the update download. For example, if you used a new version of the 4D Server source application, the new version of the client application must absolutely be installed on each client machine. + +To force the update, simply exclude the current version number of client applications (X-1 and earlier) in the version number range compatible with the server application. In this case, the update mechanism will not allow non-updated client applications to connect. Por ejemplo, si la nueva versión de la aplicación cliente-servidor es 6, puede estipular que toda aplicación cliente con un número de versión inferior a 6 no podrá conectarse. + +The [current version number](#current_version) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). + + +#### Update Error + +If 4D cannot carry out the update of the client application, the client machine displays the following error message: “The update of the client application failed. The application is now going to quit.†+ +There are many possible causes for this error. When you get this message, it is advisable to check the following parameters first off: + +* **Pathnames** - Check the validity of the pathnames set in the application project via the Application builder dialog box or via XML keys (for example *ClientMacFolderToWin*). More particularly, check the pathnames to the versions of 4D Volume Desktop. +* **Read/write privileges** - On the client machine, check that the current user has write access rights for the client application update. + + +### Generated files + +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*. +> 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. + +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. + +The contents of these folders vary depending on the current platform: + +* *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. Puede visualizar su contenido (**Control+clic** en el icono) para poder modificarlo. + +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. + + +#### Location of Web files + +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* 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 application** - in the *Client Server executable\ \Client* subfolder. + +* **on macOS** + * **Server application** - next to the *\Server* software package. + * **Client application** - next to the *\Client* software package. + + +### Embedding a single-user client application + +4D allows you to embed a compiled structure in the Client application. This feature can be used, for example, to provide users with a "portal" application, that gives access to different server applications thanks to the `OPEN DATABASE` command executing a `.4dlink` file. + +To enable this feature, add the `DatabaseToEmbedInClientWinFolder` and/or `DatabaseToEmbedInClientMacFolder` keys in the *buildApp* settings file. When one of these keys is present, the client application building process generates a single-user application: the compiled structure, instead of the *EnginedServer.4Dlink* file, is placed in the "Database" folder. + +- If a default data folder exists in the single-user application, a licence is embedded. +- If no default data folder exists in the single-user application, it will be executed without data file and without licence. + +The basic scenario is: + +1. In the Build application dialog box, select the "Build compiled structure" option to produce a .4DZ or .4DC for the application to be used in single-user mode. +2. In the *buildApp.4DSettings* file of the client-server application, use following xml key(s) to indicate the path to the folder containing the compiled single user application: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Build the client-server application. This will have following effects: + - the whole folder of the single user application is copied inside the "Database" folder of the merged client + - the *EnginedServer.4Dlink* file of the "Database" folder is not generated + - the .4DC, .4DZ, .4DIndy files of the single user application copy are renamed using the name of the merged client + - the `PublishName` key is not copied in the *info.plist* of the merged client + - if the single-user application does not have a "Default data" folder, the merged client will run with no data. + +Automatic update 4D Server features ([Current version](#current-version) number, `SET UPDATE FOLDER` command...) work with single-user application as with standard remote application. At connection, the single-user application compares its `CurrentVers` key to the 4D Server version range. If outside the range, the updated client application is downloaded from the server and the Updater launches the local update process. + + +### Customizing client and/or server cache folder names + +Client and server cache folders are used to store shared elements such as resources or components. They are required to manage exchanges between server and remote clients. Client/server applications use default pathnames for both client and server system cache folders. + +In some specific cases, you might need to customize the names of these folders to implement specific architectures (see below). 4D provides you with the `ClientServerSystemFolderName` and `ServerStructureFolderName` keys to be set in the *buildApp* settings file. + + +#### Client cache folder + +Customizing the client-side cache folder name can be useful when your client application is used to connect to several merged servers which are similar but use different data sets. In this case, to save multiple unnecessary downloads of identical local resources, you can use the same custom local cache folder. + +- Default configuration (*for each connection to a server, a specific cache folder is downloaded/updated*): + +![](assets/en/Admin/cachea.png) + +- Using the `ClientServerSystemFolderName` key (*a single cache folder is used for all servers*): + +![](assets/en/Admin/cacheb.png) + + +#### Server cache folder + +Customizing the server-side cache folder name is useful when you run several identical server applications built with different 4D versions on the same computer. If you want each server to use its own set of resources, you need to customize the server cache folder. + +- Default configuration (*same server applications share the same cache folder*): + +![](assets/en/Admin/cacheServera.png) + +- Using the `ServerStructureFolderName` key (*a dedicated cache folder is used for each server application*): + +![](assets/en/Admin/cacheServerb.png) + + + + +## 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: + +![](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. + + + +* **Plugins and components** column - Displays the name of the plug-in/component. + +* **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: + +* 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/Admin/buildappCertif.png) + +### Licenses + +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. + +To remove or add a license, use the **[+]** and **[-]** buttons at the bottom of the window. + +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. + +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. + +Once you have selected a file, the list will indicate the characteristics of the license that it contains. + +* **License #** - Product license number +* **License** - Name of the product +* **Expiration date** - Expiration date of the license (if any) +* **Path** - Location on disk + +If a license is not valid, a message will warn you. + +You can designate as many valid files as you want. When building an executable application, 4D will use the most appropriate license available. +> Dedicated "R" licenses are required to build applications based upon "R-release" versions (license numbers for "R" products start with "R-4DDP"). + +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 + +El generador de aplicaciones puede firmar aplicaciones 4D fusionadas bajo macOS (aplicaciones monopuesto, componentes, 4D Server y partes cliente bajo 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). + +- 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: + +![](assets/en/Admin/buildapposxcertProj.png) + +This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. + +* **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): + +![](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: [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). +> 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. + +* **Generate self-signed certificate** - runs the "Certificate Assistant" that allows you to generate a self-signed certificate. If you do not have an Apple developer certificate, you need to provide a self-signed certificate. With this certificate, no alert message is displayed if the application is deployed internally. If the application is deployed externally (i.e. through http or email), at launch macOS displays an alert message that the application's developer is unidentified. The user can "force" the opening of the application.

    In the "Certificate Assistant", be sure to select the appropriate options: ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> 4D recommends to subscribe to the Apple Developer Program to get access to Developer Certificates that are necessary to notarize applications (see below). + + +#### 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. + +> On Apple Silicon machines, 4D [components](#components) need to be actually signed. An unsigned component will generate an error at application startup ("lib4d-arm64.dylib can't be opened..."). + +La opción **Firmar la aplicación** del Generador de aplicaciones de 4D le permite generar aplicaciones y componentes compatibles con esta opción por defecto. + + +#### About Notarization + +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. + +Las [funciones de firma integradas](#os-x-signing-certificate) de 4D se han adaptado para cumplir con todos los requisitos de Apple para permitir el uso del servicio de notario de Apple. 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. + +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). + +## Customizing application icons + +4D associates a default icon with stand-alone, server, and client applications, however you can customize the icon for each application. + +* **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** - 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. + +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: + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- 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. + +The opening sequence for launching a merged application is: + +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. + + +### Last data file opened + +#### Path of last 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: + + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +The data file path is stored in a dedicated file, named *lastDataPath.xml*. + +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. + +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). + +#### Configuring the data linking mode + +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**. + +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. + +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**. + +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). + + +*Duplication when data linked by application name:* ![](assets/en/Project/datalinking1.png) + +*Duplication when data linked by application path:* ![](assets/en/Project/datalinking2.png) + +You can select the data linking mode during the build application process. You can either: + +- 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). + + +### Defining a default data folder + +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: + +- 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). + + +To define and use a default data file: + +- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the application project folder. This file must be provided along with all other necessary files, depending on the project 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. + +The following graphic illustrates this feature: + +![](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. + + +## 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. + +### Connection scenario + +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: + +- 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. + +### Storing the last server path + +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: + +```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. + +> - 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 + +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: + +- **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) + +- **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) diff --git a/website/translated_docs/es/Desktop/clientServer.md b/website/translated_docs/es/Desktop/clientServer.md new file mode 100644 index 00000000000000..fb89bfb72d6d41 --- /dev/null +++ b/website/translated_docs/es/Desktop/clientServer.md @@ -0,0 +1,96 @@ +--- +id: clientServer +title: Client/Server Management +--- + + +4D Desktop applications can be used in a Client/Server configuration, either as merged client/server applications or as remote projects. + +- **merged client/server applications** are generated by the [Build Application manager](building.md#clientserver-page). They are used for application deployments. + +- **remote projects** are [.4DProject](Project/architecture.md) files opened by 4D Server and accessed with 4D in remote mode. The server sends a .4dz version of the project ([compressed format](building.md#build-compiled-structure)) to the remote 4D, thus structure files are read-only. This configuration is usually used for application testing. + +![](assets/en/getStart/localremote.png) + +> Connecting to a remote projet from the **same machine as 4D Server** allows modifying the project files. This [specific feature](#using-4d-and-4d-server-on-the-same-machine) allows to develop a client/server application in the same context as the deployment context. + + + +## Opening a merged client/server application + +A merged client/server application is customized and its starting is simplified: + +- To launch the server portion, the user simply double-clicks on the server application. The project file 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. + +These principles are detailed in the [Build Application](building.md#what-is-a-clientserver-application) page. + + +## Opening a remote project + +The first time you connect to a 4D Server project via a remote 4D, you will usually use the standard connection dialog. Thereafter, you will be able to connect directly using the **Open Recent Projects** menu or a 4DLink shortcut file. + +To connect remotely to a 4D Server project: + +1. Select **Connect to 4D Server** in the Welcome Wizard dialog,

    O

    Select **Open/Remote Project...** from the **File** menu or the **Open** toolbar button. + +The 4D Server connection dialog appears. This dialog has three tabs: **Recent**, **Available**, and **Custom**. + +If 4D Server is connected to the same network as the remote 4D, select **Available**. 4D Server includes a built-in TCP/IP broadcasting system that, by default, publishes the name of the 4D Server projects available over the network. The list is sorted by order of appearance and updated dynamically. + +![](assets/en/getStart/serverConnect.png) + +To connect to a server from the list, double-click on its name or select it and click the **OK** button. + +> A circumflex accent (^) is placed before the name of projects published with the encryption option enabled. + +If the published project is not displayed in the **Available** list, select **Custom**. The Custom page allows you to connect to a published server on the network using its network address and assigning it a customized name. + +![](assets/en/getStart/serverConnect2.png) + + +- **Project name**: Defines the local name of the 4D Server project. This name will be used in the **Recent** page when referring to the project. +- **Network address**: The IP address of the machine where the 4D Server was launched.

    If two servers are executed simultaneously on the same machine, the IP address must be followed by a colon and port number, for example: `192.168.92.104:19814`.

    By default, the publishing port of a 4D Server is 19813. This number can be modified in the Project settings. + +Once this page assigns a server, clicking the **OK** button will allow you to connect to the server. + +> If the project is published with the encryption option enabled, you must add a circumflex accent (^) before the name, otherwise the connection will be refused. For more information, refer to the Encrypting Client/Server Connections section. + +Once a connection to the server has been established, the remote project will be listed on the **Recent** tab. + +### Updating project files on the server + +4D Server automatically creates and sends the remote machines a [.4dz version](building.md#build-compiled-structure) of the *.4DProject* project file (not compressed) in interpreted mode. + +- An updated .4dz version of the project is automatically produced when necessary, *i.e.* when the project has been modified and reloaded by 4D Server. The project is reloaded: + - automatically, when the 4D Server application window comes to the front of the OS or when the 4D application on the same machine saves a modification (see below). + - when the `RELOAD PROJECT` command is executed. Calling this command is necessary for example when you have pulled a new version of the project from the source control platform. + + + + +### Updating project files on remote machines + +When an updated .4dz version of the project has been produced on 4D Server, connected remote 4D machines must log out and reconnect to 4D Server in order to benefit from the updated version. + + +## Using 4D and 4D Server on the same machine + +When 4D connects to a 4D Server on the same machine, the application behaves as 4D in single user mode and the design environment allows you to edit project files. This feature allows you to develop a client/server application in the same context as the deployment context. + +Each time 4D performs a **Save all** action from the design environment (explicitly from **File** menu or implicitly by switching to application mode for example), 4D Server synchronously reloads project files. 4D waits for 4D Server to finish reloading the project files before it continues. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](Project/architecture.md): + +- the userPreferences.{username} folder used by 4D is not the same folder used by 4D Server in the project folder. Instead, it is a dedicated folder, named "userPreferences", stored in the project system folder (i.e., the same location as when opening a .4dz project). +- the folder used by 4D for derived data is not the folder named "DerivedData" in the project folder. Instead it is a dedicated folder named "DerivedDataRemote" located in the project system folder. +- the catalog.4DCatalog file is not edited by 4D but by 4D Server. Catalog information is synchronised using client/server requests +- the directory.json file is not edited by 4D but by 4D Server. Directory information is synchronised using client/server requests +- 4D uses its own internal components and plug-ins instead of those in 4D Server. + +> It is not recommended to install plug-ins or components at the 4D or 4D Server application level. + + + + + diff --git a/website/translated_docs/es/Events/onActivate.md b/website/translated_docs/es/Events/onActivate.md index 6b75254206aa8c..9f99933ca31d45 100644 --- a/website/translated_docs/es/Events/onActivate.md +++ b/website/translated_docs/es/Events/onActivate.md @@ -3,13 +3,15 @@ id: onActivate title: On Activate --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ---------------------------------------------- | -| 11 | Form | The form's window becomes the frontmost window | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| 11 | Formulario | La ventana del formulario se convierte en la ventana que se encuentra más adelante o el contenedor del subformulario obtiene el foco | -## Description +## Descripción -If the window of a form was sent to the background, this event is called when the window becomes the frontmost window. +Si la ventana de un formulario fue enviada al fondo, este evento es llamado cuando la ventana se convierte en la ventana activa. -This event applies to the form as a whole and not to a particular object. Consequently, if the `On Activate` form event property is selected, only the form will have its form method called. \ No newline at end of file +Este evento se aplica al formulario en su conjunto y no a un objeto en particular. Por lo tanto, si se selecciona la propiedad de evento formulario `On Activate`, sólo se llamará al método formulario. + +En el caso de un subformulario, este evento se pasa al subformulario cuando el contenedor obtiene el foco (si tiene la propiedad [focusable](FormObjects/properties_Entry.md#focusable)). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onAfterEdit.md b/website/translated_docs/es/Events/onAfterEdit.md index 05c77ab50034fd..65edccaae7cbd2 100644 --- a/website/translated_docs/es/Events/onAfterEdit.md +++ b/website/translated_docs/es/Events/onAfterEdit.md @@ -3,172 +3,106 @@ id: onAfterEdit title: On After Edit --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| 45 | [4D View Pro area](FormObjects/viewProArea_overview) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [Hierarchical List](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | The contents of the enterable object that has the focus has just been modified | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| 45 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Formulario - [Entrada](FormObjects/input_overview.md) - [Lista jerárquica](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna List Box](FormObjects/listbox_overview.md#list-box-columns) | El contenido del objeto introducible que tiene el foco acaba de ser modificado | -## Description +## Descripción -### General case +### Caso general -This event can be used filter the data entry in keyboard enterable objects at the lowest level. +Este evento se puede utilizar para filtrar la entrada de datos en los objetos editables por teclado en el nivel más bajo. -When it is used, this event is generated after each change made to the contents of an enterable object, regardless of the action that caused the change, *i.e.*: +Cuando se utiliza, este evento se genera después de cada cambio realizado en el contenido de un objeto editable, independientemente de la acción que haya provocado la modificación, *es decir*: -- Standard editing actions which modify content like paste, cut, delete or cancel; -- Dropping a value (action similar to paste); -- Any keyboard entry made by the user; in this case, the `On After Edit` event is generated after the [`On Before Keystroke`](onBeforeKeystroke.md) and [`On After Keystroke`](onAfterKeystroke.md) events, if they are used. -- Any modification made using a language command that simulates a user action (i.e., `POST KEY`). +- Acciones de edición estándar que modifican el contenido como pegar, cortar, borrar o cancelar; +- Soltar un valor (acción similar a pegar); +- Toda entrada de teclado realizada por el usuario; en este caso, el evento `On After Edit` se genera después de los eventos [`On Before Keystroke`](onBeforeKeystroke.md) y [`On After Keystroke`](onAfterKeystroke.md), si se utilizan. +- Cualquier modificación realizada mediante un comando del lenguaje que simule una acción del usuario (es decir, `POST KEY`). ### 4D View Pro -The object returned by the `FORM Event` command contains: +El objeto devuelto por el comando `FORM Event` contiene: -| Property | Type | Description | -| ----------- | ------- | --------------------------------------------------------------------------------------------------- | -| code | longint | On After Edit | -| description | text | "On After Edit" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| action | text | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | --------------------------------------------------------------------------------------------------- | +| code | entero largo | On After Edit | +| description | texto | "On After Edit" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| action | texto | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | - -Depending on the `action` property value, the [event object](overview.md#event-object) will contain additional properties. +En función del valor de la propiedad `action`, el [objeto evento](overview.md#event-object) contendrá propiedades adicionales. #### action = editChange -| Property | Type | Description | -| ----------- | ------- | --------------------------------- | -| range | object | Cell range | -| editingText | variant | The value from the current editor | - +| Propiedad | Tipo | Descripción | +| ----------- | ------- | -------------------------------------- | +| range | objeto | Rango de celdas | +| editingText | variant | El valor proveniente del editor actual | #### action = valueChanged -| Property | Type | Description | -| -------- | ------- | --------------------------- | -| range | object | Cell range | -| oldValue | variant | Value of cell before change | -| newValue | variant | Value of cell after change | +| Propiedad | Tipo | Descripción | +| --------- | ------- | ------------------------------------------ | +| range | objeto | Rango de celdas | +| oldValue | variant | Valor de la celda antes de la modificación | +| newValue | variant | Valor de la celda luego de la modificación | #### action = DragDropBlock -| Property | Type | Description | -| --------- | ------- | --------------------------------------------------- | -| fromRange | object | Range of source cell range (being dragged) | -| toRange | object | Range of the destination cell range (drop location) | -| copy | boolean | Specifies if the source range is copied or not | -| insert | boolean | Specifies if the source range is inserted or not | +| Propiedad | Tipo | Descripción | +| --------- | -------- | -------------------------------------------------- | +| fromRange | objeto | Rango de celdas fuente (que se arrastra) | +| toRange | objeto | Rango de la celda de destino (ubicación de soltar) | +| copy | booleano | Indica si el rango fuente se copia o no | +| insert | booleano | Indica si el rango fuente se inserta o no | #### action = DragFillBlock -| Property | Type | Description | -| --------- | ------ | ------------------- | -| fillRange | object | Range used for fill | - autoFillType|longint|Value used for the fill. - -- 0: Cells are filled with all data (values, formatting, and formulas) - - 1: Cells are filled with automatically sequential data - - 2: Cells are filled with formatting only - - 3: Cells are filled with values but not formatting - - 4: Values are removed from the cells - - 5: Cells are filled automatically| |fillDirection|longint|Direction of the fill. - - 0: The cells to the left are filled - - 1: The cells to the right are filled - - 2: The cells above are filled - - 3: The cells below are filled| - #### action = formulaChanged - - | Property | Type | Description | - | -------- | ------ | ------------------- | - | range | object | Cell range | - | formula | text | The formula entered | - - - #### action = clipboardPasted - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Property - - Type - - Description -
    - range - - object - - Cell range -
    - pasteOption - - longint - - Specifies what is pasted from the clipboard: - -
  • - 0: Everything is pasted (values, formatting, and formulas)
  • - 1: Only values are pasted
  • - 2: Only the formatting is pasted
  • - 3: Only formulas are pasted
  • - 4: Values and formatting are pasted (not formulas)
  • - 5: Formulas and formatting are pasted (not values)
  • - pasteData - - object - - The data from the clipboard to be pasted - -
  • - "text" (text): The text from the clipboard
  • - "html" (text): The HTML from the clipboard
  • - Example -

    -

    - Here is an example handling an On After Edit event: -

    -
     If(FORM Event.code=On After Edit)
    +| Propiedad | Tipo   | Descripción                    |
    +| --------- | ------ | ------------------------------ |
    +| fillRange | objeto | Gama utilizada para el relleno |
    + autoFillType|longint|Valor utilizado para el relleno.
  • 0: las celdas se llenan con todos los datos (valores, formato y fórmulas)
  • 1: las celdas se llenan con datos automáticamente secuenciales
  • 2: Las celdas se llenan sólo con el formato
  • 3: Las celdas se llenan de valores pero sin formato
  • 4: Se eliminan los valores de las celdas
  • 5: Las celdas se llenan automáticamente. |fillDirection|longint|Dirección del relleno.
  • 0: Se llenan las celdas de la izquierda
  • 1: Se llenan las celdas a la derecha
  • 2: Las celdas de arriba se llenan
  • 3: Las celdas de abajo se llenan| + + +#### action = formulaChanged + +| Propiedad | Tipo | Descripción | +| --------- | ------ | ---------------------- | +| range | objeto | Rango de celdas | +| formula | texto | La fórmula introducida | + +#### action = clipboardPasted + +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| range | objeto | Rango de celdas | +| pasteOption | entero largo | Indica lo que se pega desde el portapapeles:
  • 0: se pega todo (valores, formato y fórmulas)
  • 1: solo se pegan los valores
  • 2: sólo se pega el formato
  • 3: solo se pegan las fórmulas
  • 4: los valores y el formato se pegan (no las fórmulas)
  • 5: las fórmulas y el formato se pegan (no los valores) | +| pasteData | objeto | Los datos del portapapeles a pegar
  • "text" (texto): el texto del portapapeles
  • "html" (texto): el código HTML del portapapeles | + + +#### Ejemplo + +Aquí hay un ejemplo de manejo de un evento `On After Edit`: + +```4d + If(FORM Event.code=On After Edit) If(FORM Event.action="valueChanged") ALERT("WARNING: You are currently changing the value\ from "+String(FORM Event.oldValue)+\ " to "+String(FORM Event.newValue)+"!") End if End if -
  • -

    - The above example could generate an event object like this: -

    -
    {
    +```
    +
    +El ejemplo anterior podría generar un objeto evento como este:
    +
    +```
    +{
     
     "code":45;
     "description":"On After Edit";
    @@ -179,4 +113,4 @@ Depending on the `action` property value, the [event object](overview.md#event-o
     "oldValue":"The quick brown fox";
     "newValue":"jumped over the lazy dog";
     }
    -
    \ No newline at end of file +``` \ No newline at end of file diff --git a/website/translated_docs/es/Events/onAfterKeystroke.md b/website/translated_docs/es/Events/onAfterKeystroke.md index 5e3e551d49dd98..115543c9797e2f 100644 --- a/website/translated_docs/es/Events/onAfterKeystroke.md +++ b/website/translated_docs/es/Events/onAfterKeystroke.md @@ -3,23 +3,39 @@ id: onAfterKeystroke title: On After Keystroke --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| 28 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **including** this character. | +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 28 | [Ãrea 4D Write Pro ](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Formulario - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna list box](FormObjects/listbox_overview.md#list-box-columns) | Un personaje está a punto de ser introducido en el objeto que tiene el foco. `Get edited text` devuelve el texto del objeto **incluyendo** este caracter. | +
    History -## Description +| Version | Changes | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

    - The event is now triggered after IME validation | +

    -> The `On After Keystroke` event can generally be replaced by the [`On After Edit`](onAfterEdit.md) event (see below). -After the [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` event properties are selected for an object, you can detect and handle the keystrokes within the object, using the `FORM event` command that will return `On Before Keystroke` and then `On After Keystroke` (for more information, please refer to the description of the `Get edited text` command). +## Descripción -These events are also activated by language commands that simulate a user action like `POST KEY`. +> El evento `On After Keystroke` generalmente puede ser reemplazado por el evento [`On After Edit`](onAfterEdit.md) (ver abajo). -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +Después de que las propiedades de evento [`On Before Keystroke`](onBeforeKeystroke. md) y `On After Keystroke` estén seleccionadas para un objeto, puede detectar y manejar las presiones de las teclas dentro del objeto, utilizando el comando `FORM event` que devolverá `On Before Keystroke` y luego `On After Keystroke` (para más información, consulte la descripción del comando `Get edited text`). -> The [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. +> Estos eventos también son activados por comandos del lenguaje que simulan una acción del usuario como `POST KEY`. -### See also +El evento `On After Keystroke` no se genera: +- en el método [de las columnas de list box](FormObjects/listbox_overview.md#list-box-columns) excepto cuando se está editando una celda (sin embargo se genera en cualquier caso en el método de [list box](FormObjects/listbox_overview.md)), +- cuando las modificaciones usuario no se realizan con el teclado (pegar, arrastrar y soltar, casilla de verificación, lista desplegable, combo box). Para procesar estos eventos, debe utilizar [`On After Edit`](onAfterEdit.md). + + +### Secuencia de tecla + +Cuando una entrada requiere una secuencia de presiones de teclas, los eventos [`On Before Keystroke`](onBeforeKeystroke.md) y [`On After Keystroke`] se generan sólo cuando el usuario valida completamente la entrada. El comando `Keystroke` devuelve el carácter validado. Este caso se da principalmente: + +- cuando se utilizan las teclas "muertas" como ^ o ~: los eventos se generan sólo cuando se introduce el carácter extendido eventualmente (por ejemplo, "ê" o ñ), +- cuando un IME (editor de métodos de entrada) muestra una caja de diálogo intermedia en la que el usuario puede introducir una combinación de caracteres: los eventos se generan sólo cuando el diálogo IME se valida. + + +### Ver también [On Before Keystroke](onBeforeKeystroke.md). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onAfterSort.md b/website/translated_docs/es/Events/onAfterSort.md index e2918c033e1008..df5ccbbe6b9421 100644 --- a/website/translated_docs/es/Events/onAfterSort.md +++ b/website/translated_docs/es/Events/onAfterSort.md @@ -3,11 +3,11 @@ id: onAfterSort title: On After Sort --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| 30 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A standard sort has just been carried out in a list box column. | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| 30 | [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) | Se acaba de realizar una ordenación estándar en una columna del list box. | -## Description +## Descripción -This event is generated just after a standard sort is performed (*i.e.* it is NOT generated if $0 returns -1 in the [`On Header Click`](onHeaderClick.md) event). This mechanism is useful for storing the directions of the last sort performed by the user. In this event, the `Self` command returns a pointer to the variable of the sorted column header. \ No newline at end of file +Este evento se genera justo después de realizar una ordenación estándar (*es decir,* NO se genera si $0 devuelve -1 en el evento [`On Header Click`](onHeaderClick.md)). Este mecanismo es útil para almacenar las direcciones de la última ordenación realizada por el usuario. En este caso, el comando `Self` devuelve un puntero a la variable del encabezado de la columna ordenada. diff --git a/website/translated_docs/es/Events/onAlternativeClick.md b/website/translated_docs/es/Events/onAlternativeClick.md index 4e3558f95a1f16..507172f8dd2f50 100644 --- a/website/translated_docs/es/Events/onAlternativeClick.md +++ b/website/translated_docs/es/Events/onAlternativeClick.md @@ -3,65 +3,28 @@ id: onAlternativeClick title: On Alternative Click --- - - - - - - - - - - - - - - -
    - Code - - Can be called by - - Definition -
    - 38 - - Button - List Box - List Box Column - -
  • - Buttons: The "arrow" area of a button is clicked
  • - List boxes: In a column of an object array, an ellipsis button ("alternateButton" attribute) is clicked
  • - Description -

    -

    - Buttons -

    -

    - Some button styles can be linked to a pop-up menu and display an triangle. Clicking on this triangle causes a selection pop-up to appear that provides a set of alternative actions in relation to the primary button action. -

    -

    - 4D allows you to manage this type of button using the On Alternative Click event. This event is generated when the user clicks on the triangle (as soon as the mouse button is held down): -

    -
      -
    • - If the pop-up menu is separated,the event is only generated when a click occurs on the portion of the button with the arrow. -
    • -
    • - If the pop-up menu is linked, the event is generated when a click occurs on any part of the button. Note that the On Long Click event cannot be generated with this type of button. -
    • -
    -

    - -

    -

    - List box -

    -

    - This event is generated in columns of object array type list boxes, when the user clicks on a widget ellipsis button ("alternateButton" attribute). -

    -

    - -

    -

    - See the description of the "alternateButton" attribute. -

    \ No newline at end of file +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 38 | [Botón](FormObjects/button_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) |
  • Botones: el área "flecha" de un botón se presiona
  • List box: en una columna de un array, se hace clic en un botón de selección (atributo "alternateButton") | + + +## Descripción + +### Botones + +Algunos estilos de botón pueden ser [vinculados a un menú emergente](FormObjects/properties_TextAndPicture.md#with-pop-up-menu) y mostrar un triángulo. Al hacer clic en este triángulo, aparece una ventana emergente de selección que brinda un conjunto de acciones alternativas en relación con la acción del botón principal. + +4D permite gestionar este tipo de botones utilizando el evento `On Alternative Click`. Este evento se genera cuando el usuario hace clic en el triángulo (en cuanto se mantiene presionado el botón del ratón): + +- Si el menú emergente está **separado**, el evento sólo se genera cuando se hace clic en la parte del botón con la flecha. +- Si el menú emergente está **asociado**, el evento se genera cuando se hace clic en cualquier parte del botón. Tenga en cuenta que el evento [`On Long Click`](onLongClick.md) no se puede generar con este tipo de botón. + +![](assets/en/Events/clickevents.png) + +### List box + +Este evento se genera en las columnas de [list box de tipo array objeto](FormObjects/listbox_overview.md#object-arrays-in-columns-4d-view-pro), cuando el usuario hace clic en un botón de selección de widget (atributo "alternateButton"). + +![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + +Ver la [descripción del atributo "alternateButton"](FormObjects/listbox_overview.md#alternatebutton). diff --git a/website/translated_docs/es/Events/onBeforeDataEntry.md b/website/translated_docs/es/Events/onBeforeDataEntry.md index 78b92d822e3a7d..f4831c4bd391fb 100644 --- a/website/translated_docs/es/Events/onBeforeDataEntry.md +++ b/website/translated_docs/es/Events/onBeforeDataEntry.md @@ -3,18 +3,18 @@ id: onBeforeDataEntry title: On Before Data Entry --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| 41 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box cell is about to change to editing mode | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| 41 | [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) | Una celda de list box está a punto de cambiar al modo de edición | -## Description +## Descripción -This event is generated just before a cell in the list box is edited (before the entry cursor is displayed). This event allows the developer, for example, to display a different text depending on whether the user is in the display or edit mode. +Este evento se genera justo antes de que se edite una celda del list box (antes de que se muestre el cursor de entrada). Este evento permite al desarrollador, por ejemplo, mostrar un texto diferente dependiendo de si el usuario está en el modo de visualización o de edición. -When the cursor arrives in the cell, the `On Before Data Entry` event is generated in the list box or column method. +Cuando el cursor llega a la celda, se genera el evento `On Before Data Entry` en el list box o método de la columna. -- 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. +- Si, en el contexto de este evento, $0 se define como -1, la celda se considera como no editable. Si el evento se generó después de presionar **Tab** o **Mayús+Tab**, el foco pasa a la siguiente celda o a la anterior, respectivamente. +- Si $0 no es -1 (por defecto $0 es 0), la celda se puede introducir y pasa al modo de edición. -See also [Managing entry](FormObjects/listbox_overview.md#managing-entry) section. \ No newline at end of file +Ver también la sección [Gestión de entradas](FormObjects/listbox_overview.md#managing-entry). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onBeforeKeystroke.md b/website/translated_docs/es/Events/onBeforeKeystroke.md index bd8102ce2e8802..511dafb536bb3b 100644 --- a/website/translated_docs/es/Events/onBeforeKeystroke.md +++ b/website/translated_docs/es/Events/onBeforeKeystroke.md @@ -3,21 +3,43 @@ id: onBeforeKeystroke title: On Before Keystroke --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **without** this character. | +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| 17 | [Ãrea 4D Write Pro ](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Formulario - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna list box](FormObjects/listbox_overview.md#list-box-columns) | Un personaje está a punto de ser introducido en el objeto que tiene el foco. `Get edited text` devuelve el texto del objeto **sin** este carácter. | +
    History -## Description +| Version | Changes | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

    - The event is now triggered after IME validation | +

    -After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) properties are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). -These events are also activated by language commands that simulate a user action like `POST KEY`. +## Descripción -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +Después de haber seleccionado los eventos `On Before Keystroke` y [`On After Keystroke event`](onAfterKeystroke.md) para un objeto, puede detectar y manejar las presiones de las teclas dentro del objeto, utilizando el comando `Form event code` que devolverá `On Before Keystroke` y luego [`On After Keystroke event`](onAfterKeystroke.md) (para más información, consulte la descripción del comando `Get edited text`). En el evento `On Before Keystroke`, se puede utilizar el comando `FILTER KEYSTROKE` para filtrar los caracteres digitados. -> The `On Before Keystroke` and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. +> Estos eventos también son activados por comandos del lenguaje que simulan una acción del usuario como `POST KEY`. -### See also +El evento `On Before Keystroke` no se genera: + +- en un método [columnas de list box](FormObjects/listbox_overview.md#list-box-columns) excepto cuando se está editando una celda (sin embargo se genera en cualquier caso en el método de [list box](FormObjects/listbox_overview.md)), +- cuando las modificaciones usuario no se realizan con el teclado (pegar, arrastrar y soltar, casilla de verificación, lista desplegable, combo box). Para procesar estos eventos, debe utilizar [`On After Edit`](onAfterEdit.md). + + +### Objetos no editables + +El evento `On Before Keystroke` puede generarse en objetos no introducibles, por ejemplo, en un list box aunque las celdas del list box no sean introducibles, o las líneas no sean seleccionables. Esto permite crear interfaces en las que el usuario puede desplazarse dinámicamente a una línea específica en un list box introduciendo las primeras letras de un valor. En el caso de que las celdas del cuadro del list box sean editables, puede utilizar el comando `Is editing text` para saber si el usuario está realmente introduciendo texto en una celda o está utilizando la función de tecleo predictivo y entonces, ejecutar el código apropiado. + + +### Secuencia de tecla + +Cuando una entrada requiere una secuencia de presiones de teclas, los eventos `On Before Keystroke` y [`On After Keystroke`](onAfterKeystroke.md) se generan sólo cuando el usuario valida completamente la entrada. El comando `Keystroke` devuelve el carácter validado. Este caso se da principalmente: + +- cuando se utilizan las teclas "muertas" como ^ o ~: los eventos se generan sólo cuando se introduce el carácter extendido eventualmente (por ejemplo, "ê" o ñ), +- cuando un IME (editor de métodos de entrada) muestra una caja de diálogo intermedia en la que el usuario puede introducir una combinación de caracteres: los eventos se generan sólo cuando el diálogo IME se valida. + + +### Ver también [On After Keystroke](onAfterKeystroke.md). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onBeginDragOver.md b/website/translated_docs/es/Events/onBeginDragOver.md index 6217d30e98ecc0..18101ebb2dc5ef 100644 --- a/website/translated_docs/es/Events/onBeginDragOver.md +++ b/website/translated_docs/es/Events/onBeginDragOver.md @@ -3,24 +3,24 @@ id: onBeginDragOver title: On Begin Drag Over --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | An object is being dragged | +| Code | Puede ser llamado por | Definición | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | +| 17 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna List Box](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Se está arrastrando un objeto | -## Description +## Descripción -The `On Begin Drag Over` form event can be selected for any form objects that can be dragged. It is generated in every case where the object has the [Draggable](FormObjects/properties_Action.md#draggable) property. It can be called from the method of the source object or the form method of the source object. +El evento de formulario `On Begin Drag Over` puede ser seleccionado para todos los objetos formulario que puedan ser arrastrados. Se genera en todos los casos en que el objeto tiene la propiedad [Draggable](FormObjects/properties_Action.md#draggable). Se puede llamar desde el método del objeto fuente o desde el método formulario del objeto fuente. -> Unlike the [`On Drag Over`](onDragOver.md) form event, `On Begin Drag Over` is called within the context of the **source object** of the drag action. +> A diferencia del evento de formulario [`On Drag Over`](onDragOver.md), `On Begin Drag Over` se llama dentro del contexto del **objeto fuente** de la acción de arrastrar. -The `On Begin Drag Over` event is useful for preparing of the drag action. It can be used to: +El evento `On Begin Drag Over` es útil para preparar la acción de arrastrar. Puede utilizarse para: -- Add data and signatures to the pasteboard (via the `APPEND DATA TO PASTEBOARD` command). -- Use a custom icon during the drag action (via the `SET DRAG ICON` command). -- Accept or refuse dragging via $0 in the method of the dragged object. - - To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute `$0:=0`. - - To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute `$0:=-1`. - - If no result is returned, 4D considers that drag actions are accepted. +- Añadir los datos y las firmas al portapapeles (vía el comando `APPEND DATA TO PASTEBOARD`). +- Utilizar un icono personalizado durante la acción de arrastre (vía el comando `SET DRAG ICON`). +- Aceptar o rechazar el arrastre vía $0 en el método del objeto arrastrado. + - Para indicar que se aceptan las acciones de arrastre, el método del objeto fuente debe devolver 0 (cero); por tanto, debe ejecutar `$0:=0`. + - Para indicar que se rechazan las acciones de arrastre, el método del objeto fuente debe devolver -1 (menos uno); por tanto, debe ejecutar `$0:=-1`. + - Si no se devuelve ningún resultado, 4D considera que las acciones de arrastre son aceptadas. -4D data are put in the pasteboard before calling the event. For example, in the case of dragging without the **Automatic Drag** action, the dragged text is already in the pasteboard when the event is called. \ No newline at end of file +Los datos 4D se colocan en el portapapeles antes de llamar al evento. Por ejemplo, en el caso de arrastrar sin la acción **Arrastre automático**, el texto arrastrado ya está en portapapeles cuando se llama al evento. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onBeginUrlLoading.md b/website/translated_docs/es/Events/onBeginUrlLoading.md index f7eb5de22cbe11..c3425836e9a325 100644 --- a/website/translated_docs/es/Events/onBeginUrlLoading.md +++ b/website/translated_docs/es/Events/onBeginUrlLoading.md @@ -3,13 +3,13 @@ id: onBeginUrlLoading title: On Begin URL Loading --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ----------------------------------- | -| 47 | [Web Area](FormObjects/webArea_overview.md) | A new URL is loaded in the Web area | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | ------------------------------------- | +| 47 | [Ãrea Web](FormObjects/webArea_overview.md) | Se carga una nueva URL en el área web | -## Description +## Descripción -This event is generated at the start of loading a new URL in the Web area. The `URL` variable associated with the Web area can be used to find out the URL being loaded. +Este evento se genera al inicio de la carga de una nueva URL en el área web. La variable `URL` asociada al área web puede utilizarse para conocer la URL que se está cargando. -> The URL being loaded is different from the [current URL](FormObjects/properties_WebArea.md#url-variable-and-wa-open-url-command) (refer to the description of the `WA Get current URL` command). \ No newline at end of file +> La URL que se está cargando es diferente de la [ URL actual](FormObjects/properties_WebArea.md#url-variable-and-wa-open-url-command) (consulte la descripción del comando `WA Get current URL`). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onBoundVariableChange.md b/website/translated_docs/es/Events/onBoundVariableChange.md index 239aae38ad4eb0..db58027d9faa86 100644 --- a/website/translated_docs/es/Events/onBoundVariableChange.md +++ b/website/translated_docs/es/Events/onBoundVariableChange.md @@ -3,13 +3,13 @@ id: onBoundVariableChange title: On Bound Variable Change --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------- | -| 54 | Form | The variable bound to a subform is modified | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ---------------------------------------------------- | +| 54 | Formulario | La variable vinculada a un subformulario se modifica | -## Description +## Descripción -This event is generated in the context of the form method of a [subform](FormObjects/subform_overview.md) as soon as a value is assigned to the variable bound with the subform in the parent form (even if the same value is reassigned) and if the subform belongs to the current form page or to page 0. +Este evento se genera en el contexto del método formulario de un [subformulario](FormObjects/subform_overview.md) en cuanto se asigna un valor a la variable vinculada con el subformulario del formulario padre (incluso si se reasigna el mismo valor) y si el subformulario pertenece a la página actual del formulario o a la página 0. -Form more information, refer to the [Managing the bound variable](FormObjects/subform_overview.md#managing-the-bound-variable) section. \ No newline at end of file +Para más información, consulte la sección [Gestión de la variable vinculada](FormObjects/subform_overview.md#managing-the-bound-variable). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onClicked.md b/website/translated_docs/es/Events/onClicked.md index d7bb95860d38da..3efdc8741d0c14 100644 --- a/website/translated_docs/es/Events/onClicked.md +++ b/website/translated_docs/es/Events/onClicked.md @@ -3,47 +3,46 @@ id: onClicked title: On Clicked --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | -| 4 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A click occurred on an object | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| 4 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Se ha producido un clic en un objeto | -## Description +## Descripción -The `On Clicked` event is generated when the user clicks on an object. +El evento `On Clicked` se genera cuando el usuario hace clic en un objeto. -> Some form objects can be activated with the keyboard. For example, once a check box gets the focus, it can be entered using the space bar. In such a case, the `On Clicked` event is still generated. +> Ciertos objetos de formulario pueden activarse con el teclado. Por ejemplo, una vez que una casilla de selección recibe el foco, se puede introducir con la barra espaciadora. En tal caso, se sigue generando el evento `On Clicked`. -The `On Clicked` event usually occurs once the mouse button is released. However, there are several exceptions: +El evento `On Clicked` suele producirse una vez que se suelta el botón del ratón. Sin embargo, hay varias excepciones: -- [Invisible buttons](FormObjects/properties_Display.md#not-rendered): The `On Clicked` event occurs as soon as the click is made and does not wait for the mouse button to be released. -- [Rulers](FormObjects/ruler.md): If the [Execute object method](FormObjects/properties_Action.md#execute-object-method) option is set to **true**, the `On Clicked` event occurs as soon as the click is made. -- [Combo boxes](FormObjects/comboBox_overview.md): The `On Clicked` event occurs only if the user selects another value in the associated menu. A [combo box](FormObjects/comboBox_overview.md) must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the `On Before Keystroke`, `On After Keystroke` and `On Data Change` events. -- [Drop-down lists](FormObjects/dropdownList_Overview.md): The `On Clicked` event occurs only if the user selects another value in the menu. The `On Data Change` event allows you to detect the activation of the object when a value different from the current value is selected -- The `On Clicked` event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a list box [column](FormObjects/listbox_overview.md#list-box-columns) or [column header](FormObjects/listbox_overview.md#list-box-headers). +- [Botones invisibles](FormObjects/properties_Display.md#not-rendered): el evento `On Clicked` se produce en cuanto se hace clic y no espera a que se suelte el botón del ratón. +- [Reglas](FormObjects/ruler.md): si la opción de [método de ejecución del objeto](FormObjects/properties_Action.md#execute-object-method) se define en **true**, el evento `On Clicked` se produce en cuanto se hace clic. +- [Combo box](FormObjects/comboBox_overview.md): el evento `On Clicked` ocurre sólo si el usuario selecciona otro valor en el menú asociado. Un [combo box](FormObjects/comboBox_overview.md) debe ser tratado como un área de texto introducible cuya lista desplegable asociada ofrece valores por defecto. Por lo tanto, se maneja la entrada de datos dentro de un combo box a través de los eventos `On Before Keystroke`, `On After Keystroke` y `On Data Change`. +- [Listas desplegables](FormObjects/dropdownList_Overview.md): el evento `On Clicked` ocurre sólo si el usuario selecciona otro valor en el menú. El evento `On Data Change` permite detectar la activación del objeto cuando se selecciona un valor diferente al actual +- Cuando una celda de entrada del list box está [siendo editada](FormObjects/listbox_overview.md#managing-entry), se genera el evento `On Clicked` cuando se presiona el botón del ratón, permitiendo utilizar el comando `Contextual click` por ejemplo. -In the context of an `On Clicked` event, you can test the number of clicks made by the user by means of the `Clickcount` command. +En el contexto de un evento `On Clicked`, se puede comprobar el número de clics realizados por el usuario utilizando el comando `Clickcount`. -### On Clicked and On Double Clicked +### On Clicked y On Double Clicked -After the `On Clicked` or [`On Double Clicked`](onDoubleClicked.md) object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns `On Clicked` or [`On Double Clicked`](onDoubleClicked.md), depending on the case. +Una vez que la propiedad de evento de objeto `On Clicked` o [`On Double Clicked`](onDoubleClicked.md) es seleccionada para un objeto, puede detectar y controlar los clics dentro o sobre el objeto utilizando el comando `FORM event` que devuelve `On Clicked` o [`On Double Clicked`](onDoubleClicked.md), según el caso. -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +Si se seleccionan ambos eventos para un objeto, se generará el evento `On Clicked` y luego el evento `On Double Clicked` cuando el usuario haga doble clic en el objeto. ### 4D View Pro -This event is generated when the user clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Este evento se genera cuando el usuario hace clic en cualquier parte en un documento 4D View Pro. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: -| Property | Type | Description | -| ----------- | ------- | ------------------------------ | -| code | longint | On Clicked | -| description | text | "On Clicked" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| range | object | Cell range | +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ---------------------------- | +| code | entero largo | On Clicked | +| description | texto | "On Clicked" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Rango de celdas | - -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Clicked) diff --git a/website/translated_docs/es/Events/onCloseBox.md b/website/translated_docs/es/Events/onCloseBox.md index 5c0bff081375fc..dd80a1208fae40 100644 --- a/website/translated_docs/es/Events/onCloseBox.md +++ b/website/translated_docs/es/Events/onCloseBox.md @@ -3,27 +3,27 @@ id: onCloseBox title: On Close Box --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------- | -| 22 | Form | The window’s close box has been clicked | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ------------------------------------------------ | +| 22 | Formulario | Se ha presionado la caja de cierre de la ventana | -## Description +## Descripción -The `On Close Box` event is generated when the user clicks on the clos box of the window. +El evento `On Close Box` se genera cuando el usuario hace clic en una caja de cierre de la ventana. -### Example +### Ejemplo -This example shows how to respond to a close window event with a form used for record data entry: +Este ejemplo muestra cómo responder a un evento de cierre de ventana con un formulario utilizado para la entrada de datos de registro: ```4d - //Method for an input form + //Método para un formulario de entrada $vpFormTable:=Current form table Case of //... :(Form event code=On Close Box) If(Modified record($vpFormTable->)) - CONFIRM("This record has been modified. Save Changes?") + CONFIRM("Este registro ha sido modificado. Save Changes?") If(OK=1) ACCEPT Else diff --git a/website/translated_docs/es/Events/onCloseDetail.md b/website/translated_docs/es/Events/onCloseDetail.md index 5a456aceb2dd9e..0ed26091d5ab3a 100644 --- a/website/translated_docs/es/Events/onCloseDetail.md +++ b/website/translated_docs/es/Events/onCloseDetail.md @@ -3,14 +3,15 @@ id: onCloseDetail title: On Close Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | -------------------------------------------------------------- | -| 26 | Form - [List Box](FormObjects/listbox_overview.md) | You left the detail form and are going back to the output form | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------- | -------------------------------------------------------------------------- | +| 26 | Formulario - [List Box](FormObjects/listbox_overview.md) | Ha dejado el formulario detallado y está volviendo al formulario de salida | -## Description +## Descripción -The `On Close Detail` event can be used in the following contexts: +El evento `On Close Detail` puede utilizarse en los siguientes contextos: + +- **Formularios de salida**: el formulario detallado se cierra y el usuario vuelve al formulario listado. Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. +- List box [**de tipo selección**](FormObjects/listbox_overview.md#selection-list-boxes): este evento se genera cuando un registro mostrado en el [formulario detallado](FormObjects/properties_ListBox.md#detail-form-name) asociado a un list box de tipo selección está a punto de cerrarse (independientemente de que el registro se haya modificado o no). -- **Output forms**: the detail form is closed and the user goes back to the list form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record displayed in the [detail form](FormObjects/properties_ListBox.md#detail-form-name) associated with a selection type list box is about to be closed (regardless of whether or not the record was modified). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onCollapse.md b/website/translated_docs/es/Events/onCollapse.md index 607d1aa470deab..735631ce28e65b 100644 --- a/website/translated_docs/es/Events/onCollapse.md +++ b/website/translated_docs/es/Events/onCollapse.md @@ -3,16 +3,16 @@ id: onCollapse title: On Collapse --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been collapsed using a click or a keystroke | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| 44 | [Lista jerárquica](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | Un elemento de la lista jerárquica o del list box jerárquico se ha contraído por medio de un clic o una presión de tecla | -## Description +## Descripción -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is collapsed with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is collapsed. +- [Lista jerárquica](FormObjects/list_overview.md): este evento se genera cada vez que se colapsa un elemento de la lista jerárquica con un clic del ratón o una pulsación del teclado. +- [List box jerárquicos](FormObjects/listbox_overview.md#hierarchical-list-boxes): este evento se genera cuando se colapsa una línea del list box jerárquico. -### See also +### Ver también [On Expand](onExpand.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onColumnMoved.md b/website/translated_docs/es/Events/onColumnMoved.md index 32332a0da0266f..ef8a7f8e07fe42 100644 --- a/website/translated_docs/es/Events/onColumnMoved.md +++ b/website/translated_docs/es/Events/onColumnMoved.md @@ -3,13 +3,13 @@ id: onColumnMoved title: On Column Moved --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| 32 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box column is moved by the user via drag and drop | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| 32 | [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) | Una columna de list box es movida por el usuario por medio de arrastrar y soltar | -## Description +## Descripción -This event is generated when a column of the list box is moved by the user using drag and drop ([if allowed](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). It is not generated if the column is dragged and then dropped in its initial location. +Este evento se genera cuando una columna de list box es movida por el usuario utilizando la función de arrastrar y soltar ([si se permite](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). No se genera si la columna se arrastra y luego se suelta en su ubicación inicial. -The `LISTBOX MOVED COLUMN NUMBER` command returns the new position of the column. \ No newline at end of file +El comando `LISTBOX MOVED COLUMN NUMBER` devuelve la nueva posición de la columna. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onColumnResize.md b/website/translated_docs/es/Events/onColumnResize.md index 7f9a282deb0ae2..efa077b191283a 100644 --- a/website/translated_docs/es/Events/onColumnResize.md +++ b/website/translated_docs/es/Events/onColumnResize.md @@ -3,34 +3,33 @@ id: onColumnResize title: On Column Resize --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| 33 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | The width of a column is modified directly by the user or consequently to a form window resize | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| 33 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) | El ancho de una columna es modificado directamente por el usuario o en consecuencia de un redimensionamiento de la ventana del formulario | -## Description +## Descripción ### List Box -This event is generated when the width of a column in the list box is modified by a user. The event is triggered "live", *i.e.*, sent continuously during the event, for as long as the list box or column concerned is being resized. This resizing is performed manually by a user, or may occur as a result of the list box and its column(s) being resized along with the form window itself (whether the form is resized manually or using the `RESIZE FORM WINDOW` command). +Este evento se genera cuando el ancho de una columna en el list box es modificado por un usuario. El evento se activa "en directo", *es decir*, se envía continuamente durante el evento, mientras se redimensiona el list box o la columna en cuestión. Este redimensionamiento es realizado manualmente por un usuario, o puede ocurrir como resultado de que el list box y su(s) columna(s) sean redimensionados junto con la propia ventana del formulario (ya sea que el formulario sea redimensionado manualmente o utilizando el comando `RESIZE FORM WINDOW`). -> The `On Column Resize` event is not triggered when a [fake column](FormObjects/propertiesResizingOptions.html#about-the-fake-blank-column) is resized. +> El evento `On Column Resize` no se activa cuando se redimensiona una [falsa columna](FormObjects/propertiesResizingOptions.html#about-the-fake-blank-column). ### 4D View Pro -This event is generated when the width of a column is modified by a user. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Este evento se genera cuando el ancho de una columna es modificado por un usuario. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: -| Property | Type | Description | -| ----------- | ------- | ------------------------------------------------------------------- | -| code | longint | On Column Resize | -| description | text | "On Column Resize" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| range | object | Cell range of the columns whose widths have changed | -| header | boolean | True if the row header column (first column) is resized, else false | +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ----------------------------------------------------------------------------------------- | +| code | entero largo | On Column Resize | +| description | texto | "On Column Resize" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Rango de celdas de las columnas cuyo ancho ha cambiado | +| header | booleano | True si la columna de encabezado de línea (primera columna) se redimensiona, si no, false | - -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Column Resize) diff --git a/website/translated_docs/es/Events/onDataChange.md b/website/translated_docs/es/Events/onDataChange.md index 42ad72458ee0dd..0d8b0a3ed5677f 100644 --- a/website/translated_docs/es/Events/onDataChange.md +++ b/website/translated_docs/es/Events/onDataChange.md @@ -3,15 +3,16 @@ id: onDataChange title: On Data Change --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| 20 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) | An object data has been modified | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| 20 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Ãrea de Plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progresión](FormObjects/progressIndicator.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Sub-formulario](FormObjects/subform_overview.md) | Se han modificado los datos de un objeto | -## Description +## Descripción -When the `On Data Change` event property is selected for an object, you can detect and handle the change of the data source value, using the `FORM Event` command. +Cuando se selecciona la propiedad de evento `On Data Change` para un objeto, se puede detectar y manejar el cambio del valor de la fuente de datos, utilizando el comando `FORM Event`. -The event is generated as soon as the variable associated with the object is updated internally by 4D (i.e., in general, when the entry area of the object loses the focus). +El evento se genera en cuanto la variable asociada al objeto es actualizada internamente por 4D (es decir, en general, cuando la zona de entrada del objeto pierde el foco). + +> Con los [subformularios](FormObjects/subform_overview.md), el evento `On Data Change` se dispara cuando el valor de la variable del objeto subformulario ha sido modificado. -> With [subforms](FormObjects/subform_overview.md), the `On Data Change` event is triggered when the value of the variable of the subform object has been modified. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onDeactivate.md b/website/translated_docs/es/Events/onDeactivate.md index 46255c6142e223..00bd8619140414 100644 --- a/website/translated_docs/es/Events/onDeactivate.md +++ b/website/translated_docs/es/Events/onDeactivate.md @@ -3,17 +3,16 @@ id: onDeactivate title: On Deactivate --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------------------- | -| 12 | Form | The form’s window ceases to be the frontmost window | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ------------------------------------------------------- | +| 12 | Formulario | La ventana del formulario deja de ser la ventana activa | -## Description +## Descripción -If the window of a form was the frontmost window, this event is called when the window is sent to the background. +Si la ventana de un formulario era la ventana del primer plano, este evento es llamado cuando la ventana es enviada al fondo. -This event applies to the form as a whole and not to a particular object. Consequently, if the `On Deactivate` form event property is selected, only the form will have its form method called. - -### See also +Este evento se aplica al formulario en su conjunto y no a un objeto en particular. Por lo tanto, si se selecciona la propiedad de evento formulario `On Deactivate`, sólo se llamará al método formulario. +### Ver también [On Activate](onActivate.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onDeleteAction.md b/website/translated_docs/es/Events/onDeleteAction.md index 08370f06f0c64c..a80ef74ac95789 100644 --- a/website/translated_docs/es/Events/onDeleteAction.md +++ b/website/translated_docs/es/Events/onDeleteAction.md @@ -3,13 +3,13 @@ id: onDeleteAction title: On Delete Action --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------- | ----------------------------------- | -| 58 | [Hierarchical List](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) | The user attempts to delete an item | +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------- | --------------------------------------- | +| 58 | [Lista jerárquica](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) | El usuario intenta eliminar un elemento | -## Description +## Descripción -This event is generated each time a user attempts to delete the selected item(s) by pressing a deletion key (**Delete** or **Backspace**) or selecting a menu item whose associated standard action is 'Clear' (such as the **Clear** command in the **Edit** menu). +Este evento se genera cada vez que un usuario intenta eliminar los elementos seleccionados presionando una tecla de eliminación (**Borrar** o **Retroceso**) o seleccionando un elemento de menú cuya acción estándar asociada es "Borrar" (como el comando **Borrar** del menú **Edición**). -Note that generating the event is the only action carried out by 4D: the program does not delete any items. It is up to the developer to handle the deletion and any prior warning messages that are displayed. \ No newline at end of file +Tenga en cuenta que la generación del evento es la única acción que realiza 4D: el programa no borra ningún elemento. Es el desarrollador quien debe gestionar el borrado y los mensajes de advertencia previos que se muestren. diff --git a/website/translated_docs/es/Events/onDisplayDetail.md b/website/translated_docs/es/Events/onDisplayDetail.md index 2976e27a159561..39219b82fe8e2d 100644 --- a/website/translated_docs/es/Events/onDisplayDetail.md +++ b/website/translated_docs/es/Events/onDisplayDetail.md @@ -3,36 +3,38 @@ id: onDisplayDetail title: On Display Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| 8 | Form - [List Box](FormObjects/listbox_overview.md) | A record is about to be displayed in a list form or a row is about to be displayed in a list box. | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| 8 | Formulario - [List Box](FormObjects/listbox_overview.md) | Un registro está a punto de ser mostrado en un formulario lista o una línea está a punto de ser mostrada en un list box. | -## Description +## Descripción -The `On Display Detail` event can be used in the following contexts: +El evento `On Display Detail` puede utilizarse en los siguientes contextos: -### Output form +### Formulario de salida -A record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +Un registro está a punto de ser visualizado en un formulario de lista que se muestra vía `DISPLAY SELECTION` y `MODIFY SELECTION`. -> This event cannot be selected for project forms, it is only available with **table forms**. +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. -In this context, the following sequence of calls to methods and form events is triggered: +En este contexto, se desencadena la siguiente secuencia de llamadas a métodos y eventos de formulario: -- For each record: - - For each object in the detail area: - - Object method with `On Display Detail` event - - Form method with `On Display Detail` event +- Para cada registro: + - Para cada objeto en el área detallada: + - Método objeto con el evento `On Display Detail` + - Método formulario con el evento `On Display Detail` -> The header area is handled using the [`On Header`](onHeader.md) event. +> El área del encabezado se maneja con el evento [`On Header`](onHeader.md). -Calling a 4D command that displays a dialog box from the `On Display Detail` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. +Llamar a un comando 4D que muestra una caja de diálogo desde el evento `On Display Detail` no está permitido y provocará un error de sintaxis. Más concretamente, los comandos en cuestión son: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION` y `MODIFY SELECTION`. -### Selection list box -This event is generated when a row of a [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes) list box is displayed. +### List box selección -### Displayed line number +Este evento se genera cuando se muestra una línea de list box [**de tipo selección**](FormObjects/listbox_overview.md#selection-list-boxes). -The `Displayed line number` 4D command works with the `On Display Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file + +### Número de línea mostrado + +El comando 4D `Número de línea mostrado` funciona con el evento formulario `On Display Detail`. Devuelve el número de la línea que se está procesando mientras se visualiza en pantalla una lista de registros o de líneas de list box. diff --git a/website/translated_docs/es/Events/onDoubleClicked.md b/website/translated_docs/es/Events/onDoubleClicked.md index 33081b0fa91d48..0e4666b02450b8 100644 --- a/website/translated_docs/es/Events/onDoubleClicked.md +++ b/website/translated_docs/es/Events/onDoubleClicked.md @@ -3,33 +3,32 @@ id: onDoubleClicked title: On Double Clicked --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | -| 13 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A double click occurred on an object | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | +| 13 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Se ha efectuado un doble clic en un objeto | -## Description +## Descripción -The `On Double Clicked` event is generated when the user double-clicks on an object. The maximum length of time separating a double-click is defined in the system preferences. +El evento `On Double Clicked` se genera cuando el usuario hace doble clic en un objeto. El tiempo máximo de separación de un doble clic se define en las preferencias del sistema. -If the [`On Clicked`](onClicked.md) or `On Double Clicked` onDoubleClicked.md object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns [`On Clicked`](onClicked.md) or `On Double Clicked`, depending on the case. +Si la propiedad [`On Clicked`](onClicked.md) o `On Double Clicked` de evento de objeto de onDoubleClicked.md está seleccionada para un objeto, puede detectar y manejar los clics dentro o sobre el objeto, utilizando el comando `FORM event` que devuelve [`On Clicked`](onClicked.md) o `On Double Clicked`, dependiendo del caso. -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +Si se seleccionan ambos eventos para un objeto, se generará el evento `On Clicked` y luego el evento `On Double Clicked` cuando el usuario haga doble clic en el objeto. ### 4D View Pro -This event is generated when the user doubl-clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Este evento se genera cuando el usuario hace doble clic en cualquier parte en un documento 4D View Pro. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: -| Property | Type | Description | -| ----------- | ------- | ------------------------------ | -| code | longint | 13 | -| description | text | "On Double Clicked" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| range | object | Cell range | +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ---------------------------- | +| code | entero largo | 13 | +| description | texto | "On Double Clicked" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Rango de celdas | - -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Double Clicked) diff --git a/website/translated_docs/es/Events/onDragOver.md b/website/translated_docs/es/Events/onDragOver.md index ec949d63a8fc21..86a08cc5986f1b 100644 --- a/website/translated_docs/es/Events/onDragOver.md +++ b/website/translated_docs/es/Events/onDragOver.md @@ -3,28 +3,28 @@ id: onDragOver title: On Drag Over --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 21 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data could be dropped onto an object | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | +| 21 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) -[List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Imagen del menú emergente](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Los datos se pueden soltar en un objeto | -## Description +## Descripción -The `On Drag Over` event is repeatedly sent to the destination object when the mouse pointer is moved over the object. In response to this event, you usually: +El evento `On Drag Over` se envía repetidamente al objeto de destino cuando el puntero del ratón se mueve sobre el objeto. Normalmente, en respuesta a este evento: -- Get the data and signatures found in the pasteboard (via the `GET PASTEBOARD DATA` command). -- Depending on the nature and type of data in the pasteboard, you **accept** or **reject** the drag and drop. +- Obtenga los datos y las firmas que se encuentran en portapapeles (mediante el comando `GET PASTEBOARD DATA`). +- Según la naturaleza y el tipo de datos en el portapapeles, se **acepta** o **rechaza** el arrastrar y soltar. -To **accept** the drag, the destination object method must return 0 (zero), so you write `$0:=0`. To **reject** the drag, the object method must return -1 (minus one), so you write `$0:=-1`. During an `On Drag Over` event, 4D treats the object method as a function. If no result is returned, 4D assumes that the drag is accepted. +Para **aceptar** el arrastre, el método del objeto destino debe devolver 0 (cero), por lo que se escribe `$0:=0`. Para **rechazar** el arrastre, el método del objeto debe devolver -1 (menos uno), por lo que se escribe `$0:=-1`. Durante un evento `On Drag Over`, 4D trata el método objeto como una función. Si no se devuelve ningún resultado, 4D asume que el arrastre es aceptado. -If you accept the drag, the destination object is highlighted. If you reject the drag, the destination is not highlighted. Accepting the drag does not mean that the dragged data is going to be inserted into the destination object. It only means that if the mouse button was released at this point, the destination object would accept the dragged data and the [`On Drop`](onDrop.md) event would be fired. +Si acepta el arrastre, el objeto de destino se resalta. Si rechaza el arrastre, el destino no se resalta. Aceptar el arrastre no significa que los datos arrastrados vayan a ser insertados en el objeto de destino. Esto sólo significa que si se soltara el botón del ratón en este punto, el objeto de destino aceptaría los datos arrastrados y se dispararía el evento [`On Drop`](onDrop.md). -If you do not process the `On Drag Over` event for a droppable object, that object will be highlighted for all drag over operations, no matter what the nature and type of the dragged data. +Si no se procesa el evento `On Drag Over` para un objeto soltable, ese objeto será resaltado para todas las operaciones de arrastre, sin importar la naturaleza y el tipo de los datos arrastrados. -The `On Drag Over` event is the means by which you control the first phase of a drag-and-drop operation. Not only can you test whether the dragged data is of a type compatible with the destination object, and then accept or reject the drag; you can simultaneously notify the user of this fact, because 4D highlights (or not) the destination object, based on your decision. +El evento `On Drag Over` es el medio por el que se controla la primera fase de una operación de arrastrar y soltar. No sólo puede probar si los datos arrastrados son de un tipo compatible con el objeto de destino, y luego aceptar o rechazar el arrastre; puede notificar simultáneamente al usuario de este hecho, porque 4D resalta (o no) el objeto de destino, basándose en su decisión. -The code handling an `On Drag Over` event should be short and execute quickly, because that event is sent repeatedly to the current destination object, due to the movements of the mouse. +El código que maneja un evento `On Drag Over` debe ser corto y ejecutarse rápidamente, porque ese evento se envía repetidamente al objeto de destino actual, debido a los movimientos del ratón. -#### See also +#### Ver también [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onDrop.md b/website/translated_docs/es/Events/onDrop.md index 7a8914c071042d..189422bd5ca327 100644 --- a/website/translated_docs/es/Events/onDrop.md +++ b/website/translated_docs/es/Events/onDrop.md @@ -3,17 +3,18 @@ id: onDrop title: On Drop --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 16 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data has been dropped onto an object | +| Code | Puede ser llamado por | Definición | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| 16 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna List Box](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Los datos se han depositado en un objeto | -## Description +## Descripción -The `On Drop` event is sent once to the destination object when the mouse pointer is released over the object. This event is the second phase of the drag-and-drop operation, in which you perform an operation in response to the user action. +El evento `On Drop` se envía una vez al objeto de destino cuando el puntero del ratón se mueve sobre el objeto. Este evento es la segunda fase de la operación de arrastrar y soltar, en la que se realiza una operación en respuesta a la acción del usuario. -This event is not sent to the object if the drag was not accepted during the [`On Drag Over`](onDragOver.md) events. If you process the `On Drag Over` event for an object and reject a drag, the `On Drop` event does not occur. Thus, if during the `On Drag Over` event you have tested the data type compatibility between the source and destination objects and have accepted a possible drop, you do not need to re-test the data during the `On Drop`. You already know that the data is suitable for the destination object. +Este evento no se envía al objeto si el arrastre no fue aceptado durante los eventos [`On Drag Over`](onDragOver.md). Si se procesa el evento `On Drag Over` para un objeto y se rechaza un arrastre, no se produce el evento `On Drop`. Así, si durante el evento `On Drag Over` se ha probado la compatibilidad de los tipos de datos entre los objetos origen y destino y se ha aceptado una posible caída, no es necesario volver a comprobar los datos durante el evento `On Drop`. Ya sabe que los datos son adecuados para el objeto de destino. -#### See also + +#### Ver también [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onEndUrlLoading.md b/website/translated_docs/es/Events/onEndUrlLoading.md index 03e029d8a18fde..083a7f07658bb7 100644 --- a/website/translated_docs/es/Events/onEndUrlLoading.md +++ b/website/translated_docs/es/Events/onEndUrlLoading.md @@ -3,11 +3,11 @@ id: onEndUrlLoading title: On End URL Loading --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | --------------------------------------------- | -| 49 | [Web Area](FormObjects/webArea_overview.md) | All the resources of the URL have been loaded | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | ------------------------------------------- | +| 49 | [Ãrea Web](FormObjects/webArea_overview.md) | Se han cargado todos los recursos de la URL | -## Description +## Descripción -This event is generated once the loading of all resources of the URL is complete. You can call the `WA Get current URL` command in order to find out the URL that was loaded. \ No newline at end of file +Este evento se genera una vez que se ha completado la carga de todos los recursos de la URL. Puedes llamar al comando `WA Get current URL` para conocer la URL que se cargó. diff --git a/website/translated_docs/es/Events/onExpand.md b/website/translated_docs/es/Events/onExpand.md index 67db2ebde546e7..6af77e12c7c3e3 100644 --- a/website/translated_docs/es/Events/onExpand.md +++ b/website/translated_docs/es/Events/onExpand.md @@ -3,16 +3,16 @@ id: onExpand title: On Expand --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been expanded using a click or a keystroke | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| 44 | [Lista jerárquica](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | Un elemento de la lista jerárquica o del list box jerárquico se ha expandido por medio de un clic o una tecla | -## Description +## Descripción -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is expanded with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is expanded. +- [Lista jerárquica](FormObjects/list_overview.md): este evento se genera cada vez que se expande un elemento de la lista jerárquica con un clic del ratón o una pulsación del teclado. +- [List box jerárquicos](FormObjects/listbox_overview.md#hierarchical-list-boxes): este evento se genera cuando se expande una línea del list box jerárquico. -### See also +### Ver también [On Collapse](onCollapse.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onFooterClick.md b/website/translated_docs/es/Events/onFooterClick.md index f015de2e130e02..c80ee50af94358 100644 --- a/website/translated_docs/es/Events/onFooterClick.md +++ b/website/translated_docs/es/Events/onFooterClick.md @@ -3,13 +3,13 @@ id: onFooterClick title: On Footer Click --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| 57 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in the footer of a list box column | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | +| 57 | [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) | Se produce un clic en el pie de una columna de list box | -## Description +## Descripción -This event is available for a list box or list box column object. It is generated when a click occurs in the footer of a list box column. In this context, the `OBJECT Get pointer` command returns a pointer to the variable of the footer that is clicked. The event is generated for both left and right clicks. +Este evento está disponible para un objeto list box o columna de list box. Se genera cuando se produce un clic en el pie de una columna del list box. En este contexto, el comando `OBJECT Get pointer` devuelve un puntero a la variable del pie de página que se ha presionado. El evento se genera tanto para los clics izquierdos como para los derechos. -You can test the number of clicks made by the user by means of the `Clickcount` command. \ No newline at end of file +Puede probar el número de clics realizados por el usuario mediante el comando `Clickcount`. diff --git a/website/translated_docs/es/Events/onGettingFocus.md b/website/translated_docs/es/Events/onGettingFocus.md index 7063146ae5d77c..0913f49ce3291c 100644 --- a/website/translated_docs/es/Events/onGettingFocus.md +++ b/website/translated_docs/es/Events/onGettingFocus.md @@ -3,13 +3,13 @@ id: onGettingFocus title: On Getting focus --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| 15 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is getting the focus | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | +| 15 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subformulario](FormObjects/subform_overview.md) - [Ãrea Web](FormObjects/webArea_overview.md) | Un objeto formulario recibe el foco | -## Description +## Descripción -The `On Getting Focus` event, along with the [`On losing Focus`](onLosingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +Los eventos `On Getting Focus` y [`On losing Focus`](onLosingFocus.md), se utilizan para detectar y manejar el cambio de foco de los objetos [focalizables](FormObjects/properties_Entry.md#focusable). -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +Con los [objetos subformulario](FormObjects/subform_overview.md), este evento se genera en el método del objeto subformulario cuando se verifica. Se envía al método formulario del subformulario, lo que significa, por ejemplo, que se puede gestionar la visualización de los botones de navegación en el subformulario en función del foco. Tenga en cuenta que los objetos de subformulario pueden tener ellos mismos el foco. diff --git a/website/translated_docs/es/Events/onHeader.md b/website/translated_docs/es/Events/onHeader.md index f0f7bee62222a3..a1710b2a758076 100644 --- a/website/translated_docs/es/Events/onHeader.md +++ b/website/translated_docs/es/Events/onHeader.md @@ -3,23 +3,23 @@ id: onHeader title: On Header --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| 5 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form (list form only) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form's header area is about to be printed or displayed. | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| 5 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario (formulario lista únicamente) - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El área del encabezado del formulario está a punto de imprimirse o mostrarse. | -## Description +## Descripción -The `On Header` event is called when a record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +El evento `On Header` se llama cuando un registro está a punto de ser visualizado en un formulario de lista que se muestra vía `DISPLAY SELECTION` y `MODIFY SELECTION`. -> This event cannot be selected for project forms, it is only available with **table forms**. +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. -In this context, the following sequence of calls to methods and form events is triggered: +En este contexto, se desencadena la siguiente secuencia de llamadas a métodos y eventos de formulario: -- For each object in the header area: - - Object method with `On Header` event - - Form method with `On Header` event +- Para cada objeto en el área del encabezado: + - Método objeto con el evento `On Header` + - Método formulario con el evento `On Header` -> Printed records are handled using the [`On Display Detail`](onDisplayDetail.md) event. +> Los registros impresos se gestionan mediante el evento [`On Display Detail`](onDisplayDetail.md). -Calling a 4D command that displays a dialog box from the `On Header` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. \ No newline at end of file +Llamar a un comando 4D que muestra una caja de diálogo desde el evento `On Header` no está permitido y provocará un error de sintaxis. Más concretamente, los comandos en cuestión son: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION` y `MODIFY SELECTION`. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onHeaderClick.md b/website/translated_docs/es/Events/onHeaderClick.md index 9d74656f7f8a3e..d21f2ab2a5007b 100644 --- a/website/translated_docs/es/Events/onHeaderClick.md +++ b/website/translated_docs/es/Events/onHeaderClick.md @@ -3,143 +3,38 @@ id: onHeaderClick title: On Header Click --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 42 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in a column header | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | +| 42 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) | Se produce un clic en el encabezado de columna | -## Description +## Descripción ### List Box -This event is generated when a click occurs on the header of a column in the list box. In this case, the `Self` command lets you find out the header of the column that was clicked. +Este evento se genera cuando se hace clic en el encabezado de una columna de list box. En este caso, el comando `Self` permite identificar el encabezado de la columna sobre la que se ha hecho clic. -> The [`On Clicked`](onClicked.md) event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a column or column header. You can test the number of clicks made by the user by means of the `Clickcount` command. +Si se seleccionó la propiedad [Sortable](FormObjects/properties_Action.md#sortable) para el list box, se puede decidir si se autoriza o no una ordenación estándar de la columna pasando el valor 0 o -1 en la variable `$0`: -If the [Sortable](FormObjects/properties_Action.md#sortable) property was selected for the list box, you can decide whether or not to authorize a standard sort of the column by passing the value 0 or -1 in the `$0` variable: +- Si `$0` es igual a 0, se realiza una ordenación estándar. +- Si `$0` es igual a -1, no se realiza una ordenación estándar y el encabezado no muestra la flecha de ordenación. El desarrollador puede seguir generando una ordenación de columnas basada en criterios de ordenación personalizados utilizando el lenguaje 4D. -- If `$0` equals 0, a standard sort is performed. -- If `$0` equals -1, a standard sort is not performed and the header does not display the sort arrow. The developer can still generate a column sort based on customized sort criteria using the 4D language. - -If the [Sortable](FormObjects/properties_Action.md#sortable) property is not selected for the list box, the `$0` variable is not used. +Si la propiedad [Sortable](FormObjects/properties_Action.md#sortable) no está seleccionada para el list box, la variable `$0` no se utiliza. ### 4D View Pro -This event is generated when the user clicks on a column or row header in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Este evento se genera cuando el usuario hace clic en el encabezado de una columna o línea en un documento 4D View Pro. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Property - - Type - - Description -
    - code - - longint - - 42 -
    - description - - text - - "On Header Click" -
    - objectName - - text - - 4D View Pro area name -
    - sheetName - - text - - Name of the sheet of the event -
    - range - - object - - Cell range -
    - sheetArea - - longint - - The sheet location where the event took place:
    - -
  • - 0: The crossing area between column number/letter headers (top left of the sheet) -
  • - -
  • - 1: The column headers (area indicating the column numbers/letters) -
  • - -
  • - 2: The row headers (area indicating the row numbers) -
  • -
    +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | +| code | entero largo | 42 | +| description | texto | "On Header Click" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Rango de celdas | +| sheetArea | entero largo | La ubicación de la hoja donde tuvo lugar el evento:
  • 0: el área de cruce entre el número de columna/encabezado de letra (parte superior izquierda de la hoja)
  • 1: los encabezados de las columnas (área que indica los números/letras de las columnas)
  • 2: los encabezados de línea (área que indica los números de línea)
  • | -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Header Click) diff --git a/website/translated_docs/es/Events/onLoad.md b/website/translated_docs/es/Events/onLoad.md index 863e12e130562a..8c11ff6fa49d2d 100644 --- a/website/translated_docs/es/Events/onLoad.md +++ b/website/translated_docs/es/Events/onLoad.md @@ -3,23 +3,25 @@ id: onLoad title: On Load --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -| 1 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be displayed or printed | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | +| 1 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subformulario](FormObjects/subform_overview.md) - [Pestaña](FormObjects/tabControl.md) - [Ãrea Web](FormObjects/webArea_overview.md) | El formulario está a punto de ser mostrado o impreso | -## Description +## Descripción -This event is triggered when the form is being loaded or printed. +Este evento se activa cuando el formulario se está cargando o imprimiendo. -All the objects of the form (from any page) whose `On Load` object event property is selected will have their object method called. Then, if the `On Load` form event property is selected, the form will have its form method called. +Todos los objetos del formulario (de cualquier página) cuya propiedad de evento `On Load` esté seleccionada tendrán su método objeto llamado. Entonces, si se selecciona la propiedad de evento formulario `On Load`, se llamará al método formulario. -> The `On Load` and [`On Unload`](onUnload.md) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> Los eventos `On Load` y [`On Unload`](onUnload.md) se generan para los objetos si están activados tanto para los objetos como para el formulario al que pertenecen los objetos. Si los eventos están activados sólo para los objetos, no se producirán; estos dos eventos también deben estar activados a nivel del formulario. -### Subform -The `On Load` event is generated when opening the subform (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is displayed (and not when the form is displayed). +### Subformulario -### See also +El evento `On Load` se genera al abrir el subformulario (este evento debe haberse activado también a nivel del formulario padre para que se tenga en cuenta). El evento se genera antes que los del formulario padre. Tenga en cuenta también que, de acuerdo con los principios de funcionamiento de los eventos de formulario, si el subformulario se coloca en una página distinta de la página 0 o 1, este evento sólo se generará cuando se muestre esa página (y no cuando se muestre el formulario). + + +### Ver también [`On Unload`](onUnload.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onLoadRecord.md b/website/translated_docs/es/Events/onLoadRecord.md index d7813d894670ff..9af406cd2b2ecb 100644 --- a/website/translated_docs/es/Events/onLoadRecord.md +++ b/website/translated_docs/es/Events/onLoadRecord.md @@ -3,13 +3,16 @@ id: onLoadRecord title: On Load Record --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------------------- | -| 40 | Form | During user entry in list, a record is loaded and a field is edited | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ------------------------------------------------------------------------------------ | +| 40 | Formulario | Durante la entrada del usuario en la lista, se carga un registro y se edita un campo | -## Description +## Descripción + +El evento `On Load Record` sólo puede utilizarse en el contexto de un **formulario de salida**. Se activa durante la entrada de datos en la lista, después de que se resalte un registro y un campo pase al modo de edición. + +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. + -The `On Load Record` event can only be used in the context of an **output form**. It is triggered during data entry in list, after a record is highlighted and a field changes to editing mode. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onLongClick.md b/website/translated_docs/es/Events/onLongClick.md index 2eb6ab55c59578..1e8c38f0357033 100644 --- a/website/translated_docs/es/Events/onLongClick.md +++ b/website/translated_docs/es/Events/onLongClick.md @@ -3,29 +3,28 @@ id: onLongClick title: On Long Click --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------- | ------------------------------------------------------------------------------------ | -| 39 | [Button](FormObjects/button_overview.md) | A button is clicked and the mouse button remains pushed for a certain length of time | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------- | -------------------------------------------------------------------------------------------- | +| 39 | [Botón](FormObjects/button_overview.md) | Se presiona un botón y el botón del ratón permanece presionado durante un tiempo determinado | -## Description +## Descripción -This event is generated when a button receives a click and the mouse button is held for a certain length of time. In theory, the length of time for which this event is generated is equal to the maximum length of time separating a double-click, as defined in the system preferences. +Este evento se genera cuando un botón recibe un clic y el botón del ratón se mantiene presionado durante un cierto tiempo. En teoría, el tiempo durante el cual se genera este evento es igual al tiempo máximo que separa un doble clic, definido en las preferencias del sistema. -This event can be generated for the following button styles: +Este evento se puede generar para los siguientes estilos de botones: -- [Toolbar](FormObjects/button_overview.md#toolbar) +- [Barra de herramientas](FormObjects/button_overview.md#toolbar) - [Bevel](FormObjects/button_overview.md#bevel) -- [Rounded Bevel](FormObjects/button_overview.md#rounded-bevel) +- [Bevel redondeado](FormObjects/button_overview.md#rounded-bevel) - [OS X Gradient](FormObjects/button_overview.md#os-x-gradient) -- [OS X Textured](FormObjects/button_overview.md#os-x-textured) +- [OS X Texturizado](FormObjects/button_overview.md#os-x-textured) - [Office XP](FormObjects/button_overview.md#office-xp) -- [Help](FormObjects/button_overview.md#help) -- [Circle](FormObjects/button_overview.md#circle) -- [Custom](FormObjects/button_overview.md#custom) +- [Ayuda](FormObjects/button_overview.md#help) +- [Círculo](FormObjects/button_overview.md#circle) +- [Personalizado](FormObjects/button_overview.md#custom) -This event is generally used to display pop-up menus in case of long button clicks. The [`On Clicked`](onClicked.md) event, if enabled, is generated if the user releases the mouse button before the "long click" time limit. - -### See also +Este evento se utiliza generalmente para mostrar menús emergentes en caso de presiones prolongadas en los botones. El evento [`On Clicked`](onClicked.md), si está activo, se genera si el usuario suelta el botón del ratón antes del límite de tiempo del "clic largo". +### Ver también [`On Alternative Click`](onAlternativeClick.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onLosingFocus.md b/website/translated_docs/es/Events/onLosingFocus.md index daff4171a605d7..00ce3adaade7b2 100644 --- a/website/translated_docs/es/Events/onLosingFocus.md +++ b/website/translated_docs/es/Events/onLosingFocus.md @@ -3,13 +3,13 @@ id: onLosingFocus title: On Losing focus --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 14 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is losing the focus | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | +| 14 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subformulario](FormObjects/subform_overview.md) - [Ãrea Web](FormObjects/webArea_overview.md) | Un objeto formulario pierde el foco | -## Description +## Descripción -The `On Losing Focus` event, along with the [`On Getting Focus`](onGettingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +Los eventos `On Losing Focus` y [`On Getting Focus`](onGettingFocus.md), se utilizan para detectar y manejar el cambio de foco de los objetos [focalizables](FormObjects/properties_Entry.md#focusable). -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +Con los [objetos subformulario](FormObjects/subform_overview.md), este evento se genera en el método del objeto subformulario cuando se verifica. Se envía al método formulario del subformulario, lo que significa, por ejemplo, que se puede gestionar la visualización de los botones de navegación en el subformulario en función del foco. Tenga en cuenta que los objetos de subformulario pueden tener ellos mismos el foco. diff --git a/website/translated_docs/es/Events/onMenuSelected.md b/website/translated_docs/es/Events/onMenuSelected.md index fde928f8373807..b73fb55b4ae145 100644 --- a/website/translated_docs/es/Events/onMenuSelected.md +++ b/website/translated_docs/es/Events/onMenuSelected.md @@ -3,13 +3,13 @@ id: onMenuSelected title: On Menu Selected --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------ | -| 18 | Form | A menu item has been chosen in the associated menu bar | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | --------------------------------------------------------------- | +| 18 | Formulario | Se ha elegido un elemento de menú en la barra de menús asociada | -## Description +## Descripción -The `On Menu Selected` event is sent to the form method when a command of a menu bar associated to the form is selected. You can then call the `Menu selected` language command to test the selected menu. +El evento `On Menu Selected` se envía al método del formulario cuando se selecciona un comando de una barra de menú asociada al formulario. A continuación, puede llamar al comando `Menú seleccionado` para probar el menú seleccionado. -> You can associate a menu bar with a form in the Form properties. The menus on a form menu bar are appended to the current menu bar when the form is displayed as an output form in the Application environment. \ No newline at end of file +> Puede asociar una barra de menú a un formulario en las propiedades del mismo. Los menús de una barra de menús de un formulario se añaden a la barra de menús actual cuando el formulario se muestra como un formulario de salida en el entorno Aplicación. diff --git a/website/translated_docs/es/Events/onMouseEnter.md b/website/translated_docs/es/Events/onMouseEnter.md index 150038ccbd21a4..8b0bb8c4baee8d 100644 --- a/website/translated_docs/es/Events/onMouseEnter.md +++ b/website/translated_docs/es/Events/onMouseEnter.md @@ -3,24 +3,25 @@ id: onMouseEnter title: On Mouse Enter --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 35 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor enters the graphic area of an object | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- | +| 35 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El cursor del ratón entra en el área gráfica de un objeto | -## Description +## Descripción -This event is generated once, when the mouse cursor enters the graphic area of a form object. +Este evento se genera una vez, cuando el cursor del ratón entra en el área gráfica de un objeto del formulario. -The `On Mouse Enter` event updates the *MouseX* and *MouseY* system variables. +El evento `On Mouse Enter` actualiza las variables sistema *MouseX* y *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Los objetos que se hacen invisibles utilizando el comando `OBJECT SET VISIBLE` o la propiedad [Visibilidad](FormObjects/properties_Display.md#visibility) no generan este evento. -### Calling stack -If the `On Mouse Enter` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Llamar la pila -### See also +Si se ha marcado el evento `On Mouse Enter` para el formulario, se genera para cada objeto de formulario. Si se verifica para un objeto, se genera sólo para ese objeto. Cuando hay objetos superpuestos, el evento es generado por el primer objeto capaz de gestionarlo que se encuentra yendo en orden del nivel superior al inferior. + +### Ver también - [`On Mouse Move`](onMouseMove.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onMouseLeave.md b/website/translated_docs/es/Events/onMouseLeave.md index bd7f5522cbcee5..01dbb05e4cb776 100644 --- a/website/translated_docs/es/Events/onMouseLeave.md +++ b/website/translated_docs/es/Events/onMouseLeave.md @@ -3,24 +3,25 @@ id: onMouseLeave title: On Mouse Leave --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 36 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor leaves the graphic area of an object | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | +| 36 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El cursor del ratón sake del área gráfica de un objeto | -## Description +## Descripción -This event is generated once when the mouse cursor leaves the graphic area of an object. +Este evento se genera una vez cuando el cursor del ratón abandona el área gráfica de un objeto. -The `On Mouse Leave` event updates the *MouseX* and *MouseY* system variables. +El evento `On Mouse Leave` actualiza las variables sistema *MouseX* y *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Los objetos que se hacen invisibles utilizando el comando `OBJECT SET VISIBLE` o la propiedad [Visibilidad](FormObjects/properties_Display.md#visibility) no generan este evento. -### Calling stack -If the `On Mouse Leave` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Llamar la pila -### See also +Si se ha marcado el evento `On Mouse Leave` para el formulario, se genera para cada objeto de formulario. Si se verifica para un objeto, se genera sólo para ese objeto. Cuando hay objetos superpuestos, el evento es generado por el primer objeto capaz de gestionarlo que se encuentra yendo en orden del nivel superior al inferior. + +### Ver también - [`On Mouse Move`](onMouseMove.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onMouseMove.md b/website/translated_docs/es/Events/onMouseMove.md index 042421a96b3ad6..8c442729155046 100644 --- a/website/translated_docs/es/Events/onMouseMove.md +++ b/website/translated_docs/es/Events/onMouseMove.md @@ -3,29 +3,30 @@ id: onMouseMove title: On Mouse Move --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| 37 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor moves at least one pixel OR a modifier key (Shift, Alt/Option, Shift Lock) was pressed | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | +| 37 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El cursor del ratón se mueve al menos un píxel O se ha presionado una tecla de modificación (Shift, Alt/Option, Shift Lock) | -## Description +## Descripción -This event is generated: +Se genera este evento: -- when the mouse cursor moves at least one pixel -- OR when a modifier key (**Shift**, **Alt/Option**, **Shift Lock**) was pressed. This makes it possible to manage copy- or move-type drag-and-drop operations. +- cuando el cursor del ratón se mueve al menos un píxel +- O cuando se ha presionado una tecla de modificación (**Mayús**, **Alt/Opción**, **Bloq Mayús**). Esto permite gestionar las operaciones de arrastrar y soltar de tipo copiar o mover. -If the event is checked for an object only, it is generated only when the cursor is within the graphic area of the object. +Si el evento se marca para un objeto solamente, se genera sólo cuando el cursor está dentro del área gráfica del objeto. -The `On Mouse Move` event updates the *MouseX* and *MouseY* system variables. +El evento `On Mouse Move` actualiza las variables sistema *MouseX* y *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Los objetos que se hacen invisibles utilizando el comando `OBJECT SET VISIBLE` o la propiedad [Visibilidad](FormObjects/properties_Display.md#visibility) no generan este evento. -### Calling stack -If the `On Mouse Move` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Llamar la pila -### See also +Si se ha marcado el evento `On Mouse Move` para el formulario, se genera para cada objeto de formulario. Si se verifica para un objeto, se genera sólo para ese objeto. Cuando hay objetos superpuestos, el evento es generado por el primer objeto capaz de gestionarlo que se encuentra yendo en orden del nivel superior al inferior. + +### Ver también - [`On Mouse Enter`](onMouseEnter.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onMouseUp.md b/website/translated_docs/es/Events/onMouseUp.md index f845d601984c58..73c57572bfeec8 100644 --- a/website/translated_docs/es/Events/onMouseUp.md +++ b/website/translated_docs/es/Events/onMouseUp.md @@ -3,17 +3,17 @@ id: onMouseUp title: On Mouse Up --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| 2 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) | The user has just released the left mouse button in a Picture object | +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| 2 | [Ãrea de entrada](FormObjects/input_overview.md) de [Tipo](FormObjects/properties_Object.md#type) `imagen` | El usuario acaba de soltar el botón izquierdo del ratón en un objeto Imagen | -## Description +## Descripción -The `On Mouse Up` event is generated when the user has just released the left mouse button while dragging in a picture input. This event is useful, for example, when you want the user to be able to move, resize or draw objects in a SVG area. +El evento `On Mouse Up` se genera cuando el usuario acaba de soltar el botón izquierdo del ratón mientras arrastra una imagen. Este evento es útil, por ejemplo, cuando se desea que el usuario pueda mover, redimensionar o dibujar objetos en un área SVG. -When the `On Mouse Up` event is generated, you can get the local coordinates where the mouse button was released. These coordinates are returned in the `MouseX` and `MouseY` System variables. The coordinates are expressed in pixels with respect to the top left corner of the picture (0,0). +Cuando se genera el evento `On Mouse Up`, puede obtener las coordenadas locales donde se soltó el botón del ratón. Estas coordenadas se devuelven en las variables sistema `MouseX` y `MouseY`. Las coordenadas se expresan en píxeles con respecto a la esquina superior izquierda de la imagen (0,0). -When using this event, you must also use the `Is waiting mouse up` command to handle cases where the "state manager" of the form is desynchronized, i.e. when the `On Mouse Up` event is not received after a click. This is the case for example when an alert dialog box is displayed above the form while the mouse button has not been released. For more information and an example of use of the `On Mouse Up` event, please refer to the description of the `Is waiting mouse up` command. +Cuando se utiliza este evento, también hay que utilizar el comando `Is waiting mouse up` para manejar los casos en los que el "gestor de estado" del formulario está desincronizado, es decir, cuando el evento `On Mouse Up` no se recibe después de un clic. Este es el caso, por ejemplo, cuando se muestra una caja de diálogo de alerta sobre el formulario mientras no se ha soltado el botón del ratón. Para más información y un ejemplo de uso del evento `On Mouse Up`, consulte la descripción del comando `Is waiting mouse up`. -> If the [Draggable](FormObjects/properties_Action.md#draggable) option is enabled for the picture object, the `On Mouse Up` event is never generated. \ No newline at end of file +> Si la opción [Draggable](FormObjects/properties_Action.md#draggable) está activada para el objeto imagen, el evento `On Mouse Up` nunca se genera. diff --git a/website/translated_docs/es/Events/onOpenDetail.md b/website/translated_docs/es/Events/onOpenDetail.md index d2481f342aecd1..201d9018cfbdf0 100644 --- a/website/translated_docs/es/Events/onOpenDetail.md +++ b/website/translated_docs/es/Events/onOpenDetail.md @@ -3,18 +3,19 @@ id: onOpenDetail title: On Open Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| 25 | Form - [List Box](FormObjects/listbox_overview.md) | The detail form associated with the output form or with the list box is about to be opened. | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| 25 | Formulario - [List Box](FormObjects/listbox_overview.md) | El formulario detallado asociado al formulario de salida o al list box está a punto de abrirse. | -## Description +## Descripción -The `On Open Detail` event can be used in the following contexts: +El evento `On Open Detail` puede utilizarse en los siguientes contextos: -- **Output forms**: A record is about to be displayed in the detail form associated with the output form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record is about to be displayed in the detail form associated with a list box of the selection type (and before this form is opened). +- **Formularios de salida**: un registro está a punto de ser mostrado en el formulario detallado asociado al formulario de salida. Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. +- List box [**de tipo selección**](FormObjects/listbox_overview.md#selection-list-boxes): este evento se genera cuando se va a mostrar un registro en el formulario detallado asociado a un list box del tipo de selección (y antes de que se abra este formulario). -### Displayed line number -The `Displayed line number` 4D command works with the `On Open Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +### Número de línea mostrado + +El comando 4D `Número de línea mostrado` funciona con el evento formulario `On Open Detail`. Devuelve el número de la línea que se está procesando mientras se visualiza en pantalla una lista de registros o de líneas de list box. diff --git a/website/translated_docs/es/Events/onOpenExternalLink.md b/website/translated_docs/es/Events/onOpenExternalLink.md index 7b3377bc483f0f..366bd30341e9e5 100644 --- a/website/translated_docs/es/Events/onOpenExternalLink.md +++ b/website/translated_docs/es/Events/onOpenExternalLink.md @@ -3,17 +3,17 @@ id: onOpenExternalLink title: On Open External Link --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ---------------------------------------------- | -| 52 | [Web Area](FormObjects/webArea_overview.md) | An external URL has been opened in the browser | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | --------------------------------------------- | +| 52 | [Ãrea Web](FormObjects/webArea_overview.md) | Se ha abierto una URL externa en el navegador | -## Description +## Descripción -This event is generated when the loading of a URL was blocked by the Web area and the URL was opened with the current system browser, because of a filter set up via the `WA SET EXTERNAL LINKS FILTERS` command. +Este evento se genera cuando la carga de una URL fue bloqueada por el área web y la URL fue abierta con el navegador actual del sistema, debido a un filtro configurado a través del comando `WA SET EXTERNAL LINKS FILTERS`. -You can find out the blocked URL using the `WA Get last filtered URL` command. +Puede identificar la URL bloqueada utilizando el comando `WA Get last filtered URL`. -### See also +### Ver también [`On URL Filtering`](onUrlFiltering.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onOutsideCall.md b/website/translated_docs/es/Events/onOutsideCall.md index 111ed9fd1ead48..e631523932da17 100644 --- a/website/translated_docs/es/Events/onOutsideCall.md +++ b/website/translated_docs/es/Events/onOutsideCall.md @@ -3,13 +3,14 @@ id: onOutsideCall title: On Outside Call --- -| Code | Can be called by | Definition | -| ---- | ---------------- | -------------------------------------------- | -| 10 | Form | The form received a `POST OUTSIDE CALL` call | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | --------------------------------------------------------- | +| 10 | Formulario | El formulario ha recibido una llamada `POST OUTSIDE CALL` | -## Description +## Descripción -This event is called when the form is called from another process through the `POST OUTSIDE CALL` command. +Este evento se llama cuando el formulario es llamado desde otro proceso a través del comando `POST OUTSIDE CALL`. + +> El evento `On Outside Call` modifica el contexto de entrada del formulario. En concreto, si se estaba editando un campo, se genera el evento [`On Data Change`](onDataChange.md). -> The `On Outside Call` event modifies the entry context of the receiving input form. In particular, if a field was being edited, the [`On Data Change`](onDataChange.md) event is generated. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onPageChange.md b/website/translated_docs/es/Events/onPageChange.md index 484a2a60874c32..5ad6e053f5a1cc 100644 --- a/website/translated_docs/es/Events/onPageChange.md +++ b/website/translated_docs/es/Events/onPageChange.md @@ -3,17 +3,17 @@ id: onPageChange title: On Page Change --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------- | -| 56 | Form | The current page of the form is changed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ----------------------------------------- | +| 56 | Formulario | Se cambia la página actual del formulario | -## Description +## Descripción -This event is only available at the form level (it is called in the form method). It is generated each time the current page of the form changes (following a call to the `FORM GOTO PAGE` command or a standard navigation action). +Este evento sólo está disponible a nivel del formulario (se llama en el método formulario). Se genera cada vez que la página actual del formulario cambia (tras una llamada al comando `FORM GOTO PAGE` o una acción de navegación estándar). -Note that it is generated after the page is fully loaded, i.e. once all the objects it contains are initialized, including [Web areas](FormObjects/webArea_overview.md). +Note que se genera después de que la página esté completamente cargada, es decir, una vez que todos los objetos que contiene están inicializados, incluyendo [áreas web](FormObjects/webArea_overview.md). -> The only exception is 4D View Pro areas, for which you need to call the [On VP Ready](onVpReady.md) specific event. +> La única excepción son las áreas 4D View Pro, para las que hay que llamar al evento específico [On VP Ready](onVpReady.md). -The `On Page Change` event is useful for executing code that requires all objects to be initialized beforehand. You can also use it to optimize the application by executing code (for example, a search) only after a specific page of the form is displayed and not just as soon as page 1 is loaded. If the user does not go to this page, the code is not executed. \ No newline at end of file +El evento `On Page Change` es útil para ejecutar código que requiere que todos los objetos sean previamente inicializados. También se puede utilizar para optimizar la aplicación ejecutando el código (por ejemplo, una búsqueda) sólo después de que se muestre una página específica del formulario y no tan pronto como se cargue la página 1. Si el usuario no va a esta página, el código no se ejecuta. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onPlugInArea.md b/website/translated_docs/es/Events/onPlugInArea.md index 443881c322639d..6300f3a2609e5c 100644 --- a/website/translated_docs/es/Events/onPlugInArea.md +++ b/website/translated_docs/es/Events/onPlugInArea.md @@ -3,11 +3,11 @@ id: onPlugInArea title: On Plug in Area --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------ | ------------------------------------------------------------- | -| 19 | Form - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) | An external object requested its object method to be executed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------- | ----------------------------------------------------------- | +| 19 | Formulario - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) | Un objeto externo solicitó la ejecución de su método objeto | -## Description +## Descripción -The event is generated when a plug-in requested its form area to execute the associated object method. \ No newline at end of file +El evento se genera cuando un plug-in solicita su área de formulario para ejecutar el método objeto asociado. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onPrintingBreak.md b/website/translated_docs/es/Events/onPrintingBreak.md index ea1a28295ccf8a..e77bcd15453c80 100644 --- a/website/translated_docs/es/Events/onPrintingBreak.md +++ b/website/translated_docs/es/Events/onPrintingBreak.md @@ -3,15 +3,18 @@ id: onPrintingBreak title: On Printing Break --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -| 6 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | One of the form’s break areas is about to be printed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| 6 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario[ Lista jerárquica](FormObjects/list_overview.md) - [Ãrea de entrada](FormObjects/input_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | Una de las áreas de ruptura del formulario está a punto de imprimirse | -## Description +## Descripción + +El evento `On Printing Break` sólo puede utilizarse en el contexto de un **formulario de salida**. Se activa cada vez que un área de ruptura del formulario de salida está a punto de imprimirse, para poder evaluar los valores de ruptura, por ejemplo. + +Este evento suele producirse tras una llamada al comando `Subtotal`. + +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. -The `On Printing Break` event can only be used in the context of an **output form**. It is triggered each time a break area in the output form is about to be printed, so that you can evaluate the break values, for example. -This event usually follows a call to the `Subtotal` command. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onPrintingDetail.md b/website/translated_docs/es/Events/onPrintingDetail.md index b001d2c9b1a1b1..5731b540fc3e6d 100644 --- a/website/translated_docs/es/Events/onPrintingDetail.md +++ b/website/translated_docs/es/Events/onPrintingDetail.md @@ -3,15 +3,16 @@ id: onPrintingDetail title: On Printing Detail --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 23 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s detail area is about to be printed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| 23 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario[ Lista jerárquica](FormObjects/list_overview.md) - [Ãrea de entrada](FormObjects/input_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El área detallada del formulario está a punto de imprimirse | -## Description +## Descripción -The `On Printing Detail` event can only be used in the context of an **output form**. It is triggered when the detail area the output form is about to be printed, for example following a call to the `Print form` command. +El evento `On Printing Detail` sólo puede utilizarse en el contexto de un **formulario de salida**. Se activa cuando el área de detalle del formulario de salida está a punto de imprimirse, por ejemplo tras una llamada al comando `Print form`. -The `Print form` command generates only one `On Printing Detail` event for the form method. +El comando `Print form` genera sólo un evento `On Printing Detail` para el método formulario. + +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onPrintingFooter.md b/website/translated_docs/es/Events/onPrintingFooter.md index ea17387a26693a..b9135dd8ea5d2c 100644 --- a/website/translated_docs/es/Events/onPrintingFooter.md +++ b/website/translated_docs/es/Events/onPrintingFooter.md @@ -3,15 +3,16 @@ id: onPrintingFooter title: On Printing Footer --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 7 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s footer area is about to be printed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | +| 7 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario[ Lista jerárquica](FormObjects/list_overview.md) - [Ãrea de entrada](FormObjects/input_overview.md) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Pestaña](FormObjects/tabControl.md) | El área de pie de página del formulario está a punto de imprimirse | -## Description +## Descripción -The `On Printing Footer` event can only be used in the context of an **output form**. It is triggered when the footer area the output form is about to be printed, so that you can evaluate the footer values. +El evento `On Printing Footer` sólo puede utilizarse en el contexto de un **formulario de salida**. Se activa cuando el área de pie de página del formulario de salida está a punto de imprimirse, para que pueda evaluar los valores del pie de página. -This event can be triggered in the context of a `PRINT SELECTION` command. +Este evento puede activarse en el contexto de un comando `PRINT SELECTION`. + +> Este evento no se puede seleccionar para los formularios proyecto, sólo está disponible con los **formularios tabla**. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onResize.md b/website/translated_docs/es/Events/onResize.md index d571a1ff305858..6594a8bff0eec3 100644 --- a/website/translated_docs/es/Events/onResize.md +++ b/website/translated_docs/es/Events/onResize.md @@ -3,14 +3,14 @@ id: onResize title: On Resize --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| 29 | Form | The form's window is resized or the subform object is resized (in this case the event is generated in the form method of the subform) | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 29 | Formulario | La ventana del formulario se redimensiona o el objeto subformulario se redimensiona (en este caso el evento se genera en el método formulario del subformulario) | -## Description +## Descripción -This event is called: +Este evento se llama: -- when the window of the form is resized, -- in the context of subforms, when the size of the subform object in the parent form has changed. In this this case, this event is sent to the subform form method. \ No newline at end of file +- cuando se redimensiona la ventana del formulario, +- en el contexto de los subformularios, cuando el tamaño del objeto subformulario en el formulario padre ha cambiado. En este caso, este evento se envía al método formulario del subformulario. diff --git a/website/translated_docs/es/Events/onRowMoved.md b/website/translated_docs/es/Events/onRowMoved.md index 1caf328629a40f..4eb440bcf9c703 100644 --- a/website/translated_docs/es/Events/onRowMoved.md +++ b/website/translated_docs/es/Events/onRowMoved.md @@ -3,13 +3,13 @@ id: onRowMoved title: On Row Moved --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 34 | [List Box of the array type](FormObjects/listbox_overview.md#array-list-boxes) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box row is moved by the user via drag and drop | +| Code | Puede ser llamado por | Definición | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| 34 | [List Box de tipo array](FormObjects/listbox_overview.md#array-list-boxes) - [Columna de List Box](FormObjects/listbox_overview.md#list-box-columns) | Una línea de list box es movida por el usuario por medio de arrastrar y soltar | -## Description +## Descripción -This event is generated when a row of the list box ([array type only](FormObjects/listbox_overview.md#array-list-boxes)) is moved by the user using drag and drop ([if allowed](FormObjects/properties_Action.md#movable-rows). It is not generated if the row is dragged and then dropped in its initial location. +Este evento se genera cuando una línea de list box ([sólo tipo array](FormObjects/listbox_overview.md#array-list-boxes)) es movida por el usuario mediante la función de arrastrar y soltar ([si se permite](FormObjects/properties_Action.md#movable-rows). No se genera si la línea se arrastra y luego se suelta en su ubicación inicial. -The `LISTBOX MOVED ROW NUMBER` command returns the new position of the row. \ No newline at end of file +El comando `LISTBOX MOVED ROW NUMBER` devuelve la nueva posición de la línea. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onRowResize.md b/website/translated_docs/es/Events/onRowResize.md index 91bd0a8779b2c9..dce82f38308140 100644 --- a/website/translated_docs/es/Events/onRowResize.md +++ b/website/translated_docs/es/Events/onRowResize.md @@ -3,26 +3,25 @@ id: onRowResize title: On Row Resize --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------- | -------------------------------------------------------- | -| 60 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The height of a row is modified by a user with the mouse | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------- | ---------------------------------------------------------------- | +| 60 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) | La altura de una línea es modificada por un usuario con el ratón | -## Description +## Descripción -This event is generated when the height of a row is modified by a user in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Este evento se genera cuando la altura de una línea es modificada por un usuario en un documento 4D View Pro. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: -| Property | Type | Description | -| ----------- | ------- | ---------------------------------------------------------------- | -| code | longint | 60 | -| description | text | "On Row Resize" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| range | object | Cell range of the rows whose heights have changed | -| header | boolean | True if the column header row (first row) is resized, else false | +| Propiedad | Tipo | Descripción | +| ----------- | ------------ | ----------------------------------------------------------------------------------------- | +| code | entero largo | 60 | +| description | texto | "On Row Resize" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Rango de celdas de las líneas cuyo alto ha cambiado | +| header | booleano | True si la línea de la columna de encabezado (primera línea) se redimensiona, si no false | - -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Row Resize) diff --git a/website/translated_docs/es/Events/onScroll.md b/website/translated_docs/es/Events/onScroll.md index 6da7582a604698..de6a695b4f69d9 100644 --- a/website/translated_docs/es/Events/onScroll.md +++ b/website/translated_docs/es/Events/onScroll.md @@ -3,23 +3,25 @@ id: onScroll title: On Scroll --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| 59 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) - [List Box](FormObjects/listbox_overview.md) | The user scrolls the contents of a picture object or list box using the mouse or keyboard. | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| 59 | [Ãrea de entrada](FormObjects/input_overview.md) de [tipo](FormObjects/properties_Object.md#type) `imagen` - [List Box](FormObjects/listbox_overview.md) | El usuario se desplaza por el contenido de un objeto imagen o de un list box utilizando el ratón o el teclado. | -## Description +## Descripción -This event can be generated in the context of a picture input or a list box. +Este evento puede generarse en el contexto de una entrada de imagen o de un list box. -This event is triggered after any other user event related to the scrolling action ([On Clicked](onClicked.md), [On After Keystroke](onAfterKeystroke.md), etc.). The event is only generated in the object method (not in the form method). +Este evento se desencadena después de cualquier otro evento usuario relacionado con la acción de desplazamiento ([On Clicked](onClicked.md), [On After Keystroke](onAfterKeystroke.md), etc.). El evento sólo se genera en el método objeto (no en el método formulario). -The event is triggered when the scroll is the result of a user action: using the scroll bars and/or cursors, using the mouse wheel or [the keyboard](FormObjects/properties_Appearance.md#vertical-scroll-bar). It is not generated when the object is scrolled due to the execution of the `OBJECT SET SCROLL POSITION` command. +El evento se dispara cuando el desplazamiento es el resultado de una acción del usuario: utilizando las barras de desplazamiento y/o los cursores, utilizando la rueda del ratón o [el teclado](FormObjects/properties_Appearance.md#vertical-scroll-bar). No se genera cuando el objeto se desplaza debido a la ejecución del comando `OBJECT SET SCROLL POSITION`. -### Picture input -The event is generated as soon as a user scrolls a picture within the picture input (field or variable) that contains it. You can scroll the contents of a picture area when the size of the area is smaller than its contents and the [display format](FormObjects/properties_Display.md#picture-format) is "Truncated (non Centered)". +### Entrada de imagen + +El evento se genera en cuanto un usuario se desplaza por una imagen dentro de la entrada de imagen (campo o variable) que la contiene. Puede desplazar el contenido de un área de imagen cuando el tamaño del área es menor que su contenido y el [formato de visualización](FormObjects/properties_Display.md#picture-format) es "Truncado (no centrado)". + ### List box -The event is generated as soon as a user scrolls the rows or columns of the list box. \ No newline at end of file +El evento se genera en cuanto un usuario se desplaza por las líneas o columnas del list box. diff --git a/website/translated_docs/es/Events/onSelectionChange.md b/website/translated_docs/es/Events/onSelectionChange.md index 6103bc391eef6d..3095b4228f84b3 100644 --- a/website/translated_docs/es/Events/onSelectionChange.md +++ b/website/translated_docs/es/Events/onSelectionChange.md @@ -3,30 +3,29 @@ id: onSelectionChange title: On Selection Change --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -| 31 | [4D View Pro area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) | The selection in the object is modified | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------- | +| 31 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md) - [Ãrea de entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) | La selección en el objeto se modifica | -## Description +## Descripción -This event can be generated in different contexts. +Este evento puede generarse en diferentes contextos. -### 4D View Pro - -The current selection of rows or columns is modified. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: -| Property | Type | Description | -| ------------- | ------- | ------------------------------ | -| code | longint | 31 | -| description | text | "On Selection Change" | -| objectName | text | 4D View Pro area name | -| sheetName | text | Name of the sheet of the event | -| oldSelections | object | Cell range before change | -| newSelections | object | Cell range after change | +### 4D View Pro +Se modifica la selección actual de líneas o columnas. En este contexto, el [objeto evento](overview.md#event-object) devuelto por el comando `FORM Event` contiene: +| Propiedad | Tipo | Descripción | +| ------------- | ------------ | -------------------------------- | +| code | entero largo | 31 | +| description | texto | "On Selection Change" | +| objectName | texto | Nombre del área 4D View Pro | +| sheetName | texto | Nombre de la hoja del evento | +| oldSelections | objeto | Rango de celdas antes del cambio | +| newSelections | objeto | Rango de celdas luego del cambio | -#### Example +#### Ejemplo ```4d If(FORM Event.code=On Selection Change) @@ -35,18 +34,21 @@ The current selection of rows or columns is modified. In this context, the [even End if ``` -### List form +### Formulario listado + +El registro actual o la selección actual de líneas se modifica en un formulario listado. + + +### Lista jerárquica -The current record or the current selection of rows is modified in a list form. +Este evento se genera cada vez que se modifica la selección en la lista jerárquica tras un clic del ratón o una presión del teclado. -### Hierarchical list -This event is generated every time the selection in the hierarchical list is modified after a mouse click or keystroke. +### Ãrea de entrada y 4D Write Pro -### Input & 4D Write Pro +La selección de texto o la posición del cursor en el área se modifica tras un clic o una presión de tecla. -The text selection or the position of the cursor in the area is modified following a click or a keystroke. ### List box +Este evento se genera cada vez que se modifica la selección actual de líneas o de columnas del list box. -This event is generated each time the current selection of rows or columns of the list box is modified. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onTimer.md b/website/translated_docs/es/Events/onTimer.md index c3fc7907f0c889..1d7745621b9a86 100644 --- a/website/translated_docs/es/Events/onTimer.md +++ b/website/translated_docs/es/Events/onTimer.md @@ -3,13 +3,13 @@ id: onTimer title: On Timer --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ----------------------------------------------------------------- | -| 27 | Form | The number of ticks defined by the `SET TIMER` command has passed | +| Code | Puede ser llamado por | Definición | +| ---- | --------------------- | ----------------------------------------------------------------------- | +| 27 | Formulario | El número de graduaciones definido por el comando `SET TIMER` ha pasado | -## Description +## Descripción -This event is generated only if the form method contains a previous call to the `SET TIMER` command. +Este evento se genera sólo si el método formulario contiene una llamada previa al comando `SET TIMER`. -When the `On Timer` form event property is selected, only the form method will receive the event, no object method will be called. \ No newline at end of file +Cuando se selecciona la propiedad de evento formulario `On Timer`, sólo el método formulario recibirá el evento, no se llamará a ningún método objeto. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onUnload.md b/website/translated_docs/es/Events/onUnload.md index 5a04e84e143eb5..965be99941c289 100644 --- a/website/translated_docs/es/Events/onUnload.md +++ b/website/translated_docs/es/Events/onUnload.md @@ -3,23 +3,26 @@ id: onUnload title: On Unload --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | -| 24 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be exited and released | +| Code | Puede ser llamado por | Definición | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | +| 24 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) - [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subformulario](FormObjects/subform_overview.md) - [Pestaña](FormObjects/tabControl.md) - [Ãrea Web](FormObjects/webArea_overview.md) | El formulario está a punto de salir y liberarse | -## Description +## Descripción -This event is triggered when the form is being exited released. +Este evento se activa cuando el formulario es generado. -All the objects of the form (from any page) whose `On Unload` object event property is selected will have their object method called. Then, if the `On Unload` form event property is selected, the form will have its form method called. +Todos los objetos del formulario (de cualquier página) cuya propiedad de evento `On Unload` esté seleccionada tendrán su método objeto llamado. Entonces, si se selecciona la propiedad de evento formulario `On Unload`, se llamará al método formulario. -> The [`On Load`](onLoad.md) and [`On Unload`] events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> Los eventos [`On Load`](onLoad.md) y [`On Unload`] se generan para los objetos si están activados tanto para los objetos como para el formulario al que pertenecen los objetos. Si los eventos están activados sólo para los objetos, no se producirán; estos dos eventos también deben estar activados a nivel del formulario. -### Subform -The `On Unload` event is generated when the subform is closing (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is closed (and not when the form is closed). -### See also +### Subformulario + +El evento `On Unload` se genera al cerrar el subformulario (este evento debe haberse activado también a nivel del formulario padre para que se tenga en cuenta). El evento se genera antes que los del formulario padre. Tenga en cuenta también que, de acuerdo con los principios de funcionamiento de los eventos de formulario, si el subformulario se coloca en una página distinta de la página 0 o 1, este evento sólo se generará cuando se cierre esa página (y no cuando se cierre el formulario). + + +### Ver también [`On Load`](onLoad.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onUrlFiltering.md b/website/translated_docs/es/Events/onUrlFiltering.md index 3841b27efd158a..b3e678a2cae314 100644 --- a/website/translated_docs/es/Events/onUrlFiltering.md +++ b/website/translated_docs/es/Events/onUrlFiltering.md @@ -3,17 +3,16 @@ id: onUrlFiltering title: On URL Filtering --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | --------------------------------- | -| 51 | [Web Area](FormObjects/webArea_overview.md) | A URL was blocked by the Web area | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | ------------------------------------- | +| 51 | [Ãrea Web](FormObjects/webArea_overview.md) | Una URL fue bloqueada por el área web | -## Description +## Descripción -This event is generated when the loading of a URL is blocked by the Web area because of a filter set up using the `WA SET URL FILTERS` command. +Este evento se genera cuando la carga de una URL es bloqueada por el área web debido a un filtro configurado mediante el comando `WA SET URL FILTERS`. -You can find out the blocked URL using the `WA Get last filtered URL` command. - -### See also +Puede identificar la URL bloqueada utilizando el comando `WA Get last filtered URL`. +### Ver también [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onUrlLoadingError.md b/website/translated_docs/es/Events/onUrlLoadingError.md index e7dab76af90ff6..991556fdbc6fc1 100644 --- a/website/translated_docs/es/Events/onUrlLoadingError.md +++ b/website/translated_docs/es/Events/onUrlLoadingError.md @@ -3,17 +3,17 @@ id: onUrlLoadingError title: On URL Loading Error --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ------------------------------------------ | -| 50 | [Web Area](FormObjects/webArea_overview.md) | An error occurred when the URL was loading | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | ----------------------------------------- | +| 50 | [Ãrea Web](FormObjects/webArea_overview.md) | Se ha producido un error al cargar la URL | -## Description +## Descripción -This event is generated when an error is detected during the loading of a URL. +Este evento se genera cuando se detecta un error durante la carga de una URL. -You can call the `WA GET LAST URL ERROR` command in order to get information about the error. +Puede llamar al comando `WA GET LAST URL ERROR` para obtener información sobre el error. -### See also +### Ver también [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onUrlResourceLoading.md b/website/translated_docs/es/Events/onUrlResourceLoading.md index 87b3770f412d40..1fb640433a0bdf 100644 --- a/website/translated_docs/es/Events/onUrlResourceLoading.md +++ b/website/translated_docs/es/Events/onUrlResourceLoading.md @@ -3,17 +3,17 @@ id: onUrlResourceLoading title: On URL Resource Loading --- -| Code | Can be called by | Definition | +| Code | Puede ser llamado por | Definición | | ---- | ------------------------------------------- | ---------------------------------------- | -| 48 | [Web Area](FormObjects/webArea_overview.md) | A new resource is loaded in the Web area | +| 48 | [Ãrea Web](FormObjects/webArea_overview.md) | Se carga un nuevo recurso en el área web | -## Description +## Descripción -This event is generated each time a new resource (picture, frame, etc.) is loaded on the current Web page. +Este evento se genera cada vez que se carga un nuevo recurso (imagen, marco, etc.) en la página web actual. -The [Progression](FormObjects/properties_WebArea.md#progression) variable associated with the area lets you find out the current state of the loading. +La variable [Progresión](FormObjects/properties_WebArea.md#progression) asociada al área permite conocer el estado actual de la carga. -### See also +### Ver también [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/onValidate.md b/website/translated_docs/es/Events/onValidate.md index 38e7a257144279..18e10c15bb391c 100644 --- a/website/translated_docs/es/Events/onValidate.md +++ b/website/translated_docs/es/Events/onValidate.md @@ -3,15 +3,16 @@ id: onValidate title: On Validate --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| 3 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) | The record data entry has been validated | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- | +| 3 | [Ãrea 4D Write Pro](FormObjects/writeProArea_overview) - [Botón](FormObjects/button_overview.md) - [Rejilla de botones](FormObjects/buttonGrid_overview.md) - [Casilla de selección](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Lista desplegable](FormObjects/dropdownList_Overview.md) - Formulario - [Lista jerárquica](FormObjects/list_overview.md#overview) - [Entrada](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Columna de List Box ](FormObjects/listbox_overview.md#list-box-columns) - [Botón imagen](FormObjects/pictureButton_overview.md) - [Pop up menu imagen](FormObjects/picturePopupMenu_overview.md) - [Ãrea de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicador de progreso ](FormObjects/progressIndicator.md) - [Botón radio](FormObjects/radio_overview.md) - [Regla](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subformulario](FormObjects/subform_overview.md) - [Pestaña](FormObjects/tabControl.md) | Se ha validado la entrada de datos del registro | -## Description +## Descripción -This event is triggered when the record data entry has been validated, for example after a `SAVE RECORD` command call or an `accept` [standard action](FormObjects/properties_Action.md#standard-action). +Este evento se dispara cuando la entrada de datos del registro ha sido validada, por ejemplo después de una llamada al comando `SAVE RECORD` o una [acción estándar](FormObjects/properties_Action.md#standard-action) `accept`. -### Subform -The `On Validate` event is triggered when data entry is validated in the subform. \ No newline at end of file +### Subformulario + +El evento `On Validate` se activa cuando se valida la entrada de datos en el subformulario. \ No newline at end of file diff --git a/website/translated_docs/es/Events/onVpRangeChanged.md b/website/translated_docs/es/Events/onVpRangeChanged.md new file mode 100644 index 00000000000000..3a88b792dc0489 --- /dev/null +++ b/website/translated_docs/es/Events/onVpRangeChanged.md @@ -0,0 +1,27 @@ +--- +id: onVpRangeChanged +title: On VP Range Changed +--- + +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| 61 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) | The 4D View Pro cell range has changed (e.g., a formula calculation, value removed from a cell, etc.) | + + +## Descripción + + +This event is generated when a change occurs within a cell range in the 4D View Pro document. + +The object returned by the FORM Event command contains: + +| Propiedad | Tipo | Descripción | +| ------------ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| objectName | texto | Nombre del área 4D View Pro | +| code | entero largo | On VP Range Changed | +| description | texto | "On VP Range Changed" | +| sheetName | texto | Nombre de la hoja del evento | +| range | objeto | Cell range of the change | +| changedCells | objeto | Range containing only the changed cells. It can be a combined range. | +| action | texto | The type of operation generating the event:

  • "clear" - A clear range value operation
  • "dragDrop" - A drag and drop operation
  • "dragFill" - A drag fill operation
  • "evaluateFormula" - Setting a formula in a specified cell range
  • "paste" - A paste operation
  • "setArrayFormula" - Setting a formula in a specified cell range
  • "sort" - Sorting a range of cells
  • | +> See also [On After Edit](onAfterEdit.md). diff --git a/website/translated_docs/es/Events/onVpReady.md b/website/translated_docs/es/Events/onVpReady.md index b6faa860588d50..33b75338624d3e 100644 --- a/website/translated_docs/es/Events/onVpReady.md +++ b/website/translated_docs/es/Events/onVpReady.md @@ -3,15 +3,15 @@ id: onVpReady title: On VP Ready --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------- | ----------------------------------------------- | -| 9 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The loading of the 4D View Pro area is complete | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------------------- | ------------------------------------------- | +| 9 | [Ãrea 4D View Pro](FormObjects/viewProArea_overview.md) | La carga del área 4D View Pro está completa | -## Description +## Descripción -This event is generated when the 4D View Pro area loading is complete. +Este evento se genera cuando se completa la carga del área 4D View Pro. -You need to use this event to write initialization code for the area. Any 4D View Pro area initialization code, for loading or reading values from or in the area, must be located in the `On VP Ready` form event of the area. This form event is triggered once the area loading is complete. Testing this event makes you sure that the code will be executed in a valid context. An error is returned if a 4D View Pro command is called before the `On VP Ready` form event is generated. +Es necesario utilizar este evento para escribir el código de inicialización del área. Todo código de inicialización de área 4D View Pro, para cargar o leer valores desde o en el área, debe ubicarse en el evento formulario `On VP Ready` del área. Este evento formulario se activa una vez que se ha completado la carga del área. Probar este evento le asegura que el código se ejecutará en un contexto válido. Se devuelve un error si se llama a un comando 4D View Pro antes de que se genere el evento formulario `On VP Ready`. -> 4D View Pro areas are loaded asynchronously in 4D forms. It means that the standard [On load](onLoad.md) form event cannot be used for 4D View Pro initialization code, since it could be executed before the loading of the area is complete. `On VP Ready` is always generated after [On load](onLoad.md). \ No newline at end of file +> Las áreas 4D View Pro se cargan de forma asíncrona en los formularios 4D. Esto significa que el evento formulario estándar [On load](onLoad.md) no puede utilizarse para el código de inicialización de 4D View Pro, ya que podría ejecutarse antes de que se complete la carga del área. `On VP Ready` siempre se genera después de [On load](onLoad.md). \ No newline at end of file diff --git a/website/translated_docs/es/Events/onWindowOpeningDenied.md b/website/translated_docs/es/Events/onWindowOpeningDenied.md index dc592b2d92ea28..e46c1adf5bc2db 100644 --- a/website/translated_docs/es/Events/onWindowOpeningDenied.md +++ b/website/translated_docs/es/Events/onWindowOpeningDenied.md @@ -3,17 +3,17 @@ id: onWindowOpeningDenied title: On Window Opening Denied --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | -------------------------------- | -| 53 | [Web Area](FormObjects/webArea_overview.md) | A pop-up window has been blocked | +| Code | Puede ser llamado por | Definición | +| ---- | ------------------------------------------- | ------------------------------------- | +| 53 | [Ãrea Web](FormObjects/webArea_overview.md) | Se ha bloqueado una ventana emergente | -## Description +## Descripción -This event is generated when the opening of a pop-up window is blocked by the Web area. 4D Web areas do not allow the opening of pop-up windows. +Este evento se genera cuando la apertura de una ventana emergente es bloqueada por el área web. Los áreas web de 4D no permiten la apertura de ventanas emergentes. -You can find out the blocked URL using the `WA Get last filtered URL` command. +Puede identificar la URL bloqueada utilizando el comando `WA Get last filtered URL`. -### See also +### Ver también [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/es/Events/overview.md b/website/translated_docs/es/Events/overview.md index b99a2817587fe6..4488eb4249698c 100644 --- a/website/translated_docs/es/Events/overview.md +++ b/website/translated_docs/es/Events/overview.md @@ -1,114 +1,120 @@ --- -id: overview -title: Overview +id: generalidades +title: Generalidades --- -Form events are events that can lead to the execution of the form method and/or form object method(s). Form events allow you to control the flow of your application and to write code that is executed only when a specific event occurs. +Los eventos formulario son eventos que pueden llevar a la ejecución del método de formulario y/o del o de los métodos objeto de formulario. Los eventos de formulario le permiten controlar el flujo de su aplicación y escribir código que se ejecuta sólo cuando ocurre un evento específico. -In your code, you control the events using the `FORM Event` command, that returns the triggered event. For example: +En su código, se controlan los eventos mediante el comando `FORM Event`, que devuelve el evento disparado. Por ejemplo: -```4d +```4d //code of a button If(FORM Event.code=On Clicked) -// do something when the button is clicked +// hacer algo cuando se presiona el botón End if ``` -> Every form and every active object on the form can listen to a predefined set of events, but only the events that you enabled at the form level and/or at every object level will actually occur. - -## Event object - -Each event is returned as an object by the `FORM Event` command. By default, it contains the following properties: - -| Property | Type | Description | -| -------- | ---- | ----------- | -| | | | - objectName|text|Name of the object triggering the event - Not included if the event is triggered by the form| |code|longint|Numeric value of the form event. Also returned by the - -`Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| - -Additional properties are returned when the event occurs on specific objects. For example, the [On After Edit](onAfterEdit.md) event object returned by a [4D View Pro area](FormObjects/viewProArea_overview.md) contains `sheetName` or `action` properties. - -## Events and Methods - -When a form event occurs, 4D performs the following actions: - -- First, it browses the objects of the form and calls the object method for any object (involved in the event) whose corresponding object event property has been selected. -- Second, it calls the form method if the corresponding form event property has been selected. - -Do not assume that the object methods, if any, will be called in a particular order. The rule of thumb is that the object methods are always called before the form method. If an object is a subform, the object methods of the subform’s list form are called, then the form method of the list form is called. 4D then continues to call the object methods of the parent form. In other words, when an object is a subform, 4D uses the same rule of thumb for the object and form methods within the subform object. - -Except for the [On Load](onLoad.md) and [On Unload](onUnload.md) events (see below), if the form event property is not selected for a given event, this does not prevent calls to object methods for the objects whose same event property is selected. In other words, enabling or disabling an event at the form level has no effect on the object event properties. - -The number of objects involved in an event depends on the nature of the event. - -## Call Table - -The following table summarizes how object and form methods are called for each event type: - -| Event | Object Methods | Form Method | Which Objects | -| ------------------------ | ----------------------------------- | ----------- | ---------------------- | -| On Load | Yes | Yes | All objects | -| On Unload | Yes | Yes | All objects | -| On Validate | Yes | Yes | All objects | -| On Clicked | Yes | Yes | Involved object only | -| On Double Clicked | Yes | Yes | Involved object only | -| On Before Keystroke | Yes | Yes | Involved object only | -| On After Keystroke | Yes | Yes | Involved object only | -| On After Edit | Yes | Yes | Involved object only | -| On Getting Focus | Yes | Yes | Involved object only | -| On Losing Focus | Yes | Yes | Involved object only | -| On Activate | Never | Yes | None | -| On Deactivate | Never | Yes | None | -| On Outside Call | Never | Yes | None | -| On Page Change | Never | Yes | None | -| On Begin Drag Over | Yes | Yes | Involved object only | -| On Drop | Yes | Yes | Involved object only | -| On Drag Over | Yes | Never | Involved object only | -| On Mouse Enter | Yes | Yes | All objects | -| On Mouse Move | Yes | Yes | All objects | -| On Mouse Leave | Yes | Yes | All objects | -| On Mouse Up | Yes | Never | Involved object only | -| On Menu Selected | Never | Yes | None | -| On Bound variable change | Never | Yes | None | -| On Data Change | Yes | Yes | Involved object only | -| On Plug in Area | Yes | Yes | Involved object only | -| On Header | Yes | Yes | All objects | -| On Printing Detail | Yes | Yes | All objects | -| On Printing Break | Yes | Yes | All objects | -| On Printing Footer | Yes | Yes | All objects | -| On Close Box | Never | Yes | None | -| On Display Detail | Yes | Yes | All objects | -| On Open Detail | Yes (List box) | Yes | None except List boxes | -| On Close Detail | Yes (List box) | Yes | None except List boxes | -| On Resize | Never | Yes | None | -| On Selection Change | Yes | Yes | Involved object only | -| On Load Record | Never | Yes | None | -| On Timer | Never | Yes | None | -| On Scroll | Yes | Never | Involved object only | -| On Before Data Entry | Yes (List box) | Never | Involved object only | -| On Column Moved | Yes (List box) | Never | Involved object only | -| On Row Moved | Yes (List box) | Never | Involved object only | -| On Column Resize | Yes (List box and 4D View Pro Area) | Never | Involved object only | -| On Header Click | Yes (List box and 4D View Pro Area) | Never | Involved object only | -| On Footer Click | Yes (List box) | Never | Involved object only | -| On After Sort | Yes (List box) | Never | Involved object only | -| On Long Click | Yes (Button) | Yes | Involved object only | -| On Alternative Click | Yes (Button and List box) | Never | Involved object only | -| On Expand | Yes (Hier. list and list box) | Never | Involved object only | -| On Collapse | Yes (Hier. list and list box) | Never | Involved object only | -| On Delete Action | Yes (Hier. list and list box) | Never | Involved object only | -| On URL Resource Loading | Yes (Web Area) | Never | Involved object only | -| On Begin URL Loading | Yes (Web Area) | Never | Involved object only | -| On URL Loading Error | Yes (Web Area) | Never | Involved object only | -| On URL Filtering | Yes (Web Area) | Never | Involved object only | -| On End URL Loading | Yes (Web Area) | Never | Involved object only | -| On Open External Link | Yes (Web Area) | Never | Involved object only | -| On Window Opening Denied | Yes (Web Area) | Never | Involved object only | -| On VP Ready | Yes (4D View Pro Area) | Never | Involved object only | -| On Row Resize | Yes (4D View Pro Area) | Never | Involved object only | - - -Always keep in mind that, for any event, the method of a form or an object is called if the corresponding event property is selected for the form or objects. The benefit of disabling events in the Design environment (using the Property List of the Form editor) is that you can reduce the number of calls to methods and therefore significantly optimize the execution speed of your forms. - -> WARNING: The [On Load](onLoad) and [On Unload](onUnloas) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. \ No newline at end of file +> Cada formulario y cada objeto activo en el formulario puede escuchar un conjunto predefinido de eventos, pero sólo los eventos que habilitó a nivel del formulario y/o en cada nivel del objeto ocurrirán realmente. + + +## Objeto evento + +Cada evento es devuelto como un objeto por el comando `FORM Event`. Por defecto, contiene las siguientes propiedades: + +| Propiedad | Tipo | Descripción | +| --------- | ---- | ----------- | +| | | | + objectName|text|Nombre del objeto que desencadena el evento - No se incluye si el evento es desencadenado por el formulario| |code|longint|Valor numérico del evento formulario. También es devuelto por el comando + +`Form event code`| |description|text|Nombre del evento de formulario (por ejemplo, "On After Edit")| + +Se devuelven propiedades adicionales cuando el evento se produce en objetos específicos. En particular: + +- Los [list box](FormObjects/listbox_overview.md#supported-form-events) y las [columnas de list box](FormObjects/listbox_overview.md#supported-form-events-1) devuelven las [propiedades adicionales](FormObjects/listbox_overview.md#additional-properties) tales como `columnName` o `isRowSelected`. +- Las [áreas de View Pro](FormObjects/viewProArea_overview.md) devuelven por ejemplo las propiedades `sheetName` o `action` en el objeto evento [On After Edit](onAfterEdit.md). + + +## Eventos y métodos + +Cuando se produce un evento formulario, 4D realiza las siguientes acciones: + +- En primer lugar, explora los objetos del formulario y llama al método objeto para todo objeto (asociado al evento) cuya propiedad de evento de objeto correspondiente haya sido seleccionada. +- Luego, llama al método formulario si la propiedad del evento formulario correspondiente ha sido seleccionada. + +No asuma que los métodos objeto, si los hay, serán llamados en un orden particular. La regla general es que los métodos objeto siempre se llaman antes que el método formulario. Si un objeto es un subformulario, se llaman los métodos objeto del formulario lista del subformulario, y luego se llama al método formulario del formulario listado. 4D continúa llamando a los métodos objeto del formulario padre. En otras palabras, cuando un objeto es un subformulario, 4D utiliza la misma regla general para los métodos objeto y formulario dentro del objeto subformulario. + +Excepto en los eventos [En carga](onLoad.md) y [En descarga](onUnload.md) (ver más abajo), si la propiedad del evento formulario no está seleccionada para un evento determinado, esto no impide las llamadas a los métodos objetos cuya misma propiedad de evento está seleccionada. En otras palabras, la activación o desactivación de un evento a nivel de formulario no tiene ningún efecto sobre las propiedades del evento del objeto. + +El número de objetos asociados a un evento depende de la naturaleza del mismo. + +## Tabla de llamadas + +La tabla siguiente resume la forma en que se llaman los métodos objeto y formulario para cada tipo de evento: + +| Evento | Método objeto | Método formulario | Objetos | +| ------------------------ | -------------------------------- | ----------------- | ------------------------------- | +| On Load | Sí | Sí | Todos los objetos | +| On Unload | Sí | Sí | Todos los objetos | +| On Validate | Sí | Sí | Todos los objetos | +| On Clicked | Sí | Sí | Objetos involucrados únicamente | +| On Double Clicked | Sí | Sí | Objetos involucrados únicamente | +| On Before Keystroke | Sí | Sí | Objetos involucrados únicamente | +| On After Keystroke | Sí | Sí | Objetos involucrados únicamente | +| On After Edit | Sí | Sí | Objetos involucrados únicamente | +| On Getting Focus | Sí | Sí | Objetos involucrados únicamente | +| On Losing Focus | Sí | Sí | Objetos involucrados únicamente | +| On Activate | Nunca | Sí | Ninguno | +| On Deactivate | Nunca | Sí | Ninguno | +| On Outside Call | Nunca | Sí | Ninguno | +| On Page Change | Nunca | Sí | Ninguno | +| On Begin Drag Over | Sí | Sí | Objetos involucrados únicamente | +| On Drop | Sí | Sí | Objetos involucrados únicamente | +| On Drag Over | Sí | Nunca | Objetos involucrados únicamente | +| On Mouse Enter | Sí | Sí | Todos los objetos | +| On Mouse Move | Sí | Sí | Todos los objetos | +| On Mouse Leave | Sí | Sí | Todos los objetos | +| On Mouse Up | Sí | Nunca | Objetos involucrados únicamente | +| On Menu Selected | Nunca | Sí | Ninguno | +| On Bound variable change | Nunca | Sí | Ninguno | +| On Data Change | Sí | Sí | Objetos involucrados únicamente | +| On Plug in Area | Sí | Sí | Objetos involucrados únicamente | +| On Header | Sí | Sí | Todos los objetos | +| On Printing Detail | Sí | Sí | Todos los objetos | +| On Printing Break | Sí | Sí | Todos los objetos | +| On Printing Footer | Sí | Sí | Todos los objetos | +| On Close Box | Nunca | Sí | Ninguno | +| On Display Detail | Sí | Sí | Todos los objetos | +| On Open Detail | Sí (List box) | Sí | Ninguna, excepto los list box | +| On Close Detail | Sí (List box) | Sí | Ninguna, excepto los list box | +| On Resize | Nunca | Sí | Ninguno | +| On Selection Change | Sí | Sí | Objetos involucrados únicamente | +| On Load Record | Nunca | Sí | Ninguno | +| On Timer | Nunca | Sí | Ninguno | +| On Scroll | Sí | Nunca | Objetos involucrados únicamente | +| On Before Data Entry | Sí (List box) | Nunca | Objetos involucrados únicamente | +| On Column Moved | Sí (List box) | Nunca | Objetos involucrados únicamente | +| On Row Moved | Sí (List box) | Nunca | Objetos involucrados únicamente | +| On Column Resize | Sí (List box y Ãrea 4D View Pro) | Nunca | Objetos involucrados únicamente | +| On Header Click | Sí (List box y Ãrea 4D View Pro) | Nunca | Objetos involucrados únicamente | +| On Footer Click | Sí (List box) | Nunca | Objetos involucrados únicamente | +| On After Sort | Sí (List box) | Nunca | Objetos involucrados únicamente | +| On Long Click | Sí (botón) | Sí | Objetos involucrados únicamente | +| On Alternative Click | Sí (Botón y List box) | Nunca | Objetos involucrados únicamente | +| On Expand | Sí (Lista jerarq. y list box) | Nunca | Objetos involucrados únicamente | +| On Collapse | Sí (Lista jerarq. y list box) | Nunca | Objetos involucrados únicamente | +| On Delete Action | Sí (Lista jerarq. y list box) | Nunca | Objetos involucrados únicamente | +| On URL Resource Loading | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On Begin URL Loading | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On URL Loading Error | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On URL Filtering | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On End URL Loading | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On Open External Link | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On Window Opening Denied | Sí (Ãrea Web) | Nunca | Objetos involucrados únicamente | +| On VP Range Changed | Sí (Ãrea 4D View Pro) | Nunca | Objetos involucrados únicamente | +| On VP Ready | Sí (Ãrea 4D View Pro) | Nunca | Objetos involucrados únicamente | +| On Row Resize | Sí (Ãrea 4D View Pro) | Nunca | Objetos involucrados únicamente | + +Tenga siempre en cuenta que, para todo evento, se llama al método de un formulario o de un objeto si se selecciona la correspondiente propiedad del evento para el formulario o los objetos. La ventaja de desactivar los eventos en el entorno de diseño (utilizando la lista de propiedades del editor de formularios) es que puede reducir el número de llamadas a los métodos y, por tanto, optimizar significativamente la velocidad de ejecución de sus formularios. + +> ATENCIÓN: los eventos [On Load](onLoad) y [On Unload](onUnloas) se generan para los objetos si están activados a la vez para los objetos y para el formulario al que pertenecen los objetos. Si los eventos están activados sólo para los objetos, no se producirán; estos dos eventos también deben estar activados a nivel del formulario. + diff --git a/website/translated_docs/es/FormEditor/createStylesheet.md b/website/translated_docs/es/FormEditor/createStylesheet.md index 8a8d0fb321996a..294debf053bcc4 100644 --- a/website/translated_docs/es/FormEditor/createStylesheet.md +++ b/website/translated_docs/es/FormEditor/createStylesheet.md @@ -1,290 +1,356 @@ --- id: stylesheets -title: Style sheets +title: Hojas de estilo --- -## Overview -A style sheet groups together a combination of attributes for form objects — from text attributes to nearly any available object attribute. +Una hoja de estilo agrupa una combinación de atributos de objetos formulario, desde los atributos de texto hasta casi todos los atributos de objeto disponibles. -In addition to harmonizing an application's interface, style sheets provide three major advantages: +Además de armonizar la interfaz de sus aplicaciones, las hojas de estilo ofrecen tres grandes ventajas: -* 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. +* Permite ahorrar tiempo durante el desarrollo: para cada objeto tiene un grupo específico de parámetros dentro de una sola operación. +* Facilita el mantenimiento: las hojas de estilo modifican la apariencia de todos los objetos que las utilicen, por lo que cambiar el tamaño de la fuente en una hoja de estilo cambiará el tamaño de la fuente para todos los objetos que utilicen esta misma hoja de estilo. +* Control del desarrollo multiplataforma: las hojas de estilo se pueden aplicar a las plataformas macOS y Windows, sólo a macOS o sólo a Windows. Cuando se aplica una hoja de estilo, 4D utiliza automáticamente la hoja de estilo apropiada. -### Style Sheet Files +## Archivos hojas de estilo -4D accepts three, specific style sheet files: +4D acepta tres archivos específicos de hojas 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 | +| Hoja de estilo | Plataforma | +| ----------------------- | ------------------------------------------------------------------------- | +| styleSheets.css | Hoja de estilo global por defecto para macOS y Windows | +| styleSheets_mac.css | Para definir los estilos de atributos específicos de macOS únicamente | +| styleSheets_windows.css | Para definir los estilos de atributos específicos para Windows únicamente | +Estos archivos se almacenan en la carpeta "/SOURCES" del proyecto. También se puede acceder directamente a través del [CSS Preview](formEditor.md#css-preview) en la barra de herramientas del editor de formularios. -These files are stored in the project's "/SOURCES" folder. -### Style Sheet Architecture +## Arquitectura de las hojas de estilo -While adapted to meet the specific needs of 4D forms, style sheets for project databases generally follow CSS2 syntax and grammar. +Aunque adaptadas para satisfacer las necesidades específicas de los formularios 4D, las hojas de estilo para proyectos aplicación suelen seguir la sintaxis y la gramática CSS2. -Every style rule in a style sheet contains two parts: +Cada regla de estilo de una hoja de estilo contiene dos 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. +* un *selector* - Un selector define dónde aplicar el estilo. 4D soporta los selectores "object type", "object name", "class", "all objects" y "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. +* una *declaración* - La declaración define el estilo real a aplicar. Se pueden agrupar varias líneas de declaración para formar un bloque de declaración. Cada línea de un bloque de declaración CSS debe terminar con un punto y coma, y todo el bloque debe estar rodeado de llaves. -## Style Sheet Selectors -### Object Type -Corresponding to the CSS element selector, the object type defines the type of object to style. +## Selectores de hojas de estilo -Specify the object type, then in curly braces, declare the style(s) to apply. + +### Tipo de objeto + +El tipo de objeto define el tipo de objeto al que hay que aplicar el estilo, y corresponde al selector de elementos CSS. + +Especifique el tipo de objeto, luego entre llaves, declare el estilo o los estilos a aplicar. > The object type corresponds to the JSON [type](FormObjects/properties_Object.md#type) property of form objects. -In the following example, all objects of the *button* type will display text in the Helvetica Neue font, with a size of 20 pixels: +En el siguiente ejemplo, todos los objetos del tipo *botón* mostrarán el texto en la fuente Helvetica Neue, con un tamaño de 20 píxeles: - button { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +button { + font-family: Helvetica Neue; + font-size: 20px; +} +``` 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: - text, input { - text-align: left; - stroke: grey; - } - +``` +text, input { + text-align: left; + stroke: grey; +} +``` + +### Nombre del objeto + +El nombre del objeto corresponde al **selector de ID** CSS y define un objeto específico al que hay que dar estilo, ya que el nombre del objeto es único dentro del formulario. -### Object Name +Designe el objeto con un carácter "#" antes del nombre del objeto y, a continuación, entre llaves, declare el o los estilos a aplicar. -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. +En el siguiente ejemplo, el texto del objeto con el nombre "okButton" se mostrará en fuente Helvetica Neue, con un tamaño de 20 píxeles: -Designate the object with a "#" character before the object's name, then in curly braces, declare the style(s) to apply. +``` +#okButton { + font-family: Helvetica Neue; + font-size: 20px; +} +``` -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: - #okButton { - font-family: Helvetica Neue; - font-size: 20px; - } - ### Class -Corresponding to the CSS **class selector**, the class defines the style for all form objects with the `class` attribute. +Class corresponde al **selector class** CSS y define el estilo para todos los objetos formulario con el atributo `class`. + +Puede especificar las clases a utilizar con un caracter "." seguido del nombre de la clase, y entre llaves, declarar el o los estilos a aplicar. + +En el siguiente ejemplo, el texto de todos los objetos con el nombre de la clase `okButtons` se mostrará en la fuente Helvetica Neue, con un tamaño de 20 píxeles, alineado al centro: + +``` +.okButtons { + font-family: Helvetica Neue; + font-size: 20px; + text-align: center; +} +``` + +Para indicar que un estilo debe aplicarse sólo a los objetos de un tipo determinado, especifique el tipo seguido de "." y el nombre de la clase, y luego, entre llaves, declare el estilo o los estilos a aplicar. + +``` +text.center { + text-align: center; + stroke: red; +} +``` + +En la descripción del formulario 4D, se asocia un nombre de clase a un objeto mediante el atributo `class`. Este atributo contiene uno o varios nombres de clase, separados por un espacio: + +``` +class: "okButtons important" +``` + + +### Todos los objetos + +En correspondencia con el selector CSS **universal**, el carácter "*" indica que el siguiente estilo se aplicará a todos los objetos del formulario. + +Indique que un estilo debe aplicarse a todos los objetos formulario con el carácter "*" y, a continuación, entre llaves, declare el o los estilos que deben aplicarse. + +En el siguiente ejemplo, todos los objetos tendrán un fondo gris: + +``` +* { + fill: gray; +} +``` + + +### Atributos específicos + +Los estilos correspondientes a los **selectores de atributos** CSS se pueden aplicar a todos los objetos formulario con un atributo específico. + +Especifique el atributo entre corchetes y, a continuación, entre llaves, declare el estilo o los estilos a aplicar. + +#### Sintaxis soportadas + +| Sintaxis | Descripción | +| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| [attribute] | coincide con objetos con el `attribute` | +| [attribute="value"] | coincide con objetos cuyo valor del `attribute` contenga exactamente el "valor" especificado | +| [attribute~="value"] | coincide con los objetos con el valor del `attribute` que contiene el "valor" entre una lista de palabras separadas por espacios | +| [attribute|="value"] | coincide con objetos con un `attribute` cuyo valor empieza por "valor" | + +#### Ejemplos + +Todos los objetos con el atributo `borderStyle` tendrán líneas moradas: + +``` +[borderStyle] +{ + stroke: purple; +} +``` + +Todos los objetos de tipo texto con un atributo texto cuyo valor sea "Hello" tendrán letras azules: + + +``` +text[text=Hello] +{ + stroke: blue; +} +``` + +Todos los objetos con un atributo texto cuyo valor sea "Hello" tendrán letras azules: + +``` +[text~=Hello] +{ + stroke: blue; +} + +``` + +Todos los objetos de tipo texto con un atributo texto cuyo valor comience por "Hello" tendrán letras azules: + +``` +text[text|=Hello] +{ + stroke: yellow; -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. -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. +## Declaraciones de hojas de estilo - text.center { - text-align: center; - stroke: red; - } - +### Media Queries -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: +Media queries are used to apply color schemes to an application. - class: "okButtons important" - +A media query is composed of a media feature and a value (e.g., \:\ ). -### All Objects -Corresponding to the CSS **universal selector**, the "*" character indicates that the following style will be applied to all objects on the form. +Available media features: -Designate that a style should apply to all form objects with the "*" character, then in curly braces, declare the style(s) to apply. +* `prefers-color-scheme` -In the following example, all objects will have a gray fill: - * { - fill: gray; - } - +Available media feature expressions: -### Specific Attribute +* **light**
    For using a light scheme +* **dark**
    For using a dark scheme -Corresponding to the CSS **attribute selectors**, styles can be applied to all form objects with a specific attribute. +> Color schemes are only supported on macOS. -Specify the attribute within brackets, then in curly braces, declare the style(s) to apply. +##### Ejemplo -#### Supported syntaxes +This CSS defines a color combination for text and text background in the light scheme (default) and another combination when the dark scheme is selected: -| 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" | +``` +@media (prefers-color-scheme: light) { + .textScheme { + fill: LightGrey; + stroke: Black; + } +} +@media (prefers-color-scheme: dark) { + .textScheme { + fill: DarkSlateGray; + stroke: LightGrey; + } +} +``` -#### Examples -All objects with the `borderStyle` attribute will have purple lines: +### Object Attributes - [borderStyle] - { - stroke: purple; - } - +La mayoría de los atributos del objeto formulario pueden ser definidos dentro de una hoja de estilo, excepto los siguientes atributos: + - `method` + - `type` + - `class` + - `event` + - `choiceList`, `excludedList`, `labels`, `list`, `requiredList` (list type) -All objects of the text type with a text attribute whose value is "Hello" will have blue letters: +Form object attributes can be declared with their [JSON name](FormObjects/properties_Reference.md) as CSS attributes (not including object types, methods, events, and lists). - text[text=Hello] - { - stroke: blue; - } - +#### Mapa de atributos -All objects with a text attribute whose value contains "Hello" will have blue lines: +Los atributos listados a continuación pueden aceptar el nombre 4D o el nombre CSS. - [text~=Hello] - { - stroke: blue; - } - - +| 4D | CSS | +| ---------------- | ------------------ | +| `borderStyle` | `border-style` | +| `fill` | `background-color` | +| `fontFamily` | `font-family` | +| `fontSize` | `font-size` | +| `fontStyle` | `font-style` | +| `fontWeight` | `font-weight` | +| `stroke` | `color` | +| `textAlign` | `text-align` | +| `textDecoration` | `text-decoration` | +| `verticalAlign` | `vertical-align` | +> 4D-specific values (*e.g.*, `sunken`) are not supported when using CSS attribute names. -All objects of the text type with a text attribute whose value starts with "Hello" will have yellow letters: - text[text|=Hello] - { - stroke: yellow; - } - +#### Valores de atributos específicos -## Style Sheet Declarations +- Para los atributos `icon`, `picture` y `customBackgroundPicture` que soportan una ruta a una imagen, la sintaxis es: -The majority of form object attributes can be defined within a style sheet, except the following attributes: +``` +icon: url("/RESOURCES/Images/Buttons/edit.png"); /* ruta absoluta */ +icon: url("edit.png"); /* ruta relativa al archivo del formulario */ +``` -- "method" -- "type" -- "class" -- "event" -- choiceList, excludedList, labels, list, requiredList (list type) +- Para `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` y `verticalLineStroke`, se soportan tres sintaxis: -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. + - Nombre del color CSS: `fill: red;` + - Valor hexadécimal: `fill: #FF0000;` + - función `rgb()`: `fill:rgb(255,0,0)` -### Attribute Mapping +- Si una cadena utiliza caracteres prohibidos en CSS, puede rodear la cadena con comillas simples o dobles. Por ejemplo: + - una referencia xliff: `tooltip: ":xliff:CommonMenuFile";` + - un datasource con la expresión de campo: `dataSource: "[Table_1:1]ID:1";` -The attributes listed below are able to accept either the 4D name or the CSS name. -| 4D | CSS | -| -------------- | ---------------- | -| borderStyle | border-style | -| fill | background-color | -| fontFamily | font-family | -| fontSize | font-size | -| fontStyle | font-style | -| fontWeight | font-weight | -| stroke | color | -| textAlign | text-align | -| textDecoration | text-decoration | -| verticalAlign | vertical-align | +## Orden de prioridad +Los proyectos 4D priorizan las definiciones de estilo en conflicto, primero por la definición del formulario y luego por las hojas de estilo. -> 4D-specific values (*e.g.*, "sunken") are not supported when using CSS attribute names. -### Specific Attribute Values +### JSON vs Hoja de estilo -- For `icon`, `picture`, and `customBackgroundPicture` attributes that support a path to an image, the syntax is: +Si un atributo está definido en la descripción del formulario JSON y en una hoja de estilo, 4D utilizará el valor del archivo JSON. - icon: url("/RESOURCES/Images/Buttons/edit.png"); /* absolute path */ - icon: url("edit.png"); /* relative path to the form file */ - +Para anular este comportamiento, el valor del estilo debe ir seguido de una declaración `!important`. -- 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";` +**Ejemplo 1:** -## Priority Order +| Descripción del formulario JSON | Hoja de estilo | 4D muestra | +| ------------------------------- | -------------- | ---------- | +| `"text": "Button",` | `text: Edit;` | `"Button"` | -4D projects prioritizes conflicting style definitions first by the form definition, then by the style sheets. +**Ejemplo 2:** -### JSON vs Style Sheet +| Descripción del formulario JSON | Hoja de estilo | 4D muestra | +| ------------------------------- | ------------------------ | ---------- | +| `"text": "Button",` | `text: Edit !important;` | `"Edit"` | -If an attribute is defined in the JSON form description and a style sheet, 4D will use the value in the JSON file. -To override this behavior, the style value must be followed with an `!important` declaration. -**Example 1:** -| JSON form description | Style Sheet | 4D displays | -| --------------------- | ------------- | ----------- | -| `"text": "Button",` | `text: Edit;` | `"Button"` | +### Hojas de estilo múltiples +Durante la ejecución, 4D prioriza automáticamente las hojas de estilo en el siguiente orden: -**Example 2:** +1. El formulario 4D cargará primero el archivo CSS por defecto `/SOURCES/styleSheets.css`. +2. Luego cargará el archivo CSS para la plataforma actual `/SOURCES/styleSheets_mac.css` o `/SOURCES/styleSheets_windows.css`. +3. Si existe, entonces cargará un archivo CSS específico definido en el formulario JSON: -| JSON form description | Style Sheet | 4D displays | -| --------------------- | ------------------------ | ----------- | -| `"text": "Button",` | `text: Edit !important;` | `"Edit"` | + * un archivo para ambas plataformas: + ``` + "css": "" + ``` -### Multiple Style Sheets + * o una lista de archivos para ambas plataformas: -At runtime, 4D automatically prioritizes style sheets in the following order: + ``` + "css": [ + "", + "" + ], + ``` -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: + * o una lista de archivos por plataforma: -* a file for both platforms: - - - "css": "" - + ``` + "css": [ + {"path": "", "media": "mac"}, + {"path": "", "media": "windows"}, + ], + ``` -* or a list of files for both platforms: - - - "css": [ - "", - "" - ], +> Las rutas de los archivos pueden ser relativas o absolutas. * Las rutas relativas se resuelven en relación con el archivo de descripción del formulario JSON. * Por razones de seguridad, sólo se aceptan las rutas del sistema de archivos para las rutas absolutas. (*e.g.*, "/RESOURCES", "/DATA") -* 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") +## Creación o modificación de hojas de estilo -## Creating or Editing Style Sheets +Puede crear hojas de estilo utilizando su editor de texto preferido y guardando el archivo con extensión ".css" en la carpeta "/SOURCES" del proyecto. -You can create style sheets using your preferred text editor and saving the file with a ".css" extension in the project's "/SOURCES" folder. +La caja de herramientas de 4D ofrece una página **Hojas de estilo** como opción de acceso directo para crear y editar una de las tres hojas de estilo con nombre específicas de la 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 la página **Estilos** eligiendo la **Caja de herramientas > Styles** del menú Diseño o haga clic en el icono **Caja de herramientas** de la barra de herramientas del editor de formularios. -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. Seleccione el tipo de hoja de estilo que desea crear y haga clic en el botón **Crear** o **Editar**: ![](assets/en/FormEditor/createButton.png) -3. The style sheet will open in your default text editor. \ No newline at end of file +3. La hoja de estilo se abrirá en su editor de texto predeterminado. diff --git a/website/translated_docs/es/FormEditor/formEditor.md b/website/translated_docs/es/FormEditor/formEditor.md new file mode 100644 index 00000000000000..76a0420917948e --- /dev/null +++ b/website/translated_docs/es/FormEditor/formEditor.md @@ -0,0 +1,778 @@ +--- +id: formEditor +title: Editor de formularios +--- + +4D ofrece un completo editor de formularios que le permite modificar su formulario hasta conseguir el efecto que desea. Con el editor de formularios puede crear y eliminar objetos formulario, manipularlos directamente y definir las propiedades de los mismos. + + +## Interface + +La interfaz del editor de formularios muestra cada formulario JSON en su propia ventana, que tiene una barra de herramientas y otra de objetos. Puede tener varios formularios abiertos al mismo tiempo. + +### Display options + +You can show or hide several interface elements on the current page of the form: + +- **Inherited Form**: Inherited form objects (if there is an [inherited form](forms.md#inherited-forms)). +- **Page 0**: Objects from [page 0](forms.md#form-pages). Esta opción permite distinguir entre los objetos de la página actual del formulario y los de la página 0. +- **Paper**: Borders of the printing page, which are shown as gray lines. This element can only be displayed by default in ["for printing" type](properties_FormProperties.md#form-type) forms. +- **Rulers**: Rulers of the Form editor’s window. +- **Markers**: Output control lines and associated markers that show the limits of the form’s different areas. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Marker Labels**: Marker labels, available only when the output control lines are displayed. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Limits**: Form’s limits. Cuando se selecciona esta opción, el formulario se muestra en el editor de formularios tal y como aparece en el modo Aplicación. De esta manera puede ajustar su formulario sin tener que cambiar al modo Aplicación para ver el resultado. +> The [**Size Based on**](properties_FormSize.md#size-based-on), [**Hor. margin**](properties_FormSize.md#hor-margin) and [**Vert. margin**](properties_FormSize.md#vert-margin) settings of the form properties affect the form’s limits. Cuando se utilizan estos parámetros, los límites se basan en los objetos del formulario. Cuando se modifica el tamaño de un objeto que se encuentra junto al límite del formulario, el rectángulo de delimitación se modifica para reflejar ese cambio. + +#### Default display + +When a form is opened in the editor, interface elements are displayed or hidden by default, depending on: + +- the **New form default display** options set in the Preferences - unchecked options cannot be displayed by default. +- the current [form type](properties_FormProperties.md#form-type): + - Markers and marker labels are always displayed by default on list forms + - Paper is displayed by default on "for printing" forms. + +#### Display/Hide elements + +You can display or hide elements at any moment in the Form editor’s current window by selecting **Display** from the **Form** menu or the Form editor's context menu: + +![](assets/en/FormEditor/showHideElements.png) + + +### Rulers + +Las reglas laterales e inferiores le ayudan a posicionar los objetos en el formulario. They can be [displayed or hidden](#display-options). + +Select **Ruler definition...** from the **Form** menu to change measurement units so that the form displays inches, centimeters, or pixels. + +### Barra de herramientas + +La barra de herramientas del editor de formularios ofrece un conjunto de herramientas para manipular y modificar el formulario. Cada ventana tiene su propia barra de herramientas. + +![](assets/en/FormEditor/toolbar.png) + +La barra de herramientas contiene los siguientes elementos: + +| Icono | Nombre | Descripción | +| --------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/execute.png) | Ejecutar el formulario | Se utiliza para probar la ejecución del formulario. Al presionar este botón, 4D abre una nueva ventana y muestra el formulario en su contexto (lista de registros para un formulario lista y página de registro actual para un formulario detallado). El formulario se ejecuta en el proceso principal. | +| ![](assets/en/FormEditor/selection.png) | [Herramienta de selección](#seleccionar - objetos) | Permite seleccionar, mover y redimensionar los objetos del formulario.

    **Nota**: cuando se selecciona un objeto de tipo Texto o Ãrea de Grupo, al presionar la tecla **Intro** se pasa al modo de edición. | +| ![](assets/en/FormEditor/zOrder.png) | [Orden de entrada](#data-entry-order) | Pasa al modo "Orden de entrada", donde es posible ver y cambiar el orden de entrada actual del formulario. Tenga en cuenta que las marcas permiten ver el orden de entrada actual, sin dejar de trabajar en el formulario. | +| ![](assets/en/FormEditor/moving.png) | [Desplazamiento](#moving-objects) | Pasa al modo " Desplazamiento ", en el que es posible llegar rápidamente a cualquier parte del formulario utilizando la función de arrastrar y soltar en la ventana. El cursor toma la forma de una mano. Este modo de navegación es especialmente útil cuando se hace zoom en el formulario. | +| ![](assets/en/FormEditor/zoom.png) | [Zoom](#zoom) | Permite modificar la escala de visualización del formulario (100% por defecto). Puede pasar al modo "Zoom" haciendo clic en la lupa o pulsando directamente en la barra correspondiente a la escala deseada. Esta función se detalla en la sección anterior. | +| ![](assets/en/FormEditor/alignment.png) | [Alignement](#aligning-objects) | Este botón está asociado a un menú que permite alinear los objetos en el formulario. Se activa (o no) en función de los objetos seleccionados.

    Disponible sólo con CSS Preview None | +| ![](assets/en/FormEditor/distribution.png) | [Distribución](#distributing-objects) | Este botón está asociado a un menú que permite repartir los objetos en el formulario. Se activa (o no) en función de los objetos seleccionados.

    Disponible sólo con CSS Preview None | +| ![](assets/en/FormEditor/level.png) | [Nivel](#layering-objects) | Este botón está asociado a un menú que permite cambiar el nivel de los objetos en el formulario. Se activa (o no) en función de los objetos seleccionados. | +| ![](assets/en/FormEditor/group.png) | [Agrupar/desagrupar](#grouping-objects) | Este botón está asociado a un menú que permite agrupar y desagrupar la selección de objetos del formulario. Se activa (o no) en función de los objetos seleccionados. | +| ![](assets/en/FormEditor/displyAndPage.png) | [Visualización y gestión de páginas](forms.html#form-pages) | Esta área permite pasar de una página de formulario a otra y añadir páginas. Para navegar entre las páginas del formulario, haga clic en los botones de flecha o en el área central y elija la página que desea visualizar en el menú que aparece. Si pulsa el botón flecha derecha mientras se muestra la última página del formulario, 4D le permite añadir una página. | +| ![](assets/en/FormEditor/cssPreviewicon.png) | [CSS Preview](#css-preview) | Este botón se utiliza para seleccionar el modo CSS a utilizar. | +| ![](assets/en/FormEditor/views.png) | [Gestión de vistas](#views) | Este botón muestra u oculta la paleta de vistas. Esta función se detalla en la sección Utilizar las vistas de objeto. | +| ![](assets/en/FormEditor/shields2.png) | [Visualización de marcas](#marcas) | Cada clic en este botón provoca la visualización sucesiva de todos los tipos de escudos de formulario. El botón también está vinculado a un menú que permite seleccionar directamente el tipo de escudo a mostrar. | +| ![](assets/en/FormEditor/library.png) | [Librería de objetos preconfigurada](objectLibrary.html) | Este botón muestra la librería de objetos preconfigurada que ofrece numerosos objetos con ciertas propiedades que han sido predefinidas. | +| ![](assets/en/FormEditor/listBoxBuilder1.png) | [Creación de list box](#list-box-builder) | Este botón crea nuevos list box de tipo selección de entidades. | + +### Object bar + +The object bar contains all the active and inactive objects that can be used in 4D forms. Some objects are grouped together by themes. Each theme includes several alternatives that you can choose between. When the object bar has the focus, you can select the buttons using the keys of the keyboard. The following table describes the object groups available and their associated shortcut key. + +| Botón | Group | Key | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:---:| +| ![](assets/en/FormEditor/text.png) | [Text](FormObjects/text.md) / [Group Box](FormObjects/groupBox.md) | T | +| ![](assets/en/FormEditor/input.png) | [Entrada](FormObjects/input_overview.md) | F | +| ![](assets/en/FormEditor/listbox.png) | [Hierarchical List](FormObjects/list_overview.md) / [List Box](FormObjects/listbox_overview.md) | L | +| ![](assets/en/FormEditor/combo.png) | [Combo Box](FormObjects/comboBox_overview.md) / [Drop-down List](FormObjects/dropdownList_Overview.md) / [Picture Pop-up Menu](FormObjects/picturePopupMenu_overview.md) | P | +| ![](assets/en/FormEditor/button.png) | [Button](FormObjects/button_overview.md) / [Picture Button](FormObjects/pictureButton_overview.md) / [Button Grid](FormObjects/buttonGrid_overview.md) | B | +| ![](assets/en/FormEditor/radio.png) | [Botón radio](FormObjects/radio_overview.md) | R | +| ![](assets/en/FormEditor/checkbox.png) | [Check Box](FormObjects/checkbox_overview.md) | C | +| ![](assets/en/FormEditor/indicator.png) | [Progress Indicator](FormObjects/progressIndicator.md) / [Ruler](FormObjects/ruler.md) / [Stepper](FormObjects/stepper.md) / [Spinner](FormObjects/spinner.md) | I | +| ![](assets/en/FormEditor/rectangle.png) | [Rectangle](FormObjects/shapes_overview.md#rectangle) / [Line](FormObjects/shapes_overview.md#line) / [Oval](FormObjects/shapes_overview.md#oval) | S | +| ![](assets/en/FormEditor/splitter.png) | [Splitter](FormObjects/splitters.md) / [Tab Control](FormObjects/tabControl.md) | D | +| ![](assets/en/FormEditor/plugin.png) | [Plug-in Area](FormObjects/pluginArea_overview.md) / [Subform](FormObjects/subform_overview.md) / [Web Area](FormObjects/webArea_overview.md) / [4D Write Pro](FormObjects/writeProArea_overview.md) / [4D View Pro](FormObjects/viewProArea_overview.md) | X | + +To draw an object type, select the corresponding button and then trace the object in the form. After creating an object, you can modify its type using the Property List. Hold down the **Shift** key as you draw to constrain the object to a regular shape. Lines are constrained to horizontal, 45°, or vertical, rectangles are constrained to squares, and ovals are constrained to circles. + +The current variant of the theme is the object that will be inserted in the form. When you click the right side of a button, you access the variant menu: + +![](assets/en/FormEditor/objectBar.png) + +You can click twice on the button so that it remains selected even after you have traced an object in the form (continual selection). This function makes creating several successive objects of the same type easier. To cancel a continual selection, click on another object or tool. + +### Lista de propiedades + +Both forms and form objects have properties that control access to the form, the appearance of the form, and the behavior of the form when it is used. Form properties include, for example, the form’s name, its menu bar, and its size. Object Properties include, for example, an object’s name, its dimensions, its background color, and its font. + +Puede visualizar y modificar las propiedades de los objetos y formularios utilizando la lista de propiedades. Muestra las propiedades del formulario o de los objetos en función de lo que se seleccione en la ventana del editor. + +To display/hide the Property List, choose **Property List** from the **Form** menu or from the context menu of the Form editor. You can also display it by double-clicking in an empty area of the form. + +#### Accesos directos de navegación + +Puede navegar en la Lista de Propiedades utilizando los siguientes atajos: + +* **Tecla de flecha**s ↑ ↓: se utiliza para pasar de una celda a otra. +* **Teclas flechas** ↠→: se utiliza para expandir/contraer los temas o entrar en el modo de edición. +* **PgUp** y **PgDn**: selecciona la primera o la última celda visible de la lista mostrada. +* **Inicio** y **Fin**: selecciona la primera o la última celda de la lista. +* **Ctrl+clic** (Windows) o **Comando+clic** (Mac OS) en un evento: selecciona/deselecciona todos los eventos de la lista, en función del estado inicial del evento sobre el que se ha hecho clic. +* **Ctrl+clic** (Windows) o **Comando+clic** (Mac OS) en la etiqueta de tema: contrae/despliega todos los temas de la lista. + + + +## Manipulating Form Objects + +### Añadir objetos + +Puede añadir objetos en los formularios de varias maneras: + +* Dibujando el objeto directamente en el formulario después de seleccionar su tipo en la barra de objetos (ver [Utilizando la barra de objetos](#using-the-object-bar)) +* Arrastrando y soltando el objeto desde la barra de objetos +* Mediante operaciones de arrastrar y soltar o copiar y pegar sobre un objeto seleccionado de la [librería de objetos](objectLibrary.md) preconfigurada, +* Arrastrando y soltando un objeto desde otro formulario, +* Arrastrando y soltando un objeto desde el Explorador (campos) o desde otros editores del modo Diseño (listas, imágenes, etc.) + +Una vez insertado el objeto en el formulario, puede modificar sus características utilizando el editor de formularios. + +Puede trabajar con dos tipos de objetos en sus formularios: + +* **Objetos estáticos** (líneas, marcos, imágenes de fondo, etc.): estos objetos se utilizan generalmente para definir la apariencia del formulario y sus etiquetas, así como para la interfaz gráfica. Están disponibles en la barra de objetos del editor de formularios. También puede definir sus atributos gráficos (tamaño, color, fuente, etc.) y sus propiedades de redimensionamiento utilizando la lista de propiedades. Los objetos estáticos no tienen variables asociadas como los objetos activos. Sin embargo, se pueden insertar objetos dinámicos en objetos estáticos. + +* **Objetos activos**: estos objetos realizan tareas o funciones en la interfaz y pueden adoptar muchas formas: campos, botones, listas desplazables, etc. Cada objeto activo está asociado a un campo o a una variable. + +### Seleccionar los objetos + +Antes de poder realizar cualquier operación en un objeto (como cambiar el ancho de la línea o la fuente), debe seleccionar el objeto que desea modificar. + +Para seleccionar un objeto utilizando la barra de herramientas: + +1. Haga clic en la herramienta Flecha de la barra de herramientas.

    ![](assets/en/FormEditor/selection.png)

    Cuando se mueve el puntero en el área del formulario, se convierte en un puntero estándar con forma de flecha. +2. Haga clic en el objeto que desea seleccionar. Las manillas de redimensionamiento identifican el objeto seleccionado.

    ![](assets/en/FormEditor/selectResize.png) + +Para seleccionar un objeto utilizando la Lista de propiedades: + +1. Seleccione el nombre del objeto en la lista desplegable de objetos situada en la parte superior de la lista de propiedades.

    Con estos dos métodos, puede seleccionar un objeto que esté oculto por otros objetos o que se encuentre fuera del área visible de la ventana actual. Para deseleccionar un objeto, haga clic fuera del límite del objeto o **Mayúsculas+clic** en el objeto. +> También es posible seleccionar objetos haciendo doble clic en la ventana de resultados de la operación "Buscar en diseño". + +### Selección de múltiples objetos + +Es posible que desee realizar la misma operación en más de un objeto de un formulario, por ejemplo, para mover los objetos, alinearlos o cambiar su apariencia. 4D le permite seleccionar varios objetos al mismo tiempo. Hay varias formas de seleccionar varios objetos: + +* Seleccione **Seleccionar todo** en el menú Edición para seleccionar todos los objetos. +* Haga clic con el botón derecho en el objeto y elija el comando **Seleccionar objetos del mismo tipo** en el menú contextual. +* Mantenga presionada la tecla **Mayús** y haga clic en los objetos que desee seleccionar. +* Comience en una ubicación fuera del grupo de objetos que desea seleccionar y arrastre un marco (a veces llamado rectángulo de selección) alrededor de los objetos. Al soltar el botón del ratón, si alguna parte de un objeto se encuentra dentro o toca los límites del rectángulo de selección, ese objeto queda seleccionado. +* Mantenga presionada la tecla **Alt** (Windows) o la tecla **Opción** (macOS) y dibuje un rectángulo de selección. Se selecciona todo objeto que esté completamente encerrado por el marco. + +La imagen siguiente muestra el dibujo de un rectángulo para seleccionar dos objetos: + +![](assets/en/FormEditor/selectMultiple.png) + +Para deseleccionar un objeto que forma parte de un grupo de objetos seleccionados, mantenga presionada la tecla **Mayús** y haga clic en el objeto. Los demás objetos permanecen seleccionados. Para deseleccionar todos los objetos seleccionados, haga clic fuera de los límites de todos los objetos. + + +### Duplicar los objetos + +Puede duplicar todo objeto de formulario, incluidos los objetos activos. Las copias de los objetos activos conservan todas las propiedades del objeto original, incluidos el nombre, el tipo, la acción estándar, el formato de visualización y el método objeto. + +Puede duplicar un objeto directamente con la herramienta Duplicar de la paleta Herramientas o utilizar la caja de diálogo Duplicar varios para duplicar un objeto más de una vez. Además, a través de esta caja de diálogo, se puede definir la distancia entre dos copias. + +Para duplicar uno o más objetos: + +1. Seleccione el objeto u objetos que desea duplicar. +2. Elija **Duplicar** en el menú **Edición**. 4D crea una copia de cada objeto seleccionado y coloca la copia delante y justo al lado del original. +3. Mueva la copia (o las copias) a la ubicación deseada. Si vuelve a elegir el elemento de menú Duplicar, 4D crea otra copia de cada objeto y la mueve exactamente a la misma distancia y dirección de la primera copia. Si necesita distribuir copias del objeto a lo largo de una línea, debe utilizar el siguiente procedimiento. Duplique el objeto original, mueva la copia a otro lugar del formulario y luego duplique la copia. La segunda copia se coloca automáticamente en la misma posición que la primera copia tenía en relación con el objeto original. Las copias posteriores también se sitúan en la misma relación con sus originales. La siguiente figura explica el funcionamiento de la ubicación relativa de las copias: + +![](assets/en/FormEditor/duplicateObjects.png) + + +#### Duplicar muchos + +La caja de diálogo "Duplicar muchos" aparece cuando se selecciona uno o más objetos y se elige el comando **Duplicar muchos...** del menú **Objeto**. + +![](assets/en/FormEditor/duplcateMany.png) + +* En el área superior, introduzca el número de columnas y líneas de objetos que desea obtener.

    Por ejemplo, si desea tres columnas y dos líneas de objetos, introduzca 3 en el área Columna(s) y 2 en el área Línea(s). Si desea tres nuevas copias horizontales de un objeto, introduzca 4 en el área Columna(s) y deje el valor por defecto, 1, en el área Línea(s). + +* Para las líneas y columnas, defina el desplazamiento que desea aplicar a cada copia.

    El valor debe expresarse en puntos. Se aplicará a cada copia, o copias, en relación con el objeto original.

    Por ejemplo, si desea dejar un desplazamiento vertical de 20 puntos entre cada objeto y la altura del objeto fuente es de 50 puntos, introduzca 70 en el área "Intervalo" de la columna. + +* Si desea crear una matriz de variables, seleccione la opción **Numerar las variables** y seleccione la dirección en la que se van a numerar las variables, ya sea por línea(s) o por columna(s). Esta opción sólo se activa cuando el objeto seleccionado es una variable. Para más información sobre esta opción, consulte **Duplicar en una matriz** en el *Manual de diseño*. + + +### Mover objetos + +Puede mover todo gráfico u objeto activo del formulario, incluidos los campos y los objetos creados con una plantilla. Al mover un objeto, tiene las siguientes opciones: + +* Mover el objeto arrastrándolo, +* Mover el objeto un píxel a la vez utilizando las teclas de flecha, +* Mover el objeto por pasos utilizando las teclas de flecha (pasos de 20 píxeles por defecto), + +Al comenzar a arrastrar el objeto seleccionado, sus controles desaparecen. 4D muestra marcadores que indican la ubicación de los límites del objeto en las reglas para que pueda colocar el objeto exactamente donde lo quiere. Tenga cuidado de no arrastrar un mango. Al arrastrar un mango se cambia el tamaño del objeto. Puede presionar la tecla **Mayúsculas** para realizar el movimiento con una restricción. + +Cuando la [rejilla magnética](#usando-la-rejilla-magnética) está activada, los objetos se mueven por etapas indicando ubicaciones perceptibles. + +Para mover un objeto un píxel por píxel: + +* Seleccione el objeto u objetos y utilice las teclas de flecha del teclado para mover el objeto. Cada vez que se presiona una tecla flecha, el objeto se mueve un píxel en la dirección de la flecha. + +Mover un objeto por pasos: + +* Selecciona el objeto u objetos que quiera mover y mantenga presionada la tecla **Mayúsculas** y utilice las teclas de dirección para mover el objeto por pasos. Por defecto, los pasos son de 20 píxeles cada vez. Puede cambiar este valor en la página Formularios de las Preferencias. + + +### Agrupar objetos + +4D le permite agrupar objetos para que pueda seleccionar, mover y modificar el grupo como un solo objeto. Los objetos agrupados conservan su posición en relación con los demás. Lo normal es agrupar un campo y su etiqueta, un botón invisible y su icono, etc. + +Cuando se redimensiona un grupo, todos los objetos del grupo se redimensionan proporcionalmente (excepto las áreas de texto, que se redimensionan por pasos según el tamaño de sus fuentes). + +Puede desagrupar un grupo de objetos para tratarlos de nuevo como objetos individuales. + +Un objeto activo que ha sido agrupado debe ser desagrupado antes de poder acceder a sus propiedades o métodos. Sin embargo, es posible seleccionar un objeto perteneciente a un grupo sin reagrupar el conjunto: para ello, **Ctrl+clic** (Windows) o **Comando+clic** (macOS) en el objeto (el grupo debe estar seleccionado previamente). + +La agrupación sólo afecta a los objetos en el editor de formularios. Cuando se ejecuta el formulario, todos los objetos agrupados actúan como si estuvieran desagrupados. +> No es posible agrupar objetos que pertenezcan a diferentes vistas y sólo se pueden agrupar aquellos objetos que pertenezcan a la vista actual (ver [Utilizar las vistas de objeto](#views) ). + +Para agrupar los objetos: + +1. Seleccione los objetos que desea agrupar. +2. Elija **Agrupar** en el menú Objetos.

    O

    Haga clic en el botón Agrupar de la barra de herramientas del editor de formularios:

    ![](assets/en/FormEditor/group.png)

    4D marca el límite de los objetos recién agrupados con marcas. No hay marcas que delimiten ninguno de los objetos individuales del grupo. Ahora, al modificar el objeto agrupado, se modifican todos los objetos que componen el grupo. + +Para desagrupar un grupo de objetos: + +1. Seleccione el grupo de objetos que desea desagrupar. +2. Elija **Desagrupar** en el menú **Objetos**.

    O

    Haga clic en el botón **Desagrupar** (menú del botón **Agrupar**) de la barra de herramientas del editor de formularios.

    Si **Desagrupar** está atenuado, significa que el objeto seleccionado ya está separado en su forma más simple.

    4D marca los bordes de los objetos individuales con marcas. + + +### Alinear objetos + +Puede alinear los objetos entre sí o mediante una rejilla invisible en el formulario. + +* Cuando se alinea un objeto con otro, se puede alinear con la parte superior, inferior, lateral o con el centro horizontal o vertical del otro objeto. Puede alinear directamente una selección de objetos utilizando las herramientas de alineación o aplicar ajustes de alineación más avanzados utilizando el Asistente de Alineación. Esta última opción permite, por ejemplo, definir el objeto que se utilizará como referencia de posición y previsualizar la alineación en el formulario antes de aplicarla. +* Cuando se utiliza la rejilla invisible, cada objeto puede alinearse manualmente con otros basándose en posiciones "perceptibles" que se representan con líneas de puntos que aparecen cuando el objeto que se mueve se acerca a otros objetos. + +#### Utilizar las herramientas de alineación directa + +Las herramientas de alineación de la barra de herramientas y del submenú Alinear del menú Objeto permiten alinear rápidamente los objetos seleccionados. + +![](assets/en/FormEditor/alignmentMenu.png) + +Cuando 4D alinea los objetos, deja un objeto seleccionado en su lugar y alinea el resto de los objetos a ese. This object is the “anchor.†Utiliza el objeto que está más lejos en la dirección de la alineación como ancla y alinea los otros objetos a ese objeto. Por ejemplo, si quiere realizar una alineación a la derecha en un conjunto de objetos, el objeto más a la derecha se utilizará como ancla. La figura siguiente muestra objetos sin alineación, "alineados a la izquierda", "alineados horizontalmente por centros" y "alineados a la derecha": + +![](assets/en/FormEditor/alignmentTools.png) + +#### Utilizar el asistente de alineación + +El Asistente de Alineación permite realizar cualquier tipo de alineación y/o distribución de objetos. + +![](assets/en/FormEditor/alignmentAssistant.png) + + +Para mostrar esta caja de diálogo, seleccione los objetos que desee alinear y, a continuación, elija el comando **Alineación** del submenú **Alinear** del menú **Objeto** o del menú contextual del editor. + +* En las áreas "Alineación izquierda/derecha" y/o "Alineación superior/inferior", haga clic en el icono que corresponde a la alineación que desea realizar.

    El área de ejemplo muestra los resultados de su selección. + +* Para realizar una alineación que utilice el esquema de anclaje estándar, haga clic en **Ver** o **Aplicar**.

    En este caso, 4D utiliza el objeto que está más lejos en la dirección de la alineación como ancla y alinea los otros objetos a ese objeto. Por ejemplo, si quiere realizar una alineación a la derecha en un conjunto de objetos, el objeto más a la derecha se utilizará como ancla.

    O:

    Para alinear los objetos a un objeto específico, seleccione la opción **Alinear en** y seleccione el objeto al que desea que se alineen los demás objetos de la lista de objetos. En este caso, la posición del objeto de referencia no se alterará. + +Puede previsualizar los resultados de la alineación haciendo clic en el botón **Previsualización**. Los objetos se alinean entonces en el editor de formularios, pero como la caja de diálogo permanece en el primer plano, aún puede cancelar o aplicar la alineación. +> Esta caja de diálogo le permite alinear y distribuir objetos en una sola operación. Para más información sobre cómo distribuir objetos, consulte [Repartir objetos](#distribuir-objetos). + +#### Utilizar la rejilla magnética + +El editor de formularios dispone de una rejilla magnética virtual que puede ayudarle a colocar y alinear objetos en un formulario. La alineación magnética de los objetos se basa en su posición con respecto a los demás. La rejilla magnética sólo puede utilizarse cuando hay al menos dos objetos en el formulario. + +Esto funciona de la siguiente manera: cuando mueve un objeto en el formulario, 4D indica las posibles ubicaciones de este objeto basándose en alineaciones notables con otros objetos formulario. Una alineación evidente se establece cada vez que: + +* Horizontalmente, los bordes o centros de dos objetos coinciden, +* Verticalmente, los bordes de dos objetos coinciden. + +Cuando esto ocurre, 4D coloca el objeto en el lugar y muestra una línea roja que indica la alineación notable que se ha tenido en cuenta: + +![](assets/en/FormEditor/magneticGrid1.png) + +En cuanto a la distribución de los objetos, 4D ofrece una distancia basada en los estándares de interfaz. Al igual que en el caso de la alineación magnética, las líneas rojas indican las diferencias notables una vez alcanzadas. + +![](assets/en/FormEditor/magneticGrid2.png) + +Este funcionamiento se aplica a todos los tipos de objetos de los formularios. La rejilla magnética puede activarse o desactivarse en cualquier momento utilizando el comando **Activar la rejilla magnética** del menú **Formulario** o del menú contextual del editor. También es posible definir la activación de esta función por defecto en la página **Preferencias** > **Formularios** (opción **Activar la alineación automática por defecto**). Puede activar o desactivar manualmente la rejilla magnética cuando se selecciona un objeto presionando la tecla **Ctrl** (Windows) o **Control** (macOS) . +> La rejilla magnética también influye en el redimensionamiento manual de los objetos. + +### Distribuir los objetos + +Puede repartir los objetos de manera que queden dispuestos con el mismo espacio entre ellos. Para ello, puede distribuir los objetos utilizando las herramientas de distribución de la paleta Herramientas o el Asistente de alineación. Este último le permite alinear y distribuir objetos en una sola operación. +> Cuando está activa la [rejilla magnética](#using-the-magnetic-grid), también se ofrece una guía visual para la repartición cuando se desplaza un objeto manualmente. + +Para repartir los objetos con igual espacio: + +1. Seleccione tres o más objetos y haga clic en la herramienta Distribuir correspondiente. + +2. En la barra de herramientas, haga clic en la herramienta de distribución que corresponde a la distribución que desea aplicar.

    ![](assets/en/FormEditor/distributionTool.png)

    O

    Seleccione un comando del menú de distribución en el submenú **Alinear** del menú **Objeto** o en el menú contextual del editor.

    4D distribuye los objetos consecuentemente. Los objetos se distribuyen utilizando la distancia a sus centros y se utiliza como referencia la mayor distancia entre dos objetos consecutivos. + +Para distribuir objetos utilizando la caja de diálogo Alinear y Distribuir: + +1. Seleccione los objetos que desea distribuir. + +2. Seleccione el comando **Alineación** del submenú **Alinear** del menú **Objeto** o del menú contextual del editor.

    Aparece la siguiente caja de diálogo:![](assets/en/FormEditor/alignmentAssistant.png) + +3. En las áreas Alineación izquierda/derecha y/o Alineación superior/inferior, haga clic en el icono de distribución estándar: ![](assets/en/FormEditor/horizontalDistribution.png)

    (Icono de distribución horizontal estándar)

    El área de ejemplo muestra los resultados de su selección. + +4. Para efectuar una repartición estándar que utilice el esquema estándar, haga clic en **Previsualización** o *Aplicar*.

    En este caso, 4D realizará una distribución estándar, de modo que los objetos se dispongan con la misma cantidad de espacio entre ellos.

    O:

    Para efectuar una distribución específica, seleccione la opción **Distribuir** (por ejemplo, si desea distribuir los objetos en función de la distancia a su lado derecho). This option acts like a switch. Si la casilla de selección Distribuir está seleccionada, los iconos situados debajo de ella realizan una función diferente: + + * Horizontalmente, los iconos corresponden a las siguientes distribuciones: uniformemente con respecto a los lados izquierdo, central (hor.) y derecho de los objetos seleccionados. + * Verticalmente, los iconos corresponden a las siguientes distribuciones: uniformemente con respecto a los bordes superiores, centros (vert.) y bordes inferiores de los objetos seleccionados. + + Puede previsualizar el resultado real de sus parámetros haciendo clic en el botón **Previsualización**: la operación se lleva a cabo en el editor de formularios, pero la caja de diálogo permanece en primer plano. Puede entoces **Cancelar** o **Aplicar** las modificaciones. +> Esta caja de diálogo permite combinar la alineación y la distribución de objetos. Para más información sobre la alineación, consulte [Alinear objetos](#aligning-objects). + + +### Gestionar los planos de los objetos + +A veces tendrá que reorganizar los objetos que obstruyen la vista de otros objetos del formulario. Por ejemplo, puede tener un gráfico que desee que aparezca detrás de los campos en un formulario. 4D ofrece cuatro elementos de menú, **Mover hacia atrás**, **Mover hacia delante**, **Subir un nivel** y **Bajar un nivel** que le permiten organizar los planos de los objetos en el formulario. Estas capas también determinan el orden de entrada por defecto (ver Modificación del orden de entrada de datos). La figura siguiente muestra objetos delante y detrás de otros objetos: + +![](assets/en/FormEditor/layering.png) + +Para mover un objeto a otro plano, selecciónelo y elija: + +* Uno de los comandos **Mover hacia atrás**, **Mover hacia delante**, **Subir un nivel** y **Bajar un nivel** en el menú Objeto, +* Uno de los comandos del submenú **Plano>** del menú contextual del editor, +* Uno de los comandos asociados al botón de gestión de los planos de la barra de herramientas. + +![](assets/en/FormEditor/level2.png) +> Cuando se superponen varios objetos, se puede utilizar el atajo **Ctrl+Mayús+clic** / **Comando+Mayús+clic** para seleccionar cada objeto sucesivamente bajando un plano con cada clic. + +Al ordenar los diferentes niveles, 4D siempre va del fondo al primer plano. Como resultado, el nivel anterior desplaza la selección de objetos de un plano hacia el fondo del formulario. El siguiente nivel mueve la selección un plano hacia el primer plano del formulario. + +### Orden de entrada de los datos + +El orden de entrada de datos es el orden en el que se seleccionan los campos, subformularios y otros objetos activos al presionar la tecla **Tab** o la tecla **Retorno de carro** en un formulario de entrada. Es posible desplazarse por el formulario en sentido contrario (invertir el orden de entrada de datos) presionando las teclas **Mayúsc+Tab** o **Mayúsc+Retorno de carro** de retorno. + +> Puede cambiar el orden de entrada en tiempo de ejecución utilizando los comandos `FORM SET ENTRY ORDER` y `FORM GET ENTRY ORDER`. + +Todos los objetos que soportan la propiedad enfocable se incluyen por defecto en el orden de entrada de datos. + +La configuración del orden de entrada para un formulario JSON se realiza con la propiedad [` entryOrder `](properties_JSONref.md). + +Si no especifica un orden de entrada personalizado, 4D utiliza por defecto el plano de los objetos para determinar el orden de entrada en el sentido "fondo hacia primer plano." El orden de entrada estándar corresponde, por tanto, al orden de creación de los objetos en el formulario. + +En algunos formularios, se necesita definir un orden de entrada de datos personalizado. A continuación, por ejemplo, se han añadido campos adicionales relacionados con la dirección después de la creación del formulario. El orden de entrada estándar resultante se vuelve ilógico y obliga al usuario a introducir la información de forma extraña: + +![](assets/en/FormEditor/entryOrder1.png) + +En casos como éste, un orden de entrada de datos personalizado le permite introducir la información en un orden más lógico: + +![](assets/en/FormEditor/entryOrder2.png) + +#### Visualizar y modificar el orden de entrada de datos + +Puede ver el orden de entrada actual utilizando marcas "Orden de entrada" o utilizando el modo "Orden de entrada". Sin embargo, sólo puede modificar el orden de entrada utilizando el modo "Orden de entrada". + +Este párrafo describe la visualización y la modificación del orden de entrada en modo "Orden de entrada". Para más información sobre la visualización del orden de entrada utilizando marcas, consulte [Using shields](#using-shields). + +Para ver o cambiar el orden de entrada: + +1. Seleccione **Orden de entrada** en el menú **Formulario** o haga clic en el botón Orden de entrada en la barra de herramientas de la ventana:

    ![](assets/en/FormEditor/zOrder.png)

    El puntero se convierte en un puntero de orden de entrada y 4D dibuja una línea en el formulario mostrando el orden en que selecciona los objetos durante la entrada de datos.

    Ver y cambiar el orden de entrada de datos son las únicas acciones que puede realizar hasta que haga clic en cualquier herramienta de la paleta Herramientas. + +2. Para cambiar el orden de entrada de datos, sitúe el puntero sobre un objeto del formulario y, mientras mantiene presionado el botón del ratón, arrastre el puntero hasta el objeto que desee que siga en el orden de entrada de datos.

    ![](assets/en/FormEditor/entryOrder3.png)

    4D ajustará la orden de entrada en consecuencia. + +3. Repita el paso 2 tantas veces como sea necesario para establecer el orden de entrada de datos que desee. + +4. Cuando esté satisfecho con el orden de entrada de datos, haga clic en cualquier herramienta no seleccionada de la barra de herramientas o elija **Orden de entrada** en el menú **Formulario**.

    4D vuelve al modo de funcionamiento normal del editor de formularios. + +> Sólo se muestra el orden de entrada de la página actual del formulario. Si el formulario contiene objetos editables en la página 0 o procedentes de un formulario heredado, el orden de entrada por defecto es el siguiente: objetos de la página 0 del formulario heredado > objetos de la página 1 del formulario heredado > objetos de la página 0 del formulario abierto > objetos de la página actual del formulario abierto. + + +#### Utilizar un grupo de entrada + +Cuando se cambia el orden de entrada, se puede seleccionar un grupo de objetos en el formulario para que el orden de entrada estándar se aplique a los objetos del grupo. Esto le permite definir fácilmente el orden de entrada para los formularios en los que los campos están separados en grupos o columnas. + +Para crear un grupo de entrada: + +1. Seleccione **Orden de entrada** en el menú *Formulario* o haga clic en el botón de la barra de herramientas. +2. Dibuje un rectángulo de selección alrededor de los objetos que desee agrupar para la entrada de datos. + +Al soltar el botón del ratón, los objetos encerrados o tocados por el rectángulo siguen el orden de entrada por defecto. El orden de entrada de los otros objetos restantes se ajusta según sea necesario. + +#### Excluir un objeto del orden de entrada + +Por defecto, todos los objetos que soportan la propiedad enfocable se incluyen en el orden de entrada. Para excluir un objeto del orden de entrada: + +1. Seleccione el modo de orden de entrada, y luego + +2. **shift-click** on the object + +3. **right-click** on the object and select **Remove from entry order** option from the context menu + + + +## CSS Preview + +The Form editor allows you to view your forms with or without applied CSS values. + +When [style sheets](createStylesheet.md) have been defined, forms (including inherited forms and subforms) are opened in the CSS Preview mode for your operating system by default. + + +### Selecting CSS Preview Mode + +The Form editor toolbar provides a CSS button for viewing styled objects: + +![](assets/en/FormEditor/cssToolbar.png) + +Select one of the following preview modes from the menu: + +| Toolbar Icon | CSS Preview Mode | Descripción | +| ------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/cssNo.png) | Ninguno | No CSS values are applied in the form and no CSS values or icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssWin.png) | Windows | CSS values for Windows platform are applied in the form. CSS values and icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssMac.png) | macOS | CSS values for macOS platform are applied in the form. CSS values and icons displayed in the Property List. | +> If a font size too large for an object is defined in a style sheet or JSON, the object will automatically be rendered to accommodate the font, however the size of the object will not be changed. + +The CSS preview mode reflects the priority order applied to style sheets vs JSON attributes as defined in the [JSON vs Style Sheet](stylesheets.html#json-vs-style-sheet) section. + +Once a CSS preview mode is selected, objects are automatically displayed with the styles defined in a style sheet (if any). +> When copying or duplicating objects, only the CSS references (if any) and the JSON values are copied. + + +### CSS support in the Property List + +In CSS Preview mode, if the value of an attribute has been defined in a style sheet, the attribute's name will appear with a CSS icon displayed next to it in the Property List. For example, the attribute values defined in this style sheet: + +```4d +.myButton { +font-family: comic sans; +font-size: 14; +stroke: #800080; +} +``` + +are displayed with a CSS icon in the Property List: + +![](assets/en/FormEditor/cssPpropList.png) + +An attribute value defined in a style sheet can be overridden in the JSON form description (except if the CSS includes the `!important` declaration, see below). In this case, the Property List displays the JSON form value in **bold**. You can reset the value to its style sheet definition with the **Ctrl + click** (Windows) or **Command + click** (macOs) shortcuts. +> If an attribute has been defined with the `!important` declaration for a group, an object within a group, or any object within a selection of multiple objects, that attribute value is locked and cannot be changed in the Property List. + +#### Property List CSS Icons + +| Icono | Descripción | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/cssIcon.png) | Indicates that an attribute value has been defined in a style sheet | +| ![](assets/en/FormEditor/cssImportant.png) | Indicates that an attribute value has been defined in a style sheet with the `!important` declaration | +| ![](assets/en/FormEditor/cssIconMixed.png) | Displayed when an attribute value defined in a style sheet for at least one item in a group or a selection of multiple objects is different from the other objects | + + + +## Creación de list box + +Puede crear rápidamente nuevos list box de tipo selección de entidades con el **-Generador de list box**. El nuevo list box puede ser utilizado inmediatamente o puede ser editado a través del Editor de formularios. + +El generador de list box le permite crear y llenar los list box de tipo selección de entidades en unas pocas y sencillas operaciones. + + + +### Utilización del generador de list box + + +1. En la barra de herramientas del Editor de formularios, haga clic en el icono del generador de list box: + + ![](assets/en/FormEditor/listboxBuilderIcon.png) + + Se muestra el generador de list box: + + ![](assets/en/FormEditor/listboxBuilder.png) + +2. Seleccione una tabla de la lista desplegable **Tabla**: + + ![](assets/en/FormEditor/listboxBuilderTable.png) + +3. Seleccione los campos del list box en el área **Campos**: + + ![](assets/en/FormEditor/listboxBuilderFields.png) + + Por defecto, se seleccionan todos los campos. Puede seleccionar o deseleccionar los campos individualmente o utilizar **Ctrl+clic** (Windows) o **Cmd+clic** (macOS) para seleccionarlos o deseleccionarlos todos a la vez. + + Puede cambiar el orden de los campos arrastrándolos y soltándolos. + +4. La expresión para llenar las líneas del list box a partir de la selección de la entidad se llena previamente: + + ![](assets/en/FormEditor/listboxBuilderExpression.png) + + Esta expresión puede modificarse si es necesario. + +5. Al hacer clic en el botón **Copiar** se copiará la expresión para cargar todos los registros en la memoria: + + ![](assets/en/FormEditor/listboxBuilderCode.png) + +6. Haga clic en el botón **Crear un widget** para crear el list box. + + ![](assets/en/FormEditor/listboxBuilderBuild.png) + +El list box final: + +![](assets/en/FormEditor/listboxBuilderListbox.png) + + + + + + + + + +## Marcas + +El editor de formularios 4D utiliza marcas para facilitar la visualización de las propiedades de los objetos. Puede encontrarlos en la barra de herramientas del formulario: + +![](assets/en/FormEditor/shields.png) + + + + +El principio de esta función es el siguiente: cada escudo está asociado a una propiedad (por ejemplo, **Vistas**, que significa que el objeto "está en la vista actual"). Al activar una marca, 4D muestra un pequeño icono (marca) en la parte superior izquierda de cada objeto del formulario donde se aplica la propiedad. + +![](assets/en/FormEditor/shield.png) + +### Utilizar marcas + +Para activar una marca, haga clic en el icono *Marca* de la barra de herramientas hasta seleccionar la marca deseada. También puede hacer clic en la parte derecha del botón y seleccionar el tipo de marca que desea mostrar directamente en el menú asociado: + + +Si no quiere mostrar marcas, seleccione **Sin marcas** en el menú de selección. +> Puede definir las marcas a mostrar por defecto en la página de formularios de las Preferencias de la aplicación. + +### Descripciones de marcas + +A continuación se describe cada tipo de escudo: + +| Icono | Nombre | Se muestra... | +| -------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/objectMethod.png) | Método objeto | Para los objetos con un método objeto asociado | +| ![](assets/en/FormEditor/standardAction.png) | Acción estándar | Para los objetos con una acción estándar asociada | +| ![](assets/en/FormEditor/resizing.png) | Redimensionamiento | Para los objetos con al menos una propiedad de redimensionamiento, indica la combinación de propiedades actuales | +| ![](assets/en/FormEditor/entryOrder.png) | Orden de entrada | En el caso de los objetos editables, indica el número de orden de entrada | +| ![](assets/en/FormEditor/viewNumber.png) | Vista actual | Para todos los objetos de la vista actual | +| ![](assets/en/FormEditor/cssShield.png) | [Hoja de estilo](stylesheets.html) | Para objetos con uno o más valores de atributos reemplazados por una hoja de estilo. | +| ![](assets/en/FormEditor/filter.png) | Filtro | Para los objetos introducibles con un filtro de entrada asociado | +| ![](assets/en/FormEditor/helpTip.png) | Help Tip | Para los objetos con un mensaje de ayuda asociado | +| ![](assets/en/FormEditor/localized.png) | Localizado | Para los objetos cuya etiqueta proviene de una referencia (etiqueta que empieza por ":"). La referencia puede ser de tipo recurso (STR#) o XLIFF | +| ![](assets/en/FormEditor/noShields.png) | Sin marcas | No aparecen marcas | + +## Vistas + +El editor de formularios de 4D le permite crear formularios complejos distribuyendo los objetos formulario entre distintas vistas que pueden ocultarse o mostrarse según sea necesario. + +Por ejemplo, puede distribuir los objetos según su tipo (campos, variables, objetos estáticos, etc.). Todo tipo de objeto formulario, incluidos los subformularios y las áreas de plug-in, puede incluirse en las vistas. + +No hay límite en el número de vistas por formulario. Puedes crear tantas vistas diferentes como necesite. Además, cada vista puede mostrarse, ocultarse y/o bloquearse. + + +La gestión de las vistas se realiza a través de la paleta de vistas. + +![](assets/en/FormEditor/viewEditor.png) + + +### Acceder a la paleta de vistas + +Hay tres formas de acceder a la paleta de vistas: + +* **Barra de herramientas**: haga clic en el icono Vistas de la barra de herramientas del Editor de formularios. (Este icono aparece en gris cuando al menos un objeto pertenece a una vista distinta de la vista por defecto.) + + | Sólo vista por defecto | Con vistas adicionales | + |:---------------------------------------------------------:|:---------------------------------------------------:| + | ![](assets/en/FormEditor/icon.png "No hay vistas en uso") | ![](assets/en/FormEditor/icon2.png "Vistas en uso") | + +* **Menú contextual** (formulario u objeto): haga clic derecho en cualquier lugar del editor de formularios o de un objeto, y seleccione **Vista actual** + + ![](assets/en/FormEditor/contextMenu.png) + +La vista actual se indica con una marca de verificación (por ejemplo, "Dirección de trabajo" en la imagen superior) + + +* **Menú Formulario**: haga clic en el menú **Formulario** y seleccione **Mostrar la lista** + +![](assets/en/FormEditor/formMenu.png) + + +### Antes de comenzar + +Aquí hay algunas cosas importantes que hay que saber antes de empezar a trabajar con vistas: + +* **Contexto de uso**: las vistas son una herramienta puramente gráfica que sólo se puede utilizar en el Editor de formularios; no se puede acceder a las vistas por programación ni en el modo Aplicación. + +* **Vistas y páginas**: Los objetos de una misma vista pueden pertenecer a diferentes páginas del formulario; sólo se pueden mostrar los objetos de la página actual (y de la página 0 si es visible), independientemente de la configuración de las vistas. + +* **Vistas y niveles**: las vistas son independientes de los niveles de los objetos; no existe una jerarquía de visualización entre las diferentes vistas. + +* **Vistas y grupos**: sólo se pueden agrupar los objetos que pertenecen a la vista actual. + +* **Vistas actuales y por defecto**: la vista por defecto es la primera vista de un formulario y no se puede eliminar; la vista actual es la que se está editando y el nombre se muestra en negrita. + + + +### Gestión de vistas + +#### Crear vistas + +Todo objeto creado en un formulario se coloca en la primera vista ("Vista 1") del formulario. La primera vista es **siempre** la vista por defecto, indicada por (por defecto) después del nombre. El nombre de la vista puede cambiarse (ver [Renombrar vistas](#renaming-views)), sin embargo sigue siendo la vista por defecto. + + +![](assets/en/FormEditor/createView.png) + +Hay dos maneras de añadir vistas adicionales: + +* Haga clic en el botón **Añadir una nueva vista** en la parte inferior de la paleta Vista: + +![](assets/en/FormEditor/addView.png) + +* Haga clic con el botón derecho en una vista existente y seleccione **Insertar vista**: + +![](assets/en/FormEditor/addView2.png) + +No hay límite en el número de vistas. + +#### Renombrar vistas + +Por defecto las vistas se nombran como "Vista" + el número de la vista, sin embargo puede cambiar estos nombres para mejorar la legibilidad y adaptarse mejor a sus necesidades. + +Para cambiar el nombre de una vista, puede utilizar: + +* Hacer doble clic directamente en el nombre de la vista (la vista seleccionada en este caso). El nombre se convierte entonces en editable: + + ![](assets/en/FormEditor/rename.png) + +* Haga clic derecho en el nombre de la vista. El nombre se convierte entonces en editable: + + ![](assets/en/FormEditor/rename2.png) + +#### Reordenar las vistas + +Puede cambiar el orden de visualización de las vistas haciendo arrastrar y soltar dentro de la paleta de vistas. + +Tenga en cuenta que la vista por defecto no cambia: + +![](assets/en/FormEditor/reorderView.png) + + +#### Eliminar vistas + +Para cambiar el nombre de una vista, puede utilizar: + +* Haga clic en el botón **Eliminar la vista seleccionada** en la parte inferior de la paleta Vista: + + ![](assets/en/FormEditor/deleteView.png) + + +* Haga clic derecho en el nombre de la vista y seleccione **Eliminar la vista**: + + ![](assets/en/FormEditor/deleteView2.png) +> Si se elimina una vista, los objetos que contiene se trasladan automáticamente a la vista por defecto. + + + + +### Utilización de las vistas + +Una vez creadas las vistas, puede utilizar la paleta de vistas para: + +* Añadir un objeto a las vistas, +* Mover los objetos de una vista a otra, +* Seleccionar todos los objetos de la misma vista con un solo clic, +* Mostrar u ocultar objetos para cada vista, +* Bloquear los objetos de una vista. + +#### Añadir los objetos a las vistas + +Un objeto sólo puede pertenecer a una única vista. + +Para crear un objeto en otra vista, basta con seleccionar la vista en la paleta de vistas (antes de crear el objeto) haciendo clic en su nombre (se muestra un icono de edición para la [Vista actual](#before-you-begin) y el nombre aparece en negrita): + +![](assets/en/FormEditor/addObject.png) + +#### Mover objetos entre vistas + +También es posible mover uno o más objetos de una vista a otra. En el formulario, seleccione el o los objetos cuya vista desea modificar. La lista de vistas indica, utilizando un símbolo, la vista a la que pertenece la selección: + +![](assets/en/FormEditor/symbol.png) +> La selección puede contener varios objetos pertenecientes a diferentes vistas. + +Simplemente seleccione la vista de destino, haga clic derecho y seleccione **Mover a**: + +![](assets/en/FormEditor/moveObject.png) + +O + +Seleccione la vista de destino de la selección y haga clic en el botón **Mover a** de la parte inferior de la paleta de vistas: + +![](assets/en/FormEditor/moveObject3.png) + +La selección se coloca entonces en la nueva vista: + +![](assets/en/FormEditor/objNewView.png) + +También puede mover un objeto a otra vista a través del menú contextual del objeto. Haga clic derecho en el objeto, seleccione **Mover a la vista** y seleccione una vista en la lista de vistas disponibles: + +![](assets/en/FormEditor/moveObject2.png) +> La [vista actual](#antes-del-comienzo) se muestra en negrita. + + + +#### Seleccionar todos los objetos de una vista + +Puede seleccionar todos los objetos que pertenecen a la misma vista en la página actual del formulario. Esta función es útil para aplicar cambios globales a un conjunto de objetos. + +Para ello, haga clic derecho en la vista en la que desea seleccionar todos los objetos, haga clic en **Seleccionar todo**: + +![](assets/en/FormEditor/selectAll.png) + +También puede utilizar el botón situado en la parte inferior de la paleta de vistas: + + +![](assets/en/FormEditor/selectAll2.png) + + +#### Mostrar u ocultar los objetos de una vista + +Puede mostrar u ocultar objetos pertenecientes a una vista en cualquier momento en la página actual del formulario. De este modo, podrá centrarse en determinados objetos al editar el formulario, por ejemplo. + +Por defecto, se muestran todas las vistas, como indica el icono *Mostrar/Ocultar*: + +![](assets/en/FormEditor/showHide.png) + +Para ocultar una vista, haga clic en el icono *Mostrar/Ocultar*. Entonces se atenúa y los objetos de la vista correspondiente dejan de mostrarse en el formulario: + +![](assets/en/FormEditor/hidden.png) +> La [vista actual](#antes-del-comienzo) no se puede ocultar. + +Para mostrar una vista que está oculta, simplemente selecciónela o haga clic en el icono *Mostrar/Ocultar* de esa vista. + + + +#### Bloquear los objetos de una vista + +Puede bloquear los objetos de una vista. Esto impide que se seleccionen, modifiquen o eliminen del formulario. Una vez bloqueado, un objeto no puede seleccionarse mediante un clic, un rectángulo o el comando **Seleccionar objetos similares** del menú contextual. Esta función es útil para evitar errores de manipulación. + +Por defecto, todas las vistas están desbloqueadas, como lo indica el icono *Bloquear/Desbloquear* que aparece junto a cada vista: + +![](assets/en/FormEditor/lockUnlock.png) + +Para bloquear los objetos de una vista, haga clic en el icono *Bloquear/Desbloquear*. El candado está cerrado, lo que significa que la vista está bloqueada: + +![](assets/en/FormEditor/locked.png) +> La [vista actual](#antes-del-comienzo) no se puede bloquear. + +Para desbloquear una vista que está bloqueada, basta con seleccionarla o hacer clic en el icono *Bloquear/Desbloquear* de esa vista. + +## Zoom + +Puede hacer zoom en el formulario actual. Pase al modo "Zoom" haciendo clic en el icono de la lupa o haciendo clic directamente en la barra de porcentaje deseada (50%, 100%, 200%, 400% y 800%): + +![](assets/en/FormEditor/zoom.png) + +* Al hacer clic en la lupa, el cursor se convierte en una lupa. A continuación, puede hacer clic en el formulario para aumentar la visualización o mantener presionada la tecla Mayús y hacer clic para reducir el porcentaje de visualización. +* Al hacer clic en una barra de porcentaje, la visualización se modifica inmediatamente. + +En el modo Zoom, todas las funciones del editor de formularios siguen estando disponibles(*). + +(*) Por razones técnicas, no es posible seleccionar los elementos del list box (encabezados, columnas, pies de página) cuando el editor de formularios está en modo Zoom. + + + + + diff --git a/website/translated_docs/es/FormEditor/forms.md b/website/translated_docs/es/FormEditor/forms.md index b8725367316464..e8d2ea684f2ce4 100644 --- a/website/translated_docs/es/FormEditor/forms.md +++ b/website/translated_docs/es/FormEditor/forms.md @@ -1,129 +1,137 @@ --- id: forms -title: About 4D Forms +title: Acerca de los formularios 4D --- -## Overview -Forms provide the interface through which information is entered, modified, and printed in a desktop application. Users interact with the data in a database using forms and print reports using forms. Forms can be used to create custom dialog boxes, palettes, or any featured custom window. +Los formularios ofrecen la interfaz a través de la cual se introduce, modifica e imprime la información en una aplicación de escritorio. Los usuarios interactúan con los datos de una base de datos mediante formularios e imprimen informes utilizando formularios. Los formularios pueden utilizarse para crear cajas de diálogo personalizadas, paletas o toda ventana personalizada. ![](assets/en/FormObjects/form1.png) -Forms can also contain other forms through the following features: - -- [subform objects](FormObjects/subform_overview.md) -- [inherited forms](properties_FormProperties.md#inherited-forms) - -## Creating forms - -You can add or modify 4D forms using the following elements: - -- **4D Developer interface:** Create new forms from the **File** menu or the **Explorer** window. -- **Form Editor**: Modify your forms using the **[Form Editor](FormEditor/formEditor.md)**. -- **JSON code:** Create and design your forms using JSON and save the form files at the [appropriate location](Project/architecture.md#sources-folder). Example: - - { - "windowTitle": "Hello World", - "windowMinWidth": 220, - "windowMinHeight": 80, - "method": "HWexample", - "pages": [ - null, - { - "objects": { - "text": { - "type": "text", - "text": "Hello World!", - "textAlign": "center", - "left": 50, - "top": 120, - "width": 120, - "height": 80 - }, - "image": { - "type": "picture", - "pictureFormat": "scaled", - "picture": "/RESOURCES/Images/HW.png", - "alignment":"center", - "left": 70, - "top": 20, - "width":75, - "height":75 - }, - "button": { - "type": "button", - "text": "OK", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } +Los formularios también pueden contener otros formularios a través de las siguientes funcionalidades: + +- [los objetos subformularios](FormObjects/subform_overview.md) +- [los formularios heredados](properties_FormProperties.md#inherited-forms) + + +## Creación de formularios + +Puede añadir o modificar formularios 4D utilizando los siguientes elementos: + +- **La interfaz 4D Developer:** cree nuevos formularios desde el menú **Archivo** o la ventana del **Explorador**. +- **El editor de formularios**: modifique sus formularios utilizando el **[editor de formularios](FormEditor/formEditor.md)**. +- **El código JSON:** cree y diseñe sus formularios utilizando JSON y guarde los archivos de los formularios en la [ubicación adecuada](Project/architecture.md#sources-folder). Ejemplo: + +``` +{ + "windowTitle": "Hello World", + "windowMinWidth": 220, + "windowMinHeight": 80, + "method": "HWexample", + "pages": [ + null, + { + "objects": { + "text": { + "type": "text", + "text": "Hello World!", + "textAlign": "center", + "left": 50, + "top": 120, + "width": 120, + "height": 80 + }, + "image": { + "type": "picture", + "pictureFormat": "scaled", + "picture": "/RESOURCES/Images/HW.png", + "alignment":"center", + "left": 70, + "top": 20, + "width":75, + "height":75 + }, + "button": { + "type": "button", + "text": "OK", + "action": "Cancel", + "left": 60, + "top": 160, + + + "width": 100, + "height": 20 } } - ] - } - + } + ] +} +``` -## Project form and Table form -There are two categories of forms: -* **Project forms** - Independent forms that are not attached to any table. They are intended more particularly for creating interface dialog boxes as well as components. Project forms can be used to create interfaces that easily comply with OS standards. +## Formulario proyecto y formulario tabla -* **Table forms** - Attached to specific tables and thus benefit from automatic functions useful for developing applications based on databases. Typically, a table has separate input and output forms. +Hay dos categorías de formularios: -Typically, you select the form category when you create the form, but you can change it afterwards. +* **Los formularios de proyecto** - Formularios independientes que no están unidos a ninguna tabla. Están pensados, sobre todo, para crear cajas de diálogo de interfaz, al igual que componentes. Los formularios proyecto pueden utilizarse para crear interfaces que cumplan fácilmente con los estándares del sistema operativo. -## Form pages -Each form has is made of at least two pages: +* **Los formularios tablas** - Se adjuntan a tablas específicas y, por tanto, se benefician de funciones automáticas útiles para el desarrollo de aplicaciones basadas en bases de datos. Normalmente, una tabla tiene formularios de entrada y salida separados. -- a page 1: a main page, displayed by default -- a page 0: a background page, whose contents is displayed on every other page. +Normalmente, se selecciona la categoría del formulario al crearlo, pero se puede cambiar después. -You can create multiple pages for an input form. If you have more fields or variables than will fit on one screen, you may want to create additional pages to display them. Multiple pages allow you to do the following: -- Place the most important information on the first page and less important information on other pages. -- Organize each topic on its own page. -- Reduce or eliminate scrolling during data entry. -- Provide space around the form elements for an attractive screen design. +## Páginas formulario -Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed. +Cada formulario consta de al menos dos páginas: -There are no restrictions on the number of pages a form can have. The same field can appear any number of times in a form and on as many pages as you want. However, the more pages you have in a form, the longer it will take to display it. +- una página 1: una página principal, mostrada por defecto +- una página 0: una página de fondo, cuyo contenido se muestra en todas las demás páginas. -A multi-page form has both a background page and several display pages. Objects that are placed on the background page may be visible on all display pages, but can be selected and edited only on the background page. In multi-page forms, you should put your button palette on the background page. You also need to include one or more objects on the background page that provide page navigation tools for the user. +Puede crear varias páginas para un formulario de entrada. Si tiene más campos o variables de los que caben en una pantalla, puede crear páginas adicionales para mostrarlos. Las páginas múltiples le permiten hacer lo siguiente: -## Inherited Forms +- Coloque la información más importante en la primera página y la menos importante en otras. +- Organice cada tema en su propia página. +- Reducir o eliminar el desplazamiento durante la entrada de datos definiendo el [orden de entrada](../FormEditor/formEditor.html#data-entry-order). +- Deje espacio alrededor de los elementos del formulario para lograr un diseño de pantalla atractivo. -4D forms can use and be used as "inherited forms," meaning that all of the objects from *Form A* can be used in *Form B*. In this case, *Form B* "inherits" the objects from *Form A*. +Las páginas múltiples son útiles sólo para los formularios de entrada. No son para imprimir. Cuando se imprime un formulario de varias páginas, sólo se imprime la primera. -References to an inherited form are always active: if an element of an inherited form is modified (button styles, for example), all forms using this element will automatically be modified. +No hay restricciones en el número de páginas que puede tener un formulario. El mismo campo puede aparecer un número ilimitado de veces en un formulario y en todas las páginas que desee. Sin embargo, cuantas más páginas tenga un formulario, más tiempo tardará en mostrarse. -All forms (table forms and project forms) can be designated as an inherited form. However, the elements they contain must be compatible with use in different database tables. +Un formulario multipáginas tiene una página de fondo y varias páginas de visualización. Los objetos que se colocan en la página de fondo pueden ser visibles en todas las páginas de visualización, pero sólo se pueden seleccionar y editar en la página de fondo. En los formularios multipágina, debe colocar su paleta de botones en la página de fondo. También es necesario incluir uno o más objetos en la página de fondo que ofrezcan las herramientas de navegación para el usuario. -When a form is executed, the objects are loaded and combined in the following order: -1. Page zero of the inherited form -2. Page 1 of the inherited form -3. Page zero of the open form -4. Current page of the open form. +## Formularios heredados -This order determines the default entry order of objects in the form. +Los formularios 4D pueden utilizar y ser utilizados como "formularios heredados", lo que significa que todos los objetos de *Formulario A* pueden ser utilizados en *Formulario B*. En este caso, *Formulario B* "hereda" los objetos de *Formulario A*. -> Only pages 0 and 1 of an inherited form can appear in other forms. +Las referencias a un formulario heredado están siempre activas: si se modifica un elemento de un formulario heredado (estilos de botón, por ejemplo), se modificarán automáticamente todos los formularios que utilicen este elemento. -The properties and method of a form are not considered when that form is used as an inherited form. On the other hand, the methods of objects that it contains are called. +Todos los formularios (formularios tabla y formularios proyecto) pueden ser designados como un formulario heredado. Sin embargo, los elementos que contienen deben ser compatibles con el uso en diferentes tablas de la base de datos. -To define an inherited form, the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) and [Inherited Form Table](properties_FormProperties.md#inherited-form-table) (for table form) properties must be defined in the form that will inherit something from another form. +Cuando se ejecuta un formulario, los objetos se cargan y combinan en el siguiente orden: -A form can inherit from a project form, by setting the [Inherited Form Table](properties_FormProperties.md#inherited-form-table) property to **\** in the Property List (or " " in JSON). +1. Página cero del formulario heredado +2. Página 1 del formulario heredado +3. Página cero del formulario abierto +4. Página actual del formulario abierto. -To stop inheriting a form, select **\** in the Property List (or " " in JSON) for the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) property. +Este orden determina el [orden de entrada](../FormEditor/formEditor.html#data-entry-order) de los objetos en el formulario. -> It is possible to define an inherited form in a form that will eventually be used as an inherited form for a third form. The combining of objects takes place in a recursive manner. 4D detects recursive loops (for example, if form [table1]form1 is defined as the inherited form of [table1]form1, in other words, itself) and interrupts the form chain. +> Sólo las páginas 0 y 1 del formulario heredado pueden aparecer en otros formularios. -## Supported Properties +Las propiedades y el método de un formulario no se tienen en cuenta cuando ese formulario se utiliza como formulario heredado. Por otro lado, se llaman los métodos de los objetos que contiene. -[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) \ No newline at end of file +Para definir un formulario heredado, las propiedades [Inherited Form Name](properties_FormProperties.md#inherited-form-name) and [Inherited Form Table](properties_FormProperties.md#inherited-form-table) (para el formulario tabla) deben definirse en el formulario que heredará algo de otro formulario. + +Un formulario puede heredar de un formulario proyecto, definiendo la propiedad [Inherited Form Table](properties_FormProperties.md#inherited-form-table) en **\** la Lista de propiedades (o " " en JSON). + +Para dejar de heredar un formulario, seleccione **** en la lista de propiedades (o " " en JSON) para la propiedad [Inherited Form Name](properties_FormProperties.md#inherited-form-name). +> Es posible definir un formulario heredado en un formulario que eventualmente se utilizará como formulario heredado para un tercer formulario. La combinación de objetos se realiza de forma recursiva. 4D detecta los bucles recursivos (por ejemplo, si el formulario [table1]form1 se define como el formulario heredado de [table1]form1, es decir, él mismo) e interrumpe la cadena de formularios. + + +## Propiedades soportadas + +[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) diff --git a/website/translated_docs/es/FormEditor/macros.md b/website/translated_docs/es/FormEditor/macros.md new file mode 100644 index 00000000000000..253acb77d32a02 --- /dev/null +++ b/website/translated_docs/es/FormEditor/macros.md @@ -0,0 +1,334 @@ +--- +id: macros +title: Form Editor Macros +--- + + +The 4D Form editor supports macros. A macro is a set of instructions to perform an action or a sequence of actions. When called upon, the macro will execute its instructions and automatically perform the action(s). + +For example if you have a recurring report with specific formatting (e.g., certain text must appear in red and certain text must appear in green), you can create a macro to automatically set the color. You can create macros for the 4D Form editor that can: + +* Create and execute 4D code +* Display dialogs +* Select form objects +* Add / delete / modify forms, form objects as well as their properties +* Modify project files (update, delete) + +Macros code supports [class functions](Concepts/classes.md) and [form object properties in JSON](FormObjects/properties_Reference.md) to let you define any custom feature in the Form editor. + +Macros can been defined for the host project or for components within the project. Usually, you will create a macro and install it within the components you use for development. + +When called, a macro overrides any previously specified behaviors. + +## Hands-on example + +In this short example, you'll see how to create and call a macro that adds a "Hello World!" alert button in the top left corner of your form. + +1. In a `formMacros.json` file within the `Sources` folder of your project, you write: + +```js +{ + "macros": { + "Add Hello World button": { + "class": "AddButton" + } + } +} +``` + +2. Create a 4D class named `AddButton`. + +3. Within the `AddButton` class, write the following function: + +```4d +Function onInvoke($editor : Object)->$result : Object + + var $btnHello : Object + + // Create a "Hello" button + $btnHello:=New object("type"; "button"; \ + "text"; "Hello World!"; \ + "method"; New object("source"; "ALERT(\"Hello World!\")"); \ + "events"; New collection("onClick"); \ + "width"; 120; \ + "height"; 20; \ + "top"; 0; \ + "left"; 0) + + // Add button in the current page + $editor.editor.currentPage.objects.btnHello:=$btnHello + + // Select the new button in the form editor + $editor.editor.currentSelection.clear() //unselect elements + $editor.editor.currentSelection.push("btnHello") + + // Notify the modification to the 4D Form editor + $result:=New object("currentSelection"; $editor.editor.currentSelection;\ + "currentPage"; $editor.editor.currentPage) +``` + +You can then call the macro: ![](assets/en/FormEditor/macroex1.png) ![](assets/en/FormEditor/macroex2.png) + + +## Calling macros in the Form editor + +When macros are defined in your 4D project, you can call a macro using the contextual menu of the Form editor: + +![](assets/en/FormEditor/macroSelect.png) + +This menu is built upon the `formMacros.json` [macro definition file(s)](#location-of-macros). Macro items are sorted in alphabetical order. + +This menu can be called in an empty area or a selection in the form. Selected object are passed to `$editor.currentSelection` or `$editor.target` in the [`onInvoke`](#oninvoke) function of the macro. + +A single macro can execute several operations. If selected, the **Undo** feature of the Form editor can be used to reverse macro operations globally. + +## Location of macro file + +All 4D Form Editor macros are defined within a single JSON file per project or component: `FormMacros.json`. + +This file must be located in the host or component's **Project** > **Sources** folder: + +![](assets/en/FormEditor/macroStructure.png) + + + +## Declaring macros + +The structure of the `formMacros.json` file is the following: + +```js +{ + "macros": { + : { + "class": , + : + } + } +} +``` + +Here is the description of the JSON file contents: + +| Atributo | | | Tipo | Descripción | +| -------- | ------------------- | ------------------------ | ------ | ------------------------------------------------------ | +| macros | | | objeto | list of defined macros | +| | `` | | objeto | macro definition | +| | | class | cadena | macro class name | +| | | `` | any | (optional) custom value to retrieve in the constructor | + +Custom properties, when used, are passed to the [constructor](#class-constructor) function of the macro. + +### Ejemplo + +```js +{ + "macros": { + "Open Macros file": { + "class": "OpenMacro" + }, + "Align to Right on Target Object": { + "class": "AlignOnTarget", + "myParam": "right" + }, + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + + + +## Instantiating macros in 4D + +Each macro you want to instantiate in your project or component must be declared as a [4D class](Concepts/classes.md). + +The class name must match the name defined using the [class](#creating-macros) attribute of the `formMacros.json` file. + +Macros are instantiated at application startup. Consequently, if you modify the macro class structure (add a function, modify a parameter...) or the [constructor](#class-constructor), you will have to restart the application to apply the changes. + + + + +## Macro Functions + +Every macro class can contain a `Class constructor` and two functions: `onInvoke()` and `onError()`. + + +### Class constructor + +#### Class constructor($macro : Object) + +| Parameter | Tipo | Descripción | +| --------- | ------ | -------------------------------------------------------- | +| $macro | Objeto | Macro declaration object (in the `formMacros.json` file) | + +Macros are instantiated using a [class constructor](Concepts/classes.md#class-constructor) function, if it exists. + +The class constructor is called once during class instantiation, which occurs at application startup. + +Custom properties added to the [macro declaration](#declaring-macros) are returned in the parameter of the class contructor function. + + + +#### Ejemplo + +In the `formMacros.json` file: + +```js +{ + "macros": { + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + +You can write: + +```4d +// Class "AlignOnTarget" +Class constructor($macro : Object) + This.myParameter:=$macro.myParam //left + ... +``` + + +### onInvoke() + +#### onInvoke($editor : Object) -> $result : Object + +| Parameter | Tipo | Descripción | +| --------- | ------ | ------------------------------------------------------------------------------------ | +| $editor | Objeto | Form Editor Macro Proxy object containing the form properties | +| $result | Objeto | Form Editor Macro Proxy object returning properties modified by the macro (optional) | + +The `onInvoke` function is automatically executed each time the macro is called. + +When the function is called, it receives in the `$editor.editor` property a copy of all the elements of the form with their current values. You can then execute any operation on these properties. + +Once operations are completed, if the macro results in modifying, adding, or removing objects, you can pass the resulting edited properties in `$result`. The macro processor will parse the returned properties and apply necessary operations in the form. Obviously, the less properties you return, the less time processing will require. + +Here are the properties returned in the *$editor* parameter: + +| Propiedad | Tipo | Descripción | +| -------------------------------- | --------- | --------------------------------------------------------------------------------- | +| $editor.editor.form | Objeto | The entire form | +| $editor.editor.file | File | File object of the form file | +| $editor.editor.name | Cadena | Name of the form | +| $editor.editor.table | number | Table number of the form, 0 for project form | +| $editor.editor.currentPageNumber | number | The number of the current page | +| $editor.editor.currentPage | Objeto | The current page, containing all the form objects and the entry order of the page | +| $editor.editor.currentSelection | Colección | Collection of names of selected objects | +| $editor.editor.formProperties | Objeto | Properties of the current form | +| $editor.editor.target | cadena | Name of the object under the mouse when clicked on a macro | + +Here are the properties that you can pass in the `$result` object if you want the macro processor to execute a modification. All properties are optional: + +| Propiedad | Tipo | Descripción | +| ----------------- | --------- | ----------------------------------------------------------- | +| currentPage | Objeto | currentPage including objects modified by the macro, if any | +| currentSelection | Colección | currentSelection if modified by the macro | +| formProperties | Objeto | formProperties if modified by the macro | +| editor.groups | Objeto | group info, if groups are modified by the macro | +| editor.views | Objeto | view info, if views are modified by the macro | +| editor.activeView | Cadena | Active view name | + + +For example, if objects of the current page and groups have been modified, you can write: + +```4d + $result:=New object("currentPage"; $editor.editor.currentPage ; \ + "editor"; New object("groups"; $editor.editor.form.editor.groups)) + +``` + + +#### `method` attribute + +When handling the `method` attribute of form objects, you can define the attribute value in two ways in macros: + +- Using a [string containing the method file name/path](FormObjects/properties_Action.md#method). + +- Using an object with the following structure: + +| Propiedad | Tipo | Descripción | +| --------- | ---- | ----------- | +| | | | + source|String|method code| + +4D will create a file using the object name in the "objectMethods" folder with the content of `source` attribute. This feature is only available for macro code. + +#### `$4dId` property in `currentPage.objects` + +The `$4dId` property defines a unique ID for each object in the current page. This key is used by the macro processor to control changes in `$result.currentPage`: + +- if the `$4dId` key is missing in both the form and an object in `$result`, the object is created. +- if the `$4dId` key exists in the form but is missing in `$result`, the object is deleted. +- if the `$4dId` key exists in both the form and an object in `$result`, the object is modified. + + +#### Ejemplo + +You want to define a macro function that will apply the red color and italic font style to any selected object(s). + +```4d +Function onInvoke($editor : Object)->$result : Object + var $name : Text + + If ($editor.editor.currentSelection.length>0) + // Set stroke to red and style to italic for each selected object + For each ($name; $editor.editor.currentSelection) + $editor.editor.currentPage.objects[$name].stroke:="red" + $editor.editor.currentPage.objects[$name].fontStyle:="italic" + + End for each + + Else + ALERT("Please select a form object.") + End if + + // Notify to 4D the modification + $result:=New object("currentPage"; $editor.editor.currentPage) +``` + + +### onError() + +#### onError($editor : Object; $resultMacro : Object ; $error : Collection) + +| Parameter | | Tipo | Descripción | +| ------------ | --------------------- | --------- | ---------------------------------------- | +| $editor | | Objeto | Object send to [onInvoke](#oninvoke) | +| $resultMacro | | Objeto | Object returned by [onInvoke](#oninvoke) | +| $error | | Colección | Error stack | +| | [].errCode | Número | Error code | +| | [].message | Texto | Description of the error | +| | [].componentSignature | Texto | Internal component signature | + +The `onError` function is executed when the macros processor encounters an error. + +When executing a macro, if 4D encounters an error which prevents the macro from being cancelled, it does not execute the macro. It is the case for example if executing a macro would result in: + +- deleting or modifying a script whose file is read-only. +- creating two objects with the same internal ID. + +#### Ejemplo + +In a macro class definition, you can write the following generic error code: + +```4d +Function onError($editor : Object; $resultMacro : Object; $error : Collection) + var $obj : Object + var $txt : Text + $txt:="" + + For each ($obj; $error) + $txt:=$txt+$obj.message+" \n" + End for each + + ALERT($txt) +``` diff --git a/website/translated_docs/es/FormEditor/objectLibrary.md b/website/translated_docs/es/FormEditor/objectLibrary.md index d829cb1d56cf82..a04b02571e93aa 100644 --- a/website/translated_docs/es/FormEditor/objectLibrary.md +++ b/website/translated_docs/es/FormEditor/objectLibrary.md @@ -1,101 +1,104 @@ --- id: objectLibrary -title: Object libraries +title: Librerías de objetos --- -## Overview -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. +Puede utilizar librerías de objetos en sus formularios. Una librería de objetos ofrece una colección de objetos preconfigurados que pueden ser utilizados en sus formularios mediante un simple copiar y pegar o arrastrar y soltar. -4D proposes two kinds of object libraries: +4D propone dos tipos de librerías de objetos: -- 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. +- una librería de objetos estándar y preconfigurada, disponible en todos sus proyectos. +- librerías de objetos personalizadas, que puede utilizar para almacenar sus objetos formularios favoritos o formularios proyecto completos. -## Using the standard object library -The standard object library is available from the Form editor: click on the last button of the toolbar: +## Utilización de la librería de objetos estándar + +La librería de objetos estándar está disponible en el editor de formularios: haga clic en el último botón de la barra de herramientas: ![](assets/en/FormEditor/library1.png) -The library is displayed in a separate window: +La librería se muestra en una ventana aparte: ![](assets/en/FormEditor/library2.png) -The window has the following main features: +La ventana tiene las siguientes características principales: -- 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: - - 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. +- Ãrea de vista previa con mensajes de ayuda: el área central muestra una vista previa de cada objeto. Puede pasar el ratón por encima de un objeto para obtener información sobre el mismo en un mensaje de ayuda. +- Puede filtrar el contenido de la ventana utilizando el menú **Categorías**: ![](assets/en/FormEditor/library3.png) +- Para utilizar un objeto de la librería en su formulario, puede: + - hacer clic derecho en un objeto y seleccionar **Copiar** en el menú contextual + - o arrastrar y soltar el objeto desde la librería El objeto se añade al formulario. -This library is read-only. If you want to edit default objects or create your own library of preconfigured objects or project forms, you need to create a custom object library (see below). +Esta librería es de sólo lectura. Si desea editar objetos por defecto o crear su propia librería de objetos preconfigurados o formularios proyecto, deberá crear una librería de objetos personalizada (ver abajo). -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). +Todos los objetos propuestos en la librería de objetos estándar se describen en [esta sección en 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. +## Crear y utilizar librerías de objetos personalizadas -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. +Puede crear y utilizar librerías de objetos personalizadas en 4D. Una librería de objetos personalizada es un proyecto 4D donde puede almacenar sus objetos favoritos (botones, textos, imágenes, etc.) A continuación, puede reutilizar estos objetos en diferentes formularios y proyectos. -Using libraries, you can build form object backgrounds grouped by graphic families, by behavior, etc. +Los objetos se almacenan con todas sus propiedades, incluidos sus métodos. Las librerías se arman y utilizan mediante simples operaciones de arrastrar y soltar o copiar y pegar. -### Creating an object library +Mediante el uso de librerías, se pueden construir fondos de objetos de formulario agrupados por familias gráficas, por funcionalidades, etc. -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. -Once you validate the dialog box, 4D creates a new object library on your disk and displays its window (empty by default). +### Crear una librería de objetos -![](assets/en/FormEditor/library4.png) +Para crear una librería de objetos, seleccione **Nuevo>Librería de objetos...** en el menú **Archivo** o en la barra de herramientas de 4D. Aparece una caja de diálogo estándar para guardar el archivo, que le permite elegir el nombre y la ubicación de la librería de objetos. + +Una vez validada la caja de diálogo, 4D crea una nueva librería de objetos en su disco y muestra su ventana (vacía por defecto). -You can create as many libraries as desired per project. A library created and built under macOS can be used under Windows and vice-versa. +![](assets/en/FormEditor/library4.png) -### Opening an object library +Puede crear tantas librerías como desee por proyecto. Una librería creada y construida en macOS puede utilizarse en Windows y viceversa. -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. +### Abrir una librería de objetos -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: +Una determinada librería de objetos sólo puede ser abierta por un proyecto a la vez. Sin embargo, se pueden abrir varias librerías diferentes en el mismo proyecto. +Para abrir una librería de objetos personalizada, seleccione el comando **Abrir>Librería de objetos...** en el menú **Archivo** o en la barra de herramientas de 4D. Aparece una caja de diálogo estándar para abrir archivos, que le permite seleccionar la librería de objetos que desea abrir. Puede seleccionar los siguientes tipos de archivos: - **.4dproject** - **.4dz** -In fact, custom object libraries are regular 4D projects. Only the following parts of a project are exposed when it is opened as library: +De hecho, las librerías de objetos personalizadas son proyectos 4D clásicos. Sólo se exponen las siguientes partes de un proyecto cuando se abre como librería: + +- formularios proyecto +- páginas formulario 1 -- project forms -- form pages 1 -### Building an object library +### Crear una librería de objetos -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. +Los objetos se colocan en una librería de objetos mediante una operación de arrastrar y soltar o de cortar, copiar y pegar. Pueden provenir de un formulario o de otra librería de objetos (incluyendo la [librería estándar](#using-the-standard-object-library)). No se conserva ningún enlace con el objeto original: si el original se modifica, el objeto copiado no se ve afectado. -> In order to be able to drag and drop objects from forms to object libraries, you must make sure the **Start drag and drop** option in the 4D Preferences is selected. +> Para poder arrastrar y soltar objetos de los formularios a las librerías de objetos, debe asegurarse de seleccionar la opción **Iniciar arrastrar y soltar** en las Preferencias de 4D. -Basic operations are available in the context menu or the options menu of the window: +Las principales operaciones están disponibles en el menú contextual o en el menú de opciones de la ventana: ![](assets/en/FormEditor/library5.png) -- **Cut** or **Copy** to the pasteboard -- **Paste** an object from the pasteboard -- **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. +- **Cortar** o **Copiar** al portapapeles +- **Pegar** un objeto del tablero portapapeles +- **Borrar** - elimina el objeto de la librería +- **Renombrar** - aparece una caja de diálogo que permite cambiar el nombre del elemento. Tenga en cuenta que los nombres de los objetos deben ser únicos en una librería. + -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: +Puede colocar objetos individuales (incluidos los subformularios) o conjuntos de objetos en una librería de objetos. Cada objeto o conjunto se agrupa en un solo elemento: ![](assets/en/FormEditor/library6.png) -An object library can contain up to 32,000 items. +Una librería de objetos puede contener hasta 32.000 elementos. -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. +Los objetos se copian con todas sus propiedades, tanto gráficas como funcionales, incluidos sus métodos. Estas propiedades se mantienen en su totalidad cuando el elemento se copia en un formulario o en otra librería. -#### Dependent objects +#### Objetos dependientes +El uso de copiar y pegar o arrastrar y soltar con ciertos objetos de librería también hace que se copien sus objetos dependientes. Por ejemplo, si se copia un botón, se copiará también el método del objeto que se pueda adjuntar. Estos objetos dependientes no se pueden copiar ni arrastrar y soltar directamente. -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. +A continuación se muestra una lista de objetos dependientes que se pegarán en la librería al mismo tiempo que el objeto principal que los utiliza (cuando corresponda): -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): +- Listas +- Formatos/Filtros +- Imágenes +- Mensajes de ayuda (asociados a un campo) +- Métodos objeto -- Lists -- Formats/Filters -- Pictures -- Help Tips (linked to a field) -- Object methods \ No newline at end of file diff --git a/website/translated_docs/es/FormEditor/pictures.md b/website/translated_docs/es/FormEditor/pictures.md new file mode 100644 index 00000000000000..f2d031836eed23 --- /dev/null +++ b/website/translated_docs/es/FormEditor/pictures.md @@ -0,0 +1,99 @@ +--- +id: pictures +title: Imágenes +--- + +4D soporta específicamente las imágenes utilizadas en sus formularios. + + +## Formatos nativos soportados + +4D integra la gestión nativa de los formatos de imagen. Esto significa que las imágenes se mostrarán y almacenarán en su formato original, sin ninguna interpretación en 4D. Las especificidades de los diferentes formatos (sombreado, áreas transparentes, etc.) se mantendrán cuando se copien y peguen, y se mostrarán sin alteraciones. Este soporte nativo es válido para todas las imágenes almacenadas en los formularios de 4D: [imágenes estáticas](FormObjects/staticPicture.md) pegadas en el modo Diseño, imágenes pegadas en [objetos de entrada](FormObjects/input_overview.md) en ejecución, etc. + +Los formatos de imagen más comunes son soportados en ambas plataformas: .jpeg, .gif, .png, .tiff, .bmp, etc. En macOS, el formato .pdf también está disponible para su codificación y descodificación. + +> La lista completa de formatos soportados varía según el sistema operativo y los códecs personalizados que estén instalados en las máquinas. Para saber qué códecs están disponibles, debe utilizar el comando `PICTURE CODEC LIST` (ver también la descripción de [tipo de datos imagen](Concepts/dt_picture.md)). + + + + +### Formato de imagen no disponible + +Se muestra un icono específico para las imágenes guardadas en un formato que no está disponible en la máquina. La extensión del formato que falta se muestra en la parte inferior del icono: + +![](assets/en/FormEditor/picNoFormat.png) + +El icono se utiliza automáticamente en todos los lugares en los que se pretende visualizar la imagen: + +![](assets/en/FormEditor/picNoFormat2.png) + +Este icono indica que la imagen no puede ser visualizada o manipulada localmente, pero puede ser guardada sin alteraciones para que pueda ser visualizada en otras máquinas. Este es el caso, por ejemplo, para las imágenes PDF en Windows, o las imágenes en formato PICT. + + +## Imágenes de alta resolución + +4D soporta imágenes de alta resolución tanto en plataformas macOS como Windows. Las imágenes de alta resolución pueden definirse por el factor de escala o dpi. + +### Factor de escala (sólo para macOS) + +Las pantallas de alta resolución tienen una mayor densidad de píxeles que las pantallas estándar tradicionales. Para que las imágenes se muestren correctamente en pantallas de alta resolución, el número de píxeles de la imagen debe multiplicarse por el *factor de escala* (*es decir*, dos veces más grande, tres veces más grande, etc.). + +Cuando se utilizan imágenes de alta resolución, se puede especificar el factor de escala añadiendo "@nx" en el nombre de la imagen (donde *n* designa el factor de escala). En la tabla siguiente, puede ver que el factor de escala se indica en los nombres de las imágenes de alta resolución, *circle@2x.png* y *circle@3x.png*. + +| Tipo de visualización | Factor de escala | Ejemplo | +| --------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------ | +| Resolución estándar | densidad de pixel 1:1. | **1x**
    ![](assets/en/FormEditor/pictureScale1.png) *circle.png* | +| Alta resolución | La densidad de píxeles se ha multiplicado por 2 o 3. |
    2x3x
    ![](assets/en/FormEditor/pictureScale2.png)*circle@2x.png*![](assets/en/FormEditor/pictureScale3.png)
    *circle@3x.png*
    | + + + +Las imágenes de alta resolución con la convención @nx pueden utilizarse en los siguientes objetos: + +* [Imágenes estáticas](FormObjects/staticPicture.md) +* [Botones](FormObjects/button_overview.md)/[radio](FormObjects/radio_overview.md)/[casillas de selección](FormObjects/checkbox_overview.md) +* [Botones imagen](FormObjects/pictureButton_overview.md)/[imagen Pop-up](FormObjects/picturePopupMenu_overview.md) +* [Pestañas](FormObjects/tabControl.md) +* [Encabezados de list box](FormObjects/listbox_overview.md#list-box-headers) +* [Iconos del menú](Menus/properties.md#item-icon) + + + +4D prioriza automáticamente las imágenes con mayor resolución.

    **Ejemplo**: cuando se utilizan dos pantallas (una de alta resolución y otra estándar) y se mueve un formulario de una pantalla a otra, 4D renderiza automáticamente la mayor resolución posible de la imagen. Incluso si un comando o propiedad especifica *circle.png*, se utilizará *circle@3x.png* (si existe). +> Tenga en cuenta que la priorización de la resolución sólo se produce para la visualización de imágenes en pantalla, no se realiza una priorización automática al imprimir. + + + +### DPI (macOS and Windows) + +Aunque 4D prioriza automáticamente la resolución más alta, existen, sin embargo, algunas diferencias de comportamiento en función de los ppp de la pantalla y de la imagen*(\*)*, y del formato de la imagen: + +| Operación | Comportamiento | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| Soltar o pegar | Si la imagen tiene:

    • **72dpi o 96dpi** - La imagen tiene el formato "[Center](FormObjects/properties_Picture.md#center--truncated-non-centered)" y el objeto que contiene la imagen tiene el mismo número de píxeles.
    • **Otro dpi** - La imagen tiene el formato "{Escalada para encajar](FormObjects/properties_Picture.md#scaled-to-fit)" y el objeto que contiene la imagen es igual a (número de píxeles de la imagen * dpi de la pantalla) / (dpi de la imagen)
    • **Sin dpi** - La imagen tiene el formato "{Escala para ajustar](FormObjects/properties_Picture.md#scaled-to-fit)".
    • | +| [Tamaño automático](https://doc.4d.com/4Dv18/4D/18/Setting-object-display-properties.300-4575725.en.html#148057) (menú contextual del editor de formularios) | Si el formato de visualización de la imagen es:
      • **[Scaled](FormObjects/properties_Picture.md#scaled-to-fit)** - El objeto que contiene la imagen se redimensiona según (número de píxeles de la imagen * dpi de la pantalla) / (dpide la imagen)
      • **Sin escalar** - El objeto que contiene la imagen tiene el mismo número de píxeles que la imagen.

      | + +*(\*) Generalmente, macOS = 72 dpi, Windows = 96 dpi* + + +## Dark mode pictures (macOS only) + +You can define specific pictures and icons to be used instead of standard pictures when [forms use the dark scheme](properties_FormProperties.md#color-scheme). + +A dark mode picture is defined in the following way: + +- dark mode picture has the same name as the standard (light scheme) version with the suffix "`_dark`" +- dark mode picture is stored next to the standard version. + +At runtime, 4D will automatically load the light or dark image according to the [current form color scheme](https://doc.4d.com/4dv19/help/command/en/1761.html). + +![](assets/en/FormEditor/darkicon.png) + + + +## Coordenadas del ratón en una imagen + +4D permite recuperar las coordenadas locales del ratón en un [objeto de entrada](FormObjects/input_overview.md) asociado a una [expresión de imagen](FormObjects/properties_Object.md#expression-type), en caso de que se haga clic o se pase por encima, incluso si se ha aplicado un desplazamiento o zoom a la imagen. Este mecanismo, similar al de un mapa de imágenes, puede utilizarse, por ejemplo, para manejar barras de botones desplazables o la interfaz de un software de cartografía. + +Las coordenadas se devuelven en las *MouseX* and *MouseY* [Variables Sistema](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.en.html). Las coordenadas se expresan en píxeles con respecto a la esquina superior izquierda de la imagen (0,0). Si el ratón está fuera del sistema de coordenadas de la imagen, se devuelve -1 en *MouseX* y *MouseY*. + +Puede obtener el valor de estas variables como parte de los eventos formulario [`On Clicked`](Events/onClicked.md), [`On Double Clicked`](Events/onDoubleClicked.md), [`On Mouse up`](Events/onMouseUp.md), [`On Mouse Enter`](Events/onMouseEnter.md), o [`On Mouse Move`](Events/onMouseMove.md). diff --git a/website/translated_docs/es/FormEditor/properties_Action.md b/website/translated_docs/es/FormEditor/properties_Action.md index dbf4fe7c042303..a050aadee4a387 100644 --- a/website/translated_docs/es/FormEditor/properties_Action.md +++ b/website/translated_docs/es/FormEditor/properties_Action.md @@ -1,29 +1,31 @@ --- id: action -title: Action +title: Acción --- -## Method +## Método -Reference of a method attached to the 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. See [Specialized methods](Concepts/methods.md#specialized-methods). +Referencia de un método adjunto al formulario. Puede utilizar un método formulario para gestionar datos y objetos, pero generalmente es más sencillo y eficiente utilizar un método objeto para estos fines. Ver [Métodos especializados](Concepts/methods.md#specialized-methods). -You do not call a form method—4D calls it automatically when an event involves the form to which the method is attached. +No llame a un método formulario - 4D lo llama automáticamente cuando un evento implica el formulario al que el método está asociado. -Several types of method references are supported: +Se soportan varios tipos de referencias de métodos: -- a standard project method file path, i.e. that uses the following pattern: - `method.4dm` - This type of reference indicates that the method file is located at the default location ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). In this case, 4D automatically handles the form method when operations are executed on the form (renaming, duplication, copy/paste...) +- una ruta de archivo de método proyecto estándar, es decir, que utilice el siguiente modelo: + `method.4dm` + Este tipo de referencia indica que el archivo de método se encuentra en la ubicación por defecto ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). En este caso, 4D maneja automáticamente el método formulario cuando se ejecutan operaciones en el formulario (renombrar, duplicar, copiar/pegar...) -- 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 form operations. +- un nombre de método proyecto: nombre de un método proyecto existente sin extensión de archivo, es decir: `myMethod` En este caso, 4D no soporta automáticamente las operaciones de formulario. -- a custom method file path including the .4dm extension, e.g.: - `MyMethods/myFormMethod.4dm` You can also use a filesystem: - `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. +- una ruta de acceso al archivo del método personalizado que incluya la extensión .4dm, por ejemplo: + `MyMethods/myFormMethod.4dm` También puede utilizar un sistema de archivos: + `/RESOURCES/Forms/FormMethod.4dm` En este caso, 4D no ofrece soporte automático para las operaciones con objetos. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | ---------------------------------------------------------------- | -| method | text | Form method standard or custom file path, or project method name | \ No newline at end of file +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | --------------------------------------------------------------------------------- | +| method | texto | Ruta estándar o personalizada del método formulario, o nombre del método proyecto | + diff --git a/website/translated_docs/es/FormEditor/properties_FormProperties.md b/website/translated_docs/es/FormEditor/properties_FormProperties.md index b150a134e3e136..5707bd4521f10f 100644 --- a/website/translated_docs/es/FormEditor/properties_FormProperties.md +++ b/website/translated_docs/es/FormEditor/properties_FormProperties.md @@ -1,37 +1,56 @@ --- id: propertiesForm -title: Form Properties +title: Propiedades de los formularios --- -* * * +--- + +## Color Scheme +> Color scheme property is only applied on macOS. + +This property defines the color scheme for the form. By default when the property is not set, the value for a color scheme is **inherited** (the form uses the scheme defined at the [application level](https://doc.4d.com/4dv19/help/command/en/page1762.html)). This can be changed for the form to one of the following two options: + +* dark - light text on a dark background +* light - dark text on a light background +> A defined color scheme can not be overridden by a CSS. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------- | +| colorScheme | cadena | "dark", "light" | + +--- ## Pages -Each form has is made of at least two pages: +Cada formulario consta de al menos dos páginas: + +- una página 0 (página de fondo) +- una página 1 (página principal) -- a page 0 (background page) -- a page 1 (main page) +Para más información, consulte [Páginas formulario](forms.md#form-pages). -For more information, please refer to [Form pages](forms.md#form-pages). -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ----- | ---------- | ------------------------------------------------------------------------ | -| pages | collection | Collection of pages (each page is an object, page 0 is the first element | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | --------------------------------------------------------------------------------- | +| pages | colección | Colección de páginas (cada página es un objeto, la página 0 es el primer elemento | +--- -* * * ## Form Name This property is the name of the form itself and is used to refer to the form by name using the 4D language. The form name must comply with the [rules specified for identifiers](Concepts/identifiers.md) in 4D. -#### JSON Grammar + +#### Gramática JSON The form name is defined by the name of the folder that contains the form.4Dform file. See [project architecture](Project/architecture.md#sources-folder) for more information. -* * * +--- ## Form Type @@ -43,25 +62,26 @@ Each table in a database generally has at least two table forms. One for listing - Input form - used for data entry. It displays a single record per screen and typically has buttons for saving and canceling modifications to the record and for navigating from record to record (*i.e.*, First Record, Last Record, Previous Record, Next Record). ![](assets/en/FormObjects/formInput.png) + Supported types depend on the form category: -| Form Type | JSON grammar | Description | Supported with | + +| Form Type | Gramática JSON | Descripción | Supported with | | ------------------------ | ---------------- | ------------------------------------------------------------- | --------------------------- | -| Detail Form | detailScreen | A display form for data entry and modification | Project forms - Table forms | +| Formulario detallado | detailScreen | A display form for data entry and modification | Project forms - Table forms | | Detail Form for Printing | detailPrinter | A printed report with one page per record, such as an invoice | Project forms - Table forms | | List Form | listScreen | A form for listing records on the screen | Table forms | | List Form for Printing | listPrinter | A printed report that list records | Table forms | -| None | *no destination* | A form with no specific feature | Project forms - Table forms | - +| Ninguno | *no destination* | A form with no specific feature | Project forms - Table forms | -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ------------------------------------------------------------ | -| destination | string | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ------------------------------------------------------------ | +| destination | cadena | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | -* * * +--- ## Inherited Form Name @@ -71,14 +91,15 @@ To inherit from a table form, set the table in the [Inherited Form Table](#inher To remove inheritance, select **\** in the Property List (or " " in JSON). -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | -| inheritedForm | string | Name of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ------------------------------------------------------------------------------------------------------------------ | +| inheritedForm | cadena | Name of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form | +--- -* * * ## Inherited Form Table @@ -86,71 +107,73 @@ This property specifies the database table from which to [inherit a form](forms. Set to **\** in the Property List (or " " in JSON) to inherited from a project form. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | ---------------- | -------------------------- | -| inheritedFormTable | string or number | table name or table number | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | --------------- | -------------------------- | +| inheritedFormTable | string o number | table name or table number | -* * * -## Published as Subform +--- + +## Publicado como Subformulario -For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host database, it must have been explicitly shared. When this property is selected, the form will be published in the host database. +Para que un formulario componente sea seleccionado como [subformulario](FormObjects/subform_overview.md) en una aplicación anfitriona, debe haber sido compartido explícitamente. When this property is selected, the form will be published in the host application. Only project forms can be specified as published subforms. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | --------------- | -| shared | boolean | true, false | +#### Gramática JSON -* * * +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| shared | booleano | true, false | -## Save Geometry -When the option is used, if the window is opened using the `Open form window` command with the `*` parameter, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session: +--- -* the current page, -* the position, size and visibility of each form object (including the size and visibility of list box columns). +## Memorizar geometría -> This option does not take into account objects generated using the `OBJECT DUPLICATE` command. In order for a user to recover their environment when using this command, the developer must repeat the sequence of creation, definition and positioning of the objects. +Cuando se utiliza esta opción, si la ventana se abre utilizando el comando `Open form window` con el parámetro `*`, varios parámetros del formulario son guardados automáticamente por 4D cuando se cierra la ventana, independientemente de cómo se hayan modificado durante la sesión: -When this option is selected, the [Save Value](FormObjects/properties_Object.md#save-value) option is available for certain objects. +* la página actual, +* la posición, el tamaño y la visibilidad de cada objeto del formulario (incluyendo el tamaño y la visibilidad de las columnas de list box). +> Esta opción no tiene en cuenta los objetos generados con el comando `OBJECT DUPLICATE`. Para que un usuario pueda recuperar su entorno al utilizar este comando, el desarrollador debe repetir la secuencia de creación, definición y posicionamiento de los objetos. -#### JSON Grammar +Cuando se selecciona esta opción, la opción [Guardar valor](FormObjects/properties_Object.md#save-value) está disponible para ciertos objetos. -| Name | Data Type | Possible Values | -| ---------------- | --------- | --------------- | -| memorizeGeometry | boolean | true, false | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------------- | -------------- | ---------------- | +| memorizeGeometry | booleano | true, false | -#### See also +#### Ver también +[**Guardar valor**](FormObjects/properties_Object.md#save-value) -[**Save Value**](FormObjects/properties_Object.md#save-value) -* * * +--- + +## Título de la ventana -## Window Title +El título de la ventana se utiliza cuando se abre el formulario mediante los comandos `Open form window` y `Open window`4D en el entorno de la aplicación. El nombre de la ventana aparece en la barra de título de la ventana. -The window title is used when the form is opened using the `Open form window` and `Open window` 4D commands in Application environment. The window title appears in the Title bar of the window. +Puede utilizar referencias dinámicas para definir los nombres de ventana de los formularios, *es decir*: -You can use dynamic references to set the window titles for forms, *i.e.*: +* Una referencia estándar XLIFF almacenada en la carpeta Resources. +* Una etiqueta de tabla o de campo: la sintaxis a aplicar es o + + . +* Una variable o un campo: la sintaxis a aplicar es \ o <[TableName]FieldName>. El valor actual del campo o de la variable se mostrará en el título de la ventana. -* A standard XLIFF reference stored in the Resources folder. -* A table or field label: The syntax to apply is or - - . +> El número de caracteres para el título de una ventana está limitado a 31. -* A variable or a field: The syntax to apply is \ or <[TableName]FieldName>. The current value of the field or variable will be displayed in the window title. +#### Gramática JSON -> The number of characters for a window title is limited to 31. +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | -------------------------------------------------------- | +| windowTitle | cadena | El nombre de la ventana como texto plano o de referencia | -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ------------------------------------------------------ | -| windowTitle | string | The name of the window as plain text or as a reference | \ No newline at end of file diff --git a/website/translated_docs/es/FormEditor/properties_FormSize.md b/website/translated_docs/es/FormEditor/properties_FormSize.md index 03eb07023cfc73..ae947437a0eb89 100644 --- a/website/translated_docs/es/FormEditor/properties_FormSize.md +++ b/website/translated_docs/es/FormEditor/properties_FormSize.md @@ -4,251 +4,114 @@ title: Form Size --- -4D lets you set the size of both the form and the [window](properties_WindowSize.md). These properties are interdependent and your application interface results from their interaction. - -Size options depend on the value of the **Size based on** option. - -* * * - -## Size based on - -* **Automatic Size**: The size of the form will be that necessary to display all the objects, to which will be added the margin values (in pixels) entered in the [**Hor. Margin**](#hor-margin) and [**Vert. Margin**](#vert-margin) fields. - -< - -p> You can choose this option when you want to use active objects placed in an offscreen area (*i.e.*, outside the bounding rectangle of the window) with an automatic size window. Thanks to this option, the presence of these objects will not modify the size of the window. - -* **Set Size**: The size of the form will be based on what you enter (in pixels) in the [**Width**](#width) and [**Height**](#height) fields. - -* **\ - - - : The size of the form will be based on the position of the selected form object. For example, if you choose an object that is placed in the bottom-right part of the area to be displayed, the form size will consist of a rectangle whose upper left corner will be the origin of the form and the lower right corner will correspond to that of the selected object, plus any margin values.

      - -
      -

      - For output forms, only the Hor. margin or Width fields are available. -

      -
      - -

      - JSON Grammar -

      - - - - - - - - - - - - - - - - - -
      - Name - - Data Type - - Possible Values -
      - formSizeAnchor - - string - - Name of object to use to defined the size of the form -
      - -
      - -

      - Height -

      - -

      - Height of the form (in pixels) when the form size is Set size. -

      - -

      - JSON Grammar -

      - - - - - - - - - - - - - - - - - -
      - Name - - Data Type - - Possible Values -
      - height - - number - - integer value -
      - -
      - -

      - Hor. Margin -

      - -

      - Value to add (in pixels) to the right margin of the form when the form size is Automatic size or \ - - -

      - -

      - This value also determines the right-hand margins of forms used in the Label editor. -

      - -

      - JSON Grammar -

      - - - - - - - - - - - - - - - - - -
      - Name - - Data Type - - Possible Values -
      - rightMargin - - number - - integer value -
      - -
      - -

      - Vert. Margin -

      - -

      - Value to add (in pixels) to the bottom margin of the form when the form size is Automatic size or \ - - - .

      - -

      - This value also determines the top margins of forms used in the Label editor. -

      - -

      - JSON Grammar -

      - - - - - - - - - - - - - - - - - -
      - Name - - Data Type - - Possible Values -
      - bottomMargin - - number - - integer value -
      - -
      - -

      - Width -

      - -

      - Width of the form (in pixels) when the form size is Set size. -

      - -

      - JSON Grammar -

      - - - - - - - - - - - - - - - - - -
      - Name - - Data Type - - Possible Values -
      - width - - number - - integer value -
      \ No newline at end of file +4D permite definir el tamaño tanto del formulario como de la [ventana](properties_WindowSize.md). Estas propiedades son interdependientes y su interfaz de aplicación es el resultado de su interacción. + +Las opciones de tamaño dependen del valor de la opción **Tamaño basado en**. + +--- +## Tamaño basado en + + +* **Tamaño automático**: el tamaño del formulario será el necesario para mostrar todos los objetos, al que se añadirán los valores de margen (en píxeles) introducidos en + +**los campos **Margen [hor.](#hor-margin) y Margen [**ver.** Margin](#vert-margin) fields.

      Puede elegir esta opción cuando desee utilizar objetos activos situados en un área fuera de la pantalla (*es decir*, fuera del rectángulo delimitador de la ventana) con una ventana de tamaño automático. Gracias a esta opción, la presencia de estos objetos no modificará el tamaño de la ventana.

      + + * **Definir tamaño**: el tamaño del formulario se basará en lo que introduzca (en píxeles) en los campos [**Ancho**](#width) y [**Alto**](#height). + +* **\**: el tamaño del formulario se basará en la posición del objeto formulario seleccionado. Por ejemplo, si elige un objeto situado en la parte inferior derecha del área a mostrar, el tamaño del formulario consistirá en un rectángulo cuya esquina superior izquierda será el origen del formulario y la esquina inferior derecha corresponderá a la del objeto seleccionado, más los valores de los márgenes. + + + + +> Para los formularios de salida, sólo se pueden utilizar los campos Margen [**hor. **](#hor-margin) o [**Largo**](width) son disponibles. + + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | ------------------------------------------------------------------ | +| formSizeAnchor | cadena | Nombre del objeto a utilizar para definir el tamaño del formulario | + + + + +--- + + +## Altura + +Altura del formulario (en píxeles) cuando el [ tamaño del formulario ](#size-based-on) está definido en **Fijar tamaño **. + + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ------------------ | +| height | number | valor entero largo | + + + + + +--- + + +## Margen hor. + +Valor a añadir (en píxeles) al margen derecho del formulario cuando el [tamaño del formulario](#size-based-on) está definido en **Tamaño automático** o **\** + +Este valor también determina los márgenes derechos de los formularios utilizados en el editor de etiquetas. + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ------------------ | +| rightMargin | number | valor entero largo | + + + + + +--- + + + +## Margen hor. + +Valor a añadir (en píxeles) al margen inferior del formulario cuando el [tamaño del formulario](#size-based-on) está definido en **Tamaño automático** o **\**. + +Este valor también determina los márgenes superiores de los formularios utilizados en el editor de etiquetas. + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ------------------ | +| bottomMargin | number | valor entero largo | + + + + + +--- + + +## Ancho + +Ancho del formulario (en píxeles) cuando el [ tamaño del formulario ](#size-based-on) está definido en **Fijar tamaño **. + + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ------------------ | +| ancho | number | valor entero largo | diff --git a/website/translated_docs/es/FormEditor/properties_JSONref.md b/website/translated_docs/es/FormEditor/properties_JSONref.md index 9b676c21e211c3..75aa681a68a254 100644 --- a/website/translated_docs/es/FormEditor/properties_JSONref.md +++ b/website/translated_docs/es/FormEditor/properties_JSONref.md @@ -1,48 +1,52 @@ --- id: jsonReference -title: JSON property list +title: Lista de propiedades JSON --- -This page provides a comprehensive list of all form properties, sorted by their JSON name. Click on a property name to access its detailed description. +Esta página ofrece una lista completa de todas las propiedades de los formularios, ordenadas por su nombre JSON. Haga clic en el nombre de una propiedad para acceder a su descripción detallada. +> En el capítulo "Propiedades del formulario", las propiedades se ordenan según sus nombres y temas en la lista de propiedades. -> In the "Form Properties" chapter, properties are sorted according to their names and themes in the Property List. +[a](#a) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [h](#h) - [i](#i) - [m](#m) - [p](#p) - [r](#r) - [s](#s) - [w](#w) -| Property | Description | Possible Values | -| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| a | | | -| [bottomMargin](properties_FormSize.md#vert-margin) | Vertical margin value (in pixels) | minimum: 0 | -| **d** | | | -| [destination](properties_FormProperties.md#form-type) | Form type | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | -| **e** | | | -| [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"...]. | -| **f** | | | -| [formSizeAnchor](properties_FormSize.md#form-size) | Name of the object whose position determines the size of the form. (minimum length: 1) | Name of a 4D object | -| **h** | | | -| [height](properties_FormSize.md#height) | Height of the form | minimum: 0 | -| **i** | | | -| [inheritedForm](properties_FormProperties.md#inherited-form-name) | Designates the form to inherit | Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form | -| [inheritedFormTable](properties_FormProperties.md#inherited-form-table) | Designates the table an inherited form will use | A table name or number | -| **m** | | | -| [markerBody](properties_Markers.md#form-detail) | Detail marker position | minimum: 0 | -| [markerBreak](properties_Markers.md#form-break) | Break marker position(s) | minimum: 0 | -| [markerFooter](properties_Markers.md#form-footer) | Footer marker position | minimum: 0 | -| [markerHeader](properties_Markers.md#forrm-header) | Header marker position(s) | integer minimum: 0; integer array minimum: 0 | -| [memorizeGeometry](properties_FormProperties.md#memorize-geometry) | Saves the form parameters when the form window is closed | true, false | -| [menuBar](properties_Menu.md#associated-menu-bar) | Menu bar to associate to the form | Name of a valid menu bar | -| [method](properties_Action.md#method) | A project method name. | The name of an existing project method | -| **p** | | | -| [pages](properties_FormProperties.md#pages) | Collection of pages (each page is an object) | Page objects | -| [pageFormat](properties_Print.md#settings) | object | Available print properties | -| **r** | | | -| [rightMargin](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | minimum: 0 | -| **s** | | | -| [shared](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | -| **w** | | | -| [width](properties_FormSize.md#width) | Width of the form | minimum: 0 | -| [windowMaxHeight](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | minimum: 0 | -| [windowMaxWidth](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | minimum: 0 | -| [windowMinHeight](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | minimum: 0 | -| [windowMinWidth](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | minimum: 0 | -| [windowSizingX](properties_WindowSize.md#fixed-width) | Form window's vertical sizing | "fixed", "variable" | -| [windowSizingY](properties_WindowSize.md#fixed-height) | Form window's horizontal sizing | "fixed", "variable" | -| [windowTitle](properties_FormProperties.md#window-title) | Designates a form window's title | A name for the form window | \ No newline at end of file +| Propiedad | Descripción | Valores posibles | +| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **a** | | | +| [`bottomMargin`](properties_FormSize.md#垂直-マージン) | Valor del margen vertical (en píxeles) | mínimo: 0 | +| **c** | | | +| [`colorScheme`](properties_FormProperties.md#color-scheme) | Color scheme for the form | "dark", "light" | +| **d** | | | +| [`destination`](properties_FormProperties.md#form-type) | Tipo de formulario | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +| **e** | | | +| [`entryOrder`](formEditor.md#data-entry-order) | El orden en el cual los objetos activos son seleccionados cuando la tecla **Tab** o la tecla **Retorno de carro** se utilizan en un formulario de entrada | Colección de nombres de objetos 4D Form | +| [`events`](Events/overview.md) | List of all events selected for the object or form | Collection of event names, e.g. ["onClick","onDataChange"...]. | +| **f** | | | +| [`formSizeAnchor`](properties_FormSize.md#form-size) | Nombre del objeto cuya posición determina el tamaño del formulario. (longitud mínima: 1) | Nombre de un objeto 4D | +| **h** | | | +| [`height`](properties_FormSize.md#height) | Altura del formulario | mínimo: 0 | +| **i** | | | +| [`inheritedForm`](properties_FormProperties.md#inherited-form-name) | Designa el formulario a heredar | Nombre (cadena) de la tabla o formulario proyecto O una ruta POSIX (cadena) a un archivo .json que describa el formulario O un objeto que describa el formulario | +| [`inheritedFormTable`](properties_FormProperties.md#inherited-form-table) | Designa la tabla que utilizará un formulario heredado | Un nombre o número de tabla | +| **m** | | | +| [`markerBody`](properties_Markers.md#form-detail) | Posición del marcador de detalle | mínimo: 0 | +| [`markerBreak`](properties_Markers.md#form-break) | Posición del marcador de ruptura | mínimo: 0 | +| [`markerFooter`](properties_Markers.md#form-footer) | Posición del marcador de pie | mínimo: 0 | +| [`markerHeader`](properties_Markers.md#forrm-header) | Posición del marcador de encabezado | integer minimum: 0; integer array minimum: 0 | +| [`memorizeGeometry`](properties_FormProperties.md#memorize-geometry) | Guarda los parámetros del formulario cuando se cierra la ventana del mismo | true, false | +| [`menuBar`](properties_Menu.md#associated-menu-bar) | Barra de menú a asociar al formulario | Nombre de una barra de menú válida | +| [`method`](properties_Action.md#method) | A project method name. | The name of an existing project method | +| **p** | | | +| [`pages`](properties_FormProperties.md#pages) | Colección de páginas (cada página es un objeto) | Objetos página | +| [`pageFormat`](properties_Print.md#settings) | objeto | Propiedades de impresión disponibles | +| **r** | | | +| [`rightMargin`](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | mínimo: 0 | +| **s** | | | +| [`shared`](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | +| **w** | | | +| [`ancho`](properties_FormSize.md#width) | Width of the form | mínimo: 0 | +| [`windowMaxHeight`](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | mínimo: 0 | +| [`windowMaxWidth`](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | mínimo: 0 | +| [`windowMinHeight`](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | mínimo: 0 | +| [`windowMinWidth`](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | mínimo: 0 | +| [`windowSizingX`](properties_WindowSize.md#fixed-width) | Dimensionamiento vertical de la ventana del formulario | "fixed", "variable" | +| [`windowSizingY`](properties_WindowSize.md#fixed-height) | Dimensionamiento horizontal de la ventana del formulario | "fixed", "variable" | +| [`windowTitle`](properties_FormProperties.md#window-title) | Designa el título de una ventana de formulario | Un nombre para la ventana de formulario | \ No newline at end of file diff --git a/website/translated_docs/es/FormEditor/properties_Markers.md b/website/translated_docs/es/FormEditor/properties_Markers.md index 07f8e1dfe6a8c8..e9e1e30c22cb90 100644 --- a/website/translated_docs/es/FormEditor/properties_Markers.md +++ b/website/translated_docs/es/FormEditor/properties_Markers.md @@ -1,6 +1,6 @@ --- -id: markers -title: Markers +id: marcadores +title: Marcadores --- @@ -10,7 +10,7 @@ Whenever any form is used for output, either for screen display or printing, the Methods that are associated with objects in these areas are executed when the areas are printed or displayed as long as the appropriate events have been activated. For example, a object method placed in the Header area is executed when the `On Header` event takes place. -* * * +--- ## Form Break @@ -20,15 +20,14 @@ The Break area is defined as the area between the Detail control line and the Br You can make Break areas smaller or larger. You can use a Break area to display information that is not part of the records (instructions, current date, current time, etc.), or to display a line or other graphic element that concludes the screen display. In a printed report, you can use a Break area for calculating and printing subtotals and other summary calculations. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------------------------------- | ------------------------------------------------------------------------------------------- | -| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels. -Minimum value: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | --------------------------------- | -------------------------------------------------------------------------------------------------- | +| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels.
      Minimum value: 0 | -* * * +--- ## Form Detail @@ -36,50 +35,39 @@ The form Detail area is displayed on the screen and printed once for each record You can make the Detail area smaller or larger. Whatever you place in the Detail area is displayed or printed once for each record. Most often you place fields or variables in the Detail area so that the information in each record is displayed or printed, but you can place other elements in the Detail area as well. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---------- | --------- | ---------------------------------- | -| markerBody | integer | Detail marker position. Minimum: 0 | +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | --------------------------------- | +| markerBody | integer | Detail marker position. Mínimo: 0 | - -* * * +--- ## Form Footer The Form Footer area is displayed on screen under the list of records. It is always printed at the bottom of every page of a report. The Footer area is defined as the area between the Break control line and the Footer control line. - -You make the Footer area smaller or larger. - -< - -p> +You make the Footer area smaller or larger.

      You can use the Footer area to print graphics, page numbers, the current date, or any text you want at the bottom of each page of a report. For output forms designed for use on screen, the Footer area typically contains buttons that give the user options such as doing a search or sort, printing records, or putting away the current report. Active objects are accepted. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------- | -| markerFooter | integer | minimum: 0 | +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------- | +| markerFooter | integer | mínimo: 0 | -* * * +--- ## Form Header The form Header area is displayed at the top of each screen and is printed at the top of each page of a report. The Header area is defined as the area above the Header control line. - -You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern. - -< - -p> +You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern.

      You can also place and use active objects in the Header area of output forms displayed as subforms, in the records display window or using the `DISPLAY SELECTION` and `MODIFY SELECTION` commands. The following active objects can be inserted: - Buttons, picture buttons, -- Combo boxes, drop-down lists, picture pop-up menus, +- Combo boxes, drop-down lists, picture pop-up menus, - hierarchical lists, list boxes - Radio buttons, check boxes, 3D check boxes, - Progress indicators, rulers, steppers, spinners. @@ -88,15 +76,17 @@ Standard actions such as `Add Subrecord`, `Cancel` (lists displayed using `DISPL The form can contains [additional header areas](#additional-areas) to be associated with additional breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------------------------------- | --------------------------------------------------------------------------------------------- | -| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels. -Minimum value: 0 | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------- | +| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels.
      Minimum value: 0 | -* * * + + +--- ## Additional areas @@ -112,16 +102,19 @@ Break at level 0 zero takes in all the records; it occurs after all the records A Break level 1 occurs after the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Break 1|Break at level 1|First sorted field Form Break 2|Break at level 2|Second sorted field Form Break 3|Break at level 3|Third sorted field| +| Label | Descripción | Prints after groups created by: | +| ------------ | ---------------- | ------------------------------- | +| Form Break 1 | Break at level 1 | First sorted field | +| Form Break 2 | Break at level 2 | Second sorted field | +| Form Break 3 | Break at level 3 | Third sorted field | Additional Header areas are associated with Breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Header 1|Header at level 1|First sorted field Form Header 2|Header at level 2|Second sorted field Form Header 3|Header at level 3|Third sorted field| +| Label | Descripción | Prints after groups created by: | +| ------------- | ----------------- | ------------------------------- | +| Form Header 1 | Header at level 1 | First sorted field | +| Form Header 2 | Header at level 2 | Second sorted field | +| Form Header 3 | Header at level 3 | Third sorted field | + -If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. \ No newline at end of file +If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. diff --git a/website/translated_docs/es/FormEditor/properties_Menu.md b/website/translated_docs/es/FormEditor/properties_Menu.md index 8c6e7ec491cc28..195075ae775dcb 100644 --- a/website/translated_docs/es/FormEditor/properties_Menu.md +++ b/website/translated_docs/es/FormEditor/properties_Menu.md @@ -1,21 +1,23 @@ --- id: menu -title: Menu +title: Menú --- -## Associated Menu Bar +## Barra de menús asociada -When a menu bar is associated to a form, it is added to the right of the current menu bar when the form is displayed in Application environment. +Cuando se asocia una barra de menú a un formulario, ésta se añade a la derecha de la barra de menú actual cuando el formulario se muestra en el entorno Aplicación. -The selection of a menu command causes an `On Menu Selected` event to be sent to the form method; you can then use the `Menu selected` command to test the selected menu. +La selección de un comando de menú hace que se envíe un evento `On Menu Selected` al método formulario; entonces puede utilizar el comando `Menu selected` para probar el menú seleccionado. -> If the menu bar of the form is identical to the current menu bar, it is not added. +> Si la barra de menús del formulario es idéntica a la barra de menús actual, no se añade. -The form menu bar will operate for both input and output forms. +La barra de menús del formulario funcionará tanto para los formularios de entrada como para los de salida. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------- | --------- | ------------------ | -| menuBar | string | Name of a menu bar | \ No newline at end of file +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------- | -------------- | --------------------------- | +| menuBar | cadena | Nombre de una barra de menú | + diff --git a/website/translated_docs/es/FormEditor/properties_Print.md b/website/translated_docs/es/FormEditor/properties_Print.md index 2033e1a3aa7848..4c20b00256acca 100644 --- a/website/translated_docs/es/FormEditor/properties_Print.md +++ b/website/translated_docs/es/FormEditor/properties_Print.md @@ -1,6 +1,6 @@ --- id: print -title: Print +title: Imprimir --- @@ -12,22 +12,34 @@ Allows defining specific print settings for the form. This feature is useful to You can modify the following print settings: -* Paper format -* Paper orientation -* Page scaling +* Paper format +* Paper orientation +* Page scaling + > Available options depend on the system configuration. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------- | ------------------------------------------------------------------------------------ | -| pageFormat | object | Available print properties: paperName, paperWidth, paperHeight, orientation, scale | -| paperName | string | "A4", "US Letter"... | -| paperWidth | string | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | -| paperHeight | string | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | -| orientation | string | "landscape" (default is "portrait") | -| scale | number | minimum: 0 | -* * * \ No newline at end of file +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ------------------------------------------------------------------------------------ | +| pageFormat | objeto | Available print properties: paperName, paperWidth, paperHeight, orientation, scale | +| paperName | cadena | "A4", "US Letter"... | +| paperWidth | cadena | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | +| paperHeight | cadena | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | +| orientation | cadena | "landscape" (default is "portrait") | +| scale | number | mínimo: 0 | + + +--- + + + + + + + + diff --git a/website/translated_docs/es/FormEditor/properties_WindowSize.md b/website/translated_docs/es/FormEditor/properties_WindowSize.md index c72a3734480818..feeef1db060a64 100644 --- a/website/translated_docs/es/FormEditor/properties_WindowSize.md +++ b/website/translated_docs/es/FormEditor/properties_WindowSize.md @@ -1,58 +1,65 @@ --- id: windowSize -title: Window Size +title: Tamaño de la ventana --- -## Fixed Height +## Alto fijo -If you select this option, the window height will be locked and it will not be possible for the user to resize it. -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Height and Maximum Height](#maximum-height-minimum-height) properties can be used to determine the resizing limits. +Si selecciona esta opción, la altura de la ventana quedará bloqueada y el usuario no podrá cambiar su tamaño. -#### JSON Grammar +Si no se selecciona esta opción, se puede modificar el ancho de la ventana del formulario. En este caso, las propiedades [Altura mínima y Altura máxima](#maximum-height-minimum-height) pueden utilizarse para determinar los límites de redimensionamiento. -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------- | -| windowSizingY | string | "fixed", "variable" | +#### Gramática JSON -* * * +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ------------------- | +| windowSizingY | cadena | "fixed", "variable" | -## Fixed Width -If you select this option, the window width will be locked and it will not be possible for the user to resize it. +--- + +## Ancho fijo + + +Si selecciona esta opción, el ancho de la ventana quedará bloqueada y el usuario no podrá cambiar su tamaño. + +Si no se selecciona esta opción, se puede modificar el ancho de la ventana del formulario. En este caso, las propiedades [Ancho mínimo y Alto máximo](#maximum-width-minimum-width) pueden utilizarse para determinar los límites de redimensionamiento. -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Width and Maximum Width](#maximum-width-minimum-width) properties can be used to determine the resizing limits. -#### JSON Grammar +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ------------------- | +| windowSizingX | cadena | "fixed", "variable" | + +--- + -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------- | -| windowSizingX | string | "fixed", "variable" | +## Altura máxima, Altura mínima -* * * +Altura máxima y mínima (en píxeles) de una ventana de formulario redimensionable si la opción [Alto fijo](#fixed-height) no está definida. -## Maximum Height, Minimum Height +##### Gramática JSON -Maximum and minimum height (in pixels) of a resizeable form window if the [Fixed Height](#fixed-height) option is not set. +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | ------------------ | +| windowMinHeight | number | valor entero largo | +| windowMaxHeight | number | valor entero largo | -##### JSON Grammar -| Name | Data Type | Possible Values | -| --------------- | --------- | --------------- | -| windowMinHeight | number | integer value | -| windowMaxHeight | number | integer value | +## Ancho máximo, Ancho mínimo +Ancho máximo y mínimo (en píxeles) de una ventana de formulario redimensionable si la opción [Ancho fijo](#fixed-width) no está definida. -## Maximum Width, Minimum Width -Maximum and minimum width (in pixels) of a resizeable form window if the [Fixed Width](#fixed-width) option is not set. +#### Gramática JSON -#### JSON Grammar +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | ------------------ | +| windowMinWidth | number | valor entero largo | +| windowMaxWidth | number | valor entero largo | -| Name | Data Type | Possible Values | -| -------------- | --------- | --------------- | -| windowMinWidth | number | integer value | -| windowMaxWidth | number | integer value | \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/buttonGrid_overview.md b/website/translated_docs/es/FormObjects/buttonGrid_overview.md index 05b4c013ba041c..2b83a5f760829f 100644 --- a/website/translated_docs/es/FormObjects/buttonGrid_overview.md +++ b/website/translated_docs/es/FormObjects/buttonGrid_overview.md @@ -1,32 +1,33 @@ --- id: buttonGridOverview -title: Button Grid +title: Rejilla de botones --- -## Overview - -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: +Una rejilla de botones es un objeto transparente que se coloca sobre una imagen. La imagen debe corresponder a la forma d eun array. Cuando se hace clic en uno de los gráficos, éste tendrá un aspecto presionado: ![](assets/en/FormObjects/buttonGrid_smileys.png) -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. +Puede utilizar un objeto rejilla de botones para determinar dónde hace clic el usuario en la imagen. El método objeto utilizaría el evento `On Clicked` y tomaría la acción apropiada dependiendo de la ubicación del clic. + -## Creating button grids +## Crear rejillas de botones -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). +Para crear la rejilla de botones, añada una imagen de fondo al formulario y coloque una rejilla de botones sobre ella. Especifique el número de [líneas](properties_Crop.md#rows) y de [columnas](properties_Crop.md#columns). -In 4D, a button grid is used as a color palette: +En 4D, se utiliza una rejilla de botones para las paletas de colores: ![](assets/en/FormObjects/button_buttonGrid.png) -## Using button grids +## Utilizar rejillas de botones + +Los botones de la rejilla están numerados de izquierda a derecha y de arriba a abajo. En el ejemplo anterior, la rejilla tiene 16 columnas a lo ancho por 16 líneas a hacia abajo. El botón en la posición superior izquierda devuelve 1 cuando se hace clic. Si se selecciona el botón rojo del extremo derecho de la segunda fila, la rejilla de botones devuelve 32. Si no se selecciona ningún elemento, el valor es 0 + -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 +### Ir a la página -### Goto page +Puede asociar el `gotoPage` [acción estándar](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) a una rejilla de botones. Cuando se selecciona esta acción, 4D mostrará automáticamente la página del formulario que corresponde al número del botón que está seleccionado en la rejilla de botones. Por ejemplo, si el usuario selecciona el décimo botón de la rejilla, 4D mostrará la décima página del formulario actual (si existe). -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 +## Propiedades soportadas -[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 del borde](properties_BackgroundAndBorder.md#border-line-style) - [Inferior](properties_CoordinatesAndSizing. md#bottom) - [Clase](properties_Object.md#css-class) - [Columnas](properties_Crop.md#columns) - [Altura](properties_CoordinatesAndSizing.md#height) - [Consejo de ayuda](properties_Help.md#help-tip) - [Tamaño horizontal](properties_ResizingOptions. md#horizontal-sizing) - [Izquierda](properties_CoordinatesAndSizing.md#left) - [Nombre del objeto](properties_Object. md#object-name) - [Derecha](properties_CoordinatesAndSizing.md#right) - [Filas](properties_Crop.md#rows) - [Acción estándar](properties_Action. md#standard-action) - [Superior](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object. md#type) - [Variable o expresión](properties_Object.md#variable-or-expression) - [Tamaño vertical](properties_ResizingOptions. md#vertical-sizing) - [Ancho](properties_CoordinatesAndSizing.md#width) - [Visibilidad](properties_Display.md#visibility) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/button_overview.md b/website/translated_docs/es/FormObjects/button_overview.md index 21d5a72396ca49..6a006d16e0622c 100644 --- a/website/translated_docs/es/FormObjects/button_overview.md +++ b/website/translated_docs/es/FormObjects/button_overview.md @@ -1,76 +1,82 @@ --- id: buttonOverview -title: Button +title: Botón --- -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. +Un botón es un objeto activo al que se le puede asignar una acción (*por ejemplo*, una tarea de base de datos o una función de interfaz) para que la realice cuando un usuario haga clic en él. ![](assets/en/FormObjects/button_regular.png) -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. +Los botones pueden cumplir diversas funciones, según su estilo y la acción que se les asigne. Por ejemplo, los botones pueden guiar al usuario a través de un cuestionario o formulario para que lo llene, o para que tome decisiones. Dependiendo de sus propiedades, un botón puede estar diseñado para ser presionado una sola vez y ejecutar un comando, mientras que otros pueden requerir que el usuario haga clic más de una vez para recibir el resultado deseado. -< +## Gestión de botones -p> +Las acciones asignadas a los botones pueden provenir de [acciones estándar](properties_Action.md#standard-action) o de métodos de objetos personalizados. Algunos ejemplos de acciones típicas son permitir al usuario aceptar, cancelar o eliminar registros, copiar o pegar datos, pasar de una página a otra en un formulario de varias páginas, abrir, eliminar o añadir registros en un subformulario, manejar los atributos de las fuentes en las áreas de texto, etc. -## Handling buttons +Los botones con acciones estándar se atenúan cuando es apropiado durante la ejecución del formulario. Por ejemplo, si se muestra el primer registro de una tabla, un botón con la acción estándar `firstRecord` aparecería atenuado. -The actions assigned to buttons can originate from predefined [standard actions](properties_Action.md#standard-action) or from custom object methods. Examples of typical actions include letting the user accept, cancel, or delete records, copy or paste data, move from page to page in a multi-page form, open, delete, or add records in a subform, handle font attributes in text areas, etc. +Si desea que un botón realice una acción que no está disponible como acción estándar, deje el campo de acción estándar vacío y escriba un método de objeto para especificar la acción del botón. Para más información sobre los métodos de objetos y cómo crearlos y asociarlos, ver [Uso de los métodos objeto](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-object-methods.300-4163733.en.html). Normalmente, se activaría el evento `On Clicked` y el método se ejecutaría sólo cuando se presiona el botón. Puede asociar un método a cualquier botón. -Buttons with standard actions are dimmed when appropriate during form execution. For example, if the first record of a table is displayed, a button with the `firstRecord` standard action would appear dimmed. +La [variable](properties_Object.md#variable-or-expression) asociada a un botón se define automáticamente a **0** cuando el formulario se ejecuta por primera vez en modo Diseño o Aplicación. Cuando el usuario hace clic en un botón, su variable se define como **1**. -If you want a button to perform an action that's not available as a standard action, leave the standard action field empty and write an object method to specify the button’s action. For more information about object methods and how to create and associate them, see [Using object methods](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-object-methods.300-4163733.en.html). Normally, you would activate the `On Clicked` event and the method would run only when the button is clicked. You can associate a method with any button. -The [variable](properties_Object.md#variable-or-expression) associated with a button is automatically set to **0** when the form is executed for the first time in Design or Application mode. When the user clicks a button, its variable is set to **1**. -> 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. +> A un botón se le puede asignar tanto una acción estándar como un método. En este caso, si el botón no está desactivado por la acción estándar, el método se ejecuta antes de la acción estándar. -## 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. -With the exception of the [available properties](#supported-properties), many button objects are *structurally* identical. The difference is in the processing of their associated variables. +## Estilos de botón -4D provides buttons in the following predefined styles: +Los estilos de botón controlan la apariencia general de un botón, así como sus propiedades disponibles. Es posible aplicar diferentes estilos predefinidos a los botones o asociarles menús emergentes. Se puede obtener un gran número de variaciones combinando estas propiedades/comportamientos. -### Regular +Con la excepción de las [propiedades-disponibles](#supported-properties), muchos objetos botón son *estructuralmente* idénticos. La diferencia está en el tratamiento de sus variables asociadas. -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. +4D ofrece botones en los siguientes estilos predefinidos: + + + +### Clásico + +El estilo de botón Clásico es un botón sistema estándar (*es decir,*, un rectángulo con una etiqueta descriptiva) que ejecuta el código cuando el usuario hace clic en él. ![](assets/en/FormObjects/button_regular.png) -By default, the Regular style has a light gray background with a label in the center. When the cursor hovers over the Regular button style, the border and background color change to demonstrate that it has the focus. In addition to initiating code execution, the Regular button style mimics a mechanical button by quickly changing background color when being clicked. +Por defecto, el estilo Clásico tiene un fondo gris claro con una etiqueta en el centro. Cuando el cursor pasa por encima del estilo de botón Clásico, el borde y el color de fondo cambian para demostrar que tiene el foco. Además de iniciar la ejecución del código, el estilo del botón Clásico imita un botón mecánico cambiando rápidamente el color de fondo al ser presionado. -#### JSON Example: +#### Ejemplo JSON: ```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 + + "miBotón": { + "tipo": "button", //define el tipo de objeto + "style": "regular", //define el estilo del botón + "defaultButton": "true" //define el botón como opción por defecto + "text": "OK", //texto que aparecerá en el botón + "action": "Cancel", //acción a realizar + "left": 60, //posición izquierda en el formulario + "top": 160, //posición superior en el formulario + "width": 100, //ancho del botón + "height": 20 //altura del botón } ``` -Only the Regular and Flat styles offer the [Default Button](properties_Appearance.md#default-button) property. -### Flat +Sólo los estilos Clásico y Plano ofrecen la propiedad [Botón por defecto](properties_Appearance.md#default-button). -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. + +### Plano + +El estilo de botón Plano es un botón sistema estándar (*es decir, *, un rectángulo con una etiqueta descriptiva) que ejecuta código cuando un usuario hace clic en él. ![](assets/en/FormObjects/button_flat.png) -By default, the Flat style has a white background with a label in the center, rounded corners, and a minimalist appearance. The Flat button style's graphic nature is particularly useful for forms that will be printed. +Por defecto, el estilo Plano tiene un fondo blanco con una etiqueta en el centro, esquinas redondeadas y una apariencia minimalista. The Flat button style's graphic nature is particularly useful for forms that will be printed. -#### JSON Example: +#### Ejemplo JSON: ```4d -
      "myButton": { + + "myButton": { "type": "button", "style":"flat", "defaultButton":"true" @@ -83,21 +89,22 @@ 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 +Sólo los estilos Clásico y Plano ofrecen la propiedad [Botón por defecto](properties_Appearance.md#default-button). + +### Barra de herramientas -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. +El estilo de botón de la barra de herramientas está destinado principalmente a integrarse en una barra de herramientas. Incluye la opción de añadir un menú emergente (indicado por un triángulo invertido) que generalmente se utiliza para mostrar opciones adicionales para que el usuario las seleccione. -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: +By default, the Toolbar style has a transparent background with a label in the center. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *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* - el botón se resalta cuando utiliza la propiedad "Con menú emergente", se muestra un triángulo a la derecha y en el centro del botón. ![](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* - el resalte del botón nunca aparece. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en la parte inferior del botón. -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -113,19 +120,21 @@ 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. +El estilo de botón Bisel combina la apariencia del estilo [Clásico](#regular) (*es decir*, un rectángulo con una etiqueta descriptiva) con la opción de propiedad del menú emergente del estilo [Barra de herramientas](#toolbar). -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: +Por defecto, el estilo Bevel tiene un fondo gris claro con una etiqueta en el centro. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *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* - el botón está resaltado. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en el centro del botón. ![](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* - el resalte del botón nunca aparece. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en la parte inferior del botón. -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -141,19 +150,21 @@ 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: +### Bevel redondeado + +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. Al igual que el estilo Bevel, el estilo Bevel Redondeado combina la apariencia del estilo [Clásico](#regular) con la opción de propiedad del menú emergente del estilo [Barra de herramientas](#toolbar). + +Por defecto, el estilo Bevel Redondeado tiene un fondo gris claro con una etiqueta en el centro. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *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* - el botón es idéntico al estilo Bevel. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en el centro del botón. -- *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) -#### JSON Example: + - *macOS* - las esquinas del botón están redondeadas. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en la parte inferior del botón. + +#### Ejemplo JSON: ```4d "myButton": { @@ -169,19 +180,21 @@ 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. +El estilo del botón OS X Gradient es casi idéntico al estilo [Bevel](#bevel). Al igual que el estilo Bevel, el estilo OS X Gradient combina la apariencia del estilo [Clásico](#regular) y del estilo [Barra de herramientas](#toolbar). -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: +Por defecto, el estilo OS X Gradient tiene un fondo gris claro con una etiqueta en el centro. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *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* - el botón es idéntico al estilo Bevel. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha del botón. ![](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* - el botón se muestra como un botón de dos tonos. Cuando utiliza la propiedad "Con menú emergente", aparece un triángulo a la derecha y en la parte inferior del botón. -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -197,19 +210,20 @@ 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. +### OS X Texturizado + +El estilo de botón OS X Textured es casi idéntico al estilo [Bevel](#bevel) pero con un tamaño menor (el tamaño máximo es el de un botón de sistema estándar de macOS). Al igual que el estilo Bevel, el estilo OS X Textured combina la apariencia del estilo [Clásico](#regular) y del estilo [Barra de herramientas](#toolbar). 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* - un botón sistema estándar con un fondo gris claro con una etiqueta en el centro. Tiene la particularidad de ser transparente en 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* - - un botón sistema estándar que muestra un cambio de color de gris claro a gris oscuro. Su altura está predefinida: no es posible ampliarla o reducirla. -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -225,19 +239,21 @@ 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. +El estilo de botón Office XP combina la apariencia del estilo [Clásico](#regular) y del estilo [Barra de herramientas](#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: +The colors (highlight and background) of a button with the Office XP style are based on the system colors. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *Windows* - its background only appears when the mouse rolls over it. + - *Windows* - su fondo sólo aparece cuando el ratón pasa por encima. ![](assets/en/FormObjects/button_officexp.png) -- *macOS* - its background is always displayed. + - *macOS* - su fondo se muestra siempre. -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -253,13 +269,16 @@ The colors (highlight and background) of a button with the Office XP style are b } ``` -### Help -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. + +### Ayuda + + +El estilo del botón Ayuda puede utilizarse para mostrar un botón de ayuda estándar del sistema. Por defecto, el estilo Ayuda se muestra como un signo de interrogación dentro de un círculo. ![](assets/en/FormObjects/button_help.png) -#### JSON Example: +#### Ejemplo JSON: ```4d "myButton": { @@ -274,37 +293,43 @@ 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. +> El estilo Ayuda no soporta las propiedades básicas [Número de estados](properties_TextAndPicture.md#number-of-states), [ruta de acceso imagen](properties_TextAndPicture.md#picture-pathname) y la [posición Título/Imagen](properties_TextAndPicture.md#title-picture-position). + -### Circle +### Círculo -The Circle button style appears as a round system button. This button style is designed for macOS. +El estilo de botón Círculo aparece como un botón sistema circular. Este estilo de botón está diseñado para macOS. ![](assets/en/FormObjects/button_circleM.png) -On Windows, it is identical to the “None†style (the circle in the background is not taken into account). +En Windows, es idéntico al estilo "Ninguno" (no se tiene en cuenta el círculo del fondo). -#### JSON Example: - "myButton": { - "type": "button", - "style":"circular", - "text": "OK", - "dropping": "custom", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +#### Ejemplo JSON: + +``` + "myButton": { + "type": "button", + "style":"circular", + "text": "OK", + "dropping": "custom", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + -### Custom -The Custom button style accepts a personalized background picture and allows managing additional parameters such as icon and margin offset. +### Personalizado + +El estilo de botón Personalizado acepta una imagen de fondo personalizada y permite gestionar parámetros adicionales como el margen y el desplazamiento del icono. ![](assets/en/FormObjects/button_custom.png) -#### JSON Example: + +#### Ejemplo JSON: ```code "myButton": { @@ -321,16 +346,22 @@ 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. +## Propiedades soportadas + +Todos los botones comparten el mismo conjunto de propiedades básicas: + + +[Negrita](properties_Text.md#bold) - [Estilo del borde](properties_BackgroundAndBorder.md#border-line-style) - [Abajo](properties_CoordinatesAndSizing.md#bottom) - [Estilo del botón](properties_TextAndPicture.md#button-style) - [Clase](properties_Object.md#css-class) - [Soltable](properties_Action.md#droppable) - [Enfocable](properties_Entry.md#focusable) - [Fuente](properties_Text.md#font) - [Color de fuente](properties_Text.md#font-color) - [Tamaño de fuente](properties_Text.md#font-size) - [Alto](properties_CoordinatesAndSizing.md#height) - [Mensaje de ayuda](properties_Help.md#help-tip) - [Tam. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italic](properties_Text.md#italic) - [Izquierda](properties_CoordinatesAndSizing.md#left) - [No representado](properties_Display.md#not-rendered) - [Número de estados](properties_TextAndPicture.md#number-of-states)(1) - [Nombre de objeto](properties_Object.md#object-name) - [Ruta imagen](properties_TextAndPicture.md#picture-pathname)(1) - [Derecho](properties_CoordinatesAndSizing.md#right) - [Atajo](properties_Entry.md#shortcut) - [Acción estándar](properties_Action.md#standard-action) - [Título](properties_Object.md#title) - [Posición Imagen/Título](properties_TextAndPicture.md#title-picture-position)(1) - [Arriba](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object.md#type) - [Subrayado](properties_Text.md#underline) - [Variable o Expresión](properties_Object.md#variable-or-expression) - [Vertical Sizing](properties_ResizingOptions.md#vertical-sizing) - [Visibility](properties_Display.md#visibility) - [Width](properties_CoordinatesAndSizing.md#width) + +> (1) No soportado por el estilo [Ayuda](#ayuda). + + +Existen propiedades específicas adicionales, dependiendo del [estilo-de-botón](#button-styles): -Additional specific properties are available, depending on the [button style](#button-styles): +- [Ruta de acceso fondo](properties_TextAndPicture.md#backgroundPathname) - [Margen horizontal](properties_TextAndPicture.md#horizontalMargin) - [Desplazamiento icono](properties_TextAndPicture.md#icon-offset) - [Margen vertical](properties_TextAndPicture.md#verticalMargin) (Personalizado) +- [Botón por defecto](properties_Appearance.md#default-button) (Plano, Clásico) +- [Con menú emergente](properties_TextAndPicture.md#with-pop-up-menu) (Barra de herramientas, Bisel, Bisel redondeado, OS X Gradient, OS X Textured, Office XP, Círculo, Personalizado) -- [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 diff --git a/website/translated_docs/es/FormObjects/checkbox_overview.md b/website/translated_docs/es/FormObjects/checkbox_overview.md index b4d594dacdff6a..32feeb076a9bc0 100644 --- a/website/translated_docs/es/FormObjects/checkbox_overview.md +++ b/website/translated_docs/es/FormObjects/checkbox_overview.md @@ -3,191 +3,205 @@ id: checkboxOverview title: Check Box --- -## Overview - -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). +Una casilla de selección es un tipo de botón utilizado para introducir o mostrar datos binarios (verdadero-falso). Basically, it is either checked or unchecked, but a [third state](#three-states-check-box) can be defined. ![](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. +Check boxes are controlled by methods or [standard actions](#using-a-standard-action). El método asociado a ella se ejecuta cuando se selecciona la casilla de selección. Como todos los botones, la variable de la casilla de selección se pone en 0 cuando se abre el formulario por primera vez. -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)). +Una casilla de selección muestra el texto junto a un pequeño cuadrado. Este texto se define en el área [Título](properties_Object.md#title) del tema "Objetos" de la Lista de propiedades. Para introducir en esta área un título en forma de referencia XLIFF (ver [Anexo B: arquitectura XLIFF](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 casillas de selección -- **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`. +Una casilla de selección puede asociarse a una [variable o expresión](properties_Object.md#variable-or-expression) de tipo entero o 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. +- **entero:** si la casilla está marcada, la variable tiene el valor 1. Cuando no se marca, tiene el valor 0. Si la casilla de selección está en tercer estado (ver más abajo), tiene el valor 2. +- **booleano:** si la casilla está marcada, la variable tiene el valor `True`. Cuando no se marca, toma el valor `False`. -### Three-States check box +Una parte o todas las casillas de selección de un formulario pueden estar marcadas o desmarcadas. Las casillas de selección múltiples permiten al usuario seleccionar varias opciones. -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) +### Casilla de selección de tres estados -To enable this third state, you must select the [Three-States](properties_Display.md#three-states) property. +Check box objects with [Regular](checkbox_overview.md#regular) and [Flat](checkbox_overview.md#flat) [button style](properties_TextAndPicture.md#button-style) accept a third state. Este tercer estado es un estado intermedio, que generalmente se utiliza para fines de visualización. Por ejemplo, permite indicar que una propiedad está presente en una selección de objetos, pero no en cada objeto de la selección. -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). +![](assets/en/FormObjects/checkbox_3states.png) -The variable associated with the check box returns the value 2 when the check box is in the third state. +Para activar este tercer estado, debe seleccionar la propiedad [Tres estados](properties_Display.md#three-states). -> 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. +Esta propiedad sólo está disponible para casillas de selección regulares y planas asociadas a [variables o expresiones](properties_Object.md#variable-or-expression) - las casillas de selección de expresiones booleanas no pueden utilizar la propiedad [Tres estados](properties_Display.md#three-states) (una expresión booleana no puede estar en un estado intermedio). -## Using a standard action +La variable asociada a la casilla de selección devuelve el valor 2 cuando la casilla está en el tercer estado. +> En el modo de entrada, las casillas de selección de los tres estados muestran cada estado de forma secuencial, en el siguiente orden: sin marcar / marcado / intermedio / sin marcar, etc. El estado intermedio no suele ser muy útil en el modo de entrada; en el código, basta con forzar el valor de la variable a 0 cuando toma el valor de 2 para pasar directamente del estado comprobado al estado no comprobado. -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. -Only actions that can represent a true/false status ("checkable" actions) are supported by this object: +## Utilizar una acción estándar -| 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 | +Puede asignar una [acción estándar](properties_Action.md#standard-action) a una casilla de selección para manejar los atributos de las áreas de texto. Por ejemplo, si asigna la acción estándar `fontBold`, en ejecución la casilla de selección gestionará el atributo "negrita" del texto seleccionado en el área actual. +Sólo las acciones que pueden representar un estado verdadero/falso (acciones "marcables") son soportadas por este objeto: -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. +| Acciones soportadas | Condiciones de uso (si las hay) | +| ----------------------------------- | ------------------------------- | +| avoidPageBreakInsideEnabled | Ãrea 4D Write Pro únicamente | +| fontItalic | | +| fontBold | | +| fontLinethrough | | +| fontSubscript | Ãrea 4D Write Pro únicamente | +| fontSuperscript | Ãrea 4D Write Pro únicamente | +| fontUnderline | | +| font/showDialog | Mac únicamente | +| htmlWYSIWIGEnabled | Ãrea 4D Write Pro únicamente | +| section/differentFirstPage | Ãrea 4D Write Pro únicamente | +| section/differentLeftRightPages | Ãrea 4D Write Pro únicamente | +| spell/autoCorrectionEnabled | | +| spell/autoDashSubstitutionsEnabled | Mac únicamente | +| spell/autoLanguageEnabled | Mac únicamente | +| spell/autoQuoteSubstitutionsEnabled | Mac únicamente | +| spell/autoSubstitutionsEnabled | | +| spell/enabled | | +| spell/grammarEnabled | Mac únicamente | +| spell/showDialog | Mac únicamente | +| spell/visibleSubstitutions | | +| visibleBackground | Ãrea 4D Write Pro únicamente | +| visibleFooters | Ãrea 4D Write Pro únicamente | +| visibleHeaders | Ãrea 4D Write Pro únicamente | +| visibleHiddenChars | Ãrea 4D Write Pro únicamente | +| visibleHorizontalRuler | Ãrea 4D Write Pro únicamente | +| visiblePageFrames | Ãrea 4D Write Pro únicamente | +| visibleReferences | | +| widowAndOrphanControlEnabled | Ãrea 4D Write Pro únicamente | -## Check box button styles +For detailed information on these actions, please refer to the [Standard actions](properties_Action.md#standard-action) section. -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. +## Estilos de botones casillas de selección -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. +Check boxes use [button styles](properties_TextAndPicture.md#button-style) to control a check box's general appearance as well as its available properties. Es posible aplicar diferentes estilos predefinidos a las casillas de selección. Se puede obtener un gran número de variaciones combinando estas propiedades/comportamientos. -4D provides check boxes in the following predefined styles: +Con la excepción de las [propiedades-disponibles](#supported-properties), muchos objetos casilla de selección son *estructuralmente* idénticos. La diferencia está en el tratamiento de sus variables asociadas. -### Regular +4D ofrece casillas de selección en los siguientes estilos de botón predefinidos: -The Regular check box style is a standard system check box (*i.e.*, a rectangle with a descriptive title): +### Clásico + +El estilo Clásico de botón casilla de selección corresponde a un sistema de casilla de selección estándar (*es decir, *, un rectángulo con un título descriptivo): ![](assets/en/FormObjects/checkbox_regular.png) -#### JSON Example: +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"regular", + "text": "Cancel", + "action": "Cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + "dataSourceTypeHint":"boolean" + } +``` + - "myCheckBox": { + +### Plano + +El estilo plano del botón casilla de selección tiene una apariencia minimalista. La naturaleza gráfica del estilo Flat es especialmente útil para los formularios que se van a imprimir. + +![](assets/en/FormObjects/checkbox_flat.png) + +#### Ejemplo 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ón barra de herramientas -#### JSON Example: +El estilo del botón barra de herramientas está destinado principalmente a la integración en una barra de herramientas. - "myCheckBox": { - "type": "checkbox", - "style":"flat", - "text": "Cancel", - "action": "cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +El estilo del botón Barra de herramientas tiene un fondo transparente con un título. Suele estar asociado a una [imagen de 4 estados](properties_TextAndPicture.md#number-of-states). -### Toolbar button +Ejemplo con estados seleccionado / no seleccionado / subrayado: -The Toolbar button check box style is primarily intended for integration in a toolbar. +![](assets/en/FormObjects/checkbox_toolbar.png) -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). -Example with states unchecked / checked / highlighted: +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"toolbar", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -![](assets/en/FormObjects/checkbox_toolbar.png) -#### JSON Example: - - "myCheckBox": { - "type": "checkbox", - "style":"toolbar", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - ### Bevel -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. +El estilo del botón casilla de selección Bevel combina la apariencia del estilo de botón [Clásico ](#regular) (*es decir*, un rectángulo con un título descriptivo) con el comportamiento del estilo del botón [Barra de herramientas](#toolbar-button). -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). +El botón Bevel tiene un fondo gris claro con un título. Suele estar asociado a una [imagen de 4 estados](properties_TextAndPicture.md#number-of-states). -Example with states unchecked / checked / highlighted: +Ejemplo con estados seleccionado / no seleccionado / subrayado: ![](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 - } - +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"bevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + +### Bevel redondeado -### Rounded Bevel +El estilo del botón de la casilla de selección Bevel redondeado es casi idéntico al estilo del botón [Bevel](#bevel), excepto que, dependiendo del sistema operativo, las esquinas del botón pueden ser redondeadas. Al igual que el estilo de botón Bevel, el estilo del botón Bevel redondeado combina la apariencia del estilo del botón [Clásico](#regular) con el comportamiento del estilo del botón [Barra de herramientas](#toolbar-button). -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. +El estilo de botón Bevel redondeado tiene un fondo gris claro con un título. Suele estar asociado a una [imagen 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). +Ejemplo en macOS: -Example on macOS: + ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) -![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) +> En Windows, el estilo de botón Bevel redondeado es idéntico al estilo de botón [Bevel](#bevel). -> on Windows, the Rounded Bevel style is identical to the [Bevel](#bevel) style. -#### JSON Example: +#### Ejemplo JSON: ```4d "myCheckBox": { @@ -203,175 +217,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. +El estilo del botón casilla de selección OS X Gradient es casi idéntico al estilo del botón [Bevel](#bevel). Al igual que el estilo de botón Bevel, el estilo del botón OS X Gradient combina la apariencia del estilo del botón [Clásico](#regular) con el comportamiento del estilo del botón [Barra de herramientas](#toolbar-button). -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). +El estilo del botón Gradient OS X tiene un fondo gris claro con un título y se puede mostrar como un botón de sistema de dos tonos en macOS. Suele estar asociado a una [imagen de 4 estados](properties_TextAndPicture.md#number-of-states). -![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + ![](assets/en/FormObjects/checkbox_osxgradient_mac.png) -> On Windows, this style is identical to the [Bevel](#bevel) style. +> En Windows, este estilo de botón casilla de selección es idéntico al estilo de botón [Bevel](#bevel). -#### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"gradientBevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"gradientBevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -### OS X Textured -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. -By default, the OS X Textured style appears as: -- *Windows* - a standard system button with a light blue background with a title in the center. - - ![](assets/en/FormObjects/checkbox_osxtextured.png) +### OS X Texturizado -- *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) +El estilo de botón OS X Textured es similar al estilo del botón [Bevel](#bevel) pero con un tamaño menor (el tamaño máximo es el de un botón de sistema estándar de macOS). Al igual que el estilo de botón Bevel, el estilo del botón OS X Textured combina la apariencia del estilo del botón [Clásico](#regular) con el comportamiento del estilo del botón [Barra de herramientas](#toolbar-button). -#### JSON Example: +Por defecto, el estilo del botón OS X Textured aparece como: - "myCheckBox": { + - *Windows* - un botón sistema estándar con un fondo azul claro con un título en el centro. + + ![](assets/en/FormObjects/checkbox_osxtextured.png) + + - *macOS* - un botón de sistema estándar. Su altura está predefinida: no es posible ampliarla o reducirla. + + ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) + +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"texturedBevel", + "text": "Checkbox", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + + +### Office XP + +El estilo de botón Office XP combina la apariencia del estilo del botón [Clásico](#regular) con el comportamiento del estilo del [Botón barra de herramientas](#toolbar-button). + +The colors (highlight and background) of a check box with the Office XP button style are based on the system colors. La apariencia de la casilla de selección puede ser diferente cuando el cursor pasa por encima, dependiendo del sistema operativo: + + - *Windows* - su fondo sólo aparece cuando el ratón pasa por encima. Ejemplo con estados seleccionado / no seleccionado / subrayado: + + ![](assets/en/FormObjects/checkbox_officexp.png) + + - *macOS* - su fondo se muestra siempre. Ejemplo con estados seleccionado / no seleccionado: + + ![](assets/en/FormObjects/checkbox_officexp_mac.png) + +#### Ejemplo JSON: + +``` + "myCheckBox": { "type": "checkbox", - "style":"texturedBevel", - "text": "Checkbox", - "left": 60, - "top": 160, - "width": 100, - "height": 20 + "style":"office", + "text": "Checkbox", + "action": "fontBold", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "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: +### Contraer/Desplegar -- *Windows* - its background only appears when the mouse rolls over it. Example with states unchecked / checked / highlighted: - - ![](assets/en/FormObjects/checkbox_officexp.png) +Este estilo de botón de casilla de selección se puede utilizar para añadir un icono estándar de contraer/expandir. These icons are used natively in hierarchical lists. -- *macOS* - its background is always displayed. Example with states unchecked / checked: - - ![](assets/en/FormObjects/checkbox_officexp_mac.png) + - *Windows* - el icono se ve como un [+] o un [-] -#### JSON Example: + ![](assets/en/FormObjects/checkbox_collapse.png) - "myCheckBox": { - "type": "checkbox", - "style":"office", - "text": "Checkbox", - "action": "fontBold", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - + - *macOS* - se ve como un triángulo que apunta hacia la derecha o hacia abajo. -### Collapse / Expand + ![](assets/en/FormObjects/checkbox_collapse_mac.png) -This check box style can be used to add a standard collapse/expand icon. These buttons are used natively in hierarchical lists. -- *Windows* - the button looks like a [+] or a [-] - - ![](assets/en/FormObjects/checkbox_collapse.png) +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"disclosure", + "method": "m_collapse", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -- *macOS* - it looks like a triangle pointing right or down. - - ![](assets/en/FormObjects/checkbox_collapse_mac.png) -#### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"disclosure", - "method": "m_collapse", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +### Botón de divulgación -### Disclosure Button +En macOS y Windows, una casilla de selección con el estilo de botón "Divulgación" aparece como un botón de información estándar, normalmente utilizado para mostrar/ocultar información adicional. Cuando se utiliza como botón radio, el símbolo del botón apunta hacia abajo con el valor 0 y hacia arriba con el valor 1. -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. + - *Windows* -- *Windows* - ![](assets/en/FormObjects/checkbox_disclosure.png) -- *macOS* - + - *macOS* + ![](assets/en/FormObjects/checkbox_disclosure_mac.png) -#### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"roundedDisclosure", - "method": "m_disclose", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +#### Ejemplo JSON: + +``` + "myCheckBox": { + "type": "checkbox", + "style":"roundedDisclosure", + "method": "m_disclose", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + +### Personalizado -### Custom +El estilo del botón Personalizado acepta una imagen de fondo personalizada y permite gestionar propiedades específicas: -The Custom check box style accepts a personalized background picture and allows managing specific properties: +- [Ruta de acceso fondo](properties_TextAndPicture.md#backgroundPathname) +- [Desplazamiento icono](properties_TextAndPicture.md#icon-offset) +- [Horizontal Margin](properties_TextAndPicture.md#horizontalMargin) and [Margen vertical](properties_TextAndPicture.md#verticalMargin) -- [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) +Suele estar asociado a una [imagen de 4 estados](properties_TextAndPicture.md#number-of-states), que puede utilizarse junto con una imagen de fondo [de 4 estados](properties_TextAndPicture.md#number-of-states). -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). +#### Ejemplo JSON: -#### JSON Example: +``` + "myCheckbox": { + "type": "checkbox", + "style":"custom", + "text": "OK", + "icon": "/RESOURCES/smiley.jpg", + "iconFrame": 4, + "customBackgroundPicture": "/RESOURCES/paper.jpg", + "iconOffset": 5, //desplazamiento icono personalizado al hacer clic + "left": 60, + "top": 160, + "width": 100, + "height": 20, + "customBorderX": 20, + "customBorderY": 5 + } +``` - "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 - } - -## Supported Properties -All check boxes 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) - [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) - [Save value](properties_Object.md#save-value) - [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) +## Propiedades soportadas + +Todas las casillas de selección comparten un mismo conjunto de propiedades básicas: + + +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [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) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Save value](properties_Object.md#save-value) - [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): +Existen propiedades específicas adicionales, dependiendo del [estilo-de-botón](#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 +- [Ruta de acceso fondo](properties_TextAndPicture.md#backgroundPathname) - [Margen horizontal](properties_TextAndPicture.md#horizontalMargin) - [Desplazamiento icono](properties_TextAndPicture.md#icon-offset) - [Margen vertical](properties_TextAndPicture.md#verticalMargin) (Personalizado) +- [Tres estados](properties_Display.md#three-states) (Plano, Clásico) +- [Número de estados](properties_TextAndPicture.md#number-of-states) - [Ruta de acceso imagen](properties_TextAndPicture.md#picture-pathname) - [Posición Título/Imagen](properties_TextAndPicture.md#title-picture-position) (Botón barra de herramientas, Bevel Redondeado, OS X Gradient, OS X Textured, Office XP, Personalizado) diff --git a/website/translated_docs/es/FormObjects/comboBox_overview.md b/website/translated_docs/es/FormObjects/comboBox_overview.md index d2abe404cefec7..8360c0146b4ee6 100644 --- a/website/translated_docs/es/FormObjects/comboBox_overview.md +++ b/website/translated_docs/es/FormObjects/comboBox_overview.md @@ -3,25 +3,56 @@ id: comboBoxOverview title: Combo Box --- -## Overview - 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. ![](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. +Fundamentally, you treat a combo box as an enterable area that uses its object, array or a choice list as the set of default values. -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. +## Handling combo boxes -## Options for combo boxes +Use the [`On Data Change`](Events/onDataChange.md) event to manage entries into the enterable area, as you would for any input form object. -Combo box type objects accept two specific options concerning choice lists associated with them: +You initialize a combo box in exactly the same way as a [drop-down list](dropdownList_Overview.md#overview): using an object, an array, or a choice list. -- [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. +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a combo box. The object must contain the following properties: + +| Propiedad | Tipo | Descripción | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Colección | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:

    • strings
    • numbers
    • dates
    • times
    • If empty or not defined, the combo box is empty | +| `currentValue` | same as Collection | Text entered by the user | + +If the object contains other properties, they are ignored. + +When the user enters text into the combo box, the `currentValue` property of the object gets the entered text. + +### Utilizar un array + +Please refer to **Using an array** in the [drop-down list page](dropdownList_Overview.md#using-an-array) for information about how to initialize the array. + +When the user enters text into the combo box, the 0th element of the array gets the entered text. -> 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. +### Utilizar una lista de selección -## Supported Properties +If you want to use a combo box to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the form object's data source. Esto facilita la gestión de los campos/variables listados. +> Si utiliza una lista jerárquica, sólo se muestra el primer nivel y se puede seleccionar. + +To associate 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 form object in the Property List. + +When the form is executed, 4D automatically manages the 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 combo box when the form is displayed: + +Please refer to **Using a choice** in the [drop-down list page](dropdownList_Overview.md#using-a-choice-list) for more information. + + +## Options + +Combo box type objects accept two specific options: + +- [Automatic insertion](properties_DataSource.md#automatic-insertion): enables automatically adding a value to the data source when a user enters a value that is not found in the 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. +> 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 [drop-down list](dropdownList_Overview.md#overview) object. -[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 +## Propiedades soportadas +[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [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) - [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) - [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 diff --git a/website/translated_docs/es/FormObjects/dropdownList_Overview.md b/website/translated_docs/es/FormObjects/dropdownList_Overview.md index 19f548a21446c6..f4c3208c4e7327 100644 --- a/website/translated_docs/es/FormObjects/dropdownList_Overview.md +++ b/website/translated_docs/es/FormObjects/dropdownList_Overview.md @@ -1,59 +1,118 @@ --- id: dropdownListOverview -title: Drop-down List +title: Lista desplegable --- -## Overview - -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. +Drop-down lists are form objects that allow the user to select from a list. You manage the items displayed in the drop-down list using an object, an array, a choice list, or a standard action. 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: ![](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. +## Drop-down list types + +You can create different types of drop-down lists with different features. To define a type, select the appropriate **Expression Type** and **Data Type** values in the Property list, or use their JSON equivalent. + +| Tipo | Features | Expression Type | Tipos de datos | JSON definition | +| ------------------------------ | ------------------------------------------------ | --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Objeto | Built upon a collection | Objeto | Numeric, Text, Date, or Time | `dataSourceTypeHint: object` + `numberFormat: ` or `textFormat: ` or `dateFormat: ` or `timeFormat: ` | +| Array | Built upon an array | Array | Numeric, Text, Date, or Time | `dataSourceTypeHint: arrayNumber` or `arrayText` or `arrayDate` or `arrayTime` | +| Choice list saved as value | Built upon a choice list (standard) | List | Selected item value | `dataSourceTypeHint: text` + `saveAs: value` | +| Choice list saved as reference | Built upon a choice list. Item position is saved | List | Selected item reference | `dataSourceTypeHint: integer` + `saveAs: reference` | +| Hierarchical choice list | Can display hierarchical contents | List | List reference | `dataSourceTypeHint: integer` | +| Acción estándar | Automatically built by the action | *any* | *any except List reference* | any definition + `action: ` (+ `focusable: false` for actions applying to other areas) | + + + +## Handling drop-down lists + +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a drop-down list. The object must contain the following properties: + +| Propiedad | Tipo | Descripción | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `values` | Colección | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:
    • strings
    • numbers
    • dates
    • times
    • If empty or not defined, the drop-down list is empty | +| `index` | number | Index of the currently selected item (value between 0 and `collection.length-1`). If you set -1, `currentValue` is displayed as a placeholder string | +| `currentValue` | same as Collection | Currently selected item (used as placeholder value if set by code) | + +If the object contains other properties, they are ignored. + +To initialize the object associated to the drop-down list, you can: + +* 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 object automatically. + +* Execute code that creates the object and its properties. For example, if "myList" is the [variable](properties_Object.md#variable-or-expression) associated to the drop-down list, you can write in the [On Load](Events/onLoad.md) form event: + +```4d +// Form.myDrop is the datasource of the form object + +Form.myDrop:=New object +Form.myDrop.values:=New collection("apples"; "nuts"; "pears"; "oranges"; "carrots") +Form.myDrop.index:=-1 //currentValue is a placeholder +Form.myDrop.currentValue:="Select a fruit" +``` + +The drop-down list is displayed with the placeholder string: + +![](assets/en/FormObjects/fruits2.png) -Drop-down list objects are initialized by loading a list of values into an array. You can do this in several ways: +After the user selects a value: + +![](assets/en/FormObjects/fruits3.png) + +```4d +Form.myDrop.values // ["apples","nuts","pears","oranges","carrots"] +Form.myDrop.currentValue //"oranges" +Form.myDrop.index //3 +``` + + + +### Utilizar un 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 can display an array as a list of values when you click on it. + +To initialize the array associated to the drop-down list, you can: * 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. -* Before the object is displayed, execute code that assigns values to the array elements. For example: +* Before the object is displayed, execute code that assigns values to the array elements. Por ejemplo: ```4d - ARRAY TEXT($aCities;6) - $aCities{1}:="Philadelphia" - $aCities{2}:="Pittsburg" - $aCities{3}:="Grand Blanc" - $aCities{4}:="Bad Axe" - $aCities{5}:="Frostbite Falls" - $aCities{6}:="Green Bay" + ARRAY TEXT(aCities;6) + aCities{1}:="Philadelphia" + aCities{2}:="Pittsburg" + aCities{3}:="Grand Blanc" + aCities{4}:="Bad Axe" + aCities{5}:="Frostbite Falls" + aCities{6}:="Green Bay" ``` -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. +In this case, the name of the [variable](properties_Object.md#variable-or-expression) 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: +* Before the object is displayed, load the values of a list into the array using the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command. Por ejemplo: ```4d - LIST TO ARRAY("Cities";$aCities) + 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. +In this case also, the name of the [variable](properties_Object.md#variable-or-expression) associated with the object in the form must be `aCities`. Este código puede ejecutarse en lugar de las sentencias de asignación 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: +Si necesita guardar la elección del usuario en un campo, deberá utilizar una sentencia de asignación que se ejecute después de aceptar el registro. El código podría ser así: ```4d Case of :(Form event=On Load) LIST TO ARRAY("Cities";aCities) - If(Record number([People])<0) `new record - aCities:=3 `display a default value - Else `existing record, display stored value + If(Record number([People])<0) `nuevo registro + aCities:=3 `mostrar un valor por defecto + Else `registro existente, mostrar valor almacenado aCities:=Find in array(aCities;City) End if - :(Form event=On Clicked) `user modified selection - City:=aCities{aCities} `field gets new value + :(Form event=On Clicked) `el usuario modifica la selección + City:=aCities{aCities} `el campo obtiene un nuevo valor :(Form event=On Validate) City:=aCities{aCities} :(Form event=On Unload) @@ -61,34 +120,53 @@ 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. +You must select each event that you test for in your Case statement. Los arrays siempre contienen un número finito de elementos. La lista de elementos es dinámica y puede ser modificada por un método. Los elementos de un array pueden modificarse, ordenarse y añadirse. -## 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 una lista de selección -> If you use a hierarchical list, only the first level is displayed and can be selected. +If you want to use a drop-down list to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the drop-down list's [data source](properties_Object.md#variable-or-expression). Esto facilita la gestión de los campos/variables listados. -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. +For example, in the case of a "Color" field that can only contain the values "White", "Blue", "Green" or "Red", it is possible to create a list containing these values and associate it with a drop-down list that references the 4D "Color" field. 4D se encarga entonces de gestionar automáticamente la entrada y la visualización del valor actual en el formulario. +> Si utiliza una lista jerárquica, sólo se muestra el primer nivel y se puede seleccionar. If you want to display hierarchical contents, you need to use a [hierarchical choice list](#using-a-hierarchical-choice-list). -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. +To associate a drop-down list with a field or variable, enter the name of the field or variable directly as the [Variable or Expression](properties_Object.md#variable-or-expression) field of the drop-down list in the Property List. +> It is not possible to use this feature with an object or an array drop-down list. If you enter a field name in the "Variable or Expression" area, then you must use a choice list. -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: +When the form is executed, 4D automatically manages the drop-down list during input or display: when a user chooses a value, it is saved in the field; this field value is shown in the drop-down list when the form is displayed: ![](assets/en/FormObjects/popupDropdown_choiceList.png) -> 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 +#### Selected item value or Selected item reference + +When you have associated a drop-down list with a choice list and with a field or a variable, you can set the [**Data Type**](properties_DataSource.md#data-type) property to **Selected item value** or **Selected item reference**. Esta opción permite optimizar el tamaño de los datos guardados. + +### Using a hierarchical choice list + +A hierarchical drop-down list has a sublist associated with each item in the list. Here is an example of a hierarchical drop-down list: + +![](assets/en/FormObjects/popupDropdown_hierar.png) + +> In forms, hierarchical drop-down lists are limited to two levels. + +You can assign the hierarchical choice list to the drop-down list object using the [Choice List](properties_DataSource.md#choice-list) field of the Property List. + +You manage hierarchical drop-down lists using the **Hierarchical Lists** commands of the 4D Language. All commands that support the `(*; "name")` syntax can be used with hierarchical drop-down lists, e.g. [`List item parent`](https://doc.4d.com/4dv19/help/command/en/page633.html). + + +### Utilizar una acción estándar -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. +You can build automatically a drop-down list using a [standard action](properties_Action.md#standard-action). This feature is supported in the following contexts: -## Using a standard action +- Use of the `gotoPage` standard action. In this case, 4D will automatically display the [page of the form](FormEditor/forms.md#form-pages) that corresponds to the number of the item that is selected. For example, if the user selects the 3rd item, 4D will display the third page of the current form (if it exists). At runtime, by default the drop-down list displays the page numbers (1, 2...). -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. +- Use of a standard action that displays a sublist of items, for example `backgroundColor`. This feature requires that: + - a styled text area ([4D Write Pro area](writeProArea_overview.md) or [input](input_overview.md) with [multistyle](properties_Text.md#multi-style) property) is present in the form as the standard action target. + - the [focusable](properties_Entry.md#focusable) property is not set to the drop-down list. At runtime the drop-down list will display an automatic list of values, e.g. background colors. You can override this automatic list by assigning in addition a choice list in which each item has been assigned a custom standard action. -For more information, please refer to the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section. +> This feature cannot be used with a hierarchical drop-down list. -## Supported Properties +## Propiedades soportadas -[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) - [Save value](properties_Object.md#save-value) - [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 +[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) - [Data Type (expression type)](properties_DataSource.md#data-type-expression-type) - [Data Type (list)](properties_DataSource.md#data-type-list) - [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 value](properties_Object.md#save-value) - [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 diff --git a/website/translated_docs/es/FormObjects/formObjects_overview.md b/website/translated_docs/es/FormObjects/formObjects_overview.md index afc89d2fde1a80..8ffb80c29c58e0 100644 --- a/website/translated_docs/es/FormObjects/formObjects_overview.md +++ b/website/translated_docs/es/FormObjects/formObjects_overview.md @@ -1,26 +1,28 @@ --- id: formObjectsOverview -title: About 4D Form Objects +title: Acerca de los objetos formularios 4D --- -You build and customize your application forms by manipulating the objects on them. You can add objects, reposition objects, set object properties, enforce business rules by specifying data entry constraints, or write object methods that run automatically when the object is used. +Usted crea y personaliza los formularios de su aplicación manipulando los objetos que contienen. Puede añadir objetos, reposicionar objetos, definir propiedades de los objetos, aplicar reglas de negocio especificando restricciones de entrada de datos o escribir métodos de objetos que se ejecuten automáticamente cuando se utilice el objeto. -## Active and static objects +## Objetos activos y estáticos -4D forms support a large number of built-in **active** and **static** objects: +Los formularios 4D soportan una gran cantidad de objetos **activos** y **estáticos** integrados: -- **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. +- **Los objetos activos** realizan una tarea o una función de la interfaz. Los campos son objetos activos. Los otros objetos activos -objetos editable (variables), combo box, listas desplegables, botones imagen, etc.- almacenan los datos temporalmente en la memoria o realizan alguna acción, como abrir una caja de diálogo, imprimir un informe o iniciar un proceso en segundo plano. +- **Los objetos estáticos** se utilizan generalmente para definir la apariencia del formulario y sus etiquetas, así como para la interfaz gráfica. Los objetos estáticos no tienen variables asociadas como los objetos activos. Sin embargo, se pueden insertar objetos dinámicos en objetos estáticos. -## Handling form objects -You can add or modify 4D form objects in the following ways: +## Gestión de objetos de formulario -* **[Form Editor](FormEditor/formEditor.md):** 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. +Puede añadir o modificar objetos formulario 4D de las siguientes maneras: -* **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. +* **[Editor de formularios](FormEditor/formEditor.md):** arrastre un objeto de la barra de herramientas del editor de formularios al formulario. A continuación, utilice la lista de propiedades para especificar las propiedades del objeto. + Consulte el capítulo [Construcción de formularios](https://doc.4d.com/4Dv17R6/4D/17-R6/Building-forms.200-4354618.en.html) para más información. -* **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 +* **4D language**: los comandos del tema [Objetos (Formularios)](https://doc.4d.com/4Dv17R5/4D/17-R5/Objects-Forms.201-4127128.en.html) como `OBJECT DUPLICATE` o `OBJECT SET FONT STYLE` permiten crear y definir objetos de formulario. + +* **Código JSON en formularios dinámicos:** define las propiedades utilizando JSON. Utilice la propiedad [tipo](propiedades_Objeto.md#tipo) para definir el tipo de objeto y, a continuación, indique sus propiedades disponibles. Ver la página [Formularios dinámicos](https://doc.4d.com/4Dv17R5/4D/17-R5/Dynamic-Forms.300-4163740.en.html#3692292) para obtener información. + Ejemplo de un objeto botón: + ``` + { "type": "button", "style": "bevel", "text": "OK", "action": "Cancel", "left": 60, "top": 160, "width": 100, "height": 20 } diff --git a/website/translated_docs/es/FormObjects/groupBox.md b/website/translated_docs/es/FormObjects/groupBox.md index acae66e73cf874..16121d42c95575 100644 --- a/website/translated_docs/es/FormObjects/groupBox.md +++ b/website/translated_docs/es/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: +Un área de grupo es un objeto estático que permite ensamblar visualmente varios objetos de formulario: ![](assets/en/FormObjects/groupBox.png) +> El nombre de un área de grupo es un texto estático; puede utilizar una referencia "localizable" como con cualquier etiqueta de 4D (ver [Utilizar las referencias en los textos estáticos](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html) y la sección *Arquitectura XLIFF* en el manual Diseño de 4D. -> 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 - } - +#### Ejemplo JSON: -#### Supported Properties +``` + "myGroup": { + "type": "groupBox", + "title": "Employee Info" + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` -[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 +#### Propiedades soportadas +[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 diff --git a/website/translated_docs/es/FormObjects/input_overview.md b/website/translated_docs/es/FormObjects/input_overview.md index ea72623251b44b..79aaaa83934bba 100644 --- a/website/translated_docs/es/FormObjects/input_overview.md +++ b/website/translated_docs/es/FormObjects/input_overview.md @@ -1,43 +1,44 @@ --- id: inputOverview -title: Input +title: Entrada --- -## Overview -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: +Las entradas le permiten añadir expresiones editables o no editables como [campos](Concepts/identifiers.md#fields) y [variables](Concepts/variables.md) de base de datos a sus formularios. Las entradas pueden manejar datos basados en caracteres (texto, fechas, números...) o imágenes: ![](assets/en/FormObjects/input.png) -Inputs can contain [assignable or non-assignable expressions](Concepts/quick-tour.md#assignable-vs-non-assignable-expressions). +Las entradas pueden contener [expresiones asignables o no asignables](Concepts/quick-tour.md#assignable-vs-non-assignable-expressions). -In addition, inputs can be [enterable or non-enterable](properties_Entry.md#enterable). An enterable input accepts data. You can set data entry controls for the object. A non-enterable input can only display values but cannot be edited by the user. +Además, las entradas pueden ser [editables o no editables](properties_Entry.md#enterable). Una entrada introducible acepta los datos. Puede definir los controles de entrada de datos para el objeto. Una entrada no editable sólo puede mostrar valores, pero no puede ser editada por el usuario. -You can manage the data with object or form [methods](Concepts/methods.md). +Puedes gestionar los datos con los [métodos](Concepts/methods.md) objeto o formulario. -### JSON Example: + +### Ejemplo JSON: ```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 + "miTexto": { + "tipo": "input", //define el tipo de objeto + "spellcheck": true, //activa la verificación ortográfica + "left": 60, //posición izquierda en el formulario + "top": 160, //posición superior en el formulario + "width": 100, //ancho del objeto + "height": 20 //altura del 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) +## Propiedades soportadas + +[Allow font/color picker](properties_Text.md#allow-font-color-picker) - [Alpha Format](properties_Display.md#alpha-format) - [Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Bold](properties_Text.md#bold) - [Test when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [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) - [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) - [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) -* * * -## Input alternatives +--- +## Alternativas -You can also represent field and variable expressions in your forms using alternative objects, more particularly: +También puede representar expresiones de campos y de variables en sus formularios utilizando objetos alternativos, más concretamente: -* 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 +* Puede mostrar e introducir datos de los campos de la base directamente en las columnas [de tipo List box](listbox_overview.md). +* Puede representar un campo de lista o una variable directamente en un formulario utilizando los objetos [Menús desplegables/Listas desplegables](popupMenuDropdownList_overview) y [Combo Box](comboBox_overview.md). +* Puede representar una expresión booleana como una [casilla de selección](checkbox_overview.md) o como un objeto [botón radio](radio_overview.md). \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/list_overview.md b/website/translated_docs/es/FormObjects/list_overview.md index 8777c196c59cad..496ace6fcdbc8a 100644 --- a/website/translated_docs/es/FormObjects/list_overview.md +++ b/website/translated_docs/es/FormObjects/list_overview.md @@ -1,63 +1,62 @@ --- id: listOverview -title: Hierarchical List +title: Lista jerárquica --- -## Overview -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. +Las listas jerárquicas son objetos formulario que pueden utilizarse para mostrar datos en forma de listas con uno o más niveles que pueden desplegarse o contraerse. ![](assets/en/FormObjects/Hlist1.png) -Where appropriate, the expand/collapse icon is automatically displayed to the left of the item. Hierarchical lists support an unlimited number of sublevels. +Cuando corresponda, el icono desplegar/contraer se mostrará automáticamente a la izquierda del elemento. Las listas jerárquicas soportan un número ilimitado de subniveles. -## Hierarchical list data source -The contents of a hierarchical list form object can be initialized in one of the following ways: +## Fuente de datos de lista jerárquica -- 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. +El contenido de un objeto formulario lista jerárquica se puede inicializar de una de las siguientes maneras: -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. +- Asociar una [lista de opciones](properties_DataSource.md#choice-list) existente al objeto. La lista de elección debe haber sido definida en el editor de listas en modo Diseño. +- Asigne directamente una referencia de lista jerárquica a la [variable o expresión](properties_Object.md#variable-or-expression) asociada al objeto formulario. -## ListRef and object name +En ambos casos, se gestiona una lista jerárquica en tiempo de ejecución a través de su referencia *ListRef*, utilizando los comandos [lista jerárquica](https://doc.4d.com/4Dv17R6/4D/17-R6/Hierarchical-Lists.201-4310291.en.html) del lenguaje 4D. -A hierarchical list is both a **language object** existing in memory and a **form object**. -The **language object** is referenced by an unique internal ID of the Longint type, designated by *ListRef* in the 4D Language Reference. This ID is returned by the commands that can be used to create lists: `New list`, `Copy list`, `Load list`, `BLOB to list`. There is only one instance of the language object in memory and any modification carried out on this object is immediately carried over to all the places where it is used. +## RefList y nombre de objeto -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.). +Una lista jerárquica es a la vez un **objeto de lenguaje** existente en memoria y un **objeto de formulario**. -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: +El **objeto de lenguaje** está referenciado por un ID interno único de tipo Entero largo, designado por *ListRef* en el manual de Lenguaje 4D. Este ID es devuelto por los comandos que se pueden usar para crear listas: `New list`, `Copy list`, `Load list`, `BLOB to list`. Sólo hay una instancia del objeto lenguaje en la memoria y cualquier modificación realizada en este objeto se traslada inmediatamente a todos los lugares donde se utiliza. + +El **objeto de formulario** no es necesariamente único: puede haber varias representaciones de la misma lista jerárquica en el mismo formulario o en otros diferentes. Al igual que con otros objetos formulario, se especifica el objeto en el lenguaje utilizando la sintaxis (*; "NomLista", etc.). + +Conecte el "objeto lenguaje " lista jerárquica con el "objeto de formulario" lista jerárquica por medio de la variable que contiene el valor RefLista. Por ejemplo, si has asociado la [variable](properties_Object.md#variable-or-expression) mylist al objeto de formulario, puede escribir: ```4d -$mylist:=New list +mylist:=New list ``` -Each representation of the list has its own specific characteristics and shares common characteristics with all the other representations. The following characteristics are specific to each representation of the list: +Cada representación de la lista tiene sus propias características específicas y comparte características comunes con todas las demás representaciones. Las siguientes características son específicas de cada representación de la lista: -- The selection, -- The expanded/collapsed state of its items, -- The position of the scrolling cursor. +- La selección, +- El estado desplegado/colapsado de sus elementos, +- La posición del cursor de desplazamiento. -The other characteristics (font, font size, style, entry control, color, list contents, icons, etc.) are common to all the representations and cannot be modified separately. Consequently, when you use commands based on the expanded/collapsed configuration or the current item, for example `Count list items` (when the final `*` parameter is not passed), it is important to be able to specify the representation to be used without any ambiguity. +Las demás características (fuente, tamaño de fuente, estilo, control de entrada, color, contenido de la lista, iconos, etc.) son comunes a todas las representaciones y no pueden modificarse por separado. Por consiguiente, cuando se utilizan comandos basados en la configuración expandida/colapsada o en el elemento actual, por ejemplo `Count list items` (cuando no se pasa el parámetro final `*`), es importante poder especificar la representación que se utilizará sin ninguna ambigüedad. -You must use the `ListRef` ID with language commands when you want to specify the hierarchical list found in memory. On the other hand, if you want to specify the representation of a hierarchical list object at the form level, you must use the object name (string type) in the command, via the standard syntax (*;"ListName", etc.). +Debe utilizar el identificador `RefLista` con los comandos del lenguaje cuando quiera especificar la lista jerárquica que se encuentra en la memoria. En cambio, si desea especificar la representación al nivel del formulario de un objeto Lista jerárquica, debe utilizar el nombre del objeto (tipo cadena) en el comando, mediante la sintaxis estándar (*; "NomLista", etc.). -> In the case of commands that set properties, the syntax based on the object name does not mean that only the form object specified will be modified by the command, but rather that the action of the command will be based on the state of this object. The common characteristics of hierarchical lists are always modified in all of their representations. For example, if you execute: +> En el caso de los comandos que definen propiedades, la sintaxis basada en el nombre del objeto no significa que sólo el objeto formulario especificado será modificado por el comando, sino que la acción del comando se basará en el estado de este objeto. Las características comunes de las listas jerárquicas se modifican siempre en todas sus representaciones. Por ejemplo, si pasa la instrucción: ```4d SET LIST ITEM FONT(*;"mylist1";*;thefont) ``` +> ... está indicando que quiere modificar la fuente de un elemento de la lista jerárquica asociada al objeto de formulario *mylist1*. El comando tendrá en cuenta el elemento actual del objeto *mylist1* para definir el elemento a modificar, pero esta modificación se trasladará a todas las representaciones de la lista en todos los procesos. -> ... 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 @ +### Soporte de @ -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: +Al igual que con otros comandos de gestión de propiedades de objetos, es posible utilizar el carácter "@" en el parámetro `NomLista`. Por regla general, esta sintaxis se utiliza para designar un conjunto de objetos del formulario. Sin embargo, en el contexto de los comandos de listas jerárquicas, esto no se aplica en todos los casos. Esta sintaxis tendrá dos efectos diferentes según el tipo de comando: -- 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.†- +- Para los comandos que fijan propiedades, esta sintaxis designa todos los objetos cuyo nombre corresponde (comportamiento estándar). Por ejemplo, el parámetro "LH@" designa todos los objetos del tipo lista jerárquica cuyo nombre empieza por "LH." - `DELETE FROM LIST` - `INSERT IN LIST` - `SELECT LIST ITEMS BY POSITION` @@ -66,22 +65,23 @@ 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: - + +- Para los comandos que recuperan propiedades, esta sintaxis designa el primer objeto cuyo nombre corresponde: - `Count list items` - `Find in list` - `GET LIST ITEM` - - `Get list item font` - - `GET LIST ITEM ICON` - - `GET LIST ITEM PARAMETER` - - `GET LIST ITEM PROPERTIES` + - `Get list item font` + - `GET LIST ITEM ICON` + - `GET LIST ITEM PARAMETER` + - `GET LIST ITEM PROPERTIES` - `List item parent` - `List item position` - `Selected list items` -## Generic commands to use with hierarchical lists -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): +## Comandos genéricos utilizables con listas jerárquicas + +Es posible modificar la apariencia de una lista jerárquica en un formulario utilizando varios comandos 4D genéricos. Puede pasar a estos comandos el nombre del objeto de la lista jerárquica (utilizando el parámetro *), o su nombre de variable (que contiene el valor ListRef): - `OBJECT SET FONT` - `OBJECT SET FONT STYLE` @@ -93,60 +93,64 @@ It is possible to modify the appearance of a hierarchical list form objects usin - `OBJECT SET SCROLL POSITION` - `OBJECT SET RGB COLORS` -> 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. +> Recordatorio: excepto `OBJECT SET SCROLL POSITION`, estos comandos modifican todas las representaciones de una misma lista, aunque sólo se especifique una lista a través de su nombre de objeto. + +## Prioridad de los comandos de propiedad + +Ciertas propiedades de las listas jerárquicas (por ejemplo, el atributo **editable** o el color) pueden definirse de diferentes maneras: en las propiedades del formulario, mediante un comando del tema "Propiedades de los objetos" o mediante un comando del tema "Lista jerárquica". Cuando se utilizan los tres medios para definir las propiedades de la lista, se aplica el siguiente orden de prioridad: + +1. Comandos del tema "Lista jerárquica" +2. Comandos genéricos de propiedad de objeto +3. Propiedad formulario + +Este principio se aplica independientemente del orden de llamada de los comandos. Si una propiedad de un elemento se modifica individualmente a través de un comando de lista jerárquica, el comando de propiedad de objeto equivalente no tendrá ningún efecto sobre este elemento, incluso si se llama posteriormente. Por ejemplo, si el color de un elemento se modifica a través del comando `SET LIST ITEM PROPERTIES`, el comando `OBJECT SET COLOR` no tendrá ningún efecto sobre este elemento. -## Priority of property commands -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: +## Gestión de los elementos por posición o por referencia -1. Commands of the “Hierarchical Lists†theme -2. Generic object property commands -3. Form property +Normalmente se puede trabajar de dos maneras con el contenido de las listas jerárquicas: por posición o por referencia. -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. +- Cuando se trabaja por posición, 4D se basa en la posición con respecto a los elementos de la lista que aparecen en pantalla para identificarlos. El resultado será diferente según se expandan o colapsen determinados elementos jerárquicos. Tenga en cuenta que en el caso de las representaciones múltiples, cada objeto formulario tiene su propia configuración de elementos expandidos/colapsados. +- Cuando se trabaja por referencia, 4D se basa en el número de identificación *itemRef* de los elementos de la lista. Así, cada elemento puede especificarse individualmente, independientemente de su posición o de su visualización en la lista jerárquica. -## Management of items by position or by reference -You can usually work in two ways with the contents of hierarchical lists: by position or by reference. +### Utilizar los números de referencia de los artículos (itemRef) -- 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. +Cada elemento de una lista jerárquica tiene un número de referencia (*itemRef*) del tipo Entero largo. Este valor sólo está destinado a su propio uso: 4D simplemente lo mantiene. -### Using item reference numbers (itemRef) +> Atención: puede utilizar cualquier tipo de valor entero largo como número de referencia, excepto 0. De hecho, para la mayoría de los comandos de este tema, se utiliza el valor 0 para especificar el último elemento añadido a la lista. -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. +He aquí algunos consejos para utilizar los números de referencia: -> Warning: You can use any type of Longint value as a reference number, except for 0. In fact, for most of the commands in this theme, the value 0 is used to specify the last item added to the list. +1. No es necesario identificar cada elemento con un número único (nivel principiante). -Here are a few tips for using reference numbers: + - Primer ejemplo: se construye por programación un sistema de pestañas, por ejemplo, una libreta de direcciones. Como el sistema devuelve el número de la pestaña seleccionada, probablemente no necesitará más información que ésta. En este caso, no se preocupe por los números de referencia de los elementos: pase un valor cualquiera (excepto 0) en el parámetro *itemRef*. Tenga en cuenta que para un sistema de libreta de direcciones, puede predefinir una lista A, B, ..., Z en el modo Diseño. También se puede crear por programación para eliminar las letras para las que no hay registros. + - Segundo ejemplo: al trabajar con una base, se construye progresivamente una lista de palabras clave. Puede guardar esta lista al final de cada sesión utilizando los comandos `SAVE LIST` o `LIST TO BLOB` y volver a cargarla al comienzo de cada nueva sesión utilizando el `Load list` o `BLOB to list`. Puede mostrar esta lista en una paleta flotante; cuando cada usuario hace clic en una palabra clave de la lista, el elemento elegido se inserta en el área introducible que está seleccionada en el proceso en primer plano. Lo importante es que sólo procese el elemento seleccionado, porque el comando `Select list items` devuelve la posición del elemento que debe procesar. Cuando se utiliza este valor de posición, se obtiene el título del elemento mediante el comando `GET LIST ITEM`. También en este caso, no es necesario identificar cada elemento individualmente; puede pasar cualquier valor (excepto 0) en el parámetro *itemRef*. -1. You do not need to identify each item with a unique number (beginner level). +2. Es necesario identificar parcialmente los elementos de la lista (nivel intermedio). + El número de referencia del elemento se utiliza para almacenar la información necesaria cuando se debe trabajar con el elemento; este punto se detalla en el ejemplo del comando `APPEND TO LIST`. En este ejemplo, utilizamos los números de referencia de los artículos para almacenar los números de registro. Sin embargo, debemos ser capaces de establecer una distinción entre los elementos que corresponden a los registros [Department] y los que corresponden a los registros [Employees]. -- 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. +3. Identifique todos los elementos de la lista individualmente (nivel avanzado). + Programe una gestión elaborada de listas jerárquicas en la que es absolutamente necesario poder identificar cada elemento individualmente en cada nivel de la lista. Una forma sencilla de ponerlo en práctica es mantener un contador personal. Suponga que crea una lista *hlList* utilizando el comando `APPEND TO LIST`. En esta etapa, se inicializa un contador *vhlCounter* en 1. Cada vez que se llama a `APPEND TO LIST` o `INSERT IN LIST`, se incrementa este contador `(vhlCounter:=vhlCounter+1)`, y se pasa el número del contador como número de referencia del elemento. El truco consiste en no disminuir nunca el contador cuando se eliminan elementos: el contador sólo puede aumentar. De este modo, se garantiza la unicidad de los números de referencia de los elementos. Como estos números son de tipo Entero largo, puede añadir o insertar más de dos mil millones de elementos en una lista que ha sido reiniciada... (sin embargo, si está trabajando con un número tan grande de elementos, esto suele significar que debes utilizar una tabla en lugar de una lista) -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. +> Si se utilizan operadores Bitwise, también se pueden utilizar los números de referencia de los elementos para almacenar información que se puede poner en un Entero largo, es decir, 2 enteros, valores de 4 bytes o de nuevo 32 booleanos. -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.) +### ¿Cuándo necesita números de referencia únicos? -> 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. +En la mayoría de los casos, cuando se utilizan listas jerárquicas con fines de interfaz de usuario y cuando sólo se trata del elemento seleccionado (por un clic o arrastrado), no será necesario utilizar los números de referencia de los elementos en absoluto. Con `Selected list items` y `GET LIST ITEM`, tiene todo lo que necesita para tratar con el elemento seleccionado actualmente. Además, comandos como `INSERT IN LIST` y `DELETE FROM LIST` permiten manipular la lista "relativamente" con respecto al elemento seleccionado. -### When do you need unique reference numbers? +Básicamente, es necesario tratar con los números de referencia de los elementos cuando se quiere acceder directamente a cualquier elemento de la lista de forma programada y no necesariamente al actualmente seleccionado en la lista. -In most cases, when using hierarchical lists for user interface purposes and when only dealing with the selected item (the one that was clicked or dragged), you will not need to use item reference numbers at all. Using `Selected list items` and `GET LIST ITEM` you have all you need to deal with the currently selected item. In addition, commands such as `INSERT IN LIST` and `DELETE FROM LIST` allow you to manipulate the list “relatively†with respect to the selected item. -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. +## Elemento modificable -## Modifiable element +Puede controlar si los elementos de la lista jerárquica pueden ser modificados por el usuario utilizando el atajo de teclado **Alt+clic**(Windows) / **Opción+clic** (macOS), o realizando una pulsación larga sobre el texto del elemento. -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. +- Sea cual sea la fuente de datos de la lista jerárquica, puede controlar todo el objeto con la propiedad [Editable](properties_Entry.md#enterable). -- Whatever the hierarchical list data source, you can control the whole object with the [Enterable](properties_Entry.md#enterable) property. +- Además, si llena la lista jerárquica utilizando una lista creada en el editor de listas, puede controlar si un elemento de una lista jerárquica es modificable mediante la opción **Elemento modificable** del editor de listas. Para más información, consulte [Definir las propiedades de la lista](https://doc.4d.com/4Dv17R6/4D/17-R6/Setting-list-properties.300-4354625.en.html). -- 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 +## Propiedades soportadas -[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 +[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) - [Help Tip](properties_Help.md#help-tip) - [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 diff --git a/website/translated_docs/es/FormObjects/listbox_overview.md b/website/translated_docs/es/FormObjects/listbox_overview.md index 55167f4a4919d7..03fa11682dd843 100644 --- a/website/translated_docs/es/FormObjects/listbox_overview.md +++ b/website/translated_docs/es/FormObjects/listbox_overview.md @@ -3,36 +3,38 @@ id: listboxOverview title: List Box --- -## Overview -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. +Los list boxes son objetos activos complejos que permiten mostrar e introducir datos en forma de columnas sincronizadas. Pueden vincularse a contenidos de la base de datos, como selecciones de entidades y secciones de registros, o a cualquier contenido del lenguaje, como colecciones y arrays. Incluyen funciones avanzadas relativas a la entrada de datos, la ordenación de columnas, la gestión de eventos, el aspecto personalizado, el desplazamiento de columnas, 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). +Un list box contiene una o varias columnas cuyo contenido se sincroniza automáticamente. El número de columnas es, en teoría, ilimitado (depende de los recursos de la máquina). -### Basic user features +## Generalidades -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: +### Principios de utilización básicos + +Durante la ejecución, los list box permiten visualizar e introducir datos en forma de listas. Para hacer que una celda sea editable ([si se permite la entrada para la columna](#managing-entry)), basta con pulsar dos veces sobre el valor que contiene: ![](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. +Los usuarios pueden introducir y mostrar el texto en varias líneas dentro de una celda de list box. Para añadir un salto de línea, presione **Ctrl+Retorno de carro** en Windows o **Opción+Retorno de carro** en macOS. + +En las celdas se pueden mostrar booleanos e imágenes, así como fechas, horas o números. Es posible ordenar los valores de las columnas haciendo clic en un encabezado ([ordenación estándar](#managing-sorts)). Todas las columnas se sincronizan automáticamente. -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. +También es posible cambiar el tamaño de cada columna, y el usuario puede modificar el orden de las [columnas](properties_ListBox.md#locked-columns-and-static-columns) y [líneas](properties_Action.md#movable-rows) moviéndolas con el ratón, si esta acción está autorizada. Tenga en cuenta que los list box se pueden utilizar en [modo jerárquico](#caja-de-lista-jerárquica). -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). +El usuario puede seleccionar una o varias líneas utilizando los atajos estándar: **Mayúsculas+clic** para una selección adyacente y **Ctrl+clic** (Windows) o **Comando+clic** (macOS) para una selección no adyacente. -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. -### List box parts +### Partes de list box -A list box is composed of four distinct parts: +Un list box se compone de cuatro partes distintas: -* the list box object in its entirety, -* columns, -* column headers, and -* column footers. +* el objeto list box en su totalidad, +* columns, +* column headers, and +* column footers. ![](assets/en/FormObjects/listbox_parts.png) @@ -45,55 +47,61 @@ It is possible to add an object method to the list box object and/or to each col The column object method gets events that occur in its [header](#list-box-headers) and [footer](#list-box-footers). + + ### List box types 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**: 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). +- **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. - +- **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. + ### Managing list boxes You can completely configure a list box object through its properties, and you can also manage it dynamically through programming. 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 -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. +## Objetos tipo List box -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 +### List box de tipo array +En un list box de tipo array, cada columna debe estar asociada a un array unidimensional 4D; se pueden utilizar todos los tipos de array, a excepción de los arrays de punteros. The number of rows is based on the number of array elements. + +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. -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: +Con los list box de tipo array, los valores introducidos o mostrados se gestionan utilizando el lenguaje 4D. You can also associate a [choice list](properties_DataSource.md#choice-list) with a column in order to control data entry. Los valores de las columnas se gestionan mediante comandos de alto nivel del tema List box (como `LISTBOX INSERT ROWS` o `LISTBOX DELETE ROWS`), así como comandos de manipulación de arrays. Por ejemplo, para inicializar el contenido de una columna, puede utilizar la siguiente instrucción: ```4d -ARRAY TEXT(ColumnName;size) +ARRAY TEXT(varCol;size) ``` -You can also use a list: +También puede utilizar una lista: ```4d -LIST TO ARRAY("ListName";ColumnName) +LIST TO ARRAY("ListName";varCol) ``` +> **Atención**: cuando un objeto List box contiene varias columnas de diferentes tamaños, sólo se mostrará el número de elementos del array (columna) más pequeño. Debe asegurarse de que cada array tenga el mismo número de elementos que los demás. Además, si una columna del list box está vacía (esto ocurre cuando el array asociado no fue declarado o dimensionado correctamente con el lenguaje), el list box no muestra 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. -### Selection list boxes -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. +### List box de tipo selección + +En este tipo de list box, cada columna puede estar asociada a un campo (por ejemplo `[Employees]LastName)` o a una expresión. 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. The contents of each row is then evaluated according to a selection of records: the **current selection** of a table or a **named selection**. 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 box colección o entity selection 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. @@ -101,352 +109,216 @@ Each element of the collection or each entity is available as an object that can 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. -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: +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. Por ejemplo: ```4d myCol:=myCol.push("new value") //display new value in 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. - -### Supported Form Events - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Compound formulas cannot be sorted. -(e.g., This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Arrays list boxes only* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Close Detail | - [row](#additional-properties) | *Current Selection & Named Selection list boxes only* | -| On Collapse | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Hierarchical list box only* | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Delete Action | - [row](#additional-properties) | | -| On Display Detail | - [isRowSelected](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Expand | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Hierarchical list box only* | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *Arrays, Current Selection & Named Selection list boxes only* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell has been completed* | -| On Mouse Enter | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Mouse Leave | | | -| On Mouse Move | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Open Detail | - [row](#additional-properties) | *Current Selection & Named Selection list boxes only* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Arrays list boxes only* | -| On Selection Change | | | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | - - -#### Additional Properties - -Form events on list box or list box column objects may return the following additional properties: - -| Property | Type | Description | -| ---------------- | ------- | --------------------------------------------------------------------- | -| area | text | List box object area ("header", "footer", "cell") | -| areaName | text | Name of the area | -| column | longint | Column number | -| columnName | text | Name of the column | -| footerName | text | Name of the footer | -| headerName | text | Name of the header | -| horizontalScroll | longint | Positive if scroll is towards the right, negative if towards the left | -| isRowSelected | boolean | True if row is selected, else False | -| newPosition | longint | New position of the column or row | -| newSize | longint | New size (in pixels) of the column or row | -| oldPosition | longint | Previous position of the column or row | -| oldSize | longint | Previous size (in pixels) of the column or row | -| row | longint | Row number | -| verticalScroll | longint | Positive if scroll is towards the bottom, negative if towards the top | +### Propiedades soportadas + +Las propiedades soportadas dependen del tipo de list box. + + +| Propiedad | List box array | List box selección | List box colección o entity selection | +| ----------------------------------------------------------------------------------------- | -------------- | ------------------ | ------------------------------------- | +| [Color de fondo alternado](properties_BackgroundAndBorder.md#alternate-background-color) | X | X | X | +| [Color de fondo](properties_BackgroundAndBorder.md#background-color) | X | X | X | +| [Negrita](properties_Text.md#bold) | X | X | X | +| [Expresión color de fondo](properties_BackgroundAndBorder.md#background-color-expression) | | X | X | +| [Estilo del borde](properties_BackgroundAndBorder.md#border-line-style) | X | X | X | +| [Abajo](properties_CoordinatesAndSizing.md#bottom) | X | X | X | +| [Class](properties_Object.md#css-class) | X | X | X | +| [Collection o entity selection](properties_Object.md#collection-or-entity-selection) | | X | X | +| [Redimensionamiento columnas auto](properties_ResizingOptions.md#column-auto-resizing) | X | X | X | +| [Elemento actual](properties_DataSource.md#current-item) | | | X | +| [Posición elemento actual](properties_DataSource.md#current-item-position) | | | X | +| [Fuente de datos](properties_Object.md#data-source) | X | X | X | +| [Nombre formulario detallado](properties_ListBox.md#detail-form-name) | | X | | +| [Mostrar encabezados](properties_Headers.md#display-headers) | X | X | X | +| [Mostrar pies](properties_Footers.md#display-footers) | X | X | X | +| [Doble clic en línea](properties_ListBox.md#double-click-on-row) | | X | | +| [Arrastrable](properties_Action.md#droppable) | X | X | X | +| [Soltable](properties_Action.md#droppable) | X | X | X | +| [Focusable](properties_Entry.md#focusable) | X | X | X | +| [Fuente](properties_Text.md#font) | X | X | X | +| [Color de fuente](properties_Text.md#font_color) | X | X | X | +| [Expresión color fuente](properties_Text.md#font-color-expression) | | X | X | +| [Tamaño fuente](properties_Text.md#font-size) | X | X | X | +| [Alto (list box)](properties_CoordinatesAndSizing.md#height) | X | X | X | +| [Alto (encabezados)](properties_Headers.md#height) | X | X | X | +| [Alto (pies)](properties_Footers.md#height) | X | X | X | +| [Ocultar líneas vacías finales](properties_BackgroundAndBorder.md#hide-extra-blank-rows) | X | X | X | +| [Ocultar rectángulo de enfoque](properties_Appearance.md#hide-focus-rectangle) | X | X | X | +| [Ocultar resaltado selección](properties_Appearance.md#hide-selection-highlight) | X | X | X | +| [List box jerárquico](properties_Object.md#hierarchical-list-box) | X | | | +| [Conjunto resaltado](properties_ListBox.md#highlight-set) | | X | | +| [Alineación horizontal](properties_Text.md#horizontal-alignment) | X | X | X | +| [Color líneas horizontales](properties_Gridlines.md#horizontal-line-color) | X | X | X | +| [Barra de desplazamiento horizontal](properties_Appearance.md#horizontal-scroll-bar) | X | X | X | +| [Dimensionamiento horizontal](properties_ResizingOptions.md#horizontal-sizing) | X | X | X | +| [Itálica](properties_Text.md#italic) | X | X | X | +| [Izquierda](properties_CoordinatesAndSizing.md#left) | X | X | X | +| [Tabla principal](properties_DataSource.md#table) | | X | | +| [Meta info expression](properties_Text.md#meta-info-expression) | | | X | +| [Método](properties_Action.md#method) | X | X | X | +| [Líneas desplazables](properties_Action.md#movable-rows) | X | | | +| [Selección temporal](properties_DataSource.md#selectionName) | | X | | +| [Número de columnas](properties_ListBox.md#number-of-columns) | X | X | X | +| [Número de columnas bloqueadas](properties_ListBox.md#number-of-locked-columns) | X | X | X | +| [Número de columnas estáticas](properties_ListBox.md#number-of-static-columns) | X | X | X | +| [Nombre del objeto](properties_Object.md#object-name) | X | X | X | +| [Derecha](properties_CoordinatesAndSizing.md#right) | X | X | X | +| [Array colores de fondo](properties_BackgroundAndBorder.md#row-background-color-array) | X | | | +| [Array de control de líneas](properties_ListBox.md#row-control-array) | X | | | +| [Array colores de fuente](properties_Text.md#row-font-color-array) | X | | | +| [Altura de las líneas](properties_CoordinatesAndSizing.md#row-height) | X | | | +| [Array altura de las líneas](properties_CoordinatesAndSizing.md#row-height-array) | X | | | +| [Array de estilos](properties_Text.md#row-style-array) | X | | | +| [Elementos seleccionados](properties_DataSource.md#selected-items) | | | X | +| [Modo de selección](properties_ListBox.md#selection-mode) | X | X | X | +| [Edición con un solo clic](properties_Entry.md#single-click-edit) | X | X | X | +| [Ordenable](properties_Action.md#sortable) | X | X | X | +| [Acción estándar](properties_Action.md#standard-action) | X | | | +| [Expresión estilo](properties_Text.md#style-expression) | | X | X | +| [Arriba](properties_CoordinatesAndSizing.md#top) | X | X | X | +| [Transparente](properties_BackgroundAndBorder.md#transparent) | X | X | X | +| [Tipo](properties_Object.md#type) | X | X | X | +| [Subrayado](properties_Text.md#underline) | X | X | X | +| [Variable o expresión](properties_Object.md#variable-or-expression) | X | X | | +| [Alineamiento vertical](properties_Text.md#vertical-alignment) | X | X | X | +| [Color líneas verticales](properties_Gridlines.md#vertical-line-color) | X | X | X | +| [Barra de desplazamiento vertical](properties_Appearance.md#vertical-scroll-bar) | X | X | X | +| [Dimensionamiento vertical](properties_ResizingOptions.md#vertical-sizing) | X | X | X | +| [Visibilidad](properties_Display.md#visibility) | X | X | X | +| [Ancho](properties_CoordinatesAndSizing.md#width) | X | X | X | + + +> Las columnas, los encabezados y los pies de list box soportan propiedades específicas. + + +### Eventos formulario soportados + + +| Evento formulario | Propiedades adicionales devueltas (ver [Evento formulario](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) para las propiedades principales) | Comentarios | +| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| On After Edit |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On After Keystroke |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On After Sort |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [headerName](#additional-properties)
    • | *Las fórmulas compuestas no se pueden ordenar.
      (e.g., This.firstName + This.lastName)* | +| On Alternative Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *List box array únicamente* | +| On Before Data Entry |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Before Keystroke |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Begin Drag Over |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Clicked |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Close Detail |
    • [row](#additional-properties)
    • | *List box Selección actual & Selección temporal únicamente* | +| On Collapse |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *List box jerárquicos únicamente* | +| On Column Moved |
    • [columnName](#additional-properties)
    • [newPosition](#additional-properties)
    • [oldPosition](#additional-properties)
    • | | +| On Column Resize |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [newSize](#additional-properties)
    • [oldSize](#additional-properties)
    • | | +| On Data Change |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Delete Action |
    • [row](#additional-properties)
    • | | +| On Display Detail |
    • [isRowSelected](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Double Clicked |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Drag Over |
    • [area](#additional-properties)
    • [areaName](#additional-properties)
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Drop |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Expand |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *List box jerárquicos únicamente* | +| On Footer Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [footerName](#additional-properties)
    • | *List box Arrays, Selección actual y Selección temporal únicamente* | +| On Getting Focus |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *Propiedades adicionales devueltas sólo al editar una celda* | +| On Header Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [headerName](#additional-properties)
    • | | +| On Load | | | +| On Losing Focus |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *Propiedades adicionales devueltas sólo cuando la modificación de una celda se completa* | +| On Mouse Enter |
    • [area](#additional-properties)
    • [areaName](#additional-properties)
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Mouse Leave | | | +| On Mouse Move |
    • [area](#additional-properties)
    • [areaName](#additional-properties)
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Open Detail |
    • [row](#additional-properties)
    • | *List box Selección actual & Selección temporal únicamente* | +| On Row Moved |
    • [newPosition](#additional-properties)
    • [oldPosition](#additional-properties)
    • | *List box array únicamente* | +| On Selection Change | | | +| On Scroll |
    • [horizontalScroll](#additional-properties)
    • [verticalScroll](#additional-properties)
    • | | +| On Unload | | | + + +#### Propiedades adicionales + +Los eventos formulario de los objetos list box o columnas de list box pueden devolver las siguientes propiedades adicionales: + +| Propiedad | Tipo | Descripción | +| ---------------- | ------------ | --------------------------------------------------------------------- | +| area | texto | List box object area ("header", "footer", "cell") | +| areaName | texto | Name of the area | +| column | entero largo | Column number | +| columnName | texto | Name of the column | +| footerName | texto | Name of the footer | +| headerName | texto | Name of the header | +| horizontalScroll | entero largo | Positive if scroll is towards the right, negative if towards the left | +| isRowSelected | booleano | True if row is selected, else False | +| newPosition | entero largo | New position of the column or row | +| newSize | entero largo | New size (in pixels) of the column or row | +| oldPosition | entero largo | Previous position of the column or row | +| oldSize | entero largo | Previous size (in pixels) of the column or row | +| row | entero largo | Row number | +| verticalScroll | entero largo | Positive if scroll is towards the bottom, negative if towards the top | > If an event occurs on a "fake" column or row that doesn't exist, an empty string is typically returned. -## 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: - -![](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. - -> 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). - -### Column Specific Properties - -[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) - -### Supported Form Events - - - - - - - - - - - - - +## Columnas de list box +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: +![](assets/en/FormObjects/listbox_column.png) -| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Compound formulas cannot be sorted. -(e.g., This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Arrays list boxes only* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *Arrays, Current Selection & Named Selection list boxes only* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell has been completed* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Arrays list boxes only* | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +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. +> 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). -## List box headers +### Propiedades específicas de la columna -> 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. +[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) -When headers are displayed, you can select a header in the Form editor by clicking it when the list box object is selected: +### Eventos formulario soportados + +| Evento formulario | Propiedades adicionales devueltas (ver [Evento formulario](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) para las propiedades principales) | Comentarios | +| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| On After Edit |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On After Keystroke |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On After Sort |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [headerName](#additional-properties)
    • | *Las fórmulas compuestas no se pueden ordenar.
      (e.g., This.firstName + This.lastName)* | +| On Alternative Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *List box array únicamente* | +| On Before Data Entry |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Before Keystroke |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Begin Drag Over |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Clicked |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Column Moved |
    • [columnName](#additional-properties)
    • [newPosition](#additional-properties)
    • [oldPosition](#additional-properties)
    • | | +| On Column Resize |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [newSize](#additional-properties)
    • [oldSize](#additional-properties)
    • | | +| On Data Change |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Double Clicked |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Drag Over |
    • [area](#additional-properties)
    • [areaName](#additional-properties)
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Drop |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | | +| On Footer Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [footerName](#additional-properties)
    • | *List box Arrays, Selección actual y Selección temporal únicamente* | +| On Getting Focus |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *Propiedades adicionales devueltas sólo al editar una celda* | +| On Header Click |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [headerName](#additional-properties)
    • | | +| On Load | | | +| On Losing Focus |
    • [column](#additional-properties)
    • [columnName](#additional-properties)
    • [row](#additional-properties)
    • | *Propiedades adicionales devueltas sólo cuando la modificación de una celda se completa* | +| On Row Moved |
    • [newPosition](#additional-properties)
    • [oldPosition](#additional-properties)
    • | *List box array únicamente* | +| On Scroll |
    • [horizontalScroll](#additional-properties)
    • [verticalScroll](#additional-properties)
    • | | +| On Unload | | | + + +## Encabezados de list box + +> Para poder acceder a las propiedades de los encabezados de un list box, debe activar la opción [Mostrar encabezados](properties_Headers.md#display-headers) del list box. + +Cuando se muestran los encabezados, puede seleccionar un encabezado en el editor de formularios haciendo clic en él cuando el objeto List box esté seleccionado: ![](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. +Puede definir propiedades de texto estándar para cada encabezado de columna de List box; en este caso, estas propiedades tienen prioridad sobre las de la columna o del propio 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). + +Además, tiene acceso a las propiedades específicas de los encabezados. 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) @@ -454,36 +326,41 @@ At runtime, events that occur in a header are generated in the [list box column 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. -### Header Specific Properties +### Propiedades específicas de los encabezados + +[Negrita](properties_Text.md#bold) - [Clase Css](properties_Object.md#css-class) - [Fuente](properties_Text.md#font) - [Color de fuente](properties_Text.md#font-color) - [Mensaje de ayuda](properties_Help.md#help-tip) - [Alineación horizontal](properties_Text.md#horizontal-alignment) - [Icon Location](properties_TextAndPicture.md#icon-location) - [Itálica](properties_Text.md#italic) - [Nombre de objeto](properties_Object.md#object-name) - [Ruta de acceso](properties_TextAndPicture.md#picture-pathname) - [Título](properties_Object.md#title) - [Subrayado](properties_Text.md#underline) - [Variable o Expresión](properties_Object.md#variable-or-expression) - [Alineación vertical](properties_Text.md#vertical-alignment) - [Ancho](properties_CoordinatesAndSizing.md#width) + -[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. +## Pies de list box +> Para poder acceder a las propiedades de los pies de un list box, debe activar la opción [Mostrar pies](properties_Footers.md#display-footers). -When footers are displayed, you can click to select one when the list box object is selected in the Form editor: +Los List box pueden contener "pies de página" no editables, que muestren información adicional. En el caso de los datos mostrados en forma de tabla, los pies de página suelen utilizarse para mostrar cálculos como los totales o los promedios. + +Cuando se muestran los pies, puede hacer clic para seleccionar un pie de list box en el editor de formularios haciendo clic en el objeto: ![](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 pie de columna de list box, puede definir propiedades de texto estándar: en este caso, estas propiedades tienen prioridad sobre las de la columna o del 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). At runtime, events that occur in a footer are generated in the [list box column object method](#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. -### Footer Specific Properties +### Propiedades específicas de los pies + [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: - 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. +- 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. Si, en el contexto de este evento, $0 se define como -1, la celda se considera como no editable. Si el evento se generó después de presionar **Tab** o **Mayús+Tab**, el foco pasa a la siguiente celda o a la anterior, respectivamente. Si $0 no es -1 (por defecto $0 es 0), la celda se puede introducir y pasa al modo de edición. 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. @@ -493,13 +370,13 @@ Here is the method of the *arrText* column: ```4d Case of - :(FORM event.code=On Before Data Entry) // a cell gets the focus - LISTBOX GET CELL POSITION(*;"lb";$col;$row) + :(FORM event.code=On Before Data Entry) // una celda obtiene el foco + LISTBOX GET CELL POSITION(*;"lb";$col;$row) // identification of cell - If(arrDate{$row} 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 -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: +La gestión de selecciones es diferente dependiendo de si el list box se basa en un array, en una selección de registros o en una selección de colecciones/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 selección**: las selecciones se gestionan mediante un conjunto llamado por defecto `$ListboxSetX` (donde X empieza en 0 y se incrementa en función del número de list box en el formulario), que puede modificar si es necesario. Este conjunto se [define en las propiedades](properties_ListBox.md#highlight-set) del list box. Es mantenido automáticamente por 4D: si el usuario selecciona una o más líneas en el list box, el conjunto se actualiza inmediatamente. Por otra parte, también es posible utilizar los comandos del tema "Conjuntos" para modificar por programación la selección en el list box. -- **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 colección/selección de entidades**: las selecciones se gestionan a través de las propiedades del list box dedicado: + - [Elemento actual](properties_DataSource.md#current-item) es un objeto que recibirá el elemento/la entidad seleccionado(a) + - [Elementos seleccionados](properties_DataSource.md#selected-items) es una colección de elementos seleccionados + - [Posición del elemento actual](properties_DataSource.md#current-item-position) devuelve la posición del elemento o de la entidad seleccionada. +- **List box de tipo array**: el comando `LISTBOX SELECT ROW` puede utilizarse para seleccionar una o más líneas del list box por programación. La [variable asociada al objeto List box](propiedades_Objeto.md#variable-o-expresión) se utiliza para obtener, definir o almacenar las selecciones de líneas en el objeto. Esta variable corresponde a un array de booleanos que es creado y mantenido automáticamente por 4D. El tamaño de este array viene determinado por el tamaño del list box: contiene el mismo número de elementos que el array más pequeño asociado a las columnas. Cada elemento de este array contiene `True` si se selecciona la línea correspondiente y `False` en caso contrario. 4D actualiza el contenido de este array en función de las acciones del usuario. Por el contrario, puede cambiar el valor de los elementos del array para cambiar la selección en el list box. Por otra parte, no se pueden insertar ni borrar líneas en este array; tampoco se pueden reescribir las líneas. El comando `Count in array` puede utilizarse para averiguar el número de líneas seleccionadas. Por ejemplo, este método permite invertir la selección de la primera línea del list box (tipo array): ```4d ARRAY BOOLEAN(tBListBox;10) - //tBListBox is the name of the list box variable in the form + //tBListBox es el nombre de la variable asociada al list box en el formulario If(tBListBox{1}=True) tBListBox{1}:=False Else @@ -560,6 +436,7 @@ Selections are managed differently depending on whether the list box is based on > The `OBJECT SET SCROLL POSITION` command scrolls the list box rows so that the first selected row or a specified row is displayed. + ### 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: @@ -571,30 +448,28 @@ You can then define specific background colors, font colors and/or font styles b > 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.). -#### Selection list boxes +#### List box de tipo selección 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). Keep in mind that expressions are automatically re-evaluated each time the: - - 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. -#### Array list boxes +#### List box de tipo array 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. 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). 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: - -- `On Getting Focus` (list box property) -- `On Losing Focus` (list box property) -- `On Activate` (form property) +- `On Getting Focus` (propiedad list box) +- `On Losing Focus` (propiedad list box) +- `On Activate` (propiedad list box) - `On Deactivate` (form property) ...depending on whether and how you want to visually represent changes of focus in selections. -##### Example +##### Ejemplo You have chosen to hide the system highlight and want to display list box selections with a green background color, as shown here: @@ -602,8 +477,9 @@ You have chosen to hide the system highlight and want to display list box select 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: - "rowFillSource": "_ListboxBackground", - +``` + "rowFillSource": "_ListboxBackground", +``` In the object method of the list box, you can write: @@ -611,10 +487,10 @@ In the object method of the list box, you can write: Case of :(FORM event.code=On Selection Change) $n:=Size of array(LB_Arrays) - ARRAY LONGINT(_ListboxBackground;$n) // row background colors + ARRAY LONGINT(_ListboxBackground;$n) // colores de fondo de la línea For($i;1;$n) If(LB_Arrays{$i}=True) // selected - _ListboxBackground{$i}:=0x0080C080 // green background + _ListboxBackground{$i}:=0x0080C080 // fondo verde Else // not selected _ListboxBackground{$i}:=lk inherited End if @@ -626,10 +502,10 @@ For a selection type list box, to produce the same effect you can use a method t For example, in the JSON form, you have defined the following Highlight Set and Background Color Expression for the list box: - "highlightSet": "$SampleSet", - "rowFillSource": "UI_SetColor", - - +``` + "highlightSet": "$SampleSet", + "rowFillSource": "UI_SetColor", +``` You can write in the *UI_SetColor* method: ```4d @@ -644,30 +520,32 @@ You can write in the *UI_SetColor* method: > 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. + ## Managing sorts 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. You can prevent standard user sorts by deselecting the [Sortable](properties_Action.md#sortable) property of the 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. +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`](https://doc.4d.com/4dv19/help/command/en/page1606.html) command) and relevant 4D commands. -> 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. +> The [Sortable](properties_Action.md#sortable) property only affects the standard user sorts; the [`LISTBOX SORT COLUMNS`](https://doc.4d.com/4dv19/help/command/en/page916.html) command does not take this property into account. 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. -- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed; - ![](assets/en/FormObjects/sorticon0.png) +- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed. + ![](assets/en/FormObjects/sorticon0.png) + +- Si la variable está definida como 1, la columna se organiza en orden ascendente y se muestra la flecha de ordenación. ![](assets/en/FormObjects/sorticon1.png) + +- Si la variable está definida en 2, la columna se organiza en orden descendente y se muestra la flecha de clasificación. ![](assets/en/FormObjects/sorticon2.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) +> Only declared or dynamic [variables](Concepts/variables.md) can be used as header column variables. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.sortValue` are not supported. -- 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) +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. -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. +> The [`OBJECT SET FORMAT`](https://doc.4d.com/4dv19/help/command/en/page236.html) command offers specific support for icons in list box headers, which can be useful when you want to work with a customized sort icon. -> 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. ## Managing row colors, styles, and display @@ -678,6 +556,7 @@ There are several different ways to set background colors, font colors and font - 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)). + ### Priority & inheritance Priority and inheritance principles are observed when the same property is set at more than one level. @@ -691,7 +570,6 @@ Priority and inheritance principles are observed when the same property is set a | | List box properties | | low priority | Meta Info expression (for collection or entity selection list boxes) | - 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. For each attribute (style, color and background color), an **inheritance** is implemented when the default value is used: @@ -718,17 +596,21 @@ To restore the original appearance of the list box, you can: - 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. + ### Using arrays and expressions Depending of the list box type, you can use different properties to customize row colors, styles and display: -| 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) | +| Propiedad | List box array | List box selección | List box colección o entity selection | +| ---------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Background color | [Array colores de fondo](properties_BackgroundAndBorder.md#row-background-color-array) | [Expresión color de fondo](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) | +| Color de fuente | [Array colores de fuente](properties_Text.md#row-font-color-array) | [Expresión color fuente](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)|-|-| +[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 @@ -738,203 +620,213 @@ Two printing modes are available: **preview mode** - which can be used to print 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. -### Advanced mode +### Modo avanzado 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. In this mode: - 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. +- 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. -## Hierarchical list boxes -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. -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 +## List box jerárquicos + +Un list box jerárquico es un list box en el que el contenido de la primera columna aparece en forma jerárquica. Este tipo de representación se adapta a la presentación de información que incluye valores repetidos y/o que dependen jerárquicamente (país/región/ciudad, etc.). + +> Sólo los [list box de tipo array](#array-list-boxes) pueden ser jerárquicos. + +Los list box jerárquicos son una forma particular de representar los datos, pero no modifican la estructura de datos (arrays). Los list box jerárquicos se gestionan exactamente igual que los list box clásicos. + + +### Definir una jerarquía -To specify a hierarchical list box, there are several possibilities: +Para definir un list box jerárquico, existen varias posibilidades: -* 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. +* Configurar manualmente los elementos jerárquicos utilizando la lista de propiedades del editor de formularios (o editar el formulario JSON). +* Generar visualmente la jerarquía utilizando el menú emergente de gestión de list box, en el editor de formularios. +* 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 + +#### Propiedades del List Box jerá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. 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. -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. +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. Por ejemplo: 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. 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: ![](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. - > 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 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: ![](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: +This command is a shortcut to define a hierarchy. Cuando se selecciona, se llevan a cabo las siguientes acciones: -* 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). +* The **Hierarchical list box** option is checked for the object in the Property List. +* Las variables de las columnas se utilizan para definir la jerarquía. Reemplazan las variables ya definidas. +* Las columnas seleccionadas ya no aparecen en el list box (excepto el título de la primera). -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: +Ejemplo: dado un list box cuyas primeras columnas contienen País, Región, Ciudad y Población. 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: ![](assets/en/FormObjects/listbox_hierarchy2.png) -##### Cancel hierarchy +##### Cancelar jerarquía +When the first column is selected and already specified as hierarchical, you can use the **Cancel hierarchy** command. Cuando elige este comando, se llevan a cabo las siguientes acciones: -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: +* The **Hierarchical list box** option is deselected for the object, +* Los niveles jerárquicos 2 a X se eliminan y se transforman en columnas añadidas al 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 +### Principios de funcionamiento -When a form containing a hierarchical list box is opened for the first time, by default all the rows are expanded. +Cuando se abre por primera vez un formulario que contiene un list box jerárquico, por defecto se despliegan todas las líneas. -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: +Cuando los valores se repiten en los arrays, se añade automáticamente una línea de ruptura y un "nodo" jerárquico en el list box. Por ejemplo, imagine un list box que contenga cuatro arrays que indiquen las ciudades, cada una de ellas caracterizada por su país, su región, su nombre y su número de habitantes: ![](assets/en/FormObjects/hierarch1.png) -If this list box is displayed in hierarchical form (the first three arrays being included in the hierarchy), you obtain: +Si este list box se muestra en forma jerárquica (los tres primeros arrays están incluidos en la jerarquía), se obtiene: ![](assets/en/FormObjects/hierarch2.png) -The arrays are not sorted before the hierarchy is constructed. If, for example, an array contains the data AAABBAACC, the hierarchy obtained is: +Los arrays no se ordenan antes de construir la jerarquía. Si, por ejemplo, un array contiene los datos AAABBAACC, la jerarquía obtenida será: -> 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. +Para desplegar o contraer un "nodo" jerárquico, basta con hacer clic en él. If you **Alt+click** (Windows) or **Option+click** (macOS) on the node, all its sub-elements will be expanded or collapsed as well. Estas operaciones también pueden realizarse por programación utilizando los comandos `LISTBOX EXPAND` y `LISTBOX COLLAPSE`. -When values of the date or time type are included in a hierarchical list box, they are displayed in the short system format. +Cuando se incluyen valores del tipo fecha u hora en un list box jerárquico, se muestran en el formato del sistema corto. -#### Sorts in hierarchical list boxes +#### Ordenación en list box jerárquicos -In a list box in hierarchical mode, a standard sort (carried out by clicking on the header of a list box column) is always constructed as follows: +En un list box en modo jerárquico, una ordenación estándar (realizada haciendo clic en el encabezado de una columna del list box) se construye siempre así: -- 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. -- 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. +- En primer lugar, todos los niveles de la columna jerárquica (primera columna) se clasifican automáticamente por orden ascendente. +- La ordenación se realiza por orden ascendente o descendente (según la acción del usuario) sobre los valores de la columna en la que se ha hecho clic. +- Todas las columnas son sincronizadas. +- En las siguientes ordenaciones realizadas en columnas no jerárquicas del list box, sólo se ordena el último nivel de la primera columna. Es posible modificar la ordenación de esta columna haciendo clic en su encabezado. -Given for example the following list box, in which no specific sort is specified: +Dado, por ejemplo, el siguiente list box, en el que no se especifica ninguna ordenación concreta: ![](assets/en/FormObjects/hierarch3.png) -If you click on the "Population" header to sort the populations by ascending (or alternately descending) order, the data appear as follows: +Si hace clic en el encabezado "Population" para ordenar las poblaciones por orden ascendente (o alternativamente descendente), los datos aparecen de la siguiente manera: ![](assets/en/FormObjects/hierarch4.png) -As for all list boxes, you can [disable the standard sort mechanism](properties_Action.md#sortable) and manage sorts using programming. +Como para todos los list box, puede [desactivar el mecanismo de ordenación estándar](properties_Action.md#sortable) y gestionar las ordenaciones por programación. + -#### Selections and positions in hierarchical list boxes +#### Selecciones y posiciones en list box jerárquicos -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). +Un list box jerárquico muestra un número variable de líneas en la pantalla según el estado desplegado/contraído de los nodos jerárquicos. Sin embargo, esto no significa que el número de líneas de los arrays varíe. Sólo se modifica la visualización, no los datos. Es importante entender este principio porque la gestión programada de los list box jerárquicos se basa siempre en los datos de los arrays, no en los datos mostrados. En particular, las filas de ruptura añadidas automáticamente no se tienen en cuenta en los arrays de opciones de visualización (ver más adelante). -Let’s look at the following arrays for example: +Veamos, por ejemplo, los siguientes arrays: ![](assets/en/FormObjects/hierarch5.png) -If these arrays are represented hierarchically, the row "Quimper" will not be displayed on the second row, but on the fourth, because of the two break rows that are added: +Si estos arrays se representan jerárquicamente, la línea "Quimper" no se mostrará en la segunda línea, sino en la cuarta, debido a las dos líneas de ruptura que se añaden: ![](assets/en/FormObjects/hierarch6.png) -Regardless of how the data are displayed in the list box (hierarchically or not), if you want to change the row containing "Quimper" to bold, you must use the statement Style{2} = bold. Only the position of the row in the arrays is taken into account. +Independientemente de cómo se muestren los datos en el list box (de forma jerárquica o no), si quiere cambiar la línea que contiene "Quimper" a negrita, debe utilizar la instrucción Style{2} = bold. Sólo se tiene en cuenta la posición de la línea en los arrays. -This principle is implemented for internal arrays that can be used to manage: +Este principio se aplica a los arrays internos que se pueden utilizar para gestionar: -- colors -- background colors -- styles -- hidden rows -- selections +- colores +- colores de fondo +- estilos +- líneas ocultas +- selecciones -For example, if you want to select the row containing Rennes, you must pass: +Por ejemplo, si quiere seleccionar la línea que contiene Rennes, debe pasar: ```4d ->MyListbox{3}:=True ``` -Non-hierarchical representation: ![](assets/en/FormObjects/hierarch7.png) Hierarchical representation: ![](assets/en/FormObjects/hierarch8.png) +Representación no jerárquica:  /> Representación jerárquica: ![](assets/en/FormObjects/hierarch8.png)
 
-> If one or more rows are hidden because their parents are collapsed, they are no longer selected. Only the rows that are visible (either directly or by scrolling) can be selected. In other words, rows cannot be both hidden and selected.
+> Si una o más líneas están ocultas porque sus padres están contraídos, ya no se seleccionan. Sólo se pueden seleccionar las líneas visibles (directamente o por desplazamiento). En otras palabras, las líneas no pueden estar ocultas y seleccionadas a la vez.
 
-As with selections, the `LISTBOX GET CELL POSITION` command will return the same values for a hierarchical list box and a non-hierarchical list box. This means that in both of the examples below, `LISTBOX GET CELL POSITION` will return the same position: (3;2).
+Al igual que con las selecciones, el comando `LISTBOX GET CELL POSITION` devolverá los mismos valores para un list box jerárquico y un list box no jerárquico. Esto significa que en los dos ejemplos siguientes, `LISTBOX GET CELL POSITION` devolverá la misma posición: (3;2).
 
 *Non-hierarchical representation:* ![](assets/en/FormObjects/hierarch9.png)
 
 *Hierarchical representation:* ![](assets/en/FormObjects/hierarch10.png)
 
-When all the rows of a sub-hierarchy are hidden, the break line is automatically hidden. In the above example, if rows 1 to 3 are hidden, the En este contexto, sólo la sintaxis que utiliza la variable array puede funcionar con los comandos de la propiedad del objeto porque los arrays no tienen ningún objeto asociado. -> 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. +#### Gestión optimizada de desplegar/contraer + +Puede optimizar la visualización y gestión de los list box jerárquicos utilizando los eventos formulario `On Expand` y `On Collapse`. -A hierarchical list box is built from the contents of its arrays so it can only be displayed when all these arrays are loaded into memory. This makes it difficult to build large hierarchical list boxes based on arrays generated from data (through the `SELECTION TO ARRAY` command), not only because of the display speed but also the memory used. +Un list box jerárquico se construye a partir del contenido de sus arrays, por lo que sólo puede mostrarse cuando todos estos arrays están cargados en memoria. Esto dificulta la generación de list box jerárquicos de gran tamaño basados en arrays generados a partir de datos (a través del comando `SELECTION TO ARRAY`), no sólo por la velocidad de visualización sino también por la memoria utilizada. -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. +El uso de los eventos de formulario `On Expand` y `On Collapse` puede superar estas limitaciones: por ejemplo, puede mostrar sólo una parte de la jerarquía y cargar/descargar los arrays sobre la marcha, basándose en las acciones del usuario. En el contexto de estos eventos, el comando `LISTBOX GET CELL POSITION` devuelve la celda en la que el usuario hizo clic para desplegar o contraer una línea. -In this case, you must fill and empty arrays through the code. The principles to be implemented are: +En este caso, debe llenar y vaciar los arrays por código. Los principios que deben aplicarse son: +- Cuando se muestra el list box, sólo se debe llenar el primer array. Sin embargo, debe crear un segundo array con valores vacíos para que el list box muestre los botones desplegar/contraer: ![](assets/en/FormObjects/hierarch15.png) -- 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) +- Cuando un usuario hace clic en un botón de expandir, puede procesar el evento `On Expand`. El comando `LISTBOX GET CELL POSITION` devuelve la celda en cuestión y permite construir la jerarquía adecuada: se llena el primer array con los valores repetidos y el segundo con los valores enviados desde el comando `SELECTION TO ARRAY` y se insertan tantas líneas como sean necesarias en el list box utilizando el comando `LISTBOX INSERT ROWS`. ![](assets/en/FormObjects/hierarch16.png) + +- Cuando un usuario hace clic en un botón de contracción, puede procesar el evento `On Collapse`. El comando `LISTBOX GET CELL POSITION` devuelve la celda en cuestión: con el comando `LISTBOX DELETE ROWS` se eliminan tantas líneas como sean necesarias del list box. -- 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 -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. +Las columnas de list box pueden manejar arrays de objetos. Como los arrays de objetos pueden contener diferentes tipos de datos, esta nueva y poderosa funcionalidad permite mezclar diferentes tipos de entrada en las líneas de una misma columna, y mostrar también varios widgets. Por ejemplo, puede insertar una entrada de texto en la primera línea, una casilla de selección en la segunda y una lista desplegable en la tercera. Los arrays de objetos también dan acceso a nuevos tipos de widgets, como botones o selectores de color. -The following list box was designed using an object array: +El siguiente list box fue diseñado utilizando un array de objetos: ![](assets/en/FormObjects/listbox_column_objectArray.png) + ### Configuring an object array column To assign an object array to a list box column, you just need to set the object array name in either the Property list ("Variable Name" field), or using the [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-INSERT-COLUMN.301-4311153.en.html) command, like with any array-based column. In the Property list, you can now select Object as a "Expression Type" for the column: @@ -947,7 +839,7 @@ 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) @@ -956,33 +848,31 @@ ARRAY OBJECT(obColumn;0) //column array ``` ![](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 +#### valueType y visualización de datos 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 \, <.>, 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. 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 | check box | 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 @@ -991,53 +881,51 @@ You cannot set display formats or entry filters for columns of object-type list | Value type | Default format | Entry control | | ---------- | ---------------------------------------------------------- | ----------------------- | -| text | same as defined in object | any (no 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 | -| Boolean | check box | N/A | +| Booleano | check box | N/A | | color | N/A | N/A | | event | N/A | N/A | +### Atributos -### Attributes - -Each element of the object array is an object that can contain one or more attributes that will define the cell contents and data display (see example above). +Cada elemento del array de objetos es un objeto que puede contener uno o más atributos que definirán el contenido de la celda y la visualización de los datos (ver el ejemplo anterior). 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 | +| --------------------- | --------------------------------------- | ----- | ---- | ------- | -------- | ----- | ----- | +| *Atributos* | *Descripción* | | | | | | | +| 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" o "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 + ARRAY OBJECT(obColumn;0) //array columna 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 + OB SET($ob1;"value";$entry) // si el usuario introduce un nuevo valor, $entry contendrá el valor editado C_OBJECT($ob2) OB SET($ob2;"valueType";"real") OB SET($ob2;"value";2/3) @@ -1048,38 +936,35 @@ Cell values are stored in the "value" attribute. This attribute is used for inpu APPEND TO ARRAY(obColumn;$ob1) APPEND TO ARRAY(obColumn;$ob2) APPEND TO ARRAY(obColumn;$ob3) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_value.png) - > Null values are supported and result in an empty cell. -#### min and max +#### min y max -When the "valueType" is "real" or "integer", the object also accepts min and max attributes with appropriate values (values must be of the same type as the valueType). +Cuando el "valueType" es "real" o "integer", el objeto también acepta atributos min y max con valores apropiados (los valores deben ser del mismo tipo que el valueType). -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. +Estos atributos pueden utilizarse para controlar el rango de valores de entrada. Cuando se valida una celda (cuando pierde el foco), si el valor de entrada es menor que el valor mínimo o mayor que el valor máximo, entonces se rechaza. En este caso, se mantiene el valor anterior y un consejo muestra una explicación. -```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) #### behavior -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 | +El atributo behavior ofrece variaciones a la representación estándar de los valores. En 4D v15, se ofrece una única variación: +| Atributo | Valor(es) disponible(s) | valueType(s) | Descripción | +| -------- | ----------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| behavior | threeStates | integer | Representa un valor numérico como una casilla de selección de tres estados.
      2=intermediario, 1=seleccionado, 0=no seleccionado, -1=invisible, -2=no seleccionado desactivado, -3=seleccionado desactivado, -4=semi seleccionado desactivado | ```4d C_OBJECT($ob3) @@ -1093,20 +978,19 @@ The behavior attribute provides variations to the regular representation of valu ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_behavior.png) -#### requiredList and choiceList +#### requiredList y choiceList -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: +Cuando un atributo "choiceList" o "requiredList" está presente dentro del objeto, la entrada de texto se sustituye por una lista desplegable o un combo box, dependiendo del atributo: -* 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. +* Si el atributo es "choiceList", la celda se muestra como un combo box. Esto significa que el usuario puede seleccionar o escribir un valor. +* 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. Si quiere asociar el widget a una lista 4D existente, debe utilizar los atributos "requiredListReference", "requiredListName", "choiceListReference" o "choiceListName". -> 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. +Ejemplos: -Examples: - -* You want to display a drop-down list with only two options: "Open" or "Closed". "Closed" must be preselected: +* Quiere mostrar una lista desplegable con sólo dos opciones: "Open" o "Closed". "Closed" debe estar preseleccionado: ```4d ARRAY TEXT($RequiredList;0) @@ -1117,10 +1001,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: +* Quiere aceptar todo valor entero, pero mostrar un combo box para sugerir los valores más comunes: ```4d ARRAY LONGINT($ChoiceList;0) @@ -1131,24 +1014,22 @@ Examples: APPEND TO ARRAY($ChoiceList;100) C_OBJECT($ob) OB SET($ob;"valueType";"integer") - OB SET($ob;"value";10) //10 as default value + OB SET($ob;"value";10) //10 como valor por defecto OB SET ARRAY($ob;"choiceList";$ChoiceList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_commonValues.png) -#### requiredListName and requiredListReference - -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. +#### requiredListName y requiredListReference -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. +Los atributos "requiredListName" y "requiredListReference" permiten utilizar, en una celda de list box, una lista definida en 4D, ya sea en modo Diseño (en el editor de Listas de la Caja de Herramientas) o por programación (utilizando el comando New list). La celda se mostrará entonces como una lista desplegable. Esto significa que el usuario sólo puede seleccionar uno de los valores proporcionados en la lista. -> * 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". +Utilice "requiredListName" o "requiredListReference" en función del origen de la lista: si la lista procede de la caja de herramientas, pase un nombre; en caso contrario, si la lista se ha definido por programación, pase una referencia. In both cases, a "value" attribute can be used to preselect a value in the widget. +> * Si desea definir estos valores a través de un simple array, debe utilizar el atributo "requiredList". +> * Si la lista contiene elementos de texto que representan valores reales, el separador decimal debe ser un punto ("."), independientemente de la configuración local, por ejemplo "17.6" "1234.456". -Examples: +Ejemplos: -* 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: +* Desea mostrar una lista desplegable basada en una lista de "colores" definida en la caja de herramientas (que contiene los valores "azul", "amarillo" y "verde"), guardarla como valor y mostrar "azul" por defecto: ![](assets/en/FormObjects/listbox_column_objectArray_colors.png) @@ -1159,10 +1040,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: +* Quiere mostrar una lista desplegable basada en una lista definida por programación y guardarla como referencia: ```4d <>List:=New list @@ -1173,56 +1053,56 @@ Examples: C_OBJECT($ob) OB SET($ob;"valueType";"integer") OB SET($ob;"saveAs";"reference") - OB SET($ob;"value";2) //displays London by default + OB SET($ob;"value";2) //muestra Londres por defecto OB SET($ob;"requiredListReference";<>List) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) - -#### choiceListName and choiceListReference + ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) -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. +#### choiceListName y choiceListReference -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. +Los atributos "choiceListName" and "choiceListReference" permiten utilizar, en una celda de list box, una lista definida en 4D, ya sea en modo Diseño (en el editor de Listas de la Caja de Herramientas) o por programación (utilizando el comando New list). La celda se muestra entonces como un combo box, lo que significa que el usuario puede seleccionar o escribir un valor. -> * 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". +Utilice "choiceListName" o "choiceListReference" en función del origen de la lista: si la lista procede de la caja de herramientas, pase un nombre; en caso contrario, si la lista se ha definido por programación, pase una referencia. In both cases, a "value" attribute can be used to preselect a value in the widget. +> * Si desea definir estos valores a través de un simple array, debe utilizar el atributo "choiceList". +> * Si la lista contiene elementos de texto que representan valores reales, el separador decimal debe ser un punto ("."), independientemente de la configuración local, por ejemplo "17.6" "1234.456". -Example: +Ejemplo: -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: +Desea mostrar un combo box basado en una lista "colors" definida en la caja de herramientas (que contiene los valores "azul", "amarillo" y "verde") y mostrar "verde" por defecto: ![](assets/en/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, unitsListName, unitsListReference y unitReference -* "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. +Puede utilizar atributos específicos para añadir unidades asociadas a los valores de las celdas (*por ejemplo, *: "10 cm", "20 píxeles", etc.). Para definir la lista de unidades, puede utilizar uno de los siguientes atributos: -Regardless of the way the unit list is defined, it can be associated with the following attribute: +* "unitsList": un array que contiene los elementos x utilizados para definir las unidades disponibles (por ejemplo: "cm", "pulgadas", "km", "millas", etc.). Utilice este atributo para definir las unidades dentro del objeto. +* "unitsListReference": una referencia a una lista 4D que contiene las unidades disponibles. Utilice este atributo para definir unidades con una lista 4D creada con el comando [New list](https://doc.4d.com/4Dv15/4D/15.6/New-list.301-3818474.en.html). +* "unitsListName": un nombre de una lista 4D basada en el diseño que contiene unidades disponibles. Utilice este atributo para definir las unidades con una lista 4D creada en la caja de herramientas. -* "unitReference": a single value that contains the index (from 1 to x) of the selected item in the "unitList", "unitsListReference" or "unitsListName" values list. +Independientemente de la forma en que se defina la lista de unidades, puede asociarse con el siguiente atributo: -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.) +* "unitReference": un único valor que contiene el índice (de 1 a x) del elemento seleccionado en la lista de valores "unitList", "unitsListReference" o "unitsListName". -Example: +La unidad actual se muestra como un botón que recorre los valores "unitList", "unitsListReference" o "unitsListName" cada vez que se presiona (por ejemplo, "pixels" -> "líneas" -> "cm" -> "pixels" -> etc.) -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): +Ejemplo: -```4d +Queremos definir una entrada numérica seguida de dos posibles unidades: " líneas " o " píxeles ". El valor actual es "2" + "líneas". Utilizamos valores definidos directamente en el objeto (atributo "unitsList"): + +````4d ARRAY TEXT($_units;0) APPEND TO ARRAY($_units;"lines") APPEND TO ARRAY($_units;"pixels") @@ -1231,17 +1111,17 @@ OB SET($ob;"valueType";"integer") OB SET($ob;"value";2) // 2 "units" OB SET($ob;"unitReference";1) //"lines" OB SET ARRAY($ob;"unitsList";$_units) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_unitList.png) #### alternateButton -If you want to add an ellipsis button [...] to a cell, you just need to pass the "alternateButton" with the True value in the object. The button will be displayed in the cell automatically. +Si desea añadir un botón de elipsis [...] a una celda, sólo tiene que pasar el atributo "alternateButton" con el valor True en el objeto. El botón se mostrará en la celda automáticamente. -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). +Cuando este botón es presionado por un usuario, se generará un evento `On Alternate Click`, y usted podrá manejarlo como quiera (vea el párrafo "Manejo de eventos" para más información). -Example: +Ejemplo: ```4d C_OBJECT($ob1) @@ -1253,21 +1133,23 @@ OB SET($ob;"value";$entry) ![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) -#### color valueType -The "color" valueType allows you to display either a color or a text. +#### valueType color + +El atributo valueType de valor "color" permite mostrar un color o un texto. -* If the value is a number, a colored rectangle is drawn inside the cell. Example: - - ```4d +* Si el valor es un número, se dibuja un rectángulo de color dentro de la celda. Ejemplo: + + ````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 @@ -1275,25 +1157,28 @@ The "event" valueType displays a simple button that generates an `On Clicked` ev Optionally, you can pass a "label" attribute. -Example: +Ejemplo: -```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/es/FormObjects/pictureButton_overview.md b/website/translated_docs/es/FormObjects/pictureButton_overview.md index 8ec2d0359a86fc..c8dd17c4e6bbc6 100644 --- a/website/translated_docs/es/FormObjects/pictureButton_overview.md +++ b/website/translated_docs/es/FormObjects/pictureButton_overview.md @@ -1,42 +1,40 @@ --- id: pictureButtonOverview -title: Picture Button +title: Botón Imagen --- -## Overview - 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. - -| 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 | +* 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. + | Propiedad | JSON name | Valor | + | -------------------------- | ---------------------- | ----- | + | 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 | -* 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 + +## Utilizar los botones imagen 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 +42,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 -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. +## Animación -- 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. +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. Estas opciones de propiedades pueden combinarse para mejorar sus botones de imagen. -The following other modes are available: +- Por defecto ([cuando no se selecciona la opción animación](properties_Animation.md)), un botón de imagen muestra la siguiente imagen de la serie cuando el usuario hace clic; muestra la imagen anterior de la serie cuando el usuario mantiene pulsada la tecla **Mayúsculas** y hace clic en el botón. Cuando el usuario llega a la última imagen de la serie, la imagen no cambia cuando el usuario hace clic de nuevo. En otras palabras, no vuelve a la primera imagen de la serie. -- [Loop back to first frame](properties_Animation.md#loopBackToFirstFrame) +Hay otros modos disponibles: +- [Vuelve a la primera secuencia](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) +- [Desplazamiento continuo en clics](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. +- [Utilizar el último cuadro como desactivado](properties_Animation.md#use-last-frame-as-disabled) +> La [variable asociada](properties_Object.md#variable-or-expression) al botón imagen devuelve el número de índice, en la tabla de miniaturas, de la imagen actual mostrada. La numeración de las imágenes en la tabla empieza por 0. -## Supported Properties +## Propiedades soportadas -[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 +[Negrita](properties_Text.md#bold) - [Estilo del borde](properties_BackgroundAndBorder.md#border-line-style) - [Abajo](properties_CoordinatesAndSizing.md#bottom) - [Estilo del botón](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Columnas](properties_Crop.md#columns) - [Soltable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Fuente](properties_Text.md#font) - [Color de la fuente](properties_Text.md#font-color) - [Altura](properties_CoordinatesAndSizing.md#height) - [Mensaje de ayuda](properties_Help.md#help-tip) - [Dim. Horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Itálica](properties_Text.md#italic) - [Izquierda](properties_CoordinatesAndSizing.md#left) - [Recomenzar la secuencia](properties_Animation.md#loopBackToFirstFrame) - [Nombre](properties_Object.md#object-name) - [Ruta de acceso de la imagen](properties_Picture.md#pathname) - [Derecha](properties_CoordinatesAndSizing.md#right) - [Líneas](properties_Crop.md#rows) - [Atajo](properties_Entry.md#shortcut) - [Acción estándar](properties_Action.md#standard-action) - [Vuelve a cambiar cuando se libera](properties_Animation.md#switchBackWhenReleased) - [Desplazamiento continuo en clic](properties_Animation.md#switch-continuously-on-clicks) - [Desplazamiento cada x ticks](properties_Animation.md#switch-every-x-ticks) - [Título](properties_Object.md#title) - [Recomenzar la secuencia](properties_Animation.md#switchWhenRollOver) - [Arriba](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Use Last frame as disabled](properties_Animation.md#use-last-frame-as-disabled) - [Variable o expresión](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilidad](properties_Display.md#visibility) - [Ancho](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/es/FormObjects/picturePopupMenu_overview.md b/website/translated_docs/es/FormObjects/picturePopupMenu_overview.md index e00bebea4dcb46..9e577703105968 100644 --- a/website/translated_docs/es/FormObjects/picturePopupMenu_overview.md +++ b/website/translated_docs/es/FormObjects/picturePopupMenu_overview.md @@ -1,28 +1,30 @@ --- id: picturePopupMenuOverview -title: Picture Pop-up Menu +title: Menú pop-up imagen --- -## Overview +Un menú emergente de imágenes que muestra un array de imágenes en dos dimensiones. Se puede utilizar un menú emergente de imágenes en lugar de un [botón imagen](pictureButton_overview.md). La creación de la imagen a utilizar con un menú emergente imagen es similar a la creación de una imagen para un botón imagen. El concepto es el mismo que el de la [rejillas de botones](buttonGrid_overview.md), salvo que la imagen se utiliza como un menú emergente en lugar de un objeto del formulario. -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 los menús emergentes de imágenes -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: +Para crear un menú emergente de imágenes, debe [referirse a una imagen](properties_Picture.md#pathname). El siguiente ejemplo permite seleccionar el idioma de la interfaz seleccionandolo en un menú emergente de imágenes. Cada idioma está representado por la bandera correspondiente: ![](assets/en/FormObjects/picturePopupMenu_example.png) -### Programming +### Programación -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. +Puede gestionar los menús emergentes de imágenes utilizando métodos. Al igual que con las [rejillas de botones](buttonGrid_overview.md), las variables asociadas a los menús emergentes de imágenes se definen con el valor del elemento seleccionado en el menú emergente de imágenes. Si no se selecciona ningún elemento, el valor es 0. Los elementos están numerados, línea por línea, de izquierda a derecha, empezando por la línea superior. -### Goto page -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. +### Ir a la página -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`. +Puede asociar el `gotoPage` [acción estándar](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) a un objeto de tipo pop-up menu imagen. Cuando se selecciona esa acción, 4D mostrará automáticamente la página del formulario que corresponde a la posición de la imagen seleccionada en el array de imágenes. Los elementos se numeran de izquierda a derecha y de arriba a abajo, empezando por la esquina superior izquierda. -## Supported Properties +Por ejemplo, si el usuario selecciona el tercer elemento, 4D mostrará la página 3 del formulario actual (si existe). Si desea gestionar usted mismo el efecto de un clic, seleccione `Sin acción`. -[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 + + + +## Propiedades soportadas +[Negrita](properties_Text.md#bold) - [Estilo del borde](properties_BackgroundAndBorder.md#border-line-style) - [Inferior](properties_CoordinatesAndSizing. md#bottom) - [Clase](properties_Object.md#css-class) - [Columnas](properties_Crop.md#columns) - [Altura](properties_CoordinatesAndSizing.md#height) - [Consejo de ayuda](properties_Help.md#help-tip) - [Tamaño horizontal](properties_ResizingOptions. md#horizontal-sizing) - [Izquierda](properties_CoordinatesAndSizing.md#left) - [Nombre del objeto](properties_Object. md#object-name) - [Ruta de acceso](properties_Picture.md#pathname) - [Derecha](properties_CoordinatesAndSizing.md#right) - [Filas](properties_Crop.md#rows) - [Acción estándar](properties_Action. md#standard-action) - [Superior](properties_CoordinatesAndSizing.md#top) - [Tipo](properties_Object. md#type) - [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) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/pluginArea_overview.md b/website/translated_docs/es/FormObjects/pluginArea_overview.md index 7b6ecd48c25e87..14847eda384ca7 100644 --- a/website/translated_docs/es/FormObjects/pluginArea_overview.md +++ b/website/translated_docs/es/FormObjects/pluginArea_overview.md @@ -1,32 +1,34 @@ --- id: pluginAreaOverview -title: Plug-in Area +title: Ãrea de plug-in --- -## Overview -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. +Un área de plug-in es un área en el formulario que está completamente controlada por un plug-in. La capacidad de integrar plug-ins en los formularios le ofrece posibilidades ilimitadas a la hora de crear aplicaciones personalizadas. Un plug-in puede realizar una tarea sencilla, como mostrar un reloj digital en un formulario, o una tarea compleja, como ofrecer funciones completas de procesamiento de textos, hojas de cálculo o gráficos. -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: +Al abrir una aplicación, 4D crea una lista interna de los plug-ins [instalados en la aplicación](#installing-plug-ins). Una vez que haya insertado un área de plug-in en un formulario, puede asignar un plug-in al área directamente en la lista **Tipo** en la lista de propiedades: ![](assets/en/FormObjects/pluginArea.png) -> Some plug-ins, such as 4D Internet Commands, cannot be used in forms or external windows. When a plug-in cannot be used in a form, it does not appear in the plug-in list of the Property List. +> Ciertos plug-ins, como 4D Internet Commands, no pueden utilizarse en formularios o ventanas externas. Cuando un plug-in no puede ser utilizado en un formulario, no aparece en la lista de plug-ins de la Lista de Propiedades. -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. +Si dibuja un área de plug-in demasiado pequeña, 4D la mostrará como un botón cuyo título es el nombre de la variable asociada al área. Durante la ejecución, el usuario puede hacer clic en este botón para abrir una ventana específica que muestre el plug-in. -### Advanced properties -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. +## Propiedades avanzadas -## Installing plug-ins +Si el autor del plugin ofrece opciones avanzadas, se puede habilitar un tema **Plug-in** que contenga un botón [**Propiedades avanzadas**](properties_Plugins.md) en la lista de propiedades. En este caso, puede hacer clic en este botón para definir estas opciones, normalmente a través de una caja de diálogo personalizada. -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 +## Instalar un plug-in -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. +Para añadir un plug-in en tu entorno 4D, primero tiene que salir de 4D. Los plug-ins se cargan al iniciar 4D. Para más información sobre la instalación de plug-ins, consulte [Instalación de plug-ins o componentes](https://doc.4d.com/4Dv17R6/4D/17-R6/Installing-plugins-or-components.300-4354866.en.html). -## 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 +## Crear plug-ins + +Si está interesado en diseñar sus propios plug-ins, puede recibir amplia información sobre cómo escribir e implementar plug-ins. 4D ofrece un [kit completo (en github)](https://github.com/4d/4D-Plugin-SDK) para ayudarle a escribir plug-ins personalizados. + + +## Propiedades soportadas +[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 diff --git a/website/translated_docs/es/FormObjects/progressIndicator.md b/website/translated_docs/es/FormObjects/progressIndicator.md index a855d43dbd269c..838913e22b5c32 100644 --- a/website/translated_docs/es/FormObjects/progressIndicator.md +++ b/website/translated_docs/es/FormObjects/progressIndicator.md @@ -1,68 +1,67 @@ --- id: progressIndicator -title: Progress Indicator +title: Indicador de progreso --- -## Overview 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 los 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. The variable associated with the indicator controls the display. You place values into, or use values from, the indicator using methods. For example, a method for a field or enterable object could be used to control a progress indicator: ```4d - $vTherm:=[Employees]Salary + 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. +This method assigns the value of the Salary field to the vTherm variable. 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: +Conversely, you could use the indicator to control the value in a field. The user drags the indicator to set the value. En este caso el método se convierte en: ```4d - [Employees]Salary:=$vTherm + [Employees]Salary:=vTherm ``` -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. +El método asigna el valor del indicador al campo Salario. A medida que el usuario arrastra el indicador, el valor del campo Salario cambia. -## Default thermometer + +## El termómetro por defecto ![](assets/en/FormObjects/indicator_progressBar.png) -The thermometer is the basic progress indicator. +El termómetro es el indicador básico de progreso. -You can display horizontal or vertical thermometers bars. This is determined by the shape of the object that you draw. +Puede mostrar barras de termómetros horizontales o verticales. Esto viene determinado por la forma del objeto que se dibuja. -Multiple graphical options are available: minimum/maximum values, graduations, steps. +Dispone de múltiples opciones gráficas: valores mínimos/máximos, graduaciones, pasos. -### Supported Properties +### Propiedades soportadas +[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") - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Italic](properties_Text.md#italic) - [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) - [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) -[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** es una variante del termómetro por defecto. Para activar esta variante, es necesario definir la propiedad [Barber shop](properties_Scale.md#barber-shop). +> En JSON, basta con eliminar la propiedad "max" del objeto termómetro por defecto para activar la variante Barber shop. -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. +La Barber shop muestra una animación continua, como la [spinner](spinner.md). Estos termómetros se utilizan generalmente para indicar al usuario que el programa está en proceso de realizar una operación larga. Cuando se selecciona esta variante termómetro, [las propiedades de la escala gráfica](properties_Scale.md) no están disponibles. -When the form is executed, the object is not animated. You manage the animation by passing a value to its [associated variable or expression](properties_Object.md#variable-or-expression): +Cuando se ejecuta el formulario, el objeto no se anima. La animación se gestiona pasando un valor a su [variable o expresión asociada](properties_Object.md#variable-or-expression): -* 1 (or any value other than 0) = Start animation, -* 0 = Stop animation. +* 1 (o cualquier valor diferente de 0) = Iniciar la animación, +* 0 = Detener la animación. -### Supported Properties -[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) +### Propiedades soportadas +[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") - [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) - [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) -## See also -- [rulers](ruler.md) +## Ver también +- [reglas](ruler.md) - [steppers](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Action.md b/website/translated_docs/es/FormObjects/properties_Action.md index 42476014948ca9..0153dfb7bbf8ee 100644 --- a/website/translated_docs/es/FormObjects/properties_Action.md +++ b/website/translated_docs/es/FormObjects/properties_Action.md @@ -1,189 +1,199 @@ --- id: propertiesAction -title: Action +title: Acción --- -* * * +--- +## Arrastrable -## Draggable +Controle si el usuario puede arrastrar el objeto y cómo. Por defecto, no se permite ninguna operación de arrastre. -Control whether and how the user can drag the object. By default, no drag operation is allowed. +Hay dos modos de arrastrar disponibles: -Two drag modes are available: +- **Personalizado**: en este modo, toda operación de arrastrar realizada en el objeto dispara el evento formulario `On Begin Drag` en el contexto del objeto. A continuación, se gestiona la acción de soltar mediante un método. + En modo personalizado, básicamente toda la operación de arrastrar y soltar es manejada por el programador. Este modo le permite implementar cualquier interfaz basada en la función de arrastrar y soltar, incluidas las interfaces que no necesariamente transportan datos, sino que pueden realizar cualquier acción como abrir archivos o activar un cálculo. Este modo se basa en una combinación de propiedades, eventos y comandos específicos del tema `Portapapeles`. +- **Automático**: en este modo, 4D **copia** el texto o las imágenes directamente desde el objeto formulario. Puede utilizarse en la misma área 4D, entre dos áreas 4D o entre 4D y otra aplicación. Por ejemplo, el arrastre (y soltado) automático permite copiar un valor entre dos campos sin necesidad programación: +  />  
+  ![](assets/es/FormObjects/property_automaticDragDrop2.png) En este modo, el evento de formulario `On Begin Drag` NO se genera. Si quiere Picture objects can have scrollbars when the display format of the picture is set to “Truncated (non-centered).†+| Lista de propiedades | Valor JSON | Descripción | +| -------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Sí | "visible" | La barra de desplazamiento está siempre visible, incluso cuando no es necesaria (es decir, cuando el tamaño del contenido del objeto es menor que el del marco). | +| No | "hidden" | La barra de desplazamiento nunca es visible | +| Automático | "automatic" | La barra de desplazamiento aparece automáticamente cuando es necesario y el usuario puede introducir un texto mayor que el ancho del objeto | -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------- | --------- | -------------------------------- | -| scrollbarHorizontal | text | "visible", "hidden", "automatic" | +> Los objetos imagen pueden tener las barras de desplazamiento cuando el formato de visualización de la imagen está definido como "Truncado (no centrado)." -#### Objects Supported +#### Gramática JSON -[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) +| Nombre | Tipos de datos | Valores posibles | +| ------------------- | -------------- | -------------------------------- | +| scrollbarHorizontal | texto | "visible", "hidden", "automatic" | -#### See also +#### Objetos soportados -[Vertical scroll bar](#vertical-scroll-bar) +[Lista jerárquica](list_overview.md#overview) - [Sub formulario](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Ãrea de entrada](input_overview.md) - [Ãrea 4D Write Pro](writeProArea_overview.md) -* * * +#### Ver también +[Barra de desplazamiento vertical](#vertical-scroll-bar) +--- ## Resolution -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. +Define la resolución de la pantalla para el contenido del área 4D Write Pro. Por defecto, se define a 72 ppp (macOS), que es la resolución estándar para los formularios 4D en todas las plataformas. Si se define esta propiedad en 96 ppp, se establecerá un renderizado Windows/Web tanto en plataformas macOS como Windows. Si se define esta propiedad como **automática** significa que la representación del documento diferirá entre las plataformas macOS y Windows. + -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - dpi|number|0=automatic, 72, 96 | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + dpi|number|0=automatic, 72, 96 | -#### Objects Supported +#### Objetos soportados -[4D Write Pro area](writeProArea_overview.md) +[Ãrea 4D Write Pro](writeProArea_overview.md) -* * * -## Show background -Displays/hides both background images and background color. +--- +## Mostrar el fondo -#### JSON Grammar +Muestra/oculta tanto las imágenes de fondo como el color de fondo. -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showBackground|boolean|true (default), false| -#### Objects Supported +#### Gramática JSON -[4D Write Pro area](writeProArea_overview.md) +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showBackground|boolean|true (por defecto), false| -* * * +#### Objetos soportados -## Show footers +[Ãrea 4D Write Pro](writeProArea_overview.md) + +--- +## Mostrar los pies de página 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| +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showFooters|boolean|true (default), false| -#### Objects Supported +#### Objetos soportados -[4D Write Pro area](writeProArea_overview.md) +[Ãrea 4D Write Pro](writeProArea_overview.md) -* * * -## Show Formula Bar +--- +## Mostrar la barra de fórmula 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| +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + withFormulaBar|boolean|true (default), false| -[4D View Pro area](viewProArea_overview.md) +#### Objetos soportados -* * * +[Ã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| +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showHeaders|boolean|true (default), false| -#### Objects Supported +#### Objetos soportados -[4D Write Pro area](writeProArea_overview.md) +[Ãrea 4D Write Pro](writeProArea_overview.md) -* * * -## Show hidden characters + +--- +## Mostrar los caracteres ocultos Displays/hides invisible characters -#### JSON Grammar -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHiddenChars|boolean|true (default), false| +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showHiddenChars|boolean|true (default), false| + +#### Objetos soportados + +[Ãrea 4D Write Pro](writeProArea_overview.md) -#### Objects Supported -[4D Write Pro area](writeProArea_overview.md) +--- +## Mostrar la regla horizontal + +Muestra/oculta la regla horizontal cuando la vista del documento está en modo [Página](#modo-de-vista). + -* * * +#### Gramática JSON -## Show horizontal ruler +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showHorizontalRuler|boolean|true (por defecto), false| -Displays/hides the horizontal ruler when the document view is in [Page mode](#view-mode). +#### Objetos soportados -#### JSON Grammar +[Ãrea 4D Write Pro](writeProArea_overview.md) -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showHorizontalRuler|boolean|true (default), false| -#### Objects Supported -[4D Write Pro area](writeProArea_overview.md) -* * * -## Show HTML WYSYWIG +--- +## Mostrar 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)| +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showHTMLWysiwyg|boolean|true, false (por defecto)| + +#### Objetos soportados -#### Objects Supported +[Ãrea 4D Write Pro](writeProArea_overview.md) -[4D Write Pro area](writeProArea_overview.md) +--- +## Mostrar el marco de la página -* * * +Muestra/oculta el marco de la página cuando [modo visualización de página ](#view-mode) está definido como "Página". -## Show page frame -Displays/hides the page frame when [Page view mode](#view-mode) is set to "Page". +#### Gramática JSON -#### JSON Grammar +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showPageFrames|boolean|true, false| -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - showPageFrames|boolean|true, false| +#### Objetos soportados -#### Objects Supported +[Ãrea 4D Write Pro](writeProArea_overview.md) -[4D Write Pro area](writeProArea_overview.md) -* * * -## Show references +--- +## Mostrar las referencias -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. +Muestra todas las expresiones 4D insertadas en el documento de 4D Write Pro como *referencias*. 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. For example, you have inserted the current date along with a format, the date is displayed: @@ -275,110 +288,110 @@ 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)| +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showReferences|boolean|true, false (default)| -[4D Write Pro area](writeProArea_overview.md) +#### Objetos soportados -* * * +[Ãrea 4D Write Pro](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| +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + showVerticalRuler|boolean|true (default), false| -[4D Write Pro area](writeProArea_overview.md) +#### Objetos soportados -* * * +[Ãrea 4D Write Pro](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. When tab controls with a custom direction are displayed under Windows, they automatically return to the standard direction (top). -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - labelsPlacement|boolean|"top", "bottom" | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + labelsPlacement|boolean|"top", "bottom" | -#### Objects Supported +#### Objetos soportados [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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| | | | - userInterface|text|"none" (default), "ribbon", "toolbar" | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + userInterface|text|"none" (default), "ribbon", "toolbar" | -#### Objects Supported +#### Objetos soportados -[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) +#### Ver también -* * * +[4D View Pro reference guide](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.en.html) -## Vertical Scroll Bar +--- +## Barra de desplazamiento vertical An interface tool allowing the user to move the viewing area up and down. -Available values: +Valores disponibles: -| Property List | JSON value | Description | -| ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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). | -| 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) | +| Lista de propiedades | Valor JSON | Descripción | +| -------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Sí | "visible" | La barra de desplazamiento está siempre visible, incluso cuando no es necesaria (es decir, cuando el tamaño del contenido del objeto es menor que el del marco). | +| No | "hidden" | La barra de desplazamiento nunca es visible | +| 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) | + +> Los objetos imagen pueden tener las barras de desplazamiento cuando el formato de visualización de la imagen está definido como "Truncado (no centrado)." -> 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------------- | -------------- | -------------------------------- | +| scrollbarVertical | texto | "visible", "hidden", "automatic" | -#### Objects Supported +#### Objetos soportados -[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) +[Lista jerárquica](list_overview.md#overview) - [Sub formulario](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Ãrea de entrada](input_overview.md) - [Ãrea 4D Write Pro](writeProArea_overview.md) -#### See also +#### Ver también [Horizontal scroll bar](#horizontal-scroll-bar) -* * * - +--- ## View mode Sets the mode for displaying the 4D Write Pro document in the form area. Three values are available: @@ -389,30 +402,34 @@ Sets the mode for displaying the 4D Write Pro document in the form area. Three v > 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"| -#### Objects Supported +#### Gramática JSON -[4D Write Pro area](writeProArea_overview.md) +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + layoutMode|text|"page", "draft", "embedded"| -* * * +#### Objetos soportados +[Ãrea 4D Write Pro](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 | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| | | | + zoom|número|minimum = 0 | + +#### Objetos soportados + +[Ãrea 4D Write Pro](writeProArea_overview.md) -#### Objects Supported -[4D Write Pro area](writeProArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_BackgroundAndBorder.md b/website/translated_docs/es/FormObjects/properties_BackgroundAndBorder.md index 06a96474dc25eb..4d1241b7608496 100644 --- a/website/translated_docs/es/FormObjects/properties_BackgroundAndBorder.md +++ b/website/translated_docs/es/FormObjects/properties_BackgroundAndBorder.md @@ -1,108 +1,107 @@ --- id: propertiesBackgroundAndBorder -title: Background and Border +title: Fondo y borde --- -* * * - -## Alternate Background Color +--- +## Color de fondo 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | --------------------------------------------------------------- | +| alternateFill | cadena | any css value; "transparent"; "automatic"; "automaticAlternate" | -#### Objects Supported +#### Objetos soportados +[List Box](listbox_overview.md#overview) - [Columna List Box](listbox_overview.md#list-box-columns) -[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. In the case of a list box, by default *Automatic* is selected: the column uses the background color set at the list box level. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | ----------------------------------------- | -| fill | string | any css value; "transparent"; "automatic" | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------------------------------- | +| fill | cadena | un valor css; "transparent"; "automatic" | -#### Objects Supported +#### Objetos soportados [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) +#### Ver también +[Transparente](#transparent) -* * * -## Background Color Expression +--- +## Expresión color de fondo `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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------------------------- | -| rowFillSource | string | An expression returning a RGB color value | +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ----------------------------------------- | +| rowFillSource | cadena | An expression returning a RGB color value | +#### Objetos soportados +[List Box](listbox_overview.md#overview) - [Columna List Box](listbox_overview.md#list-box-columns) -#### Objects Supported -[List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Border Line Style -Allows setting a standard style for the object border. -#### JSON Grammar +--- +## Estilo del borde + +Allows setting a standard style for the object border. -| Name | Data Type | Possible Values | -| ----------- | --------- | ----------------------------------------------------------------- | -| borderStyle | text | "system", "none", "solid", "dotted", "raised", "sunken", "double" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ----------------------------------------------------------------- | +| borderStyle | texto | "system", "none", "solid", "dotted", "raised", "sunken", "double" | -#### Objects Supported +#### Objetos soportados [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 +#### Gramática JSON -| Name | Data Type | Possible Values | +| Nombre | Tipos de datos | Valores posibles | | --------------- | ---------------------- | ------------------------------------------------------------------------ | | strokeDashArray | number array or string | Ex. "6 1" or \[6,1\] for a sequence of 6 black point and 1 white point | - -#### Objects Supported +#### Objetos soportados [Rectangle](shapes_overview.md#rectangle) - [Oval](shapes_overview.md#oval) - [Line](shapes_overview.md#line) -* * * -## Hide extra blank rows + + +--- +## Ocultar líneas vacías finales 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: @@ -112,64 +111,70 @@ You can remove these empty rows by selecting this option. The bottom of the list ![](assets/en/FormObjects/property_hideExtraBlankRows2.png) -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------------ | --------- | --------------- | -| hideExtraBlankRows | boolean | true, false | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | -------------- | ---------------- | +| hideExtraBlankRows | booleano | true, false | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md#overview) -* * * + + +--- ## Line Color Designates the color of the object's lines. The color can be specified by: * a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" +* un valor HEX - como "# ff0000" +* un valor RVB - como "rgb (255,0,0)" 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ----------------------------------------- | +| stroke | cadena | 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). -#### Objects Supported +#### Objetos soportados -[Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) +[Línea](shapes_overview.md#line) - [Óvalo](shapes_overview.md#oval) - [Rectángulo](shapes_overview.md#rectangle) -* * * + +--- ## Line Width Designates the thickness of a line. -#### JSON Grammar +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ----------------------------------------------------------------- | +| strokeWidth | number | 0 for smallest width on a printed form, or any integer value < 20 | + +#### Objetos soportados + +[Línea](shapes_overview.md#line) - [Óvalo](shapes_overview.md#oval) - [Rectángulo](shapes_overview.md#rectangle) + -| Name | Data Type | 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 colores de fondo -`Array type list boxes` +`List box de tipo array` The name of an array to apply a custom background color to each row of the list box or column. @@ -181,7 +186,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 +196,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. | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------------------- | +| rowFillSource | cadena | The name of a longint array. | -#### Objects Supported - +#### Objetos soportados [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Transparent -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" | +--- +## 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. +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| fill | texto | "transparent" | +#### Objetos soportados [List Box](listbox_overview.md#overview) -#### See also - +#### Ver también [Background Color / Fill Color](#background-color-fill-color) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_CoordinatesAndSizing.md b/website/translated_docs/es/FormObjects/properties_CoordinatesAndSizing.md index d1cfccd3d4b4c7..2a657ac050f096 100644 --- a/website/translated_docs/es/FormObjects/properties_CoordinatesAndSizing.md +++ b/website/translated_docs/es/FormObjects/properties_CoordinatesAndSizing.md @@ -1,114 +1,118 @@ --- id: propertiesCoordinatesAndSizing -title: Coordinates & Sizing +title: Coordenadas y dimensiones --- -* * * - +--- ## Automatic Row Height 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. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------- | -| rowHeightAuto | boolean | true, false | -#### Objects Supported +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------- | +| rowHeightAuto | booleano | true, false | + +#### Objetos soportados [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Bottom + + + +--- +## Abajo Bottom coordinate of the object in the form. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------ | --------- | --------------- | -| bottom | number | minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| bottom | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 +--- +## Izquierda Left coordinate of the object on the form. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| left | number | minimum: 0 | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| left | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 -Right coordinate of the object in the form. +--- +## Derecha -#### JSON Grammar +Right coordinate of the object in the form. -| Name | Data Type | Possible Values | -| ----- | --------- | --------------- | -| right | number | minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| right | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 -Top coordinate of the object in the form. -#### JSON Grammar +--- +## Arriba + +Top coordinate of the object in the form. -| Name | Data Type | Possible Values | -| ---- | --------- | --------------- | -| top | number | minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| top | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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: @@ -119,119 +123,130 @@ Minimum value is 0, in this case a standard non-rounded rectangle is drawn. Maxi You can also set this property using the [OBJECT Get corner radius](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-Get-corner-radius.301-4311357.en.html) and [OBJECT SET CORNER RADIUS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-CORNER-RADIUS.301-4311356.en.html) commands. -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------- | -| borderRadius | integer | minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------- | +| borderRadius | integer | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [Rectangle](shapes_overview.md#rectangle) -* * * -## Height -This property designates an object's vertical size. -> Some objects may have a predefined height that cannot be altered. +--- +## Altura -#### JSON Grammar +This property designates an object's vertical size. +> Some objects may have a predefined height that cannot be altered. -| Name | Data Type | Possible Values | -| ------ | --------- | --------------- | -| height | number | minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| height | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 +--- +## Ancho 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| ancho | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| -------- | -------------- | ---------------- | +| maxWidth | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| -------- | -------------- | ---------------- | +| minWidth | number | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Row Height + + + + + + +--- +## Altura de las líneas + 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) | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ---------------------------------------- | +| rowHeight | cadena | css value in unit "em" or "px" (default) | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md#overview) -#### See also -[Row Height Array](#row-height-array) +#### Ver también +[Array altura de las líneas](#row-height-array) + -* * * -## Row Height Array +--- +## Array altura de las líneas 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). @@ -245,21 +260,23 @@ 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. | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | ---------------------------- | +| rowHeightSource | cadena | Name of a 4D array variable. | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md#overview) -#### See also -[Row Height](#row-height) \ No newline at end of file +#### Ver también +[Altura de las líneas](#row-height) + + + + diff --git a/website/translated_docs/es/FormObjects/properties_Crop.md b/website/translated_docs/es/FormObjects/properties_Crop.md index 18efd590218fae..d9f617115deeb3 100644 --- a/website/translated_docs/es/FormObjects/properties_Crop.md +++ b/website/translated_docs/es/FormObjects/properties_Crop.md @@ -1,38 +1,47 @@ --- id: propertiesCrop -title: Crop +title: Corte --- -* * * - +--- ## Columns Sets the number of columns in a thumbnail table. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -|:----------- |:---------:| --------------- | -| columnCount | integer | minimum: 1 | +| Nombre | Tipos de datos | Valores posibles | +|:----------- |:--------------:| ---------------- | +| columnCount | integer | minimum: 1 | - -#### Objects Supported +#### Objetos soportados [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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:-------- |:--------------:| ---------------- | +| rowCount | integer | minimum: 1 | + +#### Objetos soportados + +[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) + + + + + + -| Name | Data Type | Possible Values | -|:-------- |:---------:| --------------- | -| rowCount | integer | minimum: 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 diff --git a/website/translated_docs/es/FormObjects/properties_DataSource.md b/website/translated_docs/es/FormObjects/properties_DataSource.md index 12baa06035acf0..da17ee2bdd5f1a 100644 --- a/website/translated_docs/es/FormObjects/properties_DataSource.md +++ b/website/translated_docs/es/FormObjects/properties_DataSource.md @@ -1,131 +1,182 @@ --- id: propertiesDataSource -title: Data Source +title: Fuente de datos --- -* * * - +--- ## 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: +When this option is selected, if a user enters a value that is not found in the list associated with the object, this value is automatically added to the list stored in memory. + +When the **automatic insertion** option is not set (default), the value entered is stored in the form object but not in the list in memory. -- 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. +This property is supported by: + +- [Combo box](comboBox_overview.md) and [list box column](listbox_overview.md#list-box-columns) form objects associated to a choice list. +- [Combo box](comboBox_overview.md) form objects whose associated list is filled by their array or object datasource. For example, given a choice list containing "France, Germany, Italy" that is associated with a "Countries" combo box: if the **automatic insertion** property is set and a user enters "Spain", then the value "Spain" is automatically added to the list in memory: ![](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. +> If the choice 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | -------------- | ---------------- | +| automaticInsertion | booleano | true, false | -#### Objects Supported +#### Objetos soportados [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 +You can also associate choice lists to objects using the [OBJECT SET LIST BY NAME](https://doc.4d.com/4dv19/help/command/en/page237.html) or [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4dv19/help/command/en/page1266.html) commands. + -| Name | Data Type | Possible Values | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | | ---------- | ---------------- | --------------------------------------------------- | | choiceList | list, collection | A list of possible values | | list | list, collection | A list of possible values (hierarchical lists only) | -#### Objects Supported +#### Objetos soportados [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) -* * * + +--- ## Choice List (static list) List of static values to use as labels for the tab control object. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | +| Nombre | Tipos de datos | Valores posibles | | ------ | ---------------- | ---------------------------------------- | | labels | list, collection | A list of values to fill the tab control | - -#### Objects Supported +#### Objetos soportados [Tab Control](tabControl.md) -* * * - -## Current item +--- +## Elemento actual `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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ----------------- | --------- | ----------------- | -| currentItemSource | string | Object expression | +| Nombre | Tipos de datos | Valores posibles | +| ----------------- | -------------- | ----------------- | +| currentItemSource | cadena | Object expression | +#### Objetos soportados +[List Box ](listbox_overview.md#overview) -#### Objects Supported -[List Box ](listbox_overview.md#overview) -* * * -## Current item position +--- +## Posición elemento actual `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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------------------- | --------- | ----------------- | -| currentItemPositionSource | string | Number expression | +| Nombre | Tipos de datos | Valores posibles | +| ------------------------- | -------------- | ----------------- | +| currentItemPositionSource | cadena | Number expression | +#### Objetos soportados +[List Box ](listbox_overview.md) -#### Objects Supported -[List Box ](listbox_overview.md) -* * * -## Data Type -Please refer to [Expression Type](properties_Object.md#expression-type) section. +--- +## Data Type (expression type) -#### Objects Supported +Defines the data type for the displayed expression. This property is used with: -[List Box Column](listbox_overview.md#list-box-columns) +- [List box columns](listbox_overview.md#list-box-columns) of the selection and collection types. +- [Drop-down lists](dropdownList_Overview.md) associated to objects or arrays. + +See also [**Expression Type**](properties_Object.md#expression-type) section. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | -------------- | -------------------------------------------------- | +| dataSourceTypeHint | cadena |
    • **list box columns:** "boolean", "number", "picture", "text", date", "time". *Array/selection list box only*: "integer", "object"
    • **drop-down lists:** "object", "arrayText", "arrayDate", "arrayTime", "arrayNumber"
    • | + + +#### Objetos soportados + +[Drop-down Lists](dropdownList_Overview.md) associated to objects or arrays - [List Box column](listbox_overview.md#list-box-columns) + + + +--- +## Data Type (list) + +Defines the type of data to save in the field or variable associated to the [drop-down list](dropdownList_Overview.md). This property is used with: -* * * +- Drop-down lists [associated to a choice list](dropdownList_Overview.md#using-a-choice-list). +- Drop-down lists [associated to a hierarchical choice list](dropdownList_Overview.md#using-a-hierarchical-choice-list). + +Three options are available: + +- **List reference**: declares that the drop-down list is hierarchical. It means that the drop-down list can display up to two hierarchical levels and its contents can be managed by the 4D language commands of the **Hierarchical Lists** theme. +- **Selected item value** (default): the drop-down list is not hierarchical and the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. +- **Selected item reference**: the drop-down list is not hierarchical and the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. + +Using the **Selected item reference** option requires compliance with the following principles: +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. +- Valid and unique references must be associated with list items. +- The drop-down list must be associated with a field or a variable. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | -------------------- | +| saveAs | cadena | "value", "reference" | + + +> Setting only `"dataSourceTypeHint" : "integer"` with a `"type": "dropdown"` form object will declare a hierarchical drop-down list. + + +#### Objetos soportados + +[Drop-down Lists](dropdownList_Overview.md) associated to lists + + +--- ## Default (list of) values @@ -139,20 +190,21 @@ You must enter a list of values. In the Form editor, a specific dialog box allow > You can also define a [choice list](properties_DataSource.md#choice-list) with the list box column. However, a choice list will be used as list of selectable values for each column row, whereas the default list fill all column rows. -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------ | ---------- | ---------------------------------------------------------------- | -| values | collection | A collection of default values (strings), ex: "a", "b", "c", "d" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------------------------------------------------------- | +| values | colección | A collection of default values (strings), ex: "a", "b", "c", "d" | -#### Objects Supported +#### Objetos soportados [List Box Column (array type only)](listbox_overview.md#list-box-columns) -* * * -## Expression + + +--- +## Expresión 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,67 +213,67 @@ 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. + * Cadena + * Numeric + * Fecha + * Hora + * Imagen + * 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: + * Cadena + * Numeric + * Fecha + * Imagen + * 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. | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ----------------------------------------------------------------------- | +| dataSource | cadena | A 4D variable, field name, or an arbitrary complex language expression. | -#### Objects Supported +#### Objetos soportados [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Master Table + +--- + +## Tabla principal `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. All database tables can be used, regardless of whether the form is related to a table (table form) or not (project form). -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ----- | --------- | --------------- | -| table | number | Table number | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| table | number | Table number | +#### Objetos soportados +[List Box](listbox_overview.md#overview) -#### Objects Supported -[List Box](listbox_overview.md#overview) -* * * +--- -## Save as +## Guardar como This property is available in the following conditions: @@ -231,68 +283,60 @@ This property is available in the following conditions: This property specifies, in the context of a field or variable associated with a list of values, the type of contents to save: - **Save as Value** (default option): the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. -- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the `APPEND TO LIST` or `SET LIST ITEM` commands, or in the lists editor. +- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. Using this property requires compliance with the following principles: -- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. - 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | -------------------- | +| saveAs | cadena | "value", "reference" | -#### Objects Supported +#### Objetos soportados +[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -[Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * - -## Selected Items +--- +## Elementos seleccionados `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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------------- | -------------- | --------------------- | +| selectedItemsSource | cadena | Collection expression | -#### Objects Supported - +#### Objetos soportados [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. > Named selections are ordered lists of records. They are used to keep the order and current record of a selection in memory. For more information, refer to **Named Selections** section in the *4D Language Reference manual*. -#### JSON Grammar - -| Name | Data Type | Possible Values | -| -------------- | --------- | -------------------- | -| namedSelection | string | Named selection name | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | -------------------- | +| namedSelection | cadena | Named selection name | -#### Objects Supported - -[List Box](listbox_overview.md#overview) \ No newline at end of file +#### Objetos soportados +[List Box](listbox_overview.md#overview) diff --git a/website/translated_docs/es/FormObjects/properties_Display.md b/website/translated_docs/es/FormObjects/properties_Display.md index c020c5e2883ef6..41324e1d9060ad 100644 --- a/website/translated_docs/es/FormObjects/properties_Display.md +++ b/website/translated_docs/es/FormObjects/properties_Display.md @@ -1,10 +1,9 @@ --- id: propertiesDisplay -title: Display +title: Visualización --- -* * * - +--- ## 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: +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) - + (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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ------------------------------------------------------------------------------------ | +| textFormat | cadena | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | -#### Objects Supported +#### Objetos soportados [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) | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dateFormat | cadena | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | -#### Objects Supported +#### Objetos soportados [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. @@ -115,40 +116,39 @@ In each of the number display formats, the number sign (#), zero (0), caret (^), | ^ | 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 #. +> 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 (,). -> 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 You can use a decimal point in a number display format. If you want the decimal to display regardless of whether the user types it in, it must be placed between zeros. -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: +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 +### Ejemplos 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 | - - -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------------ | --------- | -------------------------------------------------------------- | -| numberFormat | string | Numbers (including a decimal point or minus sign if necessary) | - - -#### Objects Supported +| 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 | + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | -------------------------------------------------------------- | +| numberFormat | cadena | Numbers (including a decimal point or minus sign if necessary) | + +#### Objetos soportados [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,6 +298,7 @@ If you have applied the **Scaled to fit centered (proportional)** format, the pi ![](assets/en/FormObjects/property_pictureFormat_ScaledProportional.png) + ### Replicated `JSON grammar: "tiled"` @@ -314,28 +309,29 @@ 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). -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------------------------------------------------------------------------------------- | -| pictureFormat | string | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ----------------------------------------------------------------------------------------------------- | +| pictureFormat | cadena | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | -#### Objects Supported +#### Objetos soportados [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 | Comentarios | Example for 04:30:25 | | ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | | HH:MM:SS | hh_mm_ss | | 04:30:25 | | HH:MM | hh_mm | | 04:30 | @@ -346,51 +342,49 @@ 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 | +#### Gramática JSON -#### JSON Grammar +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timeFormat | cadena | "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) | -| 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) | +#### Objetos soportados +[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) -#### 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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------------------------------------------------------------ | -| booleanFormat | string | "\<*textWhenTrue*\>;\<*textWhenFalse*\>", e.g. "Assigned;Unassigned" | +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ------------------------------------------------------------------------ | +| booleanFormat | cadena | "\<*textWhenTrue*\>;\<*textWhenFalse*\>", e.g. "Assigned;Unassigned" | -#### Objects Supported +#### Objetos soportados [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) -* * * -## Display Type + + +--- +## Tipo de visualización 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). @@ -398,186 +392,223 @@ Boolean and number (numeric or integer) columns can be displayed as check boxes. Boolean columns can also be displayed as pop-up menus. In this case, the [Text when False and Text when True](#text-when-false-text-when-true) properties must be defined. -#### 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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| controlType | cadena |
    • **number columns**: "automatic" (default) or "checkbox"
    • **boolean columns**: "checkbox" (default) or "popup" | + +#### Objetos soportados + +[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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------- | -------------- | ---------------- | +| display | booleano | true, false | + +#### Objetos soportados + +[Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) + + + + + + + +--- +## Three-States + + + +Allows a check box object to accept a third state. La variable asociada a la casilla de selección devuelve el valor 2 cuando la casilla está en el tercer 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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ---------------- | +| threeState | booleano | true, false | + +#### Objetos soportados + +[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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------------------------- | +| controlTitle | cadena | Any custom label for the check box | + +#### Objetos soportados + +[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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------------- | +| truncateMode | cadena | "withEllipsis", "none" | + + + +#### Objetos soportados + +[List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) + + + + + +--- +## Visibilidad + +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. + + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ------------------- | +| visibility | cadena | "visible", "hidden" | + +#### Objetos soportados + +[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) + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| -------- | -------------- | -------------------------------------------------- | +| wordwrap | cadena | "automatic" (excluding list box), "normal", "none" | + +#### Objetos soportados + +[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/es/FormObjects/properties_Entry.md b/website/translated_docs/es/FormObjects/properties_Entry.md index 9cacd628fffc02..b7cc7b91cbc721 100644 --- a/website/translated_docs/es/FormObjects/properties_Entry.md +++ b/website/translated_docs/es/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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ---------------- | +| spellcheck | booleano | true, false | -#### Objects Supported + +#### Objetos soportados [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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ------------------------------------- | +| contextMenu | cadena | "automatic" (used if missing), "none" | -#### Objects Supported +#### Objetos soportados [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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ---------------- | +| enterable | booleano | true, false | -#### Objects Supported +#### Objetos soportados -[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) +[4D Write Pro areas](writeProArea_overview.md) - [Check Box](checkbox_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. @@ -87,15 +90,16 @@ Entry filters can also be used to display required formatting characters so that Most of the time, you can use one of the [built-in filters](#default-entry-filters) of 4D for what you need; however, you can also create and use custom filters: - you can directly enter a filter definition string -- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). +- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). 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 | Descripción | | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | ~A | Allow any letters, but convert to uppercase. | | &9 | Allow only numbers. | @@ -117,198 +121,223 @@ Here is a table that explains each of the entry filter choices in the Entry Filt | &"0-9;.;-" | Numbers. Allow only numbers, decimal points, and hyphens (minus sign). | -#### 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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| entryFilter | cadena |
    • Entry filter code or
    • Entry filter name (filter names start with | ) | + + +#### Objetos soportados + +[Check Box](checkbox_overview.md) - [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 +

      +

      + +* ![](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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ---------------- | +| focusable | booleano | true, false | + + +#### Objetos soportados + +[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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | --------------------------------------------------------------------------- | +| keyboardDialect | texto | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | + + +#### Objetos soportados + +[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) + +#### Sí +When this value is selected, the property is managed by the [Wordwrap](properties_Display.md#wordwrap) option. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ------------------------------------------------- | +| multiline | texto | "yes", "no", "automatic" (default if not defined) | + + +#### Objetos soportados + +[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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------------------------------------------------------------------- | +| placeholder | cadena | Text to be displayed (grayed out) when the object does not contain any value | + +#### Objetos soportados + +[Combo Box](comboBox_overview.md) - [Input](input_overview.md) + + +#### Ver también + +[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)). + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------- | +| showSelection | booleano | true, false | + + +#### Objetos soportados + +[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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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 | cadena |

    • 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]" | + + +#### Objetos soportados + +[Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Radio Button](radio_overview.md) + + + + + +--- +## Edición con un solo clic + +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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | ---------------- | +| singleClickEdit | booleano | true, false | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + + + + diff --git a/website/translated_docs/es/FormObjects/properties_Footers.md b/website/translated_docs/es/FormObjects/properties_Footers.md index 9b9fcc266e017e..cd9d9b2534fee6 100644 --- a/website/translated_docs/es/FormObjects/properties_Footers.md +++ b/website/translated_docs/es/FormObjects/properties_Footers.md @@ -1,69 +1,70 @@ --- id: propertiesFooters -title: Footers +title: Pies --- -* * * - -## Display Footers +--- +## Mostrar pies 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------- | +| showFooters | booleano | true, false | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md) -* * * -## Height -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. +--- +## Altura + +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: -* *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. +* *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 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". Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: *(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", - ... - } - +#### Ejemplo JSON: -#### JSON Grammar +``` + "List Box": { + "type": "listbox", + "showFooters": true, + "footerHeight": "44px", + ... + } +``` -| Name | Data Type | Possible Values | -| ------------ | --------- | ----------------------------- | -| footerHeight | string | positive decimal+px | em | +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ----------------------------- | +| footerHeight | cadena | positive decimal+px | em | + +#### Objetos soportados [List Box](listbox_overview.md) -#### See also + +#### Ver también [Headers](properties_Headers.md) - [List box footers](listbox_overview.md#list-box-footers) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Gridlines.md b/website/translated_docs/es/FormObjects/properties_Gridlines.md index 292f12f6de8905..2327e30083b6ca 100644 --- a/website/translated_docs/es/FormObjects/properties_Gridlines.md +++ b/website/translated_docs/es/FormObjects/properties_Gridlines.md @@ -1,38 +1,37 @@ --- id: propertiesGridlines -title: Gridlines +title: Rejillas --- -* * * - -## Horizontal Line Color +--- +## Color líneas horizontales Defines the color of the horizontal lines in a list box (gray by default). -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| -------------------- | --------- | ------------------------------------------ | -| horizontalLineStroke | color | any css value, "'transparent", "automatic" | +| Nombre | Tipos de datos | Valores posibles | +| -------------------- | -------------- | ------------------------------------------ | +| horizontalLineStroke | color | any css value, "'transparent", "automatic" | - -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md) -* * * -## Vertical Line Color -Defines the color of the vertical lines in a list box (gray by default). -#### JSON Grammar +--- +## Color líneas verticales + +Defines the color of the vertical lines in a list box (gray by default). -| Name | Data Type | Possible Values | -| ------------------ | --------- | ------------------------------------------ | -| verticalLineStroke | color | any css value, "'transparent", "automatic" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | -------------- | ------------------------------------------ | +| verticalLineStroke | color | any css value, "'transparent", "automatic" | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Headers.md b/website/translated_docs/es/FormObjects/properties_Headers.md index 4a7648ab6eddb6..bd8baaf6f15902 100644 --- a/website/translated_docs/es/FormObjects/properties_Headers.md +++ b/website/translated_docs/es/FormObjects/properties_Headers.md @@ -1,40 +1,37 @@ --- id: propertiesHeaders -title: Headers +title: Encabezados --- -* * * - -## Display Headers +--- +## Mostrar encabezados 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------- | +| showHeaders | booleano | true, false | -#### Objects Supported +#### Objetos soportados [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. +--- +## Altura -* *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: + +* *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". @@ -43,27 +40,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: +#### Ejemplo JSON: - "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 ) | +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ------------------------------- | +| headerHeight | cadena | positive decimal+px | em ) | + +#### Objetos soportados [List Box](listbox_overview.md) -#### See also + +#### Ver también [Footers](properties_Footers.md) - [List box headers](listbox_overview.md#list-box-headers) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Help.md b/website/translated_docs/es/FormObjects/properties_Help.md index ba4451dbd01ce4..da748b77f852d4 100644 --- a/website/translated_docs/es/FormObjects/properties_Help.md +++ b/website/translated_docs/es/FormObjects/properties_Help.md @@ -1,10 +1,9 @@ --- id: propertiesHelp -title: Help +title: Ayuda --- -* * * - +--- ## Help Tip This property allows associating help messages with active objects in your forms. They can be displayed at runtime: @@ -16,21 +15,21 @@ This property allows associating help messages with active objects in your forms 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. +- 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. -#### JSON Grammar -| Name | Data Type | Possible Values | -|:-------:|:---------:| ------------------------------------- | -| tooltip | text | additional information to help a user | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:-------:|:--------------:| ------------------------------------- | +| tooltip | texto | additional information to help a user | +#### Objetos soportados -#### 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,10 @@ 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 +#### Ver también + +[Placeholder](properties_Entry.md#placeholder) + + + diff --git a/website/translated_docs/es/FormObjects/properties_Hierarchy.md b/website/translated_docs/es/FormObjects/properties_Hierarchy.md index 0ee461fff47ac7..ccb9de995eb037 100644 --- a/website/translated_docs/es/FormObjects/properties_Hierarchy.md +++ b/website/translated_docs/es/FormObjects/properties_Hierarchy.md @@ -1,13 +1,11 @@ --- id: propertiesHierarchy -title: Hierarchy +title: Jerarquía --- -* * * - -## Hierarchical List Box - -`Array type list boxes` +--- +## List box jerárquico +`List box de tipo array` 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. @@ -15,13 +13,14 @@ Additional options (**Variable 1...10**) are available when the *Hierarchical Li 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 | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ------------------------------------------------ | +| datasource | string array | Collection of array names defining the hierarchy | -#### Objects Supported +#### Objetos soportados -[List Box](listbox_overview.md) \ No newline at end of file +[List Box](listbox_overview.md) diff --git a/website/translated_docs/es/FormObjects/properties_ListBox.md b/website/translated_docs/es/FormObjects/properties_ListBox.md index 492ae0c5128421..aa1bd7236f7398 100644 --- a/website/translated_docs/es/FormObjects/properties_ListBox.md +++ b/website/translated_docs/es/FormObjects/properties_ListBox.md @@ -3,245 +3,247 @@ id: propertiesListBox title: List Box --- -* * * - +--- ## Columns Collection of columns of the list box. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | +| Nombre | Tipos de datos | Valores posibles | | ------- | ---------------------------- | ------------------------------------------------ | | 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 +#### Objetos soportados [List Box](listbox_overview.md) -* * * - -## Detail Form Name - +--- +## Nombre formulario detallado `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". - -#### 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 +* 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". + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| detailForm | cadena |
    • Name (string) of table or project form
    • POSIX path (string) to a .json file describing the form
    • Object describing the form | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + + + +--- +## Doble clic en línea +`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). + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------------------- | -------------- | ----------------------------------- | +| doubleClickInRowAction | cadena | "editSubrecord", "displaySubrecord" | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + +--- +## Conjunto resaltado + +`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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------- | +| highlightSet | cadena | Name of the set | + +#### Objetos soportados + +[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 columnas bloqueadas + +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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------------- | -------------- | ---------------- | +| lockedColumnCount | integer | mínimo: 0 | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + +### Número de columnas estáticas + +Number of columns that cannot be moved during execution. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------------- | -------------- | ---------------- | +| staticColumnCount | integer | mínimo: 0 | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + + + +--- +## Número de columnas + +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). + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ---------------- | +| columnCount | integer | minimum: 1 | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + +--- +## Array de control de líneas + +`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 | Valor | 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). Por ejemplo: + +```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 +``` + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------------- | -------------- | ---------------------- | +| rowControlSource | cadena | Row control array name | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + +--- +## Modo de selección + +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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------------------- | +| selectionMode | cadena | "multiple", "single", "none" | + +#### Objetos soportados + +[List Box](listbox_overview.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Object.md b/website/translated_docs/es/FormObjects/properties_Object.md index 068a7c5bbf7613..b050608c58053c 100644 --- a/website/translated_docs/es/FormObjects/properties_Object.md +++ b/website/translated_docs/es/FormObjects/properties_Object.md @@ -1,52 +1,52 @@ --- id: propertiesObject -title: Objects +title: Objetos --- -* * * - -## Type +--- +## Tipo -`MANDATORY SETTING` + `MANDATORY SETTING` 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" | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | cadena | "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 +#### Objetos soportados [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 +--- +## Nombre del 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 | +For more information about naming rules for form objects, refer to [Identifiers](Concepts/identifiers.md) section. + +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | -------------------------------------------------------------------- | +| name | cadena | Any allowed name which does not belong to an already existing object | -#### Objects Supported +#### Objetos soportados [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) -* * * +--- ## Save value This property is available when the [Save Geometry](FormEditor/properties_FormProperties.md#save-geometry) option is checked for the form. @@ -55,52 +55,62 @@ This feature is only supported for objects that contribute to the overall geomet Here is the list of objects whose value can be saved: -| Object | Saved value | -| ------------------------------------------ | -------------------------------------------------------------------------------------- | -| [Check Box](checkbox_overview.md) | Value of associated variable (0, 1, 2) | -| [Drop-down List](dropdownList_Overview.md) | Number of selected row | -| [Radio Button](radio_overview.md) | Value of associated variable (1, 0, True or False for buttons according to their type) | -| [Tab control](tabControl.md) | Number of selected tab | - +| Objeto | Saved value | +| --------------------------------------------- | -------------------------------------------------------------------------------------- | +| [Check Box](checkbox_overview.md) | Value of associated variable (0, 1, 2) | +| [Lista desplegable](dropdownList_Overview.md) | Number of selected row | +| [Botón radio](radio_overview.md) | Value of associated variable (1, 0, True or False for buttons according to their type) | +| [Tab control](tabControl.md) | Number of selected tab | -#### JSON Grammar -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------- | -| memorizeValue | boolean | true, false | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------- | +| memorizeValue | booleano | true, false | -#### Objects Supported +#### Objetos soportados [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Radio Button](radio_overview.md) - [Tab control](tabControl.md) -* * * -## Variable or Expression -> See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. +--- +## Variable o expresión + +> See also **[Expression](properties_DataSource.md#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. Variables or expressions can be enterable or non-enterable and can receive data of the Text, Integer, Numeric, Date, Time, Picture, Boolean, or Object type. -### 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). +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSource | string, or string array |
    • 4D variable, field name, or any 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] | + + +### Expresiones + +You can use an [expression](Concepts/quick-tour.md#expressions) as data source for an object. Any valid 4D expression is allowed: simple expression, object property, 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. When a variable is not named, when the form is loaded, 4D creates a new variable for the object, with a calculated name that is unique in the space of the process variables of the interpreter (which means that this mechanism can be used even in compiled mode). This temporary variable will be destroyed when the form is closed. In order for this principle to work in compiled mode, it is imperative that dynamic variables are explicitly typed. There are two ways to do this: -- You can set the type using the [Expression type](#expression-type) property. +- You can set the type using the [Expression type](#expression-type) property. - You can use a specific initialization code when the form is loaded that uses, for example, the `VARIABLE TO VARIABLE` command: ```4d @@ -112,7 +122,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 ejemplo: ```4d // assign the time 12:00:00 to the variable for the "tstart" object @@ -125,205 +135,254 @@ 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). - -#### 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 + +### 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). + + + + +#### Objetos soportados + +[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**](properties_DataSource.md#data-type-expression-type) in the Property List for [selection](listbox_overview.md#selection-list-boxes) and [collection](listbox_overview.md#collection-or-entity-selection-list-boxes) type list box columns and for [Drop-down Lists](dropdownList_Overview.md) associated to an [object](FormObjects/dropdownList_Overview.md#using-an-object) or an [array](FormObjects/dropdownList_Overview.md#using-an-array). + + +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 project compilation, you must [declare the variable](Concepts/variables.md#declaring-variables). + +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). + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSourceTypeHint | cadena |
    • **standard objects:** "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "collection", "object", "undefined"
    • **list box columns:** "boolean", "number", "picture", "text", date", "time". *Array/selection list box only*: "integer", "object" | + +#### Objetos soportados + +[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](FormEditor/createStylesheet.md#style-sheet-files). + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | --------------------------------------------------------- | +| class | cadena | One string with CSS name(s) separated by space characters | + + +#### Objetos soportados + +[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 o 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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ------------------------------------------------------------ | +| dataSource | cadena | Expression that returns a collection or an entity selection. | + +#### Objetos soportados + +[List Box](listbox_overview.md) + + + + + + +--- +## Fuente de datos + +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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ----------- | -------------- | ----------------------------------------------------------- | +| listboxType | cadena | "array", "currentSelection", "namedSelection", "collection" | + +#### Objetos soportados + +[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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | ------------------------------------------------------------- | +| pluginAreaKind | cadena | Name of the plug-in external area (starts with a % character) | + + +#### Objetos soportados +[Ãrea de plug-in](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. + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ---------------- | +| radioGroup | cadena | Radio group name | + + +#### Objetos soportados + +[Botón radio](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 application 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)). + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ---------------- | +| texto | cadena | any text | + +#### Objetos soportados + +[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`](https://doc.4d.com/4dv19/help/command/en/page1140.html) 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 | Texto | Fecha | Hora | Bool | Pict | footer var type | +| --------------------- | --- | ----- | ----- | ---- | ---- | ---- | ------------------- | +| Minimum | X | X | X | X | X | | Same as column type | +| Maximum | X | X | X | X | X | | Same as column type | +| Sum | X | | | X | X | | Same as column type | +| Count | X | X | X | X | X | X | Entero largo | +| 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. + +> Only declared or dynamic [variables](Concepts/variables.md) can be used to display footer calculations. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.value` are not supported. + +Automatic calculations ignore the shown/hidden state of list box rows. If you want to restrict a calculation to only visible rows, you must use a custom calculation. + +*Null* values are not taken into account for any calculations. + +If the column contains different types of values (collection-based column for example): + +- Average and Sum only take numerical elements into account (other element types are ignored). +- Minimum and Maximum return a result according to the usual type list order as defined in the [collection.sort()](API/CollectionClass.md#sort) function. + +Using automatic calculations in footers of columns based upon expressions has the following limitations: + +- it is **supported** with all list box types when the expression is "simple" (such as `[table]field` or `this.attribute`), +- it is **supported but not recommended** for performance reasons with collection/entity selection list boxes when the expression is "complex" (other than `this.attribute`) and the list box contains a large number of rows, +- it is **not supported** with current selection/named selection list boxes when the expression is "complex". Es necesario utilizar cálculos personalizados. + +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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------------- | -------------- | ----------------------------------------------------------------------------------------------------- | +| variableCalculation | cadena | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | + +#### Objetos soportados + +[List Box Footer](listbox_overview.md#list-box-footers) + + + + + + + + + diff --git a/website/translated_docs/es/FormObjects/properties_Picture.md b/website/translated_docs/es/FormObjects/properties_Picture.md index 0edf708db43671..8fb97100e411a0 100644 --- a/website/translated_docs/es/FormObjects/properties_Picture.md +++ b/website/translated_docs/es/FormObjects/properties_Picture.md @@ -1,33 +1,34 @@ --- id: propertiesPicture -title: Picture +title: Imagen --- -* * * - +--- ## 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +|:------:|:--------------:| ------------------------------------------- | +| imagen | texto | Relative or filesystem path in POSIX syntax | -#### Objects Supported + +#### Objetos soportados [Picture button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Static Picture](staticPicture.md) -* * * -## Display +--- +## Visualización + ### Scaled to fit @@ -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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | -------------------------------------------------------- | +| pictureFormat | cadena | "scaled", "tiled", "truncatedCenter", "truncatedTopLeft" | -#### Objects Supported +#### Objetos soportados [Static Picture](staticPicture.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Plugins.md b/website/translated_docs/es/FormObjects/properties_Plugins.md index 14c009dad37524..c95887158f245c 100644 --- a/website/translated_docs/es/FormObjects/properties_Plugins.md +++ b/website/translated_docs/es/FormObjects/properties_Plugins.md @@ -3,21 +3,23 @@ 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. +If advanced options are provided by the author of the plug-in, an **Advanced Properties** button may be enabled in the Property list. En este caso, puede hacer clic en este botón para definir estas opciones, normalmente a través de una caja de diálogo personalizada. 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 | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ---------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| 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 | + + +#### Objetos soportados -#### Objects Supported +[Ãrea de plug-in](pluginArea_overview.md) -[Plug-in Area](pluginArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Print.md b/website/translated_docs/es/FormObjects/properties_Print.md index 13f741bc815876..3c2895e58fb13b 100644 --- a/website/translated_docs/es/FormObjects/properties_Print.md +++ b/website/translated_docs/es/FormObjects/properties_Print.md @@ -1,10 +1,9 @@ --- 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. @@ -13,6 +12,7 @@ You cannot place more than one variable frame object side-by-side on a form. You > 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" | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:----------:|:--------------:| --------------------------------------------------- | +| printFrame | cadena | "fixed", "variable", (subform only) "fixedMultiple" | -#### Objects Supported +#### Objetos soportados -[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/es/FormObjects/properties_RangeOfValues.md b/website/translated_docs/es/FormObjects/properties_RangeOfValues.md index 31bd836443f4bb..0922085ff2bdca 100644 --- a/website/translated_docs/es/FormObjects/properties_RangeOfValues.md +++ b/website/translated_docs/es/FormObjects/properties_RangeOfValues.md @@ -1,21 +1,19 @@ --- id: propertiesRangeOfValues -title: Range of Values +title: Rango de valores --- -* * * - +--- ## 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 +- fecha - 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: @@ -25,58 +23,61 @@ The default value can only be used if the [data source type](properties_Object.m | #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 +#### Gramática JSON -| Name | Data Type | Possible Values | +| Nombre | Tipos de datos | Valores posibles | | ------------ | ----------------------------------- | ------------------------------------------ | | defaultValue | string, number, date, time, boolean | Any value and/or a stamp: "#D", "#H", "#N" | +#### Objetos soportados -#### Objects Supported +[Entrada](input_overview.md) -[Input](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. - > If a specified list is hierarchical, only the items of the first level are taken into account. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------ | --------- | -------------------------------- | -| excludedList | list | A list of values to be excluded. | +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | -------------------------------- | +| excludedList | list | A list of values to be excluded. | - -#### Objects Supported +#### Objetos soportados [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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | --------------------------- | +| requiredList | list | A list of mandatory values. | + +#### Objetos soportados + +[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) + -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------------------- | -| requiredList | list | 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 diff --git a/website/translated_docs/es/FormObjects/properties_Reference.md b/website/translated_docs/es/FormObjects/properties_Reference.md index 3b0c1743686c31..cb9bf9c870c1d7 100644 --- a/website/translated_docs/es/FormObjects/properties_Reference.md +++ b/website/translated_docs/es/FormObjects/properties_Reference.md @@ -1,219 +1,204 @@ --- id: propertiesReference -title: JSON property list +title: Lista de propiedades JSON --- -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. - +You will find in this page a comprehensive list of all object properties sorted through their JSON name. Haga clic en el nombre de una propiedad para acceder a su descripción detallada. > 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](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. | minimum: 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). | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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 | -| [entryFilter](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 + +| Propiedad | Descripción | Valores posibles | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **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"; "automaticAlternate" | +| [`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. | minimum: 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-expression-type) (list box column, drop-down list) | Indicates the variable type. | "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "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 | +| [`entryFilter`](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`](Events/overview.md) | 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) | cadena | 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) (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. | 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) | Las imágenes se muestran en un bucle continuo. | 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) | Autoriza el desplazamiento de líneas durante la ejecución. | 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** | | | +| [`imagen`](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" | +| [`right`](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. | 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) | 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** | | | +| [`saveAs`](properties_DataSource.md#save-as) (list box column)
      [`saveAs`](properties_DataSource.md#data-type-list) (drop-down list) | The type of contents to save in the field or variable associated to the form object | "value", "reference" | +| [`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. | 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_Text.md#font-color) (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) | Muestra la primera imagen todo el tiempo, excepto cuando el usuario hace clic en el botón. Muestra la segunda imagen hasta que se suelta el botón del ratón. | 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 "" | +| [`texto`](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). | 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" | +| [`ancho`](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/es/FormObjects/properties_ResizingOptions.md b/website/translated_docs/es/FormObjects/properties_ResizingOptions.md index 745cb7cb83ee98..930a369e282737 100644 --- a/website/translated_docs/es/FormObjects/properties_ResizingOptions.md +++ b/website/translated_docs/es/FormObjects/properties_ResizingOptions.md @@ -1,11 +1,10 @@ --- id: propertiesResizingOptions -title: Resizing Options +title: Opciones de redimensionamiento --- -* * * - -## Column Auto-Resizing +--- +## Redimensionamiento columnas auto 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ----------------------- | +| resizingMode | cadena | "rightToLeft", "legacy" | -#### Objects Supported +#### Objetos soportados [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: +--- +## Dimensionamiento 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 | +| ------- | ---------- | ---------------------------------------------------------------------------------------------------------------------- | +| 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, | +| Ninguno | "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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------- | -------------- | ----------------------- | +| sizingX | cadena | "grow", "move", "fixed" | -#### Objects Supported +#### Objetos soportados [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 +--- +## Dimensionamiento 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 | +| ------- | ---------- | -------------------------------------------------------------------------------------------------------------------- | +| 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, | +| Ninguno | "fixed" | The object remains stationary when the form is resized | > This property works in conjunction with the [Horizontal Sizing](#horizontal-sizing) property. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------- | --------- | ----------------------- | -| sizingY | string | "grow", "move", "fixed" | +| Nombre | Tipos de datos | Valores posibles | +| ------- | -------------- | ----------------------- | +| sizingY | cadena | "grow", "move", "fixed" | - -#### Objects Supported +#### Objetos soportados [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,37 @@ 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) | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +|:------------ |:--------------:|:------------------------------------:| +| splitterMode | cadena | "move" (pusher), "resize" (standard) | -#### Objects Supported +#### Objetos soportados -[Splitter](splitterTabControlOverview#splitters) +[Separador](splitterTabControlOverview#splitters) -* * * + + +--- ## Resizable Designates if the size of the column can be modified by the user. -#### JSON Grammar +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:--------- |:--------------:|:----------------:| +| resizable | booleano | "true", "false" | + +#### Objetos soportados + +[List Box Column](listbox_overview.md#list-box-columns) + + -| Name | Data Type | Possible Values | -|:--------- |:---------:|:---------------:| -| resizable | boolean | "true", "false" | -#### Objects Supported -[List Box Column](listbox_overview.md#list-box-columns) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Scale.md b/website/translated_docs/es/FormObjects/properties_Scale.md index 972eb8c92fa8c5..20ba62e6f34653 100644 --- a/website/translated_docs/es/FormObjects/properties_Scale.md +++ b/website/translated_docs/es/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 +#### Gramática JSON -| Name | Data Type | Possible Values | -|:---------------:|:---------:| ----------------------------------------------------------- | -| [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | +| Nombre | Tipos de datos | Valores posibles | +|:---------------:|:--------------:| ----------------------------------------------------------- | +| [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | - -#### Objects Supported +#### Objetos soportados [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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +|:---------------:|:--------------:| ---------------- | +| showGraduations | booleano | "true", "false" | -#### Objects Supported +#### Objetos soportados [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Graduation step Scale display measurement. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -|:--------------:|:---------:| --------------- | -| graduationStep | integer | minimum: 0 | +| Nombre | Tipos de datos | Valores posibles | +|:--------------:|:--------------:| ---------------- | +| graduationStep | integer | mínimo: 0 | -#### Objects Supported +#### Objetos soportados [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Label Location Specifies the location of an object's displayed text. @@ -64,67 +64,74 @@ Specifies the location of an object's displayed text. * Top - Displays labels to the left of or above an indicator * Bottom - Displays labels to the right of or below an indicator -#### JSON Grammar - -| Name | Data Type | Possible Values | -|:---------------:|:---------:| ---------------------------------------- | -| labelsPlacement | string | "none", "top", "bottom", "left", "right" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +|:---------------:|:--------------:| ---------------------------------------- | +| labelsPlacement | cadena | "none", "top", "bottom", "left", "right" | -#### Objects Supported +#### Objetos soportados [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Maximum Maximum 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. -- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. - -#### JSON Grammar +- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. -| Name | Data Type | Possible Values | -|:----:|:---------------:| ----------------------------------- | -| max | string / number | minimum: 0 (for numeric data types) | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +|:------:|:---------------:| ----------------------------------- | +| max | string / number | minimum: 0 (for numeric data types) | -#### Objects Supported +#### Objetos soportados [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) -* * * + +--- ## Minimum 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 +#### Gramática JSON -| Name | Data Type | Possible Values | -|:----:|:---------------:| ----------------------------------- | -| min | string / number | minimum: 0 (for numeric data types) | +| Nombre | Tipos de datos | Valores posibles | +|:------:|:---------------:| ----------------------------------- | +| min | string / number | minimum: 0 (for numeric data types) | - -#### Objects Supported +#### Objetos soportados [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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:------:|:--------------:| ---------------- | +| step | integer | minimum: 1 | + + +#### Objetos soportados + +[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) + + -| Name | Data Type | Possible Values | -|:----:|:---------:| --------------- | -| step | integer | minimum: 1 | -#### Objects Supported -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_Subform.md b/website/translated_docs/es/FormObjects/properties_Subform.md index e6fd8e1cd46d13..8dbc802a14c57b 100644 --- a/website/translated_docs/es/FormObjects/properties_Subform.md +++ b/website/translated_docs/es/FormObjects/properties_Subform.md @@ -1,182 +1,169 @@ --- id: propertiesSubform -title: Subform +title: Subformulario --- -* * * - +--- ## 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) | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | --------------------------- | +| deletableInList | booleano | true, false (default: true) | -#### Objects Supported +#### Objetos soportados -[Subform](subform_overview.md) +[Subformulario](subform_overview.md) -* * * -## Detail Form +--- +## Formulario detallado 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 | +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| detailForm | cadena | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | -[Subform](subform_overview.md) +#### Objetos soportados -* * * +[Subformulario](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 | +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ---------------------------- | -------------- | ---------------------------------- | +| doubleClickInEmptyAreaAction | cadena | "addSubrecord" or "" to do nothing | -[Subform](subform_overview.md) +#### Objetos soportados -#### See also +[Subformulario](subform_overview.md) +#### Ver también [Double click on row](#double-click-on-row) -* * * - -## Double-click on row +--- +## Doble clic en línea `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. 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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---------------------- | --------- | ----------------------------------- | -| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | +| Nombre | Tipos de datos | Valores posibles | +| ---------------------- | -------------- | ----------------------------------- | +| doubleClickInRowAction | cadena | "editSubrecord", "displaySubrecord" | +#### Objetos soportados -#### Objects Supported +[Subformulario](subform_overview.md) -[Subform](subform_overview.md) - -#### See also +#### Ver también [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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | ---------------- | +| enterableInList | booleano | true, false | -#### Objects Supported -[Subform](subform_overview.md) +#### Objetos soportados -* * * +[Subformulario](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 +#### Gramática JSON -| 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 | +| Nombre | Tipos de datos | Valores posibles | +| -------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| listForm | cadena | Name (string) of table or project form, a POSIX path (string) to a .json file describing the form, or an object describing the form | +#### Objetos soportados -#### Objects Supported +[Subformulario](subform_overview.md) -[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. | - +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | --------------------------------- | +| table | cadena | 4D table name, or "" if no table. | -[Subform](subform_overview.md) +#### Objetos soportados -* * * +[Subformulario](subform_overview.md) -## Selection Mode +--- +## Modo de selección 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. +- **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. + - 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ---------------------------- | +| selectionMode | cadena | "multiple", "single", "none" | -#### Objects Supported +#### Objetos soportados -[Subform](subform_overview.md) \ No newline at end of file +[Subformulario](subform_overview.md) diff --git a/website/translated_docs/es/FormObjects/properties_Text.md b/website/translated_docs/es/FormObjects/properties_Text.md index 4324942053b056..66a4b6a90937c0 100644 --- a/website/translated_docs/es/FormObjects/properties_Text.md +++ b/website/translated_docs/es/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 | +#### Gramática JSON +| Propiedad | Tipos de datos | Valores posibles | +| -------------------- | -------------- | --------------------- | +| allowFontColorPicker | booleano | false (default), true | -#### Objects Supported +#### Objetos soportados -[Input](input_overview.md) +[Entrada](input_overview.md) -* * * - -## Bold +--- +## Negrita 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.** +#### Gramática JSON -#### JSON Grammar +| Propiedad | Tipos de datos | Valores posibles | +| ---------- | -------------- | ---------------- | +| fontWeight | texto | "normal", "bold" | -| Property | Data Type | Possible Values | -| ---------- | --------- | ---------------- | -| fontWeight | text | "normal", "bold" | - - -#### Objects Supported +#### Objetos soportados [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álica 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 +#### Gramática JSON -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------ | -| fontStyle | string | "normal", "italic" | +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ------------------ | +| fontStyle | cadena | "normal", "italic" | - -#### Objects Supported +#### Objetos soportados [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 + +--- +## Subrayado Sets the text to have a line running beneath it. +> This is normal text.
      This is underlined text. + +#### Gramática JSON -> This is normal text. -> This is underlined text. +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | --------------------- | +| textDecoration | cadena | "normal", "underline" | -#### JSON Grammar +#### Objetos soportados -| Name | Data Type | Possible Values | -| -------------- | --------- | --------------------- | -| textDecoration | string | "normal", "underline" | +[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) -#### 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. +--- +## Fuente +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,7 +97,6 @@ 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: @@ -111,17 +104,22 @@ Three font themes are available: > Font themes manage the font as well as its size and color. You can apply custom style properties (Bold, Italic or Underline) without altering its functioning. -#### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------------------ | -| fontTheme | string | "normal", "main", "additional" | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ------------------------------ | +| fontTheme | cadena | "normal", "main", "additional" | -#### Objects Supported + +#### Objetos soportados [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,43 +128,40 @@ 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 | - +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | -------------------- | +| fontFamily | cadena | CSS font family name | > 4D recommends using only [web safe](https://www.w3schools.com/cssref/css_websafe_fonts.asp) fonts. -#### Objects Supported +#### Objetos soportados [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 -Allows defining the object's font size in points. +--- +## Tamaño fuente -#### JSON Grammar +Allows defining the object's font size in points. -| Name | Data Type | Possible Values | -| -------- | --------- | ------------------------------------- | -| fontSize | integer | Font size in points. Minimum value: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| -------- | -------------- | ------------------------------------- | +| fontSize | integer | Font size in points. Minimum value: 0 | -#### Objects Supported +#### Objetos soportados [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 +--- +## Color de fuente Designates the font color. @@ -175,25 +170,27 @@ Designates the font color. The color can be specified by: * a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" +* un valor HEX - como "# ff0000" +* un valor RVB - como "rgb (255,0,0)" 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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | ----------------------------------------- | +| stroke | cadena | any css value, "transparent", "automatic" | -#### Objects Supported +#### Objetos soportados [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 + +--- + +## Expresión color fuente `Selection and collection/entity selection type list boxes` @@ -202,7 +199,6 @@ 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: @@ -212,20 +208,18 @@ 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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------------- | -------------- | --------------------- | +| rowStrokeSource | cadena | Font color expression | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md#overview) -* * * - -## Style Expression +--- +## Expresión estilo `Selection and collection/entity selection type list boxes` @@ -233,109 +227,107 @@ 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: +Ejemplo: ```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. | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | ----------------------------------------------- | +| rowStyleSource | cadena | Style expression to evaluate for each row/cell. | -#### Objects Supported +#### Objetos soportados [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Horizontal Alignment -Horizontal location of text within the area that contains it. -#### JSON Grammar -| Name | Data Type | Possible Values | -| --------- | --------- | ------------------------------------------------- | -| textAlign | string | "automatic", "right", "center", "justify", "left" | +--- +## Alineación horizontal + +Horizontal location of text within the area that contains it. + +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ------------------------------------------------- | +| textAlign | cadena | "automatic", "right", "center", "justify", "left" | -[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) +#### Objetos soportados -* * * +[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 + +--- +## Alineamiento 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 +- `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" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | -------------------------------------- | +| verticalAlign | cadena | "automatic", "top", "middle", "bottom" | -#### Objects Supported +#### Objetos soportados [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 + + + + + + +--- +## 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 | - +| Property name | Tipo | Descripción | +| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stroke | cadena | Font color. Any CSS color (ex: "#FF00FF"), "automatic", "transparent" | +| fill | cadena | Background color. Any CSS color (ex: "#F00FFF"), "automatic", "transparent" | +| fontStyle | cadena | "normal","italic" | +| fontWeight | cadena | "normal","bold" | +| textDecoration | cadena | "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". Default value: False. | +| 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. Default value: False. | +| cell.\ | objeto | 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: -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` +**Ejemplo** -In the *Color* method, write the following code: +En el método proyecto *Color*, escribe el siguiente código: ```4d -//Color method -//Sets font color for certain rows and the background color for a specific column: +//Método Color +//Define el color de la fuente para ciertas líneas y el color de fondo para una columna específica: C_OBJECT($0) -If(This.ID>5) //ID is an attribute of collection objects/entities +Form.meta:=New object +If(This.ID>5) //ID es un atributo de objetos/entidades de una colección Form.meta.stroke:="purple" Form.meta.cell:=New object("Column2";New object("fill";"black")) Else @@ -344,45 +336,74 @@ End if $0:=Form.meta ``` -> See also the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. +**Buenas prácticas:** por razones de optimización, se recomendaría en este caso crear el objeto `meta.cell` una vez en el método formulario: -#### JSON Grammar +```4d + //método formulario + Case of + :(Form event code=On Load) + Form.colStyle:=New object("Column2";New object("fill";"black")) + End case +``` -| Name | Data Type | Possible Values | -| ---------- | --------- | ------------------------------------------------ | -| metaSource | string | Object expression to evaluate for each row/cell. | +Entonces, el método *Color* contendría: +```4d + //método Color + ... + If(This.ID>5) + Form.meta.stroke:="purple" + Form.meta.cell:=Form.colStyle //reutilizar el mismo objeto para mejorar el rendimiento + ... +``` +> Ver también el comando [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). + + + +#### Gramática JSON -#### Objects Supported +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ------------------------------------------------ | +| metaSource | cadena | Object expression to evaluate for each row/cell. | + +#### Objetos soportados [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.

      +Esta propiedad permite la posibilidad de utilizar estilos específicos en el área seleccionada. Cuando esta opción está marcada, 4D interpreta todas las etiquetas \ HTML presentes en el área.

      -

      - By default, this option is not enabled. +

      + Por defecto, esta opción no está activada.

      -

      - JSON Grammar + + +

      + Gramática JSON

      - +
      @@ -392,7 +413,7 @@ This property enables the possibility of using specific styles in the selected a
      - Name + Nombre - Data Type + Tipos de datos - Possible Values + Valores posibles
      - boolean + booleano @@ -401,32 +422,38 @@ This property enables the possibility of using specific styles in the selected a
      -

      - Objects Supported +

      + Objetos soportados

      -

      +

      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: +

      + Modifica la orientación (rotación) de un área de texto. Las áreas de texto pueden girarse en incrementos de 90°. Cada valor de orientación se aplica manteniendo el mismo punto de partida inferior izquierdo para el objeto:

      - +
      @@ -471,26 +498,29 @@ This property enables the possibility of using specific styles in the selected a
      Orientation value - Result + Resultado
      -

      - 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. +

      + Además de áreas de texto estáticas, los objetos de texto de las áreas de entrada pueden girar cuando no soneditables. Cuando se aplica una propiedad de rotación a un objeto de entrada, se elimina la propiedad editable (si la hay). Este objeto se excluye entonces del orden de entrada.

      -

      - JSON Grammar + + + +

      + Gramática JSON

      - +
      @@ -509,48 +539,51 @@ This property enables the possibility of using specific styles in the selected a
      - Name + Nombre - Data Type + Tipos de datos - Possible Values + Valores posibles
      -

      - Objects Supported +

      + Objetos soportados

      -

      - Input (non-enterable) - Text Area +

      + Entrada (no editable) - Ãrea de texto

      -
      -

      - Row Font Color Array + + + +
      +

      + Array colores de fuente

      -

      - Array type list boxes +

      + List box de tipo array

      -

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

      + Permite definir un color de fuente personalizado para cada línea del list box o celda de la columna.

      -

      - 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. +

      + Se debe utilizar el nombre de un array Entero largo. 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 +

      + Gramática JSON

      - +
      @@ -560,7 +593,7 @@ This property enables the possibility of using specific styles in the selected a
      - Name + Nombre - Data Type + Tipos de datos - Possible Values + Valores posibles
      - string + cadena @@ -569,48 +602,52 @@ This property enables the possibility of using specific styles in the selected a
      -

      - Objects Supported +

      + Objetos soportados

      -

      +

      List Box - List Box Column

      -
      -

      - Row Style Array + + + +
      +

      + Array de estilos

      -

      - Array type list boxes +

      + List box de tipo array

      -

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

      + Permite definir un estilo de fuente personalizado para cada línea del list box o cada celda de la columna.

      -

      - 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. +

      + Se debe utilizar el nombre de un array Entero largo. 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 llenar el array (utilizando un método), utilice las constantes del tema Estilos de fuente. Se pueden añadir constantes para combinar estilos. Si desea que la celda herede el estilo definido en el nivel superior, pase el valor -255 al elemento del array correspondiente.

      -

      - JSON Grammar + +

      + Gramática JSON

      - +
      @@ -620,7 +657,7 @@ This property enables the possibility of using specific styles in the selected a
      - Name + Nombre - Data Type + Tipos de datos - Possible Values + Valores posibles
      - string + cadena @@ -629,62 +666,63 @@ This property enables the possibility of using specific styles in the selected a
      -

      - Objects Supported +

      + Objetos soportados

      -

      - List Box - List Box Column +

      + List Box - Columna List Box

      -
      -

      + +
      +

      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. +

      + Esta propiedad sólo está disponible para un área de entrada Multi-estilo. Cuando esta propiedad está activada, el área almacenará las etiquetas de estilo con el texto, incluso si no se ha realizado ninguna modificación. En este caso, las etiquetas corresponden al estilo por defecto. Cuando esta propiedad está desactivada, sólo se almacenan las etiquetas de estilo modificadas.

      -

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

      + Por ejemplo, este es un texto que incluye una modificación de estilo:

      -

      +

      -

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

      + Cuando la propiedad está desactivada, el área sólo almacena la modificación. Por lo tanto, los contenidos almacenados son:

      -
      What a <SPAN STYLE="font-size:13.5pt">beautiful</SPAN> day!
      +
      ¡Qué <SPAN STYLE="font-size:13.5pt">hermoso</SPAN> día!
       
      -

      - 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: +

      + Cuando la propiedad está activa, el área almacena toda la información de formato. La primera etiqueta genérica describe el estilo por defecto y luego cada variación es objeto de un par de etiquetas anidadas. Por lo tanto, los contenidos almacenados en el área son:

      -
      <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>
      +
      <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">¡Qué <SPAN STYLE="font-size:13.5pt">hermoso</SPAN> día!</SPAN>
       
      -

      - JSON Grammar +

      + Gramática JSON

      - +
      @@ -694,7 +732,7 @@ This property enables the possibility of using specific styles in the selected a
      - Name + Nombre - Data Type + Tipos de datos - Possible Values + Valores posibles
      - boolean + booleano @@ -703,10 +741,31 @@ This property enables the possibility of using specific styles in the selected a
      -

      - Objects Supported +

      + Objetos soportados

      -

      - Input -

      \ No newline at end of file +

      + Entrada +

      + + + + + + + + + + + + + + + + + + + + + diff --git a/website/translated_docs/es/FormObjects/properties_TextAndPicture.md b/website/translated_docs/es/FormObjects/properties_TextAndPicture.md index e02ae54e7246cf..09e295a84178e1 100644 --- a/website/translated_docs/es/FormObjects/properties_TextAndPicture.md +++ b/website/translated_docs/es/FormObjects/properties_TextAndPicture.md @@ -1,109 +1,115 @@ --- id: propertiesTextAndPicture -title: Text and Picture +title: Texto e Imagen --- -* * * - -## Background pathname +--- +## Ruta de acceso fondo 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. The pathname to enter is similar as for the [Pathname property for static pictures](properties_Picture.md#pathname). -#### JSON Grammar +#### Gramática JSON -| 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. | +| Nombre | Tipos de datos | Valores posibles | +| ----------------------- | -------------- | ------------------------------------------------------------------------------------------------------------ | +| customBackgroundPicture | cadena | Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. | -#### Objects Supported +#### Objetos soportados [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" | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:------:|:--------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| style | texto | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | -#### Objects Supported +#### Objetos soportados [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 | Ejemplo | | -------------------- | --------------------------------------------------------- | | 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. +#### Gramática JSON -> This property works in conjunction with the [Vertical Margin](#vertical-margin) property. +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | -------------------------------------- | +| customBorderX | number | For use with "custom" style. Mínimo: 0 | -#### JSON Grammar +#### Objetos soportados -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------------------------------- | -| customBorderX | number | For use with "custom" style. Minimum: 0 | +[Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -#### Objects Supported -[Custom Button](button_overview.md#custom) - [Custom Check Box](checkbox_overview.md#custom) - [Custom Radio Button](radio_overview.md#custom) -* * * +--- ## Icon Location Designates the placement of an icon in relation to the form object. -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------------- | --------- | ----------------------- | -| iconPlacement | string | "none", "left", "right" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ----------------------- | +| iconPlacement | cadena | "none", "left", "right" | -#### Objects Supported +#### Objetos soportados [List Box Header](listbox_overview.md#list-box-headers) -* * * -## Icon Offset + + + +--- +## Desplazamiento icono Sets a custom offset value in pixels, which will be used when the button is clicked The title of the button will be shifted to the right and toward the bottom for the number of pixels entered. This allows applying a customized 3D effect when the button is clicked. -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ------------ | --------- | --------------- | -| customOffset | number | minimum: 0 | +| Nombre | Tipos de datos | Valores posibles | +| ------------ | -------------- | ---------------- | +| customOffset | number | mínimo: 0 | - -#### Objects Supported +#### Objetos soportados [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 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ---------- | -------------- | ---------------- | +| iconFrames | number | minimum: 1 | -#### Objects Supported +#### Objetos soportados [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. @@ -140,47 +148,48 @@ The pathname to enter is similar as for the [Pathname property for static pictur > When used as icon for active objects, the picture must be designed to support a variable [number of states](#number-of-states). -#### JSON Grammar +#### Gramática JSON -| Name | Data Type | Possible Values | -| ---- | --------- | -------------------------------------------- | -| icon | picture | Relative or filesystem path in POSIX syntax. | +| Nombre | Tipos de datos | Valores posibles | +| ------ | -------------- | -------------------------------------------- | +| icon | imagen | Relative or filesystem path in POSIX syntax. | - -#### Objects Supported +#### Objetos soportados [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 | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | -| **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) | +| Option | Descripción | Ejemplo | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | +| **Izquierda** | 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) | +| **Arriba** | The text is placed above the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_top.png) | +| **Derecha** | 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) | +| **Abajo** | 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) | +#### Gramática JSON -#### JSON Grammar +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | ------------------------------------------ | +| textPlacement | cadena | "left", "top", "right", "bottom", "center" | -| Name | Data Type | Possible Values | -| ------------- | --------- | ------------------------------------------ | -| textPlacement | string | "left", "top", "right", "bottom", "center" | +#### Objetos soportados +[Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) -#### 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. @@ -189,19 +198,20 @@ This parameter is useful, for example, when the background picture contains bord > This property works in conjunction with the [Horizontal Margin](#horizontal-margin) property. -#### JSON Grammar - -| Name | Data Type | Possible Values | -| ------------- | --------- | --------------------------------------- | -| customBorderY | number | For use with "custom" style. Minimum: 0 | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| ------------- | -------------- | -------------------------------------- | +| customBorderY | number | For use with "custom" style. Mínimo: 0 | -#### Objects Supported +#### Objetos soportados [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. + + +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +|:-------------- | -------------- | ---------------------------------------------------------------------------------------------------- | +| popupPlacement | cadena |
    • "none"
    • "linked"
    • "separated" | + + +#### Objetos soportados + +[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) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/properties_WebArea.md b/website/translated_docs/es/FormObjects/properties_WebArea.md index 8f42001da5981d..1e2e26ee72589b 100644 --- a/website/translated_docs/es/FormObjects/properties_WebArea.md +++ b/website/translated_docs/es/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,90 +12,89 @@ 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" | +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| -------------------- | -------------- | ----------------------- | +| methodsAccessibility | cadena | "none" (default), "all" | -#### Objects Supported +#### Objetos soportados -[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 +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| -------------- | -------------- | -------------------------- | +| progressSource | cadena | Name of a Longint variable | -| Name | Data Type | Possible Values | -| -------------- | --------- | -------------------------- | -| progressSource | string | Name of a Longint variable | +#### Objetos soportados +[Ãrea Web](webArea_overview.md) -#### Objects Supported -[Web Area](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. - When the Web area is not displayed in the form (when it is located on another page of the form), executing the [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command has no effect, whereas assigning a value to the URL variable can be used to update the current URL. -#### JSON Grammar +#### Gramática JSON + +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | ---------------- | +| urlSource | cadena | A URL. | + +#### Objetos soportados -| Name | Data Type | Possible Values | -| --------- | --------- | --------------- | -| urlSource | string | A URL. | +[Ãrea Web](webArea_overview.md) -#### Objects Supported -[Web Area](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 WebKit ones. +* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google (CEF). 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. + +The Blink engine has the following limitations: -#### JSON Grammar +- [WA SET PAGE CONTENT](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PAGE-CONTENT.301-5232965.en.html):utilizar este comando requiere que al menos una página ya esté cargada en el área (a través de una llamada a [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) o una asignación a la variable URL asociada al área). +- Cuando se activa soltar URLs mediante el selector `WA enable URL drop` del comando [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.en.html), la primera soltada debe ir precedida de al menos una llamada a [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.en.html) o una asignación a la variable URL asociada al área. -| Name | Data Type | Possible Values | -| --------- | --------- | -------------------- | -| webEngine | string | "embedded", "system" | +#### Gramática JSON +| Nombre | Tipos de datos | Valores posibles | +| --------- | -------------- | -------------------- | +| webEngine | cadena | "embedded", "system" | -#### Objects Supported +#### Objetos soportados -[Web Area](webArea_overview.md) \ No newline at end of file +[Ãrea Web](webArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/radio_overview.md b/website/translated_docs/es/FormObjects/radio_overview.md index eeb1f0619f8a23..965fd1b7dcdfcf 100644 --- a/website/translated_docs/es/FormObjects/radio_overview.md +++ b/website/translated_docs/es/FormObjects/radio_overview.md @@ -1,10 +1,8 @@ --- id: radiobuttonOverview -title: Radio Button +title: Botón radio --- -## Overview - Radio buttons are objects that allow the user to select one of a group of buttons. Usually, a radio button shows a small bullseye with text. However, radio buttons can have [various appearances](#button-styles). @@ -12,11 +10,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 + + +## Configuración de botones 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 +24,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 + + + +## Estilos de botón 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ásico 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 +46,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,85 +55,100 @@ 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 herramientas 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: +By default, the Toolbar style has a transparent background with a label in the center. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *Windows* - the button is highlighted. + - *Windows* - el botón está resaltado. ![](assets/en/FormObjects/radio_toolbar.png) -- *macOS* - the highlight of the button never appears. + - *macOS* - el resalte del botón nunca aparece. + + ### 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: +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. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: + + - *Windows* - el botón está resaltado. -- *Windows* - the button is highlighted. - - ![](assets/en/FormObjects/radio_bevel.png) + ![](assets/en/FormObjects/radio_bevel.png) -- *macOS* - the highlight of the button never appears. + - *macOS* - el resalte del botón nunca aparece. -### Rounded Bevel + +### Bevel redondeado 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* - las esquinas del botón están redondeadas. ![](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* - el botón se muestra como un botón de dos tonos. + -- *macOS* - the button is displayed as a two-tone system button. -### OS X Textured +### OS X Texturizado The OS X Textured radio button style is nearly identical to the [Toolbar](#toolbar) style except, depending on the OS, it may have a different appearance and does not display hover. 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* - - un botón sistema estándar que muestra un cambio de color de gris claro a gris oscuro. Su altura está predefinida: no es posible ampliarla o reducirla. + + ![](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. +The Office XP button style combines the appearance of the [Regular](#regular) style (standard system button) 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: +The colors (highlight and background) of a button with the Office XP style are based on the system colors. La apariencia del botón puede ser diferente cuando el cursor pasa por encima de él dependiendo del sistema operativo: -- *Windows* - its background only appears when the mouse rolls over it. - - ![](assets/en/FormObjects/radio_xp.png) + - *Windows* - su fondo sólo aparece cuando el ratón pasa por encima. -- *macOS* - its background is always displayed. + ![](assets/en/FormObjects/radio_xp.png) -### Collapse / Expand + - *macOS* - su fondo se muestra siempre. + + + +### Contraer/Desplegar 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. ![](assets/en/FormObjects/checkbox_collapse.png) -### Disclosure Button + + +### Botón de divulgación 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 + +## Propiedades soportadas All radio buttons share the same set of basic properties: @@ -138,5 +156,5 @@ All radio buttons share the same set of basic properties: 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 +- [Ruta de acceso fondo](properties_TextAndPicture.md#backgroundPathname) - [Margen horizontal](properties_TextAndPicture.md#horizontalMargin) - [Desplazamiento icono](properties_TextAndPicture.md#icon-offset) - [Margen vertical](properties_TextAndPicture.md#verticalMargin) (Personalizado) +- [Número de estados](properties_TextAndPicture.md#number-of-states) - [Ruta de acceso imagen](properties_TextAndPicture.md#picture-pathname) - [Posición Título/Imagen](properties_TextAndPicture.md#title-picture-position) (Botón barra de herramientas, Bevel Redondeado, OS X Gradient, OS X Textured, Office XP, Personalizado) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/ruler.md b/website/translated_docs/es/FormObjects/ruler.md index 1797a2a42bbf8b..eedf5ec2a3569c 100644 --- a/website/translated_docs/es/FormObjects/ruler.md +++ b/website/translated_docs/es/FormObjects/ruler.md @@ -1,9 +1,8 @@ --- id: ruler -title: Ruler +title: Regla --- -## Overview The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. @@ -13,11 +12,11 @@ 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 +### Propiedades soportadas [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 +## Ver también -- [progress indicators](progressIndicator.md) +- [progress indicators](progressIndicator.md) - [steppers](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/es/FormObjects/shapes_overview.md b/website/translated_docs/es/FormObjects/shapes_overview.md index 24e9eb932b8426..b57c44b8f0bd20 100644 --- a/website/translated_docs/es/FormObjects/shapes_overview.md +++ b/website/translated_docs/es/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,6 +11,7 @@ Shapes are [static objects](formObjects_overview.md#active-and-static-objects) t - lines - ovals + ## Rectangle A static rectangle is a decorative object for forms. Rectangles are constrained to squared shapes. @@ -19,7 +20,7 @@ The design of rectangles is controlled through many properties (color, line thic ![](assets/en/FormObjects/shapes_rectangle2.png) -#### JSON Example: +#### Ejemplo JSON: ```4d "myRectangle": { @@ -32,8 +33,8 @@ The design of rectangles is controlled through many properties (color, line thic } ``` -#### Supported Properties +#### Propiedades soportadas [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 @@ -42,42 +43,46 @@ A static line is a decorative object for forms, drawn between two plots. Lines c 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 - } - +#### 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 - } - +``` + "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) -#### Supported Properties + +#### Propiedades soportadas [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 @@ -86,7 +91,7 @@ A static oval is a decorative object for forms. Oval objects can be used to draw ![](assets/en/FormObjects/shape_oval.png) -#### JSON Example: +#### Ejemplo JSON: ```4d "myOval": { @@ -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 +#### Propiedades soportadas +[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/es/FormObjects/spinner.md b/website/translated_docs/es/FormObjects/spinner.md index 0728c30c807d47..8bbcf6c95b8b77 100644 --- a/website/translated_docs/es/FormObjects/spinner.md +++ b/website/translated_docs/es/FormObjects/spinner.md @@ -3,19 +3,18 @@ id: spinner title: Spinner --- -## Overview - The spinner is a circular indicator that displays a continuous animation, like the [Barber shop](progressIndicator.md#barber-shop). ![](assets/en/FormObjects/spinner.gif) You use this type of object to indicate that an operation such as establishing a network connection or a performing a calculation is underway. When this indicator is selected, [graphical Scale properties](properties_Scale.md) are not available. -When the form is executed, the object is not animated. You manage the animation by passing a value to its [associated variable or expression](properties_Object.md#variable-or-expression): +Cuando se ejecuta el formulario, el objeto no se anima. La animación se gestiona pasando un valor a su [variable o expresión asociada](properties_Object.md#variable-or-expression): -* 1 (or any value other than 0) = Start animation, +* 1 (o cualquier valor diferente de 0) = Iniciar la animación, * 0 = Stop animation -### Supported Properties +### Propiedades soportadas -[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/es/FormObjects/splitters.md b/website/translated_docs/es/FormObjects/splitters.md index 23576af6111939..0e14b653907539 100644 --- a/website/translated_docs/es/FormObjects/splitters.md +++ b/website/translated_docs/es/FormObjects/splitters.md @@ -1,26 +1,27 @@ --- id: splitters -title: Splitter +title: Separador --- -## Overview -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. The splitter takes into account each object’s resizing properties, which means that you can completely customize your application's interface. 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). -#### JSON Example: +#### Ejemplo JSON: ```4d "mySplitter": { @@ -33,33 +34,33 @@ 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) +### Propiedades soportadas + +[Border Line Style](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [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) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [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) -## Interaction with the properties of neighboring objects +## Interacción con las propiedades de los objetos vecinos 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) | -| Resize | Keep original position(s), but are resized according to the splitter’s new position | | | +| Ninguno | 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) | +| Redimensionamiento | Keep original position(s), but are resized according to the splitter’s new position | | | | Move | 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 +## Gestión programada de los 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/es/FormObjects/staticPicture.md b/website/translated_docs/es/FormObjects/staticPicture.md index 804a3ecb072846..fb42d6d42a4e8a 100644 --- a/website/translated_docs/es/FormObjects/staticPicture.md +++ b/website/translated_docs/es/FormObjects/staticPicture.md @@ -1,27 +1,30 @@ --- id: staticPicture -title: Static picture +title: Imagen estática --- -## Overview 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. Either way, your application will run faster than if the picture was pasted into each page. + -## Format and location + +## Formato y ubicación 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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 +## Propiedades soportadas + +[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/es/FormObjects/stepper.md b/website/translated_docs/es/FormObjects/stepper.md index 513b62ce72a9bc..b5af797e97e61b 100644 --- a/website/translated_docs/es/FormObjects/stepper.md +++ b/website/translated_docs/es/FormObjects/stepper.md @@ -3,33 +3,35 @@ id: stepper title: Stepper --- -## Overview - 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 +## Utilización del stepper 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: + * [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 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 more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. -## Supported Properties +## Propiedades soportadas +[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) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [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) + + +## Ver también +- [progress indicators](progressIndicator.md) +- [reglas](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/es/FormObjects/subform_overview.md b/website/translated_docs/es/FormObjects/subform_overview.md index cda348e632890a..73b8606055c8a1 100644 --- a/website/translated_docs/es/FormObjects/subform_overview.md +++ b/website/translated_docs/es/FormObjects/subform_overview.md @@ -1,22 +1,23 @@ --- id: subformOverview -title: Subform +title: Subformulario --- -## Overview A subform is a form included in another form. -### Terminology + +## Terminología 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 +31,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 +40,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 +### Gestión de la variable 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 +51,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 +76,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 +### Utilizar el objeto asociado al subformulario 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. @@ -102,8 +103,7 @@ You can modify the labels from the subform by assigning values to the *InvoiceAd ![](assets/en/FormObjects/subforms5.png) -### Advanced inter-form programming - +### Programación entre formularios avanzada 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 +112,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,7 +133,6 @@ 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. This mechanism is illustrated in the following diagram: @@ -143,9 +142,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 + +## Propiedades soportadas + +[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/es/FormObjects/tabControl.md b/website/translated_docs/es/FormObjects/tabControl.md index 1ed8a61031346c..3c8160613877a9 100644 --- a/website/translated_docs/es/FormObjects/tabControl.md +++ b/website/translated_docs/es/FormObjects/tabControl.md @@ -1,6 +1,6 @@ --- id: tabControl -title: Tab Controls +title: Pestañas --- A tab control creates an object that lets the user choose among a set of virtual screens that are enclosed by the tab control object. Each screen is accessed by clicking its tab. @@ -11,7 +11,7 @@ The following multi-page form uses a tab control object: To navigate from screen to screen, the user simply clicks the desired tab. -The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command or the `gotoPage` standard action would be used when a user clicks a tab. +The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [`FORM GOTO` PAGE](https://doc.4d.com/4dv19/help/command/en/page247.html) command or the `gotoPage` standard action would be used when a user clicks a tab. Another use of the tab control is to control the data that is displayed in a subform. For example, a Rolodex could be implemented using a tab control. The tabs would display the letters of the alphabet and the tab control’s action would be to load the data corresponding to the letter that the user clicked. @@ -25,7 +25,8 @@ 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: + +### Ejemplo JSON: ```4d "myTab": { @@ -38,12 +39,44 @@ 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: +To supply the labels for a tab control, you can use: + +- un objeto +- a choice list +- an array + +### Using an object + +You can assign an [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) as the [data source](properties_Object.md#variable-or-expression) of the tab control. The object must contain the following properties: + +| Propiedad | Tipo | Descripción | +| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Colección | Mandatory - Collection of scalar values. Only string values are supported. If invalid, empty or not defined, the tab control is empty | +| `index` | number | Index of the currently tab control page (value between 0 and `collection.length-1`) | +| `currentValue` | Texto | Currently selected value | + +The initialization code must be executed before the form is presented to the user. + +In the following example, `Form.tabControl` has been defined as tab control [expression](properties_Object.md#variable-or-expression). You can associate the [`gotoPage` standard action](#goto-page-action) to the form object: -* 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 +Form.tabControl:=New object +Form.tabControl.values:=New collection("Page 1"; "Page 2"; "Page 3") +Form.tabControl.index:=2 //start on page 3 +``` + + +### Utilizar una lista de selección + +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 to a json list ("$ref"). Icons associated with list items in the Lists editor will be displayed in the tab control. + +### Using a Text array + +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,20 +84,20 @@ 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 [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command to load the values into the array. -> 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 +## Goto page features ### FORM GOTO PAGE command -You can use the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command in the tab control’s method: +You can use the [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/en/page247.html) command in the tab control’s method: ```4d FORM GOTO PAGE(arrPages) ``` -The command is executed when the `On Clicked` event occurs. You should then clear the array when the `On Unload` event occurs. +The command is executed when the [`On Clicked`](Events/onClicked.md) event occurs. You should then clear the array when the [`On Unload`](Events/onUnload.md) event occurs. Here is an example object method: @@ -85,6 +118,8 @@ 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) - [Save value](properties_Object.md#save-value) - [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 + +## Propiedades soportadas + +[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) - [Save value](properties_Object.md#save-value) - [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/website/translated_docs/es/FormObjects/text.md b/website/translated_docs/es/FormObjects/text.md index e9c3948f217aeb..d6e32f1767e51e 100644 --- a/website/translated_docs/es/FormObjects/text.md +++ b/website/translated_docs/es/FormObjects/text.md @@ -1,13 +1,12 @@ --- -id: text -title: Text +id: texto +title: Texto --- -## Overview 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). -#### JSON Example: +#### Ejemplo JSON: ```4d "myText": { @@ -23,7 +22,8 @@ A text object allows you to display static written content (*e.g.*, instructions } ``` -## Rotation + +## Rotación 4D lets you rotate text areas in your forms using the [Orientation](properties_Text.md#orientation) property. @@ -39,6 +39,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 +## Propiedades soportadas +[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) - [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) - [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) diff --git a/website/translated_docs/es/FormObjects/viewProArea_overview.md b/website/translated_docs/es/FormObjects/viewProArea_overview.md index 187a82350f9e7f..d197df08281ccb 100644 --- a/website/translated_docs/es/FormObjects/viewProArea_overview.md +++ b/website/translated_docs/es/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 +## Propiedades soportadas + +[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/es/FormObjects/webArea_overview.md b/website/translated_docs/es/FormObjects/webArea_overview.md index ce5e9a097117ba..9e16e44aa75203 100644 --- a/website/translated_docs/es/FormObjects/webArea_overview.md +++ b/website/translated_docs/es/FormObjects/webArea_overview.md @@ -1,26 +1,24 @@ --- id: webAreaOverview -title: Web Area +title: Ãrea Web --- -## Overview 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). 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). 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. - > 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 + +## Propiedades 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. +- [`Progression`](properties_WebArea.md#progression) -- to control the loading percentage of the page displayed in the web area. ### Web rendering engine @@ -32,18 +30,18 @@ Selecting the embedded web rendering engine allows you to call 4D methods from t When the [Access 4D methods](properties_WebArea.md#access-4d-methods) property is selected, you can call 4D methods from a web area. -> This property is only available if the web area [uses the embedded web rendering engine](#use-embedded-web-rendering-engine). +> This property is only available if the web area [uses the embedded web rendering engine](properties_WebArea.md#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. + +The [4D embedded web rendering engine](properties_WebArea.md#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. For example, to call the `HelloWorld` 4D method, you just execute the following statement: ```codeJS $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 +49,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,7 +57,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 +#### Ejemplo 1 Given a 4D project method named `today` that does not receive parameters and returns the current date as a string. @@ -98,7 +95,7 @@ $4d.today(function(dollarZero) ``` -#### Example 2 +#### Ejemplo 2 The 4D project method `calcSum` receives parameters (`$1...$n`) and returns their sum in `$0`: @@ -123,30 +120,33 @@ $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). +## Acciones estándar -## Form events +Four specific standard actions are available for managing web areas automatically: `Open Back URL`, `Open Forward 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). + + +## Eventos formulario Specific form events are intended for programmed management of web areas, more particularly concerning the activation of links: -- `On Begin URL Loading` -- `On URL Resource Loading` -- `On End URL Loading` -- `On URL Loading Error` -- `On URL Filtering` -- `On Open External Link` -- `On Window Opening Denied` +- [`On Begin URL Loading`](Events/onBeginUrlLoading.md) +- [`On URL Resource Loading`](Events/onUrlResourceLoading.md) +- [`On End URL Loading`](Events/onEndUrlLoading.md) +- [`On URL Loading Error`](Events/onUrlLoadingError.md) +- [`On URL Filtering`](Events/onUrlFiltering.md) +- [`On Open External Link`](Events/onOpenExternalLink.md) +- [`On Window Opening Denied`](Events/onWindowOpeningDenied.md) In addition, web areas support the following generic form events: -- `On Load` -- `On Unload` -- `On Getting Focus` -- `On Losing Focus` +- [`On Load`](Events/onLoad.md) +- [`On Unload`](Events/onUnload.md) +- [`On Getting Focus`](Events/onGettingFocus.md) +- [`On Losing Focus`](Events/onLosingFocus.md) + -## Web area rules +## Reglas de las áreas web ### User interface @@ -165,18 +165,15 @@ For reasons related to window redrawing mechanisms, the insertion of a web area > Superimposing a web area on top of or beneath other form objects is not supported. + ### Web Area and Web server conflict (Windows) In 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 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. - ### Insertion of protocol (macOS) - The URLs handled by programming in web areas in 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 in your forms or in offscreen web areas. The web inspector is a debugger which is provided by the embedded Web engine. It allows parsing the code and the flow of information of the web pages. @@ -185,12 +182,9 @@ You can view and use a web inspector within web areas in your forms or in offscr To display the web inspector, you can either execute the `WA OPEN WEB INSPECTOR` command, or use the context menu of the web area. -- **Execute the `WA OPEN WEB INSPECTOR` command** - This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). +- **Execute the `WA OPEN WEB INSPECTOR` command**
      This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). -- **Use the web area context menu** - This feature can only be used with onscreen web areas and requires that the following conditions are met: - +- **Use the web area context menu**
      This feature can only be used with onscreen web areas and requires that the following conditions are met: - the embedded web rendering engine is selected for the area - the [context menu](properties_Entry.md#context-menu) for the web area is enabled - the use of the inspector is expressly enabled in the area by means of the following statement: @@ -207,6 +201,14 @@ When you have done the settings as described above, you then have new options su > 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 + + +## Propiedades soportadas + +[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/es/FormObjects/writeProArea_overview.md b/website/translated_docs/es/FormObjects/writeProArea_overview.md index 3438484a3ff6a2..e02b408398a871 100644 --- a/website/translated_docs/es/FormObjects/writeProArea_overview.md +++ b/website/translated_docs/es/FormObjects/writeProArea_overview.md @@ -1,16 +1,19 @@ --- id: writeProAreaOverview -title: 4D Write Pro area +title: Ãrea 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 offers 4D users an advanced word-processing tool, fully integrated with your 4D application. 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 +## Propiedades soportadas + +[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) - [Draggable](properties_Action.md#draggable) - [Droppable](properties_Action.md#droppable) - [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 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) - [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) -[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 diff --git a/website/translated_docs/es/GettingStarted/Installation.md b/website/translated_docs/es/GettingStarted/Installation.md new file mode 100644 index 00000000000000..d3f41e9d7ca14e --- /dev/null +++ b/website/translated_docs/es/GettingStarted/Installation.md @@ -0,0 +1,48 @@ +--- +id: installation +title: Instalación +--- + +Welcome to 4D! On this page, you will find all of the necessary information about installing and launching your 4D product. + + +## Required configuration + +The [Product Download](https://us.4d.com/product-download) page on the 4D website provides information about the minimum macOS / Windows system requirements for your 4D series. + +Additional technical details are available on the 4D website's [Resources page](https://us.4d.com/resources/feature-release). + + +## Installation on disk + +4D products are installed from the 4D website: + +1. Connect to the 4D website and go to the [Downloads](https://us.4d.com/product-download) page. + +2. Click on the download link for your 4D product and follow the on-screen instructions. + + +## Sign in + +Once you have completed the installation, you can start 4D and sign in. To do so, double-click on the 4D product icon. + +![](assets/en/getStart/logo4d.png) + +The Welcome Wizard then appears: + +![](assets/en/getStart/welcome2.png) + +- If you want to discover and explore 4D, click on the **free trial** link. You will only be asked to sign in or to create a 4D account. + +- If you already have a 4D account, click on the **Sign in** link in the upper right side of the Welcome Wizard dialog and enter your account information. Any already registered 4D licenses are automatically updated (or additional expansion packs loaded) on your machine. + +Expand the **Open or create project application** area and select the action you want to perform: + +- **Connect to 4D Server** - use 4D as a remote client and connect to an application that is already loaded by 4D Server. + +- **Open a local application project** - load an existing application project stored on your disk. + +- **Create a new application project** - create a new, empty application project on your disk. + +Enjoy your 4D experience! + diff --git a/website/translated_docs/es/MSC/analysis.md b/website/translated_docs/es/MSC/analysis.md index 842986803d7551..d37ffebafd588b 100644 --- a/website/translated_docs/es/MSC/analysis.md +++ b/website/translated_docs/es/MSC/analysis.md @@ -1,11 +1,10 @@ --- id: 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 --- -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. This function is useful for parsing the use of an application or detecting the operation(s) that caused errors or malfunctions. In the case of an application 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). ![](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. @@ -29,16 +27,17 @@ This information allows you to identify the source and context of each operation - Validation of Transaction: Transaction validated. - Cancellation of Transaction: Transaction cancelled. - Update context: Change in extra data (e.g. a call to `CHANGE CURRENT USER` or `SET USER ALIAS`). -- **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. - **System User**: System 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 session name of the user is displayed. -- **4D User**: 4D user name of the user that performed the operation. If an alias is defined for the user, the alias is displayed instead of the 4D user name. +- **4D User**: 4D user name of the user that performed the operation. If an alias is defined for the user, the alias is displayed instead of the 4D user name. - **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 +Click on **Analyze** to update the contents of the current log file of the selected application (named by default dataname.journal). The Browse button can be used to select and open another log file for the application. The **Export...** button can be used to export the contents of the file as text. + diff --git a/website/translated_docs/es/MSC/backup.md b/website/translated_docs/es/MSC/backup.md index 908bbd3f3460c6..2376b476cef6e2 100644 --- a/website/translated_docs/es/MSC/backup.md +++ b/website/translated_docs/es/MSC/backup.md @@ -1,7 +1,7 @@ --- id: backup -title: Backup Page -sidebar_label: Backup Page +title: Página de respaldo +sidebar_label: Página de respaldo --- You can use the Backup page to view some backup parameters of the database and to launch a manual backup: @@ -10,8 +10,8 @@ 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. +- **Backup File Destination**: displays information about the location of the application 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 application. - **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. diff --git a/website/translated_docs/es/MSC/compact.md b/website/translated_docs/es/MSC/compact.md index 890fa636d3671e..759ab69b7305bc 100644 --- a/website/translated_docs/es/MSC/compact.md +++ b/website/translated_docs/es/MSC/compact.md @@ -1,7 +1,7 @@ --- id: compact -title: Compact Page -sidebar_label: Compact Page +title: Página compactado +sidebar_label: Página compactado --- You use this page to access the data file compacting functions. @@ -13,35 +13,33 @@ 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. - **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. If you attempt to carry out this operation in standard mode, a warning dialog box will inform you that the application will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the application (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. ![](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. The application 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. **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: +After compacting is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". 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 avanzado 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). It will be saved automatically and a new journal file will have to be created the next time the application 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. diff --git a/website/translated_docs/es/MSC/encrypt.md b/website/translated_docs/es/MSC/encrypt.md index fcd769b8b0df16..40615ad6af74bf 100644 --- a/website/translated_docs/es/MSC/encrypt.md +++ b/website/translated_docs/es/MSC/encrypt.md @@ -1,56 +1,51 @@ --- id: encrypt -title: Encrypt Page -sidebar_label: Encrypt Page +title: Página de cifrado +sidebar_label: Página de cifrado --- -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. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section in the *Design Reference* manual. 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). 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 +> 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 application 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. +- Encrypting a data file is a lengthy operation. It displays a progress indicator (which could be interrupted by the user). Note also that an application 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. ## 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). +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. + ![](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. If the MSC was opened in standard mode, the application is reopened in maintenance mode. 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. If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the application folder beforehand. ## Encryption maintenance operations +When an application is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](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**. O +- 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. Storing this file on an external device such a USB key will facilitate the use of an encrypted application, since the user would only need to connect the device to provide the key before opening the application 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. +- when the application is encrypted for the first time, +- when the application is re-encrypted with a new passphrase. 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*". +After an encryption operation has been completed, 4D generates a file in the Logs folder of the application. It is created in XML format and named "*ApplicationName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*ApplicationName_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/es/MSC/information.md b/website/translated_docs/es/MSC/information.md index 33e8fd3ba0db72..b33ecee7af3150 100644 --- a/website/translated_docs/es/MSC/information.md +++ b/website/translated_docs/es/MSC/information.md @@ -1,28 +1,27 @@ --- id: information -title: Information Page -sidebar_label: Information Page +title: Página de información +sidebar_label: Página de información --- 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. ## 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). +The central part of the window indicates the name and location of the 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 current 4D user. - **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 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. * +- **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 MSC.* - **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) - > 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/es/MSC/overview.md b/website/translated_docs/es/MSC/overview.md index ba94365a594638..fd8f51d01a891e 100644 --- a/website/translated_docs/es/MSC/overview.md +++ b/website/translated_docs/es/MSC/overview.md @@ -1,40 +1,40 @@ --- -id: overview -title: Overview -sidebar_label: Overview +id: generalidades +title: Generalidades +sidebar_label: Generalidades --- 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. The way it is accessed also determines the way the application project is opened: in “maintenance†mode or “standard†mode. In maintenance mode, the project is not opened by 4D, only its reference is provided to the MSC. In standard mode, the project is opened by 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)). +In maintenance mode, only the MSC window is displayed (the project is not opened by the 4D application). This means that projects 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 project to be opened in maintenance mode (see [Feature availability](#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. +- **From the standard project opening dialog box** The standard Open 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 (project not open) + ![](assets/en/MSC/mscicon.png) + When you call this function, a standard Open file dialog appears so that you can select the *.4DProject* or *.4dz* file of the to be examined. The project will not be opened by 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: +In standard mode, a project 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). - -- Use the ```OPEN SECURITY CENTER``` language command. + ![](assets/en/MSC/mscicon.png) +- Use the “msc†standard action that it is possible to associate with a menu command or a form object. +- 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 +- Backup function is only available when the project 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 project 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. diff --git a/website/translated_docs/es/MSC/repair.md b/website/translated_docs/es/MSC/repair.md index 93479e5fd89eb5..3a0dbe42a1d652 100644 --- a/website/translated_docs/es/MSC/repair.md +++ b/website/translated_docs/es/MSC/repair.md @@ -1,74 +1,71 @@ --- id: repair -title: Repair Page -sidebar_label: Repair Page +title: Página Reparación +sidebar_label: Página Reparación --- -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. Generalmente, sólo utilizará estas funciones bajo la supervisión de los equipos técnicos de 4D, cuando se hayan detectado anomalías al abrir la aplicación o tras una [verificación](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. If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the application 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 - -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. 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. ### 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. It will be placed in a subfolder named “Replaced files (repairing)†in the application 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 (application folder by default). 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. If so, you can open the application immediately. ![](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**. +> If you have deselected the **Records definitively deleted** option in the properties of a table in the 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: ![](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: +After repair is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". -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/es/MSC/restore.md b/website/translated_docs/es/MSC/restore.md index 13a16ed68befb1..e83f3eeaa0bd53 100644 --- a/website/translated_docs/es/MSC/restore.md +++ b/website/translated_docs/es/MSC/restore.md @@ -1,48 +1,47 @@ --- -id: restore -title: Restore Page -sidebar_label: Restore Page +id: restaurar +title: Página Restauración +sidebar_label: Página Restauración --- -## 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: +You can manually restore an archive of the current application using the **Restore** page. This page provides several options that can be used to control the restoration: ![](assets/en/MSC/MSC_restore.png) -> 4D automatic recovery systems restore databases and include data log file when necessary. +> 4D automatic recovery systems restore applications and include data log file when necessary. -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. +The list found in the left part of the window displays any existing backups of the application. 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. +- **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. +- **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 Project folder. 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 +## Integración sucesiva de varios archivos de historial de datos -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. +The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into an application. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 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. 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 +## Restauración de una base encriptada -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. +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 application. Matching encryption keys must always be provided. 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. +- 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. The following sequence illustrates the principles of a multi-key backup/restore operation: -| Operation | Generated files | Comment | + +| Operación | Generated files | Comment | | --------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| New database | | | +| New data file | | | | Add data (record # 1) | | | | Backup database | 0000.4BL and 0001.4BK | | | Add data (record # 2) | | | @@ -59,8 +58,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/es/MSC/rollback.md b/website/translated_docs/es/MSC/rollback.md index 96bbadc248d2b9..4a5c192b329923 100644 --- a/website/translated_docs/es/MSC/rollback.md +++ b/website/translated_docs/es/MSC/rollback.md @@ -1,12 +1,12 @@ --- id: rollback -title: Rollback Page -sidebar_label: Rollback Page +title: Página Retroceso +sidebar_label: Página Retroceso --- 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. +This function is only available when the application functions with a data log file. ![](assets/en/MSC/MSC_rollback1.png) diff --git a/website/translated_docs/es/MSC/verify.md b/website/translated_docs/es/MSC/verify.md index e3601bcc1c9912..a55cae0e1de508 100644 --- a/website/translated_docs/es/MSC/verify.md +++ b/website/translated_docs/es/MSC/verify.md @@ -1,38 +1,41 @@ --- id: verify -title: Verify Page -sidebar_label: Verify Page +title: Página Verificación +sidebar_label: Página Verificación --- 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). + ## 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: +Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the application. 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: *ApplicationName*_Verify_Log_*yyyy-mm-dd hh-mm-ss*.xml where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". 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/es/Menus/bars.md b/website/translated_docs/es/Menus/bars.md index b378e78c2cb2eb..d48655f6c1a4d6 100644 --- a/website/translated_docs/es/Menus/bars.md +++ b/website/translated_docs/es/Menus/bars.md @@ -1,14 +1,16 @@ --- id: bars -title: Menu bar features +title: Barras de menús --- 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. 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,18 +18,18 @@ 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. +- 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. +> You can choose whether to display or hide this window using the **Display toolbar** option in the 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. @@ -36,4 +38,6 @@ 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/es/Menus/creating.md b/website/translated_docs/es/Menus/creating.md index fba82317ea9a60..8268a6a9cea239 100644 --- a/website/translated_docs/es/Menus/creating.md +++ b/website/translated_docs/es/Menus/creating.md @@ -1,6 +1,6 @@ --- id: creating -title: Creating menus and menu bars +title: Creación de menús y barras de menús --- You can create menus and menu bars: @@ -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. By default, when you create a new project, 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. +This allows the user to access the Application environment as soon as the project is created. 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). 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/es/Menus/overview.md b/website/translated_docs/es/Menus/overview.md index 012f35cbb12d0c..91a808fbdf350f 100644 --- a/website/translated_docs/es/Menus/overview.md +++ b/website/translated_docs/es/Menus/overview.md @@ -1,20 +1,19 @@ --- -id: overview -title: Overview +id: generalidades +title: Generalidades --- -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. +You can create menu bars and menus for your 4D applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your applications easier to use and will make them feel familiar to users. ![](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 have many separate menu bars for each application. For example, you can use one menu bar that contains menus for standard operations on the database 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: - - 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/es/Menus/properties.md b/website/translated_docs/es/Menus/properties.md index 0952503f0ed52b..c35fe74e5fff50 100644 --- a/website/translated_docs/es/Menus/properties.md +++ b/website/translated_docs/es/Menus/properties.md @@ -1,10 +1,11 @@ --- id: properties -title: Menu item properties +title: Propiedades de los menús --- You can set various properties for menu items such as action, font style, separator lines, keyboard shortcuts or icons. + ## Title 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 | Descripción | 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. If you select a picture file that is not already stored in the project resources folder, it is automatically copied in that folder. 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. \ No newline at end of file diff --git a/website/translated_docs/es/Menus/sdi.md b/website/translated_docs/es/Menus/sdi.md index 238ed0d429775c..18ae7d474c4f97 100644 --- a/website/translated_docs/es/Menus/sdi.md +++ b/website/translated_docs/es/Menus/sdi.md @@ -1,15 +1,14 @@ --- id: sdi -title: SDI mode on Windows +title: Mode SDI bajo Windows --- -## Overview 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 +## SDI mode availability The SDI mode is available in the following execution environment only: @@ -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. Check the **Use SDI mode on Windows** option in the "Interface" page of the Settings dialog box. 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 +### Menús en las ventanas 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. +- If the **Splash screen** interface option was selected in the 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. -### Automatic quit +### Salida 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/es/Notes/updates.md b/website/translated_docs/es/Notes/updates.md new file mode 100644 index 00000000000000..c2f7ad183133e1 --- /dev/null +++ b/website/translated_docs/es/Notes/updates.md @@ -0,0 +1,35 @@ +--- +id: updates +title: Actualizaciones de la documentación +--- + +The list of main updates in this documentation. For general information about new features in the 4D products, see the **release notes** on [doc.4d.com](https://doc.4d.com). + +## 4D v19 R2 + +- A [default .gitignore file](Preferences/general.md#create-gitignore-file) can be created with new projects +- New [Blob class API](API/BlobClass.md) to handle new [`4D.Blob` objects](Concepts/dt_blob.md#blob-types) +- `no-bom` support and new default end-of-line characters in [`.setText()`](API/FileClass.md#settext) + + +## 4D v19 + +- [IMAPTransporter Class](API/IMAPTransporterClass.md): new `.createBox()`, `.deleteBox()`, `.renameBox()`, `.subscribe()`, and `.unsubscribe()` functions. +- [File Class](API/FileClass.md): new `setAppInfo()` and `getAppInfo()` functions. +- New [4DEACH](Tags/tags.md#4deach-and-4dendeach) transformation tag. +- Web Server: new [SameSite session cookie](WebServer/webServerConfig.md#session-cookie-samesite) setting. +- Dark and light color scheme support for [forms](FormEditor/properties_FormProperties.md#color-scheme) and [style sheets](FormEditor/createStylesheet.md#media-queries) +- New default dark and light themes in [method editor preferences](Preferences/methods.md#theme-list). +- [Native compilation](Project/compiler.md#compiler-methods-for) for Silicon processors. +- [Variable calculation](FormObjects/properties_Object.md#variable-calculation) property is now supported by entity selection list box columns. +- New, comprehensive [CLI](Admin/cli.md) page. + + +## 4D v18 R6 + +- [Entity Selection Class](API/EntitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/IMAPTransporterClass.md), [POP3 Mail](API/POP3TransporterClass.md) and [SMTP Mail](API/SMTPTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/IMAPTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/SessionClass.md). diff --git a/website/translated_docs/es/ORDA/datastores.md b/website/translated_docs/es/ORDA/datastores.md new file mode 100644 index 00000000000000..94c64792aec8e9 --- /dev/null +++ b/website/translated_docs/es/ORDA/datastores.md @@ -0,0 +1,56 @@ +--- +id: datastores +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). \ No newline at end of file diff --git a/website/translated_docs/es/ORDA/dsMapping.md b/website/translated_docs/es/ORDA/dsMapping.md new file mode 100644 index 00000000000000..bfac552414b7e6 --- /dev/null +++ b/website/translated_docs/es/ORDA/dsMapping.md @@ -0,0 +1,257 @@ +--- +id: dsmapping +title: Data Model Objects +--- + +The ORDA technology is based upon an automatic mapping of an underlying database structure. It also provides access to data through entity and entity selection objects. As a result, ORDA exposes the whole database as a set of data model objects. + + +## Structure mapping + +When you call a datastore using the [`ds`](API/DataStoreClass.md#ds) or the [`Open datastore`](API/DataStoreClass.md#open-datastore) command, 4D automatically references tables and fields of the corresponding 4D structure as properties of the returned [datastore](#datastore) object: + +* Tables are mapped to dataclasses. +* Fields are mapped to storage attributes. +* Relations are mapped to relation attributes - relation names, defined in the Structure editor, are used as relation attribute names. + +![](assets/en/ORDA/datastoreMapping.png) + + +### General rules + +The following rules are applied for any conversions: + +* Table, field, and relation names are mapped to object property names. Make sure that such names comply with general object naming rules, as explained in the [object naming conventions](Concepts/identifiers.md) section. +* A datastore only references tables with a single primary key. The following tables are not referenced: + * Tables without a primary key + * Tables with composite primary keys. +* BLOB fields are automatically available as attributes of the [Blob object](Concepts/dt_blob.md#blob-types) type. + +> ORDA mapping does not take into account: +> - the "Invisible" option for tables or fields, - the virtual structure defined through `SET TABLE TITLES` or `SET FIELD TITLES`, - the "Manual" or "Automatic" property of relations. + + +### Rules for remote access control + +When accessing a remote datastore through the `Open datastore` command or [REST requests](REST/gettingStarted.md), only tables and fields with the **Expose as REST resource** property are available remotely. + +This option must be selected at the 4D structure level for each table and each field that you want to be exposed as dataclass and attribute in the datastore: + +![](assets/en/ORDA/ExposeDataclass.png) + + +### Data model update + +Any modifications applied at the level of the database structure invalidate the current ORDA model layer. These modifications include: + +* adding or removing a table, a field, or a relation +* renaming of a table, a field, or a relation +* changing a core property of a field (type, unique, index, autoincrement, null value support) + +When the current ORDA model layer has been invalidated, it is automatically reloaded and updated in subsequent calls of the local `ds` datastore on 4D and 4D Server. Note that existing references to ORDA objects such as entities or entity selections will continue to use the model from which they have been created, until they are regenerated. + +However, the updated ORDA model layer is not automatically available in the following contexts: + +* a remote 4D application connected to 4D Server -- the remote application must reconnect to the server. +* a remote datastore opened using `Open datastore` or through [REST calls](REST/gettingStarted.md) -- a new session must be opened. + + +## Object definition + +### Datastore + +The datastore is the interface object to a database. It builds a representation of the whole database as object. A datastore is made of a **model** and **data**: + +- The model contains and describes all the dataclasses that make up the datastore. It is independant from the underlying database itself. +- Data refers to the information that is going to be used and stored in this model. For example, names, addresses, and birthdates of employees are pieces of data that you can work with in a datastore. + +When handled through the code, the datastore is an object whose properties are all of the [dataclasses](#dataclass) which have been specifically exposed. + +4D allows you to handle the following datastores: + +- the local datastore, based on the current 4D database, returned by the `ds` command (the main datastore). +- one or more remote datastore(s) exposed as REST resources in remote 4D databases, returned by the `Open datastore` command. + +A datastore references only a single local or remote database. + +The datastore object itself cannot be copied as an object: + +```4d +$mydatastore:=OB Copy(ds) //returns null +``` + + +The datastore properties are however enumerable: + + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds;$prop) + //$prop contains the names of all the dataclasses +``` + + + +The main (default) datastore is always available through the `ds` command, but the `Open datastore` command allows referencing any remote datastore. + +### Dataclass + +A dataclass is the equivalent of a table. It is used as an object model and references all fields as attributes, including relational attributes (attributes built upon relations between dataclasses). Relational attributes can be used in queries like any other attribute. + +All dataclasses in a 4D project are available as a property of the `ds` datastore. For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each exposed table that you want to be exposed as dataclass in the datastore. + +For example, consider the following table in the 4D structure: + +![](assets/en/ORDA/companyTable.png) + +The `Company` table is automatically available as a dataclass in the `ds` datastore. You can write: + +```4d +var $compClass : cs.Company //declares a $compClass object variable of the Company class +$compClass:=ds.Company //assigns the Company dataclass reference to $compClass +``` + +A dataclass object can contain: + +* attributes +* relation attributes + +The dataclass offers an abstraction of the physical database and allows handling a conceptual data model. The dataclass is the only means to query the datastore. A query is done from a single dataclass. Queries are built around attributes and relation attribute names of the dataclasses. So the relation attributes are the means to involve several linked tables in a query. + +The dataclass object itself cannot be copied as an object: + +```4d +$mydataclass:=OB Copy(ds.Employee) //returns null +``` + +The dataclass properties are however enumerable: + +```code4d +ARRAY TEXT($prop;0) +OB GET PROPERTY NAMES(ds.Employee;$prop) +//$prop contains the names of all the dataclass attributes +``` + + +### Atributo + +Dataclass properties are attribute objects describing the underlying fields or relations. Por ejemplo: + +```4d + $nameAttribute:=ds.Company.name //reference to class attribute + $revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to `$nameAttribute` and `$revenuesAttribute` references to the name and revenues attributes of the `Company` class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [Entities](#entity). + +All eligible fields in a table are available as attributes of their parent [dataclass](#dataclass). For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each field that you want to be exposed as a dataclass attribute. + + +#### Storage and Relation attributes + +Dataclass attributes come in several kinds: storage, relatedEntity, and relatedEntities. Attributes that are scalar (*i.e.*, provide only a single value) support all the standard 4D data types (integer, text, object, etc.). + +* A **storage attribute** is equivalent to a field in the 4D database and can be indexed. Values assigned to a storage attribute are stored as part of the entity when it is saved. When a storage attribute is accessed, its value comes directly from the datastore. Storage attributes are the most basic building block of an entity and are defined by name and data type. +* A **relation attribute** provides access to other entities. Relation attributes can result in either a single entity (or no entity) or an entity selection (0 to N entities). Relation attributes are built upon "classic" relations in the relational structure to provide direct access to related entity or related entities. Relation attributes are directy available in ORDA using their names. + +For example, consider the following partial database structure and the relation properties: + +![](assets/en/ORDA/relationProperties.png) + +All storage attributes will be automatically available: + +* in the Project dataclass: "ID", "name", and "companyID" +* in the Company dataclass: "ID", "name", and "discount" + +In addition, the following relation attributes will also be automatically available: + +* in the Project dataclass: **theClient** attribute, of the "relatedEntity" kind; there is at most one Company for each Project (the client) +* in the Company dataclass: **companyProjects** attribute, of the "relatedEntities" kind; for each Company there is any number of related Projects. +> The Manual or Automatic property of a database relation has no effect in ORDA. + +All dataclass attributes are exposed as properties of the dataclass: + +![](assets/en/ORDA/dataclassProperties.png) + +Keep in mind that these objects describe attributes, but do not give access to data. Reading or writing data is done through [entity objects](entities.md#using-entity-attributes). + +#### Computed attributes + +[Computed attributes](ordaClasses.md#computed-attributes) are declared using a `get ` function in the [Entity class definition](ordaClasses.md#entity-class). Their value is not stored but evaluated each time they are accessed. They do not belong to the underlying database structure, but are built upon it and can be used as any attribute of the data model. + + +### Entity + +An entity is the equivalent of a record. It is actually an object that references a record in the database. It can be seen as an instance of a [dataclass](#dataclass), like a record of the table matching the dataclass. However, an entity also contains data correlated to the database related to the datastore. + +The purpose of the entity is to manage data (create, update, delete). When an entity reference is obtained by means of an entity selection, it also retains information about the entity selection which allows iteration through the selection. + +The entity object itself cannot be copied as an object: + +```4d + $myentity:=OB Copy(ds.Employee.get(1)) //returns null +``` + +The entity properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.get(1);$prop) + //$prop contains the names of all the entity attributes +``` + + +### Entity selection + +An entity selection is an object containing one or more reference(s) to entities belonging to the same dataclass. It is usually created as a result of a query or returned from a relation attribute. An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Ejemplo: + +```4d +var $e : cs.EmployeeSelection //declares a $e object variable of the EmployeeSelection class type +$e:=ds.Employee.all() //assigns the resulting entity selection reference to the $e variable +``` + +Entity selections can be: + +- "shareable" or "non-shareable", +- "sorted" or "unsorted". + +These points are discussed below. + +The entity selection object itself cannot be copied as an object: + +```4d + $myentitysel:=OB Copy(ds.Employee.all()) //returns null +``` + +The entity selection properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.all();$prop) + //$prop contains the names of the entity selection properties + //("length", 00", "01"...) +``` + + +#### Ordered or unordered entity selection + +For optimization reasons, by default 4D ORDA usually creates unordered entity selections, except when you use the `orderBy( )` method or use specific options. In this documentation, unless specified, "entity selection" usually refers to an "unordered entity selection". + +Ordered entity selections are created only when necessary or when specifically requested using options, i.e. in the following cases: + +* result of an `orderBy()` on a selection (of any type) or an `orderBy()` on a dataclass +* result of the `newSelection()` method with the `dk keep ordered` option + +Unordered entity selections are created in the following cases: + +* result of a standard `query()` on a selection (of any type) or a `query()` on a dataclass, +* result of the `newSelection()` method without option, +* result of any of the comparison methods, whatever the input selection types: `or()`, `and()`, `minus()`. +> The following entity selections are always **ordered**: +> +> * entity selections returned by 4D Server to a remote client +> * entity selections built upon remote datastores. + +Note that when an ordered entity selection becomes an unordered entity selection, any repeated entity references are removed. diff --git a/website/translated_docs/es/ORDA/entities.md b/website/translated_docs/es/ORDA/entities.md new file mode 100644 index 00000000000000..2620a00597175b --- /dev/null +++ b/website/translated_docs/es/ORDA/entities.md @@ -0,0 +1,495 @@ +--- +id: entities +title: Trabajar con los datos +--- + +In ORDA, you access data through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). These objects allow you to create, update, query, or sort the data of the datastore. + + +## Creating an entity + +There are two ways to create a new entity in a dataclass: + +* Since entities are references to database records, you can create entities by creating records using the "classic" 4D language and then reference them with ORDA methods such as `entity.next( )` or `entitySelection.first( )`. +* You can also create an entity using the `dataClass.new( )` method. + +Keep in mind that the entity is only created in memory. If you want to add it to the datastore, you must call the `entity.save( )` method. + +Entity attributes are directly available as properties of the entity object. For more information, please refer to [Using entity attributes](#using-entity-attributes). + +For example, we want to create a new entity in the "Employee" dataclass in the current datastore with "John" and "Dupont" assigned to the firstname and name attributes: + +```4d +var $myEntity : cs.EmployeeEntity +$myEntity:=ds.Employee.new() //Create a new object of the entity type +$myEntity.name:="Dupont" //assign 'Dupont' to the 'name' attribute +$myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute +$myEntity.save() //save the entity +``` +> An entity is defined only in the process where it was created. You cannot, for example, store a reference to an entity in an interprocess variable and use it in another process. + +## Entities and references + +An entity contains a reference to a 4D record. Different entities can reference the same 4D record. Also, since an entity can be stored in a 4D object variable, different variables can contain a reference to the same entity. + +If you execute the following code: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) //access the employee with ID 1 + $e2:=$e1 + $e1.name:="Hammer" + //both variables $e1 and $e2 share the reference to the same entity + //$e2.name contains "Hammer" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef1.png) + +Now if you execute: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) + $e2:=ds.Employee.get(1) + $e1.name:="Hammer" + //variable $e1 contains a reference to an entity + //variable $e2 contains another reference to another entity + //$e2.name contains "smith" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef2.png) + +Note however that entities refer to the same record. In all cases, if you call the `entity.save( )` method, the record will be updated (except in case of conflict, see [Entity locking](#entity-locking)). + +In fact, `$e1` and `$e2` are not the entity itself, but a reference to the entity. It means that you can pass them directly to any function or method, and it will act like a pointer, and faster than a 4D pointer. Por ejemplo: + +```4d + For each($entity;$selection) + do_Capitalize($entity) + End for each +``` + +And the method is: + +```4d + $entity:=$1 + $name:=$entity.lastname + If(Not($name=Null)) + $name:=Uppercase(Substring($name;1;1))+Lowercase(Substring($name;2)) + End if + $entity.lastname:=$name +``` + +You can handle entities like any other object in 4D and pass their references directly as [parameters](Concepts/parameters.md). +> With the entities, there is no concept of "current record" as in the classic 4D language. You can use as many entities as you need, at the same time. There is also no automatic lock on an entity (see [Entity locking](#entity-locking)). When an entity is loaded, it uses the [lazy loading](glossary.md#lazy-loading) mechanism, which means that only the needed information is loaded. Nevertheless, in client/server, the entity can be automatically loaded directly if necessary. + + +## Using entity attributes + +Entity attributes store data and map corresponding fields in the corresponding table. Entity attributes of the storage kind can be set or get as simple properties of the entity object, while entity of the **relatedEntity** or **relatedEntities** kind will return an entity or an entity selection. +> For more information on the attribute kind, please refer to the [Storage and Relation attributes](dsMapping.md#storage-and-relation-attributes) paragraph. + +For example, to set a storage attribute: + +```4d + $entity:=ds.Employee.get(1) //get employee attribute with ID 1 + $name:=$entity.lastname //get the employee name, e.g. "Smith" + $entity.lastname:="Jones" //set the employee name + $entity.save() //save the modifications +``` + +> Database Blob fields ([scalar blobs](Concepts/blob.md) are automatically converted to and from blob object attributes ([`4D.Blob`](Concepts/blob.md)) when handled through ORDA. When saving a blob object attribute, keep in mind that, unlike blob object size which is only limited by the available memory, Blob field size is limited to 2GB. + +Accessing a related attribute depends on the attribute kind. For example, with the following structure: + +![](assets/en/ORDA/entityAttributes.png) + +You can access data through the related object(s): + +```4d + $entity:=ds.Project.all().first().theClient //get the Company entity associated to the project + $EntitySel:=ds.Company.all().first().companyProjects //get the selection of projects for the company +``` + +Note that both *theClient* and *companyProjects* in the above example are primary relation attributes and represent a direct relationship between the two dataclasses. However, relation attributes can also be built upon paths through relationships at several levels, including circular references. For example, consider the following structure: + +![](assets/en/ORDA/entityAttributes2.png) + +Each employee can be a manager and can have a manager. To get the manager of the manager of an employee, you can simply write: + +```4d + $myEmp:=ds.Employee.get(50) + $manLev2:=$myEmp.manager.manager.lastname +``` + +## Assigning values to relation attributes + +In the ORDA architecture, relation attributes directly contain data related to entities: + +* An N->1 type relation attribute (**relatedEntity** kind) contains an entity +* A 1->N type relation attribute (**relatedEntities** kind) contains an entity selection + +Let's look at the following (simplified) structure: + +![](assets/en/ORDA/entityAttributes3.png) + +In this example, an entity in the "Employee" dataclass contains an object of type Entity in the "employer" attribute (or a null value). An entity in the "Company" dataclass contains an object of type EntitySelection in the "staff" attribute (or a null value). +> In ORDA, the Automatic or Manual property of relations has no effect. + +To assign a value directly to the "employer" attribute, you must pass an existing entity from the "Company" dataclass. Por ejemplo: + +```4d + $emp:=ds.Employee.new() // create an employee + $emp.lastname:="Smith" // assign a value to an attribute + $emp.employer:=ds.Company.query("name =:1";"4D")[0] //assign a company entity + $emp.save() +``` + +4D provides an additional facility for entering a relation attribute for an N entity related to a "1" entity: you pass the primary key of the "1" entity directly when assigning a value to the relation attribute. For this to work, you pass data of type Number or Text (the primary key value) to the relation attribute. 4D then automatically takes care of searching for the corresponding entity in the dataclass. Por ejemplo: + +```4d + $emp:=ds.Employee.new() + $emp.lastname:="Wesson" + $emp.employer:=2 // assign a primary key to the relation attribute + //4D looks for the company whose primary key (in this case, its ID) is 2 + //and assigns it to the employee + $emp.save() +``` + +This is particularly useful when you are importing large amounts of data from a relational database. This type of import usually contains an "ID" column, which references a primary key that you can then assign directly to a relation attribute. + +This also means that you can assign primary keys in the N entities without corresponding entities having already been created in the 1 datastore class. If you assign a primary key that does not exist in the related datastore class, it is nevertheless stored and assigned by 4D as soon as this "1" entity is created. + +You can assign or modify the value of a "1" related entity attribute from the "N" dataclass directly through the related attribute. For example, if you want to modify the name attribute of a related Company entity of an Employee entity, you can write: + +```code4d + $emp:=ds.Employee.get(2) // load the Employee entity with primary key 2 + $emp.employer.name:="4D, Inc." //modify the name attribute of the related Company + $emp.employer.save() //save the related attribute + //the related entity is updated +``` + +## Creating an entity selection + +You can create an object of type [entity selection](dsMapping.md#entity-selection) as follows: + +* Querying the entities [in a dataclass](API/DataClassClass.md#query) or in an [existing entity selection](API/EntitySelectionClass.md#query); +* Using the [`.all()`](API/DataClassClass.md#all) dataclass function to select all the entities in a dataclass; +* Using the `Create entity selection` command or the [`.newSelection()`](API/DataClassClass.md#newselection) dataclass function to create a blank entity selection; +* Using the [`.copy()`](API/EntitySelectionClass.md#copy) function to duplicate an existing entity selection; +* Using one of the various functions from the [Entity selection class](API/EntitySelectionClass.md) that returns a new entity selection, such as [`.or()`](API/EntitySelectionClass.md#or); +* Using a relation attribute of type "related entities" (see below). + +You can simultaneously create and use as many different entity selections as you want for a dataclass. Keep in mind that an entity selection only contains references to entities. Different entity selections can contain references to the same entities. + +### Shareable or alterable entity selections + +An entity selection can be **shareable** (readable by multiple processes, but not alterable after creation) or **alterable** (supports the [`.add()`](API/EntitySelectionClass.md#add) function, but only usable by the current process). + +#### Properties + +A **shareable** entity selection has the following characteristics: + +- it can be stored in a shared object or shared collection, and can be passed as parameter between several processes or workers; +- it can be stored in several shared objects or collections, or in a shared object or collection which already belongs to a group (it does not have a *locking identifier*); +- it does not allow the addition of new entities. Trying to add an entity to a shareable entity selection will trigger an error (1637 - This entity selection cannot be altered). To add an entity to a shareable entity selection, you must first transform it into a non-shareable entity selection using the [`.copy()`](API/EntitySelectionClass.md#copy) function, before calling [`.add()`](API/EntitySelectionClass.md#add). + +> Most entity selection functions (such as [`.slice()`](API/EntitySelectionClass.md#slice), [`.and()`](API/EntitySelectionClass.md#and)...) support shareable entity selections since they do not need to alter the original entity selection (they return a new one). + +An **alterable** entity selection has the following characteristics: + +- it cannot be shared between processes, nor be stored in a shared object or collection. Trying to store a non-shareable entity selection in a shared object or collection will trigger an error (-10721 - Not supported value type in a shared object or shared collection); +- it accepts the addition of new entities, i.e. it is supports the [`.add()`](API/EntitySelectionClass.md#add) function. + + +#### How are they defined? + +The **shareable** or **alterable** nature of an entity selection is defined when the entity selection is created (it cannot be modified afterwards). You can know the nature of an entity selection using the [.isAlterable()](API/EntitySelectionClass.md#isalterable) function or the `OB Is shared` command. + + +A new entity selection is **shareable** in the following cases: + +- the new entity selection results from an ORDA class function applied to a dataClass: [dataClass.all()](API/DataClassClass.md#all), [dataClass.fromCollection()](API/DataClassClass.md#fromcollection), [dataClass.query()](API/DataClassClass.md#query), +- the new entity selection is based upon a relation [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute but the entity does not belong to an entity selection. +- the new entity selection is explicitely copied as shareable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. with the `ck shared` option). + +Ejemplo: +```4d +$myComp:=ds.Company.get(2) //$myComp does not belong to an entity selection +$employees:=$myComp.employees //$employees is shareable +``` + +A new entity selection is **alterable** in the following cases: + +- the new entity selection created blank using the [dataClass.newSelection()](API/DataClassClass.md#newselection) function or `Create entity selection` command, +- the new entity selection is explicitely copied as alterable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. without the `ck shared` option). + +Ejemplo: +```4d +$toModify:=ds.Company.all().copy() //$toModify is alterable +``` + + +A new entity selection **inherits** from the original entity selection nature in the following cases: + +- the new entity selection results from one of the various ORDA class functions applied to an existing entity selection ([.query()](API/EntitySelectionClass.md#query), [.slice()](API/EntitySelectionClass.md#slice), etc.) . +- the new entity selection is based upon a relation: + - [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute and the entity belongs to an entity selection (same nature as [.getSelection()](API/EntityClass.md#getselection) entity selection), + - [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (e.g. "employees.employer") when *attributeName* is a related attribute (same nature as the entity selection), + - [.extract()](API/EntitySelectionClass.md#extract) when the resulting collection contains entity selections (same nature as the entity selection). + +Ejemplos: + +```4d +$highSal:=ds.Employee.query("salary >= :1"; 1000000) + //$highSal is shareable because of the query on dataClass +$comp:=$highSal.employer //$comp is shareable because $highSal is shareable + +$lowSal:=ds.Employee.query("salary <= :1"; 10000).copy() + //$lowSal is alterable because of the copy() +$comp2:=$lowSal.employer //$comp2 is alterable because $lowSal is alterable +``` + + +#### Sharing an entity selection between processes (example) + +You work with two entity selections that you want to pass to a worker process so that it can send mails to appropriate persons: + +```4d + +var $paid; $unpaid : cs.InvoicesSelection +//We get entity selections for paid and unpaid invoices +$paid:=ds.Invoices.query("status=:1"; "Paid") +$unpaid:=ds.Invoices.query("status=:1"; "Unpaid") + +//We pass entity selection references as parameters to the worker +CALL WORKER("mailing"; "sendMails"; $paid; $unpaid) + +``` + +The `sendMails` method: + +```4d + + #DECLARE ($paid : cs.InvoicesSelection; $unpaid : cs.InvoicesSelection) + var $invoice : cs.InvoicesEntity + + var $server; $transporter; $email; $status : Object + + //Prepare emails + $server:=New object() + $server.host:="exchange.company.com" + $server.user:="myName@company.com" + $server.password:="my!!password" + $transporter:=SMTP New transporter($server) + $email:=New object() + $email.from:="myName@company.com" + + //Loops on entity selections + For each($invoice;$paid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Payment OK for invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each + + For each($invoice;$unpaid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Please pay invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each +``` + + +### Entity selections and Storage attributes + +All storage attributes (text, number, boolean, date) are available as properties of entity selections as well as entities. When used in conjunction with an entity selection, a scalar attribute returns a collection of scalar values. Por ejemplo: + +```4d + $locals:=ds.Person.query("city = :1";"San Jose") //entity selection of people + $localEmails:=$locals.emailAddress //collection of email addresses (strings) +``` + +This code returns in *$localEmails* a collection of email addresses as strings. + +### Entity selections and Relation attributes + +In addition to the variety of ways you can query, you can also use relation attributes as properties of entity selections to return new entity selections. For example, consider the following structure: + +![](assets/en/ORDA/entitySelectionRelationAttributes.png) + +```4d + $myParts:=ds.Part.query("ID < 100") //Return parts with ID less than 100 + $myInvoices:=$myParts.invoiceItems.invoice + //All invoices with at least one line item related to a part in $myParts +``` + +The last line will return in $myInvoices an entity selection of all invoices that have at least one invoice item related to a part in the entity selection myParts. When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. When a relation attribute is used as a property of an entity selection and no entities are returned, the result is an empty entity selection, not null. + + +## Entity Locking + +You often need to manage possible conflicts that might arise when several users or processes load and attempt to modify the same entities at the same time. Record locking is a methodology used in relational databases to avoid inconsistent updates to data. The concept is to either lock a record upon read so that no other process can update it, or alternatively, to check when saving a record to verify that some other process hasn’t modified it since it was read. The former is referred to as **pessimistic record locking** and it ensures that a modified record can be written at the expense of locking records to other users. The latter is referred to as **optimistic record locking** and it trades the guarantee of write privileges to the record for the flexibility of deciding write privileges only if the record needs to be updated. In pessimistic record locking, the record is locked even if there is no need to update it. In optimistic record locking, the validity of a record’s modification is decided at update time. + +ORDA provides you with two entity locking modes: + +- an automatic "optimistic" mode, suitable for most applications, +- a "pessimistic" mode allowing you to lock entities prior to their access. + +### Automatic optimistic lock + +This automatic mechanism is based on the concept of "optimistic locking" which is particularly suited to the issues of web applications. This concept is characterized by the following operating principles: + +* All entities can always be loaded in read-write; there is no *a priori* "locking" of entities. +* Each entity has an internal locking stamp that is incremented each time it is saved. +* When a user or process tries to save an entity using the `entity.save( )` method, 4D compares the stamp value of the entity to be saved with that of the entity found in the data (in the case of a modification): + * When the values match, the entity is saved and the internal stamp value is incremented. + * When the values do not match, it means that another user has modified this entity in the meantime. The save is not performed and an error is returned. + +The following diagram illustrates optimistic locking: + +1. Two processes load the same entity.

      ![](assets/en/ORDA/optimisticLock1.png) + +2. The first process modifies the entity and validates the change. The `entity.save( )` method is called. The 4D engine automatically compares the internal stamp value of the modified entity with that of the entity stored in the data. Since they match, the entity is saved and its stamp value is incremented.

      ![](assets/en/ORDA/optimisticLock2.png) + +3. The second process also modifies the loaded entity and validates its changes. The `entity.save( )` method is called. Since the stamp value of the modified entity does not match the one of the entity stored in the data, the save is not performed and an error is returned.

      ![](assets/en/ORDA/optimisticLock3.png) + + +This can also be illustrated by the following code: + +```4d + $person1:=ds.Person.get(1) //Reference to entity + $person2:=ds.Person.get(1) //Other reference to same entity + $person1.name:="Bill" + $result:=$person1.save() //$result.success=true, change saved + $person2.name:="William" + $result:=$person2.save() //$result.success=false, change not saved +``` + +In this example, we assign to $person1 a reference to the person entity with a key of 1. Then, we assign another reference of the same entity to variable $person2. Using $person1, we change the first name of the person and save the entity. When we attempt to do the same thing with $person2, 4D checks to make sure the entity on disk is the same as when the reference in $person1 was first assigned. Since it isn't the same, it returns false in the success property and doesn’t save the second modification. + +When this situation occurs, you can, for example, reload the entity from the disk using the `entity.reload()` method so that you can try to make the modification again. The `entity.save()` method also proposes an "automerge" option to save the entity in case processes modified attributes that were not the same. + +> Record stamps are not used in **transactions** because only a single copy of a record exists in this context. Whatever the number of entities that reference a record, the same copy is modified thus `entity.save()` operations will never generate stamp errors. + +### Pessimistic lock + +You can lock and unlock entities on demand when accessing data. When an entity is getting locked by a process, it is loaded in read/write in this process but it is locked for all other processes. The entity can only be loaded in read-only mode in these processes; its values cannot be edited or saved. + +This feature is based upon two methods of the `Entity` class: + +* `entity.lock()` +* `entity.unlock()` + +For more information, please refer to the descriptions for these methods. + + +### Concurrent use of 4D classic locks and ORDA pessimistic locks + +Using both classic and ORDA commands to lock records is based upon the following principles: + +* A lock set with a classic 4D command on a record prevents ORDA to lock the entity matching the record. +* A lock set with ORDA on an entity prevents classic 4D commands to lock the record matching the entity. + +These principles are shown in the following diagram: + +![](assets/en/ORDA/concurrent1.png) + +**Transaction locks** also apply to both classic and ORDA commands. In a multiprocess or a multi-user application, a lock set within a transaction on a record by a classic command will result in preventing any other processes to lock entities related to this record (or conversely), until the transaction is validated or canceled. + +* Example with a lock set by a classic command:

      ![](assets/en/ORDA/concurrent2.png) +* Example with a lock set by an ORDA method:

      ![](assets/en/ORDA/concurrent3.png) + + + +## Client/server optimization + +4D provides an automatic optimization for ORDA requests that use entity selections or load entities in client/server configurations. This optimization speeds up the execution of your 4D application by reducing drastically the volume of information transmitted over the network. + +The following optimization mechanisms are implemented: + +* When a client requests an entity selection from the server, 4D automatically "learns" which attributes of the entity selection are actually used on the client side during the code execution, and builds a corresponding "optimization context". This context is attached to the entity selection and stores the used attributes. It will be dynamically updated if other attributes are used afterwards. + +* Subsequent requests sent to the server on the same entity selection automatically reuse the optimization context and only get necessary attributes from the server, which accelerates the processing. For example in an entity selection-based list box, the learning phase takes place during the display of the first rows, next rows display is very optimized. + +* An existing optimization context can be passed as a property to another entity selection of the same dataclass, thus bypassing the learning phase and accelerating the application (see [Using the context property](#using-the-context-property) below). + +The following methods automatically associate the optimization context of the source entity selection to the returned entity selection: + +* `entitySelection.and()` +* `entitySelection.minus()` +* `entitySelection.or()` +* `entitySelection.orderBy()` +* `entitySelection.slice()` +* `entitySelection.drop()` + + + +**Ejemplo** + +Given the following code: + +```4d + $sel:=$ds.Employee.query("firstname = ab@") + For each($e;$sel) + $s:=$e.firstname+" "+$e.lastname+" works for "+$e.employer.name // $e.employer refers to Company table + End for each +``` + +Thanks to the optimization, this request will only get data from used attributes (firstname, lastname, employer, employer.name) in *$sel* after a learning phase. + + + +### Using the context property + +You can increase the benefits of the optimization by using the **context** property. This property references an optimization context "learned" for an entity selection. It can be passed as parameter to ORDA methods that return new entity selections, so that entity selections directly request used attributes to the server and bypass the learning phase. + +A same optimization context property can be passed to unlimited number of entity selections on the same dataclass. All ORDA methods that handle entity selections support the **context** property (for example `dataClass.query( )` or `dataClass.all( )` method). Keep in mind, however, that a context is automatically updated when new attributes are used in other parts of the code. Reusing the same context in different codes could result in overloading the context and then, reduce its efficiency. +> A similar mechanism is implemented for entities that are loaded, so that only used attributes are requested (see the `dataClass.get( )` method). + + + +**Example with `dataClass.query( )` method:** + +```4d + var $sel1; $sel2; $sel3; $sel4; $querysettings; $querysettings2 : Object + var $data : Collection + $querysettings:=New object("context";"shortList") + $querysettings2:=New object("context";"longList") + + $sel1:=ds.Employee.query("lastname = S@";$querysettings) + $data:=extractData($sel1) // In extractData method an optimization is triggered and associated to context "shortList" + + $sel2:=ds.Employee.query("lastname = Sm@";$querysettings) + $data:=extractData($sel2) // In extractData method the optimization associated to context "shortList" is applied + + $sel3:=ds.Employee.query("lastname = Smith";$querysettings2) + $data:=extractDetailedData($sel3) // In extractDetailedData method an optimization is triggered and associated to context "longList" + + $sel4:=ds.Employee.query("lastname = Brown";$querysettings2) + $data:=extractDetailedData($sel4) // In extractDetailedData method the optimization associated to context "longList" is applied +``` + +### Entity selection-based list box + +Entity selection optimization is automatically applied to entity selection-based list boxes in client/server configurations, when displaying and scrolling a list box content: only the attributes displayed in the list box are requested from the server. + +A specific "page mode" context is also provided when loading the current entity through the **Current item** property expression of the list box (see [Collection or entity selection type list boxes](FormObjects/listbox_overview.md#list-box-types)). This feature allows you to not overload the list box initial context in this case, especially if the "page" requests additional attributes. Note that only the use of **Current item** expression will create/use the page context (access through `entitySelection\[index]` will alter the entity selection context). + +Subsequent requests to server sent by entity browsing methods will also support this optimization. The following methods automatically associate the optimization context of the source entity to the returned entity: + +* `entity.next( )` +* `entity.first( )` +* `entity.last( )` +* `entity.previous( )` + +For example, the following code loads the selected entity and allows browsing in the entity selection. Entities are loaded in a separate context and the list box initial context is left untouched: + +```4d + $myEntity:=Form.currentElement //current item expression + //... do something + $myEntity:=$myEntity.next() //loads the next entity using the same context +``` diff --git a/website/translated_docs/es/ORDA/glossary.md b/website/translated_docs/es/ORDA/glossary.md new file mode 100644 index 00000000000000..f1460a3d0b9109 --- /dev/null +++ b/website/translated_docs/es/ORDA/glossary.md @@ -0,0 +1,210 @@ +--- +id: glossary +title: Glosario +--- + +## Main concepts at a glance + +![](assets/en/ORDA/mainConcepts.png) + + + +## Atributo + +An attribute is the smallest storage cell in a relational database (see also [Relation attribute](#relation-attribute)). Do not confuse dataclass attributes and entity attributes: + +* In a dataclass object, each property is a dataclass attribute that maps to a corresponding field in the corresponding table (same name and type). +* In an entity object, entity attributes are properties that contain values for the corresponding datastore attributes. +> *Attributes* and *properties* are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## AttributePath + +An attributePath is the path of an attribute inside a given dataclass or entity. See also [PropertyPath](#propertyPath). + + +## Class code + +Code for the user class function(s). + + +## Computed attribute + +A computed attribute doesn't actually store information. Instead, it determines its value based on other values from the same entity or from other entities, attributes or functions. When a computed attribute is referenced, the underlying "computation" is evaluated to determine the value. Computed attributes may even be assigned values where user-defined code determines what to do during the assignment. + +## Data model class + +Extended class available for a data model object. + +## Data model object + +Database objects available through the ORDA concept, i.e. datastore, dataclasses, entities and entity selections. + +## Data model function + +Function of an ORDA data model class. + +## Dataclass + +A dataclass is an object model that describes the data. Tables in the database provided by the datastore are handled through dataclasses. Each table in the database provided by the datastore has a corresponding dataclass with the same name. Each field of the table is an attribute of the dataclass. + +A dataclass is related to a single datastore. + + +## DataClass class + +Class for specific dataclass objects, in which you can add custom functions. + +## Datastore + +A datastore is the interface object provided by ORDA to reference a structure and access its data. The main database, returned by the `ds` command, is available as a datastore (the main datastore). + +A datastore provides: + +* a connection to the 4D database +* a set of dataclasses to work with the database + +The database can be a 4D local database (the Main datastore), or a 4D Server database exposed as REST resource (a Remote datastore). + +A datastore references only a single database. It is, however, possible to open several datastores to access several databases. + +## DataStore class + +Class for datastore objects, in which you can add custom functions. + + +## DataStoreImplementation + +Internal name of the generic DataStore class in the `4D` class store. + +## Deep copy + +A deep copy duplicates an object and all the references it contains. After a deep copy, a copied collection contains duplicated elements and thus, new references, of all of the orginal elements. See also Shallow copy. + +## ds + +`ds` is the 4D language command that returns a [datastore](dsMapping.md#datastore) object reference. It matches the datastore available upon the 4D main database. + +## Entity + +An entity is an object that corresponds to a dataclass model. An entity contains the same attributes as the dataclass. + +An entity can be seen as an instance of the dataclass, like a record of the table matching the dataclass in its associated datastore. However, an entity also contains related data. The purpose of the entity is to manage data (create, update, delete). + +For more information, see Entities. + +## Entity selection + +An entity selection is an object. When querying the datastore, an entity selection is returned. An entity selection is a set of references to entities related to the same dataclass. + +An entity selection contains: + +* a set of 0 to X entity references, +* a length property (always), +* queryPlan and queryPath properties (if asked while querying). + +An entity selection can also be empty. + + +## Generic class + +Built-in class for ORDA objects such as entities, or dataclasses. Functions and properties of generic classes are automatically available in user extended classes, e.g. `EmployeeEntity`. + + +## Lazy loading + +Since entities are managed as references, data is loaded only when necessary, i.e. when accessing it in the code or through interface widgets. This optimization principle is called lazy loading. + +## Main datastore + +The Datastore object matching the opened 4D database (standalone or client/server). The main datastore is returned by the ds command. + +## Método + +ORDA objects such as datastores, dataclasses, entity selections, and entities, define classes of objects. They provide specific methods to directly interact with them. These methods are also called member functions. Such methods are used by calling them on an instance of the object. + +For example, the `query()` method is a dataclass member function. If you have stored a dataclass object in the `$myClass` variable, you can write: + +```code4d +$myClass.query("name = smith") +``` + +## Mixed data type + +In this documentation, "Mixed" data type is used to designate the various type of values that can be stored within dataclass attributes. It includes: + +* number +* texto +* null +* booleano +* fecha +* objeto +* colección +* picture(\*) + +*(\*) picture type is not supported by statistical methods such as* `entitySelection.max( )`. + +## Optimistic Lock + +In "optimistic lock" mode, entities are not locked explicitly before updating them. Each entity has an internal stamp that is automatically incremented each time the entity is saved on disk. The entity.save( ) or entity.drop( ) methods will return an error if the stamp of the loaded entity (in memory) and the stamp of the entity on disk do not match, or if the entity has been dropped. Optimistic locking is only available in ORDA implementation. See also "Pessimistic lock". + +## Pessimistic Lock + +A "pessimistic lock" means that an entity is locked prior to its being accessed, using the entity.lock( ) method. Other processes can neither update nor drop the entity until it is unlocked. The classic 4D language only allows pessimistic locks. See "Optimistic lock". + +## Propiedad + +See [Attribute](#attribute). +> Attributes and properties are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## PropertyPath + +A propertyPath is the path to a property in a given object. If the property is nested in several levels, each level separated is by a dot ("."). + +## Regular class + +User class not related to an ORDA object. + +## Related dataclass + +These are dataclasses linked by relation attributes. + +## Relation attribute + +Relation attributes are used to conceptualize relations between dataclasses (many-to-one and one-to-many). + +* Many-to-one relation (dataclassA references an occurrence of dataclassB): a relation attribute is available in dataclassA and references one instance of dataclassB. +* One-to-many relation (an occurence of dataclassB references several occurrences of dataclassA): a relation attribute is available in dataclassB and references several instances of dataclassA. + +A dataclass can have recursive relation attributes. + +In an entity, the value of a relation attribute can be an entity or an entity selection. + +## Related entities + +A related entity can be seen as the instance of a relation attribute in a dataclass. + +Entity selections may refer to related entities according to the relation attributes defined in the corresponding dataclasses. + +## Remote datastore + +A 4D database opened on a 4D or 4D Server (available through HTTP) and exposed as a REST resource. This database can be referenced locally as a Datastore from other workstations, where it is assigned a locaID. The remote datastore can be used through ORDA concepts (datastore, dataclass, entity selection...). This use is submitted to a licencing system. + +## Session + +When the 4D application connects to a Remote datastore, a session is created on the 4D Server (HTTP). A session cookie is generated and associated to the local datastore id. + +Each time a new session is opened, a license is used. Each time a session is closed, the license is freed. + +Inactive sessions are automatically closed after a timeout. The default timeout is 48 hours, it can be set by the developer (it must be >= 60 minutes). + +## Shallow copy + +A shallow copy only duplicates the structure of elements, and keeps the same internal references. After a shallow copy, two collections will both share the individual elements. See also Deep copy. + +## Stamp + +Used in "optimistic" locking technology. All entities have an internal counter, the stamp, which is incremented each time the entity is saved. By automatically comparing stamps between an entity being saved and its version stored on disk, 4D can prevent concurrent modifications on the same entities. + +## Storage attribute + +A storage attribute (sometimes referred to as a scalar attribute) is the most basic type of attribute in a datastore class and most directly corresponds to a field in a relational database. A storage attribute holds a single value for each entity in the class. diff --git a/website/translated_docs/es/ORDA/ordaClasses.md b/website/translated_docs/es/ORDA/ordaClasses.md new file mode 100644 index 00000000000000..88d1c3155374f6 --- /dev/null +++ b/website/translated_docs/es/ORDA/ordaClasses.md @@ -0,0 +1,821 @@ +--- +id: ordaClasses +title: Clases del modelo de datos +--- + + + +ORDA allows you to create high-level class functions above the data model. This allows you to write business-oriented code and "publish" it just like an API. Datastore, dataclasses, entity selections, and entities are all available as class objects that can contain functions. + +For example, you could create a `getNextWithHigherSalary()` function in the `EmployeeEntity` class to return employees with a salary higher than the selected one. It would be as simple as calling: + +```4d +$nextHigh:=ds.Employee(1).getNextWithHigherSalary() +``` + +Developers can not only use these functions in local datastores, but also in client/server and remote architectures (see the full example [below](#example-with-remote-datastore)): + +```4d + //$cityManager is the reference of a remote datastore +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) +``` + +Thanks to this feature, the entire business logic of your 4D application can be stored as a independent layer so that it can be easily maintained and reused with a high level of security: + +- You can "hide" the overall complexity of the underlying physical structure and only expose understandable and ready-to-use functions. + +- If the physical structure evolves, you can simply adapt function code and client applications will continue to call them transparently. + +- By default, all of your data model class functions (including [computed attribute functions](#computed-attributes)) are **not exposed** to remote applications and cannot be called from REST requests. You must explicitly declare each public function with the [`exposed`](#exposed-vs-non-exposed-functions) keyword. + +![](assets/en/ORDA/api.png) + + +In addition, 4D [automatically pre-creates](#creating-classes) the classes for each available data model object. + + +## Architecture + +ORDA provides **generic classes** exposed through the **`4D`** [class store](Concepts/classes.md#class-stores), as well as **user classes** (extending generic classes) exposed in the **`cs`** [class store](Concepts/classes.md#class-stores): + +![](assets/en/ORDA/ClassDiagramImage.png) + +All ORDA data model classes are exposed as properties of the **`cs`** class store. The following ORDA classes are available: + +| Class | Example name | Instantiated by | +| --------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cs.DataStore | cs.DataStore | [`ds`](API/DataStoreClass.md#ds) command | +| cs.*DataClassName* | cs.Employee | [`dataStore.DataClassName`](API/DataStoreClass.md#dataclassname), `dataStore[DataClassName]` | +| cs.*DataClassName*Entity | cs.EmployeeEntity | [`dataClass.get()`](API/DataClassClass.md#get), [`dataClass.new()`](API/DataClassClass.md#new), [`entitySelection.first()`](API/EntitySelectionClass.md#first), [`entitySelection.last()`](API/EntitySelectionClass.md#last), [`entity.previous()`](API/EntityClass.md#previous), [`entity.next()`](API/EntityClass.md#next), [`entity.first()`](API/EntityClass.md#first), [`entity.last()`](API/EntityClass.md#last), [`entity.clone()`](API/EntityClass.md#clone) | +| cs.*DataClassName*Selection | cs.EmployeeSelection | [`dataClass.query()`](API/DataClassClass.md#query), [`entitySelection.query()`](API/EntitySelectionClass.md#query), [`dataClass.all()`](API/DataClassClass.md#all), [`dataClass.fromCollection()`](API/DataClassClass.md#fromcollection), [`dataClass.newSelection()`](API/DataClassClass.md#newselection), [`entitySelection.drop()`](API/EntitySelectionClass.md#drop), [`entity.getSelection()`](API/EntityClass.md#getselection), [`entitySelection.and()`](API/EntitySelectionClass.md#and), [`entitySelection.minus()`](API/EntitySelectionClass.md#minus), [`entitySelection.or()`](API/EntitySelectionClass.md#or), [`entitySelection.orderBy()`](API/EntitySelectionClass.md#or), [`entitySelection.orderByFormula()`](API/EntitySelectionClass.md#orderbyformula), [`entitySelection.slice()`](API/EntitySelectionClass.md#slice), `Create entity selection` | + +> ORDA user classes are stored as regular class files (.4dm) in the Classes subfolder of the project [(see below)](#class-files). + +Also, object instances from ORDA data model user classes benefit from their parent's properties and functions: + +- a Datastore class object can call functions from the [ORDA Datastore generic class](API/DataStoreClass.md). +- a Dataclass class object can call functions from the [ORDA Dataclass generic class](API/DataClassClass.md). +- an Entity selection class object can call functions from the [ORDA Entity selection generic class](API/EntitySelectionClass.md). +- an Entity class object can call functions from the [ORDA Entity generic class](API/EntityClass.md). + + + +## Class Description + +

      History + +| Version | Changes | +| ------- | -------------------------------------------------------------------------------------------------- | +| v18 R5 | Data model class functions are not exposed to REST by default. New `exposed` and `local` keywords. | +
      + + +### DataStore Class + + +A 4D database exposes its own DataStore class in the `cs` class store. + +- **Extends**: 4D.DataStoreImplementation +- **Class name**: cs.DataStore + +You can create functions in the DataStore class that will be available through the `ds` object. + +#### Ejemplo + +```4d +// cs.DataStore class + +Class extends DataStoreImplementation + +Function getDesc + $0:="Database exposing employees and their companies" +``` + + +This function can then be called: + +```4d +$desc:=ds.getDesc() //"Database exposing..." +``` + + + +### DataClass Class + +Each table exposed with ORDA offers a DataClass class in the `cs` class store. + +- **Extends**: 4D.DataClass +- **Class name**: cs.*DataClassName* (where *DataClassName* is the table name) +- **Example name**: cs.Employee + + + +#### Ejemplo + +```4D +// cs.Company class + + +Class extends DataClass + +// Returns companies whose revenue is over the average +// Returns an entity selection related to the Company DataClass + +Function GetBestOnes() + $sel:=This.query("revenues >= :1";This.all().average("revenues")); + $0:=$sel +``` + +Then you can get an entity selection of the "best" companies by executing: + +```4d + var $best : cs.CompanySelection + $best:=ds.Company.GetBestOnes() +``` + +> [Computed attributes](#computed-attributes) are defined in the [Entity Class](#entity-class). + + +#### Example with a remote datastore + +The following *City* catalog is exposed in a remote datastore (partial view): + +![](assets/en/ORDA/Orda_example.png) + +The `City Class` provides an API: + +```4d +// cs.City class + +Class extends DataClass + +Function getCityName() + var $1; $zipcode : Integer + var $zip : 4D.Entity + var $0 : Text + + $zipcode:=$1 + $zip:=ds.ZipCode.get($zipcode) + $0:="" + + If ($zip#Null) + $0:=$zip.city.name + End if +``` + +The client application opens a session on the remote datastore: + +```4d +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +``` + +Then a client application can use the API to get the city matching a zip code (for example) from a form: + +```4d +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) + +``` + + +### EntitySelection Class + +Each table exposed with ORDA offers an EntitySelection class in the `cs` class store. + +- **Extends**: 4D.EntitySelection +- **Class name**: *DataClassName*Selection (where *DataClassName* is the table name) +- **Example name**: cs.EmployeeSelection + + +#### Ejemplo + +```4d +// cs.EmployeeSelection class + + +Class extends EntitySelection + +//Extract the employees with a salary greater than the average from this entity selection + +Function withSalaryGreaterThanAverage + C_OBJECT($0) + $0:=This.query("salary > :1";This.average("salary")).orderBy("salary") + +``` + +Then you can get employees with a salary greater than the average in any entity selection by executing: + +```4d +$moreThanAvg:=ds.Company.all().employees.withSalaryGreaterThanAverage() +``` + +### Entity Class + +Each table exposed with ORDA offers an Entity class in the `cs` class store. + +- **Extends**: 4D.Entity +- **Class name**: *DataClassName*Entity (where *DataClassName* is the table name) +- **Example name**: cs.CityEntity + +Entity classes allow you to define **computed attributes** using specific keywords: + +- `Function get` *attributeName* +- `Function set` *attributeName* +- `Function query` *attributeName* +- `Function orderBy` *attributeName* + +For more information, please refer to the [Computed attributes](#computed-attributes) section. + +#### Ejemplo + +```4d +// cs.CityEntity class + +Class extends Entity + +Function getPopulation() + $0:=This.zips.sum("population") + + +Function isBigCity +C_BOOLEAN($0) +// The getPopulation() function is usable inside the class +$0:=This.getPopulation()>50000 +``` + +Then you can call this code: + +```4d +var $cityManager; $city : Object + +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +$city:=$cityManager.City.getCity("Caguas") + +If ($city.isBigCity()) + ALERT($city.name + " is a big city") +End if +``` + +### Specific rules + +When creating or editing data model classes, you must pay attention to the following rules: + +- Since they are used to define automatic DataClass class names in the **cs** [class store](Concepts/classes.md#class-stores), 4D tables must be named in order to avoid any conflict in the **cs** namespace. En particular: + - Do not give the same name to a 4D table and to a [user class name](Concepts/classes.md#class-names). If such a case occurs, the constructor of the user class becomes unusable (a warning is returned by the compiler). + - Do not use a reserved name for a 4D table (e.g., "DataClass"). + +- When defining a class, make sure the [`Class extends`](Concepts/classes.md#class-extends-classnameclass) statement exactly matches the parent class name (remember that they're case sensitive). For example, `Class extends EntitySelection` for an entity selection class. + +- You cannot instantiate a data model class object with the `new()` keyword (an error is returned). You must use a regular method as listed in the [`Instantiated by` column of the ORDA class table](#architecture). + +- You cannot override a native ORDA class function from the **`4D`** [class store](Concepts/classes.md#class-stores) with a data model user class function. + + +## Computed attributes + + +### Generalidades + +A computed attribute is a dataclass attribute with a data type that masks a calculation. [Standard 4D classes](Concepts/classes.md) implement the concept of computed properties with `get` (*getter*) and `set` (*setter*) [accessor functions](Concepts/classes.md#function-get-and-function-set). ORDA dataclass attributes benefit from this feature and extend it with two additional functions: `query` and `orderBy`. + +At the very minimum, a computed attribute requires a `get` function that describes how its value will be calculated. When a *getter* function is supplied for an attribute, 4D does not create the underlying storage space in the datastore but instead substitutes the function's code each time the attribute is accessed. If the attribute is not accessed, the code never executes. + +A computed attribute can also implement a `set` function, which executes whenever a value is assigned to the attribute. The *setter* function describes what to do with the assigned value, usually redirecting it to one or more storage attributes or in some cases other entities. + +Just like storage attributes, computed attributes may be included in **queries**. Normally, when a computed attribute is used in a ORDA query, the attribute is calculated once per entity examined. In many cases this is sufficient. However, computed attributes can implement a `query` function that substitutes other attributes during the query. This allows computed attributes to be queried quickly by redirecting searches to other attributes, including indexed storage attributes. + +Similarly, computed attributes can be included in **sorts**. When a computed attribute is used in a ORDA sort, the attribute is calculated once per entity examined. Just like in queries, this is sufficient in many cases. However, computed attributes can implement an `orderBy` function that substitutes other attributes during the sort, thus increasing performance. + + +### How to define computed attributes + +You create a computed attribute by defining a `get` accessor in the [**entity class**](#entity-class) of the dataclass. The computed attribute will be automatically available in the dataclass attributes and in the entity attributes. + +Other computed attribute functions (`set`, `query`, and `orderBy`) can also be defined in the entity class. They are optional. + +Within computed attribute functions, [`This`](Concepts/classes.md#this) designates the entity. Computed attributes can be used and handled as any dataclass attribute, i.e. they will be processed by [entity class](API/EntityClass.md) or [entity selection class](API/EntitySelectionClass.md) functions. + +> ORDA computed attribute functions can be [**exposed**](#exposed-vs-non-exposed-functions) or not. + + +### `Function get ` + +#### Sintaxis + +```4d +Function get ({$event : Object}) -> $result : type +// code +``` +The *getter* function is mandatory to declare the *attributeName* computed attribute. Whenever the *attributeName* is accessed, 4D evaluates the `Function get` code and returns the *$result* value. Since this code becomes part of the attribute’s definition, it need not be referenced again in the application. + +> A computed attribute can use the value of other computed attribute(s). However, only one level is allowed, recursive calls generate errors. + +The *getter* function defines the data type of the computed attribute thanks to the *$result* parameter. The following resulting types are allowed: + +- Scalar (text, boolean, date, number) +- Objeto +- Image +- BLOB +- Entity class (i.e. cs.EmployeeEntity) +- Entity selection class (i.e. cs.EmployeeSelection) + +The *$event* parameter contains the following properties: + +| Propiedad | Tipo | Descripción | +| ------------- | ------- | -------------------------------------------------------------------------- | +| attributeName | Texto | Computed attribute name | +| dataClassName | Texto | Dataclass name | +| kind | Texto | "get" | +| result | Variant | Add this property with Null value if you want the attribute to return Null | + + +#### Ejemplos + +- *fullName* computed attribute: + +```4d +Function get fullName($event : Object)-> $result : Text + + If (This.firstName=Null) & (This.lastName=Null) + $event.result:=Null //only way to return a null value + Else + If (This.firstName=Null) + $result:=This.lastName + Else + If (This.lastname=Null) + $result:=This.firstName + Else + $result:=This.firstName+" "+This.lastName + End if + End if +``` + +- A computed attribute can be based upon a related attribute: + +```4d +Function get bigBoss($event : Object)-> $result: cs.EmployeeEntity + If (This.manager.manager=Null) + $event.result:=Null + Else + $result:=This.manager.manager + End if + +``` + +- A computed attribute can be based upon related attributes: + +```4d +Function get coWorkers($event : Object)-> $result: cs.EmployeeSelection + If (This.manager.manager=Null) + $result:=ds.Employee.newSelection() + Else + $result:=This.manager.directReports.minus(this) + End if +``` + +### `Function set ` + +#### Sintaxis + +```4d +Function set ($value : Variant {; $event : Object}) +// code +``` + +The *setter* function executes whenever a value is assigned to the attribute. This function usually processes the input value(s) and the result is dispatched between one or more other attributes. + +The *$value* parameter receives the value assigned to the attribute. + +The *$event* parameter contains the following properties: + +| Propiedad | Tipo | Descripción | +| ------------- | ------- | --------------------------------------------- | +| attributeName | Texto | Computed attribute name | +| dataClassName | Texto | Dataclass name | +| kind | Texto | "set" | +| value | Variant | Value to be handled by the computed attribute | + +#### Ejemplo + +```4d +Function set fullName($value : Text; $event : Object) + var $vals : Collection + $vals:=Split string($value; " "; sk ignore empty strings) + If ($vals.length>0) + This.firstName:=$vals[0] + End if + If ($vals.length>1) + This.lastName:=$vals[1] + End if + End if +``` + + + +### `Function query ` + +#### Sintaxis + +```4d +Function query ($event : Object) +Function query ($event : Object) -> $result : Text +Function query ($event : Object) -> $result : Object +// code +``` + +This function supports three syntaxes: + +- With the first syntax, you handle the whole query through the `$event.result` object property. +- With the second and third syntaxes, the function returns a value in *$result*: + - If *$result* is a Text, it must be a valid query string + - If *$result* is an Object, it must contain two properties: + + | Propiedad | Tipo | Descripción | + | ------------------ | --------- | --------------------------------------------------- | + | $result.query | Texto | Valid query string with placeholders (:1, :2, etc.) | + | $result.parameters | Colección | values for placeholders | + +The `query` function executes whenever a query using the computed attribute is launched. It is useful to customize and optimize queries by relying on indexed attributes. When the `query` function is not implemented for a computed attribute, the search is always sequential (based upon the evaluation of all values using the `get ` function). + +> The following features are not supported: - calling a `query` function on computed attributes of type Entity class or Entity selection class - using the `order by` keyword in the resulting query string. + +The *$event* parameter contains the following properties: + +| Propiedad | Tipo | Descripción | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Texto | Computed attribute name | +| dataClassName | Texto | Dataclass name | +| kind | Texto | "query" | +| value | Variant | Value to be handled by the computed attribute | +| operator | Texto | Query operator (see also the [`query` class function](API/DataClassClass.md#query)). Possible values:
    • == (equal to, @ is wildcard)
    • === (equal to, @ is not wildcard)
    • != (not equal to, @ is wildcard)
    • !== (not equal to, @ is not wildcard)
    • < (less than)
    • <= (less than or equal to)
    • > (greater than)
    • >= (greater than or equal to)
    • IN (included in)
    • %% (contains keyword)
    • | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default query (always sequential for computed attributes). | + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + +#### Ejemplos + +- Query on the *fullName* computed attribute. The result is returned as Text (query string). + +```4d +Function query fullName($event : Object)-> $result : Text + var $vals : Collection + var $oper; $result : Text + + $vals:=Split string($event.value; " "; sk ignore empty strings) + $oper:=$event.operator + $result:="" + + If (($oper="==") | ($oper="===")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" and lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName == '' and lastName == ''" + End if + + Else + If (($oper="!=") | ($oper="!==")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" or lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName != '' or lastName != ''" + End if + Else + $result:="firstName "+$oper+" '"+$vals[0]+"'" + End if + + End if + +``` + +Calling code, for example: + +```4d +$emps:=ds.Employee.query("fullName = :1"; "Flora Pionsin") +``` + +- This function handles queries on the *age* computed attribute and returns an object with parameters: + +```4d +Function query age($event : Object)->$result : Object + + var $operator : Text + var $age : Integer + var $_ages : Collection + + $operator:=$event.operator + + If ($operator="in") + + Case of + : (Value type($event.value)=Is collection) + $_ages:=$event.value + + : (Value type($event.value)=Is text) + $_ages:=JSON Parse($event.value) + End case + + Else + + $age:=Num($event.value) // integer + $d1:=Add to date(Current date; -$age-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + $parameters:=New collection($d1; $d2) + End if + + Case of + + : ($operator="==") + $query:="birthday > :1 and birthday <= :2" // after d1 and before or egal d2 + + : ($operator=">=") + $query:="birthday <= :2" + + //... other operators + + : ($operator="in") + + If ($_ages.length<=3) + + $parameters:=New collection + $phIndex:=1 + + $query:="" + For ($i; 0; $_ages.length-1) + + $ph1:=":"+String($phIndex) //-> ":1" + $ph2:=":"+String($phIndex+1) //-> ":2" + + $phIndex:=$phIndex+2 // next will be :3 :4, :5 :6, etc. + + $d1:=Add to date(Current date; -$_ages[$i]-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + + $parameters.push($d1) + $parameters.push($d2) + + If ($i>0) + $query:=$query+" or " + End if + $query:=$query+"(birthday > "+$ph1+" and birthday <= "+$ph2+")" // > :1 and <= :2 + End for + + Else // let 4d do the job !!! + $event.result:=Null + End if + + Else + $event.result:=Null + End case + + + If (Undefined($event.result)) + $result:=New object + $result.query:=$query + $result.parameters:=$parameters + End if + +``` + +### `Function orderBy ` + +#### Sintaxis + +```4d +Function orderBy ($event : Object) +Function orderBy ($event : Object)-> $result : Text + +// code +``` + +The `orderBy` function executes whenever the computed attribute needs to be ordered. It allows sorting the computed attribute. For example, you can sort *fullName* on first names then last names, or conversely. When the `orderBy` function is not implemented for a computed attribute, the sort is always sequential (based upon the evaluation of all values using the `get ` function). + +> Calling an `orderBy` function on computed attributes of type Entity class or Entity selection class **is not supported**. + +The *$event* parameter contains the following properties: + +| Propiedad | Tipo | Descripción | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Texto | Computed attribute name | +| dataClassName | Texto | Dataclass name | +| kind | Texto | "orderBy" | +| value | Variant | Value to be handled by the computed attribute | +| descending | Booelan | `true` for descending order, `false` for ascending order | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default sort . | + +You can return the `orderBy` string either in the `$event.result` object property or in the *$result* function result. + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + + +#### Ejemplo + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + If ($event.descending=True) + $result:="firstName desc, lastName desc" + Else + $result:="firstName, lastName" + End if +``` + + +## Exposed vs non-exposed functions + +For security reasons, all of your data model class functions are **not exposed** (i.e., private) by default to remote requests. + +Remote requests include: + +- Requests sent by remote 4D applications connected through `Open datastore` +- REST requests + +> Regular 4D client/server requests are not impacted. Data model class functions are always available in this architecture. + +A function that is not exposed is not available on remote applications and cannot be called on any object instance from a REST request. If a remote application tries to access a non-exposed function, the "-10729 - Unknown member method" error is returned. + +To allow a data model class function to be called by a remote request, you must explicitly declare it using the `exposed` keyword. The formal syntax is: + +```4d +// declare an exposed function +exposed Function +``` + +> The `exposed` keyword can only be used with Data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +### Ejemplo + +You want an exposed function to use a private function in a dataclass class: + +```4d +Class extends DataClass + +//Public function +exposed Function registerNewStudent($student : Object) -> $status : Object + +var $entity : cs.StudentsEntity + +$entity:=ds.Students.new() +$entity.fromObject($student) +$entity.school:=This.query("name=:1"; $student.schoolName).first() +$entity.serialNumber:=This.computeSerialNumber() +$status:=$entity.save() + +//Not exposed (private) function +Function computeIDNumber()-> $id : Integer +//compute a new ID number +$id:=... + +``` + +When the code is called: + +```4d +var $remoteDS; $student; $status : Object +var $id : Integer + +$remoteDS:=Open datastore(New object("hostname"; "127.0.0.1:8044"); "students") +$student:=New object("firstname"; "Mary"; "lastname"; "Smith"; "schoolName"; "Math school") + +$status:=$remoteDS.Schools.registerNewStudent($student) // OK +$id:=$remoteDS.Schools.computeIDNumber() // Error "Unknown member method" +``` + + +## Local functions + +By default in client/server architecture, ORDA data model functions are executed **on the server**. It usually provides the best performance since only the function request and the result are sent over the network. + +However, it could happen that a function is fully executable on the client side (e.g., when it processes data that's already in the local cache). In this case, you can save requests to the server and thus, enhance the application performance by inserting the `local` keyword. The formal syntax is: + +```4d +// declare a function to execute locally in client/server +local Function +``` + +With this keyword, the function will always be executed on the client side. + +> The `local` keyword can only be used with data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +Note that the function will work even if it eventually requires to access the server (for example if the ORDA cache is expired). However, it is highly recommended to make sure that the local function does not access data on the server, otherwise the local execution could not bring any performance benefit. A local function that generates many requests to the server is less efficient than a function executed on the server that would only return the resulting values. For example, consider the following function on the Schools entity class: + +```4d +// Get the youngest students +// Inappropriate use of local keyword +local Function getYoungest + var $0 : Object + $0:=This.students.query("birthDate >= :1"; !2000-01-01!).orderBy("birthDate desc").slice(0; 5) +``` +- **without** the `local` keyword, the result is given using a single request +- **with** the `local` keyword, 4 requests are necessary: one to get the Schools entity students, one for the `query()`, one for the `orderBy()`, and one for the `slice()`. In this example, using the `local` keyword is inappropriate. + + +### Ejemplos + +#### Calculating age + +Given an entity with a *birthDate* attribute, we want to define an `age()` function that would be called in a list box. This function can be executed on the client, which avoids triggering a request to the server for each line of the list box. + +On the *StudentsEntity* class: + +```4d +Class extends Entity + +local Function age() -> $age: Variant + +If (This.birthDate#!00-00-00!) + $age:=Year of(Current date)-Year of(This.birthDate) +Else + $age:=Null +End if +``` + +#### Checking attributes + +We want to check the consistency of the attributes of an entity loaded on the client and updated by the user before requesting the server to save them. + +On the *StudentsEntity* class, the local `checkData()` function checks the Student's age: + +```4d +Class extends Entity + +local Function checkData() -> $status : Object + +$status:=New object("success"; True) +Case of + : (This.age()=Null) + $status.success:=False + $status.statusText:="The birthdate is missing" + + :((This.age() <15) | (This.age()>30) ) + $status.success:=False + $status.statusText:="The student must be between 15 and 30 - This one is "+String(This.age()) +End case +``` + +Calling code: + +```4d +var $status : Object + +//Form.student is loaded with all its attributes and updated on a Form +$status:=Form.student.checkData() +If ($status.success) + $status:=Form.student.save() // call the server +End if +``` + + + +## Support in 4D projects + + +### Class files + +An ORDA data model user class is defined by adding, at the [same location as regular class files](Concepts/classes.md#class-files) (*i.e.* in the `/Sources/Classes` folder of the project folder), a .4dm file with the name of the class. For example, an entity class for the `Utilities` dataclass will be defined through a `UtilitiesEntity.4dm` file. + + +### Creating classes + +4D automatically pre-creates empty classes in memory for each available data model object. + +![](assets/en/ORDA/ORDA_Classes-3.png) + +> By default, empty ORDA classes are not displayed in the Explorer. To show them you need to select **Show all data classes** from the Explorer's options menu: ![](assets/en/ORDA/showClass.png) + +ORDA user classes have a different icon from regular classes. Empty classes are dimmed: + +![](assets/en/ORDA/classORDA2.png) + +To create an ORDA class file, you just need to double-click on the corresponding predefined class in the Explorer. 4D creates the class file and add the `extends` code. For example, for an Entity class: + +``` +Class extends Entity +``` + +Once a class is defined, its name is no longer dimmed in the Explorer. + + +### Editing classes + +To open a defined ORDA class in the 4D method editor, select or double-click on an ORDA class name and use **Edit...** from the contextual menu/options menu of the Explorer window: + +![](assets/en/ORDA/classORDA4.png) + +For ORDA classes based upon the local datastore (`ds`), you can directly access the class code from the 4D Structure window: + +![](assets/en/ORDA/classORDA5.png) + + +### Editor de método + +In the 4D method editor, variables typed as an ORDA class automatically benefit from autocompletion features. Example with an Entity class variable: + +![](assets/en/ORDA/AutoCompletionEntity.png) + diff --git a/website/translated_docs/es/ORDA/overview.md b/website/translated_docs/es/ORDA/overview.md new file mode 100644 index 00000000000000..00bd016f7232ef --- /dev/null +++ b/website/translated_docs/es/ORDA/overview.md @@ -0,0 +1,34 @@ +--- +id: generalidades +title: What is ORDA? +--- + +ORDA stands for **Object Relational Data Access**. It is an enhanced technology allowing to access both the model and the data of a database through objects. + +Relations are transparently included in the concept, in combination with [lazy loading](glossary.md#lazy-loading), to remove all the typical hassles of data selection or transfer from the developer. + +With ORDA, data is accessed through an abstraction layer, the [datastore](dsMapping.md#datastore). A datastore is an object that provides an interface to the database model and data through objects and classes. For example, a table is mapped to a [dataclass](dsMapping.md#dataclass) object, a field is an [attribute](dsMapping.md##attribute) of a dataclass, and records are accessed through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). + + +## Why use ORDA? + +Instead of representing information as tables, records, and fields, ORDA uses an alternate approach that more accurately maps data to real-world concepts. + +Imagine the ability to denormalize a relational structure, yet not affect efficiency. Imagine describing everything about the business objects in your application in such a way that using the data becomes simple and straightforward and removes the need for a complete understanding of the relational structure. + +In the ORDA data model, a single dataclass can incorporate all of the elements that make up a traditional relational database table, but can also include values from related parent entities, and direct references to related entities and entity selections. + +A query returns a list of entities called an entity selection, which fulfills the role of a SQL query’s row set. The difference is that each entity "knows" where it belongs in the data model and "understands" its relationship to all other entities. This means that a developer does not need to explain in a query how to relate the various pieces of information, nor in an update how to write modified values back to the relational structure. + +In addition, ORDA objects such as entity selections or entities can be easily bound to UI objects such as list boxes or variables. Combined with powerful features such as the `This` and `Form` commands, they allow the building modern and modular interfaces based upon objects and collections. + +## How to use ORDA? + +Basically, ORDA handles objects. In ORDA, all main concepts, including the datastore itself, are available through objects. In 4D, the datastore is automatically [mapped upon the 4D structure](dsMapping.md). + +ORDA objects can be handled like 4D standard objects, but they automatically benefit from specific properties and methods. + +ORDA objects are created and instanciated when necessary by 4D methods (you do not need to create them). However, ORDA data model objects are associated with [classes where you can add custom functions](ordaClasses.md). + + + diff --git a/website/translated_docs/es/ORDA/quickTour.md b/website/translated_docs/es/ORDA/quickTour.md new file mode 100644 index 00000000000000..2bd4016e712bfd --- /dev/null +++ b/website/translated_docs/es/ORDA/quickTour.md @@ -0,0 +1,194 @@ +--- +id: quickTour +title: Un recorrido rápido en ORDA +--- + +Since ORDA is object-based, using ORDA requires basic knowledge in object programmming. + +## Exploring the datastore + +The ORDA datastore is automatically based upon a 4D database structure, provided it complies with the [ORDA prerequisites](overview.md#orda-prerequisites). + +This example will use the following simple 4D database structure: + +![](assets/en/ORDA/struc.png) + +To know what is exposed as the datastore, create a new project method, write the following line: + +```code4d +TRACE +``` + +Execute the method -- it simply calls the debugger window. In the Expression area, double-click to insert an expression and enter `ds`. It returns the datastore object. Deploy the object, you can see that tables and fields are automatically exposed by ORDA as properties of the `ds` object: + +![](assets/en/ORDA/debug1.png) + +It means for example that, whenever you need to refer to the city field of the [Company] table, in ORDA you just need to write: + +```code4d +ds.Company.city //returns the name of the city +``` + +> In the ORDA world, ds.Company is a **dataclass**. ds.Company.city is an **attribute**. + +> ORDA is case sensitive. `ds.company.city` will not refer to the ds.Company.city attribute. + +You have also noticed the extra `hires` property in the ds.Company dataclass. It does not correspond to a field. `hires` is actually the name of the *One to many* relation between Company and Employee: + +![](assets/en/ORDA/struc2s.png) *Name of the relation as defined in the Inspector* + +It means that, whenever you need to access the list of employees working for a company, in ORDA you just need to write: + +```code4d +ds.Company.hires //returns the list of employees +``` + +But don't go too fast. Let's see now how to record data in ORDA dataclasses. + + +## Adding data + +In ORDA, you can add a record to a dataclass using the `new()` command. +> In the ORDA world, a record is an **entity** -- an entity is itself an object. A command that is attached to a specific object is called a **member method**. + +```code4d +$entity:=ds.Company.new() //create a new entity reference +//in the Company dataclass +//and assign it to the $entity variable +``` + +A new entity object contains a "copy" of all attributes of its parent dataclass, thus you can assign values to them: + +```code4d +$entity.name:="ACME, inc." +$entity.city:="London" +//$entity.ID is automatically filled +``` + +Right now, the entity only exists in memory. To store it in the data file, you need to save it using the `save()` member method: + +```code4d +$status:=$entity.save() +``` + + + + + + + + +The editor for users is located in the Toolbox of 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. 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. 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 adds a new user to the list, named "New userX" by default. + +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. 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. + +> 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. 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 + +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) + +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. + +### 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. + +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. + +> 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. + +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. + + +### 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. + +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. + +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. + +![](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. + + +### 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. + +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) + +- 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) + +- 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) + +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. diff --git a/website/translated_docs/es/ORDA/remoteDatastore.md b/website/translated_docs/es/ORDA/remoteDatastore.md new file mode 100644 index 00000000000000..649fb53ae416e7 --- /dev/null +++ b/website/translated_docs/es/ORDA/remoteDatastore.md @@ -0,0 +1,58 @@ +--- +id: remoteDatastore +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different remote clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the [**HTTP REST server**](REST/gettingStarted.md). +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/website/translated_docs/es/ORDA/remoteDatastores.md b/website/translated_docs/es/ORDA/remoteDatastores.md new file mode 100644 index 00000000000000..2e0e428d7334c1 --- /dev/null +++ b/website/translated_docs/es/ORDA/remoteDatastores.md @@ -0,0 +1,60 @@ +--- +id: datastores +title: Utilizar un almacén de datos remoto +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/ORDA/sessions.png) + +> For sessions opened by REST requests, please refer to [Users and sessions](REST/authUsers.md). + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/ORDA/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/website/translated_docs/es/Preferences/forms.md b/website/translated_docs/es/Preferences/forms.md new file mode 100644 index 00000000000000..399c0e3130570a --- /dev/null +++ b/website/translated_docs/es/Preferences/forms.md @@ -0,0 +1,35 @@ +--- +id: forms +title: Forms Page +--- + + +This page lets you set the default operation and display of the 4D Form editor. + +## Move + +This group of options sets parameters for moving objects using the keyboard or the mouse in the Form editor. + +### Step using keyboard + +This option allows setting the value (in points) of the step used for moving or resizing an object using the keyboard and the **Shift** key. + +### When moving beyond window limits + +This option allows setting the behavior of the Form editor when moving an object using the mouse beyond window limits. + +* **Autoscroll**: When this option is checked, this action causes the scroll of the form in the window, as if you clicked on the scroll bars. This behavior is useful for moving objects in large forms. +* **Start drag and drop**: When this option is checked, this action is interpreted as a drag and drop. The form window is not modified and the moved object can be dropped in another window (if its contents are compatible), for example, in another form. This behavior is useful for recycling objects among several forms or using object libraries (see [Creating and using custom object libraries](FormEditor/objectLibrary.md#creating-and-using-custom-object-libraries)). + +You can configure this option depending on your work habits and development needs. + +### Activate auto alignment by default + +This option activates auto alignment by default in each new window of the Form editor. It is possible to modify this option individually in each window (refer to [Using the magnetic grid](FormEditor/formEditor.md#using-the-magnetic-grid)). + +## New form default display + +- **Limits**, **Rulers**, ...: check items that must be displayed by default in each new window of the Form editor. It is possible to modify the display of each window individually using the **Display** hierarchical menu of the Form editor. +- **Color for marker lines**: modifies the color of the marker lines used in the Form editor to define the different areas (header, breaks, detail and footer, etc.). For more information about markers, refer to [Using output control lines](https://doc.4d.com/4Dv18R6/4D/18-R6/Using-output-control-lines.300-5217678.en.html). +- **Marca de visualización por defecto**: define qué marcas se mostrarán por defecto en cada nueva ventana del editor de formularios. Para más información sobre marcas, consulte [Utilizar marcas](FormEditor/formEditor.md#using-shields). + diff --git a/website/translated_docs/es/Preferences/general.md b/website/translated_docs/es/Preferences/general.md new file mode 100644 index 00000000000000..08e6c5f5e84d7a --- /dev/null +++ b/website/translated_docs/es/Preferences/general.md @@ -0,0 +1,145 @@ +--- +id: general +title: General Page +--- + +This page contains various options to configure the general operation of your 4D application. + +## Options + +### At startup + +This option allows you to configure the default 4D display at startup, when the user launches only the application. + +* **Do nothing**: Only the application window appears, empty. +* **Open Local Project dialog**: 4D displays a standard open document dialog box, allowing you to select a local project. +* **Open last used project**: 4D directly opens the last project used; no opening dialog box appears. >To force the display of the opening dialog box when this option is selected, hold down the **Alt** (Windows) or **Option** (macOS) key while launching the project. +* **Open Remote Project dialog**: 4D displays the standard 4D Server logon dialog, allowing you to select a project published on the network. +* **Open Welcome Wizard dialog** (factory setting): 4D displays the Welcome Wizard dialog box. +> **4D Server**: The 4D Server application ignores this option. In this environment, the **Do nothing** mode is always used. + +### Automatic form creation + +> This option is only used in binary databases; it is ignored in project architecture. See doc.4d.com. + +### Window tabbing (macOS only) + +Starting with macOS Sierra, Mac applications can benefit from the Automatic Window Tabbing feature that helps organizing multiple windows: document windows are stacked into a single parent window and can be browsed through tabs. This feature is useful on small screens and/or when using a trackpad. + +You can benefit from this feature in the following environments (with 4D 64-bit versions only): + +* Method Editor windows +* Form Editor windows + +All windows from these editors can be put in tab form: + +![](assets/en/Preferences/general2.png) + +A set of commands in the **Window** menu allows managing the tabs: + +![](assets/en/Preferences/general3.png) + +In the 4D's Preferences dialog box, the **Window tabbing** option allows you to control this feature: + +![](assets/en/Preferences/general4.png) + +Three options are available: + +* **According to System Preferences** (default): 4D windows will behave like defined in the macOS System Preferences (In full screen, Always, or Manually). +* **Never**: Opening a new document in 4D form editor or method editor will always result in creating a new window (tabs are never created). +* **Always**: Opening a new document in 4D form editor or method editors will always result in creating a new tab. + +### Appearance (macOS only) + +This menu lets you select the color scheme to use for the **4D development** environment. The specified scheme will be applied to all editors and windows of the Design mode. + +> You can also set the color scheme to use in your **desktop applications** in the "Interface" page of the Settings dialog box. + +Three options are available: + +* **According to System Color Scheme Preferences** (default): Use the color scheme defined in the macOS System Preferences. +* **Light**: Use the Light Theme +* **Dark**: Use the Dark Theme + +> This preference is only supported on macOS. On Windows, the "Light" scheme is always used. + + +### Exit Design when going to Application Environment + +If this option is checked, when the user switches to the Application environment using the **Test Application** menu command, all the windows of the Design environment are closed. If this option is not checked (factory setting), the windows of the Design environment remain visible in the background of the Application environment. + + +### Enable binary database creation + +If you check this option, two items are added in the **File > New** menu and the **New** toolbar button: + +* **Database...** +* **Database from Structure Definition...** + +![](assets/en/Preferences/general5.png) + +These items allow you to create binary databases (see [Creating a new database](https://doc.4d.com/4Dv18R6/4D/18-R6/Creating-a-new-database.300-5217610.en.html) section). They are no longer proposed by default because 4D recommends using project-based architecture for new developments. + +## When creating a new project + +### Use Log File + +When this option is checked, a log file is automatically started and used when a new database is created. For more information, please refer to [Log file (.journal)](Backup/log.md). + +### Create package + +When this option is checked, 4D databases are automatically created in a folder suffixed .4dbase. + +Thanks to this principle, under macOS the database folders appear as packages having specific properties. Under Windows, this has no particular impact. + +### Create `.gitignore` file + +You might need or want git to ignore some files in your new projects. + +You can set this preference by checking the **Create .gitignore file** option. + +![](assets/en/Preferences/gitignore.png) + +When a project is created in 4D and that box is checked, 4D creates a `.gitignore` file at the same level as the `Project` folder (see [Architecture of a Project](Project/architecture.md#gitignore-file-optional)). + +You can define the default contents of the `.gitignore` file by clicking the pencil icon. This will open the .gitignore configuration file in your text editor. The contents of this file will be used to generate the `.gitignore` files in your new projects. + +The [official git documentation](https://git-scm.com/docs/gitignore) is a great resource to understand how `.gitignore` files work. + +### Language of text comparison + +This parameter configures the default language used for character string processing and comparison in new databases. The language choice has a direct influence on the sorting and searching of text, as well as the character case, but it has no effect on the translation of texts or on the date, time or currency formats, which remain in the system language. By default (factory setting), 4D uses the current user language set in the system. + +A 4D database can thus operate in a language different from that of the system. When a database is opened, the 4D engine detects the language used by the data file and provides it to the language (interpreter or compiled mode). Text comparisons, regardless of whether they are carried out by the database engine or the language, are done in the same language. + +When creating a new data file, 4D uses the language previously set in this menu. When opening a data file that is not in the same language as the structure, the data file language is used and the language code is copied into the structure. +> You can modify this parameter for the open database using the Database Settings (see [Text comparison](https://doc.4d.com/4Dv18R6/4D/18-R6/DatabaseData-storage-page.300-5217842.en.html#460252)). + +## Documentation Location + +This area configures access to the 4D HTML documentation displayed in your current browser: + +* When you hit the **F1** key while the cursor is inserted in a 4D class function or command name in the Method editor; +* When you double-click on a 4D command in the **Commands Page** of the Explorer. + + +### Documentation language + +Language of the HTML documentation to display. You can select a documentation in a different language from the application language. + +### Look in the local folder first + +> This option is only taken into account for command documentation access (excluding class functions). + +Sets where 4D will look for documentation pages. + +* When checked (default), 4D first looks for the page in the local folder (see below). If it is found, 4D displays the page in the current browser. If not, 4D automatically looks for it in the on-line documentation Web site. This makes it possible to access the documentation even when you are offline. +* When not checked, 4D looks for the desired page directly in the on-line documentation Web site and displays it in the current browser. If it is not found, 4D displays an error message in the browser. + +### Local folder + +> This option is only taken into account for command documentation access (excluding class functions). + +Indicates the location of the static HTML documentation. By default, this is the \Help\Command\language subfolder. You can view the location by clicking on the menu associated with the area. If this subfolder is not present, the location is shown in red. + +You can modify this location as desired, for example if you want to display the documentation in a language different from that of the application. The static HTML documentation can be located on another volume, on a web server, etc. To designate a different location, click on the **[...]** button next to the entry area and choose a documentation root folder (folder corresponding to the language: `fr`, `en`, `es`, `de` or `ja`). diff --git a/website/translated_docs/es/Preferences/methods.md b/website/translated_docs/es/Preferences/methods.md new file mode 100644 index 00000000000000..ef575d122abead --- /dev/null +++ b/website/translated_docs/es/Preferences/methods.md @@ -0,0 +1,185 @@ +--- +id: methods +title: Methods Page +--- + +This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into two sections accessed using the Theme and Options tabs. + +## Themes + +This page allows selecting, creating, or configuring Method editor themes. A theme defines the font, font size, colors and styles of items displayed in the code editor. + +![](assets/en/Preferences/themes.png) + +### Theme list + +In this list, you select the theme to apply to the code editor. All available themes are displayed, including custom themes (if any). 4D provides two themes by default: + +* **Default Light Theme** +* **Default Dark Theme** + +> Default themes cannot be modified or deleted. + +A **myTheme** theme is automatically added if you already customized method editor styles in previous 4D releases. + +### Creating custom themes + +You can create themes that you can fully customize. To create a theme, select an existing theme and click on the **+** at the bottom of the theme list. You can also add customized themes by copying theme files in the `4D Editor Themes` folder (see below). + +### Custom theme files + +Each custom theme is stored in a single JSON file named *themeName.json* The JSON files for custom themes are stored in the `4D Editor Themes` folder located at the same level as the 4D [preferences file](overview.md#storage). + +If key values are not defined in a custom theme, they default to the values from the *Default Light Theme*. If a JSON theme file is invalid, the *Default Light Theme* is loaded and an error is generated. + +> When a theme file is modified by an external editor, 4D must be restarted to take the modification(s) into account. + +## Theme definition + +Defining a theme means: + +- setting a global font and font size for the whole code editor, +- assigning specific styles and colors to each 4D language element (fields, tables, variables, parameters, SQL, etc.), SQL language element (keywords, functions, etc.), and color backgrounds. + +Combining different colors and styles is particularly useful for code maintenance purposes. + +### Font and Font size + +The **font** and **font size** menus allows you to select the font name and size used in the Method editor entry area for all categories. + +### 4D Language and SQL Language + +You can set different font styles and colors (font color or background color) for each type of language element. You can select the element(s) to customize in the Category list. + + +### Other Styles + +These options configure the various colors used in the Method editor and debugger interfaces. + +![](assets/en/Preferences/categories.png) + + +| | Descripción | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Background color** | Background color of Method editor window. | +| **Border of the running line in the debugger** | Color of the border surrounding the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options) page. | +| **Cursor line background color** | Background color of line containing the cursor. | +| **Execution line background color** | Background color of line being executed in the debugger. | +| **Highlight of the found words** | Highlight color of words found in a search. | +| **Highlight of the parentheses** | Highlight color of corresponding parentheses (used when pairs of parentheses are signaled by highlighting, see [Options](#options)). | +| **Highlight of the blocks** | Highlight color for selected logical blocks when the "Highlight logical blocks" option is enabled in the [Options](#options). | +| **Highlight of the same variable or field** | Highlight color for other occurrences of the same variable or field text when one of the "Highlighting variables and text" option is enabled in the [Options](#options). | +| **Highlight of the running line in the debugger** | Highlight color of the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options). | +| **Selection back color** | Background color of selection. | +| **Suggested text** | Color of autocomplete text suggested by the Method editor. | + + + +## Options + + +This page configures Method editor display options. + +![](assets/en/Preferences/options.png) + + +### Options + + + +#### 4D Programming Language (Use regional system settings) + +Allows you to disable/enable the "international" code settings for the local 4D application. +- **unchecked** (default): English-US settings and the English programming language are used in 4D methods. +- **checked**: Regional settings are used in 4D methods. + +> If you modify this option, you need to restart the 4D application so that the change is taken into account. + +#### Indentation + +Changes the indentation value for the 4D code in the Method editor. The width must be specified in points (10 by default). + +4D code is automatically indented in order to reveal its structure: + +![](assets/en/Preferences/optionsIndent.png) + +Modifying this default value can be useful if your methods contain complex algorithms with many levels of embedding. Narrower indentation can be used in order to limit horizontal scrolling. + +#### Show Line Numbers + +Lets you display the line numbers by default in each window of the Method editor. You can also show/hide line numbers for the current window directly from the Method editor. + +#### Show Lists + +Lets you choose whether or not to show the lists of objects (Commands, Tables and fields, etc.) by default when the Method editor window is opened. You can also show or hide each list directly from the Method editor. + +#### Highlight the logical blocks + +When checked, the whole code belonging to a logical block (If/End if for example) is highlighted when the mouse is placed over the expanded node: + +![](assets/en/Preferences/optionsLogicalBlocks.png) + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Always show block lines + +Allows to hide vertical block lines permanently. The block lines are designed to visually connect nodes. By default, they are always displayed (except when collapse/expand icons are hidden, see below). + +![](assets/en/Preferences/optionsBlockLines.png) + +#### Hide collapse/expand icons + +Allows you to hide all expand/collapse icons by default when displaying code. When the option is checked, node icons (as well as local block lines, see above), are displayed temporarily when the mouse is placed over a node: + +![](assets/en/Preferences/optionsHideIcons.png) + +#### Insert () and closing } ) ] " + +Enables automatic insertion of () and closing braces while typing code. This option controls two automatic features: + +- **parentheses pair ()**: Added after a 4D command, keyword or project method inserted from a suggestion or completion list, if the inserted element requires one or more mandatory arguments. For example, if you type "C_OB" and press Tab, 4D writes "C_OBJECT()" and sets the insertion point inside the (). + +- **closing }, ), ], or "**: Character added when you type respectively an opening {, (, ], or ". This feature allows inserting matching pairs of symbols at the insertion point or surrounding a selected text. For example, if you highlight a string and type a single ", the whole selected string will be enclosed in "": + +![](assets/en/Preferences/optionsClosing.png) -> " -> ![](assets/en/Preferences/optionsClosing2.png) + +#### Matching [](){}"" + +Sets the graphic signaling of matching braces and double quotes in the code. This signaling appears whenever a square bracket, parenthesis, curly bracket, or double quote is selected. The following options are available: + +- **None**: No signaling +- **Rectangle** (default): Braces/double quotes surrounded by a black line + ![](assets/en/Preferences/optionsRectangle.png) +- **Background Color**: Braces/double quotes highlighted (the color is set in the [Theme](#theme-definition) page). +- **Bold**: Braces/double quotes displayed in bold. + +#### Highlighted variables and fields + +Allows to highlight all occurrences of the same variable or field in an open method window. + +![](assets/en/Preferences/optionsVariables.png) + +- **No**(default): No highlight +- **On cursor**: All occurrences are highlighted when the text is clicked +- **On selection**: All occurrences are highlighted when the text is selected + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Debug (Highlight the line running) + +Highlights the line that is currenty running in the debugger in addition to the regular yellow arrow indicator. + +![](assets/en/Preferences/optionsLine.png) + +If you deselect this option, only the yellow arrow is shown. + +### Suggestions + +This area lets you configure autocomplete mechanisms in the Method editor to adapt it to your own work habits. + +| | Descripción | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Automatic opening of window for | Triggers the automatic display of the suggestion window for:

      • Constantes
      • Variables (local and interprocess) and object attributes
      • Tables
      • Prototypes (*i.e.*, class functions)

      For example, when the "Variables (local or interprocess) and object attributes" option is checked, a list of suggestions appears when you type the $ character:

      ![](assets/en/Preferences/suggestionsAutoOpen.png)

      You can disable this functioning for certain elements of the language by deselecting their corresponding option. | +| Validation of a suggestion for | Sets the entry context that allows the Method editor to validate automatically the current suggestion displayed in the autocomplete window.

      • **Tab and delimiters**
        When this option is selected, you can validate the current selection with the Tab key or any delimiter that is relevant to the context. For example, if you enter "ALE" and then "(", 4D automatically writes "ALERT(" in the editor. Here is the list of delimiters that are taken into account:
        ( ; : = < [ {
      • **Tab only**
        When this option is selected, you can only use the Tab key to insert the current suggestion. This can be used more particularly to facilitate the entry of delimiter characters in element names, such as ${1}.

        **Note**: You can also double-click in the window or press the Carriage return key to validate a suggestion.

      | + + diff --git a/website/translated_docs/es/Preferences/overview.md b/website/translated_docs/es/Preferences/overview.md new file mode 100644 index 00000000000000..a9701d1764c4ff --- /dev/null +++ b/website/translated_docs/es/Preferences/overview.md @@ -0,0 +1,43 @@ +--- +id: generalidades +title: Generalidades +--- + +User preferences specify various settings affecting your working environment, e.g. default options, display themes, method editor features, shortcuts, etc. They are applied to all projects opened with your 4D or 4D Server application. + +**4D Server**: Object locking occurs when two or more users try to modify the settings in the Preferences dialog box at the same time. Only one user can use the Preferences dialog box at a time. +> 4D offers a different set of parameters specific to the open projet: **Settings** (available from the **Design** menu). For more information, refer to the Settings chapter. + +## Access + +You can access the Preferences dialog box from the **Edit > Preferences...** menu (Windows) or the **4D** Application menu (macOS): + +![](assets/en/Preferences/overviewAccess.png) + +This menu option is available even when there is no open project. + +You can also display the Preferences dialog box in Application mode using the "Preferences" standard action (associated with a menu item or a button) or using the `OPEN SETTINGS WINDOW` command. + +## Storage + +Settings made in the Preferences dialog box are saved in an XML format preferences file named **4D Preferences vXX.4DPreferences** that is stored in the active 4D folder of the current user, as returned by the [`Get 4D folder`](https://doc.4d.com/4Dv18R6/4D/18-R6/Get-4D-folder.301-5198423.en.html) command: + +* Windows: `{disk}\Users\{UserName}\AppData\Roaming\4D` +* macOS: `{disk}:Users:{UserName}:Library:Application Support:4D` + +## Customizing parameters and reset settings + +In settings dialog boxes, parameters whose values have been modified appear in bold: + +![](assets/en/Preferences/overviewUser.png) + +Preferences indicated as customized may have been modified directly in the dialog box, or may have been modified previously in the case of a converted database. + +A parameter still appears in bold even when its value is replaced manually with its default values. This way it is always possible to visually identify any parameters that have been customized. + +To reset the parameters to their default values and remove the bold style indicating that they have been customized, click on the **Reset to factory settings** button: + +![](assets/en/Preferences/overviewSettings.png) + +This button resets all the parameters of the current page. It becomes active when at least one parameter has been modified on the current page. + diff --git a/website/translated_docs/es/Preferences/shortcuts.md b/website/translated_docs/es/Preferences/shortcuts.md new file mode 100644 index 00000000000000..ce039b2d7f044c --- /dev/null +++ b/website/translated_docs/es/Preferences/shortcuts.md @@ -0,0 +1,14 @@ +--- +id: shortcuts +title: Shortcuts Page +--- + +This page lists all the shortcuts used in the 4D Design environment (except for standard "system" shortcuts, such as Ctrl+C/Command+C for the Copy command). + +![](assets/en/Preferences/shortcuts.png) + +To modify a shortcut, you can select/deselect the item to modify (Shift, Alt or letter key) in the list. You can also double-click on a shortcut to configure it using a specific dialog box. + +Note that each shortcut implicitly includes the **Ctrl** (Windows) or **Command** (macOS) key. + +If you edit this list, your custom shortcuts settings are stored in a *4DShortcutsvXX.xml* file, created at the same level as the [user preferences file](overview.md#storage). Hence, each time 4D is updated your keyboard shortcut preferences remain. \ No newline at end of file diff --git a/website/translated_docs/es/Preferences/structure.md b/website/translated_docs/es/Preferences/structure.md new file mode 100644 index 00000000000000..daadac9ad15458 --- /dev/null +++ b/website/translated_docs/es/Preferences/structure.md @@ -0,0 +1,26 @@ +--- +id: structure +title: Structure Page +--- + +## Primary key + +These options in the preferences modify the default name and type of the primary key fields that are added automatically by 4D when new tables are created or by means of the [Primary key manager](https://doc.4d.com/4Dv18R6/4D/18-R6/Primary-key-manager.300-5217742.en.html)). + +The following options are available: + +* **Name** ("ID" by default): Sets the default name of primary key fields. You can use any name you want, as long as it respects the [4D naming rules](Concepts/identifiers.md#tables-and-fields). +* **Type** ([Longint](Concepts/dt_number.md) by default): Sets the default type of primary key fields. You can choose the UUID type. In this case, the primary key fields created by default are of the [Alpha type](Concepts/dt_string.md) and have the **UUID Format** and **Auto UUID** field properties checked. + +## Editor de estructura + +This group of options configures the display of the 4D Structure editor. + +### Graphic quality of the structure + +This option varies the level of graphic detail in the Structure editor. By default, the quality is set to **High**. You can select Standard quality in order to give priority to display speed. The effect of this setting is mainly perceptible when using the zoom function (see the "Zoom" paragraph in [Structure editor](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html)). + +### When a folder is dimmed, its contents are: + +This option sets the appearance of dimmed tables in the Structure editor, when you carry out selections by folder (see [Highlight/dim tables by folder](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html#4592928)). The possible options are Dimmed (a shadow replaces the table image) and Invisible (the table disappears completely). + diff --git a/website/translated_docs/es/Project/architecture.md b/website/translated_docs/es/Project/architecture.md index 2d5d0a61110f2f..7282ac66d869e8 100644 --- a/website/translated_docs/es/Project/architecture.md +++ b/website/translated_docs/es/Project/architecture.md @@ -1,175 +1,180 @@ --- id: architecture -title: Architecture of a 4D project +title: Arquitectura de un proyecto --- -A 4D project is made of several folders and files, stored within a single parent database folder (package folder). For example: - -- MyProject - - Components - - Data - - Logs - - Settings - - Documentation - - Plugins - - Project - - DerivedData - - Sources - - Trash - - Resources - - Settings - - userPreference.username - - WebFolder +A 4D project is made of several folders and files, stored within a single parent application folder (package folder). Por ejemplo: + +- MyProject + - `Componentes` + - `Data` + - `Logs` + - `Settings` + - `Documentation` + - `Plugins` + - `Project` + - `DerivedData` + - `Sources` + - `Trash` + - `Resources` + - `Settings` + - `userPreferences.jSmith` + - `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 - + Classes - + DatabaseMethods - + Methods - + Forms - + TableForms - + Triggers -+ DerivedData -+ Trash (if any) +- `.4DProject` file +- `Sources` + + `Clases` + + `DatabaseMethods` + + `Métodos` + + `Formularios` + + `TableForms` + + `Triggers` +- `DerivedData` +- `Trash` (if any) -### *databaseName*.4DProject file -Project development file, used to designate and launch the project. This file can be opened by: +### `.4DProject` file -- 4D Developer -- 4D Server (read-only, see [Developing a project](developing.md)) +Project development file, used to designate and launch the project. This file can be opened by: -**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. +- 4D +- 4D Server (read-only, see [Opening a remote project](Desktop/clientServer.md#opening-a-remote-project)) -### Sources folder +> In 4D projects, development is done with 4D and multi-user development is managed through source control tools. 4D Server can open .4DProject files for testing purposes. -| 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 | +### `Sources` -#### DatabaseMethods folder +| Contents | Descripción | Format | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| 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 | -| Contents | Description | Format | -| ------------------------ | ---------------------------------------------------------------------- | ------ | -| *databaseMethodName*.4dm | Database methods defined in the database. One file per database method | text | +#### `DatabaseMethods` -#### Methods folder +| Contents | Descripción | Format | +| ------------------------ | --------------------------------------------------------------------- | ------ | +| *databaseMethodName*.4dm | Database methods defined in the project. One file per database method | texto | -| Contents | Description | Format | -| ---------------- | ------------------------------------------------------------ | ------ | -| *methodName*.4dm | Project methods defined in the database. One file per method | text | +#### `Métodos` +| Contents | Descripción | Format | +| ---------------- | ----------------------------------------------------------- | ------ | +| *methodName*.4dm | Project methods defined in the project. One file per method | texto | -#### Classes folder +#### `Clases` -| Contents | Description | Format | +| Contents | Descripción | 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 | - - -#### Forms folder +| *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 | -| Contents | Description | Format | -| ----------------------------------------- | ------------------------------------------ | ------- | -| *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 | +#### `Formularios` -#### TableForms folder +| Contents | Descripción | Format | +| ----------------------------------------- | ------------------------------------------ | ------ | +| *formName*/form.4DForm | Project form description | json | +| *formName*/method.4dm | Project form method | texto | +| *formName*/Images/*pictureName* | Project form static picture | imagen | +| *formName*/ObjectMethods/*objectName*.4dm | Object methods. One file per object method | texto | -| Contents | Description | Format | -| ---------------------------------------------------- | ------------------------------------------------------ | ------- | -| *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*/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 | +#### `TableForms` +| Contents | Descripción | Format | +| ---------------------------------------------------- | ------------------------------------------------------ | ------ | +| *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 | imagen | +| *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 | imagen | +| *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 | +#### `Triggers` +| Contents | Descripción | Format | +| ------------- | ------------------------------------------------------------------------------------------ | ------ | +| table_*n*.4dm | Trigger methods defined in the project. 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 + +### `Trash` The Trash folder contains methods and forms that were deleted from the project (if any). It can contain the following folders: -- Methods -- Forms -- TableForms +- `Métodos` +- `Formularios` +- `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 + +### `DerivedData` 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 +## `Libraries` -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*. +> This folder is used on macOS only. -| Contents | Description | Format | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| *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 | +The Librairies folder contains the file resulting from a compilation with the [Silicon compiler](compiler.md#silicon-compiler) on macOS. + +## `Resources` +The Resources folder contains any custom project 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*. + +| Contents | Descripción | Format | +| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| *item* | Project 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. | imagen | (*) only if the project was exported from a .4db binary database. -## Data folder + +## `Data` The data folder contains the data file and all files and folders relating to the data. -| Contents | Description | Format | +| Contents | Descripción | 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 | - (*) 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 +### `Settings` -This folder contains **user settings files for data** used for database administration. +This folder contains **user settings files for data** used for application administration. -> These settings take priority over **[user settings files](#settings-folder-1)** and **structure settings** files. +> These settings take priority over **[user settings files](#settings-folder-1)** and **[structure settings](#sources-folder)** files. -| 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 | +| Contents | Descripción | Format | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| directory.json | Description of 4D groups, users, and their access rights when the application is run with this data file. | JSON | +| 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 | -### Logs folder +### `Logs` The Logs folder contains all log files used by the project. Log files include, in particular: @@ -179,52 +184,59 @@ 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. +> An additional Logs folder is available in the system user preferences folder (active 4D folder, see [Get 4D folder](https://doc.4d.com/4Dv18R4/4D/18-R4/Get-4D-folder.301-4982857.en.html) command) for maintenance log files and in cases where data folder is read-only. -## Settings folder +## `Settings` -This folder contains **user settings files** used for database administration. File are added to the folder when necessary. +This folder contains **user settings files** used for application administration. -> If a data settings file exists in a Settings folder [in the data folder](#settings-folder), it takes priority over user settings file. +> These settings take priority over **[structure settings](#sources-folder)** files. However, if a **[user settings file for data](#settings-folder)** exists, it takes priority over user settings file. -| Contents | Description | Format | +| Contents | Descripción | 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 | +| directory.json | Description of 4D groups and users for the application, as well as their access rights | JSON | | 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.` +Esta carpeta contiene archivos que memorizan las configuraciones del usuario, por ejemplo, el punto de ruptura o las posiciones de las ventanas. You can just ignore this folder. It contains for example: -## userPreferences.*userName* folder +| Contents | Descripción | 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 | +| preferences.4DPreferences | Ruta de datos actual y posiciones de la ventana principal | XML | +| CompilerIntermediateFiles | Intermediate files resulting from Apple Silicon compilation | Folder | -This folder contains files that memorize user configurations, e.g. break point positions. 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 | +## `Componentes` +This folder contains the components to be available in the application project. It must be stored at the same level as the Project folder. -## Components folder +> An application project can be used itself as a component: - for development: put an alias of the .4dproject file in the Components folder of the host project. - for deployment: [build the component](Desktop/building.md#build-component) and put the resulting .4dz file in a .4dbase folder in the Components folder of the host application. -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. -> 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` -## Plugins folder +This folder contains the plug-ins to be available in the application project. It must be stored at the same level as the Project 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. -## Documentation folder +## `Documentation` This folder contains all documentation files (.md) created for the project elements such as classes, methods, or forms. Documentation files are managed and displayed in the 4D Explorer. For more information, refer to [Documenting a project](Project/documentation.md). -## WebFolder +## `WebFolder` + +Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. + +## `.gitignore` file (optional) -Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. \ No newline at end of file +File that specifies which files will be ignored by git. You can include a gitignore file in your projects using the **Create .gitignore file** option on the **General** page of the preferences. To configure the contents of that file, see [Create `.gitignore` file](Preferences/general.md#create-gitignore-file). diff --git a/website/translated_docs/es/Project/building.md b/website/translated_docs/es/Project/building.md index f1555001c3f025..e514c243fec36a 100644 --- a/website/translated_docs/es/Project/building.md +++ b/website/translated_docs/es/Project/building.md @@ -82,11 +82,7 @@ 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. -If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: - -< - -p>*\/Components/name.4dbase/\.4DZ*. +If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: *\/Components/name.4dbase/\.4DZ*. 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). diff --git a/website/translated_docs/es/Project/compiler.md b/website/translated_docs/es/Project/compiler.md new file mode 100644 index 00000000000000..f407097b8161a6 --- /dev/null +++ b/website/translated_docs/es/Project/compiler.md @@ -0,0 +1,332 @@ +--- +id: compiler +title: Compilation +--- + +You can compile your projects, i.e., translate all of your methods into machine language. Compiling a project lets you check the consistency of the code and accelerate its execution, as well as making it possible to obfuscate the code in its entirety. Compilation is an indispensable step between the development of projects using 4D and their deployment as stand-alone applications. + + +## Compile + +The compilation is handled from your 4D application and is entirely automatic. + +> On macOS, the compilation requires that you install `Xcode`. See [this section](#silicon-compiler) for more information about this requirement. + +1. Open the compiler window by selecting the **Compiler...** command in the **Design** menu or the **Compiler** toolbar button. + + ![](assets/en/Project/compilerWin1.png) + + ![](assets/en/Project/comp1.png) + +> You can also launch directly the compilation by selecting the **Start Compilation** menu item from the **Design** menu. + +2. Click the **Compile** button to launch the compilation using the current [compilation settings](#compiler-settings). + +If no errors are detected, the actual compilation begins and the "Compilation successful" message is displayed at the bottom of the window when the compilation is completed: + +![](assets/en/Project/success.png) + +You can immediately [run your application in compiled mode](#run-compiled) and see how faster it is. + +If errors are detected, the process is stopped and the "Compilation failed" message is displayed. The information area of the window displays the method names and line numbers concerned in a hierarchical list: + +![](assets/en/Project/compilerWin2.png) + +Double-click on each error detected to open the method or class concerned directly in the 4D method editor. The line containing the error is highlighted and the type of error is displayed in the syntax area of the window. + +Use the **Previous Error** / **Next Error** commands of the **Method** menu to navigate from one error to the next. + +The number of errors found during your first compilations may be daunting, but do not let this put you off. You will soon discover that they often spring from the same source, i.e., non-compliance with certain project conventions. The compiler always provides a [precise diagnosis](#error-files) of the errors in order to help you correct them. + +> Compilation requires an appropriate license. Without this license, it is not possible to carry out a compilation (buttons are disabled). Nevertheless, it is still possible to check the syntax and generate Typing methods. + +## Run Compiled + +Once a project is compiled, it is possible to switch from [interpreted mode to compiled mode](Concepts/interpreted.md), and vice versa, at any time and without having to quit the 4D application (except when the interpreted code has been removed). To do this, use tge **Restart Interpreted** and **Restart Compiled** commands of the **Run** menu. The [Open project dialog box](creating.md#options) also offers a choice between interpreted or compiled mode for database startup. + +When you switch from one mode to the other, 4D closes the current mode and opens the new one. This is equivalent to exiting and reopening the application. Each time you change from one mode to another, 4D executes the two following database methods (if specified) in this order: `On Exit` -> `On Startup`. + +If you modify your project in interpreted mode, you must recompile it in order to have your edits taken into account in compiled mode. + +## Compiler window features + +In addition to the [**Compile** button](#compile), the Compiler window provides additional features that are useful during the project development phase. + +### Check Syntax + +The **Check Syntax** button starts the execution of the syntax-checking phase. At the end of the checking process, any errors detected are listed in the information area. You can double–click on an error line in order to display the corresponding method. + +Syntax checking can also be launched directly using the **Check Syntax** command associated with the **Compiler** toolbar button. This option is the only one available if you do not have a suitable license to allow the compilation of applications. + +### Generate Typing + +The **Generate Typing** button creates or updates typing compiler methods. Compiler methods are project methods that group together all the variable and array typing declarations (process and interprocess), as well as the method parameters. These methods, when they exist, are used directly by the compiler during code compilation, resulting in faster compilation times. + +The name of these methods must begin with `Compiler_`. You can set the default name for each of the 5 compiler methods in the [compiler settings window](#compiler-methods-for). The compiler methods that are generated and maintained by 4D automatically have the `Invisible` attribute: + +![](assets/en/Project/compilerWin3.png) + +Only the necessary compiler methods (i.e., those for which items already exist in the project) are generated. + +The information area indicates any errors found during method creation or updating. Double-clicking on an error line causes the method and line concerned to be displayed in the Method editor. + + +### Clear compiled code + +The **Clear compiled code** button deletes the compiled code of the project. When you click on it, all of the [code generated during compilation](#classic-compiler) is deleted, the **Restart Compiled** command of the **Run** menu is disabled and the "Compiled Project" option is not available at startup. + + +### Show/Hide Warnings + +Warnings are specific messages generated by the compiler when it checks the syntax. These messages are intended to draw your attention to statements that might lead to execution errors. They do not prevent compilation. + +Depending on circumstances and the programming style used, these warnings may be more or less relevant. You can toggle the warnings on or off by clicking the **Show/Hide Warnings** button: + +![](assets/en/Project/compilerWin4.png) + +When this option is checked, the warnings (if any) are displayed in the window, after the other error types. They appear in italics: + +![](assets/en/Project/compilerWin5.png) + +Double-clicking a warning opens the corresponding method. + +#### Disabling warnings during compilation + +You can selectively disable certain warnings during compilation by inserting the following into the code of a 4D method: + +```4d + //%W- +``` + +Only warnings with numbers can be disabled. Warning numbers are specified at the end of each message in the list of compilation errors. For example, to disable the following warning: + +*1: Pointer in an array declaration (518.5)* + +... you just need to write the following comment in a 4D method, preferably a `COMPILER_xxx` method (method compiled first): + +```4d + //%W-518.5 +``` + + + +## Compiler Settings + +The "Compiler" page of the Settings dialog box lets you set parameters related to project compilation. You can directly open this page from the [compiler window](#compiler-window) by clicking on the **Compiler Settings** button: + +![](assets/en/Project/compilerWin6.png) + + +### Compilation options + +This area groups the generic options used during the compilation process. + +#### Generate the symbol file + +Used to generate the symbol file (see [symbol file](#symbol-file)). The symbol file is created in the project folder with the name `ProjectName_symbols.txt`. + +#### Generate error file + +Used to generate the error file (see [error file](#symbol-file)) at the time of syntax checking. The error file is created in the project folder with the name `ProjectName_errors.xml`. + + +#### Compilation Path + +Used to set the number of passes (code parsing) performed by the compiler and thus the duration of compilation. + +- **Type the variables**: Passes by all the stages that make compilation possible. +- **Process and interprocess are typed**: The pass for typing process and interprocess variables is not carried out. This option can be used when you have already carried out the typing of all your process and interprocess variables either yourself or using the function for automatic generation of compiler methods. +- **All variables are typed**: The pass for typing local, process and interprocess variables is not carried out. Use this option when you are certain that all the process, interprocess and local variables have been clearly typed. + +#### Compilation Target + +

      History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
      + +This setting allows you to select the processor family for which your 4D project must be natively compiled. The 4D compiler can build native code for two processor families: + +- **Intel/AMD** processors (all machines), +- **Apple Silicon** processors. + +Two target options are proposed. The result depends on the processor of the machine on which 4D is running. + +| *Option* | *on Windows Intel/AMD* | *on macOS Intel* | *on macOS Silicon* | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| **All processors (Intel/AMD and Apple Silicon)** | Code for Intel/AMD
      *It is not possible to produce Apple Silicon code on Windows* | Code for Apple Silicon + Code for Intel/AMD
      *Two compiled codes will be available* | Code for Apple Silicon + Code for Intel/AMD
      *Two compiled codes will be available* | +| **My processor (processor)** | Code for Intel/AMD | Code for Intel/AMD | Code for Apple Silicon | + +> Apple Silicon compiler target requires that the **Clang** application be installed on your machine. Clang comes with the latest version of Xcode. See the [Silicon compiler requirements](#requirements) for more information. + +### Default typing + +Use this area to set the default type for ambiguous database objects. + +- **Numeric**: Used to force numeric typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. You can optimize the running of your database by choosing the Longint type. +- **Button**: Used to force button typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. This type applies to buttons as well as check boxes, picture buttons, button grids, radio buttons, picture pop-up menus and drop-down lists. + +### Compiler Methods for... + +This area lets you rename the Compiler methods that are generated automatically by the compiler when you click [Generate Typing](#generate-typing). + +Up to 5 compiler methods may be generated; a compiler method is only generated if the project contains the following items: + +- **Variables**: Groups together process variable declarations; +- **Interprocess Variables**: Groups together interprocess variable declarations; +- **Arrays**: Groups together process array declarations; +- **Interprocess Arrays**: Groups together interprocess array declarations; +- **Methods**: Groups together method parameter declarations (for instance, `C_LONGINT(mymethod;$1;$2)`). + +You can rename each of these methods in the corresponding areas, but they will always be preceded by the label `Compiler_` (non-modifiable). The name of each method (prefix included) must be no longer than 31 characters. It must also be unique and comply with [4D rules for naming methods](Concepts/identifiers.md#project-methods). + + +## Compilation tools + +### Symbol file + +If you check the [**Generate the symbol file**](#generate-the-symbol-file) option in the compiler settings, a symbol file called `ProjectName_symbols.txt` is created in the project folder during compilation. It is divided into several parts: + +#### List of process and interprocess variables + +These two lists contain four columns: + +- Names of process and interprocess variables and arrays used in your project. These variables are listed in alphabetical order. +- Type of the variable. Types are set by compiler directive commands or are determined by the compiler based on the use of the variable. If the type of a variable cannot be determined, the column is empty. +- Number of dimensions if the variable is an array. +- Reference to the context in which the compiler established the type of the variable. If the variable is used in several contexts, the context mentioned is the one used by the compiler to determine its type. + - If the variable was found in a database method, the database method name is given, preceded by (M)*. + - If the variable was found in a project method, the method is identified as it has been defined in 4D, preceded by (M). + - If the variable was found in a trigger, the table name is given, preceded by (TM). + - If the variable was found in a form method, the form name is given, preceded by the table name and (FM). + - If the variable was found in an object method, the object method’s name is given, preceded by the form name, table name, and by (OM). + - If the variable is an object in a form and does not appear in any project, form, object method, or trigger, the name of the form in which it appears is given, preceded by (F). At the end of each list, you can find the sizes of the process and interprocess variables in bytes. + +> When compiling, the compiler cannot determine in which process a given process variable is used. A process variable can have a different value in each process. Consequently, all process variables are systematically duplicated as each new process is launched: it is thus advisable to watch out for the amount of memory that they will take up. Also, keep in mind that the space for process variables is not related to the stack size for the process. + +#### List of local variables + +The list of local variables is sorted by database method, project method, trigger, form method, and object method, in the same order as in 4D. + +This list is divided into three columns: + +- list of local variables used in the method; +- type of the variable; +- number of dimensions if the variable is an array. + +#### Complete list of methods + +A complete list of your database and project methods is given at the end of the file with: + +- their type (procedure or function returning a value) +- the data types of their parameters and the returned result +- the number of calls +- the Thread Safe or Thread Unsafe property. + +This information appears as follows: + +``` +Procedure or Function (parameter data types): +result data type, number of calls, Thread Safe or Thread Unsafe +``` + +### Error file + +You can choose whether or not to generate an error file during compilation using the [**Generate error file**](#generate-error-file) option in the compiler settings. The error file is automatically named `projectName_errors.xml` and is placed in the project folder. + +Although the errors can be accessed directly via the [compiler window](#compile), it can be useful to have an error file that can be transmitted from one machine to another. The error file is generated in XML format in order to facilitate automatic parsing of its contents. It also allows the creation of customized error display interfaces. + +The length of the error file depends on the number of errors and warnings issued by the compiler. + +The structure of the error file is as follows: + +- At the top of the file is the list of errors and warnings, sorted by method and in their order of creation in 4D. In the ***General errors*** section, all the typing impossibilities and identity ambiguities are grouped together. These errors and warnings are listed using the following format: + - line number in the method (0 indicates general errors) + - warning attribute indicating whether the detected anomaly is a warning (warning="true") or an error (warning="false") + - diagnostic describing the error + +If your project does not have any general errors, the file will not have a *General errors* section. + +An error file may contain three types of messages: + +- **Errors linked to a specific line**: these errors are displayed in context — the line in which they were found — with an explanation. The compiler reports this type of error when it encounters an expression in which it sees an inconsistency related to data type or syntax. In the compiler window, double–click on each error detected in order to open the method concerned directly in the 4D Method editor, with the line containing the error highlighted. + +- **General errors**: These are errors that make it impossible to compile the project. There are two cases in which the compiler reports a general error: + - The data type of a process variable could not be determined. + - Two different kinds of objects have the same name. General errors are so named because they cannot be linked to any specific method. In the first case, the compiler could not perform a specified typing anywhere in the project. In the second, it was unable to decide whether to associate a given name with one object rather than with another. + +- **Warnings**: Warnings are not errors. They do not prevent the project from being compiled, but simply point out potential code errors. In the compiler window, warnings appear in italics. Double-click on each warning to open the method concerned directly in the 4D Method editor, with the line containing the warning highlighted. + + + + +### Range checking + +The code generated by the 4D compiler automatically checks that every access to an array element or a character reference is done within the actual range of array elements or string characters. Out of range accesses will provoke runtime execution errors. + +In some cases, you might prefer range checking not to apply to certain parts of the code that are considered to be reliable. More particularly, in the case of loops that are repeated a great number of times, and when running the compiled database on older machines, range checking can significantly slow down processing. If you are absolutely certain that the code concerned is reliable and cannot cause system errors, you can disable range checking locally. + +To do this, you must surround the code to be excluded from range checking with the special comments `//%R-` and `//%R+`. The `//%R-` comment disables range checking and `//%R+` enables it again: + +```4d + // %R- to disable range checking + + ... //Place the code to be excluded from range checking here + + // %R+ to enable range checking again for the rest +``` + +## About Compilers + +4D contains two compilers: + +- a "classic" compiler, used to compile native code for Intel/AMD processors; +- a Silicon compiler, used to compile native code for Apple Silicon processors. + +The classic compiler can be used on any platform, while the Silicon compiler can only be used on a Mac machine: + +| | Compile for Windows | Compile for Intel Mac | Compile for Silicon Mac | +| -------------- |:-------------------:|:---------------------:|:-----------------------:| +| On Windows | ✓ | ✓ | ✗ | +| On Intel Mac | ✓ | ✓ | ✓ | +| On Silicon Mac | ✓ | ✓ | ✓ | + + +Both compilers are integrated into 4D. The appropriate compiler is automatically selected depending on the [compilation target](#compilation-target) option. + + + +### Classic Compiler + +The classic compiler generates native compiled code for Intel/AMD processors on any machines. It does not require any specific configuration. + +Resulting compiled code is stored in the [DerivedData](architecture.md#deriveddata-folder) folder of the project. + + +### Silicon Compiler + +The Silicon compiler generates native compiled code for Apple Silicon processors, such as *Apple M1*. + +Resulting compiled code is stored in the [Libraries](architecture.md#libraries-folder), folder of the project. + + +#### Requisitos + +- **Apple machine**: The Silicon compiler can only be run from an Apple machine. +- **4D Project architecture**: The Silicon compiler is only available for 4D developments using [project architecture](architecture.md). +- **Xcode or Developer Tools**: The Silicon compiler calls the **Clang** open-source macOS compiler to compile the project from C++ code at the [second step](#two-step-incremental-compiler) of compilation. *clang* requires Apple native libraries, which are provided by either the **Xcode** or **Developer Tools** package. + - **If you already have** Xcode or Developer Tools installed on your computer, you only need to make sure that its version is compliant with 4D requirements. + - **If you do not have** any of these tools installed on your computer, you will need to download one of them from the Apple Developer web site. + +> We recommend to install **Xcode**, which is quite simple to install. You can decide to install **Developer Tools** which is more compact, however its installation is a little more complex. + +In any cases, the 4D Silicon compiler will warn you if your configuration does not comply with its requirements. + + +#### Incremental compiler + +The Silicon compiler is incremental, which means that: + +- During the very first compilation, **all 4D methods** are compiled. This step could take a certain time. However it only occurs once. +- During all subsequent compilations, only **new or modified methods** are processed, thus reducing drastically the compilation time. \ No newline at end of file diff --git a/website/translated_docs/es/Project/components.md b/website/translated_docs/es/Project/components.md new file mode 100644 index 00000000000000..fd0da4cd47a80c --- /dev/null +++ b/website/translated_docs/es/Project/components.md @@ -0,0 +1,29 @@ +--- +id: componentes +title: 4D Components Library +--- + +4D includes an extended library of built-in 4D components. A [component](Concepts/components.md) provides additional functionalities to your 4D projects. + +## List of 4D Components + +| Component Name | Descripción | Where to find documentation | +| --------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| 4D Mobile App Server | Set of utility classes and functions to authenticate, manage sessions, and develop mobile applications | [4d-go-mobile github repository](https://github.com/4d-go-mobile/4D-Mobile-App-Server) | +| 4D Progress | Open one or more progress bars in the same window | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Progress.100-5461799.en.html) | +| 4D SVG | Create and manipulate common svg graphic objects | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-SVG-Component.300-5462064.en.html) | +| 4D ViewPro | Spreadsheet features in your forms | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-View-Pro-Reference.100-5442901.en.html) | +| 4D Widgets | Manage DatePicker, TimePicker, SearchPicker 4D widgets | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Widgets.100-5462909.en.html) | +| 4D WritePro Interface | Manage 4D Write Pro palettes | [4d github repository](https://github.com/4d/4D-WritePro-Interface) | + + +> You can develop and install your own 4D components. See [this section](Concepts/components.md) for more information. + + +## Documentation in the Explorer + +When an installed component contains methods, they appear in the **Component Methods** theme of the Explorer's Methods page. + +Select a component method and click on the **Documentation** button of the Explorer to get information about it, [if any](documentation.md). + +![alt-text](assets/en/Project/compDoc.png) \ No newline at end of file diff --git a/website/translated_docs/es/Project/creating.md b/website/translated_docs/es/Project/creating.md index 950ab3572a10cb..8fc589ffd7c76b 100644 --- a/website/translated_docs/es/Project/creating.md +++ b/website/translated_docs/es/Project/creating.md @@ -1,27 +1,115 @@ --- id: creating -title: Creating a 4D project +title: Working with a project --- -## Requirements +4D projects are created and developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). **4D Server** can also create new, empty projects. -New 4D projects can only be created from **4D Developer** (see [Developing a project](developing.md)). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -**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). +## Creating a project -## Creating the project files +New 4D application projects can be created from **4D** or **4D Server**. In any case, project files are stored on the local machine. -To create a new database project: +To create a new project: -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. +1. Launch 4D or 4D Server. +2. Select **New > Project...** from the **File** menu:

      ![](assets/en/getStart/projectCreate1.png)

      O

      (4D only) Select **Project...** from the **New** toolbar button:

      ![](assets/en/getStart/projectCreate2.png)

      A standard **Save** dialog appears so you can choose the name and location of the 4D project's main folder. -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). +3. Enter the name of your project folder and click **Save**.

      This name will be used: + - as the name of the entire project folder, + - as the name of the .4DProject file at the first level of the "Project" folder. -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 + You can choose any name allowed by your operating system. However, if your 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. + +When you validate the **Save** dialog, 4D closes the current project (if any), creates a project folder at the indicated location, and puts all files needed for the project into it. Para más información, consulte [Arquitectura de un proyecto 4D](Project/architecture.md). + +You can then start developing your project. + +## Opening a project + +To open an existing project from 4D: + +1. Select **Open a local application project** in the Welcome Wizard dialog,

      O

      Select **Open/Local Project...** from the **File** menu or the **Open** toolbar button.

      The standard Open dialog appears. + +2. Select the project's `.4dproject` file and click **Open**.

      By default, the project is opened with its current data file. Other file types are suggested: + + - *Packed project files*: `.4dz` extension - deployment projects + - *Shortcut files*: `.4DLink` extension - store additional parameters needed for opening projects or applications (addresses, identifiers, etc.) + - *Binary files*: `.4db` or `.4dc` extension - legacy 4D database formats + +### Options + +In addition to standard system options, the *Open* dialog in 4D provides two menus with specific options that are available using the **Open** button and the **Data file** menu. + +- **Open** - opening mode of the project: + - **Interpreted** or **Compiled**: These options are available when the selected project contains both [interpreted and compiled code](Concepts/interpreted.md). + - **[Maintenance Security Center](MSC/overview.md)**: Opening in secure mode allowing access to damaged projects in order to perform any necessary repairs. + +- **Data file** - specifies the data file to be used with the project. By default, the **Current data file** option is selected. + +## Project opening shortcuts + +4D offers several ways to open projects directly and bypass the Open dialog: + +- via menu options: + - *Menu bar* - **File** > **Open Recent Projects / {project name}** + - *4D Tool bar* - Select the project from the menu associated with the **Open** button + +- via preferences: + - Set the **At startup** general preference to **Open last used project**. + +- using a `.4DLink` file. + +### Opening a Project with a 4DLink file + +You can use a [`.4DLink` file](#about-4DLink-files) to launch the 4D application and open the target 4D project. There are two ways to do this: + +- double-click or drag and drop the `.4DLink` file onto the 4D application +- go to **File** > **Open Recent Projects** and select a project + +![open-recent-projects](assets/en/Project/4Dlinkfiles.png) + +A .4DLink file of "remote project" type can be copied and used on several machines. +> It's also possible to select a 4DLink file in the 4D and 4D Server opening dialog box (opening local project only). + +## About 4DLink Files + +Files with the `.4DLink` extension are XML files that contain parameters intended to automate and simplify opening local or remote 4D projects. + +`.4DLink` files can save the address of a 4D project as well as its connection identifiers and opening mode, saving you time when opening projects. + +4D automatically generates a `.4DLink` file when a local project is opened for the first time or when connecting to a server for the first time. The file is stored in the local preferences folder at the following location: + +- Windows 7 and higher: C:\Users\UserName\AppData\Roaming\4D\Favorites vXX\ +- OS X: Users/UserName/Library/Application Support/4D/Favorites vXX/ + +XX represents the version number of the application. For example, "Favorites v19" for 4D v19. + +That folder is divided into two subfolders: +- the **Local** folder contains the `.4DLink` files that can be used to open local projects +- the **Remote** folder contains the `.4DLink` files of recent remote projects + +`.4DLink` files can also be created with an XML editor. + +4D provides a DTD describing the XML keys that can be used to build a `.4DLink` file. This DTD is named database_link.dtd and is found in the \Resources\DTD\ subfolder of the 4D application. + + +## File saving + +When working on a project in 4D, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Modifications are saved to disk when you select a **Save** menu item, or when the editor's window loses or gets the focus. + +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 development framework includes a file access manager to control concurrent access: + +- if an open file is read-only at the OS level, a locked icon is displayed in the editor: ![](assets/en/Project/lockicon.png) +- si un archivo abierto se edita simultáneamente desde diferentes ubicaciones, 4D muestra un diálogo de alerta al intentar guardar los cambios: + +![](assets/en/Project/projectReload.png) + - **Yes**: discard editor changes and reload the modified version + - **No**: save changes and overwrite the other version + - **Cancel**: do not save + +This feature is enabled for all built-in 4D editors (Structure, Form, Method, Settings, and Toolbox). \ No newline at end of file diff --git a/website/translated_docs/es/Project/developing.md b/website/translated_docs/es/Project/developing.md index 062c69a0b39e46..367541c61f7c4c 100644 --- a/website/translated_docs/es/Project/developing.md +++ b/website/translated_docs/es/Project/developing.md @@ -3,31 +3,81 @@ id: developing title: Developing a project --- -## Development tools +4D projects are developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). -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). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -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. -Multi-user development is managed through standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. -## Project file access +## File saving -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. +When working on a project in 4D, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Modifications are saved to disk when you select a **Save** menu item, or when the editor's window loses or gets the focus. -The 4D Developer framework includes a file access manager to control concurrent access: +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. -- 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 +The 4D development framework includes a file access manager to control concurrent access: + +- if an open file 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 when trying to save the changes: ![](assets/en/Project/projectReload.png) + - **Yes**: discard editor changes and reload the modified version - **No**: save changes and overwrite the other version - **Cancel**: do not save -This feature is enabled for all built-in editors: +This feature is enabled for all built-in 4D editors (Structure, Form, Method, Settings, and Toolbox). + + + +4D projects are developed using the **4D** application. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project manager, and an application runtime, allowing to develop, test, and debug any kind of project. + +> Because most of the 4D project files are text files, you can use any text editor to work in them. Concurrent file access is handled via a file access manager (see below). + +Multi-user development is managed via standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. + + +## Development configurations + +Interpreted projects (*applicationName.4DProject*, see [Architecture of a 4D project](architecture.md)) can be opened in the following configurations: + +- 4D opening **local project files** - in this case, all aspects of the project are available to the developer. Project files can be created, modified, compiled, etc. The result of the development can be tested at any moment by using the **Test application** menu command from 4D or using the [integrated web server](WebServer/webServerObject.md). +- 4D connection from the **same machine as 4D Server** - in this case, development is supported the same as local projects. This feature allows you to develop a client/server application in the same context as the deployment context ()[detailed below](#developing-projects-with-4d-server)). +- 4D connection from a **remote machine** - in this case, 4D Server sends a .4dz version of the project ([compressed format](Admin/building.md#build-compiled-structure)) to 4D. As a consequence, all structure files are read-only. This feature is useful for testing purposes. + + +## Developing projects with 4D Server + +### Updating project files on the server + +Developing a 4D Server project is based upon the following principles: + +- You create, test, and modify the project features in a local version of the files using 4D. To work directly with 4D Server, you can [use 4D on the same machine as 4D Server](#using-4d-on-the-same-machine). + +> It is recommended to use a standard source control tool (e.g. Git) in order to work with branches, to save projects at different steps, and/or to revert changes if necessary. + +- 4D Server can run the *.4DProject* project file (not compressed) in interpreted mode, so that remote 4D can connect and test the features. For this purpose, 4D Server automatically creates and sends the remote machines a [.4dz version](Admin/building.md#build-compiled-structure) of the project. + +- An updated .4dz version of the project is automatically produced when necessary, *i.e.* when the project has been modified and reloaded by 4D Server. The project is reloaded: + - automatically, when the 4D Server application window comes to the front of the OS or when the 4D application on the same machine saves a modification (see below). + - when the `RELOAD PROJECT` command is executed. Calling this command is necessary for example when you have pulled a new version of the project from the source control platform. + + +### Updating project files on remote machines + +When an updated .4dz version of the project has been produced on 4D Server, connected remote 4D machines must log out and reconnect to 4D Server in order to benefit from the updated version. + + + +### Using 4D on the same machine + +When 4D connects to a 4D Server on the same machine, the application behaves as 4D in single user mode and the design environment allows you to edit project files. Each time 4D performs a **Save all** action from the design environment (explicitly from **File** menu or implicitly by switching to application mode for example), 4D Server synchronously reloads project files. 4D waits for 4D Server to finish reloading the project files before it continues. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](architecture.md): + +- the userPreferences.{username} folder used by 4D is not the same folder used by 4D Server in the project folder. Instead, it is a dedicated folder, named "userPreferences", stored in the project system folder (i.e., the same location as when opening a .4dz project). +- the folder used by 4D for derived data is not the folder named "DerivedData" in the project folder. Instead it is a dedicated folder named "DerivedDataRemote" located in the project system folder. +- the catalog.4DCatalog file is not edited by 4D but by 4D Server. Catalog information is synchronised using client/server requests +- the directory.json file is not edited by 4D but by 4D Server. Directory information is synchronised using client/server requests +- 4D uses its own internal components and plug-ins instead of those in 4D Server. + +> It is not recommended to install plug-ins or components at the 4D or 4D Server application level. + -- Structure editor -- Form editor -- Method editor -- Settings editor -- Toolbox editor \ No newline at end of file diff --git a/website/translated_docs/es/Project/documentation.md b/website/translated_docs/es/Project/documentation.md index 9a6cb54a714bf6..02a2bbec542498 100644 --- a/website/translated_docs/es/Project/documentation.md +++ b/website/translated_docs/es/Project/documentation.md @@ -1,16 +1,16 @@ --- id: documentation -title: Documenting a project +title: Documentar un proyecto --- -## Overview -In project databases, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for databases being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the database. + +In application projects, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for projects being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the application. The following project elements accept documentation: - Methods (database methods, component methods, project methods, form methods, 4D Mobile methods, triggers, and classes) -- Forms +- Formularios - Tables and Fields Your documentation files are written in Markdown syntax (.md files) using any editor that supports Markdown. They are stored as independant files within your project folder. @@ -21,6 +21,7 @@ Documentation is displayed in the preview area (right-side panel) of the Explore It can also be partially exposed as [code editor tips](#viewing-documentation-in-the-code-editor). + ## Documentation files ### Documentation file name @@ -29,39 +30,40 @@ Documentation files have the same name as their attached element, with the ".md" In the Explorer, 4D automatically displays the documentation file with the same name as the selected element (see below). + ### Documentation file architecture All documentation files are stored in the `Documentation` folder, located at the first level of the package folder. The `Documentation` folder architecture is the following: -- **Documentation** - - + **Classes** +- `Documentation` + + `Clases` * myClass.md - * **DatabaseMethods** + + `DatabaseMethods` * onStartup.md * ... - * **Forms** + + `Formularios` * loginDial.md * ... - * **Methods** + + `Métodos` * myMethod.md * ... - * **TableForms** - * **1** + + `TableForms` + * **1** - input.md - ... - - ... - - **Triggers** + * ... + + `Triggers` * table1.md * ... -* A project form and its project form method share the same documentation file for form and method. -* A table form and its table form method share the same documentation file for form and method. +- A project form and its project form method share the same documentation file for form and method. +- A table form and its table form method share the same documentation file for form and method. > Renaming or deleting a documented element in your project will also rename or delete the element's associated Markdown file. + ## Documentation in the Explorer ### Viewing documentation @@ -93,6 +95,8 @@ If there is no documentation file for the selected element, you can: If a documentation file already exists for the selected element, you can open it with your Markdown editor by choosing the **Edit Documentation...** option in the contextual menu or options menu of the Explorer. + + ## Viewing documentation in the code editor The 4D code editor displays a part of a method's documentation in its help tip. @@ -104,10 +108,12 @@ If a file named "\.md" exists in "\/documentation" folder, - Any text entered in an HTML `comment` tag (*\*) at the top of the markdown file. - Or, if no html `comment` tag is used, the first sentence after a `# Description` tag of the markdown file. - In this case, the first line contains the **prototype** of the method, automatically generated by the 4D code parser. - + In this case, the first line contains the **prototype** of the method, automatically generated by the 4D code parser. + > Otherwise, the code editor displays [the block comment at the top of the method code](https://doc.4d.com/4Dv18R2/4D/18-R2/Writing-a-method.300-4824019.en.html#4618226). + + ## Documentation file definition 4D uses a basic template to create new documentation files. This template suggests specific features that allow you to [display information in the code editor](#viewing-documentation-in-the-code-editor). @@ -118,117 +124,79 @@ New documentation files are created with the following default contents: ![](assets/en/Project/comments-explo4.png) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Line - - Description -
      - \ - - HTML comment. Used in priority as the method description in the code editor tips -
      - ## Description - - Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used -
      - ## Example - - Heading level 2, you can use this area to show sample code -
      - ```4D
      Type your example here ``` -
      - Used to format 4D code examples (uses highlight.js library) -
      +| Line | Descripción | +| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| "\" | HTML comment. Used in priority as the method description in the [code editor tips](#viewing-documentation-in-the-code-editor) | +| ## Description | Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used | +| ## Example | Heading level 2, you can use this area to show sample code | +| \``` 4D
      Type your example here \` `` | Used to format 4D code examples (uses highlight.js library) | -### Supported Markdown +### Supported Markdown - The title tag is supported: - - # Title 1 - ## Title 2 - ### Title 3 - +``` +# Title 1 +## Title 2 +### Title 3 +``` - The style tags (italic, bold, strikethrough) are supported: - _italic_ - **bold** - **_bold/italic_** - ~~strikethrough~~ - - -- The code block tag (```4d ...```) is supported with 4D code highlight: - - \ - - 4d - C_TEXT($txt) - $txt:="Hello world!" - \ +``` +_italic_ +**bold** +**_bold/italic_** +~~strikethrough~~ +``` + + +- The code block tag (\```4d ... ```) is supported with 4D code highlight: + + \``` 4d + C_TEXT($txt) + $txt:="Hello world!" + \` `` + - The table tag is supported: - | Parameter | Type | Description | - | --------- | ------ | ------------ | - | wpArea | String |Write pro area| - | toolbar | String |Toolbar name | - +``` +| Parameter | Type | Description | +| --------- | ------ | ------------ | +| wpArea | String |Write pro area| +| toolbar | String |Toolbar name | +``` + - The link tag is supported: - // Case 1 - The [documentation](https://doc.4d.com) of the command .... - - // Case 2 - [4D blog][1] - - [1]: https://blog.4d.com - +``` +// Case 1 +The [documentation](https://doc.4d.com) of the command .... + +// Case 2 +[4D blog][1] + +[1]: https://blog.4d.com +``` - The image tags are supported: - ![image info](pictures/image.png) - - ![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") - - [![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) - +``` +![image info](pictures/image.png) + +![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") +[![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) +``` [![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) > For more information, see the [GitHug Markdown guide](https://guides.github.com/features/mastering-markdown/). -## Example + + + +## Ejemplo In the `WP SwitchToolbar.md` file, you can write: @@ -261,4 +229,4 @@ $logo:=GetLogo(5) - Explorer view: ![](assets/en/Project/explorer_Doc.png) -- Code editor view: ![](assets/en/Project/comments-explo5.png) \ No newline at end of file +- Code editor view: ![](assets/en/Project/comments-explo5.png) diff --git a/website/translated_docs/es/Project/licenses.md b/website/translated_docs/es/Project/licenses.md new file mode 100644 index 00000000000000..f3d9185d7c56bc --- /dev/null +++ b/website/translated_docs/es/Project/licenses.md @@ -0,0 +1,142 @@ +--- +id: licenses +title: Managing 4D Licenses +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example in the following cases: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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. + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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: + + + +![](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 . +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: (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: +- Telephone: 1-408-557-4600 + +For the UK: + +- Web: +- Telephone: 01625 536178 \ No newline at end of file diff --git a/website/translated_docs/es/Project/overview.md b/website/translated_docs/es/Project/overview.md index f94cdde3c20ce3..78c027a22ca3a8 100644 --- a/website/translated_docs/es/Project/overview.md +++ b/website/translated_docs/es/Project/overview.md @@ -1,35 +1,33 @@ --- -id: overview -title: Overview +id: generalidades +title: Generalidades --- -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. +A 4D project contains all of the source code of a 4D application, whatever its deployement type (web, mobile, or desktop), from the database structure to the user interface, including code, forms, menus, user settings, or any required resources. A 4D project is primarily made of text-based files. -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... +4D project files are open and edited using regular 4D platform applications (4D or 4D Server). With 4D, full-featured editors are available to manage files, including a structure editor, a method editor, a form editor, a menu editor... -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. +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 +In addition, 4D project files make it easier to program generically, create application templates, and share code. Project are organized internally in [folders and files](Project/architecture.md). -4D project files make it easier to program generically, create application templates, and share code. -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: +## Development -- Versioning -- Revision comparisons -- Rollbacks +4D projects are developed using the **4D** application. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project generator, and an application runtime, allowing to develop, test, and debug any kind of project. -## Working with projects +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -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). +## Final application -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 files can be [compiled](compiler.md) and easily deployed. 4D allows you to create three types of applications from your projects: -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 +- [web](WebServer/webServer.md) applications, +- [mobile](https://developer.4d.com/4d-for-ios/) applications, +- [desktop](Desktop/building.md) applications (client/server or single-user). + +Back end applications can be deployed using 4D Server, 4D, or merged with 4D Volume license. \ No newline at end of file diff --git a/website/translated_docs/es/REST/$asArray.md b/website/translated_docs/es/REST/$asArray.md index 1ac99ac95615a5..9e54cfe40090d0 100644 --- a/website/translated_docs/es/REST/$asArray.md +++ b/website/translated_docs/es/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`). +## Descripción -## 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`). +## Ejemplo 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/es/REST/$atomic_$atonce.md b/website/translated_docs/es/REST/$atomic_$atonce.md index 24b14c9f285b13..eabfba8b623dce 100644 --- a/website/translated_docs/es/REST/$atomic_$atonce.md +++ b/website/translated_docs/es/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 +## Descripción 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 +## Ejemplo 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/es/REST/$attributes.md b/website/translated_docs/es/REST/$attributes.md index de4bc3ca52ea4d..600a5eb5bffe07 100644 --- a/website/translated_docs/es/REST/$attributes.md +++ b/website/translated_docs/es/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 + +## Descripción 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"): +Si pasamos la petición REST siguiente para nuestra clase de datos Company (que tiene un atributo de relación "empleados"): -`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"): +Si pasamos la petición REST siguiente para nuestra clase de datos Employee (que tiene varios atributos relacionales, incluyendo "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/es/REST/$binary.md b/website/translated_docs/es/REST/$binary.md index 05b167f9016774..11aafc38391430 100644 --- a/website/translated_docs/es/REST/$binary.md +++ b/website/translated_docs/es/REST/$binary.md @@ -5,15 +5,17 @@ title: '$binary' Pass "true" to save the BLOB as a document (must also pass `$expand={blobAttributeName}`) -## Description +## Descripción -`$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/es/REST/$catalog.md b/website/translated_docs/es/REST/$catalog.md index 1de8e388bc4789..e56fb2b271ba78 100644 --- a/website/translated_docs/es/REST/$catalog.md +++ b/website/translated_docs/es/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 | +| Sintaxis | Ejemplo | Descripción | | --------------------------------------------- | -------------------- | -------------------------------------------------------------------------------- | | [**$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 + +### Descripción 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,311 @@ 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. | + +| Propiedad | Tipo | Descripción | +| --------- | ------ | --------------------------------------------------------------------------------- | +| name | Cadena | Name of the dataclass. | +| uri | Cadena | A URI allowing you to obtain information about the |dataclass and its attributes. | +| dataURI | Cadena | A URI that allows you to view the data in the dataclass. | -### Example +### Ejemplo `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 +### Descripción -Calling `$catalog/$all` allows you to receive detailed information about the attributes in each of the datastore classes in your project's active model. +Llamando `$catalog/$all` puede recibir información detallada sobre los atributos de cada una de las clases de datos del modelo activo del proyecto. -For more information about what is returned for each datastore class and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). +Para más información sobre lo que se devuelve para cada clase de datos y sus atributos, utilice [`$catalog/{dataClass}`](#catalogdataClass). -### Example + +### Ejemplo `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 +### Descripción -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. Si quiere recuperar esta información para todas las clases de datos del almacén de datos de su proyecto, utilice [`$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 | + +| Propiedad | Tipo | Descripción | +| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------- | +| name | Cadena | Name of the dataclass | +| collectionName | Cadena | Name of an entity selection on the dataclass | +| tableNumber | Número | Table number in the 4D database | +| scope | Cadena | Alcance de la clase de datos (tenga en cuenta que sólo se muestran las clases de datos cuyo **Alcance** es público) | +| dataURI | Cadena | 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.| +| Propiedad | Tipo | Descripción | +| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | Cadena | Attribute name. | +| kind | Cadena | Attribute type (storage or relatedEntity). | +| fieldPos | Número | Position of the field in the database table). | +| scope | Cadena | Scope of the attribute (only those attributes whose scope is Public will appear). | +| indexed | Cadena | If any **Index Kind** was selected, this property will return true. Otherwise, this property does not appear. | +| type | Cadena | Tipo de atributo (booleano, blob, byte, fecha, duración, imagen, long, long64, número, cadena, uuid o palabra) o la clase de datos para un atributo de relación N->1. | +| identifying | Booleano | This property returns True if the attribute is the primary key. Otherwise, this property does not appear. | +| path | Cadena | Name of the dataclass for a relatedEntity attribute, or name of the relation for a relatedEntities attribute. | +| foreignKey | Cadena | For a relatedEntity attribute, name of the related attribute. | +| inverseName | Cadena | Name of the opposite relation for a relatedEntity or relateEntities attribute. | -### Method(s) - -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. +El objeto llave devuelve el nombre del atributo **name** definido como **llave primaria** para la clase de datos. -### Example -You can retrieve the information regarding a specific datastore class. +### Ejemplo +Puede recuperar la información relativa a una clase de datos 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/es/REST/$compute.md b/website/translated_docs/es/REST/$compute.md index 187617f79fe519..851295ed38a4f8 100644 --- a/website/translated_docs/es/REST/$compute.md +++ b/website/translated_docs/es/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 + +## Descripción 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 ejemplo: -`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 | Descripción | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | $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 | Obtener el número total en la colección o en la clase de datos (en ambos casos hay que especificar un 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 +## Ejemplo 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/es/REST/$directory.md b/website/translated_docs/es/REST/$directory.md index 799a96a92a15db..a12e49c9785403 100644 --- a/website/translated_docs/es/REST/$directory.md +++ b/website/translated_docs/es/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 - +### Descripción 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 +### Ejemplo ```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/es/REST/$distinct.md b/website/translated_docs/es/REST/$distinct.md index eec3ddaa8ce6f0..ac17937c7899d1 100644 --- a/website/translated_docs/es/REST/$distinct.md +++ b/website/translated_docs/es/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 + +## Descripción `$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 - +## Ejemplo 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/es/REST/$entityset.md b/website/translated_docs/es/REST/$entityset.md index eb6d217570c0e4..e5a6b63fd0a635 100644 --- a/website/translated_docs/es/REST/$entityset.md +++ b/website/translated_docs/es/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 | +| Sintaxis | Ejemplo | Descripción | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ | | [**$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 + +### Descripción 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 +### Ejemplo 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 | Tipo | Descripción | | ---------------- | ------ | -------------------------------------------------------------- | -| $operator | String | One of the logical operators to test with the other entity set | -| $otherCollection | String | Entity set ID | +| $operator | Cadena | One of the logical operators to test with the other entity set | +| $otherCollection | Cadena | 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. +### Descripción + +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. Los dos conjuntos de entidades deben estar en la misma clase de datos. 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 | +| Operador | Descripción | | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | AND | Returns the entities in common to both entity sets | -| OR | Returns the entities in both entity sets | +| O | 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** +**O** ![](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` +### Ejemplo 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/es/REST/$expand.md b/website/translated_docs/es/REST/$expand.md index c677faa841c242..96587a479ec3c6 100644 --- a/website/translated_docs/es/REST/$expand.md +++ b/website/translated_docs/es/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: +Si quieres guardar un BLOB almacenado en su clase de datos, puedes escribir lo siguiente pasando también "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/es/REST/$filter.md b/website/translated_docs/es/REST/$filter.md index 79a0c364c4c05d..02da8e311a6f35 100644 --- a/website/translated_docs/es/REST/$filter.md +++ b/website/translated_docs/es/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 + +## Descripción 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 ejemplo: `$filter="firstName=john AND salary>20000"` donde `firstName` y `salary` son atributos de la clase de datos 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 ejemplo: `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'` donde firstName y salary son los atributos de la clase de datos 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 | Descripción | +| ---------- | ------------------------ | +| = | equals to | +| != | not equal to | +| > | greater than | +| >= | greater than or equal to | +| < | less than | +| <= | less than or equal to | +| begin | begins with | + +## Ejemplos + +In the following example, we look for all employees whose last name begins with a "j": + +``` + GET /rest/Employee?$filter="lastName begin j" +``` + +En este ejemplo, buscamos en la clase de datos Empleado todos los empleados cuyo salario sea superior a 20.000 y que no trabajen para una empresa llamada Acme: + +``` + GET /rest/Employee?$filter="salary>20000 AND + employer.name!=acme"&$orderby="lastName,firstName" +``` + +En este ejemplo, buscamos en la clase de datos Person todas las personas cuya propiedad número en el atributo anotherobj de tipo Object es mayor que 50: + +``` + GET /rest/Person/?filter="anotherobj.mynum > 50" +``` diff --git a/website/translated_docs/es/REST/$imageformat.md b/website/translated_docs/es/REST/$imageformat.md index a256964f2cfe21..42431ca95b5899 100644 --- a/website/translated_docs/es/REST/$imageformat.md +++ b/website/translated_docs/es/REST/$imageformat.md @@ -5,11 +5,11 @@ title: '$imageformat' Defines which image format to use for retrieving images (*e.g.*, `$imageformat=png`) -## Description +## Descripción 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 | +| Tipo | Descripción | | ---- | ------------------------------ | | 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 +## Ejemplo 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/es/REST/$info.md b/website/translated_docs/es/REST/$info.md index 8e6452c288a125..1d43077e3159f5 100644 --- a/website/translated_docs/es/REST/$info.md +++ b/website/translated_docs/es/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 - +## Descripción 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. | - +| Propiedad | Tipo | Descripción | +| -------------- | --------- | ----------------------------------------------------------------------------------- | +| 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 | Colección | A collection in which each object contains information about each entity selection. | +| ProgressInfo | Colección | A collection containing information about progress indicator information. | +| sessionInfo | Colección | 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`. | +| Propiedad | Tipo | Descripción | +| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | Cadena | A UUID that references the entity set. | +| dataClass | Cadena | 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 | Fecha | When the entity set was created or the last time it was used. | +| expires | Fecha | 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 | +| Propiedad | Tipo | Descripción | | ---------- | ------ | ------------------------------------------------------------ | -| 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. | - +| sessionID | Cadena | A UUID that references the session. | +| userName | Cadena | The name of the user who runs the session. | +| lifeTime | Número | The lifetime of a user session in seconds (3600 by default). | +| expiration | Fecha | The current expiration date and time of the user session. | -## Example +## Ejemplo Retrieve information about the entity sets currently stored in 4D Server's cache as well as user sessions: @@ -59,65 +53,65 @@ 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/es/REST/$method.md b/website/translated_docs/es/REST/$method.md index 3d80d75d7cd13b..c0d73d68c5c66e 100644 --- a/website/translated_docs/es/REST/$method.md +++ b/website/translated_docs/es/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 | +| Sintaxis | Ejemplo | Descripción | | ----------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | [**$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 + +### Descripción 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 - +## Ejemplo 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 +### Descripción 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 +### Ejemplo 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 +### Descripción You can release an entity set, which you created using [`$method=entityset`](#methodentityset), from 4D Server's cache. -### Example +### Ejemplo Release an existing entity set: @@ -93,27 +101,30 @@ 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 + +### Descripción `$method=subentityset` allows you to sort the data returned by the relation attribute defined in the REST request. @@ -121,7 +132,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 +### Ejemplo 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 +140,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 +### Descripción `$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 +201,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 +### Ejemplo 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/es/REST/$orderby.md b/website/translated_docs/es/REST/$orderby.md index b00eb345354636..3faf10f1135178 100644 --- a/website/translated_docs/es/REST/$orderby.md +++ b/website/translated_docs/es/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 +## Descripción `$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"`. -## Example + +## Ejemplo 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/es/REST/$querypath.md b/website/translated_docs/es/REST/$querypath.md index 3489e4309eb966..21a8996c059166 100644 --- a/website/translated_docs/es/REST/$querypath.md +++ b/website/translated_docs/es/REST/$querypath.md @@ -5,7 +5,7 @@ title: '$querypath' Returns the query as it was executed by 4D Server (*e.g.*, `$querypath=true`) -## Description +## Descripción `$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 | +| Propiedad | Tipo | Descripción | +| ------------- | --------- | --------------------------------------------------------------------------- | +| description | Cadena | 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 | Colección | An collection with an object defining the subsequent step of the query path | - -## Example +## Ejemplo 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/es/REST/$queryplan.md b/website/translated_docs/es/REST/$queryplan.md index 377c057321b8ee..083189495ecbb6 100644 --- a/website/translated_docs/es/REST/$queryplan.md +++ b/website/translated_docs/es/REST/$queryplan.md @@ -6,38 +6,37 @@ title: '$queryplan' Returns the query as it was passed to 4D Server (*e.g.*, `$queryplan=true`) -## Description - +## Descripción $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) | - +| Propiedad | Tipo | Descripción | +| --------- | ------ | ------------------------------------------------------------------------------------------- | +| item | Cadena | 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 - +## Ejemplo 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/es/REST/$savedfilter.md b/website/translated_docs/es/REST/$savedfilter.md index e31a328f969115..fbec6e1a236879 100644 --- a/website/translated_docs/es/REST/$savedfilter.md +++ b/website/translated_docs/es/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 +## Descripción 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 +## Ejemplo 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/es/REST/$savedorderby.md b/website/translated_docs/es/REST/$savedorderby.md index 4788e9abc6d5e6..814a57b8629fdc 100644 --- a/website/translated_docs/es/REST/$savedorderby.md +++ b/website/translated_docs/es/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 +## Descripción 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 - +## Ejemplo 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/es/REST/$skip.md b/website/translated_docs/es/REST/$skip.md index 0b512bc38e6568..06b6b9edce39a1 100644 --- a/website/translated_docs/es/REST/$skip.md +++ b/website/translated_docs/es/REST/$skip.md @@ -5,14 +5,15 @@ title: '$skip' Starts the entity defined by this number in the collection (*e.g.*, `$skip=10`) -## Description + +## Descripción `$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 +## Ejemplo 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/es/REST/$timeout.md b/website/translated_docs/es/REST/$timeout.md index 2eac9ac71f3f27..cbd59978d85d29 100644 --- a/website/translated_docs/es/REST/$timeout.md +++ b/website/translated_docs/es/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 +## Descripción 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 +## Ejemplo In our entity set that we're creating, we define the timeout to 20 minutes: diff --git a/website/translated_docs/es/REST/$top_$limit.md b/website/translated_docs/es/REST/$top_$limit.md index 8539277f771f3e..762ef00607f844 100644 --- a/website/translated_docs/es/REST/$top_$limit.md +++ b/website/translated_docs/es/REST/$top_$limit.md @@ -5,13 +5,13 @@ title: '$top/$limit' Limits the number of entities to return (e.g., `$top=50`) -## Description +## Descripción `$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 +## Ejemplo In the following example, we request the next ten entities after the 20th entity: diff --git a/website/translated_docs/es/REST/$upload.md b/website/translated_docs/es/REST/$upload.md index 0e91db31a213c7..3cfc0a29e1850e 100644 --- a/website/translated_docs/es/REST/$upload.md +++ b/website/translated_docs/es/REST/$upload.md @@ -6,53 +6,102 @@ title: '$upload' Returns an ID of the file uploaded to the server -## Description +## Descripción 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`. +You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout` parameter. -## Image upload example +## Uploading scenario -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. +Imagine you want to upload an image to update the picture attribute of an entity. -Then, we upload the selected image to 4D Server: +To upload an image (or any binary file), you must first select the file from the client application. The file itlself must be passed in the **body** of the request. -`POST /rest/$upload?$rawPict=true` +Then, you upload the selected image to 4D Server using a request such as: -**Result**: + `POST /rest/$upload?$rawPict=true` + +As a result, the server returns an ID that identifies the file: + +**Response**: `{ "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. The request looks like: -`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 + } + },} +``` + +## Example with a 4D HTTP client + +The following example shows how to upload a *.pdf* file to the server using the 4D HTTP client. + +```4d +var $params : Text +var $response : Object +var $result : Integer +var $blob : Blob + + +ARRAY TEXT($headerNames; 1) +ARRAY TEXT($headerValues; 1) + +$url:="localhost:80/rest/$upload?$binary=true" //prepare the REST request + +$headerNames{1}:="Content-Type" +$headerValues{1}:="application/octet-stream" + +DOCUMENT TO BLOB("c:\\invoices\\inv003.pdf"; $blob) //Load the binary + + //Execute the first POST request to upload the file +$result:=HTTP Request(HTTP POST method; $url; $blob; $response; $headerNames; $headerValues) + +If ($result=200) + var $data : Object + $data:=New object + $data.__KEY:="3" + $data.__STAMP:="3" + $data.pdf:=New object("ID"; String($response.ID)) + + $url:="localhost:80/rest/Invoices?$method=update" //second request to update the entity + + $headerNames{1}:="Content-Type" + $headerValues{1}:="application/json" + + $result:=HTTP Request(HTTP POST method; $url; $data; $response; $headerNames; $headerValues) +Else + ALERT(String($result)+" Error") +End if +``` diff --git a/website/translated_docs/es/REST/$version.md b/website/translated_docs/es/REST/$version.md index 65ebdc2d1058ed..3dce6495617d24 100644 --- a/website/translated_docs/es/REST/$version.md +++ b/website/translated_docs/es/REST/$version.md @@ -5,14 +5,14 @@ title: '$version' Image version number -## Description +## Descripción `$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 +## Ejemplo 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/es/REST/ClassFunctions.md b/website/translated_docs/es/REST/ClassFunctions.md new file mode 100644 index 00000000000000..6eff72756c65ba --- /dev/null +++ b/website/translated_docs/es/REST/ClassFunctions.md @@ -0,0 +1,579 @@ +--- +id: classFunctions +title: Llamar a las funciones de clase ORDA +--- + + +You can call [data model class functions](ORDA/ordaClasses.md) defined for the ORDA Data Model through your REST requests, so that you can benefit from the exposed API of the targeted 4D application. + +Functions are simply called in POST requests on the appropriate ORDA interface, without (). For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: + +`/rest/City/getCity` + +with data in the body of the POST request: `["Aguada"]` + +In 4D language, this call is equivalent to, : + +```4d +$city:=ds.City.getCity("Aguada") +``` + +> Only functions with the `exposed` keyword can be directly called from REST requests. See [Exposed vs non-exposed functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) section. + +## Function calls + +Functions must always be called using REST **POST** requests (a GET request will receive an error). + +Functions are called on the corresponding object on the server datastore. + +| Class function | Sintaxis | +| ------------------------------------------------------------------ | --------------------------------------------------------------------------- | +| [datastore class](ORDA/ordaClasses.md#datastore-class) | `/rest/$catalog/DataStoreClassFunction` | +| [dataclass class](ORDA/ordaClasses.md#dataclass-class) | `/rest/{dataClass}/DataClassClassFunction` | +| [entitySelection class](ORDA/ordaClasses.md#entityselection-class) | `/rest/{dataClass}/EntitySelectionClassFunction` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$entityset/entitySetNumber` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$filter` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$orderby` | +| [entity class](ORDA/ordaClasses.md#entity-class) | `/rest/{dataClass}(key)/EntityClassFunction/` | + + + +> `/rest/{dataClass}/Function` can be used to call either a dataclass or an entity selection function (`/rest/{dataClass}` returns all entities of the DataClass as an entity selection). +> The function is searched in the entity selection class first. If not found, it is searched in the dataclass. In other words, if a function with the same name is defined in both the DataClass class and the EntitySelection class, the dataclass class function will never be executed. + + +## Parámetros + + + +You can send parameters to functions defined in ORDA user classes. On the server side, they will be received in the class functions in regular $1, $2, etc. parameters. + +The following rules apply: + +- Parameters must be passed in the **body of the POST request** +- Parameters must be enclosed within a collection (JSON format) +- All scalar data types supported in JSON collections can be passed as parameters. +- Entity and entity selection can be passed as parameters. The JSON object must contain specific attributes used by the REST server to assign data to the corresponding ORDA objects: __DATACLASS, __ENTITY, __ENTITIES, __DATASET. + +See [this example](#request-receiving-an-entity-as-parameter) and [this example](#request-receiving-an-entity-selection-as-parameter). + + +### Scalar value parameter + +Parameter(s) must simply be enclosed in a collection defined in the body. For example, with a dataclass function `getCities()` receiving text parameters: `/rest/City/getCities` + +**Parameters in body:** ["Aguada","Paris"] + +All JSON data types are supported in parameters, including JSON pointers. Dates can be passed as strings in ISO 8601 date format (e.g. "2020-08-22T22:00:000Z"). + + +### Entity parameter + +Entities passed in parameters are referenced on the server through their key (*i.e.* __KEY property). If the key parameter is omitted in a request, a new entity is loaded in memory the server. You can also pass values for any attributes of the entity. These values will automatically be used for the entity handled on the server. + +> If the request sends modified attribute values for an existing entity on the server, the called ORDA data model function will be automatically executed on the server with modified values. This feature allows you, for example, to check the result of an operation on an entity, after applying all business rules, from the client application. You can then decide to save or not the entity on the server. + + +| Properties | Tipo | Descripción | +| ------------------------ | ------------------------------------ | -------------------------------------------------------------------------- | +| Attributes of the entity | mixed | Optional - Values to modify | +| __DATACLASS | Cadena | Mandatory - Indicates the Dataclass of the entity | +| __ENTITY | Booleano | Mandatory - True to indicate to the server that the parameter is an entity | +| __KEY | mixed (same type as the primary key) | Optional - Primary key of the entity | + +- If __KEY is not provided, a new entity is created on the server with the given attributes. +- If __KEY is provided, the entity corresponding to __KEY is loaded on the server with the given attributes + +See examples for [creating](#creating-an-entity) or [updating](#updating-an-entity) entities. + +#### Related entity parameter + +Same properties as for an [entity parameter](#entity-parameter). In addition, the related entity must exist and is referenced by __KEY containing its primary key. + +See examples for [creating](#creating-an-entity-with-a-related-entity) or [updating](#updating-an-entity-with-a-related-entity) entities with related entities. + + +### Entity selection parameter + +The entity selection must have been defined beforehand using [$method=entityset]($method.md#methodentityset). + +> If the request sends a modified entity selection to the server, the called ORDA data model function will be automatically executed on the server with the modified entity selection. + + +| Properties | Tipo | Descripción | +| ------------------------ | -------- | ------------------------------------------------------------------------------------ | +| Attributes of the entity | mixed | Optional - Values to modify | +| __DATASET | Cadena | Mandatory - entitySetID (UUID) of the entity selection | +| __ENTITIES | Booleano | Mandatory - True to indicate to the server that the parameter is an entity selection | + +See example for [receiving an entity selection](#receiving-an-entity-selection-as-parameter). + + +## Request examples + +This database is exposed as a remote datastore on localhost (port 8111): + +![alt-text](assets/en/REST/ordastructure.png) + +### Using a datastore class function + +The US_Cities `DataStore` class provides an API: + +``` +// DataStore class + +Class extends DataStoreImplementation + +exposed Function getName() + $0:="US cities and zip codes manager" +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/$catalog/getName` + +#### Resultado + +``` +{ +"result": "US cities and zip codes manager" +} +``` + +### Using a dataclass class function + +The Dataclass class `City` provides an API that returns a city entity from a name passed in parameter: + +``` +// City class + +Class extends DataClass + +exposed Function getCity() + var $0 : cs.CityEntity + var $1,$nameParam : text + $nameParam:=$1 + $0:=This.query("name = :1";$nameParam).first() +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getCity` + +Body of the request: ["Aguada"] + +#### Resultado + +The result is an entity: +``` +{ + "__entityModel": "City", + "__DATACLASS": "City", + "__KEY": "1", + "__TIMESTAMP": "2020-03-09T08:03:19.923Z", + "__STAMP": 1, + "ID": 1, + "name": "Aguada", + "countyFIPS": 72003, + "county": { + "__deferred": { + "uri": "/rest/County(72003)", + "__KEY": "72003" + } + }, + "zips": { + "__deferred": { + "uri": "/rest/City(1)/zips?$expand=zips" + } + } +} +``` + +### Using an entity class function + +The Entity class `CityEntity` provides an API: + +``` +// CityEntity class + +Class extends Entity + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City(2)/getPopulation` + +#### Resultado + +``` +{ + "result": 48814 +} +``` + + +### Using an entitySelection class function + +The EntitySelection class `CitySelection` provides an API: + +``` +// CitySelection class + +Class extends EntitySelection + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getPopulation/?$filter="ID<3"` + +#### Resultado + +``` +{ + "result": 87256 +} +``` + +### Using an entitySelection class function and an entitySet + +The `StudentsSelection` class has a `getAgeAverage` function: + +``` +// StudentsSelection Class + +Class extends EntitySelection + +exposed Function getAgeAverage + C_LONGINT($sum;$0) + C_OBJECT($s) + + $sum:=0 + For each ($s;This) + $sum:=$sum+$s.age() + End for each + $0:=$sum/This.length +``` + +Once you have created an entityset, you can run this request: + +**POST** `127.0.0.1:8044/rest/Students/getAgeAverage/$entityset/17E83633FFB54ECDBF947E5C620BB532` + +#### Resultado + +``` +{ + "result": 34 +} +``` + +### Using an entitySelection class function and an orderBy + +The `StudentsSelection` class has a `getLastSummary` function: + +``` +// StudentsSelection Class + + +Class extends EntitySelection + +exposed Function getLastSummary + C_TEXT($0) + C_OBJECT($last) + + $last:=This.last() + $0:=$last.firstname+" - "+$last.lastname+" is ... "+String($last.age()) +``` + +You can then run this request: + +**POST** `127.0.0.1:8044/rest/Students/getLastSummary/$entityset/?$filter="lastname=b@"&$orderby="lastname"` + + +#### Resultado + +``` +{ + "result": "Wilbert - Bull is ... 21" +} +``` + + +### Using an entity to be created on the server + + +The Dataclass class `Students` has the function `pushData()` receiving an entity containing data from the client. The `checkData()` method runs some controls. If they are OK, the entity is saved and returned. + +``` +// Students Class + +Class extends DataClass + +exposed Function pushData + var $1, $entity, $status, $0 : Object + + $entity:=$1 + + $status:=checkData($entity) // $status is an object with a success boolean property + + $0:=$status + + If ($status.success) + $status:=$entity.save() + If ($status.success) + $0:=$entity + End if + End if + +``` + +You run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: + +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"Ann", +"lastname":"Brown" +}] +``` + +Since no `__KEY` is given, a new Students entity is loaded on the server **with the attributes received from the client**. Because the `pushData()` function runs a `save()` action, the new entity is created. + + +#### Resultado + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T10:54:41.805Z", + "__STAMP": 1, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWN", + "schoolID": null, + "school": null +} +``` + +### Using an entity to be updated on the server + +Same as above but with a __KEY attribute + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"lastname":"Brownie", +"__KEY":55 +}] +``` + +Since `__KEY` is given, the Students entity with primary key 55 is loaded **with the lastname value received from the client**. Because the function runs a `save()` action, the entity is updated. + +#### Resultado + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T11:10:21.679Z", + "__STAMP": 3, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWNIE", + "schoolID": null, + "school": null +} +``` + +### Creating an entity with a related entity + +In this example, we create a new Students entity with the Schools entity having primary key 2. + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"John", +"lastname":"Smith", +"school":{"__KEY":2} +}] +``` + +#### Resultado + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "56", + "__TIMESTAMP": "2020-06-16T11:16:47.601Z", + "__STAMP": 1, + "ID": 56, + "firstname": "John", + "lastname": "SMITH", + "schoolID": 2, + "school": { + "__deferred": { + "uri": "/rest/Schools(2)", + "__KEY": "2" + } + } +} +``` + + +### Updating an entity with a related entity + +In this example, we associate an existing school to a Students entity. The `StudentsEntity` class has an API: + +``` +// StudentsEntity class + +Class extends Entity + +exposed Function putToSchool() + var $1, $school , $0, $status : Object + + //$1 is a Schools entity + $school:=$1 + //Associate the related entity school to the current Students entity + This.school:=$school + + $status:=This.save() + + $0:=$status +``` + +You run this request, called on a Students entity : **POST** `http://127.0.0.1:8044/rest/Students(1)/putToSchool` Body of the request: +``` +[{ +"__DATACLASS":"Schools", +"__ENTITY":true, +"__KEY":2 +}] +``` + +#### Resultado + +``` +{ + "result": { + "success": true + } +} +``` + + +### Receiving an entity selection as parameter + +In the `Students` Dataclass class, the `setFinalExam()` function updates a received entity selection ($1). It actually updates the *finalExam* attribute with the received value ($2). It returns the primary keys of the updated entities. + +``` +// Students class + +Class extends DataClass + +exposed Function setFinalExam() + + var $1, $es, $student, $status : Object + var $2, $examResult : Text + + var $keys, $0 : Collection + + //Entity selection + $es:=$1 + + $examResult:=$2 + + $keys:=New collection() + + //Loop on the entity selection + For each ($student;$es) + $student.finalExam:=$examResult + $status:=$student.save() + If ($status.success) + $keys.push($student.ID) + End if + End for each + + $0:=$keys +``` + +An entity set is first created with this request: + +`http://127.0.0.1:8044/rest/Students/?$filter="ID<3"&$method=entityset` + +Then you can run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/setFinalExam` + +Body of the request: + +``` +[ +{ +"__ENTITIES":true, +"__DATASET":"9B9C053A111E4A288E9C1E48965FE671" +}, +"Passed" +] + +``` + +#### Resultado + +The entities with primary keys 1 and 2 have been updated. + +``` +{ + "result": [ + 1, + 2 + ] +} +``` + +### Using an entity selection updated on the client + +Using the `getAgeAverage()` function [defined above](#using-an-entityselection-class-function-and-an-entityset). + +```4d +var $remoteDS, $newStudent, $students : Object +var $ageAverage : Integer + +$remoteDS:=Open datastore(New object("hostname";"127.0.0.1:8044");"students") + +// $newStudent is a student entity to procees +$newStudent:=... +$students:=$remoteDS.Students.query("school.name = :1";"Math school") +// We add an entity to the $students entity selection on the client +$students.add($newStudent) + +// We call a function on the StudentsSelection class returning the age average of the students in the entity selection +// The function is executed on the server on the updated $students entity selection which included the student added from the client +$ageAverage:=$students.getAgeAverage() +``` \ No newline at end of file diff --git a/website/translated_docs/es/REST/REST_requests.md b/website/translated_docs/es/REST/REST_requests.md index ab8853e5d90abd..9555df18159678 100644 --- a/website/translated_docs/es/REST/REST_requests.md +++ b/website/translated_docs/es/REST/REST_requests.md @@ -1,46 +1,37 @@ --- id: REST_requests -title: About REST Requests +title: Acerca de las peticiones REST --- The following structures are supported for REST requests: -| URI | Resource | {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) | -| | | | [$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | -| | | | [?$filter]($filter.md) | -| | | [{attribute}](manData.html#selecting-attributes-to-get)/ | [?$compute]($compute.md) | -| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | -| | [{dataClass}:{attribute}(value)](%7BdataClass%7D%7Battribute%7D_value.html) | | | -| | [$catalog]($catalog.md) | | | -| | [$directory]($directory.md) | | | -| | [$info]($info.md) | | | +| URI | Resource (Input) | /? or &{filter} (Output) | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... | +| | [{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | [$method=...]($method.md) | +| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey) | [$attributes]($attributes.md) | +| | [{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue) | | +While all REST requests must contain the URI and Resource parameters, the Output (which filters the data returned) is optional. -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. - -As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. For example: - -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. Por ejemplo: + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` > 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. Además de recuperar datos mediante los métodos HTTP `GET`, también se pueden añadir, actualizar y eliminar entidades de una clase de datos utilizando los métodos HTTP `POST`. 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 Status and Response With each REST request, the server returns the status and a response (with or without an error). ### Request Status - With each REST request, you get the status along with the response. Below are a few of the statuses that can arise: -| Status | Description | +| Status | Descripción | | ------------------------- | -------------------------------------------------------------------------- | | 0 | Request not processed (server might not be started). | | 200 OK | Request processed without error. | @@ -49,9 +40,11 @@ With each REST request, you get the status along with the response. Below are a | 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. | - ### 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 +If an error arises, it will be sent along with the response from the server or it will be the response from the server. + + + diff --git a/website/translated_docs/es/REST/authUsers.md b/website/translated_docs/es/REST/authUsers.md index fab3ebc1f758ff..65cc4b36658d85 100644 --- a/website/translated_docs/es/REST/authUsers.md +++ b/website/translated_docs/es/REST/authUsers.md @@ -1,85 +1,114 @@ --- id: authUsers -title: Users and sessions +title: Usuarios y sesiones --- +REST requests can benefit from [web user sessions](WebServer/sessions.md), providing extra features such as multiple requests handling, data sharing between the web client processes, and user privileges. + +Como primer paso para abrir una sesión REST en el servidor 4D, el usuario que envía la solicitud debe estar autenticado. -## Authenticating users -As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. +## Authenticating users -You log in a user to your application by passing the user's name and password to [`$directory/login`]($directory.md#directorylogin). +You log in a user to your application by calling [`$directory/login`]($directory.md#directorylogin) in a POST request including the user's name and password in the header. This request calls the `On REST Authentication` database method (if it exists), where you can check the user's credentials (see example below). -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. +## Opening sessions -The session will automatically be closed once the timeout is reached. +When [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions) (recommended), if the `On REST Authentication` database method returns `true`, a user session is then automatically opened and you can handle it through the `Session` object and the [Session API](API/SessionClass.md). Subsequent REST requests will reuse the same session cookie. -## Session cookie +If the `On REST Authentication` database method has not been defined, a `guest` session is opened. -Each REST request is handled through a specific session on the 4D server. -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: +## Ejemplo - WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 - +In this example, the user enters their email and password in an html page that requests [`$directory/login`]($directory.md#directorylogin) in a POST (it is recommended to use an HTTPS connection to send the html page). The `On REST Authentication` database method is called to validate the credentials and to set the session. -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. +The HTML login page: -### Example +![alt-text](assets/en/REST/login.png) -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. -```4d -// Creating headers -ARRAY TEXT(headerNames;0) -ARRAY TEXT(headerValues;0) +```html + -APPEND TO ARRAY(headerNames;"username-4D") -APPEND TO ARRAY(headerNames;"session-4D-length") -APPEND TO ARRAY(headerNames;"hashed-password-4D") +
      +
      +Email:
      +Password:
      + + +
      +
      -APPEND TO ARRAY(headerValues;"kind user") -APPEND TO ARRAY(headerValues;"60") -APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) + -//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;*) ``` +When the login page is sent to the server, the `On REST Authentication` database method is called: + ```4d -// buildHeader project method + //On REST Authentication + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + //A '/rest' URL has been called with headers username-4D and password-4D +If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if +``` -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> As soon as it has been called and returned `True`, the `On REST Authentication` database method is no longer called in the session. -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +The `fillSession` project method initializes the user session, for example: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use +``` diff --git a/website/translated_docs/es/REST/configuration.md b/website/translated_docs/es/REST/configuration.md index 74e38a86a6e29e..1632e9db9f2d09 100644 --- a/website/translated_docs/es/REST/configuration.md +++ b/website/translated_docs/es/REST/configuration.md @@ -1,20 +1,21 @@ --- id: configuration -title: Server Configuration +title: Configuración del servidor --- -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. +Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your application directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. To start using the REST features, you need to start and configure the 4D REST server. -> - 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. +> - 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](authUsers.md) for your requesting application. + + ## 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. +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 structure settings in order for REST requests to be processed. ![alt-text](assets/en/REST/Settings.png) @@ -22,37 +23,39 @@ For security reasons, by default, 4D does not respond to REST requests. If you w 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. + ## Configuring REST access By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. 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; +- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Structure 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. +> 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 Structure Settings is ignored. -### Using the Database settings -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. +### Using the Structure Settings -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. +The **Read/Write** menu in the "Web/REST resource" page of the structure settings specifies a group of 4D users that is authorized to establish the link to the 4D application using REST queries. -> 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. +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. + +> 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 Structure 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 application 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). + -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 -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: +Once REST services are enabled in the 4D application, by default a REST session can access all tables and fields of the 4D database through the [datastore interface](ORDA/dsMapping.md#datastore). Thus, it can 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" +``` This request will return all employees whose salary field is higher than 10000. > 4D tables and/or fields that have the "Invisible" attribute are also exposed in REST by default. @@ -71,6 +74,7 @@ To remove the REST exposure for a table: 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. @@ -83,4 +87,4 @@ To remove the REST exposure for a field: 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. -> 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 +> 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. diff --git a/website/translated_docs/es/REST/genInfo.md b/website/translated_docs/es/REST/genInfo.md index 7c1fea10deeb26..6af300e5a4caa4 100644 --- a/website/translated_docs/es/REST/genInfo.md +++ b/website/translated_docs/es/REST/genInfo.md @@ -1,6 +1,6 @@ --- id: genInfo -title: Getting Server Information +title: Obtener información del servidor --- You can get several information from the REST server: @@ -10,12 +10,13 @@ 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). +Utilice los parámetros [`$catalog`]($catalog.md), [`$catalog/{dataClass}`]($catalog.md#catalogdataclass), o [`$catalog/$all`]($catalog.md#catalogall) para obtener la lista de [las clases de datos expuestas y sus atributos](configuration.md#exposing-tables-and-fields). 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. @@ -24,12 +25,11 @@ Use the [`$info`]($info.md) parameter to get information about the entity select 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. -For example: +Por ejemplo: `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. diff --git a/website/translated_docs/es/REST/gettingStarted.md b/website/translated_docs/es/REST/gettingStarted.md index fa4aa595dd5b63..cecbdce6ff7d4f 100644 --- a/website/translated_docs/es/REST/gettingStarted.md +++ b/website/translated_docs/es/REST/gettingStarted.md @@ -1,25 +1,25 @@ --- id: gettingStarted -title: Getting Started +title: Comencemos --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D provides you with a powerful REST server, that allows direct access to data stored in your 4D applications. -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). +The REST server is included in 4D and 4D Server, it is automatically available in your 4D applications [once it is configured](configuration.md). This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: +- create and configure a basic 4D application project +- access data from the 4D project through REST using a standard browser. -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +To keep the example simple, we’re going to use 4D and a browser that are running on the same machine. Of course, you could also use a remote architecture. -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. +## Creating and configuring the 4D project + +1. Launch your 4D or 4D Server application and create a new project. You can name it "Emp4D", for example. 2. In the Structure editor, create an [Employees] table and add the following fields to it: - - Lastname (Alpha) - Firstname (Alpha) - Salary (Longint) @@ -32,99 +32,107 @@ To keep the example simple, we’re going to use a 4D application and a browser ![](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. +4. Display the **Web/REST resource** page of the 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 - +``` +http://127.0.0.1/rest/$catalog +``` The REST server replies: - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - +``` +{ + "__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 - +``` +/rest/$catalog/Employees +``` If you want to get all entities of the Employee dataclass, you write: - /rest/Employees - +``` +/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 - } - +``` +{ + "__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 - +``` +/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 +``` +{ + "__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 applications. diff --git a/website/translated_docs/es/REST/manData.md b/website/translated_docs/es/REST/manData.md index 6944e030a71255..b2f686b730671e 100644 --- a/website/translated_docs/es/REST/manData.md +++ b/website/translated_docs/es/REST/manData.md @@ -1,9 +1,9 @@ --- id: manData -title: Manipulating Data +title: Manipulación de datos --- -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. +All [exposed dataclasses, attributes](configuration.md#exposing-tables-and-fields) and [functions](ClassFunctions.md) can be accessed through REST. Dataclass, attribute, and function names are case-sensitive; however, the data for queries is not. ## Querying data @@ -11,20 +11,26 @@ To query data directly, you can do so using the [`$filter`]($filter.md) function `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). +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 a single entity in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a [class function](ClassFunctions.md#function-calls) that returns an entity selection (or a collection). -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 a selection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). ## Navigating data 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. + + ## Creating and managing entity set 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. @@ -35,6 +41,7 @@ To access the entity set, you must use `$entityset/{entitySetID}`, for example: `/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). @@ -47,52 +54,32 @@ Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityse 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. 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: `/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 - -The following example is a dataclass method that reveives parameters and returns an object: - -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$lastname:=$2 -$0:=ds.Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() -``` +## Calling Data model class functions -The method properties are configured accordingly on the 4D project side: +You can call ORDA Data Model [user class functions](ClassFunctions.md) through POST requests, so that you can benefit from the exposed API of the targeted application. For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: -![alt-text](assets/en/REST/methodProp_ex.png) +`/rest/City/getCity` -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +with data in the body of the request: `["Paris"]` -```4d -C_TEXT($content) -C_OBJECT($response) -$content:="[\"Toni\",\"Dickey\"]" +> Calls to 4D project methods that are exposed as REST Service are still supported but are deprecated. -$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 @@ -100,7 +87,7 @@ You can always define which attributes to return in the REST response after an i You can apply this filter in the following ways: -| Object | Syntax | Example | +| Objeto | Sintaxis | Ejemplo | | ---------------------- | --------------------------------------------------- | ------------------------------------------------------------- | | Dataclass | {dataClass}/{att1,att2...} | /People/firstName,lastName | | Collection of entities | {dataClass}/{att1,att2...}/?$filter="{filter}" | /People/firstName,lastName/?$filter="lastName='a@'" | @@ -108,11 +95,10 @@ You can apply this filter in the following ways: | | {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 +### Ejemplos 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: @@ -123,118 +109,127 @@ 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`). +Las siguientes peticiones devuelven sólo el nombre y el apellido de la clase de datos People (ya sea toda la clase de datos o una selección de entidades basada en la búsqueda definida en `$filter`). + + `GET /rest/People/firstName,lastName/` -`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" - } - ] - } - +```` +{ + __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@'"/` **Result**: - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +```` +{ + __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/` + `GET /rest/People(3)/firstName,lastName/` **Result**: - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + -`GET /rest/People(3)/` + `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" - } - }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - +```` +{ + __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 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 + `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` For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). @@ -242,10 +237,13 @@ For more information about the image formats, refer to [`$imageformat`]($imagefo 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 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: -`GET /rest/Company:companyCode("Acme001")` \ No newline at end of file + `GET /rest/Company:companyCode("Acme001")` + + diff --git a/website/translated_docs/es/REST/{dataClass}.md b/website/translated_docs/es/REST/{dataClass}.md index e6bb7bde7b9769..7f16d951d33976 100644 --- a/website/translated_docs/es/REST/{dataClass}.md +++ b/website/translated_docs/es/REST/{dataClass}.md @@ -7,321 +7,211 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +Dataclass names can be used directly in the REST requests to work with entities and entity selections, or class functions of the dataclass. ## 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 | +| Sintaxis | Ejemplo | Descripción | +| ---------------------------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------- | +| [**{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}/{DataClassClassFunction}**](ClassFunctions.md#function-calls) | `/City/getCity` | Executes a dataclass class function | +| [**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls) | `/City/getPopulation/?$filter="ID<3"` | Executes an entity selection class function | +| [**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls) | `City(2)/getPopulation` | Executes an entity class function | + +> Function calls are detailed in the [Calling ORDA class functions](ClassFunctions.md) section. + ## {dataClass} Returns all the data (by default the first 100 entities) for a specific dataclass (*e.g.*, `Company`) -### Description +### Descripción 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). 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. | -| __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. | - +| Propiedad | Tipo | Descripción | +| ------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| __entityModel | Cadena | Name of the dataclass. | +| __COUNT | Número | Número de entidades en la clase de datos. | +| __SENT | Número | 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 | Número | Entity number that the selection starts at. Either 0 by default or the value defined by `$skip`. | +| __ENTITIES | Colección | 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. | Each entity contains the following properties: -| Property | Type | Description | +| Propiedad | Tipo | Descripción | | ----------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| __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`. | +| __KEY | Cadena | Valor de la llave primaria definida para la clase de datos. | +| __TIMESTAMP | Fecha | Timestamp of the last modification of the entity | +| __STAMP | Número | Internal stamp that is needed when you modify any of the values in the entity when using `$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). Por ejemplo: + `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 +### Ejemplo -Return all the data for a specific datastore class. +Devuelve todos los datos de una clase de datos específica. -`GET /rest/Company` + `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")` -### Description +### Descripción -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. La clave es el valor del atributo definido como llave primaria para su clase de datos. 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). +For more information about the data returned, refer to [{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: +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). Por ejemplo: -`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: -`GET /rest/Company(1)/name,address,staff?$expand=staff` + `GET /rest/Company(1)/name,address,staff?$expand=staff` -### Example +### Ejemplo -The following request returns all the public data in the Company datastore class whose key is 1. +La siguiente petición devuelve todos los datos públicos de la clase de datos Company cuya llave es 1. -`GET /rest/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 -### Description +### Descripción 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)` -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: +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). Por ejemplo: -`GET /rest/Company:companyCode(Acme001)/name,address` + `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: -`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` + `GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` -### Example +### Ejemplo The following request returns all the public data of the employee named "Jones". -`GET /rest/Employee:lastname(Jones)` - -## {dataClass}/{method} and {dataClass}({key})/{method} - -Returns an object or a collection based on a project method. - -### Description - -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 - -![alt-text](assets/en/REST/MethodProp.png) - -### Passing Parameters to a Method - -You can also pass parameters to a method in a POST. - -`POST /rest/Employee/addEmployee` - -You can POST data in the body part of the request, for example: - -["John","Smith"] + `GET /rest/Employee:lastname(Jones)` -### Examples - -#### Table scope - -Call of a `getAverage` method: - -- on [Employee] table -- with **Table** scope - -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` - -`POST /rest/Employee/getAverage` - -Result: - - { - "result": { - "ageAverage": 44.125 - } - } - - -#### Current record scope - -Call of a `getFullName` method: - -- on [Employee] table -- with **Current record** scope - -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` - -`POST /rest/Employee(3)/getFullName` - -Result: - - { - "result": { - "fullName": "John Smith" - } - } - - -#### Current selection scope - -Call of a `updateSalary` method: - -- on [Employee] table -- with **Current selection** scope - -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` - -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` - -POST data (in the request body): [1.5] - -Result: - - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/es/ReleaseNotes/whatsNew.md b/website/translated_docs/es/ReleaseNotes/whatsNew.md new file mode 100644 index 00000000000000..2861cfd8570dee --- /dev/null +++ b/website/translated_docs/es/ReleaseNotes/whatsNew.md @@ -0,0 +1,15 @@ +--- +id: whatsNew +title: What's New +--- + +The list of new or modified 4D features that are covered in this documentation. + +## 4D v18 R6 + +- [Entity Selection Class](API/entitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/imapTransporterClass.md), [POP3 Mail](API/pop3TransporterClass.md) and [SMTP Mail](API/smtpTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/imapTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/sessionClass.md). \ No newline at end of file diff --git a/website/translated_docs/es/Tags/tags.md b/website/translated_docs/es/Tags/tags.md new file mode 100644 index 00000000000000..294567cdb16b55 --- /dev/null +++ b/website/translated_docs/es/Tags/tags.md @@ -0,0 +1,764 @@ +--- +id: tags +title: Transformation tags +--- + +4D provides a set of transformation tags which allow you to insert references to 4D variables or expressions, or to perform different types of processing within a source text, referred to as a "template". These tags are interpreted when the source text is executed and generate an output text. + +This principle is used in particular by the 4D Web server to build [web template pages](WebServer/templates.md). + +These tags are generally be inserted as HTML type comments (``) but an [xml-compliant alternative syntax](#alternative-syntax-for-4dtext-4dhtml-4deval) is available for some of them. + +It is possible to mix several types of tags. For example, the following HTML structure is entirely feasible: + +```html + + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + (Loop on the current selection) + (If [TABLE]ValNum>10) + (Subpage insertion) + (Else) + Value:
      (Field display) + + ](End for) + + +``` + + + +## Principles for using tags + +### Parsing + +Parsing the contents of a *template* source is done in two contexts: + +- Using the `PROCESS 4D TAGS` command; this command accepts a *template* as input, as well as optional parameters and returns a text resulting from the processing. + +- Using 4D's integrated HTTP server: [template pages](WebServer/templates.md) sent by means of the `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB), `WEB SEND TEXT` commands, or called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to parse HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, http://www.server.com/dir/page.shtm). + + +### Recursive processing + +4D tags are interpreted recursively: 4D always attempts to reinterpret the result of a transformation and, if a new transformation has taken place, an additional interpretation is performed, and so on until the product obtained no longer requires any further transformation. For example, given the following statement: + +```html + +``` + +If the `[Mail]Letter_type` text field itself contains a tag, for example ``, this tag will be evaluated recursively after the interpretation of the 4DHTML tag. + +This powerful principle meets most needs related to text transformation. Note, however, that in some cases this can also allow malicious code to be inserted in the web context, [which can be avoided](WebServer/templates.md#prevention-of-malicious-code-insertion). + + +### Identifiers with tokens + +To ensure the correct evaluation of expressions processed via tags, regardless of the language or 4D version, it's recommended to use the tokenized syntax for elements whose name may vary over versions (commands, tables, fields, constants). For example, to insert the `Current time` command, enter `Current time:C178`. + +### Using the "." as decimal separator + +4D always uses the period character (.) as a decimal separator when evaluating a numerical expression using a 4D tag `4DTEXT`, `4DHTML`, and `4DEVAL`. Regional settings are ignored. This feature facilitates code maintenance and compatibility between 4D languages and versions. + + +## 4DBASE + +#### Syntax: `` + +The `` tag designates the working directory to be used by the `` tag. + +When it is called in a Web page, the `` tag modifies all subsequent `` calls on this page, until the next `, if any. If the`` folder is modified from within an included file, it retrieves its original value from the parent file. + +The *folderPath* parameter must contain a pathname relative to the current page and it must end with a slash (/). The designated folder must be located inside the Web folder. + +Pass the "WEBFOLDER" keyword to restore the default path (relative to the page). + +The following code, which must specify a relative path for each call: + +```html + + + + + +``` +... is equivalent to: + +```html + + + + + + + + +``` + +For example, to set a directory for the home page: + +```html +/* Index.html */ + + + + + + + + +``` + +In the "head.html" file, the current folder is modified through ``, without this changing its value in "Index.html": + +```html +/* Head.htm */ +/* the working directory here is relative to the included file (FR/ or US/) */ + + + + + + +``` + + +## 4DCODE + +#### Syntax: `` + +The `4DCODE` tag allows you to insert a multi-line 4D code block in a template. + +When a `` sequence. The code block itself can contain carriage returns, line feeds, or both; it will be interpreted sequentially by 4D. + +For example, you can write in a template: + +```html + +``` + + +Here are the 4DCODE tag features: + +- The `TRACE` command is supported and activates the 4D debugger, thus allowing you to debug your template code. +- Any error will display the standard error dialog that lets the user stop code execution or enter debugging mode. +- The text in between `` is split into lines accepting any line-ending convention (cr, lf, or crlf). +- The text is tokenized within the context of the database that called `PROCESS 4D TAGS`. This is important for recognition of project methods for example. The [Available through tags and 4D URLs (4DACTION ...)](WebServer/allowProject.md) method property is not taken into account. +- Even if the text always uses English-US, it is recommended to use the token syntax (:Cxxx) for command and constant names to protect against potential problems due to commands or constants being renamed from one version of 4D to another. + +> The fact that 4DCODE tags can call any of the 4D language commands or project methods could be seen as a security issue, especially when the database is available through HTTP. However, since it executes server-side code called from your own template files, the tag itself does not represent a security issue. In this context, as for any Web server, security is mainly handled at the level of remote accesses to server files. + + +## 4DEACH and 4DENDEACH + +#### Syntax: `` `` + +The `` comment allows iterating a specified item over all values of the *expression*. The item is set to a *variable* whose type depends on the *expression* type. + +The `` comment can iterate through three expression types: + +- [collections](#--4deach-item-in-collection--): loop through each element of the collection, +- [entity selections](#--4deach-entity-in-entityselection--): loop through each entity, +- [objects](#--4deach-property-in-object--): loop through each object property. + +The number of iterations is evaluated at startup and will not change during the processing. La adición o eliminación de elementos durante el bucle no suele ser recomendable, ya que puede resultar en redundancia o perdidas de iteraciones. + + +### `` + +This syntax iterates on each *item* of the *collection*. The code portion located between `` and `` is repeated for each collection element. + +The *item* parameter is a variable of the same type as the collection elements. + +The collection must contain only **elements of the same type**, otherwise an error is returned as soon as the *item* variable is assigned the first mismatched value type. + +The number of loops is based on the number of elements of the collection. At each iteration, the *item* variable is automatically filled with the matching element of the collection. Hay que tener en cuenta los siguientes puntos: + +- If the *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). Si la variable es de tipo escalar, sólo se modificará la variable. +- The *item* variable gets the same type as the first collection element. If any collection element 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 is generated if the *item* variable type does not support Null values (such as longint variables). + +#### Example with a collection of scalar values + +*getNames* returns a collection of strings. The method has been declared as "[available through 4D tags and URLs](WebServer/allowProject.md)". + + +```html + + + + + + + + + +
      Name
      +``` + +#### Example with a collection of objects + +*getSalesPersons* returns a collection of objects. + +```html + + + + + + + + + + + +
      IDFirstnameLastname
      +``` + + +### `` + +This syntax iterates on each *entity* of the *entitySelection*. The code portion located between `` and `` is repeated for each entity of the entity selection. + +The *entity* parameter is an object variable of the entity selection class. + + +The number of loops is based on the number of entities of the entity selection. At each iteration, the *entity* object variable is automatically filled with the matching entity of the entity selection. + +#### Example with a html table + +```html + + + + + + + + + + + +
      IDNameTotal purchase
      +``` + +#### Example with `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +This syntax iterates on each *property* of the *object*. The code portion located between `` and `` is repeated for each property of the object. + +The *property* parameter is a text variable automatically filled with the name of the currently processed property. + +The properties of the object are processed according to their creation order. Durante el bucle, se pueden añadir o eliminar propiedades en el objeto, sin modificar el número de bucles que quedarán en función del número original de propiedades del objeto. + +#### Example with the properties of an object + +*getGamers* is a project method that returns an object like ("Mary"; 10; "Ann"; 20; "John"; 40) to figure gamer scores. + +```html + + + + + + + + + + + +
      GamersScores
      +``` + + + + +## 4DEVAL + +#### Syntax: `` +#### Alternative syntax: `$4DEVAL(expression)` + +The `4DEVAL` tag allows you to assess a 4D variable or expression. Like the [`4DHTML`](#4dhtml) tag, `4DEVAL` does not escape HTML characters when returning text. However, unlike `4DHTML` or [`4DTEXT`](#4dtext), `4DEVAL` allows you to execute any valid 4D statement, including assignments and expressions that do not return any value. + +For example, you can execute: + +``` + $input:="" //assignment + $input:=$input+"" //calculation + PROCESS 4D TAGS($input;$output) + //$output = "43" +``` + +In case of an error during interpretation, the text inserted will be in the form: `: ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DHTML + +#### Syntax: `` +#### Alternative syntax: `$4DHTML(expression)` + + +Just like the `4DTEXT` tag, this tag lets you assess a 4D variable or expression that returns a value, and insert it as an HTML expression. Unlike the `4DTEXT` tag, this tag does not escape HTML special characters (e.g. ">"). + +For example, here are the processing results of the 4D text variable myvar with the available tags: + +| myvar Value | Tags | Resultado | +| -------------------- | ---------------------------- | ------------------- | +| `myvar:=""` | `` | `<B>` | +| `myvar:=""` | `` | `` | + +In case of an interpretation error, the inserted text will be ` : ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DIF, 4DELSE, 4DELSEIF and 4DENDIF + +#### Syntax: `` {`...`} {``} `` + +Used with the `` (optional), `` (optional) and `` comments, the `` comment offers the possibility to execute portions of code conditionally. + +The *expression* parameter can contain any valid 4D expression returning a Boolean value. It must be indicated within parenthesis and comply with the 4D syntax rules. + +The `` ... `` blocks can be nested in several levels. Like in 4D, each `` must match a ``. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. Likewise, if there are not as many `` as ``, the text "``: 4DENDIF expected" is inserted instead of the contents located between `` and ``. + +Using the `` tag, you can test an unlimited number of conditions. Only the code that follows the first condition evaluated as `True` is executed. If no conditions are true, no statement is executed (if there is no final ``). You can use a tag after the last . If all the conditions are false, the statements following the are executed. + +The two following codes are equivalent. + +Code using 4DELSE only: + +```html + + /* Condition1 is true*/ + + + /* Condition2 is true*/ + + + /* Condition3 is true */ + + /*None of the conditions are true*/ + + + +``` + +Similar code using the `4DELSEIF` tag: + +``` + + /* Condition1 is true*/ + + /* Condition2 is true*/ + + /* Condition3 is true */ + + /* None of the conditions are true*/ + +``` + +This example of code inserted in a static HTML page displays a different label according the `vname#""` expression result: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +This example inserts different pages depending on which user is connected: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### Syntax: `` + +This tag is mainly designed to include an HTML page (indicated by the *path* parameter) in another HTML page. By default, only the body of the specified HTML page, i.e. the contents found within the `` and `` tags, is included (the tags themselves are not included). This lets you avoid conflicts related to meta tags present in the headers. + +However, if the HTML page specified does not contain ```` tags, the entire page is included. It is up to you to verify the consistency of the meta tags. + +The `` comment is very useful for tests (``) or loops (``). It is very convenient to include banners according to a criteria or randomly. When including, regardless of the file name extension, 4D analyzes the called page and then inserts the contents (modified or not) in the page originating the `4DINCLUDE` call. + +An included page with the `` comment is loaded in the Web server cache the same way as pages called via a URL or sent with the `WEB SEND FILE` command. + +In *path*, put the path leading to the document to include. Warning: In the case of a `4DINCLUDE` call, the path is relative to the document being analyzed, that is, the "parent" document. Use the slash character (/) as a folder separator and the two dots (..) to go up one level (HTML syntax). When you use the `4DINCLUDE` tag with the `PROCESS 4D TAGS` command, the default folder is the project folder. + +> You can modify the default folder used by the `4DINCLUDE` tag in the current page, using the `` tag (see below). + +The number of `` within a page is unlimited. However, the `` calls can be made only at one level. This means that, for example, you cannot insert `` in the *mydoc2.html* body page, which is called by `` inserted in *mydoc1.html*. Furthermore, 4D verifies that inclusions are not recursive. + +In case of error, the inserted text is "`` :The document cannot be opened". + +Ejemplos: + +```html + + + +``` + + + +## 4DLOOP and 4DENDLOOP + +#### Syntax: `` `` + +This comment allows repetition of a portion of code as long as the condition is fulfilled. The portion is delimited by `` and ``. + +The `` ... `` blocks can be nested. Like in 4D, each `` must match a ``. + +There are five kinds of conditions: + +### `` + +This syntax makes a loop for each record from the table current selection in the current process. The code portion located between the two comments is repeated for each current selection record. + +> When the `4DLOOP` tag is used with a table, records are loaded in "Read only" mode. + +The following code: + +```html + +
      + +``` + +... could be expressed in 4D language in the following way: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +This syntax makes a loop for each array item. The array current item is increased when each code portion is repeated. + +> This syntax cannot be used with two dimension arrays. In this case, it is better to combine a method with nested loops. + +The following code example: + +```html + +
      + +``` + +... could be expressed in 4D language in the following way: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +This syntax makes a loop as long as the method returns `True`. The method takes a Long Integer parameter type. First it is called with the value 0 to allow an initialization stage (if necessary); it is then called with the values 1 ,then 2, then 3 and so on, as long as it returns `True`. + +For security reasons, within a Web process, the `On Web Authentication` database method can be called once just before the initialization stage (method execution with 0 as parameter). If the authentication is OK, the initialization stage will proceed. + +`C_BOOLEAN($0)` and `C_LONGINT($1)` MUST be declared within the method for compilation purposes. + +The following code example: + +```html + +
      + +``` + +... could be expressed in 4D language in the following way: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +The `my_method` method can be as follows: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +With this syntax, the `4DLOOP` tag makes a loop as long as the *expression* returns `True`. The expression can be any valid Boolean expression and must contain a variable part to be evaluated in each loop to avoid infinite loops. + +For example, the following code: + +```html + + + + + +``` + +...produces the following result: + +``` +0 +1 +2 +3 +``` + +### `` + +In this case, the `4DLOOP` tag works like it does with an array: it makes a loop for each element of the array referenced by the pointer. The current array element is increased each time the portion of code is repeated. + +This syntax is useful when you pass an array pointer as a parameter to the `PROCESS 4D TAGS` command. + +Ejemplo: + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +In case of an interpretation error, the text "``: description" is inserted instead of the contents located between `` and ``. + +The following messages can be displayed: + +- Unexpected expression type (standard error); +- Incorrect table name (error on the table name); +- An array was expected (the variable is not an array or is a two dimension array); +- The method does not exist; +- Syntax error (when the method is executing); +- Access error (you do not have the appropriate access privileges to access the table or the method). +- 4DENDLOOP expected (the `` number does not match the ``). + +## 4DSCRIPT/ + +#### Syntax: `` + +The `4DSCRIPT` tag allows you to execute 4D methods when processing the template. The presence of the `` tag as an HTML comment launches the execution of the `MyMethod` method with the `Param` parameter as a string in `$1`. + +> If the tag is called in the context of a Web process, when the page is loaded, 4D calls the `On Web Authentication` database method (if it exists). If it returns True, 4D executes the method. + +The method must return text in `$0`. If the string starts with the code character 1, it is considered as HTML (the same principle is true for the `4DHTML` tag). + +For example, let’s say that you insert the following comment `“Today is â€` into a template Web page. When loading the page, 4D calls the `On Web Authentication` database method, then calls the `MYMETH` method and passes the string “/MYPARAM†as the parameter `$1`. The method returns text in $0 (for example "12/31/21"); the expression "`Today is` comments as you want in a template. + + + +## 4DTEXT + +#### Syntax: `` +#### Alternative syntax: `$4DTEXT(expression)` + + +The tag `` allows you to insert a reference to a 4D variable or expression returning a value. For example, if you write (in an HTML page): + +```html +

      Welcome to !

      +``` + +The value of the 4D variable `vtSiteName` will be inserted in the HTML page when it is sent. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +You can also insert 4D expressions. You can for example directly insert the contents of a field (``), an array element (``) or a method returning a value (``). The expression conversion follows the same rules as the variable ones. Moreover, the expression must comply with 4D syntax rules. + +> For security reasons, it is recommended to use this tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + +In case of an evaluation error, the inserted text will appear as ` : ## error # error code`. + +- You must use process variables. +- You can display the content of a picture field. However, it is not possible to display the content of a picture array item. +- It is possible to display the contents of an object field by means of a 4D formula. For example, you can write ``. +- You will usually work with Text variables. However, you can also use BLOB variables. You just need to generate BLOBs in `Text without length` mode. + + + + + + +## Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL + +Several existing 4D transformation tags can be expressed using a $-based syntax: + +#### $4dtag (expression) +can be used instead of +#### `` + +This alternative syntax is available only for tags used to return processed values: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(Other tags, such as 4DIF or 4DSCRIPT, must be written with the regular syntax). + +For example, you can write: + +```html +$4DEVAL(UserName) +``` + +instead of: + +```html + +``` + +The main advantage of this syntax is that it allows you to write XML-compliant templates. Some 4D developers need to create and validate XML-based templates using standard XML parser tools. Since the "<" character is invalid in an XML attribute value, it was not possible to use the "``" syntax of 4D tags without breaking the document syntax. On the other hand, escaping the "<" character will prevent 4D from interpreting the tags correctly. + +For example, the following code would cause an XML parsing error because of the first "<" character in the attribute value: + +```xml + +``` + +Using the $ syntax, the following code is validated by the parser: + +```xml + +``` + +Note that `$4dtag` and `<--#4dtag -->` are not strictly equivalent: unlike `<--#4dtag -->`, `$4dtag` processing does not interpret 4D tags [recursively](#recursive-processing). `$` tags are always evaluated once and the result is considered as plain text. + +The reason for this difference is to prevent malicious code injection. As [explained below](#prevention-of-malicious-code-insertion), it is strongly recommended to use `4DTEXT` tags instead of `4DHTML` tags when handling user text to protect against unwanted reinterpretation of tags: with `4DTEXT`, special characters such as "<" are escaped, thus any 4D tags using the `` syntax will lose their particular meaning. However, since `4DTEXT` does not escape the `$` symbol, we decided to break support for recursion in order to prevent malicious injection using the `$4dtag (expression)` syntax. + +The following examples show the result of processing depending on the syntax and tag used: + +```4d + // example 1 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //4D will quit! +``` +```4d + // example 2 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: " +``` +```4d + // example 3 + myName:="$4DEVAL(QUIT 4D)" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: $4DEVAL(QUIT 4D)" +``` + +Note that the `$4dtag` syntax supports matching pairs of enclosed quotes or parenthesis. For example, suppose that you need to evaluate the following complex (unrealistic) string: + +``` +String(1) + "\"(hello)\"" +``` + +You can write: + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + -->output is 1"(hello)" +``` + + diff --git a/website/translated_docs/es/Users/handling_users_groups.md b/website/translated_docs/es/Users/handling_users_groups.md index 5300d323e1018c..d148e3910f8d7e 100644 --- a/website/translated_docs/es/Users/handling_users_groups.md +++ b/website/translated_docs/es/Users/handling_users_groups.md @@ -1,41 +1,42 @@ --- id: editing -title: Managing 4D users and groups +title: Gestión de usuarios y grupos 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. -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. The Designer can: -- 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. +## Designer and Administrator + +The most powerful user is named **Designer**. No aspect of the application is closed to the Designer. The Designer can: +- access all application 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. 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. The Administrator can: - -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +- 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: - - 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. +- by default, access to protected parts of the application. 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 application. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. -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: +Both the Designer and Administrator are available by default in all applications. 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. 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. @@ -48,7 +49,7 @@ You use the users editor to create user accounts, set their properties and assig To add a user from the Toolbox : -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. +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). @@ -58,11 +59,11 @@ The list of users displays all the users, including the [Designer and the Admini 4D adds a new user to the list, named "New userX" by default. -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. +3. Enter the user name. This name will be used by the user to open the application. 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. 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. -> 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. +> Users can change their password at any time according to the options in the "Security" page of the structure settings, or using the `CHANGE PASSWORD` command. 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. @@ -70,6 +71,7 @@ The membership of users to different groups can also be set by group on the [Gro ### Deleting a user + 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) 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. @@ -78,7 +80,8 @@ Deleted user names no longer appear in the Users editor. Note that the IDs for d - **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. +- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the application (optional). This method can be used for example to load the user preferences. + ## Groups editor @@ -92,11 +95,11 @@ Keep in mind that once a group has been created, it cannot be deleted. If you wa 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. 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 application project. 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. + OR + Right-click in the list of groups and choose the **Add** or **Duplicate** command in the context menu. > The Duplicate command can be used to create several groups having the same characteristics quickly. @@ -104,6 +107,7 @@ To create a group: 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. + ### 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. @@ -120,7 +124,7 @@ To remove a user or group from another group, you just need to deselect the corr ### 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. +You can assign a group privileges to any plug-ins installed in the project. This includes all the 4D plug-ins and any third-party plug-ins. 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. @@ -132,9 +136,10 @@ 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. +The best way to ensure the security of your application 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. @@ -148,4 +153,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/es/Users/overview.md b/website/translated_docs/es/Users/overview.md index 13acd4f77cc987..e513a1e61dc793 100644 --- a/website/translated_docs/es/Users/overview.md +++ b/website/translated_docs/es/Users/overview.md @@ -1,37 +1,44 @@ --- -id: overview -title: Overview +id: generalidades +title: Generalidades --- -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. +If more than one person uses an application, 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 application or to application operations. > For an overview of 4D's security features, see the [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. +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 application. -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. +Groups can then be assigned access privileges to specific parts or features of the application (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: ![](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. +Until you give the Designer a password, all application access are done with the Designer's access rights, even if you have set up users and groups (when the application opens, no ID is required). Any part of the application can be opened. -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. +When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the application, remote users must enter a password. To disable the password access system, you just need to remove the Designer password. + ## 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: +In project applications (.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 with 4D Server. The following table lists the main users and groups features and their availability: -| | 4D Developer (single-user) | 4D Server | +| | 4D (single-user) | 4D Server | | ------------------------------------------------------------- | ---------------------------- | --------- | | Adding/editing users and groups | yes | yes | | Assigning user/group access to servers | yes | yes | @@ -39,6 +46,9 @@ In project databases (.4DProject or .4dz files), 4D users and groups can be conf | Access control once the Designer has been assigned a password | no (all access are Designer) | yes | + + + ## 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. @@ -47,13 +57,16 @@ The editors for users and groups are located in the toolbox of 4D. These editors > 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. The whole users and groups configuration can also be edited during application execution using 4D language commands of the [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.en.html) theme. + + ## Directory.json file -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +Users, groups, as well as their access rights are stored in a specific project file named **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. +- in the user settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the application. +- 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 settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by an application upgrade. + +> If users and groups management is not active, the **directory.json** is not created. -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file diff --git a/website/translated_docs/es/WebServer/allowProject.md b/website/translated_docs/es/WebServer/allowProject.md new file mode 100644 index 00000000000000..a3d97aeb2f6d2d --- /dev/null +++ b/website/translated_docs/es/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: Permitir métodos proyecto +--- + + +The 4D tags such as `4DEVAL`, `4DTEXT`, `4DHTML`... as well as the [`/4DACTION URL`](httpRequests.md#/4daction) allow you to trigger the execution of any project method of a 4D project published on the Web. For example, the request *http://www.server.com/4DACTION/login* causes the execution of the ***login*** project method, if it exists. + +This mechanism therefore presents a security risk for the application, in particular if an Internet user intentionally (or unintentionally) triggers a method not intended for execution via the web. You can avoid this risk in the following ways: + +* Filter the methods called via the URLS using the [`On Web Authentication`](authentication.md#on-web-authentication) database method. Drawbacks: If the database includes a great number of methods, this system may be difficult to manage. + +* Use the **Available through 4D tags and URLs (4DACTION...)** option found in the Method properties dialog box: + +![](assets/en/WebServer/methodProperties.png) + +This option is used to individually designate each project method that can be called using the `4DACTION` special URL, or the `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF` or `4DLOOP` tags. When it is not checked, the project method concerned cannot be directly executed through an HTTP request. Conversely, it can be executed using other types of calls (formulas, other methods, etc.). + +This option is unchecked by default. Methods that can be executed through `4DACTION` or specific tags must be specifically indicated. + +In the Explorer, Project methods with this property are given a specific icon: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/website/translated_docs/es/WebServer/authentication.md b/website/translated_docs/es/WebServer/authentication.md new file mode 100644 index 00000000000000..9b78ae01342715 --- /dev/null +++ b/website/translated_docs/es/WebServer/authentication.md @@ -0,0 +1,199 @@ +--- +id: authentication +title: Autenticación +--- + +Authenticating users is necessary when you want to provide specific access rights to web users. Authentication designates the way the information concerning the user credentials (usually name and password) are collected and processed. + + +## Authentication modes + +The 4D web server proposes three authentication modes, that you can select in the **Web**/**Options (I)** page of the Settings dialog box: + +![](assets/en/WebServer/authentication.png) + +> Using a **custom** authentication is recommended. + +### Generalidades + +The operation of the 4D web server's access system is summarized in the following diagram: + +![](assets/en/WebServer/serverAccess.png) + +> Requests starting with `rest/` are directly handled by the [REST server](REST/configuration.md). + + +### Custom (default) + +Basically in this mode, it's up to the developer to define how to authenticate users. 4D only evaluates HTTP requests [that require an authentication](#method-calls). + +This authentication mode is the most flexible because it allows you to: + +- either, delegate the user authentication to a third-party application (e.g. a social network, SSO); +- or, provide an interface to the user (e.g. a web form) so that they can create their account in your customer database; then, you can authenticate users with any custom algorithm (see [this example](sessions.md#example) from the "User sessions" chapter). The important thing is that you never store the password in clear, using such code: + +```4d +//... user account creation +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +See also [this example](gettingStarted.md#authenticating-users) from the "Getting started" chapter. + +If no custom authentication is provided, 4D calls the [`On Web Authentication`](#on-web-authentication) database method (if it exists). In addition to $1 and $2, only the IP addresses of the browser and the server ($3 and $4) are provided, the user name and password ($5 and $6) are empty. The method must return **True** in $0 if the user is successfully authenticated, then the resquested resource is served, or **False** in $0 if the authentication failed. + +> **Warning:** If the `On Web Authentication` database method does not exist, connections are automatically accepted (test mode). + + +### Basic protocol + +When a user connects to the server, a standard dialog box appears on their browser in order for them to enter their user name and password. + +> The name and password entered by the user are sent unencrypted in the HTTP request header. This mode typically requires HTTPS to provide confidentiality. + +Entered values are then evaluated: + +- If the **Include 4D passwords** option is checked, user credentials will be first evaluated against the [internal 4D users table](Users/overview.md). + - If the user name sent by the browser exists in the table of 4D users and the password is correct, the connection is accepted. If the password is incorrect, the connection is refused. + - If the user name does not exist in the table of 4D users, the [`On Web Authentication`](#on-web-authentication) database method is called. If the `On Web Authentication` database method does not exist, connections are rejected. + +- If the **Include 4D passwords** option is not checked, user credentials are sent to the [`On Web Authentication`](#on-web-authentication) database method along with the other connection parameters (IP address and port, URL...) so that you can process them. If the `On Web Authentication` database method does not exist, connections are rejected. +> With the 4D Client web server, keep in mind that all the sites published by the 4D Client machines will share the same table of users. Validation of users/passwords is carried out by the 4D Server application. + +### DIGEST protocol + +This mode provides a greater level of security since the authentication information is processed by a one-way process called hashing which makes their contents impossible to decipher. + +As in BASIC mode, users must enter their name and password when they connect. The [`On Web Authentication`](#on-web-authentication) database method is then called. When the DIGEST mode is activated, the $6 parameter (password) is always returned empty. In fact, when using this mode, this information does not pass by the network as clear text (unencrypted). It is therefore imperative in this case to evaluate connection requests using the `WEB Validate digest` command. +> You must restart the web server in order for the changes made to these parameters to be taken into account. + + + +## On Web Authentication + +The `On Web Authentication` database method is in charge of managing web server engine access. It is called by 4D or 4D Server when a dynamic HTTP request is received. + +### Database method calls + +The `On Web Authentication` database method is automatically called when a request or processing requires the execution of some 4D code (except for REST calls). It is also called when the web server receives an invalid static URL (for example, if the static page requested does not exist). + +The `On Web Authentication` database method is therefore called: + +- when the web server receives a URL requesting a resource that does not exist +- when the web server receives a URL beginning with `4DACTION/`, `4DCGI/`... +- when the web server receives a root access URL and no home page has been set in the Settings or by means of the `WEB SET HOME PAGE` command +- when the web server processes a tag executing code (e.g `4DSCRIPT`) in a semi-dynamic page. + +The `On Web Authentication` database method is NOT called: + +- when the web server receives a URL requesting a valid static page. +- when the web server reveives a URL beginning with `rest/` and the REST server is launched (in this case, the authentication is handled through the [`On REST Authentication` database method](REST/configuration.md#using-the-on-rest-authentication-database-method) or [Structure settings](REST/configuration.md#using-the-structure-settings)). + + +### Sintaxis + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +| Parámetros | Tipo | | Descripción | +| ---------- | -------- |:--:| ------------------------------------------------- | +| $1 | Texto | <- | URL | +| $2 | Texto | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Texto | <- | IP address of the web client (browser) | +| $4 | Texto | <- | IP address of the server | +| $5 | Texto | <- | User name | +| $6 | Texto | <- | Password | +| $0 | Booleano | -> | True = request accepted, False = request rejected | + +You must declare these parameters as follows: + +```4d +//On Web Authentication database method + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` +> All the `On Web Authentication` database method's parameters are not necessarily filled in. The information received by the database method depends on the selected [authentication mode](#authentication-mode)). + + +#### $1 - URL + +The first parameter (`$1`) is the URL received by the server, from which the host address has been removed. + +Let’s take the example of an Intranet connection. Suppose that the IP address of your 4D Web Server machine is 123.45.67.89. The following table shows the values of $1 depending on the URL entered in the Web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.45.67.89 | / | +| http://123.45.67.89 | / | +| 123.45.67.89/Customers | /Customers | +| http://123.45.67.89/Customers/Add | /Customers/Add | +| 123.45.67.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +#### $2 - Header and Body of the HTTP request + +The second parameter (`$2`) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Authentication` database method as it is. Its contents will vary depending on the nature of the web browser which is attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + +#### $3 - Web client IP address + +The `$3` parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + + +#### $4 - Server IP address + +The `$4` parameter receives the IP address used to call the web server. 4D allows for multi-homing, which allows you to exploit machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.md#ip-address-to-listen). + + +#### $5 and $6 - User Name and Password + +The `$5` and `$6` parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser. This dialog box appears for each connection, if [basic](#basic-protocol) or [digest](#digest-protocol) authentication is selected. +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + +#### $0 parameter + +The `On Web Authentication` database method returns a boolean in $0: + +* If $0 is True, the connection is accepted. + +* If $0 is False, the connection is refused. + +The `On Web Connection` database method is only executed if the connection has been accepted by `On Web Authentication`. +> **WARNING**
      If no value is set to $0 or if $0 is not defined in the `On Web Authentication` database method, the connection is considered as accepted and the `On Web Connection` database method is executed. +> * Do not call any interface elements in the `On Web Authentication` database method (`ALERT`, `DIALOG`, etc.) because otherwise its execution will be interrupted and the connection refused. The same thing will happen if an error occurs during its processing. + + +### Ejemplo + +Example of the `On Web Authentication` database method in [DIGEST mode](#digest-protocol): + +```4d + // On Web Authentication Database Method + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // User is found + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // User does not exist + End if +``` diff --git a/website/translated_docs/es/WebServer/errorPages.md b/website/translated_docs/es/WebServer/errorPages.md new file mode 100644 index 00000000000000..7f148b2870f876 --- /dev/null +++ b/website/translated_docs/es/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: Custom HTTP Error Pages +--- + +The 4D Web Server allows you to customize HTTP error pages sent to clients, based on the status code of the server response. Error pages refer to: + +* status codes starting with 4 (client errors), for example 404 + +* status codes starting with 5 (server errors), for example 501. + +For a full description of HTTP error status codes, you can refer to the [List of HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (Wikipedia). + + +## Replacing default pages + +To replace default 4D Web Server error pages with your own pages you just need to: + +* put custom HTML pages at the first level of the application's web folder, + +* name the custom pages "{statusCode}.html" (for example, "404.html"). + +You can define one error page per status code and/or a generic error page for a range of errors, named "{number}xx.html". For example, you can create "4xx.html" for generic client errors. The 4D Web Server will first look for a {statusCode}.html page then, if it does not exist, a generic page. + +For example, when an HTTP response returns a status code 404: + +1. 4D Web Server tries to send a "404.html" page located in the application's web folder. + +2. If it is not found, 4D Web Server tries to send a "4xx.html" page located in the application's web folder. + +3. If not found, 4D Web Server then uses its default error page. + +## Ejemplo + +If you define the following custom pages in your web folder: + +![](assets/en/WebServer/errorPage.png) + +* the "403.html" or "404.html" pages will be served when 403 or 404 HTTP responses are returned respectively, + +* the "4xx.html" page will be served for any other 4xx error status (400, 401, etc.), + +* the "5xx.html" page will be served for any 5xx error status. + diff --git a/website/translated_docs/es/WebServer/gettingStarted.md b/website/translated_docs/es/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..d46d46b1596dff --- /dev/null +++ b/website/translated_docs/es/WebServer/gettingStarted.md @@ -0,0 +1,285 @@ +--- +id: gettingStarted +title: Comencemos +--- + +This "Getting started" section is geared at first-time users who want an overall overview on how to go from zero to a 4D website that handles data from the database. Let's start! + + +## Hello World Example + +Let's start by making the web server send "Hello World" to the browser. The most simple way to do this is to create a project, start the web server and write a small code that returns a text in the `On Web Connection` database method. + +### Starting the web server + +To start the 4D web server: + +1. Launch your 4D application and create a new, empty 4D project. +2. In the **Run** menu, select **Start Web Server**. + +That's all! The web server is started (you can see that the menu item has become **Stop Web Server**). It is now ready to handle requests. To check it, we'll display the default home page. + +### Displaying the default home page + +The 4D web server creates automatically a default `index.html` page in the default `WebFolder` root folder, created at the same level as the Project folder. + +1. Launch a web browser and connect to the web server IP address (default http port for 4D web server is 80). If the web server and the browser are on the same machine, you can select **Test Web Server** in the **Run** menu. + +The default home page is displayed: + +![](assets/en/WebServer/defaultHomePage.png) + +### Displaying Hello World + +1. Open the Explorer, display the Database Methods list and double-click on `On Web Connection`. + +2. Enter the following code: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // Error 404 for example +End case +``` + +The [`On Web Connection`](httpRequests.md#on-web-connection) database method is called for incoming requests and receives the target URL in the `$1` parameter. This very simple code only sends the text to the browser. + +3. In your browser, enter the following URL: + +``` +http://localhost/hello +``` + +The web server handles the request and returns: + +![](assets/en/WebServer/hello.png) + + +## Getting data from the database + +Now we'll see how simple it is to get data from the database. First, we will create a table and fill it with some data. + +Create a basic database with, for example, a single table containing some records: + +![](assets/en/WebServer/hello2.png) ![](assets/en/WebServer/hello3.png) + +### Displaying data in a page + +The most simple solution to display data is to call a [template page](templates.md) containing tags. + +1. Using any text editor, create a file containing the following lines: + +```html + + + + +
      + + + +``` + +2. Name the file "friends.shtml" and save it in the **WebFolder** of your project. +3. In your browser, enter the following URL: + +``` +http://localhost/friends.shtml +``` + +`.shtml` pages are automatically processed by the web server. Your page filled with data is returned: + +![](assets/en/WebServer/hello3bis.png) + +### REST request + +If we not only want to *display* data, but to *use* it, we can use ORDA and the REST server. Thanks to the [ORDA concept](ORDA/overview.md), the `Friends` table is automatically mapped to a dataclass and is available through [REST](REST/gettingStarted.md). + + +1. We will use the REST server to access data: go the "Settings" dialog box, select the "Web/Rest resource" page, and check the **Expose as REST server** option. + +![](assets/en/WebServer/hello5.png) + +2. In your browser, enter the following URL: + +``` +http://localhost/rest/$catalog +``` + +The web server returns the results in JSON: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +You get the catalog, i.e. the list of exposed dataclasses and attributes in the datastore. + +You can also get any data. + +3. Enter the following URL: + +``` +http://localhost/rest/Friends +``` + +The server returns the entities, i.e. the data, from the Friends dataclass: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +This very simple example shows how the web server interacts transparently with the [REST server](REST/gettingStarted.md) to return any requested data, provided it is exposed. In your web interfaces, you can easily bind the javascript or html code with returned data. See the built-in [Web Data Explorer](Admin/dataExplorer.md) to have an example of sophisticated web interface bound to dataclasses. + + + + +## Login and session + +In the above sections, we get free access to the application from web requests. However, in the world of web applications, data access security is the first priority. When connecting to the 4D web server, users must be authentified and their navigation controlled. + +### Creating a table of users + +The most simple and secured way to log a user on the 4D web server is based upon the following scenario: + +- Users are stored in a dedicated, unexposed table (named *WebUsers* for example) +- The *WebUsers* table could be [encrypted](MSC/encrypt.md) and stores the user login and a hash of their password. + +1. Create a table with some fields, for example: + +![](assets/en/WebServer/helloUsers.png) + +2. Write and execute the following code to create a user: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// the password would be entered by the user +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### Authenticating users + +> To be secure from end to end, it is necessary that the whole connection is established via [https](webServerConfig.md#enable-https). + +1. Open the Explorer and create a project method named "login". + +3. Write the following code: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// get values sent in the header of the request +WEB GET VARIABLES($anames; $avalues) + +// look for header login fields +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +//look for a user with the entered name in the users table +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) //a user was found + //check the password + If (Verify password hash($password; $user.password)) + //password ok, fill the session + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + //You can use the user session to store any information + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. Display the method properties by clicking on the **[i]** button in the code editor, check the `4D tags and URLs (4DACTION...)` option and click **OK**. + +![](assets/en/WebServer/hello0.png) + + +4. In your browser, enter the following URL: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> Using such URLs is not recommended, it is only presented here to keep the example simple. A more realistic login request must be handled through a web form and a POST request. See [this page](sessions.md#example) for an example of form POST. + +Then you will be logged for the session: + +![](assets/en/WebServer/login1.png) + +Wrong credentials would be rejected: + +![](assets/en/WebServer/login2.png) + +Once a user is logged, you can handle the associated session using the `WEB Get Current Session ID` method. See the [User sessions](sessions.md) page. + diff --git a/website/translated_docs/es/WebServer/httpRequests.md b/website/translated_docs/es/WebServer/httpRequests.md new file mode 100644 index 00000000000000..dd761b735eee00 --- /dev/null +++ b/website/translated_docs/es/WebServer/httpRequests.md @@ -0,0 +1,353 @@ +--- +id: httpRequests +title: Processing HTTP requests +--- + +The 4D web server provides several features to handle HTTP requests: + +- the `On Web Connection` database method, a router for your web application, +- the `/4DACTION` URL to call server-side code +- `WEB GET VARIABLES` to get values from HTML objects sent to the server +- other commands such as `WEB GET HTTP BODY`, `WEB GET HTTP HEADER`, or `WEB GET BODY PART` allow to customize the request processing, including cookies. +- the *COMPILER_WEB* project method, to declare your variables. + + +## On Web Connection + +The `On Web Connection` database method can be used as the entry point for the 4D Web server. + +### Database method calls + +The `On Web Connection` database method is automatically called when the server reveives any URL that is not a path to an existing page on the server. The database method is called with the URL. + +For example, the URL "*a/b/c*" will call the database method, but "*a/b/c.html*" will not call the database method if the page "c.html" exists in the "a/b" subfolder of the [WebFolder](webServerConfig.md#root-folder). + +> The request should have previously been accepted by the [`On Web Authentication`](authentication.md#on-web-authentication) database method (if it exists) and the web server must be launched. + +### Sintaxis + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +| Parámetros | Tipo | | Descripción | +| ---------- | ----- |:--:| -------------------------------------------- | +| $1 | Texto | <- | URL | +| $2 | Texto | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Texto | <- | IP address of the web client (browser) | +| $4 | Texto | <- | IP address of the server | +| $5 | Texto | <- | User name | +| $6 | Texto | <- | Password | + + +You must declare these parameters as shown below: + +```4d +//On Web Connection database method + + C_TEXT($1;$2;$3;$4;$5;$6) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Connection database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> Calling a 4D command that displays an interface element (`DIALOG`, `ALERT`, etc.) is not allowed and ends the method processing. + + +### $1 - URL extra data + +The first parameter ($1) is the URL entered by users in the address area of their web browser, without the host address. + +Let’s use an intranet connection as an example. Suppose that the IP address of your 4D Web Server machine is 123.4.567.89. The following table shows the values of $1 depending on the URL entered in the web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.4.567.89 | / | +| http://123.4.567.89 | / | +| 123.4.567.89/Customers | /Customers | +| http://123.4.567.89/Customers/Add | /Customers/Add | +| 123.4.567.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +Note that you are free to use this parameter at your convenience. 4D simply ignores the value passed beyond the host part of the URL. For example, you can establish a convention where the value "*/Customers/Add*" means “go directly to add a new record in the `[Customers]` table.†By supplying the web users with a list of possible values and/or default bookmarks, you can provide shortcuts to different parts of your application. This way, web users can quickly access resources of your website without going through the entire navigation path each time they make a new connection. + + +### $2 - Header and Body of the HTTP request + +The second parameter ($2) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Connection` database method "as is". Its contents will vary depending on the nature of the web browser attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + + +### $3 - Web client IP address + +The $3 parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + +### $4 - Server IP address + +The $4 parameter receives the IP address requested by the 4D Web Server. 4D allows for multi-homing, which allows you to use machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.html#ip-address-to-listen). + +### $5 and $6 - User Name and Password + +The $5 and $6 parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser, if applicable (see the [authentication page](authentication.md)). +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + + + + +## /4DACTION + +***/4DACTION/***MethodName***
      **/4DACTION/******MethodName/Param* + +| Parámetros | Tipo | | Descripción | +| ---------- | ----- |:--:| -------------------------------------------- | +| MethodName | Texto | -> | Name of the 4D project method to be executed | +| Param | Texto | -> | Text parameter to pass to the project method | + +**Usage:** URL or Form action. + +This URL allows you to call the *MethodName* 4D project method with an optional *Param* text parameter. The method will receive this parameter in *$1*. + +- The 4D project method must have been [allowed for web requests](allowProject.md): the “Available through 4D tags and URLs (4DACTION...)†attribute value must have been checked in the properties of the method. If the attribute is not checked, the web request is rejected. +- When 4D receives a `/4DACTION/MethodName/Param` request, the `On Web Authentication` database method (if it exists) is called. + +`4DACTION/` can be associated with a URL in a static Web page: + +```html +Do Something +``` + +The `MyMethod` project method should generally return a "reply" (sending of an HTML page using `WEB SEND FILE` or `WEB SEND TEXT`, etc.). Be sure to make the processing as short as possible in order not to block the browser. + +> A method called by `/4DACTION` must not call interface elements (`DIALOG`, `ALERT`, etc.). + +#### Ejemplo + +This example describes the association of the `/4DACTION` URL with an HTML picture object in order to dynamically display a picture in the page. You insert the following instructions in a static HTML page: + +```html + +``` + +The `getPhoto` method is as follows: + +```4d +C_TEXT($1) // This parameter must always be declared +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + //find the picture in the Images folder within the Resources folder +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) //put the picture in the picture variable +PICTURE TO BLOB($PictVar;$BLOB;".png") //convert the picture to ".png" format +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION to post forms + +The 4D Web server also allows you to use “posted†forms, which are static HTML pages that send data to the Web server, and to easily retrieve all the values. The POST type must be associated to them and the form’s action must imperatively start with /4DACTION/MethodName. + +A form can be submitted through two methods (both can be used with 4D): +- POST, usually used to send data to the Web server, +- GET, usually used to request data from the Web server. + +> When the Web server receives a posted form, it calls the `On Web Authentication` database method (if it exists). + +In the called method, you must call the `WEB GET VARIABLES` command in order to [retrieve the names and values](#getting-values-from-the-requests) of all the fields included in an HTML page submitted to the server. + +Example to define the action of a form: + +```html +
      +``` + +#### Ejemplo + +In a Web application, we would like for the browsers to be able to search among the records by using a static HTML page. This page is called “search.htmâ€. The application contains other static pages that allow you to, for example, display the search result (“results.htmâ€). The POST type has been associated to the page, as well as the `/4DACTION/SEARCH` action. + +Here is the HTML code that corresponds to this page: + +```html + +
      +Whole word
      + +
      +``` + +During data entry, type “ABCD†in the data entry area, check the "Whole word" option and validate it by clicking the **Search** button. In the request sent to the Web server: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D calls the `On Web Authentication` database method (if it exists), then the `processForm` project method is called, which is as follows: + +```4d + C_TEXT($1) //mandatory for compiled mode + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) //we retrieve all the variables of the form + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) //If the option has not been checked + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
      " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") //Send the list to the results.htm form + //which contains a reference to the variable vLIST, + //for example + //... +End if +``` + + + + +## Getting values from HTTP requests + +4D's Web server lets you recover data sent through POST or GET requests, using Web forms or URLs. + +When the Web server receives a request with data in the header or in the URL, 4D can retrieve the values of any HTML objects it contains. This principle can be implemented in the case of a Web form, sent for example using `WEB SEND FILE` or `WEB SEND BLOB`, where the user enters or modifies values, then clicks on the validation button. + +In this case, 4D can retrieve the values of the HTML objects found in the request using the `WEB GET VARIABLES` command. The `WEB GET VARIABLES` command retrieves the values as text. + +Consider the following HTML page source code: + +```html + + + Welcome + + + +
      +

      Welcome to Spiders United

      +

      Please enter your name: +

      +

      + + +

      +

      + + + +

      +
      + + +``` + +When 4D sends the page to a Web Browser, it looks like this: + +![](assets/en/WebServer/spiders.png) + +The main features of this page are: + +- It includes three **Submit** buttons: `vsbLogOn`, `vsbRegister` and `vsbInformation`. +- When you click **Log On**, the submission of the form is first processed by the JavaScript function `LogOn`. If no name is entered, the form is not even submitted to 4D, and a JavaScript alert is displayed. +- The form has a POST 4D method as well as a Submit script (*GetBrowserInformation*) that copies the browser properties to the four hidden objects whose names starts with *vtNav_App*. It also includes the `vtUserName` object. + +Let’s examine the 4D method `WWW_STD_FORM_POST` that is called when the user clicks on one of the buttons on the HTML form. + +```4d + // Retrieval of value of variables + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // The Log On button was clicked + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // The WWW POST EVENT method saves the information in a database table + Else + + $0:=WWW Register + // The WWW Register method lets a new Web user register + End if + + // The Register button was clicked + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // The Information button was clicked + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +The features of this method are: + +- The values of the variables *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, and *vtNav_userAgent* (bound to the HTML objects having the same names) are retrieved using the `WEB GET VARIABLES` command from HTML objects created by the *GetBrowserInformation* JavaScript script. +- Out of the *vsbLogOn*, *vsbRegister* and *vsbInformation* variables bound to the three Submit buttons, only the one corresponding to the button that was clicked will be retrieved by the `WEB GET VARIABLES` command. When the submit is performed by one of these buttons, the browser returns the value of the clicked button to 4D. This tells you which button was clicked. + +Keep in main that with HTML, all objects are text objects. If you use a SELECT object, it is the value of the highlighted element in the object that is returned in the `WEB GET VARIABLES` command, and not the position of the element in the array as in 4D. `WEB GET VARIABLES` always returns values of the Text type. + + +## Other Web Server Commands + +The 4D web server provides several low-level web commands allowing you to develop custom processing of requests: + +- the `WEB GET HTTP BODY` command returns the body as raw text, allowing any parsing you may need +- the `WEB GET HTTP HEADER` command return the headers of the request. It is useful to handle custom cookies, for example (along with the `WEB SET HTTP HEADER` command). +- the `WEB GET BODY PART` and `WEB Get body part count` commands to parse the body part of a multi-part request and retrieve text values, but also files posted, using BLOBs. + +These commands are summarized in the following graphic: + +![](assets/en/WebServer/httpCommands.png) + +The 4D web server supports files uploaded in chunked transfer encoding from any Web client. Chunked transfer encoding is a data transfer mechanism specified in HTTP/1.1. It allows data to be transferred in a series of "chunks" (parts) without knowing the final data size. The 4D Web Server also supports chunked transfer encoding from the server to Web clients (using `WEB SEND RAW DATA`). + +## COMPILER_WEB Project Method + +The COMPILER\_WEB method, if it exists, is systematically called when the HTTP server receives a dynamic request and calls the 4D engine. This is the case, for example, when the 4D Web server receives a posted form or a URL to process in [`On Web Connection`](#on-web-connection). This method is intended to contain typing and/or variable initialization directives used during Web exchanges. It is used by the compiler when the application is compiled. The COMPILER\_WEB method is common to all the Web forms. By default, the COMPILER_WEB method does not exist. You must explicitly create it. + +> The COMPILER_WEB project method is also called, if it exists, for each SOAP request accepted. + + diff --git a/website/translated_docs/es/WebServer/preemptiveWeb.md b/website/translated_docs/es/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..28ed31723d7f2e --- /dev/null +++ b/website/translated_docs/es/WebServer/preemptiveWeb.md @@ -0,0 +1,95 @@ +--- +id: preemptiveWeb +title: Using preemptive web processes +--- + + +The 4D Web Server allows you to take full advantage of multi-core computers by using preemptive web processes in your compiled applications. You can configure your web-related code, including 4D tags and web database methods, to run simultaneously on as many cores as possible. + +For in-depth information on preemptive process in 4D, please refer to the *Preemptive 4D processes* section in the *Language Reference*. + +## Availability of preemptive mode for web processes + +The use of preemptive mode for web processes is only available in the following contexts: + +* use of 4D Server or 4D local mode (4D in remote mode does not support preemptive mode) + +* use of a compiled database + +* **Use preemptive processes** database setting checked (see below) + +* all web-related database methods and project methods are confirmed thread-safe by 4D Compiler + +If any requirement is missing, the web server will use cooperative processes. + +## Enabling the preemptive mode for the web server + +To enable the preemptive mode for your application's web server code, you must check the **Use preemptive processes** option on the "Web/Options (I)" page of the Database Settings dialog box: + +![](assets/en/WebServer/preemptive.png) + +When this option is checked, the 4D compiler will automatically evaluate the thread-safety property of each piece of web-related code (see below) and return errors in case of incompatibility. +> This option does not apply to web service processes (server or client). Preemptive mode is supported by web service processes at method level: you just have to select "Can be run in preemptive processes" property for published SOAP server methods (see *Publishing a Web Service with 4D*) or proxy client methods (see *Subscribing to a Web Service in 4D*) and make sure they are confirmed thread-safe by the compiler. + +## Writing thread-safe web server code + +All 4D code executed by the web server must be thread-safe if you want your web processes to be run in preemptive mode. When the **Use preemptive processes** option is checked in the Settings dialog box, the following parts of the application will be automatically evaluated by the 4D compiler: + +* All web-related database methods: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* The `compiler_web` project method (regardless of its actual "Execution mode" property); + +* Basically any code processed by the `PROCESS 4D TAGS` command in the web context, for example through .shtml pages. + +* Any project method with the "Available through 4D tags and URLS (`4DACTION`, etc.)" attribute + +* Triggers for tables with "Expose as REST resource" attribute + +* Project methods available through REST ("REST Server" property checked) + +For each of these methods and code parts, the compiler will check if the thread-safety rules are respected, and will return errors in case of issues. For more information about thread-safety rules, please refer to the *Writing a thread-safe method* paragraph in the *Processes* chapter. + +## Thread-safety of 4D web code + +Most of the web-related 4D commands and functions, database methods and URLs are thread-safe and can be used in preemptive mode. + +### 4D commands and database methods + +All 4D web-related commands are thread-safe, *i.e.*: + +* all commands from the *Web Server* theme, +* all commands from the *HTTP Client* theme. + +The web-related database methods are thread-safe and can be used in preemptive mode (see below): `On Web Authentication`, `On Web Connection`, `On REST Authentication`...). + +Of course, the code executed by these methods must also be thread-safe. + + +### Web Server URLs + +The following 4D Web Server URLs are thread-safe and can be used in preemptive mode: + +* *4daction/* (the called project method must also be thread-safe) +* *4dcgi/* (the called database methods must also be thread-safe) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (generated by `PROCESS 4D TAGS` for web request on picture fields) +* *4dimg/* (generated by `PROCESS 4D TAGS` for web request on picture variables) + +### Preemptive web process icon + +Both the Runtime Explorer and the 4D Server administration window display a specific icon for preemptive web processes: + +| Process type | Icono | +| --------------------- | ---------------------------------------- | +| Preemptive web method | ![](assets/en/WebServer/processIcon.png) | + + diff --git a/website/translated_docs/es/WebServer/sessions.md b/website/translated_docs/es/WebServer/sessions.md new file mode 100644 index 00000000000000..d397244231565e --- /dev/null +++ b/website/translated_docs/es/WebServer/sessions.md @@ -0,0 +1,172 @@ +--- +id: sessions +title: User sessions +--- + +The 4D web server provides built-in features for managing **user sessions**. Creating and maintaining user sessions allows you to control and improve the user experience on your web application. When user sessions are enabled, web clients can reuse the same server context from one request to another. + +Web server user sessions allow to: + +- handle multiple requests simultaneously from the same web client through an unlimited number of preemptive processes (web server sessions are **scalable**), +- share data between the processes of a web client, +- associate privileges to user sessions, +- handle access through a `Session` object and the [Session API](API/SessionClass.md). + +> **Note:** The current implementation is only the first step of an upcoming comprehensive feature allowing developers to manage hierarchical user permissions through sessions in the whole web application. + + +## Enabling sessions + +The session management feature can be enabled and disabled on your 4D web server. There are different ways to enable session management: + +- Using the **Scalable sessions** option on the "Web/Options (I)" page of the Settings (permanent setting): ![alt-text](assets/en/WebServer/settingsSession.png) + +This option is selected by default in new projects. It can however be disabled by selecting the **No sessions** option, in which case the web session features are disabled (no `Session` object is available). + +- Using the [`.scalableSession`](API/WebServerClass.md#scalablesession) property of the Web Server object (to pass in the *settings* parameter of the [`.start()`](API/WebServerClass.md#start) function). In this case, this setting overrides the option defined in the Settings dialog box for the Web Server object (it is not stored on disk). + +> The `WEB SET OPTION` command can also set the session mode for the main Web server. + +In any cases, the setting is local to the machine; so it can be different on the 4D Server Web server and the Web servers of remote 4D machines. + +> **Compatibility**: A **Legacy sessions** option is available in projects created with a 4D version prior to 4D v18 R6 (for more information, please refer to the [doc.4d.com](https://doc.4d.com) web site). + + +## Session implementation + +When [sessions are enabled](#enabling-sessions), automatic mechanisms are implemented, based upon a private cookie set by 4D itself: "4DSID_*AppName*", where *AppName* is the name of the application project. This cookie references the current web session for the application. + +> The cookie name can be get using the [`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) property. + +1. In each web client request, the Web server checks for the presence and the value of the private "4DSID_*AppName*" cookie. + +2. If the cookie has a value, 4D looks for the session that created this cookie among the existing sessions; if this session is found, it is reused for the call. + +2. If the client request does not correspond to an already opened session: + +- a new session with a private "4DSID_*AppName*" cookie is created on the web server +- a new Guest `Session` object is created and is dedicated to the scalable web session. + +The current `Session` object can then be accessed through the [`Session`](API/SessionClass.md#session) command in the code of any web processes. + +![alt-text](assets/en/WebServer/schemaSession.png) + +> Web processes usually do not end, they are recycled in a pool for efficiency. When a process finishes executing a request, it is put back in the pool and made available for the next request. Since a web process can be reused by any session, [process variables](Concepts/variables.md#process-variables) must be cleared by your code at the end of its execution (using [`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/en/page89.html) for example). This cleanup is necessary for any process related information, such as a reference to an opened file. This is the reason why **it is recommended** to use the [Session](API/SessionClass.md) object when you want to keep session related information. + + +## Sharing information + +Each `Session` object provides a [`.storage`](API/SessionClass.md#storage) property which is a [shared object](Concepts/shared.md). This property allows you to share information between all processes handled by the session. + +## Session lifetime + +A scalable web session is closed when: + +- the web server is stopped, +- the timeout of the session cookie has been reached. + +The lifespan of an inactive cookie is 60 minutes by default, which means that the web server will automatically close inactive sessions after 60 minutes. + +This timeout can be set using the [`.idleTimeout`](API/SessionClass.md#idletimeout) property of the `Session` object (the timeout cannot be less than 60 minutes). + +When a scalable web session is closed, if the [`Session`](API/SessionClass.md#session) command is called afterwards: + +- the `Session` object does not contain privileges (it is a Guest session) +- the [`.storage`](API/SessionClass.md#storage) property is empty +- a new session cookie is associated to the session + + +## Privileges + +Privileges can be associated to sessions. On the web server, you can provide specific access or features depending on the privileges of the session. + +You can assign privileges usign the [`.setPrivileges()`](API/SessionClass.md#setprivileges) function. In your code, you can check the session's privileges to allow or deny access using the [`.hasPrivilege()`](API/SessionClass.md#hasprivilege) function. By default, new sessions do not have any privilege: they are **guest** sessions ([`.isGuest()`](API/SessionClass.md#isguest) function returns true). + +> In the current implementation (v18 R6), only the "WebAdmin" privilege is available. + +Ejemplo: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page +End if +``` + + +## Ejemplo + +In a CRM application, each salesperson manages their own client portfolio. The datastore contains at least two linked dataclasses: Customers and SalesPersons (a salesperson has several customers). + +![alt-text](assets/en/WebServer/exampleSession.png) + +We want a salesperson to authenticate, open a session on the web server, and have the top 3 customers be loaded in the session. + + +1. We run this URL to open a session: + +``` +http://localhost:8044/authenticate.shtml +``` + +> In a production environment, it it necessary to use a [HTTPS connection](API/WebServerClass.md#httpsenabled) to avoid any uncrypted information to circulate on the network. + + +2. The `authenticate.shtml` page is a form containing *userId* et *password* input fields and sending a 4DACTION POST action: + +```html + + + +
      + UserId:
      + Password:
      + +
      + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. The authenticate project method looks for the *userID* person and validates the password against the hashed value already stored in the *SalesPersons* table: + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` \ No newline at end of file diff --git a/website/translated_docs/es/WebServer/templates.md b/website/translated_docs/es/WebServer/templates.md new file mode 100644 index 00000000000000..39ad7b2fcc8189 --- /dev/null +++ b/website/translated_docs/es/WebServer/templates.md @@ -0,0 +1,96 @@ +--- +id: templates +title: Template pages +--- + +4D's Web server allows you to use HTML template pages containing tags, i.e. a mix of static HTML code and 4D references added by means of [transformation tags](Tags/tags.md) such as 4DTEXT, 4DIF, or 4DINCLUDE. These tags are usually inserted as HTML type comments (``) into the HTML source code. + +When these pages are sent by the HTTP server, they are parsed and the tags they contain are executed and replaced with the resulting data. The pages received by the browsers are thus a combination of static elements and values coming from 4D processing. + +For example, if you write in an HTML page: + +```html +

      Welcome to !

      +``` + +The value of the 4D variable *vtSiteName* will be inserted in the HTML page. + + +## Tags for templates + +The following 4D tags are available: + +- 4DTEXT, to insert 4D variables and expressions as text, +- 4DHTML, to insert HTML code, +- 4DEVAL, to evaluate any 4D expression, +- 4DSCRIPT, to execute a 4D method, +- 4DINCLUDE, to include a page within another one, +- 4DBASE, to modify the default folder used by the 4DINCLUDE tag, +- 4DCODE, to insert 4D code, +- 4DIF, 4DELSE, 4DELSEIF and 4DENDIF, to insert conditions in the HTML code, +- 4DLOOP and 4DENDLOOP, to make loops in the HTML code, +- 4DEACH and 4DENDEACH, to loop in collections, entity selections, or object properties. + +These tags are described in the [Transformation Tags](Tags/tags.md) page. + +It is possible to mix tags. For example, the following HTML code is allowed: + +```html + +... + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + + (loop on the current selection) + (If [TABLE]ValNum>10) + (subpage insertion) + (Else) + Value:
      + (Field display) + + (End for) + + +``` + + +## Tag parsing + +For optimization reasons, the parsing of the HTML source code is not carried out by the 4D Web server when HTML pages are called using simple URLs that are suffixed with “.HTML†or “.HTMâ€. + +Parsing of the contents of template pages sent by 4D web server takes place when `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB) or `WEB SEND TEXT` commands are called, as well as when sending pages called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to "force" the parsing of HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, `http://www.server.com/dir/page.shtm`). An example of the use of this type of page is given in the description of the `WEB GET STATISTICS` command. XML pages (.xml, .xsl) are also supported and always parsed by 4D. + +You can also carry out parsing outside of the Web context when you use the `PROCESS 4D TAGS` command. + +Internally, the parser works with UTF-16 strings, but the data to parse may have been encoded differently. When tags contain text (for example `4DHTML`), 4D converts the data when necessary depending on its origin and the information available (charset). Below are the cases where 4D parses the tags contained in the HTML pages, as well as any conversions carried out: + +| Action / Command | Content analysis of the sent pages | Support of $ syntax(*) | Character set used for parsing tags | +| ---------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pages called via URLs | X, except for pages with “.htm†or “.html†extensions | X, except for pages with “.htm†or “.html†extensions | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND FILE` | X | - | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND TEXT` | X | - | No conversion necessary | +| `WEB SEND BLOB` | X, if BLOB is of the “text/html†type | - | Use of charset set in the "Content-Type" header of the response. Otherwise, use of default character set for the HTTP server | +| Inclusion by the `` tag | X | X | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `PROCESS 4D TAGS` | X | X | Text data: no conversion. BLOB data: automatic conversion from the Mac-Roman character set for compatibility | + +(*) The alternative $-based syntax is available for 4DHTML, 4DTEXT and 4DEVAL tags. + +## Accessing 4D methods via the Web + +Executing a 4D method with `4DEACH`, `4DELSEIF`, `4DEVAL`, `4DHTML`, `4DIF`, `4DLOOP`, `4DSCRIPT`, or `4DTEXT` from a web request is subject to the [Available through 4D tags and URLs (4DACTION...)](allowProject.md) attribute value defined in the properties of the method. If the attribute is not checked for the method, it can not be called from a web request. + + +## Prevention of malicious code insertion + +4D tags accept different types of data as parameters: text, variables, methods, command names, etc. When this data is provided by your own code, there is no risk of malicious code insertion since you control the input. However, your database code often works with data that was, at one time or another, introduced through an external source (user input, import, etc.). + +In this case, it is advisable to **not use** tags such as `4DEVAL` or `4DSCRIPT`, which evaluate parameters, directly with this sort of data. + +In addition, according to the [principle of recursion](Tags/tags.md#recursive-processing), malicious code may itself include transformation tags. In this case, it is imperative to use the `4DTEXT` tag. Imagine, for example, a Web form field named "Name", where users must enter their name. This name is then displayed using a `` tag in the page. If text of the "\" type is inserted instead of the name, interpreting this tag will cause the application to be exited. To avoid this risk, you can just use the `4DTEXT` tag systematically in this case. Since this tag escapes the special HTML characters, any malicious recursive code that may have been inserted will not be reinterpreted. To refer to the previous example, the "Name" field will contain, in this case, "`<!--#4DEVAL QUIT 4D-->`" which will not be transformed. diff --git a/website/translated_docs/es/WebServer/webServer.md b/website/translated_docs/es/WebServer/webServer.md new file mode 100644 index 00000000000000..d66695e3617936 --- /dev/null +++ b/website/translated_docs/es/WebServer/webServer.md @@ -0,0 +1,62 @@ +--- +id: webServer +title: Generalidades +--- + +4D in local mode, 4D in remote mode and 4D Server include a web server engine (aka http server) that enables you to design and publish powerful web applications that can make the most of your 4D databases. + +## Easy Monitoring + +You can start or stop publication of the web application at any time. To do so, you just need to select a menu command or execute a single line of code. + +Monitoring the 4D web server is easy and can be done using the 4D Server administration window or through [special URLs](webServerAdmin.md#administration-urls). + +## Ready-to-use + +The 4D web server automatically creates a default root folder and a default home page for an instantaneous availability. + +## Security + +Data security is present at every stage of the 4D web server implementations. Security levels are scalable and default settings usually select the most secure options. The 4D web server security is based upon the following elements: + +* Extended support of the [**TLS Protocol (HTTPS)**](Admin/tls.md), + +* **Authentication**: flexible and customizable [authentication features](authentication.md) based upon built-it settings as well as fallback database methods ([`On Web Authentication`](authentication.md#on-web-authentication) for the web server and [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) for the REST server), + +* **Control of exposed contents**: only elements that you expose explicitely can be available from direct web or REST requests. You must declare: + - [Project methods](templates.md#allowing-project-methods) exposed through HTTP requests + - [ORDA functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) exposed through REST requests + - [Tables and fields](REST/configuration.md#exposing-tables-and-fields) that you don't want to be available to REST requests. + +* **Sandboxing** through the definition of a [HTML Root](webServerConfig.md#root-folder) folder by default, + +* **Control of server resource usage** (e.g. [maximum concurrent web processes](webServerConfig.html#maximum-concurrent-web-processes) option). +> Para una visión general de las funciones de seguridad de 4D, consulte la [Guía de seguridad de 4D](https://blog.4d.com/4d-security-guide/). + + +## User Sessions + +The 4D web server includes complete automatic features for easily managing [web sessions](sessions.md) (user sessions) based on cookies. + + +## Gateway to REST Requests + +The 4D web server allows accessing data stored in your 4D applications through REST requests. REST requests provide direct access to any database operation such as adding, reading, editing, ordering, or searching data. + +REST requests are detailed in the [REST server](REST/gettingStarted.md) section. + +## Extended settings + +The 4D web server configuration is defined through a comprehensive set of application-level settings that can also be customized for the session using the `webServer` object properties or the `WEB SET OPTION` command. + +## Templates and URLs + +The 4D web server supports access to data stored in your 4D applications through template pages and specific URLs. + +- Template pages contain [special tags](templates.md) that initiate web server processing at the time when they are sent to browsers. + +- [specific URLs](httpRequests) enable 4D to be called in order to execute any action; these URLs can also be used as form actions to trigger processing when the user posts HTML forms. + +## Dedicated Database Methods + +`On Web Authentication`, `On Web Connection`, as well as `On REST Authentication` database methods are the entry points of requests in the web server; they can be used to evaluate and route any type of request. diff --git a/website/translated_docs/es/WebServer/webServerAdmin.md b/website/translated_docs/es/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..d93cd31696c62c --- /dev/null +++ b/website/translated_docs/es/WebServer/webServerAdmin.md @@ -0,0 +1,231 @@ +--- +id: webServerAdmin +title: Administración +--- + +4D provides several integrated tools to start, stop, or monitor the integrated web server. + + +## Starting the 4D Web Server + +> To be able to launch the web server of 4D or 4D Server, you must have a "4D Web Application" license. For more information, please refer to the [4D Web site](https://www.4d.com). + + +A 4D project can start and monitor a web server for the main (host) application as well as for each hosted component. + +The main 4D web server can be started in different ways: + +* Using a button/menu command. + * 4D: **Run\>Start Web Server** menu
      ![](assets/en/WebServer/start1.png) + * 4D Server: **Start HTTP server** button of the HTTP Server page
      ![](assets/en/WebServer/start2.png) + +* Automatically starting it each time the 4D application is opened. To do this, display the **Web\/Configuration** page of the Settings and select the **Launch Web Server at Startup** check box:
      ![](assets/en/WebServer/config.png) + +* Programmatically, by calling the [`webServer.start()`](API/WebServerClass.md#start) function or `WEB START SERVER` command. + +The web server of any component can be launched by calling the [`webServer.start()`](API/WebServerClass.md#start) function on the component's web server object. +> You do not need to relaunch the 4D application to start or stop the web server. + +## Stopping the 4D Web Server + +The main 4D web server can be stopped in different ways: + +* Using the **Run\>Stop Web Server** menu of 4D or the **Stop HTTP server** button of the HTTP Server page of 4D Server (both items show **Start...** when the server is not already started). + +* Programmatically, by calling the [`webServer.stop()`](API/WebServerClass.md#stop) function or `WEB STOP SERVER` command. + +The web server of any component can be stopped by calling the `webServer.stop()` function on the component's web server object. + + +## Testing the 4D Web Server + +The **Test Web Server** command can be used to make sure the built-in web server is functioning correctly (4D only). This command is accessible in the **Run** menu when the web server is launched: + +![](assets/en/WebServer/test1.png) + + +When you select this command, the home page of the website published by the 4D application is displayed in a window of your default web browser: + +![](assets/en/WebServer/defaultHomePage.png) + + +This command lets you verify that the web server, home page display, etc. work correctly. The page is called using the *localhost* URL, which is the standard shortcut designating the IP address of the machine on which the web browser is executed. The command takes into account the [TCP publication port](#http-port) number specified in the settings. + + + +## Clearing the Cache + +At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). + +To do so, you can: + +- 4D: click on the **Clear Cache** button in the Web/Options (I) page of the Settings dialog box. +- 4D Server: click on the **Clear Cache** button in the HTTP page of the [4D Server Administration window](Admin/server-admin.md#http-server-page). + +The cache is then immediately cleared. +> You can also use the [/4DCACHECLEAR](#cacheclear) URL. + + + +## Runtime Explorer + +The **Watch** page (**Web** heading) in the Runtime Explorer displays web server information, particularly: + +* **Web Cache Usage**: indicates the number of pages present in the web cache as well as its use percentage. This information is only available if the web server is active and if the cache size is greater than 0. + +* **Web Server Elapsed Time**: indicates the duration of use (in hours:minutes:seconds format) of the Web server. This information is only available if the web server is active. + +* **Web Hits Count**: indicates the total number of HTTP requests received since the web server boot, as well as an instantaneous number of requests per second (measure taken between two Runtime Explorer updates). This information is only available if the web server is active. + + + + +## Administration URLs + +Website administration URLS allow you to control the website published on your server. 4D Web Server accepts four particular URLs: */4DSTATS*, */4DHTMLSTATS*, /*4DCACHECLEAR* and */4DWEBTEST*. + +> */4DSTATS*, */4DHTMLSTATS* and */4DCACHECLEAR* are only available to the Designer and Administrator of the database. If the 4D password system has not been activated, these URLs are available to all the users. /4DWEBTEST is always available. + + +### /4DSTATS + +The **/4DSTATS** URL returns several items of information in an HTML table (displayable in a browser): + +| Item | Descripción | +| ---------------------- | ------------------------------------------------------------ | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **including pictures** | + +This information can allow you to check the functioning of your server and eventually adapt the corresponding parameters. +> The `WEB GET STATISTICS` command allows you to also obtain information about how the cache is being used for static pages. + +### /4DHTMLSTATS + +The */4DHTMLSTATS* URL returns, also as an HTML table, the same information as the */4DSTATS* URL. The difference is that the **Cached Objects** field only counts HTML pages (without counting picture files). Moreover, this URL returns the **Filtered Objects** field. + +| Item | Descripción | +| ---------------------- | ---------------------------------------------------------------------- | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **without pictures** | +| Filtered Objects | Number of objects in cache not counted by URL, in particular, pictures | + + +### /4DCACHECLEAR + +The */4DCACHECLEAR* URL immediately clears the cache of the static pages and images. It allows you to therefore “force†the update of the pages that have been modified. + +### /4DWEBTEST + +The */4DWEBTEST* URL is designed to check the web server status. When this URL is called, 4D returns a text file with the following HTTP fields filled: + +| HTTP Field | Descripción | Ejemplo | +| ---------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| Fecha | current date at the RFC 822 format | Mon, 7 Dec 2020 13:12:50 GMT | +| Server | 4D/version number | 4D/18.5.0 (Build 18R5.257368) | +| User-Agent | name and version @ IP client address | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1 | + + + +## Logs + +4D allows you to generate two logs of web requests: + +- a debug log, useful in the web server development phase (*HTTPDebugLog.txt*), +- a standardized web request log, rather used for statistic purposes (*logweb.txt*). + +Both log files are automatically created in the **Logs** folder of the application project. + +### HTTPDebugLog.txt + +The [http debug file](webServerConfig.md#debug-log) can be enabled using the [`web server` object](webServerObject.md) or the `WEB SET OPTION` command. + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +The following fields are logged for both Request and Response: + +| Field name | Descripción | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + + +### logweb.txt + +The [web log recording file](webServerConfig.md#log-recording) can be enabled using the [`web server` object](webServerObject.md), the `WEB SET OPTION` command, or the **Web/Log (type)** page of the settings. You need to select the log format. + +#### CLF/DLF + +Each line of the file represents a request, such as: *host rfc931 user \[DD/MMM/YYYY:HH:MM:SS] "request" state length* Each field is separated by a space and each line ends by the CR/LF sequence (character 13, character 10). + +DLF (Combined Log Format) format is similar to CLF (Common Log Format) format and uses exactly the same structure. It simply adds two additional HTTP fields at the end of each request: Referer and User-agent. Here is the description of CLF/DLF formats (not customizable): + +| Field name | Descripción | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| host | IP address of the client (ex. 192.100.100.10) | +| rfc931 | information not generated by 4D, it’s always - (a minus sign | +| user | user name as it is authenticated, or else it is - (a minus sign). If the user name contains spaces, they will be replaced by _ (an underscore). | +| DD/MMM/YYYY:HH:MM:SS | DD: day, MMM: a 3-letter abbreviation for the month name (Jan, Feb,...), YYYY: year, HH: hour, MM: minutes, SS: seconds. The date and time are local to the server. | +| request | request sent by the client (ex. GET /index.htm HTTP/1.0 | +| state | reply given by the server | +| length | size of the data returned (except the HTTP header) or 0 | +| Referer | DLF only- Contains the URL of the page pointing to the requested document. | +| User-agent | DLF only- Contains the name and version of the browser or software of the client at the origin of the request | + +#### ELF/WLF + +The ELF (Extended Log Format) format is very widespread in the world of HTTP browsers. It can be used to build sophisticated logs that meet specific needs. For this reason, the ELF format can be customized: it is possible to choose the fields to be recorded as well as their order of insertion into the file. + +The WLF (WebStar Log Format) was developed specifically for the 4D WebSTAR server. + +##### Configuring the fields + +When you choose the ELF or WLF format, the “Web Log Token Selection†area displays the fields available for the chosen format. You will need to select each field to be included in the log. To do so, check the desired fields. +> You cannot select the same field twice. + +The following table lists the fields available for each format (in alphabetical order) and describes its contents: + +| Campo | ELF | WLF | Valor | +| -------------- | --- | --- | -------------------------------------- | +| BYTES_RECEIVED | | X | Number of bytes received by the server | + BYTES_SENT| X| X| Number of bytes sent by the server to the client| C_DNS| X| X |IP address of the DNS (ELF: field identical to the C_IP field)| C_IP| X| X| IP address of the client (for example 192.100.100.10)| CONNECTION_ID| |X| Connection ID number| CS(COOKIE)| X| X| Information about cookies contained in the HTTP request| CS(HOST)| X| X| Host field of the HTTP request| CS(REFERER)| X| X| URL of the page pointing to the requested document| CS(USER_AGENT)| X| X| Information about the software and operating system of the client| CS_SIP| X| X| IP address of the server| CS_URI| X| X| URI on which the request is made| CS_URI_QUERY| X| X| Request query parameters| CS_URI_STEM| X| X| Part of request without query parameters| DATE| X| X| DD: day, MMM: 3-letter abbreviation for month (Jan, Feb, etc.), YYYY: year| METHOD| X| X| HTTP method used for the request sent to the server| PATH_ARGS| | X| CGI parameters: string located after the “$†character| STATUS| X| X| Reply provided by the server| TIME| X| X| HH: hour, MM: minutes, SS: seconds| TRANSFER_TIME| X| X| Time requested by server to generate the reply| USER| X| X| User name if authenticated; otherwise - (minus sign).

      If the user name contains spaces, they are replaced by _ (underlines)| URL | |X| URL requested by the client| +> Dates and times are given in GMT. + + +#### Backup Frequency + +Since a *logweb.txt* file can become considerably large, it is possible to set up an automatic archiving mechanism. The triggering of a backup can be based on a certain period of time (expressed in hours, days, week or months), or based on the file size; when the set deadline (or file size) is reached, 4D automatically closes and archives the current log file and creates a new one. + +When the web log file backup is triggered, the log file is archived in a folder named "Logweb Archives," which is created at the same level as the *logweb.txt* file. + +The archived file is renamed based on the following example: “DYYYY_MM_DD_Thh_mm_ss.txt.†For instance, for a file archived on September 4, 2020 at 3:50 p.m. and 7 seconds: “D2020_09_04_T15_50_07.txt.†+ +#### Backup Parameters + +The automatic backup parameters for the logweb.txt are set on the **Web/Log (backup)** page of the Settings: + +![](assets/en/WebServer/backup.png) + +First you must choose the frequency (days, weeks, etc.) or the file size limit criterion by clicking on the corresponding radio button. You must then specify the precise moment of the backup if necessary. + +* **No Backup**: The scheduled backup function is deactivated. + +* **Every X hour(s)**: This option is used to program backups on an hourly basis. You can enter a value between 1 and 24 . + * **starting at**: Used to set the time at which the first back up will begin. + +* **Every X day(s) at X**: This option is used to program backups on a daily basis. Enter 1 if you want to perform a daily backup. When this option is checked, you must indicate the time when the backup must be started. + +* **Every X week(s), day at X**: This option is used to program backups on a weekly basis. Introduzca 1 si desea realizar una copia de seguridad semanal. When this option is checked, you must indicate the day(s) of the week and the time when each backup must be started. You can select several days of the week if desired. For example, you can use this option to set two weekly backups: one on Wednesdays and one on Fridays. + +* **Every X month(s), Xth day at X**: This option is used to program backups on a monthly basis. Introduzca 1 si desea realizar una copia de seguridad mensual. When this option is checked, you must indicate the day of the month and the time when the backup must be started. + +* **Every X MB**: This option is used to program backups based on the size of the current request log file. A backup is automatically triggered when the file reaches the set size. You can set a size limit of 1, 10, 100 or 1000 MB. diff --git a/website/translated_docs/es/WebServer/webServerConfig.md b/website/translated_docs/es/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..74c8ab07393492 --- /dev/null +++ b/website/translated_docs/es/WebServer/webServerConfig.md @@ -0,0 +1,650 @@ +--- +id: webServerConfig +title: Configuración +--- + +The 4D web server settings include security parameters, listening ports, defaults paths, and various options covering all the server features. 4D provides default values for every settings. + + +## Where to configure settings? + +There are different ways to configure the 4D web server settings, depending on the scope and the server you want to set: + +| Setting location | Scope | Involved web server | +| --------------------------------------- | ---------------------------------------- | ----------------------------------------------- | +| [webServer object](webServerObject.md) | Temporary (current session) | Any web server, including component web servers | +| `WEB SET OPTION` or a `WEB XXX` command | Temporary (current session) | Main server | +| **Settings** dialog box (**Web** pages) | Permanent (all sessions, stored on disk) | Main server | + +> Some settings are not available from all locations. + +## Cache + +| Can be set with | Nombre | Comentarios | +| ------------------- | --------------------------------------- | ----------- | +| Settings dialog box | Configuration page/Use the 4D Web cache | | +| Settings dialog box | Configuration page/Page Cache Size | | + +Enables and configures the web page cache. + +The 4D web server has a cache that allows you to load static pages, GIF images, JPEG images (<512 kb) and style sheets (.css files) in memory, as they are requested. Using the cache allows you to significantly increase the web server’s performance when sending static pages. The cache is shared between all the web processes. + +You can modify the size of the cache in the **Pages Cache Size** area. The value you set depends on the number and size of your website’s static pages, as well as the resources that the host machines has at its disposal. +> While using your web database, you can check the performance of the cache by using the `WEB GET STATISTICS` command. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. The [/4DSTATS] and [/4DHTMLSTATS] URLs allow you to also obtain information about the cache’s state. + + +## Certificate folder + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | `certificateFolder` | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function. | + +Folder where the TLS certificate files for the web server are located. + +By default with 4D or 4D Server, these files must be placed next to the [project folder](Project/architecture.md#project-folder). + +With 4D in remote mode, these files must be located in the local resources folder of the database on the remote machine (see `4D Client Database Folder` paragraph of the `Get 4D folder` command). You must copy these files manually on the remote machine. + +> TLS certificate files are *key.pem* (document containing the private encryption key) and *cert.pem* (document containing the certificate). + + +## Character Set + +| Can be set with | Nombre | Comentarios | +| ------------------- | ------------------------------ | ------------------------------ | +| webServer object | `characterSet` | MIBEnum integer or Name string | +| `WEB SET OPTION` | `Web character set` | MIBEnum integer or Name string | +| Settings dialog box | Options (II) page/Standard Set | Pop up menu | + +Defines the set of characters to be used by the 4D web server. The default value actually depends on the language of the OS. +> This setting is also used for generating Quick Reports in HTML format . + + +## Cipher list + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------- | ----------- | +| webServer object | [`cipherSuite`](API/WebServerClass.md#ciphersuite) | Texto | + +Cipher list used for the secure protocol; sets the priority of ciphering algorithms implemented by the web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + +> The default cipher list used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server, client/server connections, as well as the HTTP client and all the 4D commands that make use of the secure protocol. + +## CORS Settings + +| Can be set with | Nombre | Comentarios | +| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ | +| webServer object | [`CORSSettings`](API/WebServerClass.md#corssettings) | Collection of objects (List of allowed hosts and methods for the CORS service) | +| `WEB SET OPTION` | `Web CORS settings` | Collection of objects (List of allowed hosts and methods for the CORS service) | +| Settings dialog box | Options (II) page/Domain names and HTTP methods allowed | Click on the [+] button to add an allowed domain name and its method(s) | + +List of allowed hosts and methods for the CORS service. + +#### Domain names (host property) + +Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. Several syntaxes are supported: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### HTTP methods allowed (methods property) + +Accepted HTTP method(s) for the corresponding CORS host. The following HTTP methods are supported: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +Separate each method with a ";" (e,g,: "post;get"). If methods is empty, null, or undefined, all methods are enabled. + +#### Ver también + +[Enable CORS Service](#enable-cors-service) + + + +## Debug log + +| Can be set with | Nombre | Comentarios | +| ---------------- | --------------- | ----------- | +| webServer object | `debugLog` | number | +| `WEB SET OPTION` | `Web debug log` | number | + +Status of the HTTP request log file of the web server (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). It is useful for debugging issues related to the Web server. It records each request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +| Valor | Constant | Descripción | +| ----- | ----------- | ------------------------------ | +| 0 | wdl disable | Web HTTP debug log is disabled | + + + +|1|wdl enable without body|Web HTTP debug log is enabled without body parts (body size is provided in this case)| |3|wdl enable with response body|Web HTTP debug log is enabled with body part in response only| |5|wdl enable with request body|Web HTTP debug log is enabled with body part in request only| |7|wdl enable with all body parts|Web HTTP debug log is enabled with body parts in response and request| + + +## Defaut Home page + +| Can be set with | Nombre | Comentarios | +| ------------------- | ---------------------------------------------------------- | ------------------------------------- | +| webServer object | [`defaultHomepage`](API/WebServerClass.md#defaulthomepage) | Texto | +| `WEB SET HOME PAGE` | | Can be different for each web process | +| Settings dialog box | Configuration page/Default Home Page | | + +Designate a default home page for the web server. This page can be static or [semi-dynamic]. + +By default, when the web server is launched for the first time, 4D creates a home page named "index.html" and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the web server will obtain the following page: + +![](assets/en/WebServer/defaultHomePage.png) + +You can designate another default home page by entering its pathname. + +- The path is relative to the [default HTML root folder](#root-folder). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- The path must neither start not end with a slash. + +For example, if you want the default home page to be "MyHome.htm", and it is located in the "Web" folder (itself located in the default HTML root folder), use "Web/MyHome.htm". + +If you do not specify any default home page, the `On Web Connection` database method is called. It is up to you to process the request procedurally. + +## Enable CORS Service + +| Can be set with | Nombre | Comentarios | +| ------------------- | -------------------------------------------------- | --------------------------------------------------- | +| webServer object | [`CORSEnabled`](API/WebServerClass.md#corsenabled) | Boolean, true to enable the CORS (false by default) | +| `WEB SET OPTION` | `Web CORS enabled` | 0 (disabled, default) or 1 (enabled) | +| Settings dialog box | Options (II) page/Enable CORS | Unchecked by default | + +The 4D web server implements cross-origin resource sharing (CORS) to allow specific Web pages served from another domain to access the current Web application's resources via XHR calls, e.g., using REST. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled, XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see CORS Settings below). In this case, if a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +When disabled (default), all cross site requests sent with CORS are ignored. + +For more information about CORS, please refer to the [Cross-origin resource sharing page](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + +#### Ver también +[CORS Settings](#cors-settings) + +## Enable HTTP + +| Can be set with | Nombre | Comentarios | +| ------------------- | -------------------------------------------------- | ----------- | +| webServer object | [`HTTPEnabled`](API/WebServerClass.md#httpenabled) | booleano | +| `WEB SET OPTION` | `Web HTTP enabled` | | +| Settings dialog box | Configuration page/Enable HTTP | | + +Indicates whether or not the web server will accept non-secure connections. + + +## Enable HTTPS + +| Can be set with | Nombre | Comentarios | +| ------------------- | ---------------------------------------------------- | ----------- | +| webServer object | [`HTTPSEnabled`](API/WebServerClass.md#httpsenabled) | booleano | +| `WEB SET OPTION` | `Web HTTPS enabled` | | +| Settings dialog box | Configuration page/Enable HTTPS | | + +Status for communication over HTTPS. This option is described in [this section](Admin/tls.md). + + +## Enable HSTS + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------- | ----------------------------------------------- | +| webServer object | [`HSTSEnabled`](API/WebServerClass.md#hstsenabled) | Boolean, true to enable HSTS (default is false) | +| `WEB SET OPTION` | `Web HSTS enabled` | 0 (disabled, default) or 1 (enabled) | + +HTTP Strict Transport Security (HSTS) status. + +When [HTTPS is enabled](#enable-https), keep in mind that if [HTTP is also enabled](#enable-http), the browser can still switch between HTTPS and HTTP (for example, in the browser URL area, the user can replace "https" by "http"). To forbid http redirections, you can [disable HTTP](#enable-http), however in this case an error message is displayed to client HTTP requests. + +HSTS allows the 4D web server to declare that browsers should only interact with it via secure HTTPS connections. Once activated, the 4D web server will automatically add HSTS-related information to all response headers. Browsers will record the HSTS information the first time they receive a response from the 4D web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the Web **HSTS max age** setting. + +> HSTS requires that HTTPS is [enabled](enable-https) on the server. [HTTP](enable-http) must also be enabled to allow client initial connections. + +> You can get the current connection mode using the `WEB Is secured connection` command. + + +## HSTS Max Age + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------------------------------------ | ----------------- | +| webServer object | [`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage) | number in seconds | +| `WEB SET OPTION` | `Web HSTS max age` | number in seconds | + +Specifies the maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. Default value is 63072000 (2 years) + +> **Warning:** Once HSTS is enabled, client connections will continue to use this mechanism for the specified duration. When you are testing your applications, it is recommended to set a short duration to be able to switch between secured and non-secured connection modes if necessary. + + + + + +## HTTP Compression Level + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------------------------- | ------------------------------ | +| webServer object | [`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel) | | +| `WEB SET OPTION` | `Web HTTP compression level` | Applies to Web and Web Service | + +Compression level for all compressed HTTP exchanges for the 4D web server (client requests or server replies). This setting lets you optimize exchanges by either privileging speed of execution (less compression) or the amount of compression (less speed). The choice of a value depends on the size and type of data exchanged. + +Pass 1 to 9 as value where 1 is the fastest compression and 9 the highest. You can also pass -1 to get a compromise between speed and rate of compression. By default, the compression level is 1 (faster compression). + +## HTTP Compression Threshold + +| Can be set with | Nombre | Comentarios | +| ---------------- | ---------------------------------------------------------------------------- | ----------- | +| webServer object | [`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold) | | +| `WEB SET OPTION` | `Web HTTP compression threshold` | | + +In the framework of optimized HTTP exchanges, size threshold for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Pass the size expressed in bytes as value. By default, the compression threshold is set to 1024 bytes. + + +## HTTP Port + +| Can be set with | Nombre | Comentarios | +| ------------------- | -------------------------------------------- | ----------- | +| webServer object | [`HTTPPort`](API/WebServerClass.md#httpport) | number | +| `WEB SET OPTION` | `Web port ID` | | +| Settings dialog box | Configuration page/HTTP Port | | + +Listening IP (TCP) port number for HTTP. By default, 4D publishes a web application on the regular Web HTTP Port (TCP port), which is port 80. If that port is already used by another web service, you need to change the HTTP Port used by 4D for this database. + +> In macOS, modifying the HTTP port allows you to start the 4D web server without being the root user of the machine (see [macOS HelperTool](#macos-helpertool)). + +From a web browser, you need to include the non-default HTTP port number into the address you enter for connecting to the web application. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the HTTP port number 8080, you will specify "123.4.567.89:8080". +> **Warning**: If you use TCP port numbers other than the default numbers (80 for standard HTTP and 443 for HTTPS), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals (for example, in the 2000's or 3000's). + +If you specify 0, 4D will use the default HTTP port number 80. + + +## HTTP Trace + +| Can be set with | Nombre | Comentarios | +| ---------------- | ---------------------------------------------- | ------------------------------- | +| webServer object | [`HTTPTrace`](API/WebServerClass.md#httptrace) | Boolean, default = false | +| `WEB SET OPTION` | `Web HTTP TRACE` | Integer, default = 0 (disabled) | + +HTTP TRACE method activation in the 4D web server. For security reasons, by default the 4D web server rejects HTTP TRACE requests with an error 405. If necessary, you can enable the HTTP TRACE method, in which case the 4D Web server replies to HTTP TRACE requests with the request line, header, and body. + + + + +## HTTPS Port + +| Can be set with | Nombre | Comentarios | +| ------------------- | ---------------------------------------------- | ----------- | +| webServer object | [`HTTPSPort`](API/WebServerClass.md#httpsport) | number | +| `WEB SET OPTION` | `Web HTTPS port ID` | | +| Settings dialog box | Configuration page/HTTPS Port | | + +Listening IP port number for HTTPS connections via TLS. By default, the value is 443 (standard value). See also [HTTP Port](#http-port) for information on port numbers. + + +## Inactive Process Timeout + +| Can be set with | Nombre | Comentarios | +| ------------------- | ------------------------------------------------------------------------ | ----------- | +| webServer object | [`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout) | | +| `WEB SET OPTION` | `Web inactive process timeout` | | +| Settings dialog box | Options (I) page/Inactive Process Timeout | Slider | + +Life duration (in minutes) of inactive processes associated with sessions. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. + +Default: 480 minutes (pass 0 to restore the default value) + + +## Inactive Session Timeout + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------------------------------------------------------------ | ----------- | +| webServer object | [`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout) | | +| `WEB SET OPTION` | `Web inactive session timeout` | | + +Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default: 480 minutes (pass 0 to restore the default value) + + +## IP Address to listen + +| Can be set with | Nombre | Comentarios | +| ------------------- | -------------------------------------------------------------- | ----------- | +| webServer object | [`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten) | | +| `WEB SET OPTION` | `Web IP address to listen` | | +| Settings dialog box | Configuration page/IP Address | Pop up menu | + +IP address strings on which the 4D web server will receive HTTP requests (4D local and 4D Server). + +By default, no specific address is defined (**Any** value in the Settings dialog box), which means that the server responds to all IP addresses. When you designate a specific address, the server only responds to requests sent to this address. This feature is designed for 4D web servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most host providers. + +Possible values: IP address string. Both IPv6 string formats (e.g. "2001:0db8:0000:0000:0000:ff00:0042:8329") and IPv4 string formats (e.g. "123.45.67.89") are supported. + +#### About IPv6 support + +* **No warning when TCP port is occupied**
      When the server is set to respond on "Any" IP addresses, if the TCP port is being used by another application, this is not indicated when the server is started. In fact, 4D server does not detect any error in this case because the port remains free on the IPv6 address. However, it is not possible to access it using the IPv4 address of the machine, nor by means of the local address: 127.0.0.1.

      If your 4D server does not seem to be responding on the port defined, you can test the address [::1] on the server machine (equivalent to 127.0.0.1 for IPv6, add [:portNum] to test another port number). If 4D responds, it is likely that another application is using the port in IPv4. + +* **IPv4-mapped IPv6 addresses**
      To standardize processing, 4D provides a standard hybrid representation of IPv4 addresses in IPv6. These addresses are written with a 96-bit prefix in IPv6 format, followed by 32 bits written in the dot-decimal notation of IPv4. For example, ::ffff:192.168.2.34 represents the IPv4 address 192.168.2.34. + +* **Indication of port numbers**
      Since IPv6 notation uses colons (:), adding port numbers may lead to some confusion, for example: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6 address + 2001:0DB8::85a3:0:ac1f:8001:8081 // IPv6 address with port 8081 +``` + +To avoid this confusion, we recommend using the [ ] notation whenever you combine an IPv6 address with a port number, for instance: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 //IPv6 address with port 8081 +``` + +## Keep Session + +| Can be set with | Nombre | Comentarios | +| ------------------- | -------------------------------------------------- | ----------- | +| webServer object | [`keepSession`](API/WebServerClass.md#keepsession) | | +| `WEB SET OPTION` | `Web keep session` | | +| Settings dialog box | Options (I) page/Automatic Session Management | | + +Session management enabling status for the 4D web server. Session mechanism is described in the [Session Management](sessions.md) section. + +Default is true (enabled). + +> When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). + + +## Log Recording + +| Can be set with | Nombre | Comentarios | +| ------------------- | ---------------------------------------------------- | ----------- | +| webServer object | [`logRecording`](API/WebServerClass.md#logrecording) | | +| `WEB SET OPTION` | `Web log recording` | | +| Settings dialog box | Log (type) page/Log Format | Pop up menu | + +Starts or stops the recording of requests received by the 4D web server in the *logweb.txt* file and sets its format. By default, requests are not recorded (0/No Log File). When enabled, the *logweb.txt* file is automatically placed in the Logs folder. + +This setting allows you to select the format of this file. Available values are: + +| Valor | Format name | Descripción | +| ----- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0 | No Log File | Default | +| 1 | Record in CLF format | Common Log Format - Each line of the file represents a request, such as: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - Each field is separated by a space and each line ends by the CR/LF sequence. | +| 2 | Record in DLF format | Combined Log Format - Similar to CLF format but adds two additional HTTP fields at the end of each request: Referer and User-agent. | +| 3 | Record in ELF format | Extended Log Format - To be customized in the Settings dialog box | +| 4 | Record in WLF format | WebStar Log Format - To be customized in the Settings dialog box | + +> Formats 3 and 4 are custom formats whose contents must be set beforehand in the Settings dialog box. If you use one of these formats without any of its fields having been selected on this page, the log file will not be generated. + + +## Maximum Concurrent Web Processes + +| Can be set with | Nombre | Comentarios | +| ------------------- | ------------------------------------------------------------------------ | ----------- | +| webServer object | [`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses) | | +| `WEB SET OPTION` | `Web max concurrent processes` | | +| Settings dialog box | Options (I) page/Maximum Concurrent Web Processes | | + +Strictly high limit of concurrent web processes that can be simultaneously open on the server. This parameter allows prevention of server saturation as the result of massive number of requests. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the HTTP status `503 - Service Unavailable` to all new requests. + +By default, the value is 100. You can set the number anywhere between 10 and 32000. + + +## Maximum Request Size + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------------- | ----------- | +| webServer object | [`maxRequestSize`](API/WebServerClass.md#maxrequestsize) | | +| `WEB SET OPTION` | `Web maximum requests size` | | + +Maximum size (in bytes) of incoming HTTP requests (POST) that the web server is authorized to process. By default, the value is 2 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147 483 648) means that, in practice, no limit is set. + +This limit is used to avoid web server saturation due to incoming requests that are too large. When a request reaches this limit, the 4D web server rejects it. + +Possible values: 500 000 to 2 147 483 648. + + +## Maximum Session Number + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------- | ----------- | +| webServer object | [`maxSessions`](API/WebServerClass.md#maxsessions) | | +| `WEB SET OPTION` | `Web max sessions` | | + +Maximum number of simultaneous sessions. When you reach the limit set, the oldest session is closed (and `On Web Close Process` database method is called) if the Web server needs to create a new one. The number of simultaneous sessions cannot exceed the [maximum number of Web processes](#maximum-concurrent-web-processes) (100 by default). + +Default value: 100 (pass 0 to restore the default value). + + +## Minimum TLS Version + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------------------------------------------ | ----------- | +| webServer object | [`minTLSVersion`](API/WebServerClass.md#mintlsversion) | number | + +Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (default) +- 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + +> The minimum TLS version used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server and client/server connections. + + +## Nombre + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------------------------ | ----------- | +| webServer object | [`name`](API/WebServerClass.md#name) | | + + +Name of the web server application. Useful when component web servers are started. + +## OpenSSL Version + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------------- | ----------- | +| webServer object | [`openSSLVersion`](API/WebServerClass.md#opensslversion) | Read-only | + +Version of the OpenSSL library used. + + +## Perfect Forward Secrecy + +| Can be set with | Nombre | Comentarios | +| ---------------- | ---------------------------------------------------------------------- | ------------------ | +| webServer object | [`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy) | Boolean, read-only | + +True if PFS is available on the web server (see [TLS](Admin/tls.md#perfect-forward-secrecy-pfs) section). + + +## Robots.txt + +Certain robots (query engines, spiders...) scroll through web servers and static pages. If you do not want robots to be able to access your entire site, you can define which URLs they are not allowed to access. + +To do so, put the ROBOTS.TXT file at the server's root. This file must be structured in the following manner: + +```4d + User-Agent: + Disallow: or +``` + +Por ejemplo: + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* “User-Agent: *†- all robots are affected. +* “Disallow: /4D†- robots are not allowed to access URLs beginning with /4D. +* “Disallow: /%23%23†- robots are not allowed to access URLs beginning with /%23%23. +* “Disallow: /GIFS/’ - robots are not allowed to access the /GIFS/ folder or its subfolders. + +Another example: + +```code4d + User-Agent: * + Disallow: / +``` + +In this case, robots are not allowed to access the entire site. + + +## Root Folder + +| Can be set with | Nombre | Comentarios | +| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | [`rootFolder`](API/WebServerClass.md#rootfolder) | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function | +| `WEB SET ROOT FOLDER` | | | +| Settings dialog box | Configuration page/Default HTML Root | | + +Path of web server root folder, i.e. the folder in which 4D will search for the static and semi-dynamic HTML pages, pictures, etc., to send to the browsers. The path is formatted in POSIX full path. The web server will need to be restarted in order for the new root folder to be taken into account. + +Moreover, the HTML root folder defines, on the web server hard drive, the hierarchical level above which the files will not be accessible. If a requested URL or a 4D command tries to access a file located above the HTML root folder, an error is returned indicating that the file has not been found. + +By default, 4D defines a HTML Root folder named **WebFolder**. If it does not already exist, the HTML root folder is physically created on disk at the moment the Web server is launched for the first time. The root folder is created: +- with 4D (local) and 4D Server, at the same level as the [Project folder](Project/architecture.md#project-folder). +- with 4D in remote mode, in the local resources folder. + +You can designate another default HTML root folder by entering its pathname. + +- The path is relative to the [Project folder](Project/architecture.md#project-folder) (4D local and 4D Server) or to the folder containing the 4D application or software package (4D in remote mode). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- To "go up" one level in the folder hierarchy, enter “..†(two periods) before the folder name +- The path must not start with a slash (except if you want the HTML root folder to be the Project or 4D remote folder, but for access to the folders above to be forbidden, in which case you can pass "/" as the root folder). + +For example, if you want the HTML root folder to be the "Web" subfolder in the "MyWebApp" folder, enter "MyWebApp/Web". + +> When the HTML root folder is modified, the cache is cleared so as to not store files whose access is restricted. + + + +## Session Cookie Domain + +| Can be set with | Nombre | Comentarios | +| ---------------- | ------------------------------------------------------------------ | ----------- | +| webServer object | [`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain) | | +| `WEB SET OPTION` | `Web session cookie domain` | | + +Value of the "domain" field of the session cookie. Useful for controlling the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + +## Session Cookie Name + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------------------- | ----------- | +| webServer object | [`sessionCookieName`](API/WebServerClass.md#sessioncookiename) | | +| `WEB SET OPTION` | `Web session cookie name` | | + +Name of the cookie used for saving the session ID. Default = "4DSID". + + +## Session Cookie Path + +| Can be set with | Nombre | Comentarios | +| ---------------- | -------------------------------------------------------------- | ----------- | +| webServer object | [`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath) | | +| `WEB SET OPTION` | `Web session cookie path` | | + +"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + +## Session Cookie SameSite + +| Can be set with | Nombre | Comentarios | +| ---------------- | ---------------------------------------------------------------------- | ----------- | +| webServer object | [`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite) | | + +Value of the `SameSite` attribute value of the session cookie. This attribute allows you to declare if your cookie should be restricted to a first-party or same-site context, as a protection from some cross-site request forgery ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) attacks. + +> For a detailed description of the `SameSite` attribute, please refer to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) or [this web.dev page](https://web.dev/samesite-cookies-explained/). + +Three values are available: + +- "Strict" (default `SameSite` attribute value for 4D session cookies): cookies will only be sent in the first-party context, i.e. context matching the domain of the current site, and never to third-party websites. +- "Lax": Cookies are not sent on cross-site subrequests (for example to load images or frames into a third-party site), but are sent when a user is navigating to the origin site (i.e. they follow a link). +- "None": Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. When "None" value is used, the cookie `Secure` attribute must also be set (or the cookie will be blocked). + +The `Secure` attribute value of the session cookie is automatically set to "True" if the connection is HTTPS (whatever the `SameSite` attribute value). + +> It is not recommended to set `SameSite=None` on a HTTP server since the `Secure` attribute will be missing (used in HTTPS only) and cookies will be blocked. + + + +## Session IP Address Validation + +Can be set with|Name|Comments| |---|---|---| |webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| |`WEB SET OPTION`|`Web session enable IP address validation`|| + +IP address validation status for session cookies. For security reasons, by default the 4D web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 4G/5G networks, their IP address will change. In this case, you must pass 0 in this option to allow clients to be able to continue using their Web sessions even when the IP addresses change. Note that this setting lowers the security level of your application. + +When it is modified, this setting is effective immediately (you do not need to restart the HTTP server). + +Possible values: 0 (disabled) or 1 (enabled, default). + + + + +## Deprecated Settings + +The following settings are still supported but rely on deprecated features or technologies. It is usually recommended to keep default values. + +#### Allow database Access through 4DSYNC URLs + +This option controls the support of HTTP synchronization requests containing deprecated */4DSYNC* URLs. + + +#### Reuse temporary contexts (in remote mode) + +Allows you to optimize the operation of the 4D Web Server in remote mode by reusing web processes created for processing previous web requests. In fact, the web server in 4D needs a specific web process for the handling of each web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. + +When the **Reuse Temporary Contexts** option is checked, in remote mode 4D maintains the specific web processes and reuses them for subsequent requests. By removing the process creation stage, web server performance is improved. + +In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. +> * This option is checked (and locked) automatically when the **Automatic Session Management** option is checked. In fact, the session management mechanism is actually based on the principle of recycling web processes: each session uses the same process that is maintained during the lifespan of the session. However, note that session processes cannot be "shared" between different sessions: once the session is over, the process is automatically killed (and not reused). It is therefore unnecessary to reset the selections or variables in this case. +> +> * This option only has an effect with a 4D web server in remote mode. With a 4D in local mode, all web processes (other than session processes) are killed after their use. + + + +#### Send Extended Characters Directly + +When this option is checked, the web server sends extended characters “as is†in semi-dynamic pages, without converting them into HTML entities. This option has shown a speed increase on most foreign operating systems (especially the Japanese system). + + +#### Keep-Alive Connections + +The 4D Web Server can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the web browser and the server to save system resources and to optimize transfers. + +The **Use Keep-Alive Connections** option enables or disables keep-alive TCP connections for the web server. This option is enabled by default. In most cases, it is advisable to keep this option check since it accelerates the exchanges. If the web browser does not support connection keep alive, the 4D Web Server automatically switches to HTTP/1.0. + +The 4D Web Server keep-alive function concerns all TCP/IP connections (HTTP, HTTPS). Note however that keep-alive connections are not always used for all 4D web processes. + +In some cases, other optimized internal functions may be invoked. Keep-alive connections are useful mainly for static pages. + +Two options allow you to set how the keep-alive connections work: + +* **Number of requests by connection**: Allows you to set the maximum number of requests and responses able to travel over a connection keep alive. Limiting the number of requests per connection allows you to prevent server flooding due to a large number of incoming requests (a technique used by hackers).

      The default value (100) can be increased or decreased depending on the resources of the machine hosting the 4D Web Server. + +* **Timeout**: This value defines the maximum wait period (in seconds) during which the web server maintains an open TCP connection without receiving any requests from the web browser. Once this period is over, the server closes the connection.

      If the web browser sends a request after the connection is closed, a new TCP connection is automatically created. This operation is not visible for the user. + diff --git a/website/translated_docs/es/WebServer/webServerObject.md b/website/translated_docs/es/WebServer/webServerObject.md index ed3864e1491e52..38e91c4dbac92c 100644 --- a/website/translated_docs/es/WebServer/webServerObject.md +++ b/website/translated_docs/es/WebServer/webServerObject.md @@ -1,80 +1,80 @@ --- id: webServerObject -title: Web Server object +title: Objeto servidor web --- -## Overview -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +A 4D project can start and monitor a web server for the main (host) application as well as each hosted component. -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +For example, if you installed two components in your main application, you can start and monitor up to three independant web servers from your application: -- one web server for the host database, +- one web server for the host application, - one web server for the component #1, - one web server for the component #2. -Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D application project. -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +Each 4D web server, including the main application's web server, is exposed as a specific **object** of the `4D.WebServer` class. Once instantiated, a web server object can be handled from the current application or from any component using a [large number of properties and functions](API/WebServerClass.md). -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). - -Each web server (host database or component) can be used in its own separate context, including: +> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot select the web server to which they apply (see below). +Each web server (host application or component) can be used in its own separate context, including: - `On Web Authentication` and `On Web Connection` database method calls - 4D tags processing and method calls, -- managing web sessions and TLS protocols. +- web sessions and TLS protocol management. + +This allows you to develop independant components and features that come with their own web interfaces. -This feature allows you to develop independant components and features that come with their own web interfaces. ## Instantiating a web server object -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +The web server object of the host application (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created project: ```4d $nbSrv:=WEB Server list.length //$nbSrv value is 1 ``` -To instantiate a web server object, call the `WEB Server` command: +To instantiate a web server object, call the [`WEB Server`](API/WebServerClass.md#web-server) command: ```4d -C_OBJECT(webServer) + //create an object variable of the 4D.WebServer class +var webServer : 4D.WebServer //call the web server from the current context webServer:=WEB Server + //equivalent to webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: - -- the host database's web server from a component or -- the server that received the request (whatever the server), +If the application uses components and you want to call: +- the host application's web server from a component or +- the server that received the request (whatever the server), you can also use: ```4d -C_OBJECT(webServer) +var webServer : 4D.WebServer //call the host web server from a component webServer:=WEB Server(Web server host database) //call the target web server webServer:=WEB Server(Web server receiving request) ``` -## Web server methods -A web server object contains the following member methods: +## Web server functions -| Method | Parameter | Return value | Description | -| --------- | ----------------- | --------------- | --------------------- | -| `start()` | settings (object) | status (object) | Starts the web server | -| `stop()` | - | - | Stops the web server | +A [web server class object](API/WebServerClass.md#web-server-object) contains the following functions: +| Funciones | Parameter | Return value | Descripción | +| ---------------------------------------- | ----------------- | --------------- | --------------------- | +| [`start()`](API/WebServerClass.md#start) | settings (object) | status (object) | Starts the web server | +| [`stop()`](API/WebServerClass.md#start) | - | - | Stops the web server | -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +To start and stop a web server, just call the [`start()`](API/WebServerClass.md#start) and [`stop()`](API/WebServerClass.md#stop) functions of the web server object: ```4d -C_OBJECT($status) +var $status : Object //to start a web server with default settings $status:=webServer.start() //to start the web server with custom settings @@ -85,202 +85,53 @@ webServer.start($settings) $status:=webServer.stop() ``` + ## Web server properties -A web server object contains the following properties. - -Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server: - -- 4 = ISO-8859-1 -- 12 = ISO-8859-9 -- 13 = ISO-8859-10 -- 17 = Shift-JIS -- 2024 = Windows-31J -- 2026 = Big5 -- 38 = euc-kr -- 106 = UTF-8 -- 2250 = Windows-1250 -- 2251 = Windows-1251 -- 2253 = Windows-1253 -- 2255 = Windows-1255 -- 2256 = Windows-1256 - - - < - - p> - - < - - p>Default value: 63072000 (2 years)| |HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). - - < - - p> - - < - - p>Possible values: - - - 1 to 9 (where 1 is the fastest compression and 9 the highest). - - -1 = set a compromise between speed and rate of compression. - - Default = 1 (faster compression).| |HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. - - < - - p> - - < - - p>Default compression threshold = 1024 bytes| |HTTPEnabled|boolean|HTTP protocol state| |HTTPPort|number|Listening IP port number for HTTP. - - < - - p> - - < - - p>Default = 80| |HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| |HTTPSEnabled|boolean|HTTPS protocol state| |HTTPSPort|number|Listening IP port number for HTTPS. - - < - - p> - - < - - p>Default = 443| |inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. - - < - - p> - - < - - p>Default = 480 minutes| |inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. - - < - - p> - - < - - p>Default = 480 minutes| |IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| |*isRunning*|boolean|Web server running state| |keepSession|boolean|Session management enabling status - - < - - p> - - < - - p>Default = true| |logRecording|number|Log requests (logweb.txt) recording value. - - - 0 = Do not record (default) - - 1 = Record in CLF format - - 2 = Record in DLF format - - 3 = Record in ELF format - - 4 = Record in WLF format| |maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. - - < - - p> - - < - - p>Possible values: 10 - 32000 - - < - - p> - - < - - p>Default = 100| |maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. - - < - - p> - - < - - p>Possible values: 500000 - 2147483648| |maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| |minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. - - < - - p> - - < - - p>Possible values: - - - 1 = `TLSv1_0` - - 2 = `TLSv1_1` - - 3 = `TLSv1_2` (default) - - < - - p> - - < - - p>If modified, the server must be restarted to use the new value.| |*name*|text|Name of the web server database| |*openSSLVersion*|text|Version of the OpenSSL library used| |*perfectForwardSecrecy*|boolean|PFS availability on the server| |rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| |sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| |sessionCookieName|text|Name of the cookie used for storing the session ID. - - < - - p> - - < - - p>Default = "4DSID"| |sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| |sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change. - - < - - p> - - < - - p>Note: this setting lowers the security level of your application| - - These properties are defined: - - 1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), - 2. if not used, using the `WEB SET OPTION` command (host databases only), - 3. if not used, in the database settings of the host database or the component. - - If the web server is not started, the properties contain the values that will be used at the next web server startup. - - If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. - - > *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. - - ## Scope of the 4D Web commands - - The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. - - | Command | Scope | - | ------------------------------- | ------------------------------------ | - | `SET DATABASE PARAMETER` | Host database web server | - | `WEB CLOSE SESSION` | Web server that received the request | - | `WEB GET BODY PART` | Web server that received the request | - | `WEB Get body part count` | Web server that received the request | - | `WEB Get Current Session ID` | Web server that received the request | - | `WEB GET HTTP BODY` | Web server that received the request | - | `WEB GET HTTP HEADER` | Web server that received the request | - | `WEB GET OPTION` | Host database web server | - | `WEB Get server info` | Host database web server | - | `WEB GET SESSION EXPIRATION` | Web server that received the request | - | `WEB Get session process count` | Web server that received the request | - | `WEB GET STATISTICS` | Host database web server | - | `WEB GET VARIABLES` | Web server that received the request | - | `WEB Is secured connection` | Web server that received the request | - | `WEB Is server running` | Host database web server | - | `WEB SEND BLOB` | Web server that received the request | - | `WEB SEND FILE` | Web server that received the request | - | `WEB SEND HTTP REDIRECT` | Web server that received the request | - | `WEB SEND RAW DATA` | Web server that received the request | - | `WEB SEND TEXT` | Web server that received the request | - | `WEB SET HOME PAGE` | Host database web server | - | `WEB SET HTTP HEADER` | Web server that received the request | - | `WEB SET OPTION` | Host database web server | - | `WEB SET ROOT FOLDER` | Host database web server | - | `WEB START SERVER` | Host database web server | - | `WEB STOP SERVER` | Host database web server | - | `WEB Validate digest` | Web server that received the request | \ No newline at end of file +A web server object contains [various properties](API/WebServerClass.md#web-server-object) which configure the web server. + +These properties are defined: + +1. using the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function (except for read-only properties, see below), +2. if not used, using the `WEB SET OPTION` command (host applications only), +3. if not used, in the settings of the host application or the component. + +- If the web server is not started, the properties contain the values that will be used at the next web server startup. +- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function. + +> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the [`start()`](API/WebServerClass.md#start) function. + + +## Scope of the 4D Web commands + +The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. + +| Command | Scope | +| ------------------------------- | ------------------------------------ | +| `SET DATABASE PARAMETER` | Host application web server | +| `WEB CLOSE SESSION` | Web server that received the request | +| `WEB GET BODY PART` | Web server that received the request | +| `WEB Get body part count` | Web server that received the request | +| `WEB Get Current Session ID` | Web server that received the request | +| `WEB GET HTTP BODY` | Web server that received the request | +| `WEB GET HTTP HEADER` | Web server that received the request | +| `WEB GET OPTION` | Host application web server | +| `WEB Get server info` | Host application web server | +| `WEB GET SESSION EXPIRATION` | Web server that received the request | +| `WEB Get session process count` | Web server that received the request | +| `WEB GET STATISTICS` | Host application web server | +| `WEB GET VARIABLES` | Web server that received the request | +| `WEB Is secured connection` | Web server that received the request | +| `WEB Is server running` | Host application web server | +| `WEB SEND BLOB` | Web server that received the request | +| `WEB SEND FILE` | Web server that received the request | +| `WEB SEND HTTP REDIRECT` | Web server that received the request | +| `WEB SEND RAW DATA` | Web server that received the request | +| `WEB SEND TEXT` | Web server that received the request | +| `WEB SET HOME PAGE` | Host application web server | +| `WEB SET HTTP HEADER` | Web server that received the request | +| `WEB SET OPTION` | Host application web server | +| `WEB SET ROOT FOLDER` | Host application web server | +| `WEB START SERVER` | Host application web server | +| `WEB STOP SERVER` | Host application web server | +| `WEB Validate digest` | Web server that received the request | diff --git a/website/translated_docs/fr/API/BlobClass.md b/website/translated_docs/fr/API/BlobClass.md new file mode 100644 index 00000000000000..93456fe76b9be3 --- /dev/null +++ b/website/translated_docs/fr/API/BlobClass.md @@ -0,0 +1,77 @@ +--- +id: BlobClass +title: Blob +--- + +The Blob class lets you create and manipulate [blob objects](../Concepts/dt_blob.md#blob-types) (`4D.Blob`). + +### Sommaire + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**4D.Blob.new()** : 4D.Blob
      **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
      **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob](#4dblobnew)

          creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). | +| [**.size** : Real](#size)

          returns the size of a `4D.Blob`, expressed in bytes. | +| [**.slice()** : 4D.Blob
      **.slice**( *start* : Real ) : 4D.Blob
      **.slice**( *start* : Real; *end* : Real ) : 4D.Blob](#slice)

           creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. | + +## 4D.Blob.new() + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R2 | Ajoutées | +
      + +**4D.Blob.new()** : 4D.Blob
      **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
      **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob + +| Paramètres | Type | | Description | +| ---------- | --------------- |:--:| ------------ | +| blob | Blob or 4D.Blob | -> | Blob to copy | +| Résultat | 4D.Blob | <- | New 4D.Blob | + +#### Description + +`4D.Blob.new` creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). If the `blob` parameter is omitted, the method returns an empty 4D.Blob. + +## .size + +**.size** : Real +#### Description +The `.size` property returns the size of a `4D.Blob`, expressed in bytes. +## .slice() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R2 | Ajoutées | +
      + +**.slice()** : 4D.Blob
      **.slice**( *start* : Real ) : 4D.Blob
      **.slice**( *start* : Real; *end* : Real ) : 4D.Blob +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ---------------------------------------------------------------------- | +| start | Réel | -> | index of the first byte to include in the new `4D.Blob`. | +| end | Réel | -> | index of the first byte that will not be included in the new `4D.Blob` | +| Résultat | 4D.Blob | <- | New `4D.Blob` | +#### Description + +`.slice()` creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. The `start` parameter is an index into the blob indicating the first byte to include in the new `4D.Blob`. If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is 0. If you specify a value for start that is larger than the size of the source blob, the returned `4D.Blob`'s size is 0, and it contains no data. + +The `end` parameter is an index into the blob indicating the first byte that will not be included in the new `4D.Blob` (i.e. the byte exactly at this index is not included). If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is the size of the blob. + +#### Exemple + +```4d +var $myBlob : 4D.Blob + +// Store text in a 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$is4DBlob:=OB Instance of($myBlob; 4D.Blob); //True + +$myString:=Convert to text($myBlob; "UTF-8") +// $myString contains "Hello, World!" + +// Create a new 4D.Blob from $myBlob +$myNewBlob:=$myBlob.slice(0; 5) + +$myString:=Convert to text($myNewBlob; "UTF-8") +// $myString contains "Hello" +``` diff --git a/website/translated_docs/fr/API/ClassClass.md b/website/translated_docs/fr/API/ClassClass.md new file mode 100644 index 00000000000000..e7dc648c21c496 --- /dev/null +++ b/website/translated_docs/fr/API/ClassClass.md @@ -0,0 +1,132 @@ +--- +id: ClassClass +title: Class +--- + + +Lorsqu'une classe utilisateur est [définie](Concepts/classes.md#class-definition) dans le projet, elle est chargée dans l'environnement de langage 4D. Une classe est un objet lui-même, de la classe "Class", qui a des propriétés et une fonction. + + + +### Sommaire + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.name** : Text](#name)

          contains the name of the `4D.Class` object | +| [**.new**( *param* : any { *;...paramN* } ) : 4D.Class](#new)

          creates and returns a `cs.className` object which is a new instance of the class on which it is called | +| [**.superclass** : 4D.Class](#superclass)

          returns the parent class of the class | + + + +## .name + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | + +
      + +**.name** : Text +#### Description + +The `.name` property contains the name of the `4D.Class` object. Les noms de classe sont sensibles à la casse. + +Cette propriété est en **lecture seule**. + + + + +## .new() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | +
      + +**.new**( *param* : any { *;...paramN* } ) : 4D.Class +| Paramètres | Type | | Description | +| ---------- | -------- |:--:| ------------------------------------------------ | +| param | any | -> | Parameter(s) to pass to the constructor function | +| Résultat | 4D.Class | <- | Nouvel objet de la classe | + + +#### Description + +The `.new()` function creates and returns a `cs.className` object which is a new instance of the class on which it is called. Cette fonction est automatiquement disponible sur toutes les classes à partir du class store [`cs`](Concepts/classes.md#cs). + +You can pass one or more optional *param* parameters, which will be passed to the [class constructor](Concepts/classes.md#class-constructor) function (if any) in the className class definition. Within the constructor function, the [`This`](Concepts/classes.md#this) is bound to the new object being constructed. + +If `.new()` is called on a non-existing class, an error is returned. + +#### Exemples + +Pour créer une nouvelle instance de la classe Person : + +```4d +var $person : cs.Person +$person:=cs.Person.new() //create the new instance +//$person contains functions of the class +``` + +To create a new instance of the Person class with parameters: + +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text; $age : Integer) + This.firstName:=$firstname + This.lastName:=$lastname + This.age:=$age +``` + +```4d +//In a method +var $person : cs.Person +$person:=cs.Person.new("John";"Doe";40) +//$person.firstName = "John" +//$person.lastName = "Doe" +//$person.age = 40 +``` + + + + + +## .superclass + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | + +
      + +**.superclass** : 4D.Class +#### Description + +The `.superclass` property returns the parent class of the class. Une superclasse peut être un objet `4D.Class`, ou un objet `cs.className`. Si la classe n'a pas de classe parente, la propriété renvoie **null**. + +Une superclasse de classe utilisateur est déclarée dans une classe à l'aide du mot-clé [`Class extend`](Concepts/classes.md#class-extends-classname). + +Cette propriété est en **lecture seule**. + +#### Exemples + +```4d +$sup:=4D.File.superclass //Document +$sup:=4D.Document.superclass //Object +$sup:=4D.Object.superclass //null + +// Si vous avez créé une classe MyFile +// avec `Class extends File` +$sup:=cs.MyFile.superclass //File + +``` + + + +**Voir également :** [Super](Concepts/classes.md#super) + + diff --git a/website/translated_docs/fr/API/CollectionClass.md b/website/translated_docs/fr/API/CollectionClass.md new file mode 100644 index 00000000000000..28391ded8f7551 --- /dev/null +++ b/website/translated_docs/fr/API/CollectionClass.md @@ -0,0 +1,2585 @@ +--- +id: CollectionClass +title: Collection +--- + + +La classe Collection gère les variables de type [Collection](Concepts/dt_collection.md). + +Une collection est initialisée avec : + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**New collection** {( *...value* : any )} : Collection](#new-collection)

           creates a new empty or prefilled collection | +| [**New shared collection** {( *...value* : any )} : Collection](#new-shared-collection)

           creates a new empty or prefilled shared collection | + + +### Exemple + +```4d + var $colVar : Collection //création d'une variable 4D de type collection. $colVar:=New $colVar:=New collection //initialisation de la collection et assignation à la variable 4D +``` + + +### Sommaire + + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.average**( {*propertyPath* : Text } ) : Real](#average)

          returns the arithmetic mean (average) of defined values in the collection instance | +| [**.clear()** : Collection](#clear)

          removes all elements from the collection instance and returns an empty collection | +| [**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection](#combine)

          inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection | +| [**.concat**( *value* : any { *;...valueN* } ) : Collection](#concat)

          returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end | +| [**.copy**() : Collection
      **.copy**( *option* : Integer ) : Collection
      **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
      **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection](#copy)

           returns a deep copy of the collection instance | +| [**.count**( { *propertyPath* : Text } ) : Real](#count)

          returns the number of non-null elements in the collection | +| [**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real](#countvalues)

          returns the number of times value is found in the collection | +| [**.distinct**( {*option* : Integer} ) : Collection
      **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection](#distinct)

          returns a collection containing only distinct (different) values from the original collection | +| [**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean](#equal)

          compares the collection with collection2 | +| [**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
      **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean](#every)

          returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method | +| [**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
      **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection](#extract)

          creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects | +| [**.fill**( *value* : any ) : Collection
      **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection](#fill)

          fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection | +| [**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection](#filter)

          returns a new collection containing all elements of the original collection for which *methodName* method result is **true** | +| [**.find**( *methodName* : Text { ; *...param* : any } ) : any
      **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any](#find)

          returns the first value in the collection for which *methodName*, applied on each element, returns **true** | +| [**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
      **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer](#find)

          returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true** | +| [**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#indexof)

          searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found | +| [**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection ](#indices)

          returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions | +| [**.insert**( *index* : Integer ; *element* : any ) : Collection ](#insert)

           inserts *element* at the specified *index* position in the collection instance and returns the edited collection | +| [**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text ](#join)

          converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator | +| [**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#lastindexof)

          searches the *toSearch* expression among collection elements and returns the index of the last occurrence | +| [**.length** : Integer](#length)

          returns the number of elements in the collection | +| [**.map**( *methodName* : Text { ; *...param* : any } ) : Collection ](#map)

          creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection | +| [**.max**( { *propertyPath* : Text } ) : any ](#max)

          returns the element with the highest value in the collection | +| [**.min**( { *propertyPath* : Text } ) : any ](#min)

          returns the element with the smallest value in the collection | +| [**.orderBy**( ) : Collection
      **.orderBy**( *pathStrings* : Text ) : Collection
      **.orderBy**( *pathObjects* : Collection ) : Collection
      **.orderBy**( *ascOrDesc* : Integer ) : Collection ](#orderby)

          returns a new collection containing all elements of the collection in the specified order | +| [**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection ](#orderbymethod)

          returns a new collection containing all elements of the collection in the order defined through the *methodName* method | +| [**.pop()** : any ](#pop)

          removes the last element from the collection and returns it as the function result | +| [**.push**( *element* : any { ;...*elementN* } ) : Collection ](#push)

          appends one or more *element*(s) to the end of the collection instance and returns the edited collection | +| [**.query**( *queryString* : Text ; *...value* : any ) : Collection
      **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection ](#query)

          returns all elements of a collection of objects that match the search conditions | +| [**.reduce**( *methodName* : Text ) : any
      **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any ](#reduce)

          applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value | +| [**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection ](#remove)

          removes one or more element(s) from the specified *index* position in the collection and returns the edited collection | +| [**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection ](#resize)

          sets the collection length to the specified new size and returns the resized collection | +| [**.reverse( )** : Collection ](#reverse)

          returns a deep copy of the collection with all its elements in reverse order | +| [**.shift()** : any](#shift)

          removes the first element of the collection and returns it as the function result | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection](#slice)

          returns a portion of a collection into a new collection | +| [**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
      **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean](#some)

          returns true if at least one element in the collection successfully passed a test | +| [**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection ](#sort)

          sorts the elements of the original collection | +| [**.sum**( { *propertyPath* : Text } ) : Real](#sum)

          returns the sum for all values in the collection instance | +| [**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection](#unshift)

          inserts the given *value*(s) at the beginning of the collection | + + + +## `Nouvelle collection` + + +**New collection** {( *...value* : any )} : Collection +| Paramètres | Type | | Description | +| ---------- | ----------------------------------------------------------------------- |:--:| ----------------------- | +| value | Number, Text, Date, Time, Boolean, Object, Collection, Picture, Pointer | -> | Valeur(s) de collection | +| Résultat | Collection | <- | Nouvelle collection | + + +#### Description + +The `New collection` command creates a new empty or prefilled collection and returns its reference. + +Si vous ne passez aucun paramètre, `New collection` crée une collection vide et retourne sa référence. + +Vous devez affecter la référence retournée à une variable 4D de type Collection. +> Gardez à l'esprit que les instructions `var : Collection` ou `C_COLLECTION` déclarent une variable de type `Collection` mais ne créent aucune collection. + +En option, vous pouvez préremplir la nouvelle collection en utilisant une ou plusieurs valeur(s) (*value*(s)) en tant que paramètre(s). + +Sinon, vous pouvez ajouter ou modifier des éléments ultérieurement par affectation. Par exemple : + +```4d + myCol[10]:="My new element" +``` + +Si le nouvel indice de l'élément est au-delà du dernier élément existant de la collection, la collection est automatiquement redimensionnée et tous les nouveaux éléments intermédiaires sont attribués une valeur **null**. + +Vous pouvez passer n'importe quel nombre de valeurs de n'importe quel type pris en charge (number, text, date, picture, pointer, object, collection...). Contrairement aux tableaux, les collections peuvent mélanger des données de différents types. + +Vous devez prêter attention aux problèmes de conversion suivants : + +* Si vous passez un pointeur, il est conservé "tel quel"; il est évalué à l'aide de la commande `JSON Stringify` +* Les dates sont stockées sous la forme de date « aaaa-mm-jj » ou des chaînes au format « AAAA-MM-JJTHH: ss.SSSZ: mm » , selon la configuration actuelle « dates à l'intérieur des objets » de la base de données. Lors de la conversion de dates 4D en texte avant de les stocker dans la collection, par défaut le programme prend en compte le fuseau horaire local. Vous pouvez modifier ce comportement à l'aide du sélecteur `Dates inside objects` de la commande `SET DATABASE PARAMETER`. +* Si vous passez une heure, elle est stockée sous la forme d'un nombre de millisecondes (Réel). + +#### Exemple 1 + + + +You want to create a new empty collection and assign it to a 4D collection variable: + +```4d + var $myCol : Collection + $myCol:=New collection + //$myCol=[] +``` + +#### Exemple 2 + +You want to create a prefilled collection: + +```4d + var $filledColl : Collection + $filledColl:=New collection(33;"mike";"november";->myPtr;Current date) + //$filledColl=[33,"mike","november","->myPtr","2017-03-28T22:00:00.000Z"] +``` + +#### Example 3 + +You create a new collection and then add a new element: + +```4d + var $coll : Collection + $coll:=New collection("a";"b";"c") + //$coll=["a","b","c"] + $coll[9]:="z" //ajouter un 10e élément avec la valeur "z" + $vcolSize:=$coll.length //10 + //$coll=["a","b","c",null,null,null,null,null,null,"z"] +``` + + + + +## `Nouvelle collection partagée` + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**New shared collection** {( *...value* : any )} : Collection +| Paramètres | Type | | Description | +| ---------- | ------------------------------------------------------------------- |:--:| ----------------------------------- | +| value | Number, Text, Date, Time, Boolean, Shared object, Shared collection | -> | Valeur(s) de la collection partagée | +| Résultat | Collection | <- | Nouvelle collection partagée | + + +#### Description + +The `New shared collection` command creates a new empty or prefilled shared collection and returns its reference. + +Adding an element to this collection must be surrounded by the [`Use...End`](Concepts/shared.md#useend-use) use structure, otherwise an error is generated. Reading an element without a structure is, however, possible. +> For more information on shared collections, please refer to the [Shared objects and collections](Concepts/shared.md) page. + +If you do not pass any parameters, `New shared collection` creates an empty shared collection and returns its reference. + +Vous devez affecter la référence retournée à une variable 4D de type Collection. +> Gardez à l'esprit que les instructions `var : Collection` ou `C_COLLECTION` déclarent une variable de type `Collection` mais ne créent aucune collection. + +Optionally, you can prefill the new shared collection by passing one or several *value*(s) as parameter(s). Otherwise, you can add or modify elements subsequently through object notation assignment (see example). + +If the new element index is beyond the last existing element of the shared collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of the following supported types: + +* number (real, longint...). Number values are always stored as reals. +* Texte +* boolean +* date +* time (stored as number of milliseconds - real) +* null +* shared object(*) +* shared collection(*) +> Unlike standard (not shared) collections, shared collections do not support pictures, pointers, and objects or collections that are not shared. + +(*)When a shared object or collection is added to a shared collection, they share the same *locking identifier*. For more information on this point, refer to the **4D Developer**'s guide. + +#### Exemple + +```4d + $mySharedCol:=New shared collection("alpha";"omega") + Use($mySharedCol) + $mySharedCol[1]:="beta" + End use +``` + + + +## .average() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.average**( {*propertyPath* : Text } ) : Real + +| Paramètres | Type | | Description | +| ------------ | --------------- |:--:| ----------------------------------------------- | +| propertyPath | Texte | -> | Object property path to be used for calculation | +| Résultat | Real, Undefined | <- | Arithmetic mean (average) of collection values | + + + +#### Description + +The `.average()` function returns the arithmetic mean (average) of defined values in the collection instance. + + + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.average()` returns `undefined` if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + + +#### Exemple 1 + +```4d + var $col : Collection + $col:=New collection(10;20;"Monday";True;6) + $vAvg:=$col.average() //12 +``` + +#### Exemple 2 + +```4d + var $col : Collection + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $vAvg:=$col.average("salary") //23500 +``` + + + + +## .clear() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.clear()** : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| --------------------------------------------- | +| Résultat | Collection | <- | Original collection with all elements removed | + + +#### Description + +The `.clear()` function removes all elements from the collection instance and returns an empty collection. +> This function modifies the original collection. + +#### Exemple + +```4d +var $col : Collection +$col:=New collection(1;2;5) +$col.clear() +$vSize:=$col.length //$vSize=0 +``` + + + + + + +## .combine() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------------------------------------------- | +| col2 | Collection | -> | Collection to combine | +| index | Entier long | -> | Position to which insert elements to combine in collection (default=length+1) | +| Résultat | Collection | <- | Original collection containing combined element(s) | + + +#### Description + +The `.combine()` function inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection. Unlike the `.insert()` function, `.combine()` adds each value of *col2* in the original collection, and not as a single collection element. +> This function modifies the original collection. + +By default, *col2* elements are added at the end of the orginal collection. You can pass in *index* the position where you want the *col2* elements to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, the actual starting *index* will be set to the length of the collection. +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, *index* is set to 0. + + +#### Exemple + +```4d +var $c; $fruits : Collection +$c:=New collection(1;2;3;4;5;6) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$c.combine($fruits;3) //[1,2,3,"Orange","Banana","Apple","Grape",4,5,6] +``` + + + + + + +## .concat() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.concat**( *value* : any { *;...valueN* } ) : Collection +| Paramètres | Type | | Description | +| ---------- | -------------------------------------------------------------- |:--:| ----------------------------------------------------------------------------------------------------------------- | +| value | Number, Text, Object, Collection, Date, Time, Boolean, Picture | -> | Value(s) to concatenate. If *value* is a collection, all collection elements are added to the original collection | +| Résultat | Collection | <- | New collection with value(s) added to the original collection | + + +#### Description + +The `.concat()` function returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end. +> This function does not modify the original collection. + +If *value* is a collection, all its elements are added as new elements at the end of the original collection. If *value* is not a collection, it is added itself as a new element. + + +#### Exemple + +```4d +var $c : Collection +$c:=New collection(1;2;3;4;5) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$fruits.push(New object("Intruder";"Tomato")) +$c2:=$c.concat($fruits) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}] +$c2:=$c.concat(6;7;8) //[1,2,3,4,5,6,7,8] +``` + + + + + +## .copy() + +
      Historique +| Version | Modifications | +| ------- | -------------------------------------------------- | +| v18 R3 | New *ck shared* option. New *groupWith* parameters | +| v16 R6 | Ajoutées | +
      + +**.copy**() : Collection
      **.copy**( *option* : Integer ) : Collection
      **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
      **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection + +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| -------------------------------------------------------------------------------------------------------- | +| option | Entier long | -> | `ck resolve pointers`: resolve pointers before copying,
      `ck shared`: return a shared collection | +| groupWithCol | Collection | -> | Shared collection to be grouped with the resulting collection | +| groupWithObj | Objet | -> | Shared object to be grouped with the resulting collection | +| Résultat | Collection | <- | Deep copy of the original collection | + + +#### Description + +The `.copy()` function returns a deep copy of the collection instance.***Deep copy*** means that objects or collections within the original collection are duplicated and do not share any reference with the returned collection. +> This function does not modify the original collection. + +If passed, the *option* parameter can contain one of the following constants (or both): + +| option | Description | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ck resolve pointers` | If the original collection contains pointer type values, by default the copy also contains the pointers. However, you can resolve pointers when copying by passing the ck resolve pointers. In this case, each pointer present in the collection is evaluated when copying and its dereferenced value is used. | +| `ck shared` | By default, copy() returns a regular (not shared) collection, even if the command is applied to a shared collection. Pass the ck shared constant to create a shared collection. In this case, you can use the groupWith parameter to associate the shared collection with another collection or object (see below). | + +The *groupWithCol* or *groupWithObj* parameters allow you to designate a collection or an object with which the resulting collection should be associated. + + +#### Exemple 1 + +We want to copy the *$lastnames* regular (non shared) collection into the *$sharedObject* shared object. To do this, we must create a shared copy of the collection (*$sharedLastnames*). + +```4d +var $sharedObject : Object +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$sharedObject:=New shared object + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames est un collection standard + +$sharedLastnames:=$lastnames.copy(ck shared) //$sharedLastnames est une collection partagée + +//Nous pouvons désormais placer $sharedLastnames dans $sharedObject +Use($sharedObject) + $sharedObject.lastnames:=$sharedLastnames +End use +``` + + +#### Exemple 2 + +We want to combine *$sharedColl1* and *$sharedColl2*. Since they belong to different shared groups, a direct combination would result in an error. Therefore, we must make a shared copy of *$sharedColl1* and designate *$sharedColl2* as a shared group for the copy. + +```4d +var $sharedColl1;$sharedColl2;$copyColl : Collection + +$sharedColl1:=New shared collection(New shared object("lastname";"Smith")) +$sharedColl2:=New shared collection(New shared object("lastname";"Brown")) + +//$copyColl belongs to the same shared group as $sharedColl2 + $copyColl:=$sharedColl1.copy(ck shared;$sharedColl2) + Use($sharedColl2) + $sharedColl2.combine($copyColl) + End use +``` + +#### Example 3 + +We have a regular collection (*$lastnames*) and we want to put it in the **Storage** of the application. To do this, we must create a shared copy beforehand (*$sharedLastnames*). + +```4d +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) // shared copy + +Use(Storage) + Storage.lastnames:=$sharedLastnames +End use +``` + +#### Example 4 + +This example illustrates the use of the `ck resolve pointers` option: + +```4d + var $col : Collection + var $p : Pointer + $p:=->$what + + $col:=New collection + $col.push(New object("alpha";"Hello";"num";1)) + $col.push(New object("beta";"You";"what";$p)) + + $col2:=$col.copy() + $col2[1].beta:="World!" + ALERT($col[0].alpha+" "+$col2[1].beta) //displays "Hello World!" + + $what:="You!" + $col3:=$col2.copy(ck resolve pointers) + ALERT($col3[0].alpha+" "+$col3[1].what) //displays "Hello You!" +``` + + + + + + + +## .count() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.count**( { *propertyPath* : Text } ) : Real + +| Paramètres | Type | | Description | +| ------------ | ----- |:--:| ----------------------------------------------- | +| propertyPath | Texte | -> | Object property path to be used for calculation | +| Résultat | Réel | <- | Number of elements in the collection | + + +#### Description + +The `.count()` function returns the number of non-null elements in the collection. + +If the collection contains objects, you can pass the *propertyPath* parameter. In this case, only elements that contain the *propertyPath* are taken into account. + +#### Exemple + +```4d + var $col : Collection + var $count1;$count2 : Real + $col:=New collection(20;30;Null;40) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $col.push(New object("lastName";"Henry";"salary";12000)) + $count1:=$col.count() //$count1=7 + $count2:=$col.count("name") //$count2=3 + +``` + + + + + + +## .countValues() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real + +| Paramètres | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ----------------------------------------------- | +| value | Text, Number, Boolean, Date, Object, Collection | -> | Value to count | +| propertyPath | Texte | -> | Object property path to be used for calculation | +| Résultat | Réel | <- | Number of occurrences of the value | + + +#### Description + +The `.countValues()` function returns the number of times value is found in the collection. + +You can pass in *value*: + +* a scalar value (text, number, boolean, date), +* an object or a collection reference. + + +For an element to be found, the type of *value* must be equivalent to the type of the element; the method uses the equality operator. + +The optional *propertyPath* parameter allows you to count values inside a collection of objects: pass in *propertyPath* the path of the property whose values you want to count. +> This function does not modify the original collection. + +#### Exemple 1 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection(1;2;5;5;5;3;6;4) + $vCount:=$col.countValues(5) // $vCount=3 +``` + + +#### Exemple 2 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection + $col.push(New object("name";"Smith";"age";5)) + $col.push(New object("name";"Wesson";"age";2)) + $col.push(New object("name";"Jones";"age";3)) + $col.push(New object("name";"Henry";"age";4)) + $col.push(New object("name";"Gross";"age";5)) + $vCount:=$col.countValues(5;"age") //$vCount=2 +``` + + +#### Example 3 + +```4d + var $numbers; $letters : Collection + var $vCount : Integer + + $letters:=New collection("a";"b";"c") + $numbers:=New collection(1;2;$letters;3;4;5) + + $vCount:=$numbers.countValues($letters) //$vCount=1 +``` + + + + + + + +## .distinct() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.distinct**( {*option* : Integer} ) : Collection
      **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection + +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| ---------------------------------------------------------------- | +| option | Entier long | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| propertyPath | Texte | -> | Path of attribute whose distinct values you want to get | +| Résultat | Collection | <- | New collection with only distinct values | + + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the original collection. +> This function does not modify the original collection. + +The returned collection is automatically sorted. **Null** values are not returned. + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the *option* parameter. + +If the collection contains objects, you can pass the *propertyPath* parameter to indicate the object property whose distinct values you want to get. + + + +#### Exemple + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push("a";"b";"c";"A";"B";"c";"b";"b") + $c.push(New object("size";1)) + $c.push(New object("size";3)) + $c.push(New object("size";1)) + $c2:=$c.distinct() //$c2=["a","b","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct(ck diacritical) //$c2=["a","A","b","B","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct("size") //$c2=[1,3] +``` + + + + + + +## .equal() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean +| Paramètres | Type | | Description | +| ----------- | ----------- |:--:| ---------------------------------------------------------------- | +| collection2 | Collection | -> | Collection to compare | +| option | Entier long | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| Résultat | Booléen | <- | True if collections are identical, false otherwise | + + +#### Description + +The `.equal()` function compares the collection with collection2 and returns **true** if they are identical (deep comparison). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the option parameter. +> Elements with **Null** values are not equal to Undefined elements. + +#### Exemple + +```4d + var $c; $c2 : Collection + var $b : Boolean + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3;4) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("1";"a";"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2) // true + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2;ck diacritical) //false +``` + + + + + +## .every() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
      **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------- | +| startFrom | Integer | -> | Index to start the test at | +| methodName | Text | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to methodName | +| Résultat | Booléen | <- | True if all elements successfully passed the test | + + +#### Description + +The `.every()` function returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to true for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: paramN... + +*methodName* sets the following parameter(s): + +* *$1.result* (Boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (Boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In all cases, at the point when the `.every()` function encounters the first collection element returning **false** in *$1.result*, it stops calling *methodName* and returns **false**. + +By default, `.every()` tests the whole collection. Optionally, you can pass in *startFrom* the index of the element from which to start the test. + +* If *startFrom* >= the collection's length, **false** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection ( *startFrom:=startFrom+length*). +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Exemple 1 + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("NumberGreaterThan0") //retourne true +$c.push(-1) +$b:=$c.every("NumberGreaterThan0") //retourne false +``` + +With the following ***NumberGreaterThan0*** method: + +```4d +$1.result:=$1.value>0 +``` + +#### Exemple 2 + +This example tests that all elements of a collection are of the real type: + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("TypeLookUp";Is real) //$b=true +$c:=$c.push(New object("name";"Cleveland";"zc";35049)) +$c:=$c.push(New object("name";"Blountsville";"zc";35031)) +$b:=$c.every("TypeLookUp";Is real) //$b=false +``` + +With the following ***TypeLookUp*** method: + +```4d +#DECLARE ($toEval : Object ; $param : Integer) //$1; $2 +If(Value type($toEval.value)=$param) + $toEval.result:=True +End if +``` + + + + + +## .extract() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
      **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection + +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| propertyPath | Texte | -> | Object property path whose values must be extracted to the new collection | +| targetpath | Texte | -> | Target property path or property name | +| option | Entier long | -> | `ck keep null`: include null properties in the returned collection (ignored by default). Parameter ignored if *targetPath* passed. | +| Résultat | Collection | <- | New collection containing extracted values | + + +#### Description + +The `.extract()` function creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects. +> This function does not modify the original collection. + +The contents of the returned collection depends on the *targetPath* parameter: + +* If the *targetPath* parameter is omitted, `.extract()` populates the new collection with the *propertyPath* values of the original collection. + + By default, elements for which *propertyPath* is null or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as null elements in the returned collection. + + +* If one or more *targetPath* parameter(s) are passed, `.extract()` populates the new collection with the *propertyPath* properties and each element of the new collection is an object with *targetPath* properties filled with the corresponding *propertyPath* properties. Null values are kept (*option* parameter is ignored with this syntax). + + +#### Exemple 1 + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("name";"Cleveland")) +$c.push(New object("zip";5321)) +$c.push(New object("name";"Blountsville")) +$c.push(42) +$c2:=$c.extract("name") // $c2=[Cleveland,Blountsville] +$c2:=$c.extract("name";ck keep null) //$c2=[Cleveland,null,Blountsville,null] +``` + + +#### Exemple 2 + + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("zc";35060)) +$c.push(New object("name";Null;"zc";35049)) +$c.push(New object("name";"Cleveland";"zc";35049)) +$c.push(New object("name";"Blountsville";"zc";35031)) +$c.push(New object("name";"Adger";"zc";35006)) +$c.push(New object("name";"Clanton";"zc";35046)) +$c.push(New object("name";"Clanton";"zc";35045)) +$c2:=$c.extract("name";"City") //$c2=[{City:null},{City:Cleveland},{City:Blountsville},{City:Adger},{City:Clanton},{City:Clanton}] +$c2:=$c.extract("name";"City";"zc";"Zip") //$c2=[{Zip:35060},{City:null,Zip:35049},{City:Cleveland,Zip:35049},{City:Blountsville,Zip:35031},{City:Adger,Zip:35006},{City:Clanton,Zip:35046},{City:Clanton,Zip:35045}] +``` + + + + + + +## .fill() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.fill**( *value* : any ) : Collection
      **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection + + +| Paramètres | Type | | Description | +| ---------- | ----------------------------------------------- |:--:| -------------------------------------- | +| value | number, Text, Collection, Object, Date, Boolean | -> | Filling value | +| startFrom | Entier long | -> | Start index (included) | +| end | Entier long | -> | End index (not included) | +| Résultat | collection | <- | Original collection with filled values | + + +#### Description + +The `.fill()` function fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection. +> This function modifies the original collection. + +* If the *startFrom* parameter is omitted, *value* is set to all collection elements (*startFrom*=0). +* If the *startFrom* parameter is passed and *end* omitted, *value* is set to collection elements starting at *startFrom* to the last element of the collection (*end*=length). +* If both the *startFrom* parameter and *end* are passed, *value* is set to collection elements starting at *startFrom* to the element *end*. + +In case of inconsistency, the following rules apply: + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end* < *startFrom* (passed or calculated values), the method does nothing. + + +#### Exemple + +```4d + var $c : Collection + $c:=New collection(1;2;3;"Lemon";Null;"";4;5) + $c.fill("2") // $c:=[2,2,2,2,2,2,2,2] + $c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello] + $c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello] + $c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello] +``` + + + + + + +## .filter() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ---------------------------------------------------------- | +| methodName | Texte | -> | Name of the function to call to filter the collection | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Résultat | Collection | <- | New collection containing filtered elements (shallow copy) | + + +#### Description + +The `.filter()` function returns a new collection containing all elements of the original collection for which *methodName* method result is **true**. This function returns a ***shallow copy***, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be filtered +* in *$2*: *param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the filter condition and must be kept. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Exemple 1 + +You want to get the collection of text elements whose length is smaller than 6: + +```4d + var $col;$colNew : Collection + $col:=New collection("hello";"world";"red horse";66;"tim";"san jose";"miami") + $colNew:=$col.filter("LengthLessThan";6) + //$colNew=["hello","world","tim","miami"] +``` + +The code for ***LengthLessThan*** method is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Exemple 2 + +You want to filter elements according to their value type: + +```4d + var $c;$c2;$c3 : Collection + $c:=New collection(5;3;1;4;6;2) + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c2:=$c.filter("TypeLookUp";Is real) // $c2=[5,3,1,4,6,2] + $c3:=$c.filter("TypeLookUp";Is object) + // $c3=[{name:Cleveland,zc:35049},{name:Blountsville,zc:35031}] +``` + +The code for ***TypeLookUp*** is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(OB Get type($1;"value")=$2) + + + $1.result:=True + End if +``` + + + + + + +## .find() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.find**( *methodName* : Text { ; *...param* : any } ) : any
      **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| -------------------------------------------- | +| startFrom | Entier long | -> | Index to start the search at | +| methodName | Texte | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Résultat | any | <- | First value found, or Undefined if not found | + + +#### Description + +The `.find()` function returns the first value in the collection for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). + +*methodName* receives the following parameters: + +* in *$1.value:* element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.find()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Exemple 1 + +You want to get the first element with a length smaller than 5: + +```4d + var $col : Collection + $col:=New collection("hello";"world";4;"red horse";"tim";"san jose") + $value:=$col.find("LengthLessThan";5) //$value="tim" +``` + +The code for ***LengthLessThan*** method is: + +```4d + var $1 : Object + var $2 : Integer + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Exemple 2 + +You want to find a city name within a collection: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.find("FindCity";"Clanton") //$c2={name:Clanton,zc:35046} +``` + +The code for ***FindCity*** is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 //name is a property name of objects in the collection +``` + + + + + + +## .findIndex() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + + +**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
      **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer + + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ---------------------------------------------- | +| startFrom | Entier long | -> | Index to start the search at | +| methodName | Texte | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Résultat | Entier long | <- | Index of first value found, or -1 if not found | + + +#### Description + +The `.findIndex()` function returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.findIndex()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Exemple + +You want to find the position of the first city name within a collection: + +```4d + var $c : Collection + var $val2;$val3 : Integer + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $val2:=$c.findIndex("FindCity";"Clanton") // $val2=3 + $val3:=$c.findIndex($val2+1;"FindCity";"Clanton") //$val3=4 +``` + +The code for ***FindCity*** method is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 +``` + + + + + + + +## .indexOf() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ---------------------------------------------------------------------------- | +| toSearch | expression | -> | Expression to search in the collection | +| startFrom | Entier long | -> | Index to start the search at | +| Résultat | Entier long | <- | Index of the first occurrence of toSearch in the collection, -1 if not found | + + +#### Description + +The `.indexOf()` function searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator of the data type are applied). + +Optionally, you can pass the index of collection from which to start the search in *startFrom*. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Exemple + + + +```4d + var $col : Collection + var $i : Integer + $col:=New collection(1;2;"Henry";5;3;"Albert";6;4;"Alan";5) + $i:=$col.indexOf(3) //$i=4 + $i:=$col.indexOf(5;5) //$i=9 + $i:=$col.indexOf("al@") //$i=5 + $i:=$col.indexOf("Hello") //$i=-1 +``` + + + + + + +## .indices() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection + +| Paramètres | Type | | Description | +| ----------- | ---------- |:--:| -------------------------------------------------------- | +| queryString | Texte | -> | Search criteria | +| value | any | -> | Value(s) to compare when using placeholder(s) | +| Résultat | Collection | <- | Element index(es) matching queryString in the collection | + + +#### Description + +The `.indices()` function works exactly the same as the [`.query()`](#query) function but returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions, and not elements themselves. Indexes are returned in ascending order. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For a detailed description of the *queryString* and *value* parameters, please refer to the `dataClass.query()` function. + +#### Exemple + + +```4d + var $c; $icol : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $icol:=$c.indices("name = :1";"Cleveland") // $icol=[0] + $icol:=$c.indices("zc > 35040") // $icol=[0,3,4] +``` + + + + + +## .insert() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.insert**( *index* : Integer ; *element* : any ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------------- | +| index | Entier long | -> | Where to insert the element | +| element | any | -> | Element to insert in the collection | +| Résultat | Collection | <- | Original collection containing inserted element | + + +#### Description + +The `.insert()` function inserts *element* at the specified *index* position in the collection instance and returns the edited collection. +> This function modifies the original collection. + +In *index*, pass the position where you want the element to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, actual starting index will be set to the length of the collection. +* If *index* <0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, index is set to 0. + +Any type of element accepted by a collection can be inserted, even another collection. + +#### Exemple + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d") //$col=["a","b","c","d"] + $col.insert(2;"X") //$col=["a","b","X","c","d"] + $col.insert(-2;"Y") //$col=["a","b","X","Y","c","d"] + $col.insert(-10;"Hi") //$col=["Hi","a","b","X","Y","c","d"] +``` + + + + + + +## .join() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------------------------------ | +| delimiter | Texte | -> | Separator to use between elements | +| option | Entier long | -> | `ck ignore null or empty`: ignore null and empty strings in the result | +| Résultat | Texte | <- | String containing all elements of the collection, separated by delimiter | + + +#### Description + +The `.join()` function converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator.The function returns the resulting string. +> This function does not modify the original collection. + +By default, null or empty elements of the collection are returned in the resulting string. Pass the `ck ignore null or empty` constant in the *option* parameter if you want to remove them from the resulting string. + +#### Exemple + + +```4d + var $c : Collection + var $t1;$t2 : Text + $c:=New collection(1;2;3;"Paris";Null;"";4;5) + $t1:=$c.join("|") //1|2|3|Paris|null||4|5 + $t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5 +``` + + + + + +## .lastIndexOf() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------------------------------------- | +| toSearch | expression | -> | The element that is to be searched for within the collection | +| startFrom | Entier long | -> | Index to start the search at | +| Résultat | Entier long | <- | Index of last occurrence of toSearch in the collection, -1 if not found | + + +#### Description + +The `.lastIndexOf()` function searches the *toSearch* expression among collection elements and returns the index of the last occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator are applied). + +Optionally, you can pass the index of collection from which to start a reverse search in *startFrom*. + +* If *startFrom* >= the collection's length minus one (coll.length-1), the whole collection is searched (default). +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, -1 is returned (the collection is not searched). **Note:** Even if *startFrom* is negative, the collection is still searched from right to left. +* If *startFrom* = 0, -1 is returned, which means the collection is not searched. + +#### Exemple + + +```4d + var $col : Collection + var $pos1;$pos2;$pos3;$pos4;$pos5 : Integer + $col:=Split string("a,b,c,d,e,f,g,h,i,j,e,k,e";",") //$col.length=13 + $pos1:=$col.lastIndexOf("e") //retourne 12 + $pos2:=$col.lastIndexOf("e";6) //retourne 4 + $pos3:=$col.lastIndexOf("e";15) //retourne 12 + $pos4:=$col.lastIndexOf("e";-2) //retourne 10 + $pos5:=$col.lastIndexOf("x") //retourne -1 +``` + + + + + +## .length + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R5 | Ajoutées | +
      + +**.length** : Integer + + +#### Description + +The `.length` property returns the number of elements in the collection. + +The `.length` property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is **read-only** (you cannot use it to set the size of the collection). + +#### Exemple + + +```4d + var $col : Collection //$col.length initialized to 0 + $col:=New collection("one";"two";"three") //$col.length updated to 3 + $col[4]:="five" //$col.length updated to 5 + $vSize:=$col.remove(0;3).length //$vSize=2 +``` + + + + + +## .map() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.map**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| -------------------------------------------------------- | +| methodName | Texte | -> | Name of method used to transform the collection elements | +| param | any | -> | Parameter(s) for the method | +| Résultat | Collection | <- | Collection of transformed values | + + +#### Description + +The `.map()` function creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection. Optionally, you can pass parameters to *methodName* using the *param* parameter(s). `.map()` always returns a collection with the same size as the original collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). + +*methodName* receives the following parameters: + +* in *$1.value* (any type): element value to be mapped +* in *$2* (any type): *param* +* in *$N...* (any type): *paramN...* + +*methodName* sets the following parameter(s): + + +* *$1.result* (any type): new transformed value to add to the resulting collection +* *$1.stop* (boolean): **true** to stop the method callback. The returned value is the last calculated. + +#### Exemple + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;4;9;10;20) + $c2:=$c.map("Percentage";$c.sum()) + //$c2=[2.27,9.09,20.45,22.73,45.45] +``` + +Here is the ***Percentage*** method: + +```4d + var $1 : Object + var $2 : Real + $1.result:=Round(($1.value/$2)*100;2) +``` + + + + + + + +## .max() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.max**( { *propertyPath* : Text } ) : any +| Paramètres | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Texte | -> | Object property path to be used for evaluation | +| Résultat | Boolean, Text, Number, Collection, Object, Date | <- | Maximum value in the collection | + + +#### Description + +The `.max()` function returns the element with the highest value in the collection (the last element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.max()` function will return the maximum value within the last element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose maximum value you want to get. + +If the collection is empty, `.max()` returns *Undefined*. + +#### Exemple + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $max:=$col.max() //{name:Alabama,salary:10500} + $maxSal:=$col.max("salary") //50000 + $maxName:=$col.max("name") //"Wesson" +``` + + + + + +## .min() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.min**( { *propertyPath* : Text } ) : any +| Paramètres | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Texte | -> | Object property path to be used for evaluation | +| Résultat | Boolean, Text, Number, Collection, Object, Date | <- | Minimum value in the collection | + + +#### Description + +The `.min()` function returns the element with the smallest value in the collection (the first element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.min()` function will return the minimum value within the first element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose minimum value you want to get. + +If the collection is empty, `.min()` returns *Undefined*. + +#### Exemple + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $min:=$col.min() //55 + $minSal:=$col.min("salary") //10000 + $minName:=$col.min("name") //"Alabama" +``` + + + + + +## .orderBy() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.orderBy**( ) : Collection
      **.orderBy**( *pathStrings* : Text ) : Collection
      **.orderBy**( *pathObjects* : Collection ) : Collection
      **.orderBy**( *ascOrDesc* : Integer ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ---- |::| ----------- | +| | | | | + +|pathStrings|Text|->|Property path(s) on which to order the collection| |pathObjects|Collection|->|Collection of criteria objects| |ascOrDesc|Integer|->|`ck ascending` or `ck descending` (scalar values)| |Result|Collection |<-|Ordered copy of the collection (shallow copy)| + + +#### Description + +The `.orderBy()` function returns a new collection containing all elements of the collection in the specified order. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +If you pass no parameter, the function orders scalar values in the collection in ascending order (other element types such as objects or collections are returned unordered). You can modify this automatic order by passing the `ck ascending` or `ck descending` constants in the *ascOrDesc* parameter (see below). + +You can also pass a criteria parameter to define how the collection elements must be sorted. Three syntaxes are supported for this parameter: + +* *pathStrings* : Text (formula). **Syntax**: `propertyPath1 {desc or asc}, propertyPath2 {desc or asc},...` (default order: asc). *pathStrings* contains a formula made of 1 to x property paths and (optionally) sort orders, separated by commas. The order in which the properties are passed determines the sorting priority of the collection elements. By default, properties are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* : Collection. You can add as many objects in the *pathObjects* collection as necessary. By default, properties are sorted in ascending order ("descending" is false). Each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +* *ascOrDesc* : Integer. You pass one of the following constants from the **Objects and collections** theme: + + | Constant | Type | Valeur | Commentaire | + | ------------- | ------- | ------ | ------------------------------------------------- | + | ck ascending | Longint | 0 | Elements are ordered in ascending order (default) | + | ck descending | Longint | 1 | Elements are ordered in descending order | + + This syntax orders scalar values in the collection only (other element types such as objects or collections are returned unordered). + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Exemple 1 + +Ordering a collection of numbers in ascending and descending order: + +```4d + var $c; $c2; $3 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(Random) + End for + $c2:=$c.orderBy(ck ascending) + $c3:=$c.orderBy(ck descending) +``` + + +#### Exemple 2 + +Ordering a collection of objects based on a text formula with property names: + +```4d + var $c; $c2 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $c2:=$c.orderBy("value desc") + $c2:=$c.orderBy("value desc, id") + $c2:=$c.orderBy("value desc, id asc") +``` + +Ordering a collection of objects with a property path: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + + $c2:=$c.orderBy("phones.p1 asc") +``` + + +#### Example 3 + +Ordering a collection of objects using a collection of criteria objects: + +```4d + var $crit; $c; $c2 : COllection + $crit:=New collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $crit.push(New object("propertyPath";"value";"descending";True)) + $crit.push(New object("propertyPath";"id";"descending";False)) + $c2:=$c.orderBy($crit) +``` + +Ordering with a property path: + +```4d + var $crit; $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + $crit:=New collection(New object("propertyPath";"phones.p2";"descending";True)) + $c2:=$c.orderBy($crit) +``` + + + + + + + +## .orderByMethod() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| methodName | Texte | -> | Name of method used to specify the sorting order | +| extraParam | expression | -> | Parameter(s) for the method | +| Résultat | Collection | <- | Sorted copy of the collection (shallow copy) | + + +#### Description + +The `.orderByMethod()` function returns a new collection containing all elements of the collection in the order defined through the *methodName* method. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters +* *methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +#### Exemple 1 + +You want to sort a collection of strings in numerical order rather than alphabetical order: + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push("33";"4";"1111";"222") + $c2:=$c.orderBy() //$c2=["1111","222","33","4"], alphabetical order + $c3:=$c.orderByMethod("NumAscending") // $c3=["4","33","222","1111"] +``` + + Here is the code for ***NumAscending***: + + +```4d + $1.result:=Num($1.value)Length(String($1.value2)) +``` + +#### Example 3 + +You want to sort a collection by character code or language: + +```4d +var $strings1; $strings2 : Collection +$strings1:=New collection("Alpha";"Charlie";"alpha";"bravo";"Bravo";"charlie") + +//using the character code: +$strings2:=$strings1.orderByMethod("sortCollection";sk character codes) +// result : ["Alpha","Bravo","Charlie","alpha","bravo","charlie"] + +//using the language: +$strings2:=$string1s.orderByMethod("sortCollection";sk strict) +// result : ["alpha","Alpha","bravo","Bravo","charlie","Charlie"] +``` + +La méthode ***sortCollection*** : + +```4d +var$1Object +var$2Integer // sort option + +$1.result:=(Compare strings($1.value;$1.value2;$2)<0) +``` + + + + + + +## .pop() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + + +**.pop()** : any +| Paramètres | Type | | Description | +| ---------- | ---- |:--:| ----------------------------- | +| Résultat | any | <- | Dernier élément de collection | + + +#### Description + +The `.pop()` function removes the last element from the collection and returns it as the function result. +> This function modifies the original collection. + +Lorsqu'il est appliqué à une collection vide, .`pop()` retourne ***undefined***. + +#### Exemple + +`.pop()`, combiné à [`push()`](#push), peut être utilisé pour implémenter une fonctionnalité last in first out de traitement des données empilées : + +```4d + var $stack : Collection + $stack:=New collection //$stack=[] + $stack.push(1;2) //$stack=[1,2] + $stack.pop() //$stack=[1] Returns 2 + $stack.push(New collection(4;5)) //$stack=[[1,[4,5]] + $stack.pop() //$stack=[1] Returns [4,5] + $stack.pop() //$stack=[] Returns 1 +``` + + + + + + + +## .push() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.push**( *element* : any { ;...*elementN* } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| --------------------------------------------------- | +| element | Mixed | -> | Élément(s) à ajouter à la collection | +| Résultat | Collection | <- | Collection originale contenant des éléments ajoutés | + + +#### Description + +The `.push()` function appends one or more *element*(s) to the end of the collection instance and returns the edited collection. +> This function modifies the original collection. + + +#### Exemple 1 + +```4d + var $col : Collection + $col:=New collection(1;2) //$col=[1,2] + $col.push(3) //$col=[1,2,3] + $col.push(6;New object("firstname";"John";"lastname";"Smith")) + //$col=[1,2,3,6,{firstname:John,lastname:Smith} +``` + + + +#### Exemple 2 + +Vous souhaitez trier la collection résultante : + +```4d + var $col; $sortedCol : Collection + $col:=New collection(5;3;9) //$col=[5,3,9] + $sortedCol:=$col.push(7;50).sort() + //$col=[5,3,9,7,50] + //$sortedCol=[3,5,7,9,50] +``` + + + + + + + + +## .query() + +
      Historique +| Version | Modifications | +| ------- | ------------------------ | +| v17 R5 | Support of querySettings | +| v16 R6 | Ajoutées | +
      + +**.query**( *queryString* : Text ; *...value* : any ) : Collection
      **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection + +| Paramètres | Type | | Description | +| ------------- | ---------- |:--:| --------------------------------------------------------- | +| queryString | Texte | -> | Search criteria | +| value | Mixed | -> | Value(s) to compare when using placeholder(s) | +| querySettings | Objet | -> | Options de requête : paramètres, attributs | +| Résultat | Collection | <- | Élément(s) correspondant à queryString dans la collection | + + +#### Description + +The `.query()` function returns all elements of a collection of objects that match the search conditions defined by *queryString* and (optionally) *value* or *querySettings*. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For detailed information on how to build a query using *queryString*, *value* and *querySettings* parameters, please refer to the [`dataClass.query()`](DataClassClass.md#query) function description. + +> Formulas are not supported by the `collection.query()` function, neither in the *queryString* parameter nor as *formula* object parameter. + +#### Exemple 1 + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.query("name = :1";"Cleveland") //$c2=[{name:Cleveland,zc:35049}] + $c3:=$c.query("zc > 35040") //$c3=[{name:Cleveland,zc:35049},{name:Clanton,zc:35046},{name:Clanton,zc:35045}] +``` + + +#### Exemple 2 + + +```4d + var $c : Collection + $c:=New collection + $c.push(New object("name";"Smith";"dateHired";!22-05-2002!;"age";45)) + $c.push(New object("name";"Wesson";"dateHired";!30-11-2017!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) +``` + +Cet exemple retourne les personnes dont le nom contient "in" : + +```4d + $col:=$c.query("name = :1";"@in@") + //$col=[{name:Winch...},{name:Sterling...}] +``` + +Cet exemple retourne des personnes dont le nom ne commence pas par une chaîne d'une variable (saisie par l'utilisateur, par exemple) : + +```4d + $col:=$c.query("name # :1";$aString+"@") + //if $astring="W" + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] +``` + +Cet exemple retourne des personnes dont l'âge n'est pas connu (propriété définie sur null ou indéfinie) : + +```4d + $col:=$c.query("age=null") //placeholders not allowed with "null" + //$col=[{name:Wesson...},{name:Sterling...},{name:Mark...}] +``` + +Cet exemple retourne des personnes embauchées il y a plus de 90 jours : + +```4d + $col:=$c.query("dateHired < :1";(Current date-90)) + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] if today is 01/10/2018 if today is 01/10/2018 +``` + + +#### Example 3 + +Vous trouverez plus d'exemples de requêtes dans la page `dataClass.query()`. + + + + + + +## .reduce() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.reduce**( *methodName* : Text ) : any
      **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any + +| Paramètres | Type | | Description | +| ---------- | ----------------------------------------------- |:--:| ------------------------------------------------------------------------- | +| methodName | Texte | -> | Nom de la fonction à appeler pour traiter les éléments de collection | +| initValue | Text, Number, Object, Collection, Date, Boolean | -> | Valeur à utiliser comme premier argument du premier appel de *methodName* | +| param | expression | -> | Parameter(s) to pass to *methodName* | +| Résultat | Text, Number, Object, Collection, Date, Boolean | <- | Résultat de la valeur de l'accumulateur | + + +#### Description + + +The `.reduce()` function applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value. +> This function does not modify the original collection. + +Dans *methodName*, passez le nom de la méthode à utiliser pour évaluer les éléments de la collection, ainsi que son ou ses paramètres dans param (facultatif). *methodName* prend chaque élément de la collection et effectue toutes les opérations souhaitées pour accumuler le résultat dans *$1.accumulator*, qui est retourné dans *$1.value*. + +Vous pouvez passer la valeur pour initialiser l'accumulateur dans *initValue*. S'il est omis, *$1.accumulator* commence par *Undefined*. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be processed +* in *$2: param* +* in *$N...*: *paramN...* + +*methodName* sets the following parameter(s): + +* *$1.accumulator*: value to be modified by the function and which is initialized by *initValue*. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Exemple 1 + + +```4d + C_COLLECTION($c) + $c:=New collection(5;3;5;1;3;4;4;6;2;2) + $r:=$c.reduce("Multiply";1) //returns 86400 +``` + +Avec la méthode ***Multiply*** suivante : + +```4d + If(Value type($1.value)=Is real) + $1.accumulator:=$1.accumulator*$1.value + End if +``` + +#### Exemple + +Cet exemple permet de réduire plusieurs éléments de collection en un seul élément : + +```4d + var $c;$r : Collection + $c:=New collection + $c.push(New collection(0;1)) + $c.push(New collection(2;3)) + $c.push(New collection(4;5)) + $c.push(New collection(6;7)) + $r:=$c.reduce("Flatten") //$r=[0,1,2,3,4,5,6,7] +``` + +Avec la méthode ***Flatten*** suivante : + +```4d + If($1.accumulator=Null) + $1.accumulator:=New collection + End if + $1.accumulator.combine($1.value) +``` + + + + + +## .remove() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------------------- | +| index | Entier long | -> | Élément à partir duquel la suppression peut commencer | +| howMany | Entier long | -> | Nombre d'éléments à supprimer, ou 1 élément si omis | +| Résultat | Collection | <- | Collection d'origine sans élément(s) supprimé(s) | + + +#### Description + +The `.remove()` function removes one or more element(s) from the specified *index* position in the collection and returns the edited collection. +> This function modifies the original collection. + +Dans *index*, passez la position où vous souhaitez supprimer l'élément de la collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. If *index* is greater than the length of the collection, actual starting index will be set to the length of the collection. + +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *index* is set to 0. +* If the calculated value > the length of the collection, *index* is set to the length. + +Dans *howMany*, passez le nombre d'éléments à supprimer de l'*index*. Si *howMany* n'est pas spécifié, un élément est supprimé. + + + +Si vous essayez de supprimer un élément d'une collection vide, la méthode ne fait rien (aucune erreur n'est générée). + + +#### Exemple + + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d";"e";"f";"g";"h") + $col.remove(3) // $col=["a","b","c","e","f","g","h"] + $col.remove(3;2) // $col=["a","b","c","g","h"] + $col.remove(-8;1) // $col=["b","c","g","h"] + $col.remove(-3;1) // $col=["b","g","h"] +``` + + + + + + + +## .resize() + + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + + + +**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection +| Paramètres | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| --------------------------------------------------- | +| size | Entier long | -> | Nouvelle taille de la collection | +| defaultValue | Number, Text, Object, Collection, Date, Boolean | -> | Valeur par défaut pour remplir de nouveaux éléments | +| Résultat | Collection | <- | Collection d'origine redimensionnée | + + +#### Description + +The `.resize()` function sets the collection length to the specified new size and returns the resized collection. +> This function modifies the original collection. + +* If *size* < collection length, exceeding elements are removed from the collection. +* If *size* > collection length, the collection length is increased to size. + +Par défaut, les nouveaux éléments sont remplis par des valeurs **null**. Vous pouvez indiquer la valeur à remplir dans les éléments ajoutés à l'aide du paramètre *defaultValue*. + +#### Exemple + + +```4d + var $c : Collection + $c:=New collection + $c.resize(10) // $c=[null,null,null,null,null,null,null,null,null,null] + + $c:=New collection + $c.resize(10;0) // $c=[0,0,0,0,0,0,0,0,0,0] + + $c:=New collection(1;2;3;4;5) + $c.resize(10;New object("name";"X")) //$c=[1,2,3,4,5,{name:X},{name:X},{name:X},{name:X},{name:X}] + + $c:=New collection(1;2;3;4;5) + $c.resize(2) //$c=[1,2] + +``` + + + + + + + +## .reverse() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.reverse( )** : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------- | +| Résultat | Collection | <- | Copie inversée de la collection | + + +#### Description + +The `.reverse()` function returns a deep copy of the collection with all its elements in reverse order. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +#### Exemple + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;3;5;2;4;6) + $c2:=$c.reverse() //$c2=[6,4,2,5,3,1] +``` + + + + + + +## .shift() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.shift()** : any +| Paramètres | Type | | Description | +| ---------- | ---- |:--:| ----------------------------- | +| Résultat | any | <- | Premier élément de collection | + + +#### Description + +The `.shift()` function removes the first element of the collection and returns it as the function result. +> This function modifies the original collection. + +Si la collection est vide, cette méthode ne fait rien. + +#### Exemple + + +```4d + var $c : Collection + var $val : Variant + $c:=New collection(1;2;4;5;6;7;8) + $val:=$c.shift() + // $val=1 + // $c=[2,4,5,6,7,8] +``` + + + + + + +## .slice() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------------------------------- | +| startFrom | Entier long | -> | Index pour démarrer la recherche (inclus) | +| end | Entier long | -> | End index (not included) | +| Résultat | Collection | <- | Nouvelle collection contenant des éléments scindées (copie superficielle) | + + +#### Description + +The `.slice()` function returns a portion of a collection into a new collection, selected from *startFrom* index to *end* index (end not included). Cette fonction retourne une *copie superficielle* de la collection. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +La collection retournée contient l'élément spécifié par *startFrom* et tous les éléments suivants jusqu'à l'élément spécifié par *end* (mais non compris). Si seul le paramètre *startFrom* est spécifié, la collection retournée contient tous les éléments de *startFrom* au dernier élément de la collection d'origine. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +#### Exemple + + +```4d + var $c; $nc : Collection + $c:=New collection(1;2;3;4;5) + $nc:=$c.slice(0;3) //$nc=[1,2,3] + $nc:=$c.slice(3) //$nc=[4,5] + $nc:=$c.slice(1;-1) //$nc=[2,3,4] + $nc:=$c.slice(-3;-2) //$nc=[3] +``` + + + + + + +## .some() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
      **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| -------------------------------------------- | +| startFrom | Entier long | -> | Index to start the test at | +| methodName | Texte | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Résultat | Booléen | <- | Vrai si au moins un élément a réussi le test | + + +#### Description + +The `.some()` function returns true if at least one element in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (booléen) : **true** si l'évaluation de la valeur de l'élément est réussie, sinon **false**. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +Dans tous les cas, au moment où la fonction `.some()` rencontre le premier élément de collection retournant true dans *$1.result*, elle arrête d'appeler *methodName* et retourne **true**. + +By default, `.every()` tests the whole collection. Optionally, you can pass in *startFrom* the index of the element from which to start the test. + +* Si *startFrom* >= la longueur de la collection, **False** est retourné, ce qui signifie que la collection n'est pas testée. +* Si *startFrom* < 0, il est considéré comme le décalage depuis la fin de la collection. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Exemple + + +```4d + var $c : Collection + var $b : Boolean + $c:=New collection + $c.push(-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") // returns false + $c.push(1) + $b:=$c.some("NumberGreaterThan0") // returns true + + $c:=New collection + $c.push(1;-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") //$b=true + $b:=$c.some(1;"NumberGreaterThan0") //$b=false +``` + +Avec la méthode *NumberGreaterThan0* suivante : + +```4d + $1.result:=$1.value>0 +``` + + + + + + + +## .sort() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection + +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| methodName | Texte | -> | Name of method used to specify the sorting order | +| extraParam | any | -> | Parameter(s) for the method | +| Résultat | Collection | <- | Collection d'origine triée | + + +#### Description + +The `.sort()` function sorts the elements of the original collection and also returns the sorted collection. +> This function modifies the original collection. + +Si `.sort()` est appelé sans paramètre, seules les valeurs scalaires (numérique, texte, date, booléens) sont triées. Les éléments sont triés par défaut par ordre croissant, en fonction de leur type. + +Si vous souhaitez trier les éléments de la collection dans un autre ordre ou trier n'importe quel type d'élément, vous devez fournir, dans *methodName*, une méthode de comparaison qui compare deux valeurs et retourne **true** dans *$1.result* si la première valeur est inférieure à la deuxième valeur. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters + +*methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Exemple 1 + + +```4d + var $col; $col2 : Collection + $col:=New collection("Tom";5;"Mary";3;"Henry";1;"Jane";4;"Artie";6;"Chip";2) + $col2:=$col.sort() // $col2=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] + // $col=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] +``` + +#### Exemple 2 + +```4d + var $col; $col2 : Collection + $col:=New collection(10;20) + $col2:=$col.push(5;3;1;4;6;2).sort() //$col2=[1,2,3,4,5,6,10,20] +``` + +#### Example 3 + +```4d + var $col; $col2; $col3 : Collection + $col:=New collection(33;4;66;1111;222) + $col2:=$col.sort() //numerical sort: [4,33,66,222,1111] + $col3:=$col.sort("numberOrder") //alphabetical sort: [1111,222,33,4,66] +``` + +```4d + //numberOrder project method + var $1 : Object + $1.result:=String($1.value)Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | + + +**.sum**( { *propertyPath* : Text } ) : Real +| Paramètres | Type | | Description | +| ------------ | ----- |:--:| ----------------------------------------------- | +| propertyPath | Texte | -> | Object property path to be used for calculation | +| Résultat | Réel | <- | Somme des valeurs de collection | + + +#### Description + +The `.sum()` function returns the sum for all values in the collection instance. + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.sum()` retourne 0 si : + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + +#### Exemple 1 + + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection(10;20;"Monday";True;2) + $vSum:=$col.sum() //32 +``` + +#### Exemple 2 + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500,5)) + $vSum:=$col.sum("salary") //$vSum=70500,5 +``` + + + + + + +## .unshift() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v16 R6 | Ajoutées | +
      + +**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection +| Paramètres | Type | | Description | +| ---------- | -------------------------------------- |:--:| --------------------------------------------- | +| value | Text, Number, Object, Collection, Date | -> | Valeur(s) à insérer au début de la collection | +| Résultat | Réel | <- | Collection contenant des éléments ajoutés | + + +#### Description + +The `.unshift()` function inserts the given *value*(s) at the beginning of the collection and returns the modified collection. +> This function modifies the original collection. + +Si plusieurs valeurs sont passées, elles sont insérées toutes en même temps, ce qui signifie qu'elles apparaissent dans la collection résultante dans le même ordre que dans la liste d'arguments. + + +#### Exemple + + +```4d + var $c : Collection + $c:=New collection(1;2) + $c.unshift(4) // $c=[4,1,2] + $c.unshift(5) //$c=[5,4,1,2] + $c.unshift(6;7) // $c=[6,7,5,4,1,2] +``` + + + + diff --git a/website/translated_docs/fr/API/CryptoKeyClass.md b/website/translated_docs/fr/API/CryptoKeyClass.md new file mode 100644 index 00000000000000..27e18f0138d739 --- /dev/null +++ b/website/translated_docs/fr/API/CryptoKeyClass.md @@ -0,0 +1,340 @@ +--- +id: CryptoKeyClass +title: CryptoKey +--- + + +La classe `CryptoKey` du langage 4D contient une paire de clés de chiffrement asymétrique. + +Cette classe est disponible depuis le "class store" de `4D`. + +### Exemple + +L'extrait de code suivant illustre la signature et la vérification d'un message à l'aide d'une nouvelle paire de clés ECDSA, afin de créer, par exemple, un token Web JSON ES256. + +```4d + // Générer une nouvelle paire de clés ECDSA +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) + + // Obtenir une signature en base64 +$message:="hello world" +$signature:=$key.sign($message;New object("hash";"SHA256")) + + // Vérifier la signature +$status:=$key.verify($message;$signature;New object("hash";"SHA256")) +ASSERT($status.success) +``` + + +### Sommaire +| | +| --------------------------------------------------------------------------------------------------------------------- | +| [**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey](#4dcryptokeynew)

          creates a new `4D.CryptoKey` object encapsulating an encryption key pair

      | +| [**.curve** : Texte](#curve)

          normalised curve name of the key.

      | +| [**.decrypt**( *message* : Text ; *options* : Object ) : Object](#decrypt)

          decrypts the *message* parameter using the **private** key

      | +| [**.encrypt**( *message* : Text ; *options* : Object ) : Text](#encrypt)

          encrypts the *message* parameter using the **public** key

      | +| [**.getPrivateKey()** : Text](#getprivatekey)

          returns the private key of the `CryptoKey` object

      | +| [**.getPublicKey( )** : Text](#getpublickey)

          returns the public key of the `CryptoKey` object

      | +| [.**sign** (*message* : Text ; *options* : Text) : Text](#sign)

          signs the utf8 representation of a *message* string

      | +| [**.size** : Integer](#size)

          the size of the key in bits

      | +| [**.type** : Texte](#type)

          Name of the key type - "RSA", "ECDSA", "PEM"

      | +| [**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object](#verify)

          verifies the base64 signature against the utf8 representation of *message*

      | + + + + + + + + +## 4D.CryptoKey.new() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey +| Paramètres | Type | | Description | +| ---------- | ------------ | -- | ---------------------------------------------------- | +| settings | Objet | -> | Paramètres pour générer ou charger une paire de clés | +| result | 4D.CryptoKey | <- | Object encapsulating an encryption key pair | + +The `4D.CryptoKey.new()` function creates a new `4D.CryptoKey` object encapsulating an encryption key pair, based upon the *settings* object parameter. Elle permet de générer une nouvelle clé RSA ou ECDSA, ou de charger une paire de clés existante à partir de la définition PEM. + +#### *settings* + +| Propriété | Type | Description | +| --------------- | ------- | ------------------------------------------------- | +| [curve](#curve) | text | Name of ECDSA curve | +| [pem](#pem) | text | Définition PEM d'une clé de chiffrement à charger | +| [size](#size) | integer | Size of RSA key in bits | +| [type](#type) | text | Type of the key: "RSA", "ECDSA", or "PEM"
    • | + + +#### *CryptoKey* + +The returned `CryptoKey` object encapsulates an encryption key pair. C'est un objet partagé et peut être alors utilisé par de multiples traitements 4D simultanés. + + + +## .curve + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.curve** : Texte + + + +Defined only for ECDSA keys: the normalised curve name of the key. Usually "prime256v1" for ES256 (default), "secp384r1" for ES384, "secp521r1" for ES512. + + +## .decrypt() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.decrypt**( *message* : Text ; *options* : Object ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- | -- | --------------------------------------------------------------------------------- | +| message | Texte | -> | Chaine message à déchiffrer à l'aide de `options.encodingEncrypted` et decrypted. | +| options | Objet | -> | Options de décodage | +| Résultat | Objet | <- | Statut | + + + +The `.decrypt()` function decrypts the *message* parameter using the **private** key. L'algorithme utilisé dépend du type de clé. + +La clé doit être une clé RSA, l'algorithme est RSA-OAEP (voir [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +#### *options* + +| Propriété | Type | Description | +| ----------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Algorithme de hachage à utiliser. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Chiffrement utilisé pour convertir le paramètre `message` en représentation binaire à déchiffrer. Peut être "Base64" ou "Base64URL". La valeur par défaut est "Base64". | +| encodingDecrypted | text | Encodage utilisé pour convertir le message binaire déchiffré en chaîne de résultat. Peut être "UTF-8", "Base64" ou "Base64URL". La valeur par défaut est "UTF-8". | + + +#### *Résultat* + +La fonction renvoie un objet "status" avec la propriété `success` définie sur `true` si le *message* a pu être déchiffré avec succès. + +| Propriété | Type | Description | +| --------- | ---------- | --------------------------------------------------------------------------- | +| success | boolean | True si le message a été déchiffré avec succès | +| result | text | Message déchiffré et décodé à l'aide de `options.encodingDecrypted` | +| errors | collection | Si `success` est mis sur `false`, il peut contenir une collection d'erreurs | + + +Si le *message* n'a pas pu être déchiffré car il n'a pas été chiffré avec la même clé ou le même algorithme, l'objet `status` retourné contient une collection d'erreurs dans `status.errors`. + + +## .encrypt() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.encrypt**( *message* : Text ; *options* : Object ) : Text +| Paramètres | Type | | Description | +| ---------- | ----- | -- | ------------------------------------------------------------------------------- | +| message | Texte | -> | Chaine message à chiffrer à l'aide de `options.encodingDecrypted` et encrypted. | +| options | Objet | -> | Options de chiffrement | +| Résultat | Texte | <- | Message chiffré et encodé à l'aide de `options.encodingEncrypted` | + +The `.encrypt()` function encrypts the *message* parameter using the **public** key. L'algorithme utilisé dépend du type de clé. + +La clé doit être une clé RSA, l'algorithme est RSA-OAEP (voir [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +##### *options* + +| Propriété | Type | Description | +| ----------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Algorithme de hachage à utiliser. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Chiffrement utilisé pour convertir le message chiffré binaire en chaîne de résultat. Peut être "Base64" ou "Base64URL". La valeur par défaut est "Base64". | +| encodingDecrypted | text | Chiffrement utilisé pour convertir le paramètre `message` en représentation binaire à chiffrer. Peut être "UTF-8", "Base64" ou "Base64URL". La valeur par défaut est "UTF-8". | + + +#### *Résultat* + +The returned value is an encrypted message. + + + + +## .getPrivateKey() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.getPrivateKey()** : Text + +| Paramètres | Type | | Description | +| ---------- | ----- | -- | -------------------------- | +| Résultat | Texte | <- | Clé primaire au format PEM | + +The `.getPrivateKey()` function returns the private key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Résultat* + +The returned value is the private key. + + + +## .getPublicKey() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.getPublicKey( )** : Text +| Paramètres | Type | | Description | +| ---------- | ---- | -- | -------------------------- | +| Résultat | Text | <- | Clé publique au format PEM | + + +The `.getPublicKey()` function returns the public key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Résultat* + +The returned value is the public key. + +--- +## .pem + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.pem** : Text + +PEM definition of an encryption key to load. Si la clé est une clé privée, la clé publique RSA ou ECDSA en sera déduite. + + + +## .sign() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +.**sign** (*message* : Text ; *options* : Text) : Text +| Paramètres | Type | | Description | +| ---------- | ----- | -- | -------------------------------------------------------------------------- | +| message | Texte | -> | Chaîne message à signer | +| options | Objet | -> | Options de signature | +| Résultat | Texte | <- | Signature en représentation Base64 ou Base64URL, selon l'option "encoding" | + +The `.sign()` function signs the utf8 representation of a *message* string using the `CryptoKey` object keys and provided *options*. Elle retourne sa signature au format base64 ou base64URL, selon la valeur de l'attribut `options.encoding` que vous avez passé. + +The `CryptoKey` must contain a valid **private** key. + +#### *options* + +| Propriété | Type | Description | +| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Algorithme de hachage à utiliser. For example: "SHA256", "SHA384", or "SHA512". Lorsqu'elle est utilisée pour produire un JWT, la taille du hachage doit correspondre à la taille de l'algorithme PS@, ES@, RS@ ou PS@ | +| encodingEncrypted | Texte | Chiffrement utilisé pour convertir le message chiffré binaire en chaîne de résultat. Peut être "Base64" ou "Base64URL". La valeur par défaut est "Base64". | +| pss | boolean | Utilise le Probabilistic Signature Scheme (PSS). Ignoré si la clé n'est pas une clé RSA. Passez `true` lors de la production d'un JWT pour l'algorithme PS@ | +| encoding | Texte | ERepresentation to be used for result signature. Valeurs possibles : "Base64" ou "Base64URL". La valeur par défaut est "Base64". | + + +#### *Résultat* + +Représentation utf8 de la chaîne *message*. + + +## .size + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.size** : Integer + +Defined only for RSA keys: the size of the key in bits. Habituellement 2048 (par défaut). + + +## .type + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + + +**.type** : Texte +Name of the key type - "RSA", "ECDSA", "PEM"
    • "RSA": an RSA key pair, using `settings.size` as [.size](#size).
    • "ECDSA": an Elliptic Curve Digital Signature Algorithm key pair, using `settings.curve` as [.curve](#curve). A noter que les clés ECDSA ne peuvent pas être utilisées pour le chiffrement, mais uniquement pour la signature.
    • "PEM": a key pair definition in PEM format, using `settings.pem` as [.pem](#pem). + + +## .verify() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object +| Paramètres | Type | | Description | +| ---------- | ----- | -- | ----------------------------------------------------------------------------------------------- | +| message | Texte | -> | Chaîne message utilisée pour générer la signature | +| signature | Texte | -> | Signature à vérifier, en représentation Base64 ou Base64URL, selon la valeur `options.encoding` | +| options | Objet | -> | Options de signature | +| Résultat | Objet | <- | Statut de la vérification | + +The `.verify()` function verifies the base64 signature against the utf8 representation of *message* using the `CryptoKey` object keys and provided *options*. + +The `CryptoKey` must contain a valid **public** key. + + +#### *options* + +| Propriété | Type | Description | +| --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | Texte | Algorithme de hachage à utiliser. For example: "SHA256", "SHA384", or "SHA512". Lorsqu'elle est utilisée pour produire un JWT, la taille du hachage doit correspondre à la taille de l'algorithme PS@, ES@, RS@ ou PS@ | +| pss | boolean | Utilise le Probabilistic Signature Scheme (PSS). Ignoré si la clé n'est pas une clé RSA. Passez `true` lors de la vérification d'un JWT pour l'algorithme PS@ | +| encoding | Texte | Représentation de la signature fournie. Valeurs possibles : "Base64" ou "Base64URL". La valeur par défaut est "Base64". | + + +#### *Résultat* + +La fonction retourne un objet status avec la propriété `success` définie sur `true` si le `message` a pu être déchiffré avec succès (c'est-à-dire si la signature est correspondante). + +Si la signature n'a pas pu être vérifiée car elle n'a pas été signée avec le même *message*, la clé ou l'algorithme, l'objet `status` retourné contient une collection d'erreurs dans `status.errors`. + +| Propriété | Type | Description | +| --------- | ---------- | --------------------------------------------------------------------------- | +| success | boolean | True si la signature correspond au message | +| errors | collection | Si `success` est mis sur `false`, il peut contenir une collection d'erreurs | + + diff --git a/website/translated_docs/fr/API/DataClassAttributeClass.md b/website/translated_docs/fr/API/DataClassAttributeClass.md new file mode 100644 index 00000000000000..0b1cdfc8d28d6e --- /dev/null +++ b/website/translated_docs/fr/API/DataClassAttributeClass.md @@ -0,0 +1,394 @@ +--- +id: DataClassAttributeClass +title: DataClassAttribute +--- + +Dataclass attributes are available as properties of their respective classes. Par exemple : + +```4d + nameAttribute:=ds.Company.name //référence à un attribut de classe + revenuesAttribute:=ds.Company["revenues"] //méthode alternative +``` + +This code assigns to *nameAttribute* and *revenuesAttribute* references to the name and revenues attributes of the Company class. Cette syntaxe ne retourne PAS les valeurs contenues dans l'attribut, mais retourne plutôt des références aux attributs eux-mêmes. To handle values, you need to go through [**Entities**](EntityClass.md). + +`DataClassAttribute` objects have properties that you can read to get information about your dataclass attributes. + +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +### Sommaire + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.autoFilled** : Booléen](#autofilled)

          contains True if the attribute value is automatically filled by 4D | +| [**.exposed** : Boolean](#exposed)

          true if the attribute is exposed in REST | +| [**.fieldNumber** : Integer](#fieldnumber)

          contains the internal 4D field number of the attribute | +| [**.fieldType** : Integer](#fieldtype)

          contains the 4D database type of the attribute | +| [**.indexed** : Booléen](#indexed)

          contains **True** if there is a B-tree or a Cluster B-tree index on the attribute | +| [**.inverseName** : Text](#inversename)

          returns the name of the attribute which is at the other side of the relation | +| [**.keyWordIndexed** : Boolean](#keywordindexed)

          contains **True** if there is a keyword index on the attribute | +| [**.kind** : Text](#kind)

          returns the category of the attribute | +| [**.mandatory** : Boolean](#mandatory)

          contains True if Null value input is rejected for the attribute | +| [**.name** : Text](#name)

          returns the name of the `dataClassAttribute` object as string | +| [**.readOnly** : Boolean](#readonly)

          true if the attribute is read-only | +| [**.relatedDataClass** : Text](#relateddataclass)

          returns the name of the dataclass related to the attribute | +| [**.type** : Texte](#type)

          contains the conceptual value type of the attribute | +| [**.unique** : Booléen](#unique)

          contains True if the attribute value must be unique | + + + +## .autoFilled + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.autoFilled** : Booléen + +#### Description + +The `.autoFilled` property contains True if the attribute value is automatically filled by 4D. This property corresponds to the following 4D field properties: + +* "Autoincrement", for numeric type fields +* "Auto UUID", for UUID (alpha type) fields. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.autoFilled) to get a valid value (false) even if `.autoFilled` is not returned. + + + +## .exposed + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R3 | Ajoutées | +
      + + +**.exposed** : Boolean + +#### Description + +The `.exposed` property is true if the attribute is exposed in REST. + + + + + +## .fieldNumber + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.fieldNumber** : Integer + +#### Description + +The `.fieldNumber` property contains the internal 4D field number of the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Num**(dataClassAttribute.fieldNumber) to get a valid value (0) even if `.fieldNumber` is not returned. + + + + + + +## .fieldType + +
      Historique +| Version | Modifications | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
      + + +**.fieldType** : Integer + +#### Description + +The `.fieldType` property contains the 4D database type of the attribute. It depends on the attribute kind (see [`.kind`](#kind)). + +**Valeurs possibles :** + +| dataClassAttribute.kind | fieldType | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | +| storage | Corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html) | +| relatedEntity | 38 (`Is object`) | +| relatedEntities | 42 (`Is collection`) | +| calculated |
    • scalar: corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)
    • entity: 38 (`Is object`)
    • entity selection: 42 (`Is collection)` | + + + +#### Voir également + +[`.type`](#type) + +## .indexed + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.indexed** : Booléen + +#### Description + +The `.indexed` property contains **True** if there is a B-tree or a Cluster B-tree index on the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.indexed) to get a valid value (false) even if `.indexed` is not returned. + + + + + +## .inverseName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.inverseName** : Text + +#### Description + +The `.inverseName` property returns the name of the attribute which is at the other side of the relation. + +This property is not returned if `.kind` = "storage". It must be of the "relatedEntity" or "relatedEntities" kind. +> For generic programming, you can use **String**(dataClassAttribute.inverseName) to get a valid value ("") even if `.inverseName` is not returned. + + + + + +## .keyWordIndexed + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.keyWordIndexed** : Boolean + +#### Description + +The `.keyWordIndexed` property contains **True** if there is a keyword index on the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.keyWordIndexed) to get a valid value (false) even if `.keyWordIndexed` is not returned. + + + + +## .kind + +
      Historique +| Version | Modifications | +| ------- | ------------------ | +| v19 R3 | Added "calculated" | +
      + + +**.kind** : Text + +#### Description + +The `.kind` property returns the category of the attribute. Returned value can be one of the following: + +* "storage": storage (or scalar) attribute, i.e. attribute storing a value, not a reference to another attribute +* "calculated": computed attribute, i.e. defined through a [`get` function](ORDA/ordaClasses.md#function-get-attributename). +* "relatedEntity": N -> 1 relation attribute (reference to an entity) +* "relatedEntities": 1 -> N relation attribute (reference to an entity selection) + + +#### Exemple + +Given the following table and relation: + +![](/assets/en/API/dataclassAttribute3.png) + +```4d + var $attKind : Text + $attKind:=ds.Employee.lastname.kind //$attKind="storage" + $attKind:=ds.Employee.manager.kind //$attKind="relatedEntity" + $attKind:=ds.Employee.directReports.kind //$attKind="relatedEntities" +``` + + + + + + +## .mandatory + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.mandatory** : Boolean + +#### Description + +The `.mandatory` property contains True if Null value input is rejected for the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.mandatory) to get a valid value (false) even if `.mandatory` is not returned. +> **Warning**: This property corresponds to the "Reject NULL value input" field property at the 4D database level. It is unrelated to the existing "Mandatory" property which is a data entry control option for a table. + + + + + +## .name + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the `dataClassAttribute` object as string. + +#### Exemple + +```4d + var $attName : Text + $attName:=ds.Employee.lastname.name //$attName="lastname" +``` + + + + +## .readOnly + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R3 | Ajoutées | + + +
      + + +**.readOnly** : Boolean + +#### Description + +The `.readOnly` property is true if the attribute is read-only. + +For example, computed attributes without [`set` function](ORDA/ordaClasses.md#function-set-attributename) are read-only. + + + + +## .relatedDataClass + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | + + +
      + + +**.relatedDataClass** : Text + +#### Description +> Cette propriété n'est disponible qu'avec les attributs de la propriété "relatedEntity" ou "relatedEntities" [`.kind`](#kind). + +The `.relatedDataClass` property returns the name of the dataclass related to the attribute. + +#### Exemple + +Considérons les tableaux et relations suivants : + + +![](assets/en/API/dataclassAttribute4.png) + +```4d + var $relClass1; $relClassN : Text + $relClass1:=ds.Employee.employer.relatedDataClass //$relClass1="Company" + $relClassN:=ds.Employee.directReports.relatedDataClass //$relClassN="Employee" +``` + + + + +## .type + +
      Historique +| Version | Modifications | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
      + + +**.type** : Texte + +#### Description + +The `.type` property contains the conceptual value type of the attribute, useful for generic programming. + +Le type de valeur conceptuelle dépend de l'attribut [`.kind`](#kind). + +**Valeurs possibles :** + +| dataClassAttribute.kind | type | Commentaire | +| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| storage | "blob", "bool", "date", "image", "number", "object", or "string" | "nombre" est rertourné pour tous les types numériques, y compris la durée. "string" is returned for uuid, alpha and text field types. "blob" attributes are [blob objects](Concepts/dt_blob.md#blob-type), they are handled using the [Blob class](BlobClass.md). | +| relatedEntity | related dataClass name | Ex : "Companies" | +| relatedEntities | related dataClass name + "Selection" suffix | Ex : "EmployeeSelection" | +| calculated |
    • storage: type ("blob", "number", etc.)
    • entity: dataClass name
    • entity selection: dataClass name + "Selection" | | + + +#### Voir également + +[`.fieldType`](#fieldtype) + + +## .unique + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.unique** : Booléen + +#### Description + +The `.unique` property contains True if the attribute value must be unique. Cette propriété correspond à la propriété de champ 4D "Unique". + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> Pour la programmation générique, vous pouvez utiliser **Bool** (dataClassAttribute.unique) pour obtenir une valeur valide (false) même si `.unique` n'est pas retourné. + + + diff --git a/website/translated_docs/fr/API/DataClassClass.md b/website/translated_docs/fr/API/DataClassClass.md new file mode 100644 index 00000000000000..8eb7580c544614 --- /dev/null +++ b/website/translated_docs/fr/API/DataClassClass.md @@ -0,0 +1,1189 @@ +--- +id: DataClassClass +title: DataClass +--- + + +A [DataClass](ORDA/dsMapping.md#dataclass) provides an object interface to a database table. All dataclasses in a 4D application are available as a property of the `ds` [datastore](ORDA/dsMapping.md#datastore). + + + +### Sommaire + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : DataClassAttribute](#attributename)

          objects that are available directly as properties | +| [**.all** ( { *settings* : Object } ) : 4D.EntitySelection](#all)

          queries the datastore to find all the entities related to the dataclass and returns them as an entity selection | +| [**.exposed** : Boolean](#exposed)

          true if the dataclass is exposed in REST | +| [**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection](#fromcollection)

          updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection | +| [**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
      **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity](#get)

          queries the dataclass to retrieve the entity matching the *primaryKey* parameter | +| [**.getDataStore()** : cs.DataStore](#getdatastore)

          returns the datastore for the specified dataclass | +| [**.getInfo()** : Object ](#getinfo)

          returns an object providing information about the dataclass | +| [**.new()** : 4D.Entity ](#new)

          creates in memory and returns a new blank entity related to the Dataclass | +| [**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection ](#newselection)

          creates a new, blank, non-shareable entity selection, related to the dataclass, in memory | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
      **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection ](#query)

          searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) | + + + +## .*attributeName* + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +***.attributeName*** : DataClassAttribute + +#### Description + +The attributes of dataclasses are objects that are available directly as properties of these classes. + +The returned objects are of the [`DataClassAttribute`](DataClassAttributeClass.md) class. These objects have properties that you can read to get information about your dataclass attributes. +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +#### Exemple 1 + +```4d +$salary:=ds.Employee.salary //returns the salary attribute in the Employee dataclass +$compCity:=ds.Company["city"] //returns the city attribute in the Company dataclass +``` + + +#### Exemple 2 + +Considering the following database structure: + +![](assets/en/API/dataclassAttribute.png) + + +```4d +var $firstnameAtt;$employerAtt;$employeesAtt : Object + + $firstnameAtt:=ds.Employee.firstname + //{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true, + //keyWordIndexed:false,autoFilled:false,mandatory:false,unique:false} + + $employerAtt:=ds.Employee.employer + //{name:employer,kind:relatedEntity,relatedDataClass:Company, + //fieldType:38,type:Company,inverseName:employees} + //38=Is object + + $employeesAtt:=ds.Company.employees + //{name:employees,kind:relatedEntities,relatedDataClass:Employee, + //fieldType:42,type:EmployeeSelection,inverseName:employer} + //42=Is collection +``` + +#### Example 3 + +Considering the following table properties: + +![](assets/en/API/dataclassAttribute2.png) + + +```4d + var $sequenceNumberAtt : Object + $sequenceNumberAtt=ds.Employee.sequenceNumber + //{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13, + //indexed:true,keyWordIndexed:false,autoFilled:true,mandatory:false,unique:true} +``` + + + + +## .all() + +
      Historique +| Version | Modifications | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Ajoutées | +
      + + +**.all** ( { *settings* : Object } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| settings | Objet | -> | Build option: context | +| Résultat | 4D.EntitySelection | <- | References on all entities related to the Dataclass | + + +#### Description + +The `.all( )` function queries the datastore to find all the entities related to the dataclass and returns them as an entity selection. + +The entities are returned in the default order, which is initially the order in which they were created. Note however that, if entities have been deleted and new ones added, the default order does not reflect the creation order anymore. + +If no corresponding entity is found, an empty entity selection is returned. + +Lazy loading is applied. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propriété | Type | Description | +| --------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Exemple + +```4d + var $allEmp : cs.EmployeeSelection + $allEmp:=ds.Employee.all() +``` + + + +## .exposed + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R3 | Ajoutées | +
      + + +**.exposed** : Boolean + +#### Description + +The `.exposed` property is true if the dataclass is exposed in REST. + + + +## .fromCollection() + +
      Historique +| Version | Modifications | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Ajoutées | +
      + +**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection + +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| ------------------------------------------------ | +| objectCol | Collection | -> | Collection of objects to be mapped with entities | +| settings | Objet | -> | Build option: context | +| Résultat | 4D.EntitySelection | <- | Entity selection filled from the collection | + + +#### Description + +The `.fromCollection()` function updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection. + +In the *objectCol* parameter, pass a collection of objects to create new or update existing entities of the dataclass. The property names must be the same as attribute names in the dataclass. If a property name does not exist in the dataclass, it is ignored. If an attribute value is not defined in the collection, its value is null. + +The mapping between the objects of the collection and the entities is done on the **attribute names** and **matching types**. If an object's property has the same name as an entity's attribute but their types do not match, the entity's attribute is not filled. + +**Create or update mode** + +For each object of *objectCol*: + +* If the object contains a boolean property "\_\_NEW" set to false (or does not contain a boolean "\_\_NEW" property), the entity is updated or created with the corresponding values of the properties from the object. No check is performed in regards to the primary key: + * If the primary key is given and exists, the entity is updated. In this case, the primary key can be given as is or with a "\_\_KEY" property (filled with the primary key value). + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary key is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +* If the object contains a boolean property "\_\_NEW" set to **true**, the entity is created with the corresponding values of the attributes from the object. A check is performed in regards to the primary key: + * If the primary key is given (as is) and exists, an error is sent + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +> The "\_\_KEY" property containing a value is taken into account only when the "\_\_NEW" property is set to **false** (or is omitted) and a corresponding entity exists. In all other cases, the "\_\_KEY" property value is ignored, primary key value must be passed "as is". + +**Related entities** + +The objects of *objectCol* may contain one or more nested object(s) featuring one or more related entities, which can be useful to create or update links between entities. + +The nested objects featuring related entities must contain a "\_\_KEY" property (filled with the primary key value of the related entity) or the primary key attribute of the related entity itself. The use of a \_\_KEY property allows independence from the primary key attribute name. +> The content of the related entities cannot be created / updated through this mechanism. + +**Stamp** + +If a \_\_STAMP attribute is given, a check is performed with the stamp in the datastore and an error can be returned ("Given stamp does not match current one for record# XX of table XXXX"). For more information, see [Entity locking](ORDA/entities.md#entity-locking). + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propriété | Type | Description | +| --------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Texte | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Exemple 1 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is given and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=668 //Existing PK in Employee table + $emp.firstName:="Arthur" + $emp.lastName:="Martin" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Exemple 2 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is with the \_\_KEY attribute and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.__KEY:=1720 //Existing PK in Employee table + $emp.firstName:="John" + $emp.lastName:="Boorman" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 3 + +We want to simply create a new entity from a collection: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Victor" + $emp.lastName:="Hugo" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 4 + +We want to create an entity. The \_\_NEW property is True, the employee primary key is not given: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Mary" + $emp.lastName:="Smith" + $emp.employer:=New object("__KEY";121) //Existing PK in the related dataClass Company + $emp.__NEW:=True + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) + + + + + + +``` + +#### Example 5 + +We want to create an entity. The \_\_NEW property is omitted, the employee primary key is given and does not exist: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10000 //Unexisting primary key + $emp.firstName:="Françoise" + $emp.lastName:="Sagan" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 6 + +In this example, the first entity will be created and saved but the second will fail since they both use the same primary key: + +```4d + var $empsCollection : Collection + var $emp; $emp2 : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10001 // Unexisting primary key + $emp.firstName:="Simone" + $emp.lastName:="Martin" + $emp.__NEW:=True + $empsCollection.push($emp) + + $emp2:=New object + $emp2.ID:=10001 // Same primary key, already existing + $emp2.firstName:="Marc" + $emp2.lastName:="Smith" + $emp2.__NEW:=True + $empsCollection.push($emp2) + $employees:=ds.Employee.fromCollection($empsCollection) + //first entity is created + //duplicated key error for the second entity +``` + +#### Voir également + +[**.toCollection()**](EntitySelectionClass.md#tocollection) + + + +## .get() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
      **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity + +| Paramètres | Type | | Description | +| ---------- | --------------- |:--:| ------------------------------------------- | +| primaryKey | Integer OR Text | -> | Primary key value of the entity to retrieve | +| settings | Objet | -> | Build option: context | +| Résultat | 4D.Entity | <- | Entity matching the designated primary key | + +#### Description + +The `.get()` function queries the dataclass to retrieve the entity matching the *primaryKey* parameter. + +In *primaryKey*, pass the primary key value of the entity to retrieve. The value type must match the primary key type set in the datastore (Integer or Text). You can also make sure that the primary key value is always returned as Text by using the [`.getKey()`](EntityClass.md#getkey) function with the `dk key as string` parameter. + +If no entity is found with *primaryKey*, a **Null** entity is returned. + +Lazy loading is applied, which means that related data is loaded from disk only when it is required. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Propriété | Type | Description | +| --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Texte | Label for the automatic optimization context applied to the entity. This context will be used by the subsequent code that loads the entity so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + + +#### Exemple 1 + +```4d + var $entity : cs.EmployeeEntity + var $entity2 : cs.InvoiceEntity + $entity:=ds.Employee.get(167) // return the entity whose primary key value is 167 + $entity2:=ds.Invoice.get("DGGX20030") // return the entity whose primary key value is "DGGX20030" +``` + +#### Exemple 2 + +This example illustrates the use of the *context* property: + +```4d + var $e1; $e2; $e3; $e4 : cs.EmployeeEntity + var $settings; $settings2 : Object + + $settings:=New object("context";"detail") + $settings2:=New object("context";"summary") + + $e1:=ds.Employee.get(1;$settings) + completeAllData($e1) // In completeAllData method, an optimization is triggered and associated to context "detail" + + $e2:=ds.Employee.get(2;$settings) + completeAllData($e2) // In completeAllData method, the optimization associated to context "detail" is applied + + $e3:=ds.Employee.get(3;$settings2) + completeSummary($e3) //In completeSummary method, an optimization is triggered and associated to context "summary" + + $e4:=ds.Employee.get(4;$settings2) + completeSummary($e4) //In completeSummary method, the optimization associated to context "summary" is applied +``` + + + + +## .getDataStore() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getDataStore()** : cs.DataStore +| Paramètres | Type | | Description | +| ---------- | ------------ |:--:| -------------------------- | +| Résultat | cs.DataStore | <- | Datastore of the dataclass | + + +#### Description + +The `.getDataStore( )` function returns the datastore for the specified dataclass. + +The datastore can be: + +* the main datastore, as returned by the `ds` command. +* a remote datastore, opened using the `Open datastore` command. + + +#### Exemple + +The ***SearchDuplicate*** project method searches for duplicated values in any dataclass. + +```4d + var $pet : cs.CatsEntity + $pet:=ds.Cats.all().first() //get an entity + SearchDuplicate($pet;"Dogs") +``` + +```4d + // SearchDuplicate method + // SearchDuplicate(entity_to_search;dataclass_name) + + #DECLARE ($pet : Object ; $dataClassName : Text) + var $dataStore; $duplicates : Object + + $dataStore:=$pet.getDataClass().getDataStore() + $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name) +``` + + + + +## .getInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getInfo()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- | -- | ---------------------------- | +| Résultat | Objet | <- | Information on the dataclass | + + +#### Description + +The `.getInfo( )` function returns an object providing information about the dataclass. This function is useful for setting up generic code. + +**Returned object** + +| Propriété | Type | Description | +| ----------- | ----------- | ---------------------------------------- | +| name | Texte | Nom de la dataclass | +| primaryKey | Texte | Name of the primary key of the dataclass | +| tableNumber | Entier long | Internal 4D table number | + + + +#### Exemple 1 + +```4d + #DECLARE ($entity : Object) + var $status : Object + + computeEmployeeNumber($entity) //do some actions on entity + + $status:=$entity.save() + if($status.success) + ALERT("Record updated in table "+$entity.getDataClass().getInfo().name) + End if +``` + +#### Exemple 2 + +```4d + var $settings : Object + var $es : cs.ClientsSelection + + $settings:=New object + $settings.parameters:=New object("receivedIds";getIds()) + $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey) + $es:=ds.Clients.query(":pk in :receivedIds";$settings) +``` + +#### Example 3 + +```4d + var $pk : Text + var $dataClassAttribute : Object + + $pk:=ds.Employee.getInfo().primaryKey + $dataClassAttribute:=ds.Employee[$pk] // If needed the attribute matching the primary key is accessible +``` + + + + +## .new() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +**.new()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- | -- | --------------------------------- | +| Résultat | 4D.Entity | <- | New entity matching the Dataclass | + + +#### Description + +The `.new( )` function creates in memory and returns a new blank entity related to the Dataclass. + +The entity object is created in memory and is not saved in the database until the [`.save( )`](EntityClass.md#save) function is called. If the entity is deleted before being saved, it cannot be recovered. + +**4D Server**: In client-server, if the primary key of the corresponding table is auto-incremented, it will be calculated when the entity is saved on the server. + +All attributes of the entity are initialized with the **null** value. + +> Attributes can be initialized with default values if the **Map NULL values to blank values** option is selected at the 4D database structure level. + +#### Exemple + +This example creates a new entity in the "Log" Dataclass and records information in the "info" attribute: + +```4d + var $entity : cs.LogEntity + $entity:=ds.Log.new() //create a reference + $entity.info:="New entry" //store some information + $entity.save() //save the entity +``` + + + + + +## .newSelection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| keepOrder | Entier long | -> | `dk keep ordered`: creates an ordered entity selection,
      `dk non ordered`: creates an unordered entity selection (default if omitted) | +| Résultat | 4D.EntitySelection | <- | New blank entity selection related to the dataclass | + + +#### Description + +The `.newSelection( )` function creates a new, blank, non-shareable entity selection, related to the dataclass, in memory. + +> Pour plus d'informations sur les sélections d'entités non partageables, veuillez vous reporter à [cette section](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + + +If you want to create an ordered entity selection, pass the `dk keep ordered` selector in the *keepOrder* parameter. By default if you omit this parameter, or if you pass the `dk non ordered` selector, the method creates an unordered entity selection. Unordered entity selections are faster but you cannot rely on entity positions. For more information, please see [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + +When created, the entity selection does not contain any entities (`mySelection.length` returns 0). This method lets you build entity selections gradually by making subsequent calls to the [`add()`](EntitySelectionClass.md#add) function. + + +#### Exemple + + +```4d + var $USelection; $OSelection : cs.EmployeeSelection + $USelection:=ds.Employee.newSelection() //create an unordered empty entity selection + $OSelection:=ds.Employee.newSelection(dk keep ordered) //create an ordered empty entity selection +``` + + + + + +## .query() + +
      Historique +| Version | Modifications | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Ajoutées | +
      + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
      **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ------------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------- | +| queryString | Texte | -> | Search criteria as string | +| formula | Objet | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Objet | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Résultat | 4D.EntitySelection | <- | New entity selection made up of entities from dataclass meeting the search criteria specified in *queryString* or *formula* | + + +#### Description + +The `.query( )` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s), for all the entities in the dataclass, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. + +If no matching entities are found, an empty `EntitySelection` is returned. + +**queryString parameter** + +The *queryString* parameter uses the following syntax: + +```4d +attributePath|formula comparator value + {logicalOperator attributePath|formula comparator value} + {order by attributePath {desc | asc}} +``` + +where: + +* **attributePath**: path of attribute on which you want to execute the query. This parameter can be a simple name (for example "country") or any valid attribute path (for example "country.name".) In case of an attribute path whose type is `Collection`, \[ ] notation is used to handle all the occurences (for example "children\[ ].age"). You can also use a **placeholder** (see below). +> *You cannot use directly attributes whose name contains special characters such as ".", "\[ ]", or "=", ">", "#"..., because they will be incorrectly evaluated in the query string. If you need to query on such attributes, you must consider using placeholders, which allow an extended range of characters in attribute paths (see* **Using placeholders** *below).* + +* **formula**: a valid formula passed as `Text` or `Object`. The formula will be evaluated for each processed entity and must return a boolean value. Within the formula, the entity is available through the `This` object. + + * **Text**: the formula string must be preceeded by the `eval( )` statement, so that the query parser evaluates the expression correctly. For example: *"eval(length(This.lastname) >=30)"* + * **Object**: the [formula object](FunctionClass.md) is passed as a **placeholder** (see below). The formula must have been created using the [`Formula`](FunctionClass.md#formula) or [`Formula from string`](FunctionClass.md#formula-from-string) command. +> * Keep in mind that 4D formulas only support `&` and `|` symbols as logical operators. +> * If the formula is not the only search criteria, the query engine optimizer could prior process other criteria (e.g. indexed attributes) and thus, the formula could be evaluated for only a subset of entities. + + Formulas in queries can receive parameters through $1. This point is detailed in the **formula parameter** paragraph below. +> * You can also pass directy a `formula` parameter object instead of the `queryString` parameter (recommended when formulas are more complex). See **formula parameter** paragraph below. +> * For security reasons, formula calls within `query()` methods can be disallowed. See `querySettings` parameter description. + +* **comparator**: symbol that compares *attributePath* and *value*. The following symbols are supported: + + | Comparison | Symbol(s) | Commentaire | + | ------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------- | + | Equal to | =, == | Gets matching data, supports the wildcard (@), neither case-sensitive nor diacritic. | + | | ===, IS | Gets matching data, considers the @ as a standard character, neither case-sensitive nor diacritic | + | Not equal to | #, != | Supports the wildcard (@) | + | | !==, IS NOT | Considers the @ as a standard character | + | Inférieur à | < | | + | Supérieur à | > | | + | Inférieur ou égal à | <= | | + | Supérieur ou égal à | >= | | + | Included in | IN | Gets data equal to at least one of the values in a collection or in a set of values, supports the wildcard (@) | + | Not condition applied on a statement | NOT | Parenthesis are mandatory when NOT is used before a statement containing several operators | + | Contient mot-clé | % | Keywords can be used in attributes of string or picture type | + +* **value**: the value to compare to the current value of the property of each entity in the entity selection or element in the collection. It can be a **placeholder** (see **Using placeholders** below) or any expression matching the data type property.

      When using a constant value, the following rules must be respected: + * **text** type constant can be passed with or without simple quotes (see **Using quotes** below). To query a string within a string (a "contains" query), use the wildcard symbol (@) in value to isolate the string to be searched for as shown in this example: "@Smith@". The following keywords are forbidden for text constants: true, false. + * **boolean** type constants: **true** or **false** (case sensitive). + * **numeric** type constants: decimals are separated by a '.' (period). date type constants: "YYYY-MM-DD" format + * **null** constant: using the "null" keyword will find **null** and **undefined** properties. + * in case of a query with an IN comparator, value must be a collection, or values matching the type of the attribute path between \[ ] separated by commas (for strings, " characters must be escaped with "\"). +* **logicalOperator**: used to join multiple conditions in the query (optional). You can use one of the following logical operators (either the name or the symbol can be used): + + | Conjunction | Symbol(s) | + | ----------- | ----------------------- | + | AND | &, &&, and | + | OU | |,||, or | + +* **order by attributePath**: you can include an order by *attributePath* statement in the query so that the resulting data will be sorted according to that statement. You can use multiple order by statements, separated by commas (e.g., order by *attributePath1* desc, *attributePath2* asc). By default, the order is ascending. Pass 'desc' to define a descending order and 'asc' to define an ascending order. +> *If you use this statement, the returned entity selection is ordered (for more information, please refer to [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection)). + +**Using quotes** + +When you use quotes within queries, you must use single quotes ' ' inside the query and double quotes " " to enclose the whole query, otherwise an error is returned. Par exemple : + +```4d +"employee.name = 'smith' AND employee.firstname = 'john'" +``` +> Single quotes (') are not supported in searched values since they would break the query string. For example "comp.name = 'John's pizza' " will generate an error. If you need to search on values with single quotes, you may consider using placeholders (see below). + +**Using parenthesis** + +You can use parentheses in the query to give priority to the calculation. For example, you can organize a query as follows: + +```4d +"(employee.age >= 30 OR employee.age <= 65) AND (employee.salary <= 10000 OR employee.status = 'Manager')" +``` + + +**Using placeholders** + +4D allows you to use placeholders for *attributePath*, *formula* and *value* arguments within the *queryString* parameter. A placeholder is a parameter that you insert in query strings and that is replaced by another value when the query string is evaluated. The value of placeholders is evaluated once at the beginning of the query; it is not evaluated for each element. + +Two types of placeholders can be used: **indexed placeholders** and **named placeholders**: + +| - | Indexed placeholders | Named placeholders | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Définition | Parameters are inserted as :paramIndex (for example :1, :2...) in queryString and their corresponding values are provided by the sequence of value parameter(s). You can use up to 128 value parameters | Parameters are inserted as :paramName (for example :myparam) and their values are provided in the attributes and/or parameters objects in the querySettings parameter | +| Exemple | $r:=class.query(":1=:2";"city";"Chicago") | $o.attributes:=New object("att";"city")
      $o.parameters:=New object("name";"Chicago")
      $r:=class.query(":att=:name";$o) | + +You can mix all argument kinds in *queryString*. A *queryString* can contain, for *attributePath*, *formula* and *value* parameters: + + +* direct values (no placeholders), +* indexed placeholders and/or named placeholders. + +**Using placeholders in queries is recommended** for the following reasons: + +1. It prevents malicious code insertion: if you directly use user-filled variables within the query string, a user could modifiy the query conditions by entering additional query arguments. For example, imagine a query string like: + + ```4d + $vquery:="status = 'public' & name = "+myname //user enters their name + $result:=$col.query($vquery) + ``` + + This query seems secured since non-public data are filtered. However, if the user enters in the *myname* area something like *"smith OR status='private'*, the query string would be modified at the interpretation step and could return private data. + + When using placeholders, overriding security conditions is not possible: + + ```4d + $result:=$col.query("status='public' & name=:1";myname) + ``` + + In this case if the user enters *smith OR status='private'* in the *myname* area, it will not be interpreted in the query string, but only passed as a value. Looking for a person named "smith OR status='private'" will just fail. + +2. It prevents having to worry about formatting or character issues, especially when handling *attributePath* or *value* parameters that might contain non-alphanumeric characters such as ".", "['... + +3. It allows the use of variables or expressions in query arguments. Voici quelques exemples : + + ```4d + $result:=$col.query("address.city = :1 & name =:2";$city;$myVar+"@") + $result2:=$col.query("company.name = :1";"John's Pizzas") + ``` + +**Looking for null values** + +When you look for null values, you cannot use the placeholder syntax because the query engine considers null as an unexpected comparison value. For example, if you execute the following query: + +```4d +$vSingles:=ds.Person.query("spouse = :1";Null) // will NOT work +``` + +You will not get the expected result because the null value will be evaluated by 4D as an error resulting from the parameter evaluation (for example, an attribute coming from another query). For these kinds of queries, you must use the direct query syntax: + +```4d + $vSingles:=ds.Person.query("spouse = null") //correct syntax +``` + + +**Linking collection attribute query arguments** + +When searching in collections within object attributes using multiple query arguments joined by the AND operator, you may want to make sure that only entities containing elements that match all arguments are returned, and not entities where arguments can be found in different elements. To do this, you need to link query arguments to collection elements, so that only single elements containing linked arguments are found. + +For example, with the following two entities: + +``` +Entity 1: +ds.People.name: "martin" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"paris" + } ] } + +Entity 2: +ds.People.name: "smith" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"lyon" + } , { + "kind":"office", + "city":"paris" + } ] } +``` + +You want to find people with a "home" location kind in the city "paris". If you write: + +```4d +ds.People.query("places.locations[].kind= :1 and places.locations[].city= :2";"home";"paris") +``` + +... the query will return "martin" **and** "smith" because "smith" has a "locations" element whose "kind" is "home" and a "locations" element whose "city" is "paris", even though they are different elements. + +If you want to only get entities where matching arguments are in the same collection element, you need to **link arguments**. To link query arguments: + +- Add a letter between the \[] in the first path to link and repeat the same letter in all linked arguments. For example: `locations[a].city and locations[a].kind`. You can use any letter of the Latin alphabet (not case sensitive). +- To add different linked criteria in the same query, use another letter. You can create up to 26 combinations of criteria in a single query. + +With the above entities, if you write: + +```4d +ds.People.query("places.locations[a].kind= :1 and places.locations[a].city= :2";"home";"paris") +``` + +... the query will only return "martin" because it has a "locations" element whose "kind" is "home" and whose "city" is "paris". The query will not return "smith" because the values "home" and "paris" are not in the same collection element. + + + +**formula parameter** + +As an alternative to formula insertion within the *queryString* parameter (see above), you can pass directly a formula object as a boolean search criteria. Using a formula object for queries is **recommended** since you benefit from tokenization, and code is easier to search/read. + +The formula must have been created using the `Formula` or `Formula from string` command. In this case: + +* the *formula* is evaluated for each entity and must return true or false. During the execution of the query, if the formula's result is not a boolean, it is considered as false. +* within the *formula*, the entity is available through the `This` object. +* if the `Formula` object is **null**, the errror 1626 ("Expecting a text or formula") is generated, that you call intercept using a method installed with `ON ERR CALL`. +> For security reasons, formula calls within `query(`) member methods can be disallowed. See *querySettings* parameter description. + +**Passing parameters to formulas** + +Any *formula* called by the `query()` class function can receive parameters: + +* Parameters must be passed through the **args** property (object) of the *querySettings* parameter. +* The formula receives this **args** object as a **$1** parameter. + +This small code shows the principles of how parameter are passed to methods: + +```4d + $settings:=New object("args";New object("exclude";"-")) //args object to pass parameters + $es:=ds.Students.query("eval(checkName($1.exclude))";$settings) //args is received in $1 +``` + +Additional examples are provided in example 3. + +**4D Server**: In client/server, formulas are executed on the server. In this context, only the `querySettings.args` object is sent to the formulas. + + + +**querySettings parameter** + +In the *querySettings* parameter, you can pass an object containing additional options. Les propriétés suivantes sont prises en charge : + +| Propriété | Type | Description | +| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| parameters | Objet | **Named placeholders for values** used in the *queryString* or *formula*. Values are expressed as property / value pairs, where property is the placeholder name inserted for a value in the *queryString* or *formula* (":placeholder") and value is the value to compare. You can mix indexed placeholders (values directly passed in value parameters) and named placeholder values in the same query. | +| attributes | Objet | **Named placeholders for attribute paths** used in the *queryString* or *formula*. Attributes are expressed as property / value pairs, where property is the placeholder name inserted for an attribute path in the *queryString* or *formula* (":placeholder"), and value can be a string or a collection of strings. Each value is a path that can designate either a scalar or a related attribute of the dataclass or a property in an object field of the dataclass

      TypeDescription
      ChaineattributePath expressed using the dot notation, e.g. "name" or "user.address.zipCode"
      Collection of stringsEach string of the collection represents a level of attributePath, e.g. \["name"] or \["user","address","zipCode"]. Using a collection allows querying on attributes with names that are not compliant with dot notation, e.g. \["4Dv17.1","en/fr"]
      You can mix indexed placeholders (values directly passed in *value* parameters) and named placeholder values in the same query. | +| args | Objet | Parameter(s) to pass to formulas, if any. The **args** object will be received in $1 within formulas and thus its values will be available through *$1.property* (see example 3). | +| allowFormulas | Booléen | True to allow the formula calls in the query (default). Pass false to disallow formula execution. If set to false and `query()` is given a formula, an error is sent (1278 - Formula not allowed in this member method). | +| context | Texte | Label for the automatic optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is designed for client/server processing; for more information, please refer to the **Client/server optimization** section. | +| queryPlan | Booléen | In the resulting entity selection, returns or does not return the detailed description of the query just before it is executed, i.e. the planned query. The returned property is an object that includes each planned query and subquery (in the case of a complex query). This option is useful during the development phase of an application. It is usually used in conjunction with queryPath. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | +| queryPath | Booléen | In the resulting entity selection, returns or does not return the detailed description of the query as it is actually performed. The returned property is an object that contains the actual path used for the query (usually identical to that of the queryPlan, but may differ if the engine manages to optimize the query), as well as the processing time and the number of records found. This option is useful during the development phase of an application. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | + +**About queryPlan and queryPath** + +The information recorded in `queryPlan`/`queryPath` include the query type (indexed and sequential) and each necessary subquery along with conjunction operators. Les chemins d'accès des requêtes contiennent également le nombre d'entités identifiées et la durée d'exécution de chaque critère de recherche. You may find it useful to analyze this information while developing your application(s). Généralement, la description du plan de requête et son chemin d'accès sont identiques mais ils peuvent différer car 4D peut intégrer des optimisations dynamiques lorsqu'une requête est exécutée, afin d'améliorer les performances. Par exemple, le moteur 4D peut convertir dynamiquement une requête indexée en requête séquentielle s'il estime que ce processus est plus rapide. Ce cas particulier peut se produire lorsque le nombre d'entités recherchées est faible. + +For example, if you execute the following query: + +```4d + $sel:=ds.Employee.query("salary < :1 and employer.name = :2 or employer.revenues > :3";\ + 50000;"Lima West Kilo";10000000;New object("queryPath";True;"queryPlan";True)) +``` + +queryPlan: + +```4d +{Or:[{And:[{item:[index : Employee.salary ] < 50000}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.name ] = Lima West Kilo}]}]}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.revenues ] > 10000000}]}]} +``` + +queryPath: + +```4d +{steps:[{description:OR,time:63,recordsfounds:1388132, + steps:[{description:AND,time:32,recordsfounds:131, + steps:[{description:[index : Employee.salary ] < 50000,time:16,recordsfounds:728260},{description:Join on Table : Company : Employee.employerID = Company.ID,time:0,recordsfounds:131, + steps:[{steps:[{description:[index : Company.name ] = Lima West Kilo,time:0,recordsfounds:1}]}]}]},{description:Join on Table : Company : Employee.employerID = Company.ID,time:31,recordsfounds:1388132, + steps:[{steps:[{description:[index : Company.revenues ] > 10000000,time:0,recordsfounds:933}]}]}]}]} +``` + +#### Exemple 1 + +This section provides various examples of queries. + +Query on a string: + +```4d +$entitySelection:=ds.Customer.query("firstName = 'S@'") +``` + +Query with a NOT statement: + +```4d +$entitySelection:=ds.Employee.query("not(firstName=Kim)") +``` + +Queries with dates: + +```4d +$entitySelection:=ds.Employee.query("birthDate > :1";"1970-01-01") +$entitySelection:=ds.Employee.query("birthDate <= :1";Current date-10950) +``` + +Query with indexed placeholders for values: + +```4d +$entitySelection:=ds.Customer.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@") +``` + +Query with indexed placeholders for values on a related dataclass: + +```4d +$entitySelection:=ds.Employee.query("lastName = :1 and manager.lastName = :2";"M@";"S@") +``` + +Query with indexed placeholder including a descending order by statement: + +```4d +$entitySelection:=ds.Student.query("nationality = :1 order by campus.name desc, lastname";"French") +``` + +Query with named placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings:=New object +$querySettings.parameters:=New object("userId";1234;"extraInfo";New object("name";"Smith")) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name = :extraInfo.name";$querySettings) +``` + +Query that uses both named and indexed placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings.parameters:=New object("userId";1234) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name=:1";"Smith";$querySettings) +``` + +Query with queryPlan and queryPath objects: + +```4d +$entitySelection:=ds.Employee.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@";New object("queryPlan";True;"queryPath";True)) + + //vous pouvez ensuite obtenir ces propriétés dans la sélection d'entité résultante +var $queryPlan; $queryPath : Object +$queryPlan:=$entitySelection.queryPlan +$queryPath:=$entitySelection.queryPath +``` + +Query with an attribute path of Collection type: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[].name = :1";"horsebackriding") +``` + +Query with an attribute path of Collection type and linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and extraInfo.hobbies[a].level=:2";"horsebackriding";2) +``` + +Query with an attribute path of Collection type and multiple linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and + extraInfo.hobbies[a].level = :2 and extraInfo.hobbies[b].name = :3 and + extraInfo.hobbies[b].level = :4";"horsebackriding";2;"Tennis";5) +``` + +Query with an attribute path of Object type: + +```4d +$entitySelection:=ds.Employee.query("extra.eyeColor = :1";"blue") +``` + +Query with an IN statement: + +```4d +$entitySelection:=ds.Employee.query("firstName in :1";New collection("Kim";"Dixie")) +``` + +Query with a NOT (IN) statement: + +```4d +$entitySelection:=ds.Employee.query("not (firstName in :1)";New collection("John";"Jane")) +``` + +Query with indexed placeholders for attributes: + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Employee.query(":1 = 1234 and :2 = 'Smith'";"salesperson.userId";"name") + //salesperson est une entité reliée +``` + +Query with indexed placeholders for attributes and named placeholders for values: + +```4d +var $es : cs.EmployeeSelection +var $querySettings : Object +$querySettings:=New object +$querySettings.parameters:=New object("customerName";"Smith") +$es:=ds.Customer.query(":1 = 1234 and :2 = :customerName";"salesperson.userId";"name";$querySettings) + //salesperson est une entité reliée +``` + +Query with indexed placeholders for attributes and values: + + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Clients.query(":1 = 1234 and :2 = :3";"salesperson.userId";"name";"Smith") + //salesperson est une entité reliée +``` + +#### Exemple 2 + +This section illustrates queries with named placeholders for attributes. + +Given an Employee dataclass with 2 entities: + +Entity 1: + +```4d +name: "Marie" +number: 46 +softwares:{ +"Word 10.2": "Installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Entity 2: + +```4d +name: "Sophie" +number: 47 +softwares:{ +"Word 10.2": "Not installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Query with named placeholders for attributes: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + $querySettings:=New object + $querySettings.attributes:=New object("attName";"name";"attWord";New collection("softwares";"Word 10.2")) + $es:=ds.Employee.query(":attName = 'Marie' and :attWord = 'Installed'";$querySettings) + //$es.length=1 (Employee Marie) +``` + +Query with named placeholders for attributes and values: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + var $name : Text + $querySettings:=New object + //Placeholders pour les valeurs + //Il est demandé à l'utilisateur de saisir un nom + $name:=Request("Veuillez saisir un nom à rechercher :") + If(OK=1) + $querySettings.parameters:=New object("givenName";$name) + //Placeholders pour les chemins d'attributs + $querySettings.attributes:=New object("attName";"name") + $es:=ds.Employee.query(":attName= :givenName";$querySettings) + End if +``` + +#### Example 3 + +These examples illustrate the various ways to use formulas with or without parameters in your queries. + +The formula is given as text with `eval()` in the *queryString* parameter: + +```4d + var $es : cs.StudentsSelection + $es:=ds.Students.query("eval(length(This.lastname) >=30) and nationality='French'") +``` + +The formula is given as a `Formula` object through a placeholder: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query(":1 and nationality='French'";$formula) +``` + +Only a `Formula` object is given as criteria: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query($formula) +``` + +Several formulas can be applied: + +```4d + var $formula1; $1; $formula2 ;$0 : Object + $formula1:=$1 + $formula2:=Formula(Length(This.firstname)>=30) + $0:=ds.Students.query(":1 and :2 and nationality='French'";$formula1;$formula2) +``` + + +A text formula in *queryString* receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query("eval(checkName($1.filter)) and nationality=:1";"French";$settings) +``` + +```4d + //méthode checkName + #DECLARE($exclude : Text) -> $result : Boolean + $result:=(Position($exclude;This.lastname)=0) +``` + +Using the same ***checkName*** method, a `Formula` object as placeholder receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings; $formula : Object + $formula:=Formula(checkName($1.filter)) + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) + $settings.args.filter:="*" // modifie les paramètres sans mettre à jour l'objet $formula + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) +``` + +We want to disallow formulas, for example when the user enters their query: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + var $queryString : Text + $queryString:=Request("Enter your query:") + if(OK=1) + $settings:=New object("allowFormulas";False) + $es:=ds.Students.query($queryString;$settings) //Une erreur est gnérée si $queryString contient une formule + End if +``` + +#### Voir également + +[`.query()`](EntitySelectionClass.md#query) for entity selections + + diff --git a/website/translated_docs/fr/API/DataStoreClass.md b/website/translated_docs/fr/API/DataStoreClass.md new file mode 100644 index 00000000000000..0fa3c1cf73fdf1 --- /dev/null +++ b/website/translated_docs/fr/API/DataStoreClass.md @@ -0,0 +1,788 @@ +--- +id: DataStoreClass +title: DataStore +--- + +A [Datastore](ORDA/dsMapping.md#datastore) is the interface object provided by ORDA to reference and access a database. `Datastore` objects are returned by the following commands: + +* [ds](#ds): a shortcut to the main datastore +* [Open datastore](#open-datastore): to open any remote datastore + +### Sommaire + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cancelTransaction()**](#canceltransaction)

          cancels the transaction | +| [***.dataclassName*** : 4D.DataClass](#dataclassname)

          contains a description of the dataclass | +| [**.encryptionStatus()**: Object](#encryptionstatus)

          returns an object providing the encryption status for the current data file | +| [**.getInfo()**: Object](#getinfo)

          returns an object providing information about the datastore | +| [**.getRequestLog()** : Collection](#getrequestlog)

          returns the ORDA requests logged in memory on the client side | +| [**.makeSelectionsAlterable()**](#makeselectionsalterable)

          sets all entity selections as alterable by default in the current application datastores | +| [**.provideDataKey**( *curPassPhrase* : Text ) : Object
      **.provideDataKey**( *curDataKey* : Object ) : Object ](#providedatakey)

          allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data | +| [**.setAdminProtection**( *status* : Boolean )](#setadminprotection)

          allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions | +| [**.startRequestLog**()
      **.startRequestLog**( *file* : 4D.File )
      **.startRequestLog**( *reqNum* : Integer )](#startrequestlog)

          starts the logging of ORDA requests on the client side | +| [**.startTransaction()**](#starttransaction)

          starts a transaction in the current process on the database matching the datastore to which it applies | +| [**.stopRequestLog()** ](#stoprequestlog)

          stops any logging of ORDA requests on the client side | +| [**.validateTransaction()** ](#validatetransaction)

          accepts the transaction | + + + + + +## ds + +

      Historique +| Version | Modifications | +| ------- | ---------------------------- | +| v18 | Support of localID parameter | +| v17 | Ajoutées | +
      + +**ds** { ( *localID* : Text ) } : cs.DataStore +| Paramètres | Type | | Description | +| ---------- | ------------ | -- | ------------------------------------------ | +| localID | Texte | -> | Local ID of the remote datastore to return | +| Résultat | cs.DataStore | <- | Reference to the datastore | + + +#### Description + +The `ds` command returns a reference to the datastore matching the current 4D database or the database designated by *localID*. + +If you omit the *localID* parameter (or pass an empty string ""), the command returns a reference to the datastore matching the local 4D database (or the 4D Server database in case of opening a remote database on 4D Server). The datastore is opened automatically and available directly through `ds`. + +You can also get a reference on an open remote datastore by passing its local id in the *localID* parameter. The datastore must have been previously opened with the [`Open datastore`](#open-datastore) command by the current database (host or component). The local id is defined when using this command. +> The scope of the local id is the database where the datastore has been opened. + +If no *localID* datastore is found, the command returns **Null**. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +#### Exemple 1 + +Using the main datastore on the 4D database: + +```4d + $result:=ds.Employee.query("firstName = :1";"S@") +``` + +#### Exemple 2 + +```4d + var $connectTo; $firstFrench; $firstForeign : Object + + var $frenchStudents; $foreignStudents : cs.DataStore + + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + //... + //... + $firstFrench:=getFirst("french";"Students") + $firstForeign:=getFirst("foreign";"Students") +``` + +```4d + //méthode getFirst + //getFirst(localID;dataclass) -> entity + #DECLARE( $localId : Text; $dataClassName : Text ) -> $entity : 4D.Entity + + $0:=ds($localId)[$dataClassName].all().first() +``` + + + + +## Open datastore + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**Open datastore**( *connectionInfo* : Object ; *localID* : Text ) : cs.DataStore +| Paramètres | Type | | Description | +| -------------- | ------------ | -- | ------------------------------------------------------------------------- | +| connectionInfo | Objet | -> | Connection properties used to reach the remote datastore | +| localID | Texte | -> | Id to assign to the opened datastore on the local application (mandatory) | +| Résultat | cs.DataStore | <- | Datastore object | + + +#### Description + +The `Open datastore` command connects the application to the 4D database identified by the *connectionInfo* parameter and returns a matching `cs.DataStore` object associated with the *localID* local alias. + +The *connectionInfo* 4D database must be available as a remote datastore, i.e.: + +* its web server must be launched with http and/or https enabled, +* its [**Expose as REST server**](REST/configuration.md#starting-the-rest-server) option must be checked, +* at least one client license is available. + +If no matching database is found, `Open datastore` returns **Null**. + +*localID* is a local alias for the session opened on remote datastore. If *localID* already exists on the application, it is used. Otherwise, a new *localID* session is created when the datastore object is used. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +Once the session is opened, the following statements become equivalent and return a reference on the same datastore object: + +```4d + $myds:=Open datastore(connectionInfo;"myLocalId") + $myds2:=ds("myLocalId") + //$myds and $myds2 are equivalent +``` + +Pass in *connectionInfo* an object describing the remote datastore you want to connect to. It can contain the following properties (all properties are optional except *hostname*): + +| Propriété | Type | Description | +| ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hostname | Text | Name or IP address of the remote database + ":" + port number (port number is mandatory) | +| user | Text | User name | +| password | Text | User password | +| idleTimeout | Longint | Inactivity session timeout (in minutes), after which the session is automatically closed by 4D. If omitted, default value is 60 (1h). The value cannot be < 60 (if a lower value is passed, the timeout is set to 60). For more information, see **Closing sessions**. | +| tls | Boolean | Use secured connection(*). If omitted, false by default. Using a secured connection is recommended whenever possible. | +| type | Text | Must be "4D Server" | + +(*) If tls is true, the HTTPS protocol is used if: + +* HTTPS is enabled on the remote datastore +* the given port is the right HTTPS port configured in the database settings +* a valid certificate and private encryption key are installed in the database. Otherwise, error "1610 - A remote request to host xxx has failed" is raised + +#### Exemple 1 + +Connection to a remote datastore without user / password: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Exemple 2 + +Connection to a remote datastore with user / password / timeout / tls: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";\"192.168.18.11:4443";\ + "user";"marie";"password";$pwd;"idleTimeout";70;"tls";True) + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 3 + +Working with several remote datastores: + +```4d + var $connectTo : Object + var $frenchStudents; $foreignStudents : cs.DataStore + $connectTo:=New object("hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + ALERT("They are "+String($frenchStudents.Students.all().length)+" French students") + ALERT("They are "+String($foreignStudents.Students.all().length)+" foreign students") +``` + +#### Error management + +In case of error, the command returns **Null**. If the remote datastore cannot be reached (wrong address, web server not started, http and https not enabled...), error 1610 "A remote request to host XXX has failed" is raised. You can intercept this error with a method installed by `ON ERR CALL`. + + + +## *.dataclassName* + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +***.dataclassName*** : 4D.DataClass + +#### Description + +Each dataclass in a datastore is available as a property of the [DataStore object](ORDA/dsMapping.md#datastore)data. The returned object contains a description of the dataclass. + + +#### Exemple + +```4d + var $emp : cs.Employee + var $sel : cs.EmployeeSelection + $emp:=ds.Employee //$emp contains the Employee dataclass + $sel:=$emp.all() //gets an entity selection of all employees + + //you could also write directly: + $sel:=ds.Employee.all() +``` + + + + + + +## .cancelTransaction() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + + +**.cancelTransaction()** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.cancelTransaction()` function cancels the transaction opened by the [`.startTransaction()`](#starttransaction) function at the corresponding level in the current process for the specified datastore. + +The `.cancelTransaction()` function cancels any changes made to the data during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using the [`.validateTransaction()`](#validatetransactions) function. + + +#### Exemple + +See example for the [`.startTransaction()`](#starttransaction) function. + + + + + +## .encryptionStatus() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.encryptionStatus()**: Object + +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| --------------------------------------------------------------------------- | +| Résultat | Objet | <- | Information about the encryption of the current datastore and of each table | + + +#### Description + +The `.encryptionStatus()` function returns an object providing the encryption status for the current data file (i.e., the data file of the `ds` datastore). The status for each table is also provided. +> Use the `Data file encryption status` command to determine the encryption status of any other data file. + + +**Valeur retournée** + +The returned object contains the following properties: + +| Propriété | | | Type | Description | +| ----------- | ----------- | ------------- | ------- | ---------------------------------------------------------------------------------- | +| isEncrypted | | | Booléen | True if the data file is encrypted | +| keyProvided | | | Booléen | True if the encryption key matching the encrypted data file is provided(*). | +| tables | | | Objet | Object containing as many properties as there are encryptable or encrypted tables. | +| | *tableName* | | Objet | Encryptable or Encrypted table | +| | | name | Texte | Name of the table | +| | | num | Nombre | Table number | +| | | isEncryptable | Booléen | True if the table is declared encryptable in the structure file | +| | | isEncrypted | Booléen | True if the records of the table are encrypted in the data file | + +(*) The encryption key can be provided: + +* with the `.provideDataKey()` command, +* at the root of a connected device before opening the datastore, +* with the `Discover data key` command. + +#### Exemple + +You want to know the number of encrypted tables in the current data file: + +```4d + var $status : Object + + $status:=dataStore.encryptionStatus() + + If($status.isEncrypted) //the database is encrypted + C_LONGINT($vcount) + C_TEXT($tabName) + For each($tabName;$status.tables) + If($status.tables[$tabName].isEncrypted) + $vcount:=$vcount+1 + End if + End for each + ALERT(String($vcount)+" encrypted table(s) in this datastore.") + Else + ALERT("This database is not encrypted.") + End if +``` + + + + +## .getInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.getInfo()**: Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| -------------------- | +| Résultat | Objet | <- | Datastore properties | + +#### Description + +The `.getInfo()` function returns an object providing information about the datastore. This function is useful for setting up generic code. + +**Returned object** + +| Propriété | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string |
    • "4D": main datastore, available through ds
    • "4D Server": remote datastore, open with Open datastore
    • | +| networked | boolean |
    • True: the datastore is reached through a network connection.
    • False: the datastore is not reached through a network connection (local database)
    • | +| localID | Texte | ID of the datastore on the machine. Corresponds to the localId string given with the `Open datastore` command. Empty string ("") for main datastore. | +| connection | object | Object describing the remote datastore connection (not returned for main datastore). Available properties:

      PropriétéTypeDescription
      hostnameTexteIP address or name of the remote datastore + ":" + port number
      tlsbooleanTrue if secured connection is used with the remote datastore
      idleTimeoutnumberSession inactivity timeout (in minutes)
      userTexteUser authenticated on the remote datastore
      | + +* If the `.getInfo()` function is executed on a 4D Server or 4D single-user, `networked` is False. +* If the `.getInfo()` function is executed on a remote 4D, `networked` is True + + +#### Exemple 1 + +```4d + var $info : Object + + $info:=ds.getInfo() //Executed on 4D Server or 4D + //{"type":"4D","networked":false,"localID":""} + + $info:=ds.getInfo() // Executed on 4D remote + //{"type":"4D","networked":true,"localID":""} +``` + +#### Exemple 2 + +On a remote datastore: + +```4d + var $remoteDS : cs.DataStore + var $info; $connectTo : Object + + $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa") + $remoteDS:=Open datastore($connectTo;"students") + $info:=$remoteDS.getInfo() + + //{"type":"4D Server", + //"localID":"students", + //"networked":true, + //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}} +``` + + + + + +## .getRequestLog() + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R6 | Ajoutées | +
      + +**.getRequestLog()** : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------------------ | +| Résultat | Collection | <- | Collection of objects, where each object describes a request | + + +#### Description + +The `.getRequestLog()` function returns the ORDA requests logged in memory on the client side. The ORDA request logging must have previously been enabled using the [`.startRequestLog()`](#startrequestlog) function. + +This function must be called on a remote 4D, otherwise it returns an empty collection. It is designed for debugging purposes in client/server configurations. + +**Valeur retournée** + +Collection of stacked request objects. The most recent request has index 0. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + + +#### Exemple + +See Example 2 of [`.startRequestLog()`](#startrequestlog). + + + +## .isAdminProtected() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.isAdminProtected()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------------------------------------ | +| Résultat | Booléen | <- | True if the Data Explorer access is disabled, False if it is enabled (default) | + + +#### Description + +The `.isAdminProtected()` function returns `True` if [Data Explorer](Admin/dataExplorer.md) access has been disabled for the working session. + +By default, the Data Explorer access is granted for `webAdmin` sessions, but it can be disabled to prevent any data access from administrators (see the [`.setAdminProtection()`](#setadminprotection) function). + +#### Voir également + +[`.setAdminProtection()`](#setadminprotection) + + + + + +## .makeSelectionsAlterable() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.makeSelectionsAlterable()** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.makeSelectionsAlterable()` function sets all entity selections as alterable by default in the current application datastores (including [remote datastores](ORDA/remoteDatastores.md)). It is intended to be used once, for example in the `On Startup` database method. + +When this function is not called, new entity selections can be shareable, depending on the nature of their "parent", or [how they are created](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + +> This function does not modify entity selections created by [`.copy()`](#copy) or `OB Copy` when the explicit `ck shared` option is used. + + +> **Compatibility**: This function must only be used in projects converted from 4D versions prior to 4D v18 R5 and containing [.add()](EntitySelectionClass.md#add) calls. In this context, using `.makeSelectionsAlterable()` can save time by restoring instantaneously the previous 4D behavior in existing projects. On the other hand, using this method in new projects created in 4D v18 R5 and higher **is not recommended**, since it prevents entity selections to be shared, which provides greater performance and scalabitlity. + + + + +## .provideDataKey() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.provideDataKey**( *curPassPhrase* : Text ) : Object
      **.provideDataKey**( *curDataKey* : Object ) : Object + +| Paramètres | Type | | Description | +| ------------- | ----- | -- | ------------------------------------- | +| curPassPhrase | Texte | -> | Current encryption passphrase | +| curDataKey | Objet | -> | Current data encryption key | +| Résultat | Objet | <- | Result of the encryption key matching | + + +#### Description + +The `.provideDataKey()` function allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data. This function can be used when opening an encrypted database, or when executing any encryption operation that requires the encryption key, such as re-encrypting the data file. +> * The `.provideDataKey()` function must be called in an encrypted database. If it is called in a non-encrypted database, the error 2003 (the encryption key does not match the data.) is returned. Use the `Data file encryption status` command to determine if the database is encrypted. +> * The `.provideDataKey()` function cannot be called from a remote 4D or an encrypted remote datastore. + +If you use the *curPassPhrase* parameter, pass the string used to generate the data encryption key. When you use this parameter, an encryption key is generated. + +If you use the *curDataKey* parameter, pass an object (with *encodedKey* property) that contains the data encryption key. This key may have been generated with the `New data key` command. + +If a valid data encryption key is provided, it is added to the *keyChain* in memory and the encryption mode is enabled: + +* all data modifications in encryptable tables are encrypted on disk (.4DD, .journal. 4Dindx files) +* all data loaded from encryptable tables is decrypted in memory + + +**Résultat** + +The result of the command is described in the returned object: + +| Propriété | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------- | +| success | | Booléen | True if the provided encryption key matches the encrypted data, False otherwise | +| | | | Properties below are returned only if success is *FALSE* | +| status | | Nombre | Error code (4 if the provided encryption key is wrong) | +| statusText | | Texte | Error message | +| errors | | Collection | Stack of errors. The first error has the highest index | +| | \[ ].componentSignature | Texte | Internal component name | +| | \[ ].errCode | Nombre | Error number | +| | \[ ].message | Texte | Error message | + +If no *curPassphrase* or *curDataKey* is given, `.provideDataKey()` returns **null** (no error is generated). + + + +#### Exemple + +```4d + var $keyStatus : Object + var $passphrase : Text + + $passphrase:=Request("Enter the passphrase") + If(OK=1) + $keyStatus:=ds.provideDataKey($passphrase) + If($keyStatus.success) + ALERT("You have provided a valid encryption key") + Else + ALERT("You have provided an invalid encryption key, you will not be able to work with encrypted data") + End if + End if +``` + + + + +## .setAdminProtection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.setAdminProtection**( *status* : Boolean ) + +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ---------------------------------------------------------------------------------------------------- | +| status | Booléen | -> | True to disable Data Explorer access to data on the `webAdmin` port, False (default) to grant access | + + +#### Description + +The `.setAdminProtection()` function allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions. + +By default when the function is not called, access to data is always granted on the web administration port for a session with `WebAdmin` privilege using the Data Explorer. In some configurations, for example when the application server is hosted on a third-party machine, you might not want the administrator to be able to view your data, although they can edit the server configuration, including the [access key](Admin/webAdmin.md#access-key) settings. + +In this case, you can call this function to disable the data access from Data Explorer on the web admin port of the machine, even if the user session has the `WebAdmin` privilege. When this function is executed, the data file is immediately protected and the status is stored on disk: the data file will be protected even if the application is restarted. + + +#### Exemple + +You create a *protectDataFile* project method to call before deployments for example: + +```4d + ds.setAdminProtection(True) //Disables the Data Explorer data access +``` + +#### Voir également + +[`.isAdminProtected()`](#isadminprotected) + + + +## .startRequestLog() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R6 | Ajoutées | +
      + +**.startRequestLog**()
      **.startRequestLog**( *file* : 4D.File )
      **.startRequestLog**( *reqNum* : Integer ) + +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ------------------------------------ | +| file | 4D.File | -> | File object | +| reqNum | Entier long | -> | Number of requests to keep in memory | + + +#### Description + +The `.startRequestLog()` function starts the logging of ORDA requests on the client side. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + +The ORDA request log can be sent to a file or to memory, depending on the parameter type: + +* If you passed a *file* object created with the `File` command, the log data is written in this file as a collection of objects (JSON format). Each object represents a request.
      If the file does not already exist, it is created. Otherwise if the file already exists, the new log data is appended to it. If `.startRequestLog( )` is called with a file while a logging was previously started in memory, the memory log is stopped and emptied. +> A \] character must be manually appended at the end of the file to perform a JSON validation + +* If you passed a *reqNum* integer, the log in memory is emptied (if any) and a new log is initialized. It will keep *reqNum* requests in memory until the number is reached, in which case the oldest entries are emptied (FIFO stack).
      If `.startRequestLog()` is called with a *reqNum* while a logging was previously started in a file, the file logging is stopped. + +* If you did not pass any parameter, the log is started in memory. If `.startRequestLog()` was previously called with a *reqNum* (before a `.stopRequestLog()`), the log data is stacked in memory until the next time the log is emptied or `.stopRequestLog()` is called. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + +#### Exemple 1 + +You want to log ORDA client requests in a file and use the log sequence number: + +```4d + var $file : 4D.File + var $e : cs.PersonsEntity + + $file:=File("/LOGS/ORDARequests.txt") //logs folder + + SET DATABASE PARAMETER(Client Log Recording;1) //to trigger the global log sequence number + ds.startRequestLog($file) + $e:=ds.Persons.get(30001) //send a request + ds.stopRequestLog() + SET DATABASE PARAMETER(Client Log Recording;0) +``` + +#### Exemple 2 + +You want to log ORDA client requests in memory: + +```4d + var $es : cs.PersonsSelection + var $log : Collection + + ds.startRequestLog(3) //keep 3 requests in memory + + $es:=ds.Persons.query("name=:1";"Marie") + $es:=ds.Persons.query("name IN :1";New collection("Marie")) + $es:=ds.Persons.query("name=:1";"So@") + + $log:=ds.getRequestLog() + ALERT("The longest request lasted: "+String($log.max("duration"))+" ms") +``` + + + + + +## .startTransaction() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**.startTransaction()** +| Paramètres | Type | | Description | +| ---------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.startTransaction()` function starts a transaction in the current process on the database matching the datastore to which it applies. Any changes made to the datastore's entities in the transaction's process are temporarily stored until the transaction is either validated or cancelled. +> If this method is called on the main datastore (i.e. the datastore returned by the `ds` command), the transaction is applied to all operations performed on the main datastore and on the underlying database, thus including ORDA and classic languages. + +You can nest several transactions (sub-transactions). Each transaction or sub-transaction must eventually be cancelled or validated. Note that if the main transaction is cancelled, all of its sub-transactions are also cancelled even if they were validated individually using the `.validateTransaction()` function. + + +#### Exemple + + +```4d + var $connect; $status : Object + var $person : cs.PersonsEntity + var $ds : cs.DataStore + var $choice : Text + var $error : Boolean + + Case of + :($choice="local") + $ds:=ds + :($choice="remote") + $connect:=New object("hostname";"111.222.3.4:8044") + $ds:=Open datastore($connect;"myRemoteDS") + End case + + $ds.startTransaction() + $person:=$ds.Persons.query("lastname=:1";"Peters").first() + + If($person#Null) + $person.lastname:="Smith" + $status:=$person.save() + End if + ... + ... + If($error) + $ds.cancelTransaction() + Else + $ds.validateTransaction() + End if +``` + + + + + + + +## .stopRequestLog() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R6 | Ajoutées | +
      + +**.stopRequestLog()** +| Paramètres | Type | | Description | +| ---------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.stopRequestLog()` function stops any logging of ORDA requests on the client side (in file or in memory). It is particularly useful when logging in a file, since it actually closes the opened document on disk. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + + +#### Exemple + +See examples for [`.startRequestLog()`](#startrequestlog). + + + + + +## .validateTransaction() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**.validateTransaction()** +| Paramètres | Type | | Description | +| ---------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.validateTransaction()` function accepts the transaction that was started with [`.startTransaction()`](#starttransaction) at the corresponding level on the specified datastore. + +The function saves the changes to the data on the datastore that occurred during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using this function. + + +#### Exemple + +See example for [`.startTransaction()`](#starttransaction). + + + diff --git a/website/translated_docs/fr/API/Directory.md b/website/translated_docs/fr/API/Directory.md new file mode 100644 index 00000000000000..851cff4a77b810 --- /dev/null +++ b/website/translated_docs/fr/API/Directory.md @@ -0,0 +1,599 @@ +--- +id: Directory +title: Classe Directory +--- + +## Description + + +## .creationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the folder. + +Cette propriété est en **lecture seule**. + + +--- + + ## .creationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationTime** : Time + + +#### Description + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + +--- + + +## .exists + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +Cette propriété est en **lecture seule**. + + + +--- + + +## .extension + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.extension** : Text + +#### Description + +The `.extension` property returns the extension of the folder name (if any). Une extension commence toujours par ".". La propriété retourne une chaîne vide si le nom du dossier n'a pas d'extension. + +Cette propriété est en **lecture seule**. + + + +--- + +## .fullName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.fullName** : Text + +#### Description + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +Cette propriété est en **lecture seule**. + + + +--- + +## .hidden + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +Cette propriété est en **lecture seule**. + + +--- + + +## .isAlias + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isAlias** : Boolean + + +#### Description + +The `.isAlias` property returns always **false** for a `Folder` object. + +Cette propriété est en **lecture seule**. + + +--- + +## .isFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always **false** for a folder. + +Cette propriété est en **lecture seule**. + + +--- + +## .isFolder + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always **true** for a folder. + +Cette propriété est en **lecture seule**. + + +--- + +## .isPackage + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isPackage** : Boolean + +#### Description + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Sinon, elle retourne false. + +Sous Windows, `.isPackage` retourne toujours **false**. + +Cette propriété est en **lecture seule**. + + + +--- + +## .modificationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the folder's last modification. + +Cette propriété est en **lecture seule**. + + + +--- + +## .modificationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationTime** : Time + +#### Description + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + +--- + +## .name + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the folder, without extension (if any). + +Cette propriété est en **lecture seule**. + + +--- + +## .original + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.original** : 4D.Folder + +#### Description + +The `.original` property returns the same Folder object as the folder. + +Cette propriété est en **lecture seule**. +> This property is available on folders to allow generic code to process folders or files. + + +--- + + +## .parent + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +Cette propriété est en **lecture seule**. + + + +--- + +## .path + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +Cette propriété est en **lecture seule**. + + +--- + +## .platformPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +Cette propriété est en **lecture seule**. + + + +--- + + + + + +## .copyTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Paramètres | Type | | Description | +| ----------------- | ----------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Name for the copy | +| overwrite | Entier long | -> | `fk overwrite` to replace existing elements | +| Résultat | 4D.Folder | <- | Copied file or folder | + + +#### Description + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valeur | Commentaire | +| -------------- | ------ | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Valeur retournée** + +The copied `Folder` object. + +#### Exemple + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + +--- + + +## .file() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.file**( *path* : Text ) : 4D.File +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ------------------------------------ | +| path | Texte | -> | Relative POSIX file pathname | +| Résultat | 4D.File | <- | `File` object (null if invalid path) | + +#### Description + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Valeur retournée** + +A `File` object or null if *path* is invalid. + +#### Exemple + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + +--- + +## .files() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.files**( { *options* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ----------------------------------- | +| options | Entier long | -> | File list options | +| Résultat | Collection | <- | Collection of children file objects | + +#### Description + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valeur | Commentaire | +| --------------------- | ------ | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Valeur retournée** + +Collection of `File` objects. + +#### Exemple 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Exemple 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + +--- + +## .folder() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.folder**( *path* : Text ) : 4D.Folder +| Paramètres | Type | | Description | +| ---------- | --------- | -- | ---------------------------------------------- | +| path | Texte | -> | Relative POSIX file pathname | +| Résultat | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Description + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Valeur retournée** + +A `Folder` object or null if *path* is invalid. + +#### Exemple + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + +--- + +## .folders() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.folders**( { *options* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ------------------------------------- | +| options | Entier long | -> | Folder list options | +| Résultat | Collection | <- | Collection of children folder objects | + +#### Description + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valeur | Commentaire | +| --------------------- | ------ | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Valeur retournée** + +Collection of `Folder` objects. + +#### Exemple + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + +--- + +## .getIcon() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getIcon**( { *size* : Integer } ) : Picture +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | --------------------------------------------- | +| size | Entier long | -> | Side length for the returned picture (pixels) | +| Résultat | Image | <- | Icône | + + +#### Description + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Valeur retournée** + +Folder icon [picture](Concepts/dt_picture.md). + + + + diff --git a/website/translated_docs/fr/API/Document.md b/website/translated_docs/fr/API/Document.md new file mode 100644 index 00000000000000..9091bd03769bce --- /dev/null +++ b/website/translated_docs/fr/API/Document.md @@ -0,0 +1,578 @@ +--- +id: Document +title: Document Class +--- + +## Description + + +## .creationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the file. + +Cette propriété est en **lecture seule**. + + + + ## .creationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationTime** : Time + +#### Description + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + + +## .exists + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + + + +## .extension + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.extension** : Text +#### Description + +The `.extension` property returns the extension of the file name (if any). Une extension commence toujours par ".". The property returns an empty string if the file name does not have an extension. + +Cette propriété est en **lecture seule**. + + + + + + +## .fullName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.fullName** : Text +#### Description + +The `.fullName` property returns the full name of the file, including its extension (if any). + +Cette propriété est en **lecture seule**. + + + + + +## .hidden + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + +## .isAlias + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isAlias** : Boolean + +#### Description + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + +## .isFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always true for a file. + +Cette propriété est en **lecture seule**. + + + + +## .isFolder + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always false for a file. + +Cette propriété est en **lecture seule**. + + + + + +## .isWritable + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isWritable** : Boolean + +#### Description + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +Cette propriété est en **lecture seule**. + +**Exemple** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + +## .modificationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the file's last modification. + +Cette propriété est en **lecture seule**. + + + + + +## .modificationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationTime** : Time + +##### Description + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + +## .name + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.name** : Text + +#### Description + +The `.name` property returns the name of the file without extension (if any). + +Cette propriété est en **lecture seule**. + + + +## .original + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.original** : 4D.File
      **.original** : 4D.Folder + +#### Description + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +Cette propriété est en **lecture seule**. + + + + + +## .parent + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +Cette propriété est en **lecture seule**. + + + + + +## .path + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +Cette propriété est en **lecture seule**. + + + + +## .platformPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +Cette propriété est en **lecture seule**. + + + + + +## .size + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.size** : Real + +#### Description + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +Cette propriété est en **lecture seule**. + + + + + + + + + + + +## .copyTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Paramètres | Type | | Description | +| ----------------- | ----------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Name for the copy | +| overwrite | Entier long | -> | `fk overwrite` to replace existing elements | +| Résultat | 4D.File | <- | Copied file | + + +#### Description + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valeur | Commentaire | +| -------------- | ------ | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Valeur retournée** + +The copied `File` object. + +#### Exemple + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + +## .getContent() + +
      Historique +| Version | Modifications | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Ajoutées | +
      + +**.getContent( )** : 4D.Blob +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ------------ | +| Résultat | 4D.Blob | <- | File content | + + +#### Description + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Valeur retournée** + +A `4D.Blob` object. + +#### Exemple + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + +## .getIcon() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getIcon**( { *size* : Integer } ) : Picture +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | --------------------------------------------- | +| size | Entier long | -> | Side length for the returned picture (pixels) | +| Résultat | Image | <- | Icône | + + +#### Description + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Valeur retournée** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
      **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Paramètres | Type | | Description | +| ----------- | ----------- | -- | ------------------------------- | +| charSetName | Texte | -> | Name of character set | +| charSetNum | Entier long | -> | Number of character set | +| breakMode | Entier long | -> | Processing mode for line breaks | +| Résultat | Texte | <- | Text from the document | + + +#### Description +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Valeur | Commentaire | +| ----------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Valeur retournée** + +Text of the file. + +#### Exemple + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + diff --git a/website/translated_docs/fr/API/EmailObjectClass.md b/website/translated_docs/fr/API/EmailObjectClass.md new file mode 100644 index 00000000000000..323a537c206550 --- /dev/null +++ b/website/translated_docs/fr/API/EmailObjectClass.md @@ -0,0 +1,611 @@ +--- +id: EmailObjectClass +title: Email +--- + +Creating, sending or receiving emails in 4D is done by handling an `Email` object. + +`Email` objects are created when receiving mails through a *transporter* class function: + +- IMAP - [`.getMail()`](IMAPTransporterClass.md#getmail) and [`.getMails()`](IMAPTransporterClass.md#getmails) functions to get emails from an IMAP server +- POP3 - [`.getMail()`](POP3TransporterClass.md#getmail) function to get an email from a POP3 server. + +> You can also create a new, blank `Email` object by calling the [`New object`](https://doc.4d.com/4dv18/help/command/en/page1471.html) 4D command, and then fill it with [Email object properties](#email-object). + +You send `Email` objects using the SMTP [`.send()`](SMTPTransporterClass.md#send) function. + +[`MAIL Convert from MIME`](#mail-convert-from-mime) and [`MAIL Convert to MIME`](#mail-convert-to-mime) commands can be used to convert `Email` objects to and from MIME contents. + + +### Email Object + +Email objects provide the following properties: + +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the Email object. + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.attachments** : Collection](#attachments)

          collection of `4D.MailAttachment` object(s) | +| [**.bcc** : Text
      **.bcc** : Object
      **.bcc** : Collection](#bcc)

          Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email | +| [**.bodyStructure** : Object](#bodystructure)

          *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional) | +| [**.bodyValues** : Object](#bodyvalues)

          *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional) | +| [**.cc** : Text
      **.cc** : Object
      **.cc** : Collection](#cc)

          Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email | +| [**.comments** : Text](#comments)

          additional comments header | +| [**.from** : Text
      **.from** : Object
      **.from** : Collection](#from)

          Originating [address(es)](#email-addresses) of the email | +| [**.headers** : Collection](#headers)

          collection of `EmailHeader` objects, in the order they appear in the message | +| [**.htmlBody** : Text](#htmlbody)

          HTML representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.id** : Text](#id)

          unique ID from the IMAP server | +| [**.inReplyTo** : Text](#inreplyto)

          message identifier(s) of the original message(s) to which the current message is a reply | +| [**.keywords** : Object](#keywords)

          set of keywords as an object, where each property name is a keyword and each value is true | +| [**.messageId** : Texte](#messageid)

          message identifier header ("message-id") | +| [**.receivedAt** : Texte](#receivedat)

          timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z) | +| [**.references** : Collection](#references)

          Collection of all message-ids of messages in the preceding reply chain | +| [**.replyTo** : Texte
      **.replyTo** : Objet
      **.replyTo** : Collection](#replyto)

          [addresse(s)](#email-addresses) for responses | +| [**.sendAt** : Texte](#sendat)

          Email timestamp in ISO 8601 UTC format | +| [**.sender** : Texte
      **.sender** : Objet
      **.sender** : Collection](#sender)

          email source [addresse(s)](#email-addresses) of the email | +| [**.size** : Integer](#size)

          size (expressed in bytes) of the Email object returned by the IMAP server | +| [**.subject** : Texte](#subject)

          description of topic | +| [**.textBody** : Texte](#textbody)

          Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.to** : Texte
      **.to** : Objet
      **.to** : Collection](#to)

          primary recipient [addresse(s)](#email-addresses) of the email | + + +### Email Addresses + +All properties that contain email addresses ([`from`](#from), [`cc`](#cc), [`bcc`](#bcc), [`to`](#to), [`sender`](#sender), [`replyTo`](#replyto)) accept a value of text, object, or collection type. + +#### Texte + +- single email: "somebody@domain.com" +- single display name+email: "Somebody " +- several emails: "Somebody ,me@home.org" + +#### Objet + +An object with two properties: + +| Propriété | Type | Description | +| --------- | ---- | -------------------------- | +| name | Text | Display name (can be null) | +| email | Text | Email address | + +#### Collection + +A collection of address objects. + +### Handling body part + +The [`textBody`](#textbody) and [`htmlBody`](#htmlbody) properties are only used with the [SMTP.send()](SMTPTransporterClass.md#send) function to allow sending simple mails. When both property are filled, the MIME content-type multipart/alternative is used. The email client should then recognize the multipart/alternative part and display the text part or html part as necessary. + +[`bodyStructure`](#bodystructure) and [`bodyValues`](#bodyvalues) are used for [SMTP](SMTPTransporterClass.md) when the [Email object](email-object) is built from a MIME document, e.g. when generated by the `MAIL Convert from MIME` command. In this case, both `bodyStructure` and `bodyValues` properties must be passed together, and it is not recommended to use `textBody` and `htmlBody`. + +#### Example of bodyStructure and bodyValues objects + +```json +"bodyStructure": { + "type": "multipart/mixed", + "subParts": [ + { + "partId": "p0001", + "type": "text/plain" + }, + { + "partId": "p0002", + "type": "text/html" + } + ] +}, +"bodyValues": { + "p0001": { + "value": "I have the most brilliant plan. Let me tell you all about it." + }, + "p0002": { + "value": "

      I have the most brilliant plan. Let me tell you all about it.
      " + } +} +``` + + + + + + +## .attachments + +**.attachments** : Collection + +#### Description + + + +The `.attachments` property contains a collection of `4D.MailAttachment` object(s). + +Attachment objects are defined through the [`MAIL New attachment`](MailAttachmentClass.md#mail-new-attachment) command. Attachment objects have specific [properties and functions](MailAttachmentClass.md). + + + + +## .bcc + +**.bcc** : Text
      **.bcc** : Object
      **.bcc** : Collection + +#### Description + +The `.bcc` property contains the Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email. + + + + +## .bodyStructure + +**.bodyStructure** : Object + +#### Description + +The `.bodyStructure` property contains the *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyStructure` object contains the following properties: + +| Propriété | Type | Valeur | +| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| partID | Text | Identifies the part uniquely within the email | +| type | Text | (mandatory) Value of the Content-Type header field of the part | +| charset | Text | Value of the charset parameter of the Content-Type header field | +| encoding | Text | If `isEncodingProblem=true`, the Content-Transfer-Encoding value is added (by default undefined) | +| disposition | Text | Value of the Content-Disposition header field of the part | +| language | Collection of texts | List of language tags, as defined in [RFC3282](https://tools.ietf.org/html/rfc3282), in the Content-Language header field of the part, if present. | +| location | Text | URI, as defined in [RFC2557](https://tools.ietf.org/html/rfc2557), in the Content-Location header field of the part, if present. | +| subParts | Collection of objects | Body parts of each child (collection of *EmailBodyPart* objects) | +| headers | Collection of objects | List of all header fields in the part, in the order they appear in the message (collection of *EmailHeader* objects, see [headers](#headers-) property) | + + + + +## .bodyValues + +**.bodyValues** : Object + +#### Description + +The `.bodyValues` property contains the *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyValues` object contains the following properties: + +| Propriété | Type | Valeur | +| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| *partID*.value | text | Value of the body part | +| *partID*.isEncodingProblem | boolean | True if malformed sections are found while decoding the charset, or unknown charset, or unknown content transfer-encoding. False by default | + + + + +## .cc + +**.cc** : Text
      **.cc** : Object
      **.cc** : Collection + +#### Description + +The `.cc` property contains the Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email. + + + + + + +## .comments + +**.comments** : Text + +#### Description + +The `.comments` property contains an additional comments header. + +Comments only appear within the header section of the message (keeping the message's body untouched). + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .from + +**.from** : Text
      **.from** : Object
      **.from** : Collection + +#### Description + +The `.from` property contains the Originating [address(es)](#email-addresses) of the email. + + +Each email you send out has both the [sender](#sender) and **from** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .headers + +**.headers** : Collection + +#### Description + +The `.headers` property contains a collection of `EmailHeader` objects, in the order they appear in the message. This property allows users to add extended (registered) headers or user-defined (not registered, starting with "X") headers. + +> If an `EmailHeader` object property defines a header such as "from" or "cc" which is already set as a property at the mail level, the `EmailHeader` property is ignored. + +Every object of the headers collection can contain the following properties: + +| Propriété | Type | Valeur | +| --------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [].name | text | (mandatory) Header field name as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322). If null or undefined, the header field is not added to the MIME header. | +| [].value | text | Header field values as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322) | + + + + + + + +## .htmlBody + +**.htmlBody** : Text + +#### Description + +The `.htmlBody` property contains the HTML representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + + + + + +## .id + +**.id** : Text + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.id` property contains the unique ID from the IMAP server. + + + + + + +## .inReplyTo + +**.inReplyTo** : Text + +#### Description + +The `.inReplyTo` property contains the message identifier(s) of the original message(s) to which the current message is a reply. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + + + +## .keywords + +**.keywords** : Object + +#### Description + +The `.keywords` property contains a set of keywords as an object, where each property name is a keyword and each value is true. + +This property is the "keywords" header (see [RFC#4021](https://tools.ietf.org/html/rfc4021)). + +| Propriété | Type | Valeur | +| --------------- | ------- | ----------------------------------- | +| . \ | boolean | Keyword to set (value must be true) | + +Reserved keywords: +* $draft - Indicates a message is a draft +* $seen - Indicates a message has been read +* $flagged - Indicates a message needs special attention (e.g., Urgent) +* $answered - Indicates a message has been replied to +* $deleted - Indicates a message to delete + +#### Exemple + +``` + $mail.keywords["$flagged"]:=True + $mail.keywords["4d"]:=True +``` + + + + +## .messageId + +**.messageId** : Texte + +#### Description + +The `.messageId` property contains a message identifier header ("message-id"). + +Cet en-tête est généralement "desChiffresOuDesLettres@nomdededomaine", par exemple "abcdef.123456@4d.com". Cet identifiant unique est notamment utilisé sur les forums ou les listes de diffusion publiques. En général, les serveurs de messagerie ajoutent automatiquement cet en-tête aux messages qu'ils envoient. + + + +## .receivedAt + +**.receivedAt** : Texte + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.receivedAt` property contains the timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z). + + + + + + +## .references + +**.references** : Collection + +#### Description + +The `.references` property contains the Collection of all message-ids of messages in the preceding reply chain. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .replyTo + +**.replyTo** : Texte
      **.replyTo** : Objet
      **.replyTo** : Collection + +#### Description + +The `.replyTo` property contains the [addresse(s)](#email-addresses) for responses. + + + + + +## .sendAt + +**.sendAt** : Texte + +#### Description + +The `.sendAt` property contains the Email timestamp in ISO 8601 UTC format. + + + + +## .sender + +**.sender** : Texte
      **.sender** : Objet
      **.sender** : Collection + +#### Description + +The `.sender` property contains the email source [addresse(s)](#email-addresses) of the email. + + +Each email you send out has both the **sender** and **[from](#from)** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .size + +**.size** : Integer + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.size` property contains the size (expressed in bytes) of the Email object returned by the IMAP server. + + + + +## .subject + +**.subject** : Texte + +#### Description + +The `.subject` property contains the description of topic. + + + + + +## .textBody + +**.textBody** : Texte + +#### Description + +The `.textBody` property contains the Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + +## .to + +**.to** : Texte
      **.to** : Objet
      **.to** : Collection + +#### Description + +The `.to` property contains the primary recipient [addresse(s)](#email-addresses) of the email. + + +## MAIL Convert from MIME + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**MAIL Convert from MIME**( *mime* : Blob ) : Object
      **MAIL Convert from MIME**( *mime* : Text ) : Object +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------- | +| mime | Blob, Text | -> | Email in MIME | +| Résultat | Objet | <- | Email object | + +#### Description + +The `MAIL Convert from MIME` command converts a MIME document into a valid email object. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the returned email object. + +Pass in *mime* a valid MIME document to convert. It can be provided by any mail server or application. You can pass a BLOB or a text *mime* parameter. If the MIME comes from a file, it is recommended to use a BLOB parameter to avoid issues related to charset and line break conversions. + +#### Returned object + +Email object. + +#### Exemple 1 + +You want to load a mail template saved as MIME in a text document and send an email: + +```4d +C_BLOB($mime) +C_OBJECT($mail;$server;$transporter;$status) + +$mime:=File("/PACKAGE/Mails/templateMail.txt").getContent()) + +$mail:=[#current_title_incode]($mime) +$mail.to:="smith@mail.com" +$mail.subject:="Hello world" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="test@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($mail) +``` + +#### Exemple 2 + +In this example, you send directly a 4D Write Pro document containing pictures: + +```4d +C_TEXT($mime) +C_OBJECT($email;$server;$transporter;$status) + +// Mime export of the 4D Write Pro document +WP EXPORT VARIABLE(WParea;$mime;wk mime html) + +// convert 4D Write Pro Mime variable in mail object +$email:=MAIL Convert from MIME($mime) + +// Fill your mail object headers +$email.subject:="4D Write Pro HTML body" +$email.from:="YourEmail@gmail.com" +$email.to:="RecipientEmail@mail.com" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="YourEmail@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($email) +``` + + + + + +## MAIL Convert to MIME + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +| v17 R5 | Modified | +
      + +**MAIL Convert to MIME**( *mail* : Object { ; *options* : Object } ) : Text +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| --------------------------------- | +| mail | Objet | -> | Email object | +| options | Objet | -> | Charset and encoding mail options | +| Résultat | Texte | <- | Email object converted to MIME | + +#### Description + +The `MAIL Convert to MIME` command converts an email object into MIME text. This command is called internally by [SMTP_transporter.send( )](API/SMTPTransporterClass.md#send) to format the email object before sending it. It can be used to analyze the MIME format of the object. + +In *mail*, pass the content and the structure details of the email to convert. This includes information such as the email addresses (sender and recipient(s)), the message itself, and the type of display for the message. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the email object. + +In *options*, you can set a specific charset and encoding configuration for the mail. The following properties are available: + +| Propriété | Type | Description | +| ------------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| headerCharset | Text | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Valeurs possibles :

      ConstantValeurCommentaire
      mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
      • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      mail mode ISO88591ISO-8859-1
      • headerCharset: ISO-8859-1 & Quoted-printable
      • bodyCharset: ISO-8859-1 & 8-bit
      mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)
      mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64
      | +| bodyCharset | Text | Charset and encoding used for the html and text body contents of the email. Possible values: Same as for headerCharset (see above) | + +If the *options* parameter is omitted, the mail mode UTF8 configuration is used for header and body parts. + + +#### Exemple + +```4d +C_OBJECT($mail) +C_TEXT($mime) +$mail:=New object + +// Creation of a mail +$mail.from:="tsales@massmarket.com" +$mail.subject:="Terrific Sale! This week only!" +$mail.textBody:="Text format email" +$mail.htmlBody:="HTML format email" +$mail.to:=New collection +$mail.to.push(New object ("email";"noreply@4d.com")) +$mail.to.push(New object ("email";"test@4d.com")) + +// transform the mail object in MIME +$mime:=[#current_title_incode]($mail) + +// Contents of $mime: +// MIME-Version: 1.0 +// Date: Thu, 11 Oct 2018 15:42:25 GMT +// Message-ID: <7CA5D25B2B5E0047A36F2E8CB30362E2> +// Sender: tsales@massmarket.com +// From: tsales@massmarket.com +// To: noreply@4d.com +// To: test@4d.com +// Content-Type: multipart/alternative; boundary="E0AE5773D5E95245BBBD80DD0687E218" +// Subject: Terrific Sale! This week only! +// +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/plain; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// Text format email +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/html; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// HTML format email +// --E0AE5773D5E95245BBBD80DD0687E218-- +``` + + + diff --git a/website/translated_docs/fr/API/EntityClass.md b/website/translated_docs/fr/API/EntityClass.md new file mode 100644 index 00000000000000..ca076dd5e8ad80 --- /dev/null +++ b/website/translated_docs/fr/API/EntityClass.md @@ -0,0 +1,1618 @@ +--- +id: EntityClass +title: Entity +--- + +An [entity](ORDA/dsMapping.md#entity) is an instance of a [Dataclass](ORDA/dsMapping.md#dataclass), like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions. + + +### Sommaire + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : any](#attributename)

          stores the attribute value for the entity | +| [**.clone()** : 4D.Entity](#clone)

          creates in memory a new entity referencing the same record as the original entity | +| [**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection](#diff)

          compares the contents of two entities and returns their differences | +| [**.drop**( {*mode* : Integer} ) : Object](#drop)

          deletes the data contained in the entity from the datastore | +| [**.first()**: 4D.Entity](#first)

          returns a reference to the entity in first position of the entity selection which the entity belongs to | +| [**.fromObject**( *filler* : Object )](#fromobject)

          fills an entity with the *filler* content | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

          returns the dataclass of the entity | +| [**.getKey**( { *mode* : Integer } ) : Text
      **.getKey**( { *mode* : Integer } ) : Integer](#getkey)

          returns the primary key value of the entity | +| [**.getSelection()**: 4D.EntitySelection](#getselection)

          returns the entity selection which the entity belongs to | +| [**.getStamp()** : Integer](#getstamp)

           returns the current value of the stamp of the entity | +| [**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer](#indexof)

          returns the position of the entity in an entity selection | +| [**.isNew()** : Boolean](#isnew)

           returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore | +| [**.last()** : 4D.Entity](#last)

          returns a reference to the entity in last position of the entity selection which the entity belongs to | +| [**.lock**( { *mode* : Integer } ) : Object](#lock)

          puts a pessimistic lock on the record referenced by the entity | +| [**.next()** : 4D.Entity](#next)

          returns a reference to the next entity in the entity selection which the entity belongs to | +| [**.previous()** : 4D.Entity](#previous)

           returns a reference to the previous entity in the entity selection which the entity belongs to | +| [**.reload()** : Object](#reload)

          reloads the content of the entity in memory | +| [**.save**( { *mode* : Integer } ) : Object](#save)

          saves the changes made to the entity | +| [**.toObject**() : Object
      **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
      **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object](#toobject)

          returns an object which has been built from the entity | +| [**.touched()** : Boolean](#touched)

          tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved | +| [**.touchedAttributes()** : Collection](#touchedattributes)

          returns the names of the attributes that have been modified since the entity was loaded into memory | +| [**.unlock()** : Object](#unlock)

          removes the pessimistic lock on the record matching the entity | + + + + + + +## .*attributeName* + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +***.attributeName*** : any + +#### Description + +Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity. +> Dataclass attributes can also be reached using the alternate syntax with \[ ]. + +The attribute value type depends on the attribute [kind](DataClassAttributeClass.md#kind) (relation or storage): + +* If *attributeName* kind is **storage**: `.attributeName` returns a value of the same type as *attributeName*. +* If *attributeName* kind is **relatedEntity**: `.attributeName` returns the related entity. Values of the related entity are directly available through cascading properties, for example "myEntity.employer.employees\[0].lastname". +* If *attributeName* kind is **relatedEntities**: `.attributeName` returns a new entity selection of related entities. Duplications are removed (an unordered entity selection is returned). + + +#### Exemple + +```4d + var $myEntity : cs.EmployeeEntity + $myEntity:=ds.Employee.new() //Create a new entity + $myEntity.name:="Dupont" // assign 'Dupont' to the 'name' attribute + $myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute + $myEntity.save() //save the entity +``` + + + + + +## .clone() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + + +**.clone()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| --------------------------------- | +| Résultat | 4D.Entity | <- | New entity referencing the record | + + +#### Description + +The `.clone()` function creates in memory a new entity referencing the same record as the original entity. This function allows you to update entities separately. +> Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save( )`](#save) function is executed. + +This function can only be used with entities already saved in the database. It cannot be called on a newly created entity (for which [`.isNew()`](#isnew) returns **True**). + + +#### Exemple + +```4d + var $emp; $empCloned : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $empCloned:=$emp.clone() + + $emp.lastName:="Smith" //Updates done on $emp are not done on $empCloned + +``` + + + + + + +## .diff() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection + +| Paramètres | Type | | Description | +| ------------------- | ---------- |:--:| ---------------------------------------------- | +| entityToCompare | 4D.Entity | -> | Entity to be compared with the original entity | +| attributesToCompare | Collection | -> | Name of attributes to be compared | +| Résultat | Collection | <- | Differences between the entities | + + +#### Description + +The `.diff()` function compares the contents of two entities and returns their differences. + +In *entityToCompare*, pass the entity to be compared to the original entity. + +In *attributesToCompare*, you can designate specific attributes to compare. If provided, the comparison is done only on the specified attributes. If not provided, all differences between the entities are returned. + +The differences are returned as a collection of objects whose properties are: + +| Nom de propriété | Type | Description | +| ---------------- | ------------------------------- | ------------------------------------------- | +| attributeName | Chaine | Name of the attribute | +| value | any - Depends on attribute type | Value of the attribute in the entity | +| otherValue | any - Depends on attribute type | Value of the attribute in *entityToCompare* | + +Only attributes with different values are included in the collection. If no differences are found, `.diff()` returns an empty collection. + +The function applies for properties whose [kind](DataClassAttributeClass.md#kind) is **storage** or **relatedEntity**. In case a related entity has been updated (meaning the foreign key), the name of the related entity and its primary key name are returned as *attributeName* properties (*value* and *otherValue* are empty for the related entity name). + +If one of the compared entities is **Null**, an error is raised. + +#### Exemple 1 + + +```4d + var $diff1; $diff2 : Collection + employee:=ds.Employee.query("ID=1001").first() + $clone:=employee.clone() + employee.firstName:="MARIE" + employee.lastName:="SOPHIE" + employee.salary:=500 + $diff1:=$clone.diff(employee) // All differences are returned + $diff2:=$clone.diff(employee;New collection"firstName";"lastName")) + // Only differences on firstName and lastName are returned +``` + +$diff1: + +```4d +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + }, + { + "attributeName": "salary", + "value": 66600, + "otherValue": 500 + } +] +$diff2: + +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + } +] +``` + +#### Exemple 2 + +```4d + var vCompareResult1; vCompareResult2; vCompareResult3; $attributesToInspect : Collection + vCompareResult1:=New collection + vCompareResult2:=New collection + vCompareResult3:=New collection + $attributesToInspect:=New collection + + $e1:=ds.Employee.get(636) + $e2:=ds.Employee.get(636) + + $e1.firstName:=$e1.firstName+" update" + $e1.lastName:=$e1.lastName+" update" + + $c:=ds.Company.get(117) + $e1.employer:=$c + $e2.salary:=100 + + $attributesToInspect.push("firstName") + $attributesToInspect.push("lastName") + + vCompareResult1:=$e1.diff($e2) + vCompareResult2:=$e1.diff($e2;$attributesToInspect) + vCompareResult3:=$e1.diff($e2;$e1.touchedAttributes()) +``` + +vCompareResult1 (all differences are returned): + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "salary", + "value": 33500, + "otherValue": 100 + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + } +] +``` + +vCompareResult2 (only differences on $attributesToInspect are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + } +] +``` + +vCompareResult3 (only differences on $e1 touched attributes are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + + } +] +``` + + + + + +## .drop() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.drop**( {*mode* : Integer} ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------------------------------------- | +| mode | Entier long | -> | `dk force drop if stamp changed`: Forces the drop even if the stamp has changed | +| Résultat | Objet | <- | Result of drop operation | + +#### Description + +The `.drop()` function deletes the data contained in the entity from the datastore, from the table related to its Dataclass. Note that the entity remains in memory. + +In a multi-user or multi-process application, the `.drop()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk force drop if stamp changed` option in the *mode* parameter: in this case, the entity is dropped even if the stamp has changed (and the primary key is still the same). + +**Résultat** + +The object returned by `.drop( )` contains the following properties: + +| Propriété | | Type | Description | +| ------------- | ------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | true if the drop action is successful, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(*) | | number | Error code, see below | +| statusText(*) | | Texte | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| LockKindText | | Texte | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | Texte | Session user name on the machine | +| | user4d_alias | Texte | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | Texte | Machine name | +| | task_name | Texte | Process name | +| | client_version | Texte | | +| | | | ***Available only in case of serious error (serious error can be trying to duplicate a primary key, disk full...):*** | +| errors | | collection d'objets | | +| | message | Texte | Error message | +| | component signature | Texte | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Valeur | Commentaire | +| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
    • the entity has been dropped (the stamp has changed and the memory space is now free)
    • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using entity.drop( ), this error can be returned when dk force drop if stamp changed option is used. When using entity.lock( ), this error can be returned when dk reload if stamp changed option is used
    • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.
      **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
      **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

    • with `.save( )`: error only if the `dk auto merge` option is not used
    • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
    • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used
    • **Associated statusText**: "Stamp has changed"
    • | + + +#### Exemple 1 + +Example without `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop() + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Exemple 2 + +Example with `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop(dk force drop if stamp changed) + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + +## .first() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.first()**: 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| -------------------------------------------------------------------- | +| Résultat | 4D.Entity | <- | Reference to first entity of an entity selection (Null if not found) | + +#### Description + +The `.first()` function returns a reference to the entity in first position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + +#### Exemple + +```4d + var $employees : cs.EmployeeSelection + var $employee; $firstEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[2] + $firstEmployee:=$employee.first() //$firstEmployee is the first entity of the $employees entity selection +``` + + + + +## .fromObject() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.fromObject**( *filler* : Object ) +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------ | +| filler | Objet | -> | Object from which to fill the entity | + +#### Description + +The `.fromObject()` function fills an entity with the *filler* content. +> This function modifies the original entity. + +The mapping between the object and the entity is done on the attribute names: + +* If a property of the object does not exist in the dataclass, it is ignored. +* Data types must be equivalent. If there is a type mismatch between the object and dataclass, 4D tries to convert the data whenever possible (see [`Converting data types`](Concepts/data-types.md#converting-data-types)), otherwise the attribute is left untouched. +* La clé primaire peut être donnée telle quelle ou avec une propriété "__KEY" (remplie avec la valeur de la clé primaire). Si elle n'existe pas déjà dans la dataclass, l'entité est créée avec la valeur donnée lorsque [.save()](#save) est appelé. Si la clé primaire n'est pas fournie, l'entité est créée et la valeur de la clé primaire est affectée en fonction des règles de la base de données. L'auto-incrémentation n'est calculée que si la clé primaire est nulle. + +*filler* can handle a related entity under the following conditions: + +* *filler* contains the foreign key itself, or +* *filler* contains a property object with the same name as the related entity, containing a single property named "\_\_KEY". +* if the related entity does not exist, it is ignored. + +#### Exemple + +With the following $o object: + +```4d +{ + "firstName": "Mary", + "lastName": "Smith", + "salary": 36500, + "birthDate": "1958-10-27T00:00:00.000Z", + "woman": true, + "managerID": 411,// relatedEntity given with PK + "employerID": 20 // relatedEntity given with PK +} +``` + + +The following code will create an entity with manager and employer related entities. + + +```4d + var $o : Object + var $entity : cs.EmpEntity + $entity:=ds.Emp.new() + $entity.fromObject($o) + $entity.save() +``` + + +You could also use a related entity given as an object: + +```4d + +{ + "firstName": "Marie", + "lastName": "Lechat", + "salary": 68400, + "birthDate": "1971-09-03T00:00:00.000Z", + "woman": false, + "employer": {// relatedEntity given as an object + "__KEY": "21" + }, + "manager": {// relatedEntity given as an object + "__KEY": "411" + } +} +``` + + + + + + +## .getDataClass() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | + +
      + +**.getDataClass()** : 4D.DataClass +| Paramètres | Type | | Description | +| ---------- | ------------ |:--:| -------------------------------------------- | +| Résultat | 4D.DataClass | <- | DataClass object to which the entity belongs | + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity. This function is useful when writing generic code. + + +#### Exemple + +The following generic code duplicates any entity: + +```4d + //duplicate_entity method + //duplicate_entity($entity) + + #DECLARE($entity : 4D.Entity) + var $entityNew : 4D.Entity + var $status : Object + + $entityNew:=$entity.getDataClass().new() //create a new entity in the parent dataclass + $entityNew.fromObject($entity.toObject()) //get all attributes + $entityNew[$entity.getDataClass().getInfo().primaryKey]:=Null //reset the primary key + $status:=$entityNew.save() //save the duplicated entity +``` + + + + + +## .getKey() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.getKey**( { *mode* : Integer } ) : Text
      **.getKey**( { *mode* : Integer } ) : Integer +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| --------------------------------------------------------------------------------------- | +| mode | Entier long | -> | `dk key as string`: primary key is returned as a string, no matter the primary key type | +| Résultat | Texte | <- | Value of the text primary key of the entity | +| Résultat | Entier long | <- | Value of the numeric primary key of the entity | + + +#### Description + +The `.getKey()` function returns the primary key value of the entity. + +Primary keys can be numbers (Integer) or strings. You can "force" the returned primary key value to be a string, no matter the actual primary key type, by passing the `dk key as string` option in the *mode* parameter. + +#### Exemple + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees[0] + ALERT("The primary key is "+$employee.getKey(dk key as string)) +``` + + + + + +## .getSelection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.getSelection()**: 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| ---------------------------------------------------------------- | +| Résultat | 4D.EntitySelection | <- | Entity selection to which the entity belongs (Null if not found) | + +#### Description + +The `.getSelection()` function returns the entity selection which the entity belongs to. + +If the entity does not belong to an entity selection, the function returns Null. + +#### Exemple + + +```4d + var $emp : cs.EmployeeEntity + var $employees; $employees2 : cs.EmployeeSelection + $emp:=ds.Employee.get(672) // This entity does not belong to any entity selection + $employees:=$emp.getSelection() // $employees is Null + + $employees2:=ds.Employee.query("lastName=:1";"Smith") //This entity selection contains 6 entities + $emp:=$employees2[0] // This entity belongs to an entity selection + + ALERT("The entity selection contains "+String($emp.getSelection().length)+" entities") +``` + + + + +## .getStamp() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.getStamp()** : Integer +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------------- | +| Résultat | Entier long | <- | Stamp of the entity (0 if entity has just been created) | + +#### Description + +The `.getStamp()` function returns the current value of the stamp of the entity. + +The internal stamp is automatically incremented by 4D each time the entity is saved. It manages concurrent user access and modifications to the same entities (see [**Entity locking**](ORDA/entities.md#entity-locking)). +> For a new entity (never saved), the function returns 0. To know if an entity has just been created, it is recommended to use [.isNew()](#isnew). + + +#### Exemple + + +```4d + var $entity : cs.EmployeeEntity + var $stamp : Integer + + $entity:=ds.Employee.new() + $entity.lastname:="Smith" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=1 + + $entity.lastname:="Wesson" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=2 +``` + + + + + +## .indexOf() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer +| Paramètres | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------ | +| entitySelection | 4D.EntitySelection | -> | Position of the entity is given according to this entity selection | +| Résultat | Entier long | <- | Position of the entity in an entity selection | + +#### Description + +The `.indexOf()` function returns the position of the entity in an entity selection. + +By default if the *entitySelection* parameter is omitted, the function returns the entity's position within its own entity selection. Otherwise, it returns the position of the entity within the specified *entitySelection*. + +The resulting value is included between 0 and the length of the entity selection -1. + +* If the entity does not have an entity selection or does not belong to *entitySelection*, the function returns -1. +* If *entitySelection* is Null or does not belong to the same dataclass as the entity, an error is raised. + +#### Exemple + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] //This entity belongs to an entity selection + ALERT("The index of the entity in its own entity selection is "+String($employee.indexOf())) //1 + + $employee:=ds.Employee.get(725) //This entity does not belong to an entity selection + ALERT("The index of the entity is "+String($employee.indexOf())) // -1 +``` + + + + + +## .isNew() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.isNew()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------------------------------- | +| Résultat | Booléen | <- | True if entity has just been created and not yet saved. Otherwise, False. | + +#### Description + +The `.isNew()` function returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore. Otherwise, it returns False. + + +#### Exemple + + +```4d + var $emp : cs.EmployeeEntity + + $emp:=ds.Employee.new() + + If($emp.isNew()) + ALERT("This is a new entity") + End if +``` + + + + +## .last() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.last()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| ------------------------------------------------------------------- | +| Résultat | 4D.Entity | <- | Reference to last entity of an entity selection (Null if not found) | + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + + +#### Exemple + + +```4d + var $employees : cs.EmployeeSelection + var $employee; $lastEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $lastEmployee:=$employee.last() //$lastEmployee is the last entity of the $employees entity selection +``` + + + + +## .lock() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.lock**( { *mode* : Integer } ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| -------------------------------------------------------------------- | +| mode | Entier long | -> | `dk reload if stamp changed`: Reload before locking if stamp changed | +| Résultat | Objet | <- | Result of lock operation | + +#### Description + +The `.lock()` function puts a pessimistic lock on the record referenced by the entity. The [lock is set](ORDA/entities.md#entity-locking) for a record and all the references of the entity in the current process. + +Other processes will see this record as locked (the `result.success` property will contain False if they try to lock the same entity using this function). Only functions executed in the "locking" session are allowed to edit and save the attributes of the entity. The entity can be loaded as read-only by other sessions, but they will not be able to enter and save values. + +A locked record is unlocked: + +* when the [`unlock()`](#unlock) function is called on a matching entity in the same process +* automatically, when it is no longer referenced by any entities in memory. For example, if the lock is put only on one local reference of an entity, the entity is unlocked when the function ends. As long as there are references to the entity in memory, the record remains locked. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk reload if stamp changed` option in the *mode* parameter: in this case, no error is returned and the entity is reloaded when the stamp has changed (if the entity still exists and the primary key is still the same). + +**Résultat** + +The object returned by `.lock( )` contains the following properties: + +| Propriété | | Type | Description | +| ---------------- | ------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | true if the lock action is successful (or if the entity is already locked in the current process), false otherwise. | +| | | | ***Available only if `dk reload if stamp changed` option is used:*** | +| **wasReloaded** | | boolean | true if the entity was reloaded with success, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(\*) | | number | Error code, see below | +| statusText(\*) | | Texte | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| lockKindText | | Texte | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process ID | +| | user_name | Texte | Session user name on the machine | +| | user4d_alias | Texte | Name or alias of the 4D user | +| | user4d_id | number | User id in the 4D database directory | +| | host_name | Texte | Machine name | +| | task_name | Texte | Process name | +| | client_version | Texte | | +| | | | ***Available only in case of serious error*** (primary key already exists, disk full...): | +| errors | | collection d'objets | | +| | message | Texte | Error message | +| | component signature | Texte | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + + +(\*) The following values can be returned in the *status* and *statusText* properties of the *Result* object in case of error: + +| Constant | Valeur | Commentaire | +| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
    • the entity has been dropped (the stamp has changed and the memory space is now free)
    • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when dk force drop if stamp changed option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

    • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

      **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

      **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

    • with `.save( )`: error only if the `dk auto merge` option is not used
    • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
    • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

    • **Associated statusText**: "Stamp has changed" | + + +#### Exemple 1 + +Example with error: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(716) + $status:=$employee.lock() + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + + +#### Exemple 2 + +Example with `dk reload if stamp changed` option: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(717) + $status:=$employee.lock(dk reload if stamp changed) + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + +## .next() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.next()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| -------------------------------------------------------------------- | +| Résultat | 4D.Entity | <- | Reference to next entity in the entity selection (Null if not found) | + +#### Description + +The `.next()` function returns a reference to the next entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid next entity in the entity selection (i.e. you are on the last entity of the selection), the function returns Null. If the next entity has been dropped, the function returns the next valid entity (and eventually Null). + + +#### Exemple + +```4d + var $employees : cs.EmployeeSelection + var $employee; $nextEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $nextEmployee:=$employee.next() //$nextEmployee is the second entity of the $employees entity selection + +``` + + + +## .previous() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.previous()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| ------------------------------------------------------------------------ | +| Résultat | 4D.Entity | <- | Reference to previous entity in the entity selection (Null if not found) | + +#### Description + +The `.previous()` function returns a reference to the previous entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid previous entity in the entity selection (i.e. you are on the first entity of the selection), the function returns Null. If the previous entity has been dropped, the function returns the previous valid entity (and eventually Null). + + +#### Exemple + +```4d + var $employees : cs.EmployeeSelection + var $employee; $previousEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] + $previousEmployee:=$employee.previous() //$previousEmployee is the first entity of the $employees entity selection +``` + + + + +## .reload( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.reload()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------- | +| Résultat | Objet | <- | Status object | + +#### Description + +The `.reload()` function reloads the content of the entity in memory, according to information stored in the table related to the dataclass in the datastore. The reload is done only if the entity still exists with the same primary key. + +**Résultat** + +The object returned by `.reload( )` contains the following properties: + +| Propriété | Type | Description | +| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | boolean | True if the reload action is successful, False otherwise.

      ***Available only in case of error***: | +| status(\*) | number | Error code, see below | +| statusText(\*) | Texte | Description of the error, see below | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Valeur | Commentaire | +| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

    • the entity has been dropped (the stamp has changed and the memory space is now free)
    • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

    • ***Associated statusText***: "Entity does not exist anymore" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
      ***Associated statusText***: "Other error" | + + +#### Exemple + +```4d + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + var $result : Object + + $employees:=ds.Employee.query("lastName=:1";"Hollis") + $employee:=$employees[0] + $employee.firstName:="Mary" + $result:=$employee.reload() + Case of + :($result.success) + ALERT("Reload has been done") + :($result.status=dk status entity does not exist anymore) + ALERT("The entity has been dropped") + End case +``` + + + +## .save() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.save**( { *mode* : Integer } ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------- | +| mode | Entier long | -> | `dk auto merge`: Enables the automatic merge mode | +| Résultat | Objet | <- | Result of save operation | + +#### Description + +The `.save()` function saves the changes made to the entity in the table related to its dataClass. You must call this method after creating or modifying an entity if you want to save the changes made to it. + +The save operation is executed only if at least one entity attribute has been "touched" (see the [`.touched()`](#touched) and [`.touchedAttributes()`](#touchedattributes) functions). Otherwise, the function does nothing (the trigger is not called). + +In a multi-user or multi-process application, the `.save()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the method will return an error (see below) whenever the same entity has been modified by another process or user in the meantime, no matter the modified attribute(s). + +Otherwise, you can pass the `dk auto merge` option in the *mode* parameter: when the automatic merge mode is enabled, a modification done concurrently by another process/user on the same entity but on a different attribute will not result in an error. The resulting data saved in the entity will be the combination (the "merge") of all non-concurrent modifications (if modifications were applied to the same attribute, the save fails and an error is returned, even with the auto merge mode). +> The automatic merge mode is not available for attributes of Picture, Object, and Text type when stored outside of the record. Concurrent changes in these attributes will result in a `dk status stamp has changed` error. + +**Résultat** + +The object returned by `.save()` contains the following properties: + +| Propriété | | Type | Description | +| ------------ | ------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | True if the save action is successful, False otherwise. | +| | | | ***Available only if `dk auto merge` option is used***: | +| autoMerged | | boolean | True if an auto merge was done, False otherwise. | +| | | | ***Available only in case of error***: | +| status | | number | Error code, [see below](#status-and-statustext) | +| statusText | | Texte | Description of the error, [see below](#status-and-statustext) | +| | | | ***Available only in case of pessimistic lock error***: | +| lockKindText | | Texte | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | Texte | Session user name on the machine | +| | user4d_alias | Texte | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | Texte | Machine name | +| | task_name | Texte | Process name | +| | client_version | Texte | | +| | | | ***Available only in case of serious error*** (serious error - can be trying to duplicate a primary key, disk full...): | +| errors | | collection d'objets | | +| | message | Texte | Error message | +| | componentSignature | Texte | Internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +##### status and statusText + +The following values can be returned in the `status` and `statusText` properties of Result object in case of error: + +| Constant | Valeur | Commentaire | +| ----------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status automerge failed` | 6 | (Only if the `dk auto merge` option is used) The automatic merge option failed when saving the entity.

      **Associated statusText**: "Auto merge failed" | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

    • the entity has been dropped (the stamp has changed and the memory space is now free)
    • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

    • **Associated statusText**: "Entity doesnot exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

      **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

      **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

    • with `.save( )`: error only if the `dk auto merge` option is not used
    • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
    • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

    • **Associated statusText**: "Stamp has changed" | + + +#### Exemple 1 + +Creating a new entity: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + $employee:=ds.Employee.new() + $employee.firstName:="Mary" + $employee.lastName:="Smith" + $status:=$employee.save() + If($status.success) + ALERT("Employee created") + End if +``` + +#### Exemple 2 + +Updating an entity without `dk auto merge` option: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save() + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 3 + +Updating an entity with `dk auto merge` option: + +```4d + var $status : Object + + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save(dk auto merge) + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status automerge failed) + ALERT($status.statusText) + End case +``` + + + + +## .toObject() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.toObject**() : Object
      **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
      **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| ------------------------------------------------------------------------------------------------------- | +| filterString | Texte | -> | Attribute(s) to extract (comma-separated string) | +| filterCol | Collection | -> | Collection of attribute(s) to extract | +| options | Entier long | -> | `dk with primary key`: adds the \_KEY property;
      `dk with stamp`: adds the \_STAMP property | +| Résultat | Objet | <- | Object built from the entity | + +#### Description + +The `.toObject()` function returns an object which has been built from the entity. Property names in the object match attribute names of the entity. + +If no filter is specified, or if the *filterString* parameter contains an empty string or "*", the returned object will contain: + +* all storage entity attributes +* attributes of the `relatedEntity` [kind](DataClassAttributeClass.md#kind): you get a property with the same name as the related entity (name of the many-to-one link). Attribute is extracted with the simple form. +* attributes of the `relatedEntities` [kind](DataClassAttributeClass.md#kind): attribute is not returned. + + +In the first parameter, you pass the entity attribute(s) to extract. You can pass: + +* *filterString*: a string with property paths separated with commas: "propertyPath1, propertyPath2, ...", or +* *filterCol*: a collection of strings: \["propertyPath1","propertyPath2";...] + +If a filter is specified for attributes of the relatedEntity [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntity" -> it is extracted with simple form: an object with property \_\_KEY (primary key). +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1; relatedEntity.propertyName2; ..." -> only those properties are extracted + +If a filter is specified for attributes of the relatedEntities [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1; relatedEntities.propertyName2; ..." -> only those properties are extracted + +In the *options* parameter, you can pass the `dk with primary key` and/or`dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + + +#### Exemple 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Without filter parameter: + +```4d +employeeObject:=employeeSelected.toObject() +``` + +Returns: + +```4d +{ + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { // relatedEntity extracted with simple form + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + + + +#### Exemple 2 + +Extracting the primary key and the stamp: + +```4d +employeeObject:=employeeSelected.toObject("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +{ + "__KEY": 413, + "__STAMP": 1, + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + +#### Example 3 + +Expanding all the properties of `relatedEntities`: + +```4d +employeeObject:=employeeSelected.toObject("directReports.*") +``` + +```4d +{ + "directReports": [ + { + "ID": 418, + "firstName": "Lorena", + "lastName": "Boothe", + "salary": 44800, + "birthDate": "1970-10-02T00:00:00.000Z", + "woman": true, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 419, + "firstName": "Drew", + "lastName": "Caudill", + "salary": 41000, + "birthDate": "2030-01-12T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 420, + "firstName": "Nathan", + "lastName": "Gomes", + "salary": 46300, + "birthDate": "2010-05-29T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + } + ] +} +``` + +#### Example 4 + +Extracting some properties of `relatedEntities`: + +```4d + employeeObject:=employeeSelected.toObject("firstName, directReports.lastName") +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "directReports": [ + { + "lastName": "Boothe" + }, + { + "lastName": "Caudill" + }, + { + "lastName": "Gomes" + } + ] +} +``` + +#### Example 5 + +Extracting a `relatedEntity` with simple form: + +```4d + $coll:=New collection("firstName";"employer") + employeeObject:=employeeSelected.toObject($coll) +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "employer": { + "__KEY": 20 + } +} +``` + +#### Example 6 + +Extracting all the properties of a `relatedEntity`: + +```4d + employeeObject:=employeeSelected.toObject("employer.*") +``` + +Returns: + +```4d +{ + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } +} +``` + +#### Example 7 + +Extracting some properties of a `relatedEntity`: + +```4d + $col:=New collection + $col.push("employer.name") + $col.push("employer.revenues") + employeeObject:=employeeSelected.toObject($col) +``` + +Returns: + +```4d +{ + "employer": { + "name": "India Astral Secretary", + "revenues": 12000000 + } +} +``` + + + + +## .touched( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.touched()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------------------------------------------- | +| Résultat | Booléen | <- | True if at least one entity attribute has been modified and not yet saved, else False | + +#### Description + +The `.touched()` function tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved. + +If an attribute has been modified or calculated, the function returns True, else it returns False. You can use this function to determine if you need to save the entity. + +This function returns False for a new entity that has just been created (with [`.new( )`](DataClassClass.md#new)). Note however that if you use a function which calculates an attribute of the entity, the `.touched()` function will then return True. For example, if you call [`.getKey()`](#getkey) to calculate the primary key, `.touched()` returns True. + +#### Exemple + +In this example, we check to see if it is necessary to save the entity: + +```4d + var $emp : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + + If($emp.touched()) //if at least one of the attributes has been changed + $emp.save() + End if // otherwise, no need to save the entity +``` + + + +## .touchedAttributes( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.touchedAttributes()** : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| Résultat | Collection | <- | Names of touched attributes, or empty collection | + +#### Description + +The `.touchedAttributes()` function returns the names of the attributes that have been modified since the entity was loaded into memory. + +This applies for attributes of the [kind](DataClassAttributeClass.md#kind) `storage` or `relatedEntity`. + +In the case of a related entity having been touched (i.e., the foreign key), the name of the related entity and its primary key's name are returned. + +If no entity attribute has been touched, the method returns an empty collection. + +#### Exemple 1 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + + $touchedAttributes:=New collection + $emp:=ds.Employee.get(725) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + $emp.lastName:="Martin" + $touchedAttributes:=$emp.touchedAttributes() + //$touchedAttributes: ["firstName","lastName"] +``` + + +#### Exemple 2 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + var $company : cs.CompanyEntity + + $touchedAttributes:=New collection + + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName + $emp.lastName:="Martin" + + $company:=ds.Company.get(121) + $emp.employer:=$company + + $touchedAttributes:=$emp.touchedAttributes() + + //collection $touchedAttributes: ["firstName","lastName","employer","employerID"] +``` + +In this case: + +* firstName and lastName have a `storage` kind +* employer has a `relatedEntity` kind +* employerID is the foreign key of the employer related entity + + + +## .unlock() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.unlock()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------- | +| Résultat | Objet | <- | Status object | + +#### Description + +The `.unlock()` function removes the pessimistic lock on the record matching the entity in the datastore and table related to its dataclass. + +> For more information, please refer to [Entity locking](ORDA/entities.md#entity-locking) section. + +A record is automatically unlocked when it is no longer referenced by any entities in the locking process (for example: if the lock is put only on one local reference of an entity, the entity and thus the record is unlocked when the process ends). +> When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. Par exemple : + +```4d + $e1:=ds.Emp.all()[0] + $e2:=ds.Emp.all()[0] + $res:=$e1.lock() //$res.success=true + $res:=$e2.unlock() //$res.success=false + $res:=$e1.unlock() //$res.success=true +``` + +**Résultat** + +The object returned by `.unlock()` contains the following property: + +| Propriété | Type | Description | +| --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | Booléen | True if the unlock action is successful, False otherwise. If the unlock is done on a dropped entity, on a non locked record, or on a record locked by another process or entity, success is False. | + +#### Exemple + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + + $employee:=ds.Employee.get(725) + $status:=$employee.lock() + ... //processing + $status:=$employee.unlock() + If($status.success) + ALERT("The entity is now unlocked") + End if +``` + + + + + diff --git a/website/translated_docs/fr/API/EntitySelectionClass.md b/website/translated_docs/fr/API/EntitySelectionClass.md new file mode 100644 index 00000000000000..5d1d0c6245ea29 --- /dev/null +++ b/website/translated_docs/fr/API/EntitySelectionClass.md @@ -0,0 +1,2219 @@ +--- +id: EntitySelectionClass +title: EntitySelection +--- + + +An entity selection is an object containing one or more reference(s) to [entities](ORDA/dsMapping.md#entity) belonging to the same [Dataclass](ORDA/dsMapping.md#dataclass). Une sélection d'entité peut contenir 0, 1 ou X entités de la dataclasse - où X peut représenter le nombre total d'entités contenues dans la dataclasse. + +Entity selections can be created from existing selections using various functions of the [`DataClass` class](DataClassClass.md) such as [`.all()`](DataClassClass.md#all) or [`.query()`](DataClassClass.md#query), or functions of the `EntityClass` class itself, such as [`.and()`](#and) or [`orderBy()`](#orderby). You can also create blank entity selections using the [`dataClass.newSelection()`](DataClassClass.md#newselection) function or the [`Create new selection`](#create-new-selection) command. + +### Sommaire + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [***[index]*** : 4D.Entity](#91index93)

          allows you to access entities within the entity selection using the standard collection syntax | +| [***.attributeName*** : Collection
      ***.attributeName*** : 4D.EntitySelection](#attributename)

          a "projection" of values for the attribute in the entity selection | +| [**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection](#add)

          adds the specified *entity* to the entity selection and returns the modified entity selection | +| [**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#and)

          combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator | +| [**.average**( *attributePath* : Text ) : Real](#average)

          returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection | +| [**.contains**( *entity* : 4D.Entity ) : Boolean](#contains)

          returns true if entity reference belongs to the entity selection | +| [**.count**( *attributePath* : Text ) : Real](#count)

          returns the number of entities in the entity selection with a non-null value in *attributePath* | +| [**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection](#distinct)

          returns a collection containing only distinct (different) values from the *attributePath* in the entity selection | +| [**.drop**( { *mode* : Integer } ) : 4D.EntitySelection](#drop)

          removes the entities belonging to the entity selection from the table related to its dataclass within the datastore | +| [**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
      **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection](#extract)

          returns a collection containing *attributePath* values extracted from the entity selection | +| [**.first()** : 4D.Entity](#first)

          returns a reference to the entity in the first position of the entity selection | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

          returns the dataclass of the entity selection | +| [**.isAlterable()** : Boolean](#isalterable)

          returns True if the entity selection is alterable | +| [**.isOrdered()** : Boolean](#isordered)

          returns True if the entity selection is ordered | +| [**.last()** : 4D.Entity](#last)

          returns a reference to the entity in last position of the entity selection | +| [**.length** : Integer](#length)

          returns the number of entities in the entity selection | +| [**.max**( *attributePath* : Text ) : any](#max)

          returns the highest (or maximum) value among all the values of *attributePath* in the entity selection | +| [**.min**( *attributePath* : Text ) : any](#min)

           returns the lowest (or minimum) value among all the values of attributePath in the entity selection | +| [**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#minus)

          excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection | +| [**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#or)

          combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator | +| [**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
      **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection](#orderby)

          returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria | +| [**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
      **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection](#orderbyformula)

          returns a new, ordered entity selection | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
      **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection](#query)

          searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection | +| [**.queryPath** : Text](#querypath)

          contains a detailed description of the query as it was actually performed by 4D | +| [**.queryPlan** : Text](#queryplan)

           contains a detailed description of the query just before it is executed (i.e., the planned query) | +| [**.refresh()**](#refresh)

          immediately "invalidates" the entity selection data in the local ORDA cache | +| [**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object](#selected)

          returns an object describing the position(s) of *selectedEntities* in the original entity selection | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection](#slice)

          returns a portion of an entity selection into a new entity selection | +| [**.sum**( *attributePath* : Text ) : Real](#sum)

          returns the sum for all *attributePath* values in the entity selection | +| [**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
      **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
      **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*](#tocollection)

          creates and returns a collection where each element is an object containing a set of properties and values | + + + +## Create entity selection + +**Create entity selection** ( *dsTable* : Table { ; *settings* : Object } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| ------------------------------------------------------------------------------------------- | +| dsTable | Table | -> | Table in the 4D database whose current selection will be used to build the entity selection | +| settings | Objet | -> | Build option: context | +| Résultat | 4D.EntitySelection | <- | Entity selection matching the dataclass related to the given table | + + +#### Description + +The `Create entity selection` command builds and returns a new, [alterable](ORDA/entities.md#shareable-or-alterable-entity-selections) entity selection related to the dataclass matching the given *dsTable*, according to the current selection of this table. + +If the current selection is sorted, an [ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created. + +If the *dsTable* is not exposed in [`ds`](API/DataStoreClass.md#ds), an error is returned. This command cannot be used with a Remote datastore. + +In the optional *settings* parameter, you can pass an object containing the following property: + +| Propriété | Type | Description | +| --------- | ---- | ----------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the [optimization context](ORDA/entities.md#clientserver-optimization) applied to the entity selection. | + + +#### Exemple + +```4d +var $employees : cs.EmployeeSelection +ALL RECORDS([Employee]) +$employees:=Create entity selection([Employee]) +// The $employees entity selection now contains a set of reference +// on all entities related to the Employee dataclass +``` + +#### Voir également + +[`dataClass.newSelection()`](DataClassClass.md#newselection) + +## [*index*] + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +***[index]*** : 4D.Entity + +#### Description + +The `EntitySelection[index]` notation allows you to access entities within the entity selection using the standard collection syntax: pass the position of the entity you want to get in the *index* parameter. + +Note that the corresponding entity is reloaded from the datastore. + +*index* can be any number between 0 and `.length`-1. + +* If *index* is out of range, an error is returned. +* If *index* corresponds to a dropped entity, a Null value is returned. +> > **Warning**: `EntitySelection[index]` is a non assignable expression, which means that it cannot be used as en editable entity reference with methods like [`.lock()`](EntityClass.md#lock) or [`.save()`](EntityClass.md#save). To work with the corresponding entity, you need to assign the returned expression to an assignable expression, such as a variable. Voici quelques exemples : + +```4d + $sel:=ds.Employee.all() //create the entity selection + //invalid statements: + $result:=$sel[0].lock() //will NOT work + $sel[0].lastName:="Smith" //will NOT work + $result:=$sel[0].save() //will NOT work + //valid code: + $entity:=$sel[0] //OK + $entity.lastName:="Smith" //OK + $entity.save() //OK +``` + +#### Exemple + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + $employee:=$employees[2] // The 3rd entity of the $employees entity selection is reloaded from the database +``` + + + + + +## .*attributeName* + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +***.attributeName*** : Collection
      ***.attributeName*** : 4D.EntitySelection + +#### Description + +Any dataclass attribute can be used as a property of an entity selection to return a "projection" of values for the attribute in the entity selection. Projected values can be a collection or a new entity selection, depending on the [kind](DataClassAttributeClass.md#kind) (`storage` or `relation`) of the attribute. + +* If *attributeName* kind is `storage`: `.attributeName` returns a collection of values of the same type as *attributeName*. +* If *attributeName* kind is `relatedEntity`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). +* If *attributeName* kind is `relatedEntities`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). + + +Lorsqu'un attribut de relation est utilisé comme propriété d'une sélection d'entité, le résultat est toujours une autre sélection d'entité, même si une seule entité est retournée. In this case, if no entities are returned, the result is an empty entity selection. + +If the attribute does not exist in the entity selection, an error is returned. + + + + + + +#### Exemple 1 + +Projection of storage values: + + +```4d + var $firstNames : Collection + $entitySelection:=ds.Employee.all() + $firstNames:=$entitySelection.firstName // firstName type is string +``` + +The resulting collection is a collection of strings, for example: + +```4d +[ + "Joanna", + "Alexandra", + "Rick" +] +``` + +#### Exemple 2 + +Projection of related entity: + +```4d + var $es; $entitySelection : cs.EmployeeSelection + $entitySelection:=ds.Employee.all() + $es:=$entitySelection.employer // employer is related to a Company dataClass +``` + +The resulting object is an entity selection of Company with duplications removed (if any). + +#### Example 3 + +Projection of related entities: + +```4d + var $es : cs.EmployeeSelection + $es:=ds.Employee.all().directReports // directReports is related to Employee dataclass +``` + +The resulting object is an entity selection of Employee with duplications removed (if any). + + + + + +## .add() + +
      Historique +| Version | Modifications | +| ------- | ----------------------------------------- | +| v18 R5 | Only supports alterable entity selections | +| v17 | Ajoutées | +
      + + +**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------- | +| entity | 4D.Entity | -> | Entity to be added to the entity selection | +| Résultat | 4D.EntitySelection | -> | Entity selection including the added *entity* | + + +#### Description + +The `.add()` function adds the specified *entity* to the entity selection and returns the modified entity selection. +> This function modifies the original entity selection. + +**Warning:** The entity selection must be *alterable*, i.e. it has been created for example by [`.newSelection()`](DataClassClass.md#newselection) or `Create entity selection`, otherwise `.add()` will return an error. Shareable entity selections do not accept the addition of entities. For more information, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + + +* If the entity selection is ordered, *entity* is added at the end of the selection. If a reference to the same entity already belongs to the entity selection, it is duplicated and a new reference is added. +* If the entity selection is unordered, *entity* is added anywhere in the selection, with no specific order. +> For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +The modified entity selection is returned by the function, so that function calls can be chained. + +An error occurs if *entity* and the entity selection are not related to the same Dataclass. If *entity* is Null, no error is raised. + +#### Exemple 1 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"S@") + $employee:=ds.Employee.new() + $employee.lastName:="Smith" + $employee.save() + $employees.add($employee) //The $employee entity is added to the $employees entity selection +``` + +#### Exemple 2 + +Calls to the function can be chained: + +```4d + var $sel : cs.ProductSelection + var $p1;$p2;$p3 : cs.ProductEntity + + $p1:=ds.Product.get(10) + $p2:=ds.Product.get(11) + $p3:=ds.Product.get(12) + $sel:=ds.Product.query("ID > 50") + $sel:=$sel.add($p1).add($p2).add($p3) +``` + + + +## .and() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | +
      + +**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + +| Paramètres | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Résultat | 4D.EntitySelection | <- | New entity selection with the result of intersection with logical AND operator | + + +#### Description + +The `.and()` function combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator; it returns a new, unordered entity selection that contains only the entities that are referenced in both the entity selection and the parameter. + +* If you pass *entity* as parameter, you combine this entity with the entity selection. If the entity belongs to the entity selection, a new entity selection containing only the entity is returned. Otherwise, an empty entity selection is returned. +* If you pass *entitySelection* as parameter, you combine both entity selections. A new entity selection that contains only the entities that are referenced in both selections is returned. If there is no intersecting entity, an empty entity selection is returned. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or the *entitySelection* parameter is empty, or if the *entity* is Null, an empty entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Exemple 1 + + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + //The $employees entity selection contains the entity + //with primary key 710 and other entities + //for ex. "Colin Hetrick" / "Grady Harness" / "Sherlock Holmes" (primary key 710) + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.and($employee) //$result is an entity selection containing + //only the entity with primary key 710 ("Sherlock Holmes") +``` + + +#### Exemple 2 + +We want to have a selection of employees named "Jones" who live in New York: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2) +``` + + + +## .average() + +
      Historique +| Version | Modifications | +| ------- | ------------------------------------------- | +| v18 R6 | Returns undefined if empty entity selection | +| v17 | Ajoutées | + +
      + +**.average**( *attributePath* : Text ) : Real +| Paramètres | Type | | Description | +| ------------- | ----- |:--:| ------------------------------------------------------------------------------------------ | +| attributePath | Texte | -> | Attribute path to be used for calculation | +| Résultat | Réel | <- | Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection) | + +#### Description + +The `.average()` function returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection. + +Pass in the *attributePath* parameter the attribute path to evaluate. + +Only numerical values are taken into account for the calculation. Note however that, if the *attributePath* of the entity selection contains mixed value types, `.average()` takes all scalar elements into account to calculate the average value. +> Date values are converted to numerical values (seconds) and used to calculate the average. + +`.average()` returns **undefined** if the entity selection is empty or *attributePath* does not contain numerical values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Exemple + +We want to obtain a list of employees whose salary is higher than the average salary: + +```4d + var $averageSalary : Real + var $moreThanAv : cs.EmployeeSelection + $averageSalary:=ds.Employee.all().average("salary") + $moreThanAv:=ds.Employee.query("salary > :1";$averageSalary) +``` + + + + +## .contains() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.contains**( *entity* : 4D.Entity ) : Boolean +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| -------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to evaluate | +| Résultat | Booléen | <- | True if the entity belongs to the entity selection, else False | + +#### Description + +The `.contains()` function returns true if entity reference belongs to the entity selection, and false otherwise. + +In *entity*, specify the entity to search for in the entity selection. If entity is Null, the function will return false. + +If *entity* and the entity selection do not belong to the same dataclass, an error is raised. + +#### Exemple + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName=:1";"H@") + $employee:=ds.Employee.get(610) + + If($employees.contains($employee)) + ALERT("The entity with primary key 610 has a last name beginning with H") + Else + ALERT("The entity with primary key 610 does not have a last name beginning with H") + End if +``` + + + + +## .count() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.count**( *attributePath* : Text ) : Real +| Paramètres | Type | | Description | +| ------------- | ----- |:--:| ----------------------------------------------------------------- | +| attributePath | Texte | -> | Path of the attribute to be used for calculation | +| Résultat | Réel | <- | Number of non null *attributePath* values in the entity selection | + +#### Description + +The `.count()` function returns the number of entities in the entity selection with a non-null value in *attributePath*. +> Only scalar values are taken into account. Object or collection type values are considered as null values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Exemple + +We want to find out the total number of employees for a company without counting any whose job title has not been specified: + +```4d + var $sel : cs.EmployeeSelection + var $count : Real + + $sel:=ds.Employee.query("employer = :1";"Acme, Inc") + $count:=$sel.count("jobtitle") +``` + + + +## .copy() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | + +
      + +**.copy**( { *option* : Integer } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| ------------------------------------------------ | +| option | Entier long | -> | `ck shared`: return a shareable entity selection | +| Résultat | 4D.EntitySelection | <- | Copy of the entity selection | + +#### Description + +The `.copy()` function returns a copy of the original entity selection. + +> This function does not modify the original entity selection. + +By default, if the *option* parameter is omitted, the function returns a new, alterable entity selection (even if the function is applied to a shareable entity selection). Pass the `ck shared` constant in the *option* parameter if you want to create a shareable entity selection. + +> For information on the shareable property of entity selections, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + +#### Exemple + +You create a new, empty entity selection of products when the form is loaded: + +```4d + Case of + :(Form event code=On Load) + Form.products:=ds.Products.newSelection() + End case + +``` + +Then this entity selection is updated with products and you want to share the products between several processes. You copy the Form.products entity selection as a shareable one: + +```4d + ... + // The Form.products entity selection is updated + Form.products.add(Form.selectedProduct) + + Use(Storage) + If(Storage.products=Null) + Storage.products:=New shared object() + End if + + Use(Storage.products) + Storage.products:=Form.products.copy(ck shared) + End use + End use +``` + + + +## .distinct() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ------------- | ----------- |:--:| ---------------------------------------------------------------- | +| attributePath | Texte | -> | Path of attribute whose distinct values you want to get | +| option | Entier long | -> | `dk diacritical`: diacritical evaluation ("A" # "a" for example) | +| Résultat | Collection | <- | Collection with only distinct values | + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the *attributePath* in the entity selection. + +The returned collection is automatically sorted. **Null** values are not returned. + +In the *attributePath* parameter, pass the entity attribute whose distinct values you want to get. Only scalar values (text, number, boolean, or date) can be handled. If the *attributePath* leads to an object property that contains values of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. booleans +2. strings +3. numbers +4. dates + +You can use the `[]` notation to designate a collection when *attributePath* is a path within an object (see examples). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `dk diacritical` constant in the *option* parameter. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Exemples + +You want to get a collection containing a single element per country name: + +```4d + var $countries : Collection + $countries:=ds.Employee.all().distinct("address.country") +``` + +`nicknames` is a collection and `extra` is an object attribute: + +```4d +$values:=ds.Employee.all().distinct("extra.nicknames[].first") +``` + + + + +## .drop() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.drop**( { *mode* : Integer } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| ------------------------------------------------------------------------------------------------ | +| mode | Entier long | -> | `dk stop dropping on first error`: stops method execution on first non-droppable entity | +| Résultat | 4D.EntitySelection | <- | Empty entity selection if successful, else entity selection containing non-droppable entity(ies) | + +#### Description + +The `.drop()` function removes the entities belonging to the entity selection from the table related to its dataclass within the datastore. The entity selection remains in memory. +> Removing entities is permanent and cannot be undone. It is recommended to call this action in a transaction in order to have a rollback option. + +If a locked entity is encountered during the execution of `.drop()`, it is not removed. By default, the method processes all entities of the entity selection and returns non-droppable entities in the entity selection. If you want the method to stop execution at the first encountered non-droppable entity, pass the `dk stop dropping on first error` constant in the *mode* parameter. + +#### Exemple + +Example without the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop() // $notDropped is an entity selection containing all the not dropped entities + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + +Example with the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop(dk stop dropping on first error) //$notDropped is an entity selection containing the first not dropped entity + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + + + + + +## .extract() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | + +
      + + +**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
      **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection + +| Paramètres | Type | | Description | +| ------------- | ----------- |:--:| --------------------------------------------------------------------------------------- | +| attributePath | Texte | -> | Attribute path whose values must be extracted to the new collection | +| targetPath | Texte | -> | Target attribute path or attribute name | +| option | Entier long | -> | `ck keep null`: include null attributes in the returned collection (ignored by default) | +| Résultat | Collection | <- | Collection containing extracted values | + +#### Description + +The `.extract()` function returns a collection containing *attributePath* values extracted from the entity selection. + +*attributePath* can refer to: + +* a scalar dataclass attribute, +* related entity, +* related entities. + +If *attributePath* is invalid, an empty collection is returned. + +This function accepts two syntaxes. + +**.extract( attributePath : Text { ; option : Integer } ) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* values of the entity selection. + +By default, entities for which *attributePath* is *null* or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as **null** elements in the returned collection. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as a collection of entities (duplications are kept). +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as a collection of entity selections. + + +**.extract ( attributePath ; targetPath { ; ...attributePathN ; ... targetPathN}) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* properties. Each element of the returned collection is an object with *targetPath* properties filled with the corresponding *attributePath* properties. Null values are kept (*option* parameter is ignored with this syntax). + +If several *attributePath* are given, a *targetPath* must be given for each. Only valid pairs \[*attributePath*, *targetPath*] are extracted. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as an entity. +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as an entity selection. + +> Entities of a collection of entities accessed by \[ ] are not reloaded from the database. + + +#### Exemple + +Given the following table and relation: + +![](assets/en/API/entityselection.PNG) + +```4d + var $firstnames; $addresses; $mailing; $teachers : Collection + // + // + //$firstnames is a collection of Strings + + + $firstnames:=ds.Teachers.all().extract("firstname") + // + //$addresses is a collection of entities related to dataclass Address + //Null values for address are extracted + $addresses:=ds.Teachers.all().extract("address";ck keep null) + // + // + //$mailing is a collection of objects with properties "who" and "to" + //"who" property content is String type + //"to" property content is entity type (Address dataclass) + $mailing:=ds.Teachers.all().extract("lastname";"who";"address";"to") + // + // + //$mailing is a collection of objects with properties "who" and "city" + //"who" property content is String type + //"city" property content is String type + $mailing:=ds.Teachers.all().extract("lastname";"who";"address.city";"city") + // + //$teachers is a collection of objects with properties "where" and "who" + //"where" property content is String + //"who" property content is an entity selection (Teachers dataclass) + $teachers:=ds.Address.all().extract("city";"where";"teachers";"who") + // + //$teachers is a collection of entity selections + $teachers:=ds.Address.all().extract("teachers") +``` + + + + +## .first() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.first()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| ---------------------------------------------------------------------------------- | +| Résultat | 4D.Entity | <- | Reference to the first entity of the entity selection (Null if selection is empty) | + +#### Description + +The `.first()` function returns a reference to the entity in the first position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[0] +``` + +There is, however, a difference between both statements when the selection is empty: + + +```4d + var $entitySel : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySel:=ds.Emp.query("lastName = :1";"Nonexistentname") //no matching entity + //entity selection is then empty + $entity:=$entitySel.first() //returns Null + $entity:=$entitySel[0] //generates an error +``` + +#### Exemple + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary > :1";100000) + If($entitySelection.length#0) + $entity:=$entitySelection.first() + End if +``` + + + + +## .getDataClass() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | + +
      + +**.getDataClass()** : 4D.DataClass + +| Paramètres | Type | | Description | +| ---------- | ------------ |:--:| ------------------------------------------------------ | +| Résultat | 4D.DataClass | <- | Dataclass object to which the entity selection belongs | + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity selection. + +This function is mainly useful in the context of generic code. + +#### Exemple + +The following generic code duplicates all entities of the entity selection: + +```4d + //duplicate_entities method + //duplicate_entities($entity_selection) + + #DECLARE ( $entitySelection : 4D.EntitySelection ) + var $dataClass : 4D.DataClass + var $entity; $duplicate : 4D.Entity + var $status : Object + $dataClass:=$entitySelection.getDataClass() + For each($entity;$entitySelection) + $duplicate:=$dataClass.new() + $duplicate.fromObject($entity.toObject()) + $duplicate[$dataClass.getInfo().primaryKey]:=Null //reset the primary key + $status:=$duplicate.save() + End for each +``` + + + +## .isAlterable() + +
      Historique + +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | + +
      + +**.isAlterable()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ---------------------------------------------------------- | +| Résultat | Booléen | <- | True if the entity selection is alterable, False otherwise | + +#### Description + +The `.isAlterable()` function returns True if the entity selection is alterable, and False if the entity selection is not alterable. + +For more information, please refer to [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections). + +#### Exemple + +You are about to display `Form.products` in a [list box](FormObjects/listbox_overview.md) to allow the user to add new products. You want to make sure it is alterable so that the user can add new products without error: + +```4d +If (Not(Form.products.isAlterable())) + Form.products:=Form.products.copy() +End if +... +Form.products.add(Form.product) +``` + + + + +## .isOrdered() + +
      Historique + +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.isOrdered()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| -------------------------------------------------------- | +| Résultat | Booléen | <- | True if the entity selection is ordered, False otherwise | + +#### Description + +The `.isOrdered()` function returns True if the entity selection is ordered, and False if it is unordered. +> This function always returns True when the entity selection comes from a remote datastore. + +For more information, please refer to [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + + +#### Exemple + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $isOrdered : Boolean + $employees:=ds.Employee.newSelection(dk keep ordered) + $employee:=ds.Employee.get(714) // Gets the entity with primary key 714 + + //In an ordered entity selection, we can add the same entity several times (duplications are kept) + $employees.add($employee) + $employees.add($employee) + $employees.add($employee) + + $isOrdered:=$employees.isOrdered() + If($isOrdered) + ALERT("The entity selection is ordered and contains "+String($employees.length)+" employees") + End if +``` + + + + + +## .last() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.last()** : 4D.Entity +| Paramètres | Type | | Description | +| ---------- | --------- |:--:| ------------------------------------------------------------------------------------- | +| Résultat | 4D.Entity | <- | Reference to the last entity of the entity selection (Null if empty entity selection) | + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[length-1] +``` + +If the entity selection is empty, the function returns Null. + + +#### Exemple + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary < :1";50000) + If($entitySelection.length#0) + $entity:=$entitySelection.last() + End if +``` + + + + +## .length + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.length** : Integer + +#### Description + +The `.length` property returns the number of entities in the entity selection. If the entity selection is empty, it returns 0. + +Entity selections always have a `.length` property. + + +#### Exemple + +```4d + var $vSize : Integer + $vSize:=ds.Employee.query("gender = :1";"male").length + ALERT(String(vSize)+" male employees found.") +``` + + + + +## .max() + +
      Historique +| Version | Modifications | +| ------- | ------------------------------------------- | +| v17 | Ajoutées | +| v18 R6 | Returns undefined if empty entity selection | + +
      + +**.max**( *attributePath* : Text ) : any + +| Paramètres | Type | | Description | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texte | -> | Path of the attribute to be used for calculation | +| Résultat | any | <- | Highest value of attribute | + +#### Description + +The `.max()` function returns the highest (or maximum) value among all the values of *attributePath* in the entity selection. It actually returns the value of the last entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function. + +If you pass in *attributePath* a path to an object property containing different types of values, the `.max()` function will return the maximum value within the first scalar type in the default 4D type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.max()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + + +#### Exemple + +We want to find the highest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $maxSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $maxSalary:=$sel.max("salary") +``` + + + +## .min() + +
      Historique +| Version | Modifications | +| ------- | ------------------------------------------- | +| v17 | Ajoutées | +| v18 R6 | Returns undefined if empty entity selection | + + +
      + +**.min**( *attributePath* : Text ) : any +| Paramètres | Type | | Description | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texte | -> | Path of the attribute to be used for calculation | +| Résultat | any | <- | Lowest value of attribute | + +#### Description + +The `.min()` function returns the lowest (or minimum) value among all the values of attributePath in the entity selection. It actually returns the first entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function (excluding **null** values). + +If you pass in *attributePath* a path to an object property containing different types of values, the `.min()` function will return the minimum value within the first scalar value type in the type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.min()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Exemple + +In this example, we want to find the lowest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $minSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $minSalary:=$sel.min("salary") +``` + + + +## .minus() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to substract | +| entitySelection | 4D.EntitySelection | -> | Entity selection to substract | +| Résultat | 4D.EntitySelection | <- | New entity selection or a new reference on the existing entity selection | + +#### Description + +The `.minus()` function excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection. + +* If you pass *entity* as parameter, the function creates a new entity selection without *entity* (if *entity* belongs to the entity selection). If *entity* was not included in the original entity selection, a new reference to the entity selection is returned. +* If you pass *entitySelection* as parameter, the function returns an entity selection containing the entities belonging to the original entity selection without the entities belonging to *entitySelection*. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or both the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Exemple 1 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName = :1";"H@") + // The $employees entity selection contains the entity with primary key 710 and other entities + // for ex. "Colin Hetrick", "Grady Harness", "Sherlock Holmes" (primary key 710) + + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.minus($employee) //$result contains "Colin Hetrick", "Grady Harness" +``` + + +#### Exemple 2 + +We want to have a selection of female employees named "Jones" who live in New York : + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2).minus(ds.Employee.query("gender='male'")) +``` + + + +## .or() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
      **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| --------------- | ------------------ |:--:| ---------------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Résultat | 4D.EntitySelection | <- | New entity selection or new reference to the original entity selection | + +#### Description + +The `.or()` function combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator; it returns a new, unordered entity selection that contains all the entities from the entity selection and the parameter. + +* If you pass *entity* as parameter, you compare this entity with the entity selection. If the entity belongs to the entity selection, a new reference to the entity selection is returned. Otherwise, a new entity selection containing the original entity selection and the entity is returned. +* If you pass *entitySelection* as parameter, you compare entity selections. A new entity selection containing the entities belonging to the original entity selection or *entitySelection* is returned (or is not exclusive, entities referenced in both selections are not duplicated in the resulting selection). +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. If the original entity selection is empty, a reference to *entitySelection* or an entity selection containing only *entity* is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Exemple 1 + +```4d + var $employees1; $employees2; $result : cs.EmployeeSelection + $employees1:=ds.Employee.query("lastName = :1";"H@") //Returns "Colin Hetrick","Grady Harness" + $employees2:=ds.Employee.query("firstName = :1";"C@") //Returns "Colin Hetrick", "Cath Kidston" + $result:=$employees1.or($employees2) //$result contains "Colin Hetrick", "Grady Harness","Cath Kidston" +``` + +#### Exemple 2 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // Returns "Colin Hetrick","Grady Harness", "Sherlock Holmes" + $employee:=ds.Employee.get(686) //the entity with primary key 686 does not belong to the $employees entity selection + //It matches the employee "Mary Smith" + + $result:=$employees.or($employee) //$result contains "Colin Hetrick", "Grady Harness", "Sherlock Holmes", "Mary Smith" +``` + + + +## .orderBy() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
      **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ----------- | ------------------ |:--:| --------------------------------------------------------------------- | +| pathString | Texte | -> | Attribute path(s) and sorting instruction(s) for the entity selection | +| pathObjects | Collection | -> | Collection of criteria objects | +| Résultat | 4D.EntitySelection | <- | New entity selection in the specified order | + +#### Description + +The `.orderBy()` function returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria. +> * This method does not modify the original entity selection. +* For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +You must use a criteria parameter to define how the entities must be sorted. Two different parameters are supported: + +* *pathString* (Text) : This parameter contains a formula made of 1 to x attribute paths and (optionally) sort orders, separated by commas. The syntax is: + +```4d +"attributePath1 {desc or asc}, attributePath2 {desc or asc},..." +``` + +The order in which the attributes are passed determines the sorting priority of the entities. By default, attributes are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* (collection): each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +By default, attributes are sorted in ascending order ("descending" is false). + +You can add as many objects in the criteria collection as necessary. +> Null values are evaluated as less than other values. + +#### Exemple + + +```4d +// order by formula + $sortedEntitySelection:=$entitySelection.orderBy("firstName asc, salary desc") + $sortedEntitySelection:=$entitySelection.orderBy("firstName") + + // order by collection with or without sort orders + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"firstName";"descending";False)) + $orderColl.push(New object("propertyPath";"salary";"descending";True)) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) + + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"manager.lastName")) + $orderColl.push(New object("propertyPath";"salary")) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) +``` + + + + +## .orderByFormula( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R6 | Ajoutées | + +
      + +**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
      **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ------------- | ------------------ |:--:| ------------------------------------------- | +| formulaString | Texte | -> | Formula string | +| formulaObj | Objet | -> | Formula object | +| sortOrder | Entier long | -> | `dk ascending` (default) or `dk descending` | +| settings | Objet | -> | Parameter(s) for the formula | +| Résultat | 4D.EntitySelection | <- | New ordered entity selection | + +#### Description + +The `.orderByFormula()` function returns a new, ordered entity selection containing all entities of the entity selection in the order defined through the *formulaString* or *formulaObj* and, optionally, *sortOrder* and *settings* parameters. +> This function does not modify the original entity selection. + +You can use either a *formulaString* or a *formulaObj* parameter: + +- *formulaString*: you pass a 4D expression such as "Year of(this.birthDate)". +- *formulaObj*: pass a valid formula object created using the `Formula` or `Formula from string` command. + +The *formulaString* or *formulaObj* is executed for each entity of the entity selection and its result is used to define the position of the entity in the returned entity selection. The result must be of a sortable type (boolean, date, number, text, time, null). +> A null result is always the smallest value. + +By default if you omit the *sortOrder* parameter, the resulting entity selection is sorted in ascending order. Optionnally, you can pass one of the following values in the *sortOrder* parameter: + +| Constant | Valeur | Commentaire | +| ------------- | ------ | ------------------------------ | +| dk ascending | 0 | Ascending sort order (default) | +| dk descending | 1 | Descending sort order | + +Within the *formulaString* or *formulaObj*, the processed entity and thus its attributes are available through the `This` command (for example, `This.lastName`). + +You can pass parameter(s) to the formula using the `args` property (object) of the `settings` parameter: the formula receives the `settings.args` object in $1. + +#### Exemple 1 + +Sorting students using a formula provided as text: + +```4d + var $es1; $es2 : cs.StudentsSelection + $es1:=ds.Students.query("nationality=:1";"French") + $es2:=$es1.orderByFormula("length(this.lastname)") //ascending by default + $es2:=$es1.orderByFormula("length(this.lastname)";dk descending) +``` + +Same sort order but using a formula object: + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(Length(This.lastname)) + $es2:=$es1.orderByFormula($formula) // ascending by default + $es2:=$es1.orderByFormula($formula;dk descending) +``` + + +#### Exemple 2 + +A formula is given as a formula object with parameters; `settings.args` object is received as $1 in the ***computeAverage*** method. + +In this example, the "marks" object field in the **Students** dataClass contains students' grades for each subject. A single formula object is used to compute a student's average grade with different coefficients for schoolA and schoolB. + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula; $schoolA; $schoolB : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(computeAverage($1)) + + $schoolA:=New object() //settings object + $schoolA.args:=New object("english";1;"math";1;"history";1) // Coefficients to compute an average + + //Order students according to school A criteria + $es2:=$es1.entitySelection.orderByFormula($formula;$schoolA) + + $schoolB:=New object() //settings object + $schoolB.args:=New object("english";1;"math";2;"history";3) // Coefficients to compute an average + + //Order students according to school B criteria + $es2:=$es1.entitySelection.orderByFormula($formula;dk descending;$schoolB) +``` + +```4d + // + // computeAverage method + // ----------------------------- + #DECLARE ($coefList : Object) -> $result : Integer + var $subject : Text + var $average; $sum : Integer + + $average:=0 + $sum:=0 + + For each($subject;$coefList) + $sum:=$sum+$coefList[$subject] + End for each + + For each($subject;This.marks) + $average:=$average+(This.marks[$subject]*$coefList[$subject]) + End for each + + $result:=$average/$sum +``` + + + + +## .query() + +
      Historique +| Version | Modifications | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Ajoutées | + +
      + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
      **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ------------- | ------------------ |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| queryString | Texte | -> | Search criteria as string | +| formula | Objet | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Objet | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Résultat | 4D.EntitySelection | <- | New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula* | +#### Description + +The `.query()` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. +> This function does not modify the original entity selection. + +If no matching entities are found, an empty `EntitySelection` is returned. + +For detailed information on how to build a query using *queryString*, *value*, and *querySettings* parameters, please refer to the DataClass [`.query()`](DataClassClass.md#query) function description. +> By default if you omit the **order by** statement in the *queryString*, the returned entity selection is [not ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). Note however that, in Client/Server mode, it behaves like an ordered entity selection (entities are added at the end of the selection). + +#### Exemple 1 + + +```4d + var $entitySelectionTemp : cs.EmployeeSelection + $entitySelectionTemp:=ds.Employee.query("lastName = :1";"M@") + Form.emps:=$entitySelectionTemp.query("manager.lastName = :1";"S@") +``` + + +#### Exemple 2 + +More examples of queries can be found in the DataClass [`.query()`](DataClassClass.md#query) page. + +#### Voir également + +[`.query()`](DataClassClass.md#query) for dataclass + + + + +## .queryPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.queryPath** : Text + +#### Description + +The `.queryPath` property contains a detailed description of the query as it was actually performed by 4D. This property is available for `EntitySelection` objects generated through queries if the `"queryPath":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + + +## .queryPlan + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.queryPlan** : Text + +#### Description + +The `.queryPlan` property contains a detailed description of the query just before it is executed (i.e., the planned query). This property is available for `EntitySelection` objects generated through queries if the `"queryPlan":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + +## .refresh() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | + +
      + +**.refresh()** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + +#### Description +> This function only works with a remote datastore (client / server or `Open datastore` connection). + +The `.refresh()` function immediately "invalidates" the entity selection data in the local ORDA cache so that the next time 4D requires the entity selection, it will be reloaded from the database. + +By default, the local ORDA cache is invalidated after 30 seconds. In the context of client / server applications using both ORDA and the classic language, this method allows you to make sure a remote application will always work with the latest data. + +#### Exemple 1 + +In this example, classic and ORDA code modify the same data simultaneously: + +```4d + //On a 4D remote + + var $selection : cs.StudentsSelection + var $student : cs.StudentsEntity + + $selection:=ds.Students.query("lastname=:1";"Collins") + //The first entity is loaded in the ORDA cache + $student:=$selection.first() + + //Update with classic 4D, ORDA cache is not aware of if + QUERY([Students];[Students]lastname="Collins") + [Students]lastname:="Colin" + SAVE RECORD([Students]) + + //to get the latest version, the ORDA cache must be invalidated + $selection.refresh() + // Even if cache is not expired, the first entity is reloaded from disk + $student:=$selection.first() + + //$student.lastname contains "Colin" +``` + + +#### Exemple 2 + +A list box displays the Form.students entity selection and several clients work on it. + +```4d +// Form method: + Case of + :(Form event code=On Load) + Form.students:=ds.Students.all() + End case + // + // + // On client #1, the user loads, updates, and saves the first entity + // On client #2, the user loads, updates, and saves the same entity + // + // + // On client #1: + Form.students.refresh() // Invalidates the ORDA cache for the Form.students entity selection + // The list box content is refreshed from the database with update made by client #2 +``` + + + + +## .selected() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 R3 | Ajoutées | + +
      + +**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object +| Paramètres | Type | | Description | +| ---------------- | ------------------ |:--:| --------------------------------------------------------------------------------- | +| selectedEntities | 4D.EntitySelection | -> | Entity selection with entities for which to know the rank in the entity selection | +| Résultat | Objet | <- | Range(s) of selected entities in entity selection | + +#### Description + +The `.selected()` function returns an object describing the position(s) of *selectedEntities* in the original entity selection. +> This function does not modify the original entity selection. + +Pass in the *selectedEntities* parameter an entity selection containing entities for which you want to know the position in the original entity selection. *selectedEntities* must be an entity selection belonging to the same dataclass as the original entity selection, otherwise an error 1587 - "The entity selection comes from an incompatible dataclass" is raised. + +#### Résultat + +The returned object contains the following properties: + +| Propriété | Type | Description | +| -------------- | ----------- | ------------------------------- | +| ranges | Collection | Collection of range objects | +| ranges[].start | Entier long | First entity index in the range | +| ranges[].end | Entier long | Last entity index in the range | + +If a `ranges` property contains a single entity, `start` = `end`. Index starts at 0. + +The function returns an empty collection in the `ranges` property if the original entity selection or the *selectedEntities* entity selection is empty. + +#### Exemple + +```4d +var $invoices; $cashSel; $creditSel : cs.Invoices +var $result1; $result2 : Object + +$invoices:=ds.Invoices.all() + +$cashSelection:=ds.Invoices.query("payment = :1"; "Cash") +$creditSel:=ds.Invoices.query("payment IN :1"; New collection("Cash"; "Credit Card")) + +$result1:=$invoices.selected($cashSelection) +$result2:=$invoices.selected($creditSel) + +//$result1 = {ranges:[{start:0;end:0},{start:3;end:3},{start:6;end:6}]} +//$result2 = {ranges:[{start:0;end:1},{start:3;end:4},{start:6;end:7}]} + +``` + + + + + + + + +## .slice() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| -------------------------------------------------------------- | +| startFrom | Entier long | -> | Index to start the operation at (included) | +| end | Entier long | -> | End index (not included) | +| Résultat | 4D.EntitySelection | <- | New entity selection containing sliced entities (shallow copy) | + +#### Description + +The `.slice()` function returns a portion of an entity selection into a new entity selection, selected from the *startFrom* index to the *end* index (*end* is not included) or to the last entity of the entity selection. This method returns a shallow copy of the entity selection (it uses the same entity references). +> This function does not modify the original entity selection. + +The returned entity selection contains the entities specified by *startFrom* and all subsequent entities up to, but not including, the entity specified by *end*. If only the *startFrom* parameter is specified, the returned entity selection contains all entities from *startFrom* to the last entity of the original entity selection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the entity selection). If the calculated value < 0, *startFrom* is set to 0. +* If *startFrom >= length*, the function returns an empty entity selection. +* If *end* < 0, it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +If the entity selection contains entities that were dropped in the meantime, they are also returned. + +#### Exemple 1 + +You want to get a selection of the first 9 entities of the entity selection: + +```4d +var $sel; $sliced : cs.EmployeeSelection +$sel:=ds.Employee.query("salary > :1";50000) +$sliced:=$sel.slice(0;9) // +``` + + +#### Exemple 2 + +Assuming we have ds.Employee.all().length = 10 + +```4d +var $slice : cs.EmployeeSelection +$slice:=ds.Employee.all().slice(-1;-2) //tries to return entities from index 9 to 8, but since 9 > 8, returns an empty entity selection + +``` + + + +## .sum( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + + +
      + +**.sum**( *attributePath* : Text ) : Real +| Paramètres | Type | | Description | +| ------------- | ----- |:--:| ------------------------------------------------ | +| attributePath | Texte | -> | Path of the attribute to be used for calculation | +| Résultat | Réel | <- | Sum of entity selection values | + +#### Description + + +The `.sum()` function returns the sum for all *attributePath* values in the entity selection. + +`.sum()` returns 0 if the entity selection is empty. + +The sum can only be done on values of number type. If the *attributePath* is an object property, only numerical values are taken into account for the calculation (other value types are ignored). In this case, if *attributePath* leads to a property that does not exist in the object or does not contain any numeric values, `.sum()` returns 0. + +An error is returned if: + +* *attributePath* is not a numerical or an object attribute, +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + + + +#### Exemple + +```4d +var $sel : cs.EmployeeSelection +var $sum : Real + +$sel:=ds.Employee.query("salary < :1";20000) +$sum:=$sel.sum("salary") +``` + + + +## .toCollection( ) + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 | Ajoutées | + +
      + +**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
      **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
      **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection* +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| ------------------------------------------------------------------------------------ | +| filterString | Texte | -> | String with entity attribute path(s) to extract | +| filterCol | Collection | -> | Collection of entity attribute path(s) to extract | +| options | Entier long | -> | `dk with primary key`: adds the primary key
      `dk with stamp`: adds the stamp | +| begin | Entier long | -> | Designates the starting index | +| howMany | Entier long | -> | Number of entities to extract | +| Résultat | Collection | <- | Collection of objects containing attributes and values of entity selection | + +#### Description + +The `.toCollection()` function creates and returns a collection where each element is an object containing a set of properties and values corresponding to the attribute names and values for the entity selection. + +If no filter parameter is passed or the first parameter contains an empty string or "*", all the attributes are extracted. Les attributs avec la propriété [kind](DataClassAttributeClass.md#kind) définie sur "relatedEntity" sont extraits avec la forme simple : un objet avec la propriété \_\_KEY (clé primaire). Attributes with kind property as "relatedEntities" are not extracted. + +Or, you can designate the entity attributes to extract using a filter parameter. You can use one of these two filters: + +* *filterString* --a string with property paths separated with commas: "propertyPath1, propertyPath2, ...". +* *filterCol* --a collection of strings containing property paths: \["propertyPath1","propertyPath2",...] + + +If a filter is specified for an attribute of the `relatedEntity` kind: + +* propertyPath = "relatedEntity" -> it is extracted with simple form +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1, relatedEntity.propertyName2, ..." -> only those properties are extracted + + +If a filter is specified for an attribute of the `relatedEntities` kind: + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1, relatedEntities.propertyName2, ..." -> only those properties are extracted + + + +In the *options* parameter, you can pass the `dk with primary key` and/or `dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + +The *begin* parameter allows you to indicate the starting index of the entities to extract. You can pass any value between 0 and entity selection length-1. + +The *howMany* parameter lets you specify the number of entities to extract, starting with the one specified in *begin*. Dropped entities are not returned but are taken into account according to *howMany*. For example, if *howMany*= 3 and there is 1 dropped entity, only 2 entities are extracted. + +If *howMany* > length of the entity selection, the method returns (length - *begin*) objects. + +An empty collection is returned if: + +* the entity selection is empty, or +* *begin* is greater than the length of the entity selection. + + +#### Exemple 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Example without filter or options parameter: + +```4d + var $employeesCollection : Collection + var $employees : cs.EmployeeSelection + + $employeesCollection:=New collection + $employees:=ds.Employee.all() + $employeesCollection:=$employees.toCollection() +``` + +Returns: + +```4d +[ + { + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + + } + }, + { + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + } +] +``` + +#### Exemple 2 + +Example with options: + +```4d +var $employeesCollection : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +[ + { + "__KEY": 416, + "__STAMP": 1, + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }, + { + "__KEY": 417, + "__STAMP": 1, + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }] +``` + +#### Example 3 + +Example with slicing and filtering on properties: + +```4d +var $employeesCollection; $filter : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$filter:=New collection +$filter.push("firstName") +$filter.push("lastName") + +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection($filter;0;0;2) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl" + }, + { + "firstName": "Irma", + "lastName": "Durham" + } +] + +``` + + +#### Example 4 + +Example with `relatedEntity` type with simple form: + + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName,lastName,employer") +``` + +returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "__KEY": 20 + } + } + ] +``` + +#### Example 5 + +Example with *filterCol* parameter: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection("firstName";"lastName") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Joanna", + "lastName": "Cabrera" + }, + { + "firstName": "Alexandra", + "lastName": "Coleman" + } +] +``` + +#### Example 6 + +Example with extraction of all properties of a relatedEntity: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection +$coll.push("firstName") +$coll.push("lastName") +$coll.push("employer.*") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + } + ] +``` + +#### Example 7 + +Example with extraction of some properties of a relatedEntity: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, employer.name") +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "name": "India Astral Secretary" + } + }] +``` + +#### Example 8 + +Example with extraction of some properties of `relatedEntities`: + +```4d + var $employeesCollection : Collection + $employeesCollection:=New collection + $employeesCollection:=$employees.toCollection("firstName, lastName, directReports.firstName") +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "firstName": "Gary" + }, + { + "firstName": "Sadie" + }, + { + "firstName": "Christie" + } + ] + }, + { + "firstName": "Gary", + + "lastName": "Reichert", + "directReports": [ + { + "firstName": "Rex" + }, + { + "firstName": "Jenny" + }, + { + "firstName": "Lowell" + } + ] + }] +``` + +#### Example 9 + +Example with extraction of all properties of `relatedEntities`: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, directReports.*") + +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "ID": 425, + "firstName": "Gary", + "lastName": "Reichert", + "salary": 65800, + "birthDate": "1957-12-23T00:00:00.000Z", + "woman": false, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + }, + { + "ID": 426, + "firstName": "Sadie", + "lastName": "Gallant", + "salary": 35200, + "birthDate": "2022-01-03T00:00:00.000Z", + "woman": true, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + } + ] + }, + { + "firstName": "Gary", + "lastName": "Reichert", + "directReports": [ + { + "ID": 428, + "firstName": "Rex", + "lastName": "Chance", + "salary": 71600, + "birthDate": "1968-08-09T00:00:00.000Z", + "woman": false, + + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + }, + { + "ID": 429, + "firstName": "Jenny", + "lastName": "Parks", + "salary": 51300, + "birthDate": "1984-05-25T00:00:00.000Z", + "woman": true, + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + } + ] + } +] +``` + + + + + + + diff --git a/website/translated_docs/fr/API/FileClass.md b/website/translated_docs/fr/API/FileClass.md new file mode 100644 index 00000000000000..18fec2e68314b7 --- /dev/null +++ b/website/translated_docs/fr/API/FileClass.md @@ -0,0 +1,1168 @@ +--- +id: FileClass +title: File +--- + +`File` objects are created with the [`File`](#file) command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the `File` command to create a new file, a valid `File` object is created but nothing is actually stored on disk until you call the [`file.create( )`](#create) function. + +### Exemple + +The following example creates a preferences file in the project folder: + +```code4d +var $created : Boolean +$created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + +### File object + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](#copyto)

          copies the `File` object into the specified *destinationFolder* | +| [**.create()** : Boolean ](#create)

          creates a file on disk according to the properties of the `File` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

          creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

          the creation date of the file | +| [**.creationTime** : Time](#creationtime)

          the creation time of the file | +| [**.delete( )**](#delete)

          deletes the file | +| [**.exists** : Boolean](#exists)

          true if the file exists on disk | +| [**.extension** : Text](#extension)

          the extension of the file name (if any) | +| [**.fullName** : Text](#fullname)

          the full name of the file, including its extension (if any) | +| [**.getAppInfo**() : Object](#getappinfo)

          returns the contents of a **.exe**, **.dll** or **.plist** file information as an object | +| [**.getContent( )** : 4D.Blob](#getcontent)

      returns a `4D.Blob` object containing the entire content of a file | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

          the icon of the file | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
      **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](#gettext)

          returns the contents of the file as text | +| [**.hidden** : Boolean](#hidden)

          true if the file is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

          true if the file is an alias, a shortcut, or a symbolic link | +| [**.isFile** : Boolean](#isfile)

          always true for a file | +| [**.isFolder** : Boolean](#isfolder)

          always false for a file | +| [**.isWritable** : Boolean](#iswritable)

          true if the file exists on disk and is writable | +| [**.modificationDate** : Date](#modificationdate)

          the date of the file's last modification | +| [**.modificationTime** : Time](#modificationtime)

          the time of the file's last modification | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File](#moveto)

          moves or renames the `File` object into the specified *destinationFolder* | +| [**.name** : Text](#name)

          the name of the file without extension (if any) | +| [**.original** : 4D.File
      **.original** : 4D.Folder](#original)

          the target element for an alias, a shortcut, or a symbolic link file | +| [**.parent** : 4D.Folder](#parent)

          the parent folder object of the file | +| [**.path** : Text](#path)

          the POSIX path of the file | +| [**.platformPath** : Text](#platformpath)

          the path of the file expressed with the current platform syntax | +| [**.rename**( *newName* : Text ) : 4D.File](#rename)

          renames the file with the name you passed in *newName* and returns the renamed `File` object | +| [**.setAppInfo**( *info* : Object )](#setappinfo)

          writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file | +| [**.setContent** ( *content* : Blob ) ](#setcontent)

          rewrites the entire content of the file using the data stored in the *content* BLOB | +| [**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
      **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) ](#settext)

          writes *text* as the new contents of the file | +| [**.size** : Real](#size)

          the size of the file expressed in bytes | + + + +## File + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**File** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
      **File** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +| Paramètres | Type | | Description | +| ------------ | ----------- |:--:| ----------------------------------------------- | +| path | Texte | -> | File path | +| fileConstant | Entier long | -> | 4D file constant | +| pathType | Entier long | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return file of host database | +| Résultat | 4D.File | <- | New file object | + + +#### Description + +The `File` command creates and returns a new object of the `4D.File` type. The command accepts two syntaxes: + +**File ( path { ; pathType } { ; \* })** + +In the *path* parameter, pass a file path string. You can use a custom string or a filesystem (e.g., "/DATA/myfile.txt"). + +> Only absolute pathnames are supported with the `File` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Valeur | Commentaire | +| ---------------- | ------ | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**File ( fileConstant { ; \* } )** + +In the *fileConstant* parameter, pass a 4D built-in or system file, using one of the following constants: + +| Constant | Valeur | Commentaire | +| --------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Backup history file | 19 | Backup history file (see Configuration and trace files). Stored in the backup destination folder. | +| Backup log file | 13 | Current backup journal file. Stored in the application Logs folder. | +| Backup settings file | 1 | Default backup.4DSettings file (xml format), stored in the Settings folder of the project | +| Backup settings file for data | 17 | backup.4DSettings file (xml format) for the data file, stored in the Settings folder of the data folder | +| Build application log file | 14 | Current log file in xml format of the application builder. Stored in the Logs folder. | +| Build application settings file | 20 | Default settings file of the application builder ("buildApp.4DSettings"). Stored in the Settings folder of the project. | +| Compacting log file | 6 | Log file of the most recent compacting done with the Compact data file command or the Maintenance and security center. Stored in the Logs folder. | +| Current backup settings file | 18 | backup.4DSettings file currently used by the application. It can be the backup settings file (default) or a custom user backup settings file defined for the data file | +| Debug log file | 12 | Log file created by the `SET DATABASE PARAMETER(Debug log recording)` command. Stored in the Logs folder. | +| Diagnostic log file | 11 | Log file created by the `SET DATABASE PARAMETER(Diagnostic log recording)` command. Stored in the Logs folder. | +| Directory file | 16 | directory.json file, containing the description of users and groups (if any) for the project application. It can be located either in the user settings folder (default, global to the project), or in the data settings folder (specific to a data file). | +| HTTP debug log file | 9 | Log file created by the `WEB SET OPTION(Web debug log)` command. Stored in the Logs folder. | +| HTTP log file | 8 | Log file created by the `WEB SET OPTION(Web log recording)` command. Stored in Logs folder. | +| IMAP Log file | 23 | Log file created by the `SET DATABASE PARAMETER(IMAP Log)` command. Stored in the Logs folder. | +| Last backup file | 2 | Last backup file, named \[bkpNum].4BK, stored at a custom location. | +| Last journal integration log file | 22 | Full pathname of the last journal integration log file (stored in the Logs folder of the restored application), if any. This file is created, in auto-repair mode, as soon as a log file integration occurred | +| Repair log file | 7 | Log file of database repairs made on the database in the Maintenance and Security Center (MSC). Stored in the Logs folder. | +| Request log file | 10 | Standard client/server request log file (excluding Web requests) created by the `SET DATABASE PARAMETER(4D Server log recording)` or `SET DATABASE PARAMETER(Client log recording)` commands. If executed on the server, the server log file is returned (stored in the Logs folder on the server). If executed on the client, the client log file is returned (stored in the client local Logs folder). | +| SMTP log file | 15 | Log file created by the `SET DATABASE PARAMETER(SMTP Log)` command. Stored in the Logs folder. | +| User settings file | 3 | settings.4DSettings file for all data files, stored in Preferences folder next to structure file if enabled. | +| User settings file for data | 4 | settings.4DSettings file for current data file, stored in Preferences folder next to the data file. | +| Verification log file | 5 | Log files created by the `VERIFY CURRENT DATA FILE` and `VERIFY DATA FILE` commands or the Maintenance and Security Center (MSC). Stored in the Logs folder. | + +If the target *fileConstant* does not exist, a null object is returned. No errors are raised. + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.File.new() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**4D.File.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
      **4D.File.new** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +#### Description + +The `4D.File.new()` function creates and returns a new object of the `4D.File` type. It is identical to the [`File`](#file) command (shortcut). + +> It is recommended to use the [`File`](#file) shortcut command instead of `4D.File.new()`. + + +## .copyTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Paramètres | Type | | Description | +| ----------------- | ----------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Name for the copy | +| overwrite | Entier long | -> | `fk overwrite` to replace existing elements | +| Résultat | 4D.File | <- | Copied file | + + +#### Description + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valeur | Commentaire | +| -------------- | ------ | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Valeur retournée** + +The copied `File` object. + +#### Exemple + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + + +## .create() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**Not available for ZIP archives** + +**.create()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ---------------------------------------------------------- | +| Résultat | Booléen | <- | True if the file was created successfully, false otherwise | + +#### Description + +The `.create()` function creates a file on disk according to the properties of the `File` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the file already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Valeur retournée** + +* **True** if the file is created successfully; +* **False** if a file with the same name already exists or if an error occured. + +#### Exemple + +Creation of a preferences file in the database folder: + +```4d + var $created : Boolean + $created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + + + + + +## .createAlias() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File +| Paramètres | Type | | Description | +| ----------------- | ----------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Texte | -> | Name of the alias or shortcut | +| aliasType | Entier long | -> | Type of the alias link | +| Résultat | 4D.File | <- | Alias or shortcut file reference | + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the file with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Valeur | Commentaire | +| ------------------ | ------ | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Exemple + +You want to create an alias to a file in your database folder: + +```4d + $myFile:=Folder(fk documents folder).file("Archives/ReadMe.txt") + $aliasFile:=$myFile.createAlias(File("/PACKAGE");"ReadMe") +``` + + + + +## .creationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the file. + +Cette propriété est en **lecture seule**. + + + + + + +## .creationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationTime** : Time + +#### Description + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + + +## .delete() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.delete( )** + +| Paramètres | Type | | Description | +| ---------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.delete()` function deletes the file. + +If the file is currently open, an error is generated. + +If the file does not exist on disk, the function does nothing (no error is generated). +> **WARNING**: `.delete( )` can delete any file on a disk. This includes documents created with other applications, as well as the applications themselves. `.delete( )` should be used with extreme caution. Deleting a file is a permanent operation and cannot be undone. + +#### Exemple + +You want to delete a specific file in the database folder: + +```4d + $tempo:=File("/PACKAGE/SpecialPrefs/"+Current user+".prefs") + If($tempo.exists) + $tempo.delete() + ALERT("User preference file deleted.") + End if +``` + + + + +## .exists + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + + + +## .extension + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.extension** : Text +#### Description + +The `.extension` property returns the extension of the file name (if any). Une extension commence toujours par ".". The property returns an empty string if the file name does not have an extension. + +Cette propriété est en **lecture seule**. + + + + + + +## .fullName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.fullName** : Text +#### Description + +The `.fullName` property returns the full name of the file, including its extension (if any). + +Cette propriété est en **lecture seule**. + + + + +## .getAppInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.getAppInfo**() : Object +| Paramètres | Type | | Description | +| ---------- | ----- | -- | ----------------------------------------------------- | +| Résultat | Objet | <- | Contents of .exe/.dll version resource or .plist file | + + +#### Description + +The `.getAppInfo()` function returns the contents of a **.exe**, **.dll** or **.plist** file information as an object. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function returns an empty object (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +**Returned object with a .exe or .dll file** + +> Reading a .exe or .dll is only possible on Windows. + +All property values are Text. + +| Propriété | Type | +| ---------------- | ----- | +| InternalName | Texte | +| ProductName | Texte | +| CompanyName | Texte | +| LegalCopyright | Texte | +| ProductVersion | Texte | +| FileDescription | Texte | +| FileVersion | Texte | +| OriginalFilename | Texte | + +**Returned object with a .plist file** + +The xml file contents is parsed and keys are returned as properties of the object, preserving their types (text, boolean, number). `.plist dict` is returned as a JSON object and `.plist array` is returned as a JSON array. + +#### Exemple + +```4d + // display copyright info of application .exe file (windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=$exeFile.getAppInfo() +ALERT($info.LegalCopyright) + + // display copyright info of an info.plist (any platform) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=$infoPlistFile.getAppInfo() +ALERT($info.Copyright) +``` + +#### Voir également + +[.setAppInfo()](#setappinfo) + + + +## .getContent() + +
      Historique +| Version | Modifications | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Ajoutées | +
      + +**.getContent( )** : 4D.Blob +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ------------ | +| Résultat | 4D.Blob | <- | File content | + + +#### Description + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Valeur retournée** + +A `4D.Blob` object. + +#### Exemple + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + + + +## .getIcon() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getIcon**( { *size* : Integer } ) : Picture +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | --------------------------------------------- | +| size | Entier long | -> | Side length for the returned picture (pixels) | +| Résultat | Image | <- | Icône | + + +#### Description + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Valeur retournée** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
      **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Paramètres | Type | | Description | +| ----------- | ----------- | -- | ------------------------------- | +| charSetName | Texte | -> | Name of character set | +| charSetNum | Entier long | -> | Number of character set | +| breakMode | Entier long | -> | Processing mode for line breaks | +| Résultat | Texte | <- | Text from the document | + + +#### Description +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Valeur | Commentaire | +| ----------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Valeur retournée** + +Text of the file. + +#### Exemple + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + +## .hidden + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + +## .isAlias + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isAlias** : Boolean + +#### Description + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + +## .isFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always true for a file. + +Cette propriété est en **lecture seule**. + + + + + + +## .isFolder + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always false for a file. + +Cette propriété est en **lecture seule**. + + + + + + +## .isWritable + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isWritable** : Boolean + +#### Description + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +Cette propriété est en **lecture seule**. + +**Exemple** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + + +## .modificationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the file's last modification. + +Cette propriété est en **lecture seule**. + + + + + + +## .modificationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationTime** : Time + +##### Description + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + + + +## .moveTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File +| Paramètres | Type | | Description | +| ----------------- | --------- | -- | ---------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Full name for the moved file | +| Résultat | 4D.File | <- | Moved file | + + +#### Description + +The `.moveTo()` function moves or renames the `File` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file retains its name when moved. If you want to rename the moved file, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + + +**Returned object** + +The moved `File` object. + +#### Exemple + + +```4d +$DocFolder:=Folder(fk documents folder) +$myFile:=$DocFolder.file("Current/Infos.txt") +$myFile.moveTo($DocFolder.folder("Archives");"Infos_old.txt") +``` + + + + +## .name + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.name** : Text + +#### Description + +The `.name` property returns the name of the file without extension (if any). + +Cette propriété est en **lecture seule**. + + + + + +## .original + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.original** : 4D.File
      **.original** : 4D.Folder + +#### Description + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +Cette propriété est en **lecture seule**. + + + + + +## .parent + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +Cette propriété est en **lecture seule**. + + + + + +## .path + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +Cette propriété est en **lecture seule**. + + + + + +## .platformPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +Cette propriété est en **lecture seule**. + + + + + +## .rename() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.rename**( *newName* : Text ) : 4D.File +| Paramètres | Type | | Description | +| ---------- | ------- | -- | -------------------------- | +| newName | Texte | -> | New full name for the file | +| Résultat | 4D.File | <- | Renamed file | + +#### Description + +The `.rename()` function renames the file with the name you passed in *newName* and returns the renamed `File` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + +Note that the function modifies the full name of the file, i.e. if you do not pass an extension in *newName*, the file will have a name without an extension. + + +**Returned object** + +The renamed `File` object. + +#### Exemple + +You want to rename "ReadMe.txt" in "ReadMe_new.txt": + +```4d + $toRename:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + $newName:=$toRename.rename($toRename.name+"_new"+$toRename.extension) +``` + + +## .setAppInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.setAppInfo**( *info* : Object ) +| Paramètres | Type | | Description | +| ---------- | ----- | -- | ---------------------------------------------------------------- | +| info | Objet | -> | Properties to write in .exe/.dll version resource or .plist file | + + +#### Description + +The `.setAppInfo()` function writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function does nothing (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +***info* parameter object with a .exe or .dll file** + +> Writing a .exe or .dll file information is only possible on Windows. + +Each valid property set in the *info* object parameter is written in the version resource of the .exe or .dll file. Available properties are (any other property will be ignored): + +| Propriété | Type | +| ---------------- | ----- | +| InternalName | Texte | +| ProductName | Texte | +| CompanyName | Texte | +| LegalCopyright | Texte | +| ProductVersion | Texte | +| FileDescription | Texte | +| FileVersion | Texte | +| OriginalFilename | Texte | + +If you pass a null or empty text as value, an empty string is written in the property. If you pass a value type different from text, it is stringified. + + +***info* parameter object with a .plist file** + +Each valid property set in the *info* object parameter is written in the .plist file as a key. Any key name is accepted. Value types are preserved when possible. + +If a key set in the *info* parameter is already defined in the .plist file, its value is updated while keeping its original type. Other existing keys in the .plist file are left untouched. + +> To define a Date type value, the format to use is a json timestamp string formated in ISO UTC without milliseconds ("2003-02-01T01:02:03Z") like in the Xcode plist editor. + +#### Exemple + +```4d + // set copyright and version of a .exe file (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=New object +$info.LegalCopyright:="Copyright 4D 2021" +$info.ProductVersion:="1.0.0" +$exeFile.setAppInfo($info) +``` + +```4d + // set some keys in an info.plist file (all platforms) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=New object +$info.Copyright:="Copyright 4D 2021" //text +$info.ProductVersion:=12 //integer +$info.ShipmentDate:="2021-04-22T06:00:00Z" //timestamp +$infoPlistFile.setAppInfo($info) +``` + +#### Voir également + +[.getAppInfo()](#getappinfo) + +## .setContent() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.setContent** ( *content* : Blob ) +| Paramètres | Type | | Description | +| ---------- | ---- | -- | ------------------------- | +| content | BLOB | -> | New contents for the file | + + +#### Description + +The `.setContent( )` function rewrites the entire content of the file using the data stored in the *content* BLOB. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + + +#### Exemple + +```4d + $myFile:=Folder(fk documents folder).file("Archives/data.txt") + $myFile.setContent([aTable]aBlobField) +``` + + + + + +## .setText() + + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
      **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) + +| Paramètres | Type | | Description | +| ----------- | ----------- | -- | ------------------------------- | +| Texte | Texte | -> | Text to store in the file | +| charSetName | Texte | -> | Name of character set | +| charSetNum | Entier long | -> | Number of character set | +| breakMode | Entier long | -> | Processing mode for line breaks | +#### Description + +The `.setText()` function writes *text* as the new contents of the file. + +If the file referenced in the `File` object does not exist on the disk, it is created by the function. When the file already exists on the disk, its prior contents are erased, except if it is already open, in which case, its contents are locked and an error is generated. + +In *text*, pass the text to write to the file. It can be a literal ("my text"), or a 4D text field or variable. + +Optionally, you can designate the character set to be used for writing the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If a Byte Order Mark (BOM) exists for the character set, 4D inserts it into the file unless the character set used contains the suffix "-no-bom" (e.g. "UTF-8-no-bom"). If you do not specify a character set, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters before saving them in the file. The following constants, found in the **System Documents** theme, are available: + +| Constant | Valeur | Commentaire | +| ----------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: LF (carriage return) on macOS, CRLF (carriage return + line feed) on Windows | +| `Document with CRLF` | 2 | Line breaks are converted to CRLF (carriage return + line feed), the default Windows format | +| `Document with CR` | 3 | Line breaks are converted to CR (carriage return), the default Classic Mac OS format | +| `Document with LF` | 4 | Line breaks are converted to LF (line feed), the default Unix and macOS format | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +> **Compatibility Note**: compatibility options are available for EOL and BOM management. See [Compatibility page](https://doc.4d.com/4dv19R/help/title/en/page3239.html) on doc.4d.com. + +#### Exemple + +```4d +$myFile:=File("C:\\Documents\\Hello.txt";fk platform path) +$myFile.setText("Hello world") +``` + + + + + +## .size + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.size** : Real + +#### Description + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +Cette propriété est en **lecture seule**. + + + + + + diff --git a/website/translated_docs/fr/API/FolderClass.md b/website/translated_docs/fr/API/FolderClass.md new file mode 100644 index 00000000000000..40f29ab611c2b4 --- /dev/null +++ b/website/translated_docs/fr/API/FolderClass.md @@ -0,0 +1,957 @@ +--- +id: FolderClass +title: Folder +--- + + + +`Folder` objects are created with the [`Folder`](#folder) command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the `Folder` command to create a new folder, a valid `Folder` object is created but nothing is actually stored on disk until you call the [`folder.create( )`](#create-) function. + +### Exemple + +The following example creates a "JohnSmith" folder: + +```code4d +Form.curfolder:=Folder(fk database folder) +Form.curfolder:=Folder("C:\\Users\\JohnSmith\\";fk platform path) +``` + +### Folder object + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](#copyto)

          copies the `Folder` object into the specified *destinationFolder* | +| [**.create()** : Boolean](#create)

          creates a folder on disk according to the properties of the `Folder` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

          creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

          the creation date of the folder | +| [**.creationTime** : Time](#creationtime)

          the creation time of the folder | +| [**.delete**( { *option* : Integer } )](#delete)

          deletes the folder | +| [**.exists** : Boolean](#exists)

          true if the folder exists on disk | +| [**.extension** : Text](#extension)

          returns the extension of the folder name (if any) | +| [**.fullName** : Text](#fullname)

          returns the full name of the folder, including its extension (if any) | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

          returns the icon of the folder | +| [**.hidden** : Boolean](#hidden)

           true if the folder is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

          always **false** for a `Folder` object | +| [**.isFile** : Boolean](#isfile)

          always **false** for a folder | +| [**.isFolder** : Boolean](#isfolder)

          always **true** for a folder | +| [**.isPackage** : Boolean](#ispackage)

          true if the folder is a package on macOS (and exists on disk) | +| [**.modificationDate** : Date](#modificationdate)

           the date of the folder's last modification | +| [**.modificationTime** : Time](#modificationtime)

          the time of the folder's last modification | +| [**.name** : Text](#name)

           the name of the folder, without extension (if any) | +| [**.original** : 4D.Folder](#original)

          the same Folder object as the folder | +| [**.parent** : 4D.Folder](#parent)

          the parent folder object of the folder | +| [**.path** : Text](#path)

          the POSIX path of the folder | +| [**.platformPath** : Text](#platformpath)

          the path of the folder expressed with the current platform syntax | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder](#moveto)

          moves or renames the `Folder` object (source folder) into the specified *destinationFolder* | +| [**.rename**( *newName* : Text ) : 4D.Folder](#rename)

          renames the folder with the name you passed in *newName* and returns the renamed `Folder` object | + + + +## Folder + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**Folder** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
      **Folder** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +| Paramètres | Type | | Description | +| -------------- | ----------- |:--:| ----------------------------------------------- | +| path | Texte | -> | Folder path | +| folderConstant | Entier long | -> | 4D folder constant | +| pathType | Entier long | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return folder of host database | +| Résultat | 4D.Folder | <- | New folder object | + + +#### Description + +The `Folder` command creates and returns a new object of the `4D.Folder` type. The command accepts two syntaxes: + +**Folder ( path { ; pathType } { ; \* } )** + +In the *path* parameter, pass a folder path string. You can use a custom string or a filesystem (e.g., "/DATA"). + +> Only absolute pathnames are supported with the `Folder` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Valeur | Commentaire | +| ---------------- | ------ | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**Folder ( folderConstant { ; \* } )** + +In the *folderConstant* parameter, pass a 4D built-in or system folder, using one of the following constants: + +| Constant | Valeur | Commentaire | +| -------------------------- | ------ | --------------------------------------------------------------------------------------------------- | +| fk applications folder | 116 | | +| fk data folder | 9 | Associated filesystem: "/DATA" | +| fk database folder | 4 | Associated filesystem: "/PACKAGE" | +| fk desktop folder | 115 | | +| fk documents folder | 117 | Document folder of the user | +| fk licenses folder | 1 | Folder containing the machine's 4D license files | +| fk logs folder | 7 | Associated filesystem: "/LOGS" | +| fk mobileApps folder | 10 | Associated filesystem: "/DATA" | +| fk remote database folder | 3 | 4D database folder created on each 4D remote machine | +| fk resources folder | 6 | Associated filesystem: "/RESOURCES" | +| fk system folder | 100 | | +| fk user preferences folder | 0 | 4D folder that stores user preference files within the \ directory. | +| fk web root folder | 8 | Current Web root folder of the database: if within the package "/PACKAGE/path", otherwise full path | + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.Folder.new() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**4D.Folder.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
      **4D.Folder.new** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +#### Description + +The `4D.Folder.new()` function creates and returns a new object of the `4D.Folder` type. It is identical to the [`Folder`](#folder) command (shortcut). + +> It is recommended to use the [`Folder`](#folder) shortcut command instead of `4D.Folder.new()`. + + +## .copyTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Paramètres | Type | | Description | +| ----------------- | ----------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Name for the copy | +| overwrite | Entier long | -> | `fk overwrite` to replace existing elements | +| Résultat | 4D.Folder | <- | Copied file or folder | + + +#### Description + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Valeur | Commentaire | +| -------------- | ------ | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Valeur retournée** + +The copied `Folder` object. + +#### Exemple + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + + + + +## .create() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + + +**.create()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ------------------------------------------------------------ | +| Résultat | Booléen | <- | True if the folder was created successfully, false otherwise | + + + +#### Description + +The `.create()` function creates a folder on disk according to the properties of the `Folder` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the folder already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Valeur retournée** + +* **True** if the folder is created successfully; +* **False** if a folder with the same name already exists or if an error occured. + +#### Exemple 1 + +Create an empty folder in the database folder: + +```4d +var $created : Boolean +$created:=Folder("/PACKAGE/SpecialPrefs").create() +``` + +#### Exemple 2 + +Creation of the "/Archives2019/January/" folder in the database folder: + +```4d +$newFolder:=Folder("/PACKAGE/Archives2019/January") +If($newFolder.create()) + ALERT("The "+$newFolder.name+" folder was created.") +Else + ALERT("Impossible to create a "+$newFolder.name+" folder.") +End if +``` + + + + + +## .createAlias() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + +| Paramètres | Type | | Description | +| ----------------- | ----------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Texte | -> | Name of the alias or shortcut | +| aliasType | Entier long | -> | Type of the alias link | +| Résultat | 4D.File | <- | Alias or shortcut reference | + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the folder with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Valeur | Commentaire | +| ------------------ | ------ | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Exemple + +You want to create an alias to an archive folder in your database folder: + +```4d +$myFolder:=Folder("C:\\Documents\\Archives\\2019\\January";fk platform path) +$aliasFile:=$myFolder.createAlias(Folder("/PACKAGE");"Jan2019") +``` + + +## .creationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the folder. + +Cette propriété est en **lecture seule**. + + + + +## .creationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.creationTime** : Time + + +#### Description + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + + +## .delete() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + + +**.delete**( { *option* : Integer } ) + +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ---------------------- | +| option | Entier long | -> | Folder deletion option | + + + +#### Description + +The `.delete()` function deletes the folder. + +By default, for security reasons, if you omit the option parameter, `.delete( )` only allows empty folders to be deleted. If you want the command to be able to delete folders that are not empty, you must use the option parameter with one of the following constants: + +| Constant | Valeur | Commentaire | +| ---------------------- | ------ | ------------------------------------------------ | +| `Delete only if empty` | 0 | Deletes folder only when it is empty | +| `Delete with contents` | 1 | Deletes folder along with everything it contains | + +When `Delete only if empty` is passed or if you omit the option parameter: + +* The folder is only deleted if it is empty; otherwise, the command does nothing and an error -47 is generated. +* If the folder does not exist, the error -120 is generated. + +When `Delete with contents` is passed: + +* The folder, along with all of its contents, is deleted. **Warning**: Even when this folder and/or its contents are locked or set to read-only, if the current user has suitable access rights, the folder (and contents) is still deleted. +* If this folder, or any of the files it contains, cannot be deleted, deletion is aborted as soon as the first inaccessible element is detected, and an error(*) is returned. In this case, the folder may be only partially deleted. When deletion is aborted, you can use the `GET LAST ERROR STACK` command to retrieve the name and path of the offending file. +* If the folder does not exist, the command does nothing and no error is returned. (*) Windows: -54 (Attempt to open locked file for writing) macOS: -45 (The file is locked or the pathname is not correct) + + + + +## .exists + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + +## .extension + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.extension** : Text + +#### Description + +The `.extension` property returns the extension of the folder name (if any). Une extension commence toujours par ".". La propriété retourne une chaîne vide si le nom du dossier n'a pas d'extension. + +Cette propriété est en **lecture seule**. + + + + + +## .file() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.file**( *path* : Text ) : 4D.File +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ------------------------------------ | +| path | Texte | -> | Relative POSIX file pathname | +| Résultat | 4D.File | <- | `File` object (null if invalid path) | + +#### Description + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Valeur retournée** + +A `File` object or null if *path* is invalid. + +#### Exemple + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + + + + +## .files() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.files**( { *options* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ----------------------------------- | +| options | Entier long | -> | File list options | +| Résultat | Collection | <- | Collection of children file objects | + +#### Description + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valeur | Commentaire | +| --------------------- | ------ | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Valeur retournée** + +Collection of `File` objects. + +#### Exemple 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Exemple 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + + + + +## .folder() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.folder**( *path* : Text ) : 4D.Folder +| Paramètres | Type | | Description | +| ---------- | --------- | -- | ---------------------------------------------- | +| path | Texte | -> | Relative POSIX file pathname | +| Résultat | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Description + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Valeur retournée** + +A `Folder` object or null if *path* is invalid. + +#### Exemple + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + + + + +## .folders() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.folders**( { *options* : Integer } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | ------------------------------------- | +| options | Entier long | -> | Folder list options | +| Résultat | Collection | <- | Collection of children folder objects | + +#### Description + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Valeur | Commentaire | +| --------------------- | ------ | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Valeur retournée** + +Collection of `Folder` objects. + +#### Exemple + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + + + + +## .fullName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.fullName** : Text + +#### Description + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +Cette propriété est en **lecture seule**. + + + + + +## .getIcon() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.getIcon**( { *size* : Integer } ) : Picture +| Paramètres | Type | | Description | +| ---------- | ----------- | -- | --------------------------------------------- | +| size | Entier long | -> | Side length for the returned picture (pixels) | +| Résultat | Image | <- | Icône | + + +#### Description + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Valeur retournée** + +Folder icon [picture](Concepts/dt_picture.md). + + + + + +## .hidden + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +Cette propriété est en **lecture seule**. + + + + + + +## .isAlias + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isAlias** : Boolean + + +#### Description + +The `.isAlias` property returns always **false** for a `Folder` object. + +Cette propriété est en **lecture seule**. + + + + + + +## .isFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always **false** for a folder. + +Cette propriété est en **lecture seule**. + + + + + + +## .isFolder + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always **true** for a folder. + +Cette propriété est en **lecture seule**. + + + + + + +## .isPackage + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.isPackage** : Boolean + +#### Description + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Sinon, elle retourne false. + +Sous Windows, `.isPackage` retourne toujours **false**. + +Cette propriété est en **lecture seule**. + + + + + + +## .modificationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the folder's last modification. + +Cette propriété est en **lecture seule**. + + + + + + +## .modificationTime + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.modificationTime** : Time + +#### Description + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +Cette propriété est en **lecture seule**. + + + + + + +## .moveTo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder +| Paramètres | Type | | Description | +| ----------------- | --------- | -- | ------------------------------ | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Texte | -> | Full name for the moved folder | +| Résultat | 4D.Folder | <- | Moved folder | + + +#### Description + +The `.moveTo( )` function moves or renames the `Folder` object (source folder) into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder retains its name when moved. If you want to rename the moved folder, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +**Returned object** + +The moved `Folder` object. + +#### Exemple + +You want to move and rename a folder: + +```4d + var $tomove; $moved : Object + $docs:=Folder(fk documents folder) + $tomove:=$docs.folder("Pictures") + $tomove2:=$tomove.moveTo($docs.folder("Archives");"Pic_Archives") +``` + + +## .name + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the folder, without extension (if any). + +Cette propriété est en **lecture seule**. + + + + + + +## .original + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.original** : 4D.Folder + +#### Description + +The `.original` property returns the same Folder object as the folder. + +Cette propriété est en **lecture seule**. +> This property is available on folders to allow generic code to process folders or files. + + + + + + +## .parent + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +Cette propriété est en **lecture seule**. + + + + + + +## .path + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +Cette propriété est en **lecture seule**. + + + + + +## .platformPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +Cette propriété est en **lecture seule**. + + + + + + +## .rename() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.rename**( *newName* : Text ) : 4D.Folder + +| Paramètres | Type | | Description | +| ---------- | --------- | -- | ---------------------------- | +| newName | Texte | -> | New full name for the folder | +| Résultat | 4D.Folder | <- | Renamed folder | + + + +#### Description + +The `.rename()` function renames the folder with the name you passed in *newName* and returns the renamed `Folder` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + + +**Returned object** + +The renamed `Folder` object. + +#### Exemple + + +```4d + var $toRename : 4D.Folder + $toRename:=Folder("/RESOURCES/Pictures").rename("Images") +``` + + diff --git a/website/translated_docs/fr/API/FunctionClass.md b/website/translated_docs/fr/API/FunctionClass.md new file mode 100644 index 00000000000000..d2db4fb4532447 --- /dev/null +++ b/website/translated_docs/fr/API/FunctionClass.md @@ -0,0 +1,420 @@ +--- +id: FunctionClass +title: Formula +--- + + + +The [Formula](#formula) and [Formula from string](#formula-from-string) commands allow you to create native [`4D.Function` objects](#about-4dfunction-objects) to execute any 4D expression or code expressed as text. + + +### Formula Objects + +Formula objects can be encapsulated in object properties: + +```4d + var $f : 4D.Function + $f:=New object + $f.message:=Formula(ALERT("Hello world")) +``` + +This property is an "object function", i.e. a function which is bound to its parent object. To execute a function stored in an object property, use the **()** operator after the property name, such as: + +```4d + $f.message() //displays "Hello world" +``` + +La syntaxe avec des crochets est également prise en charge : + +```4d + $f["message"]() //displays "Hello world" +``` + +Note that, even if it does not have parameters (see below), an object function to be executed must be called with ( ) parenthesis. En appelant uniquement une seule propriété, une nouvelle référence à la formule sera retournée (et ne sera pas exécutée) : + +```4d + $o:=$f.message //retourne l'objet formule en $o +``` + +You can also execute a function using the [`apply()`](#apply) and [`call()`](#call) functions: + +```4d + $f.message.apply() //displays "Hello world" +``` + +#### Passing parameters + +You can pass parameters to your formulas using the [sequential parameter syntax](Concepts/parameters.md#sequential-parameters) based upon $1, $2...$n. Par exemple, vous pouvez écrire : + +```4d + var $f : Object + $f:=New object + $f.message:=Formula(ALERT("Hello "+$1)) + $f.message("John") //displays "Hello John" +``` + +Or using the [.call()](#call) function: + +```4d + var $f : Object + $f:=Formula($1+" "+$2) + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call(Null;"Welcome to";String(Year of(Current date))) //returns "Welcome to 2019" (for example) +``` + +#### Parameters to a single method + +For more convenience, when the formula is made of a single project method, parameters can be omitted in the formula object initialization. They can just be passed when the formula is called. Par exemple : + +```4d + var $f : 4D.Function + + $f:=Formula(myMethod) + //Writing Formula(myMethod($1;$2)) is not necessary + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call() //returns "How are you?" + + //myMethod + #DECLARE ($param1 : Text; $param2 : Text)->$return : Text + If(Count parameters=2) + $return:=$param1+" "+$param2 + Else + $return:="How are you?" + End if +``` + +Parameters are received within the method, in the order they are specified in the call. + +### About 4D.Function objects + +A `4D.Function` object contains a piece of code that can be executed from an object, either using the `()` operator, or using the [`apply()`](#apply) and [`call()`](#call) functions. 4D proposes three kinds of Function objects: + +- native functions, i.e. built-in functions from various 4D classes such as `collection.sort()` or `file.copyTo()`. +- user functions, created in user [classes](Concepts/classes.md) using the [Function keyword](Concepts/classes.md#function). +- formula functions, i.e. functions that can execute any 4D formula. + + + +### Sommaire + + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.apply**() : any
      **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any](#apply)

          executes the `formula` object to which it is applied and returns the resulting value | +| [**.call**() : any
      **.call**( *thisObj* : Object { ; ...*params* : any } ) : any](#call)

          executes the `formula` object to which it is applied and returns the resulting value | +| [**.source** : Text ](#source)

          contains the source expression of the `formula` as text | + + + + +## Formula + +

      Historique +| Version | Modifications | +| ------- | -------------------------------- | +| v17 R6 | Renamed (New formula -> Formula) | +| v17 R3 | Ajoutées | +
      + +**Formula** ( *formulaExp* : Expression ) : 4D.Function +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------- | +| formulaExp | Expression | -> | Formula to be returned as object | +| Résultat | 4D.Function | <- | Native function encapsulating the formula | + + +#### Description + +The `Formula` command creates a `4D Function` object based upon the *formulaExp* expression. *formulaExp* can be as simple as a single value or complex, such as a project method with parameters. + +Having a formula as an object allows it to be passed as a parameter (calculated attribute) to commands or methods or to be executed from various components without needing to declare them as "shared by components and host database". When called, the formula object is evaluated within the context of the database or component that created it. + +The returned formula can be called with: + +* [`.call()`](#call) or [`.apply()`](#apply) methods, or +* object notation syntax (see [formula object](#formula-object)). + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + $o:=New object("myFormula";$f) + + //three different ways to call the formula + $f.call($o) //returns 3 + $f.apply($o) //returns 3 + $o.myFormula() //returns 3 +``` + +You can pass [parameters](#passing-parameters) to the `Formula`, as seen below in [example 4](#example-4). + +You can specify the object on which the formula is executed, as seen in [example 5](#example-5). The properties of the object can then be accessed via the `This` command. + +If *formulaExp* uses local variables, their values are copied and stored in the returned formula object when it is created. When executed, the formula uses these copied values rather than the current value of the local variables. Note that using arrays as local variables is not supported. + +The object created by `Formula` can be saved, for example, in a database field or in a blob document. + + +#### Exemple 1 + +A simple formula: + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + + var $o : Object + $o:=New object("f";$f) + + $result:=$o.f() // returns 3 +``` + +#### Exemple 2 + +A formula using local variables: + +```4d + + + $value:=10 + $o:=New object("f";Formula($value)) + $value:=20 + + $result:=$o.f() // returns 10 +``` + + +#### Example 3 + +A simple formula using parameters: + +```4d + $o:=New object("f";Formula($1+$2)) + $result:=$o.f(10;20) //returns 30 +``` + + +#### Example 4 + +A formula using a project method with parameters: + +```4d + $o:=New object("f";Formula(myMethod)) + $result:=$o.f("param1";"param2") // equivalent to $result:=myMethod("param1";"param2") +``` + + +#### Example 5 + +Using `This`: + +```4d + $o:=New object("fullName";Formula(This.firstName+" "+This.lastName)) + $o.firstName:="John" + $o.lastName:="Smith" + $result:=$o.fullName() //returns "John Smith" +``` + +#### Example 6 + +Calling a formula using object notation: + +```4d + var $feta; $robot : Object + var $calc : 4D.Function + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + //sets the formula to object properties + $feta.calc:=$calc + $robot.calc:=$calc + + //call the formula + $feta.calc() // $feta={name:Feta,price:12.5,quantity:5,total:62.5,calc:"[object Formula]"} + $robot.calc() // $robot={name:Robot,price:543,quantity:2,total:1086,calc:"[object Formula]"} +``` + + + + +## Formula from string + +
      Historique +| Version | Modifications | +| ------- | ------------------------------------------------------ | +| v17 R6 | Renamed New formula from string -> Formula from string | +| v17 R3 | Ajoutées | +
      + +**Formula from string**( *formulaString* : Text ) : 4D.Function +| Paramètres | Type | | Description | +| ------------- | ----------- |:--:| --------------------------------------- | +| formulaString | Texte | -> | Text formula to be returned as object | +| Résultat | 4D.Function | <- | Native object encapsulating the formula | + + +#### Description + +The `Formula from string` command creates a 4D.Function object based upon the *formulaString*. *formulaString* can be as simple as a single value or complex, such as a project method with parameters. + +This command is similar to [`Formula`](#formula), except that it handles a text-based formula. In most cases, it is recommended to use the `Formula` command. `Formula from string` should only be used when the original formula was expressed as text (e.g., stored externally in a JSON file). In this context, using syntax with tokens is highly advised. +> Because local variable contents can not be accessed by name in compiled mode, they can not be used in *formulaString*. An attempt to access a local variable with `Formula from string` will result in an error (-10737). + + +#### Exemple + +The following code will create a dialog accepting a formula in text format: + +```4d + var $textFormula : Text + var $f : 4D.Function + $textFormula:=Request("Please type a formula") + If(ok=1) + $f:=Formula from string($textFormula) + ALERT("Result = "+String($f.call())) + End if +``` + +![](assets/en/API/formulaDialog.png) + + +...and execute the formula: + + +![](assets/en/API/formulaAlert.png) + + + + + + +## .apply() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R3 | Ajoutées | +
      + +**.apply**() : any
      **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any +| Paramètres | Type | | Description | +| ------------- | ---------- |:--:| ----------------------------------------------------------------------- | +| thisObj | Objet | -> | Object to be returned by the This command in the formula | +| formulaParams | Collection | -> | Collection of values to be passed as $1...$n when `formula` is executed | +| Résultat | any | <- | Value from formula execution | + + +#### Description + +The `.apply()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass a collection to be used as $1...$n parameters in the formula using the optional *formulaParams* parameter. + +Note that `.apply()` is similar to [`.call()`](#call) except that parameters are passed as a collection. This can be useful for passing calculated results. + + +#### Exemple 1 + +```4d + var $f : 4D.Function + $f:=Formula($1+$2+$3) + + $c:=New collection(10;20;30) + $result:=$f.apply(Null;$c) // returns 60 +``` + + +#### Exemple 2 + +```4d + var $calc : 4D.Function + var $feta; $robot : Object + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + $calc.apply($feta) // $feta={name:Feta,price:12.5,quantity:5,total:62.5} + $calc.apply($robot) // $robot={name:Robot,price:543,quantity:2,total:1086} +``` + + + +## .call() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R3 | Ajoutées | +
      + +**.call**() : any
      **.call**( *thisObj* : Object { ; ...*params* : any } ) : any +| Paramètres | Type | | Description | +| ---------- | ----- | -- | --------------------------------------------------------- | +| thisObj | Objet | -> | Object to be returned by the This command in the formula | +| params | any | -> | Value(s) to be passed as $1...$n when formula is executed | +| Résultat | any | <- | Value from formula execution | + + +#### Description + +The `.call()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass values to be used as *$1...$n* parameters in the formula using the optional *params* parameter(s). + +Note that `.call()` is similar to [`.apply()`](#apply) except that parameters are passed directly. + +#### Exemple 1 + +```4d + var $f : 4D.Function + $f:=Formula(Uppercase($1)) + $result:=$f.call(Null;"hello") // returns "HELLO" +``` + +#### Exemple 2 + +```4d + $o:=New object("value";50) + $f:=Formula(This.value*2) + $result:=$f.call($o) // returns 100 +``` + + + + +## .source + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.source** : Text + +#### Description + +The `.source` property contains the source expression of the `formula` as text. + +Cette propriété est en **lecture seule**. + +#### Exemple + +```4d + var $of : 4D.Function + var $tf : Text + $of:=Formula(String(Current time;HH MM AM PM)) + $tf:=$of.source //"String(Current time;HH MM AM PM)" +``` + + + + + diff --git a/website/translated_docs/fr/API/IMAPTransporterClass.md b/website/translated_docs/fr/API/IMAPTransporterClass.md new file mode 100644 index 00000000000000..095fedc0d352cb --- /dev/null +++ b/website/translated_docs/fr/API/IMAPTransporterClass.md @@ -0,0 +1,1984 @@ +--- +id: IMAPTransporterClass +title: IMAPTransporter +--- + +The `IMAPTransporter` class allows you to retrieve messages from a IMAP email server. + + +### IMAP Transporter object + +IMAP Transporter objects are instantiated with the [IMAP New transporter](#imap-new-transporter) command. They provide the following properties and functions: + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | +| [**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
      **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
      **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#addflags)

          adds flags to the `msgIDs` for the specified `keywords` | +| [**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object](#append)

          appends a `mailObj` to the `destinationBox` | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

           checks the connection using information stored in the transporter object | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

          the maximum time (in seconds) allowed prior to checking the connection to the server | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
      **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#copy)

          copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server | +| [**.createBox**( *name* : Text ) : Object](#createbox)

          creates a mailbox with the given `name` | +| [**.delete**( *msgsIDs* : Collection ) : Object
      **.delete**( *allMsgs* : Integer ) : Object](#delete)

          sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs` | +| [**.deleteBox**( *name* : Text ) : Object](#deletebox)

          permanently removes the mailbox with the given `name` from the IMAP server | +| [**.expunge()** : Object](#expunge)

          removes all messages with the "deleted" flag from the IMAP mail server. | +| [**.getBoxInfo**( { *name* : Text }) : Object](#getboxinfo)

          returns a `boxInfo` object corresponding to the mailbox *name* | +| [**.getBoxList**( { *parameters* : Object } ) : Collection](#getboxlist)

          returns a collection of mailboxes describing all of the available mailboxes | +| [**.getDelimiter()** : Text](#getdelimiter)

          returns the character used to delimit levels of hierarchy in the mailbox name | +| [**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
      **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object](#getmail)

          returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
      **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object](#getmails)

          returns an object containing a collection of `Email` objects | +| [**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
      **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob](#getmimeasblob)

          returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.host** : Text](#host)

          the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | +| [ | + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
      **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#move)

          moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server| |[**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection](#numtoid)

          converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg*| |[**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
      **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
      **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#removeflags)

          removes flags from the `msgIDs` for the specified `keywords`| |[**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object](#renamebox)

          changes the name of a mailbox on the IMAP server| |[**.port** : Integer](#port)

           the port number used for mail transactions| |[**.searchMails**( *searchCriteria* : Text ) : Collection](#searchmails)

          searches for messages that match the given *searchCriteria* in the current mailbox| |[**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object](#selectbox)

          selects the `name` mailbox as the current mailbox| |[**.subscribe**( *name* : Text ) : Object](#subscribe)

          allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes| |[**.unsubscribe**( *name* : Text ) : Object](#unsubscribe)

          removes a mailbox from a set of subscribed mailboxes| |[**.user** : Text](#user)

           the user name used for authentication on the mail server| + + + +## IMAP New transporter + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**IMAP New transporter**( *server* : Object ) : 4D.IMAPTransporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objet | -> | Mail server information | +| Résultat | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + + +#### Description + +The `IMAP New transporter` command configures a new IMAP connection according to the *server* parameter and returns a new *transporter* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | Faux | +| .**accessTokenOAuth2**: Text
      .**accessTokenOAuth2**: Object

      Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

          the maximum time (in seconds) allowed prior to checking the connection to the server | 300 | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

          the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | none | +| .**password** : Text

      User password for authentication on the server. Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.port** : Integer](#port)

           the port number used for mail transactions | 993 | +| [**.user** : Text](#user)

           the user name used for authentication on the mail server | none | +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + +#### Résultat + +The function returns an [**IMAP transporter object**](#imap-transporter-object). All returned properties are **read-only**. +> The IMAP connection is automatically closed when the transporter object is destroyed. + +#### Exemple + +```4d +$server:=New object +$server.host:="imap.gmail.com" //Mandatory +$server.port:=993 +$server.user:="4d@gmail.com" +$server.password:="XXXXXXXX" +$server.logFile:="LogTest.txt" //log to save in the Logs folder + +var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + +$status:=$transporter.checkConnection() +If(Not($status.success)) + ALERT("An error occurred: "+$status.statusText) +End if +``` + + +## 4D.IMAPTransporter.new() + + +**4D.IMAPTransporter.new**( *server* : Object ) : 4D.IMAPTransporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objet | -> | Mail server information | +| Résultat | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + +#### Description + +The `4D.IMAPTransporter.new()` function creates and returns a new object of the `4D.IMAPTransporter` type. It is identical to the [`IMAP New transporter`](#imap-new-transporter) command (shortcut). + +## .acceptUnsecureConnection + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + +## .addFlags() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
      **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
      **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Collection | -> | Collection of strings: Message unique IDs (text)
      Text: Unique ID of a message
      Longint (IMAP all): All messages in the selected mailbox | +| keywords | Objet | -> | Keyword flags to add | +| Résultat | Objet | <- | Status of the addFlags operation | + + +#### Description + +The `.addFlags()` function adds flags to the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Valeur | Commentaire | + | -------- | ------ | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to add to `msgIDs`. You can pass any of the following keywords: + +| Paramètres | Type | Description | +| ---------- | ------- | ---------------------------------------------- | +| $draft | Boolean | True to add the "draft" flag to the message | +| $seen | Boolean | True to add the "seen" flag to the message | +| $flagged | Boolean | True to add the "flagged" flag to the message | +| $answered | Boolean | True to add the "answered" flag to the message | +| $deleted | Boolean | True to add the "deleted" flag to the message | +> * False values are ignored. +> * The interpretation of keyword flags may vary per mail client. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Exemple + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as read/seen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.addFlags(IMAP all;$flags) +``` + + + +## .append() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object +| Paramètres | Type | | Description | +| -------------- | ----- |:--:| ------------------------------- | +| mailObj | Objet | -> | Email object | +| destinationBox | Texte | -> | Mailbox to receive Email object | +| options | Objet | -> | Object containing charset info | +| Résultat | Objet | <- | Status of the delete operation | + + +#### Description + +The `.append()` function appends a `mailObj` to the `destinationBox`. + +In the `mailObj` parameter, pass an Email object. For a comprehensive description of mail properties, see [Email object](emails.html#email-object). The `.append()` function supports keyword tags in the Email object's `keywords` attribute. + +The optional `destinationBox` parameter lets you pass the name of a mailbox where the `mailObj` will be appended. If omitted, the current mailbox is used. + +In the optional `options` parameter, you can pass an object to define the charset and encoding for specific parts of the email. Available properties: + +| Propriété | Type | Description | +| ------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| headerCharset | Text | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values: See possible charsets table below | +| bodyCharset | Text | Charset and encoding used for the html and text body contents of the email. Possible values: See possible charsets table below | + +Possible charsets: + +| Constant | Valeur | Commentaire | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
      • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      | +| mail mode ISO88591 | ISO-8859-1 |
      • headerCharset: ISO-8859-1 & Quoted-printable
      • bodyCharset: ISO-8859-1 & 8-bit
      | +| mail mode UTF8 | US-ASCII_UTF8_QP | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64 | + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Exemple + +To save an email in the Drafts mailbox: + +```4d +var $settings; $status; $msg; $imap: Object + +$settings:=New object("host"; "domain.com"; "user"; "xxxx"; "password"; "xxxx"; "port"; 993) + +$imap:=IMAP New transporter($settings) + +$msg:=New object +$msg.from:="xxxx@domain.com" +$msg.subject:="Lorem Ipsum" +$msg.textBody:="Lorem ipsum dolor sit amet, consectetur adipiscing elit." +$msg.keywords:=New object +$msg.keywords["$seen"]:=True//flag the message as read +$msg.keywords["$draft"]:=True//flag the message as a draft + +$status:=$imap.append($msg; "Drafts") +``` + + + + + + + + + + +## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.authenticationMode** : Text +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + + + + + + +## .checkConnection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.checkConnection()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------------- | +| Résultat | Objet | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propriété | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | Texte | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | Texte | Description of the 4D error | +| | \[ ].componentSignature | Texte | Signature of the internal component which returned the error | + + + + + + + +## .checkConnectionDelay + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.checkConnectionDelay** : Integer + +#### Description + +The `.checkConnectionDelay` property contains the maximum time (in seconds) allowed prior to checking the connection to the server. If this time is exceeded between two method calls, the connection to the server will be checked. By default, if the property has not been set in the *server* object, the value is 300. +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + + +## .connectionTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + +## .copy() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
      **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Paramètres | Type | | Description | +| -------------- | ----------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Entier long | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Texte | -> | Mailbox to receive copied messages | +| Résultat | Objet | <- | Status of the copy operation | + + +#### Description + +The `.copy()` function copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to copy, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to copy all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the copies of messages will be placed. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Exemple 1 + +To copy a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // copy found messages to the "documents" mailbox + $status:=$transporter.copy($mailIds;"documents") +``` + +#### Exemple 2 + +To copy all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + + $boxInfo:=$transporter.selectBox("inbox") + + // copy all messages to the "documents" mailbox + $status:=$transporter.copy(IMAP all;"documents") +``` + + + +## .createBox() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.createBox**( *name* : Text ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ---------------------------------------- | +| name | Texte | -> | Name of the new mailbox | +| Résultat | Objet | <- | Status of the mailbox creation operation | + + +#### Description + +The `.createBox()` function creates a mailbox with the given `name`. If the IMAP server’s hierarchy separator character appears elsewhere in the mailbox name, the IMAP server will create any parent names needed to create the given mailbox. + +In other words, an attempt to create "Projects/IMAP/Doc" on a server in which "/" is the hierarchy separator character will create: + +* Only the "Doc" mailbox if "Projects" & "IMAP" already exist. +* "IMAP" & "Doc" mailboxes if only “Projects†already exists. +* "Projects" & “IMAP†& "Doc" mailboxes, if they do not already exist. + +In the `name` parameter, pass the name of the new mailbox. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Exemple + +To create a new “Invoices†mailbox: + + +```4d +var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // retrieve the headers of the last 20 messages without marking them as read + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... +End for each + End if +``` + + + + + + + +## .delete() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.delete**( *msgsIDs* : Collection ) : Object
      **.delete**( *allMsgs* : Integer ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Entier long | -> | `IMAP all`: All messages in the selected mailbox | +| Résultat | Objet | <- | Status of the delete operation | + + +#### Description + +The `.delete()` function sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs`. + +You can pass: + +- in the `msgsIDs` parameter, a collection containing the unique IDs of the specific messages to delete, or +- in the `allMsgs` parameter, the `IMAP all` constant (integer) to delete all messages in the selected mailbox. + +Executing this function does not actually remove messages. Messages with the "delete" flag can still be found by the [.searchMails()](#searchmails) function. Flagged messages are deleted from the IMAP server with the [`.expunge()`](#expunge) function or by selecting another mailbox or when the [transporter object](#imap-transporter-object) (created with [IMAP New transporter](#imap-new-transporter)) is destroyed. + + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Exemple 1 + +To delete a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"Reports\"") + + // Delete selected messages + $status:=$transporter.delete($mailIds) +``` + +#### Exemple 2 + +To delete all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Junk Email") + + // delete all messages in the current mailbox + $status:=$transporter.delete(IMAP all) +``` + + + +## .deleteBox() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.deleteBox**( *name* : Text ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ---------------------------------------- | +| name | Texte | -> | Name of the mailbox to delete | +| Résultat | Objet | <- | Status of the mailbox deletion operation | + + +#### Description + +The `.deleteBox()` function permanently removes the mailbox with the given `name` from the IMAP server. Attempting to delete an INBOX or a mailbox that does not exist will generate an error. + +In the `name` parameter, pass the name of the mailbox to delete. +> * The function cannot delete a mailbox that has child mailboxes if the parent mailbox has the "\Noselect" attribute. +> * All messages in the deleted mailbox will also be deleted. +> * The ability to delete a mailbox depends on the mail server. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + + + +#### Exemple + +To delete the "Nova Orion Industries" child mailbox from the "Bills" mailbox hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// delete mailbox +$name:="Bills"+$transporter.getDelimiter()+"Nova Orion Industries" +$status:=$transporter.deleteBox($name) + +If ($status.success) + ALERT("Mailbox deletion successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .expunge() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.expunge()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------- | +| Résultat | Objet | <- | Status of the expunge operation | + +#### Description + +The `.expunge()` function removes all messages with the "deleted" flag from the IMAP mail server. The "deleted" flag can be set with the [`.delete()`](#delete) or [`.addFlags()`](#addflags) methods. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + +#### Exemple + +```4d +var $options;$transporter;$boxInfo;$status : Object +var $ids : Collection + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Find and delete all seen messages in INBOX +$ids:=$transporter.searchMails("SEEN") +$status:=$transporter.delete($ids) + +// Purge all messages flagged as deleted +$status:=$transporter.expunge() +``` + + + +## .getBoxInfo() + +
      Historique +| Version | Modifications | +| ------- | ---------------- | +| v18 R5 | name is optional | +| v18 R4 | Ajoutées | +
      + +**.getBoxInfo**( { *name* : Text }) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------- | +| name | Texte | -> | Name of the mailbox | +| Résultat | Objet | <- | boxInfo object | + + +#### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox *name*. This function returns the same information as [`.selectBox()`](#selectbox) without changing the current mailbox. + +In the optional *name* parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Propriété | Type | Description | +| ---------- | ------ | ------------------------------------------------------------------- | +| name | text | Name of the mailbox | +| mailCount | number | Nombre de messages contenus dans la boîte de réception | +| mailRecent | number | Number of messages with the "recent" flag (indicating new messages) | + + + +#### Exemple + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $info:=$transporter.getBoxInfo("INBOX") + ALERT("INBOX contains "+String($info.mailRecent)+" recent emails.") +``` + + + + + +## .getBoxList() + +
      Historique +| Version | Modifications | +| ------- | ---------------------------- | +| v18 R4 | Ajoutées | +| v19 | Add `isSubscribed` parameter | +
      + +**.getBoxList**( { *parameters* : Object } ) : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ----------------------------- | +| parameters | Objet | -> | Parameter object | +| Résultat | Collection | <- | Collection of mailbox objects | + + +#### Description + +The `.getBoxList()` function returns a collection of mailboxes describing all of the available mailboxes. This function allows you to locally manage the list of messages located on the IMAP mail server. + +In the optional `parameters` parameter, pass an object containing values to filter the returned mailboxes. You can pass: + +| Propriété | Type | Description | +| ------------ | ------- | ---------------------------------------------------- | +| isSubscribed | Booléen |
    • **True** to return only subscribed mailboxes
    • **False** to return all available mailboxes
    • | + +#### Résultat + +Each object of the returned collection contains the following properties: + +| Propriété | Type | Description | +| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------- | +| \[].name | Texte | Name of the mailbox | +| \[].selectable | boolean | Indicates whether or not the access rights allow the mailbox to be selected:
      • true - the mailbox can be selected
      • false - the mailbox can not be selected
      | +| \[].inferior | boolean | Indicates whether or not the access rights allow creating a lower hierachy in the mailbox:
      • true - a lower level can be created
      • false - a lower level can not be created
      | +| \[].interesting | boolean | Indicates if the mailbox has been marked "interesting" by the server:
      • true - The mailbox has been marked "interesting" by the server. For example, it may contain new messages.
      • false - The mailbox has not been marked "interesting" by the server.
      | + + +If the account does not contain any mailboxes, an empty collection is returned. +> * If there is no open connection, `.getBoxList()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the `.checkConnection( )` function is automatically called. + + +#### Exemple + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getDelimiter() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.getDelimiter()** : Text +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ----------------------------- | +| Résultat | Texte | <- | Hierarchy delimiter character | + + +#### Description + +The `.getDelimiter()` function returns the character used to delimit levels of hierarchy in the mailbox name. + +The delimiter is a character which can be used to: + +* create lower level (inferior) mailboxes +* search higher or lower within the mailbox hierarchy + + +#### Résultat + +Mailbox name delimiter character. +> * If there is no open connection, `.getDelimiter()` will open a connection. +> * If the connection has not been used since the [designated connection delay](#checkconnectiondelay), the [`.checkConnection()`](#checkconnection) function is automatically called. + + + +#### Exemple + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getMail() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
      **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------ | +| msgNumber | Entier long | -> | Sequence number of the message | +| msgID | Texte | -> | ID unique du message | +| options | Objet | -> | Message handling instructions | +| Résultat | Objet | <- | [Email object](EmailObjectClass.md#email-object) | + + +#### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. This function allows you to locally handle the email contents. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *options* parameter allows you pass an object defining additional instructions for handling the message. The following properties are available: + +| Propriété | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | boolean | If True, the message is marked as "seen" in the mailbox. If False, the message is not marked as "seen". Default value: True | +| withBody | boolean | Pass True to return the body of the message. If False, only the message header is returned. Default value: True | +> * The function generates an error and returns **Null** if *msgID* designates a non-existing message, +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) function, an error is generated, +> * If there is no open connection, `.getMail()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox)`. + + + +#### Résultat + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object) with the following specific IMAP properties: *id*, *receivedAt*, and *size*. + +#### Exemple + +You want to get the message with ID = 1: + +```4d + var $server : Object + var $info; $mail; $boxInfo : Variant + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get Email object with ID 1 + $mail:=$transporter.getMail(1) +``` + + + + +## .getMails() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
      **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------------ | +| ids | Collection | -> | Collection of message ID | +| startMsg | Entier long | -> | Sequence number of the first message | +| endMsg | Entier long | -> | Sequence number of the last message | +| options | Objet | -> | Message handling instructions | +| Résultat | Objet | <- | Object containing:
      • a collection of [Email objects](EmailObjectClass.md#email-object) and
      • a collection of IDs or numbers for missing messages, if any
      | + + +#### Description + +The `.getMails()` function returns an object containing a collection of `Email` objects. + +**First Syntax:** + +***.getMails( ids { ; options } ) -> result*** + +The first syntax allows you to retrieve messages based on their IDs. + +In the *ids* parameter, pass a collection of IDs for the messages to return. You can get the IDs with [`.getMail()`](#getmail). + +The optional *options* parameter allows you to define the parts of the messages to be returned. See the **Options** table below for a description of the available properties. + +**Second syntax:** + + ***.getMails( startMsg ; endMsg { ; options } ) -> result*** + +The second syntax allows you to retrieve messages based on a sequential range. The values passed represent the position of the messages in the mailbox. + +In the *startMsg* parameter, pass an *integer* value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an *integer* value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + +The optional *options* parameter allows you to define the parts of the messages to be returned. + +**Options** + +| Propriété | Type | Description | +| ---------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | Booléen | If True, the specified messages are marked as "seen" in the mailbox. If False, the messages are not marked as "seen". Default value: True | +| withBody | Booléen | Pass True to return the body of the specified messages. If False, only the message headers are returned. Default value: True | +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated. +> * If there is no open connection, `.getMails()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox). + + +#### Résultat + +`.getMails()` returns an object containing the following collections: + + +| Propriété | Type | Description | +| --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| liste | Collection | Collection of [`Email` objects](EmailObjectClass.md#email-object). If no Email objects are found, an empty collection is returned. | + +|notFound |Collection| Collection of:
      • first syntax - previously passed message IDs that do not exist
      • second syntax - sequence numbers of messages between startMsg and endMsg that do not exist
      An empty collection is returned if all messages are found.| + + +#### Exemple + +You want to retrieve the 20 most recent emails without changing their "seen" status: + +```4d + var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // retrieve the headers of the last 20 messages without marking them as read + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... + End for each + End if +``` + + + + +## .getMIMEAsBlob() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
      **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob + +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| --------------------------------------------------------------------------------------------- | +| msgNumber | Entier long | -> | Sequence number of the message | +| msgID | Texte | -> | ID unique du message | +| updateSeen | Booléen | -> | If True, the message is marked "seen" in the mailbox. If False the message is left untouched. | +| Résultat | BLOB | <- | Blob of the MIME string returned from the mail server | + + + + +#### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *updateSeen* parameter allows you to specify if the message is marked as "seen" in the mailbox. You can pass: + +* **True** - to mark the message as "seen" (indicating the message has been read) +* **False** - to leave the message's "seen" status untouched > * The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, > * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated, > * If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox( )`. +> * The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, +> * > * The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, > * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated, > * If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox()`. +> * If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox()`. + + +#### Résultat + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +#### Exemple + + +```4d + var $server : Object + var $boxInfo : Variant + var $blob : Blob + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get BLOB + $blob:=$transporter.getMIMEAsBlob(1) +``` + + + + +## .host + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + +## .logFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .move() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
      **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Paramètres | Type | | Description | +| -------------- | ----------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Entier long | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Texte | -> | Mailbox to receive moved messages | +| Résultat | Objet | <- | Status of the move operation | + + +#### Description + +The `.move()` function moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to move, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to move all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the messages will be moved. + +> This function is only supported by IMAP servers compliant with RFC [8474](https://tools.ietf.org/html/rfc8474). + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Exemple 1 + +To move a selection of messages: + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // Move found messages from the current mailbox to the "documents" mailbox + $status:=$transporter.move($mailIds;"documents") +``` + +#### Exemple 2 + +To move all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + // move all messages in the current mailbox to the "documents" mailbox + $status:=$transporter.move(IMAP all;"documents") +``` + + + + +## .numToID() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------ | +| startMsg | Entier long | -> | Sequence number of the first message | +| endMsg | Entier long | -> | Sequence number of the last message | +| Résultat | Collection | <- | Collection of unique IDs | + + +#### Description + +The `.numToID()` function converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg* in the currently selected mailbox. + +In the *startMsg* parameter, pass an integer value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an integer value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + + +#### Résultat + +The function returns a collection of strings (unique IDs). + +#### Exemple + + +```4d + var $transporter : 4D.IMAPTransporter + var $server;$boxInfo;$status : Object + var $mailIds : Collection + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get IDs for 5 last messages received + $mailIds:=$transporter.numToID(($boxInfo.mailCount-5);$boxInfo.mailCount) + + //delete the messages from the current mailbox + $status:=$transporter.delete($mailIds) +``` + + + +## .removeFlags() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
      **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
      **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Collection | -> | Collection of strings: Message unique IDs (text)
      Text: Unique ID of a message
      Longint (IMAP all): All messages in the selected mailbox | +| keywords | Objet | -> | Keyword flags to remove | +| Résultat | Objet | <- | Status of the removeFlags operation | + + +#### Description + +The `.removeFlags()` function removes flags from the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Valeur | Commentaire | + | -------- | ------ | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to remove from `msgIDs`. You can pass any of the following keywords: + +| Paramètres | Type | Description | +| ---------- | ------- | --------------------------------------------------- | +| $draft | Booléen | True to remove the "draft" flag from the message | +| $seen | Booléen | True to remove the "seen" flag from the message | +| $flagged | Booléen | True to remove the "flagged" flag from the message | +| $answered | Booléen | True to remove the "answered" flag from the message | +| $deleted | Booléen | True to remove the "deleted" flag from the message | + +Note that False values are ignored. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + +#### Exemple + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as unseen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.removeFlags(IMAP all;$flags) +``` + + + +## .renameBox() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object +| Paramètres | Type | | Description | +| ----------- | ----- |:--:| -------------------------------- | +| currentName | Texte | -> | Name of the current mailbox | +| newName | Texte | -> | New mailbox name | +| Résultat | Objet | <- | Status of the renaming operation | + + +#### Description + +The `.renameBox()` function changes the name of a mailbox on the IMAP server. Attempting to rename a mailbox from a mailbox name that does not exist or to a mailbox name that already exists will generate an error. + +In the `currentName` parameter, pass the name of the mailbox to be renamed. + +Pass the new name for the mailbox in the `newName` parameter. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + +#### Exemple + +To to rename your “Invoices†mailbox to “Billsâ€: + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// rename mailbox +$status:=$transporter.renameBox("Invoices"; "Bills") + +If ($status.success) + ALERT("Mailbox renaming successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .port + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + +## .searchMails() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R5 | Ajoutées | +
      + +**.searchMails**( *searchCriteria* : Text ) : Collection +| Paramètres | Type | | Description | +| -------------- | ---------- |:--:| ----------------------------- | +| searchCriteria | Texte | -> | Search criteria | +| Résultat | Collection | <- | Collection of message numbers | + + +#### Description + +> This function is based upon the specification for the [IMAP protocol](https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol). + +The `.searchMails()` function searches for messages that match the given *searchCriteria* in the current mailbox. *searchCriteria* consists of one or more search keys. + +*searchCriteria* is a text parameter listing one or more search keys (see [Authorized search-keys](#authorized-search-keys) below) associated or not with values to look for. A search key may be a single or multiple items. Par exemple : + +``` +SearchKey1 = FLAGGED +SearchKey2 = NOT FLAGGED +SearchKey3 = FLAGGED DRAFT +``` + +> Matching is usually not case-sensitive + +- If the *searchCriteria* is a null string, the search will be equivalent to a “select allâ€. +- If the *searchCriteria* includes multiple search keys, the result is the intersection (AND function) of all the messages that match those keys. + +``` +searchCriteria = FLAGGED FROM "SMITH" +``` +... returns all messages with \Flagged flag set AND sent by Smith. +- You can use the **OR** or **NOT** operators as follows: + +``` +searchCriteria = OR SEEN FLAGGED +``` +... returns all messages with \Seen flag set OR \Flagged flag set + +``` +searchCriteria = NOT SEEN +``` +... returns all messages with \Seen flag not set. + +``` +searchCriteria = HEADER CONTENT-TYPE "MIXED" NOT HEADER CONTENT-TYPE "TEXT"... +``` +... returns message whose content-type header contains “Mixed†and does not contain “Textâ€. + +``` +searchCriteria = HEADER CONTENT-TYPE "E" NOT SUBJECT "o" NOT HEADER CONTENT-TYPE "MIXED" +``` +... returns message whose content-type header contains “ e †and whose Subject header does not contain “ o †and whose content-type header is not “ Mixed â€. + +As concerns the last two examples, notice that the result of the search is different when you remove the parentheses of the first search key list. + +- The *searchCriteria* may include the optional \[CHARSET] specification. This consists of the "CHARSET" word followed by a registered \[CHARSET] (US ASCII, ISO-8859). It indicates the charset of the *searchCriteria* string. Therefore, you must convert the *searchCriteria* string into the specified charset if you use the \[CHARSET] specification (see the `CONVERT FROM TEXT` or `Convert to text` commands). By default, 4D encodes in Quotable Printable the searchCriteria string if it contains extended characters. + +``` +searchCriteria = CHARSET "ISO-8859" BODY "Help" +``` +... means the search criteria uses the charset iso-8859 and the server will have to convert the search criteria before searching, if necessary. + + +#### Search value types + +Search-keys may request the value to search for: + +- **Search-keys with a field-name value**: the field-name is the name of a header field. Example: `searchCriteria = HEADER CONTENT-TYPE "MIXED"` + +- **Search-keys with a string value**: the string may contain any character and must be quoted. If the string does not contain any special characters, like the space character for instance, it does not need to be quoted. Quoting such strings will ensure that your string value will be correctly interpreted. Example: `searchCriteria = FROM "SMITH"` For all search keys that use strings, a message matches the key if the string is a substring of the field. Matching is not case-sensitive. + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. Example: `searchCriteria = KEYWORD \Flagged \Draft` + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. Example: `searchCriteria = KEYWORD \Flagged \Draft` + +- **Search-keys with a message set value**: Identifies a set of messages. For message sequence numbers, these are consecutive numbers from 1 to the total number of messages in the mailbox. A comma delimits individual numbers; a colon delimits between two numbers inclusive. Examples: `2,4:7,9,12:*` is `2,4,5,6,7,9,12,13,14,15` for a mailbox with 15 messages. `searchCriteria = 1:5 ANSWERED` search in message selection from message sequence number 1 to 5 for messages which have the \Answered flag set. `searchCriteria= 2,4 ANSWERED` search in the message selection (message numbers 2 and 4) for messages which have the \Answered flag set. + + +#### Authorized search-keys + +**ALL**: All messages in the mailbox. +**ANSWERED**: Messages with the \Answered flag set. +**UNANSWERED**: Messages that do not have the \Answered flag set. +**DELETED**: Messages with the \Deleted flag set. +**UNDELETED**: Messages that do not have the \Deleted flag set. +**DRAFT**: Messages with the \Draft flag set. +**UNDRAFT**: Messages that do not have the \Draft flag set. +**FLAGGED**: Messages with the \Flagged flag set. +**UNFLAGGED**: Messages that do not have the \Flagged flag set. +**RECENT**: Messages that have the \Recent flag set. +**OLD**: Messages that do not have the \Recent flag set. +**SEEN**: Messages that have the \Seen flag set. +**UNSEEN**: Messages that do not have the \Seen flag set. +**NEW**: Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to “(RECENT UNSEEN)â€. +**KEYWORD** : Messages with the specified keyword set. +**UNKEYWORD** : Messages that do not have the specified keyword set. +**BEFORE** : Messages whose internal date is earlier than the specified date. +**ON** : Messages whose internal date is within the specified date. +**SINCE** : Messages whose internal date is within or later than the specified date. +**SENTBEFORE** : Messages whose Date header is earlier than the specified date. +**SENTON** : Messages whose Date header is within the specified date. +**SENTSINCE** : Messages whose Date header is within or later than the specified date. +**TO** : Messages that contain the specified string in the TO header. +**FROM** : Messages that contain the specified string in the FROM header. +**CC** : Messages that contain the specified string in the CC header. +**BCC** : Messages that contain the specified string in the BCC header. +**SUBJECT** : Messages that contain the specified string in the Subject header. +**BODY** : Messages that contain the specified string in the message body. +**TEXT** : Messages that contain the specified string in the header or in the message body. +**HEADER** : Messages that have a header with the specified field-name and that contain the specified string in the field-body. +**UID** : Messages with unique identifiers corresponding to the specified unique identifier set. +**LARGER** : Messages with a size larger than the specified number of bytes. +**SMALLER** : Messages with a size smaller than the specified number of bytes. +**NOT** : Messages that do not match the specified search key. +**OU** : Messages that match either search key. + + + + +## .selectBox() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R4 | Ajoutées | +
      + +**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| --------------------- | +| name | Texte | -> | Name of the mailbox | +| state | Entier long | -> | Mailbox access status | +| Résultat | Objet | <- | boxInfo object | + + +#### Description + +The `.selectBox()` function selects the `name` mailbox as the current mailbox. This function allows you to retrieve information about the mailbox. +> To get the information from a mailbox without changing the current mailbox, use [`.getBoxInfo()`](#getboxinfo). + +In the `name` parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + +The optional `state` parameter defines the type of access to the mailbox. The possible values are: + +| Constant | Valeur | Commentaire | +| --------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IMAP read only state | 1 | The selected mailbox is accessed with read only privileges. Messages with a "recent" flag (indicating new messages) remain unchanged. | +| IMAP read write state | 0 | The selected mailbox is accessed with read and write privileges. Messages are considered "seen" and lose the "recent" flag (indicating new messages). (Default value) | +> * The function generates an error and returns **Null** if name designates a non-existing mailbox. +> * If there is no open connection, `.selectBox()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the [`.checkConnection()`](#checkconnection) function is automatically called. + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Propriété | Type | Description | +| ---------- | ------ | ------------------------------------------------------ | +| name | Texte | Name of the mailbox | +| mailCount | number | Nombre de messages contenus dans la boîte de réception | +| mailRecent | number | Number of messages with the "recent" flag | + + +#### Exemple + + +```4d + var $server; $boxinfo : Object + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + $boxInfo:=$transporter.selectBox("INBOX") +``` + + + + +## .subscribe() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.subscribe**( *name* : Text ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| --------------------------------- | +| name | Texte | -> | Name of the mailbox | +| Résultat | Objet | <- | Status of the subscribe operation | + + +#### Description + +The `.subscribe()` function allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes. As such, you can choose to narrow down a large list of available mailboxes by subscribing to those you usually want to see. + +In the `name` parameter, pass the name of the mailbox to add (subscribe) to your "subscribed" mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + + +#### Exemple + +To subscribe to the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.subscribe($name) + +If ($status.success) + ALERT("Mailbox subscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + +## .unsubscribe() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.unsubscribe**( *name* : Text ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ----------------------------------- | +| name | Texte | -> | Name of the mailbox | +| Résultat | Objet | <- | Status of the unsubscribe operation | + + +#### Description + +The `.unsubscribe()` function removes a mailbox from a set of subscribed mailboxes. This allows you reduce the number of mailboxes you usually see. + +In the `name` parameter, pass the name of the mailbox to remove (unsubscribe) from your active mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Propriété | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Booléen | True if the operation is successful, False otherwise | +| statusText | | Texte | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | + + + +#### Exemple + +To unsubscribe from the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.unsubscribe($name) + +If ($status.success) + ALERT("Mailbox unsubscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + +## .user + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + + + diff --git a/website/translated_docs/fr/API/MailAttachmentClass.md b/website/translated_docs/fr/API/MailAttachmentClass.md new file mode 100644 index 00000000000000..0c50f6684bdf3b --- /dev/null +++ b/website/translated_docs/fr/API/MailAttachmentClass.md @@ -0,0 +1,271 @@ +--- +id: MailAttachmentClass +title: MailAttachment +--- + +Attachment objects allow referencing files within a [`Email`](EmailObjectClass.md) object. Attachment objects are created using the [`MAIL New attachment`](#mail-new-attachment) command. + + +### Attachment Object + +Attachment objects provide the following read-only properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cid** : Text](#cid)

           the ID of the attachment | +| [**.disposition** : Text](#disposition)

          the value of the `Content-Disposition` header | +| [**.getContent()** : 4D.Blob](#getcontent)

          returns the contents of the attachment object in a `4D.Blob` object | +| [**.name** : Text](#name)

          the name and extension of the attachment | +| [**.path** : Text](#path)

          the POSIX path of the attachment file, if it exists | +| [**.platformPath** : Text](#platformpath)

          the path of the attachment file expressed with the current platform syntax | +| [**.type** : Texte](#type)

          the `content-type` of the attachment file | + + +## MAIL New attachment + +

      Historique +| Version | Modifications | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
      + +**MAIL New attachment**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **MAIL New attachment**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **MAIL New attachment**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **MAIL New attachment**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Paramètres | Type | | Description | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Text | -> | Value of the content-disposition header: "inline" or "attachment". | +| Résultat | 4D.MailAttachment | <- | Attachment object | + + +#### Description + +The `MAIL New attachment` command allows you to create an attachment object that you can add to an [Email object](EmailObjectClass.md#email-object). + +To define the attachment, you can use: + +- a *file*, pass a `4D.File` object containing the attachment file. +- a *zipfile*, pass a `4D.ZipFile` object containing the attachment file. +- a *blob*, pass a `4D.Blob` object containing the attachment itself. +- a *path*, pass a **text** value containing the path of the attachment file, expressed with the system syntax. You can pass a full path name or a simple file name (in which case 4D will search for the file in the same directory as the project file). + +The optional *name* parameter lets you pass the name and extension to be used by the mail client to designate the attachment. If *name* is omitted and: + +* you passed a file path, the name and extension of the file is used, +* you passed a BLOB, a random name without extension is automatically generated. + +The optional *cid* parameter lets you pass an internal ID for the attachment. This ID is the value of the `Content-Id` header, it will be used in HTML messages only. The cid associates the attachment with a reference defined in the message body using an HTML tag such as `\`. This means that the contents of the attachment (e.g., a picture) should be displayed within the message on the mail client. The final result may vary depending on the mail client. You can pass an empty string in *cid* if you do not want to use this parameter. + +You can use the optional *type* parameter to explicitly set the `content-type` of the attachment file. For example, you can pass a string defining a MIME type ("video/mpeg"). This content-type value will be set for the attachment, regardless of its extension. For more information about MIME types, please refer to the [MIME type page on Wikipedia](https://en.wikipedia.org/wiki/MIME). + +By default, if the *type* parameter is omitted or contains an empty string, the `content-type` of the attachment file is based on its extension. The following rules are applied for the main MIME types: + +| Extension | Content Type | +| --------- | ----------------------------- | +| jpg, jpeg | image/jpeg | +| png | image/png | +| gif | image/gif | +| pdf | application/pdf | +| doc | application/msword | +| xls | application/vnd.ms-excel | +| ppt | application/vnd.ms-powerpoint | +| zip | application/zip | +| gz | application/gzip | +| json | application/json | +| js | application/javascript | +| ps | application/postscript | +| xml | application/xml | +| htm, html | text/html | +| mp3 | audio/mpeg | +| *other* | application/octet-stream | + +The optional *disposition* parameter lets you pass the `content-disposition` header of the attachment. You can pass one of the following constants from the "Mail" constant theme: + +| Constant | Valeur | Commentaire | +| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| mail disposition attachment | "attachment" | Set the Content-disposition header value to "attachment", which means that the attachment file must be provided as a link in the message. | +| mail disposition inline | "inline" | Set the Content-disposition header value to "inline", which means that the attachment must be rendered within the message contents, at the "cid" location. The rendering depends on the mail client. | + +By default, if the *disposition* parameter is omitted: + +* if the *cid* parameter is used, the `Content-disposition` header is set to "inline", +* if the *cid* parameter is not passed or empty, the `Content-disposition` header is set to "attachment". + +#### Exemple 1 + +You want to send an email with a user-selected file as an attachment and an image embedded in the HTML body: + +```4d +$doc:=Select document("";"*";"Please select a file to attach";0) +If (OK=1) //If a document was selected + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="test_user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="test_user@mail.com" +$email.to:="test_user@mail.com" +$email.subject:="This is a test message with attachments" + +//add a link to download file +$email.attachments:=New collection(MAIL New attachment(Document)) +//insert an inline picture (use a cid) +$email.attachments[1]:=MAIL New attachment("c:\\Pictures\\4D.jpg";"";"4D") + +$email.htmlBody:=""+\ +"Hello World!"+\ +""+\ +""+\ +""+\ +"" + +$transporter.send($email) //send mail + +End if +``` + +#### Exemple 2 + +You want to send an email with a 4D Write Pro area as an attachment: + +```4d +C_BLOB($blob) +WP EXPORT VARIABLE(WPArea;$blob;wk docx) + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="user@mail.com" +$email.to:="customer@mail.com" +$email.subject:="New annual report" +$email.textBody:="Please find enclosed our latest annual report." +$email.attachments:=New collection(MAIL New attachment($blob;"Annual report.docx")) + +$transporter.send($email) +``` + + +## 4D.MailAttachment.new() + +
      Historique +| Version | Modifications | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
      + +**4D.MailAttachment.new**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **4D.MailAttachment.new**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **4D.MailAttachment.new**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
      **4D.MailAttachment.new**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Paramètres | Type | | Description | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Text | -> | Value of the content-disposition header: "inline" or "attachment". | +| Résultat | 4D.MailAttachment | <- | Attachment object | + + +#### Description + +The `4D.MailAttachment.new()` function creates and returns a new object of the `4D.MailAttachment` type. It is identical to the [`MAIL New attachment`](#mail-new-attachment) command (shortcut). + + +## .cid + +**.cid** : Text + +#### Description + +The `.cid` property contains the ID of the attachment. This property is used in HTML messages only. If this property is missing, the file is handled as a simple attachment (link). + + +## .disposition + +**.disposition** : Text + +#### Description + +The `.disposition` property contains the value of the `Content-Disposition` header. Two values are available: + +* "inline": the attachment is rendered within the message contents, at the "cid" location. The rendering depends on the mail client. +* "attachment": the attachment is provided as a link in the message. + + +## .getContent() + +**.getContent()** : 4D.Blob +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------- | +| Résultat | 4D.Blob | <- | Content of the attachment | + + +#### Description + +The `.getContent()` function returns the contents of the attachment object in a `4D.Blob` object. You can use this method with attachment objects received by the [`MAIL Convert from MIME`](#mail-convert-from-mime) command. + + + +## .name + +**.name** : Text + +#### Description + +The `.name` property contains the name and extension of the attachment. By default, it is the name of the file, unless another name was specified in the [`MAIL New attachment`](#mail-new-attachment) command. + +## .path + +**.path** : Text + +#### Description + +The `.path` property contains the POSIX path of the attachment file, if it exists. + + +## .platformPath + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the attachment file expressed with the current platform syntax. + + +## .type + +**.type** : Texte + +#### Description + +The `.type` property contains the `content-type` of the attachment file. If this type is not explicitly passed to the [`MAIL New attachment`](#mail-new-attachment) command, the `content-type` is based on its file extension. + + + + diff --git a/website/translated_docs/fr/API/POP3TransporterClass.md b/website/translated_docs/fr/API/POP3TransporterClass.md new file mode 100644 index 00000000000000..71d7287eeb19ff --- /dev/null +++ b/website/translated_docs/fr/API/POP3TransporterClass.md @@ -0,0 +1,694 @@ +--- +id: POP3TransporterClass +title: POP3Transporter +--- + +La classe `POP3Transporter` vous permet de récupérer des messages à partir d'un serveur de messagerie POP3. + + +### Objet POP3 Transporter + +Les objets Transporter POP3 sont instanciés avec la commande [POP3 New transporter](#pop3-new-transporter). They provide the following properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

           checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.delete**( *msgNumber* : Integer )](#delete)

          flags the *msgNumber* email for deletion from the POP3 server | +| [**.getBoxInfo()** : Object](#getboxinfo)

          returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMail**( *msgNumber* : Integer ) : Object](#getmail)

          returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfo**( *msgNumber* : Integer ) : Object](#getmailinfo)

          returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfoList()** : Collection](#getmailinfolist)

          returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob](#getmimeasblob)

          returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object) | +| [**.host** : Text](#host)

          the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

           the port number used for mail transactions | +| [**.undeleteAll()**](#undeleteall)

          removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object) | +| [**.user** : Text](#user)

           the user name used for authentication on the mail server | + + + +## POP3 New transporter + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**POP3 New transporter**( *server* : Object ) : 4D.POP3Transporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| -------------------------------------------------- | +| server | object | -> | Mail server information | +| Résultat | 4D.POP3Transporter | <- | [Objet POP3 transporter](#pop3-transporter-object) | + + +#### Description + +The `POP3 New transporter` command configures a new POP3 connectionaccording to the *server* parameter and returns a new *[POP3 transporter](#pop3-transporter-object)* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + + +| *server* | Default value (if omitted) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | Faux | +| .**accessTokenOAuth2**: Text
      .**accessTokenOAuth2**: Object

      Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

          the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | none | +| **.password** : Text

      User password for authentication on the server. Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.port** : Integer](#port)

           the port number used for mail transactions | 995 | +| [**.user** : Text](#user)

           the user name used for authentication on the mail server | none | + + +#### Résultat + +La fonction retourne un [**objet POP3 transporter**](#pop3-transporter-object). All returned properties are **read-only**. +> La connexion POP3 est automatiquement fermée lorsque l'objet transporteur est détruit. + +#### Exemple + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Obligatoire + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + $server.logFile:="LogTest.txt" //log à enregistrer dans le dossier Logs + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + $status:=$transporter.checkConnection() + If(Not($status.success)) + ALERT("An error occurred receiving the mail: "+$status.statusText) + End if +``` + + +## 4D.POP3Transporter.new() + + +**4D.POP3Transporter.new**( *server* : Object ) : 4D.POP3Transporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| -------------------------------------------------- | +| server | Objet | -> | Mail server information | +| Résultat | 4D.POP3Transporter | <- | [Objet POP3 transporter](#pop3-transporter-object) | + +#### Description + +The `4D.POP3Transporter.new()` function creates and returns a new object of the `4D.POP3Transporter` type. Elle est identique à la commande [`POP3 New transporter`](#pop3-new-transporter) (raccourci). + +## .acceptUnsecureConnection + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + + +## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + + + + +## .checkConnection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.checkConnection()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------------- | +| Résultat | Objet | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propriété | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | Texte | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | Texte | Description of the 4D error | +| | \[ ].componentSignature | Texte | Signature of the internal component which returned the error | + + + + + +#### Exemple + +```4d + var $pw : Text + var $options : Object + $options:=New object + + $pw:=Request("Please enter your password:") + if(OK=1) + $options.host:="pop3.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=POP3 New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success) + ALERT("POP3 connection check successful!") + Else + ALERT("Error: "+$status.statusText) + End if + End if +``` + + +## .connectionTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + +## .delete() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.delete**( *msgNumber* : Integer ) +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------- | +| msgNumber | Entier long | -> | Number of the message to delete | + + +##### Description + +The `.delete( )` function flags the *msgNumber* email for deletion from the POP3 server. + +In the *msgNumber* parameter, pass the number of the email to delete. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +Executing this method does not actually remove any email. The flagged email will be deleted from the POP3 server only when the `POP3_transporter` object (created with `POP3 New transporter`) is destroyed. The flag could be also be removed using the `.undeleteAll()` method. +> If the current session unexpectedly terminates and the connection is closed (e.g., timeout, network failure, etc.), an error message is generated and messages marked for deletion will remain on the POP3 server. + +##### Exemple + +```4d + $mailInfoList:=$POP3_transporter.getMailInfoList() + For each($mailInfo;$mailInfoList) + // Marquer votre e-mail comme "à supprimer à la fin de la session" + $POP3_transporter.delete($mailInfo.number) + End for each + // Forcer la fermeture de la session pour supprimer les e-mails marqués pour suppression + CONFIRM("Selected messages will be deleted.";"Delete";"Undo") + If(OK=1) //suppression confirmée + $POP3_transporter:=Null + Else + $POP3_transporter.undeleteAll() //supprimer les marqueurs de suppression + End if +``` + + + + +## .getBoxInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.getBoxInfo()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| -------------- | +| Résultat | Objet | <- | boxInfo object | + + +##### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the mailbox. + +The `boxInfo` object returned contains the following properties: + +| Propriété | Type | Description | +| --------- | ------ | ------------------------------------------------------ | +| mailCount | Number | Nombre de messages contenus dans la boîte de réception | +| size | Number | Taille du message en octets | + + + +##### Exemple + +```4d + var $server; $boxinfo : Object + + $server:=New object + $server.host:="pop.gmail.com" //Obligatoire + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + //mailbox info + $boxInfo:=$transporter.getBoxInfo() + ALERT("The mailbox contains "+String($boxInfo.mailCount)+" messages.") +``` + + + + +## .getMail() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.getMail**( *msgNumber* : Integer ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ------------------------------------------------ | +| msgNumber | Entier long | -> | Number of the message in the list | +| Résultat | Objet | <- | [Email object](EmailObjectClass.md#email-object) | + + +##### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally handle the email contents. + +Pass in *msgNumber* the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) function. + +The method returns Null if: + +* *msgNumber* désigne un message inexistant, +* le message a été marqué pour suppression à l'aide de `.delete()`. + + +**Returned object** + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object). + + +##### Exemple + +You want to know the sender of the first mail of the mailbox: + +```4d + var $server; $transporter : Object + var $mailInfo : Collection + var $sender : Variant + + $server:=New object + $server.host:="pop.gmail.com" //Obligatoire + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $sender:=$transporter.getMail($mailInfo[0].number).from +``` + + + + +## .getMailInfo() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.getMailInfo**( *msgNumber* : Integer ) : Object +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| --------------------------------- | +| msgNumber | Entier long | -> | Number of the message in the list | +| Résultat | Objet | <- | mailInfo object | + + +##### Description + +The `.getMailInfo()` function returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the email. + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfo) method. + +The `mailInfo` object returned contains the following properties: + +| Propriété | Type | Description | +| --------- | ------ | --------------------------- | +| size | Nombre | Taille du message en octets | +| id | Texte | ID unique du message | + +The method returns **Null** if: + +* *msgNumber* désigne un message inexistant, +* le message a été marqué pour suppression à l'aide de `.delete()`. + + +##### Exemple + + +```4d + var $server; $mailInfo : Object + var $mailNumber : Integer + + $server.host:="pop.gmail.com" //Obligatoire + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + //message info + $mailInfo:=$transporter.getMailInfo(1) //obtenir le premier e-mail + If($mailInfo #Null) + ALERT("First mail size is:"+String($mailInfo.size)+" bytes.") + End if +``` + + + + +## .getMailInfoList() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.getMailInfoList()** : Collection +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| -------------------------------- | +| Résultat | Collection | <- | Collection of `mailInfo` objects | + + +##### Description + +The `.getMailInfoList()` function returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally manage the list of messages located on the POP3 mail server. + +Each `mailInfo` object in the returned collection contains the following properties: + +| Propriété | Type | Description | +| ------------ | ------ | ------------------------------------------------------------------ | +| \[ ].size | Nombre | Taille du message en octets | +| \[ ].number | Nombre | Numéro du message | +| \[ ].id | Texte | ID unique du message (utile si vous stockez le message localement) | + +If the mailbox does not contain a message, an empty collection is returned. + + + +#### number and ID properties + +*number* is the number of a message in the mailbox at the time the `POP3_transporter` was created. The *number* property is not a static value in relation to any specific message and will change from session to session dependent on its relation to other messages in the mailbox at the time the session was opened. The numbers assigned to the messages are only valid during the lifetime of the [`POP3_transporter`](#pop3-transporter-object). At the time the `POP3_transporter` is deleted any message marked for deletion will be removed. When the user logs back into the server, the current messages in the mailbox will be renumbered from 1 to x. + +The *id* however is a unique number assigned to the message when it was received by the server. This number is calculated using the time and date that the message is received and is a value assigned by your POP3 server. Unfortunately, POP3 servers do not use the *id* as the primary reference to their messages. Throughout the POP3 sessions you will need to specify the *number* as the reference to messages on the server. Developers may need to take some care if developing solutions which bring references to messages into a database but leave the body of the message on the server. + + +##### Exemple + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Obligatoire + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + C_COLLECTION($mailInfo) + C_LONGINT($vNum;$vSize) + + $mailInfo:=$transporter.getMailInfoList() + $vNum:=$mailInfo.length + $vSize:=$mailInfo.sum("size") + + ALERT("The mailbox contains "+String($vNum)+" message(s) for "+String($vSize)+" bytes.") +``` + + + + +## .getMIMEAsBlob() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | +
      + +**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob +| Paramètres | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------------------- | +| msgNumber | Entier long | -> | Number of the message in the list | +| Résultat | Blob | <- | Blob of the MIME string returned from the mail server | + + +##### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object). + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +The method returns an empty BLOB if: + +* *msgNumber* désigne un message inexistant, +* le message a été marqué pour suppression à l'aide de `.delete()`. + + +**Returned BLOB** + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +##### Exemple + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + var $mailInfo : Collection + var $blob : Blob + var $transporter : 4D.POP3Transporter + + $server:=New object + $server.host:="pop.gmail.com" + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $blob:=$transporter.getMIMEAsBlob($mailInfo[0].number) +``` + + + +## .host + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + + +## .logFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .port + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + + +## .undeleteAll() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R2 | Ajoutées | +
      + +**.undeleteAll()** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +##### Description + +The `.undeleteAll()` function removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object). + + + + +## .user + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + + diff --git a/website/translated_docs/fr/API/SMTPTransporterClass.md b/website/translated_docs/fr/API/SMTPTransporterClass.md new file mode 100644 index 00000000000000..f69cf20edd6817 --- /dev/null +++ b/website/translated_docs/fr/API/SMTPTransporterClass.md @@ -0,0 +1,523 @@ +--- +id: SMTPTransporterClass +title: SMTPTransporter +--- + +The `SMTPTransporter` class allows you to configure SMTP connections and send emails through *SMTP transporter* objects. + + + +### SMTP Transporter object + +SMTP Transporter objects are instantiated with the [SMTP New transporter](#smtp-new-transporter) command. They provide the following properties and functions: + + +| | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | +| [**.bodyCharset** : Text](#bodycharset)

           the charset and encoding used for the body part of the email | +| [**.checkConnection()** : Object](#checkconnection)

           checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.headerCharset** : Text](#headercharset)

           the charset and encoding used for the email header | +| [**.host** : Text](#host)

          the name or the IP address of the host server | +| [**.keepAlive** : Boolean](#keepalive)

          **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

           the port number used for mail transactions | +| [**.send**( *mail* : Object ) : Object](#send)

          sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object | +| [**.sendTimeOut** : Integer](#sendtimeout)

           the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | +| [**.user** : Text](#user)

           the user name used for authentication on the mail server | + + + +## SMTP New transporter + +

      Historique +| Version | Modifications | +| ------- | -------------------------------------------- | +| v18 | New logFile property | +| v17 R5 | New bodyCharset and headerCharset properties | +| v17 R4 | Ajoutées | +
      + +**SMTP New transporter**( *server* : Object ) : 4D.SMTPTransporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objet | -> | Mail server information | +| Résultat | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + + +#### Description + +The `SMTP New transporter` command configures a new SMTP connection according to the *server* parameter and returns a new *[SMTP transporter](#smtp-transporter-object)* object. The returned transporter object will then usually be used to send emails. + +> This command does not open any connection to the SMTP server. The SMTP connection is actually opened when the [`.send()`](#send) function is executed. +> +> The SMTP connection is automatically closed: * when the transporter object is destroyed if the [`keepAlive`](#keepalive) property is true (default), * after each [`.send( )`](#send) function execution if the [`keepAlive`](#keepalive) property is set to false. + + + + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

          **True** if 4D is allowed to establish an unencrypted connection | Faux | +| .**accessTokenOAuth2**: Text
      .**accessTokenOAuth2**: Object

      Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

          the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.bodyCharset** : Text](#bodycharset)

           the charset and encoding used for the body part of the email | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

          the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.headerCharset** : Text](#headercharset)

           the charset and encoding used for the email header | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.host** : Text](#host)

          the name or the IP address of the host server | *mandatory* | +| [**.keepAlive** : Boolean](#keepalive)

          **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | Vrai | +| [**.logFile** : Text](#logfile)

          the path of the extended log file defined (if any) for the mail connection | none | +| **password** : Text

      User password for authentication on the server. Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.port** : Integer](#port)

           the port number used for mail transactions | 587 | +| [**.sendTimeOut** : Integer](#sendtimeout)

           the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | 100 | +| [**.user** : Text](#user)

           the user name used for authentication on the mail server | none | + + + +#### Résultat + +The function returns a [**SMTP transporter object**](#smtp-transporter-object). All returned properties are **read-only**. + + +#### Exemple + +```4d + $server:=New object + $server.host:="smtp.gmail.com" //Mandatory + $server.port:=465 + $server.user:="4D@gmail.com" + $server.password:="XXXX" + $server.logFile:="LogTest.txt" //Extended log to save in the Logs folder + + var $transporter : 4D.SMTPTransporter + $transporter:=SMTP New transporter($server) + + $email:=New object + $email.subject:="my first mail " + $email.from:="4d@gmail.com" + $email.to:="4d@4d.com;test@4d.com" + $email.textBody:="Hello World" + $email.htmlBody:="

      Hello World

      'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'

      \ +

      There are many variations of passages of Lorem Ipsum available."\ + +"The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

      " + + $status:=$transporter.send($email) + If(Not($status.success)) + ALERT("An error occurred sending the mail: "+$status.message) + End if +``` + + +## 4D.SMTPTransporter.new() + + +**4D.SMTPTransporter.new**( *server* : Object ) : 4D.SMTPTransporter +| Paramètres | Type | | Description | +| ---------- | ------------------ |:--:| --------------------------------------------------- | +| server | Objet | -> | Mail server information | +| Résultat | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + +#### Description + +The `4D.SMTPTransporter.new()` function creates and returns a new object of the `4D.SMTPTransporter` type. It is identical to the [`SMTP New transporter`](#smtp-new-transporter) command (shortcut). + + + +## .acceptUnsecureConnection + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + +## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + + + + +## .bodyCharset + +
      Historique +| Version | Modifications | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Ajoutées | +
      + +**.bodyCharset** : Text + +#### Description + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Valeurs possibles :** + +| Constant | Valeur | Commentaire | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
      • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      | +| mail mode ISO88591 | ISO-8859-1 |
      • *headerCharset*: ISO-8859-1 & Quoted-printable
      • *bodyCharset*: ISO-8859-1 & 8-bit
      | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + + +## .checkConnection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.checkConnection()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------------- | +| Résultat | Objet | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propriété | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | Texte | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | Texte | Description of the 4D error | +| | \[ ].componentSignature | Texte | Signature of the internal component which returned the error | + + + + + +For information about SMTP status codes, please refer to [this page](https://www.usps.org/info/smtp_status.html). + +#### Exemple + +```4d + var $pw : Text + var $options : Object + var $transporter : 4D.SMTPTransporter + $options:=New object + + $pw:=Request("Please enter your password:") + $options.host:="smtp.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=SMTP New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success=True) + ALERT("SMTP connection check successful!") + Else + ALERT("Error # "+String($status.status)+", "+$status.statusText) + End if +``` + + + +## .connectionTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + + + +## .headerCharset + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.headerCharset** : Text + +#### Description + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Valeurs possibles :** + +| Constant | Valeur | Commentaire | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
      • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      | +| mail mode ISO88591 | ISO-8859-1 |
      • *headerCharset*: ISO-8859-1 & Quoted-printable
      • *bodyCharset*: ISO-8859-1 & 8-bit
      | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + +## .host + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + +## .keepAlive + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.keepAlive** : Boolean + +#### Description + +The `.keepAlive` property contains **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed, and **False** otherwise. By default, if the `keepAlive` property has not been set in the `server` object (used to create the `transporter` object with `SMTP New transporter`), it is **True**. + +The SMTP connection is automatically closed: + +* when the `transporter` object is destroyed if the `.keepAlive` property is true, +* after each `.send( )` function execution if the `.keepAlive` property is set to false. + + + + + + +## .logFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + + +## .port + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + +## .send() + +
      Historique +| Version | Modifications | +| ------- | ------------------------ | +| v17 R5 | Support of mime contents | +| v17 R4 | Ajoutées | +
      + +**.send**( *mail* : Object ) : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------------------- | +| mail | Objet | -> | [Email](EmailObjectClass.md#email-object) to send | +| Résultat | Objet | <- | SMTP status | + + +#### Description + +The `.send()` function sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object. +> The `transporter` object must have already been created using the `SMTP New transporter` command. + +The method creates the SMTP connection if it is not already alive. If the `.keepAlive` property of the `transporter` object is **false**, the SMTP connection is automatically closed after the execution of `.send()`, otherwise it stays alive until the `transporter` object is destroyed. For more information, please refer to the [`SMTP New transporter`](#smtp-new-transporter) command description. + +In *mail*, pass a valid [`Email` object](EmailObjectClass.md#email-object) to send. The origination (where the email is coming from) and destination (one or more recipients) properties must be included, the remaining properties are optional. + + +#### Returned object + +The function returns an object describing the SMTP status of the operation. This object can contain the following properties: + +| Propriété | Type | Description | +| ---------- | ------- | ------------------------------------------------------------------------------------------------ | +| success | boolean | True if the send is successful, False otherwise | +| status | number | Status code returned by the SMTP server (0 in case of an issue unrelated to the mail processing) | +| statusText | Texte | Status message returned by the SMTP server | + +In case of an issue unrelated to the SMTP processing (e.g. a mandatory property is missing in mail), 4D generates an error that you can intercept using a method installed by the `ON ERR CALL` command. Use the `GET LAST ERROR STACK` command for information about the error. + +In this case, the resulting status object contains the following values: + +| Propriété | Valeur | +| ---------- | ---------------------- | +| success | Faux | +| status | 0 | +| statusText | "Failed to send email" | + + +## .sendTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.sendTimeOut** : Integer + +#### Description +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + + + + + +## .user + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + diff --git a/website/translated_docs/fr/API/SessionClass.md b/website/translated_docs/fr/API/SessionClass.md new file mode 100644 index 00000000000000..3c7fba9258a8e5 --- /dev/null +++ b/website/translated_docs/fr/API/SessionClass.md @@ -0,0 +1,363 @@ +--- +id: SessionClass +title: Session +--- + +Session objects are returned by the [`Session`](#session) command when [scalable sessions are enabled in your project](WebServer/sessions.md#enabling-sessions). The Session object is automatically created and maintained by the 4D web server to control the session of a web client (e.g. a browser). This object provides the web developer with an interface to the user session, allowing to manage privileges, store contextual data, share information between processes, and launch session-related preemptive processes. + +For detailed information about the session implementation, please refer to the [web server Sessions](WebServer/sessions.md) section. + +### Sommaire + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.clearPrivileges()**](#clearprivileges)

          removes all the privileges associated to the session | +| [**.expirationDate** : Text](#expirationdate)

          the expiration date and time of the session cookie | +| [**.hasPrivilege**( *privilege* : Text ) : Boolean](#hasprivilege)

          returns True if the privilege is associated to the session, and False otherwise | +| [**.idleTimeout** : Integer](#idletimeout)

          the inactivity session timeout (in minutes), after which the session is automatically closed by 4D | +| [**.isGuest()** : Boolean](#isguest)

          returns True if the session is a Guest session (i.e. it has no privileges) | +| [**.setPrivileges**( *privilege* : Text )
      **.setPrivileges**( *privileges* : Collection )
      **.setPrivileges**( *settings* : Object )](#setprivileges)

          associates the privilege(s) defined in the parameter to the session | +| [**.storage** : Object](#storage)

          a shared object that can be used to store information available to all requests of the web client | +| [**.userName** : Text](#username)

          the user name associated to the session | + + + + +## Session + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**Session** : 4D.Session + +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| -------------- | +| Résultat | 4D.Session | <- | Session object | + + +#### Description + +The `Session` command returns the `Session` object corresponding to the current scalable user web session. + +This command only works when [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions). It returns *Null* when sessions are disabled or when legacy sessions are used. + +When scalable sessions are enabled, the `Session` object is available from any web processes in the following contexts: + +- `On Web Authentication`, `On Web Connection`, and `On REST Authentication` database methods, +- ORDA [Data Model Class functions](ORDA/ordaClasses.md) called with REST requests, +- code processed through 4D tags in semi-dynamic pages (4DTEXT, 4DHTML, 4DEVAL, 4DSCRIPT/, 4DCODE) +- project methods with the "Available through 4D tags and URLs (4DACTION...)" attribute and called through 4DACTION/ urls. + + +#### Exemple + +You have defined the `action_Session` method with attribute "Available through 4D tags and URLs". You call the method by entering the following URL in your browser: + +``` +IP:port/4DACTION/action_Session +``` + +```4d + //action_Session method + Case of + :(Session#Null) + If(Session.hasPrivilege("WebAdmin")) //calling the hasPrivilege function + WEB SEND TEXT("4DACTION --> Session is WebAdmin") + Else + WEB SEND TEXT("4DACTION --> Session is not WebAdmin") + End if + Else + WEB SEND TEXT("4DACTION --> Sesion is null") + End case +``` + + + +## .clearPrivileges() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.clearPrivileges()** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.clearPrivileges()` function removes all the privileges associated to the session. As a result, the session automatically becomes a Guest session. + + +#### Exemple + +```4d +//Invalidate a session +var $isGuest : Boolean + +Session.clearPrivileges() +$isGuest:=Session.isGuest() //$isGuest is True +``` + + + + +## .expirationDate + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.expirationDate** : Text +#### Description + +The `.expirationDate` property contains the expiration date and time of the session cookie. The value is expressed as text in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.mmmZ`. + +Cette propriété est en **lecture seule**. It is automatically recomputed if the [`.idleTimeout`](#idletimeout) property value is modified. + +#### Exemple + +```4d +var $expiration : Text +$expiration:=Session.expirationDate //eg "2021-11-05T17:10:42Z" +``` + + + + + +## .hasPrivilege() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | +
      + +**.hasPrivilege**( *privilege* : Text ) : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------ | +| privilege | Texte | <- | Name of the privilege to verify | +| Résultat | Booléen | <- | True if session has *privilege*, False otherwise | + + +#### Description + +The `.hasPrivilege()` function returns True if the privilege is associated to the session, and False otherwise. + + +#### Exemple + +You want to check if the "WebAdmin" privilege is associated to the session: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page + +End if +``` + + +## .idleTimeout + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.idleTimeout** : Integer +#### Description + +The `.idleTimeout` property contains the inactivity session timeout (in minutes), after which the session is automatically closed by 4D. + +If this property is not set, the default value is 60 (1h). + +When this property is set, the [`.expirationDate`](#expirationdate) property is updated accordingly. + +> The value cannot be less than 60: if a lower value is set, the timeout is raised up to 60. + + +This property is **read write**. + +#### Exemple + +```4d +If (Session.isGuest()) + // A Guest session will close after 60 minutes of inactivity + Session.idleTimeout:=60 +Else + // Other sessions will close after 120 minutes of inactivity + Session.idleTimeout:=120 +End if + +``` + + + +## .isGuest() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.isGuest()** : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ----------------------------------------------- | +| Résultat | Booléen | <- | True if session is a Guest one, False otherwise | + +#### Description + +The `.isGuest()` function returns True if the session is a Guest session (i.e. it has no privileges). + + +#### Exemple + +In the `On Web Connection` database method: + +```4d +If (Session.isGuest()) + //Do something for Guest user +End if +``` + + + + +## .setPrivileges() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.setPrivileges**( *privilege* : Text )
      **.setPrivileges**( *privileges* : Collection )
      **.setPrivileges**( *settings* : Object ) +| Paramètres | Type | | Description | +| ---------- | ---------- |:--:| ---------------------------------------------------------- | +| privilege | Texte | -> | Privilege name | +| privileges | Collection | -> | Collection of privilege names | +| settings | Objet | -> | Object with a "privileges" property (string or collection) | + +#### Description + +The `.setPrivileges()` function associates the privilege(s) defined in the parameter to the session. + +- In the *privilege* parameter, pass a string containing a privilege name (or several comma-separated privilege names). + +- In the *privileges* parameter, pass a collection of strings containing privilege names. + +- In the *settings* parameter, pass an object containing the following properties: + +| Propriété | Type | Description | +| ---------- | ------------------ | -------------------------------------------------- | +| privileges | Text or Collection |
    • String containing a privilege name, or
    • Collection of strings containing privilege names
    • | +| userName | Texte | User name to associate to the session (optional) | + +If the `privileges` property contains an invalid privilege name, it is ignored. + +> Dans l'implémentation actuelle, seul le privilège "WebAdmin" est disponible. + +By default when no privilege is associated to the session, the session is a [Guest session](#isguest). + +The [`userName`](#username) property is available at session object level (read-only). + +#### Exemple + +In a custom authentication method, you set the "WebAdmin" privilege to the user: + +```4d +var $userOK : Boolean + +... //Authenticate the user + +If ($userOK) //The user has been approved + var $info : Object + $info:=New object() + $info.privileges:=New collection("WebAdmin") + Session.setPrivileges($info) +End if + +``` + + + +## .storage + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.storage** : Object +#### Description + +The `.storage` property contains a shared object that can be used to store information available to all requests of the web client. + +When a `Session` object is created, the `.storage` property is empty. Since it is a shared object, this property will be available in the `Storage` object of the server. + +> Tout comme l'objet `Storage` du serveur, la propriété `.storage` est toujours "single" : l'ajout d'un objet partagé ou d'une collection partagée à `.storage` ne crée pas de groupe partagé. + +This property is **read only** itself but it returns a read-write object. + +#### Exemple + +You want to store the client IP in the `.storage` property. You can write in the `On Web Authentication` database method: + +```4d +If (Session.storage.clientIP=Null) //first access + Use (Session.storage) + Session.storage.clientIP:=New shared object("value"; $clientIP) + End use +End if + +``` + + + + + + +## .userName + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R6 | Ajoutées | + +
      + +**.userName** : Text +#### Description + +The `.userName` property contains the user name associated to the session. You can use it to identify the user within your code. + +This property is an empty string by default. It can be set using the `privileges` property of the [`setPrivileges()`](#setprivileges) function. + +This property is **read only**. + + + + + + diff --git a/website/translated_docs/fr/API/SignalClass.md b/website/translated_docs/fr/API/SignalClass.md new file mode 100644 index 00000000000000..cce7058d30f896 --- /dev/null +++ b/website/translated_docs/fr/API/SignalClass.md @@ -0,0 +1,254 @@ +--- +id: SignalClass +title: Signal +--- + +Signals are tools provided by the 4D language to manage interactions and avoid conflicts between processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal. + +> Semaphores can also be used to manage interactions. Semaphores allow you to make sure that two or more processes do not modify the same resource (file, record...) at the same time. Only the process that sets the semaphore can remove it. + + +### Signal Object + +A signal is a shared object that must be passed as a parameter to commands that call or create workers or processes. + +A `4D.Signal` object contains the following built-in methods and properties: + +- [`.wait()`](#wait) +- [`.trigger()`](#trigger) +- [`.signaled`](#signaled) +- [`.description`](#description). + +Any worker/process calling the `.wait()` method will suspend its execution until the `.signaled` property is true. While waiting for a signal, the calling process does not use any CPU. This can be very interesting for performance in multiprocess applications. The `.signaled` property becomes true when any worker/process calls the `.trigger()` method. + +Note that to avoid blocking situations, the `.wait()` can also return after a defined timeout has been reached. + +Signal objects are created with the [New signal](#new-signal) command. + + +### Working with signals + +In 4D, you create a new signal object by calling the [`New signal`](#new-signal) command. Once created, this signal must be passed as a parameter to the `New process` or `CALL WORKER` commands so that they can modify it when they have finished the task you want to wait for. + +- `signal.wait()` must be called from the worker/process that needs another worker/process to finish a task in order to continue. +- `signal.trigger()` must be called from the worker/process that finished its execution in order to release all others. + + +![](assets/en/API/signal.png) + +Once a signal has been released using a `signal.trigger()` call, it cannot be reused again. If you want to set another signal, you need to call the `New signal` command again. + +Since a signal object is a [shared object](Concepts/shared.md), you can use it to return results from called workers/processes, provided that you do not forget to write values within a `Use...End use` structure (see example). + +### Exemple + +```4d + var $signal : 4D.Signal + + // Creation of a signal + $signal:=New signal + + // call main process and execute OpenForm method + CALL WORKER(1;"OpenForm";$signal) + // do another calculation + ... + // Waiting for the end of the process + $signaled:=$signal.wait() + + // Processing of the results + $calc:=$signal.result+... +``` + +***OpenForm*** method : + +```4d + #DECLARE ($signal : 4D.Signal) + var $form : Object + $form:=New object("value";0) + + // Open the form + $win:=Open form window("Information";Movable form dialog box) + DIALOG("Information";$form) + CLOSE WINDOW($win) + + // Add a new attribute to your $signal shared object to pass your result to the other process: + Use($signal) + $signal.result:=$form.value + End use + + // Trigger the signal to the waiting process + $signal.trigger() +``` + +### Sommaire + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.description** : Text](#description)

          contains a custom description for the `Signal` object. | +| [**.signaled** : Boolean](#signaled)

          contains the current state of the `Signal` object | +| [**.trigger( )**](#trigger)

          sets the `signaled` property of the signal object to **true** | +| [**.wait**( { *timeout* : Real } ) : Boolean ](#wait)

          makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire | + + + + +## New signal + + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**New signal** { ( *description* : Text ) } : 4D.Signal +| Paramètres | Type | | Description | +| ----------- | --------- |:--:| -------------------------------------- | +| description | Texte | -> | Description for the signal | +| Résultat | 4D.Signal | <- | Native object encapsulating the signal | + + +#### Description + +The `New signal` command creates a `4D.Signal` object. + +A signal is a shared object which can be passed as parameter from a worker or process to another worker or process, so that: + +* the called worker/process can update the signal object after specific processing has completed +* the calling worker/process can stop its execution and wait until the signal is updated, without consuming any CPU resources. + +Optionally, in the *description* parameter you can pass a custom text describing the signal. This text can also be defined after signal creation. + +Since the signal object is a shared object, it can also be used to maintain user properties, including the [`.description`](#description) property, by calling the `Use...End use` structure. + + +**Valeur retournée** + +A new [`4D.Signal` object](#signal-object). + +#### Exemple + +Here is a typical example of a worker that sets a signal: + +```4d + var $signal : 4D.Signal + $signal:=New signal("This is my first signal") + + CALL WORKER("myworker";"doSomething";$signal) + $signaled:=$signal.wait(1) //wait for 1 second max + + If($signaled) + ALERT("myworker finished the work. Result: "+$signal.myresult) + Else + ALERT("myworker has not finished in less than 1s") + End if +``` + + +The ***doSomething*** method could be like: + +```4d + #DECLARE ($signal : 4D.Signal) + //any processing + //... + Use($signal) + $signal.myresult:=$processingResult //return the result + End use + $signal.trigger() // The work is finished +``` + + + +## .description + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.description** : Text +#### Description + +The `.description` property contains a custom description for the `Signal` object.. + +`.description` can be set at the creation of the signal object or at any moment. Note that since the `Signal` object is a shared object, any write-mode access to the `.description` property must be surrounded by a `Use...End use` structure. + +This property is **read-write**. + + + + +## .signaled + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | + +
      + +**.signaled** : Boolean +#### Description + +The `.signaled` property contains the current state of the `Signal` object. When the signal is created, `.signaled` is **False**. It becomes **True** when the `.trigger( )` is called on the object. + +Cette propriété est en **lecture seule**. + + + + +## .trigger() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.trigger( )** +| Paramètres | Type | | Description | +| ---------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.trigger( )` function sets the `signaled` property of the signal object to **true** and awakens all workers or processes waiting for this signal. + +If the signal is already in the signaled state (i.e., the `signaled` property is already **true**), the function does nothing. + + + + +## .wait() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.wait**( { *timeout* : Real } ) : Boolean +| Paramètres | Type | | Description | +| ---------- | ------- | -- | ---------------------------------------------- | +| timeout | Réel | -> | Maximum waiting time for the signal in seconds | +| Résultat | Booléen | <- | State of the `.signaled` property | + + +#### Description + +The `.wait( )` function makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire. + +To prevent blocking code, you can pass a maximum waiting time in seconds in the *timeout* parameter (decimals are accepted). +> **Warning**: Calling `.wait( )` without a *timeout* in the 4D main process is not recommended because it could freeze the whole 4D application. + +If the signal is already in the signaled state (i.e. the `.signaled` property is already **true**), the function returns immediately, without waiting. + +The function returns the value of the `.signaled` property. Evaluating this value allows knowing if the function returned because the `.trigger( )` has been called (`.signaled` is **true**) or if the *timeout* expired (`.signaled` is **false**). +> The state of a process that waits for a signal is `Waiting for internal flag`. + + + + diff --git a/website/translated_docs/fr/API/Transporter.md b/website/translated_docs/fr/API/Transporter.md new file mode 100644 index 00000000000000..2f85b63108c37a --- /dev/null +++ b/website/translated_docs/fr/API/Transporter.md @@ -0,0 +1,347 @@ +--- +id: Transporter +title: Classe Transporter +--- + +## Description + + +## .acceptUnsecureConnection + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + +--- + + ## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.authenticationMode** : Text +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Valeur | Constantes | Commentaire | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + +--- + +## .bodyCharset + +
      Historique +| Version | Modifications | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Ajoutées | +
      + +**.bodyCharset** : Text + +#### Description + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Valeurs possibles :** + +| Constant | Valeur | Commentaire | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
      • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      | +| mail mode ISO88591 | ISO-8859-1 |
      • *headerCharset*: ISO-8859-1 & Quoted-printable
      • *bodyCharset*: ISO-8859-1 & 8-bit
      | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .connectionTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + +--- + +## .headerCharset + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.headerCharset** : Text + +#### Description + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Valeurs possibles :** + +| Constant | Valeur | Commentaire | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
      • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
      • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
      | +| mail mode ISO88591 | ISO-8859-1 |
      • *headerCharset*: ISO-8859-1 & Quoted-printable
      • *bodyCharset*: ISO-8859-1 & 8-bit
      | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .host + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + +--- + +## .logFile + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R5 | Ajoutées | +
      + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + +--- + +## .port + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + +--- + + +## .sendTimeOut + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.sendTimeOut** : Integer + +#### Description +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + +--- + + +## .user + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + +--- + +## .checkConnection() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v17 R4 | Ajoutées | +
      + +**.checkConnection()** : Object +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| ------------------------------------------- | +| Résultat | Objet | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Propriété | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + + diff --git a/website/translated_docs/fr/API/WebServerClass.md b/website/translated_docs/fr/API/WebServerClass.md new file mode 100644 index 00000000000000..ba610484a8dfd0 --- /dev/null +++ b/website/translated_docs/fr/API/WebServerClass.md @@ -0,0 +1,707 @@ +--- +id: WebServerClass +title: WebServer +--- + + +The `WebServer` class API allows you to start and monitor a web server for the main (host) application as well as each hosted component (see the [Web Server object](WebServer/webServerObject.md) overview). Cette classe est disponible depuis le "class store" de `4D`. + + + +### Objet Serveur Web + +Web server objects are instantiated with the [`WEB Server`](#web-server) command. + +They provide the following properties and functions: + + +### Sommaire +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.accessKeyDefined** : Boolean](#accesskeydefined)

          true if an access key is defined in the settings of the web server | +| [**.certificateFolder** : Text](#certificatefolder)

          folder where the certificate files are located | +| [**.characterSet** : Number
      **.characterSet** : Text](#characterset)

          character set that the 4D Web Server should use to communicate with browsers connecting to the application | +| [**.cipherSuite** : Text](#ciphersuite)

          cipher list used for the secure protocol | +| [**.CORSEnabled** : Boolean](#corsenabled)

          CORS (*Cross-origin resource sharing*) service status for the web server | +| [**.CORSSettings** : Collection](#corssettings)

          list of allowed hosts and methods for the CORS service | +| [**.debugLog** : Number](#debuglog)

          status of the HTTP request log file | +| [**.defaultHomepage** : Text](#defaulthomepage)

          name of the default home page | +| [**.HSTSEnabled** : Boolean](#hstsenabled)

          HTTP Strict Transport Security (HSTS) status | +| [**.HSTSMaxAge** : Number](#hstsmaxage)

          maximum length of time (in seconds) that HSTS is active for each new client connection | +| [**.HTTPCompressionLevel** : Number](#httpcompressionlevel)

          compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies) | +| [**.HTTPCompressionThreshold** : Number](#httpcompressionthreshold)

          size threshold (bytes) for requests below which exchanges should not be compressed | +| [**.HTTPEnabled** : Boolean](#httpenabled)

          HTTP protocol state | +| [**.HTTPPort** : Number](#httpport)

          listening IP port number for HTTP | +| [**.HTTPTrace** : Boolean](#httptrace)

          activation of `HTTP TRACE` | +| [**.HTTPSEnabled** : Boolean](#httpsenabled)

          HTTPS protocol state | +| [**.HTTPSPort** : Number](#httpsport)

          listening IP port number for HTTPS | +| [**.inactiveProcessTimeout** : Number](#inactiveprocesstimeout)

          life duration (in minutes) of the inactive legacy session processes | +| [**.inactiveSessionTimeout** : Number](#inactivesessiontimeout)

          life duration (in minutes) of inactive legacy sessions (duration set in cookie) | +| [**.IPAddressToListen** : Text](#ipaddresstolisten)

          IP address on which the 4D Web Server will receive HTTP requests | +| [**.isRunning** : Boolean](#isrunning)

          web server running state | +| [**.keepSession** : Boolean](#keepsession)

          True if legacy sessions are enabled in the web server, False otherwise | +| [**.logRecording** : Number](#logrecording)

          log requests (logweb.txt) recording value | +| [**.maxConcurrentProcesses** : Number](#maxconcurrentprocesses)

          maximum number of concurrent web processes supported by the web server | +| [**.maxRequestSize** : Number](#maxrequestsize)

          maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process | +| [**.maxSessions** : Number](#maxsessions)

          maximum number of simultaneous legacy sessions | +| [**.minTLSVersion** : Number](#mintlsversion)

          minimum TLS version accepted for connections | +| [**.name** : Text](#name)

          name of the web server application | +| [**.openSSLVersion** : Text](#opensslversion)

          version of the OpenSSL library used | +| [**.perfectForwardSecrecy** : Boolean](#perfectforwardsecrecy)

          PFS availability on the server | +| [**.rootFolder** : Text](#rootfolder)

          path of web server root folder | +| [**.scalableSession** : Boolean](#scalablesession)

          True if scalable sessions are used in the web server, and False otherwise | + + +[**.sessionCookieDomain** : Text](#sessioncookiedomain)

          "domain" field of the session cookie| |[**.sessionCookieName** : Text](#sessioncookiename)

          name of the cookie used for storing the session ID| |[**.sessionCookiePath** : Text](#sessioncookiepath)

          "path" field of the session cookie| |[**.sessionCookieSameSite** : Text](#sessioncookiesamesite)

          "SameSite" session cookie value| |[**.sessionIPAddressValidation** : Boolean](#sessionipaddressvalidation)

          IP address validation for session cookies| |[ **.start**() : Object
      **.start**( *settings* : Object ) : Object](#start)

          starts the web server on which it is applied| |[**.stop()** ](#stop)

          stops the web server on which it is applied| + + + +## WEB Server + +

      Historique +| Version | Modifications | +| ------- | ---------------------------------- | +| v18 R3 | Ajoutées | +| v19 | support for .sessionCookieSameSite | + +
      + +**WEB Server** : 4D.WebServer
      **WEB Server**( *option* : Integer ) : 4D.WebServer + + +| Paramètres | Type | | Description | +| ---------- | ------------ | -- | -------------------------------------------------------------- | +| option | Integer | -> | Web server to get (default if omitted = `Web server database`) | +| Résultat | 4D.WebServer | <- | Web server object | + + +The `WEB Server` command returns the default Web server object, or the Web server object defined through the *option* parameter. + +The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session. + +| Constant | Valeur | Commentaire | +| ------------------------------ | ------ | -------------------------------------------------------- | +| `Web server database` | 1 | Current database Web server (default if omitted) | +| `Web server host database` | 2 | Web server of the host database of a component | +| `Web server receiving request` | 3 | Web server that received the request (target Web server) | + +The returned Web server object contains the current values of the Web server properties. + +#### Exemple + +From your component, you want to know if the Web server of the host database is started: + +```4d + // Method of a component + var $hostWS : 4D.WebServer + $hostWS:=WEB Server(Web server host database) + If($hostWS.isRunning) + ... + End if +``` + +## WEB Server list + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | +
      + +**WEB Server list** : Collection + + +| Paramètres | Type | | Description | +| ---------- | ---------- | -- | ---------------------------------------------- | +| Résultat | Collection | <- | Collection of the available Web server objects | + + +The `WEB Server list` command returns a collection of all Web server objects available in the 4D application. + +A 4D application can contain anywhere from one to several Web servers: + +- one Web server for the host database (default Web server) +- one Web server for each component. + +All available Web servers are returned by the `WEB Server list` command, whether they are actually running or not. + +> The default Web server object is automatically loaded by 4D at startup. On the other hand, each component Web server that you want to use must be instantiated using the [`WEB Server`](#web-server) command. + +You can use the [.name](#name) property of the Web server object to identify the project or component to which each Web server object in the list is attached. + + +#### Exemple + +We want to know how many running web servers are available: + +```4d + var $wSList : Collection + var $vRun : Integer + + $wSList:=WEB Server list + $vRun:=$wSList.countValues(True;"isRunning") + ALERT(String($vRun)+" web server(s) running on "+String($wSList.length)+" available.") + +``` + + + + +## .accessKeyDefined + + +**.accessKeyDefined** : Boolean + +The **.accessKeyDefined** property contains true if an access key is defined in the settings of the web server. This property is used by the WebAdmin web server to validate the security configuration of the administration interface. + + + +## .certificateFolder + + + +**.certificateFolder** : Text + +Path of the folder where the certificate files are located. Format POSIX du chemin d'accès complet à l'aide de filesystem. When using this property in the `settings` parameter of the [`.start()`](#start) function, it can be a [`Folder` object](FolderClass.md). + + + + +## .characterSet + + +**.characterSet** : Number
      **.characterSet** : Text + +The character set that the 4D Web Server should use to communicate with browsers connecting to the application. La valeur par défaut dépend de la langue du système d'exploitation. Can be a MIBEnum integer or a Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets/character-sets.xhtml). Here is the list of identifiers corresponding to the character sets supported by the 4D Web Server: + +* 4 = ISO-8859-1 +* 12 = ISO-8859-9 +* 13 = ISO-8859-10 +* 17 = Shift-JIS +* 2024 = Windows-31J +* 2026 = Big5 +* 38 = euc-kr +* 106 = UTF-8 +* 2250 = Windows-1250 +* 2251 = Windows-1251 +* 2253 = Windows-1253 +* 2255 = Windows-1255 +* 2256 = Windows-1256 + + + + +## .cipherSuite + + +**.cipherSuite** : Text + +The cipher list used for the secure protocol. Sets the priority of ciphering algorithms implemented by the 4D web server. Peut être une séquence de chaînes séparées par des deux-points (par exemple "ECDHE-RSA-AES128 -..."). Voir la [page des chiffrements](https://www.openssl.org/docs/manmaster/man1/ciphers.html) sur le site OpenSSL. + + + + + +## .CORSEnabled + +**.CORSEnabled** : Boolean + +The CORS (*Cross-origin resource sharing*) service status for the web server. Pour des raisons de sécurité, les requêtes "cross-domain" sont interdites par défaut au niveau du navigateur. Pour des raisons de sécurité, les requêtes "cross-domain" sont interdites par défaut au niveau du navigateur. Lorsqu'il est activé (True), les appels XHR (par exemple les requêtes REST) à partir de pages Web hors du domaine peuvent être autorisés dans votre application (vous devez définir la liste des adresses autorisées dans la liste des domaines CORS, voir `CORSSettings` ci-dessous). Lorsqu'il est désactivé (False, par défaut), toutes les requêtes entre sites (cross site) envoyées avec CORS sont ignorées. + +Par défaut : False (désactivé) + +For more information about CORS, please refer to the [Cross-origin resource sharing page](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + + + + +## .CORSSettings + + +**.CORSSettings** : Collection + +A list of allowed hosts and methods for the CORS service (see [`CORSEnabled`](#corsenabled) property). Each object must contain a **host** property and, optionally, a **methods** property: + +* **host** (texte, obligatoire) : nom de domaine ou adresse IP à partir duquel les pages externes sont autorisées à envoyer des requêtes de données au serveur via CORS. Plusieurs attributs de domaine peuvent être ajoutés pour créer une liste blanche. Si *host* n'est pas présent ou vide, l'objet est ignoré. Several syntaxes are supported: + - 192.168.5.17:8081 + - 192.168.5.17 + - 192.168.* + - 192.168.*:8081 + - http://192.168.5.17:8081 + - http://*.myDomain.com + - http://myProject.myDomain.com + - *.myDomain.com + - myProject.myDomain.com + - \* + +* **methods** (texte, facultatif) : méthode(s) HTTP acceptée(s) pour l'hôte CORS correspondant. Séparez chaque méthode par un ";" (ex : "post;get"). Si *methods* est vide, null ou non défini, toutes les méthodes sont activées. + + + + +## .debugLog + + +**.debugLog** : Number + +The status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). + +* 0 = désactivé +* 1 = activé sans les parties du corps (la taille du corps est fournie dans ce cas) +* 3 = activé avec les parties du corps en réponse uniquement +* 5 = activé avec des parties du corps sur requête uniquement +* 7 = activé avec des parties du corps en réponse et requête + + + + +## .defaultHomepage + + +**.defaultHomepage** : Text + +The name of the default home page or "" to not send the custom home page. + + + + +## .HSTSEnabled + +**.HSTSEnabled** : Boolean + +The HTTP Strict Transport Security (HSTS) status. HSTS permet au serveur Web de déclarer que les navigateurs doivent interagir avec uniquement via des connexions HTTPS sécurisées. Les navigateurs enregistreront les informations HSTS la première fois qu'ils recevront une réponse du serveur Web, puis toutes les futures requêtes HTTP seront automatiquement transformées en requêtes HTTPS. La durée de stockage de ces informations par le navigateur est indiquée avec la propriété `HSTSMaxAge`. HSTS nécessite l'activation de HTTPS sur le serveur. HTTP doit également être activé pour permettre des connexions client initiales. + + + + +## .HSTSMaxAge + +**.HSTSMaxAge** : Number + +The maximum length of time (in seconds) that HSTS is active for each new client connection. Ces informations sont stockées côté client pendant la durée spécifiée. + +Default value: 63072000 (2 years). + + + + +## .HTTPCompressionLevel + +**.HTTPCompressionLevel** : Number + +The compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). Ce sélecteur vous permet d'optimiser les échanges en priorisant soit la vitesse d'exécution (moins de compression), soit la quantité de compression (moins de vitesse). + +Valeurs possibles : + +* 1 à 9 (où 1 correspond à la compression la plus rapide et 9 la plus élevée). +* -1 = définir un compromis entre la vitesse et le taux de compression. + +Valeurs possibles : + + + + +## .HTTPCompressionThreshold + +**.HTTPCompressionThreshold** : Number + +The size threshold (bytes) for requests below which exchanges should not be compressed. Ce paramètre est utile pour éviter de perdre du temps machine en compressant les petits échanges. + +Seuil de compression par défaut = 1024 octets + + + + +## .HTTPEnabled + + +**.HTTPEnabled** : Boolean + +The HTTP protocol state. + + + + + +## .HTTPPort + + +**.HTTPPort** : Number + +The listening IP port number for HTTP. + +Par défaut = 80 + + + + +## .HTTPTrace + +**.HTTPTrace** : Boolean + +The activation of `HTTP TRACE`. For security reasons, by default the Web server rejects `HTTP TRACE` requests with an error 405. When enabled, the web server replies to `HTTP TRACE` requests with the request line, header, and body. + + + + +## .HTTPSEnabled + + +**.HTTPSEnabled** : Boolean The HTTPS protocol state. + + + + +## .HTTPSPort + + +**.HTTPSPort** : Number The listening IP port number for HTTPS. + +Par défaut = 443 + + + + +## .inactiveProcessTimeout + +**.inactiveProcessTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of the inactive legacy session processes. At the end of the timeout, the process is killed on the server, the `On Web Legacy Close Session` database method is called, then the legacy session context is destroyed. + +Par défaut = 480 minutes + + + + +## .inactiveSessionTimeout + +**.inactiveSessionTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of inactive legacy sessions (duration set in cookie). À la fin de cette période, le cookie de session expire et n'est plus envoyé par le client HTTP. + +Par défaut = 480 minutes + + + + +## .IPAddressToListen + + +**.IPAddressToListen** : Text + +The IP address on which the 4D Web Server will receive HTTP requests. By default, no specific address is defined. Les formats de chaîne IPv6 et IPv4 sont pris en charge. + + + + + +## .isRunning + + +**.isRunning** : Boolean + +*Read-only property* + +The web server running state. + + + + +## .keepSession + +**.keepSession** : Boolean + +True if legacy sessions are enabled in the web server, False otherwise. + +##### See also: +[.scalableSession](#scalablesession) + + + + +## .logRecording + + +**.logRecording** : Number + +The log requests (logweb.txt) recording value. + +* 0 = Ne pas enregistrer (par défaut) +* 1 = Enregistrer au format CLF +* 2 = Enregistrer au format DLF +* 3 = Enregistrer au format ELF +* 4 = Enregistrer au format WLF + + + + +## .maxConcurrentProcesses + + +**.maxConcurrentProcesses** : Number + +The maximum number of concurrent web processes supported by the web server. Lorsque ce nombre (moins un) est atteint, 4D ne crée aucun autre process et retourne le statut HTTP 503 - Service Unavailable to all new requests. + +Valeurs possibles : 500000 - 2147483648 + +Valeurs possibles : 10 - 32000 + + + + +## .maxRequestSize + + +**.maxRequestSize** : Number + +The maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process. Passing the maximum value (2147483647) means that, in practice, no limit is set. Cette limite est utilisée pour éviter la saturation du serveur Web en raison de requêtes entrantes trop volumineuses. Cette limite est utilisée pour éviter la saturation du serveur Web en raison de requêtes entrantes trop volumineuses. + +Possible values: 500000 - 2147483647 + + + + +## .maxSessions + +**.maxSessions** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The maximum number of simultaneous legacy sessions. When you reach the limit, the oldest legacy session is closed (and `On Web Legacy Close Session` database method is called) if the web server needs to create a new one. The number of simultaneous legacy sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default) + + + + +## .minTLSVersion + +**.minTLSVersion** : Number + +The minimum TLS version accepted for connections. Les tentatives de connexion de clients prenant en charge uniquement les versions inférieures au minimum seront rejetées. + +Valeurs possibles : + +* 1 = TLSv1_0 +* 2 = TLSv1_1 +* 3 = TLSv1_2 (default) +* 4 = TLSv1_3 + +En cas de modification, le serveur doit être redémarré pour utiliser la nouvelle valeur. + + + + +## .name + + +**.name** : Text + +*Read-only property* + +The name of the web server application. + + + + + +## .openSSLVersion + +**.openSSLVersion** : Text + +*Read-only property* + +The version of the OpenSSL library used. + + + + +## .perfectForwardSecrecy + + +**.perfectForwardSecrecy** : Boolean + +*Read-only property* + +The PFS availability on the server. + + + +## .rootFolder + + +**.rootFolder** : Text + +The path of web server root folder. Format POSIX du chemin d'accès complet à l'aide de filesystem. Peut être passé comme objet `Folder` dans le paramètre `settings`. + + +## .scalableSession + + +**.scalableSession** : Boolean + +True if scalable sessions are used in the web server, and False otherwise. + +##### See also: +[.keepSession](#keepsession) + + +## .sessionCookieDomain + + +**.sessionCookieDomain** : Text + +The "domain" field of the session cookie. Utilisé pour contrôler la portée des cookies de session. Par exemple, si vous définissez la valeur "/*.4d.fr" pour ce sélecteur, le client enverra un cookie uniquement lorsque la requête est adressée au domaine ".4d.fr", ce qui exclut les serveurs hébergeant des données statiques externes. + + + + +## .sessionCookieName + + +**.sessionCookieName** : Text + +The name of the cookie used for storing the session ID. + +*Read-only property* + + + + +## .sessionCookiePath + + +**.sessionCookiePath** : Text + +The "path" field of the session cookie. Utilisé pour contrôler la portée des cookies de session. Par exemple, si vous définissez la valeur "/4DACTION" pour ce sélecteur, le client enverra un cookie uniquement pour les requêtes dynamiques commençant par 4DACTION, et non pour les images, les pages statiques, etc. + + + +## .sessionCookieSameSite + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
      + +**.sessionCookieSameSite** : Text + +The "SameSite" session cookie value. Possible values (using constants): + +| Constant | Valeur | Description | +| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| Web SameSite Strict | "Strict" | *Default value* - Cookies are only sent in a first-party context | +| Web SameSite Lax | "Lax" | Cookies are also sent on cross-site subrequests but only when a user is navigating to the origin site (i.e. when following a link). | +| Web SameSite None | "None" | Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. | + +See the [Session Cookie SameSite](WebServer/webServerConfig.md#session-cookie-samesite) description for detailed information. + + + + +## .sessionIPAddressValidation + + +**.sessionIPAddressValidation** : Boolean + +The IP address validation for session cookies. Pour des raisons de sécurité, le serveur Web vérifie par défaut l'adresse IP de chaque requête contenant un cookie de session et la rejette si cette adresse ne correspond pas à l'adresse IP utilisée pour créer le cookie. Dans certaines applications spécifiques, vous souhaiterez peut-être désactiver cette validation et accepter les cookies de session, même lorsque leurs adresses IP ne correspondent pas. For example when mobile devices switch between WiFi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change (this setting lowers the security level of your application). + + + + +## .start() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | +
      + + +**.start**() : Object
      **.start**( *settings* : Object ) : Object + + + +| Paramètres | Type | | Description | +| ---------- | ------ | -- | ------------------------------------- | +| settings | Object | -> | Web server settings to set at startup | +| Résultat | Object | <- | Status of the web server startup | + + +The `.start()` function starts the web server on which it is applied, using properties set in the optional *settings* object parameter. + +The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session. + +All settings of [Web Server objects](#web-server-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName(#sessioncookiename)]). + +Customized session settings will be reset when the [`.stop()`](#stop) function is called. + + +#### Returned object + +The function returns an object describing the Web server launch status. This object can contain the following properties: + +| Propriété | | Type | Description | +| --------- | ----------------------- | ---------- | -------------------------------------------------------------------- | +| success | | Booléen | True if the web server was correctly started, False otherwise | +| errors | | Collection | 4D error stack (not returned if the web server started successfully) | +| | \[].errCode | Nombre | 4D error code | +| | \[].message | Texte | Description of the 4D error | +| | \[].componentSignature | Texte | Signature of the internal component which returned the error | +> If the Web server was already launched, an error is returned. + +#### Exemple + +```4d + var $settings;$result : Object + var $webServer : 4D.WebServer + + $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html") + + $webServer:=WEB Server + $result:=$webServer.start($settings) + If($result.success) + //... + End if +``` + + + + +## .stop() + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 R3 | Ajoutées | +
      + +**.stop()** + +| Paramètres | Type | | Description | +| ---------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +The `.stop()` function stops the web server on which it is applied. + +If the web server was started, all web connections and web processes are closed, once the currently handled requests are finished. If the web server was not started, the method does nothing. +> This function resets the customized web settings defined for the session using the *settings* parameter of the [`.start()`](#start) function, if any. + + +#### Exemple + +To stop the database Web server: + +```4d + var $webServer : 4D.WebServer + + $webServer:=WEB Server(Web server database) + $webServer.stop() +``` + + + + + + diff --git a/website/translated_docs/fr/API/ZipArchiveClass.md b/website/translated_docs/fr/API/ZipArchiveClass.md new file mode 100644 index 00000000000000..840930187032e8 --- /dev/null +++ b/website/translated_docs/fr/API/ZipArchiveClass.md @@ -0,0 +1,374 @@ +--- +id: ZipArchiveClass +title: ZIPArchive +--- + + +A 4D ZIP archive is a `File` or `Folder` object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save disk space or transfer files via mediums which may have size limitations (e.g., email or network). + +- You create a 4D ZIP archive with the [ZIP Create archive](#zip-create-archive) command. +- 4D [`ZIPFile`](ZipFileClass.md) and [`ZIPFolder`](ZipFolderClass.md) instances are available through the [`root`](#root) property (`ZIPFolder`) of the object returned by [ZIP Read archive](#zip-read-archive) command. + + +### Exemple + +To retrieve and view the contents of a ZIP file object: + +```4d +var $path; $archive : 4D.File +var $zipFile : 4D.ZipFile +var $zipFolder : 4D.ZipFolder +var $txt : Text + +$path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") +$archive:=ZIP Read archive($path) +$zipFolder:=$archive.root // store the zip main folder +$zipFile:=$zipFolder.files()[0] //read the first zipped file + +If($zipFile.extension=".txt") + $txt:=$zipFile.getText() +End if +``` + +### Sommaire + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.root** : 4D.ZipFolder](#root)

          a virtual folder providing access to the contents of the ZIP archive | + + +## ZIP Create archive + +

      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**ZIP Create archive** ( *fileToZip* : 4D.File ; *destinationFile* : 4D.File ) : Object
      **ZIP Create archive** ( *folderToZip* : 4D.Folder ; *destinationFile* : 4D.File { ; *options* : Integer }) : Object
      **ZIP Create archive** ( *zipStructure* : Object ; *destinationFile* : 4D.File ) : Object +| Paramètres | Type | | Description | +| --------------- | ----------- |:--:| ---------------------------------------------------- | +| fileToZip | 4D.File | -> | File or Folder object to compress | +| folderToZip | 4D.Folder | -> | File or Folder object to compress | +| zipStructure | Objet | -> | File or Folder object to compress | +| destinationFile | 4D.File | -> | Destination file for the archive | +| options | Entier long | -> | *folderToZip* option: `ZIP Without enclosing folder` | +| Résultat | Objet | <- | Status object | + + +#### Description + +The `ZIP Create archive` command creates a compressed ZIP archive object and returns the status of the operation. + +You can pass a 4D.File, a 4D.Folder, or a zip structure object as first parameter: + +- *fileToZip*: You simply pass a `4D.File` to compress. + +- *folderToZip*: You pass a `4D.Folder` to compress. In this case, the *options* parameter allows you to compress only the contents of the folder (i.e., exclude the enclosing folder). By default, `ZIP Create archive` will compress the folder and its contents, so that the decompressing operation will recreate a folder. If you want the decompressing operation to restore only the contents of the folder, pass the `ZIP Without enclosing folder` constant in the *options* parameter. + +- *zipStructure*: You pass an object describing the ZIP archive object. The following properties are available to define the structure:
    • a collection of `4D.File` or `4D.Folder` objects or
    • a collection of objects with the following properties:
    • + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + Propriété + + Type + + Description +
      + source + + 4D.File or 4D.Folder + + + File or Folder +
      + destination + + Texte + + (optional) - Specify a relative filepath to change the organization of the contents of the archive +
      + option + + number + + (optional) - `ZIP Ignore invisible files` or 0 to compress all of the file +
      + + + + + + callback + + + + 4D.Function + + + + A callback formula that will receive the compression progress (0 - 100) in $1. + + + + +In the *destinationFile* parameter, pass a `4D.File` object describing the ZIP archive to create (name, location, etc.). It is advised to use the ".zip" extension if you want the ZIP archive to be processed automatically by any software. + +Once an archive is created, you can use the [ZIP Read archive](#zip-read-archive) command to access it. + +**Status object** + +The returned status object contains the following properties: + +| Propriété | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| statusText | Text | Error message (if any):
    • Cannot open ZIP archive
    • Cannot create ZIP archive
    • Password is required for encryption | +| status | Integer | Status code | +| success | Boolean | True if archive created successfully, else false | + + + + + +#### Exemple 1 + +To compress a `4D.File`: + + + +```4d + var $file; $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/file.zip") + $file:=Folder(fk desktop folder).file("MyDocs/text.txt") + + $status:=ZIP Create archive($file;$destination) +``` + + + + + +#### Exemple 2 + +To compress a `4D.Folder` without the folder itself: + + + +```4D + var $folder : 4D.Folder + var $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/Images.zip") + $folder:=Folder(fk desktop folder).folder("MyDocs/Images") + + $status:=ZIP Create archive($folder;$destination;ZIP Without enclosing folder) +``` + + + + +#### Example 3 + +To compress a ZIP archive structure with a password and progress bar: + + + +```4d + var $destination : 4D.File + var $zip;$status : Object + var progID : Integer + + $destination:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + + $zip:=New object + $zip.files:=Folder(fk desktop folder).folder("MyDocs/Resources").folders() + $zip.password:="password" + $zip.callback:=Formula(myFormulaCompressingMethod($1)) + + progID:=Progress New //we use the 4D Progress component + + $status:=ZIP Create archive($zip;$destination) + + Progress QUIT(progID) +``` + + +`myFormulaCompressingMethod`: + + + +```4d + var $1 : Integer + Progress SET PROGRESS(progID;Num($1/100)) +``` + + + + + +#### Example 4 + +You want to pass a collection of folders and files to compress to the *zipStructure* object: + + + +```4d + var $destination : 4D.File + var $zip;$err : Object + $zip:=New object + $zip.files:=New collection + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text2.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Images/image.png"))) + + $destination:=Folder(fk desktop folder).file("file.zip") + $err:=ZIP Create archive($zip;$destination) +``` + + + + + + + +## ZIP Read archive + +
      Historique +| Version | Modifications | +| ------- | ------------- | +| v18 | Ajoutées | +
      + +**ZIP Read archive** ( *zipFile* : 4D.File { ; *password* : Text }) : 4D.ZipArchive + +| Paramètres | Type | | Description | +| ---------- | ------------- |:--:| --------------------------- | +| zipFile | 4D.File | -> | Zip archive file | +| password | Texte | -> | ZIP archive password if any | +| Résultat | 4D.ZipArchive | <- | Archive object | + + + + + +#### Description + +The `ZIP Read archive` command retrieves the contents of *zipFile* and returns it as a `4D.ZipArchive` object. + + + +> This command does not uncompress the ZIP archive, it only provides a view of its contents. To extract the contents of an archive, you need to use methods such as [file.copyTo()](Document.md#copyto) or [folder.copyTo()](Directory.md#copyto). + +Pass a `4D.File` object referencing the compressed ZIP archive in the *zipFile* parameter. The target archive file will be opened until the `ZIP Read archive` has finished executing and all contents/references have been extracted/released, then it will be closed automatically. + +If the *zipFile* is password protected, you need to use the optional *password* parameter to provide a password. If a password is required but not passed when trying to read the contents of the archive, an error is generated. + +**Archive object** + +The returned `4D.ZipArchive` object contains a single [`root`](#root) property whose value is a `4D.ZipFolder` object. This folder describes the whole contents of the ZIP archive. + + + + + +#### Exemple + +To retrieve and view the contents of a ZIP file object: + + + +```4d + var $archive : 4D.ZipArchive + var $path : 4D.File + + $path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + $archive:=ZIP Read archive($path) +``` + + +To retrieve the list of the files and folders in the archive: + + + +```4d + $folders:=$archive.root.folders() + $files:=$archive.root.files() +``` + + +To read the contents of a file without extracting it from the root folder: + + + +```4d + + If($files[$i].extension=".txt") + $txt:=$files[$i].getText() + Else + $blob:=$files[$i].getContent() + End if +``` + + +To extract from the root folder: + + + +```4d + //extract a file + $folderResult:=$files[$i].copyTo(Folder(fk desktop folder).folder("MyDocs")) + + //extract all files + $folderResult:=$archive.root.copyTo(Folder(fk desktop folder).folder("MyDocs")) +``` + + + + + + +## .root + +**.root** : 4D.ZipFolder + + + +#### Description + +The `.root` property contains a virtual folder providing access to the contents of the ZIP archive. + +The `root` folder and its contents can be manipulated with the [ZipFile](ZipFileClass.md) and [ZipFolder](ZipFolderClass.md) functions and properties. + +Cette propriété est en **lecture seule**. + + + diff --git a/website/translated_docs/fr/API/ZipFileClass.md b/website/translated_docs/fr/API/ZipFileClass.md new file mode 100644 index 00000000000000..ffbee04c8dcd75 --- /dev/null +++ b/website/translated_docs/fr/API/ZipFileClass.md @@ -0,0 +1,33 @@ +--- +id: ZipFileClass +title: ZIPFile +--- + +The following properties and functions from the [File](FileClass.md) class are available to `ZIPFile` objects: + +| Available [File](FileClass.md) APIs for ZIPFile | Commentaire | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](FileClass.md#copyto) | | +| [**.creationDate** : Date](FileClass.md#creationdate) | | +| [**.creationTime** : Time](FileClass.md#creationtime) | | +| [**.exists** : Boolean](FileClass.md#exists) | | +| [**.extension** : Text](FileClass.md#extension) | | +| [**.fullName** : Text](FileClass.md#fullname) | | +| [**.getContent( )** : 4D.Blob](FileClass.md#getcontent) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FileClass.md#geticon) | | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
      **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](FileClass.md#gettext) | | +| [**.hidden** : Boolean](FileClass.md#hidden) | | +| [**.isAlias** : Boolean](FileClass.md#isalias) | | +| [**.isFile** : Boolean](FileClass.md#isfile) | | +| [**.isFolder** : Boolean](FileClass.md#isfolder) | | +| [**.isWritable** : Boolean](FileClass.md#iswritable) | Always false with ZIP archive | +| [**.modificationDate** : Date](FileClass.md#modificationdate) | | +| [**.modificationTime** : Time](FileClass.md#modificationtime) | | +| [**.name** : Text](FileClass.md#name) | | +| [**.original** : 4D.File
      **.original** : 4D.Folder](FileClass.md#original) | | +| [**.parent** : 4D.Folder](FileClass.md#parent) | | +| [**.path** : Text](FileClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FileClass.md#platformpath) | | + + + diff --git a/website/translated_docs/fr/API/ZipFolderClass.md b/website/translated_docs/fr/API/ZipFolderClass.md new file mode 100644 index 00000000000000..8af05f456a2b67 --- /dev/null +++ b/website/translated_docs/fr/API/ZipFolderClass.md @@ -0,0 +1,37 @@ +--- +id: ZipFolderClass +title: ZIPFolder +--- + + +The following properties and functions from the [Folder](FolderClass.md) class are available to `ZIPFolder` objects: + + +| Available [Folder](FolderClass.md) APIs for ZIPFolder | Commentaire | +| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](FolderClass.md#copyto) | | +| [**.creationDate** : Date](FolderClass.md#creationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.creationTime** : Time](FolderClass.md#creationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.exists** : Boolean](FolderClass.md#exists) | | +| [**.extension** : Text](FolderClass.md#extension) | | +| [**.file**( *path* : Text ) : 4D.File](FolderClass.md#file) | | +| [**.files**( { *options* : Integer } ) : Collection](FolderClass.md#files) | | +| [**.folder**( *path* : Text ) : 4D.Folder](FolderClass.md#folder) | | +| [**.folders**( { *options* : Integer } ) : Collection](FolderClass.md#folders) | | +| [**.fullName** : Text](FolderClass.md#fullname) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FolderClass.md#geticon) | | +| [**.hidden** : Boolean](FolderClass.md#hidden) | | +| [**.isAlias** : Boolean](FolderClass.md#isalias) | | +| [**.isFile** : Boolean](FolderClass.md#isfile) | | +| [**.isFolder** : Boolean](FolderClass.md#isfolder) | | +| [**.isPackage** : Boolean](FolderClass.md#ispackage) | | +| [**.modificationDate** : Date](FolderClass.md#modificationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.modificationTime** : Time](FolderClass.md#modificationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.name** : Text](FolderClass.md#name) | | +| [**.original** : 4D.Folder](FolderClass.md#original) | | +| [**.parent** : 4D.Folder](FolderClass.md#parent) | The archive's virtual `root` folder has no parent. However, the folders within the archive may have a parent other than the root. | +| [**.path** : Text](FolderClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FolderClass.md#platformpath) | | + + + diff --git a/website/translated_docs/fr/API/overview.md b/website/translated_docs/fr/API/overview.md new file mode 100644 index 00000000000000..40ed294fbbcb5e --- /dev/null +++ b/website/translated_docs/fr/API/overview.md @@ -0,0 +1,27 @@ +--- +id: overview +title: Aperçu - API des classes +--- + +Cette section décrit l'API de classes 4D intégrées ainsi que les commandes associées du constructeur. Les propriétés et fonctions de classe 4D sont disponibles via les objets d'instance de classe. + +- functions must be called on instances with the () operator. For example, `collection.sort()`. + +- properties are accessed without parentheses, for example `file.creationTime`. You can also use the \[] syntax, for example `file["creationTime"]`. + +## Conventions d'écriture + +Les conventions suivantes sont utilisées dans la syntaxe de la fonction : + +- les caractères `{ }` (accolades) indiquent des paramètres facultatifs. Par exemple, `.delete( { option : Integer } )` signifie que le paramètre *option* peut être omis lors de l'appel de la fonction. +- la notation `{ ; ...param }` indique un nombre illimité de paramètres. Par exemple, `.concat( value : any { ;...valueN } ) : Collection` signifie qu'un nombre illimité de valeurs de n'importe quel type peut être passé à la fonction. +- the `any` keyword is used for parameters that can be of any type that can be stored within attributes (number, text, boolean, date, time, object, collection...). + +## Autres ressources + +Pour une présentation générale des fondements et concepts du langage 4D, veuillez consulter la section [Concepts du langage 4D](Concepts/about.md). + +Pour une description du langage «classique» de 4D, veuillez vous reporter au manuel de *Langage 4D* sur [doc.4d.com](https://doc.4d.com). + + + diff --git a/website/translated_docs/fr/Admin/building.md b/website/translated_docs/fr/Admin/building.md new file mode 100644 index 00000000000000..d76a287a8a317c --- /dev/null +++ b/website/translated_docs/fr/Admin/building.md @@ -0,0 +1,646 @@ +--- +id: building +title: Générer un package projet +--- + +4D includes a final application builder to create a project package (final build). Ce générateur simplifie le processus de finalisation et de déploiement des applications compilées 4D. Il gère automatiquement les fonctionnalités spécifiques de différents systèmes d'exploitation et facilite le déploiement d'applications client-serveur. + +Le générateur d'applications vous permet de : + +* Générer une structure compilée, sans code interprété, +* Générer une application autonome exécutable, c'est-à-dire fusionnée avec 4D Volume Desktop, le moteur de base de données 4D, +* Générer différentes applications à partir de la même structure compilée via un projet XML, +* Générer des applications client-serveur homogènes, +* Générer des applications client-serveur avec mise à jour automatique des composants client et serveur. +* Enregistrer vos paramètres de génération pour une utilisation ultérieure (bouton *Enregistrer les paramètres*). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible in compiled applications. + + +## Aperçu du générateur d'application + +Générer un package de projet peut être réalisée à l'aide de : + +- soit la commande [BUILD APPLICATION](https://doc.4d.com/4Dv18R4/4D/18-R4/BUILD-APPLICATION.301-4982852.en.html), +- soit la[ fenêtre Générateur d'application](#application-builder). + +Pour afficher la boîte de dialogue du générateur d'application, sélectionnez **Développement** > **Générer l'application...** dans la barre de menus. + +![](assets/en/Project/buildappProj.png) + +La boîte de dialogue du générateur d'application comprend plusieurs pages accessibles via des onglets : + +![](assets/en/Project/appbuilderProj.png) + + +La génération ne peut s'effectuer qu'une fois le projet compilé. Si vous sélectionnez cette commande sans avoir préalablement compilé le projet ou si le code compilé ne correspond pas au code interprété, une boîte de dialogue d'avertissement apparaît indiquant que le projet doit être (re)compilé. + + +### Paramètres du générateur d'application + +Chaque paramètre de générateur d'application est stocké en tant que clé XML dans le fichier de l'application nommé "buildApp.4DSettings", situé dans le dossier Settings du projet. + +Les paramètres par défaut sont utilisés lors de la première utilisation de la boîte de dialogue du Générateur d'application. Le contenu du fichier est mis à jour, si nécessaire, lorsque vous cliquez sur **Construire** ou **Enregistrer les paramètres**. Vous pouvez définir plusieurs autres fichiers de paramètres XML pour le même projet et les utiliser à l'aide de la commande [BUILD APPLICATION](https://doc.4d.com/4Dv17R6/4D/17-R6/BUILD-APPLICATION.301-4311300.en.html). + +Les clés XML fournissent des options supplémentaires à celles affichées dans la boîte de dialogue du Générateur d'application. La description de ces clés est détaillée dans le manuel [4D Clés XML BuildApplication](https://doc.4d.com/4Dv18R4/4D/18-R4/4D-XML-Keys-BuildApplication.100-5068211.en.html). + +### Fichier d'historique + +Lorsqu'une application est créée, 4D génère un fichier journal nommé *BuildApp.log.xml* dans le dossier **Logs** du projet. Le fichier d'historique stocke les informations suivantes pour chaque génération : + +- Le début et la fin de la génération des cibles, +- Le nom et le chemin d'accès complet des fichiers générés, +- La date et l'heure de la génération, +- Toutes les erreurs qui se sont produites, +- Tout problème de signature (par exemple, un plug-in non signé). + +La vérification de ce fichier peut vous aider à gagner du temps lors des prochaines étapes de déploiement, si vous avez l'intention, par exemple, de notariser votre application. + +> Utilisez la commande `Get 4D file (Build application log file)` pour obtenir l'emplacement du fichier journal. + + + +## Nom de l'application et dossier de destination + +![](assets/en/Project/buidappstructureProj.png) + +Entrez le nom de l'application dans **Nom de l'application**. + +Spécifiez le dossier de l'application générée dans le**Dossier de destination**. Si le dossier spécifié n'existe pas déjà, 4D vous créera un dossier *Build*. + + + +## Page de structure compilée + +Cet onglet vous permet de générer un fichier de structure compilé standard et/ou un composant compilé : + +![](assets/en/Project/appbuilderProj.png) + + +### Générer une structure compilée + +Génère une application contenant uniquement du code compilé. + +Cette fonctionnalité crée un fichier *.4dz* dans un dossier *Compiled Database/\*. Par exemple, si vous avez nommé votre application «MyProject», 4D créera : + +*\/Compiled Database/MyProject/MyProject.4dz* + +> Un fichier .4dz est essentiellement une version compressée du dossier du projet. .4dz files can be used by 4D Server, 4D Volume license (merged applications), and 4D. La taille compacte et optimisée des fichiers .4dz facilite le déploiement des packages de projet. + + +#### Inclure les dossiers associés + +Lorsque vous cochez cette option, tous les dossiers liés au projet sont recopiés dans le dossier Build en tant que dossiers *Components* et *Resources*. Pour plus d'informations sur ces dossiers, veuillez vous reporter à la [description de l'architecture du projet](Project/architecture.md). + + +### Générer un composant + +Génère un composant compilé à partir de la structure. + +Un composant est un fichier de structure 4D standard dans lequel des fonctionnalités spécifiques ont été développées. Une fois le composant configuré et installé dans un autre projet 4D (le projet d'application hôte), ses fonctionnalités sont accessibles depuis le projet hôte. + +Si vous avez nommé votre application *Moncomposant*, 4D créera un dossier *Component* contenant le dossier *MyComponent.4dbase* : + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +Le dossier *MyComponent.4dbase* contient : +- fichier *MyComponent.4DZ* +- Un dossier *Resources* - toutes les ressources associées sont automatiquement copiées dans ce dossier. Les autres composants et/ou dossiers de plugins ne sont pas copiés (un composant ne peut pas utiliser de plug-ins ou d'autres composants). + + +## Page Application + +Cet onglet vous permet de créer une version autonome et monoposte de votre application : + +![](assets/en/Project/standaloneProj.png) + +### Créer une application autonome + +Cochez l'option **Créer une application autonome** et cliquez sur **Générer** pour créer une application autonome (double-cliquable) directement à partir de votre projet d'application. + +Les éléments suivants sont requis pour la création : +- 4D Volume Desktop (le moteur de base de données 4D), +- une [licence appropriée](#licenses) + +Sous Windows, cette fonctionnalité crée un fichier exécutable (.exe). Sous macOS, il gère la création de progiciels. + +Le principe consiste à fusionner le fichier 4D Volume Desktop avec votre fichier de structure compilé. Les fonctionnalités offertes par le fichier 4D Volume Desktop sont liées à l’offre commerciale à laquelle vous avez souscrite. Pour plus d’informations sur ce point, reportez-vous à la documentation commerciale et au site Internet de [4D Sas (http://www.4d.com/)](http://www.4d.com/). + +Vous pouvez définir un fichier de données par défaut ou permettre à l'utilisateur de créer et d'utiliser son propre fichier de données (cf. section [Gestion du fichier de données dans les applications finales](https://doc.4d.com/4Dv17R6/4D/17-R6/Data-file-management-in-final-applications.300-4354729.en.html)). + +Il est possible d'automatiser la mise à jour des applications monopostes fusionnées moyennant l'utilisation d'une séquence de commandes du langage (cf. section [Mise à jour auto des applications serveur ou monopostes](https://doc.4d.com/4Dv17R6/4D/17-R6/Automatic-updating-of-server-or-single-user-applications.300-4354721.en.html)). + +#### Emplacement du 4D Volume Desktop + +Afin de créer une application autonome, il convient d'abord de désigner le dossier contenant le fichier 4D Volume Desktop : + +* *sous Windows*, le dossier contient notamment les fichiers 4D Volume Desktop.4DE, 4D Volume Desktop.RSR ainsi que différents fichiers et dossiers nécessaires à son fonctionnement. Ces éléments doivent être placés au premier niveau du dossier sélectionné. +* *sous macOS*, 4D Volume Desktop est fourni sous la forme d’un progiciel structuré contenant divers fichiers et dossiers génériques. + +Pour sélectionner le dossier de 4D Volume Desktop, cliquez sur le bouton **[...]**. Une boîte de dialogue vous permettant de désigner le dossier (Windows) ou le progiciel (macOS) de 4D Volume Desktop apparaît. + +Une fois le dossier sélectionné, son chemin d’accès complet est affiché et, s’il contient effectivement 4D Volume Desktop, l’option de génération d’application exécutable est activée. + +> Le numéro de version de 4D Volume Desktop doit correspondre à celui du 4D Developer Edition. Par exemple, si vous utilisez 4D Developer v18, vous devez sélectionner un 4D Volume Desktop v18. + +#### Mode de liaison des données + +Cette option vous permet de sélectionner le mode de liaison entre l'application fusionnée et le fichier de données local. Deux modes de liaison sont disponibles : + +* **Nom de l'application** (défaut) - Dans ce mode, l'application 4D ouvre automatiquement le dernier fichier de données ouvert correspondant à la structure. Cela vous permet de déplacer librement le dossier de l'application sur le disque. Il est conseillé en général pour les applications fusionnées, à moins que vous n'ayez spécifiquement besoin de dupliquer l'application. + +* **Chemin de l'application** - Dans ce mode, l'application 4D fusionnée va lire le contenu du fichier *lastDataPath.xml* et tenter d'ouvrir le fichier de données dont l'attribut "executablePath" correspond au chemin d'accès de l'application. Si cette clé est trouvée, son fichier de données correspondant (défini via son attribut "dataFilePath") est ouvert. Sinon, le dernier fichier de données utilisé est ouvert (mode par défaut). + +Pour plus d'informations sur le mode de liaison des données, reportez-vous au paragraphe [Dernier fichier de données ouvert](#last-data-file-opened). + + +#### Fichiers générés + +Lorsque vous cliquez sur le bouton **Générer**, 4D crée automatiquement un dossier **Final Application** dans le **Dossier de destination** défini. Dans le dossier Final Application, se trouve un sous-dossier contenant le nom de l'application spécifiée. + +Si vous avez nommé votre application "MyProject", vous trouverez les fichiers suivants dans ce sous-dossier (MyProject): + +* *Sous Windows* + * MonAppli.exe qui est votre exécutable et MonAppli.Rsr qui contient les ressources de l’application + * Les dossiers 4D Extensions et Resources ainsi que les diverses librairies (DLL), le dossier Native Components et SAS Plugins -fichiers nécessaires au fonctionnement de l’application + * Un dossier Database contenant notamment un dossier Resources et un fichier MyProject.4DZ. Ils constituent la structure compilée du projet et son dossier Resources. **Note** : Ce dossier contient également le dossier *Default Data*, s'il a été défini (cf. [Gestion du fichier de données dans les applications finales](#data-file-management-in-final-applicatons)). + * (Facultatif) Un dossier Components et/ou un dossier Plugins contenant les fichiers des composants et/ou des plug-ins éventuellement inclus dans le projet. Pour plus d’informations sur ce point, reportez-vous à la section [Plugins et composants](#plugins-and-components). + * Un dossier Licences contenant, sous forme de fichier XML, la liste des numéros de licence ayant été intégrés dans l’application. Pour plus d’informations sur ce point, reportez-vous à la section [Licences & Certificat](#licenses-and-certificate). + * Les éléments supplémentaires éventuellement ajoutés dans le dossier 4D Volume Desktop (cf. paragraphe [Personnaliser le dossier 4D Volume Desktop](#customizing-4d-volume-desktop-folder)). + + Tous ces éléments doivent être conservés dans le même dossier afin que l’exécutable fonctionne. + +* *macOS* + - Un progiciel (package) nommé MyProject.app contenant votre application et tous les éléments nécessaires à son fonctionnement, y compris les plug-ins, composants et licences. Pour plus d’informations sur l’intégration des composants et des plug-ins, reportez-vous à la section [Page Plugins et composants](#plugins-and-components). Pour plus d’informations sur l’intégration des licences, reportez-vous à la [Page Licences & Certificat](#licenses-and-certificate). **Note **: Sous Mac Os, la commande [Fichier application](https://doc.4d.com/4Dv18R4/4D/18-R4/Application-file.301-4982855.en.html) du langage 4D retourne le chemin d’accès du fichier NomApplication (situé dans le dossier Contents:macOS du progiciel) et non celui du fichier .comp (dossier Contents:Resources du progiciel). + + +#### Personnaliser le dossier 4D Volume Desktop + +Lors de la construction de l’application exécutable, 4D duplique le contenu du dossier 4D Volume Desktop dans le dossier *Final Application*. Vous pouvez donc parfaitement personnaliser le contenu du dossier 4D Volume Desktop d’origine en fonction de vos besoins. Vous pouvez, par exemple : + +* Installer une version de 4D Volume Desktop correspondant à une langue spécifique ; +* Ajouter un dossier *PlugIns* personnalisé ; +* Personnaliser le contenu du dossier *Resources*. +> Sous Mac Os, 4D Volume Desktop est fourni sous forme de progiciel. Vous devrez tout d’abord afficher son contenu (effectuez **Control+clic** sur son icône) afin de pouvoir le modifier. + + +#### Emplacements des fichiers Web + +Si votre application exécutable est utilisée en tant que serveur Web, les fichiers et dossiers requis par le serveur doivent être installés à des emplacements spécifiques. Ces éléments sont les suivants : + +* fichiers *cert.pem* et *key.pem* (facultatifs) : ces fichiers sont utilisés pour les connexions TLS ainsi que par les commandes de cryptage des données, +* dossier racine Web par défaut. + +Des éléments doivent être installée : + +- **Sous Windows** : dans le sous-dossier *Final Application\MonAppli\Database*. +- **Sous macOS** : à côté du progiciel *MonProjet.app*. + + + + + +## Page Client/Serveur + +4D vous permet de générer des applications client/serveur personnalisées, homogènes, multi-plateformes et avec option de mise à jour automatique. + +![](assets/en/Project/buildappCSProj.png) + +### Qu'est-ce qu'une application Client/Serveur ? + +Une application client/serveur est issue de la combinaison de trois éléments : + +- Un projet 4D compilé, +- L’application 4D Server, +- L’application 4D Volume Desktop (macOS et/ou Windows). + +Une fois générée, une application client/serveur se compose de deux parties homogènes : la partie Serveur (unique), et la partie Cliente (à installer sur chaque poste client). + +En outre, l’application client/serveur est personnalisée et son maniement est simplifié : + +- Pour lancer la partie serveur, l’utilisateur double-clique simplement sur l’application serveur : il n’est pas nécessaire de sélectionner le fichier projet. +- Pour lancer la partie cliente, l’utilisateur double-clique simplement sur l’application cliente, qui se connecte directement à l’application serveur : il n’est pas nécessaire de choisir un serveur dans une boîte de dialogue de connexion. Le client cible le serveur soit via son nom, lorsque client et serveur sont sur le même sous-réseau, soit via son adresse IP, à définir via la clé XML `IPAddress` dans le fichier buildapp.4DSettings. Si la connexion échoue, [des mécanismes alternatifs spécifiques peuvent être mis en place](#management-of-client-connections). Il est également possible de “forcer†l’affichage de la boîte de dialogue de connexion standard en maintenant la touche **Option** (macOS) ou **Alt** (Windows) enfoncée lors du lancement de l’application cliente. Seule la partie cliente peut se connecter à la partie serveur correspondante. Si un utilisateur tente de se connecter à la partie serveur à l’aide d’une application 4D standard, un message d’erreur est retourné et la connexion est impossible. +- Une application client/serveur peut être paramétrée de telle sorte que la partie cliente [puisse être mise à jour automatiquement via le réseau](#copy-of-client-applications-in-the-server-application). +- Il est également possible d'automatiser la mise à jour de la partie serveur moyennant l'utilisation d'une séquence de commandes du langage ([SET UPDATE FOLDER](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-UPDATE-FOLDER.301-4311308.en.html) et [RESTART 4D](https://doc.4d.com/4Dv17R6/4D/17-R6/RESTART-4D.301-4311311.en.html)). + + + +### Construire application serveur + +Cochez cette option pour générer la partie serveur de votre application pendant la phase de construction. Vous devez désigner sur votre disque l’emplacement de l’application 4D Server à utiliser. Ce 4D Server doit correspondre à la plate-forme courante (qui sera également la plate-forme de l’application du serveur). + +#### Emplacement de 4D Server + +Cliquez sur le bouton **[...]** et utilisez la boîte de dialogue *Rechercher un dossier* pour localiser l'application 4D Server. Sous macOS, vous devez sélectionner directement le package 4D Server. + +#### Version courante + +Utilisée pour indiquer le numéro de version courante de l'application générée. Vous pourrez par la suite accepter ou refuser les connexions des applications clientes en fonction de leur numéro de version. The interval of compatibility for client and server applications is set using specific [XML keys](#build-application-settings)). + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. + +#### Mode de liaison des données + +Cette option vous permet de sélectionner le mode de liaison entre l'application fusionnée et le fichier de données local. Deux modes de liaison sont disponibles : + +* **Nom de l'application** (défaut) - Dans ce mode, l'application 4D ouvre automatiquement le dernier fichier de données ouvert correspondant à la structure. Cela vous permet de déplacer librement le dossier de l'application sur le disque. Il est conseillé en général pour les applications fusionnées, à moins que vous n'ayez spécifiquement besoin de dupliquer l'application. + +* **Chemin de l'application** - Dans ce mode, l'application 4D fusionnée va lire le contenu du fichier *lastDataPath.xml* et tenter d'ouvrir le fichier de données dont l'attribut "executablePath" correspond au chemin d'accès de l'application. Si cette clé est trouvée, son fichier de données correspondant (défini via son attribut "dataFilePath") est ouvert. Sinon, le dernier fichier de données utilisé est ouvert (mode par défaut). + +Pour plus d'informations sur le mode de liaison des données, reportez-vous au paragraphe [Dernier fichier de données ouvert](#last-data-file-opened). + + +### Construire application cliente + +Cochez cette option pour générer la partie cliente de votre application lors de la phase de construction. + +#### 4D Volume Desktop + +Vous devez désigner sur votre disque l’emplacement de l’application 4D Volume Desktop à utiliser. Ce 4D Volume Desktop doit correspondre à la plate-forme courante (qui sera également la plate-forme de l’application cliente). Si vous souhaitez générer une version de l’application cliente pour la plate-forme “concurrenteâ€, vous devez répéter l'opération en utilisant une application 4D tournant sur cette plate-forme. Cette étape est nécessaire uniquement pour la version initiale de l'application cliente car les mises à jour suivantes pourront être gérées directement depuis une seule plate-forme via le mécanisme des mises à jour automatiques. Vous devez désigner sur votre disque l’emplacement de l’application 4D Volume Desktop à utiliser. Ce 4D Volume Desktop doit correspondre à la plate-forme courante (qui sera également la plate-forme de l’application cliente). Si vous souhaitez générer une version de l’application cliente pour la plate-forme “concurrenteâ€, vous devez répéter l'opération en utilisant une application 4D tournant sur cette plate-forme. Cette étape est nécessaire uniquement pour la version initiale de l'application cliente car les mises à jour suivantes pourront être gérées directement depuis une seule plate-forme via le mécanisme des mises à jour automatiques. Pour plus d’informations sur ce point, reportez-vous au paragraphe [Personnaliser les dossiers 4D Server et/ou 4D Client](#customizing-4d-server-and-or-4d-client-folders). + +> Le numéro de version de 4D Volume Desktop doit correspondre à celui du 4D Developer Edition. Par exemple, si vous utilisez 4D Developer v18, vous devez sélectionner un 4D Volume Desktop v18. + +Si vous souhaitez que l'application cliente se connecte au serveur via une adresse spécifique (autre que le nom du serveur publié sur le sous-réseau), vous devez utiliser la clé XML `IPAddress` dans le fichier buildapp.4DSettings. Pour plus d'informations sur ce fichier, reportez-vous à la description de la commande`BUILD APPLICATION`. Vous pouvez également mettre en place des mécanismes spécifiques en cas d'échec de la connexion. Les différents scénarios proposés sont décrits dans la section [Gestion de la connexion des applications clientes](#management-of-client-connections). + +#### Copie des applications clientes dans l'application serveur + +Les options de cette zone permettent de mettre en place le mécanisme de mise à jour des parties clientes de vos applications client/serveur via le réseau à chaque nouvelle version de l’application générée. + +- **Permettre la mise à jour automatique de l’application cliente Windows** - Cochez ces options pour que votre application client/serveur Windows bénéficie du mécanisme de mise à jour automatique des parties clientes via le réseau. +- **Permettre la mise à jour automatique de l’application cliente Macintosh ** - Cochez ces options pour que votre application client/serveur Macintosh bénéficie du mécanisme de mise à jour automatique des parties clientes via le réseau. + +* **Permettre la mise à jour automatique de l’application cliente Macintosh** - Si vous souhaitez créer une application cliente multi-plate-forme, vous devez en outre désigner sur votre disque l’emplacement de l’application 4D Volume Desktop correspondant à la plate-forme “concurrente†de la plate-forme de génération. + + Par exemple, si vous construisez votre application sous Windows, vous devez désigner à l’aide du bouton **[...]** l’application 4D Volume Desktop Mac Os (fournie sous forme de package). + + + +#### Comment proposer une mise à jour ? + +Dans la pratique, la proposition de mise à jour des applications clientes découle automatiquement de la mise à jour de l’application serveur. + +Le principe est le suivant : lors de la génération d’une nouvelle version de l’application client-serveur depuis le générateur d’applications, la nouvelle partie cliente est copiée sous forme compressée dans le sous-dossier **Upgrade4DClient** du dossier **NomApplication** Server (sous macOS, ces dossiers sont inclus dans le progiciel serveur). Si vous avez suivi le processus de génération d’une application cliente multi-plate-forme, un fichier *. 4darchive* de mise à jour est disponible pour chaque plate-forme : + +Pour provoquer la mise à jour des applications clientes, il suffit de remplacer l’ancienne version de l’application serveur par la nouvelle puis de l’exécuter. Le reste du processus est automatique. + +Côté client, au moment où l’“ancienne†application cliente tente de se connecter à l’application serveur mise à jour, une boîte de dialogue s’affiche sur le poste client, lui indiquant qu’une nouvelle version est disponible. L’utilisateur peut mettre sa version à jour ou annuler la boîte de dialogue. + +* Si l’utilisateur clique sur **OK**, la nouvelle version est téléchargée sur le poste client via le réseau. A l’issue du téléchargement, l’ancienne application client quitte, la nouvelle est lancée et se connecte au serveur. A l’issue du téléchargement, l’ancienne application client quitte, la nouvelle est lancée et se connecte au serveur. +* Si l’utilisateur clique sur **Annuler**, la mise à jour est annulée ; si l’ancienne version de l’application cliente n’appartient pas à l’intervalle des numéros de version acceptés par le serveur (cf. paragraphe suivant), l’application quitte et la connexion est impossible. Sinon (par défaut), la connexion est établie. + +#### Comment forcer la mise à jour ? + +Dans certains cas, vous pourrez souhaiter que les applications clientes ne puissent pas annuler le téléchargement des mises à jour. Par exemple, si vous avez utilisé une nouvelle version de l’application source 4D Server, il est impératif que la nouvelle version de l’application cliente soit installée sur chaque poste client. + +Pour forcer la mise à jour, il vous suffit d’exclure les versions courantes des applications clientes (N-1 et précédentes) de l’intervalle des numéros de version compatibles avec l’application serveur. Dans ce cas, le mécanisme de mise à jour n’autorisera pas la connexion des applications clientes non mises à jour. Par exemple, si la nouvelle version de l’application client-serveur est 6, vous pouvez stipuler que toute application cliente ayant un numéro de version strictement inférieur à 6 ne sera pas autorisé à se connecter. + +Le [numéro de version courante](#current_version) est défini dans la page Client/Serveur du générateur d’application. Les intervalles de numéros autorisés sont définis dans le projet d’application via des [clés XML](#build-application-settings) spécifiques. + + +#### En cas d’erreur + +Si 4D ne peut pas effectuer la mise à jour de l’application cliente, le poste client affiche le message d’erreur suivant : “La mise à jour de l’application cliente a échoué. L’application va maintenant quitter.†+ +Les causes possibles de cette erreur sont multiples. Lorsque vous rencontrez ce message, il est conseillé de contrôler en premier lieu les paramètres suivants : + +* **Chemins d’accès** : vérifiez la validité des chemins d’accès définis dans le projet d’application via la boîte de dialogue du Générateur d’applications ou via des clés XML (par exemple *ClientMacFolderToWin*). Vérifiez en particulier les chemins d’accès aux versions de 4D Volume Desktop. +* **Privilèges lecture/écriture** : sur la machine cliente, vérifiez que l’utilisateur courant dispose de droits d’accès en écriture pour l’application cliente mise à jour. + + +### Fichiers générés + +A l’issue du processus de génération d’une application client-serveur, vous devez trouver dans le dossier de destination un nouveau dossier nommé **Client Server executable**. Ce dossier contient deux sous-dossiers, *\Client* et *\Server*. +> Ces dossiers ne sont pas générés si une erreur est survenue. Dans ce cas, ouvrez le [fichier d’historique](#log-file) pour connaître la cause de l’erreur. + +Le dossier *\Client* contient la partie cliente de l’application correspondant à la plate-forme d’exécution du générateur d’application. Ce dossier doit être installé sur chaque poste client. Le dossier *\Server* contient la partie serveur de l'application. + +Le contenu de ces dossiers diffère en fonction de la plate-forme courante : + +* *Sous Windows*, chaque dossier contient le fichier exécutable de l’application, nommé *\Client.exe* pour la partie cliente et *\Server.exe* pour la partie serveur, ainsi que les fichiers .rsr correspondants. Les dossiers contiennent également divers fichiers et dossiers nécessaires au fonctionnement des applications et les éléments personnalisés éventuellement placés dans les dossiers 4D Volume Desktop et 4D Server d’origine. +* *Sous macOS*, chaque dossier contient uniquement le progiciel de l’application, nommé \ Client pour la partie cliente et \ Server pour la partie serveur. Chaque progiciel contient tous les éléments nécessaires à son fonctionnement. Sous macOS, un progiciel est lancé via un double-clic. + + > Les progiciels macOS générés contiennent les mêmes éléments que les sous-dossiers Windows. You can display their contents (**Control+click** on the icon) in order to be able to modify them. + +If you checked the “Allow automatic update of client application†option, an additional subfolder called *Upgrade4DClient* is added in the *\Server* folder/package.
    • + +Si vous avez coché l’option “Permettre la mise à jour automatique de l’application clienteâ€, un sous-dossier supplémentaire nommé *Upgrade4DClient* est ajouté dans le dossier/progiciel *\Server*. Ce sous-dossier contient l’application cliente au format macOS et/ou Windows sous forme de fichier compressé. Ce fichier est utilisé lors de la mise à jour automatique des applications clientes. + + +#### Emplacements des fichiers Web + +Si la partie serveur et/ou la partie cliente de votre application exécutable est utilisée en tant que serveur Web, les fichiers et dossiers requis par le serveur doivent être installés à des emplacements spécifiques. Ces éléments sont les suivants : + +- fichiers *cert.pem* et *key.pem* (facultatifs) : ces fichiers sont utilisés pour les connexions SSL ainsi que par les commandes de cryptage des données, +- Dossier racine Web (DossierWeb) par défaut. + +Des éléments doivent être installée : +* **Sous Windows** + * **Application serveur** : dans le sous-dossier *Client Server executable\ \Server\Server Database*. + * **Application cliente** : dans le sous-dossier *Client Server executable\ \Client*. + +* **sous macOS** + * **Application serveur** : à côté du progiciel *\Server*. + * **Application cliente** : à côté du progiciel *\Client*. + + +### Intégrer une structure compilée dans la partie cliente + +4D permet d'intégrer une structure compilée dans une application cliente. Cette fonctionnalité peut être utilisée, par exemple, pour fournir aux utilisateurs une application "portail" donnant accès aux différentes applications serveur, via la commande `OPEN DATABASE` exécutant un fichier `.4dlink`. + +Pour activer cette fonctionnalité, ajoutez les clés `DatabaseToEmbedInClientWinFolder` et/ou `DatabaseToEmbedInClientMacFolder` dans le fichier de configuration *buildApp*. Lorsque l'une de ces clés est présente, le processus de génération de l'application cliente génère une application monoposte : la structure compilée, au lieu du fichier *EnginedServer.4Dlink*, est placée dans le dossier "Database". + +- Si un dossier "Data" par défaut existe dans l'application monoposte, une licence est intégrée. +- Si un dossier "Data" par défaut n'existe pas dans l'application monoposte, elle sera exécutée sans le fichier de données et sans licence. + +Le scénario standard est le suivant : + +1. Dans la boîte de dialogue du Générateur d'application, sélectionnez l'option "Générer une structure compilée" pour produire un .4DC ou un .4DZ pour utiliser l'application en monoposte. +2. Dans le fichier *buildApp.4DSettings* de l'application client-serveur, utilisez la ou les clés xml suivantes pour indiquer le chemin du dossier contenant l'application compilée monoposte : + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Générez l'application client-serveur. Cela produira les effets suivants : + - le dossier de l'application monoposte est copié intégralement dans le dossier "Database" du client fusionné + - le fichier *EnginedServer.4Dlink* du dossier "Database" n'est pas généré + - les fichiers .4DC, .4DZ, .4DIndy de la copie de l'application monoposte sont renommés à l'aide du client fusionné + - la clé `PublishName` n'est pas copiée dans le *info.plist* du client fusionné + - si l'application monoposte ne possède pas de dossier "Data" par défaut, le client fusionné sera exécuté sans données. + +Les fonctionnalités de mise à jour automatique de 4D Server (clé [CurrentVers](#current-version), commande `SET UPDATE FOLDER`, etc.) fonctionnent avec une application monoposte, comme avec une application distante standard. Lors de la connexion, l'application monoposte compare sa clé `CurrentVers` à la plage de version 4D Server. Si elle se trouve en dehors de plage, l'application cliente monoposte mise à jour est téléchargée depuis le serveur et l'Updater lance le processus de mise à jour locale. + + +### Personnalisation des noms de dossier de cache client et/ou serveur + +Les dossiers de cache client et serveur sont utilisés pour stocker des éléments partagés tels que des ressources ou des composants. Ils sont nécessaires pour gérer les échanges entre le serveur et les clients distants. Les applications client/serveur utilisent les chemins d'accès par défaut pour les dossiers de cache système client et serveur. + +Dans certains cas spécifiques, vous devrez personnaliser les noms de ces dossiers pour implémenter des architectures spécifiques (voir ci-dessous). 4D vous fournit les clés `ClientServerSystemFolderName` et `ServerStructureFolderName` à définir dans le fichier de paramètres *buildApp*. + + +#### Dossier de cache client + +La personnalisation du nom du dossier de cache côté client peut être utile lorsque votre application cliente est utilisée pour se connecter à plusieurs serveurs fusionnés qui sont similaires mais qui utilisent des ensembles de données différents. Dans ce cas, pour enregistrer plusieurs téléchargements inutiles de ressources locales identiques, vous pouvez utiliser le même dossier de cache local personnalisé. + +- Configuration par défaut (*pour chaque connexion à un serveur, un dossier cache spécifique est téléchargé/mis à jour*) : + +![](assets/en/Admin/cachea.png) + +- À l'aide de la clé `ClientServerSystemFolderName` (*un seul dossier de cache est utilisé pour tous les serveurs*) : + +![](assets/en/Admin/cacheb.png) + + +#### Dossier de cache du serveur + +La personnalisation du nom du dossier de cache côté serveur est utile lorsque vous exécutez plusieurs applications serveur identiques créées avec différentes versions de 4D sur le même ordinateur. Si vous souhaitez que chaque serveur utilise son propre ensemble de ressources, vous devez personnaliser le dossier de cache du serveur. + +- Configuration par défaut (*les mêmes applications serveur partagent le même dossier de cache*) : + +![](assets/en/Admin/cacheServera.png) + +- À l'aide de la clé `ServerStructureFolderName` (*un dossier de cache dédié est utilisé pour chaque application serveur*) : + +![](assets/en/Admin/cacheServerb.png) + + + + +## Page Plugins et composants + +Dans cet onglet, définissez chaque [plug-in](Concepts/plug-ins.md) et chaque [composant](Concepts/components.md) que vous utiliserez dans votre application autonome ou client/serveur. + +La page liste les éléments chargés par l'application 4D courante : + +![](assets/en/Project/buildapppluginsProj.png) + +* La colonne **Actif** indique les éléments qui seront intégrés dans l’application générée. Par défaut, tous les éléments sont inclus. Pour exclure un plug-in ou un composant, désélectionnez la case qui lui est associée. + +* Colonne **Plugins et composants** - Affiche le nom du plug-in/composant. + +* Colonne **ID** - Affiche le numéro d'identification du plug-in/composant (le cas échéant). + +* La colonne **Type** indique le type de l’élément : plug-in ou composant. + +Si vous souhaitez intégrer d’autres plug-ins ou composants dans l’application exécutable, il vous suffit de les placer dans un dossier **PlugIns** ou **Components** à côté de l’application 4D Volume Desktop ou de l’application 4D Server. Le mécanisme de copie du contenu du dossier de l’application source (cf. paragraphe [Personnaliser le dossier 4D Volume Desktop](#customizing-4d-volume-desktop-folder)) permet d’intégrer tout type de fichier à l’application exécutable. + +En cas de conflit entre deux versions différentes d’un même plug-in (l’une chargée par 4D et l’autre placée dans le dossier de l’application source), la priorité revient au plug-in installé dans le dossier de 4D Volume Desktop/4D Server. En revanche, la présence de deux instances d’un même composant empêchera l’ouverture de l’application. +> L’utilisation de plug-ins et/ou de composants compilés dans une version de déploiement nécessite des numéros de licence adéquats. + + + + + + +## Page Licences & Certificat + +La page Licences & Certificat vous permet de : + +* spécifier le ou les numéro(s) de licence que vous souhaitez intégrer dans votre application exécutable monoposte +* signer l'application à l'aide d'un certificat sous macOS. + +![](assets/en/Admin/buildappCertif.png) + +### Licences + +Cet onglet affiche la liste des licences de déploiement disponibles que vous pouvez intégrer dans votre application. Par défaut, la liste est vide. Vous devez explicitement ajouter votre licence *4D Developer Professional* ainsi que chaque licence* 4D Desktop Volume* liée à utiliser dans l’application générée. Vous pouvez ajouter un numéro 4D Developer Professional et ses licences associées autres que ceux en cours d’utilisation. + +Pour ajouter ou supprimer des licences, utilisez les boutons **[+]** et **[-]** situés en bas de la fenêtre. + +Lorsque vous cliquez sur le bouton \[+], une boîte de dialogue d’ouverture de document apparaît, affichant par défaut le contenu du dossier *[Licenses]* de votre poste. Pour plus d'informations sur l'emplacement de ce dossier, reportez-vous à la commande [Get 4D folder](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html). + +Vous devez désigner les fichiers contenant votre licence Developer et ainsi que vos licences de déploiement. Ces fichiers ont été générés ou mis à jour au moment de l’acquisition de la licence *4D Developer Professional* et des licences *4D Desktop Volume*. + +Une fois que vous avez sélectionné un fichier, la liste indique les caractéristiques de la licence qu’il contient. + +* **N° Licence** : numéro de licence du produit +* **Licence** : nom du produit +* **Date d'expiration** : date d'expiration de la licence (le cas échéant) +* **Chemin d'accès** : emplacement sur le disque + +Si la licence est invalide, un message vous le signale. + +Vous pouvez désigner autant de fichiers valides que vous voulez. Lors de la génération de l’application exécutable, 4D utilisera les licences les plus appropriées. +> Des licences "R" dédiées sont requises pour générer des applications basées sur des versions "R-release" (les numéros de licence des produits "R" débutent par "R-4DDP"). + +A l’issue de la génération, un nouveau fichier de licence de déploiement est automatiquement inclus dans un dossier Licences placé à côté de l’application exécutable (Windows) ou dans le progiciel (macOS). + + +### Certification des applications sous OS X + +Le Générateur d’application permet de signer les applications 4D fusionnées sous macOS (applications monoposte, 4D Server et parties clientes sous macOS). Signer une application permet d’autoriser son exécution par la fonctionnalité Gatekeeper de macOS lorsque l’option "Mac App Store et Développeurs identifiés" est sélectionnée (cf. "A propos de Gatekeeper" ci-dessous). + +- Cochez l'option **Signer l’application** pour inclure la certification dans le processus de génération de l’application pour macOS : + +![](assets/en/Admin/buildapposxcertProj.png) + +L'option est affichée sous Windows et macOS mais n’est prise en compte que pour les versions macOS. + +* **Nom du certificat** : saisissez dans cette zone le nom de votre certificat développeur validé par Apple. Le nom d’un certificat est généralement le nom du certificat dans l’utilitaire Trousseau d’accès (la partie en rouge dans l'exemple suivant) : + +![](assets/en/Project/certificate.png) + +Pour obtenir un certificat de développeur auprès d’Apple, Inc., vous pouvez utiliser les commandes du menu Trousseaux d’accès ou vous connecter à la page suivante : [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). +> Le certificat requiert la présence de l’utilitaire codesign d’Apple. Cet utilitaire est fourni par défaut et se trouve généralement dans le dossier "/usr/bin/". En cas d’erreur, vérifiez que cet utilitaire est présent sur votre disque. + +* **Générer un certificat auto-signé** - exécute le «Certificate Assistant» qui vous permet de générer un certificat auto-signé. Si vous ne disposez pas d'un certificat de développeur Apple, vous devez fournir un certificat auto-signé. Avec ce certificat, aucun message d'alerte ne s'affiche si l'application est déployée en interne. Si l'application est déployée en externe (c'est-à-dire via http ou e-mail), au lancement, macOS affiche un message d'alerte indiquant que le développeur de l'application n'est pas identifié. L'utilisateur peut "forcer" l'ouverture de l'application.

      Dans le «Certificate Assistant», veillez à sélectionner les options appropriées : ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> 4D recommande de souscrire au programme Apple Developer Program pour accéder aux "Developer Certificates" nécessaires à la notarisation des applications (voir ci-dessous). + + + +#### A propos de Gatekeeper + +Gatekeeper est une fonction de sécurité d’OS X permettant de contrôler l’exécution des applications téléchargées depuis Internet. Si une application téléchargée ne provient pas de l’Apple Store ou n’est pas signée, elle est rejetée et ne peut être lancée. + +L'option **Signer l'application** du Générateur d’application de 4D permet de générer des applications compatibles avec cette option par défaut. + + +#### À propos de la notarisation + +La notarisation des applications est fortement recommandée par Apple à partir de macOS 10.14.5 (Mojave) et 10.15 (Catalina), car les applications non notariées déployées via Internet sont bloquées par défaut. + +Sous 4D v18, les [fonctionnalités de signature intégrées](#os-x-signing-certificate) ont été mises à jour pour répondre à toutes les exigences d'Apple pour permettre l'utilisation du service de notarisation d'Apple. La notarisation elle-même doit être réalisée par le développeur et est indépendante de 4D (à noter également qu'elle nécessite l'installation de Xcode). Veuillez vous référer à [ce post du blog 4D](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) qui fournit une description, par étapes, du processus de notarisation. + +Pour plus d'informations sur le concept de notarisation, veuillez consulter [cette page sur le site Apple developer](https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow). + +## Personnaliser les icônes d’une application + +4D associe une icône par défaut aux applications exécutables (monopostes et client-serveur). Vous pouvez cependant la personnaliser pour chaque application. + +* **Sous macOS** - La personnalisation de l’icône de votre application est prise en charge par 4D lors de la construction de l’application exécutable. Pour cela, vous devez, avant la construction du fichier de l’application, créer un fichier d’icône (type icns) et le placer à côté du dossier de structure. +> Apple, Inc. fournit un outil spécifique pour générer les fichiers d’icône *icns* (pour plus d'informations, veuillez consulter la [documentation d'Apple](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2)). + + Votre fichier d’icône doit avoir le même nom que le fichier du projet et comporter l’extension *.icns*. 4D prend automatiquement ce fichier en compte lors de la génération de l’application double-cliquable (le fichier *.icns* est renommé *NomApplication.icns* et recopié dans le dossier Resources ; l’entrée *CFBundleFileIcon* du fichier *info.plist* est mise à jour). + +* **Sous Windows** - La personnalisation de l’icône de votre application est prise en charge par 4D lors de la construction de l’application exécutable. Pour cela, vous devez, avant la construction du fichier de l’application, créer un fichier d’icône (extension *.ico*) et le placer à côté du fichier de structure interprété (fichier du projet). + + Votre fichier d’icône doit avoir le même nom que le fichier de structure interprété et comporter l’extension *.ico*. 4D prend automatiquement ce fichier en compte lors de la génération de l’application exécutable. + +Vous pouvez également définir des [clés XML](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML-Keys-BuildApplication.100-4465602.en.html) spécifiques dans le fichier buildApp.4DSettings pour désigner chaque icône devant être utilisée. Les clés suivantes sont disponibles : + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- ClientMacIconForWinPath +- ClientWinIconForWinPath + + + +## Gestion des fichiers de données + +### Ouverture du fichier de données + +Lorsqu'un utilisateur lance une application fusionnée ou une mise à jour (applications monopostes ou applications client-serveur), 4D va tenter d'ouvrir un fichier de données valide. Plusieurs emplacements sont successivement examinés par l'application. + +La séquence de lancement d'une application fusionnée est la suivante : + +1. 4D tente d'ouvrir le Dernier fichier de données ouvert, [comme décrit ci-dessous](#last-data-file-opened) (non applicable lors du lancement initial). +2. S'il n'est pas trouvé, 4D tente d'ouvrir en mode lecture seule le fichier de données situé dans le dossier de données par défaut au même niveau que le fichier .4DC. +3. S'il n'est pas trouvé, 4D tente d'ouvrir le fichier de données par défaut standard (même nom et même emplacement que le fichier .4DZ). +4. S'il n'est pas trouvé, 4D affiche une boîte de dialogue standard de sélection/création de fichier de données. + + +### Dernier fichier de données ouvert + +#### Chemin d'accès du dernier fichier de données +Toute application autonome ou serveur générée avec 4D stocke le chemin d'accès du dernier fichier de données ouvert dans le dossier de préférences de l'utilisateur de l'application. + +L'emplacement du dossier de préférences de l'utilisateur de l'application correspond au chemin retourné par l'instruction suivante : + +```4d +prefsUtilisateur:=Get 4D folder(Dossier 4D actif) +``` + +Le chemin d'accès du fichier de données est stocké dans un fichier dédié, nommé *lastDataPath.xml*. + +Grâce à cette architecture, lorsque vous fournissez une mise à jour de votre application, le fichier de données de l'utilisateur local (le dernier fichier de données utilisé) est automatiquement ouvert dès le premier lancement. + +Ce mécanisme est généralement adapté aux déploiements standard. Cependant, dans des cas spécifiques, par exemple si vous dupliquez vos applications fusionnées, vous pouvez avoir besoin de modifier la manière dont le fichier de données est lié à l'application. + +#### Configurer le mode de liaison des données + +4D utilise automatiquement, avec vos applications compilées, le dernier fichier de données ouvert. Par défaut, le chemin d'accès du fichier de données est stocké dans le dossier de préférences de l'utilisateur de l'application et est lié au **nom de l'application**. + +Ce fonctionnement peut s'avérer inadapté si vous souhaitez dupliquer une application fusionnée destinée à utiliser différents fichiers de données. En effet, les applications dupliquées vont en fait partager le même dossier de préférences de l'utilisateur et donc, toujours utiliser le même fichier de données -- même si le fichier de données est renommé, car l'application utilisera toujours le dernier fichier de données ouvert par l'application. + +4D vous permet donc de lier votre chemin de fichier de données au chemin de l'application. Dans ce cas, le fichier de données sera relié via un chemin spécifique et ne sera plus simplement le dernier fichier utilisé. 4D vous permet donc de lier votre chemin de fichier de données au **chemin de l'application**. + +Ce mode vous permet de dupliquer vos applications fusionnées sans rompre le lien vers le fichier de données. Cependant, avec cette option, si le package d'application est déplacé sur le disque, l'utilisateur sera invité à entrer un fichier de données, car le chemin de l'application ne correspondra plus à l'attribut "executablePath" (après qu'un utilisateur ait sélectionné un fichier de données, le fichier *lastDataPath.xml* est mis à jour en conséquence). + + +*Duplication lorsque les données sont liées par le nom de l'application :* ![](assets/en/Project/datalinking1.png) + +*Duplication lorsque les données sont liées par le chemin de l'application :* ![](assets/en/Project/datalinking2.png) + +Vous sélectionnez le mode de liaison des données lors de la phase de génération de l'application. Vous pouvez : + +- Utiliser la [Page Application](#application) ou la [Page Client/Serveur](#client-server) de boîte de dialogue du Générateur d'applications. +- Utiliser la clé XML **LastDataPathLookup** (application monoposte ou application serveur). + + +### Définir un dossier de données par défaut + +4D vous permet de définir un fichier de données par défaut lors de la phase de construction de l'application. Au premier lancement de l'application, en l'absence de fichier local (cf. [séquence de lancement décrite ci-dessus](#opening-the-data-file)), le fichier de données par défaut est automatiquement ouvert silencieusement en mode lecture seule par 4D. Cela vous donne un meilleur contrôle sur la création et/ou l'ouverture des fichiers de données lors du premier lancement d'une application fusionnée. + +Plus particulièrement, il permet de répondre aux besoins suivants : + +- Eviter l'affichage de la boîte de dialogue d'ouverture de fichier de données de 4D au lancement d'une nouvelle application fusionnée ou d'une mise à jour. Vous pouvez détecter, par exemple dans la , que le fichier de données par défaut a été ouvert et donc, exécuter votre propre code et/ou boîtes de dialogue permettant de créer ou de sélectionner un fichier de données local. +- Permettre la distribution d'applications fusionnées comportant des données en lecture seulement (par exemple des applications de démonstration). + + +Pour définir et utiliser un fichier de données par défaut : + +- Vous devez fournir un fichier de données par défaut (nommé "Default.4DD") et le stocker dans un dossier spécifique (nommé "Default Data") à l'intérieur du dossier du projet d'application. Ce fichier doit être accompagné de tous les fichiers nécessaires, en fonction de la configuration du projet : index (.4dIndx), blobs externes, journal, etc. Il est de votre responsabilité de livrer un fichier de données par défaut valide. A noter que, comme le fichier de données par défaut est ouvert en mode lecture seule, il est recommandé de désélectionner l'option "Utiliser le fichier d'historique" dans le fichier de structure original avant de créer le fichier de données. +- Au moment de la génération de l'application, le dossier de données par défaut est intégré dans l'application fusionnée. Tous les fichiers présents dans ce dossier par défaut sont également embarqués. + +Le schéma suivant illustre cette fonctionnalité : + +![](assets/en/Project/DefaultData.png) + +Lorsque le fichier de données par défaut est détecté au premier lancement, il est silencieusement ouvert en mode lecture seulement, vous permettant ainsi d'exécuter toute opération personnalisée (à condition qu'elle ne modifie pas le fichier de données lui-même). + + +## Gestion de la connexion des applications clientes + +La gestion des connexions des applications clientes recouvre les mécanismes par lesquels une application cliente fusionnée se connectera au serveur cible, une fois en environnement de production. + +### Scénario de connexion + +Le processus de connexion des applications clientes fusionnées prend en charge les cas où le serveur dédié n'est pas disponible. Le scénario du démarrage d'une application cliente 4D est le suivant : + +- L'application cliente tente de se connecter au serveur via le service de découverte (basé sur le nom du serveur, publié sur le même sous-réseau que l'application cliente). + OU + Si des informations de connexion valides sont présentes dans le fichier "EnginedServer.4DLink" à l'intérieur de son dossier, l'application cliente tente de se connecter à l'adresse du serveur spécifiée dans ce fichier. +- En cas d'échec, l'application cliente tente de se connecter au serveur à l'aide des informations présentes dans le dossier de préférences utilisateur de l'application (fichier "lastServer.xml", cf. dernière étape). +- En cas d'échec, l'application cliente affiche une boîte de dialogue d'erreur de connexion. + - Si l'utilisateur clique sur le bouton **Sélectionner...** (lorsqu'il été autorisé par le développeur 4D au moment de la génération de l'application, voir ci-dessous), la boîte de dialogue standard "Connexion au serveur" est affichée. + - Si l'utilisateur clique sur le bouton **Quitter**, l'application client quitte. +- Si la connexion est établie avec succès, les paramètres de cette connexion sont sauvegardés dans le dossier de préférences utilisateur de l'application cliente, ce qui permettra de les réutiliser ultérieurement en cas de besoin. + +### Sauvegarde du chemin du dernier serveur + +Le chemin du dernier serveur utilisé est automatiquement sauvegardé dans un fichier nommé "lastServer.xml" placé dans le dossier de préférences utilisateur de l'application cliente. Ce dossier est situé à l'emplacement suivant : + +```4d +prefsUtilisateur:=Get 4D folder(Dossier 4D actif) +``` + +Ce mécanisme permet de prendre en charge le cas où le serveur cible primaire est temporairement indisponible pour une raison quelconque (par exemple pour une opération de maintenance). Lorsque ce cas se produit pour la première fois, la boîte de dialogue de sélection de serveur est affichée (si elle est autorisée, cf. ci-dessous) et l'utilisateur peut manuellement sélectionner un serveur alternatif, dont le chemin est alors sauvegardé si la connexion est établie et validée. Toute indisponibilité ultérieure sera alors automatiquement prise en charge à l'aide des paramètres de connexion présents dans le fichier "lastServer.xml". + +> - Lorsque les applications clientes ne peuvent pas bénéficier du service de découverte, par exemple à cause de la configuration réseau, il reste recommandé que le développeur indique un nom d'hôte au lors de la génération de l'application à l'aide de la clé [IPAddress](https://doc.4d.com/4Dv17R6/4D/17-R6/IPAddress.300-4465710.en.html) dans le fichier "BuildApp.xml". Le mécanisme de sauvegarde du chemin du dernier serveur est conçu pour les cas d'indisponibilité temporaire uniquement. +> - Dans tous les cas, il est possible de maintenir la touche **Alt/Option** au démarrage de l'application cliente afin d'afficher la boîte de dialogue de sélection du serveur. + + + +### Accès à la boîte de dialogue de sélection de serveur en cas d'erreur + +Vous pouvez choisir d'afficher ou non la boîte de dialogue standard de sélection de serveur sur les applications clientes fusionnées lorsque le serveur ne répond pas. La configuration dans ce cas dépend de la valeur de la clé XML [ServerSelectionAllowed](https://doc.4d.com/4Dv17R6/4D/17-R6/ServerSelectionAllowed.300-4465714.en.html) sur le poste qui génère l'application client/serveur. Vous disposez de trois possibilités : + +- **Affichage d'un message d'erreur sans accès possible à la boîte de dialogue de sélection de serveur**. Fonctionnement par défaut. L'application peut uniquement quitter. + Clé Xml `ServerSelectionAllowed` : valeur **False** ou clé omise ![](assets/en/Project/connect1.png) + +- **Affichage d'un message d'erreur avec accès possible à la boîte de dialogue de sélection de serveur.**. L'utilisateur peut accéder à la fenêtre de sélection de serveur en cliquant sur le bouton **Sélectionner...** + Clé XML `ServerSelectionAllowed` : valeur **True** ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) diff --git a/website/translated_docs/fr/Admin/cli.md b/website/translated_docs/fr/Admin/cli.md new file mode 100644 index 00000000000000..282f784504d1e7 --- /dev/null +++ b/website/translated_docs/fr/Admin/cli.md @@ -0,0 +1,190 @@ +--- +id: cli +title: Interface de ligne de commande +--- + +Vous pouvez utiliser le terminal macOS ou la console Windows pour piloter vos applications 4D (4D et 4D Server) à l'aide de lignes de commande. Cette fonctionnalité vous permet notamment : + +- de lancer une base de données à distance, ce qui peut être particulièrement utile pour administrer des serveurs Web. +- d'exécuter des tests automatiques pour vos applications. + +## Informations de base + +Vous pouvez exécuter des lignes de commande pour les applications 4D à l'aide du terminal macOS ou de la console Windows. + +- Sous macOS, vous devez utiliser la commande `open`. +- Sous Windows, vous pouvez simplement passer les arguments directement. + +> Sous macOS, vous pouvez passer les arguments directement en allant dans le dossier contenant l'application, à l'intérieur du package (Contents/MacOS), ce qui permet d'adresser le flux stderr. Par exemple, si le package 4D se trouve dans le dossier `MyFolder`, vous devez écrire la ligne de commande comme suit : `/MyFolder/4D.app/Contents/MacOS/4D`. Nous vous recommandons cependant d'utiliser la commande `open` chaque fois que vous n'avez pas besoin d'accéder au flux stderr. + +## Lancer une application 4D + +Voici une description des lignes de commande et des arguments pris en charge pour le lancement d'applications 4D. + +Syntaxe : +``` + [--version] [--help] [--project] [ [--data ]] +[--opening-mode interpreted | compiled] [--create-data] [--user-param ] [--headless] [--dataless] +[--webadmin-settings-file] [--webadmin-access-key] [--webadmin-auto-start] [--webadmin-store-settings] +``` +| Argument                               | Valeur | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `applicationPath` | Chemin de 4D, 4D Server ou de l'application fusionnée | Lance l'application. Identique au double-clic sur l'application 4D. Lorsqu'elle est appelée sans argument de fichier de structure, l'application est exécutée et la boîte de dialogue «sélectionner la base de données» apparaît. | +| `--version` | | Affiche la version de l'application et quitte | +| `--help` | | Affiche le message d'aide et quitte. Autres arguments : -?, -h | +| `--project` | projectPath | packagePath | 4dlinkPath | Fichier de projet à ouvrir avec le fichier de données courant. Aucune boîte de dialogue n'apparaît. | +| `--data` | dataPath | Fichier de données à ouvrir avec le fichier de projet désigné. S'il n'est pas indoqué, 4D utilise le dernier fichier de données ouvert. | +| `--opening-mode` | interpreted | compiled | Base de données de requêtes à ouvrir en mode interprété ou compilé. Aucune erreur n'est générée si le mode demandé n'est pas disponible. | +| `--create-data` | | Crée automatiquement un nouveau fichier de données si aucun fichier de données valide n'est trouvé. Aucune boîte de dialogue n'apparaît. 4D utilise le nom de fichier passé dans l'argument "--data" s'il en exise un (génère une erreur si un fichier du même nom existe déjà). | +| `--user-param` | Chaîne utilisateur personnalisée | Une chaîne qui sera disponible dans l'application 4D via la commande Get database parameter (la chaîne ne doit pas commencer par un caractère "-", qui est réservé). | +| `--headless` | | Lance 4D, 4D Server ou l'application fusionnée sans interface (mode headless). Dans ce mode :

    • Le mode Développement n'est pas disponible, la base de données démarre en mode Application
    • Aucune barre d'outils, barre de menus, fenêtre MDI ou écran de démarrage ne s'affiche
    • Aucune icône n'est affichée dans le dock ou la barre des tâches
    • La base de données ouverte n'est pas enregistrée dans le menu "Bases de données récentes"
    • Le journal de diagnostic est automatiquement lancé (voir [SET DATABASE PARAMETER] (https://doc.4d.com/4dv19/help/command/en/page642.html), sélecteur 79)
    • Chaque appel à une boîte de dialogue est intercepté et une réponse automatique est fournie (par exemple OK pour la commande [ALERT] (https://doc.4d.com/4dv19/help/command/en/page41.html), Abort pour un boîte de dialogue d'erreur, etc.). Toutes les commandes interceptées (*) sont enregistrées dans le journal de diagnostic.

    • Pour les besoins de maintenance, vous pouvez envoyer n'importe quel texte aux flux de sortie standard à l'aide de la commande [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html). A noter que les applications 4D headless ne peuvent être fermées qu'en appelant [QUIT 4D](https://doc.4d.com/4dv19/help/command/en/page291.html) ou en utilisant le gestionnaire de tâches du système d'exploitation. | +| `--dataless` | | Lance 4D, 4D Server ou une application fusionnée en mode headless. Le mode Dataless est utile lorsque 4D exécute des tâches sans données (compilation de projet par exemple). Dans ce mode :
    • Aucun fichier contenant des données n'est ouvert, même s'il est spécifié dans la ligne de commande ou le fichier `.4DLink`, ou lors de l'utilisation des commandes` CREATE DATA FILE` et `OPEN DATA FILE`.
    • Les commandes qui manipulent les données généreront une erreur. Par exemple : «CREATE RECORD» lance «aucune table à laquelle appliquer la commande».

    • **Note** :
    • S'il est passé en ligne de commande, le mode dataless s'applique à toutes les bases de données ouvertes dans 4D, tant que l'application n'est pas fermée.
    • S'il est passé à l'aide du fichier `.4DLink`, le mode dataless ne s'applique qu'à la base de données spécifiée dans le fichier` .4DLink`. Pour plus d'informations sur les fichiers `.4DLink`, voir [Raccourcis d'ouverture de projet] (../Project/creation.md#project-opening-shortcuts).
    • | +| `--webadmin-settings-file` | Chemin de fichier | Chemin du fichier WebAdmin `.4DSettings` personnalisé pour le [serveur Web WebAdmin](webAdmin.md) | +| `--webadmin-access-key` | Chaîne | Clé d'accès au [serveur Web WebAdmin](webAdmin.md) | +| `--webadmin-auto-start` | Booléen | Statut du démarrage automatique du [serveur Web WebAdmin](webAdmin.md) | +| `--webadmin-store-settings` | | Stocke la clé d'accès et les paramètres de démarrage automatique dans le fichier de paramètres courant (c'est-à-dire le fichier [`WebAdmin.4DSettings`](webAdmin.md#webadmin-settings) par défaut ou un fichier personnalisé désigné par le paramètre `--webadmin-settings-path`). Utilisez l'argument `--webadmin-store-settings` pour enregistrer ces paramètres si nécessaire | + + +[fichier journal de diagnostic](debugLogFiles.md#4ddiagnosticlogtxt) (alerte de licence, boîte de dialogue de conversion, sélection de base de données, sélection du fichier de données). Dans ce cas, un message d'erreur est envoyé à la fois dans le flux stderr et dans le journal d'événements système, puis l'application se ferme. + +### Exemples + +Ces exemples supposent que votre application 4D est stockée sur le bureau et que la base de données à ouvrir se trouve dans le dossier "Documents". + +> Le dossier courant de l'utilisateur est atteint à l'aide de la commande "~" sous macOS et de la commande "%HOMEPATH%" sous Windows. + +Ces exemples supposent que votre application 4D est stockée sur le bureau et que la base de données à ouvrir se trouve dans le dossier "Documents". + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe +``` + +Lancer l'application : + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myDB.4dbase +``` + +Lancer l'application avec un fichier de package sur macOS : + +* Sous macOS : + + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myProj/Project/myProj.4DProject +``` + + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myProj\Project\myProj.4DProject +``` + + + +Lancer l'application avec un fichier projet : + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD +ou : +%HOMEPATH%\Desktop\4D\4D.exe /project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject /data %HOMEPATH%\Documents\data\myData.4DD +``` + +Lancer l'application avec un fichier projet et un fichier de données : + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app MyDatabase.4DLink +``` + +```bash +open "~/Desktop/4D Server.app" MyDatabase.4DLink +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D.exe MyDatabase.4DLink +``` + +```bash +%HOMEPATH%\Desktop\4D Server.exe" MyDatabase.4DLink +``` + +Lancer l'application avec un fichier .4DLink : + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app ~/Documents/myBase.4dbase --args --opening-mode compiled --create-data true +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myBase.4dbase\myDB.4db --opening-mode compiled --create-data true +``` + +Lancez l'application en mode compilé et créer un fichier de données s'il n'est pas disponible : + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --user-param "Hello world" +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --user-param "Hello world" +``` + +Lancer l'application avec un fichier projet et un fichier de données et passer une chaîne comme paramètre utilisateur : + +* Sous macOS : + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --headless +``` + +```bash +open ~/Desktop/MyBuiltRemoteApp −−headless +``` + +* Sous Windows : + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --headless +%HOMEPATH%\Desktop\4D\MyBuiltRemoteApp.exe --headless +``` diff --git a/website/translated_docs/fr/Admin/dataExplorer.md b/website/translated_docs/fr/Admin/dataExplorer.md new file mode 100644 index 00000000000000..ec77a4618ceb1c --- /dev/null +++ b/website/translated_docs/fr/Admin/dataExplorer.md @@ -0,0 +1,190 @@ +--- +id: dataExplorer +title: Explorateur de données Web +--- + +> **Preview**: The Web Data Explorer is provided as a preview feature. Using this feature in production is not recommended. The final implementation could be slightly different. + + +The Data Explorer provides a web interface to view and query data in your project datastore. Using this tool, you can easily browse among all your entities and search, order, or filter attribute values. It helps you to control data and quickly identify issues at any step of the development process. + +![alt-text](assets/en/Admin/dataExplorer1.png) + + +## Configuration + +The Data Explorer relies on the [`WebAdmin`](webAdmin.md) web server component for the configuration and authentication settings. + +- **configuration**: the Data Explorer configuration reuses the [`WebAdmin` web server settings](webAdmin.md#webadmin-settings), +- **authentication**: access to the Data Explorer is granted when the [session user is authenticated](webAdmin.md#authentication-and-session) and has the "WebAdmin" privilege. When the Data Explorer is accessed through the **Data Explorer** menu item (see below), an automatic authentication is provided. + +> L'accès à l'Explorateur de données peut être désactivé à l'aide de la fonction [`.setAdminProtection().`](API/DataStoreClass.md#setadminprotection). + + +## Opening the Data Explorer + +The Data Explorer page is automatically available when [the `WebAdmin` web server is started](webAdmin.md#starting-the-webadmin-web-server). + +To connect to the Data Explorer web page: + +- if you use a 4D application with interface, select **Data Explorer...** command from: + - the **Records** menu (in 4D stand-alone) + - the **Window** menu (in 4D Server) + +- whether you use a headless 4D application or not, you can open your web browser and enter the following address: + + `IPaddress:HTTPPort/dataexplorer` or `IPaddress:HTTPSPort/dataexplorer` + + In this context, you will be prompted to enter the [access key](webAdmin.md#access-key) to open a `WebAdmin` session on the server: + +![alt-text](assets/en/Admin/accessKeyEnter.png) + +> [HTTPPort](webAdmin.md#http-port) and [HTTPSPort](webAdmin.md#https-port) values are configured in the `WebAdmin` settings. + + + +## Using the Data Explorer + +In addition to a comprehensive and customizable view of your data, the Data Explorer allows you to query and order your data. + +### Pré-requis + +The Data Explorer supports the following web browsers: + +- Chrome +- Safari +- Edge +- FireFox + +The minimum resolution to use the Data Explorer is 1280x720. Recommended resolution is 1920x1080. + +### Basics + +The Data Explorer provides an overall access to the ORDA data model with respect to the [ORDA mapping rules](ORDA/dsMapping.md#general-rules). + +You can switch to the **dark mode** display theme using the selector at the bottom of the page: + +![alt-text](assets/en/Admin/dark.png) + +![alt-text](assets/en/Admin/dataExplorer2.png) + +The page contains several areas: + +- On the left side are the **Dataclasses area** and **Attributes area**, allowing you can select the dataclasses and attributes to display. Attributes are ordered according to the underlying structure creation order. Primary key and indexed attributes have a specific icon. You can filter the list of proposed dataclass names and attribute names using the respective search areas. ![alt-text](assets/en/Admin/dataExplorer3.png) + +- The central part contains the **Search area** and the **Data grid** (list of entities of the selected dataclass). Each column of the grid represents a datastore attribute. + - By default, all entities are displayed. You can filter the displayed entities using the search area. Two query modes are available: [Query on attributes](#query-on-attributes) (selected by default), and the [Advanced query with expression](#advanced-query-with-expression). You select the query mode by clicking on the corresponding button (the **X** button allows you to reset the query area and thus stop filtering): ![alt-text](assets/en/Admin/dataExplorer4b.png) + + - The name of the selected dataclass is added as a tab above the data grid. Using these tabs, you can switch between dataclasses that have been already selected. You can remove a referenced dataclass by clicking the "remove" icon at the right of the dataclass name. + - You can reduce the number of columns by unchecking attributes in the left side. You can also switch the columns in the data grid using drag and drop. You can click on a column header to [sort entities](#ordering-entities) according to its values (when possible). + - If an operation requires a long time, a progress bar is displayed. You can stop the running operation at any moment by clicking on the red button: + +![alt-text](assets/en/Admin/dataExplorer5.png) + + + +- On the right side is the **Details area**: it displays the attribute values of the currently selected entity. All attribute types are displayed, including pictures and objects (expressed in json). You can browse between the entities of the dataclass by clicking the **First** / **Previous** / **Next** / **Last** links at the bottom of the area. + + + +### Updating contents + +When the ORDA model or data is modified on the database side (table added, record edited or deleted, etc.), you just need to refresh the Data Explorer page in the browser (using the F5 key, for example). + + +### Ordering entities + +You can reorder the displayed entity list according to attribute values. All types of attributes can be used for a sort, except picture and object. + +- Click on a column header to order entities according to the corresponding attribute values. By default, the sort is ascending. Click twice for a descending sort. A column used to sort entities is displayed with a small icon and its name is in *italics*. + +![alt-text](assets/en/Admin/dataExplorer7.png) + +- You can sort attributes on several levels. For example, you can sort employees by city and then by salary. To do that, hold down the **Shift** key and click sequentially on each column header to include in the sort order. + + +### Query on attributes + +In this mode, you can filter entities by entering values to find (or to exclude) in the areas above the attribute list. You can filter on one or several attributes. The entity list is automatically updated when you type in. + +![alt-text](assets/en/Admin/dataExplorer6.png) + +If you enter several attributes, a AND is automatically applied. For example, the following filter displays entities with *firstname* attribute starting with "flo" AND *salary* attribute value > 50000: + +![alt-text](assets/en/Admin/dataExplorer9.png) + +The **X** button allows you to remove entered attributes and thus stop filtering. + +Different operators and query options are available, depending on the data type of the attribute. + +> You cannot filter on picture or object attributes. + +#### Numeric operators + +With numeric, date, and time attributes, the "=" operator is selected by default. However, you can select another operator from the operator list (click on the "=" icon to display the list): + +![alt-text](assets/en/Admin/DEFilter1.png) + +#### Dates + +With date attributes, you can enter the date to use through a datepicker widget (click on the date area to display the calendar): + +![alt-text](assets/en/Admin/DEFilter2.png) + +#### Booleans + +When you click on a boolean attribute area, you can filter on **true**/**false** values but also on **null**/**not null** values: + +![alt-text](assets/en/Admin/DEFilter3.png) + +- **null** indicates that the attribute value was not defined +- **not null** indicates that the attribute value is defined (thus true or false). + +#### Texte + +Text filters are not diacritic (a = A). + +The filter is of the "starts with" type. For example, entering "Jim" will show "Jim" and "Jimmy" values. + +You can also use the wildcard character (@) to replace one or more starting characters. Par exemple : + +| A filter with | Finds | +| ------------- | -------------------------------------------------- | +| Bel | All values beginning with “Bel†| +| @do | All values containing “do†| +| Bel@do | All values starting with “Bel†and containing “do†| + +If you want to create more specific queries, such as "is exactly", you may need to use the advanced queries feature. + + +### Advanced queries with expression + +When you select this option, a query area is displayed above the entity list, allowing you to enter any expression to use to filter the contents: + +![alt-text](assets/en/Admin/dataExplorer8.png) + +You can enter advanced queries that are not available as attribute queries. For example, if you want to find entities with *firstname* attribute containing "Jim" but not "Jimmy", you can write: + +``` +firstname=="Jim" +``` + +Vous pouvez utiliser n'importe quelle expression de requête ORDA, comme [documenté avec la fonction `query()`](API/DataClassClass.md#query), avec les limitations ou différences suivantes : + +- For security, you cannot execute formulas using `eval()`. +- Placeholders cannot be used; you have to write a *queryString* with values. +- String values containing space characters must be embedded in double quotes (""). + +For example, with the Employee dataclass, you can write: + +``` +firstname = "Marie Sophie" AND manager.lastname = "@th" +``` + +Vous pouvez cliquer sur l'icône `v` pour afficher à la fois [`queryPlan`](API/DataClassClass.md#queryplan) et [`queryPath`](API/DataClassClass.md#querypath). In the area, you can hover over the subquery blocks to have detailed information per subquery: + +![alt-text](assets/en/Admin/dataExplorer12.png) + +Right-click in the query area to display the previous valid queries: + +![alt-text](assets/en/Admin/dataExplorer11.png) diff --git a/website/translated_docs/fr/Admin/debugLogFiles.md b/website/translated_docs/fr/Admin/debugLogFiles.md new file mode 100644 index 00000000000000..9700fdabe522d1 --- /dev/null +++ b/website/translated_docs/fr/Admin/debugLogFiles.md @@ -0,0 +1,509 @@ +--- +id: debugLogFiles +title: Description des fichiers historiques +--- + +4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) or [WEB SET OPTION](https://doc.4d.com/4dv19/help/command/en/page1210.html) commands and are stored in the [Logs folder](Project/architecture.md#logs-folder) of the database. + +Information logged needs to be analyzed to detect and fix issues. This section provides a comprehensive description of the following log files: + +* [4DRequestsLog.txt](#4drequestslogtxt) +* [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) +* [HTTPDebugLog.txt](#httpdebuglogtxt) +* 4DDebugLog.txt ([standard](#4ddebuglogtxt-standard) & [tabular](#4ddebuglogtxt-tabular)) +* [4DDiagnosticLog.txt](#4ddiagnosticlogtxt) +* [4DIMAPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DPOP3Log.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DSMTPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [ORDA client requests log file](#orda-client-requests) + +> When a log file can be generated either on 4D Server or on the remote client, the word "Server" is added to the server-side log file name, for example "4DRequestsLogServer.txt" + +Log files share some fields so that you can establish a chronology and make connections between entries while debugging: + +* `sequence_number`: this number is unique over all debug logs and is incremented for each new entry whatever the log file, so that you can know the exact sequence of the operations. +* `connection_uuid`: for any 4D process created on a 4D client that connects to a server, this connection UUID is logged on both server and client side. It allows you to easily identify the remote client that launched each process. + +## 4DRequestsLog.txt + +This log file records standard requests carried out by the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) +//server side +``` + + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) +//remote side +``` +> This statement also starts the [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) log file. + +#### En-têtes + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + +#### Contenu + +For each request, the following fields are logged: + +| Field name | Description | +| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: 'YYYY-MM-DDTHH:MM:SS.mmm' | +| systemid | System ID | +| component | Component signature (e.g., '4SQLS' or 'dbmg') | +| process\_info_ | index Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process. | +| request | Request ID in C/S or message string for SQL requests or `LOG EVENT` messages | +| bytes_in | Number of bytes received | +| bytes_out | Number of bytes sent | +| server\_duration | exec\_duration | Depends on where the log is generated:

    • *server\_duration* when generated on the client --Time taken in microseconds for the server to process the request and return a response. B to F in image below, OR
    • *exec\_duration* when generated on the server --Time taken in microseconds for the server to process the request. B to E in image below.
    • | +| write\_duration | Time taken in microseconds for sending the:

    • Request (when run on the client). A to B in image below.
    • Response (when run on the server). E to F in image below.
    • | +| task_kind | Preemptive or cooperative (respectively 'p' or 'c') | +| rtt | Time estimate in microseconds for the client to send the request and the server to acknowledge it. A to D and E to H in image below.

    • Only measured when using the ServerNet network layer, returns 0 when used with the legacy network layer.
    • For Windows versions prior to Windows 10 or Windows Server 2016, the call will return 0.
    • | + +Request flow: + +![](assets/en/Admin/logRequestFlow.PNG) + +## 4DRequestsLog_ProcessInfo.txt + +This log file records information on each process created on the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) //server side +``` + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) //remote side +``` +> This statement also starts the [4DRequestsLog.txt](#4drequestslogtxt) log file. + +#### En-têtes + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + + +#### Contenu + +For each process, the following fields are logged: + +| Field name | Description | +| --------------------------------- | -------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: "YYYY-MM-DDTHH:MM:SS.mmm" | +| process\_info_index | Unique and sequential process number | +| CDB4DBaseContext | DB4D component database context UUID | +| systemid | System ID | +| server\_process\_id | Process ID on Server | +| remote\_process\_id | Process ID on Client | +| process\_name | Process name | +| cID | Identifier of 4D Connection | +| uID | Identifier of 4D Client | +| IP Client | IPv4/IPv6 address | +| host_name | Client hostname | +| user_name | User Login Name on client | +| connection\_uuid | UUID identifier of process connection | +| server\_process\_unique\_id | Unique process ID on Server | + +## HTTPDebugLog.txt + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +How to start this log: + +```4d +WEB SET OPTION(Web debug log;wdl enable without body) +//other values are available +``` + +The following fields are logged for both Request and Response: + +| Field name | Description | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + +## 4DDebugLog.txt (standard) + +This log file records each event occurring at the 4D programming level. Standard mode provides a basic view of events. + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2) +//standard, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2) +//standard, current process only +``` + +The following fields are logged for each event: + +| Column # | Description | +| -------- | ------------------------------------------------------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| 3 | Process ID (p=xx) and unique process ID (puid=xx) | +| 4 | Stack level | +| 5 | Can be Command Name/ Method Name/Message/ Task Start Stop info/Plugin Name, event or Callback/Connection UUID | +| 6 | Time taken for logging operation in milliseconds | + +## 4DDebugLog.txt (tabular) + +This log file records each event occurring at the 4D programming level in a tabbed, compact format that includes additional information (compared to the standard format). + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2+4) +//extended tabbed format, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2+4) +//extended, current process only +``` + +The following fields are logged for each event: + +| Column # | Field name | Description | +| -------- | --------------- | ------------------------------------------------------------- | +| 1 | sequence_number | Unique and sequential operation number in the logging session | + +|2| time| Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | |3| ProcessID|Process ID| |4| unique_processID|Unique process ID| |5| stack_level|Stack level |6| operation_type| Log operation type. This value may be an absolute value:

      1. Commande
      2. Method (project method, database method, etc.)
      3. Message (sent by [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command only)
      4. PluginMessage
      5. PluginEvent
      6. PluginCommand
      7. PluginCallback
      8. Task
      9. Member method (method attached to a collection or an object)

      When closing a stack level, the `operation_type`, `operation` and `operation_parameters` columns have the same value as the opening stack level logged in the `stack_opening_sequence_number` column. Par exemple :

      1. 121 15:16:50:777 5 8 1 2 CallMethod Parameters 0
      2. 122 15:16:50:777 5 8 2 1 283 0
      3. 123 15:16:50:777 5 8 2 1 283 0 122 3
      4. 124 15:16:50:777 5 8 1 2 CallMethod Parameters 0 121 61

      The 1st and 2nd lines open a stack level, the 3rd and 4th lines close a stack level. Values in the columns 6, 7 and 8 are repeated in the closing stack level line. The column 10 contains the stack level opening sequence numbers, i.e. 122 for the 3rd line and 121 for the 4th.| |7|operation|May represent (depending on operation type):
    • a Language Command ID (when type=1)
    • a Method Name (when type=2)
    • a combination of pluginIndex;pluginCommand (when type=4, 5, 6 or 7). May contain something like '3;2'
    • a Task Connection UUID (when type=8)
    • +|8|operation_parameters|Parameters passed to commands, methods, or plugins| |9|form_event|Form event if any; empty in other cases (suppose that column is used when code is executed in a form method or object method)| |10|stack_opening_sequence_number|Only for the closing stack levels: Sequence number of the corresponding opening stack level| |11|stack_level_execution_time|Only for the closing stack levels: Elapsed time in micro seconds of the current logged action; only for the closing stack levels (see 10th columns in lines 123 and 124 in the log above)| + +## 4DDiagnosticLog.txt + +This log file records many events related to the internal application operation and is human-readable. You can include custom information in this file using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. + +How to start this log: + +```4d + SET DATABASE PARAMETER(Diagnostic log recording;1) //start recording +``` + +The following fields are logged for each event: + +| Field Name | Description | +| ------------------ | ------------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | +| timestamp | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| loggerID | Optional | +| componentSignature | Optional - internal component signature | +| messageLevel | Info, Warning, Error | +| message | Description of the log entry | + +Depending on the event, various other fields can also be logged, such as task, socket, etc. + +## 4DSMTPLog.txt, 4DPOP3Log.txt, and 4DIMAPLog.txt + +These log files record each exchange between the 4D application and the mail server (SMTP, POP3, IMAP) that has been initiated by the following commands: + +* SMTP - [SMTP New transporter](API/SMTPTransporterClass.md#smtp-new-transporter) +* POP3 - [POP3 New transporter](API/POP3TransporterClass.md#pop3-new-transporter) +* IMAP - [IMAP New transporter](API/IMAPTransporterClass.md#imap-new-transporter) + +The log files can be produced in two versions: + +* a regular version: + * named 4DSMTPLog.txt, 4DPOP3Log.txt, or 4DIMAPLog.txt + * no attachments + * uses an automatic circular file recycling each 10 MB + * intended for usual debugging + + To start this log: + + ```4d + SET DATABASE PARAMETER(SMTP Log;1) //start SMTP log + SET DATABASE PARAMETER(POP3 Log;1) //start POP3 log + SET DATABASE PARAMETER(IMAP Log;1) //start IMAP log + ``` + + 4D Server: Click on the **Start Request and Debug Logs** button in the [Maintenance Page](https://doc.4d.com/4Dv18R5/4D/18-R5/Maintenance-Page.300-5149308.en.html) of the 4D Server administration window. + + This log path is returned by the `Get 4D file` command. + +* an extended version: + * attachment(s) included no automatic recycling + * custom name + * reserved for specific purposes + + To start this log: + + ```4d + $server:=New object + ... + //SMTP + $server.logFile:="MySMTPAuthLog.txt" + $transporter:=SMTP New transporter($server) + + // POP3 + $server.logFile:="MyPOP3AuthLog.txt" + $transporter:=POP3 New transporter($server) + + //IMAP + $server.logFile:="MyIMAPAuthLog.txt" + $transporter:=IMAP New transporter($server) + ``` + +#### Contenu + +For each request, the following fields are logged: + +| Column # | Description | +| -------- | ------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in RFC3339 format (yyyy-mm-ddThh:mm:ss.ms) | +| 3 | 4D Process ID | +| 4 | Unique process ID | +| 5 |
      • SMTP,POP3, or IMAP session startup information, including server host name, TCP port number used to connect to SMTP,POP3, or IMAP server and TLS status,or
      • data exchanged between server and client, starting with "S <" (data received from the SMTP,POP3, or IMAP server) or "C >" (data sent by the SMTP,POP3, or IMAP client): authentication mode list sent by the server and selected authentication mode, any error reported by the SMTP,POP3, or IMAP Server, header information of sent mail (standard version only) and if the mail is saved on the server,or
      • SMTP,POP3, or IMAP session closing information.
      | + +## Requêtes client ORDA + +Ce journal enregistre chaque requête ORDA envoyée depuis une machine distante. Vous pouvez diriger les informations du journal vers la mémoire ou vers un fichier sur le disque. Vous pouvez choisir le nom et l'emplacement de ce fichier journal. + +How to start this log: + +```4d +//to be executed on a remote machine +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory +``` + +If you want to use the unique sequence number in ORDA request log, you need to trigger it: + +```4d +//to be executed on a remote machine + +SET DATABASE PARAMETER(Client Log Recording;1) +//to enable log sequence number + +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory + +SET DATABASE PARAMETER(Client Log Recording;0) +//disabling sequence number +``` + +The following fields are logged for each request: + +| Field name | Description | Exemple | +| -------------- | ------------------------------------------------------------- | --------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | 104 | +| url | Client ORDA request URL | "rest/Persons(30001)" | +| startTime | Starting date and time using ISO 8601 format | "2019-05-28T08:25:12.346Z" | +| endTime | Ending date and time using ISO 8601 format | "2019-05-28T08:25:12.371Z" | +| duration | Client processing duration (ms) | 25 | +| response | Server response object | {"status":200,"body":{"__entityModel":"Persons",\[...]}} | + + + +## Using a log configuration file + +You can use a **log configuration file** to easily manage log recording in a production environment. This file is preconfigured by the developer. Typically, it can be sent to customers so that they just need to select it or copy it in a local folder. Once enabled, the log configuration file triggers the recording of specific logs. + +### How to enable the file + +There are several ways to enable the log configuration file: + +- On 4D Server with interface, you can open the Maintenance page and click on the [Load logs configuration file](Admin/server-admin.md#load-logs-configuration-file) button, then select the file. In this case, you can use any name for the configuration file. It is immediately enabled on the server. +- You can copy the log configuration file in the [Settings folder](Project/architecture.md#settings-1) of the project. In this case, the file must be named `logConfig.json`. It is enabled at project startup (only on the server in client/server). +- With a built application, you can copy the `logConfig.json` file in the following folder: + + Windows: `Users\[userName]\AppData\Roaming\[application]` + + macOS: `/Users/[userName]/Library/ApplicationSupport/[application]` + +> If you want to enable the log configuration file for all projects in stand-alone, server and remote 4D applications, you can copy the `logConfig.json` file in the following folder: - Windows: `Users\[userName]\AppData\Roaming\4D or \4D Server` - macOS: `/Users/[userName]/Library/ApplicationSupport/4D or /4D Server` + +### JSON file description + +The log configuration file is a `.json` file that can contain the following properties: + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Logs Configuration File", + "description": "A file that controls the state of different types of logs in 4D clients and servers", + "type": "object", + "properties": { + "forceLoggingConfiguration": { + "description": "Forcing the logs configuration described in the file ingoring changes coming from code or user interface", + "type": "boolean", + "default": true + }, + "requestLogs": { + "description": "Configuration for request logs", + "type": "object", + "properties": { + "clientState": { + "description": "Enable/Disable client request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + }, + "serverState": { + "description": "Enable/Disable server request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "debugLogs": { + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "commandList": { + "description": "Commands to log or not log", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "state": { + "description": "integer to specify type of debuglog and options", + + "type": "integer", + "minimum": 0 + } + } + }, + "diagnosticLogs":{ + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "state":{ + "description": "Enable/Disable diagnostic logs 0 or 1 (0 = do not record, 1 = record)", + "type": "integer", + "minimum": 0 + } + } + }, + "httpDebugLogs": { + "description": "Configuration for http debug logs", + "type": "object", + "properties": { + "level": { + "description": "Configure http request logs", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "state": { + "description": "Enable/Disable recording of web requests", + "type": "integer", + "minimum": 0, + "maximum": 4 + } + } + }, + "POP3Logs": { + "description": "Configuration for POP3 logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable POP3 logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "SMTPLogs": { + "description": "Configuration for SMTP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable SMTP log recording (form 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "IMAPLogs": { + "description": "Configuration for IMAP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable IMAP log recording (form 0 to N)", + "type": "integer" + } + } + }, + "ORDALogs": { + "description": "Configuration for ORDA logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable ORDA logs (0 or 1)", + "type": "integer" + }, + "filename": { + "type": "string" + } + } + } + } +} +``` + +### Exemple + +Here is an example of log configuration file: + +```json +{ + "forceLoggingConfiguration": false, + "requestLogs": { + "clientState": 1, + "serverState": 1 + }, + "debugLogs": { + "commandList":["322","311","112"], + "state": 4 + }, + "diagnosticLogs":{ + "state" : 1 + }, + "httpDebugLogs": { + "level": 5, + "state" : 1 + }, + "POP3Logs": { + "state" : 1 + }, + "SMTPLogs": { + "state" : 1 + }, + "IMAPLogs": { + "state" : 1 + }, + "ORDALogs": { + "state" : 1, + "filename": "ORDALog.txt" + } +} +``` \ No newline at end of file diff --git a/website/translated_docs/fr/Admin/licenses.md b/website/translated_docs/fr/Admin/licenses.md new file mode 100644 index 00000000000000..bd4f6f0010e648 --- /dev/null +++ b/website/translated_docs/fr/Admin/licenses.md @@ -0,0 +1,148 @@ +--- +id: licenses +title: Gestion des licences 4D +--- + +Une fois installés sur votre disque, les produits 4D doivent être activés pour que vous puissiez les utiliser. Habituellement, l'activation est automatique si vous [vous connectez à l'aide de votre compte 4D](GettingStarted/Installation.md) dans l'assistant de bienvenue. + +Cependant, dans des cas spécifiques, vous pourriez avoir besoin d'activer vos licences manuellement, si par exemple : + +- votre configuration ne permet pas l'activation automatique, +- vous avez acheté des licences supplémentaires. + +Aucune activation n’est requise pour les usages suivants : + +- 4D utilisé en mode distant (connexion à un 4D Server) +- 4D utilisé en mode local avec un projet d'application interprété sans accès au mode Développement. + + +## Première activation + +Pour activer 4D, sélectionnez la commande **Gestionnaire de licences...** du menu **Aide**. Pour activer 4D Server, lancez l'application 4D Server. La boîte de dialogue de choix du [mode d'activation](#activation-mode) apparaît. + +![](assets/en/getStart/server1.png) + +4D vous propose trois modes d’activation. **L'activation immédiate** est recommandée. + +### Activation immédiate + +Saisissez votre identifiant utilisateur (e-mail ou compte 4D) ainsi que votre mot de passe. Si vous n'avez pas encore de compte client chez 4D, vous devez en créer un à l'adresse suivante : + +[https://account.4d.com/us/login.shtml](https://account.4d.com/us/login.shtml) + +![](assets/en/getStart/activ1.png) + +Entrez ensuite le numéro de licence du produit à activer. Ce numéro se trouve dans l'e-mail de livraison ou le certificat d'authenticité reçu par courrier. + +![](assets/en/getStart/activ2.png) + + +### Activation différée + +Si vous ne pouvez pas utiliser [l'activation immédiate](#instant-activation) parce que votre ordinateur n'a pas d'accès Internet, vous pouvez effectuer une activation différée comme décrit dans les étapes suivantes. + +1. Dans la fenêtre du Gestionnaire de licences de 4D accessible depuis le menu Aide, sélectionnez l'onglet **Activation différée**. +2. Entrez votre Numéro de licence ainsi que votre adresse E-mail, puis cliquez sur **Générer le fichier...** afin de créer le fichier d'ID (*reg.txt*). + +![](assets/en/getStart/activ3.png) + +3. Enregistrez le fichier *reg.txt* sur un support USB puis connectez ce support à un ordinateur qui a un accès Internet. +4. Depuis la machine qui a un accès Internet, connectez-vous sur [https://activation.4d.com](https://activation.4d.com). +5. Dans la page Web, cliquez sur le bouton **Parcourir...** et sélectionnez le fichier *reg.txt* généré lors des étapes 3 et 4 ; puis cliquez sur le bouton **Activer**. +6. Téléchargez le(s) fichier(s) de licence. + +![](assets/en/getStart/activ4.png) + +7. Enregistrez le ou les fichier(s) *license4d* sur un support partagé et transférez-le(s) sur la machine 4D utilisée lors de l'étape 1. +8. De retour sur la machine avec 4D, toujours dans l'écran **Activation différée**, cliquez sur le bouton **Suivant** ; puis cliquez sur le bouton **Charger...** et sélectionnez un fichier *license4d* depuis le media partagé utilisé à l'étape 7. + +![](assets/en/getStart/activ5.png) + +Une fois le fichier de licence chargé, cliquez sur le bouton **Suivant**. + +![](assets/en/getStart/activ6.png) + +9. Cliquez sur le bouton **Ajouter N°** pour ajouter une autre licence. Répétez ces étapes jusqu'à ce que toutes les licences téléchargées à l'étape 6 aient été intégrées. + +Votre application 4D est désormais activée. + +### Activation d’urgence + +Ce mode permet l’activation exceptionnelle et temporaire de l’application 4D (5 jours maximum) sans connexion au site Internet de 4D. Cette activation ne peut être utilisée qu’une seule fois. + + +## Ajouter des licences + +Vous pouvez à tout moment ajouter de nouvelles licences, par exemple pour étendre les capacités de votre application. + +Choisissez la commande **Gestionnaire de licences...** dans le menu **Aide** de l’application 4D ou 4D Server puis cliquez sur le bouton **Actualiser** : + +![](assets/en/getStart/licens1.png) + +Ce bouton vous connecte à notre base clients et active automatiquement toutes les licences nouvelles ou mises à jour liées à la licence courante (la licence courante est affichée en **gras** dans la liste des Licences actives). Vous devrez simplement saisir vos identifiants 4D (compte et mot de passe). Vous devrez simplement saisir vos identifiants 4D (compte et mot de passe). + +- Si vous avez acheté des expansions supplémentaires pour un 4D Server, vous n'avez pas besoin de saisir de numéro -- cliquez simplement sur **Actualiser**. +- A la première activation d'un 4D Server, vous devez uniquement saisir le numéro du serveur et toutes les licences d'expansion associées sont automatiquement affectées. + +Vous pouvez utiliser le bouton **Actualiser** dans les contextes suivants : + +- Lorsque vous avez acquis une expansion supplémentaire et souhaitez l'activer, +- Lorsque vous voulez mettre à jour un numéro de licence temporaire ayant expiré (Partenaires ou évolutions). + + + +## 4D Online Store + +Sur le site web 4D Store, vous pouvez commander, mettre à jour, étendre et gérer vos produits 4D. Vous pouvez vous connecter au store à l'adresse suivante : [https://store.4d.com/fr/](https://store.4d.com/us/) (veuillez sélectionner votre pays). + +Cliquez sur **Se connecter** pour vous identifier à l'aide de votre compte existant ou sur **Nouveau compte** pour en créer un nouveau, puis suivez les instructions à l'écran. + +### Gestion des licences + +Après vous être identifié, vous pouvez cliquer sur le lien **Liste de mes licences** en haut de la partie droite de la fenêtre : + +![](assets/en/getStart/licens2.png) + +Vous pouvez ensuite gérer vos licences en les affectant à des projets. + +Sélectionnez la licence que vous souhaitez dans la liste, puis cliquez sur **Lier à un projet:

      + +![](assets/en/getStart/licens3.png) + +Vous pouvez sélectionner un projet existant ou créer un nouveau : + +![](assets/en/getStart/licens4.png) + +![](assets/en/getStart/licens5.png) + +Les projets vous permettent d'organiser vos licences comme vous le souhaitez : + +![](assets/en/getStart/licens6.png) + + +## Dépannage + +En cas d’échec du processus d’installation ou d’activation, veuillez consulter le tableau suivant, présentant les causes de dysfonctionnements les plus fréquentes : + +| Symptômes | Causes possibles | Solution(s) | +| ----------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Impossible de télécharger le produit depuis le site Internet de 4D | Site Internet indisponible, antivirus, firewall | 1- Réessayez ultérieurement OU 2- Désactivez temporairement votre antivirus ou votre firewall. | +| Impossible d’installer le produit sur le disque (installation refusée). | Droits d’accès utilisateur insuffisants | Ouvrez une session avec des droits d’accès permettant l’installation d’applications (accès administrateur) | +| Echec de l’activation en ligne | Antivirus, firewall, proxy | 1- Désactivez temporairement votre antivirus ou votre firewall OU 2- Utilisez l’activation différée (non disponible avec les licences des versions "R") | + +Si ces informations ne vous permettent pas de résoudre votre problème, veuillez contacter 4D ou votre distributeur local. + + +## Contacts + +Pour toute question relative à l’installation ou l’activation de votre produit, veuillez contacter 4D Sas ou votre distributeur local. + +Pour la France : + +- Web : [http://www.4d.com/fr/](https://us.4d.com/4d-technical-support) +- Téléphone : 0892 68 09 97 (0,34 Euro Ttc/Min) + +Pour le Royaume-Uni : + +- Web: [https://uk.4d.com/4d-technical-support](https://uk.4d.com/4d-technical-support) +- Téléphone : 01625 536178 diff --git a/website/translated_docs/fr/Admin/server-admin.md b/website/translated_docs/fr/Admin/server-admin.md new file mode 100644 index 00000000000000..500065baeb3198 --- /dev/null +++ b/website/translated_docs/fr/Admin/server-admin.md @@ -0,0 +1,526 @@ +--- +id: server-admin +title: Fenêtre d'administration de 4D Server +--- + + +When 4D Server is launched with interface under Windows or macOS, a graphical administration window is available, providing many analysis and control tools for the published 4D application. To display the 4D Server Administration window for the opened project, select the **Window > Administration** menu item, or press **Ctrl+U**. + +> The 4D Server administration window can be accessed from a remote 4D. For more information about this point, please refer to Administration from Remote Machines. + + +## Monitor Page + +The **Monitor** page displays dynamic information concerning database use as well as information about the system and the 4D Server application. + +![](assets/en/Admin/server-admin.png) + +> On Windows, some of the system information displayed on this page are retrieved via the Windows "Performance Analyzer" tools. These tools can only be accessed when the user that opened the session where 4D Server was launched has the necessary administration authorization. + +#### Graphic area + +The graphic area lets you see the evolution in real time of several parameters: the CPU usage, network traffic and memory. You select the parameter to be displayed via a menu found in the center of the window: + +![](assets/en/Admin/server-graphic.png) + +- **CPU Usage**: Overall CPU usage of the machine, for all applications taken together. The specific part of 4D Server in this usage rate is provided in the "Processors" information area. +- **Network**: Number of bytes received per second by the machine (server or client). The number of bytes sent is provided in the "Network" information area. +- **Physical memory**: Quantity of RAM memory of machine used by 4D Server. A more detailed view of memory use is provided in the "Memory" information area. +- **Virtual memory**: Quantity of virtual memory used by the 4D Server application. This memory is allocated by the system according to the application needs. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the maximum quantity of usable virtual memory. The maximum value is calculated dynamically according to the general memory settings of the application. +- **Cache**: Quantity of cache memory used by the 4D Server application. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the total size of the cache memory, as set via the Settings. + +Note that when this option is selected, the graph area scrolling is slowed down since an efficient analysis of the cache is generally carried out over a fairly long observation period. + + +#### Overview Area + +The "Overview" area provides various information concerning the system, application and licenses installed on the 4D Server machine. + +- **System Information**: Computer, system and IP address of server +- **Application Information**: Internal version number of 4D Server and Volume Shadow Copy status +- **Maximum connections**: Number of simultaneous connections allowed by type of server +- **License**: Description of license. When the product license or one of its attached expansions expires in less than 10 days, e.g. in case of a subscription-license, 4D Server tries to automatically renew the license from the 4D user account. In this case, if the automatic renewal failed for some reason (connection error, invalid account status, non-prolongated contract...), a warning icon is displayed next to the license to alert the server administrator. Additional information about the license renewal status can be displayed in a tip when you hover the mouse over the area: + +![](assets/en/Admin/server-licence-failed.png) + +Usually, you will need to check the [**Licences Manager**](licenses.md). + +#### Details Area + +The "Details" area repeats part of the information displayed in the graphic area and provides additional information as well. + +- **Hard drive**: Overall capacity of the hard disk and distribution of the space used by the database data (data file + data index), the space used by other files and the free space available. +- **Memory**: RAM memory installed on the machine and amount of memory used by 4D Server, by other applications or that is free. The memory used by 4D Server can also be displayed dynamically in the graphic area. +- **Processors**: Instant occupancy rate for processor(s) of the machine by 4D Server and by other applications. This rate is constantly recalculated. The occupancy rate by 4D Server can also be displayed dynamically in the graphic area. +- **Network**: Instantaneous number of bytes sent and received by the machine (server or client). This value is updated constantly. The number of bytes received by can also be displayed dynamically in the graphic area. + + +## Users Page + +The **Users** page lists the 4D users connected to the server. + + +![](assets/en/Admin/server-users.png) + +The "Users" button indicates, in parentheses, the total number of users connected to the server (this number does not take into account any display filters applied to the window). The page also contains a dynamic search area and control buttons. You can modify the order of the columns by dragging and dropping their header areas. + +You can also sort the list of column values by clicking on its header. Click several times to specify in turn an ascending/descending order. + +![](assets/en/Admin/server-users-sort.png) + +### List of Users + +For each user connected to the server, the list provides the following information: + +- System of the client machine (macOS or Windows) as an icon. +- **4D User**: Name of the 4D user, or alias if set with the [`SET USER ALIAS`](https://doc.4d.com/4dv19/help/command/en/page1666.html) command on the user machine. If passwords are not activated and no alias has been set, all users are named "Designer". +- **Machine name**: Name of the remote machine. +- **Session name**: Name of the session opened on the remote machine. +- **IP Address**: IP address of the remote machine. +- **Login date**: Date and time of the remote machine connection. +- **CPU Time**: CPU time consumed by this user since connecting. +- **Activity**: Ratio of time that 4D Server devotes to this user (dynamic display). "Sleeping" if the remote machine has switched to sleep mode (see below). + +#### Managing sleeping users + +4D Server specifically handles cases where a machine running a 4D remote application switches to sleep mode while its connection to the server machine is still active. In this case, the connected 4D remote application automatically notifies 4D Server of its imminent disconnection. On the server, the connected user changes to a **Sleeping** activity status: + +![](assets/en/Admin/server-sleeping.png) + +This status frees up resources on the server. In addition, the 4D remote application reconnects to 4D Server automatically after waking up from sleep mode. + +The following scenario is supported: a remote user stops working for awhile, for example during a lunch break, but keeps the connection to the server open. The machine switches to sleep mode. When the user returns, they wake the machine up and the 4D remote application automatically recovers its connection to the server as well as the session context. + +> A sleeping remote session is automatically dropped by the server after 48 hours of inactivity. You can modify this default timeout using the [`SET DATABASE PARAMETER`](https://doc.4d.com/4dv19/help/command/en/page642.html) command with the `Remote connection sleep timeout` selector. + + +### Search/filtering Area + +This feature can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The area indicates the columns where the search/filtering will be carried out. On the Users page, it will be the 4D User, Machine name and Session name columns. + +The list is updated in real time as you enter text in the area. It is possible to enter more than one value to be searched for: separate the values with a semi-colon. The `OR` type operator is used in this case. For example, if you enter "John;Mary;Peter," only rows with John OR Mary OR Peter in the target columns will be kept. + + +### Administration Buttons + +This page includes three control buttons. These are active if at least one row is selected. You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) key for a non-adjacent selection. + +#### Send message + +This button can be used to send a message to the 4D users selected in the window. If no user is selected, the button is not active. When you click on this button, a dialog box appears that lets you enter the message. The dialog box indicates the number of users that will receive this message: + +![](assets/en/Admin/server-message.png) + +The message will be displayed as an alert on the remote machines. + +> You can perfom the same action for remote users with the [`SEND MESSAGE TO REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1632.html) command. + + +#### Watch Processes + +This button can be used to directly show the processes of the user(s) selected on the [**Processes** page](#process-page) of the window. When you click on this button, 4D Server switches to the Processes page and enters the selected user names in the search/filtering area. + +#### Drop user + +This button can be used to force the selected user(s) to disconnect. When you click on this button, a warning dialog box appears so that you can confirm or cancel this operation (hold down **Alt** key while clicking on the **Drop user** button to disconnect the selected user(s) directly without displaying the confirmation dialog box). + +> You can perfom the same action for remote users with the [`DROP REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1633.html) command. + + + +## Processes Page + +The **Processes** page lists all the processes underway. + +![](assets/en/Admin/server-admin-process-page.png) + + +The "Processes" button indicates, in parentheses, the total number of processes running in the server (this number does not take into account any display filters applied to the window nor the state of the **Display processes by groups** option). + +You can change the order of the columns by simply dragging and dropping the column header areas. You can also sort the list of column values by clicking on its header. + +Like the Users page, this page contains a dynamic [search/filtering area](#searchfiltering-area) that can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The search/filtering is carried out in the Session and Process name columns. + +There are also three shortcut buttons that can be used to filter by the type of process displayed in the window: + +![](assets/en/Admin/server-process-buttons.png) + +- **Users processes**: Processes generated by and for the user sessions. These processes are preceded by an icon in the form of a figure. +- **4D Processes**: Processes generated by the 4D Server engine. These processes are preceded by an icon in the form of a notched wheel. +- **Spare processes**: Processes that are inactive but kept temporarily and that can be reused at any time. This mechanism optimizes the reactivity of 4D Server. These processes are preceded by an icon in the form of a dimmed figure. + +The **Display processes by groups** option lets you group together the internal processes of 4D Server as well as the client processes, for better readability. When you check this option: + +- the "twinned" 4D client processes (main 4D client process and 4D client base process, see [Process Type](#process-type)) are grouped as one, +- a "Task managers" group is created; it includes the internal processes dedicated to dividing up tasks (Shared balancer, Net session manager, Exclusive pool worker), +- a "Client managers" group is created; it includes various client internal processes. + +The lower area of the window is used to display the graphic representation of the activity of the selected process(es). + +> You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) for a non-adjacent selection. + +The activity of the process is the percentage of time that 4D Server has devoted to this process (ratio). The window provides the following information for each process: + +- Type of process (see below), +- Session/Info: + - 4D process - blank, + - User process - 4D user name, + - Web process - URL path, +- Name of the process, +- Number of the process (as returned by the [`New process`](https://doc.4d.com/4dv19/help/command/en/page317.html) command for example). The process number is the number assigned on the server. In the case of a global process, this number may be different from that assigned on the client machine. +- Current state of the process, +- Running time (in seconds) of the process since its creation, +- Percentage of time that 4D Server has devoted to this process (ratio). + +### Process Type + +Each process is identified by an icon as well as a type. The color and form of the icon indicates the type of process: + +| icon | type | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/Admin/server-icon-1.png) | Application server | +| ![](assets/en/Admin/server-icon-2.png) | SQL Server | +| ![](assets/en/Admin/server-icon-3.png) | DB4D Server (database engine) | +| ![](assets/en/Admin/server-icon-4.png) | Serveur Web | +| ![](assets/en/Admin/server-icon-5.png) | SOAP Server | +| ![](assets/en/Admin/server-icon-6.png) | Protected 4D client process (development process of a connected 4D) | +| ![](assets/en/Admin/server-icon-7.png) | Main 4D client process (main process of a connected 4D). Collaborative process, equivalent on the server of the process created on the client machine) | +| ![](assets/en/Admin/server-icon-8.png) | 4D client base process (process parallel to a 4D client process. Preemptive process responsible for controlling the corresponding main 4D client process) | +| ![](assets/en/Admin/server-icon-9.png) | Spare process (former or future "4D client database process") | +| ![](assets/en/Admin/server-icon-10.png) | SQL server worker process | +| ![](assets/en/Admin/server-icon-11.png) | HTTP server worker process | +| ![](assets/en/Admin/server-icon-12.png) | 4D client process (process running on the connected 4D) | +| ![](assets/en/Admin/server-icon-13.png) | Stored procedure (process launched by a connected 4D and running on the server) | +| ![](assets/en/Admin/server-icon-14.png) | Web method (launched by a 4DACTION for example) | +| ![](assets/en/Admin/server-icon-15.png) | Web method (preemptive) | +| ![](assets/en/Admin/server-icon-16.png) | SOAP method (launched by a Web Service) | +| ![](assets/en/Admin/server-icon-17.png) | SOAP method (preemptive) | +| ![](assets/en/Admin/server-icon-18.png) | Logger | +| ![](assets/en/Admin/server-icon-19.png) | TCP connection listener | +| ![](assets/en/Admin/server-icon-20.png) | TCP session manager | +| ![](assets/en/Admin/server-icon-21.png) | Other process | +| ![](assets/en/Admin/server-icon-22.png) | Worker process (cooperative) | +| ![](assets/en/Admin/server-icon-23.png) | 4D client process (preemptive) | +| ![](assets/en/Admin/server-icon-24.png) | Stored procedure (preemptive process) | +| ![](assets/en/Admin/server-icon-25.png) | Worker process (preemptive) | + +> Each main 4D client process and its "twinned" 4D client base process are grouped together when the **Display processes by groups** option is checked. + + +### Administration Buttons + +The page also has five control buttons that act on the selected process(es). Note that only user processes can be acted upon. + +![](assets/en/Admin/server-process-actions.png) + +- **Abort Process**: can be used to abort the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. + +> You can also abort the selected process(es) directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button, or by using the [`ABORT PROCESS BY ID`](https://doc.4d.com/4dv19/help/command/en/page1634.html) command. + +- **Pause Process**: can be used to pause the selected process(es). +- **Activate Process**: can be used to reactivate the selected process(es). The processes must have been paused previously (using the button above or by programming); otherwise, this button has no effect. +- **Debug Process**: can be used to open on the server machine one or more debugger windows for the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. Note that the debugger window is only displayed when the 4D code is actually executed on the server machine (for example in a trigger or the execution of a method having the "Execute on Server" attribute). + +> You can also debug a process directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button. + +- **Watch users**: used to display, on the [Users page](#users-page), all the processes of the selected user(s). This button is active when at least one user process is selected. + + +## Maintenance Page + +The **Maintenance** page of the 4D Server Administration window provides information concerning the current operation of the application. It also provides access to basic maintenance functions: + +![](assets/en/Admin/server-maintenance.png) + + +### Last verification/compacting + +These areas indicate the date, time and status of the last [data verification](MSC/verify.md) and [compacting operation](MSC/compact.md) carried out on the database. + +#### Verify Records and Indexes + +This button can be used to launch the verification operation directly, without interrupting the server. Note that the server may be noticeably slowed down during the operation. + +All the records and all the indexes of the database are verified. If you want to be able to target the verification or have additional options available, you will need to use the [Maintenance and Security Center](MSC/overview.md) (MSC). + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +This area indicates the date, time and status of the last carried out on the database data. + +#### Compact Data... + +Thus button can be used to launch a data compacting operation directly. This operation requires stopping the server: when you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation: + +![](assets/en/Admin/server-shut.png) + +After the actual interruption of the application service, 4D Server carries out a standard compacting operation on the database data. If you want to have additional options available, you will need to use the [MSC](MSC/overview.md). + +Once the compacting is finished, 4D Server automatically restarts the application. The 4D users can then be reconnected. + +> If the request for compacting was carried out from a remote 4D remote machine, this machine is automatically reconnected by 4D Server. + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +### Uptime + +This area indicates the duration of the 4D Server application execution since the last time it was started (days, hours and minutes). + + +#### Restart server... + +This button can be used to immediately close and restart the project. When you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation. After validation, 4D Server automatically closes and reopens the project. The 4D users can then be reconnected. + +> If the request for restarting was carried out from a remote 4D machine, this machine is automatically reconnected by 4D Server. + +### Last backup + +This area indicates the date and time of the [last backup](MSC/backup.md) of the database and provides information about the next scheduled automatic backup (if any). Automatic backups are configured using the **Scheduler** page of the structure settings. + +- **Last backup**: date and time of last backup. +- **Next backup**: date and time of next scheduled backup. +- **Needed space**: estimated space needed for the backup. The actual size of the backup file may vary according to the settings (compression, etc.) and according to variations of the data file. +- **Available space**: space available on the backup volume. + + +The **Start backup** button can be used to backup the database immediately using the current backup parameters (files backed up, location of archives, options, etc.). You can view these parameters by clicking on the **Settings...** button. During a backup on the server, the client machines are "blocked" (but not disconnected) and it is not possible for any new clients to connect. + + +### Request and Debug logs + +This area indicates the server log files recording duration (when log files are activated) and allows you to control their activation. + +Refer to the [**Description of log files**](debugLogFiles.md) section for details on log files. + +#### Start/Stop Request and Debug Logs + +The **Start Request and Debug Logs** button starts log files. Since this may noticeably deteriorate server performance, it is to be reserved for the development phase of the application. + +> This button only logs operations that are executed on the server. + +When the logs have been activated, the button title changes to **Stop Request and Debug Logs**, so that you can stop recording requests at any time. Pay attention to the fact that restarting the log after stopping it "erases" the previous file. + +#### View Report + +The **View Report** button (named **Download report** if the operation was carried out from a remote desktop client) lets you open a system window displaying the request log file. + +#### Load logs configuration file + +This button allows you to load a special server [log configuration file](debugLogFiles.md#using-a-log-configuration-file) (`.json` file). Such a file can be provided by 4D technical services to monitor and study specific cases. + + +#### Pause logging + +This button suspends all currently logging operations started on the server. This feature can be useful to temporarily lighten the server tasks. + +When the logs have been paused, the button title changes to **Resume logging**, so that you can resume the logging operations. + +> You can pause and resume logging using the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) command. + + +## Application Server Page + +The Application Server page groups together information about the desktop application published by 4D Server and can be used to manage this publication. + +![](assets/en/Admin/server-admin-application-page.png) + + +The upper part of the page provides information about the current status of the 4D Server application server. + +- **State**: Started or Stopped. +- **Starting time**: Date and time the application server was launched. This date corresponds to the opening of the project by 4D Server. +- **Uptime**: Time elapsed since last opening of the project by the server. + +### Accept/Reject New Connections + +This button toggles and can be used to manage the access of new desktop client machines to the application server. + +By default, when the project is published: +- The button is titled "Reject new connections." +- New desktop clients can connect freely (within the limit of the connections permitted by the license). +- The project name is published in the remote connection dialog box (if the "At Startup Publish Database Name in the Connection Dialog" option is checked in the Preferences). + +If you click on the **Reject new connections** button: +- The button title changes to "Accept new connections." +- No new desktop client can then connect. Clients attempting to connect will receive the following message: + +![](assets/en/Admin/server-error.png) + +- The project name no longer appears in the remote connection dialog box. +- Desktop clients that are already connected are not disconnected and can continue to work normally. + +> You can perform the same action with the [`REJECT NEW REMOTE CONNECTIONS`](https://doc.4d.com/4dv19/help/command/en/page1635.html) command. + +- If you click on the **Accept new connections button**, the application server returns to its default state. + +This feature permits, for example, an administrator to carry out various maintenance operations (verification, compacting, etc.) just after having started the server. If the administrator uses a remote connection, they can be certain to be the only one modifying the data. It is also possible to use this function in preparation of a maintenance operation which requires that there be no desktop client machine connected. + +### Information + +#### Configuration + +This area provides information about the 4D project published by the server: name and location of data and structure files and name of database log file. You can click on the structure or data file name in order to view its complete pathname. + +The **Mode** field indicates the current execution mode of the application: compiled or interpreted. + +The lower part of the area indicates the server configuration parameters (launched as service, port and IP address) and the enabling of TLS for client-server connections (does not concern SQL nor HTTP connections). + +#### Memory + +This area indicates the **Total cache memory** (parameter set in the settings) and the **Used cache memory** (dynamic allocation by 4D Server according to its needs). + + +#### Application Server Connections + +- **Maximum**: maximum number of simultaneous client connections allowed for the application server. This value depends on the license installed on the server machine. +- **Used**: actual number of connections currently being used. + + +## SQL Server Page + +The SQL Server page groups together information about the integrated SQL server of 4D Server. It also includes a button that can be used to control the activation of the server. + +![](assets/en/Admin/server-admin-sql-page.png) + + +The upper part of the page provides information about the current status of the SQL server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the SQL server was last launched. +- **Uptime**: Time elapsed since last startup of the SQL server. + +### Start / Stop SQL Server + +This button toggles and can be used to control the activation of the 4D Server SQL server. + +- When the SQL server state is "Started," the button is titled **Stop SQL Server**. If you click on this button, the 4D Server SQL server is immediately stopped; it no longer replies to any external SQL requests received on the designated TCP port. +- When the SQL server state is "Stopped," the button is titled **Start SQL Server**. If you click on this button, the 4D Server SQL server is immediately started; it replies to any external SQL queries received on the designated TCP port. Note that you will need a suitable license to be able to use the 4D SQL server. + +> The SQL server can also be launched automatically on application startup (option in the Settings) or by programming. + +### Information + +#### Configuration + +This area provides information about the SQL server configuration parameters: automatic launching on startup, listening IP address, TCP port (19812 by default) and enabling of SSL for SQL connections (does not concern 4D nor HTTP connections). + +These parameters can be modified via the 4D Settings. + +#### Connections + +Number of SQL connections currently open on 4D Server. + +#### Maximum Connections + +Maximum number of simultaneous SQL connections allowed. This value depends on the license installed on the server machine. + +## HTTP Server Page + +The HTTP Server page groups together information about the operation of the Web server and SOAP server of 4D Server. The Web server lets you publish Web content such as HTML pages or pictures for Web browsers, and to handle REST requests. The SOAP server manages the publication of Web Services. These servers rely on the internal HTTP server of 4D Server. + +![](assets/en/Admin/server-admin-web-page.png) + + +The upper part of the page provides information about the current status of the HTTP server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the HTTP server was last launched. +- **Uptime**: Time elapsed since last startup of the HTTP server. +- **Total HTTP hits**: Number of (low level) HTTP hits received by the HTTP server since it was started. + + +### Start/Stop HTTP Server + +This button toggles and can be used to control the activation of the 4D Server HTTP server. + +- When the HTTP server state is "Started," the button is titled **Stop HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately stopped; the Web server, REST server, and SOAP server no longer accept any requests. +- When the HTTP server state is "Stopped," the button is titled **Start HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately started; Web, REST, and SOAP requests are accepted. + +> You must have a suitable license in order to be able to start the HTTP server. +> +> The HTTP server can also be launched automatically on application startup (Settings) or by programming. + +### Web Information + +This area provides specific information about the Web server of 4D Server. + +- **Web requests**: Accepted or Rejected. This information indicates whether the Web server is activated. Since the Web server is directly linked to the HTTP server, Web requests are accepted when the HTTP server is started and rejected when it is stopped. +- **Maximum connections**: Maximum number of Web connections allowed. This value depends on the license installed on the server machine. + +### SOAP Information + +This area provides specific information about the SOAP server of 4D Server and includes a control button. + +- **SOAP requests**: Accepted or Rejected. This information indicates whether the SOAP server is activated. In order for SOAP requests to be accepted, the HTTP server must be started and the SOAP server must explicitly accept the requests (see the Accept/Reject button). +- **Maximum connections**: Maximum number of SOAP connections allowed. This value depends on the license installed on the server machine. +- **Accept/Reject SOAP requests** button: This button toggles and can be used to control the activation of the 4D Server SOAP server. This button modifies the value of the **Allow Web Services Requests** option on the "Web Services" page of the Settings (and vice versa). You can also use the [`SOAP REJECT NEW REQUESTS`](https://doc.4d.com/4dv19/help/command/en/page1636.html) command to refuse new SOAP requests, however this does not modify the value of the **Allow Web Services Requests** option. + +If you click on the **Accept SOAP requests** button and the HTTP server is stopped, 4D automatically starts it. + +### HTTP Server Configuration + +This area provides information about the configuration parameters and operation of the HTTP server: + +- **Auto-launched at startup**: parameter set via the Settings. +- **HTTP Server processes (used/total)**: number of HTTP processes created on the server (current number of processes / total of all processes created). +- **Cache memory**: size of HTTP server cache memory, when it is activated (size actually used by cache / maximum size theoretically allocated to the cache in the Settings). You can click on the **Clear Cache** button to empty the current cache. +- **Listening to IP**, **HTTP Port** (80 by default), **TLS enabled** for HTTP connections (does not concern 4D nor SQL connections) and **HTTPS Port** used: current [configuration parameters](WebServer/webServerConfig.md) of the HTTP server, specified through the Settings or by programming. +- **Log file information**: name, format and date of the next automatic log backup of the HTTP server (logweb.txt file). + + +## Real Time Monitor Page + +The Real Time Monitor page monitors the progress of "long" operations performed by the application in real time. These operations are, for example, sequential queries, execution of formulas, etc. + +![](assets/en/Admin/server-admin-monitor-page.png) +> This page is available in the administration window of the server machine and also from a remote 4D machine. In the case of a remote machine, this page displays data from operations performed on the server machine. + +A line is added for each long operation performed on the data. This line automatically disappears when the operation is complete (you can check the **Display operations at least 5 seconds** option to keep quick operations on screen for 5 seconds, see below). + +The following information is provided for each line: + +- **Start Time**: starting time of operation in the format: "dd/mm/yyyy - hh:mm:ss" +- **Duration** (ms): duration in milliseconds of operation in progress +- **Information**: title of operation. +- **Details**: this area displays detailed information which will vary according to the type of operation selected. More specifically: + + **Created on**: indidates whether the operation results from a client action (Created on client) or if it was started explicitly on the server by means of a stored procedure or the "Execute on server" option (Created on server). + + **Operation Details**: Operation type and (for query operations) query plan. + + **Sub-operations** (if any): Dependent operations of the selected operation (e.g. deleting related records before a parent record). + + **Process Details**: Additional information concerning the table, field, process or client, depending on the type of operation + +> Real-time monitoring page uses the [`GET ACTIVITY SNAPSHOT`](https://doc.4d.com/4dv19/help/command/en/page1277.html) command internally. More information can be found in this command description. + +The page is active and updated permanently as soon as it is displayed. It should be noted that its operation can significantly slow the execution of the application. It is possible to suspend the updating of this page in one of the following ways: + +- clicking on the **Pause** button, +- clicking in the list, +- pressing the space bar. + +When you pause the page, a "PAUSED" message appears and the button label changes to **Resume**. You can resume monitoring of the operations by performing the same action as for pausing. + +#### Mode avancé + +The RTM page can display additional information, if necessary, for each listed operation. + +To access the advanced mode for an operation, press **Shift** and select the desired operation. All available information is then displayed in the "Process Details" area without any filtering (as returned by the `GET ACTIVITY SNAPSHOT` command). Available information depends on the operation selected. + +Here is an example of information displayed in standard mode: + +![](assets/en/Admin/server-admin-monitor-adv1.png) + + +In advanced mode (**Shift+Click** on the operation), additional information is displayed: + +![](assets/en/Admin/server-admin-monitor-adv2.png) + +#### Snapshot button + +The **Snapshot** button allows you to copy to the clipboard all the operations displayed in the RTM panel, as well as their related details (process and sub-operation info): + +![](assets/en/Admin/server-admin-monitor-snapshot.png) + + +#### Display operations at least 5 seconds + +If you check the **Display operations at least 5 seconds** option, any listed operation will be displayed on the page for at least five seconds, even after its execution is finished. Retained operations appear dimmed in the operation list. This feature is useful for getting information about operations that execute very quickly. diff --git a/website/translated_docs/fr/Admin/tls.md b/website/translated_docs/fr/Admin/tls.md new file mode 100644 index 00000000000000..0207387ceddb61 --- /dev/null +++ b/website/translated_docs/fr/Admin/tls.md @@ -0,0 +1,106 @@ +--- +id: tls +title: TLS Protocol (HTTPS) +--- + +All 4D servers can communicate in secured mode through the TLS (Transport Layer Security) protocol: + +- the web server +- the application server (client-server desktop applications) +- the SQL server + +## Aperçu + +The TLS protocol (successor of SSL) has been designed to secure data exchanges between two applications —mainly between a web server and a browser. This protocol is widely used and is compatible with most web browsers. + +At the network level, the security protocol is inserted between the TCP/IP layer (low level) and the HTTP high level protocol. It has been designed mainly to work with HTTP. + +Network configuration using TSL: + +![](assets/en/WebServer/tls1.png) + +The TLS protocol is designed to authenticate the sender and receiver and to guarantee the confidentiality and integrity of the exchanged information: + +* **Authentication**: The sender and receiver identities are confirmed. +* **Confidentiality**: The sent data is encrypted so that no third person can understand the message. +* **Integrity**: The received data has not been changed, by accident or malevolently. + +TLS uses a public key encryption technique based on a pair of asymmetric keys for encryption and decryption: a public key and a private key. The private key is used to encrypt data. The sender (the website) does not give it to anyone. The public key is used to decrypt the information and is sent to the receivers (web browsers) through a certificate. When using TLS with the Internet, the certificate is delivered through a certification authority, such as Verisign®. The website pays the Certificate Authority to deliver a certificate which guaranties the server authentication and contains the public key allowing to exchange data in a secured mode. +> For more information on the encryption method and the public and private key issues, refer to the `ENCRYPT BLOB` command description. + +## Minimum version + +By default, the minimum version of the secured protocol accepted by the server is TLS 1.2. You can modify this value by using the `Min TLS version` selector with the `SET DATABASE PARAMETER command`. + +You can control the level of security of your web server by defining the [minimum TLS version](WebServer/webServerConfig.md#minimum-tls-version) accepted for connections. + +## How to get a certificate? + +A server working in secured mode means that you need a digital certificate from a certification authority. This certificate contains various information such as the site ID as well as the public key used to communicate with the server. This certificate is transmitted to the clients (e.g. Web browsers) connecting to this server. Once the certificate has been identified and accepted, the communication is made in secured mode. +> Les navigateurs Web autorisent uniquement les certificats émis par une autorité de certification référencée dans leurs propriétés. + +![](assets/en/WebServer/tls2.png) + +The certification authority is chosen according to several criteria. If the certification authority is well known, the certificate will be authorized by many browsers, however the price to pay will be expensive. + +To get a digital certificate: + +1. Generate a private key using the `GENERATE ENCRYPTION KEYPAIR` command. +> **Warning**: For security reasons, the private key should always be kept secret. Actually, it should always remain with the server machine. For the Web server, the Key.pem file must be placed in the Project folder. + +2. Use the `GENERATE CERTIFICATE REQUEST` command to issue a certificate request. + +3. Send the certificate request to the chosen certificate authority.

      To fill in a certificate request, you might need to contact the certification authority. The certification authority checks that the information transmitted are correct. The certificate request is generated in a BLOB using the PKCS format encoded in base64 (PEM format). This principle allows you to copy and paste the keys as text and to send them via E-mail without modifying the key content. For example, you can save the BLOB containing the certificate request in a text document (using the `BLOB TO DOCUMENT` command), then open and copy and paste its content in a mail or a Web form to be sent to the certification authority. + +4. Once you get your certificate, create a text file named “cert.pem†and paste the contents of the certificate into it.

      You can receive a certificate in different ways (usually by email or HTML form). 4D accepts all platform-related text formats for certificates (OS X, PC, Linux, etc.). However, the certificate must be in PEM format, *i.e.*, PKCS encoded in base64. +> CR line-ending characters are not supported on their own; you must use CRLF or LF. + +5. Place the “cert.pem†file in the [appropriate location](#installation-and-activation). + +The 4D server can now work in a secured mode. A certificate is valid between 3 months to a year. + +## Installation et activation + +### Installer des fichiers `key.pem` et `cert.pem` + +Pour pouvoir utiliser le protocole TLS avec le serveur, vous devez installer **key.pem** (document contenant la clé de chiffrement privée) et **cert.pem** (document contenant le certificat) au(x) emplacement(s) approprié(s). Différents emplacements sont nécessaires en fonction du serveur sur lequel vous souhaitez utiliser TLS. +> Default *key.pem* and *cert.pem* files are provided with 4D. For a higher level of security, we strongly recommend that you replace these files with your own certificates. + +#### Avec le serveur Web + +Pour être utilisés par le serveur web de 4D, les fichiers **key.pem** et **cert.pem** doivent être placés : + +- avec 4D en mode local ou 4D Server, à côté du [dossier du projet](Project/architecture.md#project-folder) +- avec 4D en mode distant, dans le dossier de la base de données cliente sur la machine distante (pour plus d'informations sur l'emplacement de ce dossier, consultez la commande [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html)). + +You must copy these files manually on the remote machine. + +#### Avec le serveur d'applications (applications de bureau client-serveur) + +Pour être utilisés par le serveur d'applications de 4D, les fichiers **key.pem** et **cert.pem** doivent être placés : + +- dans le dossier [**Resources**](Project/architecture.md#resources) de l'application 4D Server +- et dans le dossier **Resources** de chaque application 4D distante (pour plus d'informations sur l'emplacement de ce dossier, consultez la commande [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html)). + +#### Avec le serveur SQL + +Pour être utilisés par le serveur SQL de 4D, les fichiers **key.pem** et **cert.pem** doivent être placés à côté du [dossier du projet](Project/architecture.md#project-folder). + + +### Enabling TLS + +The installation of **key.pem** and **cert.pem** files makes it possible to use TLS with the 4D server. However, in order for TLS connections to be accepted by the server, you must enable them: + +- With the 4D web server, you must [enable HTTPS](WebServer/webServerConfig.md#enable-https). You can set the [HSTS option](WebServer/webServerConfig.md#enable-hsts) to redirect browsers trying to connect in http mode. +- With the application server, you must select the **Encrypt Client-Server Communications** option in the "Client-server/Network options" page of the Settings dialog box. +- With the SQL server, you must select the **Enable TLS** option in the "SQL" page of the Settings dialog box. + +> Le serveur web 4D prend également en charge l'[option HSTS](WebServer/webServerConfig.md#enable-hsts) pour déclarer que les navigateurs doivent interagir avec lui uniquement via des connexions HTTPS. sécurisées. + +## Perfect Forward Secrecy (PFS) + +[PFS](https://en.wikipedia.org/wiki/Forward_secrecy) adds an additional layer of security to your communications. Rather than using pre-established exchange keys, PFS creates session keys cooperatively between the communicating parties using Diffie-Hellman (DH) algorithms. The joint manner in which the keys are constructed creates a "shared secret" which impedes outside parties from being able to compromise them. + +When TLS is enabled on the server, PFS is automatically enabled. If the *dhparams.pem* file (document containing the server's DH private key) does not already exist, 4D will automatically generate it with a key size of 2048. The initial generation of this file could take several minutes. The file is placed with the [*key.pem* and *cert.pem* files](#key-pem-and-cert-pem-files). + +If you use a [custom cipher list](WebServer/webServerConfig.md##cipher-list) and want to enable PFS, you must verify that it contains entries with DH or ECDH (Elliptic-curve Diffie–Hellman) algorithms. diff --git a/website/translated_docs/fr/Admin/webAdmin.md b/website/translated_docs/fr/Admin/webAdmin.md new file mode 100644 index 00000000000000..342f87271f8dc7 --- /dev/null +++ b/website/translated_docs/fr/Admin/webAdmin.md @@ -0,0 +1,156 @@ +--- +id: webAdmin +title: Web Administration +--- + + +An embedded web server component, named `WebAdmin`, is used by 4D and 4D Server to provide a secured web access to specific management features such as the [Data Explorer](dataExplorer.md). You can connect locally or remotely to this web server from a browser or any web application and access the associated 4D application. + +The WebAdmin handles the authentication of users with "WebAdmin" privileges, so that they can open administration sessions and access dedicated interfaces. + +This feature can be used in 4D applications running headless as well as 4D applications running with interfaces. + + +## Starting the WebAdmin web server + +By default, the `WebAdmin` web server is not launched. You need to configure the launch at startup, or (in versions with interface) launch it manually using a menu item. + + +### Launch at startup + +You can configure the `WebAdmin` web server to be launched at 4D or 4D Server application startup (before any project is loaded). + +- If you use a 4D application with interface, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +Check the **Web server administration automatic startup** option in the settings dialog box: + +![alt-text](assets/en/Admin/waSettings.png) + +- Whether you use 4D application which is headless or not, you can enable the automatic startup mode using the following *Command Line Interface* argument: + + +``` +open ~/Desktop/4D.app --webadmin-auto-start true +``` + +> If the TCP port used by the `WebAdmin` web server ([HTTPS](#https-port) or [HTTP](#http-port), depending on the settings) is not free at startup, 4D will try successively the 20 following ports, and use the first one that is available. If no port is available, the web server is not launched and an error is displayed or (headless application) logged in the console. + + +### Start and stop + +If you use a 4D application with interface, you can start or stop the `WebAdmin` web server for your project at any moment: + +Select the **File > Web Administration > Start Server** menu item. + +![alt-text](assets/en/Admin/waMenu2.png) + +The menu item becomes **Stop Server** when the server is launched; select **Stop Server** to stop the `WebAdmin` web server. + + + +## WebAdmin Settings + +Configuring the `WebAdmin` component is mandatory in particular to define the [**access key**](#access-key). By default when the access key is not set, access via a URL is not allowed. + +You can configure the `WebAdmin` component using the [Web Administration settings dialog box](#settings-dialog-box) (see below). + +> If you use a headless 4D application, you can use [*Command Line Interface* arguments](#webadmin-headless-configuration) to define basic settings. You will have to customize the settings file to define advanced parameters. + + +### Settings dialog box + +To open the Web Administration settings dialog box, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +The following dialog box is displayed: + +![alt-text](assets/en/Admin/waSettings2.png) + +#### Web server administration automatic startup + +Check this option if you want the `WebAdmin` web server to be automatically launched when the 4D or 4D Server application starts ([see above](#launching-at-startup)). By default, this option is not checked. + +#### Accept HTTP connections on localhost + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTP on the same machine as the 4D application. By default, this option is checked. + +**Notes :** +- Connections with HTTP other than localhost are never accepted. +- Even if this option is checked, when [Accept HTTPS](#accept-https) is checked and the TLS configuration is valid, localhost connections use HTTPS. + + +#### HTTP Port + +Port number to use for connections through HTTP to the `WebAdmin` web server when the **Accept HTTP connections on localhost** option is checked. Default value is 7080. + + +#### Accept HTTPS + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTPS. By default, this option is checked. + +#### HTTPS Port + +Port number to use for connections through HTTPS to the `WebAdmin` web server when the **Accept HTTPS** option is checked. Default value is 7443. + + +#### Certificate folder path + +Path of the folder where the TLS certificate files are located. By default, the certificate folder path is empty and 4D or 4D Server uses the certificate files embedded in the 4D application (custom certificates must be stored next to the project folder). + +#### Debug log mode + +Status or format of the HTTP request log file (HTTPDebugLog_*nn*.txt, stored in the "Logs" folder of the application -- *nn* is the file number). Les options suivantes sont disponibles : + +- **Disable** (default) +- **With all body parts** - enabled with body parts in response and request +- **Without body parts** - enabled without body parts (body size is provided) +- **With request body** - enabled with body part in request only +- **With response body** - enabled with body part in response only + +#### Access Key + +Defining an access key is mandatory to unlock access to the `WebAdmin` web server through a URL (access via a 4D menu command does not require an access key). When no access key is defined, no web client is allowed to connect through a URL to a web administration interface like the [Data Explorer page](dataExplorer.md). An error page is returned in case of connection request: + +![alt-text](assets/en/Admin/accessKey.png) + +An access key is similar to a password but not associated to a login. + +- To define a new access key: click the **Define** button, enter the access key string in the dialog box and click **OK**. The button label becomes **Modify**. +- To modify the access key: click the **Modify** button, enter the new access key string in the dialog box and click **OK**. +- To delete the access key: click the **Modify** button, let the access key area empty and click **OK**. + + +## WebAdmin Headless Configuration + +All [WebAdmin settings](#webadmin-settings) are stored in the `WebAdmin.4DSettings` file. There is one default `WebAdmin.4DSettings` file per 4D and 4D Server application, so that it is possible to deploy multiple applications on the same host machine. + +When running a 4D or 4D Server application headless, you can set and use the default `WebAdmin.4DSettings` file, or designate a custom `.4DSettings` file. + +To set the file contents, you can use the [WebAdmin settings dialog](#settings-dialog-box) of the 4D application with interface and run it headless afterwards. The default `WebAdmin.4DSettings` file is then used. + +Or, you can set a custom `.4DSettings` file (xml format) and use it instead of the default file. Plusieurs arguments dédiés sont disponibles dans [l'interface de ligne de commande](cli.md) pour prendre en charge cette fonctionnalité. + +> The access key is not stored in clear in the `.4DSettings` file. + +Exemple : + +``` +"%HOMEPATH%\Desktop\4D Server.exe" MyApp.4DLink --webadmin-access-key + "my Fabulous AccessKey" --webadmin-auto-start true + --webadmin-store-settings + +``` + + +## Authentication and Session + +- When a web management page is accessed by entering a URL and without prior identification, an authentication is required. The user must enter the [access key](#access-key) in an authentication dialog box. If the access key was not defined in the `WebAdmin` settings, no access via URL is possible. + +- When a web management page is accessed directly from a 4D or 4D Server menu item (such as **Records > Data Explorer** or **Window > Data Explorer** (4D Server)), access is granted without authentication, the user is automatically authenticated. + +Once the access is granted, a web [session](WebServer/sessions.md) with the "WebAdmin" privilege is created on the 4D application. As long as the current session has "WebAdmin" privilege, the `WebAdmin` component delivers requested pages. + + diff --git a/website/translated_docs/fr/Backup/backup.md b/website/translated_docs/fr/Backup/backup.md index b9c1e16d4762da..513cd4a27cde07 100644 --- a/website/translated_docs/fr/Backup/backup.md +++ b/website/translated_docs/fr/Backup/backup.md @@ -3,36 +3,37 @@ id: backup title: Sauvegarde --- - -## Lancer une sauvegarde - Une sauvegarde peut être déclenchée de trois manières : - Manuellement, via la commande **Sauvegarde...** du menu **Fichier** de 4D ou le bouton **Sauvegarde** du [Centre de sécurité et de maintenance (CSM)](MSC/backup.md). -- Automatiquement, via le programmateur paramétrable dans les Propriétés de la base, +- Automatiquement, via le programmateur paramétrable dans les Propriétés, - Par programmation, à l’aide de la commande `BACKUP`. > 4D Server : Il est possible de déclencher “manuellement†une sauvegarde depuis un poste distant, via une méthode appelant la commande `BACKUP`. Dans tous les cas, la commande sera exécutée sur le serveur. -### Sauvegarde manuelle +## Sauvegarde manuelle -1. Choisissez la commande **Sauvegarde...** dans le menu **Fichier** de 4D. La fenêtre de sauvegarde s’affiche : ![](assets/en/Backup/backup01.png) Vous pouvez visualiser l'emplacement du dossier de sauvegarde à l'aide du pop up menu associé à la zone "Destination de la sauvegarde". Cet emplacement est défini dans la Page **Sauvegarde/Configuration** des Propriétés de la base. +1. Choisissez la commande **Sauvegarde...** dans le menu **Fichier** de 4D. + La fenêtre de sauvegarde s’affiche : ![](assets/en/Backup/backup01.png) Vous pouvez visualiser l'emplacement du dossier de sauvegarde à l'aide du pop up menu associé à la zone "Destination de la sauvegarde". Cet emplacement est défini dans la Page **Sauvegarde/Configuration** des Propriétés de la base. -- Vous pouvez également sélectionner [Centre de sécurité et de maintenance](MSC/overview.md) de 4D et afficher la [Page Sauvegarde](MSC/backup.md). +- Vous pouvez également sélectionner [Centre de sécurité et de maintenance](MSC/overview.md) de 4D et afficher la [Page Sauvegarde](MSC/backup.md). -Le bouton **Propriétés de la base...** provoque l’affichage de la boîte de dialogue des Propriétés de la base (page Page Sauvegarde/Périodicité). +Le bouton **Propriétés de la base...** provoque l’affichage de la boîte de dialogue des Propriétés de structure. -2. Cliquez sur le bouton **Sauvegarde** pour déclencher la sauvegarde avec les paramètres courants. + 2. Cliquez sur le bouton **Sauvegarde** pour déclencher la sauvegarde avec les paramètres courants. -### Sauvegarde automatique périodique -Les sauvegardes périodiques sont déclenchées automatiquement. Elles sont configurées dans la Page **Sauvegarde/Périodicité** des **Propriétés de la base**. +## Sauvegarde automatique périodique + +Les sauvegardes périodiques sont déclenchées automatiquement. Elles sont configurées dans la Page **Sauvegarde/Périodicité** des **Propriétés**. Les sauvegardes s'effectuent automatiquement au moment défini, sans intervention de l’utilisateur. Pour plus d’informations sur le fonctionnement de cette boîte de dialogue, reportez-vous à la section [Définir des sauvegardes périodiques](settings.md#scheduler). -### Commande BACKUP -Lorsque la commande `BACKUP` est exécutée depuis une méthode, la sauvegarde est alors déclenchée avec les paramètres courants définis dans les propriétés de la base. Vous pouvez utiliser la Méthode base `On Backup Startup` et `On Backup Shutdown` afin de contrôler le déroulement de la sauvegarde (cf. le manuel *Langage de 4D*). +## Commande BACKUP + +Lorsque la commande `BACKUP` est exécutée depuis une méthode, la sauvegarde est alors déclenchée avec les paramètres courants définis dans les propriétés. Vous pouvez utiliser la Méthode base `On Backup Startup` et `On Backup Shutdown` afin de contrôler le déroulement de la sauvegarde (cf. le manuel *Langage de 4D*). + ## Déroulement de la sauvegarde @@ -46,49 +47,49 @@ Le bouton **Arrêter** permet à l’utilisateur d’interrompre la sauvegarde Le compte-rendu de la dernière sauvegarde (succès ou échec) est stocké dans la zone "Informations sur la dernière sauvegarde" dans la [Page Sauvegarde du CSM](MSC/backup.md) ou dans la **Page de maintenance** de 4D Server. Il est également enregistré dans le **Backup journal.txt**. -### Accès à la base durant la sauvegarde +### Accès à l'application durant la sauvegarde -Pendant la sauvegarde, les accès à la base sont restreints par 4D en fonction du contexte. 4D verrouille les process liés aux types de fichiers inclus dans la sauvegarde : si seul le fichier de structure est sauvegardé, l’accès à la structure est impossible mais l’accès aux données est autorisé. +Pendant la sauvegarde, les accès à l'application sont restreints par 4D en fonction du contexte. 4D verrouille les process liés aux types de fichiers inclus dans la sauvegarde : si seul le fichier de structure est sauvegardé, l’accès à la structure est impossible mais l’accès aux données est autorisé. -A l’inverse, si seul le fichier de données est sauvegardé, l’accès à la structure reste autorisé. Dans ce cas, les possibilités d’accès aux données sont les suivantes : +A l’inverse, si seul le fichier de données est sauvegardé, l’accès à la structure reste autorisé. Dans ce cas, les possibilités d’accès à l'application sont les suivantes : -- Avec 4D version monoposte, la base est verrouillée en lecture et en écriture, tous les process sont gelés. Toute action est alors impossible. -- Avec 4D Server, la base est verrouillée uniquement en écriture, les postes clients peuvent consulter les données. Si un poste client envoie une requête d’ajout, de suppression ou de modification au serveur, il obtient une fenêtre l’invitant à attendre la fin de la sauvegarde. Une fois la base sauvegardée, la fenêtre disparaît d’elle-même et l’action est effectuée. Pour annuler la requête en cours et ne pas avoir à attendre la fin de la sauvegarde, il suffit de cliquer sur le bouton **Annuler l’opération**. Cependant, si l’action en attente provient d’une méthode lancée avant la sauvegarde, il est déconseillé de l’annuler car seules les opérations restant à effectuer seront annulées. Or, une méthode “à moitié†exécutée peut conduire à des incohérences logiques dans la base. Lorsque l’action en attente provient d’une méthode et que l’utilisateur clique sur le bouton **Annuler l’opération**, 4D Server renvoie l’erreur -9976 (Cette commande ne peut être exécutée car la base est en cours de sauvegarde). +- Avec 4D version monoposte, l'application est verrouillée en lecture et en écriture, tous les process sont gelés. Toute action est alors impossible. +- Avec 4D Server, l'application est verrouillée uniquement en écriture, les postes clients peuvent consulter les données. Si un poste client envoie une requête d’ajout, de suppression ou de modification au serveur, il obtient une fenêtre l’invitant à attendre la fin de la sauvegarde. Une fois l'application sauvegardée, la fenêtre disparaît d’elle-même et l’action est exécutée. Pour annuler la requête en cours et ne pas avoir à attendre la fin de la sauvegarde, il suffit de cliquer sur le bouton **Annuler l’opération**. Cependant, si l’action en attente provient d’une méthode lancée avant la sauvegarde, il est déconseillé de l’annuler car seules les opérations restant à effectuer seront annulées. Or, une méthode “à moitié†exécutée peut conduire à des incohérences logiques dans les données. Lorsque l’action en attente provient d’une méthode et que l’utilisateur clique sur le bouton **Annuler l’opération**, 4D Server renvoie l’erreur -9976 (Cette commande ne peut être exécutée car la base est en cours de sauvegarde). ### En cas de problème au cours de la sauvegarde -Il est possible qu'une sauvegarde ne s’effectue pas correctement. Les causes de l’échec peuvent être diverses : interruption par l’utilisateur, fichier joint introuvable, disque de destination défaillant, transaction non terminée, etc. Le traitement de l’incident par 4D diffère en fonction de la cause. +Il est possible qu'une sauvegarde ne s’effectue pas correctement. Les causes de l’échec peuvent être diverses : interruption par l’utilisateur, fichier joint introuvable, disque de destination défaillant, transaction non terminée, etc. 4D traite l'incident selon la cause de l'échec. -Dans tous les cas, le statut de la dernière sauvegarde (succès ou échec) est stocké dans la zone "Informations sur la dernière sauvegarde" dans la [Page Sauvegarde du CSM](MSC/backup.md) ou dans la **Page de maintenance** de 4D Server, ainsi que dans le **Backup journal.txt**. ou dans la PARAMETRES DU GRAPHE de 4D Server, ainsi que dans le Journal de sauvegardes de la base. +Dans tous les cas, le statut de la dernière sauvegarde (succès ou échec) est stocké dans la zone "Informations sur la dernière sauvegarde" dans la [Page Sauvegarde du CSM](MSC/backup.md) ou dans la **Page de maintenance** de 4D Server, ainsi que dans le **Backup journal.txt**. -- **Interruption par l’utilisateur** : le bouton **Arrêter** de la boîte de dialogue de progression de la sauvegarde permet aux utilisateurs d’interrompre la sauvegarde à tout instant. Dans ce cas, la copie des éléments est stoppée et l'erreur 1406 est générée. Vous pouvez intercepter cette erreur dans la Méthode base `On Backup Shutdown`. -- **Fichier joint introuvable** : lorsqu’un fichier joint est introuvable, 4D effectue une sauvegarde partielle (sauvegarde des fichiers de la base et des fichiers joints accessibles) et retourne une erreur. -- **Sauvegarde impossible** (disque plein ou protégé en écriture, disque manquant, panne du disque, transaction non terminée, base non lancée au moment d’une sauvegarde automatique périodique, etc.) : s’il s’agit du premier échec, 4D effectuera ultérieurement une seconde tentative. Le délai d’attente entre les deux tentatives est défini dans la Page **Sauvegarde/Sauvegarde et restitution** des Propriétés de la base. Si la seconde tentative échoue également, une boîte de dialogue d’alerte système est affichée et une erreur est générée. Vous pouvez intercepter cette erreur dans la Méthode base `On Backup Shutdown`. +- **Interruption par l’utilisateur** : le bouton **Arrêter** de la boîte de dialogue de progression de la sauvegarde permet aux utilisateurs d’interrompre la sauvegarde à tout instant. Dans ce cas, la copie des éléments est stoppée et l'erreur 1406 est générée. Vous pouvez intercepter cette erreur dans la Méthode base `On Backup Shutdown`. +- **Fichier joint introuvable** : lorsqu’un fichier joint est introuvable, 4D effectue une sauvegarde partielle (sauvegarde des fichiers de l'application et des fichiers joints accessibles) et retourne une erreur. +- **Sauvegarde impossible** (disque plein ou protégé en écriture, disque manquant, panne du disque, transaction non terminée, projet non lancé au moment d’une sauvegarde automatique périodique, etc.) : S’il s’agit du premier échec, 4D effectuera ultérieurement une seconde tentative. Le délai d’attente entre les deux tentatives est défini dans la Page **Sauvegarde/Sauvegarde& et Restitution** des Propriétés. Si la seconde tentative échoue également, une boîte de dialogue d’alerte système est affichée et une erreur est générée. Vous pouvez intercepter cette erreur dans la Méthode base `On Backup Shutdown`. ## Journal de sauvegarde (Backup Journal) -Pour faciliter le suivi et la vérification des sauvegardes de la base de données, le module de sauvegarde résume chaque opération effectuée dans un fichier spécial, similaire à un journal d'activité. Comme un manuel intégré, toutes les opérations de la base de données (sauvegardes, restaurations, intégrations de fichiers d'historique) sont consignées dans ce fichier, qu’elles aient été planifiées ou exécutées manuellement. La date et l'heure auxquelles ces opérations ont eu lieu sont également notées dans le journal. +Pour faciliter le suivi et la vérification des sauvegardes, le module de sauvegarde résume chaque opération effectuée dans un fichier spécial, similaire à un journal d'activité. Comme un manuel intégré, toutes les opérations de la base de données (sauvegardes, restaurations, intégrations de fichiers d'historique) sont consignées dans ce fichier, qu’elles aient été planifiées ou exécutées manuellement. La date et l'heure auxquelles ces opérations ont eu lieu sont également notées dans le journal. -Le journal de sauvegarde s'appelle "Backup Journal[001].txt" et se trouve dans le dossier "Logs" de la base de données. Le journal de sauvegarde peut être ouvert avec n'importe quel éditeur de texte. +Le journal de sauvegarde s'appelle "Backup Journal[001].txt" et se trouve dans le dossier "Logs" du projet. Le journal de sauvegarde peut être ouvert avec n'importe quel éditeur de texte. #### Gestion de la taille du journal de sauvegarde Dans certaines stratégies de sauvegarde (par exemple, dans le cas où de nombreuses pièces jointes sont sauvegardées), le journal de sauvegarde peut rapidement atteindre une taille importante. Deux mécanismes peuvent être utilisés pour gérer cette taille : - **Sauvegarde automatique** : Avant chaque sauvegarde, l'application examine la taille du fichier backup journal courant. Si elle est supérieure à 10 Mo, le fichier courant est archivé et un nouveau fichier est créé avec le numéro [xxx] incrémenté, par exemple "Backup Journal[002] .txtâ€. Une fois le numéro de fichier 999 atteint, la numérotation reprend à 1 et les fichiers existants seront remplacés. -- **Possibilité de réduire la quantité d'informations enregistrées** : Pour ce faire, il suffit de modifier la valeur de la clé `VerboseMode` dans le fichier *Backup.4DSettings* de la base. Par défaut, cette clé est définie sur True. Si vous définissez la valeur de cette clé sur False, seules les informations principales sont stockées dans le journal de sauvegarde : la date et l'heure du début de l'opération et les éventuelles erreurs générées. Les clés XML concernant la configuration de la sauvegarde sont décrites dans le manuel *Sauvegarde des clés XML 4D*. +- **Possibilité de réduire la quantité d'informations enregistrées** : Pour ce faire, il suffit de modifier la valeur de la clé `VerboseMode` dans le fichier *Backup.4DSettings* du projet. Par défaut, cette clé est définie sur True. Si vous définissez la valeur de cette clé sur False, seules les informations principales sont stockées dans le journal de sauvegarde : la date et l'heure du début de l'opération et les éventuelles erreurs générées. Les clés XML concernant la configuration de la sauvegarde sont décrites dans le manuel *Sauvegarde des clés XML 4D*. + + ## 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. +Toutes les informations concernant les dernières opérations de sauvegarde et de restitution sont stockées dans le fichier **backupHistory.json** de l'application. Ce dernier enregistre le chemin de chaque fichier sauvegardé (y compris les pièces jointes) ainsi que le numéro, la date, l'heure, la durée et le statut de chaque opération. Afin de limiter la taille du fichier, le nombre d'opérations enregistrées et le nombre de sauvegardes disponibles ("Keep only the last X backup files") définies dans les propriétés de sauvegarde est identique. -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: +Le fichier **backupHistory.json** se situe dans le dossier de destination de sauvegarde courant. Vous pouvez obtenir le chemin de ce fichier à l'aide de la déclaration suivante : ```4d $backupHistory:=Get 4D file(Backup history file) ``` - -> **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 +> **ATTENTION** +> La suppression ou le déplacement du fichier **backupHistory.json** entraînera la réinitialisation du prochain numéro de sauvegarde. +> Le fichier **backupHistory.json** est formaté afin d'être utilisé par l'application 4D. Si vous recherchez un état lisible sur les opérations de sauvegarde, le journal de sauvegarde sera plus précis. diff --git a/website/translated_docs/fr/Backup/log.md b/website/translated_docs/fr/Backup/log.md index 3cb565953e3e2f..36a487885b346b 100644 --- a/website/translated_docs/fr/Backup/log.md +++ b/website/translated_docs/fr/Backup/log.md @@ -3,24 +3,24 @@ id: log title: Fichier d'historique (.journal) --- -Une base exploitée de manière continue enregistre en permanence des modifications, des ajouts ou des suppressions d’enregistrements. Réaliser des sauvegardes régulières des données est important mais ne permet pas, en cas d’incident, de récupérer les données saisies depuis la dernière sauvegarde. Pour répondre à ce besoin, 4D dispose d’un outil particulier : le fichier d’historique. Ce fichier permet d’assurer la sécurité permanente des données de la base. +Une application exploitée de manière continue enregistre en permanence des modifications, des ajouts ou des suppressions d’enregistrements. Réaliser des sauvegardes régulières des données est important mais ne permet pas, en cas d’incident, de récupérer les données saisies depuis la dernière sauvegarde. Pour répondre à ce besoin, 4D dispose d’un outil particulier : le fichier d’historique. Ce fichier permet d’assurer la sécurité permanente des données. -En outre, 4D travaille en permanence avec un cache de données situé en mémoire. Toute modification effectuée sur les données de la base est stockée provisoirement dans le cache avant d’être écrite sur le disque dur. Ce principe permet d’accélérer le fonctionnement des applications ; en effet, les accès mémoire sont bien plus rapides que les accès disque. Si un incident survient sur la base avant que les données stockées dans le cache aient pu être écrites sur le disque, vous devrez intégrer le fichier d’historique courant afin de récupérer entièrement la base. +En outre, 4D travaille en permanence avec un cache de données situé en mémoire. Toute modification effectuée sur les données de l'application est stockée provisoirement dans le cache avant d’être écrite sur le disque dur. Ce principe permet d’accélérer le fonctionnement des applications ; en effet, les accès mémoire sont bien plus rapides que les accès disque. Si un incident survient sur l'application avant que les données stockées dans le cache aient pu être écrites sur le disque, vous devrez intégrer le fichier d’historique courant afin de récupérer entièrement l'application. -Enfin, 4D dispose d'une fonction d'analyse du contenu du fichier d'historique, permettant également de remonter en arrière parmi les opérations. Ces fonctions sont accessibles via le CSM : reportez-vous aux sections [Page Analyse d'activités](MSC/analysis.md) et [Page Retour arrière](MSC/rollback.md). +Enfin, 4D dispose d'une fonction d'analyse du contenu du fichier d'historique, permettant également de faire remonter en arrière les opérations exécutées sur les données de l'application. Ces fonctions sont accessibles via le CSM : reportez-vous aux sections [Page Analyse d'activités](MSC/analysis.md) et [Page Retour arrière](MSC/rollback.md). ## Fonctionnement du fichier d'historique -L’historique généré par 4D se présente sous la forme d’un fichier dans lequel toutes les opérations effectuées sur les données des tables journalisées de la base viennent s’inscrire séquentiellement. Par défaut, toutes les tables sont journalisées, c'est-à-dire incluses dans l'historique, mais vous pouvez en désélectionner certaines via la propriété **Inclure dans le fichier d'historique**. +L’historique généré par 4D se présente sous la forme d’un fichier dans lequel toutes les opérations effectuées sur les données des tables journalisées de l'application viennent s’inscrire séquentiellement. Par défaut, toutes les tables sont journalisées, c'est-à-dire incluses dans l'historique, mais vous pouvez en désélectionner certaines via la propriété **Inclure dans le fichier d'historique**. -Ainsi, chaque opération effectuée par un utilisateur provoque deux actions simultanées : une première sur les données de la base (l’instruction est exécutée normalement) et une seconde dans le fichier d’historique (la description de l’opération y est enregistrée). Le fichier d’historique se construit de manière indépendante, sans gêner ni ralentir le travail de l’utilisateur. Une base ne peut travailler qu’avec un seul fichier d’historique à la fois. Le fichier d’historique enregistre les types d’opérations suivants : +Ainsi, chaque opération effectuée par un utilisateur provoque deux actions simultanées : une première sur le fichier de données (l’instruction est exécutée normalement) et une seconde dans le fichier d’historique (la description de l’opération y est enregistrée). Le fichier d’historique se construit de manière indépendante, sans gêner ni ralentir le travail de l’utilisateur. Une application ne peut travailler qu’avec un seul fichier d’historique à la fois. Le fichier d’historique enregistre les types d’opérations suivants : - Ouvertures et fermetures du fichier de données, - Ouvertures et fermetures de process (contextes), - Ajouts d’enregistrements et de BLOBs, - Modifications d’enregistrements, - Suppressions d’enregistrements, -- Créations et fermetures de transactions. +- Créations et fermetures de transactions. Pour plus d’informations sur ces actions, reportez-vous à la section [Page Analyse d'activités](MSC/analysis.md) du CSM. @@ -30,47 +30,51 @@ Ce schéma résume le principe général de fonctionnement du fichier d’histor ![](assets/en/Backup/backup05.png) + Le fichier d’historique courant est automatiquement sauvegardé avec le fichier de données courant. Ce mécanisme procure deux avantages principaux : - Eviter la saturation du disque accueillant le fichier d’historique. En effet, sans sauvegarde, l’historique grossirait indéfiniment au fur et à mesure de l’exploitation de la base et finirait par saturer votre disque. A chaque sauvegarde du fichier de données, 4D ou 4D Server ferme le fichier d’historique courant et débute immédiatement un nouveau fichier vide, évitant ainsi le risque de saturation. L’ancien fichier d’historique est alors archivé puis éventuellement détruit, conformément au mécanisme des jeux de sauvegarde. -- Conserver les fichiers d’historique correspondant aux sauvegardes, afin de pouvoir analyser ou réparer a posteriori une base. En effet, l’intégration du fichier d’historique ne peut se faire que dans la base qui lui correspond. Il est donc important, pour pouvoir intégrer correctement un fichier d’historique dans une sauvegarde, de disposer de sauvegardes et d’historiques archivés simultanément. +- Conserver les fichiers d’historique correspondant aux sauvegardes, afin de pouvoir analyser ou réparer a posteriori une application. En effet, l’intégration du fichier d’historique ne peut se faire que dans l'application qui lui correspond. Il est donc important, pour pouvoir intégrer correctement un fichier d’historique dans une sauvegarde, de disposer de sauvegardes et d’historiques archivés simultanément. + ## Créer le fichier d’historique -Par défaut, toute base créée avec 4D utilise un fichier d’historique (option définie dans la Page **Général** des Préférences de 4D). Le fichier d’historique est nommé par défaut *data.journal* et est placé dans le dossier Data. +Par défaut, toute application créée avec 4D utilise un fichier d’historique (option définie dans la Page **Général** des Préférences de 4D). Le fichier d’historique est nommé par défaut *data.journal* et est placé dans le dossier Data. -Vous pouvez à tout moment savoir si votre base utilise un fichier d’historique : l’option **Utiliser le fichier d’historique** est cochée dans la Page **Sauvegarde/Configuration** des Propriétés de la base. Si vous avez désélectionné cette option ou si vous utilisez une base sans fichier d’historique et souhaitez mettre en place une stratégie de sauvegarde avec fichier d’historique, il vous appartient d’en créer un. +Vous pouvez à tout moment savoir si votre application utilise un fichier d’historique : l’option **Utiliser le fichier d’historique** est cochée dans la Page **Sauvegarde/Configuration** des Propriétés. Si vous avez désélectionné cette option ou si vous utilisez une application sans fichier d’historique et souhaitez mettre en place une stratégie de sauvegarde avec fichier d’historique, il vous appartient d’en créer un. Pour créer un fichier d’historique : -1. Dans la Page **Sauvegarde/Configuration** des Propriétés de la base, cochez l’option **Utiliser le fichier d’historique**. Le programme affiche une boîte de dialogue standard de création de fichier. Par défaut, le fichier d’historique est baptisé *data.journal*. +1. Dans la Page **Sauvegarde/Configuration** des Propriétés de structure, cochez l’option **Utiliser le fichier d’historique**. Le programme affiche une boîte de dialogue standard de création de fichier. Par défaut, le fichier d’historique est baptisé *data.journal*. -2. Conservez le nom du fichier par défaut ou choisissez-en un autre et déterminez l’emplacement du fichier. Si vous disposez d’au moins deux disques durs, il est recommandé de placer l’historique sur un autre disque que celui contenant la base, afin de pouvoir l’exploiter en cas de perte totale du disque de la base. Si le disque dur de la base de données est perdu, vous pouvez toujours rappeler votre fichier d'historique. +2. Conservez le nom du fichier par défaut ou choisissez-en un autre et déterminez l’emplacement du fichier. Si vous disposez d’au moins deux disques durs, il est recommandé de placer le fichier d'historique sur un autre disque que celui contenant le projet d'application. Si le disque dur de l'application est perdu, vous pouvez toujours rappeler votre fichier d'historique. 3. Cliquez sur le bouton **Enregistrer**. Le disque et le nom du fichier d’historique ouvert s’affichent alors dans la zone **“Utiliser le fichier d’historiqueâ€** de la boîte de dialogue. Vous pouvez cliquer dans cette zone afin d’afficher un pop up menu contenant l’enchaînement des dossiers à partir du disque. -4. Validez la boîte de dialogue des Propriétés de la base. +4. Validez la boîte de dialogue des Propriétés. -Pour que vous puissiez directement créer un fichier d’historique, la base de données doit se trouver dans une des situations suivantes : +Pour que vous puissiez directement créer un fichier d’historique, les données doivent se trouver dans une des situations suivantes : - Le fichier de données est vierge, -- Vous venez d’effectuer une sauvegarde de la base et aucune modification sur les données n’a encore été effectuée. +- Vous venez d’effectuer une sauvegarde et aucune modification sur les données n’a encore été effectuée. -Dans tous les autres cas, au moment où vous validez la fenêtre des Propriétés de la base, une boîte de dialogue d’alerte vous informe qu’une sauvegarde est nécessaire. Si vous cliquez sur **OK**, la sauvegarde démarre immédiatement puis l’historique est activé. Si vous cliquez sur **Annuler**, la demande est enregistrée mais la création du fichier d’historique est différée. Cette précaution est indispensable car il vous faudra, pour restituer une base de données après un éventuel incident, disposer d’une copie de la base dans laquelle pourront s’intégrer les opérations enregistrées dans le fichier d’historique. +Dans tous les autres cas, au moment où vous validez la fenêtre des Propriétés, une boîte de dialogue d’alerte vous informe qu’une sauvegarde est nécessaire. Si vous cliquez sur **OK**, la sauvegarde démarre immédiatement puis l’historique est activé. Si vous cliquez sur **Annuler**, la requête est enregistrée mais la création du fichier d’historique est différée et sera créée uniquement après la prochaine sauvegarde de l'application. Cette précaution est indispensable car il vous faudra, pour restituer une application après un éventuel incident, disposer d’une copie de l'application dans laquelle pourront s’intégrer les opérations enregistrées dans le fichier d’historique. -Sans autre manipulation de votre part, toutes les opérations effectuées sur les données s’inscriront dans ce fichier, et il sera utilisé également lors des ouvertures ultérieures de la base. +Sans autre manipulation de votre part, toutes les opérations effectuées sur les données s’inscriront dans ce fichier, et il sera utilisé également lors des ouvertures ultérieures de l'application. Vous devrez créer un autre fichier d’historique si vous créez un nouveau fichier de données. Vous devrez désigner ou créer un autre fichier d’historique si vous ouvrez un autre fichier de données non associé à un fichier d’historique (ou si le fichier d’historique est manquant). + + ## Fermer l’historique -Si vous souhaitez interrompre l’enregistrement du fichier d’historique courant, désélectionnez l’option **Utiliser le fichier d’historique** dans la Page **Sauvegarde/Configuration** des Propriétés de la base. +Si vous souhaitez interrompre l’enregistrement du fichier d’historique courant, désélectionnez l’option **Utiliser le fichier d’historique** dans la Page **Sauvegarde/Configuration** des Propriétés. 4D affiche alors un message d’alerte afin d’attirer votre attention sur le fait que cette action vous prive de la sécurité apportée par le fichier d’historique : ![](assets/en/Backup/backup06.png) -Si vous cliquez sur le bouton **Fermer**, le fichier d’historique courant est immédiatement refermé (il n’est pas nécessaire que la boîte de dialogue des Propriétés de la base soit ensuite validée). +Si vous cliquez sur le bouton **Fermer**, le fichier d’historique courant est immédiatement refermé (il n’est pas nécessaire que la boîte de dialogue des Propriétés soit ensuite validée). Si vous souhaitez fermer votre fichier d’historique courant parce qu’il devient trop important, il est préférable d’effectuer une sauvegarde du fichier de données, ce qui entraînera la sauvegarde de l’historique. diff --git a/website/translated_docs/fr/Backup/overview.md b/website/translated_docs/fr/Backup/overview.md index 91a397da3bd31d..cf1656671951e0 100644 --- a/website/translated_docs/fr/Backup/overview.md +++ b/website/translated_docs/fr/Backup/overview.md @@ -3,18 +3,19 @@ id: overview title: Aperçu --- -4D inclut un module complet de sauvegarde des bases de données et de récupération en cas d’incident. +4D inclut un module complet de sauvegarde et de récupération de l'application en cas d’incident. -Ce module permet de sauvegarder une base de données en cours d’exploitation, sans qu’il soit nécessaire de quitter l’application. Chaque sauvegarde peut inclure le dossier du projet, le fichier de données et tout fichier ou dossier supplémentaire. Ces paramètres sont définis au préalable dans les Propriétés de la base. +Ce module permet de sauvegarder une application en cours d’exploitation, sans qu’il soit nécessaire de quitter l’application. Chaque sauvegarde peut inclure le dossier du projet, le fichier de données et tout fichier ou dossier supplémentaire. Ces paramètres sont définis au préalable dans les Propriétés. Les sauvegardes peuvent être déclenchées manuellement ou automatiquement, à intervalles réguliers et sans intervention de l’utilisateur. Des commandes de langage ainsi que des méthodes base spécifiques permettent d’intégrer les fonctions de sauvegarde à une interface personnalisée. -La restitution d’une base de données après incident peut s’effectuer automatiquement lors de l’ouverture d’une base endommagée. +La restitution d’une application après incident peut s’effectuer automatiquement lors de l’ouverture d’une application endommagée. -En outre, le module de sauvegarde intégré tire parti du fichier .journal ([ d’historique](log.md)). Ce fichier conserve une trace de chaque opération effectuée sur les données et assure ainsi une sécurité totale entre deux sauvegardes. En cas d’incident sur une base de données en cours d’exploitation, les opérations éventuellement manquantes dans le fichier de données sont automatiquement réintégrées lors de l’ouverture suivante de la base. Vous pouvez visualiser à tout moment le contenu du fichier d’historique. +En outre, le module de sauvegarde intégré tire parti du fichier .journal ([ d’historique](log.md)). Ce fichier conserve une trace de chaque opération effectuée sur les données et assure ainsi une sécurité totale entre deux sauvegardes. En cas d’incident sur une application en cours d’exploitation, les opérations éventuellement manquantes dans le fichier de données sont automatiquement réintégrées lors de l’ouverture suivante de l'application. Vous pouvez visualiser à tout moment le contenu du fichier d’historique. -> Vous pouvez également mettre en place des solutions alternatives de réplication et de synchronisation des données permettant de maintenir des versions identiques des bases à des fins de sauvegarde. Ces solutions peuvent être basées sur les technologies et mécanismes suivants : +> Vous pouvez également mettre en place des solutions alternatives de réplication et de synchronisation des données permettant de maintenir des versions identiques des applications à des fins de sauvegarde. Ces solutions peuvent être basées sur les technologies et mécanismes suivants : > - Mise en place d'un miroir logique avec 4D Server (utilise les mécanismes du module de sauvegarde intégré) > - Synchronisation via le SQL - Synchronisation via le HTTP (/rest/url) -> -> Consultez le document [4D Security guide](https://blog.4d.com/4d-security-guide/) pour une vue d'ensemble des fonctions de sécurité de 4D. \ No newline at end of file + + +> Consultez le document [4D Security guide](https://blog.4d.com/4d-security-guide/) pour une vue d'ensemble des fonctions de sécurité de 4D. diff --git a/website/translated_docs/fr/Backup/restore.md b/website/translated_docs/fr/Backup/restore.md index 52239a4906fd12..a3a0c6b59f8891 100644 --- a/website/translated_docs/fr/Backup/restore.md +++ b/website/translated_docs/fr/Backup/restore.md @@ -3,43 +3,51 @@ id: restore title: Restitution --- -4D vous permet de récupérer l’intégralité des données d’une base en cas d’incident, quelles que soient ses causes. Deux catégories principales d’incidents peuvent se produire : +4D vous permet de récupérer l’intégralité des données d’une application en cas d’incident, quelles que soient ses causes. Deux catégories principales d’incidents peuvent se produire : -- L’arrêt inopiné de la base pendant son exploitation. Cet incident peut se produire à cause d’une coupure de courant, la panne d’un élément du système, etc. Dans ce cas, en fonction de l’état courant du cache de données au moment de l’incident, la récupération de la base peut nécessiter différentes opérations : - - - Si le cache était vide, la base s’ouvre normalement. Toutes les modifications apportées à la base ont été enregistrées. Ce cas ne nécessite aucune opération particulière. +- L’arrêt inopiné de l'application pendant son exploitation. Cet incident peut se produire à cause d’une coupure de courant, la panne d’un élément du système, etc. Dans ce cas, en fonction de l’état courant du cache de données au moment de l’incident, la récupération de l'application peut nécessiter différentes opérations : + - Si le cache était vide, l'application s’ouvre normalement. Toutes les modifications apportées à l'application ont été enregistrées. Ce cas ne nécessite aucune opération particulière. - Si le cache contenait des opérations, le fichier de données est intact mais il est nécessaire d’intégrer le fichier d’historique courant. - Si le cache était en cours d’écriture, le fichier de données est probablement endommagé. Il est nécessaire de restituer la dernière sauvegarde et d’intégrer le fichier d’historique courant. -- La perte d’un ou plusieurs fichier(s) de la base. Cet incident peut être causé par des secteurs défectueux sur le disque contenant la base, un virus, une erreur de manipulation, etc. Il est nécessaire de restituer la dernière sauvegarde puis d’intégrer éventuellement l’historique courant. Pour savoir si une base a été endommagée à la suite d’un incident, il suffit de la relancer avec 4D. Le programme effectue un auto-diagnostic et précise les opérations de réparation à effectuer. En mode automatique, ces opérations sont effectuées directement, sans intervention de l’utilisateur. Si une stratégie de sauvegarde régulière a été mise en place, les outils de récupération de 4D vous permettront (dans la plupart des cas) de retrouver la base dans l’état exact où elle se trouvait avant l’incident. -> 4D peut lancer automatiquement des procédures de récupération des bases après incident. Ces mécanismes sont gérés à l’aide de deux options accessibles dans la Page **Sauvegarde/Sauvegarde et restitution** de la fenêtre des Propriétés de la base. Pour plus d'informations, reportez-vous au paragraphe [Restitution automatique](settings.md#automatic-restore) -> . Si l'incident résulte d'une opération inappropriée sur effectuée sur les données (suppression d'un enregistrement par exemple), vous pouvez tenter de réparer la base en utilisant la fonction de "retour arrière" dans le fichier d'historique. Cette fonction est accessible dans la Page [Retour arrière](MSC/rollback.md) du CSM. +- La perte de fichier(s) de l'application. Cet incident peut être causé par des secteurs défectueux sur le disque contenant l'application, un virus, une erreur de manipulation, etc. Il est nécessaire de restituer la dernière sauvegarde puis d’intégrer éventuellement l’historique courant. Pour savoir si une application a été endommagée à la suite d’un incident, il suffit de la relancer avec 4D. Le programme effectue un auto-diagnostic et précise les opérations de réparation à effectuer. En mode automatique, ces opérations sont effectuées directement, sans intervention de l’utilisateur. Si une stratégie de sauvegarde régulière a été mise en place, les outils de récupération de 4D vous permettront (dans la plupart des cas) de retrouver l'application dans l’état exact où elle se trouvait avant l’incident. + +> 4D peut lancer automatiquement des procédures de récupération des applications après incident. Ces mécanismes sont gérés à l’aide de deux options accessibles dans la Page **Sauvegarde/Sauvegarde & et Restitution** de la fenêtre des Propriétés. Pour plus d'informations, reportez-vous au paragraphe [Restitution automatique](settings.md#automatic-restore) +> . Si l'incident résulte d'une opération inappropriée sur effectuée sur les données (suppression d'un enregistrement par exemple), vous pouvez tenter de réparer le fichier de données en utilisant la fonction de "retour arrière" dans le fichier d'historique. Cette fonction est accessible dans la Page [Retour arrière](MSC/rollback.md) du CSM. + ## Restitution manuelle d’une sauvegarde (dialogue standard) Vous pouvez restituer manuellement le contenu d’une archive générée par le module de sauvegarde. Une restitution manuelle peut être nécessaire par exemple pour restituer la totalité du contenu d’une archive (fichiers de structure et/ou fichiers joints inclus) ou à des fins de recherche sur des archives. La restitution manuelle peut éventuellement s’accompagner de l’intégration de l’historique courant. -La restitution manuelle des sauvegardes peut être réalisée soit via une boîte de dialogue standard d’ouverture de document, soit via la page [“Restitutionâ€](MSC/restore) du Centre de sécurité et de maintenance (CSM). La restitution via une boîte de dialogue standard permet de restituer n’importe quelle archive. En revanche, seules les archives associées à la base ouverte peuvent être restituées. +La restitution manuelle des sauvegardes peut être réalisée soit via une boîte de dialogue standard d’ouverture de document, soit via la page [“Restitutionâ€](MSC/restore) du Centre de sécurité et de maintenance (CSM). La restitution via une boîte de dialogue standard permet de restituer n’importe quelle archive. En revanche, seules les archives associées à l'application ouverte peuvent être restituées. -Pour restituer manuellement une sauvegarde via une boîte de dialogue standard : +Pour restituer manuellement une application via une boîte de dialogue standard : -1. Lancez l’application 4D et choisissez la commande **Restituer...** dans le menu **Fichier**. Il n’est pas obligatoire qu’une base de données soit ouverte. OU BIEN Exécutez la commande `RESTORE` depuis une méthode de 4D. Une boîte de dialogue standard d’ouverture de fichiers apparaît. +1. Lancez l’application 4D et choisissez la commande **Restituer...** dans le menu **Fichier**. Il n'est pas obligatoire qu'un projet d'application soit ouvert. OU BIEN Exécutez la commande `RESTORE` depuis une méthode de 4D. Une boîte de dialogue standard d’ouverture de fichiers apparaît. 2. Désignez le fichier de sauvegarde (.4bk) ou le fichier de sauvegarde de l’historique (.4bl) à restituer et cliquez sur **Ouvrir**. Un boîte de dialogue apparaît, vous permettant de désigner l’emplacement auquel vous souhaitez que les fichiers soient restitués . Par défaut, 4D restitue les fichiers dans un dossier nommé *“Nomarchiveâ€* (sans extension) placé à côté de l’archive. Vous pouvez afficher le chemin : ![](assets/en/Backup/backup07.png) Vous pouvez également cliquer sur le bouton **[...]** et indiquer un autre emplacement. +3. Cliquez sur le bouton **Restituer**. 4D extrait tous les fichiers de la sauvegarde à l’emplacement défini. Si le fichier d’historique courant ou un fichier de sauvegarde d’historique ayant le même numéro que le fichier de sauvegarde est stocké dans le même dossier, 4D examine son contenu. S’il contient des opérations non présentes dans le fichier de données, le programme propose de l’intégrer. L’intégration est effectuée automatiquement si l’option **d’intégration automatique de l’historique** est cochée (cf. paragraphe [Restitution automatique](settings.md#automatic-restore)). + +(Facultatif) Cliquez sur **OK** pour intégrer le fichier d’historique dans l'application restituée. Si la restitution et l’intégration se sont déroulées correctement, 4D affiche une boîte de dialogue indiquant que l’opération a réussi. +5. Cliquez sur **OK**. + +Le dossier d’arrivée est affiché. Lors de la restitution, 4D place tous les fichiers sauvegardés dans ce dossier, quelle que soit la position des fichiers originaux sur le disque au moment de la sauvegarde. De cette façon, vous retrouverez plus facilement vos fichiers. + +> Tout contenu lié au fichier de données (dossier files et `Settings`) est automatiquement restauré dans un sous-dossier `Data`du dossier de destination. -3. Cliquez sur le bouton **Restituer**. 4D extrait tous les fichiers de la sauvegarde à l’emplacement défini. Si le fichier d’historique courant ou un fichier de sauvegarde d’historique ayant le même numéro que le fichier de sauvegarde est stocké dans le même dossier, 4D examine son contenu. S’il contient des opérations non présentes dans le fichier de données, le programme propose de l’intégrer. L’intégration est effectuée automatiquement si l’option **d’intégration automatique de l’historique** est cochée (cf. paragraphe [Restitution automatique](settings.md#automatic-restore)). (Facultatif) Cliquez sur **OK** pour intégrer le fichier d’historique dans la base restituée. Si la restitution et l’intégration se sont déroulées correctement, 4D affiche une boîte de dialogue indiquant que l’opération a réussi. -4. Cliquez sur **OK**. Le dossier d’arrivée est affiché. Lors de la restitution, 4D place tous les fichiers sauvegardés dans ce dossier, quelle que soit la position des fichiers originaux sur le disque au moment de la sauvegarde. De cette façon, vous retrouverez plus facilement vos fichiers. ## Restitution manuelle d’une sauvegarde (CSM) -La [page Restitution](MSC/restore.md) du Centre de sécurité et de maintenance vous permet de restituer manuellement une archive de la base de données courante. +La [page Restitution](MSC/restore.md) du Centre de sécurité et de maintenance (CSM) vous permet de restituer manuellement une archive de l'application courante. + ## Intégration manuelle de l’historique -Si vous n’avez pas coché l’option d’intégration automatique du fichier d’historique dans la page Restitution du CSM (cf. [Intégration successive de plusieurs fichiers d’historiques](MSC/restore.md#successive-intergration-of-several-data-log-files)), une boîte de dialogue d’alerte apparaît à l’ouverture de la base lorsque 4D constate que le fichier d’historique contient plus d’opérations qu’il n’en a été effectué dans la base. +Si vous n’avez pas coché l’option d’intégration automatique du fichier d’historique dans la page Restitution du CSM (cf. [Intégration successive de plusieurs fichiers d’historiques](MSC/restore.md#successive-intergration-of-several-data-log-files)), une boîte de dialogue d’alerte apparaît à l’ouverture de l'application lorsque 4D constate que le fichier d’historique contient plus d’opérations qu’il n’en a été effectué dans le fichier de données. ![](assets/en/Backup/backup08.png) diff --git a/website/translated_docs/fr/Backup/settings.md b/website/translated_docs/fr/Backup/settings.md index 39d3c32e72e7d0..7a9eac3025ffe1 100644 --- a/website/translated_docs/fr/Backup/settings.md +++ b/website/translated_docs/fr/Backup/settings.md @@ -3,7 +3,7 @@ id: settings title: Paramètres de sauvegarde --- -Les paramètres de sauvegarde sont définis sur trois pages dans la boîte de dialogue des Propriétés de la base. Vous pouvez définir : +Les paramètres de sauvegarde sont définis sur trois pages dans la boîte de dialogue des Propriétés. Vous pouvez définir : - la périodicité des sauvegardes automatiques - les fichiers à inclure dans chaque sauvegarde @@ -13,47 +13,52 @@ Les paramètres de sauvegarde sont définis sur trois pages dans la boîte de di ## Sauvegardes périodiques -Vous pouvez automatiser les sauvegardes de vos bases ouvertes avec 4D ou 4D Server (même lorsqu’aucun poste distant n’est connecté). Le principe consiste à définir une fréquence de sauvegarde (en heures, jours, semaines ou mois) ; à chaque échéance, 4D déclenche automatiquement une sauvegarde en tenant compte des paramètres de sauvegarde courants. +Vous pouvez automatiser les sauvegardes de vos applications ouvertes avec 4D ou 4D Server (même lorsqu’aucun poste distant n’est connecté). Le principe consiste à définir une fréquence de sauvegarde (en heures, jours, semaines ou mois) ; à chaque échéance, 4D déclenche automatiquement une sauvegarde en tenant compte des paramètres de sauvegarde courants. -Si l’application n’était pas lancée au moment théorique de la sauvegarde, 4D considère au lancement suivant que la sauvegarde a échoué et applique les paramétrages adéquats, définis dans les Propriétés de la base (cf. paragraphe [En cas de problème au cours de la sauvegarde](backup.md#handling-backup-issues)). +Si l’application n’était pas lancée au moment théorique de la sauvegarde, 4D considère au lancement suivant que la sauvegarde a échoué et applique les paramétrages adéquats, définis dans les Propriétés (cf. paragraphe [En cas de problème au cours de la sauvegarde](backup.md#handling-backup-issues)). -Les paramètres des sauvegardes périodiques sont définis dans la Page **Sauvegarde/Périodicité** des Propriétés de la base : +Les paramètres des sauvegardes périodiques sont définis dans la Page **Sauvegarde/Périodicité** des Propriétés : ![](assets/en/Backup/backup02.png) -Les options regroupées dans cet onglet permettent de définir et de paramétrer des sauvegardes périodiques automatiques de la base. Vous pouvez choisir un paramétrage standard rapide ou personnaliser entièrement la périodicité. Diverses options apparaissent en fonction de la valeur définie dans le menu **Sauvegarde automatique** : +Les options regroupées dans cet onglet permettent de définir et de paramétrer des sauvegardes périodiques automatiques de l'application. Vous pouvez choisir un paramétrage standard rapide ou personnaliser entièrement la périodicité. Diverses options apparaissent en fonction de la valeur définie dans le menu **Sauvegarde automatique** : - **Jamais** : la fonction de sauvegarde périodique est inactivée. - **Toutes les heures** : programme une sauvegarde automatique par heure, à partir de la prochaine heure. -- **Tous les jours** : programme une sauvegarde automatique par jour. Une zone de saisie vous permet d'indiquer l’heure à laquelle la sauvegarde doit être déclenchée. +- **Tous les jours** : programme une sauvegarde automatique par jour. Une zone de saisie vous permet d'indiquer l’heure à laquelle la sauvegarde doit être déclenchée. - **Toutes les semaines** : programme une sauvegarde automatique par semaine. Deux zones de saisie supplémentaires vous permettent d'indiquer le jour et l'heure de la sauvegarde. - **Tous les mois** : programme une sauvegarde automatique par mois. Deux zones de saisie supplémentaires vous permettent d'indiquer le jour du mois et l'heure de la sauvegarde. -- **Personnalisée** : permet de configurer des sauvegardes périodiques "sur-mesure". Lorsque vous sélectionnez cette, plusieurs zones de saisie supplémentaires apparaissent : +- **Personnalisée** : permet de configurer des sauvegardes périodiques "sur-mesure". Lorsque vous sélectionnez cette, plusieurs zones de saisie supplémentaires apparaissent : + **Toutes les N heure(s)** : permet de programmer des sauvegardes sur une base horaire. Vous pouvez saisir une valeur comprise entre 1 et 24. - + **Tous les N jour(s) à N** : permet de programmer des sauvegardes sur une base journalière. Saisissez par exemple 1 si vous souhaitez une sauvegarde quotidienne. Lorsque vous cochez cette option, vous devez indiquer l’heure à laquelle la sauvegarde doit être déclenchée. - + **Toutes les N semaine(s), jour à N** : permet de programmer des sauvegardes sur une base hebdomadaire. Saisissez 1 si vous souhaitez une sauvegarde hebdomadaire. Lorsque vous cochez cette option, vous devez indiquer le ou les jour(s) de la semaine et l’heure à laquelle chaque sauvegarde doit être déclenchée. Vous pouvez cocher un ou plusieurs jour(s) de la semaine. Par exemple, vous pouvez utiliser cette option pour définir deux sauvegardes hebdomadaires : une le mercredi et une le vendredi. - + **Tous les N mois, Ne jour à N** : permet de programmer des sauvegardes sur une base mensuelle. Saisissez 1 si vous souhaitez une sauvegarde mensuelle. Lorsque vous cochez cette option, vous devez indiquer le jour de chaque mois auquel la sauvegarde doit être déclenchée, ainsi que l’heure de déclenchement. + - **Tous les N jour(s) à N** : permet de programmer des sauvegardes sur une base journalière. Saisissez par exemple 1 si vous souhaitez une sauvegarde quotidienne. Lorsque vous cochez cette option, vous devez indiquer l’heure à laquelle la sauvegarde doit être déclenchée. + - **Toutes les N semaine(s), jour à N** : permet de programmer des sauvegardes sur une base hebdomadaire. Saisissez 1 si vous souhaitez une sauvegarde hebdomadaire. Lorsque vous cochez cette option, vous devez indiquer le ou les jour(s) de la semaine et l’heure à laquelle chaque sauvegarde doit être déclenchée. Vous pouvez cocher un ou plusieurs jour(s) de la semaine. Par exemple, vous pouvez utiliser cette option pour définir deux sauvegardes hebdomadaires : une le mercredi et une le vendredi. + - **Tous les N mois, Ne jour à N** : permet de programmer des sauvegardes sur une base mensuelle. Saisissez 1 si vous souhaitez une sauvegarde mensuelle. Lorsque vous cochez cette option, vous devez indiquer le jour de chaque mois auquel la sauvegarde doit être déclenchée, ainsi que l’heure de déclenchement. + +> 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 -La Page Sauvegarde/Configuration des Propriétés de la base permet de désigner les fichiers à sauvegarder, l’emplacement des fichiers de sauvegarde et le fichier d’historique. Ces paramètres sont spécifiques à chaque base de données ouverte par l’application 4D. +La Page Sauvegarde/Configuration des Propriétés permet de désigner les fichiers à sauvegarder, l’emplacement des fichiers de sauvegarde et le fichier d’historique. Ces paramères sont spécifiques à chaque application ouverte par 4D ou 4D Server. ![](assets/en/Backup/backup03.png) > **4D Server** : Ces paramètres peuvent être définis depuis le poste 4D Server uniquement. ### Contenu - Cette zone permet de désigner les fichiers et/ou dossiers à copier lors de la prochaine sauvegarde. -- **Fichier de données** : fichier de données de la base. Lorsque cette option est cochée, le fichier d’historique courant de la base, s’il existe, est sauvegardé en même temps que les données. -- **Fichier de structure** : fichiers et dossiers de la base. Dans le cas de bases compilées, cette option permet de sauvegarder le fichier .4dz. +- **Data** : fichier de données de l'application. Lorsque cette option est cochée, les éléments suivants sont automatiquement sauvegardés en même temps que les données : + - le fichier journal courant de l'application (le cas échéant), + - le dossier `Settings` complet situé [à côté du fichier de données](Project/architecture.md#settings-folder) (le cas échéant), c'est-à-dire *les paramètres utilisateur pour les données*. +- **Structure** : fichiers et dossiers du projet d'application. Dans le cas de projets compilés, cette option permet de sauvegarder le fichier .4dz. Lorsque cette option est cochée, le dossier complet `Settings` situé [au même niveau que le dossier Project](Project/architecture.md#settings-folder-1), c'est-à-dire les *paramètres utilisateur*, est automatiquement sauvegardé. - **Fichier de structure utilisateur (uniquement pour les bases binaires)** : *fonctionnalité obsolète*f -- **Fichiers joints** : cette zone permet de désigner un ensemble de fichiers et/ou de dossiers à sauvegarder en même temps que la base. Ces fichiers peuvent être de tout type (documents ou modèles de plug-ins, étiquettes, états, images, etc.). Vous pouvez désigner soit des fichiers individuels, soit des dossiers dont le contenu sera intégralement sauvegardé. Chaque élément joint est listé avec son chemin d’accès complet dans la zone “Fichiers jointsâ€. +- **Attachments** : cette zone permet de désigner un ensemble de fichiers et/ou de dossiers à sauvegarder en même temps que l'application. Ces fichiers peuvent être de tout type (documents ou modèles de plug-ins, étiquettes, états, images, etc.). Vous pouvez désigner soit des fichiers individuels, soit des dossiers dont le contenu sera intégralement sauvegardé. Chaque élément joint est listé avec son chemin d’accès complet dans la zone “Fichiers jointsâ€. - **Supprimer** : retire de la liste des fichiers joints l’élément sélectionné. - - **Ajouter dossier...** : affiche une boîte de dialogue permettant de sélectionner un dossier à joindre à la sauvegarde. En cas de restitution, le dossier sera récupéré avec sa structure interne. Vous pouvez désigner tout dossier ou volume connecté au poste, à l’exception du dossier contenant les fichiers de la base. + - **Ajouter dossier...** : affiche une boîte de dialogue permettant de sélectionner un dossier à joindre à la sauvegarde. En cas de restitution, le dossier sera récupéré avec sa structure interne. Vous pouvez désigner tout dossier ou volume connecté au poste, à l’exception du dossier contenant les fichiers de l'application. - **Ajouter fichier...** : affiche une boîte de dialogue permettant de sélectionner un fichier à joindre à la sauvegarde. + ### Emplacement des fichiers de sauvegarde Cette zone permet de visualiser et de modifier l’emplacement auquel seront stockés les fichiers de sauvegarde ainsi que les fichiers de sauvegarde du fichier d’historique (le cas échéant). @@ -64,11 +69,12 @@ Pour modifier l’emplacement auquel ces fichiers devront être enregistrés, cl ### Gestion du fichier d'historique -L’option **Utiliser le fichier d’historique** indique, lorsqu’elle est cochée, que la base exploite un fichier d’historique. Son chemin d’accès est précisé au-dessous de l’option. Lorsque cette option est cochée, il n’est pas possible d’ouvrir la base sans fichier d’historique. +L’option **Utiliser le fichier d’historique** indique, lorsqu’elle est cochée, que l'application exploite un fichier d’historique. Son chemin d’accès est précisé au-dessous de l’option. Lorsque cette option est cochée, il n’est pas possible d’ouvrir l'application sans fichier d’historique. -Par défaut, toute base créée avec 4D utilise un fichier d’historique (option cochée dans la **Page Général** des **Préférences** de 4D). Le fichier d’historique est nommé par défaut *data.journal* et est placé dans le dossier Data. +Par défaut, tout projet créé avec 4D utilise un fichier d’historique (option cochée dans la **Page Général** des **Préférences** de 4D). Le fichier d’historique est nommé par défaut *data.journal* et est placé dans le dossier Data. + +> L’activation d’un nouveau fichier d’historique nécessite que les données de l'application soient préalablement sauvegardées. Lorsque vous cochez cette option, un message vous informe qu’une sauvegarde est nécessaire. La création du fichier d’historique est différée et ne sera effective qu’après la prochaine sauvegarde de l'application. -> L’activation d’un nouveau fichier d’historique nécessite que les données de la base soient auparavant sauvegardées. Lorsque vous cochez cette option, un message vous informe qu’une sauvegarde est nécessaire. La création du fichier d’historique est différée et ne sera effective qu’après la prochaine sauvegarde de la base. ## Sauvegarde et restitution @@ -79,49 +85,45 @@ La modification des options de sauvegarde et de restauration est facultative. Le ### Paramètres généraux - **Conserver uniquement les N derniers fichiers de sauvegarde** : ce paramètre permet d’activer et de configurer le mécanisme de suppression des fichiers de sauvegarde les plus anciens, afin d’éviter tout risque de saturation du volume. Le principe de fonctionnement est le suivant : après avoir terminé la sauvegarde courante, 4D efface l’archive la plus ancienne si celle-ci est localisée au même endroit que l’archive à sauvegarder et porte le même nom (vous pouvez, pour des raisons d’économie de place, demander que l’archive la plus ancienne soit effacée avant la sauvegarde). Si, par exemple, le nombre de jeux est fixé à 3, les trois premières sauvegardes créent successivement les archives MaBase-0001, MaBase-0002 et MaBase-0003. Lors de la quatrième sauvegarde, l’archive MaBase-0004 est créée alors que l’archive MaBase-0001 est supprimée. Par défaut, le mécanisme de suppression des jeux est activé et 4D conserve 3 jeux de sauvegarde. Pour ne pas activer le mécanisme, désélectionnez l’option. - - > Ce paramètre concerne à la fois les jeux de sauvegarde de la base et les jeux de sauvegarde de l’historique. +> Ce paramètre concerne à la fois les sauvegardes de l'application et les sauvegardes de l’historique. -- **Sauvegarder uniquement si le fichier de données a été modifié** : lorsque cette option est cochée, 4D déclenche les sauvegardes périodiques uniquement si des données ont été ajoutées, modifiées ou supprimées dans la base depuis la dernière sauvegarde. Dans le cas contraire, la sauvegarde prévue est annulée et reportée à l’échéance suivante. Aucune erreur n’est générée ; le report est toutefois indiqué dans le Journal des sauvegardes. Cette option permet notamment d’économiser du temps machine sur la sauvegarde de bases principalement utilisées en consultation. A noter qu'elle ne prend pas en compte les éventuelles modifications apportées au fichier de structure ou aux fichiers joints. - - > Ce paramètre concerne à la fois les jeux de sauvegarde de la base et les jeux de sauvegarde de l’historique. +- **Sauvegarder uniquement si le fichier de données a été modifié** : lorsque cette option est cochée, 4D déclenche les sauvegardes périodiques uniquement si des données ont été ajoutées, modifiées ou supprimées depuis la dernière sauvegarde. Dans le cas contraire, la sauvegarde prévue est annulée et reportée à l’échéance suivante. Aucune erreur n’est générée ; le report est toutefois indiqué dans le Journal des sauvegardes. Cette option permet notamment d’économiser du temps machine sur la sauvegarde d'applications principalement utilisées en consultation. A noter qu'elle ne prend pas en compte les éventuelles modifications apportées au fichier de structure ou aux fichiers joints. +> Ce paramètre concerne à la fois les sauvegardes de l'application et les sauvegardes de l’historique. - **Effacer la sauvegarde la plus ancienne avant sauvegarde / après sauvegarde** : cette option n’est utilisée que si l’option “Conserver uniquement les N derniers fichiers de sauvegarde†est cochée. Elle vous permet de spécifier si 4D doit commencer par effacer l’archive la plus ancienne avant d’effectuer une sauvegarde (option **avant**) ou si l’effacement doit être effectué après la sauvegarde (option **après**). Pour que ce mécanisme fonctionne, l’archive la plus ancienne ne doit pas avoir été renommée ou déplacée. - **Si la sauvegarde échoue** : cette option permet de définir le mécanisme de prise en charge des échecs des sauvegardes (sauvegarde impossible). Lorsqu’une sauvegarde est impossible, 4D permet d’effectuer une nouvelle tentative. - - - **Réessayer à la nouvelle date et heure programmée** : cette option n’a de sens que dans le cadre de sauvegardes automatiques périodiques. Elle revient à annuler la sauvegarde ayant échoué. Une erreur est générée. + - **Réessayer à la nouvelle date et heure programmée** : cette option n’a de sens que dans le cadre de sauvegardes automatiques périodiques. Elle revient à annuler la sauvegarde ayant échoué. Une erreur est générée. - **Réessayer dans N seconde(s), minute(s) ou heure(s)** : lorsque cette option est cochée, une nouvelle tentative de sauvegarde est effectuée à l’issue du délai défini. Ce mécanisme permet d’anticiper certaines circonstances bloquant la sauvegarde. Vous pouvez fixer un délai en secondes, minutes ou heures à l’aide du menu correspondant. Si la nouvelle tentative échoue également, une erreur est générée et l’échec est inscrit dans les zones de statut de la dernière sauvegarde et dans le Journal des sauvegardes. - **Annuler l’opération au bout de N tentatives** : ce paramètre permet de définir le nombre de fois que le module de sauvegarde réessaiera de lancer la sauvegarde en cas d’échec. Si, à l’issue du nombre d’essais défini, la sauvegarde n’a pas pu être effectuée, elle est annulée et l’erreur 1401 est générée (“Le nombre maximal de tentatives de sauvegarde est atteint, la sauvegarde automatique est temporairement désactivéeâ€). Dans ce cas, aucune nouvelle sauvegarde automatique ne sera lancée tant que l’application n’aura pas été redémarrée ou qu’une sauvegarde manuelle n’aura été effectuée avec succès. Ce paramètre est utile notamment pour éviter qu’en cas d’impossibilité prolongée de la sauvegarde (nécessitant une intervention humaine), l’application n’effectue inutilement de nombreuses tentatives au détriment de ses performances. Par défaut, ce paramètre n’est pas coché. -> 4D considère qu’une sauvegarde a échoué si la base n’était pas lancée au moment théorique de la sauvegarde automatique périodique. +> 4D considère qu’une sauvegarde a échoué si l'application n’était pas lancée au moment théorique de la sauvegarde automatique périodique. ### Archive - Ces options s’appliquent aux fichiers de sauvegarde principaux et aux fichiers de sauvegarde de l’historique. -- **Taille du segment (Mo)** 4D vous permet de segmenter les archives, c’est-à-dire de les découper en morceaux de taille fixe. Ce fonctionnement permet par exemple de stocker une sauvegarde sur plusieurs volumes (DVDs, usb, etc.). Au moment de la restitution, 4D fusionnera automatiquement les segments. Chaque segment est appelé MaBase[xxxx-yyyy].4BK, où xxxx représente le numéro de la sauvegarde et yyyy celui du segment. Par exemple, les trois segments de la sixième sauvegarde de la base MaBase seront appelés MaBase[0006-0001].4BK, MaBase[0006-0002].4BK et MaBase[0006-0003].4BK. Le menu **Taille du segment** est une combo box permettant de définir la taille en Mo de chaque segment de sauvegarde. Vous pouvez choisir une des tailles prédéfinies ou saisir une taille spécifique entre 0 et 2048. Si vous passez 0, aucune segmentation n’est effectuée (équivaut à la valeur **Aucune**). +- **Taille du segment (Mo)** 4D vous permet de segmenter les archives, c’est-à-dire de les découper en morceaux de taille fixe. Ce fonctionnement permet par exemple de stocker une sauvegarde sur plusieurs volumes (DVDs, usb, etc.). Au moment de la restitution, 4D fusionnera automatiquement les segments. Chaque segment est appelé MonApplication[xxxx-yyyy].4BK, où xxxx représente le numéro de la sauvegarde et yyyy celui du segment. Par exemple, les trois segments de la sixième sauvegarde de la base MonApplication seront appelés MonApplication[0006-0001].4BK, MonApplication[0006-0002].4BK et MonApplication[0006-0003].4BK. Le menu **Taille du segment** est une combo box permettant de définir la taille en Mo de chaque segment de sauvegarde. Vous pouvez choisir une des tailles prédéfinies ou saisir une taille spécifique entre 0 et 2048. Si vous passez 0, aucune segmentation n’est effectuée (équivaut à la valeur **Aucune**). - **Taux de compression** Par défaut, les sauvegardes sont compressées par 4D. En contrepartie, la phase de compression des fichiers peut ralentir sensiblement les sauvegardes dans le cas de la manipulation de gros volumes de données. L’option **Taux de compression** vous permet d’ajuster la compression : - - **Aucun** : aucune compression n’est appliquée. La sauvegarde peut être sensiblement plus rapide mais les fichiers d’archives sont plus volumineux sur le disque. - **Normal** (par défaut) : cette option constitue un compromis vitesse de sauvegarde/taille des archives. -- **Elevé** : le taux de compression maximal est appliqué aux archives. Les fichiers d’archives prennent le moins de place possible sur le disque mais la sauvegarde peut être sensiblement ralentie. + - **Elevé** : le taux de compression maximal est appliqué aux archives. Les fichiers d’archives prennent le moins de place possible sur le disque mais la sauvegarde peut être sensiblement ralentie. - **Taux d’entrelacement et Taux de redondance** 4D peut générer des archives à l’aide d’algorithmes spécifiques, basés sur des mécanismes d’optimisation (entrelacement) et de sécurisation (redondance). Vous pouvez paramétrer ces mécanismes en fonction de vos besoins. Les menus associés à ces options vous permettent de choisir un taux **Faible**, **Moyen**, **Elevé** ou **Aucun** (défaut). - - **Taux d’entrelacement** : l’entrelacement consiste à stocker les données dans des secteurs non contigus afin de limiter les risques en cas d’endommagement des secteurs. Plus le taux est élevé, plus la sécurité est élevée ; en contrepartie, le traitement des données consomme davantage de mémoire. - **Taux de redondance** : la redondance permet de sécuriser les données présentes dans un fichier en répétant plusieurs fois les mêmes informations. Plus le taux est élevé, plus le fichier est sécurisé, mais plus le stockage est lent et la taille du fichier importante. + ### Restitution automatique -- **Restituer la dernière sauvegarde si la base est endommagée** : lorsque cette option est cochée, le programme déclenche automatiquement la restitution du fichier de données de la dernière sauvegarde valide de la base s’il détecte une anomalie (fichier corrompu par exemple) lors du lancement de la base. Aucune intervention de l’utilisateur n’est requise ; l’opération est cependant consignée dans le Journal des sauvegardes. - - > En cas de restitution automatique, seul le fichier de données est restitué. Si vous souhaitez récupérer les fichiers joints ou le fichier de structure, vous devez effectuer une restitution manuelle. +- **Restituer la dernière sauvegarde si la base est endommagée** : lorsque cette option est cochée, le programme déclenche automatiquement la restitution du fichier de données de la dernière sauvegarde valide de l'application s’il détecte une anomalie (fichier corrompu par exemple) lors du lancement de l'application. Aucune intervention de l’utilisateur n’est requise ; l’opération est cependant consignée dans le Journal des sauvegardes. + +- **Intégrer le dernier historique si la base est incomplète** : lorsque cette option est cochée, le programme intègre automatiquement l’historique lors de l’ouverture ou de la restitution de l'application. + - Lors de l’ouverture d'une application, l’historique courant est automatiquement intégré si 4D détecte que des opérations stockées dans l’historique ne sont pas présentes dans les données. Cette situation se produit par exemple lorsqu’une panne de courant a lieu alors que des opérations non encore écrites sur le disque se trouvaient dans le cache de données. + - Lors de la restitution de l'application, si le fichier d’historique courant ou un fichier de sauvegarde d’historique ayant le même numéro que le fichier de sauvegarde est stocké dans le même dossier, 4D examine son contenu. S’il contient des opérations non présentes dans le fichier de données, le programme l’intègre automatiquement. -- **Intégrer le dernier historique si la base est incomplète** : lorsque cette option est cochée, le programme intègre automatiquement l’historique lors de l’ouverture ou de la restitution de la base de données. - - - Lors de l’ouverture de la base, l’historique courant est automatiquement intégré si 4D détecte que des opérations stockées dans l’historique ne sont pas présentes dans les données. Cette situation se produit par exemple lorsqu’une panne de courant a lieu alors que des opérations non encore écrites sur le disque se trouvaient dans le cache de données. - - Lors de la restitution de la base, si le fichier d’historique courant ou un fichier de sauvegarde d’historique ayant le même numéro que le fichier de sauvegarde est stocké dans le même dossier, 4D examine son contenu. S’il contient des opérations non présentes dans le fichier de données, le programme l’intègre automatiquement. +Aucune boîte de dialogue n’est présentée à l’utilisateur, l’opération est entièrement automatique. Le but est de faciliter au maximum la remise en route de l’exploitation. L’opération est consignée dans le Journal des sauvegardes. -Aucune boîte de dialogue n’est présentée à l’utilisateur, l’opération est entièrement automatique. Le but est de faciliter au maximum la remise en route de l’exploitation. L’opération est consignée dans le Journal des sauvegardes. \ No newline at end of file +> Dans le cas d'une restauration automatique, seuls les éléments suivants sont restaurés: - fichier .4DD - fichier .4DIndx - fichier .4DSyncData - fichier .4DSyncHeader - dossier External Data +> +> Si vous souhaitez obtenir les fichiers joints ou les fichiers de projet, vous devez effectuer une [restauration manuelle](restore.md#manually-restoring-a-backup-standard-dialog). diff --git a/website/translated_docs/fr/Concepts/about.md b/website/translated_docs/fr/Concepts/about.md index 14631cf17e4440..ca317b8b3f399f 100644 --- a/website/translated_docs/fr/Concepts/about.md +++ b/website/translated_docs/fr/Concepts/about.md @@ -3,21 +3,22 @@ id: about title: À propos du Langage 4D --- -Grâce à son langage 4D intégré, qui comprend plus de 1300 commandes, 4D est un outil de développement puissant. Ce langage peut être utilisé pour effectuer plusieurs types de tâches allant de la réalisation de simples calculs à la création d’interfaces utilisateur personnalisées et complexes. Vous pouvez par exemple : +Grâce à son langage 4D intégré, qui comprend plus de 1300 commandes, 4D est un outil de développement puissant pour les applications web, mobile ou desktop. Ce langage peut être utilisé pour effectuer plusieurs types de tâches allant de la réalisation de simples calculs à la création d’interfaces utilisateur personnalisées et complexes. Vous pouvez par exemple : - Accéder par programmation à tous les éditeurs de gestion des enregistrements (tris, recherches, etc.), - Créer et imprimer des états et des étiquettes complexes avec les données de la base, - Communiquer avec d’autres systèmes d’information, -- Envoyer des e-mails, +- Envoyer des e-mails, - Gérer des documents et des pages web, -- Importer et exporter des données entre des bases 4D et d’autres applications, +- Importer et exporter des données entre des applications 4D et d’autres applications, - Incorporer des procédures écrites dans d’autres langages que celui de 4D. -La flexibilité et la puissance du langage de 4D en font l’outil idéal pour exécuter toute une gamme de fonctions de gestion de l’information. Les utilisateurs novices peuvent exécuter des calculs rapidement, les utilisateurs plus expérimentés peuvent personnaliser leurs bases sans connaissances préalables en programmation et les développeurs chevronnés peuvent utiliser ce langage puissant pour ajouter à leurs bases de données des fonctions sophistiquées, allant jusqu'au transfert de fichiers, aux communications et au suivi. Quant aux développeurs ayant une maîtrise de la programmation dans d’autres langages, ils peuvent ajouter leurs propres commandes au langage de 4D. +La flexibilité et la puissance du langage de 4D en font l’outil idéal pour exécuter toute une gamme de fonctions de gestion de l’information. Les utilisateurs novices peuvent exécuter des calculs rapidement, les utilisateurs plus expérimentés peuvent personnaliser leurs applications sans connaissances préalables en programmation et les développeurs chevronnés peuvent utiliser ce langage puissant pour ajouter à leurs applications des fonctions sophistiquées, allant jusqu'au transfert de fichiers, aux communications et au suivi. Quant aux développeurs ayant une maîtrise de la programmation dans d’autres langages, ils peuvent ajouter leurs propres commandes au langage de 4D. + ## Qu'est-ce qu'un langage ? -Le langage de 4D n’est pas très différent de celui que nous utilisons tous les jours. C’est une forme de communication qui permet d'exprimer des idées, d'informer ou de donner des instructions. Tout comme un langage parlé, celui de 4D se compose d'un vocabulaire, d’une grammaire et d’une syntaxe, que vous employez pour indiquer au programme comment gérer votre base et vos données. +Le langage de 4D n’est pas très différent de celui que nous utilisons tous les jours. C’est une forme de communication qui permet d'exprimer des idées, d'informer ou de donner des instructions. Tout comme un langage parlé, celui de 4D se compose d'un vocabulaire, d’une grammaire et d’une syntaxe, que vous employez pour indiquer au programme comment gérer votre application et vos données. Il n’est pas nécessaire de connaître entièrement le langage. Pour pouvoir vous exprimer en anglais, vous n’êtes pas obligé de connaître la totalité de la langue anglaise ; en réalité, un peu de vocabulaire suffit. Il en va de même pour 4D — il vous suffit de connaître un minimum du langage pour être productif, et vous en apprendrez de plus en plus au fur et à mesure de vos besoins. @@ -31,16 +32,16 @@ Alors, pourquoi avons-nous besoin d'un langage 4D ? Voici quelques-uns de ses pr - Contrôler l’interface utilisateur : vous pouvez gérer les fenêtres et les menus, contrôler les formulaires et les objets d’interface. - Gérer les données de manière très fine : cette gestion inclut le traitement de transactions, les systèmes de validation complexes, la gestion multi-utilisateurs, l’utilisation des ensembles et des sélections temporaires. - Contrôler l’ordinateur : vous pouvez contrôler les communications par le port série, la gestion des documents et des erreurs. -- Créer des applications : vous pouvez créer des bases de données personnalisées, faciles à utiliser, en mode Application. +- Créer des applications : vous pouvez créer des applications simples, personnalisées et autonomes. - Ajouter des fonctionnalités au serveur Web 4D intégré : par exemple, vous pouvez créer et mettre à jour des pages web dynamiques contenant vos données. -Le langage vous permet de contrôler totalement la structure et le fonctionnement de votre base de données. 4D propose de puissants éditeurs “génériquesâ€, mais le langage vous offre la possibilité de personnaliser votre base de données autant que vous voulez. +Le langage vous permet de contrôler totalement la structure et le fonctionnement de votre application. 4D propose de puissants éditeurs “génériquesâ€, mais le langage vous offre la possibilité de personnaliser votre application autant que vous voulez. ## Prendre le contrôle de vos données -Le langage de 4D vous permet de prendre le contrôle total de vos données, d’une manière à la fois puissante et élégante. Il reste d’un abord facile pour un débutant, et est suffisamment riche pour un développeur d’applications. Il permet de passer par étapes d’une simple exploitation des fonctions intégrées de 4D à une base entièrement personnalisée. +Le langage de 4D vous permet de prendre le contrôle total de vos données, d’une manière à la fois puissante et élégante. Il reste d’un abord facile pour un débutant, et est suffisamment riche pour un développeur d’applications. Il permet de passer par étapes d’une simple exploitation des fonctions intégrées de 4D à une application entièrement personnalisée. -Les commandes du langage de 4D vous donnent la possibilité d’accéder aux éditeurs standard de gestion des enregistrements. Par exemple, lorsque vous utilisez la commande QUERY, vous accédez à l’Editeur de quêtes (accessible en mode Développement via la commande Chercher... dans le menu Enregistrements). Vous pouvez, si vous le voulez, indiquer explicitement à la commande Query ce qu’elle doit rechercher. Par exemple, QUERY([People];[People]Last Name="Dupont") trouvera toutes les personnes nommées Dupont dans votre base. +Les commandes du langage de 4D vous donnent la possibilité d’accéder aux éditeurs standard de gestion des enregistrements. Par exemple, lorsque vous utilisez la commande `QUERY`, vous accédez à l’Editeur de quêtes (accessible en mode Développement via la commande Chercher... dans le menu Enregistrements). Vous pouvez, si vous le voulez, indiquer explicitement à la commande Query ce qu’elle doit rechercher. Par exemple, `QUERY([People];[People]Last Name="Dupont")` trouvera toutes les personnes nommées Dupont dans votre base. Le langage 4D est très puissant — une commande remplace souvent des centaines, voire des milliers de lignes de code écrites dans les langages informatiques traditionnels. Et cette puissance s’accompagne d'une réelle simplicité : les commandes sont écrites en français. Par exemple, vous utilisez la commande `QUERY` pour effectuer une recherche ; pour ajouter un nouvel enregistrement, vous appelez la commande `ADD RECORD`. @@ -54,8 +55,8 @@ Si vous êtes familier avec les langages informatiques traditionnels, ce paragra Le langage 4D n’est pas un langage informatique traditionnel. C’est un des langages les plus souples et les plus innovants que l’on puisse trouver aujourd’hui sur micro-ordinateur. Le langage a été conçu pour s’adapter à vous, et non l’inverse. -Pour utiliser les langages traditionnels, vous devez avant tout réaliser des maquettes détaillées. C’est même l'une des principales phases d’un développement. 4D vous permet de commencer à utiliser le langage à tout moment et dans n’importe quelle partie de votre base. Vous pouvez commencer par ajouter une méthode objet dans un formulaire, puis plus tard une ou deux méthodes formulaires. Comme votre base devient plus sophistiquée, vous pouvez ajouter une méthode projet contrôlée par un menu. Vous êtes totalement libre d’utiliser une petite partie du langage ou une partie plus étendue. Ce n’est pas “tout ou rienâ€, comme c’est le cas dans beaucoup d’autres bases de données. +Pour utiliser les langages traditionnels, vous devez avant tout réaliser des maquettes détaillées. C’est même l'une des principales phases d’un développement. 4D vous permet de commencer à utiliser le langage à tout moment et dans n’importe quelle partie de votre projet. Vous pouvez commencer par ajouter une méthode objet dans un formulaire, puis plus tard une ou deux méthodes formulaires. Comme votre projet devient plus sophistiquée, vous pouvez ajouter une méthode projet contrôlée par un menu. Vous êtes totalement libre d’utiliser une petite partie du langage ou une partie plus étendue. Ce n’est pas “tout ou rienâ€, comme c’est le cas dans beaucoup d’autres bases de données. -Les langages traditionnels vous obligent à définir et à pré-déclarer vos objets sous une forme syntaxique rigide. Dans 4D, vous créez simplement un objet, comme un bouton, et vous l’utilisez. 4D gère automatiquement l’objet pour vous. Par exemple, pour utiliser un bouton, il suffit de le dessiner dans un formulaire et de lui donner un nom. Lorsque l’utilisateur clique sur le bouton, le langage déclenche automatiquement vos méthodes. +Les langages traditionnels vous obligent à définir et à pré-déclarer vos objets d'interface sous une forme syntaxique rigide. Dans 4D, créez simplement un objet, tel qu'un bouton, et utilisez-le. 4D se charge de la gestion de l'objet. Par exemple, pour utiliser un bouton, il suffit de le dessiner dans un formulaire et de lui donner un nom. Lorsque l’utilisateur clique sur le bouton, le langage déclenche automatiquement vos méthodes. Les langages traditionnels sont souvent rigides et inflexibles, et exigent que les commandes soient saisies dans un style très formel et contraignant. Le langage de 4D rompt avec la tradition, au grand bénéfice de l’utilisateur. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/arrays.md b/website/translated_docs/fr/Concepts/arrays.md index 5e2d5d69b00500..beefd66c8ef427 100644 --- a/website/translated_docs/fr/Concepts/arrays.md +++ b/website/translated_docs/fr/Concepts/arrays.md @@ -7,6 +7,7 @@ Un **tableau** est une série ordonnée de **variables** de même type. Chaque v > Généralement, il est recommandé d'utiliser des **collections** plutôt que des **tableaux**. Les collections sont plus souples et fournissent un large éventail de méthodes spécifiques. Pour plus d'informations, veuillez consutler la section [Collection](Concepts/dt_collection.md). + ## Créer des tableaux Vous créez un tableau au moyen de l'une des commandes de déclaration du thème "Tableaux". Chaque commande de déclaration de tableau peut créer ou redimensionner des tableaux à une ou à deux dimensions. Pour plus d'informations sur les tableaux à deux dimensions, reportez-vous à la section [Tableaux à deux dimensions](#two-dimensional-arrays). @@ -18,20 +19,18 @@ Cette ligne de code crée (déclare) un tableau d'entiers de 10 éléments : ``` Ensuite, cette ligne de code redimensionne le même tableau à 20 éléments : - ```4d ARRAY INTEGER(aiAnArray;20) ``` Enfin, cette ligne de code redimensionne le même tableau à 0 élément : - ```4d ARRAY INTEGER(aiAnArray;0) ``` ## Affecter des valeurs dans un tableau -Vous référencez les éléments d'un tableau en utilisant des accolades ({…} ). Un nombre entre accolades donne accès à l'adresse d'un élément particulier. Ce nombre est appelé numéro de l'élément. L'exemple ci-dessous place cinq noms dans le tableau nommé atNoms et les affiche ensuite dans une fenêtre d'alerte : +Vous référencez les éléments d'un tableau en utilisant des accolades ({…} ). Un nombre entre accolades donne accès à l'adresse d'un élément particulier. L'exemple ci-dessous place cinq noms dans le tableau nommé atNoms et les affiche ensuite dans une fenêtre d'alerte : ```4d ARRAY TEXT(atNames;5) @@ -44,48 +43,49 @@ Vous référencez les éléments d'un tableau en utilisant des accolades ({…} ALERT("The element #"+String($vlElem)+" is equal to: "+atNames{$vlElem}) End for ``` - Notez la syntaxe atNoms{$vlElem}. Au lieu de spécifier un nombre littéral comme atNoms{3}, vous pouvez utiliser une variable numérique indiquant à quel élément d'un tableau vous accédez. Si vous utilisez les itérations permises par les structures répétitives (`For...End for`, `Repeat...Until` or `While...End while`), vous pouvez accéder à tout ou partie des éléments d'un tableau avec très peu de code. **Important :** Veillez à ne pas confondre l'opérateur d'affectation (:=) avec l'opérateur de comparaison égal (=). L'affectation et la comparaison sont deux opérations totalement différentes. -### Affecter un tableau à un autre +### Affecter un tableau à un autre Contrairement à ce que vous pouvez faire avec des variables de type Texte ou Chaîne, vous ne pouvez pas affecter un tableau à un autre tableau. Pour copier (affecter) un tableau à un autre, utilisez la fonction `COPY ARRAY`. + ## Utiliser l'élément zéro d'un tableau Un tableau a toujours un élément zéro. Même si l'élément zéro n'est pas affiché lorsqu'un tableau est utilisé pour remplir un objet de formulaire, vous pouvez l'utiliser sans réserve(*) dans le langage. -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: +Voici un autre exemple : vous souhaitez initialiser un objet de formulaire avec une valeur texte mais sans définir de valeur par défaut. Vous pouvez utiliser l'élément zéro du tableau : ```4d - // method for a combo box or drop-down list - // bound to atName variable array + // // méthode pour une combo box ou une liste déroulante + // liée au tableau de variables atName Case of - :(Form event code=On Load) - // Initialize the array (as shown further above) - // But use the element zero + : Form event code=On Load) + // Initialise le tableau (comme indiqué ci-dessus) + // Mais utilise l'élément zéro ARRAY TEXT(atName;5) - atName{0}:=Please select an item" + atName{0}:=Veuillez sélectionner un élément" atName{1}:="Text1" atName{2}:="Text2" atName{3}:="Text3" atName{4}:="Text4" atName{5}:="Text5" - // Position the array to element 0 - atName:=0 + // Positionne le tableau sur l'élément 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. + ## Tableaux à deux dimensions Chaque commande de déclaration de tableau permet de créer ou de redimensionner des tableaux à une ou à deux dimensions. Exemple : ```4d -

      ARRAY TEXT(atTopics;100;50) // Créer un tableau texte composé de 100 lignes de 50 colonnes + ARRAY TEXT(atTopics;100;50) // Créer un tableau texte composé de 100 lignes de 50 colonnes ``` Les tableaux à deux dimensions sont essentiellement des objets de langage ; vous ne pouvez ni les afficher ni les imprimer. @@ -95,8 +95,8 @@ Dans l'exemple prédédent : - atTopics est un tableau à deux dimensions - atTopics{8}{5} est le 5e élément (5e colonne...) de la 8e ligne - atTopics{20} est la 20e ligne et est elle-même un tableau à une dimension -- `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 +- `Size of array(atTopics)` retourne 100, qui est le nombre de lignes +- `Size of array(atTopics{17})` retourne 50, qui est le nombre de colonnes de la 17e ligne Dans l'exemple suivant, un pointeur vers chaque champ de chaque table de la base est stocké dans un tableau à deux dimensions : @@ -174,7 +174,6 @@ Cependant, dans certaines circonstances, vous pouvez avoir besoin de tableaux co | Heure | (1+nombre d'éléments) * 4 | | Deux dimensions | (1+nombre d'éléments) * 16 + somme de la taille de chaque tableau | - **Notes :** - La taille d'un texte en mémoire se calcule par la formule ((Longueur + 1) * 2) diff --git a/website/translated_docs/fr/Concepts/cf_branching.md b/website/translated_docs/fr/Concepts/cf_branching.md index 9dad1670d31e1d..ca8de295448787 100644 --- a/website/translated_docs/fr/Concepts/cf_branching.md +++ b/website/translated_docs/fr/Concepts/cf_branching.md @@ -3,6 +3,9 @@ id: branching title: Structures conditionnelles --- +Une structure de branchement permet aux méthodes de tester une condition et d'emprunter des chemins alternatifs, en fonction du résultat. + + ## If...Else...End if La syntaxe de la structure conditionnelle `If...Else...End if` est la suivante : @@ -16,7 +19,6 @@ End if ``` A noter que l'élément `Else` est optionnel, vous pouvez écrire : - ```4d If(Boolean_Expression) instruction(s) @@ -33,7 +35,7 @@ A noter que l'expression booléenne est toujours évaluée en totalité. Examino End if ``` -L'expression n'est TRUE que si les deux méthodes sont TRUE. Or, même si *MethodA* retourne FALSE, 4D évaluera quand même *MethodB*, ce qui représente une perte de temps inutile. Dans ce cas, il est préférable d'utiliser une structure du type : +L'expression n'est TRUE que si les deux méthodes sont TRUE. Or, même si _MethodA_ retourne FALSE, 4D évaluera quand même _MethodB_, ce qui représente une perte de temps inutile. Dans ce cas, il est préférable d'utiliser une structure du type : ```4d If(MethodA) @@ -43,7 +45,7 @@ L'expression n'est TRUE que si les deux méthodes sont TRUE. Or, même si *Metho End if ``` -Le résultat est équivalent et *MethodB* n'est évaluée que si nécessaire. +Le résultat est équivalent et _MethodB_ n'est évaluée que si nécessaire. ### Exemple @@ -54,6 +56,7 @@ Le résultat est équivalent et *MethodB* n'est évaluée que si nécessaire. QUERY([People];[People]LastName=$Find) Else ALERT("You did not enter a name.") + End if End if ``` @@ -65,7 +68,6 @@ Le résultat est équivalent et *MethodB* n'est évaluée que si nécessaire. instruction(s) End if ``` - ou : ```4d @@ -78,7 +80,6 @@ ou : ## Au cas ou...Sinon...Fin de cas La syntaxe de la structure conditionnelle `Case of...Else...End case` est la suivante : - ```4d Case of :(Expression_booléenne) @@ -97,7 +98,6 @@ La syntaxe de la structure conditionnelle `Case of...Else...End case` est la sui ``` A noter que l'élément `Else` est optionnel, vous pouvez écrire : - ```4d Case of :(Expression_booléenne) @@ -112,7 +112,6 @@ A noter que l'élément `Else` est optionnel, vous pouvez écrire : instruction(s) End case ``` - Tout comme la structure `If...Else...End if`, la structure `Case of...Else...End case` permet également à votre méthode de choisir parmi plusieurs séquences d’instructions. A la différence de la structure `If...Else...End`, la structure `Case of...Else...End case` peut tester un nombre illimité d’expressions booléennes et exécuter la séquence d’instructions correspondant à la valeur TRUE. Chaque expression booléenne débute par le caractère deux points (`:`). La combinaison de deux points et d’une expression booléenne est appelée un cas. Par exemple, la ligne suivante est un cas : @@ -131,30 +130,31 @@ Cet exemple teste une variable numérique et affiche une boîte de dialogue d’ ```4d Case of - :(vResult=1) // Teste si le numéro est 1 - ALERT("One.") // Si c’est 1, afficher une alerte - :(vResult=2) // Teste si le numéro est 2 - ALERT("Two.") // Si c’est 2, afficher une alerte - :(vResult=3) // Teste si le numéro est 3 - ALERT("Three.") // Si c’est 3, afficher une alerte - Else // Si ce n’est ni 1 ni 2 ni 3, afficher une alerte + :(vResult=1) //Tester si le chiffre est 1 + ALERT("One.") //Si le chiffre est 1, afficher une alerte + :(vResult=2) //Tester si le chiffre est 2 + ALERT("Two.") //Si le chiffre est 2, afficher une alerte + :(vResult=3) //Tester si le chiffre est 3 + ALERT("Three.") //Si le chiffre est 3, afficher une alerte + Else //Si le chiffre n'est pas 1, 2 ou 3, afficher une alerte ALERT("It was not one, two, or three.") + //déclaration(s) End case ``` A titre de comparaison, voici la version avec `If...Else...End if` de la même méthode : ```4d - If(vResult=1) //Teste si le numéro est 1 - ALERT("One.") //Si c’est 1, afficher une alerte + If(vResult=1) //Tester si le chiffre est 1 + ALERT("One.") //Si le chiffre est 1, afficher une alerte Else - If(vResult=2) //Test si le numéro est 2 - ALERT("Two.") //Si c’est 2, afficher une alerte + If(vResult=2) //Tester si le chiffre est 2 + ALERT("Two.") //Si le chiffre est 2, afficher une alerte Else - If(vResult=3) //Teste si le numéro est 3 - ALERT("Three.") //Si c’est 3, afficher une alerte - Else //Si ce n’est ni 1, 2 ni 3, afficher l’alerte - ALERT("It was not one, two, or three.") + If(vResult=3) //Tester si le chiffre est 3 + ALERT("Three.") //Si le chiffre est 3, afficher une alerte + Else //Si le chiffre n'est pas 1, 2 ou 3, afficher une alerte + ALERT("It was not one, two, or three.") End if End if End if @@ -162,37 +162,46 @@ A titre de comparaison, voici la version avec `If...Else...End if` de la même m Rappelez-vous qu’avec une structure de type `Case of...Else...End case`, seul le premier cas TRUE rencontré est exécuté. Même si d’autres cas sont TRUE, seules les instructions suivant le premier cas TRUE seront prises en compte. -Par conséquent, lorsque vous testez dans la même méthode des cas simples et des cas complexes, vous devez placer les cas complexes avant les cas simples, sinon ils ne seront jamais exécutés. Par exemple, si vous souhaitez traiter le cas simple (vResult=1) et le cas complexe (vResult=1) & (vCondition#2) et que vous structurez la méthode de la manière suivante : +Par conséquent, lorsque vous testez dans la même méthode des cas simples et des cas complexes, vous devez placer les cas complexes avant les cas simples, sinon ils ne seront jamais exécutés. Par exemple, si vous souhaitez traiter le cas simple (vResult=1) et le cas complexe (vResult=1) & (vCondition#2) et que vous structurez la méthode de la manière suivante : ```4d Case of - :(vResult=1) - ... //instruction(s) - :((vResult=1) & (vCondition#2)) //Les instructions suivant ce cas ne seront jamais exécutées - ... //instruction(s) + :(vResult=1) //Tester si le chiffre est 1 + ALERT("One.") //Si le chiffre est 1, afficher une alerte + :(vResult=2) //Tester si le chiffre est 2 + ALERT("Two.") //Si le chiffre est 2, afficher une alerte + :(vResult=3) //Tester si le chiffre est 3 + ALERT("Three.") //Si le chiffre est 3, afficher une alerte + Else //Si le chiffre n'est pas 1, 2 ou 3, afficher une alerte + ALERT("It was not one, two, or three.") End case ``` ... les instructions associées au cas complexe ne seront jamais exécutées. En effet, pour que ce cas soit TRUE, ses deux conditions booléennes doivent l’être. Or, la première condition est celle du cas simple situé précédemment. Lorsqu'elle est TRUE, le cas simple est exécuté et 4D sort de la structure conditionnelle, sans évaluer le cas complexe. Pour que ce type de méthode fonctionne, vous devez écrire : ```4d - Case of - :((vResult=1) & (vCondition#2)) // Les cas complexes doivent toujours être placés en premier - ... //Instruction(s) - :(vResult=1) - ... //instruction(s) - End case + If(vResult=1) //Tester si le chiffre est 1 + ALERT("One.") //Si le chiffre est 1, afficher une alerte + Else + If(vResult=2) //Tester si le chiffre est 2 + ALERT("Two.") //Si le chiffre est 2, afficher une alerte + Else + If(vResult=3) //Tester si le chiffre est 3 + ALERT("Three.") //Si le chiffre est 3, afficher une alerte + Else //Si le chiffre n'est pas 1, 2 ou 3, afficher une alerte + ALERT("It was not one, two, or three.") + End if + End if + End if ``` - - **Astuce :** Il n'est pas obligatoire que des instructions soient exécutées dans toutes les alternatives. Lorsque vous développez un algorithme, ou lorsque vous poursuivez un but précis, rien ne vous empêche d'écrire : - ```4d Case of :(Expression_booléenne) :(Expression_booléenne) - ... + instruction(s) + ... :(Expression_booléenne) instruction(s) @@ -202,25 +211,23 @@ Par conséquent, lorsque vous testez dans la même méthode des cas simples et d ``` ou : - ```4d Case of :(Expression_booléenne) :(Expression_booléenne) - instruction(s) - ... + ... :(Expression_booléenne) - instruction(s) + instruction(s) Else + instruction(s) End case ``` ou : - ```4d Case of Else instruction(s) End case -``` \ No newline at end of file +``` diff --git a/website/translated_docs/fr/Concepts/cf_looping.md b/website/translated_docs/fr/Concepts/cf_looping.md index c20597fd7455e8..123f537859f7b3 100644 --- a/website/translated_docs/fr/Concepts/cf_looping.md +++ b/website/translated_docs/fr/Concepts/cf_looping.md @@ -3,22 +3,22 @@ id: looping title: Structures répétitives (ou "boucles") --- +Les structures en boucle répètent une séquence d'instructions jusqu'à ce qu'une condition soit remplie ou qu'un certain nombre de fois est atteint. + + ## While...End while La syntaxe de la structure répétitive (ou boucle) `While...End while` est la suivante : - ```4d While(Expression_booléenne) instruction(s) End while ``` - Une boucle `While...End while` exécute les instructions comprises entre `While` et `End while` aussi longtemps que l’expression booléenne est TRUE. Elle teste l’expression booléenne initiale et n’entre pas dans la boucle (et donc n'exécute aucune instruction) si l’expression est à FALSE. Il est utile d’initialiser la valeur testée dans l’expression booléenne juste avant d’entrer dans la boucle `While...End while`. Initialiser la valeur signifie lui affecter un contenu approprié, généralement pour que l’expression booléenne soit TRUE et que le programme entre dans la boucle. -La valeur de l'expression booléenne doit pouvoir être modifiée par un élément situé à l'intérieur de la boucle, sinon elle s'exécutera indéfiniment. La boucle suivante est sans fin car *NeverStop* est toujours TRUE : - +La valeur de l'expression booléenne doit pouvoir être modifiée par un élément situé à l'intérieur de la boucle, sinon elle s'exécutera indéfiniment. La boucle suivante est sans fin car _NeverStop_ est toujours TRUE : ```4d NeverStop:=True While(NeverStop) @@ -30,7 +30,7 @@ Si vous vous retrouvez dans une telle situation (où une méthode s'exécute de ### Exemple ```4d - CONFIRM("Add a new record?") // Est-ce que l'utilisateur veut ajouter un enregistrement? + CONFIRM("Add a new record?") //L'utilisateur souhaite-t-il ajouter un enregistrement ? //L'utilisateur souhaite-t-il ajouter un enregistrement ? While(OK=1) // Tant que l'utilisateur accepte ADD RECORD([aTable]) // Ajouter un nouvel enregistrement End while // Une boucle While se termine toujours par End while @@ -41,13 +41,11 @@ Dans cet exemple, la valeur de la variable système `OK` est définie par la com ## Repeat...Until La syntaxe de la structure répétitive (ou boucle) `Repeat...Until` est la suivante : - ```4d Repeat instruction(s) Until(Boolean_Expression) ``` - La boucle `Repeat...Until` est semblable à la boucle [While...End while](flow-control#whileend-while), à la différence qu’elle teste la valeur de l’expression booléenne après l’exécution de la boucle et non avant. Ainsi, la boucle est toujours exécutée au moins une fois, tandis que si l’expression booléenne est initialement à Faux, la boucle `While...End while` ne s’exécute pas du tout. L'autre particularité de la boucle `Repeat...Until` est qu’elle se poursuit jusqu’à ce que l’expression booléenne soit à TRUE. @@ -129,7 +127,7 @@ La structure `For...End for` est une boucle contrôlée par un compteur : End for ``` -La plupart des structures `For...End for` que vous écrirez dans vos bases ressembleront à celles présentées ci-dessus. +La plupart des structures `For...End for` que vous écrirez dans vos projets ressembleront à celles présentées ci-dessus. ### Décrémenter la variable Compteur @@ -189,10 +187,10 @@ Si vous le souhaitez, vous pouvez passer dans *Increment_Expression* une valeur End for ``` + ### Comparaison des structures répétitives Revenons au premier exemple `For...End for`. La boucle suivante s'exécute 100 fois : - ```4d For(vCounter;1;100) //Faire quelque chose @@ -200,7 +198,6 @@ Revenons au premier exemple `For...End for`. La boucle suivante s'exécute 100 f ``` Il est intéressant d'examiner la manière dont les boucles `While...End while` et `Repeat...Until` effectuent la même action. Voici la boucle `While...End while` équivalente : - ```4d $i :=1 // Initialisation du compteur While ($i<=100) // Boucle 100 fois @@ -210,7 +207,6 @@ While ($i<=100) // Boucle 100 fois ``` Voici la boucle `Repeat...Until` équivalente : - ```4d $i :=1 // Initialisation du compteur Repeat @@ -218,7 +214,6 @@ Voici la boucle `Repeat...Until` équivalente : $i :=$i +1 // Il faut incrémenter le compteur Until($i=100) // Boucle 100 fois ``` - **Astuce :** La boucle `For...End for` est généralement plus rapide que les boucles `While...End while` et `Repeat...Until` car 4D teste la condition en interne pour chaque cycle de la boucle et incrémente lui-même le compteur. Par conséquent, nous vous conseillons de préférer à chaque fois que c'est possible la structure `For...End for`. ### Optimiser l'exécution de For...End for @@ -300,30 +295,28 @@ Le tableau suivant compare les trois types de `Pour chaque...Fin de chaque` : | Nombre de boucles (par défaut) | Nombre d'éléments de la collection | Nombre d'entités dans la sélection | Nombre de propriétés d'objets | | Prise en charge de Paramètres début / fin | Oui | Oui | Non | - - Le nombre de boucles est évalué au démarrage et ne changera pas en cours de traitement. L'ajout ou la suppression d'éléments pendant la boucle est donc déconseillé car il pourra en résulter une redondance ou un manque d'itérations. -- Par défaut, les *instructions* incluses sont exécutées pour chaque valeur de *Expression*. Il est toutefois possible de sortir de la boucle en testant une condition soit au début de chaque itération (`While`) ou à la fin de chaque itération (`Until`). +- Par défaut, les _instructions_ incluses sont exécutées pour chaque valeur de *Expression*. Il est toutefois possible de sortir de la boucle en testant une condition soit au début de chaque itération (`While`) ou à la fin de chaque itération (`Until`). - Les paramètres optionnels *début* et *fin* peuvent être utilisés avec les collections et les entity selections afin de définir des bornes pour la boucle. -- La boucle `For each...End for each` peut être utilisée sur une **collection partagée** ou un **objet partagé**. Si vous souhaitez modifier un ou plusieurs éléments des propriétés d'objets ou de la collection dans le code, vous devez utiliser les mots-clés `Use...End use`. Vous pouvez, si vous le souhaitez, appeler les mots-clés `Use...End use` : +- La boucle `For each...End for each` peut être utilisée sur une **collection partagée** ou un **objet partagé**. Si vous souhaitez modifier un ou plusieurs éléments des propriétés d'objets ou de la collection dans le code, vous devez utiliser les mots-clés `Use...End use`. Vous pouvez, si vous le souhaitez, appeler les mots-clés `Use...End use` : - avant de saisir la boucle, si les éléments doivent être modifiés ensemble pour des raisons d'intégrité, ou bien - - dans la boucle, lorsque quelques éléments/propriétés seulement doivent être modifiés et qu'aucune gestion de l'intégrité n'est requise. + - dans la boucle, lorsque quelques éléments/propriétés seulement doivent être modifiés et qu'aucune gestion de l'intégrité n'est requise. ### Boucle sur collections -Lorsque `For each...End for each` est utilisée avec une *Expression* de type *Collection*, le paramètre *Elément_courant* est une variable du même type que les éléments de la collection. Par défaut, le nombre de boucles est basé sur le nombre d'éléments de la collection. +Lorsque `For each...End for each` est utilisée avec une _Expression_ de type _Collection_, le paramètre _Elément_courant_ est une variable du même type que les éléments de la collection. Par défaut, le nombre de boucles est basé sur le nombre d'éléments de la collection. -La collection doit contenir uniquement des éléments du même type. Dans le cas contraire, une erreur sera retournée dès que la première valeur de type différent sera assignée à la variable *Elément_courant*. +La collection doit contenir uniquement des éléments du même type. Dans le cas contraire, une erreur sera retournée dès que la première valeur de type différent sera assignée à la variable _Elément_courant_. -A chaque itération de la boucle, la variable *Elément_courant* reçoit automatiquement l'élément correspondant de la collection. Vous devez tenir compte des points suivants : +A chaque itération de la boucle, la variable _Elément_courant_ reçoit automatiquement l'élément correspondant de la collection. Vous devez tenir compte des points suivants : -- Si la variable *Elément_courant* est de type objet ou collection (i.e. si *Expression* est une collection d'objets ou une collection de collections), la modification de cette variable modifiera automatiquement l'élément correspondant de la collection (car les objets et les collections sont passés par référence). Si la variable est de type scalaire, sa modification ne sera pas répercutée sur l'élément de la collection. -- La variable *Elément_courant* doit être du même type que les éléments de la collection. Si un seul élément de la collection n'est pas du même type que la variable, une erreur est générée et la boucle s'arrête. -- Si la collection contient des éléments de valeur **Null**, une erreur sera générée si le type de la variable *Elément_courant* ne prend pas en charge la valeur **Null** (comme par exemple les variables entier long). +- La variable _Elément_courant_ doit être du même type que les éléments de la collection. Si un seul élément de la collection n'est pas du même type que la variable, une erreur est générée et la boucle s'arrête. +- Si la variable _Elément_courant_ est de type objet ou collection (i.e. Si un seul élément de la collection n'est pas du même type que la variable, une erreur est générée et la boucle s'arrête. +- Si la collection contient des éléments de valeur **Null**, une erreur sera générée si le type de la variable _Elément_courant_ ne prend pas en charge la valeur **Null** (comme par exemple les variables entier long). #### Exemple Vous souhaitez calculer quelques statistiques sur une collection de nombres : - ```4d C_COLLECTION($nums) $nums:=New collection(10;5001;6665;33;1;42;7850) @@ -347,7 +340,7 @@ Vous souhaitez calculer quelques statistiques sur une collection de nombres : ### Boucle sur entity selections -Lorsque `For each...End for each` est utilisée avec une *Expression* de type *Entity selection*, le paramètre *Elément_courant* contient l'entity en cours de traitement. +Lorsque `For each...End for each` est utilisée avec une _Expression_ de type _Entity selection_, le paramètre _Elément_courant_ contient l'entity en cours de traitement. Le nombre de boucles est basé sur le nombre d'entities présentes dans l'entity selection. A chaque itération de la boucle, le paramètre *Elément_courant* reçoit automatiquement l'entity qui est en cours de traitement. @@ -358,7 +351,6 @@ N'oubliez pas que toute modification effectuée sur l'entity en cours de traitem #### Exemple Vous souhaitez augmenter le salaire de tous les employés britanniques dans une entity selection : - ```4d C_OBJECT(emp) For each(emp;ds.Employees.query("country='UK'")) @@ -376,7 +368,6 @@ Les propriétés de l'objet sont itérées en fonction de leur ordre de créatio #### Exemple Vous souhaitez passer en majuscules les propriétés contenant des noms dans l'objet suivant : - ```4d { "firstname": "gregory", @@ -384,9 +375,7 @@ Vous souhaitez passer en majuscules les propriétés contenant des noms dans l'o "age": 20 } ``` - Vous pouvez écrire : - ```4d For each(property;vObject) If(Value type(vObject[property])=Is text) @@ -394,14 +383,13 @@ Vous pouvez écrire : End if End for each ``` - - { - "firstname": "GREGORY", - "lastname": "BADIKORA", - "age": 20 - } - - +``` +{ + "firstname": "GREGORY", + "lastname": "BADIKORA", + "age": 20 +} +``` ### Paramètres début / fin Vous pouvez définir des bornes pour l'itération à l'aide des paramètres optionnels début et fin. @@ -409,15 +397,14 @@ Vous pouvez définir des bornes pour l'itération à l'aide des paramètres opti **Note :** Les paramètres *début* et *fin* sont utilisables uniquement avec les boucles sur des collections et des entity selections (ils sont ignorés avec les boucles sur des propriétés d'objets). - Dans le paramètre *début*, passez la position de l'élément de *Expression* auquel démarrer l'itération (*début* est inclus). -- Dans le paramètre *fin*, vous pouvez passer la position de l'élément de *Expression* auquel stopper l'itération (*fin* est exclus). +- Dans le paramètre *fin*, vous pouvez passer la position de l'élément de *Expression* auquel stopper l'itération (*fin* est exclus). Si *fin* est omis ou si *fin* est plus grand que le nombre d'éléments de *Expression*, les éléments sont itérés depuis *début* jusqu'au dernier inclus. Si les paramètres *début* et *fin* sont des valeurs positives, ils représentent des positions d'éléments dans *Expression*. Si *begin* est une valeur négative, elle est recalculée comme `begin:=begin+Taille expression` (elle est considérée comme un décalage à partir de la fin de *Expression*). Si la valeur calculée est négative, *begin* prend la valeur 0. **Note :** Même si début est une valeur négative, l'itération est toujours effectuée dans le même ordre. Si *fin* est une valeur négative, elle est recalculée comme `fin:=fin+Taille expression` -Par exemple: - +Par exemple : - une collection contient 10 éléments (numérotés de 0 à 9) -- début=-4 -> début=-4+10=6 -> l'itération démarre au 6e élément (numéro 5) -- fin=-2 -> fin=-2+10=8 -> l'itération stoppe avant le 8e élément (numéro 7), i.e. après le 7e élément. +- début=-4 > début=-4+10=6 > l'itération démarre au 6e élément (numéro 5) +- fin=-2 > fin=-2+10=8 > l'itération stoppe avant le 8e élément (numéro 7), i.e. #### Exemple @@ -461,4 +448,5 @@ Vous pouvez passer un mot-clé ou l'autre en fonction de vos besoins : $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/fr/Concepts/classes.md b/website/translated_docs/fr/Concepts/classes.md index 54a2b0edffa037..91fdec3a8443c4 100644 --- a/website/translated_docs/fr/Concepts/classes.md +++ b/website/translated_docs/fr/Concepts/classes.md @@ -8,273 +8,388 @@ title: Classes Le langage 4D prend en charge le concept de **classes**. Dans un langage de programmation, l'utilisation d'une classe vous permet de définir le comportement d'un objet avec des propriétés et des fonctions associées. -Une fois qu'une classe est définie, vous pouvez **instancier** des objets de cette classe n'importe où dans votre code. Chaque objet est une instance de sa classe. Une classe peut `s'étendre` à une autre classe, puis hériter de ses fonctions. +Une fois qu'une classe utilisateur (user class) est définie, vous pouvez **instancier** des objets de cette classe n'importe où dans votre code. Chaque objet est une instance de sa classe. A class can [`extend`](#class-extends-classname) another class, and then inherits from its [functions](#function) and properties ([static](#class-constructor) and [computed](#function-get-and-function-set)). -Les modèles de classe 4D et de classe JavaScript sont similaires, et sont basés sur une chaîne de prototypes. +> Les modèles de classe 4D et de classe JavaScript sont similaires, et sont basés sur une chaîne de prototypes. -### L'objet classe +Par exemple, vous pouvez créer une classe `Person` avec la définition suivante : -Une classe est un objet de classe "Class". Un objet de classe a les propriétés et méthodes suivantes : +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -- `name` qui doit être conforme à ECMAScript -- un objet `superclass` (facultatif, nul s'il n'y en a aucun) -- une méthode `new()` permettant d'instancier des objets de classe. +Function get fullName() -> $fullName : text + $fullName:=This.firstName+" "+This.lastName -De plus, un objet de classe peut référencer : +Function sayHello()->$welcome : Text + $welcome:="Hello "+This.fullName +``` -- un objet `constructeur` (facultatif) -- un objet `prototype`, contenant des objets de fonction nommés (facultatif). +Dans une méthode, créons une "Personne" : -Un objet de classe est un objet partagé et est donc accessible simultanément à partir de différents processus 4D. +``` +var $person : cs.Person //object of Person class +var $hello : Text +$person:=cs.Person.new("John";"Doe") +// $person:{firstName: "John"; lastName: "Doe"; fullName: "John Doe"} +$hello:=$person.sayHello() //"Hello John Doe" +``` -### Recherche et prototype des propriétés -Tous les objets de 4D sont liés en interne à un objet de classe. Lorsque 4D ne trouve pas de propriété dans un objet, il effectue un recherche dans l'objet prototype de sa classe; s'il ne la trouve pas, 4D poursuit sa recherche dans l'objet prototype de sa classe mère (superclass), et ainsi de suite jusqu'à ce qu'il n'y ait plus de superclass. -Tous les objets héritent de la classe "Object" comme classe supérieure d'arbre d'héritage. +## Gestion des classes -```4d - //Class: Polygon -Class constructor -C_LONGINT($1;$2) -This.area:=$1*$2 +### Définition d'une classe - //C_OBJECT($poly) -C_BOOLEAN($instance) -$poly:=cs.Polygon.new(4;3) +Une classe utilisateur dans 4D est définie par un fichier de méthode spécifique (.4dm), stocké dans le dossier `/Project/Sources/Classes/`. Le nom du fichier est le nom de la classe. -$instance:=OB Instance of($poly;cs.Polygon) - // true -$instance:=OB Instance of($poly;4D.Object) - // true -``` +Lorsque vous nommez des classes, gardez à l'esprit les règles suivantes : -When enumerating properties of an object, its class prototype is not enumerated. As a consequence, `For each` statement and `JSON Stringify` command do not return properties of the class prototype object. The prototype object property of a class is an internal hidden property. +- Un [nom de classe](identifiers.md#classes) doit être conforme aux [règles de nommage des propriétés](identifiers.md#object-properties). +- Les noms de classe sont sensibles à la casse. +- Il n'est pas recommandé de donner le même nom à une classe et à une table de base de données, afin d'éviter tout conflit. -### Class definition +Par exemple, si vous souhaitez définir une classe nommée "Polygon", vous devez créer le fichier suivant : -A user class file defines a model of object that can be instantiated in the database code by calling the `new()` class member method. You will usually use specific [class keywords](#class-keywords) and [class commands](#class-commands) in the class file. +- Dossier Project + + Project + * Sources + - Classes + + Polygon.4dm -Par exemple: +### Supprimer une classe -```4d -//Class: Person.4dm -Class constructor - C_TEXT($1) // FirstName - C_TEXT($2) // LastName - This.firstName:=$1 - This.lastName:=$2 -``` +Pour supprimer une classe existante, vous pouvez : -In a method, creating a "Person": +- sur votre disque, supprimer le fichier de classe .4dm du dossier "Classes", +- dans l'Explorateur 4D, sélectionner la classe et cliquer sur ![](assets/en/Users/MinussNew.png) ou choisir **Déplacer vers la corbeille** dans le menu contextuel. - C_OBJECT($o) - $o:=cs.Person.new("John";"Doe") - // $o: {firstName: "John";lastName: "Doe" } - -Note that you could create an empty class file, and instantiate empty objects. For example, if you create the following `Empty.4dm` class file: +### Utiliser l'interface 4D -```4d -//Fichier classe Empty.4dm -//Rien -``` +Les fichiers de classe sont automatiquement stockés à l'emplacement approprié lorsqu'ils sont créés via l'interface de 4D, soit via le menu **Fichier**, soit via l'Explorateur. -You could write in a method: +#### Menu Fichier et barre d'outils -```4d -$o:=cs.Empty.new() -//$o : {} -$cName:=OB Class($o).name //"Empty" -``` +Vous pouvez créer un nouveau fichier de classe pour le projet en sélectionnant **Nouveau> Classe...** dans le menu **Fichier** de 4D Developer ou dans la barre d'outils. + +Vous pouvez également utiliser le raccourci **Ctrl+Maj+Alt+k**. + +#### Explorateur + +Dans la page **Méthodes** de l'Explorateur, les classes sont regroupées dans la catégorie **Classes**. + +Pour créer une nouvelle classe, vous pouvez : + +- sélectionnez la catégorie **Classes** et cliquez sur le bouton ![](assets/en/Users/PlussNew.png). +- sélectionnez **Nouvelle classe...** dans le menu d'actions en bas de la fenêtre de l'Explorateur ou dans le menu contextuel du groupe Classes. ![](assets/en/Concepts/newClass.png) +- sélectionnez **Nouveau> Classe...** dans le menu contextuel de la page d'accueil de l'Explorateur. + +#### Prise en charge du code de classe + +Dans les différentes fenêtres 4D (éditeur de code, compilateur, débogueur, explorateur d'exécution), le code de classe est essentiellement géré comme une méthode projet avec quelques spécificités : + +- Dans l'éditeur de code : + - une classe ne peut pas être exécutée + - une fonction de classe est un bloc de code + - **Aller à définition...** sur un objet membre permet de rechercher des déclarations de fonction de classe; par exemple, "$o.f()" donnera comme résultat de recherche "Function f". + - **Chercher les références...** sur la déclaration de fonction de classe recherche la fonction utilisée comme membre d'objet; par exemple, "Function f" donnera comme résultat "$o.f()". +- Dans l'explorateur d'exécution et le Débogueur, les fonctions de classe sont affichées avec le format \ constructor ou \. \ . ## Class stores -Available classes are accessible from their class stores. The following class stores are available: +Les classes disponibles sont accessibles depuis leurs class stores. Deux class stores sont disponibles : -- a class store for built-in 4D classes. It is returned by the `4D` command. -- a class store for each opened database or component. It is returned by the `cs` command. These are "user classes". +- `cs` pour le class store utilisateur +- `cs` pour le class store intégré -For example, you create a new instance of an object of myClass using the `cs.myClass.new()` statement (`cs` means *classtore*). -## Handling user classes -### Class files +### `cs` -A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. +#### cs -> classStore -For example, if you want to define a class named "Polygon", you need to create the following file: +| Paramètres | Type | | Description | +| ---------- | ------ | -- | ------------------------------------------------------------------- | +| classStore | object | <- | Class store utilisateur utilisateurs pour le projet ou le composant | -- Database folder - + Project - * Sources - - Classes - + Polygon.4dm +La commande `cs` retourne le class store utilisateur pour le projet ou le composant courant. La commande `cs` retourne le class store utilisateur pour le projet ou le composant courant. Par défaut, seules les [classes ORDA](ORDA/ordaClasses.md) du projet sont disponibles. + +#### Exemple + +Vous souhaitez créer une nouvelle instance d'un objet de `myClass` : + +```4d +$instance:=cs.myClass.new() +``` -### Class names +### `4D` -When naming classes, you should keep in mind the following rules: +#### 4D -> classStore -- A class name must be ECMAScript compliant. -- Class names are case sensitive. -- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. +| Paramètres | Type | | Description | +| ---------- | ------ | -- | -------------- | +| classStore | object | <- | Class store 4D | -### 4D Developer interface +La commande `4D` retourne le class store des classes 4D intégrées disponibles. Elle donne accès à des API spécifiques telles que [CryptoKey](API/CryptoKeyClass.md). -Class files are automatically stored at the appropriate location when created through the 4D Developer interface, either via the **File** menu or the Explorer. +#### Exemple + +Vous souhaitez créer une nouvelle clé dans la classe `CryptoKey` : + +```4d +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) +``` -#### File menu and toolbar -You can create a new class file for the project by selecting **New > Class...** in the 4D Developer **File** menu or from the toolbar. -You can also use the **Ctrl+Shift+Alt+k** shortcut. -#### Explorer +## L'objet classe -In the **Methods** page of the Explorer, classes are grouped in the **Classes** category. +Lorsqu'une classe est [définie](#class-definition) dans le projet, elle est chargée dans l'environnement de langage 4D. Une classe est un objet de la [classe "Class"](API/ClassClass.md). Un objet class possède les propriétés et fonctions suivantes : -To create a new class, you can: +- chaîne [`name`](API/ClassClass.md#name) +- objet [`superclass`](API/ClassClass.md#superclass) (nul si aucun) +- fonction [`new()`](API/ClassClass.md#new), permettant d'instancier des objets de classe. -- select the **Classes** category and click on the ![](assets/en/Users/PlussNew.png) button. -- select **New Class...** from the action menu at the bottom of the Explorer window, or from the contexual menu of the Classes group. ![](assets/en/Concepts/newClass.png) -- select **New > Class...** from the contexual menu of the Explorer's Home page. +De plus, un objet classe peut référencer un objet [`constructor`](#class-constructor) (facultatif). -#### Class code support +Un objet de classe est un [objet partagé](shared.md) et est donc accessible simultanément à partir de différents processus 4D. -In the various 4D Developer windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: +### Héritage -- In the code editor: - - a class cannot be run - - a class function is a code block - - **Goto definition** on an object member searches for class Function declarations; for example, "$o.f()" will find "Function f". - - **Search references** on class function declaration searches for the function used as object member; for example, "Function f" will find "$o.f()". -- In the Runtime explorer and Debugger, class functions are displayed with the \ constructor or \.\ format. +Si une classe hérite d'une autre classe (c'est-à-dire que le mot-clé [Class extends](classes.md#class-extends-classname) est utilisé dans sa définition), la classe parente est sa [`superclasse`](API/ClassClass.md#superclass). -### Deleting a class +Lorsque 4D ne trouve pas de fonction ou de propriété dans une classe, il la recherche dans sa [`superclasse`](API/ClassClass.md#superclass); s'il ne la trouve pas, 4D continue la recherche dans la superclasse de la superclasse, et ainsi de suite, jusqu'à ce qu'il n'y ait plus de superclasse (tous les objets héritent de la superclasse "Object"). -To delete an existing class, you can: -- on your disk, remove the .4dm class file from the "Classes" folder, -- in the Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. +## Mots-clés de classe -## Class keywords +Des mots-clés 4D spécifiques peuvent être utilisés dans les définitions de classe : -Specific 4D keywords can be used in class definitions: +- `Fonction ` pour définir les fonctions de classe des objets. +- `Function get ` and `Function set ` to define computed properties of the objects. +- `Class constructor` to define static properties of the objects. +- `Class extends ` pour définir l'héritage. -- `Function ` to define member methods of the objects. -- `Class constructor` to define the properties of the objects (i.e. the prototype). -- `Class extends ` to define inheritance. -### Class Function +### `Function` #### Syntaxe -```js -Function +```4d +Function ({$parameterName : type; ...}){->$parameterName : type} // code ``` -Class functions are properties of the prototype object of the owner class. They are objects of the "Function" class. +Les fonctions de classe sont des propriétés spécifiques de la classe. Ce sont des objets de la classe [4D.Function](API/FunctionClass.md#about-4dfunction-objects). -In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be ECMAScript compliant. +Dans le fichier de définition de classe, les déclarations de fonction utilisent le mot-clé `Function`, et le nom de la fonction. Le nom de la fonction doit être conforme aux [règles de nommage des propriétés](Concepts/identifiers.md#object-properties). -> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features. For example, if you declare `Function _myPrivateFunction` in MyClass, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. +> **Astuce :** préfixer le nom de la fonction par un trait de soulignement ("_") exclura la fonction des fonctionnalités d'auto-complétion dans l'éditeur de code 4D. Par exemple, si vous déclarez `Function _myPrivateFunction` dans `MyClass`, elle ne sera pas proposée dans l'éditeur de code lorsque vous tapez `"cs.MyClass. "`. -Within a class function, the `This` is used as the object instance. Par exemple: +Immédiatement après le nom de la fonction, les [paramètres](#parameters) de la fonction peuvent être déclarés avec un nom et un type de données affectés, y compris le paramètre de retour (facultatif). Par exemple : ```4d -Function getFullName - C_TEXT($0) - $0:=This.firstName+" "+Uppercase(This.lastName) +Function computeArea($width : Integer; $height : Integer)->$area : Integer +``` + +Dans une fonction de classe, la commande `This` est utilisée comme instance d'objet. Par exemple : -Function getAge - C_LONGINT($0) - $0:=(Current date-This.birthdate)/365.25 +```4d +Function setFullname($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function getFullname()->$fullname : Text + $fullname:=This.firstName+" "+Uppercase(This.lastName) ``` -For a class function, the `Current method name` command returns: "*\.\*", for example "MyClass.myMethod". +Pour une fonction de classe, la commande `Current method name` retourne: "*\.\*", par exemple "MyClass.myMethod". + +Dans le code de l'application, les fonctions de classe sont appelées en tant que méthodes membres de l'instance d'objet et peuvent recevoir des [paramètres](#class-function-parameters) le cas échéant. Les syntaxes suivantes sont prises en charge : + +- utilisation de l'opérateur `()`. Par exemple, `myObject.methodName("hello")` +- utilisation d'une méthode membre de classe "4D.Function" : + - [`apply()`](API/FunctionClass.md#apply) + - [`call()`](API/FunctionClass.md#call) + +> **Avertissement de sécurité des threads :** Si une fonction de classe n'est pas thread-safe et si elle est appelée par une méthode avec l'attribut "Can be run in preemptive process" : - le compilateur ne génère aucune erreur (ce qui est différent des méthodes classiques), - une erreur n'est générée par 4D qu'au moment de l'exécution. + + + -In the database code, class functions are called as member methods of the object instance and can receive parameters if any. The following syntaxes are supported: +#### Paramètres -- use of the `()` operator. For example `myObject.methodName("hello")`. -- use of a "Function" class member method - - `apply()` - - `call()` +Les paramètres de fonction sont déclarés à l'aide du nom du paramètre et du type de paramètre, séparés par deux points. Le nom du paramètre doit être conforme aux [règles de nommage des propriétés](Concepts/identifiers.md#object-properties). Plusieurs paramètres (et types) sont séparés par des points-virgules (;). -> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: -> - the compiler does not generate any error (which is different compared to regular methods), +```4d +Function add($x; $y : Variant; $z : Integer; $xy : Object) +``` +> Si le type n'est pas indiqué, le paramètre sera défini comme `Variant`. + +Déclarez le paramètre de retour (facultatif) en ajoutant une flèche (->) et la définition du paramètre de retour après la liste des paramètres d'entrée. Par exemple : -< +```4d +Function add ($x : Variant; $y : Integer)->$result : Integer +``` + +Vous pouvez également déclarer le paramètre de retour uniquement en ajoutant `: type`, auquel cas il sera automatiquement disponible via $0. Par exemple : + +```4d +Function add ($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` +> La [syntaxe 4D classique](parameters.md#sequential-parameters) des paramètres de méthode peut être utilisée pour déclarer les paramètres des fonctions de classe. Les deux syntaxes peuvent être mélangées. For example: +> +> ```4d +> Function add($x : Integer) +> var $2; $value : Integer +> var $0 : Text +> $value:=$x+$2 +> $0:=String($value) +> ``` -p> -> - an error is thrown by 4D only at runtime. #### Example ```4d // Class: Rectangle -Class Constructor - C_LONGINT($1;$2) +Class constructor($width : Integer; $height : Integer) This.name:="Rectangle" - This.height:=$1 - This.width:=$2 + This.height:=$height + This.width:=$width // Function definition -Function getArea - C_LONGINT($0) - $0:=(This.height)*(This.width) - +Function getArea()->$result : Integer + $result:=(This.height)*(This.width) ``` ```4d // In a project method -C_OBJECT($o) -C_REAL($area) -$o:=cs.Rectangle.new() -$area:=$o.getArea(50;100) //5000 +var $rect : cs.Rectangle +var $area : Real + +$rect:=cs.Rectangle.new(50;100) +$area:=$rect.getArea() //5000 ``` -### Class constructor + +### `Function get` and `Function set` #### Syntax -```js +```4d +Function get ()->$result : type +// code +``` + +```4d +Function set ($parameterName : type) +// code +``` + +`Function get` and `Function set` are accessors defining **computed properties** in the class. A computed property is a named property with a data type that masks a calculation. When a computed property value is accessed, 4D substitutes the corresponding accessor's code: + +- when the property is read, the `Function get` is executed, +- when the property is written, the `Function set` is executed. + +If the property is not accessed, the code never executes. + +Computed properties are designed to handle data that do not necessary need to be kept in memory. They are usually based upon persistent properties. For example, if a class object contains as persistent property the *gross price* and the *VAT rate*, the *net price* could be handled by a computed property. + +In the class definition file, computed property declarations use the `Function get` (the *getter*) and `Function set` (the *setter*) keywords, followed by the name of the property. The name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). + +`Function get` returns a value of the property type and `Function set` takes a parameter of the property type. Both arguments must comply with standard [function parameters](#parameters). + +When both functions are defined, the computed property is **read-write**. If only a `Function get` is defined, the computed property is **read-only**. In this case, an error is returned if the code tries to modify the property. If only a `Function set` is defined, 4D returns *undefined* when the property is read. + +The type of the computed property is defined by the `$return` type declaration of the *getter*. It can be of the following types: + +- Text +- Boolean +- Date +- Number +- Object +- Collection +- Image +- Blob + +> Assigning *undefined* to an object property clears its value while preserving its type. In order to do that, the `Function get` is first called to retrieve the value type, then the `Function set` is called with an empty value of that type. + +#### Examples + +```4d +//Class: Person.4dm + +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function get fullName() -> $fullName : Text + $fullName:=This.firstName+" "+This.lastName + +Function set fullName( $fullName : text ) + $p:=Position(" "; $fullName) + This.firstName:=Substring($fullName; 1; $p-1) + This.lastName:=Substring($fullName; $p+1) + +``` + +```4d +//in a project method +$fullName:=$person.fullName // Function get fullName() is called +$person.fullName:="John Smith" // Function set fullName() is called +``` + + +### `Class Constructor` + +#### Syntax + +```4d // Class: MyClass -Class Constructor +Class Constructor({$parameterName : type; ...}) // code ``` -A class constructor function, which can accept parameters, can be used to define a user class. +Une fonction class constructor, qui peut accepter des [paramètres](#parameters), peut être utilisée pour définir une classe utilisateur. + +In that case, when you call the [`new()`](API/ClassClass.md#new) function, the class constructor is called with the parameters optionally passed to the `new()` function. + +For a class constructor function, the `Current method name` command returns: "*\:constructor*", for example "MyClass:constructor". -In that case, when you call the `new()` class member method, the class constructor is called with the parameters optionnally passed to the `new()` function. -For a class constructor function, the `Current method name` command returns: "*\.constructor*", for example "MyClass.constructor". #### Example: ```4d // Class: MyClass // Class constructor of MyClass -Class Constructor -C_TEXT($1) -This.name:=$1 +Class Constructor ($name : Text) + This.name:=$name ``` ```4d // In a project method // You can instantiate an object -C_OBJECT($o) +var $o : cs.MyClass $o:=cs.MyClass.new("HelloWorld") // $o = {"name":"HelloWorld"} ``` -### Class extends \ + + + +### `Class extends ` #### Syntax -```js +```4d // Class: ChildClass Class extends ``` @@ -284,11 +399,11 @@ The `Class extends` keyword is used in class declaration to create a user class Class extension must respect the following rules: - A user class cannot extend a built-in class (except 4D.Object which is extended by default for user classes) -- A user class cannot extend a user class from another database or component. +- A user class cannot extend a user class from another project or component. - A user class cannot extend itself. -- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). +- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). -Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax' will throw an error in this case. +Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax` will throw an error in this case. An extended class can call the constructor of its parent class using the [`Super`](#super) command. @@ -297,27 +412,28 @@ An extended class can call the constructor of its parent class using the [`Super This example creates a class called `Square` from a class called `Polygon`. ```4d - //Class: Square - //path: Classes/Square.4dm +//Class: Square + +//path: Classes/Square.4dm - Class extends Polygon +Class extends Polygon - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // It calls the parent class's constructor with lengths - // provided for the Polygon's width and height -Super($1;$1) - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" + // It calls the parent class's constructor with lengths + // provided for the Polygon's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" -Function getArea -C_LONGINT($0) -$0:=This.height*This.width + Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -### Super +### `Super` + #### Super {( param{;...;paramN} )} {-> Object} @@ -326,102 +442,104 @@ $0:=This.height*This.width | param | mixed | -> | Parameter(s) to pass to the parent constructor | | Result | object | <- | Object's parent | - The `Super` keyword allows calls to the `superclass`, i.e. the parent class. `Super` serves two different purposes: -- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. When used in a constructor, the `Super` command appears alone and must be used before the `This` keyword is used. - - If all class constructors in the inheritance tree are not properly called, error -10748 is generated. It's 4D developer to make sure calls are valid. - - If the `This` command is called on an object whose superclasses have not been constructed, error -10743 is generated. - - If `Super` is called out of an object scope, or on an object whose superclass constructor has already been called, error -10746 is generated. +- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. Lorsqu'elle est utilisée dans un constructeur, la commande `Super` apparaît seule et doit être utilisée avant que le mot clé `This` ne soit utilisé. + - Si tous les constructeurs de classe de l'arborescence d'héritage ne sont pas appelés correctement, l'erreur -10748 est générée. C'est au développeur 4D de s'assurer que les appels sont valides. + - Si la commande `This` est appelée sur un objet dont les superclasses n'ont pas été construites, l'erreur -10743 est générée. + + - Si `Super` est appelé hors de la portée d'un objet, ou sur un objet dont le superclass constructor a déjà été appelé, l'erreur -10746 est générée. ```4d - // inside myClass constructor - C_TEXT($1;$2) - Super($1) //calls superclass constructor with a text param - This.param:=$2 // use second param +// à l'intérieur du constructor myClass +var $text1; $text2 : Text +Super($text1) // appelle le superclass constructor avec un paramètre texte +This.param:=$text2 // utilise le second paramètre ``` -- inside a [class member function](#class-function), `Super` designates the prototype of the superclass and allows to call a function of the superclass hierarchy. +- à l'intérieur d'une [fonction membre de classe](#class-function), `Super` désigne le prototype de la superclasse et permet d'appeler une fonction de la hiérarchie de la superclasse. ```4d - Super.doSomething(42) //calls "doSomething" function - //declared in superclasses +Super.doSomething(42) // appelle la fonction "doSomething" +// déclaré dans les superclasses ``` -#### Example 1 +#### Exemple 1 -This example illustrates the use of `Super` in a class constructor. The command is called to avoid duplicating the constructor parts that are common between `Rectangle` and `Square` classes. +Cet exemple illustre l'utilisation de `Super` dans un class constructor. La commande est appelée pour éviter de dupliquer les parties du constructeur qui sont communes aux classes `Rectangle` et `Square`. ```4d - //Class: Rectangle +// Class: Rectangle +Class constructor($width : Integer; $height : Integer) + This.name:="Rectangle" + This.height:=$height + This.width:=$width - Class constructor - C_LONGINT($1;$2) - This.name:="Rectangle" - This.height:=$1 - This.width:=$2 - Function sayName - ALERT("Hi, I am a "+This.name+".") +Function sayName() + ALERT("Hi, I am a "+This.name+".") - Function getArea - C_LONGINT($0) - $0:=This.height*This.width +// Définition de la fonction +Function getArea() + var $0 : Integer + $0:=(This.height)*(This.width) ``` ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // It calls the parent class's constructor with lengths - // provided for the Rectangle's width and height - Super($1;$1) + // Il appelle le constructor de la classe parente avec des longueurs + // fourni pour la largeur et la hauteur du rectangle + Super($side;$side) + // Dans les classes dérivées, Super doit être appelé avant + // de pouvoir utiliser 'This' + This.name:="Square " - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` #### Example 2 -This example illustrates the use of `Super` in a class member method. You created the `Rectangle` class with a function: +Cet exemple illustre l'utilisation de `Super` dans une méthode membre de classe. You created the `Rectangle` class with a function: ```4d - //Class: Rectangle +//Class: Rectangle - Function nbSides - C_TEXT($0) - $0:="I have 4 sides" +Function nbSides() + var $0 : Text + $0:="I have 4 sides" ``` You also created the `Square` class with a function calling the superclass function: ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Function description - C_TEXT($0) - $0:=Super.nbSides()+" which are all equal" +Function description() + var $0 : Text + $0:=Super.nbSides()+" which are all equal" ``` Then you can write in a project method: ```4d - C_OBJECT($square) - C_TEXT($message) - $square:=cs.Square.new() - $message:=$square.description() //I have 4 sides which are all equal +var $square : Object +var $message : Text +$square:=cs.Square.new() +$message:=$square.description() //I have 4 sides which are all equal ``` -### This +### `This` #### This -> Object @@ -429,47 +547,48 @@ Then you can write in a project method: | --------- | ------ | -- | -------------- | | Result | object | <- | Current object | +The `This` keyword returns a reference to the currently processed object. Dans 4D, il peut être utilisé dans [différents contextes](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). -The `This` keyword returns a reference to the currently processed object. In 4D, it can be used in [different contexts](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). - -In most cases, the value of `This` is determined by how a function is called. It can't be set by assignment during execution, and it may be different each time the function is called. +Dans la plupart des cas, la valeur de `This` est déterminée par la manière dont une fonction est appelée. Il ne peut pas être défini par affectation lors de l'exécution, et il peut être différent à chaque fois que la fonction est appelée. -When a formula is called as a member method of an object, its `This` is set to the object the method is called on. For example: +Lorsqu'une formule est appelée en tant que méthode membre d'un objet, son `This` est défini à l'objet sur lequel la méthode est appelée. For example: ```4d $o:=New object("prop";42;"f";Formula(This.prop)) $val:=$o.f() //42 ``` -When a [class constructor](#class-constructor) function is used (with the `new()` keyword), its `This` is bound to the new object being constructed. +When a [class constructor](#class-constructor) function is used (with the [`new()`](API/ClassClass.md#new) function), its `This` is bound to the new object being constructed. ```4d - //Class: ob +//Class: ob Class Constructor + // Create properties on This as // desired by assigning to them This.a:=42 ``` ```4d - // in a 4D method +// in a 4D method $o:=cs.ob.new() $val:=$o.a //42 ``` -> When calling the superclass constructor in a constructor using the [Super](#super) keyword, keep in mind that `This` must not be called before the superclass constructor, otherwise an error is generated. See [this example](#example-1). +> When calling the superclass constructor in a constructor using the [Super](#super) keyword, keep in mind that `This` must not be called before the superclass constructor, otherwise an error is generated. Prenons [cet exemple](#example-1). + -In any cases, `This` refers to the object the method was called on, as if the method were on the object. +Dans tous les cas, `This` fait référence à l'objet sur lequel la méthode a été appelée, comme si la méthode était sur l'objet. ```4d - //Class: ob +//Class: ob - Function f +Function f() $0:=This.a+This.b ``` -Then you can write in a project method: +Vous pouvez donc écrire, dans une méthode projet : ```4d $o:=cs.ob.new() @@ -477,21 +596,30 @@ $o.a:=5 $o.b:=3 $val:=$o.f() //8 ``` +Dans cet exemple, l'objet assigné à la variable $o n'a pas sa propre propriété *f*, il l'hérite de sa classe. Since *f* is called as a method of $o, its `This` refers to $o. -In this example, the object assigned to the variable $o doesn't have its own *f* property, it inherits it from its class. Si *f* est appelé comme méthide de $o, son `This` se réfère à $o. -## Commandes Class +## Class commands -Plusieurs commandes du langage 4D vous permettent de gérer les fonctionnalités de classe. +Several commands of the 4D language allows you to handle class features. -### OB Class + +### `OB Class` #### OB Class ( object ) -> Object | Null -`OB Class` retourne la classe de l'objet passé en paramètreed in parameter. +`OB Class` returns the class of the object passed in parameter. + + +### `OB Instance of` + +#### OB Instance of ( object ; class ) -> Boolean + +`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise.

      + -### OB Instance of +### `OB Instance of` -#### OB Instance of ( objet ; classe ) -> Booléen +#### OB Instance of ( object ; class ) -> Boolean -`OB Instance of` retourne `true` si `objet` appartient à `class` ou à l'une de ses classes héritées, et sinon `false`. \ No newline at end of file +`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise. diff --git a/website/translated_docs/fr/Concepts/components.md b/website/translated_docs/fr/Concepts/components.md index f95dc6f68c2502..45f2ca348a1354 100644 --- a/website/translated_docs/fr/Concepts/components.md +++ b/website/translated_docs/fr/Concepts/components.md @@ -3,80 +3,148 @@ id: components title: Composants --- -Un composant 4D est un ensemble d’objets 4D représentant une ou plusieurs fonctionnalité(s), qu’il est possible d’installer dans différentes bases. Par exemple, vous pouvez développer un composant 4D de courrier électronique gérant tous les aspects de l’envoi, la réception et le stockage d’emails au sein des bases 4D. +Un composant 4D est un ensemble d’objets 4D représentant une ou plusieurs fonctionnalité(s), qu’il est possible d’installer dans différentes applications. Par exemple, vous pouvez développer un composant 4D de courrier électronique gérant tous les aspects de l’envoi, la réception et le stockage d’emails au sein des applications 4D. + +## Presentation + +### Définitions + +- **Matrix Project**: 4D project used for developing the component. The matrix project is a standard project with no specific attributes. A matrix project forms a single component. +- **Host Project**: Application project in which a component is installed and used. +- **Component**: Matrix project, compiled or not, copied into the [`Components`](Project/architecture.md) folder of the host application and whose contents are used in the host application. + +### Principles La création et l’installation des composants 4D s’effectuent directement depuis 4D. Schématiquement, les composants sont gérés comme des [plug-ins](Concepts/plug-ins.md). Les principes sont les suivants : -- Un composant est un simple fichier de structure (compilé ou non compilé) d’architecture standard ou sous forme de package (cf. paragraphe Extension .4dbase). -- Pour installer un composant dans une base, il suffit de le copier dans le dossier “Components†de la base, placé à côté du fichier de structure ou à côté de l'application 4D exécutable. -- Un composant peut appeler la plupart des éléments 4D : des méthodes projet, des formulaires projet, des barres de menus, des listes à choix multiples, des images issues de la bibliothèque, etc. Il ne peut pas appeler des méthodes base et des triggers. -- Il n’est pas possible d’exploiter des tables standard ou des fichiers de données dans les composants 4D. En revanche, un composant peut créer et/ou utiliser des tables, des champs et des fichiers de données via les mécanismes des bases externes. Les bases externes sont des bases 4D indépendantes manipulées via les commandes SQL. +- A component consists of a regular 4D project file. +- To install a component, you simply need to copy it into the [`Components` folder of the project](Project/architecture.md). You can use aliases or shortcuts. +- A project can be both a “matrix†and a “host,†in other words, a matrix project can itself use one or more components. En revanche, une base utilisée comme composant ne peut pas elle-même utiliser un composant : un seul niveau de composant est chargé. +- A component can call on most of the 4D elements: project methods, project forms, menu bars, choice lists, and so on. Il ne peut pas appeler des méthodes base et des triggers. +- Il n’est pas possible d’exploiter des tables standard ou des fichiers de données dans les composants 4D. En revanche, un composant peut créer et/ou utiliser des tables, des champs et des fichiers de données via les mécanismes des bases externes. Les bases externes sont des bases 4D indépendantes manipulées via les commandes SQL. +- A host project running in interpreted mode can use either interpreted or compiled components. A host project running in compiled mode cannot use interpreted components. In this case, only compiled components can be used. -## Définitions -Les mécanismes de gestion des composants dans 4D nécessitent la mise en oeuvre des concepts et de la terminologie suivants : -- **Base matrice :** base de données 4D utilisée pour développer le composant. La base matrice est une base standard, sans attribut spécifique. Une base matrice constitue un seul composant. La base matrice est destinée à être copiée, compilée ou non, dans le dossier Components de l'application 4D ou de la base devant utiliser le composant (la base hôte). -- **Base hôte :** base dans laquelle est installé et utilisé un composant. -- **Composant :** base matrice, compilée ou non, copiée dans le dossier Components de l'application 4D ou de la base hôte et dont le contenu est utilisé dans les bases hôtes. -Il est à noter qu’une base peut donc être à la fois “matrice†et “hôteâ€, c’est-à-dire qu’une base matrice peut elle-même utiliser un ou plusieurs composants. En revanche, une base utilisée comme composant ne peut pas elle-même utiliser un composant : un seul niveau de composant est chargé. +## Portée des commandes du langage -### Protection des composants : la compilation +Hormis les [Commandes non utilisables](#unusable-commands), un composant peut utiliser toute commande du langage 4D. + +When commands are called from a component, they are executed in the context of the component, except for the `EXECUTE METHOD` or `EXECUTE FORMULA` command that use the context of the method specified by the command. A noter également que les commandes de lecture du thème “Utilisateurs et groupes†sont utilisables depuis un composant mais lisent les utilisateurs et les groupes du projet hôte (un composant n’a pas d’utilisateurs et groupes propres). -Par défaut, toutes les méthodes projet d’une base matrice installée comme composant sont virtuellement visibles depuis la base hôte. En particulier : +Les commandes `EXECUTE METHOD` et `Get database parameter` constituent aussi une exception à ce principe : leur portée est globale à l'application. Lorsque ces commandes sont appelées depuis un composant, elles s’appliquent au projet d'application hôte. -- Les méthodes projet partagées sont accessibles dans la Page Méthodes de l’Explorateur et peuvent être appelées dans les méthodes de la base hôte. Leur contenu peut être sélectionné et copié dans la zone de prévisualisation de l’Explorateur. Elles peuvent également être visualisées dans le débogueur. Il n’est toutefois pas possible de les ouvrir dans l’éditeur de méthodes ni de les modifier. -- Les autres méthodes projet de la base matrice n’apparaissent pas dans l’Explorateur mais peuvent également être visualisées dans le débogueur de la base hôte. +Par ailleurs, des dispositions spécifiques sont définies pour les commandes `Structure file` et `Get 4D folder` lorsqu’elles sont utilisées dans le cadre des composants. + +La commande `COMPONENT LIST` permet de connaître la liste des composants chargés par le projet hôte. + + +### Commandes non utilisables + +Les commandes suivantes ne sont pas compatibles avec une utilisation dans le cadre d’un composant car elles modifient le fichier de structure — ouvert en lecture. Leur exécution dans un composant provoque l’erreur -10511, “La commande NomCommande ne peut pas être appelée depuis un composant†: + +- `ON EVENT CALL` +- `Method called on event` +- `SET PICTURE TO LIBRARY` +- `REMOVE PICTURE FROM LIBRARY` +- `SAVE LIST` +- `ARRAY TO LIST` +- `EDIT FORM` +- `CREATE USER FORM` +- `DELETE USER FORM` +- `CHANGE PASSWORD` +- `EDIT ACCESS` +- `Set group properties` +- `Set user properties` +- `DELETE USER` +- `CHANGE LICENSES` +- `BLOB TO USERS` +- `SET PLUGIN ACCESS` + +**Notes :** + +- La commande `Table du formulaire courant` retourne `Nil` lorsqu’elle est appelée dans le contexte d’un formulaire projet. Par conséquent, elle ne peut pas être utilisée dans un composant. +- Les commandes SQL de définition de données (`CREATE TABLE`, `DROP TABLE`, etc.) ne peuvent pas être utilisées dans les composants. Elles sont néanmoins prises en charge avec des bases de données externes (voir la commande SQL `CREATE DATABASE`). -Pour protéger efficacement les méthodes projet d’un composant, il vous suffit simplement de compiler la base matrice et de la fournir sous forme de fichier .4dc (base compilée ne contenant pas le code interprété). Lorsqu’une base matrice compilée est installée comme composant : -- Les méthodes projet partagées sont accessibles dans la Page Méthodes de l’Explorateur et peuvent être appelées dans les méthodes de la base hôte. En revanche, leur contenu n’apparaît pas dans la zone de prévisualisation ni dans le débogueur. -- Les autres méthodes projet de la base matrice n’apparaissent jamais. ## Partage des méthodes projet -Toutes les méthodes projet d’une base matrice sont par définition incluses dans le composant (la base est le composant), ce qui signifie qu’elles peuvent être appelées et exécutées par le composant. +All the project methods of a matrix project are by definition included in the component (the project is the component), which means that they can be called and executed by the component. -En revanche, par défaut ces méthodes projet ne seront ni visibles ni appelables par la base hôte. Vous devez explicitement désigner dans la base matrice les méthodes que vous souhaitez partager avec la base hôte. Ces méthodes projet peuvent être appelées dans le code la base hôte (mais elles ne pourront pas être modifiées dans l’éditeur de méthodes de la base hôte). Ces méthodes constituent les **points d’entrée** dans le composant. +On the other hand, by default these project methods will not be visible, and they can't be called in the host project. In the matrix project, you must explicitly designate the methods that you want to share with the host project. In the matrix project, you must explicitly designate the methods that you want to share with the host project. Ces méthodes constituent les **points d’entrée** dans le composant. -**Note :** A l’inverse, pour des raisons de sécurité, par défaut un composant ne peut pas exécuter de méthode projet appartenant à la base hôte. Dans certains cas, vous pourrez avoir besoin d’autoriser un composant à accéder à des méthodes projet de votre base hôte. Pour cela, vous devez explicitement désigner les méthodes projet de la base hôte que vous souhaitez rendre accessibles aux composants. +Conversely, for security reasons, by default a component cannot execute project methods belonging to the host project. In certain cases, you may need to allow a component to access the project methods of your host project. In certain cases, you may need to allow a component to access the project methods of your host project. ![](assets/en/Concepts/pict516563.en.png) +Once the project methods of the host projects are available to the components, you can execute a host method from inside a component using the `EXECUTE FORMULA` or `EXECUTE METHOD` commands. Par exemple : + +```4d +// Host Method +component_method("host_method_name") +``` + + +```4d +// component_method + C_TEXT($1) + EXECUTE METHOD($1) +``` + +> An interpreted host database that contains interpreted components can be compiled or syntax checked if it does not call methods of the interpreted component. Otherwise, a warning dialog box appears when you attempt to launch the compilation or a syntax check and it will not be possible to carry out the operation. +> Keep in mind that an interpreted method can call a compiled method, but not the reverse, except via the use of the `EXECUTE METHOD` and `EXECUTE FORMULA` commands. + + + ## Passage de variables -Les composants et les bases hôtes ne partagent pas de variables locales, process ou interprocess. Le seul moyen d’accéder aux variables du composant depuis la base hôte et inversement est d’utiliser des pointeurs. +The local, process and interprocess variables are not shared between components and host projects. The local, process and interprocess variables are not shared between components and host projects. Exemple utilisant un tableau : ```4d -//Dans la base hôte : - ARRAY INTEGER(MyArray;10) +//In the host project: + ARRAY INTEGER(MyArray;10) AMethod(->MyArray) -//Dans le composant, la méthode projet UneMéthode contient : +//In the component, the AMethod project method contains: APPEND TO ARRAY($1->;2) ``` Exemples utilisant des variables : ```4d - C_TEXT(myvariable) - component_method1(->myvariable) - C_POINTER($p) - $p:=component_method2(...) +C_TEXT(myvariable) +component_method1(->myvariable) +``` + +```4d +C_POINTER($p) +$p:=component_method2(...) ``` -L’utilisation de pointeurs pour faire communiquer les composants et la base hôte nécessite de prendre en compte les spécificités suivantes : +Without a pointer, a component can still access the value of a host database variable (but not the variable itself) and vice versa: -- La commande `Pointeur vers` ne retournera pas un pointeur vers une variable de la base hôte si elle est appelée depuis un composant et inversement. +```4d +//In the host database +C_TEXT($input_t) +$input_t:="DoSomething" +component_method($input_t) +// component_method gets "DoSomething" in $1 (but not the $input_t variable) +``` + + +When you use pointers to allow components and the host project to communicate, you need to take the following specificities into account: -- L’architecture des composants autorise la coexistence, au sein d’une même base interprétée, de composants interprétés et compilés (à l’inverse, seuls des composants compilés peuvent être utilisés dans une base compilée). L’usage de pointeurs dans ce cas doit respecter le principe suivant : l’interpréteur peut dépointer un pointeur construit en mode compilé mais à l’inverse, en mode compilé, il n’est pas possible de dépointer un pointeur construit en mode interprété. Illustrons ce principe par l’exemple suivant : soient deux composants, C (compilé) et I (interprété) installés dans la même base hôte. - +- The `Get pointer` command will not return a pointer to a variable of the host project if it is called from a component and vice versa. + +- The component architecture allows the coexistence, within the same interpreted project, of both interpreted and compiled components (conversely, only compiled components can be used in a compiled project). L’usage de pointeurs dans ce cas doit respecter le principe suivant : l’interpréteur peut dépointer un pointeur construit en mode compilé mais à l’inverse, en mode compilé, il n’est pas possible de dépointer un pointeur construit en mode interprété. Let’s illustrate this principle with the following example: given two components, C (compiled) and I (interpreted), installed in the same host project. - Si le composant C définit la variable `mavarC`, le composant I peut accéder à la valeur de cette variable en utilisant le pointeur `->mavarC`. - - Si le composant I définit la variable `mavarI`, le composant C ne peut pas accéder à cette variable en utilisant le pointeur `->mavarI`. Cette syntaxe provoque une erreur d’exécution. -- La comparaison de pointeurs via la commande `RESOUDRE POINTEUR` est déconseillée avec les composants car le principe de cloisonnement des variables autorise la coexistence de variables de même nom mais au contenu radicalement différente dans un composant et la base hôte (ou un autre composant). Le type de la variable peut même être différent dans les deux contextes. Si les pointeurs `monptr1` et `monptr2` pointent chacun sur une variable, la comparaison suivante produira un résultat erroné : + - Si le composant I définit la variable `mavarI`, le composant C ne peut pas accéder à cette variable en utilisant le pointeur `->mavarI`. Cette syntaxe provoque une erreur d’exécution. + +- 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 project (or another component). Le type de la variable peut même être différent dans les deux contextes. Si les pointeurs `monptr1` et `monptr2` pointent chacun sur une variable, la comparaison suivante produira un résultat erroné : ```4d RESOLVE POINTER(monptr1;vNomVar1;vnumtable1;vnumchamp1) @@ -84,16 +152,19 @@ L’utilisation de pointeurs pour faire communiquer les composants et la base h If(vNomVar1=vNomVar2) //Ce test retourne Vrai alors que les variables sont différentes ``` - Dans ce cas, il est nécessaire d’utiliser la comparaison de pointeurs : - ```4d If(monptr1=monptr2) //Ce test retourne Faux ``` -## Accès aux tables de la base hôte +## Gestion des erreurs + +Une [méthode de gestion d'erreurs](Concepts/error-handling.md) installée par la commande `ON ERR CALL` s'applique à l'application en cours d'exécution uniquement. En cas d'erreur générée par un composant, la méthode d'appel sur erreur `ON ERR CALL` du prpjet hôte n'est pas appelée, et inversement. + + +## Accès aux tables du projet hôte -Bien que les composants ne puissent pas utiliser de tables, les pointeurs permettent à la base hôte et au composant de communiquer dans ce cas. Par exemple, voici une méthode pouvant être appelée depuis un composant : +Although components cannot use tables, pointers can allow host projects and components to communicate with each other. Par exemple, voici une méthode pouvant être appelée depuis un composant : ```4d // appeler une méthode composant @@ -103,8 +174,8 @@ methCreateRec(->[PERSONNES];->[PERSONNES]Nom;"Julie Andrews") Dans le composant, le code de la méthode `methCreateRec` : ```4d -C_POINTER($1) //Pointeur vers une table de la base hôte -C_POINTER($2) //Pointeur vers un champ de la base hôte +C_POINTER($1) //Pointeur vers une table du projet hôte +C_POINTER($2) //Pointeur vers un champ du projet hôte C_TEXT($3) // Valeur à insérer $tablepointer:=$1 @@ -115,61 +186,11 @@ $fieldpointer->:=$3 SAVE RECORD($tablepointer->) ``` -## Portée des commandes du langage - -Hormis les [Commandes non utilisables](#unusable-commands), un composant peut utiliser toute commande du langage 4D. - -Lorsqu’elles sont appelées depuis un composant, les commandes s’exécutent dans le contexte du composant, à l’exception de la commande `EXECUTE METHOD` qui utilise le contexte de la méthode désignée par la commande. A noter également que les commandes de lecture du thème “Utilisateurs et groupes†sont utilisables depuis un composant mais lisent les utilisateurs et les groupes de la base hôte (un composant n’a pas d’utilisateurs et groupes propres). - -Les commandes `EXECUTE METHOD` et `Get database parameter` constituent aussi une exception à ce principe : leur portée est globale à la base. Lorsque ces commandes sont appelées depuis un composant, elles s’appliquent à la base hôte. - -Par ailleurs, des dispositions spécifiques sont définies pour les commandes `Structure file` et `Get 4D folder` lorsqu’elles sont utilisées dans le cadre des composants. - -La commande `COMPONENT LIST` permet de connaître la liste des composants chargés par la base hôte. - -### Commandes non utilisables - -Les commandes suivantes ne sont pas compatibles avec une utilisation dans le cadre d’un composant car elles modifient le fichier de structure — ouvert en lecture. Leur exécution dans un composant provoque l’erreur -10511, “La commande NomCommande ne peut pas être appelée depuis un composant†: - -- `ON EVENT CALL` -- `Method called on event` -- `SET PICTURE TO LIBRARY` -- `REMOVE PICTURE FROM LIBRARY` -- `SAVE LIST` -- `ARRAY TO LIST` -- `EDIT FORM` -- `CREATE USER FORM` -- `DELETE USER FORM` -- `CHANGE PASSWORD` -- `EDIT ACCESS` -- `Set group properties` -- `Set user properties` -- `DELETE USER` -- `CHANGE LICENSES` -- `BLOB TO USERS` -- `SET PLUGIN ACCESS` - -**Notes :** - -- La commande `Table du formulaire courant` retourne `Nil` lorsqu’elle est appelée dans le contexte d’un formulaire projet. Par conséquent, elle ne peut pas être utilisée dans un composant. -- 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). - -## Gestion des erreurs - -Une [méthode de gestion d'erreurs](Concepts/error-handling.md) installée par la commande `ON ERR CALL` s'applique à la base en cours d'exécution uniquement. En cas d'erreur générée par un composant, la méthode d'appel sur erreur de la base hôte n'est pas appelée, et inversement. - -## Utilisation de formulaires - -- Seuls les "formulaires projet" (formulaires non associés à une table en particulier) peuvent être exploités directement dans un composant. Tous les formulaires projet présents dans la base matrice peuvent être utilisés par le composant. -- Un composant peut faire appel à des formulaires table de la base hôte. A noter qu’il est nécessaire dans ce cas d’utiliser des pointeurs plutôt que des noms de table entre [] pour désigner les formulaires dans le code du composant. - -**Note :** Si un composant utilise la commande `ADD RECORD`, le formulaire Entrée courant de la base hôte sera affiché, dans le contexte de la base hôte. Par conséquent, si le formulaire comporte des variables, le composant n’y aura pas accès. - -- Vous pouvez publier des formulaires de composants comme sous-formulaires dans les bases hôtes. Avec ce principe, vous pouvez notamment développer des composants proposant des objets graphiques. Par exemple, les Widgets proposés par 4D sont basés sur l’emploi de sous-formulaires en composants. +> In the context of a component, 4D assumes that a reference to a table form is a reference to the host table form (as components can't have tables.) ## Utilisation de tables et de champs -Un composant ne peut pas utiliser les tables et les champs définis dans la structure 4D de la base matrice. En revanche, il peut créer et utiliser des bases externes, et donc utiliser des tables et des champs en fonction de ses besoins. Les bases externes sont créées et gérées via le langage SQL. Une base externe est une base 4D indépendante de la base 4D principale, mais qui est manipulée depuis la base 4D principale. Utiliser une base externe signifie désigner temporairement cette base comme base courante, c’est-à-dire comme base cible des requêtes SQL exécutées par 4D. Les bases externes sont créées à l'aide de la commande SQL `CREATE DATABASE`. +Un composant ne peut pas utiliser les tables et les champs définis dans la structure 4D du projet matrice. En revanche, il peut créer et utiliser des bases externes, et donc utiliser des tables et des champs en fonction de ses besoins. Les bases externes sont créées et gérées via le langage SQL. Une base externe est un projet 4D indépendant du projet 4D principal, mais qui est manipulée depuis le projet 4D principal. Utiliser une base externe signifie désigner temporairement cette base comme base courante, c’est-à-dire comme base cible des requêtes SQL exécutées par 4D. Les bases externes sont créées à l'aide de la commande SQL `CREATE DATABASE`. ### Exemple @@ -205,7 +226,7 @@ Création de la base de données externe : Ecriture dans la base de données externe : ```4d - $Ptr_1:=$2 // récupération des données de la base hôte via des pointeurs + $Ptr_1:=$2 // récupère des données depuis le projet hôte via des pointeurs $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -227,37 +248,67 @@ Ecriture dans la base de données externe : Lecture dans une base de données externe : ```4d - $Ptr_1:=$2 // accès aux données de la base hôte via des pointeurs + $Ptr_1:=$2 // accède aux données du projet hôte via des pointeurs $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 $Ptr_5:=$6 - - Debut SQL - + + Begin SQL + USE DATABASE DATAFILE :[<>MyDatabase]; - + SELECT ALL ID, kind, name, code, sort_order FROM KEEPIT INTO :$Ptr_1, :$Ptr_2, :$Ptr_3, :$Ptr_4, :$Ptr_5; - + USE DATABASE SQL_INTERNAL; - - Fin SQL + + End SQL ``` + +## Utilisation de formulaires + +- Seuls les "formulaires projet" (formulaires non associés à une table en particulier) peuvent être exploités directement dans un composant. Tous les formulaires projet présents dans le projet matrice peuvent être utilisés par le composant. +- Un composant peut faire appel à des formulaires table du projet hôte. A noter qu’il est nécessaire dans ce cas d’utiliser des pointeurs plutôt que des noms de table entre [] pour désigner les formulaires dans le code du composant. + +> If a component uses the `ADD RECORD` command, the current Input form of the host project will be displayed, in the context of the host project. Par conséquent, si le formulaire comporte des variables, le composant n’y aura pas accès. + +- Vous pouvez publier des formulaires de composants comme sous-formulaires dans les projets hôtes. Avec ce principe, vous pouvez notamment développer des composants proposant des objets graphiques. Par exemple, les Widgets proposés par 4D sont basés sur l’emploi de sous-formulaires en composants. + +> In the context of a component, any referenced project form must belong to the component. For example, inside a component, referencing a host project form using `DIALOG` or `Open form window` will throw an error. + + ## Utilisation de ressources -Les composants peuvent utiliser des ressources. Conformément aux principes de gestion des ressources, les fichiers de ressources des composants doivent être placés dans un dossier Resources, situé à côté du fichier .4db ou .4dc du composant. Si le composant est d’architecture .4dbase (architecture conseillée), le dossier Resources doit être placé à l’intérieur de ce dossier. +Components can use resources located in the Resources folder of the component. Les mécanismes automatiques sont opérationnels : les fichiers XLIFF présents dans le dossier Resources d’un composant seront chargés par ce composant. -Dans une base hôte contenant un ou plusieurs composant(s), chaque composant ainsi que la base hôte dispose de sa propre “chaîne de ressourcesâ€. Les ressources sont cloisonnées entre les différentes bases : il n’est pas possible d’accéder aux ressources du composant A depuis le composant B ou la base hôte. +Dans un projet hôte contenant un ou plusieurs composants, chaque composant ainsi que les projets hôtes ont leur propre «chaîne de ressources» Les ressources sont divisées entre les différents projets : il n'est pas possible d'accéder aux ressources du composant A depuis le composant B ou depuis le projet hôte. + + +## Executing initialization code + +A component can execute 4D code automatically when opening or closing the host database, for example in order to load and/or save the preferences or user states related to the operation of the host database. + +Executing initialization or closing code is done by means of the `On Host Database Event` database method. + +> For security reasons, you must explicitly authorize the execution of the `On Host Database Event` database method in the host database in order to be able to call it. To do this, you must check the **Execute "On Host Database Event" method of the components** option on the Security page the Settings. + + +## Protection des composants : la compilation + +By default, all the project methods of a matrix project installed as a component are potentially visible from the host project. En particulier : + +- The shared project methods are found on the Methods Page of the Explorer and can be called in the methods of the host project. Leur contenu peut être sélectionné et copié dans la zone de prévisualisation de l’Explorateur. Elles peuvent également être visualisées dans le débogueur. However, it's not possible to open them in the Method editor or modify them. +- The other project methods of the matrix project do not appear in the Explorer but they too can be viewed in the debugger of the host project. + +To protect the project methods of a component effectively, simply compile the matrix project and provide it in the form of a .4dz file. When a compiled matrix project is installed as a component: + +- The shared project methods are shown on the Methods Page of the Explorer and can be called in the methods of the host project. However, their contents will not appear in the preview area and in the debugger. +- The other project methods of the matrix project will never appear. -## Aide en ligne des composants -Un mécanisme spécifique a été mis en place afin de permettre aux développeurs d’ajouter des aides en ligne à leurs composants. Le principe est semblable à celui proposé pour les bases de données 4D : -- L’aide du composant doit être fournie sous le forme d’un fichier suffixé .htm, .html ou (Windows uniquement) .chm, -- Le fichier d’aide doit être placé à côté du fichier de structure du composant et porter le même nom que le fichier de structure, -- L’aide est alors automatiquement chargée dans le menu Aide de l’application avec le libellé “Aide de...†suivi du nom du fichier d’aide. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/data-types.md b/website/translated_docs/fr/Concepts/data-types.md index 941e64938aaea9..64dd16968b30fc 100644 --- a/website/translated_docs/fr/Concepts/data-types.md +++ b/website/translated_docs/fr/Concepts/data-types.md @@ -7,26 +7,25 @@ Dans 4D, les données sont gérées selon leur type à deux endroits : dans les Bien qu'ils soient généralement équivalents, certains types de données de la base ne sont pas disponibles dans le langage et sont automatiquement convertis. A l'inverse, certains types de données sont gérés uniquement par le langage. Le tableau suivant liste tous les types de données disponibles, leur prise en charge et leur déclaration : -| Types de données | Pris en charge par la base(1) | Pris en charge par le langage | Déclaration de la variable | -| -------------------------------------------- | ----------------------------- | ----------------------------- | ---------------------------- | -| [Alphanumérique](dt_string.md) | Oui | Converti en texte | - | -| [Texte](Concepts/dt_string.md) | Oui | Oui | `C_TEXT`, `ARRAY TEXT` | -| [Date](Concepts/dt_date.md) | Oui | Oui | `C_DATE`, `ARRAY DATE` | -| [Heure](Concepts/dt_time.md) | Oui | Oui | `C_TIME`, `ARRAY TIME` | -| [Booléen](Concepts/dt_boolean.md) | Oui | Oui | `C_BOOLEAN`, `ARRAY BOOLEAN` | -| [Entier long](Concepts/dt_number.md) | Oui | Converti en entier long | `ARRAY INTEGER` | -| [Entier long](Concepts/dt_number.md) | Oui | Oui | `C_LONGINT`, `ARRAY LONGINT` | -| [Entier long 64 bits](Concepts/dt_number.md) | Oui (SQL) | Converti en réel | - | -| [Réel](Concepts/dt_number.md) | Oui | Oui | `C_REAL`, `ARRAY REAL` | -| [Indéfini](Concepts/dt_null_undefined.md) | - | Oui | - | -| [Null](Concepts/dt_null_undefined.md) | - | Oui | - | -| [Pointeur](Concepts/dt_pointer.md) | - | Oui | `C_POINTER`, `ARRAY POINTER` | -| [Image](Concepts/dt_picture.md) | Oui | Oui | `C_PICTURE`, `ARRAY PICTURE` | -| [BLOB](Concepts/dt_blob.md) | Oui | Oui | `C_BLOB`, `ARRAY BLOB` | -| [Objet](Concepts/dt_object.md) | Oui | Oui | `C_OBJECT`, `ARRAY OBJECT` | -| [Collection](Concepts/dt_collection.md) | - | Oui | `C_COLLECTION` | -| [Variant](Concepts/dt_variant.md)(2) | - | Oui | `C_VARIANT` | - +| Types de données | Pris en charge par la base(1) | Pris en charge par le langage | [déclaration `var`](variables.md#using-the-var-keyword) | [déclaration `C_` ou `ARRAY`](variables.md#using-a-c_-directive) | +| -------------------------------------------- | ----------------------------- | ----------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------- | +| [Alphanumérique](dt_string.md) | Oui | Converti en texte | - | - | +| [Texte](Concepts/dt_string.md) | Oui | Oui | `Texte` | `C_TEXT`, `ARRAY TEXT` | +| [Date](Concepts/dt_date.md) | Oui | Oui | `Date` | `C_DATE`, `ARRAY DATE` | +| [Heure](Concepts/dt_time.md) | Oui | Oui | `Heure` | `C_TIME`, `ARRAY TIME` | +| [Booléen](Concepts/dt_boolean.md) | Oui | Oui | `Booléen` | `C_BOOLEAN`, `ARRAY BOOLEAN` | +| [Entier long](Concepts/dt_number.md) | Oui | Converti en entier long | `Entier long` | `ARRAY INTEGER` | +| [Entier long](Concepts/dt_number.md) | Oui | Oui | `Entier long` | `C_LONGINT`, `ARRAY LONGINT` | +| [Entier long 64 bits](Concepts/dt_number.md) | Oui (SQL) | Converti en réel | - | - | +| [Réel](Concepts/dt_number.md) | Oui | Oui | `Réel` | `C_REAL`, `ARRAY REAL` | +| [Indéfini](Concepts/dt_null_undefined.md) | - | Oui | - | - | +| [Null](Concepts/dt_null_undefined.md) | - | Oui | - | - | +| [Pointeur](Concepts/dt_pointer.md) | - | Oui | `Pointeur` | `C_POINTER`, `ARRAY POINTER` | +| [Image](Concepts/dt_picture.md) | Oui | Oui | `Image` | `C_PICTURE`, `ARRAY PICTURE` | +| [BLOB](Concepts/dt_blob.md) | Oui | Oui | `Blob`, `4D.Blob` | `C_BLOB`, `ARRAY BLOB` | +| [Objet](Concepts/dt_object.md) | Oui | Oui | `Objet` | `C_OBJECT`, `ARRAY OBJECT` | +| [Collection](Concepts/dt_collection.md) | - | Oui | `Collection` | `C_COLLECTION` | +| [Variant](Concepts/dt_variant.md)(2) | - | Oui | `Variant` | `C_VARIANT` | (1) A noter que ORDA gère les champs de la base via des objets (entités). Par conséquent, seuls les types de données disponibles pour ces objets sont pris en charge. Pour plus d'informations, veuillez vous reporter à la description du type [Objet](Concepts/dt_object.md). @@ -39,9 +38,9 @@ Au moment de leur typage via une directive de compilation, les variables reçoiv La valeur par défaut dépend du type et de la catégorie de la variable, du contexte d'exécution (interprété ou compilé), ainsi que, pour le mode compilé, des options de compilation définies dans la Page Compilateur des Propriétés de la base : - Les variables process et interprocess sont toujours positionnées "à zéro" (qui signifie selon les cas 0, chaîne vide, blob vide, pointeur nil, date 00-00-00…) -- Les variables locales sont positionnées : +- Les variables locales sont positionnées : - en mode interprété : à zéro - - en mode compilé, dépendant de l'option **Initialiser les variables locales** des Propriétés de la base : + - en mode compilé, dépendant de l'option **Initialiser les variables locales** des Propriétés de la base : - à zéro lorsque "à zéro" est sélectionné, - à une valeur arbitraire fixe lorsque "à une valeur aberrante" est sélectionné (0x72677267 pour les numériques et les heures, toujours vrai pour les booléens), équivalent de "à zéro" pour les autres, - à "non" : pas d'initialisation, c'est-à-dire que tout ce qui est dans la RAM est utilisé pour les variables; c'est le cas des valeurs déjà utilisées pour les autres variables. **Note :** Il est recommandé d'utiliser "à zéro". @@ -66,21 +65,20 @@ Le tableau suivant illustre ces valeurs par défaut : ## Convertir les types de données -Le langage de 4D comporte des fonctions et des opérateurs vous permettant de convertir des types de données en d’autres types, dans la mesure où de telles conversions ont un sens. 4D assure la vérification des types de données. Ainsi, vous ne pouvez pas écrire : "abc"+0.5+!25/12/96!-?00:30:45?, car cette opération génère une erreur de syntaxe. +Le langage de 4D comporte des fonctions et des opérateurs vous permettant de convertir des types de données en d’autres types, dans la mesure où de telles conversions ont un sens. 4D assure la vérification des types de données. Ainsi, vous ne pouvez pas écrire : "abc"+0.5+!25/12/96!-?00:30:45?, car cette opération génère une erreur de syntaxe. Le tableau ci-dessous liste les types de données pouvant être convertis, le type dans lequel ils peuvent être convertis, ainsi que les fonctions 4D à utiliser : | Types à convertir | en Chaîne | en Numérique | en Date | en Heure | en Booléen | | ----------------- | --------- | ------------ | ------- | -------- | ---------- | -| Chaîne (1) | | Num | Date | Heure | Bool | -| Numérique (2) | Chaine | | | | Bool | -| Date | Chaine | | | | Bool | -| Heure | Chaine | | | | Bool | -| Booléen | | Num | | | | - +| Chaîne (1) | | `Num` | `Date` | `Heure` | `Bool` | +| Numérique (2) | `Chaine` | | | | `Bool` | +| Date | `Chaine` | | | | `Bool` | +| Heure | `Chaine` | | | | `Bool` | +| Booléen | | `Num` | | | | (1) Les chaînes formatées en JSON peuvent être converties en données scalaires, objets ou collections à l'aide de la commande `JSON Parse`. (2) Les valeurs de type Heure peuvent être utilisées en tant que numériques. -**Note :** Ce tableau ne traite pas les conversions de données plus complexes obtenues à l'aide d'une combinaison d'opérateurs et d'autres commandes. \ No newline at end of file +**Note :** Ce tableau ne traite pas les conversions de données plus complexes obtenues à l'aide d'une combinaison d'opérateurs et d'autres commandes. diff --git a/website/translated_docs/fr/Concepts/dt_blob.md b/website/translated_docs/fr/Concepts/dt_blob.md index 332b3816ebfdb4..196188f2989b4c 100644 --- a/website/translated_docs/fr/Concepts/dt_blob.md +++ b/website/translated_docs/fr/Concepts/dt_blob.md @@ -3,64 +3,184 @@ id: blob title: BLOB --- -- Un champ, une variable ou une expression de type BLOB (Binary Large OBjects) est une série contiguë d'octets qui peut être traitée comme un seul objet ou dont les octets peuvent être adressés individuellement. Un BLOB peut être vide (longueur nulle) ou contenir jusqu'à 2147483647 octets (2 Go). -- Lorsque vous travaillez avec un BLOB, il est stocké entièrement en mémoire. Si vous travaillez avec une variable, le BLOB n'existe qu'en mémoire. Si vous travaillez avec un champ de type BLOB, il est chargé en mémoire à partir du disque, comme le reste de l'enregistrement auquel il appartient. -- A l'instar des autres types de champs pouvant contenir une grande quantité de données (comme les champs de type Image), les champs de type BLOB ne sont pas dupliqués en mémoire lorsque vous modifiez un enregistrement. Par conséquent, les résultats renvoyés par `Ancien` et `Modifie` ne sont pas significatifs lorsque ces fonctions sont appliquées à des champs de type BLOB. +A BLOB (Binary Large OBject) field, variable or expression is a contiguous series of bytes that can be treated as one whole object, or whose bytes can be addressed individually. -## Passage des paramètres, pointeurs et résultats de fonctions +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. -Les BLOBs dans 4D peuvent être passés comme paramètres aux commandes 4D ou aux routines des plug-ins qui attendent un paramètre de type BLOB. Les BLOBs peuvent également être passés aux méthodes que vous créez ou être retournés comme résultats de fonctions. +Like 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. -Pour passer un BLOB à une de vos méthodes, vous pouvez aussi définir un pointeur vers le BLOB et passer le pointeur comme paramètre. +## Blob Types + +Using the 4D language, there are two ways to handle a blob: + +- **as a scalar value**: a blob can be stored in a Blob variable or field and altered. +- **as an object (`4D.Blob`)**: a `4D.Blob` is a blob object. You can encapsulate a blob or part of it in a `4D.Blob` without altering the original blob. This method is called [boxing](https://en.wikipedia.org/wiki/Object_type_(object-oriented_programming)#Boxing). For more info on how to instantiate a `4D.Blob`, see [Blob Class](../API/BlobClass.md). + +Each blob type has its advantages. Use the following table to determine which one suits your needs: + +| | Blob | 4D.Blob | +| ------------------------------------ |:----:|:-------:| +| Alterable | Oui | Non | +| Shareable in objects and collections | Non | Oui | +| Passed by reference\* | Non | Oui | +| Performance when accessing bytes | + | - | +| Maximum size | 2GB | Memory | + +\*Unlike the 4D commands designed to take a scalar blob as a parameter, passing a scalar blob to a method duplicates it in memory. When working with methods, using blob objects (`4D.Blob`) is more efficient, as they are passed by reference. + +> By default, 4D sets the maximum size of scalar blobs to 2GB, but this size limit may be lower depending on your OS and how much space is available. + +You cannot use operators on blobs. + +## Checking if a variable holds a scalar blob or a `4D.Blob` + +Use the [Value type](https://doc.4d.com/4dv19R/help/command/en/page1509.html) command to determine if a value is of type Blob or Object. To check that an object is a blob object (`4D.Blob`), use [OB instance of](https://doc.4d.com/4dv19R/help/command/en/page1731.html): + +```4d +var $myBlob: Blob +var $myBlobObject: 4D.Blob + +$type:= Value type($myblobObject) // 38 (object) +$is4DBlob:= OB Instance of($myblobObject; 4D.Blob) //True +``` + +## Passing blobs as parameters + +Scalar blobs and blob objects can be passed as parameters to 4D commands or plug-in routines that expect blob parameters. + +### Passing blobs and blob objects to 4D commands + +You can pass a scalar blob or a `4D.Blob` to any 4D command that takes a blob as a parameter: + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text( $myBlob ; UTF8 text without length ) +``` + +Some 4D commands alter the original blob, and thus do not support the `4D.Blob` type: + +- [DELETE FROM BLOB](https://doc.4d.com/4dv19/help/command/en/page560.html) +- [INSERT IN BLOB](https://doc.4d.com/4dv19/help/command/en/page559.html) +- [INTEGER TO BLOB](https://doc.4d.com/4dv19/help/command/en/page548.html) +- [LONGINT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page550.html) +- [REAL TO BLOB](https://doc.4d.com/4dv19/help/command/en/page552.html) +- [SET BLOB SIZE](https://doc.4d.com/4dv19/help/command/en/page606.html) +- [TEXT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page554.html) +- [VARIABLE TO BLOB](https://doc.4d.com/4dv19/help/command/en/page532.html) +- [LIST TO BLOB](https://doc.4d.com/4dv19/help/command/en/page556.html) +- [SOAP DECLARATION](https://doc.4d.com/4dv19/help/command/en/page782.html) +- [WEB SERVICE SET PARAMETER](https://doc.4d.com/4dv19/help/command/en/page777.html) + +### Passing blobs and blob objects to methods + +You can pass blobs and blob objects (`4D.Blob`) to methods. Keep in mind that unlike blob objects, which are passed by reference, scalar blobs are duplicated in memory when passed to methods. + +### Passing a scalar blob by reference using a pointer + +To pass a scalar blob to your own methods without duplicating it in memory, define a pointer to the variable that stores it and pass the pointer as a parameter. **Voici quelques exemples :** ```4d - // Déclarer une variable de type BLOB - C_BLOB(touteVarBLOB) - // Le BLOB est passé comme paramètre à une commande 4D - SET BLOB SIZE(touteVarBLOB;1024*1024) - // Le BLOB est passé comme paramètre à une routine externe - $CodeErr:=Faites_Quelque_chose_avec_ce_BLOB(touteVarBLOB) - // Le BLOB est passé comme paramètre à une méthode qui retourne un BLOB - C_BLOB(recupBlob) - recupBlob:=Remplir_Blob(touteVarBLOB) - // Un pointeur vers le BLOB est passé comme paramètre à une de vos méthodes - COMPUTE BLOB(->touteVarBLOB) +// Declare a variable of type Blob +var $myBlobVar: Blob +// Pass the blob as parameter to a 4D command + SET BLOB SIZE($myBlobVar;1024*1024) +``` + +```4d +// Pass the blob as parameter to an external routine + $errCode:=Do Something With This blob($myBlobVar) +``` + +```4d +// Pass the blob as a parameter to a method that returns a blob + var $retrieveBlob: Blob + retrieveBlob:=Fill_Blob($myBlobVar) +``` + +```4d +// Pass a pointer to the blob as a parameter to your own method, +COMPUTE BLOB(->$myBlobVar) ``` **Note pour les développeurs de plug ins 4D :** Un paramètre de type BLOB se déclare “&O†(la lettre “O†et non le chiffre “0â€). -## Assignation +## Assigning a blob variable to another -Vous pouvez assigner la valeur d'un BLOB à d'autres BLOBs, comme dans l'exemple suivant. +You can assign a Blob variable to another: **Exemple :** ```4d - // Déclarer deux variables de type BLOB - C_BLOB(vBlobA;vBlobB) - // Fixer la taille du premier BLOB à 10Ko - SET BLOB SIZE(vBlobA;10*1024) - // Assigner le premier BLOB au second - vBlobB:=vBlobA +// Declare two variables of type Blob + var $vBlobA; $vBlobB : Blob +// Set the size of the first blob to 10K + SET BLOB SIZE($vBlobA;10*1024) +// Assign the first blob to the second one + $vBlobB:=$vBlobA +``` + +## Automatic conversion of blob type + +4D automatically converts scalar blobs to blob objects, and vice versa, when they're assigned to each other. Par exemple : + +```4d +// Create a variable of type Blob and an object variable +var $myBlob: Blob +var $myObject : Object + +// Assign that blob to a property of $myObject named "blob" +$myObject:=New object("blob"; $myBlob) + +// The blob stored in $myBlob is automatically converted to a 4D.Blob +$type:= OB Instance of($myObject.blob; 4D.Blob) //True + +// Conversion from 4D.Blob to Blob +$myBlob:= $myObject.blob +$type:= Value type($myBlob) // Blob +``` + +> When converting a `4D.Blob` to a scalar blob, if the size of the `4D.Blob` exceeds the maximum size for scalar blobs, the resulting scalar blob is empty. For example, when the maximum size for scalar blobs is 2GB, if you convert a `4D.Blob` of 2.5GB to a scalar blob, you obtain an empty blob. + +## Modifying a scalar blob + +Unlike blob objects, scalar blobs can be altered. Par exemple : + +```4d +var $myBlob : Blob +SET BLOB SIZE ($myBlob ; 16*1024) ``` -En revanche, il n'existe pas d'opérateur pouvant être utilisé avec des BLOB. +## Individually accessing bytes in a blob -## Adresser le contenu d'un BLOB +#### Accessing a scalar blob's bytes -Chaque octet d'un BLOB peut être adressé individuellement, à l'aide des accolades {...}. Dans un BLOB, les octets sont numérotés de 0 à N-1, N étant la taille du BLOB. Exemple : +You can access individual bytes of a scalar blob using curly brackets. Within a blob, bytes are numbered from 0 to N-1, where N is the size of the BLOB: ```4d // Déclarer une variable de type BLOB - C_BLOB(vBlob) + var $vBlob : Blob // Fixer la taille du BLOB à 256 octets - SET BLOB SIZE(vBlob;256) - // La boucle suivante initialise les 256 octets du BLOB à zéro - Boucle(vOctet;0;Taille BLOB(vBlob)-1) - vBlob{vOctet}:=0 - Fin de boucle + SET BLOB SIZE($vBlob;256) + // Le code suivant initialise les octets du BLOB à zéro + For(vByte;0;BLOB size($vBlob)-1) + $vBlob{vByte}:=0 + End for +``` + +Since you can address all the bytes of a blob individually, you can store whatever you want in a Blob variable or field. + +#### Accessing a `4D.Blob`'s bytes + +Use square brackets to directly access a specific byte in a `4D.Blob` + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text ( $myBlob ; UTF8 text without length ) +$byte:=$myBlob[5] ``` -Comme vous pouvez adresser individuellement tous les octets d'un BLOB, vous pouvez littéralement stocker tout ce que vous voulez dans une variable ou un champ de type BLOB. \ No newline at end of file +Since a `4D.Blob` cannot be altered, you can read the bytes of a `4D.Blob` using this syntax, but not modify them. diff --git a/website/translated_docs/fr/Concepts/dt_boolean.md b/website/translated_docs/fr/Concepts/dt_boolean.md index e1aa54dbb57486..9786533bfe5194 100644 --- a/website/translated_docs/fr/Concepts/dt_boolean.md +++ b/website/translated_docs/fr/Concepts/dt_boolean.md @@ -14,10 +14,10 @@ Les fonctions booléennes de 4D traitent des valeurs telles que `Vrai`, `Faux` e L'exemple suivant retourne Vrai dans la variable monBooléen si l'utilisateur a cliqué sur le bouton monBouton et Faux s'il n'a pas cliqué dessus. . Lorsqu'un bouton reçoit un clic, la variable du bouton prend la valeur 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(monBouton=1) // Si le bouton a reçu un clic + monBooléen:=True// monBooléen prend la valeur True + Else // Si le bouton n'a pas reçu de clic, + monBooléen:=False //monBooléen prend la valeur False End if ``` @@ -31,15 +31,14 @@ monBooléen:=(monBouton=1) 4D supporte deux opérateurs logiques : l'opérateur d'intersection (AND) et l'opérateur de réunion inclusive (OR). Le AND logique retourne TRUE si les deux expressions sont VRAIES. Le OR logique retourne TRUE si au moins une des expressions est VRAIE. Le tableau suivant décrit les opérateurs logiques : -| Opération | Syntaxe | Retourne | Expression | Valeur | -| --------- | ----------------- | -------- | --------------------------- | ------ | -| AND | Booléen & Booléen | Booléen | ("A" = "A") & (15 # 3) | Vrai | -| | | | ("A" = "B") & (15 # 3) | Faux | -| | | | ("A" = "B") & (15 = 3) | Faux | -| OU | Booléen & Booléen | Booléen | ("A" = "A") | (15 # 3) | Vrai | -| | | | ("A" = "B") | (15 # 3) | Vrai | -| | | | ("A" = "B") | (15 = 3) | Faux | - +| Opération | Syntaxe | Retourne | Expression | Valeur | +| --------- | ----------------- | -------- | ---------------------------- | ------ | +| AND | Booléen & Booléen | Booléen | ("A" = "A") & (15 # 3) | Vrai | +| | | | ("A" = "B") & (15 # 3) | Faux | +| | | | ("A" = "B") & (15 = 3) | Faux | +| OU | Booléen & Booléen | Booléen | ("A" = "A") | (15 # 3) | Vrai | +| | | | ("A" = "B") | (15 # 3) | Vrai | +| | | | ("A" = "B") | (15 = 3) | Faux | Voici la "table de vérité" pour l'opérateur logique "AND" : @@ -50,7 +49,6 @@ Voici la "table de vérité" pour l'opérateur logique "AND" : | Faux | Vrai | Faux | | Faux | Faux | Faux | - Voici la "table de vérité" pour l'opérateur logique "OR" : | Expr1 | Expr2 | Expr1 | Expr2 | @@ -60,9 +58,8 @@ Voici la "table de vérité" pour l'opérateur logique "OR" : | Faux | Vrai | Vrai | | Faux | Faux | Faux | - -**Astuce :** Si vous devez calculer une réunion exclusive (le "OU" exclusif) entre Expr1 et Expr2, écrivez : +**Astuce :** Si vous devez calculer une réunion exclusive (le "Ou" exclusif) entre Expr1 et Expr2, écrivez : ```4d (Expr1|Expr2) & Not(Expr1 & Expr2) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/fr/Concepts/dt_collection.md b/website/translated_docs/fr/Concepts/dt_collection.md index 284e7fb77c421f..f473758a319e9b 100644 --- a/website/translated_docs/fr/Concepts/dt_collection.md +++ b/website/translated_docs/fr/Concepts/dt_collection.md @@ -3,9 +3,9 @@ id: collection title: Collection --- -Les collections sont des listes ordonnées de valeurs de types similaires ou différents (texte, nombre, objet, booléen, collection ou null). +Les collections sont des listes ordonnées de valeurs de types similaires ou différents (texte, nombre, date, objet, booléen, collection ou null). -Pour manipuler les variables de type Collection, vous devez utiliser la notation objet (voir [Utiliser la notation objet](Concepts/dt_object.md#syntax-basics)). +Pour manipuler les variables de type Collection, vous devez utiliser la notation objet (voir [Les bases de la syntaxe](Concepts/dt_object.md#syntax-basics)). Pour des informations complémentaires sur les collections 4D, passez le numéro (l'indice) de l'élément entre crochets : @@ -13,7 +13,7 @@ Pour des informations complémentaires sur les collections 4D, passez le numéro collectionRef[expression] ``` -Vous pouvez passer toute expression 4D valide qui retourne un nombre entier positif dans expression. Voici quelques exemples : +Vous pouvez passer toute expression 4D valide qui retourne un nombre entier positif dans *expression*. Voici quelques exemples : ```4d myCollection[5] //accès au 6e élément de la collection @@ -22,7 +22,7 @@ Vous pouvez passer toute expression 4D valide qui retourne un nombre entier posi **Attention :** N'oubliez pas que la numérotation des éléments de collection débute à 0. -Vous pouvez assigner une valeur à un élément de collection ou lire une valeur d'élément de collection à l'aide de la notation objet : +Vous pouvez assigner une valeur à un élément de collection ou lire une valeur d'élément de collection : ```4d myCol[10]:="Mon nouvel élément" @@ -32,7 +32,7 @@ Vous pouvez assigner une valeur à un élément de collection ou lire une valeur Si vous assignez un numéro d'élément plus grand que celui du dernier élément existant dans la collection, la collection est automatiquement redimensionnée et les nouveaux éléments intermédiaires prennent la valeur null : ```4d - C_COLLECTION(myCol) + var myCol : Collection myCol:=New collection("A";"B") myCol[5]:="Z" //myCol[2]=null @@ -47,47 +47,46 @@ Les collections doivent être initialisées à l'aide, par exemple, de la comman Exemple : ```4d - C_COLLECTION($colVar) //création d'une variable 4D de type collection. - $colVar:=New collection //initialisation de la collection et assignation à la variable 4D + var $colVar : Collection //création d'une variable 4D de type collection. $colVar:=New $colVar:=New collection //initialisation de la collection et assignation à la variable 4D ``` ### Collection standard ou collection partagée Vous pouvez créer deux types de collections : -- standard (non partagées), à l'aide de la commande `New collection`. Ces collections peuvent être modifiées sans contrôle d'accès spécifique mais ne peuvent pas être partagées entre les process. -- partagées, à l'aide de la commande `New shared collection`. Le contenu de ces collections peut être partagé entre les process, y compris des process (thread) préemptifs. L'accès à ces collections doit être contrôlé via des structures `Use...End use`. Pour plus d'informations, veuillez vous reporter à la page [Objets partagés et collections partagées](Concepts/shared.md). +- regular (non-shared) collections, using the [`New collection`](API/CollectionClass.md#new-collection) command. Ces collections peuvent être modifiées sans contrôle d'accès spécifique mais ne peuvent pas être partagées entre les process. +- shared collections, using the [`New shared collection`](API/CollectionClass.md#new-shared-collection) command. Le contenu de ces collections peut être partagé entre les process, y compris des process (thread) préemptifs. L'accès à ces collections doit être contrôlé via des structures [`Use...End use`](Concepts/shared.md#useend-use). -## Méthodes de collection +Pour plus d'informations, veuillez vous reporter à la page [Objets partagés et collections partagées](Concepts/shared.md). -Les références de collections 4D bénéficient de méthodes spécifiques (souvent appelées *fonctions méthodes* ou *méthodes membres*). Grâce à la notation objet, ces méthodes sont appliquées sur les références de collections à l'aide de la syntaxe suivante : +## Fonctions de collection -> {$result:=}myCollection.method( {params} ) +Les références de collections 4D bénéficient de fonctions de classe spécifiques (souvent appelées *fonctions méthodes*). Collection functions are listed in the [Class API Reference](API/CollectionClass.md) section. -A noter que, même si elle n'a pas de paramètres, une méthode membre doit être appelée avec les parenthèses ( ) (opérateur d'exécution de méthode), sinon une erreur de syntaxe est générée. - -Par exemple: +Par exemple : ```4d - $newCol:=$col.copy() //copie de $col vers $newCol +$newCol:=$col.copy() //copie de $col vers $newCol $col.push(10;100) //ajout de 10 et 100 à la collection ``` -Certaines méthodes retournent la collection d'origine après modification, de manière à ce que vous puissiez enchaîner les appels dans une même séquence : +Certaines fonctions retournent la collection d'origine après modification, de manière à ce que vous puissiez enchaîner les appels dans une même séquence : ```4d $col:=New collection(5;20) $col2:=$col.push(10;100).sort() //$col2=[5,10,20,100] ``` + ### paramètre cheminPropriété -Plusieurs méthodes de collection admettent un *paramètre nommé cheminPropriété*. Ce paramètre peut contenir : + +Plusieurs fonctions admettent un paramètre nommé _cheminPropriété_. Ce paramètre peut contenir : - soit un nom de propriété d'objet, par exemple "nomComplet" -- soit un chemin de propriété d'objet, c'est-à-dire une séquence hiérarchique de sous-propriétés reliées par des points, par exemple "employé.enfant.prénom". +- soit un chemin de propriété d'objet, c'est-à-dire une séquence hiérarchique de sous-propriétés reliées par des points, par exemple "employé.enfant.prénom". -**Attention :** Lorsqu'un paramètre cheminPropriété est attendu, l'utilisation de noms de propriétés contenant ".", "[ ]", ou des espaces n'est pas prise en charge car cela empêcherait 4D d'analyser correctement le chemin: +**Attention :** Lorsque des fonctions ou un paramètre cheminPropriété sont attendus, l'utilisation de noms de propriétés contenant ".", "[ ]", ou des espaces n'est pas prise en charge car cela empêcherait 4D d'analyser correctement le chemin : ```4d $vmin:=$col.min("My.special.property") //indéfini diff --git a/website/translated_docs/fr/Concepts/dt_date.md b/website/translated_docs/fr/Concepts/dt_date.md index 761f7ea25aa2d2..aa61545205952f 100644 --- a/website/translated_docs/fr/Concepts/dt_date.md +++ b/website/translated_docs/fr/Concepts/dt_date.md @@ -3,8 +3,9 @@ id: date title: Date --- -- Les variables, champs ou expressions de type Date peuvent être compris entre 1/1/100 et 31/12/32767. -- Bien que le mode de représentation des dates par C_DATE permette de manipuler des dates allant jusqu'à l'année 32 767, certaines opérations passant par le système imposent une limite plus basse. +Les variables, champs ou expressions de type Date peuvent être compris entre 1/1/100 et 31/12/32767. + +Bien que le mode de représentation des dates par C_DATE permette de manipuler des dates allant jusqu'à l'année 32 767, certaines opérations passant par le système imposent une limite plus basse. **Note :** Dans ce manuel de référence du langage 4D, les paramètres de type Date dans les descriptions des commandes sont appelés Date, sauf spécification explicite. @@ -18,13 +19,13 @@ Une constante littérale de type date est comprise entre deux points d'exclamati !2015-12-31! ``` -Une date nulle s’écrit *!00-00-00!*. +Une date nulle s’écrit _!00-00-00!_. **Astuce :** L'éditeur de méthodes dispose d'un raccourci pour entrer une date nulle. Pour cela, tapez un point d’exclamation (!) et appuyez sur la touche Entrée. **Notes :** -- Pour des raisons de compatibilité, 4D accepte que l'année soit saisie sur deux chiffres. Dans ce cas, le programme considère qu’elle appartient au XXe ou au XXIe siècle selon qu'elle est supérieure ou inférieure à 30, sauf si ce fonctionnement par défaut a été modifié à l'aide de la commande ```SIECLE PAR DEFAUT``` +- Pour des raisons de compatibilité, 4D accepte que l'année soit saisie sur deux chiffres. Dans ce cas, le programme considère qu’elle appartient au XXe ou au XXIe siècle selon qu'elle est supérieure ou inférieure à 30, sauf si ce fonctionnement par défaut a été modifié à l'aide de la commande `SET DEFAULT CENTURY`. - Si vous avez coché l'option "Utiliser langage français et paramètres régionaux système" (cf. Page Méthodes), vous devez utiliser le format de date défini dans votre système. Généralement dans un environnement français, une date est saisie sous la forme jour/mois/année, une barre oblique "/" séparant les valeurs. ## Opérateurs sur les dates @@ -32,17 +33,17 @@ Une date nulle s’écrit *!00-00-00!*. | Opération | Syntaxe | Retourne | Expression | Valeur | | ------------------- | ---------------- | -------- | ---------------------------- | ------------ | | Différence | Date - Date | Nombre | !2017-01-20! - !2017-01-01! | 19 | -| Addition | Date + Numérique | Date | !2017-01-20! + 9 | !2017-01-29! | -| Soustraction | Date - Numérique | Date | !2017-01-20! - 9 | !2017-01-11! | -| Egalité | Date = Date | Booléen | !2017-01-01! =!2017-01-01! | Vrai | -| | | | !2017-01-20! = !2017-01-01! | Faux | -| Inégalité | Date # Date | Booléen | !2017-01-20! # !2017-01-01! | Vrai | -| | | | !2017-01-20! # !2017-01-20! | Faux | -| Supérieur à | Date > Date | Booléen | !2017-01-20! > !2017-01-01! | Vrai | -| | | | !2017-01-20! > !2017-01-20! | Faux | -| Inférieur à | Date < Date | Booléen | !2017-01-01! < !2017-01-20! | Vrai | -| | | | !2017-01-20! < !2017-01-20! | Faux | -| Supérieur ou égal à | Date >= Date | Booléen | !2017-01-20! >=!2017-01-01! | Vrai | +| Addition | Date + Numérique | Date | !2017-01-20! !2017-01-20! | !2017-01-29! | +| Soustraction | Date - Numérique | Date | !2017-01-20! !2017-01-01! | !2017-01-11! | +| Egalité | Date = Date | Booléen | !2017-01-20! = !2017-01-01! | Vrai | +| | | | !2017-01-20! !2017-01-20! | Faux | +| Inégalité | Date # Date | Booléen | !2017-01-20! !2017-01-01! | Vrai | +| | | | !2017-01-20! !2017-01-20! | Faux | +| Supérieur à | Date > Date | Booléen | !2017-01-20! !2017-01-20! | Vrai | +| | | | !2017-01-20! !2017-01-20! | Faux | +| Inférieur à | Date < Date | Booléen | !2017-01-20! !2017-01-20! | Vrai | +| | | | !2017-01-20! !2017-01-20! | Faux | +| Supérieur ou égal à | Date >= Date | Booléen | !2017-01-20! !2017-01-20! | Vrai | | | | | !2017-01-01!>=!2017-01-20! | Faux | | Inférieur ou égal à | Date \<= Date | Booléen | !2017-01-01!\<=!2017-01-20! | Vrai | -| | | | !2017-01-20!\<=!2017-01-01! | Faux | \ No newline at end of file +| | | | !2017-01-20!\<=!2017-01-01! | Faux | diff --git a/website/translated_docs/fr/Concepts/dt_null_undefined.md b/website/translated_docs/fr/Concepts/dt_null_undefined.md index 624a343102d94d..9647c28135fad6 100644 --- a/website/translated_docs/fr/Concepts/dt_null_undefined.md +++ b/website/translated_docs/fr/Concepts/dt_null_undefined.md @@ -3,6 +3,8 @@ id: null-undefined title: Null et Indefinie --- +Null et Undefined sont des types de données qui gèrent les cas où la valeur d'une expression n'est pas connue. + ## Null Null est un type de données particulier avec une seule valeur possible : **null**. Cette valeur est retournée par une expression qui ne contient aucune valeur. @@ -35,4 +37,4 @@ $null:=($vEmp.children=Null) //Vrai $undefined:=Undefined($vEmp.parent) // Vrai $null:=($vEmp.parent=Null) //Vrai -``` \ No newline at end of file +``` diff --git a/website/translated_docs/fr/Concepts/dt_number.md b/website/translated_docs/fr/Concepts/dt_number.md index 491415b767fb88..62b83be4ad2723 100644 --- a/website/translated_docs/fr/Concepts/dt_number.md +++ b/website/translated_docs/fr/Concepts/dt_number.md @@ -5,8 +5,8 @@ title: Numérique (Réel, Entier, Entier long) Numérique est un terme générique utilisé pour : -- Les champs, variables ou expression de type Réel. Les nombres de type Réel sont compris dans l'intervalle ±1.7e±308 (13 chiffres significatifs). -- Les champs, variables ou expression de type Entier long. Les nombres de type Entier long (4 octets) sont compris dans l'intervalle -2^31..(2^31)-1. +- Les champs, variables ou expression de type Réel. Les nombres de type Réel sont compris dans l'intervalle ±1.7e±308 (13 chiffres significatifs). +- Les champs, variables ou expression de type Entier long. Les nombres de type Entier long (4 octets) sont compris dans l'intervalle -2^31..(2^31)-1. - Les champs, variables ou expression de type Entier. Les nombres de type Entier (2 octets) sont compris dans l'intervalle -32 768..32 767. **Note :** Lorsqu'elles sont utilisées dans le langage 4D, les valeurs des champs de type Entier sont automatiquement converties en Entier long. @@ -15,6 +15,7 @@ Vous pouvez assigner tout nombre d'un type numérique à un nombre d'un autre ty **Note :** Dans ce manuel de référence du langage 4D, quel que soit le type précis des données, les paramètres de type Réel, Entier et Entier long dans les descriptions des commandes sont appelés numériques, sauf spécification explicite. + ## Constantes littérales numériques Une constante littérale numérique s’écrit comme un nombre réel. Voici quelques exemples de constantes numériques : @@ -25,9 +26,9 @@ Une constante littérale numérique s’écrit comme un nombre réel. Voici quel 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. +> Le séparateur décimal est par défaut le point (.), quelle que soit la langue du système. Si vous avez coché l'option "Utiliser langage français et paramètres régionaux système" dans la Page Méthodes des Préférences, vous devez utiliser le séparateur défini dans votre système. -Les nombres négatifs s’écrivent précédés du signe moins (-). Par exemple: +Les nombres négatifs s’écrivent précédés du signe moins (-). Par exemple : ```4d -27 @@ -56,10 +57,9 @@ Les nombres négatifs s’écrivent précédés du signe moins (-). Par exemple: | | | | 11 < 10 | Faux | | Supérieur ou égal à | Nombre >= Nombre | Booléen | 11 >= 10 | Vrai | | | | | 10 >= 11 | Faux | -| Inférieur ou égal à | Nombre <= Number | Booléen | 10 <= 11 | Vrai | +| Inférieur ou égal à | Nombre <= Nombre | Booléen | 10 <= 11 | Vrai | | | | | 11 <= 10 | Faux | - L'opérateur modulo % divise le premier nombre par le second et retourne le reste de la division entière. Voici quelques exemples : - 10 % 2 retourne 0 car la division de 10 par 2 ne donne pas de reste. @@ -67,13 +67,12 @@ L'opérateur modulo % divise le premier nombre par le second et retourne le rest - 10,5 % 2 retourne 0 car le reste n'est pas un nombre entier. **ATTENTION :** - - L'opérateur modulo % retourne des valeurs significatives avec des nombres appartenant à la catégorie des entiers longs (de –2^31 à +2^31 moins 1). Pour calculer le modulo de nombres qui ne sont pas dans cet intervalle, utilisez la fonction `Modulo`. -- L'opérateur division entière \ retourne des valeurs significatives avec des nombres entiers uniquement. +- L'opérateur division entière \ retourne des valeurs significatives avec des nombres entiers uniquement. ### Priorité -L'ordre dans lequel une expression est évaluée s'appelle la priorité. 4D applique strictement une règle de priorité de gauche à droite. L'ordre algébrique n'est pas appliqué. Par exemple: +L'ordre dans lequel une expression est évaluée s'appelle la priorité. 4D applique strictement une règle de priorité de gauche à droite. L'ordre algébrique n'est pas appliqué. Par exemple : ```4d 3+4*5 @@ -81,7 +80,7 @@ L'ordre dans lequel une expression est évaluée s'appelle la priorité. 4D appl retourne 35 car l'expression est évaluée comme 3 + 4, qui donne 7, multiplié par 5, ce qui donne 35. -Les parenthèses doivent être utilisées pour forcer l'ordre de calcul en fonction de vos besoins. Par exemple: +Les parenthèses doivent être utilisées pour forcer l'ordre de calcul en fonction de vos besoins. Par exemple : ```4d 3+(4*5) @@ -91,95 +90,59 @@ retourne 23 car l'expression (4 * 5) est évaluée en premier lieu. Le résultat Des parenthèses peuvent être incluses dans d'autres parenthèses. Assurez-vous qu'il y ait une parenthèse fermante pour chaque parenthèse ouverte. Une parenthèse manquante ou placée à un mauvais endroit peut soit donner un résultat erroné, soit renvoyer une expression invalide. De plus, si vous avez l'intention de compiler vos applications, vous devez vous assurer d'une bonne utilisation des parenthèses. Le compilateur interprètera toute parenthèse manquante ou superflue comme une erreur de syntaxe. -## Bitwise operators -The bitwise operators operates on **Long Integer** expressions or values. +## Opérateurs sur les bits -> 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. +Les opérateurs sur les bits s'appliquent à des expressions ou valeurs de type **Entier long**. -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. +> Si vous passez une valeur de type Entier ou Réel à un opérateur sur les bits, 4D la convertit en Entier long avant de calculer le résultat de l'expression. -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**. +Lorsque vous employez des opérateurs sur les bits, vous devez considérer une valeur de type Entier long comme un tableau de 32 bits. Les bits sont numérotés de 0 à 31, de droite à gauche. -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: +Comme un bit peut valoir 0 (zéro) ou 1, vous pouvez également considérer une valeur de type Entier long comme une expression dans laquelle vous pouvez stocker 32 valeurs de type Booléen. Lorsque le bit vaut 1, la valeur est **Vrai** et lorsque le bit vaut 0, la valeur est **Faux**. -| Opération | Opérateur | Syntaxe | Retourne | -| ---------------------- | --------- | ------------------- | -------------------- | -| 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) | +Une expression utilisant un opérateur sur les bits retourne une valeur de type Entier long, à l'exception de l'opérateur Tester bit avec lequel l'expression retournée est du type Booléen. Le tableau suivant fournit la liste des opérateurs sur les bits et leur syntaxe : +| Opération | Opérateur | Syntaxe | Retourne | +| --------------------- | --------- | ---------------------- | ----------------------- | +| ET | & | long & E. long | E. long | +| OU (inclusif) | | | long | E. long | E. long | +| OU (exclusif) | \^| | long \^| E. long | E. long | +| Décaler bits à gauche | << | E. Long << E. Long | long (voir note n°1) | +| Décaler bits à droite | >> | E. Long >> E. Long | long (voir note n°1) | +| Mettre bit à 1 | ?+ | long ?+ E. long | long (voir note n°2) | +| Mettre bit à 0 | ?- | long ?? | long (voir note n°2) | +| Tester bit | ?? | E. E. long | Booléen (voir note n°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: - -| Opération | 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.| - - ### Exemples - - | Opération | Exemple | 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 | Vrai | \ No newline at end of file +1. Dans les opérations utilisant `Décaler bits à gauche` et `Décaler bits à droite`, le second opérande indique le nombre de décalages de bits du premier opérande à effectuer dans la valeur retournée. Par conséquent, ce second opérande doit être compris entre 0 et 31. Notez qu'un décalage de 0 retourne une valeur inchangée et qu'un décalage de plus de 31 bits retourne 0x00000000 car tous les bits sont perdus. Si vous passez une autre valeur en tant que second opérande, le résultat sera non significatif. +2. Dans les opérations utilisant `Mettre bit à 1`, `Mettre bit à 0` et `Tester bit`, le second opérande indique le numéro du bit sur lequel agir. Par conséquent, ce second opérande doit être compris entre 0 et 31, sinon le résultat de l'expression sera non significatif. + + + +Le tableau suivant dresse la liste des opérateurs sur les bits et de leurs effets : + +| Opération | Description | +| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ET | Chaque bit retourné est le résultat de l'opération ET logique appliquée aux deux bits opérandes.

      Voici la table du ET logique :

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

      En d'autres termes, le bit résultant est 1 si les deux bits d'opérande sont 1; sinon, le bit résultant est 0. | +| OU (inclusif) | Chaque bit retourné est le résultat de l'opération OU logique appliquée aux deux bits opérandes.

      Voici la table du OU inclusif logique :

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

      En d'autres termes, le bit résultant est 1 si au moins l'un des deux bits d'opérande est 1; sinon, le bit résultant est 0. | +| OU (exclusif) | Chaque bit retourné est le résultat de l'opération OU logique appliquée aux deux bits opérandes.

      Voici la table du OU exclusif logique :

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

      En d'autres termes, le bit résultant est 1 si seul l'un des deux bits d'opérande est 1; sinon, le bit résultant est 0. | +| Décaler bits à gauche | La valeur résultante est définie sur la première valeur d'opérande, puis les bits résultants sont décalés vers la gauche du nombre de positions indiqué par le deuxième opérande. Les bits auparavant situés à gauche sont perdus et les nouveaux bits situés à droite ont la valeur 0.

      **Note:** en ne tenant compte que des valeurs positives, le décalage vers la gauche de N bits équivaut à multiplier par 2 ^ N. | +| Décaler bits à droite | La valeur résultante est définie sur la première valeur d'opérande, puis les bits résultants sont décalés vers la droite du nombre de positions indiqué par le deuxième opérande. Les bits auparavant situés à droite sont perdus et les nouveaux bits situés à gauche ont la valeur 0.

      **Note:** en ne tenant compte que des valeurs positives, le décalage vers la droite de N bits équivaut à diviser par 2^N. | +| Mettre bit à 1 | La valeur retournée est la valeur du premier opérande dans lequel le bit dont le numéro est spécifié par le second opérande est positionné à 0. Les autres bits demeurent inchangés. | +| Mettre bit à 0 | La valeur retournée est la valeur du premier opérande dans lequel le bit dont le numéro est spécifié par le second opérande est positionné à 0. Les autres bits demeurent inchangés. | +| Tester bit | Retourne Vrai si, dans le premier opérande, le bit dont le numéro est indiqué par le second opérande vaut 1. Retourne Faux si, dans le premier opérande, le bit dont le numéro est indiqué par le second opérande vaut 0. | + +### Exemples + +| Opération | Exemple | Résultat | +| --------------------- | ------------------------------- | ---------- | +| ET | 0x0000FFFF & 0xFF00FF00 | 0x0000FF00 | +| OU (inclusif) | 0x0000FFFF | 0xFF00FF00 | 0xFF00FFFF | +| OU (exclusif) | 0x0000FFFF \^| 0xFF00FF00 | 0xFF0000FF | +| Décaler bits à gauche | 0x0000FFFF << 8 | 0x00FFFF00 | +| Décaler bits à droite | 0x0000FFFF >> 8 | 0x000000FF | +| Mettre bit à 1 | 0x00000000 ?+ 16 | 0x00010000 | +| Mettre bit à 0 | 0x00010000 ?- 16 | 0x00000000 | +| Tester bit | 0x00010000 ?? 16 | Vrai | diff --git a/website/translated_docs/fr/Concepts/dt_object.md b/website/translated_docs/fr/Concepts/dt_object.md index 6800cd1e2e8aab..07ebc9f5ccb8fe 100644 --- a/website/translated_docs/fr/Concepts/dt_object.md +++ b/website/translated_docs/fr/Concepts/dt_object.md @@ -5,29 +5,30 @@ title: Objet Les variables, champs ou expressions de type objet peuvent contenir des données de divers types. La structure des objets "natifs" 4D est basée sur le principe classique des paires "propriété/valeur" (aussi appelées "attribut/valeur). La syntaxe de ces objets s’inspire du JSON : -- Un nom de propriété est toujours un texte, par exemple "Nom". +- Un nom de propriété est toujours un texte, par exemple "Nom". Il doit suivre des [règles spécifiques](identifiers.md#object-properties). - Une valeur de propriété peut être du type suivant : - - - Nombre (réel, entier long, etc.) + - Numérique (réel, entier long, etc.) - Texte - null - - Booléen + - boolean - Pointeur (stocké tel quel, évalué à l’aide de la commande `JSON Stringify` ou lors d’une copie), - Date (type date ou chaîne au format date ISO) - - Objet (les objets peuvent être imbriqués sur plusieurs niveaux) - - Image(*) + - Objet(1) (les objets peuvent être imbriqués sur plusieurs niveaux) + - Image(2) - collection -(*)Lorsqu'elles sont exposées sous forme de texte dans le débogueur ou exportées en JSON, les propriétés d'objet de type image indiquent "[objet Image]". +(1) Les objets ORDA tels que les [entités](ORDA/dsMapping.md#entity) ou les [sélections d'entités](ORDA/dsMapping.md#entity-selection) ne peuvent pas être stockés dans les **champs objet**; ils sont néanmoins entièrement pris en charge dans les **variables objet** en mémoire. + +(2)Lorsqu'elles sont exposées sous forme de texte dans le débogueur ou exportées en JSON, les propriétés d'objet de type image indiquent "[objet Image]". **Attention :** N'oubliez pas que les noms d'attributs tiennent compte des majuscules/minuscules. -Pour gérer les variables, champs ou expressions de type objet, vous pouvez utiliser la notation objet (cf. [Utiliser la notation objet](Concepts/dt_object.md#syntax-basics)) ou les commandes 4D du thème **Objets (Langage)**. A noter que des commandes spécifiques du thème Requêtes, telles que `CHERCHER PAR ATTRIBUT`, `CHERCHER PAR ATTRIBUT DANS SELECTION` ou `TRIER PAR ATTRIBUT` peuvent être utilisées pour traiter des champs objets. +Vous gérez les variables, les champs ou les expressions de type Objet à l'aide de la [notation objet](dt_object.md#syntax-basics) ou des commandes classiques du thème **Objets (langage)**. A noter que des commandes spécifiques du thème **Requêtes**, telles que `QUERY BY ATTRIBUTE`, `QUERY SELECTION BY ATTRIBUTE` ou `ORDER BY ATTRIBUTE` peuvent être utilisées pour traiter des champs objets. -Chaque valeur de propriété accessible par la notation objet est considérée comme une expression. Lorsque la notation objet est activée dans votre base (voir ci-dessous), vous pouvez utiliser ces valeurs là où une expression 4D est attendue : +Chaque valeur de propriété accessible par la notation objet est considérée comme une expression. Vous pouvez utiliser ces valeurs partout où des expressions 4D sont attendues : -- Dans le code 4D, soit écrites dans les méthodes (éditeur de méthodes) soit externalisées (formules, fichiers d'étiquettes traités par la commande PROCESS 4D TAGS ou le Serveur Web, fichiers d'export, documents 4D Write Pro, etc.), +- Dans le code 4D, soit écrites dans les méthodes (éditeur de méthodes) soit externalisées (formules, fichiers d'étiquettes traités par la commande `PROCESS 4D TAGS` ou le Serveur Web, fichiers d'export, documents 4D Write Pro, etc.), - Dans les zones d'expressions du débogueur et l'explorateur d'exécution, - Dans la liste de propriétés de l'éditeur de formulaires pour les objets formulaires : champ Variable ou Expression et plusieurs expressions de list box et colonnes (source de données, couleur de fond, style ou couleur de police). @@ -36,18 +37,17 @@ Chaque valeur de propriété accessible par la notation objet est considérée c Les objets doivent être initialisés à l'aide, par exemple, de la commande `New object`, sinon une erreur de syntaxe sera générée à la suite d'une lecture ou d'une modification de leurs propriétés. Exemple : - ```4d - C_OBJET($obVar) //création d'une variable 4D de type objet. - $obVar:=Creer objet//initialisation de l'objet et assignation à la variable 4D + C_OBJET($obVar) //création d'une variable 4D de type objet. $obVar:=Creer objet//initialisation de l'objet et assignation à la variable 4D ``` ### Objet standard ou partagé Vous pouvez créer deux types d'objets : -- standard (non partagés), à l'aide de la commande `Creer objet`. Ces objets peuvent être modifiés sans contrôle d'accès spécifique mais ne peuvent pas être partagés entre les process. -- partagés, à l'aide de la commande `New shared object`. Le contenu de ces objets peut être partagé entre les process, y compris des process (thread) préemptifs. L'accès à ces objets doit être contrôlé via des structures `Use...End use`. Pour plus d'informations, veuillez vous reporter à la page [Objets partagés et collections partagées](Concepts/shared.md). +- standard (non partagés), à l'aide de la commande `Creer objet`. Ces objets peuvent être modifiés sans contrôle d'accès spécifique mais ne peuvent pas être partagés entre les process. +- partagés, à l'aide de la commande `New shared object`. Le contenu de ces objets peut être partagé entre les process, y compris des process (thread) préemptifs. L'accès à ces objets doit être contrôlé via des structures `Use...End use`. Pour plus d'informations, veuillez vous reporter à la page [Objets partagés et collections partagées](Concepts/shared.md). + ## Principes de syntaxe @@ -60,7 +60,6 @@ Avec la notation objet, il est possible d'accéder aux propriétés d'objets (au - à l'aide du symbole "point" : > objet.NomPropriété Exemple : - ```4d employee.name:="Smith" ``` @@ -68,7 +67,6 @@ Exemple : - à l'aide d'une chaîne entre crochets : > objet["NomPropriété"] Voici quelques exemples : - ```4d $vName:=employee["name"] //ou : @@ -78,11 +76,9 @@ Voici quelques exemples : ``` Comme la valeur d'une propriété d'objet peut elle-même être un objet ou une collection, la notation objet requiert une séquence de symboles pour accéder aux sous-propriétés, par exemple : - ```4d $vAge:=employee.children[2].age ``` - La notation objet est utilisable avec tout élément de langage qui contient ou retourne un objet, c'est-à-dire : - avec les **objets** eux-mêmes (stockés dans des variables, champs, propriétés d'objets, tableaux d'objets ou éléments de collections). Voici quelques exemples : @@ -94,9 +90,9 @@ La notation objet est utilisable avec tout élément de langage qui contient ou $pop:=$aObjCountries{2}.population //tableau d'objets $val:=$myCollection[3].subvalue //élément de collection ``` - - avec les **commandes 4D** qui retournent des objets. Exemple : + ```4d $measures:=Lire mesures base.DB.tables ``` @@ -125,12 +121,10 @@ La notation objet est utilisable avec tout élément de langage qui contient ou La notation objet pour les pointeurs est semblable à la notation objet standard, à la seule différence que le symbole "point" doit être omis. - Accès direct : - - > pointeurObjet->nomPropriété +> pointeurObjet->nomPropriété - Accès par le nom : - - > pointeurObjet->["nomPropriété"] +> pointeurObjet-> nomPropriété"] Exemple : @@ -156,9 +150,9 @@ Pour plus d'informations, veuillez vous reporter à la description de la command ### Valeur Indéfinie -L'évaluation d'une propriété d'objet peut parfois produire une valeur indéfinie (undefined). En règle générale, lorsque le code tente de lire ou d'affecter des expressions indéfinies, 4D génère des erreurs, hormis dans les cas décrits ci-dessous : +L'évaluation d'une propriété d'objet peut parfois produire une valeur indéfinie (undefined). En règle générale, lorsque le code tente de lire ou d'affecter des expressions indéfinies, 4D génère des erreurs, hormis dans les cas décrits ci-dessous : -- 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 `CLEAR VARIABLE` with them: +- La lecture d'une propriété d'un objet ou d'une valeur indéfini(e) retourne Indéfini ; l'affectation d'une valeur indéfinie à des variables (hors tableaux) a le même effet qu'appeler `CLEAR VARIABLE` avec elles : ```4d C_OBJET($o) @@ -180,7 +174,7 @@ L'évaluation d'une propriété d'objet peut parfois produire une valeur indéfi ```4d C_OBJECT($o) mymethod($o.a) //passage d'un paramètre indéfini - + //Dans la méthode mymethod C_TEXT($1) //Paramètre de type texte // $1 contient "" @@ -197,13 +191,13 @@ L'évaluation d'une propriété d'objet peut parfois produire une valeur indéfi End case ``` -- L'affectation d'une valeur indéfinie à une propriété d'objet existante réinitialise ou efface sa valeur, selon son type : +- L'affectation d'une valeur indéfinie à une propriété d'objet existante réinitialise ou efface sa valeur, selon son type : - Objet, collection, pointeur : Null - Image : image vide - Booléen : False - Chaîne : "" - Numérique : 0 - - Date : !00-00-00! si la base utilise le type date pour les objets, sinon ""! si la base utilise le type date pour les objets, sinon "" + - Date : !00-00-00! si la base utilise le type date pour les objets, sinon "" - Heure : 0 (nombre de ms) - Indéfini, Null : pas de changement @@ -215,25 +209,13 @@ L'évaluation d'une propriété d'objet peut parfois produire une valeur indéfi - L'affectation d'une valeur indéfinie à une propriété d'objet inexistante ne fait rien. -Lorsque des expressions d'un type donné sont attendues dans votre code 4D, vous pouvez vous assurer qu'elles auront le type souhaité même en cas de valeur Indéfinie en les encadrant avec la commande de transtypage 4D appropriée : `String`, `Num`, `Time`, `Date`, `Bool`. Ces commandes retournent une valeur vide du type spécifié lorsque l'expression est évaluée à Indéfinie. Par exemple: +Lorsque des expressions d'un type donné sont attendues dans votre code 4D, vous pouvez vous assurer qu'elles auront le type souhaité même en cas de valeur Indéfinie en les encadrant avec la commande de transtypage 4D appropriée : `String`, `Num`, `Time`, `Date`, `Bool`. Ces commandes retournent une valeur vide du type spécifié lorsque l'expression est évaluée à Indéfinie. Par exemple : ```4d $myString:=Lowercase(String($o.a.b)) //pour être sûr d'obtenir une valeur texte même si indéfinie //afin d'éviter des erreurs dans le code ``` -## Identifiants de propriétés d'objets - -Les règles de nommage des tokens (noms des propriétés d'objets auxquelles on accède via la notation objet) sont plus restrictives que celles qui s'appliquent aux noms d'identifiants 4D standard. Ces noms doivent être conformes à la JavaScript Identifier Grammar (voir ECMA Script standard), notamment : - -- le premier caractère doit être une lettre, un trait de soulignement (_) ou le symbole dollar ($), -- les autres caractères peuvent être des lettres, des chiffres, des traits de soulignement ou des symboles dollar (les espaces sont proscrits), -- ils différencient les caractères majuscules/minuscules. - -**Notes :** - -- L'utilisation d'un champ comme indice de collection, par exemple a.b[[Table1]Id], n'est pas autorisé. Vous devez utiliser une variable intermédiaire. -- La création d'attributs d'objets à l'aide d'une chaîne entre crochets permet de s'affranchir des règles d'ECMA Script. Par exemple, l'attribut $o["Mon Att. nom"] est valide dans 4D, malgré l'espace. Dans ce cas cependant, il ne sera pas possible d'utiliser la notation à points avec cet attribut. ## Exemples @@ -247,12 +229,12 @@ L'utilisation de la notation objet simplifie grandement le code 4D de manipulati $myObj:=New object //création d'un objet et affectation à la variable $myObj.age:=56 $age:=$myObj.age //56 - + // Utilisation de la syntaxe par commande C_OBJECT($myObj2) //déclaration d'une variable objet 4D OB SET($myObj2;"age";42) //création d'un objet et création de la propriété age $age:=OB Get($myObj2;"age") //42 - + // Bien entendu, les deux notations peuvent être utilisées simultanément C_OBJECT($myObj3) OB SET($myObj3;"age";10) @@ -276,8 +258,7 @@ L'utilisation de la notation objet simplifie grandement le code 4D de manipulati $vCity:=$Emp.city //"Paris" $vPhone:=$Emp.phone.home //"0011223344" ``` - -- Vous pouvez accéder aux propriétés d'objets via des chaînes grâce à l'opérateur [ ] +- Vous pouvez accéder aux propriétés d'objets via des chaînes grâce à l'opérateur [ ] ```4d $Emp["city"]:="Berlin" //modification de la propriété city @@ -288,4 +269,4 @@ L'utilisation de la notation objet simplifie grandement le code 4D de manipulati $Emp[$addr+Chaine($i)]:="" End for // crée 4 propriétés vides "address1...address4" dans l'objet $Emp -``` \ No newline at end of file +``` diff --git a/website/translated_docs/fr/Concepts/dt_picture.md b/website/translated_docs/fr/Concepts/dt_picture.md index 2968f325e48c25..2f64925569e2aa 100644 --- a/website/translated_docs/fr/Concepts/dt_picture.md +++ b/website/translated_docs/fr/Concepts/dt_picture.md @@ -3,12 +3,12 @@ id: picture title: Image --- -Un champ, une variable ou expression de type image peut constituer une image Windows ou Macintosh. 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`. +Un champ, une variable ou expression de type image peut constituer une image Windows ou Macintosh. En règle générale, n'importe quelle image peut être mise sur le conteneur de données ou lue à partir du disque, à l'aide des commandes 4D telles que `READ PICTURE FILE`. 4D utilise des API natives pour encoder (écrire) et décoder (lire) les champs et les variables des images sous Windows et macOS. Ces implémentations donnent accès à de nombreux formats natifs, dont le format RAW, couramment utilisé par les appareils photo numériques. -* on Windows, 4D uses WIC (Windows Imaging Component). -* on macOS, 4D uses ImageIO. +* sous Windows, 4D utilise WIC (Windows Imaging Component). +* sous macOS, 4D utilise ImageIO. WIC et ImageIO permettent l’utilisation de métadonnées dans les images. Deux commandes, `SET PICTURE METADATA` et `GET PICTURE METADATA`, vous permettent d'en bénéficier dans vos développements. @@ -16,29 +16,30 @@ WIC et ImageIO permettent l’utilisation de métadonnées dans les images. Deux 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. Ces identifiants peuvent être : +Les formats d'images reconnus par 4D sont retournés par la commande `PICTURE CODEC LIST` sous forme d'identifiants de codecs d'images. Ces identifiants peuvent être : -* une extension (par exemple “.gifâ€) -* As a MIME type (for example “image/jpegâ€) +* une extension (par exemple “.gifâ€) +* Un type Mime (par exemple “image/jpgâ€) La forme utilisée pour chaque format dépend du mode de déclaration du codec au niveau du système d’exploitation. Notez que les listes de codecs disponibles pour la lecture et pour l'écriture peuvent différer, étant donné que les codecs d'encodage peuvent nécessiter des licences spécifiques. -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. +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. Il est donc impératif d'utiliser l'identifiant système retourné par la commande `PICTURE CODEC LIST`. Les formats d'images reconnus par 4D sont retournés par la commande `PICTURE CODEC LIST`. + -## Opérateurs sur les images -| Opération | Syntaxe | Retourne | Action | -| ------------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Concaténation horizontale | Image1 + Image2 | Image | Place Image2 à la droite d'Image1 | -| Concaténation verticale | Image1 / Image2 | Image | Place Image2 au-dessous d'Image1 | -| Superposition exclusive | Image1 & Image2 | Image | Superpose Image2 à Image1 (Image2 est au premier plan). Donne le même résultat que `COMBINE PICTURES(pict3;pict1;Superposition;pict2)` | -| Superposition inclusive | Image1 | Image2 | Image | Superpose Image2 à Image1 et retourne le masque résultant si les deux images sont de même taille. Donne le même résultat que `$equal:=Equal pictures(Pict1;Pict2;Pict3)` | -| Déplacement horizontal | Image + Nombre | Image | Déplace l'image horizontalement d'un nombre de pixels égal à Nombre | -| Déplacement vertical | Image / Nombre | Image | Déplace l'image verticalement d'un nombre de pixels égal à Nombre | -| Redimensionnement | Image * Nombre | Image | Redimensionne l'image au pourcentage Nombre | -| Extension horizontale | Image *+ Nombre | Image | Redimensionne l'image horizontalement au pourcentage Nombre | -| Extension verticale | Image *| Nombre | Image | Redimensionne l'image verticalement au pourcentage Nombre | +## Opérateurs sur les images +| Opération | Syntaxe | Retourne | Action | +| ------------------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Concaténation horizontale | Image1 + Image2 | Image | Place Image2 à la droite d'Image1 | +| Concaténation verticale | Image1 / Image2 | Image | Place Image2 au-dessous d'Image1 | +| Superposition exclusive | Image1 & Image2 | Image | Superpose Image2 à Image1 (Image2 est au premier plan). Donne le même résultat que `COMBINE PICTURES(pict3;pict1;Superposition;pict2)` | +| Superposition inclusive | Image1 | Image | Image | Superpose Image2 à Image1 et retourne le masque résultant si les deux images sont de même taille. Donne le même résultat que `$equal:=Equal pictures(Pict1;Pict2;Pict3)` | +| Déplacement horizontal | Image + Nombre | Image | Déplace l'image horizontalement d'un nombre de pixels égal à Nombre | +| Déplacement vertical | Image / Nombre | Image | Déplace l'image verticalement d'un nombre de pixels égal à Nombre | +| Redimensionnement | Image * Nombre | Image | Redimensionne l'image au pourcentage Nombre | +| Extension horizontale | Image *+ Nombre | Image | Redimensionne l'image horizontalement au pourcentage Nombre | +| Extension verticale | Image * | Image | Image | Redimensionne l'image verticalement au pourcentage Nombre | **Notes :** @@ -47,49 +48,40 @@ Most of the [4D picture management commands](https://doc.4d.com/4Dv18/4D/18/Pict - Des opération supplémentaires peuvent être réalisées sur des images à l'aide de la commande `TRANSFORM PICTURE`. - Il n'existe pas d'opérateurs de comparaison pour les images; en revanche 4D propose d'utiliser la commande `Images egales` pour comparer deux images. + ### Exemples Concaténation horizontale - ```4d cercle+rectangle // Place le rectangle à droite du cercle rectangle+cercle // Place le cercle à droite du rectangle ``` - ![](assets/en/Concepts/concatHor.en.png) ![](assets/en/Concepts/concatHor2.en.png) Concaténation verticale - ```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) Superposition exclusive - ```4d Pict3:=Pict1 & Pict2 // Superposer Pict2 à Pict1 ``` - ![](assets/en/Concepts/superimpoExc.fr.png) Superposition inclusive - ```4d Pict3:=Pict1|Pict2 // Récupérer le masque résultant de la superposition de deux images de même taille ``` - ![](assets/en/Concepts/superimpoInc.fr.png) Déplacement horizontal - ```4d rectangle+50 // Déplace le rectangle 50 pixels vers la droite rectangle-50 // Déplace le rectangle 50 pixels vers la gauche ``` - ![](assets/en/Concepts/hormove.en.png) Déplacement vertical @@ -98,7 +90,6 @@ Déplacement vertical rectangle/50 // Déplace le rectangle 50 pixels vers le bas rectangle/-20 // Déplace le rectangle 20 pixels vers le haut ``` - ![](assets/en/Concepts/vertmove.en.png)![](assets/en/Concepts/vertmove2.en.png) Redimensionnement @@ -107,7 +98,6 @@ Redimensionnement rectangle*1.5 // Augmente la taille du rectangle de 50% rectangle*0.5 // Réduit la taille du rectangle de 50% ``` - ![](assets/en/Concepts/resize.en.png)![](assets/en/Concepts/resisze2.en.png) Extension horizontale @@ -126,4 +116,4 @@ cercle*/2 // Double la hauteur du cercle cercle*/0.25 // La hauteur du cercle est réduite à un quart de sa taille originale ``` -![](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/fr/Concepts/dt_pointer.md b/website/translated_docs/fr/Concepts/dt_pointer.md index 474ca50614809b..882ef996e806e5 100644 --- a/website/translated_docs/fr/Concepts/dt_pointer.md +++ b/website/translated_docs/fr/Concepts/dt_pointer.md @@ -7,20 +7,20 @@ Les variables ou expressions de type Pointeur sont des références à d'autres Les pointeurs sont des outils de programmation avancée. Lorsque vous utilisez le langage de 4D, vous vous référez aux différents objets par l’intermédiaire de leur nom — en particulier les tables, champs, variables et tableaux. Pour appeler l’un d’entre eux, vous écrivez simplement son nom. Cependant, il est parfois utile de pouvoir appeler ou référencer ces éléments sans nécessairement connaître leur nom. C’est ce que permettent les pointeurs. -Le concept de pointeur n’est pas tellement éloigné de la vie courante. Vous vous référez souvent à des choses sans connaître leur identité exacte. Par exemple, vous dites à un ami “Allons-y avec ta voiture†au lieu de “Allons-y avec la voiture immatriculée 123 Abd 99â€. Dans ce cas, vous faites référence à la voiture immatriculée 123 Abd 99 en utilisant l’expression “ta voitureâ€. Par analogie, l’expression “la voiture immatriculée 123 Abd 99†est le nom d’un objet, et “ta voiture†est un pointeur référençant (ou pointant vers) l’objet. +Le concept de pointeur n’est pas tellement éloigné de la vie courante. Vous vous référez souvent à des choses sans connaître leur identité exacte. Par exemple, vous pourriez dire à un ami : «Allons faire un tour en voiture» au lieu de «Allons faire un tour en voiture avec la plaque d’immatriculation 123ABD» Dans ce cas, vous faites référence à la voiture avec la plaque d'immatriculation 123ABD en utilisant l'expression «votre voiture» L'expression «voiture avec plaque d'immatriculation 123ABD» est comme le nom d'un objet, et l'utilisation de l'expression «votre voiture» revient à utiliser un pointeur pour référencer l'objet. Dans ce cas, vous faites référence à la voiture avec la plaque d'immatriculation 123ABD en utilisant l'expression «votre voiture» L'expression «voiture avec plaque d'immatriculation 123ABD» est comme le nom d'un objet, et l'utilisation de l'expression «votre voiture» revient à utiliser un pointeur pour référencer l'objet. La capacité de se référer à quelque chose sans connaître son identité exacte est très utile. Si votre ami s’achetait une nouvelle voiture, l’expression “ta voiture†serait toujours exacte — ce serait toujours une voiture et vous pourriez toujours aller quelque part avec. Les pointeurs fonctionnent de la même manière. Par exemple, un pointeur peut pointer à un moment donné vers un champ numérique appelé Age, et plus tard vers une variable numérique appelée Ancien âge. Dans les deux cas, le pointeur référence des données numériques pouvant être utilisée dans des calculs. Vous pouvez utiliser des pointeurs pour référencer des tables, des champs, des variables, des tableaux et des éléments de tableaux. Le tableau suivant vous fournit un exemple de chaque type : -| Type | Référencement | Référencement | Affectation | -| ----------- | -------------------- | -------------------------- | -------------------------- | -| Table | vpTble:=->[Table] | DEFAULT TABLE(vpTble->) | n/a | -| Champ | vpChp:=->[Table]Chp | ALERT(vpChp->) | vpChp->:="Jean" | -| Variable | vpVar:=->Variable | ALERT(vpVar->) | vpVar->:="Jean" | -| Tableau | vpT:=->Tableau | SORT ARRAY(vpT->;>) | COPY ARRAY(Tab;vpT->) | -| Elém. tabl. | vpElem:=->Tableau{1} | ALERT(vpElem->) | vpElem->:="Jean" | -| Objet | vpObj:=->monObjet | ALERT (vpObj->monAttribut) | vpObj->monAttribut:="John" | +| Type | Référencement | Référencement | Affectation | +| ----------- | ----------------------- | ------------------------ | ------------------------ | +| Table | vpTable:=->[Table] | DEFAULT TABLE(vpTable->) | n/a | +| Champ | vpField:=->[Table]Field | ALERT(vpField->) | vpField->:="John" | +| Variable | vpVar:=->Variable | ALERT(vpVar->) | vpVar->:="John" | +| Tableau | vpArr:=->Array | SORT ARRAY(vpArr->;>) | COPY ARRAY (Arr;vpArr->) | +| Elém. tabl. | vpElem:=->Array{1} | ALERT (vpElem->) | vpElem->:="John" | +| Objet | vpObj:=->myObject | ALERT (vpObj->myProp) | vpObj->myProp:="John" | ## Utiliser des pointeurs : un exemple @@ -30,18 +30,15 @@ Il est plus facile d’expliquer l’utilisation des pointeurs au travers d’un ```4d MaVar:="Bonjour" ``` - -MaVar est désormais une variable contenant la chaîne “Bonjourâ€. Nous pouvons alors créer un pointeur vers MaVar : +$MyVar is now a variable containing the string “Hello.†We can now create a pointer to $MyVar: We can now create a pointer to $MyVar: ```4d C_POINTER($MonPointeur) $MonPointeur:=->MaVar ``` - -Le symbole -> signifie “pointer vers†(ce symbole est formé du caractère “tiret†(-) suivi du caractère “supérieur àâ€). Dans ce cas, il crée un pointeur qui référence ou “pointe vers†$MaVar. Ce pointeur est assigné à MonPointeur via l’opérateur d’assignation. +The -> symbol means “get a pointer to.†The -> symbol means “get a pointer to.†This symbol is formed by a dash followed by a “greater than†sign. Dans ce cas, il crée un pointeur qui référence ou “pointe vers†$MaVar. Ce pointeur est assigné à MonPointeur via l’opérateur d’assignation. $MonPointeur est désormais une variable qui contient un pointeur vers $MaVar. $MonPointeur ne contient pas “Bonjourâ€, la valeur de $MaVar, mais vous pouvez utiliser $MonPointeur pour obtenir cette valeur. L’expression suivante retourne la valeur de $MaVar : - ```4d $MonPointeur-> ``` @@ -49,26 +46,21 @@ $MonPointeur-> Dans ce cas, la chaîne “Bonjour†est retournée. Lorsque le symbole -> est placé derrière un pointeur, la valeur de l’objet vers lequel pointe le pointeur est récupérée. On dit alors qu’on dépointe le pointeur. Il est important de comprendre que vous pouvez utiliser un pointeur suivi du symbole -> partout où vous auriez pu utiliser l’objet pointé lui-même. Vous pouvez placer l’expression $MonPointeur-> partout où vous pourriez utiliser la variable originale $MaVar. Par exemple, l'instruction suivante affiche une boîte de dialogue d’alerte comportant le mot Bonjour : - ```4d ALERTE($MonPointeur->) ``` Vous pouvez également utiliser $MonPointeur pour modifier la valeur de $MaVar. Par exemple, l’instruction suivante stocke la chaîne “Au revoir†dans la variable $MaVar : - ```4d $MonPointeur->:="Au revoir" ``` - Si vous examinez les deux utilisations de l’expression $MonPointeur-> ci-dessus, vous constatez que cette expression se comporte exactement comme si vous aviez utilisé $MaVar à sa place. En résumé : les deux lignes suivantes effectuent la même opération — elles affichent une boîte de dialogue d’alerte contenant la valeur courante de la variable $MaVar : ```4d ALERT($MonPointeur->) ALERT($MaVar) ``` - Les deux lignes suivantes effectuent la même opération ; elles assignent la chaîne "Au revoir" à $MaVar : - ```4d $MonPointeur->:="Au revoir" $MaVar:="Au revoir" @@ -77,7 +69,6 @@ $MaVar:="Au revoir" ## Opérateurs sur les pointeurs Avec : - ```4d // vPtrA et vPtrB pointent sur le même objet vPtrA:=->unObjet @@ -93,45 +84,32 @@ Avec : | Inégalité | Pointeur # Pointeur | Booléen | vPtrA # vPtrC | Vrai | | | | | vPtrA # vPtrB | Faux | - ## Principales utilisations - ### Utiliser des pointeurs vers des tables - Partout où le langage requiert un nom de table, vous pouvez utiliser un pointeur dépointé vers une table. Pour créer un pointeur vers une table, écrivez une instruction du type : - ```4d $TablePtr:=->[touteTable] ``` - Vous pouvez également récupérer un pointeur vers une table à l’aide de la fonction Table. Par exemple : - -```4d +```4d $TablePtr:=Table(20) ``` - Vous pouvez utiliser le pointeur dépointé dans vos commandes, comme ceci : - -```4d +```4d DEFAULT TABLE($TablePtr->) ``` - ### Utiliser des pointeurs vers des champs - Partout où le langage requiert un nom de champ, vous pouvez utiliser un pointeur dépointé vers un champ. Pour créer un pointeur vers un champ, écrivez une ligne d'instruction du type : - ```4d $ChampPtr:=->[uneTable]CeChamp ``` Vous pouvez également récupérer un pointeur vers un champ à l’aide de la fonction `Champ`. Par exemple : - ```4d $ChampPtr:=Champ(1;2) ``` Vous pouvez utiliser le pointeur dépointé dans vos commandes, comme ceci : - ```4d OBJECT SET FONT($FieldPtr->;"Arial") ``` @@ -141,66 +119,51 @@ OBJECT SET FONT($FieldPtr->;"Arial") Lorsque vous utilisez des pointeurs vers des variables locales ou des variables process, vous devez veiller à ce que la variable pointée soit bien définie au moment de l’utilisation du pointeur. Rappelons que les variables locales sont supprimées à la fin de l’exécution de la méthode qui les a créées et les variables process à la fin du process dans lequel elles ont été créées. L’appel d’un pointeur vers une variable qui n’existe plus provoque une erreur de syntaxe en mode interprété (variable indéfinie) mais peut générer une erreur plus conséquente en mode compilé. Les pointeurs vers des variables locales permettent dans de nombreux cas d’économiser des variables process. Les pointeurs vers des variables locales peuvent être utilisés uniquement à l’intérieur d’un même process. Dans le débogueur, lorsque vous affichez un pointeur vers une variable locale déclarée dans une autre méthode, le nom de la méthode d’origine est indiquée entre parenthèses, derrière le pointeur. Par exemple, si vous écrivez dans Méthode1 : - ```4d $MaVar:="Bonjour" Méthode2(->$MaVar) ``` - Dans Méthode2, le débogueur affichera $1 de la façon suivante : | $1 | ->$MaVar (Méthode1) | | -- | ------------------- | | | | - La valeur de $1 sera : | $MaVar(Méthode1) | "Bonjour" | | ---------------- | --------- | | | | - ### Utiliser des pointeurs vers des éléments de tableau - Vous pouvez créer un pointeur vers un élément de tableau. Par exemple, les lignes d'instruction suivantes créent un tableau et assignent à une variable appelée $ElémPtr un pointeur vers le premier élément : - ```4d ARRAY REAL($unTableau;10) // Créer un tableau $ElémPtr:=->$unTableau{1} // Créer un pointeur vers l’élément de tableau ``` Vous pouvez alors utiliser le pointeur dépointé pour assigner une valeur à l’élément, comme ceci : - ```4d $ElémPtr->:=8 ``` ### Utiliser des pointeurs vers des tableaux - Vous pouvez créer un pointeur vers un tableau. Par exemple, les lignes d'instruction suivantes créent un tableau et assignent à la variable nommée $TabPtr un pointeur vers le tableau : - ```4d ARRAY REAL($unTableau;10) // Créer un tableau $TabPtr:=->$unTableau // Créer un pointeur vers le tableau ``` - Il est important de comprendre que ce pointeur pointe vers le tableau, et non vers un élément du tableau. Par exemple, vous pourriez utiliser le pointeur dépointé de la manière suivante : - ```4d SORT ARRAY(TabPtr->;>) // Tri du tableau ``` - Si vous devez vous référer au quatrième élément du tableau à l’aide du pointeur, vous pouvez écrire : - ```4d TabPtr->{4}:=84 ``` ### Passer des pointeurs aux méthodes - -Vous pouvez passer un pointeur en tant que paramètre d’une méthode. A l’intérieur de la méthode, vous pouvez modifier l’objet référencé par le pointeur. Par exemple, la méthode suivante, `Recoit Deux`, reçoit deux paramètres qui sont des pointeurs. Elle passe l’objet référencé par le premier paramètre en caractères majuscules, et l’objet référencé par le second paramètre en caractères minuscules. - +Vous pouvez passer un pointeur en tant que paramètre d’une méthode. A l’intérieur de la méthode, vous pouvez modifier l’objet référencé par le pointeur. Par exemple, la méthode suivante, `Recoit Deux`, reçoit deux paramètres qui sont des pointeurs. Elle passe l’objet référencé par le premier paramètre en caractères majuscules, et l’objet référencé par le second paramètre en caractères minuscules. ```4d // Méthode projet Recoit Deux // $1 – Pointeur vers un champ ou une variable de type Chaîne. Passe la chaîne en majuscules. @@ -210,18 +173,16 @@ Vous pouvez passer un pointeur en tant que paramètre d’une méthode. A l’in ``` L'instruction suivante emploie la méthode `Recoit Deux` pour passer un champ en caractères majuscules et une variable en caractères minuscules : - - takeTwo(->[MaTable]MonChamp;->$MaVar) - +``` +takeTwo(->[MaTable]MonChamp;->$MaVar) +``` Si le champ, [MaTable]MonChamp, contenait la chaîne "dupont", celle-ci deviendrait "DUPONT". Si la variable $MaVar contenait la chaîne "BONJOUR", celle-ci deviendrait "bonjour". Dans la méthode Recoit Deux (et, en fait, à chaque fois que vous utilisez des pointeurs), il est important que les types de données des objets référencés soient corrects. Dans l’exemple précédent, les pointeurs doivent pointer vers des objets contenant une chaîne ou un texte. ### Pointeurs vers des pointeurs - Si vous aimez compliquer les choses à l'extrême (bien que cela ne soit pas nécessaire dans 4D), vous pouvez utiliser des pointeurs pour référencer d'autres pointeurs. Examinons l’exemple suivant : - ```4d $MaVar:="Bonjour" $PointeurUn:=->$MaVar @@ -229,7 +190,6 @@ $PointeurDeux:=->$PointeurUn ($PointeurDeux->)->:="Au revoir" ALERT(($PointeurDeux->)->) ``` - Cet exemple affiche une boîte de dialogue d’alerte contenant “Au revoirâ€. Voici la description de chaque ligne de l’exemple : @@ -238,17 +198,16 @@ Voici la description de chaque ligne de l’exemple : - $PointeurUn := ->$MaVar --> $PointeurUn contient désormais un pointeur vers $MaVar. - $PointeurDeux :=->$PointeurUn --> $PointeurDeux (une nouvelle variable) contient un pointeur vers $PointeurUn, qui, elle, pointe vers $MaVar. - ($PointeurDeux->)-> := "Au revoir" --> $PointeurDeux-> référence le contenu de $PointeurUn, qui elle-même référence $MaVar. Par conséquent, ($PointeurDeux->)-> référence le contenu de $MaVar. Donc, dans ce cas, la valeur "Au revoir" est assignée à la $MaVar. -- ALERTE (($PointeurDeux->)->) --> C'est ici la même chose que précédemment : $PointeurDeux-> référence le contenu de $PointeurUn, qui elle-même référence $MaVar. Par conséquent, ($PointeurDeux->)-> référence le contenu de $MaVar. Donc, dans ce cas, la boîte de dialogue d'alerte affiche le contenu de $MaVar. +- ALERT (($PointeurDeux->)->) --> C'est ici la même chose que précédemment : $PointeurDeux-> référence le contenu de $PointeurUn, qui elle-même référence $MaVar. Par conséquent, ($PointeurDeux->)-> référence le contenu de $MaVar. Donc, dans ce cas, la boîte de dialogue d'alerte affiche le contenu de $MaVar. La ligne suivante place la valeur "Bonjour" dans $MaVar : - ```4d ($PointeurDeux->)->:="Bonjour" ``` La ligne suivante récupère "Bonjour" à partir de $MaVar et la place dans $NouvelleVar : +``` +$NouvelleVar:=($PointeurDeux->)-> +``` - $NouvelleVar:=($PointeurDeux->)-> - - -**Important :** Vous devez utiliser des parenthèses lors des déréférencements multiples. \ No newline at end of file +**Important :** Vous devez utiliser des parenthèses lors des déréférencements multiples. diff --git a/website/translated_docs/fr/Concepts/dt_string.md b/website/translated_docs/fr/Concepts/dt_string.md index 0d246f62713217..53600f83097664 100644 --- a/website/translated_docs/fr/Concepts/dt_string.md +++ b/website/translated_docs/fr/Concepts/dt_string.md @@ -21,7 +21,6 @@ Une constante littérale de type chaîne est incluse entre des guillemets droits Une chaîne vide est spécifiée par la succession de deux guillemets (""). ### Séquences d’échappement - Les séquences d’échappement suivantes peuvent être utilisées dans les chaînes : | Séquence d’échappement | Caractère remplacé | @@ -32,31 +31,29 @@ Les séquences d’échappement suivantes peuvent être utilisées dans les cha | \\\ | \ (Barre oblique inversée) | | \\" | " (Guillemets) | - **Note:** Le caractère \ est utilisé comme séparateur dans les chemins d’accès sous Windows. Vous devez donc saisir un double \\ lorsque vous souhaitez insérer une barre oblique inversée devant un caractère utilisé dans une des séquences d’échappement reconnues par 4D (ex : “C:\\MesDocuments\\Nouveaux.txtâ€). ## Opérateurs sur les chaînes -| Opération | Syntaxe | Retourne | Expression | Valeur | -| ------------------- | ------------------------- | -------- | ----------------------- | -------- | -| Concaténation | Chaîne + Chaîne | Chaine | "abc" + "def" | "abcdef" | -| Répétition | Chaîne * Nombre | Chaine | "ab" * 3 | "ababab" | -| Egalité | Chaîne = Chaîne | Booléen | "abc" = "abc" | Vrai | -| | | | "abc" = "abd" | Faux | -| Inégalité | Chaîne # Chaîne | Booléen | "abc" # "abd" | Vrai | -| | | | "abc" # "abc" | Faux | -| Supérieur à | Chaîne > Chaîne | Booléen | "abd" > "abc" | Vrai | -| | | | "abc" > "abc" | Faux | -| Inférieur à | Chaîne < Chaîne | Booléen | "abc" < "abd" | Vrai | -| | | | "abc" < "abc" | Faux | -| Supérieur ou égal à | Chaîne >= Chaîne | Booléen | "abd" >= "abc" | Vrai | -| | | | "abc" >= "abd" | Faux | -| Inférieur ou égal à | Chaîne <= Chaîne<= String | Booléen | "abc" <= "abd"<= "abd" | Vrai | -| | | | "abd" <= "abc"<= "abc" | Faux | -| Contient mot-clé | Chaîne % Chaîne | Booléen | "Alpha Bravo" % "Bravo" | Vrai | -| | | | "Alpha Bravo" % "ravo" | Faux | -| | Image % Chaîne | Booléen | Expr_image % "Mer" | True (*) | - +| Opération | Syntaxe | Retourne | Expression | Valeur | +| ------------------- | ---------------- | -------- | ----------------------- | -------- | +| Concaténation | Chaîne + Chaîne | Chaine | "abc" + "def" | "abcdef" | +| Répétition | Chaîne * Nombre | Chaine | "ab" * 3 | "ababab" | +| Egalité | Chaîne = Chaîne | Booléen | "abc" = "abc" | Vrai | +| | | | "abc" = "abd" | Faux | +| Inégalité | Chaîne # Chaîne | Booléen | "abc" # "abd" | Vrai | +| | | | "abc" # "abc" | Faux | +| Supérieur à | Chaîne > Chaîne | Booléen | "abd" > "abc" | Vrai | +| | | | "abc" > "abc" | Faux | +| Inférieur à | Chaîne < Chaîne | Booléen | "abc" < "abd" | Vrai | +| | | | "abc" < "abc" | Faux | +| Supérieur ou égal à | Chaîne >= Chaîne | Booléen | "abd" >= "abc" | Vrai | +| | | | "abc" >= "abd" | Faux | +| Inférieur ou égal à | Chaîne <= Chaîne | Booléen | "abc" <= "abd" | Vrai | +| | | | "abd" <= "abc" | Faux | +| Contient mot-clé | Chaîne % Chaîne | Booléen | "Alpha Bravo" % "Bravo" | Vrai | +| | | | "Alpha Bravo" % "ravo" | Faux | +| | Image % Chaîne | Booléen | Expr_image % "Mer" | True (*) | (*) Si le mot-clé "Mer" a été associé à l'image stockée dans l'expression image (champ ou variable). @@ -68,7 +65,6 @@ Les séquences d’échappement suivantes peuvent être utilisées dans les cha ```4d Code de caractere("A")=Code de caractere("a") // 65 n'est pas égal à 97 ``` - - Lors d'une comparaison de chaînes, les caractères diacritiques sont comparés à l'aide de la table de comparaison des caractères de votre machine. Par exemple, les expressions suivantes retournent `VRAI` : ```4d @@ -82,7 +78,7 @@ Code de caractere("A")=Code de caractere("a") // 65 n'est pas égal à 97 ### Le joker (@) -Le langage 4D prend en charge **@** en tant que joker. Ce caractère peut être utilisé dans toute comparaison de chaînes. Il remplace un ou plusieurs caractères. Ainsi, par exemple, l'expression suivante est évaluée à `TRUE` : +Le langage 4D prend en charge **@** en tant que joker. Ce caractère peut être utilisé dans toute comparaison de chaînes. Ainsi, par exemple, l'expression suivante est évaluée à `TRUE` : ```4d "abcdefghij"="abc@" @@ -128,7 +124,6 @@ L'expression suivante sera correctement évaluée : ```4d (Code de caractere($vaValeur[[Longueur($vaValeur)]])#64) ``` - **Note :** Une option 4D du mode Développement vous permet de paramétrer le mode d’interprétation du caractère @ lorsque celui-ci est inclus dans une chaîne de caractères. ### Mots-clés @@ -142,11 +137,9 @@ A la différence des autres comparaisons de chaîne, les recherches par mots-cl "Alpha,Bravo,Charlie"%"Alpha" // Retourne Vrai "Software and Computers"%"comput@" // Retourne Vrai ``` - -> **Notes :** - 4D utilise la librairie ICU pour la comparaison des chaînes (à l'aide des opérateurs <>=#) et la détection des mots-clés. Pour plus d'informations sur les règles mises en oeuvre, reportez-vous à l'adresse http://www.unicode.org/unicode/reports/tr29/#Word_Boundaries. En version japonaise, 4D utilise par défaut la librairie Mecab en lieu et place de ICU pour la détection des mots-clés. +> **Notes :** - 4D utilise la librairie ICU pour la comparaison des chaînes (à l'aide des opérateurs <>=#) et la détection des mots-clés. For more information about the rules implemented, please refer to the following address: http://www.unicode.org/reports/tr29/#Word_Boundaries. En version japonaise, 4D utilise par défaut la librairie Mecab en lieu et place de ICU pour la détection des mots-clés. ## Symboles d'indice de chaîne - Les symboles d'indice de chaîne sont les suivants : [[...]] Ces symboles sont utilisés pour désigner un caractère particulier dans une chaîne. Cette syntaxe vous permet de référencer un caractère dans un champ ou une variable de type Alpha ou Texte. @@ -159,7 +152,7 @@ If(vsNom#"") End if ``` -Lorsque les symboles d'indice de chaîne apparaissent dans une expression, ils retournent le caractère auquel ils font référence sous la forme d'une chaîne d'un caractère. Par exemple: +Lorsque les symboles d'indice de chaîne apparaissent dans une expression, ils retournent le caractère auquel ils font référence sous la forme d'une chaîne d'un caractère. Par exemple : ```4d //L'exemple suivant teste si le dernier caractère de vtText est le caractère "@" @@ -185,10 +178,11 @@ Lorsque vous utilisez les symboles d'indice de chaîne, il est de votre responsa - Ne pas respecter cette condition en mode compilé (sans options) peut entraîner une "corruption" de la mémoire, si, par exemple, vous écrivez un caractère au-delà de la fin d'une chaîne ou d'un texte. - Ne pas respecter cette condition en mode compilé est signalé lorsque le contrôle d'exécution est activé. Si, par exemple, vous exécutez le code suivant : - //Ne pas faire ça ! - vsAnyText:="" - vsAnyText[[1]]:="A" - +``` +//Ne pas faire ça ! + vsAnyText:="" + vsAnyText[[1]]:="A" +``` L'alerte suivante s'affichera en mode compilé : @@ -196,13 +190,14 @@ L'alerte suivante s'affichera en mode compilé : ### Exemple + La méthode projet suivante ajoute une lettre capitale à tous les mots du texte passé en paramètre et retourne le texte modifié : ```4d // Méthode projet de passage en capitale // PasserEnCap ( Texte ) -> Texte // PasserEnCap ( Texte source ) -> Texte avec des lettres capitales - + $0:=$1 $vlLen:=Length($0) If($vlLen>0) @@ -221,6 +216,6 @@ Une fois cette méthode placée dans la base, la ligne : ALERT(Capitalize_text("Bonjour, mon nom est Jean Bon et je me présente aux présidentielles !")) ``` -... affiche l'alerte suivante : +affiche l'alerte suivante : -![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/fr/Concepts/dt_time.md b/website/translated_docs/fr/Concepts/dt_time.md index 03ddffdf913cce..5b2a79f71e970f 100644 --- a/website/translated_docs/fr/Concepts/dt_time.md +++ b/website/translated_docs/fr/Concepts/dt_time.md @@ -3,11 +3,13 @@ id: time title: Heure --- -- Les variables, champs ou expressions de type Heure peuvent être compris entre 00:00:00 et 596,000:00:00. -- Les heures sont stockées dans un format de 24 heures. -- Une valeur de type Heure peut être utilisée en tant que numérique. Le nombre correspondant est le nombre de secondes que cette valeur représente à partir de minuit (00:00:00). +Les variables, champs ou expressions de type Heure peuvent être compris entre 00:00:00 et 596,000:00:00. -**Note :** Dans ce manuel de référence du langage 4D, les paramètres de type Heure dans les descriptions des commandes sont appelés Heure, sauf spécification explicite. +Les heures sont stockées dans un format de 24 heures. + +Une valeur de type Heure peut être utilisée en tant que numérique. Le nombre correspondant est le nombre de secondes que cette valeur représente à partir de minuit (00:00:00). + +**Note :** Dans le manuel de *référence du langage 4D*, les paramètres de type Heure dans les descriptions des commandes sont appelés Heure, sauf spécification explicite. ## Constantes littérales de type heure @@ -29,43 +31,41 @@ Une heure nulle s’écrit ?00:00:00? ## Opérateurs sur les heures -| Opération | Syntaxe | Retourne | Expression | Valeur | -| ------------------- | -------------- | -------- | ----------------------- | ---------- | -| Addition | Time + Time | Heure | ?02:03:04? + ?01:02:03? | ?03:05:07? | -| Soustraction | Time - Time | Heure | ?02:03:04? – ?01:02:03? | ?01:01:01? | -| Addition | Time + Number | Nombre | ?02:03:04? + 65 | 7449 | -| Soustraction | Time – Number | Nombre | ?02:03:04? – 65 | 7319 | -| Multiplication | Time * Number | Nombre | ?02:03:04? * 2 | 14768 | -| Division | Time / Number | Nombre | ?02:03:04? / 2 | 3692 | -| Division entière | Time \ Number | Nombre | ?02:03:04? \ 2 | 3692 | -| Modulo | Time % Time | Heure | ?20:10:00? % ?04:20:00? | ?02:50:00? | -| Modulo | Time % Number | Nombre | ?02:03:04? % 2 | 0 | -| Egalité | Time = Time | Booléen | ?01:02:03? = ?01:02:03? | Vrai | -| | | | ?01:02:03? = ?01:02:04? | Faux | -| Inégalité | Time # Time | Booléen | ?01:02:03? # ?01:02:04? | Vrai | -| | | | ?01:02:03? # ?01:02:03? | Faux | -| Supérieur à | Time > Time | Booléen | ?01:02:04? > ?01:02:03? | Vrai | -| | | | ?01:02:03? > ?01:02:03? | Faux | -| Inférieur à | Time < Time | Booléen | ?01:02:03? < ?01:02:04? | Vrai | -| | | | ?01:02:03? < ?01:02:03? | Faux | -| Supérieur ou égal à | Time >= Time | Booléen | ?01:02:03? >=?01:02:03? | Vrai | -| | | | ?01:02:03? >=?01:02:04? | Faux | -| Inférieur ou égal à | Time <= Time | Booléen | ?01:02:03? <=?01:02:03? | Vrai | -| | | | ?01:02:04? <=?01:02:03? | Faux | - +| Opération | Syntaxe | Retourne | Expression | Valeur | +| ------------------- | --------------- | -------- | ----------------------- | ---------- | +| Addition | Heure + Heure | Heure | ?02:03:04? + ?01:02:03? | ?03:05:07? | +| Soustraction | Heure – Heure | Heure | ?02:03:04? ?01:02:03? | ?01:01:01? | +| Addition | Heure + Nombre | Nombre | ?02:03:04? ?01:02:03? | 7449 | +| Soustraction | Heure – Nombre | Nombre | ?02:03:04? ?01:02:03? | 7319 | +| Multiplication | Heure * Nombre | Nombre | ?02:03:04? ?01:02:03? | 14768 | +| Division | Heure / Nombre | Nombre | ?02:03:04? ?02:03:04? | 3692 | +| Division entière | Heure \ Nombre | Nombre | ?02:03:04? ?01:02:03? | 3692 | +| Modulo | Heure % Heure | Heure | ?20:10:00? % ?04:20:00? | ?02:50:00? | +| Modulo | Heure % Nombre | Nombre | ?02:03:04? % 2 | 0 | +| Egalité | Heure = Heure | Booléen | ?01:02:03? >=?01:02:03? | Vrai | +| | | | ?01:02:03? ?01:02:04? | Faux | +| Inégalité | Heure # Heure | Booléen | ?01:02:03? ?01:02:03? | Vrai | +| | | | ?01:02:03? ?01:02:03? | Faux | +| Supérieur à | Heure > Heure | Booléen | ?01:02:03? < ?01:02:04? | Vrai | +| | | | ?01:02:03? < ?01:02:04? | Faux | +| Inférieur à | Heure < Heure | Booléen | ?01:02:03? ?01:02:04? | Vrai | +| | | | ?01:02:03? ?01:02:03? | Faux | +| Supérieur ou égal à | Heure >= Heure | Booléen | ?01:02:03? >=?01:02:03? | Vrai | +| | | | ?01:02:03? >=?01:02:04? | Faux | +| Inférieur ou égal à | Heure <= Heure | Booléen | ?01:02:03? <=?01:02:03? | Vrai | +| | | | ?01:02:03? <=?01:02:03? | Faux | ### Exemple 1 -To obtain a time expression from an expression that combines a time expression with a number, use the commands `Time` and `Time string`. +Vous pouvez combiner des expressions de type heure et de type numérique à l'aide des fonctions `Time` et `Time string`. -You can combine expressions of the time and number types using the `Time` or `Current time` functions: +Vous pouvez combiner des expressions Time et Number à l'aide des fonctions `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 -$vlSeconds:=Current time+3600 - //The following line assigns to $vHSoon the time it will be in one hour -$vhSoon:=Time(Current time+3600) + // La ligne suivante assigne à la variable $vlSecondes le nombre de secondes qui, dans une heure à partir de maintenant, se seront écoulées depuis minuit + $vlSeconds:=Current time+3600 + // La ligne suivante assigne à la variable $vhBientôt l'heure qu'il sera dans une heure + $vhSoon:=Time(Current time+3600) ``` La seconde ligne peut également être écrite de la façon suivante : @@ -80,8 +80,9 @@ La seconde ligne peut également être écrite de la façon suivante : L'opérateur Modulo permet notamment d'ajouter des heures en tenant compte du format sur 24 heures d'une journée : ```4d -$t1:=?23:00:00? // il est 23h - //on souhaite ajouter 2 heures 30 +$t1:=?23:00:00? // Il est 23 heures. + //On souhaite ajouter 2 heures 30 $t2:=$t1 +?02:30:00? // avec une addition simple, $t2 vaut ?25:30:00? -$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 vaut ?01:30:00? , il est bien 1h30 le lendemain -``` \ No newline at end of file +$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 vaut ?01:30:00? et il est 1h 30 du matin le matin suivant le matin suivant +``` + diff --git a/website/translated_docs/fr/Concepts/dt_variant.md b/website/translated_docs/fr/Concepts/dt_variant.md index 52b7f3249438a6..1c36c7328bb272 100644 --- a/website/translated_docs/fr/Concepts/dt_variant.md +++ b/website/translated_docs/fr/Concepts/dt_variant.md @@ -8,22 +8,22 @@ Variant est un type de variable qui permet d'encapsuler des données de type val Une variable de type variant peut contenir une valeur des types de données suivants : - BLOB -- booléen +- boolean - collection - date - entier long -- objet -- image -- pointeur +- object +- picture +- pointer - réel -- texte -- heure +- Texte +- time - null - indéfini > Les tableaux ne peuvent pas être stockés dans des variables de type variant. -En modes interprété et compilé, le même contenu peut être affecté à une même variable variant. Contrairement aux types de variable standard, le type de contenu des variable de type variant est différent du type de variable variant lui-même. Par exemple: +En modes interprété et compilé, le même contenu peut être affecté à une même variable variant. Contrairement aux types de variable standard, le type de contenu des variable de type variant est différent du type de variable variant lui-même. Par exemple : ```4d C_VARIANT($variant) @@ -37,7 +37,7 @@ $vtype:=Type($variant) // 12 (Is variant) $vtypeVal:=Value type($variant) // 1 (Is real) ``` -Vous pouvez utiliser des variables variant chaque fois qu'elles sont attendues. Vous devez simplement vous assurer que le type de données du contenu de la variable est du type attendu. Lorsque vous accédez à des variables de type variant, seule leur valeur courante est prise en compte. Par exemple: +Vous pouvez utiliser des variables variant chaque fois qu'elles sont attendues. Vous devez simplement vous assurer que le type de données du contenu de la variable est du type attendu. Lorsque vous accédez à des variables de type variant, seule leur valeur courante est prise en compte. Par exemple : ```4d C_VARIANT($v) @@ -57,7 +57,8 @@ Case of ... : (Value type($1)=Is text) ... -End case +//déclaration(s) + End case ``` -> Lorsque des variables variant ne sont pas nécessaires (c'est-à-dire lorsque le type de données est connu), il est recommandé d'utiliser des variables typées standard. Les variables typées standard fournissent de meilleures performances, un code plus clair et permettent au compilateur d'éviter les bugs liés à des types de données passés qui sont inattendus. \ No newline at end of file +> Lorsque des variables variant ne sont pas nécessaires (c'est-à-dire lorsque le type de données est connu), il est recommandé d'utiliser des variables typées standard. Les variables typées standard fournissent de meilleures performances, un code plus clair et permettent au compilateur d'éviter les bugs liés à des types de données passés qui sont inattendus. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/error-handling.md b/website/translated_docs/fr/Concepts/error-handling.md index 1e1075251bf383..c8cfabf43862d5 100644 --- a/website/translated_docs/fr/Concepts/error-handling.md +++ b/website/translated_docs/fr/Concepts/error-handling.md @@ -8,33 +8,33 @@ Le traitement des erreurs consiste à anticiper les erreurs pouvant survenir dan La gestion des erreurs répond à deux besoins principaux : - rechercher et corriger les éventuels bugs et erreurs dans votre code pendant la phase de développement, -- détecter et récupérer des erreurs inattendues dans les applications déployées; vous pouvez notamment remplacer les boîtes de dialogue d'erreur système (disque plein, fichier manquant, etc.) par votre propre interface. +- détecter et récupérer des erreurs inattendues dans les applications déployées; vous pouvez notamment remplacer les boîtes de dialogue d'erreur système (disque plein, fichier manquant, etc.) par votre propre interface. +> > Il est fortement recommandé d'installer une méthode de gestion des erreurs sur 4D Server, pour tout le code exécuté sur le serveur. Cette méthode éviterait d'afficher des boîtes de dialogue inattendues sur le serveur et pourrait consigner les erreurs dans un fichier consacré en vue d'analyses ultérieures. + + +## Erreur ou statut + +De nombreuses fonctions de classe 4D, telles que `entity.save()` ou `transporter.send()`, retournent un objet *status*. Cet objet permet de stocker les erreurs "prévisibles" dans le contexte d'exécution, telles qu'un mot de passe invalide, une entité verrouillée, etc., qui ne stoppe pas l'exécution du programme. Cette catégorie d'erreurs peut être gérée par du code habituel. + +D'autres erreurs "imprévisibles" peuvent inclure une erreur en écriture sur le disque, une panne de réseau ou toute interruption inattendue. Cette catégorie d'erreurs génère des exceptions et doit être traitée par une méthode de gestion des erreurs. -> Il est fortement recommandé d'installer une méthode de gestion des erreurs sur 4D Server, pour tout le code exécuté sur le serveur. Cette méthode éviterait d'afficher des boîtes de dialogue inattendues sur le serveur et pourrait consigner les erreurs dans un fichier consacré en vue d'analyses ultérieures. ## Installer une méthode de gestion des erreurs Dans 4D, toutes les erreurs peuvent être capturées et traitées dans une méthode projet spécifique, la méthode de **gestion des erreurs** (ou méthode de **capture d'erreurs**). -Cette méthode projet est installée pour le process en cours et sera automatiquement appelée pour toute erreur survenant dans le process, en mode interprété ou compilé. Pour *installer* cette méthode projet, il vous suffit d’appeler la commande `APPELER SUR ERREUR` avec le nom de la méthode projet en paramètre. Par exemple: +Cette méthode projet est installée pour le process en cours et sera automatiquement appelée pour toute erreur survenant dans le process, en mode interprété ou compilé. Pour *installer* cette méthode projet, il vous suffit d’appeler la commande `APPELER SUR ERREUR` avec le nom de la méthode projet en paramètre. Par exemple : ```4d APPELER SUR ERREUR("IO_ERRORS") //Installe la méthode de gestion des erreurs ``` Pour ne plus détecter d'erreurs et redonner le contrôle à 4D, appelez la méthode `ON ERR CALL` à l'aide d'une chaîne vide : - ```4d ON ERR CALL("") //redonne le contrôle à 4D ``` -### Portée et composants - -Vous pouvez définir une seule méthode d'erreur pour l'ensemble de l'application ou différentes méthodes par module d'application. Cependant, une seule méthode peut être installée par processus. - -Une méthode de gestion des erreurs installée par la commande `APPELER SUR ERREUR` s'applique uniquement à la base de données en cours d'exécution. En cas d'erreur générée par un **composant**, la méthode `APPELER SUR ERREUR` de la base hôte n'est pas appelée, et inversement. - -La commande `Method called on error` permet de connaître le nom de la méthode installée par `ON ERR CALL` pour le processus en cours. Cela est particulièrement utile dans le contexte des composants car il vous permet de modifier temporairement puis de restaurer la méthode de capture d'erreur de la base de données hôte : +La commande `Method called on error` permet de connaître le nom de la méthode installée par `ON ERR CALL` pour le processus en cours. Cela est particulièrement utile dans le contexte du code générique car il vous permet de modifier temporairement puis de restaurer la méthode de capture d'erreur : ```4d $methCurrent:=Method called on error @@ -46,28 +46,37 @@ La commande `Method called on error` permet de connaître le nom de la méthode ``` +### Portée et composants + +Vous pouvez définir une seule méthode d'erreur pour l'ensemble de l'application ou différentes méthodes par module d'application. Cependant, une seule méthode peut être installée par processus. + +Une méthode de gestion des erreurs installée par la commande `APPELER SUR ERREUR` s'applique uniquement à l'application en cours d'exécution. En cas d'erreur générée par un **composant**, la méthode `APPELER SUR ERREUR` de l'application hôte n'est pas appelée, et inversement. + + ### Gérer les erreurs dans une méthode Dans la méthode d'erreur personnalisée, vous pouvez accéder à plusieurs informations qui vous aideront à identifier l'erreur : - Variables système (*) : - + - `Error` (entier long): Code d'erreur - `Error method` (texte) : nom de la méthode ayant engendré l'erreur - `Error line` (entier long) : Numéro de ligne de la méthode ayant généré l'erreur - - `Error formula` (texte) : formule du code 4D (texte brut) à l'origine de l'erreur. + - `Error formula` (texte) : formule du code 4D (texte brut) à l'origine de l'erreur. (*) 4D conserve automatiquement le nombre de variables appelées **variables système**, qui répondent à différents besoins. Consultez le manuel Language de 4D*. -- La commande `GET LAST ERROR STACK` qui retourne les informations sur la pile d'erreur courant de l'application 4D. +- La commande `GET LAST ERROR STACK` qui retourne les informations sur la pile d'erreur courant de l'application 4D. +- la commande `Get call chain` qui retourne une collection d'objets décrivant chaque étape de la chaîne d'appel de la méthode dans le process courant. + #### Exemple Voici un système de gestion des erreurs simple : ```4d -//installer la méthode de gestion des erreurs - ON ERR CALL("errorMethod") +//installer la méthode de gestion d'erreur +ON ERR CALL("errorMethod") //... exécuter le code ON ERR CALL("") //redonner le contrôle à 4D ``` @@ -89,5 +98,9 @@ $doc:=Open document( "myFile.txt") If (Error=-43) ALERT("File not found.") End if -ON ERR CALL("") -``` \ No newline at end of file +ON ERR CALL.("") +End if +ON ERR CALL.("") +``` + + diff --git a/website/translated_docs/fr/Concepts/flow-control.md b/website/translated_docs/fr/Concepts/flow-control.md index 2f5df614e4043e..63bdf7ae9df3f8 100644 --- a/website/translated_docs/fr/Concepts/flow-control.md +++ b/website/translated_docs/fr/Concepts/flow-control.md @@ -7,11 +7,10 @@ Quelle que soit la simplicité ou la complexité d’une méthode, vous utiliser - **Séquentielle** : une structure séquentielle est une structure simple, linéaire. Une séquence est une série d’instructions que 4D exécute les unes après les autres, de la première à la dernière. Une instruction d'une ligne, fréquemment utilisée pour les méthodes objet, est le cas le plus simple de structure séquentielle. Par exemple : `[Personnes]Nom:=Uppercase([Personnes]Nom)` - **[Conditionnelle](Concepts/cf_branching.md)** : une structure conditionnelle permet aux méthodes de tester une condition et d’exécuter des séquences d’instructions différentes en fonction du résultat. La condition est une expression booléenne, c’est-à-dire pouvant retourner VRAI ou FAUX. L’une des structures conditionnelles est la structure `If...Else...End if`, qui aiguille le déroulement du programme vers une séquence ou une autre. L’autre structure conditionnelle est la structure `Case of...Else...End case`, qui aiguille le programme vers une séquence parmi une ou plusieurs alternatives. -- **[Répétitive](Concepts/cf_looping.md)** : il est très courant, lorsque vous écrivez des méthodes, de rencontrer des cas où vous devez répéter une séquence d’instructions un certain nombre de fois. Pour traiter ces besoins, le langage 4D vous propose plusieurs structures répétitives : +- **[Répétitive](Concepts/cf_looping.md)** : il est très courant, lorsque vous écrivez des méthodes, de rencontrer des cas où vous devez répéter une séquence d’instructions un certain nombre de fois. Pour traiter ces besoins, le langage 4D vous propose plusieurs structures répétitives : - `While...End while` - `Repeat...Until` - `For...End for` - - `For each...End for each` - Les boucles sont contrôlées de deux manières : soit elles se répètent jusqu’à ce qu’une condition soit remplie, soit elles se répètent un nombre fixé de fois. Chaque structure répétitive peut être utilisée de l’une ou l’autre manière, mais les boucles `While` et `Repeat` sont mieux adaptées à la répétition jusqu’à ce qu’une condition soit remplie, alors que les boucles `For` sont mieux adaptées à la répétition un certain nombre de fois. `For each...End for each`, destinée à effectuer des boucles dans les objets et les collections, permet de combiner les deux manières. + - `For each...End for each`
      Les boucles sont contrôlées de deux manières : soit elles se répètent jusqu’à ce qu’une condition soit remplie, soit elles se répètent un nombre fixé de fois. Chaque structure répétitive peut être utilisée de l’une ou l’autre manière, mais les boucles `While` et `Repeat` sont mieux adaptées à la répétition jusqu’à ce qu’une condition soit remplie, alors que les boucles `For` sont mieux adaptées à la répétition un certain nombre de fois. `For each...End for each`, destinée à effectuer des boucles dans les objets et les collections, permet de combiner les deux manières. -**Note :** 4D vous permet d’imbriquer des structures de programmation jusqu’à une “profondeur†de 512 niveaux. \ No newline at end of file +**Note :** 4D vous permet d’imbriquer des structures de programmation jusqu’à une “profondeur†de 512 niveaux. diff --git a/website/translated_docs/fr/Concepts/identifiers.md b/website/translated_docs/fr/Concepts/identifiers.md index 7289362b88eaad..938451bc469eae 100644 --- a/website/translated_docs/fr/Concepts/identifiers.md +++ b/website/translated_docs/fr/Concepts/identifiers.md @@ -3,190 +3,45 @@ id: identifiers title: Identifiants --- -Cette section détaille les règles d'écriture et de nommage appliquées aux divers identifiants utilisés dans le langage de 4D (variables, tableaux, objets, formulaires, etc.). +This section describes the conventions and rules for naming various elements in the 4D language (variables, object properties, tables, forms, etc.). -## Règles de base +> If non-Roman characters are used in the names of the identifiers, their maximum length may be smaller. -Les règles suivantes s'appliquent à toutes les structures de 4D. -- Un nom doit commencer par un caractère alphabétique (une lettre), un tiret bas ou un dollar ("$") (à noter que le symbole dollar peut désigner un élément local, voir ci-dessous). -- Le nom peut ensuite contenir des caractères alphabétiques, des caractères numériques, des espaces et des tirets bas (_). -- Les points (.) et les crochets ([ ]) sont interdits dans les noms de tables, champs, méthodes ou variables. -- Les virgules, barres de fraction, guillemets et deux points (:) sont interdits. -- Les caractères réservés car utilisés comme opérateurs, comme l’astérisque (*) ou le +, sont interdits. -- Les noms réservés, c'est-à-dire les noms de commandes 4D (`Date`, `Time`, etc), les mots-clés (If, For, etc.) et les constantes. -- 4D ignore les espaces superflus. - -### Règles supplémentaires pour les propriétés d'objet et les noms ORDA - -- Les espaces sont interdits. -- Les points (.) et les crochets ([ ]) sont interdits. -- Les noms sont sensibles à la casse. - -### Règles supplémentaires pour SQL - -- Seuls les caractères _0123456789abcdefghijklmnopqrstuvwxyz sont acceptés -- Les noms ne doivent pas comporter de mot-clé SQL (commande, attribut, etc.). - -**Note :** La zone "SQL" de l'inspecteur de l'éditeur de Structure signale automatiquement les caractères non autorisés dans un nom de table ou de champ. - -## Tables - -Vous désignez une table en plaçant son nom entre crochets : [...]. Un nom de table peut contenir jusqu’à 31 caractères. - -Voici quelques exemples : - -```4d -DEFAULT TABLE([Commandes]) -FORM SET INPUT([Clients];"Entrée") -ADD RECORD([Lettres]) -``` - -## Champs - -Vous désignez un champ en spécifiant d’abord la table à laquelle il appartient. Le nom du champ se place immédiatement derrière celui de la table. Un nom de champ peut contenir jusqu’à 31 caractères. - -Voici quelques exemples : - -```4d -[Commandes]Total:=Sum([Ligne]Montant) - QUERY([Clients];[Clients]Nom="Dupont") - [Lettres]Text:=Capitalize text([Lettres]Texte) -``` - -## Variables interprocess - -Vous désignez une variable interprocess en faisant précéder son nom des symboles (<>), formés des caractères “inférieur à†suivi de “supérieur àâ€. - -Le nom d’une variable interprocess peut contenir jusqu’à 31 caractères, symbole <> non compris. - -Voici quelques exemples : - -```4d -<>vlProcessID:=Current process - <>vsKey:=Char(KeyCode) -If(<>vtNom#"") -``` - -## Variables process - -Vous désignez une variable process en écrivant simplement son nom (qui ne doit pas commencer par les symboles $ ou <>). Ce nom peut contenir jusqu’à 31 caractères. - -Voici quelques exemples : - -```4d -vrGrandTotal:=Sum([Comptes]Montant) - If(bValider=1) - vsNomCourant:="" -``` - -## Variables locales - -Vous désignez une variable locale en faisant précéder son nom du symbole dollar ($). Le nom d’une variable locale peut contenir jusqu’à 31 caractères, signe dollar non compris. - -Voici quelques exemples : - -```4d -For($vlRecord;1;100) -If($vsTempVar="Non") -$vsMyString:="Bonjour à tous" -``` ## Tableaux -Vous désignez un tableau en écrivant simplement son nom, qui est celui que vous passez à une commande de déclaration de tableau (par exemple ARRAY LONGINT) lorsque vous créez le tableau. Les tableaux sont des variables, et comme pour les variables, il existe trois types de tableaux qui se différencient par leur portée : - -- Tableaux interprocess, -- Tableaux process, -- Tableaux locaux. +Array names follow the same rules as [variables](#variables). -### Tableaux interprocess -Le nom d’un tableau interprocess est précédé du symbole (<>), formé des caractères “inférieur à†suivi de “supérieur àâ€. +## Classes -Le nom d’un tableau interprocess peut contenir jusqu’à 31 caractères, symbole <> non compris. - -Voici quelques exemples : - -```4d -ARRAY TEXT(<>atSujets;Records in table([Topics])) -SORT ARRAY(<>asMotsClés;>) -ARRAY INTEGER(<>aiGrosTableau;10000) -``` - -### Tableaux process - -Vous désignez un tableau process en écrivant simplement son nom (qui ne doit pas commencer par les symboles $ ou <>). Ce nom peut contenir jusqu’à 31 caractères. - -Voici quelques exemples : - -```4d -ARRAY TEXT(atSujets;Records in table([Topics])) - SORT ARRAY(asMotsClés;>) - ARRAY INTEGER(aiGrosTableau;10000) -``` +The name of a class can contain up to 31 characters. -### Tableaux locaux +A class name must be compliant with standard [property naming rules](#object-properties) for dot notation. -Un tableau est déclaré local lorsque son nom est précédé du signe dollar ($). Le nom d’un tableau local peut contenir jusqu’à 31 caractères, signe dollar non compris. +> Giving the same name to a class and a [database table](#tables) is not recommended, in order to prevent any conflict. -Voici quelques exemples : -```4d -ARRAY TEXT($atSujets;Records in table([Topics])) -SORT ARRAY($asMotsClés;>) -ARRAY INTEGER($aiGrosTableau;10000) -``` -### Eléments de tableaux +## Fonctions -Vous désignez un élément d’un tableau local, process ou interprocess à l’aide d’accolades ({…}). L’élément référencé (l’indice) est indiqué par une expression numérique. +Function names must be compliant with standard [property naming rules](#object-properties) for dot notation. -Voici quelques exemples : +> **Astuce :** préfixer le nom de la fonction par un trait de soulignement ("_") exclura la fonction des fonctionnalités d'auto-complétion dans l'éditeur de code 4D. -```4d - // Adresser un élément d'un tableau interprocess -If(<>asMotsClés{1}="Stop") - <>atSujets{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=<>aiGrosTableau{Taille tableau(<>aiGrosTableau)} - - // Adresser un élément d'un tableau process - If(asMotsClés{1}="Stop") - atSujets{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=aiGrosTableau{Taille tableau(aiGrosTableau)} - - // Adresser un élément d'un tableau local - If($asMotsClés{1}="Stop") - $atSujets{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=$aiGrosTableau{Taille tableau($aiGrosTableau)} -``` -### Eléments de tableaux à deux dimensions -Vous désignez un élément d’un tableau à deux dimensions à l’aide d'une double paire d’accolades ({…}). L’élément référencé (l’indice) est indiqué par deux expressions numériques dans deux paires d’accolades. +## Propriétés des objets -Voici quelques exemples : +The name of an object property (also called object *attribute*) can contain up to 255 characters. -```4d - // Adresser un élément d'un tableau interprocess à deux dimensions - If(<>asMotsClés{$vlLigneSuivante}{1}="Stop") - <>atSujets{10}{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=<>aiGrosTableau{$vlSet}{Taille tableau(<>aiGrosTableau{$vlSet})} - - // Adresser un élément d'un tableau process à deux dimensions - If(asMotsClés{$vlLigneSuivante}{1}="Stop") - atSujets{10}{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=aiGrosTableau{$vlSet}{Taille tableau(aiGrosTableau{$vlSet})} - - // Adresser un élément d'un tableau interprocess à deux dimensions - If($asMotsClés{$vlLigneSuivante}{1}="Stop") - $atSujets{10}{$vlElem}:=[Topics]Sujet - $viValeurSuivante:=$aiGrosTableau{$vlSet}{Taille tableau($aiGrosTableau{$vlSet})} -``` +Object properties can reference scalar values, ORDA elements, class functions, other objects, etc. Whatever their nature, object property names must follow the following rules **if you want to use the [dot notation](dt_object.md#object-properties)**: -## Propriétés (attributs) d'objets +- A property name must begin with a letter, an underscore, or a dollar "$". +- Thereafter, the name can include any letter, digit, the underscore character ("_"), or the dollar character ("$"). +- Property names are case sensitive. -Lorsque la notation objet est activée (cf. Page Compatibilité), vous désignez un attribut d'objet (aussi appelé propriété d'objet) en saisissant son nom précédé d'un point (.) à la suite du nom de l'objet (ou de l'attribut) qui le contient. Un nom d'attribut peut contenir jusqu'à 255 caractères et est sensible à la casse. Voici quelques exemples : @@ -195,37 +50,31 @@ monObjet.monAttribut:="10" $valeur:=$clientObj.data.address.city ``` -**Note :** Des règles supplémentaires s'appliquent aux noms des attributs d'objets (ils doivent être conformes à la spécification ECMA Script). Pour plus d'informations, reportez-vous à la section [Identificateurs des propriétés d'objets](Concepts/dt_object.md#object-property-identifiers). +> If you use **string notation** within square brackets, property names can contain any characters (ex: `myObject["1. First property"]`). + +See also [ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6). -## Formulaires +## Paramètres -Vous désignez un formulaire en utilisant une expression de type chaîne alphanumérique qui représente son nom. Le nom d’un formulaire peut contenir jusqu’à 31 caractères. +Parameter names must start with a `$` character and follow the same rules as [variable names](#variables). Voici quelques exemples : ```4d -FORM SET INPUT([Personnes];"Entrée") -FORM SET OUTPUT([Personnes];"Sortie") - DIALOG([Stock];"Boîte de note"+String($vlStage)) -``` - -## Objets de formulaires - -Vous désignez un objet de formulaire en passant son nom sous forme de chaîne, précédée du paramètre *. Un nom d'objet peut contenir jusqu'à 255 octets. +Function getArea($width : Integer; $height : Integer)-> $area : Integer -Exemple : - -```4d -OBJECT SET FONT(*;"Binfo";"Times") +#DECLARE ($i : Integer ; $param : Date) -> $myResult : Object ``` -**Note :** Ne confondez pas les objets de formulaire (boutons, list box, variables saisissables...) et les objets du langage 4D. Les objets du langage de 4D sont créés et manipulés via la notation objet ou des commandes dédiées. ## Méthodes -Vous désignez une méthode (procédure ou fonction utilisateur) en saisissant son nom. Ce nom peut contenir jusqu’à 31 caractères. +The name of a project method name contain up to 31 characters. -**Note :** Une méthode qui ne retourne pas de résultat est appelée une procédure. Une méthode qui retourne un résultat est appelée une fonction utilisateur. +- A project method name must begin with a letter, a digit, or an underscore +- Thereafter, the name can include any letter or digit, the underscore character ("_"), or the space character. +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Project method names are case insensitive. Voici quelques exemples : @@ -235,9 +84,9 @@ DELETE DUPLICATED VALUES APPLY TO SELECTION([Employés];AUGMENTER SALARIES) ``` -**Conseil :** Nous vous recommandons d'adopter, pour nommer vos méthodes, la même convention que celle utilisée dans le langage de 4D : écrivez les noms de vos procédures en caractères majuscules, et vos fonctions en minuscules avec la première lettre en majuscule. Ainsi, lorsque vous rouvrirez une base au bout de plusieurs mois, vous identifierez immédiatement si une méthode retourne ou non un résultat, en regardant son nom dans la fenêtre de l'Explorateur. +**Conseil :** Nous vous recommandons d'adopter, pour nommer vos méthodes, la même convention que celle utilisée dans le langage de 4D : écrivez les noms de vos procédures en caractères majuscules, et vos fonctions en minuscules avec la première lettre en majuscule. Use uppercase characters for naming your methods; however if a method returns a value, capitalize the first character of its name. Ainsi, lorsque vous rouvrirez un projet au bout de plusieurs mois, vous identifierez immédiatement si une méthode retourne ou non un résultat, en regardant son nom dans la fenêtre de l'Explorateur. -**Note :** Lorsque vous souhaitez appeler une méthode, vous saisissez simplement son nom. Toutefois, certaines commandes intégrées telles que `APPELER SUR EVENEMENT`, ainsi que les commandes des plug-ins, nécessitent que vous passiez le nom d'une méthode en tant que chaîne lorsqu'un paramètre de type méthode est requis. Exemple : + > 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 plug-in commands, expect the name of a method as a string when a method parameter is passed. Voici quelques exemples : @@ -250,174 +99,80 @@ Voici quelques exemples : ON EVENT CALL("GERER EVENEMENTS") ``` -Les méthodes peuvent accepter des paramètres (ou arguments). Les paramètres sont passés à la méthode entre parenthèses, à la suite du nom de la méthode. Chaque paramètre est séparé par des points virgule (;). Les paramètres sont passés à la méthode appelée en tant que variables locales numérotées séquentiellement : $1, $2,…, $n. De plus, plusieurs paramètres consécutifs (s'ils sont les derniers) peuvent être adressés à l'aide de la syntaxe ${n}où n, expression numérique, est le numéro du paramètre. - -A l’intérieur d'une fonction, la variable locale $0 contient la valeur à retourner. - -Voici quelques exemples : - -```4d - // Dans DROP SPACES, $1 est pointeur sur le champ [Personnes]Nom - DROP SPACES(->[Personnes]Nom) - - // Dans Créateur tableau : - // - $1 est un numérique qui vaut 1 - // - $2 est un numérique qui vaut 5 - // - $3 est un texte ou un alpha qui vaut "Super" - // - La valeur résultante est assignée à $0 - $vsRésultat:=Calc creator(1;5;"Super") - - // Dans Poubelle : - // - Les trois paramètres sont de type Texte ou Alpha - // - Vous pouvez y accéder par $1, $2 ou $3 - // - Vous pouvez y accéder en écrivant, par exemple, ${$vlParam} où $vlParam vaut 1, 2 ou 3 - // - La valeur résultante est assignée à $0 - vtClone:=Dump("est";"le";"il") -``` - -## Commandes de plug-ins - -Vous désignez une commande de plug-in en écrivant son nom tel qu'il est défini dans le plug-in. Le nom d'une commande de plug-in peut contenir jusqu'à 31 caractères. - -Voici quelques exemples : - -```4d -$erreur:=SMTP_From($smtp_id;"henry@gmail.com") -``` - -## Ensembles - -Dans 4D, il existe deux types d'ensembles qui se distinguent par leur portée : - -- Ensembles interprocess -- Ensembles process - -On peut également distinguer un troisième type d'ensemble, spécifique à 4D Server : -- Ensembles clients -### Ensembles interprocess -Un ensemble est déclaré interprocess lorsque son nom, qui est une expression de type chaîne alphanumérique, est précédé du symbole (<>), formé des caractères “inférieur à†suivi de “supérieur àâ€. -Le nom d’un ensemble interprocess peut comporter jusqu’à 255 caractères, symbole <> non compris. +## Tables et champs -### Ensembles process +You designate a table by placing its name between brackets: \[...]. You designate a field by first specifying the table to which it belongs (the field name immediately follows the table name). -Vous déclarez un ensemble process en passant simplement une expression de type chaîne qui représente son nom (et qui ne doit pas débuter par les symboles <> ou $). Le nom d’un ensemble process peut comporter jusqu’à 255 caractères. +A table name and field name can contain up to 31 characters. -### Ensembles clients - -Le nom d'un ensemble client doit être précédé du symbole dollar ($). Ce nom peut comporter jusqu'à 255 caractères, symbole dollar non compris. +- A table or field name must begin with a letter, an underscore, or a dollar ("$") +- Le nom peut ensuite contenir des caractères alphabétiques, des caractères numériques, des espaces et des tirets bas (_). +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Additional rules must be respected when the database must be handled via SQL: only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted, and the name must not include any SQL keywords (command, attribute, etc.). -**Note :** Les ensembles sont gérés par le serveur. Dans certains cas, pour des raisons particulières ou d'optimisation, vous pourrez avoir besoin d'utiliser des ensembles localement, sur les postes clients. Pour cela, il vous suffit de créer des ensembles clients. Voici quelques exemples : ```4d - // Ensembles interprocess -USE SET("<>Enregistrements supprimés") -CREATE SET([Clients];"<>Commandes clients") - If(Records in set("<>Sélection"+Chaine($i))>0) - // Ensembles process - USE SET("Enregistrements supprimés") - CREATE SET([Clients];"Commandes clients") - If(Records in set("Sélection"+Chaine($i))>0) - // Ensembles client - USE SET("$Enregistrements supprimés") - CREATE SET([Clients];"$Commandes clients") - If(Records in set("$Sélection"+Chaine($i))>0) -``` - -## Sélections temporaires +FORM SET INPUT([Clients];"Entry") +ADD RECORD([Letters]) +[Orders]Total:=Sum([Line]Amount) +QUERY([Clients];[Clients]Name="Smith") +[Letters]Text:=Capitalize text([Letters]Text) -Dans 4D, il existe deux types de sélections temporaires, qui se distinguent par leur portée : - -- Sélections temporaires interprocess -- Sélections temporaires process. +``` -### Sélections temporaires interprocess +> Giving the same name to a table and a [class](#classes) is not recommended, in order to prevent any conflict. -Vous désignez une sélection temporaire interprocess en utilisant une expression de type chaîne débutant par le symbole (<>), formé des caractères “inférieur à†suivi de “supérieur àâ€. +## Variables -Le nom d'une sélection temporaire interprocess peut contenir jusqu’à 255 caractères, symbole <> non compris. +The name of a variable can be up to 31 characters, not including the scope symbols ($ or <>). -### Sélections temporaires process +- A variable name must begin with a letter, an underscore, or a dollar ("$") for [parameters](parameters.md) and [local variables](variables.md#local-variables), or "<>" for [interprocess variables](variables.md#interprocess-variables). +- A digit as first character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Thereafter, the name can include any letter or digit, and the underscore character ("_"). +- Space character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Variable names are case insensitive. -Vous déclarez une sélection temporaire process en passant simplement une expression de type chaîne qui représente son nom (et qui ne doit pas débuter par les symboles <> ou $). Le nom d’une sélection temporaire process peut comporter jusqu’à 255 caractères. Voici quelques exemples : ```4d - // Sélection temporaire interprocess - USE NAMED SELECTION([Clients];"<>ParCodePostal") - // Sélection temporaire process - USE NAMED SELECTION([Clients];"ParCodePostal") +For($vlRecord;1;100) //local variable +$vsMyString:="Hello there" //local variable +var $vName; $vJob : Text //local variales +If(bValidate=1) //process variable +<>vlProcessID:=Current process() //interprocess variable ``` -## Process - -En mode mono-utilisateur, ou sur le poste client en mode client/serveur, il existe deux types de process : +## Other names -- Process globaux -- Process locaux. +In the 4D language, several elements have their names handled as strings: **forms**, **form objects**, **named selections**, **processes**, **sets**, **menu bars**, etc. -### Process globaux +Such string names can contain up to 255 characters, not including the "$" or "<>" characters (if any). -Vous déclarez un process global en passant une expression de type chaîne de caractères qui représente son nom (qui ne doit pas commencer par le symbole $). Le nom d’un process peut comporter jusqu’à 255 caractères. - -### Process locaux - -Vous déclarez un process local lorsque son nom est précédé du symbole dollar ($). Le nom d’un process peut comporter jusqu’à 255 caractères, symbole dollar non compris. +- String names can contain any characters. +- String names are case insensitive. Voici quelques exemples : ```4d - // Lancer le process global "Ajouter Clients" - $vlProcessID:=New process("P_AJOUT_CLIENTS";48*1024;"Ajouter Clients") - // Lancer le process local "$Suivre Souris" - $vlProcessID:=New process("P_SUIVRE_SOURIS";16*1024;"$Suivre Souris") -``` - -## Résumé des conventions d'écriture dans 4D - -Le tableau suivant résume les principes de nommage des identifiants dans les méthodes. - -| Identifiant | Longueur max. | Exemple | -| --------------------------------- | ------------- | ------------------------------ | -| Table | 31 | [Factures] | -| Champ | 31 | [Employés]Nom | -| Variable/Tableau interprocess | <> + 31 | <><>vlProcessSuivantID | -| Variable/Tableau process | 31 | vsNomCourant | -| Variable/Tableau local(e) | $ + 31 | $vlCompteurLocal | -| Propriétés d'objets | 255 | $o.monAttribut | -| Formulaire | 31 | "Formulaire Web perso" | -| Objet de formulaire | 255 | "MonBouton" | -| Méthode | 31 | M_AJOUTER_CLIENTS | -| Commande de plug-in | 31 | WR INSERER TEXTE | -| Ensemble interprocess | <> + 255 | "<>Enregistrements à archiver" | -| Ensemble process | 255 | "Enregistrements actuels" | -| Ensemble client | $ + 255 | "$Sujets précédents" | -| Sélection temporaire | 255 | "Employés de A à Z" | -| Sélection temporaire interprocess | <> + 255 | "<>Employés de Z à A" | -| Process local | $ + 255 | "$SuivreEvénements" | -| Process global | 255 | "*P_MODULE_FACTURES*" | -| Sémaphore | 255 | "monsémaphore" | - - -**Note :** En cas d'utilisation de caractères non romans dans les noms des identifiants, leur taille maximum peut être inférieure. - -## Résoudre les conflits de noms - -Veillez à utiliser des noms uniques pour les différents éléments de votre base. Si un identifiant d’un certain type a le même nom qu’un autre identifiant d’un autre type (par exemple, si un champ est baptisé Personnes et qu’une variable est également nommée Personnes), 4D utilise un système de priorité. - -4D identifie les noms utilisés dans les méthodes en fonction de l’ordre de priorité suivant : +DIALOG([Storage];"Note box"+String($vlStage)) +OBJECT SET FONT(*;"Binfo";"Times") +USE NAMED SELECTION([Customers];"Closed")//Process Named Selection +USE NAMED SELECTION([Customers];"<>ByZipcode") //Interprocess Named Selection + //Starting the global process "Add Customers" +$vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") + //Starting the local process "$Follow Mouse Moves" +$vlProcessID:=New process("P_MOUSE_SNIFFER";16*1024;"$Follow Mouse Moves") +CREATE SET([Customers];"Customer Orders")//Process set +USE SET("<>Deleted Records") //Interprocess set +If(Records in set("$Selection"+String($i))>0) //Client set -1. Champs -2. Commandes -3. Méthodes -4. Commandes de plug-in -5. Constantes prédéfinies -6. Variables. +``` -Par exemple, 4D dispose d’une fonction interne appelée `Date`. Si vous appelez *Date* une de vos méthodes, 4D considérera `Date` comme étant la fonction interne et non votre méthode. Vous ne pourrez pas appeler votre méthode. En revanche, si vous nommez un champ “Dateâ€, 4D considérera que vous souhaitez appeler votre champ et non la fonction intégrée. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/interpreted.md b/website/translated_docs/fr/Concepts/interpreted.md index 00219ca3efaf09..248a2ee3602d1b 100644 --- a/website/translated_docs/fr/Concepts/interpreted.md +++ b/website/translated_docs/fr/Concepts/interpreted.md @@ -6,18 +6,17 @@ title: Modes interprété et compilé Les applications 4D fonctionnent en mode **interprété** ou en mode **compilé** : - En mode interprété, les déclarations sont lues et traduites en langage machine lorsqu'elles sont exécutées. Vous pouvez ajouter ou modifier le code là où vous le souhaitez, l'application se met à jour automatiquement. -- En mode compilé, toutes les méthodes sont lues et traduites une seule fois, lors de la compilation. Par la suite, l'application contient uniquement des instructions au niveau de l'assemblage, il n'est donc plus possible de modifier le code. +- En mode compilé, toutes les méthodes sont lues et traduites une seule fois, lors de la compilation. Par la suite, l'application contient uniquement des instructions au niveau de l'assemblage, il n'est donc plus possible de modifier le code. Les avantages procurés par le compilateur sont les suivants : -- **Vitesse :** votre base de données s'exécute de 3 à 1000 fois plus vite. -- **Vérification du code** : la cohérence interne du code de votre application de base de données est entièrement contrôlée. Les conflits de logique et de syntaxe sont détectés. -- **Protection :** une fois votre base compilée, vous pouvez en supprimer le code interprété. Alors, la base compilée dispose des mêmes fonctionnalités que la base originale, à la différence près que la structure et les méthodes ne peuvent plus être visualisées ni modifiées délibérément ou par inadvertance. -- **Application indépendantes "double-cliquables" **: une base compilée peut également être transformée en application indépendante (sous Windows, des fichiers ".EXE") comportant sa propre icône. -- **Exécution en mode préemptif** : seul le code compilé peut être exécuté dans un process préemptif. +- **Vitesse :** votre application s'exécute de 3 à 1000 fois plus vite. +- **Vérification du code** : la cohérence interne du code de votre application est entièrement contrôlée. Les conflits de logique et de syntaxe sont détectés. +- **Protection :** une fois votre application compilée, vous pouvez en supprimer le code interprété. Alors, l'application compilée dispose des mêmes fonctionnalités que la base originale, à la différence près que la structure et les méthodes ne peuvent plus être visualisées ni modifiées délibérément ou par inadvertance. +- **Application indépendantes "double-cliquables"** : une application compilée peut également être transformée en application indépendante (sous Windows, des fichiers ".EXE") comportant sa propre icône. +- **Exécution en mode préemptif** : seul le code compilé peut être exécuté dans un process préemptif. ## Différences entre le code interprété et le code compilé - Bien que l'application fonctionnera de la même manière en modes interprété et compilé, il est important de connaitre les différences que l'on peut rencontrer pendant la saisie du code qui sera compilé. L'interpréteur de 4D est généralement plus souple que le compilateur. | Compilé | Interprété | @@ -31,12 +30,11 @@ Bien que l'application fonctionnera de la même manière en modes interprété e | Si vous avez coché la propriété "Peut être exécutée dans un process préemptif" pour la méthode, le code ne doit pas appeler de commandes thread-unsafe ou d'autres méthodes thread-unsafe. | Les propriétés du process préemptif sont ignorées | | La commande `APPELER 4D` est nécessaire pour appeler des boucles spécifiques | Il est toujours possible d'interrompre 4D | - ## Utiliser les directives du compilateur avec l'interpréteur -Les directives de compilateur ne sont pas requises pour les bases non compilées. L'interpréteur type automatiquement chaque variable selon son utilisation dans la déclaration, et une variable peut être retypée librement dans la base. +Les directives de compilateur ne sont pas requises pour les applications non compilées. L'interpréteur type automatiquement chaque variable selon son utilisation dans la déclaration, et une variable peut être retypée librement dans le projet d'application. -Grâce à cet aspect flexible, il est possible qu'une base agisse différemment en modes interprété et compilé. +Grâce à cet aspect flexible, il est possible qu'une application agisse différemment en modes interprété et compilé. Par exemple, si vous écrivez : @@ -44,8 +42,7 @@ Par exemple, si vous écrivez : C_ENTIER LONG(MyInt) ``` -et ailleurs dans la base, vous écrivez : - +et ailleurs dans l'application, vous écrivez : ```4d MyInt:=3.1416 ``` @@ -54,7 +51,8 @@ Dans cet exemple, `MyInt` se voit assigner la même valeur (3) dans les modes in L'interpréteur 4D utilise des directives de compilateur pour typer les variables. Lorsque l'interpréteur rencontre une directive de compilateur, il type la variable en fonction de la directive. Si une déclaration ultérieure tente d'affecter une valeur incorrecte (ex : affecter une valeur alphanumérique à une variable numérique), l'affectation n'aura pas lieu et générera une erreur. -L'ordre d'apparition des deux déclarations importe peu au compilateur, car il scanne d'abord la base dans son intégralité pour les directives du compilateur. En revanche, l'interpréteur n'est pas systématique. Il interprète les déclarations dans leur ordre d'exécution. Cet ordre peut évidemment changer d'une session à l'autre, en fonction de ce que fait l'utilisateur. C'est pourquoi il est important de concevoir votre base de données afin que vos directives de compilateur s'exécutent avant n'importe quelle déclaration contenant des variables déclarées. +L'ordre d'apparition des deux déclarations importe peu au compilateur, car il scanne d'abord le projet dans son intégralité pour les directives du compilateur. En revanche, l'interpréteur n'est pas systématique. Il interprète les déclarations dans leur ordre d'exécution. Cet ordre peut évidemment changer d'une session à l'autre, en fonction de ce que fait l'utilisateur. C'est pourquoi il est important de concevoir votre projet afin que vos directives de compilateur s'exécutent avant n'importe quelle déclaration contenant des variables déclarées. + ## Utiliser des pointeurs pour éviter les retypages @@ -90,7 +88,6 @@ $0:=Length($result) ``` La méthode peut alors être appelée : - ```4d $var1:="my text" $var2:=5.3 @@ -100,4 +97,4 @@ $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 +``` diff --git a/website/translated_docs/fr/Concepts/methods.md b/website/translated_docs/fr/Concepts/methods.md index 14afb12ec1c0de..2f548892f915f9 100644 --- a/website/translated_docs/fr/Concepts/methods.md +++ b/website/translated_docs/fr/Concepts/methods.md @@ -4,35 +4,41 @@ title: Méthodes --- -Une méthode est un morceau de code qui exécute une ou plusieurs actions. Dans le langage 4D, il existe deux catégories de méthodes : +Une méthode est un morceau de code qui exécute une ou plusieurs actions. Une méthode est composée de plusieurs lignes d’instructions. Une ligne d’instructions effectue une action. Cette ligne d’instruction peut être simple ou complexe. Cette ligne peut être aussi longue que vous voulez (elle peut comporter jusqu’à 32 000 caractères, ce qui est normalement suffisant pour la plupart des instructions). -- **Les méthodes intégrées**, fournies par 4D ou des développeurs tiers, qui peuvent être appelées uniquement par votre code. Les méthodes intégrées incluent : - - - Les commandes et fonctions de 4D API, telles que `ALERT` ou `Current date`. - - Les méthodes associées à des collections ou à des objets natifs, telles que `collection.orderBy()` ou `entity.save()`. - - Les commandes issues de plug-ins ou de composants, fournies par 4D ou des développeurs tiers, telles que `SVG_New_arc`. - - Les méthodes intégrées sont détaillées dans le manuel *4D Langage* ou dans les manuels consacrés aux plug-ins et aux composants. +La taille maximale d’une méthode est limitée à 2 Go de texte ou 32 000 lignes de code. -- Les **méthodes projets**, dans lesquelles vous pouvez écrire votre propre code pour exécuter des actions personnalisées. Une fois que votre méthode projet est créée, elle devient partie intégrante du langage de la base dans laquelle elle a été créée. Une méthode projet est composée de plusieurs lignes d’instructions. Une ligne d’instructions effectue une action. Cette ligne d’instruction peut être simple ou complexe. Cette ligne peut être aussi longue que vous voulez (elle peut comporter jusqu’à 32 000 caractères, ce qui est normalement suffisant pour la plupart des instructions). La taille maximale d’une méthode est limitée à 2 Go de texte ou 32 000 lignes d’instructions. +## Types de méthodes + +Dans le langage 4D, il existe plusieurs catégories de méthodes : La catégorie dépend de la façon dont elle a été appelée : La catégorie dépend de la façon dont elle a été appelée : La catégorie dépend de la façon dont elle a été appelée : + +| Type | Contexte d'appel | Accepte les paramètres | Description | +| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Méthode** | À la demande, lorsque le nom de la méthode projet est appelé (voir [Appel de méthodes de projet](#calling-project-methods)) | Oui | Peut contenir du code pour exécuter des actions personnalisées. Une fois que votre méthode projet est créée, elle devient partie intégrante du langage du projet. | +| **Méthode objet (widget)** | Automatique, lorsqu'un événement implique l'objet auquel la méthode est associée | Non | Propriété d'un objet formulaire (également appelé widget) | +| **Méthode formulaire** | Automatique, lorsqu'un événement implique le formulaire auquel la méthode est associée | Non | Propriété d'un formulaire. Vous pouvez utiliser une méthode formulaire pour gérer les données et les objets, mais il est généralement plus simple et plus efficace d'utiliser une méthode objet dans ces cas de figure. | +| **Trigger** (ou *méthode table*) | Automatique, chaque fois que vous manipulez les enregistrements d'une table (Ajouter, Supprimer, Modifier) | Non | Propriété d'une table. Les triggers sont des méthodes qui peuvent éviter les opérations 'illégales' effectuées avec les enregistrements de votre base. | +| **Méthode base** | Automatique, lorsqu'un événement se produit sur la session de travail | Oui (prédéfini) | Il existe 16 méthodes base dans 4D. Voir la section Méthodes bases | + + +> The 4D Language also supports **Class functions**, that can be called in the context of an object instance. Class functions can be built-in (*e.g.* `collection.orderBy()` or `entity.save()`), or [created by the 4D developer](classes.md#class-function). -**Note :** 4D fournit également des méthodes spécifiques exécutées automatiquement en fonction de la base ou des événements formulaires. Voir [Méthodes spécialisées](#specialized-methods). ## Méthodes projet Une méthode projet peut tenir les rôles suivants, en fonction de la manière dont elle est exécutée et utilisée : -- Sous-routine et fonction -- Méthode associée à un objet +- Sous-routine +- Objet formule - Méthode de menu - Méthode de gestion de process - Méthode de gestion d’événements et d'erreurs -### Sous-routines et fonctions +### Sous-routines Une sous-routine est une méthode projet qui peut être considérée comme une méthode asservie. D’autres méthodes lui demandent d’effectuer des tâches. Une sous-routine qui retourne une valeur est appelée une fonction. -Lorsque vous avez écrit une méthode projet, elle devient partie intégrante du langage de la base dans laquelle elle a été créée. Vous pouvez alors l'appeler à partir d'autres méthodes projets, ou à partir des [méthodes prédéfinies](#predefined-methods) de la même manière que vous appelez les commandes intégrées de 4D. Une méthode projet utilisée de cette manière est appelée une sous-routine. +Lorsque vous créez une méthode projet, elle devient partie intégrante du langage du prjoet dans lequel elle a été créée. Vous pouvez alors l'appeler à partir d'autres méthodes (méthode projet, méthode objet, etc.) de la même manière que vous appelez les commandes intégrées de 4D. Une méthode projet utilisée de cette manière est appelée une sous-routine. L'utilisation de sous-routines procure les avantages suivants : @@ -41,7 +47,7 @@ L'utilisation de sous-routines procure les avantages suivants : - Modification plus facile des méthodes, - Création de code modulaire -Imaginons par exemple que vous travaillez avec une base de clients. A mesure que vous construisez la base, vous vous apercevez que vous répétez souvent certaines tâches, telles que la recherche d’un client et la modification de son enregistrement. Le code nécessaire à l’accomplissement de cette opération pourrait être : +Imaginons par exemple que vous travaillez sur un projet de clients. A mesure que vous construisez le projet, vous vous apercevez que vous répétez souvent certaines tâches, telles que la recherche d’un client et la modification de son enregistrement. Le code nécessaire à l’accomplissement de cette opération pourrait être : ```4d // Recherche d'un client @@ -52,36 +58,37 @@ Imaginons par exemple que vous travaillez avec une base de clients. A mesure que MODIFY RECORD([Clients]) ``` -Si vous n’utilisez pas de sous-routines, vous devrez écrire ce code à chaque fois que vous voudrez modifier l’enregistrement d’un client. Si cette opération peut être réalisée dans dix endroits différents de votre base, vous devrez la réécrire dix fois. Grâce aux sous-routines, vous ne l’écrirez qu’une seule fois en tout. C’est le premier avantage des sous-routines : réduire la quantité de code à écrire. +Si vous n’utilisez pas de sous-routines, vous devrez écrire ce code à chaque fois que vous voudrez modifier l’enregistrement d’un client. Si cette opération peut être réalisée dans dix endroits différents de votre projet, vous devrez la réécrire dix fois. Grâce aux sous-routines, vous ne l’écrirez qu’une seule fois en tout. C’est le premier avantage des sous-routines : réduire la quantité de code à écrire. -Si le code ci-dessus était une méthode projet appelée `MODIFIER CLIENT`, vous l’exécuteriez simplement en inscrivant son nom dans une autre méthode. Par exemple, pour modifier l’enregistrement d’un client puis l’imprimer, vous n’auriez qu’à écrire : +Si le code ci-dessus était une méthode projet appelée `MODIFY_CUSTOMER`, vous l’exécuteriez simplement en inscrivant son nom dans une autre méthode. Par exemple, pour modifier l’enregistrement d’un client puis l’imprimer, vous n’auriez qu’à écrire : ```4d - MODIFY CUSTOMER - PRINT SELECTION([Clients]) + MODIFY_CUSTOMER + PRINT SELECTION([Customers]) ``` -Cette possibilité simplifie énormément vos méthodes. Dans l’exemple ci-dessus, il n’est pas nécessaire de savoir comment fonctionne la méthode `MODIFIER CLIENT`, mais uniquement ce qu’elle fait. C’est le deuxième avantage que vous pouvez tirer de l’utilisation de sous-routines : la clarification de votre code. Ainsi, ces méthodes deviennent en quelque sorte des extensions du langage de 4D. +Cette possibilité simplifie énormément vos méthodes. Dans l’exemple ci-dessus, il n’est pas nécessaire de savoir comment fonctionne la méthode `MODIFY_CUSTOMER`, mais uniquement ce qu’elle fait. C’est le deuxième avantage que vous pouvez tirer de l’utilisation de sous-routines : la clarification de votre code. Ainsi, ces méthodes deviennent en quelque sorte des extensions du langage de 4D. Si vous devez modifier votre mode de recherche des clients, comme dans notre exemple, il vous suffit de modifier une seule méthode, et non dix. C’est un autre avantage des sous-routines : faciliter les modifications de votre code. -Avec les sous-routines, vous rendez votre code modulaire. Cela signifie simplement que vous dissociez votre code en modules (sous-routines), chacun d’entre eux effectuant une tâche logique. Examinez le code suivant, tiré d’une base de gestion de comptes chèques : +Avec les sous-routines, vous rendez votre code modulaire. Cela signifie simplement que vous dissociez votre code en modules (sous-routines), chacun d’entre eux effectuant une tâche logique. Examinez le code suivant, tiré d’un projet de gestion de compte courant : ```4d - FIND CLEARED CHECKS // Rechercher les chèques émis - RECONCILE ACCOUNT // Rapprocher le compte -PRINT CHECK BOOK REPORT // Imprimer un relevé + FIND_CLEARED _CHECKS // Rechercher les chèques émis + RECONCILE_ACCOUNT // Rapprocher le compte +PRINT_CHECK_BOOK_REPORT // Imprimer un relevé ``` -Même pour quelqu’un qui ne connaît pas la base, le code est clair. Il n’est pas nécessaire d’examiner chaque sous-routine. Elles peuvent contenir de nombreuses lignes d’instructions et effectuer des opérations complexes, mais l’important est ce qu’elles font. Nous vous conseillons de découper votre code en tâches logiques, ou modules, à chaque fois que c’est possible. +Même pour quelqu’un qui ne connaît pas le projet, le code est clair. Il n’est pas nécessaire d’examiner chaque sous-routine. Elles peuvent contenir de nombreuses lignes d’instructions et effectuer des opérations complexes, mais l’important est ce qu’elles font. Nous vous conseillons de découper votre code en tâches logiques, ou modules, à chaque fois que c’est possible. + -### Méthodes associées à des objets +### Objet formule Vous pouvez encapsuler vos méthodes projets dans les objets **formule** et les appeler à partir de vos objets. The `Formula` or `Formula from string` commands allow you to create native formula objects that you can encapsulate in object properties. Vous pouvez ainsi appliquer vos méthodes objets personnalisées. -Pour exécuter une méthode stockée dans une propriété objet, utilisez l'opérateur **( )** après un nom de la propriété, comme suit : Par exemple: +To execute a method stored in an object property, use the **( )** operator after the property name. Par exemple : ```4d //myAlert @@ -93,7 +100,7 @@ ALERT("Hello world!") ```4d C_OBJECT($o) $o:=New object("custom_Alert";Formula(myAlert)) -$o.custom_Alert() //displays "Hello world!" +$o.custom_Alert() //affiche "Hello world!" ``` La syntaxe avec des crochets est également prise en charge : @@ -117,10 +124,10 @@ 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") +// équivalent à $result:=fullName("param1";"param2") ``` -Lorsqu'elles sont associées à la fonction `This`, ces méthodes objets vous permettent d'écrire du code générique très puissant. Par exemple: +Lorsqu'elles sont associées à la fonction `This`, ces méthodes objets vous permettent d'écrire du code générique très puissant. Par exemple : ```4d //méthode fullName2 @@ -133,12 +140,14 @@ La méthode agit ensuite comme un nouvel attribut calculé qui peut être ajout ```4d C_OBJECT($o) $o:=New object("firstName";"Jim";"lastName";"Wesson") -$o.fullName:=Formula(fullName2) //add the method +$o.fullName:=Formula(fullName2) //ajouter la méthode $result:=$o.fullName() //$result = "Jim Wesson" ``` + + A note que même si elle n'a pas de paramètres, une méthode objet devant être exécutée doit être appelée avec des parenthèses ( ). En appelant uniquement une seule propriété, une nouvelle référence à la formule sera retournée (et ne sera pas exécutée) : ```4d @@ -146,34 +155,32 @@ $o:=$f.message //retourne l'objet formule en $o ``` ### Méthodes de menu - -Une méthode de menu est appelée lorsque la commande de menu personnalisé à laquelle elle est associée est sélectionnée. Vous assignez la méthode à la commande de menu dans l’éditeur de menus de 4D. Lorsque l’utilisateur sélectionne la commande de menu, la méthode est exécutée. Ce fonctionnement est l’un des principaux aspects de la personnalisation d’une base de données. C’est en créant des menus qui appellent des méthodes de menu que vous personnalisez votre base. +Une méthode de menu est appelée lorsque la commande de menu personnalisé à laquelle elle est associée est sélectionnée. Vous assignez la méthode à la commande de menu dans l’éditeur de menus de 4D. Lorsque l’utilisateur sélectionne la commande de menu, la méthode est exécutée. En créant des menus personnalisés qui appellent des méthodes de menu qui exécutent des actions spécifiques, vous créez des interfaces personnalisées pour vos applications de bureau. Les commandes de menus personnalisés peuvent déclencher une ou plusieurs actions. Par exemple, une commande de menu de saisie d’enregistrements peut appeler une méthode effectuant deux actions : afficher le formulaire entrée approprié et appeler la commande `AJOUTER ENREGISTREMENT` jusqu’à ce que l’utilisateur annule la saisie de nouveaux enregistrements. -L’automatisation de séquences d’actions est une possibilité très puissante du langage de programmation de 4D. A l’aide des menus personnalisés, vous pouvez automatiser des séquences de tâches, vous permettez aux utilisateurs de naviguer plus facilement dans votre base. +L’automatisation de séquences d’actions est une possibilité très puissante du langage de programmation de 4D. A l’aide des menus personnalisés, vous pouvez automatiser des séquences de tâches, vous permettez aux utilisateurs de naviguer plus facilement dans votre application. + ### Méthodes de gestion de process Une **méthode projet** est une méthode projet appelée lorsqu’un process est démarré. Le process existera tant que la méthode sera en cours d'exécution. A noter qu'une méthode de menu associée à une commande de menu pour laquelle la propriété *Démarrer un nouveau process* est sélectionnée, est aussi la méthode de gestion de process pour le process créé. ### Méthodes de gestion d’événements et d'erreurs - Une **méthode de gestion d’événements** est une méthode dédiée à la gestion des événements, qui s'exécute dans un process différent de celui de la méthode de gestion des process. Généralement, pour la gestion des événements, vous pouvez laisser 4D faire le gros du travail. Par exemple, lors de la saisie de données, 4D détecte les clics souris et les touches enfoncées, puis appelle les méthodes objet et formulaire correspondantes, vous permettant ainsi de prévoir dans ces méthodes les traitements appropriés aux événements. Pour plus d'informations, reportez-vous à la description de la commande `APPELER SUR EVENEMENT`. Une **méthode de gestion d’erreurs** est une méthode projet d'interruption. Elle s'exécute à l'intérieur du process dans lequel elle a été installée à chaque fois qu'une erreur se produit. Pour plus d'informations, reportez-vous à la description de la commande `APPELER SUR ERREUR`. ## Méthode projet récursives -Des méthodes projet peuvent s'appeler les unes les autres. Par exemple: +Des méthodes projet peuvent s'appeler les unes les autres. Par exemple : - Une méthode A peut appeler une méthode B, qui appelle A, donc A appelle B de nouveau, etc. - Une méthode peut s'appeler elle-même. Cela s'appelle la récursivité. Le langage de 4D supporte pleinement la récursivité. -Examinons l'exemple suivant : vous disposez d'une table `[Amis et relations]` composée de l'ensemble de champs suivant (très simplifié) : - +Examinons l'exemple suivant : Examinons l'exemple suivant : vous disposez d'une table `[Amis et relations]` composée de l'ensemble de champs suivant (très simplifié) : - `[Amis et parents]Nom` - `[Amis et parents]Enfant'Nom` @@ -209,7 +216,9 @@ Pour cet exemple, nous supposons que les valeurs des champs sont uniques (il n'e QUERY([Amis et parents];[Amis et parents]Nom=$vsNom) If(Records in selection([Amis et parents])>0) ALERT("Un de mes amis, "+Généalogie de($vsNom)+", fait cela pour gagner sa vie !") - End if + End if + End if + End if End if ``` @@ -219,7 +228,7 @@ en utilisant la fonction récursive `Généalogie de` suivante : // Méthode projet Généalogie de // Généalogie de ( Chaîne ) -> Texte // Généalogie de ( Nom ) -> Partie de la phrase - + $0:=$1 QUERY([Amis et parents];[Amis et parents]Enfant'Nom=$1) If(Enregistrements trouves([Amis et parents])>0) @@ -239,14 +248,3 @@ Dans 4D, la récursivité est typiquement utilisée pour : - Naviguer parmi les documents et les dossiers de votre disque à l'aide des commandes `LISTE DES DOSSIERS` et `LISTE DES DOCUMENTS`. Un dossier peut contenir des dossiers et des documents, les sous-dossiers peuvent eux-mêmes contenir des dossiers et des documents, etc. **Important :** Les appels récursifs doivent toujours se terminer à un moment donné. Dans l'exemple ci-dessus, la méthode `Généalogie de` cesse de s'appeler elle-même lorsque la recherche ne trouve plus d'enregistrement. Sans ce test conditionnel, la méthode s'appellerait indéfiniment et 4D pourrait au bout d'un certain temps retourner l'erreur “La pile est pleine†car le programme n'aurait plus assez de place pour "empiler" les appels (ainsi que les paramètres et les variables locales utilisés dans la méthode). - -## Méthodes spécialisées - -Outre les **méthodes projets**, 4D prend en charge plusieurs types de méthodes spécifiques, appelées automatiquement en fonction des événements : - -| Type | Contexte d'appel | Accepte les paramètres | Description | -| -------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Méthode objet (widget)** | Automatique, lorsqu'un événement implique l'objet auquel la méthode est associée | Non | Propriété d'un objet formulaire (également appelé widget) | -| **Méthode formulaire** | Automatique, lorsqu'un événement implique le formulaire auquel la méthode est associée | Non | Propriété d'un formulaire. Vous pouvez utiliser une méthode formulaire pour gérer les données et les objets, mais il est généralement plus simple et plus efficace d'utiliser une méthode objet dans ces cas de figure. | -| **Trigger** (ou *méthode table*) | Automatique, chaque fois que vous manipulez les enregistrements d'une table (Ajouter, Supprimer, Modifier) | Non | Propriété d'une table. Les triggers sont des méthodes qui peuvent éviter les opérations 'illégales' effectuées avec les enregistrements de votre base. | -| **Méthode base** | Automatique, lorsqu'un événement se produit sur la session de travail | Oui (prédéfini) | Il existe 16 méthodes base dans 4D. Voir la section Méthodes bases | \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/parameters.md b/website/translated_docs/fr/Concepts/parameters.md index 9a9c1dc056c932..8c59080d9796e4 100644 --- a/website/translated_docs/fr/Concepts/parameters.md +++ b/website/translated_docs/fr/Concepts/parameters.md @@ -4,112 +4,292 @@ title: Paramètres --- -## Utilisation des paramètres +Vous aurez souvent besoin de fournir des valeurs à vos méthodes et fonctions. Vous pouvez facilement effectuer cette opération grâce aux paramètres. -Vous aurez souvent besoin de fournir des valeurs à vos méthodes. Vous pouvez facilement effectuer cette opération grâce aux paramètres. +## Aperçu -**Les paramètres** (ou **arguments**) sont des données dont les méthodes ont besoin pour s’exécuter. Le terme *paramètres* ou *arguments* est utilisé indifféremment dans ce manuel. Des paramètres sont également passés aux commandes intégrées de 4D. Dans l’exemple ci-dessous, la chaîne “Bonjour†est un paramètre de la commande `ALERTE` : +**Les paramètres** (ou **arguments**) sont des données dont une méthode ou une fonction de classe a besoin pour s’exécuter. Le terme *paramètres* ou *arguments* est utilisé indifféremment dans ce manuel. Des paramètres sont également passés aux commandes intégrées de 4D. Dans l’exemple ci-dessous, la chaîne “Bonjour†est un paramètre de la commande `ALERTE` : ```4d ALERT("Bonjour") ``` -Les paramètres sont passés de la même manière aux méthodes. Par exemple, si la méthode FAIRE QUELQUE CHOSE accepte trois paramètres, l'appel à cette méthode pourrait être de la forme suivante : +Les paramètres sont passés de la même manière aux méthodes ou aux fonctions de classe (class functions). Par exemple, si une fonction de classe nommée `getArea()` accepte deux paramètres, voilà) à quoi pourrait ressembler un appel à la fonction de classe : -```4d -FAIRE QUELQUE CHOSE(AvecCeci;EtCela;CommeCeci) +``` +$area:=$o.getArea(50;100) ``` -Les paramètres sont séparés par des points-virgules (;). Leur valeur est calculée lorsqu'ils sont appelés. - -Dans la sous-routine (la méthode appelée), la valeur de chaque paramètre est automatiquement copiée séquentiellement dans des variables locales numérotées : $1, $2, $3, etc. La numérotation des variables locales représente l’ordre des paramètres. +Ou si la méthode `FAIRE QUELQUE CHOSE` accepte trois paramètres, l'appel à cette méthode pourrait être de la forme suivante : ```4d - //Code de la méthode FAIRE QUELQUE CHOSE - //Supposons que tous les paramètres sont de type texte - C_TEXT($1;$2;$3) - ALERT("J'ai reçu "+$1+" et "+$2+" et aussi "+$3) - //$1 contient le paramètre AvecCeci - //$2 contient le paramètre EtCela - //$3 contient le paramètre CommeCeci +FAIRE QUELQUE CHOSE(AvecCeci; EtCela; CommeCeci) ``` -A l'intérieur de la sous-routine, vous pouvez utiliser les paramètres $1, $2... de la même manière que vous utilisez les autres variables locales. Toutefois, dans le cas où vous utilisez des commandes qui modifient la valeur de la variable passée en paramètre (par exemple `Trouver dans champ`), les paramètres $1, $2, etc. ne peuvent pas être utilisés directement. Vous devez d'abord les recopier dans des variables locales standard (par exemple `$mavar:=$1`). +Les paramètres d'entrée sont séparés par des points-virgules (;). Les mêmes principes s'appliquent lorsque des méthodes sont exécutées via des commandes consacrées, comme par exemple : ```4d -EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/10!) -//passez la date !05/05/10! comme paramètre de SetCalendarDate +EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/20!) +//passez la date du !05/05/20! comme paramètre de SetCalendarDate // dans le contexte d'un sous-formulaire ``` -**Note :** Pour une bonne exécution du code, assurez-vous que tous les paramètres `$1`, `$2`... sont correctement déclarés dans les méthodes appelées (voir [Déclaration des paramètres](#declaring-parameters) ci-dessous). +Les données peuvent également être **retournées** à partir de méthodes et de fonctions de classe. Par exemple, la ligne d’instruction suivante utilise une commande intégrée, `Longueur`, qui retourne la longueur d’une chaîne. La valeur retournée par `Longueur` est placée dans une variable appelée *MaLongueur*. -### Expressions prises en charge +```4d +MaLongueur:=Length("Comment suis-je arrivé là ?") +``` -Vous pouvez utiliser n'importe quelle [expression](Concepts/quick-tour.md#expression-types) comme paramètre, à l'exception des : +Toute sous-routine peut retourner une valeur. Only one single output parameter can be declared per method or class function. -- tables -- arrays +Les valeurs d'entrée et de sortie sont [évaluées](#values-or-references) au moment de l'appel et copiée dans les variables locales au sein de la fonction de classe ou de la méthode appelée. Two syntaxes are proposed to declare variable parameters in the called code: + +- [named variables](#named-parameters) (recommended in most cases) or +- [sequentially numbered variables](#sequential-parameters). -Les expressions de tables ou de tableaux peuvent être passées uniquement [comme une référence utilisant un pointeur](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). -## Fonctions +Both [named](#named-parameters) and [sequential](#sequential-parameters) syntaxes can be mixed with no restriction to declare parameters. Par exemple : -Les méthodes peuvent retourner des valeurs. Une méthode qui retourne une valeur est appelée une fonction. +```4d +Function add($x : Integer) + var $0;$2 : Integer + $0:=$x+$2 +``` -Les commandes de 4D ou de plug-ins qui retournent une valeur sont également appelées fonctions. -Par exemple, la ligne d’instruction suivante utilise une fonction intégrée, `Longueur`, qui retourne la longueur d’une chaîne. La valeur retournée par `Longueur` est placée dans une variable appelée *MaLongueur* : + + +## Paramètres nommés + +Dans les méthodes et fonctions de classe qui sont appelées, les valeurs des paramètres sont assignées aux variables locales. Vous pouvez déclarer des paramètres en utilisant un **nom de paramètre** avec un **type de paramètre**, séparés par deux-points. + +- Pour les fonctions de classe, les paramètres sont déclarés avec le mot clé `Function`. +- Pour les méthodes (méthodes projet, méthodes objet formulaire, méthodes de base de données et les triggers), les paramètres sont déclarés à l'aide du mot clé `#DECLARE` saisi au début du code de la méthode. + +Voici quelques exemples : ```4d -MaLongueur:=Length("Comment suis-je arrivé là ?") +Voici quelques exemples : + +```4d +Function getArea($width : Integer; $height : Integer) -> $area : Integer +``` + +```4d + //myProjectMethod +#DECLARE ($i : Integer) -> $myResult : Object ``` -Toute sous-routine peut retourner une valeur. La valeur à retourner est placée dans la variable locale `$0`. -Par exemple, la fonction suivante, appelée `Majuscules4`, retourne une chaîne dont les quatre premiers caractères ont été passés en majuscules : +Les règles suivantes s'appliquent : + +- La ligne de déclaration doit être la première ligne de code de la méthode ou de la fonction, sinon une erreur est affichée (seuls les commentaires ou les sauts de ligne peuvent précéder la déclaration). +- Parameter names must start with a `$` character and be compliant with [property naming rules](dt_object.md#object-property-identifiers). +- Plusieurs paramètres (et types) sont séparés par des points-virgules (;). +- Les syntaxes multilignes sont prises en charge (en utilisant le caractère "\\"). + + +For example, when you call a `getArea()` function with two parameters: + +```4d +$area:=$o.getArea(50;100) +``` + +In the class function code, the value of each parameter is copied into the corresponding declared parameter: + +```4d +// Class: Polygon +Function getArea($width : Integer; $height : Integer)-> $area : Integer + $area:=$width*$height +``` +> If the type is not defined, the parameter will be defined as [`Variant`](dt_variant.md). + +All 4D method kinds support the `#DECLARE` keyword, including database methods. For example, in the `On Web Authentication` database method, you can declare named parameters: + +```4d + // On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean +$entitySelection:=ds.User.query("login=:1"; $user) +// Check hash password... +``` + +### Valeur retournée + +You declare the return parameter of a function by adding an arrow (->) and the parameter definition after the input parameter(s) list. Par exemple : + +```4d +Function add($x : Variant; $y : Integer) -> $result : Integer +``` + +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through `$0` ([see sequential syntax below](#returned-value-1)). Par exemple : + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + +### Type de données pris en charge + +With named parameters, you can use the same data types as those which are [supported by the `var` keyword](variables.md#using-the-var-keyword), including class objects. Par exemple : + +```4d +Function saveToFile($entity : cs.ShapesEntity; $file : 4D.File) +``` + + + + + +## Paramètres séquentiels + +As an alternative to [named parameters](#named-parameters) syntax, you can declare parameters using sequentially numbered variables: **$1**, **$2**, **$3**, and so on. La numérotation des variables locales représente l’ordre des paramètres. + +> Although this syntax is supported by class functions, it is recommended to use [named parameters](#named-parameters) syntax in this case. + +For example, when you call a `DO_SOMETHING` project method with three parameters: + +```4d +FAIRE QUELQUE CHOSE(AvecCeci; EtCela; CommeCeci) +``` + +In the method code, the value of each parameter is automatically copied into $1, $2, $3 variables: + +```4d + //Code of the method DO_SOMETHING + //Assuming all parameters are of the text type + 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 +``` + + +### Valeur retournée + +The value to be returned is automatically put into the local variable `$0`. + + +Par exemple, la méthode suivante, appelée `Uppercase4`, retourne une chaîne dont les quatre premiers caractères ont été passés en majuscules : ```4d $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -Voici un exemple qui utilise la fonction Majuscules4 : +Voici un exemple qui utilise la méthode Uppercase4 : ```4d -NouvellePhrase:=Majuscules4("Bien joué.") +$NewPhrase:=Uppercase4("This is good.") ``` -Dans ce cas, la variable *NouvellePhrase* prend la valeur “BIEN joué.†+Dans cet exemple, la variable *$NewPhrase* prend la valeur “THIS is good.†-Le retour de fonction, `$0`, est une variable locale à la sous-routine. Elle peut être utilisée en tant que telle à l'intérieur de la sous-routine. For example, you can write: +La valeur retournée, `$0`, est une variable locale à la sous-routine. Elle peut être utilisée en tant que telle à l'intérieur de la sous-routine. Par exemple, vous pouvez écrire : ```4d -// Do_something +// Faire_quelque chose $0:=Uppercase($1) ALERT($0) ``` -In this example, `$0` is first assigned the value of `$1`, then used as parameter to the `ALERT` command. Dans une sous-méthode, vous pouvez utiliser `$0` comme n'importe quelle autre variable locale. C'est 4D qui retourne sa valeur finale `$0` (sa valeur courante au moment où la sous-routine se termine) à la méthode appelée. +Dans cet exemple, `$0` recevait d'abord la valeur de `$1`, puis était utilisée en tant que paramètre de la commande `ALERT`. Dans une sous-méthode, vous pouvez utiliser `$0` comme n'importe quelle autre variable locale. C'est 4D qui retourne sa valeur finale `$0` (sa valeur courante au moment où la sous-routine se termine) à la méthode appelée. + + +### Type de données pris en charge + +You can use any [expression](quick-tour.md#expression-types) as sequential parameter, except: + +- tables +- arrays + +Tables or array expressions can only be passed [as reference using a pointer](dt_pointer.md#pointers-as-parameters-to-methods). + +## Parameter indirection (${N}) + +4D project methods accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression. `${N}` is called a **generic parameter**. + + + +### Using generic parameters + +For example, consider a method that adds values and returns the sum formatted according to a format that is passed as a parameter. A chaque appel à cette méthode, le nombre de valeurs à additionner peut varier. Il faudra donc passer comme paramètre à notre méthode les valeurs, en nombre variable, et le format, exprimé sous forme d’une chaîne de caractères. + +Here is the method, named `MySum`: + +```4d + #DECLARE($format : Text) -> $result : Text + $sum:=0 + For($i;2;Count parameters) + $sum:=$sum+${$i} + End for + $result:=String($sum;$format) +``` + +The method's parameters must be passed in the correct order, first the format and then a variable number of values: + +```4d + Result:=MySum("##0.00";125,2;33,5;24) //"182.70" + Result:=MySum("000";1;2;200) //"203" +``` -## Déclaration des paramètres +Note that even if you declared 0, 1, or more parameters in the method, you can always pass the number of parameters that you want. Parameters are all available within the called method through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using a [compiler directive](#declaring-generic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command. Par exemple : -Pour éviter tout conflit, vous devez déclarer chaque paramètre dans les méthodes appelées en [mode interprété](Concepts/interpreted.md), même si cela est facultatif. +```4d +//foo method +#DECLARE($p1: Text;$p2 : Text; $p3 : Date) +For($i;1;Count parameters) + ALERT("param "+String($i)+" = "+String(${$i})) +End for +``` -Dans l'exemple ci-dessous, la méthode projet `OneMethodAmongOthers` déclare trois paramètres : +This method can be called: ```4d - // Méthode projet OneMethodAmongOthers - // OneMethodAmongOthers ( Réel ; Date { ; Entier long} ) - // OneMethodAmongOthers ( Amount ; Date { ; Pourcentage } ) +foo("hello";"world";!01/01/2021!;42;?12:00:00?) //extra parameters are passed +``` + +> Pour une bonne gestion de cette indirection, il est important de respecter la convention suivante : si tous les paramètres ne sont pas adressés par indirection, ce qui est le cas le plus fréquent, il faut que les paramètres adressés par indirection soient passés en fin de liste. + + +### Déclaration des paramètres génériques + +De même que pour les autres variables locales, la déclaration du paramètre générique par directive de compilation n’est pas obligatoire. Il est néanmoins recommandé d'éviter toute ambiguïté. Non-declared generic parameters automatically get the [Variant](dt_variant.md) type. - C_REAL($1) // 1er paramètre de type Réel - C_DATE($2) // 2ème paramètre de type Date - C_LONGINT($3) // 3ème paramètre de type Entier long +To declare generic parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter. + +```4d + C_TEXT(${4}) ``` -Dans l'exemple suivant, la méthode projet `ajoutCapitale` accepte un paramètre texte et retourne un résultat texte : +> Declaring generic parameters can only be done with the [sequential syntax](#sequential-parameters). + +This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of text type. Les types de $1, $2 et $3 pourront être quelconques. En revanche, si vous utilisez $2 par indirection, le type utilisé sera le type générique. Thus, it will be of the data type text, even if for you it was, for instance, of the data type Real. + +> The number in the declaration has to be a constant and not a variable. + + + + + +## Déclaration des paramètres pour le mode compilé + +Even if it is not mandatory in [interpreted mode](interpreted.md), you must declare each parameter in the called methods or functions to prevent any trouble. + +When using the [named variable syntax](#named-parameters), parameters are automatically declared through the `#DECLARE` keyword or `Function` prototype. Par exemple : + +```4d +Function add($x : Variant; $y : Integer)-> $result : Integer + // all parameters are declared with their type +``` + + +When using the [sequential variable syntax](#sequential-parameters), you need to make sure all parameters are properly declared. Dans l'exemple suivant, la méthode projet `ajoutCapitale` accepte un paramètre texte et retourne un résultat texte : ```4d // Méthode projet ajoutCapitale @@ -120,7 +300,7 @@ Dans l'exemple suivant, la méthode projet `ajoutCapitale` accepte un paramètre $0:=Majusc(Sous chaine($1;1;1))+Minusc(Sous chaine($1;2)) ``` -L'utilisation de commandes telles que `Nouveau process` avec les méthodes process qui acceptent les paramètres nécessite également que les paramètres soient explicitement déclarés dans la méthode appelée. Par exemple: +L'utilisation de commandes telles que `Nouveau process` avec les méthodes process qui acceptent les paramètres nécessite également que les paramètres soient explicitement déclarés dans la méthode appelée. Par exemple : ```4d C_TEXT($string) @@ -140,26 +320,27 @@ C_OBJECT($3) ... ``` -**Note :** En mode compilé, vous pouvez regrouper tous les paramètres de variables locales pour les méthodes projets dans un méthode spécifique avec un nom commençant par "Compiler". Dans cette méthode, vous pouvez prédéclarer les paramètres de chaque méthode, comme par exemple : - -```4d +> En mode compilé, vous pouvez regrouper tous les paramètres de variables locales pour les méthodes projets dans un méthode spécifique avec un nom commençant par "Compiler". Dans cette méthode, vous pouvez prédéclarer les paramètres de chaque méthode, comme par exemple : +```4d + // Compiler_method C_REAL(OneMethodAmongOthers;$1) ``` - -Pour plus d'informations, consultez la page [Modes interprété et compilé](Concepts/interpreted.md). +See [Interpreted and compiled modes](interpreted.md) page for more information. La déclaration des paramètres est également obligatoire dans les contextes suivants (ces contextes ne prennent pas en charge les déclarations dans une méthode "Compiler") : -- Méthodes base Par exemple, la `méthode base Sur connexion Web` reçoit six paramètres, allant de $1 à $6, de type Texte. Au début de la méthode base, vous devez écrire (même si tous les paramètres ne sont pas utilisés) : +- Méthodes base - Par exemple, la `méthode base Sur connexion Web` reçoit six paramètres, allant de $1 à $6, de type Texte. Au début de la méthode base, vous devez écrire (même si tous les paramètres ne sont pas utilisés) : ```4d // Sur connexion Web C_TEXT($1;$2;$3;$4;$5;$6) ``` -- Triggers Le paramètre $0 (Entier long), qui résulte d'un trigger, sera typé par le compilateur si le paramètre n'a pas été explicitement déclaré. Néanmoins, si vous souhaitez le déclarer, vous devez le faire dans le trigger lui-même. +> You can also use [named parameters](#named-parameters) with the `#DECLARE` keyword. -- Objets formulaires qui acceptent l'événement formulaire `Sur glisser` Le paramètre $0 (Entier long), qui résulte de l'événement formulaire `Sur glisser` est typé par le compilateur si le paramètre n'a pas été explicitement déclaré. Nevertheless, if you want to declare it, you must do so in the object method. **Note :** Le compilateur n'initialise pas le paramètre $0. Ainsi, dès que vous utilisez l'événement formulaire `Sur glisser`, vous devez initialiser $0. Par exemple: +- Triggers - Le paramètre $0 (Entier long), qui résulte d'un trigger, sera typé par le compilateur si le paramètre n'a pas été explicitement déclaré. Néanmoins, si vous souhaitez le déclarer, vous devez le faire dans le trigger lui-même. + +- Objets formulaires qui acceptent l'événement formulaire `Sur glisser` - Le paramètre $0 (Entier long), qui résulte de l'événement formulaire `Sur glisser` est typé par le compilateur si le paramètre n'a pas été explicitement déclaré. Néanmoins, si vous souhaitez le déclarer, vous devez le faire dans la méthode projet. **Note :** Le compilateur n'initialise pas le paramètre $0. Ainsi, dès que vous utilisez l'événement formulaire `Sur glisser`, vous devez initialiser $0. Par exemple : ```4d C_LONGINT($0) @@ -173,107 +354,64 @@ C_TEXT($1;$2;$3;$4;$5;$6) End if ``` -## Valeurs ou références - -Lorsque vous passez un paramètre, 4D évalue toujours l'expression du paramètre dans le contexte de la méthode appelée et définit la **valeur résultante** sur les variables locales $1, $2, etc... de la sous-routine (voir [Utilisation des paramètres](#using-parameters)). Les variables/paramètres locaux ne correspondent pas aux véritables champs, variables ou expressions passés par la méthode appelée; ils contiennent uniquement les valeurs qui n'ont pas été passées. Cette portée étant locale, si la valeur d'un paramètre est modifiée dans la sous-routine, elle ne modifie pas la valeur dans la méthode appelée. Par exemple: - -```4d - //Voici du code extrait de la méthode MY_METHOD -DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" -ALERT([People]Name) - - //Voici du code extrait de la méthode DO_SOMETHING - $1:=Uppercase($1) - ALERT($1) -``` -La boîte de dialogue d'alerte affichée par `FAIRE QUELQUE CHOSE` contiendra "WILLIAM" et celle affichée par `MA METHODE` contiendra "william". La méthode a modifié localement la valeur du paramètre $1, mais cela n'affecte pas la valeur du champ `[Personnes]Nom` passé en paramètre par la méthode `MA METHODE`. -Si vous voulez réellement que la méthode `FAIRE QUELQUE CHOSE` modifie la valeur du champ, deux solutions s'offrent à vous : +## Wrong parameter type -1. Plutôt que de passer le champ à la méthode, vous lui passez un pointeur : +Calling a parameter with an wrong type is an [error](error-handling.md) that prevents correct execution. For example, if you write the following methods: ```4d - //Voici du code extrait de la méthode MY_METHOD - DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Last Name) - - //Voici du code extrait de la méthode DO_SOMETHING - $1->:=Uppercase($1->) - ALERT($1->) +// method1 +#DECLARE($value : Text) ``` -Ici, le paramètre n'est pas le champ lui-même, mais un pointeur vers le champ. Ainsi, à l'intérieur de la méthode `FAIRE QUELQUE CHOSE`, $1 ne contient plus la valeur du champ mais un pointeur vers le champ. L'objet **référencé** par $1 ($1-> dans le code ci-dessus) est le champ lui-même. Par conséquent, la modification de l'objet référencé dépasse les limites de la sous-routine et le champ lui-même est affecté. Dans cet exemple, les deux boîtes de dialogue d'alerte afficheront "WILLIAM". - -2. Plutôt que la méthode `FAIRE QUELQUE CHOSE` “fasse quelque choseâ€, vous pouvez la réécrire de manière à ce qu'elle retourne une valeur. - ```4d - //Voici du code extrait de la méthode MY METHOD - [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Name) - - //Voici du code extrait de la méthode DO SOMETHING - $0:=Uppercase($1) - ALERT($0) +// method2 +method1(42) //wrong type, text expected ``` -Cette seconde technique consistant à renvoyer une valeur par une sous-routine est intitulée "utiliser une fonction". Cette procédure est décrite dans le paragraphe [Fonctions](#functions). +This case is handled by 4D depending on the context: -### Cas particuliers : objets et collections +- in [compiled projects](interpreted.md), an error is generated at the compilation step whenever possible. Otherwise, an error is generated when the method is called. +- in interpreted projects: + + if the parameter was declared using the [named syntax](#named-parameters) (`#DECLARE` or `Function`), an error is generated when the method is called. + + if the parameter was declared using the [sequential syntax](#sequential-parameters) (`C_XXX`), no error is generated, the called method receives an empty value of the expected type. -Veillez à ce que les types de données d'Objet et Collection ne puissent être gérés que via une référence (c'est-à-dire un* pointeur* interne). -Par conséquent, lorsque vous utilisez des types de données comme paramètres, `$1, $2 ...` ne contiennent pas des *valeurs*, mais des *références*. La modification de la valeur des paramètres `$1, $2 ...` dans la sous-routine sera propagée à chaque fois que l'objet ou la collection source est utilisé(e). C'est le même principe que pour [les pointeurs](Concepts/dt_pointer.md#pointers-as-parameters-to-methods), à l'exception des paramètres `$1, $2 ...` n'ont pas besoin d'être déréférencés dans la sous-routine. -Par exemple, considérons que la méthode `CreatePerson`, qui crée un objet et qui l'envoie comme paramètre : -```4d - //La méthode CreatePerson crée un objet et l'envoie en tant que paramètre - C_OBJECT($person) - $person:=New object("Name";"Smith";"Age";40) - ChangeAge($person) - ALERT(Chaine(OB Lire($person;"Age"))) -``` -La méthode `ChangeAge` ajoute 10 à l'attribut Age de l'objet reçu +## Variables d'entrée/de sortie -```4d - //ChangeAge - C_OBJECT($1) -$1.Age:=$1.Age+10 - ALERT(String($1;Age)) -``` +Dans une sous-méthode, vous pouvez utiliser les paramètres $1, $2... comme n'importe quelle autre variable locale. Toutefois, dans le cas où vous utilisez des commandes qui modifient la valeur de la variable passée en paramètre (par exemple `Trouver dans champ`), les paramètres $1, $2, etc. ne peuvent pas être utilisés directement. Vous devez d'abord les recopier dans des variables locales standard (par exemple `$mavar:=$1`). -Si vous exécutez la méthode `CreatePerson`, les deux messages d'alerte contiendront "50" car le même objet est traité par les deux méthodes. -**4D Server :** Lorsque des paramètres sont passés entre des méthodes qui ne sont pas exécutées sur la même machine (lors de l'utilisation de l'option Exécuter sur serveur par exemple, voir Propriétés des méthodes projet), il n'est pas possible d'utiliser des références. Dans ce cas, ce sont des copies des paramètres objet ou collection qui sont envoyées au lieu de références. -## Paramètres nommés +## Utilisation des propriétés d'objet comme paramètres nommés L'utilisation d'objets en tant que paramètres vous permet de gérer des **paramètres nommés**. Ce style de programmation est simple, souple et facile à lire. Par exemple, si vous utilisez la méthode `CreatePerson` : ```4d - //La méthode CreatePerson crée un objet et l'envoie en tant que paramètre - C_OBJECT($person) + //CreatePerson + var $person : Object $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) - ALERT(Chaine(OB Lire($person;"Age"))) + ALERT(String($person.Age)) ``` Dans la méthode `ChangeAge`, vous pouvez écrire : ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=$para.Age+10 - ALERT($para.Nom+" a "+String($para.Age)+" ans.") + ALERT($para.Name+" is "+String($para.Age)+" years old.") ``` C'est un moyen puissant de définir des [paramètres optionnels](#optional-parameters) (voir ci-dessous également). Pour gérer les paramètres manquants, vous pouvez : - - vérifier si tous les paramètres attendus sont fournis en les comparant à la valeur `Null`, ou - prédéfinir les valeurs des paramètres, ou - les utiliser sous forme de valeurs vides. @@ -282,34 +420,35 @@ Dans la méthode `ChangeAge` ci-dessus, les propriétés Age et Nom sont obligat ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=Num($para.Age)+10 - ALERT(String($para.Nom+" a "+String($para.Age)+" ans.") + ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` - Les deux paramètres sont alors optionnels. S'ils ne sont pas renseignés, le résultat sera "a 10 ans", mais aucune erreur ne sera générée. Enfin, les paramètres nommés permettent de maintenir et de reproduire des applications en toutes simplicité et sécurité. Imaginez que vous réalisez, par la suite, qu'ajouter 10 ans n'est pas toujours approprié. Vous aurez besoin d'un autre paramètre pour définir le nombre d'années à ajouter. Vous pouvez écrire : ```4d -$person:=New object("Nom";"Smith";"Age";40;"àAjouter";10) +$person:=New object("Name";"Smith";"Age";40;"toAdd";10) ChangeAge($person) //ChangeAge -C_OBJECT($1;$para) +var $1;$para : Object $para:=$1 If ($para.toAdd=Null) $para.toAdd:=10 End if $para.Age:=Num($para.Age)+$para.toAdd -ALERT(String($para.Nom)+" a "+String($para.Age)+" ans.") +ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` Ici, toute la puissance réside dans le fait de ne pas avoir à changer votre code existant. Cela fonctionnera toujours dans l'ancienne version, mais le cas échéant, vous pouvez utiliser une autre valeur que 10 ans. Avec les variables nommées, n'importe quel paramètre peut être optionnel. Dans l'exemple ci-dessus, tous les paramètres sont optionnels et peuvent être donnés, dans n'importe quel ordre. + + ## Paramètres optionnels Dans le manuel *Langage de 4D*, les caractères { } (accolades) indiquent des paramètres facultatifs. Par exemple, `ALERT (message{; okButtonTitle})` signifie que le paramètre *okButtonTitle* doit être omis lors de l'appel de la commande. Vous pouvez l'appeler comme suit : @@ -319,98 +458,128 @@ ALERT("Etes*vous sûr?";"Oui, je le suis") //2 paramètres ALERT("Temps écoulé") //1 paramètre ``` -Les méthodes projet 4D acceptent également des paramètres optionnels, en commençant par la droite. Cependant, il est difficile de gérer les paramètres optionnels lorsque certains d'entre eux sont manquants dans la méthode appelée - cela ne devrait jamais générer d'erreur. Une bonne pratique consisterait à assigner des valeurs par défaut aux paramètres non utilisés. +4D methods and functions also accept such optional parameters. The issue with optional parameters is how to handle the case where some of them are missing in the called code. By default, if you call a method or function with less parameters than declared, missing parameters are processed as default values in the called code, [according to their type](data-types.md#default-values). Par exemple : + +```4d +// "concate" function of myClass +Function concate ($param1 : Text ; $param2 : Text)->$result : Text +$result:=$param1+" "+$param2 +``` +```4d + // Calling method + $class:=cs.myClass.new() + $class.concate("Hello") // "Hello " + $class.concate() // Displays " " +``` + -> Lorsque les paramètres sont nécessaires dans vos méthodes, vous pouvez également envisager des [paramètres nommés](#named-parameters) pour gérer plusieurs paramètres de manière flexible. +> Lorsque les paramètres sont nécessaires dans vos méthodes, vous pouvez également envisager des [propriétés d'objet comme paramètres nommés](#using-objects-properties-as-named-parameters) pour gérer plusieurs paramètres de manière flexible. A l'aide de la commande `Count parameters` contenue dans la méthode appelée, vous pouvez détecter le nombre de paramètres et effectuer des opérations différentes en fonction de ce nombre. L'exemple suivant affiche un message et peut insérer le texte dans un document sur disque ou dans une zone 4D Write Pro : ```4d -// Méthode projet APPEND TEXT +// APPEND TEXT Project Method // APPEND TEXT ( Text { ; Text { ; Object } } ) // APPEND TEXT ( Message { ; Path { ; 4DWPArea } } ) - C_TEXT($1;$2) - C_OBJECT($3) + Method($message : Text; $path : Text; $wpArea : Object) - ALERT($1) + ALERT($message) If(Count parameters>=3) - WP SET TEXT($3;$1;wk append) + WP SET TEXT($wpArea;$1;wk append) Else If(Count parameters>=2) - TEXT TO DOCUMENT($2;$1) + TEXT TO DOCUMENT($path;$message) End if End if ``` - Une fois que cette méthode projet a été ajoutée à votre application, vous pouvez écrire : -```4d +```4d APPEND TEXT(vtSomeText) //Affichera uniquement le message APPEND TEXT(vtSomeText;$path) //Affiche le message et l'annexe au document dans $path APPEND TEXT(vtSomeText;"";$wpArea) //Affiche le message et l'écrit dans $wpArea ``` -## Indirections sur les paramètres -Les méthodes projets 4D acceptent un grand nombre de paramètres de même type, commençant par la droite. Ce principe est appelé **l'indirection des paramètres**. L'utilisation de la commande `Count parameters` vous permet d'adresser ces paramètres avec la boucle `For...End for` ainsi que la syntaxe de l'indirection des paramètres. -Dans l'exemple qui suit, la méthode projet `ENVOYER PAQUET` accepte le paramètre de temps suivi d'un nombre de variables des paramètres de texte : -```4d - //Méthode projet ENVOYER PAQUET - //ENVOYER PAQUET ( Heure ; Texte { ; Texte2... ; TexteN } ) - //ENVOYER PAQUET ( docRef ; Données { ; Données2... ; DonnéesN } ) +## Valeurs ou références - C_TIME($1) - C_TEXT(${2}) - C_LONGINT($vlPacket) +Lorsque vous passez un paramètre, 4D évalue toujours l'expression du paramètre dans le contexte de la méthode appelée et définit la**valeur résultante** sur les variables locales dans la fonction de classe ou la sous-routine. Les variables/paramètres locaux ne correspondent pas aux véritables champs, variables ou expressions passés par la méthode appelée; ils contiennent uniquement les valeurs qui n'ont pas été passées. Les variables/paramètres locaux ne correspondent pas aux véritables champs, variables ou expressions passés par la méthode appelée; ils contiennent uniquement les valeurs qui n'ont pas été passées. Par exemple : - For($vlPacket;2;Count parameters) - ENVOYER PAQUET($1;${$vlPacket}) - End for +```4d + //Voici du code extrait de la méthode MY_METHOD +DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" +ALERT([People]Name) + + //Voici du code extrait de la méthode DO_SOMETHING + $1:=Uppercase($1) + ALERT($1) ``` -Pour une bonne gestion de cette indirection, il est important de respecter la convention suivante : si tous les paramètres ne sont pas adressés par indirection, ce qui est le cas le plus fréquent, il faut que les paramètres adressés par indirection soient passés en fin de liste. A l’intérieur de la méthode, l’adressage par indirection se fait sous la forme : ${$i}, $i étant une variable numérique. ${$i} est appelé **paramètre générique**. +La boîte de dialogue d'alerte affichée par `FAIRE QUELQUE CHOSE` contiendra "WILLIAM" et celle affichée par `MA METHODE` contiendra "william". La méthode a modifié localement la valeur du paramètre $1, mais cela n'affecte pas la valeur du champ `[Personnes]Nom` passé en paramètre par la méthode `MA METHODE`. -Illustrons notre propos par un exemple : écrivons une fonction qui prend des valeurs, fait leur somme et renvoie cette somme formatée suivant un format qui peut varier avec les valeurs. A chaque appel à cette méthode, le nombre de valeurs à additionner peut varier. Il faudra donc passer comme paramètre à notre méthode les valeurs, en nombre variable, et le format, exprimé sous forme d’une chaîne de caractères. +Si vous voulez réellement que la méthode `FAIRE QUELQUE CHOSE` modifie la valeur du champ, deux solutions s'offrent à vous : -Un appel à cette fonction se fera de la façon suivante : +1. Plutôt que de passer le champ à la méthode, vous lui passez un pointeur : ```4d - Résultat:=LaSomme("##0,00";125,2;33,5;24) + //Voici du code extrait de la méthode MY_METHOD + DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Last Name) + //Voici du code extrait de la méthode DO_SOMETHING + $1->:=Uppercase($1->) + ALERT($1->) ``` -La méthode appelante récupérera dans ce cas la chaîne : 182,70, somme des nombres passés, formatée suivant le format spécifié. Les paramètres de la fonction doivent être passés dans un ordre précis : le format d’abord et ensuite les valeurs, dont le nombre peut varier d’un appel à l’autre. +Ici, le paramètre n'est pas le champ lui-même, mais un pointeur vers le champ. Ainsi, à l'intérieur de la méthode `FAIRE QUELQUE CHOSE`, $1 ne contient plus la valeur du champ mais un pointeur vers le champ. L'objet **référencé** par $1 ($1-> dans le code ci-dessus) est le champ lui-même. Par conséquent, la modification de l'objet référencé dépasse les limites de la sous-routine et le champ lui-même est affecté. Dans cet exemple, les deux boîtes de dialogue d'alerte afficheront "WILLIAM". -Examinons maintenant la fonction que nous appelons `LaSomme` : +2. Plutôt que la méthode `FAIRE QUELQUE CHOSE` “fasse quelque choseâ€, vous pouvez la réécrire de manière à ce qu'elle retourne une valeur. ```4d - $Somme:=0 - For($i;2;Nombre de paramètres) - $Somme:=$Somme+${$i} - End for - $0:=String($Somme;$1) + //Voici du code extrait de la méthode MY METHOD + [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" + ALERT([People]Name) + + //Voici du code extrait de la méthode DO SOMETHING + $0:=Uppercase($1) + ALERT($0) ``` -Cette fonction pourra être appelée de diverses manières : +Cette deuxième technique de renvoi d'une valeur par une sous-routine est appelée «utilisation d'une fonction». Ceci est décrit dans le paragraphe [Valeurs retournées](#returning-values). + + +### Cas particuliers : objets et collections + +Veillez à ce que les types de données d'Objet et Collection ne puissent être gérés que via une référence (c'est-à-dire un* pointeur* interne). + +Par conséquent, lorsque vous utilisez des types de données comme paramètres, `$1, $2 ...` ne contiennent pas des *valeurs*, mais des *références*. La modification de la valeur des paramètres `$1, $2 ...` dans la sous-routine sera propagée à chaque fois que l'objet ou la collection source est utilisé(e). This is the same principle as for [pointers](dt_pointer.md#pointers-as-parameters-to-methods), except that `$1, $2...` parameters do not need to be dereferenced in the subroutine. + +Par exemple, considérons que la méthode `CreatePerson`, qui crée un objet et qui l'envoie comme paramètre : ```4d - Résultat:=LaSomme("##0,00";125,2;33,5;24) - Résultat:=LaSomme("000";1;18;4;23;17) + //CreatePerson + var $person : Object + $person:=New object("Name";"Smith";"Age";40) + ChangeAge($person) + ALERT(String($person.Age)) ``` -### Déclaration des paramètres génériques - -De même que pour les autres variables locales, la déclaration du paramètre générique par directive de compilation n’est pas obligatoire. Il est néanmoins recommandé d'éviter toute ambiguïté. Pour déclarer ces paramètres, utilisez une directive de compilateur à laquelle vous passez ${N} comme paramètre, où N est le premier paramètre générique. +La méthode `ChangeAge` ajoute 10 à l'attribut Age de l'objet reçu ```4d - C_LONGINT(${4}) + //ChangeAge + #DECLARE ($person : Object) + $person.Age:=$person.Age+10 + ALERT(String($person.Age)) ``` -La commande ci-dessus signifie que tous les paramètres à partir du quatrième (inclus) seront adressés par indirection. Ils seront tous de type Entier long. Les types de $1, $2 et $3 pourront être quelconques. En revanche, si vous utilisez $2 par indirection, le type utilisé sera le type générique. Il sera donc de type Entier long, même si pour vous, par exemple, il était de type Réel. +Si vous exécutez la méthode `CreatePerson`, les deux messages d'alerte contiendront "50" car le même objet est traité par les deux méthodes. + +**4D Server :** Lorsque des paramètres sont passés entre des méthodes qui ne sont pas exécutées sur la même machine (lors de l'utilisation de l'option Exécuter sur serveur par exemple), il n'est pas possible d'utiliser des références. Dans ce cas, ce sont des copies des paramètres objet ou collection qui sont envoyées au lieu de références. + -**Note :** Le nombre, dans la déclaration, doit toujours être une constante et jamais une variable. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/plug-ins.md b/website/translated_docs/fr/Concepts/plug-ins.md index c25881d7d22fbf..dcf1118eb70357 100644 --- a/website/translated_docs/fr/Concepts/plug-ins.md +++ b/website/translated_docs/fr/Concepts/plug-ins.md @@ -18,20 +18,19 @@ La nature modulaire de l'environnement 4D permet la création d'applications de Un plug-in est un morceau de code que 4D lance au démarrage. Il ajoute des fonctionnalités à 4D et augmente ainsi sa capacité. Habituellement, un plug-in fait des choses : - - Que 4D ne peut pas effectuer (c'est-à-dire une technologie de plate-forme spécifique), - Qui sera très difficile à écrire en utilisant uniquement 4D, - Qui sont uniquement disponibles en tant que point d'entrée de plug-in Un plug-in contient généralement un ensemble de routines données au développeur 4D. Il peut gérer une zone externe et exécuter un processus externe. -- Une **routine de plug-in** est une routine écrite en langage natif (généralement C ou C ++) qui déclenche une action. +- Une **routine de plug-in** est une routine écrite en langage natif (généralement C ou C ++) qui déclenche une action. - Une **zone externe** est une partie d'un formulaire pouvant presque tout afficher et interagir avec l'utilisateur si nécessaire. -- Un **processus externe** est un processus qui s'exécute seul, généralement en boucle, et qui fait quasiment tout ce qu'il souhaite. Tout le code de process appartient au plug-in, 4D est simplement présent pour recevoir/envoyer des événements au process. +- Un **processus externe** est un processus qui s'exécute seul, généralement en boucle, et qui fait quasiment tout ce qu'il souhaite. Tout le code de process appartient au plug-in, 4D est simplement présent pour recevoir/envoyer des événements au process. ### Note importante -Un plug-in peut être très simple, avec une seule routine effectuant une très petite tâche, ou très complexe, impliquant une centaine de routines et de domaines. Les capacités d'un plug-in sont pratiquement sans limite. Cependant, chaque développeur de plug-in doit se rappeler qu'un plug-in est un "échantillon" de code. C'est le plug-in qui s'exécute dans 4D, et non l'inverse. En tant que morceau de code, c'est l'hôte de 4D; ce n'est pas une application autonome. Il partage le temps CPU et la mémoire avec 4D et d'autres plug-ins. Il doit donc s'agir d'un code poli, qui utilise exactement ce qui est nécessaire à son fonctionnement. Par exemple, dans les longues boucles, un plug-in doit appeler `PA_Yield ()` pour donner du temps au planificateur 4D, à moins que sa tâche ne soit critique aussi bien pour lui que pour la base de données. +Un plug-in peut être très simple, avec une seule routine effectuant une très petite tâche, ou très complexe, impliquant une centaine de routines et de domaines. Cependant, chaque développeur de plug-in doit se rappeler qu'un plug-in est un "échantillon" de code. C'est le plug-in qui s'exécute dans 4D, et non l'inverse. En tant que morceau de code, c'est l'hôte de 4D; ce n'est pas une application autonome. Il partage le temps CPU et la mémoire avec 4D et d'autres plug-ins. Il doit donc s'agir d'un code poli, qui utilise exactement ce qui est nécessaire à son fonctionnement. Par exemple, dans les longues boucles, un plug-in doit appeler `PA_Yield ()` pour donner du temps au planificateur 4D, à moins que sa tâche ne soit critique aussi bien pour lui que pour l'application. ## Comment créer un plug-in ? @@ -44,18 +43,17 @@ Sur GitHub, 4D fournit un [**plug-in SDK**](https://github.com/4d/4D-Plugin-SDK) L’installation des plug-ins et composants dans l’environnement 4D s’effectue par simple copie des fichiers des plug-ins ou des composants dans des dossiers appropriés. -Les dossiers “NomPlugin.bundle†(appelés paquets ou packages sous Mac Os) contiennent à la fois les versions Windows et Mac Os des plug-ins 4D. Leur architecture interne spécifique permet notamment à 4D Server de charger la version adéquate en fonction de la plate-forme d’exécution du poste client. Pour installer un plug-in dans votre environnement, il vous suffit de placer le dossier ou progiciel “NomPlugin.bundle†concerné dans le dossier **PlugIns** souhaité. +Les dossiers “NomPlugin.bundle†(appelés paquets ou packages sous Mac Os) contiennent à la fois les versions Windows et Mac Os des plug-ins 4D. Leur architecture interne spécifique permet notamment à 4D Server de charger la version adéquate en fonction de la plate-forme d’exécution du poste client. Pour installer un plug-in dans votre environnement, il vous suffit de placer le dossier ou progiciel “NomPlugin.bundle†concerné dans le dossier **Plugins** souhaité. -Vous pouvez placer les dossiers PlugIns et Components à deux endroits : +Vous pouvez placer les dossiers Plugins et Components à deux endroits : -- Au niveau de l’application 4D exécutable, c'est-à-dire .: +- Au niveau de l’application 4D exécutable, c'est-à-dire .: - Sous Windows : à côté du fichier .exe - - Sous Mac Os : au premier niveau du dossier Contents, à l’intérieur du package de l’application. - Dans ce cas, les plug-ins et les composants sont disponibles dans toutes les bases de données ouvertes par cette application. -- Au même niveau que le fichier de structure de la base. Dans ce cas, les plug-ins et les composants sont disponibles dans cette base de données uniquement. + - Under macOS: at the first level of the Contents folder inside the application package. In this case, plug-ins are available in every project opened by this application. +- At the same level as the Project folder. Dans ce cas, les plug-ins et les composants sont disponibles dans cette application uniquement. Le choix de l’emplacement dépend de votre mode d’utilisation du plug-in ou du composant. Si un même plug-in ou un même composant est placé aux deux endroits, 4D charge uniquement celui situé à côté de la structure. Dans le cas d’une application compilée et fusionnée avec 4D Volume Desktop, la présence de plusieurs instances d’un même plug-in ou d'un même composant empêchera l’ouverture de l’application. -Les plug-ins et les composants sont chargés par 4D lors du lancement de l’application. Vous devez donc quitter votre application 4D avant d’effectuer vos copies de fichiers ou dossiers. Ouvrez ensuite votre base de données avec 4D. Si l’utilisation d'un plug-in nécessite une licence spécifique, le plug-in est chargé mais n’est pas actif. \ No newline at end of file +Les plug-ins et les composants sont chargés par 4D lors du lancement de l’application. Vous devez donc quitter votre application 4D avant d’effectuer vos copies de fichiers ou dossiers. Ouvrez ensuite votre projet avec 4D. Si l’utilisation d'un plug-in nécessite une licence spécifique, le plug-in est chargé mais n’est pas actif. \ No newline at end of file diff --git a/website/translated_docs/fr/Concepts/quick-tour.md b/website/translated_docs/fr/Concepts/quick-tour.md index 4528f9ab11148d..1692d0a769689e 100644 --- a/website/translated_docs/fr/Concepts/quick-tour.md +++ b/website/translated_docs/fr/Concepts/quick-tour.md @@ -6,7 +6,7 @@ sidebar_label: Tour d'horizon En utilisant le langage 4D, le traditionnel "Hello, world!" peut s'afficher à l'écran de plusieurs manières. Le plus simple est probablement d'écrire la ligne suivante dans une méthode de projet : -```4d +```4d ALERT("Hello, World!") ``` @@ -16,6 +16,7 @@ Ce code affichera une boîte de dialogue d'alerte standard contenant le message Vous pouvez également associer ce code à un bouton de formulaire et exécuter le formulaire. Dans ce cas, en cliquant sur le bouton, vous afficherez la boîte de dialogue d'alerte. Dans tous les cas, vous venez d'exécuter votre première ligne de code 4D ! + ## Assigner des valeurs Vous pouvez donner des valeurs aux variables, aux champs, aux éléments de tableaux et/ou récupérer leur valeur. Donner une valeur à une variable s’appelle assigner une valeur (ou affecter une valeur) et s’effectue à l’aide de l’opérateur d’assignation (:=). L’opérateur d’assignation est également utilisé pour assigner des valeurs aux champs ou aux éléments de tableaux. @@ -48,23 +49,24 @@ var myPerson : cs.Person //variable of the Person user class ``` + Even if it is usually not recommended, you can declare variables simply by using them; you do not necessarily need to formally define them. Par exemple, si vous voulez créer une variable qui contient la date du jour plus 30 jours, il vous suffit d’écrire dans 4D : ```4d MyOtherDate:=Current date+30 ``` -The line of code reads “MyOtherDate gets the current date plus 30 days.†This line declares the variable, assigns it with both the (temporary) date type and a content. A variable declared 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 `var` cannot change the type. In [compiled mode](interpreted.md) however, the type can never be changed, regardless of how the variable was declared. +La ligne de code indique "MyOtherDate obtient la date actuelle plus 30 jours." This line declares the variable, assigns it with both the (temporary) date type and a content. A variable declared 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 `var` cannot change the type. In [compiled mode](interpreted.md) however, the type can never be changed, regardless of how the variable was declared. ## Commandes -Les commandes 4D sont des méthodes intégrées qui permettent d'effectuer une action. Toutes les commandes 4D, telles que `CREATE RECORD` ou `ALERT`, sont décrites dans le *Manuel Langage de 4D*, et sont regroupées par thème. Les commandes sont souvent utilisées avec des paramètres qui sont passés entre parenthèses () et séparés par des points-virgules (;). Exemple : +Les commandes 4D sont des méthodes intégrées qui permettent d'effectuer une action. Toutes les commandes 4D, telles que `CREATE RECORD` ou `ALERT`, sont décrites dans le _Manuel Langage de 4D_, et sont regroupées par thème. Les commandes sont souvent utilisées avec des paramètres qui sont passés entre parenthèses () et séparés par des points-virgules (;). Exemple : ```4d COPY DOCUMENT("dossier1\\nom1";"dossier2\\" ; "nouveau") ``` -Certaines commandes sont reliées à des collections ou à des objets, auquel cas ce sont des méthodes nommées qui sont utilisées à l'aide de la notation en point. Par exemple: +Certaines commandes sont reliées à des collections ou à des objets, auquel cas ce sont des méthodes nommées qui sont utilisées à l'aide de la notation en point. Par exemple : ```4d $c:=New collection(1;2;3;4;5) @@ -88,7 +90,6 @@ PDF REMOVE PAGE(path;page) svgRef:=SVG_New objectRef:=SVG_New_arc(svgRef;100;100;90;90;180) ``` - 4D SVG est inclus dans 4D. ## Constantes @@ -135,6 +136,7 @@ ALERT($myText) //"HELLO" $0:=Uppercase($1) ``` + ## Types de données De nombreux types de données peuvent être manipulés via le langage 4D. Il existe des types de données élémentaires (chaîne, numérique, date, heure, booléen, image, pointeur, tableau), ainsi que des types de données composites (BLOBs, objets, collections). @@ -143,19 +145,19 @@ A noter que les données de type chaîne et numérique peuvent être associées Cependant, il est important, lorsque vous utilisez le langage, de ne pas mélanger les différents types de données. Tout comme il est absurde de stocker la valeur “ABC†dans un champ de type Date, il est absurde de donner la valeur “ABC†à une variable utilisée pour des dates. Dans la plupart des cas, 4D est très tolérant et tentera d’utiliser de manière logique ce que vous faites. Par exemple, si vous additionnez un nombre x et une date, 4D déduira que vous voulez ajouter x jours à la date, mais si vous tentez d’ajouter une chaîne à une date, 4D vous préviendra que cette opération est impossible. -Certains cas nécessitent que vous stockiez des données dans un type et que vous les utilisiez dans un autre. Le langage contient un ensemble complet de commandes vous permettant de convertir des types de données en d’autres types. Par exemple, si vous voulez créer un numéro de matricule commençant par des chiffres et se terminant par des lettres, telles que "abc", vous pouvez écrire : +Certains cas nécessitent que vous stockiez des données dans un type et que vous les utilisiez dans un autre. Le langage contient un ensemble complet de commandes vous permettant de convertir des types de données en d’autres types. Par exemple, si vous voulez créer un numéro de matricule commençant par des chiffres et se terminant par des lettres, telles que "abc", vous pouvez écrire : vous pouvez écrire : ```4d [Produits]Matricule:=String(Numéro)+"abc" ``` -Si *Numéro* vaut 17, *[Produits]Matricule* prendra la valeur “17abcâ€. +Si _Numéro_ vaut 17, _[Produits]Matricule_ prendra la valeur “17abcâ€. Les types de données sont détaillés dans la section [Types de données](Concepts/data-types.md). ## Objets et collections -Vous pouvez gérer les objets et collections du langage 4D à l'aide de la notation objet pour lire ou définir leurs valeurs. Par exemple: +Vous pouvez gérer les objets et collections du langage 4D à l'aide de la notation objet pour lire ou définir leurs valeurs. Par exemple : ```4d employee.name:="Smith" @@ -175,10 +177,12 @@ $vAge:=employee.children[2].age A noter que si la valeur de la propriété de l'objet est un objet qui encapsule une méthode (une formule), vous devez ajouter des parenthèses () au nom de la propriété pour exécuter la méthode : - $f:=New object - $f.message:=New formula(ALERT("Hello world!")) - $f.message() //affiche "Hello world!" - +``` +$f:=New object +$f.message:=New formula(ALERT("Hello world!")) +$f.message() //affiche "Hello world!" +$f.message() //affiche "Hello world!" +``` Pour accéder à un élément de collection, vous devez passer le numéro de l'élément situé entre crochets : @@ -190,25 +194,25 @@ myColl[3] //accède au 4ème élément de la collection ## Classes -The 4D language supports object classes. Add a `myClass.4dm` file in the Project/Sources/Classes folder of a project to create a class named "myClass". +Le langage 4D prend en charge les classes d'objets. Ajoutez un fichier `myClass.4dm` dans le dossier Project/Sources/Classes d'un projet pour créer une classe nommée "myClass". -To instantiate an object of the class in a method, call the user class from the *class store* (`cs`) and use the `new()` member function. You can pass parameters. +To instantiate an object of the class in a method, call the user class from the *class store* (`cs`) and use the `new()` member function. Vous pouvez passer des paramètres. -```4d -// in a 4D method +```4d +// dans une méthode 4D $o:=cs.myClass.new() ``` -In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. A class member method can receive and return parameters like any method, and use `This` as the object instance. +In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. Une méthode membre de classe peut recevoir et retourner des paramètres comme n'importe quelle méthode, et utiliser `This` comme instance d'objet. -```4d -//in the myClass.4dm file -Function hello - C_TEXT($0) - $0:="Hello "+This.who +```4d +// dans le fichier myClass.4dm +Fonction bonjour + C_TEXT (0 $) + $0: = "Hello" + This.who ``` -To execute a class member method, just use the `()` operator on the member method of the object instance. +Pour exécuter une méthode membre de classe, utilisez simplement l'opérateur `()` sur la méthode membre de l'instance d'objet. ```4d $o:=cs.myClass.new() @@ -219,7 +223,7 @@ $message:=$o.myClass.hello() Optionally, use the `Class constructor` keyword to declare properties of the object. -```4d +```4d //in the Rectangle.4dm file Class constructor C_LONGINT($1;$2) @@ -228,9 +232,9 @@ This.width:=$2 This.name:="Rectangle" ``` -A class can inherit from another class by using `Class inherits `. Superclasses can be called using the `Super` command. Par exemple: +A class can extend another class by using `Class extends `. Superclasses can be called using the `Super` command. Par exemple : -```4d +```4d //in the Square.4dm file Class extends rectangle @@ -244,8 +248,8 @@ Super($1;$1) This.name:="Square" ``` -## Opérateurs +## Opérateurs Lorsque vous programmez avec 4D, il est rare que vous ayez simplement besoin de données “brutesâ€. Le plus souvent, il sera nécessaire de traiter ces données d'une manière ou d'une autre. Vous effectuez ces calculs avec des opérateurs. Les opérateurs, en général, prennent deux valeurs et effectuent avec elles une opération dont le résultat est une troisième valeur. Vous connaissez déjà la plupart des opérateurs. Par exemple, 1 + 2 utilise l’opérateur d’addition (ou signe plus) pour faire la somme de deux nombres, et le résultat est 3. Le tableau ci-dessous présente quelques opérateurs courants : | Opérateur | Opération | Exemple | @@ -255,7 +259,6 @@ Lorsque vous programmez avec 4D, il est rare que vous ayez simplement besoin de | * | Multiplication | 2 * 3 = 6 | | / | Division | 6 / 2 = 3 | - Les opérateurs numériques ne représentent qu’un seul des différents types d’opérateurs disponibles. Comme 4D traite de multiples types de données, tels que des nombres, des dates ou des images, vous disposez d’opérateurs particuliers effectuant des opérations sur ces données. Souvent, les mêmes symboles sont utilisés pour des opérations différentes, en fonction du type de données traitées. Par exemple, le signe (+) peut effectuer diverses opérations, comme le montre le tableau suivant : @@ -273,7 +276,7 @@ Pour parler simplement, les expressions retournent une valeur. En fait, lorsque Les expressions peuvent être constituées de presque tous les éléments du langage : commandes, opérateurs, variables, champs, propriétés d'objets et éléments de collection. Vous utilisez des expressions pour écrire des lignes de code, qui sont à leur tour utilisées pour construire des méthodes. Des expressions sont employées à chaque fois que le langage 4D a besoin de connaître la valeur d’une donnée. -Les expressions sont rarement “indépendantesâ€. Il n’y a que peu d’endroits dans 4D où une expression peut être utilisée en tant que telle. Par exemple : +Les expressions sont rarement «autonomes». Il existe plusieurs endroits dans 4D où une expression peut être utilisée seule. Par exemple : - Editeur de formule (apply formula, query with formula, order by formula) - La commande `EXECUTE FORMULA` @@ -281,15 +284,15 @@ Les expressions sont rarement “indépendantesâ€. Il n’y a que peu d’endro - Dans la fenêtre du Débogueur où la valeur des expressions peut être évaluée - Dans l’éditeur d’états semi-automatiques en tant que formule dans une colonne -### Types d’expressions -Vous vous référez à une expression via le type de données qu’elle retourne. Il existe plusieurs types d’expressions : Le tableau suivant fournit des exemples de chaque type d'expression. +### Types d’expressions +Vous vous référez à une expression via le type de données qu’elle retourne. Il existe plusieurs types d’expressions : Il existe plusieurs types d’expressions : Le tableau suivant fournit des exemples de chaque type d'expression. | Expression | Type | Description | | ----------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | “Bonjour†| Chaine | Le mot Bonjour est une constante chaîne, signalée par les guillemets. | | “Bonjour †+ “à tous†| Chaine | Deux chaînes, “Bonjour †et “à tousâ€, sont mises bout à bout (concaténées) à l'aide de l'opérateur de concaténation de chaînes (+). La chaîne “Bonjour à tous†est retournée. | -| “M. †+ [Amis]Nom | Chaine | Deux chaînes sont concaténées : la chaîne “M. †et la valeur courante du champ Nom de la table Amis. Si le champ contient “Dupontâ€, l'expression retourne “M. Dupontâ€. | +| “Mr. †+ [Personnes]Nom | Chaine | Deux chaînes sont concaténées : la chaîne "Mr." et la valeur courante du champ Nom dans la table Personnes. Si le champ contient “Dupontâ€, l'expression retourne “M. Dupontâ€. | | Uppercase("smith") | Chaine | Cette expression utilise `Uppercase`, une commande du langage, pour convertir la chaîne "dupont" en majuscules. Elle retourne “DUPONTâ€. | | 4 | Nombre | C'est une constante numérique, 4. | | 4 * 2 | Nombre | Deux nombres, 4 et 2, sont multipliés à l'aide de l'opérateur de multiplication (*). Le résultat est le nombre 8. | @@ -302,20 +305,19 @@ Vous vous référez à une expression via le type de données qu’elle retourne | 10 # 20 | Booléen | C'est une comparaison logique entre deux nombres. Le symbole (#) signifie “est différent deâ€. Comme 10 “est différent de†20, l'expression retourne TRUE. | | “ABC†= “XYZ†| Booléen | C'est une comparaison logique entre deux chaînes. Elles sont différentes, donc l'expression retourne FALSE. | | MonImage + 50 | Image | Cette expression considère l'image placée dans MonImage, la déplace de 50 pixels vers la droite, et retourne l'image résultante. | -| ->[Amis]Nom | Pointeur | Cette expression retourne un pointeur vers le champ [Amis]Nom. | +| ->[Personnes]Nom | Pointeur | Cette expression retourne un pointeur vers le champ [Amis]Nom. | | Table(1) | Pointeur | C'est une commande qui retourne un pointeur vers la première table. | | JSON Parse (MaChaine) | Objet | C'est une commande qui retourne MaChaine sous forme d'objet (si format adéquat) | | JSON Parse (MonTabJSON) | Collection | C'est une commande qui retourne MonTabJSON sous forme de collection (si format adéquat) | | Form.pageNumber | Propriété objet | Une propriété objet est une expression qui peut être de tout type | | Col[5] | Élément de collection | Un élément de collection est une expression qui peut être de tout type | -| $entitySel[0] | Entity | Un élément d'une sélection d'entité ORDA est une expression de type entité. Ce type d'expression n'est **pas assignable** | - +| $entitySel[0] | Entity | Un élément d'une sélection d'entité ORDA est une expression de type entité. Ce type d'expression n'est **pas affectable** | ### Expressions assignables et non-assignables -Une expression peut simplement être une constante littérale, telle que le chiffre 4 ou la chaîne "Hello", ou une variable telle que `$myButton`. Elle peut également utiliser des opérateurs. Par exemple, 4 + 2 est une expression qui utilise l'opérateur d'addition pour additionner deux nombres et renvoyer le résultat 6. Dans tous les cas, ces expressions sont **non-assignables**, ce qui signifie que vous ne pouvez pas leur affecter de valeur. Dans 4D, les expressions peuvent être **assignables**. Une expression est assignable quand elle peut être utilisée à droite d'une assignation. Par exemple: +Une expression peut simplement être une constante littérale, telle que le chiffre 4 ou la chaîne "Hello", ou une variable telle que `$myButton`. Elle peut également utiliser des opérateurs. Par exemple, 4 + 2 est une expression qui utilise l'opérateur d'addition pour additionner deux nombres et renvoyer le résultat 6. Dans tous les cas, ces expressions sont **non-assignables**, ce qui signifie que vous ne pouvez pas leur affecter de valeur. Dans 4D, les expressions peuvent être **assignables**. Une expression est assignable quand elle peut être utilisée à droite d'une assignation. Par exemple : -```4d +```4d //La variable $myVar est assignable, vous pouvez écrire : $myVar:="Hello" //assigner "Hello" à myVar //Form.pageNumber est assignable, vous pouvez écrire : @@ -323,9 +325,9 @@ Form.pageNumber:=10 //assigne 10 à Form.pageNumber //Form.pageTotal-Form.pageNumber n'est pas assignable : Form.pageTotal- Form.pageNumber:=10 //erreur, non assignable ``` - En général, les expressions qui utilisent un opérateur ne sont pas assignables. Par exemple, `[Personne] Prénom " " +[Personne]Nom` n'est pas assignable. + ## Pointeurs Le langage 4D fournit une mise en oeuvre avancée des pointeurs, pour vous permettre d'écrire un code puissant et modulaire. Vous pouvez utiliser des pointeurs pour référencer des tables, des champs, des variables, des tableaux et des éléments de tableaux. @@ -364,7 +366,7 @@ For($vCounter;1;100) //Début de la boucle #### Commentaires en ligne ou multi-lignes (/* */) -Entourez le contenu avec les caractères `/*...*/` pour créer des blocs de commentaires en ligne ou multi-lignes. Les blocs de commentaire en ligne et multi-lignes commencent par `/*` et se terminent par `*/`. +Entourez le contenu avec des caractères `/*` ... `*/` pour créer des commentaires en ligne ou des blocs de commentaires multilignes. Les blocs de commentaire en ligne et multi-lignes commencent par `/*` et se terminent par `*/`. - Les **lignes de commentaires en ligne** - peuvent être insérées n'importe où dans le code. Exemple : diff --git a/website/translated_docs/fr/Concepts/shared.md b/website/translated_docs/fr/Concepts/shared.md index 9205ba43c81f6c..0a07505b522a19 100644 --- a/website/translated_docs/fr/Concepts/shared.md +++ b/website/translated_docs/fr/Concepts/shared.md @@ -3,8 +3,6 @@ id: shared title: Objets et collections partagés --- -## Aperçu - **Les objets partagés** et **les collections partagées** sont des [objets](Concepts/dt_object.md) et des [collections](Concepts/dt_collection.md) spécifiques dont le contenu est partagé entre les process. Comparés aux [Variables interprocess](Concepts/variables.md#interprocess-variables), les objets partagés et les collections partagées ont l'avantage d'être compatibles avec les **Process 4D préemptifs** : il peuvent être passés en paramètres (par référence) aux commandes telles que `New process` ou `CALL WORKER`. Les objets partagés et les collections partagées peuvent être stockés dans des variables déclarées à l'aide des commandes standard `C_OBJECT` et `C_COLLECTION`, mais doivent être instanciées à l'aide de commandes spécifiques : @@ -16,7 +14,7 @@ Les objets partagés et les collections partagées peuvent être stockés dans d Toute modification d'un objet/d'une collection partagé(e) doit s'effectuer à l'intérieur d'une structure **Utiliser...Fin utiliser**. La lecture d'une valeur d'objet/collection ne nécessite pas de structure **Utiliser...Fin utiliser**. -Un catalogue unique et global, retourné par la commande `Storage`, est disponible à tout moment et depuis tout process de la base et de ses composants. +Un catalogue unique et global, retourné par la commande `Storage`, est disponible à tout moment et depuis tout process de l'application et de ses composants. ## Utilisation des objets et collections partagés @@ -38,13 +36,13 @@ Toute instruction de modification d'objet ou de collection partagé(e) doit êtr End Use ``` -Un objet/une collection partagé(e) ne peut être modifié(e) que par un seul process à la fois. `Use` verrouille les propriétés de l'objet/la collection pour les autres threads (process), alors que le `End use` utiliser final déverrouille tous les objets et collections. Toute tentative de modification d'un objet/d'une collection partagé(e) sans au moins un appel à `Use...End use` génère une erreur. Lorsqu'un process appelle `Use...End use` avec un objet/une collection partagé(e) qui est déjà "utilisé(e)" par un autre process, il est simplement mis en attente jusqu'à ce qu'il soit déverrouillé par l'appel à `End use` (aucune erreur n'est générée). En conséquence, les instructions situées à l'intérieur des structures `Use...End use` doivent toujours s'exécuter rapidement et déverrouiller les éléments dès que possible. Il est donc fortement déconseillé de modifier un objet ou une collection partagé(e) directement depuis l'interface, par exemple depuis une boîte de dialogue. +Un objet/une collection partagé(e) ne peut être modifié(e) que par un seul process à la fois. `Use` locks the shared object/collection from other threads, while `End use` unlocks the shared object/collection (if the locking counter is at 0, see below). . Toute tentative de modification d'un objet/d'une collection partagé(e) sans au moins un appel à `Use...End use` génère une erreur. Lorsqu'un process appelle `Use...End use` avec un objet/une collection partagé(e) qui est déjà "utilisé(e)" par un autre process, il est simplement mis en attente jusqu'à ce qu'il soit déverrouillé par l'appel à `End use` (aucune erreur n'est générée). En conséquence, les instructions situées à l'intérieur des structures `Use...End use` doivent toujours s'exécuter rapidement et déverrouiller les éléments dès que possible. Il est donc fortement déconseillé de modifier un objet ou une collection partagé(e) directement depuis l'interface, par exemple depuis une boîte de dialogue. L'assignation d'objets/collections partagé(e) s à des propriétés ou éléments d'autres objets/collections partagé(e) s est autorisée et entraîne la création de **groupes partagés**. Un groupe partagé est automatiquement créé lorsqu'un objet ou une collection partagé(e) est assigné(e) en tant que valeur de propriété ou élément à un autre objet ou collection partagé(e). Les groupes partagés permettent d'imbriquer des objets et collections partagé(e)s mais nécessitent d'observer des règles supplémentaires : -- L'appel de `Use` avec un objet/une collection partagé(e) appartenant à un groupe provoquera le verrouillage des propriétés/éléments de tous les objets/collections du groupe. +- Calling `Use` on a shared object/collection belonging to a group locks properties/elements of all shared objects/collections of the group and increments its locking counter. Calling `End use` decrements the locking counter of the group and when the counter is at 0, all the linked shared objects/collections are unlocked. - Un objet ou une collection partagé(e) peut appartenir à un seul groupe partagé. Une erreur est générée si vous tentez d'assigner un objet ou une collection appartenant déjà à un groupe à un groupe différent. -- Les objets/collections groupé(e) s ne peuvent plus être dégroupé(e) s. Une fois inclus dans un groupe partagé, un objet ou une collection partagé(e) est lié(e) définitivement au groupe pendant toute la durée de la session. Même si toutes les références de l'objet/la collection sont supprimé(e) s des objets/collections parent(e) s, ils resteront liés. +- Les objets/collections groupé(e) s ne peuvent plus être dégroupé(e) s. Une fois inclus dans un groupe partagé, un objet ou une collection partagé(e) est lié(e) définitivement au groupe pendant toute la durée de la session. Même si toutes les références de l'objet/la collection sont supprimé(e) s des objets/collections parent(e) s, ils resteront liés. Reportez-vous à l'exemple 2 pour l'illustration des règles des groupes partagés. @@ -62,7 +60,7 @@ Appeler `OB Copier` avec un objet partagé (ou avec un objet dont des propriét ### Storage -**Storage** est un objet partagé unique, disponible automatiquement pour chaque application et machine. Cet objet partagé est retourné par la commande `Storage`. Il est destiné à référencer les objets ou collections partagé(e)s défini(e)s durant la session que vous souhaitez rendre accessibles à tous les process, préemptifs ou standard. +**Storage** est un objet partagé unique, disponible automatiquement pour chaque application et machine. Cet objet partagé est retourné par la commande `Storage`. Il est destiné à référencer les objets ou collections partagé(e)s défini(e)s durant la session que vous souhaitez rendre accessibles à tous les process, préemptifs ou standard. A noter que, à la différence de objets partagés standard, l'objet `Storage` ne crée par de groupe partagé lorsque des objets/collection lui sont assigné(e) s en tant que propriétés. Cette exception permet à l'objet **Storage** d'être utilisé sans verrouiller les objets/collections partagé(e) s connecté(e) s. @@ -82,33 +80,34 @@ La structure `Use...End use` définit une séquence d'instructions qui exécuter Les objets partagés et les collections partagées permettent d'établir des communications entre les process, en particulier les **Process 4D préemptifs**. Ils peuvent être passés par référence en paramètre d'un process à un autre. Pour plus de détails sur les objets partagés et les collections partagées, reportez-vous à la page **Objets et collections partagés**. Encadrer les modifications sur les objets partagés et les collections partagées à l'aide des mots-clés `Use...End use` est obligatoire pour empêcher les accès concurrents entre les process. -- Une fois que la ligne **Use/Utiliser** est exécutée avec succès, toutes les propriétés/éléments de *Objet_partagé_ou_Collection_partagée* sont verrouillé(e) s en écriture pour tous les autres process jusqu'à ce que la ligne `End use/Fin` utiliser correspondante soit éxécutée. -- La séquence *d'instructions* peut alors effectuer toute modification dans les propriétés/éléments de Objet_partagé_ou_Collection_partagée sans risque d'accès concurrent. -- Si un autre objet ou collection partagé(e) est ajouté(e) en tant que propriété du paramètre *Objet_partagé_ou_Collection_partagée*, il ou elle devient connecté(e) et appartiennent au même groupe partagé (cf.** Utilisation des objets et collections partagés**). -- Si un autre process tente d'accéder à une propriété de *Objet_partagé_ou_Collection_partagée* ou une propriété connectée alors qu'une séquence **Utiliser...Fin** utiliser est en cours d'exécution sur le même Objet_partagé_ou_Collection_partagée, il est automatiquement placé en attente et attendra jusqu'à ce que la séquence courante soit terminée. -- La ligne **End use/Fin** utiliser déverrouille les propriétés de *Objet_partagé_ou_Collection_partagée* et tous les objets qui partagent le même locking identifier. -- Plusieurs structures **Utiliser...Fin** utiliser peuvent être imbriquées dans le code 4D. Dans ce cas, tous les verrouillages sont empilés et les propriétés/éléments ne seront déverrouillé(e) s que lorsque le dernier appel de End use/Fin utiliser sera exécuté. +- Une fois que la ligne **Use/Utiliser** est exécutée avec succès, toutes les propriétés/éléments de _Objet_partagé_ou_Collection_partagée_ sont verrouillé(e) s en écriture pour tous les autres process jusqu'à ce que la ligne `End use/Fin` utiliser correspondante soit éxécutée. +- La séquence _d'instructions_ peut alors effectuer toute modification dans les propriétés/éléments de Objet_partagé_ou_Collection_partagée sans risque d'accès concurrent. +- Si un autre objet ou collection partagé(e) est ajouté(e) en tant que propriété du paramètre _Objet_partagé_ou_Collection_partagée_, il ou elle devient connecté(e) et appartiennent au même groupe partagé (cf.** Utilisation des objets et collections partagés**). +- Si un autre process tente d'accéder à une propriété de _Objet_partagé_ou_Collection_partagée_ ou une propriété connectée alors qu'une séquence **Utiliser...Fin** utiliser est en cours d'exécution sur le même Objet_partagé_ou_Collection_partagée, il est automatiquement placé en attente et attendra jusqu'à ce que la séquence courante soit terminée. +- The **End use** line unlocks the _Shared_object_or_Shared_collection_ properties and all objects of the same group. +- Plusieurs structures **Utiliser...Fin** utiliser peuvent être imbriquées dans le code 4D. In the case of a group, each **Use** increments the locking counter of the group and each **End use** decrements it; all properties/elements will be released only when the last **End use** call sets the locking counter to 0. **Note :** Si une fonction membre d'une collection modifie une collection partagée, un **Utiliser** interne est automatiquement mis en place pour cette collection partagée durant l'exécution de la fonction. + ## Exemple 1 Vous souhaitez lancer plusieurs process qui vont effectuer des tâches d'inventaire parmi différents produits et mettre à jour le même objet partagé. Le process principal instancie un objet partagé vide et ensuite lance les autres process, passant en paramètre l'objet partagé et les produits à comptabiliser : ```4d ARRAY TEXT($_items;0) - ... //remplit le tableau avec les éléments à compter + ... //remplir le tableau avec les éléments à compter $nbItems:=Size of array($_items) C_OBJECT($inventory) $inventory:=New shared object Use($inventory) $inventory.nbItems:=$nbItems End use - - //Créer process - For($i;1;$nbItems) + + //Créer un process + For($i;1;$nbItems) $ps:=New process("HowMany";0;"HowMany_"+$_items{$i};$_items{$i};$inventory) - //$inventory object sent by reference + // objet $inventory envoyé par référence End for ``` @@ -160,4 +159,4 @@ End use //$ob4 appartient toujours au groupe 2 //son assignation n'est pas permise End use -``` \ No newline at end of file +``` diff --git a/website/translated_docs/fr/Concepts/variables.md b/website/translated_docs/fr/Concepts/variables.md index 0f39beae683007..1123afc9a49f27 100644 --- a/website/translated_docs/fr/Concepts/variables.md +++ b/website/translated_docs/fr/Concepts/variables.md @@ -7,20 +7,21 @@ Fondamentalement, dans 4D, les données peuvent être stockées de deux manière Lorsque vous définissez votre base, vous indiquez à 4D les noms et les types de champs que vous voulez utiliser. C’est pratiquement la même chose pour les variables — vous leur donnez un nom et un type (cf. [Type de données](Concepts/data-types.md)). -Une fois créée, vous pouvez utiliser une variable partout dans votre base. For example, you might need to store a text variable in a field of same type: +Une fois créée, vous pouvez utiliser une variable partout dans votre application. For example, you might need to store a text variable in a field of same type: ```4d [MaTable]MonChamp:=MonTexte ``` + Les variables sont des objets du langage; vous pouvez créer et utiliser des variables qui n’apparaîtront jamais à l'écran. Dans vos formulaires, vous pouvez afficher des variables à l’écran (à l'exception des pointeurs et des BLOB), les utiliser pour saisir des données, et les imprimer dans des états. Dans ces cas, elles se comportent exactement comme des champs, et les mêmes contrôles intégrés sont disponibles lorsque vous les créez . Les variables peuvent également servir à contrôler des boutons, des list box, des zones de défilement, des boutons image, etc., ou à afficher les résultats de calculs ne devant pas être sauvegardés. -## Declaring Variables +## Déclaration des variables -You create variables by declaring them. The 4D language offers two ways to declare variables: +Vous créez des variables en les déclarant. Le langage 4D propose deux manières de déclarer des variables : -- using the `var` keyword (recommended, specially if your code uses objects and classes), -- using one of the "Compiler" or "Arrays" theme 4D language commands (deprecated, classic language only). +- à l'aide du mot-clé `var` (recommandé particulièrement si votre code utilise des objets et des classes), +- à l'aide de l'une des commandes du langage 4D du thème "Compilateur" ou "Tableaux" (langage classique uniquement). **Note:** Although it is usually not recommended, you can create basic variables simply by using them; you do not necessarily need to formally define them. For example, to declare a variable that will hold the current date plus 30 days, you can write: @@ -30,199 +31,65 @@ You create variables by declaring them. The 4D language offers two ways to decla // and assigns the current date plus 30 days ``` + ### Using the `var` keyword Declaring variables using the `var` keyword is recommended since this syntax allows you to bind object variables with classes. Using this syntax enhances code editor suggestions and type-ahead features. To declare a variable of any type with the `var` keyword, use the following syntax: -`var {, ,...}{ : }` +`var {; ;...}{ : }` -Par exemple: +Par exemple : ```4d var $myText : Text //a text variable -var myDate1, myDate2 : Date //several date variables +var myDate1; myDate2 : Date //several date variables var $myFile : 4D.File //a file class object variable var $myVar //a variant variable ``` -`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. +`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. This syntax only supports [local and process variables](#local-process-and-interprocess-variables) declarations, thus excluding [interprocess variables](#interprocess-variables) and [arrays](Concepts/arrays.md). `varType` can be: -- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, +- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, - a [class reference](Concepts/classes.md) (4D class or user class), in which case the variable contains a reference to an object of the defined class. If `varType` is omitted, a variable of the **variant** type is created. -The following table lists all supported `varType` values: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - varType - - Contenu -
      - Texte - - Text value -
      - Date - - Date value -
      - Heure - - Time value -
      - Booléen - - Boolean value -
      - Entier long - - Long integer value -
      - Réel - - Real value -
      - Pointeur - - Pointer value -
      - Image - - Picture value -
      - Blob - - BLOB value -
      - Collection - - Collection value -
      - Variant - - Variant value -
      - Objet - - Object with default class (4D.Object) -
      - 4D.\ - - Object of the 4D class name -
      - cs.\ - - Object of the user class name -
      +Le tableau suivant répertorie toutes les valeurs `varType` prises en charge : + +| varType | Contenu | +| ---------------------- | ---------------------------------------- | +| `Texte` | Valeur texte | +| `Date` | Valeur date | +| `Heure` | Valeur Heure | +| `Booléen` | Valeur booléen | +| `Entier long` | Valeur entier long | +| `Réel` | Valeur réel | +| `Pointeur` | Valeur pointeur | +| `Image` | Valeur image | +| `Blob` | Valeur BLOB | +| `Collection` | Valeur collection | +| `Variant` | Valeur variant | +| `Objet` | Objet avec classe par défaut (4D.object) | +| `4D.` | Objet du nom de la classe 4D | +| `cs.` | Objet du nom de la classe utilisateur | #### Exemples - To declare local and process basic variables: ```4d -var $myText, myText, $vt : Text +var $myText; myText; $vt : Text var myVar //variant var $o : Object -//equivalent to: +//équivalent à : var $o : 4D.Object -//also equivalent to C_OBJECT($o) +//également équivalent à C_OBJECT($o) ``` - To declare object variables of 4D class: @@ -240,9 +107,10 @@ var $dataclass : cs.Employee var $entity : cs.EmployeeEntity ``` + ### Using a C_ directive -> **Compatibility Note:** This feature is deprecated as of 4D v18 R3. It is now recommended to use the [var](#using-the-var-keyword) keyword. +> **Note de compatibilité :** cette fonctionnalité n'est pas recommandée pour déclarer des variables dans des méthodes. Il est recommandé d'utiliser le mot-clé [var](#using-the-var-keyword). Directives from the "Compiler" theme commands allow you to declare variables of basic types. @@ -255,37 +123,37 @@ Par exemple, si vous souhaitez définir une variable de type texte, il suffira d Voici quelques déclarations de variables simples : ```4d - C_BLOB(vxMyBlob) // La variable process vxMyBlob est déclarée comme variable de type BLOB - C_DATE($vdCurDate) // La variable locale $vdCurDate est déclarée comme variable de type Date - C_C_LONGINT(vg1;vg2;vg3) // Les 3 variables process vg1, vg2 et vg3 sont déclarées comme variables de type Entier long - C_OBJECT($vObj) // La variable locale $vObj est déclarée comme variable de type Objet - C_COLLECTION($vCol) // La variable locale $vCol est déclarée comme variable de type Collection -ARRAY LONGINT(alAnArray;10) //La variable process alAnArray est déclarée comme un tableau entier long de 10 éléments + 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 ``` -**Note:** Arrays are a particular type of variables. Un tableau est une série ordonnée de variables de même type. Pour plus d'informations, veuillez consulter le thème [Tableaux](Concepts/arrays.md). +**Note:** Arrays are a particular type of variables (an array is an ordered series of variables of the same type). Arrays are declared with specific commands, such as `ARRAY LONGINT(alAnArray;10)`. Pour plus d'informations, veuillez consulter le thème [Tableaux](Concepts/arrays.md). + ## Assigner des valeurs Vous pouvez donner des valeurs aux variables ou aux tableaux et/ou récupérer leur valeur. Donner une valeur à une variable s’appelle **assigner une valeur (ou affecter une valeur)** et s’effectue à l’aide de l’opérateur d’assignation (:=). L’opérateur d’assignation est également utilisé pour assigner des valeurs aux champs. -The assignment operator is a primary way to create a variable and to put data into it. Vous placez le nom de la variable que vous voulez créer à gauche de l’opérateur. Par exemple: +L’opérateur d’assignation est un premier moyen pour créer une variable et lui donner une valeur. Vous placez le nom de la variable que vous voulez créer à gauche de l’opérateur. Par exemple : ```4d MonNombre:=3 ``` -crée la variable *MonNombre* et lui donne la valeur numérique 3. Si MonNombre existait déjà, elle prend simplement la valeur 3. +crée la variable _MonNombre_ et lui donne la valeur numérique 3. Si MonNombre existait déjà, elle prend simplement la valeur 3. > It is usually not recommended to create variables without [declaring their type](#creating-variables). -Bien entendu, les variables ne seraient pas très utiles si vous ne pouviez pas récupérer les valeurs qu’elles contiennent. De nouveau, vous utilisez l’opérateur d’assignation. Si vous devez placer la valeur de MonNombre dans un champ nommé [Produits]Taille, il vous suffit de placer *MonNombre* à droite de l’opérateur d’assignation : +Bien entendu, les variables ne seraient pas très utiles si vous ne pouviez pas récupérer les valeurs qu’elles contiennent. De nouveau, vous utilisez l’opérateur d’assignation. Si vous devez placer la valeur de MonNombre dans un champ nommé [Produits]Taille, il vous suffit de placer _MonNombre_ à droite de l’opérateur d’assignation : ```4d [Produits]Taille:=MonNombre ``` -Dans ce cas, *[Produits]Taille* vaudrait 3. Cet exemple est plutôt simple, mais il illustre le moyen élémentaire dont vous disposez pour transférer des données d’un objet vers un autre en utilisant le langage. +Dans ce cas, _[Produits]Taille_ vaudrait 3. Cet exemple est plutôt simple, mais il illustre le moyen élémentaire dont vous disposez pour transférer des données d’un objet vers un autre en utilisant le langage. Vous assignez des valeurs aux éléments du tableau à l'aide d'accolades ({...}) : @@ -299,9 +167,7 @@ Vous pouvez créer trois types de variables : des variables **locales**, des var ### Variables locales -Une variable locale, comme son nom l’indique, est locale à une méthode — c’est-à-dire accessible uniquement à l’intérieur de la méthode dans laquelle elle a été créée et inaccessible à l’extérieur de cette méthode. Pour une variable, être locale à une méthode signifie avoir une portée locale. Vous utilisez une variable locale lorsque vous souhaitez limiter son fonctionnement à la méthode, pour une des raisons suivantes : - - +Une variable locale, comme son nom l’indique, est locale à une méthode — c’est-à-dire accessible uniquement à l’intérieur de la méthode dans laquelle elle a été créée et inaccessible à l’extérieur de cette méthode. Le fait d'être local à une méthode est formellement qualifié de «portée locale». Les variables locales sont utilisées pour restreindre une variable afin qu'elle ne fonctionne que dans la méthode. - Eviter des conflits de noms avec les autres variables - Utiliser temporairement des valeurs, @@ -309,9 +175,9 @@ Une variable locale, comme son nom l’indique, est locale à une méthode — c Le nom d’une variable locale commence toujours par le signe dollar ($) et peut contenir jusqu’à 31 autres caractères. Si vous saisissez un nom plus long, 4D le tronque pour le ramener à 31 caractères. -Lorsque vous développez une base comportant de nombreuses méthodes et variables, il arrive souvent que vous n’ayez besoin d’utiliser une variable que dans une méthode. Vous pouvez alors créer et utiliser une variable locale, sans devoir vous soucier de l’existence d’une autre variable du même nom ailleurs dans la base. +Lorsque vous développez un projet d'application comportant de nombreuses méthodes et variables, il arrive souvent que vous n’ayez besoin d’utiliser une variable que dans une méthode. Vous pouvez alors créer et utiliser une variable locale, sans devoir vous soucier de l’existence d’une autre variable du même nom ailleurs dans la base. -Fréquemment, dans une base de données, des informations ponctuelles sont demandées à l’utilisateur. The `Request` command can obtain this information. Elle affiche une boîte de dialogue comportant un message demandant à l’utilisateur de répondre et, lorsque la réponse est validée, la retourne. Généralement, il n’est pas nécessaire de conserver cette information très longtemps dans vos méthodes. C’est l’endroit parfait pour utiliser une variable locale. Voici un exemple : +Souvent, dans une application, des informations ponctuelles sont demandées à l’utilisateur. The `Request` command can obtain this information. Elle affiche une boîte de dialogue comportant un message demandant à l’utilisateur de répondre et, lorsque la réponse est validée, la retourne. Généralement, il n’est pas nécessaire de conserver cette information très longtemps dans vos méthodes. C’est l’endroit parfait pour utiliser une variable locale. Voici un exemple : ```4d $vsID:=Request("Saisissez votre numéro d'identification :") @@ -322,7 +188,7 @@ If(OK=1) Cette méthode demande simplement à l’utilisateur de saisir un numéro d’identification. La réponse est placée dans une variable locale, $vsID, puis la méthode la recherche parmi les champs [Personnes]ID. Une fois la méthode terminée, la variable locale $vsID est effacée de la mémoire. Ce fonctionnement est bien adapté puisque la variable n’est utile qu’une seule fois et dans cette méthode uniquement. -**Note :** Paramètres $1, $2... passés à des méthodes sont des variables locales. Pour plus d'informations, veuillez consulter le thème [Paramètres](Concepts/parameters.md). +**Note :** les paramètres $1, $2 etc. passés aux méthodes sont des variables locales. Pour plus d'informations, veuillez consulter le thème [Paramètres](Concepts/parameters.md). ### Variables process @@ -330,7 +196,7 @@ Une variable process est “visible†uniquement dans le process où elle a ét Le nom d’une variable process ne comporte aucun préfixe. Ce nom peut contenir jusqu’à 31 caractères. -En mode interprété, les variables sont gérées dynamiquement : elles sont créées en mémoire et effacées “à la voléeâ€. En mode compilé, tous les process que vous créez (process utilisateurs) partagent la même définition des variables process, mais chaque process dispose de sa propre instance pour chaque variable. Par exemple, la variable maVar est une certaine variable dans le process P_1 et une autre variable dans le process P_2. +En mode interprété, les variables sont gérées dynamiquement; elles sont créées et effacées de la mémoire «à la volée». En mode compilé, tous les process que vous créez (process utilisateur) partagent la même définition de variables process, mais chaque process a une instance différente pour chaque variable. Par exemple, la variable maVar est une certaine variable dans le process P_1 et une autre variable dans le process P_2. Un process peut lire et écrire des variables process dans un autre process à l'aide des commandes `LIRE VARIABLE PROCESS` et `ECRIRE VARIABLE PROCESS`. Nous vous recommandons de n'utiliser ces commandes que dans le cadre des besoins décrits ci-dessous (qui sont les raisons pour lesquelles ces commandes ont été créées dans 4D) : @@ -342,10 +208,12 @@ Pour plus d'informations, reportez-vous à la section **Process** et à la descr ### Variables interprocess -Les variables interprocess sont visibles dans toute la base et sont disponibles pour tous les process. Les variables interprocess sont principalement utilisées pour le partage d’informations entre les process. +Les variables interprocess sont visibles dans tout le projet et sont disponibles pour tous les process. Les variables interprocess sont principalement utilisées pour le partage d’informations entre les process. > L'utilisation de variables interprocess n'est pas recommandée car elles ne sont pas disponibles depuis le process préemptif et peuvent rendre le code moins maintenable. Le nom d’une variable interprocess débute toujours par le symbole (<>) — formé du symbole “inférieur à†suivi du symbole “supérieur à†— et peut comporter jusqu’à 31 caractères supplémentaires. -En mode client/serveur, chaque poste (client et serveur) partage la même définition des variables interprocess, mais chacun utilise une instance différente d'une variable. \ No newline at end of file +En mode client/serveur, chaque poste (client et serveur) partage la même définition des variables interprocess, mais chacun utilise une instance différente d'une variable. + + diff --git a/website/translated_docs/fr/Debugging/basics.md b/website/translated_docs/fr/Debugging/basics.md new file mode 100644 index 00000000000000..7082ed857a60e1 --- /dev/null +++ b/website/translated_docs/fr/Debugging/basics.md @@ -0,0 +1,97 @@ +--- +id: basics +title: Basics +--- + +Errors are common. It would be unusual to write a substantial number of lines of code without generating any errors. Conversely, treating and/or fixing errors is normal, too! + +The 4D development environment provides several debugging tools for all types of errors. + +## Error types + +### Typing errors + +Typing errors are detected by the Method editor. They are displayed in red and additional information is provided at the bottom of the window. Here's a typing error: + +![break-point](assets/en/Debugging/typing-error.png) + + +Such typing errors usually cause syntax errors (in the above image, the name of the table is unknown). You get the description of the error when you validate the line of code. When this occurs, fix the typing error and type Enter to validate the fix. + +### Syntax Errors + +Some errors can be caught only when you execute the method. The [Syntax Error Window](#syntax-error-window) appears when an error occurs during code execution. Par exemple : + +![syntax-error](assets/en/Debugging/syntax-error.png) + +Expand the **Details** area to display the last error and its number. + +### Environmental Errors + +Occasionally, there may not be enough memory to create a BLOB. Or, when you access a document on disk, the document may not exist or may already be opened by another application. These environmental errors do not directly occur because of your code or the way you wrote it. Most of the time, these errors are easy to treat with an [error catching method](Concepts/error-handling.md) installed using the `ON ERR CALL` command. + +### Design or Logic Errors + +These are generally the most difficult type of error to find. Except for typing errors, all the error types listed above are to a certain extent covered by the expression "Design or logic error". Use the [Debugger](debugger.md) to detect them. Par exemple : + +- A *syntax error* may occur when you try to use a variable that is not yet initialized. +- An *environmental error* can occur when you try to open a document, because that document's name is received by a subroutine that did not get the right value as a parameter. + +Design or logic errors also include such situations as: + +- A record is not properly updated because, while calling `SAVE RECORD`, you forgot to first test whether or not the record was locked. +- A method does not do exactly what you expect, because the presence of an optional parameter is not tested. + +Sometimes the piece of code that displays the error may be different than the code that is actually the origin of the problem. + +### Runtime Errors + +In Application mode, you might obtain errors that you don't see in interpreted mode. Here's an example: + +![runtime-error](assets/en/Debugging/runtimeError.png) + +To quickly find the origin of the problem, reopen the interpreted version of the structure file, open the method and go to the corresponding line. + +## Syntax Error Window + +The Syntax error window automatically appears when the execution of a method is interrupted. This can happen when: + +- an error prevents further code execution +- the method produces a false assertion (see the `ASSERT` command) + +![syntax-error](assets/en/Debugging/syntax-error.png) + +The upper text area displays a message describing the error. The lower text area shows the line that was executing when the error occurred; the area where the error occurred is highlighted. The expanded Details section contains the "stack" of errors related to the process. + +The syntax error window proposes several options: + +- **Edit**: Stops all method execution. 4D switches to the Design environment and the method with the error opens in the Method editor, allowing you to fix it. Use this option when you immediately recognize the mistake and can fix it without further investigation. + +- **Trace**: Enters Trace/Debugger mode. The [Debugger](debugger.md) window is displayed. If the current line has only executed partially, you may have to click the **Trace** button several times. + +- **Continue**: Execution continues. The line with the error may be partially executed, depending on where the error is located. Continue with caution: the error may prevent the rest of your method from executing properly. We recommend clicking **Continue** only if the error is in a trivial call (such as `SET WINDOW TITLE`) that does not prevent executing and testing the rest of your code. + +> Tip: To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error. + +- **Abort**: Stops method execution and returns to the state before the method started executing: + + - If a form method or object method is executing in response to an event, it is stopped and you return to the form. + - If the method is executing from within the Application environment, you return to that environment. + +- **Copy**: Copies the debugging information into the clipboard. The info describes the internal environment of the error (number, internal component, etc.). It is formatted as tabbed text. + +- **Save...**: Saves the contents of the syntax error window and the call chain in a `.txt` file. + +## Debugger + +A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Method Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the **Debugger**. + +The Debugger allows you to step through methods slowly. It displays all the information you need in order to understand why an error occurred. Once you have this information, you know how to fix the error. + +Another reason to use the Debugger is for developing code. Sometimes you may write an algorithm that is more complex than usual. Despite all feelings of accomplishment, you can't be totally sure that your coding is 100% correct. Instead of running it "blind", you can use the `TRACE` command at the beginning of your code, then execute it step by step to keep an eye on what happens. + +## Breaks + +In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. "$myVar > 1000"), or every time a specific 4D command is called. + +These needs are covered by **breakpoints** and **command catching** features. They can be configured from the method editor, the debugger, or the Runtime Explorer. \ No newline at end of file diff --git a/website/translated_docs/fr/Debugging/breakpoints.md b/website/translated_docs/fr/Debugging/breakpoints.md new file mode 100644 index 00000000000000..aa9047c577b4b5 --- /dev/null +++ b/website/translated_docs/fr/Debugging/breakpoints.md @@ -0,0 +1,125 @@ +--- +id: breakpoints +title: Breakpoints and Command Catching +--- + +## Aperçu + + +Breakpoints and command catching are very efficient debugging techniques. Both have the same effect: they pause the code execution (and display the debugger window if not already displayed) at a desired step. + +You set breakpoints on any line of code where you want the execution to be paused. You can associate a condition to the break point. + +Catching a command enables you to start tracing the execution of any process as soon as a command is called by that process. + + + +## Breakpoints + + +To create a break point, click in the left margin of the Source Code pane in the debugger or in the Method editor. + +In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If ($in.dataClass#Null)`: + +![break-point](assets/en/Debugging/break.png) + +In the above example, clicking the [**No Trace**](./debugger.md/#no-trace) button resumes normal execution up to the line marked with the break point. That line is not executed itself — you are taken back to trace mode. Setting a break point beyond the program counter and clicking the **No Trace** button allows you to skip portions of the method being traced. + +To remove a break point, click the corresponding bullet. + + +### Breakpoint Properties + +You can edit the behavior of a breakpoint using the Breakpoint Properties window: + +![breakpoint-properties](assets/en/Debugging/breakpoint-properties.png) + +This window is available from the Method Editor or the [Source Code Pane](debugger.md#source-code-pane). You can: + +- right-click a line and select **Edit Breakpoint** in the contextual menu, or +- `Alt+click` (Windows) or `Option+click` (macOS) in the left margin. + +If a break point already exists, the window is displayed for that break point. Otherwise, a break point is created and the window is displayed for the newly created break point. + +Here is a description of the properties: + +* **Location**: indicates the name of the method and the line number attached to the breakpoint. +* **Break when following expression is true**: You can create **conditional breakpoints** by entering a 4D formula that returns `True` or `False`. For example, insert `Records in selection(\[aTable])=0` to make sure the break occurs only if there no record selected for the table \[aTable]. Breakpoint conditions are available in the **Condition** column of the [Break list](#break-list). +* **Number of times to skip before breaking**: You can attach a breakpoint to a line located in a loop structure (While, Repeat, or For) or located in subroutine or function called from within a loop. +* **Breakpoint is disabled**: If you currently do not need a break point, but might need it later, you can temporarily disable it. A disabled break point appears as a dash (-) instead of a bullet (•)| + + +### Breakpoints in remote debugging + +The break point list is stored locally. In remote debugging mode, if the attached debugger is a remote 4D, the remote break point list replaces temporarily the server break point list during the debugging session. + +The server break point list is automatically restored if it becomes again the attached debugger. + +### Break List + +The Break list is a page of the Runtime Explorer that lets you manage the breakpoints created in the Debugger Window or in the Method Editor. For more information on the Runtime Explorer, see its dedicated page in [the Design reference manual](https://doc.4d.com/4Dv19/4D/19/Runtime-Explorer.200-5416614.en.html). + +To open the Break list page: + +1. From the **Run menu**, click **Runtime Explorer...** + +2. Click the **Break** tab to display the Break list: + +![break-list-runtime-explorer](assets/en/Debugging/break-list.png) + +Using this window, you can: + +* Set conditions for breakpoints in the **Conditions** column +* Enable or disable breakpoints by clicking the bullets in the margin. Disabled breakpoints display transparent bullets +* Delete breakpoints by pressing the `Delete` or `Backspace` key, or click on the **Delete** button below the list. +* Open the methods where the breakpoint are located by double-clicking any line in the list + +You cannot add new breakpoints from this window. Breakpoints can only be created from within the Debugger window or the Method Editor. + + +## Catching Commands + +The **Catch** tab of the Runtime Explorer lets you add additional breaks to your code by catching calls to 4D commands. Unlike a break point, which is located in a particular project method (and therefore triggers a trace exception only when it is reached), the scope of catching a command includes all the processes that execute 4D code and call that command. + +Catching a command is a convenient way to trace large portions of code without setting break points at arbitrary locations. For example, if a record that should not be deleted is deleted after you've executed one or several processes, you can try to reduce the field of your investigation by catching commands such as `DELETE RECORD` and `DELETE SELECTION`. Each time these commands are called, you can check if the record in question has been deleted, and thus isolate the faulty part of the code. + +Feel free to combine breakpoints and command catching. + +To open the Caught Commands page: + +1. Choose **Run** > **Runtime explorer...** to open the Runtime Explorer. + +2. Click **Catch** to display the Caught Commands List: + +![runtime-explorer-window](assets/en/Debugging/catch-command.png) + +This page lists the commands to be caught during execution. It is composed of two columns: + +* The left column displays the Enable/Disable status of the caught command, followed by the name of the command +* The right column displays the condition associated with the caught command, if any + +To add a command to be caught: + +1. Click on the **Add New Catch** button (in the shape of a +) located below the list. A new entry is added to the list with the `ALERT` command as default +2. Click the **ALERT** label, type the name of the command you want to catch, then press **Enter**. + +To enable or disable a caught command, click on the bullet (•) in front of the command label. The bullet is transparent when the command is disabled. + +> Disabling a caught command has almost the same effect as deleting it. During execution, the debugger spends almost no time on the entry. The advantage of disabling an entry is that you do not have to recreate it when you need it again. + +To delete a caught command: + +1. Select a command in the list. +2. Press **Backspace** or **Delete** on your keyboard or click on the **Delete** button beneath the list (**Delete All** removes all commands in the list). + +### Setting a Condition for catching a command + +1. Click on the entry in the right column +2. Enter a 4D formula (expression, command call or project method) that returns a Boolean value. + +> To remove a condition, delete its formula. + +Adding conditions allows you to stop execution when the command is invoked only if the condition is met. For example, if you associate the condition `Records in selection(\[Emp]>10)` with the break point on the `DELETE SELECTION` command, the code will not be stopped during execution of the `DELETE SELECTION` command if the current selection of the \[Emp] table only contains 9 records (or less). + +Adding conditions to caught commands slows the execution, because the condition has to be evaluated each time an exception is met. On the other hand, adding conditions accelerates the debugging process, because 4D automatically skips occurrences that do not match the conditions. + diff --git a/website/translated_docs/fr/Debugging/debugger.md b/website/translated_docs/fr/Debugging/debugger.md new file mode 100644 index 00000000000000..35471bc9ec38eb --- /dev/null +++ b/website/translated_docs/fr/Debugging/debugger.md @@ -0,0 +1,438 @@ +--- +id: debugger +title: Debugger +--- + +The debugger is useful when you need to spot errors or monitor the execution of methods. It allows you to step through methods slowly and examine the information. This process is called "tracing". + +![debugger-window-local](assets/en/Debugging/debugger-Window-local.png) + + +## Calling the Debugger + +There are multiple ways to get the Debugger to display: + +* Clicking the **Trace** button in the [Syntax Error window](basics.md#syntax-error-window) +* Using the [`TRACE`](https://doc.4d.com/4dv19/help/command/en/page157.html) command +* Clicking the **Debug** button in the Execute Method window or selecting **Run and debug...** button in the Method editor +* Using **Alt+Shift+Right click** (Windows) or **Ctrl+Option+Cmd+Click** (macOS) while a method is executing, then selecting the process to trace in the pop-up menu: + +![open-debugger](assets/en/Debugging/openDebugger.png) + +* Clicking the **Trace** button when a process is selected in the Process page of the Runtime Explorer. +* Adding a break point in the Method Editor window or in the Break and Catch pages of the Runtime Explorer. + +When called, the debugger window provides the name of the method or class function you're currently tracing, and the action causing the initial appearance of the Debugger window. For example, in the above debugger window: + +* *Clients_BuildLogo* is the method being traced +* The debugger window appeared because it detected a call to the `C_PICTURE` command and this command was one of the commands to be caught + + +Displaying a new debugger window uses the same configuration as the last window displayed in the same session. If you run several user processes, you can trace them independently and have one debugger window open for each process. + +The Debugger window is usually displayed on the machine where the code is executed. With a single-user application, it is always displayed on the machine running the application. With a client/server application, it is displayed: + +- on the remote 4D for code running locally +- on the server machine for code running on the server (for example, a method with the **execute on server** option). + +> If the server is running headless, no debugger window can be displayed on the server, you need to use the remote debugger. See [Debugging from remote machines](./debugging-remote.md). + +## Tool bar Buttons + +The debugger's tool bar includes several buttons, associated with default shortcuts: + +![execution-control-toolbar-buttons](assets/en/Debugging/executionToolbarButtons.png) + +> Default shortcuts can be customized in the Shortcuts Page of the Preferences dialog box. + +#### No Trace + +Tracing stops and normal method execution resumes. + +> **Shift** + **F5** or **Shift** + clicking the **No Trace** button resumes execution. It also disables all the subsequent TRACE calls for the current process. + +#### Step Over + +Executes the current method line, indicated by the program counter (the yellow arrow). The Debugger steps to the next line. + +The Step Over button does not step into subroutines and functions, it stays at the level of the method you're currently tracing. If you want to also trace subroutines and functions calls, use the **Step Into** button. + +In remote debugging, if the method executes on the server, the parent method is called after the last line of the child method executes. If the parent method is executed on the remote side, the **Step Over** button has the same effect as the **No Trace** button. + +#### Step Into + +When a line that calls another method (subroutine or function) is executed, click this button to display the the other method and step through it. + +The new method becomes the current (top) method in the [Call Chain Pane](#call-chain-pane) of the Debugger window. + +When executing a line that does not call another method, this button has the same effect as the **Step Over** button. + +#### Abort + +Stops method execution, and returns to the state before the method started executing: +* When tracing a form or object method executing in response to an event: Stops and returns to the form. +* When tracing a method executing from within the Application environment: Stops and returns to the environment. + +#### Abort and Edit + + +Pauses method execution. The method that is executing when you click the **Abort and Edit** button opens in the Method Editor. +> **Tip**: Use this button when you know which changes are required in your code, and when these changes are required to pursue the testing of your methods. After you're finished with the changes, rerun the method. + +#### Modifier + +Pauses method execution. The method that is executing at the time you click the Edit button opens in the Method Editor. + +If you use this button to modify a method, the modifications are only effective the next time it executes. + +> **Tip:** Use this button when you know which changes are required in your code and when they don't interfere with the rest of the code to be executed or traced. + +#### Save Settings + +Saves the current configuration of the debugger window and makes it the default configuration. This includes: +* the size and position of the window +* the position of the division lines and the contents of the area that evaluates the expressions + +These parameters are stored in the project. + +This action is not available in remote debugging mode (see [Debugging from Remote Machines]()). + +## Watch Pane + +The **Watch pane** is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. Voici un exemple : + +![watch-pane](assets/en/Debugging/watchPane.png) + +> This pane is not available in remote debugging mode. + +The **Watch Pane** displays useful general information about the system, the 4D environment, and the execution environment. + +The **Expression** column displays the names of the objects and expressions. The **Value** column displays their current corresponding values. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. + +At any point, you can drag and drop themes, theme sublists (if any), and theme items to the [Custom Watch Pane](#custom-watch-pane). + +### Expression list + +#### Line Objects + +This theme lets you keep track of the values of the objects or expressions: + +* used in the line of code to be executed (the one marked with the program counter—the yellow arrow in the [Source Code Pane](#source-code-pane)), +* used in the previous line of code + +Since the previous line of code is the one that was just executed before, this theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: + +```4d +TRACE +$a:=1 +$b:=a+1 +$c:=a+b +``` + +1. A Debugger window opens with the program counter set to the line with `a:=1`. At this point the **Line Objects** theme displays: + + | $a | Indéfini | + | -- | -------- | + | | | + + The `$a` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +2. You click the **Step Over** button. The program counter is now set to the line `b:=a+1`. At this point, the theme displays: + + | $a | 1 | + | -- | -------- | + | $b | Indéfini | + + The value of the `$a` variable is now 1. The `$b` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +3. You click the **Step Over** button again. The program counter is now set on the line with c:=a+b. At this point the Line Objects theme displays: + + | $c | Indéfini | + | -- | -------- | + | $a | 1 | + | $b | 2 | + + The value of the `$b` variable is now 2. The `$c` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +#### Variables + +This theme is composed of the following subthemes: + +| Subtheme | Description | Can the values be modified? | +| ------------ | ------------------------------------------------------------ | --------------------------- | +| Interprocess | List of interprocess variables being used at this point | Oui | +| Process | List of process variables used by the current process | Oui | +| Local | List of local variables used by the method being traced | Oui | +| Paramètres | List of parameters received by the method | Oui | +| Self | Pointer to the current object, when tracing an Object Method | Non | + +Arrays, like other variables, appear in the Interprocess, Process, and Local subthemes, depending on their scope. The debugger displays the first 100 elements. Inside the **Value** column, you can modify the values of array elements, but not the size of the arrays. + +To display the variable types and their internal names, right click and check the **Show Types** option in the context menu: + +![show-types-menu-item](assets/en/Debugging/showTypes.png) + +Here's the result: + +![dynamic-variable-names](assets/en/Debugging/dynamicVariableNames.png) + +#### Current Form Values + +This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: + +![current-form-value](assets/en/Debugging/current-form-values.png) + +Some objects, such as list box arrays, can be presented as two distinct objects, the variable of the object itself and its data source. + +#### Constantes + +Like the Constants page of the Explorer window, this theme displays predefined constants provided by 4D. The expressions from this theme cannot be modified. + +#### Semaphores + +This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. The expressions from this theme cannot be modified. Global semaphores are not displayed. + +#### Process + +This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. + +#### Tables et champs + +This theme lists the tables and fields in the 4D database. For each Table item, the Value column displays the size of the current selection for the current process as well as the number of **locked records**. + +For each Field item, the Value column displays the value of the field for the current record (except picture and BLOB). You can modify the field values but not the the tables' information. + +#### Ensembles + +This theme lists the sets defined in the current process (the one you're currently tracing) and the interprocess sets. For each set, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Sélections temporaires + +This theme lists the named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Information + +This theme contains general information regarding database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. + +#### Web + +This theme displays information regarding the main Web server of the application (only available if the Web server is active): + +* Web File To Send: name of Web file waiting to be sent (if any) +* Web Cache Usage: number of pages present in Web cache as well as its use percentage +* Web Server Elapsed Time: duration of Web server use in hours:minutes:seconds format +* Web Hits Count: total number of HTTP requests received since Web server launch, as well as the instantaneous number of requests per second +* Number of active Web processes: number of active Web processes, all Web processes together + +The expressions contained within this theme cannot be modified. + +### Contextual Menu + +Additional options are available from the contextual menu of the Watch pane. + +![context-menu](assets/en/Debugging/contextual-menu.png) + +* **Collapse All**: Collapses all levels of the hierarchical list. +* **Expand All**: Expand all levels of the hierarchical list. +* **Show Types**: Displays the type of each item (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field. Useful if you work with table or field numbers, or with pointers using commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the object type for each object. You can turn this option off in order to speed up the display, or just because you prefer to use only the **Show Types** option. +* **Sorted Tables and Fields**: Sorts the tables and fields in alphabetical order within their respective lists. +* **Show Integers in Hexadecimal**: Numbers are usually displayed in decimal notation. This option displays them in hexadecimal notation. Note: To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. +* **Enable activity monitoring**: Activates the monitoring of activity (advanced checking of internal activity of the application) and displays the information retrieved in the additional themes: **Scheduler**, **Web** and **Network**. + +## Call Chain Pane + +A method may call other methods or class functions, which may call other methods or functions. The Call Chain pane lets you keep track of that hierarchy. + +![call-chain-pane](assets/en/Debugging/call-chain-example.png) + +Each main level item is the name of a method or class function. The top item is the one you are currently tracing, the next main level item is the name of the caller (the method or function that called the one you are currently tracing), the next one is the caller's caller, and so on. + +In the image above: + +* `thirdMethod` has not received any parameter +* `$0` is currently undefined, as the method did not assign any value to `$0` (because it has not executed this assignment yet or because the method is a subroutine and not a function) +* `secondMethod` has received three parameters from `firstMethod`: + * $1 is a pointer to the `[Employee]` table + * $2 is a pointer to the `ID` field in the `[Employee]` table + * $3 is an alphanumeric parameter whose value is "Z" + +You can double-click the name of any method to display its contents in the [Source Code Pane](#source-code-pane). + +Clicking the icon next to a method or function name expands or collapses the parameters and the result (if any). Values appear on the right side of the pane. Clicking on any value on the right side allows you to change the value of any parameter or function result. + +To display the parameter type, check the **Show types** option in the contextual menu: + +![call-chain-show-types](assets/en/Debugging/callChainShowTypes.png) + +After you deploy the list of parameters, you can drag and drop parameters and function results to the [Custom Watch Pane](#custom-watch-pane). + +You can also use the [Get call chain](https://doc.4d.com/4dv19/help/command/en/page1662.html) command to retrieve the call chain programmatically. + +## Custom Watch Pane + +The Custom Watch Pane is useful for evaluating expressions. It is similar to the [Watch Pane](#watch-pane), except here you decide which expressions are displayed. Any type of expression can be evaluated: + +* field +* variable +* pointer +* calculation +* 4D command +* method +* and anything else that returns a value + +![custom-Watch-pane](assets/en/Debugging/custom-watch-pane.png) + +You can evaluate any expression that can be shown in text form. This does not cover picture and BLOB fields or variables. To display BLOB contents, you can use BLOB commands, such as [BLOB to text](https://doc.4d.com/4dv19/help/command/en/page555.html). + +### Handling expressions + +There are several ways to add expressions to the list: + +* Drag and drop an object or expression from the Watch Pane or the Call Chain Pane +* Select an expression in the [Source Code pane](#source-code-pane) and press **ctrl+D** (Windows) or **cmd+D** (macOS) +* Double-click somewhere in the empty space of the Custom Watch Pane (adds an expression with a placeholder name that you can edit) + +You can enter any formula that returns a result. + +To edit an expression, click on it to select it, then click again or press **Enter** on your keyboard. + +To delete an expression, click on it to select it, then press **Backspace** or **Delete** on your keyboard. +> **Warning:** Be careful when you evaluate a 4D expression modifying the value of one of the System Variables (for instance, the OK variable) because the execution of the rest of the method may be altered. + +### Contextual Menu + +The Custom Watch Pane’s context menu gives you access the 4D formula editor and other options: + +![custom-watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-context-menu.png) + +**New Expression**: This inserts a new expression and displays the 4D Formula Editor. + +![custom-Watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-formula-editor.png) + +For more information on the Formula Editor, see the 4D Design Reference manual. + +* **Insert Command**: Shortcut for inserting a 4D command as a new expression. +* **Delete All**: Removes all expressions from the Custom Watch Pane. +* **Standard Expressions**: Copies the Watch Pane's list of expressions. +> This option is not available in remote debugging mode (see [Debugging from Remote Machines](https://doc.4d.com/4Dv19/4D/19/Debugging-from-Remote-Machines.300-5422483.en.html)). +* **Collapse All/Expand All**: Collapses or Expands all the hierarchical lists. +* **Show Types**: Displays the type of each item in the list (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field of the **Fields**. Useful if you work with tables, field numbers or pointers using the commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the type of each item. +* **Sorted Tables and Fields**: Displays the table and fields in alphabetical order. +* **Show Integers in Hexadecimal**: Displays numbers using hexadecimal notation. To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. + +## Source Code Pane + +The Source Code Pane shows the source code of the method or function currently being traced. + +This area also allows you to add or remove [**break points**](breakpoints.md). + +### Tool tip + +Hover your pointer over any expression to display a tool tip that indicates: + +* the declared type of the expression +* the current value of the expression + +![source-code-pane](assets/en/Debugging/sourceCodePane.png) + +This also works with selections: + +![source-code-pane-tip](assets/en/Debugging/sourcePaneTip.png) + +### Adding expressions to the Custom Watch Pane + +You can copy any selected expression from the Source Code Pane to the [Custom Watch Pane](#custom-watch-pane). + +1. In the Source code pane, select the expression to evaluate +2. Do one of the following: + * Drag and drop the selected text to the Expression area of the Custom Watch Pane + * Press **Ctrl+D** (Windows) or **Cmd+D** (macOS) + * Right-click the selected text **>** **Copy to Expression Pane** + +### Program Counter + +The yellow arrow in the left margin of the Source Code pane is called the program counter. It marks the next line to be executed. + +By default, the program counter line (also called the running line) is highlighted in the debugger. You can customize the highlight color in the [Methods page of the Preferences](Preferences/methods.md). + +#### Moving the program counter + +For debugging purposes, you can move the program counter for the method at the top of the call chain (the method currently executing). To do so, click and drag the yellow arrow to another line. + +This only tells the debugger to pursue tracing or executing from a different point. It does not execute lines or cancel their execution. All current settings, fields, variables, etc. are not impacted. + +Par exemple : + +```4d + // ... + If(This condition) + DO_SOMETHING + Else + DO_SOMETHING_ELSE + End if + // ... +``` + +Say the program counter is set to the line `If (This condition)`. When you click the **Step over** button, the program counter moves directly to the `DO_SOMETHING_ELSE` line. To examine the results of the `DO_SOMETHING` line, you can move the program counter to that line and execute it. + +### Contextual menu + +The contextual menu of the Source Code Pane provides access to several functions that are useful when executing methods in Trace mode: + +![source-code-pane-context-window](assets/en/Debugging/sourceCodePaneContext.png) + +* **Goto Definition**: Goes to where the selected object is defined. This command is available for: + * *Project methods:* displays method contents in a new window of the Method editor + * *Fields:* Displays field properties in the inspector of the Structure window + * *Tables:* Displays table properties in the inspector of the Structure window + * *Forms:* Displays form in the Form editor + * *Variables* (local, process, interprocess or $n parameter): displays the line in the current method or among the compiler methods where the variable is declared +* **Search References** (also available in Method editor): Searches all project objects (methods and forms) in which the current element of the method is referenced. The current element is the one selected or the one where the cursor is located. This can be the name of a field, variable, command, string, and so on. Search results are displayed in a new standard results window. +* **Copy**: Standard copy of the selected expression to the pasteboard. +* **Copy to Expression Pane**: Copy the selected expression to the Custom Watch Pane. +* **Run to Cursor**:Executes statements found between the program counter and the selected line of the method (where the cursor is found). +* **Set Next Statement**:Moves program counter to the selected line without executing this line or any intermediate ones. The designated line is only run if the user clicks on one of the execution buttons. +* **Toggle Breakpoint** (also available in Method editor): Alternately inserts or removes the breakpoint corresponding to the selected line. This modifies the breakpoint permanently: for instance, if you remove a breakpoint in the debugger, it no longer appears in the original method. +* **Edit Breakpoint** (also available in Method editor): Displays the Breakpoint Properties dialog box. Any changes made modify the breakpoint permanently. + +### Find Next/Previous + +Specific shortcuts allow you to find strings identical to the one selected: + +* To search for the next identical strings, press **Ctrl+E** (Windows) or **Cmd+E** (macOS) +* To search for the previous identical strings, press **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) + +The search is carried out only if you select at least one character in the Source code pane. + +## Shortcuts + +This section lists all the shortcuts available in the debugger window. + +> The tool bar also has [shortcuts](#tool-bar-buttons). + +#### Watch Pane & Custom Watch Pane + +* **Double-click** an item in the Watch Pane to copy it to the Custom Watch Pane +* **Double-Click** in the Custom Watch Pane to create a new expression + +#### Source Code Pane + +* Click in the left margin to set or remove break points. +* **Alt+Shift+Click** (Windows) or **Option+Shift+Click** (macOS) sets a temporary break point. +* **Alt-Click** (Windows) or **Option-Click** displays the Edit Break window for a new or existing break point. +* A selected expression or object can be copied to the Custom Watch Pane by simple drag and drop. +* **Ctrl+D** (Windows) or **Cmd+D** (macOS) key combinations copy the selected text to the Custom Watch Pane. +* **Ctrl+E** (Windows) or **Cmd+E** (macOS) key combinations find the next strings identical to the one selected. +* **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) key combinations find the previous strings identical to the one selected. + +#### All Panes + +- **Ctrl** + **+/-** (Windows) or **Command** + **+/-** (macOS) increases or decreases the font size for a better readability. The modified font size is also applied to the Method editor and is stored in the Preferences. +- **Ctrl + \*** (Windows) or **Command + \*** (macOS) forces the updating of the Watch Pane. +- When no item is selected in any pane, press **Enter** to step over. +- When an item value is selected, use the arrows keys to navigate through the list. +- When editing an item, use the arrow keys to move the cursor. Use Ctrl-A/X/C/V (Windows) or Command-A/X/C/V (macOS) as shortcuts to the Select All/Cut/Copy/Paste menu commands of the Edit menu. \ No newline at end of file diff --git a/website/translated_docs/fr/Debugging/debugging-remote.md b/website/translated_docs/fr/Debugging/debugging-remote.md new file mode 100644 index 00000000000000..5a7788a4ceea2c --- /dev/null +++ b/website/translated_docs/fr/Debugging/debugging-remote.md @@ -0,0 +1,84 @@ +--- +id: debugging-remote +title: Debugging from remote machines +--- + +## Aperçu + +When a 4D database is running on 4D Server, you can debug the 4D code running on the server from a remote 4D client logged to the project. You just need to attach the debugger to a specific remote machine, and the code execution can be monitored in the debugger directly on the remote machine. + +On a remote machine, the [debugger window](debugger.md) displays a specific server icon and a blue background color to indicate that you are debugging server code: + +![debugger-window-remote](assets/en/Debugging/debuggerWindowRemote.png) + +This feature is particularly useful when 4D Server runs in headless mode (see [Command Line Interface](../Admin/cli.md)), or when access to the server machine is not easy. + + +## Attached debugger + +Only one debugger can debug a 4D Server application at a given time. It is called the **attached debugger**. The attached debugger can be: + +* the local 4D Server debugger (default) - if the server is not running headless. +* the debugger of a remote 4D client - if the remote session has access to Design mode. + +The attached debugger is called whenever a 4D Server encounters: +* a break point +* a `TRACE` command +* a caught command +* an error + +Keep in mind that error messages are sent to the attached debugger machine. This means that in the case of a remote debugger, server error messages are displayed on the remote 4D client. + +Note that: +* The code executed in the `On Server Startup Database` Method cannot be debugged remotely. It can only be debugged on the server side +* If no debugger is attached, the running code is not stopped by debugging commands + +## Attaching the debugger to a remote 4D client + +By default, the debugger is not attached to a remote 4D client: +* If 4D Server is not running headless, the debugger is attached to the server +* If 4D Server is running headless, no debugger is attached + +You can attach the debugger to any remote 4D client allowed to connect to the 4D Server application. + +> The remote 4D client's user session must have access to the Design environment of the database. + +To attach the debugger to a remote 4D client: + +* In the 4D Server menu bar, select **Edit** > **Detach Debugger** so that the debugger becomes available to remote machines. + - This step is useless if the 4D Server is running headless. + - You can attach the debugger back to the server by selecting **Edit** > **Attach debugger** (if not attached to a remote 4D client, see [Rejected attachment requests](#rejected-attachment-requests)). +* In a remote 4D client connected to the server, select **Run** > **Attach Remote Debugger** + +If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the menu command becomes **Detach Remote Debugger**. + +The debugger is then attached to the remote 4D client: +* until the end of the user session +* until you select `Detach Remote Debugger` + +## Attach Debugger or Remote Debugger at Startup + +4D allows you to automatically attach the debugger to a remote 4D client or the server at startup: + +* On the server (if not headless), this option is named **Attach Debugger At Startup**. When the server is started, it automatically attaches the debugger (default). + +> **Warning**: If this option is selected for a server which is subsequently launched in headless mode, the debugger won't be available for this server. + +* On a remote 4D client, this option is named **Attach Remote Debugger At Startup**. When selected, the remote 4D client will automatically try to attach the remote debugger at each subsequent connection to the same 4D Server database. If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the remote debugger is automatically attached to the remote 4D client and the **Detach Remote Debugger option is displayed**. + +> This setting is applied per project and is stored locally in the [`.4DPreferences`](Project/architecture.md#userpreferencesusername) file. + +## Rejected attachment requests + +While the debugger is already attached to a remote 4D client, or to 4D Server (default), no other machine can attach the debugger. + +If a machine tries to attach the debugger while it is already attached, the attachment is rejected and a dialog box appears: + +![attach-debugger-dialog](assets/en/Debugging/attach-debugger-dialog.png) + +![attach-debugger-dialog-2](assets/en/Debugging/attach-debugger-dialog-2.png) + +Attaching the debugger in this case requires that: + +* the attached debugger is detached from the remote 4D client using the **Detach remote debugger** menu command or from the server using the **Detach debugger** command +* the attached remote 4D client session is closed diff --git a/website/translated_docs/fr/Desktop/building.md b/website/translated_docs/fr/Desktop/building.md new file mode 100644 index 00000000000000..7864a7dd383f38 --- /dev/null +++ b/website/translated_docs/fr/Desktop/building.md @@ -0,0 +1,846 @@ +--- +id: building +title: Générateur d'application +--- + +4D inclut un générateur d’application pour créer un package de projet (version finale). Ce générateur simplifie le processus de finalisation et de déploiement des applications compilées 4D. Il gère automatiquement les fonctionnalités spécifiques de différents systèmes d'exploitation et facilite le déploiement d'applications client-serveur. + +Le générateur d'applications vous permet de : + +* Générer une structure compilée, sans code interprété, +* Générer une application autonome exécutable, c'est-à-dire fusionnée avec 4D Volume Desktop, le moteur de base de données 4D, +* Générer différentes applications à partir de la même structure compilée via un projet XML, +* Générer des applications client-serveur homogènes, +* Générer des applications client-serveur avec mise à jour automatique des composants client et serveur. +* Enregistrer vos paramètres de génération pour une utilisation ultérieure (bouton *Enregistrer les paramètres*). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible by default in compiled applications. Vous pouvez néanmoins créer des applications spécifiques qui prennent en charge les modifications locales en utilisant la clé XML du `PackProject` (voir [doc.4d.com](https://doc.4d.com)). + + +## Aperçu + +Générer un package de projet peut être réalisée à l'aide de : + +- soit la commande +`BUILD APPLICATION,

    • +
    • or the Build Application dialog.
    • + + +

      Build application dialog

      + +

      To display the Build application dialog, select Design > Build Application... from the menu bar.

      + +

      + +

      La boîte de dialogue du générateur d'application comprend plusieurs pages accessibles via des onglets :

      + +

      + +

      La génération ne peut s'effectuer qu'une fois le projet compilé. Si vous sélectionnez cette commande sans avoir préalablement compilé le projet ou si le code compilé ne correspond pas au code interprété, une boîte de dialogue d'avertissement apparaît indiquant que le projet doit être (re)compilé.

      + +

      Paramètres du générateur d'application

      + +

      Chaque paramètre de générateur d'application est stocké en tant que clé XML dans le fichier de l'application nommé buildApp.4DSettings`, situé dans le dossier `Settings` du projet.

      + + Les paramètres par défaut sont utilisés lors de la première utilisation de la boîte de dialogue du Générateur d'application. Le contenu du fichier est mis à jour, si nécessaire, lorsque vous cliquez sur **Construire** ou **Enregistrer les paramètres**. Vous pouvez définir plusieurs autres fichiers de paramètres XML pour le même projet et les utiliser à l'aide de la commande [BUILD APPLICATION](https://doc.4d.com/4dv19/help/command/en/page871.html). + + Les clés XML fournissent des options supplémentaires à celles affichées dans la boîte de dialogue du Générateur d'application. La description de ces clés est détaillée dans le manuel [4D Clés XML BuildApplication](https://doc.4d.com/4Dv19/4D/19/4D-XML-Keys-BuildApplication.100-5447429.en.html). + + + +### Fichier d'historique + +Lorsqu'une application est créée, 4D génère un fichier journal nommé *BuildApp.log.xml* dans le dossier **Logs** du projet. Le fichier d'historique stocke les informations suivantes pour chaque génération : + +- Le début et la fin de la génération des cibles, +- Le nom et le chemin d'accès complet des fichiers générés, +- La date et l'heure de la génération, +- Toutes les erreurs qui se sont produites, +- Tout problème de signature (par exemple, un plug-in non signé). + +La vérification de ce fichier peut vous aider à gagner du temps lors des prochaines étapes de déploiement, si vous avez l'intention, par exemple, de notariser votre application. + + + +> Utilisez la commande `Get 4D file (Build application log file)` pour obtenir l'emplacement du fichier journal. + + + + +## Nom de l'application et dossier de destination + +![](assets/en/Project/buidappstructureProj.png) + +Entrez le nom de l'application dans **Nom de l'application**. + +Spécifiez le dossier de l'application générée dans le**Dossier de destination**. Si le dossier spécifié n'existe pas déjà, 4D vous créera un dossier *Build*. + + + + + +## Page de structure compilée + +Cet onglet vous permet de générer un fichier de structure compilé standard et/ou un composant compilé : + +![](assets/en/Project/appbuilderProj.png) + + + + +### Générer une structure compilée + +Génère une application contenant uniquement du code compilé. + +Cette fonctionnalité crée un fichier *.4dz* dans un dossier *Compiled Database/\*. Par exemple, si vous avez nommé votre application «MyProject», 4D créera : + +*\/Compiled Database/MyProject/MyProject.4dz* + +Un fichier .4dz est essentiellement une version compressée du dossier du projet. .4dz files can be used by 4D Server, 4D Volume license (merged applications), and 4D. La taille compacte et optimisée des fichiers .4dz facilite le déploiement des packages de projet. + + + +> When generating .4dz files, 4D uses a **standard** zip format by default. The advantage of this format is that it is easily readable by any unzip tool. If you do not want to use this standard format, add the `UseStandardZipFormat` XML key with value `False` in your [`buildApp.4DSettings`](#build-application-settings) file (for more information, see the *4D XML Keys Backup* manual on [doc.4d.com](https://doc.4d.com)). + + + + + + +#### Inclure les dossiers associés + +Lorsque vous cochez cette option, tous les dossiers liés au projet sont recopiés dans le dossier Build en tant que dossiers *Components* et *Resources*. Pour plus d'informations sur ces dossiers, veuillez vous reporter à la [description de l'architecture du projet](Project/architecture.md). + + + + +### Générer un composant + +Génère un composant compilé à partir de la structure. + +Un composant est un fichier de structure 4D standard dans lequel des fonctionnalités spécifiques ont été développées. Une fois le composant configuré et installé dans un autre projet 4D (le projet d'application hôte), ses fonctionnalités sont accessibles depuis le projet hôte. + +Si vous avez nommé votre application *Moncomposant*, 4D créera un dossier *Component* contenant le dossier *MyComponent.4dbase* : + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +Le dossier *MyComponent.4dbase* contient : + +- fichier *MyComponent.4DZ* +- Un dossier *Resources* - toutes les ressources associées sont automatiquement copiées dans ce dossier. Les autres composants et/ou dossiers de plugins ne sont pas copiés (un composant ne peut pas utiliser de plug-ins ou d'autres composants). + + + + +## Page Application + +Cet onglet vous permet de créer une version autonome et monoposte de votre application : + +![](assets/en/Project/standaloneProj.png) + + + +### Créer une application autonome + +Cochez l'option **Créer une application autonome** et cliquez sur **Générer** pour créer une application autonome (double-cliquable) directement à partir de votre projet d'application. + +Les éléments suivants sont requis pour la création : + +- 4D Volume Desktop (le moteur de base de données 4D), +- une [licence appropriée](#licenses) + +Sous Windows, cette fonctionnalité crée un fichier exécutable (.exe). Sous macOS, il gère la création de progiciels. + +Le principe consiste à fusionner le fichier 4D Volume Desktop avec votre fichier de structure compilé. Les fonctionnalités offertes par le fichier 4D Volume Desktop sont liées à l’offre commerciale à laquelle vous avez souscrite. Pour plus d’informations sur ce point, reportez-vous à la documentation commerciale et au site Internet de [4D Sas (http://www.4d.com/)](http://www.4d.com/). + +Vous pouvez définir un fichier de données par défaut ou permettre à l'utilisateur de créer et d'utiliser son propre fichier de données (cf. section [Gestion du fichier de données dans les applications finales](https://doc.4d.com/4Dv17R6/4D/17-R6/Data-file-management-in-final-applications.300-4354729.en.html)). + +Il est possible d'automatiser la mise à jour des applications monopostes fusionnées moyennant l'utilisation d'une séquence de commandes du langage (cf. section [Mise à jour auto des applications serveur ou monopostes](https://doc.4d.com/4Dv17R6/4D/17-R6/Automatic-updating-of-server-or-single-user-applications.300-4354721.en.html)). + + + +#### Emplacement du 4D Volume Desktop + +Afin de créer une application autonome, il convient d'abord de désigner le dossier contenant le fichier 4D Volume Desktop : + +* *sous Windows*, le dossier contient notamment les fichiers 4D Volume Desktop.4DE, 4D Volume Desktop.RSR ainsi que différents fichiers et dossiers nécessaires à son fonctionnement. Ces éléments doivent être placés au premier niveau du dossier sélectionné. +* *sous macOS*, 4D Volume Desktop est fourni sous la forme d’un progiciel structuré contenant divers fichiers et dossiers génériques. + +Pour sélectionner le dossier de 4D Volume Desktop, cliquez sur le bouton **[...]**. Une boîte de dialogue vous permettant de désigner le dossier (Windows) ou le progiciel (macOS) de 4D Volume Desktop apparaît. + +Une fois le dossier sélectionné, son chemin d’accès complet est affiché et, s’il contient effectivement 4D Volume Desktop, l’option de génération d’application exécutable est activée. + + + +> Le numéro de version de 4D Volume Desktop doit correspondre à celui du 4D Developer Edition. Par exemple, si vous utilisez 4D Developer v18, vous devez sélectionner un 4D Volume Desktop v18. + + + +#### Mode de liaison des données + +Cette option vous permet de sélectionner le mode de liaison entre l'application fusionnée et le fichier de données local. Deux modes de liaison sont disponibles : + +* **Nom de l'application** (défaut) - Dans ce mode, l'application 4D ouvre automatiquement le dernier fichier de données ouvert correspondant à la structure. Cela vous permet de déplacer librement le dossier de l'application sur le disque. Il est conseillé en général pour les applications fusionnées, à moins que vous n'ayez spécifiquement besoin de dupliquer l'application. + +* **Chemin de l'application** - Dans ce mode, l'application 4D fusionnée va lire le contenu du fichier *lastDataPath.xml* et tenter d'ouvrir le fichier de données dont l'attribut "executablePath" correspond au chemin d'accès de l'application. Si cette clé est trouvée, son fichier de données correspondant (défini via son attribut "dataFilePath") est ouvert. Sinon, le dernier fichier de données utilisé est ouvert (mode par défaut). + +Pour plus d'informations sur le mode de liaison des données, reportez-vous au paragraphe [Dernier fichier de données ouvert](#last-data-file-opened). + + + + +#### Fichiers générés + +Lorsque vous cliquez sur le bouton **Générer**, 4D crée automatiquement un dossier **Final Application** dans le **Dossier de destination** défini. Dans le dossier Final Application, se trouve un sous-dossier contenant le nom de l'application spécifiée. + +Si vous avez nommé votre application "MyProject", vous trouverez les fichiers suivants dans ce sous-dossier (MyProject): + +* *Sous Windows* + + * MonAppli.exe qui est votre exécutable et MonAppli.Rsr qui contient les ressources de l’application + * Les dossiers 4D Extensions et Resources ainsi que les diverses librairies (DLL), le dossier Native Components et SAS Plugins -fichiers nécessaires au fonctionnement de l’application + * Un dossier Database contenant notamment un dossier Resources et un fichier MyProject.4DZ. Ils constituent la structure compilée du projet et son dossier Resources. **Note** : Ce dossier contient également le dossier *Default Data*, s'il a été défini (cf. [Gestion du fichier de données dans les applications finales](#data-file-management-in-final-applicatons)). + + * (Facultatif) Un dossier Components et/ou un dossier Plugins contenant les fichiers des composants et/ou des plug-ins éventuellement inclus dans le projet. Pour plus d’informations sur ce point, reportez-vous à la section [Plugins et composants](#plugins-and-components). + + * Un dossier Licences contenant, sous forme de fichier XML, la liste des numéros de licence ayant été intégrés dans l’application. Pour plus d’informations sur ce point, reportez-vous à la section [Licences & Certificat](#licenses-and-certificate). + * Les éléments supplémentaires éventuellement ajoutés dans le dossier 4D Volume Desktop (cf. paragraphe [Personnaliser le dossier 4D Volume Desktop](#customizing-4d-volume-desktop-folder)). + + Tous ces éléments doivent être conservés dans le même dossier afin que l’exécutable fonctionne. + +* *macOS* + + - Un progiciel (package) nommé MyProject.app contenant votre application et tous les éléments nécessaires à son fonctionnement, y compris les plug-ins, composants et licences. Pour plus d’informations sur l’intégration des composants et des plug-ins, reportez-vous à la section [Page Plugins et composants](#plugins-and-components). Pour plus d’informations sur l’intégration des licences, reportez-vous à la [Page Licences & Certificat](#licenses-and-certificate). **Note **: Sous Mac Os, la commande [Fichier application](https://doc.4d.com/4Dv18R4/4D/18-R4/Application-file.301-4982855.en.html) du langage 4D retourne le chemin d’accès du fichier NomApplication (situé dans le dossier Contents:macOS du progiciel) et non celui du fichier .comp (dossier Contents:Resources du progiciel). + + + + +#### Personnaliser le dossier 4D Volume Desktop + +Lors de la construction de l’application exécutable, 4D duplique le contenu du dossier 4D Volume Desktop dans le dossier *Final Application*. Vous pouvez donc parfaitement personnaliser le contenu du dossier 4D Volume Desktop d’origine en fonction de vos besoins. Vous pouvez, par exemple : + +* Installer une version de 4D Volume Desktop correspondant à une langue spécifique ; +* Ajouter un dossier *PlugIns* personnalisé ; +* Personnaliser le contenu du dossier *Resources*. + + +> Sous Mac Os, 4D Volume Desktop est fourni sous forme de progiciel. Vous devrez tout d’abord afficher son contenu (effectuez **Control+clic** sur son icône) afin de pouvoir le modifier. + + + + +#### Emplacements des fichiers Web + +Si votre application exécutable est utilisée en tant que serveur Web, les fichiers et dossiers requis par le serveur doivent être installés à des emplacements spécifiques. Ces éléments sont les suivants : + +* fichiers *cert.pem* et *key.pem* (facultatifs) : ces fichiers sont utilisés pour les connexions TLS ainsi que par les commandes de cryptage des données, +* dossier racine Web par défaut. + +Des éléments doivent être installée : + +- **Sous Windows** : dans le sous-dossier *Final Application\MonAppli\Database*. +- **Sous macOS** : à côté du progiciel *MonProjet.app*. + + + + + + + +## Page Client/Serveur + +4D vous permet de générer des applications client/serveur personnalisées, homogènes, multi-plateformes et avec option de mise à jour automatique. + +![](assets/en/Project/buildappCSProj.png) + + + +### Qu'est-ce qu'une application Client/Serveur ? + +Une application client/serveur est issue de la combinaison de trois éléments : + +- Un projet 4D compilé, +- L’application 4D Server, +- L’application 4D Volume Desktop (macOS et/ou Windows). + +Une fois générée, une application client/serveur se compose de deux parties homogènes : la partie Serveur (unique), et la partie Cliente (à installer sur chaque poste client). + + + +> If you want to deploy a client/server application in an heterogeneous environment (client applications running on Intel/AMD and Apple Silicon machines), it is recommended to [compile the project for all processors](Project/compiler.md#compilation-target) on a macOS machine, so that all client applications will run natively. + +En outre, l’application client/serveur est personnalisée et son maniement est simplifié : + +- Pour lancer la partie serveur, l’utilisateur double-clique simplement sur l’application serveur : il n’est pas nécessaire de sélectionner le fichier projet. +- Pour lancer la partie cliente, l’utilisateur double-clique simplement sur l’application cliente, qui se connecte directement à l’application serveur : il n’est pas nécessaire de choisir un serveur dans une boîte de dialogue de connexion. Le client cible le serveur soit via son nom, lorsque client et serveur sont sur le même sous-réseau, soit via son adresse IP, à définir via la clé XML `IPAddress` dans le fichier buildapp.4DSettings. Si la connexion échoue, [des mécanismes alternatifs spécifiques peuvent être mis en place](#management-of-client-connections). Il est également possible de “forcer†l’affichage de la boîte de dialogue de connexion standard en maintenant la touche **Option** (macOS) ou **Alt** (Windows) enfoncée lors du lancement de l’application cliente. Seule la partie cliente peut se connecter à la partie serveur correspondante. Si un utilisateur tente de se connecter à la partie serveur à l’aide d’une application 4D standard, un message d’erreur est retourné et la connexion est impossible. + +- Une application client/serveur peut être paramétrée de telle sorte que la partie cliente [puisse être mise à jour automatiquement via le réseau](#copy-of-client-applications-in-the-server-application). Il vous suffit de créer et de distribuer une version initiale de l'application cliente, les mises à jour ultérieures sont gérées à l'aide du mécanisme de mise à jour automatique. + +- Il est également possible d'automatiser la mise à jour de la partie serveur moyennant une séquence de commandes du langage ([SET UPDATE FOLDER](https://doc.4d.com/4dv19/help/command/en/page1291.html) et [RESTART 4D]((https://doc.4d.com/4dv19/help/command/en/page1292.html)). + + + + + +### Construire application serveur + +Cochez cette option pour générer la partie serveur de votre application pendant la phase de construction. Vous devez désigner sur votre disque l’emplacement de l’application 4D Server à utiliser. Ce 4D Server doit correspondre à la plate-forme courante (qui sera également la plate-forme de l’application du serveur). + + + +#### Emplacement de 4D Server + +Cliquez sur le bouton **[...]** et utilisez la boîte de dialogue *Rechercher un dossier* pour localiser l'application 4D Server. Sous macOS, vous devez sélectionner directement le package 4D Server. + + + +#### Version courante + +Utilisée pour indiquer le numéro de version courante de l'application générée. Vous pourrez par la suite accepter ou refuser les connexions des applications clientes en fonction de leur numéro de version. The interval of compatibility for client and server applications is set using specific [XML keys](#build-application-settings)). + + + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. + + + +#### Allow connection of Silicon Mac clients + +When building a server on Windows, check this option to allow Apple Silicon clients to connect to your server application. You can then specify a path to the structure compiled for Apple Silicon/Intel. + +To allow Apple Silicon clients to connect to a Server application built on Windows, you must first build a client application on macOS, with a project compiled for Apple Silicon and Intel. This automatically creates a compiled structure, identical to the one created with the **[Build compiled structure](#build-compiled-structure)** option (without the related folders). + +Then, you can copy that structure to your Windows machine, and use it to build the server application: + +![](assets/en/Desktop/allow-mac-clients.png) + + + +#### Compiled structure location + +Path to the compiled structure of the Apple Silicon/Intel client application. + + + +#### Mode de liaison des données + +Cette option vous permet de sélectionner le mode de liaison entre l'application fusionnée et le fichier de données local. Deux modes de liaison sont disponibles : + +* **Nom de l'application** (défaut) - Dans ce mode, l'application 4D ouvre automatiquement le dernier fichier de données ouvert correspondant à la structure. Cela vous permet de déplacer librement le dossier de l'application sur le disque. Il est conseillé en général pour les applications fusionnées, à moins que vous n'ayez spécifiquement besoin de dupliquer l'application. + +* **Chemin de l'application** - Dans ce mode, l'application 4D fusionnée va lire le contenu du fichier *lastDataPath.xml* et tenter d'ouvrir le fichier de données dont l'attribut "executablePath" correspond au chemin d'accès de l'application. Si cette clé est trouvée, son fichier de données correspondant (défini via son attribut "dataFilePath") est ouvert. Sinon, le dernier fichier de données utilisé est ouvert (mode par défaut). + +Pour plus d'informations sur le mode de liaison des données, reportez-vous au paragraphe [Dernier fichier de données ouvert](#last-data-file-opened). + + + + +### Construire application cliente + +Cochez cette option pour générer la partie cliente de votre application lors de la phase de construction. + +Vous pouvez cocher cette option : + +- avec l'option [**Build server application**](#build-server-application) pour créer des parties serveur et client correspondantes pour la plate-forme courante et (éventuellement) inclure les fichiers d'archive de mise à jour automatique, +- sans sélectionner l'option [**Build server application**](#build-server-application), généralement pour créer le fichier d'archive de mise à jour à sélectionner à partir de la plate-forme "concurrente" lors de la génération de la partie serveur. + + + +#### Emplacement du 4D Volume Desktop + +Designates the location on your disk of the 4D Volume Desktop application to be used to build the client part of your application. + + + +> Le numéro de version de 4D Volume Desktop doit correspondre à celui du 4D Developer Edition. Le numéro de version de 4D Volume Desktop doit correspondre à celui du 4D Developer Edition. + +Ce 4D Volume Desktop doit correspondre à la plate-forme courante (qui sera également la plate-forme de l’application cliente). Si vous souhaitez générer une version de l’application cliente pour la plate-forme “concurrenteâ€, vous devez répéter l'opération en utilisant une application 4D tournant sur cette plate-forme. + +Si vous souhaitez que l'application cliente se connecte au serveur via une adresse spécifique (autre que le nom du serveur publié sur le sous-réseau), vous devez utiliser la clé XML `IPAddress` dans le fichier buildapp.4DSettings. Si vous souhaitez que l'application cliente se connecte au serveur via une adresse spécifique (autre que le nom du serveur publié sur le sous-réseau), vous devez utiliser la clé XML `IPAddress` dans le fichier buildapp.4DSettings. Vous pouvez également mettre en place des mécanismes spécifiques en cas d'échec de la connexion. Les différents scénarios proposés sont décrits dans la section [Gestion de la connexion des applications clientes](#management-of-client-connections). + + + +#### Copie des applications clientes dans l'application serveur + +Les options de cette zone permettent de mettre en place le mécanisme de mise à jour des parties clientes de vos applications client/serveur via le réseau à chaque nouvelle version de l’application générée. These options are only enabled when the **Build client application** option is checked. + +- **Allow automatic update of Windows client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Windows platform in case of update. +- **Allow automatic update of Macintosh client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Macintosh platform in case of update. + +The `.4darchive` is copied at the following location: + + + +``` +_Build/Client Server executable/Upgrade4DClient/ +``` + + + + +#### Selecting client archive for the concurrent platform + +You can check the **Allow automatic update...** option for client applications running on the concurrent platform. This option is only enabled if: + +- the **Build server application** option is checked, +- the **Allow automatic update...** option for client applications running on the current platform is checked. + +This feature requires that you click on the **[...]** button and designate the location on your disk of the file to use for the update. The file to select depends on the current server platform: + +| Current server platform | Required file | Détails | +| ----------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| macOS | Windows 4D Volume Desktop *or* Windows client update archive | By default, you select the `4D Volume Desktop` application for Windows. To select a `.4darchive` file previously built on Windows, press **Shift** while clicking on [...] | +| Sous Windows | macOS client update archive | Select a signed `.4darchive` file previously built on macOS | + + +You can build specific a `.4darchive` file on the concurrent platform by selecting only the [**Build client application**](#build-client-application) and the appropriate [**Allow automatic update...**](#copy-of-client-applications-inside-the-server-application) option. + + + + +#### Comment proposer une mise à jour ? + +Dans la pratique, la proposition de mise à jour des applications clientes découle automatiquement de la mise à jour de l’application serveur. + +Le principe est le suivant : lors de la génération d’une nouvelle version de l’application client-serveur depuis le générateur d’applications, la nouvelle partie cliente est copiée sous forme compressée dans le sous-dossier **Upgrade4DClient** du dossier **NomApplication** Server (sous macOS, ces dossiers sont inclus dans le progiciel serveur). Si vous avez suivi le processus de génération d’une application cliente multi-plate-forme, un fichier *. 4darchive* de mise à jour est disponible pour chaque plate-forme : + +Pour provoquer la mise à jour des applications clientes, il suffit de remplacer l’ancienne version de l’application serveur par la nouvelle puis de l’exécuter. Le reste du processus est automatique. + +Côté client, au moment où l’“ancienne†application cliente tente de se connecter à l’application serveur mise à jour, une boîte de dialogue s’affiche sur le poste client, lui indiquant qu’une nouvelle version est disponible. L’utilisateur peut mettre sa version à jour ou annuler la boîte de dialogue. + +* Si l’utilisateur clique sur **OK**, la nouvelle version est téléchargée sur le poste client via le réseau. A l’issue du téléchargement, l’ancienne application client quitte, la nouvelle est lancée et se connecte au serveur. A l’issue du téléchargement, l’ancienne application client quitte, la nouvelle est lancée et se connecte au serveur. +* Si l’utilisateur clique sur **Annuler**, la mise à jour est annulée ; si l’ancienne version de l’application cliente n’appartient pas à l’intervalle des numéros de version acceptés par le serveur (cf. paragraphe suivant), l’application quitte et la connexion est impossible. Sinon (par défaut), la connexion est établie. + + + +#### Comment forcer la mise à jour ? + +Dans certains cas, vous pourrez souhaiter que les applications clientes ne puissent pas annuler le téléchargement des mises à jour. Par exemple, si vous avez utilisé une nouvelle version de l’application source 4D Server, il est impératif que la nouvelle version de l’application cliente soit installée sur chaque poste client. + +Pour forcer la mise à jour, il vous suffit d’exclure les versions courantes des applications clientes (N-1 et précédentes) de l’intervalle des numéros de version compatibles avec l’application serveur. Dans ce cas, le mécanisme de mise à jour n’autorisera pas la connexion des applications clientes non mises à jour. Par exemple, si la nouvelle version de l’application client-serveur est 6, vous pouvez stipuler que toute application cliente ayant un numéro de version strictement inférieur à 6 ne sera pas autorisé à se connecter. + +Le [numéro de version courante](#current_version) est défini dans la page Client/Serveur du générateur d’application. Les intervalles de numéros autorisés sont définis dans le projet d’application via des [clés XML](#build-application-settings) spécifiques. + + + + +#### En cas d’erreur + +Si 4D ne peut pas effectuer la mise à jour de l’application cliente, le poste client affiche le message d’erreur suivant : “La mise à jour de l’application cliente a échoué. L’application va maintenant quitter.†+ +Les causes possibles de cette erreur sont multiples. Lorsque vous rencontrez ce message, il est conseillé de contrôler en premier lieu les paramètres suivants : + +* **Chemins d’accès** : vérifiez la validité des chemins d’accès définis dans le projet d’application via la boîte de dialogue du Générateur d’applications ou via des clés XML (par exemple *ClientMacFolderToWin*). Vérifiez en particulier les chemins d’accès aux versions de 4D Volume Desktop. +* **Privilèges lecture/écriture** : sur la machine cliente, vérifiez que l’utilisateur courant dispose de droits d’accès en écriture pour l’application cliente mise à jour. + + + + +### Fichiers générés + +A l’issue du processus de génération d’une application client-serveur, vous devez trouver dans le dossier de destination un nouveau dossier nommé **Client Server executable**. Ce dossier contient deux sous-dossiers, *\Client* et *\Server*. + + +> Ces dossiers ne sont pas générés si une erreur est survenue. Dans ce cas, ouvrez le [fichier d’historique](#log-file) pour connaître la cause de l’erreur. + +Le dossier *\Client* contient la partie cliente de l’application correspondant à la plate-forme d’exécution du générateur d’application. Ce dossier doit être installé sur chaque poste client. Le dossier *\Server* contient la partie serveur de l'application. + +Le contenu de ces dossiers diffère en fonction de la plate-forme courante : + +* *Sous Windows*, chaque dossier contient le fichier exécutable de l’application, nommé *\Client.exe* pour la partie cliente et *\Server.exe* pour la partie serveur, ainsi que les fichiers .rsr correspondants. Les dossiers contiennent également divers fichiers et dossiers nécessaires au fonctionnement des applications et les éléments personnalisés éventuellement placés dans les dossiers 4D Volume Desktop et 4D Server d’origine. +* *Sous macOS*, chaque dossier contient uniquement le progiciel de l’application, nommé \ Client pour la partie cliente et \ Server pour la partie serveur. Chaque progiciel contient tous les éléments nécessaires à son fonctionnement. Sous macOS, un progiciel est lancé via un double-clic. + + + + > Les progiciels macOS générés contiennent les mêmes éléments que les sous-dossiers Windows. You can display their contents (**Control+click** on the icon) in order to be able to modify them. + +If you checked the “Allow automatic update of client application†option, an additional subfolder called *Upgrade4DClient* is added in the *\Server* folder/package.
    • + +Si vous avez coché l’option “Permettre la mise à jour automatique de l’application clienteâ€, un sous-dossier supplémentaire nommé *Upgrade4DClient* est ajouté dans le dossier/progiciel *\Server*. Ce sous-dossier contient l’application cliente au format macOS et/ou Windows sous forme de fichier compressé. Ce fichier est utilisé lors de la mise à jour automatique des applications clientes. + + + + +#### Emplacements des fichiers Web + +Si la partie serveur et/ou la partie cliente de votre application exécutable est utilisée en tant que serveur Web, les fichiers et dossiers requis par le serveur doivent être installés à des emplacements spécifiques. Ces éléments sont les suivants : + +- fichiers *cert.pem* et *key.pem* (facultatifs) : ces fichiers sont utilisés pour les connexions SSL ainsi que par les commandes de cryptage des données, +- Dossier racine Web (DossierWeb) par défaut. + +Des éléments doivent être installée : + +* **Sous Windows** + + * **Application serveur** : dans le sous-dossier *Client Server executable\ \Server\Server Database*. + * **Application cliente** : dans le sous-dossier *Client Server executable\ \Client*. +* **sous macOS** + + * **Application serveur** : à côté du progiciel *\Server*. + * **Application cliente** : à côté du progiciel *\Client*. + + + + +### Intégrer une structure compilée dans la partie cliente + +4D permet d'intégrer une structure compilée dans une application cliente. Cette fonctionnalité peut être utilisée, par exemple, pour fournir aux utilisateurs une application "portail" donnant accès aux différentes applications serveur, via la commande `OPEN DATABASE` exécutant un fichier `.4dlink`. + +Pour activer cette fonctionnalité, ajoutez les clés `DatabaseToEmbedInClientWinFolder` et/ou `DatabaseToEmbedInClientMacFolder` dans le fichier de configuration *buildApp*. Lorsque l'une de ces clés est présente, le processus de génération de l'application cliente génère une application monoposte : la structure compilée, au lieu du fichier *EnginedServer.4Dlink*, est placée dans le dossier "Database". + +- Si un dossier "Data" par défaut existe dans l'application monoposte, une licence est intégrée. +- Si un dossier "Data" par défaut n'existe pas dans l'application monoposte, elle sera exécutée sans le fichier de données et sans licence. + +Le scénario standard est le suivant : + +1. Dans la boîte de dialogue du Générateur d'application, sélectionnez l'option "Générer une structure compilée" pour produire un .4DC ou un .4DZ pour utiliser l'application en monoposte. +2. Dans le fichier *buildApp.4DSettings* de l'application client-serveur, utilisez la ou les clés xml suivantes pour indiquer le chemin du dossier contenant l'application compilée monoposte : + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Générez l'application client-serveur. Cela produira les effets suivants : + - le dossier de l'application monoposte est copié intégralement dans le dossier "Database" du client fusionné + - le fichier *EnginedServer.4Dlink* du dossier "Database" n'est pas généré + - les fichiers .4DC, .4DZ, .4DIndy de la copie de l'application monoposte sont renommés à l'aide du client fusionné + - la clé `PublishName` n'est pas copiée dans le *info.plist* du client fusionné + - si l'application monoposte ne possède pas de dossier "Data" par défaut, le client fusionné sera exécuté sans données. + +Les fonctionnalités de mise à jour automatique de 4D Server (clé [CurrentVers](#current-version), commande `SET UPDATE FOLDER`, etc.) fonctionnent avec une application monoposte, comme avec une application distante standard. Lors de la connexion, l'application monoposte compare sa clé `CurrentVers` à la plage de version 4D Server. Si elle se trouve en dehors de plage, l'application cliente monoposte mise à jour est téléchargée depuis le serveur et l'Updater lance le processus de mise à jour locale. + + + + +### Personnalisation des noms de dossier de cache client et/ou serveur + +Les dossiers de cache client et serveur sont utilisés pour stocker des éléments partagés tels que des ressources ou des composants. Ils sont nécessaires pour gérer les échanges entre le serveur et les clients distants. Les applications client/serveur utilisent les chemins d'accès par défaut pour les dossiers de cache système client et serveur. + +Dans certains cas spécifiques, vous devrez personnaliser les noms de ces dossiers pour implémenter des architectures spécifiques (voir ci-dessous). 4D vous fournit les clés `ClientServerSystemFolderName` et `ServerStructureFolderName` à définir dans le fichier de paramètres *buildApp*. + + + + +#### Dossier de cache client + +La personnalisation du nom du dossier de cache côté client peut être utile lorsque votre application cliente est utilisée pour se connecter à plusieurs serveurs fusionnés qui sont similaires mais qui utilisent des ensembles de données différents. Dans ce cas, pour enregistrer plusieurs téléchargements inutiles de ressources locales identiques, vous pouvez utiliser le même dossier de cache local personnalisé. + +- Configuration par défaut (*pour chaque connexion à un serveur, un dossier cache spécifique est téléchargé/mis à jour*) : + +![](assets/en/Admin/cachea.png) + +- À l'aide de la clé `ClientServerSystemFolderName` (*un seul dossier de cache est utilisé pour tous les serveurs*) : + +![](assets/en/Admin/cacheb.png) + + + + +#### Dossier de cache du serveur + +La personnalisation du nom du dossier de cache côté serveur est utile lorsque vous exécutez plusieurs applications serveur identiques créées avec différentes versions de 4D sur le même ordinateur. Si vous souhaitez que chaque serveur utilise son propre ensemble de ressources, vous devez personnaliser le dossier de cache du serveur. + +- Configuration par défaut (*les mêmes applications serveur partagent le même dossier de cache*) : + +![](assets/en/Admin/cacheServera.png) + +- À l'aide de la clé `ServerStructureFolderName` (*un dossier de cache dédié est utilisé pour chaque application serveur*) : + +![](assets/en/Admin/cacheServerb.png) + + + + + + +## Page Plugins et composants + +Dans cet onglet, définissez chaque [plug-in](Concepts/plug-ins.md) et chaque [composant](Concepts/components.md) que vous utiliserez dans votre application autonome ou client/serveur. + +La page liste les éléments chargés par l'application 4D courante : + +![](assets/en/Project/buildapppluginsProj.png) + +* La colonne **Actif** indique les éléments qui seront intégrés dans l’application générée. Par défaut, tous les éléments sont inclus. Pour exclure un plug-in ou un composant, désélectionnez la case qui lui est associée. + +* Colonne **Plugins et composants** - Affiche le nom du plug-in/composant. + +* Colonne **ID** - Affiche le numéro d'identification du plug-in/composant (le cas échéant). + +* La colonne **Type** indique le type de l’élément : plug-in ou composant. + +Si vous souhaitez intégrer d’autres plug-ins ou composants dans l’application exécutable, il vous suffit de les placer dans un dossier **PlugIns** ou **Components** à côté de l’application 4D Volume Desktop ou de l’application 4D Server. Le mécanisme de copie du contenu du dossier de l’application source (cf. paragraphe [Personnaliser le dossier 4D Volume Desktop](#customizing-4d-volume-desktop-folder)) permet d’intégrer tout type de fichier à l’application exécutable. + +En cas de conflit entre deux versions différentes d’un même plug-in (l’une chargée par 4D et l’autre placée dans le dossier de l’application source), la priorité revient au plug-in installé dans le dossier de 4D Volume Desktop/4D Server. En revanche, la présence de deux instances d’un même composant empêchera l’ouverture de l’application. + + +> L’utilisation de plug-ins et/ou de composants compilés dans une version de déploiement nécessite des numéros de licence adéquats. + + + + + + + + +## Page Licences & Certificat + +La page Licences & Certificat vous permet de : + +* spécifier le ou les numéro(s) de licence que vous souhaitez intégrer dans votre application exécutable monoposte +* signer l'application à l'aide d'un certificat sous macOS. + +![](assets/en/Admin/buildappCertif.png) + + + +### Licences + +Cet onglet affiche la liste des licences de déploiement disponibles que vous pouvez intégrer dans votre application. Par défaut, la liste est vide. Vous devez explicitement ajouter votre licence *4D Developer Professional* ainsi que chaque licence* 4D Desktop Volume* liée à utiliser dans l’application générée. Vous pouvez ajouter un numéro 4D Developer Professional et ses licences associées autres que ceux en cours d’utilisation. + +Pour ajouter ou supprimer des licences, utilisez les boutons **[+]** et **[-]** situés en bas de la fenêtre. + +Lorsque vous cliquez sur le bouton \[+], une boîte de dialogue d’ouverture de document apparaît, affichant par défaut le contenu du dossier *[Licenses]* de votre poste. Pour plus d'informations sur l'emplacement de ce dossier, reportez-vous à la commande [Get 4D folder](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html). + +Vous devez désigner les fichiers contenant votre licence Developer et ainsi que vos licences de déploiement. Ces fichiers ont été générés ou mis à jour au moment de l’acquisition de la licence *4D Developer Professional* et des licences *4D Desktop Volume*. + +Une fois que vous avez sélectionné un fichier, la liste indique les caractéristiques de la licence qu’il contient. + +* **N° Licence** : numéro de licence du produit +* **Licence** : nom du produit +* **Date d'expiration** : date d'expiration de la licence (le cas échéant) +* **Chemin d'accès** : emplacement sur le disque + +Si la licence est invalide, un message vous le signale. + +Vous pouvez désigner autant de fichiers valides que vous voulez. Lors de la génération de l’application exécutable, 4D utilisera les licences les plus appropriées. + + +> Des licences "R" dédiées sont requises pour générer des applications basées sur des versions "R-release" (les numéros de licence des produits "R" débutent par "R-4DDP"). + +A l’issue de la génération, un nouveau fichier de licence de déploiement est automatiquement inclus dans un dossier Licences placé à côté de l’application exécutable (Windows) ou dans le progiciel (macOS). + + + + +### Certification des applications sous OS X + +The application builder can sign merged 4D applications under macOS (single-user applications, components, 4D Server and client parts under macOS). Signer une application permet d’autoriser son exécution par la fonctionnalité Gatekeeper de macOS lorsque l’option "Mac App Store et Développeurs identifiés" est sélectionnée (cf. "A propos de Gatekeeper" ci-dessous). + +- Cochez l'option **Signer l’application** pour inclure la certification dans le processus de génération de l’application pour macOS : + +![](assets/en/Admin/buildapposxcertProj.png) + +L'option est affichée sous Windows et macOS mais n’est prise en compte que pour les versions macOS. + +* **Nom du certificat** : saisissez dans cette zone le nom de votre certificat développeur validé par Apple. Le nom d’un certificat est généralement le nom du certificat dans l’utilitaire Trousseau d’accès (la partie en rouge dans l'exemple suivant) : + +![](assets/en/Project/certificate.png) + +Pour obtenir un certificat de développeur auprès d’Apple, Inc., vous pouvez utiliser les commandes du menu Trousseaux d’accès ou vous connecter à la page suivante : [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). + + +> Le certificat requiert la présence de l’utilitaire codesign d’Apple. Cet utilitaire est fourni par défaut et se trouve généralement dans le dossier "/usr/bin/". En cas d’erreur, vérifiez que cet utilitaire est présent sur votre disque. + +* **Générer un certificat auto-signé** - exécute le «Certificate Assistant» qui vous permet de générer un certificat auto-signé. Si vous ne disposez pas d'un certificat de développeur Apple, vous devez fournir un certificat auto-signé. Avec ce certificat, aucun message d'alerte ne s'affiche si l'application est déployée en interne. Si l'application est déployée en externe (c'est-à-dire via http ou e-mail), au lancement, macOS affiche un message d'alerte indiquant que le développeur de l'application n'est pas identifié. L'utilisateur peut "forcer" l'ouverture de l'application.

      Dans le «Certificate Assistant», veillez à sélectionner les options appropriées : ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + + + +> 4D recommande de souscrire au programme Apple Developer Program pour accéder aux "Developer Certificates" nécessaires à la notarisation des applications (voir ci-dessous). + + + + +#### A propos de Gatekeeper + +Gatekeeper est une fonction de sécurité d’OS X permettant de contrôler l’exécution des applications téléchargées depuis Internet. Si une application téléchargée ne provient pas de l’Apple Store ou n’est pas signée, elle est rejetée et ne peut être lancée. + + + +> On Apple Silicon machines, 4D [components](#components) need to be actually signed. An unsigned component will generate an error at application startup ("lib4d-arm64.dylib can't be opened..."). + +L'option **Signer l'application** du Générateur d’application de 4D permet de générer des applications et des composants compatibles avec cette option par défaut. + + + + +#### À propos de la notarisation + +La notarisation des applications est fortement recommandée par Apple à partir de macOS 10.14.5 (Mojave) et 10.15 (Catalina), car les applications non notariées déployées via Internet sont bloquées par défaut. + +The 4D [built-in signing features](#os-x-signing-certificate) have been adapted to meet all of Apple's requirements to allow using the Apple notary service. La notarisation elle-même doit être réalisée par le développeur et est indépendante de 4D (à noter également qu'elle nécessite l'installation de Xcode). Veuillez vous référer à [ce post du blog 4D](https://blog.4d.com/how-to-notarize-your-merged-4d-application/) qui fournit une description, par étapes, du processus de notarisation. + +Pour plus d'informations sur le concept de notarisation, veuillez consulter [cette page sur le site Apple developer](https://developer.apple.com/documentation/xcode/notarizing_your_app_before_distribution/customizing_the_notarization_workflow). + + + +## Personnaliser les icônes d’une application + +4D associe une icône par défaut aux applications exécutables (monopostes et client-serveur). Vous pouvez cependant la personnaliser pour chaque application. + +* **Sous macOS** - La personnalisation de l’icône de votre application est prise en charge par 4D lors de la construction de l’application exécutable. Pour cela, vous devez, avant la construction du fichier de l’application, créer un fichier d’icône (type icns) et le placer à côté du dossier de structure. + + +> Apple, Inc. fournit un outil spécifique pour générer les fichiers d’icône *icns* (pour plus d'informations, veuillez consulter la [documentation d'Apple](https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW2)). + +Votre fichier d’icône doit avoir le même nom que le fichier du projet et comporter l’extension *.icns*. 4D prend automatiquement ce fichier en compte lors de la génération de l’application double-cliquable (le fichier *.icns* est renommé *NomApplication.icns* et recopié dans le dossier Resources ; l’entrée *CFBundleFileIcon* du fichier *info.plist* est mise à jour). + +* **Sous Windows** - La personnalisation de l’icône de votre application est prise en charge par 4D lors de la construction de l’application exécutable. Pour cela, vous devez, avant la construction du fichier de l’application, créer un fichier d’icône (extension *.ico*) et le placer à côté du fichier de structure interprété (fichier du projet). + + Votre fichier d’icône doit avoir le même nom que le fichier de structure interprété et comporter l’extension *.ico*. 4D prend automatiquement ce fichier en compte lors de la génération de l’application exécutable. + +Vous pouvez également définir des [clés XML](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-XML-Keys-BuildApplication.100-4465602.en.html) spécifiques dans le fichier buildApp.4DSettings pour désigner chaque icône devant être utilisée. Les clés suivantes sont disponibles : + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- ClientMacIconForWinPath +- ClientWinIconForWinPath + + + + + +## Gestion des fichiers de données + + + +### Ouverture du fichier de données + +Lorsqu'un utilisateur lance une application fusionnée ou une mise à jour (applications monopostes ou applications client-serveur), 4D va tenter d'ouvrir un fichier de données valide. Plusieurs emplacements sont successivement examinés par l'application. + +La séquence de lancement d'une application fusionnée est la suivante : + +1. 4D tente d'ouvrir le Dernier fichier de données ouvert, [comme décrit ci-dessous](#last-data-file-opened) (non applicable lors du lancement initial). +2. S'il n'est pas trouvé, 4D tente d'ouvrir en mode lecture seule le fichier de données situé dans le dossier de données par défaut au même niveau que le fichier .4DC. +3. S'il n'est pas trouvé, 4D tente d'ouvrir le fichier de données par défaut standard (même nom et même emplacement que le fichier .4DZ). +4. S'il n'est pas trouvé, 4D affiche une boîte de dialogue standard de sélection/création de fichier de données. + + + + +### Dernier fichier de données ouvert + + + +#### Chemin d'accès du dernier fichier de données + +Toute application autonome ou serveur générée avec 4D stocke le chemin d'accès du dernier fichier de données ouvert dans le dossier de préférences de l'utilisateur de l'application. + +L'emplacement du dossier de préférences de l'utilisateur de l'application correspond au chemin retourné par l'instruction suivante : + + + + +```4d +prefsUtilisateur:=Get 4D folder(Dossier 4D actif) +``` + + +Le chemin d'accès du fichier de données est stocké dans un fichier dédié, nommé *lastDataPath.xml*. + +Grâce à cette architecture, lorsque vous fournissez une mise à jour de votre application, le fichier de données de l'utilisateur local (le dernier fichier de données utilisé) est automatiquement ouvert dès le premier lancement. + +Ce mécanisme est généralement adapté aux déploiements standard. Cependant, dans des cas spécifiques, par exemple si vous dupliquez vos applications fusionnées, vous pouvez avoir besoin de modifier la manière dont le fichier de données est lié à l'application. + + + +#### Configurer le mode de liaison des données + +4D utilise automatiquement, avec vos applications compilées, le dernier fichier de données ouvert. Par défaut, le chemin d'accès du fichier de données est stocké dans le dossier de préférences de l'utilisateur de l'application et est lié au **nom de l'application**. + +Ce fonctionnement peut s'avérer inadapté si vous souhaitez dupliquer une application fusionnée destinée à utiliser différents fichiers de données. En effet, les applications dupliquées vont en fait partager le même dossier de préférences de l'utilisateur et donc, toujours utiliser le même fichier de données -- même si le fichier de données est renommé, car l'application utilisera toujours le dernier fichier de données ouvert par l'application. + +4D vous permet donc de lier votre chemin de fichier de données au chemin de l'application. Dans ce cas, le fichier de données sera relié via un chemin spécifique et ne sera plus simplement le dernier fichier utilisé. 4D vous permet donc de lier votre chemin de fichier de données au **chemin de l'application**. + +Ce mode vous permet de dupliquer vos applications fusionnées sans rompre le lien vers le fichier de données. Cependant, avec cette option, si le package d'application est déplacé sur le disque, l'utilisateur sera invité à entrer un fichier de données, car le chemin de l'application ne correspondra plus à l'attribut "executablePath" (après qu'un utilisateur ait sélectionné un fichier de données, le fichier *lastDataPath.xml* est mis à jour en conséquence). + +*Duplication lorsque les données sont liées par le nom de l'application :* ![](assets/en/Project/datalinking1.png) + +*Duplication lorsque les données sont liées par le chemin de l'application :* ![](assets/en/Project/datalinking2.png) + +Vous sélectionnez le mode de liaison des données lors de la phase de génération de l'application. Vous pouvez : + +- Utiliser la [Page Application](#application) ou la [Page Client/Serveur](#client-server) de boîte de dialogue du Générateur d'applications. +- Utiliser la clé XML **LastDataPathLookup** (application monoposte ou application serveur). + + + + +### Définir un dossier de données par défaut + +4D vous permet de définir un fichier de données par défaut lors de la phase de construction de l'application. Au premier lancement de l'application, en l'absence de fichier local (cf. [séquence de lancement décrite ci-dessus](#opening-the-data-file)), le fichier de données par défaut est automatiquement ouvert silencieusement en mode lecture seule par 4D. Cela vous donne un meilleur contrôle sur la création et/ou l'ouverture des fichiers de données lors du premier lancement d'une application fusionnée. + +Plus particulièrement, il permet de répondre aux besoins suivants : + +- Eviter l'affichage de la boîte de dialogue d'ouverture de fichier de données de 4D au lancement d'une nouvelle application fusionnée ou d'une mise à jour. Vous pouvez détecter, par exemple dans la , que le fichier de données par défaut a été ouvert et donc, exécuter votre propre code et/ou boîtes de dialogue permettant de créer ou de sélectionner un fichier de données local. +- Permettre la distribution d'applications fusionnées comportant des données en lecture seulement (par exemple des applications de démonstration). + +Pour définir et utiliser un fichier de données par défaut : + +- Vous devez fournir un fichier de données par défaut (nommé "Default.4DD") et le stocker dans un dossier spécifique (nommé "Default Data") à l'intérieur du dossier du projet d'application. Ce fichier doit être accompagné de tous les fichiers nécessaires, en fonction de la configuration du projet : index (.4dIndx), blobs externes, journal, etc. Il est de votre responsabilité de livrer un fichier de données par défaut valide. A noter que, comme le fichier de données par défaut est ouvert en mode lecture seule, il est recommandé de désélectionner l'option "Utiliser le fichier d'historique" dans le fichier de structure original avant de créer le fichier de données. +- Au moment de la génération de l'application, le dossier de données par défaut est intégré dans l'application fusionnée. Tous les fichiers présents dans ce dossier par défaut sont également embarqués. + +Le schéma suivant illustre cette fonctionnalité : + +![](assets/en/Project/DefaultData.png) + +Lorsque le fichier de données par défaut est détecté au premier lancement, il est silencieusement ouvert en mode lecture seulement, vous permettant ainsi d'exécuter toute opération personnalisée (à condition qu'elle ne modifie pas le fichier de données lui-même). + + + + +## Gestion de la connexion des applications clientes + +La gestion des connexions des applications clientes recouvre les mécanismes par lesquels une application cliente fusionnée se connectera au serveur cible, une fois en environnement de production. + + + +### Scénario de connexion + +Le processus de connexion des applications clientes fusionnées prend en charge les cas où le serveur dédié n'est pas disponible. Le scénario du démarrage d'une application cliente 4D est le suivant : + +- L'application cliente tente de se connecter au serveur via le service de découverte (basé sur le nom du serveur, publié sur le même sous-réseau que l'application cliente). + OU + Si des informations de connexion valides sont présentes dans le fichier "EnginedServer.4DLink" à l'intérieur de son dossier, l'application cliente tente de se connecter à l'adresse du serveur spécifiée dans ce fichier. +- En cas d'échec, l'application cliente tente de se connecter au serveur à l'aide des informations présentes dans le dossier de préférences utilisateur de l'application (fichier "lastServer.xml", cf. dernière étape). +- En cas d'échec, l'application cliente affiche une boîte de dialogue d'erreur de connexion. + - Si l'utilisateur clique sur le bouton **Sélectionner...** (lorsqu'il été autorisé par le développeur 4D au moment de la génération de l'application, voir ci-dessous), la boîte de dialogue standard "Connexion au serveur" est affichée. + - Si l'utilisateur clique sur le bouton **Quitter**, l'application client quitte. +- Si la connexion est établie avec succès, les paramètres de cette connexion sont sauvegardés dans le dossier de préférences utilisateur de l'application cliente, ce qui permettra de les réutiliser ultérieurement en cas de besoin. + + + +### Sauvegarde du chemin du dernier serveur + +Le chemin du dernier serveur utilisé est automatiquement sauvegardé dans un fichier nommé "lastServer.xml" placé dans le dossier de préférences utilisateur de l'application cliente. Ce dossier est situé à l'emplacement suivant : + + + +```4d +prefsUtilisateur:=Get 4D folder(Dossier 4D actif) +``` + + +Ce mécanisme permet de prendre en charge le cas où le serveur cible primaire est temporairement indisponible pour une raison quelconque (par exemple pour une opération de maintenance). Lorsque ce cas se produit pour la première fois, la boîte de dialogue de sélection de serveur est affichée (si elle est autorisée, cf. ci-dessous) et l'utilisateur peut manuellement sélectionner un serveur alternatif, dont le chemin est alors sauvegardé si la connexion est établie et validée. Toute indisponibilité ultérieure sera alors automatiquement prise en charge à l'aide des paramètres de connexion présents dans le fichier "lastServer.xml". + + + +> - Lorsque les applications clientes ne peuvent pas bénéficier du service de découverte, par exemple à cause de la configuration réseau, il reste recommandé que le développeur indique un nom d'hôte au lors de la génération de l'application à l'aide de la clé [IPAddress](https://doc.4d.com/4Dv17R6/4D/17-R6/IPAddress.300-4465710.en.html) dans le fichier "BuildApp.xml". Le mécanisme de sauvegarde du chemin du dernier serveur est conçu pour les cas d'indisponibilité temporaire uniquement. +> - Dans tous les cas, il est possible de maintenir la touche **Alt/Option** au démarrage de l'application cliente afin d'afficher la boîte de dialogue de sélection du serveur. + + + + + +### Accès à la boîte de dialogue de sélection de serveur en cas d'erreur + +Vous pouvez choisir d'afficher ou non la boîte de dialogue standard de sélection de serveur sur les applications clientes fusionnées lorsque le serveur ne répond pas. La configuration dans ce cas dépend de la valeur de la clé XML [ServerSelectionAllowed](https://doc.4d.com/4Dv17R6/4D/17-R6/ServerSelectionAllowed.300-4465714.en.html) sur le poste qui génère l'application client/serveur. Vous disposez de trois possibilités : + +- **Affichage d'un message d'erreur sans accès possible à la boîte de dialogue de sélection de serveur**. Fonctionnement par défaut. L'application peut uniquement quitter. + Clé Xml `ServerSelectionAllowed` : valeur **False** ou clé omise ![](assets/en/Project/connect1.png) + +- **Affichage d'un message d'erreur avec accès possible à la boîte de dialogue de sélection de serveur.**. L'utilisateur peut accéder à la fenêtre de sélection de serveur en cliquant sur le bouton **Sélectionner...** + Clé XML `ServerSelectionAllowed` : valeur **True** ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) diff --git a/website/translated_docs/fr/Desktop/clientServer.md b/website/translated_docs/fr/Desktop/clientServer.md new file mode 100644 index 00000000000000..712e149dd91fe1 --- /dev/null +++ b/website/translated_docs/fr/Desktop/clientServer.md @@ -0,0 +1,96 @@ +--- +id: clientServer +title: Client/Server Management +--- + + +4D Desktop applications can be used in a Client/Server configuration, either as merged client/server applications or as remote projects. + +- **merged client/server applications** are generated by the [Build Application manager](building.md#clientserver-page). They are used for application deployments. + +- **remote projects** are [.4DProject](Project/architecture.md) files opened by 4D Server and accessed with 4D in remote mode. The server sends a .4dz version of the project ([compressed format](building.md#build-compiled-structure)) to the remote 4D, thus structure files are read-only. This configuration is usually used for application testing. + +![](assets/en/getStart/localremote.png) + +> Connecting to a remote projet from the **same machine as 4D Server** allows modifying the project files. This [specific feature](#using-4d-and-4d-server-on-the-same-machine) allows to develop a client/server application in the same context as the deployment context. + + + +## Opening a merged client/server application + +A merged client/server application is customized and its starting is simplified: + +- Pour lancer la partie serveur, l’utilisateur double-clique simplement sur l’application serveur : il n’est pas nécessaire de sélectionner le fichier projet. +- Pour lancer la partie cliente, l’utilisateur double-clique simplement sur l’application cliente, qui se connecte directement à l’application serveur : + +These principles are detailed in the [Build Application](building.md#what-is-a-clientserver-application) page. + + +## Ouvrir un projet distant + +La première fois que vous vous connectez à un projet 4D Server via un 4D distant, vous utiliserez généralement la boîte de dialogue de connexion standard. Thereafter, you will be able to connect directly using the **Open Recent Projects** menu or a 4DLink shortcut file. + +Pour vous connecter à distance à un projet 4D Server : + +1. Sélectionnez **Se connecter à 4D Server** dans la boîte de dialogue de l'Assistant de bienvenue,

      OU

      Sélectionnez **Ouvrir > Projet distant...** à partir du menu **Fichier** ou du bouton **Ouvrir** de la barre d'outils. + +La boîte de dialogue de connexion à 4D Server apparaît. Cette boîte de dialogue comporte trois onglets : **Récent**, **Disponible** et **Personnalisé**. + +Si 4D Server est connecté au même réseau que le 4D distant, sélectionnez **Disponible**. 4D Server inclut un système de diffusion TCP/IP intégré qui, par défaut, publie le nom des projets 4D Server disponibles sur le réseau. La liste est triée par ordre d'apparition et est mise à jour dynamiquement. + +![](assets/en/getStart/serverConnect.png) + +Pour vous connecter à un serveur de la liste, double-cliquez sur son nom ou sélectionnez-le et cliquez sur le bouton **OK**. + +> Un accent circonflexe (^) est placé avant le nom des projets publiés avec l'option de chiffrement activée. + +Si le projet publié n'est pas affiché dans la liste **Disponible**, sélectionnez **Personnalisé**. La page Personnalisé vous permet de vous connecter à un serveur publié sur le réseau en utilisant son adresse réseau et en lui attribuant un nom personnalisé. + +![](assets/en/getStart/serverConnect2.png) + + +- **Nom du projet** : définit le nom local du projet 4D Server. Ce nom sera utilisé dans la page **Récent** pour faire référence au projet. +- **Adresse réseau** : L'adresse IP de la machine sur laquelle le 4D Server a été lancé.

      Si deux serveurs sont exécutés simultanément sur la même machine, l'adresse IP doit être suivie de deux points et d'un numéro de port, par exemple : `192.168.92.104:19814`.

      Par défaut, le port de publication d'un 4D Server est 19813. Ce numéro peut être modifié dans les paramètres du projet. + +Une fois que cette page attribue un serveur, cliquez sur le bouton **OK** pour vous connecter au serveur. + +> Si le projet est publié avec l'option de chiffrement activée, vous devez ajouter un accent circonflexe (^) avant le nom, sinon la connexion sera refusée. Pour plus d'informations, reportez-vous à la section Chiffrement des connexions client/serveur. + +Une fois la connexion au serveur établie, le projet distant sera répertorié dans l'onglet **Récent**. + +### Mettre à jour des fichiers de projet sur le serveur + +4D Server automatically creates and sends the remote machines a [.4dz version](building.md#build-compiled-structure) of the *.4DProject* project file (not compressed) in interpreted mode. + +- Une version .4dz mise à jour du projet est automatiquement produite lorsque cela est nécessaire, c'est-à-dire lorsque le projet a été modifié et rechargé par 4D Server. Le projet est rechargé : + - automatiquement, lorsque la fenêtre de l'application 4D Server arrive à l'avant de l'OS ou lorsque l'application 4D sur la même machine enregistre une modification (voir ci-dessous). + - lorsque la commande `RELOAD PROJECT` est exécutée. L'appel de cette commande est nécessaire lorsque, par exemple, vous avez extrait une nouvelle version du projet depuis la plateforme de contrôle de version. + + + + +### Mettre à jour des fichiers de projet sur les machines distantes + +Lorsqu'une version .4dz mise à jour du projet a été produite sur 4D Server, les machines 4D distantes connectées doivent se déconnecter et se reconnecter à 4D Server afin de bénéficier de la version mise à jour. + + +## Using 4D and 4D Server on the same machine + +Lorsque 4D se connecte à un 4D Server sur la même machine, l'application se comporte comme 4D en mode monoposte et l'environnement de développement permet d'éditer les fichiers du projet. This feature allows you to develop a client/server application in the same context as the deployment context. + +A chaque fois que 4D effectue une action **Enregistrer tout** depuis l'environnement de développement (explicitement depuis le menu **Fichier** ou implicitement en passant en mode application par exemple), 4D Server recharge de manière synchrone les fichiers du projet. 4D attend que 4D Server termine le rechargement des fichiers du projet avant de continuer. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](Project/architecture.md): + +- le dossier userPreferences.{username} utilisé par 4D ne correspond pas au même dossier utilisé par 4D Server dans le dossier projet. Au lieu de cela, il s'agit d'un dossier dédié, nommé "userPreferences", stocké dans le dossier système du projet (c'est-à-dire au même emplacement que lors de l'ouverture d'un projet .4dz). +- le dossier utilisé par 4D pour les données dérivées n'est pas le dossier "DerivedData" du dossier projet. Il s'agit plutôt d'un dossier dédié nommé "DerivedDataRemote" situé dans le dossier système du projet. +- le fichier catalog.4DCatalog n'est pas édité par 4D mais par 4D Server. Les informations du catalogue sont synchronisées à l'aide des requêtes client/serveur +- le fichier directory.json n'est pas édité par 4D mais par 4D Server. Les informations du répertoire sont synchronisées à l'aide des requêtes client/serveur +- 4D utilise ses propres composants internes et plug-ins au lieu de ceux de 4D Server. + +> Il n'est pas recommandé d'installer des plug-ins ou des composants au niveau de l'application 4D ou 4D Server. + + + + + diff --git a/website/translated_docs/fr/Events/onActivate.md b/website/translated_docs/fr/Events/onActivate.md index 98f16c80cf7e1d..17114acdd45a38 100644 --- a/website/translated_docs/fr/Events/onActivate.md +++ b/website/translated_docs/fr/Events/onActivate.md @@ -3,13 +3,15 @@ id: onActivate title: Sur activation --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | -------------------------------------------------- | -| 11 | Formulaire | La fenêtre du formulaire devient la fenêtre active | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | -------------------------------------------------------------------------------------------------------------------- | +| 11 | Formulaire | La fenêtre du formulaire devient la fenêtre de premier plan ou bien le conteneur du sous-formulaire obtient le focus | ## Description Si la fenêtre d'un formulaire a été envoyée en arrière-plan, cet événement est appelé lorsque la fenêtre devient la fenêtre active. -Cet événement s'applique au formulaire dans son ensemble et non à un objet particulier. Par conséquent, si la propriété d'événement formulaire `On Activate` est sélectionnée, seul le formulaire aura sa méthode formulaire appelée. \ No newline at end of file +Cet événement s'applique au formulaire dans son ensemble et non à un objet particulier. Par conséquent, si la propriété d'événement formulaire `On Activate` est sélectionnée, seul le formulaire aura sa méthode formulaire appelée. + +Dans le cas d'un sous-formulaire, cet événement est passé au sous-formulaire lorsque le conteneur obtient le focus (s'il possède la propriété [focusable](FormObjects/properties_Entry.md#focusable)). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onAfterEdit.md b/website/translated_docs/fr/Events/onAfterEdit.md index 83bbcf79de847c..2a0d582664113f 100644 --- a/website/translated_docs/fr/Events/onAfterEdit.md +++ b/website/translated_docs/fr/Events/onAfterEdit.md @@ -3,172 +3,110 @@ id: onAfterEdit title: Sur après modification --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| 45 | [Zone 4D View Pro](FormObjects/viewProArea_overview) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Formulaire - [Zone de saisie](FormObjects/input_overview.md) - [Liste hiérarchique](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne List Box](FormObjects/listbox_overview.md#list-box-columns) | The contents of the enterable object that has the focus has just been modified | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- | +| 45 | [Zone 4D View Pro](FormObjects/viewProArea_overview) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Formulaire - [Zone de saisie](FormObjects/input_overview.md) - [Liste hiérarchique](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne List Box](FormObjects/listbox_overview.md#list-box-columns) | Le contenu de l'objet saisissable qui a le focus vient d'être modifié | ## Description ### Cas général -This event can be used filter the data entry in keyboard enterable objects at the lowest level. +Cet événement peut être utilisé pour filtrer la saisie de données dans les objets saisissables au clavier au niveau le plus bas. -When it is used, this event is generated after each change made to the contents of an enterable object, regardless of the action that caused the change, *i.e.*: +Lorsqu'il est utilisé, cet événement est généré après chaque modification apportée au contenu d'un objet saisissable, quelle que soit l'action qui a provoqué la modification, c'est-à-dire : -- Standard editing actions which modify content like paste, cut, delete or cancel; -- Dropping a value (action similar to paste); -- Any keyboard entry made by the user; in this case, the `On After Edit` event is generated after the [`On Before Keystroke`](onBeforeKeystroke.md) and [`On After Keystroke`](onAfterKeystroke.md) events, if they are used. -- Any modification made using a language command that simulates a user action (i.e., `POST KEY`). +- Actions d'édition standard qui modifient le contenu comme les actions coller, couper, supprimer ou annuler; +- Déposer une valeur (action similaire à coller); +- Toute entrée au clavier effectuée par l'utilisateur; dans ce cas, l'événement `On After Edit` est généré après les événements [`On Before Keystroke`](onBeforeKeystroke.md) et [`On After Keystroke`](onAfterKeystroke.md), s'ils sont utilisés. +- Toute modification apportée à l'aide d'une commande de langage qui simule une action de l'utilisateur (c'est-à-dire `POST KEY`). ### 4D View Pro -The object returned by the `FORM Event` command contains: +L'objet retourné par la commande `FORM Event` contient : | Propriété | Type | Description | | ----------- | ----------- | --------------------------------------------------------------------------------------------------- | | code | entier long | Sur après modification | | description | Texte | "On After Edit" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | | action | Texte | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | - -Depending on the `action` property value, the [event object](overview.md#event-object) will contain additional properties. +En fonction de la valeur de la propriété `action`, l'[objet event](overview.md#event-object) contiendra des propriétés supplémentaires. #### action = editChange -| Propriété | Type | Description | -| ----------- | ------- | --------------------------------- | -| range | objet | Cell range | -| editingText | variant | The value from the current editor | - +| Propriété | Type | Description | +| ----------- | ------- | ---------------------------------------- | +| range | object | Plage de cellule | +| editingText | variant | La valeur provenant de l'éditeur courant | #### action = valueChanged -| Propriété | Type | Description | -| --------- | ------- | --------------------------- | -| range | objet | Cell range | -| oldValue | variant | Value of cell before change | -| newValue | variant | Value of cell after change | +| Propriété | Type | Description | +| --------- | ------- | ------------------------------------------ | +| range | object | Plage de cellule | +| oldValue | variant | Valeur de la cellule avant la modification | +| newValue | variant | Valeur de la cellule après la modification | #### action = DragDropBlock -| Propriété | Type | Description | -| --------- | ------- | --------------------------------------------------- | -| fromRange | objet | Range of source cell range (being dragged) | -| toRange | objet | Range of the destination cell range (drop location) | -| copy | booléen | Specifies if the source range is copied or not | -| insert | booléen | Specifies if the source range is inserted or not | +| Propriété | Type | Description | +| --------- | ------- | ------------------------------------------------- | +| fromRange | object | Plage de cellule source (qui est glissée) | +| toRange | object | Plage de cellule de destination (qui est déposée) | +| copy | boolean | Indique si la plage source est copiée ou non | +| insert | boolean | Indique si la plage source est insérée ou non | #### action = DragFillBlock -| Propriété | Type | Description | -| --------- | ----- | ------------------- | -| fillRange | objet | Range used for fill | - autoFillType|longint|Value used for the fill. - -- 0: Cells are filled with all data (values, formatting, and formulas) - - 1: Cells are filled with automatically sequential data - - 2: Cells are filled with formatting only - - 3: Cells are filled with values but not formatting - - 4: Values are removed from the cells - - 5: Cells are filled automatically| |fillDirection|longint|Direction of the fill. - - 0: The cells to the left are filled - - 1: The cells to the right are filled - - 2: The cells above are filled - - 3: The cells below are filled| - #### action = formulaChanged - - | Propriété | Type | Description | - | --------- | ----- | ------------------- | - | range | objet | Cell range | - | formula | Texte | The formula entered | - - - #### action = clipboardPasted - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Propriété - - Type - - Description -
      - range - - objet - - Cell range -
      - pasteOption - - entier long - - Specifies what is pasted from the clipboard: - -
    • - 0: Everything is pasted (values, formatting, and formulas)
    • - 1: Only values are pasted
    • - 2: Only the formatting is pasted
    • - 3: Only formulas are pasted
    • - 4: Values and formatting are pasted (not formulas)
    • - 5: Formulas and formatting are pasted (not values)
    • - pasteData - - objet - - The data from the clipboard to be pasted - -
    • - "text" (text): The text from the clipboard
    • - "html" (text): The HTML from the clipboard
    • - Exemple -

      -

      - Here is an example handling an On After Edit event: -

      -
       If(FORM Event.code=On After Edit)
      +| Propriété | Type   | Description                        |
      +| --------- | ------ | ---------------------------------- |
      +| fillRange | object | Plage utilisée pour le remplissage |
      + autoFillType|longint|Valeur utilisée pour le remplissage.
    • 0 : les cellules contiennent toutes les données (valeurs, formatage et formules)
    • 1 : les cellules contiennent des données automatiquement séquentielles
    • 2 : les cellules contiennent uniquement le formatage
    • 3 : les cellules contiennent des valeurs mais pas de formatage
    • 4 : les valeurs des cellules sont supprimées
    • 5: Les cellules sont remplies automatiquement| |fillDirection|longint|Direction du remplissage.
    • 0 : les cellules à gauche sont remplies
    • 1 : les cellules à droite sont remplies
    • 2 : Les cellules ci-dessus sont remplies
    • 3 : Les cellules ci-dessous sont remplies| + + +#### action = formulaChanged + +| Propriété | Type | Description | +| --------- | ------ | ----------------- | +| range | object | Plage de cellule | +| formula | Texte | La formule saisie | + +#### action = clipboardPasted + +| Propriété | Type | Description | +| ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| range | object | Plage de cellule | +| pasteOption | entier long | Indique ce qui est collé à partir du presse-papiers :
    • 0 : tout est collé (valeurs, mise en forme et formules)
    • 1 : seules les valeurs sont collées
    • 2 : seul le formatage est collé
    • 3 : seules les formules sont collées
    • 4 : les valeurs et la mise en forme sont collées (pas les formules)
    • 5 : Les formules et la mise en forme sont collées (pas les valeurs) | +| pasteData | object | Les données du presse-papiers à coller
    • "text" (texte) : le texte du presse-papiers
    • "html" (texte) : le code HTML du presse-papiers | + + +#### Exemple + +Voici un exemple qui gère l'événement `On After Edit` : + +```4d + If(FORM Event.code=On After Edit) If(FORM Event.action="valueChanged") ALERT("WARNING: You are currently changing the value\ from "+String(FORM Event.oldValue)+\ " to "+String(FORM Event.newValue)+"!") End if End if -
    • -

      - The above example could generate an event object like this: -

      -
      {
      +    End if
      + End if
      +    End if
      + End if
      +```
      +
      +L'exemple ci-dessus pourrait générer un objet événement tel que celui-ci :
      +
      +```
      +{
       
       "code":45;
       "description":"On After Edit";
      @@ -179,4 +117,4 @@ Depending on the `action` property value, the [event object](overview.md#event-o
       "oldValue":"The quick brown fox";
       "newValue":"jumped over the lazy dog";
       }
      -
      \ No newline at end of file +``` \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onAfterKeystroke.md b/website/translated_docs/fr/Events/onAfterKeystroke.md index f2ff5d07425a1b..6e85b2c6394e80 100644 --- a/website/translated_docs/fr/Events/onAfterKeystroke.md +++ b/website/translated_docs/fr/Events/onAfterKeystroke.md @@ -3,23 +3,39 @@ id: onAfterKeystroke title: Sue après frappe clavier --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| 28 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **including** this character. | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| 28 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | Un caractère est sur le point d'être saisi dans l'objet qui a le focus. `Get edited text` returns the object's text **including** this character. | + +
      Historique + +| Version | Modifications | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

      - The event is now triggered after IME validation | +

      ## Description -> The `On After Keystroke` event can generally be replaced by the [`On After Edit`](onAfterEdit.md) event (see below). +> L'événement `On After Keystroke` peut généralement être remplacé par l'événement On After Edit
      (voir ci-dessous). + +Après avoir sélectionné les propriétés d'événement [`On Before Keystroke`](onBeforeKeystroke.md) et `On After Keystroke` pour un objet, vous pouvez détecter et gérer les frappes au sein de l'objet, en utilisant la commande `FORM event` qui renverra `On Before Keystroke` puis `On After Keystroke` (pour plus d'informations, veuillez reportez-vous à la description de la commande `Get edited text`). + +> Ces événements sont également activés par des commandes de langage qui simulent une action utilisateur telle que `POST KEY`. + +L'événement `On After Keystroke` n'est pas généré : + +- dans la méthode [des colonnes de list box](FormObjects/listbox_overview.md#list-box-columns), sauf lorsqu'une cellule est en cours d'édition (cependant elle est générée dans tous les cas dans la méthode de [list box](FormObjects/listbox_overview.md)), +- lorsque les modifications utilisateur ne sont pas effectuées à l'aide du clavier (coller, glisser-déposer, case à cocher, liste déroulante, combo box). Pour traiter ces événements, vous devez utiliser [`On After Edit`](onAfterEdit.md). -After the [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` event properties are selected for an object, you can detect and handle the keystrokes within the object, using the `FORM event` command that will return `On Before Keystroke` and then `On After Keystroke` (for more information, please refer to the description of the `Get edited text` command). -These events are also activated by language commands that simulate a user action like `POST KEY`. +### Séquence de frappe -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +Lorsqu'une entrée nécessite une séquence de frappes clavier, les événements [`On Before Keystroke`](onBeforeKeystroke.md) et [`On After Keystroke event`] sont générés uniquement lorsque l'entrée est entièrement validée par l'utilisateur. La commande `Keystroke` retourne le caractère validé. Ce cas se produit principalement : -> The [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. +- lors de l'utilisation de touches "mortes" telles que ^ ou ~: les événements ne sont générés que lorsque le caractère étendu est éventuellement saisi (par exemple "ê" ou ñ), +- lorsqu'un IME (Input method editor) affiche une boîte de dialogue intermédiaire où l'utilisateur peut saisir une combinaison de caractères : les événements sont générés uniquement lorsque la boîte de dialogue IME est validée. -### See also +### Voir également [On Before Keystroke](onBeforeKeystroke.md). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onAfterSort.md b/website/translated_docs/fr/Events/onAfterSort.md index a95d8ae0a699dc..3d4eb0cb3e41c5 100644 --- a/website/translated_docs/fr/Events/onAfterSort.md +++ b/website/translated_docs/fr/Events/onAfterSort.md @@ -3,11 +3,11 @@ id: onAfterSort title: Sur après tri --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| 30 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A standard sort has just been carried out in a list box column. | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| 30 | [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Un tri standard vient d'être effectué dans une colonne de list box. | ## Description -This event is generated just after a standard sort is performed (*i.e.* it is NOT generated if $0 returns -1 in the [`On Header Click`](onHeaderClick.md) event). This mechanism is useful for storing the directions of the last sort performed by the user. In this event, the `Self` command returns a pointer to the variable of the sorted column header. \ No newline at end of file +Cet événement est généré juste après un tri standard (c'est-à-dire qu'il n'est PAS généré si $0 retourne -1 dans l'événement [`On Header Click`](onHeaderClick.md)). Ce mécanisme est utile pour stocker les directions du dernier tri effectué par l'utilisateur. Dans ce cas, la commande `Self` retourne un pointeur vers la variable de l'en-tête de colonne triée. diff --git a/website/translated_docs/fr/Events/onAlternativeClick.md b/website/translated_docs/fr/Events/onAlternativeClick.md index 418186c287c81a..b1aa8ef1985474 100644 --- a/website/translated_docs/fr/Events/onAlternativeClick.md +++ b/website/translated_docs/fr/Events/onAlternativeClick.md @@ -3,65 +3,28 @@ id: onAlternativeClick title: Sur clic alternatif --- - - - - - - - - - - - - - - -
      - Code - - Peut être appelé par - - Définition -
      - 38 - - Button - List Box - List Box Column - -
    • - Buttons: The "arrow" area of a button is clicked
    • - List boxes: In a column of an object array, an ellipsis button ("alternateButton" attribute) is clicked
    • - Description -

      -

      - Buttons -

      -

      - Some button styles can be linked to a pop-up menu and display an triangle. Clicking on this triangle causes a selection pop-up to appear that provides a set of alternative actions in relation to the primary button action. -

      -

      - 4D allows you to manage this type of button using the On Alternative Click event. This event is generated when the user clicks on the triangle (as soon as the mouse button is held down): -

      -
        -
      • - If the pop-up menu is separated,the event is only generated when a click occurs on the portion of the button with the arrow. -
      • -
      • - If the pop-up menu is linked, the event is generated when a click occurs on any part of the button. Note that the On Long Click event cannot be generated with this type of button. -
      • -
      -

      - -

      -

      - List box -

      -

      - This event is generated in columns of object array type list boxes, when the user clicks on a widget ellipsis button ("alternateButton" attribute). -

      -

      - -

      -

      - See the description of the "alternateButton" attribute. -

      \ No newline at end of file +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 38 | [Bouton](FormObjects/button_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) |
    • Boutons : la zone "flèche" d'un bouton est cliquée
    • List box : dans une colonne d'un tableau, un bouton de sélection (attribut "alternateButton") est cliqué | + + +## Description + +### Boutons + +Certains styles de boutons peuvent être [liés à un menu contextuel](FormObjects/properties_TextAndPicture.md#with-pop-up-menu) et afficher un triangle. En cliquant sur ce triangle, une fenêtre contextuelle de sélection apparait et fournit un ensemble d'actions alternatives en relation avec l'action du bouton principal. + +4D vous permet de gérer ce type de bouton à l'aide de l'événement `On Alternative Click`. Cet événement est généré lorsque l'utilisateur clique sur le triangle (dès que le bouton de la souris est maintenu enfoncé) : + +- Si le menu pop-up est **séparé**, l'événement n'est généré que lorsqu'un clic se produit sur la partie du bouton avec la flèche. +- Si le pop-up menu est **lié**, l'événement est généré lorsqu'un clic se produit sur n'importe quelle partie du bouton. A noter que l'événement [`On Long Click`](onLongClick.md) ne peut pas être généré avec ce type de bouton. + +![](assets/en/Events/clickevents.png) + +### List box + +Cet événement est généré dans des colonnes de [list box de type tableau objets](FormObjects/listbox_overview.md#object-arrays-in-columns-4d-view-pro), lorsque l'utilisateur clique sur un bouton de sélection de widget (attribut "AlternateButton"). + +![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + +Voir la [description de l'attribut "alternateButton"](FormObjects/listbox_overview.md#alternatebutton). diff --git a/website/translated_docs/fr/Events/onBeforeDataEntry.md b/website/translated_docs/fr/Events/onBeforeDataEntry.md index d39909a97c18c3..2fd4117a14eaf5 100644 --- a/website/translated_docs/fr/Events/onBeforeDataEntry.md +++ b/website/translated_docs/fr/Events/onBeforeDataEntry.md @@ -3,18 +3,18 @@ id: onBeforeDataEntry title: Sur avant saisie --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| 41 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box cell is about to change to editing mode | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | +| 41 | [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Une cellule de list box est sur le point de passer en mode d'édition | ## Description -This event is generated just before a cell in the list box is edited (before the entry cursor is displayed). This event allows the developer, for example, to display a different text depending on whether the user is in the display or edit mode. +Cet événement est généré juste avant la modification d'une cellule de list box (avant l'affichage du curseur d'entrée). Cet événement permet par exemple au développeur d'afficher un texte différent selon le mode de l'utilisateur (mode affichage ou mode édition). -When the cursor arrives in the cell, the `On Before Data Entry` event is generated in the list box or column method. +Lorsque le curseur arrive dans la cellule, l'événement `On Before Data Entry` est généré dans la list box ou la méthode de la colonne. -- 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. +- Si, dans le contexte de cet événement, $0 est défini sur -1, la cellule est considérée comme non saisissable. Si l'événement a été généré après avoir appuyé sur **Tab** ou **Maj+Tab**, le focus va respectivement à la cellule suivante ou à la précédente. +- Si la valeur de $0 n'est pas -1 (par défaut $0 est 0), la cellule est saisissable et passe en mode d'édition. -See also [Managing entry](FormObjects/listbox_overview.md#managing-entry) section. \ No newline at end of file +Voir également la section [Gestion des entrées](FormObjects/listbox_overview.md#managing-entry). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onBeforeKeystroke.md b/website/translated_docs/fr/Events/onBeforeKeystroke.md index d0eef5690b25df..eb9b5fcfa92be4 100644 --- a/website/translated_docs/fr/Events/onBeforeKeystroke.md +++ b/website/translated_docs/fr/Events/onBeforeKeystroke.md @@ -1,23 +1,45 @@ --- id: onBeforeKeystroke -title: Sue avant frappe clavier +title: Sur avant frappe clavier --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **without** this character. | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | Un caractère est sur le point d'être saisi dans l'objet qui a le focus. `Get edited text` retourne le texte de l'objet, **sans** ce caractère. | + +
      Historique + +| Version | Modifications | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

      - The event is now triggered after IME validation | +

      ## Description -After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) properties are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). +Après avoir sélectionné les événements `On Before Keystroke` et [`On After Keystroke event`](onAfterKeystroke.md) pour un objet, vous pouvez détecter et gérer les frappes au sein de l'objet, en utilisant la commande `Form event` qui retournera `On Before Keystroke` puis [`On After Keystroke`](onAfterKeystroke.md) (pour plus d'informations, veuillez vous reporter à la description de la commande `Get edited text`). Dans l'événement `On Before Keystroke`, la commande `FILTER KEYSTROKE` peut être utilisée pour filtrer les caractères typés. + +> Ces événements sont également activés par des commandes de langage qui simulent une action utilisateur telle que `POST KEY`. + +L'événement `On Before Keystroke` n'est pas généré : + +- dans une méthode [colonnes de list box](FormObjects/listbox_overview.md#list-box-columns), sauf lorsqu'une cellule est en cours d'édition (cependant elle est générée dans tous les cas dans la méthode de [list box](FormObjects/listbox_overview.md)), +- lorsque les modifications utilisateur ne sont pas effectuées à l'aide du clavier (coller, glisser-déposer, case à cocher, liste déroulante, combo box). Pour traiter ces événements, vous devez utiliser [`On After Edit`](onAfterEdit.md). + + +### Objets non saisissables + +L'événement `On Before Keystroke` peut être généré dans des objets non saisissables, par exemple dans une list box même si les cellules de la list box ne sont pas saisissables ou si les lignes ne peuvent pas être sélectionnées. Cela vous permet de créer des interfaces dans lesquelles l'utilisateur peut faire défiler dynamiquement jusqu'à une ligne spécifique dans une list box en saisissant les premières lettres d'une valeur. Dans le cas où les cellules de la list box sont saisissables, vous pouvez utiliser la commande `Is editing text` pour savoir si l'utilisateur saisit réellement du texte dans une cellule ou s'il utilise la fonction de saisie prédictive, puis exécutez le code approprié. + + +### Séquence de frappe -These events are also activated by language commands that simulate a user action like `POST KEY`. +Lorsqu'une entrée nécessite une séquence de frappes clavier, les événements ``On Before Keystroke[` et [`On After Keystroke](onAfterKeystroke.md)] sont générés uniquement lorsque la saisie est entièrement validée par l'utilisateur. La commande `Keystroke` retourne le caractère validé. Ce cas se produit principalement : -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +- lors de l'utilisation de touches "mortes" telles que ^ ou ~: les événements ne sont générés que lorsque le caractère étendu est éventuellement saisi (par exemple "ê" ou ñ), +- lorsqu'un IME (Input method editor) affiche une boîte de dialogue intermédiaire où l'utilisateur peut saisir une combinaison de caractères : les événements sont générés uniquement lorsque la boîte de dialogue IME est validée. -> The `On Before Keystroke` and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. -### See also +### Voir également [On After Keystroke](onAfterKeystroke.md). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onBeginDragOver.md b/website/translated_docs/fr/Events/onBeginDragOver.md index c5f7e7c7f60885..75fae33441b12e 100644 --- a/website/translated_docs/fr/Events/onBeginDragOver.md +++ b/website/translated_docs/fr/Events/onBeginDragOver.md @@ -3,24 +3,24 @@ id: onBeginDragOver title: Sur début survol --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | An object is being dragged | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | +| 17 | [Zone 4D WritePro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Un objet est en cours de déplacement | ## Description -The `On Begin Drag Over` form event can be selected for any form objects that can be dragged. It is generated in every case where the object has the [Draggable](FormObjects/properties_Action.md#draggable) property. It can be called from the method of the source object or the form method of the source object. +L'événement de formulaire `On Begin Drag Over` peut être sélectionné pour tous les objets formulaire pouvant être déplacés. Il est généré dans tous les cas où l'objet a la propriété [Draggable](FormObjects/properties_Action.md#draggable). Il peut être appelé à partir de la méthode de l'objet source ou de la méthode formulaire de l'objet source. -> Unlike the [`On Drag Over`](onDragOver.md) form event, `On Begin Drag Over` is called within the context of the **source object** of the drag action. +> Contrairement à l'événement de formulaire [`On Drag Over`](onDragOver.md), `On Begin Drag Over` est appelé dans le contexte de l'**objet source** de l'action de glisser. -The `On Begin Drag Over` event is useful for preparing of the drag action. It can be used to: +L'événement `On Begin Drag Over` est utile pour préparer l'action de glisser. Il peut être utilisé pour : -- Add data and signatures to the pasteboard (via the `APPEND DATA TO PASTEBOARD` command). -- Use a custom icon during the drag action (via the `SET DRAG ICON` command). -- Accept or refuse dragging via $0 in the method of the dragged object. - - To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute `$0:=0`. - - To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute `$0:=-1`. - - If no result is returned, 4D considers that drag actions are accepted. +- Ajouter des données et des signatures au conteneur (via la commande `APPEND DATA TO PASTEBOARD`). +- Utiliser une icône personnalisée pendant l'action de glissement (via la commande `SET DRAG ICON`). +- Accepter ou refuser le glissement via $0 dans la méthode de l'objet glissé. + - Pour indiquer que les actions de glissement sont acceptées, la méthode de l'objet source doit retourner 0 (zéro); vous devez donc exécuter `$0:=0`. + - Pour indiquer que les actions de glissement sont refusées, la méthode de l'objet source doit retourner -1 (moins un); vous devez donc exécuter `$0:=-1`. + - Si aucun résultat n'est retourné, 4D considère que les actions de glissement sont acceptées. -4D data are put in the pasteboard before calling the event. For example, in the case of dragging without the **Automatic Drag** action, the dragged text is already in the pasteboard when the event is called. \ No newline at end of file +Les données 4D sont placées dans le presse-papiers avant d'appeler l'événement. Par exemple, dans le cas d'un glissement sans l'action de **glissement automatique**, le texte glissé se trouve déjà dans le conteneur lorsque l'événement est appelé. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onBeginUrlLoading.md b/website/translated_docs/fr/Events/onBeginUrlLoading.md index 330a1a09e1fffb..f088f9602e1dc7 100644 --- a/website/translated_docs/fr/Events/onBeginUrlLoading.md +++ b/website/translated_docs/fr/Events/onBeginUrlLoading.md @@ -3,13 +3,13 @@ id: onBeginUrlLoading title: On Begin URL Loading --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | ----------------------------------- | -| 47 | [Zone Web](FormObjects/webArea_overview.md) | A new URL is loaded in the Web area | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | --------------------------------------------- | +| 47 | [Zone Web](FormObjects/webArea_overview.md) | Une nouvelle URL est chargée dans la zone Web | ## Description -This event is generated at the start of loading a new URL in the Web area. The `URL` variable associated with the Web area can be used to find out the URL being loaded. +Cet événement est généré au début du chargement d'une nouvelle URL dans la zone Web. La variable `URL` associée à la zone Web peut être utilisée pour connaître l'URL en cours de chargement. -> The URL being loaded is different from the [current URL](FormObjects/properties_WebArea.md#url-variable-and-wa-open-url-command) (refer to the description of the `WA Get current URL` command). \ No newline at end of file +> L'URL en cours de chargement est différente de [l'URL courante](FormObjects/properties_WebArea.md#url-variable-and-wa-open-url-command) (reportez-vous à la description de la commande `WA Get current URL`). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onBoundVariableChange.md b/website/translated_docs/fr/Events/onBoundVariableChange.md index 7d4928731a877c..6caced030c1a72 100644 --- a/website/translated_docs/fr/Events/onBoundVariableChange.md +++ b/website/translated_docs/fr/Events/onBoundVariableChange.md @@ -3,13 +3,13 @@ id: onBoundVariableChange title: On Bound Variable Change --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | ------------------------------------------- | -| 54 | Formulaire | The variable bound to a subform is modified | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | -------------------------------------------------- | +| 54 | Formulaire | La variable liée à un sous-formulaire est modifiée | ## Description -This event is generated in the context of the form method of a [subform](FormObjects/subform_overview.md) as soon as a value is assigned to the variable bound with the subform in the parent form (even if the same value is reassigned) and if the subform belongs to the current form page or to page 0. +Cet événement est généré dans le contexte de la méthode formulaire d'un [sous-formulaire](FormObjects/subform_overview.md) dès qu'une valeur est affectée à la variable liée au sous-formulaire du formulaire parent (même si la même valeur est réaffectée) et si le sous-formulaire appartient à la page formulaire courante ou à la page 0. -Form more information, refer to the [Managing the bound variable](FormObjects/subform_overview.md#managing-the-bound-variable) section. \ No newline at end of file +Pour plus d'informations, reportez-vous à la section [Gérer la variable liée](FormObjects/subform_overview.md#managing-the-bound-variable). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onClicked.md b/website/translated_docs/fr/Events/onClicked.md index abf23fea543315..d7ca10ff3f0776 100644 --- a/website/translated_docs/fr/Events/onClicked.md +++ b/website/translated_docs/fr/Events/onClicked.md @@ -3,45 +3,44 @@ id: onClicked title: Sur clic --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | -| 4 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A click occurred on an object | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | +| 4 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Un clic a été effectué sur un objet | ## Description -The `On Clicked` event is generated when the user clicks on an object. +L'événement `On Clicked` est généré lorsque l'utilisateur clique sur un objet. -> Some form objects can be activated with the keyboard. For example, once a check box gets the focus, it can be entered using the space bar. In such a case, the `On Clicked` event is still generated. +> Certains objets de formulaire peuvent être activés avec le clavier. Par exemple, une fois qu'une case à cocher obtient le focus, elle peut être saisie à l'aide de la barre d'espace. Dans ce cas, l'événement `On Clicked` est toujours généré. -The `On Clicked` event usually occurs once the mouse button is released. However, there are several exceptions: +L'événement `On Clicked` se produit généralement une fois que le bouton de la souris est relâché. Cependant, il existe plusieurs exceptions : -- [Invisible buttons](FormObjects/properties_Display.md#not-rendered): The `On Clicked` event occurs as soon as the click is made and does not wait for the mouse button to be released. -- [Rulers](FormObjects/ruler.md): If the [Execute object method](FormObjects/properties_Action.md#execute-object-method) option is set to **true**, the `On Clicked` event occurs as soon as the click is made. -- [Combo boxes](FormObjects/comboBox_overview.md): The `On Clicked` event occurs only if the user selects another value in the associated menu. A [combo box](FormObjects/comboBox_overview.md) must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the `On Before Keystroke`, `On After Keystroke` and `On Data Change` events. -- [Drop-down lists](FormObjects/dropdownList_Overview.md): The `On Clicked` event occurs only if the user selects another value in the menu. The `On Data Change` event allows you to detect the activation of the object when a value different from the current value is selected -- The `On Clicked` event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a list box [column](FormObjects/listbox_overview.md#list-box-columns) or [column header](FormObjects/listbox_overview.md#list-box-headers). +- [Boutons invisibles](FormObjects/properties_Display.md#not-rendered): l'événement `On Clicked` se produit dès que le clic est effectué et n'attend pas que le bouton de la souris soit relâché. +- [Règles](FormObjects/ruler.md) : si l'option de [méthode d'exécution d'objet](FormObjects/properties_Action.md#execute-object-method) est définie sur **true**, l'événement `On Clicked` se produit dès que le clic est effectué. +- [Combo box](FormObjects/comboBox_overview.md) : l'événement `On Clicked` se produit uniquement si l'utilisateur sélectionne une autre valeur dans le menu associé. Une [combo box](FormObjects/comboBox_overview.md) doit être traitée comme une zone de texte saisissable dont la liste déroulante associée fournit des valeurs par défaut. Par conséquent, vous gérez la saisie de données dans une combo box via les événements `On Before Keystroke`, `On After Keystroke` et `On Data Change`. +- [Listes déroulantes](FormObjects/dropdownList_Overview.md) : l'événement `On Clicked` se produit uniquement si l'utilisateur sélectionne une autre valeur dans le menu. L'événement `On Data Change` vous permet de détecter l'activation de l'objet lorsqu'une valeur différente de la valeur courante est sélectionnée +- Lorsqu'une cellule d'entrée de list box est [en cours d'édition](FormObjects/listbox_overview.md#managing-entry), l'événement `On Clicked` est généré lorsque le bouton de la souris est enfoncé, permettant d'utiliser la commande `Contextual click` par exemple. -In the context of an `On Clicked` event, you can test the number of clicks made by the user by means of the `Clickcount` command. +Dans le cas d'un événement `On Clicked`, vous pouvez tester le nombre de clics effectués par l'utilisateur à l'aide de la commande `Clickcount`. -### On Clicked and On Double Clicked +### On Clicked et On Double Clicked -After the `On Clicked` or [`On Double Clicked`](onDoubleClicked.md) object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns `On Clicked` or [`On Double Clicked`](onDoubleClicked.md), depending on the case. +Une fois que la propriété d'événement d'objet `On Clicked` ou [`On Double Clicked`](onDoubleClicked.md) est sélectionnée pour un objet, vous pouvez détecter et gérer les clics dans ou sur l'objet, à l'aide de la commande `FORM event` qui retourne `On Clicked` ou [`On Double Clicked`](onDoubleClicked.md), selon le cas. -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +Si les deux événements sont sélectionnés pour un objet, les événements `On Clicked` puis `On Double Clicked` seront générés lorsque l'utilisateur double-clique sur l'objet. ### 4D View Pro -This event is generated when the user clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| Propriété | Type | Description | -| ----------- | ----------- | ------------------------------ | -| code | entier long | Sur clic | -| description | Texte | "On Clicked" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | -| range | object | Cell range | +Cet événement est généré lorsque l'utilisateur clique n'importe où dans un document 4D View Pro. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : +| Propriété | Type | Description | +| ----------- | ----------- | -------------------------------- | +| code | entier long | Sur clic | +| description | Texte | "On Clicked" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellule | #### Exemple diff --git a/website/translated_docs/fr/Events/onCloseBox.md b/website/translated_docs/fr/Events/onCloseBox.md index 26e06b769281c3..db5106294e8e3c 100644 --- a/website/translated_docs/fr/Events/onCloseBox.md +++ b/website/translated_docs/fr/Events/onCloseBox.md @@ -3,27 +3,29 @@ id: onCloseBox title: On Close Box --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | --------------------------------------- | -| 22 | Formulaire | The window’s close box has been clicked | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ------------------------------------------------ | +| 22 | Formulaire | La case de fermeture de la fenêtre a été cliquée | ## Description -The `On Close Box` event is generated when the user clicks on the clos box of the window. +L'événement `On Close Box` est généré lorsque l'utilisateur clique sur la case fermeture de la fenêtre. ### Exemple -This example shows how to respond to a close window event with a form used for record data entry: +Cet exemple illustre comment vous pouvez répondre à un événement de fermeture de fenêtre à l'aide d'un formulaire utilisé pour la saisie de données d'enregistrement : ```4d - //Method for an input form + //Méthode pour un formulaire d'entrée $vpFormTable:=Current form table Case of //... :(Form event code=On Close Box) If(Modified record($vpFormTable->)) CONFIRM("This record has been modified. Save Changes?") + Save Changes?") + Save Changes?") If(OK=1) ACCEPT Else @@ -33,5 +35,6 @@ This example shows how to respond to a close window event with a form used for r CANCEL End if //... + //déclaration(s) End case ``` \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onCloseDetail.md b/website/translated_docs/fr/Events/onCloseDetail.md index 332ea794ffddad..9549faab7cdab2 100644 --- a/website/translated_docs/fr/Events/onCloseDetail.md +++ b/website/translated_docs/fr/Events/onCloseDetail.md @@ -3,14 +3,15 @@ id: onCloseDetail title: Sur fermeture corps --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------- | -------------------------------------------------------------- | -| 26 | Form - [List Box](FormObjects/listbox_overview.md) | You left the detail form and are going back to the output form | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------- | --------------------------------------------------------------------------------- | +| 26 | Formulaire - [List Box](FormObjects/listbox_overview.md) | Vous avez quitté le formulaire détaillé et vous retournez au formulaire de sortie | ## Description -The `On Close Detail` event can be used in the following contexts: +L'événement `On Close Detail` peut être utilisé dans les contextes suivants : + +- **Formulaires de sortie** : le formulaire détaillé est fermé et l'utilisateur retourne au formulaire liste. Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. +- List box [**de type sélection**](FormObjects/listbox_overview.md#selection-list-boxes) : Cet événement est généré lorsqu'un enregistrement affiché dans le [formulaire détaillé](FormObjects/properties_ListBox.md#detail-form-name) associé à une list box de type sélection est sur le point d'être fermé (que l'enregistrement ait été modifié ou non). -- **Output forms**: the detail form is closed and the user goes back to the list form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record displayed in the [detail form](FormObjects/properties_ListBox.md#detail-form-name) associated with a selection type list box is about to be closed (regardless of whether or not the record was modified). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onCollapse.md b/website/translated_docs/fr/Events/onCollapse.md index 4148d551948a55..38425294a64a06 100644 --- a/website/translated_docs/fr/Events/onCollapse.md +++ b/website/translated_docs/fr/Events/onCollapse.md @@ -3,16 +3,16 @@ id: onCollapse title: Sur contracter --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been collapsed using a click or a keystroke | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| 44 | [Liste hiérarchique](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | Un élément de la liste hiérarchique ou de la list box hiérarchique a été réduit à l'aide d'un clic ou d'une touche du clavier | ## Description -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is collapsed with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is collapsed. +- [Liste hiérarchique](FormObjects/list_overview.md) : Cet événement est généré chaque fois qu'un élément de la liste hiérarchique est réduit via un clic de souris ou une touche du clavier. +- [List box hiérarchiques](FormObjects/listbox_overview.md#hierarchical-list-boxes) : Cet événement est généré lorsqu'une ligne de la list box hiérarchique est réduite. -### See also +### Voir également [Sur déployer](onExpand.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onColumnMoved.md b/website/translated_docs/fr/Events/onColumnMoved.md index 532bb928736900..6b72ccc42c496a 100644 --- a/website/translated_docs/fr/Events/onColumnMoved.md +++ b/website/translated_docs/fr/Events/onColumnMoved.md @@ -3,13 +3,13 @@ id: onColumnMoved title: Sur déplacement colonne --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| 32 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box column is moved by the user via drag and drop | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| 32 | [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Une colonne de list box est déplacée par l'utilisateur par glisser-déposer | ## Description -This event is generated when a column of the list box is moved by the user using drag and drop ([if allowed](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). It is not generated if the column is dragged and then dropped in its initial location. +Cet événement est généré lorsqu'une colonne de list box est déplacée par l'utilisateur à l'aide du glisser-déposer ([s'il est autorisé](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). Il n'est pas généré si la colonne est glissée puis déposée à son emplacement initial. -The `LISTBOX MOVED COLUMN NUMBER` command returns the new position of the column. \ No newline at end of file +La commande `LISTBOX MOVED COLUMN NUMBER` retourne la nouvelle position de la colonne. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onColumnResize.md b/website/translated_docs/fr/Events/onColumnResize.md index 054f56c189fb30..fa02b934159949 100644 --- a/website/translated_docs/fr/Events/onColumnResize.md +++ b/website/translated_docs/fr/Events/onColumnResize.md @@ -3,32 +3,31 @@ id: onColumnResize title: Sur redimensionnement colonne --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| 33 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | The width of a column is modified directly by the user or consequently to a form window resize | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| 33 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | La largeur d'une colonne est modifiée directement par l'utilisateur ou à la suite d'un redimensionnement de la fenêtre de formulaire | ## Description ### List Box -This event is generated when the width of a column in the list box is modified by a user. The event is triggered "live", *i.e.*, sent continuously during the event, for as long as the list box or column concerned is being resized. This resizing is performed manually by a user, or may occur as a result of the list box and its column(s) being resized along with the form window itself (whether the form is resized manually or using the `RESIZE FORM WINDOW` command). +Cet événement est généré lorsque la largeur d'une colonne dans la list box est modifiée par un utilisateur. L'événement est déclenché "en direct", c'est-à-dire envoyé en continu pendant l'événement, tant que la list box ou la colonne concernée est redimensionnée. Ce redimensionnement s'effectue manuellement par un utilisateur, ou peut se produire suite au redimensionnement de la list box et de ses colonnes avec la fenêtre de formulaire elle-même (que le formulaire soit redimensionné manuellement ou à l'aide de la commande `RESIZE FORM WINDOW`). -> The `On Column Resize` event is not triggered when a [fake column](FormObjects/propertiesResizingOptions.html#about-the-fake-blank-column) is resized. +> L'événement `On Column Resize` n'est pas déclenché lorsqu'une [fausse colonne](FormObjects/propertiesResizingOptions.html#about-the-fake-blank-column) est redimensionnée. ### 4D View Pro -This event is generated when the width of a column is modified by a user. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| Propriété | Type | Description | -| ----------- | ----------- | ------------------------------------------------------------------- | -| code | entier long | Sur redimensionnement colonne | -| description | Texte | "On Column Resize" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | -| range | object | Cell range of the columns whose widths have changed | -| header | boolean | True if the row header column (first column) is resized, else false | +Cet événement est généré lorsque la largeur d'une colonne est modifiée par un utilisateur. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : +| Propriété | Type | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------ | +| code | entier long | Sur redimensionnement colonne | +| description | Texte | "On Column Resize" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellules des colonnes dont les largeurs ont changé | +| header | boolean | "True" si la colonne d'en-tête de ligne (première colonne) est redimensionnée, sinon false | #### Exemple diff --git a/website/translated_docs/fr/Events/onDataChange.md b/website/translated_docs/fr/Events/onDataChange.md index 8e1380b3e29110..66cf6f3f4cbe3c 100644 --- a/website/translated_docs/fr/Events/onDataChange.md +++ b/website/translated_docs/fr/Events/onDataChange.md @@ -3,15 +3,16 @@ id: onDataChange title: Sur données modifiées --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| 20 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) | An object data has been modified | +| Code | Peut être appelé par | Définition | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| 20 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Zone de Plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Règle](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) | Une donnée a été modifiée | ## Description -When the `On Data Change` event property is selected for an object, you can detect and handle the change of the data source value, using the `FORM Event` command. +Lorsque la propriété d'événement `On Data Change` est sélectionnée pour un objet, vous pouvez détecter et gérer la modification de la valeur de la source de données à l'aide de la commande `FORM Event`. -The event is generated as soon as the variable associated with the object is updated internally by 4D (i.e., in general, when the entry area of the object loses the focus). +L'événement est généré dès que la variable associée à l'objet est mise à jour en interne par 4D (c'est-à-dire, en général, lorsque la zone de saisie de l'objet perd le focus). + +> Avec les [sous-formulaires](FormObjects/subform_overview.md), l'événement `On Data Change` est déclenché lorsque la valeur de la variable de l'objet sous-formulaire a été modifiée. -> With [subforms](FormObjects/subform_overview.md), the `On Data Change` event is triggered when the value of the variable of the subform object has been modified. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onDeactivate.md b/website/translated_docs/fr/Events/onDeactivate.md index fce050f5282cbd..65e184cfca04a9 100644 --- a/website/translated_docs/fr/Events/onDeactivate.md +++ b/website/translated_docs/fr/Events/onDeactivate.md @@ -3,17 +3,16 @@ id: onDeactivate title: On Deactivate --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | --------------------------------------------------- | -| 12 | Formulaire | The form’s window ceases to be the frontmost window | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ------------------------------------------------------- | +| 12 | Formulaire | La fenêtre du formulaire cesse d'être la fenêtre active | ## Description -If the window of a form was the frontmost window, this event is called when the window is sent to the background. +Si la fenêtre d'un formulaire était la fenêtre de premier plan, cet événement est appelé lorsque la fenêtre est envoyée en arrière-plan. -Cet événement s'applique au formulaire dans son ensemble et non à un objet particulier. Consequently, if the `On Deactivate` form event property is selected, only the form will have its form method called. - -### See also +Cet événement s'applique au formulaire dans son ensemble et non à un objet particulier. Par conséquent, si la propriété de l'événement formulaire `On Deactivate` est sélectionnée, seul le formulaire verra sa méthode formulaire appelée. +### Voir également [Sur activation](onActivate.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onDeleteAction.md b/website/translated_docs/fr/Events/onDeleteAction.md index 7b738d8795b385..98c84530381b8d 100644 --- a/website/translated_docs/fr/Events/onDeleteAction.md +++ b/website/translated_docs/fr/Events/onDeleteAction.md @@ -3,13 +3,13 @@ id: onDeleteAction title: Sur action suppression --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------- | ----------------------------------- | -| 58 | [Hierarchical List](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) | The user attempts to delete an item | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------ | ------------------------------------------- | +| 58 | [Liste hiérarchique](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) | L'utilisateur tente de supprimer un élément | ## Description -This event is generated each time a user attempts to delete the selected item(s) by pressing a deletion key (**Delete** or **Backspace**) or selecting a menu item whose associated standard action is 'Clear' (such as the **Clear** command in the **Edit** menu). +Cet événement est généré chaque fois qu'un utilisateur tente de supprimer le ou les éléments sélectionnés en appuyant sur une touche de suppression (**Supprimer** ou **Retour en arrière**) ou en sélectionnant un élément de menu dont l'action standard associée est 'Effacer' (telle que la commande **Effacer** dans le menu **Edition**). -Note that generating the event is the only action carried out by 4D: the program does not delete any items. It is up to the developer to handle the deletion and any prior warning messages that are displayed. \ No newline at end of file +A noter que la génération de l'événement est la seule action réalisée par 4D : le programme ne supprime aucun élément. Il appartient au développeur de gérer la suppression et tous les messages d'avertissement précédents qui sont affichés. diff --git a/website/translated_docs/fr/Events/onDisplayDetail.md b/website/translated_docs/fr/Events/onDisplayDetail.md index f48a60ebb75b0c..898a318b116063 100644 --- a/website/translated_docs/fr/Events/onDisplayDetail.md +++ b/website/translated_docs/fr/Events/onDisplayDetail.md @@ -3,36 +3,38 @@ id: onDisplayDetail title: Sur affichage corps --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| 8 | Form - [List Box](FormObjects/listbox_overview.md) | A record is about to be displayed in a list form or a row is about to be displayed in a list box. | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| 8 | Formulaire - [List Box](FormObjects/listbox_overview.md) | Un enregistrement est sur le point d'être affiché dans un formulaire liste ou bien une ligne est sur le point d'être affichée dans une list box. | ## Description -The `On Display Detail` event can be used in the following contexts: +L'événement `On Display Detail` peut être utilisé dans les contextes suivants : -### Output form +### Formulaire de sortie -A record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +Un enregistrement est sur le point d'être affiché sous forme de liste affichée via `DISPLAY SELECTION` et `MODIFY SELECTION`. -> This event cannot be selected for project forms, it is only available with **table forms**. +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. -In this context, the following sequence of calls to methods and form events is triggered: +Dans ce contexte, la séquence d'appels de méthodes et d'événements de formulaire suivante est déclenchée : -- For each record: - - For each object in the detail area: - - Object method with `On Display Detail` event - - Form method with `On Display Detail` event +- Pour chaque enregistrement : + - Pour chaque objet de la zone détaillée : + - Méthode objet avec l'événement `On Display Detail` + - Méthode formulaire avec l'événement `On Display Detail` -> The header area is handled using the [`On Header`](onHeader.md) event. +> La zone d'en-tête est gérée à l'aide de l'événement [`On Header`](onHeader.md). + +L'appel d'une commande 4D qui affiche une boîte de dialogue à partir de l'événement `On Display Detail` n'est pas autorisé et générera une erreur de syntaxe. Plus particulièrement, les commandes concernées sont : `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, et `MODIFY SELECTION`. -Calling a 4D command that displays a dialog box from the `On Display Detail` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. ### Liste box sélection -This event is generated when a row of a [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes) list box is displayed. +Cet événement est généré lorsqu'une ligne de list box [**de type sélection**](FormObjects/listbox_overview.md#selection-list-boxes) est affichée. + -### Displayed line number +### Numéro de ligne affiché -The `Displayed line number` 4D command works with the `On Display Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +La commande 4D `Displayed line number` fonctionne avec l'événement formulaire `On Display Detail`. Elle retourne le numéro de la ligne en cours de traitement tandis qu'une liste d'enregistrements ou de lignes de list box s'affiche à l'écran. diff --git a/website/translated_docs/fr/Events/onDoubleClicked.md b/website/translated_docs/fr/Events/onDoubleClicked.md index 1a174194b7d5c5..01057ecc843bbb 100644 --- a/website/translated_docs/fr/Events/onDoubleClicked.md +++ b/website/translated_docs/fr/Events/onDoubleClicked.md @@ -3,31 +3,30 @@ id: onDoubleClicked title: Sur double clic --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | -| 13 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A double click occurred on an object | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | +| 13 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Un double-clic a été effectué sur un objet | ## Description -The `On Double Clicked` event is generated when the user double-clicks on an object. The maximum length of time separating a double-click is defined in the system preferences. +L'événement `On Double Clicked` est généré lorsque l'utilisateur double-clique sur un objet. La durée maximale séparant un double-clic est définie dans les préférences système. -If the [`On Clicked`](onClicked.md) or `On Double Clicked` onDoubleClicked.md object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns [`On Clicked`](onClicked.md) or `On Double Clicked`, depending on the case. +Si la propriété [`On Clicked`](onClicked.md) ou `On Double Clicked` d'événement d'objet de onDoubleClicked.md est sélectionnée pour un objet, vous pouvez détecter et gérer les clics dans ou sur l'objet, à l'aide de la commande `FORM event` qui retoure [`On Clicked`](onClicked.md) ou `On Double Clicked`, selon le cas. -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +Si les deux événements sont sélectionnés pour un objet, les événements `On Clicked` puis `On Double Clicked` seront générés lorsque l'utilisateur double-clique sur l'objet. ### 4D View Pro -This event is generated when the user doubl-clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| Propriété | Type | Description | -| ----------- | ----------- | ------------------------------ | -| code | entier long | 13 | -| description | Texte | "On Double Clicked" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | -| range | object | Cell range | +Cet événement est généré lorsque l'utilisateur double-clique n'importe où dans un document 4D View Pro. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : +| Propriété | Type | Description | +| ----------- | ----------- | -------------------------------- | +| code | entier long | 13 | +| description | Texte | "On Double Clicked" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellule | #### Exemple diff --git a/website/translated_docs/fr/Events/onDragOver.md b/website/translated_docs/fr/Events/onDragOver.md index 1f8bcc727421ff..25c3cab8926a6f 100644 --- a/website/translated_docs/fr/Events/onDragOver.md +++ b/website/translated_docs/fr/Events/onDragOver.md @@ -3,28 +3,28 @@ id: onDragOver title: Sur glisser --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 21 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data could be dropped onto an object | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | +| 21 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) -[List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Les données peuvent être déposées sur un objet | ## Description -The `On Drag Over` event is repeatedly sent to the destination object when the mouse pointer is moved over the object. In response to this event, you usually: +L'événement `On Drag Over` est envoyé à plusieurs reprises à l'objet de destination lorsque le pointeur de la souris est déplacé sur l'objet. Généralement, en réponse à cet événement : -- Get the data and signatures found in the pasteboard (via the `GET PASTEBOARD DATA` command). -- Depending on the nature and type of data in the pasteboard, you **accept** or **reject** the drag and drop. +- Vous récupérez les données et les signatures présentes dans le conteneur (via la commande `GET PASTEBOARD DATA`). +- En fonction de la nature et du type de données dans le conteneur, vous acceptez ou refusez le glisser-déposer. -To **accept** the drag, the destination object method must return 0 (zero), so you write `$0:=0`. To **reject** the drag, the object method must return -1 (minus one), so you write `$0:=-1`. During an `On Drag Over` event, 4D treats the object method as a function. If no result is returned, 4D assumes that the drag is accepted. +Pour **accepter** le glissement, la méthode de l'objet de destination doit retourner 0 (zéro), vous devez donc écrire `$0:=0`. Pour **rejeter** le glissement, la méthode de l'objet de destination doit retourner 0 (zéro), vous devez donc écrire `$0:=-1`. Lors d'un événement `On Drag Over`, 4D traite la méthode objet comme une fonction. Si aucun résultat n'est retourné, 4D suppose que le glissement est accepté. -If you accept the drag, the destination object is highlighted. If you reject the drag, the destination is not highlighted. Accepting the drag does not mean that the dragged data is going to be inserted into the destination object. It only means that if the mouse button was released at this point, the destination object would accept the dragged data and the [`On Drop`](onDrop.md) event would be fired. +Si vous acceptez le glissement, l'objet de destination est mis en surbrillance. Si vous refusez le glissement, la destination n'est pas mise en surbrillance. Accepter le glissement ne signifie pas que les données déplacées vont être insérées dans l'objet de destination. Cela signifie seulement que si le bouton de la souris était relâché à ce stade, l'objet de destination accepterait les données glissées et l'événement [`On Drop`](onDrop.md) serait déclenché. -If you do not process the `On Drag Over` event for a droppable object, that object will be highlighted for all drag over operations, no matter what the nature and type of the dragged data. +Si vous ne traitez pas l'événement `On Drag Over` pour un objet déposable, cet objet sera mis en surbrillance pour toutes les opérations de glissement, quels que soient la nature et le type des données déplacées. -The `On Drag Over` event is the means by which you control the first phase of a drag-and-drop operation. Not only can you test whether the dragged data is of a type compatible with the destination object, and then accept or reject the drag; you can simultaneously notify the user of this fact, because 4D highlights (or not) the destination object, based on your decision. +L'événement `On Drag Over` est le moyen par lequel vous contrôlez la première phase d'une opération de glisser-déposer. Vous pouvez non seulement tester si les données déplacées sont d'un type compatible avec l'objet de destination, puis accepter ou rejeter le glissement; vous pouvez simultanément avertir l'utilisateur de ce fait, car 4D met en évidence (ou non) l'objet de destination, en fonction de votre décision. -The code handling an `On Drag Over` event should be short and execute quickly, because that event is sent repeatedly to the current destination object, due to the movements of the mouse. +Le code gérant un événement `On Drag Over` doit être court et s'exécuter rapidement, car cet événement est envoyé à plusieurs reprises à l'objet de destination courant, en raison des mouvements de la souris. -#### See also +#### Voir également [`Sur début survol`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onDrop.md b/website/translated_docs/fr/Events/onDrop.md index e33f7a1f183946..ca213dfd8e2d93 100644 --- a/website/translated_docs/fr/Events/onDrop.md +++ b/website/translated_docs/fr/Events/onDrop.md @@ -3,17 +3,18 @@ id: onDrop title: Sur déposer --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 16 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data has been dropped onto an object | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | +| 16 | [Zone 4D WritePro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Les données ont été déposées sur un objet | ## Description -The `On Drop` event is sent once to the destination object when the mouse pointer is released over the object. This event is the second phase of the drag-and-drop operation, in which you perform an operation in response to the user action. +L'événement `On Drop` est envoyé une fois à l'objet de destination lorsque le pointeur de la souris est relâché sur l'objet. Cet événement est la deuxième phase de l'opération de glisser-déposer, où l'opération que vous réalisez est en réponse à l'action de l'utilisateur. -This event is not sent to the object if the drag was not accepted during the [`On Drag Over`](onDragOver.md) events. If you process the `On Drag Over` event for an object and reject a drag, the `On Drop` event does not occur. Thus, if during the `On Drag Over` event you have tested the data type compatibility between the source and destination objects and have accepted a possible drop, you do not need to re-test the data during the `On Drop`. You already know that the data is suitable for the destination object. +Cet événement n'est pas envoyé à l'objet si le glissement n'a pas été accepté lors des événements [`On Drag Over`](onDragOver.md). Si vous traitez l'événement `On Drag Over` pour un objet et rejetez un glissement, l'événement `On Drop` ne se produit pas. Ainsi, si lors de l'événement `On Drag Over` vous avez testé la compatibilité des types de données entre les objets source et destination, et si vous avez accepté un éventuel dépôt, vous n'avez pas besoin de re-tester les données pendant l'événement `On Drop`. Vous savez déjà que les données sont adaptées à l'objet de destination. -#### See also + +#### Voir également [`Sur début survol`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onEndUrlLoading.md b/website/translated_docs/fr/Events/onEndUrlLoading.md index e9fea43b92e87a..8a649d489de79c 100644 --- a/website/translated_docs/fr/Events/onEndUrlLoading.md +++ b/website/translated_docs/fr/Events/onEndUrlLoading.md @@ -3,11 +3,11 @@ id: onEndUrlLoading title: On End URL Loading --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | --------------------------------------------- | -| 49 | [Zone Web](FormObjects/webArea_overview.md) | All the resources of the URL have been loaded | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | ----------------------------------------------- | +| 49 | [Zone Web](FormObjects/webArea_overview.md) | Toutes les ressources de l'URL ont été chargées | ## Description -This event is generated once the loading of all resources of the URL is complete. You can call the `WA Get current URL` command in order to find out the URL that was loaded. \ No newline at end of file +Cet événement est généré une fois que le chargement de toutes les ressources de l'URL est terminé. Vous pouvez appeler la commande `WA Get current URL` afin d'obtenir l'URL chargée. diff --git a/website/translated_docs/fr/Events/onExpand.md b/website/translated_docs/fr/Events/onExpand.md index 3fc1f228f635ef..841681f3dcae11 100644 --- a/website/translated_docs/fr/Events/onExpand.md +++ b/website/translated_docs/fr/Events/onExpand.md @@ -3,16 +3,16 @@ id: onExpand title: Sur déployer --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been expanded using a click or a keystroke | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| 44 | [Liste hiérarchique](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | Un élément de la liste hiérarchique ou de la list box hiérarchique a été développé à l'aide d'un clic ou d'une touche | ## Description -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is expanded with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is expanded. +- [Liste hiérarchique](FormObjects/list_overview.md) : Cet événement est généré chaque fois qu'un élément de la liste hiérarchique est étendu via un clic de souris ou une touche du clavier. +- [List box hiérarchiques](FormObjects/listbox_overview.md#hierarchical-list-boxes) : Cet événement est généré lorsqu'une ligne de la list box hiérarchique est étendue. -### See also +### Voir également [Sur contracter](onCollapse.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onFooterClick.md b/website/translated_docs/fr/Events/onFooterClick.md index 15ffd7db33306c..0b6e213d40d4c6 100644 --- a/website/translated_docs/fr/Events/onFooterClick.md +++ b/website/translated_docs/fr/Events/onFooterClick.md @@ -3,13 +3,13 @@ id: onFooterClick title: Sur clic pied --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| 57 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in the footer of a list box column | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| 57 | [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Un clic se produit dans le pied de page d'une colonne de list box | ## Description -This event is available for a list box or list box column object. It is generated when a click occurs in the footer of a list box column. In this context, the `OBJECT Get pointer` command returns a pointer to the variable of the footer that is clicked. The event is generated for both left and right clicks. +Cet événement est disponible pour un objet list box ou colonne de list box. Il est généré lorsqu'un clic se produit dans le pied de page d'une colonne de list box. Dans ce contexte, la commande `OBJECT Get pointer` retourne un pointeur vers la variable du pied de page sur lequel l'utilisateur a cliqué. L'événement est généré pour les clics gauche et droit. -You can test the number of clicks made by the user by means of the `Clickcount` command. \ No newline at end of file +Vous pouvez tester le nombre de clics effectués par l'utilisateur à l'aide de la commande `Clickcount`. diff --git a/website/translated_docs/fr/Events/onGettingFocus.md b/website/translated_docs/fr/Events/onGettingFocus.md index affcb0299c76f9..ed4c6ebc019146 100644 --- a/website/translated_docs/fr/Events/onGettingFocus.md +++ b/website/translated_docs/fr/Events/onGettingFocus.md @@ -3,13 +3,13 @@ id: onGettingFocus title: On getting focus --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| 15 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is getting the focus | +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | +| 15 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Zone de Plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton Radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) - [Zone Web](FormObjects/webArea_overview.md) | Un objet formulaire reçoit le focus | ## Description -The `On Getting Focus` event, along with the [`On losing Focus`](onLosingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +Les événements `On Getting Focus` et [`On loss Focus`](onLosingFocus.md) permettent de détecter et de gérer le changement de focus pour les objets [focalisables](FormObjects/properties_Entry.md#focusable). -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +Avec les [objets sous-formulaire](FormObjects/subform_overview.md), cet événement est généré dans la méthode de l'objet sous-formulaire lorsqu'il est vérifié. Il est envoyé à la méthode formulaire du sous-formulaire, ce qui signifie, par exemple, que vous pouvez gérer l'affichage des boutons de navigation dans le sous-formulaire en fonction du focus. A noter que les objets de sous-formulaire peuvent eux-mêmes avoir le focus. diff --git a/website/translated_docs/fr/Events/onHeader.md b/website/translated_docs/fr/Events/onHeader.md index 6ecc7ffca343b3..ea51720d5605af 100644 --- a/website/translated_docs/fr/Events/onHeader.md +++ b/website/translated_docs/fr/Events/onHeader.md @@ -3,23 +3,23 @@ id: onHeader title: Sur entête --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| 5 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form (list form only) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form's header area is about to be printed or displayed. | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| 5 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire (formulaire liste uniquement) - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | La zone d'en-tête du formulaire est sur le point d'être imprimée ou affichée. | ## Description -The `On Header` event is called when a record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +L'événement `On Header` est appelé lorsqu'un enregistrement est sur le point d'être affiché dans un formulaire liste affiché via `DISPLAY SELECTION` et `MODIFY SELECTION`. -> This event cannot be selected for project forms, it is only available with **table forms**. +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. -In this context, the following sequence of calls to methods and form events is triggered: +Dans ce contexte, la séquence d'appels de méthodes et d'événements de formulaire suivante est déclenchée : -- For each object in the header area: - - Object method with `On Header` event - - Form method with `On Header` event +- Pour chaque objet de la zone d'en-tête : + - Méthode objet avec l'événement `On Header` + - Méthode formulaire avec l'événement `On Header` -> Printed records are handled using the [`On Display Detail`](onDisplayDetail.md) event. +> Les enregistrements imprimés sont gérés à l'aide de l'événement [`On Display Detail`](onDisplayDetail.md). -Calling a 4D command that displays a dialog box from the `On Header` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. \ No newline at end of file +L'appel d'une commande 4D qui affiche une boîte de dialogue à partir de l'événement `On Header` n'est pas autorisé et générera une erreur de syntaxe. Plus particulièrement, les commandes concernées sont : `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, et `MODIFY SELECTION`. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onHeaderClick.md b/website/translated_docs/fr/Events/onHeaderClick.md index 6bc1befc0fc895..81b00a72cb0b57 100644 --- a/website/translated_docs/fr/Events/onHeaderClick.md +++ b/website/translated_docs/fr/Events/onHeaderClick.md @@ -3,141 +3,36 @@ id: onHeaderClick title: Sur clic entête --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 42 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in a column header | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | +| 42 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Un clic se produit dans un en-tête de colonne | ## Description ### List Box -This event is generated when a click occurs on the header of a column in the list box. In this case, the `Self` command lets you find out the header of the column that was clicked. +Cet événement est généré lorsqu'un clic se produit sur l'en-tête d'une colonne de list box. Dans ce cas, la commande `Self` vous permet d'identifier l'en-tête de la colonne sur laquelle vous avez cliqué. -> The [`On Clicked`](onClicked.md) event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a column or column header. You can test the number of clicks made by the user by means of the `Clickcount` command. +Si la propriété [Sortable](FormObjects/properties_Action.md#sortable) a été sélectionnée pour la list box, vous pouvez décider d'autoriser ou non un tri standard de la colonne en passant la valeur 0 ou -1 dans la variable `$0` : -If the [Sortable](FormObjects/properties_Action.md#sortable) property was selected for the list box, you can decide whether or not to authorize a standard sort of the column by passing the value 0 or -1 in the `$0` variable: +- Si `$0` est égal à 0, un tri standard est effectué. +- Si `$0` est égal à -1, un tri standard n'est pas effectué et l'en-tête n'affiche pas la flèche de tri. Le développeur peut toujours générer un tri de colonne basé sur des critères de tri personnalisés à l'aide du langage 4D. -- If `$0` equals 0, a standard sort is performed. -- If `$0` equals -1, a standard sort is not performed and the header does not display the sort arrow. The developer can still generate a column sort based on customized sort criteria using the 4D language. - -If the [Sortable](FormObjects/properties_Action.md#sortable) property is not selected for the list box, the `$0` variable is not used. +Si la propriété [Sortable](FormObjects/properties_Action.md#sortable) n'est pas sélectionnée pour la list box, la variable `$0` n'est pas utilisée. ### 4D View Pro -This event is generated when the user clicks on a column or row header in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +Cet événement est généré lorsque l'utilisateur clique sur un en-tête de colonne ou de ligne dans un document 4D View Pro. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - Propriété - - Type - - Description -
      - code - - entier long - - 42 -
      - description - - Texte - - "On Header Click" -
      - objectName - - Texte - - 4D View Pro area name -
      - sheetName - - Texte - - Name of the sheet of the event -
      - range - - object - - Cell range -
      - sheetArea - - entier long - - The sheet location where the event took place:
      - -
    • - 0: The crossing area between column number/letter headers (top left of the sheet) -
    • - -
    • - 1: The column headers (area indicating the column numbers/letters) -
    • - -
    • - 2: The row headers (area indicating the row numbers) -
    • -
      +| Propriété | Type | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| code | entier long | 42 | +| description | Texte | "On Header Click" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellule | +| sheetArea | entier long | L'emplacement de la feuille où l'événement a eu lieu :
    • 0 : la zone de croisement entre le numéro de colonne/les en-têtes de lettre (en haut à gauche de la feuille)
    • 1 : les en-têtes de colonne (zone indiquant les numéros/lettres de colonnes)
    • 2 : les en-têtes de ligne (zone indiquant les numéros de ligne)
    • | #### Exemple diff --git a/website/translated_docs/fr/Events/onLoad.md b/website/translated_docs/fr/Events/onLoad.md index fdaffc9f53ee3a..27cd62cb9f05bc 100644 --- a/website/translated_docs/fr/Events/onLoad.md +++ b/website/translated_docs/fr/Events/onLoad.md @@ -1,25 +1,27 @@ --- id: onLoad -title: Sur chargement +title: On Load --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -| 1 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be displayed or printed | +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | +| 1 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) -[List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) - [Onglet](FormObjects/tabControl.md) - [Zone Web](FormObjects/webArea_overview.md) | Le formulaire est sur le point d'être affiché ou imprimé | ## Description -This event is triggered when the form is being loaded or printed. +Cet événement est déclenché lorsque le formulaire est en cours de chargement ou d'impression. -All the objects of the form (from any page) whose `On Load` object event property is selected will have their object method called. Then, if the `On Load` form event property is selected, the form will have its form method called. +Tous les objets du formulaire (de n'importe quelle page) dont la propriété d'événement `On Load` est sélectionnée verront leur méthode objet appelée. Ensuite, si la propriété d'événement formulaire `On Load` est sélectionnée, la méthode formulaire sera appelée. -> The `On Load` and [`On Unload`](onUnload.md) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> Les événements `On Load` et [`On Unload`](onUnload.md) sont générés pour les objets s'ils sont activés à la fois pour les objets et pour le formulaire auquel appartiennent les objets. Si les événements sont activés pour les objets uniquement, ils ne se produiront pas; ces deux événements doivent également être activés au niveau du formulaire. -### Subform -The `On Load` event is generated when opening the subform (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is displayed (and not when the form is displayed). +### Sous-formulaire -### See also +L'événement `On Load` est généré à l'ouverture du sous-formulaire (cet événement doit également avoir été activé au niveau du formulaire parent pour être pris en compte). L'événement est généré avant ceux du formulaire parent. A noter également que, conformément aux principes de fonctionnement des événements de formulaire, si le sous-formulaire est placé sur une page autre que la page 0 ou 1, cet événement ne sera généré que lorsque cette page sera affichée (et non lorsque le formulaire sera affiché). + + +### Voir également [`On Unload`](onUnload.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onLoadRecord.md b/website/translated_docs/fr/Events/onLoadRecord.md index eea9dd738a5a3b..a954b0768751a0 100644 --- a/website/translated_docs/fr/Events/onLoadRecord.md +++ b/website/translated_docs/fr/Events/onLoadRecord.md @@ -3,13 +3,16 @@ id: onLoadRecord title: Sur chargement ligne --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | ------------------------------------------------------------------- | -| 40 | Formulaire | During user entry in list, a record is loaded and a field is edited | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ---------------------------------------------------------------------------------------------------- | +| 40 | Formulaire | Lors de la saisie de l'utilisateur dans la liste, un enregistrement est chargé et un champ est édité | ## Description -The `On Load Record` event can only be used in the context of an **output form**. It is triggered during data entry in list, after a record is highlighted and a field changes to editing mode. +L'événement `On Load Record` ne peut être utilisé que dans le contexte d'un **formulaire de sortie**. Il est déclenché lors de la saisie des données dans la liste, après la mise en surbrillance d'un enregistrement et le passage d'un champ en mode d'édition. + +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. + + -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onLongClick.md b/website/translated_docs/fr/Events/onLongClick.md index a09056b87b08a5..d9d226c552b4cc 100644 --- a/website/translated_docs/fr/Events/onLongClick.md +++ b/website/translated_docs/fr/Events/onLongClick.md @@ -3,16 +3,16 @@ id: onLongClick title: Sur clic long --- -| Code | Peut être appelé par | Définition | -| ---- | ---------------------------------------- | ------------------------------------------------------------------------------------ | -| 39 | [Bouton](FormObjects/button_overview.md) | A button is clicked and the mouse button remains pushed for a certain length of time | +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------- | ------------------------------------------------------------------------------------- | +| 39 | [Bouton](FormObjects/button_overview.md) | Un bouton est cliqué et le bouton de la souris reste enfoncé pendant un certain temps | ## Description -This event is generated when a button receives a click and the mouse button is held for a certain length of time. In theory, the length of time for which this event is generated is equal to the maximum length of time separating a double-click, as defined in the system preferences. +Cet événement est généré lorsqu'un bouton reçoit un clic et que le bouton de la souris est maintenu pendant un certain temps. En théorie, la durée de génération de cet événement est égale à la durée maximale séparant un double-clic, telle que définie dans les préférences système. -This event can be generated for the following button styles: +Cet événement peut être généré pour les styles de boutons suivants : - [Barre d’outils](FormObjects/button_overview.md#toolbar) - [Bevel](FormObjects/button_overview.md#bevel) @@ -24,8 +24,7 @@ This event can be generated for the following button styles: - [Rond](FormObjects/button_overview.md#circle) - [Personnalisé](FormObjects/button_overview.md#custom) -This event is generally used to display pop-up menus in case of long button clicks. The [`On Clicked`](onClicked.md) event, if enabled, is generated if the user releases the mouse button before the "long click" time limit. - -### See also +Cet événement est généralement utilisé pour afficher des pop-up menus en cas de longs clics sur les boutons. Si l'événement [`On Clicked`](onClicked.md) est activé, il est généré si l'utilisateur relâche le bouton de la souris avant la limite de temps du "long clic". +### Voir également [`Sur clic alternatif`](onAlternativeClick.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onLosingFocus.md b/website/translated_docs/fr/Events/onLosingFocus.md index 7358b560b9efc3..15e9b2c01577cf 100644 --- a/website/translated_docs/fr/Events/onLosingFocus.md +++ b/website/translated_docs/fr/Events/onLosingFocus.md @@ -3,13 +3,13 @@ id: onLosingFocus title: Sur perte focus --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 14 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is losing the focus | +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | +| 14 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Zone de Plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton Radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) - [Zone Web](FormObjects/webArea_overview.md) | Un objet formulaire perd le focus | ## Description -The `On Losing Focus` event, along with the [`On Getting Focus`](onGettingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +Les événements `On Losing Focus` et [`On Getting Focus`](onGettingFocus.md) permettent de détecter et de gérer le changement de focus pour les objets [focalisables](FormObjects/properties_Entry.md#focusable). -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +Avec les [objets sous-formulaire](FormObjects/subform_overview.md), cet événement est généré dans la méthode de l'objet sous-formulaire lorsqu'il est vérifié. Il est envoyé à la méthode formulaire du sous-formulaire, ce qui signifie, par exemple, que vous pouvez gérer l'affichage des boutons de navigation dans le sous-formulaire en fonction du focus. A noter que les objets de sous-formulaire peuvent eux-mêmes avoir le focus. diff --git a/website/translated_docs/fr/Events/onMenuSelected.md b/website/translated_docs/fr/Events/onMenuSelected.md index aef9f19c0cc7bc..5ef19858af1390 100644 --- a/website/translated_docs/fr/Events/onMenuSelected.md +++ b/website/translated_docs/fr/Events/onMenuSelected.md @@ -3,13 +3,13 @@ id: onMenuSelected title: Sur menu sélectionné --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | ------------------------------------------------------ | -| 18 | Formulaire | A menu item has been chosen in the associated menu bar | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | -------------------------------------------------------------- | +| 18 | Formulaire | Un élément de menu a été choisi dans la barre de menu associée | ## Description -The `On Menu Selected` event is sent to the form method when a command of a menu bar associated to the form is selected. You can then call the `Menu selected` language command to test the selected menu. +L'événement `On Menu Selected` est envoyé à la méthode formulaire lorsqu'une commande d'une barre de menus associée au formulaire est sélectionnée. Vous pouvez ensuite appeler la commande `Menu selected` pour tester le menu sélectionné. -> You can associate a menu bar with a form in the Form properties. The menus on a form menu bar are appended to the current menu bar when the form is displayed as an output form in the Application environment. \ No newline at end of file +> Vous pouvez associer une barre de menus à un formulaire dans les propriétés du formulaire. Les menus d'une barre de menus formulaire sont ajoutés à la barre de menus courante lorsque le formulaire est affiché en tant que formulaire de sortie dans l'environnement Application. diff --git a/website/translated_docs/fr/Events/onMouseEnter.md b/website/translated_docs/fr/Events/onMouseEnter.md index 2e5e4d067bf128..9cf23bf12f3df5 100644 --- a/website/translated_docs/fr/Events/onMouseEnter.md +++ b/website/translated_docs/fr/Events/onMouseEnter.md @@ -3,24 +3,25 @@ id: onMouseEnter title: Sur début survol --- -| Code | Peut être appelé par | Définition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 35 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor enters the graphic area of an object | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| 35 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Le curseur de la souris entre dans la zone graphique d'un objet | ## Description -This event is generated once, when the mouse cursor enters the graphic area of a form object. +Cet événement est généré une fois, lorsque le curseur de la souris entre dans la zone graphique d'un objet du formulaire. -The `On Mouse Enter` event updates the *MouseX* and *MouseY* system variables. +L'événement `On Mouse Enter` met à jour les variables système *MouseX* et *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Les objets rendus invisibles à l'aide de la commande `OBJECT SET VISIBLE` ou de la propriété [Visibility](FormObjects/properties_Display.md#visibility) ne génèrent pas cet événement. -### Calling stack -If the `On Mouse Enter` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Appeler la pile -### See also +Si l'événement `On Mouse Enter` a été coché pour le formulaire, il est généré pour chaque objet de formulaire. S'il est vérifié pour un objet, il n'est généré que pour cet objet. Lorsqu'il existe des objets superposés, l'événement est généré par le premier objet capable de le gérer qui se trouve en allant de haut en bas. + +### Voir également - [`Sur survol`](onMouseMove.md) - [`Sur fin survol`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onMouseLeave.md b/website/translated_docs/fr/Events/onMouseLeave.md index 9d59fbe3ee4e1b..e17ae116485795 100644 --- a/website/translated_docs/fr/Events/onMouseLeave.md +++ b/website/translated_docs/fr/Events/onMouseLeave.md @@ -3,24 +3,25 @@ id: onMouseLeave title: Sur fin survol --- -| Code | Peut être appelé par | Définition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 36 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor leaves the graphic area of an object | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | +| 36 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Le curseur de la souris quitte la zone graphique d'un objet | ## Description -This event is generated once when the mouse cursor leaves the graphic area of an object. +Cet événement est généré une fois, lorsque le curseur de la souris quitte la zone graphique d'un objet. -The `On Mouse Leave` event updates the *MouseX* and *MouseY* system variables. +L'événement `On Mouse Leave` met à jour les variables système *MouseX* et *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Les objets rendus invisibles à l'aide de la commande `OBJECT SET VISIBLE` ou de la propriété [Visibility](FormObjects/properties_Display.md#visibility) ne génèrent pas cet événement. -### Calling stack -If the `On Mouse Leave` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Appeler la pile -### See also +Si l'événement `On Mouse Leave` a été coché pour le formulaire, il est généré pour chaque objet de formulaire. S'il est vérifié pour un objet, il n'est généré que pour cet objet. Lorsqu'il existe des objets superposés, l'événement est généré par le premier objet capable de le gérer qui se trouve en allant de haut en bas. + +### Voir également - [`Sur survol`](onMouseMove.md) - [`Sur fin survol`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onMouseMove.md b/website/translated_docs/fr/Events/onMouseMove.md index 403238890a84b9..76055faebd5725 100644 --- a/website/translated_docs/fr/Events/onMouseMove.md +++ b/website/translated_docs/fr/Events/onMouseMove.md @@ -3,29 +3,30 @@ id: onMouseMove title: Sur survol --- -| Code | Peut être appelé par | Définition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| 37 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor moves at least one pixel OR a modifier key (Shift, Alt/Option, Shift Lock) was pressed | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| 37 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | Le curseur de la souris se déplace d'au moins un pixel OU une touche de modification (Shift, Alt/Option, Shift Lock) a été pressée | ## Description -This event is generated: +Cet événement est généré : -- when the mouse cursor moves at least one pixel -- OR when a modifier key (**Shift**, **Alt/Option**, **Shift Lock**) was pressed. This makes it possible to manage copy- or move-type drag-and-drop operations. +- lorsque le curseur de la souris se déplace d'au moins un pixel +- OU lorsque l'on presse sur une touche de modification (**Ctrl**, **Alt/Option**, **Verr Maj**). Cela permet de gérer les opérations de glisser-déposer de type copier ou déplacer. -If the event is checked for an object only, it is generated only when the cursor is within the graphic area of the object. +Si l'événement est coché pour un objet uniquement, il est généré uniquement lorsque le curseur se trouve dans la zone graphique de l'objet. -The `On Mouse Move` event updates the *MouseX* and *MouseY* system variables. +L'événement `On Mouse Move` met à jour les variables système *MouseX* et *MouseY*. -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +Les objets rendus invisibles à l'aide de la commande `OBJECT SET VISIBLE` ou de la propriété [Visibility](FormObjects/properties_Display.md#visibility) ne génèrent pas cet événement. -### Calling stack -If the `On Mouse Move` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### Appeler la pile -### See also +Si l'événement `On Mouse Move` a été coché pour le formulaire, il est généré pour chaque objet de formulaire. S'il est vérifié pour un objet, il n'est généré que pour cet objet. Lorsqu'il existe des objets superposés, l'événement est généré par le premier objet capable de le gérer qui se trouve en allant de haut en bas. + +### Voir également - [`Sur début survol`](onMouseEnter.md) - [`Sur fin survol`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onMouseUp.md b/website/translated_docs/fr/Events/onMouseUp.md index bd48fad92a271b..f536c3cbbe265e 100644 --- a/website/translated_docs/fr/Events/onMouseUp.md +++ b/website/translated_docs/fr/Events/onMouseUp.md @@ -3,17 +3,17 @@ id: onMouseUp title: On Mouse Up --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| 2 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) | The user has just released the left mouse button in a Picture object | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| 2 | [Zone de saisie](FormObjects/input_overview.md) de [type](FormObjects/properties_Object.md#type) `image` | L'utilisateur vient de relâcher le bouton gauche de la souris dans un objet Image | ## Description -The `On Mouse Up` event is generated when the user has just released the left mouse button while dragging in a picture input. This event is useful, for example, when you want the user to be able to move, resize or draw objects in a SVG area. +L'événement `On Mouse Up` est généré lorsque l'utilisateur vient de relâcher le bouton gauche de la souris tout en faisant glisser une image. Cet événement est utile, par exemple, lorsque vous souhaitez que l'utilisateur puisse déplacer, redimensionner ou dessiner des objets dans une zone SVG. -When the `On Mouse Up` event is generated, you can get the local coordinates where the mouse button was released. These coordinates are returned in the `MouseX` and `MouseY` System variables. Les coordonnées sont exprimées en pixels par rapport à l'angle supérieur gauche de l'image (0,0). +Lorsque l'événement `On Mouse Up` est généré, vous pouvez obtenir les coordonnées locales où le bouton de la souris a été relâché. Ces coordonnées sont retournées dans les variables système `MouseX` et `MouseY`. Les coordonnées sont exprimées en pixels par rapport à l'angle supérieur gauche de l'image (0,0). -When using this event, you must also use the `Is waiting mouse up` command to handle cases where the "state manager" of the form is desynchronized, i.e. when the `On Mouse Up` event is not received after a click. This is the case for example when an alert dialog box is displayed above the form while the mouse button has not been released. For more information and an example of use of the `On Mouse Up` event, please refer to the description of the `Is waiting mouse up` command. +Lorsque vous utilisez cet événement, vous devez également utiliser la commande `Is waiting mouse up` pour gérer les cas où le "gestionnaire d'état" du formulaire est désynchronisé, c'est-à-dire lorsque l'événement `On Mouse Up` n'est pas reçu après un clic. C'est le cas par exemple lorsqu'une boîte de dialogue d'alerte s'affiche au-dessus du formulaire alors que le bouton de la souris n'a pas été relâché. Pour plus d'informations et pour voir un exemple d'utilisation de l'événement `On Mouse Up`, veuillez vous référer à la description de la commande `Is waiting mouse up`. -> If the [Draggable](FormObjects/properties_Action.md#draggable) option is enabled for the picture object, the `On Mouse Up` event is never generated. \ No newline at end of file +> Si l'option [Draggable](FormObjects/properties_Action.md#draggable) est activée pour l'objet image, l'événement `On Mouse Up` n'est jamais généré. diff --git a/website/translated_docs/fr/Events/onOpenDetail.md b/website/translated_docs/fr/Events/onOpenDetail.md index 3577afa3e303f3..6b330a6fa74671 100644 --- a/website/translated_docs/fr/Events/onOpenDetail.md +++ b/website/translated_docs/fr/Events/onOpenDetail.md @@ -3,18 +3,19 @@ id: onOpenDetail title: Sur ouverture corps --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| 25 | Form - [List Box](FormObjects/listbox_overview.md) | The detail form associated with the output form or with the list box is about to be opened. | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| 25 | Formulaire - [List Box](FormObjects/listbox_overview.md) | Le formulaire détaillé associé au formulaire de sortie ou à la list box est sur le point d'être ouvert. | ## Description -The `On Open Detail` event can be used in the following contexts: +L'événement `On Open Detail` peut être utilisé dans les contextes suivants : -- **Output forms**: A record is about to be displayed in the detail form associated with the output form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record is about to be displayed in the detail form associated with a list box of the selection type (and before this form is opened). +- **Formulaires de sortie** : un enregistrement est sur le point d'être affiché dans le formulaire détaillé associé au formulaire de sortie. Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. +- List box [**de type sélection**](FormObjects/listbox_overview.md#selection-list-boxes) : Cet événement est généré lorsqu'un enregistrement est sur le point d'être affiché dans le formulaire détaillé associé à une list box de type sélection (et avant l'ouverture de ce formulaire). -### Displayed line number -The `Displayed line number` 4D command works with the `On Open Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +### Numéro de ligne affiché + +La commande 4D `Displayed line number` fonctionne avec l'événement formulaire `On Open Detail`. Elle retourne le numéro de la ligne en cours de traitement tandis qu'une liste d'enregistrements ou de lignes de list box s'affiche à l'écran. diff --git a/website/translated_docs/fr/Events/onOpenExternalLink.md b/website/translated_docs/fr/Events/onOpenExternalLink.md index debec565cdf05d..51038d05d820be 100644 --- a/website/translated_docs/fr/Events/onOpenExternalLink.md +++ b/website/translated_docs/fr/Events/onOpenExternalLink.md @@ -3,17 +3,17 @@ id: onOpenExternalLink title: On Open External Link --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | ---------------------------------------------- | -| 52 | [Zone Web](FormObjects/webArea_overview.md) | An external URL has been opened in the browser | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | ------------------------------------------------ | +| 52 | [Zone Web](FormObjects/webArea_overview.md) | Une URL externe a été ouverte dans le navigateur | ## Description -This event is generated when the loading of a URL was blocked by the Web area and the URL was opened with the current system browser, because of a filter set up via the `WA SET EXTERNAL LINKS FILTERS` command. +Cet événement est généré lorsque le chargement d'une URL a été bloqué par la zone Web et que l'URL a été ouverte avec le navigateur système actuel, en raison d'un filtre mis en place via la commande `WA SET EXTERNAL LINKS FILTERS`. -You can find out the blocked URL using the `WA Get last filtered URL` command. +Vous pouvez identifier l'URL bloquée à l'aide de la commande `WA Get last filtered URL`. -### See also +### Voir également [`On URL Filtering`](onUrlFiltering.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onOutsideCall.md b/website/translated_docs/fr/Events/onOutsideCall.md index 719f533236ace6..6db93be5657597 100644 --- a/website/translated_docs/fr/Events/onOutsideCall.md +++ b/website/translated_docs/fr/Events/onOutsideCall.md @@ -3,13 +3,14 @@ id: onOutsideCall title: Sur appel extérieur --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | -------------------------------------------- | -| 10 | Formulaire | The form received a `POST OUTSIDE CALL` call | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ------------------------------------------------- | +| 10 | Formulaire | Le formulaire a reçu un appel `POST OUTSIDE CALL` | ## Description -This event is called when the form is called from another process through the `POST OUTSIDE CALL` command. +Cet événement est appelé lorsque le formulaire est appelé à partir d'un autre processus via la commande `POST OUTSIDE CALL`. + +> L'événement `On Outside Call` modifie le contexte de saisie du formulaire. En particulier si un champ était en cours de modification, l'événement [`On Data Change`](onDataChange.md) est généré. -> The `On Outside Call` event modifies the entry context of the receiving input form. In particular, if a field was being edited, the [`On Data Change`](onDataChange.md) event is generated. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onPageChange.md b/website/translated_docs/fr/Events/onPageChange.md index bd7d72a9d83349..ba60fe506c405e 100644 --- a/website/translated_docs/fr/Events/onPageChange.md +++ b/website/translated_docs/fr/Events/onPageChange.md @@ -3,17 +3,17 @@ id: onPageChange title: Sur changement page --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | --------------------------------------- | -| 56 | Formulaire | The current page of the form is changed | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ------------------------------------------- | +| 56 | Formulaire | La page courante du formulaire est modifiée | ## Description -This event is only available at the form level (it is called in the form method). It is generated each time the current page of the form changes (following a call to the `FORM GOTO PAGE` command or a standard navigation action). +Cet événement n'est disponible qu'au niveau du formulaire (il est appelé dans la méthode formulaire). Il est généré à chaque fois que la page courante du formulaire change (suite à un appel à la commande `FORM GOTO PAGE` ou à une action de navigation standard). -Note that it is generated after the page is fully loaded, i.e. once all the objects it contains are initialized, including [Web areas](FormObjects/webArea_overview.md). +A noter qu'il est généré après le chargement complet de la page, c'est-à-dire une fois tous les objets qu'elle contient sont initialisés, y compris les [zones Web](FormObjects/webArea_overview.md). -> The only exception is 4D View Pro areas, for which you need to call the [On VP Ready](onVpReady.md) specific event. +> La seule exception concerne les zones 4D View Pro, pour lesquelles vous devez appeler l'événement spécifique [On VP Ready](onVpReady.md). -The `On Page Change` event is useful for executing code that requires all objects to be initialized beforehand. You can also use it to optimize the application by executing code (for example, a search) only after a specific page of the form is displayed and not just as soon as page 1 is loaded. If the user does not go to this page, the code is not executed. \ No newline at end of file +L'événement `On Page Change` est utile pour exécuter du code qui nécessite que tous les objets soient préalablement initialisés. Vous pouvez également l'utiliser pour optimiser l'application en exécutant du code (par exemple, une recherche) uniquement après l'affichage d'une page spécifique du formulaire et pas seulement dès que la page 1 est chargée. Si l'utilisateur ne va pas sur cette page, le code n'est pas exécuté. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onPlugInArea.md b/website/translated_docs/fr/Events/onPlugInArea.md index 33b5f1e09c51a3..fa7b2fa72d45d3 100644 --- a/website/translated_docs/fr/Events/onPlugInArea.md +++ b/website/translated_docs/fr/Events/onPlugInArea.md @@ -3,11 +3,11 @@ id: onPlugInArea title: Sur appel zone du plug in --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------ | ------------------------------------------------------------- | -| 19 | Form - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) | An external object requested its object method to be executed | +| Code | Peut être appelé par | Définition | +| ---- | --------------------------------------------------------------------------- | ------------------------------------------------------------- | +| 19 | Formulaire - [Zone de Plug-in](FormObjects/pluginArea_overview.md#overview) | Un objet externe a demandé que sa méthode objet soit exécutée | ## Description -The event is generated when a plug-in requested its form area to execute the associated object method. \ No newline at end of file +L'événement est généré lorsqu'un plug-in a demandé à sa zone de formulaire d'exécuter la méthode objet associée. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onPrintingBreak.md b/website/translated_docs/fr/Events/onPrintingBreak.md index 7b5a7899cb76d3..0c7f8dfca8afed 100644 --- a/website/translated_docs/fr/Events/onPrintingBreak.md +++ b/website/translated_docs/fr/Events/onPrintingBreak.md @@ -3,15 +3,18 @@ id: onPrintingBreak title: On Printing Break --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -| 6 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | One of the form’s break areas is about to be printed | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- | +| 6 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md) - [Zone de saisie](FormObjects/input_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | L’une des zones de rupture du formulaire est sur le point d’être imprimée | ## Description -The `On Printing Break` event can only be used in the context of an **output form**. It is triggered each time a break area in the output form is about to be printed, so that you can evaluate the break values, for example. +L'événement `On Printing Break` ne peut être utilisé que dans le contexte d'un **formulaire de sortie**. Il est déclenché chaque fois qu'une zone de rupture du formulaire de sortie est sur le point d'être imprimée, afin que vous puissiez évaluer les valeurs de rupture, par exemple. + +Cet événement fait généralement suite à un appel à la commande `Subtotal`. + +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. + -This event usually follows a call to the `Subtotal` command. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onPrintingDetail.md b/website/translated_docs/fr/Events/onPrintingDetail.md index 977c8ea4c310a7..f6c7cb040a3947 100644 --- a/website/translated_docs/fr/Events/onPrintingDetail.md +++ b/website/translated_docs/fr/Events/onPrintingDetail.md @@ -3,15 +3,16 @@ id: onPrintingDetail title: On Printing Detail --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 23 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s detail area is about to be printed | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | +| 23 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md) - [Zone de saisie](FormObjects/input_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | La zone détaillée du formulaire est sur le point d’être imprimée | ## Description -The `On Printing Detail` event can only be used in the context of an **output form**. It is triggered when the detail area the output form is about to be printed, for example following a call to the `Print form` command. +L'événement `On Printing Detail` ne peut être utilisé que dans le contexte d'un **formulaire de sortie**. Il est déclenché lorsque la zone de détail du formulaire de sortie est sur le point d'être imprimée, par exemple suite à un appel à la commande `Print form`. -The `Print form` command generates only one `On Printing Detail` event for the form method. +La commande `Print form` génère un seul événement `On Printing Detail` pour la méthode formulaire. + +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onPrintingFooter.md b/website/translated_docs/fr/Events/onPrintingFooter.md index 4e76ec1df3916d..f4612539011510 100644 --- a/website/translated_docs/fr/Events/onPrintingFooter.md +++ b/website/translated_docs/fr/Events/onPrintingFooter.md @@ -3,15 +3,16 @@ id: onPrintingFooter title: On Printing Footer --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 7 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s footer area is about to be printed | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | +| 7 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) -Formulaire - [Liste hiérarchique](FormObjects/list_overview.md) - [Zone de saisie](FormObjects/input_overview.md) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Onglet](FormObjects/tabControl.md) | La zone de pied du formulaire est sur le point d’être imprimée | ## Description -The `On Printing Footer` event can only be used in the context of an **output form**. It is triggered when the footer area the output form is about to be printed, so that you can evaluate the footer values. +L'événement `On Printing Footer` ne peut être utilisé que dans le contexte d'un **formulaire de sortie**. Il est déclenché lorsqu'une zone de pied du formulaire de sortie est sur le point d'être imprimée, afin que vous puissiez évaluer les valeurs du pied. -This event can be triggered in the context of a `PRINT SELECTION` command. +Cet événement peut être déclenché dans le cadre d'une commande `PRINT SELECTION`. + +> Cet événement ne peut pas être sélectionné pour les formulaires projet, il est uniquement disponible avec les **formulaires table**. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onResize.md b/website/translated_docs/fr/Events/onResize.md index 01e586b301607d..7067007086fb19 100644 --- a/website/translated_docs/fr/Events/onResize.md +++ b/website/translated_docs/fr/Events/onResize.md @@ -3,14 +3,14 @@ id: onResize title: Sur redimensionnement --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| 29 | Formulaire | The form's window is resized or the subform object is resized (in this case the event is generated in the form method of the subform) | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 29 | Formulaire | La fenêtre du formulaire est redimensionnée ou l'objet sous-formulaire est redimensionné (dans ce cas, l'événement est généré dans la méthode formulaire du sous-formulaire) | ## Description -This event is called: +Cet événement est appelé : -- when the window of the form is resized, -- in the context of subforms, when the size of the subform object in the parent form has changed. In this this case, this event is sent to the subform form method. \ No newline at end of file +- lorsque la fenêtre du formulaire est redimensionnée, +- dans le contexte de sous-formulaires, lorsque la taille de l'objet de sous-formulaire du formulaire parent a changé. Dans ce cas, cet événement est envoyé à la méthode formulaire du sous-formulaire. diff --git a/website/translated_docs/fr/Events/onRowMoved.md b/website/translated_docs/fr/Events/onRowMoved.md index d3a7f13a548bab..67c98a11397959 100644 --- a/website/translated_docs/fr/Events/onRowMoved.md +++ b/website/translated_docs/fr/Events/onRowMoved.md @@ -3,13 +3,13 @@ id: onRowMoved title: Sur déplacement ligne --- -| Code | Peut être appelé par | Définition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 34 | [List Box of the array type](FormObjects/listbox_overview.md#array-list-boxes) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box row is moved by the user via drag and drop | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| 34 | [List Box de type tableau](FormObjects/listbox_overview.md#array-list-boxes) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) | Une ligne de list box est déplacée par l'utilisateur par glisser-déposer | ## Description -This event is generated when a row of the list box ([array type only](FormObjects/listbox_overview.md#array-list-boxes)) is moved by the user using drag and drop ([if allowed](FormObjects/properties_Action.md#movable-rows). It is not generated if the row is dragged and then dropped in its initial location. +Cet événement est généré lorsqu'une ligne de list box (de [type tableau uniquement](FormObjects/listbox_overview.md#array-list-boxes)) est déplacée par l'utilisateur à l'aide du glisser-déposer ([si autorisé](FormObjects/properties_Action.md#movable-rows)). Il n'est pas généré si la ligne est glissée puis déposée à son emplacement initial. -The `LISTBOX MOVED ROW NUMBER` command returns the new position of the row. \ No newline at end of file +La commande `LISTBOX MOVED ROW NUMBER` retourne la nouvelle position de la ligne. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onRowResize.md b/website/translated_docs/fr/Events/onRowResize.md index c3b5c49e145975..f25efbdac912b4 100644 --- a/website/translated_docs/fr/Events/onRowResize.md +++ b/website/translated_docs/fr/Events/onRowResize.md @@ -3,24 +3,23 @@ id: onRowResize title: On Row Resize --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------- | -------------------------------------------------------- | -| 60 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The height of a row is modified by a user with the mouse | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------- | --------------------------------------------------------------------- | +| 60 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) | La hauteur d'une ligne est modifiée par un utilisateur avec la souris | ## Description -This event is generated when the height of a row is modified by a user in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| Propriété | Type | Description | -| ----------- | ----------- | ---------------------------------------------------------------- | -| code | entier long | 60 | -| description | Texte | "On Row Resize" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | -| range | object | Cell range of the rows whose heights have changed | -| header | boolean | True if the column header row (first row) is resized, else false | +Cet événement est généré lorsque la hauteur d'une ligne est modifiée par un utilisateur dans un document 4D View Pro. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : +| Propriété | Type | Description | +| ----------- | ----------- | ------------------------------------------------------------------------------------------- | +| code | entier long | 60 | +| description | Texte | "On Row Resize" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellules des lignes dont les hauteurs ont changé | +| header | boolean | "True" si la ligne de la colonne d'en-tête (première ligne) est redimensionnée, sinon false | #### Exemple diff --git a/website/translated_docs/fr/Events/onScroll.md b/website/translated_docs/fr/Events/onScroll.md index 27d1943fbde52f..504bc2f59ebbbc 100644 --- a/website/translated_docs/fr/Events/onScroll.md +++ b/website/translated_docs/fr/Events/onScroll.md @@ -3,23 +3,25 @@ id: onScroll title: Sur défilement --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| 59 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) - [List Box](FormObjects/listbox_overview.md) | The user scrolls the contents of a picture object or list box using the mouse or keyboard. | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| 59 | [Zone de saisie](FormObjects/input_overview.md) de [type](FormObjects/properties_Object.md#type) `image` - [List Box](FormObjects/listbox_overview.md) | L'utilisateur fait défiler le contenu d'un objet image ou d'une list box à l'aide de la souris ou du clavier. | ## Description -This event can be generated in the context of a picture input or a list box. +Cet événement peut être généré dans le contexte d'une entrée d'image ou d'une list box. -This event is triggered after any other user event related to the scrolling action ([On Clicked](onClicked.md), [On After Keystroke](onAfterKeystroke.md), etc.). The event is only generated in the object method (not in the form method). +Il est déclenché après tout autre événement utilisateur lié à l'action de défilement ([On Clicked](onClicked.md), [On After Keystroke](onAfterKeystroke.md), etc.). L'événement est uniquement généré dans la méthode objet (pas dans la méthode formulaire). -The event is triggered when the scroll is the result of a user action: using the scroll bars and/or cursors, using the mouse wheel or [the keyboard](FormObjects/properties_Appearance.md#vertical-scroll-bar). It is not generated when the object is scrolled due to the execution of the `OBJECT SET SCROLL POSITION` command. +L'événement est déclenché lorsque le défilement est le résultat d'une action de l'utilisateur : à l'aide des barres de défilement et/ou des curseurs, à l'aide de la molette de la souris ou du [clavier](FormObjects/properties_Appearance.md#vertical-scroll-bar). Il n'est pas généré lors du défilement de l'objet en raison de l'exécution de la commande `OBJECT SET SCROLL POSITION`. -### Picture input -The event is generated as soon as a user scrolls a picture within the picture input (field or variable) that contains it. You can scroll the contents of a picture area when the size of the area is smaller than its contents and the [display format](FormObjects/properties_Display.md#picture-format) is "Truncated (non Centered)". +### Entrée d'image + +L'événement est généré dès qu'un utilisateur fait défiler une image dans l'entrée d'image (champ ou variable) qui la contient. Vous pouvez faire défiler le contenu d'une zone d'image lorsque la taille de la zone est plus petite que son contenu et que le [format d'affichage](FormObjects/properties_Display.md#picture-format) est "Tronqué (non centré)". + ### List box -The event is generated as soon as a user scrolls the rows or columns of the list box. \ No newline at end of file +L'événement est généré dès qu'un utilisateur fait défiler les lignes ou les colonnes de la list box. diff --git a/website/translated_docs/fr/Events/onSelectionChange.md b/website/translated_docs/fr/Events/onSelectionChange.md index 684d791ba06716..1efefe493c100c 100644 --- a/website/translated_docs/fr/Events/onSelectionChange.md +++ b/website/translated_docs/fr/Events/onSelectionChange.md @@ -3,28 +3,27 @@ id: onSelectionChange title: Sur nouvelle sélection --- -| Code | Peut être appelé par | Définition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -| 31 | [4D View Pro area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) | The selection in the object is modified | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | +| 31 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md) - [Zone de saisie](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) | La sélection faite dans l'objet est modifiée | ## Description -This event can be generated in different contexts. +Cet événement peut être généré dans différents contextes. -### 4D View Pro - -The current selection of rows or columns is modified. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: -| Propriété | Type | Description | -| ------------- | ----------- | ------------------------------ | -| code | entier long | 31 | -| description | Texte | "On Selection Change" | -| objectName | Texte | 4D View Pro area name | -| sheetName | Texte | Name of the sheet of the event | -| oldSelections | object | Cell range before change | -| newSelections | object | Cell range after change | +### 4D View Pro +La sélection courante de lignes ou de colonnes est modifiée. Dans ce contexte, l'[objet événement](overview.md#event-object) retourné par la commande `FORM Event` contient : +| Propriété | Type | Description | +| ------------- | ----------- | ---------------------------------- | +| code | entier long | 31 | +| description | Texte | "On Selection Change" | +| objectName | Texte | Nom de la zone 4D View Pro | +| sheetName | Texte | Nom de la feuille de l'événement | +| oldSelections | object | Plage de cellules avant changement | +| newSelections | object | Plage de cellules après changement | #### Exemple @@ -35,18 +34,21 @@ The current selection of rows or columns is modified. In this context, the [even End if ``` -### List form +### Formulaire liste + +L'enregistrement courant ou la sélection courante de lignes est modifié(e) sous dans un formulaire liste. + + +### Liste hiérarchique -The current record or the current selection of rows is modified in a list form. +Cet événement est généré à chaque fois que la sélection faite dans la liste hiérarchique est modifiée après un clic de souris ou une frappe. -### Hierarchical list -This event is generated every time the selection in the hierarchical list is modified after a mouse click or keystroke. +### Zone de saisie et 4D Write Pro -### Input & 4D Write Pro +La sélection de texte ou la position du curseur dans la zone est modifiée suite à un clic ou une frappe. -The text selection or the position of the cursor in the area is modified following a click or a keystroke. ### List box +Cet événement est généré chaque fois que la sélection courante de lignes ou de colonnes de la list box est modifiée. -This event is generated each time the current selection of rows or columns of the list box is modified. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onTimer.md b/website/translated_docs/fr/Events/onTimer.md index 8f35ec82fc92ef..045f25fee54e5d 100644 --- a/website/translated_docs/fr/Events/onTimer.md +++ b/website/translated_docs/fr/Events/onTimer.md @@ -3,13 +3,13 @@ id: onTimer title: Sur minuteur --- -| Code | Peut être appelé par | Définition | -| ---- | -------------------- | ----------------------------------------------------------------- | -| 27 | Formulaire | The number of ticks defined by the `SET TIMER` command has passed | +| Code | Peut être appelé par | Définition | +| ---- | -------------------- | --------------------------------------------------------------------- | +| 27 | Formulaire | Le nombre de graduations défini par la commande `SET TIMER` est passé | ## Description -This event is generated only if the form method contains a previous call to the `SET TIMER` command. +Cet événement est généré uniquement si la méthode formulaire contient un appel à la commande `SET TIMER` réalisé antérieurement. -When the `On Timer` form event property is selected, only the form method will receive the event, no object method will be called. \ No newline at end of file +Lorsque la propriété d'événement formulaire `On Timer` est sélectionnée, seule la méthode formulaire recevra l'événement, aucune méthode objet ne sera appelée. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onUnload.md b/website/translated_docs/fr/Events/onUnload.md index e660df513eb5c5..2cbc764f8d81e5 100644 --- a/website/translated_docs/fr/Events/onUnload.md +++ b/website/translated_docs/fr/Events/onUnload.md @@ -3,23 +3,26 @@ id: onUnload title: On Unload --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | -| 24 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be exited and released | +| Code | Peut être appelé par | Définition | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| 24 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) - [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) -[List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) - [Onglet](FormObjects/tabControl.md) - [Zone Web](FormObjects/webArea_overview.md) | Le formulaire est sur le point d'être quitté et généré | ## Description -This event is triggered when the form is being exited released. +Cet événement est déclenché lorsque le formulaire est généré. -All the objects of the form (from any page) whose `On Unload` object event property is selected will have their object method called. Then, if the `On Unload` form event property is selected, the form will have its form method called. +Tous les objets du formulaire (de n'importe quelle page) dont la propriété d'événement `On Unload` est sélectionnée verront leur méthode objet appelée. Ensuite, si la propriété d'événement formulaire `On Unload` est sélectionnée, la méthode formulaire sera appelée. -> The [`On Load`](onLoad.md) and [`On Unload`] events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> Les événements [`On Load`](onLoad.md) et [`On Unload`] sont générés pour les objets s'ils sont activés à la fois pour les objets et pour le formulaire auquel appartiennent les objets. Si les événements sont activés pour les objets uniquement, ils ne se produiront pas; ces deux événements doivent également être activés au niveau du formulaire. -### Subform -The `On Unload` event is generated when the subform is closing (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is closed (and not when the form is closed). -### See also +### Sous-formulaire + +L'événement `On Unload` est généré à la fermeture du sous-formulaire (cet événement doit également avoir été activé au niveau du formulaire parent pour être pris en compte). L'événement est généré avant ceux du formulaire parent. The event is generated before those of the parent form. + + +### Voir également [`On Load`](onLoad.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onUrlFiltering.md b/website/translated_docs/fr/Events/onUrlFiltering.md index 8b9b7e9e255e52..711b892ff6f838 100644 --- a/website/translated_docs/fr/Events/onUrlFiltering.md +++ b/website/translated_docs/fr/Events/onUrlFiltering.md @@ -3,17 +3,16 @@ id: onUrlFiltering title: On URL Filtering --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | --------------------------------- | -| 51 | [Zone Web](FormObjects/webArea_overview.md) | A URL was blocked by the Web area | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | ------------------------------------- | +| 51 | [Zone Web](FormObjects/webArea_overview.md) | Une URL a été bloquée par la zone Web | ## Description -This event is generated when the loading of a URL is blocked by the Web area because of a filter set up using the `WA SET URL FILTERS` command. +Cet événement est généré lorsque le chargement d'une URL est bloqué par la zone Web en raison d'un filtre configuré à l'aide de la commande `WA SET URL FILTERS`. -You can find out the blocked URL using the `WA Get last filtered URL` command. - -### See also +Vous pouvez identifier l'URL bloquée à l'aide de la commande `WA Get last filtered URL`. +### Voir également [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onUrlLoadingError.md b/website/translated_docs/fr/Events/onUrlLoadingError.md index 7ab139b3e4c56b..2cf1a5f53dc5b9 100644 --- a/website/translated_docs/fr/Events/onUrlLoadingError.md +++ b/website/translated_docs/fr/Events/onUrlLoadingError.md @@ -3,17 +3,17 @@ id: onUrlLoadingError title: On URL Loading Error --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | ------------------------------------------ | -| 50 | [Zone Web](FormObjects/webArea_overview.md) | An error occurred when the URL was loading | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | ----------------------------------------------------- | +| 50 | [Zone Web](FormObjects/webArea_overview.md) | Une erreur s'est produite lors du chargement de l'URL | ## Description -This event is generated when an error is detected during the loading of a URL. +Cet événement est généré lorsqu'une erreur est détectée lors du chargement d'une URL. -You can call the `WA GET LAST URL ERROR` command in order to get information about the error. +Vous pouvez appeler la commande `WA GET LAST URL ERROR` afin d'obtenir des informations sur l'erreur. -### See also +### Voir également [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onUrlResourceLoading.md b/website/translated_docs/fr/Events/onUrlResourceLoading.md index a3492237daf4bf..6eb59c5d1d4bb4 100644 --- a/website/translated_docs/fr/Events/onUrlResourceLoading.md +++ b/website/translated_docs/fr/Events/onUrlResourceLoading.md @@ -3,17 +3,17 @@ id: onUrlResourceLoading title: On URL Resource Loading --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------- | ---------------------------------------- | -| 48 | [Zone Web](FormObjects/webArea_overview.md) | A new resource is loaded in the Web area | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------- | --------------------------------------------------- | +| 48 | [Zone Web](FormObjects/webArea_overview.md) | Une nouvelle ressource est chargée dans la zone Web | ## Description -This event is generated each time a new resource (picture, frame, etc.) is loaded on the current Web page. +Cet événement est généré chaque fois qu'une nouvelle ressource (image, cadre, etc.) est chargée sur la page Web courante. -The [Progression](FormObjects/properties_WebArea.md#progression) variable associated with the area lets you find out the current state of the loading. +La variable [Progression](FormObjects/properties_WebArea.md#progression) associée à la zone vous permet de connaître l'état du chargement. -### See also +### Voir également [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onValidate.md b/website/translated_docs/fr/Events/onValidate.md index 96151f43174bd9..a5183d5da01c22 100644 --- a/website/translated_docs/fr/Events/onValidate.md +++ b/website/translated_docs/fr/Events/onValidate.md @@ -3,15 +3,16 @@ id: onValidate title: Sur validation --- -| Code | Peut être appelé par | Définition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| 3 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) | The record data entry has been validated | +| Code | Peut être appelé par | Définition | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | +| 3 | [Zone 4D Write Pro](FormObjects/writeProArea_overview) - [Bouton](FormObjects/button_overview.md) - [Grille de boutons](FormObjects/buttonGrid_overview.md) - [Case à cocher](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Liste déroulante](FormObjects/dropdownList_Overview.md) - Formulaire - [Liste hiérarchique](FormObjects/list_overview.md#overview) - [Zone de saisie](FormObjects/input_overview.md) -[List Box](FormObjects/listbox_overview.md) - [Colonne de List Box](FormObjects/listbox_overview.md#list-box-columns) - [Bouton image](FormObjects/pictureButton_overview.md) - [Pop up menu image](FormObjects/picturePopupMenu_overview.md) - [Zone de plug-in](FormObjects/pluginArea_overview.md#overview) - [Indicateur de progression](FormObjects/progressIndicator.md) - [Bouton radio](FormObjects/radio_overview.md) - [Règle](FormObjects/ruler.md) -[Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Sous-formulaire](FormObjects/subform_overview.md) - [Onglet](FormObjects/tabControl.md) | La saisie des données d'enregistrement a été validée | ## Description -This event is triggered when the record data entry has been validated, for example after a `SAVE RECORD` command call or an `accept` [standard action](FormObjects/properties_Action.md#standard-action). +Cet événement est déclenché lorsque la saisie des données d'enregistrement a été validée, par exemple après un appel de la commande `SAVE RECORD` ou après une [action standard](FormObjects/properties_Action.md#standard-action) `accept`. -### Subform -The `On Validate` event is triggered when data entry is validated in the subform. \ No newline at end of file +### Sous-formulaire + +L'événement `On Validate` est déclenché lorsque la saisie de données est validée dans le sous-formulaire. \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onVpRangeChanged.md b/website/translated_docs/fr/Events/onVpRangeChanged.md new file mode 100644 index 00000000000000..d5210b467708a2 --- /dev/null +++ b/website/translated_docs/fr/Events/onVpRangeChanged.md @@ -0,0 +1,27 @@ +--- +id: onVpRangeChanged +title: On VP Range Changed +--- + +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| 61 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) | La plage de cellules 4D View Pro a changé (ex : un calcul de formule, une valeur supprimée d'une cellule, etc.) | + + +## Description + + +Cet événement est généré lorsqu'un changement intervient dans une plage de cellules dans le document 4D View Pro. + +L'objet retourné par la commande FORM Event contient : + +| Propriété | Type | Description | +| ------------ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| objectName | Texte | Nom de la zone 4D View Pro | +| code | entier long | On VP Range Changed | +| description | Texte | "On VP Range Changed" | +| sheetName | Texte | Nom de la feuille de l'événement | +| range | object | Plage de cellules liées au changement | +| changedCells | object | Plage contenant uniquement les cellules modifiées. Il peut s'agir d'une gamme combinée. | +| action | Texte | Le type d'opération générant l'événement :

    • "clear" - A clear range value operation
    • "dragDrop" - Une opération de glisser-déposer
    • "dragFill" - Une opération de remplissage par glisser
    • "evaluFormula" - Définition d'une formule dans une plage de cellules spécifiée
    • "coller" - Une opération de collage
    • "setArrayFormula" - Définition d'une formule dans une plage de cellules spécifiée
    • "sort" - Tri d'une plage de cellules
    • | +> Voir également [On After Edit](onAfterEdit.md). diff --git a/website/translated_docs/fr/Events/onVpReady.md b/website/translated_docs/fr/Events/onVpReady.md index 853f1b1aade52d..4a796bed6f5ed5 100644 --- a/website/translated_docs/fr/Events/onVpReady.md +++ b/website/translated_docs/fr/Events/onVpReady.md @@ -3,15 +3,15 @@ id: onVpReady title: On VP Ready --- -| Code | Peut être appelé par | Définition | -| ---- | ------------------------------------------------------- | ----------------------------------------------- | -| 9 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The loading of the 4D View Pro area is complete | +| Code | Peut être appelé par | Définition | +| ---- | ------------------------------------------------------- | ------------------------------------------------ | +| 9 | [Zone 4D View Pro](FormObjects/viewProArea_overview.md) | Le chargement de la zone 4D View Pro est terminé | ## Description -This event is generated when the 4D View Pro area loading is complete. +Cet événement est généré lorsque le chargement de la zone 4D View Pro est terminé. -You need to use this event to write initialization code for the area. Any 4D View Pro area initialization code, for loading or reading values from or in the area, must be located in the `On VP Ready` form event of the area. This form event is triggered once the area loading is complete. Testing this event makes you sure that the code will be executed in a valid context. An error is returned if a 4D View Pro command is called before the `On VP Ready` form event is generated. +Vous devez utiliser cet événement pour écrire le code d'initialisation de la zone. Tout code d'initialisation de zone 4D View Pro, pour le chargement ou la lecture de valeurs issues de la zone ou contenues dans la zone, doit se trouver dans l'événement formulaire `On VP Ready` de la zone. Cet événement formulaire est déclenché une fois le chargement de la zone terminé. Tester cet événement vous garantit que le code sera exécuté dans un contexte valide. Une erreur est retournée si une commande 4D View Pro est appelée avant la génération de l'événement formulaire `On VP Ready`. -> 4D View Pro areas are loaded asynchronously in 4D forms. It means that the standard [On load](onLoad.md) form event cannot be used for 4D View Pro initialization code, since it could be executed before the loading of the area is complete. `On VP Ready` is always generated after [On load](onLoad.md). \ No newline at end of file +> Les zones 4D View Pro sont chargées de manière asynchrone dans les formulaires 4D. Cela signifie que l'événement standard [On load](onLoad.md) form ne peut pas être utilisé pour le code d'initialisation de 4D View Pro, car il pourrait être exécuté avant la fin du chargement de la zone. `On VP Ready` est toujours généré après [On load](onLoad.md). \ No newline at end of file diff --git a/website/translated_docs/fr/Events/onWindowOpeningDenied.md b/website/translated_docs/fr/Events/onWindowOpeningDenied.md index 4ec24f7acdedf0..a04a22bc98c31b 100644 --- a/website/translated_docs/fr/Events/onWindowOpeningDenied.md +++ b/website/translated_docs/fr/Events/onWindowOpeningDenied.md @@ -5,15 +5,15 @@ title: On Window Opening Denied | Code | Peut être appelé par | Définition | | ---- | ------------------------------------------- | -------------------------------- | -| 53 | [Zone Web](FormObjects/webArea_overview.md) | A pop-up window has been blocked | +| 53 | [Zone Web](FormObjects/webArea_overview.md) | Une fenêtre pop-up a été bloquée | ## Description -This event is generated when the opening of a pop-up window is blocked by the Web area. 4D Web areas do not allow the opening of pop-up windows. +Cet événement est généré lorsque l'ouverture d'une fenêtre pop-up est bloquée par la zone Web. Les zones Web de 4D ne permettent pas l'ouverture de fenêtres contextuelles. -You can find out the blocked URL using the `WA Get last filtered URL` command. +Vous pouvez identifier l'URL bloquée à l'aide de la commande `WA Get last filtered URL`. -### See also +### Voir également [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/fr/Events/overview.md b/website/translated_docs/fr/Events/overview.md index c7d742cf7d414e..634f654f8d2682 100644 --- a/website/translated_docs/fr/Events/overview.md +++ b/website/translated_docs/fr/Events/overview.md @@ -3,48 +3,51 @@ id: overview title: Aperçu --- -Form events are events that can lead to the execution of the form method and/or form object method(s). Form events allow you to control the flow of your application and to write code that is executed only when a specific event occurs. +Les événements formulaire sont des événements qui peuvent conduire à l'exécution de la méthode de formulaire et/ou de la ou des méthodes objet de formulaire. Les événements de formulaire vous permettent de contrôler le flux de votre application et d'écrire du code qui n'est exécuté que lorsqu'un événement spécifique se produit. -In your code, you control the events using the `FORM Event` command, that returns the triggered event. Par exemple: +Dans votre code, vous contrôlez les événements à l'aide de la commande `FORM Event`, qui retourne l'événement déclenché. Par exemple : -```4d -//code of a button +```4d +//code d'un bouton If(FORM Event.code=On Clicked) -// do something when the button is clicked +// faire quelque chose quand on clique sur le bouton End if ``` -> Every form and every active object on the form can listen to a predefined set of events, but only the events that you enabled at the form level and/or at every object level will actually occur. +> Chaque formulaire et chaque objet actif du formulaire peut lire un ensemble prédéfini d'événements, mais seuls les événements que vous avez activés au niveau du formulaire et/ou à chaque niveau d'objet se produiront réellement. -## Event object -Each event is returned as an object by the `FORM Event` command. By default, it contains the following properties: +## Objet événement + +Chaque événement est retourné sous forme d'objet par la commande `FORM Event`. Par défaut, il contient les propriétés suivantes : | Propriété | Type | Description | | --------- | ---- | ----------- | | | | | - objectName|text|Name of the object triggering the event - Not included if the event is triggered by the form| |code|longint|Numeric value of the form event. Also returned by the + objectName|text|Name of the object triggering the event - Not included if the event is triggered by the form| |code|longint|Numeric value of the form event. Also returned by the + +Des propriétés supplémentaires sont retournées lorsque l'événement se produit sur des objets spécifiques. En particulier : -`Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| +- Les [list box](FormObjects/listbox_overview.md#supported-form-events) et les [colonnes de list box](FormObjects/listbox_overview.md#supported-form-events-1) retournent des [propriétés supplémentaires](FormObjects/listbox_overview.md#additional-properties) telles que `columnName` ou `isRowSelected`. +- Les [zones 4D View Pro](FormObjects/viewProArea_overview.md) retournent par exemple des propriétés `sheetName` ou `action` dans l'objet événement [On After Edit](onAfterEdit.md). -Additional properties are returned when the event occurs on specific objects. For example, the [On After Edit](onAfterEdit.md) event object returned by a [4D View Pro area](FormObjects/viewProArea_overview.md) contains `sheetName` or `action` properties. -## Events and Methods +## Événements et méthodes -When a form event occurs, 4D performs the following actions: +Lorsqu'un événement formulaire se produit, 4D effectue les actions suivantes : -- First, it browses the objects of the form and calls the object method for any object (involved in the event) whose corresponding object event property has been selected. -- Second, it calls the form method if the corresponding form event property has been selected. +- Tout d'abord, il parcourt les objets du formulaire et appelle la méthode objet pour tout objet (associé à l'événement) dont la propriété d'événement d'objet correspondante a été sélectionnée. +- Deuxièmement, il appelle la méthode formulaire si la propriété d'événement formulaire correspondante a été sélectionnée. -Do not assume that the object methods, if any, will be called in a particular order. The rule of thumb is that the object methods are always called before the form method. If an object is a subform, the object methods of the subform’s list form are called, then the form method of the list form is called. 4D then continues to call the object methods of the parent form. In other words, when an object is a subform, 4D uses the same rule of thumb for the object and form methods within the subform object. +Ne supposez pas que les méthodes objet, le cas échéant, seront appelées dans un ordre particulier. La règle d'or est que les méthodes objet sont toujours appelées avant la méthode formulaire. Si un objet est un sous-formulaire, les méthodes objet du formulaire liste du sous-formulaire sont appelées, suivie de la méthode formulaire du formulaire liste. 4D continue alors d'appeler les méthodes objet du formulaire parent. En d'autres termes, lorsqu'un objet est un sous-formulaire, 4D utilise la même règle pour les méthodes objet et formulaire au sein de l'objet sous-formulaire. -Except for the [On Load](onLoad.md) and [On Unload](onUnload.md) events (see below), if the form event property is not selected for a given event, this does not prevent calls to object methods for the objects whose same event property is selected. In other words, enabling or disabling an event at the form level has no effect on the object event properties. +À l'exception des événements [On Load](onLoad.md) et [On Unload](onUnload.md) (voir ci-dessous), si la propriété d'événement formulaire n'est pas sélectionnée pour un événement donné, cela n'empêche pas les appels vers les méthodes objet pour les objets dont la même propriété d'événement est sélectionnée. En d'autres termes, l'activation ou la désactivation d'un événement au niveau du formulaire n'a aucun effet sur les propriétés d'événement de l'objet. -The number of objects involved in an event depends on the nature of the event. +Le nombre d'objets associés à un événement dépend de la nature de l'événement. -## Call Table +## Tableau des appels -The following table summarizes how object and form methods are called for each event type: +Le tableau suivant résume la manière dont les méthodes objet et formulaire sont appelées pour chaque type d'événement : | Evénement | Méthode objet | Méthode formulaire | Objets | | ----------------------------- | ---------------------------------- | ------------------ | --------------------------- | @@ -53,7 +56,7 @@ The following table summarizes how object and form methods are called for each e | Sur validation | Oui | Oui | Tous les objets | | Sur clic | Oui | Oui | Objets concernés uniquement | | Sur double clic | Oui | Oui | Objets concernés uniquement | -| Sue avant frappe clavier | Oui | Oui | Objets concernés uniquement | +| Sur avant frappe clavier | Oui | Oui | Objets concernés uniquement | | Sue après frappe clavier | Oui | Oui | Objets concernés uniquement | | Sur après modification | Oui | Oui | Objets concernés uniquement | | On Getting Focus | Oui | Oui | Objets concernés uniquement | @@ -81,10 +84,10 @@ The following table summarizes how object and form methods are called for each e | Sur affichage corps | Oui | Oui | Tous les objets | | Sur ouverture corps | Oui (List box) | Oui | Aucun, excepté les List box | | Sur fermeture corps | Oui (List box) | Oui | Aucun, excepté les List box | -| Sur redimensionnement | Jamais | Oui | None | +| Sur redimensionnement | Jamais | Oui | Aucun | | Sur nouvelle sélection | Oui | Oui | Objets concernés uniquement | -| Sur chargement ligne | Jamais | Oui | None | -| Sur minuteur | Jamais | Oui | None | +| Sur chargement ligne | Jamais | Oui | Aucun | +| Sur minuteur | Jamais | Oui | Aucun | | Sur défilement | Oui | Jamais | Objets concernés uniquement | | Sur avant saisie | Oui (List box) | Jamais | Objets concernés uniquement | | Sur déplacement colonne | Oui (List box) | Jamais | Objets concernés uniquement | @@ -95,9 +98,9 @@ The following table summarizes how object and form methods are called for each e | Sur après tri | Oui (List box) | Jamais | Objets concernés uniquement | | Sur clic long | Oui (Bouton) | Oui | Objets concernés uniquement | | Sur clic alternatif | Oui (Bouton et List box) | Jamais | Objets concernés uniquement | -| Sur déployer | Yes (Hier. list and list box) | Jamais | Objets concernés uniquement | -| Sur contracter | Yes (Hier. list and list box) | Jamais | Objets concernés uniquement | -| Sur action suppression | Yes (Hier. list and list box) | Jamais | Objets concernés uniquement | +| Sur déployer | Oui (Liste hiérar. et list box) | Jamais | Objets concernés uniquement | +| Sur contracter | Oui (Liste hiérar. et list box) | Jamais | Objets concernés uniquement | +| Sur action suppression | Oui (Liste hiérar. et list box) | Jamais | Objets concernés uniquement | | On URL Resource Loading | Oui (Zone Web) | Jamais | Objets concernés uniquement | | On Begin URL Loading | Oui (Zone Web) | Jamais | Objets concernés uniquement | | On URL Loading Error | Oui (Zone Web) | Jamais | Objets concernés uniquement | @@ -105,10 +108,11 @@ The following table summarizes how object and form methods are called for each e | On End URL Loading | Oui (Zone Web) | Jamais | Objets concernés uniquement | | On Open External Link | Oui (Zone Web) | Jamais | Objets concernés uniquement | | On Window Opening Denied | Oui (Zone Web) | Jamais | Objets concernés uniquement | +| On VP Range Changed | Oui (4D View Pro Area) | Jamais | Objets concernés uniquement | | On VP Ready | Oui (4D View Pro Area) | Jamais | Objets concernés uniquement | | On Row Resize | Oui (4D View Pro Area) | Jamais | Objets concernés uniquement | +Gardez toujours à l'esprit que, pour tout événement, la méthode d'un formulaire ou d'un objet est appelée si la propriété d'événement correspondante est sélectionnée pour le formulaire ou les objets. L'avantage de la désactivation des événements dans l'environnement de développement (à l'aide de la liste des propriétés de l'éditeur de formulaires) est la réduction du nombre d'appels vers des méthodes et par conséquent l'optimisation de la vitesse d'exécution de vos formulaires. -Always keep in mind that, for any event, the method of a form or an object is called if the corresponding event property is selected for the form or objects. The benefit of disabling events in the Design environment (using the Property List of the Form editor) is that you can reduce the number of calls to methods and therefore significantly optimize the execution speed of your forms. +> ATTENTION : Les événements [On Load et [](onUnloas)On Unload](onLoad) sont générés pour les objets s'ils sont activés à la fois pour les objets et pour le formulaire auquel appartiennent les objets. Si les événements sont activés pour les objets uniquement, ils ne se produiront pas; ces deux événements doivent également être activés au niveau du formulaire. -> WARNING: The [On Load](onLoad) and [On Unload](onUnloas) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. \ No newline at end of file diff --git a/website/translated_docs/fr/FormEditor/createStylesheet.md b/website/translated_docs/fr/FormEditor/createStylesheet.md index ea4c02e5532f2f..71150198dab9d3 100644 --- a/website/translated_docs/fr/FormEditor/createStylesheet.md +++ b/website/translated_docs/fr/FormEditor/createStylesheet.md @@ -3,17 +3,16 @@ id: stylesheets title: Feuilles de style (style sheets) --- -## Aperçu -Une feuille de style regroupe une combinaison d’attributs d'objets formulaire — allant des attributs de texte à quasiment tous les attributs d'objet disponibles. +Une feuille de style regroupe une combinaison d’attributs d'objets formulaire — allant des attributs de texte à quasiment tous les attributs d'objet disponibles. Outre l’harmonisation de l’interface de vos applications, l’usage de feuilles de style a trois avantages majeurs : -* Gain de temps en développement : pour chaque objet, vous définissez en une seule opération un ensemble de paramétrages. -* Facilité de maintenance : les feuilles de styles ont la propriété de modifier l’apparence de tous les objets qui les utilisent. Changer, par exemple, la taille de la police dans une feuille de style changera la taille de la police pour tous les objets qui utilisent cette feuille de style. -* Contrôle du développement multi-plate-forme : les feuilles de style peuvent s'appliquer aux deux plate-formes macOS et Windows, ou bien à l'une d'elles uniquement. Lorsqu'une feuille de style est appliquée, 4D utilise automatiquement la feuille de style appropriée. +* Gain de temps en développement : pour chaque objet, vous définissez en une seule opération un ensemble de paramétrages. +* Facilité de maintenance : les feuilles de styles ont la propriété de modifier l’apparence de tous les objets qui les utilisent. Changer, par exemple, la taille de la police dans une feuille de style changera la taille de la police pour tous les objets qui utilisent cette feuille de style. +* Contrôle du développement multi-plate-forme : les feuilles de style peuvent s'appliquer aux deux plate-formes macOS et Windows, ou bien à l'une d'elles uniquement. Lorsqu'une feuille de style est appliquée, 4D utilise automatiquement la feuille de style appropriée. -### Fichiers feuilles de style +## Fichiers feuilles de style 4D accepte trois fichiers feuilles de style spécifiques : @@ -23,21 +22,24 @@ Outre l’harmonisation de l’interface de vos applications, l’usage de feuil | styleSheets_mac.css | Pour définir des styles d'attributs spécifiques de macOS uniquement | | styleSheets_windows.css | Pour définir des styles d'attributs spécifiques pour Windows uniquement | +Ces fichiers sont stockés dans le dossier "/SOURCES" du projet. Ils sont également accessibles directement via le [CSS Preview](formEditor.md#css-preview) dans la barre d'outils de l'éditeur de formulaires. -Ces fichiers sont stockés dans le dossier "/SOURCES" du projet. -### Architecture des feuilles de style +## Architecture des feuilles de style -Bien qu'elle soient adaptées aux besoins spécifiques des formulaires 4D, les feuilles de style des bases projet respectent généralement la syntaxe et la grammaire CSS2. +While adapted to meet the specific needs of 4D forms, style sheets for application projects generally follow CSS2 syntax and grammar. Chaque règle de style d'une feuille de style contient deux parties : -* un *sélecteur* - Un sélecteur définit où appliquer le style. 4D prend en charge les sélecteurs "object type", "object name", "class", "all objects", et "attribute value". +* un *sélecteur* - Un sélecteur définit où appliquer le style. 4D prend en charge les sélecteurs "object type", "object name", "class", "all objects", et "attribute value". + +* une *déclaration* - La déclaration définit le style à appliquer. Plusieurs lignes de déclaration peuvent être regroupées pour former un bloc de déclaration. Chaque ligne d'un bloc de déclaration CSS doit se terminer par un point-virgule et l'intégralité du bloc doit être entourée d'accolades. + -* une *déclaration* - La déclaration définit le style à appliquer. Plusieurs lignes de déclaration peuvent être regroupées pour former un bloc de déclaration. Chaque ligne d'un bloc de déclaration CSS doit se terminer par un point-virgule et l'intégralité du bloc doit être entourée d'accolades. ## Sélecteurs de feuilles de style + ### Type d'objet Le type d'objet définit le type d'objet à styler et correspond au sélecteur d'élément CSS. @@ -48,19 +50,21 @@ Specify the object type, then in curly braces, declare the style(s) to apply. Dans l'exemple suivant, tous les objets du type *bouton* afficheront du texte dans la police Helvetica Neue, d'une taille de 20 pixels : - button { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +button { + font-family: Helvetica Neue; + font-size: 20px; +} +``` 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: - text, input { - text-align: left; - stroke: grey; - } - +``` +text, input { + text-align: left; + stroke: grey; +} +``` ### Nom d'objet @@ -70,11 +74,14 @@ Désignez l'objet avec le caractère "#" avant le nom de l'objet, puis entre acc Dans l'exemple suivant, le texte de l'objet portant le nom "okButton" sera affiché dans la police Helvetica Neue, avec une taille de 20 pixels : - #okButton { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +#okButton { + font-family: Helvetica Neue; + font-size: 20px; +} +``` + + ### Class @@ -84,25 +91,29 @@ Vous pouvez spécifier les classes à utiliser avec un caractère "." suivi du n Dans l'exemple suivant, le texte de tous les objets de la classe `okButtons` sera affiché dans la police Helvetica Neue, avec une taille de 20 pixels, alignée au centre : - .okButtons { - font-family: Helvetica Neue; - font-size: 20px; - text-align: center; - } - +``` +.okButtons { + font-family: Helvetica Neue; + font-size: 20px; + text-align: center; +} +``` Pour indiquer qu'un style doit être appliqué uniquement à des objets de type différent, spécifiez le type suivi de "." et du nom de la classe, puis déclarez entre accolades le(s) style(s) à appliquer. - text.center { - text-align: center; - stroke: red; - } - +``` +text.center { + text-align: center; + stroke: red; +} +``` Dans la description du formulaire 4D, vous associez un nom de classe à un objet à l'aide de l'attribut `class`. Cet attribut contient un ou plusieurs noms de "class", séparés par un espace : - class: "okButtons important" - +``` +class: "okButtons important" +``` + ### Tous les objets @@ -112,10 +123,12 @@ Indiquez qu'un style doit s'appliquer à tous les objets de formulaire avec le c Dans l'exemple suivant, tous les objets auront un fond gris : - * { - fill: gray; - } - +``` +* { + fill: gray; +} +``` + ### Attributs spécifiques @@ -132,96 +145,146 @@ Spécifiez l'attribut entre parenthèses, puis entre accolades, déclarez le(s) | [attribute~="valeur"] | les objets dont la valeur de l'`attribute` correspond à la "valeur" présente dans une liste de mots séparés par des espaces | | [attribute|="valeur"] | les objets dont l'`attribute` contient une valeur qui commence par celle de "valeur" | - #### Exemples Tous les objets ayant l'attribut `borderStyle` auront des lignes violettes : - [borderStyle] - { - stroke: purple; - } - +``` +[borderStyle] +{ + stroke: purple; +} +``` Tous les objets de type texte ayant un attribut text dont la valeur est "Hello" auront des lettres bleues : - text[text=Hello] - { - stroke: blue; - } - + +``` +text[text=Hello] +{ + stroke: blue; +} +``` Tous les objets ayant un attribut text dont la valeur est "Hello" auront des traits bleus : - [text~=Hello] - { - stroke: blue; - } - - +``` +[text~=Hello] +{ + stroke: blue; +} + +``` Tous les objets de type texte ayant un attribut text dont la valeur commence par "Hello" auront des lettres jaunes : - text[text|=Hello] - { - stroke: yellow; - } - +``` +text[text|=Hello] +{ + stroke: yellow; + + +} +``` + ## Déclarations de feuilles de style -La majorité des attributs d'objet formulaire peuvent être définis dans une feuille de style, à l'exception des attributs suivants : +### Media Queries -- "method" -- "type" -- "type" -- "class" -- choiceList, excludedList, labels, list, requiredList (type liste) +Media queries are used to apply color schemes to an application. -Les attributs d'objet formulaire peuvent être déclarés avec leur nom JSON en tant qu'attributs CSS (à l'exclusion des types d'objet, méthodes, événements et listes). Pour plus d'informations, voir la page **Formulaires dynamiques** dans le manuel du mode Développement. +A media query is composed of a media feature and a value (e.g., \:\ ). -### Mappage d'attributs -Les attributs répertoriés ci-dessous peuvent accepter le nom 4D ou le nom CSS. +Available media features: + +* `prefers-color-scheme` + + +Available media feature expressions: + +* **light**
      For using a light scheme +* **dark**
      For using a dark scheme + +> Color schemes are only supported on macOS. + +##### Exemple + +This CSS defines a color combination for text and text background in the light scheme (default) and another combination when the dark scheme is selected: + +``` +@media (prefers-color-scheme: light) { + .textScheme { + fill: LightGrey; + stroke: Black; + } +} -| 4D | CSS | -| -------------- | ---------------- | -| borderStyle | border-style | -| border-style | background-color | -| fontFamily | font-family | -| fontSize | font-size | -| fontStyle | font-style | -| fontWeight | font-weight | -| stroke | color | -| textAlign | text-align | -| textDecoration | text-decoration | -| verticalAlign | vertical-align | +@media (prefers-color-scheme: dark) { + .textScheme { + fill: DarkSlateGray; + stroke: LightGrey; + } +} +``` -> Les valeurs spécifiques à 4D (*ex :* "enfoncées") ne sont pas prises en charge lors de l'utilisation de noms d'attribut CSS. +### Object Attributes -### Valeurs d'attributs spécifiques +La majorité des attributs d'objet formulaire peuvent être définis dans une feuille de style, à l'exception des attributs suivants : + - `method` + - `type` + - `class` + - `event` + - `choiceList`, `excludedList`, `labels`, `list`, `requiredList` (list type) + +Form object attributes can be declared with their [JSON name](FormObjects/properties_Reference.md) as CSS attributes (not including object types, methods, events, and lists). + +#### Mappage d'attributs + +Les attributs répertoriés ci-dessous peuvent accepter le nom 4D ou le nom CSS. + +| 4D | CSS | +| ---------------- | ------------------ | +| `borderStyle` | `border-style` | +| `border-style` | `background-color` | +| `fontFamily` | `font-family` | +| `fontSize` | `font-size` | +| `fontStyle` | `font-style` | +| `fontWeight` | `font-weight` | +| `stroke` | `color` | +| `textAlign` | `text-align` | +| `textDecoration` | `text-decoration` | +| `verticalAlign` | `vertical-align` | +> 4D-specific values (*e.g.*, `sunken`) are not supported when using CSS attribute names. + + +#### Valeurs d'attributs spécifiques - Pour les attributs `icon`, `picture`, et `customBackgroundPicture` qui prennent en charge un chemin vers une image, la syntaxe est la suivante : - icon: url("/RESOURCES/Images/Buttons/edit.png"); /* chemin absolu */ - icon: url("edit.png"); /* chemin relatif vers le fichier du formulaire */ - +``` +icon: url("/RESOURCES/Images/Buttons/edit.png"); /* chemin absolu */ +icon: url("edit.png"); /* chemin relatif vers le fichier du formulaire */ +``` - Pour `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` et `verticalLineStroke`, trois syntaxes sont prises en charge : - - - nom de la couleur css : `fill: red;` - - valeur valeur hexadécimale : `fill: #FF0000;` + + - Nom la couleur CSS : `fill: red;` + - Valeur hexadécimale : `fill: #FF0000;` - fonction `rgb()` : `fill:rgb(255,0,0)` -- Si une chaîne utilise des caractères interdits en CSS, vous pouvez l'entourer de guillemets simples ou doubles. Par exemple: - + +- Si une chaîne utilise des caractères interdits en CSS, vous pouvez l'entourer de guillemets simples ou doubles. Par exemple : - une référence xliff : `tooltip: ":xliff:CommonMenuFile";` - un datasource avec l'expression de champ : `dataSource: "[Table_1:1]ID:1";` + ## Ordre de priorité Les projets 4D hiérarchisent les définitions de style en conflit, d'abord par la définition du formulaire, puis par les feuilles de style. + ### JSON vs Feuille de style Si un attribut est défini dans la description du formulaire JSON et dans une feuille de style, 4D utilisera la valeur du fichier JSON. @@ -234,7 +297,6 @@ Pour remplacer ce comportement, la valeur du style doit être suivie d'une décl | ------------------------------ | ---------------- | ---------- | | `"text": "Button",` | `text: Edit;` | `"Button"` | - **Exemple 2 :** | Description du formulaire JSON | Feuille de style | 4D affiche | @@ -242,49 +304,53 @@ Pour remplacer ce comportement, la valeur du style doit être suivie d'une décl | `"text": "Button",` | `text: Edit !important;` | `"Edit"` | + + ### Feuilles de style multiples A l'exécution, 4D hiérarchise automatiquement les feuilles de style dans l'ordre suivant : -1. Le formulaire 4D chargera d’abord le fichier CSS par défaut `/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. S'il existe, il chargera alors un fichier CSS spécifique défini dans le formulaire JSON : - -* un fichier pour les deux plateformes : - - - "css": "" - - -* ou une liste de fichiers pour les deux plateformes : - - - "css": [ - "", - "" - ], - -* ou une liste de fichiers par plateforme : - - - "css": [ - {"path": "", "media": "mac"}, - {"path": "", "media": "windows"}, - ], - +1. Le formulaire 4D chargera d’abord le fichier CSS par défaut `/SOURCES/styleSheets.css`. +2. Il chargera ensuite le fichier CSS pour la plate-forme courante `/SOURCES/styleSheets__mac.css` ou `/SOURCES/styleSheets_windows.css`. +3. S'il existe, il chargera alors un fichier CSS spécifique défini dans le formulaire JSON : + + * un fichier pour les deux plateformes : + + ``` + "css": "" + ``` + + * ou une liste de fichiers pour les deux plateformes : + + ``` + "css": [ + "", + "" + ], + ``` + + * ou une liste de fichiers par plateforme : + + ``` + "css": [ + {"path": "", "media": "mac"}, + {"path": "", "media": "windows"}, + ], + ``` > Les chemins de fichiers peuvent être relatifs ou absolus. * Les chemins relatifs sont résolus par rapport au fichier de description de formulaire JSON. * Pour des raisons de sécurité, seuls les chemins de système de fichiers (filesystem) sont acceptés pour les chemins absolus. (*ex :*, "/RESOURCES", "/DATA") + ## Création ou modification d'une feuille de style Vous créez des feuilles de styles à partir d'un éditeur de feuilles de styles de votre choix, en sauvegardant le fichier sous une extension ".css" dans le dossier "/SOURCES" du projet. La Boîte à Outils fournit une page **Feuilles de style** sous forme de raccourci pour créer et modifier l'une des trois feuilles de style nommées en fonction de la plateforme. -1. Ouvrez la page **Styles** en choisissant la **Boîte à outils > Styles ** dans le menu Développement ou en cliquant sur l'icône **Boîte à outils** dans la barre d'outils de l'éditeur de formulaire. - +1. Ouvrez la page **Styles** en choisissant la **Boîte à outils > Styles ** dans le menu Développement ou en cliquant sur l'icône **Boîte à outils** dans la barre d'outils de l'éditeur de formulaire. + ![](assets/en/FormEditor/stylesheets.png) -2. Choisissez le type de feuille de style que vous souhaitez créer et cliquez sur le bouton **Créer** ou **Editer** : ![](assets/en/FormEditor/createButton.png) +2. Choisissez le type de feuille de style que vous souhaitez créer et cliquez sur le bouton **Créer** ou **Editer** : ![](assets/en/FormEditor/createButton.png) -3. La feuille de style s'ouvrira dans votre éditeur de texte par défaut. \ No newline at end of file +3. La feuille de style s'ouvrira dans votre éditeur de texte par défaut. diff --git a/website/translated_docs/fr/FormEditor/formEditor.md b/website/translated_docs/fr/FormEditor/formEditor.md new file mode 100644 index 00000000000000..83a51a3adf50dd --- /dev/null +++ b/website/translated_docs/fr/FormEditor/formEditor.md @@ -0,0 +1,778 @@ +--- +id: formEditor +title: Éditeur de formulaire +--- + +4D propose un éditeur de formulaires très complet qui vous permet de modifier votre formulaire jusqu’à ce que vous ayez atteint le résultat escompté. Dans l’éditeur de formulaires, vous pouvez créer et supprimer des objets, manipuler directement des objets et définir les propriétés des objets et des formulaires. + + +## Interface + +L’éditeur de formulaires affiche chaque formulaire JSON ouvert dans sa propre fenêtre, dotée d’une barre d’outils et d’une barre d’objets. Vous pouvez ouvrir plusieurs formulaires en même temps. + +### Display options + +You can show or hide several interface elements on the current page of the form: + +- **Inherited Form**: Inherited form objects (if there is an [inherited form](forms.md#inherited-forms)). +- **Page 0**: Objects from [page 0](forms.md#form-pages). Cette option vous permet de mieux visualiser et distinguer les objets de la page courante et ceux de la page 0. +- **Paper**: Borders of the printing page, which are shown as gray lines. This element can only be displayed by default in ["for printing" type](properties_FormProperties.md#form-type) forms. +- **Rulers**: Rulers of the Form editor’s window. +- **Markers**: Output control lines and associated markers that show the limits of the form’s different areas. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Marker Labels**: Marker labels, available only when the output control lines are displayed. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Limits**: Form’s limits. Lorsque cette option est sélectionnée, le formulaire est affiché dans l’éditeur tel qu’il apparaîtra en mode Application. Cette possibilité est particulièrement intéressante pour ajuster un formulaire sans devoir tester le mode Application pour visualiser le résultat. +> > The [**Size Based on**](properties_FormSize.md#size-based-on), [**Hor. margin**](properties_FormSize.md#hor-margin) and [**Vert. margin**](properties_FormSize.md#vert-margin) settings of the form properties affect the form’s limits. Les limites du formulaire sont calculées en fonction des objets qui le composent. Lorsque vous déplacez ou agrandissez un objet placé près de la limite d’un formulaire, le rectangle de délimitation est modifié en conséquence. + +#### Default display + +When a form is opened in the editor, interface elements are displayed or hidden by default, depending on: + +- the **New form default display** options set in the Preferences - unchecked options cannot be displayed by default. +- the current [form type](properties_FormProperties.md#form-type): + - Markers and marker labels are always displayed by default on list forms + - Paper is displayed by default on "for printing" forms. + +#### Display/Hide elements + +You can display or hide elements at any moment in the Form editor’s current window by selecting **Display** from the **Form** menu or the Form editor's context menu: + +![](assets/en/FormEditor/showHideElements.png) + + +### Rulers + +Les règles situées sur le côté et en bas de cette fenêtre ont pour but de vous aider à placer les objets dans le formulaire. They can be [displayed or hidden](#display-options). + +Select **Ruler definition...** from the **Form** menu to change measurement units so that the form displays inches, centimeters, or pixels. + +### Barre d’outils + +La barre d’outils de l’éditeur de formulaires propose un ensemble d’outils destinés à manipuler et modifier le formulaire. Chaque fenêtre dispose de sa propre barre d’outils. + +![](assets/en/FormEditor/toolbar.png) + +La barre d’outils comporte les éléments suivants : + +| Icône | Nom | Description | +| --------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/execute.png) | Exécuter le formulaire | Permet de tester l’exécution du formulaire. Lorsque vous cliquez sur ce bouton, 4D ouvre une nouvelle fenêtre et affiche le formulaire dans son contexte (liste d’enregistrements pour un formulaire liste et enregistrement courant en page pour un formulaire détaillé). Le formulaire est exécuté dans le process principal. | +| ![](assets/en/FormEditor/selection.png) | [Flèche de sélection](#selecting-objects) | Permet de sélectionner, déplacer et redimensionner les objets du formulaire.

      **Note** : Lorsqu’un objet de type Texte ou Zone de groupe est sélectionné, appuyer sur la touche **Entrée** permet de le passer en édition. | +| ![](assets/en/FormEditor/zOrder.png) | [Ordre de saisie](#data-entry-order) | Passe en mode “Ordre de saisieâ€, dans lequel il est possible de visualiser et de modifier l’ordre de saisie courant du formulaire. A noter que vous pouvez également visualiser l’ordre de saisie courant tout en travaillant dans le formulaire. | +| ![](assets/en/FormEditor/moving.png) | [Déplacement](#moving-objects) | Passe en mode “Déplacementâ€, dans lequel il est possible d’atteindre rapidement n’importe quelle partie du formulaire en le faisant directement glisser dans la fenêtre. Le curseur prend la forme d’une main. Ce mode de navigation est particulièrement utile en cas de zoom dans le formulaire. | +| ![](assets/en/FormEditor/zoom.png) | [Zoom](#zoom) | Permet de modifier l’échelle d’affichage du formulaire (100% par défaut). Vous pouvez passer en mode “Zoom†en cliquant sur le bouton loupe ou en cliquant directement sur la barre correspondant à l’échelle désirée. Cette fonction est détaillée dans le paragraphe précédent. | +| ![](assets/en/FormEditor/alignment.png) | [Alignement](#aligning-objects) | Ce bouton est associé à un menu permettant d’aligner les objets dans le formulaire. Il est activé (ou non) en fonction des objets sélectionnés.

      Disponible uniquement avec un aperçu CSS Aucun | +| ![](assets/en/FormEditor/distribution.png) | [Répartition](#distributing-objects) | Ce bouton est associé à un menu permettant de répartir les objets dans le formulaire. Il est activé (ou non) en fonction des objets sélectionnés.

      Disponible uniquement avec un aperçu CSS Aucun | +| ![](assets/en/FormEditor/level.png) | [Niveau](#layering-objects) | Ce bouton est associé à un menu permettant de répartir les objets dans le formulaire. Il est activé (ou non) en fonction des objets sélectionnés. | +| ![](assets/en/FormEditor/group.png) | [Groupement/Dégroupement](#grouping-objects) | Ce bouton est associé à un menu permettant de grouper et dégrouper la sélection d’objets du formulaire. Il est activé (ou non) en fonction des objets sélectionnés. | +| ![](assets/en/FormEditor/displyAndPage.png) | [Affichage et gestion des pages](forms.html#form-pages) | Cette zone permet de passer d’une page du formulaire à une autre et d’ajouter des pages. Pour naviguer parmi les pages du formulaire, cliquez sur les boutons fléchés ou cliquez sur la zone centrale et choisissez la page à afficher dans le menu qui apparaît. Si vous cliquez sur le bouton fléché de droite alors que vous êtes sur la dernière page du formulaire, 4D vous permet d’ajouter une page. | +| ![](assets/en/FormEditor/cssPreviewicon.png) | [CSS Preview](#css-preview) | Ce bouton permet de sélectionner le mode CSS à utiliser. | +| ![](assets/en/FormEditor/views.png) | [Gestion des vues](#views) | Ce bouton affiche ou masque alternativement la palette des vues. Cette fonction est détaillée dans la section Utiliser les vues d'objet. | +| ![](assets/en/FormEditor/shields2.png) | [Affichage des badges](#shields) | Chaque clic sur ce bouton provoque l’affichage successif de tous les types de badges de formulaire. Le bouton est également associé à un menu permettant de sélectionner directement le type de badge à afficher. | +| ![](assets/en/FormEditor/library.png) | [Bibliothèque d'objets préconfigurés](objectLibrary.html) | Ce bouton affiche la fenêtre de la bibiliothèque d'objets préconfigurée, proposant de nombreux objets auxquels des propriétés par défaut ont déjà été appliquées. | +| ![](assets/en/FormEditor/listBoxBuilder1.png) | [Création de list box](#list-box-builder) | Ce bouton crée de nouvelles list box de type entity selection. | + +### Object bar + +The object bar contains all the active and inactive objects that can be used in 4D forms. Some objects are grouped together by themes. Each theme includes several alternatives that you can choose between. When the object bar has the focus, you can select the buttons using the keys of the keyboard. The following table describes the object groups available and their associated shortcut key. + +| Bouton | Group | Key | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:---:| +| ![](assets/en/FormEditor/text.png) | [Text](FormObjects/text.md) / [Group Box](FormObjects/groupBox.md) | T | +| ![](assets/en/FormEditor/input.png) | [Input](FormObjects/input_overview.md) | F | +| ![](assets/en/FormEditor/listbox.png) | [Hierarchical List](FormObjects/list_overview.md) / [List Box](FormObjects/listbox_overview.md) | L | +| ![](assets/en/FormEditor/combo.png) | [Combo Box](FormObjects/comboBox_overview.md) / [Drop-down List](FormObjects/dropdownList_Overview.md) / [Picture Pop-up Menu](FormObjects/picturePopupMenu_overview.md) | P | +| ![](assets/en/FormEditor/button.png) | [Button](FormObjects/button_overview.md) / [Picture Button](FormObjects/pictureButton_overview.md) / [Button Grid](FormObjects/buttonGrid_overview.md) | B | +| ![](assets/en/FormEditor/radio.png) | [Bouton radio](FormObjects/radio_overview.md) | R | +| ![](assets/en/FormEditor/checkbox.png) | [Case à cocher](FormObjects/checkbox_overview.md) | C | +| ![](assets/en/FormEditor/indicator.png) | [Progress Indicator](FormObjects/progressIndicator.md) / [Ruler](FormObjects/ruler.md) / [Stepper](FormObjects/stepper.md) / [Spinner](FormObjects/spinner.md) | I | +| ![](assets/en/FormEditor/rectangle.png) | [Rectangle](FormObjects/shapes_overview.md#rectangle) / [Line](FormObjects/shapes_overview.md#line) / [Oval](FormObjects/shapes_overview.md#oval) | S | +| ![](assets/en/FormEditor/splitter.png) | [Splitter](FormObjects/splitters.md) / [Tab Control](FormObjects/tabControl.md) | D | +| ![](assets/en/FormEditor/plugin.png) | [Plug-in Area](FormObjects/pluginArea_overview.md) / [Subform](FormObjects/subform_overview.md) / [Web Area](FormObjects/webArea_overview.md) / [4D Write Pro](FormObjects/writeProArea_overview.md) / [4D View Pro](FormObjects/viewProArea_overview.md) | X | + +To draw an object type, select the corresponding button and then trace the object in the form. After creating an object, you can modify its type using the Property List. Hold down the **Shift** key as you draw to constrain the object to a regular shape. Lines are constrained to horizontal, 45°, or vertical, rectangles are constrained to squares, and ovals are constrained to circles. + +The current variant of the theme is the object that will be inserted in the form. When you click the right side of a button, you access the variant menu: + +![](assets/en/FormEditor/objectBar.png) + +You can click twice on the button so that it remains selected even after you have traced an object in the form (continual selection). This function makes creating several successive objects of the same type easier. To cancel a continual selection, click on another object or tool. + +### Liste de propriétés + +Both forms and form objects have properties that control access to the form, the appearance of the form, and the behavior of the form when it is used. Form properties include, for example, the form’s name, its menu bar, and its size. Object Properties include, for example, an object’s name, its dimensions, its background color, and its font. + +You can display and modify form and object properties using the Property List. It displays either form or objects properties depending on what you select in the editor window. + +To display/hide the Property List, choose **Property List** from the **Form** menu or from the context menu of the Form editor. You can also display it by double-clicking in an empty area of the form. + +#### Raccourcis de navigation + +Vous pouvez naviguer dans la Liste des propriétés à l’aide des raccourcis suivants : + +* **Touches fléchées** haut ou bas ↑ ↓ : déplacement de cellule en cellule. +* **Touches fléchées** gauche ou droite ↠→ : déploie/contracte les thèmes ou les menus. +* **PgUp** et **PgDn** : sélectionne la première ou la dernière cellule visible de la liste affichée. +* **Début** et **Fin** : sélectionne la première ou la dernière cellule de la liste. +* **Ctrl+clic** (Windows) ou **Commande+clic** (Mac OS) sur un événement : sélectionne/désélectionne tous les événements, en fonction de l’état initial de l’événement sur lequel vous avez cliqué. +* **Ctrl+clic** (Windows) ou **Commande+clic** (Mac OS) sur un intitulé de thème : déploie/contracte tous les thèmes. + + + +## Manipulating Form Objects + +### Ajouter des objets + +Vous pouvez ajouter des objets dans un formulaire de nombreuses manières : + +* Par traçage d'un objet après sélection dans la barre d'objets (cf. paragraphe [Utiliser la barre d’objets](#using-the-object-bar)) +* Par glisser-déposer depuis la barre d'objets +* Par glisser-déposer ou copier-coller depuis la [bibliothèque d'objets](objectLibrary.md) préconfigurés +* Par glisser-déposer depuis un autre formulaire, +* Par glisser-déposer depuis l'Explorateur (champs) ou les éditeurs du mode Développement (énumérations, images, etc.) + +Une fois l'objet inséré, vous pouvez modifier toutes ses caractéristiques dans l'éditeur de formulaires. + +Vous pouvez travailler avec deux types d'objets dans vos formulaires : + +* **les objets statiques** (filets, cadres, images d'arrière-plan, etc.) : ces objets sont généralement utilisés pour le décor, les libellés ou encore l'interface graphique. Ces objets sont accessibles via la barre d'objets de l'éditeur de formulaires. Vous pouvez définir leurs attributs graphiques (taille, couleur, police...) ainsi que leurs propriétés de redimensionnement à l'aide de la Liste de propriétés. A la différence des objets actifs, les objets statiques ne sont pas associés à des variables. A noter qu'il est possible d'insérer des éléments dynamiques dans les objets statiques. + +* **les objets actifs** : un objet actif est un objet qui réalise une tâche ou une fonction de l’interface. Il existe de nombreux types d’objets actifs : champs, boutons, listes déroulantes, etc. Un objet actif est associé soit à un champ, soit à une variable. + +### Sélectionner des objets + +Avant de pouvoir réaliser une opération sur un objet (comme le changement de l’épaisseur d’une ligne ou d’une police), il est nécessaire de sélectionner cet objet. + +Pour sélectionner un objet à l’aide de la barre d’outils : + +1. Cliquez sur l’outil Flèche dans la barre d’outils.

      ![](assets/en/FormEditor/selection.png)

      Lorsque vous le faites glisser au-dessus du formulaire, le pointeur prend la forme du pointeur standard. +2. Cliquez sur l’objet que vous souhaitez sélectionner. Des poignées de sélection identifient l’objet sélectionné.

      ![](assets/en/FormEditor/selectResize.png) + +Pour sélectionner un objet à l’aide de la Liste des propriétés : + +1. Sélectionnez le nom de l’objet dans la liste de sélection située en haut de la palette.

      De cette manière, vous pouvez sélectionner un objet masqué par d’autres objets ou situé en-dehors des limites de la fenêtre. Pour désélectionner un objet, cliquez hors de ses limites ou cliquez dessus en maintenant la touche **Majuscule** enfoncée. +> Il est également possible de sélectionner des objets en double-cliquant dans la fenêtre de résultat d’une recherche globale. + +### Selecting multiple objects + +Il est souvent nécessaire de réaliser la même opération sur plusieurs objets d’un formulaire — par exemple, pour les déplacer, les aligner ou changer leur apparence. 4D vous permet de sélectionner plusieurs objets en même temps. Vous pouvez réaliser une sélection multiple en utilisant l’une des solutions suivantes : + +* Choisissez **Tout sélectionner** dans le menu Edition. +* Cliquez avec le bouton droit de la souris sur un objet et choisissez la commande **Sélectionner objets de même type** dans le menu contextuel. +* Maintenez la touche **Maj** enfoncée et cliquez l’un après l’autre sur tous les objets que vous souhaitez sélectionner. +* Cliquez hors du groupe d’objets que vous souhaitez sélectionner et dessinez un rectangle de sélection entourant ou traversant les objets à sélectionner. Tout objet inclus dans les limites du rectangle ou qui touche ces limites est sélectionné lorsque vous relâchez le bouton de la souris. +* Maintenez enfoncée la touche **Alt** (sous Windows) ou **Option** (sous Mac Os) et tracez un rectangle de sélection. Dans ce cas, seuls les objets entièrement inclus dans ce rectangle seront sélectionnés. + +La fenêtre ci-dessous représente la sélection de deux objets à l’aide d’un rectangle de sélection : + +![](assets/en/FormEditor/selectMultiple.png) + +Pour désélectionner un objet qui fait partie d’un groupe d’objets sélectionnés, maintenez la touche **Majuscule** enfoncée et cliquez sur cet objet. Les autres objets demeurent sélectionnés. Pour désélectionner tous les objets, cliquez hors des limites de ces objets. + + +### Dupliquer des objets + +Vous pouvez dupliquer tout objet de formulaire, y compris les objets actifs. Les copies d’objets actifs conservent toutes les propriétés de l’objet original comme le nom, le type, l’action automatique, le format d’affichage et la méthode objet. + +Vous pouvez dupliquer directement un objet ou une sélection d’objets, ou utiliser la boîte de dialogue “Dupliquer plusieurs†pour paramétrer une duplication multiple d’objets. Cette boîte de dialogue vous permet de créer autant de duplicata d’un ou de plusieurs objets que vous voulez, en une seule opération. + +Pour dupliquer directement un ou plusieurs objet(s) : + +1. Sélectionnez le ou les objet(s) que vous souhaitez dupliquer. +2. Choisissez la commande **Dupliquer** dans le menu **Edition**. 4D crée une copie de chaque objet sélectionné et place la copie juste à côté de l’original. +3. Déplacez la copie à l’emplacement souhaité. Si vous choisissez de nouveau la commande Dupliquer, 4D crée une autre copie pour chaque objet et la place exactement au même placement relatif par rapport à la première copie. Si vous devez répartir plusieurs copies d’un objet sur un axe, appliquez la procédure suivante. Dupliquez l’objet original, déplacez la copie à un autre emplacement sur le formulaire, puis dupliquez la copie. La deuxième copie adopte le même positionnement relatif par rapport à la première copie que celui qui existe entre la position de l’original et celle de la première copie. Les copies suivantes seront alors placées avec le même écart par rapport à leur original. Le schéma ci-dessous explique le fonctionnement du placement relatif des copies : + +![](assets/en/FormEditor/duplicateObjects.png) + + +#### Dupliquer plusieurs + +La boîte de dialogue “Dupliquer plusieurs†apparaît lorsque vous sélectionnez un ou plusieurs objet(s) puis choisissez la commande **Dupliquer plusieurs...** dans le menu **Objets**. + +![](assets/en/FormEditor/duplcateMany.png) + +* Dans la zone supérieure, saisissez le nombre de colonnes et de lignes d’objets que vous souhaitez obtenir.

      Par exemple, si vous voulez obtenir 3 colonnes et 2 lignes d’objets, saisissez 3 dans la zone Colonne(s) et 2 dans la zone Ligne(s). Si vous souhaitez ajouter horizontalement deux copies d’un objet, saisissez 3 dans la zone Colonnes (laissez la zone Ligne(s) à 1). + +* Pour les lignes et les colonnes, définissez le décalage que vous souhaitez appliquer à chaque nouveau duplicata.

      La valeur saisie doit être exprimée en points et sera appliquée relativement à l’origine de l’objet dupliqué.

      Par exemple, si vous souhaitez laisser un intervalle vertical de 20 points entre chaque objet, et que la hauteur de l’objet source est de 50 points, saisissez 70 dans la zone “Intervalle†de Colonne. + +* Si vous souhaitez créer une matrice de variables, cochez l’option **Numéroter les variables** et sélectionnez le sens dans lequel la numérotation des variables doit s’effectuer. Cette option n’est active que si l’objet sélectionné est une variable. Pour plus d’informations sur cette option, reportez-vous à la section **Dupliquer sur matrice** du *Manuel de développement*. + + +### Déplacer des objets + +Vous pouvez déplacer tout objet d’un formulaire, graphique ou actif, y compris les champs ou les objets créés à l’aide d’un modèle. Pour déplacer un objet, vous pouvez : + +* Déplacer l’objet en le faisant glisser avec la souris, +* Déplacer l’objet pixel par pixel en utilisant les touches fléchées du clavier, +* Déplacer l’objet par paliers (de 20 pixels par défaut), + +Lorsque vous commencez à déplacer un objet à l'aide de la souris, les poignées disparaissent. 4D affiche des marqueurs qui indiquent l’emplacement des limites de l’objet dans les règles, vous pouvez ainsi placer les objets avec précision. Prenez garde à ne pas cliquer sur les poignées, ce qui aurait pour effet de redimensionner l’objet. Appuyez sur la touche **Majuscule** pour effectuer un déplacement avec contrainte. + +Si la [grille magnétique](#using-the-magnetic-grid) est activée, le déplacement de l’objet s’effectue par paliers indiquant les emplacements remarquables. + +Pour déplacer un objet pixel par pixel : + +* Sélectionnez le ou les objet(s) que vous souhaitez déplacer. A chaque fois que vous appuyez sur une touche fléchée, la sélection est déplacée d’un pixel dans la direction de la flèche. + +Pour déplacer l’objet par paliers : + +* Sélectionnez le ou les objet(s) que vous souhaitez déplacer, appuyez sur la touche **Majuscule** et utilisez les touches fléchées du clavier pour déplacer l’objet par paliers. Par défaut, les paliers sont de 20 pixels. Vous pouvez modifier le pas dans la Page Formulaires des Préférences. + + +### Grouper des objets + +4D vous permet de grouper des objets de manière à ce que vous puissiez sélectionner, déplacer et modifier ce groupe comme un seul objet. Les objets qui sont groupés conservent leur position relative par rapport aux autres objets du groupe. Les objets groupés sont par exemple un champ et son libellé, un bouton invisible et son icône, etc. + +Lorsque vous redimensionnez un groupe, tous les objets du groupe sont redimensionnés proportionnellement (hormis les zones de texte, qui sont redimensionnées par étape suivant leur taille de police de caractères). + +Vous pouvez dégrouper un groupe d’objets à tout moment et les traiter de nouveau comme des objets indépendants. + +Un objet actif qui a été groupé doit être dégroupé pour que vous puissiez accéder à ses propriétés ou à sa méthode. Il est toutefois possible de sélectionner un objet appartenant à un groupe sans devoir dégrouper l’ensemble : pour cela, effectuez **Ctrl+clic** (Windows) ou **Commande+clic** (Mac Os) sur l’objet (le groupe doit être sélectionné au préalable). + +Grouper des objets n’a d’effet que dans l’éditeur de formulaires. Lors de l’exécution du formulaire, tous les objets groupés (hormis les boutons radio dans les bases binaires) se comportent comme s’ils étaient indépendants. +> Il n’est pas possible de grouper des objets appartenant à des vues différentes et seuls les objets appartenant à la vue courante peuvent être groupés (cf. section [Utiliser les vues d'objet](#views)). + +Pour grouper les objets : + +1. Sélectionnez les objets que vous souhaitez grouper. +2. Sélectionnez **Grouper** dans le menu Objets.

      OU

      Cliquez sur le bouton Grouper dans la barre d’outils de l’éditeur de formulaires :

      ![](assets/en/FormEditor/group.png)

      4D matérialise les bordures du groupe avec des poignées. Les objets du groupe ne sont plus marqués séparément par des poignées. Désormais, lorsque vous modifiez le groupe d’objets, vous modifiez tous les objets qui le composent. + +Pour dégrouper un groupe d’objets : + +1. Sélectionnez le groupe que vous souhaitez dégrouper. +2. Choisissez **Dégrouper** dans le menu **Objets**.

      OU

      Sélectionnez la commande **Dégrouper** (menu du bouton **Grouper**) dans la barre d’outils de l’éditeur de formulaires.

      Si la commande **Dégrouper** est désactivée, cela veut dire que l’objet sélectionné est déjà sous sa forme la plus simple.

      4D rematérialise les bordures des objets qui constituaient le groupe avec des poignées. + + +### Aligner des objets + +Vous pouvez aligner un ensemble d’objets entre eux ou à l’aide d’une grille magnétique. + +* Vous pouvez aligner entre eux des objets sur le haut, le bas, le côté, le centre horizontal ou le centre vertical. Vous pouvez aligner directement une sélection d’objets ou utiliser une boîte de dialogue vous permettant d’appliquer tout type d’alignement et de répartition aux objets sélectionnés. Cette boîte de dialogue vous permet en outre de sélectionner l’objet par rapport auquel vous voulez aligner les autres et de prévisualiser le résultat de vos paramétrages. +* Lorsque vous utilisez la grille magnétique, chaque objet peut être aligné manuellement avec les autres sur la base de positions “remarquables†représentées visuellement. + +#### Utiliser les outils et les commandes d’alignement direct + +Le sous-menu Aligner du menu Objets (ou du menu contextuel de l’éditeur) et les outils d’alignement de la barre d’outils vous permettent de rapidement aligner entre eux des objets sélectionnés. + +![](assets/en/FormEditor/alignmentMenu.png) + +Lorsque 4D aligne des objets, il utilise l’objet le plus avancé dans la direction de l’alignement comme “ancre†sur laquelle tous les autres objets vont être alignés. This object is the “anchor.†It uses the object that is the furthest in the alignment’s direction as the anchor and aligns the other objects to that object. Par exemple, si vous alignez un groupe d’objets à droite, les objets seront alignés sur le côté droit de l’objet situé le plus à droite. Voici le résultat des alignements "aucun", "à gauche", "centré horizontalement" et "à droite" : + +![](assets/en/FormEditor/alignmentTools.png) + +#### Utiliser la boîte de dialogue d’alignement + +La boîte de dialogue d’alignement vous permet d’appliquer tout type d’alignement et/ou de répartition aux objets sélectionnés. + +![](assets/en/FormEditor/alignmentAssistant.png) + + +Pour afficher cette boîte de dialogue, vous devez sélectionner les objets que vous souhaitez aligner puis choisir la commande **Alignement...** dans le sous-menu **Aligner** du menu **Objets** ou du menu contextuel de l’éditeur. + +* Cliquez sur l’icône d’alignement de votre choix dans les zones “Alignement droite/gauche†et/ou “Alignement haut/basâ€.

      La zone d’exemple illustre le principe de l’opération sélectionnée. + +* Pour effectuer un alignement standard des objets sélectionnés, cliquez sur le bouton **Prévisualisation** ou **Appliquer**.

      Dans ce cas, 4D utilisera l’objet le plus avancé dans la direction de l’alignement comme “ancre†sur laquelle tous les autres objets vont être alignés. Par exemple, si vous alignez un groupe d’objets à droite, les objets seront alignés sur le côté droit de l’objet situé le plus à droite.

      OU BIEN :

      Pour aligner le groupe d’objets par rapport un objet particulier, cochez l’option **Aligner sur** puis sélectionnez dans la liste déroulante le nom de l’objet par rapport auquel aligner les autres. Dans ce cas, la position de l’objet de référence ne variera pas. + +Vous pouvez prévisualiser le résultat réel de vos paramétrages en cliquant sur le bouton **Prévisualisation**. l’opération s’effectue dans l’éditeur de formulaires, mais la boîte de dialogue reste au premier plan. Vous pouvez alors Appliquer ou Annuler les modifications. +> Cette boîte de dialogue combine l’alignement d’objets et leur répartition. Pour plus d’informations sur la répartition, reportez-vous au paragraphe [Répartir des objets](#distributing-objects). + +#### Utiliser l’alignement magnétique + +L’éditeur de formulaires est doté d’une grille magnétique virtuelle qui peut vous aider à placer et à aligner des objets sur un formulaire. L’alignement magnétique des objets est basée sur la position relative des objets entre eux. Le magnétisme n’est utilisable que lorsqu’au moins deux objets sont présents dans le formulaire. + +Le principe est le suivant : lorsque vous faites glisser un objet dans le formulaire, 4D indique des emplacements possibles pour cet objet sur la base d’alignements remarquables avec les autres objets du formulaire. Un alignement remarquable est établi à chaque fois que : + +* Horizontalement, les extrémités ou les centres de deux objets coïncident, +* Verticalement, les extrémités de deux objets coïncident. + +A ce moment, 4D place l’objet à l’emplacement et affiche un trait rouge indiquant l’alignement remarquable pris en compte : + +![](assets/en/FormEditor/magneticGrid1.png) + +En ce qui concerne la répartition des objets, 4D propose une distance basée sur les standards d’interface (20 points). Comme pour l’alignement magnétique, des traits rouges indiquent les distances remarquables au moment où elles sont atteintes. + +![](assets/en/FormEditor/magneticGrid2.png) + +Ce fonctionnement s’applique à tous les types d’objets des formulaires. Le magnétisme peut être activé ou désactivé à tout moment à l’aide de la commande **Activer la grille magnétique** du menu **Formulaire** ou du menu contextuel de l’éditeur. Il est également possible de définir l’activation par défaut de cette fonction dans la page **Préférences** >**Formulaires** (option **Activer l'auto-alignement par défaut**). Il est possible d’activer ou de désactiver manuellement la grille magnétique lorsqu’un objet est sélectionné en appuyant sur la touche **Ctrl** (Windows) ou **Control** (Mac Os). +> Le magnétisme entraîne également l’observation de paliers lors du redimensionnement manuel des objets. + +### Distributing objects + +Vous pouvez répartir des objets de manière à ce qu’ils soient disposés en respectant un espacement égal entre eux. Pour cela, vous pouvez utiliser des commandes directes de répartition ou passer par l’intermédiaire de la boîte de dialogue d’alignement et répartition pour effectuer des répartitions spécifiques ou combiner alignement et répartition. The latter allows you to align and distribute objects in one operation. +> Lorsque la [grille magnétique](#using-the-magnetic-grid) est activée, une aide visuelle est également fournie pour la répartition lors du déplacement manuel d’un objet. + +Pour répartir directement une sélection d’objets (verticalement ou horizontalement) : + +1. Sélectionnez les objets (au moins trois) que vous souhaitez répartir. + +2. Dans la barre d’outils, cliquez sur l’outil de répartition qui correspond la répartition que vous souhaitez appliquer.

      ![](assets/en/FormEditor/distributionTool.png)

      OU

      Choisissez la commande Répartir horizontalement ou Répartir verticalement dans le sous-menu **Aligner** du menu **Objets** ou du menu contextuel de l'éditeur.

      4D répartit les objets par rapport à leurs centres, la plus grande distance entre deux objets contigus est utilisée comme distance de référence. + +Pour répartir des objets à l’aide de la boîte de dialogue d'alignement et répartition : + +1. Sélectionnez les objets que vous souhaitez répartir. + +2. Choisissez la commande **Alignement...** dans le sous-menu **Aligner** du menu **Objets** ou du menu contextuel de l’éditeur.

      La boîte de dialogue suivante apparaît :![](assets/en/FormEditor/alignmentAssistant.png) + +3. Cliquez sur l’icône de répartition standard (horizontale ou verticale) de votre choix: ![](assets/en/FormEditor/horizontalDistribution.png)

      (icône de répartition horizontale standard)

      La zone d’exemple illustre le principe de l’opération sélectionnée. + +4. Pour effectuer une répartition standard, cliquez sur le bouton **Prévisualisation** ou *Appliquer*.

      Dans ce cas, les objets seront répartis de manière à ce que leurs côtés soient équidistants (répartition standard).

      OU BIEN :

      Pour effectuer une répartition spécifique (par exemple répartir les objets de manière à ce que leurs côtés droits — et non plus leurs intervalles soient équidistants), cochez une option **Répartir**. This option acts like a switch. Lorsque l'option Répartir est cochée, les icônes situées au-dessous d’elle s’appliquent alors à la répartition : + + * Horizontalement, les icônes correspondent aux répartitions suivantes : équidistance des côtés gauches, des centres (hor.) et des côtés droits des objets sélectionnés. + * Verticalement, les icônes correspondent aux répartitions suivantes : équidistance des bords supérieurs, des centres (vert.) et des bords inférieurs des objets sélectionnés. + + Vous pouvez prévisualiser le résultat réel de vos paramétrages en cliquant sur le bouton **Prévisualisation** : l’opération s’effectue dans l’éditeur de formulaires, mais la boîte de dialogue reste au premier plan. Vous pouvez alors Appliquer ou Annuler les modifications. Vous pouvez alors **Appliquer** ou **Annuler** les modifications. +> Cette boîte de dialogue vous permet de combiner l’alignement d’objets et leur répartition. Pour plus d’informations sur l’alignement, reportez-vous au paragraphe [Aligner des objets](#aligning-objects). + + +### Gérer les plans des objets + +Il est parfois nécessaire de réorganiser certains objets qui occultent d’autres objets du formulaire. Par exemple, vous pouvez souhaiter voir apparaître un graphique derrière les champs dans un formulaire. 4D propose 4 commandes, **Passer au dernier plan**, **Passer au premier plan**, **Plan suivant** et **Plan précédent**, qui vous permettent d’organiser les plans des objets du formulaire. These layers also determine the default entry order (see Modifying data entry order). La fenêtre ci-dessous représente des objets organisés en couches : + +![](assets/en/FormEditor/layering.png) + +Pour modifier le plan d'un objet, sélectionnez-le et choisissez : + +* Une des commandes **Passer à l'avant-plan**, **Passer au dernier plan**, **Plan suivant** et **Plan précédent** dans le menu Objet, +* Une des commandes du sous-menu **Plan>** du menu contextuel de l'éditeur, +* Une des commandes associées au bouton de gestion des plans de la barre d'outils. + +![](assets/en/FormEditor/level2.png) +> Lorsque plusieurs objets sont superposés, le raccourci **Ctrl+clic** / **Commande+clic** permet de sélectionner successivement chaque objet en descendant d’un plan à chaque clic. + +Pour ordonner les différents plans, 4D va toujours de l’arrière-plan vers l’avant-plan. Par conséquent, le plan précédent fait reculer la sélection d’objets d’un plan vers l’arrière-plan du formulaire. Le plan suivant fait avancer la sélection d’objets d’un plan vers l’avant-plan du formulaire. + +### Ordre de saisie des données + +L’ordre de saisie est l’ordre dans lequel les champs, les sous-formulaires et les autres objets actifs sont sélectionnés lorsque vous appuyez sur la touche **Tabulation** ou **Retour chariot** dans un formulaire. Il est possible de parcourir le formulaire dans le sens inverse de l’ordre de saisie en appuyant sur les touches **Maj+Tabulation** ou **Maj+Retour chariot**. + +> You can change the entry order at runtime using the `FORM SET ENTRY ORDER` and `FORM GET ENTRY ORDER` commands. + +Every object that supports the focusable property is included in the data entry order by default. + +Setting the entry order for a JSON form is done with the [`entryOrder`](properties_JSONref.md) property. + +Si vous ne spécifiez pas d’ordre de saisie personnalisé, 4D utilise par défaut le plan des objets comme ordre de saisie, dans le sens “arrière-plan vers premier plan.†Par défaut, l’ordre de saisie correspond donc à l’ordre de création des objets dans le formulaire. + +Dans certains formulaires, il est nécessaire de définir un ordre de saisie personnalisé. Ci-dessous par exemple, des champs supplémentaires relatifs à l’adresse ont été ajoutés après la création du formulaire. The resulting standard entry order thus becomes illogical and forces the user to enter the information in an awkward manner: + +![](assets/en/FormEditor/entryOrder1.png) + +Il est dans ce cas nécessaire de personnaliser l’ordre de saisie afin de proposer une progression plus logique : + +![](assets/en/FormEditor/entryOrder2.png) + +#### Visualiser et modifier l’ordre de saisie + +Vous pouvez visualiser l’ordre de saisie courant soit à l’aide des badges “Ordre de saisieâ€, soit à l’aide du mode “Ordre de saisieâ€. En revanche, vous ne pouvez modifier l’ordre de saisie qu’en mode “Ordre de saisieâ€. + +Ce paragraphe décrit la visualisation et la modification de l’ordre de saisie en mode “Ordre de saisieâ€. Pour plus d’informations sur la visualisation de l’ordre de saisie à l’aide des badges, reportez-vous au paragraphe [Using shields](#using-shields). + +Pour visualiser ou modifier l’ordre de saisie : + +1. Sélectionnez **Ordre de saisie** dans le menu **Formulaire** ou cliquez sur le bouton dans la barre d’outils de la fenêtre :

      ![](assets/en/FormEditor/zOrder.png)

      Le pointeur prend la forme d’un pointeur d’ordre, et 4D dessine une ligne qui permet de visualiser la séquence de l’ordre de saisie courant.

      Visualiser et modifier l’ordre de saisie sont les seules opérations que vous pouvez réaliser dans ce mode. + +2. Pour changer l’ordre de saisie, placez le pointeur sur un objet, cliquez dessus et, tout en maintenant le bouton de la souris enfoncé, déplacez le pointeur vers l’objet qui doit le suivre dans l’ordre de saisie.

      ![](assets/en/FormEditor/entryOrder3.png)

      4D ajuste l’ordre de saisie en conséquence. + +3. Répétez l’étape 2 autant de fois que nécessaire pour obtenir le nouvel ordre de saisie. + +4. Lorsque vous êtes satisfait de l’ordre de saisie, sélectionnez de nouveau la commande **Ordre de saisie** dans le menu **Formulaire**.

      4D retourne dans le mode de fonctionnement normal de l’éditeur de formulaires. + +> Seul l’ordre de saisie de la page courante du formulaire est affiché. Si le formulaire contient des objets saisissables sur la page 0 ou provenant d’un formulaire hérité, l’ordre de saisie par défaut est le suivant : Objets de la page zéro du formulaire hérité > Objets de la page 1 du formulaire hérité > Objets de la page zéro du formulaire ouvert > Objets de la page courante du formulaire ouvert. + + +#### Utiliser un groupe de saisie + +Lorsque vous changez l’ordre de saisie, vous pouvez sélectionner un groupe d’objets dans le formulaire afin que l’ordre de saisie s’applique aux objets du groupe. Ceci vous permet de définir facilement l’ordre de saisie pour les formulaires dans lesquels les champs sont organisés en groupes et colonnes. + +Pour créer un groupe de saisie : + +1. Sélectionnez **Ordre de saisie** dans le menu *Formulaire* ou cliquez sur le bouton dans la barre d’outils de la fenêtre. +2. Dessinez un rectangle de sélection autour des objets que vous souhaitez grouper pour la saisie. + +Lorsque vous relâchez le bouton de la souris, les objets contenus ou touchés par le rectangle suivent l’ordre de saisie par défaut. L’ordre de saisie des autres objets est réorganisé en conséquence. + +#### Exclure un objet de l’ordre de saisie + +By default, all objects that support the focusable property are included in the entry order. To exclude an object from the entry order: + +1. Select the Entry order mode, then + +2. **shift-click** on the object + +3. **right-click** on the object and select **Remove from entry order** option from the context menu + + + +## CSS Preview + +The Form editor allows you to view your forms with or without applied CSS values. + +When [style sheets](createStylesheet.md) have been defined, forms (including inherited forms and subforms) are opened in the CSS Preview mode for your operating system by default. + + +### Selecting CSS Preview Mode + +The Form editor toolbar provides a CSS button for viewing styled objects: + +![](assets/en/FormEditor/cssToolbar.png) + +Select one of the following preview modes from the menu: + +| Toolbar Icon | CSS Preview Mode | Description | +| ------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/cssNo.png) | Aucun | No CSS values are applied in the form and no CSS values or icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssWin.png) | Sous Windows | CSS values for Windows platform are applied in the form. CSS values and icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssMac.png) | macOS | CSS values for macOS platform are applied in the form. CSS values and icons displayed in the Property List. | +> If a font size too large for an object is defined in a style sheet or JSON, the object will automatically be rendered to accommodate the font, however the size of the object will not be changed. + +The CSS preview mode reflects the priority order applied to style sheets vs JSON attributes as defined in the [JSON vs Style Sheet](stylesheets.html#json-vs-style-sheet) section. + +Once a CSS preview mode is selected, objects are automatically displayed with the styles defined in a style sheet (if any). +> When copying or duplicating objects, only the CSS references (if any) and the JSON values are copied. + + +### CSS support in the Property List + +In CSS Preview mode, if the value of an attribute has been defined in a style sheet, the attribute's name will appear with a CSS icon displayed next to it in the Property List. For example, the attribute values defined in this style sheet: + +```4d +.myButton { +font-family: comic sans; +font-size: 14; +stroke: #800080; +} +``` + +are displayed with a CSS icon in the Property List: + +![](assets/en/FormEditor/cssPpropList.png) + +An attribute value defined in a style sheet can be overridden in the JSON form description (except if the CSS includes the `!important` declaration, see below). In this case, the Property List displays the JSON form value in **bold**. You can reset the value to its style sheet definition with the **Ctrl + click** (Windows) or **Command + click** (macOs) shortcuts. +> If an attribute has been defined with the `!important` declaration for a group, an object within a group, or any object within a selection of multiple objects, that attribute value is locked and cannot be changed in the Property List. + +#### Property List CSS Icons + +| Icône | Description | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/cssIcon.png) | Indicates that an attribute value has been defined in a style sheet | +| ![](assets/en/FormEditor/cssImportant.png) | Indicates that an attribute value has been defined in a style sheet with the `!important` declaration | +| ![](assets/en/FormEditor/cssIconMixed.png) | Displayed when an attribute value defined in a style sheet for at least one item in a group or a selection of multiple objects is different from the other objects | + + + +## Création de list box + +Vous pouvez créer rapidement de nouvelles list box de type sélection d'entités avec le **générateur de list box**. La nouvelle list box peut être utilisée immédiatement ou elle peut être modifiée via l'éditeur de formulaires. + +Le générateur de list box vous permet de créer et de remplir des list box de type sélection d'entités en quelques opérations simples. + + + +### Utilisation du générateur de list box + + +1. Dans la barre d'outils de l'éditeur de formulaire, cliquez sur l'icône du générateur de zone de liste : + + ![](assets/en/FormEditor/listboxBuilderIcon.png) + + Le générateur de list box s'affiche : + + ![](assets/en/FormEditor/listboxBuilder.png) + +2. Sélectionnez une table dans la liste déroulante **Table** : + + ![](assets/en/FormEditor/listboxBuilderTable.png) + +3. Sélectionnez les champs de la list box dans la zone **Champs** : + + ![](assets/en/FormEditor/listboxBuilderFields.png) + + Par défaut, tous les champs sont sélectionnés. Vous pouvez sélectionner ou désélectionner les champs individuellement ou utiliser **Ctrl+clic** (Windows) ou **Cmd+clic** (macOS) pour les sélectionner ou les désélectionner tous à la fois. + + Vous pouvez modifier l'ordre des champs via un glisser-déposer. + +4. L'expression qui permet de remplir les lignes de la list box à partir de la sélection d'entité est préremplie : + + ![](assets/en/FormEditor/listboxBuilderExpression.png) + + Cette expression peut être modifiée si nécessaire. + +5. En cliquant sur le bouton **Copier**, l'expression sera copiée pour charger tous les enregistrements en mémoire : + + ![](assets/en/FormEditor/listboxBuilderCode.png) + +6. Cliquez sur le bouton **Créer un widget** pour créer la list box. + + ![](assets/en/FormEditor/listboxBuilderBuild.png) + +La list box finale : + +![](assets/en/FormEditor/listboxBuilderListbox.png) + + + + + + + + + +## Badges + +L’éditeur de formulaires 4D permet d’utiliser des badges afin de faciliter la visualisation des propriétés des objets. Ils se trouvent dans la barre d'outils du formulaire : + +![](assets/en/FormEditor/shields.png) + + + + +Le principe de cette fonction est le suivant : chaque badge est associé à une propriété (par exemple **Vues**, signifiant que l'objet “est dans la vue couranteâ€). Lorsque vous activez un badge, 4D affiche une petite icône (un badge) en haut à gauche de chaque objet du formulaire auquel s’applique la propriété. + +![](assets/en/FormEditor/shield.png) + +### Utilisation des badges + +Pour activer un badge, cliquez sur l'icône *badge* jusqu’à ce que le badge souhaité soit sélectionné. Vous pouvez également cliquer sur la partie droite du bouton et sélectionner directement le type de badge à afficher dans le menu associé : + + +Pour ne pas afficher de badges, choisissez la ligne **Pas de badges** dans le menu de sélection. +> Vous pouvez définir les badges à afficher par défaut dans la Préférences de l’application. + +### Description du badge + +Voici la description de chaque type de badge : + +| Icône | Nom | Est affiché... | +| -------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/objectMethod.png) | Méthode objet | Pour les objets auxquels une méthode objet est associée | +| ![](assets/en/FormEditor/standardAction.png) | Action standard | Pour les objets auxquels une action standard est associée | +| ![](assets/en/FormEditor/resizing.png) | Redimensionnement | Pour les objets disposant d’au moins une propriété de redimensionnement, indique la combinaison de propriétés courante | +| ![](assets/en/FormEditor/entryOrder.png) | Ordre de saisie | Pour les objets saisissables, indique le numéro d’ordre de saisie | +| ![](assets/en/FormEditor/viewNumber.png) | Vue courante | Pour tous les objets de la vue courante | +| ![](assets/en/FormEditor/cssShield.png) | [Feuille de style](stylesheets.html) | Pour les objets avec une ou plusieurs valeurs d'attribut remplacées par une feuille de style. | +| ![](assets/en/FormEditor/filter.png) | Filtre | Pour les objets saisissables auxquels un filtre de saisie est associé | +| ![](assets/en/FormEditor/helpTip.png) | Infobulle | Pour les objets auxquels une infobulle (message d’aide) est associée | +| ![](assets/en/FormEditor/localized.png) | Localisé | Pour les objets dont le libellé provient d’une référence (libellé débutant par “:â€). La référence peut être de type ressource (STR#) ou XLIFF | +| ![](assets/en/FormEditor/noShields.png) | Pas de badge | Aucun badge n’apparaît | + +## Vues + +L'éditeur de formulaires 4D vous permet de créer des formulaires complexes en distribuant des objets de formulaire entre des vues séparées qui peuvent ensuite être masquées ou affichées selon les besoins. + +Par exemple, vous pouvez répartir les objets par type (champs, variables, objets statiques, etc.). Tout type d'objet formulaire, y compris les sous-formulaires et les zones de plug-in, peut être inclus dans les vues. + +Il n'y a pas de limite au nombre de vues par formulaire. Vous pouvez créer autant de vues différentes que nécessaire. De plus, chaque vue peut être affichée, masquée et/ou verrouillée. + + +Les vues sont gérées via à la palette de vues. + +![](assets/en/FormEditor/viewEditor.png) + + +### Accéder à la palette de vues + +Il existe trois façons d'accéder à la palette de vues : + +* **Barre d'outils** : cliquez sur l'icône de Vues dans la barre d'outils de l'éditeur de formulaires. (Cette icône apparaît en gris lorsqu'au moins un objet appartient à une vue autre que la vue par défaut.) + + | Vue par défaut uniquement | Avec des vues supplémentaires | + |:----------------------------------------------------:|:--------------------------------------------------:| + | ![](assets/en/FormEditor/icon.png "No views in use") | ![](assets/en/FormEditor/icon2.png "Views in use") | + +* **Menu contextuel** (formulaire ou objet) : faites un clic droit n'importe où dans l'éditeur de formulaires ou sur un objet, puis sélectionnez **Vue courante** + + ![](assets/en/FormEditor/contextMenu.png) + +La vue courante est indiquée par une coche (par exemple, "Adresse professionnelle" dans l'image ci-dessus) + + +* **Menu Formulaire** : cliquez sur le menu **Formulaire** et sélectionnez **Afficher la liste** + +![](assets/en/FormEditor/formMenu.png) + + +### Avant de commencer + +Voici quelques éléments importants à connaitre avant de commencer à travailler avec les vues : + +* **Contexte d’utilisation** : les vues sont un outil purement graphique, utilisable uniquement dans l’éditeur de formulaires ; il n’est pas possible d’accéder aux vues par programmation ou en mode Application. + +* **Vues et pages** : Les objets d’une même vue peuvent appartenir à des pages différentes d’un formulaire ; seuls les objets de la page courante (et de la page 0 si elle est visible) peuvent être affichés, quelle que soit la configuration des vues. + +* **Vues et plans** : Les vues sont indépendantes des plans des objets, il n’y a pas de hiérarchie d’affichage entre les différentes vues. + +* **Vues et groupes** : Seuls les objets appartenant à la vue courante peuvent être groupés. + +* **Vues courantes et par défaut** : la vue par défaut est la première vue d'un formulaire et ne peut pas être supprimée; la vue courante est la vue en cours de modification et le nom est affiché en gras. + + + +### Gestion des vues + +#### Créer des vues + +Tout objet créé dans un formulaire est placé dans la première vue ("Vue 1") du formulaire. La première vue 1 est **toujours** la vue par défaut, indiquée par (par défaut) après le nom. Le nom de la vue peut être modifié (voir [Renommer les vues](#renaming-views)), mais il demeure la vue par défaut. + + +![](assets/en/FormEditor/createView.png) + +Il existe deux façons d'ajouter des vues supplémentaires : + +* Cliquez sur le bouton **Ajouter une nouvelle vue** en bas de la palette Vue : + +![](assets/en/FormEditor/addView.png) + +* Faites un clic droit sur une vue existante et sélectionnez **Insérer une vue** : + +![](assets/en/FormEditor/addView2.png) + +Il n'y a pas de limitation du nombre de vues. + +#### Renommer des vues + +Par défaut, les vues sont nommées "Vue" + le numéro de vue, mais vous pouvez modifier ces noms pour améliorer la lisibilité et mieux répondre à vos besoins. + +Pour renommer une vue, vous pouvez soit : + +* Double-cliquer directement sur le nom de la vue (dans ce cas, la vue est sélectionnée). Le nom devient alors éditable : + + ![](assets/en/FormEditor/rename.png) + +* Faire un clic droit sur le nom de la vue. Le nom devient alors éditable : + + ![](assets/en/FormEditor/rename2.png) + +#### Réordonner les vues + +Vous pouvez modifier l'ordre d'affichage des vues en les faisant glisser/déposer dans la palette des vues. + +A noter que la vue par défaut ne change pas : + +![](assets/en/FormEditor/reorderView.png) + + +#### Supprimer des vues + +Pour renommer une vue, vous pouvez soit : + +* Cliquer sur le bouton **Supprimer la vue sélectionnée** en bas de la palette des vues : + + ![](assets/en/FormEditor/deleteView.png) + + +* Faire un clic droit sur le nom de la vue et sélectionner **Supprimer la vue** : + + ![](assets/en/FormEditor/deleteView2.png) +> Si une vue est supprimée, tous les objets qu'elle contient sont automatiquement déplacés vers la vue par défaut. + + + + +### Utilisation des vues + +Une fois que les vues sont créées, vous pouvez utiliser la palette des vues pour : + +* Ajouter un objet aux vues, +* Déplacer des objets d'une vue à une autre, +* Sélectionner tous les objets d'une même vue en un seul clic, +* Afficher ou masquer des objets pour chaque vue, +* Verrouiller les objets d'une vue. + +#### Ajouter des objets aux vues + +Un objet ne peut appartenir qu’à une seule vue. + +Pour créer un objet dans une autre vue, sélectionnez simplement la vue dans la palette des vues (avant de créer l'objet) en cliquant sur son nom (une icône Modifier est affichée pour la [Vue courante](#before-you-begin) et le nom apparaît en gras) : + +![](assets/en/FormEditor/addObject.png) + +#### Déplacer des objets entre les vues + +Il est également possible de déplacer un ou plusieurs objets d'une vue à une autre. Dans le formulaire, sélectionnez le ou les objets dont vous souhaitez modifier la vue. La liste des vues indique, à l'aide d'un symbole, la vue à laquelle appartient la sélection : + +![](assets/en/FormEditor/symbol.png) +> La sélection peut contenir plusieurs objets appartenant à différentes vues. + +Sélectionnez simplement la vue de destination, faites un clic droit puis sélectionnez **Déplacer vers** : + +![](assets/en/FormEditor/moveObject.png) + +OU + +Sélectionnez la vue de destination de la sélection et cliquez sur le bouton **Déplacer vers** en bas de la palette des vues : + +![](assets/en/FormEditor/moveObject3.png) + +La sélection est ensuite placée dans la nouvelle vue : + +![](assets/en/FormEditor/objNewView.png) + +Vous pouvez également déplacer un objet vers une autre vue via le menu contextuel de l'objet. Faites un clic droit sur l'objet, sélectionnez **Déplacer vers la vue** puis sélectionnez une vue dans la liste de vues disponibles : + +![](assets/en/FormEditor/moveObject2.png) +> La [vue courante](#before-you-begin) est affichée en texte gras. + + + +#### Sélectionner tous les objets d’une vue + +Vous pouvez sélectionner dans la page courante du formulaire tous les objets appartenant à une même vue. Cette fonction est utile pour appliquer des modifications globales à un ensemble d’objets. + +Pour cela, faites un clic droit sur la vue dans laquelle vous souhaitez sélectionner tous les objets et cliquez sur le bouton **Tout sélect. dans vue**: + +![](assets/en/FormEditor/selectAll.png) + +Vous pouvez également utiliser le bouton situé en dessous de la palette des vues : + + +![](assets/en/FormEditor/selectAll2.png) + + +#### Afficher ou masquer les objets d’une vue + +Vous pouvez à tout moment afficher ou masquer les objets d’une vue dans la page courante du formulaire. Cette fonction permet par exemple de se concentrer sur certains objets lors de la modification du formulaire. + +Par défaut, toutes les vues sont affichées, comme l’indique l’icône en regard de chaque vue dans la palette des vues: + +![](assets/en/FormEditor/showHide.png) + +Pour masquer une vue, cliquez sur cette icône. Elle est alors grisée et les objets de la vue correspondante ne sont plus affichés dans le formulaire : + +![](assets/en/FormEditor/hidden.png) +> Il n’est pas possible de masquer la [vue courante](#before-you-begin). + +Pour afficher une vue masquée, il suffit de la sélectionner ou de cliquer de nouveau sur l’icône de visualisation. + + + +#### Verrouiller les objets d’une vue + +Vous pouvez verrouiller les objets d’une vue. Cela empêche leur sélection, leur modification ou leur suppression dans le formulaire. Une fois verrouillé, un objet ne peut pas être sélectionné par un clic, un rectangle de sélection ou la commande **Sélectionner objets de même type** du menu contextuel. Cette fonction est utile pour éviter les erreurs de manipulation. + +Par défaut, toutes les vues sont déverrouillées, comme l’indique l’icône en regard de chaque vue dans la palette des vues: + +![](assets/en/FormEditor/lockUnlock.png) + +Pour verrouiller les objets d’une vue, cliquez sur cette icône. Le cadenas est alors refermé, ce qui indique que la vue est verrouillée : + +![](assets/en/FormEditor/locked.png) +> Il n’est pas possible de verrouiller la [vue courante](#before-you-begin). + +Pour déverrouiller une vue, il suffit de la sélectionner ou de cliquer à nouveau sur l’icône de verrouillage. + +## Zoom + +Il est possible de zoomer dans le formulaire courant. Vous pouvez passer en mode “Zoom†soit en cliquant sur l'icône de loupe, soit en cliquant directement sur la barre correspondant à l’échelle désirée dans la barre d’outils de la fenêtre (les paliers d’affichage sont 50%, 100%, 200%, 400% et 800%) : + +![](assets/en/FormEditor/zoom.png) + +* Lorsque vous cliquez sur le bouton loupe, le curseur prend la forme d’une loupe. Pour réduire le pourcentage d’affichage d’un palier, appuyez sur la touche Majuscule et cliquez dans le formulaire. +* Lorsque vous cliquez sur une barre de pourcentage, l’affichage est immédiatement modifié. + +En mode Zoom, toutes les fonctions de l’éditeur de formulaires restent disponibles(*). + +(*) Pour des raisons techniques, il n'est toutefois pas possible de sélectionner d'élément de list box (en-tête, colonne ou pied) lorsque l'éditeur de formulaires est en mode Zoom. + + + + + diff --git a/website/translated_docs/fr/FormEditor/forms.md b/website/translated_docs/fr/FormEditor/forms.md index e7dfd6ecfa1b61..ecda28118ae575 100644 --- a/website/translated_docs/fr/FormEditor/forms.md +++ b/website/translated_docs/fr/FormEditor/forms.md @@ -3,127 +3,135 @@ id: forms title: A propos des formulaires 4D --- -## Aperçu -Forms provide the interface through which information is entered, modified, and printed in a desktop application. Users interact with the data in a database using forms and print reports using forms. Forms can be used to create custom dialog boxes, palettes, or any featured custom window. +Les formulaires fournissent l'interface par laquelle les informations sont saisies, modifiées et imprimées dans une application de bureau. A l'aide des formulaires, les utilisateurs peuvent interagir avec les données d'une base de données et imprimer des rapports. Les formulaires permettent de créer des boîtes de dialogue personnalisées, des palettes ou toute fenêtre personnalisée. ![](assets/en/FormObjects/form1.png) -Forms can also contain other forms through the following features: - -- [subform objects](FormObjects/subform_overview.md) -- [inherited forms](properties_FormProperties.md#inherited-forms) - -## Creating forms - -You can add or modify 4D forms using the following elements: - -- **4D Developer interface:** Create new forms from the **File** menu or the **Explorer** window. -- **Form Editor**: Modify your forms using the **[Form Editor](FormEditor/formEditor.md)**. -- **JSON code:** Create and design your forms using JSON and save the form files at the [appropriate location](Project/architecture.md#sources-folder). Exemple : - - { - "windowTitle": "Hello World", - "windowMinWidth": 220, - "windowMinHeight": 80, - "method": "HWexample", - "pages": [ - null, - { - "objects": { - "text": { - "type": "text", - "text": "Hello World!", - "textAlign": "center", - "left": 50, - "top": 120, - "width": 120, - "height": 80 - }, - "image": { - "type": "picture", - "pictureFormat": "scaled", - "picture": "/RESOURCES/Images/HW.png", - "alignment":"center", - "left": 70, - "top": 20, - "width":75, - "height":75 - }, - "button": { - "type": "button", - "text": "OK", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } +Les formulaires peuvent également contenir d'autres formulaires grâce aux fonctionnalités suivantes : + +- [les objets sous-formulaires](FormObjects/subform_overview.md) +- [les formulaires hérités](properties_FormProperties.md#inherited-forms) + + +## Création de formulaires + +Vous pouvez ajouter ou modifier des formulaires 4D à l'aide des éléments suivants : + +- **L'interface 4D Developer :** Créez de nouveaux formulaires à partir du menu **Fichier** ou de la fenêtre de l' **Explorateur**. +- **L'éditeur de formulaires **: Modifiez vos formulaires à l'aide de l'**[éditeur de formulaires](FormEditor/formEditor.md)**. +- **Le code JSON :** Créez et concevez vos formulaires à l'aide de JSON et enregistrez les fichiers de formulaire à [l'emplacement approprié](Project/architecture.md#sources-folder). Exemple : + +``` +{ + "windowTitle": "Hello World", + "windowMinWidth": 220, + "windowMinHeight": 80, + "method": "HWexample", + "pages": [ + null, + { + "objects": { + "text": { + "type": "text", + "text": "Hello World!", + "textAlign": "center", + "left": 50, + "top": 120, + "width": 120, + "height": 80 + }, + "image": { + "type": "picture", + "pictureFormat": "scaled", + "picture": "/RESOURCES/Images/HW.png", + "alignment":"center", + "left": 70, + "top": 20, + "width":75, + "height":75 + }, + "button": { + "type": "button", + "text": "OK", + "action": "Cancel", + "left": 60, + "top": 160, + + + "width": 100, + "height": 20 } } - ] - } - + } + ] +} +``` -## Project form and Table form -There are two categories of forms: -* **Project forms** - Independent forms that are not attached to any table. They are intended more particularly for creating interface dialog boxes as well as components. Project forms can be used to create interfaces that easily comply with OS standards. +## Formulaire projet et formulaire table -* **Table forms** - Attached to specific tables and thus benefit from automatic functions useful for developing applications based on databases. Typically, a table has separate input and output forms. +Il existe deux catégories de formulaires : -Typically, you select the form category when you create the form, but you can change it afterwards. +* **Les formulaires projet** - Formulaires indépendants qui ne sont rattachés à aucune table. Ils sont destinés plus particulièrement à la création de boîtes de dialogue d'interface et de composants. Les formulaires projet peuvent être utilisés pour créer des interfaces facilement conformes aux normes du système d'exploitation. -## Form pages -Each form has is made of at least two pages: +* **Les formulaires table** - Rattachés à des tables spécifiques et bénéficient ainsi de fonctions automatiques utiles pour développer des applications basées sur des bases de données. En règle générale, une table possède des formulaires d'entrée et de sortie séparés. -- a page 1: a main page, displayed by default -- a page 0: a background page, whose contents is displayed on every other page. +En règle générale, vous sélectionnez la catégorie de formulaire lorsque vous créez le formulaire, mais vous pouvez la modifier par la suite. -You can create multiple pages for an input form. If you have more fields or variables than will fit on one screen, you may want to create additional pages to display them. Multiple pages allow you to do the following: -- Place the most important information on the first page and less important information on other pages. -- Organize each topic on its own page. -- Reduce or eliminate scrolling during data entry. -- Provide space around the form elements for an attractive screen design. +## Pages formulaire -Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed. +Chaque formulaire est composé d'au moins deux pages : -There are no restrictions on the number of pages a form can have. The same field can appear any number of times in a form and on as many pages as you want. However, the more pages you have in a form, the longer it will take to display it. +- une page 1 : une page principale, affichée par défaut +- une page 0 : une page de fond, dont le contenu est affiché sur une page sur deux. -A multi-page form has both a background page and several display pages. Objects that are placed on the background page may be visible on all display pages, but can be selected and edited only on the background page. In multi-page forms, you should put your button palette on the background page. You also need to include one or more objects on the background page that provide page navigation tools for the user. +Vous pouvez créer plusieurs pages pour un formulaire d'entrée. Si le nombre de champs ou de variables est supérieur au nombre maximal supporté sur un écran, vous pouvez créer des pages supplémentaires pour les afficher. Plusieurs pages vous permettent d'effectuer les opérations suivantes : -## Inherited Forms +- Placez les informations les plus importantes sur la première page et les informations les moins importantes sur les autres pages. +- Organisez chaque sujet sur sa propre page. +- Réduir ou éliminer le défilement pendant la saisie des données en définissant [l'ordre de saisie](../FormEditor/formEditor.html#data-entry-order). +- Prévoyez de l'espace autour des éléments du formulaire pour un design d'écran attrayant. -4D forms can use and be used as "inherited forms," meaning that all of the objects from *Form A* can be used in *Form B*. In this case, *Form B* "inherits" the objects from *Form A*. +Les pages multiples sont utiles uniquement pour les formulaires d'entrée. Elles ne sont pas destinées à être imprimées. Lorsqu'un formulaire de plusieurs pages est imprimé, seule la première page est imprimée. -References to an inherited form are always active: if an element of an inherited form is modified (button styles, for example), all forms using this element will automatically be modified. +Il n'y a aucune restriction sur le nombre de pages qu'un formulaire peut contenir. Le même champ peut apparaître en un nombre de fois illimité dans un formulaire et sur autant de pages que vous le souhaitez. Toutefois, plus vous aurez de pages dans un formulaire, plus il sera long à afficher. -All forms (table forms and project forms) can be designated as an inherited form. However, the elements they contain must be compatible with use in different database tables. +Un formulaire multi-pages contient à la fois une page d'arrière-plan et plusieurs pages d'affichage. Les objets placés sur la page d'arrière-plan peuvent être visibles sur toutes les pages d'affichage, mais il ne peuvent être sélectionnés et modifiés que sur la page d'arrière-plan. Dans les formulaires multi-pages, vous devez placer votre palette de boutons sur la page d'arrière-plan. Vous devez également inclure un ou plusieurs objets sur la page d'arrière-plan qui fournissent à l'utilisateur des outils de navigation de page. -When a form is executed, the objects are loaded and combined in the following order: -1. Page zero of the inherited form -2. Page 1 of the inherited form -3. Page zero of the open form -4. Current page of the open form. +## Formulaires hérités -This order determines the default entry order of objects in the form. +Les formulaires 4D peuvent utiliser et être utilisés comme «formulaires hérités», ce qui signifie que tous les objets du *Formulaire A* peuvent être utilisés dans le *Formulaire B*. Dans ce cas, *Formulaire B* "hérite" des objets du *Formulaire A*. -> Only pages 0 and 1 of an inherited form can appear in other forms. +Les références à un formulaire hérité est toujours active : si un élément d'un formulaire hérité est modifié (par exemple le style des boutons), tous les formulaires qui l’utilisent seront automatiquement modifiés. -The properties and method of a form are not considered when that form is used as an inherited form. On the other hand, the methods of objects that it contains are called. +Tous les formulaires (formulaires table et formulaires projet) peuvent être désignés comme un formulaire hérité. Cependant, les éléments qu'ils contiennent doivent être compatibles avec une utilisation dans différentes tables de base de données. -To define an inherited form, the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) and [Inherited Form Table](properties_FormProperties.md#inherited-form-table) (for table form) properties must be defined in the form that will inherit something from another form. +A l’exécution du formulaire, les objets sont chargés et combinés dans l’ordre suivant : -A form can inherit from a project form, by setting the [Inherited Form Table](properties_FormProperties.md#inherited-form-table) property to **\** in the Property List (or " " in JSON). +1. Page zéro du formulaire hérité +2. Page 1 du formulaire hérité +3. Page zéro du formulaire ouvert +4. Page courante du formulaire ouvert. -To stop inheriting a form, select **\** in the Property List (or " " in JSON) for the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) property. +Cet ordre détermine [l'ordre de saisie](../FormEditor/formEditor.html#data-entry-order) par défaut des objets dans le formulaire. + +> Seules les pages 0 et 1 du formulaire hérité peuvent apparaître dans les autres formulaires. + +Les propriétés ainsi que la méthode d’un formulaire ne sont pas prises en compte lorsque celui-ci est utilisé comme formulaire hérité. En revanche, les méthodes des objets qu’il contient sont appelées. + +Pour définir un formulaire hérité, les propriétés de [Inherited Form Name](properties_FormProperties.md#inherited-form-name) et [Inherited Form Table](properties_FormProperties.md#inherited-form-table) (pour les formulaires table) doivent être définies dans le formulaire qui héritera de quelque chose issue d'un autre formulaire. + +Un formulaire peut hériter d'un formulaire projet, en définissant la propriété [Inherited Form Table](properties_FormProperties.md#inherited-form-table) sur **\** dans la liste des propriétés (ou " " dans JSON). + +Pour stopper l’héritage d’un formulaire, choisissez l’option **\** dans la Liste des propriétés (ou " " dansJSON) pour la propriété [Inherited Form Name](properties_FormProperties.md#inherited-form-name). +> Il est possible de définir un formulaire hérité dans un formulaire qui servira à son tour de formulaire hérité pour un troisième formulaire. La combinaison des objets s’effectue alors de manière récursive. 4D détecte les boucles récursives (par exemple si le formulaire [table1]form1 est défini comme formulaire hérité de [table1]form1, c’est-à-dire de lui-même) et interrompt le chaînage des formulaires. -> It is possible to define an inherited form in a form that will eventually be used as an inherited form for a third form. The combining of objects takes place in a recursive manner. 4D detects recursive loops (for example, if form [table1]form1 is defined as the inherited form of [table1]form1, in other words, itself) and interrupts the form chain. ## Propriétés prises en charge -[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) \ No newline at end of file +[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) diff --git a/website/translated_docs/fr/FormEditor/macros.md b/website/translated_docs/fr/FormEditor/macros.md new file mode 100644 index 00000000000000..2d8854d9bdbb08 --- /dev/null +++ b/website/translated_docs/fr/FormEditor/macros.md @@ -0,0 +1,334 @@ +--- +id: macros +title: Form Editor Macros +--- + + +L'éditeur de formulaires 4D prend en charge les macros. Une macro est un ensemble d'instructions permettant de réaliser une action ou une séquence d'actions. Lorsqu'elle est appelée, la macro exécutera ses instructions et, automatiquement, les actions. + +Par exemple, si vous avez un rapport récurrent avec une mise en forme spécifique (par exemple, certains textes doivent apparaître en rouge et certains textes en vert), vous pouvez créer une macro pour définir automatiquement la couleur. Vous pouvez créer des macros pour l'éditeur de 4D Form qui peuvent : + +* Créer et exécuter du code 4D +* Afficher les boîtes de dialogue +* Sélectionnez des objets de formulaire +* Ajouter / supprimer / modifier des formulaires, des objets de formulaire ainsi que leurs propriétés +* Modifier les fichiers de projet (mettre à jour, supprimer) + +Le code des macros prend en charge les [class functions (fonctions de classe)](Concepts/classes.md) et les [propriétés d'objet de formulaire en JSON](FormObjects/properties_Reference.md) pour vous permettre de définir n'importe quelle fonctionnalité personnalisée dans l'éditeur de formulaire. + +Des macros peuvent être définies pour le projet hôte ou pour les composants du projet. Habituellement, vous créez une macro et l'installez dans les composants que vous utilisez pour le développement. + +Lorsqu'elle est appelée, une macro remplace tous les comportements précédemment spécifiés. + +## Exemple pratique + +Dans ce court exemple, vous verrez comment créer et appeler une macro qui ajoute un bouton d'alerte "Hello World!" dans le coin supérieur gauche de votre formulaire. + +1. Dans un fichier `formMacros.json` dans le dossier `Sources` de votre projet, entrez le code suivant : + +```js +{ + "macros": { + "Add Hello World button": { + "class": "AddButton" + } + } +} +``` + +2. Créez une classe 4D nommée `AddButton`. + +3. Dans la classe `AddButton`, écrivez la fonction suivante : + +```4d +Function onInvoke($editor : Object)->$result : Object + + var $btnHello : Object + + // Créer un bouton "Hello" + $btnHello:=New object("type"; "button"; \ + "text"; "Hello World!"; \ + "method"; New object("source"; "ALERT(\"Hello World!\")"); \ + "events"; New collection("onClick"); \ + "width"; 120; \ + "height"; 20; \ + "top"; 0; \ + "left"; 0) + + // Ajouter un bouton dans la page courante + $editor.editor.currentPage.objects.btnHello:=$btnHello + + // Sélectionner le nouveau bouton dans l'éditeur de formulaire + $editor.editor.currentSelection.clear() //unselect elements + $editor.editor.currentSelection.push("btnHello") + + // Notifier la modification à l'éditeur de formulaire 4D + $result:=New object("currentSelection"; $editor.editor.currentSelection;\ + "currentPage"; $editor.editor.currentPage) +``` + +Vous pouvez alors appeler la macro : ![](assets/en/FormEditor/macroex1.png) ![](assets/en/FormEditor/macroex2.png) + + +## Appeler des macros dans l'éditeur de formulaires + +Lorsque des macros sont définies dans votre projet 4D, vous pouvez appeler une macro à l'aide du menu contextuel de l'éditeur de formulaires : + +![](assets/en/FormEditor/macroSelect.png) + +Ce menu est crée selon le(s) [fichier(s) de définition de macro](#location-of-macros) `formMacros.json`. Macro items are sorted in alphabetical order. + +Ce menu peut être appelé dans une zone vide ou une sélection dans le formulaire. Les objets sélectionnés sont passés à `$editor.currentSelection` ou `$editor.target` dans la fonction [`onInvoke`](#oninvoke) de la macro. + +Une seule macro peut exécuter plusieurs opérations. Si elle est sélectionnée, la fonction **Annuler** de l'éditeur de formulaires peut être utilisée pour inverser les opérations de macro. + +## Emplacement du fichier de macro + +Toutes les macros de l'éditeur de formulaire 4D sont définies dans un seul fichier JSON par projet ou composant : `FormMacros.json`. + +Ce fichier doit se trouver dans le dossier **Projet** >**Sources** de l'hôte ou du composant : + +![](assets/en/FormEditor/macroStructure.png) + + + +## Déclaration de macros + +La structure du fichier `formMacros.json` est la suivante : + +```js +{ + "macros": { + : { + "class": , + : + } + } +} +``` + +Voici la description du contenu du fichier JSON : + +| Attribut | | | Type | Description | +| -------- | ------------------- | ------------------------ | ------ | ----------------------------------------------------------------- | +| macros | | | object | liste des macros définis | +| | `` | | object | définition de la macro | +| | | class | string | nom de classe de la macro | +| | | `` | any | (optionnel) valeur personnalisée à récupérer dans le constructeur | + +Les propriétés personnalisées, lorsqu'elles sont utilisées, sont passées à la fonction [constructeur](#class-constructor) de la macro. + +### Exemple + +```js +{ + "macros": { + "Open Macros file": { + "class": "OpenMacro" + }, + "Align to Right on Target Object": { + "class": "AlignOnTarget", + "myParam": "right" + }, + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + + + +## Instancier des macros dans 4D + +Chaque macro que vous souhaitez instancier dans votre projet ou composant doit être déclarée en tant que [classe 4D](Concepts/classes.md). + +Le nom de la classe doit correspondre au nom défini à l'aide de l'attribut [class](#creating-macros) du fichier `formMacros.json`. + +Les macros sont instanciées au lancement de l'application. Par conséquent, si vous modifiez la structure de la classe de macro (ajouter une fonction, modifier un paramètre, etc.) ou le [constructeur](#class-constructor), vous devrez redémarrer l'application pour appliquer les modifications. + + + + +## Fonctions macro + +Chaque classe de macro peut contenir un `Class constructor` (constructeur de classe) et deux fonctions : `onInvoke()` et `onError()`. + + +### Class constructor + +#### Class constructor($macro : Object) + +| Paramètres | Type | Description | +| ---------- | ----- | ----------------------------------------------------------------- | +| $macro | Objet | Objet de déclaration de macro (dans le fichier `formMacros.json`) | + +Les macros sont instanciées à l'aide d'une fonction [class constructor](Concepts/classes.md#class-constructor), le cas échéant. + +Le class constructor est appelé une fois lors de l'instanciation de classe, qui se produit au démarrage de l'application. + +Les propriétés personnalisées ajoutées à la [déclaration macro](#declaring-macros) sont retournées dans le paramètre de la fonction class contructor. + + + +#### Exemple + +Dans le fichier `formMacros.json` : + +```js +{ + "macros": { + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + +Vous pouvez écrire : + +```4d +// Class "AlignOnTarget" +Class constructor($macro : Object) + This.myParameter:=$macro.myParam //gauche + ... +``` + + +### onInvoke() + +#### onInvoke($editor : Object) -> $result : Object + +| Paramètres | Type | Description | +| ---------- | ----- | ------------------------------------------------------------------------------------------- | +| $editor | Objet | Objet Form Editor Macro Proxy contenant les propriétés du formulaire | +| $result | Objet | Objet Form Editor Macro Proxy retournant des propriétés modifiées par la macro (facultatif) | + +La fonction `onInvoke` est automatiquement exécutée à chaque fois que la macro est appelée. + +Lorsque la fonction est appelée, elle reçoit dans la propriété `$editor.editor` une copie de tous les éléments du formulaire avec leurs valeurs courantes. Vous pouvez ensuite exécuter n'importe quelle opération sur ces propriétés. + +Une fois les opérations terminées, si la macro entraîne la modification, l'ajout ou la suppression d'objets, vous pouvez transmettre les propriétés modifiées résultantes dans `$result`. Le processeur de macros analysera les propriétés retournées et appliquera les opérations nécessaires dans le formulaire. Évidemment, moins vous retournez de propriétés, moins le traitement prendra du temps. + +Voici les propriétés retournées dans le paramètre *$editor* : + +| Propriété | Type | Description | +| -------------------------------- | ---------- | --------------------------------------------------------------------------------- | +| $editor.editor.form | Objet | The entire form | +| $editor.editor.file | File | File object of the form file | +| $editor.editor.name | Chaine | Name of the form | +| $editor.editor.table | number | Table number of the form, 0 for project form | +| $editor.editor.currentPageNumber | number | The number of the current page | +| $editor.editor.currentPage | Objet | The current page, containing all the form objects and the entry order of the page | +| $editor.editor.currentSelection | Collection | Collection of names of selected objects | +| $editor.editor.formProperties | Objet | Properties of the current form | +| $editor.editor.target | string | Name of the object under the mouse when clicked on a macro | + +Here are the properties that you can pass in the `$result` object if you want the macro processor to execute a modification. All properties are optional: + +| Propriété | Type | Description | +| ----------------- | ---------- | ----------------------------------------------------------- | +| currentPage | Objet | currentPage including objects modified by the macro, if any | +| currentSelection | Collection | currentSelection if modified by the macro | +| formProperties | Objet | formProperties if modified by the macro | +| editor.groups | Objet | group info, if groups are modified by the macro | +| editor.views | Objet | view info, if views are modified by the macro | +| editor.activeView | Chaine | Active view name | + + +Par exemple, si des objets de la page courante et des groupes ont été modifiés, vous pouvez écrire ce qui suit : + +```4d + $result:=New object("currentPage"; $editor.editor.currentPage ; \ + "editor"; New object("groups"; $editor.editor.form.editor.groups)) + +``` + + +#### attribut `method` + +When handling the `method` attribute of form objects, you can define the attribute value in two ways in macros: + +- Using a [string containing the method file name/path](FormObjects/properties_Action.md#method). + +- Using an object with the following structure: + +| Propriété | Type | Description | +| --------- | ---- | ----------- | +| | | | + source|Chaine|Code de la méthode| + +4D créera un fichier en utilisant le nom de l'objet dans le dossier "objectMethods" avec le contenu de l'attribut `source`. Cette fonctionnalité n'est disponible que pour le code macro. + +#### Propriété `$4dId` dans `currentPage.objects` + +La propriété `$4dId` définit un ID unique pour chaque objet de la page courante. Cette clé est utilisée par le processeur de macros pour gérer les modifications dans `$result.currentPage` : + +- si la clé `$4dId` est manquante à la fois dans le formulaire et dans un objet dans `$result`, l'objet est créé. +- si la clé `$4dId` existe dans le formulaire mais est manquante dans `$result`, l'objet est supprimé. +- si la clé `$4dId` existe à la fois dans le formulaire et dans un objet dans `$result` l'objet est modifié. + + +#### Exemple + +You want to define a macro function that will apply the red color and italic font style to any selected object(s). + +```4d +Function onInvoke($editor : Object)->$result : Object + var $name : Text + + If ($editor.editor.currentSelection.length>0) + // Définir le contour en rouge et le style en italique pour chaque objet sélectionné + For each ($name; $editor.editor.currentSelection) + $editor.editor.currentPage.objects[$name].stroke:="red" + $editor.editor.currentPage.objects[$name].fontStyle:="italic" + + End for each + + Else + ALERT("Please select a form object.") + End if + + // Notifier la modification à 4D + $result:=New object("currentPage"; $editor.editor.currentPage) +``` + + +### onError() + +#### onError($editor : Object; $resultMacro : Object ; $error : Collection) + +| Paramètres | | Type | Description | +| ------------ | --------------------- | ---------- | ---------------------------------------- | +| $editor | | Objet | Object send to [onInvoke](#oninvoke) | +| $resultMacro | | Objet | Object returned by [onInvoke](#oninvoke) | +| $error | | Collection | Error stack | +| | [].errCode | Nombre | Error code | +| | [].message | Texte | Description of the error | +| | [].componentSignature | Texte | Internal component signature | + +La fonction `onError` est exécutée lorsque le processeur de macros rencontre une erreur. + +Lors de l'exécution d'une macro, si 4D rencontre une erreur qui empêche l'annulation de la macro, il n'exécute pas la macro. C'est le cas par exemple si l'exécution d'une macro se traduirait par : + +- supprimer ou modifier un script dont le fichier est en lecture seule. +- créer deux objets avec le même ID interne. + +#### Exemple + +In a macro class definition, you can write the following generic error code: + +```4d +Function onError($editor : Object; $resultMacro : Object; $error : Collection) + var $obj : Object + var $txt : Text + $txt:="" + + For each ($obj; $error) + $txt:=$txt+$obj.message+" \n" + End for each + + ALERT($txt) +``` diff --git a/website/translated_docs/fr/FormEditor/objectLibrary.md b/website/translated_docs/fr/FormEditor/objectLibrary.md index 9a01087cf1fe51..33fe32f9987996 100644 --- a/website/translated_docs/fr/FormEditor/objectLibrary.md +++ b/website/translated_docs/fr/FormEditor/objectLibrary.md @@ -3,15 +3,15 @@ id: objectLibrary title: Bibliothèques d'objets --- -## Aperçu Vous pouvez utiliser des bibliothèques d'objets dans vos formulaires. Une bibliothèque d'objets propose une collection d'objets préconfigurés pouvant être utilisés dans vos formulaires par simple copier-coller ou glisser-déposer. 4D propose deux types de bibliothèques d'objets : -- une bibliothèque d'objets standard préconfigurée, standard, disponible dans tous vos projets. +- une bibliothèque d'objets standard préconfigurée, standard, disponible dans tous vos projets. - des bibliothèques d’objets personnalisées, que vous pouvez utiliser pour stocker vos objets formulaires favoris ou des formulaires projets complets. + ## Utilisation de la bibliothèque d'objets standard La bibliothèque d'objets standard est disponible dans l'éditeur de formulaire : cliquez sur le dernier bouton de la barre d'outils : @@ -25,22 +25,24 @@ La fenêtre présente les caractéristiques principales suivantes : - Zone d'aperçu avec des messages d'aide : la zone centrale affiche un aperçu de chaque objet. Vous pouvez survoler un objet pour obtenir des informations sur celui-ci dans un message d'aide. - Vous pouvez filtrer le contenu de la fenêtre en utilisant le menu **Catégories** : ![](assets/en/FormEditor/library3.png) -- Pour utiliser un objet de la bibliothèque dans votre formulaire, vous pouvez soit : +- Pour utiliser un objet de la bibliothèque dans votre formulaire, vous pouvez soit : - faire un clic droit sur un objet et sélectionnez **Copier** dans le menu contextuel - - ou glisser-déposer l'objet de la bibliothèque. L'objet est ensuite ajouté au formulaire. + - ou glisser-déposer l'objet de la bibliothèque. L'objet est ensuite ajouté au formulaire. Cette bibliothèque est en lecture seule. Si vous souhaitez modifier des objets par défaut ou créer votre propre bibliothèque d'objets préconfigurés ou vos formulaires projets, vous devez créer une bibliothèque d'objets personnalisée (voir ci-dessous). Tous les objets proposés dans la bibliothèque d'objets standard sont décrits dans [cette section sur doc.4d.com](https://doc.4d.com/4Dv17R6/4D/17-R6/Library-objects.200-4354586.en.html). + ## Créer et utiliser des bibliothèques d'objets personnalisées -4D permet de créer et d’utiliser des bibliothèques d’objets personnalisées. Une bibliothèque d’objets personnalisée est un projet 4D qui vous permet de stocker vos objets favoris dans les formulaires (boutons, textes, images, etc). Ces objets peuvent être ensuite réutilisés dans différents formulaires et différents projets. +4D permet de créer et d’utiliser des bibliothèques d’objets personnalisées. Une bibliothèque d'objets personnalisés est un projet 4D dans lequel vous pouvez stocker vos objets favoris (boutons, textes, images, etc.). Vous pouvez ensuite réutiliser ces objets sous différentes formes et dans différents projets. Les objets sont stockés avec toutes leurs propriétés, y compris leurs méthodes objet. Les bibliothèques sont constituées et utilisées par simple glisser-déposer ou copier-coller. A l’aide des bibliothèques d'objets, vous pouvez constituer des fonds d’objets de formulaires regroupés par familles graphiques, par fonctionnalités, etc. + ### Créer une bibliothèque d’objets Pour créer une bibliothèque d’objets, sélectionnez la commande **Nouveau > Bibliothèque d’objets...** dans le menu **Fichier** ou dans la barre d’outils de 4D. Une boîte de dialogue standard d’enregistrement de fichiers apparaît, vous permettant de choisir le nom et l’emplacement de la bibliothèque d’objets. @@ -53,10 +55,9 @@ Vous pouvez créer autant de bibliothèques que vous voulez par projet. Une bibl ### Ouvrir une bibliothèque d’objets -Une même bibliothèque d’objets ne peut être ouverte que par une seule base à la fois. En revanche, il est possible d’ouvrir plusieurs bibliothèques différentes dans la même base. +A given object library can only be opened by one project at a time. However, several different libraries can be opened in the same project. Pour ouvrir une bibliothèque d’objets personnalisée, sélectionnez la commande **Ouvrir>Bibliothèque d’objets...** dans le menu **Fichier** ou la barre d’outils de 4D. Une boîte de dialogue standard d’ouverture de fichiers apparaît, vous permettant de désigner la bibliothèque d’objets à ouvrir. Vous pouvez sélectionner les types de fichier suivants : - - **.4dproject** - **.4dz** @@ -65,6 +66,7 @@ Les bibliothèques d’objets personnalisées sont des projets 4D classiques. Se - formulaires projet - form pages 1 + ### Construire une bibliothèque d’objets Les objets sont placés dans une bibliothèque d’objets par glisser-déposer ou couper/copier-coller. Ils peuvent provenir soit d’un formulaire soit d’une autre bibliothèque d’objets (y compris la [bibliothèque préconfigurée](#using-the-standard-object-library)). Aucun lien n’est conservé avec l’objet d’origine : si celui-ci est modifié, la modification ne sera pas reportée dans l’objet copié. @@ -78,7 +80,8 @@ Les principales opérations sont accessibles via le menu contextuel ou le menu d - **Couper ** ou **Copier** vers le conteneur de données - **Coller** un objet à partir du conteneur de données - **Effacer** - supprime l'objet de la bibliothèque -- **Renommer** - une boite de dialogue apparait pour vous permettre de renommer l'élément. A noter que les noms d'objets doivent être uniques dans une bibliothèque. +- **Renommer** - une boite de dialogue apparait pour vous permettre de renommer l'élément. A noter que les noms d'objets doivent être uniques dans une bibliothèque. + Vous pouvez placer dans la bibliothèque des objets individuels (y compris des sous-formulaires) ou des ensembles d’objets. Chaque objet ou ensemble d’objets est regroupé en un seul élément : @@ -89,7 +92,6 @@ Une bibliothèque d’objets peut contenir jusqu’à 32 000 éléments. Les objets sont copiés avec toutes leurs propriétés, graphiques et fonctionnelles, y compris leurs méthodes. Elles sont intégralement conservées lorsque l’élément est recopié dans un formulaire ou une autre bibliothèque. #### Objets dépendants - Le copier-coller ou le glisser-déposer de certains objets dans la bibliothèque entraîne également la copie des objets dépendants. Par exemple, la copie d’un bouton entraînera obligatoirement la copie de la méthode objet qui lui est éventuellement attachée. Ces objets dépendants ne peuvent, quant à eux, être directement copiés ou glissés-déposés. Voici la liste des objets dépendants qui seront collés dans la bibliothèque en même temps que l’objet principal qui les utilise (le cas échéant) : @@ -98,4 +100,5 @@ Voici la liste des objets dépendants qui seront collés dans la bibliothèque e - Formats/Filtres - Images - Messages d’aide (liés à un champ) -- Méthodes objet \ No newline at end of file +- Méthodes objet + diff --git a/website/translated_docs/fr/FormEditor/pictures.md b/website/translated_docs/fr/FormEditor/pictures.md new file mode 100644 index 00000000000000..830c859d9f14e3 --- /dev/null +++ b/website/translated_docs/fr/FormEditor/pictures.md @@ -0,0 +1,99 @@ +--- +id: pictures +title: Images +--- + +4D inclut une prise en charge spécifique des images utilisées dans vos formulaires. + + +## Formats natifs pris en charge + +4D intègre une gestion native des images. Cela signifie que les images sont affichées et stockées dans leur format d’origine, sans interprétation dans 4D. Les spécificités des différents formats (ombrages, zones transparentes...) sont conservées en cas de copier-coller et affichées sans altération. Ce support natif est valable pour toutes les images stockées dans les formulaires 4D : [images statiques](FormObjects/staticPicture.md) collées en mode Développement, images collées dans des [objets de saisie](FormObjects/input_overview.md) à l'exécution, etc. + +Les formats d'image les plus courants sont pris en charge par les deux plates-formes : jpeg, gif, png, tiff, bmp, etc. Sous macOS, le format pdf est également disponible pour l'encodage et le décodage. + +> La liste complète des formats pris en charge varie en fonction du système d’exploitation et des codecs personnalisés installés sur les postes. Pour savoir quels sont codecs disponibles, vous devez utiliser la commande `PICTURE CODEC LIST` (voir aussi la description du [type de données image](Concepts/dt_picture.md)). + + + + +### Format d'image non disponible + +Une icône spécifique est affichée pour les images stockées dans un format non disponible sur le poste. L'extension du format manquant est inscrite en bas de l'icône : + +![](assets/en/FormEditor/picNoFormat.png) + +L'icône est automatiquement utilisée partout où l'image doit être affichée : + +![](assets/en/FormEditor/picNoFormat2.png) + +Cette icône indique que l'image ne peut être ni affichée ni manipulée localement -- mais elle peut être stockée sans altération pour être affichée sur une autre machine. C'est le cas, par exemple, pour les images PDF sous Windows ou les images au format PICT. + + +## Images de haute résolution + +4D prend en charge des images haute résolution sur les plateformes macOS et Windows. Les images haute résolution peuvent être définies par le facteur d'échelle ou le dpi. + +### Facteur d'échelle (macOS uniquement) + +Les écrans haute résolution ont une densité de pixels plus élevée que les écrans standard traditionnels. Pour que les images s'affichent correctement sur des écrans haute résolution, le nombre de pixels de l'image doit être multiplié par le *facteur d'échelle* (c'est-à-dire deux fois plus grand, trois fois plus grand, etc.). + +Lorsque vous utilisez des images haute résolution, vous pouvez spécifier le facteur d'échelle en ajoutant "@nx" dans le nom de l'image (où *n* désigne le facteur d'échelle). Dans le tableau ci-dessous, vous constaterez que le facteur d'échelle est indiqué dans les noms des images haute résolution, *circle@2x.png* et *circle@3x.png*. + +| Type d'affichage | Facteur d'échelle | Exemple | +| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------------ | +| Résolution standard | densité de pixel 1:1. | **1x**
      ![](assets/en/FormEditor/pictureScale1.png) *circle.png* | +| Haute résolution | Densité de pixel augmentée d'un facteur de 2 ou 3. |
      2x3x
      ![](assets/en/FormEditor/pictureScale2.png)*circle@2x.png*![](assets/en/FormEditor/pictureScale3.png)
      *circle@3x.png*
      | + + + +Les images haute résolution avec la convention @nx peuvent être utilisées dans les objets suivants : + +* [Images statiques](FormObjects/staticPicture.md) +* [Boutons](FormObjects/button_overview.md)/[radio](FormObjects/radio_overview.md)/[cases à cocher](FormObjects/checkbox_overview.md) +* [Boutons image](FormObjects/pictureButton_overview.md)/[Pop-up image](FormObjects/picturePopupMenu_overview.md) +* [Onglets](FormObjects/tabControl.md) +* [En-têtes de list box](FormObjects/listbox_overview.md#list-box-headers) +* [Icônes de menu](Menus/properties.md#item-icon) + + + +4D priorise automatiquement les images avec la résolution la plus élevée.

      **Exemple** : lorsque vous utilisez deux écrans (un écran haute résolution, un écran standard) et que vous déplacez un formulaire d'un écran à un autre, 4D restitue automatiquement la résolution la plus élevée possible de l'image. Même si une commande ou une propriété spécifie *circle.png*, *circle@3x.png* sera utilisé (le cas échéant). +> A noter que cette résolution se produit uniquement pour l'affichage des images à l'écran, aucune hiérarchisation automatique n'est effectuée lors de l'impression. + + + +### DPI (macOS and Windows) + +Si 4D donne automatiquement la priorité à la résolution la plus élevée, il existe cependant des différences de comportement en fonction de la résolution de l'écran et de l'image *(\*)* et du format de l'image : + +| Opération | Comportement | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| Déposer ou Coller | Si l'image est de :

      • **72dpi ou 96dpi** - L'image est "[Center](FormObjects/properties_Picture.md#center--truncated-non-centered)" formatée et l'objet contenant l'image contient le même nombre de pixels.
      • **Autre dpi** - L'image est formatée "[Mise à l'échelle](FormObjects/properties_Picture.md#scaled-to-fit)" et l'objet contenant l'image est égal à (nombre de pixels de l'image * dpi de l'écran) / (depi de l'image)
      • **Pas de dpi** - L'image est formatée "[Mise à l'échelle](FormObjects/properties_Picture.md#scaled-to-fit)".
      • | +| [Taille automatique](https://doc.4d.com/4Dv18/4D/18/Setting-object-display-properties.300-4575725.en.html#148057) (menu contextuel de l'éditeur de formulaires) | Si le format d'affichage de l'image est :
        • **[Scaled](FormObjects/properties_Picture.md#scaled-to-fit)** - L'objet contenant l'image est redimensionné en fonction de (nombre de pixels de l'image * dpi écran) / (dpi de l'image)
        • **Non mis à l'échelle** - L'objet contenant l'image a le même nombre de pixels que l'image.

        | + +*(\*) Généralement, macOS = 72 dpi, Windows = 96 dpi* + + +## Dark mode pictures (macOS only) + +You can define specific pictures and icons to be used instead of standard pictures when [forms use the dark scheme](properties_FormProperties.md#color-scheme). + +A dark mode picture is defined in the following way: + +- dark mode picture has the same name as the standard (light scheme) version with the suffix "`_dark`" +- dark mode picture is stored next to the standard version. + +At runtime, 4D will automatically load the light or dark image according to the [current form color scheme](https://doc.4d.com/4dv19/help/command/en/1761.html). + +![](assets/en/FormEditor/darkicon.png) + + + +## Coordonnées de la souris dans une image + +4D vous permet de récupérer les coordonnées locales de la souris dans un [objet de saisie](FormObjects/input_overview.md) associé à une [expression d'image](FormObjects/properties_Object.md#expression-type), en cas de clic ou de survol, même si un défilement ou un zoom a été appliqué à l'image. Ce mécanisme, proche de celui d'une image map, peut être utilisé par exemple pour gérer les barres de bouton défilables ou bien l'interface de logiciels de cartographie. + +Les coordonnées sont retournées dans les [Variables système](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.en.html) *MouseX* et *MouseY*. Les coordonnées sont exprimées en pixels par rapport à l'angle supérieur gauche de l'image (0,0). Lorsque la souris se trouve en dehors du système de coordonnées de l'image, la valeur -1 est retournée dans *MouseX* et *MouseY*. + +Vous pouvez lire la valeur des variables des événements formulaire [`On Clicked`](Events/onClicked.md), [`On Double Clicked`](Events/onDoubleClicked.md), [`On Mouse up`](Events/onMouseUp.md), [`On Mouse Enter`](Events/onMouseEnter.md), ou [`On Mouse Move`](Events/onMouseMove.md). diff --git a/website/translated_docs/fr/FormEditor/properties_Action.md b/website/translated_docs/fr/FormEditor/properties_Action.md index bb0b3e308ec8a3..219732a572460c 100644 --- a/website/translated_docs/fr/FormEditor/properties_Action.md +++ b/website/translated_docs/fr/FormEditor/properties_Action.md @@ -6,24 +6,26 @@ title: Action ## Méthode -Reference of a method attached to the form. Vous pouvez utiliser une méthode formulaire pour gérer les données et les objets, mais il est généralement plus simple et plus efficace d'utiliser une méthode objet dans ces cas de figure. See [Specialized methods](Concepts/methods.md#specialized-methods). +Référence d'une méthode associée au formulaire. Vous pouvez utiliser une méthode formulaire pour gérer les données et les objets, mais il est généralement plus simple et plus efficace d'utiliser une méthode objet dans ces cas de figure. Voir [Méthodes spécialisées](Concepts/methods.md#specialized-methods). -You do not call a form method—4D calls it automatically when an event involves the form to which the method is attached. +Vous n'appelez pas de méthode formulaire - 4D l'appelle automatiquement lorsqu'un événement implique le formulaire auquel la méthode est associée. -Several types of method references are supported: +Plusieurs types de références de méthode sont pris en charge : -- a standard project method file path, i.e. that uses the following pattern: - `method.4dm` - This type of reference indicates that the method file is located at the default location ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). In this case, 4D automatically handles the form method when operations are executed on the form (renaming, duplication, copy/paste...) +- un chemin de fichier de méthode projet standard, c'est-à-dire qui utilise le modèle suivant : + `method.4dm` + Ce type de référence indique que le fichier de méthode se trouve à l'emplacement par défaut ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). Dans ce cas, 4D gère automatiquement la méthode formulaire lorsque des opérations sont exécutées sur le formulaire (renommage, duplication, copier/coller, etc.) - 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 form operations. - a custom method file path including the .4dm extension, e.g.: - `MyMethods/myFormMethod.4dm` You can also use a filesystem: - `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. + `MyMethods/myFormMethod.4dm` You can also use a filesystem: + `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. + #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------ | --------------- | ---------------------------------------------------------------- | -| method | Texte | Form method standard or custom file path, or project method name | \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | ------------------------------------------------------------------------------------ | +| method | Texte | Chemin standard ou personnalisé de la méthode formulaire ou nom de la méthode projet | + diff --git a/website/translated_docs/fr/FormEditor/properties_FormProperties.md b/website/translated_docs/fr/FormEditor/properties_FormProperties.md index f3f7d64a57a80e..e1a53c2fccc647 100644 --- a/website/translated_docs/fr/FormEditor/properties_FormProperties.md +++ b/website/translated_docs/fr/FormEditor/properties_FormProperties.md @@ -3,35 +3,54 @@ id: propertiesForm title: Propriétés des formulaires --- -* * * +--- + +## Color Scheme +> Color scheme property is only applied on macOS. + +This property defines the color scheme for the form. By default when the property is not set, the value for a color scheme is **inherited** (the form uses the scheme defined at the [application level](https://doc.4d.com/4dv19/help/command/en/page1762.html)). This can be changed for the form to one of the following two options: + +* dark - light text on a dark background +* light - dark text on a light background > A defined color scheme can not be overridden by a CSS. +> Le nombre de caractères pour un nom de fenêtre est limité à 31. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ----------------- | +| colorScheme | string | "dark", "light" | + +--- ## Pages -Each form has is made of at least two pages: +Chaque formulaire est composé d'au moins deux pages : -- a page 0 (background page) -- a page 1 (main page) +- une page 0 (page de fond) +- une page 1 (page principale) + +Pour plus d'informations, veuillez consulter le thème [Pages formulaire](forms.md#form-pages). -For more information, please refer to [Form pages](forms.md#form-pages). #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----- | --------------- | ------------------------------------------------------------------------ | -| pages | collection | Collection of pages (each page is an object, page 0 is the first element | +| Nom | Type de données | Valeurs possibles | +| ----- | --------------- | -------------------------------------------------------------------------------- | +| pages | collection | Collection de pages (chaque page est un objet, la page 0 est le premier élément) | +--- -* * * ## Form Name This property is the name of the form itself and is used to refer to the form by name using the 4D language. The form name must comply with the [rules specified for identifiers](Concepts/identifiers.md) in 4D. + #### Grammaire JSON The form name is defined by the name of the folder that contains the form.4Dform file. See [project architecture](Project/architecture.md#sources-folder) for more information. -* * * +--- ## Form Type @@ -43,15 +62,17 @@ Each table in a database generally has at least two table forms. One for listing - Input form - used for data entry. It displays a single record per screen and typically has buttons for saving and canceling modifications to the record and for navigating from record to record (*i.e.*, First Record, Last Record, Previous Record, Next Record). ![](assets/en/FormObjects/formInput.png) + Supported types depend on the form category: + | Form Type | JSON grammar | Description | Supported with | | ------------------------ | ---------------- | ------------------------------------------------------------- | --------------------------- | -| Detail Form | detailScreen | A display form for data entry and modification | Project forms - Table forms | +| Formulaire détaillé | detailScreen | A display form for data entry and modification | Project forms - Table forms | | Detail Form for Printing | detailPrinter | A printed report with one page per record, such as an invoice | Project forms - Table forms | | List Form | listScreen | A form for listing records on the screen | Table forms | | List Form for Printing | listPrinter | A printed report that list records | Table forms | -| None | *no destination* | A form with no specific feature | Project forms - Table forms | +| Aucun | *no destination* | A form with no specific feature | Project forms - Table forms | #### Grammaire JSON @@ -60,8 +81,7 @@ Supported types depend on the form category: | ----------- | --------------- | ------------------------------------------------------------ | | destination | string | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | - -* * * +--- ## Inherited Form Name @@ -71,14 +91,15 @@ To inherit from a table form, set the table in the [Inherited Form Table](#inher To remove inheritance, select **\** in the Property List (or " " in JSON). + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------- | --------------- | ------------------------------------------------------------------------------------------------------------------ | | inheritedForm | string | Name of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form | +--- -* * * ## Inherited Form Table @@ -86,6 +107,7 @@ This property specifies the database table from which to [inherit a form](forms. Set to **\** in the Property List (or " " in JSON) to inherited from a project form. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | @@ -93,14 +115,16 @@ Set to **\** in the Property List (or " " in JSON) to inherited from a pro | inheritedFormTable | string or number | table name or table number | -* * * +--- -## Published as Subform +## Publié en tant que sous-formulaire -For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host database, it must have been explicitly shared. When this property is selected, the form will be published in the host database. +Pour qu'un formulaire de composant soit sélectionné comme [sous-formulaire](FormObjects/subform_overview.md) dans une base de données hôte, il doit avoir été explicitement partagé. When this property is selected, the form will be published in the host application. Only project forms can be specified as published subforms. + + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | @@ -108,18 +132,17 @@ Only project forms can be specified as published subforms. | shared | boolean | true, false | -* * * - -## Save Geometry +--- -When the option is used, if the window is opened using the `Open form window` command with the `*` parameter, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session: +## Mémoriser géométrie -* the current page, -* the position, size and visibility of each form object (including the size and visibility of list box columns). +Lorsque cette option est cochée, si la fenêtre est ouverte via la commande `Creer fenetre` formulaire avec le paramètre `*`, plusieurs paramètres du formulaire seront automatiquement mémorisés par 4D au moment de la fermeture de la fenêtre, quelle que soit la manière dont ils ont été modifiés au cours de la session : -> This option does not take into account objects generated using the `OBJECT DUPLICATE` command. In order for a user to recover their environment when using this command, the developer must repeat the sequence of creation, definition and positioning of the objects. +* la page courante, +* la position, la taille et la visibilité de chaque objet du formulaire (y compris la taille et la visibilité des colonnes de list box). +> Cette option ne prend pas en compte les objets générés via la commande `OBJECT DUPLICATE`. Pour que l’utilisateur retrouve son environnement lors de l’utilisation de cette commande, le développeur doit répéter la séquence de création, définition et positionnement des objets. -When this option is selected, the [Save Value](FormObjects/properties_Object.md#save-value) option is available for certain objects. +Lorsque cette option est cochée, l’option [Mémoriser valeur](FormObjects/properties_Object.md#save-value) est en outre disponible pour certains objets. #### Grammaire JSON @@ -127,30 +150,30 @@ When this option is selected, the [Save Value](FormObjects/properties_Object.md# | ---------------- | --------------- | ----------------- | | memorizeGeometry | boolean | true, false | +#### Voir également +[**Mémoriser valeur**](FormObjects/properties_Object.md#save-value) -#### See also -[**Save Value**](FormObjects/properties_Object.md#save-value) +--- -* * * +## Nom de la fenêtre -## Window Title +Le nom de la fenêtre est utilisé lorsque le formulaire est ouvert à l'aide des commandes `Open form window` et `Open window` dans l'environnement d'application. Le nom de la fenêtre apparaît dans la barre de titre de la fenêtre. -The window title is used when the form is opened using the `Open form window` and `Open window` 4D commands in Application environment. The window title appears in the Title bar of the window. +Vous pouvez utiliser des références dynamiques pour définir les noms de fenêtre des formulaires, c'est-à-dire : -You can use dynamic references to set the window titles for forms, *i.e.*: +* Une référence XLIFF standard stockée dans le dossier Resources. +* Une étiquette de table ou de champ : la syntaxe à appliquer est ou + + . +* Une variable ou un champ : La syntaxe à appliquer est \ ou <[TableName]FieldName>. La valeur du champ ou de la variable sera affichée dans le nom de la fenêtre. -* A standard XLIFF reference stored in the Resources folder. -* A table or field label: The syntax to apply is or - - . +> Le nombre de caractères pour un nom de fenêtre est limité à 31. -* A variable or a field: The syntax to apply is \ or <[TableName]FieldName>. The current value of the field or variable will be displayed in the window title. +#### Grammaire JSON -> The number of characters for a window title is limited to 31. +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ------------------------------------------------------------- | +| windowTitle | string | Le nom de la fenêtre sous forme de texte brut ou de référence | -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----------- | --------------- | ------------------------------------------------------ | -| windowTitle | string | The name of the window as plain text or as a reference | \ No newline at end of file diff --git a/website/translated_docs/fr/FormEditor/properties_FormSize.md b/website/translated_docs/fr/FormEditor/properties_FormSize.md index fc9327f094a8ac..96be90c815125d 100644 --- a/website/translated_docs/fr/FormEditor/properties_FormSize.md +++ b/website/translated_docs/fr/FormEditor/properties_FormSize.md @@ -4,251 +4,114 @@ title: Form Size --- -4D lets you set the size of both the form and the [window](properties_WindowSize.md). These properties are interdependent and your application interface results from their interaction. - -Size options depend on the value of the **Size based on** option. - -* * * - -## Size based on - -* **Automatic Size**: The size of the form will be that necessary to display all the objects, to which will be added the margin values (in pixels) entered in the [**Hor. Margin**](#hor-margin) and [**Vert. Margin**](#vert-margin) fields. - -< - -p> You can choose this option when you want to use active objects placed in an offscreen area (*i.e.*, outside the bounding rectangle of the window) with an automatic size window. Thanks to this option, the presence of these objects will not modify the size of the window. - -* **Set Size**: The size of the form will be based on what you enter (in pixels) in the [**Width**](#width) and [**Height**](#height) fields. - -* **\ - - - : The size of the form will be based on the position of the selected form object. For example, if you choose an object that is placed in the bottom-right part of the area to be displayed, the form size will consist of a rectangle whose upper left corner will be the origin of the form and the lower right corner will correspond to that of the selected object, plus any margin values.

        - -
        -

        - For output forms, only the Hor. margin or Width fields are available. -

        -
        - -

        - Grammaire JSON -

        - - - - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - formSizeAnchor - - string - - Name of object to use to defined the size of the form -
        - -
        - -

        - Height -

        - -

        - Height of the form (in pixels) when the form size is Set size. -

        - -

        - Grammaire JSON -

        - - - - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - height - - number - - integer value -
        - -
        - -

        - Hor. Margin -

        - -

        - Value to add (in pixels) to the right margin of the form when the form size is Automatic size or \ - - -

        - -

        - This value also determines the right-hand margins of forms used in the Label editor. -

        - -

        - Grammaire JSON -

        - - - - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - rightMargin - - number - - integer value -
        - -
        - -

        - Vert. Margin -

        - -

        - Value to add (in pixels) to the bottom margin of the form when the form size is Automatic size or \ - - - .

        - -

        - This value also determines the top margins of forms used in the Label editor. -

        - -

        - Grammaire JSON -

        - - - - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - bottomMargin - - number - - integer value -
        - -
        - -

        - Largeur -

        - -

        - Width of the form (in pixels) when the form size is Set size. -

        - -

        - Grammaire JSON -

        - - - - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - width - - number - - integer value -
        \ No newline at end of file +4D vous permet de définir la taille du formulaire et de la [fenêtre](properties_WindowSize.md). Ces propriétés sont interdépendantes et l'interface de votre application résulte de leur interaction. + +Les options de taille dépendent de la valeur de l'option **Taille basée sur**. + +--- +## Taille basée sur + + +* **Taille automatique** : La taille du formulaire permettra d'afficher tous les objets, auxquels s'ajouteront les valeurs de marge (en pixels) saisies dans + +**les champs **Marge [hor.](#hor-margin) et Marge **ver.**

        Vous pouvez choisir cette option lorsque vous souhaitez utiliser des objets actifs placés dans une zone hors écran (c'est-à-dire en dehors du rectangle de délimitation de la fenêtre) avec une fenêtre de taille automatique. Grâce à cette option, la présence de ces objets ne modifiera pas la taille de la fenêtre.

        + + * **Fixer taille :** La taille du formulaire sera basée sur ce que vous entrez (en pixels) dans les champs [**Largeur**](#width) et [**Hauteur**](#height). + +* **\** : La taille du formulaire sera basée sur la position de l'objet de formulaire sélectionné. Par exemple, si vous choisissez un objet qui est placé dans la partie inférieure droite de la zone à afficher, la taille du formulaire sera constituée d'un rectangle dont le coin supérieur gauche sera l'origine du formulaire et le coin inférieur droit correspondra à celle de l'objet sélectionné, plus les éventuelles valeurs de marge. + + + + +> Pour les formulaires de sortie, seul les champs Marge [**hor. **](#hor-margin) ou [**Largeur**](width) sont disponibles. + + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| -------------- | --------------- | -------------------------------------------------------------- | +| formSizeAnchor | string | Nom de l'objet à utiliser pour définir la taille du formulaire | + + + + +--- + + +## Hauteur + +Hauteur du formulaire (en pixels) lorsque la [taille du formulaire](#size-based-on) est définie sur **Fixer taille**. + + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | ------------------ | +| height | number | valeur entier long | + + + + + +--- + + +## Marge hor. + +Valeur à ajouter (en pixels) à la marge droite du formulaire lorsque la [taille du formulaire](#size-based-on) est définie sur **Taille automatique** ou **\** + +Cette valeur détermine également les marges droites des formulaires utilisés dans l'éditeur d'étiquettes. + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ------------------ | +| rightMargin | number | valeur entier long | + + + + + +--- + + + +## Marge hor. + +Valeur à ajouter (en pixels) à la marge inférieure du formulaire lorsque la [taille du formulaire](#size-based-on) est définie sur **Taille automatique** ou **\**. + +Cette valeur détermine également les marges supérieures des formulaires utilisés dans l'éditeur d'étiquettes. + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ------------------ | +| bottomMargin | number | valeur entier long | + + + + + +--- + + +## Largeur + +Largeur du formulaire (en pixels) lorsque la [taille du formulaire](#size-based-on) est définie sur **Fixer taille**. + + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----- | --------------- | ------------------ | +| width | number | valeur entier long | diff --git a/website/translated_docs/fr/FormEditor/properties_JSONref.md b/website/translated_docs/fr/FormEditor/properties_JSONref.md index a526607682732e..dc66162013161c 100644 --- a/website/translated_docs/fr/FormEditor/properties_JSONref.md +++ b/website/translated_docs/fr/FormEditor/properties_JSONref.md @@ -3,46 +3,50 @@ id: jsonReference title: Liste de propriétés JSON --- -This page provides a comprehensive list of all form properties, sorted by their JSON name. Cliquez sur un nom de propriété pour accéder à sa description détaillée. +Cette page fournit une liste complète de toutes les propriétés du formulaire, triées par leur nom JSON. Cliquez sur un nom de propriété pour accéder à sa description détaillée. +> Dans le chapitre "Propriétés du formulaire", les propriétés sont triées en fonction de leurs noms et thèmes dans la liste des propriétés. -> In the "Form Properties" chapter, properties are sorted according to their names and themes in the Property List. +[a](#a) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [h](#h) - [i](#i) - [m](#m) - [p](#p) - [r](#r) - [s](#s) - [w](#w) -| Propriété | Description | Valeurs possibles | -| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| a | | | -| [bottomMargin](properties_FormSize.md#vert-margin) | Vertical margin value (in pixels) | minimum : 0 | -| **d** | | | -| [destination](properties_FormProperties.md#form-type) | Form type | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | -| **e** | | | -| [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"...]. | -| **f** | | | -| [formSizeAnchor](properties_FormSize.md#form-size) | Name of the object whose position determines the size of the form. (minimum length: 1) | Name of a 4D object | -| **h** | | | -| [height](properties_FormSize.md#height) | Height of the form | minimum : 0 | -| **i** | | | -| [inheritedForm](properties_FormProperties.md#inherited-form-name) | Designates the form to inherit | Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form | -| [inheritedFormTable](properties_FormProperties.md#inherited-form-table) | Designates the table an inherited form will use | A table name or number | -| **m** | | | -| [markerBody](properties_Markers.md#form-detail) | Detail marker position | minimum : 0 | -| [markerBreak](properties_Markers.md#form-break) | Break marker position(s) | minimum : 0 | -| [markerFooter](properties_Markers.md#form-footer) | Footer marker position | minimum : 0 | -| [markerHeader](properties_Markers.md#forrm-header) | Header marker position(s) | integer minimum: 0; integer array minimum: 0 | -| [memorizeGeometry](properties_FormProperties.md#memorize-geometry) | Saves the form parameters when the form window is closed | true, false | -| [menuBar](properties_Menu.md#associated-menu-bar) | Menu bar to associate to the form | Name of a valid menu bar | -| [method](properties_Action.md#method) | A project method name. | The name of an existing project method | -| **p** | | | -| [pages](properties_FormProperties.md#pages) | Collection of pages (each page is an object) | Page objects | -| [pageFormat](properties_Print.md#settings) | object | Available print properties | -| **r** | | | -| [rightMargin](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | minimum : 0 | -| **s** | | | -| [shared](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | -| **w** | | | -| [width](properties_FormSize.md#width) | Width of the form | minimum : 0 | -| [windowMaxHeight](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | minimum : 0 | -| [windowMaxWidth](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | minimum : 0 | -| [windowMinHeight](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | minimum : 0 | -| [windowMinWidth](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | minimum : 0 | -| [windowSizingX](properties_WindowSize.md#fixed-width) | Form window's vertical sizing | "fixed", "variable" | -| [windowSizingY](properties_WindowSize.md#fixed-height) | Form window's horizontal sizing | "fixed", "variable" | -| [windowTitle](properties_FormProperties.md#window-title) | Designates a form window's title | A name for the form window | \ No newline at end of file +| Propriété | Description | Valeurs possibles | +| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **a** | | | +| [`bottomMargin`](properties_FormSize.md#vert-margin) | Valeur de la marge verticale (en pixels) | minimum : 0 | +| **c** | | | +| [`colorScheme`](properties_FormProperties.md#color-scheme) | Color scheme for the form | "dark", "light" | +| **d** | | | +| [`destination`](properties_FormProperties.md#form-type) | Type de formulaire | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +| **e** | | | +| [`entryOrder`](formEditor.md#data-entry-order) | L'ordre dans lequel les objets actifs sont sélectionnés lorsque **l'onglet** ou la touche **retour chariot** est utilisé(e) dans un formulaire de saisie | Collection de noms d'objets 4D Form | +| [`events`](Events/overview.md) | Liste de tous les événements sélectionnés pour l'objet ou le formulaire | Collection de noms d'événements, ex : ["onClick","onDataChange"...]. | +| **f** | | | +| [`formSizeAnchor`](properties_FormSize.md#form-size) | Nom de l'objet dont la position détermine la taille du formulaire. (longueur minimale : 1) | Nom d'un objet 4D | +| **h** | | | +| [`height`](properties_FormSize.md#height) | Hauteur du formulaire | minimum : 0 | +| **i** | | | +| [`inheritedForm`](properties_FormProperties.md#inherited-form-name) | Désigne le formulaire à hériter | Nom (chaîne) de la table ou du formulaire projet OU d'un chemin POSIX (chaîne) vers un fichier .json décrivant le formulaire OU un objet décrivant le formulaire | +| [`inheritedFormTable`](properties_FormProperties.md#inherited-form-table) | Désigne la table qu'un formulaire hérité utilisera | Un nom ou un numéro de table | +| **m** | | | +| [`markerBody`](properties_Markers.md#form-detail) | Position du marqueur de détail | minimum : 0 | +| [`markerBreak`](properties_Markers.md#form-break) | Position(s) du marqueur de rupture | minimum : 0 | +| [`markerFooter`](properties_Markers.md#form-footer) | Position du marqueur de pied | minimum : 0 | +| [`markerHeader`](properties_Markers.md#forrm-header) | Position(s) du marqueur d'en-tête | integer minimum: 0; integer array minimum: 0 | +| [`memorizeGeometry`](properties_FormProperties.md#memorize-geometry) | Enregistre les paramètres du formulaire lorsque la fenêtre du formulaire est fermée | true, false | +| [`menuBar`](properties_Menu.md#associated-menu-bar) | Barre de menu à associer au formulaire | Nom d'une barre de menus valide | +| [`method`](properties_Action.md#method) | Le nom d'une méthode projet. | Le nom d'une méthode projet existante | +| **p** | | | +| [`pages`](properties_FormProperties.md#pages) | Collection de pages (chaque page est un objet) | Objets page | +| [`pageFormat`](properties_Print.md#settings) | object | Propriétés d'impression disponibles | +| **r** | | | +| [`rightMargin`](properties_FormSize.md#hor-margin) | Valeur de la marge horizontale (en pixels) | minimum : 0 | +| **s** | | | +| [`shared`](properties_FormProperties.md#published-as-subform) | Indique si un formulaire peut être utilisé comme sous-formulaire | true, false | +| **w** | | | +| [`width`](properties_FormSize.md#width) | Largeur du formulaire | minimum : 0 | +| [`windowMaxHeight`](properties_FormProperties.md#maximum-height) | La plus grande hauteur autorisée de la fenêtre de formulaire | minimum : 0 | +| [`windowMaxWidth`](properties_FormProperties.md#maximum-width) | La plus grande largeur autorisée de la fenêtre de formulaire | minimum : 0 | +| [`windowMinHeight`](properties_FormProperties.md#minimum-height) | La plus petite hauteur autorisée de la fenêtre de formulaire | minimum : 0 | +| [`windowMinWidth`](properties_FormProperties.md#minimum-width) | La plus petite largeur autorisée de la fenêtre de formulaire | minimum : 0 | +| [`windowSizingX`](properties_WindowSize.md#fixed-width) | Dimensionnement vertical de la fenêtre de formulaire | "fixed", "variable" | +| [`windowSizingY`](properties_WindowSize.md#fixed-height) | Dimensionnement horizontal de la fenêtre de formulaire | "fixed", "variable" | +| [`windowTitle`](properties_FormProperties.md#window-title) | Désigne le titre d'une fenêtre de formulaire | Un nom pour la fenêtre de formulaire | \ No newline at end of file diff --git a/website/translated_docs/fr/FormEditor/properties_Markers.md b/website/translated_docs/fr/FormEditor/properties_Markers.md index d64657ad0bc0c9..13c885583bd633 100644 --- a/website/translated_docs/fr/FormEditor/properties_Markers.md +++ b/website/translated_docs/fr/FormEditor/properties_Markers.md @@ -10,7 +10,7 @@ Whenever any form is used for output, either for screen display or printing, the Methods that are associated with objects in these areas are executed when the areas are printed or displayed as long as the appropriate events have been activated. For example, a object method placed in the Header area is executed when the `On Header` event takes place. -* * * +--- ## Form Break @@ -20,15 +20,14 @@ The Break area is defined as the area between the Detail control line and the Br You can make Break areas smaller or larger. You can use a Break area to display information that is not part of the records (instructions, current date, current time, etc.), or to display a line or other graphic element that concludes the screen display. In a printed report, you can use a Break area for calculating and printing subtotals and other summary calculations. -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----------- | --------------------------------- | ------------------------------------------------------------------------------------------- | -| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels. -Minimum value: 0 | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------------------------- | -------------------------------------------------------------------------------------------------- | +| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels.
        Minimum value: 0 | -* * * +--- ## Form Detail @@ -42,18 +41,12 @@ You can make the Detail area smaller or larger. Whatever you place in the Detail | ---------- | --------------- | ----------------------------------- | | markerBody | integer | Detail marker position. Minimum : 0 | - -* * * +--- ## Form Footer The Form Footer area is displayed on screen under the list of records. It is always printed at the bottom of every page of a report. The Footer area is defined as the area between the Break control line and the Footer control line. - -You make the Footer area smaller or larger. - -< - -p> +You make the Footer area smaller or larger.

        You can use the Footer area to print graphics, page numbers, the current date, or any text you want at the bottom of each page of a report. For output forms designed for use on screen, the Footer area typically contains buttons that give the user options such as doing a search or sort, printing records, or putting away the current report. Active objects are accepted. @@ -64,22 +57,17 @@ You can use the Footer area to print graphics, page numbers, the current date, o | markerFooter | integer | minimum : 0 | -* * * +--- ## Form Header The form Header area is displayed at the top of each screen and is printed at the top of each page of a report. The Header area is defined as the area above the Header control line. - -You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern. - -< - -p> +You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern.

        You can also place and use active objects in the Header area of output forms displayed as subforms, in the records display window or using the `DISPLAY SELECTION` and `MODIFY SELECTION` commands. The following active objects can be inserted: - Buttons, picture buttons, -- Combo boxes, drop-down lists, picture pop-up menus, +- Combo boxes, drop-down lists, picture pop-up menus, - hierarchical lists, list boxes - Radio buttons, check boxes, 3D check boxes, - Progress indicators, rulers, steppers, spinners. @@ -88,15 +76,17 @@ Standard actions such as `Add Subrecord`, `Cancel` (lists displayed using `DISPL The form can contains [additional header areas](#additional-areas) to be associated with additional breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. + + #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------------------------- | --------------------------------------------------------------------------------------------- | -| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels. -Minimum value: 0 | +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------- | +| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels.
        Minimum value: 0 | + -* * * +--- ## Additional areas @@ -112,16 +102,19 @@ Break at level 0 zero takes in all the records; it occurs after all the records A Break level 1 occurs after the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Break 1|Break at level 1|First sorted field Form Break 2|Break at level 2|Second sorted field Form Break 3|Break at level 3|Third sorted field| +| Label | Description | Prints after groups created by: | +| ------------ | ---------------- | ------------------------------- | +| Form Break 1 | Break at level 1 | First sorted field | +| Form Break 2 | Break at level 2 | Second sorted field | +| Form Break 3 | Break at level 3 | Third sorted field | Additional Header areas are associated with Breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Header 1|Header at level 1|First sorted field Form Header 2|Header at level 2|Second sorted field Form Header 3|Header at level 3|Third sorted field| +| Label | Description | Prints after groups created by: | +| ------------- | ----------------- | ------------------------------- | +| Form Header 1 | Header at level 1 | First sorted field | +| Form Header 2 | Header at level 2 | Second sorted field | +| Form Header 3 | Header at level 3 | Third sorted field | + -If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. \ No newline at end of file +If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. diff --git a/website/translated_docs/fr/FormEditor/properties_Menu.md b/website/translated_docs/fr/FormEditor/properties_Menu.md index f95724aefbcb75..6cc792cb3295fc 100644 --- a/website/translated_docs/fr/FormEditor/properties_Menu.md +++ b/website/translated_docs/fr/FormEditor/properties_Menu.md @@ -4,18 +4,20 @@ title: Menu --- -## Associated Menu Bar +## Barre de menus associée -When a menu bar is associated to a form, it is added to the right of the current menu bar when the form is displayed in Application environment. +Lorsqu'une barre de menus est associée à un formulaire, elle est ajoutée à droite de la barre de menus courante lorsque le formulaire est affiché dans l'environnement d'Application. -The selection of a menu command causes an `On Menu Selected` event to be sent to the form method; you can then use the `Menu selected` command to test the selected menu. +La sélection d'une commande de menu entraîne l'envoi d'un événement `Sur menu sélectionné` à la méthode formulaire; vous pouvez ensuite utiliser la commande `Menu selected` pour tester le menu sélectionné. -> If the menu bar of the form is identical to the current menu bar, it is not added. +> Si la barre de menus du formulaire est identique à la barre de menus courante, elle n'est pas ajoutée. + +La barre de menus du formulaire fonctionnera pour les formulaires d'entrée et de sortie. -The form menu bar will operate for both input and output forms. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------- | --------------- | ------------------ | -| menuBar | string | Name of a menu bar | \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| ------- | --------------- | ----------------------- | +| menuBar | string | Nom d'une barre de menu | + diff --git a/website/translated_docs/fr/FormEditor/properties_Print.md b/website/translated_docs/fr/FormEditor/properties_Print.md index b2e67a6e5bfe6a..e89f2552f85543 100644 --- a/website/translated_docs/fr/FormEditor/properties_Print.md +++ b/website/translated_docs/fr/FormEditor/properties_Print.md @@ -12,12 +12,16 @@ Allows defining specific print settings for the form. This feature is useful to You can modify the following print settings: -* Paper format -* Paper orientation -* Page scaling +* Paper format +* Paper orientation +* Page scaling + > Available options depend on the system configuration. + + + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | @@ -30,4 +34,12 @@ You can modify the following print settings: | scale | number | minimum : 0 | -* * * \ No newline at end of file +--- + + + + + + + + diff --git a/website/translated_docs/fr/FormEditor/properties_WindowSize.md b/website/translated_docs/fr/FormEditor/properties_WindowSize.md index 6edcff482658f4..8d6efa67d88d6f 100644 --- a/website/translated_docs/fr/FormEditor/properties_WindowSize.md +++ b/website/translated_docs/fr/FormEditor/properties_WindowSize.md @@ -4,11 +4,13 @@ title: Window Size --- -## Fixed Height +## Hauteur fixe -If you select this option, the window height will be locked and it will not be possible for the user to resize it. -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Height and Maximum Height](#maximum-height-minimum-height) properties can be used to determine the resizing limits. +Si vous cochez cette option, la hauteur de la fenêtre sera verrouillée et l'utilisateur ne pourra plus la redimensionner. + +Si cette option n'est pas cochée, la largeur de la fenêtre du formulaire peut être modifiée. Dans ce cas, les propriétés [Hauteur mini et Hauteur maxi](#maximum-height-minimum-height) peuvent être utilisées pour déterminer les limites de redimensionnement. + #### Grammaire JSON @@ -17,13 +19,15 @@ If this option is not selected, the width of the form window can be modified. In | windowSizingY | string | "fixed", "variable" | -* * * +--- + +## Largeur fixe + -## Fixed Width +Si vous cochez cette option, la largeur de la fenêtre sera verrouillée et l'utilisateur ne pourra plus la redimensionner. -If you select this option, the window width will be locked and it will not be possible for the user to resize it. +Si cette option n'est pas cochée, la largeur de la fenêtre du formulaire peut être modifiée. Dans ce cas, les propriétés [Largeur mini et Largeur maxi](#maximum-width-minimum-width) peuvent être utilisées pour déterminer les limites de redimensionnement. -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Width and Maximum Width](#maximum-width-minimum-width) properties can be used to determine the resizing limits. #### Grammaire JSON @@ -31,28 +35,31 @@ If this option is not selected, the width of the form window can be modified. In | ------------- | --------------- | ------------------- | | windowSizingX | string | "fixed", "variable" | +--- + -* * * -## Maximum Height, Minimum Height +## Hauteur maxi, Hauteur mini -Maximum and minimum height (in pixels) of a resizeable form window if the [Fixed Height](#fixed-height) option is not set. +Hauteur maximale et minimale (en pixels) d'une fenêtre de formulaire redimensionnable si l'option [Hauteur fixe](#fixed-height) n'est pas définie. ##### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| --------------- | --------------- | ----------------- | -| windowMinHeight | number | integer value | -| windowMaxHeight | number | integer value | +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ------------------ | +| windowMinHeight | number | valeur entier long | +| windowMaxHeight | number | valeur entier long | -## Maximum Width, Minimum Width +## Largeur maxi, Largeur mini + +Largeur maximale et minimale (en pixels) d'une fenêtre de formulaire redimensionnable si l'option [Largeur fixe](#fixed-width) n'est pas définie. -Maximum and minimum width (in pixels) of a resizeable form window if the [Fixed Width](#fixed-width) option is not set. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------------- | --------------- | ----------------- | -| windowMinWidth | number | integer value | -| windowMaxWidth | number | integer value | \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| -------------- | --------------- | ------------------ | +| windowMinWidth | number | valeur entier long | +| windowMaxWidth | number | valeur entier long | + diff --git a/website/translated_docs/fr/FormObjects/buttonGrid_overview.md b/website/translated_docs/fr/FormObjects/buttonGrid_overview.md index fda19308534a70..765bd442e8e4e1 100644 --- a/website/translated_docs/fr/FormObjects/buttonGrid_overview.md +++ b/website/translated_docs/fr/FormObjects/buttonGrid_overview.md @@ -3,14 +3,13 @@ id: buttonGridOverview title: Grille de boutons --- -## Aperçu - Une grille de boutons est un objet transparent placé sur une image. L’image doit correspondre à la forme d’un tableau. Lorsque l'utilisateur clique sur un graphique, ce dernier aura un aspect comprimé : ![](assets/en/FormObjects/buttonGrid_smileys.png) Vous pouvez utiliser une grille de boutons pour déterminer où l’utilisateur clique dans l’image. Votre méthode objet utilise alors l’événement `Sur clic` et gère les actions suivant l’emplacement du clic souris. + ## Créer une grille de boutons Pour créer une grille de boutons, placez une image d’arrière-plan puis dessinez une grille de boutons par dessus. Spécifiez le nombre de [lignes](properties_Crop.md#rows) et de [colonnes](properties_Crop.md#columns). @@ -23,10 +22,12 @@ Pour créer une grille de boutons, placez une image d’arrière-plan puis dessi Les boutons de la grille sont numérotés de gauche à droite et de haut en bas, à partir de l’angle supérieur gauche vers l’angle inférieur droit. Dans cet exemple, la grille est dotée de 16 rangées et 16 colonnes. Le bouton situé en haut à gauche est le bouton n° 1. Le dernier bouton de la deuxième rangée est le bouton n° 32. Si aucun élément n'est sélectionné, la valeur est de 0 + ### Aller à page Vous pouvez associer l’[action standard](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) `Aller à page` à un objet de type Grille de boutons. Lorsque cette action est activée, 4D affiche automatiquement la page du formulaire correspondant au numéro du bouton sélectionné dans la grille de boutons. Par exemple, si l’utilisateur clique sur le 10e bouton de la grille, 4D affichera la page 10 du formulaire courant (si elle existe). + ## Propriétés prises en charge -[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Colonnes](properties_Crop.md#columns) - [Déposable](properties_Action.md#droppable) - [Height](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Lignes](properties_Crop.md#rows) - [Action standard](properties_Action.md#standard-action) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Largeur](properties_CoordinatesAndSizing.md#width) - [Visibilité](properties_Display.md#visibility) \ No newline at end of file +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Colonnes](properties_Crop.md#columns) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Lignes](properties_Crop.md#rows) - [Action standard](properties_Action.md#standard-action) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Largeur](properties_CoordinatesAndSizing.md#width) - [Visibilité](properties_Display.md#visibility) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/button_overview.md b/website/translated_docs/fr/FormObjects/button_overview.md index ce6f6fed7a7c37..6f6934f4d5fa01 100644 --- a/website/translated_docs/fr/FormObjects/button_overview.md +++ b/website/translated_docs/fr/FormObjects/button_overview.md @@ -9,10 +9,6 @@ Un bouton est un objet actif auquel une action peut être assignée (*ex :* une Les boutons peuvent répondre à divers besoins qui dépendent du style et de l'action qui leur est affecté(e). Par exemple, les boutons peuvent amener l'utilisateur à faire des choix ou à compléter un questionnaire ou formulaire. En fonction de leurs propriétés, les bouton peuvent être destinés à être cliqués une fois seulement et à exécuter une commande, ou à être cliqués plusieurs fois pour obtenir le résultat escompté. -< - -p> - ## Gestion des boutons Les actions assignées aux boutons peuvent provenir d'[actons standard](properties_Action.md#standard-action) ou de méthodes objet personnalisées. Les actions typiques peuvent consister à laisser l'utilisateur accepter, annuler ou supprimer des enregistrements, à copier ou coller des données, à passer d'une page à l'autre dans un formulaire de plusieurs pages, à ouvrir, supprimer ou ajouter des enregistrements dans un sous-formulaire, à gérer les attributs de police dans les zones de texte , etc. @@ -23,8 +19,12 @@ Si vous souhaitez qu'un bouton exécute une action qui n'est pas disponible en t La [variable](properties_Object.md#variable-or-expression) associée à un bouton est automatiquement définie sur **0** lorsque le formulaire est exécuté pour la première fois en mode Développement ou Application. Lorsque l'utilisateur clique sur un bouton, sa variable est définie sur **1**. + + > Il est possible d'affecter à la fois une action standard et une méthode à un bouton. Dans ce cas, si le bouton n'est pas désactivé par l'action standard, la méthode est exécutée avant l'action standard. + + ## Styles de bouton Les styles de bouton contrôlent l'apparence générale d'un bouton ainsi que ses propriétés. Il est possible d'appliquer différents styles prédéfinis aux boutons ou de leur associer des pop-up menus. Plusieurs variantes peuvent être obtenues en combinant ces propriétés/comportements. @@ -33,6 +33,8 @@ Les styles de bouton contrôlent l'apparence générale d'un bouton ainsi que se 4D propose des boutons dans les styles prédéfinis suivants : + + ### Classique Le style de bouton Classique est un bouton système standard (c'est-à-dire un rectangle avec un libellé descriptif) qui exécute le code lorsqu'un utilisateur clique dessus. @@ -44,6 +46,7 @@ Par défaut, le style Classique a un fond gris clair avec un libellé au centre. #### Exemple JSON : ```4d + "myButton": { "type": "button", //définit le type d'objet "style":"regular", //définit le style du bouton @@ -57,8 +60,10 @@ Par défaut, le style Classique a un fond gris clair avec un libellé au centre. } ``` + Seuls les styles Classique et A plat proposent la propriété [Bouton par défaut](properties_Appearance.md#default-button). + ### A plat Le style de bouton A plat est un bouton système standard (c'est-à-dire un rectangle avec un libellé descriptif) qui exécute le code lorsqu'un utilisateur clique dessus. @@ -70,7 +75,8 @@ Par défaut, le style A plat a un arrière-plan avec un libellé au centre, des #### Exemple JSON : ```4d -
        "myButton": { + + "myButton": { "type": "button", "style":"flat", "defaultButton":"true" @@ -83,6 +89,7 @@ Par défaut, le style A plat a un arrière-plan avec un libellé au centre, des } ``` + Seuls les styles Classique et A plat proposent la propriété [Bouton par défaut](properties_Appearance.md#default-button). ### Barre d’outils @@ -91,11 +98,11 @@ Le style du bouton Barre d'outils est initialement destiné à être intégré d Par défaut, le style bouton Barre d'outils a un fond transparent avec un libellé au centre. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - le contour du bouton apparaît lorsqu’il dispose de la propriété “Avec pop-up menuâ€, et un triangle est affiché à droite et au centre du bouton. + - *Sous Windows* - le contour du bouton apparaît lorsqu’il dispose de la propriété “Avec pop-up menuâ€, et un triangle est affiché à droite et au centre du bouton. ![](assets/en/FormObjects/button_toolbar.png) -- *Sous macOS* - le contour du bouton n’apparaît jamais. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. + - *Sous macOS* - le contour du bouton n’apparaît jamais. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. #### Exemple JSON : @@ -113,17 +120,19 @@ Par défaut, le style bouton Barre d'outils a un fond transparent avec un libell } ``` + + ### Bevel Le bouton barre d'outils combine l'apparence du style [Classique](#regular) (c'est-à-dire un rectangle avec un libellé descriptif) et la propriété de pop-up menu du style [Barre d'outils](#toolbar). Par défaut, le style Bevel a un fond gris clair avec un libellé au centre. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - le contour du bouton apparaît. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et au centre du bouton. + - *Sous Windows* - le contour du bouton apparaît. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et au centre du bouton. ![](assets/en/FormObjects/button_bevel.png) -- *Sous macOS* - le contour du bouton n’apparaît jamais. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. + - *Sous macOS* - le contour du bouton n’apparaît jamais. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. #### Exemple JSON : @@ -141,17 +150,19 @@ Par défaut, le style Bevel a un fond gris clair avec un libellé au centre. En } ``` + + ### Bevel arrondi Le style du bouton Bevel arrondi est presque identique au style [Bevel](#bevel), à l'exception des coins du bouton qui peuvent, selon le système d'exploitation, être arrondis. Comme pour le style Bevel, le style Bevel arrondi combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). Par défaut, le style Bevel arrondi a un fond gris clair avec un libellé au centre. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - le bouton est identique au style Bevel. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et au centre du bouton. - - ![](assets/en/FormObjects/button_roundedbevel.png) + - *Sous Windows* - le bouton est identique au style Bevel. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et au centre du bouton. + + ![](assets/en/FormObjects/button_roundedbevel.png) -- *Sous macOS* - les coins du bouton sont arrondis. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. + - *Sous macOS* - les coins du bouton sont arrondis. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. #### Exemple JSON : @@ -169,17 +180,19 @@ Par défaut, le style Bevel arrondi a un fond gris clair avec un libellé au cen } ``` + + ### OS X Gradient -Le style du bouton OS X Gradient est presque identique au style [Bevel](#bevel), à l'exception de son apparence qui peut, en fonction du système d'exploitation, avoir deux tons. Comme pour le style Bevel, le style OS X Gradient combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +Le style du bouton OS X Gradient est presque identique au style [Bevel](#bevel). Comme pour le style Bevel, le style OS X Gradient combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). Par défaut, le style OS Gradient a un fond gris clair avec un libellé au centre. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - le bouton est identique au style Bevel. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et au centre du bouton. + - *Sous Windows* - le bouton est identique au style Bevel. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite du bouton. ![](assets/en/FormObjects/button_osxgradient.png) -- *Sous macOs* - le bouton s'affiche comme un bouton à deux tons. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. + - *Sous macOs* - le bouton s'affiche comme un bouton à deux tons. Lorsqu’il dispose de la propriété “Avec pop up menuâ€, un triangle est affiché à droite et en bas du bouton. #### Exemple JSON : @@ -197,17 +210,18 @@ Par défaut, le style OS Gradient a un fond gris clair avec un libellé au centr } ``` + ### OS X Texture -Le style du bouton OS X Textured est presque identique au style [Bevel](#bevel), à l'exception de son apparence qui peut, en fonction du système d'exploitation, être différente. Comme pour le style Bevel, le style OS X Textured combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +The OS X Textured button style is nearly identical to the [Bevel](#bevel) style but with a smaller size (maximum size is the size of a standard macOS system button). Comme pour le style Bevel, le style OS X Textured combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). Par défaut, le style OS X Textured apparaît comme : -- *Sous Windows* - un bouton système standard avec un fond gris clair et un libellé au centre. Il a la particularité d'être transparent dans Vista. - - ![](assets/en/FormObjects/button_osxtextured.png) + - *Sous Windows* - un bouton système standard avec un fond gris clair et un libellé au centre. Il a la particularité d'être transparent dans Vista. -- *Sous macOS* - un bouton système standard affichant un changement de couleur du gris clair au gris foncé. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. + ![](assets/en/FormObjects/button_osxtextured.png) + + - *Sous macOS* - un bouton système standard affichant un changement de couleur du gris clair au gris foncé. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. #### Exemple JSON : @@ -225,17 +239,19 @@ Par défaut, le style OS X Textured apparaît comme : } ``` + + ### Office XP Le style de bouton Office XP combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). Les couleurs (surbrillance et arrière-plan) d'un bouton au style Office XP sont basées sur les couleurs du système. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. + - *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. ![](assets/en/FormObjects/button_officexp.png) -- *Sous macOS* - son arrière-plan est toujours affiché. + - *Sous macOS* - son arrière-plan est toujours affiché. #### Exemple JSON : @@ -253,8 +269,11 @@ Les couleurs (surbrillance et arrière-plan) d'un bouton au style Office XP sont } ``` + + ### Aide + Le style du bouton Aide peut être utilisé pour afficher un bouton d'aide système standard. Par défaut, le style Aide s'affiche sous la forme d'un point d'interrogation dans un cercle. ![](assets/en/FormObjects/button_help.png) @@ -276,6 +295,7 @@ Le style du bouton Aide peut être utilisé pour afficher un bouton d'aide syst > Le style Aide ne prend pas en charge les propriétés basiques du [nombre d'états](properties_TextAndPicture.md#number-of-states), du [chemin d'accès image](properties_TextAndPicture.md#picture-pathname) et de la [position Titre/Image](properties_TextAndPicture.md#title-picture-position). + ### Rond Le style de bouton Rond apparaît comme un bouton système circulaire. Ce style de bouton est conçu pour macOS. @@ -284,19 +304,23 @@ Le style de bouton Rond apparaît comme un bouton système circulaire. Ce style Sous Windows, il est identique au style «Aucun» (le cercle en arrière-plan n'est pas pris en compte). + #### Exemple JSON : - "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 + } +``` + + ### Personnalisé @@ -304,6 +328,7 @@ Le style de bouton Personnalisé accepte une image d'arrière-plan personnalisé ![](assets/en/FormObjects/button_custom.png) + #### Exemple JSON : ```code @@ -321,16 +346,22 @@ Le style de bouton Personnalisé accepte une image d'arrière-plan personnalisé } ``` + + + ## Propriétés prises en charge Tous les boutons partagent une même série de propriétés de base : + [Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Style de bouton](properties_TextAndPicture.md#button-style) - [CSS Class](properties_Object.md#css-class) - [Déposable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Haut](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Non représenté](properties_Display.md#not-rendered) - [Nombre d'états](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) Non pris en charge par le style [Aide](#help). + Des propriétés spécifiques supplémentaires sont disponibles, en fonction du [style de bouton](#button-styles) : - [Chemin d'accès arrière-plan](properties_TextAndPicture.md#backgroundPathname) - [Marge horizontale](properties_TextAndPicture.md#horizontalMargin) - [Décalage icône](properties_TextAndPicture.md#icon-offset) - [Marge verticale](properties_TextAndPicture.md#verticalMargin) (Personnalisé) - [Bouton par défaut](properties_Appearance.md#default-button) (A plat, Classique) -- [Position Titre/Image](properties_TextAndPicture.md#title-picture-position) - [Avec pop-up menu](properties_TextAndPicture.md#with-pop-up-menu) (Barre outils, Bevel, Bevel arrondi, OS X Gradient, OS X Textured, Office XP, Rond, Personnalisé) \ No newline at end of file +- [Avec pop-up menu](properties_TextAndPicture.md#with-pop-up-menu) (Barre outils, Bevel, Bevel arrondi, OS X Gradient, OS X Textured, Office XP, Rond, Personnalisé) + diff --git a/website/translated_docs/fr/FormObjects/checkbox_overview.md b/website/translated_docs/fr/FormObjects/checkbox_overview.md index b288f5ff283194..11b4dc59440844 100644 --- a/website/translated_docs/fr/FormObjects/checkbox_overview.md +++ b/website/translated_docs/fr/FormObjects/checkbox_overview.md @@ -3,39 +3,39 @@ id: checkboxOverview title: Case à cocher --- -## Aperçu - -Une case à cocher est un type de bouton utilisée pour saisir ou afficher une donnée binaire (vrai-faux). Elle peut être soit sélectionnée soit désélectionnée, mais un troisième état peut également être défini (voir ci-dessous). +Une case à cocher est un type de bouton utilisée pour saisir ou afficher une donnée binaire (vrai-faux). Basically, it is either checked or unchecked, but a [third state](#three-states-check-box) can be defined. ![](assets/en/FormObjects/checkbox.png) -L’effet d’une case à cocher est contrôlé par une méthode. Comme tous les boutons, une case à cocher est initialisée à la valeur zéro lorsque le formulaire est ouvert pour la première fois. La méthode associée à une case à cocher est exécutée lorsqu’elle est cochée. +Check boxes are controlled by methods or [standard actions](#using-a-standard-action). La méthode associée à une case à cocher est exécutée lorsqu’elle est cochée. Comme tous les boutons, une case à cocher est initialisée à la valeur zéro lorsque le formulaire est ouvert pour la première fois. Une case à cocher affiche généralement du texte en face de la case. Ce texte est défini dans la zone [Titre](properties_Object.md#title) du thème “Objets†de la Liste des propriétés. Vous pouvez saisir dans cette zone un libellé sous forme de référence XLIFF (cf. [Annexe B : Architecture XLIFF](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html)). + ## Utiliser une case à cocher Une case à cocher peut être associée à une [variable ou expression](properties_Object.md#variable-or-expression) de type entier ou booléen. - **entier :** si la case est cochée, la variable prend la valeur 1. Lorsqu'elle n'est pas cochée, elle porte la valeur 0. Si la case à cocher a un troisième état (voir ci-dessous), elle porte la valeur 2. -- **booléen :** si la case est cochée, la variable prend la valeur `Vrai`. Lorsqu'elle n'est pas cochée, elle prend la valeur `Faux`. +- **booléen :** si la case est cochée, la variable prend la valeur `Vrai`. Lorsqu'elle n'est pas cochée, elle prend la valeur `Faux`. + +Une partie ou la totalité des cases à cocher contenues dans un formulaires peut être cochée ou non cochée. Plusieurs cases à cocher permettent à l'utilisateur de cocher plusieurs options. -Une partie ou la totalité des cases à cocher contenues dans un formulaires peut être cochée ou non cochée. Un groupe de cases à cocher permet à l'utilisateur de cocher plusieurs options. ### Cases à cocher à trois états -Les objets de type case à cocher de style [Classique](checkbox_overview.md#regular) et [A plat](checkbox_overview.md#flat) acceptent un troisième état. Ce troisième état représente un statut intermédiaire, généralement utilisé pour l’affichage. Il permet par exemple d’indiquer qu’une propriété est présente parmi une sélection d’objets mais pas dans chaque objet de la sélection. +Check box objects with [Regular](checkbox_overview.md#regular) and [Flat](checkbox_overview.md#flat) [button style](properties_TextAndPicture.md#button-style) accept a third state. Ce troisième état représente un statut intermédiaire, généralement utilisé pour l’affichage. Il permet par exemple d’indiquer qu’une propriété est présente parmi une sélection d’objets mais pas dans chaque objet de la sélection. ![](assets/en/FormObjects/checkbox_3states.png) Pour qu’une case à cocher prenne en charge ce troisième état, vous devez lui attribuer la propriété [Trois états](properties_Display.md#three-states) dans la Liste des propriétés, thème “Affichage†. -Cette propriété n’est disponible que pour les cases à cocher classiques et à plat associées à des [variables ou expressions](properties_Object.md#variable-or-expression) numériques — les cases à cocher de représentation des expressions booléennes sont exclues de ce principe (une expression booléenne ne pouvant pas se trouver dans un état intermédiaire). +Cette propriété n’est disponible que pour les cases à cocher classiques et à plat associées à des [variables ou expressions](properties_Object.md#variable-or-expression) numériques — les cases à cocher de représentation des expressions booléennes sont exclues de ce principe (une expression booléenne ne pouvant pas se trouver dans un état intermédiaire). La variable associée à la case à cocher retourne la valeur 2 lorsque celle-ci se trouve dans le troisième état. - > En saisie, les cases à cocher à trois états affichent séquentiellement chaque état, dans l’ordre suivant : non coché / coché / intermédiaire / non coché, etc. L’état intermédiaire étant généralement inutile en saisie ; il vous suffit, dans le code, de “forcer†la valeur de la variable à 0 lorsqu’elle prend la valeur 2 afin de passer directement de l’état coché à l’état non coché. + ## Utiliser une action standard Vous pouvez affecter une [action standard](properties_Action.md#standard-action) à une case à cocher pour gérer les attributs des zones de texte. Par exemple, si vous sélectionnez l'action standard `fontBold`, à l'exécution la case à cocher permettra de gérer l'attribut "gras" du texte sélectionné dans la zone de texte courante. @@ -73,119 +73,133 @@ Seules les actions qui peuvent représenter un statut vrai/faux (actions "à coc | visibleReferences | | | widowAndOrphanControlEnabled | Zones 4D Write Pro uniquement | - -Pour plus d'informations sur ces actions, veuillez vous reporter à la section [Actions standard](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). +For detailed information on these actions, please refer to the [Standard actions](properties_Action.md#standard-action) section. ## Styles des boutons "Case à cocher" -Les styles de bouton des cases à cocher contrôlent l'apparence générale d'une case à cocher ainsi que ses propriétés. Il est possible d'appliquer différents styles prédéfinis aux cases à cocher. Plusieurs variantes peuvent être obtenues en combinant ces propriétés/comportements. +Check boxes use [button styles](properties_TextAndPicture.md#button-style) to control a check box's general appearance as well as its available properties. Il est possible d'appliquer différents styles prédéfinis aux cases à cocher. Plusieurs variantes peuvent être obtenues en combinant ces propriétés/comportements. À l'exception des [propriétés disponibles](#supported-properties), de nombreux objets case à cocher sont *structurellement* identiques. La différence réside dans le traitement de leurs variables associées. -4D propose des cases à cocher avec les styles prédéfinis suivants : +4D propose des cases à cocher avec les styles de bouton prédéfinis suivants : ### Classique -Le style Classique de case à cocher correspond à un système de case à cocher standard (*i.e.*, un rectangle avec un titre descriptif) : +Le style Classique du bouton case à cocher correspond à un système de case à cocher standard (*i.e.*, un rectangle avec un titre descriptif) : ![](assets/en/FormObjects/checkbox_regular.png) #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"regular", - "text": "Cancel", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - "dataSourceTypeHint":"boolean" - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"regular", + "text": "Cancel", + "action": "Cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + "dataSourceTypeHint":"boolean" + } +``` + + ### A plat -Le style A plat a un design minimaliste. Le graphisme du style A plat est particulièrement utile pour les formulaires à imprimer. +Le style plat du bouton case à cocher a un design minimaliste. Le graphisme du style A plat est particulièrement utile pour les formulaires à imprimer. ![](assets/en/FormObjects/checkbox_flat.png) #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"flat", - "text": "Cancel", - "action": "cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"flat", + "text": "Cancel", + "action": "cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Bouton barre outils -Le style du bouton Barre outils est initialement destiné à être intégré dans une barre d'outils. +Le style de bouton Barre d'outils est principalement destiné à l'intégration dans une barre d'outils. -Le style Barre outils possède un fond transparent et un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). +Le style de bouton Barre d'outils a un arrière-plan transparent avec un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). -Example with states unchecked / checked / highlighted: +Exemples avec les états coché / non coché / surligné : ![](assets/en/FormObjects/checkbox_toolbar.png) + #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"toolbar", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"toolbar", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Bevel -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. +La case à cocher Bevel combine l'apparence du style de bouton [Classique](#regular) (c'est-à-dire un rectangle avec un libellé descriptif) et le comportement du style de bouton [Barre d'outils](#toolbar-button). -Le style Bevel possède un fond gris clair et un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). +Le style de bouton Bevel possède un fond gris clair et un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). -Example with states unchecked / checked / highlighted: +Exemples avec les états coché / non coché / surligné : ![](assets/en/FormObjects/checkbox_bevel.png) + #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"bevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"bevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Bevel arrondi -Le style de case à cocher Bevel arrondi est presque identique au style [Bevel](#bevel), à l'exception des coins du bouton qui peuvent, selon le système d'exploitation, être arrondis. Comme pour le style Bevel, le style Bevel arrondi combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +Le style de bouton de la case à cocher Bevel arrondi est presque identique au style de bouton [Bevel](#bevel), à l'exception des coins du bouton qui peuvent, selon le système d'exploitation, être arrondis. Comme pour le style de bouton Bevel, le style de bouton Bevel arrondi combine l'apparence du style de bouton [Classique](#regular) et le comportement du style de bouton [Barre outils](#toolbar-button). -Le style Bevel arrondi possède un fond gris clair et un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). +Le style de bouton Bevel arrondi possède un fond gris clair et un titre. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). Exemple sous macOS : -![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) + ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) + +> Sous Windows, le style de bouton Bevel arrondi est identique au style de bouton [Bevel](#bevel). -> Sous Windows, le style Bevel arrondi est identique au style [Bevel](#bevel). #### Exemple JSON : @@ -203,175 +217,202 @@ Exemple sous macOS : } ``` + + ### OS X Gradient -Le style de case à cocher OS X Gradient est presque identique au style [Bevel](#bevel), à l'exception de son apparence qui peut, en fonction du système d'exploitation, avoir deux tons. Comme pour le style Bevel, le style OS X Gradient combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +Le style du bouton OS X Gradient est presque identique au style du bouton [Bevel](#bevel). As with the Bevel button style, the OS X Gradient button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -The OS X Gradient style has a light gray background with a title and is displayed as a two-tone system button on macOS. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). +The OS X Gradient button style has a light gray background with a title and may be displayed as a two-tone system button on macOS. Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states). -![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + ![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + +> On Windows, this check box button style is identical to the [Bevel](#bevel) button style. -> Sous Windows, ce style est identique au style [Bevel](#bevel). #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"gradientBevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"gradientBevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + ### OS X Texture -Le style de case à cocher OS X Textured est presque identique au style [Bevel](#bevel), à l'exception de son apparence qui peut, en fonction du système d'exploitation, être différente. Comme pour le style Bevel, le style OS X Textured combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +The OS X Textured button style is similar to the [Bevel](#bevel) button style but with a smaller size (maximum size is the size of a standard macOS system button). As with the Bevel button style, the OS X Textured button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. + +By default, the OS X Textured button style appears as: -Par défaut, le style OS X Textured apparaît comme : + - *Sous Windows* - un bouton système standard avec un fond bleu clair et un libellé au centre. -- *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_osxtextured.png) -- *Sous macOS* - un bouton système standard affichant un changement de couleur du gris clair au gris foncé. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. - - ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) + - *macOS* - a standard system button. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. + + ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"texturedBevel", - "text": "Checkbox", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"texturedBevel", + "text": "Checkbox", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + ### Office XP -Le style de case à cocher Office XP combine l'apparence du style [Classique](#regular) et du style [Barre outils](#toolbar). +The Office XP button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -Les couleurs (surbrillance et arrière-plan) d'un bouton au style Office XP sont basées sur les couleurs du système. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : +The colors (highlight and background) of a check box with the Office XP button style are based on the system colors. The appearance of the check box can be different when the cursor hovers over it, depending on the OS: -- *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. Example with states unchecked / checked / highlighted: - - ![](assets/en/FormObjects/checkbox_officexp.png) + - *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. Exemples avec les états coché / non coché / surligné : -- *Sous macOS* - son arrière-plan est toujours affiché. Example with states unchecked / checked: - - ![](assets/en/FormObjects/checkbox_officexp_mac.png) + ![](assets/en/FormObjects/checkbox_officexp.png) + + - *Sous macOS* - son arrière-plan est toujours affiché. Exemples avec les états cochés / non cochés : + + ![](assets/en/FormObjects/checkbox_officexp_mac.png) #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"office", - "text": "Checkbox", - "action": "fontBold", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"office", + "text": "Checkbox", + "action": "fontBold", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Contracter/Déployer -Ce style de case à cocher peut être utilisé pour ajouter une icône standard contracter/déployer. Ces boutons sont utilisés nativement dans les listes hiérarchiques. +This check box button style can be used to add a standard collapse/expand icon. These icons are used natively in hierarchical lists. -- *Windows* - the button looks like a [+] or a [-] - - ![](assets/en/FormObjects/checkbox_collapse.png) + - *Windows* - the icon looks like a [+] or a [-] + + ![](assets/en/FormObjects/checkbox_collapse.png) + + - *Sous macOS* - il ressemble à un triangle pointant sur vers la droite ou vers le bas. + + ![](assets/en/FormObjects/checkbox_collapse_mac.png) -- *macOS* - it looks like a triangle pointing right or down. - - ![](assets/en/FormObjects/checkbox_collapse_mac.png) #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"disclosure", - "method": "m_collapse", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"disclosure", + "method": "m_collapse", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Bouton disclosure -Sous macOS et Windows, une case à cocher avec le style "Disclosure" apparaît comme un bouton disclosure standard, généralement utilisé pour afficher/masquer des informations supplémentaires. Lorsqu'il est utilisé comme bouton radio, le symbole du bouton pointe vers le bas avec la valeur 0 et vers le haut avec la valeur 1. +In macOS and Windows, a check box with the "Disclosure" button style appears as a standard disclosure button, usually used to show/hide additional information. Lorsqu'il est utilisé comme bouton radio, le symbole du bouton pointe vers le bas avec la valeur 0 et vers le haut avec la valeur 1. + + - *Sous Windows* -- *Sous Windows* - ![](assets/en/FormObjects/checkbox_disclosure.png) -- *macOS* - + - *macOS* + ![](assets/en/FormObjects/checkbox_disclosure_mac.png) + #### Exemple JSON : - "myCheckBox": { - "type": "checkbox", - "style":"roundedDisclosure", - "method": "m_disclose", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"roundedDisclosure", + "method": "m_disclose", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + ### Personnalisé -Le style de case à cocher personnalisé accepte une image d'arrière-plan personnalisée et permet de gérer des propriétés spécifiques: +The Custom button style accepts a personalized background picture and allows managing specific properties: -- [Background pathname](properties_TextAndPicture.md#backgroundPathname) -- [Icon Offset](properties_TextAndPicture.md#icon-offset) +- [Chemin d'accès arrière-plan](properties_TextAndPicture.md#backgroundPathname) +- [Décalage icône](properties_TextAndPicture.md#icon-offset) - [Marge horizontale](properties_TextAndPicture.md#horizontalMargin) and [Marge verticale](properties_TextAndPicture.md#verticalMargin) Il est généralement associé à une [image à 4 états](properties_TextAndPicture.md#number-of-states), qui peut être utilisée conjointement avec une image d'arrière-plan [à 4 états](properties_TextAndPicture.md#number-of-states). #### Exemple JSON : - "myCheckbox": { - "type": "checkbox", - "style":"custom", - "text": "OK", - "icon": "/RESOURCES/smiley.jpg", - "iconFrame": 4, - "customBackgroundPicture": "/RESOURCES/paper.jpg", - "iconOffset": 5, //décalage icône personnalisé au clic - "left": 60, - "top": 160, - "width": 100, - "height": 20, - "customBorderX": 20, - "customBorderY": 5 - } - +``` + "myCheckbox": { + "type": "checkbox", + "style":"custom", + "text": "OK", + "icon": "/RESOURCES/smiley.jpg", + "iconFrame": 4, + "customBackgroundPicture": "/RESOURCES/paper.jpg", + "iconOffset": 5, //décalage icône personnalisé au clic + "left": 60, + "top": 160, + "width": 100, + "height": 20, + "customBorderX": 20, + "customBorderY": 5 + } +``` + + + ## Propriétés prises en charge Toutes les cases à cocher partagent une même série de propriétés de base : -[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) - [Save value](properties_Object.md#save-value) - [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) + +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [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) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Save value](properties_Object.md#save-value) - [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) + Des propriétés spécifiques supplémentaires sont disponibles, en fonction du [style de bouton](#button-styles) : - [Chemin d'accès arrière-plan](properties_TextAndPicture.md#backgroundPathname) - [Marge horizontale](properties_TextAndPicture.md#horizontalMargin) - [Décalage icône](properties_TextAndPicture.md#icon-offset) - [Marge verticale](properties_TextAndPicture.md#verticalMargin) (Personnalisé) - [Trois états](properties_Display.md#three-states) (A plat, Classique) -- [Nombre d'états](properties_TextAndPicture.md#number-of-states) - [Chemin d'accès image](properties_TextAndPicture.md#picture-pathname) - [Position Titre/Image](properties_TextAndPicture.md#title-picture-position) (Bouton barre outils, Bevel, Bevel arrondi, OS X Gradient, OS X Textured, Office XP, Personnalisé) \ No newline at end of file +- [Nombre d'états](properties_TextAndPicture.md#number-of-states) - [Chemin d'accès image](properties_TextAndPicture.md#picture-pathname) - [Position Titre/Image](properties_TextAndPicture.md#title-picture-position) (Bouton barre outils, Bevel, Bevel arrondi, OS X Gradient, OS X Textured, Office XP, Personnalisé) diff --git a/website/translated_docs/fr/FormObjects/comboBox_overview.md b/website/translated_docs/fr/FormObjects/comboBox_overview.md index 0bba52351a8f74..5854b16987ed92 100644 --- a/website/translated_docs/fr/FormObjects/comboBox_overview.md +++ b/website/translated_docs/fr/FormObjects/comboBox_overview.md @@ -3,25 +3,56 @@ id: comboBoxOverview title: Combo Box --- -## Aperçu - Une combo box est semblable à une [liste déroulante](dropdownList_Overview.md#overview), hormis le fait que cet objet accepte la saisie de texte par l’utilisateur et qu'elle dispose d'options supplémentaires. ![](assets/en/FormObjects/combo_box.png) -Une combo box peut être initialisée de la même manière qu’une liste déroulante. Lorsque l’utilisateur saisit du texte dans la combo box, il est stocké dans l’élément 0 du tableau. En d’autres termes, vous devez considérer l’objet combo box comme une zone saisissable qui utilise un tableau ou une liste de choix en tant que liste de valeurs par défaut. +Fundamentally, you treat a combo box as an enterable area that uses its object, array or a choice list as the set of default values. -Utilisez l’événement formulaire `Sur données modifiées` pour gérer les valeurs saisies, comme pour toute zone de saisie. 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. +## Handling combo boxes -## Options des combo box +Use the [`On Data Change`](Events/onDataChange.md) event to manage entries into the enterable area, as you would for any input form object. -Les objets de type Combo box acceptent deux options relatives aux listes de choix qui peuvent leur être associées : +You initialize a combo box in exactly the same way as a [drop-down list](dropdownList_Overview.md#overview): using an object, an array, or a choice list. -- [Insertion automatique](properties_DataSource.md#automatic-insertion) : entraînera l’ajout automatique d'une valeur dans la liste stockée en mémoire lorsque l’utilisateur saisit une valeur leur non présente dans la liste de choix associée à la combo box. -- [Exclusion ](properties_RangeOfValues.md#excluded-list) (liste de valeurs exclues) : permet d'établir une liste dont les valeurs ne peuvent pas être saisies dans la combo box. If an excluded value is entered, it is not accepted and an error message is displayed. +### Using an object -> La possibilité d’associer [une liste de valeurs obligatoires](properties_RangeOfValues.md#required-list) n’est pas disponible pour les combo box. Dans le cadre d’une interface, si l’objet doit proposer une liste finie de valeurs obligatoires, il est nécessaire d’utiliser un objet de type [Liste déroulante](dropdownList_Overview.md#overview). +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a combo box. The object must contain the following properties: -## Propriétés prises en charge +| Propriété | Type | Description | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Collection | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:

      • strings
      • numbers
      • dates
      • times
      • If empty or not defined, the combo box is empty | +| `currentValue` | same as Collection | Text entered by the user | + +If the object contains other properties, they are ignored. + +When the user enters text into the combo box, the `currentValue` property of the object gets the entered text. + +### Utiliser un tableau + +Please refer to **Using an array** in the [drop-down list page](dropdownList_Overview.md#using-an-array) for information about how to initialize the array. + +When the user enters text into the combo box, the 0th element of the array gets the entered text. + +### Utiliser une énumération + +If you want to use a combo box to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the form object's data source. Cette possibilité facilite la gestion des champs/variables énuméré(e) s. +> Si vous utilisez une énumération hiérarchique, seul le premier niveau sera affiché et sélectionnable. -[Format alpha](properties_Display.md#alpha-format) - [Gras](properties_Text.md#bold) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Style de bouton](properties_TextAndPicture.md#button-style) - [Enumération](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Format date](properties_Display.md#date-format) - [Focusable](properties_Entry.md#focusable) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Non représenté](properties_Display.md#not-rendered) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Action standard ](properties_Action.md#standard-action) - [Format heure](properties_Display.md#time-format) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +To associate 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 form object in the Property List. + +When the form is executed, 4D automatically manages the 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 combo box when the form is displayed: + +Please refer to **Using a choice** in the [drop-down list page](dropdownList_Overview.md#using-a-choice-list) for more information. + + +## Options + +Combo box type objects accept two specific options: + +- [Automatic insertion](properties_DataSource.md#automatic-insertion): enables automatically adding a value to the data source when a user enters a value that is not found in the list associated with the combo box. +- [Exclusion ](properties_RangeOfValues.md#excluded-list) (liste de valeurs exclues) : permet d'établir une liste dont les valeurs ne peuvent pas être saisies dans la combo box. Si une valeur exclue est saisie, elle n'est pas acceptée et un message d'erreur s'affiche. +> La possibilité d’associer [une liste de valeurs obligatoires](properties_RangeOfValues.md#required-list) n’est pas disponible pour les combo box. In an interface, if an object must propose a finite list of required values, then you must use a [drop-down list](dropdownList_Overview.md#overview) object. + +## Propriétés prises en charge +[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [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) - [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) - [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 diff --git a/website/translated_docs/fr/FormObjects/dropdownList_Overview.md b/website/translated_docs/fr/FormObjects/dropdownList_Overview.md index a31a994cac8f90..3c1d3f06bd1287 100644 --- a/website/translated_docs/fr/FormObjects/dropdownList_Overview.md +++ b/website/translated_docs/fr/FormObjects/dropdownList_Overview.md @@ -3,43 +3,102 @@ id: dropdownListOverview title: Liste déroulante --- -## Aperçu - -Les pop-up/listes déroulantes sont des objets qui permettent à l’utilisateur de sélectionner un élément dans une liste. Vous gérez les éléments qui apparaissent dans les listes déroulantes à l’aide de tableaux, d’énumérations ou d'actions standard. +Drop-down lists are form objects that allow the user to select from a list. You manage the items displayed in the drop-down list using an object, an array, a choice list, or a standard action. Sous macOS, les listes déroulantes sont aussi parfois appelées "pop-up menu". Les deux noms font référence aux mêmes objets. Comme le montre l'exemple suivant, l'apparence de ces objets peut différer légèrement selon la plateforme : ![](assets/en/FormObjects/popupDropdown_appearance.png) -## Utiliser un tableau -Un [tableau](Concepts/arrays.md) est une liste de valeurs gardées en mémoire qui sont référencées par le nom du tableau. Un pop-up/liste déroulante affiche le tableau sous la forme d’une liste de valeurs qui apparaît lorsqu’on clique dessus. +## Drop-down list types + +You can create different types of drop-down lists with different features. To define a type, select the appropriate **Expression Type** and **Data Type** values in the Property list, or use their JSON equivalent. + +| Type | Features | Expression Type | Type de données | JSON definition | +| ------------------------------ | ------------------------------------------------ | --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Objet | Built upon a collection | Objet | Numeric, Text, Date, or Time | `dataSourceTypeHint: object` + `numberFormat: ` or `textFormat: ` or `dateFormat: ` or `timeFormat: ` | +| Tableau | Built upon an array | Tableau | Numeric, Text, Date, or Time | `dataSourceTypeHint: arrayNumber` or `arrayText` or `arrayDate` or `arrayTime` | +| Choice list saved as value | Built upon a choice list (standard) | List | Selected item value | `dataSourceTypeHint: text` + `saveAs: value` | +| Choice list saved as reference | Built upon a choice list. Item position is saved | List | Selected item reference | `dataSourceTypeHint: integer` + `saveAs: reference` | +| Hierarchical choice list | Can display hierarchical contents | List | List reference | `dataSourceTypeHint: integer` | +| Action standard | Automatically built by the action | *any* | *any except List reference* | any definition + `action: ` (+ `focusable: false` for actions applying to other areas) | + + + +## Handling drop-down lists + +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a drop-down list. The object must contain the following properties: + +| Propriété | Type | Description | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `values` | Collection | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:
      • strings
      • numbers
      • dates
      • times
      • If empty or not defined, the drop-down list is empty | +| `index` | number | Index of the currently selected item (value between 0 and `collection.length-1`). If you set -1, `currentValue` is displayed as a placeholder string | +| `currentValue` | same as Collection | Currently selected item (used as placeholder value if set by code) | + +If the object contains other properties, they are ignored. + +To initialize the object associated to the drop-down list, you can: + +* Saisir une liste de valeurs par défaut dans les propriétés de l’objetPour cela, dans le thème [Sources de données](properties_DataSource.md) de la Liste des propriétés, sélectionnez "\". The default values are loaded into an object automatically. + +* Execute code that creates the object and its properties. For example, if "myList" is the [variable](properties_Object.md#variable-or-expression) associated to the drop-down list, you can write in the [On Load](Events/onLoad.md) form event: + +```4d +// Form.myDrop is the datasource of the form object + +Form.myDrop:=New object +Form.myDrop.values:=New collection("apples"; "nuts"; "pears"; "oranges"; "carrots") +Form.myDrop.index:=-1 //currentValue is a placeholder +Form.myDrop.currentValue:="Select a fruit" +``` + +The drop-down list is displayed with the placeholder string: + +![](assets/en/FormObjects/fruits2.png) -Les objets pop-up/listes déroulantes peuvent être initialisés par le chargement d’une liste de valeurs dans un tableau. Vous pouvez réaliser cette opération de plusieurs manières : +After the user selects a value: + +![](assets/en/FormObjects/fruits3.png) + +```4d +Form.myDrop.values // ["apples","nuts","pears","oranges","carrots"] +Form.myDrop.currentValue //"oranges" +Form.myDrop.index //3 +``` + + + +### Utiliser un tableau + +Un [tableau](Concepts/arrays.md) est une liste de valeurs gardées en mémoire qui sont référencées par le nom du tableau. A drop-down list can display an array as a list of values when you click on it. + +To initialize the array associated to the drop-down list, you can: * Saisir une liste de valeurs par défaut dans les propriétés de l’objetPour cela, dans le thème [Sources de données](properties_DataSource.md) de la Liste des propriétés, sélectionnez "\". Les valeurs par défaut sont automatiquement chargées dans un tableau. Vous pouvez faire référence à ce tableau par l’intermédiaire du nom de la variable associée à l’objet. -* Avant que l’objet ne soit affiché, exécutez une méthode qui affecte des valeurs au tableau. Par exemple: +* Avant que l’objet ne soit affiché, exécutez une méthode qui affecte des valeurs au tableau. Par exemple : ```4d - ARRAY TEXT($aCities;6) - $aCities{1}:="Philadelphie" - $aCities{2}:="Pittsburg" - $aCities{3}:="Grand Blanc" - $aCities{4}:="Bad Axe" - $aCities{5}:="Frostbite Falls" - $aCities{6}:="Green Bay" + ARRAY TEXT(aCities;6) + aCities{1}:="Philadelphia" + aCities{2}:="Pittsburg" + aCities{3}:="Grand Blanc" + aCities{4}:="Bad Axe" + aCities{5}:="Frostbite Falls" + aCities{6}:="Green Bay" ``` -In this case, the name of the variable associated with the object in the form must be *$aCities*. Ce code peut être placé dans la méthode formulaire et être exécuté lorsque l’événement formulaire `Sur chargement` se produit. +In this case, the name of the [variable](properties_Object.md#variable-or-expression) associated with the object in the form must be `aCities`. Ce code peut être placé dans la méthode formulaire et être exécuté lorsque l’événement formulaire `Sur chargement` se produit. -* Avant que l’objet ne soit affiché, chargez les valeurs d’une énumération dans le tableau à l’aide de la commande [LIST TO ARRAY](https://doc.4d.com/4Dv17R5/4D/17-R5/LIST-TO-ARRAY.301-4127385.en.html). Par exemple: +* Before the object is displayed, load the values of a list into the array using the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command. Par exemple : ```4d - LIST TO ARRAY("Cities";$aCities) + LIST TO ARRAY("Cities";aCities) ``` -In this case also, the name of the variable associated with the object in the form must be *$aCities*. Ce code peut être exécuté à la place de celui proposé plus haut. +In this case also, the name of the [variable](properties_Object.md#variable-or-expression) associated with the object in the form must be `aCities`. Ce code peut être exécuté à la place de celui proposé plus haut. Si vous voulez stocker dans un champ le choix de l’utilisateur, il est nécessaire d’écrire du code pour affecter les valeurs et de l’exécuter après la validation de l’enregistrement. Ce code pourrait être le suivant : @@ -61,34 +120,53 @@ Si vous voulez stocker dans un champ le choix de l’utilisateur, il est nécess End case ``` -Vous devez cocher chaque [événement] pris en compte dans les structures "For" de votre code. Les tableaux contiennent toujours un nombre fini d’éléments. La liste des éléments est dynamique et peut être modifiée par programmation. Les éléments d’un tableau peuvent être modifiés et triés. +You must select each event that you test for in your Case statement. Les tableaux contiennent toujours un nombre fini d’éléments. La liste des éléments est dynamique et peut être modifiée par programmation. Les éléments d’un tableau peuvent être modifiés et triés. -## Utiliser une énumération -Si vous souhaitez utiliser un pop-up/liste déroulante pour gérer les valeurs d'un champ ou d'une variable énuméré(e), 4D vous permet de référencer directement le champ ou la variable comme source de données de l'objet. Cette possibilité facilite la gestion des champs/variables énuméré(e) s. +### Utiliser une énumération -> Si vous utilisez une énumération hiérarchique, seul le premier niveau sera affiché et sélectionnable. +If you want to use a drop-down list to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the drop-down list's [data source](properties_Object.md#variable-or-expression). Cette possibilité facilite la gestion des champs/variables énuméré(e) s. -Par exemple, dans le cas d’un champ "Couleur" pouvant contenir uniquement les valeurs "White", "Blue", "Green" or "Red", vous pouvez créer une liste contenant ces valeurs et l’associer à un objet pop up menu qui référence le champ "Couleur". 4D se charge alors de gérer automatiquement la saisie et l’affichage de la valeur courante dans le formulaire. +For example, in the case of a "Color" field that can only contain the values "White", "Blue", "Green" or "Red", it is possible to create a list containing these values and associate it with a drop-down list that references the 4D "Color" field. 4D se charge alors de gérer automatiquement la saisie et l’affichage de la valeur courante dans le formulaire. +> Si vous utilisez une énumération hiérarchique, seul le premier niveau sera affiché et sélectionnable. Si vous utilisez une énumération hiérarchique, seul le premier niveau sera affiché et sélectionnable. -Pour associer un popup/liste déroulante à un champ ou une variable énuméré(e), il suffit de saisir directement le nom du champ ou de la variable dans la zone [Variable ou expression](properties_Object.md#variable-or-expression) de l’objet dans la liste de propriétés . +To associate a drop-down list with a field or variable, enter the name of the field or variable directly as the [Variable or Expression](properties_Object.md#variable-or-expression) field of the drop-down list in the Property List. +> It is not possible to use this feature with an object or an array drop-down list. If you enter a field name in the "Variable or Expression" area, then you must use a choice list. -A l’exécution du formulaire, 4D gère automatiquement le pop up menu ou la combo box en saisie ou à l’affichage : lorsque l’utilisateur choisit une valeur, elle est stockée dans le champ ; à l’affichage, la valeur du champ est affichée dans le pop up menu : +When the form is executed, 4D automatically manages the drop-down list during input or display: when a user chooses a value, it is saved in the field; this field value is shown in the drop-down list when the form is displayed: ![](assets/en/FormObjects/popupDropdown_choiceList.png) -> Il n'est pas possible de mixer ce principe avec l'initialisation de l'objet à l'aide d'un tableau. Si vous saisissez un nom de champ dans la zone Nom de la variable, il est nécessaire d'utiliser une énumération. -### Save as +#### Selected item value or Selected item reference + +When you have associated a drop-down list with a choice list and with a field or a variable, you can set the [**Data Type**](properties_DataSource.md#data-type) property to **Selected item value** or **Selected item reference**. Cette option permet d'optimiser la taille des données stockées. + +### Using a hierarchical choice list + +A hierarchical drop-down list has a sublist associated with each item in the list. Here is an example of a hierarchical drop-down list: + +![](assets/en/FormObjects/popupDropdown_hierar.png) + +> In forms, hierarchical drop-down lists are limited to two levels. + +You can assign the hierarchical choice list to the drop-down list object using the [Choice List](properties_DataSource.md#choice-list) field of the Property List. + +You manage hierarchical drop-down lists using the **Hierarchical Lists** commands of the 4D Language. All commands that support the `(*; "name")` syntax can be used with hierarchical drop-down lists, e.g. [`List item parent`](https://doc.4d.com/4dv19/help/command/en/page633.html). + + +### Utiliser une action standard -Lorsque vous avez associé un objet pop-up/liste déroulante à une liste de choix (énumération) et à un champ, vous pouvez utiliser l'option [Enregistrer comme Valeur/Référence](properties_DataSource.md#save-as) dans le thème "Sources de données" de la Liste des propriétés. Cette option permet d'optimiser la taille des données stockées. +You can build automatically a drop-down list using a [standard action](properties_Action.md#standard-action). This feature is supported in the following contexts: -## Utiliser une action standard +- Use of the `gotoPage` standard action. In this case, 4D will automatically display the [page of the form](FormEditor/forms.md#form-pages) that corresponds to the number of the item that is selected. For example, if the user selects the 3rd item, 4D will display the third page of the current form (if it exists). At runtime, by default the drop-down list displays the page numbers (1, 2...). -Vous pouvez assigner une action standard à un objet pop up menu/liste déroulante (thème [Action](properties_Action.md#standard-action) de la Liste des propriétés). Seules les actions qui affichent une sous-liste d'éléments (à l'exception de l'action Aller à page) sont prises en charge par ce type d'objet. Par exemple, si vous sélectionnez l'action standard `backgroundColor`, à l'exécution l'objet affichera une liste automatique de couleurs de fond. Vous pouvez remplacer cette liste automatique par une liste personnalisée en associant à l'objet une énumération dans laquelle chaque élément a lui-même été assigné à une action standard. +- Use of a standard action that displays a sublist of items, for example `backgroundColor`. This feature requires that: + - a styled text area ([4D Write Pro area](writeProArea_overview.md) or [input](input_overview.md) with [multistyle](properties_Text.md#multi-style) property) is present in the form as the standard action target. + - the [focusable](properties_Entry.md#focusable) property is not set to the drop-down list. At runtime the drop-down list will display an automatic list of values, e.g. background colors. You can override this automatic list by assigning in addition a choice list in which each item has been assigned a custom standard action. -Pour plus d'informations, reportez-vous à la section [Actions standard](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). +> This feature cannot be used with a hierarchical drop-down list. ## Propriétés prises en charge -[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) - [Save value](properties_Object.md#save-value) - [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 +[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) - [Data Type (expression type)](properties_DataSource.md#data-type-expression-type) - [Data Type (list)](properties_DataSource.md#data-type-list) - [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 value](properties_Object.md#save-value) - [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 diff --git a/website/translated_docs/fr/FormObjects/formObjects_overview.md b/website/translated_docs/fr/FormObjects/formObjects_overview.md index 84d2aeac242bef..7a6d62850a6e07 100644 --- a/website/translated_docs/fr/FormObjects/formObjects_overview.md +++ b/website/translated_docs/fr/FormObjects/formObjects_overview.md @@ -9,18 +9,19 @@ Vous créez et personnalisez les formulaires de votre application en manipulant Les formulaires 4D prennent en charge un grand nombre d'objets **actifs** et **statiques** intégrés : -- **Les objets actifs** réalisent une tâche ou une fonction de l’interface. Les champs sont des objets actifs. Les autres objets actifs — objets saisissables (variables), combo box, listes déroulantes, boutons image, etc. — stockent des données temporairement en mémoire ou effectuent une tâche telle que l'ouverture d'une boite de dialogue, l'impression d'un état ou le lancement d'un processus d'arrière-plan. +- **Les objets actifs** réalisent une tâche ou une fonction de l’interface. Les champs sont des objets actifs. Les autres objets actifs — objets saisissables (variables), combo box, listes déroulantes, boutons image, etc. — stockent des données temporairement en mémoire ou effectuent une tâche telle que l'ouverture d'une boite de dialogue, l'impression d'un état ou le lancement d'un processus d'arrière-plan. - **Les objets statiques** sont généralement utilisés pour le décor, les libellés ou encore l'interface graphique du formulaire. A la différence des objets actifs, les objets statiques ne sont pas associés à des variables. A noter qu'il est possible d'insérer des éléments dynamiques dans les objets statiques. + ## Gérer les objets de formulaire Vous pouvez ajouter des objets dans un formulaire de nombreuses manières : -* **[Form Editor](FormEditor/formEditor.md):** Drag an object from the Form Editor toolbar onto the form. Utilisez ensuite la liste des propriétés pour indiquer les propriétés de l'objet. - Pour plus d'informations, reportez-vous au chapitre [Construction de formulaires](https://doc.4d.com/4Dv17/4D/17.3/Construction-des-formulaires.200-4639689.fr.html). +* **[Form Editor](FormEditor/formEditor.md):** Drag an object from the Form Editor toolbar onto the form. Utilisez ensuite la liste des propriétés pour indiquer les propriétés de l'objet. + Pour plus d'informations, reportez-vous au chapitre [Construction de formulaires](https://doc.4d.com/4Dv17/4D/17.3/Construction-des-formulaires.200-4639689.fr.html). * **Langage 4D** : Commandes du thème [Objets (Formulaires)](https://doc.4d.com/4Dv17/4D/17.3/Objets-Formulaires.201-4620222.fr.html) telles que `OBJECT DUPLICATE` ou `OBJECT SET FONT STYLE` permettent de créer et de définir des objets de formulaire. -* **Code JSON dans les formulaires dynamiques :** Définissez les propriétés à l'aide du 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 +* **Code JSON dans les formulaires dynamiques :** Définissez les propriétés à l'aide du JSON. Utilisez la propriété [type](properties_Object.md#type) pour définir le type d'objet puis indiquez ses propriétés. 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: + ``` diff --git a/website/translated_docs/fr/FormObjects/groupBox.md b/website/translated_docs/fr/FormObjects/groupBox.md index dbffd12e8f4127..f0c68fb9a31eef 100644 --- a/website/translated_docs/fr/FormObjects/groupBox.md +++ b/website/translated_docs/fr/FormObjects/groupBox.md @@ -6,21 +6,22 @@ title: Zone de groupe Une zone de groupe est un objet statique qui vous permet de rassembler visuellement plusieurs objets de formulaire : ![](assets/en/FormObjects/groupBox.png) +> Le nom d'une zone de groupe est un texte statique ; vous pouvez utiliser une référence "localisable", comme pour toute étiquette 4D (voir [Utiliser des références dans les textes statiques](https://doc. 4d. com/4Dv17/4D/17.3/Utiliser-des-references-dans-les-textes-statiques. 300-4639972. fr. html) et la section *Architecture XLIFF* dans le manuel Développement de 4D. + -> Le nom d'une zone de groupe est un texte statique ; vous pouvez utiliser une référence "localisable", comme pour toute étiquette 4D (voir [Utiliser des references dans les textes statiques](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html) et la section *Architecture XLIFF* dans le manuel Développement de 4D. #### Exemple JSON : - "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 + } +``` #### Propriétés prises en charge - -[Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Alignement horizontal](properties_Text.md#horizontal-alignment) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Titre](properties_Object.md#title) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Alignement horizontal](properties_Text.md#horizontal-alignment) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Titre](properties_Object.md#title) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/input_overview.md b/website/translated_docs/fr/FormObjects/input_overview.md index f55e45f32582c9..403038d6404c84 100644 --- a/website/translated_docs/fr/FormObjects/input_overview.md +++ b/website/translated_docs/fr/FormObjects/input_overview.md @@ -3,7 +3,6 @@ id: inputOverview title: Input --- -## Aperçu Les zones de saisie vous permettent d'ajouter des expressions saisissables ou non saisissables telles que des [champs](Concepts/identifiers.md#fields) et des [variables](Concepts/variables.md) de base de données à vos formulaires. Les zone de saisie peuvent gérer des données basées sur des caractères (texte, dates, numériques, etc.) ou des images : @@ -15,6 +14,7 @@ De plus, les zones de saisie peuvent être [saisissables ou non saisissables](pr Vous pouvez gérer les données avec des [méthodes](Concepts/methods.md) objet ou formulaire. + ### Exemple JSON : ```4d @@ -28,16 +28,17 @@ Vous pouvez gérer les données avec des [méthodes](Concepts/methods.md) objet } ``` + ## Propriétés prises en charge -[Format alpha ](properties_Display.md#alpha-format) - [Correction automatique](properties_Entry.md#auto-spellcheck) - [Gras](properties_Text.md#bold) - [Format booléen](properties_Display.md#boolean-format) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Enumération](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Menu contextuel](properties_Entry.md#context-menu) - [Format date](properties_Display.md#date-format) - [Valeur par défaut](properties_RangeOfValues.md#default-value) - [Glissable](properties_Action.md#draggable) - [Déposable](properties_Action.md#droppable) - [Saisissable](properties_Entry.md#enterable) - [Filtre de saisie](properties_Entry.md#entry-filter) - [Exclusion](properties_RangeOfValues.md#excluded-list) - [Type d'expression](properties_Object.md#expression-type) - [Couleur de remplissage](properties_BackgroundAndBorder.md#fill-color) - [Police](properties_Text.md#font) - [Couleur de police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Cacher rectangle de focus](properties_Appearance.md#hide-focus-rectangle) - [Alignement horizontal](properties_Text.md#horizontal-alignment) - [Barre de défilement horizontal ](properties_Appearance.md#horizontal-scroll-bar) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Largeur du trait](properties_BackgroundAndBorder.md#line-width) - [Multilignes](properties_Entry.md#multiline) - [Multistyle](properties_Text.md#multi-style) - [Format numérique](properties_Display.md#number-format) - [Nom](properties_Object.md#object-name) - [Orientation](properties_Text.md#orientation) - [Format image](properties_Display.md#picture-format) - [Texte exemple](properties_Entry.md#placeholder) - [Impression taille variable](properties_Print.md#print-frame) - [Obligation](properties_RangeOfValues.md#required-list) - [Droite](properties_CoordinatesAndSizing.md#right) - Enregistrer comme/39> - [Sélection toujours visible](properties_Entry.md#selection-always-visible) - [Stocker les balises par défaut](properties_Text.md#store-with-default-style-tags) - [Texte si Vrai/Texte si Faux](properties_Display.md#text-when-false-text-when-true) - [Format heure](properties_Display.md#time-format) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Barre de défilement vert.](properties_Appearance.md#vertical-scroll-bar) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) - [Retour à la ligne](properties_Display.md#wordwrap)

        +[Allow font/color picker](properties_Text.md#allow-font-color-picker) - [Alpha Format](properties_Display.md#alpha-format) - [Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Bold](properties_Text.md#bold) - [Test when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [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) - [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) - [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) -* * * +--- ## Alternatives Vous pouvez également représenter des expressions de champ et de variable dans vos formulaires à l'aide d'objets alternatifs, plus particulièrement : -* Vous pouvez afficher et saisir des données à partir des champs de la base de données directement dans des colonnes [de type List box](listbox_overview.md). -* Vous pouvez représenter un champ de liste ou une variable directement dans un formulaire à l'aide d'objets [Pop-up menus/Listes déroulantes](popupMenuDropdownList_overview) et [Combo box](comboBox_overview.md). -* Vous pouvez représenter une expression booléenne sous forme de [case à cocher](checkbox_overview.md) ou de [bouton radio](radio_overview.md). \ No newline at end of file +* Vous pouvez afficher et saisir des données à partir des champs de la base de données directement dans des colonnes [de type List box](listbox_overview.md). +* Vous pouvez représenter un champ de liste ou une variable directement dans un formulaire à l'aide d'objets [Pop-up menus/Listes déroulantes](popupMenuDropdownList_overview) et [Combo box](comboBox_overview.md). +* Vous pouvez représenter une expression booléenne sous forme de [case à cocher](checkbox_overview.md) ou de [bouton radio](radio_overview.md). \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/list_overview.md b/website/translated_docs/fr/FormObjects/list_overview.md index 3a99ee907c678a..c0e2ac898ca53c 100644 --- a/website/translated_docs/fr/FormObjects/list_overview.md +++ b/website/translated_docs/fr/FormObjects/list_overview.md @@ -1,9 +1,8 @@ --- id: listOverview -title: Hierarchical List +title: Liste hiérarchique --- -## Aperçu Les listes hiérarchiques sont des objets de formulaire permettant d'afficher des données sous forme de listes comportant un ou plusieurs niveaux qu'il est possible de déployer ou de contracter. @@ -11,27 +10,29 @@ Les listes hiérarchiques sont des objets de formulaire permettant d'afficher de Le cas échéant, l'icône déployer/contractée est automatiquement affichée à gauche de l'élément. Les listes hiérarchiques prennent en charge un nombre illimité de sous-niveaux. + ## Sources de données de liste hiérarchique Le contenu d'un objet formulaire liste hiérarchique peut être initialisé de l'une des manières suivantes : -- Associer une [énumération](properties_DataSource.md#choice-list) à l'objet. L'énumération doit avoir été définie dans l'éditeur de listes en mode Développement. -- Assignez directement une référence de liste hiérarchique à la [variable ou à l'expression](properties_Object.md#variable-or-expression) associée à l'objet formulaire. +- Associer une [énumération](properties_DataSource.md#choice-list) à l'objet. L'énumération doit avoir été définie dans l'éditeur de listes en mode Développement. +- Assignez directement une référence de liste hiérarchique à la [variable ou à l'expression](properties_Object.md#variable-or-expression) associée à l'objet formulaire. + +Dans les deux cas, vous gérez une liste hiérarchique lors de l'exécution via sa référence *ListRef*, à l'aide des commandes de [liste hiérarchique](https://doc.4d.com/4Dv17R6/4D/17-R6/Hierarchical-Lists.201-4310291.en.html) du langage 4D. -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. ## RefListe et nom d'objet -A hierarchical list is both a **language object** existing in memory and a **form object**. +Une liste hiérarchique est à la fois un **objet de langage** existant en mémoire et un **objet de formulaire**. -The **language object** is referenced by an unique internal ID of the Longint type, designated by *ListRef* in the 4D Language Reference. Cet identifiant est retourné par les commandes permettant de créer des listes `New list`, `Copy list`, `Load list`, `BLOB to list`. Il n’existe qu’une seule instance en mémoire de l’objet de langage et toute modification effectuée sur cet objet est immédiatement répercutée dans tous les endroits où il est utilisé. +L'**objet de langage** est référencé de manière unique par un identifiant interne, de type Entier long, désigné par *RefListe* dans ce manuel. Cet identifiant est retourné par les commandes permettant de créer des listes `New list`, `Copy list`, `Load list`, `BLOB to list`. Il n’existe qu’une seule instance en mémoire de l’objet de langage et toute modification effectuée sur cet objet est immédiatement répercutée dans tous les endroits où il est utilisé. -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. Comme pour les autres objets de formulaire, vous désignez l'objet dans le langage via la syntaxe (*;"NomListe", etc.). +L'**objet de formulaire** n'est pas nécessairement unique : il peut exister plusieurs représentations d’une même liste hiérarchique dans un même formulaire ou dans des formulaires différents. Comme pour les autres objets de formulaire, vous désignez l'objet dans le langage via la syntaxe (*;"NomListe", etc.). -Vous connectez l'"objet de langage" liste hiérarchique avec l'"objet de formulaire" liste hiérarchique par l'intermédiaire de la variable contenant la valeur de l'identifiant unique RefListe. Par exemple, si vous avez associé la [variable](properties_Object.md#variable-or-expression) $mylist à l'objet de formulaire, vous écrivez : +Vous connectez l'"objet de langage" liste hiérarchique avec l'"objet de formulaire" liste hiérarchique par l'intermédiaire de la variable contenant la valeur de l'identifiant unique RefListe. Par exemple, si vous avez associé la [variable](properties_Object.md#variable-or-expression) mylist à l'objet de formulaire, vous écrivez : ```4d -$mylist:=New list +mylist:=New list ``` Chaque représentation de liste dispose de caractéristiques propres et partage des caractéristiques communes avec l’ensemble des représentations. Les caractéristiques propres à chaque représentation de liste sont les suivantes : @@ -49,15 +50,13 @@ Vous devez utiliser l'identifiant de type `RefListe` avec les commandes du langa ```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. +> ... vous indiquez que vous souhaitez modifier la police d’un élément de la liste hiérarchique associée à l’objet de formulaire *mylist1*. La commande tiendra compte de l’élément courant de l’objet *mylist1* pour définir l’élément à modifier, mais cette modification sera reportée dans toutes les représentations de la liste dans tous les process. ### Prise en compte du @ Comme pour les autres commandes de gestion des propriété d’objets, il est possible d’utiliser le caractère “@†dans le paramètre `NomListe`. En principe, cette syntaxe permet de désigner un ensemble d’objets dans le formulaire. Toutefois, dans le contexte des commandes de liste hiérarchique, ce principe n’est pas applicable dans tous les cas. Cette syntaxe aura deux effets différents en fonction du type de commande : - Pour les commandes fixant des propriétés, cette syntaxe désigne tous les objets dont le nom correspond (fonctionnement standard). Par exemple, le paramètre "LH@" désigne tous les objets de type liste hiérarchique dont le nom débute par “LH†- - `DELETE FROM LIST` - `INSERT IN LIST` - `SELECT LIST ITEMS BY POSITION` @@ -66,19 +65,20 @@ Comme pour les autres commandes de gestion des propriété d’objets, il est po - `SET LIST ITEM ICON` - `SET LIST ITEM PARAMETER` - `SET LIST ITEM PROPERTIES` + - Pour les commandes récupérant des propriétés, cette syntaxe désigne le premier objet dont le nom correspond. Ces commandes sont : - - `Count list items` - `Find in list` - `GET LIST ITEM` - - `Get list item font` - - `GET LIST ITEM ICON` - - `GET LIST ITEM PARAMETER` - - `GET LIST ITEM PROPERTIES` + - `Get list item font` + - `GET LIST ITEM ICON` + - `GET LIST ITEM PARAMETER` + - `GET LIST ITEM PROPERTIES` - `List item parent` - `List item position` - `Selected list items` + ## Commandes génériques utilisables avec les listes hiérarchiques Il est possible de modifier l’apparence d’une liste hiérarchique dans un formulaire à l’aide de plusieurs commandes 4D génériques. Vous devez passer à ces commandes soit le nom d’objet de la liste hiérarchique (en utilisant le paramètre *), soit son nom de variable (contenant la valeur RefListe) : @@ -97,7 +97,7 @@ Il est possible de modifier l’apparence d’une liste hiérarchique dans un fo ## Priorité des commandes de propriété -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. Lorsque ces trois moyens sont utilisés pour définir les propriétés d’une liste, l’ordre de priorité suivant est appliqué : +Certaines propriétés d’une liste hiérarchique (par exemple l’attribut **saisissable** ou la couleur) peuvent être définies de trois manières : via la Liste des propriétés en mode Développement, via une commande du thème “Propriétés des objets†ou via une commande du thème “Liste hiérarchiqueâ€. Lorsque ces trois moyens sont utilisés pour définir les propriétés d’une liste, l’ordre de priorité suivant est appliqué : 1. Commandes du thème “Liste hiérarchique†2. Commandes générique de propriété d'objet @@ -105,16 +105,18 @@ Certain properties of hierarchical lists (for example, the **Enterable** attribu Ce principe est appliqué quel que soit l’ordre d’appel des commandes. Si une propriété d’élément est modifiée individuellement via une commande de liste hiérarchique, la commande de propriété d’objet équivalente sera sans effet sur cet élément même si elle est appelée ultérieurement. Par exemple, si vous modifiez la couleur d’un élément via la commande `SET LIST ITEM PROPERTIES`, la commande `OBJECT SET COLOR` n’aura aucun effet sur cet élément. + ## Gestion des éléments par position ou par référence Vous pouvez généralement travailler de deux manières avec le contenu des listes hiérarchiques : par position ou par référence. - Lorsque vous travaillez par position, 4D se base sur la position relative des éléments dans la liste affichée à l'écran pour les identifier. Le résultat sera différent selon que certains éléments hiérarchiques sont déployés ou non. A noter qu'en cas de multi-représentation, chaque objet de formulaire comporte sa propre configuration d'éléments contractés/déployés. -- When you work by reference, 4D bases itself on the *itemRef* ID number of the list items. Chaque élément peut être ainsi désigné, quelle que soit sa position ou son affichage dans la liste hiérarchique. +- Lorsque vous travaillez par référence, 4D se base sur le numéro unique *réfElément* des éléments de la liste. Chaque élément peut être ainsi désigné, quelle que soit sa position ou son affichage dans la liste hiérarchique. + ### Exploiter les numéros de référence des éléments (réfElément) -Each item of a hierarchical list has a reference number (*itemRef*) of the Longint type. Cette valeur est destinée uniquement à votre propre usage : 4D ne fait que la maintenir. +Chaque élément d'une liste hiérarchique dispose d'un numéro de référence (*réfElément*) de type Entier long. Cette valeur est destinée uniquement à votre propre usage : 4D ne fait que la maintenir. > Attention : Vous pouvez utiliser comme numéro de référence toute valeur de type entier long, sauf la valeur 0. En effet, pour la plupart des commandes de ce thème, la valeur 0 permet de désigner le dernier élément ajouté à la liste. @@ -122,14 +124,14 @@ Voici quelques astuces quant à l'utilisation du numéro de référence unique : 1. Vous n'avez pas besoin d'identifier chaque élément de façon unique (niveau débutant). -- Premier exemple : vous construisez par programmation un système d'onglets, par exemple, un carnet d'adresses. Comme le système vous retournera le numéro de l'onglet sélectionné, vous n'aurez probablement pas besoin de davantage d'informations. In this case, do not worry about item reference numbers: pass any value (except 0) in the *itemRef* parameter. Notez que pour un système de carnet d'adresses, vous pouvez prédéfinir une liste A, B,..., Z en mode Développement. Vous pouvez également la créer par programmation afin d'éliminer les lettres pour lesquelles il n'y a pas d'enregistrement. -- Deuxième exemple : en travaillant avec une base, vous construisez progressivement une liste de mots-clés. Vous pouvez sauvegarder la liste à la fin de chaque session, en utilisant les commandes `SAVE LIST` ou `LIST TO BLOB`, et la recharger au début de chaque session, à l'aide des commandes `Load list` ou `BLOB to list`. Vous pouvez afficher cette liste dans une palette flottante ; lorsque l'utilisateur clique sur un mot-clé de la liste, l'élément choisi est inséré dans la zone saisissable sélectionnée du process de premier plan. En tout état de cause, l'important est que vous ne traitez que l'élément sélectionné (par clic ou glisser-déposer), car la commande `Selected list items`vous retourne la position de l'élément que vous devez traiter. En utilisant cette valeur de position, vous obtenez le libellé de l'élément grâce à la commande `GET LIST ITEM`. Here again, you do not need to identify each item individually; you can pass any value (except 0) in the *itemRef* parameter. + - Premier exemple : vous construisez par programmation un système d'onglets, par exemple, un carnet d'adresses. Comme le système vous retournera le numéro de l'onglet sélectionné, vous n'aurez probablement pas besoin de davantage d'informations. Dans ce cas, ne vous préoccupez pas des numéros de référence des éléments : passez n'importe quelle valeur (hormis 0) dans le paramètre *réfElément*. Notez que pour un système de carnet d'adresses, vous pouvez prédéfinir une liste A, B,..., Z en mode Développement. Vous pouvez également la créer par programmation afin d'éliminer les lettres pour lesquelles il n'y a pas d'enregistrement. + - Deuxième exemple : en travaillant avec une base, vous construisez progressivement une liste de mots-clés. Vous pouvez sauvegarder la liste à la fin de chaque session, en utilisant les commandes `SAVE LIST` ou `LIST TO BLOB`, et la recharger au début de chaque session, à l'aide des commandes `Load list` ou `BLOB to list`. Vous pouvez afficher cette liste dans une palette flottante ; lorsque l'utilisateur clique sur un mot-clé de la liste, l'élément choisi est inséré dans la zone saisissable sélectionnée du process de premier plan. En tout état de cause, l'important est que vous ne traitez que l'élément sélectionné (par clic ou glisser-déposer), car la commande `Selected list items`vous retourne la position de l'élément que vous devez traiter. En utilisant cette valeur de position, vous obtenez le libellé de l'élément grâce à la commande `GET LIST ITEM`. Ici aussi, vous n'avez pas besoin d'identifier de façon unique chaque élément ; vous pouvez passer n'importe quelle valeur (hormis 0) dans le paramètre *réfElément*. -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. Dans cet exemple, nous utilisons les numéros de référence des éléments pour stocker des numéros d'enregistrements. Cependant, nous devons pouvoir établir une distinction entre les éléments qui correspondent aux enregistrements [Départements] et ceux qui correspondent aux enregistrements [Employés]. +2. Identifiez les éléments de la liste (niveau intermédiaire). + Utilisez le numéro de référence de l'élément pour stocker l'information nécessaire lorsque vous devez agir sur un élément ; ce point est détaillé dans l'exemple de la commande `APPEND TO LIST`. Dans cet exemple, nous utilisons les numéros de référence des éléments pour stocker des numéros d'enregistrements. Cependant, nous devons pouvoir établir une distinction entre les éléments qui correspondent aux enregistrements [Départements] et ceux qui correspondent aux enregistrements [Employés]. -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. Un moyen simple d'implémenter ce fonctionnement est de maintenir un compteur personnel. Suppose that you create a *hlList* list using the `APPEND TO LIST` command. At this stage, you initialize a counter *vhlCounter* to 1. A chaque fois que vous appelez `APPEND TO LIST` ou `INSERT IN LIST`, vous incrémentez ce compteur `(vlhCounter:=vlhCounter+1)`, et vous passez le compteur comme numéro de référence de l'élément. L'astuce consiste à ne pas décrémenter le compteur lorsque vous détruisez des éléments — le compteur ne peut qu'augmenter. En procédant ainsi, vous garantissez l'unicité des numéros de référence des éléments. Puisque ces numéros sont des valeurs de type Entier long, vous pouvez ajouter ou insérer plus de deux milliards d'éléments dans une liste qui a été réinitialisée... (si vous manipulez d'aussi grandes quantités d'éléments, cela signifie généralement que vous devriez utiliser une table plutôt qu'une liste.) +3. Identifiez tous les éléments de la liste individuellement (niveau avancé). + Programmez une gestion élaborée des listes hiérarchiques dans lesquelles vous devez absolument pouvoir identifier chaque élément individuellement à tous les niveaux de la liste. Un moyen simple d'implémenter ce fonctionnement est de maintenir un compteur personnel. Supposons que vous créez une liste *hlList* à l'aide de la commande `APPEND TO LIST`. A ce stade, vous initialisez un compteur *vlhCounter* à 1. A chaque fois que vous appelez `APPEND TO LIST` ou `INSERT IN LIST`, vous incrémentez ce compteur `(vlhCounter:=vlhCounter+1)`, et vous passez le compteur comme numéro de référence de l'élément. L'astuce consiste à ne pas décrémenter le compteur lorsque vous détruisez des éléments — le compteur ne peut qu'augmenter. En procédant ainsi, vous garantissez l'unicité des numéros de référence des éléments. Puisque ces nombres sont du type Entier long, vous pouvez ajouter ou insérer plus de deux milliards d'éléments dans une liste qui a été réinitialisée ... (cependant si vous travaillez avec un si grand nombre d'éléments, cela signifie généralement que vous devriez utiliser un tableau plutôt qu'une liste.) > Si vous exploitez les Opérateurs sur les bits, vous pouvez également utiliser les numéros de référence des éléments pour stocker des informations qui peuvent être logées dans un Entier long, c'est-à-dire 2 Entiers, des valeurs de 4 octets ou encore 32 Booléens. @@ -139,14 +141,16 @@ Dans la plupart des cas, lorsque vous utilisez des listes hiérarchiques pour de En pratique, vous devez vous préoccuper des numéros de référence d'éléments lorsque vous voulez accéder directement par programmation à n'importe quel élément de la liste, et pas nécessairement à l'élément couramment sélectionné. + ## Élément modifiable -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. +Vous pouvez choisir si les éléments de la liste hiérarchique peuvent être modifiés par l'utilisateur à l'aide du raccourci **Alt + clic** (Windows)/ **Option + clic** (macOS), ou en effectuant un clic long sur le texte de l'élément. - Quelle que soit la source de données de la liste hiérarchique, vous pouvez contrôler l'ensemble de l'objet avec la propriété [Saisissable](properties_Entry.md#enterable). -- 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. Pour plus d'informations, consultez [Définir les propriétés des énumérations ](https://doc.4d.com/4Dv18/4D/18/Definir-les-proprietes-des-enumerations.300-4575487.fr.html). +- En outre, si vous remplissez la liste hiérarchique à l'aide d'une liste créée dans l'éditeur de listes, vous contrôlez si un élément d'une liste hiérarchique est modifiable à l'aide de l'option **Élément modifiable** dans l'éditeur de listes. Pour plus d'informations, consultez [Définir les propriétés des énumérations ](https://doc.4d.com/4Dv18/4D/18/Definir-les-proprietes-des-enumerations.300-4575487.fr.html). + ## Propriétés prises en charge -[Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Enumération](properties_DataSource.md#choice-list) - [Class](properties_Object.md#css-class) - [Glissable](properties_Action.md#draggable-and-droppable) - [Déposable](properties_Action.md#draggable-and-droppable) - [Saisissable](properties_Entry.md#enterable) - [Filtre de saisie](properties_Entry.md#entry-filter) - [Couleur de fond](properties_BackgroundAndBorder.md#background-color-fill-color) - [Focusable](properties_Entry.md#focusable) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Cacher rectangle de focus](properties_Appearance.md#hide-focus-rectangle) - [Barre de défilement hor.](properties_Appearance.md#horizontal-scroll-bar) - [Dimensionnement horizontal ](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Multi-sélectionnable](properties_Action.md#multi-selectable) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Barre de défilement verticale](properties_Appearance.md#vertical-scroll-bar) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Visibilité](properties_Display.md#visibility) - [Largeur](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) - [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) - [Help Tip](properties_Help.md#help-tip) - [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 diff --git a/website/translated_docs/fr/FormObjects/listbox_overview.md b/website/translated_docs/fr/FormObjects/listbox_overview.md index 26259edf0307ba..76ea98316bfbf9 100644 --- a/website/translated_docs/fr/FormObjects/listbox_overview.md +++ b/website/translated_docs/fr/FormObjects/listbox_overview.md @@ -3,7 +3,6 @@ id: listboxOverview title: List Box --- -## Aperçu Les list box sont des objets actifs complexes permettant d’afficher et de saisir des données sous forme de tableaux. Ils peuvent être liés au contenu de la base de données, comme les sélections d'entités ("entity selections") et les sections d'enregistrement, ou à tout contenu linguistique tel que les collections et les tableaux. Ils incluent des fonctionnalités avancées concernant la saisie de données, le tri des colonnes, la gestion des événements, l'apparence personnalisée, le déplacement des colonnes, etc. @@ -11,6 +10,8 @@ Les list box sont des objets actifs complexes permettant d’afficher et de sais Une list box contient une ou plusieurs colonnes dont le contenu est automatiquement synchronisé. Le nombre de colonnes est en principe illimité (il dépend des ressources de la machine). +## Aperçu + ### Principes d'utilisation basiques En exécution, les list box permettent d’afficher et de saisir des données sous forme de listes. Pour passer une cellule en mode édition ([si la saisie est autorisée pour la colonne associée](#managing-entry)), il suffit de cliquer deux fois sur la valeur qu’elle contient : @@ -19,81 +20,88 @@ En exécution, les list box permettent d’afficher et de saisir des données so Les utilisateurs peuvent saisir et afficher du texte sur plusieurs lignes au sein d’une cellule de list box. Pour ajouter un retour à la ligne, appuyez sur les touches **Ctrl+Retour chariot** sous Windows, ou appuyez sur les touches **Option+Retour chariot** sous 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. +Les booléens et les images peuvent être affichés dans des cellules, ainsi que des dates, des heures ou des nombres. Il est possible de trier les valeurs de colonne en cliquant sur un en-tête ([tri standard](#managing-sorts)). Toutes les colonnes sont automatiquement synchronisées. -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). +Il est également possible de redimensionner chaque colonne, et l'utilisateur peut modifier l'ordre des [colonnes](properties_ListBox.md#locked-columns-and-static-columns) et des [lignes](properties_Action.md#movable-rows) en les déplaçant à l'aide de la souris, si cette action est autorisée. Notez que les list box peuvent être utilisées [en mode hiérarchique](#hierarchical-list-boxes). + +L'utilisateur peut sélectionner une ou plusieurs lignes à l'aide des raccourcis standard : **Maj + clic** pour une sélection adjacente et **Ctrl + clic** (Windows) ou **Commande + clic** (macOS) pour une sélection non adjacente. -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. ### Parties de list box Une list box est composée de quatre parties distinctes : -* l’objet list box dans sa globalité, -* les colonnes, -* les en-têtes des colonnes, et -* les pieds des colonnes. +* l’objet list box dans sa globalité, +* les colonnes, +* les en-têtes des colonnes, et +* les pieds des colonnes. ![](assets/en/FormObjects/listbox_parts.png) Chaque partie dispose de son propre nom d’objet et de propriétés spécifiques. Par exemple, le nombre de colonnes ou la couleur alternée de chaque ligne sont définies dans les propriétés de l’objet list box, la largeur de chaque colonne est définie dans les propriétés des colonnes et la police de l’en-tête est définie dans les propriétés des en-têtes. -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: +Il est possible d'ajouter une méthode objet à l'objet list box et/ou à chaque colonne de la list box. Les méthodes objet sont appelées dans l'ordre suivant : + +1. Méthode objet de chaque colonne +2. Méthode objet de la list box + +La méthode objet de colonne obtient les événements qui se produisent dans son [en-tête](#list-box-headers) et son [pied](#list-box-footers). -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). ### Types de list box Il existe différents types de list box avec leurs propres comportements et propriétés spécifiques. The list box type depends on its [Data Source property](properties_Object.md#data-source): -- **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). +- **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. - +- **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. + ### Managing list boxes You can completely configure a list box object through its properties, and you can also manage it dynamically through programming. 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 -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. +## Objets de type List box -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 +### List box de type tableau +Dans une list box de type tableau, chaque colonne est associée à un tableau 4D à une dimension ; tous les types de tableaux peuvent être utilisés, à l’exception des tableaux de pointeurs. The number of rows is based on the number of array elements. + +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. -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: +Avec les list box de type tableau, les valeurs des colonnes (saisie et affichage) sont gérées à l’aide des commandes du langage 4D. You can also associate a [choice list](properties_DataSource.md#choice-list) with a column in order to control data entry. Les valeurs des colonnes sont gérées à l’aide des commandes de haut niveau du thème List box (telles que `LISTBOX INSERT ROWS` ou `LISTBOX INSERT COLUMN`) ainsi que des commandes de manipulation des tableaux. Par exemple, pour initialiser le contenu d’une colonne, vous pouvez utiliser l’instruction suivante : ```4d -ARRAY TEXT(ColumnName;size) +ARRAY TEXT(varCol;size) ``` -You can also use a list: +Vous pouvez également utiliser une énumération : ```4d -LIST TO ARRAY("ListName";ColumnName) +LIST TO ARRAY("ListName";varCol) ``` +> **Attention :** Lorsqu’un objet List box contient plusieurs colonnes de tailles différentes, seul le nombre d’éléments correspondant au plus petit tableau est affiché. Il est donc conseillé de veiller à ce que chaque tableau ait le même nombre d’éléments que les autres. A noter également que si une colonne de la list box est “vide†(c'est le cas lorsque le tableau associé n'a pas été correctement déclaré ou dimensionné via le langage), la list box n'affiche aucun contenu. + -> **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. -### Selection list boxes -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. +### List box de type sélection + +Dans ce type de list box, chaque colonne peut être associée à un champ (par exemple `[Employees]LastName)` ou à une 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. The contents of each row is then evaluated according to a selection of records: the **current selection** of a table or a **named selection**. 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 box collection ou entity selection 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. @@ -107,10 +115,13 @@ When the data source is a collection, any modifications made in the list box val myCol:=myCol.push("new value") //display new value in list box ``` + + ### Propriétés prises en charge Les propriétés prises en charge dépendent du type de list box. + | Propriété | List box tableau | Liste box sélection | List box collection ou entity selection | | ------------------------------------------------------------------------------------------- | ---------------- | ------------------- | --------------------------------------- | | [Couleur de fond alternée](properties_BackgroundAndBorder.md#alternate-background-color) | X | X | X | @@ -186,126 +197,45 @@ Les propriétés prises en charge dépendent du type de list box. > Les colonnes, en-têtes et pieds de list box prennent en charge des propriétés spécifiques. - -### Événements formulaire pris en charge - - - - - - - - - - - - - - - - - - - - - - - - - +### Événements formulaire pris en charge -| Evénement formulaire | Propriétés supplémentaires retournées (voir [Evénement formulaire](https://doc.4d.com/4Dv18/4D/18/FORM-Evenement.301-4522191.fr.html) pour les propriétés principales) | Commentaires | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| Sur après modification | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sue après frappe clavier | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur après tri | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Les formules composées ne peuvent pas être triées. -(ex : This.firstName + This.lastName)* | -| Sur clic alternatif | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Listbox tableau uniquement* | -| Sur avant saisie | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sue avant frappe clavier | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur début survol | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur clic | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur fermeture corps | - [row](#additional-properties) | *List box Sélection courante et Sélection temporaire uniquement* | -| Sur contracter | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *List box hiérarchiques uniquement* | -| Sur déplacement colonne | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| Sur redimensionnement colonne | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| Sur données modifiées | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur action suppression | - [row](#additional-properties) | | -| Sur affichage corps | - [isRowSelected](#additional-properties) -- [row](#additional-properties) | | -| Sur double clic | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur glisser | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur déposer | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur déployer | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *List box hiérarchiques uniquement* | -| Sur clic pied | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *List box Tableau, Sélection courante et Sélection temporaire uniquement* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Propriétés supplémentaires retournées uniquement lors de la modification d'une cellule* | -| Sur clic entête | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Propriétés supplémentaires retournées uniquement lorsque la modification d'une cellule est achevée* | -| Sur début survol | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur fin survol | | | -| Sur survol | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur ouverture corps | - [row](#additional-properties) | *List box Sélection courante et Sélection temporaire uniquement* | -| Sur déplacement ligne | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Listbox tableau uniquement* | -| Sur nouvelle sélection | | | -| Sur défilement | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +| Evénement formulaire | Propriétés supplémentaires retournées (voir [Evénement formulaire](https://doc.4d.com/4Dv18/4D/18/FORM-Evenement.301-4522191.fr.html) pour les propriétés principales) | Commentaires | +| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| Sur après modification |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sue après frappe clavier |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur après tri |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [headerName](#additional-properties)
      • | *Les formules composées ne peuvent pas être triées.
        (ex : This.firstName + This.lastName)* | +| Sur clic alternatif |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Listbox tableau uniquement* | +| Sur avant saisie |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur avant frappe clavier |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur début survol |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur clic |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur fermeture corps |
      • [row](#additional-properties)
      • | *List box Sélection courante et Sélection temporaire uniquement* | +| Sur contracter |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *List box hiérarchiques uniquement* | +| Sur déplacement colonne |
      • [columnName](#additional-properties)
      • [newPosition](#additional-properties)
      • [oldPosition](#additional-properties)
      • | | +| Sur redimensionnement colonne |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [newSize](#additional-properties)
      • [oldSize](#additional-properties)
      • | | +| Sur données modifiées |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur action suppression |
      • [row](#additional-properties)
      • | | +| Sur affichage corps |
      • [isRowSelected](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur double clic |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur glisser |
      • [area](#additional-properties)
      • [areaName](#additional-properties)
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur déposer |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur déployer |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *List box hiérarchiques uniquement* | +| Sur clic pied |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [footerName](#additional-properties)
      • | *List box Tableau, Sélection courante et Sélection temporaire uniquement* | +| On Getting Focus |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Propriétés supplémentaires retournées uniquement lors de la modification d'une cellule* | +| Sur clic entête |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [headerName](#additional-properties)
      • | | +| On Load | | | +| On Losing Focus |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Propriétés supplémentaires retournées uniquement lorsque la modification d'une cellule est achevée* | +| Sur début survol |
      • [area](#additional-properties)
      • [areaName](#additional-properties)
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur fin survol | | | +| Sur survol |
      • [area](#additional-properties)
      • [areaName](#additional-properties)
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur ouverture corps |
      • [row](#additional-properties)
      • | *List box Sélection courante et Sélection temporaire uniquement* | +| Sur déplacement ligne |
      • [newPosition](#additional-properties)
      • [oldPosition](#additional-properties)
      • | *Listbox tableau uniquement* | +| Sur nouvelle sélection | | | +| Sur défilement |
      • [horizontalScroll](#additional-properties)
      • [verticalScroll](#additional-properties)
      • | | +| On Unload | | | #### Propriétés supplémentaires @@ -328,9 +258,12 @@ Les événements formulaire sur les list box ou colonnes de list box peuvent ret | oldSize | entier long | Previous size (in pixels) of the column or row | | row | entier long | Row number | | verticalScroll | entier long | Positive if scroll is towards the bottom, negative if towards the top | +> If an event occurs on a "fake" column or row that doesn't exist, an empty string is typically returned. + + + -> If an event occurs on a "fake" column or row that doesn't exist, an empty string is typically returned. ## Colonnes de list box @@ -339,114 +272,53 @@ A list box is made of one or more column object(s) which have specific propertie ![](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. - > 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). + ### Propriétés spécifiques des list box [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) ### Événements formulaire pris en charge - - - - - - - - - - - - - - - - - - - - -| Evénement formulaire | Propriétés supplémentaires retournées (voir [Evénement formulaire](https://doc.4d.com/4Dv18/4D/18/FORM-Evenement.301-4522191.fr.html) pour les propriétés principales) | Commentaires | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| Sur après modification | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sue après frappe clavier | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur après tri | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Les formules composées ne peuvent pas être triées. -(ex : This.firstName + This.lastName)* | -| Sur clic alternatif | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Listbox tableau uniquement* | -| Sur avant saisie | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sue avant frappe clavier | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur début survol | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur clic | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur déplacement colonne | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| Sur redimensionnement colonne | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| Sur données modifiées | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur double clic | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur glisser | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur déposer | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| Sur clic pied | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *List box Tableau, Sélection courante et Sélection temporaire uniquement* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Propriétés supplémentaires retournées uniquement lors de la modification d'une cellule* | -| Sur clic entête | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Propriétés supplémentaires retournées uniquement lorsque la modification d'une cellule est achevée* | -| Sur déplacement ligne | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Listbox tableau uniquement* | -| Sur défilement | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | - - -## 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. - -When headers are displayed, you can select a header in the Form editor by clicking it when the list box object is selected: +| Evénement formulaire | Propriétés supplémentaires retournées (voir [Evénement formulaire](https://doc.4d.com/4Dv18/4D/18/FORM-Evenement.301-4522191.fr.html) pour les propriétés principales) | Commentaires | +| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| Sur après modification |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sue après frappe clavier |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur après tri |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [headerName](#additional-properties)
      • | *Les formules composées ne peuvent pas être triées.
        (ex : This.firstName + This.lastName)* | +| Sur clic alternatif |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Listbox tableau uniquement* | +| Sur avant saisie |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur avant frappe clavier |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur début survol |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur clic |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur déplacement colonne |
      • [columnName](#additional-properties)
      • [newPosition](#additional-properties)
      • [oldPosition](#additional-properties)
      • | | +| Sur redimensionnement colonne |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [newSize](#additional-properties)
      • [oldSize](#additional-properties)
      • | | +| Sur données modifiées |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur double clic |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur glisser |
      • [area](#additional-properties)
      • [areaName](#additional-properties)
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur déposer |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | | +| Sur clic pied |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [footerName](#additional-properties)
      • | *List box Tableau, Sélection courante et Sélection temporaire uniquement* | +| On Getting Focus |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Propriétés supplémentaires retournées uniquement lors de la modification d'une cellule* | +| Sur clic entête |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [headerName](#additional-properties)
      • | | +| On Load | | | +| On Losing Focus |
      • [column](#additional-properties)
      • [columnName](#additional-properties)
      • [row](#additional-properties)
      • | *Propriétés supplémentaires retournées uniquement lorsque la modification d'une cellule est achevée* | +| Sur déplacement ligne |
      • [newPosition](#additional-properties)
      • [oldPosition](#additional-properties)
      • | *Listbox tableau uniquement* | +| Sur défilement |
      • [horizontalScroll](#additional-properties)
      • [verticalScroll](#additional-properties)
      • | | +| On Unload | | | + + +## En-têtes de list box + +> Pour pouvoir accéder aux propriétés des en-têtes d'une list box, vous devez avoir coché l'option [Afficher en-têtes](properties_Headers.md#display-headers) dans la Liste des propriétés de la list box. + +Lorsque les en-têtes sont affichés, vous pouvez sélectionner un en-tête dans l'éditeur de formulaires en cliquant dessus lorsque l'objet List box est sélectionné : ![](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. +Vous pouvez définir, pour chaque en-tête de colonne de List box, des propriétés standard de texte : dans ce cas, ces propriétés sont prioritaires par rapport à celles de la colonne ou de la 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). + +Vous pouvez également accéder à des propriétés spécifiques aux en-têtes. 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) @@ -454,21 +326,24 @@ At runtime, events that occur in a header are generated in the [list box column 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. -### Header Specific Properties +### Propriétés spécifiques des en-têtes + +[Gras](properties_Text.md#bold) - [Css Class](properties_Object.md#css-class) - [Police](properties_Text.md#font) - [Couleur de fond](properties_Text.md#font-color) - [Message d'aide](properties_Help.md#help-tip) - [Alignement horizontal ](properties_Text.md#horizontal-alignment) - [Emplacement de l'icône](properties_TextAndPicture.md#icon-location) - [Italique](properties_Text.md#italic) - [Nom](properties_Object.md#object-name) - [Chemin d'accès](properties_TextAndPicture.md#picture-pathname) - [Titre](properties_Object.md#title) - [Souligné](properties_Text.md#underline) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Alignement vertical](properties_Text.md#vertical-alignment) - [Largeur](properties_CoordinatesAndSizing.md#width) -[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: +## Pieds de List box +> Pour pouvoir accéder aux propriétés des pieds d'une List box, vous devez avoir coché l'option [Afficher pieds](properties_Footers.md#display-footers) dans la Liste des propriétés de la List box. + +Les List box peuvent contenir des zones de "pied de page" non saisissables, affichant des informations supplémentaires. Dans les données présentées sous forme de tableaux, les pieds sont généralement utilisés pour afficher des calculs, tels que des sommes ou des moyennes. + +Lorsque les pieds sont affichés, vous pouvez sélectionner un pied de list box dans l’éditeur de formulaires en cliquant dessus lorsque l’objet List box est sélectionné : ![](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). +Vous pouvez définir, pour chaque pied de colonne de List box, des propriétés standard de texte : dans ce cas, ces propriétés sont prioritaires par rapport à celles de la colonne ou de la 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). At runtime, events that occur in a footer are generated in the [list box column object method](#object-methods). @@ -476,14 +351,16 @@ When the `OBJECT SET VISIBLE` command is used with a footer, it is applied to al ### 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: - 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. +- 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. Si, dans le contexte de cet événement, $0 est défini sur -1, la cellule est considérée comme non saisissable. Si l'événement a été généré après avoir appuyé sur **Tab** ou **Maj+Tab**, le focus va respectivement à la cellule suivante ou à la précédente. Si la valeur de $0 n'est pas -1 (par défaut $0 est 0), la cellule est saisissable et passe en mode d'édition. 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. @@ -518,39 +395,38 @@ The typical sequence of events generated during data entry or modification is as | ------------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | A cell switches to edit mode (user action or a call to the `EDIT ITEM` command) | Tous | Sur avant saisie | | | Tous | On Getting Focus | -| Its value is modified | Tous | Sue avant frappe clavier | +| Its value is modified | Tous | Sur avant frappe clavier | | | Tous | Sue après frappe clavier | | | Tous | Sur après modification | -| A user validates and leaves the cell | Liste box sélection | Save | +| A user validates and leaves the cell | List box de type sélection | Save | | | Record selection list boxes | On saving an existing record trigger (if set) | -| | Selection list boxes | On Data Change(*) | +| | List box de type sélection | On Data Change(*) | | | Entity selection list boxes | Entity is saved with automerge option, optimistic lock (see entity.save( )). In case of successful save, the entity is refreshed with the last update done. If the save operation fails, an error is displayed | | | Tous | On Losing Focus | - (*) With entity selection list boxes, in the On Data Change event: - - 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 -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: +La gestion des sélections s'effectue différemment selon que la list box de type tableau, sélection d'enregistrements, ou collection/entity selection : -- **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. +- **List box de type sélection :** les sélections sont gérées par l'intermédiaire d'un ensemble appelé par défaut `$ListboxSetN` (N débute à 0 et est incrémenté en fonction du nombre de list box dans le formulaire), que vous pouvez modifier si nécessaire. Cet ensemble est [défini dans les propriétés](properties_ListBox.md#highlight-set) de la list box. Il est maintenu automatiquement par 4D : si l'utilisateur sélectionne une ou plusieurs ligne(s) dans la list box, l'ensemble est immédiatement mis à jour. A l'inverse, il est possible d'utiliser les commandes du thème "Ensembles" afin de modifier par programmation la sélection dans la list box. -- **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 type collection/entity selection** : les sélections sont gérées via des propriétés de list box dédiées : + - [Elément courant](properties_DataSource.md#current-item) est un objet qui reçoit l'élément/l'entité sélectionné(e), + - [Eléments sélectionnés](properties_DataSource.md#selected-items) retourne la collection des éléments sélectionnés, + - [Position élément courant](properties_DataSource.md#current-item-position) retourne la position de l'élément ou de l'entité sélectionné(e). +- **List box de type tableau :** la commande `LISTBOX SELECT ROW` permet de sélectionner par programmation une ou plusieurs lignes de list box. En outre, [la variable associée à l’objet List box](properties_Object.md#variable-or-expression) peut être utilisée pour lire, fixer ou stocker les sélections de lignes dans l’objet. Cette variable correspond à un tableau de booléens automatiquement créé et maintenu par 4D. La taille de ce tableau est déterminée par celle de la list box : il contient le même nombre d’éléments que le plus petit tableau associé aux colonnes. Chaque élément de ce tableau contient `Vrai` si la ligne correspondante est sélectionnée et `Faux` sinon. 4D met à jour le contenu de ce tableau en fonction des actions utilisateur. A l’inverse, vous pouvez modifier la valeur des éléments de ce tableau afin de modifier la sélection dans la list box. En revanche, vous ne pouvez ni insérer ni supprimer de ligne dans ce tableau ; il n’est pas possible non plus de le retyper. La commande `Count in array` est utile dans ce cas pour connaître le nombre de lignes sélectionnées. Par exemple, cette méthode permet d’inverser la sélection de la première ligne de la list box (type tableau) : ```4d ARRAY BOOLEAN(tBListBox;10) - //tBListBox is the name of the list box variable in the form + // tBListBox est le nom de la variable associée à la List box dans le formulaire If(tBListBox{1}=True) tBListBox{1}:=False Else @@ -560,6 +436,7 @@ Selections are managed differently depending on whether the list box is based on > The `OBJECT SET SCROLL POSITION` command scrolls the list box rows so that the first selected row or a specified row is displayed. + ### 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: @@ -571,24 +448,22 @@ You can then define specific background colors, font colors and/or font styles b > 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.). -#### Selection list boxes +#### List box de type sélection 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). Keep in mind that expressions are automatically re-evaluated each time the: - - 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. -#### Array list boxes +#### List box de type tableau 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. 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). 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: - - `On Getting Focus` (list box property) - `On Losing Focus` (list box property) - `On Activate` (form property) @@ -602,8 +477,9 @@ You have chosen to hide the system highlight and want to display list box select 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: - "rowFillSource": "_ListboxBackground", - +``` + "rowFillSource": "_ListboxBackground", +``` In the object method of the list box, you can write: @@ -626,10 +502,10 @@ For a selection type list box, to produce the same effect you can use a method t For example, in the JSON form, you have defined the following Highlight Set and Background Color Expression for the list box: - "highlightSet": "$SampleSet", - "rowFillSource": "UI_SetColor", - - +``` + "highlightSet": "$SampleSet", + "rowFillSource": "UI_SetColor", +``` You can write in the *UI_SetColor* method: ```4d @@ -644,30 +520,32 @@ You can write in the *UI_SetColor* method: > 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. + ## Managing sorts 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. You can prevent standard user sorts by deselecting the [Sortable](properties_Action.md#sortable) property of the 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. +Le développeur peut mettre en place des tris personnalisés à l'aide de la commande `LISTBOX SORT COLUMNS` et/ou en combinant les événements formulaire `On Header Click` et `On After Sort` (voir la commande [`FORM Event`](https://doc.4d.com/4dv19/help/command/en/page1606.html)) et les commandes 4D correspondantes. -> 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. +> La propriété [Sortable](properties_Action.md#sortable) affecte uniquement les tris utilisateur standard ; la commande [`LISTBOX SORT COLUMNS`](https://doc.4d.com/4dv19/help/command/en/page916.html) ne prend pas en compte cette propriété. 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. -- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed; - ![](assets/en/FormObjects/sorticon0.png) +- Si la variable est définie sur 0, la colonne n'est pas triée et la flèche de tri n'est pas affichée. + ![](assets/en/FormObjects/sorticon0.png) + +- Si la variable est définie sur 1, la colonne est triée par ordre croissant et la flèche de tri s'affiche. ![](assets/en/FormObjects/sorticon1.png) + +- Si la variable est définie sur 2, la colonne est triée par ordre décroissant et la flèche de tri s'affiche. ![](assets/en/FormObjects/sorticon2.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) +> Seules les [variables](Concepts/variables.md) déclarées ou dynamiques peuvent être utilisées comme variables d'en-tête de colonne. Les autres types d'[expressions](Concepts/quick-tour.md#expressions) telles que `Form.sortValue` ne sont pas pris en charge. -- 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) +Vous pouvez définir la valeur de la variable (par exemple, Header2:=2) afin de "forcer" l'affichage de la flèche de tri. The column sort itself is not modified in this case; it is up to the developer to handle it. -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. +> La commande [`OBJECT SET FORMAT`](https://doc.4d.com/4dv19/help/command/en/page236.html) permet une prise en charge spécifique des icônes dans les en-têtes de listbox, ce qui peut être utile lorsque vous souhaitez travailler avec une icône de tri personnalisée. -> 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. ## Managing row colors, styles, and display @@ -678,6 +556,7 @@ There are several different ways to set background colors, font colors and font - 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)). + ### Priority & inheritance Priority and inheritance principles are observed when the same property is set at more than one level. @@ -691,7 +570,6 @@ Priority and inheritance principles are observed when the same property is set a | | List box properties | | low priority | Meta Info expression (for collection or entity selection list boxes) | - 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. For each attribute (style, color and background color), an **inheritance** is implemented when the default value is used: @@ -718,6 +596,7 @@ To restore the original appearance of the list box, you can: - 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. + ### Using arrays and expressions Depending of the list box type, you can use different properties to customize row colors, styles and display: @@ -728,7 +607,10 @@ Depending of the list box type, you can use different properties to customize ro | Font color | [Tableau couleurs de police](properties_Text.md#row-font-color-array) | [Expression couleur police](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)|-|-| +[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 @@ -745,9 +627,13 @@ In this mode, the printing of list boxes is carried out by programming, via the In this mode: - 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. +- 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. + + + + ## List box hiérarchiques Une list box hiérarchique est une list box dans laquelle le contenu de la première colonne apparaît sous forme hiérarchique. Ce type de représentation est adapté à la présentation d’informations comportant des valeurs répétées et/ou hiérarchiquement dépendantes (pays/région/ville...). @@ -756,13 +642,15 @@ Une list box hiérarchique est une list box dans laquelle le contenu de la premi Les list box hiérarchiques constituent un mode de représentation particulier des données, mais ne modifient pas la structure de ces données (les tableaux). Les list box hiérarchiques sont gérées exactement de la même manière que les list box non hiérarchiques. + ### Définir une hiérarchie Pour définir une list box hiérarchique, vous disposez de trois possibilités : -* Configurer manuellement les éléments hiérarchiques via la liste des propriétés dans l’éditeur de formulaire (ou déditez le formulaire JSON). -* Générer visuellement la hiérarchie à l’aide du pop up menu de gestion des list box, dans l’éditeur de formulaires. -* Utiliser les commandes [LISTBOX SET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-SET-HIERARCHY.301-4127969.en.html) et [LISTBOX GET HIERARCHY](https://doc.4d.com/4Dv17R5/4D/17-R5/LISTBOX-GET-HIERARCHY.301-4127970.en.html). Ces commandes sont décrites dans le *manuel Langage de 4D*. +* Configurer manuellement les éléments hiérarchiques via la liste des propriétés dans l’éditeur de formulaire (ou déditez le formulaire JSON). +* Générer visuellement la hiérarchie à l’aide du pop up menu de gestion des list box, dans l’éditeur de formulaires. +* 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. + #### Propriétés de la List Box hiérarchique @@ -777,31 +665,31 @@ The last variable is never hierarchical even if several identical values exists ![](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. - > 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. + #### Créer une hiérarchie via le menu contextuel -Lorsque vous sélectionnez au moins une colonne en plus de la première dans un objet list box (de type tableau) dans l’éditeur de formulaires, la commande **Créer hiérarchie** est disponible dans le menu contextuel : +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: ![](assets/en/FormObjects/listbox_hierarchy1.png) This command is a shortcut to define a hierarchy. Lorsque vous la choisissez, les actions suivantes sont effectuées : -* L'option **List box hiérarchique** est cochée pour l’objet dans la Liste des propriétés. -* Les variables des colonnes sont utilisées pour définir la hiérarchie. Elles remplacent les variables éventuellement déjà définies. -* Les colonnes sélectionnées n’apparaissent plus dans la list box (à l’exception du titre de la première). +* The **Hierarchical list box** option is checked for the object in the Property List. +* Les variables des colonnes sont utilisées pour définir la hiérarchie. Elles remplacent les variables éventuellement déjà définies. +* Les colonnes sélectionnées n’apparaissent plus dans la list box (à l’exception du titre de la première). -Exemple : soit une list box dont les premières colonnes contiennent Pays, Région, Ville et Population. Lorsque Pays, Région et Ville sont sélectionnées (cf. illustration ci-dessus), si vous choisissez **Créer hiérarchie** dans le menu contextuel, une hiérarchie à trois niveaux est créée dans la première colonne, les colonnes 2 et 3 sont supprimées et la colonne Population la deuxième : +Exemple : soit une list box dont les premières colonnes contiennent Pays, Région, Ville et 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: ![](assets/fr/FormObjects/listbox_hierarchy2.png) ##### Annuler une hiérarchie +When the first column is selected and already specified as hierarchical, you can use the **Cancel hierarchy** command. Lorsque vous choisissez cette commande, les actions suivantes sont effectuées : -Lorsque la première colonne est sélectionnée et déjà définie comme hiérarchique, vous pouvez utiliser la commande **Annuler hiérarchie**. Lorsque vous choisissez cette commande, les actions suivantes sont effectuées : +* The **Hierarchical list box** option is deselected for the object, +* Les niveaux hiérarchiques 2 à n sont supprimés et transformés en colonnes ajoutées dans la list box. -* L’option **List box hiérarchique** est désélectionnée pour l’objet, -* Les niveaux hiérarchiques 2 à n sont supprimés et transformés en colonnes ajoutées dans la list box. ### Principes de fonctionnement @@ -817,9 +705,9 @@ Si cette list box est affichée sous forme hiérarchique (les trois premiers tab Les tableaux ne sont pas triés avant la construction de la hiérarchie. Si par exemple un tableau contient les données AAABBAACC, la hiérarchie obtenue sera : -> A B A C + > A B A C -Pour déployer ou contracter un "nÅ“ud" hiérarchique, cliquez dessus. Si vous effectuez **Alt+clic** (Windows) ou **Option+clic** (macOS) sur le nÅ“ud, tous ses sous-éléments seront déployés ou contractés. Ces opérations peuvent également être effectuées par programmation à l'aide des commandes `LISTBOX EXPAND` et `LISTBOX COLLAPSE`. +Pour déployer ou contracter un "nÅ“ud" hiérarchique, cliquez dessus. If you **Alt+click** (Windows) or **Option+click** (macOS) on the node, all its sub-elements will be expanded or collapsed as well. Ces opérations peuvent également être effectuées par programmation à l'aide des commandes `LISTBOX EXPAND` et `LISTBOX COLLAPSE`. Lorsque des valeurs de type date ou heure sont incluses dans une list box hiérarchique, elles sont affichées dans un format normalisé. @@ -829,7 +717,7 @@ Dans une list box en mode hiérarchique, un tri standard (effectué suite à un - En premier lieu, tous les niveaux de la colonne hiérarchique (première colonne) sont automatiquement triés par ordre croissant. - Le tri est ensuite effectué par ordre croissant ou décroissant (suivant l’action utilisateur) sur les valeurs de la colonne où le clic a eu lieu. -- Toutes les colonnes sont synchronisées. +- Toutes les colonnes sont synchronisées. - Lors des tris ultérieurs des colonnes non hiérarchiques de la list box, seul le dernier niveau de la première colonne est trié. Il est possible de modifier le tri de cette colonne en cliquant sur son en-tête. Soit par exemple la list box suivante, dans laquelle aucun tri spécifique n’est défini : @@ -842,6 +730,7 @@ Si vous cliquez sur l’en-tête "Population" afin de trier les populations par Comme pour toutes les list box, vous pouvez [désactiver le mécanisme de tri standard](properties_Action.md#sortable) en désélectionnant la propriété "Triable" pour la list box et gérer le tri par programmation. + #### Gestion des sélections et des positions dans les list box hiérarchiques Une list box hiérarchique affiche un nombre variable de lignes à l’écran en fonction de l’état déployé/contracté des nÅ“uds hiérachiques. Cela ne signifie pas pour autant que le nombre de lignes des tableaux varie. Seul l’affichage est modifié, pas les données. Il est important de comprendre ce principe car la gestion programmée des list box hiérarchiques se base toujours sur les données des tableaux, pas sur les données affichées. En particulier, les lignes de rupture ajoutées automatiquement ne sont pas prises en compte dans les tableaux d’options d’affichage (cf. ci-dessous le paragraphe Gestion des lignes de rupture). @@ -876,9 +765,9 @@ Représentation non hiérarchique : ![](assets/fr/FormObjects/hierarch7.png) Rep Tout comme pour les sélections, la commande `LISTBOX GET CELL POSITION` retournera les mêmes valeurs pour une list box hiérarchique et une list box non hiérarchique. Cela signifie que dans les deux exemples ci-dessous, `LISTBOX GET CELL POSITION` retournera la même position : (3;2). -*Représentation non hiérarchique :* ![](assets/fr/FormObjects/hierarch9.png) +*Non-hierarchical representation:* ![](assets/fr/FormObjects/hierarch9.png) -*Représentation hiérarchique :* ![](assets/fr/FormObjects/hierarch10.png) +*Hierarchical representation:* ![](assets/fr/FormObjects/hierarch10.png) Lorsque toutes les lignes d’une sous-hiérarchie sont masquées, la ligne de rupture est automatiquement masquée. Dans l’exemple ci-dessus, si les lignes 1 à 3 sont masquées, la ligne de rupture "Bretagne" n’apparaîtra pas. @@ -888,15 +777,16 @@ Si l’utilisateur sélectionne une ligne de rupture, `LISTBOX GET CELL POSITION ![](assets/fr/FormObjects/hierarch11.png) -... `LISTBOX GET CELL POSITION` retourne (2;4). Pour sélectionner une ligne de rupture par programmation, vous devez utiliser la commande `LISTBOX SELECT BREAK`. + +... `LISTBOX GET CELL POSITION` returns (2;4). Pour sélectionner une ligne de rupture par programmation, vous devez utiliser la commande `LISTBOX SELECT BREAK`. Les lignes de rupture ne sont pas prises en compte dans les tableaux internes permettant de gérer l’apparence graphique des list box (styles et couleurs). Il est toutefois possible de modifier ces caractéristiques pour les lignes de rupture via les commandes de gestion graphique des objets. Il suffit pour cela d’exécuter ces commandes appropriées sur les tableaux constituant la hiérarchie. Soit par exemple la list box suivante (les noms des tableaux associés sont précisés entre parenthèses) : -*Représentation non hiérarchique :* ![](assets/fr/FormObjects/hierarch12.png) +*Non-hierarchical representation:* ![](assets/fr/FormObjects/hierarch12.png) -*Représentation hiérarchique :* ![](assets/fr/FormObjects/hierarch13.png) +*Hierarchical representation:* ![](assets/fr/FormObjects/hierarch13.png) En mode hiérarchique, les niveaux de rupture ne sont pas pris en compte par les tableaux de modification de style nommés `tStyle` et `tCouleurs`. Pour modifier la couleur ou le style des niveaux de rupture, vous devez exécuter les instructions suivantes : @@ -904,13 +794,13 @@ En mode hiérarchique, les niveaux de rupture ne sont pas pris en compte par les OBJECT SET RGB COLORS(T1;0x0000FF;0xB0B0B0) OBJECT SET FONT STYLE(T2;Bold) ``` - > Dans ce contexte, seule la syntaxe utilisant la variable tableau peut fonctionner avec les commandes de propriété d’objet car les tableaux n’ont alors pas d’objet associé. Résultat : ![](assets/fr/FormObjects/hierarch14.png) + #### Gestion optimisée du déployer/contracter Vous pouvez optimiser l’affichage et la gestion des list box hiérarchiques en tirant parti des événements formulaire `On Expand` et `On Collapse`. @@ -920,13 +810,14 @@ Une list box hiérarchique est construite à partir du contenu des tableaux qui L'emploi des événements formulaire `On Expand` et `On Collapse` permet de s’affranchir de ces contraintes : il est possible de n’afficher qu’une partie de la hiérarchie et d’effectuer le chargement et le déchargement des tableaux à la volée, en fonction des actions de l’utilisateur. Dans le contexte de ces événements, la commande `LISTBOX GET CELL POSITION` retourne la cellule sur laquelle l’utilisateur a cliqué afin de déployer ou de contracter une ligne. Dans ce cas, le remplissage et le vidage des tableaux doivent être effectués par le code. Les principes à mettre en oeuvre sont : - - A l’affichage de la listbox, seul le premier tableau doit être rempli. Vous devez toutefois créer un second tableau avec des valeurs vides afin que la list box affiche les boutons déployer/contracter : ![](assets/fr/FormObjects/hierarch15.png) - Lorsque l’utilisateur clique sur un bouton de déploiement, vous pouvez traiter l’événement `On Expand`. La commande `LISTBOX GET CELL POSITION` retourne la cellule concernée et vous permet de construire la hiérarchie adéquate : vous alimentez le premier tableau avec des valeurs répétées et le second avec les valeurs issues de la commande `SELECTION TO ARRAY`, et vous insérez dans la list box autant de lignes que nécessaire à l’aide de la commande `LISTBOX INSERT ROWS`. ![](assets/fr/FormObjects/hierarch16.png) - Lorsque l’utilisateur clique sur un bouton de contraction, vous pouvez traiter l’événement `On Collapse`. La commande `LISTBOX GET CELL POSITION` retourne la cellule concernée : vous supprimez de la list box autant de lignes que nécessaire à l’aide de la commande `LISTBOX DELETE ROWS`. + + ## Object arrays in columns Les colonnes de list box peuvent être associées à des tableaux d'objets. Comme les tableaux d'objets peuvent contenir des données de types différents, cette puissante fonctionnalité vous permet de saisir et d'afficher divers types de valeurs dans les lignes d'une même colonne, ainsi que d'utiliser divers objets d'interface (widgets). Par exemple, vous pouvez placer une zone de saisie de texte dans la première ligne, une case à cocher dans la seconde, et une liste déroulante dans la troisième. Les tableaux d'objets vous donnent également accès à des widgets supplémentaires, tels que des boutons ou des sélecteurs de couleurs (color picker). @@ -935,6 +826,7 @@ La list box suivante a été définie à l'aide d'un tableau d'objets : ![](assets/en/FormObjects/listbox_column_objectArray.png) + ### Configuring an object array column To assign an object array to a list box column, you just need to set the object array name in either the Property list ("Variable Name" field), or using the [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-INSERT-COLUMN.301-4311153.en.html) command, like with any array-based column. In the Property list, you can now select Object as a "Expression Type" for the column: @@ -947,7 +839,7 @@ 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) @@ -956,19 +848,18 @@ ARRAY OBJECT(obColumn;0) //column array ``` ![](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 et affichage des données 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 \, <.>, 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. 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: @@ -982,7 +873,6 @@ When a list box column is associated with an object array, the way a cell is dis | 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). #### Formats d'affichage et filtres de saisie @@ -1000,39 +890,37 @@ You cannot set display formats or entry filters for columns of object-type list | color | N/A | N/A | | event | N/A | N/A | - ### Attributs Chaque élément du tableau d'objets est un objet qui peut contenir un ou plusieurs attributs qui définiront le contenu de la cellule et l'affichage des données (voir exemple ci-dessus). 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 | Texte | réel | entier | boolean | color | event | -| --------------------- | --------------------------------------- | ----- | ---- | ------ | ------- | ----- | ----- | -| *Attributs* | *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 | Texte | réel | integer | boolean | color | event | +| --------------------- | --------------------------------------- | ----- | ---- | ------- | ------- | ----- | ----- | +| *Attributs* | *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 | | #### 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 +````4d ARRAY OBJECT(obColumn;0) //column array C_OBJECT($ob1) $entry:="Hello world!" @@ -1048,26 +936,25 @@ Cell values are stored in the "value" attribute. This attribute is used for inpu APPEND TO ARRAY(obColumn;$ob1) APPEND TO ARRAY(obColumn;$ob2) APPEND TO ARRAY(obColumn;$ob3) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_value.png) - > Null values are supported and result in an empty cell. -#### min and max +#### min et max -When the "valueType" is "real" or "integer", the object also accepts min and max attributes with appropriate values (values must be of the same type as the valueType). +Lorsque le "valueType" est "real" ou "integer", l'objet accepte également les attributs min et max avec les valeurs appropriées (les valeurs doivent être du même type que valueType). -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. +Ces attributs peuvent être utilisés pour contrôler la plage de valeurs d'entrée. Lorsqu'une cellule est validée (lorsqu'elle perd le focus), si la valeur de saisie est inférieure à la valeur minimale ou supérieure à la valeur maximale, elle est rejetée. Dans ce cas, la valeur précédente est conservée et une astuce affiche une explication. -```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) @@ -1075,11 +962,9 @@ These attributes can be used to control the range of input values. When a cell i L'attribut behavior propose des variations de la représentation standard des valeurs. Une seule variation est possible : -| Attribut | Valeur(s) disponible(s) | valueType(s) | Description | -| -------- | ----------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| behavior | threeStates | integer | Représente une valeur numérique sous forme de case à cocher à trois états. -2=intermédiaire, 1=cochée, 0=non cochée, -1=invisible, -2=non cochée désactivée, -3=cochée désactivée, -4=intermédiaire désactivée | - +| Attribut | Valeur(s) disponible(s) | valueType(s) | Description | +| -------- | ----------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| behavior | threeStates | integer | Représente une valeur numérique sous forme de case à cocher à trois états.
        2=intermédiaire, 1=cochée, 0=non cochée, -1=invisible, -2=non cochée désactivée, -3=cochée désactivée, -4=intermédiaire désactivée | ```4d C_OBJECT($ob3) @@ -1097,16 +982,15 @@ L'attribut behavior propose des variations de la représentation standard des va Lorsqu'un attribut "choiceList" ou "requiredList" est présent dans l'objet, la zone de saisie de texte est remplacée par une liste déroulante ou une combo box, en fonction de l'attribut : -* Si l'attribut est "choiceList", la cellule est affichée sous forme de combo box. Cela signifie que l'utilisateur peut sélectionner ou saisir une valeur. -* Si l'attribut est "requiredList", la cellule est affichée sous forme de liste déroulante. Cela signifie que l'utilisateur peut uniquement sélectionner une des valeurs de la liste. +* Si l'attribut est "choiceList", la cellule est affichée sous forme de combo box. Cela signifie que l'utilisateur peut sélectionner ou saisir une valeur. +* Si l'attribut est "requiredList", la cellule est affichée sous forme de liste déroulante. Cela signifie que l'utilisateur peut uniquement sélectionner une des valeurs de la liste. Dans les deux cas, vous pouvez utiliser un attribut "value" pour présélectionner une valeur dans le widget. - > Les valeurs du widget sont définies via un tableau. Si vous souhaitez associer le widget à une énumération 4D existante, vous devez utiliser les attributs "requiredListReference", "requiredListName", "choiceListReference" ou "choiceListName". -Exemples : +Voici quelques exemples : -* Vous voulez afficher une liste déroulante avec juste deux options, "Open" ou "Closed". "Closed" doit être présélectionné : +* Vous voulez afficher une liste déroulante avec juste deux options, "Open" ou "Closed". "Closed" doit être présélectionné : ```4d ARRAY TEXT($RequiredList;0) @@ -1117,10 +1001,9 @@ Exemples : OB SET($ob;"value";"Closed") OB SET ARRAY($ob;"requiredList";$RequiredList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_openClosed.png) -* Vous voulez accepter toute valeur entière, mais afficher une combo box contenant les valeurs les plus communes : +* Vous voulez accepter toute valeur entière, mais afficher une combo box contenant les valeurs les plus communes : ```4d ARRAY LONGINT($ChoiceList;0) @@ -1134,7 +1017,6 @@ Exemples : OB SET($ob;"value";10) //10 comme valeur par défaut OB SET ARRAY($ob;"choiceList";$ChoiceList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_commonValues.png) #### requiredListName et requiredListReference @@ -1142,13 +1024,12 @@ Exemples : Les attributs "requiredListName" et "requiredListReference" vous permettent d'utiliser, dans une cellule de list box, une énumération définie dans 4D soit en mode Développement (via l'éditeur d'Enumérations de la Boîte à outils) soit par programmation (à l'aide de la commande New list). La cellule sera alors affichée sous forme de liste déroulante. Cela signifie que l'utilisateur pourra uniquement choisir une des valeurs fournies dans la liste. Utilisez "requiredListName" ou "requiredListReference" en fonction de la provenance de la liste : si la liste provient de la Boîte à outils, utilisez son nom ; sinon, si la liste a été définie par programmation, passez sa référence. Dans les deux cas, vous pouvez utiliser un attribut "value" pour présélectionner une valeur dans le widget. - > * Si vous souhaitez définir des valeurs d'énumération via un simple tableau, vous pouvez utiliser l'attribut "requiredList". > * Si la liste contient du texte représentant des valeurs réelles, le séparateur décimal doit être le point ("."), quels que soient les paramètres locaux, ex : "17.6" "1234.456". -Exemples : +Voici quelques exemples : -* Vous voulez afficher une liste déroulante basée sur une énumération nommée "colors" définie dans la Boîte à outils (contenant les valeurs "bleu", "jaune" et "vert"), la stocker en tant que valeur et afficher "bleu" par défaut : +* Vous voulez afficher une liste déroulante basée sur une énumération nommée "colors" définie dans la Boîte à outils (contenant les valeurs "bleu", "jaune" et "vert"), la stocker en tant que valeur et afficher "bleu" par défaut : ![](assets/fr/FormObjects/listbox_column_objectArray_colors.png) @@ -1159,10 +1040,9 @@ Exemples : OB SET($ob;"value";"bleu") OB SET($ob;"requiredListName";"colors") ``` - ![](assets/en/FormObjects/listbox_column_objectArray_colorsResult.png) -* Vous voulez afficher une liste déroulante basée sur une liste créée par programmation, et la stocker en tant que référence : +* Vous voulez afficher une liste déroulante basée sur une liste créée par programmation, et la stocker en tant que référence : ```4d <>List:=New list @@ -1177,15 +1057,14 @@ Exemples : OB SET($ob;"requiredListReference";<>List) ``` + ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) - #### choiceListName et choiceListReference Les attributs "choiceListName" et "choiceListReference" permettent d'utiliser, dans une cellule de list box, une énumération définie dans 4D soit en mode Développement (via l'éditeur de la Boîte à outils) soit par programmation (à l'aide de la commande New list). La cellule sera alors affichée sous forme de combo box, ce qui signifie que l'utilisateur pourra choisir une des valeurs de la liste ou en saisir une. Utilisez "choiceListName" ou "choiceListReference" en fonction de la provenance de la liste : si la liste provient de la Boîte à outils, utilisez son nom ; sinon, si la liste a été définie par programmation, passez sa référence. Dans les deux cas, vous pouvez utiliser un attribut "value" pour présélectionner une valeur dans le widget. - > * Si vous souhaitez définir des valeurs d'énumération via un simple tableau, vous pouvez utiliser l'attribut "choiceList". > * Si la liste contient du texte représentant des valeurs réelles, le séparateur décimal doit être le point ("."), quels que soient les paramètres locaux, ex : "17.6" "1234.456". @@ -1195,26 +1074,27 @@ Vous voulez afficher une combo box basée sur une énumération nommée "colors" ![](assets/fr/FormObjects/listbox_column_objectArray_colors.png) -```4d +````4d C_OBJECT($ob) OB SET($ob;"valueType";"text") OB SET($ob;"value";"vert") OB SET($ob;"choiceListName";"colors") -``` +```` ![](../assets/en/FormObjects/listbox_column_objectArray_colorsResult.png) + #### unitsList, unitsListName, unitsListReference et unitReference Vous pouvez utiliser des attributs spécifiques afin d'associer des unités aux valeurs des cellules (par exemple "10 cm", "20 pixels", etc.). Pour définir une liste d'unités, vous pouvez utiliser l'un des attributs suivants : -* "unitsList" : un tableau contenant les x éléments définissant les unités disponibles (ex : "cm", "pouces", "km", "miles", etc.). Utilisez cet attribut pour définir des unités dans l'objet. -* "unitsListReference" : une référence de liste 4D contenant les unités disponibles. Utilisez cet attribut pour définir des unités à l'aide d'une liste 4D créée avec la commande [New list](https://doc.4d.com/4Dv15/4D/15.6/New-list.301-3818474.en.html). -* "unitsListName" : un nom d'énumération 4D créée en mode Développement contenant les unités disponibles. Utilisez cet attribut pour définir des unités à l'aide d'une énumération 4D créée dans la Boîte à outils. +* "unitsList" : un tableau contenant les x éléments définissant les unités disponibles (ex : "cm", "pouces", "km", "miles", etc.). Utilisez cet attribut pour définir des unités dans l'objet. +* "unitsListReference" : une référence de liste 4D contenant les unités disponibles. Utilisez cet attribut pour définir des unités à l'aide d'une liste 4D créée avec la commande [New list](https://doc.4d.com/4Dv15/4D/15.6/New-list.301-3818474.en.html). +* "unitsListName" : un nom d'énumération 4D créée en mode Développement contenant les unités disponibles. Utilisez cet attribut pour définir des unités à l'aide d'une énumération 4D créée dans la Boîte à outils. Quel que soit son mode de définition, la liste d'unités peut être associée à l'attribut suivant : -* "unitReference" : une valeur simple contenant l'indice (de 1 à x) de l'élément sélectionné dans la liste de valeurs "unitList", "unitsListReference" ou "unitsListName". +* "unitReference" : une valeur simple contenant l'indice (de 1 à x) de l'élément sélectionné dans la liste de valeurs "unitList", "unitsListReference" ou "unitsListName". L'unité courante est affichée sous forme de bouton affichant successivement les valeurs de "unitList", "unitsListReference" ou "unitsListName" à chaque clic (par exemple "pixels" -> "lignes" -> "cm" -> "pixels" -> etc.) @@ -1222,7 +1102,7 @@ Exemple : Vous souhaitez définir une valeur de saisie numérique suivie d'une unité parmi deux possibles : "cm" ou "pixels". La valeur courante est "2" + "cm". Vous utilisez des valeurs définies directement dans l'objet (attribut "unitsList") : -```4d +````4d ARRAY TEXT($_units;0) APPEND TO ARRAY($_units;"cm") APPEND TO ARRAY($_units;"pixels") @@ -1231,7 +1111,7 @@ OB SET($ob;"valueType";"integer") OB SET($ob;"value";2) // 2 "units" OB SET($ob;"unitReference";1) //"cm" OB SET ARRAY($ob;"unitsList";$_units) -``` +```` ![](assets/fr/FormObjects/listbox_column_objectArray_unitList.png) @@ -1253,21 +1133,23 @@ OB SET($ob;"value";$entry) ![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + #### valueType color L'attribut "valueType" de valeur "color" vous permet d'afficher soit une couleur, soit un texte. -* Si la valeur est un nombre, un rectangle de couleur est dessiné à l'intérieur de la cellule. Exemple : - - ```4d +* Si la valeur est un nombre, un rectangle de couleur est dessiné à l'intérieur de la cellule. Exemple : + + ````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) + + +* Si la valeur est un texte, le texte est simplement affiché (par exemple : "value";"Automatic"). -* Si la valeur est un texte, le texte est simplement affiché (par exemple : "value";"Automatic"). #### valueType event @@ -1277,23 +1159,26 @@ Optionnellement, il est possible de passer un attribut "label". Exemple : -```4d +````4d C_OBJECT($ob) OB SET($ob;"valueType";"event") OB SET($ob;"label";"Edit...") -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_eventValueType.png) -### Gestion des événements +### Gestion des événements Plusieurs événements peuvent être gérés dans les colonnes de list box de type tableau d'objets. Voici une synthèse des événements spécifiques : -* **Sur données modifiées** : L'événement `On Data Change` est généré en cas de modification d'une valeur de la colonne, quel que soit le widget : - * zone de saisie de texte - * listes déroulante - * zone de combo box - * bouton d'unité (passage valeur x à valeur x+1) - * case à cocher (passage cochée/non cochée) -* **Sur clic** : Lorsque l'utilisateur clique sur un bouton installé à l'aide de l'attribut *valueType*, un événement `On Clicked` est généré. Cet événement doit être ensuite géré par le programmeur. -* **Sur clic alternatif** : Lorsque l'utilisateur clique sur un bouton d'ellipse (attribut "alternateButton"), un événement `On Alternative Click` est généré. Cet événement doit être ensuite géré par le programmeur. \ No newline at end of file +* **On Data Change**: An `On Data Change` event is triggered when any value has been modified either: + * zone de saisie de texte + * listes déroulante + * zone de combo box + * bouton d'unité (passage valeur x à valeur x+1) + * case à cocher (passage cochée/non cochée) +* **On Clicked**: When the user clicks on a button installed using the "event" *valueType* attribute, an `On Clicked` event will be generated. Cet événement doit être ensuite géré par le programmeur. +* **On Alternative Click**: When the user clicks on an ellipsis button ("alternateButton" attribute), an `On Alternative Click` event will be generated. Cet événement doit être ensuite géré par le programmeur. + + + diff --git a/website/translated_docs/fr/FormObjects/pictureButton_overview.md b/website/translated_docs/fr/FormObjects/pictureButton_overview.md index 478dcc83ac34a5..eb7c44d20b9d80 100644 --- a/website/translated_docs/fr/FormObjects/pictureButton_overview.md +++ b/website/translated_docs/fr/FormObjects/pictureButton_overview.md @@ -3,38 +3,36 @@ id: pictureButtonOverview title: Bouton image --- -## Aperçu - Un bouton image est similaire à un [bouton standard](button_overview.md). Cependant, contrairement à un bouton standard (qui accepte trois états : activé, désactivé et cliqué), un bouton image contient une image différente pour représenter chaque état. Les boutons image peuvent être utilisés de deux manières : -* Comme boutons de commande dans un formulaire. 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. - -| Propriété | Nom JSON | Valeur | -| -------------------------- | ---------------------- | ------ | -| 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 | +* Comme boutons de commande dans un formulaire. Dans ce cas, le bouton image comprend généralement quatre états différents : activé, désactivé, cliqué et survolé. + Par exemple, un tableau de miniatures qui comporte une ligne de quatre colonnes, chaque miniature correspond aux états Par défaut, Cliqué, Survol et Désactivé. + | Propriété | Nom JSON | Valeur | + | -------------------------- | ---------------------- | ------ | + | 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 | -* Comme bouton permettant à l’utilisateur de choisir entre plusieurs options. Dans ce cas, le bouton image peut être utilisé à la place d’un pop-up menu image. 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. Vous souhaitez permettre aux utilisateurs de votre application de choisir la langue qui sera utilisée dans les menus, les boîtes de dialogue, etc. Vous pouvez implémenter cette option à l’aide d’un bouton image, placé dans une boîte de dialogue personnalisée de Propriétés : +* Comme bouton permettant à l’utilisateur de choisir entre plusieurs options. Dans ce cas, le bouton image peut être utilisé à la place d’un pop-up menu image. Avec les [Pop-up menus image](picturePopupMenu_overview.md), tous les choix sont présentés simultanément (en tant que commandes du pop-up menu) ; avec un bouton image, les choix sont présentés consécutivement (à mesure que l’utilisateur clique sur le bouton). + Voici un exemple de bouton image. Vous souhaitez permettre aux utilisateurs de votre application de choisir la langue qui sera utilisée dans les menus, les boîtes de dialogue, etc. Vous pouvez implémenter cette option à l’aide d’un bouton image, placé dans une boîte de dialogue personnalisée de Propriétés : ![](assets/en/FormObjects/button_pictureButton.png) Chaque clic modifie l'état du bouton. + ## Utiliser des boutons images Un bouton image est créé de la manière suivante : 1. Tout d’abord, vous préparez une image, dans laquelle la série d’images est organisée en colonnes, en lignes, ou les deux. - - ![](assets/en/FormObjects/pictureButton_grid.png) + + ![](assets/en/FormObjects/pictureButton_grid.png) Vous pouvez organiser les images sous la forme de colonnes, de lignes ou de tableaux. Dans ce dernier cas, les images sont alors numérotées de gauche à droite, ligne par ligne, en débutant par 0. Par exemple, la deuxième image de la deuxième ligne d’un tableau de 2 lignes et de 3 colonnes a pour numéro 4. @@ -44,23 +42,22 @@ Vous pouvez organiser les images sous la forme de colonnes, de lignes ou de tabl 4. Spécifiez quand les images changent en sélectionnant les propriétés d'[animation](properties_Animation.md) appropriées. + ## Animation Outre les paramètres de positionnement et d'apparence standard, vous pouvez définir certaines propriétés spécifiques pour les boutons image, en particulier la manière et le moment où les images sont affichées. Ces options de propriétés peuvent être combinées pour améliorer vos boutons d'image. -- 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. La séquence d’images s’arrête lorsqu’on atteint la dernière image de la série. En d’autres termes, le bouton ne retourne pas à la première image de la série. +- Par défaut ([aucune option cochée](properties_Animation.md)), affiche l’image suivante de la série lorsque l’utilisateur clique sur le bouton; affiche l’image précédente de la série lorsque l’utilisateur effectue **Majuscule**+clic sur le bouton. La séquence d’images s’arrête lorsqu’on atteint la dernière image de la série. En d’autres termes, le bouton ne retourne pas à la première image de la série. Les autres modes disponibles sont les suivants : - - [Recommencer la séquence](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) - [Défilement continu sur clic](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) - +- [Dernière imagette si désactivé](properties_Animation.md#use-last-frame-as-disabled) > La [variable associée](properties_Object.md#variable-or-expression) à un bouton image retourne le numéro d’indice, dans le tableau d’imagettes, de l’image actuellement affichée. La numérotation des images dans le tableau débute à 0. ## Propriétés prises en charge -[Bold](properties_Text.md#bold) - [ Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Style de bouton](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Colonnes](properties_Crop.md#columns) - [Déposable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Recommencer la séquence](properties_Animation.md#loopBackToFirstFrame) - [Nom](properties_Object.md#object-name) - [Chemin d'accès de l'image](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Lignes](properties_Crop.md#rows) - [Raccouric](properties_Entry.md#shortcut) - [Action standard ](properties_Action.md#standard-action) - [Retour sur relâchement du clic](properties_Animation.md#switchBackWhenReleased) - [Défilement continu sur clic](properties_Animation.md#switch-continuously-on-clicks) - [Défilement tous les n ticks](properties_Animation.md#switch-every-x-ticks) - [Titre](properties_Object.md#title) - [Recommencer la séquence](properties_Animation.md#switchWhenRollOver) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dernière imagette si désactivé](properties_Animation.md#use-last-frame-as-disabled) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bold](properties_Text.md#bold) - [ Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Style de bouton](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Colonnes](properties_Crop.md#columns) - [Déposable](properties_Action.md#droppable) - [Focusable](properties_Entry.md#focusable) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Recommencer la séquence](properties_Animation.md#loopBackToFirstFrame) - [Nom](properties_Object.md#object-name) - [Chemin d'accès de l'image](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Lignes](properties_Crop.md#rows) - [Raccouric](properties_Entry.md#shortcut) - [Action standard ](properties_Action.md#standard-action) - [Retour sur relâchement du clic](properties_Animation.md#switchBackWhenReleased) - [Défilement continu sur clic](properties_Animation.md#switch-continuously-on-clicks) - [Défilement tous les n ticks](properties_Animation.md#switch-every-x-ticks) - [Titre](properties_Object.md#title) - [Recommencer la séquence](properties_Animation.md#switchWhenRollOver) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dernière imagette si désactivé](properties_Animation.md#use-last-frame-as-disabled) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/fr/FormObjects/picturePopupMenu_overview.md b/website/translated_docs/fr/FormObjects/picturePopupMenu_overview.md index 314bb4eda54f60..103699d582193b 100644 --- a/website/translated_docs/fr/FormObjects/picturePopupMenu_overview.md +++ b/website/translated_docs/fr/FormObjects/picturePopupMenu_overview.md @@ -3,10 +3,9 @@ id: picturePopupMenuOverview title: Pop-up menu image --- -## Aperçu - Un pop-up menu image affiche un tableau d’images bidimensionnel. Un pop-up menu image peut être utilisé à la place d’un [bouton image](pictureButton_overview.md). Le mode de création d’une image destinée à être utilisée dans un pop-up menu image est identique à celui d’un bouton image. Le mode de fonctionnement de l’objet, quant à lui, s’apparente à la [Grille de boutons](buttonGrid_overview.md), à la différence près que l’image est utilisée comme un pop-up menu et non comme un objet du formulaire. + ## Utiliser des pop-up menus images Pour créer un pop-up menu image, vous devez [faire référence à une image](properties_Picture.md#pathname) conçue dans ce but. L’exemple suivant vous permet de sélectionner la langue d’interface de l’application à l’aide d’un pop-up menu image. Chaque langue est symbolisée par un drapeau : @@ -17,12 +16,15 @@ Pour créer un pop-up menu image, vous devez [faire référence à une image](pr Vous pouvez gérer les pop-up menus image par l’intermédiaire de méthodes. A l’instar des [grilles de boutons](buttonGrid_overview.md), les variables associées au pop-up menu image prennent pour valeur le numéro de l’élément sélectionné et zéro (0) si aucun élément n’est sélectionné. Les éléments sont numérotés de gauche à droite et de haut en bas, à compter de l’élément situé en haut à gauche. + ### Aller à page Vous pouvez associer l’[action standard](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) `Aller à page` à un objet de type pop-up menu image. Lorsque cette action est activée, 4D affiche automatiquement la page du formulaire correspondant à la position de l'image sélectionnée dans le tableau d'images. Les éléments sont numérotés de gauche à droite et de haut en bas, à compter de l’élément situé en haut à gauche. Par exemple, si l’utilisateur clique sur le 3e élément, 4D affichera la page 3 du formulaire courant (si elle existe). Si vous souhaitez gérer vous-même l’effet du clic, conservez l’option par défaut `Pas d’action`. -## Propriétés prises en charge -[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 + + +## Propriétés prises en charge +[Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Classe](properties_Object.md#css-class) - [Colonnes](properties_Crop.md#columns) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Chemin d'accès](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Lignes](properties_Crop.md#rows) - [Action standard](properties_Action.md#standard-action) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/pluginArea_overview.md b/website/translated_docs/fr/FormObjects/pluginArea_overview.md index 39bb19ef42a5ff..80fa9e4f798d15 100644 --- a/website/translated_docs/fr/FormObjects/pluginArea_overview.md +++ b/website/translated_docs/fr/FormObjects/pluginArea_overview.md @@ -3,11 +3,10 @@ id: pluginAreaOverview title: Zone de plug-in --- -## Aperçu Une zone de plug-in est une zone du formulaire contrôlée par un plug-in. La capacité d’intégrer des plug-ins dans les formulaires permet d’accéder à des possibilités illimitées lorsque vous créez des applications personnalisées. Une zone de plug-in peut réaliser une tâche simple comme l’affichage d’une horloge numérique dans un formulaire, ou plus complexe comme proposer un environnement de traitement de textes, un tableur ou un éditeur graphique. -Lorsque vous ouvrez une base de données, 4D crée une liste interne des plug-ins [installés dans la base](#installing-plug-ins). Une fois que vous avez inséré une Zone de plug-in dans un formulaire, vous pouvez sélectionner le plug-in à lui affecter via la liste "Type" dans la fenêtre de propriétés de l’objet : +Lorsque vous ouvrez une application, 4D crée une liste interne des plug-ins [installés dans votre application](#installing-plug-ins). Une fois que vous avez inséré une Zone de plug-in dans un formulaire, vous pouvez sélectionner le plug-in à lui affecter via la liste **Type** dans la fenêtre de propriétés de l’objet : ![](assets/en/FormObjects/pluginArea.png) @@ -15,18 +14,21 @@ Lorsque vous ouvrez une base de données, 4D crée une liste interne des plug-in Si vous dessinez une zone de plug-in trop petite, 4D l’affiche sous forme de bouton dont le libellé est le nom de la variable associée à la zone. En exécution, l’utilisateur peut cliquer sur ce bouton afin d’ouvrir une fenêtre spécifique affichant le plug-in. -### Propriétés avancées -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. +## Propriétés avancées + +Si les options avancées sont fournies par l'auteur du plug-in, un thème **Plug-in** contenant un bouton [**Propriétés avancées**](properties_Plugins.md) peut être activé dans la liste des propriétés. Dans ce cas, vous pouvez cliquer sur ce bouton pour définir ces options, généralement via une boîte de dialogue personnalisée. + ## Installer un plug-in Pour ajouter un plug-in dans votre environnement 4D, vous devez dans un premier temps quitter votre application 4D. Le chargement des plug-ins s’effectue au lancement de l’application 4D. Pour plus d’informations sur l’installation d’un plug-in, reportez-vous à la section [Installer des plugins ou des composants](https://doc.4d.com/4Dv17R6/4D/17-R6/Installing-plugins-or-components.300-4354866.en.html). + ## Créer des plug-ins Si vous souhaitez concevoir vos propres plug-ins, vous pouvez obtenir des informations détaillées sur l'écriture et la création de plug-ins. 4D fournit un [kit complet (sur github)](https://github.com/4d/4D-Plugin-SDK) pour vous aider à écrire des plug-ins personnalisés. -## Propriétés prises en charge -[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Propriétés avancées](properties_Plugins.md) - [Class](properties_Object.md#css-class) - [Glissable](properties_Action.md#draggable-and-droppable) - [Déposable](properties_Action.md#draggable-and-droppable) - [Type d'expression](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Méthode](properties_Action.md#method) - [Nom](properties_Object.md#object-name) - [Type de Plug-in](properties_Object.md#plug-in-kind) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilté](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +## Propriétés prises en charge +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Propriétés avancées](properties_Plugins.md) - [Class](properties_Object.md#css-class) - [Glissable](properties_Action.md#draggable-and-droppable) - [Déposable](properties_Action.md#draggable-and-droppable) - [Type d'expression](properties_Object.md#expression-type) - [Focusable](properties_Entry.md#focusable) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Méthode](properties_Action.md#method) - [Nom](properties_Object.md#object-name) - [Type de Plug-in](properties_Object.md#plug-in-kind) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilté](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/progressIndicator.md b/website/translated_docs/fr/FormObjects/progressIndicator.md index ccf86151d69028..7bed028b1650cf 100644 --- a/website/translated_docs/fr/FormObjects/progressIndicator.md +++ b/website/translated_docs/fr/FormObjects/progressIndicator.md @@ -3,20 +3,19 @@ id: progressIndicator title: Indicateurs de progression --- -## Aperçu Un indicateur de progression (également appelé "thermomètre") est conçu pour afficher ou définir graphiquement des valeurs numériques ou date/heure. ![](assets/en/FormObjects/progress1.png) -### Utiliser des indicateurs +## Utiliser des indicateurs Vous pouvez utiliser les jauges pour afficher ou définir des valeurs. Par exemple, si un indicateur de progression se voit affecter une valeur par une méthode, il affiche la valeur. Si l’utilisateur modifie manuellement la valeur indiquée par la jauge, la valeur contenue par l’objet est modifiée. Cette valeur peut être utilisée pour un autre objet tel qu’un champ, un objet saisissable ou un objet non saisissable. La variable associée à l'indicateur contrôle l’affichage. Vous pouvez y placer des valeurs ou utiliser les valeurs qu’il stocke à l’aide des méthodes. Par exemple, la méthode suivante peut être utilisée pour contrôler un thermomètre : ```4d - $vTherm:=[Employés]Salaire + vTherm:=[Employees]Salary ``` Cette méthode affecte à la variable vTherm la valeur du champ Salaire. Cette méthode est associée au champ Salaire. @@ -24,11 +23,12 @@ Cette méthode affecte à la variable vTherm la valeur du champ Salaire. Cette m Réciproquement, vous pouvez utiliser un indicateur pour contrôler la valeur d’un champ. L’utilisateur se sert alors de l'indicateur pour saisir la valeur du champ. Dans ce cas la méthode devient : ```4d - [Employeés]Salaire:=$vTherm + [Employees]Salary:=vTherm ``` La méthode affecte la valeur de l'indicateur au champ Salaire. Lorsque l’utilisateur modifie la valeur affichée par l'indicateur, la valeur du champ Salaire est modifiée. + ## Le thermomètre par défaut ![](assets/en/FormObjects/indicator_progressBar.png) @@ -40,15 +40,14 @@ Vous pouvez afficher une barre de progression horizontale ou verticale. Ce param Plusieurs options graphiques sont disponibles : valeurs minimales/maximales, graduations, paliers. ### Propriétés prises en charge +[Barber shop](properties_Scale.md#barber-shop) - [Gras](properties_Text.md#bold) - [Style de bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Classe](properties_Object.md#css-class) - [Afficher graduation](properties_Scale.md#display-graduation) - [Saisissable](properties_Entry.md#enterable) - [Exécuter méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "integer", "number", "date", ou "time") - [Police](properties_Text.md#font) - [Couleur de police](properties_Text.md#font-color) - [Taille de police](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Italique](properties_Text.md#italic) - [Unité de graduation](properties_Scale.md#graduation-step) -[Message d'aide](properties_Help.md#help-tip) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Emplacement étiquette](properties_Scale.md#label-location) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Format numérique](properties_Display.md#number-format) - [Nom objet](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Step](properties_Scale.md#step) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Variable ou Expression](properties_Object.md#variable-or-expression) - [Dimensionnement Vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) -[Barber shop](properties_Scale.md#barber-shop) - [Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Afficher graduation](properties_Scale.md#display-graduation) - [Saisissable](properties_Entry.md#enterable) - [Exécuter méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "entier", "numérique", "date", ou "heure") - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Unité de graduation](properties_Scale.md#graduation-step) -[Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Emplacement du libellé](properties_Scale.md#label-location) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Format numérique](properties_Display.md#number-format) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Pas](properties_Scale.md#step) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) ## Barber shop ![](assets/en/FormObjects/indicator.gif) -**Barber shop** is a variant of the default thermometer. Pour active cette variante, vous devez définir la propriété du [Barber shop](properties_Scale.md#barber-shop). - +**Le barber shop** est une variante du thermomètre par défaut. Pour active cette variante, vous devez définir la propriété du [Barber shop](properties_Scale.md#barber-shop). > En code JSON, supprimez simplement la propriété "max" de l'objet thermomètre par défaut pour activer le barber shop. Le barber shop affiche une animation continue, telle que le [spinner](spinner.md). Les thermomètres “Barber shop†sont généralement utilisés pour indiquer à l’utilisateur que le programme est en train d’effectuer une opération longue. Lorsque le thermomètre est sélectionné, le thème ["Graduations"](properties_Scale.md) de la liste des propriétés est masqué. @@ -58,11 +57,11 @@ A l’exécution du formulaire, l'objet n’est pas animé. Vous devez gérer l * 1 (ou toute valeur différente de 0) = Démarrer l’animation, * 0 = Stopper l’animation. -### Propriétés prises en charge -[Barber shop](properties_Scale.md#barber-shop) - [Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Saisissable](properties_Entry.md#enterable) - [Exécuter méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "entier", "numérique", "date", ou "heure") - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) -[Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) +### Propriétés prises en charge +[Barber shop](properties_Scale.md#barber-shop) - [Gras](properties_Text.md#bold) - [Style de bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Classe](properties_Object.md#css-class) - [Saisissable](properties_Entry.md#enterable) - [Executer méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "integer", "number", "date", ou "time") - [Police](properties_Text.md#font) - [Couleur de police](properties_Text.md#font-color) - [Taille de police](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom d'objet](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Variable ou Expression](properties_Object.md#variable-or-expression) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) -## See also -- [règle](ruler.md) +## Voir également +- [règle](ruler.md) - [stepper](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_Action.md b/website/translated_docs/fr/FormObjects/properties_Action.md index 0d01d585661a0c..1334400a596c5f 100644 --- a/website/translated_docs/fr/FormObjects/properties_Action.md +++ b/website/translated_docs/fr/FormObjects/properties_Action.md @@ -4,71 +4,83 @@ title: Action --- -* * * - +--- ## Glissable -Control whether and how the user can drag the object. By default, no drag operation is allowed. +Contrôlez si l'utilisateur peut faire glisser l'objet et comment il peut le faire. Par défaut, aucune opération de glisser n'est autorisée. Deux modes de glisser-déposer sont proposés dans 4D : -- **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. +- Un mode **personnalisé**, dans lequel le glisser déclenche l'événement formulaire `Sur début glisser` dans le contexte de l'objet. Vous gérez ensuite le glisser à l'aide d'une méthode. + En mode personnalisé, le glisser-déposer est géré par le programmeur. Ce mode vous permet de mettre en place des interfaces basées sur le glisser-déposer, y compris des interfaces qui ne déplacent pas nécessairement des données mais qui peuvent effectuer tout type d'action, telle que l'ouverture de fichiers ou le lancement d'un calcul. Ce mode est basé sur un ensemble de propriétés, d'événements et de commandes spécifiques à partir du thème `Conteneur de données`. +- Un mode **automatique**, dans lequel 4D **copie** du texte ou des images directement à partir de l'objet formulaire. Il peut alors être utilisé dans la même zone 4D, entre deux zones 4D, ou entre 4D et une autre application. Par exemple, le glisser-déposer automatique vous permet de copier une valeur entre deux champs, sans programmation : + ![](assets/en/FormObjects/property_automaticDragDrop.png) + ![](assets/en/FormObjects/property_automaticDragDrop2.png) Dans ce mode, l'événement de formulaire `Sur début glisser` n'est PAS généré. Si vous souhaitez "forcer" l'utilisation du glissement personnalisé alors que le glissement automatique est activé, maintenez la touche **Alt** (Windows) ou **Option** (macOS) enfoncée pendant l'action. Cette option n'est pas disponible pour les images. -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. +Pour plus d'informations, reportez-vous à [Glisser-déposer](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.en.html) dans le manuel *Langage 4D*. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------- | --------------- | ------------------------------------------------------------ | -| dragging | Texte | "none" (default), "custom", "automatic" (excluding list box) | +| Nom | Type de données | Valeurs possibles | +| -------- | --------------- | ---------------------------------------------------------- | +| dragging | Texte | "none" (par défaut), "custom", "automatic" (hors list box) | #### Objets pris en charge [Zones 4D Write Pro](writeProArea_overview.md) - [Zone de saisie](input_overview.md) - [Liste hiérarchique](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Zone de plug-in](pluginArea_overview.md#overview) -#### Voir également + + +#### Voir également [Déposable](#droppable) -* * * +--- ## Déposable -Control whether and how the object can be the destination of a drag and drop operation. +Contrôlez si et comment l'objet peut être la destination d'une opération de glisser-déposer. Deux modes de glisser-déposer sont proposés dans 4D : -- **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. +- Un mode **personnalisé**, dans lequel le déposer déclenche les événements formulaire `Sur glisser` et `Sur déposer` dans le contexte de l'objet. Vous gérez ensuite le déposer à l'aide d'une méthode. + En mode personnalisé, le glisser-déposer est géré par le programmeur. Ce mode vous permet de mettre en place des interfaces basées sur le glisser-déposer, y compris des interfaces qui ne déplacent pas nécessairement des données mais qui peuvent effectuer tout type d'action, telle que l'ouverture de fichiers ou le lancement d'un calcul. Ce mode est basé sur un ensemble de propriétés, d'événements et de commandes spécifiques à partir du thème `Conteneur de données`. +- Un mode **automatique**, dans lequel 4D gère automatiquement — si possible — l’insertion des données glissées de type texte ou image et déposées sur l’objet (les données sont collées dans l’objet). Les événements `Sur glisser` et `Sur déposer` ne sont pas générés. En revanche, les événements `Sur après modification` (lors du déposer) et `Sur données modifiées` (lorsque l'objet perd le focus) sont générés. -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. +Pour plus d'informations, reportez-vous à [Glisser-déposer](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.en.html) dans le manuel *Langage 4D*. -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------- | --------------- | ------------------------------------------------------------ | -| dropping | Texte | "none" (default), "custom", "automatic" (excluding list box) | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| -------- | --------------- | ---------------------------------------------------------- | +| dropping | Texte | "none" (par défaut), "custom", "automatic" (hors list box) | #### Objets pris en charge -[Zones 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Zone de saisie](input_overview.md) - [Liste hiérarchique](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Zone de plug-in](pluginArea_overview.md#overview)

        +[Zones 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Zone de saisie](input_overview.md) - [Liste hiérarchique](list_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Zone de plug-in](pluginArea_overview.md#overview) + +

        + -#### See also + + +#### Voir également [Glissable](#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. + +--- + + +## Exécuter méthode objet + +Lorsque cette option est activée, la méthode objet est exécutée avec l'événement `Sur données modifiées` *au même moment* où l'utilisateur change la valeur de l'indicateur. Lorsque l'option est désactivée, la méthode est exécutée *après* la modification. + + #### Grammaire JSON @@ -77,64 +89,99 @@ When this option is enabled, the object method is executed with the `On Data Cha | continuousExecution | boolean | true, false | + + #### Objets pris en charge -[Progress bar](progressIndicator.md) - [Ruler](ruler.md) - [Stepper](stepper.md) +[Indicateur de progression](progressIndicator.md) - [Règle](ruler.md) - [Stepper](stepper.md) + + + + + + + + +--- -* * * ## Méthode -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. +Référence d'une méthode attachée à l'objet. Les méthodes d'objet "gèrent" généralement l'objet pendant que le formulaire est affiché ou imprimé. Vous n'appelez pas de méthode objet - 4D l'appelle automatiquement lorsqu'un événement implique l'objet auquel la méthode objet est rattachée. + +Plusieurs types de références de méthode sont pris en charge : -Several types of method references are supported: +- un chemin de fichier de méthode objet standard, c'est-à-dire qui utilise le modèle suivant : + `ObjectMethods/objectName.4dm` + ... où `objectName` est le [nom de l'objet](properties_Object.md#object-name). Ce type de référence indique que le fichier de méthode se trouve à l'emplacement par défaut ("sources/forms/*formName*/ObjectMethods/"). Dans ce cas, 4D gère automatiquement la méthode objet lorsque des opérations sont exécutées sur l'objet formulaire (renommage, duplication, copier/coller, etc.) + +- un nom de méthode projet : nom d'une méthode projet existante sans extension de fichier, c'est-à-dire : `maMéthode` Dans ce cas, 4D ne prend pas en charge automatiquement les opérations objet. + +- un chemin d'accès du fichier de méthode personnalisé comprenant l'extension .4dm, par exemple : + `../../CustomMethods/myMethod.4dm` Vous pouvez également utiliser un filesystem : + `/RESOURCES/Buttons/bOK.4dm` Dans ce cas, 4D ne prend pas en charge automatiquement les opérations sur les objets. -- 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...) -- 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. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------ | --------------- | ------------------------------------------------------------------ | -| method | Texte | Object method standard or custom file path, or project method name | +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | ------------------------------------------------------------------------------------------ | +| method | Texte | Chemin de fichier standard ou personnalisé de la méthode objet ou nom de la méthode projet | + + + #### Objets pris en charge -[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) - [Forms](forms.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) +[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) - [Forms](FormEditor/forms.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) + + + + + + +--- -* * * ## Lignes déplaçables -`Array type list boxes` +`List box de type tableau` + +Autorise le déplacement des lignes pendant l'exécution. Cette option est sélectionnée par défaut. Il n'est pas disponible pour les [list box de type sélection](listbox_overview.md#selection-list-boxes) ni pour les [list box en mode hiérarchique](properties_Hierarchy.md#hierarchical-list-box). + -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). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ----------- | --------------- | ----------------- | -| movableRows | booléen | true, false | +| movableRows | boolean | true, false | + + #### Objets pris en charge [List Box](listbox_overview.md#overview) -* * * + + + + + + +--- + ## Multi-sélectionnable Allows the selection of multiple records/options in a [hierarchical list](list_overview.md). + + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | @@ -142,48 +189,75 @@ Allows the selection of multiple records/options in a [hierarchical list](list_o | selectionMode | Texte | "multiple", "single", "none" | + + #### Objets pris en charge [Liste hiérarchique](list_overview.md) -* * * + + + + + +--- + ## Triable -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. +Permet de trier les données de colonne en cliquant sur un en-tête de [Listbox](listbox_overview.md). Cette option est sélectionnée par défaut. Les tableaux de types d'image (colonnes) ne peuvent pas être triés à l'aide de cette fonction. + +Dans les list box basées sur une sélection d'enregistrements, la fonction de tri standard est disponible uniquement : + +* Lorsque la source de données est *Sélection courante*, +* Avec des colonnes associées à des champs (de type Alpha, Numérique, Date, Heure ou Booléen). + +Dans d'autres cas (list box basées sur des sélections nommées, colonnes associées à des expressions), la fonction de tri standard n'est pas disponible. Un tri de list box standard modifie l'ordre de la sélection courante dans la base de données. Cependant, les enregistrements en surbrillance et l'enregistrement courant ne sont pas modifiés. Un tri standard synchronise toutes les colonnes de la list box, y compris les colonnes calculées. -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. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | -------- | --------------- | ----------------- | -| sortable | booléen | true, false | +| sortable | boolean | true, false | + + #### Objets pris en charge [List Box](listbox_overview.md) -* * * + + + + + + + +--- + ## Action standard -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*. +Activités typiques à réaliser par les objets actifs (par exemple, permettre à l'utilisateur d'accepter, d'annuler ou de supprimer des enregistrements, de se déplacer entre les enregistrements ou de page en page dans un formulaire multi-pages, etc.) ont été prédéfinies par 4D comme actions standard. Elles sont décrites en détail dans la section [Actions standard](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) du *manuel de développement*. + +Vous pouvez associer à la fois une action standard et la méthode projet d'un objet. Dans ce cas, l'action standard est généralement exécutée après la méthode et 4D utilise cette action pour activer/désactiver l'objet en fonction du contexte courant. Lorsqu’un objet est désactivé, la méthode projet associée ne peut être exécutée. + +Vous pouvez également définir cette propriété à l'aide de la commande `OBJECT SET ACTION`. -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. -You can also set this property using the `OBJECT SET ACTION` command. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------ | --------------- | ---------------------------------------------------------------------------------------------------------------- | -| action | string | The name of a [valid standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). | +| action | string | Le nom d'une [action standard valide](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). | + + #### Objets pris en charge -[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 +[Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [List Box](listbox_overview.md) - [Bouton image](pictureButton_overview.md) - [Pop-up Menu image](picturePopupMenu_overview.md) - [Onglet](tabControl.md) diff --git a/website/translated_docs/fr/FormObjects/properties_Animation.md b/website/translated_docs/fr/FormObjects/properties_Animation.md index c93e728633e484..70de95a91eb0f0 100644 --- a/website/translated_docs/fr/FormObjects/properties_Animation.md +++ b/website/translated_docs/fr/FormObjects/properties_Animation.md @@ -3,104 +3,120 @@ id: propertiesAnimation title: Animation --- -* * * - +--- ## Recommencer la séquence -Pictures are displayed in a continuous loop. When the user reaches the last picture and clicks again, the first picture appears, and so forth. +Les images sont affichées en boucle continue. Lorsque l'utilisateur atteint la dernière image et clique à nouveau, la première image apparaît, et ainsi de suite. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | -------------------- | --------------- | ----------------- | -| loopBackToFirstFrame | booléen | true, false | - +| loopBackToFirstFrame | boolean | true, false | #### Objets pris en charge [Bouton image](pictureButton_overview.md) -* * * + +--- ## Retour sur relâchement du clic -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. +Affiche la première image en permanence, sauf lorsque l'utilisateur clique sur le bouton. Affiche la deuxième image jusqu'à ce que le bouton de la souris soit relâché. Ce mode vous permet de créer un bouton d'action avec une image différente pour chaque état (inactif et cliqué). Vous pouvez utiliser ce mode pour créer un effet 3D ou afficher n'importe quelle image illustrant l'action du bouton. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------------------- | --------------- | ----------------- | -| switchBackWhenReleased | booléen | true, false | - +| switchBackWhenReleased | boolean | true, false | #### Objets pris en charge [Bouton image](pictureButton_overview.md) -* * * + + + +--- ## Défilement continu sur clic -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. +Permet à l'utilisateur de maintenir le bouton de la souris enfoncé pour afficher les images en continu (c'est-à-dire sous forme d'animation). Lorsque l'utilisateur atteint la dernière image, l'objet ne revient pas à la première image. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------------ | --------------- | ----------------- | -| switchContinuously | booléen | true, false | - +| switchContinuously | boolean | true, false | #### Objets pris en charge [Bouton image](pictureButton_overview.md) -* * * + + +--- ## Défilement tous les n ticks -Enables cycling through the contents of the picture button at the specified speed (in ticks). In this mode, all other options are ignored. +Permet de parcourir le contenu du bouton d'image à la vitesse spécifiée (en graduations). Dans ce mode, toutes les autres options sont ignorées. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------- | --------------- | ----------------- | -| frameDelay | entier | minimum : 0 | - +| frameDelay | integer | minimum : 0 | #### Objets pris en charge [Bouton image](pictureButton_overview.md) -* * * + + + +--- ## Bascule sur passage du curseur -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. +Modifie le contenu du bouton image lorsque le curseur de la souris passe dessus. L'image initiale s'affiche lorsque le curseur quitte la zone du bouton. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------------ | --------------- | ----------------- | -| switchWhenRollover | booléen | true, false | - +| switchWhenRollover | boolean | true, false | #### Objets pris en charge [Bouton image](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. + + + +--- +## Dernière imagette si désactivé + +Permet de définir la dernière vignette comme étant celle à afficher lorsque le bouton est désactivé. La vignette utilisée lorsque le bouton est désactivé est traitée séparément par 4D : lorsque vous combinez cette option avec "Basculer en continu" et "Revenir en boucle à la première image", la dernière image est exclue de la séquence associée au bouton et n'apparaît que lorsqu'elle est désactivée. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | |:---------------------- | --------------- | ----------------- | -| useLastFrameAsDisabled | booléen | true, false | +| useLastFrameAsDisabled | boolean | true, false | #### Objets pris en charge -[Bouton image](pictureButton_overview.md) \ No newline at end of file +[Bouton image](pictureButton_overview.md) + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Appearance.md b/website/translated_docs/fr/FormObjects/properties_Appearance.md index 639c6c37a457b7..217b36a33b963f 100644 --- a/website/translated_docs/fr/FormObjects/properties_Appearance.md +++ b/website/translated_docs/fr/FormObjects/properties_Appearance.md @@ -3,40 +3,42 @@ id: propertiesAppearance title: Apparence --- -* * * - -## Default Button +--- +## Bouton par défaut -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. +La propriété de bouton par défaut désigne le bouton qui obtient le focus initial à l'exécution lorsqu'aucun bouton du formulaire ne possède la propriété [Focusable](properties_Entry.md#focusable). -There can only be one default button per form page. +Il ne peut y avoir qu'un seul bouton par défaut par page de formulaire. -In addition, on macOS, the default button property modifies the button's appearance in order to indicate a "recommended choice" to the user. The default button can be different from the focused button. Default buttons have a specific blue appearance on macOS: +De plus, sous macOS, la propriété du bouton par défaut modifie l'apparence du bouton afin d'indiquer un «choix recommandé» à l'utilisateur. Le bouton par défaut peut être différent du bouton sélectionné. Les boutons par défaut ont une apparence bleue spécifique sur macOS : ![](assets/en/FormObjects/property_defaultButtonmacOS.en.png) -> Button must have a standard height to get the default button appearance. +> Le bouton doit avoir une hauteur standard pour obtenir l'apparence du bouton par défaut. -On Windows, the concept of "recommended choice" is not supported: only the focused button has a different appearance at runtime. However, in the 4D form editor, the default button is represented with a blue outline: +Sous Windows, le concept de "choix recommandé" n'est pas pris en charge: seul le bouton focalisé a une apparence différente à l'exécution. Cependant, dans l'éditeur de formulaires 4D, le bouton par défaut est représenté par un contour bleu : ![](assets/en/FormObjects/property_defaultButtonWindows.en.png) + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - defaultButton|boolean|true, false | + defaultButton|booléen|true, false | #### Objets pris en charge -[Regular Button](button_overview.md#regular) - [Flat Button](button_overview.md#regular) +[Bouton](button_overview.md#regular) - [Bouton plat](button_overview.md#regular) + -* * * + +--- ## Cacher rectangle de focus -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. +A l'exécution, un champ ou toute zone saisissable est délimité par un rectangle de sélection lorsqu'il a le focus (via la touche Tab ou un simple clic). Vous pouvez masquer ce rectangle en activant cette propriété. Masquer le rectangle de focus peut être utile dans le cas d'interfaces spécifiques. #### Grammaire JSON @@ -44,22 +46,22 @@ During execution, a field or any enterable area is outlined by a selection recta | ------------- | --------------- | ----------------- | | hideFocusRing | boolean | true, false | - #### Objets pris en charge -[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) +[Zones 4D Write Pro](writeProArea_overview.md) - [Liste hiérarchique](list_overview.md) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md) - [Sous-formulaire](subform_overview.md) + -* * * +--- ## Cacher surlignage sélection +`List boxes de type sélection` -`Selection type list boxes` +Cette propriété est utilisée pour désactiver la mise en évidence de la sélection dans les list box. -This property is used to disable the selection highlight in list boxes. +Lorsque cette option est activée, la surbrillance de la sélection n'est plus visible pour les sélections effectuées dans les list box. Les sélections elles-mêmes sont toujours valides et fonctionnent exactement de la même manière que précédemment; cependant, ils ne sont plus représentés graphiquement à l'écran et vous devrez [définir leur apparence par programmation](listbox_overview.md#customizing-appearance-of-selected-rows). -When this option is enabled, the selection highlight is no longer visible for selections made in list boxes. Selections themselves are still valid and work in exactly the same way as previously; however, they are no longer represented graphically onscreen, and you will need to [define their appearance programmatically](listbox_overview.md#customizing-appearance-of-selected-rows). +Par défaut, cette option n'est pas activée. -By default, this option is not enabled. #### Grammaire JSON @@ -67,27 +69,29 @@ By default, this option is not enabled. | ------------------- | --------------- | ----------------- | | hideSystemHighlight | boolean | true, false | - #### Objets pris en charge [List Box](listbox_overview.md) -* * * + + +--- ## Barre de défilement horizontale -An interface tool allowing the user to move the viewing area to the left or right. +Un outil d'interface permettant à l'utilisateur de déplacer la zone de visualisation vers la gauche ou la droite. + +Valeurs disponibles : -Available values: +| Liste de propriétés | Valeur JSON | Description | +| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Oui | "visible" | La barre de défilement est toujours visible, même lorsqu'elle n'est pas nécessaire (en d'autres termes, lorsque la taille du contenu de l'objet est inférieure à celle du cadre). | +| Non | "hidden" | La barre de défilement n'est jamais visible | +| Automatique | "automatic" | La barre de défilement apparaît automatiquement chaque fois que nécessaire et l'utilisateur peut saisir du texte plus grand que la largeur de l'objet | -| Liste de propriétés | Valeur JSON | Description | -| ------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Oui | "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). | -| Non | "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 | +> Les objets image peuvent avoir des barres de défilement lorsque le format d'affichage de l'image est défini sur "Tronqué (non centré)" -> Picture objects can have scrollbars when the display format of the picture is set to “Truncated (non-centered).†#### Grammaire JSON @@ -95,272 +99,283 @@ Available values: | ------------------- | --------------- | -------------------------------- | | scrollbarHorizontal | Texte | "visible", "hidden", "automatic" | - #### Objets pris en charge -[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) +[Liste hiérarchique](list_overview.md#overview) - [Sous-formulaire](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Zone de saisie](input_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) #### Voir également - [Barre de défilement verticale](#vertical-scroll-bar) -* * * - +--- ## Resolution -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. +Définit la résolution d'écran pour le contenu de la zone 4D Write Pro. Par défaut, elle est définie sur 72 dpi (macOS), qui est la résolution standard des formulaires 4D sur toutes les plateformes. La définition de cette propriété sur 96 dpi définira un rendu Windows/Web sur les plateformes macOS et Windows. La définition de cette propriété sur **automatique** signifie que le rendu du document sera différent entre les plates-formes macOS et Windows. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - dpi|number|0=automatic, 72, 96 | + dpi|number|0=automatic, 72, 96 | #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * -## Show background -Displays/hides both background images and background color. +--- +## Afficher l'arrière-plan + +Affiche/masque les images d'arrière-plan et la couleur d'arrière-plan. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showBackground|boolean|true (default), false| + showBackground|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * +--- +## Afficher les pieds de page -## Show footers +Affiche/masque les pieds de page lorsque le [mode d'affichage de la page](#view-mode) est défini sur "Page". -Displays/hides the footers when [Page view mode](#view-mode) is set to "Page". #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showFooters|boolean|true (default), false| + showFooters|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) + -* * * +--- +## Afficher la barre de formule -## Show Formula Bar +Lorsqu'elle est activée, la barre de formule est visible sous l'interface de la barre d'outils dans la zone 4D View Pro. Si elle n'est pas sélectionnée, la barre de formule est masquée. -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. +> Cette propriété est disponible uniquement pour l'interface de la [barre d'outils](#user-interface). -> This property is available only for the [Toolbar](#user-interface) interface. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - withFormulaBar|boolean|true (default), false| + withFormulaBar|booléen|true (par défaut), false| #### Objets pris en charge -[4D View Pro area](viewProArea_overview.md) - -* * * +[Zone 4D View Pro](viewProArea_overview.md) +--- ## Montrer les entêtes -Displays/hides the headers when [Page view mode](#view-mode) is set to "Page". +Affiche/masque les en-têtes de la page lorsque le [mode d'affichage de la page](#view-mode) est défini sur "Page". + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showHeaders|boolean|true (default), false| + showHeaders|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) + -* * * +--- ## Montrer les caractères cachés Affiche/masque les caractères visibles + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showHiddenChars|boolean|true (default), false| + showHiddenChars|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * +--- ## Montrer la règle horizontale -Displays/hides the horizontal ruler when the document view is in [Page mode](#view-mode). +Affiche/masque la règle horizontale lorsque la vue du document est en mode [Page](#view-mode). + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showHorizontalRuler|boolean|true (default), false| + showHorizontalRuler|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * + + + +--- ## Montrer 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. +Active/désactive la vue HTML WYSIWYG, dans laquelle tous les attributs avancés de 4D Write Pro qui ne sont pas compatibles avec tous les navigateurs sont supprimés. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showHTMLWysiwyg|boolean|true, false (default)| + showHTMLWysiwyg|booléen|true, false (par défaut)| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * +--- +## Afficher le cadre de la page -## Show page frame +Affiche/masque le cadre de la page lorsque le [mode d'affichage de la page](#view-mode) est défini sur "Page". -Displays/hides the page frame when [Page view mode](#view-mode) is set to "Page". #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showPageFrames|boolean|true, false| + showPageFrames|booléen|true, false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](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. +--- +## Afficher les références + +Affiche toutes les expressions 4D insérées dans le document 4D Write Pro comme *références*. Lorsque cette option est désactivée, les expressions 4D sont affichées sous forme de *valeurs*. Par défaut, lorsque vous insérez un champ ou une expression 4D, 4D Write Pro calcule et affiche sa valeur actuelle. Sélectionnez cette propriété si vous souhaitez savoir quel champ ou quelle expression est affiché(e). Les références de champ ou d'expression apparaissent alors dans votre document, sur fond gris. -For example, you have inserted the current date along with a format, the date is displayed: +Par exemple, vous avez inséré la date courante avec un format, la date s'affiche : ![](assets/en/FormObjects/writePro1.png) -With the Show references property on, the reference is displayed: +Lorsque la propriété Afficher les références est activée, la référence s'affiche : ![](assets/en/FormObjects/writeProExpr.png) -> 4D expressions can be inserted using the `ST INSERT EXPRESSION` command. +> Les expressions 4D peuvent être insérées à l'aide de la commande `ST INSERT EXPRESSION`. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showReferences|boolean|true, false (default)| + showReferences|booléen|true, false (par défaut)| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * +--- +## Afficher règle verticale -## Show vertical ruler +Affiche/masque la règle verticale lorsque la vue du document est en mode [Page](#view-mode). -Displays/hides the vertical ruler when the document view is in [Page mode](#view-mode). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - showVerticalRuler|boolean|true (default), false| + showVerticalRuler|booléen|true (par défaut), false| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) -* * * -## Tab Control Direction +--- +## Onglets -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. +Vous pouvez définir la direction des onglets dans vos formulaires. Cette propriété est disponible sur toutes les plateformes mais ne peut être affichée que sous macOS. Vous pouvez choisir de placer les onglets en haut (standard) ou en bas. -When tab controls with a custom direction are displayed under Windows, they automatically return to the standard direction (top). +Lorsque des onglets sont affichés avec une direction personnalisée sous Windows, ils retournent automatiquement à la direction standard (en haut). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - labelsPlacement|boolean|"top", "bottom" | + labelsPlacement|booléen|"top", "bottom" | #### Objets pris en charge -[Tab Control](tabControl.md) +[Onglets](tabControl.md) -* * * -## User Interface +--- +## Interface utilisateur -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**. +Vous pouvez ajouter une interface aux zones 4D View Pro pour permettre aux utilisateurs finaux d'effectuer des modifications de base et des manipulations de données. 4D View Pro propose deux interfaces en option, le **ruban** et **la barre d'outils**. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - userInterface|text|"none" (default), "ribbon", "toolbar" | + userInterface|texte|"none" (par défaut), "ribbon", "toolbar" | #### Objets pris en charge -[4D View Pro area](viewProArea_overview.md) +[Zone 4D View Pro](viewProArea_overview.md) -#### Voir également -[4D View Pro reference guide](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.en.html) +#### Voir également -* * * +[guide de référence 4D View Pro](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.en.html) +--- ## Barre de défilement verticale -An interface tool allowing the user to move the viewing area up and down. +Un outil d'interface permettant à l'utilisateur de déplacer la zone de visualisation de haut en bas. -Available values: +Valeurs disponibles : -| Liste de propriétés | Valeur JSON | Description | -| ------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Oui | "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). | -| Non | "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) | +| Liste de propriétés | Valeur JSON | Description | +| ------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Oui | "visible" | La barre de défilement est toujours visible, même lorsqu'elle n'est pas nécessaire (en d'autres termes, lorsque la taille du contenu de l'objet est inférieure à celle du cadre). | +| Non | "hidden" | La barre de défilement n'est jamais visible | +| Automatique | "automatic" | La barre de défilement apparaît automatiquement chaque fois que nécessaire (en d'autres termes, lorsque la taille du contenu de l'objet est supérieure à celle du cadre) | +> Les objets image peuvent avoir des barres de défilement lorsque le format d'affichage de l'image est défini sur "Tronqué (non centré)" + + +> Si un objet de saisie de texte n'a pas de barre de défilement, l'utilisateur peut faire défiler les informations à l'aide des flèches du clavier. -> 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. #### Grammaire JSON @@ -368,51 +383,53 @@ Available values: | ----------------- | --------------- | -------------------------------- | | scrollbarVertical | Texte | "visible", "hidden", "automatic" | - #### Objets pris en charge -[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) +[Liste hiérarchique](list_overview.md#overview) - [Sous-formulaire](subform_overview.md#overview) - [List Box](listbox_overview.md#overview) - [Zone de saisie](input_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) #### Voir également [Barre de défilement horizontale](#horizontal-scroll-bar) -* * * +--- +## Mode d'affichage + +Définit le mode d'affichage du document 4D Write Pro dans la zone de formulaire. Trois valeurs sont disponibles : -## View mode +- **Page** : le mode d'affichage le plus complet, qui comprend les contours de page, l'orientation, les marges, les sauts de page, les en-têtes et pieds de page, etc. +- **Brouillon** : mode brouillon avec propriétés de base du document +- **Embedded** : mode d'affichage adapté aux zones intégrées; il n'affiche pas les marges, les pieds de page, les en-têtes, les cadres, etc. Ce mode peut également être utilisé pour produire un affichage de type Web (si vous sélectionnez également la [résolution de 96 dpi](#resolution) et les propriétés [Afficher HTML WYSIWYG](#show-html-wysiwyg)). -Sets the mode for displaying the 4D Write Pro document in the form area. Three values are available: +> La propriété Mode d'affichage est utilisée uniquement pour le rendu à l'écran. Concernant les paramètres d'impression, des règles de rendu spécifiques sont automatiquement utilisées. -- **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). -> The View mode property is only used for onscreen rendering. Regarding printing settings, specific rendering rules are automatically used. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - layoutMode|texte|"page", "draft", "embedded"| + layoutMode|texte|"page", "draft", "embedded"| #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) - -* * * +[Zone 4D Write Pro](writeProArea_overview.md) +--- ## Zoom -Sets the zoom percentage for displaying 4D Write Pro area contents. +Définit le pourcentage de zoom pour l'affichage du contenu de la zone 4D Write Pro. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --- | --------------- | ----------------- | | | | | - zoom|numérique|minimum = 0 | + zoom|numérique|minimum = 0 | #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) \ No newline at end of file +[Zone 4D Write Pro](writeProArea_overview.md) + + diff --git a/website/translated_docs/fr/FormObjects/properties_BackgroundAndBorder.md b/website/translated_docs/fr/FormObjects/properties_BackgroundAndBorder.md index 69e0fb969ce1cf..2151eabad7db80 100644 --- a/website/translated_docs/fr/FormObjects/properties_BackgroundAndBorder.md +++ b/website/translated_docs/fr/FormObjects/properties_BackgroundAndBorder.md @@ -1,76 +1,74 @@ --- id: propertiesBackgroundAndBorder -title: Background and Border +title: Fond et bordure --- -* * * - +--- ## Couleur de fond alternée -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. +Permet de définir une couleur d'arrière-plan différente pour les lignes / colonnes impaires dans une list box. Par défaut, *Automatique* est sélectionné : la colonne utilise la couleur de fond alternative définie au niveau de la list box. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------- | --------------- | ----------------------------------------- | -| alternateFill | string | any css value; "transparent"; "automatic" | - +| Nom | Type de données | Valeurs possibles | +| ------------- | --------------- | --------------------------------------------------------------- | +| alternateFill | string | any css value; "transparent"; "automatic"; "automaticAlternate" | #### Objets pris en charge +[List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) -[List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Background Color / Fill Color +--- +## Couleur de fond / Couleur de remplissage -Defines the background color of an object. +Définit la couleur de fond d'un objet. -In the case of a list box, by default *Automatic* is selected: the column uses the background color set at the list box level. +Dans le cas d'une list box, par défaut *Automatique* est sélectionné : la colonne utilise la couleur de fond définie au niveau de la list box. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------- | ----------------------------------------- | -| border-style | string | any css value; "transparent"; "automatic" | +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ------------------------------------------ | +| border-style | string | une valeur css; "transparent"; "automatic" | #### Objets pris en charge -[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 +[Liste Hiérarchique](list_overview.md) - [List Box](listbox_overview.md) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [Ovale](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) - [Zone de texte](text.md) +#### Voir également [Transparent](#transparent) -* * * +--- ## Expression couleur de fond -`Selection and collection type list boxes` +`List box de type collection et de type sélection d'entité` -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*. +Une expression ou une variable (les variables de tableau ne peuvent pas être utilisées) pour appliquer une couleur d'arrière-plan personnalisée à chaque ligne de la list box. L'expression ou la variable sera évaluée pour chaque ligne affichée et doit retourner une valeur de couleur RGB. Pour plus d'informations, reportez-vous à la description de la commande `OBJECT SET RGB COLORS` dans le *manuel de langage 4D*. -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). +Vous pouvez également définir cette propriété à l'aide de la commande `LISTBOX SET PROPERTY` avec la constante `lk background color expression`. +> Avec les list box de type collection ou sélection d'entité, cette propriété peut également être définie à l'aide d'une [Meta Info Expression](properties_Text.md#meta-info-expression). #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------- | --------------- | ----------------------------------------- | -| rowFillSource | string | An expression returning a RGB color value | - +| Nom | Type de données | Valeurs possibles | +| ------------- | --------------- | --------------------------------------------------- | +| rowFillSource | string | Une expression retournant une valeur de couleur RGB | #### Objets pris en charge +[List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) + -[List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + + +--- ## Style de la bordure -Allows setting a standard style for the object border. +Permet de définir un style standard pour la bordure de l'objet. #### Grammaire JSON @@ -78,141 +76,148 @@ Allows setting a standard style for the object border. | ----------- | --------------- | ----------------------------------------------------------------- | | borderStyle | Texte | "system", "none", "solid", "dotted", "raised", "sunken", "double" | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Boutons](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Règle](ruler.md) - [Spinner](spinner.md) - [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md#overview) - [Onglet](text.md) - [Zone Web](webArea_overview.md#overview) + -* * * +--- ## Dotted Line Type -Describes dotted line type as a sequence of black and white points. +Décrit le type de ligne en pointillé comme une séquence de points noirs et blancs. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| --------------- | ---------------------- | ------------------------------------------------------------------------ | -| strokeDashArray | number array or string | Ex. "6 1" or \[6,1\] for a sequence of 6 black point and 1 white point | - +| Nom | Type de données | Valeurs possibles | +| --------------- | ---------------------- | --------------------------------------------------------------------------- | +| strokeDashArray | number array or string | Ex : "6 1" ou \[6,1\] pour une séquence de points noirs et un point blanc | #### Objets pris en charge -[Rectangle](shapes_overview.md#rectangle) - [Oval](shapes_overview.md#oval) - [Line](shapes_overview.md#line) +[Rectangle](shapes_overview.md#rectangle) - [Ovale](shapes_overview.md#oval) - [Ligne](shapes_overview.md#line) + + -* * * +--- ## Masquer lignes vides finales -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: +Contrôle l'affichage des lignes vides supplémentaires ajoutées au bas d'un objet list box. Par défaut, 4D ajoute ces lignes supplémentaires pour remplir la zone vide : ![](assets/en/FormObjects/property_hideExtraBlankRows1.png) -You can remove these empty rows by selecting this option. The bottom of the list box object is then left blank: +Vous pouvez supprimer ces lignes vides en sélectionnant cette option. Le bas de l'objet list box est alors laissé vide : ![](assets/en/FormObjects/property_hideExtraBlankRows2.png) + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------------ | --------------- | ----------------- | | hideExtraBlankRows | boolean | true, false | - #### Objets pris en charge [List Box](listbox_overview.md#overview) -* * * + + +--- ## Line Color -Designates the color of the object's lines. The color can be specified by: +Désigne la couleur des lignes de l'objet. La couleur peut être spécifiée par : -* a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" +* un nom de couleur - comme "red" +* une valeur HEX - comme "# ff0000" +* une valeur RVB - comme "rgb (255,0,0)" -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. +Vous pouvez également définir cette propriété à l'aide de la commande [**OBJECT SET RGB COLORS**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-RGB-COLORS.301-4505456.en.html). #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------ | --------------- | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | - +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | ------------------------------------------ | +| stroke | string | une valeur css; "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). +> Cette propriété est également disponible pour les objets à base de texte, auquel cas elle désigne à la fois la couleur de la police et les lignes de l'objet, voir [Couleur de la police](properties_Text.md#font-color). #### Objets pris en charge -[Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) +[Ligne](shapes_overview.md#line) - [Ovale](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) + -* * * +--- ## Line Width -Designates the thickness of a line. +Désigne l'épaisseur d'une ligne. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----------- | --------------- | ----------------------------------------------------------------- | -| strokeWidth | number | 0 for smallest width on a printed form, or any integer value < 20 | - +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | --------------------------------------------------------------------------------------- | +| strokeWidth | number | 0 pour la plus petite largeur dans un formulaire imprimé, ou toute valeur d'entier < 20 | #### Objets pris en charge -[Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) +[Ligne](shapes_overview.md#line) - [Ovale](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) + + + + + -* * * +--- ## Tableau couleurs de fond -`Array type list boxes` +`List box de type tableau` -The name of an array to apply a custom background color to each row of the list box or column. +Le nom d'un tableau pour appliquer une couleur d'arrière-plan personnalisée à chaque ligne ou colonne de la list box. -The name of a Longint array must be entered. 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. +Le nom d'un tableau Entier long doit être saisi. Chaque élément de ce tableau correspond à une ligne de la zone de list box (si elle est appliquée à la liste box) ou à une cellule de la colonne (si elle est appliquée à une colonne), le tableau doit donc avoir la même taille que le tableau associé à la colonne. Vous pouvez utiliser les constantes du thème [SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-RGB-COLORS.302-4310385.en.html). Si vous souhaitez que la cellule hérite de la couleur d'arrière-plan définie au niveau supérieur, passez la valeur -255 à l'élément de tableau correspondant. -For example, given a list box where the rows have an alternating gray/light gray color, defined in the properties of the list box. A background color array has also been set for the list box in order to switch the color of rows where at least one value is negative to light orange: +Par exemple, considérons une list box où les lignes ont une couleur alternée gris/gris clair, définie dans les propriétés de la list box. Un tableau de couleurs d'arrière-plan a également été défini pour la list box afin de changer en orange clair la couleur des lignes où au moins une valeur est négative : ```4d <>_BgndColors{$i}:=0x00FFD0B0 // orange - <>_BgndColors{$i}:=-255 // default value + <>_BgndColors{$i}:=-255 // valeur par défaut ``` - ![](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: +Vous souhaitez ensuite colorer les cellules avec des valeurs négatives en orange foncé. Pour ce faire, définissez un tableau de couleurs d'arrière-plan pour chaque colonne, par exemple <>_BgndColor_1, <>_BgndColor_2 et <>_BgndColor_3. Les valeurs de ces tableaux ont la priorité sur celles définies dans les propriétés de list box ainsi que sur celles du tableau de couleurs d'arrière-plan général : ```4d - <>_BgndColorsCol_3{2}:=0x00FF8000 // dark orange + <>_BgndColorsCol_3{2}:=0x00FF8000 // orange foncé <>_BgndColorsCol_2{5}:=0x00FF8000 <>_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. +Vous pouvez obtenir le même résultat en utilisant les commandes `LISTBOX SET ROW FONT STYLE` et `LISTBOX SET ROW COLOR`. Elles ont l'avantage de vous permettre d'éviter d'avoir à prédéfinir des tableaux de style/couleur pour les colonnes : ils sont plutôt créés dynamiquement par les commandes. -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------- | --------------- | ---------------------------- | -| rowFillSource | string | The name of a longint array. | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ------------- | --------------- | ----------------------------- | +| rowFillSource | string | Nom d'un tableau entier long. | #### Objets pris en charge +[List Box](listbox_overview.md) - [Colonne List Box](listbox_overview.md#list-box-columns) + -[List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + +--- ## Transparent -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. +Définit l'arrière-plan de la list box sur "Transparent". Lorsqu'elle est définie, toute [autre couleur d'arrière-plan](#alternate-background-color) ou [couleur d'arrière-plan](#background-color-fill-color) définie pour la colonne est ignorée. #### Grammaire JSON @@ -220,11 +225,8 @@ Sets the list box background to "Transparent". When set, any [alternate backgrou | ------------ | --------------- | ----------------- | | border-style | Texte | "transparent" | - #### Objets pris en charge - [List Box](listbox_overview.md#overview) -#### See also - -[Background Color / Fill Color](#background-color-fill-color) \ No newline at end of file +#### Voir également +[Couleur de fond / Couleur de remplissage](#background-color-fill-color) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_CoordinatesAndSizing.md b/website/translated_docs/fr/FormObjects/properties_CoordinatesAndSizing.md index 6c80a8baa19f09..f988e77cb85f73 100644 --- a/website/translated_docs/fr/FormObjects/properties_CoordinatesAndSizing.md +++ b/website/translated_docs/fr/FormObjects/properties_CoordinatesAndSizing.md @@ -1,32 +1,31 @@ --- id: propertiesCoordinatesAndSizing -title: Coordinates & Sizing +title: Coordonnées & dimensions --- -* * * +--- +## Hauteur de ligne automatique + +Cette propriété n'est disponible que pour les list box de type tableau, non hiérarchiques. Par défaut, cette option n'est pas sélectionnée. -## Automatic Row Height +Lorsqu'elle est utilisée, la hauteur de chaque ligne de la colonne est automatiquement calculée par 4D, et le contenu de la colonne est pris en compte. A noter que seules les colonnes avec l'option sélectionnée seront prises en compte pour calculer la hauteur de ligne. +> Lors du redimensionnement du formulaire, si la propriété de [dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) "Agrandir" a été affectée à la list box, la colonne la plus à droite sera agrandie, allant au-delà de sa largeur maximale, si nécessaire. -This property is only available for array-based, non-hierarchical list boxes. The property is not selected by default. +Lorsque cette propriété est activée, la hauteur de chaque ligne est automatiquement calculée afin d'ajuster entièrement le contenu de la cellule ajusté sans être tronqué (sauf si l'option [Wordwrap](properties_Display.md#wordwrap) est désactivée. -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. +* Le calcul de la hauteur de ligne prend en compte : + * tout type de contenu (texte, numérique, dates, heures, images (le calcul dépend du format de l'image), objets), + * tout types de contrôle (zones de saisie, cases à cocher, listes, listes déroulantes), + * polices, styles de polices et tailles de polices, + * l'option [Retour à la ligne](properties_Display.md#wordwrap) : si elle est désactivée, la hauteur est basée sur le nombre de paragraphes (les lignes sont tronquées); si elle est activée, la hauteur est basée sur le nombre de lignes (non tronquées). -> 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. +* Le calcul de la hauteur de ligne ne tient pas compte de : + * du contenu de colonne masqué + * des propriétés du tableau [Hauteur de ligne](#row-height) et [Tableau hauteur de lignes](#row-height-array) (le cas échéant) définies dans la liste de propriété ou par programmation. +> Etant donné qu'elle nécessite des calculs supplémentaires lors de l'exécution, l'option "hauteur de ligne automatique" peut avoir une incidence sur la fluidité du défilement de votre list box, en particulier lorsqu'elle contient un grand nombre de lignes. -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. -> 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. #### Grammaire JSON @@ -34,16 +33,19 @@ When this property is enabled, the height of every row is automatically calculat | ------------- | --------------- | ----------------- | | rowHeightAuto | boolean | true, false | - #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) +[Colonne de list box](listbox_overview.md#list-box-columns) + -* * * + + +--- ## Bas -Bottom coordinate of the object in the form. +Coordonnées inférieures de l'objet dans le formulaire. + #### Grammaire JSON @@ -51,16 +53,15 @@ Bottom coordinate of the object in the form. | ------ | --------------- | ----------------- | | bottom | number | minimum : 0 | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [ Rectangle](shapes_overview.md#rectangle) - [Règle](ruler.md) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](webArea_overview.md#overview) -* * * +--- ## Gauche -Left coordinate of the object on the form. +Coordonnées de gauche de l'objet dans le formulaire. #### Grammaire JSON @@ -71,13 +72,14 @@ Left coordinate of the object on the form. #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](webArea_overview.md#overview) + -* * * +--- ## Droite -Right coordinate of the object in the form. +Coordonnées de droite de l'objet dans le formulaire. #### Grammaire JSON @@ -85,16 +87,17 @@ Right coordinate of the object in the form. | ----- | --------------- | ----------------- | | right | number | minimum : 0 | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](webArea_overview.md#overview) + -* * * + +--- ## Haut -Top coordinate of the object in the form. +Coordonnées supérieures de l'objet dans le formulaire. #### Grammaire JSON @@ -102,22 +105,23 @@ Top coordinate of the object in the form. | --- | --------------- | ----------------- | | top | number | minimum : 0 | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](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: + +--- +## Rayon d'arrondi + +Définit l'arrondi des coins (en pixels) des objets de type [rectangle](shapes_overview.md#rectangle). Par défaut, la valeur du rayon des rectangles est de 0 pixel. Vous pouvez modifier cette propriété pour dessiner des rectangles arrondis avec des formes personnalisées : ![](assets/en/FormObjects/shape_rectangle.png) -Minimum value is 0, in this case a standard non-rounded rectangle is drawn. Maximum value depends on the rectangle size (it cannot exceed half the size of the shortest rectangle side) and is calculated dynamically. +La valeur minimale est 0, dans ce cas un rectangle standard non arrondi est dessiné. La valeur maximale dépend de la taille du rectangle (elle ne peut pas dépasser la moitié de la taille du côté le plus court du rectangle) et est calculée dynamiquement. -You can also set this property using the [OBJECT Get corner radius](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-Get-corner-radius.301-4311357.en.html) and [OBJECT SET CORNER RADIUS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-CORNER-RADIUS.301-4311356.en.html) commands. +Vous pouvez également définir cette propriété à l'aide des commandes [OBJECT Get corner radius](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-Get-corner-radius.301-4311357.en.html) et [OBJECT SET CORNER RADIUS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-CORNER-RADIUS.301-4311356.en.html). #### Grammaire JSON @@ -125,18 +129,18 @@ You can also set this property using the [OBJECT Get corner radius](https://doc. | ------------ | --------------- | ----------------- | | borderRadius | integer | minimum : 0 | - #### Objets pris en charge [Rectangle](shapes_overview.md#rectangle) -* * * -## Height -This property designates an object's vertical size. -> Some objects may have a predefined height that cannot be altered. +--- +## Hauteur + +Cette propriété désigne la taille verticale d'un objet. +> Certains objets peuvent avoir une hauteur prédéfinie qui ne peut pas être modifiée. #### Grammaire JSON @@ -144,20 +148,19 @@ This property designates an object's vertical size. | ------ | --------------- | ----------------- | | height | number | minimum : 0 | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](webArea_overview.md#overview) -* * * +--- ## Largeur -This property designates an object's horizontal size. +Cette propriété désigne la taille horizontale d'un objet. +> * Certains objets peuvent avoir une hauteur prédéfinie qui ne peut pas être modifiée. +> * Si la propriété [Resizable](properties_ResizingOptions.md#resizable) est utilisée pour une [colonne de list box](listbox_overview.md#list-box-columns), l'utilisateur peut également redimensionner manuellement la colonne. +> * Lors du redimensionnement du formulaire, si la propriété de [dimensionnement horizontal "Agrandir"](properties_ResizingOptions.md#horizontal-sizing) a été affectée à la list box, la colonne la plus à droite sera agrandie, allant au-delà de sa largeur maximale, si nécessaire. -> * 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. #### Grammaire JSON @@ -165,18 +168,24 @@ This property designates an object's horizontal size. | ----- | --------------- | ----------------- | | width | number | minimum : 0 | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) - [Zone Web](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. + + + +--- +## Largeur maxi + +La largeur maximale de la colonne (en pixels). La largeur de la colonne ne peut pas être augmentée au-delà de cette valeur lors du redimensionnement de la colonne ou du formulaire. +> Lors du redimensionnement du formulaire, si la propriété de [dimensionnement horizontal "Agrandir"](properties_ResizingOptions.md#horizontal-sizing) a été affectée à la list box, la colonne la plus à droite sera agrandie, allant au-delà de sa largeur maximale, si nécessaire. + #### Grammaire JSON @@ -184,18 +193,17 @@ The maximum width of the column (in pixels). The width of the column cannot be i | -------- | --------------- | ----------------- | | maxWidth | number | minimum : 0 | - #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) +[Colonne de list box](listbox_overview.md#list-box-columns) -* * * -## Minimum Width +--- +## Largeur mini -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. +La largeur minimale de la colonne (en pixels). La largeur de la colonne ne peut pas être réduite en dessous de cette valeur lors du redimensionnement de la colonne ou du formulaire. +> Lors du redimensionnement du formulaire, si la propriété de [dimensionnement horizontal "Agrandir"](properties_ResizingOptions.md#horizontal-sizing) a été affectée à la list box, la colonne la plus à droite sera agrandie, allant au-delà de sa largeur maximale, si nécessaire. -> 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. #### Grammaire JSON @@ -203,63 +211,72 @@ The minimum width of the column (in pixels). The width of the column cannot be r | -------- | --------------- | ----------------- | | minWidth | number | minimum : 0 | - #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) +[Colonne de list box](listbox_overview.md#list-box-columns) + + + + + -* * * + +--- ## Hauteur des lignes -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. -#### Grammaire JSON +Définit la hauteur des lignes de list box (hors en-têtes et pieds de page). Par défaut, la hauteur de ligne est définie en fonction de la plate-forme et de la taille de la police. -| Nom | Type de données | Valeurs possibles | -| --------- | --------------- | ---------------------------------------- | -| rowHeight | string | css value in unit "em" or "px" (default) | +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------- | --------------- | ------------------------------------------------- | +| rowHeight | string | valeur css dans l'unité "em" ou "px" (par défaut) | #### Objets pris en charge [List Box](listbox_overview.md#overview) -#### See also +#### Voir également [Tableau hauteurs des lignes](#row-height-array) -* * * + +--- ## Tableau hauteurs des lignes -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). +Cette propriété est utilisée pour indiquer le nom d'un tableau de hauteur de ligne que vous souhaitez associer à la list box. Un tableau de hauteur de ligne doit être de type numérique (entier long par défaut). -When a row height array is defined, each of its elements whose value is different from 0 (zero) is taken into account to determine the height of the corresponding row in the list box, based on the current Row Height unit. +Lorsqu'un tableau de hauteur de ligne est défini, chacun de ses éléments dont la valeur est différente de 0 (zéro) est pris en compte pour déterminer la hauteur de la ligne correspondante dans la list box, en fonction de l'unité hauteur de ligne courante. -For example, you can write: +Par exemple, vous pouvez écrire : ```4d ARRAY LONGINT(RowHeights;20) 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. +En supposant que l'unité des lignes soit «lignes», alors la cinquième ligne de la list box aura une hauteur de trois lignes, tandis que chaque autre ligne conservera sa hauteur par défaut. +> * La propriété Row Height Array n'est pas prise en compte pour les list box hiérarchiques. +> * Pour les list box de type tableau, cette propriété n'est disponible que si l'option [Hauteur de ligne automatique](#automatic-row-height) n'est pas sélectionnée. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| --------------- | --------------- | ---------------------------- | -| rowHeightSource | string | Name of a 4D array variable. | - +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ------------------------------ | +| rowHeightSource | string | Nom d'une variable tableau 4D. | #### Objets pris en charge [List Box](listbox_overview.md#overview) -#### See also -[Hauteur des lignes](#row-height) \ No newline at end of file +#### Voir également +[Hauteur des lignes](#row-height) + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Crop.md b/website/translated_docs/fr/FormObjects/properties_Crop.md index c6ef9d0aa1fb0b..cb4a4a2f0b6dd0 100644 --- a/website/translated_docs/fr/FormObjects/properties_Crop.md +++ b/website/translated_docs/fr/FormObjects/properties_Crop.md @@ -3,36 +3,45 @@ id: propertiesCrop title: Découpage --- -* * * - +--- ## Columns -Sets the number of columns in a thumbnail table. +Définit le nombre de colonnes dans un tableau d'imagettes. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | |:----------- |:---------------:| ----------------- | -| columnCount | entier | minimum: 1 | - +| columnCount | integer | minimum: 1 | #### Objets pris en charge -[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) +[Bouton image](pictureButton_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Pop-up Menu image](picturePopupMenu_overview.md) + + -* * * +--- ## Rows -Sets the number of rows in a thumbnail table. +Définit le nombre de lignes dans un tableau d'imagettes. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | |:-------- |:---------------:| ----------------- | -| rowCount | entier | minimum: 1 | - +| rowCount | integer | minimum: 1 | #### Objets pris en charge -[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) \ No newline at end of file +[Bouton image](pictureButton_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Pop-up Menu image](picturePopupMenu_overview.md) + + + + + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_DataSource.md b/website/translated_docs/fr/FormObjects/properties_DataSource.md index be83f595c4aa58..456ef2b8474fc3 100644 --- a/website/translated_docs/fr/FormObjects/properties_DataSource.md +++ b/website/translated_docs/fr/FormObjects/properties_DataSource.md @@ -3,25 +3,25 @@ id: propertiesDataSource title: Source de données --- -* * * +--- +## Insertion automatique + +When this option is selected, if a user enters a value that is not found in the list associated with the object, this value is automatically added to the list stored in memory. -## Automatic Insertion +When the **automatic insertion** option is not set (default), the value entered is stored in the form object but not in the list in memory. -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: +This property is supported by: -- 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. +- [Combo box](comboBox_overview.md) and [list box column](listbox_overview.md#list-box-columns) form objects associated to a choice list. +- [Combo box](comboBox_overview.md) form objects whose associated list is filled by their array or object datasource. -For example, given a choice list containing "France, Germany, Italy" that is associated with a "Countries" combo box: if the **automatic insertion** property is set and a user enters "Spain", then the value "Spain" is automatically added to the list in memory: +Par exemple, pour une liste de choix contenant "France, Allemagne, Italie" associée à une combo box "Pays" : si la propriété d'**insertion automatique** est définie et qu'un utilisateur saisit "Espagne", la valeur "Espagne" est alors automatiquement ajoutée à la liste en mémoire : ![](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 choice list was created from a list defined in Design mode, the original list is not modified. -> 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. #### Grammaire JSON @@ -29,103 +29,154 @@ When the **automatic insertion** option is not selected (default), the value ent | ------------------ | --------------- | ----------------- | | automaticInsertion | boolean | true, false | - #### Objets pris en charge -[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) +[Combo Box](comboBox_overview.md) - [Colonne List Box](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. +Associe une liste de choix à un objet. Il peut s'agir d'un nom de liste de choix (une référence de liste) ou d'une collection de valeurs par défaut. + +You can also associate choice lists to objects using the [OBJECT SET LIST BY NAME](https://doc.4d.com/4dv19/help/command/en/page237.html) or [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4dv19/help/command/en/page1266.html) commands. + #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ---------- | ---------------- | --------------------------------------------------- | -| choiceList | list, collection | A list of possible values | -| list | list, collection | A list of possible values (hierarchical lists only) | +| Nom | Type de données | Valeurs possibles | +| ---------- | ----------------- | ---------------------------------------------------------------- | +| choiceList | liste, collection | Une liste de valeurs possibles | +| liste | liste, collection | Une liste de valeurs possibles (listes hiérarchiques uniquement) | #### Objets pris en charge [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) -* * * + +--- ## Choice List (static list) List of static values to use as labels for the tab control object. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------ | ---------------- | ---------------------------------------- | -| labels | list, collection | A list of values to fill the tab control | - +| Nom | Type de données | Valeurs possibles | +| ------ | ----------------- | ---------------------------------------- | +| labels | liste, collection | A list of values to fill the tab control | #### Objets pris en charge -[Tab Control](tabControl.md) +[Onglets](tabControl.md) -* * * +--- ## Élément courant +`Collection or entity selection list boxes` + +Indique une variable ou une expression qui se verra attribuer l'élément/l'entité de collection sélectionné(e) par l'utilisateur. Vous devez utiliser une variable objet ou une expression assignable qui accepte des objets. Si l'utilisateur ne sélectionne rien ou si vous avez utilisé une collection de valeurs scalaires, la valeur Null est affectée. +> Cette propriété est en "lecture seule", elle est automatiquement mise à jour en fonction des actions de l'utilisateur dans la list box. Vous ne pouvez pas modifier sa valeur pour modifier l'état de sélection de la list box. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------------- | --------------- | ------------------ | +| currentItemSource | string | Expression d'objet | + +#### Objets pris en charge +[List Box ](listbox_overview.md#overview) + + + +--- + +## Position élément courant `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. +Indique une variable ou une expression qui se verra attribuer un entier long indiquant la position de l'élément/l'entité de collection sélectionné(e) par l'utilisateur. -> 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. +* si aucun(e) élément/entité n'est sélectionné(e), la variable ou l'expression reçoit zéro, +* si un(e) seul(e) élément/entité est sélectionné(e), la variable ou l'expression reçoit son emplacement, +* si plusieurs éléments/entités sont sélectionnés, la variable ou l'expression reçoit la position de l'élément/entité qui a été sélectionné(e) en dernier. +> Cette propriété est en "lecture seule", elle est automatiquement mise à jour en fonction des actions de l'utilisateur dans la list box. Vous ne pouvez pas modifier sa valeur pour modifier l'état de sélection de la list box. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----------------- | --------------- | ----------------- | -| currentItemSource | string | Object expression | - +| Nom | Type de données | Valeurs possibles | +| ------------------------- | --------------- | -------------------- | +| currentItemPositionSource | string | Expression numérique | #### Objets pris en charge +[List Box ](listbox_overview.md) -[List Box ](listbox_overview.md#overview) -* * * -## Position élément courant -`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. +--- +## Data Type (expression type) + +Defines the data type for the displayed expression. This property is used with: -* 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. +- [List box columns](listbox_overview.md#list-box-columns) of the selection and collection types. +- [Drop-down lists](dropdownList_Overview.md) associated to objects or arrays. -> 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. +See also [**Expression Type**](properties_Object.md#expression-type) section. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------------------- | --------------- | ----------------- | -| currentItemPositionSource | string | Number expression | +| Nom | Type de données | Valeurs possibles | +| ------------------ | --------------- | -------------------------------------------------- | +| dataSourceTypeHint | string |
      • **list box columns:** "boolean", "number", "picture", "text", date", "time". *Array/selection list box only*: "integer", "object"
      • **drop-down lists:** "object", "arrayText", "arrayDate", "arrayTime", "arrayNumber"
      • | #### Objets pris en charge -[List Box ](listbox_overview.md) +[Drop-down Lists](dropdownList_Overview.md) associated to objects or arrays - [List Box column](listbox_overview.md#list-box-columns) + + -* * * +--- +## Data Type (list) + +Defines the type of data to save in the field or variable associated to the [drop-down list](dropdownList_Overview.md). This property is used with: + +- Drop-down lists [associated to a choice list](dropdownList_Overview.md#using-a-choice-list). +- Drop-down lists [associated to a hierarchical choice list](dropdownList_Overview.md#using-a-hierarchical-choice-list). -## Type de données +Trois options sont disponibles : + +- **List reference**: declares that the drop-down list is hierarchical. It means that the drop-down list can display up to two hierarchical levels and its contents can be managed by the 4D language commands of the **Hierarchical Lists** theme. +- **Selected item value** (default): the drop-down list is not hierarchical and the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. +- **Selected item reference**: the drop-down list is not hierarchical and the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. + +Using the **Selected item reference** option requires compliance with the following principles: +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. +- Valid and unique references must be associated with list items. +- The drop-down list must be associated with a field or a variable. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | -------------------- | +| saveAs | string | "value", "reference" | + + +> Setting only `"dataSourceTypeHint" : "integer"` with a `"type": "dropdown"` form object will declare a hierarchical drop-down list. -Please refer to [Expression Type](properties_Object.md#expression-type) section. #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) +[Drop-down Lists](dropdownList_Overview.md) associated to lists -* * * + +--- ## Default (list of) values @@ -145,13 +196,14 @@ You must enter a list of values. In the Form editor, a specific dialog box allow | ------ | --------------- | ---------------------------------------------------------------- | | values | collection | A collection of default values (strings), ex: "a", "b", "c", "d" | - #### Objets pris en charge [List Box Column (array type only)](listbox_overview.md#list-box-columns) -* * * + + +--- ## Expression 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 +213,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: - - * Chaine - * Numeric - * Date - * Heure - * Image - * 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: - - * Chaine - * Numeric - * Date - * Image - * Booléen - - - 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. + * Chaine + * Numeric + * Date + * Heure + * Image + * 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: + * Chaine + * Numeric + * Date + * Image + * Booléen + + 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. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------- | --------------- | ----------------------------------------------------------------------- | | dataSource | string | A 4D variable, field name, or an arbitrary complex language expression. | - #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) +[Colonne de list box](listbox_overview.md#list-box-columns) + -* * * -## Table principale +--- + +## Table principale `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. @@ -214,14 +266,14 @@ All database tables can be used, regardless of whether the form is related to a | ----- | --------------- | ----------------- | | table | number | Table number | - #### Objets pris en charge - [List Box](listbox_overview.md#overview) -* * * -## Save as + +--- + +## Enregistrer comme This property is available in the following conditions: @@ -231,15 +283,15 @@ This property is available in the following conditions: This property specifies, in the context of a field or variable associated with a list of values, the type of contents to save: - **Save as Value** (default option): the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. -- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the `APPEND TO LIST` or `SET LIST ITEM` commands, or in the lists editor. +- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. Using this property requires compliance with the following principles: -- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. - 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. + #### Grammaire JSON @@ -247,23 +299,20 @@ Using this property requires compliance with the following principles: | ------ | --------------- | -------------------- | | saveAs | string | "value", "reference" | - #### Objets pris en charge +[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -[Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * +--- ## Eléments sélectionnés - `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. - -> 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. +* 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. Vous devez utiliser une variable objet ou une expression assignable qui accepte des objets. +> Cette propriété est en "lecture seule", elle est automatiquement mise à jour en fonction des actions de l'utilisateur dans la list box. Vous ne pouvez pas modifier sa valeur pour modifier l'état de sélection de la list box. #### Grammaire JSON @@ -271,15 +320,12 @@ Specifies a variable or expression that will be assigned the elements or entitie | ------------------- | --------------- | --------------------- | | selectedItemsSource | string | Collection expression | - #### Objets pris en charge - [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 +334,9 @@ Specifies the named selection to be used. You must enter the name of a valid nam #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------------- | --------------- | -------------------- | -| namedSelection | string | Named selection name | - +| Nom | Type de données | Valeurs possibles | +| -------------- | --------------- | ------------------- | +| namedSelection | string | Nom de la sélection | #### Objets pris en charge - -[List Box](listbox_overview.md#overview) \ No newline at end of file +[List Box](listbox_overview.md#overview) diff --git a/website/translated_docs/fr/FormObjects/properties_Display.md b/website/translated_docs/fr/FormObjects/properties_Display.md index 7cf0583f6d9fa4..19220e3c9711c2 100644 --- a/website/translated_docs/fr/FormObjects/properties_Display.md +++ b/website/translated_docs/fr/FormObjects/properties_Display.md @@ -1,10 +1,9 @@ --- id: propertiesDisplay -title: Display +title: Affichage --- -* * * - +--- ## 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,24 +19,20 @@ 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: +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) - + (portion) The field actually contains "proportion". 4D accepts and stores the entire entry no matter what the display format. No information is lost. @@ -47,17 +42,25 @@ The field actually contains "proportion". 4D accepts and stores the entire entry | ---------- | --------------- | ------------------------------------------------------------------------------------ | | textFormat | string | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | - #### Objets pris en charge [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. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | dateFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | - #### Objets pris en charge [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. @@ -115,40 +116,39 @@ In each of the number display formats, the number sign (#), zero (0), caret (^), | ^ | 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 #. +> 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 (,). -> 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 You can use a decimal point in a number display format. If you want the decimal to display regardless of whether the user types it in, it must be placed between zeros. -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: +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,47 +206,44 @@ 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 - ### Exemples 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 | #### Grammaire JSON @@ -259,13 +251,16 @@ The following table shows how different formats affect the display of numbers. T | ------------ | --------------- | -------------------------------------------------------------- | | numberFormat | string | Numbers (including a decimal point or minus sign if necessary) | - #### Objets pris en charge [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,6 +298,7 @@ If you have applied the **Scaled to fit centered (proportional)** format, the pi ![](assets/en/FormObjects/property_pictureFormat_ScaledProportional.png) + ### Replicated `JSON grammar: "tiled"` @@ -320,37 +315,35 @@ If the field is reduced to a size smaller than that of the original picture, the | ------------- | --------------- | ----------------------------------------------------------------------------------------------------- | | pictureFormat | string | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | - #### Objets pris en charge [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 | Commentaires | Example for 04:30:25 | -| ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | -| HH:MM:SS | hh_mm_ss | | 04:30:25 | -| HH:MM | hh_mm | | 04:30 | -| Hour Min Sec | HH_MM_SS | | 4 hours 30 minutes 25 seconds | -| Hour Min | HH_MM | | 4 hours 30 minutes | -| HH:MM AM/PM | hh_mm_am | | 4:30 a.m. | -| MM SS | mm_ss | Time expressed as a duration from 00:00:00 | 270:25 | -| 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 | - +| Format name | Chaine JSON | Commentaires | Exemple pour 04:30:25 | +| ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | +| HH:MM:SS | hh_mm_ss | | 04:30:25 | +| HH:MM | hh_mm | | 04:30 | +| Hour Min Sec | HH_MM_SS | | 4 heures 30 minutes 25 secondes | +| Hour Min | HH_MM | | 4 heures 30 minutes | +| HH:MM AM/PM | hh_mm_am | | 4:30 a.m. | +| MM SS | mm_ss | Heure exprimée sous forme de durée à partir de 00:00:00 | 270:25 | +| Min Sec | MM_SS | Heure exprimée sous forme de durée à partir de 00:00:00 | 270 Minutes 25 Secondes | +| 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 | #### Grammaire JSON @@ -358,22 +351,21 @@ Windows: this format is the same as the System time short format | ---------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 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) | - #### Objets pris en charge [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" @@ -388,9 +380,11 @@ When a [boolean expression](properties_Object.md#expression-type) is displayed a [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) -* * * -## Display Type + + +--- +## Type d'affichage 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,221 @@ Boolean columns can also be displayed as pop-up menus. In this case, the [Text w #### Grammaire JSON -- **number columns**: "automatic" (default) or "checkbox" - - **boolean columns**: "checkbox" (default) or "popup" - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------- | --------------- | ----------------- | - | display | boolean | true, false | - - - #### Objets pris en charge - - [Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) - - * * * - - ## Three-States - - Allows a check box object to accept a third state. La variable associée à la case à cocher retourne la valeur 2 lorsque celle-ci se trouve dans le troisième état. - - #### 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------- | --------------- | ----------------- | - | threeState | boolean | true, false | - - - #### Objets pris en charge - - [Check box](checkbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## Titre de menu - - 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------ | --------------- | ---------------------------------- | - | controlTitle | string | Any custom label for the check box | - - - #### Objets pris en charge - - [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. - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------ | --------------- | ---------------------- | - | truncateMode | string | "withEllipsis", "none" | - - - #### Objets pris en charge - - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) - - * * * - - ## Visibilité - - 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------- | --------------- | ------------------- | - | visibility | string | "visible", "hidden" | - - - #### Objets pris en charge - - [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) - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | -------- | --------------- | -------------------------------------------------- | - | wordwrap | string | "automatic" (excluding list box), "normal", "none" | - - - #### Objets pris en charge - - [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 +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| controlType | string |
      • **number columns**: "automatic" (default) or "checkbox"
      • **boolean columns**: "checkbox" (default) or "popup" | + +#### Objets pris en charge + +[Colonne de list box](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. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------- | --------------- | ----------------- | +| display | boolean | true, false | + +#### Objets pris en charge + +[Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) + + + + + + + +--- +## Three-States + + + +Allows a check box object to accept a third state. La variable associée à la case à cocher retourne la valeur 2 lorsque celle-ci se trouve dans le troisième état. + + +#### 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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ----------------- | +| threeState | boolean | true, false | + +#### Objets pris en charge + +[Check box](checkbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) + + + + +--- +## Titre de menu + +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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ---------------------------------- | +| controlTitle | string | Any custom label for the check box | + +#### Objets pris en charge + +[Colonne de list box](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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ---------------------- | +| truncateMode | string | "withEllipsis", "none" | + + + +#### Objets pris en charge + +[List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) + + + + + +--- +## Visibilité + +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. + + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ------------------- | +| visibility | string | "visible", "hidden" | + +#### Objets pris en charge + +[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) + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| -------- | --------------- | -------------------------------------------------- | +| wordwrap | string | "automatic" (excluding list box), "normal", "none" | + +#### Objets pris en charge + +[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/fr/FormObjects/properties_Entry.md b/website/translated_docs/fr/FormObjects/properties_Entry.md index 23323e00a40ac4..1e8c054ca4a292 100644 --- a/website/translated_docs/fr/FormObjects/properties_Entry.md +++ b/website/translated_docs/fr/FormObjects/properties_Entry.md @@ -3,27 +3,27 @@ id: propertiesEntry title: Saisie --- -* * * - -## Auto Spellcheck +--- +## Correction orthographique -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. +4D inclut des fonctionnalités de correction orthographique intégrées et personnalisables. 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. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------- | --------------- | ----------------- | -| spellcheck | booléen | true, false | +| spellcheck | boolean | true, false | #### Objets pris en charge -[4D Write Pro area](writeProArea_overview.md) - [Input](input_overview.md) +[Zone 4D Write Pro](writeProArea_overview.md) - [Zone de saisie](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. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ----------- | --------------- | ------------------------------------- | -| contextMenu | chaîne | "automatic" (used if missing), "none" | - +| contextMenu | string | "automatic" (used if missing), "none" | #### Objets pris en charge [Input](input_overview.md) - [Web Area](webArea_overview.md) - [4D Write Pro areas](writeProArea_overview.md) -* * * + + + + +--- ## Saisissable 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. + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | --------- | --------------- | ----------------- | -| enterable | booléen | true, false | - +| enterable | boolean | true, false | #### Objets pris en charge -[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) +[4D Write Pro areas](writeProArea_overview.md) - [Check Box](checkbox_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. @@ -87,10 +90,11 @@ Entry filters can also be used to display required formatting characters so that Most of the time, you can use one of the [built-in filters](#default-entry-filters) of 4D for what you need; however, you can also create and use custom filters: - you can directly enter a filter definition string -- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). +- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). 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: @@ -119,196 +123,221 @@ Here is a table that explains each of the entry filter choices in the Entry Filt #### Grammaire JSON -- Entry filter code or - - Entry filter name (filter names start with | ) - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | --------- | --------------- | ----------------- | - | focusable | booléen | true, false | - - - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | --------------- | --------------- | --------------------------------------------------------------------------- | - | keyboardDialect | Texte | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | - - - #### Objets pris en charge - - [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) - #### Non - - - 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) - #### Oui - - When this value is selected, the property is managed by the [Wordwrap](properties_Display.md#wordwrap) option. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | --------- | --------------- | ------------------------------------------------- | - | multiline | Texte | "yes", "no", "automatic" (default if not defined) | - - - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----------- | --------------- | ---------------------------------------------------------------------------- | - | placeholder | chaîne | Text to be displayed (grayed out) when the object does not contain any value | - - - #### Objets pris en charge - - [Combo Box](comboBox_overview.md) - [Input](input_overview.md) - - #### Voir également - - [Message d'aide](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)). - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------- | --------------- | ----------------- | - | showSelection | booléen | true, false | - - - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - - 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]" - #### Objets pris en charge - - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Radio Button](radio_overview.md) - - * * * - - ## Saisie sur clic unique - - 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | --------------- | --------------- | ----------------- | - | singleClickEdit | boolean | true, false | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| entryFilter | string |
      • Entry filter code or
      • Entry filter name (filter names start with | ) | + + +#### Objets pris en charge + +[Check Box](checkbox_overview.md) - [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 +

        +

        + +* ![](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. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------- | --------------- | ----------------- | +| focusable | boolean | true, false | + + +#### Objets pris en charge + +[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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | --------------------------------------------------------------------------- | +| keyboardDialect | Texte | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | + + +#### Objets pris en charge + +[4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) + + + +--- +## Multilignes + +Cette propriété est disponible pour les [objets de zone de saisie](input_overview.md) contenant les expressions de type texte et les champs de type alpha et texte. Elle peut prendre trois valeurs : Oui, Non, Automatique (par défaut). + +#### Automatique +- Dans les zones mono-lignes, les mots situés en fin de ligne sont tronqués et il n’y a pas de retours à la ligne. +- Dans les zones multi-lignes, 4D effectue des retours à la ligne automatiques : + ![](assets/en/FormObjects/multilineAuto.png) + +#### Non +- Dans les zones mono-lignes, les mots situés en fin de ligne sont tronqués et il n’y a pas de retours à la ligne. +- Il n’y a aucun retour à la ligne : le texte est toujours affiché sur une seule ligne. Si le champ ou la variable alpha ou texte contient des retour chariots, le texte situé après le premier retour chariot est effacé dès que la zone est modifiée : + ![](assets/en/FormObjects/multilineNo.png) + +#### Oui +Lorsque cette valeur est sélectionnée, la propriété est gérée par l'option [Retour à la ligne](properties_Display.md#wordwrap). + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------- | --------------- | --------------------------------------------------- | +| multiline | Texte | "yes", "no", "automatic" (par défaut si non défini) | + + +#### Objets pris en charge + +[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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ------------------------------------------------------------------ | +| placeholder | string | Texte à afficher (grisé) lorsque l'objet ne contient aucune valeur | + +#### Objets pris en charge + +[Combo Box](comboBox_overview.md) - [Zone de saisie](input_overview.md) + + +#### Voir également + +[Message d'aide](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)). + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------- | --------------- | ----------------- | +| showSelection | boolean | true, false | + + +#### Objets pris en charge + +[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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| shortcutAccel | boolean | true, false (Ctrl Windows/Command macOS) | +| shortcutAlt | boolean | true, false | +| shortcutCommand | boolean | true, false | +| shortcutControl | boolean | true, false (macOS Control) | +| shortcutShift | boolean | 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]" | + + +#### Objets pris en charge + +[Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Radio Button](radio_overview.md) + + + + + +--- +## Saisie sur clic unique + +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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ----------------- | +| singleClickEdit | boolean | true, false | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Footers.md b/website/translated_docs/fr/FormObjects/properties_Footers.md index e327b74a113102..1ebf7f809bd020 100644 --- a/website/translated_docs/fr/FormObjects/properties_Footers.md +++ b/website/translated_docs/fr/FormObjects/properties_Footers.md @@ -3,67 +3,68 @@ id: propertiesFooters title: Pieds --- -* * * - +--- ## Afficher pieds -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. +Cette propriété est utilisée pour afficher ou masquer [les pieds de de colonne listbox](listbox_overview.md#list-box-footers). Il existe un pied par colonne; chaque pied est configuré séparément. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ----------- | --------------- | ----------------- | -| showFooters | booléen | true, false | - +| showFooters | boolean | true, false | #### Objets pris en charge [List Box](listbox_overview.md) -* * * -## Height -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. +--- +## Hauteur + +Cette propriété sert à définir la hauteur de ligne d'un pied de list box en **pixels** ou en **lignes de texte** (lorsqu'elle est affichée). Les deux types d'unités peuvent être utilisés dans la même list box : + +* *Pixel* - la valeur de hauteur est appliquée directement à la ligne concernée, quelle que soit la taille de la police contenue dans les colonnes. Si une police est trop grande, le texte est tronqué. De plus, les images sont tronquées ou redimensionnées selon leur format. + +* *Ligne* - la hauteur est calculée en tenant compte de la taille de police de la ligne concernée. + * Si plus d'une taille est définie, 4D utilise la plus grande. Par exemple, si une ligne contient «Verdana 18», «Geneva 12» et «Arial 9», 4D utilise «Verdana 18» pour déterminer la hauteur de ligne (par exemple, 25 pixels). Cette hauteur est ensuite multipliée par le nombre de lignes définies. + * Ce calcul ne prend pas en compte la taille des images ni les styles appliqués aux polices. + * Sous macOS, la hauteur de ligne peut être incorrecte si l'utilisateur saisit des caractères qui ne sont pas disponibles dans la police sélectionnée. Lorsque cela se produit, une police de remplacement est utilisée, ce qui peut entraîner des variations de taille. +> Cette propriété peut être également définie dynamiquement à l'aide de la commande [LISTBOX SET FOOTERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/List-box-footer-specific-properties.300-4354808.en.html). -* *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. +Conversion d'unités : lorsque vous passez d'une unité à l'autre, 4D les convertit automatiquement et affiche le résultat dans la liste des propriétés. Par exemple, si la police utilisée est "Lucida grande 24", une hauteur de "1 ligne" est convertie en "30 pixels" et une hauteur de "60 pixels" est convertie en "2 lignes". -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". +A noter que la conversion en va-et-vient peut conduire à un résultat final différent de la valeur de départ en raison des calculs automatiques effectués par 4D. Ceci est illustré dans les séquences suivantes : -Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: +*(police Arial 18)*: 52 pixels -> 2 lignes -> 40 pixels *(police Arial 12)*: 3 pixels -> 0.4 ligne arrondie à 1 ligne -> 19 pixels -*(font Arial 18)*: 52 pixels -> 2 lines -> 40 pixels *(font Arial 12)*: 3 pixels -> 0.4 line rounded up to 1 line -> 19 pixels #### Exemple JSON : - "List Box": { - "type": "listbox", - "showFooters": true, - "footerHeight": "44px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showFooters": true, + "footerHeight": "44px", + ... + } +``` -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------- | ----------------------------- | -| footerHeight | chaîne | positive decimal+px | em | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | --------------------------------- | +| footerHeight | string | décimales positives +px | em | #### Objets pris en charge [List Box](listbox_overview.md) + #### Voir également -[Headers](properties_Headers.md) - [List box footers](listbox_overview.md#list-box-footers) \ No newline at end of file +[En-têtes](properties_Headers.md) - [Pieds List box](listbox_overview.md#list-box-footers) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_Gridlines.md b/website/translated_docs/fr/FormObjects/properties_Gridlines.md index ce29820addbaa5..f48522ea8d80a4 100644 --- a/website/translated_docs/fr/FormObjects/properties_Gridlines.md +++ b/website/translated_docs/fr/FormObjects/properties_Gridlines.md @@ -3,35 +3,34 @@ id: propertiesGridlines title: Quadrillage --- -* * * - +--- ## Couleur lignes horizontales -Defines the color of the horizontal lines in a list box (gray by default). +Définit la couleur des lignes horizontales dans une list box (gris par défaut). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | -------------------- | --------------- | ------------------------------------------ | -| horizontalLineStroke | color | any css value, "'transparent", "automatic" | - +| horizontalLineStroke | color | une valeur css; "transparent"; "automatic" | #### Objets pris en charge [List Box](listbox_overview.md) -* * * + + +--- ## Couleur lignes verticales -Defines the color of the vertical lines in a list box (gray by default). +Définit la couleur des lignes verticales d'une list box (gris par défaut). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------------ | --------------- | ------------------------------------------ | -| verticalLineStroke | color | any css value, "'transparent", "automatic" | - +| verticalLineStroke | color | une valeur css; "transparent"; "automatic" | #### Objets pris en charge diff --git a/website/translated_docs/fr/FormObjects/properties_Headers.md b/website/translated_docs/fr/FormObjects/properties_Headers.md index 1dd0be4e8272db..f95a6b64c8064b 100644 --- a/website/translated_docs/fr/FormObjects/properties_Headers.md +++ b/website/translated_docs/fr/FormObjects/properties_Headers.md @@ -3,11 +3,10 @@ id: propertiesHeaders title: En-têtes --- -* * * - +--- ## Afficher en-têtes -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. +Cette propriété est utilisée pour afficher ou masquer [les en-têtes de colonne listbox](listbox_overview.md#list-box-headers). Il existe un en-tête par colonne; chaque en-tête est configuré séparément. #### Grammaire JSON @@ -15,55 +14,56 @@ This property is used to display or hide [list box column headers](listbox_overv | ----------- | --------------- | ----------------- | | showHeaders | boolean | true, false | - #### Objets pris en charge [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. +--- +## Hauteur + +Cette propriété sert à définir la hauteur de ligne d'un en-tête de list box en **pixels** ou en **lignes de texte** (lorsqu'elle est affichée). Les deux types d'unités peuvent être utilisés dans la même list box : -* *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. +* *Pixel* - la valeur de hauteur est appliquée directement à la ligne concernée, quelle que soit la taille de la police contenue dans les colonnes. Si une police est trop grande, le texte est tronqué. De plus, les images sont tronquées ou redimensionnées selon leur format. -> 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. +* *Ligne* - la hauteur est calculée en tenant compte de la taille de police de la ligne concernée. + * Si plus d'une taille est définie, 4D utilise la plus grande. Par exemple, si une ligne contient «Verdana 18», «Geneva 12» et «Arial 9», 4D utilise «Verdana 18» pour déterminer la hauteur de ligne (par exemple, 25 pixels). Cette hauteur est ensuite multipliée par le nombre de lignes définies. + * Ce calcul ne prend pas en compte la taille des images ni les styles appliqués aux polices. + * Sous macOS, la hauteur de ligne peut être incorrecte si l'utilisateur saisit des caractères qui ne sont pas disponibles dans la police sélectionnée. Lorsque cela se produit, une police de remplacement est utilisée, ce qui peut entraîner des variations de taille. +> Cette propriété peut être également définie dynamiquement à l'aide de la commande [LISTBOX SET HEADERS HEIGHT](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-SET-HEADERS-HEIGHT.301-4311129.en.html). -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". +Conversion d'unités : lorsque vous passez d'une unité à l'autre, 4D les convertit automatiquement et affiche le résultat dans la liste des propriétés. Par exemple, si la police utilisée est "Lucida grande 24", une hauteur de "1 ligne" est convertie en "30 pixels" et une hauteur de "60 pixels" est convertie en "2 lignes". -Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: +A noter que la conversion en va-et-vient peut conduire à un résultat final différent de la valeur de départ en raison des calculs automatiques effectués par 4D. Ceci est illustré dans les séquences suivantes : -*(font Arial 18)*: 52 pixels -> 2 lines -> 40 pixels *(font Arial 12)*: 3 pixels -> 0.4 line rounded up to 1 line -> 19 pixels +*(police Arial 18)*: 52 pixels -> 2 lignes -> 40 pixels *(police Arial 12)*: 3 pixels -> 0.4 ligne arrondie à 1 ligne -> 19 pixels #### Exemple JSON : - "List Box": { - "type": "listbox", - "showHeaders": true, - "headerHeight": "22px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showHeaders": true, + "headerHeight": "22px", + ... + } +``` + -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------- | ------------------------------- | -| headerHeight | string | positive decimal+px | em ) | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ----------------------------------- | +| headerHeight | string | décimales positives +px | em ) | #### Objets pris en charge [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 +#### Voir également + +[Pieds](properties_Footers.md) - [En-têtes List box](listbox_overview.md#list-box-headers) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_Help.md b/website/translated_docs/fr/FormObjects/properties_Help.md index 28893b84f592d1..dd2c7964506fe6 100644 --- a/website/translated_docs/fr/FormObjects/properties_Help.md +++ b/website/translated_docs/fr/FormObjects/properties_Help.md @@ -3,48 +3,51 @@ id: propertiesHelp title: Aide --- -* * * - -## Help Tip +--- +## Infobulle -This property allows associating help messages with active objects in your forms. They can be displayed at runtime: +Cette propriété permet d'associer les messages d'aide aux objets actifs de vos formulaires. Ils peuvent être affichés au moment de l'exécution : ![](assets/en/FormObjects/property_helpTip.png) -> - The display delay and maximum duration of help tips can be controlled using the `Tips delay` and `Tips duration` selectors of the **[SET DATABASE PARAMETER](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html)** command. -> - Help tips can be globally disabled or enabled for the application using the Tips enabled selector of the [**SET DATABASE PARAMETER**](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html) command. +> - Le délai d'affichage et la durée maximale des messages d'aide peuvent être définis à l'aide des sélecteurs de délai et de durée des conseils de la commande **[SET DATABASE PARAMETER](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html)**. +> - Ces infobulles peuvent être désactivées ou activées pour l'application à l'aide du sélecteur de la commande [**SET DATABASE PARAMETER**](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html). -You can either: +Vous pouvez : -- 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)). +- désigner une info-bulle existante, préalablement spécifiée dans l'éditeur de [messages d'aide](https://doc.4d.com/4Dv17R5/4D/17-R5/Help-tips.200-4163423.en.html) de 4D. +- ou saisir directement le message d'aide sous forme de chaîne. Cela vous permet de profiter de l'architecture XLIFF. Vous pouvez saisir ici une référence XLIFF afin d'afficher un message dans le langage de l'application (pour plus d'informations sur XLIFF, reportez-vous à [l'Annexe B: Architecture XLIFF](https://doc.4d.com/4Dv17R5/4D/17-R5/Appendix-B-XLIFF-architecture.300-4163748.en.html). Vous pouvez également utiliser des références 4D ([voir Utilisation de références en texte statique](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html)). +> Sous macOS, l'affichage des messages d'aide n'est pas pris en charge dans les fenêtres de type pop-up. -> In macOS, displaying help tips is not supported in pop-up type windows. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -|:-------:|:---------------:| ------------------------------------- | -| tooltip | Texte | additional information to help a user | - +| Nom | Type de données | Valeurs possibles | +|:-------:|:---------------:| ------------------------------------------------------------ | +| tooltip | Texte | informations supplémentaires destinées à aider l'utilisateur | #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Check Box](checkbox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Combo Box](comboBox_overview.md#overview) - [Liste hiérarchique ](list_overview.md#overview) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Pied List Box](listbox_overview.md#list-box-footers) - [Bouton image](pictureButton_overview.md) - [Pop-up menu image](picturePopupMenu_overview.md) - [Bouton Radio](radio_overview.md) + + +#### Autres fonctionnalités d'aide + +Vous pouvez aussi associer des messages d'aides aux objets formulaire de deux autres façons : + +- au niveau de la structure de la base (champs uniquement). Dans ce cas, le message d'aide du champ apparaîtra sur les autres formulaires. Pour plus d'informations, référez-vous à la section [Propriétés des champs](https://doc.4d.com/4Dv17R5/4D/17-R5/Field-properties.300-4163580.en.html). +- en utilisant la commande **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-HELP-TIP.301-4128221.en.html)**, pour le process courant. + +Lorsque différentes astuces sont associées au même objet à plusieurs emplacements, l'ordre de priorité suivant est appliqué : -#### Other help features +1. structure (priorité la plus faible) +2. éditeur de formulaire +3. Commande **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-HELP-TIP.301-4128221.en.html)** (haute priorité) -You can also associate help messages with form objects in two other ways: -- at the level of the database structure (fields only). In this case, the help tip of the field is displayed in every form where it appears. For more information, refer to “Help Tips†in [Field properties](https://doc.4d.com/4Dv17R5/4D/17-R5/Field-properties.300-4163580.en.html). -- using the **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-HELP-TIP.301-4128221.en.html)** command, for the current process. +#### Voir également -When different tips are associated with the same object in several locations, the following priority order is applied: +[Placeholder](properties_Entry.md#placeholder) -1. structure level (lowest priority) -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 diff --git a/website/translated_docs/fr/FormObjects/properties_Hierarchy.md b/website/translated_docs/fr/FormObjects/properties_Hierarchy.md index c5b616a78ab90d..bb8fef26ac3f03 100644 --- a/website/translated_docs/fr/FormObjects/properties_Hierarchy.md +++ b/website/translated_docs/fr/FormObjects/properties_Hierarchy.md @@ -3,25 +3,24 @@ id: propertiesHierarchy title: Hiérarchie --- -* * * - +--- ## List box hiérarchique - -`Array type list boxes` +`List box de type tableau` 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. 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. -See [Hierarchical list boxes](listbox_overview.md#hierarchical-list-boxes) +Voir [List box hiérarchiques](listbox_overview.md#hierarchical-list-boxes) + -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ---------- | --------------- | ------------------------------------------------ | -| datasource | string array | Collection of array names defining the hierarchy | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | -------------------------------------------------------- | +| datasource | tableau chaîne | Collection de noms de tableaux définissant la hiérarchie | #### Objets pris en charge -[List Box](listbox_overview.md) \ No newline at end of file +[List Box](listbox_overview.md) diff --git a/website/translated_docs/fr/FormObjects/properties_ListBox.md b/website/translated_docs/fr/FormObjects/properties_ListBox.md index 96dd687b1c81a4..7b7698008be94a 100644 --- a/website/translated_docs/fr/FormObjects/properties_ListBox.md +++ b/website/translated_docs/fr/FormObjects/properties_ListBox.md @@ -3,18 +3,16 @@ id: propertiesListBox title: List Box --- -* * * - +--- ## Columns -Collection of columns of the list box. +Collection de colonnes de la list box. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------- | ---------------------------- | ------------------------------------------------ | -| columns | collection of column objects | Contains the properties for the list box columns | - +| Nom | Type de données | Valeurs possibles | +| ------- | --------------------------- | ------------------------------------------------ | +| columns | collection d'objets colonne | Contient les propriétés des colonnes de list box | For a list of properties supported by column objects, please refer to the [Column Specific Properties](listbox_overview#column-specific-properties) section. @@ -22,226 +20,230 @@ For a list of properties supported by column objects, please refer to the [Colum [List Box](listbox_overview.md) -* * * - +--- ## Nom formulaire détaillé +`Liste box sélection` -`Selection type list box` - -Specifies the form to use for modifying or displaying individual records of the list box. +Indique le formulaire à utiliser pour modifier ou afficher les enregistrements individuels de la 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". + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| detailForm | string |
      • Name (string) of table or project form
      • POSIX path (string) to a .json file describing the form
      • Object describing the form | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + + + +--- +## Double-clic sur ligne +`Liste box sélection` + +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). + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------------------- | --------------- | ----------------------------------- | +| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + +--- +## Ensemble surlignage + +`Liste box sélection` + +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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ----------------- | +| highlightSet | string | Name of the set | + +#### Objets pris en charge + +[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). + +### Nombre de colonnes verrouillées + +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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------------- | --------------- | ----------------- | +| lockedColumnCount | integer | minimum : 0 | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + +### Nombre de colonnes statiques + +Number of columns that cannot be moved during execution. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------------- | --------------- | ----------------- | +| staticColumnCount | integer | minimum : 0 | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + + + +--- +## Nombre de colonnes + +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). + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ----------------- | +| columnCount | integer | minimum: 1 | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + +--- +## Tableau de contrôle des lignes + +`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 | Valeur | Commentaire | +| ------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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). Par exemple : + +```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 +``` + #### Grammaire JSON -* Name (string) of table or project form - * POSIX path (string) to a .json file describing the form - * Object describing the form - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Double-clic sur ligne - - `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). - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------------------- | --------------- | ----------------------------------- | - | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Ensemble surlignage - - `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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------ | --------------- | ----------------- | - | highlightSet | string | Name of the set | - - - #### Objets pris en charge - - [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). - ### Nombre de colonnes verrouillées - - 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----------------- | --------------- | ----------------- | - | lockedColumnCount | integer | minimum : 0 | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - ### Nombre de colonnes statiques - - Number of columns that cannot be moved during execution. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----------------- | --------------- | ----------------- | - | staticColumnCount | integer | minimum : 0 | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Nombre de colonnes - - 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). - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----------- | --------------- | ----------------- | - | columnCount | integer | minimum: 1 | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Tableau de contrôle des lignes - - `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 | Valeur | Commentaire | - | ------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | 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). Par exemple: - - ```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 - ``` - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------------- | --------------- | ---------------------- | - | rowControlSource | string | Row control array name | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Mode de sélection - - 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. - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------- | --------------- | ---------------------------- | - | selectionMode | string | "multiple", "single", "none" | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| ---------------- | --------------- | ---------------------- | +| rowControlSource | string | Row control array name | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + +--- +## Mode de sélection + +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. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------- | --------------- | ---------------------------- | +| selectionMode | string | "multiple", "single", "none" | + +#### Objets pris en charge + +[List Box](listbox_overview.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_Object.md b/website/translated_docs/fr/FormObjects/properties_Object.md index b3b0b33d9792e2..ba25b3bda375e7 100644 --- a/website/translated_docs/fr/FormObjects/properties_Object.md +++ b/website/translated_docs/fr/FormObjects/properties_Object.md @@ -3,14 +3,14 @@ id: propertiesObject title: Objets --- -* * * - +--- ## Type -`MANDATORY SETTING` + `PARAMETRAGE OBLIGATOIRE` This property designates the type of the [active or inactive form object](formObjects_overview.md). + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | @@ -22,16 +22,17 @@ This property designates the type of the [active or inactive form object](formOb [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) -* * * +--- ## Nom d'objet 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. #### Grammaire JSON @@ -40,13 +41,12 @@ For more information about naming rules for form objects, refer to [Identifiers] | ---- | --------------- | -------------------------------------------------------------------- | | name | string | Any allowed name which does not belong to an already existing object | - #### Objets pris en charge [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) -* * * +--- ## Save value This property is available when the [Save Geometry](FormEditor/properties_FormProperties.md#save-geometry) option is checked for the form. @@ -69,38 +69,48 @@ Here is the list of objects whose value can be saved: | ------------- | --------------- | ----------------- | | memorizeValue | boolean | true, false | - #### Objets pris en charge [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Radio Button](radio_overview.md) - [Tab control](tabControl.md) -* * * + +--- ## Variable ou expression -> See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. +> See also **[Expression](properties_DataSource.md#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. Variables or expressions can be enterable or non-enterable and can receive data of the Text, Integer, Numeric, Date, Time, Picture, Boolean, or Object type. -### 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). +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSource | string, or string array |
      • 4D variable, field name, or any 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] | + + +### Expressions + +You can use an [expression](Concepts/quick-tour.md#expressions) as data source for an object. Any valid 4D expression is allowed: simple expression, object property, 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. When a variable is not named, when the form is loaded, 4D creates a new variable for the object, with a calculated name that is unique in the space of the process variables of the interpreter (which means that this mechanism can be used even in compiled mode). This temporary variable will be destroyed when the form is closed. In order for this principle to work in compiled mode, it is imperative that dynamic variables are explicitly typed. There are two ways to do this: -- You can set the type using the [Expression type](#expression-type) property. +- You can set the type using the [Expression type](#expression-type) property. - You can use a specific initialization code when the form is loaded that uses, for example, the `VARIABLE TO VARIABLE` command: ```4d @@ -112,7 +122,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. Par exemple: +In the 4D code, dynamic variables can be accessed using a pointer obtained with the `OBJECT Get pointer` command. Par exemple : ```4d // assign the time 12:00:00 to the variable for the "tstart" object @@ -125,205 +135,254 @@ 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. -### List box hiérarchique -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). + + + + +#### Objets pris en charge + +[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**](properties_DataSource.md#data-type-expression-type) in the Property List for [selection](listbox_overview.md#selection-list-boxes) and [collection](listbox_overview.md#collection-or-entity-selection-list-boxes) type list box columns and for [Drop-down Lists](dropdownList_Overview.md) associated to an [object](FormObjects/dropdownList_Overview.md#using-an-object) or an [array](FormObjects/dropdownList_Overview.md#using-an-array). + + +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 project compilation, you must [declare the variable](Concepts/variables.md#declaring-variables). + +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). + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 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", "time". *Array/selection list box only*: "integer", "object" | + +#### Objets pris en charge + +[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](FormEditor/createStylesheet.md#style-sheet-files). + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----- | --------------- | --------------------------------------------------------- | +| class | string | One string with CSS name(s) separated by space characters | + + +#### Objets pris en charge + +[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 ou 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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ------------------------------------------------------------ | +| dataSource | string | Expression that returns a collection or an entity selection. | + +#### Objets pris en charge + +[List Box](listbox_overview.md) + + + + + + +--- +## Source de données + +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. + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----------- | --------------- | ----------------------------------------------------------- | +| listboxType | string | "array", "currentSelection", "namedSelection", "collection" | + +#### Objets pris en charge + +[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. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| -------------- | --------------- | ------------------------------------------------------------- | +| pluginAreaKind | string | Name of the plug-in external area (starts with a % character) | + + +#### Objets pris en charge +[Zone de plug-in](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. #### Grammaire JSON -- 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] - #### Objets pris en charge - - [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). - #### Grammaire JSON - - - **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" - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----- | --------------- | --------------------------------------------------------- | - | class | string | One string with CSS name(s) separated by space characters | - - - #### Objets pris en charge - - [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 ou 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------- | --------------- | ------------------------------------------------------------ | - | dataSource | string | Expression that returns a collection or an entity selection. | - - - #### Objets pris en charge - - [List Box](listbox_overview.md) - - * * * - - ## Source de données - - 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. - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----------- | --------------- | ----------------------------------------------------------- | - | listboxType | string | "array", "currentSelection", "namedSelection", "collection" | - - - #### Objets pris en charge - - [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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | -------------- | --------------- | ------------------------------------------------------------- | - | pluginAreaKind | string | Name of the plug-in external area (starts with a % character) | - - - #### Objets pris en charge - - [Zone de plug-in](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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ---------- | --------------- | ----------------- | - | radioGroup | string | Radio group name | - - - #### Objets pris en charge - - [Bouton radio](radio_overview.md) - - * * * - - ## Titre de menu - - 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)). - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ----- | --------------- | ----------------- | - | Texte | string | any text | - - - #### Objets pris en charge - - [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 | Texte | Date | Heure | 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 | Entier long | - | Average | X | | | X | | | Réel | - | Standard deviation(*) | X | | | X | | | Réel | - | Variance(*) | X | | | X | | | Réel | - | Sum squares(*) | X | | | X | | | Réel | - | 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. - - #### Grammaire JSON - - | Nom | Type de données | Valeurs possibles | - | ------------------- | --------------- | ----------------------------------------------------------------------------------------------------- | - | variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | - - - #### Objets pris en charge - - [List Box Footer](listbox_overview.md#list-box-footers) \ No newline at end of file +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ----------------- | +| radioGroup | string | Radio group name | + + +#### Objets pris en charge + +[Bouton radio](radio_overview.md) + + + +--- + +## Titre de menu + +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 application 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)). + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ----- | --------------- | ----------------- | +| Texte | string | any text | + +#### Objets pris en charge + +[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`](https://doc.4d.com/4dv19/help/command/en/page1140.html) 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 | Texte | Date | Heure | Bool | Pict | footer var type | +| --------------------- | --- | ----- | ---- | ----- | ---- | ---- | ------------------- | +| Minimum | X | X | X | X | X | | Same as column type | +| Maximum | X | X | X | X | X | | Same as column type | +| Sum | X | | | X | X | | Same as column type | +| Count | X | X | X | X | X | X | Entier long | +| Average | X | | | X | | | Réel | +| Standard deviation(*) | X | | | X | | | Réel | +| Variance(*) | X | | | X | | | Réel | +| Sum squares(*) | X | | | X | | | Réel | +| Custom ("none") | X | X | X | X | X | X | Any | + +(*) Only for array type list boxes. + +> Seules les [variables](Concepts/variables.md) déclarées ou dynamiques peuvent être utilisées pour afficher les calculs des pieds de listbox. Les autres types d'[expressions](Concepts/quick-tour.md#expressions) telles que `Form.sortValue` ne sont pas pris en charge. + +Automatic calculations ignore the shown/hidden state of list box rows. If you want to restrict a calculation to only visible rows, you must use a custom calculation. + +*Null* values are not taken into account for any calculations. + +If the column contains different types of values (collection-based column for example): + +- Average and Sum only take numerical elements into account (other element types are ignored). +- Minimum and Maximum return a result according to the usual type list order as defined in the [collection.sort()](API/CollectionClass.md#sort) function. + +Using automatic calculations in footers of columns based upon expressions has the following limitations: + +- it is **supported** with all list box types when the expression is "simple" (such as `[table]field` or `this.attribute`), +- it is **supported but not recommended** for performance reasons with collection/entity selection list boxes when the expression is "complex" (other than `this.attribute`) and the list box contains a large number of rows, +- it is **not supported** with current selection/named selection list boxes when the expression is "complex". You need to use custom calculations. + +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. + + +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ------------------- | --------------- | ----------------------------------------------------------------------------------------------------- | +| variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | + +#### Objets pris en charge + +[List Box Footer](listbox_overview.md#list-box-footers) + + + + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Picture.md b/website/translated_docs/fr/FormObjects/properties_Picture.md index 24962e92ed0a5c..c4e0ad8ff16210 100644 --- a/website/translated_docs/fr/FormObjects/properties_Picture.md +++ b/website/translated_docs/fr/FormObjects/properties_Picture.md @@ -3,31 +3,32 @@ id: propertiesPicture title: Image --- -* * * +--- +## Chemin d'accès -## Pathname +Chemin d'une image source statique pour un [bouton image](pictureButton_overview.md), [un menu pop-up ](picturePopupMenu_overview.md) ou une [image ou une image statique](staticPicture.md). Vous devez utiliser la syntaxe POSIX. -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. +Deux emplacements principaux peuvent être utilisés pour le chemin d'image statique : -Two main locations can be used for static picture path: +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. Dans ce cas, le chemin d'accès se trouve dans "/RESOURCES/\". +- dans un dossier d'images (nommé **Images** par exemple) dans le dossier du formulaire. Convient lorsque les images statiques sont utilisées uniquement dans le formulaire et/ou lorsque vous souhaitez pouvoir déplacer ou dupliquer le formulaire entier dans un ou plusieurs projets. Dans ce cas, le chemin d'accès est "\" et est déterminé à la racine du dossier du formulaire. -- 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/\". -- 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. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -|:-------:|:---------------:| ------------------------------------------- | -| picture | Texte | Relative or filesystem path in POSIX syntax | +| Nom | Type de données | Valeurs possibles | +|:-------:|:---------------:| --------------------------------------------- | +| picture | Texte | Chemin relatif ou filesystem en syntaxe POSIX | #### Objets pris en charge -[Picture button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Static Picture](staticPicture.md) +[Bouton image](pictureButton_overview.md) - [Pop-up Menu image](picturePopupMenu_overview.md) - [Image statique](staticPicture.md) + -* * * +--- +## Affichage -## Display ### Scaled to fit @@ -47,25 +48,26 @@ 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) + + +### Centre / Tronquée (non centrée) `JSON grammar: "truncatedCenter" / "truncatedTopLeft"` -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. +Le format **Centre** permet à 4D de centrer l'image dans la zone et de rogner toute partie qui ne rentre pas dans la zone. 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) + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------- | --------------- | -------------------------------------------------------- | | pictureFormat | string | "scaled", "tiled", "truncatedCenter", "truncatedTopLeft" | - #### Objets pris en charge -[Static Picture](staticPicture.md) \ No newline at end of file +[Image statique](staticPicture.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_Plugins.md b/website/translated_docs/fr/FormObjects/properties_Plugins.md index 900d2e7ad986eb..fad27044bd861e 100644 --- a/website/translated_docs/fr/FormObjects/properties_Plugins.md +++ b/website/translated_docs/fr/FormObjects/properties_Plugins.md @@ -3,21 +3,23 @@ id: propertiesPlugIns title: Plug-ins --- -* * * +--- +## Propriétés avancées + +Si des options avancées sont fournies par l'auteur du plug-in, un bouton **Propriétés avancées** peut être activé dans la liste de propriétés. Dans ce cas, vous pouvez cliquer sur ce bouton pour définir ces options, généralement via une boîte de dialogue personnalisée. -## Advanced Properties +Étant donné que la fonction Propriétés avancées est sous le contrôle de l'auteur du plug-in, les informations sur ces options avancées relèvent de la responsabilité du distributeur du plug-in. -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. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ---------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| customProperties | Texte | Plugin specific properties, passed to plugin as a JSON string if an object, or as a binary buffer if a base64 encoded string | +| Nom | Type de données | Valeurs possibles | +| ---------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| customProperties | Texte | Propriétés spécifiques du plug-in, passées au plug-in sous forme de chaîne JSON s'il s'agit d'un objet ou sous forme de tampon binaire s'il s'agit d'une chaîne encodée en base64 | #### Objets pris en charge -[Zone de plug-in](pluginArea_overview.md) \ No newline at end of file +[Zone de plug-in](pluginArea_overview.md) + diff --git a/website/translated_docs/fr/FormObjects/properties_Print.md b/website/translated_docs/fr/FormObjects/properties_Print.md index 8bc0d0d39a4476..a20df95975ca6a 100644 --- a/website/translated_docs/fr/FormObjects/properties_Print.md +++ b/website/translated_docs/fr/FormObjects/properties_Print.md @@ -3,33 +3,34 @@ id: propertiesPrint title: Imprimer --- -* * * +--- +## Impression cadre + +Cette propriété permet de gérer le mode d'impression des objets dont la taille peut varier d'un enregistrement à l'autre en fonction de leur contenu. Ces objets peuvent être imprimés sur une hauteur de taille fixe ou variable. Un cadre de taille fixe provoque l’impression de l’objet dans les limites définies lors de la création de l’objet dans le formulaire. Un cadre de taille variable s’étend si nécessaire lors de l’impression afin d’imprimer l’intégralité de l’objet. A noter que la largeur des objets imprimés en taille variable n'est pas affectée par cette option; seule la hauteur varie automatiquement en fonction du contenu de l'objet. -## Print frame +Vous ne pouvez pas placer deux objets (ou plus) avec une taille variable côte à côte dans un formulaire. Vous pouvez placer des objets de taille fixe à côté d’un objet qui sera imprimé avec une taille variable si l’objet de taille variable est plus long d’au moins une ligne que l’objet placé à son côté et que leurs limites supérieures sont alignées. Si cette condition n’est pas respectée, le contenu des autres champs sera répété pour toute tranche horizontale de l’objet de taille variable. -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. +> Les commandes `Print object` et `Print form` ne sont pas compatibles avec cette option. -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. -> The `Print object` and `Print form` commands do not support this property. +Les options d'impression sont les suivantes : -The print options are: +- L'option **Variable** / **Impression taille variable** cochée : 4D agrandit ou réduit la zone de l'objet du formulaire afin d'imprimer tous les sous-enregistrements. -- **Variable** option / **Print Variable Frame** checked: 4D enlarges or reduces the form object area in order to print all the subrecords. +- L'option **Fixe (Tronqué)** / **Impression taille variable** non cochée : 4D imprime uniquement le contenu qui apparaît dans la zone de l'objet. Le formulaire n'est imprimé qu'une seule fois et le contenu non imprimé est ignoré. -- **Fixed (Truncation)** option / **Print Variable Frame** unchecked: 4D only prints the contents that appear in the object area. The form is only printed once and the contents not printed are ignored. +- **Fixe (Enregistrements multiples)** (sous-formulaires uniquement) : la taille initiale de la zone de sous-formulaire est conservée mais 4D imprime le formulaire plusieurs fois afin d'imprimer tous les enregistrements. -- **Fixed (Multiple Records)** (subforms only): the initial size of the subform area is kept but 4D prints the form several times in order to print all the records. +> Cette propriété peut être définie par programmation à l'aide de la commande `OBJECT SET PRINT VARIABLE FRAME`. -> This property can be set by programming using the `OBJECT SET PRINT VARIABLE FRAME` command. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -|:----------:|:---------------:| --------------------------------------------------- | -| printFrame | string | "fixed", "variable", (subform only) "fixedMultiple" | +| Nom | Type de données | Valeurs possibles | +|:----------:|:---------------:| ----------------------------------------------------------------- | +| printFrame | string | "fixed", "variable", (sous-formulaire uniquement) "fixedMultiple" | #### Objets pris en charge -[Input](input_overview.md) - [Subforms](subform_overview.md) (list subforms only) - [4D Write Pro areas](writeProArea_overview.md) \ No newline at end of file +[Zone de saisie](input_overview.md) - [Sous-formulaires](subform_overview.md) (sous-formulaires liste uniquement) - [Zones 4D Write Pro](writeProArea_overview.md) diff --git a/website/translated_docs/fr/FormObjects/properties_RangeOfValues.md b/website/translated_docs/fr/FormObjects/properties_RangeOfValues.md index 5fa196ec38d71c..eac186cade2a51 100644 --- a/website/translated_docs/fr/FormObjects/properties_RangeOfValues.md +++ b/website/translated_docs/fr/FormObjects/properties_RangeOfValues.md @@ -3,14 +3,12 @@ id: propertiesRangeOfValues title: Plage de valeurs --- -* * * - -## Default value +--- +## Valeur par défaut 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 @@ -25,7 +23,6 @@ The default value can only be used if the [data source type](properties_Object.m | #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. @@ -36,47 +33,51 @@ You can use a sequence number to create a unique number for each record in the t | ------------ | ----------------------------------- | ------------------------------------------ | | defaultValue | string, number, date, time, boolean | Any value and/or a stamp: "#D", "#H", "#N" | - #### Objets pris en charge [Input](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. Si une valeur exclue est saisie, elle n'est pas acceptée et un message d'erreur s'affiche. > If a specified list is hierarchical, only the items of the first level are taken into account. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------- | -------------------------------- | -| excludedList | list | A list of values to be excluded. | - +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ------------------------------- | +| excludedList | liste | Une liste de valeurs à exclure. | #### Objets pris en charge [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. +--- + +## Required List -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. +Limite les entrées valides aux éléments de la liste. Par exemple, si vous souhaitez utiliser une liste pour les titres de postes, afin que les entrées valides soient limitées aux titres qui ont été approuvés par la direction. +La création d'une liste obligatoire n'affiche pas automatiquement la liste lorsque le champ est sélectionné. Si vous souhaitez afficher la liste requise, assignez la même liste à la propriété [Choice List](properties_DataSource.md#choice-list). Cependant, contrairement à la propriété [Choice List](properties_DataSource.md#choice-list), lorsqu'une liste obligatoire est définie, la saisie au clavier n'est plus possible, seule la sélection d'une valeur de liste à l'aide du pop-up menu est autorisée. 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. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------------ | --------------- | --------------------------- | -| requiredList | list | A list of mandatory values. | - +| Nom | Type de données | Valeurs possibles | +| ------------ | --------------- | ---------------------------------- | +| requiredList | liste | Une liste de valeurs obligatoires. | #### Objets pris en charge -[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/fr/FormObjects/properties_Reference.md b/website/translated_docs/fr/FormObjects/properties_Reference.md index 182280c891cac0..b9064a75d08fcc 100644 --- a/website/translated_docs/fr/FormObjects/properties_Reference.md +++ b/website/translated_docs/fr/FormObjects/properties_Reference.md @@ -4,216 +4,201 @@ title: Liste de propriétés JSON --- Vous trouverez dans cette page une liste complète de toutes les propriétés d'objets triées selon leur nom JSON. Cliquez sur un nom de propriété pour accéder à sa description détaillée. - > Dans le chapitre "Propriétés des objets de formulaire", les propriétés sont triées en fonction des noms et des thèmes de la liste des propriétés. + [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) -| Propriété | Description | Valeurs possibles | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| a | | | -| [action](properties_Action.md#standard-action) | Une action à exécuter. | Nom d'une action standard valide. | -| [allowFontColorPicker](properties_Text.md#allow-font-color-picker) | Permet d'afficher le sélecteur de polices système ou le sélecteur de couleurs pour modifier les attributs d'un objet | true, false (par défaut) | -| [alternateFill](properties_BackgroundAndBorder.md#alternate-background-color) | Permet de définir une couleur d'arrière-plan différente pour les lignes / colonnes impaires dans une list box. | Toute valeur CSS; "transparent"; "automatic" | -| [automaticInsertion](properties_DataSource.md#automatic-insertion) | Permet d'ajouter automatiquement une valeur à une liste lorsqu'un utilisateur saisit une valeur qui ne se trouve pas dans l'énumération associée à l'objet. | true, false | -| **b** | | | -| [booleanFormat](properties_Display.md#text-when-false-text-when-true) | Indique seulement deux valeurs possibles. | true, false | -| [borderRadius](properties_CoordinatesAndSizing.md#corner-radius) | La valeur du rayon d'arrondi pour les rectangles à coins arrondis. | minimum : 0 | -| [borderStyle](properties_BackgroundAndBorder.md#border-line-style-dotted-line-type) | Permet de définir un style standard pour la bordure de l'objet. | "system", "none", "solid", "dotted", "raised", "sunken", "double" | -| [bottom](properties_CoordinatesAndSizing.md#bottom) | Positionne un objet en bas (centré). | minimum : 0 | -| **c** | | | -| [choiceList](properties_DataSource.md#choice-list) | Associe une énumération à un objet | Une énumération | -| [class](properties_Object.md#css-class) | A list of space-separated words used as class selectors in css files. | Une liste de noms de classes | -| [columnCount](properties_Crop.md#columns) | Number of columns. | minimum: 1 | -| [columns](properties_ListBox.md#columns) | A collection of list box columns | Collection d'objets colonne avec des propriétés de colonnes définies | -| [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" (pour les colonnes booléen / numérique), "automatic", "popup" (uniquement pour les colonnes booléens) | -| [currentItemSource](properties_DataSource.md#current-item) | The last selected item in a list box. | Expression d'objet | -| [currentItemPositionSource](properties_DataSource.md#current-item-position) | The position of the last selected item in a list box. | Expression numérique | -| [customBackgroundPicture](properties_TextAndPicture.md#background-pathname) | Sets the picture that will be drawn in the background of a button. | Chemin relatif en syntaxe POSIX. Doit être utilisé avec l'option "Personnalisé" de la propriété "Style". | -| [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. | minimum : 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. | minimum : 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. | minimum : 0 | -| [customProperties](properties_Plugins.md#advanced-properties) | Advanced properties (if any) | Chaîne JSON ou chaîne encodée en base64 | -| **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 | -| [entryFilter](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** | | | -| [border-style](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_Headers.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) | Désigne l'emplacement d'une icône par rapport à l'objet formulaire. | "aucun", "gauche", "droite" | -| **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 | Une énumération | -| [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" (par défaut), "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. La variable est mise à jour automatiquement par 4D. Il n’est pas possible de la modifier manuellement. | 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. | Tableau | -| [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 "" | -| [Texte](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. | Une 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" (sauf 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 + +| Propriété | Description | Valeurs possibles | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **a** | | | +| [`action`](properties_Action.md#standard-action) | Une action à exécuter. | Nom d'une action standard valide. | +| [`allowFontColorPicker`](properties_Text.md#allow-font-color-picker) | Permet d'afficher le sélecteur de polices système ou le sélecteur de couleurs pour modifier les attributs d'un objet | true, false (par défaut) | +| [`alternateFill`](properties_BackgroundAndBorder.md#alternate-background-color) | Permet de définir une couleur d'arrière-plan différente pour les lignes / colonnes impaires dans une list box. | Any CSS value; "transparent"; "automatic"; "automaticAlternate" | +| [`automaticInsertion`](properties_DataSource.md#automatic-insertion) | Permet d'ajouter automatiquement une valeur à une liste lorsqu'un utilisateur saisit une valeur qui ne se trouve pas dans l'énumération associée à l'objet. | true, false | +| **b** | | | +| [`booleanFormat`](properties_Display.md#text-when-false-text-when-true) | Indique seulement deux valeurs possibles. | true, false | +| [`borderRadius`](properties_CoordinatesAndSizing.md#corner-radius) | La valeur du rayon d'arrondi pour les rectangles à coins arrondis. | minimum : 0 | +| [`borderStyle`](properties_BackgroundAndBorder.md#border-line-style-dotted-line-type) | Permet de définir un style standard pour la bordure de l'objet. | "system", "none", "solid", "dotted", "raised", "sunken", "double" | +| [`bottom`](properties_CoordinatesAndSizing.md#bottom) | Positionne un objet en bas (centré). | minimum : 0 | +| **c** | | | +| [`choiceList`](properties_DataSource.md#choice-list) | Associe une énumération à un objet | Une énumération | +| [`class`](properties_Object.md#css-class) | Une liste de mots séparés par des espaces utilisés comme sélecteurs de classe dans les fichiers css. | Une liste de noms de classes | +| [`columnCount`](properties_Crop.md#columns) | Nombre de colonnes. | minimum: 1 | +| [`columns`](properties_ListBox.md#columns) | Une collection de colonnes list box | Collection d'objets colonne avec des propriétés de colonnes définies | +| [`contextMenu`](properties_Entry.md#context-menu) | Fournit à l'utilisateur l'accès à un menu contextuel standard dans la zone sélectionnée. | "automatic", "none" | +| [`continuousExecution`](properties_Action.md#execute-object-method) | Indique s'il faut exécuter non la méthode d'un objet pendant que l'utilisateur suit le contrôle. | true, false | +| [`controlType`](properties_Display.md#display-type) | Indique comment la valeur doit être retournée dans une cellule de listbox. | "input", "checkbox" (pour les colonnes booléen / numérique), "automatic", "popup" (uniquement pour les colonnes booléens) | +| [`currentItemSource`](properties_DataSource.md#current-item) | Le dernier élément sélectionné dans une list box. | Expression d'objet | +| [`currentItemPositionSource`](properties_DataSource.md#current-item-position) | The position of the last selected item in a list box. | Expression numérique | +| [`customBackgroundPicture`](properties_TextAndPicture.md#background-pathname) | Sets the picture that will be drawn in the background of a button. | Chemin relatif en syntaxe POSIX. Doit être utilisé avec l'option "Personnalisé" de la propriété "Style". | +| [`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. | minimum : 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. | minimum : 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. | minimum : 0 | +| [`customProperties`](properties_Plugins.md#advanced-properties) | Advanced properties (if any) | Chaîne JSON ou chaîne encodée en base64 | +| **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-expression-type) (list box column, drop-down list) | Indicates the variable type. | "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "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" ou "" 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" (hors énumération, list box) | +| [`dropping`](properties_Action.md#droppable) | Enables dropping function. | "none", "custom", "automatic" (hors énumération, 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 | +| [`entryFilter`](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`](Events/overview.md) | Liste de tous les événements sélectionnés pour l'objet ou le formulaire | Collection de noms d'événements, ex : ["onClick","onDataChange"...]. | +| [`excludedList`](properties_RangeOfValues.md#excluded-list) | Allows setting a list whose values cannot be entered in the column. | Une liste de valeurs à exclure. | +| **f** | | | +| [`border-style`](properties_BackgroundAndBorder.md#background-color-fill-color) | Définit la couleur de fond d'un objet. | 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. | Nom d'une famille de police CSS | +| [`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) | Le texte sélectionné est légèrement penché vers la droite. | "normal", "italic" | +| [`fontTheme`](properties_Text.md#font-theme) | Sets the automatic style | "normal", "main", "additional" | +| [`fontWeight`](properties_Text.md#bold) | Le texte sélectionné est plus foncé et plus épais. | "normal", "bold" | +| [`footerHeight`](properties_Headers.md#height) | Used to set the row height | pattern (\\d+)(p|em)?$ (positive decimal + px/em ) | +| [`frameDelay`](properties_Animation.md#switch-every-x-ticks) | Permet de parcourir le contenu du bouton d'image à la vitesse spécifiée (en graduations). | minimum : 0 | +| **g** | | | +| [`graduationStep`](properties_Scale.md#graduation-step) | Mesure de l'affichage de l'échelle. | minimum : 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 | 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) | Définit la couleur des lignes horizontales dans une list box (gris par défaut). | 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. | Chemin relatif ou filesystem en syntaxe POSIX. | +| [`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) | Désigne l'emplacement d'une icône par rapport à l'objet formulaire. | "aucun", "gauche", "droite" | +| **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) (tab control) | Indique l'emplacement du texte d'un objet. | "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 | Une énumération | +| [`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) | Les images sont affichées en boucle continue. | 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 (pour les types de données numériques) | +| [`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) | Le nom d'une méthode projet. | Le nom d'une méthode projet existante | +| [`methodsAccessibility`](properties_WebArea.md#access-4d-methods) | Which 4D methods can be called from a Web area | "none" (par défaut), "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 (pour les types de données numériques) | +| [`minWidth`](properties_CoordinatesAndSizing.md#minimum-width) | Designates the smallest size allowed for list box columns. | minimum : 0 | +| [`movableRows`](properties_Action.md#movable-rows) | Autorise le déplacement des lignes pendant l'exécution. | 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 | Chemin relatif ou filesystem en syntaxe POSIX. | +| [`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", (sous-formulaire uniquement) "fixedMultiple" | +| [`progressSource`](properties_WebArea.md#progression) | A value between 0 and 100, representing the page load completion percentage in the Web area. La variable est mise à jour automatiquement par 4D. Il n’est pas possible de la modifier manuellement. | 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. | Une liste de valeurs obligatoires. | +| [`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. | Tableau | +| [`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. | Nom d'une variable tableau 4D. | +| [`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** | | | +| [`saveAs`](properties_DataSource.md#save-as) (list box column)
        [`saveAs`](properties_DataSource.md#data-type-list) (drop-down list) | The type of contents to save in the field or variable associated to the form object | "value", "reference" | +| [`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) | Affiche/masque les graduations à côté des étiquettes. | 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) | Lorsqu'un objet splitter a cette propriété, les autres objets à sa droite (splitter vertical) ou en dessous (splitter horizontal) sont poussés en même temps que le splitter, sans arrêt. | "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) | Intervalle minimum accepté entre les valeurs pendant l'utilisation. Pour les steppers numériques, cette propriété représente les secondes lorsque l'objet est associé à une valeur de type heure et représente les jours lorsqu'il est associé à une valeur de type date. | 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_Text.md#font-color) (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) | Désigne l'épaisseur d'une ligne. | An integer or 0 for smallest width on a printed form | +| [`style`](properties_TextAndPicture.md#multi-style) | Permet de définir l'apparence générale du bouton. Pour plus d'informations, voir Style de bouton. | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | +| [`styledText`](properties_Text.md#style) | Permet d'utiliser des styles spécifiques dans la zone sélectionnée. | true, false | +| [`switchBackWhenReleased`](properties_Animation.md#switch-back-when-released) | Affiche la première image en permanence, sauf lorsque l'utilisateur clique sur le bouton. Affiche la deuxième image jusqu'à ce que le bouton de la souris soit relâché. | true, false | +| [`switchContinuously`](properties_Animation.md#switch-continuously-on-clicks) | Permet à l'utilisateur de maintenir le bouton de la souris enfoncé pour afficher les images en continu (c'est-à-dire sous forme d'animation). | true, false | +| [`switchWhenRollover`](properties_Animation.md#switch-when-roll-over) | Modifie le contenu du bouton image lorsque le curseur de la souris passe dessus. L'image initiale s'affiche lorsque le curseur quitte la zone du bouton. | true, false | +| **t** | | | +| [`table`](properties_Subform.md#source) | Table that the list subform belongs to (if any). | 4D table name, or "" | +| [`Texte`](properties_Object.md#title) | The title of the form object | Any text | +| [`textAlign`](properties_Text.md#horizontal-alignment) | Emplacement horizontal du texte dans la zone où il apparait. | "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. | Une URL. | +| [`useLastFrameAsDisabled`](properties_Animation.md#use-last-frame-as-disabled) | Permet de définir la dernière vignette comme étant celle à afficher lorsque le bouton est désactivé. | 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) | Emplacement vertical du texte dans la zone où il apparait. | "automatic", "top", "middle", "bottom" | +| [`verticalLineStroke`](properties_Gridlines.md#vertical-line-color) | Définit la couleur des lignes verticales d'une list box (gris par défaut). | 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) | diff --git a/website/translated_docs/fr/FormObjects/properties_ResizingOptions.md b/website/translated_docs/fr/FormObjects/properties_ResizingOptions.md index 10cd043c6c24dc..ac7799e4bf4070 100644 --- a/website/translated_docs/fr/FormObjects/properties_ResizingOptions.md +++ b/website/translated_docs/fr/FormObjects/properties_ResizingOptions.md @@ -3,8 +3,7 @@ id: propertiesResizingOptions title: Options de redimensionnement --- -* * * - +--- ## Redimensionnement colonnes auto 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,33 +30,33 @@ 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). + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------ | --------------- | ----------------------- | | resizingMode | string | "rightToLeft", "legacy" | - #### Objets pris en charge [List Box](listbox_overview.md) -* * * -## Dimensionnement horizontal -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: +--- +## Dimensionnement horizontal -| Option | Valeur JSON | 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 | +Cette propriété indique si la taille horizontale d'un objet doit être déplacée ou redimensionnée lorsqu'un utilisateur redimensionne le formulaire. Elle peut également être définie dynamiquement par la commande de langage `OBJECT SET RESIZING OPTIONS`. +Trois options sont disponibles : -> This property works in conjunction with the [Vertical Sizing](#vertical-sizing) property. +| Option | Valeur JSON | Résultat | +| -------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| Agrandir | "grow" | Le même pourcentage est appliqué à la largeur de l'objet lorsque l'utilisateur redimensionne la largeur de la fenêtre, | +| Déplacer | "move" | L'objet est déplacé vers la gauche ou vers la droite selon l'augmentation de la largeur lorsque l'utilisateur redimensionne la largeur de la fenêtre, | +| Aucun | "fixed" | L'objet reste stationnaire lorsque le formulaire est redimensionné | +> Cette propriété fonctionne avec la propriété [Dimensionnement vertical](#vertical-sizing). #### Grammaire JSON @@ -65,27 +64,24 @@ Three options are available: | ------- | --------------- | ----------------------- | | sizingX | string | "grow", "move", "fixed" | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) -* * * +--- ## Dimensionnement 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: +Cette propriété indique si la taille verticale d'un objet doit être déplacée ou redimensionnée lorsqu'un utilisateur redimensionne le formulaire. Elle peut également être définie dynamiquement par la commande de langage `OBJECT SET RESIZING OPTIONS`. -| Option | Valeur JSON | 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 | +Trois options sont disponibles : - -> This property works in conjunction with the [Horizontal Sizing](#horizontal-sizing) property. +| Option | Valeur JSON | Résultat | +| -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| Agrandir | "grow" | Le même pourcentage est appliqué à la hauteur de l'objet lorsque l'utilisateur redimensionne la largeur de la fenêtre, | +| Déplacer | "move" | L'objet est déplacé vers le haut ou vers le bas selon l'augmentation de la hauteur lorsque l'utilisateur redimensionne la largeur de la fenêtre, | +| Aucun | "fixed" | L'objet reste stationnaire lorsque le formulaire est redimensionné | +> Cette propriété fonctionne avec la propriété [Dimensionnement horizontal](#horizontal-sizing). #### Grammaire JSON @@ -93,41 +89,43 @@ Three options are available: | ------- | --------------- | ----------------------- | | sizingY | string | "grow", "move", "fixed" | - #### Objets pris en charge -[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) +[Zone 4D View Pro](viewProArea_overview.md) - [Zone 4D Write Pro](writeProArea_overview.md) - [Bouton](button_overview.md) - [Grille de boutons](buttonGrid_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Ligne](shapes_overview.md#line) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Ovale](shapes_overview.md#oval) - [Bouton image](pictureButton_overview.md) - [Pop up menu image](picturePopupMenu_overview.md) - [Zone de plug-in](pluginArea_overview.md#overview) - [Indicateur de progression](progressIndicator.md) - [Bouton radio](radio_overview.md) - [Règle](ruler.md) - [ Rectangle](shapes_overview.md#rectangle) - [Spinner](spinner.md) - [Splitter](splitters.md) - [Image statique](staticPicture.md) [Stepper](stepper.md) - [Sous-formulaire](subform_overview.md) - [Onglet](tabControl.md) - [Zone de texte](text.md) + -* * * -## Pusher +--- +## Pousseur -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. +Lorsqu'un objet splitter a cette propriété, les autres objets à sa droite (splitter vertical) ou en dessous (splitter horizontal) sont poussés en même temps que le splitter, sans arrêt. -Here is the result of a “pusher†splitter being moved: ![](assets/en/FormObjects/splitter_pusher1.png) +Voici le résultat du déplacement d'un splitter «pousseur» : ![](assets/en/FormObjects/splitter_pusher1.png) ![](assets/en/FormObjects/splitter_pusher3.png) -When this property is not applied to the splitter, the result is as follows: +Lorsque cette propriété n'est pas appliquée au splitter, le résultat est le suivant : ![](assets/en/FormObjects/splitter_pusher2.png) + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | |:------------ |:---------------:|:------------------------------------:| | splitterMode | string | "move" (pusher), "resize" (standard) | - #### Objets pris en charge [Séparateur](splitterTabControlOverview#splitters) -* * * -## Resizable -Designates if the size of the column can be modified by the user. + +--- +## Redimensionnable + +Indique si la taille de la colonne peut être modifiée par l'utilisateur. #### Grammaire JSON @@ -135,7 +133,12 @@ Designates if the size of the column can be modified by the user. |:--------- |:---------------:|:-----------------:| | resizable | boolean | "true", "false" | - #### Objets pris en charge -[List Box Column](listbox_overview.md#list-box-columns) \ No newline at end of file +[Colonne de list box](listbox_overview.md#list-box-columns) + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Scale.md b/website/translated_docs/fr/FormObjects/properties_Scale.md index 047ae895b5cfe7..927f9d88f32b2b 100644 --- a/website/translated_docs/fr/FormObjects/properties_Scale.md +++ b/website/translated_docs/fr/FormObjects/properties_Scale.md @@ -3,11 +3,10 @@ id: propertiesScale title: Echelle --- -* * * - +--- ## Barber shop -Enables the "barber shop" variant for the thermometer. +Active la variante «barber shop» pour le thermomètre. #### Grammaire JSON @@ -15,16 +14,16 @@ Enables the "barber shop" variant for the thermometer. |:---------------:|:---------------:| ----------------------------------------------------------- | | [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | - #### Objets pris en charge [Barber shop](progressIndicator.md#barber-shop) -* * * -## Display graduation -Displays/Hides the graduations next to the labels. +--- +## Afficher graduation + +Affiche/masque les graduations à côté des étiquettes. #### Grammaire JSON @@ -32,16 +31,16 @@ Displays/Hides the graduations next to the labels. |:---------------:|:---------------:| ----------------- | | showGraduations | boolean | "true", "false" | - #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[Thermomètre](progressIndicator.md#thermometer) - [Règle](ruler.md#ruler) + -* * * +--- ## Graduation step -Scale display measurement. +Mesure de l'affichage de l'échelle. #### Grammaire JSON @@ -52,17 +51,18 @@ Scale display measurement. #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[Thermomètre](progressIndicator.md#thermometer) - [Règle](ruler.md#ruler) + -* * * +--- ## Label Location -Specifies the location of an object's displayed text. +Indique l'emplacement du texte d'un objet. -* None - no label is displayed -* Top - Displays labels to the left of or above an indicator -* Bottom - Displays labels to the right of or below an indicator +* Aucun - aucun libellé n'est affiché +* Haut - Affiche les libellés à gauche ou au-dessus d'un indicateur +* Bas - Affiche les libellés à droite ou en dessous d'un indicateur #### Grammaire JSON @@ -70,53 +70,54 @@ Specifies the location of an object's displayed text. |:---------------:|:---------------:| ---------------------------------------- | | labelsPlacement | string | "none", "top", "bottom", "left", "right" | - #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[Thermomètre](progressIndicator.md#thermometer) - [Règle](ruler.md#ruler) + -* * * +--- ## Maximum -Maximum value of an indicator. +Valeur maximale d'un indicateur. -- 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. -- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. +- Pour les steppers numériques, cette propriété représente les secondes lorsque l'objet est associé à une valeur de type heure, et représente les jours lorsqu'il est associé à une valeur de type date. +- Pour activer les [thermomètres du barber shop](progressIndicator.md#barber-shop), cette propriété doit être omise. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -|:---:|:---------------:| ----------------------------------- | -| max | string / number | minimum: 0 (for numeric data types) | - +| Nom | Type de données | Valeurs possibles | +|:---:|:------------------:| ------------------------------------------------- | +| max | chaîne / numérique | minimum: 0 (pour les types de données numériques) | #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) +[Thermomètre](progressIndicator.md#thermometer) - [Règle](ruler.md#ruler) - [Stepper](stepper.md#stepper) + -* * * +--- ## Minimum -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. +Valeur minimale d'un indicateur. Pour les steppers numériques, cette propriété représente les secondes lorsque l'objet est associé à une valeur de type heure, et représente les jours lorsqu'il est associé à une valeur de type date. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -|:---:|:---------------:| ----------------------------------- | -| min | string / number | minimum: 0 (for numeric data types) | - +| Nom | Type de données | Valeurs possibles | +|:---:|:------------------:| ------------------------------------------------- | +| min | chaîne / numérique | minimum: 0 (pour les types de données numériques) | #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) +[Thermomètre](progressIndicator.md#thermometer) - [Règle](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. +Intervalle minimum accepté entre les valeurs pendant l'utilisation. Pour les steppers numériques, cette propriété représente les secondes lorsque l'objet est associé à une valeur de type heure et représente les jours lorsqu'il est associé à une valeur de type date. #### Grammaire JSON @@ -127,4 +128,10 @@ Minimum interval accepted between values during use. For numeric steppers, this #### Objets pris en charge -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) \ No newline at end of file +[Thermomètre](progressIndicator.md#thermometer) - [Règle](ruler.md#ruler) - [Stepper](stepper.md#stepper) + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_Subform.md b/website/translated_docs/fr/FormObjects/properties_Subform.md index 0b0ff1e7d60ea8..34f712ba8c84b0 100644 --- a/website/translated_docs/fr/FormObjects/properties_Subform.md +++ b/website/translated_docs/fr/FormObjects/properties_Subform.md @@ -1,37 +1,35 @@ --- id: propertiesSubform -title: Subform +title: Sous-formulaire --- -* * * - -## Allow Deletion +--- +## Autoriser la suppression -Specifies if the user can delete subrecords in a list subform. +Indique si l’utilisateur peut supprimer des sous-enregistrements dans un sous-formulaire liste. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| --------------- | --------------- | --------------------------- | -| deletableInList | boolean | true, false (default: true) | - +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ------------------------------- | +| deletableInList | boolean | true, false (par défaut : true) | #### Objets pris en charge -[Subform](subform_overview.md) +[Sous-formulaire](subform_overview.md) -* * * -## Detail Form +--- +## Formulaire détaillé -You use this property to declare the detail form to use in the subform. It can be: +Cette option permet de désigner un formulaire détaillé à utiliser dans un sous-formulaire. Il peut être : -- 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. +- un widget, c'est-à-dire un sous-formulaire de type page doté de fonctions spécifiques. Dans ce cas, [le sous-formulaire de liste](#list-form) et les propriétés [Source](#source) doivent être vides ou non présents. + Vous pouvez sélectionner un nom de formulaire de composant lorsqu'il est publié dans le composant. +> Vous pouvez générer des [composants](Concepts/components.md) fournissant des fonctionnalités supplémentaires via des sous-formulaires. -> You can generate [components](Concepts/components.md) providing additional functionalities through subforms. +- le formulaire détaillé à associer au [sous-formulaire de liste](#list-form). Le formulaire détaillé peut être utilisé pour saisir ou afficher des sous-enregistrements. Il contient généralement plus d'informations que le sous-formulaire liste. Naturellement, le formulaire détaillé doit appartenir à la même table que le sous-formulaire. Vous utilisez normalement un formulaire de sortie comme formulaire liste et un formulaire d'entrée comme formulaire détaillé. Si vous n'indiquez pas le formulaire à utiliser pour la saisie pleine page, 4D utilise automatiquement le format d'entrée par défaut de la table. -- 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. #### Grammaire JSON @@ -39,46 +37,41 @@ You use this property to declare the detail form to use in the subform. It can b | ---------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | 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 | - #### Objets pris en charge -[Subform](subform_overview.md) - -* * * +[Sous-formulaire](subform_overview.md) -## Double-click on empty row +--- +## Double-clic sur ligne vide -Action to perform in case of a double-click on an empty line of a list subform. The following options are available: +Action to perform in case of a double-click on an empty line of a list subform. Les options suivantes sont disponibles : +- Ne rien faire : ignore le double-clic. +- Ajouter un enregistrement : crée un nouvel enregistrement dans le sous-formulaire et passe en mode édition. L'enregistrement sera créé directement dans la liste si la propriété [Saisissable dans la liste] est activée. Sinon, il sera créé en mode page, dans le [formulaire détaillé](detail-form) associé au sous-formulaire. -- 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. #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------------------------- | --------------- | ---------------------------------- | -| doubleClickInEmptyAreaAction | string | "addSubrecord" or "" to do nothing | - +| doubleClickInEmptyAreaAction | string | "addSubrecord" ou "" to do nothing | #### Objets pris en charge -[Subform](subform_overview.md) - -#### See also +[Sous-formulaire](subform_overview.md) -[Double click on row](#double-click-on-row) - -* * * +#### Voir également +[Double-clic sur ligne](#double-click-on-row) +--- ## Double-clic sur ligne -`List subform` +`Sous-formulaires liste` -Sets the action to be performed when a user double-clicks on a row in a list subform. The available options are: +Définit l'action à réaliser lorsqu'un utilisateur double-clique sur une ligne dans un sous-formulaire liste. 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. +* **Modifier enregistrement** : Un double-clic sur une ligne permet d'afficher l'enregistrement correspondant dans le [ formulaire détaillé défini pour le sous-formulaire liste](#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. @@ -90,22 +83,21 @@ For the last two actions, the On `Open Detail` form event is also generated. The | ---------------------- | --------------- | ----------------------------------- | | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - #### Objets pris en charge -[Subform](subform_overview.md) +[Sous-formulaire](subform_overview.md) -#### See also -[Double click on empty row](#double-click-on-empty-row) +#### Voir également +[Double-clic sur ligne vide](#double-click-on-empty-row) -* * * +--- +## Saisissable en liste -## Enterable in list +Lorsque cette propriété est activée pour un sous-formulaire de liste, l'utilisateur peut modifier les données de l'enregistrement directement dans la liste, sans avoir à utiliser le [formulaire détaillé associé](#detail-form). -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). +> Pour cela, il vous suffit de cliquer deux fois sur le champ à modifier afin de le passer en mode édition (veillez à laisser suffisamment de temps entre les deux clics pour ne pas générer de double-clic). -> 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). #### Grammaire JSON @@ -116,17 +108,15 @@ When a list subform has this property enabled, the user can modify record data d #### Objets pris en charge -[Subform](subform_overview.md) +[Sous-formulaire](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. +Cette option permet de désigner un formulaire liste à utiliser dans un sous-formulaire. Un sous-formulaire en liste vous permet de saisir, visualiser et modifier des données dans d’autres tables. -You can also allow the user to enter data in the List form. +Les sous-formulaires de liste peuvent être utilisés pour la saisie de données de deux manières : l'utilisateur peut saisir des données directement dans le sous-formulaire ou les saisir dans un [formulaire de saisie](#detail-form). Dans cette configuration, le formulaire utilisé comme sous-formulaire est appelé formulaire Liste. Le formulaire de saisie est appelé le formulaire détaillé. #### Grammaire JSON @@ -134,41 +124,39 @@ You can also allow the user to enter data in the List form. | -------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | 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 | - #### Objets pris en charge -[Subform](subform_overview.md) +[Sous-formulaire](subform_overview.md) + -* * * +--- ## Source -Specifies the table that the list subform belongs to (if any). +Spécifie la table à laquelle appartient le sous-formulaire Liste (le cas échéant). #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ----- | --------------- | --------------------------------- | -| table | string | 4D table name, or "" if no table. | - +| Nom | Type de données | Valeurs possibles | +| ----- | --------------- | ----------------------------------------------------- | +| table | string | Nom de la table 4D, ou "" s'il n'existe aucune table. | #### Objets pris en charge -[Subform](subform_overview.md) - -* * * +[Sous-formulaire](subform_overview.md) +--- ## Mode de sélection 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. +- **None**: Rows cannot be selected if this mode is chosen. Cliquer sur la liste n'aura aucun effet à moins que l'option [Saisissable en liste](subform_overview.md#enterable-in-list) soit activée. 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 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. + 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. + - Les sous-enregistrements sélectionnés sont retournés par la commande `GET HIGHLIGHTED RECORDS`. + - Cliquer sur l'enregistrement permettra de le sélectionner, mais ne modifiera pas l'enregistrement courant. + - Si vous pressez **Ctrl+clic** (Windows) ou **Commande+clic** (macOS) sur un enregistrement, cela fera basculer son état (entre sélectionné ou non). Les touches fléchées Haut et Bas sélectionnent l'enregistrement précédent/suivant dans la liste. The other navigation keys scroll the list. L'événement formulaire `On Selection Change` est généré chaque fois que l'enregistrement sélectionné est modifié. + #### Grammaire JSON @@ -176,7 +164,6 @@ Designates the option for allowing users to select rows: | ------------- | --------------- | ---------------------------- | | selectionMode | string | "multiple", "single", "none" | - #### Objets pris en charge -[Subform](subform_overview.md) \ No newline at end of file +[Sous-formulaire](subform_overview.md) diff --git a/website/translated_docs/fr/FormObjects/properties_Text.md b/website/translated_docs/fr/FormObjects/properties_Text.md index 54ce03d1be6d29..d50770af78d7bf 100644 --- a/website/translated_docs/fr/FormObjects/properties_Text.md +++ b/website/translated_docs/fr/FormObjects/properties_Text.md @@ -3,33 +3,29 @@ id: propertiesText title: Texte --- -* * * +--- +## Autoriser sélecteur police/couleur -## Allow font/color picker +Lorsque cette propriété est activée, les commandes [OPEN FONT PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-FONT-PICKER.301-4505612.en.html) et [OPEN COLOR PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-COLOR-PICKER.301-4505611.en.html) peuvent être appelées pour afficher les fenêtres de sélecteur de la police système et de couleurs. A l'aide de ces fenêtres, les utilisateurs peuvent modifier la police ou la couleur d'un objet formulaire dont le focus est accessible directement au clic. Lorsque cette propriété est désactivée (par défaut), les commandes d'ouverture du sélecteur ne produisent aucun effet. -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. #### Grammaire JSON -| Propriété | Type de données | Valeurs possibles | -| -------------------- | --------------- | --------------------- | -| allowFontColorPicker | boolean | false (default), true | - +| Propriété | Type de données | Valeurs possibles | +| -------------------- | --------------- | ------------------------ | +| allowFontColorPicker | boolean | false (par défaut), true | #### Objets pris en charge [Input](input_overview.md) -* * * - +--- ## Gras -Sets the selected text to appear darker and heavier. +Le texte sélectionné est plus foncé et plus épais. -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.** +Vous pouvez également définir cette propriété à l'aide de la commande [**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT-STYLE.301-4128244.en.html). +> Ceci est un texte normal.
        **Ceci est un texte en gras.** #### Grammaire JSON @@ -37,21 +33,18 @@ You can set this property using the [**OBJECT SET FONT STYLE**](https://doc.4d.c | ---------- | --------------- | ----------------- | | fontWeight | Texte | "normal", "bold" | - #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) -* * * +--- ## Italique -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. +Le texte sélectionné est légèrement penché vers la droite. -> This is normal text. -> *This is text in italics.* +Vous pouvez également définir cette propriété à l'aide de la commande [**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT-STYLE.301-4128244.en.html). +> Ceci est un texte normal.
        *Ceci est un texte en italique.* #### Grammaire JSON @@ -59,19 +52,17 @@ You can also set this property via the [**OBJECT SET FONT STYLE**](https://doc.4 | --------- | --------------- | ------------------ | | fontStyle | string | "normal", "italic" | - #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) -* * * -## Souligné -Sets the text to have a line running beneath it. -> This is normal text. -> This is underlined text. +--- +## Souligné +Une ligne est placée sous le texte. +> Ceci est un texte normal.
        Ceci est un texte souligné.. #### Grammaire JSON @@ -79,37 +70,41 @@ Sets the text to have a line running beneath it. | -------------- | --------------- | --------------------- | | textDecoration | string | "normal", "underline" | - #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) + -* * * -## Police -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 +--- +## Police + +Cette propriété vous permet d'indiquer le **thème de la police** ou la **famille de police** utilisé(e) dans l'objet. +> Les propriétés du **thème** et de la **famille** de police sont mutuellement exclusives. Un thème de police prend en charge les attributs de police, y compris la taille. Une famille de polices vous permet de définir le nom de la police, sa taille et sa couleur. + -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: +### Thème de police -- the platform, -- the system language, -- and the type of form object. +La propriété de thème de police désigne un nom de style automatique. Les styles automatiques déterminent de manière dynamique la famille de police, la taille et la couleur de police à utiliser pour l'objet, en fonction des paramètres système. Ces paramètres dépendent de : -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. +- la plateforme, +- la langue du système, +- et le type d'objet de formulaire. -Three font themes are available: +Avec le thème de police, vous avez la garantie que les titres s'affichent toujours conformément aux normes de l'interface du système. Cependant, leur taille peut varier d'une machine à l'autre. -- **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: +Trois thèmes de polices sont disponibles : +- **normal** : style automatique, appliqué par défaut à tout nouvel objet créé dans l'éditeur de formulaires. +- Les thèmes de polices **principaux** et **supplémentaires** ne sont pris en charge uniquement par les [zones de texte](text.md) et les [zones de saisie](input_overview.md). Ces thèmes sont principalement destinés à la conception de boîtes de dialogue. Ils font référence aux styles de police utilisés respectivement pour le texte principal et les informations supplémentaires dans vos fenêtres d'interface. Voici les boîtes de dialogue typiques (macOS et Windows) utilisant ces thèmes de polices : ![](assets/en/FormObjects/FontThemes.png) -> Font themes manage the font as well as its size and color. You can apply custom style properties (Bold, Italic or Underline) without altering its functioning. +> Les thèmes de polices gèrent la police ainsi que sa taille et sa couleur. Vous pouvez appliquer des propriétés de style personnalisées (Gras, Italique ou Souligné) sans modifier son fonctionnement. + + #### Grammaire JSON @@ -120,92 +115,93 @@ Three font themes are available: #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) -### Font Family -There are two types of font family names: -* *family-name:* The name of a font-family, like "times", "courier", "arial", etc. -* *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. +### Famille de police -> This is Times New Roman font. -> This is Calibri font. -> This is Papyrus font. -#### Grammaire JSON +Il existe deux types de noms de familles de polices : -| Nom | Type de données | Valeurs possibles | -| ---------- | --------------- | -------------------- | -| fontFamily | string | CSS font family name | +* *family-name :* Le nom d'une famille de polices, comme "times", "courier", "arial", etc. +* *generic-family *: Le nom d'une famille générique, comme "serif", "sans-serif", "cursive", "fantasy", "monospace". +Vous pouvez la définir à l'aide de la commande [**OBJECT SET FONT**](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-FONT.301-4054834.en.html) . +> This is Times New Roman font.
        This is Calibri font.
        + This is Papyrus font. -> 4D recommends using only [web safe](https://www.w3schools.com/cssref/css_websafe_fonts.asp) fonts. +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ------------------------------- | +| fontFamily | string | Nom d'une famille de police CSS | +> 4D recommande d'utiliser uniquement les polices de [sécurité Web](https://www.w3schools.com/cssref/css_websafe_fonts.asp). #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) + -* * * +--- ## Taille -Allows defining the object's font size in points. +Permet de définir en points la taille de police de l'objet. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------- | --------------- | ------------------------------------- | -| fontSize | integer | Font size in points. Minimum value: 0 | - +| Nom | Type de données | Valeurs possibles | +| -------- | --------------- | -------------------------------------------------- | +| fontSize | integer | Taille de la police en points. Valeur minimale : 0 | #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) -* * * +--- ## Couleur de la police -Designates the font color. +Désigne la couleur de la police. -> This property also sets the color of object's [border](#border-line-style-dotted-line-type) (if any) when "plain" or "dotted" style is used. +> Cette propriété définit également la couleur de [bordure](#border-line-style-dotted-line-type) (le cas échéant) de l'objet lorsque le style "plein" ou "pointillé" est utilisé. -The color can be specified by: +La couleur peut être spécifiée par : -* a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" +* un nom de couleur - comme "red" +* une valeur HEX - comme "# ff0000" +* une valeur RVB - comme "rgb (255,0,0)" -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. +Vous pouvez également définir cette propriété à l'aide de la commande [**OBJECT SET RGB COLORS**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-RGB-COLORS.301-4505456.en.html). -#### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ------ | --------------- | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | +#### Grammaire JSON +| Nom | Type de données | Valeurs possibles | +| ------ | --------------- | ------------------------------------------ | +| stroke | string | une valeur css; "transparent"; "automatic" | #### Objets pris en charge -[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) +[Bouton](button_overview.md) - [Case à cocher](checkbox_overview.md) - [Combo Box](comboBox_overview.md) - [Liste déroulante](dropdownList_Overview.md) - [Group Box](groupBox.md) - [Liste hiérarchique](list_overview.md#overview) - [Zone de saisie](input_overview.md) - [List Box](listbox_overview.md#overview) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Indicateurs de progression](progressIndicator.md) - [Règle](ruler.md) - [Bouton Radio](radio_overview.md) - [Zone de texte](text.md) -* * * -## Expression couleur police -`Selection and collection/entity selection type list boxes` +--- + +## Expression couleur police -Used to apply a custom font color to each row of the list box. You must use RGB color values. For more information about this, refer to the description of the [OBJECT SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-RGB-COLORS.301-4311385.en.html) command in the 4D Language Reference manual. +`List box de type collection/sélection d'entité` -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. +Utilisée pour appliquer une couleur de police personnalisée à chaque ligne de la list box. Vous devez utiliser des valeurs de couleur RVB. Pour plus d'informations à ce sujet, reportez-vous à la description de la commande [OBJECT SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-RGB-COLORS.301-4311385.en.html) dans le manuel Langage 4D. -You can also set this property using the `LISTBOX SET PROPERTY` command with `lk font color expression` constant. +Vous devez saisir une expression ou une variable (les variables de type tableau ne peuvent pas être utilisées). L'expression ou la variable sera évaluée pour chaque ligne affichée. Vous pouvez utiliser les constantes du thème [SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/SET-RGB-COLORS.302-4310385.en.html). -> This property can also be set using a [Meta Info Expression](properties_Text.md#meta-info-expression). +Vous pouvez également définir cette propriété à l'aide de la commande `LISTBOX SET PROPERTY` avec la constante `lk font color expression`. +> Cette propriété peut également être définie à l'aide d'une [expression Meta Info](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: +L'exemple suivant utilise un nom de variable : entrez *CompanyColor* pour l'**expression couleur police** et, dans la méthode formulaire, entrez le code suivant : ```4d CompanyColor:=Choose([Companies]ID;Background color;Light shadow color; @@ -214,24 +210,22 @@ Foreground color;Dark shadow color) #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| --------------- | --------------- | --------------------- | -| rowStrokeSource | string | Font color expression | - +| Nom | Type de données | Valeurs possibles | +| --------------- | --------------- | ------------------------- | +| rowStrokeSource | string | Expression couleur police | #### Objets pris en charge [List Box](listbox_overview.md#overview) -* * * - +--- ## Expression style -`Selection and collection/entity selection type list boxes` +`List box de type collection/sélection d'entité` -Used to apply a custom character style to each row of the list box or each cell of the column. +Utilisé pour appliquer un style de police personnalisé à chaque ligne de list box ou de chaque cellule de la colonne. -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. +Vous devez saisir une expression ou une variable (les variables de type tableau ne peuvent pas être utilisées). L'expression ou variable sera évaluée pour chaque ligne affichée (si elle s'applique à la list box) ou chaque cellule affichée (si elle s'applique à la list box). Vous pouvez utiliser les constantes du thème [Styles de caractères](https://doc.4d.com/4Dv17R6/4D/17-R6/Font-Styles.302-4310343.en.html). Exemple : @@ -239,26 +233,29 @@ Exemple : 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. +Vous pouvez également définir cette propriété à l'aide de la commande `LISTBOX SET PROPERTY` avec la constante `lk font style expression`. +> Cette propriété peut également être définie à l'aide d'une [expression Meta Info](properties_Text.md#meta-info-expression). -> This property can also be set using a [Meta Info Expression](properties_Text.md#meta-info-expression). #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| -------------- | --------------- | ----------------------------------------------- | -| rowStyleSource | string | Style expression to evaluate for each row/cell. | - +| Nom | Type de données | Valeurs possibles | +| -------------- | --------------- | -------------------------------------------------------- | +| rowStyleSource | string | Expression de style à évaluer pour chaque ligne/cellule. | #### Objets pris en charge -[List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) +[List Box](listbox_overview.md) - [Colonne List Box](listbox_overview.md#list-box-columns) -* * * + + + + +--- ## Alignement horizontal -Horizontal location of text within the area that contains it. +Emplacement horizontal du texte dans la zone où il apparait. #### Grammaire JSON @@ -266,23 +263,22 @@ Horizontal location of text within the area that contains it. | --------- | --------------- | ------------------------------------------------- | | textAlign | string | "automatic", "right", "center", "justify", "left" | - #### Objets pris en charge -[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) - [Colonne List Box](listbox_overview.md#list-box-columns) - [En-tête List Box](listbox_overview.md#list-box-headers) - [Pied List Box](listbox_overview.md#list-box-footers) - [Zone de texte](text.md) -* * * +--- ## Alignement vertical -Vertical location of text within the area that contains it. +Emplacement vertical du texte dans la zone où il apparait. -The **Default** option (`automatic` JSON value) sets the alignment according to the type of data found in each column: +L'option **Default** (valeur JSON `automatique`) définit l'alignement en fonction du type de données identifiées dans chaque colonne : +- `bas` pour toutes les données (sauf les images) et +- `haut` pour les données de type image. -- `bottom` for all data (except pictures) and -- `top` for picture type data. +Cette propriété peut également être gérée par les commandes [OBJECT Get vertical alignment](https://doc.4d.com/4Dv18/4D/18/OBJECT-Get-vertical-alignment.301-4505442.en.html) et [OBJECT SET VERTICAL ALIGNMENT](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-VERTICAL-ALIGNMENT.301-4505430.en.html). -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. #### Grammaire JSON @@ -290,52 +286,48 @@ This property can also be handled by the [OBJECT Get vertical alignment](https:/ | ------------- | --------------- | -------------------------------------- | | verticalAlign | string | "automatic", "top", "middle", "bottom" | - #### Objets pris en charge -[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) +[List Box](listbox_overview.md) - [Colonne List Box](listbox_overview.md#list-box-columns) - [Pied List Box](listbox_overview.md#list-box-footers) - [En-tête List Box](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" | -| border-style | 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 +`List box de type collection ou entity selection (sélection d'entité)` -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` +Indique une expression ou une variable qui sera évaluée pour chaque ligne affichée. Elle permet de définir un ensemble d'attributs texte des lignes. Vous devez passer une **variable objet** ou une **expression qui retourne un objet**. Les propriétés suivantes sont prises en charge : + +| Nom de propriété | Type | Description | +| ------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stroke | string | Couleur de la police. Toute couleur CSS (ex : "#FF00FF"), "automatic", "transparent" | +| border-style | string | Couleur de fond. Toute couleur CSS (ex : "#FF00FF"), "automatic", "transparent" | +| fontStyle | string | "normal","italic" | +| fontWeight | string | "normal","bold" | +| textDecoration | string | "normal","underline" | +| unselectable | boolean | Désigne la ligne correspondante comme n'étant pas sélectionnable (c'est-à-dire que le surlignage n'est pas possible). Les zones saisissables ne sont plus saisissables si cette option est activée, à moins que l'option «Single-click Edit » ne soit également activée. Les contrôles tels que les cases à cocher et les listes restent fonctionnels. This setting is ignored if the list box selection mode is "None". Valeurs par défaut : False. | +| disabled | boolean | Désactive la ligne correspondante. Les zones saisissables ne sont plus saisissables si cette option est activée. Le texte et les contrôles (cases à cocher, listes, etc.) sont grisés. Valeurs par défaut : False. | +| cell.\ | object | Permet d'appliquer la propriété à une seule colonne. Passez dans \ le nom d'objet de la colonne de list box. **Note** : les propriétés "unselectable" et "disabled" ne peuvent être définies qu'au niveau de la ligne. Elles sont ignorées si elles sont passées dans l'objet "cell" | + +> Les paramètres de style définis avec cette propriété sont ignorés si d'autres paramètres de style sont déjà définis via des expressions (par exemple, [Style Expression](#style-expression), [Font Color Expression](#font-color-expression), [Background Color Expression](#background-color-expression)). + + +**Exemple** -In the *Color* method, write the following code: +Dans la méthode projet *Color*, entrez le code suivant : ```4d -//Color method -//Sets font color for certain rows and the background color for a specific column: +//Méthode Color +//Définit la couleur de police pour certaines lignes et la couleur de fond pour une colonne spécifique : C_OBJECT($0) -If(This.ID>5) //ID is an attribute of collection objects/entities +Form.meta:=New object +If(This.ID>5) //ID est un attribut d'objets/entités d'une collection Form.meta.stroke:="purple" Form.meta.cell:=New object("Column2";New object("fill";"black")) Else @@ -344,34 +336,63 @@ End if $0:=Form.meta ``` -> See also the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. +**Bonnes pratiques :** Pour des raisons d'optimisation, il serait recommandé dans ce cas de créer l'objet `meta.cell` une fois contenu dans la méthode formulaire : -#### Grammaire JSON +```4d + //méthode formulaire + Case of + :(Form event code=On Load) + Form.colStyle:=New object("Column2";New object("fill";"black")) + End case +``` + +La méthode *Color* contiendrait alors : + +```4d + //méthode Color + ... + If(This.ID>5) + Form.meta.stroke:="purple" + Form.meta.cell:=Form.colStyle //réutiliser le même objet pour de meilleures performances + ... +``` +> Voir également la commande [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). -| Nom | Type de données | Valeurs possibles | -| ---------- | --------------- | ------------------------------------------------ | -| metaSource | string | Object expression to evaluate for each row/cell. | +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +| ---------- | --------------- | ---------------------------------------------------------- | +| metaSource | string | Expression de l'objet à évaluer pour chaque ligne/cellule. | + #### Objets pris en charge [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. + + + + +--- +## Multistyle + +Cette propriété permet d'utiliser des styles spécifiques dans la zone sélectionnée. Lorsque cette option est cochée, 4D interprète toutes les balises \ HTML présentes dans la zone.

        + +

        + Par défaut, cette option n'est pas activée.

        -

        + + +

        Grammaire JSON

        - +
        Nom @@ -401,38 +422,44 @@ This property enables the possibility of using specific styles in the selected a
        -

        +

        Objets pris en charge

        -

        +

        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: +

        + Modifie l'orientation (rotation) d'une zone de texte. Les zones de texte peuvent être pivotées par incréments de 90°. Chaque valeur d'orientation est appliquée tout en conservant le même point de départ inférieur gauche pour l'objet :

        - +
        - Orientation value + Valeur d'orientation - Result + Résultat
        - 0 (default) + 0 (par défaut) @@ -471,15 +498,18 @@ This property enables the possibility of using specific styles in the selected a
        -

        - 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. +

        + En plus des zones de texte statiques, les objets de texte des zones de saisie peuvent être pivotés lorsqu'ils ne sont pas saisissables. Lorsqu'une propriété de rotation est appliquée à un objet de saisie, la propriété saisissable est supprimée (le cas échéant). Cet objet est alors exclu de l'ordre de saisie.

        -

        + + + +

        Grammaire JSON

        - +
        Nom @@ -509,37 +539,40 @@ This property enables the possibility of using specific styles in the selected a
        -

        +

        Objets pris en charge

        -

        - Input (non-enterable) - Text Area +

        + Zone de saisie (non saisissable) - Zone de texte

        -
        -

        + + + +
        +

        Tableau couleurs de police

        -

        - Array type list boxes +

        + List box de type tableau

        -

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

        + Permet de définir un style de police personnalisé à chaque ligne de list box ou de chaque cellule de la colonne.

        -

        - 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. +

        + Le nom d'un tableau Entier Long doit être utilisé. Chaque élément de ce tableau correspond à une ligne de la zone de list box (si elle est appliquée à la liste box) ou à une cellule de la colonne (si elle est appliquée à une colonne), le tableau doit donc avoir la même taille que le tableau associé à la colonne. Vous pouvez utiliser les constantes du thème SET RGB COLORS. Si vous souhaitez que la cellule hérite de la couleur d'arrière-plan définie au niveau supérieur, passez la valeur -255 à l'élément de tableau correspondant.

        -

        +

        Grammaire JSON

        - +
        Nom @@ -564,42 +597,46 @@ This property enables the possibility of using specific styles in the selected a - The name of a longint array + Nom d'un tableau entier long
        -

        +

        Objets pris en charge

        -

        - List Box - List Box Column +

        + List Box - Colonne List Box

        -
        -

        + + + +
        +

        Tableau de styles

        -

        - Array type list boxes +

        + List box de type tableau

        -

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

        + List Box - Colonne List Box

        -

        - 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. +

        + Le nom d'un tableau Entier Long doit être utilisé. Chaque élément de ce tableau correspond à une ligne de la zone de list box (si elle est appliquée à la liste box) ou à une cellule de la colonne (si elle est appliquée à une colonne), le tableau doit donc avoir la même taille que le tableau associé à la colonne. Pour remplir le tableau (à l'aide d'une méthode), utilisez les constantes du thème Styles de caractères. Vous pouvez ajouter des constantes ensemble pour combiner plusieurs styles. Si vous souhaitez que la cellule hérite du style défini au niveau supérieur, passez la valeur -255 à l'élément de tableau correspondant.

        -

        + +

        Grammaire JSON

        - +
        Nom @@ -624,56 +661,57 @@ This property enables the possibility of using specific styles in the selected a - The name of a longint array. + Nom d'un tableau entier long.
        -

        +

        Objets pris en charge

        -

        - List Box - List Box Column +

        + List Box - Colonne List Box

        -
        -

        - Store with default style tags + +
        +

        + Stocker les balises par défaut

        -

        - 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. +

        + Cette propriété n'est disponible que pour une zone de saisie multi-styles. Lorsque cette propriété est activée, la zone stockera les balises de style avec le texte, même si aucune modification n'a été apportée. Dans ce cas, les balises correspondent au style par défaut. Lorsque cette propriété est désactivée, seules les balises de style modifiées sont stockées.

        -

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

        + Par exemple, voici un texte qui inclut une modification de style :

        -

        +

        -

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

        + Lorsque la propriété est désactivée, la zone ne stocke que la modification qui a été apportée. Les contenus stockés sont donc :

        -
        What a <SPAN STYLE="font-size:13.5pt">beautiful</SPAN> day!
        +
        Quelle <SPAN STYLE="font-size:13.5pt">belle</SPAN> journée !
         
        -

        - 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: +

        + Lorsque la propriété est activée, la zone stocke toutes les informations de mise en forme. La première balise générique décrit le style par défaut puis chaque variation fait l'objet d'une paire de balises imbriquées. Les contenus stockés dans la zone sont donc :

        <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>
         
        -

        +

        Grammaire JSON

        - +
        Nom @@ -698,15 +736,36 @@ This property enables the possibility of using specific styles in the selected a - true, false (default). + true, false (par défaut).
        -

        +

        Objets pris en charge

        -

        +

        Input -

        \ No newline at end of file +

        + + + + + + + + + + + + + + + + + + + + + diff --git a/website/translated_docs/fr/FormObjects/properties_TextAndPicture.md b/website/translated_docs/fr/FormObjects/properties_TextAndPicture.md index b985db7d39975c..ad739488600b6a 100644 --- a/website/translated_docs/fr/FormObjects/properties_TextAndPicture.md +++ b/website/translated_docs/fr/FormObjects/properties_TextAndPicture.md @@ -3,9 +3,8 @@ id: propertiesTextAndPicture title: Texte et Image --- -* * * - -## Background pathname +--- +## Chemin d'accès arrière-plan Définit le chemin d'accès de l'image qui sera dessinée en arrière-plan de l'objet. Si l'objet utilise une [icône](#picture-pathname) avec [différents états](#number-of-states), l'image de fond prendra automatiquement en charge le même nombre d'états. @@ -15,18 +14,21 @@ Le chemin d'accès à saisir est identique à celui de [la propriété Chemin d' | Nom | Type de données | Valeurs possibles | | ----------------------- | --------------- | -------------------------------------------------------------------------------------------------------- | -| customBackgroundPicture | chaîne | Chemin relatif en syntaxe POSIX. Doit être utilisé avec l'option "Personnalisé" de la propriété "Style". | +| customBackgroundPicture | string | Chemin relatif en syntaxe POSIX. Doit être utilisé avec l'option "Personnalisé" de la propriété "Style". | #### Objets pris en charge [Bouton personnalisé](button_overview.md#custom) - [Case à cocher personnalisée](checkbox_overview.md#custom) - [Bouton radio personnalisé](radio_overview.md#custom) -* * * + + +--- ## Styles de bouton -General appearance of the button. The button style also plays a part in the availability of certain options. +Aspect général du bouton. Le style du bouton joue également un rôle dans la disponibilité de certaines options. + #### Grammaire JSON @@ -39,8 +41,10 @@ General appearance of the button. The button style also plays a part in the avai [Bouton](button_overview.md) - [Bouton radio](radio_overview.md) - [Case à cocher](checkbox_overview.md) - [Bouton radio](radio_overview.md) -* * * + + +--- ## Marge horizontale Cette propriété permet de définir la taille (en pixels) des marges horizontales du bouton. Cette marge délimite la zone que l'icône et le titre du bouton ne doivent pas dépasser. @@ -51,22 +55,22 @@ Ce paramètre est utile, par exemple, lorsque l'image de fond contient des bordu | -------------------- | --------------------------------------------------------- | | Sans marge | ![](assets/en/FormObjects/property_horizontalMargin1.png) | | Avec marge 13 pixels | ![](assets/en/FormObjects/property_horizontalMargin2.png) | - - > Cette propriété fonctionne avec la propriété [Marge verticale](#vertical-margin). #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ------------- | --------------- | ---------------------------------------------------- | -| customBorderX | numérique | A utiliser avec le style "personnalisé". Minimum : 0 | - +| customBorderX | number | A utiliser avec le style "personnalisé". Minimum : 0 | #### Objets pris en charge [Bouton personnalisé](button_overview.md#custom) - [Case à cocher personnalisée](checkbox_overview.md#custom) - [Bouton radio personnalisé](radio_overview.md#custom) -* * * + + + +--- ## Emplacement de l'icône @@ -76,20 +80,22 @@ Désigne l'emplacement d'une icône par rapport à l'objet formulaire. | Nom | Type de données | Valeurs possibles | | ------------- | --------------- | --------------------------- | -| iconPlacement | chaîne | "aucun", "gauche", "droite" | - +| iconPlacement | string | "aucun", "gauche", "droite" | #### Objets pris en charge [Entête de List Box](listbox_overview.md#list-box-headers) -* * * -## Icon Offset -Sets a custom offset value in pixels, which will be used when the button is clicked -The title of the button will be shifted to the right and toward the bottom for the number of pixels entered. This allows applying a customized 3D effect when the button is clicked. + +--- +## Décalage icône + +Définit une valeur de décalage personnalisée en pixels, qui sera utilisée lorsque le bouton est cliqué + +Le titre du bouton sera décalé vers la droite et vers le bas pour le nombre de pixels saisis. Cela permet d'appliquer un effet 3D personnalisé lorsque le bouton est cliqué. #### Grammaire JSON @@ -97,76 +103,78 @@ The title of the button will be shifted to the right and toward the bottom for t | ------------ | --------------- | ----------------- | | customOffset | number | minimum : 0 | - #### Objets pris en charge [Bouton personnalisé](button_overview.md#custom) - [Case à cocher personnalisée](checkbox_overview.md#custom) - [Bouton radio personnalisé](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. +--- +## Nombre d'états -Each state is represented by a different picture. In the source picture, the states must be stacked vertically: +Cette propriété définit le nombre exact d'états présents dans l'image utilisée comme icône pour un [bouton avec icône](button_overview.md), une [case à cocher](checkbox_overview.md) ou un [bouton radio](radio_overview.md) personnalisé. En général, une icône de bouton comprend quatre états : actif, cliqué, survolé et inactif. -![](assets/en/property_numberOfStates.png) +Chaque état est représenté par une image différente. Dans l'image source, les états doivent être empilés verticalement : -The following states are represented: +![](assets/en/property_numberOfStates.png) -1. button not clicked / check box unchecked (variable value=0) -2. button clicked / check box checked (variable value=1) -3. roll over +Les états suivants sont représentés : +1. bouton non cliqué / case non cochée (valeur de la variable = 0) +2. bouton cliqué / case cochée (valeur de la variable = 1) +3. survolé 4. disabled + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | ---------- | --------------- | ----------------- | | iconFrames | number | minimum: 1 | - #### Objets pris en charge -[Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) +[Bouton](button_overview.md) (tous les styles sauf[Aide](button_overview.md#help)) - [Case à cocher](checkbox_overview.md) - [Bouton radio](radio_overview.md) -* * * -## Picture pathname -Sets the path of the picture that will be used as icon for the object. + + +--- +## Chemin d'accès de l'image + +Définit le chemin d'accès de l'image qui sera utilisée comme icône de l'objet. Le chemin d'accès à saisir est identique à celui de [la propriété Chemin d'accès pour les images statiques](properties_Picture.md#pathname). -> When used as icon for active objects, the picture must be designed to support a variable [number of states](#number-of-states). +> Lorsqu'elle est utilisée comme icône pour les objets actifs, l'image doit être conçue pour prendre en charge [un nombre d'états](#number-of-states) variable. #### Grammaire JSON -| Nom | Type de données | Valeurs possibles | -| ---- | --------------- | -------------------------------------------- | -| icon | picture | Relative or filesystem path in POSIX syntax. | - +| Nom | Type de données | Valeurs possibles | +| ---- | --------------- | ---------------------------------------------- | +| icon | picture | Chemin relatif ou filesystem en syntaxe POSIX. | #### Objets pris en charge -[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) +[Bouton](button_overview.md) (tous les styles sauf[Aide](button_overview.md#help)) - [Case à cocher](checkbox_overview.md) - [En-tête List box](listbox_overview.md#list-box-headers)[Bouton radio](listbox_overview.md#list-box-headers) + -* * * -## 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. +--- +## Position Titre/Image -Here are the results using the various options for this property: +Cette propriété permet de modifier l’emplacement relatif du titre par rapport à l’icône associée. Cette propriété n’a pas d’effet lorsque le bouton contient uniquement un titre (pas d’image associée) ou une image (pas de titre). Par défaut, lorsqu’un bouton 3D contient un titre et une image, le texte est placé en-dessous de l’image. -| Option | Description | Exemple | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | -| **Gauche** | 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) | -| **Haut** | The text is placed above the icon. The contents of the button are centered. | ![](assets/en/FormObjects/property_titlePosition_top.png) | -| **Droite** | 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) | -| **Bas** | 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) | +Voici le résultat des différentes options de cette propriété : +| Option | Description | Exemple | +| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| **Gauche** | Le texte est placé à gauche de l’icône. Le contenu du bouton est aligné à droite. | ![](assets/en/FormObjects/property_titlePosition_left.en.png) | +| **Haut** | Le texte est placé au-dessus de l’icône. Le contenu du bouton est centré. | ![](assets/en/FormObjects/property_titlePosition_top.png) | +| **Droite** | Le texte est placé à droite de l’icône. Le contenu du bouton est aligné à gauche. | ![](assets/en/FormObjects/property_titlePosition_right.png) | +| **Bas** | Le texte est placé en-dessous de l’icône. Le contenu du bouton est centré. | ![](assets/en/FormObjects/property_titlePosition_bottom.png) | +| **Centre** | Le texte de l’icône est centré verticalement et horizontalement dans le bouton. Ce paramétrage convient par exemple pour du texte inclus dans une icône. | ![](assets/en/FormObjects/property_titlePosition_centered.png) | #### Grammaire JSON @@ -174,20 +182,21 @@ Here are the results using the various options for this property: | ------------- | --------------- | ------------------------------------------ | | textPlacement | string | "left", "top", "right", "bottom", "center" | - #### Objets pris en charge -[Button](button_overview.md) (all styles except [Help](button_overview.md#help)) - [Check Box](checkbox_overview.md) - [Radio Button](radio_overview.md) +[Bouton](button_overview.md) (tous les styles sauf[Aide](button_overview.md#help)) - [Case à cocher](checkbox_overview.md) - [Bouton radio](radio_overview.md) + -* * * -## Vertical Margin -This property allows setting the size (in pixels) of the vertical margins of the button. Cette marge délimite la zone que l'icône et le titre du bouton ne doivent pas dépasser. +--- +## Marge verticale + +Cette propriété permet de définir la taille (en pixels) des marges verticales du bouton. Cette marge délimite la zone que l'icône et le titre du bouton ne doivent pas dépasser. -This parameter is useful, for example, when the background picture contains borders. +Ce paramètre est utile, par exemple, lorsque l'image de fond contient des bordures. -> This property works in conjunction with the [Horizontal Margin](#horizontal-margin) property. +> Cette propriété fonctionne avec la propriété [Marge horizontale](#horizontal-margin). #### Grammaire JSON @@ -195,76 +204,49 @@ This parameter is useful, for example, when the background picture contains bord | ------------- | --------------- | ---------------------------------------------------- | | customBorderY | number | A utiliser avec le style "personnalisé". Minimum : 0 | - #### Objets pris en charge [Bouton personnalisé](button_overview.md#custom) - [Case à cocher personnalisée](checkbox_overview.md#custom) - [Bouton radio personnalisé](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: + +--- +## Avec pop-up menu + +Cette propriété permet d’afficher un symbole en forme de triangle indiquant qu’un pop up menu lui est associé : ![](assets/en/FormObjects/property_popup.png) -The appearance and location of this symbol depends on the button style and the current platform. +L’apparence et l’emplacement de ce symbole dépend du style de bouton et de la plate-forme courante. + -### Linked and Separated +### Séparé et Lié -To attach a pop-up menu symbol to a button, there are two display options available: +Pour associer un symbole de pop up menu à un bouton, vous disposez de deux options d’affichage : -| Linked | Separated | +| Séparé | Et Lié | |:----------------------------------------------------:|:-------------------------------------------------------:| | ![](assets/en/FormObjects/property_popup_linked.png) | ![](assets/en/FormObjects/property_popup_separated.png) | +> La disponibilité effective d’un mode “Séparé†dépend du style de bouton et de la plate-forme. + +Chaque option précise la relation entre le bouton et le pop up menu associé : + +
      • Lorsque le pop up menu est **séparé**, un clic sur la partie gauche du bouton exécute directement l’action courante du bouton ; cette action peut être modifiée via le pop up menu accessible dans la partie droite du bouton.
      • Lorsque le pop up menu est **lié**, un simple clic sur le bouton ne déclenche aucune autre action que l’affichage du pop up menu. Seule la sélection de l’action dans le pop up menu provoque son déclenchement. + + +### Gestion du pop up menu + +Il est important de noter que la propriété “Avec pop up menu†gère uniquement l’aspect graphique du bouton. L’affichage du pop up menu et de ses valeurs doivent être entièrement gérés par le développeur, notamment à l’aide des `événements formulaire` et des commandes **[Pop up menu dynamique](https://doc.4d.com/4Dv18/4D/18/Dynamic-pop-up-menu.301-4505524.en.html)** et **[Pop up menu](https://doc.4d.com/4Dv17R5/4D/17-R5/Pop-up-menu.301-4127438.en.html)**. -> 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. -

        -

        - Grammaire JSON -

        - - - - - - - - - - - - - - -
        - Nom - - Type de données - - Valeurs possibles -
        - popupPlacement - - string - -
      • - "none"
      • - "linked"
      • - "separated"
      • - Objets pris en charge -

        -

        - 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 +#### Grammaire JSON + +| Nom | Type de données | Valeurs possibles | +|:-------------- | --------------- | ---------------------------------------------------------------------------------------------------- | +| popupPlacement | string |
      • "none"
      • "linked"
      • "separated" | + + +#### Objets pris en charge + +[Bouton barre outils](button_overview.md#toolbar) - [Bouton Bevel](button_overview.md#bevel) - [Bouton bevel circulaire](button_overview.md#Rounded-bevel) - [Bouton OS X Gradient](button_overview.md#os-x-gradient) - [Bouton OS X Textured](button_overview.md#os-x-textured) - [Bouton Office XP](button_overview.md#office-XP) - [Bouton cercle](button_overview.md#circle) - [Personnalisé](button_overview.md#custom) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/properties_WebArea.md b/website/translated_docs/fr/FormObjects/properties_WebArea.md index b061f14d2d2745..8adeeaf1dd3342 100644 --- a/website/translated_docs/fr/FormObjects/properties_WebArea.md +++ b/website/translated_docs/fr/FormObjects/properties_WebArea.md @@ -3,8 +3,7 @@ id: propertiesWebArea title: Zone Web --- -* * * - +--- ## Accéder aux méthodes 4D Il est possible d’appeler des méthodes 4D depuis le code JavaScript exécuté dans une zone Web et de recevoir des valeurs en retour. Pour pouvoir appeler des méthodes 4D depuis la zone Web, vous devez cocher l'option Accès méthodes 4D pour la zone dans la Liste des propriétés . @@ -13,19 +12,20 @@ Il est possible d’appeler des méthodes 4D depuis le code JavaScript exécuté Lorsque cette propriété est cochée, un objet JavaScript spécial `$4d` est instancié dans la zone Web et permet de [gérer les appels aux méthodes projet de 4D](webArea_overview.md#4d-object). + + #### Grammaire JSON | Nom | Type de données | Valeurs possibles | | -------------------- | --------------- | -------------------------- | | methodsAccessibility | string | "none" (par défaut), "all" | - #### Objets pris en charge [Zone Web](webArea_overview.md) -* * * +--- ## Variable Progression La variable "Progression" est de type Entier long. Elle contient une valeur entre 0 et 100, représentant le pourcentage du chargement complet de la page affichée dans la zone Web. La variable est mise à jour automatiquement par 4D. Il n’est pas possible de la modifier manuellement. @@ -36,26 +36,26 @@ La variable "Progression" est de type Entier long. Elle contient une valeur entr | -------------- | --------------- | ------------------------------ | | progressSource | string | Nom d'une variable Entier long | - #### Objets pris en charge [Zone Web](webArea_overview.md) -* * * + + +--- ## Variable URL La variable "URL" est de type chaîne. Elle contient l’URL chargé ou en cours de chargement par la zone Web associée. L’association entre la variable et la zone Web s’effectue dans les deux sens : -* Si l’utilisateur affecte un nouvel URL à la variable, l’URL est automatiquement chargé par la zone Web. -* Toute navigation effectuée à l’intérieur de la zone Web met automatiquement à jour le contenu de la variable. +* Si l’utilisateur affecte un nouvel URL à la variable, l’URL est automatiquement chargé par la zone Web. +* Toute navigation effectuée à l’intérieur de la zone Web met automatiquement à jour le contenu de la variable. Schématiquement, cette variable fonctionne comme la zone d’adresse d’un navigateur Web. Vous pouvez la représenter par une zone de texte située au-dessus de la zone Web. ### Variable URL et commande WA OUVRIR URL La variable URL produit les mêmes effets que la commande [WA OUVRIR URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html). Les différences suivantes sont toutefois à noter : - - Pour les accès aux documents, la variable accepte uniquement des URLs conformes aux RFC ("file://c:/Mon%20Doc") et non les chemins d’accès système ("c:\MonDoc"). La commande [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) accepte les deux notations. - Si la variable URL contient une chaîne vide, la zone Web ne tente pas de charger l’URL. La commande [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) génère une erreur dans ce cas. - Si la variable URL ne contient pas de protocole (http, mailto, file, etc.), la zone Web ajoute "http://", ce qui n’est pas le cas pour la commande [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html). @@ -67,28 +67,27 @@ La variable URL produit les mêmes effets que la commande [WA OUVRIR URL](https: | --------- | --------------- | ----------------- | | urlSource | string | Une URL. | - #### Objets pris en charge [Zone Web](webArea_overview.md) -* * * + + + + +--- ## Utiliser le moteur de rendu Web intégré Cette option vous permet de choisir entre deux moteurs de rendus pour la zone Web, en fonction des spécificités de votre application : -* **unchecked** - `JSON value: system` (default): In this case, 4D uses the "best" engine corresponding to the system. Sous Windows, 4D utilise automatiquement la plus version la plus récente du navigateur présent sur la machine (IE11, MS Edge, etc.). Sur macOS, 4D utilise la version courante du WebKit (Safari). Ce fonctionnement vous permet de bénéficier automatiquement des dernières avancées en matière de rendu Web, via HTML5 ou JavaScript. En revanche, vous pouvez rencontrer des différences de rendu entre les implémentations d’Internet Explorer/Edge et de WebKit. -* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google. L’utilisation d'un moteur Web intégré vous permet d’avoir l’assurance que le rendu et le fonctionnement des zones Web de votre application seront quasiment identiques, quelle que soit la plate-forme d’exécution de 4D (de légères variations de pixels ou des différences liées à l’implémentation réseau pourront toutefois être constatées). En contrepartie, vous ne bénéficiez plus des mises à jour automatiques du moteur Web effectuées par le système d’exploitation. Des nouvelles versions du moteur seront toutefois proposées via 4D. - - A noter que le moteur Blink est soumis aux restrictions suivantes : - - * [WA SET PAGE CONTENT](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PAGE-CONTENT.301-4310783.en.html) : l'utilisation de cette commande nécessite le chargement d'au moins une page dans la zone (via un appel à la commande [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) ou via une affectation à la variable URL associée à la zone). - * L'exécution d'applets Java, JavaScript et de plugins est toujours autorisée et ne peut pas être désactivée dans les zones Web de Blink. Les sélecteurs suivants des commandes [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html) et [WA GET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-GET-PREFERENCE.301-4310763.en.html) sont ignorés : - * `WA enable Java applets` - * `WA enable JavaScript` - * `WA enable plugins` - * Lorsque les déposer d'URL sont rendus possibles par le sélecteur `WA enable URL drop` de la commande [WA SET PREFERENCE](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-SET-PREFERENCE.301-4310780.en.html), le premier déposer doit être précédé d'au moins un appel à la commande [WA OPEN URL](https://doc.4d.com/4Dv17R6/4D/17-R6/WA-OPEN-URL.301-4310772.en.html) ou d'une affectation vers la variable d'URL associée à la zone. +* **unchecked** - `JSON value: system` (default): In this case, 4D uses the "best" engine corresponding to the system. Sous Windows, 4D utilise automatiquement la plus version la plus récente du navigateur présent sur la machine (IE11, MS Edge, etc.). Sur macOS, 4D utilise la version courante du WebKit (Safari). Ce fonctionnement vous permet de bénéficier automatiquement des dernières avancées en matière de rendu Web, via HTML5 ou JavaScript. However, you may notice some rendering differences between Internet Explorer/Edge implementations and WebKit ones. +* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google (CEF). L’utilisation d'un moteur Web intégré vous permet d’avoir l’assurance que le rendu et le fonctionnement des zones Web de votre application seront quasiment identiques, quelle que soit la plate-forme d’exécution de 4D (de légères variations de pixels ou des différences liées à l’implémentation réseau pourront toutefois être constatées). En contrepartie, vous ne bénéficiez plus des mises à jour automatiques du moteur Web effectuées par le système d’exploitation. Des nouvelles versions du moteur seront toutefois proposées via 4D. + +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). +- 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. #### Grammaire JSON @@ -96,7 +95,6 @@ Cette option vous permet de choisir entre deux moteurs de rendus pour la zone We | --------- | --------------- | -------------------- | | webEngine | string | "embedded", "system" | - #### Objets pris en charge [Zone Web](webArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/radio_overview.md b/website/translated_docs/fr/FormObjects/radio_overview.md index cfa943dc342bfa..a863803137aadb 100644 --- a/website/translated_docs/fr/FormObjects/radio_overview.md +++ b/website/translated_docs/fr/FormObjects/radio_overview.md @@ -3,54 +3,58 @@ id: radiobuttonOverview title: Bouton radio --- -## Aperçu - Les boutons radio sont des objets qui permettent à l’utilisateur de sélectionner une valeur parmi un groupe de valeurs. -Un bouton radio apparaît sous la forme d’un texte suivi d’un cercle. However, radio buttons can have [various appearances](#button-styles). +Un bouton radio apparaît sous la forme d’un texte suivi d’un cercle. Cependant, les boutons radio peuvent avoir [différentes apparences](#button-styles). ![](assets/en/FormObjects/radio1.png) -A radio button is selected: +Un bouton radio est sélectionné : +- lorsque l'utilisateur clique dessus +- lorsqu'il a le focus et que l'utilisateur appuie sur la touche **Espace**. + -- when the user clicks on it -- when it has the focus and the user presses the **Space bar** key. ## Configuration des boutons radio -Les boutons radio sont utilisés sous forme d’ensembles coordonnés : un seul bouton peut être sélectionné à la fois parmi l’ensemble. 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. +Les boutons radio sont utilisés sous forme d’ensembles coordonnés : un seul bouton peut être sélectionné à la fois parmi l’ensemble. Afin de fonctionner de manière coordonnée, un ensemble de boutons radio doit partager la même propriété de [groupe radio](properties_Object.md#radio-group). Les boutons radio sont contrôlés par des méthodes. Comme pour tous les boutons, la variable associée au bouton radio est initialisée à 0 (zéro) lorsque le formulaire est ouvert pour la première fois. Une méthode associée à un bouton radio est exécutée lorsqu’il est sélectionné. L’exemple suivant représente des boutons radio utilisés dans une base de données d’enregistrements audio et se rapporte à la vitesse d’enregistrement : ![](assets/en/FormObjects/radio2.png) Sélectionner un bouton radio d’un groupe met ce bouton à 1 et les autres boutons du groupe à 0. Un seul bouton radio du groupe peut être sélectionné à la fois. - -> 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. +> Vous pouvez associer [des expressions de type booléen](properties_Object.md#variable-or-expression) à des boutons radio. Dans ce cas, lorsqu'un bouton radio d'un groupe est sélectionné, sa variable est True et les variables des autres boutons radio du groupe sont False. La valeur contenue dans un objet bouton radio n’est pas sauvegardée automatiquement (hormis s'il s'agit de la représentation d'un champ booléen) ; les valeurs des boutons radio doivent être stockées dans leurs variables et gérées à l’aide de méthodes. + + + ## Styles de bouton -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. +[Les styles de bouton](properties_TextAndPicture.md#button-style) radio contrôlent l'apparence générale du bouton radio ainsi que ses propriétés disponibles. Il est possible d'appliquer différents styles prédéfinis aux boutons radio. Cependant, le même style de bouton doit être appliqué à tous les boutons radio d'un groupe afin qu'ils fonctionnent comme prévu. 4D propose des boutons radio dans les styles prédéfinis suivants : + ### Classique -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. +Le style de bouton radio Classique est un bouton système standard (c'est-à-dire une bulle avec un libellé) qui exécute le code lorsqu'un utilisateur clique dessus. ![](assets/en/FormObjects/radio_regular.png) -In addition to initiating code execution, the Regular radio button style changes bullsey color when being hovered. +En plus de lancer l'exécution du code, le style de bouton radio Classique change la couleur de la bulle lors du survol. + ### A plat -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. +Le style de bouton radio A plat est un bouton système standard (c'est-à-dire une bulle avec un libellé) qui exécute le code lorsqu'un utilisateur clique dessus. ![](assets/en/FormObjects/radio_flat.png) -By default, the Flat style has a minimalist appearance. Le style graphique du bouton A plat est particulièrement utile pour les formulaires à imprimer. +Par défaut, le style A plat a une apparence minimaliste. Le style graphique du bouton A plat est particulièrement utile pour les formulaires à imprimer. + ### Barre d’outils @@ -58,77 +62,91 @@ Le style du bouton radio Barre d'outils est initialement destiné à être inté Par défaut, le style bouton Barre d'outils a un fond transparent avec un libellé au centre. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - le contour du bouton apparaît. + - *Sous Windows* - le contour du bouton apparaît. ![](assets/en/FormObjects/radio_toolbar.png) -- *Sous macOS* - le contour du bouton n’apparaît jamais. + - *Sous macOS* - le contour du bouton n’apparaît jamais. + + ### 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. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : +Le style de bouton radio Bevel est similaire au comportement du style [barre d'outils](#toolbar), à la seule différence qu'il possède un arrière-plan gris clair et un contour gris. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : + + - *Sous Windows* - le contour du bouton apparaît. + + ![](assets/en/FormObjects/radio_bevel.png) -- *Sous Windows* - le contour du bouton apparaît. - - ![](assets/en/FormObjects/radio_bevel.png) + - *Sous macOS* - le contour du bouton n’apparaît jamais. -- *Sous macOS* - le contour du bouton n’apparaît jamais. ### Bevel arrondi Le style du bouton Bevel arrondi est presque identique au style [Bevel](#bevel), à l'exception des coins du bouton qui peuvent, selon le système d'exploitation, être arrondis. -- *Sous Windows* - le bouton est identique au style [Bevel](#bevel). + - *Sous Windows* - ce bouton est identique au style [Bevel](#bevel). + + - *Sous macOS* - les coins du bouton sont arrondis. ![](assets/en/FormObjects/roundedBevel.png) -- *Sous macOS* - les coins du bouton sont arrondis. ![](assets/en/FormObjects/roundedBevel.png) ### OS X Gradient Le style du bouton OS X Gradient est presque identique au style [Bevel](#bevel), à l'exception de son apparence qui peut, en fonction du système d'exploitation, avoir deux tons. -- *Sous Windows* - ce bouton est identique au style [Bevel](#bevel). + - *Sous Windows* - ce bouton est identique au style [Bevel](#bevel). + + - *Sous macOs* - le bouton s'affiche comme un bouton à deux tons. + -- *Sous macOs* - le bouton s'affiche comme un bouton à deux tons. ### OS X Texture -The OS X Textured radio button style is nearly identical to the [Toolbar](#toolbar) style except, depending on the OS, it may have a different appearance and does not display hover. +Le style du bouton radio OS X Textured est presque identique au style [Barre d'outils](#toolbar), à l'exception de son apparence qui peut, en fonction du système d'exploitation, être différente et ne pas afficher le survol. Par défaut, le style OS X Textured apparaît comme : -- *Windows* - a toolbar-like button with a label in the center and the background is always displayed. + - *Sous Windows* - un bouton en forme de barre d'outils avec une étiquette au centre et l'arrière-plan est toujours affiché. + + - *Sous macOS* - un bouton système standard affichant un changement de couleur du gris clair au gris foncé. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. + + ![](assets/en/FormObjects/OSXTextured.png) + -- *Sous macOS* - un bouton système standard affichant un changement de couleur du gris clair au gris foncé. Sa hauteur est prédéfinie : il n'est pas possible de l'agrandir ou de la réduire. - - ![](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. +The Office XP button style combines the appearance of the [Regular](#regular) style (standard system button) with the [Toolbar](#toolbar) style's behavior. Les couleurs (surbrillance et arrière-plan) d'un bouton au style Office XP sont basées sur les couleurs du système. En fonction du système d'exploitation, le design du bouton peut changer lorsque la souris le survole : -- *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. - - ![](assets/en/FormObjects/radio_xp.png) + - *Sous Windows* - son arrière-plan n'apparaît que lorsque la souris le survole. + + ![](assets/en/FormObjects/radio_xp.png) + + - *Sous macOS* - son arrière-plan est toujours affiché. + -- *Sous macOS* - son arrière-plan est toujours affiché. ### Contracter/Déployer -This button style can be used to add a standard collapse/expand icon. Ces boutons sont utilisés nativement dans les listes hiérarchiques. In Windows, the button looks like a [+] or a [-]; in macOS, it looks like a triangle pointing right or down. +Ce style de bouton peut être utilisé pour ajouter une icône standard contracter/déployer. Ces boutons sont utilisés nativement dans les listes hiérarchiques. Sous Windows, le bouton ressemble à un [+] ou un [-]; sous macOS, cela ressemble à un triangle pointant vers la droite ou vers le bas. ![](assets/en/FormObjects/checkbox_collapse.png) + + ### Bouton 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. +Le style de bouton radio disclosure affiche le bouton radio comme un bouton disclosure standard, généralement utilisé pour afficher/masquer des informations supplémentaires. Le symbole du bouton pointe vers le bas avec la valeur 0 et vers le haut avec la valeur 1. ![](assets/en/FormObjects/checkbox_disclosure.png) + ### Personnalisé -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). +Le style de bouton radio Personnalisé accepte une image d'arrière-plan personnalisée et permet de gérer des paramètres supplémentaires tels que le [décalage de l'icône](properties_TextAndPicture.md#icon-offset) et les [marges](properties_TextAndPicture.md#horizontalMargin). + ## Propriétés prises en charge diff --git a/website/translated_docs/fr/FormObjects/ruler.md b/website/translated_docs/fr/FormObjects/ruler.md index 9dea3c178fe738..56d9a5a45b8129 100644 --- a/website/translated_docs/fr/FormObjects/ruler.md +++ b/website/translated_docs/fr/FormObjects/ruler.md @@ -3,7 +3,6 @@ id: ruler title: Règle --- -## Aperçu La règle est un objet d'interface standard permettant de définir ou de lire une valeur à l'aide d'un curseur placé sur une règle généralement graduée. @@ -17,7 +16,7 @@ Pour plus d'informations, veuillez vous reporter à la section [Utiliser des ind [Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Afficher graduation](properties_Scale.md#display-graduation) - [Saisissable](properties_Entry.md#enterable) - [Exécuter méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Unité de graduation](properties_Scale.md#graduation-step) -[Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Emplacement du libellé](properties_Scale.md#label-location) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Format numérique](properties_Display.md#number-format) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Pas](properties_Scale.md#step) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) -## See also +## Voir également -- [indicateurs de progression](progressIndicator.md) +- [indicateurs de progression](progressIndicator.md) - [stepper](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/shapes_overview.md b/website/translated_docs/fr/FormObjects/shapes_overview.md index 763b27d8f93e57..bb8a4d3f6859c8 100644 --- a/website/translated_docs/fr/FormObjects/shapes_overview.md +++ b/website/translated_docs/fr/FormObjects/shapes_overview.md @@ -11,6 +11,7 @@ Les formes 4D prennent en charge les formes basiques suivantes : - lignes - ovales + ## Rectangle Un rectangle statique est un objet décoratif contenu dans les formulaires. Les rectangles sont limités à des formes carrées. @@ -32,57 +33,61 @@ Les rectangles sont créés à l'aide de plusieurs propriétés (couleur, épais } ``` -#### Propriétés prises en charge -[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) +#### Propriétés prises en charge +[Bas](properties_CoordinatesAndSizing.md#bottom) - [Css Class](properties_Object.md#css-class) - [Rayon d'arrondi](properties_CoordinatesAndSizing.md#corner-radius) - [Type de pointillé](properties_BackgroundAndBorder.md#dotted-line-type) - [Couleur de fond](properties_BackgroundAndBorder.md#background-color-fill-color) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Couleur de ligne](properties_BackgroundAndBorder.md#line-color) - [Épaisseur du trait](properties_BackgroundAndBorder.md#line-width) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) ## Ligne -Une ligne statique est un objet décoratif pour les formulaires, entre deux tracés. Lines can be horizontal, vertical, or of any angle shapes. +Une ligne statique est un objet décoratif pour les formulaires, entre deux tracés. Les lignes peuvent être horizontales, verticales ou de toute forme d'angle. + +Les lignes sont créées à l'aide de plusieurs propriétés (couleur, épaisseur de ligne, etc.). -The design of lines is controlled through many properties (color, line thickness, etc.). ### propriété startPoint +La propriété JSON `startPoint` définit à partir de quelle coordonnée la ligne peut être dessinée (voir l'exemple). -The `startPoint` JSON property defines from which coordinate to draw the line (see example). +> la propriété `startPoint` n'est pas exposée dans la liste des propriétés, où la direction du dessin de ligne est visible. -> the `startPoint` property is not exposed in the Property List, where the line drawing direction is visible. -#### Exemple JSON : - "myLine": { - "type": "line", - "left": 20, - "top": 40, - "width": 100, - "height": 80, - "startPoint": "topLeft", //première orientation - "strokeDashArray": "6 2" //pointillé - } - +#### Exemple JSON : +``` + "myLine": { + "type": "line", + "left": 20, + "top": 40, + "width": 100, + "height": 80, + "startPoint": "topLeft", //première orientation + "strokeDashArray": "6 2" //pointillé + } +``` Résultat : ![](assets/en/FormObjects/shape_line1.png) - "myLine": { - "type": "line", - "left": 20, - "top": 40, - "width": 100, - "height": 80, - "startPoint": "bottomLeft", //deuxième orientation - "strokeDashArray": "6 2" //pointillé - } - +``` + "myLine": { + "type": "line", + "left": 20, + "top": 40, + "width": 100, + "height": 80, + "startPoint": "bottomLeft", //deuxième orientation + "strokeDashArray": "6 2" //pointillé + } +``` Résultat : ![](assets/en/FormObjects/shape_line2.png) -#### Propriétés prises en charge -[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) + +#### Propriétés prises en charge +[Bas](properties_CoordinatesAndSizing.md#bottom) - [Css Class](properties_Object.md#css-class) - [Type de pointillé](properties_BackgroundAndBorder.md#dotted-line-type) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Couleur du trait](properties_BackgroundAndBorder.md#line-color) - [Épaisseur du trait](properties_BackgroundAndBorder.md#line-width) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [startPoint](#startpoint-property) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) ## Ovale -Un ovale statique est un objet décoratif contenu dans les formulaires. Oval objects can be used to draw circular shapes (when [width](properties_CoordinatesAndSizing.md#width) and [height](properties_CoordinatesAndSizing.md#height) properties are equal). +Un ovale statique est un objet décoratif contenu dans les formulaires. Les objets de forme ovale peuvent être utilisés pour dessiner des formes circulaires (lorsque les propriétés [largeur](properties_CoordinatesAndSizing.md#width) et [hauteur](properties_CoordinatesAndSizing.md#height) sont identiques). ![](assets/en/FormObjects/shape_oval.png) @@ -90,15 +95,15 @@ Un ovale statique est un objet décoratif contenu dans les formulaires. Oval obj ```4d "myOval": { - "type": "oval", //define the type of object - "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 - "fill": "blue" //define the background color + "type": "oval", //définit le type d'objet + "left": 60, //position sur la gauche du formulaire + "top": 160, //position en haut du formulaire + "width": 100, //largeur de l'objet + "height": 20, //hauteur de l'objet + "borderRadius": 20 //définit la couleur de fond } ``` -#### Propriétés prises en charge -[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 +#### Propriétés prises en charge +[Bas](properties_CoordinatesAndSizing.md#bottom) - [Css Class](properties_Object.md#css-class) - [Type de pointillé](properties_BackgroundAndBorder.md#dotted-line-type) - [Couleur de fond](properties_BackgroundAndBorder.md#background-color-fill-color) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Couleur du trait](properties_BackgroundAndBorder.md#line-color) - [Épaisseur du trait](properties_BackgroundAndBorder.md#line-width) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/spinner.md b/website/translated_docs/fr/FormObjects/spinner.md index 1ef0fece373c70..675740845244ab 100644 --- a/website/translated_docs/fr/FormObjects/spinner.md +++ b/website/translated_docs/fr/FormObjects/spinner.md @@ -3,8 +3,6 @@ id: spinner title: Spinner --- -## Aperçu - Le spinner est un indicateur circulaire qui affiche une animation continue, telle que le [Barber shop](progressIndicator.md#barber-shop). ![](assets/en/FormObjects/spinner.gif) @@ -18,4 +16,5 @@ A l’exécution du formulaire, l'objet n’est pas animé. Vous devez gérer l ### Propriétés prises en charge -[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Type d'expression](properties_Object.md#expression-type) - [Hauteur](properties_CoordinatesAndSizing.md#height) -[Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Type d'expression](properties_Object.md#expression-type) - [Hauteur](properties_CoordinatesAndSizing.md#height) -[Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) + \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/splitters.md b/website/translated_docs/fr/FormObjects/splitters.md index a20723983eb6db..21238ea09bd77c 100644 --- a/website/translated_docs/fr/FormObjects/splitters.md +++ b/website/translated_docs/fr/FormObjects/splitters.md @@ -3,20 +3,21 @@ id: splitters title: Séparateur --- -## Aperçu -Un séparateur divise un formulaire en deux zones. Il permet à l’utilisateur d’agrandir ou de réduire chaque zone en le déplaçant. Un séparateur peut être horizontal ou vertical. Il tient compte des propriétés de redimensionnement des objets, ce qui permet de personnaliser entièrement l’interface. Un séparateur peut être “pousseur†ou non + +Un séparateur divise un formulaire en deux zones. Il permet à l’utilisateur d’agrandir ou de réduire chaque zone en le déplaçant. Un séparateur peut être horizontal ou vertical. The splitter takes into account each object’s resizing properties, which means that you can completely customize your application's interface. Un séparateur peut être “pousseur†ou non L’utilisation type du séparateur est le formulaire de sortie dans lequel les colonnes peuvent être redimensionnées : ![](assets/en/FormObjects/split1.png) + Les caractéristiques générales des séparateurs sont les suivantes : -* Vous pouvez placer autant de séparateurs que vous voulez dans tout type de formulaire. De même, il est possible de mêler des séparateurs horizontaux et verticaux dans un même formulaire. -* Un séparateur peut traverser un objet. Celui-ci sera redimensionné lors du déplacement du séparateur. -* Les butées des séparateurs sont calculées de manière à ce que les objets déplacés restent entièrement visibles dans le formulaire ou ne passent pas sous/à côté d’un autre séparateur. Lorsque la propriété [Pousseur](properties_ResizingOptions.md#pusher) est associée à un séparateur, son déplacement vers la droite ou vers le bas ne rencontre pas de butée. -* Les redimensionnements effectués dans les formulaires à l’aide des séparateurs ne sont conservés que durant l’affichage du formulaire. Une fois le formulaire refermé, les dimensions initiales sont restaurées. +* Vous pouvez placer autant de séparateurs que vous voulez dans tout type de formulaire. De même, il est possible de mêler des séparateurs horizontaux et verticaux dans un même formulaire. +* Un séparateur peut traverser un objet. Celui-ci sera redimensionné lors du déplacement du séparateur. +* Les butées des séparateurs sont calculées de manière à ce que les objets déplacés restent entièrement visibles dans le formulaire ou ne passent pas sous/à côté d’un autre séparateur. Lorsque la propriété [Pousseur](properties_ResizingOptions.md#pusher) est associée à un séparateur, son déplacement vers la droite ou vers le bas ne rencontre pas de butée. +* Les redimensionnements effectués dans les formulaires à l’aide des séparateurs ne sont conservés que durant l’affichage du formulaire. Une fois le formulaire refermé, les dimensions initiales sont restaurées. Une fois inséré, un séparateur se présente sous la forme d’un trait. Vous pouvez modifier son [style de bordure](properties_BackgroundAndBorder.md#border-line-style-dotted-line-type) afin d’obtenir un trait plus ou moins épais, ou [modifier sa couleur](properties_BackgroundAndBorder.md##font-color-line-color). @@ -33,9 +34,10 @@ Une fois inséré, un séparateur se présente sous la forme d’un trait. Vous } ``` + ### Propriétés prises en charge -[Style de la bordure](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Gras](properties_Text.md#bold) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Couleur du trait](properties_BackgroundAndBorder.md##font-color-line-color) - [Nom](properties_Object.md#object-name) - [Pousseur](properties_ResizingOptions.md#pusher) - [Droite](properties_CoordinatesAndSizing.md#right) - [Titre](properties_Object.md#title) -[Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) +[Border Line Style](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [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) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [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) ## Interaction avec les propriétés des objets environnants @@ -43,23 +45,22 @@ Dans un formulaire, les séparateurs interagissent sur les objets qui les entour | Options de redimensionnement du ou des objet(s) | Objet(s) au-dessus du séparateur horizontal ou à gauche du séparateur vertical (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 | Restent tel que | Sont déplacés avec le séparateur (conservent leur position relative) jusqu’à la butée suivante. La butée du déplacement vers le bas ou vers la droite est soit le bord de la fenêtre, soit un autre séparateur. | Sont déplacés sans limites avec le séparateur (conservent leur position relative). Aucune butée n’est appliquée (cf. paragraphe suivant) | +| Aucun | Restent tel que | Sont déplacés avec le séparateur (conservent leur position relative) jusqu’à la butée suivante. La butée du déplacement vers le bas ou vers la droite est soit le bord de la fenêtre, soit un autre séparateur. | Sont déplacés sans limites avec le séparateur (conservent leur position relative). Aucune butée n’est appliquée (cf. paragraphe suivant) | | Redimensionnement | Gardent leur position d’origine mais sont redimensionnés en fonction de la nouvelle position du séparateur | | | -| Move | Se déplacent avec le séparateur | | | - +| Déplacer | Se déplacent avec le séparateur | | | *(1) Un objet situé à cet emplacement sert de butée en cas de déplacement vers le haut (séparateur horizontal) ou vers la gauche (séparateur vertical) s’il ne comporte aucune option de redimensionnement.* - > Un objet entièrement contenu dans le rectangle définissant le séparateur est déplacé en même temps que le séparateur lui-même. ## Gestion programmée des séparateurs + Vous pouvez associer une méthode objet à un séparateur. Cette méthode sera appelée avec l’événement `On Clicked` durant tout le déplacement. A [variable](properties_Object.md#variable-or-expression) of the *Longint* type is associated with each splitter. Cette variable peut être utilisée dans vos méthodes objet et/ou formulaire. Elle prend pour valeur le déplacement courant, en pixels, du séparateur. -* Si elle est négative : le déplacement a été effectué vers le haut ou vers la gauche, -* Si elle est positive : le déplacement a été effectué vers le bas ou vers la droite, -* Si elle est égale à 0 : le séparateur a été relâché à son emplacement d’origine. +* Si elle est négative : le déplacement a été effectué vers le haut ou vers la gauche, +* Si elle est positive : le déplacement a été effectué vers le bas ou vers la droite, +* Si elle est égale à 0 : le séparateur a été relâché à son emplacement d’origine. -Vous pouvez également déplacer le séparateur par programmation : il suffit de modifier la valeur de la variable associée. Imaginons par exemple qu’un séparateur vertical soit associé à la variable `sépara1`. Si vous écrivez `sépara1:=-10`, le séparateur sera déplacé de 10 pixels vers la gauche — comme si l’utilisateur l’avait fait manuellement. Le déplacement s’effectue au terme de l’exécution de la méthode objet ou formulaire contenant l’instruction. \ No newline at end of file +Vous pouvez également déplacer le séparateur par programmation : il suffit de modifier la valeur de la variable associée. Imaginons par exemple qu’un séparateur vertical soit associé à la variable `sépara1`. Si vous écrivez `sépara1:=-10`, le séparateur sera déplacé de 10 pixels vers la gauche — comme si l’utilisateur l’avait fait manuellement. Le déplacement s’effectue au terme de l’exécution de la méthode objet ou formulaire contenant l’instruction. diff --git a/website/translated_docs/fr/FormObjects/staticPicture.md b/website/translated_docs/fr/FormObjects/staticPicture.md index b088a3ce971d3d..486f71f72a6e21 100644 --- a/website/translated_docs/fr/FormObjects/staticPicture.md +++ b/website/translated_docs/fr/FormObjects/staticPicture.md @@ -3,25 +3,28 @@ id: staticPicture title: Image statique --- -## Aperçu Les images statiques sont des [objets statiques](formObjects_overview.md#active-and-static-objects) pouvant être utilisées à des fins diverses dans les formulaires 4D, notamment comme décor, arrière-plan ou interface utilisateur : ![](assets/en/FormObjects/StaticPict.png) + Les images statiques sont stockées à l’extérieur des formulaires et insérées par référence. Dans l'éditeur de formules, les objets image statique sont créées par copier-coller ou par glisser-déposer. -> Si vous placez une image statique dans la page 0 d’un formulaire multi-pages, elle apparaîtra comme élément d’arrière-plan de toutes les pages. Vous pouvez également l’inclure dans un formulaire hérité, qui s'applique à l'arrière-plan de différents autres formulaires. Dans les deux cas, votre base s’exécutera plus rapidement. +> Si vous placez une image statique dans la page 0 d’un formulaire multi-pages, elle apparaîtra comme élément d’arrière-plan de toutes les pages. Vous pouvez également l’inclure dans un formulaire hérité, qui s'applique à l'arrière-plan de différents autres formulaires. Either way, your application will run faster than if the picture was pasted into each page. + + ## Format et emplacement L'image d'origine doit être stockée dans un format géré nativement par 4D (4D reconnaît les principaux formats d'image : JPEG, PNG, BMP, SVG, GIF, etc.). -Two main locations can be used for static picture path: +Deux emplacements principaux peuvent être utilisés pour le chemin d'image statique : + +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. Dans ce cas, le chemin d'accès se trouve dans "/RESOURCES/\". +- dans un dossier d'images (nommé **Images** par exemple) dans le dossier du formulaire. Convient lorsque les images statiques sont utilisées uniquement dans le formulaire et/ou lorsque vous souhaitez pouvoir déplacer ou dupliquer le formulaire entier dans un ou plusieurs projets. Dans ce cas, le chemin d'accès est "<\picture path\>" et est résolu à partir de la racine du dossier du formulaire. -- in the **Resources** folder of the project database. Appropriate when you want to share static pictures between several forms in the database. Dans ce cas, le chemin d'accès se trouve dans "/RESOURCES/\". -- in an image folder (e.g. named **Images**) within the form folder. Convient lorsque les images statiques sont utilisées uniquement dans le formulaire et/ou lorsque vous souhaitez pouvoir déplacer ou dupliquer le formulaire entier dans un ou plusieurs projets. Dans ce cas, le chemin d'accès est "<\picture path\>" et est résolu à partir de la racine du dossier du formulaire. ## Propriétés prises en charge -[Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Affichage](properties_Picture.md#display) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) \ No newline at end of file +[Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Affichage](properties_Picture.md#display) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/fr/FormObjects/stepper.md b/website/translated_docs/fr/FormObjects/stepper.md index 62a38720ad145f..64a677853c5dbf 100644 --- a/website/translated_docs/fr/FormObjects/stepper.md +++ b/website/translated_docs/fr/FormObjects/stepper.md @@ -3,8 +3,6 @@ id: stepper title: Stepper --- -## Aperçu - Un stepper permet à l'utilisateur de faire défiler des valeurs numériques, des durées (heures) ou des dates par des étapes pré-définies en cliquant sur les boutons de direction. ![](assets/en/FormObjects/indicator_numericStepper.png) @@ -15,21 +13,25 @@ La variable associée à l’objet peut être affectée à une zone saisissable Un stepper peut être directement associé à une variable numérique, heure ou date. -* Pour les valeurs de type heure, les propriétés Minimum, Maximum et Pas représentent des secondes. Par exemple, pour définir un stepper de 8h00 à 18h00 avec des pas de 10 minutes : - * [minimum](properties_Scale.md#minium) = 28 800 (8*60*60) - * [maximum](properties_Scale.md#maximum) = 64 800 (18*60*60) - * [Pas](properties_Scale.md#step) = 600 (10*60) +* Pour les valeurs de type heure, les propriétés Minimum, Maximum et Pas représentent des secondes. Par exemple, pour définir un stepper de 8h00 à 18h00 avec des pas de 10 minutes : + * [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) * Pour les valeurs de type date, la valeur saisie dans la propriété [Pas](properties_Scale.md#step) représente des jours. Les propriétés Minimum et Maximum sont ignorées. - > Pour que le stepper fonctionne avec une variable heure ou date, il est impératif de définir son type dans la Liste de propriétés ET de la déclarer explicitement via la commande [C_TIME](https://doc.4d.com/4Dv17R5/4D/17-R5/C-TIME.301-4128557.en.html) ou [C_DATE](https://doc.4d.com/4Dv17R5/4D/17-R5/C-DATE.301-4128570.en.html). Pour plus d'informations, veuillez vous reporter à la section [Utiliser des indicateurs](progressIndicator.md#using-indicatire) de la page "Indicateurs de progression". ## Propriétés prises en charge +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) -[Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Saisissable](properties_Entry.md#enterable) - [Exécuter méthode objet](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "entier", "numérique", "date", ou "heure") - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Step](properties_Scale.md#step) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) + + +## Voir également +- [indicateurs de progression](progressIndicator.md) +- [règle](ruler.md) + + + -[Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Columns](properties_Crop.md#columns) - [Execute object method](properties_Action.md#execute-object-method) - [Type d'expression](properties_Object.md#expression-type) (uniquement "entier", "numérique", "date", ou "heure") - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [Nom](properties_Object.md#object-name) - [Pathname](properties_Picture.md#pathname) - [Droite](properties_CoordinatesAndSizing.md#right) - [Rows](properties_Crop.md#rows) - [Step](properties_Scale.md#step) - [Action standard](properties_Action.md#standard-action) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) -## See also -- [indicateurs de progression](progressIndicator.md) -- [règle](ruler.md) \ No newline at end of file diff --git a/website/translated_docs/fr/FormObjects/subform_overview.md b/website/translated_docs/fr/FormObjects/subform_overview.md index 0322a262b78775..1b63c90470f2a5 100644 --- a/website/translated_docs/fr/FormObjects/subform_overview.md +++ b/website/translated_docs/fr/FormObjects/subform_overview.md @@ -1,35 +1,37 @@ --- id: subformOverview -title: Subform +title: Sous-formulaire --- -## Aperçu Un sous-formulaire est un formulaire inclus dans un autre formulaire. -### Terminologie + +## Terminologie Afin de bien définir les notions mises en oeuvre avec les sous-formulaires, voici quelques définitions relatives aux termes employés : -* **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. Cette notion est importante car il est possible d’afficher plusieurs instances d’un même sous-formulaire dans un formulaire parent. -* **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. Cette notion est importante car il est possible d’afficher plusieurs instances d’un même sous-formulaire dans un formulaire parent. +* **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. + ## Sous-formulaires en liste -A list subform lets you enter, view, and modify data in other tables. Les sous-formulaires en liste sont généralement utilisés avec les bases de données utilisant des liens de type 1 vers N. Un sous-formulaire en liste affiche les enregistrements de la table N liée par un lien automatique de type 1 vers N. Vous pouvez disposer de plusieurs sous-formulaires provenant de différentes tables dans le même formulaire. En revanche, il n’est pas possible de placer deux sous-formulaires appartenant à la même table dans une même page de formulaire. +Un sous-formulaire en liste vous permet de saisir, visualiser et modifier des données dans d’autres tables. Les sous-formulaires en liste sont généralement utilisés avec les bases de données utilisant des liens de type 1 vers N. Un sous-formulaire en liste affiche les enregistrements de la table N liée par un lien automatique de type 1 vers N. Vous pouvez disposer de plusieurs sous-formulaires provenant de différentes tables dans le même formulaire. En revanche, il n’est pas possible de placer deux sous-formulaires appartenant à la même table dans une même page de formulaire. Par exemple, une base de gestion de contacts peut utiliser une instance de sous-formulaire en liste pour afficher tous les contacts d’une société. Bien que les contacts apparaissent dans l’écran général, l’information est en fait stockée dans la table liée. A l’aide d’un lien 1 vers N, la conception de cette base de données rend facile le stockage d’un nombre illimité de contacts pour chacune des sociétés. Avec des liens automatiques, vous pouvez permettre la saisie de données dans la table liée sans programmation. Bien que les sous-formulaires en liste soient généralement associés aux tables N, une instance de sous-formulaire peut afficher des enregistrements de toute autre table de la base de données. -You can also allow the user to enter data in the List form. Suivant la configuration du sous-formulaire, l’utilisateur pourra afficher le formulaire détaillé en double-cliquant sur un sous-enregistrement ou en utilisant les commandes d’ajout et de modification des sous-enregistrements. +Vous pouvez également permettre à l’utilisateur de saisir des données dans le formulaire liste. Suivant la configuration du sous-formulaire, l’utilisateur pourra afficher le formulaire détaillé en double-cliquant sur un sous-enregistrement ou en utilisant les commandes d’ajout et de modification des sous-enregistrements. > 4D propose trois actions standard, permettant de répondre aux besoins élémentaires de gestion des sous-enregistrements : `Modifier sous-enregistrement`, `Supprimer sous-enregistrement` et `Ajouter sous-enregistrement`. Lorsque le formulaire comporte plusieurs instances de sous-formulaires, l’action s’applique au sous-formulaire ayant le focus. + ## Sous-formulaires en page Les sous-formulaires en mode page peuvent afficher des données relatives à l'enregistrement courant ou toute valeur pertinente en fonction du contexte (variables, images, etc.). Il peuvent également, et c'est là leur intérêt majeur, comporter des fonctionnalités avancées et interagir avec le formulaire parent (widgets). Les sous-formulaires en page bénéficient de propriétés et d'événements spécifiques, et peuvent être entièrement contrôlés par programmation. @@ -49,7 +51,6 @@ Both objects (time variable and subform container) *have the same variable name* A l’exécution du formulaire parent, la synchronisation des variables doit être effectuée par le développeur à l’aide des événements formulaires adéquats. Deux types d’interactions peuvent se produire : du formulaire vers le sous-formulaire et inversement. #### Mise à jour du contenu du sous-formulaire - Scénario 1 : La valeur de la variable du formulaire parent est modifiée et cette modification doit être répercutée dans le sous-formulaire. Dans notre exemple, l’heure de Heureparis passe à 12:15:00, soit parce que l’utilisateur l’a saisie, soit parce qu’elle est mise à jour dynamiquement (via la commande `Current time` par exemple). Dans ce cas, vous devez utiliser l'événement formulaire Sur modif variable liée. Cet événement doit être coché dans les propriétés du sous-formulaire, il sera généré dans la méthode formulaire du sous-formulaire. @@ -103,7 +104,6 @@ You can modify the labels from the subform by assigning values to the *InvoiceAd ![](assets/en/FormObjects/subforms5.png) ### Programmation inter-formulaires avancée - La communication entre le formulaire parent et les instances des sous-formulaires peut nécessiter d’aller au-delà de l’échange d’une valeur via la variable associée. En effet, vous pouvez souhaiter mettre à jour des variables dans les sous-formulaires en fonction d’actions effectuées dans le formulaire parent et inversement. Si l’on reprend l’exemple du sous-formulaire de type "pendule dynamique", on peut souhaiter définir une ou plusieurs heures d’alerte par pendule. Pour répondre à ces besoins, 4D propose les mécanismes suivants : @@ -112,8 +112,8 @@ Pour répondre à ces besoins, 4D propose les mécanismes suivants : - Appel de l’objet conteneur depuis le sous-formulaire via la commande `CALL SUBFORM CONTAINER`, - Exécution d’une méthode dans le contexte du sous-formulaire via la commande `EXECUTE METHOD IN SUBFORM`. -#### Commandes Object get pointer et Object get name +#### Commandes Object get pointer et Object get name Outre le sélecteur `Objet conteneur sous formulaire`, la commande `OBJECT Get pointer` admet un paramètre permettant de préciser dans quel sous-formulaire chercher l’objet dont le nom est passé en deuxième paramètre. Cette syntaxe n’est utilisable que lorsque le sélecteur Objet nommé est passé. Par exemple, l’instruction suivante : @@ -122,7 +122,7 @@ Par exemple, l’instruction suivante : $ptr:=OBJECT Get pointer(Object named;"MyButton";"MySubForm") ``` -... permet de récupérer un pointeur sur la variable "MonBouton" se trouvant dans l’objet sous-formulaire "MonSousForm". Cette syntaxe permet d’accéder depuis le formulaire parent à tout objet se trouvant dans un sous-formulaire. A noter également la commande `OBJECT Get name` qui permet de récupérer le nom de l’objet ayant le focus. +... retrieves a pointer to the "MyButton" variable that is located in the "MySubForm" subform object. Cette syntaxe permet d’accéder depuis le formulaire parent à tout objet se trouvant dans un sous-formulaire. A noter également la commande `OBJECT Get name` qui permet de récupérer le nom de l’objet ayant le focus. #### Commande CALL SUBFORM CONTAINER @@ -133,7 +133,6 @@ Le code de l’événement est libre (par exemple, 20000 ou -100). Vous pouvez s Pour plus d'informations, reportez-vous à la description de la commande `CALL SUBFORM CONTAINER`. #### Commande EXECUTE METHOD IN SUBFORM - La commande `EXECUTE METHOD IN SUBFORM` permet à un formulaire ou à l’un de ses objets de demander l’exécution d’une méthode dans le contexte de l’instance du sous-formulaire, ce qui lui donne accès aux variables, objets, etc., du sous-formulaire. Cette méthode peut en outre recevoir des paramètres. Ce mécanisme est illustré dans le schéma suivant : @@ -143,9 +142,10 @@ Ce mécanisme est illustré dans le schéma suivant : Pour plus d'informations, reportez-vous à la description de la commande `EXECUTE METHOD IN SUBFORM`. #### Commande GOTO OBJECT - La commande `GOTO OBJECT` peut rechercher l’objet de destination dans le formulaire parent même si elle exécutée depuis un sous-formulaire. + + ## Propriétés prises en charge -[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/fr/FormObjects/tabControl.md b/website/translated_docs/fr/FormObjects/tabControl.md index cff9e4da55f9ad..1547fb2c3ac766 100644 --- a/website/translated_docs/fr/FormObjects/tabControl.md +++ b/website/translated_docs/fr/FormObjects/tabControl.md @@ -11,7 +11,7 @@ Le formulaire multi-pages suivant utilise un onglet : Pour passer d’un écran à l’autre, l’utilisateur clique simplement sur l’onglet correspondant. -Un onglet peut être utilisé, entre autres, pour gérer la navigation entre les pages d’un formulaire multi-pages. Dans ce cas, la commande [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) ou l’action standard `gotoPage` devra être appelée lorsque l’utilisateur cliquera sur l’onglet. +Un onglet peut être utilisé, entre autres, pour gérer la navigation entre les pages d’un formulaire multi-pages. If the tab control is used as a page navigation tool, then the [`FORM GOTO` PAGE](https://doc.4d.com/4dv19/help/command/en/page247.html) command or the `gotoPage` standard action would be used when a user clicks a tab. Un onglet peut aussi être utilisé pour contrôler les données qui sont affichées dans un sous-formulaire. On peut, par exemple, implémenter un rolodex à l’aide d’un onglet. Chaque onglet afficherait alors une des lettres de l’alphabet et l’action de l’onglet serait de charger les informations correspondantes à la lettre sur lequel l’utilisateur a cliqué. @@ -21,10 +21,11 @@ Chaque onglet peut afficher des intitulés ou des intitulés et des petites icô Lorsque vous créez un onglet, 4D gère l’espacement et le placement des onglets. Vous n’avez à fournir à 4D que les intitulés sous la forme d’un tableau ou les icônes et intitulés sous la forme d’une énumération hiérarchique. -Si l’onglet est assez large, il affiche les intitulés et les icônes. S’il ne peut pas afficher toutes les icônes à la fois, il place des flèches de défilement à droite du dernier onglet visible. Les flèches de défilement permettent à l’utilisateur de faire défiler des onglets vers la droite ou vers la gauche. +Si l’onglet est assez large, il affiche les intitulés et les icônes. S’il ne peut pas afficher toutes les icônes à la fois, il place des flèches de défilement à droite du dernier onglet visible. Les flèches de défilement permettent à l’utilisateur de faire défiler des onglets vers la droite ou vers la gauche. Sous macOS, les onglets peuvent être orientés, en plus de la position standard (en haut), à droite, à gauche ou en bas. + ### Exemple JSON : ```4d @@ -38,12 +39,44 @@ Sous macOS, les onglets peuvent être orientés, en plus de la position standard } ``` + + ## Ajouter les intitulés dans un onglet -Pour placer des intitulés dans un onglet, plusieurs possibilités se présentent à vous : +To supply the labels for a tab control, you can use: + +- un objet +- a choice list +- an array + +### Using an object + +You can assign an [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) as the [data source](properties_Object.md#variable-or-expression) of the tab control. The object must contain the following properties: -* Vous pouvez associer à l’onglet [une liste de valeurs](properties_DataSource.md#choice-list-static-list), accessible via une collection (liste statique) ou un pointeur JSON ("$ref") vers une liste json. Les icônes associées à des éléments de liste dans l'éditeur de listes seront affichées dans l'onglet. -* Vous pouvez créer un tableau Texte qui contient les noms de chaque page du formulaire. Le code doit être exécuté avant que le formulaire soit présenté à l’utilisateur. Par exemple, vous pouvez placer ce code dans l’événement formulaire `Sur chargement`. +| Propriété | Type | Description | +| -------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Collection | Mandatory - Collection of scalar values. Only string values are supported. If invalid, empty or not defined, the tab control is empty | +| `index` | number | Index of the currently tab control page (value between 0 and `collection.length-1`) | +| `currentValue` | Texte | Currently selected value | + +The initialization code must be executed before the form is presented to the user. + +In the following example, `Form.tabControl` has been defined as tab control [expression](properties_Object.md#variable-or-expression). You can associate the [`gotoPage` standard action](#goto-page-action) to the form object: + +```4d +Form.tabControl:=New object +Form.tabControl.values:=New collection("Page 1"; "Page 2"; "Page 3") +Form.tabControl.index:=2 //start on page 3 +``` + + +### Utiliser une énumération + +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 to a json list ("$ref"). Icons associated with list items in the Lists editor will be displayed in the tab control. + +### Using a Text array + +Vous pouvez créer un tableau Texte qui contient les noms de chaque page du formulaire. Le code doit être exécuté avant que le formulaire soit présenté à l’utilisateur. Par exemple, vous pouvez placer ce code dans l’événement formulaire `Sur chargement`. ```4d ARRAY TEXT(arrPages;3) @@ -51,20 +84,20 @@ Pour placer des intitulés dans un onglet, plusieurs possibilités se présenten arrPages{2}:="Address" arrPages{3}:="Notes" ``` +> You can also store the names of the pages in a hierarchical list and use the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command to load the values into the array. -> Vous pouvez aussi stocker les noms des pages dans une liste hiérarchique et utiliser la commande `Load list` pour charger les valeurs dans le tableau. -## Gérer les onglets par programmation +## Goto page features ### Commande FORM GOTO PAGE -Vous pouvez utiliser la commande [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) dans la méthode objet de l’onglet pour naviguer parmi les pages du formulaire : +You can use the [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/en/page247.html) command in the tab control’s method: ```4d FORM GOTO PAGE(arrPages) ``` -Cette commande devra être exécutée dans l’événement formulaire `Sur clic`. Il est préférable d’effacer le tableau dans l’événement formulaire `Sur libération`. +The command is executed when the [`On Clicked`](Events/onClicked.md) event occurs. You should then clear the array when the [`On Unload`](Events/onUnload.md) event occurs. Vous pouvez, par exemple, écrire le code suivant : @@ -81,10 +114,16 @@ Vous pouvez, par exemple, écrire le code suivant : ### Action Goto Page -Lorsque vous associez l’[](properties_Action.md#standard-action)action standard `gotoPage` à un objet de type Onglet, 4D affiche automatiquement la page du formulaire correspondant au numéro de l’onglet sélectionné.

        +Lorsque vous associez l’[](properties_Action.md#standard-action)action standard + + `gotoPage` à un objet de type Onglet, 4D affiche automatiquement la page du formulaire correspondant au numéro de l’onglet sélectionné.

        + +Par exemple, si l’utilisateur clique sur le 3e onglet, 4D affichera la page 3 du formulaire courant (si elle existe). + + + -Par exemple, si l’utilisateur clique sur le 3e onglet, 4D affichera la page 3 du formulaire courant (si elle existe). ## Propriétés prises en charge -[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) - [Save value](properties_Object.md#save-value) - [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 +[Gras](properties_Text.md#bold) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Énumération](properties_DataSource.md#choice-list-static-list) - [Css Class](properties_Object.md#css-class) - [Type d'expression](properties_Object.md#expression-type) - [Police](properties_Text.md#font) - [Taille](properties_Text.md#font-size) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Message d'aide](properties_Help.md#help-tip) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Valeur standard](properties_Object.md#save-value) - [Action standard](properties_Action.md#standard-action) - [Orientation onglets](properties_Appearance.md#tab-control-direction) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/fr/FormObjects/text.md b/website/translated_docs/fr/FormObjects/text.md index f62b8061f5219e..b2cf0e0e4a23af 100644 --- a/website/translated_docs/fr/FormObjects/text.md +++ b/website/translated_docs/fr/FormObjects/text.md @@ -3,9 +3,8 @@ id: Texte title: Texte --- -## Aperçu -A text object allows you to display static written content (*e.g.*, instructions, titles, labels, etc.) on a form. Ces zones de texte statique peuvent devenir dynamiques lorsqu'elles incluent des références dynamiques. Pour plus d'informations, reportez-vous à la section [Utiliser des références dans les textes statiques](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html). +Un objet texte vous permet d'afficher du contenu écrit statique (*ex :* instructions, titres, étiquettes, etc.) dans un formulaire. Ces zones de texte statique peuvent devenir dynamiques lorsqu'elles incluent des références dynamiques. Pour plus d'informations, reportez-vous à la section [Utiliser des références dans les textes statiques](https://doc.4d.com/4Dv17R5/4D/17-R5/Using-references-in-static-text.300-4163725.en.html). #### Exemple JSON : @@ -23,6 +22,7 @@ A text object allows you to display static written content (*e.g.*, instructions } ``` + ## Rotation 4D vous permet d’effectuer des rotations de zones de texte dans vos formulaires à l'aide de la propriété [Orientation](properties_Text.md#orientation). @@ -39,6 +39,6 @@ Une fois qu’un texte a été orienté, il reste possible de modifier sa taille - Si l’objet est redimensionné dans la direction C, sa [hauteur](properties_CoordinatesAndSizing.md#height) sera modifiée ; - Si l’objet est redimensionné dans la direction B, sa [largeur](properties_CoordinatesAndSizing.md#width) et sa [hauteur](properties_CoordinatesAndSizing.md#height) seront modifiées. -## Propriétés prises en charge -[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 +## Propriétés prises en charge +[Gras](properties_Text.md#bold) - [Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Css Class](properties_Object.md#css-class) - [Couleur de fond](properties_BackgroundAndBorder.md#fill-color) - [Police](properties_Text.md#font) - [Couleur de la police](properties_Text.md#font-color) - [Taille](properties_Text.md#font-size) [Hauteur](properties_CoordinatesAndSizing.md#height) - [Alignement horizontal](properties_Text.md#horizontal-alignment) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Italique](properties_Text.md#italic) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Nom](properties_Object.md#object-name) - [Orientation](properties_Text.md#orientation) - [Droite](properties_CoordinatesAndSizing.md#right) - [Titre](properties_Object.md#title) -[Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [Souligné](properties_Text.md#underline) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/fr/FormObjects/viewProArea_overview.md b/website/translated_docs/fr/FormObjects/viewProArea_overview.md index fd422e4362f093..ac568f88fab96f 100644 --- a/website/translated_docs/fr/FormObjects/viewProArea_overview.md +++ b/website/translated_docs/fr/FormObjects/viewProArea_overview.md @@ -1,6 +1,6 @@ --- id: viewProAreaOverview -title: 4D View Pro area +title: Zone 4D View Pro --- 4D View Pro vous permet d'insérer et d'afficher une zone de tableur dans vos formulaires 4D. Une tableur est une application contenant une grille de cellules dans lesquelles vous pouvez saisir des informations, effectuer des calculs ou afficher des images. @@ -9,10 +9,12 @@ title: 4D View Pro area Une fois que vous utilisez les zones 4D View Pro dans vos formulaires, vous pouvez importer et exporter des feuilles de calcul. + ## Utiliser des zones 4D View Pro Les zones 4D View Pro sont documentées dans le manuel [4D View Pro](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-View-Pro-Reference.100-4351323.en.html). + ## Propriétés prises en charge -[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 +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [Css Class](properties_Object.md#css-class) - [Haut](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Méthode](properties_Action.md#method) - [Nom](properties_Object.md#object-name) - [Droite](properties_CoordinatesAndSizing.md#right) - [Afficher barre de formule](properties_Appearance.md#show-formula-bar) - [Type](properties_Object.md#type) - [Interface utilisateur](properties_Appearance.md#user-interface) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) diff --git a/website/translated_docs/fr/FormObjects/webArea_overview.md b/website/translated_docs/fr/FormObjects/webArea_overview.md index b4596192f63ea6..46f76f56d41314 100644 --- a/website/translated_docs/fr/FormObjects/webArea_overview.md +++ b/website/translated_docs/fr/FormObjects/webArea_overview.md @@ -3,47 +3,45 @@ id: webAreaOverview title: Zone Web --- -## Aperçu -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). +Les zones Web (Web Areas) peuvent afficher tout type de contenu Web à l’intérieur de vos formulaires : pages HTML au contenu statique ou dynamique, fichiers, images, JavaScript, etc. Le moteur de rendu de la zone web dépend de la plate-forme d’exécution de l’application et de [l'option de moteur de rendu](properties_WebArea.md#use-embedded-web-rendering-engine) sélectionnée. -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). +Il est possible de créer plusieurs zones web dans un même formulaire. A noter cependant que l'insertion de zones web est soumis à [quelques limitations](#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. Des variables spécifiques permettent d’échanger des informations entre la zone et l’environnement 4D. +Plusieurs [actions standard](#standard-actions), de nombreuses [commandes de langage](https://doc.4d.com/4Dv18/4D/18/Web-Area.201-4504309.en.html) et [événements formulaires](#form-events) génériques et dédiés permettent au développeur de contrôler le fonctionnement des zones web. Des variables spécifiques permettent d’échanger des informations entre la zone et l’environnement 4D. +> (*) L'usage de plugins web et d'applets Java est toutefois déconseillé dans les zones web car ils peuvent déstabiliser une opération menée par 4D, notamment au niveau de la gestion d'événement. -> 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. ## Propriétés spécifiques ### Variables associées -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. +Deux variables spécifiques sont automatiquement associées à chaque zone web : +- [`URL`](properties_WebArea.md#url) -- pour contrôler l’URL affiché par la zone web +- [`Progression`](properties_WebArea.md#progression) -- pour contrôler le pourcentage de chargement de la page affichée dans la zone web. ### Moteur de rendu Web -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. +Vous pouvez choisir entre [deux moteurs de rendus](properties_WebArea.md#use-embedded-web-rendering-engine) pour la zone web, en fonction des spécificités de votre application. -Selecting the embedded web rendering engine allows you to call 4D methods from the web area. +Le moteur de rendu Web vous permet d'appeler des méthodes 4D à partir de la zone web. ### Accéder aux méthodes 4D -When the [Access 4D methods](properties_WebArea.md#access-4d-methods) property is selected, you can call 4D methods from a web area. +Lorsque la propriété [Accès méthodes 4D](properties_WebArea.md#access-4d-methods) est cochée, vous pouvez appeler des méthodes 4D à partir d'une zone web. -> This property is only available if the web area [uses the embedded web rendering engine](#use-embedded-web-rendering-engine). +> This property is only available if the web area [uses the embedded web rendering engine](properties_WebArea.md#use-embedded-web-rendering-engine). ### Objet $4d -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. + +The [4D embedded web rendering engine](properties_WebArea.md#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. Par exemple, pour appeler la méthode 4D `HelloWorld`, vous devez simplement exécuter la déclaration suivante : ```codeJS $4d.HelloWorld(); ``` - > JavaScript est sensible à la casse. Il est donc important de noter que l'objet est nommé $4d (avec un "d" minuscule). La syntaxe des appels aux méthodes 4D est la suivante : @@ -51,7 +49,6 @@ La syntaxe des appels aux méthodes 4D est la suivante : ```codeJS $4d.4DMethodName(param1,paramN,function(result){}) ``` - - `param1...paramN` : Vous pouvez passer autant de paramètres que vous le souhaitez dans la méthode 4D. Ces paramètres peuvent être de n'importe quel type pris en charge par JavaScript (chaîne, numérique, tableau, objet). - `function(result)` : Fonction à passer comme dernier argument. Cette fonction "callback" est appelée de manière sychronisée une fois que la méthode 4D a fini de s'exécuter. Elle reçoit le paramètre `result`. @@ -71,13 +68,13 @@ Code 4D de la méthode `today` : $0:=String(Current date;System date long) ``` -In the web area, the 4D method can be called with the following syntax: +Dans la zone web, la méthode 4D peut être appelée avec la syntaxe suivante : ```js $4d.today() ``` -La méthode 4D ne reçoit aucun paramètre mais elle retourne la valeur $0 à la fonction callback appelée par 4D après avoir exécuté la méthode. We want to display the date in the HTML page that is loaded by the web area. +La méthode 4D ne reçoit aucun paramètre mais elle retourne la valeur $0 à la fonction callback appelée par 4D après avoir exécuté la méthode. Nous souhaitons afficher la date dans la page HTML qui est chargée par la zone web. Voici le code de la page HTML : @@ -114,7 +111,7 @@ Code 4D de la méthode `calcSum` : End for ``` -The JavaScript code run in the web area is: +Le code d'exécution JavaScript dans la zone web est le suivant : ```js $4d.calcSum(33, 45, 75, 102.5, 7, function(dollarZero) @@ -123,90 +120,95 @@ $4d.calcSum(33, 45, 75, 102.5, 7, function(dollarZero) }); ``` + ## Actions standard -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. Ces actions sont décrites dans [Actions standard](https://doc.4d.com/4Dv17R6/4D/17-R6/Standard-actions.300-4354791.en.html). +Quatre actions standard sont disponibles pour gérer automatiquement les zones Web : `Open Back URL`, `Open Forward URL`, `Refresh Current URL` et `Stop Loading URL`. Ces actions peuvent être associées à des boutons ou des commandes de menu et permettre une implémentation rapide d'interfaces Web basiques. Ces actions sont décrites dans [Actions standard](https://doc.4d.com/4Dv17R6/4D/17-R6/Standard-actions.300-4354791.en.html). + ## Evénements formulaire -Specific form events are intended for programmed management of web areas, more particularly concerning the activation of links: +Des événements formulaire spécifiques sont destinés à la gestion programmée des zones web, concernant notamment l'activation des liens : + +- [`On Begin URL Loading`](Events/onBeginUrlLoading.md) +- [`On URL Resource Loading`](Events/onUrlResourceLoading.md) +- [`On End URL Loading`](Events/onEndUrlLoading.md) +- [`On URL Loading Error`](Events/onUrlLoadingError.md) +- [`On URL Filtering`](Events/onUrlFiltering.md) +- [`On Open External Link`](Events/onOpenExternalLink.md) +- [`On Window Opening Denied`](Events/onWindowOpeningDenied.md) -- `On Begin URL Loading` -- `On URL Resource Loading` -- `On End URL Loading` -- `On URL Loading Error` -- `On URL Filtering` -- `On Open External Link` -- `On Window Opening Denied` +En outre, les zones web prennent en charge les événements formulaire génériques suivants : -In addition, web areas support the following generic form events: +- [`On Load`](Events/onLoad.md) +- [`On Unload`](Events/onUnload.md) +- [`On Getting Focus`](Events/onGettingFocus.md) +- [`On Losing Focus`](Events/onLosingFocus.md) -- `On Load` -- `On Unload` -- `On Getting Focus` -- `On Losing Focus` ## Notes d'utilisation des zones Web ### Interface utilisateur -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: +Lors de l’exécution du formulaire, l’utilisateur dispose des fonctions d’interface standard des navigateurs dans la zone web, ce qui lui permet d’interagir avec les autres zones du formulaire : -- **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. L’affichage de ce menu peut également être contrôlé via la commande `WA SET PREFERENCE`. -- **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 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 web area. +- **Commandes Edit menu** : lorsque la zone web a le focus, les commandes du menu **Edit** permettent d’effectuer les actions de copier, coller, tout sélectionner, etc., en fonction de la sélection. +- **Le menu contextuel** : il est possible d'utiliser le [menu contextuel](properties_Entry.md#context-menu) standard du système avec la zone web. L’affichage de ce menu peut également être contrôlé via la commande `WA SET PREFERENCE`. +- **Glisser-déposer** : l’utilisateur peut effectuer des glisser-déposer de textes, d’images ou de documents à l’intérieur d’une zone web ou entre une zone web et les objets des formulaires 4D, en fonction des propriétés des objets 4D. Pour des raisons de sécurité, le changement du contenu d'une zone web via le glisser-déposer d'un fichier ou d'un URL n'est pas autorisé par défaut. Dans ce cas, le curseur affiche une icône d'interdiction ![](assets/en/FormObjects/forbidden.png). La possibilité de déposer des URL ou des fichiers dans la zone web doit être explicitement autorisée à l'aide de la commande `WA SET PREFERENCE`. ### Sous-formulaires -For reasons related to window redrawing mechanisms, the insertion of a web area into a subform is subject to the following constraints: +Pour des raisons liées aux mécanismes de redessinement des fenêtres, l'insertion d'une zone web dans un sous-formulaire est soumise aux contraintes suivantes : - Le sous-formulaire ne doit pas pouvoir défiler, -- The limits of the web area must not exceed the size of the subform +- Les limites de la zone web ne doivent pas dépasser de la zone du sous-formulaire -> Superimposing a web area on top of or beneath other form objects is not supported. - -### Conflit Zone Web et serveur Web (Windows) +> La superposition d'une zone web au dessus ou en-dessous d'autres objets formulaires n'est pas prise en charge. -In 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. -### Plugins Web et applets Java +### Conflit Zone Web et serveur Web (Windows) -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. +Sous Windows, il est déconseillé d’accéder via une zone web au serveur Web de l’application 4D contenant la zone car cette configuration peut provoquer un conflit paralysant l’application. Bien entendu, un 4D distant peut accéder au serveur Web du 4D Server, mais pas à son propre serveur web. ### Insertion du protocole (macOS) +Les URLs manipulés par programmation dans les zones web sous macOS doivent débuter par le protocole. Par exemple, vous devez passer la chaîne "http://www.monsite.fr" et non uniquement "www.monsite.fr". -The URLs handled by programming in web areas in macOS must begin with the protocol. Par exemple, vous devez passer la chaîne "http://www.monsite.fr" et non uniquement "www.monsite.fr". -## Access to web inspector +## Accès à l’inspecteur web -You can view and use a web inspector within web areas in your forms or in offscreen web areas. The web inspector is a debugger which is provided by the embedded Web engine. It allows parsing the code and the flow of information of the web pages. +Vous pouvez visualiser et utiliser un inspecteur web dans les zones web de vos formulaires ou dans les zones web hors écran. L’inspecteur web est un débogueur, proposé par le moteur de rendu Web intégré. Il permet d’analyser le code et les flux d’information des pages web. -### Displaying the web inspector +### Afficher l’inspecteur web -To display the web inspector, you can either execute the `WA OPEN WEB INSPECTOR` command, or use the context menu of the web area. +Pour afficher l'inspecteur web, vous pouvez soit exécuter la commande `WA OPEN WEB INSPECTOR`, soit utiliser le menu contextuel de la zone web. -- **Execute the `WA OPEN WEB INSPECTOR` command** - This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). +- **Execute the `WA OPEN WEB INSPECTOR` command**
        This command can be used directly with onscreen (form object) and offscreen web areas. Dans le cas d'une zone web hors écran, [le moteur de rendu web intégré doit être sélectionné](properties_WebArea.md#use-embedded-web-rendering-engine) pour la zone (l’inspecteur web n’est disponible que dans cette configuration). -- **Use the web area context menu** - This feature can only be used with onscreen web areas and requires that the following conditions are met: - - - the embedded web rendering engine is selected for the area - - the [context menu](properties_Entry.md#context-menu) for the web area is enabled - - the use of the inspector is expressly enabled in the area by means of the following statement: +- **Use the web area context menu**
        This feature can only be used with onscreen web areas and requires that the following conditions are met: + - le moteur de rendu web intégré est sélectionné pour la zone + - le [menu contextuel](properties_Entry.md#context-menu) de la zone Web est activé + - l'utilisation de l'inspecteur est expressément autorisée dans la zone via la déclaration suivante : ```4d WA SET PREFERENCE(*;"WA";WA enable Web inspector;True) ``` -For more information, refer to the description of the `WA SET PREFERENCE` command. +Pour plus d'informations, reportez-vous à la description de la commande `WA SET PREFERENCE`. + +### Utilisation de l’Inspecteur web + +Lorsque les paramétrages décrits ci-dessus sont effectués, vous disposez de nouvelles options telles que **Inspect Element** dans le menu contextuel de la zone. Lorsque vous sélectionnez cette option, le débogueur de la zone web est alors affiché. + +> L’inspecteur web est inclus dans le moteur de rendu web intégré. Pour une description détaillée des fonctionnalités de ce débogueur, veuillez vous reporter à la documentation du moteur de rendu web utilisé. -### Using the web inspector -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. ## Propriétés prises en charge -[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 +[Style de la bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Menu contextuel](properties_Entry.md#context-menu) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Dim. horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Méthode](properties_Action.md#method) - [Nom](properties_Object.md#object-name) - [Progression](properties_WebArea.md#progression) - [Droite](properties_CoordinatesAndSizing.md#right) - [Haut](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - URL<13> - [Utiliser le moteur de rendu Web intégré](properties_WebArea.md#use-embedded-web-rendering-engine) - [Variable ou expression](properties_Object.md#variable-or-expression) - [Dim. vertical](properties_ResizingOptions.md#vertical-sizing) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width)

        + + + + + diff --git a/website/translated_docs/fr/FormObjects/writeProArea_overview.md b/website/translated_docs/fr/FormObjects/writeProArea_overview.md index 2ed58894a10a59..915679b4f1fa20 100644 --- a/website/translated_docs/fr/FormObjects/writeProArea_overview.md +++ b/website/translated_docs/fr/FormObjects/writeProArea_overview.md @@ -1,16 +1,19 @@ --- id: writeProAreaOverview -title: 4D Write Pro area +title: Zone 4D Write Pro --- -4D Wite Pro propose aux utilisateurs de 4D un outil de traitement de texte avancé, intégré à votre base 4D. En utilisant 4D Write Pro, vous pouvez rédiger des e-mails et/ou des lettres pré-configurés contenant des images, une signature, du texte formaté et des placeholders pour des variables dynamiques. Vous pouvez également générer dynamiquement des factures ou des rapports, contenant du texte et des images formatés. +4D Write Pro offers 4D users an advanced word-processing tool, fully integrated with your 4D application. En utilisant 4D Write Pro, vous pouvez rédiger des e-mails et/ou des lettres pré-configurés contenant des images, une signature, du texte formaté et des placeholders pour des variables dynamiques. Vous pouvez également générer dynamiquement des factures ou des rapports, contenant du texte et des images formatés. + ![](assets/en/FormObjects/writePro2.png) + ## Utiliser des zones 4D Write Pro Les zones 4D Write Pro sont documentées dans le manuel [4D Write Pro](https://doc.4d.com/4Dv17R6/4D/17-R6/4D-Write-Pro.100-4433851.fe.html). ## Propriétés prises en charge -[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 +[Correction orthographique](properties_Entry.md#auto-spellcheck) - [Ligne de bordure](properties_BackgroundAndBorder.md#border-line-style) - [Bas](properties_CoordinatesAndSizing.md#bottom) - [CSS Class](properties_Object.md#css-class) - [Menu contextuel](properties_Entry.md#context-menu) - [Glissable](properties_Action.md#draggable) - [Déposable](properties_Action.md#droppable) - [Saisissable](properties_Entry.md#enterable) - [Focusable](properties_Entry.md#focusable) - [Hauteur](properties_CoordinatesAndSizing.md#height) - [Cacher rectangle de focus](properties_Appearance.md#hide-focus-rectangle) - [Barre de défilement horizontal](properties_Appearance.md#horizontal-scroll-bar) - [Dimensionnement horizontal](properties_ResizingOptions.md#horizontal-sizing) - [Configuration du clavier](properties_Entry.md#keyboard-layout) - [Gauche](properties_CoordinatesAndSizing.md#left) - [Méthode](properties_Action.md#method) - [Nom](properties_Object.md#object-name) - [Impression taille variable](properties_Print.md#print-frame) - [Résolution](properties_Appearance.md#resolution) - [Droite](properties_CoordinatesAndSizing.md#right) - [Sélection toujours visible](properties_Entry.md#selection-always-visible) - [Montrer le fond](properties_Appearance.md#show-background) - [Montrer les pieds de page](properties_Appearance.md#show-footers) - [Montrer les entêtes](properties_Appearance.md#show-headers) - [Montrer les caractères cachés](properties_Appearance.md#show-hidden-characters) - [Montrer la règle horizontale](properties_Appearance.md#show-horizontal-ruler) - [Montrer HTML WYSIWYG](properties_Appearance.md#show-html-wysiwyg) - [Montrer le cadre de la page](properties_Appearance.md#show-page-frame) - [Montrer les références](properties_Appearance.md#show-references) - [Montrer la règle verticale](properties_Appearance.md#show-vertical-ruler) - [Type](properties_Object.md#type) - [Dimensionnement vertical](properties_ResizingOptions.md#vertical-sizing) - [Barre de défilement vertical](properties_Appearance.md#vertical-scroll-bar) - [Mode d'affichage](properties_Appearance.md#view-mode) - [Visibilité](properties_Display.md#visibility) - [Largeur](properties_CoordinatesAndSizing.md#width) - [Zoom](properties_Appearance.md#zoom) + diff --git a/website/translated_docs/fr/GettingStarted/Installation.md b/website/translated_docs/fr/GettingStarted/Installation.md new file mode 100644 index 00000000000000..e29f8c092f4200 --- /dev/null +++ b/website/translated_docs/fr/GettingStarted/Installation.md @@ -0,0 +1,48 @@ +--- +id: installation +title: Installation +--- + +Bienvenue à 4D ! Cette page regroupe toutes les informations nécessaires sur l'installation et le lancement de votre produit 4D. + + +## Configuration requise + +La page [Téléchargements](https://us.4d.com/product-download) dut site de 4D fournit des informations sur les pré-requis macOS / Windows nécessaires à la gamme 4D. + +Des détails techniques supplémentaires sont disponibles sur la [page Ressources](https://us.4d.com/resources/feature-release) du site web de 4D. + + +## Installation sur disque + +Les produits 4D sont installés à partir du site web de 4D : + +1. Connectez-vous au site internet de 4D puis consultez la page [Téléchargements](https://us.4d.com/product-download). + +2. Cliquez sur le lien de téléchargement du produit 4D de votre choix, puis suivez les instructions qui s'affichent à l'écran. + + +## Connexion + +Une fois l'installation terminée, vous pouvez lancer 4D et vous connecter. Pour ce faire, double-cliquez sur l'icône du produit 4D. + +![](assets/en/getStart/logo4d.png) + +Apparaît ensuite l'assistant de bienvenue : + +![](assets/en/getStart/welcome2.png) + +- Si vous souhaitez découvrir et explorer 4D, cliquez sur le lien **essai gratuit**. Il vous sera demandé de vous connecter ou de créer un compte 4D. + +- Si vous possédez déjà un compte 4D, cliquez sur le lien **Se connecter** sur le côté supérieur droit de l'assistant d'installation et saisissez les informations relatives à votre compte. Toute licence 4D préalablement enregistrée est automatiquement mise à jour (ou les packs d'extension supplémentaires sont chargés) sur votre machine. + +Élargissez la zone **Ouvrir ou créer un projet d'application** et sélectionnez l'action que vous souhaitez exécuter : + +- **Connectez-vous au 4D Server** - utilisez 4D en tant que client et connectez--vous à une application déjà chargée par 4D Server. + +- **Ouvrez un projet d'application local** - chargez un projet d'application existant stocké sur votre disque. + +- **Créez un nouveau projet d'application** - créez un nouveau projet d'application vide sur votre disque. + +Nous vous souhaitons une excellente expérience 4D ! + diff --git a/website/translated_docs/fr/MSC/analysis.md b/website/translated_docs/fr/MSC/analysis.md index fc5698fe2354a3..e77fe19dcc4f98 100644 --- a/website/translated_docs/fr/MSC/analysis.md +++ b/website/translated_docs/fr/MSC/analysis.md @@ -4,8 +4,7 @@ title: Page Analyse d'activités sidebar_label: Page Analyse d'activités --- -La page Analyse d'activités du CSM permet de visualiser le contenu du fichier d’historique courant. Cette fonction est utile pour analyser l’utilisation d’une base de données ou détecter la ou les opération(s) à l’origine d’erreurs ou de dysfonctionnements. Dans le cadre d’une base de données exploitée en client-serveur, elle permet de vérifier les opérations effectuées par chaque poste client. - +La page Analyse d'activités du CSM permet de visualiser le contenu du fichier d’historique courant. This function is useful for parsing the use of an application or detecting the operation(s) that caused errors or malfunctions. In the case of an application in client-server mode, it allows verifying operations performed by each client machine. > Il est également possible de revenir en arrière parmi les opérations effectuées sur les données de la base. Pour plus d’informations sur ce point, reportez-vous à la section [Page Retour](rollback.md) arrière. ![](assets/fr/MSC/MSC_analysis.png) @@ -16,7 +15,6 @@ Les informations affichées permettent d’identifier la source et le contexte d - **Opération** : numéro de séquence de l’opération dans le fichier d’historique. - **Action** : type d’opération effectuée. Cette colonne peut contenir les opérations suivantes : - - Ouverture du fichier de données : ouverture d’un fichier de données. - Fermeture du fichier de données : fermeture du fichier de données ouvert. - Création d’un contexte : création d’un process définissant un contexte d’exécution. @@ -28,17 +26,18 @@ Les informations affichées permettent d’identifier la source et le contexte d - Début de transaction : transaction démarrée. - Validation de transaction : transaction validée. - Annulation de transaction : transaction annulée. - - Update context: Change in extra data (e.g. a call to `CHANGE CURRENT USER` or `SET USER ALIAS`). -- **Table** : table à laquelle appartient l’enregistrement ajouté/supprimé/modifié ou le BLOB. + - Contexte de mise à jour : modification des données supplémentaires (ex : un appel à `CHANGE CURRENT USER` ou `SET USER ALIAS`). +- **Table** : table à laquelle appartient l’enregistrement ajouté/supprimé/modifié ou le BLOB. - **Clé primaire/BLOB** : contenu de la clé primaire de l'enregistrement (lorsque la clé primaire est composée de plusieurs champs, les valeurs sont séparées par des points-virgules), ou numéro de séquence du BLOB impliqué dans l’opération. - **Process** : numéro interne du process dans lequel l’opération a été effectuée. Ce numéro interne correspond au contexte de l’opération. Taille : taille en octets des données traitées par l’opération. - **Taille** : taille (en octets) des données traitées par l’opération. - **Date et Heure** : date et heure à laquelle l’opération a été effectuée. -- **Utilisateur système** : nom du système de l’utilisateur ayant effectué l’opération. En version client-serveur, il s’agit du nom de la machine du poste client. En version monoposte, le nom de session de l’utilisateur s'affiche. -- **Utilisateur 4D** : nom de l’utilisateur 4D ayant effectué l’opération. Si un alias est défini pour l'utilisateur, l'alias s'affiche à la place du nom d'utilisateur 4D. +- **4D User**: 4D user name of the user that performed the operation. Si un alias est défini pour l'utilisateur, l'alias s'affiche à la place du nom d'utilisateur 4D. +- **System User**: System name of the user that performed the operation. Si un alias est défini pour l'utilisateur, l'alias s'affiche à la place du nom d'utilisateur 4D. - **Valeurs** : valeurs des champs de l’enregistrement en cas d’ajout ou de modification. Les valeurs sont séparées par des “;â€. Seules les valeurs représentables sous forme alphanumérique sont affichées. - ***Note** : Si la base est chiffrée et si aucune clé de données valide correspondant au fichier d'historique n'a été fournie, les valeurs chiffrées ne sont pas affichées dans cette colonne.* + ***Note** : Si la base est chiffrée et si aucune clé de données valide correspondant au fichier d'historique n'a été fournie, les valeurs chiffrées ne sont pas affichées dans cette colonne.* - **Enregistrements** : Numéro de l’enregistrement. -Cliquez sur le bouton **Analyser** pour mettre à jour le contenu du fichier d’historique courant de la base sélectionnée (nommé par défaut nomdonnées.journal). Le bouton **Parcourir...** vous permet de sélectionner et d’ouvrir un autre fichier d’historique de la base. Le bouton **Exporter...** vous permet d’exporter le contenu du fichier sous forme de texte. \ No newline at end of file +Click on **Analyze** to update the contents of the current log file of the selected application (named by default dataname.journal). The Browse button can be used to select and open another log file for the application. Le bouton **Exporter...** vous permet d’exporter le contenu du fichier sous forme de texte. + diff --git a/website/translated_docs/fr/MSC/backup.md b/website/translated_docs/fr/MSC/backup.md index cb03357bb0d23c..518320e01f6c9b 100644 --- a/website/translated_docs/fr/MSC/backup.md +++ b/website/translated_docs/fr/MSC/backup.md @@ -10,8 +10,8 @@ La page Sauvegarde du CSM permet de visualiser les paramètres de sauvegarde de Cette page est constituée des zones suivantes : -- **Emplacement du fichier de sauvegarde** : affiche les informations relatives à l’emplacement du fichier de sauvegarde de la base. Elle indique également l’espace occupé et l’espace disponible sur le volume de sauvegarde. -- **Informations sur la dernière sauvegarde** : fournit la date et l’heure de la dernière sauvegarde (automatique ou manuelle) réalisée sur la base. +- **Emplacement du fichier de sauvegarde** : affiche les informations relatives à l’emplacement du fichier de sauvegarde de l'application. Elle indique également l’espace occupé et l’espace disponible sur le volume de sauvegarde. +- **Informations sur la dernière sauvegarde** : fournit la date et l’heure de la dernière sauvegarde (automatique ou manuelle) réalisée sur l'application. - **Contenu du fichier de sauvegarde** : liste les fichiers et dossiers inclus dans le fichier de sauvegarde. Le bouton **Sauvegarde** permet de lancer une sauvegarde manuelle. diff --git a/website/translated_docs/fr/MSC/compact.md b/website/translated_docs/fr/MSC/compact.md index 8128fca4514260..a702160cd1567a 100644 --- a/website/translated_docs/fr/MSC/compact.md +++ b/website/translated_docs/fr/MSC/compact.md @@ -13,34 +13,32 @@ Le compactage d'un fichier répond à deux types de besoins : - **Réduction de taille et optimisation des fichiers** : les fichiers peuvent comporter des emplacements inutilisés (des “trousâ€). En effet, lorsque vous supprimez des enregistrements, des formulaires, etc., l’emplacement qu’ils occupaient précédemment dans le fichier devient vacant. 4D réutilise ces emplacements vides lorsque c’est possible, mais la taille des données étant variable, les suppressions ou modifications successives génèrent inévitablement des espaces inutilisables pour le programme. Il en va de même lorsqu’une grande quantité de données vient d’être supprimée : les emplacements vides restent inaffectés dans le fichier. Le rapport entre la taille du fichier de données et l’espace réellement utilisé pour les données est le taux d’occupation des données. Un taux trop faible peut entraîner, outre un gaspillage de place, une dégradation des performances de la base. La fonction de compactage permet de réorganiser et d’optimiser le stockage des données afin de faire disparaître les “trousâ€. Les zones “Informations†résument les données relatives à la fragmentation des fichiers et suggèrent les opérations à effectuer. Les onglets de la page [Informations](information.md#data) du CSM indiquent la fragmentation courante des fichiers de la base. - **Réenregistrement intégral des données** en appliquant le formatage courant défini dans le fichier de structure. Ce principe est utile lorsque les données d'une même table ont été stockées dans différents formats, par exemple après un changement dans la structure de la base. - -> Le compactage n’est disponible qu’en mode maintenance. Si vous tentez d’effectuer cette opération en mode standard, une boîte de dialogue d’alerte vous prévient que la base va être fermée puis relancée en mode maintenance. Il est possible de compacter un fichier de données non ouvert par la base de données (cf. paragraphe [Compacter les enregistrements et les index](#compact-records-and-indexes) ci-dessous). +> Le compactage n’est disponible qu’en mode maintenance. Si vous tentez d’effectuer cette opération en mode standard, une boîte de dialogue d’alerte vous prévient que l'application va être fermée puis relancée en mode maintenance. Il est possible de compacter un fichier de données non ouvert par l'application (cf. paragraphe [Compacter les enregistrements et les index](#compact-records-and-indexes) ci-dessous). ## Le compactage standard Pour démarrer directement le compactage du fichier de données ou de structure, cliquez sur le bouton correspondant dans la fenêtre du CSM. ![](assets/en/MSC/MSC_compact.png) - > Le compactage entraînant la duplication du fichier d’origine, le bouton est désactivé si la place sur le disque contenant le fichier est insuffisante. Cette opération défragmente le fichier principal ainsi que les éventuels fichiers d’index. 4D effectue une copie des fichiers d’origine et les place dans un dossier nommé **Replaced Files (Compacting)**, créé à côté du fichier d’origine. Si vous effectuez plusieurs compactages, un nouveau dossier est créé à chaque fois. Il est nommé “Replaced Files (Compacting)_1â€, “Replaced Files (Compacting)_2â€, etc. Vous pouvez modifier le dossier dans lequel les fichiers d’origine sont sauvegardés via le mode avancé. -A l’issue de l’opération, les fichiers défragmentés remplacent automatiquement les fichiers d’origine. La base de données est immédiatement opérationnelle sans aucune autre manipulation. - +A l’issue de l’opération, les fichiers défragmentés remplacent automatiquement les fichiers d’origine. L'application est immédiatement opérationnelle sans aucune autre manipulation. > Lorsque la base est chiffrée, le compactage comprend le chiffrement et le déchiffrement et requiert ainsi la clé de chiffrement des données courante. Si aucune clé de chiffrement valide n'a encore été fournie, une boîte de dialogue s'affiche pour vous demander de saisir la phrase secrète ou la clé des données. **Attention :** Chaque compactage entraîne la duplication du fichier d’origine et donc l’augmentation de la taille du dossier de l’application. Il est important de tenir compte de ce mécanisme (notamment sous macOS où les applications 4D apparaissent sous forme de packages) pour que l’application ne grossisse pas de façon excessive. Une intervention manuelle à l’intérieur du package peut être utile afin de supprimer les copies des fichiers d’origine. ## Voir le compte rendu -Une fois le compactage terminé, 4D génère un fichier de compte-rendu dans le dossier Logs de la base. Ce fichier liste l’ensemble des opérations qui ont été menées. Il est créé au format xml et est nommé *DatabaseName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" où : +Une fois le compactage terminé, 4D génère un fichier de compte-rendu dans le dossier Logs du projet. Ce fichier liste l’ensemble des opérations qui ont été menées. Il est créé au format xml et est nommé *ApplicationName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" où : -- ** est le nom du fichier de structure sans extension, par exemple "Factures", -- ** est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". +- *ApplicationName* est le nom du fichier de structure sans extension, par exemple "Factures", +- *aaaa-mm-jj hh-mm-ss* est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". Lorsque vous cliquez sur le bouton **Voir le compte rendu**, 4D affiche le fichier de compte-rendu le plus récent dans le navigateur par défaut de l’ordinateur. + ## Mode avancé La page Compactage comporte un bouton **Avancé**, permettant d’accéder à une page d’options pour le compactage des fichiers de données et de structure. @@ -60,17 +58,14 @@ Lorsque cette option est cochée, 4D réécrit chaque enregistrement de chaque t - Lorsqu’une option de stockage externe des données de type Texte, Image ou BLOB a été modifiée après que des données aient été saisies. Ce cas peut notamment se produire après conversion d’une base en version 4D antérieure à la v13. Comme pour le cas du retypage ci-dessus, 4D ne modifie pas rétroactivement les données déjà saisies. Pour cela, vous pouvez forcer la mise à jour des enregistrements afin d’appliquer le nouveau mode de stockage aux enregistrements déjà saisis. - Lorsque des champs ou des tables ont été supprimé(e)s. Dans ce cas, le compactage avec mise à jour des enregistrements permet de récupérer la place de ces données supprimées et donc de réduire la taille du fichier. - > La sélection de cette option entraîne la mise à jour de tous les index. ### Compacter la table d’adresses - (option accessible uniquement lorsque la précédente est cochée) Cette option provoque la reconstruction complète de la table d’adresses des enregistrements au moment du compactage. Cette opération permet d’optimiser la taille de la table d’adresses. Elle est principalement utile dans les bases de données où de très nombreux enregistrements ont été créés puis supprimés. Dans les autres cas, l’optimisation ne sera pas déterminante. A noter que cette option ralentit le compactage de façon conséquente et qu’elle rend invalides les ensembles sauvegardés via la commande `SAVE SET`. Il est d’ailleurs fortement recommandé dans ce cas de supprimer les ensembles sauvegardés car leur utilisation peut conduire à des sélections de données erronées. - > - Le compactage tient compte des enregistrements des tables placées dans la corbeille. La présence d’un grand nombre d’enregistrements dans la corbeille peut constituer un facteur de ralentissement supplémentaire pour l’opération. -> - L'utilisation de cette option rend la table d'adresses, et donc la base de données, incompatibles avec le fichier d'historique courant (s'il en existe un). Il sera automatiquement sauvegardé et un nouveau fichier d'historique devra être créé au prochain lancement de la base. -> - Vous pouvez déterminer si la table d'adresses a besoin d'être compactée en comparant sa taille avec le nombre total d'enregistrements dans la Page [Informations](information.md) du CSM. \ No newline at end of file +> - L'utilisation de cette option rend la table d'adresses, et donc la base de données, incompatibles avec le fichier d'historique courant (s'il en existe un). Il sera automatiquement sauvegardé et un nouveau fichier d'historique devra être créé au prochain lancement de l'application. +> - Vous pouvez déterminer si la table d'adresses a besoin d'être compactée en comparant sa taille avec le nombre total d'enregistrements dans la Page [Informations](information.md) du CSM. diff --git a/website/translated_docs/fr/MSC/encrypt.md b/website/translated_docs/fr/MSC/encrypt.md index 47bfa5eb5c5bab..cfe8ba1343375c 100644 --- a/website/translated_docs/fr/MSC/encrypt.md +++ b/website/translated_docs/fr/MSC/encrypt.md @@ -4,53 +4,48 @@ title: Page chiffrement sidebar_label: Page chiffrement --- -Vous pouvez vous aider de cette page pour chiffrer et déchiffrer (i.e. enlever le chiffrement) le fichier de données, en fonction du statut de l'attribut **Chiffrable** défini pour chaque table de la base. Pour des informations plus détaillées sur le chiffrement des données dans 4D, veuillez consulter la section "Chiffrer les données". +Vous pouvez vous aider de cette page pour chiffrer ou *déchiffrer* (i.e. enlever le chiffrement) le fichier de données, en fonction du statut de l'attribut **Chiffrable** défini pour chaque table de la base. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section in the *Design Reference* manual. Un nouveau dossier est créé à chaque opération de chiffrement/déchiffrement. Il est nommé "Replaced Files (Encrypting) *yyyy-mm-dd hh-mm-ss*" ou "Replaced Files (Decrypting) *yyyy-mm-dd hh-mm-ss*". - -> Le chiffrement est disponible uniquement en [mode maintenance](overview.md#display-in-maintenance-mode). Si vous tentez d'exécuter cette opération en mode standard, une fenêtre d'avertissement vous informera que la base sera fermée et redémarrée en mode maintenance. +> Le chiffrement est disponible uniquement en [mode maintenance](overview.md#display-in-maintenance-mode). Si vous tentez d’effectuer cette opération en mode standard, une boîte de dialogue d’alerte vous prévient que l'application va être fermée puis relancée en mode maintenance **Attention :** - -- Le chiffrement d'une base est une opération de longue durée. Un indicateur de progression de l'opération s'affiche (et peut être interrompu par l'utilisateur). À noter également que le chiffrement d'une base comprend toujours une étape de compactage. +- Le chiffrement d'un fichier de données est une opération de longue durée. Un indicateur de progression de l'opération s'affiche (et peut être interrompu par l'utilisateur). À noter également que le chiffrement d'une application comprend toujours une étape de compactage. - Chaque opération de chiffrement génère une copie du fichier de données, ce qui augmente la taille du dossier de l'application. Il est important de prendre cela en considération (notamment sous macOS, où les applications 4D apparaissent sous forme de paquet) afin de ne pas augmenter excessivement la taille de l'application. Le déplacement ou la suppression manuels des copies du fichier original dans le paquet peut aider à réduire la taille du paquet. ## Chiffrer des données pour la première fois - Trois étapes sont nécessaires pour effectuer le tout premier chiffrement de vos données à l'aide du CSM : -1. Dans l'éditeur de structure, cochez l'attribut **Chiffrable** pour chaque table dont vous souhaitez chiffrer les données. Consultez la section "Propriétés des tables". -2. Ouvrez la page Chiffrement du CSM. Si vous ouvrez la page sans paramétrer les tables comme étant **Chiffrables**, le message suivant s'affiche : ![](assets/en/MSC/MSC_encrypt1.png) Sinon, le message suivant s'affiche : ![](assets/en/MSC/MSC_encrypt2.png) Cela signifie que le statut **Chiffrable** défini pour au moins une table a été modifié et que le fichier de données n'a toujours pas été chiffré. **Note** : Le même message s'affiche lorsque le statut **Chiffrable** a été modifié dans un fichier de données déjà chiffré ou après le déchiffrement d'un fichier de données (voir ci-dessous). +1. Dans l'éditeur de structure, cochez l'attribut **Chiffrable** pour chaque table dont vous souhaitez chiffrer les données. Consultez la section "Propriétés des tables". +2. Ouvrez la page Chiffrement du CSM. 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 : **Le même message s'affiche lorsque le statut **Chiffrable** a été modifié dans un fichier de données déjà chiffré ou après le déchiffrement d'un fichier de données (voir ci-dessous). 3. Cliquez sur le bouton de Chiffrement. - ![](assets/en/MSC/MSC_encrypt3.png) - Vous serez ensuite invité à saisir une phrase secrète pour votre fichier de données : ![](assets/fr/MSC/MSC_encrypt4.png) La phrase secrète est utilisée pour générer la clé de chiffrement des données. Une phrase secrète est une version plus sécurisée d'un mot de passe et peut contenir un grand nombre de caractères. Par exemple, vous pouvez saisir une phrase secrète telle que "Nous sommes allés à Montreux" ou "Ma toute 1ère et brillante phrase secrète !!" L'indicateur du niveau de sécurité peut vous aider à évaluer la sûreté de votre phrase secrète : ![](assets/en/MSC/MSC_encrypt5.png) (la couleur vert foncé correspond au niveau de sécurité le plus élevé) -4. Tapez sur Entrée pour confirmer votre phrase secrète sécurisée. + ![](assets/en/MSC/MSC_encrypt3.png) + Vous serez ensuite invité à saisir une phrase secrète pour votre fichier de données : ![](assets/fr/MSC/MSC_encrypt4.png) La phrase secrète est utilisée pour générer la clé de chiffrement des données. Une phrase secrète est une version plus sécurisée d'un mot de passe et peut contenir un grand nombre de caractères. 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. Tapez sur Entrée pour confirmer votre phrase secrète sécurisée. -Le processus de chiffrement est alors lancé. Si le CSM est ouvert en mode standard, la base de données est rouverte en mode maintenance. +Le processus de chiffrement est alors lancé. If the MSC was opened in standard mode, the application is reopened in maintenance mode. 4D propose de sauvegarder la clé de chiffrement (voir le paragraphe [Sauvegarder la clé de chiffrement](#saving-the-encryption-key) ci-dessous). Vous pouvez la sauvegarder à ce moment précis ou bien ultérieurement. Vous pouvez également ouvrir le fichier d'historique du chiffrement. Si le processus de chiffrement est réussi, la page Chiffrement affiche les boutons Opérations de maintenance liées au chiffrement. -**Attention :** Durant l'opération de chiffrement, 4D créé un nouveau fichier de données vide et y insère des données à partir du fichier de données original. Les enregistrements correspondant aux tables "chiffrées" sont chiffrés puis copiés ; les autres enregistrements sont uniquement copiés (une opération de compactage est également exécutée). Si l'opération est réussie, le fichier de données original est déplacé vers un dossier "Replaced Files (Encrypting)". Si vous souhaitez transmettre un fichier de données chiffré, assurez-vous d'avoir préalablement déplacé/retiré tout fichier de données non chiffrées du dossier de la base de données. +**Attention :** Durant l'opération de chiffrement, 4D créé un nouveau fichier de données vide et y insère des données à partir du fichier de données original. Les enregistrements correspondant aux tables "chiffrées" sont chiffrés puis copiés ; les autres enregistrements sont uniquement copiés (une opération de compactage est également exécutée). Si l'opération est réussie, le fichier de données original est déplacé vers un dossier "Replaced Files (Encrypting)". If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the application folder beforehand. ## Opérations de maintenance liées au chiffrement +When an application is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](assets/fr/MSC/MSC_encrypt6.png) -Lorsqu'une base est chiffrée (voir ci-dessus), la page Chiffrement propose plusieurs opérations de maintenance liées au chiffrement, qui correspondent à des scénarios standard. ![](assets/fr/MSC/MSC_encrypt6.png) ### Fournir la clé de chiffrement des données actuelle - Pour des raisons de sécurité, toutes les opérations de maintenance liées au chiffrement nécessitent la clé de chiffrement des données actuelle. - Si la clé de chiffrement des données est déjà chargée dans le trousseau 4D(1), elle est automatiquement réutilisée par 4D. - Si la clé de chiffrement des données n'est pas identifiée, vous devez la fournir. La boîte de dialogue suivante s'affiche : ![](assets/fr/MSC/MSC_encrypt7.png) À ce stade, deux options s'offrent à vous : - - entrer la phrase secrète actuelle(2) et cliquer sur **OK**. OU -- connecter un appareil tel qu'une clé USB et cliquer sur le bouton **Scanner les disques**. +- connecter un appareil tel qu'une clé USB et cliquer sur le bouton **Scanner les disques**. -(1) Le trousseau de 4D stocke toutes les clés de chiffrement de données valides saisies durant la session d'application session. +(1) Le trousseau de 4D stocke toutes les clés de chiffrement de données valides saisies durant la session d'application session. (2) Le mot de passe actuel correspond au mot de passe utilisé pour générer la clé de chiffrement actuelle. Dans tous les cas, si des informations valides sont fournies, 4D redémarre en mode maintenance (si ce n'est pas déjà le cas) et exécute l'opération. @@ -65,7 +60,6 @@ Cette opération est utile lorsque l'attribut **Chiffrable** a été modifié po Le fichier de données est correctement re-chiffré à l'aide de la clé actuelle et un message de confirmation s'affiche : ![](assets/fr/MSC/MSC_encrypt8.png) ### Changer votre phrase secrète et re-chiffrer les données - Cette opération est utile en cas de modification de la clé de chiffrement des données actuelle. Par exemple, il se peut que vous la modifiiez pour vous conformer aux règles de sécurité (telles que la nécessité de modifier la phrase secrète tous les trois mois). 1. Cliquez sur **Changer votre phrase secrète et re-chiffrer les données**. @@ -73,31 +67,28 @@ Cette opération est utile en cas de modification de la clé de chiffrement des 3. Saisissez la nouvelle phrase secrète (pour plus de sécurité, il vous est demandé de la saisir deux fois) : ![](assets/en/MSC/MSC_encrypt9.png) Le fichier de données est entièrement déchiffré et un message de confirmation s'affiche : ![](assets/fr/MSC/MSC_encrypt8.png) ### Enlever le chiffrement de toutes les données - Cette opération supprime tout le chiffrement du fichier de données. Si vous ne souhaitez plus que vos données soient chiffrées : 1. Cliquez sur **Enlever le chiffrement de toutes les données**. 2. Saisissez la clé de chiffrement de données actuelle (voir Fournir la clé de chiffrement des données actuelle). Le fichier de données est entièrement déchiffré et un message de confirmation s'affiche : ![](assets/en/MSC/MSC_encrypt10.png) - > Une fois que le fichier de données est déchiffré, le statut de chiffrement des tables ne correspond plus à leur attribut Chiffrable. Pour restituer un statut de mise en correspondance, vous devez décocher tous les attributs **Chiffrable** au niveau de la structure de la base. ## Sauvegarder la clé de chiffrement -4D vous permet de sauvegarder la clé de chiffrement des données dans un fichier créé à cet effet. La sauvegarde de ce fichier sur un appareil externe tel qu'une clé USB facilitera l'utilisation d'une base chiffrée, étant donné que l'utilisateur connecterait cet appareil uniquement pour fournir la clé avant d'ouvrir la base et accéder aux données chiffrées. +4D vous permet de sauvegarder la clé de chiffrement des données dans un fichier créé à cet effet. Storing this file on an external device such a USB key will facilitate the use of an encrypted application, since the user would only need to connect the device to provide the key before opening the application in order to access encrypted data. Vous pouvez sauvegarder la clé de chiffrement chaque fois qu'une nouvelle phrase secrète est fournie : -- lorsque la base est chiffrée pour la première fois, -- lorsque la base est re-chiffrée avec une nouvelle phrase secrète. +- when the application is encrypted for the first time, +- when the application is re-encrypted with a new passphrase. Les clés de chiffrement successives peuvent être sauvegardées sur le même appareil. ## Fichier d'historique - -Une fois qu'une opération de chiffrement est terminée, 4D génère un fichier dans le dossier Logs de la base. Il est créé au format XML et nommé "*DatabaseName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" ou "*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 application. It is created in XML format and named "*ApplicationName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*ApplicationName_Decrypt_Log_yyyy-mm-dd hh-mm-ss.xml*". Chaque fois qu'un nouveau fichier d'historique est généré, un bouton Voir le compte rendu s'affiche dans la page CSM. -Le fichier d'historique liste toutes les opérations internes liées au processus de chiffrement/déchiffrement qui ont été exécutées, ainsi que les erreurs (le cas échéant). \ No newline at end of file +Le fichier d'historique liste toutes les opérations internes liées au processus de chiffrement/déchiffrement qui ont été exécutées, ainsi que les erreurs (le cas échéant). diff --git a/website/translated_docs/fr/MSC/information.md b/website/translated_docs/fr/MSC/information.md index 92acbe5f2805e9..0913e92c790b4d 100644 --- a/website/translated_docs/fr/MSC/information.md +++ b/website/translated_docs/fr/MSC/information.md @@ -8,21 +8,20 @@ La page “Informations†fournit diverses informations relatives à l’enviro ## Programme -Cette page affiche le nom, la version et l’emplacement de l’application ainsi que du dossier 4D actif (pour plus d’informations sur le dossier 4D actif, reportez-vous à la description de la commande ```Get 4D folder``` dans le *manuel Langage* de 4D). +Cette page affiche le nom, la version et l’emplacement de l’application ainsi que du dossier 4D actif (pour plus d’informations sur le dossier 4D actif, reportez-vous à la description de la commande `Get 4D folder` du manuel *Langage 4D*). -La partie centrale de la fenêtre affiche le nom et l’emplacement des fichiers de structure et de données ainsi que, le cas échéant, du fichier d'historique de la base. La partie inférieure de la fenêtre indique le nom du détenteur de la licence 4D, le type de licence, ainsi que le nom de l’utilisateur de la base lorsque les mots de passe sont activés — Super_Utilisateur dans le cas contraire. +The central part of the window indicates the name and location of the 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 current 4D user. - **Affichage et sélection des chemins d’accès** : dans la page **Programme**, les chemins d’accès sont affichés sous forme de pop up menus contenant l’enchaînement des dossiers à partir du disque : - ![](assets/fr/MSC/MSC_popup.png) Si vous sélectionnez un élément du menu (disque ou dossier), il s’affiche dans une nouvelle fenêtre système. La commande **Copier le chemin** copie le chemin d’accès complet dans le Presse-papiers sous forme de texte, et en utilisant les séparateurs de la plate-forme courante. + ![](assets/fr/MSC/MSC_popup.png) Si vous sélectionnez un élément du menu (disque ou dossier), il s’affiche dans une nouvelle fenêtre système. La commande **Copier le chemin** copie le chemin d’accès complet dans le Presse-papiers sous forme de texte, et en utilisant les séparateurs de la plate-forme courante. -- **Dossier “Licensesâ€** Le bouton **Dossier “Licensesâ€** permet d’afficher le contenu du dossier Licenses actif dans une nouvelle fenêtre système. Tous les fichiers de licence installés dans votre environnement 4D sont regroupés dans ce dossier, placé sur votre disque dur. Lorsqu’ils sont ouverts avec un navigateur Web, ces fichiers affichent des informations relatives aux licences qu’ils contiennent et à leurs caractéristiques. L’emplacement du dossier "Licenses" peut varier en fonction de la version ou de la langue de votre système d’exploitation. Pour plus d’informations sur l'emplacement de ce dossier, reportez-vous à la commande ```Get 4D folder``` ***Note :** Vous pouvez également accéder à ce dossier depuis la boîte de dialogue “Mise à jour des licences†(accessible depuis le menu Aide).* +- **Dossier “Licensesâ€** Le bouton **Dossier “Licensesâ€** permet d’afficher le contenu du dossier Licenses actif dans une nouvelle fenêtre système. Tous les fichiers de licence installés dans votre environnement 4D sont regroupés dans ce dossier, placé sur votre disque dur. Lorsqu’ils sont ouverts avec un navigateur Web, ces fichiers affichent des informations relatives aux licences qu’ils contiennent et à leurs caractéristiques. L’emplacement du dossier "Licenses" peut varier en fonction de la version ou de la langue de votre système d’exploitation. For more information about the location of this folder, refer to the `Get 4D folder` command. ***Note :** Vous pouvez également accéder à ce dossier depuis la boîte de dialogue “Mise à jour des licences†(accessible depuis le menu Aide).* ## Tables Cette page propose une vue d'ensemble de la base : ![](assets/fr/MSC/MSC_Tables.png) - > Les informations présentes dans cette page sont disponibles en mode standard et en mode maintenance. La page liste toutes les tables de la base (y compris les tables invisibles) ainsi que leurs caractéristiques : @@ -32,22 +31,22 @@ La page liste toutes les tables de la base (y compris les tables invisibles) ain - **Enregistrements** : Nombre total d'enregistrements de chaque table. Si un enregistrement est endommagé ou ne peut pas être lu, le mot *Erreur* est affiché à la place du total. Dans ce cas, vous devez envisager d'utiliser les outils de vérification et de réparation. - **Champs** : Nombre de champs dans la table. Les champs invisibles sont comptés, en revanche les champs supprimés ne le sont pas. - **Index** : Nombre d'index de tout type associés à la table -- **Chiffrable** : Si l'attribut **Chiffrable** est coché, il est sélectionné pour la table au niveau de la structure (voir le paragraphe Chiffrable dans le manuel Développement). -- **Chiffrée** : Si cet attribut est coché, les enregistrements de la table sont chiffrés dans le fichier de données. **Note** : Toute incohérence entre les options Chiffrable et Chiffrée nécessite une vérification de l'état de chiffrement du fichier de données dans la **Page Chiffrement** de la base. +- **Encryptable**: If checked, the **Encryptable** attribute is selected for the table at the structure level (see "Encryptable" paragraph in the Design Reference Manual). +- **Chiffrée** : Si cet attribut est coché, les enregistrements de la table sont chiffrés dans le fichier de données. ***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 MSC.* - **Taille table adresses** : Taille de la table d'adresses pour chaque table. La table d'adresses est une table interne qui stocke un élément par enregistrement créé dans la table. Elle établit le lien entre les enregistrements et leur adresse physique. Pour des raisons de performance, elle n'est pas redimensionnée lorsque des enregistrements sont supprimés. Sa taille peut donc être différente du nombre d'enregistrements actuel de la table. À noter que si cette différence est significative, il peut être intéressant de compacter les données avec l'option "Compacter la table d'adresses" afin d'optimiser la taille de la table d'adresses (voir [Page Compactage](compact.md)). ***Note :** Des différences entre la taille de la table d'adresses et le nombre d'enregistrements peuvent également résulter d'un incident durant l'écriture du cache sur le disque. * -## Données -La page **Données** fournit des informations sur l'espace de stockage libre et occupé dans les fichiers de données et la structure de la base. +## Données + +La page **Données** fournit des informations sur l'espace de stockage libre et occupé dans les fichiers de données et la structure de la base. > Cette page n'est pas accessible en mode maintenance Ces informations sont fournies sous forme de valeurs en octets et sont également représentées sous forme graphique : ![](assets/fr/MSC/MSC_Data.png) - > La page Données ne tient pas compte de la taille des données éventuellement stockées à l’extérieur du fichier de données (cf. section Stockage externe des données). Des fichiers trop fragmentés réduisent les performances du disque dur et donc de la base. Si le taux d’occupation est trop faible, 4D vous le signale par une icône d’avertissement (qui apparaît dans le bouton Informations et dans l’onglet du type de fichier correspondant) et indique qu’un compactage est requis :![](assets/fr/MSC/MSC_infowarn.png) -Une icône d’avertissement est également affichée sur le bouton de la Page [Compactage](compact.md) : ![](assets/fr/MSC/MSC_compactwarn.png) \ No newline at end of file +Une icône d’avertissement est également affichée sur le bouton de la Page [Compactage](compact.md) : ![](assets/fr/MSC/MSC_compactwarn.png) diff --git a/website/translated_docs/fr/MSC/overview.md b/website/translated_docs/fr/MSC/overview.md index e1f0d817be7c84..d2537243ac5054 100644 --- a/website/translated_docs/fr/MSC/overview.md +++ b/website/translated_docs/fr/MSC/overview.md @@ -8,33 +8,33 @@ La fenêtre du Centre de sécurité et de maintenance (CSM) rassemble tous les o **Note :** La fenêtre du CSM n'est pas accessible depuis une application 4D distante. -Vous pouvez accéder à la fenêtre du CSM de plusieurs manières. Le mode d’accès détermine également le mode d’ouverture de la base : mode “maintenance†ou mode “standardâ€. En mode maintenance, la base n’est pas ouverte par 4D, seule sa référence est fournie au CSM. En mode standard, la base est ouverte par 4D. +Vous pouvez accéder à la fenêtre du CSM de plusieurs manières. Le mode d’accès détermine également le mode d’ouverture du projet d'application : mode “maintenance†ou mode “standardâ€. En mode maintenance, le projet n’est pas ouvert par 4D, seule sa référence est fournie au CSM. En mode standard, le projet est ouvert par 4D. + ## Accès au CSM en mode maintenance -En mode maintenance, seule la fenêtre du CSM est affichée (la base n’est pas ouverte par l’application 4D). Ce principe permet notamment d’accéder à des bases trop endommagées pour pouvoir être ouvertes en mode standard par 4D. En outre, certaines opérations (compactage, réparation...) nécessitent que la base soit ouverte en mode maintenance (cf. [FFFF](#disponibilite-des-fonctionnalites)). +En mode maintenance, seule la fenêtre du CSM est affichée (le projet n’est pas ouvert par l’application 4D). Ce principe permet notamment d’accéder à des projets trop endommagés pour pouvoir être ouvertes en mode standard par 4D. En outre, certaines opérations (compactage, réparation...) nécessitent que le projet soit ouvert en mode maintenance (cf. [Disponibilité des fonctionnalités](#feature-availability)). Vous pouvez ouvrir le CSM en mode maintenance depuis deux emplacements : -- **Boîte de dialogue standard d’ouverture** La boîte de dialogue standard d’ouverture de base de données comporte l’option **Centre de sécurité de maintenance** sous forme de menu associé au bouton **Ouvrir** : ![](assets/en/MSC/MSC_standardOpen.png) -- Menu **Aide/Centre de sécurité et de maintenance** ou bouton **CSM** de la barre d’outils (base non ouverte) - ![](assets/en/MSC/mscicon.png) - Lorsque vous appelez cette fonction, une boîte de dialogue standard d’ouverture de fichiers apparaît, vous permettant de désigner la base à examiner. La base ne sera pas ouverte par 4D. +- **Boîte de dialogue standard d’ouverture** La boîte de dialogue standard d’ouverture de projet comporte l’option **Centre de sécurité de maintenance** sous forme de menu associé au bouton **Ouvrir** : ![](assets/en/MSC/MSC_standardOpen.png) +- Menu **Aide/Centre de sécurité et de maintenance** ou bouton **CSM** de la barre d’outils (projet non ouvert) + ![](assets/en/MSC/mscicon.png) + Lorsque vous appelez cette fonction, une boîte de dialogue standard d’ouverture de fichiers apparaît, vous permettant de sélectionner le fichier *.4DProject* ou *.4dz* à examiner. Le projet ne sera pas ouvert par 4D. ## Accès au CSM en mode standard -En mode standard, une base de données est ouverte. Dans ce mode, certaines fonctions de maintenance ne sont pas disponibles. Vous disposez de plusieurs possibilités pour accéder à la fenêtre du CSM : +En mode standard, un projet est ouvert. Dans ce mode, certaines fonctions de maintenance ne sont pas disponibles. Vous disposez de plusieurs possibilités pour accéder à la fenêtre du CSM : - Utiliser le Menu **Aide/Centre de sécurité et de maintenance** ou le bouton **CSM** de la barre d’outils : - ![](assets/en/MSC/mscicon.png) -- Utiliser l'action standard “CSM†qu’il est possible d’associer à une commande de menu ou à un objet de formulaire (cf. section "Actions standard"). - -- A l’aide de la commande de langage ```OPEN SECURITY CENTER``` . + ![](assets/en/MSC/mscicon.png) +- Utiliser l'action standard “Csm†qu’il est possible d’associer à une commande de menu ou à un objet de formulaire. +- Utiliser la commande `OPEN SECURITY CENTER`. ## Disponibilité des fonctionnalités Certaines fonctions du CSM ne sont pas disponibles suivant le mode d’ouverture du CSM : -- Les informations relatives à la sauvegarde sont disponibles uniquement lorsque la base de données est ouverte (le CSM doit avoir été ouvert en mode standard). -- Les fonctions de compactage, retour arrière, restitution, réparation et chiffrement des données ne sont utilisables qu’avec des bases de données non ouvertes (le CSM doit avoir été ouvert en mode maintenance). Si ces fonctions sont utilisées alors que la base est ouverte en mode standard, une boîte de dialogue s’affiche, vous permettant de relancer l’application en mode maintenance. -- Dans les bases chiffrées, l'accès aux données chiffrées ou au fichier .journal nécessite qu'une clé de chiffrement des données valide soit fournie (voir [Page Chiffrement](encrypt.md)). Sinon, les données chiffrées ne sont pas visibles. \ No newline at end of file +- Les informations relatives à la sauvegarde sont disponibles uniquement lorsque le projet est ouvert (le CSM doit avoir été ouvert en mode standard). +- Les fonctions de compactage, retour arrière, restitution, réparation et chiffrement des données ne sont utilisables qu’avec des bases de données non ouvertes (le CSM doit avoir été ouvert en mode maintenance). Si ces fonctions sont utilisées alors que le projet est ouvert en mode standard, une boîte de dialogue s’affiche, vous permettant de relancer l’application en mode maintenance. +- Dans les bases chiffrées, l'accès aux données chiffrées ou au fichier .journal nécessite qu'une clé de chiffrement des données valide soit fournie (voir [Page Chiffrement](encrypt.md)). Sinon, les données chiffrées ne sont pas visibles. diff --git a/website/translated_docs/fr/MSC/repair.md b/website/translated_docs/fr/MSC/repair.md index cbb8b5e2be8ca3..1d194260e3f479 100644 --- a/website/translated_docs/fr/MSC/repair.md +++ b/website/translated_docs/fr/MSC/repair.md @@ -4,71 +4,68 @@ title: Page Réparation sidebar_label: Page Réparation --- -Cette page permet de réparer le fichier de données ou le fichier de structure lorsqu’il a été endommagé. Généralement, vous n’utiliserez ces fonctions qu’à la demande de 4D, lorsque des anomalies auront été détectées à l’ouverture de la base ou à la suite d’une [vérification](verify.md). +Cette page permet de réparer le fichier de données ou le fichier de structure lorsqu’il a été endommagé. 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). **Attention :** Chaque réparation entraîne la duplication du fichier d’origine et donc l’augmentation de la taille du dossier de l’application. Il est important de prendre cela en considération (notamment sous macOS, où les applications 4D apparaissent sous forme de paquet) afin de ne pas augmenter excessivement la taille de l'application. Une intervention manuelle à l’intérieur du package peut être utile afin de supprimer les copies des fichiers d’origine. - -> La réparation n’est disponible qu’en mode maintenance. Si vous tentez d’effectuer cette opération en mode standard, une boîte de dialogue d’alerte vous prévient que la base va être fermée puis relancée en mode maintenance. -> +> La réparation n’est disponible qu’en mode maintenance. Si vous tentez d’effectuer cette opération en mode standard, une boîte de dialogue d’alerte vous prévient que l'application va être fermée puis relancée en mode maintenance. > Lorsque la base est chiffrée, la réparation des données comprend le déchiffrage et le chiffrage et nécessite ainsi la clé de chiffrement de données courante. Si aucune clé de chiffrement valide n'a déjà été fournie, une boite de dialogue s'affiche pour demander pour demander le mot de passe ou la clé de chiffrement (voir Page Chiffrement). ## Fichiers ### Fichier de données à réparer - -Chemin d’accès du fichier de données courant. Le bouton **[...]** permet de désigner un autre fichier de données. Lorsque vous cliquez sur ce bouton, une boîte de dialogue standard d’ouverture de documents s’affiche, vous permettant de désigner le fichier de données à réparer. Si vous effectuez une [réparation standard](#standard_repair), vous devez sélectionner un fichier de données compatible avec le fichier de structure ouvert. Si vous effectuez une réparation par [récupération des en-têtes d'enregistrements](#recover-by-record-headers), vous pouvez sélectionner tout fichier de données. Une fois cette boîte de dialogue validée, le chemin d’accès du fichier à réparer est indiqué dans la fenêtre. +Chemin d’accès du fichier de données courant. Le bouton **[...]** permet de désigner un autre fichier de données. Lorsque vous cliquez sur ce bouton, une boîte de dialogue standard d’ouverture de documents s’affiche, vous permettant de désigner le fichier de données à réparer. Si vous effectuez une [réparation standard](#réparation-standard), vous devez sélectionner un fichier de données compatible avec le fichier de structure ouvert. Si vous effectuez une réparation par [réparation par en-têtes d'enregistrements](#réparation-par-en-têtes-denregistrements), vous pouvez sélectionner tout fichier de données. Une fois cette boîte de dialogue validée, le chemin d’accès du fichier à réparer est indiqué dans la fenêtre. ### Dossier de sauvegarde - -Par défaut, le fichier de données original sera dupliqué avant réparation. Il sera placé dans un sous-dossier libellé “Replaced files (repairing)†dans le dossier de la base. Le second bouton **[...]** permet de désigner un autre emplacement pour les sauvegardes des fichiers originaux effectuées avant réparation. Cette option permet notamment de réparer des fichiers volumineux en utilisant différents disques. +Par défaut, le fichier de données original sera dupliqué avant réparation. Il sera placé dans un sous-dossier libellé “Replaced files (repairing)†dans le dossier de l'application. Le second bouton **[...]** permet de désigner un autre emplacement pour les sauvegardes des fichiers originaux effectuées avant réparation. Cette option permet notamment de réparer des fichiers volumineux en utilisant différents disques. ### Fichiers réparés +4D crée un nouveau fichier de données vide à l’emplacement du fichier d’origine. Le fichier d’origine est déplacé dans le dossier nommé "\Replaced Files (Repairing) date heure" dont l’emplacement a été défini dans la zone de "Dossier de sauvegarde" (dossier de l'application par défaut). Le fichier vide est rempli avec les données récupérées. -4D crée un nouveau fichier de données vide à l’emplacement du fichier d’origine. Le fichier d’origine est déplacé dans le dossier nommé "\Replaced Files (Repairing) date heure" dont l’emplacement a été défini dans la zone de "Dossier de sauvegarde" (dossier de la base par défaut). Le fichier vide est rempli avec les données récupérées. ## Réparation standard La réparation standard permet de réparer des données dans lesquelles seuls quelques enregistrements ou index sont endommagés (les tables d'adresses sont intactes). Les données sont compactées et réparées. A noter que ce type de réparation ne peut être effectué que si le fichier de données et le fichier de structure correspondent. -A l’issue de la procédure, la page "Réparation" du CSM est affichée. Un message indique si la réparation a été effectuée avec succès. Dans ce cas, vous pouvez immédiatement ouvrir la base. ![](assets/fr/MSC/MSC_RepairOK.png) +A l’issue de la procédure, la page "Réparation" du CSM est affichée. Un message indique si la réparation a été effectuée avec succès. Dans ce cas, vous pouvez immédiatement ouvrir l'application. ![](assets/fr/MSC/MSC_RepairOK.png) ## Réparation par en-têtes d'enregistrements - Cette option de réparation de bas niveau est à utiliser uniquement dans le cas où le fichier de données a été fortement endommagé et une fois que toutes les autres solutions (restitution de sauvegarde, réparation standard) se sont avérées inefficaces. Les enregistrements de 4D sont de taille variable : il est donc nécessaire, pour les retrouver, de conserver dans une table spéciale l’endroit où ils sont stockés sur votre disque. Le programme accède donc à l’adresse de l’enregistrement par l’intermédiaire d’un index et d’une table d’adresses. Si seuls des enregistrements ou des index sont endommagés, l’option de réparation standard suffira généralement pour résoudre le problème. C’est lorsque la table d’adresses est touchée qu’il faudra en venir à une récupération plus sophistiquée, puisqu’il faut la reconstituer. Pour réaliser cette opération, le CSM utilise le marqueur qui se trouve en en-tête de chaque enregistrement. Les marqueurs peuvent être comparés à des résumés des enregistrements, comportant l’essentiel de leurs informations, et à partir desquels une reconstitution de la table d’adresses est possible. -> Si vous avez désélectionné l’option **Enregistrement(s) définitivement supprimé(s)** dans les propriétés d’une table dans la structure de la base, la réparation par marqueurs d’en-êtes pourra faire réapparaître des enregistrements normalement supprimés. La récupération par en-têtes ne tient pas compte des éventuelles contraintes d’intégrité. En particulier, à l’issue de cette opération, vous pouvez obtenir des valeurs dupliquées avec des champs uniques ou des valeurs NULL avec des champs déclarés **non NULL**. +> Si vous avez désélectionné l’option **Enregistrement(s) définitivement supprimé(s)** dans les propriétés d’une table dans la structure, la réparation par marqueurs d’en-êtes pourra faire réapparaître des enregistrements normalement supprimés. +> +> La récupération par en-têtes ne tient pas compte des éventuelles contraintes d’intégrité. En particulier, à l’issue de cette opération, vous pouvez obtenir des valeurs dupliquées avec des champs uniques ou des valeurs NULL avec des champs déclarés **non NULL**. Lorsque vous cliquez sur le bouton **Réparer**, 4D effectue une analyse complète du fichier de données. A l’issue de cette analyse, le résultat est affiché dans la fenêtre suivante : ![](assets/fr/MSC/mscrepair2.png) - > Si tous les enregistrements et toutes les tables ont été attribués, seule la zone principale est affichée. La zone "Enregistrements trouvés dans le fichier de données" comporte deux tableaux synthétisant les informations issues de l’analyse du fichier de données. - Le premier tableau liste les informations issues de l’analyse du fichier de données. Chaque ligne représente un groupe d’enregistrements récupérables dans le fichier de données : - - - La colonne **Ordre** indique l’ordre de récupération des groupes d’enregistrements. + - La colonne **Ordre** indique l’ordre de récupération des groupes d’enregistrements. - La colonne **Nombre** indique le nombre d'enregistrements contenus dans la table. - La colonne **Table de destination** indique le nom des tables ayant pu être automatiquement associées aux groupes d’enregistrements identifiés. Les noms des tables attribuées automatiquement sont affichés en caractères verts. Les groupes qui n'ont pas encore été attribués, c'est-à-dire, les tables qui n'ont pas pu être associées à des enregistrements sont affichées en caractères rouges. - La colonne **Récupérer** permet vous permet d’indiquer pour chaque groupe si vous souhaitez récupérer les enregistrements. Par défaut, l’option est cochée pour tous les groupes avec les enregistrements qui peuvent être associés à une table. + - Le deuxième tableau liste les tables du fichier de structure. -### Attribution manuelle +### Attribution manuelle Si, du fait de l’endommagement de la table d’adresses, un ou plusieurs groupes d’enregistrements n’ont pas pu être attribués à des tables, vous pouvez les attribuer manuellement. Pour attribuer une table à un groupe non identifié, sélectionnez le groupe dans le premier tableau. Lorsque vous sélectionnez des enregistrements non identifiés, la zone "Contenu des enregistrements" affiche une prévisualisation du contenu des premiers enregistrements du groupe afin de vous permettre de les attribuer plus facilement : ![](assets/en/MSC/mscrepair3.png) Sélectionnez ensuite la table à attribuer dans le tableau des "Tables non attribuées" puis cliquez sur le bouton **Identifier table**. Vous pouvez également attribuer une table par glisser-déposer. Le groupe d’enregistrements est alors associé à la table, il sera récupéré dans cette table. Les noms des tables attribuées manuellement sont affichés en caractères noirs. Le bouton **Ignorer enregistrements** permet de supprimer l’association effectuée manuellement entre une table et un groupe d’enregistrements. + ## Voir le compte rendu -Une fois la réparation terminée, 4D génère un fichier de compte-rendu dans le dossier Logs de la base. Ce fichier liste l’ensemble des opérations qui ont été menées. Il est créé au format xml et est nommé *DatabaseName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" où : +Une fois la réparation terminée, 4D génère un fichier de compte-rendu dans le dossier Logs du projet. Ce fichier liste l’ensemble des opérations qui ont été menées. Il est créé au format xml et est nommé : *ApplicationName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" où : -- ** est le nom du fichier de structure sans extension, par exemple "Factures", -- ** est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". +- *ApplicationName* est le nom du fichier de structure sans extension, par exemple "Factures", +- *aaaa-mm-jj hh-mm-ss* est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". -Lorsque vous cliquez sur le bouton **Voir le compte rendu**, 4D affiche le fichier de compte-rendu le plus récent dans le navigateur par défaut de l’ordinateur. \ No newline at end of file +Lorsque vous cliquez sur le bouton **Voir le compte rendu**, 4D affiche le fichier de compte-rendu le plus récent dans le navigateur par défaut de l’ordinateur. diff --git a/website/translated_docs/fr/MSC/restore.md b/website/translated_docs/fr/MSC/restore.md index c626dc1a3f916d..0ed46f678ea188 100644 --- a/website/translated_docs/fr/MSC/restore.md +++ b/website/translated_docs/fr/MSC/restore.md @@ -4,45 +4,44 @@ title: Page restitution sidebar_label: Page restitution --- -## Restauration d'une sauvegarde - -La page **Restitution** du Centre de sécurité et de maintenance vous permet de restituer manuellement une archive de la base de données courante. Cette page propose plusieurs options permettant de contrôler la restitution des bases : +You can manually restore an archive of the current application using the **Restore** page. This page provides several options that can be used to control the restoration: ![](assets/en/MSC/MSC_restore.png) -> Les systèmes de restitution automatique de 4D restituent les bases et incluent le fichier d'historique si nécessaire. +> 4D automatic recovery systems restore applications and include data log file when necessary. -La liste située dans la partie gauche de la fenêtre affiche les sauvegardes existantes de la base. Vous pouvez également cliquer sur le bouton Parcourir... situé sous la zone afin d’ouvrir tout autre fichier d’archive provenant d’un autre emplacement. Il est alors ajouté à la liste des archives. +The list found in the left part of the window displays any existing backups of the application. 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. Il est alors ajouté à la liste des archives. Lorsque vous sélectionnez une sauvegarde dans cette liste, la partie droite de la fenêtre affiche les informations relatives à cette sauvegarde : -- **Chemin d’accès** : chemin d’accès complet du fichier de sauvegarde sélectionné. Le bouton Montrer ouvre le dossier de sauvegarde dans une fenêtre système. +- **Chemin d’accès** : chemin d’accès complet du fichier de sauvegarde sélectionné. Le bouton Montrer ouvre le dossier de sauvegarde dans une fenêtre système. - **Date et heure** : date et heure de la sauvegarde. -- **Contenu** : contenu du fichier de sauvegarde. Chaque élément de la liste est associé à une case à cocher, permettant de spécifier si vous souhaitez ou non le restituer. Vous pouvez utiliser les boutons **Tout sélectionner** ou **Tout désélectionner** pour paramétrer la liste des éléments à restituer. -- **Emplacement des fichiers restitués** : dossier dans lequel seront placés les fichiers restitués. Par défaut, 4D restitue les fichiers dans un dossier nommé “Nomarchive†(sans extension) placé à côté du fichier de structure de la base. Pour modifier cet emplacement, cliquez sur le bouton **[...]** et désignez le dossier dans lequel vous souhaitez effectuer la restitution. +- **Contenu** : contenu du fichier de sauvegarde. Chaque élément de la liste est associé à une case à cocher, permettant de spécifier si vous souhaitez ou non le restituer. Vous pouvez utiliser les boutons **Tout sélectionner** ou **Tout désélectionner** pour paramétrer la liste des éléments à restituer. +- **Emplacement des fichiers restitués** : dossier dans lequel seront placés les fichiers restitués. By default, 4D restores the files in a folder named “Archivename†(no extension) that is placed next to the Project folder. Pour modifier cet emplacement, cliquez sur le bouton **[...]** et désignez le dossier dans lequel vous souhaitez effectuer la restitution. Le bouton **Restituer** lance la restitution manuelle des éléments sélectionnés. ## Intégration successive de plusieurs fichiers d’historiques -L’option **Intégrer un ou plusieurs fichier(s) d’historique** après la restitution permet d’intégrer successivement plusieurs sauvegardes d’historiques dans une base de données. Si, par exemple, vous disposez de 4 sauvegardes d’historique (.4BL) consécutives (correspondant à 4 sauvegardes de la base), vous pouvez restituer la première sauvegarde de la base puis intégrer une à une les sauvegardes d’historique. Ce principe permet par exemple de récupérer un fichier de données alors que les derniers fichiers de sauvegarde de la base sont manquants. +The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into an application. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 backups, you can restore the first backup then integrate the journal (data log) archives one by one. Ce principe permet par exemple de récupérer un fichier de données alors que les derniers fichiers de sauvegarde de la base sont manquants. Lorsque cette option est cochée, 4D affiche une boîte de dialogue standard d’ouverture de fichiers à l’issue de la restitution, vous permettant de sélectionner la sauvegarde d’historique à intégrer. La boîte de dialogue d’ouverture est affichée de nouveau après chaque intégration, jusqu’à ce qu’elle soit annulée. ## Restituer une base chiffrée -Souvenez-vous que la clé de chiffrement des données (phrase secrète) a peut-être été changée au fil des versions des fichiers de sauvegarde (.4BK), des fichiers .journal (.4BL) et de la base courante. Il est important que les clés de chiffrement soient toujours mises en correspondance. +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 application. Il est important que les clés de chiffrement soient toujours mises en correspondance. Au moment de restituer une sauvegarde et d'intégrer le fichier d'historique courant dans une base chiffrée : - Si vous restituez une sauvegarde à l'aide d'une ancienne phrase secrète, cette dernière sera demandée au prochain démarrage de la base. -- Après un chiffrement, à l'ouverture du fichier de données chiffrées, une sauvegarde est exécutée et un nouveau fichier journal est créé. Ainsi, il n'est pas possible de restituer un fichier chiffré .4BK avec une clé et d'intégrer les fichiers chiffrés .4BL avec une autre clé. +- Après un chiffrement, à l'ouverture du fichier de données chiffrées, une sauvegarde est exécutée et un nouveau fichier journal est créé. Ainsi, il n'est pas possible de restituer un fichier chiffré .4BK avec une clé et d'intégrer les fichiers chiffrés .4BL avec une autre clé. La séquence suivante illustre les principes d'une opération de clé multiple de sauvegarde/restitution : + | Opération | Fichiers générés | Commentaire | | ---------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Créer une nouvelle base de données | | | +| New data file | | | | Ajouter des données (enregistrement # 1) | | | | Sauvegarder la base de données | 0000.4BL et 0001.4BK | | | Ajouter des données (enregistrement # 2) | | | @@ -59,8 +58,6 @@ La séquence suivante illustre les principes d'une opération de clé multiple d | Sauvegarder la base de données | Fichiers 0006.4BL et 0007.4BK (chiffrés avec clé2) | Il est possible de restituer 0006.4BK et d'intégrer 0006.4BL | | Ajouter des données (enregistrement # 8) | | | | Sauvegarder la base de données | Fichiers 0007.4BL et 0008.4BK (chiffrés avec clé2) | Il est possible de restituer 0006.4BK et d'intégrer 0006.4BL + 0007.4BL. Il est possible de restituer 0007.4BK et d'intégrer 0007.4BL | - - > Au moment de restituer une sauvegarde et d'intégrer un ou plusieurs fichiers .4BL, les fichiers restitués .4BK et .4BL doivent avoir la même clé de chiffrement. Durant le processus d'intégration, si aucune clé de chiffrement valide n'est trouvée dans le trousseau de 4D lors de l'intégration du fichier .4BL, une erreur est générée. > -> Si vous avez stocké plusieurs clés de données sur le même appareil externe, la restitution d'une sauvegarde et l'intégration de fichiers d'historique permettront de trouver automatiquement la clé correspondant à l'appareil connecté. \ No newline at end of file +> Si vous avez stocké plusieurs clés de données sur le même appareil externe, la restitution d'une sauvegarde et l'intégration de fichiers d'historique permettront de trouver automatiquement la clé correspondant à l'appareil connecté. diff --git a/website/translated_docs/fr/MSC/rollback.md b/website/translated_docs/fr/MSC/rollback.md index 1a8a79698790bd..ed2b64070281ac 100644 --- a/website/translated_docs/fr/MSC/rollback.md +++ b/website/translated_docs/fr/MSC/rollback.md @@ -6,7 +6,7 @@ sidebar_label: Page Retour en arrière La page Retour arrière du CSM permet d’accéder à la fonction de retour en arrière parmi les opérations effectuées dans le fichier de données. Elle s’apparente à une fonction d’annulation multi-niveaux. Elle est utile notamment lorsqu’un enregistrement a été supprimé par erreur dans la base de données. -Pour que cette fonction soit accessible, il est impératif que la base travaille avec un fichier d’historique. +This function is only available when the application functions with a data log file. ![](assets/en/MSC/MSC_rollback1.png) diff --git a/website/translated_docs/fr/MSC/verify.md b/website/translated_docs/fr/MSC/verify.md index 364bb04b1f4de8..2bf649b6051ca7 100644 --- a/website/translated_docs/fr/MSC/verify.md +++ b/website/translated_docs/fr/MSC/verify.md @@ -6,33 +6,36 @@ sidebar_label: Page Vérification Cette page permet de vérifier l’intégrité des données et de la structure. La vérification peut porter sur les enregistrements et/ou les index ainsi que sur les objets du développement (méthodes, formulaires...). La page effectue uniquement une vérification des objets. Si des erreurs sont trouvées et des réparations requises, il vous sera nécessaire d’utiliser la [Page Réparation](repair.md). + ## Actions La page comporte quatre boutons d’action permettant un accès direct aux fonctions de vérification. - > Lorsque la base est chiffrée, la cohérence des données chiffrées est vérifiée. Si aucune clé de données valide n'a été fournie, une boîte de dialogue s'affiche pour vous demander de saisir une phrase secrète ou la clé des données. + - **Vérifier les enregistrements et les index :** lance la procédure de vérification globale des données. - **Vérifier uniquement les enregistrements :** lance la procédure de vérification des enregistrements uniquement (les index ne sont pas vérifiés). - **Vérifier uniquement les index :** lance la procédure de vérification des index uniquement (les enregistrements ne sont pas vérifiés). - > La vérification des enregistrements et des index peut également être effectuée en mode détaillé, table par table (cf. paragraphe “Détails†ci-dessous). + ## Voir le compte rendu -Quelle que soit la vérification demandée, 4D génère un fichier de compte-rendu dans le dossier `Logs` de la base. Ce fichier liste l’ensemble des vérifications effectuées et signale chaque erreur rencontrée, le cas échéant ([OK] est affiché lorsque la vérification est correcte). Il est créé au format XML et est nommé *NomBase**Verify_Log**aaaa-mm-jjj hh-mm-ss*.xml" où : +Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the application. Ce fichier liste l’ensemble des vérifications effectuées et signale chaque erreur rencontrée, le cas échéant ([OK] est affiché lorsque la vérification est correcte). It is created in XML format and is named: *ApplicationName*_Verify_Log_*yyyy-mm-dd hh-mm-ss*.xml where: -- ** est le nom du fichier de structure sans extension, par exemple "Factures", -- ** est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". +- *ApplicationName* est le nom du fichier de structure sans extension, par exemple "Factures", +- *aaaa-mm-jj hh-mm-ss* est l'horodatage du fichier, basé sur la date et l'heure système locales au moment du lancement de l'opération de vérification, par exemple "2019-02-11 15-20-45". Lorsque vous cliquez sur le bouton **Voir le compte rendu**, 4D affiche le fichier de compte-rendu le plus récent dans le navigateur par défaut de l’ordinateur. + ## Détails Le bouton **Liste des tables** provoque l’affichage d’une page détaillée permettant de visualiser et de sélectionner les enregistrements et les index à vérifier : ![](assets/en/MSC/MSC_Verify.png) + La désignation des éléments à vérifier permet notamment de gagner du temps lors de la vérification. La liste principale affiche toutes les tables de la base. Pour chaque table, vous pouvez limiter la vérification aux enregistrements et/ou à chaque index. Cliquez sur l’icône en forme de triangle pour déployer le contenu d’une table ou les index d’un champ et sélectionnez/ désélectionnez les cases à cocher en fonction de vos souhaits. Par défaut, tout est sélectionné. Vous pouvez également utiliser les boutons raccourcis **Tout sélectionner**, **Tout désélectionner**, **Tous les enregistrements** et **Tous les index**. @@ -47,9 +50,7 @@ La colonne "Etat" affiche le statut de la vérification de chaque élément à l | ![](assets/en/MSC/MSC_KO3.png) | Vérification partielle effectuée | | ![](assets/en/MSC/MSC_KO.png) | Vérification non effectuée | - Cliquez sur le bouton **Vérifier** pour lancer la vérification ou sur le bouton **Standard** pour retourner à la page standard. Le bouton **Voir le compte rendu** permet d’afficher le fichier de compte-rendu dans le navigateur par défaut de l’ordinateur (cf. paragraphe [Voir le compte rendu](#open-log-file) ci-dessus). - -> La page standard ne tient pas compte des modifications effectuées dans la page détaillée : lorsque vous cliquez sur un bouton de vérification dans la page standard, tous les éléments sont vérifiés. En revanche, les paramétrages effectués dans la page détaillée sont conservés d’une session à l’autre. \ No newline at end of file +> La page standard ne tient pas compte des modifications effectuées dans la page détaillée : lorsque vous cliquez sur un bouton de vérification dans la page standard, tous les éléments sont vérifiés. En revanche, les paramétrages effectués dans la page détaillée sont conservés d’une session à l’autre. diff --git a/website/translated_docs/fr/Menus/bars.md b/website/translated_docs/fr/Menus/bars.md index 381a1deb185017..4580550b0f2dc6 100644 --- a/website/translated_docs/fr/Menus/bars.md +++ b/website/translated_docs/fr/Menus/bars.md @@ -7,8 +7,10 @@ Les barres de menu fournissent la principale interface des applications personna 4D vous permet d’associer une image d’accueil personnalisée à chaque barre de menus et de prévisualiser une barre à tout moment. + ## Image d'accueil + Vous pouvez enrichir l’apparence de chaque barre de menus en lui associant une image d’accueil personnalisée. La fenêtre contenant l’image d’accueil est affichée en-dessous de la barre de menus lorsqu’elle apparaît. Elle peut contenir un logo ou tout type d’image. Par défaut, 4D affiche un logo comme image dans la fenêtre d’accueil : ![](assets/fr/Menus/splash1.png) @@ -16,18 +18,18 @@ Vous pouvez enrichir l’apparence de chaque barre de menus en lui associant une Une image d’accueil personnalisée peut provenir de toute application graphique. 4D vous permet de coller une image du presse-papiers, d’utiliser une image de la bibliothèque ou toute image présente sur votre disque dur. Tous les formats d’image standard pris en charge par 4D sont utilisables. L'image d'accueil peut être uniquement paramétrée dans l'éditeur de menus : sélectionnez la barre de menus à laquelle vous souhaitez associer une image d’accueil personnalisée. Notez la zone "Image de fond" à droite de la fenêtre. Pour ouvrir directement une image stockée sur votre disque, cliquez sur le bouton **Ouvrir** ou cliquez dans la zone “Image de fondâ€. Un pop up menu apparaît : - - Pour coller une image se trouvant dans le Presse-papiers, choisissez la commande **Coller**. -- Pour ouvrir une image stockée dans un fichier disque, choisissez la commande **Ouvrir**. Si vous avez choisi la commande Ouvrir, une boîte de dialogue standard d’ouverture de fichiers apparaît, vous permettant de sélectionner le fichier image à utiliser. Une fois définie, l’image s’affiche en taille réduite dans la zone. Elle est alors associée à la barre de menus. +- Pour ouvrir une image stockée dans un fichier disque, choisissez la commande **Ouvrir**. Si vous avez choisi la commande Ouvrir, une boîte de dialogue standard d’ouverture de fichiers apparaît, vous permettant de sélectionner le fichier image à utiliser. Une fois définie, l’image s’affiche en taille réduite dans la zone. Elle est alors associée à la barre de menus. ![](assets/en/Menus/splash2.png) Vous pouvez visualiser le résultat final en testant la barre de menus (cf. paragraphe suivant). En mode Application, l’image est affichée dans la fenêtre d’accueil avec un format du type “tronqué centréâ€. -> Vous pouvez choisir d’afficher ou de masquer cette fenêtre en cochant l'option **Afficher la barre d'outils** dans les Propriétés de la base. +> You can choose whether to display or hide this window using the **Display toolbar** option in the Settings. Pour supprimer l’image personnalisée et afficher l’image par défaut, cliquez sur le bouton **Effacer** ou cliquez dans la zone “Image de fond†et choisissez la commande **Effacer** dans le pop up menu. + ## Prévisualiser la barre de menus L’éditeur de menus vous permet de visualiser à tout moment les menus personnalisés et la fenêtre d’accueil sans quitter la fenêtre de la boîte à outils. @@ -36,4 +38,6 @@ Pour cela, il vous suffit de sélectionner la barre de menus et de choisir la co ![](assets/fr/Menus/splash3.png) -4D affiche un aperçu de la barre de menus ainsi que de l’écran d’accueil. Vous pouvez dérouler les menus et les sous-menus pour prévisualiser leur contenu. En revanche, les menus ne sont pas actifs. Pour pouvoir tester le fonctionnement des menus et la barre d’outils, vous devez utiliser la commande **Tester l’application** dans le menu **Exécution**. \ No newline at end of file +4D affiche un aperçu de la barre de menus ainsi que de l’écran d’accueil. Vous pouvez dérouler les menus et les sous-menus pour prévisualiser leur contenu. En revanche, les menus ne sont pas actifs. Pour pouvoir tester le fonctionnement des menus et la barre d’outils, vous devez utiliser la commande **Tester l’application** dans le menu **Exécution**. + + diff --git a/website/translated_docs/fr/Menus/creating.md b/website/translated_docs/fr/Menus/creating.md index 325e78a693fdc9..475d5014f3d955 100644 --- a/website/translated_docs/fr/Menus/creating.md +++ b/website/translated_docs/fr/Menus/creating.md @@ -10,22 +10,23 @@ Les barres de menus peuvent être définies : Vous pouvez combiner les deux fonctionnalités et utiliser les menus créés dans la structure comme templates pour définir des menus dans la mémoire. + ## Barre de menu par défaut -Une application personnalisée doit contenir au moins une barre de menu avec un menu. Par défaut, lorsque vous créez une nouvelle base, 4D crée automatiquement une barre de menu par défaut (Barre n°1) pour que l’utilisateur puisse accéder au mode Application. La barre de menus par défaut (Barre n°1) comporte des menus standard et une commande de retour au mode Développement. +Une application personnalisée doit contenir au moins une barre de menu avec un menu. By default, when you create a new project, 4D automatically creates a default menu bar (Menu Bar #1) so that you can access the Application environment. La barre de menus par défaut (Barre n°1) comporte des menus standard et une commande de retour au mode Développement. -Ce mécanisme permet à l’utilisateur d’accéder au mode Application dès la création de la base. La barre de menus n°1 est automatiquement appelée lorsque la commande **Tester l’application** est sélectionnée dans le menu **Exécution**. +This allows the user to access the Application environment as soon as the project is created. La barre de menus n°1 est automatiquement appelée lorsque la commande **Tester l’application** est sélectionnée dans le menu **Exécution**. La barre de menus par défaut contient trois menus : Fichier, Edition et Mode. - **Fichier** : ce menu comporte uniquement la commande **Quitter**. L’action automatique *Quitter* est associée à la commande, ce qui a pour effet de provoquer la fermeture de l’application. -- **Edition** : menu standard et entièrement modifiable. Les fonctions d’édition du type copier, coller, etc. sont définies via des actions standard. +- **Edition** : menu standard et entièrement modifiable. Editing functions such as copy, paste, etc. are defined using standard actions. - **Mode** : par défaut, ce menu contient la commande **Retour au mode Développement**, permettant de sortir du mode Application. - > Les libellés apparaissent *en caractères italiques* car il s’agit de références et non de textes en dur. Pour plus d’informations sur ce point, reportez-vous à la section [Utiliser des références dans les titres de menus](properties.md#title). Vous pouvez modifier cette barre de menus comme vous le souhaitez ou créer des barres de menus supplémentaires. + ## Créer des menus ### A l'aide de l'éditeur de menus @@ -34,7 +35,6 @@ Vous pouvez modifier cette barre de menus comme vous le souhaitez ou créer des 2. (Facultatif) Effectuez un double-clic sur le nom du menu/de la barre de menus afin de le rendre éditable et saisissez un nom personnalisé. OU Saisissez le nom personnalisé dans la zone “Titreâ€. Les noms des barres de menu doivent être uniques. Ils peuvent comporter jusqu’à 31 caractères. You can enter the name as "hard coded" or enter a reference (see [information about the Title property](properties.md#title)). ### A l'aide du langage 4D - Utilisez la commande de `Create menu` pour créer une nouvelle barre de menu ou une référence de menu (*MenuRef*) en mémoire. Lorsque les menus sont gérés par des références *MenuRef*, il n'y a pas de différence en soi entre un menu et une barre de menus. Dans les deux cas, il s'agit d'une liste d'éléments. Seul leur utilisation diffère. Dans le cas d'une barre de menus, chaque élément correspond à un menu lui-même composé d'éléments. @@ -42,38 +42,39 @@ Lorsque les menus sont gérés par des références *MenuRef*, il n'y a pas de d `Créer un menu` permet de créer des menus vides (à remplir à l'aide de l'option `APPEND MENU ITEM` ou `INSERT MENU ITEM`) ou des menus créés à partir de menus conçus dans l'éditeur de menus. ## Ajouter des lignes - Pour chacun des menus, vous devez ajouter les commandes qui apparaissent lorsque le menu est déroulé. Vous pouvez insérer des lignes qui seront associées à des méthodes ou à des actions standard, ou rattacher d’autres menus (sous-menus). ### A l'aide de l'éditeur de menus - Pour ajouter une ligne de menu : 1. Dans la liste des menus source, sélectionnez le menu auquel vous souhaitez ajouter une commande. Si le menu contient déjà des commandes, elles seront affichées dans la liste centrale. Si vous souhaitez insérer la nouvelle commande, sélectionnez celle que vous souhaitez voir apparaître ci-dessus. Il est toujours possible de réorganiser le menu ultérieurement par glisser-déposer. 2. Choisissez **Add an item to menu “MenuNameâ€** dans le menu d'options de l'éditeur ou depuis le menu contextuel (clic droit dans la liste centrale). OU Cliquez sur le bouton Ajouter ![](assets/en/Menus/PlussNew.png) situé sous la liste centrale. 4D ajoute une nouvelle ligne avec le nom par défaut “Ligne Xâ€, où X représente le nombre de lignes déjà créées. 3. Double-cliquez sur le nom de la commande pour passer en mode édition et saisissez un nom personnalisé. OU Saisissez le nom personnalisé dans la zone “Titreâ€. Il peut comporter jusqu’à 31 caractères. Vous pouvez saisir le nom comme "en dur" ou saisir une référence (voir ci-dessous). + ### A l'aide du langage 4D Utilisez `INSERT MENU ITEM` ou `APPEND MENU ITEM` pour insérer ou ajouter des lignes de menu dans les références de menu existantes. + ## Supprimer des menus et des lignes de menus ### A l'aide de l'éditeur de menus - Vous pouvez supprimer une barre de menus, un menu ou une ligne de menu à tout moment. A noter qu’il n’existe qu’une seule référence d’un menu ou barre de menus. Lorsqu’un menu est rattaché à différentes barres ou différents menus, toute modification ou suppression effectuée dans ce menu est immédiatement reportée dans toutes les instances de ce menu. Supprimer un menu supprimera uniquement une référence. Lorsque vous supprimez la dernière référence d'un menu, 4D affiche une alerte. Pour supprimer une barre de menus, un menu ou une ligne de menu, vous disposez de deux possibilités : - Sélectionner l’élément à supprimer et de cliquer sur le bouton de suppression ![](assets/en/Menus/MinussNew.png) situé sous la liste. -- Ou, utiliser les commandes **Supprimer la barre de menus** ou **Supprimer le menu** dans le menu contextuel ou le menu d’options de l’éditeur. +- ou, utiliser la commande **Supprimer ...** dans le menu contextuel ou le menu d’options de l’éditeur. > Il est impossible de supprimer Menu Bar #1. + ### A l'aide du langage 4D Utilisez la commandes `SUPPRIMER LIGNE DE MENU` pour supprimer une ligne de la barre de menus. Utilisez la commande `EFFACER MENU` pour ne pas charger le menu de la mémoire. + ## Rattacher des menus Une fois que vous avez créé un menu, vous pouvez le rattacher à une ou plusieurs barres de menus ou à un ou plusieurs autres menus (sous-menus). @@ -84,13 +85,14 @@ Vous pouvez créer des sous-menus de sous-menus sur une profondeur virtuellement A l'exécution, si un menu rattaché est modifié par programmation, toute autre élément du menu reflétera ces modifications. + ### A l'aide de l'éditeur de menus Un menu peut être attaché à une barre de menus ou à un autre menu. - Pour rattacher un menu à une barre de menus : faites un clic droit sur la barre de menus et sélectionnez **Attach a menu to the menu bar "nom de la barre"**, puis choisissez le menu à rattacher à la barre de menus : ![](assets/en/Menus/attach.png) Vous pouvez également sélectionner une barre de menus puis cliquez sur le bouton des options situé sous la liste. - Pour rattacher un menu à un autre menu : sélectionnez le menu dans la partie gauche puis faites un clic droit sur la ligne de menus et sélectionnez **Attach a menu to the menu bar "nom de la barre"**, puis choisissez le menu à utiliser comme sous-menu : - ![](assets/en/Menus/attach2.png) Vous pouvez également sélectionner une ligne de menus puis cliquez sur le bouton des options situé sous la liste. Le menu que vous êtes en train de rattacher deviendra un sous-menu. Le titre de la ligne est maintenu (le nom initial du sous-menu est ignoré), mais il peut être modifié. + ![](assets/en/Menus/attach2.png) Vous pouvez également sélectionner une ligne de menus puis cliquez sur le bouton des options situé sous la liste. Le menu que vous êtes en train de rattacher deviendra un sous-menu. Le titre de la ligne est maintenu (le nom initial du sous-menu est ignoré), mais il peut être modifié. #### Détacher des menus @@ -100,4 +102,4 @@ Pour détacher un menu, cliquez avec le bouton droit dans la liste centrale sur ### A l'aide du langage 4D -Etant donné qu'il n'y a pas de différence entre les menus et les barres de menus dans le langage de 4D, rattacher des menus ou des sous-menus se fait de la même manière : utilisez le paramètre *sous-menu* de la commande `APPEND MENU ITEM` pour rattacher un menu à une barre de menu ou à un autre menu. \ No newline at end of file +Etant donné qu'il n'y a pas de différence entre les menus et les barres de menus dans le langage de 4D, rattacher des menus ou des sous-menus se fait de la même manière : utilisez le paramètre *sous-menu* de la commande `APPEND MENU ITEM` pour rattacher un menu à une barre de menu ou à un autre menu. diff --git a/website/translated_docs/fr/Menus/overview.md b/website/translated_docs/fr/Menus/overview.md index 9f0810f2d2f2af..83821460ef9e4d 100644 --- a/website/translated_docs/fr/Menus/overview.md +++ b/website/translated_docs/fr/Menus/overview.md @@ -3,18 +3,17 @@ id: overview title: Aperçu --- -4D vous permet de créer des barres de menus et des menus pour vos bases de données et vos applications personnalisées. Comme les menus sont une fonctionnalité standard de toute application, leur présence dans votre base facilite son utilisation. +You can create menu bars and menus for your 4D applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your applications easier to use and will make them feel familiar to users. ![](assets/en/Menus/menubar.png) Une **barre de menus** est un groupe de menus qui peuvent être affichés dans le même écran. Chaque **menu** d’une barre de menus peut posséder plusieurs commandes dont certaines peuvent faire appel à des sous-menus en cascade (on parle alors de sous-menus hiérarchiques). Lorsque l’utilisateur choisit une commande de menu ou de sous-menu, il appelle une méthode projet ou une action standard qui réalise une opération. -Vous pouvez disposer de différentes barres de menus dans la même base de données. Par exemple, vous pouvez utiliser une barre de menus pour les opérations standard de votre base de données et une autre qui n’est active que pour la réalisation d’états. Une barre de menus peut contenir des commandes destinées à la saisie d’enregistrements. La barre de menus qui apparaît avec le formulaire de saisie peut contenir le même menu, mais ses commandes peuvent être désactivées car inutiles pour la saisie dans le formulaire. +You can have many separate menu bars for each application. For example, you can use one menu bar that contains menus for standard operations on the database and another that becomes active only for reporting. Une barre de menus peut contenir des commandes destinées à la saisie d’enregistrements. La barre de menus qui apparaît avec le formulaire de saisie peut contenir le même menu, mais ses commandes peuvent être désactivées car inutiles pour la saisie dans le formulaire. Vous pouvez utiliser le même menu dans plusieurs barres de menus et menus, ou ne pas l’attacher et le gérer uniquement par programmation (on parle dans ce cas de menu indépendant). Lorsque vous créez des menus, il est utile de garder à l’esprit les deux règles suivantes : - - N’utilisez les menus que pour des tâches qui leurs sont adaptées : Les commandes de menus doivent réaliser des tâches telles que l’ajout d’un enregistrement, les recherches ou les impressions. - Groupez les commandes de menus par fonctions : l’utilisateur doit pouvoir être capable de s’orienter dans un ordre logique de menus. Par exemple, toutes les commandes de menu qui permettent de naviguer dans la base doivent être placées dans le même menu. @@ -24,12 +23,12 @@ Pour créer des menus et des barres de menus, vous pouvez utiliser soit : - les commandes du langage, - un mélange des deux. -## Éditeur de menus +## Éditeur de menus L’éditeur de menus est accessible via le bouton **Menus** de la Boîte à outils. ![](assets/en/Menus/editor1.png) Les barres de menus et les menus sont affichés sous forme de deux éléments d’une même liste hiérarchique, dans la partie gauche de la fenêtre. Chaque menu peut être attaché à une barre de menus ou à un autre menu. Dans le deuxième cas, le menu devient un sous-menu. -4D affecte des numéros de barre de menus séquentiellement -- Menu Bar #1 apparait en premier. Vous pouvez renommer des barres de menu mais vous ne pouvez pas modifier leur numéro. Ces derniers sont utilisés par les commandes du langage. \ No newline at end of file +4D affecte des numéros de barre de menus séquentiellement -- Menu Bar #1 apparait en premier. Vous pouvez renommer des barres de menu mais vous ne pouvez pas modifier leur numéro. Ces derniers sont utilisés par les commandes du langage. diff --git a/website/translated_docs/fr/Menus/properties.md b/website/translated_docs/fr/Menus/properties.md index 910eb4afb29155..fd7236674ee2ff 100644 --- a/website/translated_docs/fr/Menus/properties.md +++ b/website/translated_docs/fr/Menus/properties.md @@ -5,6 +5,7 @@ title: Propriétés des menus Vous pouvez définir plusieurs propriétés à partir des lignes de menu, telles que des actions, des styles de police, les lignes de séparation, des raccourcis clavier ou des icônes. + ## Titre de menu La propriété **Title** contient le libellé d'un menu ou d'une ligne de menu, tel qu'il sera affiché dans l'interface de l'application. @@ -18,7 +19,7 @@ En utilisant le langage 4D, vous définissez la propriété Title à l'aide du p ### Caractères de contrôle -Il est possible de définir les propriétés des lignes de menus en insérant des caractères de contrôle (“métacaractèresâ€) directement dans les libellés des commandes de menus. Cette possibilité est utile pour la création de menus par programmation. Par exemple, vous pouvez associer le raccourci-clavier Ctrl+G (ou Commande+G sous macOS) à une ligne de menu en plaçant les caractères "/G" dans son libellé. +Il est possible de définir les propriétés des lignes de menus en insérant des caractères de contrôle (“métacaractèresâ€) directement dans les libellés des commandes de menus. Cette possibilité est utile pour la création de menus par programmation. Par exemple, vous pouvez associer le raccourci-clavier Ctrl+G (ou Commande+G sous macOS) à une ligne de menu en plaçant les caractères "/G" dans son libellé. Les caractères de contrôle n’apparaissent pas dans les libellés des commandes de menus. Vous devez donc les éviter afin de ne pas obtenir d’effets indésirables. Ces caractères sont les suivants : @@ -32,6 +33,7 @@ Les caractères de contrôle n’apparaissent pas dans les libellés des command | /+caractère | slash+caractère | Ajouter un caractère comme raccourci | + ## Paramètres Il est possible d’associer un paramètre personnalisé à chaque ligne de menu. Un paramètre de ligne de menu est une chaîne de caractères dont le contenu est libre. Il peut être défini dans l'éditeur de menu ou à l'aide de la commande `SET MENU ITEM PARAMETER`. @@ -44,7 +46,7 @@ Chaque commande de menu peut avoir une méthode projet ou une action standard qu Si aucune méthode ou action standard n'est affectée à une commande de menu, le choix de cette commande provoquera la fermeture du mode Application et l'ouverture du mode Développement. Si seul le mode Application est disponible, ce qui signifie un retour au Desktop. -Les actions standard peuvent être utilisées pour effectuer des opérations associées aux fonctions système (copier, quitter, etc.) ou aux fonctions de la base 4D (nouvel enregistrement, tout sélectionner, etc.). +Standard actions can be used to carry out various current operations linked to system functions (copy, quit, etc.) or to those of the database (add record, select all, etc.). Vous pouvez associer à la fois une action standard et une méthode projet à une commande de menu. Dans ce cas, l’action standard n’est jamais exécutée ; toutefois, 4D utilise cette action pour activer/inactiver la commande de menu en fonction du contexte et pour associer une opération spécifique en fonction de la plateforme. Lorsqu’une commande de menu est inactivée, la méthode projet associée ne peut être exécutée. @@ -53,14 +55,12 @@ Vous choisissez d’associer une action standard ou une méthode projet à la co ### Associer une méthode projet ou une action standard Pour associer une méthode projet et/ou une action standard à une commande de menu sélectionnée dans l'éditeur de menu : - - **Nom de la méthode** : sélectionnez une méthode projet existante dans la combo box. Si la méthode projet n’existe pas, saisissez son nom dans la combo box “Nom de la méthode†puis cliquez sur le bouton [...]. 4D affiche la boîte de dialogue de création de méthode projet, vous permettant d’accéder à l’éditeur de méthodes. - **Action standard associée** : Choisissez ou saisissez le nom de l’action que vous souhaitez associer dans la combo box "Action standard associée". Vous pouvez saisir toute action prise en charge et (optionnellement) tout paramètre dans la zone. Pour la liste complète des actions standard, veuillez vous reporter à la section **Actions standard** dans le *Mode Développement*. **Note macOS :** Sous macOS, les commandes de menus créés associées à l'action *Quitter* sont automatiquement placées dans le menu de l’application, conformément aux normes d’interface de cette plate-forme. A l'aide du langage 4D, vous pouvez associer une méthode projet via la commande `SET MENU ITEM METHOD` et une action standard via la commande `SET MENU ITEM PROPERTY`. ### Démarrer un process - L'option **Démarrer un nouveau process** est disponible pour les commandes de menu associées à des méthodes. Elle peut être définie via une case à cocher dans l'éditeur de menus, ou via le paramètre *property* de la commande `SET MENU ITEM PROPERTY`. Lorsque l'option **Démarrer un nouveau process** est activée, un nouveau process est créé lorsque la commande de menu est choisie. Normalement, une méthode associée à une commande de menu est exécutée dans le process courant, à moins que vous n'appeliez explicitement un autre process dans votre code. La case à cocher **Démarrer un nouveau process** facilite le lancement d'un nouveau process. Si vous la sélectionnez, 4D créera un nouveau process lorsque la commande de menu sera sélectionnée. @@ -68,11 +68,11 @@ Lorsque l'option **Démarrer un nouveau process** est activée, un nouveau proce Dans la liste des process, 4D affecte au nouveau process un nom par défaut “ML_NumeroProcessâ€. Les noms des process lancés à partir d’une ligne de menu sont créés en combinant le préfixe “ML_†avec le numéro de process. ### Exécuter sans valider - L'option **Exécuter sans valider** est disponible pour les commandes de menu associées à des actions standard uniquement dans l'éditeur de menus. Lorsque cette option est cochée, 4D ne provoquera pas la “validation†du champ dans lequel se trouve le curseur avant d’exécuter l’action associée. Cette option est principalement destinée aux commandes du menu **Edition**. Par défaut, 4D traite et “valide†le contenu d’un champ avant d’exécuter une action standard (via une commande de menu ou un raccourci-clavier), ce qui a pour effet de générer un événement formulaire `Sur données modifiées`. Ce principe peut gêner le fonctionnement des commandes du type copier ou coller, car au moment de leur appel, l’événement `Sur données modifiées` est généré de manière inopinée. Dans ce cas, il est utile de cocher l’option **Exécuter sans valider**. + ## Privilèges d'accès à distance Cette option de l'éditeur de menus permet de définir un groupe pour une commande de menu afin que seuls les utilisateurs de ce groupe puissent utiliser la commande de menu depuis un 4D distant (voir Utilisateurs et groupes). @@ -91,6 +91,7 @@ Dans l'éditeur de menus, au lieu de saisir le nom de la commande de menu, il su Dans le langage 4D, vous insérez une ligne de séparation en saisissant `-` ou `(-` comme itemText pour les commandes `APPEND MENU ITEM`, `INSERT MENU ITEM`, ou `SET MENU ITEM`. + ### Raccourcis clavier Vous pouvez affecter des raccourcis clavier à toute commande de menu. Lorsqu’une commande de menu se voit affecter un raccourci clavier, il s’affiche en face de son libellé. Par exemple, “Ctrl+C†(Windows) ou “Commande+C†(macOS) apparaît en face de la commande de menu **Copier** dans le menu **Edition**. @@ -98,13 +99,12 @@ Vous pouvez affecter des raccourcis clavier à toute commande de menu. Lorsqu’ Vous pouvez également ajouter les touches **Majuscule** ainsi que **Alt** (Windows) ou **Option** (macOS) au raccourci clavier associé à une commande. Cette possibilité multiplie le nombre de raccourcis clavier utilisables dans les barres de menus. Les raccourcis clavier définis peuvent donc être de différents types : - Sous Windows : - - Ctrl+lettre - Ctrl+Maj+lettre - Ctrl+Alt+lettre - Ctrl+Maj+Alt+lettre + - Sous macOS : - - Commande+lettre - Commande+Maj+lettre - Commande+Option+lettre @@ -112,7 +112,7 @@ Vous pouvez également ajouter les touches **Majuscule** ainsi que **Alt** (Wind > Lorsque vous utilisez des actions standard, il est conseillé de conserver les raccourcis clavier qui leur sont associés par défaut. -Vous pouvez utiliser toute touche alphanumérique comme raccourci clavier, hormis celles qui sont utilisées par les commandes de menus standard ou par 4D. +Vous pouvez utiliser toute touche alphanumérique comme raccourci clavier, hormis celles qui sont utilisées par les commandes de menus standard qui apparaissent dans les menus **Editer** et **Fichier**, et les clés réservées aux commandes de menu 4D. Les combinaisons réservées sont décrites dans le tableau suivant : @@ -125,7 +125,6 @@ Les combinaisons réservées sont décrites dans le tableau suivant : | Ctrl+Z | Commande+Z | Annuler | | Ctrl+. (point) | Commande+. (point) | Arrêter action en cours | - Pour affecter un raccourci clavier dans l'éditeur de menus : Sélectionnez la ligne de menu à laquelle vous souhaitez affecter un raccourci clavier. Cliquez sur le bouton [...] à droite de la zone “Raccourci clavierâ€. La fenêtre suivante apparaît : @@ -140,11 +139,13 @@ Pour affecter un raccourci clavier à l'aide du langage 4D, utilisez la commande > Un objet actif peut aussi avoir un raccourci clavier. Si la touche **Ctrl/Commande** est sujette à un conflit, l’objet actif sera prioritaire. + ### Ligne active Dans l'éditeur de menus, vous pouvez spécifier si une ligne est activée ou désactivée. Une commande de menu activée peut être choisie par l’utilisateur ; une commande de menu désactivée est grisée et ne peut pas être choisie. Pour désactiver une ligne de menu, désélectionnez l’option **Ligne active**. Dans ce cas, la ligne apparaît grisée dans le menu et ne peut pas être sélectionnée. -Par défaut, 4D active automatiquement toute commande de menu ajoutée à un menu personnalisé. Vous pouvez désactiver une commande afin, par exemple, de l’activer uniquement par programmation (commandes `ENABLE MENU ITEM` et `DISABLE MENU ITEM`). +Par défaut, 4D active automatiquement toute commande de menu ajoutée à un menu personnalisé. Vous pouvez désactiver une commande afin, par exemple, de l’activer uniquement par programmation (commandes `ENABLE MENU ITEM` et `DISABLE MENU ITEM`). + ### Coche @@ -157,7 +158,6 @@ Les coches sont généralement utilisées pour des menus à action permanente et 4D vous permet de personnaliser les menus en appliquant différents styles de caractères aux commandes de menus. Vous pouvez personnaliser vos menus avec les styles Gras, Italique ou Souligné, ou à l'aide de la commande `SET MENU ITEM STYLE`. En règle générale, les styles de police doivent être appliqués à vos menus avec parcimonie, afin d’éviter de conférer une apparence confuse à votre application. - > Vous pouvez également appliquer un style en saisissant des caractères spéciaux dans le titre du menu (voir ci-dessus).

        > > ### Icône ligne @@ -166,10 +166,10 @@ En règle générale, les styles de police doivent être appliqués à vos menus > > ![](assets/en/Menus/iconMenu.png) > -> Pour définir l’icône dans l'éditeur de menu, choisissez l'option **Ouvrir** pour ouvrir un fichier image à partir du disque. Lorsque vous sélectionnez un fichier image qui n'est pas stocké dans le dossier Resources de la base, il est automatiquement copié dans ce dossier. Une fois définie, l’icône de ligne apparaît dans la zone d’aperçu : +> Pour définir l’icône dans l'éditeur de menu, choisissez l'option **Ouvrir** pour ouvrir un fichier image à partir du disque. If you select a picture file that is not already stored in the project resources folder, it is automatically copied in that folder. Une fois définie, l’icône de ligne apparaît dans la zone d’aperçu : > > ![](assets/en/Menus/iconpreview.png) > > Pour supprimer l’icône de ligne, choisissez l’option **Pas d’icône** dans le menu de la zone “Icône ligneâ€. > -> Pour définir ds icônes de ligne à l'aide du langage 4D, appelez la commande `SET MENU ITEM ICON`. \ No newline at end of file +> Pour définir ds icônes de ligne à l'aide du langage 4D, appelez la commande `SET MENU ITEM ICON`. \ No newline at end of file diff --git a/website/translated_docs/fr/Menus/sdi.md b/website/translated_docs/fr/Menus/sdi.md index 8fb8aad551e6c8..e4651d7ae08074 100644 --- a/website/translated_docs/fr/Menus/sdi.md +++ b/website/translated_docs/fr/Menus/sdi.md @@ -3,13 +3,12 @@ id: sdi title: Mode SDI sous Windows --- -## Aperçu Sous Windows, les Développeurs 4D peuvent configurer leurs applications fusionnées pour qu'elles fonctionnent en tant qu'applications SDI (Single-Document Interface). Dans les applications SDI, chaque fenêtre est indépendante des autres et peut avoir sa propre barre de menus. Les applications SDI sont opposées aux applications MDI (Multiple Documents Interface), où toutes les fenêtres sont contenues dans une fenêtre principale, et en dépendent. > Le concept SDI/MDI n'existe pas sur macOS. Cette fonctionnalité concerne uniquement des applications Windows, et les options s'y référant sont ignorées sous macOS. -### Disponibilité du mode SDI +## Disponibilité du mode SDI Le mode SDI est disponible uniquement dans l'environnement d'exécution suivant : @@ -20,7 +19,7 @@ Le mode SDI est disponible uniquement dans l'environnement d'exécution suivant L'activation et l'utilisation du mode SDI dans votre application requiert les étapes suivantes : -1. Cochez l'option **Utiliser le mode SDI sous Windows** dans la page "Interface" de la boîte de dialogue des Propriétés de la base. +1. Check the **Use SDI mode on Windows** option in the "Interface" page of the Settings dialog box. 2. Générez une application exécutable (monoposte et/ou application cliente). Par la suite, lorsqu'elle sera exécutée dans le contexte adéquat (voir ci-dessus), l'application fusionnée fonctionnera automatiquement en mode SDI. @@ -41,7 +40,7 @@ Les fenêtres peuvent donc être utilisées dans les modes MDI ou SDI sans avoir #### A propos de la fenêtre d'accueil -- Si l'option **Afficher fenêtres : Accueil** de la page "Interface" a été sélectionnée pour la base de données, la fenêtre d'accueil contiendra les menus qui auraient été affichés dans la fenêtre MDI. Notez également que la fermeture de la fenêtre d'accueil entraînera la sortie de l'application, tout comme dans le mode MDI. +- If the **Splash screen** interface option was selected in the Settings, the splash window will contain any menus that would have been displayed in the MDI window. Notez également que la fermeture de la fenêtre d'accueil entraînera la sortie de l'application, tout comme dans le mode MDI. - Si l'option Accueil n'a pas été cochée dans la base de données, les menus seront affichés uniquement dans les fenêtres ouvertes, selon les choix du Développeur. ### Arrêt automatique @@ -70,4 +69,4 @@ Bien qu'il soit traité de manière transparente par 4D, le mode SDI introduit d | `CONVERT COORDINATES` | `XY Screen` est le système de coordonnées global dans lequel l'écran principal est positionné à (0,0). Les écrans à gauche ou au-dessus de lui peuvent avoir des valeurs de coordonnées négatives et les écrans à droite ou au-dessous de lui peuvent avoir des valeurs de coordonnées supérieures à celles retournées par `Screen height` ou `Screen width`. | | `GET MOUSE` | Les coordonnées globales sont relatives à l'écran | | `GET WINDOW RECT` | Lorsque -1 est passé dans le paramètre fenêtre, la commande retourne 0;0;0;0 | -| `On Drop database method` | Non supporté | \ No newline at end of file +| `On Drop database method` | Non supporté | diff --git a/website/translated_docs/fr/Notes/updates.md b/website/translated_docs/fr/Notes/updates.md new file mode 100644 index 00000000000000..9f9718e4467cbb --- /dev/null +++ b/website/translated_docs/fr/Notes/updates.md @@ -0,0 +1,35 @@ +--- +id: updates +title: Documentation updates +--- + +The list of main updates in this documentation. For general information about new features in the 4D products, see the **release notes** on [doc.4d.com](https://doc.4d.com). + +## 4D v19 R2 + +- A [default .gitignore file](Preferences/general.md#create-gitignore-file) can be created with new projects +- Nouvelle [API Blob class](API/BlobClass.md) pour gérer de nouveaux objets [`4D.Blob`](Concepts/dt_blob.md#blob-types) +- `no-bom` support and new default end-of-line characters in [`.setText()`](API/FileClass.md#settext) + + +## 4D v19 + +- [IMAPTransporter Class](API/IMAPTransporterClass.md): new `.createBox()`, `.deleteBox()`, `.renameBox()`, `.subscribe()`, and `.unsubscribe()` functions. +- [File Class](API/FileClass.md): new `setAppInfo()` and `getAppInfo()` functions. +- New [4DEACH](Tags/tags.md#4deach-and-4dendeach) transformation tag. +- Web Server: new [SameSite session cookie](WebServer/webServerConfig.md#session-cookie-samesite) setting. +- Dark and light color scheme support for [forms](FormEditor/properties_FormProperties.md#color-scheme) and [style sheets](FormEditor/createStylesheet.md#media-queries) +- New default dark and light themes in [method editor preferences](Preferences/methods.md#theme-list). +- [Native compilation](Project/compiler.md#compiler-methods-for) for Silicon processors. +- [Variable calculation](FormObjects/properties_Object.md#variable-calculation) property is now supported by entity selection list box columns. +- New, comprehensive [CLI](Admin/cli.md) page. + + +## 4D v18 R6 + +- [Entity Selection Class](API/EntitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/IMAPTransporterClass.md), [POP3 Mail](API/POP3TransporterClass.md) and [SMTP Mail](API/SMTPTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/IMAPTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/SessionClass.md). diff --git a/website/translated_docs/fr/ORDA/datastores.md b/website/translated_docs/fr/ORDA/datastores.md new file mode 100644 index 00000000000000..94c64792aec8e9 --- /dev/null +++ b/website/translated_docs/fr/ORDA/datastores.md @@ -0,0 +1,56 @@ +--- +id: datastores +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). \ No newline at end of file diff --git a/website/translated_docs/fr/ORDA/dsMapping.md b/website/translated_docs/fr/ORDA/dsMapping.md new file mode 100644 index 00000000000000..9c757417cc5d4c --- /dev/null +++ b/website/translated_docs/fr/ORDA/dsMapping.md @@ -0,0 +1,257 @@ +--- +id: dsmapping +title: Data Model Objects +--- + +The ORDA technology is based upon an automatic mapping of an underlying database structure. Elle permet également d'accéder aux données via des objets sélection d'entités (entity selection) et entité (entity). Par conséquent, ORDA expose la base de données entière comme un ensemble d'objets de modèle de données. + + +## Cartographie de la structure + +When you call a datastore using the [`ds`](API/DataStoreClass.md#ds) or the [`Open datastore`](API/DataStoreClass.md#open-datastore) command, 4D automatically references tables and fields of the corresponding 4D structure as properties of the returned [datastore](#datastore) object: + +* Les tables sont mappées aux classes de données (dataclasses). +* Les champs sont mappés aux attributs de stockage. +* Les relations sont mappées aux attributs de relation - les noms de relation, définis dans l'éditeur de structure, sont utilisés comme noms d'attribut de relation. + +![](assets/en/ORDA/datastoreMapping.png) + + +### Règles générales + +Les règles suivantes s'appliquent à toutes les conversions : + +* Les noms de table, de champ et de relation sont mappés aux noms de propriété d'objet. Assurez-vous que ces noms sont conformes aux règles générales de dénomination des objets, comme expliqué dans la section [Conventions de dénomination des objets](Concepts/identifiers.md). +* Un datastore ne référence que les tables avec une seule clé primaire. Les tables suivantes ne sont pas référencées : + * Tables sans clé primaire + * Tables avec clés primaires composites. +* BLOB fields are automatically available as attributes of the [Blob object](Concepts/dt_blob.md#blob-types) type. + +> ORDA mapping does not take into account: +> - the "Invisible" option for tables or fields, - the virtual structure defined through `SET TABLE TITLES` or `SET FIELD TITLES`, - the "Manual" or "Automatic" property of relations. + + +### Règles de contrôle d'accès à distance + +Lorsque vous accédez à un datastore distant via la commande `Ouvrir datastore` ou des [requêtes REST](REST/gettingStarted.md), seules les tables et les champs avec la propriété de ressource **Expose as REST resource** sont disponibles à distance. + +Cette option doit être choisie au niveau de la structure 4D pour chaque table et chaque champ que vous souhaitez voir apparaître comme dataclass et attribut dans le datastore : + +![](assets/en/ORDA/ExposeDataclass.png) + + +### Mise à jour des données + +Toute modification apportée à la structure de la base invalide la couche courante de données ORDA. Ces modifications incluent : + +* l'ajout ou la suppression d'une table, d'un champ ou d'une relation +* le renommage d'une table, d'un champ ou d'une relation +* la modification d'une propriété principale d'un champ (type, unique, index, autoincrement, valeur null) + +Lorsque la couche courante de données ORDA est invalidée, elle est automatiquement rechargée et mise à jour dans les prochains appels du datastore local `ds` vers 4D et 4D Server. A noter que les références existantes vers des objets ORDA tels que des entités ou des sélections d'entités continueront d'utiliser les données à partir desquelles elles ont été créées, et ce jusqu'à ce qu'elles soient regénérées. + +Toutefois, la couche de données ORDA mise à jour n'est pas automatiquement disponible dans les contextes suivants : + +* une application 4D distante connectée à 4D Server -- l'application distante doit être reconnectée au serveur. +* un datastore distant ouvert à l'aide de `Ouvrir datastore` ou des [appels REST](REST/gettingStarted.md) -- une nouvelle session doit être ouverte. + + +## Définitions des objets + +### Datastore + +Un datastore est l'objet d'interface d'une base de données. Il crée une représentation de toute la base sous forme d'objet. Un datastore est constitué d'un **modèle** et à de **données** : + +- Le modèle contient et décrit toutes les dataclasses qui composent le datastore. Il est indépendant de la base de données sous-jacente. +- Les données se réfèrent à l'information qui va être utilisée et stockée dans ce modèle. Par exemple, les noms, adresses et dates de naissance des employés sont des éléments de données que vous pouvez utiliser dans un datastore. + +Lorsqu'il est géré via le code, le datastore est un objet dont les propriétés sont toutes les [dataclasses](#dataclass) ayant été spécifiquement exposées. + +4d vous permet de gérer les datastores suivants : + +- le datastore local, fondé sur la base 4D courante, retourné par la commande `ds` (le datastore principal). +- un ou plusieurs datastores distants, exposés en tant que ressources RESET dans des bases 4D distantes, retournés par la commande `Ouvrir datastore`. + +Un datastore ne référence qu'une seule base de données locale ou distante. + +L'objet datastore lui-même ne peut pas être copié en tant qu'objet : + +```4d +$mydatastore:=OB Copy(ds) //retourne null +``` + + +Les propriétés du datastore sont toutefois énumérables : + + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds;$prop) + //$prop contient les noms de toutes les dataclasses +``` + + + +Le datastore principal (par défaut) est toujours disponible via la commande `ds`, mais la commande `Ouvrir datastore` permet de référencer n'importe quel datastore distant. + +### Dataclass + +Une dataclasse est l'équivalent d'une table. Elle est utilisée comme modèle d'objet et référence tous les champs comme attributs, y compris les attributs relationnels (attributs construits à partir des relations entre les dataclasses). Les attributs relationnels peuvent être utilisés dans les requêtes comme tout autre attribut. + +Toutes les dataclasses d'un projet 4D sont disponibles en tant que propriété du datastore `ds`. Pour les datastores distants accédés via `Ouvrir datastore` ou les [requêtes REST](REST/gettingStarted.md), l'option **Exposer comme ressource REST** doit être sélectionnée au niveau de la structure 4D pour chaque table que vous souhaitez exposer en tant que dataclass du datastore. + +Par exemple, considérons cette table dans la structure suivante : + +![](assets/en/ORDA/companyTable.png) + +La table `Company` est automatiquement disponible en tant que dataclasse dans la banque de données `ds`. Vous pouvez écrire : + +```4d +var $compClass : cs.Company //déclare une variable objet $compClass de la classe Company +$compClass:=ds.Company //affecte la référence de dataclasse Company à $compClass +``` + +Un objet dataclass peut contenir : + +* attributes +* des attributs relationnels + +La dataclass offre une abstraction de la base de données physique et permet de gérer un modèle de données conceptuel. La dataclass est le seul moyen d'interroger le datastore. Une requête est effectuée à partir d'une seule dataclass. Les requêtes sont construites autour des attributs et des noms d'attributs relationnels des dataclasses. Les attributs relationnels sont ainsi les moyens d'impliquer plusieurs tables liées dans une requête. + +L'objet dataclass lui-même ne peut pas être copié en tant qu'objet : + +```4d +$mydataclass:=OB Copy(ds.Employee) //retourne null +``` + +Les propriétés de la dataclass sont toutefois énumérables : + +```code4d +ARRAY TEXT($prop;0) +OB GET PROPERTY NAMES(ds.Employee;$prop) +//$prop contains the names of all the dataclass attributes +``` + + +### Attribut + +Les propriétés de dataclass sont des objets attribut décrivant les champs ou relations sous-jacents. Par exemple : + +```4d + $nameAttribute:=ds.Company.name //référence à un attribut de classe + $revenuesAttribute:=ds.Company["revenues"] //méthode alternative +``` + +Ce code attribue à `$nameAttribute` et `$revenuesAttribute` des références aux attributs name et revenues de la classe `Company`. Cette syntaxe ne retourne PAS les valeurs contenues dans l'attribut, mais retourne plutôt des références aux attributs eux-mêmes. Pour gérer les valeurs, vous devez passer par les [Entités](#entity). + +All eligible fields in a table are available as attributes of their parent [dataclass](#dataclass). Pour les datastores distants accédés via `Ouvrir datastore` ou les [requêtes REST](REST/gettingStarted.md), l'option **Exposer comme ressource REST** doit être sélectionnée au niveau de la structure 4D pour chaque champ que vous souhaitez exposer en tant qu'attribut de dataclass. + + +#### Attributs de stockage et relationnels + +Les attributs de la Dataclass sont de plusieurs types : storage, relatedEntity et relatedEntities. Attributes that are scalar (*i.e.*, provide only a single value) support all the standard 4D data types (integer, text, object, etc.). + +* Un **attribut de stockage** (storage) est équivalent à un champ dans la base de données 4D et peut être indexé. Les valeurs affectées à un attribut de stockage sont stockées en tant que partie de l'entité lors de son enregistrement. Lorsqu'on accède à un attribut de stockage, sa valeur provient directement du datastore. Les attributs de stockage sont le bloc de construction le plus élémentaire d'une entité et sont définis par un nom et un type de données. +* Un **attribut relationnel** (relatedEntity et relatedEntities) donne accès à d'autres entités. Les attributs relationnels peuvent aboutir soit à une entité unique (ou à aucune entité), soit à une sélection d'entité (0 à N entités). Les attributs relationnels s'appuient sur les relations "classiques" dans la structure relationnelle pour fournir un accès direct à une entité ou à des entités reliées. Tous les attributs relationnels sont directement disponibles dans ORDA si vous utilisez leurs noms. + +Prenons l'exemple de la structure de base de données partielle suivante et les propriétés relationnelles : + +![](assets/en/ORDA/relationProperties.png) + +Tous les attributs relationnels seront disponibles automatiquement : + +* dans la dataclass Project : "ID", "name", et "companyID" +* dans la dataclass Company : "ID", "name", et "discount" + +En outre, les attributs relationnels suivant seront également disponibles automatiquement : + +* dans la dataclass Project : l'attribut **theClient**, du type "relatedEntity" ; il y a au plus une compagnie pour chaque projet (le client) +* dans la dataclass Company : l'attribut **companyProjects**, du type "relatedEntities" ; pour chaque compagnie, il existe un certain nombre de projets reliés. +> La propriété "Manuel" ou "Automatique" d'une relation dans la base de données n'a aucun effet dans ORDA. + +Tous les attributs de la dataclass sont exposés en tant que propriétés de la dataclass : + +![](assets/en/ORDA/dataclassProperties.png) + +Gardez à l'esprit que ces objets décrivent des attributs, mais ne donnent pas accès aux données. La lecture ou l'écriture des données se fait à travers des [objets entité](entities.md#using-entity-attributes). + +#### Computed attributes + +[Computed attributes](ordaClasses.md#computed-attributes) are declared using a `get ` function in the [Entity class definition](ordaClasses.md#entity-class). Their value is not stored but evaluated each time they are accessed. They do not belong to the underlying database structure, but are built upon it and can be used as any attribute of the data model. + + +### Entity + +Une entité est l'équivalent d'un enregistrement. Il s'agit d'un objet qui fait référence à un enregistrement de la base de données. Elle peut être perçue comme une instance de la [dataclass](#dataclass), comme un enregistrement de la table correspondante à la dataclass. Toutefois, une entité contient également des données corrélées à la base de données liée au datastore. + +Le but de l'entité est de gérer les données (créer, mettre à jour, supprimer). Lorsqu'une référence d'entité est obtenue au moyen d'une sélection d'entité, elle conserve également des informations sur la sélection d'entité qui permet une itération à travers la sélection. + +L'objet entité lui-même ne peut pas être copié en tant qu'objet : + +```4d + $myentity:=OB Copy(ds.Employee.get(1)) //retourne null +``` + +Les propriétés de l'entité sont toutefois énumérables : + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.get(1);$prop) + //$prop contient les noms de tous les attributs de l'entité +``` + + +### Entity selection + +Une sélection d'entité est un objet contenant une ou plusieurs référence(s) à des entités appartenant à la même dataclasse. Elle est généralement créée à la suite d'une requête ou retournée à partir d'un attribut relationnel. Une sélection d'entité peut contenir 0, 1 ou X entités de la dataclasse - où X peut représenter le nombre total d'entités contenues dans la dataclasse. + +Exemple : + +```4d +var $e : cs.EmployeeSelection //déclare une variable objet $e de type de classe EmployeeSelection +$e:=ds.Employee.all() //assigne la référence de la sélection d'entité résultante à la variable $e +``` + +Les sélections d'entités peuvent être : + +- "partageables" or "non partageables", +- "triées" ou "non triées". + +Ces points sont décrits ci-dessous. + +L'objet sélection d'entités lui-même ne peut pas être copié en tant qu'objet : + +```4d + $myentitysel:=OB Copy(ds.Employee.all()) //retourne null +``` + +Les propriétés des sélections d'entités sont toutefois énumérables : + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.all();$prop) + //$prop contient les noms des propriétés des sélections d'entités + //("length", "00", "01"...) +``` + + +#### Sélections d'entités triées vs Sélections d'entités non-triées + +Pour des raisons d'optimisation, par défaut, 4D ORDA crée généralement des sélections d'entités non-ordonnées, sauf lorsque vous utilisez la méthode `orderBy( )` ou si vous utilisez les options appropriées. Dans cette documentation, sauf indication contraire, "sélection d'entités" fait généralement référence à une "sélection d'entités non-ordonnée". + +Les sélections d'entités ordonnées sont créées uniquement lorsque cela est nécessaire ou lorsqu'elles sont spécifiquement demandées à l'aide d'options, c'est-à-dire dans les cas suivants : + +* résultat d'un `orderBy( )` sur une sélection (de n'importe quel type) ou un `orderBy( )` sur une dataclass, +* résultat de la méthode `newSelection( )` avec l'option `dk keep ordered` + +Les sélections d'entités non-triées sont créées dans les cas suivants : + +* résultat d'un `query()` standard sur une sélection (de n'importe quel type) ou un `query()` sur une dataclass, +* résultat de la méthode `newSelection()` sans option, +* résultat de l'une des méthodes de comparaison, quel que soit le type de sélection saisi : `or()`, `and()`, `minus()`. +> Les sélections d'entités suivantes sont toujours **triées** : +> +> * sélections d'entités retournées par 4D Server vers un client distant +> * sélections d'entités fondées sur des datastores distants. + +Notez que lorsqu'une sélection d'entités ordonnée devient une sélection non-ordonnée, toute référence d'entité répétée est supprimée. diff --git a/website/translated_docs/fr/ORDA/entities.md b/website/translated_docs/fr/ORDA/entities.md new file mode 100644 index 00000000000000..508de1c9101278 --- /dev/null +++ b/website/translated_docs/fr/ORDA/entities.md @@ -0,0 +1,494 @@ +--- +id: entities +title: Travailler avec des données +--- + +Dans ORDA, vous accédez aux données via des [entités](dsMapping.md#entity) (entities) et des [sélections d'entités](dsMapping.md#entity-selection) (entity selections). Ces objets vous permettent de créer, mettre à jour, rechercher ou trier les données du datastore. + + +## Créer une entité + +Il existe deux façons de créer une nouvelle entité dans une dataclass : + +* Les entités étant des références à des enregistrements de base de données, vous pouvez créer des entités en créant des enregistrements en utilisant le langage 4D "classique", puis les référencer avec des méthodes ORDA telles que `entity.next()` ou `entitySelection.first()`. +* Vous pouvez également créer une entité à l'aide de la méthode `dataClass.new()`. + +Gardez à l'esprit que l'entité est créée uniquement en mémoire. Si vous souhaitez l'ajouter à la banque de données, vous devez appeler la méthode `entity.save ()`. + +Les attributs de l'entité sont directement disponibles en tant que propriétés de l'objet entité. Pour plus d'informations, reportez-vous à [Utilisation des attributs d'entité](#using-entity-attributes). + +Par exemple, nous voulons créer une nouvelle entité dans la dataclass "Employee" dans le datastore courant avec "John" et "Dupont" affectés aux attributs de prénom et de nom : + +```4d +var $myEntity : cs.EmployeeEntity +$myEntity:=ds.Employee.new() //Créer un nouvel objet de type entité +$myEntity.name:="Dupont" //assigner 'Dupont' à l'attribut 'name' +$myEntity.firstname:="John" //assigner 'John' à l'attribut 'firstname' +$myEntity.save() //sauvegarder l'entité +``` +> Une entité est définie uniquement dans le processus où elle a été créée. Vous ne pouvez pas, par exemple, stocker une référence à une entité dans une variable interprocess et l'utiliser dans un autre processus. + +## Entités et références + +Une entité contient une référence à un enregistrement 4D. Différentes entités peuvent référencer le même enregistrement 4D. De plus, comme une entité peut être stockée dans une variable objet 4D, différentes variables peuvent contenir une référence à la même entité. + +Si vous exécutez le code suivant : + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) //accéder à l'employé avec ID 1 + $e2:=$e1 + $e1.name:="Hammer" + //les variables $e1 et $e2 partagent la référence à la même entité + //$e2.name contient "Hammer" +``` + +Ceci est illustré par le graphique suivant : + +![](assets/en/ORDA/entityRef1.png) + +Maintenant, si vous exécutez : + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) + $e2:=ds.Employee.get(1) + $e1.name:="Hammer" + //la variable $e1 contient une référence vers une entité + //variable $e2 contient une autre référence vers une autre entité + //$e2.name contient "smith" +``` + +Ceci est illustré par le graphique suivant : + +![](assets/en/ORDA/entityRef2.png) + +A noter cependant que les entités font référence au même enregistrement. Dans tous les cas, si vous appelez la méthode `entity.save()`, l'enregistrement sera mis à jour (sauf en cas de conflit, voir [Verrouillage d'entité](#entity-locking)). + +De fait, `$e1` et `$e2` ne sont pas l'entité elle-même, mais une référence à l'entité. Cela signifie que vous pouvez la passer directement à n'importe quelle fonction ou méthode, et qu'elle agira comme un pointeur, et plus rapidement qu'un pointeur 4D. Par exemple : + +```4d + For each($entity;$selection) + do_Capitalize($entity) + End for each +``` + +Et la méthode est : + +```4d + $entity:=$1 + $name:=$entity.lastname + If(Not($name=Null)) + $name:=Uppercase(Substring($name;1;1))+Lowercase(Substring($name;2)) + End if + $entity.lastname:=$name +``` + +Vous pouvez gérer les entités comme n'importe quel autre objet dans 4D et passer leurs références directement en tant que [paramètres](Concepts/parameters.md). +> Avec les entités, il n'y a pas de notion de "enregistrement courant" comme dans le langage classique de 4D. Vous pouvez utiliser autant d'entités que nécessaire, en même temps. Il n'existe pas non plus de verrouillage automatique d'une entité (voir [Verrouillage d'une entité](#entity-locking)). Lorsqu'une entité est chargée, elle utilise le mécanisme de [Lazy loading](glossary.md#lazy-loading), ce qui signifie que seules les informations nécessaires sont chargées. Néanmoins, en mode client/serveur, l'entité peut être automatiquement chargée directement si nécessaire. + + +## Utilisation des attributs d'entités + +Les attributs d'entité stockent les données et mappent les champs correspondants dans la table correspondante. Les attributs d'entité du type de stockage peuvent être définis ou obtenus sous forme de propriétés simples de l'objet entité, tandis que l'entité de type **relatedEntity** ou **relatedEntities** renverra une entité ou une sélection d'entité. +> Pour plus d'informations sur le type d'attribut, reportez-vous au paragraphe [Attributs de stockage et de relation](dsMapping.md#storage-and-relation-attributes). + +Par exemple, pour définir un attribut de stockage : + +```4d + $entity:=ds.Employee.get(1) //get employee attribute with ID 1 + $name:=$entity.lastname //get the employee name, e.g. "Smith" + $entity.lastname:="Jones" //set the employee name + $entity.save() //save the modifications +``` + +> Database Blob fields ([scalar blobs](Concepts/blob.md) are automatically converted to and from blob object attributes ([`4D.Blob`](Concepts/blob.md)) when handled through ORDA. When saving a blob object attribute, keep in mind that, unlike blob object size which is only limited by the available memory, Blob field size is limited to 2GB. + +L'accès à un attribut associé dépend du type d'attribut. Par exemple, avec la structure suivante : + +![](assets/en/ORDA/entityAttributes.png) + +Vous pouvez accéder aux données via le ou les objets associé(s) : + +```4d + $entity:=ds.Project.all().first().theClient //récupérer l'entité Company associée au projet + $EntitySel:=ds.Company.all().first().companyProjects //récupère la sélection de projets pour l'entreprise(Company) +``` + +Notez que dans l'exemple ci-dessus, *theClient* et *companyProjects* sont des attributs de relation et représentent une relation directe entre les deux dataclasses. Cependant, les attributs de relation peuvent également être créés sur des chemins via des relations à plusieurs niveaux, y compris des références circulaires. Par exemple, considérons la structure suivante : + +![](assets/en/ORDA/entityAttributes2.png) + +Chaque employé peut être un manager et peut avoir un manager. Pour obtenir le manager du manager d'un employé, vous pouvez simplement écrire : + +```4d + $myEmp:=ds.Employee.get(50) + $manLev2:=$myEmp.manager.manager.lastname +``` + +## Assigner des valeurs aux attributs de relation + +Dans l'architecture ORDA, les attributs de relation contiennent directement des données liées aux entités : + +* Un attribut de relation de type N-> 1 (type **relatedEntity**) contient une entité +* Un attribut de relation de type 1-> N (type **relatedEntities**) contient une sélection d'entité + +Regardons la structure (simplifiée) suivante : + +![](assets/en/ORDA/entityAttributes3.png) + +Dans cet exemple, une entité de la dataclass "Employee" contient un objet de type Entité dans l'attribut "employer" (ou une valeur nulle). Une entité de la dataclass "Company" contient un objet de type EntitySelection dans l'attribut "staff" (ou une valeur nulle). +> Dans ORDA, la propriété Automatic ou Manual des relations ne produit aucun effet. + +Pour attribuer une valeur directement à l'attribut "employer", vous devez passer une entité existante de la dataclass "Company". Par exemple : + +```4d + $emp:=ds.Employee.new() // créer un employé + $emp.lastname:="Smith" // attribuer une valeur à un attribut + $emp.employer:=ds.Company.query("name =:1";"4D")[0] //attribuer une entité de "company" + $emp.save() +``` + +4D fournit une fonctionnalité supplémentaire pour saisir un attribut de relation pour une entité N liée à une entité "1": vous passez directement la clé primaire de l'entité "1" lors de l'attribution d'une valeur à l'attribut de relation. Pour que cela fonctionne, passez des données de type Numérique ou Texte (la valeur de la clé primaire) à l'attribut de relation. 4D se charge alors automatiquement de rechercher l'entité correspondante dans la dataclass. Par exemple : + +```4d + $emp:=ds.Employee.new() + $emp.lastname:="Wesson" + $emp.employer:=2 // attribuer une clé primaire à l'attribut relation + //4D recherche l'entreprise dont la clé primaire (dans ce cas, son ID) est 2 + //et l'attribue à l'employé + $emp.save() +``` + +Ceci est particulièrement utile lorsque vous importez un grand nombre de données à partir d'une base de données relationnelle. Ce type d'import contient généralement une colonne "ID", qui référence une clé primaire que vous pouvez ensuite affecter directement à un attribut de relation. + +Cela signifie également que vous pouvez attribuer des clés primaires dans les N entités sans que les entités correspondantes aient déjà été créées dans la 1e classe de datastore. Si vous affectez une clé primaire qui n'existe pas dans la classe de datastore associée, elle est néanmoins stockée et affectée par 4D dès que cette entité "1" est créée. + +Vous pouvez attribuer ou modifier la valeur d'un attribut d'entité associé "1" à partir de la dataclass "N" directement via l'attribut associé. Par exemple, si vous souhaitez modifier l'attribut de nom d'une entité "Company" associée d'une entité "Employee", vous pouvez écrire : + +```code4d + $emp:=ds.Employee.get(2) // charge l'entité Employee avec la clé primaire 2 + $emp.employer.name:="4D, Inc." //modifier l'attribut de nom de la société associée + $emp.employer.save() //sauvegarder l'attribut associé + //l'entité associée est mise à jour +``` + +## Créer une sélection d'entité (entity selection) + +Vous pouvez créer un objet de type [entity selection](dsMapping.md#entity-selection) comme suit : + +* Lancez une requête sur les entités [dans une dataclass](API/DataClassClass.md#query) ou dans une [sélection d'entités existante](API/EntitySelectionClass.md#query); +* Utilisez la fonction de dataclass [`.all()`](API/DataClassClass.md#all) pour sélectionner toutes les entités d'une dataclass; +* Utilisez la commande `Create entity selection` ou la fonction de dataclass [`.newSelection()`](API/DataClassClass.md#newselection) pour créer une sélection d'entités vide; +* Utilisez la fonction [`.copy()`](API/EntitySelectionClass.md#copy) pour dupliquer une sélection d'entités existante; +* Utilisez l'une des diverses fonctions de [Entity selection class](API/EntitySelectionClass.md) qui retourne une nouvelle sélection d'entité, telle que [`entitySelection.or()`](API/EntitySelectionClass.md#or); +* Utilisez un attribut de relation de type "related entities" ("entités liées") (voir ci-dessous). + +Vous pouvez créer et utiliser simultanément autant de sélections d'entités différentes que vous le souhaitez pour une dataclass. A noter qu'une sélection d'entité ne contient que des références à des entités. Différentes sélections d'entités peuvent contenir des références vers les mêmes entités. + +### Shareable or alterable entity selections + +An entity selection can be **shareable** (readable by multiple processes, but not alterable after creation) or **alterable** (supports the [`.add()`](API/EntitySelectionClass.md#add) function, but only usable by the current process). + +#### Propriétés + +A **shareable** entity selection has the following characteristics: + +- it can be stored in a shared object or shared collection, and can be passed as parameter between several processes or workers; +- it can be stored in several shared objects or collections, or in a shared object or collection which already belongs to a group (it does not have a *locking identifier*); +- it does not allow the addition of new entities. Trying to add an entity to a shareable entity selection will trigger an error (1637 - This entity selection cannot be altered). To add an entity to a shareable entity selection, you must first transform it into a non-shareable entity selection using the [`.copy()`](API/EntitySelectionClass.md#copy) function, before calling [`.add()`](API/EntitySelectionClass.md#add). + +> the new entity selection results from one of the various ORDA class functions applied to an existing entity selection ([.query()](API/EntitySelectionClass.md#query), [.slice()](API/EntitySelectionClass.md#slice), etc.) . + +An **alterable** entity selection has the following characteristics: + +- it cannot be shared between processes, nor be stored in a shared object or collection. Trying to store a non-shareable entity selection in a shared object or collection will trigger an error (-10721 - Not supported value type in a shared object or shared collection); +- it accepts the addition of new entities, i.e. it is supports the [`.add()`](API/EntitySelectionClass.md#add) function. + + +#### How are they defined? + +The **shareable** or **alterable** nature of an entity selection is defined when the entity selection is created (it cannot be modified afterwards). [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (e.g. + + +A new entity selection is **shareable** in the following cases: + +- the new entity selection results from an ORDA class function applied to a dataClass: [dataClass.all()](API/DataClassClass.md#all), [dataClass.fromCollection()](API/DataClassClass.md#fromcollection), [dataClass.query()](API/DataClassClass.md#query), +- the new entity selection is based upon a relation [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute but the entity does not belong to an entity selection. +- the new entity selection is explicitely copied as shareable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. with the `ck shared` option). + +Exemple : +```4d +$myComp:=ds.Company.get(2) //$myComp does not belong to an entity selection +$employees:=$myComp.employees //$employees is shareable +``` + +A new entity selection is **alterable** in the following cases: + +- the new entity selection created blank using the [dataClass.newSelection()](API/DataClassClass.md#newselection) function or `Create entity selection` command, +- the new entity selection is explicitely copied as alterable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. without the `ck shared` option). + +Exemple : +```4d +$toModify:=ds.Company.all().copy() //$toModify is alterable +``` + + +A new entity selection **inherits** from the original entity selection nature in the following cases: + +- Most entity selection functions (such as [`.slice()`](API/EntitySelectionClass.md#slice), [`.and()`](API/EntitySelectionClass.md#and)...) . +- the new entity selection is based upon a relation: + - [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute and the entity belongs to an entity selection (same nature as [.getSelection()](API/EntityClass.md#getselection) entity selection), + - [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (e.g. "employees.employer") when *attributeName* is a related attribute (same nature as the entity selection), + - [.extract()](API/EntitySelectionClass.md#extract) when the resulting collection contains entity selections (same nature as the entity selection). + +Voici quelques exemples : + +```4d +$highSal:=ds.Employee.query("salary >= :1"; 1000000) + //$highSal is shareable because of the query on dataClass +$comp:=$highSal.employer //$comp is shareable because $highSal is shareable + +$lowSal:=ds.Employee.query("salary <= :1"; 10000).copy() + //$lowSal is alterable because of the copy() +$comp2:=$lowSal.employer //$comp2 is alterable because $lowSal is alterable +``` + + +#### Sharing an entity selection between processes (example) + +You work with two entity selections that you want to pass to a worker process so that it can send mails to appropriate persons: + +```4d + +var $paid; $unpaid : cs.InvoicesSelection +//We get entity selections for paid and unpaid invoices +$paid:=ds.Invoices.query("status=:1"; "Paid") +$unpaid:=ds.Invoices.query("status=:1"; "Unpaid") + +//We pass entity selection references as parameters to the worker +CALL WORKER("mailing"; "sendMails"; $paid; $unpaid) + +``` + +The `sendMails` method: + +```4d + + #DECLARE ($paid : cs.InvoicesSelection; $unpaid : cs.InvoicesSelection) + var $invoice : cs.InvoicesEntity + + var $server; $transporter; $email; $status : Object + + //Prepare emails + $server:=New object() + $server.host:="exchange.company.com" + $server.user:="myName@company.com" + $server.password:="my!!password" + $transporter:=SMTP New transporter($server) + $email:=New object() + $email.from:="myName@company.com" + + //Loops on entity selections + For each($invoice;$paid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Payment OK for invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each + + For each($invoice;$unpaid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Please pay invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each +``` + + +### Sélections d'entités et attributs de stockage + +Tous les attributs de stockage (texte, numérique, booléen, date) sont disponibles en tant que propriétés des sélections d'entités et en tant qu'entités. Lorsqu'il est utilisé avec une sélection d'entité, un attribut scalaire retourne une collection de valeurs scalaires. Par exemple : + +```4d + $locals:=ds.Person.query("city = :1";"San Jose") //entity selection of people + $localEmails:=$locals.emailAddress //collection of email addresses (strings) +``` + +This code returns in *$localEmails* a collection of email addresses as strings. + +### Sélections d'entités et attributs de relation + +Outre la variété de méthodes de recherche, vous pouvez également utiliser des attributs de relation comme propriétés des sélections d'entités pour retourner de nouvelles sélections d'entités. Par exemple, considérons la structure suivante : + +![](assets/en/ORDA/entitySelectionRelationAttributes.png) + +```4d + $myParts:=ds.Part.query("ID < 100") //Return parts with ID less than 100 + $myInvoices:=$myParts.invoiceItems.invoice + //All invoices with at least one line item related to a part in $myParts +``` + +La dernière ligne renverra, dans $myInvoices, une sélection d'entité de toutes les factures qui ont au moins un poste de facture lié à une partie de la sélection d'entités myParts. Lorsqu'un attribut de relation est utilisé comme propriété d'une sélection d'entité, le résultat est toujours une autre sélection d'entité, même si une seule entité est retournée. Lorsqu'un attribut de relation est utilisé comme propriété d'une sélection d'entité et qu'aucune entité n'est retournée, le résultat est une sélection d'entité vide et non nulle. + + +## Verrouillage d'une entité + +Vous devez souvent gérer d'éventuels conflits pouvant survenir lorsque plusieurs utilisateurs ou process se chargent et tentent de modifier les mêmes entités en même temps. Le verrouillage des enregistrements est une méthodologie utilisée dans les bases de données relationnelles pour éviter les mises à jour incohérentes des données. Le concept consiste soit à verrouiller un enregistrement lors de sa lecture afin qu'aucun autre processus ne puisse le mettre à jour, soit à vérifier lors de la sauvegarde d'un enregistrement qu'un autre processus ne l'a pas modifié depuis sa lecture. Le premier est appelé **verrouillage d'enregistrement pessimiste** et garantit qu'un enregistrement modifié peut être écrit au détriment du verrouillage des enregistrements pour d'autres utilisateurs. Ce dernier est appelé **verrouillage d'enregistrement optimiste** et il échange la garantie des privilèges d'écriture sur l'enregistrement contre la flexibilité de décider des privilèges d'écriture uniquement si l'enregistrement doit être mis à jour. Dans le verrouillage d'enregistrement pessimiste, l'enregistrement est verrouillé même s'il n'est pas nécessaire de le mettre à jour. Dans le verrouillage d'enregistrement optimiste, la validité de la modification d'un enregistrement est fixée au moment de la mise à jour. + +ORDA vous propose deux modes de verrouillage d'entité : + +- un mode automatique "optimiste", adapté à la plupart des applications, +- un mode "pessimiste" permettant de verrouiller les entités avant d'y accéder. + +### Verrouillage optimiste automatique + +Ce mécanisme automatique est basé sur le concept de "verrouillage optimiste" qui est particulièrement adapté aux problématiques des applications web. Ce concept se caractérise par les principes de fonctionnement suivants : + +* Toutes les entités peuvent toujours être chargées en lecture-écriture; il n'y a pas de «verrouillage» *a priori* des entités. +* Chaque entité possède un marqueur de verrouillage interne qui est incrémenté à chaque fois qu'il est enregistré. +* Lorsqu'un utilisateur ou un process tente de sauvegarder une entité à l'aide de la méthode `entity.save()`, 4D compare la valeur du marqueur de l'entité à sauvegarder avec celle de l'entité trouvée dans les données (en cas de modification) : + * Lorsque les valeurs correspondent, l'entité est enregistrée et la valeur du marqueur interne est incrémentée. + * Lorsque les valeurs ne correspondent pas, cela signifie qu'un autre utilisateur a modifié cette entité entre-temps. La sauvegarde n'est pas effectuée et une erreur est retournée. + +Le diagramme suivant illustre le verrouillage optimiste : + +1. Deux process chargent la même entité.

        ![](assets/en/ORDA/optimisticLock1.png) + +2. Le premier process modifie l'entité et valide le changement. La méthode `entity.save()` est appelée. Le moteur 4D compare automatiquement la valeur du marqueur interne de l'entité modifiée avec celle de l'entité stockée dans les données. Puisqu'ils correspondent, l'entité est enregistrée et la valeur de son marqueur est incrémentée.

        ![](assets/en/ORDA/optimisticLock2.png) + +3. Le deuxième process modifie également l'entité chargée et valide ses modifications. La méthode `entity.save()` est appelée. Etant donné que la valeur de marqueur de l'entité modifiée ne correspond pas à celle de l'entité stockée dans les données, la sauvegarde n'est pas effectuée et une erreur est retournée.

        ![](assets/en/ORDA/optimisticLock3.png) + + +Cela peut également être illustré par le code suivant : + +```4d + $person1:=ds.Person.get(1) //Référence à l'entité + $person2:=ds.Person.get(1) //Autre référence à la même entité + $person1.name:="Bill" + $result:=$person1.save() //$result.success=true, modification enregistrée + $person2.name:="William" +``` + +Dans cet exemple, nous attribuons à $person1 une référence à l'entité "person" avec une clé de 1. Nous attribuons ensuite une autre référence de la même entité à la variable $person2. Avec $person1, nous modifions le prénom de la personne et sauvegardons l'entité. Lorsque nous essayons de faire de même avec $person2, 4D vérifie que l'entité sur le disque est la même que lors de la première attribution de la référence dans $person1. Puisqu'elles ne sont pas identiques, 4D retourne "faux" dans la propriété "success" et ne sauvegarde pas la deuxième modification. + +When this situation occurs, you can, for example, reload the entity from the disk using the `entity.reload()` method so that you can try to make the modification again. The `entity.save()` method also proposes an "automerge" option to save the entity in case processes modified attributes that were not the same. + +> Record stamps are not used in **transactions** because only a single copy of a record exists in this context. Whatever the number of entities that reference a record, the same copy is modified thus `entity.save()` operations will never generate stamp errors. + +### Verrouillage pessimiste + +Vous pouvez verrouiller et déverrouiller des entités à la demande lorsque vous accédez aux données. Lorsqu'une entité est verrouillée par un process, elle est chargée en lecture/écriture dans ce process mais elle est verrouillée pour tous les autres process. L'entité peut être chargée uniquement en mode lecture seule dans ces process; ses valeurs ne peuvent pas être modifiées ou enregistrées. + +This feature is based upon two methods of the `Entity` class: + +* `entity.lock()` +* `entity.unlock()` + +Pour plus d'informations, reportez-vous aux descriptions de ces méthodes. + + +### Utilisation simultanée des verrouillages classiques 4D et des verrouillages pessimistes ORDA + +L'utilisation des commandes classiques et ORDA pour le verrouillage des enregistrements est basé sur les principes suivants : + +* Un verrouillage défini avec une commande 4D classique sur un enregistrement empêche ORDA de verrouiller l'entité correspondant à l'enregistrement. +* Un verrouillage défini avec ORDA sur une entité empêche les commandes 4D classiques de verrouiller l'enregistrement correspondant à l'entité. + +Ces principes sont illustrés dans le diagramme suivant : + +![](assets/en/ORDA/concurrent1.png) + +Les **verrouillages de transaction** s'appliquent également aux commandes classiques et aux commandes ORDA. Dans une application multiprocess ou multi-utilisateurs, un verrouillage défini dans une transaction sur un enregistrement par une commande classique aura pour effet d'empêcher tout autre process de verrouiller les entités liées à cet enregistrement (ou inversement), jusqu'à ce que la transaction soit validée ou annulée. + +* Exemple avec un verrouillage défini par une commande classique :

        ![](assets/en/ORDA/concurrent2.png) +* Exemple avec un verrouillage défini par une méthode ORDA :

        ![](assets/en/ORDA/concurrent3.png) + + + +## Optimisation client/serveur + +4D optimise automatiquement les requêtes ORDA qui utilisent des sélections d'entités ou qui chargent des entités en configuration client/serveur. Cette optimisation accélère l'exécution de votre application 4D en réduisant drastiquement le volume d'informations transmises sur le réseau. + +Les mécanismes d'optimisation suivants sont mis en œuvre : + +* Lorsqu'un client demande une sélection d'entité au serveur, 4D "apprend" automatiquement attributs de la sélection d'entité sont réellement utilisés côté client lors de l'exécution du code, et génère un "contexte d'optimisation" correspondant. Ce contexte est relié à la sélection d'entité et stocke les attributs utilisés. Il sera mis à jour dynamiquement si d'autres attributs sont utilisés par la suite. + +* Les requêtes ultérieures envoyées au serveur sur la même sélection d'entité réutilisent automatiquement le contexte d'optimisation et lisent uniquement les attributs nécessaires depuis le serveur, ce qui accélère le traitement. Par exemple, dans une list box basée sur une sélection d'entités, la phase d'apprentissage a lieu durant l'affichage des premières lignes et l'affichage des lignes suivantes est fortement optimisé. + +* Un contexte d'optimisation existant peut être passé en tant que propriété à une autre sélection d'entité de la même dataclass, ce qui permet d'éviter la phase d'apprentissage et d'accélérer l'application (voir [Utilisation de la propriété context](#using-the-context-property) ci-dessous). + +Les méthodes suivantes associent automatiquement le contexte d'optimisation de la sélection d'entité d'origine à la sélection d'entité retournée : + +* `entitySelection.and()` +* `entitySelection.minus()` +* `entitySelection.or()` +* `entitySelection.orderBy()` +* `entitySelection.slice()` +* `entitySelection.drop()` + + + +**Exemple** + +Considérons le code suivant : + +```4d + $sel:=$ds.Employee.query("firstname = ab@") + For each($e;$sel) + $s:=$e.firstname+" "+$e.lastname+" works for "+$e.employer.name // $e.employer renvoie à la table Company + End for each +``` + +Thanks to the optimization, this request will only get data from used attributes (firstname, lastname, employer, employer.name) in *$sel* after a learning phase. + + + +### Utilisation de la propriété context + +Vous pouvez tirer un meilleur parti de l'optimisation en utilisant la propriété **context**. Cette propriété référence un contexte d'optimisation "appris" pour une sélection d'entités. Elle peut être passée comme paramètre aux méthodes ORDA qui retournent de nouvelles sélections d'entités, afin que les sélections d'entités demandent directement au serveur les attributs utilisés, sans passer par la phase d'apprentissage. + +Une même propriété de contexte d'optimisation peut être passée à un nombre illimité de sélections d'entités de la même dataclass. Toutes les méthodes ORDA qui gèrent les sélections d'entités prennent en charge la propriété **context** (par exemple les méthodes `dataClass.query( )` ou `dataClass.all( )`). Il est toutefois important de garder à l'esprit qu'un contexte est automatiquement mis à jour lorsque de nouveaux attributs sont utilisés dans d'autres parties du code. Si le même contexte est réutilisé dans différents codes, il risque d'être surchargé et de perdre en efficacité. +> Un mécanisme similaire est mis en place pour des entités qui sont chargées, afin que seuls les attributs utilisés soient demandés (voir la méthode `dataClass.get( )`). + + + +**Exemple avec la méthode `dataClass.query( )` :** + +```4d + var $sel1; $sel2; $sel3; $sel4; $querysettings; $querysettings2 : Object + var $data : Collection + $querysettings:=New object("context";"shortList") + $querysettings2:=New object("context";"longList") + + $sel1:=ds.Employee.query("lastname = S@";$querysettings) + $data:=extractData($sel1) // In extractData method an optimization is triggered and associated to context "shortList" + + $sel2:=ds.Employee.query("lastname = Sm@";$querysettings) + $data:=extractData($sel2) // In extractData method the optimization associated to context "shortList" is applied + + $sel3:=ds.Employee.query("lastname = Smith";$querysettings2) + $data:=extractDetailedData($sel3) // In extractDetailedData method an optimization is triggered and associated to context "longList" + + $sel4:=ds.Employee.query("lastname = Brown";$querysettings2) + $data:=extractDetailedData($sel4) // In extractDetailedData method the optimization associated to context "longList" is applied +``` + +### Listbox basée sur une sélection d'entités + +L'optimisation d'une sélection d'entités s'applique automatiquement aux listbox basées sur une sélection d'entités dans les configurations client/serveur, au moment d'afficher et de dérouler le contenu d'une listbox : seuls les attributs affichés dans la listbox sont demandés depuis le serveur. + +Un contexte spécifique nommé "mode page" est également proposé lorsque l'entité courante de la sélection est chargée à l'aide de l'expression **élément courant** de la listbox (voir [List box de type collection ou entity selection](FormObjects/listbox_overview.md#list-box-types)). Cette fonctionnalité vous permet de ne pas surcharger le contexte initial de la listbox dans ce cas précis, notamment si la "page" requiert des attributs supplémentaires. A noter que seule l'utilisation de l'expression **Élément courant** permettra de créer/utiliser le contexte de la page (l'accès via `entitySelection[index]` modifiera le contexte de la sélection d'entité). + +Cette optimisation sera également prise en charge par les requêtes ultérieures envoyées au serveur via les méthodes de navigation des entités. Les méthodes suivantes associeront automatiquement le contexte d'optimisation de l'entité source à l'entité retournée : + +* `entity.next( )` +* `entity.first( )` +* `entity.last( )` +* `entity.previous( )` + +Par exemple, le code suivant charge l'entité sélectionnée et permet de naviguer dans la sélection d'entités. Les entités sont chargées dans un contexte séparé et le contexte initial de la listbox demeure inchangé : + +```4d + $myEntity:=Form.currentElement //expression de l'élément courant + //... faire quelque chose + $myEntity:=$myEntity.next() //charge la prochaine entité à l'aide du même contexte +``` diff --git a/website/translated_docs/fr/ORDA/glossary.md b/website/translated_docs/fr/ORDA/glossary.md new file mode 100644 index 00000000000000..c95e19102c7858 --- /dev/null +++ b/website/translated_docs/fr/ORDA/glossary.md @@ -0,0 +1,210 @@ +--- +id: glossary +title: Glossaire +--- + +## Aperçu des principaux concepts + +![](assets/en/ORDA/mainConcepts.png) + + + +## Attribut + +Un attribut est la plus petite cellule de stockage dans une base de données relationnelle (voir aussi [Attribut relationnel](#relation-attribute)). Ne confondez pas les attributs de la dataclass et les attributs d'entités : + +* Dans un objet dataclass, chaque propriété est un attribut de dataclass qui correspond à un champ dans la table correspondante (même nom et même type). +* Dans un objet entity, les attributs d'entités sont des propriétés qui contiennent les valeurs pour les attributs du datastore correspondants. +> Les *attributs* et les *propriétés* sont des concepts similaires. "Attribut" est utilisé pour désigner les propriétés de la dataclass qui stockent les données, tandis que "propriété" est plus générique et définit une donnée stockée dans un objet. + +## AttributePath + +Un attributePath est le chemin d'un attribut à l'intérieur d'une dataclass ou d'une entité donnée. Voir aussi [propertyPath](#propertyPath). + + +## Class code + +Code pour la (les) fonction(s) de classe utilisateurs. + + +## Computed attribute + +A computed attribute doesn't actually store information. Instead, it determines its value based on other values from the same entity or from other entities, attributes or functions. When a computed attribute is referenced, the underlying "computation" is evaluated to determine the value. Computed attributes may even be assigned values where user-defined code determines what to do during the assignment. + +## Data model class + +Classe étendue disponible pour un objet modèle de données. + +## Data model object + +Objets de base de données disponibles via le concept ORDA, c'est-à-dire datastore, dataclasses, entities (entités) et entity selections (sélections d'entités). + +## Data model function + +Fonction d'une classe de modèle de données ORDA. + +## Dataclass + +Une dataclass est un objet qui décrit les données. Les tables de la base de données fournies par le datastore sont gérées via des dataclasses. Chaque table de la base de données fournie par le datastore possède une dataclass correspondante portant le même nom. Chaque champ de la table est un attribut de la dataclass. + +Une dataclass est reliée à un seul datastore. + + +## DataClass class + +Classe pour des objets dataclass spécifiques, dans laquelle vous pouvez ajouter des fonctions personnalisées. + +## Datastore + +Un datastore est l'objet d'interface fourni par ORDA pour référencer une structure et accéder à ses données. La base de données principale, retournée par la commande `ds`, est disponible en tant que datastore (le datastore principal). + +Un datastore fournit : + +* une connexion à la base de données 4D +* un ensemble de dataclasses pour travailler avec la base de données + +La base peut être une base locale 4D (le datastore principal), ou une base 4D Server exposée en ressource REST (un datastore distant). + +Un datastore ne référence qu'une seule base de données. Il est toutefois possible d'ouvrir plusieurs datastores pour accéder à plusieurs bases. + +## DataStore class + +Classe pour des objets datastore spécifiques, dans laquelle vous pouvez ajouter des fonctions personnalisées. + + +## DataStoreImplementation + +Nom interne de la classe générique DataStore dans le class store `4D`. + +## Copie profonde + +Une copie profonde (deep copy) duplique un objet et toutes les références qu'il contient. Après une deep copy, une collection copiée contient des éléments dupliqués et donc de nouvelles références de tous les éléments originaux. Voir également Copie superficielle. + +## ds + +`ds` est la commande de langage 4D qui retourne une référence d'objet [datastore](dsMapping.md#datastore). Elle correspond au datastore disponible sur la base de données principale 4D. + +## Entity + +Une entité est un objet qui correspond à un modèle de dataclass. Une entité contient les mêmes attributs que la dataclass. + +Une entité peut être vue comme une instance de la dataclass, comme un enregistrement de la table correspondante à la dataclass dans son datastore associé. Cependant, une entité contient également des données connexes. Le but de l'entité est de gérer les données (créer, mettre à jour, supprimer). + +Pour plus d'informations, voir le chapitre Entités. + +## Entity selection + +Une sélection d'entités (entity selection) est un objet. Lorsqu'une requête est envoyée au datastore, une sélection d'entités est retournée. Une sélection d'entité est un ensemble de références à des entités liées à la même dataclass. + +Une sélection d'entités contient : + +* un ensemble de 0 à X références d'entités, +* une propriété length (toujours), +* les propriétés queryPlan et queryPath (si demandées lors de la requête). + +Une sélection d'entités peut également être vide. + + +## Generic class + +Classe intégrée pour les objets ORDA tels que les entités ou les dataclasses. Les fonctions et propriétés des classes génériques sont automatiquement disponibles dans les classes utilisateur étendues, telles que `EmployeeEntity`. + + +## Lazy loading + +Commes les entités sont gérées comme des références, les données sont chargées uniquement lorsque cela est nécessaire, c'est-à-dire lorsqu'on y accède dans le code ou via des widgets d'interface. Ce principe d'optimisation est appelé lazy loading. + +## Datastore principal + +L'objet Datastore correspondant à la base 4D ouverte (autonome ou client/serveur). Le datastore principal est retourné par la commande ds. + +## Méthode + +Les objets ORDA tels que les "datastores", "dataclasses", "entity selections" et "entities" définissent les classes d'objets. Ils fournissent des méthodes spécifiques pour interagir directement avec eux. Ces méthodes sont aussi appelées des fonctions membres (member functions). Ces méthodes sont utilisées en étant appelées sur une instance de l'objet. + +Par exemple, la méthode `query()` est une "member function" de dataclass. Si vous avez stocké un objet dataclass dans la variable `$myClass`, vous pouvez écrire : + +```code4d +$myClass.query("name = smith") +``` + +## Type de données "Mixte" + +Dans cette documentation, le type de données "Mixte" est utilisé pour désigner les différents types de valeurs qui peuvent être stockés dans les attributs d'une dataclass. Par exemple : + +* number +* Texte +* null +* boolean +* date +* object +* collection +* image(\*) + +*(\*) le type Image n'est pas supporté par des méthodes statistiques telles que dans* `entitySelection.max()`. + +## Verrouillage optimiste + +En mode "verrouillage optimiste", les entités ne sont pas verrouillées explicitement avant d'être mises à jour. Chaque entité a un marqueur interne qui est automatiquement incrémenté chaque fois que l'entité est enregistrée sur le disque. Les méthodes entity.save( ) ou entity.drop( ) retourneront une erreur si le marqueur de l'entité chargée en mémoire et le marqueur de l'entité sur le disque ne correspondent pas, ou si l'entité a été supprimée. Le verrouillage optimiste est uniquement disponible dans l'implémentation ORDA. Voir aussi "verrouillage pessimiste". + +## Verrouillage pessimiste + +Un "verrouillage pessimiste" signifie qu'une entité est verrouillée avant que l'on y accède, en utilisant la méthode entity.lock( ). Les autres process ne peuvent ni mettre à jour ni supprimer l'entité tant qu'elle n'est pas déverrouillée. Le langage 4D classique n'autorise que les verrouillages pessimistes. Voir "Verrouillage optimiste". + +## Propriété + +Voir [Attribut](#attribute). +> Les attributs et les propriétés sont des concepts similaires. "Attribut" est utilisé pour désigner les propriétés de la dataclass qui stockent les données, tandis que "propriété" est plus générique et définit une donnée stockée dans un objet. + +## PropertyPath + +Un propertyPath est le chemin vers une propriété dans un objet donné. Si la propriété est imbriquée à plusieurs niveaux, chaque niveau est séparé par un point ("."). + +## Regular class + +Classe utilisateur non liée à un objet ORDA. + +## Related dataclass + +Ce sont des dataclasses liées par des attributs de relation. + +## Attribut relationnel + +Les attributs de relation sont utilisés pour conceptualiser les relations entre les dataclasses (N vers 1 et 1 vers N). + +* Relation N vers 1 (la dataclassA fait référence à une occurrence de la dataclassB) : un attribut de relation est disponible dans dataclassA et fait référence à une instance de dataclassB. +* Relation 1 vers N (une occurrence de dataclassB fait référence à plusieurs occurrences de dataclassA) : un attribut de relation est disponible dans la dataclassB et fait référence à plusieurs instances de la dataclassA. + +Une dataclass peut avoir des attributs de relation récursifs. + +Dans une entité, la valeur d'un attribut de relation peut être une entité ou une sélection d'entité. + +## Related entities + +Une entité associée peut être considérée comme l'instance d'un attribut de relation dans une dataclass. + +Les sélections d'entités peuvent faire référence à des entités relatives selon les attributs de relation définis dans les dataclasses correspondantes. + +## Remote datastore + +Une base de données 4D ouverte sur 4D ou 4D Server (disponible via HTTP) et exposée en tant que ressource REST. Cette base de données peut être référencée localement en tant que Datastore à partir d'autres postes de travail, où un locaID lui est attribué. Le datastore distant peut être utilisé à travers les concepts ORDA (datastore, dataclass, sélection d'entités, etc.). Cette utilisation est soumise à un système de licence. + +## Session + +Lorsque l'application 4D se connecte à un datastore distant, une session est créée sur le 4D Server (HTTP). Un cookie de session est généré et associé à l'ID du datastore local. + +Chaque fois qu'une nouvelle session est ouverte, une licence est utilisée. Chaque fois qu'une session est fermée, la licence est libérée. + +Les sessions inactives sont automatiquement fermées après un délai. Le timeout par défaut est de 48 heures, il peut être défini par le développeur (il doit être >= 60 minutes). + +## Copie superficielle (Shallow copy) + +Une copie superficielle (shallow copy) ne fait que dupliquer la structure des éléments et conserve les mêmes références internes. Après une copie superficielle, deux collections partageront les éléments individuels. Voir également Copie profonde. + +## Stamp + +Utilisé dans la technologie du verrouillage "optimiste". Toutes les entités ont un compteur interne, le marqueur, qui est incrémenté chaque fois que l'entité est sauvegardée. En comparant automatiquement les marqueurs entre une entité sauvegardée et sa version stockée sur disque, 4D peut empêcher les modifications simultanées sur les mêmes entités. + +## Storage attribute + +A storage attribute (sometimes referred to as a scalar attribute) is the most basic type of attribute in a datastore class and most directly corresponds to a field in a relational database. A storage attribute holds a single value for each entity in the class. diff --git a/website/translated_docs/fr/ORDA/ordaClasses.md b/website/translated_docs/fr/ORDA/ordaClasses.md new file mode 100644 index 00000000000000..c030833d4e8aac --- /dev/null +++ b/website/translated_docs/fr/ORDA/ordaClasses.md @@ -0,0 +1,821 @@ +--- +id: ordaClasses +title: Classes du modèle de données +--- + + + +ORDA vous permet de créer des fonctions de classe de haut niveau au-dessus du modèle de données. Cela vous permet d'écrire du code orienté métier et de le «publier» comme une API. Le datastore, les dataclasses, les sélections d'entités et les entités sont tous disponibles en tant qu'objets de classe pouvant contenir des fonctions. + +Par exemple, vous pouvez créer une fonction `getNextWithHigherSalary()` dans la classe `EmployeeEntity` pour retourner les employés ayant un salaire supérieur à celui qui est sélectionné. Il serait aussi simple à appeler que : + +```4d +$nextHigh:=ds.Employee(1).getNextWithHigherSalary() +``` + +Les développeurs peuvent non seulement utiliser ces fonctions dans des datastores locaux, mais également dans des architectures client/serveur et des architectures distantes (voir l'exemple complet [ci-dessous](#example-with-remote-datastore)) : + +```4d + //$cityManager est la référence d'un datastore distant +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) +``` + +Grâce à cette fonctionnalité, toute la logique métier de votre application 4D peut être stockée comme une couche indépendante afin d'être facilement maintenue ou réutilisée avec un niveau de sécurité élevé : + +- Elle vous permet de «masquer» la complexité globale de la structure physique sous-jacente et d'exposer uniquement des fonctions compréhensibles et prêtes à l'emploi. + +- Si la structure phySique évolue, il vous suffit d'adapter le code de la fonction et les applications clientes continueront de les appeler de manière transparente. + +- By default, all of your data model class functions (including [computed attribute functions](#computed-attributes)) are **not exposed** to remote applications and cannot be called from REST requests. Vous devez déclarer explicitement chaque fonction publique avec le mot-clé [`exposed`](#exposed-vs-non-exposed-functions). + +![](assets/en/ORDA/api.png) + + +De plus, 4D [crée préalablement et automatiquement](#creating-classes) les classes pour chaque objet de modèle de données disponible. + + +## Architecture + +ORDA fournit des **classes génériques** exposées via le [class store](Concepts/classes.md#class-stores) **`4D`**, ainsi que des **classes utilisateurs** (étendant les classes génériques) exposées dans le [class store](Concepts/classes.md#class-stores) **`cs`** : + +![](assets/en/ORDA/ClassDiagramImage.png) + +Toutes les classes de modèle de données ORDA sont exposées en tant que propriétés du class store **`cs`**. Les classes ORDA suivantes sont disponibles : + +| Class | Nom de l'exemple | Instanciée par | +| --------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cs.DataStore | cs.DataStore | commande [`ds`](API/DataStoreClass.md#ds) | +| cs.*DataClassName* | cs.Employee | [`dataStore.DataClassName`](API/DataStoreClass.md#dataclassname), `dataStore[DataClassName]` | +| cs.*DataClassName*Entity | cs.EmployeeEntity | [`dataClass.get()`](API/DataClassClass.md#get), [`dataClass.new()`](API/DataClassClass.md#new), [`entitySelection.first()`](API/EntitySelectionClass.md#first), [`entitySelection.last()`](API/EntitySelectionClass.md#last), [`entity.previous()`](API/EntityClass.md#previous), [`entity.next()`](API/EntityClass.md#next), [`entity.first()`](API/EntityClass.md#first), [`entity.last()`](API/EntityClass.md#last), [`entity.clone()`](API/EntityClass.md#clone) | +| cs.*DataClassName*Selection | cs.EmployeeSelection | [`dataClass.query()`](API/DataClassClass.md#query), [`entitySelection.query()`](API/EntitySelectionClass.md#query), [`dataClass.all()`](API/DataClassClass.md#all), [`dataClass.fromCollection()`](API/DataClassClass.md#fromcollection), [`dataClass.newSelection()`](API/DataClassClass.md#newselection), [`entitySelection.drop()`](API/EntitySelectionClass.md#drop), [`entity.getSelection()`](API/EntityClass.md#getselection), [`entitySelection.and()`](API/EntitySelectionClass.md#and), [`entitySelection.minus()`](API/EntitySelectionClass.md#minus), [`entitySelection.or()`](API/EntitySelectionClass.md#or), [`entitySelection.orderBy()`](API/EntitySelectionClass.md#or), [`entitySelection.orderByFormula()`](API/EntitySelectionClass.md#orderbyformula), [`entitySelection.slice()`](API/EntitySelectionClass.md#slice), `Create entity selection` | + +> Les classes utilisateur ORDA sont stockées sous forme de fichiers de classe standard (.4dm) dans le sous-dossier Classes du projet [(voir ci-dessous)](#class-files). + +De plus, les instances d'objet de classes utilisateurs du modèles de données ORDA bénéficient des propriétés et fonctions de leurs parents: + +- un objet de classe Datastore peut appeler des fonctions de la [classe générique ORDA Datastore](API/DataStoreClass.md). +- un objet de classe Dataclass peut appeler des fonctions de la [classe générique ORDA Dataclass](API/DataClassClass.md). +- un objet de classe Entity selection peut appeler des fonctions de la [classe générique ORDA Entity selection](API/EntitySelectionClass.md). +- un objet de classe Datastore peut appeler des fonctions de la [classe générique ORDA Datastore](API/EntityClass.md). + + + +## Description de la classe + +
        Historique + +| Version | Modifications | +| ------- | -------------------------------------------------------------------------------------------------- | +| v18 R5 | Data model class functions are not exposed to REST by default. New `exposed` and `local` keywords. | +
        + + +### Classe DataStore + + +Une base de données 4D expose sa propre classe DataStore dans le class store `cs`. + +- **Extends**: 4D.DataStoreImplementation +- **Nom de classe** : cs.DataStore + +Vous pouvez créer des fonctions dans la classe DataStore qui seront disponibles via l'objet `ds`. + +#### Exemple + +```4d +// cs.DataStore class + +Class extends DataStoreImplementation + +Function getDesc + $0:="Database exposing employees and their companies" +``` + + +Cette foncton peut alors être appelée : + +```4d +$desc:=ds.getDesc() //"Database exposing..." +``` + + + +### Classe DataClass + +Chaque table exposée avec ORDA affiche une classe DataClass dans le class store `cs`. + +- **Extends** : 4D.DataClass +- **Nom de classe **: cs.*DataClassName* (où *DataClassName* est le nom de la table) +- **Exemple ** : cs.Employee + + + +#### Exemple + +```4D +// cs.Company class + + +Class extends DataClass + +// Retourne les entreprises dont le revenu est supérieur à la moyenne +// Retourne une sélection d'entités relative à l'entreprise DataClass + +Function GetBestOnes() + $sel:=This.query("revenues >= :1";This.all().average("revenues")); + $0:=$sel +``` + +Vous pouvez ensuite obtenir une sélection d'entité des "meilleures" entreprises en exécutant le code suivant : + +```4d + var $best : cs.CompanySelection + $best:=ds.Company.GetBestOnes() +``` + +> [Computed attributes](#computed-attributes) are defined in the [Entity Class](#entity-class). + + +#### Exemple avec un datastore distant + +Le catalogue *City* suivant est exposé dans un datastore distant (vue partielle) : + +![](assets/en/ORDA/Orda_example.png) + +La classe `City Class` fournit une API : + +```4d +// cs.City class + +Class extends DataClass + +Function getCityName() + var $1; $zipcode : Integer + var $zip : 4D.Entity + var $0 : Text + + $zipcode:=$1 + $zip:=ds.ZipCode.get($zipcode) + $0:="" + + If ($zip#Null) + $0:=$zip.city.name + End if +``` + +L'application cliente ouvre une session sur le datastore distant : + +```4d +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +``` + +Une application cliente peut alors utiliser l'API pour obtenir la ville correspondant au code postal (par exemple) à partir d'un formulaire : + +```4d +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) + +``` + + +### Classe EntitySelection + +Chaque table exposée avec ORDA affiche une classe EntitySelection dans le class store `cs`. + +- **Extends** : 4D.EntitySelection +- **Nom de classe** : *DataClassName*Selection (où *DataClassName* est le nom de la table) +- **Exemple ** : cs.EmployeeSelection + + +#### Exemple + +```4d +// Classe cs.EmployeeSelection + + +Classe extends EntitySelection + +//Extrait, de cette sélection d'entité, les employés ayant un salaire supérieur à la moyenne + +Function withSalaryGreaterThanAverage + C_OBJECT($0) + $0:=This.query("salary > :1";This.average("salary")).orderBy("salary") + +``` + +Vous pouvez alors obtenir les employés dont le salaire est supérieur à la moyenne, dans une sélection d'entité, en exécutant le code suivant : + +```4d +$moreThanAvg:=ds.Company.all().employees.withSalaryGreaterThanAverage() +``` + +### Entity Class + +Chaque table exposée avec ORDA affiche une classe Entity dans le class store `cs`. + +- **Extends** : 4D.Entity +- **Nom de classe **: *DataClassName*Entity (où *DataClassName* est le nom de la table) +- **Exemple ** : cs.CityEntity + +Entity classes allow you to define **computed attributes** using specific keywords: + +- `Function get` *attributeName* +- `Function set` *attributeName* +- `Function query` *attributeName* +- `Function orderBy` *attributeName* + +For more information, please refer to the [Computed attributes](#computed-attributes) section. + +#### Exemple + +```4d +// cs.CityEntity class + +Class extends Entity + +Function getPopulation() + $0:=This.zips.sum("population") + + +Function isBigCity +C_BOOLEAN($0) +// La fonction getPopulation() peut être utilisée dans la classe +$0:=This.getPopulation()>50000 +``` + +Vous pouvez ensuite appeler ce code : + +```4d +var $cityManager; $city : Object + +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +$city:=$cityManager.City.getCity("Caguas") + +If ($city.isBigCity()) + ALERT($city.name + " is a big city") +End if +``` + +### Règles spécifiques + +Lors de la création ou de la modification de classes de modèles de données, vous devez veiller aux règles décrites ci-dessous : + +- Puisqu'ils sont utilisés pour définir des noms de classe DataClass automatiques dans le [class store](Concepts/classes.md#class-stores) **cs**, les tables 4D doivent être nommées afin d'éviter tout conflit dans l'espace de nommage **cs**. En particulier : + - Ne donnez pas le même nom à une table 4D et à une [classe d'utilisateurs](Concepts/classes.md#class-names) (user class). Si un tel cas se produit, le constructeur de la classe utilisateur devient inutilisable (un avertissement est retourné par le compilateur). + - N'utilisez pas de nom réservé pour une table 4D (par exemple "DataClass"). + +- Lors de la définition d'une classe, assurez-vous que l'instruction [`Class extends`](Concepts/classes.md#class-extends-classnameclass) correspond exactement au nom de la classe parente (sensible à la casse). Par exemple, `Class extends EntitySelection` pour une classe de sélection d'entité. + +- Vous ne pouvez pas instancier un objet de classe de modèle de données avec le mot clé `new()` (une erreur est retournée). You must use a regular method as listed in the [`Instantiated by` column of the ORDA class table](#architecture). + +- Vous ne pouvez pas remplacer une fonction de classe ORDA native du [class store](Concepts/classes.md#class-stores) **`4D`** par une fonction de classe utilisateur de modèle de données. + + +## Computed attributes + + +### Aperçu + +A computed attribute is a dataclass attribute with a data type that masks a calculation. [Standard 4D classes](Concepts/classes.md) implement the concept of computed properties with `get` (*getter*) and `set` (*setter*) [accessor functions](Concepts/classes.md#function-get-and-function-set). ORDA dataclass attributes benefit from this feature and extend it with two additional functions: `query` and `orderBy`. + +At the very minimum, a computed attribute requires a `get` function that describes how its value will be calculated. When a *getter* function is supplied for an attribute, 4D does not create the underlying storage space in the datastore but instead substitutes the function's code each time the attribute is accessed. If the attribute is not accessed, the code never executes. + +A computed attribute can also implement a `set` function, which executes whenever a value is assigned to the attribute. The *setter* function describes what to do with the assigned value, usually redirecting it to one or more storage attributes or in some cases other entities. + +Just like storage attributes, computed attributes may be included in **queries**. Normally, when a computed attribute is used in a ORDA query, the attribute is calculated once per entity examined. In many cases this is sufficient. However, computed attributes can implement a `query` function that substitutes other attributes during the query. This allows computed attributes to be queried quickly by redirecting searches to other attributes, including indexed storage attributes. + +Similarly, computed attributes can be included in **sorts**. When a computed attribute is used in a ORDA sort, the attribute is calculated once per entity examined. Just like in queries, this is sufficient in many cases. However, computed attributes can implement an `orderBy` function that substitutes other attributes during the sort, thus increasing performance. + + +### How to define computed attributes + +You create a computed attribute by defining a `get` accessor in the [**entity class**](#entity-class) of the dataclass. The computed attribute will be automatically available in the dataclass attributes and in the entity attributes. + +Other computed attribute functions (`set`, `query`, and `orderBy`) can also be defined in the entity class. They are optional. + +Within computed attribute functions, [`This`](Concepts/classes.md#this) designates the entity. Computed attributes can be used and handled as any dataclass attribute, i.e. they will be processed by [entity class](API/EntityClass.md) or [entity selection class](API/EntitySelectionClass.md) functions. + +> ORDA computed attribute functions can be [**exposed**](#exposed-vs-non-exposed-functions) or not. + + +### `Function get ` + +#### Syntaxe + +```4d +Function get ({$event : Object}) -> $result : type +// code +``` +The *getter* function is mandatory to declare the *attributeName* computed attribute. Whenever the *attributeName* is accessed, 4D evaluates the `Function get` code and returns the *$result* value. Since this code becomes part of the attribute’s definition, it need not be referenced again in the application. + +> A computed attribute can use the value of other computed attribute(s). However, only one level is allowed, recursive calls generate errors. + +The *getter* function defines the data type of the computed attribute thanks to the *$result* parameter. The following resulting types are allowed: + +- Scalar (text, boolean, date, number) +- Objet +- Image +- BLOB +- Entity class (i.e. cs.EmployeeEntity) +- Entity selection class (i.e. cs.EmployeeSelection) + +The *$event* parameter contains the following properties: + +| Propriété | Type | Description | +| ------------- | ------- | -------------------------------------------------------------------------- | +| attributeName | Texte | Computed attribute name | +| dataClassName | Texte | Dataclass name | +| kind | Texte | "get" | +| result | Variant | Add this property with Null value if you want the attribute to return Null | + + +#### Exemples + +- *fullName* computed attribute: + +```4d +Function get fullName($event : Object)-> $result : Text + + If (This.firstName=Null) & (This.lastName=Null) + $event.result:=Null //only way to return a null value + Else + If (This.firstName=Null) + $result:=This.lastName + Else + If (This.lastname=Null) + $result:=This.firstName + Else + $result:=This.firstName+" "+This.lastName + End if + End if +``` + +- A computed attribute can be based upon a related attribute: + +```4d +Function get bigBoss($event : Object)-> $result: cs.EmployeeEntity + If (This.manager.manager=Null) + $event.result:=Null + Else + $result:=This.manager.manager + End if + +``` + +- A computed attribute can be based upon related attributes: + +```4d +Function get coWorkers($event : Object)-> $result: cs.EmployeeSelection + If (This.manager.manager=Null) + $result:=ds.Employee.newSelection() + Else + $result:=This.manager.directReports.minus(this) + End if +``` + +### `Function set ` + +#### Syntaxe + +```4d +Function set ($value : Variant {; $event : Object}) +// code +``` + +The *setter* function executes whenever a value is assigned to the attribute. This function usually processes the input value(s) and the result is dispatched between one or more other attributes. + +The *$value* parameter receives the value assigned to the attribute. + +The *$event* parameter contains the following properties: + +| Propriété | Type | Description | +| ------------- | ------- | --------------------------------------------- | +| attributeName | Texte | Computed attribute name | +| dataClassName | Texte | Dataclass name | +| kind | Texte | "set" | +| value | Variant | Value to be handled by the computed attribute | + +#### Exemple + +```4d +Function set fullName($value : Text; $event : Object) + var $vals : Collection + $vals:=Split string($value; " "; sk ignore empty strings) + If ($vals.length>0) + This.firstName:=$vals[0] + End if + If ($vals.length>1) + This.lastName:=$vals[1] + End if + End if +``` + + + +### `Function query ` + +#### Syntaxe + +```4d +Function query ($event : Object) +Function query ($event : Object) -> $result : Text +Function query ($event : Object) -> $result : Object +// code +``` + +This function supports three syntaxes: + +- With the first syntax, you handle the whole query through the `$event.result` object property. +- With the second and third syntaxes, the function returns a value in *$result*: + - If *$result* is a Text, it must be a valid query string + - If *$result* is an Object, it must contain two properties: + + | Propriété | Type | Description | + | ------------------ | ---------- | --------------------------------------------------- | + | $result.query | Texte | Valid query string with placeholders (:1, :2, etc.) | + | $result.parameters | Collection | values for placeholders | + +The `query` function executes whenever a query using the computed attribute is launched. It is useful to customize and optimize queries by relying on indexed attributes. When the `query` function is not implemented for a computed attribute, the search is always sequential (based upon the evaluation of all values using the `get ` function). + +> The following features are not supported: - calling a `query` function on computed attributes of type Entity class or Entity selection class - using the `order by` keyword in the resulting query string. + +The *$event* parameter contains the following properties: + +| Propriété | Type | Description | +| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Texte | Computed attribute name | +| dataClassName | Texte | Dataclass name | +| kind | Texte | "query" | +| value | Variant | Value to be handled by the computed attribute | +| operator | Texte | Query operator (see also the [`query` class function](API/DataClassClass.md#query)). Valeurs possibles :
      • == (equal to, @ is wildcard)
      • === (equal to, @ is not wildcard)
      • != (not equal to, @ is wildcard)
      • !== (not equal to, @ is not wildcard)
      • < (less than)
      • <= (less than or equal to)
      • > (greater than)
      • >= (greater than or equal to)
      • IN (included in)
      • %% (contains keyword)
      • | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default query (always sequential for computed attributes). | + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + +#### Exemples + +- Query on the *fullName* computed attribute. The result is returned as Text (query string). + +```4d +Function query fullName($event : Object)-> $result : Text + var $vals : Collection + var $oper; $result : Text + + $vals:=Split string($event.value; " "; sk ignore empty strings) + $oper:=$event.operator + $result:="" + + If (($oper="==") | ($oper="===")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" and lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName == '' and lastName == ''" + End if + + Else + If (($oper="!=") | ($oper="!==")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" or lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName != '' or lastName != ''" + End if + Else + $result:="firstName "+$oper+" '"+$vals[0]+"'" + End if + + End if + +``` + +Calling code, for example: + +```4d +$emps:=ds.Employee.query("fullName = :1"; "Flora Pionsin") +``` + +- This function handles queries on the *age* computed attribute and returns an object with parameters: + +```4d +Function query age($event : Object)->$result : Object + + var $operator : Text + var $age : Integer + var $_ages : Collection + + $operator:=$event.operator + + If ($operator="in") + + Case of + : (Value type($event.value)=Is collection) + $_ages:=$event.value + + : (Value type($event.value)=Is text) + $_ages:=JSON Parse($event.value) + End case + + Else + + $age:=Num($event.value) // integer + $d1:=Add to date(Current date; -$age-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + $parameters:=New collection($d1; $d2) + End if + + Case of + + : ($operator="==") + $query:="birthday > :1 and birthday <= :2" // after d1 and before or egal d2 + + : ($operator=">=") + $query:="birthday <= :2" + + //... other operators + + : ($operator="in") + + If ($_ages.length<=3) + + $parameters:=New collection + $phIndex:=1 + + $query:="" + For ($i; 0; $_ages.length-1) + + $ph1:=":"+String($phIndex) //-> ":1" + $ph2:=":"+String($phIndex+1) //-> ":2" + + $phIndex:=$phIndex+2 // next will be :3 :4, :5 :6, etc. + + $d1:=Add to date(Current date; -$_ages[$i]-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + + $parameters.push($d1) + $parameters.push($d2) + + If ($i>0) + $query:=$query+" or " + End if + $query:=$query+"(birthday > "+$ph1+" and birthday <= "+$ph2+")" // > :1 and <= :2 + End for + + Else // let 4d do the job !!! + $event.result:=Null + End if + + Else + $event.result:=Null + End case + + + If (Undefined($event.result)) + $result:=New object + $result.query:=$query + $result.parameters:=$parameters + End if + +``` + +### `Function orderBy ` + +#### Syntaxe + +```4d +Function orderBy ($event : Object) +Function orderBy ($event : Object)-> $result : Text + +// code +``` + +The `orderBy` function executes whenever the computed attribute needs to be ordered. It allows sorting the computed attribute. For example, you can sort *fullName* on first names then last names, or conversely. When the `orderBy` function is not implemented for a computed attribute, the sort is always sequential (based upon the evaluation of all values using the `get ` function). + +> Calling an `orderBy` function on computed attributes of type Entity class or Entity selection class **is not supported**. + +The *$event* parameter contains the following properties: + +| Propriété | Type | Description | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Texte | Computed attribute name | +| dataClassName | Texte | Dataclass name | +| kind | Texte | "orderBy" | +| value | Variant | Value to be handled by the computed attribute | +| descending | Booelan | `true` for descending order, `false` for ascending order | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default sort . | + +You can return the `orderBy` string either in the `$event.result` object property or in the *$result* function result. + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + + +#### Exemple + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + If ($event.descending=True) + $result:="firstName desc, lastName desc" + Else + $result:="firstName, lastName" + End if +``` + + +## Fonctions exposées et non exposées + +Pour des raisons de sécurité, toutes vos fonctions de classe de modèle de données sont non-exposées (**not exposed**) par défaut aux requêtes distantes (c'est-à-dire qu'elles sont privées). + +Les requêtes à distance incluent : + +- Les requêtes envoyées par des applications 4D distantes connectées via `Open datastore` +- Les requêtes REST + +> Les requêtes client/serveur 4D standard ne sont pas impactées. Les fonctions de classe de modèle de données sont toujours disponibles dans cette architecture. + +Une fonction qui n'est pas exposée n'est pas disponible sur les applications distantes et ne peut être appelée sur aucune instance d'objet à partir d'une requête REST. Si une application distante tente d'accéder à une fonction non exposée, l'erreur «-10729 - Méthode membre inconnue» est retournée. + +Pour permettre à une fonction de classe de modèle de données d'être appelée par une requête distante, vous devez la déclarer explicitement à l'aide du mot-clé `exposed`. La syntaxe formelle est la suivante : + +```4d +// déclarer une fonction exposée +exposed Function +``` + +> Le mot-clé `exposed` ne peut être utilisé qu'avec les fonctions de classe du modèle de données. S'il est utilisé avec une fonction de [classe utilisateur standard](Concepts/classes.md), il est ignoré et une erreur est retournée par le compilateur. + +### Exemple + +Vous voulez qu'une fonction exposée utilise une fonction privée dans une classe dataclass : + +```4d +Class extends DataClass + +//Fonction publique +exposed Function registerNewStudent($student : Object) -> $status : Object + +var $entity : cs.StudentsEntity + +$entity:=ds.Students.new() +$entity.fromObject($student) +$entity.school:=This.query("name=:1"; $student.schoolName).first() +$entity.serialNumber:=This.computeSerialNumber() +$status:=$entity.save() + +//fonction (privée) non exposée +Function computeIDNumber()-> $id : Integer +//calculer un nouveau numéro d'ID +$id:=... + +``` + +Lorsque le code est appelé : + +```4d +var $remoteDS; $student; $status : Object +var $id : Integer + +$remoteDS:=Open datastore(New object("hostname"; "127.0.0.1:8044"); "students") +$student:=New object("firstname"; "Mary"; "lastname"; "Smith"; "schoolName"; "Math school") + +$status:=$remoteDS.Schools.registerNewStudent($student) // OK +$id:=$remoteDS.Schools.computeIDNumber() // Erreur "Unknown member method" +``` + + +## Fonctions locales + +Par défaut dans l'architecture client/serveur, les fonctions de modèle de données ORDA sont exécutées **sur le serveur**. Il garantit généralement les meilleures performances puisque seuls la requête de fonction et le résultat sont envoyés sur le réseau. + +Cependant, il peut arriver qu'une fonction soit entièrement exécutable côté client (par exemple, lorsqu'elle traite des données qui se trouvent déjà dans le cache local). Dans ce cas, vous pouvez enregistrer les requêtes sur le serveur et ainsi améliorer les performances de l'application en saisissant le mot-clé `local`. La syntaxe formelle est la suivante : + +```4d +// déclarer une fonction à exécuter localement en client/serveur +local Function +``` + +Avec ce mot-clé, la fonction sera toujours exécutée côté client. + +> Le mot-clé `local` ne peut être utilisé qu'avec les fonctions de classe du modèle de données. S'il est utilisé avec une fonction de [classe utilisateur standard](Concepts/classes.md), il est ignoré et une erreur est retournée par le compilateur. + +A noter que la fonction fonctionnera même si elle nécessite d'accéder au serveur (par exemple si le cache ORDA est expiré). Toutefois, il est fortement recommandé de s'assurer que la fonction locale n'accède pas aux données sur le serveur, sinon l'exécution locale pourrait n'apporter aucun avantage en termes de performances. Une fonction locale qui génère de nombreuses requêtes au serveur est moins efficace qu'une fonction exécutée sur le serveur qui ne retournerait que les valeurs résultantes. Prenons l'exemple suivant, avec une fonction sur l'entité Schools : + +```4d +// Obtenir les élèves les plus jeunes +// Utilisation inappropriée du mot-clé local +local Function getYoungest + var $0 : Object + $0:=This.students.query("birthDate >= :1"; !2000-01-01!).orderBy("birthDate desc").slice(0; 5) +``` +- **sans** le mot clé `local`, le résultat est donné en une seule requête +- **avec** le mot-clé `local`, 4 requêtes sont nécessaires : une pour obtenir les élèves de l'entité Schools, une pour la `query()`, une pour le `orderBy()` et une pour la `slice()`. Dans cet exemple, l'utilisation du mot-clé `local` est inappropriée. + + +### Exemples + +#### Calcul de l'âge + +Considérons une entité avec un attribut *birthDate*. Nous souhaitons définir une fonction `age()` qui serait appelée dans une list box. Cette fonction peut être exécutée sur le client, ce qui évite de déclencher une requête au serveur pour chaque ligne de la list box. + +Dans la classe *StudentsEntity* : + +```4d +Class extends Entity + +local Function age() -> $age: Variant + +If (This.birthDate#!00-00-00!) + $age:=Year of(Current date)-Year of(This.birthDate) +Else + $age:=Null +End if +``` + +#### Vérification des attributs + +Nous souhaitons vérifier la cohérence des attributs d'une entité chargée sur le client et mise à jour par l'utilisateur, avant de demander au serveur de les enregistrer. + +Sur la classe *StudentsEntity*, la fonction locale `checkData()` vérifie l'âge de l'étudiant : + +```4d +Class extends Entity + +local Function checkData() -> $status : Object + +$status:=New object("success"; True) +Case of + : (This.age()=Null) + $status.success:=False + $status.statusText:="The birthdate is missing" + + :((This.age() <15) | (This.age()>30) ) + $status.success:=False + $status.statusText:="The student must be between 15 and 30 - This one is "+String(This.age()) +End case +``` + +Code d'appel : + +```4d +var $status : Object + +//Form.student est chargé avec tous ses a attributs et mis à jour sur un Form +$status:=Form.student.checkData() +If ($status.success) + $status:=Form.student.save() // appelle le serveur +End if +``` + + + +## Prise en charge dans les projets 4D + + +### Fichiers de classe (class files) + +Une classe utilisateur ORDA de modèle de données est définie en ajoutant, au [même emplacement que les fichiers de classe usuels](Concepts/classes.md#class-files) (c'est-à-dire dans le dossier `/Sources/Classes` du dossier projet), un fichier .4dm avec le nom de la classe. Par exemple, une classe d'entité pour la dataclass `Utilities` sera définie via un fichier `UtilitiesEntity.4dm`. + + +### Créer des classes + +4D crée préalablement et automatiquement des classes vides en mémoire pour chaque objet de modèle de données disponible. + +![](assets/en/ORDA/ORDA_Classes-3.png) + +> Par défaut, les classes ORDA vides ne sont pas affichées dans l'Explorateur. Vous devez les afficher en sélectionnant **Afficher toutes les dataclasses** dans le menu d'options de l'Explorateur : ![](assets/en/ORDA/showClass.png) + +Les classes d'utilisateurs ORDA ont une icône différente des autres classes. Les classes vides sont grisées : + +![](assets/en/ORDA/classORDA2.png) + +Pour créer un fichier de classe ORDA, il vous suffit de double-cliquer sur la classe prédéfinie correspondante dans l'Explorateur. 4D crée le fichier de classe et ajoute le code `extends`. Par exemple, pour une classe Entity : + +``` +Class extends Entity +``` + +Une fois qu'une classe est définie, son nom n'est plus grisé dans l'Explorateur. + + +### Modifier des classes + +Pour ouvrir une classe ORDA définie dans l'éditeur de méthode 4D, sélectionnez ou double-cliquez sur un nom de classe ORDA et utilisez **Editer...** dans le menu contextuel/menu d'options de la fenêtre d'Explorateur : + +![](assets/en/ORDA/classORDA4.png) + +Pour les classes ORDA basées sur le datastore local (`ds`), vous pouvez accéder directement au code de la classe depuis la fenêtre de 4D Structure : + +![](assets/en/ORDA/classORDA5.png) + + +### Éditeur de méthode + +Dans l'éditeur de méthode de 4D, les variables saisies comme une classe ORDA bénéficient automatiquement des fonctionnalités d'auto-complétion. Exemple avec une variable de classe Entity : + +![](assets/en/ORDA/AutoCompletionEntity.png) + diff --git a/website/translated_docs/fr/ORDA/overview.md b/website/translated_docs/fr/ORDA/overview.md new file mode 100644 index 00000000000000..32af822f9cd9c1 --- /dev/null +++ b/website/translated_docs/fr/ORDA/overview.md @@ -0,0 +1,34 @@ +--- +id: overview +title: Que signifie ORDA ? +--- + +ORDA signifie **Object Relational Data Access** (Accès objet aux données relationnelles). C'est une technologie avancée permettant l'accès au modèle et aux données d'une base de données à l'aide d'objets. + +Les relations font partie du concept de façon transparente, en combinaison avec le principe du [Lazy loading](glossary.md#lazy-loading), afin de supprimer toutes les problématiques spécifiques à la sélection ou au transfert de données. + +Avec ORDA, les données sont accessibles via une couche d'abstraction, le [datastore](dsMapping.md#datastore). Un datastore est un objet fournissant une interface au modèle de base de données et aux données via des objets et des classes. Par exemple, une table correspond à un objet [dataclass](dsMapping.md#dataclass), un champ est un [attribut](dsMapping.md##attribute) d'une dataclass, et les enregistrements sont des [entités](dsMapping.md#entity) et des [sélections d'éntités](dsMapping.md#entity-selection). + + +## Pourquoi utiliser ORDA ? + +Au lieu de représenter des informations sous forme de tables, d'enregistrements et de champs, ORDA utilise une autre approche qui permet de faire correspondre plus précisément les données aux concepts concrets. + +Imaginez la possibilité de dénormaliser une structure relationnelle sans pour autant réduire l'efficacité. Imaginez que vous décriviez la totalité des objets métier dans votre application de telle sorte que l'utilisation des données devienne simple et directe, et supprime le besoin d'une compréhension complète de la structure relationnelle. + +Dans un datastore, une seule dataclass peut incorporer tous les éléments qui composent une table de base de données relationnelle traditionnelle, mais peut également inclure des valeurs d'entités parentes liées et des références directes aux entités et aux sélections d'entités liées. + +Une requête retourne une liste d'entités appelée sélection d'entités (entity selection), qui joue le rôle d'un ensemble de lignes d'une requête SQL. La différence est que chaque entité "sait" à quoi elle appartient dans le modèle de données et "comprend" sa relation avec toutes les autres entités. Cela signifie qu'un développeur n'a pas besoin d'expliquer, dans une requête, comment relier les différentes informations, ni comment écrire, dans une mise à jour, des valeurs modifiées dans la structure relationnelle. + +En outre, les objets ORDA tels que les sélections d'entités ou les entités peuvent être facilement liés à des objets UI tels que des list box ou des variables. Combinés avec des fonctionnalités puissantes telles que les commandes `This` et `Form`, ils permettent de construire des interfaces modernes et modulaires basés sur des objets et des collections. + +## Comment utiliser ORDA ? + +Fondamentalement, ORDA gère des objets. Dans ORDA, tous les concepts principaux, y compris le datastore lui-même, sont disponible via des objets. In 4D, the datastore is automatically [mapped upon the 4D structure](dsMapping.md). + +Les objets dans ORDA peuvent être manipulés comme des objets standard 4D, mais ils bénéficient automatiquement de propriétés et de méthodes spécifiques. + +ORDA objects are created and instanciated when necessary by 4D methods (you do not need to create them). However, ORDA data model objects are associated with [classes where you can add custom functions](ordaClasses.md). + + + diff --git a/website/translated_docs/fr/ORDA/quickTour.md b/website/translated_docs/fr/ORDA/quickTour.md new file mode 100644 index 00000000000000..a7e599027c98b0 --- /dev/null +++ b/website/translated_docs/fr/ORDA/quickTour.md @@ -0,0 +1,194 @@ +--- +id: quickTour +title: Tour d'horizon d'ORDA +--- + +Étant donné qu'ORDA est basé sur des objets, l'utilisation d'ORDA nécessite des connaissances de base en programmation d'objets. + +## Explorer le datastore + +Le datastore ORDA est automatiquement basé sur une structure de base de données 4D, à condition qu'elle soit conforme aux [prérequis d'ORDA](overview.md#orda-prerequisites). + +Cet exemple utilisera la structure de base de données 4D simple suivante : + +![](assets/en/ORDA/struc.png) + +Pour savoir ce qui est exposé en tant que datastore, créez une nouvelle méthode projet, écrivez la ligne suivante : + +```code4d +TRACE +``` + +Exécutez la méthode - elle appelle simplement la fenêtre du débogueur. Dans la zone d'Expression, double-cliquez pour insérer une expression et entrez `ds`. Elle retourne l'objet du datastore. Déployez l'objet, vous pouvez voir que les tables et les champs sont automatiquement exposés par ORDA en tant que propriétés de l'objet `ds` : + +![](assets/en/ORDA/debug1.png) + +Cela signifie par exemple que, chaque fois que vous avez besoin de vous référer au champ city de la table [Company], dans ORDA il vous suffit d'écrire : + +```code4d +ds.Company.city // retourne le nom de la ville +``` + +> Dans le monde d'ORDA, ds.Company est une **dataclass**. ds.Company.city est un **attribut**. + +> ORDA est sensible à la casse. `ds.company.city` ne fera pas référence à l'attribut ds.Company.city. + +Vous avez également remarqué la propriété extra `hires` dans la dataclass ds.Company. Cela ne correspond pas à un champ. `hire`est en fait le nom de la relation *1 vers N* entre Company et Employee : + +![](assets/en/ORDA/struc2s.png) *Nom de la relation tel que défini dans l'inspecteur* + +Cela signifie que, chaque fois que vous avez besoin d'accéder à la liste des employés travaillant pour une entreprise, il vous suffit d'écrire, dans ORDA : + +```code4d +ds.Company.hires // retourne la liste des employés +``` + +Mais n'allez pas trop vite. Voyons maintenant comment enregistrer des données dans des dataclass ORDA. + + +## Ajouter des données + +Avec ORDA, vous pouvez ajouter un enregistrement à une dataclass à l'aide de la commande `new()`. +> Dans le monde d'ORDA, un enregistrement est une **entité** (entity) - une entité est elle-même un objet. Une commande attachée à un objet spécifique est appelée une **méthode membre**. + +```code4d +$entity:=ds.Company.new() //créer une nouvelle référence d'entité +//dans la dataclass Company +//et l'assigner à la variable $entity +``` + +Un nouvel objet entité contient une "copie" de tous les attributs de sa dataclass parente, vous pouvez donc leur assigner des valeurs : + +```code4d +$entity.name:="ACME, inc." +$entity.city:="London" +//$entity.ID est automatiquement rempli +``` + +Pour le moment, l'entité n'existe qu'en mémoire. Pour la stocker dans le fichier de données, vous devez l'enregistrer à l'aide de la méthode membre `save()` : + +```code4d +$status:=$entity.save() +``` + + + + + + + + +L'éditeur des utilisateurs se trouve dans la boîte à outils de 4D. + +![](assets/en/Users/editor.png) + +### Ajouter et modifier des utilisateurs + +Vous utilisez l’éditeur d’utilisateurs pour créer des comptes utilisateurs, définir leurs propriétés et leur appartenance aux différents groupes. + +Pour ajouter un utilisateur depuis la boite à outils : + +1. Sélectionnez **Boîte à outils > Utilisateurs** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D. 4D affiche la fenêtre d’édition des utilisateurs. + +La liste des utilisateurs affiche tous les utilisateurs, y compris [le Super_Utilisateur et l'l’Administrateur](#designer-and-administrator). + +2. Cliquez sur le bouton d’ajout ![](assets/en/Users/PlussNew.png) situé au-dessous de la Liste des utilisateurs. OU Cliquez avec le bouton droit de la souris dans la Liste des utilisateurs et choisissez la commande **Ajouter** ou **Dupliquer** dans le menu contextuel. + +> La commande **Dupliquer** permet de créer rapidement plusieurs utilisateurs ayant des caractéristiques communes. + +4D ajoute un nouvel utilisateur à la liste, nommé par défaut "Nouvel utilisateurN". + +3. Saisissez le nom du nouvel utilisateur. Ce nom sera utilisé par l’utilisateur pour ouvrir la base. Vous pouvez renommer un utilisateur à tout moment en utilisant la commande **Renommer** du menu contextuel, ou en utilisant la combinaison Alt+clic (Windows) ou Option+clic (macOS) ou en cliquant deux fois sur un nom. + +4. Pour saisir le mot de passe de l’utilisateur, cliquez sur le bouton **Modifier...** dans la zone des propriétés de l’utilisateur et saisissez deux fois le mot de passe dans la boite de dialogue. Vous pouvez saisir jusqu’à 15 caractères alphanumériques. L’éditeur de mots de passe tient compte de la casse des caractères (majuscules ou minuscules). + +> Les utilisateurs peuvent modifier leur mot de passe à tout moment en fonction des options de la page Sécurité des propriétés de la base, ou à l'aide de la commande `CHANGE PASSWORD`. + +5. Définissez le ou les groupe(s) d’appartenance de l’utilisateur à l’aide du tableau “Membre des groupesâ€. Vous pouvez ajouter l’utilisateur sélectionné à un groupe en cochant l’option correspondante dans la colonne Membre. + +L’appartenance des utilisateurs aux groupes peut également être définie par groupe dans la [page Groupes](#configuring-access-groups). + +### Supprimer un utilisateur + +Pour supprimer un utilisateur, sélectionnez-le puis cliquez sur le bouton de suppression ou utilisez la commande **Supprimer** du menu contextuel. ![](assets/en/Users/MinussNew.png) + +Les utilisateurs supprimés n'apparaissent plus dans la liste de l'éditeur d'utilisateurs. A noter que les numéros des utilisateurs supprimés peuvent être réattribués lors de la création de nouveaux comptes. + +### Propriétés des utilisateurs + +- Le champ **Type d’utilisateur** : le champ Type d’utilisateur contient "Super_Utilisateur", "Administrateur", ou (pour tous les autres utilisateurs) "Utilisateur". + +- **Méthodes de démarrage** : Nom d'une méthode associée qui sera automatiquement associée lorsque l'utilisateur ouvre la base (facultatif). Cette méthode peut être utilisée par exemple pour charger les préférences utilisateur. + + +## Éditeur de groupes + +L'éditeur de groupes se trouve dans la boîte à outils de 4D. + +### Configurer des groupes + +Vous utilisez l’éditeur de groupes pour définir les éléments qu’ils contiennent (utilisateurs et/ou autres groupes) et pour répartir les accès aux plug-ins. + +Attention, une fois créé, un groupe ne peut pas être supprimé. Si vous souhaitez désactiver un groupe, il vous suffit de retirer tous les utilisateurs qu’il contient. + +Pour créer un groupe : + +1. Sélectionnez **Boîte à outils > Groupes** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D puis cliquez sur le bouton **Groupes**. 4D affiche la fenêtre d’édition des groupes. La liste des groupes affiche tous les groupes de la base. + +2. Cliquez sur le bouton ![](assets/en/Users/PlussNew.png) situé en-dessous de la liste des groupes. + OU + Faites un clic droit sur la liste de groupes et sélectionnez la commande **Ajouter** ou **Dupliquer** dans le menu contextuel. + +> La commande Dupliquer permet de créer rapidement plusieurs groupes ayant des caractéristiques communes. + +4D ajoute un nouveau groupe à la liste, nommé par défaut "Nouveau groupe1". + +3. Saisissez le nom du nouveau groupe. Le nom du groupe peut avoir une longueur maximale de 15 caractères. Vous pouvez renommer un groupe à tout moment en utilisant la commande **Renommer** du menu contextuel, ou en utilisant la combinaison Alt+clic (Windows) ou Option+clic (macOS) ou en cliquant deux fois sur un nom. + + +### Placer des utilisateurs ou des groupes dans des groupes + +Vous pouvez placer tout utilisateur ou tout groupe dans un groupe et vous pouvez aussi le placer dans plusieurs groupes. Il n’est pas obligatoire de placer un utilisateur dans un groupe. + +Pour placer un utilisateur ou un groupe dans un groupe, il suffit de sélectionner le groupe dans la liste puis de cocher l’option "Membre" pour chaque utilisateur ou groupe dans la zone d’attribution des membres : + +![](assets/en/Users/groups.png) + +Si vous cochez le nom d’un utilisateur, l’utilisateur est ajouté au groupe. Si vous cochez un nom de groupe, tous les utilisateurs du groupe sont ajoutés au nouveau groupe. L’utilisateur ou le groupe affilié dispose alors des privilèges d’accès affectés au nouveau groupe. + +Placer des groupes dans d’autres groupes permet de créer une hiérarchie d’utilisateurs. Les utilisateurs d’un groupe placé dans un autre groupe disposent des autorisations d’accès des deux groupes. Reportez-vous au paragraphe [Un schéma d’accès hiérarchique](#an-access-hierarchy-scheme) ci-dessous. + +Pour supprimer un utilisateur ou un groupe d’un autre groupe, il suffit de désélectionner l’option correspondante dans la liste des membres. + +### Affecter un groupe à un plug-in ou à un serveur + +Vous pouvez affecter un groupe d’accès à tout plug-in 4D installé dans votre base de données. Les plug-ins comprennent tous les plug-ins de 4D ainsi que tout plug-in développés par une société tierce. + +Répartir les accès aux plug-ins vous permet de contrôler l’utilisation des licences dont vous disposez pour ces plug-ins. Tout utilisateur n’appartenant pas au groupe d’accès à un plug-in ne pourra pas charger ce plug-in. + +Vous pouvez également contrôler l’utilisation du serveur Web et du serveur SOAP de 4D en mode distant via la zone d’accès aux plug-ins. + +La zone “Plug-ins†de la page Groupes de la boîte à outils liste tous les plug-ins chargés par l’application 4D. Pour affecter un groupe à un plug-in, il suffit de cocher l’option correspondante. + +![](assets/en/Users/plugins.png) + +Les lignes **4D Client Web Server** et **4D Client SOAP Server** permettent contrôler la possibilité de publication Web et SOAP (Web Services) de chaque 4D en mode distant. En effet, ces licences sont considérées par 4D Server comme des licences de plug-ins. Ainsi, comme pour un plug-in, vous pouvez restreindre le droit d’utiliser ces licences à un groupe d’utilisateurs spécifique. + + +### Un schéma d’accès hiérarchique + +Le meilleur moyen d’assurer la sécurité de votre base de données et de proposer différents niveaux d’accès aux utilisateurs est d’utiliser un schéma hiérarchique des accès. Les utilisateurs peuvent être affectés à différents groupes et les groupes peuvent être hiérarchisés pour créer des niveaux de droits d’accès. Cette section décrit différentes approches de ce thème. + +Dans cet exemple, un utilisateur appartient à l’un des trois groupes définis suivant son niveau de responsabilité. Les utilisateurs du groupe Comptabilité sont responsables de la saisie de données. Les utilisateurs du groupe Dir. finance sont responsables de la mise à jour des données, comme la mise à jour d’enregistrements ou la suppression d’enregistrements obsolètes. Les utilisateurs du groupe Direction générale sont responsables de l’analyse de données, ce qui inclut la réalisation de recherches et l’impression d’états. + +Les groupes sont hiérarchisés afin que les privilèges soient correctement affectés aux utilisateurs de chacun des groupes. + +- Le groupe Direction générale ne contient que les utilisateurs de “haut niveauâ€. ![](assets/en/Users/schema1.png) + +- Le groupe Dir. finance contient les utilisateurs du groupe Direction générale. ![](assets/en/Users/schema2.png) + +- Le groupe Comptabilité contient des opérateurs de saisie mais aussi les utilisateurs des groupes Dir. finance et donc Direction générale. ![](assets/en/Users/schema3.png) + +Vous pouvez ensuite décider des privilèges affectés à chaque groupe suivant le niveau de responsabilité des utilisateurs qu’il contient. + +Un tel système hiérarchique rend aisée l’affectation d’un utilisateur à un groupe. Il suffit de placer chaque utilisateur dans un groupe et d’utiliser la hiérarchie des groupes pour déterminer les accès. diff --git a/website/translated_docs/fr/ORDA/remoteDatastore.md b/website/translated_docs/fr/ORDA/remoteDatastore.md new file mode 100644 index 00000000000000..6dda6cc2d2c1ab --- /dev/null +++ b/website/translated_docs/fr/ORDA/remoteDatastore.md @@ -0,0 +1,58 @@ +--- +id: remoteDatastore +title: Utiliser un datastore distant +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different remote clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the [**HTTP REST server**](REST/gettingStarted.md). +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/website/translated_docs/fr/ORDA/remoteDatastores.md b/website/translated_docs/fr/ORDA/remoteDatastores.md new file mode 100644 index 00000000000000..b98b99e71e4168 --- /dev/null +++ b/website/translated_docs/fr/ORDA/remoteDatastores.md @@ -0,0 +1,60 @@ +--- +id: datastores +title: Utiliser un datastore distant +--- + +Un [datastore](dsMapping.md#datastore) exposé sur une application 4D Server est accessible simultanément via différents clients : + +- Les applications 4D distantes utilisant ORDA pour accéder au datastore principal à l’aide de la commande `ds`. A noter que l'application 4D distante peut toujours accéder à la base de données en mode classique. Ces accès sont gérés par le **serveur d'applications 4D**. +- D'autres applications 4D (4D Remote, 4D Server) ouvrant une session sur le datastore distant via la commande `Open datastore`. Ces accès sont transmis par le **serveur HTTP REST**. +- Les requêtes 4D for iOS pour la mise à jour des applications iOS. Ces accès sont remis par le **serveur HTTP**. + + +Lorsque vous travaillez avec un datastore distant référencé par des appels à la commande `Open datastore`, la connexion entre les process qui effectuent la requête et le datastore distant est gérée par des sessions. + + +## Ouverture des sessions + +Lorsqu'une application 4D (c'est-à-dire un process) ouvre un datastore externe à l'aide de la commande `Open datastore`, une session est créée sur le datastore distant pour gérer la connexion. Cette session est identifiée à l'aide d'un ID de session interne, associé au `localID` de l'application 4D. Cette session gère automatiquement l'accès aux données, aux sélections d'entités ou aux entités. + +Le `localID` est local à la machine qui se connecte au datastore distant, ce qui signifie : + +* Que si d'autres process de la même application doivent accéder au même datastore distant, ils peuvent utiliser le même `localID` et partager alors la même session. +* Que si un autre process de la même application ouvre le même datastore distant, mais avec un autre `localID`, il créera une nouvelle session sur le datastore distant. +* Que si un autre poste se connecte au même datastore distant avec le même `localID`, il créera une autre session avec un autre cookie. + +Ces principes sont illustrés dans les graphiques suivants : + +![](assets/en/ORDA/sessions.png) + +> Pour les sessions ouvertes par des requêtes REST, veuillez consulter aux [Utilisateurs et sessions](REST/authUsers.md). + +## Visionnage des sessions + +Les process qui gèrent les sessions d'accès aux datastore apparaissent dans la fenêtre d'administration de 4D Server : + +* nom : "Gestionnaire REST : < nom du process > " +* type : type Worker Server HTTP +* session : le nom de session est le nom d'utilisateur passé à la commande Open datastore. + +Dans l'exemple suivant, deux process sont en cours d'exécution pour la même session : + +![](assets/en/ORDA/sessionAdmin.png) + +## Verrouillage et transactions + +Les fonctionnalités ORDA relatives au verrouillage d'entité et aux transactions sont gérées au niveau du process dans les datastore distants, tout comme en mode client/serveur ORDA : + +* Si un process verrouille une entité à partir d'un datastore distant, l'entité est verrouillée pour tous les autres process, même lorsque ces process partagent la même session (voir [Verrouillage d'entités](entities.md#entity-locking)). Si plusieurs entités pointant vers le même enregistrement ont été verrouillées dans un process, elles doivent toutes être déverrouillées dans le process pour supprimer le verrou. Si un verrou a été mis sur une entité, il est supprimé lorsqu'il n'existe plus de référence à cette entité en mémoire. +* Les transactions peuvent être lancées, validées ou annulées séparément sur chaque datastore distant à l'aide des méthodes `dataStore.startTransaction( )`, `dataStore.cancelTransaction( )`, et `dataStore.validateTransaction( )`. Elles n’ont pas d’incidences sur les autres datastore. +* Les commandes classiques du langage 4D (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) s'appliquent uniquement au datastore principal (renvoyé par `ds`). Si une entité d'un datastore distant est verrouillée par une transaction dans un process, les autres process ne peuvent pas la mettre à jour, même si ces process partagent la même session. +* Les verrous sur les entités sont supprimés et les transactions sont annulées : + * quand le processus est tué. + * quand la session est fermée sur le serveur + * lorsque la session est arrêtée à partir de la fenêtre d’administration du serveur. + +## Fermeture des sessions + +Une session est automatiquement fermée par 4D lorsqu'il n'y a pas eu d'activité durant son timeout. Le timeout par défaut est de 60 mn mais cette valeur peut être paramétrée à l'aide du paramètre `connectionInfo` de la commande `Open datastore`. + +Si une demande est envoyée au datastore distant après la fermeture de la session, elle est automatiquement recréée si possible (licence disponible, serveur non arrêté, etc.). A noter cependant que le contexte de la session des verrous et des transactions est perdu (voir ci-dessus). diff --git a/website/translated_docs/fr/Preferences/forms.md b/website/translated_docs/fr/Preferences/forms.md new file mode 100644 index 00000000000000..26d6c91fee21bf --- /dev/null +++ b/website/translated_docs/fr/Preferences/forms.md @@ -0,0 +1,35 @@ +--- +id: forms +title: Forms Page +--- + + +This page lets you set the default operation and display of the 4D Form editor. + +## Déplacer + +This group of options sets parameters for moving objects using the keyboard or the mouse in the Form editor. + +### Step using keyboard + +This option allows setting the value (in points) of the step used for moving or resizing an object using the keyboard and the **Shift** key. + +### When moving beyond window limits + +This option allows setting the behavior of the Form editor when moving an object using the mouse beyond window limits. + +* **Autoscroll**: When this option is checked, this action causes the scroll of the form in the window, as if you clicked on the scroll bars. This behavior is useful for moving objects in large forms. +* **Start drag and drop**: When this option is checked, this action is interpreted as a drag and drop. The form window is not modified and the moved object can be dropped in another window (if its contents are compatible), for example, in another form. This behavior is useful for recycling objects among several forms or using object libraries (see [Creating and using custom object libraries](FormEditor/objectLibrary.md#creating-and-using-custom-object-libraries)). + +You can configure this option depending on your work habits and development needs. + +### Activate auto alignment by default + +This option activates auto alignment by default in each new window of the Form editor. It is possible to modify this option individually in each window (refer to [Using the magnetic grid](FormEditor/formEditor.md#using-the-magnetic-grid)). + +## New form default display + +- **Limits**, **Rulers**, ...: check items that must be displayed by default in each new window of the Form editor. It is possible to modify the display of each window individually using the **Display** hierarchical menu of the Form editor. +- **Color for marker lines**: modifies the color of the marker lines used in the Form editor to define the different areas (header, breaks, detail and footer, etc.). For more information about markers, refer to [Using output control lines](https://doc.4d.com/4Dv18R6/4D/18-R6/Using-output-control-lines.300-5217678.en.html). +- **Default display shield**: sets which shields to display by default in each new window of the Form editor. For more information about shields, refer to [Using shields](FormEditor/formEditor.md#using-shields). + diff --git a/website/translated_docs/fr/Preferences/general.md b/website/translated_docs/fr/Preferences/general.md new file mode 100644 index 00000000000000..08a37262aee4b6 --- /dev/null +++ b/website/translated_docs/fr/Preferences/general.md @@ -0,0 +1,145 @@ +--- +id: general +title: General Page +--- + +This page contains various options to configure the general operation of your 4D application. + +## Options + +### At startup + +This option allows you to configure the default 4D display at startup, when the user launches only the application. + +* **Do nothing**: Only the application window appears, empty. +* **Open Local Project dialog**: 4D displays a standard open document dialog box, allowing you to select a local project. +* **Open last used project**: 4D directly opens the last project used; no opening dialog box appears. >To force the display of the opening dialog box when this option is selected, hold down the **Alt** (Windows) or **Option** (macOS) key while launching the project. +* **Open Remote Project dialog**: 4D displays the standard 4D Server logon dialog, allowing you to select a project published on the network. +* **Open Welcome Wizard dialog** (factory setting): 4D displays the Welcome Wizard dialog box. +> > **4D Server**: The 4D Server application ignores this option. In this environment, the **Do nothing** mode is always used. + +### Automatic form creation + +> This option is only used in binary databases; it is ignored in project architecture. See doc.4d.com. + +### Window tabbing (macOS only) + +Starting with macOS Sierra, Mac applications can benefit from the Automatic Window Tabbing feature that helps organizing multiple windows: document windows are stacked into a single parent window and can be browsed through tabs. This feature is useful on small screens and/or when using a trackpad. + +You can benefit from this feature in the following environments (with 4D 64-bit versions only): + +* Method Editor windows +* Form Editor windows + +All windows from these editors can be put in tab form: + +![](assets/en/Preferences/general2.png) + +A set of commands in the **Window** menu allows managing the tabs: + +![](assets/en/Preferences/general3.png) + +In the 4D's Preferences dialog box, the **Window tabbing** option allows you to control this feature: + +![](assets/en/Preferences/general4.png) + +Trois options sont disponibles : + +* **According to System Preferences** (default): 4D windows will behave like defined in the macOS System Preferences (In full screen, Always, or Manually). +* **Never**: Opening a new document in 4D form editor or method editor will always result in creating a new window (tabs are never created). +* **Always**: Opening a new document in 4D form editor or method editors will always result in creating a new tab. + +### Appearance (macOS only) + +This menu lets you select the color scheme to use for the **4D development** environment. The specified scheme will be applied to all editors and windows of the Design mode. + +> You can also set the color scheme to use in your **desktop applications** in the "Interface" page of the Settings dialog box. + +Trois options sont disponibles : + +* **According to System Color Scheme Preferences** (default): Use the color scheme defined in the macOS System Preferences. +* **Light**: Use the Light Theme +* **Dark**: Use the Dark Theme + +> This preference is only supported on macOS. On Windows, the "Light" scheme is always used. + + +### Exit Design when going to Application Environment + +If this option is checked, when the user switches to the Application environment using the **Test Application** menu command, all the windows of the Design environment are closed. If this option is not checked (factory setting), the windows of the Design environment remain visible in the background of the Application environment. + + +### Enable binary database creation + +If you check this option, two items are added in the **File > New** menu and the **New** toolbar button: + +* **Database...** +* **Database from Structure Definition...** + +![](assets/en/Preferences/general5.png) + +These items allow you to create binary databases (see [Creating a new database](https://doc.4d.com/4Dv18R6/4D/18-R6/Creating-a-new-database.300-5217610.en.html) section). They are no longer proposed by default because 4D recommends using project-based architecture for new developments. + +## When creating a new project + +### Use Log File + +When this option is checked, a log file is automatically started and used when a new database is created. For more information, please refer to [Log file (.journal)](Backup/log.md). + +### Create package + +When this option is checked, 4D databases are automatically created in a folder suffixed .4dbase. + +Thanks to this principle, under macOS the database folders appear as packages having specific properties. Under Windows, this has no particular impact. + +### Create `.gitignore` file + +You might need or want git to ignore some files in your new projects. + +You can set this preference by checking the **Create .gitignore file** option. + +![](assets/en/Preferences/gitignore.png) + +When a project is created in 4D and that box is checked, 4D creates a `.gitignore` file at the same level as the `Project` folder (see [Architecture of a Project](Project/architecture.md#gitignore-file-optional)). + +You can define the default contents of the `.gitignore` file by clicking the pencil icon. This will open the .gitignore configuration file in your text editor. The contents of this file will be used to generate the `.gitignore` files in your new projects. + +The [official git documentation](https://git-scm.com/docs/gitignore) is a great resource to understand how `.gitignore` files work. + +### Language of text comparison + +This parameter configures the default language used for character string processing and comparison in new databases. The language choice has a direct influence on the sorting and searching of text, as well as the character case, but it has no effect on the translation of texts or on the date, time or currency formats, which remain in the system language. By default (factory setting), 4D uses the current user language set in the system. + +A 4D database can thus operate in a language different from that of the system. When a database is opened, the 4D engine detects the language used by the data file and provides it to the language (interpreter or compiled mode). Text comparisons, regardless of whether they are carried out by the database engine or the language, are done in the same language. + +When creating a new data file, 4D uses the language previously set in this menu. When opening a data file that is not in the same language as the structure, the data file language is used and the language code is copied into the structure. +> You can modify this parameter for the open database using the Database Settings (see [Text comparison](https://doc.4d.com/4Dv18R6/4D/18-R6/DatabaseData-storage-page.300-5217842.en.html#460252)). + +## Documentation Location + +This area configures access to the 4D HTML documentation displayed in your current browser: + +* When you hit the **F1** key while the cursor is inserted in a 4D class function or command name in the Method editor; +* When you double-click on a 4D command in the **Commands Page** of the Explorer. + + +### Documentation language + +Language of the HTML documentation to display. You can select a documentation in a different language from the application language. + +### Commencer par consulter le dossier local + +> This option is only taken into account for command documentation access (excluding class functions). + +Sets where 4D will look for documentation pages. + +* When checked (default), 4D first looks for the page in the local folder (see below). If it is found, 4D displays the page in the current browser. If not, 4D automatically looks for it in the on-line documentation Web site. This makes it possible to access the documentation even when you are offline. +* If it is not found, 4D displays an error message in the browser. When not checked, 4D looks for the desired page directly in the on-line documentation Web site and displays it in the current browser. + +### Local folder + +> This option is only taken into account for command documentation access (excluding class functions). + +Indicates the location of the static HTML documentation. By default, this is the \Help\Command\language subfolder. You can view the location by clicking on the menu associated with the area. If this subfolder is not present, the location is shown in red. + +You can modify this location as desired, for example if you want to display the documentation in a language different from that of the application. The static HTML documentation can be located on another volume, on a web server, etc. To designate a different location, click on the **[...]** button next to the entry area and choose a documentation root folder (folder corresponding to the language: `fr`, `en`, `es`, `de` or `ja`). diff --git a/website/translated_docs/fr/Preferences/methods.md b/website/translated_docs/fr/Preferences/methods.md new file mode 100644 index 00000000000000..4855c0722b23a3 --- /dev/null +++ b/website/translated_docs/fr/Preferences/methods.md @@ -0,0 +1,185 @@ +--- +id: methods +title: Methods Page +--- + +This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into two sections accessed using the Theme and Options tabs. + +## Themes + +This page allows selecting, creating, or configuring Method editor themes. A theme defines the font, font size, colors and styles of items displayed in the code editor. + +![](assets/en/Preferences/themes.png) + +### Theme list + +In this list, you select the theme to apply to the code editor. All available themes are displayed, including custom themes (if any). 4D provides two themes by default: + +* **Default Light Theme** +* **Default Dark Theme** + +> Default themes cannot be modified or deleted. + +A **myTheme** theme is automatically added if you already customized method editor styles in previous 4D releases. + +### Creating custom themes + +You can create themes that you can fully customize. To create a theme, select an existing theme and click on the **+** at the bottom of the theme list. You can also add customized themes by copying theme files in the `4D Editor Themes` folder (see below). + +### Custom theme files + +Each custom theme is stored in a single JSON file named *themeName.json* The JSON files for custom themes are stored in the `4D Editor Themes` folder located at the same level as the 4D [preferences file](overview.md#storage). + +If key values are not defined in a custom theme, they default to the values from the *Default Light Theme*. If a JSON theme file is invalid, the *Default Light Theme* is loaded and an error is generated. + +> When a theme file is modified by an external editor, 4D must be restarted to take the modification(s) into account. + +## Theme definition + +Defining a theme means: + +- setting a global font and font size for the whole code editor, +- assigning specific styles and colors to each 4D language element (fields, tables, variables, parameters, SQL, etc.), SQL language element (keywords, functions, etc.), and color backgrounds. + +Combining different colors and styles is particularly useful for code maintenance purposes. + +### Font and Font size + +The **font** and **font size** menus allows you to select the font name and size used in the Method editor entry area for all categories. + +### 4D Language and SQL Language + +You can set different font styles and colors (font color or background color) for each type of language element. You can select the element(s) to customize in the Category list. + + +### Other Styles + +These options configure the various colors used in the Method editor and debugger interfaces. + +![](assets/en/Preferences/categories.png) + + +| | Description | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Background color** | Background color of Method editor window. | +| **Border of the running line in the debugger** | Color of the border surrounding the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options) page. | +| **Cursor line background color** | Background color of line containing the cursor. | +| **Execution line background color** | Background color of line being executed in the debugger. | +| **Highlight of the found words** | Highlight color of words found in a search. | +| **Highlight of the parentheses** | Highlight color of corresponding parentheses (used when pairs of parentheses are signaled by highlighting, see [Options](#options)). | +| **Highlight of the blocks** | Highlight color for selected logical blocks when the "Highlight logical blocks" option is enabled in the [Options](#options). | +| **Highlight of the same variable or field** | Highlight color for other occurrences of the same variable or field text when one of the "Highlighting variables and text" option is enabled in the [Options](#options). | +| **Highlight of the running line in the debugger** | Highlight color of the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options). | +| **Selection back color** | Background color of selection. | +| **Suggested text** | Color of autocomplete text suggested by the Method editor. | + + + +## Options + + +This page configures Method editor display options. + +![](assets/en/Preferences/options.png) + + +### Options + + + +#### 4D Programming Language (Use regional system settings) + +Allows you to disable/enable the "international" code settings for the local 4D application. +- **unchecked** (default): English-US settings and the English programming language are used in 4D methods. +- **checked**: Regional settings are used in 4D methods. + +> If you modify this option, you need to restart the 4D application so that the change is taken into account. + +#### Indentation + +Changes the indentation value for the 4D code in the Method editor. The width must be specified in points (10 by default). + +4D code is automatically indented in order to reveal its structure: + +![](assets/en/Preferences/optionsIndent.png) + +Modifying this default value can be useful if your methods contain complex algorithms with many levels of embedding. Narrower indentation can be used in order to limit horizontal scrolling. + +#### Show Line Numbers + +Lets you display the line numbers by default in each window of the Method editor. You can also show/hide line numbers for the current window directly from the Method editor. + +#### Show Lists + +Lets you choose whether or not to show the lists of objects (Commands, Tables and fields, etc.) by default when the Method editor window is opened. You can also show or hide each list directly from the Method editor. + +#### Highlight the logical blocks + +When checked, the whole code belonging to a logical block (If/End if for example) is highlighted when the mouse is placed over the expanded node: + +![](assets/en/Preferences/optionsLogicalBlocks.png) + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Always show block lines + +Allows to hide vertical block lines permanently. The block lines are designed to visually connect nodes. By default, they are always displayed (except when collapse/expand icons are hidden, see below). + +![](assets/en/Preferences/optionsBlockLines.png) + +#### Hide collapse/expand icons + +Allows you to hide all expand/collapse icons by default when displaying code. When the option is checked, node icons (as well as local block lines, see above), are displayed temporarily when the mouse is placed over a node: + +![](assets/en/Preferences/optionsHideIcons.png) + +#### Insert () and closing } ) ] " + +Enables automatic insertion of () and closing braces while typing code. This option controls two automatic features: + +- **parentheses pair ()**: Added after a 4D command, keyword or project method inserted from a suggestion or completion list, if the inserted element requires one or more mandatory arguments. For example, if you type "C_OB" and press Tab, 4D writes "C_OBJECT()" and sets the insertion point inside the (). + +- **closing }, ), ], or "**: Character added when you type respectively an opening {, (, ], or ". This feature allows inserting matching pairs of symbols at the insertion point or surrounding a selected text. For example, if you highlight a string and type a single ", the whole selected string will be enclosed in "": + +![](assets/en/Preferences/optionsClosing.png) -> " -> ![](assets/en/Preferences/optionsClosing2.png) + +#### Matching [](){}"" + +Sets the graphic signaling of matching braces and double quotes in the code. This signaling appears whenever a square bracket, parenthesis, curly bracket, or double quote is selected. Les options suivantes sont disponibles : + +- **None**: No signaling +- **Rectangle** (default): Braces/double quotes surrounded by a black line + ![](assets/en/Preferences/optionsRectangle.png) +- **Background Color**: Braces/double quotes highlighted (the color is set in the [Theme](#theme-definition) page). +- **Bold**: Braces/double quotes displayed in bold. + +#### Highlighted variables and fields + +Allows to highlight all occurrences of the same variable or field in an open method window. + +![](assets/en/Preferences/optionsVariables.png) + +- **No**(default): No highlight +- **On cursor**: All occurrences are highlighted when the text is clicked +- **On selection**: All occurrences are highlighted when the text is selected + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Debug (Highlight the line running) + +Highlights the line that is currenty running in the debugger in addition to the regular yellow arrow indicator. + +![](assets/en/Preferences/optionsLine.png) + +If you deselect this option, only the yellow arrow is shown. + +### Suggestions + +This area lets you configure autocomplete mechanisms in the Method editor to adapt it to your own work habits. + +| | Description | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Automatic opening of window for | Triggers the automatic display of the suggestion window for:

        • Constantes
        • Variables (local and interprocess) and object attributes
        • Tables
        • Prototypes (*i.e.*, class functions)

        For example, when the "Variables (local or interprocess) and object attributes" option is checked, a list of suggestions appears when you type the $ character:

        ![](assets/en/Preferences/suggestionsAutoOpen.png)

        You can disable this functioning for certain elements of the language by deselecting their corresponding option. | +| Validation of a suggestion for | Sets the entry context that allows the Method editor to validate automatically the current suggestion displayed in the autocomplete window.

        • **Tab and delimiters**
          When this option is selected, you can validate the current selection with the Tab key or any delimiter that is relevant to the context. For example, if you enter "ALE" and then "(", 4D automatically writes "ALERT(" in the editor. Here is the list of delimiters that are taken into account:
          ( ; : = < [ {
        • **Tab only**
          When this option is selected, you can only use the Tab key to insert the current suggestion. This can be used more particularly to facilitate the entry of delimiter characters in element names, such as ${1}.

          **Note**: You can also double-click in the window or press the Carriage return key to validate a suggestion.

        | + + diff --git a/website/translated_docs/fr/Preferences/overview.md b/website/translated_docs/fr/Preferences/overview.md new file mode 100644 index 00000000000000..28ba650e3b45c3 --- /dev/null +++ b/website/translated_docs/fr/Preferences/overview.md @@ -0,0 +1,43 @@ +--- +id: overview +title: Aperçu +--- + +User preferences specify various settings affecting your working environment, e.g. default options, display themes, method editor features, shortcuts, etc. They are applied to all projects opened with your 4D or 4D Server application. + +**4D Server**: Object locking occurs when two or more users try to modify the settings in the Preferences dialog box at the same time. Only one user can use the Preferences dialog box at a time. +> 4D offers a different set of parameters specific to the open projet: **Settings** (available from the **Design** menu). For more information, refer to the Settings chapter. + +## Access + +You can access the Preferences dialog box from the **Edit > Preferences...** menu (Windows) or the **4D** Application menu (macOS): + +![](assets/en/Preferences/overviewAccess.png) + +This menu option is available even when there is no open project. + +You can also display the Preferences dialog box in Application mode using the "Preferences" standard action (associated with a menu item or a button) or using the `OPEN SETTINGS WINDOW` command. + +## Storage + +Settings made in the Preferences dialog box are saved in an XML format preferences file named **4D Preferences vXX.4DPreferences** that is stored in the active 4D folder of the current user, as returned by the [`Get 4D folder`](https://doc.4d.com/4Dv18R6/4D/18-R6/Get-4D-folder.301-5198423.en.html) command: + +* Windows: `{disk}\Users\{UserName}\AppData\Roaming\4D` +* macOS: `{disk}:Users:{UserName}:Library:Application Support:4D` + +## Customizing parameters and reset settings + +In settings dialog boxes, parameters whose values have been modified appear in bold: + +![](assets/en/Preferences/overviewUser.png) + +Preferences indicated as customized may have been modified directly in the dialog box, or may have been modified previously in the case of a converted database. + +A parameter still appears in bold even when its value is replaced manually with its default values. This way it is always possible to visually identify any parameters that have been customized. + +To reset the parameters to their default values and remove the bold style indicating that they have been customized, click on the **Reset to factory settings** button: + +![](assets/en/Preferences/overviewSettings.png) + +This button resets all the parameters of the current page. It becomes active when at least one parameter has been modified on the current page. + diff --git a/website/translated_docs/fr/Preferences/shortcuts.md b/website/translated_docs/fr/Preferences/shortcuts.md new file mode 100644 index 00000000000000..ce039b2d7f044c --- /dev/null +++ b/website/translated_docs/fr/Preferences/shortcuts.md @@ -0,0 +1,14 @@ +--- +id: shortcuts +title: Shortcuts Page +--- + +This page lists all the shortcuts used in the 4D Design environment (except for standard "system" shortcuts, such as Ctrl+C/Command+C for the Copy command). + +![](assets/en/Preferences/shortcuts.png) + +To modify a shortcut, you can select/deselect the item to modify (Shift, Alt or letter key) in the list. You can also double-click on a shortcut to configure it using a specific dialog box. + +Note that each shortcut implicitly includes the **Ctrl** (Windows) or **Command** (macOS) key. + +If you edit this list, your custom shortcuts settings are stored in a *4DShortcutsvXX.xml* file, created at the same level as the [user preferences file](overview.md#storage). Hence, each time 4D is updated your keyboard shortcut preferences remain. \ No newline at end of file diff --git a/website/translated_docs/fr/Preferences/structure.md b/website/translated_docs/fr/Preferences/structure.md new file mode 100644 index 00000000000000..b49deef74ef28a --- /dev/null +++ b/website/translated_docs/fr/Preferences/structure.md @@ -0,0 +1,26 @@ +--- +id: structure +title: Structure Page +--- + +## Clé primaire + +These options in the preferences modify the default name and type of the primary key fields that are added automatically by 4D when new tables are created or by means of the [Primary key manager](https://doc.4d.com/4Dv18R6/4D/18-R6/Primary-key-manager.300-5217742.en.html)). + +Les options suivantes sont disponibles : + +* **Name** ("ID" by default): Sets the default name of primary key fields. You can use any name you want, as long as it respects the [4D naming rules](Concepts/identifiers.md#tables-and-fields). +* **Type** ([Longint](Concepts/dt_number.md) by default): Sets the default type of primary key fields. You can choose the UUID type. In this case, the primary key fields created by default are of the [Alpha type](Concepts/dt_string.md) and have the **UUID Format** and **Auto UUID** field properties checked. + +## Éditeur de structure + +This group of options configures the display of the 4D Structure editor. + +### Graphic quality of the structure + +This option varies the level of graphic detail in the Structure editor. By default, the quality is set to **High**. You can select Standard quality in order to give priority to display speed. The effect of this setting is mainly perceptible when using the zoom function (see the "Zoom" paragraph in [Structure editor](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html)). + +### When a folder is dimmed, its contents are: + +This option sets the appearance of dimmed tables in the Structure editor, when you carry out selections by folder (see [Highlight/dim tables by folder](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html#4592928)). The possible options are Dimmed (a shadow replaces the table image) and Invisible (the table disappears completely). + diff --git a/website/translated_docs/fr/Project/architecture.md b/website/translated_docs/fr/Project/architecture.md index 0106a91fdb63b6..56fa46b7360583 100644 --- a/website/translated_docs/fr/Project/architecture.md +++ b/website/translated_docs/fr/Project/architecture.md @@ -1,149 +1,155 @@ --- id: architecture -title: Architecture d'un projet 4D +title: Architecture of a project --- -A 4D project is made of several folders and files, stored within a single parent database folder (package folder). Par exemple: - -- MyProject - - Composants - - Données - - Logs - - Settings - - Documentation - - Plugins - - Project - - DerivedData - - Sources - - Trash - - Resources - - Settings - - userPreference.username - - WebFolder +Un projet 4D est constitué de plusieurs fichiers et dossiers, stockés dans un seul dossier parent de l'application (dossier package). Par exemple : + +- MonProjet + - `Composants` + - `Données` + - `Logs` + - `Settings` + - `Documentation` + - `Plugins` + - `Project` + - `DerivedData` + - `Sources` + - `Trash` + - `Resources` + - `Settings` + - `userPreferences.jSmith` + - `WebFolder` > Si votre projet a été converti depuis une base binaire, des dossiers supplémentaires peuvent être présents. Voir "Conversion de bases en projets" sur [doc.4d.com](https://doc.4d.com). + ## Dossier Project La hiérarchie du dossier Project se présente généralement comme suit : -- Fichier *nomBase*.4DProject -- Sources - + Classes - + DatabaseMethods - + Méthodes - + Formulaires - + TableForms - + Triggers -+ DerivedData -+ Trash (le cas échéant) - -### Fichier *nomBase*.4DProject - -Le fichier de développement de projet, utilisé pour désigner et lancer le projet. Ce fichier peut être ouvert par : - -- 4D Developer -- 4D Server (lecture seule, voir [Développer un projet](developing.md)) +- `.4DProject` file +- `Sources` + + `Classes` + + `DatabaseMethods` + + `Méthodes` + + `Formulaires` + + `TableForms` + + `Triggers` +- `DerivedData` +- `Trash` (if any) -**Note :** Dans les projets 4D, le développement est réalisé avec 4D Developer et le développement multi-utilisateurs est géré par des outils de contrôle de version. 4D Server peut ouvrir des fichiers .4DProject à des fins de test. -### Dossier Sources +### `.4DProject` file -| Contenu | Description | Format | -| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -| catalog.4DCatalog | Définit des tables et des champs | XML | -| folders.json | Explorer folder definitions | JSON | -| menus.json | Définit les menus | JSON | -| settings.4DSettings | Propriétés de la base *Structure*. Si les *propriétés utilisateur* sont définis, ils auront la priorité sur ces propriétés. Si les *propriétés utilisateur pour fichier de données* sont définies, elles auront la priorité sur ces propriétés | XML | -| tips.json | Définit les messages d'aide | JSON | -| lists.json | Listes définies | JSON | -| filters.json | Filtres définis | JSON | -| styleSheets.css | Feuilles de style CSS | CSS | -| styleSheets_mac.css | Feuilles de style css sur Mac (à partir d'une base binaire convertie) | CSS | -| styleSheets_windows.css | Feuilles de style css sur Windows (à partir d'une base binaire convertie) | CSS | +Le fichier de développement de projet, utilisé pour désigner et lancer le projet. Ce fichier peut être ouvert par : +- 4D +- 4D Server (read-only, see [Opening a remote project](Desktop/clientServer.md#opening-a-remote-project)) -#### Dossier DatabaseMethods +> Dans les projets 4D, le développement est réalisé avec 4D et le développement multi-utilisateurs est géré par des outils de contrôle de version. 4D Server peut ouvrir des fichiers .4DProject à des fins de test. -| Contenu | Description | Format | -| ------------------------ | ---------------------------------------------------------------- | ------ | -| *databaseMethodName*.4dm | Méthodes base définies dans la base. Un fichier par méthode base | Texte | +### `Sources` -#### Dossier Methods +| Contenu | Description | Format | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | +| catalog.4DCatalog | Définit des tables et des champs | XML | +| folders.json | Définitions des dossiers de l'Explorateur | JSON | +| menus.json | Définit les menus | JSON | +| settings.4DSettings | Propriétés de la base *Structure*. Elles ne sont pas prises en compte si les *[paramètres utilisateur](#settings-folder-1)* ou les *[paramètres utilisateur des données](#settings-folder)* sont définis.

        **Attention** : dans les applications compilées, les paramètres de structure sont stockés dans le fichier .4dz (lecture seule). Pour le déploiement, il est nécessaire d'utiliser les *paramètres utilisateur* ou les *paramètres utilisateur pour les données* afin de définir des paramètres personnalisés. | XML | +| tips.json | Définit les messages d'aide | JSON | +| lists.json | Listes définies | JSON | +| filters.json | Filtres définis | JSON | +| styleSheets.css | Feuilles de style CSS | CSS | +| styleSheets_mac.css | Feuilles de style css sur Mac (à partir d'une base binaire convertie) | CSS | +| styleSheets_windows.css | Feuilles de style css sur Windows (à partir d'une base binaire convertie) | CSS | -| Contenu | Description | Format | -| ---------------- | ------------------------------------------------------------- | ------ | -| *methodName*.4dm | Méthodes projet définies dans la base. Un fichier par méthode | Texte | +#### `DatabaseMethods` -#### Classes folder +| Contenu | Description | Format | +| ------------------------ | ------------------------------------------------------------------ | ------ | +| *databaseMethodName*.4dm | Méthodes base définies dans le projet. Un fichier par méthode base | Texte | -| Contenu | 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 | Texte | +#### `Méthodes` +| Contenu | Description | Format | +| ---------------- | --------------------------------------------------------------- | ------ | +| *methodName*.4dm | Méthodes projet définies dans le projet. Un fichier par méthode | Texte | -#### Dossier Forms +#### `Classes` -| Contenu | Description | Format | -| -------------------------------------------- | -------------------------------------------- | ------- | -| *nomFormulaire*/form.4DForm | Description du formulaire projet | json | -| *nomFormulaire*/method.4dm | Méthode formulaire projet | Texte | -| *nomFormulaire*/Images/*nomImage* | Image statique du formulaire projet | picture | -| *nomFormulaire*/ObjectMethods/*nomObjet*.4dm | Méthodes objet. Un fichier par méthode objet | Texte | +| Contenu | Description | Format | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| *className*.4dm | Méthode de définition de classe utilisateur, permettant d'instancier des objets spécifiques. Un fichier par classe, le nom du fichier est le nom de la classe | Texte | -#### Dossier TableForms +#### `Formulaires` -| Contenu | Description | Format | -| ------------------------------------------------------- | ---------------------------------------------------------------------------- | ------- | -| *n*/Input/*nomFormulaire*/form.4DForm | Description du formulaire d'entrée de la table (n étant le numéro de table) | json | -| *n*/Input/*nomFormulaire*/Images/*nomImage* | Images statiques du formulaire d'entrée de la table | picture | -| *n*/Input/*nomFormulaire*/method.4dm | Méthode du formulaire d'entrée de la table | Texte | -| *n*/Input/*nomFormulaire*/ObjectMethods/*nomObjet*.4dm | Méthodes objet du formulaire d'entrée. Un fichier par méthode objet | Texte | -| *n*/Output/*nomFormulaire*/form.4DForm | Description du formulaire de sortie de la table (n étant le numéro de table) | json | -| *n*/Output/*nomFormulaire*/Images/*nomImage* | Images statiques du formulaire de sortie de la table | picture | -| *n*/Output/*nomFormulaire*/method.4dm | Méthode du formulaire de sortie de la table | Texte | -| *n*/Output/*nomFormulaire*/ObjectMethods/*nomObjet*.4dm | Méthodes objet du formulaire de sortie. Un fichier par méthode objet | Texte | +| Contenu | Description | Format | +| ----------------------------------------- | -------------------------------------------- | ------- | +| *formName*/form.4DForm | Description du formulaire projet | json | +| *formName*/method.4dm | Méthode formulaire projet | Texte | +| *formName*/Images/*pictureName* | Image statique du formulaire projet | picture | +| *formName*/ObjectMethods/*objectName*.4dm | Méthodes objet. Un fichier par méthode objet | Texte | +#### `TableForms` -#### Dossier Triggers +| Contenu | Description | Format | +| ---------------------------------------------------- | ---------------------------------------------------------------------------- | ------- | +| *n*/Input/*formName*/form.4DForm | Description du formulaire d'entrée de la table (n étant le numéro de table) | json | +| *n*/Input/*formName*/Images/*pictureName* | Images statiques du formulaire d'entrée de la table | picture | +| *n*/Input/*formName*/method.4dm | Méthode du formulaire d'entrée de la table | Texte | +| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | Méthodes objet du formulaire d'entrée. Un fichier par méthode objet | Texte | +| *n*/Output/*formName*/form.4DForm | Description du formulaire de sortie de la table (n étant le numéro de table) | json | +| *n*/Output/*formName*/Images/*pictureName* | Images statiques du formulaire de sortie de la table | picture | +| *n*/Output/*formName*/method.4dm | Méthode du formulaire de sortie de la table | Texte | +| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | Méthodes objet du formulaire de sortie. Un fichier par méthode objet | Texte | -| Contenu | Description | Format | -| ------------- | ---------------------------------------------------------------------------------------------------- | ------ | -| table_*n*.4dm | Méthodes trigger définies dans la base. Un fichier de trigger par table (n étant le numéro de table) | Texte | +#### `Triggers` +| Contenu | Description | Format | +| ------------- | ------------------------------------------------------------------------------------------------------ | ------ | +| table_*n*.4dm | Méthodes trigger définies dans le projet. Un fichier de trigger par table (n étant le numéro de table) | Texte | **Note :** L'extension de fichier .4dm est un format de fichier texte contenant le code d'une méthode 4D. Il est compatible avec les outils de contrôle de version. -### Dossier Trash + +### `Trash` Le dossier Trash contient des méthodes et des formulaires qui ont été supprimés du projet (le cas échéant). Il peut contenir les dossiers suivants : -- Méthodes -- Formulaires -- TableForms +- `Méthodes` +- `Formulaires` +- `TableForms` Dans ces dossiers, les noms des éléments supprimés sont entre parenthèses, par exemple. "(myMethod).4dm". L'organisation des dossiers est identique à celle du dossier [Sources](#sources). -### Dossier DerivedData + +### `DerivedData` Le dossier DerivedData contient des données en cache utilisées en interne par 4D pour optimiser le traitement. Il est automatiquement créé ou recréé si nécessaire. Vous pouvez ignorer ce dossier. -## Dossier Resources +## `Libraries` + +> This folder is used on macOS only. + +The Librairies folder contains the file resulting from a compilation with the [Silicon compiler](compiler.md#silicon-compiler) on macOS. -Le dossier Resources contient tous les fichiers et dossiers de ressources personnalisés de la base de données. Dans ce dossier, vous pouvez placer tous les fichiers nécessaires à la traduction ou à la personnalisation de l'interface de l'application (fichiers image, fichiers texte, fichiers XLIFF, etc.). 4D utilise des mécanismes automatiques pour manipuler le contenu de ce dossier, notamment pour le traitement des fichiers XLIFF et des images statiques. Pour l'utilisation en mode distant, le dossier Resources vous permet de partager des fichiers entre le serveur et tous les ordinateurs clients. Voir le *Manuel 4D Server - Référence*. +## `Resources` + +Le dossier Resources contient tous les fichiers et dossiers de ressources personnalisés du projet. Dans ce dossier, vous pouvez placer tous les fichiers nécessaires à la traduction ou à la personnalisation de l'interface de l'application (fichiers image, fichiers texte, fichiers XLIFF, etc.). 4D utilise des mécanismes automatiques pour manipuler le contenu de ce dossier, notamment pour le traitement des fichiers XLIFF et des images statiques. Pour l'utilisation en mode distant, le dossier Resources vous permet de partager des fichiers entre le serveur et tous les ordinateurs clients. Voir le *Manuel 4D Server - Référence*. | Contenu | Description | Format | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | *item* | Fichiers et dossiers de ressources de la base | variés | | Images/Library/*item* | Images de la bibliothèque d'images sous forme de fichiers séparés(*). Les noms de ces éléments deviennent des noms de fichiers. Si un élément dupliqué existe, un numéro est ajouté au nom. | picture | - (*) uniquement si le projet a été exporté depuis une base binaire .4db. -## Dossier Data + +## `Données` Le dossier Data contient le fichier de données ainsi que tous les fichiers et dossiers relatifs aux données. @@ -153,79 +159,84 @@ Le dossier Data contient le fichier de données ainsi que tous les fichiers et d | data.journal | Créé uniquement lorsque la base de données utilise un fichier journal. Le fichier journal est utilisé pour assurer la sécurité des données entre les sauvegardes. Toutes les opérations effectuées sur les données sont enregistrées séquentiellement dans ce fichier. Par conséquent, chaque opération sur les données entraîne deux actions simultanées : la première sur les données (l'instruction est exécutée normalement) et la seconde dans le fichier journal (une description de l'opération est enregistrée). Le fichier journal est construit indépendamment, sans perturber ni ralentir le travail de l'utilisateur. Une base de données ne peut fonctionner qu'avec un seul fichier journal à la fois. Le fichier journal enregistre des opérations telles que des ajouts, des modifications ou des suppressions d'enregistrements, des transactions, etc. Il est généré par défaut lors de la création d'une base de données. | binaire | | data.match | (interne) UUID correspondant au numéro de la table | XML | - (*) Lorsque le projet est créé depuis une base binaire .4b, le fichier de données demeure inchangé. Ainsi, il peut être nommé différemment et placé dans un autre emplacement. -### Dossier Settings +### `Settings` -Ce dossier contient des **fichiers de propriétés utilisateur pour fichier de données** utilisés pour l'administration de la base de données. +Ce dossier contient des **fichiers de propriétés utilisateur des données** utilisés pour l'administration de l'application. -> These settings take priority over **[user settings files](#settings-folder-1)** and **structure settings** files. +> Ces paramètres ont la priorité sur les **[fichiers de propriétés utilisateur](#settings-folder-1)** et les fichiers de **[propriétés structure](#sources-folder)**. | Contenu | Description | Format | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| directory.json | Description des groupes et utilisateurs 4D et de leurs droits d'accès lorsque l'application est lancée avec ce fichier de données. | JSON | | Backup.4DSettings | Paramètres de sauvegarde de la base de données, utilisés pour définir les [options de sauvegarde](Backup/settings.md)) lorsque la base est lancée avec ce fichier de données. Les clés concernant la configuration de la sauvegarde sont décrites dans le manuel *Sauvegarde des clés XML 4D*. | XML | -| settings.4DSettings | Propriétés de la base personnalisée pour ce fichier de données | XML | -| directory.json | Description of 4D groups, users, and their access rights when the database is run with this data file. | JSON | +| settings.4DSettings | Propriétés de la base personnalisées pour ce fichier de données. | XML | -### Dossier Logs +### `Logs` Le dossier Logs contient tous les fichiers journaux utilisés par le projet. Les fichiers journaux comprennent notamment : - conversion de base de données, - requêtes de serveur Web, -- journal des activités de sauvegarde/restitution (*Journal de sauvegarde\[xxx].txt, voir [Journal de sauvegarde](Backup/backup.md#backup-journal))

      • - - - débogage de commandes, - - Requêtes 4D Server (générées sur les postes clients et sur le serveur). - - > Un dossier Logs supplémentaire est disponible dans le dossier des préférences utilisateur du système (dossier 4D actif, voir la commande [Lire dossier 4D](https://doc.4d.com/4Dv17R6/4D/17-R6/Get-4D-folder.301-4311294.en.html)) pour les fichiers journaux de maintenance et dans les cas où le dossier de données est en lecture seule. - - ## Dossier Settings - - Ce dossier contient des **fichiers de propriétés utilisateur** utilisés pour l'administration de la base de données. Les fichiers sont ajoutés au dossier si nécessaire. - - > If a data settings file exists in a Settings folder [in the data folder](#settings-folder), it takes priority over user settings file. - - | Contenu | Description | Format | - | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | - | directory.json | Description des groupes et utilisateurs 4D pour la base de données, ainsi que leurs droits d'accès | JSON | - | BuildApp.4DSettings | Fichier de paramètres de génération, créé automatiquement lors de l'utilisation de la boîte de dialogue du générateur d'applications ou de la commande `BUILD APPLICATION` | XML | - | Backup.4DSettings | Paramètres de sauvegarde de la base de données, utilisés pour définir les [options de sauvegarde](Backup/settings.md)) à chaque lancement de sauvegarde. Ce fichier peut également être utilisé pour lire ou définir des options supplémentaires, telles que la quantité d'informations stockées dans le *journal de sauvegarde*. Les clés concernant la configuration de la sauvegarde sont décrites dans le manuel *Sauvegarde des clés XML 4D*. | XML | - - - ## Dossier userPreferences.*userName* - - Ce dossier contient des fichiers qui mémorisent les configurations utilisateur, par exemple la position des points de rupture. Vous pouvez simplement ignorer ce dossier. Il contient par exemple : - - | Contenu | Description | Format | - | ---------------------------- | --------------------------------------------------------------------- | ------ | - | methodPreferences.json | Préférences de l'éditeur de méthodes de l'utilisateur courant | JSON | - | methodWindowPositions.json | Position de la fenêtre de l'utilisateur courant pour les méthodes | JSON | - | formWindowPositions.json | Position de la fenêtre de l'utilisateur courant pour les formulaires | JSON | - | workspace.json | Liste de fenêtres ouvertes : sous macOS, ordre des fenêtres à onglets | JSON | - | debuggerCatches.json | Appels vers commandes | JSON | - | recentTables.json | Liste ordonée de tables | JSON | - | preferencesv15.4DPreferences | Préférences utilisateur | JSON | - - - ## Dossier Components - - Ce dossier contient les composants disponibles dans la base projet uniquement. Il doit être stocké au même niveau que le dossier Project. - - > Une base projet peut être elle-même un composant : - à des fins de développement : insérer un alias du fichier .4dproject dans le dossier Components de la base hôte. - à des fins de déploiement : créer le composant (voir [Créer un package projet](building.md)) et insérer le fichier .4dz résultant dans un dossier .4dbase dans le dossier Components de la base hôte. - - ## Dossier Plugins - - Ce dossier contient les plug-ins disponibles dans la base projet uniquement. Il doit être stocké au même niveau que le dossier Project. - - ## Documentation folder - - This folder contains all documentation files (.md) created for the project elements such as classes, methods, or forms. Documentation files are managed and displayed in the 4D Explorer. - - For more information, refer to [Documenting a project](Project/documentation.md). - - ## WebFolder - - Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. \ No newline at end of file +- journal des activités de sauvegarde/restitution (*Journal de sauvegarde\[xxx].txt*, voir [Journal de sauvegarde](Backup/backup.md#backup-journal)) +- débogage de commandes, +- Requêtes 4D Server (générées sur les postes clients et sur le serveur). + +> Un dossier Logs supplémentaire est disponible dans le dossier des préférences utilisateur du système (dossier 4D actif, voir la commande [Get 4D folder](https://doc.4d.com/4Dv18R4/4D/18-R4/Get-4D-folder.301-4982857.en.html)) pour les fichiers journaux de maintenance et dans les cas où le dossier de données est en lecture seule. + +## `Settings` + +Ce dossier contient des **fichiers de propriétés utilisateur** utilisés pour l'administration de l'application. + +> Ces paramètres ont la priorité sur les fichiers de **[propriétés structure](#sources-folder)**. Toutefois, si un **[fichier de paramètres utilisateur](#settings-folder)** existe, il est prioritaire par rapport au fichier des propriétés utilisateur. + +| Contenu | Description | Format | +| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| directory.json | Description des groupes et utilisateurs 4D pour l'application, ainsi que leurs droits d'accès | JSON | +| Backup.4DSettings | Paramètres de sauvegarde de la base de données, utilisés pour définir les [options de sauvegarde](Backup/settings.md)) à chaque lancement de sauvegarde. Ce fichier peut également être utilisé pour lire ou définir des options supplémentaires, telles que la quantité d'informations stockées dans le *journal de sauvegarde*. Les clés concernant la configuration de la sauvegarde sont décrites dans le manuel *Sauvegarde des clés XML 4D*. | XML | +| BuildApp.4DSettings | Fichier de paramètres de génération, créé automatiquement lors de l'utilisation de la boîte de dialogue du générateur d'applications ou de la commande `BUILD APPLICATION` | XML | + + +## `userPreferences.` + +This folder contains files that memorize user configurations, e.g. break point or window positions. Vous pouvez simplement ignorer ce dossier. Il contient par exemple : + +| Contenu | Description | Format | +| -------------------------- | --------------------------------------------------------------------- | ------ | +| methodPreferences.json | Préférences de l'éditeur de méthodes de l'utilisateur courant | JSON | +| methodWindowPositions.json | Position de la fenêtre de l'utilisateur courant pour les méthodes | JSON | +| formWindowPositions.json | Position de la fenêtre de l'utilisateur courant pour les formulaires | JSON | +| workspace.json | Liste de fenêtres ouvertes : sous macOS, ordre des fenêtres à onglets | JSON | +| debuggerCatches.json | Appels vers commandes | JSON | +| recentTables.json | Liste ordonée de tables | JSON | +| preferences.4DPreferences | Current data path and main window positions | XML | +| CompilerIntermediateFiles | Intermediate files resulting from Apple Silicon compilation | Folder | + + +## `Composants` + +This folder contains the components to be available in the application project. Il doit être stocké au même niveau que le dossier Project. + +> Une application projet peut être elle-même un composant : - à des fins de développement : insérer un alias du fichier .4dproject dans le dossier Components du projet hôte. - for deployment: [build the component](Desktop/building.md#build-component) and put the resulting .4dz file in a .4dbase folder in the Components folder of the host application. + + +## `Plugins` + +This folder contains the plug-ins to be available in the application project. Il doit être stocké au même niveau que le dossier Project. + + +## `Documentation` + +Ce dossier contient tous les fichiers de documentation (.md) créés pour les éléments du projet, tels que les classes, les méthodes ou les formulaires. Les fichiers de documentation sont gérés et affichés dans l'Explorateur 4D. + +Pour plus d'informations, reportez-vous à [Documenter un projet](Project/documentation.md). + +## `WebFolder` + +Il s'agit du dossier racine par défaut du serveur Web 4D pour les pages, les images, etc. Il est automatiquement créé lors du premier lancement du serveur Web. + +## `.gitignore` file (optional) + +File that specifies which files will be ignored by git. You can include a gitignore file in your projects using the **Create .gitignore file** option on the **General** page of the preferences. To configure the contents of that file, see [Create `.gitignore` file](Preferences/general.md#create-gitignore-file). diff --git a/website/translated_docs/fr/Project/building.md b/website/translated_docs/fr/Project/building.md index 57db68722b73b9..c530109120ac62 100644 --- a/website/translated_docs/fr/Project/building.md +++ b/website/translated_docs/fr/Project/building.md @@ -82,13 +82,9 @@ Génère un composant compilé à partir de la structure. Un composant est un fichier de structure 4D standard dans lequel des fonctionnalités spécifiques ont été développées. Une fois le composant configuré et installé dans une autre base 4D (la base hôte), ses fonctionnalités sont accessibles depuis la base hôte. Pour plus d’informations sur les composants, reportez-vous au chapitre "Développer et installer des composants 4D". -Si vous avez nommé votre application *Moncomposant*, 4D créera un dossier Component contenant le dossier *MyComponent.4dbase* : +If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: *\/Components/name.4dbase/\.4DZ*. -< - -p>*\/Components/name.4dbase/\.4DZ*. - -Le dossier *MyComponent.4dbase* contient : - Un fichier *MyComponent.4DZ* - Un dossier *Resources* - toutes les Ressources sont automatiquement recopiées dans ce dossier. Les éventuels dossiers “Components†ou “Plugins†ne sont pas recopiés (un composant ne peut pas utiliser de plug-ins ni d'autres composants). +The *MyComponent.4dbase* folder contains: - *MyComponent.4DZ* file - A *Resources* folder - any associated Resources are automatically copied into this folder. Les éventuels dossiers “Components†ou “Plugins†ne sont pas recopiés (un composant ne peut pas utiliser de plug-ins ni d'autres composants). ## Page Application diff --git a/website/translated_docs/fr/Project/compiler.md b/website/translated_docs/fr/Project/compiler.md new file mode 100644 index 00000000000000..7f59544dd3054e --- /dev/null +++ b/website/translated_docs/fr/Project/compiler.md @@ -0,0 +1,332 @@ +--- +id: compiler +title: Compilation +--- + +You can compile your projects, i.e., translate all of your methods into machine language. Compiling a project lets you check the consistency of the code and accelerate its execution, as well as making it possible to obfuscate the code in its entirety. Compilation is an indispensable step between the development of projects using 4D and their deployment as stand-alone applications. + + +## Compile + +The compilation is handled from your 4D application and is entirely automatic. + +> On macOS, the compilation requires that you install `Xcode`. See [this section](#silicon-compiler) for more information about this requirement. + +1. Open the compiler window by selecting the **Compiler...** command in the **Design** menu or the **Compiler** toolbar button. + + ![](assets/en/Project/compilerWin1.png) + + ![](assets/en/Project/comp1.png) + +> You can also launch directly the compilation by selecting the **Start Compilation** menu item from the **Design** menu. + +2. Click the **Compile** button to launch the compilation using the current [compilation settings](#compiler-settings). + +If no errors are detected, the actual compilation begins and the "Compilation successful" message is displayed at the bottom of the window when the compilation is completed: + +![](assets/en/Project/success.png) + +You can immediately [run your application in compiled mode](#run-compiled) and see how faster it is. + +If errors are detected, the process is stopped and the "Compilation failed" message is displayed. The information area of the window displays the method names and line numbers concerned in a hierarchical list: + +![](assets/en/Project/compilerWin2.png) + +Double-click on each error detected to open the method or class concerned directly in the 4D method editor. The line containing the error is highlighted and the type of error is displayed in the syntax area of the window. + +Use the **Previous Error** / **Next Error** commands of the **Method** menu to navigate from one error to the next. + +The number of errors found during your first compilations may be daunting, but do not let this put you off. You will soon discover that they often spring from the same source, i.e., non-compliance with certain project conventions. The compiler always provides a [precise diagnosis](#error-files) of the errors in order to help you correct them. + +> Compilation requires an appropriate license. Without this license, it is not possible to carry out a compilation (buttons are disabled). Nevertheless, it is still possible to check the syntax and generate Typing methods. + +## Run Compiled + +Once a project is compiled, it is possible to switch from [interpreted mode to compiled mode](Concepts/interpreted.md), and vice versa, at any time and without having to quit the 4D application (except when the interpreted code has been removed). To do this, use tge **Restart Interpreted** and **Restart Compiled** commands of the **Run** menu. The [Open project dialog box](creating.md#options) also offers a choice between interpreted or compiled mode for database startup. + +When you switch from one mode to the other, 4D closes the current mode and opens the new one. This is equivalent to exiting and reopening the application. Each time you change from one mode to another, 4D executes the two following database methods (if specified) in this order: `On Exit` -> `On Startup`. + +If you modify your project in interpreted mode, you must recompile it in order to have your edits taken into account in compiled mode. + +## Compiler window features + +In addition to the [**Compile** button](#compile), the Compiler window provides additional features that are useful during the project development phase. + +### Check Syntax + +The **Check Syntax** button starts the execution of the syntax-checking phase. At the end of the checking process, any errors detected are listed in the information area. You can double–click on an error line in order to display the corresponding method. + +Syntax checking can also be launched directly using the **Check Syntax** command associated with the **Compiler** toolbar button. This option is the only one available if you do not have a suitable license to allow the compilation of applications. + +### Generate Typing + +The **Generate Typing** button creates or updates typing compiler methods. Compiler methods are project methods that group together all the variable and array typing declarations (process and interprocess), as well as the method parameters. These methods, when they exist, are used directly by the compiler during code compilation, resulting in faster compilation times. + +The name of these methods must begin with `Compiler_`. You can set the default name for each of the 5 compiler methods in the [compiler settings window](#compiler-methods-for). The compiler methods that are generated and maintained by 4D automatically have the `Invisible` attribute: + +![](assets/en/Project/compilerWin3.png) + +Only the necessary compiler methods (i.e., those for which items already exist in the project) are generated. + +The information area indicates any errors found during method creation or updating. Double-clicking on an error line causes the method and line concerned to be displayed in the Method editor. + + +### Clear compiled code + +The **Clear compiled code** button deletes the compiled code of the project. When you click on it, all of the [code generated during compilation](#classic-compiler) is deleted, the **Restart Compiled** command of the **Run** menu is disabled and the "Compiled Project" option is not available at startup. + + +### Show/Hide Warnings + +Warnings are specific messages generated by the compiler when it checks the syntax. These messages are intended to draw your attention to statements that might lead to execution errors. They do not prevent compilation. + +Depending on circumstances and the programming style used, these warnings may be more or less relevant. You can toggle the warnings on or off by clicking the **Show/Hide Warnings** button: + +![](assets/en/Project/compilerWin4.png) + +When this option is checked, the warnings (if any) are displayed in the window, after the other error types. They appear in italics: + +![](assets/en/Project/compilerWin5.png) + +Double-clicking a warning opens the corresponding method. + +#### Disabling warnings during compilation + +You can selectively disable certain warnings during compilation by inserting the following into the code of a 4D method: + +```4d + //%W- +``` + +Only warnings with numbers can be disabled. Warning numbers are specified at the end of each message in the list of compilation errors. For example, to disable the following warning: + +*1: Pointer in an array declaration (518.5)* + +... you just need to write the following comment in a 4D method, preferably a `COMPILER_xxx` method (method compiled first): + +```4d + //%W-518.5 +``` + + + +## Compiler Settings + +The "Compiler" page of the Settings dialog box lets you set parameters related to project compilation. You can directly open this page from the [compiler window](#compiler-window) by clicking on the **Compiler Settings** button: + +![](assets/en/Project/compilerWin6.png) + + +### Compilation options + +This area groups the generic options used during the compilation process. + +#### Generate the symbol file + +Used to generate the symbol file (see [symbol file](#symbol-file)). The symbol file is created in the project folder with the name `ProjectName_symbols.txt`. + +#### Generate error file + +Used to generate the error file (see [error file](#symbol-file)) at the time of syntax checking. The error file is created in the project folder with the name `ProjectName_errors.xml`. + + +#### Compilation Path + +Used to set the number of passes (code parsing) performed by the compiler and thus the duration of compilation. + +- **Type the variables**: Passes by all the stages that make compilation possible. +- **Process and interprocess are typed**: The pass for typing process and interprocess variables is not carried out. This option can be used when you have already carried out the typing of all your process and interprocess variables either yourself or using the function for automatic generation of compiler methods. +- **All variables are typed**: The pass for typing local, process and interprocess variables is not carried out. Use this option when you are certain that all the process, interprocess and local variables have been clearly typed. + +#### Compilation Target + +
        Historique +| Version | Modifications | +| ------- | ------------- | +| v19 | Ajoutées | +
        + +This setting allows you to select the processor family for which your 4D project must be natively compiled. The 4D compiler can build native code for two processor families: + +- **Intel/AMD** processors (all machines), +- **Apple Silicon** processors. + +Two target options are proposed. The result depends on the processor of the machine on which 4D is running. + +| *Option* | *on Windows Intel/AMD* | *on macOS Intel* | *on macOS Silicon* | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| **All processors (Intel/AMD and Apple Silicon)** | Code for Intel/AMD
        *It is not possible to produce Apple Silicon code on Windows* | Code for Apple Silicon + Code for Intel/AMD
        *Two compiled codes will be available* | Code for Apple Silicon + Code for Intel/AMD
        *Two compiled codes will be available* | +| **My processor (processor)** | Code for Intel/AMD | Code for Intel/AMD | Code for Apple Silicon | + +> Apple Silicon compiler target requires that the **Clang** application be installed on your machine. Clang comes with the latest version of Xcode. See the [Silicon compiler requirements](#requirements) for more information. + +### Default typing + +Use this area to set the default type for ambiguous database objects. + +- **Numeric**: Used to force numeric typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. You can optimize the running of your database by choosing the Longint type. +- **Button**: Used to force button typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. This type applies to buttons as well as check boxes, picture buttons, button grids, radio buttons, picture pop-up menus and drop-down lists. + +### Compiler Methods for... + +This area lets you rename the Compiler methods that are generated automatically by the compiler when you click [Generate Typing](#generate-typing). + +Up to 5 compiler methods may be generated; a compiler method is only generated if the project contains the following items: + +- **Variables**: Groups together process variable declarations; +- **Interprocess Variables**: Groups together interprocess variable declarations; +- **Arrays**: Groups together process array declarations; +- **Interprocess Arrays**: Groups together interprocess array declarations; +- **Methods**: Groups together method parameter declarations (for instance, `C_LONGINT(mymethod;$1;$2)`). + +You can rename each of these methods in the corresponding areas, but they will always be preceded by the label `Compiler_` (non-modifiable). The name of each method (prefix included) must be no longer than 31 characters. It must also be unique and comply with [4D rules for naming methods](Concepts/identifiers.md#project-methods). + + +## Compilation tools + +### Symbol file + +If you check the [**Generate the symbol file**](#generate-the-symbol-file) option in the compiler settings, a symbol file called `ProjectName_symbols.txt` is created in the project folder during compilation. It is divided into several parts: + +#### List of process and interprocess variables + +These two lists contain four columns: + +- Names of process and interprocess variables and arrays used in your project. These variables are listed in alphabetical order. +- Type of the variable. Types are set by compiler directive commands or are determined by the compiler based on the use of the variable. If the type of a variable cannot be determined, the column is empty. +- Number of dimensions if the variable is an array. +- Reference to the context in which the compiler established the type of the variable. If the variable is used in several contexts, the context mentioned is the one used by the compiler to determine its type. + - If the variable was found in a database method, the database method name is given, preceded by (M)*. + - If the variable was found in a project method, the method is identified as it has been defined in 4D, preceded by (M). + - If the variable was found in a trigger, the table name is given, preceded by (TM). + - If the variable was found in a form method, the form name is given, preceded by the table name and (FM). + - If the variable was found in an object method, the object method’s name is given, preceded by the form name, table name, and by (OM). + - If the variable is an object in a form and does not appear in any project, form, object method, or trigger, the name of the form in which it appears is given, preceded by (F). At the end of each list, you can find the sizes of the process and interprocess variables in bytes. + +> When compiling, the compiler cannot determine in which process a given process variable is used. A process variable can have a different value in each process. Consequently, all process variables are systematically duplicated as each new process is launched: it is thus advisable to watch out for the amount of memory that they will take up. Also, keep in mind that the space for process variables is not related to the stack size for the process. + +#### List of local variables + +The list of local variables is sorted by database method, project method, trigger, form method, and object method, in the same order as in 4D. + +This list is divided into three columns: + +- list of local variables used in the method; +- type of the variable; +- number of dimensions if the variable is an array. + +#### Complete list of methods + +A complete list of your database and project methods is given at the end of the file with: + +- their type (procedure or function returning a value) +- the data types of their parameters and the returned result +- the number of calls +- the Thread Safe or Thread Unsafe property. + +This information appears as follows: + +``` +Procedure or Function (parameter data types): +result data type, number of calls, Thread Safe or Thread Unsafe +``` + +### Error file + +You can choose whether or not to generate an error file during compilation using the [**Generate error file**](#generate-error-file) option in the compiler settings. The error file is automatically named `projectName_errors.xml` and is placed in the project folder. + +Although the errors can be accessed directly via the [compiler window](#compile), it can be useful to have an error file that can be transmitted from one machine to another. The error file is generated in XML format in order to facilitate automatic parsing of its contents. It also allows the creation of customized error display interfaces. + +The length of the error file depends on the number of errors and warnings issued by the compiler. + +The structure of the error file is as follows: + +- At the top of the file is the list of errors and warnings, sorted by method and in their order of creation in 4D. In the ***General errors*** section, all the typing impossibilities and identity ambiguities are grouped together. These errors and warnings are listed using the following format: + - line number in the method (0 indicates general errors) + - warning attribute indicating whether the detected anomaly is a warning (warning="true") or an error (warning="false") + - diagnostic describing the error + +If your project does not have any general errors, the file will not have a *General errors* section. + +An error file may contain three types of messages: + +- **Errors linked to a specific line**: these errors are displayed in context — the line in which they were found — with an explanation. The compiler reports this type of error when it encounters an expression in which it sees an inconsistency related to data type or syntax. In the compiler window, double–click on each error detected in order to open the method concerned directly in the 4D Method editor, with the line containing the error highlighted. + +- **General errors**: These are errors that make it impossible to compile the project. There are two cases in which the compiler reports a general error: + - The data type of a process variable could not be determined. + - Two different kinds of objects have the same name. General errors are so named because they cannot be linked to any specific method. In the first case, the compiler could not perform a specified typing anywhere in the project. In the second, it was unable to decide whether to associate a given name with one object rather than with another. + +- **Warnings**: Warnings are not errors. In the compiler window, warnings appear in italics. They do not prevent the project from being compiled, but simply point out potential code errors. Double-click on each warning to open the method concerned directly in the 4D Method editor, with the line containing the warning highlighted. + + + + +### Range checking + +The code generated by the 4D compiler automatically checks that every access to an array element or a character reference is done within the actual range of array elements or string characters. Out of range accesses will provoke runtime execution errors. + +In some cases, you might prefer range checking not to apply to certain parts of the code that are considered to be reliable. More particularly, in the case of loops that are repeated a great number of times, and when running the compiled database on older machines, range checking can significantly slow down processing. If you are absolutely certain that the code concerned is reliable and cannot cause system errors, you can disable range checking locally. + +To do this, you must surround the code to be excluded from range checking with the special comments `//%R-` and `//%R+`. The `//%R-` comment disables range checking and `//%R+` enables it again: + +```4d + // %R- to disable range checking + + ... //Place the code to be excluded from range checking here + + // %R+ to enable range checking again for the rest +``` + +## About Compilers + +4D contains two compilers: + +- a "classic" compiler, used to compile native code for Intel/AMD processors; +- a Silicon compiler, used to compile native code for Apple Silicon processors. + +The classic compiler can be used on any platform, while the Silicon compiler can only be used on a Mac machine: + +| | Compile for Windows | Compile for Intel Mac | Compile for Silicon Mac | +| -------------- |:-------------------:|:---------------------:|:-----------------------:| +| On Windows | ✓ | ✓ | ✗ | +| On Intel Mac | ✓ | ✓ | ✓ | +| On Silicon Mac | ✓ | ✓ | ✓ | + + +Both compilers are integrated into 4D. The appropriate compiler is automatically selected depending on the [compilation target](#compilation-target) option. + + + +### Classic Compiler + +The classic compiler generates native compiled code for Intel/AMD processors on any machines. It does not require any specific configuration. + +Resulting compiled code is stored in the [DerivedData](architecture.md#deriveddata-folder) folder of the project. + + +### Silicon Compiler + +The Silicon compiler generates native compiled code for Apple Silicon processors, such as *Apple M1*. + +Resulting compiled code is stored in the [Libraries](architecture.md#libraries-folder), folder of the project. + + +#### Pré-requis + +- **Apple machine**: The Silicon compiler can only be run from an Apple machine. +- **4D Project architecture**: The Silicon compiler is only available for 4D developments using [project architecture](architecture.md). +- **Xcode or Developer Tools**: The Silicon compiler calls the **Clang** open-source macOS compiler to compile the project from C++ code at the [second step](#two-step-incremental-compiler) of compilation. *clang* requires Apple native libraries, which are provided by either the **Xcode** or **Developer Tools** package. + - **If you already have** Xcode or Developer Tools installed on your computer, you only need to make sure that its version is compliant with 4D requirements. + - **If you do not have** any of these tools installed on your computer, you will need to download one of them from the Apple Developer web site. + +> We recommend to install **Xcode**, which is quite simple to install. You can decide to install **Developer Tools** which is more compact, however its installation is a little more complex. + +In any cases, the 4D Silicon compiler will warn you if your configuration does not comply with its requirements. + + +#### Incremental compiler + +The Silicon compiler is incremental, which means that: + +- During the very first compilation, **all 4D methods** are compiled. This step could take a certain time. However it only occurs once. +- During all subsequent compilations, only **new or modified methods** are processed, thus reducing drastically the compilation time. \ No newline at end of file diff --git a/website/translated_docs/fr/Project/components.md b/website/translated_docs/fr/Project/components.md new file mode 100644 index 00000000000000..a4de063a1f24e2 --- /dev/null +++ b/website/translated_docs/fr/Project/components.md @@ -0,0 +1,29 @@ +--- +id: components +title: 4D Components Library +--- + +4D includes an extended library of built-in 4D components. A [component](Concepts/components.md) provides additional functionalities to your 4D projects. + +## List of 4D Components + +| Component Name | Description | Where to find documentation | +| --------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| 4D Mobile App Server | Set of utility classes and functions to authenticate, manage sessions, and develop mobile applications | [4d-go-mobile github repository](https://github.com/4d-go-mobile/4D-Mobile-App-Server) | +| 4D Progress | Open one or more progress bars in the same window | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Progress.100-5461799.en.html) | +| 4D SVG | Create and manipulate common svg graphic objects | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-SVG-Component.300-5462064.en.html) | +| 4D ViewPro | Spreadsheet features in your forms | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-View-Pro-Reference.100-5442901.en.html) | +| 4D Widgets | Manage DatePicker, TimePicker, SearchPicker 4D widgets | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Widgets.100-5462909.en.html) | +| 4D WritePro Interface | Manage 4D Write Pro palettes | [4d github repository](https://github.com/4d/4D-WritePro-Interface) | + + +> You can develop and install your own 4D components. See [this section](Concepts/components.md) for more information. + + +## Documentation dans l'Explorateur + +When an installed component contains methods, they appear in the **Component Methods** theme of the Explorer's Methods page. + +Select a component method and click on the **Documentation** button of the Explorer to get information about it, [if any](documentation.md). + +![alt-text](assets/en/Project/compDoc.png) \ No newline at end of file diff --git a/website/translated_docs/fr/Project/creating.md b/website/translated_docs/fr/Project/creating.md index a2845960b2c18b..e605f5ad6de6ad 100644 --- a/website/translated_docs/fr/Project/creating.md +++ b/website/translated_docs/fr/Project/creating.md @@ -1,26 +1,115 @@ --- id: creating -title: Créer un projet 4D +title: Working with a project --- -## Pré-requis +4D projects are created and developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). **4D Server** can also create new, empty projects. -Les nouveaux projets 4D ne peuvent être créés uniquement à partir de **4D Developer** (reportez-vous à la section [Développer un projet](developing.md)). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -**Note :** 4D Server peut ouvrir des fichiers .4DProject en mode lecture seule, à des fins de test uniquement. Pour le déploiement, les projets 4D sont fournis sous forme de fichiers .4dz (fichiers zippés). Pour plus d'informations, reportez-vous à la section [Générer un package de projet](building.md). -> Vous pouvez créer des bases projet en exportant les bases binaires existantes. Voir "Exporter depuis une base 4D" sur [doc.4d.com](https://doc.4d.com). +## Créer un projet -## Créer des fichiers de projet +New 4D application projects can be created from **4D** or **4D Server**. Dans tous les cas, les fichiers de projet sont stockés sur la machine locale. -Pour créer un nouveau projet de base de données : +Pour créer un nouveau projet : -1. Lancez une application 4D Developer. -2. Sélectionnez **Nouveau> Base de données projet...** dans le menu **Fichier** : ![](assets/en/Project/project-create1.png) OU Sélectionnez **Base de données projet...** à partir du bouton **Nouveau** de la barre d’outils : ![](assets/en/Project/projectCreate2.png) Une boîte de dialogue standard d'enregistrement (**Sauvegarder**) apparaît pour vous permettre de choisir le nom et l'emplacement du dossier principal de la base projet 4D. -3. Saisissez le nom du dossier de projet et cliquez sur **Sauvegarder**. Ce nom sera utilisé : - - comme nom du dossier principal du projet (nommé "MyFirstProject" dans l'exemple de la section [Architecture d'un projet 4D](Project/architecture.md)), - - comme nom du fichier .4DProject au premier niveau du dossier "Project". Vous pouvez choisir n'importe quel nom autorisé par votre système d'exploitation. *Attention :* si votre base projet est destinée à fonctionner sur d'autres systèmes ou à être enregistrée via un outil de contrôle de version, vous devez tenir compte de leurs recommandations de dénomination spécifiques. +1. Lancez 4D ou 4D Server. +2. Sélectionnez **Nouveau> Projet...** depuis le menu **Fichier** :

        ![](assets/en/getStart/projectCreate1.png)

        OU

        (4D uniquement) Sélectionnez **Projet...** depuis le bouton de la barre d'outils **Nouveau** :

        ![](assets/en/getStart/projectCreate2.png)

        Un dialogue standard **Sauvegarde** apparaît, de façon à ce que vous choisissiez le nom et l'emplacement du dossier principal du projet 4D. -Lorsque vous validez la boîte de dialogue, 4D ferme la base de données courante (le cas échéant), crée un dossier "Project" à l'emplacement indiqué et y place tous les fichiers nécessaires au bon fonctionnement de la base projet. Pour plus d'informations, voir [Architecture d'un projet 4D](Project/architecture.md). +3. Saisissez le nom du dossier de projet et cliquez sur **Sauvegarder**.

        Ce nom sera utilisé : + - comme le nom du dossier du projet, + - comme nom du fichier .4DProject au premier niveau du dossier "Project". -La fenêtre de l’application 4D s’affiche ensuite avec l’Explorateur au premier plan. Vous pouvez alors, par exemple, créer des formulaires de projet ou afficher l'éditeur de structure et ajouter des tables, des champs, etc. \ No newline at end of file + Vous pouvez choisir n'importe quel nom autorisé par votre système d'exploitation. Toutefois, si votre projet est destiné à fonctionner sur d'autres systèmes ou à être enregistré via un outil de gestion de version, vous devez tenir compte de leurs recommandations de dénomination spécifiques. + +Lorsque vous validez la boîte de dialogue **Enregistrer**, 4D ferme le projet en cours (le cas échéant), crée un dossier de projet à l'emplacement indiqué et y place tous les fichiers nécessaires au projet. Pour plus d'informations, voir [Architecture d'un projet 4D](Project/architecture.md). + +Vous pouvez alors commencer à développer votre projet. + +## Opening a project + +To open an existing project from 4D: + +1. Sélectionnez **Ouvrir un projet d'application local** dans la boite de dialogue de l'Assistant de bienvenue

        OU

        Sélectionnez **Ouvrir > Projet local...** à partir du menu **Fichier** ou du bouton **Ouvrir** de la barre d'outils.

        La boîte de dialogue standard d’ouverture de fichiers apparaît. + +2. Sélectionnez le fichier `.4dproject` du projet et cliquez sur **Ouvrir**.

        Par défaut, le projet est ouvert avec son fichier de données courant. D'autres types de fichiers sont suggérés : + + - *Fichiers de projet compressés* : extension `.4dz` - Projets de déploiement + - *Shortcut files*: `.4DLink` extension - store additional parameters needed for opening projects or applications (addresses, identifiers, etc.) + - *Fichiers binaires* : extension `.4db` ou `.4dc` - formats de base de données 4D hérités + +### Options + +En plus des options système standard, la boîte de dialogue *Ouvrir* de 4D propose deux menus avec des options spécifiques disponibles à l'aide du bouton **Ouvrir** et du menu **Fichier de données**. + +- **Ouvrir** - mode d'ouverture du projet : + - **Interprété** ou **compilé** : ces options sont disponibles lorsque le projet sélectionné contient à la fois du [code interprété et compilé](Concepts/interpreted.md). + - **[Centre de Maintenance et de Sécurité](MSC/overview.md)** : Ouverture en mode sécurisé permettant d'accéder aux projets endommagés afin d'effectuer les réparations nécessaires. + +- **Fichier de données** - spécifie le fichier de données à utiliser avec le projet. Par défaut, l'option **Fichier de données courant** est sélectionnée. + +## Raccourcis d’ouverture des projets + +4D offers several ways to open projects directly and bypass the Open dialog: + +- via les options du menu : + - *Barre de menu* - **Fichier** > **Ouvrir Projets récents / {project name}** + - *Barre d'outils 4D* - Sélectionnez le projetà partir du menu associé au bouton **Ouvrir** + +- via les préférences : + - Définissez la préférence générale **Au démarrage** sur **Ouvrir le dernier projet utilisé**. + +- using a `.4DLink` file. + +### Opening a Project with a 4DLink file + +You can use a [`.4DLink` file](#about-4DLink-files) to launch the 4D application and open the target 4D project. There are two ways to do this: + +- double-click or drag and drop the `.4DLink` file onto the 4D application +- go to **File** > **Open Recent Projects** and select a project + +![open-recent-projects](assets/en/Project/4Dlinkfiles.png) + +A .4DLink file of "remote project" type can be copied and used on several machines. +> It's also possible to select a 4DLink file in the 4D and 4D Server opening dialog box (opening local project only). + +## About 4DLink Files + +Files with the `.4DLink` extension are XML files that contain parameters intended to automate and simplify opening local or remote 4D projects. + +`.4DLink` files can save the address of a 4D project as well as its connection identifiers and opening mode, saving you time when opening projects. + +4D automatically generates a `.4DLink` file when a local project is opened for the first time or when connecting to a server for the first time. The file is stored in the local preferences folder at the following location: + +- Windows 7 and higher: C:\Users\UserName\AppData\Roaming\4D\Favorites vXX\ +- OS X: Users/UserName/Library/Application Support/4D/Favorites vXX/ + +XX represents the version number of the application. For example, "Favorites v19" for 4D v19. + +That folder is divided into two subfolders: +- the **Local** folder contains the `.4DLink` files that can be used to open local projects +- the **Remote** folder contains the `.4DLink` files of recent remote projects + +`.4DLink` files can also be created with an XML editor. + +4D provides a DTD describing the XML keys that can be used to build a `.4DLink` file. This DTD is named database_link.dtd and is found in the \Resources\DTD\ subfolder of the 4D application. + + +## Enregistrement des fichiers + +Lorsque vous travaillez sur un projet dans 4D, vous pouvez utiliser les éditeurs intégrés de 4D pour créer, modifier ou sauvegarder des éléments de la structure, des méthodes, des formulaires, etc. Les modifications sont enregistrées sur disque lorsque vous sélectionnez un élément de menu **Sauvegarde**, ou lorsque la fenêtre de l'éditeur pert ou récupère le focus. + +Les éditeurs utilisant des fichiers sur le disque, d'éventuels conflits peuvent se produire si le même fichier est modifié voire supprimé de différents endroits. Par exemple, si la même méthode est modifiée dans une fenêtre d'éditeur de méthode *et* dans un éditeur de texte, la sauvegarde des deux modifications entraînera un conflit. + +Le développement 4D comprend un gestionnaire d’accès aux fichiers permettant de contrôler les accès simultanés : + +- if an open file is read-only at the OS level, a locked icon is displayed in the editor: ![](assets/en/Project/lockicon.png) +- si un fichier ouvert est édité simultanément à partir de différents emplacements, 4D affichera une boîte de dialogue d'alerte lorsque vous tenterez d'enregistrer les modifications : + +![](assets/en/Project/projectReload.png) + - **Oui** : ignore les modifications de l'éditeur et recharge la version modifiée + - **Non** : enregistrer les modifications et écraser l'autre version + - **Annuler** : ne pas enregistrer + +Cette fonctionnalité est activée pour tous les éditeurs 4D intégrés (Structure, Formulaire, Méthode, Paramètres et Boite à outils). \ No newline at end of file diff --git a/website/translated_docs/fr/Project/developing.md b/website/translated_docs/fr/Project/developing.md index b4ebe6b0026bb5..9a51c820e2e908 100644 --- a/website/translated_docs/fr/Project/developing.md +++ b/website/translated_docs/fr/Project/developing.md @@ -3,31 +3,81 @@ id: developing title: Développer un projet --- -## Outils de développement +4D projects are developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). -Les bases projets 4D sont créées localement, à l'aide de l'application **4D Developer**. Pour ouvrir un projet depuis 4D Developer, sélectionnez le fichier principal du projet, nommé *databaseName.4DProject* (voir [Architecture d'un projet 4D](architecture.md)). Notez que vous pouvez également travailler avec n'importe quel éditeur de texte car la plupart des fichiers du projet 4D sont des fichiers texte. L'accès simultané aux fichiers est géré via un gestionnaire d'accès aux fichiers (voir ci-dessous). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -4D Server peut ouvrir les fichiers *databaseName.4DProject* à des fins de test : les machines 4D distantes peuvent se connecter et utiliser la base de données, mais tous les fichiers de structure de base de données sont en lecture seule. -Le développement multi-utilisateur est géré via des outils de contrôle de version standard, qui permettent aux développeurs de travailler sur différentes branches et de comparer, fusionner ou annuler des modifications. -## Accès au fichier de projet +## Enregistrement des fichiers + +Lorsque vous travaillez sur un projet dans 4D, vous pouvez utiliser les éditeurs intégrés de 4D pour créer, modifier ou sauvegarder des éléments de la structure, des méthodes, des formulaires, etc. Les modifications sont enregistrées sur disque lorsque vous sélectionnez un élément de menu **Sauvegarde**, ou lorsque la fenêtre de l'éditeur pert ou récupère le focus. -Lorsque vous travaillez sur un projet dans 4D Developer, vous pouvez utiliser les éditeurs intégrés de 4D pour créer, modifier ou sauvegarder des éléments de la structure, des méthodes, des formulaires, etc. Les éditeurs utilisant des fichiers sur le disque, d'éventuels conflits peuvent se produire si le même fichier est modifié voire supprimé de différents endroits. Par exemple, si la même méthode est modifiée dans une fenêtre d'éditeur de méthode *et* dans un éditeur de texte, la sauvegarde des deux modifications entraînera un conflit. +Les éditeurs utilisant des fichiers sur le disque, d'éventuels conflits peuvent se produire si le même fichier est modifié voire supprimé de différents endroits. Par exemple, si la même méthode est modifiée dans une fenêtre d'éditeur de méthode *et* dans un éditeur de texte, la sauvegarde des deux modifications entraînera un conflit. -4D Developer comprend un gestionnaire d’accès aux fichiers permettant de contrôler les accès simultanés : +Le développement 4D comprend un gestionnaire d’accès aux fichiers permettant de contrôler les accès simultanés : -- si un fichier ouvert est en lecture seule dans le système d'exploitation, une icône verrouillée s'affiche dans l'éditeur : - ![](assets/en/Project/lockicon.png) -- si un fichier ouvert est édité simultanément à partir de différents emplacements, 4D affiche une boîte de dialogue d'alerte lorsque vous tenterez d'enregistrer des modifications : ![](assets/en/Project/projectReload.png) - - **Oui** : ignore les modifications de l'éditeur et recharge +- if an open file 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 when trying to save the changes:![](assets/en/Project/projectReload.png) + - **Oui** : ignore les modifications de l'éditeur et recharge la version modifiée - **Non** : enregistrer les modifications et écraser l'autre version - **Annuler** : ne pas enregistrer -Cette fonctionnalité est activée pour tous les éditeurs intégrés : +Cette fonctionnalité est activée pour tous les éditeurs 4D intégrés (Structure, Formulaire, Méthode, Paramètres et Boite à outils). + + + +Les projets 4D sont développés à l'aide de l'application **4D**. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project manager, and an application runtime, allowing to develop, test, and debug any kind of project. + +> La plupart des fichiers de projet 4D étant des fichiers texte, vous pouvez utiliser n'importe quel éditeur de texte pour y travailler. L'accès simultané aux fichiers est géré via un gestionnaire d'accès aux fichiers (voir ci-dessous). + +Le développement multi-utilisateur est géré via des outils de contrôle de version standard, qui permettent aux développeurs de travailler sur différentes branches et de comparer, fusionner ou annuler des modifications. + + +## Configurations de développement + +Les projets interprétés (*applicationName.4DProject*, voir [Architecture d'un project 4D](architecture.md)) peuvent être ouverts dans les configurations suivantes : + +- 4D ouvrant **des fichiers de projet locaux** - dans ce cas, tous les éléments du projet sont à la disposition du développeur. Les fichiers projet peuvent être ouverts, modifiés, compilés, etc. Le résultat du développement peut être testé à tout moment à l'aide de la commande de menu 4D **Tester l'application** ou en utilisant le [serveur Web intégré](WebServer/webServerObject.md). +- Connexion 4D depuis **la même machine que 4D Server** - dans ce cas, le développement est pris en charge de la même manière que les projets locaux. Cette fonctionnalité vous permet de développer une application client/serveur dans le même contexte que le contexte de déploiement ([détaillé ci-dessous](#developing-projects-with-4d-server)). +- Connexion 4D depuis une **machine distante** - dans ce cas, 4D Server envoie une version .4dz du projet ([format compressé](Admin/building.md#build-compiled-structure)) à 4D. Par conséquent, tous les fichiers de structure sont en lecture seule. Cette fonctionnalité est utile à des fins de test. + + +## Développer des projets avec 4D Server + +### Mettre à jour des fichiers de projet sur le serveur + +Le développement d'un projet 4D Server repose sur les principes suivants : + +- Vous créez, testez et modifiez les fonctionnalités du projet dans une version locale des fichiers à l'aide de 4D. Pour travailler directement avec 4D Server, vous pouvez [utiliser 4D sur la même machine que 4D Server](#using-4d-on-the-same-machine). + +> Il est recommandé d'utiliser un outil de gestion de version standard (par exemple Git) afin de travailler avec des branches, d'enregistrer des projets à différentes étapes et/ou d'annuler les modifications si nécessaire. + +- 4D Server peut exécuter le fichier projet *.4DProject* (non compressé) en mode interprété, afin que 4D distant puisse se connecter et tester les fonctionnalités. Pour cela, 4D Server crée et envoie automatiquement aux machines distantes une [version .4dz](Admin/building.md#build-compiled-structure) du projet. + +- Une version .4dz mise à jour du projet est automatiquement produite lorsque cela est nécessaire, c'est-à-dire lorsque le projet a été modifié et rechargé par 4D Server. Le projet est rechargé : + - automatiquement, lorsque la fenêtre de l'application 4D Server arrive à l'avant de l'OS ou lorsque l'application 4D sur la même machine enregistre une modification (voir ci-dessous). + - lorsque la commande `RELOAD PROJECT` est exécutée. L'appel de cette commande est nécessaire lorsque, par exemple, vous avez extrait une nouvelle version du projet depuis la plateforme de contrôle de version. + + +### Mettre à jour des fichiers de projet sur les machines distantes + +Lorsqu'une version .4dz mise à jour du projet a été produite sur 4D Server, les machines 4D distantes connectées doivent se déconnecter et se reconnecter à 4D Server afin de bénéficier de la version mise à jour. + + + +### Utiliser 4D sur la même machine + +Lorsque 4D se connecte à un 4D Server sur la même machine, l'application se comporte comme 4D en mode monoposte et l'environnement de développement permet d'éditer les fichiers du projet. A chaque fois que 4D effectue une action **Enregistrer tout** depuis l'environnement de développement (explicitement depuis le menu **Fichier** ou implicitement en passant en mode application par exemple), 4D Server recharge de manière synchrone les fichiers du projet. 4D attend que 4D Server termine le rechargement des fichiers du projet avant de continuer. + +Veillez cependant aux différences de comportement suivantes, comparées à [l'architecture projet standard](architecture.md) : + +- le dossier userPreferences.{username} utilisé par 4D ne correspond pas au même dossier utilisé par 4D Server dans le dossier projet. Au lieu de cela, il s'agit d'un dossier dédié, nommé "userPreferences", stocké dans le dossier système du projet (c'est-à-dire au même emplacement que lors de l'ouverture d'un projet .4dz). +- le dossier utilisé par 4D pour les données dérivées n'est pas le dossier "DerivedData" du dossier projet. Il s'agit plutôt d'un dossier dédié nommé "DerivedDataRemote" situé dans le dossier système du projet. +- le fichier catalog.4DCatalog n'est pas édité par 4D mais par 4D Server. Les informations du catalogue sont synchronisées à l'aide des requêtes client/serveur +- le fichier directory.json n'est pas édité par 4D mais par 4D Server. Les informations du répertoire sont synchronisées à l'aide des requêtes client/serveur +- 4D utilise ses propres composants internes et plug-ins au lieu de ceux de 4D Server. + +> Il n'est pas recommandé d'installer des plug-ins ou des composants au niveau de l'application 4D ou 4D Server. + -- Éditeur de structure -- Éditeur de formulaire -- Éditeur de méthode -- Éditeur de paramètres -- Éditeur de boîte à outils \ No newline at end of file diff --git a/website/translated_docs/fr/Project/documentation.md b/website/translated_docs/fr/Project/documentation.md index ddf0552e0837df..1d279fcaaa408a 100644 --- a/website/translated_docs/fr/Project/documentation.md +++ b/website/translated_docs/fr/Project/documentation.md @@ -3,9 +3,9 @@ id: documentation title: Documenter un projet --- -## Aperçu -Dans les bases projet, vous pouvez documenter vos méthodes ainsi que vos formulaires, vos tables ou vos champs. La création d'une documentation est particulièrement appropriée pour les bases de données développées par plusieurs programmeurs et constitue généralement une bonne pratique en matière de programmation. La documentation peut contenir une description d'un élément ainsi que toute information nécessaire à la compréhension du fonctionnement de cet élément d'une base de données. + +In application projects, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for projects being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the application. Les éléments de projet suivants acceptent la documentation : @@ -13,232 +13,194 @@ Les éléments de projet suivants acceptent la documentation : - Formulaires - Tables et champs -Vos fichiers de documentation sont écrits dans la syntaxe Markdown (fichiers .md) à l'aide de n'importe quel éditeur prenant en charge le Markdown. They are stored as independant files within your project folder. +Vos fichiers de documentation sont écrits dans la syntaxe Markdown (fichiers .md) à l'aide de n'importe quel éditeur prenant en charge le Markdown. Ils sont stockés en tant que fichiers indépendants dans votre dossier Project. -Documentation is displayed in the preview area (right-side panel) of the Explorer: +La documentation s'affiche dans la zone d'aperçu (panneau de droite) de l'Explorateur : ![](assets/en/Project/explorer_Doc.png) -It can also be partially exposed as [code editor tips](#viewing-documentation-in-the-code-editor). +Il peut également être partiellement exposé en tant que [conseils de l'éditeur de code](#viewing-documentation-in-the-code-editor). + + +## Fichiers documentation -## Documentation files +### Nom du fichier de documentation -### Documentation file name +Les fichiers de documentation ont le même nom que l'élément auquel ils sont rattachés, avec l'extension ".md". Par exemple, le fichier de documentation rattaché à la méthode projet `myMethod.4dm` sera nommé `myMethod.md`. -Documentation files have the same name as their attached element, with the ".md" extension. For example, the documentation file attached to the `myMethod.4dm` project method will be named `myMethod.md`. +Dans l'Explorateur, 4D affiche automatiquement le fichier de documentation avec le même nom que l'élément sélectionné (voir ci-dessous). -In the Explorer, 4D automatically displays the documentation file with the same name as the selected element (see below). -### Documentation file architecture +### Architecture des fichiers de documentation -All documentation files are stored in the `Documentation` folder, located at the first level of the package folder. +Tous les fichiers de documentation sont stockés dans le dossier `Documentation`, situé au premier niveau du dossier Package. -The `Documentation` folder architecture is the following: +L'architecture du dossier `Documentation` est la suivante : -- **Documentation** - - + **Classes** +- `Documentation` + + `Classes` * myClass.md - * **DatabaseMethods** + + `DatabaseMethods` * onStartup.md * ... - * **Formulaires** + + `Formulaires` * loginDial.md * ... - * **Méthodes** + + `Méthodes` * myMethod.md * ... - * **TableForms** - * **1** + + `TableForms` + * **1** - input.md - ... - - ... - - **Triggers** + * ... + + `Triggers` * table1.md * ... -* A project form and its project form method share the same documentation file for form and method. -* A table form and its table form method share the same documentation file for form and method. +- Un formulaire projet et sa méthode de formulaire projet partagent le même fichier de documentation pour le formulaire et la méthode. +- Un formulaire table et sa méthode de formulaire table partagent le même fichier de documentation pour le formulaire et la méthode. + +> Renommer ou supprimer un élément documenté dans votre projet renomme ou supprime également le fichier Markdown associé à l'élément. -> Renaming or deleting a documented element in your project will also rename or delete the element's associated Markdown file. -## Documentation in the Explorer +## Documentation dans l'Explorateur -### Viewing documentation +### Visualiser la documentation -To view documentation in the Explorer window: +Pour afficher la documentation dans la fenêtre de l'Explorateur : -1. Make sure the preview area is displayed. -2. Select the documented element in the Explorer list. -3. Click the **Documentation** button located below the preview area. +1. Assurez-vous que la zone d'aperçu est affichée. +2. Sélectionnez l'élément documenté dans la liste de l'Explorateur. +3. Cliquez sur le bouton **Documentation** situé sous la zone d'aperçu. ![](assets/en/Project/comments-explo2.png) -- If no documentation file was found for the selected element, a **Create** button is displayed (see below). +- Si aucun fichier de documentation n'a été trouvé pour l'élément sélectionné, un bouton **Créer** s'affiche (voir ci-dessous). -- Otherwise, if a documentation file exists for the selected element, the contents are displayed in the area. The contents are not directly editable in the pane. +- Sinon, s'il existe un fichier de documentation pour l'élément sélectionné, le contenu est affiché dans la zone. Le contenu n'est pas directement modifiable dans le volet. -### Editing documentation file +### Modifier le fichier documentation -You can create and/or edit a Markdown documentation file from the Explorer window for the selected element. +Vous pouvez créer et/ou modifier un fichier de documentation Markdown à partir de la fenêtre de l'Explorateur pour l'élément sélectionné. -If there is no documentation file for the selected element, you can: +S'il n'y a pas de fichier de documentation pour l'élément sélectionné, vous pouvez : -- click on the **Create** button in the `Documentation` pane or, -- choose the **Edit Documentation...** option in the contextual menu or options menu of the Explorer. +- cliquez sur le bouton **Créer** dans le volet `Documentation` ou, +- choisissez l'option **Modifier la documentation...** dans le menu contextuel ou le menu d'options de l'Explorateur. ![](assets/en/Project/comments-explo3.png) -4D automatically creates an appropriately named .md file with a basic template at the relevant location and opens it with your default Markdown editor. +4D crée automatiquement un fichier .md nommé correctement avec un modèle de base à l'emplacement approprié et l'ouvre avec votre éditeur Markdown par défaut. + +Si un fichier de documentation existe déjà pour l'élément sélectionné, vous pouvez l'ouvrir avec votre éditeur Markdown en choisissant l'option **Modifier la documentation...** dans le menu contextuel ou le menu d'options de l'Explorateur. -If a documentation file already exists for the selected element, you can open it with your Markdown editor by choosing the **Edit Documentation...** option in the contextual menu or options menu of the Explorer. -## Viewing documentation in the code editor -The 4D code editor displays a part of a method's documentation in its help tip. +## Visualiser la documentation dans l'éditeur de code + +L'éditeur de code 4D affiche une partie de la documentation d'une méthode dans son info-bulle. ![](assets/en/Project/codeEditor_Comments.png) -If a file named "\.md" exists in "\/documentation" folder, the code editor displays (by priority): +Si un fichier nommé "\.md" existe dans le dossier "\/documentation", l'éditeur de code affiche (par priorité) : + +- Tout texte saisi dans une balise de `commentaire` HTML (*\*) en haut du fichier markdown. + +- Ou, si aucune balise de `commentaire` html n'est utilisée, la première phrase après une balise `# Description` du fichier markdown. + Dans ce cas, la première ligne contient le **prototype** de la méthode, généré automatiquement par le parseur du code 4D. -- Any text entered in an HTML `comment` tag (*\*) at the top of the markdown file. + > Sinon, l'éditeur de code affiche [le bloc de commentaire en haut du code de la méthode](https://doc.4d.com/4Dv18R2/4D/18-R2/Writing-a-method.300-4824019.en.html#4618226). -- Or, if no html `comment` tag is used, the first sentence after a `# Description` tag of the markdown file. - In this case, the first line contains the **prototype** of the method, automatically generated by the 4D code parser. - - > Otherwise, the code editor displays [the block comment at the top of the method code](https://doc.4d.com/4Dv18R2/4D/18-R2/Writing-a-method.300-4824019.en.html#4618226). -## Documentation file definition -4D uses a basic template to create new documentation files. This template suggests specific features that allow you to [display information in the code editor](#viewing-documentation-in-the-code-editor). +## Définition du fichier de documentation -However, you can use any [supported Markdown tags](#supported-markdown). +4D utilise un modèle de base pour créer de nouveaux fichiers de documentation. Ce modèle propose des fonctionnalités spécifiques qui vous permettent [d'afficher des informations dans l'éditeur de code](#viewing-documentation-in-the-code-editor). -New documentation files are created with the following default contents: +Cependant, vous pouvez utiliser toutes les [balises Markdown prises en charge](#supported-markdown). + +De nouveaux fichiers de documentation sont créés avec les contenus par défaut suivants : ![](assets/en/Project/comments-explo4.png) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Ligne - - Description -
        - \ - - HTML comment. Used in priority as the method description in the code editor tips -
        - ## Description - - Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used -
        - ## Example - - Heading level 2, you can use this area to show sample code -
        - ```4D
        Type your example here ``` -
        - Used to format 4D code examples (uses highlight.js library) -
        - -### Supported Markdown - -- The title tag is supported: - - # Title 1 - ## Title 2 - ### Title 3 - - -- The style tags (italic, bold, strikethrough) are supported: - - _italic_ - **bold** - **_bold/italic_** - ~~strikethrough~~ - - -- The code block tag (```4d ...```) is supported with 4D code highlight: - - \ - - 4d - C_TEXT($txt) - $txt:="Hello world!" - \ - -- The table tag is supported: - - | Parameter | Type | Description | - | --------- | ------ | ------------ | - | wpArea | String |Write pro area| - | toolbar | String |Toolbar name | - - -- The link tag is supported: - - // Case 1 - The [documentation](https://doc.4d.com) of the command .... - - // Case 2 - [4D blog][1] - - [1]: https://blog.4d.com - - -- The image tags are supported: - - ![image info](pictures/image.png) - - ![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") - - [![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) - +| Ligne | Description | +| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| "\" | Commentaire HTML. Utilisé en priorité comme description de méthode dans les [astuces de l'éditeur de code](#viewing-documentation-in-the-code-editor) | +| ## Description | Titre de niveau 2 en Markdown. La première phrase qui suit cette balise est utilisée comme description d'une méthode dans les astuces de l'éditeur de code si le commentaire HTML n'est pas utilisé | +| ## Example | Titre de niveau 2, vous pouvez utiliser cette zone pour afficher un exemple de code | +| \``` 4D
        Insérez votre exemple ici \` `` | Utilisé pour formater des exemples de code 4D (utilise la bibliothèque highlight.js) | -[![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) -> For more information, see the [GitHug Markdown guide](https://guides.github.com/features/mastering-markdown/). +### Prise en charge du markdown +- La balise de titre est prise en charge : +``` +# Title 1 +## Title 2 +### Title 3 +``` -## Exemple +- Les balises de style (italique, gras, barré) sont prises en charge : -In the `WP SwitchToolbar.md` file, you can write: +``` +_italic_ +**bold** +**_bold/italic_** +~~strikethrough~~ +``` -```4d - + +- La balise du bloc de code (\```4d ... ```) est supportée avec le surlignage du code 4D : + + \``` 4d +C_TEXT($txt) +$txt:="Hello world!" + \` `` + + +- La balise de tableau est prise en charge : + +``` +| Parameter | Type | Description | +| --------- | ------ | ------------ | +| wpArea | String |Write pro area| +| toolbar | String |Toolbar name | +``` + + +- La balise de lien est prise en charge : + +``` +// Case 1 +The [documentation](https://doc.4d.com) of the command .... + +// Case 2 +[4D blog][1] + +[1]: https://blog.4d.com +``` + +- Les balises d'image sont prises en charge : + +``` +![image info](pictures/image.png) + +![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") + +[![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) +``` +[![logo blog 4D avec lien](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) + +> Pour plus d'informations, consultez le [guide Markdown GitHug](https://guides.github.com/features/mastering-markdown/). -GetLogo (size) -> logo +## Exemple + +Dans le fichier `WP SwitchToolbar.md`, vous pouvez entrer le code suivant : + +```4d | Parameter | Type | in/out | Description | | --------- | ------ | ------ | ----------- | | size | Longint | in | Logo style selector (1 to 5) | @@ -247,18 +209,18 @@ GetLogo (size) -> logo ## Description -This method returns a logo of a specific size, depending on the value of the *size* parameter value. -1 = smallest size, 5 = largest size. +Cette méthode retourne un logo de taille spécifique, selon la valeur du paramètre *size*. +1 = plus petite taille, 5 = plus grande taille. -## Example +## Exemple C_PICTURE($logo) C_LONGINT($size) -//Get the largest logo +//Obtenir le plus grand logo $logo:=GetLogo(5) ``` -- Explorer view: ![](assets/en/Project/explorer_Doc.png) +- Vue de l'Explorateur : ![](assets/en/Project/explorer_Doc.png) -- Code editor view: ![](assets/en/Project/comments-explo5.png) \ No newline at end of file +- Vue de l’Éditeur de code : ![](assets/en/Project/comments-explo5.png) diff --git a/website/translated_docs/fr/Project/licenses.md b/website/translated_docs/fr/Project/licenses.md new file mode 100644 index 00000000000000..f3d9185d7c56bc --- /dev/null +++ b/website/translated_docs/fr/Project/licenses.md @@ -0,0 +1,142 @@ +--- +id: licenses +title: Managing 4D Licenses +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example in the following cases: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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. + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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: + + + +![](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 . +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: (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: +- Telephone: 1-408-557-4600 + +For the UK: + +- Web: +- Telephone: 01625 536178 \ No newline at end of file diff --git a/website/translated_docs/fr/Project/overview.md b/website/translated_docs/fr/Project/overview.md index 7a7b016bd6e10a..03ab1a9529986b 100644 --- a/website/translated_docs/fr/Project/overview.md +++ b/website/translated_docs/fr/Project/overview.md @@ -3,33 +3,31 @@ id: overview title: Aperçu --- -Un projet 4D contient l'intégralité du code source d'une application de base de données 4D, de la structure de la base de données à l'interface utilisateur, en passant par les formulaires, les menus, les paramètres utilisateur ou n'importe quelle ressource requise. Un projet 4D est principalement constitué de fichiers texte. +Un projet 4D contient l'intégralité du code source d'une application 4D, quel que soit son type de déploiement (web, mobile ou desktop), de la structure de la base de données à l'interface utilisateur, en passant par le code, les formulaires, les menus, les paramètres utilisateur ou n'importe quelle ressource requise. Un projet 4D est principalement constitué de fichiers texte. -Les projets 4D sont créés et gérés à l'aide de l'application 4D Developer. Les fichiers de projet sont ensuite utilisés pour créer les fichiers de déploiement d'application finaux, qui peuvent être ouverts avec 4D Server ou une licence 4D Volume (applications fusionnées). ## Fichiers du projet -Les fichiers de projet 4D sont ouverts et édités à l'aide d'applications standard de la plate-forme 4D. Des éditeurs complets sont disponibles pour gérer les fichiers, y compris un éditeur de structure, un éditeur de méthode, un éditeur de formulaire, un éditeur de menu, etc. +Les fichiers de projet 4D sont ouverts et édités à l'aide d'applications standard de la plate-forme 4D (4D ou 4D Server). Avec 4D, des éditeurs complets sont disponibles pour gérer les fichiers, y compris un éditeur de structure, un éditeur de méthode, un éditeur de formulaire, un éditeur de menu, etc... -De plus, les projets étant des fichiers lisibles, en texte brut (JSON, XML, etc.), ils peuvent être lus ou édités manuellement par les développeurs, à l’aide de n’importe quel éditeur de code. +Les projets étant des fichiers lisibles, en texte brut (JSON, XML, etc.), ils peuvent être lus ou édités manuellement par les développeurs, à l’aide de n’importe quel éditeur de code. -## Contrôle de la source +De plus, les fichiers de projet 4D facilitent la programmation générique, la création de modèles d'application et le partage de code. Les projets sont organisés en interne dans des [fichiers et dossiers](Project/architecture.md). -Les fichiers de projet 4D facilitent la programmation générique, la création de modèles d'application et le partage de code. -La flexibilité du développement d'un projet 4D est particulièrement démontrée lorsque plusieurs développeurs doivent travailler simultanément sur la même partie d'une application. Les fichiers de projet 4D sont particulièrement bien adaptés pour être gérés par un système de **contrôle de version** (Perforce, Git, SVN, etc.), permettant aux équipes de développement de tirer parti de fonctionnalités telles que : +## Développement -- Versioning -- Comparaisons de révision -- Retours en arrière (Rollbacks) +Les projets 4D sont développés à l'aide de l'application **4D**. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project generator, and an application runtime, allowing to develop, test, and debug any kind of project. -## Travailler avec des projets +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -Vous pouvez créer un projet de base de données 4D : -- en créant un nouveau projet vierge - voir [Créer un projet 4D](creating.md). -- en exportant un développement "binaire" 4D existant en projet -- voir "Exporter depuis une base 4D" sur [doc.4d.com](https://doc.4d.com). +## Final application -Le développement du projet s'effectue localement, à l'aide de l'application 4D Developer - reportez-vous à la section [Développer un projet](developing.md). Team development interactions are handled by the source control tool. +Project files can be [compiled](compiler.md) and easily deployed. 4D allows you to create three types of applications from your projects: -Les projets 4D peuvent être compilés et facilement déployés sur des applications en monoposte ou en client-serveur qui contiennent des versions compactées de votre projet - voir [Créer un package de projet](building.md). \ No newline at end of file +- [web](WebServer/webServer.md) applications, +- [mobile](https://developer.4d.com/4d-for-ios/) applications, +- [desktop](Desktop/building.md) applications (client/server or single-user). + +Back end applications can be deployed using 4D Server, 4D, or merged with 4D Volume license. \ No newline at end of file diff --git a/website/translated_docs/fr/REST/$asArray.md b/website/translated_docs/fr/REST/$asArray.md index 259495be533a02..40d937daf77fb2 100644 --- a/website/translated_docs/fr/REST/$asArray.md +++ b/website/translated_docs/fr/REST/$asArray.md @@ -6,114 +6,119 @@ title: '$asArray' Retourne le résultat d'une requête sous forme de tableau (c'est-à-dire une collection) au lieu d'un objet JSON. + ## Description Si vous souhaitez obtenir la réponse sous forme de tableau, il vous suffit d'ajouter `$asArray` à votre requête REST (*ex :*, `$asArray=true`). ## Exemple - Voici un exemple pour obtenir une réponse sous forme de tableau. -`GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` + `GET /rest/Company/?$filter="name begin a"&$top=3&$asArray=true` **Réponse** : - [ +```` +[ + { + "__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 + } +] +```` + +Les mêmes données au format JSON par défaut : + +```` +{ + "__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 +} +```` -Les mêmes données au format JSON par défaut : - { - "__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/fr/REST/$atomic_$atonce.md b/website/translated_docs/fr/REST/$atomic_$atonce.md index 7be8b6e0b7d7ed..f67204dc08ae07 100644 --- a/website/translated_docs/fr/REST/$atomic_$atonce.md +++ b/website/translated_docs/fr/REST/$atomic_$atonce.md @@ -6,61 +6,62 @@ title: '$atomic/$atonce' Autorise les actions d'une requête REST à faire partie d'une transaction. Si aucune erreur n'est générée, la transaction est validée. Sinon, la transaction est annulée. -## Description +## Description Lorsque plusieurs actions sont réunies, vous pouvez utiliser `$atomic/$atonce` pour vous assurer qu'aucune action ne se réalise si l'une d'elle échoue. Vous pouvez utiliser `$atomic` ou `$atonce`. -## Exemple +## Exemple Nous appelons la requête REST suivante dans une transaction. -`POST /rest/Employee?$method=update&$atomic=true` + `POST /rest/Employee?$method=update&$atomic=true` -**POST data**: +**Données POST** : - [ - { - "__KEY": "200", - "firstname": "John" - }, - { - "__KEY": "201", - "firstname": "Harry" - } - ] - +```` +[ +{ + "__KEY": "200", + "firstname": "John" +}, +{ + "__KEY": "201", + "firstname": "Harry" +} +] +```` Nous obtenons l'erreur suivante dans la deuxième entité ; la première entité n'est donc pas sauvegardée : - { - "__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 - } - ] - } - - -> Même si le salaire de la première entité porte la valeur 45000, cette valeur n'a pas été sauvegardée sur le serveur et le timestamp (__STAMP)* n'a pas été modifié. Si nous rechargeons l'entité, la valeur précédente s'affichera. \ 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 + } + ] +} +```` +> Même si le salaire de la première entité porte la valeur 45000, cette valeur n'a pas été sauvegardée sur le serveur et le timestamp (__STAMP)* n'a pas été modifié. Si nous rechargeons l'entité, la valeur précédente s'affichera. diff --git a/website/translated_docs/fr/REST/$attributes.md b/website/translated_docs/fr/REST/$attributes.md index ea5b1f65e57c83..794b13a471d0f6 100644 --- a/website/translated_docs/fr/REST/$attributes.md +++ b/website/translated_docs/fr/REST/$attributes.md @@ -5,94 +5,102 @@ title: '$attributes' Permet de sélectionner les attributs relationnels à obtenir à partir de la dataclass (par exemple, `Company(1)?$attributes=employees.lastname` or `Employee?$attributes=employer.name`). + ## Description Lorsque vous avez des attributs relationnels dans une dataclass, utilisez `$attributes` pour définir le chemin des attributs dont vous souhaitez obtenir les valeurs pour l'entité ou les entités associées. Vous pouvez appliquer des `$attributes` à une entité (par exemple, People (1)) ou à une entity selection (par exemple, People/$entityset/0AF4679A5C394746BFEB68D2162A19FF). -- Si `$attributes` n'est pas spécifié dans une requête, ou si la valeur "*" est passée, tous les attributs disponibles sont extraits. **Related entity** attributes are extracted with the simple form: an object with property `__KEY` (primary key) and `URI`. Les attributs des **entités relatives** ne sont pas extraits. + +- Si `$attributes` n'est pas spécifié dans une requête, ou si la valeur "*" est passée, tous les attributs disponibles sont extraits. Les attributs **d'entité relative** sont extraits avec la forme simple : un objet avec la propriété `__KEY` (clé primaire) et `URI`. Les attributs des **entités relatives** ne sont pas extraits. - Si `$attributes` est spécifié pour les attributs **d'entité relative ** : - - - `$attributes=relatedEntity`: the related entity is returned with simple form (deferred __KEY property (primary key)) and `URI`. + - `$attributes=relatedEntity` : l'entité relative est retournée sous une forme simple (propriété __KEY différée (clé primaire)) et `URI`. - `$attributes=relatedEntity.*` : tous les attributs de l'entité relative sont retournés - `$attributes=relatedEntity.attributePath1, relatedEntity.attributePath2, ...` : seuls ces attributs de l'entité relative sont retournés. + + - Si `$attributes` est spécifié pour les attributs **d'entités relatives** : - - `$attributes=relatedEntities.*` : toutes les propriétés des entités relatives sont retournées - `$attributes=relatedEntities.attributePath1, relatedEntity.attributePath2, ...` : seuls ces attributs des entités relatives sont retournés. + + ## Exemples avec plusieurs entités relatives -Si nous passons la requête REST suivante pour la classe de datastore Company (qui possède un attribut de relation "employees"): +Si nous passons la requête REST suivante pour la dataclasse Company (qui possède un attribut de relation "employees"): -`GET /rest/Company(1)/?$attributes=employees.lastname` + `GET /rest/Company(1)/?$attributes=employees.lastname` **Réponse** : - { - "__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" + }, + ... } - +} +``` Si vous souhaitez obtenir tous les attributs des employés : -`GET /rest/Company(1)/?$attributes=employees.*` + `GET /rest/Company(1)/?$attributes=employees.*` Si vous souhaitez obtenir le nom de famille et les attributs de nom de poste des employés : -`GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` + `GET /rest/Company(1)/?$attributes=employees.lastname,employees.jobname` + ## Exemples avec une entité relative -Si nous passons la requête REST suivante pour la classe de datastore Employee (qui a plusieurs attributs relationnels, y compris "employer") : +Si nous passons la requête REST suivante pour la dataclass Employee (qui a plusieurs attributs relationnels, y compris "employer") : -`GET /rest/Employee(1)?$attributes=employer.name` + + `GET /rest/Employee(1)?$attributes=employer.name` **Réponse** : - { - "__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" } - +} +``` Si vous souhaitez obtenir tous les attributs de l'employeur : -`GET /rest/Employee(1)?$attributes=employer.*` + `GET /rest/Employee(1)?$attributes=employer.*` Si vous souhaitez obtenir les noms de famille de tous les employés de l'employeur : -`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/fr/REST/$binary.md b/website/translated_docs/fr/REST/$binary.md index 294b06201aa5b1..dd59a36c114bf1 100644 --- a/website/translated_docs/fr/REST/$binary.md +++ b/website/translated_docs/fr/REST/$binary.md @@ -7,13 +7,15 @@ Passez "true" pour enregistrer le BLOB en tant que document (vous devez égaleme ## Description -`$binary` vous permet d'enregistrer le BLOB en tant que document. Vous devez également utiliser la commande [`$expand`]($expand.md). +`$binary` vous permet d'enregistrer le BLOB en tant que document. Vous devez également utiliser la commande [`$expand`]($expand.md). Lorsque vous faites la requête suivante : - GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt - +``` +GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt +``` Il vous sera demandé où enregistrer le BLOB sur le disque : -![](assets/en/REST/binary.png) \ No newline at end of file +![](assets/en/REST/binary.png) + diff --git a/website/translated_docs/fr/REST/$catalog.md b/website/translated_docs/fr/REST/$catalog.md index b015324f67a09e..66d26541d2fcc2 100644 --- a/website/translated_docs/fr/REST/$catalog.md +++ b/website/translated_docs/fr/REST/$catalog.md @@ -6,6 +6,7 @@ title: '$catalog' Le catalogue décrit toutes les dataclass et les attributs disponibles dans le datastore. + ## Syntaxe | Syntaxe | Exemple | Description | @@ -16,9 +17,9 @@ Le catalogue décrit toutes les dataclass et les attributs disponibles dans le d ## $catalog - Retourne une liste de dataclass dans votre projet avec deux URI : une pour accéder aux informations sur sa structure et une pour récupérer les données de la dataclass + ### Description Lorsque vous appelez `$catalog`, une liste des dataclass est retournée avec deux URI pour chaque dataclass dans le datastore de votre projet. @@ -27,6 +28,7 @@ Seules les dataclass exposées apparaissent dans cette liste pour le datastore d Voici une description des propriétés retournées pour chaque dataclass dans le datastore de votre projet : + | Propriété | Type | Description | | --------- | ------ | ------------------------------------------------------------------------------------ | | name | Chaine | Nom de la dataclass. | @@ -40,21 +42,23 @@ Voici une description des propriétés retournées pour chaque dataclass dans le **Résultat** : - { - 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 @@ -62,9 +66,10 @@ Retourne des informations sur toutes les dataclasse de votre projet et leurs att ### Description -En appelant `$catalog/$all`, vous pouvez recevoir des informations détaillées sur les attributs de chacune des classes du datastore du modèle courant de votre projet. +En appelant `$catalog/$all`, vous pouvez recevoir des informations détaillées sur les attributs de chacune des dataclasses du modèle de votre projet. + +Pour plus d'informations sur ce qui est retourné pour chaque dataclass et ses attributs, utilisez [`$catalog/{dataClass}`](#catalogdataClass). -Pour plus d'informations sur ce qui est retourné pour chaque classe du datastore et ses attributs, utilisez [`$catalog/{dataClass}`](#catalogdataClass). ### Exemple @@ -72,258 +77,262 @@ Pour plus d'informations sur ce qui est retourné pour chaque classe du datastor **Résultat** : - { - - "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} -Retourne des informations sur une dataclass et ses attributs +Renvoie des informations sur une dataclass et ses attributs ### Description -L'appel de `$catalog/{dataClass}` pour une dataclass spécifique retournera les informations suivantes sur la dataclass et les attributs qu'elle contient. Si vous souhaitez récupérer ces informations pour toutes les classes de datastore dans le datastore de votre projet, utilisez [`$catalog/$all`](#catalogall). +L'appel de `$catalog/{dataClass}` pour une dataclass spécifique retournera les informations suivantes sur la dataclass et les attributs qu'elle contient. L'appel de `$catalog/{dataClass}` pour une dataclass spécifique retournera les informations suivantes sur la dataclass et les attributs qu'elle contient. Les informations que vous récupérez concernent : -* Dataclass -* Attribut(s) -* Méthode(s) le cas échéant -* Clé primaire +* Dataclass +* Attribut(s) +* Méthode(s) le cas échéant +* Clé primaire ### DataClass Les propriétés suivantes sont retournées pour une dataclass exposée : -| Propriété | Type | Description | -| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------- | -| name | Chaine | Nom de la dataclass | -| collectionName | Chaine | Name of an entity selection on the dataclass | -| tableNumber | Nombre | Table number in the 4D database | -| scope | Chaine | Étendue de la dataclass (à noter que seules les classes du datastore dont l'étendue est publique sont affichées) | -| dataURI | Chaine | Un URI aux données de la dataclass | + +| Propriété | Type | Description | +| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------- | +| name | Chaine | Nom de la dataclass | +| collectionName | Chaine | Nom d'une entity selection dans la dataclass | +| tableNumber | Nombre | Numéro de la table dans la base 4D | +| scope | Chaine | Étendue de la dataclass (à noter que seules les dataclasses dont **l'étendue** (scope) est publique sont affichées) | +| dataURI | Chaine | Un URI aux données de la dataclass | ### Attribut(s) Voici les propriétés de chaque attribut exposé qui sont retournées : -| Propriété | Type | Description | -| ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | Chaine | Le nom de l’attribut. | -| kind | Chaine | Attribute type (storage or relatedEntity). | -| fieldPos | Nombre | Position of the field in the database table). | -| scope | Chaine | Portée de l'attribut (seuls les attributs dont la portée est publique apparaîtront). | -| indexed | Chaine | Si un **type d'index** a été sélectionné, cette propriété retournera true. Sinon, cette propriété n'apparaîtra pas. | -| type | Chaine | Type d'attribut de chaîne (booléen, blob, octet, date, durée, image, long, long64, numérique, chaîne, uuid ou mot) ou la classe de datastore pour un attribut de relation N-> 1. | -| identifying | Booléen | This property returns True if the attribute is the primary key. Sinon, cette propriété n'apparaîtra pas. | -| path | Chaine | 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.| - -### Méthode(s) +| Propriété | Type | Description | +| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | Chaine | Le nom de l’attribut. | +| kind | Chaine | Type d'attribut (stockage ou relatedEntity). | +| fieldPos | Nombre | Position du champ dans la table de la base. | +| scope | Chaine | Portée de l'attribut (seuls les attributs dont la portée est publique apparaîtront). | +| indexed | Chaine | Si un **type d'index** a été sélectionné, cette propriété retournera true. Sinon, cette propriété n'apparaîtra pas. | +| type | Chaine | Type d'attribut de chaîne (booléen, blob, octet, date, durée, image, long, long64, numérique, chaîne, uuid ou mot) ou la dataclasse pour un attribut de relation N-> 1. | +| identifying | Booléen | Cette propriété retourne True si l'attribut est la clé primaire. Sinon, cette propriété n'apparaîtra pas. | +| path | Chaine | Name of the dataclass for a relatedEntity attribute, or name of the relation for a relatedEntities attribute. | +| foreignKey | Chaine | Pour un attribut relatedEntity, nom de l'attribut associé. | +| inverseName | Chaine | Nom de la relation opposée pour un attribut relatedEntity ou relatedEntities. | -Définit les méthodes projet associées à la dataclass, le cas échéant. ### Clé primaire -L'objet clé retourne le nom de l'attribut (**name**) défini comme **clé primaire** pour la classe du datastore. +L'objet clé retourne le nom de l'attribut (**name**) défini comme **clé primaire** pour la dataclass. -### Exemple -Vous pouvez récupérer les informations concernant une classe de datastore spécifique. +### Exemple +Vous pouvez récupérer les informations concernant une dataclass spécifique. `GET /rest/$catalog/Employee` **Résultat** : - { - 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/fr/REST/$compute.md b/website/translated_docs/fr/REST/$compute.md index b7f48c26e8f983..d6da37af49a22c 100644 --- a/website/translated_docs/fr/REST/$compute.md +++ b/website/translated_docs/fr/REST/$compute.md @@ -5,25 +5,27 @@ title: '$compute' Calculez des attributs spécifiques (par exemple, `Employee/salary/?$compute=sum)` ou dans le cas d'un attribut Objet (par exemple, Employee/objectAtt.property1/?$compute=sum) + ## Description Ce paramètre vous permet de réaliser des calculs avec vos données. Si vous souhaitez effectuer un calcul avec un attribut, saisissez ce qui suit : -`GET /rest/Employee/salary/?$compute=$all` + `GET /rest/Employee/salary/?$compute=$all` Si vous souhaitez passer un attribut Objet, vous devez passer l'une de ses propriétés. Par exemple : -`GET /rest/Employee/objectAtt.property1/?$compute=$all` + `GET /rest/Employee/objectAtt.property1/?$compute=$all` Vous pouvez utiliser l'un des mots clés suivants : + | Mot-clé | Description | | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | $all | Un objet JSON qui définit toutes les fonctions de l'attribut (moyenne, nombre, min, max et somme pour les attributs de type Numérique et count, min et max pour les attributs de type Chaîne | | average | Obtenir la moyenne d'un attribut numérique | -| count | Obtenir le nombre total dans la collection ou la classe de datastore (dans les deux cas, vous devez spécifier un attribut) | +| count | Obtenir le nombre total dans la collection ou la dataclass (dans les deux cas, vous devez spécifier un attribut) | | min | Obtenir la valeur minimale d'un attribut numérique ou la plus petite valeur d'un attribut de type Chaîne | | max | Obtenir la valeur maximale d'un attribut numérique ou la plus grande valeur d'un attribut de type Chaîne | | sum | Obtenir la somme d'un attribut numérique | @@ -33,48 +35,51 @@ Vous pouvez utiliser l'un des mots clés suivants : Si vous souhaitez obtenir tous les calculs pour un attribut de type Numérique, vous pouvez écrire : -`GET /rest/Employee/salary/?$compute=$all` + `GET /rest/Employee/salary/?$compute=$all` **Réponse** : - { - "salary": { - "count": 4, - "sum": 335000, - "average": 83750, - "min": 70000, - "max": 99000 - } +```` +{ + "salary": { + "count": 4, + "sum": 335000, + "average": 83750, + "min": 70000, + "max": 99000 } - +} +```` Si vous souhaitez obtenir tous les calculs pour un attribut de type Chaîne, vous pouvez écrire : -`GET /rest/Employee/firstName/?$compute=$all` + `GET /rest/Employee/firstName/?$compute=$all` **Réponse** : - { - "salary": { - "count": 4, - "min": Anne, - "max": Victor - } +```` +{ + "salary": { + "count": 4, + "min": Anne, + "max": Victor } - +} +```` Si vous souhaitez obtenir un calcul avec un attribut, vous pouvez écrire ce qui suit : -`GET /rest/Employee/salary/?$compute=sum` + `GET /rest/Employee/salary/?$compute=sum` **Réponse** : `235000` + Si vous souhaitez effectuer un calcul avec un attribut Objet, vous pouvez saisir ce qui suit : -`GET /rest/Employee/objectAttribute.property1/?$compute=sum` + `GET /rest/Employee/objectAttribute.property1/?$compute=sum` Réponse : -`45` \ No newline at end of file +`45` \ No newline at end of file diff --git a/website/translated_docs/fr/REST/$directory.md b/website/translated_docs/fr/REST/$directory.md index 2cb42beda79abd..8b4181f3481b29 100644 --- a/website/translated_docs/fr/REST/$directory.md +++ b/website/translated_docs/fr/REST/$directory.md @@ -5,12 +5,12 @@ title: '$directory' Le répertoire gère l'accès des utilisateurs via les requêtes REST. + ## $directory/login Ouvre une session REST sur votre application 4D et connecte l'utilisateur. ### Description - Utilisez `$directory/login` pour ouvrir une session dans votre application 4D via REST et connectez un utilisateur. Vous pouvez également modifier le timeout par défaut de la session 4D. Tous les paramètres doivent être passés dans les **en-têtes** d'une méthode POST : @@ -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) ``` **Résultat** : Si la connexion a réussi, le résultat sera le suivant : - { - "result": true - } - +``` +{ + "result": true +} +``` Sinon, la réponse sera la suivante : - { - "result": false - } \ No newline at end of file +``` +{ + "result": false +} +``` diff --git a/website/translated_docs/fr/REST/$distinct.md b/website/translated_docs/fr/REST/$distinct.md index 2214b5cd43ac91..77dec14a810381 100644 --- a/website/translated_docs/fr/REST/$distinct.md +++ b/website/translated_docs/fr/REST/$distinct.md @@ -6,6 +6,7 @@ title: '$distinct' Retourne les différentes valeurs d'un attribut spécifique dans une collection (par exemple, `Company/name?$filter="name=a*"&$distinct=true`) + ## Description `$distinct` vous permet de retourner une collection contenant les différentes valeurs d'une requête sur un attribut spécifique. Un seul attribut dans la dataclass peut être spécifié. Généralement, le type Chaîne est idéal; cependant, vous pouvez également l'utiliser sur n'importe quel type d'attribut pouvant contenir plusieurs valeurs. @@ -13,14 +14,16 @@ Retourne les différentes valeurs d'un attribut spécifique dans une collection Vous pouvez également utiliser `$skip` et `$top/$limit` si vous souhaitez parcourir la sélection avant qu'elle ne soit placée dans un tableau. ## Exemple - Dans l'exemple ci-dessous, nous souhaitons récupérer les différentes valeurs d'un nom de société commençant par la lettre "a" : -`GET /rest/Company/name?$filter="name=a*"&$distinct=true` + `GET /rest/Company/name?$filter="name=a*"&$distinct=true` **Réponse** : - [ - "Adobe", - "Apple" - ] \ No newline at end of file +```` +[ + "Adobe", + "Apple" +] +```` + diff --git a/website/translated_docs/fr/REST/$entityset.md b/website/translated_docs/fr/REST/$entityset.md index 5f744434fe6488..46bf131bd809e6 100644 --- a/website/translated_docs/fr/REST/$entityset.md +++ b/website/translated_docs/fr/REST/$entityset.md @@ -3,7 +3,8 @@ id: entityset title: '$entityset' --- -After [creating an entity set]($method.md#methodentityset) by using `$method=entityset`, you can then use it subsequently. +Après avoir [créé un ensemble d'entités]($method.md#methodentityset) à l'aide de `$method=entityset`, vous pouvez ensuite l'utiliser ultérieurement. + ## Syntaxe @@ -13,23 +14,27 @@ After [creating an entity set]($method.md#methodentityset) by using `$method=ent | [**$entityset/{entitySetID}?$operator...&$otherCollection**](#entitysetentitysetidoperatorothercollection) | `/Employee/$entityset/0ANUMBER?$logicOperator=AND &$otherCollection=C0ANUMBER` | Crée un nouvel ensemble d'entités à partir de la comparaison d'ensembles d'entités existants | + + ## $entityset/{entitySetID} Récupère un ensemble d'entités existant (*e.g.*, `People/$entityset/0AF4679A5C394746BFEB68D2162A19FF`) + ### Description -This syntax allows you to execute any operation on a defined entity set. +Cette syntaxe vos permet d'exécuter toute opération sur un ensemble d'entités défini. Étant donné que les ensembles d'entités sont limités par le temps (par défaut ou bien après avoir appelé `$timeout` pour définir la limite souhaitée), vous pouvez appeler `$savedfilter` et `$savedorderby` pour sauvegarder le filtre et trier par instructions lorsque vous créez un ensemble d'entités. -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). +Lorsque vous récupérez un ensemble d'entités existant stocké dans le cache de 4D Server, vous pouvez également appliquer l'un des éléments suivants à l'ensemble d'entités : [`$expand`]($expand.md), [`$filter`]($filter), [`$orderby`]($orderby), [`$skip`]($skip.md), et [`$top/$limit`]($top_$limit.md). ### Exemple Après avoir créé un ensemble d'entités, l'ID de l'ensemble d'entités est retourné avec les données. Vous appelez cet ID de la manière suivante : -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7` + ## $entityset/{entitySetID}?$operator...&$otherCollection @@ -41,9 +46,10 @@ Créez un autre ensemble d'entités basé sur des ensembles d'entités préalabl | $otherCollection | Chaine | ID de l'ensemble d'entités | + ### Description -Après avoir créé un ensemble d'entités (entity set #1) en utilisant `$method=entityset`, vous pouvez ensuite créer un autre ensemble d'entités en utilisant `$entityset/{entitySetID}?$operator... la syntaxe &$otherCollection`, la propriété `$operator` (dont les valeurs sont illustrées ci-dessous) et un autre ensemble d'entités (entity set #2) défini par la propriété `$otherCollection`. Les deux ensembles d'entités doivent être dans la même classe de datastore. +Après avoir créé un ensemble d'entités (ensemble d'entités n°1) à l'aide de `$method=entityset`, vous pouvez ensuite créer un autre ensemble d'entités en utilisant la syntaxe `$entityset/{entitySetID}?$operator... &$otherCollection`, la propriété `$operator` (dont les valeurs sont indiquées ci-dessous), et un autre ensemble d'entités (jeu d'entités n°2) défini par la propriété `$otherCollection`. Les deux ensembles d'entités doivent être dans la même dataclass. Vous pouvez ensuite créer un autre ensemble d'entités contenant les résultats de cet appel en utilisant le `$method=entityset` à la fin de la requête REST. @@ -52,11 +58,9 @@ Voici les opérateurs logiques : | Opérateur | Description | | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AND | Retourne les entités communes aux deux ensembles d'entités | -| OR | Retourne les entités contenues dans les deux ensembles d'entités | +| OU | Retourne les entités contenues dans les deux ensembles d'entités | | EXCEPT | Retourne les entités de l'ensemble d'entités #1 moins celles de l'ensemble d'entités #2 | | INTERSECT | Retourne true ou false s'il existe une intersection des entités dans les deux ensembles d'entités (ce qui signifie qu'au moins une entité est commune aux deux ensembles d'entités) | - - > Les opérateurs logiques ne sont pas sensibles à la casse, vous pouvez donc écrire "AND" ou "and". Vous trouverez ci-dessous une représentation des opérateurs logiques basés sur deux ensembles d'entités. La section rouge correspond à ce qui est retourné. @@ -73,22 +77,22 @@ Vous trouverez ci-dessous une représentation des opérateurs logiques basés su ![](assets/en/REST/except.png) + La syntaxe est la suivante : -`GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` + `GET /rest/dataClass/$entityset/entitySetID?$logicOperator=AND&$otherCollection=entitySetID` ### Exemple - Dans l'exemple ci-dessous, nous retournons les entités qui se trouvent dans les deux ensembles d'entités puisque nous utilisons l'opérateur logique AND : -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=AND&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` Si nous souhaitons savoir si les deux ensembles d'entités se croisent, nous pouvons écrire ce qui suit : -`GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` + `GET /rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7?$logicOperator=intersect&$otherCollection=C05A0D887C664D4DA1B38366DD21629B` S'il existe une intersection, cette requête retourne true. Sinon, elle retourne false. Dans l'exemple suivant, nous créons un nouvel ensemble d'entités qui combine toutes les entités des deux ensembles d'entités : -`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/fr/REST/$expand.md b/website/translated_docs/fr/REST/$expand.md index f86769e7863448..4b62489a269fbd 100644 --- a/website/translated_docs/fr/REST/$expand.md +++ b/website/translated_docs/fr/REST/$expand.md @@ -4,22 +4,22 @@ title: '$expand' --- -Développe une image stockée dans un attribut Image (par exemple, `Employee(1)/photo?$imageformat=best&$expand=photo`) -ou -Développe un attribut BLOB pour l'enregistrer. +Développe une image stockée dans un attribut Image (par exemple, `Employee(1)/photo?$imageformat=best&$expand=photo`)
        ou
        Développe un attribut BLOB pour l'enregistrer. > **Compatibilité** : pour des raisons de compatibilité, $expand peut être utilisé pour développer un attribut relationnel (par exemple, `Company(1)?$expand= staff` ou `EmployeeEmployee/?$filter="firstName BEGIN a"&$expand=employer`). Il est cependant recommandé d'utiliser [`$attributes`]($attributes.md) pour cette fonctionnalité. + + ## Affichage d'un attribut d'image Si vous souhaitez afficher intégralement un attribut d'image, saisissez ce qui suit : -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` Pour plus d'informations sur les formats d'image, reportez-vous à [`$imageformat`]($imageformat.md). Pour plus d'informations sur le paramètre de version, reportez-vous à [`$version`]($version.md). ## Enregistrement d'un attribut BLOB sur le disque -Si vous souhaitez enregistrer un BLOB stocké dans votre classe de datastore, vous pouvez écrire ce qui suit en passant également "true" à $binary : +Si vous souhaitez enregistrer un BLOB stocké dans votre dataclass, vous pouvez écrire ce qui suit en passant également "true" à $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/fr/REST/$filter.md b/website/translated_docs/fr/REST/$filter.md index 1426a42a799da2..2414ef74fd4723 100644 --- a/website/translated_docs/fr/REST/$filter.md +++ b/website/translated_docs/fr/REST/$filter.md @@ -7,6 +7,7 @@ title: '$filter' Permet de rechercher les données d'une dataclass ou d'une méthode (par exemple, `$filter="firstName!='' AND salary>30000"`) + ## Description Ce paramètre vous permet de définir le filtre de votre dataclass ou de votre méthode. @@ -25,7 +26,8 @@ Un filtre plus complexe est composé des éléments suivants, qui joint deux req **{attribut} {comparateur} {valeur} {AND/OR/EXCEPT} {attribut} {comparateur} {valeur}** -Par exemple : `$filter="firstName=john AND salary>20000"` où `firstName` et `salary` sont les attributs de la classe de datastore "Employee". + +Par exemple : `$filter="firstName=john AND salary>20000"` où `firstName` et `salary` sont les attributs de la dataclasse "Employee". ### Utiliser la propriété params @@ -33,65 +35,67 @@ Vous pouvez également utiliser la propriété params de 4D. **{attribut} {comparateur} {placeholder} {AND/OR/EXCEPT} {attribut} {comparateur} {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. +Par exemple : `$filter="firstName=:1 AND salary>:2"&$params='["john",20000]'"` où firstName et salary sont les attributs de la dataclass "Employee". Pour plus d'informations sur la façon de rechercher des données dans 4D, reportez-vous à la documentation de [dataClass.query()](https://doc.4d.com/4Dv18/4D/18/dataClassquery.305-4505887.en.html). - > Lorsque vous insérez des guillemets (') ou des guillemets doubles ("), vous devez les échapper en utilisant leur code de caractère : > -> - Guillemets ('): \u0027 -> - Guillemets doubles ("): \u0022

        -> Par exemple, vous pouvez écrire ce qui suit lors du passage d'une valeur avec un guillemet lors de l'utilisation de la propriété *params* : -> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` -> -> Si vous passez la valeur directement, vous pouvez écrire ce qui suit : `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` -> -> ## Attribut -> -> Si l'attribut se trouve dans la même dataclass, vous pouvez simplement le passer directement (par exemple, `firstName`). Cependant, si vous souhaitez lancer une requête dans une autre dataclass, vous devez inclure le nom de l'attribut relationnel et le nom d'attribut, c'est-à-dire le chemin d'accès (par exemple, employeur.nom). Le nom d'attribut est sensible à la casse (`firstName` n'est pas égal à `FirstName`). -> -> Vous pouvez également rechercher des attributs de type Objet en utilisant la notation par points. Par exemple, si vous avez un attribut dont le nom est "objAttribute" avec la structure suivante : -> -> { -> prop1: "this is my first property", -> prop2: 9181, -> prop3: ["abc","def","ghi"] -> } -> -> -> Vous pouvez rechercher dans l'objet en écrivant ce qui suit : -> -> `GET /rest/Person/?filter="objAttribute.prop2 == 9181"` -> -> ## Comparateur -> -> Le comparateur doit être l'une des valeurs suivantes : -> -> | Comparateur | Description | -> | ----------- | ------------------- | -> | = | est égal à | -> | != | différent de | -> | > | supérieur à | -> | >= | supérieur ou égal à | -> | < | inférieur à | -> | <= | inférieur ou égal à | -> | begin | commence avec | - -> -> ## Exemples -> -> Dans l'exemple suivant, nous recherchons tous les employés dont le nom de famille commence par un "j" : -> -> GET /rest/Employee?$filter="lastName begin j" -> -> -> Dans cet exemple, nous recherchons dans la classe de datastore "Employee" tous les employés d'une entreprise autre que Acmedont et dont le salaire est supérieur à 20 000 : -> -> GET /rest/Employee?$filter="salary>20000 AND -> employer.name!=acme"&$orderby="lastName,firstName" -> -> -> Dans cet exemple, nous recherchons dans la classe de datastore "Person" toutes les personnes dont la propriété numérique, de l'attribut anotherobj de type Objet, est supérieure à 50 : -> -> GET /rest/Person/?filter="anotherobj.mynum > 50" -> \ No newline at end of file +>
      • Guillemets ('): \u0027
      • Guillemets doubles ("): \u0022 +> +> Par exemple, vous pouvez écrire ce qui suit lors du passage d'une valeur avec un guillemet lors de l'utilisation de la propriété *params* : +> `http://127.0.0.1:8081/rest/Person/?$filter="lastName=:1"&$params='["O\u0027Reilly"]'` +> +> Si vous passez la valeur directement, vous pouvez écrire ce qui suit : `http://127.0.0.1:8081/rest/Person/?$filter="lastName=O'Reilly"` + +## Attribut + +Si l'attribut se trouve dans la même dataclass, vous pouvez simplement le passer directement (par exemple, `firstName`). Cependant, si vous souhaitez lancer une requête dans une autre dataclass, vous devez inclure le nom de l'attribut relationnel et le nom d'attribut, c'est-à-dire le chemin d'accès (par exemple, employeur.nom). Le nom d'attribut est sensible à la casse (`firstName` n'est pas égal à `FirstName`). + +Vous pouvez également rechercher des attributs de type Objet en utilisant la notation par points. Par exemple, si vous avez un attribut dont le nom est "objAttribute" avec la structure suivante : + +``` +{ + prop1: "this is my first property", + prop2: 9181, + prop3: ["abc","def","ghi"] +} +``` + +Vous pouvez rechercher dans l'objet en écrivant ce qui suit : + +`GET /rest/Person/?filter="objAttribute.prop2 == 9181"` + +## Comparateur + +Le comparateur doit être l'une des valeurs suivantes : + +| Comparateur | Description | +| ----------- | ------------------- | +| = | est égal à | +| != | différent de | +| > | supérieur à | +| >= | supérieur ou égal à | +| < | inférieur à | +| <= | inférieur ou égal à | +| begin | commence avec | + +## Exemples + +Dans l'exemple suivant, nous recherchons tous les employés dont le nom de famille commence par un "j" : + +``` + GET /rest/Employee?$filter="lastName begin j" +``` + +Dans cet exemple, nous recherchons dans la dataclass "Employee" tous les employés d'une entreprise autre que Acmedont et dont le salaire est supérieur à 20 000 : + +``` + GET /rest/Employee?$filter="salary>20000 AND + employer.name!=acme"&$orderby="lastName,firstName" +``` + +Dans cet exemple, nous recherchons dans la dataclass "Person" toutes les personnes dont la propriété numérique, de l'attribut anotherobj de type Objet, est supérieure à 50 : + +``` + GET /rest/Person/?filter="anotherobj.mynum > 50" +``` diff --git a/website/translated_docs/fr/REST/$imageformat.md b/website/translated_docs/fr/REST/$imageformat.md index 5be1c2cf5a374a..0e8f9f96611a48 100644 --- a/website/translated_docs/fr/REST/$imageformat.md +++ b/website/translated_docs/fr/REST/$imageformat.md @@ -17,7 +17,6 @@ Définissez le format à utiliser pour afficher les images. Par défaut, le meil | TIFF | Format TIFF | | best | Meilleur format basé sur l'image | - Une fois que vous avez défini le format, vous devez passer l'attribut de l'image à [`$expand`]($expand.md) pour charger complètement la photo. S'il n'y a pas d'image à charger ou si le format ne permet pas de charger l'image, la réponse sera vide. @@ -26,4 +25,5 @@ S'il n'y a pas d'image à charger ou si le format ne permet pas de charger l'ima L'exemple suivant définit le format d'image au format JPEG, quel que soit le véritable type de la photo et passe le véritable numéro de version envoyé par le serveur : -`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/fr/REST/$info.md b/website/translated_docs/fr/REST/$info.md index e8b4afc396ced9..4dce9711c763cc 100644 --- a/website/translated_docs/fr/REST/$info.md +++ b/website/translated_docs/fr/REST/$info.md @@ -6,42 +6,37 @@ title: '$info' Renvoie des informations sur les ensembles d'entités stockés couramment dans le cache de 4D Server ainsi que sur les sessions utilisateur ## Description - En appelant cette requête pour votre projet, vous récupérez des informations dans les propriétés suivantes : -| Propriété | Type | Description | -| -------------- | ---------- | ----------------------------------------------------------------------------------- | -| cacheSize | Numérique | 4D Server's cache size. | -| usedCache | Numérique | How much of 4D Server's cache has been used. | -| entitySetCount | Numérique | 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. | - +| Propriété | Type | Description | +| -------------- | ---------- | --------------------------------------------------------------------------------------------------- | +| cacheSize | Nombre | Taille du cache du serveur 4D. | +| usedCache | Nombre | La quantité de cache du serveur 4D utilisée. | +| entitySetCount | Nombre | Nombre de sélections d'entités. | +| entitySet | Collection | Une collection dans laquelle chaque objet contient des informations sur chaque sélection d'entités. | +| ProgressInfo | Collection | Une collection contenant des informations sur les indicateurs de progression. | +| sessionInfo | Collection | Une collection dans laquelle chaque objet contient des informations sur chaque session utilisateur. | ### entitySet +Pour chaque sélection d'entités stocké dans le cache de 4D Server, les informations retournées sont les suivantes : -For each entity selection currently stored in 4D Server's cache, the following information is returned: | Propriété | Type | Description | | ------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | id | Chaine | Un UUID qui référence l'ensemble d'entités. | -| dataClass | Chaine | Nom de la classe du datastore. | -| selectionSize | Nombre | Number of entities in the entity selection. | +| dataClass | Chaine | Nom de la dataclass. | +| selectionSize | Nombre | Nombre d'entités dans la sélection d'entités. | | sorted | Booléen | Retourne vrai si l'ensemble a été trié (à l'aide de `$orderby`) ou faux s'il n'est pas trié. | | refreshed | Date | Date de création de l'ensemble d'entités ou de la dernière utilisation. | | expires | Date | Date d'expiration de l'ensemble d'entités (cette date/heure change chaque fois que l'ensemble d'entités est actualisé). La différence entre actualisé et expire est le timeout d'un ensemble d'entités. Cette valeur correspond soit à deux heures par défaut, soit à la valeur que vous avez définie à l'aide de `$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. -> +Pour plus d'informations sur la création d'une sélection d'entités, reportez-vous à `$method=entityset`. Si vous souhaitez supprimer la sélection d'entités du cache de 4D Server, utilisez `$method=release`. +> 4D crée également ses propres sélections d'entités à des fins d'optimisation, de sorte que ceux que vous créez avec `$method=entityset` ne soient pas les seuls à être retournés. > **IMPORTANT** Si votre projet est en **mode d'accès administrateur contrôlé**, vous devez d'abord vous connecter au projet en tant qu'utilisateur du groupe Admin. ### sessionInfo -For each user session, the following information is returned in the *sessionInfo* collection: +Pour chaque session utilisateur, les informations suivantes sont retournées dans la collection *sessionInfo* : | Propriété | Type | Description | | ---------- | ------ | ----------------------------------------------------------------- | @@ -50,7 +45,6 @@ For each user session, the following information is returned in the *sessionInfo | lifeTime | Nombre | La durée d'une session utilisateur en secondes (3600 par défaut). | | expiration | Date | Date et heure d'expiration courante de la session utilisateur. | - ## Exemple Retourne des informations sur les ensembles d'entités stockés couramment dans le cache de 4D Server ainsi que sur les sessions utilisateur: @@ -59,65 +53,65 @@ Retourne des informations sur les ensembles d'entités stockés couramment dans **Résultat** : +``` +{ +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" +} +] +} +``` +> Les informations de l'indicateur de progression répertoriées après les sélections d'entités sont utilisées en interne par 4D. \ No newline at end of file diff --git a/website/translated_docs/fr/REST/$method.md b/website/translated_docs/fr/REST/$method.md index 77dcd88353a4a1..9dff77886127d4 100644 --- a/website/translated_docs/fr/REST/$method.md +++ b/website/translated_docs/fr/REST/$method.md @@ -16,10 +16,14 @@ Ce paramètre vous permet de définir l'opération à exécuter avec l'entité o | [**$method=update**](#methodupdate) | `POST /Person/?$method=update` | Met à jour et/ou crée une ou plusieurs entités | + + + ## $method=delete Supprime l'entité, collection d'entités ou sélection d'entité courante (créée via REST) + ### Description Avec `$method=delete`, vous pouvez supprimer une entité ou une collection d'entités entière. Vous pouvez définir la collection d'entités en utilisant, par exemple, [`$filter`]($filter.md) ou en en spécifiant une directement à l'aide de [`{dataClass}({key})`](%7BdataClass%7D.html#dataclasskey) (par exemple, /Employee(22)). @@ -27,25 +31,27 @@ Avec `$method=delete`, vous pouvez supprimer une entité ou une collection d'ent Vous pouvez également supprimer les entités d'un ensemble d'entités en appelant [`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid). ## Exemple - Vous pouvez ensuite saisir la requête REST suivante pour supprimer l'entité dont la clé porte le numéro 22 : -`POST /rest/Employee(22)/?$method=delete` + `POST /rest/Employee(22)/?$method=delete` Vous pouvez également faire une requête en utilisant $ filter : -`POST /rest/Employee?$filter="ID=11"&$method=delete` + `POST /rest/Employee?$filter="ID=11"&$method=delete` Vous pouvez également supprimer un ensemble d'entités utilisant $entityset/{entitySetID} : -`POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` + `POST /rest/Employee/$entityset/73F46BE3A0734EAA9A33CA8B14433570?$method=delete` Réponse : - { - "ok": true - } - +``` +{ + "ok": true +} +``` + + ## $method=entityset @@ -61,20 +67,22 @@ Si vous avez utilisé `$savedfilter` et/ou `$savedorderby` (avec `$filter` et/ou Pour créer un ensemble d'entités, qui sera enregistré dans le cache de 4D Server pendant deux heures, ajoutez `$method=entityset` à la fin de votre requête REST : -`GET /rest/People/?$filter="ID>320"&$method=entityset` + `GET /rest/People/?$filter="ID>320"&$method=entityset` Vous pouvez créer un ensemble d'entités qui sera stocké dans le cache de 4D Server pendant seulement dix minutes en passant un nouveau timeout à `$timeout` : -`GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` + `GET /rest/People/?$filter="ID>320"&$method=entityset&$timeout=600` Vous pouvez également enregistrer le filtre et trier, en passant true à `$savedfilter` et `$savedorderby`. - > `$skip` et `$top/$limit` ne sont pas pris en compte lors de l'enregistrement d'un ensemble d'entités. Après avoir créé un ensemble d'entités, le premier élément, `__ENTITYSET` est ajouté à l'objet retourné et indique l'URI à utiliser pour accéder à l'ensemble d'entités : `__ENTITYSET: "http://127.0.0.1:8081/rest/Employee/$entityset/9718A30BF61343C796345F3BE5B01CE7"` + + + ## $method=release Affiche un ensemble d'entités existant stocké dans le cache de 4D Server. @@ -93,26 +101,29 @@ Affiche un ensemble d'entités existant : Si la requête a abouti, la réponse suivante est retournée : - { - "ok": true - } - Si l'entite n'as pas été trouvée, une erreur est retournée : - - { - "__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 +} +Si l'entite n'as pas été trouvée, une erreur est retournée : + +{ + "__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 Crée un ensemble d'entités dans le cache de 4D Server basé sur la collection d'entités relatives définies dans la requête REST + ### Description `$method=subentityset` vous permet de trier les données retournées par l'attribut relationnel défini dans la requête REST. @@ -129,54 +140,57 @@ Si vous souhaitez récupérer uniquement les entités relatives pour une entité #### Réponse : - { - - "__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 + Met à jour et/ou crée une ou plusieurs entités ### Description -`$method=update` vous permet de mettre à jour et/ou de créer une ou plusieurs entités dans un seul **POST**. Si vous mettez à jour et/ou créez une entité, cela s'effectue dans un objet avec, pour chaque propriété, un attribut et sa valeur, par exemple `{lastName: "Smith"}`. If you update and/or create multiple entities, you must create a collection of objects. +`$method=update` vous permet de mettre à jour et/ou de créer une ou plusieurs entités dans un seul **POST**. Si vous mettez à jour et/ou créez une entité, cela s'effectue dans un objet avec, pour chaque propriété, un attribut et sa valeur, par exemple `{lastName: "Smith"}`. Si vous mettez à jour et/ou créez plusieurs entités, vous devez créer une collection d'objets. In any cases, you must set the **POST** data in the **body** of the request. @@ -187,7 +201,6 @@ Triggers are executed immediately when saving the entity to the server. La répo Vous pouvez également placer ces requêtes pour créer ou mettre à jour des entités dans une transaction en appelant `$atomic/$atonce`. Si des erreurs se produisent lors de la validation des données, aucune des entités n'est sauvegardée. Vous pouvez également utiliser $method=validate pour valider les entités avant de les créer ou de les mettre à jour. Si un problème survient lors de l'ajout ou de la modification d'une entité, une erreur vous sera retournée avec ces informations. - > A noter pour les types d'attributs spécifiques : > > * **Les dates** doivent être exprimées au format JS : YYYY-MM-DDTHH:MM:SSZ (par exemple, "2010-10-05T23:00:00Z"). Si vous avez sélectionné la propriété Date uniquement pour votre attribut Date, le fuseau horaire et l'heure (heure, minutes et secondes) seront supprimés. Dans ce cas, vous pouvez également envoyer la date au format qui vous est retourné dd!mm!yyyy (par exemple, 05!10!2013). @@ -198,114 +211,121 @@ Si un problème survient lors de l'ajout ou de la modification d'une entité, un Pour mettre à jour une entité spécifique, utilisez l'URL suivante : -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **Données POST :** - { - __KEY: "340", - __STAMP: 2, - firstName: "Pete", - lastName: "Miller" - } - +``` +{ + __KEY: "340", + __STAMP: 2, + firstName: "Pete", + lastName: "Miller" +} +``` Les attributs firstName et lastName de l'entité indiquée ci-dessus seront modifiés en laissant inchangés tous les autres attributs (sauf ceux calculés sur la base de ces attributs). Si vous souhaitez créer une entité, vous pouvez envoyer, via POST, les attributs à l'aide de cette URL : -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **Données POST :** - { - firstName: "John", - lastName: "Smith" - } - +``` +{ + firstName: "John", + lastName: "Smith" +} +``` Vous pouvez également créer et mettre à jour plusieurs entités en même temps en utilisant la même URL ci-dessus en passant plusieurs objets d'un tableau au POST : -`POST /rest/Person/?$method=update` + `POST /rest/Person/?$method=update` **Données POST :** - [{ - "__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" +}] +``` **Réponse :** Lorsque vous ajoutez ou modifiez une entité, elle vous est retournée avec les attributs qui ont été modifiés. Par exemple, si vous créez le nouvel employé ci-dessus, les informations suivantes seront renvoyées : - { - "__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" +} +``` Si, par exemple, le tampon n'est pas correct, l'erreur suivante est retournée : - { - "__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/fr/REST/$orderby.md b/website/translated_docs/fr/REST/$orderby.md index 7ea7e812e92670..d5f864c4a7a864 100644 --- a/website/translated_docs/fr/REST/$orderby.md +++ b/website/translated_docs/fr/REST/$orderby.md @@ -10,38 +10,42 @@ Trie les données retournées par l'attribut et l'ordre de tri définis (par exe `$orderby` ordonne les entités retournées par la requête REST. Pour chaque attribut, définissez l'ordre sur `ASC` (ou `asc`) pour l'ordre croissant et sur `DESC` (`desc`) pour l'ordre décroissant. Par défaut, les données sont triées par ordre croissant. Si vous souhaitez spécifier plusieurs attributs, vous pouvez les délimiter avec une virgule, par exemple, `$orderby="lastName desc, firstName asc"`. + ## Exemple Dans cet exemple, nous récupérons les entités et les trions en même temps : -`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"` L'exemple ci-dessous trie l'entité définie par l'attribut lastName dans l'ordre croissant : -`GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` + `GET /rest/Employee/$entityset/CB1BCC603DB0416D939B4ED379277F02?$orderby="lastName"` **Résultat** : - { - __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 - }, - // plus d'entités - ] - } \ 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 + }, +// plus d'entités + ] +} +``` + diff --git a/website/translated_docs/fr/REST/$querypath.md b/website/translated_docs/fr/REST/$querypath.md index 473215600ecef4..e637a6fc3aed28 100644 --- a/website/translated_docs/fr/REST/$querypath.md +++ b/website/translated_docs/fr/REST/$querypath.md @@ -16,16 +16,15 @@ Dans la collection d'étapes, il existe un objet avec les propriétés suivantes | Propriété | Type | Description | | ------------- | ---------- | --------------------------------------------------------------------------------- | | description | Chaine | Requête exécutée ou "AND" lorsqu'il existe plusieurs étapes | -| time | Numérique | Nombre de millisecondes nécessaires pour exécuter la requête | -| recordsfounds | Numérique | Nombre d'enregistrements trouvés | +| time | Nombre | Nombre de millisecondes nécessaires pour exécuter la requête | +| recordsfounds | Nombre | Nombre d'enregistrements trouvés | | steps | Collection | Une collection avec un objet définissant l'étape suivante du chemin de la requête | - ## Exemple Si vous exécutez la requête suivante : -`GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` + `GET /rest/Employee/$filter="employer.name=acme AND lastName=Jones"&$querypath=true` Et si aucune entité n'a été trouvée, le chemin de la requête suivant sera retourné si vous saisissez ce qui suit : @@ -33,76 +32,79 @@ Et si aucune entité n'a été trouvée, le chemin de la requête suivant sera r **Réponse** : - __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 + } + ] + } + ] + } + ] + } + ] + +} +``` En revanche, si la première requête retourne plus d'une entité, la seconde sera exécutée. Si nous exécutons la requête suivante : -`GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` + `GET /rest/Employee/$filter="employer.name=a* AND lastName!=smith"&$querypath=true` Si au moins une entité a été trouvée, le chemin de la requête suivant sera retourné si vous saisissez ce qui suit : -`GET /rest/$querypath` + `GET /rest/$querypath` **Réponse** : - "__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/fr/REST/$queryplan.md b/website/translated_docs/fr/REST/$queryplan.md index 6cfbf7aa428ef9..91d132777cd12f 100644 --- a/website/translated_docs/fr/REST/$queryplan.md +++ b/website/translated_docs/fr/REST/$queryplan.md @@ -4,10 +4,9 @@ title: '$queryplan' --- -Retourne la requête telle qu'elle a été passée par 4D Server (par exemple, `$queryplan=true`) +Retourne la requête telle qu'elle a été passée au 4D Server (par exemple, `$queryplan=true`) ## Description - $queryplan retourne le plan de la requête telle qu'il a été exécuté par 4D Server. | Propriété | Type | Description | @@ -15,29 +14,29 @@ $queryplan retourne le plan de la requête telle qu'il a été exécuté par 4D | item | Chaine | Requête exécutée | | subquery | Tableau | S'il existe une sous-requête, un objet supplémentaire contenant une propriété d'élément (comme celle indiquée ci-dessus) | - Pour plus d'informations sur les plans de requête, reportez-vous à [queryPlan ete queryPath](genInfo.md#querypath-and-queryplan). ## Exemple - Si vous passez la requête suivante : -`GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` + `GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true` #### Réponse : - __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/fr/REST/$savedfilter.md b/website/translated_docs/fr/REST/$savedfilter.md index 176aa2787979e0..afc8c5e9d2e207 100644 --- a/website/translated_docs/fr/REST/$savedfilter.md +++ b/website/translated_docs/fr/REST/$savedfilter.md @@ -13,7 +13,11 @@ Utilisez `$savedfilter` pour enregistrer le filtre que vous avez défini lors de Si l'ensemble d'entités n'est plus dans le cache de 4D Server, il sera recréé avec un nouveau timeout de 10 minutes. L'ensemble d'entités sera actualisé (certaines entités peuvent être incluses tandis que d'autres peuvent être supprimées) depuis la dernière fois qu'il a été créé, s'il n'existait plus avant de le recréer. -Si vous avez utilisé à la fois `$savedfilter` et [`$savedorderby`]($savedorderby.md) dans votre appel lors de la création d'un ensemble d'entités et que vous en omettez un, le nouvel ensemble d'entités, qui aura le même numéro de référence, le reflétera.

        +Si vous avez utilisé à la fois `$savedfilter` et + +[`$savedorderby`]($savedorderby.md) dans votre appel lors de la création d'un ensemble d'entités et que vous en omettez un, le nouvel ensemble d'entités, qui aura le même numéro de référence, le reflétera.

        + + ## Exemple @@ -23,4 +27,4 @@ Dans notre exemple, nous appelons d'abord ``$savedfilter` avec l'appel initial p Puis, lorsque vous accédez à votre ensemble d'entités, saisissez ce qui suit pour vous assurer que l'ensemble d'entités est toujours valide : -`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/fr/REST/$savedorderby.md b/website/translated_docs/fr/REST/$savedorderby.md index bb9c38b4093f60..17c85f54ad11c9 100644 --- a/website/translated_docs/fr/REST/$savedorderby.md +++ b/website/translated_docs/fr/REST/$savedorderby.md @@ -14,11 +14,10 @@ Utilisez `$savedorderby` pour enregistrer l'ordre que vous avez défini lors de Si l'ensemble d'entités n'est plus dans le cache de 4D Server, il sera recréé avec un nouveau timeout de 10 minutes. Si vous avez utilisé à la fois [`$savedfilter`]($savedfilter.md) et `$savedorderby` dans votre appel lors de la création d'un ensemble d'entités et que vous en omettez un, le nouvel ensemble d'entités, qui aura le même numéro de référence, le reflétera. ## Exemple - Appelez d'abord `$savedorderby`, dans l'appel initial, pour créer un ensemble d'entités : -`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` Ensuite, lorsque vous accédez à votre ensemble d'entités, écrivez ce qui suit (en utilisant à la fois $savedfilter et $savedorderby) pour vous assurer que le filtre et son ordre de tri existent toujours : -`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/fr/REST/$skip.md b/website/translated_docs/fr/REST/$skip.md index fff6c67e14c84b..8a235e6e4551bf 100644 --- a/website/translated_docs/fr/REST/$skip.md +++ b/website/translated_docs/fr/REST/$skip.md @@ -5,11 +5,16 @@ title: '$skip' Démarre l'entité définie par ce numéro dans la collection (par exemple, `$skip=10`) + ## Description `$skip` définit l'entité de la collection par laquelle commencer. Par défaut, la collection envoyée commence par la première entité. Pour commencer avec la 10e entité de la collection, passez 10. -`$skip` est généralement utilisé avec [`$top/$limit`]($top_$limit.md) pour naviguer dans une entity collection.

        +`$skip` est généralement utilisé avec + + [`$top/$limit`]($top_$limit.md) pour naviguer dans une entity collection.

        + + ## Exemple diff --git a/website/translated_docs/fr/REST/$timeout.md b/website/translated_docs/fr/REST/$timeout.md index 8793fbdcf0d88e..1ac3a4e7a4aa87 100644 --- a/website/translated_docs/fr/REST/$timeout.md +++ b/website/translated_docs/fr/REST/$timeout.md @@ -8,12 +8,16 @@ Définit le nombre de secondes pour enregistrer un ensemble d'entités dans le c ## Description -Pour définir un timeout à un ensemble d'entités que vous créez à l'aide de [`$method=entityset`]($method.md#methodentityset), passez le nombre de secondes à `$timeout`. Par exemple, si vous souhaitez définir le timeout sur 20 minutes, passez 1200. Par défaut, le timeout est de deux (2) heures.

        +Pour définir un timeout à un ensemble d'entités que vous créez à l'aide de + +[`$method=entityset`]($method.md#methodentityset), passez le nombre de secondes à `$timeout`. Par exemple, si vous souhaitez définir le timeout sur 20 minutes, passez 1200. Par défaut, le timeout est de deux (2) heures.

        Une fois le timeout défini, chaque fois qu'un ensemble d'entités est appelé (via `$method=entityset`), le timeout est recalculé en fonction de l'heure courante et du timeout. Si un ensemble d'entités est supprimé puis recréé à l'aide de `$method=entityset` avec [`$savedfilter`]($savedfilter.md), le nouveau timeout par défaut est de 10 minutes, quel que soit le timeout que vous avez défini lors de l'appel de `$timeout`.

        + + ## Exemple Dans l'ensemble d'entités que nous créons, nous définissons le timeout sur 20 minutes : diff --git a/website/translated_docs/fr/REST/$top_$limit.md b/website/translated_docs/fr/REST/$top_$limit.md index 0eef7fecba8d4d..98d5010c85d680 100644 --- a/website/translated_docs/fr/REST/$top_$limit.md +++ b/website/translated_docs/fr/REST/$top_$limit.md @@ -9,7 +9,7 @@ Limite le nombre d'entités à retourner (par exemple, `$top=50`) `$top/$limit` définit la limite des entités à retourner. Par défaut, leur nombre est limité à 100. Vous pouvez utiliser l'un des mots clés suivant : `$top` ou `$limit`. -When used in conjunction with [`$skip`]($skip.md), you can navigate through the entity selection returned by the REST request. +Lorsqu'il est utilisé avec [`$skip`]($skip.md), vous pouvez parcourir la sélection d'entités retournée par la requête REST. ## Exemple diff --git a/website/translated_docs/fr/REST/$upload.md b/website/translated_docs/fr/REST/$upload.md index e1848cfce92cce..d76531450d3b29 100644 --- a/website/translated_docs/fr/REST/$upload.md +++ b/website/translated_docs/fr/REST/$upload.md @@ -10,49 +10,98 @@ Retourne un ID du fichier téléchargé sur le serveur Publiez cette requête lorsque vous vous souhaitez télécharger un fichier sur le serveur. S'il s'agit d'une image, passez `$rawPict=true`. Pour tous les autres fichiers, passez `$binary=true`. -Vous pouvez modifier le timeout, qui est par défaut de 120 secondes, en passant une valeur au paramètre `$timeout`. +You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout` parameter. -## Exemple de téléchargement d'image +## Uploading scenario -Pour télécharger une image, vous devez d'abord sélectionner l'objet fichier sur le client à l'aide de l'API intégré HTML 5 pour utiliser le fichier à partir d'une application Web. 4D utilise l'attribut de type MIME de l'objet fichier afin de le gérer correctement. +Imagine you want to upload an image to update the picture attribute of an entity. -Téléchargez ensuite l'image sélectionnée sur 4D Server : +To upload an image (or any binary file), you must first select the file from the client application. The file itlself must be passed in the **body** of the request. -`POST /rest/$upload?$rawPict=true` +Then, you upload the selected image to 4D Server using a request such as: -**Résultat** : + `POST /rest/$upload?$rawPict=true` + +As a result, the server returns an ID that identifies the file: + +**Réponse** : `{ "ID": "D507BC03E613487E9B4C2F6A0512FE50" }` -Utilisez ensuite cet ID pour l'ajouter à un attribut en utilisant [`$method=update`]($method.md#methodupdate) pour ajouter l'image à une entité :

        +Afterwards, you use this ID to add it to an attribute using [`$method=update`]($method.md#methodupdate) to add the image to an entity. The request looks like: -`POST /rest/Employee/?$method=update` + `POST /rest/Employee/?$method=update` -**Data POST** : +**Données POST** : - { - __KEY: "12", - __STAMP: 4, - photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } - } - +``` +{ + __KEY: "12", + __STAMP: 4, + photo: { "ID": "D507BC03E613487E9B4C2F6A0512FE50" } +} +``` **Réponse** : L'entité modifiée est retournée : +``` +{ + "__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 + } + },} +``` + +## Example with a 4D HTTP client + +The following example shows how to upload a *.pdf* file to the server using the 4D HTTP client. + +```4d +var $params : Text +var $response : Object +var $result : Integer +var $blob : Blob + + +ARRAY TEXT($headerNames; 1) +ARRAY TEXT($headerValues; 1) + +$url:="localhost:80/rest/$upload?$binary=true" //prepare the REST request + +$headerNames{1}:="Content-Type" +$headerValues{1}:="application/octet-stream" + +DOCUMENT TO BLOB("c:\\invoices\\inv003.pdf"; $blob) //Load the binary + + //Execute the first POST request to upload the file +$result:=HTTP Request(HTTP POST method; $url; $blob; $response; $headerNames; $headerValues) + +If ($result=200) + var $data : Object + $data:=New object + $data.__KEY:="3" + $data.__STAMP:="3" + $data.pdf:=New object("ID"; String($response.ID)) + + $url:="localhost:80/rest/Invoices?$method=update" //second request to update the entity + + $headerNames{1}:="Content-Type" + $headerValues{1}:="application/json" + + $result:=HTTP Request(HTTP POST method; $url; $data; $response; $headerNames; $headerValues) +Else + ALERT(String($result)+" Error") +End if +``` diff --git a/website/translated_docs/fr/REST/$version.md b/website/translated_docs/fr/REST/$version.md index 4dceaec745ce62..61a60b83549fdd 100644 --- a/website/translated_docs/fr/REST/$version.md +++ b/website/translated_docs/fr/REST/$version.md @@ -15,4 +15,4 @@ La valeur du paramètre de version de l'image est modifiée par le serveur. L'exemple suivant définit le format d'image au format JPEG, quel que soit le véritable type de la photo et passe le véritable numéro de version envoyé par le serveur : -`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/fr/REST/ClassFunctions.md b/website/translated_docs/fr/REST/ClassFunctions.md new file mode 100644 index 00000000000000..ec9f4b2726b2eb --- /dev/null +++ b/website/translated_docs/fr/REST/ClassFunctions.md @@ -0,0 +1,579 @@ +--- +id: classFunctions +title: Appeler des fonctions de classe ORDA +--- + + +Vous pouvez appeler les [fonctions de classe de modèles de données](ORDA/ordaClasses.md) définies pour le modèle de données ORDA via vos requêtes REST, afin de bénéficier de l'API de l'application 4D ciblée. + +Les fonctions sont simplement appelées dans les requêtes POST sur l'interface ORDA appropriée, sans (). Par exemple, si vous avez défini une fonction `getCity()` dans la dataclass City, vous pouvez l'appeler à l'aide de la requête suivante : + +`/rest/City/getCity` + +avec des données contenues dans le corps de la requête POST : `["Paris"]` + +Dans le langage 4D, cet appel équivaut à : + +```4d +$city:=ds.City.getCity("Aguada") +``` + +> Seules les fonctions contenant le mot-clé `exposed` peuvent être directement appelées à partir de requêtes REST. See [Exposed vs non-exposed functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) section. + +## Appeler des fonctions + +Les fonctions doivent toujours être appelées à l'aide des requêtes **POST** (une requête GET recevra une erreur). + +Les fonctions sont appelées sur l'objet correspondant au datastore du serveur. + +| Fonction de classe | Syntaxe | +| ------------------------------------------------------------------ | --------------------------------------------------------------------------- | +| [datastore class](ORDA/ordaClasses.md#datastore-class) | `/rest/$catalog/DataStoreClassFunction` | +| [dataclass class](ORDA/ordaClasses.md#dataclass-class) | `/rest/{dataClass}/DataClassClassFunction` | +| [entitySelection class](ORDA/ordaClasses.md#entityselection-class) | `/rest/{dataClass}/EntitySelectionClassFunction` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$entityset/entitySetNumber` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$filter` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$orderby` | +| [entity class](ORDA/ordaClasses.md#entity-class) | `/rest/{dataClass}(key)/EntityClassFunction/` | + + + +> `/rest/{dataClass}/Function` peut être utilisé pour appeler une fonction de dataclass ou de sélection d'entité (`/rest/{dataClass}` retourne toutes les entités de la DataClass en tant que sélection d'entité). +> La fonction est d'abord recherchée dans la classe de sélection d'entité. Si elle n'est pas trouvée, elle est recherchée dans la dataclass. En d'autres termes, si une fonction portant le même nom est définie à la fois dans la classe DataClass et la classe EntitySelection, la fonction de classe de dataclass ne sera jamais exécutée. + + +## Paramètres + + + +Vous pouvez envoyer des paramètres aux fonctions définies dans les classes utilisateurs ORDA. Côté serveur, ils seront reçus dans les fonctions de classe dans les paramètres normaux $1, $2, etc. + +Les règles suivantes s'appliquent : + +- Les paramètres doivent être passés dans le **corps de la requête POST** +- Les paramètres doivent être inclus dans une collection (format JSON) +- Tous les types de données scalaires pris en charge dans les collections JSON peuvent être passés en tant que paramètres. +- La sélection d'entité et l'entité peuvent être passées en tant que paramètres. L'objet JSON doit contenir des attributs spécifiques utilisés par le serveur REST pour affecter des données aux objets ORDA correspondants : __DATACLASS, __ENTITY, __ENTITIES, __DATASET. + +Voir [cet exemple](#request-receiving-an-entity-as-parameter) et [cet exemple](#request-receiving-an-entity-selection-as-parameter). + + +### Paramètre de valeur scalaire + +Le(s) paramètre(s) doivent simplement être incluse dans une collection définie dans le corps. Par exemple, avec une fonction de dataclass `getCities()` qui reçoit des paramètres de type texte : `/rest/City/getCities` + +**Parmaètres dans le corps :** ["Aguada","Paris"] + +Tous les types de données JSON sont pris en charge dans les paramètres, y compris les pointeurs JSON. Les dates peuvent être passées sous forme de chaînes au format de date ISO 8601 (par exemple, "2020-08-22T22:00:000Z"). + + +### Paramètre d'entité + +Les entités passées en paramètres sont référencées sur le serveur via leur clé (c'est-à-dire la propriété __KEY). Si le paramètre clé est omis dans une requête, une nouvelle entité est chargée en mémoire du serveur. Vous pouvez également transmettre des valeurs pour tous les attributs de l'entité. Ces valeurs seront automatiquement utilisées pour l'entité traitée sur le serveur. + +> Si la requête envoie des valeurs d'attribut modifiées pour une entité existante sur le serveur, la fonction de modèle de données ORDA appelée sera automatiquement exécutée sur le serveur avec des valeurs modifiées. Cette fonctionnalité vous permet, par exemple, de vérifier le résultat d'une opération sur une entité, après avoir appliqué toutes les règles métier, depuis l'application cliente. Vous pouvez alors décider de sauvegarder ou non l'entité sur le serveur. + + +| Propriétés | Type | Description | +| --------------------- | ------------------------------------------------- | --------------------------------------------------------------------------- | +| Attributs de l'entité | mixte | Optionnelle - Valeurs à modifier | +| __DATACLASS | Chaine | Obligatoire - Indique la Dataclass de l'entité | +| __ENTITY | Booléen | Obligatoire - Vrai pour indiquer au serveur que le paramètre est une entité | +| __KEY | mixte (type identique à celui de la clé primaire) | Optionnel - clé primaire de l'entité | + +- Si __KEY n'est pas fourni, une nouvelle entité est créée sur le serveur avec les attributs donnés. +- Si __KEY est fourni, l'entité correspondant à _KEY est chargée sur le serveur avec les attributs donnés + +Voir les exemple de [création](#creating-an-entity) ou de [mise à jour](#updating-an-entity) des entités. + +#### Paramètre d'entité associé + +Mêmes propriétés que pour un [paramètre d'entité](#entity-parameter). De plus, l'entité associée doit exister et est référencée par __KEY, qui contient sa clé primaire. + +Reportez-vous aux exemples de [création](#creating-an-entity-with-a-related-entity) ou de [mise à jour](#updating-an-entity-with-a-related-entity) des entités avec des entités associées. + + +### Paramètre de sélection d'entité + +La sélection d'entité doit avoir été définie au préalable à l'aide de [$method=entityset]($method.md#methodentityset). + +> Si la requête envoie une sélection d'entité modifiée au serveur, la fonction de modèle de données ORDA appelée sera automatiquement exécutée sur le serveur avec la sélection d'entité modifiée. + + +| Propriétés | Type | Description | +| --------------------- | ------- | --------------------------------------------------------------------------------------- | +| Attributs de l'entité | mixte | Optionnelle - Valeurs à modifier | +| __DATASET | Chaine | Obligatoire - entitySetID (UUID) de la sélection d'entité | +| __ENTITIES | Booléen | Obligatoire - Vrai pour indiquer au serveur que le paramètre est une sélection d'entité | + +Reportez-vous aux exemples de [réception d'une sélection d'entité](#receiving-an-entity-selection-as-parameter). + + +## Exemples de requêtes + +Cette base de données est exposée comme un datastore distant sur localhost (port 8111) : + +![alt-text](assets/en/REST/ordastructure.png) + +### Utiliser une fonction de classe de datastore + +La classe de `DataStore` US_Cities fournit une API : + +``` +// DataStore class + +Class extends DataStoreImplementation + +exposed Function getName() + $0:="US cities and zip codes manager" +``` + +Vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8111/rest/$catalog/getName` + +#### Résultat + +``` +{ +"result": "US cities and zip codes manager" +} +``` + +### Utiliser une fonction de classe de dataclass + +La classe de Dataclass `City` fournit une API qui retourne une entité de ville à partir du nom passé en paramètre : + +``` +// City class + +Class extends DataClass + +exposed Function getCity() + var $0 : cs.CityEntity + var $1,$nameParam : text + $nameParam:=$1 + $0:=This.query("name = :1";$nameParam).first() +``` + +Vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8111/rest/City/getCity` + +Requête : ["Paris"] + +#### Résultat + +Le résultat est une entité : +``` +{ + "__entityModel": "City", + "__DATACLASS": "City", + "__KEY": "1", + "__TIMESTAMP": "2020-03-09T08:03:19.923Z", + "__STAMP": 1, + "ID": 1, + "name": "Paris", + "countyFIPS": 72003, + "county": { + "__deferred": { + "uri": "/rest/County(72003)", + "__KEY": "72003" + } + }, + "zips": { + "__deferred": { + "uri": "/rest/City(1)/zips?$expand=zips" + } + } +} +``` + +### Utiliser une fonction de classe d'une entité + +La classe d'entité `CityEntity` fournit une API : + +``` +// CityEntity class + +Class extends Entity + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +Vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8111/rest/City(2)/getPopulation` + +#### Résultat + +``` +{ + "result": 48814 +} +``` + + +### Utiliser une fonction de classe d'une sélection d'entité + +La classe de sélection d'entité `CityEntity` fournit une API : + +``` +// CitySelection class + +Class extends EntitySelection + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +Vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8111/rest/City/getPopulation/?$filter="ID<3"` + +#### Résultat + +``` +{ + "result": 87256 +} +``` + +### Utiliser une fonction de classe de sélection d'entité et un ensemble d'entité + +La classe `StudentsSelection` a une fonction `getAgeAverage` : + +``` +// StudentsSelection Class + +Class extends EntitySelection + +exposed Function getAgeAverage + C_LONGINT($sum;$0) + C_OBJECT($s) + + $sum:=0 + For each ($s;This) + $sum:=$sum+$s.age() + End for each + $0:=$sum/This.length +``` + +Une fois que vous avez créé un ensemble d'entité, vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8044/rest/Students/getAgeAverage/$entityset/17E83633FFB54ECDBF947E5C620BB532` + +#### Résultat + +``` +{ + "result": 34 +} +``` + +### Utiliser une fonction de classe de sélection d'entité et un "orderBy" + +La classe `StudentsSelection` a une fonction `getLastSummary` : + +``` +// StudentsSelection Class + + +Class extends EntitySelection + +exposed Function getLastSummary + C_TEXT($0) + C_OBJECT($last) + + $last:=This.last() + $0:=$last.firstname+" - "+$last.lastname+" is ... "+String($last.age()) +``` + +Vous pouvez lancer cette requête : + +**POST** `127.0.0.1:8044/rest/Students/getLastSummary/$entityset/?$filter="lastname=b@"&$orderby="lastname"` + + +#### Résultat + +``` +{ + "result": "Wilbert - Bull is ... 21" +} +``` + + +### Utiliser une entité à créer sur le serveur + + +La classe de Dataclass `Students` possède la fonction `pushData()` qui reçoit une entité contenant les données du client. La méthode `checkData()` effectue quelques contrôles. Si elles sont valides, l'entité est sauvegardée et retournée. + +``` +// Students Class + +Class extends DataClass + +exposed Function pushData + var $1, $entity, $status, $0 : Object + + $entity:=$1 + + $status:=checkData($entity) // $status est un objet avec une propriété booléenne "success" + + $0:=$status + + If ($status.success) + $status:=$entity.save() + If ($status.success) + $0:=$entity + End if + End if + +``` + +Lancez cette requête : + +**POST** `http://127.0.0.1:8044/rest/Students/pushData` + +Corps de la requête : + +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"Ann", +"lastname":"Brown" +}] +``` + +Si aucune `__KEY` n'est donnée, une nouvelle entité Students est chargée sur le serveur **avec les attributs du client**. Parce que la fonction `pushData()` exécute une action `save()`, la nouvelle entité est créée. + + +#### Résultat + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T10:54:41.805Z", + "__STAMP": 1, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWN", + "schoolID": null, + "school": null +} +``` + +### Utiliser une entité à mettre à jour sur le serveur + +Description semblable à la précédente, avec l'attribut _KEY + +Lancez cette requête : + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Corps de la requête : +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"lastname":"Brownie", +"__KEY":55 +}] +``` + +Si aucune `__KEY` n'est donnée, l'entité Students est chargée avec la clé primaire 55 **avec la valeur lastname reçue par le client**. Parce que la fonction exécute une action `save()`, la nouvelle entité est mise à jour. + +#### Résultat + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T11:10:21.679Z", + "__STAMP": 3, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWNIE", + "schoolID": null, + "school": null +} +``` + +### Créer une entité avec une entité liée + +Dans cet exemple, nous créons une nouvelle entité Students avec l'entité Schools ayant la clé primaire 2. + +Lancez cette requête : + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Corps de la requête : +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"John", +"lastname":"Smith", +"school":{"__KEY":2} +}] +``` + +#### Résultat + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "56", + "__TIMESTAMP": "2020-06-16T11:16:47.601Z", + "__STAMP": 1, + "ID": 56, + "firstname": "John", + "lastname": "SMITH", + "schoolID": 2, + "school": { + "__deferred": { + "uri": "/rest/Schools(2)", + "__KEY": "2" + } + } +} +``` + + +### Mettre à jour une entité avec une entité liée + +Dans cet exemple, nous associons une école existante à l'entité Students. La classe `StudentsEntity` possède une API : + +``` +// StudentsEntity class + +Class extends Entity + +exposed Function putToSchool() + var $1, $school , $0, $status : Object + + //$1 is a Schools entity + $school:=$1 + //Associe l'entité reliée "school" à l'entité courante "Students" + This.school:=$school + + $status:=This.save() + + $0:=$status +``` + +You run this request, called on a Students entity : **POST** `http://127.0.0.1:8044/rest/Students(1)/putToSchool` Body of the request: +``` +[{ +"__DATACLASS":"Schools", +"__ENTITY":true, +"__KEY":2 +}] +``` + +#### Résultat + +``` +{ + "result": { + "success": true + } +} +``` + + +### Recevoir une sélection d'entité comme paramètre + +Dans la classe de Dataclass `Students`, la fonction `setFinalExam()` met à jour une sélection d'entité reçue ($1). Elle met à jour l'attribut *finalExam* avec la valeur reçue ($2). Elle retourne les clés primaires des entités mises à jour. + +``` +// Students class + +Class extends DataClass + +exposed Function setFinalExam() + + var $1, $es, $student, $status : Object + var $2, $examResult : Text + + var $keys, $0 : Collection + + //Entity selection + $es:=$1 + + $examResult:=$2 + + $keys:=New collection() + + //Boucle sur la sélection d'entité + For each ($student;$es) + $student.finalExam:=$examResult + $status:=$student.save() + If ($status.success) + $keys.push($student.ID) + End if + End for each + + $0:=$keys +``` + +Un ensemble d'entité est d'abord créé avec cette requête : + +`http://127.0.0.1:8044/rest/Students/?$filter="ID<3"&$method=entityset` + +Vous pouvez ensuite exécuter cette requête : + +**POST** `http://127.0.0.1:8044/rest/Students/setFinalExam` + +Corps de la requête : + +``` +[ +{ +"__ENTITIES":true, +"__DATASET":"9B9C053A111E4A288E9C1E48965FE671" +}, +"Passed" +] + +``` + +#### Résultat + +Les entités ayant les clés primaires sont 1 et 2 ont été mises à jour. + +``` +{ + "result": [ + 1, + 2 + ] +} +``` + +### Utiliser une sélection d'entité mise à jour sur le client + +A l'aide de la fonction `getAgeAverage()` [définie ci-dessus](#using-an-entityselection-class-function-and-an-entityset). + +```4d +var $remoteDS, $newStudent, $students : Object +var $ageAverage : Integer + +$remoteDS:=Open datastore(New object("hostname";"127.0.0.1:8044");"students") + +// $newStudent est une entité "student" à traiter +$newStudent:=... +$students:=$remoteDS.Students.query("school.name = :1";"Math school") +// Nous avons ajouté une entité à la sélection d'entité $students sur le client +$students.add($newStudent) + +// Nous appelons une fonction sur la classe StudentsSelection qui retourne l'âge moyen des étudiants de la sélection d'entité +// La fonction est utilisée sur le serveur sur la sélection d'entité $students mise à jour, qui inclut l'étudiant ajouté par le client +$ageAverage:=$students.getAgeAverage() +``` \ No newline at end of file diff --git a/website/translated_docs/fr/REST/REST_requests.md b/website/translated_docs/fr/REST/REST_requests.md index 183654e632e1de..8333dbfa2e1c9d 100644 --- a/website/translated_docs/fr/REST/REST_requests.md +++ b/website/translated_docs/fr/REST/REST_requests.md @@ -6,38 +6,29 @@ title: A propos des requêtes REST Les structures suivantes sont prises en charge par les requêtes REST : -| URI | Ressource | {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) | -| | | | [$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | -| | | | [?$filter]($filter.md) | -| | | [{attribute}](manData.html#selecting-attributes-to-get)/ | [?$compute]($compute.md) | -| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | -| | [{dataClass}:{attribute}(value)](%7BdataClass%7D%7Battribute%7D_value.html) | | | -| | [$catalog]($catalog.md) | | | -| | [$directory]($directory.md) | | | -| | [$info]($info.md) | | | - - -Si toutes les requêtes REST doivent contenir les paramètres URI et Resource, la sous-ressource (qui filtre les données retournées) est facultative. +| URI | Resource (Input) | /? ou &{filter} (Output) | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... | +| | [{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | [$method=...]($method.md) | +| | [{dataClass}({clé})](%7BdataClass%7D.html#dataclasskey) | [$attributes]($attributes.md) | +| | [{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue) | | -Comme pour tous les URI, le premier paramètre est délimité par un «?» et tous les paramètres suivants par un «&». Par exemple : +Si toutes les requêtes REST doivent contenir les paramètres URI et Resource, les filtres d'Output (qui filtrent les données retournées) sont facultatifs. -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +Comme pour tous les URI, le premier paramètre est délimité par un «?» et tous les paramètres suivants par un «&». Par exemple : -> Vous pouvez placer toutes les valeurs entre guillemets en cas de doute. For example, in our above example, we could have put the value for the last name in single quotes: "lastName!='Jones'". + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +> Vous pouvez placer toutes les valeurs entre guillemets en cas de doute. Par exemple, dans notre exemple ci-dessus, nous aurions pu saisir la valeur du nom de famille entre guillemets simples "lastName!='Jones'". -Les paramètres vous permettent de manipuler des données dans des dataclass de votre projet 4D. Outre la récupération de données à l'aide des méthodes HTTP `GET`, vous pouvez également ajouter, mettre à jour et supprimer des entités d'une classe de datastore à l'aide des méthodes HTTP `POST`. +Les paramètres vous permettent de manipuler des données dans des dataclass de votre projet 4D. Outre la récupération de données à l'aide des méthodes HTTP `GET`, vous pouvez également ajouter, mettre à jour et supprimer des entités d'une dataclass à l'aide des méthodes HTTP `POST`. Si vous souhaitez que les données soient retournées dans un tableau au lieu d'un JSON, utilisez le paramètre [`$asArray`]($asArray.md). -## Statut et réponse REST +## Statut et réponse REST À chaque requête REST, le serveur retourne l'état et une réponse (avec ou sans erreur). ### Statut de la requête - Avec chaque requête REST, vous obtenez le statut et la réponse. Voici quelques exemples de statuts : | Statut | Description | @@ -45,13 +36,15 @@ Avec chaque requête REST, vous obtenez le statut et la réponse. Voici quelques | 0 | Requête non traitée (le serveur n'est peut-être pas été lancé). | | 200 OK | Requête traitée sans erreur. | | 401 Unauthorized | Erreur d'autorisation (vérifiez les autorisations de l'utilisateur). | -| 402 No session | Maximum number of sessions has been reached. | +| 402 No session | Nombre maximal de sessions ayant été atteint. | | 404 Not Found | La data n'est pas accessible via REST ou bien l'ensemble d'entités n'existe pas. | | 500 Internal Server Error | Erreur lors du traitement de la requête REST. | - ### Réponse La réponse (au format JSON) varie en fonction de la requête. -Si une erreur survient, elle sera envoyée avec la réponse du serveur ou bien ce sera la réponse du serveur. \ No newline at end of file +Si une erreur survient, elle sera envoyée avec la réponse du serveur ou bien ce sera la réponse du serveur. + + + diff --git a/website/translated_docs/fr/REST/authUsers.md b/website/translated_docs/fr/REST/authUsers.md index 0d241be9007aab..267d356b817601 100644 --- a/website/translated_docs/fr/REST/authUsers.md +++ b/website/translated_docs/fr/REST/authUsers.md @@ -1,85 +1,114 @@ --- id: authUsers -title: Users and sessions +title: Sessions et utilisateurs --- - -## Authentification des utilisateurs +REST requests can benefit from [web user sessions](WebServer/sessions.md), providing extra features such as multiple requests handling, data sharing between the web client processes, and user privileges. As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. -You log in a user to your application by passing the user's name and password to [`$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. +## Authentification des utilisateurs -The session will automatically be closed once the timeout is reached. +You log in a user to your application by calling [`$directory/login`]($directory.md#directorylogin) in a POST request including the user's name and password in the header. This request calls the `On REST Authentication` database method (if it exists), where you can check the user's credentials (see example below). -## Cookie de session +## Ouverture des sessions -Chaque requête REST est gérée via une session spécifique sur le serveur 4D. +When [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions) (recommended), if the `On REST Authentication` database method returns `true`, a user session is then automatically opened and you can handle it through the `Session` object and the [Session API](API/SessionClass.md). Subsequent REST requests will reuse the same session cookie. -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: +If the `On REST Authentication` database method has not been defined, a `guest` session is opened. - 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. Sinon, une nouvelle session sera ouverte et une autre licence utilisée. +## Exemple -### Exemple +In this example, the user enters their email and password in an html page that requests [`$directory/login`]($directory.md#directorylogin) in a POST (it is recommended to use an HTTPS connection to send the html page). The `On REST Authentication` database method is called to validate the credentials and to set the session. -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. +The HTML login page: + +![alt-text](assets/en/REST/login.png) -```4d -// Creating headers -ARRAY TEXT(headerNames;0) -ARRAY TEXT(headerValues;0) -APPEND TO ARRAY(headerNames;"username-4D") -APPEND TO ARRAY(headerNames;"session-4D-length") -APPEND TO ARRAY(headerNames;"hashed-password-4D") +```html + -APPEND TO ARRAY(headerValues;"kind user") -APPEND TO ARRAY(headerValues;"60") -APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) +
        +
        +Email:
        +Password:
        + + +
        +
        -C_OBJECT($response) -$response:=New object + -//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;*) ``` +When the login page is sent to the server, the `On REST Authentication` database method is called: + ```4d -// buildHeader project method + //On REST Authentication + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + //A '/rest' URL has been called with headers username-4D and password-4D +If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if +``` -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> As soon as it has been called and returned `True`, the `On REST Authentication` database method is no longer called in the session. -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +The `fillSession` project method initializes the user session, for example: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use +``` diff --git a/website/translated_docs/fr/REST/configuration.md b/website/translated_docs/fr/REST/configuration.md index fe00df0baca3fd..b930ffb8a33d0a 100644 --- a/website/translated_docs/fr/REST/configuration.md +++ b/website/translated_docs/fr/REST/configuration.md @@ -3,17 +3,19 @@ id: configuration title: Configuration du serveur --- -À l'aide de requêtes HTTP standard, le serveur 4D REST permet aux applications externes d'accéder directement aux données de votre base, c'est-à-dire de récupérer des informations sur les dataclass de votre projet, de manipuler des données, de vous connecter à votre application Web et bien plus encore. +À l'aide de requêtes HTTP standard, le serveur 4D REST permet aux applications externes d'accéder directement aux données de votre application, c'est-à-dire de récupérer des informations sur les dataclass de votre projet, de manipuler des données, de vous connecter à votre application Web et bien plus encore. Pour commencer à utiliser les fonctionnalités REST, vous devez démarrer et configurer le serveur 4D REST. -> - Sur 4D Server, l'ouverture d'une session REST nécessite une licence client 4D gratuite disponible. -> -> - Sur 4D monoposte, vous pouvez ouvrir jusqu'à trois sessions REST à des fins de test. Vous devez gérer le [cookie de session](authUsers.md#session-cookie) pour utiliser la même session pour votre application. +> - Sur 4D Server, l'ouverture d'une session REST nécessite une licence client 4D disponible.
        +> - On 4D single-user, you can open up to three REST sessions for testing purposes. +> - You need to manage the [session](authUsers.md) for your requesting application. + + ## Démarrage du serveur REST -Pour des raisons de sécurité, par défaut, 4D ne répond pas aux requêtes REST. Si vous souhaitez démarrer le serveur REST, vous devez cocher l'option **Exposer en tant que serveur REST** dans la page "Web/REST" des paramètres de la base pour que les demandes REST soient traitées. +Pour des raisons de sécurité, par défaut, 4D ne répond pas aux requêtes REST. Si vous souhaitez démarrer le serveur REST, vous devez cocher l'option **Exposer en tant que serveur REST** dans la page "Web/REST" des paramètres de la structure pour que les demandes REST soient traitées. ![alt-text](assets/en/REST/Settings.png) @@ -21,37 +23,39 @@ Pour des raisons de sécurité, par défaut, 4D ne répond pas aux requêtes RES Le message d'avertissement "Attention, vérifiez les privilèges d'accès" s'affiche lorsque vous cochez cette option, pour attirer votre attention sur le fait que lorsque les services REST sont activés, l'accès par défaut aux objets de base de données est gratuit tant que les accès REST n'ont pas été configurés. + ## Configuration de l'accès REST Par défaut, les accès REST sont ouverts à tous les utilisateurs, ce qui n'est évidemment pas recommandé pour des raisons de sécurité et de contrôle de l'utilisation des licences clientes. Vous pouvez configurer les accès REST de l'une des manières suivantes : - -- assigner un groupe d'utilisateurs en **lecture/écriture** aux services REST dans la page "Web/REST" des paramètres de la base; +- assigner un groupe d'utilisateurs en **lecture/écriture** aux services REST dans la page "Web/REST" des paramètres de la structure; - saisir d'une méthode base `On REST Authentication`pour intercepter et gérer chaque demande REST initiale. -> Vous ne pouvez pas utiliser les deux fonctionnalités simultanément. Une fois qu'une méthode base `On REST Authentication` a été définie, 4D lui donne entièrement le contrôle des requêtes REST . +> Vous ne pouvez pas utiliser les deux fonctionnalités simultanément. Une fois qu'une méthode base `On REST Authentication` a été définie, 4D lui donne entièrement le contrôle des requêtes REST : tout paramètre effectué à l'aide du menu "Lecture/Ecriture" de la page de ressources Web/REST des paramètres de structure est ignoré. -### Utilisation des paramètres de la base -Le menu **Lecture/Écriture** de la page "Web/REST" des paramètres de la base spécifie un groupe d'utilisateurs 4D autorisé à établir le lien vers la base de données 4D à l'aide de requêtes REST. +### Utilisation des Paramètres de la Structure -Par défaut, le menu affiche ****, ce qui signifie que les accès REST sont ouverts à tous les utilisateurs. Une fois que vous avez spécifié un groupe, seul un compte utilisateur 4D appartenant à ce groupe peut être utilisé pour [accéder à 4D via une requête REST](authUsers.md). Si un compte utilisé n'appartient pas à ce groupe, 4D renvoie une erreur d'authentification à l'expéditeur de la requête. +Le menu **Lecture/Écriture** de la page "Web/REST" des paramètres de la structure indique un groupe d'utilisateurs 4D autorisé à établir le lien vers l'application 4D à l'aide des requêtes REST. -> Pour que ce paramètre prenne effet, la méthode base `On REST Authentication` ne doit pas être définie. S'il existe, 4D ignore les paramètres d'accès définis dans les propriétés de la base. +Par défaut, le menu affiche **\**, ce qui signifie que les accès REST sont ouverts à tous les utilisateurs. Une fois que vous avez spécifié un groupe, seul un compte utilisateur 4D appartenant à ce groupe peut être utilisé pour [accéder à 4D via une requête REST](authUsers.md). Si un compte utilisé n'appartient pas à ce groupe, 4D renvoie une erreur d'authentification à l'expéditeur de la requête. + +> Pour que ce paramètre prenne effet, la méthode base `On REST Authentication` ne doit pas être définie. S'il existe, 4D ignore les paramètres d'accès définis dans les propriétés de la structure. ### Méthode base On REST Authentication +La méthode base `On REST Authentication` vous permet de contrôler de manière personnalisée l’ouverture des sessions REST sur 4D. Cette méthode base est automatiquement appelée lorsqu'une nouvelle session est ouverte à l'aide d'une requête REST. Lorsqu'une [requête d’ouverture de session REST](authUsers.md) est reçue, les identifiants de connexion sont fournis dans l’en-tête de la requête. La méthode base `On REST Authentication` est appelée afin de vous permettre d’évaluer ces identifiants. Vous pouvez utiliser la liste des utilisateurs de l'application 4D ou votre propre table d’identifiants. Pour obtenir plus d'informations, veuillez vous reporter à la [documentation](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.fe.html) de la méthode base `On REST Authentication`. + -La méthode base `On REST Authentication` vous permet de contrôler de manière personnalisée l’ouverture des sessions REST sur 4D. Cette méthode base est automatiquement appelée lorsqu'une nouvelle session est ouverte à l'aide d'une requête REST. Lorsqu'une [requête d’ouverture de session REST](authUsers.md) est reçue, les identifiants de connexion sont fournis dans l’en-tête de la requête. La méthode base `On REST Authentication` est appelée afin de vous permettre d’évaluer ces identifiants. Vous pouvez utiliser la liste des utilisateurs de la base 4D ou votre propre table d’identifiants. Pour obtenir plus d'informations, veuillez vous reporter à la [documentation](https://doc.4d.com/4Dv18/4D/18/On-REST-Authentication-database-method.301-4505004.fe.html) de la méthode base `On REST Authentication`. ## Exposer les tables et les champs -Une fois que les services REST sont activés dans la base 4D, par défaut une session REST peut accéder à toutes les tables et les champs du datastore, et utiliser leurs données. Par exemple, si votre base de données contient une table [Employee], il est possible d'écrire : +Une fois les services REST sont activés dans l'application 4D, une session REST peut par défaut accéder à toutes les tables et à tous les champs de la base de données 4D via l'[interface du datastore](ORDA/dsMapping.md#datastore). Ainsi, elle peut utiliser leurs données. Par exemple, si votre base de données contient une table [Employee], il est possible d'écrire : - http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" - - +``` +http://127.0.0.1:8044/rest/Employee/?$filter="salary>10000" +``` Cette requête retournera tous les employés dont le champ "salary" est supérieur à 10 000. > Les tables et/ou champs 4D dont l'attribut est "invisible" sont également exposés par défaut dans REST. @@ -70,6 +74,7 @@ Pour supprimer l'exposition REST d'une table : 2. Décochez l'option **Exposer en tant que ressource REST** : ![alt-text](assets/en/REST/table.png) Procédez ainsi pour chaque table dont l'exposition doit être modifiée. + ### Exposer des champs Par défaut, touts les champs d'une base 4D sont exposés dans REST. @@ -80,6 +85,6 @@ Pour supprimer l'exposition REST d'un champ : 1. Affichez l'Inspecteur de champ dans l'Editeur de structure et sélectionnez le champ à modifier. -2. Décochez la case **Exposer en tant que ressource RES**T pour le champ. ![alt-text](assets/en/REST/field.png) Répétez cette opération pour chaque champ dont l'exposition doit être modifiée. +2. Décochez la case **Exposer en tant que ressource REST** pour le champ. ![alt-text](assets/en/REST/field.png) Répétez cette opération pour chaque champ dont l'exposition doit être modifiée. -> Pour qu'un champ soit accessible via REST, la table parente doit l'être également. Si la table parente n'est pas exposée, aucun de ses champs ne le sera, quel que soit leur statut. \ No newline at end of file +> Pour qu'un champ soit accessible via REST, la table parente doit l'être également. Si la table parente n'est pas exposée, aucun de ses champs ne le sera, quel que soit leur statut. diff --git a/website/translated_docs/fr/REST/genInfo.md b/website/translated_docs/fr/REST/genInfo.md index 2c61729be53ccd..5ad978f59342a1 100644 --- a/website/translated_docs/fr/REST/genInfo.md +++ b/website/translated_docs/fr/REST/genInfo.md @@ -10,12 +10,13 @@ Vous pouvez obtenir plusieurs informations du serveur REST : ## Catalogue -Utilisez les paramètres [`$catalog`]($catalog.md),[`$catalog/{dataClass}`]($catalog.md#catalogdataclass), ou [`$catalog/$all`]($catalog.md#catalogall) pour obtenir la liste [des classes du datastore exposées et leurs attributs](configuration.md#exposing-tables-and-fields). +Utilisez les paramètres [`$catalog`]($catalog.md),[`$catalog/{dataClass}`]($catalog.md#catalogdataclass), ou [`$catalog/$all`]($catalog.md#catalogall) pour obtenir la liste [des dataclasses exposées et leurs attributs](configuration.md#exposing-tables-and-fields). Pour obtenir la collection de toutes les dataclass exposées avec leurs attributs : `GET /rest/$catalog/$all` + ## Informations sur le cache Utilisez le paramètre [`$info`]($info.md) pour obtenir des informations sur les sélections d'entités stockées dans le cache du 4D Server et sur l'exécution des sessions utilisateur. @@ -29,7 +30,6 @@ Par exemple : `GET /rest/People/$filter="employer.name=acme AND lastName=Jones"&$queryplan=true&$querypath=true` Ces propriétés sont des objets contenant des informations sur la façon dont le serveur exécute les requêtes composites en interne via des dataclass et des relations : - - **queryPlan** : objet contenant la description détaillée de la requête juste avant son exécution (c'est-à-dire la requête planifiée). - **queryPath** : objet contenant la description détaillée de la requête telle qu'elle a été réellement effectuée. diff --git a/website/translated_docs/fr/REST/gettingStarted.md b/website/translated_docs/fr/REST/gettingStarted.md index 3958ec6e9a2ed4..fbc8a61b724a71 100644 --- a/website/translated_docs/fr/REST/gettingStarted.md +++ b/website/translated_docs/fr/REST/gettingStarted.md @@ -3,23 +3,23 @@ id: gettingStarted title: Prise en main --- -4D vous fournit un serveur REST puissant, qui permet d'accéder directement aux données stockées dans vos bases de données 4D. +4D vous fournit un serveur REST puissant, qui permet d'accéder directement aux données stockées dans vos applications 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). +Le serveur REST est inclus dans 4D et 4D Server et automatiquement disponible dans vos applications 4D [une fois configuré](configuration.md). Cette section est destinée à vous familiariser avec la fonctionnalité REST à l'aide d'un exemple simple. Nous allons : +- créer et configurer un projet d'application 4D basique +- accéder aux données du projet 4D via REST à l'aide d'un navigateur standard. -- créer et configurer une base de données 4D simple -- accéder aux données de la base 4D via REST à l'aide d'un navigateur standard. +Pour simplifier l'exemple, nous allons utiliser 4D et un navigateur qui s'exécutent sur la même machine. Bien entendu, vous pouvez également utiliser une architecture distante. -Pour simplifier l'exemple, nous allons utiliser une application 4D et un navigateur qui s'exécutent sur la même machine. Bien entendu, vous pouvez également utiliser une architecture distante. -## Créer et configurer la base de données 4D -1. Lancez votre application 4D ou 4D Server et créez une nouvelle base de données. Vous pouvez, par exemple, le nommer "Emp4D". +## Créer et configurer le projet 4D + +1. Lancez votre application 4D ou 4D Server et créez un nouveau projet. Vous pouvez, par exemple, le nommer "Emp4D". 2. Dans l'éditeur de structure, créez une table [Employees] et ajoutez-y les champs suivants : - - Lastname (Alpha) - Firstname (Alpha) - Salary (Longint) @@ -32,99 +32,107 @@ Pour simplifier l'exemple, nous allons utiliser une application 4D et un navigat ![](assets/en/REST/getstarted2.png) -4. Affichez la page **ressources Web/REST** de la boîte de dialogue des Propriétés de la base de données et [cochez l'option Exposer en tant que serveur REST](configuration.md#starting-the-rest-server). +4. Affichez la page **ressources Web/REST** de la boîte de dialogue des Propriétés et [cochez l'option Exposer en tant que serveur REST](configuration.md#starting-the-rest-server). 5. Dans le menu **Exécuter**, sélectionnez **Démarrer le serveur Web** (si nécessaire), puis sélectionnez **Tester le serveur Web**. 4D affiche la page d'accueil par défaut du serveur Web 4D. + ## Accéder aux données 4D avec le navigateur Vous pouvez désormais lire et modifier des données dans 4D uniquement via les requêtes REST. Toute requête d'URL 4D REST commence par `/ rest`, pour être insérée après la zone `adress:port`. Par exemple, pour voir le contenu du datastore 4D, vous pouvez écrire : - http://127.0.0.1/rest/$catalog - +``` +http://127.0.0.1/rest/$catalog +``` Le serveur REST répond : - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - - -Cela signifie que le datastore contient le dataclass Employees. You can see the dataclass attributes by typing: - - /rest/$catalog/Employees - +``` +{ + "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", + "dataClasses": [ + { + "name": "Employees", + "uri": "/rest/$catalog/Employees", + "dataURI": "/rest/Employees" + } + ] +} +``` + +Cela signifie que le datastore contient le dataclass Employees. Vous pouvez voir les attributs de la dataclass en tapant : + +``` +/rest/$catalog/Employees +``` Si vous souhaitez obtenir toutes les entités de la dataclass Employee, vous pouvez écrire : - /rest/Employees - +``` +/rest/Employees +``` **Réponse :** - { - "__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 - } - +``` +{ + "__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 +} +``` Il existe plusieurs possibilités pour filtrer les données à recevoir. Par exemple, pour obtenir uniquement la valeur de l'attribut "Lastname" de la 2ème entité, vous pouvez simplement écrire : - /rest/Employees(2)/Lastname - +``` +/rest/Employees(2)/Lastname +``` **Réponse :** - { - "__entityModel": "Employees", - "__KEY": "2", - "__TIMESTAMP": "2020-01-07T17:08:14.387Z", - "__STAMP": 2, - "Lastname": "Jones" - } - - -L'[API REST](REST_requests.md) de 4D fournit plusieurs commandes pour interagir avec la base 4D. \ No newline at end of file +``` +{ + "__entityModel": "Employees", + "__KEY": "2", + "__TIMESTAMP": "2020-01-07T17:08:14.387Z", + "__STAMP": 2, + "Lastname": "Jones" +} +``` + +L'[API REST](REST_requests.md) de 4D fournit plusieurs commandes pour interagir avec les applications 4D. diff --git a/website/translated_docs/fr/REST/manData.md b/website/translated_docs/fr/REST/manData.md index ed7dafa6c6862e..2ef6aa0d789b7c 100644 --- a/website/translated_docs/fr/REST/manData.md +++ b/website/translated_docs/fr/REST/manData.md @@ -3,7 +3,7 @@ id: manData title: Manipulation des données --- -Touts [les attributs, classes](configuration.md#exposing-tables-and-fields) et méthodes du datastore exposés sont accessibles via REST. Les noms de dataclass, d'attributs et de méthodes sont sensibles à la casse; contrairement aux données des requêtes. +All [exposed dataclasses, attributes](configuration.md#exposing-tables-and-fields) and [functions](ClassFunctions.md) can be accessed through REST. Les noms de dataclass, d'attributs et de fonctions sont sensibles à la casse; contrairement aux données des requêtes. ## Rechercher des données @@ -11,23 +11,29 @@ Pour rechercher directement des données, vous pouvez utiliser la fonction [`$fi `http://127.0.0.1:8081/rest/Person/?$filter="lastName=Smith"` + + + ## Adding, modifying, and deleting entities Avec l'API REST, vous pouvez effectuer toutes les manipulations de données souhaitées dans 4D. -Pour ajouter et modifier des entités, vous pouvez appeler [`$method=update`]($method.md#methodupdate). Avant d'enregistrer des données, vous pouvez également les valider au préalable en appelant [`$method=validate`]($method.md#methodvalidate). Si vous souhaitez supprimer une ou plusieurs entités, vous pouvez utiliser [`$method=delete`]($method.md#methoddelete). +Pour ajouter et modifier des entités, vous pouvez appeler [`$method=update`]($method.md#methodupdate). Si vous souhaitez supprimer une ou plusieurs entités, vous pouvez utiliser [`$method=delete`]($method.md#methoddelete). + +Besides retrieving a single entity in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a [class function](ClassFunctions.md#function-calls) that returns an entity selection (or a collection). -Outre la récupération d'un attribut dans une dataclass à l'aide de [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), vous pouvez également écrire une méthode dans votre datastore class et l'appeler pour retourner une entity selection (ou une collection) à l'aide de [{dataClass}/{method}](%7BdataClass%7D.html#dataclassmethod). +Avant de retourner la sélection, vous pouvez également la trier en utilisant [`$orderby`]($orderby.md) un ou plusieurs attributs (même les attributs de relation). -Avant de retourner la collection, vous pouvez également la trier en utilisant [`$orderby`]($orderby.md) un ou plusieurs attributs (même les attributs de relation). ## Navigating data Ajoutez le [`$skip`]($skip.md) (pour définir avec quelle entité commencer) et [`$top/$limit`]($top_$limit.md) (pour définir le nombre d'entités à retourner) des requêtes REST à vos requêtes ou entity selections pour parcourir la collection d'entités. + + ## Creating and managing entity set -Un ensemble d'entités (également appelé *entity set* ou *entity selection*) est une collection d'entités obtenue via une requête REST stockée dans le cache de 4D Server. L'utilisation d'un entity set vous empêche de lancer continuellement des requêtes à votre application pour obtenir les mêmes résultats. L'accès à un entity set est beaucoup plus rapide et peut améliorer la vitesse de votre application. +Un ensemble d'entités (également appelé *entity set* ou <0>entity selection) est une collection d'entités obtenue via une requête REST stockée dans le cache de 4D Server. L'utilisation d'un entity set vous empêche de lancer continuellement des requêtes à votre application pour obtenir les mêmes résultats. L'accès à un entity set est beaucoup plus rapide et peut améliorer la vitesse de votre application. Pour créer un entity set, appelez [`$method=entityset`]($method.md#methodentityset) dans votre requête REST. Par mesure de sécurité, vous pouvez également utiliser [`$savedfilter`]($savedfilter.md) et/ou [`$savedorderby`]($savedorderby.md) lorsque vous appelez [`$filter`]($filter.md) et/ou [`$orderby`]($orderby.md) afin que l'entité définie puisse être rapidement récupérée avec le même ID que précédemment, dans le cas où elle expireait ou serait supprimée du serveur. @@ -35,6 +41,7 @@ Pour accéder à l'entity set, vous devez utiliser `$entityset/{entitySetID}`, p `/rest/People/$entityset/0AF4679A5C394746BFEB68D2162A19FF` + Par défaut, un entity set est stocké pendant deux heures; cependant, vous pouvez modifier le timeout en passant une nouvelle valeur à [`$timeout`]($timeout.md). Le timeout est continuellement réinitialisé à la valeur définie (soit par défaut soit à celle que vous définissez) chaque fois que vous l'utilisez. Si vous souhaitez supprimer un entity set du cache de 4D Server, vous pouvez utiliser [`$method=release`]($method.md#methodrelease). @@ -43,56 +50,36 @@ Si vous modifiez l'un des attributs de l'entité dans l'entity set, les valeurs Si l'ensemble d'entités ne se trouve plus dans le cache de 4D Server, il sera recréé avec un nouveau timeout de 10 minutes. L'ensemble d'entités sera actualisé (certaines entités peuvent être incluses tandis que d'autres peuvent être supprimées) depuis la dernière fois qu'il a été créé, s'il n'existait plus avant de le recréer. -En utilisant [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection), vous pouvez combiner deux entity sets que vous avez créés précédemment. Vous pouvez combiner les résultats dans les deux, retourner uniquement ce qui est commun aux deux, ou renvoyer ce qui n'est pas commun aux deux. +Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection), you can combine two entity sets that you previously created. Vous pouvez combiner les résultats dans les deux, retourner uniquement ce qui est commun aux deux, ou renvoyer ce qui n'est pas commun aux deux. Une nouvelle sélection d'entités est renvoyée; vous pouvez néanmoins créer un nouvel ensemble d'entités en appelant [`$method=entityset`]($method.md#methodentityset) à la fin de la requête REST. + + ## Calculating data En utilisant [`$compute`]($compute.md), vous pouvez calculer la **moyenne**, le **nombre**, le **min**, le **max** ou la **somme** pour un attribut spécifique d'une dataclass. Vous pouvez également calculer toutes les valeurs avec le mot clé $all. Par exemple, pour obtenir le salaire le plus élevé : -`/rest/Employee/salary/?$compute=sum` +`/rest/Employee/salary/?$compute=max` Pour calculer toutes les valeurs et retourner un objet 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 - -The following example is a dataclass method that reveives parameters and returns an object: - -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$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: +## Appeler les fonctions de classe du modèle de données -![alt-text](assets/en/REST/methodProp_ex.png) +You can call ORDA Data Model [user class functions](ClassFunctions.md) through POST requests, so that you can benefit from the exposed API of the targeted application. Par exemple, si vous avez défini une fonction `getCity()` dans la dataclass City, vous pouvez l'appeler à l'aide de la requête suivante : -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +`/rest/City/getCity` -```4d -C_TEXT($content) -C_OBJECT($response) +avec des données contenues dans le corps de la requête : `["Paris"]` -$content:="[\"Toni\",\"Dickey\"]" -$statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) -``` +> Les appels aux méthodes projet 4D exposées en tant que service REST sont toujours pris en charge mais sont obsolètes. -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. ## Selecting Attributes to get @@ -108,11 +95,10 @@ Vous pouvez appliquer ce filtre comme suit : | | {dataClass}:{attribute}(value)/{att1,att2...}/ | /People:firstName(Larry)/firstName,lastName/ | | Entity selection | {dataClass}/{att1,att2...}/$entityset/{entitySetID} | /People/firstName/$entityset/528BF90F10894915A4290158B4281E61 | - Les attributs doivent être délimités par une virgule, c'est-à-dire `/Employee/firstName,lastName,salary`. Des attributs de stockage ou des attributs relationnels peuvent être transmis. -### Exemples +### Exemples Voici quelques exemples vous permettant d'indiquer les attributs à retourner en fonction de la méthode employée pour récupérer les entités. Vous pouvez appliquer cette méthode à : @@ -123,118 +109,127 @@ Vous pouvez appliquer cette méthode à : #### Exemple avec une dataclass -Les requêtes suivantes retournent uniquement le prénom et le nom de la datastore class People (soit la datastore class entière, soit une sélection d'entités basée sur la recherche définie dans `$filter`). +Les requêtes suivantes retournent uniquement le prénom et le nom de la dataclass People (soit la dataclass entière, soit une sélection d'entités basée sur la recherche définie dans `$filter`). + + `GET /rest/People/firstName,lastName/` -`GET /rest/People/firstName,lastName/` **Résultat** : - { - __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" - } - ] - } - +```` +{ + __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@'"/` **Résultat** : - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +```` +{ + __entityModel: "People", + __COUNT: 1, + __SENT: 1, + __FIRST: 0, + __ENTITIES: [ + { + __KEY: "4", + __STAMP: 4, + firstName: "Beth", + lastName: "Adams" + } + ] +} +```` + #### Exemple d'entité La requête suivante retourne uniquement les attributs de prénom et nom à partir d'une entité spécifique de la dataclass People : -`GET /rest/People(3)/firstName,lastName/` + `GET /rest/People(3)/firstName,lastName/` **Résultat** : - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + -`GET /rest/People(3)/` + `GET /rest/People(3)/` **Résultat** : - { - __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" - - } - +```` +{ + __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" + +} +```` #### Exemple d'ensemble d'entités 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 + `GET /rest/People/firstName,employer.name/$entityset/BDCD8AABE13144118A4CF8641D5883F5?$expand=employer` + ## Affichage d'un attribut d'image Si vous souhaitez afficher intégralement un attribut d'image, saisissez ce qui suit : -`GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` + `GET /rest/Employee(1)/photo?$imageformat=best&$version=1&$expand=photo` Pour plus d'informations sur les formats d'image, reportez-vous à [`$imageformat`]($imageformat.md). Pour plus d'informations sur le paramètre de version, reportez-vous à [`$version`]($version.md). @@ -242,10 +237,13 @@ Pour plus d'informations sur les formats d'image, reportez-vous à [`$imageforma Si vous souhaitez enregistrer un BLOB stocké dans votre dataclass, vous pouvez écrire ce qui suit : -`GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` + `GET /rest/Company(11)/blobAtt?$binary=true&$expand=blobAtt` + ## Récupérer une seule entité -Vous pouvez utiliser la syntaxe[`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) lorsque vous souhaitez récupérer une seule entité. C'est particulièrement utile lorsque vous souhaitez lancer une recherche associée qui n'est pas créée sur la clé primaire de la dataclass. For example, you can write: +Vous pouvez utiliser la syntaxe[`{dataClass}:{attribute}(value)`](%7BdataClass%7D.html#dataclassattributevalue) lorsque vous souhaitez récupérer une seule entité. C'est particulièrement utile lorsque vous souhaitez lancer une recherche associée qui n'est pas créée sur la clé primaire de la dataclass. Par exemple, vous pouvez écrire : -`GET /rest/Company:companyCode("Acme001")` \ No newline at end of file + `GET /rest/Company:companyCode("Acme001")` + + diff --git a/website/translated_docs/fr/REST/{dataClass}.md b/website/translated_docs/fr/REST/{dataClass}.md index aaac8fb0d8fd4f..e47da411dd8186 100644 --- a/website/translated_docs/fr/REST/{dataClass}.md +++ b/website/translated_docs/fr/REST/{dataClass}.md @@ -7,17 +7,21 @@ title: -Les noms de dataclass peuvent être utilisés directement dans les requêtes REST pour opérer avec des entités, des sélections d'entités (entity selections) ou des méthodes de la dataclass. +Les noms de dataclass peuvent être utilisés directement dans les requêtes REST pour opérer avec des entités, des sélections d'entités (entity selections) ou des fonctions de classe (class functions) de la dataclass. ## Syntaxe -| Syntaxe | Exemple | Description | -| -------------------------------------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- | -| [**{dataClass}**](#dataClass) | `/Employee` | Renvoie toutes les données (par défaut les 100 premières entités) de la dataclass | -| [**{dataClass}({clé})**](#dataclasskey) | `/Employee(22)` | Renvoie les données de l'entité spécifique définie par la clé primaire de la dataclass | -| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | Renvoie les données d'une entité dans laquelle la valeur de l'attribut est définie | -| [**{dataClass}/{méthode}**](#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 | +| Syntaxe | Exemple | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------- | -------------------------------------------------------------------------------------- | +| [**{dataClass}**](#dataClass) | `/Employee` | Renvoie toutes les données (par défaut les 100 premières entités) de la dataclass | +| [**{dataClass}({clé})**](#dataclasskey) | `/Employee(22)` | Renvoie les données de l'entité spécifique définie par la clé primaire de la dataclass | +| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | Renvoie les données d'une entité dans laquelle la valeur de l'attribut est définie | +| [**{dataClass}/{DataClassClassFunction}**](ClassFunctions.md#function-calls) | `/City/getCity` | Exécute une fonction de classe d'une dataclass | +| [**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls) | `/City/getPopulation/?$filter="ID<3"` | Exécute une fonction de classe d'une sélection d'entité | +| [**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls) | `City(2)/getPopulation` | Exécute une fonction de classe d'une entité | + +> Les appels de fonction sont détailles dans la section [Appeler des fonctions de classe ORDA](ClassFunctions.md). + ## {dataClass} @@ -30,111 +34,113 @@ Lorsque vous appelez ce paramètre dans votre requête REST, les 100 premières Voici une description des données retournées : -| Propriété | Type | Description | -| ------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| __entityModel | Chaine | Nom de la classe du datastore. | -| __COUNT | Nombre | Nombre d'entités dans la classe du datastore. | -| __SENT | Nombre | 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 | Nombre | Numéro d'entité à partir duquel la sélection commence. Soit 0 par défaut soit la valeur définie par `$skip`. | -| __ENTITIES | Collection | This collection of objects contains an object for each entity with all its attributes. Tous les attributs relationnels sont renvoyés en tant qu'objets avec un URI pour obtenir des informations concernant le parent. | +| Propriété | Type | Description | +| ------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| __entityModel | Chaine | Nom de la dataclass. | +| __COUNT | Nombre | Nombre d'entités dans la dataclass. | +| __SENT | Nombre | Nombre d'entités envoyées par la requête REST. Ce nombre peut être le nombre total d'entités s'il est inférieur à la valeur définie par `$top/$limit`. | +| __FIRST | Nombre | Numéro d'entité à partir duquel la sélection commence. Soit 0 par défaut soit la valeur définie par `$skip`. | +| __ENTITIES | Collection | Cette collection d'objets contient un objet pour chaque entité avec tous ses attributs. Tous les attributs relationnels sont renvoyés en tant qu'objets avec un URI pour obtenir des informations concernant le parent. | +Chaque entité contient les propriétés suivantes : -Each entity contains the following properties: +| Propriété | Type | Description | +| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- | +| __KEY | Chaine | Valeur de la clé primaire définie pour la dataclass. | +| __TIMESTAMP | Date | Horodatage de la dernière modification de l'entité | +| __STAMP | Nombre | Tampon interne qui est nécessaire lors de la modification des valeurs de l'entité lors de l'utilisation de `$method=update`. | -| Propriété | Type | Description | -| ----------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| __KEY | Chaine | Value of the primary key defined for the datastore class. | -| __TIMESTAMP | Date | Timestamp of the last modification of the entity | -| __STAMP | Nombre | Internal stamp that is needed when you modify any of the values in the entity when using `$method=update`. | +Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple : + `GET /rest/Company/name,address` -Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple: -`GET /rest/Company/name,address` ### Exemple -Renvoie toutes les données d'une classe de datastore spécifique. +Retourne toutes les données d'une dataclass spécifique. -`GET /rest/Company` + `GET /rest/Company` **Résultat** : - { - "__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 - ] - } - + } +.....//plus d'entités ici + ] +} +```` + ## {dataClass}({clé}) @@ -142,45 +148,48 @@ Renvoie les données de l'entité spécifique définie par la clé primaire de l ### Description -En passant la dataclass et une clé, vous pouvez récupérer toutes les informations publiques de cette entité. La clé est la valeur de l'attribut définie comme clé primaire pour votre classe de datastore. Pour plus d'informations sur la définition d'une clé primaire, reportez-vous à la section **Modification de la clé primaire** dans **l'éditeur de modèle de données**. +En passant la dataclass et une clé, vous pouvez récupérer toutes les informations publiques de cette entité. En passant la dataclass et une clé, vous pouvez récupérer toutes les informations publiques de cette entité. Pour plus d'informations sur la définition d'une clé primaire, reportez-vous à la section **Modification de la clé primaire** dans **l'éditeur de modèle de données**. -Pour plus d'informations sur les données retournées, reportez-vous à [{datastoreClass}](#datastoreclass). +For more information about the data returned, refer to [{DataStoreClass}](#datastoreclass). -Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple: +Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple : -`GET /rest/Company(1)/name,address` + `GET /rest/Company(1)/name,address` Si vous souhaitez développer un attribut relationnel à l'aide de `$expand`, vous devez l'indiquer comme suit : -`GET /rest/Company(1)/name,address,staff?$expand=staff` + `GET /rest/Company(1)/name,address,staff?$expand=staff` ### Exemple -La requête suivante retourne toutes les données publiques de la classe de datastore de Company dont la clé est 1. +La requête suivante retourne toutes les données publiques de la dataclass Company dont la clé est 1. -`GET /rest/Company(1)` + `GET /rest/Company(1)` **Résultat** : - { - "__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) @@ -190,138 +199,19 @@ Renvoie les données d'une entité dans laquelle la valeur de l'attribut est dé En passant la *dataClass* et un *attribut* avec une valeur, vous pouvez récupérer toutes les informations publiques de cette entité. La valeur est une valeur unique pour l'attribut, mais ce n'est pas la clé primaire. -`GET /rest/Company:companyCode(Acme001)` + `GET /rest/Company:companyCode(Acme001)` -Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple: +Si vous souhaitez indiquer les attributs à retourner, définissez-les à l'aide de la syntaxe suivante [{attribut1, attribut2, ...}](manData.md##selecting-attributes-to-get). Par exemple : -`GET /rest/Company:companyCode(Acme001)/name,address` + `GET /rest/Company:companyCode(Acme001)/name,address` Si vous souhaitez utiliser un attribut relationnel à l'aide de [$attributes]($attributes.md), vous devez l'indiquer comme suit : -`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` + `GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` ### Exemple La requête suivante retourne toutes les données publiques de l'employé nommé "Jones". -`GET /rest/Employee:lastname(Jones)` - -## {dataClass}/{method} and {dataClass}({key})/{method} - -Returns an object or a collection based on a project method. - -### Description - -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 - -![alt-text](assets/en/REST/MethodProp.png) - -### Passer des paramètres à une méthode - -You can also pass parameters to a method in a POST. - -`POST /rest/Employee/addEmployee` - -You can POST data in the body part of the request, for example: - -["John","Smith"] + `GET /rest/Employee:lastname(Jones)` -### Exemples - -#### Table scope - -Call of a `getAverage` method: - -- on [Employee] table -- with **Table** scope - -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` - -`POST /rest/Employee/getAverage` - -Résultat : - - { - "result": { - "ageAverage": 44.125 - } - } - - -#### Current record scope - -Call of a `getFullName` method: - -- on [Employee] table -- with **Current record** scope - -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` - -`POST /rest/Employee(3)/getFullName` - -Résultat : - - { - "result": { - "fullName": "John Smith" - } - } - - -#### Current selection scope - -Call of a `updateSalary` method: - -- on [Employee] table -- with **Current selection** scope - -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` - -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` - -POST data (in the request body): [1.5] - -Résultat : - - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/fr/ReleaseNotes/whatsNew.md b/website/translated_docs/fr/ReleaseNotes/whatsNew.md new file mode 100644 index 00000000000000..2861cfd8570dee --- /dev/null +++ b/website/translated_docs/fr/ReleaseNotes/whatsNew.md @@ -0,0 +1,15 @@ +--- +id: whatsNew +title: What's New +--- + +The list of new or modified 4D features that are covered in this documentation. + +## 4D v18 R6 + +- [Entity Selection Class](API/entitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/imapTransporterClass.md), [POP3 Mail](API/pop3TransporterClass.md) and [SMTP Mail](API/smtpTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/imapTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/sessionClass.md). \ No newline at end of file diff --git a/website/translated_docs/fr/Tags/tags.md b/website/translated_docs/fr/Tags/tags.md new file mode 100644 index 00000000000000..23e75841b5e4c8 --- /dev/null +++ b/website/translated_docs/fr/Tags/tags.md @@ -0,0 +1,764 @@ +--- +id: tags +title: Transformation tags +--- + +4D provides a set of transformation tags which allow you to insert references to 4D variables or expressions, or to perform different types of processing within a source text, referred to as a "template". These tags are interpreted when the source text is executed and generate an output text. + +This principle is used in particular by the 4D Web server to build [web template pages](WebServer/templates.md). + +These tags are generally be inserted as HTML type comments (``) but an [xml-compliant alternative syntax](#alternative-syntax-for-4dtext-4dhtml-4deval) is available for some of them. + +It is possible to mix several types of tags. For example, the following HTML structure is entirely feasible: + +```html + + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + (Loop on the current selection) + (If [TABLE]ValNum>10) + (Subpage insertion) + (Else) + Value:
        (Field display) + + ](End for) + + +``` + + + +## Principles for using tags + +### Parsing + +Parsing the contents of a *template* source is done in two contexts: + +- Using the `PROCESS 4D TAGS` command; this command accepts a *template* as input, as well as optional parameters and returns a text resulting from the processing. + +- Using 4D's integrated HTTP server: [template pages](WebServer/templates.md) sent by means of the `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB), `WEB SEND TEXT` commands, or called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. + + +### Recursive processing + +4D tags are interpreted recursively: 4D always attempts to reinterpret the result of a transformation and, if a new transformation has taken place, an additional interpretation is performed, and so on until the product obtained no longer requires any further transformation. For example, given the following statement: + +```html + +``` + +If the `[Mail]Letter_type` text field itself contains a tag, for example ``, this tag will be evaluated recursively after the interpretation of the 4DHTML tag. + +This powerful principle meets most needs related to text transformation. Note, however, that in some cases this can also allow malicious code to be inserted in the web context, [which can be avoided](WebServer/templates.md#prevention-of-malicious-code-insertion). + + +### Identifiers with tokens + +To ensure the correct evaluation of expressions processed via tags, regardless of the language or 4D version, it's recommended to use the tokenized syntax for elements whose name may vary over versions (commands, tables, fields, constants). For example, to insert the `Current time` command, enter `Current time:C178`. + +### Using the "." as decimal separator + +4D always uses the period character (.) as a decimal separator when evaluating a numerical expression using a 4D tag `4DTEXT`, `4DHTML`, and `4DEVAL`. Regional settings are ignored. This feature facilitates code maintenance and compatibility between 4D languages and versions. + + +## 4DBASE + +#### Syntax: `` + +The `` tag designates the working directory to be used by the `` tag. + +When it is called in a Web page, the `` tag modifies all subsequent `` calls on this page, until the next `, if any. If the`` folder is modified from within an included file, it retrieves its original value from the parent file. + +The *folderPath* parameter must contain a pathname relative to the current page and it must end with a slash (/). The designated folder must be located inside the Web folder. + +Pass the "WEBFOLDER" keyword to restore the default path (relative to the page). + +The following code, which must specify a relative path for each call: + +```html + + + + + +``` +... is equivalent to: + +```html + + + + + + + + +``` + +For example, to set a directory for the home page: + +```html +/* Index.html */ + + + + + + + + +``` + +In the "head.html" file, the current folder is modified through ``, without this changing its value in "Index.html": + +```html +/* Head.htm */ +/* the working directory here is relative to the included file (FR/ or US/) */ + + + + + + +``` + + +## 4DCODE + +#### Syntax: `` + +The `4DCODE` tag allows you to insert a multi-line 4D code block in a template. + +When a `` sequence. The code block itself can contain carriage returns, line feeds, or both; it will be interpreted sequentially by 4D. + +For example, you can write in a template: + +```html + +``` + + +Here are the 4DCODE tag features: + +- The `TRACE` command is supported and activates the 4D debugger, thus allowing you to debug your template code. +- Any error will display the standard error dialog that lets the user stop code execution or enter debugging mode. +- The text in between `` is split into lines accepting any line-ending convention (cr, lf, or crlf). +- The text is tokenized within the context of the database that called `PROCESS 4D TAGS`. This is important for recognition of project methods for example. The [Available through tags and 4D URLs (4DACTION ...)](WebServer/allowProject.md) method property is not taken into account. +- Even if the text always uses English-US, it is recommended to use the token syntax (:Cxxx) for command and constant names to protect against potential problems due to commands or constants being renamed from one version of 4D to another. + +> The fact that 4DCODE tags can call any of the 4D language commands or project methods could be seen as a security issue, especially when the database is available through HTTP. However, since it executes server-side code called from your own template files, the tag itself does not represent a security issue. In this context, as for any Web server, security is mainly handled at the level of remote accesses to server files. + + +## 4DEACH and 4DENDEACH + +#### Syntax: `` `` + +The `` comment allows iterating a specified item over all values of the *expression*. The item is set to a *variable* whose type depends on the *expression* type. + +The `` comment can iterate through three expression types: + +- [collections](#--4deach-item-in-collection--): loop through each element of the collection, +- [entity selections](#--4deach-entity-in-entityselection--): loop through each entity, +- [objects](#--4deach-property-in-object--): loop through each object property. + +The number of iterations is evaluated at startup and will not change during the processing. L'ajout ou la suppression d'éléments pendant la boucle est donc déconseillé car il pourra en résulter une redondance ou un manque d'itérations. + + +### `` + +This syntax iterates on each *item* of the *collection*. The code portion located between `` and `` is repeated for each collection element. + +The *item* parameter is a variable of the same type as the collection elements. + +The collection must contain only **elements of the same type**, otherwise an error is returned as soon as the *item* variable is assigned the first mismatched value type. + +The number of loops is based on the number of elements of the collection. At each iteration, the *item* variable is automatically filled with the matching element of the collection. Vous devez tenir compte des points suivants : + +- The *item* variable gets the same type as the first collection element. Si un seul élément de la collection n'est pas du même type que la variable, une erreur est générée et la boucle s'arrête. +- If the *item* variable is of the object type or collection type (i.e. Si un seul élément de la collection n'est pas du même type que la variable, une erreur est générée et la boucle s'arrête. +- If the collection contains elements with a Null value, an error is generated if the *item* variable type does not support Null values (such as longint variables). + +#### Example with a collection of scalar values + +*getNames* returns a collection of strings. The method has been declared as "[available through 4D tags and URLs](WebServer/allowProject.md)". + + +```html + + + + + + + + + +
        Name
        +``` + +#### Example with a collection of objects + +*getSalesPersons* returns a collection of objects. + +```html + + + + + + + + + + + +
        IDFirstnameLastname
        +``` + + +### `` + +This syntax iterates on each *entity* of the *entitySelection*. The code portion located between `` and `` is repeated for each entity of the entity selection. + +The *entity* parameter is an object variable of the entity selection class. + + +The number of loops is based on the number of entities of the entity selection. At each iteration, the *entity* object variable is automatically filled with the matching entity of the entity selection. + +#### Example with a html table + +```html + + + + + + + + + + + +
        IDNameTotal purchase
        +``` + +#### Example with `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +This syntax iterates on each *property* of the *object*. The code portion located between `` and `` is repeated for each property of the object. + +The *property* parameter is a text variable automatically filled with the name of the currently processed property. + +The properties of the object are processed according to their creation order. Pendant la boucle, il est possible d'ajouter ou de supprimer des propriétés dans l'objet, sans pour autant modifier le nombre de boucles qui reste basé sur le nombre de propriétés initial de l'objet. + +#### Example with the properties of an object + +*getGamers* is a project method that returns an object like ("Mary"; 10; "Ann"; 20; "John"; 40) to figure gamer scores. + +```html + + + + + + + + + + + +
        GamersScores
        +``` + + + + +## 4DEVAL + +#### Syntax: `` +#### Alternative syntax: `$4DEVAL(expression)` + +The `4DEVAL` tag allows you to assess a 4D variable or expression. Like the [`4DHTML`](#4dhtml) tag, `4DEVAL` does not escape HTML characters when returning text. However, unlike `4DHTML` or [`4DTEXT`](#4dtext), `4DEVAL` allows you to execute any valid 4D statement, including assignments and expressions that do not return any value. + +For example, you can execute: + +``` + $input:="" //assignment + $input:=$input+"" //calculation + PROCESS 4D TAGS($input;$output) + //$output = "43" +``` + +In case of an error during interpretation, the text inserted will be in the form: `: ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DHTML + +#### Syntax: `` +#### Alternative syntax: `$4DHTML(expression)` + + +The value of the 4D variable `vtSiteName` will be inserted in the HTML page when it is sent. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +For example, here are the processing results of the 4D text variable myvar with the available tags: + +| myvar Value | Tags | Résultat | +| -------------------- | ---------------------------- | ------------------- | +| `myvar:=""` | `` | `<B>` | +| `myvar:=""` | `` | `` | + +In case of an interpretation error, the inserted text will be ` : ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DIF, 4DELSE, 4DELSEIF and 4DENDIF + +#### Syntax: `` {`...`} {``} `` + +Used with the `` (optional), `` (optional) and `` comments, the `` comment offers the possibility to execute portions of code conditionally. + +The *expression* parameter can contain any valid 4D expression returning a Boolean value. It must be indicated within parenthesis and comply with the 4D syntax rules. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. Likewise, if there are not as many `` as ``, the text "``: 4DENDIF expected" is inserted instead of the contents located between `` and ``. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. The `` ... `` blocks can be nested in several levels. Like in 4D, each `` must match a ``. + +Using the ` ` tag, you can test an unlimited number of conditions. Only the code that follows the first condition evaluated as `True` is executed. If no conditions are true, no statement is executed (if there is no final ` `). You can use atag after the last. If all the conditions are false, the statements following theare executed. + +The two following codes are equivalent. + +Code using 4DELSE only: + +```html + + /* Condition1 is true*/ + + + /* Condition2 is true*/ + + + /* Condition3 is true */ + + /*None of the conditions are true*/ + + + +``` + +Similar code using the `4DELSEIF` tag: + +``` + + /* Condition1 is true*/ + + /* Condition2 is true*/ + + /* Condition3 is true */ + + /* None of the conditions are true*/ + +``` + +This example of code inserted in a static HTML page displays a different label according the `vname#""` expression result: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +This example inserts different pages depending on which user is connected: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### Syntax: `` + +This tag is mainly designed to include an HTML page (indicated by the *path* parameter) in another HTML page. By default, only the body of the specified HTML page, i.e. the contents found within the `` and `` tags, is included (the tags themselves are not included). This lets you avoid conflicts related to meta tags present in the headers. + +However, if the HTML page specified does not contain ```` tags, the entire page is included. It is up to you to verify the consistency of the meta tags. + +The `` comment is very useful for tests (``) or loops (``). It is very convenient to include banners according to a criteria or randomly. When including, regardless of the file name extension, 4D analyzes the called page and then inserts the contents (modified or not) in the page originating the `4DINCLUDE` call. + +An included page with the `` comment is loaded in the Web server cache the same way as pages called via a URL or sent with the `WEB SEND FILE` command. + +In *path*, put the path leading to the document to include. Warning: In the case of a `4DINCLUDE` call, the path is relative to the document being analyzed, that is, the "parent" document. Use the slash character (/) as a folder separator and the two dots (..) to go up one level (HTML syntax). When you use the `4DINCLUDE` tag with the `PROCESS 4D TAGS` command, the default folder is the project folder. + +> You can modify the default folder used by the `4DINCLUDE` tag in the current page, using the `` tag (see below). + +The number of `` within a page is unlimited. However, the `` calls can be made only at one level. This means that, for example, you cannot insert `` in the *mydoc2.html* body page, which is called by `` inserted in *mydoc1.html*. Furthermore, 4D verifies that inclusions are not recursive. + +In case of error, the inserted text is "`` :The document cannot be opened". + +Voici quelques exemples : + +```html + + + +``` + + + +## 4DLOOP and 4DENDLOOP + +#### Syntax: `` `` + +This comment allows repetition of a portion of code as long as the condition is fulfilled. The portion is delimited by `` and ``. + +The `` ... `` blocks can be nested. Like in 4D, each `` must match a ``. + +There are five kinds of conditions: + +### `` + +This syntax makes a loop for each record from the table current selection in the current process. The code portion located between the two comments is repeated for each current selection record. + +> When the `4DLOOP` tag is used with a table, records are loaded in "Read only" mode. + +The following code: + +```html + +
        + +``` + +... could be expressed in 4D language in the following way: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +This syntax makes a loop for each array item. The array current item is increased when each code portion is repeated. + +> This syntax cannot be used with two dimension arrays. In this case, it is better to combine a method with nested loops. + +The following code example: + +```html + +
        + +``` + +... could be expressed in 4D language in the following way: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +This syntax makes a loop as long as the method returns `True`. The method takes a Long Integer parameter type. First it is called with the value 0 to allow an initialization stage (if necessary); it is then called with the values 1 ,then 2, then 3 and so on, as long as it returns `True`. + +For security reasons, within a Web process, the `On Web Authentication` database method can be called once just before the initialization stage (method execution with 0 as parameter). If the authentication is OK, the initialization stage will proceed. + +`C_BOOLEAN($0)` and `C_LONGINT($1)` MUST be declared within the method for compilation purposes. + +The following code example: + +```html + +
        + +``` + +... could be expressed in 4D language in the following way: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +The `my_method` method can be as follows: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +With this syntax, the `4DLOOP` tag makes a loop as long as the *expression* returns `True`. The expression can be any valid Boolean expression and must contain a variable part to be evaluated in each loop to avoid infinite loops. + +For example, the following code: + +```html + + + + + +``` + +...produces the following result: + +``` +0 +1 +2 +3 +``` + +### `` + +In this case, the `4DLOOP` tag works like it does with an array: it makes a loop for each element of the array referenced by the pointer. The current array element is increased each time the portion of code is repeated. + +This syntax is useful when you pass an array pointer as a parameter to the `PROCESS 4D TAGS` command. + +Exemple : + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +In case of an interpretation error, the text "``: description" is inserted instead of the contents located between `` and ``. + +The following messages can be displayed: + +- Unexpected expression type (standard error); +- Incorrect table name (error on the table name); +- An array was expected (the variable is not an array or is a two dimension array); +- The method does not exist; +- Syntax error (when the method is executing); +- Access error (you do not have the appropriate access privileges to access the table or the method). +- 4DENDLOOP expected (the `` number does not match the ``). + +## 4DSCRIPT/ + +#### Syntax: `` + +The `4DSCRIPT` tag allows you to execute 4D methods when processing the template. The presence of the `` tag as an HTML comment launches the execution of the `MyMethod` method with the `Param` parameter as a string in `$1`. + +> If the tag is called in the context of a Web process, when the page is loaded, 4D calls the `On Web Authentication` database method (if it exists). If it returns True, 4D executes the method. + +The method must return text in `$0`. If the string starts with the code character 1, it is considered as HTML (the same principle is true for the `4DHTML` tag). + +For example, let’s say that you insert the following comment `“Today isâ€` into a template Web page. When loading the page, 4D calls the `On Web Authentication` database method, then calls the `MYMETH` method and passes the string “/MYPARAM†as the parameter `$1`. The method returns text in $0 (for example "12/31/21"); the expression "`Today is` comments as you want in a template. + + + +## 4DTEXT + +#### Syntax: `` +#### Alternative syntax: `$4DTEXT(expression)` + + +The tag `` allows you to insert a reference to a 4D variable or expression returning a value. For example, if you write (in an HTML page): + +```html +

        Welcome to !

        +``` + +Just like the `4DTEXT` tag, this tag lets you assess a 4D variable or expression that returns a value, and insert it as an HTML expression. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +You can also insert 4D expressions. You can for example directly insert the contents of a field (``), an array element (``) or a method returning a value (``). The expression conversion follows the same rules as the variable ones. Moreover, the expression must comply with 4D syntax rules. + +> For security reasons, it is recommended to use this tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + +In case of an evaluation error, the inserted text will appear as `: ## error # error code`. + +- You must use process variables. +- You can display the content of a picture field. However, it is not possible to display the content of a picture array item. +- It is possible to display the contents of an object field by means of a 4D formula. For example, you can write ``. +- You will usually work with Text variables. However, you can also use BLOB variables. You just need to generate BLOBs in `Text without length` mode. + + + + + + +## Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL + +Several existing 4D transformation tags can be expressed using a $-based syntax: + +#### $4dtag (expression) +can be used instead of +#### `` + +This alternative syntax is available only for tags used to return processed values: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(Other tags, such as 4DIF or 4DSCRIPT, must be written with the regular syntax). + +Par exemple, vous pouvez écrire : + +```html +$4DEVAL(UserName) +``` + +instead of: + +```html + +``` + +The main advantage of this syntax is that it allows you to write XML-compliant templates. Some 4D developers need to create and validate XML-based templates using standard XML parser tools. Since the "<" character is invalid in an XML attribute value, it was not possible to use the "``" syntax of 4D tags without breaking the document syntax. On the other hand, escaping the "<" character will prevent 4D from interpreting the tags correctly. + +For example, the following code would cause an XML parsing error because of the first "<" character in the attribute value: + +```xml + +``` + +Using the $ syntax, the following code is validated by the parser: + +```xml + +``` + +Note that `$4dtag` and `<--#4dtag -->` are not strictly equivalent: unlike `<--#4dtag -->`, `$4dtag` processing does not interpret 4D tags [recursively](#recursive-processing). `$` tags are always evaluated once and the result is considered as plain text. + +The reason for this difference is to prevent malicious code injection. As [explained below](#prevention-of-malicious-code-insertion), it is strongly recommended to use `4DTEXT` tags instead of `4DHTML` tags when handling user text to protect against unwanted reinterpretation of tags: with `4DTEXT`, special characters such as "<" are escaped, thus any 4D tags using the `` syntax will lose their particular meaning. However, since `4DTEXT` does not escape the `$` symbol, we decided to break support for recursion in order to prevent malicious injection using the `$4dtag (expression)` syntax. + +The following examples show the result of processing depending on the syntax and tag used: + +```4d + // example 1 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //4D will quit! +``` +```4d + // example 2 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: " +``` +```4d + // example 3 + myName:="$4DEVAL(QUIT 4D)" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: $4DEVAL(QUIT 4D)" +``` + +Note that the `$4dtag` syntax supports matching pairs of enclosed quotes or parenthesis. For example, suppose that you need to evaluate the following complex (unrealistic) string: + +``` +String(1) + "\"(hello)\"" +``` + +Vous pouvez écrire : + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + -->output is 1"(hello)" +``` + + diff --git a/website/translated_docs/fr/Users/handling_users_groups.md b/website/translated_docs/fr/Users/handling_users_groups.md index 55b5c7d4cb736d..9d140231b35df4 100644 --- a/website/translated_docs/fr/Users/handling_users_groups.md +++ b/website/translated_docs/fr/Users/handling_users_groups.md @@ -3,39 +3,40 @@ id: editing title: Gestion des groupes et utilisateurs 4D --- -## Super_Utilisateur et Administrateur 4D fournit à certains utilisateurs des privilèges d’accès standard ainsi que des prérogatives spécifiques. Une fois qu’un système d’utilisateurs et de groupes a été créé, ces privilèges standard prennent effet. -L’utilisateur le plus puissant est le **Super_Utilisateur**. Aucune partie de la base de données n’est inaccessible au Super_Utilisateur. Le Super_Utilisateur peut : -- accéder à tous les serveurs de la base sans restrictions, -- créer des utilisateurs et des groupes, -- affecter des privilèges d’accès aux groupes, -- utiliser le mode Développement. En monoposte, les droits d'accès du Super_Utilisateur sont toujours utilisés. En mode client/serveur, l'affectation d'un mot de passe au Super_Utilisateur affiche la boîte de dialogue de connexion. L'accès au mode Développement est en lecture seule. +## Super_Utilisateur et Administrateur + +L’utilisateur le plus puissant est le **Super_Utilisateur**. Aucune partie de l'application n’est inaccessible au Super_Utilisateur. Le Super_Utilisateur peut : +- accéder à tous les serveurs de l'application sans restrictions, +- créer des utilisateurs et des groupes, +- affecter des privilèges d’accès aux groupes, +- utiliser le mode Développement. En monoposte, les droits d'accès du Super_Utilisateur sont toujours utilisés. En mode client/serveur, l'affectation d'un mot de passe au Super_Utilisateur affiche la boîte de dialogue de connexion. L'accès au mode Développement est en lecture seule. Après le Super_Utilisateur, le second plus puissant utilisateur est **l’Administrateur**, qui est en général responsable de la gestion du système d’accès et des fonctionnalités d'administration. L'Administrateur peut : - -- créer des utilisateurs et des groupes, -- accéder au moniteur et à la fenêtre d'administration de 4D Server -- accéder à la fenêtre CSM pour gérer les sauvegardes, restitutions ou le serveur. +- créer des utilisateurs et des groupes, +- accéder au moniteur et à la fenêtre d'administration de 4D Server +- accéder à la fenêtre CSM pour gérer les sauvegardes, restitutions ou le serveur. L'Administrateur ne peut pas : - - modifier l'utilisateur Super_Utilisateur -- par défaut, accéder à des objets protégés de la base. En particulier, l'Administrateur ne peut pas accéder au mode Développement s'il est restreint. L'Administrateur doit faire partie d'un ou plusieurs groupes pour avoir des privilèges d’accès dans la base. Il est placé dans tous les nouveaux groupes, mais vous pouvez cependant l'exclure de ces groupes. +- par défaut, accéder à des objets protégés de l'application. En particulier, l'Administrateur ne peut pas accéder au mode Développement s'il est restreint. L'Administrateur doit faire partie d'un ou plusieurs groupes pour avoir des privilèges d’accès dans l'application. Il est placé dans tous les nouveaux groupes, mais vous pouvez cependant l'exclure de ces groupes. -Par défaut, le Super_Utilisateur et l'Administrateur se trouvent dans toutes les bases. Dans la [boîte de dialogue de gestion des utilisateurs](#users-and-groups-editor), les icônes du Super_Utilisateur et de l’Administrateur ont des icônes respectivement rouge et verte : +Par défaut, le Super_Utilisateur et l'Administrateur se trouvent dans toutes les applications. Dans la [boîte de dialogue de gestion des utilisateurs](#users-and-groups-editor), les icônes du Super_Utilisateur et de l’Administrateur ont des icônes respectivement rouge et verte : -- Icône du Super_Utilisateur : ![](assets/en/Users/IconDesigner.png) -- Icône de l'Administrateur : ![](assets/en/Users/IconAdmin.png) +- Icône du Super_Utilisateur : ![](assets/en/Users/iconDesigner.png) +- Icône de l'Administrateur : ![](assets/en/Users/iconAdmin.png) Vous pouvez renommer les utilisateurs Super_Utilisateur et Administrateur. Dans le langage, Super_Utilisateur porte toujours l'identifiant 1 et l'Administrateur l'identifiant 2. Le Super_Utilisateur et l’Administrateur peuvent créer chacun 16 000 groupes et 16 000 utilisateurs. + + ## Éditeur d'utilisateurs L'éditeur des utilisateurs se trouve dans la boîte à outils de 4D. @@ -48,7 +49,7 @@ Vous utilisez l’éditeur d’utilisateurs pour créer des comptes utilisateurs Pour ajouter un utilisateur depuis la boite à outils : -1. Sélectionnez **Boîte à outils > Utilisateurs** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D. 4D affiche la fenêtre d’édition des utilisateurs. +1. Sélectionnez **Boîte à outils > Utilisateurs** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D. 4D affiche la fenêtre d’édition des utilisateurs. La liste des utilisateurs affiche tous les utilisateurs, y compris [le Super_Utilisateur et l'l’Administrateur](#designer-and-administrator). @@ -58,11 +59,11 @@ La liste des utilisateurs affiche tous les utilisateurs, y compris [le Super_Uti 4D ajoute un nouvel utilisateur à la liste, nommé par défaut "Nouvel utilisateurN". -3. Saisissez le nom du nouvel utilisateur. Ce nom sera utilisé par l’utilisateur pour ouvrir la base. Vous pouvez renommer un utilisateur à tout moment en utilisant la commande **Renommer** du menu contextuel, ou en utilisant la combinaison Alt+clic (Windows) ou Option+clic (macOS) ou en cliquant deux fois sur un nom. +3. Saisissez le nom du nouvel utilisateur. Ce nom sera utilisé par l’utilisateur pour ouvrir l'application. Vous pouvez renommer un utilisateur à tout moment en utilisant la commande **Renommer** du menu contextuel, ou en utilisant la combinaison Alt+clic (Windows) ou Option+clic (macOS) ou en cliquant deux fois sur un nom. 4. Pour saisir le mot de passe de l’utilisateur, cliquez sur le bouton **Modifier...** dans la zone des propriétés de l’utilisateur et saisissez deux fois le mot de passe dans la boite de dialogue. Vous pouvez saisir jusqu’à 15 caractères alphanumériques. L’éditeur de mots de passe tient compte de la casse des caractères (majuscules ou minuscules). -> Les utilisateurs peuvent modifier leur mot de passe à tout moment en fonction des options de la page Sécurité des propriétés de la base, ou à l'aide de la commande `CHANGE PASSWORD`. +> Les utilisateurs peuvent modifier leur mot de passe à tout moment en fonction des options de la page Sécurité des propriétés de la structure, ou à l'aide de la commande `CHANGE PASSWORD`. 5. Définissez le ou les groupe(s) d’appartenance de l’utilisateur à l’aide du tableau “Membre des groupesâ€. Vous pouvez ajouter l’utilisateur sélectionné à un groupe en cochant l’option correspondante dans la colonne Membre. @@ -70,6 +71,7 @@ L’appartenance des utilisateurs aux groupes peut également être définie par ### Supprimer un utilisateur + Pour supprimer un utilisateur, sélectionnez-le puis cliquez sur le bouton de suppression ou utilisez la commande **Supprimer** du menu contextuel. ![](assets/en/Users/MinussNew.png) Les utilisateurs supprimés n'apparaissent plus dans la liste de l'éditeur d'utilisateurs. A noter que les numéros des utilisateurs supprimés peuvent être réattribués lors de la création de nouveaux comptes. @@ -78,7 +80,8 @@ Les utilisateurs supprimés n'apparaissent plus dans la liste de l'éditeur d'ut - Le champ **Type d’utilisateur** : le champ Type d’utilisateur contient "Super_Utilisateur", "Administrateur", ou (pour tous les autres utilisateurs) "Utilisateur". -- **Méthodes de démarrage** : Nom d'une méthode associée qui sera automatiquement associée lorsque l'utilisateur ouvre la base (facultatif). Cette méthode peut être utilisée par exemple pour charger les préférences utilisateur. +- **Méthodes de démarrage** : Nom d'une méthode associée qui sera automatiquement associée lorsque l'utilisateur ouvre l'application (facultatif). Cette méthode peut être utilisée par exemple pour charger les préférences utilisateur. + ## Éditeur de groupes @@ -92,11 +95,11 @@ Attention, une fois créé, un groupe ne peut pas être supprimé. Si vous souha Pour créer un groupe : -1. Sélectionnez **Boîte à outils > Groupes** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D puis cliquez sur le bouton **Groupes**. 4D affiche la fenêtre d’édition des groupes. La liste des groupes affiche tous les groupes de la base. +1. Sélectionnez **Boîte à outils > Groupes** dans le menu **Développement** ou cliquez sur le bouton **Boîte outils** de la barre d’outils de 4D puis cliquez sur le bouton **Groupes**. 4D affiche la fenêtre d’édition des groupes. La liste des groupes affiche tous les groupes du projet d'application. 2. Cliquez sur le bouton ![](assets/en/Users/PlussNew.png) situé en-dessous de la liste des groupes. - OU - Faites un clic droit sur la liste de groupes et sélectionnez la commande **Ajouter** ou **Dupliquer** dans le menu contextuel. + OU + Faites un clic droit sur la liste de groupes et sélectionnez la commande **Ajouter** ou **Dupliquer** dans le menu contextuel. > La commande Dupliquer permet de créer rapidement plusieurs groupes ayant des caractéristiques communes. @@ -104,6 +107,7 @@ Pour créer un groupe : 3. Saisissez le nom du nouveau groupe. Le nom du groupe peut avoir une longueur maximale de 15 caractères. Vous pouvez renommer un groupe à tout moment en utilisant la commande **Renommer** du menu contextuel, ou en utilisant la combinaison Alt+clic (Windows) ou Option+clic (macOS) ou en cliquant deux fois sur un nom. + ### Placer des utilisateurs ou des groupes dans des groupes Vous pouvez placer tout utilisateur ou tout groupe dans un groupe et vous pouvez aussi le placer dans plusieurs groupes. Il n’est pas obligatoire de placer un utilisateur dans un groupe. @@ -120,11 +124,11 @@ Pour supprimer un utilisateur ou un groupe d’un autre groupe, il suffit de dé ### Affecter un groupe à un plug-in ou à un serveur -Vous pouvez affecter un groupe d’accès à tout plug-in 4D installé dans votre base de données. Les plug-ins comprennent tous les plug-ins de 4D ainsi que tout plug-in développés par une société tierce. +Vous pouvez affecter un groupe d’accès à tout plug-in 4D installé dans votre projet. Les plug-ins comprennent tous les plug-ins de 4D ainsi que tout plug-in développés par une société tierce. Répartir les accès aux plug-ins vous permet de contrôler l’utilisation des licences dont vous disposez pour ces plug-ins. Tout utilisateur n’appartenant pas au groupe d’accès à un plug-in ne pourra pas charger ce plug-in. -> Used licenses remain attached to 4D user accounts in the group for the whole 4D session. +> Les licences utilisées demeurent associées aux comptes utilisateurs 4D dans le groupe, durant toute la session 4D. La zone “Plug-ins†de la page Groupes de la boîte à outils liste tous les plug-ins chargés par l’application 4D. Pour affecter un groupe à un plug-in, il suffit de cocher l’option correspondante. @@ -132,9 +136,10 @@ La zone “Plug-ins†de la page Groupes de la boîte à outils liste tous les Les lignes **4D Client Web Server** et **4D Client SOAP Server** permettent contrôler la possibilité de publication Web et SOAP (Web Services) de chaque 4D en mode distant. En effet, ces licences sont considérées par 4D Server comme des licences de plug-ins. Ainsi, comme pour un plug-in, vous pouvez restreindre le droit d’utiliser ces licences à un groupe d’utilisateurs spécifique. + ### Un schéma d’accès hiérarchique -Le meilleur moyen d’assurer la sécurité de votre base de données et de proposer différents niveaux d’accès aux utilisateurs est d’utiliser un schéma hiérarchique des accès. Les utilisateurs peuvent être affectés à différents groupes et les groupes peuvent être hiérarchisés pour créer des niveaux de droits d’accès. Cette section décrit différentes approches de ce thème. +Le meilleur moyen d’assurer la sécurité de votre application et de proposer différents niveaux d’accès aux utilisateurs est d’utiliser un schéma hiérarchique des accès. Les utilisateurs peuvent être affectés à différents groupes et les groupes peuvent être hiérarchisés pour créer des niveaux de droits d’accès. Cette section décrit différentes approches de ce thème. Dans cet exemple, un utilisateur appartient à l’un des trois groupes définis suivant son niveau de responsabilité. Les utilisateurs du groupe Comptabilité sont responsables de la saisie de données. Les utilisateurs du groupe Dir. finance sont responsables de la mise à jour des données, comme la mise à jour d’enregistrements ou la suppression d’enregistrements obsolètes. Les utilisateurs du groupe Direction générale sont responsables de l’analyse de données, ce qui inclut la réalisation de recherches et l’impression d’états. @@ -148,4 +153,4 @@ Les groupes sont hiérarchisés afin que les privilèges soient correctement aff Vous pouvez ensuite décider des privilèges affectés à chaque groupe suivant le niveau de responsabilité des utilisateurs qu’il contient. -Un tel système hiérarchique rend aisée l’affectation d’un utilisateur à un groupe. Il suffit de placer chaque utilisateur dans un groupe et d’utiliser la hiérarchie des groupes pour déterminer les accès. \ No newline at end of file +Un tel système hiérarchique rend aisée l’affectation d’un utilisateur à un groupe. Il suffit de placer chaque utilisateur dans un groupe et d’utiliser la hiérarchie des groupes pour déterminer les accès. diff --git a/website/translated_docs/fr/Users/overview.md b/website/translated_docs/fr/Users/overview.md index e028e398fb460f..dd63fe1de9dc83 100644 --- a/website/translated_docs/fr/Users/overview.md +++ b/website/translated_docs/fr/Users/overview.md @@ -3,35 +3,42 @@ id: overview title: Aperçu --- -Si différentes personnes utilisent votre base de données, vous pouvez souhaiter contrôler ses accès ou proposer différentes fonctionnalités ou interfaces aux utilisateurs connectés. Il peut être également essentiel de protéger des données importantes. Vous pouvez fournir cette protection en affectant des mots de passe aux utilisateurs et en créant des groupes qui possèdent des niveaux d’accès correspondant à des degrés de confidentialité différents. +Si plusieurs personnes utilisent une application, ce qui est souvent le cas dans une architecture client-serveur ou d'interfaces Web, vous devez contrôler ses accès ou proposer différentes fonctionnalités selon les utilisateurs connectés. Il peut être également essentiel de protéger des données importantes. You can provide this security by assigning passwords to users and creating access groups that have different levels of access to information in the application or to application operations. > Consultez le document [4D Security guide](https://blog.4d.com/4d-security-guide/) pour une vue d'ensemble des fonctions de sécurité de 4D. + + + + ## Définition des accès aux groupes -Le système de gestion des accès de 4D est basé sur les notions d’utilisateurs et de groupes. Vous créez des noms d’utilisateurs et vous leur affectez un mot de passe, vous placez les utilisateurs dans des groupes, et vous assignez à chaque groupe les privilèges d’accès appropriés aux objets de la base. +Le système de gestion des accès de 4D est basé sur les notions d’utilisateurs et de groupes. Créez des noms d’utilisateurs et affectez-leur un mot de passe, placez les utilisateurs dans des groupes, et assignez à chaque groupe les privilèges d’accès appropriés aux objets de l'application. -Les groupes peuvent alors se voir affecter des privilèges d'accès à des parties spécifiques ou des fonctionnalités de la base (accès au mode Développement, serveur HTTP, serveur SQL, etc.), ou à toute partie personnalisée. +Les groupes peuvent alors se voir affecter des privilèges d'accès à des parties spécifiques ou des fonctionnalités de l'application (accès au mode Développement, serveur HTTP, serveur SQL, etc.), ou à toute partie personnalisée. L'exemple suivant présente les droits d'accès à l'explorateur d'exécution et au Développement assignés au groupe "Devs" : ![](assets/en/Users/Access1.png) + + ## Activer le contrôle des accès Le contrôle effectif des accès par mots de passe de 4D est activé par **l’affectation d’un mot de passe au Super_Utilisateur**. -Tant que le Super_Utilisateur n’a pas de mot de passe, 4D permet à tout utilisateur d’accéder à toutes les parties de la base, même si vous avez défini des utilisateurs et des groupes (à l'ouverture de la base, aucune identification n'est requise). +Tant que le Super_Utilisateur n’a pas de mot de passe, 4D permet à tout utilisateur d’accéder à toutes les parties de l'application, même si vous avez défini des utilisateurs et des groupes (à l'ouverture de l'application, aucune identification n'est requise). N'importe quelle partie de l'application peut être ouverte. -Lorsqu’un mot de passe est affecté au Super_Utilisateur, tous les privilèges d’accès que vous avez affectés prennent effet. Pour pouvoir utiliser la base, les utilisateurs distants doivent alors saisir un mot de passe. +Lorsqu’un mot de passe est affecté au Super_Utilisateur, tous les privilèges d’accès que vous avez affectés prennent effet. Pour pouvoir utiliser l'application, les utilisateurs distants doivent alors saisir un mot de passe. Pour désactiver le système de restriction d’accès, il suffit de supprimer (mettre à blanc) le mot de passe du Super_Utilisateur. + ## Utilisateurs et groupes dans l'architecture projet -Dans les bases projet (fichiers .4DProject ou .4dz), les utilisateurs et groupes 4D peuvent être configurés à la fois en monoposte ou en client-serveur. Toutefois, le contrôle d'accès ne prend effet que dans les bases 4D Server. Le tableau suivant liste les principales fonctionnalités des utilisateurs et groupes ainsi que leur disponibilité : +Dans les applications projet (fichiers .4DProject ou .4dz), les utilisateurs et groupes 4D peuvent être configurés à la fois en monoposte ou en client-serveur. Toutefois, le contrôle d'accès ne prend effet qu'avec 4D Server. Le tableau suivant liste les principales fonctionnalités des utilisateurs et groupes ainsi que leur disponibilité : -| | 4D Developer (monoposte) | 4D Server | +| | 4D (monoposte) | 4D Server | | ------------------------------------------------------------------------------- | ------------------------------------------------------- | --------- | | Ajouter/modifier des utilisateurs et groupes | oui | oui | | Affecter l'accès des utilisateurs/groupes aux serveurs | oui | oui | @@ -39,21 +46,27 @@ Dans les bases projet (fichiers .4DProject ou .4dz), les utilisateurs et groupes | Contrôle d'accès une fois qu'un mot de passe a été affecté au Super_Utilisateur | non (tous les accès sont accordés au Super_Utilisateur) | oui | + + + ## Éditeur de boîte à outils Les éditeurs des utilisateurs et groupes sont placés dans la boîte à outils de 4D. Ces éditeurs peuvent être utilisés pour la création d'utilisateurs et de groupes, l'affectation de mots de passe aux utilisateurs, le placement d'utilisateurs dans des groupes, etc. ![](assets/en/Users/editor.png) -> L'éditeur d'utilisateurs et de groupes peut s'afficher à l'exécution à l'aide de la commande [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html). The whole users and groups configuration can also be edited during application execution using 4D language commands of the [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.en.html) theme. +> L'éditeur d'utilisateurs et de groupes peut s'afficher à l'exécution à l'aide de la commande [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html). L'éditeur d'utilisateurs et de groupes peut s'afficher à l'exécution à l'aide de la commande [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.en.html). + + ## Fichier directory.json -Les utilisateurs, les groupes ainsi que leurs droits d'accès sont stockés dans un fichier spécifique de la base nommé **directory.json**. +Les utilisateurs, les groupes ainsi que leurs droits d'accès sont stockés dans un fichier spécifique du projet nommé **directory.json**. Ce fichier peut être stocké dans les emplacements suivants : -- dans le dossier de propriétés de la base utilisateur, c'est-à-dire le dossier "Settings", au même niveau que le dossier "Project". Ces propriétés sont utilisées par défaut dans la base. -- dans le dossier de propriétés des données, c'est-à-dire dans le dossier "Settings" du dossier "Data". Si un fichier directory.json se trouve à cet emplacement, il est prioritaire par rapport au fichier du dossier Settings de la base utilisateur. Cette fonctionnalité vous permet de définir des configurations Utilisateurs et Groupes personnalisées/locales. La configuration personnalisée ne sera pas affectée par des mises à niveau de la base. +- dans le dossier de propriétés utilisateur, c'est-à-dire le dossier "Settings", au même niveau que le dossier "Project". Ces propriétés sont utilisées par défaut dans l'application. +- dans le dossier de propriétés des données, c'est-à-dire dans le dossier "Settings" du dossier "Data". Si un fichier **directory.json** se trouve à cet emplacement, il est prioritaire par rapport au fichier du dossier Settings utilisateur. Cette fonctionnalité vous permet de définir des configurations Utilisateurs et Groupes personnalisées/locales. La configuration personnalisée ne sera pas affectée par des mises à niveau de l'application. + +> Si la gestion des groupes et utilisateurs est inactive, le fichier **directory.json** n'est pas créé. -> Si la gestion des groupes et utilisateurs est inactive, le fichier directory.json n'est pas créé. \ No newline at end of file diff --git a/website/translated_docs/fr/WebServer/allowProject.md b/website/translated_docs/fr/WebServer/allowProject.md new file mode 100644 index 00000000000000..ff3ac1b891cec4 --- /dev/null +++ b/website/translated_docs/fr/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: Allowing project methods +--- + + +Les balises 4D telles que `4DEVAL`, `4DTEXT`, `4DHTML`, etc. ainsi que l'[`URL /4DACTION`](httpRequests.md#/4daction) vous permettent de déclencher l'exécution de toute méthode projet d'un projet 4D publié sur le Web. Par exemple, la requête *http://www.server.com/4DACTION/login* entraîne l'exécution de la méthode projet ***login***, si elle existe. + +Ce mécanisme présente donc un risque de sécurité pour l'application, notamment si un internaute déclenche intentionnellement (ou non) une méthode non destinée à être exécutée via le web. Vous pouvez éviter ce risque comme suit : + +* Filtrez les méthodes appelées via les URL à l'aide de la méthode base [`On Web Authentication`](authentication.md#on-web-authentication). Inconvénients : si la base de données comprend un grand nombre de méthodes, ce système peut être difficile à gérer. + +* Utilisez l'option **Available through 4D tags and URLs (4DACTION...)** de la boîte de dialogue Propriétés de la méthode : + +![](assets/en/WebServer/methodProperties.png) + +This option is used to individually designate each project method that can be called using the `4DACTION` special URL, or the `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF` or `4DLOOP` tags. When it is not checked, the project method concerned cannot be directly executed through an HTTP request. Conversely, it can be executed using other types of calls (formulas, other methods, etc.). + +This option is unchecked by default. Methods that can be executed through `4DACTION` or specific tags must be specifically indicated. + +In the Explorer, Project methods with this property are given a specific icon: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/website/translated_docs/fr/WebServer/authentication.md b/website/translated_docs/fr/WebServer/authentication.md new file mode 100644 index 00000000000000..79a2a03c87fa62 --- /dev/null +++ b/website/translated_docs/fr/WebServer/authentication.md @@ -0,0 +1,199 @@ +--- +id: authentication +title: Authentification +--- + +Authenticating users is necessary when you want to provide specific access rights to web users. Authentication designates the way the information concerning the user credentials (usually name and password) are collected and processed. + + +## Modes d’authentification + +The 4D web server proposes three authentication modes, that you can select in the **Web**/**Options (I)** page of the Settings dialog box: + +![](assets/en/WebServer/authentication.png) + +> Using a **custom** authentication is recommended. + +### Aperçu + +The operation of the 4D web server's access system is summarized in the following diagram: + +![](assets/en/WebServer/serverAccess.png) + +> Requests starting with `rest/` are directly handled by the [REST server](REST/configuration.md). + + +### Custom (default) + +Basically in this mode, it's up to the developer to define how to authenticate users. 4D only evaluates HTTP requests [that require an authentication](#method-calls). + +This authentication mode is the most flexible because it allows you to: + +- either, delegate the user authentication to a third-party application (e.g. a social network, SSO); +- or, provide an interface to the user (e.g. a web form) so that they can create their account in your customer database; then, you can authenticate users with any custom algorithm (see [this example](sessions.md#example) from the "User sessions" chapter). The important thing is that you never store the password in clear, using such code: + +```4d +//... user account creation +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +See also [this example](gettingStarted.md#authenticating-users) from the "Getting started" chapter. + +If no custom authentication is provided, 4D calls the [`On Web Authentication`](#on-web-authentication) database method (if it exists). In addition to $1 and $2, only the IP addresses of the browser and the server ($3 and $4) are provided, the user name and password ($5 and $6) are empty. The method must return **True** in $0 if the user is successfully authenticated, then the resquested resource is served, or **False** in $0 if the authentication failed. + +> **Warning:** If the `On Web Authentication` database method does not exist, connections are automatically accepted (test mode). + + +### Basic protocol + +When a user connects to the server, a standard dialog box appears on their browser in order for them to enter their user name and password. + +> The name and password entered by the user are sent unencrypted in the HTTP request header. This mode typically requires HTTPS to provide confidentiality. + +Entered values are then evaluated: + +- If the **Include 4D passwords** option is checked, user credentials will be first evaluated against the [internal 4D users table](Users/overview.md). + - If the user name sent by the browser exists in the table of 4D users and the password is correct, the connection is accepted. If the password is incorrect, the connection is refused. + - If the user name does not exist in the table of 4D users, the [`On Web Authentication`](#on-web-authentication) database method is called. If the `On Web Authentication` database method does not exist, connections are rejected. + +- If the **Include 4D passwords** option is not checked, user credentials are sent to the [`On Web Authentication`](#on-web-authentication) database method along with the other connection parameters (IP address and port, URL...) so that you can process them. If the `On Web Authentication` database method does not exist, connections are rejected. +> With the 4D Client web server, keep in mind that all the sites published by the 4D Client machines will share the same table of users. Validation of users/passwords is carried out by the 4D Server application. + +### DIGEST protocol + +This mode provides a greater level of security since the authentication information is processed by a one-way process called hashing which makes their contents impossible to decipher. + +As in BASIC mode, users must enter their name and password when they connect. The [`On Web Authentication`](#on-web-authentication) database method is then called. When the DIGEST mode is activated, the $6 parameter (password) is always returned empty. In fact, when using this mode, this information does not pass by the network as clear text (unencrypted). It is therefore imperative in this case to evaluate connection requests using the `WEB Validate digest` command. +> You must restart the web server in order for the changes made to these parameters to be taken into account. + + + +## On Web Authentication + +The `On Web Authentication` database method is in charge of managing web server engine access. It is called by 4D or 4D Server when a dynamic HTTP request is received. + +### Database method calls + +The `On Web Authentication` database method is automatically called when a request or processing requires the execution of some 4D code (except for REST calls). It is also called when the web server receives an invalid static URL (for example, if the static page requested does not exist). + +The `On Web Authentication` database method is therefore called: + +- when the web server receives a URL requesting a resource that does not exist +- when the web server receives a URL beginning with `4DACTION/`, `4DCGI/`... +- when the web server receives a root access URL and no home page has been set in the Settings or by means of the `WEB SET HOME PAGE` command +- when the web server processes a tag executing code (e.g `4DSCRIPT`) in a semi-dynamic page. + +The `On Web Authentication` database method is NOT called: + +- when the web server receives a URL requesting a valid static page. +- when the web server reveives a URL beginning with `rest/` and the REST server is launched (in this case, the authentication is handled through the [`On REST Authentication` database method](REST/configuration.md#using-the-on-rest-authentication-database-method) or [Structure settings](REST/configuration.md#using-the-structure-settings)). + + +### Syntaxe + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +| Paramètres | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------- | +| $1 | Texte | <- | Variable URL | +| $2 | Texte | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Texte | <- | IP address of the web client (browser) | +| $4 | Texte | <- | IP address of the server | +| $5 | Texte | <- | User name | +| $6 | Texte | <- | Password | +| $0 | Booléen | -> | True = request accepted, False = request rejected | + +You must declare these parameters as follows: + +```4d +//On Web Authentication database method + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` +> All the `On Web Authentication` database method's parameters are not necessarily filled in. The information received by the database method depends on the selected [authentication mode](#authentication-mode)). + + +#### $1 - URL + +The first parameter (`$1`) is the URL received by the server, from which the host address has been removed. + +Let’s take the example of an Intranet connection. Suppose that the IP address of your 4D Web Server machine is 123.45.67.89. The following table shows the values of $1 depending on the URL entered in the Web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.45.67.89 | / | +| http://123.45.67.89 | / | +| 123.45.67.89/Customers | /Customers | +| http://123.45.67.89/Customers/Add | /Customers/Add | +| 123.45.67.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +#### $2 - Header and Body of the HTTP request + +The second parameter (`$2`) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Authentication` database method as it is. Its contents will vary depending on the nature of the web browser which is attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + +#### $3 - Web client IP address + +The `$3` parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + + +#### $4 - Server IP address + +The `$4` parameter receives the IP address used to call the web server. 4D allows for multi-homing, which allows you to exploit machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.md#ip-address-to-listen). + + +#### $5 and $6 - User Name and Password + +The `$5` and `$6` parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser. This dialog box appears for each connection, if [basic](#basic-protocol) or [digest](#digest-protocol) authentication is selected. +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + +#### $0 parameter + +The `On Web Authentication` database method returns a boolean in $0: + +* If $0 is True, the connection is accepted. + +* If $0 is False, the connection is refused. + +The `On Web Connection` database method is only executed if the connection has been accepted by `On Web Authentication`. +> **WARNING**
        If no value is set to $0 or if $0 is not defined in the `On Web Authentication` database method, the connection is considered as accepted and the `On Web Connection` database method is executed. +> * Do not call any interface elements in the `On Web Authentication` database method (`ALERT`, `DIALOG`, etc.) because otherwise its execution will be interrupted and the connection refused. The same thing will happen if an error occurs during its processing. + + +### Exemple + +Example of the `On Web Authentication` database method in [DIGEST mode](#digest-protocol): + +```4d + // On Web Authentication Database Method + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // User is found + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // User does not exist + End if +``` diff --git a/website/translated_docs/fr/WebServer/errorPages.md b/website/translated_docs/fr/WebServer/errorPages.md new file mode 100644 index 00000000000000..eb6bc6927a96b4 --- /dev/null +++ b/website/translated_docs/fr/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: Custom HTTP Error Pages +--- + +The 4D Web Server allows you to customize HTTP error pages sent to clients, based on the status code of the server response. Error pages refer to: + +* status codes starting with 4 (client errors), for example 404 + +* status codes starting with 5 (server errors), for example 501. + +For a full description of HTTP error status codes, you can refer to the [List of HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (Wikipedia). + + +## Replacing default pages + +To replace default 4D Web Server error pages with your own pages you just need to: + +* put custom HTML pages at the first level of the application's web folder, + +* name the custom pages "{statusCode}.html" (for example, "404.html"). + +You can define one error page per status code and/or a generic error page for a range of errors, named "{number}xx.html". For example, you can create "4xx.html" for generic client errors. The 4D Web Server will first look for a {statusCode}.html page then, if it does not exist, a generic page. + +For example, when an HTTP response returns a status code 404: + +1. 4D Web Server tries to send a "404.html" page located in the application's web folder. + +2. If it is not found, 4D Web Server tries to send a "4xx.html" page located in the application's web folder. + +3. If not found, 4D Web Server then uses its default error page. + +## Exemple + +If you define the following custom pages in your web folder: + +![](assets/en/WebServer/errorPage.png) + +* the "403.html" or "404.html" pages will be served when 403 or 404 HTTP responses are returned respectively, + +* the "4xx.html" page will be served for any other 4xx error status (400, 401, etc.), + +* the "5xx.html" page will be served for any 5xx error status. + diff --git a/website/translated_docs/fr/WebServer/gettingStarted.md b/website/translated_docs/fr/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..b094afd127742e --- /dev/null +++ b/website/translated_docs/fr/WebServer/gettingStarted.md @@ -0,0 +1,285 @@ +--- +id: gettingStarted +title: Prise en main +--- + +This "Getting started" section is geared at first-time users who want an overall overview on how to go from zero to a 4D website that handles data from the database. Let's start! + + +## Hello World Example + +Let's start by making the web server send "Hello World" to the browser. The most simple way to do this is to create a project, start the web server and write a small code that returns a text in the `On Web Connection` database method. + +### Starting the web server + +To start the 4D web server: + +1. Launch your 4D application and create a new, empty 4D project. +2. In the **Run** menu, select **Start Web Server**. + +That's all! The web server is started (you can see that the menu item has become **Stop Web Server**). It is now ready to handle requests. To check it, we'll display the default home page. + +### Displaying the default home page + +The 4D web server creates automatically a default `index.html` page in the default `WebFolder` root folder, created at the same level as the Project folder. + +1. Launch a web browser and connect to the web server IP address (default http port for 4D web server is 80). If the web server and the browser are on the same machine, you can select **Test Web Server** in the **Run** menu. + +The default home page is displayed: + +![](assets/en/WebServer/defaultHomePage.png) + +### Displaying Hello World + +1. Open the Explorer, display the Database Methods list and double-click on `On Web Connection`. + +2. Enter the following code: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // Error 404 for example +End case +``` + +The [`On Web Connection`](httpRequests.md#on-web-connection) database method is called for incoming requests and receives the target URL in the `$1` parameter. This very simple code only sends the text to the browser. + +3. In your browser, enter the following URL: + +``` +http://localhost/hello +``` + +The web server handles the request and returns: + +![](assets/en/WebServer/hello.png) + + +## Getting data from the database + +Now we'll see how simple it is to get data from the database. First, we will create a table and fill it with some data. + +Create a basic database with, for example, a single table containing some records: + +![](assets/en/WebServer/hello2.png) ![](assets/en/WebServer/hello3.png) + +### Displaying data in a page + +The most simple solution to display data is to call a [template page](templates.md) containing tags. + +1. Using any text editor, create a file containing the following lines: + +```html + + + + +
        + + + +``` + +2. Name the file "friends.shtml" and save it in the **WebFolder** of your project. +3. In your browser, enter the following URL: + +``` +http://localhost/friends.shtml +``` + +`.shtml` pages are automatically processed by the web server. Your page filled with data is returned: + +![](assets/en/WebServer/hello3bis.png) + +### REST request + +If we not only want to *display* data, but to *use* it, we can use ORDA and the REST server. Thanks to the [ORDA concept](ORDA/overview.md), the `Friends` table is automatically mapped to a dataclass and is available through [REST](REST/gettingStarted.md). + + +1. We will use the REST server to access data: go the "Settings" dialog box, select the "Web/Rest resource" page, and check the **Expose as REST server** option. + +![](assets/en/WebServer/hello5.png) + +2. In your browser, enter the following URL: + +``` +http://localhost/rest/$catalog +``` + +The web server returns the results in JSON: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +You get the catalog, i.e. the list of exposed dataclasses and attributes in the datastore. + +You can also get any data. + +3. Enter the following URL: + +``` +http://localhost/rest/Friends +``` + +The server returns the entities, i.e. the data, from the Friends dataclass: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +This very simple example shows how the web server interacts transparently with the [REST server](REST/gettingStarted.md) to return any requested data, provided it is exposed. In your web interfaces, you can easily bind the javascript or html code with returned data. See the built-in [Web Data Explorer](Admin/dataExplorer.md) to have an example of sophisticated web interface bound to dataclasses. + + + + +## Login and session + +In the above sections, we get free access to the application from web requests. However, in the world of web applications, data access security is the first priority. When connecting to the 4D web server, users must be authentified and their navigation controlled. + +### Creating a table of users + +The most simple and secured way to log a user on the 4D web server is based upon the following scenario: + +- Users are stored in a dedicated, unexposed table (named *WebUsers* for example) +- The *WebUsers* table could be [encrypted](MSC/encrypt.md) and stores the user login and a hash of their password. + +1. Create a table with some fields, for example: + +![](assets/en/WebServer/helloUsers.png) + +2. Write and execute the following code to create a user: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// the password would be entered by the user +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### Authentification des utilisateurs + +> To be secure from end to end, it is necessary that the whole connection is established via [https](webServerConfig.md#enable-https). + +1. Open the Explorer and create a project method named "login". + +3. Write the following code: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// get values sent in the header of the request +WEB GET VARIABLES($anames; $avalues) + +// look for header login fields +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +//look for a user with the entered name in the users table +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) //a user was found + //check the password + If (Verify password hash($password; $user.password)) + //password ok, fill the session + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + //You can use the user session to store any information + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. Display the method properties by clicking on the **[i]** button in the code editor, check the `4D tags and URLs (4DACTION...)` option and click **OK**. + +![](assets/en/WebServer/hello0.png) + + +4. In your browser, enter the following URL: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> Using such URLs is not recommended, it is only presented here to keep the example simple. A more realistic login request must be handled through a web form and a POST request. See [this page](sessions.md#example) for an example of form POST. + +Then you will be logged for the session: + +![](assets/en/WebServer/login1.png) + +Wrong credentials would be rejected: + +![](assets/en/WebServer/login2.png) + +Once a user is logged, you can handle the associated session using the `WEB Get Current Session ID` method. See the [User sessions](sessions.md) page. + diff --git a/website/translated_docs/fr/WebServer/httpRequests.md b/website/translated_docs/fr/WebServer/httpRequests.md new file mode 100644 index 00000000000000..9a4adb151a6442 --- /dev/null +++ b/website/translated_docs/fr/WebServer/httpRequests.md @@ -0,0 +1,353 @@ +--- +id: httpRequests +title: Processing HTTP requests +--- + +The 4D web server provides several features to handle HTTP requests: + +- the `On Web Connection` database method, a router for your web application, +- the `/4DACTION` URL to call server-side code +- `WEB GET VARIABLES` to get values from HTML objects sent to the server +- other commands such as `WEB GET HTTP BODY`, `WEB GET HTTP HEADER`, or `WEB GET BODY PART` allow to customize the request processing, including cookies. +- the *COMPILER_WEB* project method, to declare your variables. + + +## On Web Connection + +The `On Web Connection` database method can be used as the entry point for the 4D Web server. + +### Database method calls + +The `On Web Connection` database method is automatically called when the server reveives any URL that is not a path to an existing page on the server. The database method is called with the URL. + +For example, the URL "*a/b/c*" will call the database method, but "*a/b/c.html*" will not call the database method if the page "c.html" exists in the "a/b" subfolder of the [WebFolder](webServerConfig.md#root-folder). + +> The request should have previously been accepted by the [`On Web Authentication`](authentication.md#on-web-authentication) database method (if it exists) and the web server must be launched. + +### Syntaxe + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| -------------------------------------------- | +| $1 | Texte | <- | Variable URL | +| $2 | Texte | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Texte | <- | IP address of the web client (browser) | +| $4 | Texte | <- | IP address of the server | +| $5 | Texte | <- | User name | +| $6 | Texte | <- | Password | + + +You must declare these parameters as shown below: + +```4d +//On Web Connection database method + + C_TEXT($1;$2;$3;$4;$5;$6) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Connection database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> Calling a 4D command that displays an interface element (`DIALOG`, `ALERT`, etc.) is not allowed and ends the method processing. + + +### $1 - URL extra data + +The first parameter ($1) is the URL entered by users in the address area of their web browser, without the host address. + +Let’s use an intranet connection as an example. Suppose that the IP address of your 4D Web Server machine is 123.4.567.89. The following table shows the values of $1 depending on the URL entered in the web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.4.567.89 | / | +| http://123.4.567.89 | / | +| 123.4.567.89/Customers | /Customers | +| http://123.4.567.89/Customers/Add | /Customers/Add | +| 123.4.567.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +Note that you are free to use this parameter at your convenience. 4D simply ignores the value passed beyond the host part of the URL. For example, you can establish a convention where the value "*/Customers/Add*" means “go directly to add a new record in the `[Customers]` table.†By supplying the web users with a list of possible values and/or default bookmarks, you can provide shortcuts to different parts of your application. This way, web users can quickly access resources of your website without going through the entire navigation path each time they make a new connection. + + +### $2 - Header and Body of the HTTP request + +The second parameter ($2) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Connection` database method "as is". Its contents will vary depending on the nature of the web browser attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + + +### $3 - Web client IP address + +The $3 parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + +### $4 - Server IP address + +The $4 parameter receives the IP address requested by the 4D Web Server. 4D allows for multi-homing, which allows you to use machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.html#ip-address-to-listen). + +### $5 and $6 - User Name and Password + +The $5 and $6 parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser, if applicable (see the [authentication page](authentication.md)). +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + + + + +## /4DACTION + +***/4DACTION/***MethodName***
        **/4DACTION/******MethodName/Param* + +| Paramètres | Type | | Description | +| ---------- | ----- |:--:| -------------------------------------------- | +| MethodName | Texte | -> | Name of the 4D project method to be executed | +| Param | Texte | -> | Text parameter to pass to the project method | + +**Usage:** URL or Form action. + +This URL allows you to call the *MethodName* 4D project method with an optional *Param* text parameter. The method will receive this parameter in *$1*. + +- The 4D project method must have been [allowed for web requests](allowProject.md): the “Available through 4D tags and URLs (4DACTION...)†attribute value must have been checked in the properties of the method. If the attribute is not checked, the web request is rejected. +- When 4D receives a `/4DACTION/MethodName/Param` request, the `On Web Authentication` database method (if it exists) is called. + +`4DACTION/` can be associated with a URL in a static Web page: + +```html +Do Something +``` + +The `MyMethod` project method should generally return a "reply" (sending of an HTML page using `WEB SEND FILE` or `WEB SEND TEXT`, etc.). Be sure to make the processing as short as possible in order not to block the browser. + +> A method called by `/4DACTION` must not call interface elements (`DIALOG`, `ALERT`, etc.). + +#### Exemple + +This example describes the association of the `/4DACTION` URL with an HTML picture object in order to dynamically display a picture in the page. You insert the following instructions in a static HTML page: + +```html + +``` + +The `getPhoto` method is as follows: + +```4d +C_TEXT($1) // This parameter must always be declared +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + //find the picture in the Images folder within the Resources folder +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) //put the picture in the picture variable +PICTURE TO BLOB($PictVar;$BLOB;".png") //convert the picture to ".png" format +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION to post forms + +The 4D Web server also allows you to use “posted†forms, which are static HTML pages that send data to the Web server, and to easily retrieve all the values. The POST type must be associated to them and the form’s action must imperatively start with /4DACTION/MethodName. + +A form can be submitted through two methods (both can be used with 4D): +- POST, usually used to send data to the Web server, +- GET, usually used to request data from the Web server. + +> When the Web server receives a posted form, it calls the `On Web Authentication` database method (if it exists). + +In the called method, you must call the `WEB GET VARIABLES` command in order to [retrieve the names and values](#getting-values-from-the-requests) of all the fields included in an HTML page submitted to the server. + +Example to define the action of a form: + +```html +
        +``` + +#### Exemple + +In a Web application, we would like for the browsers to be able to search among the records by using a static HTML page. This page is called “search.htmâ€. The application contains other static pages that allow you to, for example, display the search result (“results.htmâ€). The POST type has been associated to the page, as well as the `/4DACTION/SEARCH` action. + +Here is the HTML code that corresponds to this page: + +```html + +
        +Whole word
        + +
        +``` + +During data entry, type “ABCD†in the data entry area, check the "Whole word" option and validate it by clicking the **Search** button. In the request sent to the Web server: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D calls the `On Web Authentication` database method (if it exists), then the `processForm` project method is called, which is as follows: + +```4d + C_TEXT($1) //mandatory for compiled mode + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) //we retrieve all the variables of the form + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) //If the option has not been checked + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
        " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") //Send the list to the results.htm form + //which contains a reference to the variable vLIST, + //for example + //... +End if +``` + + + + +## Getting values from HTTP requests + +4D's Web server lets you recover data sent through POST or GET requests, using Web forms or URLs. + +When the Web server receives a request with data in the header or in the URL, 4D can retrieve the values of any HTML objects it contains. This principle can be implemented in the case of a Web form, sent for example using `WEB SEND FILE` or `WEB SEND BLOB`, where the user enters or modifies values, then clicks on the validation button. + +In this case, 4D can retrieve the values of the HTML objects found in the request using the `WEB GET VARIABLES` command. The `WEB GET VARIABLES` command retrieves the values as text. + +Consider the following HTML page source code: + +```html + + + Welcome + + + +
        +

        Welcome to Spiders United

        +

        Please enter your name: +

        +

        + + +

        +

        + + + +

        +
        + + +``` + +When 4D sends the page to a Web Browser, it looks like this: + +![](assets/en/WebServer/spiders.png) + +The main features of this page are: + +- It includes three **Submit** buttons: `vsbLogOn`, `vsbRegister` and `vsbInformation`. +- When you click **Log On**, the submission of the form is first processed by the JavaScript function `LogOn`. If no name is entered, the form is not even submitted to 4D, and a JavaScript alert is displayed. +- The form has a POST 4D method as well as a Submit script (*GetBrowserInformation*) that copies the browser properties to the four hidden objects whose names starts with *vtNav_App*. It also includes the `vtUserName` object. + +Let’s examine the 4D method `WWW_STD_FORM_POST` that is called when the user clicks on one of the buttons on the HTML form. + +```4d + // Retrieval of value of variables + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // The Log On button was clicked + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // The WWW POST EVENT method saves the information in a database table + Else + + $0:=WWW Register + // The WWW Register method lets a new Web user register + End if + + // The Register button was clicked + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // The Information button was clicked + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +The features of this method are: + +- The values of the variables *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, and *vtNav_userAgent* (bound to the HTML objects having the same names) are retrieved using the `WEB GET VARIABLES` command from HTML objects created by the *GetBrowserInformation* JavaScript script. +- Out of the *vsbLogOn*, *vsbRegister* and *vsbInformation* variables bound to the three Submit buttons, only the one corresponding to the button that was clicked will be retrieved by the `WEB GET VARIABLES` command. When the submit is performed by one of these buttons, the browser returns the value of the clicked button to 4D. This tells you which button was clicked. + +Keep in main that with HTML, all objects are text objects. If you use a SELECT object, it is the value of the highlighted element in the object that is returned in the `WEB GET VARIABLES` command, and not the position of the element in the array as in 4D. `WEB GET VARIABLES` always returns values of the Text type. + + +## Other Web Server Commands + +The 4D web server provides several low-level web commands allowing you to develop custom processing of requests: + +- the `WEB GET HTTP BODY` command returns the body as raw text, allowing any parsing you may need +- the `WEB GET HTTP HEADER` command return the headers of the request. It is useful to handle custom cookies, for example (along with the `WEB SET HTTP HEADER` command). +- the `WEB GET BODY PART` and `WEB Get body part count` commands to parse the body part of a multi-part request and retrieve text values, but also files posted, using BLOBs. + +These commands are summarized in the following graphic: + +![](assets/en/WebServer/httpCommands.png) + +The 4D web server supports files uploaded in chunked transfer encoding from any Web client. Chunked transfer encoding is a data transfer mechanism specified in HTTP/1.1. It allows data to be transferred in a series of "chunks" (parts) without knowing the final data size. The 4D Web Server also supports chunked transfer encoding from the server to Web clients (using `WEB SEND RAW DATA`). + +## COMPILER_WEB Project Method + +The COMPILER\_WEB method, if it exists, is systematically called when the HTTP server receives a dynamic request and calls the 4D engine. This is the case, for example, when the 4D Web server receives a posted form or a URL to process in [`On Web Connection`](#on-web-connection). This method is intended to contain typing and/or variable initialization directives used during Web exchanges. It is used by the compiler when the application is compiled. The COMPILER\_WEB method is common to all the Web forms. By default, the COMPILER_WEB method does not exist. You must explicitly create it. + +> The COMPILER_WEB project method is also called, if it exists, for each SOAP request accepted. + + diff --git a/website/translated_docs/fr/WebServer/preemptiveWeb.md b/website/translated_docs/fr/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..c30ae72c436ec3 --- /dev/null +++ b/website/translated_docs/fr/WebServer/preemptiveWeb.md @@ -0,0 +1,95 @@ +--- +id: preemptiveWeb +title: Using preemptive web processes +--- + + +The 4D Web Server allows you to take full advantage of multi-core computers by using preemptive web processes in your compiled applications. You can configure your web-related code, including 4D tags and web database methods, to run simultaneously on as many cores as possible. + +For in-depth information on preemptive process in 4D, please refer to the *Preemptive 4D processes* section in the *Language Reference*. + +## Availability of preemptive mode for web processes + +The use of preemptive mode for web processes is only available in the following contexts: + +* use of 4D Server or 4D local mode (4D in remote mode does not support preemptive mode) + +* use of a compiled database + +* **Use preemptive processes** database setting checked (see below) + +* all web-related database methods and project methods are confirmed thread-safe by 4D Compiler + +If any requirement is missing, the web server will use cooperative processes. + +## Enabling the preemptive mode for the web server + +To enable the preemptive mode for your application's web server code, you must check the **Use preemptive processes** option on the "Web/Options (I)" page of the Database Settings dialog box: + +![](assets/en/WebServer/preemptive.png) + +When this option is checked, the 4D compiler will automatically evaluate the thread-safety property of each piece of web-related code (see below) and return errors in case of incompatibility. +> This option does not apply to web service processes (server or client). Preemptive mode is supported by web service processes at method level: you just have to select "Can be run in preemptive processes" property for published SOAP server methods (see *Publishing a Web Service with 4D*) or proxy client methods (see *Subscribing to a Web Service in 4D*) and make sure they are confirmed thread-safe by the compiler. + +## Writing thread-safe web server code + +All 4D code executed by the web server must be thread-safe if you want your web processes to be run in preemptive mode. When the **Use preemptive processes** option is checked in the Settings dialog box, the following parts of the application will be automatically evaluated by the 4D compiler: + +* All web-related database methods: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* The `compiler_web` project method (regardless of its actual "Execution mode" property); + +* Basically any code processed by the `PROCESS 4D TAGS` command in the web context, for example through .shtml pages. + +* Any project method with the "Available through 4D tags and URLS (`4DACTION`, etc.)" attribute + +* Triggers for tables with "Expose as REST resource" attribute + +* Project methods available through REST ("REST Server" property checked) + +For each of these methods and code parts, the compiler will check if the thread-safety rules are respected, and will return errors in case of issues. For more information about thread-safety rules, please refer to the *Writing a thread-safe method* paragraph in the *Processes* chapter. + +## Thread-safety of 4D web code + +Most of the web-related 4D commands and functions, database methods and URLs are thread-safe and can be used in preemptive mode. + +### 4D commands and database methods + +All 4D web-related commands are thread-safe, *i.e.*: + +* all commands from the *Web Server* theme, +* all commands from the *HTTP Client* theme. + +The web-related database methods are thread-safe and can be used in preemptive mode (see below): `On Web Authentication`, `On Web Connection`, `On REST Authentication`...). + +Of course, the code executed by these methods must also be thread-safe. + + +### Web Server URLs + +The following 4D Web Server URLs are thread-safe and can be used in preemptive mode: + +* *4daction/* (the called project method must also be thread-safe) +* *4dcgi/* (the called database methods must also be thread-safe) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (generated by `PROCESS 4D TAGS` for web request on picture fields) +* *4dimg/* (generated by `PROCESS 4D TAGS` for web request on picture variables) + +### Preemptive web process icon + +Both the Runtime Explorer and the 4D Server administration window display a specific icon for preemptive web processes: + +| Process type | Icône | +| --------------------- | ---------------------------------------- | +| Preemptive web method | ![](assets/en/WebServer/processIcon.png) | + + diff --git a/website/translated_docs/fr/WebServer/sessions.md b/website/translated_docs/fr/WebServer/sessions.md new file mode 100644 index 00000000000000..a83aa57dbb77ec --- /dev/null +++ b/website/translated_docs/fr/WebServer/sessions.md @@ -0,0 +1,172 @@ +--- +id: sessions +title: User sessions +--- + +The 4D web server provides built-in features for managing **user sessions**. Creating and maintaining user sessions allows you to control and improve the user experience on your web application. When user sessions are enabled, web clients can reuse the same server context from one request to another. + +Web server user sessions allow to: + +- handle multiple requests simultaneously from the same web client through an unlimited number of preemptive processes (web server sessions are **scalable**), +- share data between the processes of a web client, +- associate privileges to user sessions, +- handle access through a `Session` object and the [Session API](API/SessionClass.md). + +> **Note:** The current implementation is only the first step of an upcoming comprehensive feature allowing developers to manage hierarchical user permissions through sessions in the whole web application. + + +## Enabling sessions + +The session management feature can be enabled and disabled on your 4D web server. There are different ways to enable session management: + +- Using the **Scalable sessions** option on the "Web/Options (I)" page of the Settings (permanent setting): ![alt-text](assets/en/WebServer/settingsSession.png) + +This option is selected by default in new projects. It can however be disabled by selecting the **No sessions** option, in which case the web session features are disabled (no `Session` object is available). + +- Using the [`.scalableSession`](API/WebServerClass.md#scalablesession) property of the Web Server object (to pass in the *settings* parameter of the [`.start()`](API/WebServerClass.md#start) function). In this case, this setting overrides the option defined in the Settings dialog box for the Web Server object (it is not stored on disk). + +> The `WEB SET OPTION` command can also set the session mode for the main Web server. + +In any cases, the setting is local to the machine; so it can be different on the 4D Server Web server and the Web servers of remote 4D machines. + +> **Compatibility**: A **Legacy sessions** option is available in projects created with a 4D version prior to 4D v18 R6 (for more information, please refer to the [doc.4d.com](https://doc.4d.com) web site). + + +## Session implementation + +When [sessions are enabled](#enabling-sessions), automatic mechanisms are implemented, based upon a private cookie set by 4D itself: "4DSID_*AppName*", where *AppName* is the name of the application project. This cookie references the current web session for the application. + +> The cookie name can be get using the [`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) property. + +1. In each web client request, the Web server checks for the presence and the value of the private "4DSID_*AppName*" cookie. + +2. If the cookie has a value, 4D looks for the session that created this cookie among the existing sessions; if this session is found, it is reused for the call. + +2. If the client request does not correspond to an already opened session: + +- a new session with a private "4DSID_*AppName*" cookie is created on the web server +- a new Guest `Session` object is created and is dedicated to the scalable web session. + +The current `Session` object can then be accessed through the [`Session`](API/SessionClass.md#session) command in the code of any web processes. + +![alt-text](assets/en/WebServer/schemaSession.png) + +> Web processes usually do not end, they are recycled in a pool for efficiency. When a process finishes executing a request, it is put back in the pool and made available for the next request. Since a web process can be reused by any session, [process variables](Concepts/variables.md#process-variables) must be cleared by your code at the end of its execution (using [`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/en/page89.html) for example). This cleanup is necessary for any process related information, such as a reference to an opened file. This is the reason why **it is recommended** to use the [Session](API/SessionClass.md) object when you want to keep session related information. + + +## Sharing information + +Each `Session` object provides a [`.storage`](API/SessionClass.md#storage) property which is a [shared object](Concepts/shared.md). This property allows you to share information between all processes handled by the session. + +## Session lifetime + +A scalable web session is closed when: + +- the web server is stopped, +- the timeout of the session cookie has been reached. + +The lifespan of an inactive cookie is 60 minutes by default, which means that the web server will automatically close inactive sessions after 60 minutes. + +This timeout can be set using the [`.idleTimeout`](API/SessionClass.md#idletimeout) property of the `Session` object (the timeout cannot be less than 60 minutes). + +When a scalable web session is closed, if the [`Session`](API/SessionClass.md#session) command is called afterwards: + +- the `Session` object does not contain privileges (it is a Guest session) +- the [`.storage`](API/SessionClass.md#storage) property is empty +- a new session cookie is associated to the session + + +## Privileges + +Privileges can be associated to sessions. On the web server, you can provide specific access or features depending on the privileges of the session. + +You can assign privileges usign the [`.setPrivileges()`](API/SessionClass.md#setprivileges) function. In your code, you can check the session's privileges to allow or deny access using the [`.hasPrivilege()`](API/SessionClass.md#hasprivilege) function. By default, new sessions do not have any privilege: they are **guest** sessions ([`.isGuest()`](API/SessionClass.md#isguest) function returns true). + +> In the current implementation (v18 R6), only the "WebAdmin" privilege is available. + +Exemple : + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page +End if +``` + + +## Exemple + +In a CRM application, each salesperson manages their own client portfolio. The datastore contains at least two linked dataclasses: Customers and SalesPersons (a salesperson has several customers). + +![alt-text](assets/en/WebServer/exampleSession.png) + +We want a salesperson to authenticate, open a session on the web server, and have the top 3 customers be loaded in the session. + + +1. We run this URL to open a session: + +``` +http://localhost:8044/authenticate.shtml +``` + +> In a production environment, it it necessary to use a [HTTPS connection](API/WebServerClass.md#httpsenabled) to avoid any uncrypted information to circulate on the network. + + +2. The `authenticate.shtml` page is a form containing *userId* et *password* input fields and sending a 4DACTION POST action: + +```html + + + +
        + UserId:
        + Password:
        + +
        + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. The authenticate project method looks for the *userID* person and validates the password against the hashed value already stored in the *SalesPersons* table: + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` \ No newline at end of file diff --git a/website/translated_docs/fr/WebServer/templates.md b/website/translated_docs/fr/WebServer/templates.md new file mode 100644 index 00000000000000..39ad7b2fcc8189 --- /dev/null +++ b/website/translated_docs/fr/WebServer/templates.md @@ -0,0 +1,96 @@ +--- +id: templates +title: Template pages +--- + +4D's Web server allows you to use HTML template pages containing tags, i.e. a mix of static HTML code and 4D references added by means of [transformation tags](Tags/tags.md) such as 4DTEXT, 4DIF, or 4DINCLUDE. These tags are usually inserted as HTML type comments (``) into the HTML source code. + +When these pages are sent by the HTTP server, they are parsed and the tags they contain are executed and replaced with the resulting data. The pages received by the browsers are thus a combination of static elements and values coming from 4D processing. + +For example, if you write in an HTML page: + +```html +

        Welcome to !

        +``` + +The value of the 4D variable *vtSiteName* will be inserted in the HTML page. + + +## Tags for templates + +The following 4D tags are available: + +- 4DTEXT, to insert 4D variables and expressions as text, +- 4DHTML, to insert HTML code, +- 4DEVAL, to evaluate any 4D expression, +- 4DSCRIPT, to execute a 4D method, +- 4DINCLUDE, to include a page within another one, +- 4DBASE, to modify the default folder used by the 4DINCLUDE tag, +- 4DCODE, to insert 4D code, +- 4DIF, 4DELSE, 4DELSEIF and 4DENDIF, to insert conditions in the HTML code, +- 4DLOOP and 4DENDLOOP, to make loops in the HTML code, +- 4DEACH and 4DENDEACH, to loop in collections, entity selections, or object properties. + +These tags are described in the [Transformation Tags](Tags/tags.md) page. + +It is possible to mix tags. For example, the following HTML code is allowed: + +```html + +... + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + + (loop on the current selection) + (If [TABLE]ValNum>10) + (subpage insertion) + (Else) + Value:
        + (Field display) + + (End for) + + +``` + + +## Tag parsing + +For optimization reasons, the parsing of the HTML source code is not carried out by the 4D Web server when HTML pages are called using simple URLs that are suffixed with “.HTML†or “.HTMâ€. + +Parsing of the contents of template pages sent by 4D web server takes place when `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB) or `WEB SEND TEXT` commands are called, as well as when sending pages called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to "force" the parsing of HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, `http://www.server.com/dir/page.shtm`). An example of the use of this type of page is given in the description of the `WEB GET STATISTICS` command. XML pages (.xml, .xsl) are also supported and always parsed by 4D. + +You can also carry out parsing outside of the Web context when you use the `PROCESS 4D TAGS` command. + +Internally, the parser works with UTF-16 strings, but the data to parse may have been encoded differently. When tags contain text (for example `4DHTML`), 4D converts the data when necessary depending on its origin and the information available (charset). Below are the cases where 4D parses the tags contained in the HTML pages, as well as any conversions carried out: + +| Action / Command | Content analysis of the sent pages | Support of $ syntax(*) | Character set used for parsing tags | +| ---------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pages called via URLs | X, except for pages with “.htm†or “.html†extensions | X, except for pages with “.htm†or “.html†extensions | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND FILE` | X | - | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND TEXT` | X | - | No conversion necessary | +| `WEB SEND BLOB` | X, if BLOB is of the “text/html†type | - | Use of charset set in the "Content-Type" header of the response. Otherwise, use of default character set for the HTTP server | +| Inclusion by the `` tag | X | X | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `PROCESS 4D TAGS` | X | X | Text data: no conversion. BLOB data: automatic conversion from the Mac-Roman character set for compatibility | + +(*) The alternative $-based syntax is available for 4DHTML, 4DTEXT and 4DEVAL tags. + +## Accessing 4D methods via the Web + +Executing a 4D method with `4DEACH`, `4DELSEIF`, `4DEVAL`, `4DHTML`, `4DIF`, `4DLOOP`, `4DSCRIPT`, or `4DTEXT` from a web request is subject to the [Available through 4D tags and URLs (4DACTION...)](allowProject.md) attribute value defined in the properties of the method. If the attribute is not checked for the method, it can not be called from a web request. + + +## Prevention of malicious code insertion + +4D tags accept different types of data as parameters: text, variables, methods, command names, etc. When this data is provided by your own code, there is no risk of malicious code insertion since you control the input. However, your database code often works with data that was, at one time or another, introduced through an external source (user input, import, etc.). + +In this case, it is advisable to **not use** tags such as `4DEVAL` or `4DSCRIPT`, which evaluate parameters, directly with this sort of data. + +In addition, according to the [principle of recursion](Tags/tags.md#recursive-processing), malicious code may itself include transformation tags. In this case, it is imperative to use the `4DTEXT` tag. Imagine, for example, a Web form field named "Name", where users must enter their name. This name is then displayed using a `` tag in the page. If text of the "\" type is inserted instead of the name, interpreting this tag will cause the application to be exited. To avoid this risk, you can just use the `4DTEXT` tag systematically in this case. Since this tag escapes the special HTML characters, any malicious recursive code that may have been inserted will not be reinterpreted. To refer to the previous example, the "Name" field will contain, in this case, "`<!--#4DEVAL QUIT 4D-->`" which will not be transformed. diff --git a/website/translated_docs/fr/WebServer/webServer.md b/website/translated_docs/fr/WebServer/webServer.md new file mode 100644 index 00000000000000..562cf80e77ceeb --- /dev/null +++ b/website/translated_docs/fr/WebServer/webServer.md @@ -0,0 +1,62 @@ +--- +id: webServer +title: Aperçu +--- + +4D in local mode, 4D in remote mode and 4D Server include a web server engine (aka http server) that enables you to design and publish powerful web applications that can make the most of your 4D databases. + +## Easy Monitoring + +You can start or stop publication of the web application at any time. To do so, you just need to select a menu command or execute a single line of code. + +Monitoring the 4D web server is easy and can be done using the 4D Server administration window or through [special URLs](webServerAdmin.md#administration-urls). + +## Ready-to-use + +The 4D web server automatically creates a default root folder and a default home page for an instantaneous availability. + +## Security + +Data security is present at every stage of the 4D web server implementations. Security levels are scalable and default settings usually select the most secure options. The 4D web server security is based upon the following elements: + +* Extended support of the [**TLS Protocol (HTTPS)**](Admin/tls.md), + +* **Authentication**: flexible and customizable [authentication features](authentication.md) based upon built-it settings as well as fallback database methods ([`On Web Authentication`](authentication.md#on-web-authentication) for the web server and [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) for the REST server), + +* **Control of exposed contents**: only elements that you expose explicitely can be available from direct web or REST requests. You must declare: + - [Project methods](templates.md#allowing-project-methods) exposed through HTTP requests + - [ORDA functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) exposed through REST requests + - [Tables and fields](REST/configuration.md#exposing-tables-and-fields) that you don't want to be available to REST requests. + +* **Sandboxing** through the definition of a [HTML Root](webServerConfig.md#root-folder) folder by default, + +* **Control of server resource usage** (e.g. [maximum concurrent web processes](webServerConfig.html#maximum-concurrent-web-processes) option). +> Consultez le document [4D Security guide](https://blog.4d.com/4d-security-guide/) pour une vue d'ensemble des fonctions de sécurité de 4D. + + +## User Sessions + +The 4D web server includes complete automatic features for easily managing [web sessions](sessions.md) (user sessions) based on cookies. + + +## Gateway to REST Requests + +The 4D web server allows accessing data stored in your 4D applications through REST requests. REST requests provide direct access to any database operation such as adding, reading, editing, ordering, or searching data. + +REST requests are detailed in the [REST server](REST/gettingStarted.md) section. + +## Extended settings + +The 4D web server configuration is defined through a comprehensive set of application-level settings that can also be customized for the session using the `webServer` object properties or the `WEB SET OPTION` command. + +## Templates and URLs + +The 4D web server supports access to data stored in your 4D applications through template pages and specific URLs. + +- Template pages contain [special tags](templates.md) that initiate web server processing at the time when they are sent to browsers. + +- [specific URLs](httpRequests) enable 4D to be called in order to execute any action; these URLs can also be used as form actions to trigger processing when the user posts HTML forms. + +## Dedicated Database Methods + +`On Web Authentication`, `On Web Connection`, as well as `On REST Authentication` database methods are the entry points of requests in the web server; they can be used to evaluate and route any type of request. diff --git a/website/translated_docs/fr/WebServer/webServerAdmin.md b/website/translated_docs/fr/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..2db949b0480bb0 --- /dev/null +++ b/website/translated_docs/fr/WebServer/webServerAdmin.md @@ -0,0 +1,231 @@ +--- +id: webServerAdmin +title: Administration +--- + +4D provides several integrated tools to start, stop, or monitor the integrated web server. + + +## Starting the 4D Web Server + +> To be able to launch the web server of 4D or 4D Server, you must have a "4D Web Application" license. For more information, please refer to the [4D Web site](https://www.4d.com). + + +A 4D project can start and monitor a web server for the main (host) application as well as for each hosted component. + +The main 4D web server can be started in different ways: + +* Using a button/menu command. + * 4D: **Run\>Start Web Server** menu
        ![](assets/en/WebServer/start1.png) + * 4D Server: **Start HTTP server** button of the HTTP Server page
        ![](assets/en/WebServer/start2.png) + +* Automatically starting it each time the 4D application is opened. To do this, display the **Web\/Configuration** page of the Settings and select the **Launch Web Server at Startup** check box:
        ![](assets/en/WebServer/config.png) + +* Programmatically, by calling the [`webServer.start()`](API/WebServerClass.md#start) function or `WEB START SERVER` command. + +The web server of any component can be launched by calling the [`webServer.start()`](API/WebServerClass.md#start) function on the component's web server object. +> You do not need to relaunch the 4D application to start or stop the web server. + +## Stopping the 4D Web Server + +The main 4D web server can be stopped in different ways: + +* Using the **Run\>Stop Web Server** menu of 4D or the **Stop HTTP server** button of the HTTP Server page of 4D Server (both items show **Start...** when the server is not already started). + +* Programmatically, by calling the [`webServer.stop()`](API/WebServerClass.md#stop) function or `WEB STOP SERVER` command. + +The web server of any component can be stopped by calling the `webServer.stop()` function on the component's web server object. + + +## Testing the 4D Web Server + +The **Test Web Server** command can be used to make sure the built-in web server is functioning correctly (4D only). This command is accessible in the **Run** menu when the web server is launched: + +![](assets/en/WebServer/test1.png) + + +When you select this command, the home page of the website published by the 4D application is displayed in a window of your default web browser: + +![](assets/en/WebServer/defaultHomePage.png) + + +This command lets you verify that the web server, home page display, etc. work correctly. The page is called using the *localhost* URL, which is the standard shortcut designating the IP address of the machine on which the web browser is executed. The command takes into account the [TCP publication port](#http-port) number specified in the settings. + + + +## Clearing the Cache + +At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). + +To do so, you can: + +- 4D: click on the **Clear Cache** button in the Web/Options (I) page of the Settings dialog box. +- 4D Server: click on the **Clear Cache** button in the HTTP page of the [4D Server Administration window](Admin/server-admin.md#http-server-page). + +The cache is then immediately cleared. +> You can also use the [/4DCACHECLEAR](#cacheclear) URL. + + + +## Runtime Explorer + +The **Watch** page (**Web** heading) in the Runtime Explorer displays web server information, particularly: + +* **Web Cache Usage**: indicates the number of pages present in the web cache as well as its use percentage. This information is only available if the web server is active and if the cache size is greater than 0. + +* **Web Server Elapsed Time**: indicates the duration of use (in hours:minutes:seconds format) of the Web server. This information is only available if the web server is active. + +* **Web Hits Count**: indicates the total number of HTTP requests received since the web server boot, as well as an instantaneous number of requests per second (measure taken between two Runtime Explorer updates). This information is only available if the web server is active. + + + + +## Administration URLs + +Website administration URLS allow you to control the website published on your server. 4D Web Server accepts four particular URLs: */4DSTATS*, */4DHTMLSTATS*, /*4DCACHECLEAR* and */4DWEBTEST*. + +> */4DSTATS*, */4DHTMLSTATS* and */4DCACHECLEAR* are only available to the Designer and Administrator of the database. If the 4D password system has not been activated, these URLs are available to all the users. /4DWEBTEST is always available. + + +### /4DSTATS + +The **/4DSTATS** URL returns several items of information in an HTML table (displayable in a browser): + +| Item | Description | +| ---------------------- | ------------------------------------------------------------ | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **including pictures** | + +This information can allow you to check the functioning of your server and eventually adapt the corresponding parameters. +> The `WEB GET STATISTICS` command allows you to also obtain information about how the cache is being used for static pages. + +### /4DHTMLSTATS + +The */4DHTMLSTATS* URL returns, also as an HTML table, the same information as the */4DSTATS* URL. The difference is that the **Cached Objects** field only counts HTML pages (without counting picture files). Moreover, this URL returns the **Filtered Objects** field. + +| Item | Description | +| ---------------------- | ---------------------------------------------------------------------- | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **without pictures** | +| Filtered Objects | Number of objects in cache not counted by URL, in particular, pictures | + + +### /4DCACHECLEAR + +The */4DCACHECLEAR* URL immediately clears the cache of the static pages and images. It allows you to therefore “force†the update of the pages that have been modified. + +### /4DWEBTEST + +The */4DWEBTEST* URL is designed to check the web server status. When this URL is called, 4D returns a text file with the following HTTP fields filled: + +| HTTP Field | Description | Exemple | +| ---------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| Date | current date at the RFC 822 format | Mon, 7 Dec 2020 13:12:50 GMT | +| Server | 4D/version number | 4D/18.5.0 (Build 18R5.257368) | +| User-Agent | name and version @ IP client address | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1 | + + + +## Logs + +4D allows you to generate two logs of web requests: + +- a debug log, useful in the web server development phase (*HTTPDebugLog.txt*), +- a standardized web request log, rather used for statistic purposes (*logweb.txt*). + +Both log files are automatically created in the **Logs** folder of the application project. + +### HTTPDebugLog.txt + +The [http debug file](webServerConfig.md#debug-log) can be enabled using the [`web server` object](webServerObject.md) or the `WEB SET OPTION` command. + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +The following fields are logged for both Request and Response: + +| Field name | Description | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + + +### logweb.txt + +The [web log recording file](webServerConfig.md#log-recording) can be enabled using the [`web server` object](webServerObject.md), the `WEB SET OPTION` command, or the **Web/Log (type)** page of the settings. You need to select the log format. + +#### CLF/DLF + +Each line of the file represents a request, such as: *host rfc931 user \[DD/MMM/YYYY:HH:MM:SS] "request" state length* Each field is separated by a space and each line ends by the CR/LF sequence (character 13, character 10). + +DLF (Combined Log Format) format is similar to CLF (Common Log Format) format and uses exactly the same structure. It simply adds two additional HTTP fields at the end of each request: Referer and User-agent. Here is the description of CLF/DLF formats (not customizable): + +| Field name | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| host | IP address of the client (ex. 192.100.100.10) | +| rfc931 | information not generated by 4D, it’s always - (a minus sign | +| user | user name as it is authenticated, or else it is - (a minus sign). If the user name contains spaces, they will be replaced by _ (an underscore). | +| DD/MMM/YYYY:HH:MM:SS | DD: day, MMM: a 3-letter abbreviation for the month name (Jan, Feb,...), YYYY: year, HH: hour, MM: minutes, SS: seconds. The date and time are local to the server. | +| request | request sent by the client (ex. GET /index.htm HTTP/1.0 | +| state | reply given by the server | +| length | size of the data returned (except the HTTP header) or 0 | +| Referer | DLF only- Contains the URL of the page pointing to the requested document. | +| User-agent | DLF only- Contains the name and version of the browser or software of the client at the origin of the request | + +#### ELF/WLF + +The ELF (Extended Log Format) format is very widespread in the world of HTTP browsers. It can be used to build sophisticated logs that meet specific needs. For this reason, the ELF format can be customized: it is possible to choose the fields to be recorded as well as their order of insertion into the file. + +The WLF (WebStar Log Format) was developed specifically for the 4D WebSTAR server. + +##### Configuring the fields + +When you choose the ELF or WLF format, the “Web Log Token Selection†area displays the fields available for the chosen format. You will need to select each field to be included in the log. To do so, check the desired fields. +> You cannot select the same field twice. + +The following table lists the fields available for each format (in alphabetical order) and describes its contents: + +| Champ | ELF | WLF | Valeur | +| -------------- | --- | --- | -------------------------------------- | +| BYTES_RECEIVED | | X | Number of bytes received by the server | + BYTES_SENT| X| X| Number of bytes sent by the server to the client| C_DNS| X| X |IP address of the DNS (ELF: field identical to the C_IP field)| C_IP| X| X| IP address of the client (for example 192.100.100.10)| CONNECTION_ID| |X| Connection ID number| CS(COOKIE)| X| X| Information about cookies contained in the HTTP request| CS(HOST)| X| X| Host field of the HTTP request| CS(REFERER)| X| X| URL of the page pointing to the requested document| CS(USER_AGENT)| X| X| Information about the software and operating system of the client| CS_SIP| X| X| IP address of the server| CS_URI| X| X| URI on which the request is made| CS_URI_QUERY| X| X| Request query parameters| CS_URI_STEM| X| X| Part of request without query parameters| DATE| X| X| DD: day, MMM: 3-letter abbreviation for month (Jan, Feb, etc.), YYYY: year| METHOD| X| X| HTTP method used for the request sent to the server| PATH_ARGS| | X| CGI parameters: string located after the “$†character| STATUS| X| X| Reply provided by the server| TIME| X| X| HH: hour, MM: minutes, SS: seconds| TRANSFER_TIME| X| X| Time requested by server to generate the reply| USER| X| X| User name if authenticated; otherwise - (minus sign).

        If the user name contains spaces, they are replaced by _ (underlines)| URL | |X| URL requested by the client| +> Dates and times are given in GMT. + + +#### Backup Frequency + +Since a *logweb.txt* file can become considerably large, it is possible to set up an automatic archiving mechanism. The triggering of a backup can be based on a certain period of time (expressed in hours, days, week or months), or based on the file size; when the set deadline (or file size) is reached, 4D automatically closes and archives the current log file and creates a new one. + +When the web log file backup is triggered, the log file is archived in a folder named "Logweb Archives," which is created at the same level as the *logweb.txt* file. + +The archived file is renamed based on the following example: “DYYYY_MM_DD_Thh_mm_ss.txt.†For instance, for a file archived on September 4, 2020 at 3:50 p.m. and 7 seconds: “D2020_09_04_T15_50_07.txt.†+ +#### Backup Parameters + +The automatic backup parameters for the logweb.txt are set on the **Web/Log (backup)** page of the Settings: + +![](assets/en/WebServer/backup.png) + +First you must choose the frequency (days, weeks, etc.) or the file size limit criterion by clicking on the corresponding radio button. You must then specify the precise moment of the backup if necessary. + +* **No Backup**: The scheduled backup function is deactivated. + +* **Every X hour(s)**: This option is used to program backups on an hourly basis. You can enter a value between 1 and 24 . + * **starting at**: Used to set the time at which the first back up will begin. + +* **Every X day(s) at X**: This option is used to program backups on a daily basis. Enter 1 if you want to perform a daily backup. When this option is checked, you must indicate the time when the backup must be started. + +* **Every X week(s), day at X**: This option is used to program backups on a weekly basis. Saisissez 1 si vous souhaitez une sauvegarde hebdomadaire. When this option is checked, you must indicate the day(s) of the week and the time when each backup must be started. You can select several days of the week if desired. For example, you can use this option to set two weekly backups: one on Wednesdays and one on Fridays. + +* **Every X month(s), Xth day at X**: This option is used to program backups on a monthly basis. Saisissez 1 si vous souhaitez une sauvegarde mensuelle. When this option is checked, you must indicate the day of the month and the time when the backup must be started. + +* **Every X MB**: This option is used to program backups based on the size of the current request log file. A backup is automatically triggered when the file reaches the set size. You can set a size limit of 1, 10, 100 or 1000 MB. diff --git a/website/translated_docs/fr/WebServer/webServerConfig.md b/website/translated_docs/fr/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..c6fa8c4376c7a1 --- /dev/null +++ b/website/translated_docs/fr/WebServer/webServerConfig.md @@ -0,0 +1,650 @@ +--- +id: webServerConfig +title: Configuration +--- + +The 4D web server settings include security parameters, listening ports, defaults paths, and various options covering all the server features. 4D provides default values for every settings. + + +## Where to configure settings? + +There are different ways to configure the 4D web server settings, depending on the scope and the server you want to set: + +| Setting location | Portée | Involved web server | +| --------------------------------------- | ---------------------------------------- | ----------------------------------------------- | +| [webServer object](webServerObject.md) | Temporary (current session) | Any web server, including component web servers | +| `WEB SET OPTION` or a `WEB XXX` command | Temporary (current session) | Main server | +| **Settings** dialog box (**Web** pages) | Permanent (all sessions, stored on disk) | Main server | + +> Some settings are not available from all locations. + +## Cache + +| Can be set with | Nom | Commentaires | +| ------------------- | --------------------------------------- | ------------ | +| Settings dialog box | Configuration page/Use the 4D Web cache | | +| Settings dialog box | Configuration page/Page Cache Size | | + +Enables and configures the web page cache. + +The 4D web server has a cache that allows you to load static pages, GIF images, JPEG images (<512 kb) and style sheets (.css files) in memory, as they are requested. Using the cache allows you to significantly increase the web server’s performance when sending static pages. The cache is shared between all the web processes. + +You can modify the size of the cache in the **Pages Cache Size** area. The value you set depends on the number and size of your website’s static pages, as well as the resources that the host machines has at its disposal. +> While using your web database, you can check the performance of the cache by using the `WEB GET STATISTICS` command. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. The [/4DSTATS] and [/4DHTMLSTATS] URLs allow you to also obtain information about the cache’s state. + + +## Certificate folder + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | `certificateFolder` | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function. | + +Folder where the TLS certificate files for the web server are located. + +By default with 4D or 4D Server, these files must be placed next to the [project folder](Project/architecture.md#project-folder). + +With 4D in remote mode, these files must be located in the local resources folder of the database on the remote machine (see `4D Client Database Folder` paragraph of the `Get 4D folder` command). You must copy these files manually on the remote machine. + +> TLS certificate files are *key.pem* (document containing the private encryption key) and *cert.pem* (document containing the certificate). + + +## Character Set + +| Can be set with | Nom | Commentaires | +| ------------------- | ------------------------------ | ------------------------------ | +| webServer object | `characterSet` | MIBEnum integer or Name string | +| `WEB SET OPTION` | `Web character set` | MIBEnum integer or Name string | +| Settings dialog box | Options (II) page/Standard Set | Pop up menu | + +Defines the set of characters to be used by the 4D web server. La valeur par défaut dépend de la langue du système d'exploitation. +> This setting is also used for generating Quick Reports in HTML format . + + +## Cipher list + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------- | ------------ | +| webServer object | [`cipherSuite`](API/WebServerClass.md#ciphersuite) | Texte | + +Cipher list used for the secure protocol; sets the priority of ciphering algorithms implemented by the web server. Peut être une séquence de chaînes séparées par des deux-points (par exemple "ECDHE-RSA-AES128 -..."). Voir la [page des chiffrements](https://www.openssl.org/docs/manmaster/man1/ciphers.html) sur le site OpenSSL. + +> The default cipher list used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server, client/server connections, as well as the HTTP client and all the 4D commands that make use of the secure protocol. + +## CORS Settings + +| Can be set with | Nom | Commentaires | +| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ | +| webServer object | [`CORSSettings`](API/WebServerClass.md#corssettings) | Collection of objects (List of allowed hosts and methods for the CORS service) | +| `WEB SET OPTION` | `Web CORS settings` | Collection of objects (List of allowed hosts and methods for the CORS service) | +| Settings dialog box | Options (II) page/Domain names and HTTP methods allowed | Click on the [+] button to add an allowed domain name and its method(s) | + +List of allowed hosts and methods for the CORS service. + +#### Domain names (host property) + +Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Plusieurs attributs de domaine peuvent être ajoutés pour créer une liste blanche. Several syntaxes are supported: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### HTTP methods allowed (methods property) + +Accepted HTTP method(s) for the corresponding CORS host. The following HTTP methods are supported: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +Séparez chaque méthode par un ";" (ex : "post;get"). If methods is empty, null, or undefined, all methods are enabled. + +#### Voir également + +[Enable CORS Service](#enable-cors-service) + + + +## Debug log + +| Can be set with | Nom | Commentaires | +| ---------------- | --------------- | ------------ | +| webServer object | `debugLog` | number | +| `WEB SET OPTION` | `Web debug log` | number | + +Status of the HTTP request log file of the web server (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). It is useful for debugging issues related to the Web server. It records each request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +| Valeur | Constant | Description | +| ------ | ----------- | ------------------------------ | +| 0 | wdl disable | Web HTTP debug log is disabled | + + + +|1|wdl enable without body|Web HTTP debug log is enabled without body parts (body size is provided in this case)| |3|wdl enable with response body|Web HTTP debug log is enabled with body part in response only| |5|wdl enable with request body|Web HTTP debug log is enabled with body part in request only| |7|wdl enable with all body parts|Web HTTP debug log is enabled with body parts in response and request| + + +## Defaut Home page + +| Can be set with | Nom | Commentaires | +| ------------------- | ---------------------------------------------------------- | ------------------------------------- | +| webServer object | [`defaultHomepage`](API/WebServerClass.md#defaulthomepage) | Texte | +| `WEB SET HOME PAGE` | | Can be different for each web process | +| Settings dialog box | Configuration page/Default Home Page | | + +Designate a default home page for the web server. This page can be static or [semi-dynamic]. + +By default, when the web server is launched for the first time, 4D creates a home page named "index.html" and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the web server will obtain the following page: + +![](assets/en/WebServer/defaultHomePage.png) + +You can designate another default home page by entering its pathname. + +- The path is relative to the [default HTML root folder](#root-folder). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- The path must neither start not end with a slash. + +For example, if you want the default home page to be "MyHome.htm", and it is located in the "Web" folder (itself located in the default HTML root folder), use "Web/MyHome.htm". + +If you do not specify any default home page, the `On Web Connection` database method is called. It is up to you to process the request procedurally. + +## Enable CORS Service + +| Can be set with | Nom | Commentaires | +| ------------------- | -------------------------------------------------- | --------------------------------------------------- | +| webServer object | [`CORSEnabled`](API/WebServerClass.md#corsenabled) | Boolean, true to enable the CORS (false by default) | +| `WEB SET OPTION` | `Web CORS enabled` | 0 (disabled, default) or 1 (enabled) | +| Settings dialog box | Options (II) page/Enable CORS | Unchecked by default | + +The 4D web server implements cross-origin resource sharing (CORS) to allow specific Web pages served from another domain to access the current Web application's resources via XHR calls, e.g., using REST. Pour des raisons de sécurité, les requêtes "cross-domain" sont interdites par défaut au niveau du navigateur. When enabled, XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see CORS Settings below). In this case, if a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +When disabled (default), all cross site requests sent with CORS are ignored. + +Pour plus d'informations sur CORS, veuillez consulter la [page de partage de ressources cross-origin](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) sur Wikipedia. + +#### Voir également +[CORS Settings](#cors-settings) + +## Enable HTTP + +| Can be set with | Nom | Commentaires | +| ------------------- | -------------------------------------------------- | ------------ | +| webServer object | [`HTTPEnabled`](API/WebServerClass.md#httpenabled) | boolean | +| `WEB SET OPTION` | `Web HTTP enabled` | | +| Settings dialog box | Configuration page/Enable HTTP | | + +Indicates whether or not the web server will accept non-secure connections. + + +## Enable HTTPS + +| Can be set with | Nom | Commentaires | +| ------------------- | ---------------------------------------------------- | ------------ | +| webServer object | [`HTTPSEnabled`](API/WebServerClass.md#httpsenabled) | boolean | +| `WEB SET OPTION` | `Web HTTPS enabled` | | +| Settings dialog box | Configuration page/Enable HTTPS | | + +Status for communication over HTTPS. This option is described in [this section](Admin/tls.md). + + +## Enable HSTS + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------- | ----------------------------------------------- | +| webServer object | [`HSTSEnabled`](API/WebServerClass.md#hstsenabled) | Boolean, true to enable HSTS (default is false) | +| `WEB SET OPTION` | `Web HSTS enabled` | 0 (disabled, default) or 1 (enabled) | + +État de HTTP Strict Transport Security (HSTS). + +When [HTTPS is enabled](#enable-https), keep in mind that if [HTTP is also enabled](#enable-http), the browser can still switch between HTTPS and HTTP (for example, in the browser URL area, the user can replace "https" by "http"). To forbid http redirections, you can [disable HTTP](#enable-http), however in this case an error message is displayed to client HTTP requests. + +HSTS allows the 4D web server to declare that browsers should only interact with it via secure HTTPS connections. Once activated, the 4D web server will automatically add HSTS-related information to all response headers. Browsers will record the HSTS information the first time they receive a response from the 4D web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the Web **HSTS max age** setting. + +> HSTS requires that HTTPS is [enabled](enable-https) on the server. [HTTP](enable-http) must also be enabled to allow client initial connections. + +> You can get the current connection mode using the `WEB Is secured connection` command. + + +## HSTS Max Age + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------------------------------------ | ----------------- | +| webServer object | [`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage) | number in seconds | +| `WEB SET OPTION` | `Web HSTS max age` | number in seconds | + +Specifies the maximum length of time (in seconds) that HSTS is active for each new client connection. Ces informations sont stockées côté client pendant la durée spécifiée. Default value is 63072000 (2 years) + +> **Warning:** Once HSTS is enabled, client connections will continue to use this mechanism for the specified duration. When you are testing your applications, it is recommended to set a short duration to be able to switch between secured and non-secured connection modes if necessary. + + + + + +## HTTP Compression Level + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------------------------- | ------------------------------ | +| webServer object | [`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel) | | +| `WEB SET OPTION` | `Web HTTP compression level` | Applies to Web and Web Service | + +Compression level for all compressed HTTP exchanges for the 4D web server (client requests or server replies). This setting lets you optimize exchanges by either privileging speed of execution (less compression) or the amount of compression (less speed). The choice of a value depends on the size and type of data exchanged. + +Pass 1 to 9 as value where 1 is the fastest compression and 9 the highest. You can also pass -1 to get a compromise between speed and rate of compression. By default, the compression level is 1 (faster compression). + +## HTTP Compression Threshold + +| Can be set with | Nom | Commentaires | +| ---------------- | ---------------------------------------------------------------------------- | ------------ | +| webServer object | [`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold) | | +| `WEB SET OPTION` | `Web HTTP compression threshold` | | + +In the framework of optimized HTTP exchanges, size threshold for requests below which exchanges should not be compressed. Ce paramètre est utile pour éviter de perdre du temps machine en compressant les petits échanges. + +Pass the size expressed in bytes as value. By default, the compression threshold is set to 1024 bytes. + + +## HTTP Port + +| Can be set with | Nom | Commentaires | +| ------------------- | -------------------------------------------- | ------------ | +| webServer object | [`HTTPPort`](API/WebServerClass.md#httpport) | number | +| `WEB SET OPTION` | `Web port ID` | | +| Settings dialog box | Configuration page/HTTP Port | | + +Listening IP (TCP) port number for HTTP. By default, 4D publishes a web application on the regular Web HTTP Port (TCP port), which is port 80. If that port is already used by another web service, you need to change the HTTP Port used by 4D for this database. + +> In macOS, modifying the HTTP port allows you to start the 4D web server without being the root user of the machine (see [macOS HelperTool](#macos-helpertool)). + +From a web browser, you need to include the non-default HTTP port number into the address you enter for connecting to the web application. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the HTTP port number 8080, you will specify "123.4.567.89:8080". +> **Warning**: If you use TCP port numbers other than the default numbers (80 for standard HTTP and 443 for HTTPS), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals (for example, in the 2000's or 3000's). + +If you specify 0, 4D will use the default HTTP port number 80. + + +## HTTP Trace + +| Can be set with | Nom | Commentaires | +| ---------------- | ---------------------------------------------- | ------------------------------- | +| webServer object | [`HTTPTrace`](API/WebServerClass.md#httptrace) | Boolean, default = false | +| `WEB SET OPTION` | `Web HTTP TRACE` | Integer, default = 0 (disabled) | + +HTTP TRACE method activation in the 4D web server. For security reasons, by default the 4D web server rejects HTTP TRACE requests with an error 405. If necessary, you can enable the HTTP TRACE method, in which case the 4D Web server replies to HTTP TRACE requests with the request line, header, and body. + + + + +## HTTPS Port + +| Can be set with | Nom | Commentaires | +| ------------------- | ---------------------------------------------- | ------------ | +| webServer object | [`HTTPSPort`](API/WebServerClass.md#httpsport) | number | +| `WEB SET OPTION` | `Web HTTPS port ID` | | +| Settings dialog box | Configuration page/HTTPS Port | | + +Listening IP port number for HTTPS connections via TLS. By default, the value is 443 (standard value). See also [HTTP Port](#http-port) for information on port numbers. + + +## Inactive Process Timeout + +| Can be set with | Nom | Commentaires | +| ------------------- | ------------------------------------------------------------------------ | ------------ | +| webServer object | [`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout) | | +| `WEB SET OPTION` | `Web inactive process timeout` | | +| Settings dialog box | Options (I) page/Inactive Process Timeout | Slider | + +Life duration (in minutes) of inactive processes associated with sessions. À la fin du délai d'attente (tiemout), le process est tué sur le serveur, la méthode base `On Web Close Process` est appelée, puis le contexte de session est détruit. + +Default: 480 minutes (pass 0 to restore the default value) + + +## Inactive Session Timeout + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------------------------------------------------------------ | ------------ | +| webServer object | [`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout) | | +| `WEB SET OPTION` | `Web inactive session timeout` | | + +Durée de vie (en minutes) des sessions inactives (durée définie dans le cookie). À la fin de cette période, le cookie de session expire et n'est plus envoyé par le client HTTP. + +Default: 480 minutes (pass 0 to restore the default value) + + +## IP Address to listen + +| Can be set with | Nom | Commentaires | +| ------------------- | -------------------------------------------------------------- | ------------ | +| webServer object | [`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten) | | +| `WEB SET OPTION` | `Web IP address to listen` | | +| Settings dialog box | Configuration page/IP Address | Pop up menu | + +IP address strings on which the 4D web server will receive HTTP requests (4D local and 4D Server). + +By default, no specific address is defined (**Any** value in the Settings dialog box), which means that the server responds to all IP addresses. When you designate a specific address, the server only responds to requests sent to this address. This feature is designed for 4D web servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most host providers. + +Possible values: IP address string. Both IPv6 string formats (e.g. "2001:0db8:0000:0000:0000:ff00:0042:8329") and IPv4 string formats (e.g. "123.45.67.89") are supported. + +#### About IPv6 support + +* **No warning when TCP port is occupied**
        When the server is set to respond on "Any" IP addresses, if the TCP port is being used by another application, this is not indicated when the server is started. In fact, 4D server does not detect any error in this case because the port remains free on the IPv6 address. However, it is not possible to access it using the IPv4 address of the machine, nor by means of the local address: 127.0.0.1.

        If your 4D server does not seem to be responding on the port defined, you can test the address [::1] on the server machine (equivalent to 127.0.0.1 for IPv6, add [:portNum] to test another port number). If 4D responds, it is likely that another application is using the port in IPv4. + +* **IPv4-mapped IPv6 addresses**
        To standardize processing, 4D provides a standard hybrid representation of IPv4 addresses in IPv6. These addresses are written with a 96-bit prefix in IPv6 format, followed by 32 bits written in the dot-decimal notation of IPv4. For example, ::ffff:192.168.2.34 represents the IPv4 address 192.168.2.34. + +* **Indication of port numbers**
        Since IPv6 notation uses colons (:), adding port numbers may lead to some confusion, for example: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6 address + 2001:0DB8::85a3:0:ac1f:8001:8081 // IPv6 address with port 8081 +``` + +To avoid this confusion, we recommend using the [ ] notation whenever you combine an IPv6 address with a port number, for instance: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 //IPv6 address with port 8081 +``` + +## Keep Session + +| Can be set with | Nom | Commentaires | +| ------------------- | -------------------------------------------------- | ------------ | +| webServer object | [`keepSession`](API/WebServerClass.md#keepsession) | | +| `WEB SET OPTION` | `Web keep session` | | +| Settings dialog box | Options (I) page/Automatic Session Management | | + +Session management enabling status for the 4D web server. Session mechanism is described in the [Session Management](sessions.md) section. + +Default is true (enabled). + +> When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). + + +## Log Recording + +| Can be set with | Nom | Commentaires | +| ------------------- | ---------------------------------------------------- | ------------ | +| webServer object | [`logRecording`](API/WebServerClass.md#logrecording) | | +| `WEB SET OPTION` | `Web log recording` | | +| Settings dialog box | Log (type) page/Log Format | Pop up menu | + +Starts or stops the recording of requests received by the 4D web server in the *logweb.txt* file and sets its format. By default, requests are not recorded (0/No Log File). When enabled, the *logweb.txt* file is automatically placed in the Logs folder. + +This setting allows you to select the format of this file. Available values are: + +| Valeur | Format name | Description | +| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0 | No Log File | Default | +| 1 | Record in CLF format | Common Log Format - Each line of the file represents a request, such as: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - Each field is separated by a space and each line ends by the CR/LF sequence. | +| 2 | Record in DLF format | Combined Log Format - Similar to CLF format but adds two additional HTTP fields at the end of each request: Referer and User-agent. | +| 3 | Record in ELF format | Extended Log Format - To be customized in the Settings dialog box | +| 4 | Record in WLF format | WebStar Log Format - To be customized in the Settings dialog box | + +> Formats 3 and 4 are custom formats whose contents must be set beforehand in the Settings dialog box. If you use one of these formats without any of its fields having been selected on this page, the log file will not be generated. + + +## Maximum Concurrent Web Processes + +| Can be set with | Nom | Commentaires | +| ------------------- | ------------------------------------------------------------------------ | ------------ | +| webServer object | [`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses) | | +| `WEB SET OPTION` | `Web max concurrent processes` | | +| Settings dialog box | Options (I) page/Maximum Concurrent Web Processes | | + +Strictly high limit of concurrent web processes that can be simultaneously open on the server. This parameter allows prevention of server saturation as the result of massive number of requests. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the HTTP status `503 - Service Unavailable` to all new requests. + +By default, the value is 100. You can set the number anywhere between 10 and 32000. + + +## Maximum Request Size + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------------- | ------------ | +| webServer object | [`maxRequestSize`](API/WebServerClass.md#maxrequestsize) | | +| `WEB SET OPTION` | `Web maximum requests size` | | + +Maximum size (in bytes) of incoming HTTP requests (POST) that the web server is authorized to process. By default, the value is 2 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147 483 648) means that, in practice, no limit is set. + +Cette limite est utilisée pour éviter la saturation du serveur Web en raison de requêtes entrantes trop volumineuses. When a request reaches this limit, the 4D web server rejects it. + +Possible values: 500 000 to 2 147 483 648. + + +## Maximum Session Number + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------- | ------------ | +| webServer object | [`maxSessions`](API/WebServerClass.md#maxsessions) | | +| `WEB SET OPTION` | `Web max sessions` | | + +Nombre maximum de sessions simultanées. When you reach the limit set, the oldest session is closed (and `On Web Close Process` database method is called) if the Web server needs to create a new one. The number of simultaneous sessions cannot exceed the [maximum number of Web processes](#maximum-concurrent-web-processes) (100 by default). + +Default value: 100 (pass 0 to restore the default value). + + +## Minimum TLS Version + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------------------------------------------ | ------------ | +| webServer object | [`minTLSVersion`](API/WebServerClass.md#mintlsversion) | number | + +Version TLS minimale acceptée pour les connexions. Les tentatives de connexion de clients prenant en charge uniquement les versions inférieures au minimum seront rejetées. + +Valeurs possibles : + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (default) +- 4 = TLSv1_3 + +En cas de modification, le serveur doit être redémarré pour utiliser la nouvelle valeur. + +> The minimum TLS version used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server and client/server connections. + + +## Nom + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------------------------ | ------------ | +| webServer object | [`name`](API/WebServerClass.md#name) | | + + +Name of the web server application. Useful when component web servers are started. + +## OpenSSL Version + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------------- | ------------ | +| webServer object | [`openSSLVersion`](API/WebServerClass.md#opensslversion) | Read-only | + +Version of the OpenSSL library used. + + +## Perfect Forward Secrecy + +| Can be set with | Nom | Commentaires | +| ---------------- | ---------------------------------------------------------------------- | ------------------ | +| webServer object | [`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy) | Boolean, read-only | + +True if PFS is available on the web server (see [TLS](Admin/tls.md#perfect-forward-secrecy-pfs) section). + + +## Robots.txt + +Certain robots (query engines, spiders...) scroll through web servers and static pages. If you do not want robots to be able to access your entire site, you can define which URLs they are not allowed to access. + +To do so, put the ROBOTS.TXT file at the server's root. This file must be structured in the following manner: + +```4d + User-Agent: + Disallow: or +``` + +Par exemple : + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* “User-Agent: *†- all robots are affected. +* “Disallow: /4D†- robots are not allowed to access URLs beginning with /4D. +* “Disallow: /%23%23†- robots are not allowed to access URLs beginning with /%23%23. +* “Disallow: /GIFS/’ - robots are not allowed to access the /GIFS/ folder or its subfolders. + +Another example: + +```code4d + User-Agent: * + Disallow: / +``` + +In this case, robots are not allowed to access the entire site. + + +## Root Folder + +| Can be set with | Nom | Commentaires | +| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | [`rootFolder`](API/WebServerClass.md#rootfolder) | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function | +| `WEB SET ROOT FOLDER` | | | +| Settings dialog box | Configuration page/Default HTML Root | | + +Path of web server root folder, i.e. the folder in which 4D will search for the static and semi-dynamic HTML pages, pictures, etc., to send to the browsers. The path is formatted in POSIX full path. The web server will need to be restarted in order for the new root folder to be taken into account. + +Moreover, the HTML root folder defines, on the web server hard drive, the hierarchical level above which the files will not be accessible. If a requested URL or a 4D command tries to access a file located above the HTML root folder, an error is returned indicating that the file has not been found. + +By default, 4D defines a HTML Root folder named **WebFolder**. If it does not already exist, the HTML root folder is physically created on disk at the moment the Web server is launched for the first time. The root folder is created: +- with 4D (local) and 4D Server, at the same level as the [Project folder](Project/architecture.md#project-folder). +- with 4D in remote mode, in the local resources folder. + +You can designate another default HTML root folder by entering its pathname. + +- The path is relative to the [Project folder](Project/architecture.md#project-folder) (4D local and 4D Server) or to the folder containing the 4D application or software package (4D in remote mode). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- To "go up" one level in the folder hierarchy, enter “..†(two periods) before the folder name +- The path must not start with a slash (except if you want the HTML root folder to be the Project or 4D remote folder, but for access to the folders above to be forbidden, in which case you can pass "/" as the root folder). + +For example, if you want the HTML root folder to be the "Web" subfolder in the "MyWebApp" folder, enter "MyWebApp/Web". + +> When the HTML root folder is modified, the cache is cleared so as to not store files whose access is restricted. + + + +## Session Cookie Domain + +| Can be set with | Nom | Commentaires | +| ---------------- | ------------------------------------------------------------------ | ------------ | +| webServer object | [`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain) | | +| `WEB SET OPTION` | `Web session cookie domain` | | + +Value of the "domain" field of the session cookie. Useful for controlling the scope of the session cookies. Par exemple, si vous définissez la valeur "/*.4d.fr" pour ce sélecteur, le client enverra un cookie uniquement lorsque la requête est adressée au domaine ".4d.fr", ce qui exclut les serveurs hébergeant des données statiques externes. + + +## Session Cookie Name + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------------------- | ------------ | +| webServer object | [`sessionCookieName`](API/WebServerClass.md#sessioncookiename) | | +| `WEB SET OPTION` | `Web session cookie name` | | + +Name of the cookie used for saving the session ID. Default = "4DSID". + + +## Session Cookie Path + +| Can be set with | Nom | Commentaires | +| ---------------- | -------------------------------------------------------------- | ------------ | +| webServer object | [`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath) | | +| `WEB SET OPTION` | `Web session cookie path` | | + +Champ "path" du cookie de session. Utilisé pour contrôler la portée des cookies de session. Par exemple, si vous définissez la valeur "/4DACTION" pour ce sélecteur, le client enverra un cookie uniquement pour les requêtes dynamiques commençant par 4DACTION, et non pour les images, les pages statiques, etc. + +## Session Cookie SameSite + +| Can be set with | Nom | Commentaires | +| ---------------- | ---------------------------------------------------------------------- | ------------ | +| webServer object | [`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite) | | + +Value of the `SameSite` attribute value of the session cookie. This attribute allows you to declare if your cookie should be restricted to a first-party or same-site context, as a protection from some cross-site request forgery ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) attacks. + +> For a detailed description of the `SameSite` attribute, please refer to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) or [this web.dev page](https://web.dev/samesite-cookies-explained/). + +Trois valeurs sont disponibles : + +- "Strict" (default `SameSite` attribute value for 4D session cookies): cookies will only be sent in the first-party context, i.e. context matching the domain of the current site, and never to third-party websites. +- "Lax": Cookies are not sent on cross-site subrequests (for example to load images or frames into a third-party site), but are sent when a user is navigating to the origin site (i.e. they follow a link). +- "None": Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. When "None" value is used, the cookie `Secure` attribute must also be set (or the cookie will be blocked). + +The `Secure` attribute value of the session cookie is automatically set to "True" if the connection is HTTPS (whatever the `SameSite` attribute value). + +> It is not recommended to set `SameSite=None` on a HTTP server since the `Secure` attribute will be missing (used in HTTPS only) and cookies will be blocked. + + + +## Session IP Address Validation + +Can be set with|Name|Comments| |---|---|---| |webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| |`WEB SET OPTION`|`Web session enable IP address validation`|| + +IP address validation status for session cookies. For security reasons, by default the 4D web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. Dans certaines applications spécifiques, vous souhaiterez peut-être désactiver cette validation et accepter les cookies de session, même lorsque leurs adresses IP ne correspondent pas. For example when mobile devices switch between Wifi and 4G/5G networks, their IP address will change. In this case, you must pass 0 in this option to allow clients to be able to continue using their Web sessions even when the IP addresses change. Note that this setting lowers the security level of your application. + +When it is modified, this setting is effective immediately (you do not need to restart the HTTP server). + +Possible values: 0 (disabled) or 1 (enabled, default). + + + + +## Deprecated Settings + +The following settings are still supported but rely on deprecated features or technologies. It is usually recommended to keep default values. + +#### Allow database Access through 4DSYNC URLs + +This option controls the support of HTTP synchronization requests containing deprecated */4DSYNC* URLs. + + +#### Reuse temporary contexts (in remote mode) + +Allows you to optimize the operation of the 4D Web Server in remote mode by reusing web processes created for processing previous web requests. In fact, the web server in 4D needs a specific web process for the handling of each web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. + +When the **Reuse Temporary Contexts** option is checked, in remote mode 4D maintains the specific web processes and reuses them for subsequent requests. By removing the process creation stage, web server performance is improved. + +In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. +> * This option is checked (and locked) automatically when the **Automatic Session Management** option is checked. In fact, the session management mechanism is actually based on the principle of recycling web processes: each session uses the same process that is maintained during the lifespan of the session. However, note that session processes cannot be "shared" between different sessions: once the session is over, the process is automatically killed (and not reused). It is therefore unnecessary to reset the selections or variables in this case. +> +> * This option only has an effect with a 4D web server in remote mode. With a 4D in local mode, all web processes (other than session processes) are killed after their use. + + + +#### Send Extended Characters Directly + +When this option is checked, the web server sends extended characters “as is†in semi-dynamic pages, without converting them into HTML entities. This option has shown a speed increase on most foreign operating systems (especially the Japanese system). + + +#### Keep-Alive Connections + +The 4D Web Server can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the web browser and the server to save system resources and to optimize transfers. + +The **Use Keep-Alive Connections** option enables or disables keep-alive TCP connections for the web server. This option is enabled by default. In most cases, it is advisable to keep this option check since it accelerates the exchanges. If the web browser does not support connection keep alive, the 4D Web Server automatically switches to HTTP/1.0. + +The 4D Web Server keep-alive function concerns all TCP/IP connections (HTTP, HTTPS). Note however that keep-alive connections are not always used for all 4D web processes. + +In some cases, other optimized internal functions may be invoked. Keep-alive connections are useful mainly for static pages. + +Two options allow you to set how the keep-alive connections work: + +* **Number of requests by connection**: Allows you to set the maximum number of requests and responses able to travel over a connection keep alive. Limiting the number of requests per connection allows you to prevent server flooding due to a large number of incoming requests (a technique used by hackers).

        The default value (100) can be increased or decreased depending on the resources of the machine hosting the 4D Web Server. + +* **Timeout**: This value defines the maximum wait period (in seconds) during which the web server maintains an open TCP connection without receiving any requests from the web browser. Once this period is over, the server closes the connection.

        If the web browser sends a request after the connection is closed, a new TCP connection is automatically created. This operation is not visible for the user. + diff --git a/website/translated_docs/fr/WebServer/webServerObject.md b/website/translated_docs/fr/WebServer/webServerObject.md index 2351b48c38dda5..dac77b6a27e177 100644 --- a/website/translated_docs/fr/WebServer/webServerObject.md +++ b/website/translated_docs/fr/WebServer/webServerObject.md @@ -3,284 +3,135 @@ id: webServerObject title: Objet Serveur Web --- -## Aperçu -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +Un projet 4D peut démarrer et surveiller un serveur Web pour l'application principale (hôte) ainsi que chaque composant hébergé. -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +Par exemple, si vous avez installé deux composants dans votre application principale, vous pouvez démarrer et contrôler jusqu'à trois serveurs Web indépendants à partir de votre application : -- one web server for the host database, -- one web server for the component #1, -- one web server for the component #2. +- un serveur web pour l'application hôte, +- un serveur web pour le composant n°1, +- un serveur web pour le composant n°2. -Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +En dehors de la mémoire, il n'y a pas de limite au nombre de composants et donc, de serveurs Web, pouvant être rattachés à un seul projet d'application 4D. -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +Chaque serveur web 4D, y compris le serveur web de l'application principale, est exposé comme un **objet** spécifique de la classe `4D.WebServer`. Une fois instancié, un objet serveur Web peut être géré depuis l'application courante ou depuis n'importe quel composant à l'aide d'un [grand nombre de propriétés et de fonctions](API/WebServerClass.md). -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). +> Les [commandes WEB](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) héritées du langage 4D sont prises en charge mais ne peuvent pas sélectionner le serveur Web auquel elles s'appliquent (voir ci-dessous). -Each web server (host database or component) can be used in its own separate context, including: +Chaque serveur web (application hôte ou composant) peut être utilisé dans son propre contexte, notamment : +- les appels vers la méthode base `On Web Authentication` et `On Web Connection` +- le traitement des balises 4D et les appels de méthodes, +- sessions web et gestion du protocole TLS. -- `On Web Authentication` and `On Web Connection` database method calls -- 4D tags processing and method calls, -- managing web sessions and TLS protocols. +Cela vous permet de développer des composants indépendants et des fonctionnalités qui accompagnent leurs propres interfaces Web. -This feature allows you to develop independant components and features that come with their own web interfaces. -## Instantiating a web server object +## Instancier un objet serveur web -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +L'objet serveur Web de l'application hôte (serveur Web par défaut) est automatiquement chargé par 4D au démarrage. Ainsi, si vous écrivez dans un projet nouvellement créé : ```4d $nbSrv:=WEB Server list.length -//$nbSrv value is 1 +//la valeur de $nbSrv est 1 ``` -To instantiate a web server object, call the `WEB Server` command: +Pour instancier un objet serveur web, appelez la commande [`WEB Server`](API/WebServerClass.md#web-server) : ```4d -C_OBJECT(webServer) - //call the web server from the current context + //créer une variable objet de la classe 4D.WebServer +var webServer : 4D.WebServer + //appeler le serveur Web depuis le contexte courant webServer:=WEB Server - //equivalent to + + //équivalent à webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: - -- the host database's web server from a component or -- the server that received the request (whatever the server), +Si l'application utilise des composants et que vous souhaitez appeler : +- le serveur Web de l'application hôte à partir d'un composant ou +- le serveur qui a reçu la requête (quel que soit le serveur) -you can also use: +vous pouvez également utiliser : ```4d -C_OBJECT(webServer) - //call the host web server from a component +var webServer : 4D.WebServer + //appler le serveur web hôte depuis un composant webServer:=WEB Server(Web server host database) - //call the target web server + //appeler le serveur web cible webServer:=WEB Server(Web server receiving request) ``` -## Web server methods -A web server object contains the following member methods: +## Fonctions du serveur web -| Méthode | Paramètres | Return value | Description | -| --------- | ----------------- | --------------- | --------------------- | -| `start()` | settings (object) | status (object) | Starts the web server | -| `stop()` | - | - | Stops the web server | +Un [objet de classe Web server](API/WebServerClass.md#web-server-object) contient les fonctions suivantes : +| Fonctions | Paramètres | Valeur retournée | Description | +| ---------------------------------------- | ---------------- | ---------------- | ---------------------- | +| [`start()`](API/WebServerClass.md#start) | settings (objet) | status (object) | Démarre le serveur web | +| [`stop()`](API/WebServerClass.md#start) | - | - | Stoppe le serveur web | -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +Pour démarrer et arrêter un serveur Web, il suffit d'appeler les fonctions [`start()`](API/WebServerClass.md#start) et [`stop()`](API/WebServerClass.md#stop) de l'objet serveur Web : ```4d -C_OBJECT($status) - //to start a web server with default settings +var $status : Object + //pour démarrer un serveur web avec les paramètres par défaut $status:=webServer.start() - //to start the web server with custom settings - //$settings object contains web server properties + //pour démarrer un serveur web avec des paramètres personnalisés + //objet $settings contenant des propriétés du serveur web webServer.start($settings) - //to stop the web server + //pour stopper le serveur web $status:=webServer.stop() ``` -## Web server properties - -A web server object contains the following properties. - -Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server: - -- 4 = ISO-8859-1 -- 12 = ISO-8859-9 -- 13 = ISO-8859-10 -- 17 = Shift-JIS -- 2024 = Windows-31J -- 2026 = Big5 -- 38 = euc-kr -- 106 = UTF-8 -- 2250 = Windows-1250 -- 2251 = Windows-1251 -- 2253 = Windows-1253 -- 2255 = Windows-1255 -- 2256 = Windows-1256 - - - < - - p> - - < - - p>Default value: 63072000 (2 years)| |HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). - - < - - p> - - < - - p>Possible values: - - - 1 to 9 (where 1 is the fastest compression and 9 the highest). - - -1 = set a compromise between speed and rate of compression. - - Default = 1 (faster compression).| |HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. - - < - - p> - - < - - p>Default compression threshold = 1024 bytes| |HTTPEnabled|boolean|HTTP protocol state| |HTTPPort|number|Listening IP port number for HTTP. - - < - - p> - - < - - p>Default = 80| |HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| |HTTPSEnabled|boolean|HTTPS protocol state| |HTTPSPort|number|Listening IP port number for HTTPS. - - < - - p> - - < - - p>Default = 443| |inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. - - < - - p> - - < - - p>Default = 480 minutes| |inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. - - < - - p> - - < - - p>Default = 480 minutes| |IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| |*isRunning*|boolean|Web server running state| |keepSession|boolean|Session management enabling status - - < - - p> - - < - - p>Default = true| |logRecording|number|Log requests (logweb.txt) recording value. - - - 0 = Do not record (default) - - 1 = Record in CLF format - - 2 = Record in DLF format - - 3 = Record in ELF format - - 4 = Record in WLF format| |maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. - - < - - p> - - < - - p>Possible values: 10 - 32000 - - < - - p> - - < - - p>Default = 100| |maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. - - < - - p> - - < - - p>Possible values: 500000 - 2147483648| |maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| |minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. - - < - - p> - - < - - p>Possible values: - - - 1 = `TLSv1_0` - - 2 = `TLSv1_1` - - 3 = `TLSv1_2` (default) - - < - - p> - - < - - p>If modified, the server must be restarted to use the new value.| |*name*|text|Name of the web server database| |*openSSLVersion*|text|Version of the OpenSSL library used| |*perfectForwardSecrecy*|boolean|PFS availability on the server| |rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| |sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| |sessionCookieName|text|Name of the cookie used for storing the session ID. - - < - - p> - - < - - p>Default = "4DSID"| |sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| |sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change. - - < - - p> - - < - - p>Note: this setting lowers the security level of your application| - - These properties are defined: - - 1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), - 2. if not used, using the `WEB SET OPTION` command (host databases only), - 3. if not used, in the database settings of the host database or the component. - - If the web server is not started, the properties contain the values that will be used at the next web server startup. - - If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. - - > *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. - - ## Scope of the 4D Web commands - - The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. - - | Command | Scope | - | ------------------------------- | ------------------------------------ | - | `SET DATABASE PARAMETER` | Host database web server | - | `WEB CLOSE SESSION` | Web server that received the request | - | `WEB GET BODY PART` | Web server that received the request | - | `WEB Get body part count` | Web server that received the request | - | `WEB Get Current Session ID` | Web server that received the request | - | `WEB GET HTTP BODY` | Web server that received the request | - | `WEB GET HTTP HEADER` | Web server that received the request | - | `WEB GET OPTION` | Host database web server | - | `WEB Get server info` | Host database web server | - | `WEB GET SESSION EXPIRATION` | Web server that received the request | - | `WEB Get session process count` | Web server that received the request | - | `WEB GET STATISTICS` | Host database web server | - | `WEB GET VARIABLES` | Web server that received the request | - | `WEB Is secured connection` | Web server that received the request | - | `WEB Is server running` | Host database web server | - | `WEB SEND BLOB` | Web server that received the request | - | `WEB SEND FILE` | Web server that received the request | - | `WEB SEND HTTP REDIRECT` | Web server that received the request | - | `WEB SEND RAW DATA` | Web server that received the request | - | `WEB SEND TEXT` | Web server that received the request | - | `WEB SET HOME PAGE` | Host database web server | - | `WEB SET HTTP HEADER` | Web server that received the request | - | `WEB SET OPTION` | Host database web server | - | `WEB SET ROOT FOLDER` | Host database web server | - | `WEB START SERVER` | Host database web server | - | `WEB STOP SERVER` | Host database web server | - | `WEB Validate digest` | Web server that received the request | \ No newline at end of file + +## Propriétés du serveur web + +Un objet serveur Web contient [diverses propriétés](API/WebServerClass.md#web-server-object) qui configurent le serveur Web. + +Ces propriétés sont définies : + +1. using the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function (except for read-only properties, see below), +2. si elles ne sont pas utilisées, à l'aide de la commande `WEB SET OPTION` (applications hôtes uniquement), +3. si elles ne sont pas utilisées, dans les paramètres de l'application hôte ou du composant. + +- Si le serveur Web n'est pas démarré, les propriétés contiennent les valeurs qui seront utilisées au prochain démarrage du serveur Web. +- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function. + +> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the [`start()`](API/WebServerClass.md#start) function. + + +## Portée des commandes 4D Web + +Le langage 4D contient [plusieurs commandes](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) permettant de contrôler le serveur Web. Cependant, ces commandes sont destinées à fonctionner avec un seul serveur Web (par défaut). Lorsque vous utilisez ces commandes dans le contexte d'objets serveur Web, assurez-vous que leur portée est appropriée. + +| Commande | Portée | +| ------------------------------- | --------------------------------- | +| `SET DATABASE PARAMETER` | Application hôte du serveur web | +| `WEB CLOSE SESSION` | Serveur Web ayant reçu la requête | +| `WEB GET BODY PART` | Serveur Web ayant reçu la requête | +| `WEB Get body part count` | Serveur Web ayant reçu la requête | +| `WEB Get Current Session ID` | Serveur Web ayant reçu la requête | +| `WEB GET HTTP BODY` | Serveur Web ayant reçu la requête | +| `WEB GET HTTP HEADER` | Serveur Web ayant reçu la requête | +| `WEB GET OPTION` | Application hôte du serveur web | +| `WEB Get server info` | Application hôte du serveur web | +| `WEB GET SESSION EXPIRATION` | Serveur Web ayant reçu la requête | +| `WEB Get session process count` | Serveur Web ayant reçu la requête | +| `WEB GET STATISTICS` | Application hôte du serveur web | +| `WEB GET VARIABLES` | Serveur Web ayant reçu la requête | +| `WEB Is secured connection` | Serveur Web ayant reçu la requête | +| `WEB Is server running` | Application hôte du serveur web | +| `WEB SEND BLOB` | Serveur Web ayant reçu la requête | +| `WEB SEND FILE` | Serveur Web ayant reçu la requête | +| `WEB SEND HTTP REDIRECT` | Serveur Web ayant reçu la requête | +| `WEB SEND RAW DATA` | Serveur Web ayant reçu la requête | +| `WEB SEND TEXT` | Serveur Web ayant reçu la requête | +| `WEB SET HOME PAGE` | Application hôte du serveur web | +| `WEB SET HTTP HEADER` | Serveur Web ayant reçu la requête | +| `WEB SET OPTION` | Application hôte du serveur web | +| `WEB SET ROOT FOLDER` | Application hôte du serveur web | +| `WEB START SERVER` | Application hôte du serveur web | +| `WEB STOP SERVER` | Application hôte du serveur web | +| `WEB Validate digest` | Serveur Web ayant reçu la requête | diff --git a/website/translated_docs/ja/API/BlobClass.md b/website/translated_docs/ja/API/BlobClass.md new file mode 100644 index 00000000000000..42834d51d6e70f --- /dev/null +++ b/website/translated_docs/ja/API/BlobClass.md @@ -0,0 +1,77 @@ +--- +id: BlobClass +title: BLOB +--- + +Blobクラスを使ã£ã¦ã€[BLOB オブジェクト](../Concepts/dt_blob.md#BLOB-ã®ç¨®é¡ž) (`4D.Blob`) ã‚’æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### æ¦‚è¦ + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**4D.Blob.new()** : 4D.Blob
        **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
        **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob](#4dblobnew)

            creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). | +| [**.size** : Real](#size)

            returns the size of a `4D.Blob`, expressed in bytes. | +| [**.slice()** : 4D.Blob
        **.slice**( *start* : Real ) : 4D.Blob
        **.slice**( *start* : Real; *end* : Real ) : 4D.Blob](#slice)

             creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. 元㮠BLOB ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 | + +## 4D.Blob.new() + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R2 | 追加 | +
        + +**4D.Blob.new()** : 4D.Blob
        **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
        **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob + +| 引数 | タイプ | | 説明 | +| ---- | --------------- |:--:| ---------- | +| blob | Blob or 4D.Blob | -> | コピーã™ã‚‹ BLOB | +| 戻り値 | 4D.Blob | <- | æ–°è¦ 4D.Blob | + +#### 説明 + +`4D.Blob.new` creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). `blob` å¼•æ•°ãŒæ¸¡ã•れãªã‹ã£ãŸå ´åˆã€é–¢æ•°ã¯ç©ºã® 4D.Blob ã‚’è¿”ã—ã¾ã™ã€‚ + +## .size + +**.size** : Real +#### 説明 +The `.size` property returns the size of a `4D.Blob`, expressed in bytes. +## .slice() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R2 | 追加 | +
        + +**.slice()** : 4D.Blob
        **.slice**( *start* : Real ) : 4D.Blob
        **.slice**( *start* : Real; *end* : Real ) : 4D.Blob +| 引数 | タイプ | | 説明 | +| ----- | ------- |:--:| -------------------------------- | +| start | 実数 | -> | æ–°ã—ã„ `4D.Blob` ã«å«ã‚る最åˆã®ãƒã‚¤ãƒˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| end | 実数 | -> | æ–°ã—ã„ `4D.Blob` ã«å«ã‚ãªã„最åˆã®ãƒã‚¤ãƒˆã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| 戻り値 | 4D.Blob | <- | New `4D.Blob` | +#### 説明 + +`.slice()` creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. 元㮠BLOB ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 `start` 引数ã¯ã€æ–°ã—ã„ `4D.Blob` ã«å«ã‚る最åˆã®ãƒã‚¤ãƒˆã‚’示㙠BLOB ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚ è² ã®å€¤ã‚’指定ã—ãŸå ´åˆã€4D 㯠BLOB ã®æœ«å°¾ã‹ã‚‰å…ˆé ­ã«å‘ã‹ã£ã¦ã‚ªãƒ•セットã—ãŸã‚‚ã®ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€-10 㯠BLOB ã®æœ€å¾Œã‹ã‚‰ 10番目ã®ãƒã‚¤ãƒˆã‚’表ã—ã¾ã™ã€‚ デフォルト値㯠0 ã§ã™ã€‚ start ã«ã‚½ãƒ¼ã‚¹BLOB ã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå¤§ããªå€¤ã‚’指定ã™ã‚‹ã¨ã€è¿”ã•れる `4D.Blob` ã®ã‚µã‚¤ã‚ºã¯ 0 ã«ãªã‚Šã€ãƒ‡ãƒ¼ã‚¿ã¯å«ã¾ã‚Œã¾ã›ã‚“。 + +`end` 引数ã¯ã€æ–°ã—ã„ `4D.Blob` ã«å«ã‚ãªã„最åˆã®ãƒã‚¤ãƒˆã‚’示㙠BLOB ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã§ã™ã€‚ã¤ã¾ã‚‹ã€æŒ‡å®šã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒã‚¤ãƒˆã¯æ–°ã—ã„ `4D.Blob` ã‹ã‚‰é™¤å¤–ã•れã¾ã™ã€‚ è² ã®å€¤ã‚’指定ã—ãŸå ´åˆã€4D 㯠BLOB ã®æœ«å°¾ã‹ã‚‰å…ˆé ­ã«å‘ã‹ã£ã¦ã‚ªãƒ•セットã—ãŸã‚‚ã®ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€-10 㯠BLOB ã®æœ€å¾Œã‹ã‚‰ 10番目ã®ãƒã‚¤ãƒˆã‚’表ã—ã¾ã™ã€‚ デフォルト値㯠BLOB ã®ã‚µã‚¤ã‚ºã§ã™ã€‚ + +#### 例題 + +```4d +var $myBlob : 4D.Blob + +// 4D.Blob ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’æ ¼ç´ã—ã¾ã™ +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$is4DBlob:=OB Instance of($myBlob; 4D.Blob); // True + +$myString:=Convert to text($myBlob; "UTF-8") +// $myString 㯠"Hello, World!" ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ + +// $myBlob ã‹ã‚‰æ–°ã—ã„ 4D.Blob を作æˆã—ã¾ã™ +$myNewBlob:=$myBlob.slice(0; 5) + +$myString:=Convert to text($myNewBlob; "UTF-8") +// $myString 㯠"Hello" ã‚’æ ¼ç´ã—ã¾ã™ +``` diff --git a/website/translated_docs/ja/API/ClassClass.md b/website/translated_docs/ja/API/ClassClass.md new file mode 100644 index 00000000000000..aff06325b37da2 --- /dev/null +++ b/website/translated_docs/ja/API/ClassClass.md @@ -0,0 +1,132 @@ +--- +id: ClassClass +title: Class +--- + + +プロジェクトã«ãŠã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ãŒ [定義](Concepts/classes.md#クラス定義) ã•れã¦ã„れã°ã€ãれ㯠4Dランゲージ環境ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ クラスã¨ã¯ã€ãれ自身㌠"Class" クラスã®ã‚ªãƒ–ジェクトã§ã‚りã€ãƒ—ロパティã¨é–¢æ•°ã‚’æŒã¡ã¾ã™ã€‚ + + + +### æ¦‚è¦ + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.name** : Text](#name)

            contains the name of the `4D.Class` object | +| [**.new**( *param* : any { *;...paramN* } ) : 4D.Class](#new)

            creates and returns a `cs.className` object which is a new instance of the class on which it is called | +| [**.superclass** : 4D.Class](#superclass)

            returns the parent class of the class | + + + +## .name + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | + +
        + +**.name** : Text +#### 説明 + +The `.name` property contains the name of the `4D.Class` object. クラスåã®å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | +
        + +**.new**( *param* : any { *;...paramN* } ) : 4D.Class +| 引数 | タイプ | | 説明 | +| ----- | -------- |:--:| --------------- | +| param | any | -> | ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼é–¢æ•°ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | 4D.Class | <- | ã‚¯ãƒ©ã‚¹ã®æ–°è¦ã‚ªãƒ–ジェクト | + + +#### 説明 + +The `.new()` function creates and returns a `cs.className` object which is a new instance of the class on which it is called. ã“ã®é–¢æ•°ã¯ã€[`cs` クラスストア](Concepts/classes.md#cs) ã«å±žã™ã‚‹å…¨ã‚¯ãƒ©ã‚¹ã§è‡ªå‹•çš„ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +ä»»æ„ã® *param* ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã—ãŸå¼•æ•°ã¯ã€å½“該クラス定義内㮠[Class Constructor](Concepts/classes.md#class-constructor) 関数 (ã‚れã°) ãŒå—ã‘å–りã¾ã™ã€‚ コンストラクター関数ã«ãŠã„ã¦ã¯ã€[`This`](Concepts/classes.md#this) ã¯æ–°è¦ã«ä½œæˆã•れるオブジェクトを指ã—ã¾ã™ã€‚ + +存在ã—ãªã„クラスを対象㫠`.new()` を呼ã³å‡ºã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +#### 例題 + +Person ã‚¯ãƒ©ã‚¹ã®æ–°è¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: + +```4d +var $person : cs.Person +$person:=cs.Person.new() // æ–°è¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ä½œæˆ +//$person ã¯ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ +``` + +パラメーターを使ã£ã¦ã€Personã‚¯ãƒ©ã‚¹ã®æ–°è¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: + +```4d +// クラス: Person.4dm +Class constructor($firstname : Text; $lastname : Text; $age : Integer) + This.firstName:=$firstname + This.lastName:=$lastname + This.age:=$age +``` + +```4d +// メソッド内ã®ä½¿ç”¨ä¾‹ +var $person : cs.Person +$person:=cs.Person.new("John";"Doe";40) +// $person.firstName = "John" +// $person.lastName = "Doe" +// $person.age = 40 +``` + + + + + +## .superclass + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | + +
        + +**.superclass** : 4D.Class +#### 説明 + +The `.superclass` property returns the parent class of the class. スーパークラスã¯ã€`4D.Class` オブジェクトã€ã‚ã‚‹ã„㯠`cs.className` オブジェクトã®ã„ãšã‚Œã‹ã§ã™ã€‚ 親クラスãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ã€ã“ã®ãƒ—ロパティ㯠**null** ã‚’è¿”ã—ã¾ã™ã€‚ + +ユーザークラスã®ã‚¹ãƒ¼ãƒ‘ークラスã¯ã€[`Class extends `](Concepts/classes.md#class-extends-classname) キーワードを使ã£ã¦ã‚¯ãƒ©ã‚¹å†…ã§å®šç¾©ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + +#### 例題 + +```4d +$sup:=4D.File.superclass // Document +$sup:=4D.Document.superclass // Object +$sup:=4D.Object.superclass // null + +// `Class extends File` を使ã£ã¦ +// MyFile クラスを作æˆã—ãŸå ´åˆ +$sup:=cs.MyFile.superclass // File + +``` + + + +**å‚ç…§:** [Super](Concepts/classes.md#super) + + diff --git a/website/translated_docs/ja/API/CollectionClass.md b/website/translated_docs/ja/API/CollectionClass.md new file mode 100644 index 00000000000000..5667a775582610 --- /dev/null +++ b/website/translated_docs/ja/API/CollectionClass.md @@ -0,0 +1,2582 @@ +--- +id: CollectionClass +title: Collection +--- + + +Collectionクラス㯠[コレクション](Concepts/dt_collection.md) åž‹ã®å¤‰æ•°ã‚’扱ã„ã¾ã™ã€‚ + +ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®ã‚ˆã†ã«åˆæœŸåŒ–ã—ã¾ã™: + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**New collection** {( *...value* : any )} : Collection](#new-collection)

             creates a new empty or prefilled collection | +| [**New shared collection** {( *...value* : any )} : Collection](#new-shared-collection)

             creates a new empty or prefilled shared collection | + + +### 例題 + +```4d + var $colVar : Collection // コレクション型㮠4D変数ã®å®£è¨€ + $colVar:=New collection // コレクションã®åˆæœŸåŒ–㨠4D変数ã¸ã®ä»£å…¥ +``` + + +### æ¦‚è¦ + + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.average**( {*propertyPath* : Text } ) : Real](#average)

            returns the arithmetic mean (average) of defined values in the collection instance | +| [**.clear()** : Collection](#clear)

            removes all elements from the collection instance and returns an empty collection | +| [**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection](#combine)

            inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection | +| [**.concat**( *value* : any { *;...valueN* } ) : Collection](#concat)

            returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end | +| [**.copy**() : Collection
        **.copy**( *option* : Integer ) : Collection
        **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
        **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection](#copy)

             returns a deep copy of the collection instance | +| [**.count**( { *propertyPath* : Text } ) : Real](#count)

            returns the number of non-null elements in the collection | +| [**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real](#countvalues)

            returns the number of times value is found in the collection | +| [**.distinct**( {*option* : Integer} ) : Collection
        **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection](#distinct)

            returns a collection containing only distinct (different) values from the original collection | +| [**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean](#equal)

            compares the collection with collection2 | +| [**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
        **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean](#every)

            returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method | +| [**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
        **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection](#extract)

            creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects | +| [**.fill**( *value* : any ) : Collection
        **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection](#fill)

            fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection | +| [**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection](#filter)

            returns a new collection containing all elements of the original collection for which *methodName* method result is **true** | +| [**.find**( *methodName* : Text { ; *...param* : any } ) : any
        **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any](#find)

            returns the first value in the collection for which *methodName*, applied on each element, returns **true** | +| [**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
        **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer](#find)

            returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true** | +| [**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#indexof)

            searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found | +| [**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection ](#indices)

            returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions | +| [**.insert**( *index* : Integer ; *element* : any ) : Collection ](#insert)

             inserts *element* at the specified *index* position in the collection instance and returns the edited collection | +| [**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text ](#join)

            converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator | +| [**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#lastindexof)

            searches the *toSearch* expression among collection elements and returns the index of the last occurrence | +| [**.length** : Integer](#length)

            returns the number of elements in the collection | +| [**.map**( *methodName* : Text { ; *...param* : any } ) : Collection ](#map)

            creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection | +| [**.max**( { *propertyPath* : Text } ) : any ](#max)

            returns the element with the highest value in the collection | +| [**.min**( { *propertyPath* : Text } ) : any ](#min)

            returns the element with the smallest value in the collection | +| [**.orderBy**( ) : Collection
        **.orderBy**( *pathStrings* : Text ) : Collection
        **.orderBy**( *pathObjects* : Collection ) : Collection
        **.orderBy**( *ascOrDesc* : Integer ) : Collection ](#orderby)

            returns a new collection containing all elements of the collection in the specified order | +| [**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection ](#orderbymethod)

            returns a new collection containing all elements of the collection in the order defined through the *methodName* method | +| [**.pop()** : any ](#pop)

            removes the last element from the collection and returns it as the function result | +| [**.push**( *element* : any { ;...*elementN* } ) : Collection ](#push)

            appends one or more *element*(s) to the end of the collection instance and returns the edited collection | +| [**.query**( *queryString* : Text ; *...value* : any ) : Collection
        **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection ](#query)

            returns all elements of a collection of objects that match the search conditions | +| [**.reduce**( *methodName* : Text ) : any
        **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any ](#reduce)

            applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value | +| [**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection ](#remove)

            removes one or more element(s) from the specified *index* position in the collection and returns the edited collection | +| [**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection ](#resize)

            sets the collection length to the specified new size and returns the resized collection | +| [**.reverse( )** : Collection ](#reverse)

            returns a deep copy of the collection with all its elements in reverse order | +| [**.shift()** : any](#shift)

            removes the first element of the collection and returns it as the function result | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection](#slice)

            returns a portion of a collection into a new collection | +| [**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
        **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean](#some)

            returns true if at least one element in the collection successfully passed a test | +| [**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection ](#sort)

            sorts the elements of the original collection | +| [**.sum**( { *propertyPath* : Text } ) : Real](#sum)

            returns the sum for all values in the collection instance | +| [**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection](#unshift)

            inserts the given *value*(s) at the beginning of the collection | + + + +## `New collection` + + +**New collection** {( *...value* : any )} : Collection +| 引数 | タイプ | | 説明 | +| ----- | ----------------------------------------------------------------------- |:--:| -------------- | +| value | Number, Text, Date, Time, Boolean, Object, Collection, Picture, Pointer | -> | コレクションã®å€¤ | +| 戻り値 | コレクション | <- | New collection | + + +#### 説明 + +The `New collection` command creates a new empty or prefilled collection and returns its reference. + +引数を渡ã•ãªã‹ã£ãŸå ´åˆã€`New collection` ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã€ãã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ + +è¿”ã•れãŸå‚ç…§ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã® 4D変数ã«ä»£å…¥ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> `var : Collection` ã‚„ `C_COLLECTION` ステートメントã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®å¤‰æ•°ã‚’宣言ã—ã¾ã™ãŒã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è‡ªä½“ã¯ä½œæˆã—ãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ä»»æ„ã§ã€ä¸€ã¤ä»¥ä¸Šã® *value* 引数を渡ã™ã“ã¨ã§ã€ã‚らã‹ã˜ã‚値ã®å…¥ã£ãŸæ–°ã—ã„コレクションを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã¯ã€ã‚ã¨ã‹ã‚‰ä»£å…¥ã«ã‚ˆã£ã¦è¦ç´ ã‚’一ã¤ãšã¤è¿½åŠ ãƒ»ç·¨é›†ã—ã¦ã„ãã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + myCol[10]:="My new element" +``` + +ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚è¦ç´ ã‚’è¶…ãˆã‚‹è¦ç´ ç•ªå· (インデックス) を指定ã—ãŸå ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ãƒªã‚µã‚¤ã‚ºã•れã€åˆã„é–“ã®è¦ç´ ã«ã¯ã™ã¹ã¦ null 値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‰ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹åž‹ (数値ã€ãƒ†ã‚­ã‚¹ãƒˆã€æ—¥ä»˜ã€ãƒ”クãƒãƒ£ãƒ¼ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€ã‚ªãƒ–ジェクトã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ç­‰) ã§ã‚れã°ã€å€‹æ•°ã«åˆ¶é™ãªã値を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ é…列ã¨ã¯ç•°ãªã‚Šã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯ç•°ãªã‚‹åž‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ··ãœã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãŸã ã—以下ã®å¤‰æ›å•題ã«ã¤ã„ã¦ã¯æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +* 渡ã•れãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ãã®ã¾ã¾ä¿å­˜ã•れã¾ã™ã€‚ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ `JSON Stringify` コマンドを使用ã™ã‚‹ã“ã¨ã§è©•価ã•れã¾ã™ã€‚ +* 日付ã¯ã€"dates inside objects" データベース設定ã«å¿œã˜ã¦ã€"yyyy-mm-dd" ã¨ã„ã†æ—¥ä»˜ã€ã¾ãŸã¯ "YYYY-MM-DDTHH:mm:ss.SSSZ" ã¨ã„ã†ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ–‡å­—列ã§ä¿å­˜ã•れã¾ã™ã€‚ コレクションã«ä¿å­˜ã™ã‚‹å‰ã« 4D日付をテキストã«å¤‰æ›ã—ãŸå ´åˆã€ãƒ—ログラムã¯ãƒ‡ãƒ•ォルトã§ãƒ­ãƒ¼ã‚«ãƒ«ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’使用ã—ã¾ã™ã€‚ ã“ã®ãµã‚‹ã¾ã„㯠`SET DATABASE PARAMETER` コマンド㧠`Dates inside objects` セレクターを使用ã™ã‚‹ã“ã¨ã§å¤‰æ›´å¯èƒ½ã§ã™ã€‚ +* 時間を渡ã—ãŸå ´åˆã€ãれã¯ãƒŸãƒªç§’ã®æ•° (実数) ã¨ã—ã¦ä¿å­˜ã•れã¾ã™ã€‚ + +#### 例題 1 + + + +æ–°ã—ã„空ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã€ãれを 4Dコレクション変数ã«ä»£å…¥ã—ã¾ã™: + +```4d + var $myCol : Collection + $myCol:=New collection + // $myCol=[] +``` + +#### 例題 2 + +ã‚らã‹ã˜ã‚値ã®å…¥ã£ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™: + +```4d + var $filledColl : Collection + $filledColl:=New collection(33;"mike";"november";->myPtr;Current date) + // $filledColl=[33,"mike","november","->myPtr","2017-03-28T22:00:00.000Z"] +``` + +#### 例題 3 + +æ–°ã—ã„コレクションを作æˆã—ã€ãã“ã«æ–°ã—ã„è¦ç´ ã‚’追加ã—ã¾ã™: + +```4d + var $coll : Collection + $coll:=New collection("a";"b";"c") + // $coll=["a","b","c"] + $coll[9]:="z" // 値 "z" ã‚’10番目ã®è¦ç´ ã¨ã—ã¦è¿½åŠ ã—ã¾ã™ + $vcolSize:=$coll.length // 10 + // $coll=["a","b","c",null,null,null,null,null,null,"z"] +``` + + + + +## `New shared collection` + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**New shared collection** {( *...value* : any )} : Collection +| 引数 | タイプ | | 説明 | +| ----- | ------------------------------------------------------------------- |:--:| --------------------- | +| value | Number, Text, Date, Time, Boolean, Shared object, Shared collection | -> | 共有コレクションã®å€¤ | +| 戻り値 | コレクション | <- | New shared collection | + + +#### 説明 + +The `New shared collection` command creates a new empty or prefilled shared collection and returns its reference. + +ã“ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¦ç´ ã‚’追加ã™ã‚‹å ´åˆã«ã¯ [`Use...End use`](Concepts/shared.md#useend-use) 構造ã§ããã‚‹å¿…è¦ãŒã‚りã€ãã†ã—ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ ãŸã ã—ã€å±žæ€§ã®èª­ã¿å–り㯠[`Use...End use`](Concepts/shared.md#useend-use) 構造ã®å¤–å´ã§ã‚‚å¯èƒ½ã§ã™ã€‚ +> 共有コレクションã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](Concepts/shared.md) ã®ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +引数を渡ã•ãªã„å ´åˆã€`New shared collection` ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã€ãã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ + +è¿”ã•れãŸå‚ç…§ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã® 4D変数ã«ä»£å…¥ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> `var : Collection` ã‚„ `C_COLLECTION` ステートメントã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®å¤‰æ•°ã‚’宣言ã—ã¾ã™ãŒã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è‡ªä½“ã¯ä½œæˆã—ãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ä»»æ„ã§ã€ä¸€ã¤ä»¥ä¸Šã® *value* 引数を渡ã™ã“ã¨ã§ã€ã‚らã‹ã˜ã‚値ã®å…¥ã£ãŸæ–°ã—ã„共有コレクションを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã¯ã€ã‚ã¨ã‹ã‚‰ã‚ªãƒ–ジェクト記法ã«ã‚ˆã‚‹ä»£å…¥ã§è¦ç´ ã‚’一ã¤ãšã¤è¿½åŠ ãƒ»ç·¨é›†ã—ã¦ã„ãã“ã¨ãŒã§ãã¾ã™ (例題å‚ç…§)。 + +å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚è¦ç´ ã‚’è¶…ãˆã‚‹è¦ç´ ç•ªå· (インデックス) を指定ã—ãŸå ´åˆã€å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ãƒªã‚µã‚¤ã‚ºã•れã€åˆã„é–“ã®è¦ç´ ã«ã¯ã™ã¹ã¦ null 値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‰ã¾ã™ã€‚ + +以下ã®ã‚µãƒãƒ¼ãƒˆã•れる型ã§ã‚れã°ã€ã„ãã¤ã§ã‚‚値を渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* 数値 (実数ã€å€é•·æ•´æ•°...)。 数値ã¯å¸¸ã«å®Ÿæ•°ã¨ã—ã¦ä¿å­˜ã•れã¾ã™ã€‚ +* テキスト +* ブール +* 日付 +* 時間 (ãƒŸãƒªç§’ã®æ•° (実数) ã¨ã—ã¦ä¿å­˜ã•れã¾ã™)。 +* null +* 共有オブジェクト(*) +* 共有コレクション(*) +> 標準ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (éžå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã¨ã¯ç•°ãªã‚Šã€å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ãƒ”クãƒãƒ£ãƒ¼ã‚„ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€å…±æœ‰ã§ãªã„オブジェクトãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“。 + +*(*) 共有オブジェクトãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿½åŠ ã•れãŸå ´åˆã€ãれらã¯åŒã˜ãƒ­ãƒƒã‚¯è­˜åˆ¥å­ã‚’共有ã—ã¾ã™*。 ã“ã®ç‚¹ã«ã¤ã„ã¦ã®ã‚ˆã‚Šè©³ç´°ã¯ã€**4Dランゲージリファレンス** ã® [ロック識別å­](https://doc.4d.com/4Dv18/4D/18.4/Shared-objects-and-shared-collections.300-5233766.ja.html#3648963) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### 例題 + +```4d + $mySharedCol:=New shared collection("alpha";"omega") + Use($mySharedCol) + $mySharedCol[1]:="beta" + End use +``` + + + +## .average() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.average**( {*propertyPath* : Text } ) : Real + +| 引数 | タイプ | | 説明 | +| ------------ | --------------- |:--:| --------------------- | +| propertyPath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | Real, Undefined | <- | コレクションã®å€¤ã®ç®—è¡“å¹³å‡ | + + + +#### 説明 + +The `.average()` function returns the arithmetic mean (average) of defined values in the collection instance. + + + +計算ã®å¯¾è±¡ã¨ãªã‚‹ã®ã¯æ•°å€¤ã®ã¿ã§ã™ (ä»–ã®åž‹ã®è¦ç´ ã¯ç„¡è¦–ã•れã¾ã™)。 + +コレクションãŒã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€è¨ˆç®—ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘スを *propertyPath* ã«æ¸¡ã—ã¾ã™ã€‚ + +`.average()` ã¯ä»¥ä¸‹ã®å ´åˆã«ã¯ `undefined` ã‚’è¿”ã—ã¾ã™: + +* コレクションãŒç©ºã®å ´åˆ +* ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ•°å€¤ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆ +* *propertyPath* å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ‘スãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆ + + +#### 例題 1 + +```4d + var $col : Collection + $col:=New collection(10;20;"Monday";True;6) + $vAvg:=$col.average() //12 +``` + +#### 例題 2 + +```4d + var $col : Collection + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $vAvg:=$col.average("salary") //23500 +``` + + + + +## .clear() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.clear()** : Collection +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ----------------- | +| 戻り値 | コレクション | <- | å…¨è¦ç´ ãŒå‰Šé™¤ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.clear()` function removes all elements from the collection instance and returns an empty collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +#### 例題 + +```4d +var $col : Collection +$col:=New collection(1;2;5) +$col.clear() +$vSize:=$col.length //$vSize=0 +``` + + + + + + +## .combine() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection + +| 引数 | タイプ | | 説明 | +| ----- | ------ |:--:| ----------------------------- | +| col2 | コレクション | -> | 追加ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| index | æ•´æ•° | -> | 追加è¦ç´ ã‚’挿入ã™ã‚‹ä½ç½® (デフォルト㯠length+1) | +| 戻り値 | コレクション | <- | 追加è¦ç´ ã‚’æ ¼ç´ã—ãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.combine()` function inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection. `.insert()` 関数ã¨ã¯ç•°ãªã‚Šã€`.combine()` 㯠*col2* ã®å„è¦ç´ ã‚’å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¿½åŠ ã—ã¾ã™ (*col2* 自体をå˜ä¸€ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã¨ã—ã¦ã¯æŒ¿å…¥ã—ã¾ã›ã‚“)。 +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€*col2* ã®è¦ç´ ã¯å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã«è¿½åŠ ã•れã¾ã™ã€‚ *index* ã«å¼•数を渡ã™ã“ã¨ã§ã€*col2* ã®è¦ç´ ã‚’挿入ã™ã‚‹ä½ç½®ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> **警告**: コレクションè¦ç´ ã¯ 0 起点ã§ã‚ã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +* 指定ã—㟠*index* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length より大ãã„å ´åˆã€å®Ÿéš›ã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã«è¨­å®šã•れã¾ã™ã€‚ +* *index* < 0 ã®å ´åˆã€*index:=index+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 +* è¨ˆç®—çµæžœã‚‚è² ã®å€¤ã§ã‚ã‚‹å ´åˆã€*index* 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ + + +#### 例題 + +```4d +var $c; $fruits : Collection +$c:=New collection(1;2;3;4;5;6) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$c.combine($fruits;3) //[1,2,3,"Orange","Banana","Apple","Grape",4,5,6] +``` + + + + + + +## .concat() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.concat**( *value* : any { *;...valueN* } ) : Collection +| 引数 | タイプ | | 説明 | +| ----- | -------------------------------------------------------------- |:--:| ----------------------------------------------------- | +| value | Number, Text, Object, Collection, Date, Time, Boolean, Picture | -> | 連çµã™ã‚‹å€¤ã€‚ *value* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…¨è¦ç´ ãŒå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿½åŠ ã•れã¾ã™ã€‚ | +| 戻り値 | コレクション | <- | å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å€¤ãŒè¿½åŠ ã•ã‚ŒãŸæ–°è¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.concat()` function returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*value* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆã€ãã®å…¨è¦ç´ ãŒæ–°ã—ã„è¦ç´ ã¨ã—ã¦å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã«è¿½åŠ ã•れã¾ã™ã€‚ *value* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ãªã„å ´åˆã€ãã‚Œè‡ªä½“ãŒæ–°ã—ã„è¦ç´ ã¨ã—ã¦è¿½åŠ ã•れã¾ã™ã€‚ + + +#### 例題 + +```4d +var $c : Collection +$c:=New collection(1;2;3;4;5) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$fruits.push(New object("Intruder";"Tomato")) +$c2:=$c.concat($fruits) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}] +$c2:=$c.concat(6;7;8) //[1,2,3,4,5,6,7,8] +``` + + + + + +## .copy() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -------------------------------------------- | +| v18 R3 | *ck shared* オプションã®è¿½åŠ ã€‚ *groupWith* パラメーターを追加。 | +| v16 R6 | 追加 | +
        + +**.copy**() : Collection
        **.copy**( *option* : Integer ) : Collection
        **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
        **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------ | ------ |:--:| ------------------------------------------------------------------------ | +| オプション | æ•´æ•° | -> | `ck resolve pointers`: コピーå‰ã«ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解決ã™ã‚‹
        `ck shared`: 共有コレクションを返㙠| +| groupWithCol | コレクション | -> | çµæžœã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã™ã‚‹å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| groupWithObj | オブジェクト | -> | çµæžœã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã™ã‚‹å…±æœ‰ã‚ªãƒ–ジェクト | +| 戻り値 | コレクション | <- | å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒ‡ã‚£ãƒ¼ãƒ—・コピー | + + +#### 説明 + +The `.copy()` function returns a deep copy of the collection instance.***Deep copy*** means that objects or collections within the original collection are duplicated and do not share any reference with the returned collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +ä»»æ„ã® *option* パラメーターã«ã¯ã€ä»¥ä¸‹ã®ã©ã¡ã‚‰ã‹ (ã‚ã‚‹ã„ã¯ä¸¡æ–¹) ã®å®šæ•°ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| オプション | 説明 | +| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ck resolve pointers` | オリジナルã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒã‚¤ãƒ³ã‚¿ãƒ¼åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ•ォルトã§ã¯ã‚³ãƒ”ー先ã®ã‚ªãƒ–ジェクトもãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’æ ¼ç´ã—ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€`ck resolve pointers` 定数を渡ã™ã“ã¨ã§ã€ã‚³ãƒ”ー時ã«ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解決ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®å„ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã‚³ãƒ”ー時ã«è§£æ±ºã•れã€è§£æ±ºæ¸ˆã¿ã®å€¤ãŒä½¿ç”¨ã•れã¾ã™ã€‚ | +| `ck shared` | 共有コレクションã«å¯¾ã—ã¦é©ç”¨ã•れãŸå ´åˆã§ã‚‚ã€`copy()` ã¯ãƒ‡ãƒ•ォルトã§é€šå¸¸ã® (éžå…±æœ‰ã®) コレクションを返ã—ã¾ã™ã€‚ 共有コレクションを作æˆã™ã‚‹ã«ã¯ã€`ck shared` 定数を渡ã—ã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€`groupWith` パラメーターã«å¼•数を渡ã—ã¦ä»–ã®å…±æœ‰ã‚ªãƒ–ジェクトã¾ãŸã¯å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«é–¢é€£ã¥ã‘ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (以下å‚ç…§)。 | + +*groupWithCol* ã¾ãŸã¯ *groupWithObj* 引数を渡ã™ã¨ã€çµæžœã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’関連ã¥ã‘るコレクションã¾ãŸã¯ã‚ªãƒ–ジェクトを指定ã§ãã¾ã™ã€‚ + + +#### 例題 1 + +通常㮠(éžå…±æœ‰ã®) コレクション *$lastnames * ã‚’ã€å…±æœ‰ã‚ªãƒ–ジェクト *$sharedObject* 内ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ ã“ã®ãŸã‚ã«ã¯ã€ã¾ãšå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (*$sharedLastnames*) を作æˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +```4d +var $sharedObject : Object +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$sharedObject:=New shared object + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) // $lastnames ã¯é€šå¸¸ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ + +$sharedLastnames:=$lastnames.copy(ck shared) // $sharedLastnames ã¯å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ + +// $sharedLastnames 㯠$sharedObject ã®ä¸­ã«å…¥ã‚Œã‚‰ã‚Œã¾ã™ +Use($sharedObject) + $sharedObject.lastnames:=$sharedLastnames +End use +``` + + +#### 例題 2 + +ã©ã¡ã‚‰ã‚‚共有コレクションã§ã‚ã‚‹ *$sharedColl1* ã¨*$sharedColl2* ã‚’çµåˆã—ã¾ã™ã€‚ ã“れらã¯ç•°ãªã‚‹å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã—ã¦ã„ã‚‹ãŸã‚ã€ç›´æŽ¥çµåˆã—ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ãã“ã§ã€ *$sharedColl1* ã®ã‚³ãƒ”ーを作æˆã—ã€*$sharedColl2* ã‚’ãã®ã‚³ãƒ”ーã®å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—å…ˆã«æŒ‡å®šã—ã¾ã™ã€‚ + +```4d +var $sharedColl1;$sharedColl2;$copyColl : Collection + +$sharedColl1:=New shared collection(New shared object("lastname";"Smith")) +$sharedColl2:=New shared collection(New shared object("lastname";"Brown")) + +// $copyColl ã‚’ $sharedColl2 ã¨åŒã˜å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã•ã›ã¾ã™ + $copyColl:=$sharedColl1.copy(ck shared;$sharedColl2) + Use($sharedColl2) + $sharedColl2.combine($copyColl) + End use +``` + +#### 例題 3 + +通常ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (*$lastnames*) ãŒã‚りã€ãれをアプリケーション㮠**Storage** ã«å…¥ã‚Œã¾ã™ã€‚ ã“れã«ã¯ã€å…ˆã«å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (*$sharedLastnames*) を作æˆã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ + +```4d +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) // $lastnames ã¯é€šå¸¸ã® (éžå…±æœ‰) コレクションã§ã™ + +$sharedLastnames:=$lastnames.copy(ck shared) // 共有コピー + +Use(Storage) + Storage.lastnames:=$sharedLastnames +End use +``` + +#### 例題 4 + +`ck resolve pointers` オプションを使用ã—ãŸå ´åˆã®ãµã‚‹ã¾ã„ã§ã™: + +```4d + var $col : Collection + var $p : Pointer + $p:=->$what + + $col:=New collection + $col.push(New object("alpha";"Hello";"num";1)) + $col.push(New object("beta";"You";"what";$p)) + + $col2:=$col.copy() + $col2[1].beta:="World!" + ALERT($col[0].alpha+" "+$col2[1].beta) // "Hello world!" を表示ã—ã¾ã™ + + $what:="You!" + $col3:=$col2.copy(ck resolve pointers) + ALERT($col3[0].alpha+" "+$col3[1].what) // "Hello You!" を表示ã—ã¾ã™ +``` + + + + + + + +## .count() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.count**( { *propertyPath* : Text } ) : Real + +| 引数 | タイプ | | 説明 | +| ------------ | ---- |:--:| --------------------- | +| propertyPath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | 実数 | <- | コレクション内ã®è¦ç´ ã®æ•° | + + +#### 説明 + +The `.count()` function returns the number of non-null elements in the collection. + +コレクションãŒã‚ªãƒ–ジェクトをå«ã‚“ã§ã„ã‚‹å ´åˆã€*propertyPath* 引数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€*propertyPath* ã§æŒ‡å®šã—ãŸãƒ‘スをå«ã‚€è¦ç´ ã®ã¿ãŒã‚«ã‚¦ãƒ³ãƒˆã•れã¾ã™ã€‚ + +#### 例題 + +```4d + var $col : Collection + var $count1;$count2 : Real + $col:=New collection(20;30;Null;40) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $col.push(New object("lastName";"Henry";"salary";12000)) + $count1:=$col.count() // $count1=7 + $count2:=$col.count("name") // $count2=3 + +``` + + + + + + +## .countValues() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real + +| 引数 | タイプ | | 説明 | +| ------------ | ----------------------------------------------- |:--:| --------------------- | +| value | Text, Number, Boolean, Date, Object, Collection | -> | æ•°ãˆã‚‹å€¤ | +| propertyPath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | 実数 | <- | 値ã®å‡ºç¾å›žæ•° | + + +#### 説明 + +The `.countValues()` function returns the number of times value is found in the collection. + +*value* ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* スカラー値 (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜) +* オブジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å‚ç…§ + + +è¦ç´ ãŒæ¤œå‡ºã•れるãŸã‚ã«ã¯ã€*value* 引数ã®åž‹ãŒè¦ç´ ã®åž‹ã¨åˆè‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ã“ã®ãƒ•ァンクションã¯ç­‰å·æ¼”ç®—å­ã‚’使用ã—ã¾ã™ã€‚ + +ä»»æ„ã® *propertyPath* 引数を渡ã™ã¨ã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãŠã‘る値ã®å€‹æ•°ã‚’æ•°ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ *propertyPath* ã«ã¯å€¤ã‚’検索ã™ã‚‹ãƒ—ロパティパスを渡ã—ã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +#### 例題 1 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection(1;2;5;5;5;3;6;4) + $vCount:=$col.countValues(5) // $vCount=3 +``` + + +#### 例題 2 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection + $col.push(New object("name";"Smith";"age";5)) + $col.push(New object("name";"Wesson";"age";2)) + $col.push(New object("name";"Jones";"age";3)) + $col.push(New object("name";"Henry";"age";4)) + $col.push(New object("name";"Gross";"age";5)) + $vCount:=$col.countValues(5;"age") //$vCount=2 +``` + + +#### 例題 3 + +```4d + var $numbers; $letters : Collection + var $vCount : Integer + + $letters:=New collection("a";"b";"c") + $numbers:=New collection(1;2;$letters;3;4;5) + + $vCount:=$numbers.countValues($letters) //$vCount=1 +``` + + + + + + + +## .distinct() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.distinct**( {*option* : Integer} ) : Collection
        **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------ | ------ |:--:| -------------------------------------------------------- | +| オプション | æ•´æ•° | -> | `ck diacritical`: アクセント等ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãªã„評価 (ãŸã¨ãˆã° "A" # "a") | +| propertyPath | テキスト | -> | é‡è¤‡ã—ãªã„値をå–å¾—ã™ã‚‹å±žæ€§ã®ãƒ‘ス | +| 戻り値 | コレクション | <- | é‡è¤‡ã—ãªã„値ã®ã¿ã‚’æ ¼ç´ã—ãŸæ–°è¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.distinct()` function returns a collection containing only distinct (different) values from the original collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +è¿”ã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ **Null** 値ã¯è¿”ã•れã¾ã›ã‚“。 + +デフォルトã§ã¯ã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆç­‰ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãŸè©•価ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 評価ã®éš›ã«æ–‡å­—ã®å¤§å°ã‚’区別ã—ãŸã‚Šã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆè¨˜å·ã‚’区別ã—ãŸã„å ´åˆã«ã¯ã€*option* ã« `ck diacritical` 定数を渡ã—ã¾ã™ã€‚ + +コレクションãŒã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€é‡è¤‡ã—ãªã„値をå–å¾—ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘スを *propertyPath* ã«æ¸¡ã—ã¾ã™ã€‚ + + + +#### 例題 + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push("a";"b";"c";"A";"B";"c";"b";"b") + $c.push(New object("size";1)) + $c.push(New object("size";3)) + $c.push(New object("size";1)) + $c2:=$c.distinct() //$c2=["a","b","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct(ck diacritical) //$c2=["a","A","b","B","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct("size") //$c2=[1,3] +``` + + + + + + +## .equal() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean +| 引数 | タイプ | | 説明 | +| ----------- | ------ |:--:| -------------------------------------------------------- | +| collection2 | コレクション | -> | 比較ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| オプション | æ•´æ•° | -> | `ck diacritical`: アクセント等ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãªã„評価 (ãŸã¨ãˆã° "A" # "a") | +| 戻り値 | ブール | <- | コレクションãŒåŒä¸€ã®å ´åˆã«ã¯ trueã€ãれ以外㯠false | + + +#### 説明 + +The `.equal()` function compares the collection with collection2 and returns **true** if they are identical (deep comparison). + +デフォルトã§ã¯ã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆç­‰ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãŸè©•価ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 評価ã®éš›ã«æ–‡å­—ã®å¤§å°ã‚’区別ã—ãŸã‚Šã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆè¨˜å·ã‚’区別ã—ãŸã„å ´åˆã«ã¯ã€option ã« `ck diacritical` 定数を渡ã—ã¾ã™ã€‚ +> **Null**値ã®è¦ç´ ã¯ undefinedè¦ç´ ã¨åŒã˜ã¨ã¯ã¿ãªã•れã¾ã›ã‚“。 + +#### 例題 + +```4d + var $c; $c2 : Collection + var $b : Boolean + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3;4) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("1";"a";"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2) // true + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2;ck diacritical) //false +``` + + + + + +## .every() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
        **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean +| 引数 | タイプ | | 説明 | +| ---------- | ------- |:--:| --------------------- | +| startFrom | Integer | -> | テストを開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| methodName | Text | -> | テストã«å‘¼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | Mixed | -> | methodName ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | ブール | <- | ã™ã¹ã¦ã®è¦ç´ ãŒãƒ†ã‚¹ãƒˆã‚’パスã™ã‚Œã° true | + + +#### 説明 + +The `.every()` function returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method. + + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªãƒ†ã‚¹ãƒˆã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $1 ã«ã‚ªãƒ–ジェクトをå—ã‘å–りã€ãƒ†ã‚¹ãƒˆã‚’パスã—ãŸè¦ç´ ã® *$1.result* ã‚’ true ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: 評価ã™ã‚‹è¦ç´ ã®å€¤ +* *$2*: param +* *$N...*: paramN... + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.result* (ブール): è¦ç´ ã®å€¤ã®è©•ä¾¡ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ **true** ã€ãれ以外㯠**false** +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + +`.every()` 関数ã¯ã€*$1.result* ã« **false** ã‚’è¿”ã™ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã‚’発見ã™ã‚‹ã¨ã€*methodName* メソッドã®å‘¼ã³å‡ºã—ã‚’ã‚„ã‚㦠**false** ã‚’è¿”ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`.every()` ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“をテストã—ã¾ã™ã€‚ ä»»æ„ã§ã€*startFrom* ã«ãƒ†ã‚¹ãƒˆã‚’é–‹å§‹ã™ã‚‹è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length 以上ã ã£ãŸå ´åˆã€**false** ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ†ã‚¹ãƒˆã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +* *startFrom* < 0 ã®å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™(*startFrom:=startFrom+length*)。 +* *startFrom* = 0 ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒãƒ†ã‚¹ãƒˆã•れã¾ã™ (デフォルト)。 + + +#### 例題 1 + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("NumberGreaterThan0") // true ã‚’è¿”ã—ã¾ã™ +$c.push(-1) +$b:=$c.every("NumberGreaterThan0") // false ã‚’è¿”ã—ã¾ã™ +``` + +***NumberGreaterThan0*** メソッドã®ä¸­èº«ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d +$1.result:=$1.value>0 +``` + +#### 例題 2 + +コレクションè¦ç´ ãŒã™ã¹ã¦å®Ÿæ•°åž‹ã§ã‚ã‚‹ã‹ã‚’テストã—ã¾ã™: + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("TypeLookUp";Is real) //$b=true +$c:=$c.push(New object("name";"Cleveland";"zc";35049)) +$c:=$c.push(New object("name";"Blountsville";"zc";35031)) +$b:=$c.every("TypeLookUp";Is real) //$b=false +``` + +***TypeLookUp*** メソッドã®ä¸­èº«ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d +#DECLARE ($toEval : Object ; $param : Integer) //$1; $2 +If(Value type($toEval.value)=$param) + $toEval.result:=True +End if +``` + + + + + +## .extract() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
        **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------ | ------ |:--:| ----------------------------------------------------------------------------------------------- | +| propertyPath | テキスト | -> | æ–°ã—ã„ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æŠ½å‡ºã™ã‚‹å€¤ã®ã‚ªãƒ–ジェクトプロパティパス | +| targetpath | テキスト | -> | 抽出先ã®ãƒ—ロパティパスã‚ã‚‹ã„ã¯ãƒ—ロパティå | +| オプション | æ•´æ•° | -> | `ck keep null`: è¿”ã•れるコレクション㫠null プロパティをå«ã‚ã¾ã™ (デフォルトã§ã¯ç„¡è¦–ã•れã¾ã™)。 *targetPath* を渡ã—ãŸå ´åˆã«ã¯ã€ã“ã®å¼•æ•°ã¯ç„¡è¦–ã•れã¾ã™ã€‚ | +| 戻り値 | コレクション | <- | 抽出ã—ãŸå€¤ã‚’æ ¼ç´ã—ãŸæ–°ã—ã„コレクション | + + +#### 説明 + +The `.extract()` function creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +戻り値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ä¸­èº«ã¯ã€*targetPath* 引数ã«ã‚ˆã‚Šã¾ã™: + +* *targetPath* ãŒçœç•¥ã•れãŸå ´åˆã€`.extract()` ã¯å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® *propertyPath* ã¨åŒã˜ãƒ‘スを使ã£ã¦ã€æ–°ã—ã„コレクションã«å€¤ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + + デフォルトã§ã¯ã€*propertyPath* ã®ãƒ‘スã®è¦ç´ ãŒ null ã‚ã‚‹ã„㯠undefined ã§ã‚ã£ãŸå ´åˆã«ã¯ã€ãã®è¦ç´ ã¯ç„¡è¦–ã•れã€è¿”ã•ã‚Œã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã•れã¾ã›ã‚“。 *option* パラメーター㫠`ck keep null` 定数を渡ã™ã¨ã€ã“れらã®è¦ç´ ã¯è¿”ã•れるコレクション㫠null è¦ç´ ã¨ã—ã¦æ ¼ç´ã•れã¾ã™ã€‚ + + +* 一ã¤ä»¥ä¸Šã® *targetPath* å¼•æ•°ãŒæ¸¡ã•れãŸå ´åˆã€`.extract()` ã¯å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® *propertyPath* ã‹ã‚‰å€¤ã‚’抽出ã—ã€å¯¾å¿œã™ã‚‹ *targetPath* ã«å€¤ã‚’ä¿å­˜ã—ãŸã‚ªãƒ–ジェクトを新ã—ã„コレクションã®å„è¦ç´ ã¨ã—ã¦æ ¼ç´ã—ã¾ã™ã€‚ Null値ã¯ãã®ã¾ã¾ä¿æŒã•れã¾ã™ (ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§ã¯ *option* ã«å¼•数を渡ã—ã¦ã‚‚無視ã•れã¾ã™)。 + + +#### 例題 1 + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("name";"Cleveland")) +$c.push(New object("zip";5321)) +$c.push(New object("name";"Blountsville")) +$c.push(42) +$c2:=$c.extract("name") // $c2=[Cleveland,Blountsville] +$c2:=$c.extract("name";ck keep null) //$c2=[Cleveland,null,Blountsville,null] +``` + + +#### 例題 2 + + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("zc";35060)) +$c.push(New object("name";Null;"zc";35049)) +$c.push(New object("name";"Cleveland";"zc";35049)) +$c.push(New object("name";"Blountsville";"zc";35031)) +$c.push(New object("name";"Adger";"zc";35006)) +$c.push(New object("name";"Clanton";"zc";35046)) +$c.push(New object("name";"Clanton";"zc";35045)) +$c2:=$c.extract("name";"City") //$c2=[{City:null},{City:Cleveland},{City:Blountsville},{City:Adger},{City:Clanton},{City:Clanton}] +$c2:=$c.extract("name";"City";"zc";"Zip") //$c2=[{Zip:35060},{City:null,Zip:35049},{City:Cleveland,Zip:35049},{City:Blountsville,Zip:35031},{City:Adger,Zip:35006},{City:Clanton,Zip:35046},{City:Clanton,Zip:35045}] +``` + + + + + + +## .fill() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.fill**( *value* : any ) : Collection
        **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection + + +| 引数 | タイプ | | 説明 | +| --------- | ----------------------------------------------- |:--:| ---------------- | +| value | number, Text, Collection, Object, Date, Boolean | -> | 代入ã™ã‚‹å€¤ | +| startFrom | æ•´æ•° | -> | 開始インデックス (å«ã¾ã‚Œã‚‹) | +| end | æ•´æ•° | -> | 終了インデックス (å«ã¾ã‚Œãªã„) | +| 戻り値 | collection | <- | 値ãŒä»£å…¥ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.fill()` function fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +* *startFrom* å¼•æ•°ãŒæ¸¡ã•れãªã‹ã£ãŸå ´åˆã€*value* 引数ã®å€¤ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…¨è¦ç´ ã«ä»£å…¥ã•れã¾ã™ (ã¤ã¾ã‚Šã€*startFrom*=0)。 +* *startFrom* å¼•æ•°ãŒæ¸¡ã•れã€ã‹ã¤ *end* 引数ãŒçœç•¥ã•れãŸå ´åˆã«ã¯ã€*value* 引数ã®å€¤ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã®è¦ç´ ã¾ã§è¨­å®šã•れã¾ã™ (ã¤ã¾ã‚Šã€*end*=length)。 +* *startFrom* 㨠*end* 引数ãŒä¸¡æ–¹æ¸¡ã•れãŸå ´åˆã«ã¯ã€*startFrom* ã‹ã‚‰ *end* ã¾ã§ã®è¦ç´ ã« *value* ãŒä»£å…¥ã•れã¾ã™ã€‚ + +引数ã«çŸ›ç›¾ãŒã‚ã‚‹å ´åˆã€æ¬¡ã®ã‚ˆã†ã«è§£é‡ˆã•れã¾ã™: + +* *startFrom* < 0 ã®å ´åˆã€*startFrom:=startFrom+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 å†è¨ˆç®—ã•れãŸå€¤ã‚‚è² ã®å€¤ã ã£ãŸå ´åˆã€*startFrom* 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ +* *end* < 0 ã®å ´åˆã€ãれ㯠*end:=end+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ã€‚ +* 渡ã•れãŸå€¤ã€ã‚ã‚‹ã„ã¯å†è¨ˆç®—ã•れãŸå€¤ãŒ *end* < *startFrom* ã®å ´åˆã€é–¢æ•°ã¯ãªã«ã‚‚ã—ã¾ã›ã‚“。 + + +#### 例題 + +```4d + var $c : Collection + $c:=New collection(1;2;3;"Lemon";Null;"";4;5) + $c.fill("2") // $c:=[2,2,2,2,2,2,2,2] + $c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello] + $c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello] + $c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello] +``` + + + + + + +## .filter() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection + +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| ---------------------------------- | +| methodName | テキスト | -> | コレクションをフィルターã™ã‚‹ãŸã‚ã«å‘¼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | Mixed | -> | *methodName* ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | コレクション | <- | フィルターã•れãŸè¦ç´ ã‚’æ ¼ç´ã—ãŸæ–°ã—ã„コレクション(シャロウ・コピー) | + + +#### 説明 + +The `.filter()` function returns a new collection containing all elements of the original collection for which *methodName* method result is **true**. ã“ã®é–¢æ•°ã¯ ***シャロウ・コピー*** ã‚’è¿”ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚ªãƒ–ジェクトè¦ç´ ã‚„コレクションè¦ç´ ãŒå«ã¾ã‚Œã¦ã„ãŸå ´åˆã€ãれらã®å‚ç…§ã¯æˆ»ã‚Šå€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§å…±æœ‰ã•れã¾ã™ã€‚ ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªãƒ†ã‚¹ãƒˆã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $1 ã«ã‚ªãƒ–ジェクトをå—ã‘å–りã€ãƒ¡ã‚½ãƒƒãƒ‰ã®æ¡ä»¶ã‚’満ãŸã—ã¦æ–°è¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä»£å…¥ã•れるã¹ãè¦ç´ ã® *$1.result* ã‚’ **true** ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: フィルターã™ã‚‹è¦ç´ ã®å€¤ +* *$2*: *param* +* *$N...*: param2...paramN + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.result* (ブール): è¦ç´ ã®å€¤ãŒãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã®æ¡ä»¶ã«åˆè‡´ã—ã€æ–°ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä»£å…¥ã™ã¹ãå ´åˆã« **true** +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + + +#### 例題 1 + +コレクションã‹ã‚‰ã€é•·ã•㌠6未満ã§ã‚るテキストè¦ç´ ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $col;$colNew : Collection + $col:=New collection("hello";"world";"red horse";66;"tim";"san jose";"miami") + $colNew:=$col.filter("LengthLessThan";6) + //$colNew=["hello","world","tim","miami"] +``` + +***LengthLessThan*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### 例題 2 + +値ã®åž‹ã«å¿œã˜ã¦è¦ç´ ã‚’フィルターã—ã¾ã™: + +```4d + var $c;$c2;$c3 : Collection + $c:=New collection(5;3;1;4;6;2) + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c2:=$c.filter("TypeLookUp";Is real) // $c2=[5,3,1,4,6,2] + $c3:=$c.filter("TypeLookUp";Is object) + // $c3=[{name:Cleveland,zc:35049},{name:Blountsville,zc:35031}] +``` + +***TypeLookUp*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(OB Get type($1;"value")=$2) + + + $1.result:=True + End if +``` + + + + + + +## .find() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.find**( *methodName* : Text { ; *...param* : any } ) : any
        **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any + +| 引数 | タイプ | | 説明 | +| ---------- | ---- |:--:| -------------------------------- | +| startFrom | æ•´æ•° | -> | 検索を開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| methodName | テキスト | -> | 検索用ã«å‘¼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | any | -> | *methodName* ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | any | <- | 最åˆã«è¦‹ã¤ã‹ã£ãŸå€¤ã€‚見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ã¯ Undefined | + + +#### 説明 + +The `.find()` function returns the first value in the collection for which *methodName*, applied on each element, returns **true**. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªãƒ†ã‚¹ãƒˆã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $1 ã«ã‚ªãƒ–ジェクトをå—ã‘å–ã‚Šã€æ¡ä»¶ã‚’満ãŸã™æœ€åˆã®è¦ç´ ã® *$1.result* ã‚’ **true** ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: 評価ã™ã‚‹è¦ç´ ã®å€¤ +* in *$2: param* +* *$N...*: param2...paramN + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.result* (ブール): è¦ç´ ã®å€¤ãŒæ¤œç´¢æ¡ä»¶ã«åˆè‡´ã™ã‚‹å ´åˆã« **true** +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + +デフォルトã§ã¯ã€`.find()` ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“をテストã—ã¾ã™ã€‚ ä»»æ„ã§ã€*startFrom* ã«æ¤œç´¢ã‚’é–‹å§‹ã™ã‚‹è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length 以上ã ã£ãŸå ´åˆã€-1 ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ¤œç´¢ã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +* *startFrom* < 0 ã®å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™(*startFrom:=startFrom+length*)。 **注:** *startFrom* ãŒè² ã®å€¤ã§ã‚ã£ã¦ã‚‚ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å·¦ã‹ã‚‰å³ã¸ã¨æ¤œç´¢ã•れã¾ã™ã€‚ +* *startFrom* = 0 ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒãƒ†ã‚¹ãƒˆã•れã¾ã™ (デフォルト)。 + + +#### 例題 1 + +é•·ã•㌠5æœªæº€ã®æœ€åˆã®ãƒ†ã‚­ã‚¹ãƒˆè¦ç´ ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $col : Collection + $col:=New collection("hello";"world";4;"red horse";"tim";"san jose") + $value:=$col.find("LengthLessThan";5) //$value="tim" +``` + +***LengthLessThan*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + var $1 : Object + var $2 : Integer + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### 例題 2 + +コレクション内を都市åã§æ¤œç´¢ã—ã¾ã™: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.find("FindCity";"Clanton") //$c2={name:Clanton,zc:35046} +``` + +***FindCity*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 // name ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚ªãƒ–ジェクトè¦ç´ å†…ã®ãƒ—ロパティåã§ã™ +``` + + + + + + +## .findIndex() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + + +**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
        **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer + + +| 引数 | タイプ | | 説明 | +| ---------- | ---- |:--:| -------------------------------- | +| startFrom | æ•´æ•° | -> | 検索を開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| methodName | テキスト | -> | 検索用ã«å‘¼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | any | -> | *methodName* ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | æ•´æ•° | <- | 最åˆã«è¦‹ã¤ã‹ã£ãŸå€¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ã¯ -1 | + + +#### 説明 + +The `.findIndex()` function returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true**. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªãƒ†ã‚¹ãƒˆã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $1 ã«ã‚ªãƒ–ジェクトをå—ã‘å–ã‚Šã€æ¡ä»¶ã‚’満ãŸã™æœ€åˆã®è¦ç´ ã® *$1.result* ã‚’ **true** ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: 評価ã™ã‚‹è¦ç´ ã®å€¤ +* in *$2: param* +* *$N...*: param2...paramN + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.result* (ブール): è¦ç´ ã®å€¤ãŒæ¤œç´¢æ¡ä»¶ã«åˆè‡´ã™ã‚‹å ´åˆã« **true** +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + +デフォルトã§ã¯ã€`.findIndex()` ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“をテストã—ã¾ã™ã€‚ ä»»æ„ã§ã€*startFrom* ã«æ¤œç´¢ã‚’é–‹å§‹ã™ã‚‹è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length 以上ã ã£ãŸå ´åˆã€-1 ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ¤œç´¢ã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +* *startFrom* < 0 ã®å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™(*startFrom:=startFrom+length*)。 **注:** *startFrom* ãŒè² ã®å€¤ã§ã‚ã£ã¦ã‚‚ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å·¦ã‹ã‚‰å³ã¸ã¨æ¤œç´¢ã•れã¾ã™ã€‚ +* *startFrom* = 0 ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒãƒ†ã‚¹ãƒˆã•れã¾ã™ (デフォルト)。 + +#### 例題 + +ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§æœ€åˆã«åˆè‡´ã™ã‚‹éƒ½å¸‚åã®ä½ç½®ã‚’探ã—ã¾ã™: + +```4d + var $c : Collection + var $val2;$val3 : Integer + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $val2:=$c.findIndex("FindCity";"Clanton") // $val2=3 + $val3:=$c.findIndex($val2+1;"FindCity";"Clanton") //$val3=4 +``` + +***FindCity*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 +``` + + + + + + + +## .indexOf() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| 引数 | タイプ | | 説明 | +| --------- | --- |:--:| ----------------------------------------- | +| toSearch | å¼ | -> | コレクション内を検索ã™ã‚‹å¼ | +| startFrom | æ•´æ•° | -> | 検索を開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| 戻り値 | æ•´æ•° | <- | 最åˆã«è¦‹ã¤ã‹ã£ãŸ toSearch ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ã¯ -1 | + + +#### 説明 + +The `.indexOf()` function searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*toSearch* パラメーターã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§æ¤œç´¢ã™ã‚‹å¼ã‚’渡ã—ã¾ã™ã€‚ 以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* スカラー値 (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜) +* null 値 +* オブジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å‚ç…§ + +*toSearch* å¼•æ•°ã¯æ¤œå‡ºã™ã¹ãè¦ç´ ã¨å®Œå…¨ã«ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (ç­‰å·æ¼”ç®—å­ã¨åŒã˜ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™)。 + +オプションã¨ã—ã¦ã€*startFrom* 引数を渡ã™ã“ã¨ã§ã€æ¤œç´¢ã‚’é–‹å§‹ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length 以上ã ã£ãŸå ´åˆã€-1 ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ¤œç´¢ã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +* *startFrom* < 0 ã®å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™(*startFrom:=startFrom+length*)。 **注:** *startFrom* ãŒè² ã®å€¤ã§ã‚ã£ã¦ã‚‚ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å·¦ã‹ã‚‰å³ã¸ã¨æ¤œç´¢ã•れã¾ã™ã€‚ +* *startFrom* = 0 ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒãƒ†ã‚¹ãƒˆã•れã¾ã™ (デフォルト)。 + +#### 例題 + + + +```4d + var $col : Collection + var $i : Integer + $col:=New collection(1;2;"Henry";5;3;"Albert";6;4;"Alan";5) + $i:=$col.indexOf(3) //$i=4 + $i:=$col.indexOf(5;5) //$i=9 + $i:=$col.indexOf("al@") //$i=5 + $i:=$col.indexOf("Hello") //$i=-1 +``` + + + + + + +## .indices() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection + +| 引数 | タイプ | | 説明 | +| ----------- | ------ |:--:| -------------------------------- | +| queryString | テキスト | -> | 検索æ¡ä»¶ | +| value | any | -> | プレースホルダー使用時: 比較ã™ã‚‹å€¤ | +| 戻り値 | コレクション | <- | queryString ã«åˆè‡´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | + + +#### 説明 + +The `.indices()` function works exactly the same as the [`.query()`](#query) function but returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions, and not elements themselves. インデックスã¯ã€æ˜‡é †ã«è¿”ã•れã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*queryString* 引数ã«ã¯ã€ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™: + +```4d +propertyPath æ¯”è¼ƒæ¼”ç®—å­ å€¤ {logicalOperator propertyPath æ¯”è¼ƒæ¼”ç®—å­ å€¤} +``` + +*queryString* ãŠã‚ˆã³ *value* パラメーターã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[`dataClass.query()`](dataclassClass.md#query) 関数をå‚ç…§ãã ã•ã„。 + +#### 例題 + + +```4d + var $c; $icol : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $icol:=$c.indices("name = :1";"Cleveland") // $icol=[0] + $icol:=$c.indices("zc > 35040") // $icol=[0,3,4] +``` + + + + + +## .insert() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.insert**( *index* : Integer ; *element* : any ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ |:--:| ---------------- | +| index | æ•´æ•° | -> | è¦ç´ ã®æŒ¿å…¥ä½ç½® | +| element | any | -> | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æŒ¿å…¥ã™ã‚‹è¦ç´  | +| 戻り値 | コレクション | <- | è¦ç´ ã®æŒ¿å…¥ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.insert()` function inserts *element* at the specified *index* position in the collection instance and returns the edited collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +*index* パラメーターã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§è¦ç´ ã‚’挿入ã™ã‚‹ä½ç½®ã‚’渡ã—ã¾ã™ã€‚ +> **警告**: コレクションè¦ç´ ã¯ 0 起点ã§ã‚ã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +* 指定ã—㟠*index* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length より大ãã„å ´åˆã€å®Ÿéš›ã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã«è¨­å®šã•れã¾ã™ã€‚ +* *index* < 0 ã®å ´åˆã€*index:=index+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 +* è¨ˆç®—çµæžœã‚‚è² ã®å€¤ã§ã‚ã‚‹å ´åˆã€index 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ + +コレクションãŒå—ã‘入れるもã®ã§ã‚れã°ã€ã©ã‚“ãªåž‹ã®è¦ç´ ã‚‚ (ãŸã¨ãˆã°ä»–ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚‚) 挿入å¯èƒ½ã§ã™ã€‚ + +#### 例題 + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d") //$col=["a","b","c","d"] + $col.insert(2;"X") //$col=["a","b","X","c","d"] + $col.insert(-2;"Y") //$col=["a","b","X","Y","c","d"] + $col.insert(-10;"Hi") //$col=["Hi","a","b","X","Y","c","d"] +``` + + + + + + +## .join() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text +| 引数 | タイプ | | 説明 | +| --------- | ---- |:--:| ------------------------------------------------ | +| delimiter | テキスト | -> | è¦ç´ é–“ã«ç”¨ã„る区切り文字 | +| オプション | æ•´æ•° | -> | `ck ignore null or empty`: 戻り値㫠null ã¨ç©ºã®æ–‡å­—列をå«ã‚ãªã„ | +| 戻り値 | テキスト | <- | 区切り文字を使ã£ã¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…¨è¦ç´ ã‚’ã¤ãªã’ãŸæ–‡å­—列 | + + +#### 説明 + +The `.join()` function converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator.The function returns the resulting string. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +デフォルトã§ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® null ã‚ã‚‹ã„ã¯ç©ºã®è¦ç´ ã‚‚æˆ»ã‚Šå€¤ã®æ–‡å­—列ã«å«ã‚ã¾ã™ã€‚ ã“ã‚Œã‚‰ã‚’æˆ»ã‚Šå€¤ã®æ–‡å­—列ã«å«ã‚ãŸããªã„å ´åˆã¯ã€*option* パラメーター㫠`ck ignore null or empty` 定数を渡ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $c : Collection + var $t1;$t2 : Text + $c:=New collection(1;2;3;"Paris";Null;"";4;5) + $t1:=$c.join("|") //1|2|3|Paris|null||4|5 + $t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5 +``` + + + + + +## .lastIndexOf() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| 引数 | タイプ | | 説明 | +| --------- | --- |:--:| ----------------------------------------- | +| toSearch | å¼ | -> | コレクション内を検索ã™ã‚‹è¦ç´  | +| startFrom | æ•´æ•° | -> | 検索を開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| 戻り値 | æ•´æ•° | <- | 最後ã«è¦‹ã¤ã‹ã£ãŸ toSearch ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€‚見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ã¯ -1 | + + +#### 説明 + +The `.lastIndexOf()` function searches the *toSearch* expression among collection elements and returns the index of the last occurrence, or -1 if it was not found. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*toSearch* パラメーターã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§æ¤œç´¢ã™ã‚‹å¼ã‚’渡ã—ã¾ã™ã€‚ 以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* スカラー値 (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜) +* null 値 +* オブジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å‚ç…§ + +*toSearch* å¼•æ•°ã¯æ¤œå‡ºã™ã¹ãè¦ç´ ã¨å®Œå…¨ã«ä¸€è‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (ç­‰å·æ¼”ç®—å­ã¨åŒã˜ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™)。 + +オプションã¨ã—ã¦ã€*startFrom* 引数を渡ã™ã“ã¨ã§ã€é€†é †æ¤œç´¢ã‚’é–‹å§‹ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã‹ã‚‰ 1を引ã„ãŸæ•°å­— (coll.length-1) 以上ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒæ¤œç´¢ã•れã¾ã™ (デフォルト)。 +* *startFrom* < 0 ã®å ´åˆã€*startFrom:=startFrom+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 è¨ˆç®—çµæžœã‚‚è² ã®å€¤ã§ã‚ã‚‹å ´åˆã€-1 ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ¤œç´¢ã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ **注:** *startFrom* ãŒè² ã®å€¤ã§ã‚ã£ã¦ã‚‚ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å³ã‹ã‚‰å·¦ã¸ã¨æ¤œç´¢ã•れã¾ã™ã€‚ +* *startFrom* = 0 ã®å ´åˆã€-1 ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ¤œç´¢ã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $col : Collection + var $pos1;$pos2;$pos3;$pos4;$pos5 : Integer + $col:=Split string("a,b,c,d,e,f,g,h,i,j,e,k,e";",") //$col.length=13 + $pos1:=$col.lastIndexOf("e") // 戻り値: 12 + $pos2:=$col.lastIndexOf("e";6) // 戻り値: 4 + $pos3:=$col.lastIndexOf("e";15) // 戻り値: 12 + $pos4:=$col.lastIndexOf("e";-2) // 戻り値: 10 + $pos5:=$col.lastIndexOf("x") // 戻り値: -1 +``` + + + + + +## .length + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R5 | 追加 | +
        + +**.length** : Integer + + +#### 説明 + +The `.length` property returns the number of elements in the collection. + +`.length` プロパティã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ä½œæˆæ™‚ã«åˆæœŸåŒ–ã•れã¾ã™ã€‚ è¦ç´ ã‚’追加・削除ã™ã‚‹ã¨ã€å¿…è¦ã«å¿œã˜ã¦ length ã¯æ›´æ–°ã•れã¾ã™ã€‚ ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ (ã“れを使用ã—ã¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚µã‚¤ã‚ºã‚’設定ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 + +#### 例題 + + +```4d + var $col : Collection // $col.length ㌠0 ã«åˆæœŸåŒ–ã•れã¾ã™ + $col:=New collection("one";"two";"three") // $col.length ㌠3 ã«æ›´æ–°ã•れã¾ã™ + $col[4]:="five" // $col.length ㌠5 ã«æ›´æ–°ã•れã¾ã™ + $vSize:=$col.remove(0;3).length // $vSize=2 +``` + + + + + +## .map() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.map**( *methodName* : Text { ; *...param* : any } ) : Collection + +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| ------------------------ | +| methodName | テキスト | -> | コレクションè¦ç´ ã‚’変æ›ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | any | -> | methodName ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | コレクション | <- | 変æ›ã•れãŸå€¤ã‚’æ ¼ç´ã™ã‚‹æ–°ã—ã„コレクション | + + +#### 説明 + +The `.map()` function creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection. オプションã§ã€*param* パラメーターã«ã€*methodName* ã«æ¸¡ã™å¼•数を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `.map()` ã¯å¸¸ã«ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨åŒã˜ã‚µã‚¤ã‚ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªå‡¦ç†ã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value* (ä»»æ„ã®åž‹): マップã™ã‚‹è¦ç´ ã®å€¤ +* in *$2* (ä»»æ„ã®åž‹): *param* +* in *$N...* (ä»»æ„ã®åž‹): *paramN...* + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + + +* *$1.result* (ä»»æ„ã®åž‹): çµæžœã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿½åŠ ã™ã‚‹ã€å¤‰æ›ã•れãŸå€¤ +* *$1.stop* (ブール): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + +#### 例題 + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;4;9;10;20) + $c2:=$c.map("Percentage";$c.sum()) + //$c2=[2.27,9.09,20.45,22.73,45.45] +``` + +***Percentage*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + var $1 : Object + var $2 : Real + $1.result:=Round(($1.value/$2)*100;2) +``` + + + + + + + +## .max() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.max**( { *propertyPath* : Text } ) : any +| 引数 | タイプ | | 説明 | +| ------------ | ----------------------------------------------- |:--:| ------------------ | +| propertyPath | テキスト | -> | 評価ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | Boolean, Text, Number, Collection, Object, Date | <- | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®æœ€å¤§å€¤ | + + +#### 説明 + +The `.max()` function returns the element with the highest value in the collection (the last element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +コレクションãŒç•°ãªã‚‹åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€`.max()` 関数ã¯åž‹ã®ãƒªã‚¹ãƒˆé †ã®ã€æœ€å¾Œã®åž‹ã®æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ ([`.sort()`](#sort) å‚ç…§)。 + +コレクションãŒã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€æœ€å¤§å€¤ã‚’å–å¾—ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘スを *propertyPath* ã«æ¸¡ã—ã¾ã™ã€‚ + +コレクションãŒç©ºã®å ´åˆã€ `.max()` 㯠*Undefined* ã‚’è¿”ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $max:=$col.max() //{name:Alabama,salary:10500} + $maxSal:=$col.max("salary") //50000 + $maxName:=$col.max("name") //"Wesson" +``` + + + + + +## .min() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.min**( { *propertyPath* : Text } ) : any +| 引数 | タイプ | | 説明 | +| ------------ | ----------------------------------------------- |:--:| ------------------ | +| propertyPath | テキスト | -> | 評価ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | Boolean, Text, Number, Collection, Object, Date | <- | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®æœ€å°å€¤ | + + +#### 説明 + +The `.min()` function returns the element with the smallest value in the collection (the first element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +コレクションãŒç•°ãªã‚‹åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€`.min()` 関数ã¯åž‹ã®ãƒªã‚¹ãƒˆé †ã®ã€æœ€åˆã®åž‹ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™ ([`.sort()`](#sort) å‚ç…§)。 + +コレクションãŒã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€æœ€å°å€¤ã‚’å–å¾—ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘スを *propertyPath* ã«æ¸¡ã—ã¾ã™ã€‚ + +コレクションãŒç©ºã®å ´åˆã€ `.min()` 㯠*Undefined* ã‚’è¿”ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $min:=$col.min() //55 + $minSal:=$col.min("salary") //10000 + $minName:=$col.min("name") //"Alabama" +``` + + + + + +## .orderBy() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.orderBy**( ) : Collection
        **.orderBy**( *pathStrings* : Text ) : Collection
        **.orderBy**( *pathObjects* : Collection ) : Collection
        **.orderBy**( *ascOrDesc* : Integer ) : Collection + +| 引数 | タイプ | | 説明 | +| -- | --- |::| -- | +| | | | | + +|pathStrings|Text|->|コレクションã®ä¸¦ã¹æ›¿ãˆåŸºæº–ã¨ã™ã‚‹ãƒ—ロパティパス| |pathObjects|Collection|->|æ¡ä»¶ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³| |ascOrDesc|Interger|->|`ck ascending` ã¾ãŸã¯ `ck descending` (スカラー値)| |戻り値|Collection |<-|ä¸¦ã¹æ›¿ãˆã‚‰ã‚ŒãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ”ー (シャロウ・コピー)| + + +#### 説明 + +The `.orderBy()` function returns a new collection containing all elements of the collection in the specified order. + +ã“ã®é–¢æ•°ã¯ *シャロウ・コピー* ã‚’è¿”ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚ªãƒ–ジェクトè¦ç´ ã‚„コレクションè¦ç´ ãŒå«ã¾ã‚Œã¦ã„ãŸå ´åˆã€ãれらã®å‚ç…§ã¯æˆ»ã‚Šå€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§å…±æœ‰ã•れã¾ã™ã€‚ ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +引数を渡ã•ãªã‹ã£ãŸå ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã‚’昇順ã«ä¸¦ã¹æ›¿ãˆã¾ã™ (オブジェクトやコレクションãªã©ã®ä»–ã®åž‹ã¯ä¸¦ã¹æ›¿ãˆã•れãªã„ã¾ã¾è¿”ã•れã¾ã™)。 ã“ã®è‡ªå‹•ä¸¦ã¹æ›¿ãˆé †ã¯ã€*ascOrDesc* パラメーター㫠`ck ascending` ã‚ã‚‹ã„㯠`ck descending` 定数を渡ã™ã“ã¨ã§å¤‰æ›´ã§ãã¾ã™ (以下å‚ç…§)。 + +ã¾ãŸã€å¼•数を渡ã™ã“ã¨ã§ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã‚’ã©ã®ã‚ˆã†ã«ä¸¦ã¹æ›¿ãˆã‚‹ã‹ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 次㮠3ã¤ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +* *pathStrings* : Text (フォーミュラ)。 **シンタックス**: `propertyPath1 {desc ã¾ãŸã¯ asc}, propertyPath2 {desc ã¾ãŸã¯ asc},...` (デフォルトã®ä¸¦ã³é †: asc)。 *pathStrings* ã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚‰ã‚ŒãŸã€1〜n ã®ãƒ—ロパティパスã¨ä¸¦ã³é † (ä»»æ„) ã§æ§‹æˆã•れãŸãƒ•ォーミュラを格ç´ã—ã¾ã™ã€‚ プロパティを渡ã™é †ç•ªãŒã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ä¸¦ã¹æ›¿ãˆã®å„ªå…ˆé †ä½ã‚’決定ã—ã¾ã™ã€‚ デフォルトã§ã¯ã€ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ˜‡é †ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ 並ã³é †ã‚’設定ã™ã‚‹ã«ã¯ã€ãƒ—ロパティパスã®å¾Œã«åŠè§’スペースã§åŒºåˆ‡ã£ãŸã‚ã¨ã«ã€æ˜‡é †ã‚’指定ã™ã‚‹ã«ã¯ "asc"ã€é™é †ã‚’指定ã™ã‚‹ã«ã¯ "desc" を渡ã—ã¾ã™ã€‚ + +* *pathObjects* : Collection。 *pathObjects* コレクションã«ã¯å¿…è¦ãªæ•°ã ã‘オブジェクトを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ˜‡é †ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ ("descending" 㯠false)。 コレクションã®å„è¦ç´ ã¯ã€ä»¥ä¸‹ã®æ§‹é€ ã‚’æŒã¤ã‚ªãƒ–ジェクトを格ç´ã—ã¾ã™: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +* *ascOrDesc* : Integer。 **Objects and collections** テーマã‹ã‚‰ã€ä»¥ä¸‹ã®å®šæ•°ã®ã„ãšã‚Œã‹ä¸€ã¤ã‚’渡ã—ã¾ã™: + + | 定数 | タイプ | 値 | 説明 | + | ------------- | ------- | - | -------------------- | + | ck ascending | Longint | 0 | è¦ç´ ã¯æ˜‡é †ã«ä¸¦ã¹ã‚‰ã‚Œã¾ã™ (デフォルト) | + | ck descending | Longint | 1 | è¦ç´ ã¯é™é †ã«ä¸¦ã¹ã‚‰ã‚Œã¾ã™ | + + ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã®ã¿ã‚’ä¸¦ã¹æ›¿ãˆã¾ã™ (オブジェクトやコレクションãªã©ã®ä»–ã®åž‹ã¯ä¸¦ã¹æ›¿ãˆã•れãªã„ã¾ã¾è¿”ã•れã¾ã™)。 + +コレクションãŒç•°ãªã‚‹åž‹ã®è¦ç´ ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€ãれらã¯ã¾ãšåž‹ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—分ã‘ã•れã€ãã®ã‚ã¨ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ åž‹ã¯ä»¥ä¸‹ã®é †ç•ªã§è¿”ã•れã¾ã™: + +1. null +2. ブール +3. 文字列 +4. 数値 +5. オブジェクト +6. コレクション +7. 日付 + +#### 例題 1 + +数値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’昇順ãŠã‚ˆã³é™é †ã«ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $c; $c2; $3 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(Random) + End for + $c2:=$c.orderBy(ck ascending) + $c3:=$c.orderBy(ck descending) +``` + + +#### 例題 2 + +オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã«æŒ‡å®šã—ãŸãƒ—ロパティåã«åŸºã¥ã„ã¦ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $c; $c2 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $c2:=$c.orderBy("value desc") + $c2:=$c.orderBy("value desc, id") + $c2:=$c.orderBy("value desc, id asc") +``` + +オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’プロパティパスã§ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + + $c2:=$c.orderBy("phones.p1 asc") +``` + + +#### 例題 3 + +オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã€*pathObjects* コレクションを使用ã—ã¦ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $crit; $c; $c2 : Collection + $crit:=New collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $crit.push(New object("propertyPath";"value";"descending";True)) + $crit.push(New object("propertyPath";"id";"descending";False)) + $c2:=$c.orderBy($crit) +``` + +プロパティパスã§ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $crit; $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + $crit:=New collection(New object("propertyPath";"phones.p2";"descending";True)) + $c2:=$c.orderBy($crit) +``` + + + + + + + +## .orderByMethod() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection + +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| ---------------------------- | +| methodName | テキスト | -> | ä¸¦ã¹æ›¿ãˆé †ã®æŒ‡å®šã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰å | +| extraParam | å¼ | -> | methodName ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | コレクション | <- | ä¸¦ã¹æ›¿ãˆã‚‰ã‚ŒãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ”ー (シャロウ・コピー) | + + +#### 説明 + +The `.orderByMethod()` function returns a new collection containing all elements of the collection in the order defined through the *methodName* method. + +ã“ã®é–¢æ•°ã¯ *シャロウ・コピー* ã‚’è¿”ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚ªãƒ–ジェクトè¦ç´ ã‚„コレクションè¦ç´ ãŒå«ã¾ã‚Œã¦ã„ãŸå ´åˆã€ãれらã®å‚ç…§ã¯æˆ»ã‚Šå€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§å…±æœ‰ã•れã¾ã™ã€‚ ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€äºŒã¤ã®å€¤ã‚’比較ã—ã¦ã€æœ€åˆã®å€¤ãŒäºŒã¤ç›®ã®å€¤ã‚ˆã‚Šä½Žã„å ´åˆã« *$1.result* ã« **true** ã‚’è¿”ã™æ¯”較メソッドã®å称を渡ã—ã¾ã™ã€‚ å¿…è¦ã§ã‚れ㰠*methodName* ã«è¿½åŠ ã®å¼•数を渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +* *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + * $1 (オブジェクト): + * *$1.value* (ä»»æ„ã®åž‹): 比較ã™ã‚‹ä¸€ã¤ç›®ã®è¦ç´ ã®å€¤ + * *$1.value2* (ä»»æ„ã®åž‹): 比較ã™ã‚‹äºŒã¤ç›®ã®è¦ç´ ã®å€¤ + * $2...$N (ä»»æ„ã®åž‹): 追加ã®å¼•æ•° +* *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + * *$1.result* (ブール): *$1.value < $1.value2* ã®å ´åˆã¯ **true**ã€ãれ以外㯠**false** + +#### 例題 1 + +文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’アルファベット順ã§ã¯ãªãã€æ•°å€¤é †ã«ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push("33";"4";"1111";"222") + $c2:=$c.orderBy() //$c2=["1111","222","33","4"], アルファベット順 + $c3:=$c.orderByMethod("NumAscending") // $c3=["4","33","222","1111"] +``` + + ***NumAscending*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + + +```4d + $1.result:=Num($1.value)Length(String($1.value2)) +``` + +#### 例題 3 + +文字コード順ã¾ãŸã¯ã‚¢ãƒ«ãƒ•ァベット順ã«ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã‚’ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d +var $strings1; $strings2 : Collection +$strings1:=New collection("Alpha";"Charlie";"alpha";"bravo";"Bravo";"charlie") + +// 文字コード順: +$strings2:=$strings1.orderByMethod("sortCollection";sk character codes) +// çµæžœ : ["Alpha","Bravo","Charlie","alpha","bravo","charlie"] + +// アルファベット順: +$strings2:=$string1s.orderByMethod("sortCollection";sk strict) +// çµæžœ : ["alpha","Alpha","bravo","Bravo","charlie","Charlie"] +``` + +***sortCollection*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d +var$1Object +var$2Integer // ä¸¦ã¹æ›¿ãˆã‚ªãƒ—ション + +$1.result:=(Compare strings($1.value;$1.value2;$2)<0) +``` + + + + + + +## .pop() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + + +**.pop()** : any +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ------------ | +| 戻り値 | any | <- | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã®è¦ç´  | + + +#### 説明 + +The `.pop()` function removes the last element from the collection and returns it as the function result. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +空ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«é©ç”¨ã—ãŸå ´åˆã€ `.pop()` 㯠**Undefined* ã‚’è¿”ã—ã¾ã™ã€‚

        + +#### 例題 + +`.pop()` ã‚’ [`.push()`](#push) ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã™ã‚‹ã¨ã€ã‚¹ã‚¿ãƒƒã‚¯ (å¾Œå…¥ã‚Œå…ˆå‡ºã—æ§‹é€ ) を実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```4d + var $stack : Collection + $stack:=New collection //$stack=[] + $stack.push(1;2) //$stack=[1,2] + $stack.pop() //$stack=[1] ã€æˆ»ã‚Šå€¤ã¯ 2 ã§ã™ + $stack.push(New collection(4;5)) //$stack=[[1,[4,5]] + $stack.pop() //$stack=[1] ã€æˆ»ã‚Šå€¤ã¯ [4,5] ã§ã™ + $stack.pop() //$stack=[] ã€æˆ»ã‚Šå€¤ã¯ 1 ã§ã™ +``` + + + + + + + +## .push() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.push**( *element* : any { ;...*elementN* } ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ |:--:| ---------------- | +| element | Mixed | -> | コレクションã«è¿½åŠ ã™ã‚‹è¦ç´  | +| 戻り値 | コレクション | <- | è¦ç´ ã®è¿½åŠ ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.push()` function appends one or more *element*(s) to the end of the collection instance and returns the edited collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + + +#### 例題 1 + +```4d + var $col : Collection + $col:=New collection(1;2) //$col=[1,2] + $col.push(3) //$col=[1,2,3] + $col.push(6;New object("firstname";"John";"lastname";"Smith")) + //$col=[1,2,3,6,{firstname:John,lastname:Smith} +``` + + + +#### 例題 2 + +戻り値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¸¦ã³æ›¿ãˆã¾ã™: + +```4d + var $col; $sortedCol : Collection + $col:=New collection(5;3;9) //$col=[5,3,9] + $sortedCol:=$col.push(7;50).sort() + //$col=[5,3,9,7,50] + //$sortedCol=[3,5,7,9,50] +``` + + + + + + + + +## .query() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------- | +| v17 R5 | querySettings をサãƒãƒ¼ãƒˆ | +| v16 R6 | 追加 | +
        + +**.query**( *queryString* : Text ; *...value* : any ) : Collection
        **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------- | ------ |:--:| ---------------------------------- | +| queryString | テキスト | -> | 検索æ¡ä»¶ | +| value | Mixed | -> | プレースホルダー使用時: 比較ã™ã‚‹å€¤ | +| querySettings | オブジェクト | -> | クエリオプション: parameters, attributes ä»– | +| 戻り値 | コレクション | <- | queryString ã«åˆè‡´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´  | + + +#### 説明 + +The `.query()` function returns all elements of a collection of objects that match the search conditions defined by *queryString* and (optionally) *value* or *querySettings*. ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*queryString* 引数ã«ã¯ã€ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™: + +```4d +propertyPath æ¯”è¼ƒæ¼”ç®—å­ å€¤ {logicalOperator propertyPath æ¯”è¼ƒæ¼”ç®—å­ å€¤} +``` + +*queryString* ãŠã‚ˆã³ *value* ã‚„ *querySettings* パラメーターを使ã£ã¦ã‚¯ã‚¨ãƒªã‚’ビルドã™ã‚‹æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[`DataClass.query()`](DataClassClass.md#query) 関数をå‚ç…§ãã ã•ã„。 + +> *queryString* 引数ãŠã‚ˆã³ *formula* オブジェクト引数ã®ä½¿ç”¨ã«é–¢ã‚らãšã€ãƒ•ォーミュラ㯠`collection.query()` 関数ã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 + +#### 例題 1 + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.query("name = :1";"Cleveland") //$c2=[{name:Cleveland,zc:35049}] + $c3:=$c.query("zc > 35040") //$c3=[{name:Cleveland,zc:35049},{name:Clanton,zc:35046},{name:Clanton,zc:35045}] +``` + + +#### 例題 2 + + +```4d + var $c : Collection + $c:=New collection + $c.push(New object("name";"Smith";"dateHired";!22-05-2002!;"age";45)) + $c.push(New object("name";"Wesson";"dateHired";!30-11-2017!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) +``` + +上記ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã¯åå‰ã« "in" ãŒå«ã¾ã‚Œã¦ã„る人物を返ã—ã¾ã™: + +```4d + $col:=$c.query("name = :1";"@in@") + //$col=[{name:Winch...},{name:Sterling...}] +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€å¤‰æ•°ã«æ ¼ç´ã—ãŸæ–‡å­—列 (ユーザーãŒå…¥åŠ›ã—ãŸæ–‡å­—列ãªã©) ã‹ã‚‰åå‰ãŒå§‹ã¾ã‚‰ãªã„人物を返ã—ã¾ã™: + +```4d + $col:=$c.query("name # :1";$aString+"@") + //if $astring="W" + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€å¹´é½¢ãŒä¸æ˜Žãª (プロパティ㌠null ã‚ã‚‹ã„㯠undefined ã«è¨­å®šã•れã¦ã„ã‚‹) 人物を返ã—ã¾ã™: + +```4d + $col:=$c.query("age=null") // "null" ã§ã¯ãƒ—レースホルダーã¯ä½¿ãˆã¾ã›ã‚“ + //$col=[{name:Wesson...},{name:Sterling...},{name:Mark...}] +``` + +以下ã®ã‚¯ã‚¨ãƒªã¯ã€æŽ¡ç”¨ã‹ã‚‰90日を超ãˆã¦ã„る人物を返ã—ã¾ã™: + +```4d + $col:=$c.query("dateHired < :1";(Current date-90)) + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] (今日㌠01/10/2018 ã®å ´åˆ) +``` + + +#### 例題 3 + +追加ã®ã‚¯ã‚¨ãƒªä¾‹ã«ã¤ã„ã¦ã¯ã€[`dataClass.query()`](dataclassClass.md#query) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + + + + + +## .reduce() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.reduce**( *methodName* : Text ) : any
        **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any + +| 引数 | タイプ | | 説明 | +| ---------- | ----------------------------------------------- |:--:| ----------------------------------- | +| methodName | テキスト | -> | コレクションè¦ç´ ã‚’処ç†ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰å | +| initValue | Text, Number, Object, Collection, Date, Boolean | -> | *methodName* ã®æœ€åˆã®å‘¼ã³å‡ºã—ã«æœ€åˆã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å€¤ | +| param | å¼ | -> | *methodName* ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | Text, Number, Object, Collection, Date, Boolean | <- | アキュムレーター値ã®çµæžœ | + + +#### 説明 + + +The `.reduce()` function applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„è¦ç´ ã‚’å—ã‘å–りã€ä»»æ„ã®å‡¦ç†ã‚’実行ã—ã¦ã€çµæžœã‚’ *$1.accumulator* ã«è“„ç©ã—ã¾ã™ã€‚ã“ã®å€¤ã¯æœ€çµ‚的㫠*$1.value* ã«è¿”ã•れã¾ã™ã€‚ + +*initValue* ã«å¼•数を渡ã™ã“ã¨ã§ã€ã‚¢ã‚­ãƒ¥ãƒ ãƒ¬ãƒ¼ã‚¿ãƒ¼ã‚’åˆæœŸåŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ çœç•¥ã•れãŸå ´åˆã¯ã€*$1.accumulator* 㯠*Undefined* ã‹ã‚‰é–‹å§‹ã•れã¾ã™ã€‚ + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: 処ç†ã™ã‚‹è¦ç´ ã®å€¤ +* in *$2: param* +* in *$N...*: *paramN...* + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.accumulator*: メソッドã§å¤‰æ›´ã™ã‚‹å€¤ã€‚*initValue* ã«ã‚ˆã£ã¦åˆæœŸåŒ–ã—ã¾ã™ã€‚ +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + + +#### 例題 1 + + +```4d + C_COLLECTION($c) + $c:=New collection(5;3;5;1;3;4;4;6;2;2) + $r:=$c.reduce("Multiply";1) // 戻り値㯠86400 ã§ã™ +``` + +***Multiply*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + If(Value type($1.value)=Is real) + $1.accumulator:=$1.accumulator*$1.value + End if +``` + +#### 例題 + +複数ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã‚’å˜ä¸€ã®å€¤ã«ã¾ã¨ã‚ã¾ã™: + +```4d + var $c;$r : Collection + $c:=New collection + $c.push(New collection(0;1)) + $c.push(New collection(2;3)) + $c.push(New collection(4;5)) + $c.push(New collection(6;7)) + $r:=$c.reduce("Flatten") //$r=[0,1,2,3,4,5,6,7] +``` + +***Flatten*** メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + If($1.accumulator=Null) + $1.accumulator:=New collection + End if + $1.accumulator.combine($1.value) +``` + + + + + +## .remove() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection + +| 引数 | タイプ | | 説明 | +| ------- | ------ |:--:| -------------------- | +| index | æ•´æ•° | -> | 削除を開始ã™ã‚‹è¦ç´ ã®ä½ç½® | +| howMany | æ•´æ•° | -> | 削除ã™ã‚‹è¦ç´ ã®æ•°ã€çœç•¥æ™‚㯠1è¦ç´ ã‚’削除 | +| 戻り値 | コレクション | <- | è¦ç´ ãŒå‰Šé™¤ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.remove()` function removes one or more element(s) from the specified *index* position in the collection and returns the edited collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +*index* パラメーターã«ã¯ã€å‰Šé™¤ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ä½ç½®ã‚’渡ã—ã¾ã™ã€‚ +> **警告**: コレクションè¦ç´ ã¯ 0 起点ã§ã‚ã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 指定ã—㟠*index* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length より大ãã„å ´åˆã€å®Ÿéš›ã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã«è¨­å®šã•れã¾ã™ã€‚ + +* *index* < 0 ã®å ´åˆã€*index:=index+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 +* è¨ˆç®—çµæžœã‚‚è² ã®å€¤ã§ã‚ã‚‹å ´åˆã€*index* 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ +* è¨ˆç®—çµæžœãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length より大ãã„å ´åˆã«ã¯ã€*index* 㯠length ã«è¨­å®šã•れã¾ã™ã€‚ + +*howMany* ã«ã¯ã€*index* ã®ä½ç½®ã‹ã‚‰å‰Šé™¤ã™ã‚‹è¦ç´ ã®æ•°ã‚’渡ã—ã¾ã™ã€‚ *howMany* ãŒçœç•¥ã•れãŸå ´åˆã€1ã¤ã®è¦ç´ ã®ã¿ãŒå‰Šé™¤ã•れã¾ã™ã€‚ + + + +空ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰è¦ç´ ã‚’削除ã—よã†ã¨ã—ãŸå ´åˆã€é–¢æ•°ã¯ä½•ã‚‚ã—ã¾ã›ã‚“ (エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 + + +#### 例題 + + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d";"e";"f";"g";"h") + $col.remove(3) // $col=["a","b","c","e","f","g","h"] + $col.remove(3;2) // $col=["a","b","c","g","h"] + $col.remove(-8;1) // $col=["b","c","g","h"] + $col.remove(-3;1) // $col=["b","g","h"] +``` + + + + + + + +## .resize() + + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + + + +**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection +| 引数 | タイプ | | 説明 | +| ------------ | ----------------------------------------------- |:--:| --------------- | +| size | æ•´æ•° | -> | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„サイズ | +| defaultValue | Number, Text, Object, Collection, Date, Boolean | -> | æ–°è¦è¦ç´ ã®ãƒ‡ãƒ•ォルト値 | +| 戻り値 | コレクション | <- | リサイズã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.resize()` function sets the collection length to the specified new size and returns the resized collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +* *size* < lengthã®å ´åˆã€ä½™åˆ†ãªè¦ç´ ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰å‰Šé™¤ã•れã¾ã™ã€‚ +* *size* > lengthã®å ´åˆã€ä¸è¶³åˆ†ã®è¦ç´ ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿½åŠ ã•れã¾ã™ã€‚ + +デフォルトã§ã€æ–°è¦è¦ç´ ã«ã¯ **null** å€¤ãŒæ ¼ç´ã•れã¾ã™ã€‚ *defaultValue* ã«å¼•数を渡ã™ã“ã¨ã§ã€æ–°è¦è¦ç´ ã®å€¤ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 例題 + + +```4d + var $c : Collection + $c:=New collection + $c.resize(10) // $c=[null,null,null,null,null,null,null,null,null,null] + + $c:=New collection + $c.resize(10;0) // $c=[0,0,0,0,0,0,0,0,0,0] + + $c:=New collection(1;2;3;4;5) + $c.resize(10;New object("name";"X")) //$c=[1,2,3,4,5,{name:X},{name:X},{name:X},{name:X},{name:X}] + + $c:=New collection(1;2;3;4;5) + $c.resize(2) //$c=[1,2] + +``` + + + + + + + +## .reverse() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.reverse( )** : Collection +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ------------------- | +| 戻り値 | コレクション | <- | 逆順ã«è¦ç´ ã‚’æ ¼ç´ã—ãŸæ–°ã—ã„コレクション | + + +#### 説明 + +The `.reverse()` function returns a deep copy of the collection with all its elements in reverse order. ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +#### 例題 + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;3;5;2;4;6) + $c2:=$c.reverse() //$c2=[6,4,2,5,3,1] +``` + + + + + + +## .shift() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.shift()** : any +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ----------- | +| 戻り値 | any | <- | コレクションã®å…ˆé ­è¦ç´  | + + +#### 説明 + +The `.shift()` function removes the first element of the collection and returns it as the function result. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +コレクションãŒç©ºã®å ´åˆã€ 関数ã¯ãªã«ã‚‚ã—ã¾ã›ã‚“。 + +#### 例題 + + +```4d + var $c : Collection + var $val : Variant + $c:=New collection(1;2;4;5;6;7;8) + $val:=$c.shift() + // $val=1 + // $c=[2,4,5,6,7,8] +``` + + + + + + +## .slice() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| --------- | ------ |:--:| ---------------------------- | +| startFrom | æ•´æ•° | -> | 開始インデックス (å«ã¾ã‚Œã‚‹) | +| end | æ•´æ•° | -> | 終了インデックス (å«ã¾ã‚Œãªã„) | +| 戻り値 | コレクション | <- | 抜粋è¦ç´ ã‚’æ ¼ç´ã—ãŸæ–°ã—ã„コレクション(シャロウ・コピー) | + + +#### 説明 + +The `.slice()` function returns a portion of a collection into a new collection, selected from *startFrom* index to *end* index (end not included). ã“ã®é–¢æ•°ã¯ *シャロウ・コピー* ã‚’è¿”ã—ã¾ã™ã€‚ ã¾ãŸã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆã€è¿”ã•れるコレクションもã¾ãŸå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +戻り値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€*startFrom* å¼•æ•°ã§æŒ‡å®šã—ãŸè¦ç´  (å«ã¾ã‚Œã‚‹) ã‹ã‚‰ã€*end* å¼•æ•°ã§æŒ‡å®šã—ãŸè¦ç´ ã¾ã§ (å«ã¾ã‚Œãªã„) ã®å…¨è¦ç´ ãŒæ ¼ç´ã•れã¾ã™ã€‚ *startFrom* 引数ã®ã¿ã‚’渡ã—ãŸå ´åˆã«ã¯ã€*startFrom* å¼•æ•°ã§æŒ‡å®šã—ãŸè¦ç´ ã‹ã‚‰æœ€å¾Œã®è¦ç´ ã¾ã§ãŒæˆ»ã‚Šå€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã•れã¾ã™ã€‚ + +* *startFrom* < 0 ã®å ´åˆã€*startFrom:=startFrom+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (コレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 +* å†è¨ˆç®—ã•れãŸå€¤ã‚‚è² ã®å€¤ã ã£ãŸå ´åˆã€*startFrom* 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ +* *end* < 0 ã®å ´åˆã€ãれ㯠*end:=end+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ã€‚ +* 渡ã•れãŸå€¤ã€ã‚ã‚‹ã„ã¯å†è¨ˆç®—ã•れãŸå€¤ãŒ *end* < *startFrom* ã®å ´åˆã€é–¢æ•°ã¯ãªã«ã‚‚ã—ã¾ã›ã‚“。 + +#### 例題 + + +```4d + var $c; $nc : Collection + $c:=New collection(1;2;3;4;5) + $nc:=$c.slice(0;3) //$nc=[1,2,3] + $nc:=$c.slice(3) //$nc=[4,5] + $nc:=$c.slice(1;-1) //$nc=[2,3,4] + $nc:=$c.slice(-3;-2) //$nc=[3] +``` + + + + + + +## .some() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
        **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean + +| 引数 | タイプ | | 説明 | +| ---------- | ----- |:--:| ------------------------- | +| startFrom | æ•´æ•° | -> | テストを開始ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | +| methodName | テキスト | -> | テストã«å‘¼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰å | +| param | Mixed | -> | *methodName* ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | ブール | <- | å°‘ãªãã¨ã‚‚一ã¤ã®è¦ç´ ãŒãƒ†ã‚¹ãƒˆã‚’パスã™ã‚Œã° true | + + +#### 説明 + +The `.some()` function returns true if at least one element in the collection successfully passed a test implemented in the provided *methodName* method. + + +*methodName* ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®è©•価ã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã—ã¾ã™ã€‚*param* ã«ã¯ã€å¿…è¦ã«å¿œã˜ã¦å¼•数を渡ã—ã¾ã™ (ä»»æ„)。 *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã©ã‚“ãªãƒ†ã‚¹ãƒˆã§ã‚‚実行ã§ãã€å¼•æ•°ã¯ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚æ§‹ã„ã¾ã›ã‚“。 ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $1 ã«ã‚ªãƒ–ジェクトをå—ã‘å–りã€ãƒ†ã‚¹ãƒˆã‚’パスã—ãŸæœ€åˆã®è¦ç´ ã® *$1.result* ã‚’ **true** ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + +* *$1.value*: 評価ã™ã‚‹è¦ç´ ã®å€¤ +* *$2*: param +* *$N...*: param2...paramN + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + +* *$1.result* (ブール): è¦ç´ ã®å€¤ã®è©•ä¾¡ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ **true** ã€ãれ以外㯠**false** +* *$1.stop* (ブールã€ä»»æ„): メソッドコールãƒãƒƒã‚¯ã‚’æ­¢ã‚ã‚‹å ´åˆã«ã¯ **true**。 è¿”ã•れãŸå€¤ã¯æœ€å¾Œã«è¨ˆç®—ã•れãŸã‚‚ã®ã§ã™ã€‚ + +`.some()` 関数ã¯ã€*$1.result* ã« **true** ã‚’è¿”ã™æœ€åˆã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã‚’発見ã™ã‚‹ã¨ã€*methodName* メソッドã®å‘¼ã³å‡ºã—ã‚’ã‚„ã‚㦠**true** ã‚’è¿”ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€`.some()` ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“をテストã—ã¾ã™ã€‚ オプションã¨ã—ã¦ã€*startFrom* 引数を渡ã™ã“ã¨ã§ã€ãƒ†ã‚¹ãƒˆã‚’é–‹å§‹ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* *startFrom* ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length 以上ã ã£ãŸå ´åˆã€**false** ãŒè¿”ã•れã¾ã™ã€‚ã“れã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ†ã‚¹ãƒˆã•れã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ +* *startFrom* < 0 ã®å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™ã€‚ +* *startFrom* = 0 ã®å ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å…¨ä½“ãŒãƒ†ã‚¹ãƒˆã•れã¾ã™ (デフォルト)。 + + +#### 例題 + + +```4d + var $c : Collection + var $b : Boolean + $c:=New collection + $c.push(-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") // 戻り値㯠false + $c.push(1) + $b:=$c.some("NumberGreaterThan0") // 戻り値㯠true + + $c:=New collection + $c.push(1;-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") //$b=true + $b:=$c.some(1;"NumberGreaterThan0") //$b=false +``` + +*NumberGreaterThan0* メソッドã®ã‚³ãƒ¼ãƒ‰ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + $1.result:=$1.value>0 +``` + + + + + + + +## .sort() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection + +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| ------------------ | +| methodName | テキスト | -> | ä¸¦ã¹æ›¿ãˆé †ã®æŒ‡å®šã«ä½¿ç”¨ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰å | +| extraParam | any | -> | methodName ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | コレクション | <- | ä¸¦ã¹æ›¿ãˆã‚‰ã‚ŒãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.sort()` function sorts the elements of the original collection and also returns the sorted collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +引数もãªã—ã«å‘¼ã³å‡ºã•れãŸå ´åˆã€`.sort()` ã¯ã‚¹ã‚«ãƒ©ãƒ¼å€¤ (数値ã€ãƒ†ã‚­ã‚¹ãƒˆã€æ—¥ä»˜ã€ãƒ–ール) ã®ã¿ã‚’ä¸¦ã¹æ›¿ãˆã¾ã™ã€‚ デフォルトã§ã¯ã€è¦ç´ ã¯ãれãžã‚Œã®åž‹ã«å¿œã˜ã¦æ˜‡é †ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +カスタマイズã•れãŸé †ç•ªã‚„ã€åž‹ã«é–¢ä¿‚ãªãコレクションè¦ç´ ã‚’ä¸¦ã¹æ›¿ãˆãŸã„å ´åˆã«ã¯ã€äºŒã¤ã®å€¤ã‚’比較ã—ã¦ã€æœ€åˆã®å€¤ãŒäºŒã¤ç›®ã®å€¤ã‚ˆã‚Šä½Žã„å ´åˆã« *$1.result* ã« **true** ã‚’è¿”ã™æ¯”較メソッドã®åç§°ã‚’ *methodName* ã«æ¸¡ã—ã¾ã™ã€‚ å¿…è¦ã§ã‚れ㰠*methodName* ã«è¿½åŠ ã®å¼•数を渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +* *methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™: + * $1 (オブジェクト): + * *$1.value* (ä»»æ„ã®åž‹): 比較ã™ã‚‹ä¸€ã¤ç›®ã®è¦ç´ ã®å€¤ + * *$1.value2* (ä»»æ„ã®åž‹): 比較ã™ã‚‹äºŒã¤ç›®ã®è¦ç´ ã®å€¤ + * $2...$N (ä»»æ„ã®åž‹): 追加ã®å¼•æ•° + +*methodName* ã§æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã€ä»¥ä¸‹ã®å¼•数を設定ã—ã¾ã™: + * *$1.result* (ブール): *$1.value < $1.value2* ã®å ´åˆã¯ **true**ã€ãれ以外㯠**false** + +コレクションãŒç•°ãªã‚‹åž‹ã®è¦ç´ ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€ãれらã¯ã¾ãšåž‹ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—分ã‘ã•れã€ãã®ã‚ã¨ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ åž‹ã¯ä»¥ä¸‹ã®é †ç•ªã§è¿”ã•れã¾ã™: + +1. null +2. ブール +3. 文字列 +4. 数値 +5. オブジェクト +6. コレクション +7. 日付 + +#### 例題 1 + + +```4d + var $col; $col2 : Collection + $col:=New collection("Tom";5;"Mary";3;"Henry";1;"Jane";4;"Artie";6;"Chip";2) + $col2:=$col.sort() // $col2=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] + // $col=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] +``` + +#### 例題 2 + +```4d + var $col; $col2 : Collection + $col:=New collection(10;20) + $col2:=$col.push(5;3;1;4;6;2).sort() //$col2=[1,2,3,4,5,6,10,20] +``` + +#### 例題 3 + +```4d + var $col; $col2; $col3 : Collection + $col:=New collection(33;4;66;1111;222) + $col2:=$col.sort() // 数値順: [4,33,66,222,1111] + $col3:=$col.sort("numberOrder") // アルファベット順: [1111,222,33,4,66] +``` + +```4d + // numberOrder プロジェクトメソッド + var $1 : Object + $1.result:=String($1.value)履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | + + +**.sum**( { *propertyPath* : Text } ) : Real +| 引数 | タイプ | | 説明 | +| ------------ | ---- |:--:| --------------------- | +| propertyPath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘ス | +| 戻り値 | 実数 | <- | コレクションè¦ç´ ã®å€¤ã®åˆè¨ˆ | + + +#### 説明 + +The `.sum()` function returns the sum for all values in the collection instance. + +計算ã®å¯¾è±¡ã¨ãªã‚‹ã®ã¯æ•°å€¤ã®ã¿ã§ã™ (ä»–ã®åž‹ã®è¦ç´ ã¯ç„¡è¦–ã•れã¾ã™)。 + +コレクションãŒã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€è¨ˆç®—ã™ã‚‹ã‚ªãƒ–ジェクトプロパティã®ãƒ‘スを *propertyPath* ã«æ¸¡ã—ã¾ã™ã€‚ + +`.sum()` ã¯ä»¥ä¸‹ã®å ´åˆã«ã¯ 0 ã‚’è¿”ã—ã¾ã™: + +* コレクションãŒç©ºã®å ´åˆ +* ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ•°å€¤ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆ +* *propertyPath* å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ‘スãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆ + +#### 例題 1 + + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection(10;20;"Monday";True;2) + $vSum:=$col.sum() //32 +``` + +#### 例題 2 + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500,5)) + $vSum:=$col.sum("salary") //$vSum=70500,5 +``` + + + + + + +## .unshift() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v16 R6 | 追加 | +
        + +**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection +| 引数 | タイプ | | 説明 | +| ----- | -------------------------------------- |:--:| ---------------- | +| value | Text, Number, Object, Collection, Date | -> | コレクションã®å…ˆé ­ã«æŒ¿å…¥ã™ã‚‹å€¤ | +| 戻り値 | 実数 | <- | è¦ç´ ã®è¿½åŠ ã•れãŸå…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.unshift()` function inserts the given *value*(s) at the beginning of the collection and returns the modified collection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +複数ã®å€¤ãŒæ¸¡ã•れãŸå ´åˆã€ãれらã¯ä¸€åº¦ã«æŒ¿å…¥ã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€å¼•æ•°ã®é †ç•ªã¨åŒã˜é †ç•ªã§å¤‰æ›´å¾Œã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã•れã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $c : Collection + $c:=New collection(1;2) + $c.unshift(4) // $c=[4,1,2] + $c.unshift(5) //$c=[5,4,1,2] + $c.unshift(6;7) // $c=[6,7,5,4,1,2] +``` + + + + diff --git a/website/translated_docs/ja/API/CryptoKeyClass.md b/website/translated_docs/ja/API/CryptoKeyClass.md new file mode 100644 index 00000000000000..8d9b225db4968a --- /dev/null +++ b/website/translated_docs/ja/API/CryptoKeyClass.md @@ -0,0 +1,340 @@ +--- +id: CryptoKeyClass +title: CryptoKey +--- + + +4D ランゲージ㮠`CryptoKey` クラスã¯ã€éžå¯¾ç§°ã®æš—å·åŒ–キーペアをカプセル化ã—ã¾ã™ã€‚ + +ã“ã®ã‚¯ãƒ©ã‚¹ã¯ `4D` クラスストアよりæä¾›ã•れã¾ã™ã€‚ + +### 例題 + +ãŸã¨ãˆã° ES256 JSON Web Token (JWT) を作æˆã™ã‚‹ãŸã‚ã«æ–°è¦ ECDSA キーペアを使ã£ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç½²åã¨æ¤œè¨¼ã‚’ãŠã“ãªã„ã¾ã™ã€‚ + +```4d + // æ–°è¦ ECDSA キーペアã®ç”Ÿæˆ +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) + + // base64 å½¢å¼ã§ç½²åã‚’å–å¾— +$message:="hello world" +$signature:=$key.sign($message;New object("hash";"SHA256")) + + // ç½²åã®æ¤œè¨¼ +$status:=$key.verify($message;$signature;New object("hash";"SHA256")) +ASSERT($status.success) +``` + + +### æ¦‚è¦ +| | +| --------------------------------------------------------------------------------------------------------------------- | +| [**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey](#4dcryptokeynew)

            creates a new `4D.CryptoKey` object encapsulating an encryption key pair

        | +| [**.curve** : Text](#curve)

            normalised curve name of the key.

        | +| [**.decrypt**( *message* : Text ; *options* : Object ) : Object](#decrypt)

            decrypts the *message* parameter using the **private** key

        | +| [**.encrypt**( *message* : Text ; *options* : Object ) : Text](#encrypt)

            encrypts the *message* parameter using the **public** key

        | +| [**.getPrivateKey()** : Text](#getprivatekey)

            returns the private key of the `CryptoKey` object

        | +| [**.getPublicKey( )** : Text](#getpublickey)

            returns the public key of the `CryptoKey` object

        | +| [.**sign** (*message* : Text ; *options* : Text) : Text](#sign)

            signs the utf8 representation of a *message* string

        | +| [**.size** : Integer](#size)

            the size of the key in bits

        | +| [**.type** : Text](#type)

            ã‚­ãƒ¼ã®ã‚¿ã‚¤ãƒ—: "RSA", "ECDSA", "PEM"

        | +| [**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object](#verify)

            verifies the base64 signature against the utf8 representation of *message*

        | + + + + + + + + +## 4D.CryptoKey.new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey +| 引数 | タイプ | | 説明 | +| -------- | ------------ | -- | ------------------------------------------- | +| settings | オブジェクト | -> | キーペアを生æˆãƒ»ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ãŸã‚ã®è¨­å®š | +| result | 4D.CryptoKey | <- | Object encapsulating an encryption key pair | + +The `4D.CryptoKey.new()` function creates a new `4D.CryptoKey` object encapsulating an encryption key pair, based upon the *settings* object parameter. æ–°è¦ã® RSA ã¾ãŸã¯ ECDSA キーを生æˆã™ã‚‹ã»ã‹ã€PEM å½¢å¼ã®æ—¢å­˜ã®ã‚­ãƒ¼ãƒšã‚¢ã‚’ロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### *settings* + +| プロパティ | タイプ | 説明 | +| --------------- | ------- | ---------------------------------- | +| [curve](#curve) | text | ECDSA 曲線å | +| [pem](#pem) | text | ロードã™ã‚‹ PEM å½¢å¼ã®æš—å·åŒ–キー | +| [size](#size) | integer | RSA キーã®ã‚µã‚¤ã‚º (ビットå˜ä½) | +| [type](#type) | text | キーã®ã‚¿ã‚¤ãƒ—: "RSA", "ECDSA", "PEM"
      • | + + +#### *CryptoKey* + +戻り値㮠`CryptoKey` オブジェクトã¯ã€æš—å·åŒ–キーペアをカプセル化ã—ã¾ã™ã€‚ ã“れã¯å…±æœ‰ã‚ªãƒ–ジェクトã®ãŸã‚ã€è¤‡æ•°ã® 4D プロセスã«ã‚ˆã£ã¦åŒæ™‚使用ã§ãã¾ã™ã€‚ + + + +## .curve + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.curve** : Text + + + +Defined only for ECDSA keys: the normalised curve name of the key. Usually "prime256v1" for ES256 (default), "secp384r1" for ES384, "secp521r1" for ES512. + + +## .decrypt() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.decrypt**( *message* : Text ; *options* : Object ) : Object +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ------------------------------------------------- | +| message | テキスト | -> | `options.encodingEncrypted` を使ã£ã¦ãƒ‡ã‚³ãƒ¼ãƒ‰ã—復å·ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ–‡å­—列 | +| options | オブジェクト | -> | デコーディングオプション | +| 戻り値 | オブジェクト | <- | ステータス | + + + +The `.decrypt()` function decrypts the *message* parameter using the **private** key. 使用ã•れるアルゴリズムã¯ã‚­ãƒ¼ã®ç¨®é¡žã«ä¾å­˜ã—ã¾ã™ã€‚ + +キー㯠RSA キーã§ãªã‘れã°ãªã‚‰ãšã€ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ RSA-OAEP ã§ã™ ([RFC 3447](https://tools.ietf.org/html/rfc3447) å‚ç…§)。 + +#### *options* + +| プロパティ | タイプ | 説明 | +| ----------------- | ---- | ------------------------------------------------------------------------------------------ | +| hash | text | 使用ã™ã‚‹ Digest アルゴリズム。 例: "SHA256", "SHA384", "SHA512"。 | +| encodingEncrypted | text | 復å·ã™ã‚‹ãƒã‚¤ãƒŠãƒªå½¢å¼ã« `message` を変æ›ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å¯èƒ½ãªå€¤: "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "Base64" | +| encodingDecrypted | text | ãƒã‚¤ãƒŠãƒªã®å¾©å·ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’文字列ã«å¤‰æ›ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å¯èƒ½ãªå€¤: "UTF-8", "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "UTF-8" | + + +#### *戻り値* + +`message` ã®å¾©å·ã«æˆåŠŸã—ãŸå ´åˆã«ã¯ã€success プロパティ㌠`true` ã«è¨­å®šã•れ㟠*status* オブジェクトを返ã—ã¾ã™ã€‚ + +| プロパティ | タイプ | 説明 | +| ------- | ---------- | ------------------------------------------------- | +| success | boolean | メッセージã®å¾©å·ã«æˆåŠŸã—ãŸå ´åˆã¯ true | +| result | text | options.encodingDecrypted を使ã£ã¦å¾©å·ãŠã‚ˆã³ãƒ‡ã‚³ãƒ¼ãƒ‰ã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| errors | collection | `success` ㌠`false` ã®å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ | + + +キーã¾ãŸã¯ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒåˆè‡´ã—ãªã„ãªã©ã®ç†ç”±ã§ *message* ã®å¾©å·ã«æˆåŠŸã—ãªã‹ã£ãŸå ´åˆã€è¿”ã•れる `status` オブジェクト㮠`status.errors` プロパティã«ã¯ã‚¨ãƒ©ãƒ¼ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ ¼ç´ã•れã¾ã™ã€‚ + + +## .encrypt() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.encrypt**( *message* : Text ; *options* : Object ) : Text +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | --------------------------------------------------- | +| message | テキスト | -> | `options.encodingDecrypted` を使ã£ã¦ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—æš—å·åŒ–ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ–‡å­—列 | +| options | オブジェクト | -> | エンコーディングオプション | +| 戻り値 | テキスト | <- | options.encodingEncrypted を使ã£ã¦æš—å·åŒ–ãŠã‚ˆã³ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | + +The `.encrypt()` function encrypts the *message* parameter using the **public** key. 使用ã•れるアルゴリズムã¯ã‚­ãƒ¼ã®ç¨®é¡žã«ä¾å­˜ã—ã¾ã™ã€‚ + +キー㯠RSA キーã§ãªã‘れã°ãªã‚‰ãšã€ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã¯ RSA-OAEP ã§ã™ ([RFC 3447](https://tools.ietf.org/html/rfc3447) å‚ç…§)。 + +##### *options* + +| プロパティ | タイプ | 説明 | +| ----------------- | ---- | ------------------------------------------------------------------------------------------------- | +| hash | text | 使用ã™ã‚‹ Digest アルゴリズム。 例: "SHA256", "SHA384", "SHA512"。 | +| encodingEncrypted | text | ãƒã‚¤ãƒŠãƒªã®æš—å·åŒ–メッセージを文字列ã«å¤‰æ›ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å¯èƒ½ãªå€¤: "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "Base64" | +| encodingDecrypted | text | æš—å·åŒ–ã™ã‚‹ãƒã‚¤ãƒŠãƒªå½¢å¼ã« `message` を変æ›ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å¯èƒ½ãªå€¤: "UTF-8", "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "UTF-8" | + + +#### *戻り値* + +The returned value is an encrypted message. + + + + +## .getPrivateKey() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.getPrivateKey()** : Text + +| 引数 | タイプ | | 説明 | +| --- | ---- | -- | ---------- | +| 戻り値 | テキスト | <- | PEM å½¢å¼ã®ç§˜å¯†éµ | + +The `.getPrivateKey()` function returns the private key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *戻り値* + +The returned value is the private key. + + + +## .getPublicKey() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.getPublicKey( )** : Text +| 引数 | タイプ | | 説明 | +| --- | ---- | -- | ---------- | +| 戻り値 | Text | <- | PEM å½¢å¼ã®å…¬é–‹éµ | + + +The `.getPublicKey()` function returns the public key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *戻り値* + +The returned value is the public key. + +--- +## .pem + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.pem** : Text + +PEM definition of an encryption key to load. 秘密éµã‚’渡ã—ãŸå ´åˆã€RSA ã¾ãŸã¯ ECDSA ã®å…¬é–‹éµã¯ç§˜å¯†éµã‹ã‚‰æŽ¨å®šã•れã¾ã™ã€‚ + + + +## .sign() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +.**sign** (*message* : Text ; *options* : Text) : Text +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ----------------------------------------------- | +| message | テキスト | -> | ç½²åã‚’ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| options | オブジェクト | -> | ç½²åオプション | +| 戻り値 | テキスト | <- | "encoding" オプションã«å¿œã˜ã¦ Base64 ã¾ãŸã¯ Base64URL å½¢å¼ã®ç½²å | + +The `.sign()` function signs the utf8 representation of a *message* string using the `CryptoKey` object keys and provided *options*. `options.encoding` å±žæ€§ã«æŒ‡å®šã—ãŸå€¤ã«å¿œã˜ã¦ã€base64 ã¾ãŸã¯ base64URL å½¢å¼ã®ç½²åã‚’è¿”ã—ã¾ã™ã€‚ + +`CryptoKey` ã¯æœ‰åŠ¹ãª **秘密** éµã‚’æ ¼ç´ã—ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +#### *options* + +| プロパティ | タイプ | 説明 | +| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| hash | text | 使用ã™ã‚‹ Digest アルゴリズム。 例: "SHA256", "SHA384", "SHA512"。 JWT ã®ç”Ÿæˆã«ä½¿ã‚れãŸå ´åˆã€ãƒãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã¯ PS@, ES@, RS@, ã¾ãŸã¯ PS@ ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚µã‚¤ã‚ºã¨åŒã˜ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 | +| encodingEncrypted | text | ãƒã‚¤ãƒŠãƒªã®æš—å·åŒ–メッセージを文字列ã«å¤‰æ›ã™ã‚‹ãŸã‚ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å¯èƒ½ãªå€¤: "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "Base64" | +| pss | boolean | 確率的署åスキーム (PSS) を使用ã™ã‚‹ã€‚ RSA キーã§ãªã„å ´åˆã¯ç„¡è¦–ã•れã¾ã™ã€‚ PSï¼  アルゴリズム用㮠JWT を生æˆã™ã‚‹å ´åˆã¯ `true` を渡ã—ã¾ã™ã€‚ | +| encoding | text | 戻り値ã®ç½²åã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰æ–¹å¼ã€‚ å¯èƒ½ãªå€¤: "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "Base64" | + + +#### *戻り値* + +utf8 å½¢å¼ã® *message* 文字列。 + + +## .size + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.size** : Integer + +Defined only for RSA keys: the size of the key in bits. 通常㯠2048 (デフォルト) + + +## .type + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + + +**.type** : Text +キーã®ã‚¿ã‚¤ãƒ—: "RSA", "ECDSA", "PEM"
      • "RSA": `settings.size` ã«æŒ‡å®šã•れãŸã‚µã‚¤ã‚ºã‚’ [.size](#size) ã¨ã—ã¦ä½¿ã£ãŸã€RSA キーペア
      • "ECDSA": `settings.curve` ã«æŒ‡å®šã•ã‚ŒãŸæ›²ç·šã‚’ [.curve](#curve) ã¨ã—ã¦ç”¨ã„ãŸã€æ¥•円曲線デジタル署åアルゴリズム (Elliptic Curve Digital Signature Algorithm) キーペア ECDSA キーã¯ç½²åã ã‘ã«ä½¿ç”¨ã•れるもã®ã§ã€æš—å·åŒ–ã«ã¯ä½¿ç”¨ã§ããªã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。
      • "PEM": `settings.pem` ã‚’ [.pem](#pem) ã¨ã—ã¦ä½¿ã£ãŸã€PEM å½¢å¼ã®ã‚­ãƒ¼ãƒšã‚¢ + + +## .verify() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object +| 引数 | タイプ | | 説明 | +| --------- | ------ | -- | ----------------------------------------------------------- | +| message | テキスト | -> | ç½²åç”Ÿæˆæ™‚ã«ä½¿ã‚れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ–‡å­—列 | +| signature | テキスト | -> | 検証ã®å¯¾è±¡ã§ã‚ã‚‹ã€`options.encoding` ã«å¿œã˜ã¦ Base64 ã¾ãŸã¯ Base64URL å½¢å¼ã®ç½²å | +| options | オブジェクト | -> | ç½²åオプション | +| 戻り値 | オブジェクト | <- | 検証ステータス | + +The `.verify()` function verifies the base64 signature against the utf8 representation of *message* using the `CryptoKey` object keys and provided *options*. + +`CryptoKey` ã¯æœ‰åŠ¹ãª **公開** éµã‚’æ ¼ç´ã—ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + +#### *options* + +| プロパティ | タイプ | 説明 | +| -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| hash | text | 使用ã™ã‚‹ Digest アルゴリズム。 例: "SHA256", "SHA384", "SHA512"。 JWT ã®ç”Ÿæˆã«ä½¿ã‚れãŸå ´åˆã€ãƒãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºã¯ PS@, ES@, RS@, ã¾ãŸã¯ PS@ ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚µã‚¤ã‚ºã¨åŒã˜ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 | +| pss | boolean | 確率的署åスキーム (PSS) を使用ã™ã‚‹ã€‚ RSA キーã§ãªã„å ´åˆã¯ç„¡è¦–ã•れã¾ã™ã€‚ PSï¼  アルゴリズム用㮠JWT を生æˆã™ã‚‹å ´åˆã¯ `true` を渡ã—ã¾ã™ã€‚ | +| encoding | text | ç½²åã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰æ–¹å¼ã€‚ å¯èƒ½ãªå€¤: "Base64" ã¾ãŸã¯ "Base64URL"。 デフォルト値: "Base64" | + + +#### *戻り値* + +検証ã§ç½²åãŒåˆè‡´ã—ãŸå ´åˆã«ã¯ã€`success` プロパティ㌠`true` ã«è¨­å®šã•れ㟠`status` オブジェクトを返ã—ã¾ã™ã€‚ + +*message*ã€ã‚­ãƒ¼ã¾ãŸã¯ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ãŒç½²åã¨åˆè‡´ã—ãªã„ãªã©ã®ç†ç”±ã§æ¤œè¨¼ãŒæˆåŠŸã—ãªã‹ã£ãŸå ´åˆã€è¿”ã•れる `status` オブジェクト㮠`status.errors` プロパティã«ã¯ã‚¨ãƒ©ãƒ¼ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ ¼ç´ã•れã¾ã™ã€‚ + +| プロパティ | タイプ | 説明 | +| ------- | ---------- | ------------------------------------------------- | +| success | boolean | ç½²åãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨åˆè‡´ã™ã‚Œã° true | +| errors | collection | `success` ㌠`false` ã®å ´åˆã€ã‚¨ãƒ©ãƒ¼ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ | + + diff --git a/website/translated_docs/ja/API/DataClassAttributeClass.md b/website/translated_docs/ja/API/DataClassAttributeClass.md new file mode 100644 index 00000000000000..051435525542f5 --- /dev/null +++ b/website/translated_docs/ja/API/DataClassAttributeClass.md @@ -0,0 +1,394 @@ +--- +id: DataClassAttributeClass +title: DataClassAttribute +--- + +データクラス属性ã¯ã€ãれãžã‚Œã®ã‚¯ãƒ©ã‚¹ã®ãƒ—ロパティã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°: + +```4d + nameAttribute:=ds.Company.name // クラス属性ã¸ã®å‚ç…§ + revenuesAttribute:=ds.Company["revenues"] // åˆ¥ã®æ›¸ãæ–¹ +``` + +ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ã€*nameAttribute* ãŠã‚ˆã³ *revenuesAttribute* 変数ã«ã€`Company` クラス㮠name ãŠã‚ˆã³ revenues 属性ã®å‚ç…§ã‚’ãれãžã‚Œä»£å…¥ã—ã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯å±žæ€§å†…ã«ä¿ç®¡ã•れã¦ã„る値を返ã™ã®ã§ã¯ã‚りã¾ã›ã‚“。ãã®ä»£ã‚りã«ã€å±žæ€§è‡ªèº«ã¸ã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ 値を管ç†ã™ã‚‹ã«ã¯ã€[**エンティティ**](EntityClass.md) を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +`DataClassAttribute` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæŒã¤ãƒ—ロパティを読ã¿å–ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã«é–¢ã™ã‚‹æƒ…å ±ãŒå–å¾—ã§ãã¾ã™ã€‚ + +> データクラス属性オブジェクトを編集ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ãŒã€å…ƒã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 + +### æ¦‚è¦ + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.autoFilled** : Boolean](#autofilled)

            contains True if the attribute value is automatically filled by 4D | +| [**.exposed** : Boolean](#exposed)

            true if the attribute is exposed in REST | +| [**.fieldNumber** : Integer](#fieldnumber)

            contains the internal 4D field number of the attribute | +| [**.fieldType** : Integer](#fieldtype)

            contains the 4D database type of the attribute | +| [**.indexed** : Boolean](#indexed)

            contains **True** if there is a B-tree or a Cluster B-tree index on the attribute | +| [**.inverseName** : Text](#inversename)

            returns the name of the attribute which is at the other side of the relation | +| [**.keyWordIndexed** : Boolean](#keywordindexed)

            contains **True** if there is a keyword index on the attribute | +| [**.kind** : Text](#kind)

            returns the category of the attribute | +| [**.mandatory** : Boolean](#mandatory)

            contains True if Null value input is rejected for the attribute | +| [**.name** : Text](#name)

            returns the name of the `dataClassAttribute` object as string | +| [**.readOnly** : Boolean](#readonly)

            true if the attribute is read-only | +| [**.relatedDataClass** : Text](#relateddataclass)

            returns the name of the dataclass related to the attribute | +| [**.type** : Text](#type)

            contains the conceptual value type of the attribute | +| [**.unique** : Boolean](#unique)

            contains True if the attribute value must be unique | + + + +## .autoFilled + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.autoFilled** : Boolean + +#### 説明 + +The `.autoFilled` property contains True if the attribute value is automatically filled by 4D. ã“ã®ãƒ—ロパティã¯ä»¥ä¸‹ã® 4Dフィールドプロパティã«å¯¾å¿œã—ã¦ã„ã¾ã™: + +* 数値型フィールド㮠"自動インクリメント" +* UUID (文字型)フィールド㮠"自動UUID" + +`.kind` ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.autoFilled` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Bool** (dataClassAttribute.autoFilled) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (false) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## .exposed + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R3 | 追加 | +
        + + +**.exposed** : Boolean + +#### 説明 + +The `.exposed` property is true if the attribute is exposed in REST. + + + + + +## .fieldNumber + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.fieldNumber** : Integer + +#### 説明 + +The `.fieldNumber` property contains the internal 4D field number of the attribute. + +`.kind` ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.fieldNumber` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Num** (dataClassAttribute.fieldNumber) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (0) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + + + + +## .fieldType + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------------ | +| v19 R3 | Support of computed attributes | +
        + + +**.fieldType** : Integer + +#### 説明 + +The `.fieldType` property contains the 4D database type of the attribute. ã“れã¯å±žæ€§ã®ç¨®é¡ž (kind) ã«ã‚ˆã‚Šã¾ã™ ([`.kind`](#kind) å‚ç…§)。 + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| dataClassAttribute.kind | fieldType | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | +| storage | Corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html) | +| relatedEntity | 38 (`Is object`) | +| relatedEntities | 42 (`Is collection`) | +| calculated |
      • scalar: corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)
      • entity: 38 (`Is object`)
      • entity selection: 42 (`Is collection)` | + + + +#### å‚ç…§ + +[`.type`](#type) + +## .indexed + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.indexed** : Boolean + +#### 説明 + +The `.indexed` property contains **True** if there is a B-tree or a Cluster B-tree index on the attribute. + +`.kind` ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.indexed` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Bool** (dataClassAttribute.indexed) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (false) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + + + +## .inverseName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.inverseName** : Text + +#### 説明 + +The `.inverseName` property returns the name of the attribute which is at the other side of the relation. + +`.kind` ㌠"storage" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 .kind 㯠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.inverseName` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **String** (dataClassAttribute.inverseName) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ ("") ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + + + +## .keyWordIndexed + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.keyWordIndexed** : Boolean + +#### 説明 + +The `.keyWordIndexed` property contains **True** if there is a keyword index on the attribute. + +[`.kind`](#kind) ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.keyWordIndexed` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Bool** (dataClassAttribute.keyWordIndexed) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (false) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + + +## .kind + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------ | +| v19 R3 | Added "calculated" | +
        + + +**.kind** : Text + +#### 説明 + +The `.kind` property returns the category of the attribute. 以下ã®ã„ãšã‚Œã‹ã®å€¤ãŒè¿”ã•れã¾ã™: + +* "storage": ストレージ (ã‚ã‚‹ã„ã¯ã‚¹ã‚«ãƒ©ãƒ¼) 属性。ã¤ã¾ã‚Šã€å±žæ€§ã¯å€¤ã‚’ä¿å­˜ã—ã¦ãŠã‚Šã€ä»–ã®å±žæ€§ã¸ã®å‚ç…§ã§ã¯ã‚りã¾ã›ã‚“。 +* "calculated": computed attribute, i.e. defined through a [`get` function](ORDA/ordaClasses.md#function-get-attributename). +* "relatedEntity": N対1 リレーション属性 (エンティティã¸ã®å‚ç…§) +* "relatedEntities": 1対N リレーション属性 (エンティティセレクションã¸ã®å‚ç…§) + + +#### 例題 + +以下ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’剿ã¨ã—ã¾ã™: + +![](/assets/en/API/dataclassAttribute3.png) + +```4d + var $attKind : Text + $attKind:=ds.Employee.lastname.kind //$attKind="storage" + $attKind:=ds.Employee.manager.kind //$attKind="relatedEntity" + $attKind:=ds.Employee.directReports.kind //$attKind="relatedEntities" +``` + + + + + + +## .mandatory + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.mandatory** : Boolean + +#### 説明 + +The `.mandatory` property contains True if Null value input is rejected for the attribute. + +[`.kind`](#kind) ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.mandatory` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Bool** (dataClassAttribute.mandatory) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (false) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> **警告**: ã“ã®ãƒ—ロパティã¯ã€4Dデータベースレベル㮠"Null値ã®å…¥åŠ›ã‚’æ‹’å¦" フィールドプロパティã¨å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ フィールドã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›åˆ¶å¾¡ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã§ã‚る既存㮠"必須入力" プロパティã¨ã¯ç„¡é–¢ä¿‚ã§ã™ã€‚ + + + + + +## .name + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.name** : Text + +#### 説明 + +The `.name` property returns the name of the `dataClassAttribute` object as string. + +#### 例題 + +```4d + var $attName : Text + $attName:=ds.Employee.lastname.name //$attName="lastname" +``` + + + + +## .readOnly + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R3 | 追加 | + + +
        + + +**.readOnly** : Boolean + +#### 説明 + +The `.readOnly` property is true if the attribute is read-only. + +For example, computed attributes without [`set` function](ORDA/ordaClasses.md#function-set-attributename) are read-only. + + + + +## .relatedDataClass + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | + + +
        + + +**.relatedDataClass** : Text + +#### 説明 +> ã“ã®ãƒ—ロパティã¯ã€[`.kind`](#kind) プロパティ値㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã§ã‚る属性ã«ãŠã„ã¦ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +The `.relatedDataClass` property returns the name of the dataclass related to the attribute. + +#### 例題 + +以下ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’剿ã¨ã—ã¾ã™: + + +![](assets/en/API/dataclassAttribute4.png) + +```4d + var $relClass1; $relClassN : Text + $relClass1:=ds.Employee.employer.relatedDataClass //$relClass1="Company" + $relClassN:=ds.Employee.directReports.relatedDataClass //$relClassN="Employee" +``` + + + + +## .type + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------------ | +| v19 R3 | Support of computed attributes | +
        + + +**.type** : Text + +#### 説明 + +The `.type` property contains the conceptual value type of the attribute, useful for generic programming. + +ã“ã®æ¦‚念的ãªå€¤ã‚¿ã‚¤ãƒ—ã¯å±žæ€§ã®ç¨®é¡ž ([`.kind`](#kind)) ã«ã‚ˆã‚Šã¾ã™ã€‚ + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| dataClassAttribute.kind | type | 説明 | +| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| storage | "blob", "bool", "date", "image", "number", "object", ã¾ãŸã¯ "string" | 数値型ã®å ´åˆ "number" ãŒè¿”ã•れã¾ã™ (期間をå«ã‚€)。 UUIDã€æ–‡å­—ãŠã‚ˆã³ãƒ†ã‚­ã‚¹ãƒˆåž‹ãƒ•ィールドã®å ´åˆ "string" ãŒè¿”ã•れã¾ã™ã€‚ "blob" 属性㯠[BLOB オブジェクト](Concepts/dt_blob.md#blob-ã®ç¨®é¡ž) ã§ã€[Blob クラス](BlobClass.md) ã«ã‚ˆã£ã¦æ‰±ã‚れã¾ã™ã€‚ | +| relatedEntity | リレートã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å | 例: "Companies" | +| relatedEntities | リレートã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å + "Selection" | 例: "EmployeeSelection" | +| calculated |
      • storage: type ("blob", "number", etc.)
      • entity: dataClass name
      • entity selection: dataClass name + "Selection" | | + + +#### å‚ç…§ + +[`.fieldType`](#fieldtype) + + +## .unique + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.unique** : Boolean + +#### 説明 + +The `.unique` property contains True if the attribute value must be unique. ã“ã®ãƒ—ロパティã¯ã€4Dフィールドプロパティ㮠"é‡è¤‡ä¸å¯" ã«å¯¾å¿œã—ã¦ã„ã¾ã™. + +[`.kind`](#kind) ㌠"relatedEntity" ã¾ãŸã¯ "relatedEntities" ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 +> 汎用的ãªãƒ—ログラミングã®ãŸã‚ã«ã€`.unique` ãŒè¿”ã•れãªã„å ´åˆã§ã‚‚ **Bool** (dataClassAttribute.unique) ã¨æ›¸ãã“ã¨ã§ã€æœ‰åйãªå€¤ (false) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + diff --git a/website/translated_docs/ja/API/DataClassClass.md b/website/translated_docs/ja/API/DataClassClass.md new file mode 100644 index 00000000000000..68341ea19ac4c6 --- /dev/null +++ b/website/translated_docs/ja/API/DataClassClass.md @@ -0,0 +1,1189 @@ +--- +id: DataClassClass +title: DataClass +--- + + +[データクラス](ORDA/dsMapping.md#データクラス) ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚ªãƒ–ジェクトインターフェースをæä¾›ã—ã¾ã™ã€‚ 4Dアプリケーション内ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¯ã™ã¹ã¦ã€`ds` [データストア](ORDA/dsMapping.md#データストア) ã®ãƒ—ロパティã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + + +### æ¦‚è¦ + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : DataClassAttribute](#attributename)

            objects that are available directly as properties | +| [**.all** ( { *settings* : Object } ) : 4D.EntitySelection](#all)

            queries the datastore to find all the entities related to the dataclass and returns them as an entity selection | +| [**.exposed** : Boolean](#exposed)

            true if the dataclass is exposed in REST | +| [**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection](#fromcollection)

            updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection | +| [**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
        **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity](#get)

            queries the dataclass to retrieve the entity matching the *primaryKey* parameter | +| [**.getDataStore()** : cs.DataStore](#getdatastore)

            returns the datastore for the specified dataclass | +| [**.getInfo()** : Object ](#getinfo)

            returns an object providing information about the dataclass | +| [**.new()** : 4D.Entity ](#new)

            creates in memory and returns a new blank entity related to the Dataclass | +| [**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection ](#newselection)

            creates a new, blank, non-shareable entity selection, related to the dataclass, in memory | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
        **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection ](#query)

            searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) | + + + +## .*attributeName* + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +***.attributeName*** : DataClassAttribute + +#### 説明 + +The attributes of dataclasses are objects that are available directly as properties of these classes. + +戻り値㯠[`DataClassAttribute`](DataClassAttributeClass.md) クラスã®ã‚ªãƒ–ジェクトã§ã™ã€‚ ã“れらã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæŒã¤ãƒ—ロパティを読ã¿å–ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã«é–¢ã™ã‚‹æƒ…å ±ãŒå–å¾—ã§ãã¾ã™ã€‚ +> データクラス属性オブジェクトを編集ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ãŒã€å…ƒã¨ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 + +#### 例題 1 + +```4d +$salary:=ds.Employee.salary // Employeeデータクラス㮠salary属性を返ã—ã¾ã™ +$compCity:=ds.Company["city"] // Companyデータクラス㮠city属性を返ã—ã¾ã™ +``` + + +#### 例題 2 + +以下ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’剿ã¨ã—ã¾ã™: + +![](assets/en/API/dataclassAttribute.png) + + +```4d +var $firstnameAtt;$employerAtt;$employeesAtt : Object + + $firstnameAtt:=ds.Employee.firstname + //{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true, + //keyWordIndexed:false,autoFilled:false,mandatory:false,unique:false} + + $employerAtt:=ds.Employee.employer + //{name:employer,kind:relatedEntity,relatedDataClass:Company, + //fieldType:38,type:Company,inverseName:employees} + //38=Is object + + $employeesAtt:=ds.Company.employees + //{name:employees,kind:relatedEntities,relatedDataClass:Employee, + //fieldType:42,type:EmployeeSelection,inverseName:employer} + //42=Is collection +``` + +#### 例題 3 + +以下ã®ãƒ†ãƒ¼ãƒ–ãƒ«ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’å‰æã¨ã—ã¾ã™: + +![](assets/en/API/dataclassAttribute2.png) + + +```4d + var $sequenceNumberAtt : Object + $sequenceNumberAtt=ds.Employee.sequenceNumber + //{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13, + //indexed:true,keyWordIndexed:false,autoFilled:true,mandatory:false,unique:true} +``` + + + + +## .all() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ---------------------- | +| v17 R5 | *settings* パラメーターをサãƒãƒ¼ãƒˆ | +| v17 | 追加 | +
        + + +**.all** ( { *settings* : Object } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| -------- | ------------------ |:--:| ----------------- | +| settings | オブジェクト | -> | ビルドオプション: context | +| 戻り値 | 4D.EntitySelection | <- | データクラスã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å‚ç…§ | + + +#### 説明 + +The `.all( )` function queries the datastore to find all the entities related to the dataclass and returns them as an entity selection. + +エンティティã¯ãƒ‡ãƒ•ォルトã®é †ç•ªã§è¿”ã•れã€é€šå¸¸ã¯ä½œæˆé †ã«ãªã£ã¦ã„ã¾ã™ã€‚ ãŸã ã—ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‰Šé™¤å¾Œã«æ–°è¦è¿½åŠ ã—ãŸå ´åˆã«ã¯ã€ãƒ‡ãƒ•ォルトã®é †ç•ªã¯ä½œæˆé †ã‚’åæ˜ ã—ãªã„点ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ + +エンティティãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã«ã¯ã€ãƒ¬ã‚¤ã‚¸ãƒ¼ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒé©ç”¨ã•れã¾ã™ã€‚ + +**settings** + +ä»»æ„ã® *settings* パラメーターã«ã¯ã€è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ãƒ—ロパティãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| context | テキスト | エンティティセレクションã«é©ç”¨ã•れã¦ã„る最é©åŒ–コンテキストã®ãƒ©ãƒ™ãƒ«ã€‚ エンティティセレクションを扱ã†ã‚³ãƒ¼ãƒ‰ã¯ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使ã†ã“ã¨ã§æœ€é©åŒ–ã®æ©æµã‚’å—ã‘ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ [ORDA ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼å‡¦ç†](ORDA/entities.md#クライアント/サーãƒãƒ¼ã®æœ€é©åŒ–)を想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ | + + +#### 例題 + +```4d + var $allEmp : cs.EmployeeSelection + $allEmp:=ds.Employee.all() +``` + + + +## .exposed + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R3 | 追加 | +
        + + +**.exposed** : Boolean + +#### 説明 + +The `.exposed` property is true if the dataclass is exposed in REST. + + + +## .fromCollection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ---------------------- | +| v17 R5 | *settings* パラメーターをサãƒãƒ¼ãƒˆ | +| v17 | 追加 | +
        + +**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection + +| 引数 | タイプ | | 説明 | +| --------- | ------------------ |:--:| ------------------------- | +| objectCol | コレクション | -> | エンティティã«ãƒžãƒƒãƒ—ã™ã‚‹ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| settings | オブジェクト | -> | ビルドオプション: context | +| 戻り値 | 4D.EntitySelection | <- | コレクションã‹ã‚‰ä½œæˆã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.fromCollection()` function updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection. + +*objectCol* パラメーターã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã€ã¾ãŸã¯æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã™ã‚‹ãŸã‚ã®ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’渡ã—ã¾ã™ã€‚ プロパティåã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®å±žæ€§åã¨åŒä¸€ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ プロパティåãŒãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å­˜åœ¨ã—ãªã„å ´åˆã€ãれã¯ç„¡è¦–ã•れã¾ã™ã€‚ コレクション内ã§å±žæ€§å€¤ãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆã€ãã®å€¤ã¯ null ã«ãªã‚Šã¾ã™ã€‚ + +コレクションã®ã‚ªãƒ–ジェクトè¦ç´ ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒžãƒƒãƒ”ングã¯ã€**属性å** 㨠**åž‹ã®åˆè‡´** ã‚’ã‚‚ã£ã¦è¡Œã‚れã¾ã™ã€‚ オブジェクトプロパティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã¨åŒã˜åå‰ã§ã‚ã£ã¦ã‚‚ã€åž‹ãŒåˆè‡´ã—ãªã„å ´åˆã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§ã¯ç©ºã®ã¾ã¾ã§ã™ã€‚ + +**作æˆãƒ¢ãƒ¼ãƒ‰ã¨æ›´æ–°ãƒ¢ãƒ¼ãƒ‰** + +*objectCol* 引数ã®å„オブジェクトã¤ã„ã¦: + +* オブジェクトãŒãƒ–ール型㮠"\_\_NEW" プロパティをå«ã¿ã€ãれ㌠**false** ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆ(ã‚ã‚‹ã„㯠"\_\_NEW" プロパティãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆ)ã€ã‚ªãƒ–ジェクトã®å¯¾å¿œã™ã‚‹å€¤ã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ›´æ–°ã‚ã‚‹ã„ã¯ä½œæˆã•れã¾ã™ã€‚ プライマリーキーã«é–¢ã™ã‚‹ãƒã‚§ãƒƒã‚¯ã¯ãŠã“ãªã‚れã¾ã›ã‚“: + * ãƒ—ãƒ©ã‚¤ãƒžãƒªãƒ¼ã‚­ãƒ¼ãŒæŒ‡å®šã•れã¦ã„ã¦å®Ÿåœ¨ã™ã‚‹å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯æ›´æ–°ã•れã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒ—ライマリーキーã¯ãã®ã¾ã¾ã€ã‚ã‚‹ã„㯠"\_\_KEY" プロパティを (プライマリーキー値ã¨ã¨ã‚‚ã«) 使ã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + * ãã®ã¾ã¾æŒ‡å®šã—ãŸãƒ—ライマリーキーãŒå®Ÿåœ¨ã—ãªã„å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•れã¾ã™ã€‚ + * プライマリーキーを指定ã—ã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•ã‚Œã€æ¨™æº–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦ãƒ—ライマリーキー値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ +* オブジェクトãŒãƒ–ール型㮠"\_\_NEW" プロパティをå«ã¿ã€ãれ㌠**true** ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã®å¯¾å¿œã™ã‚‹å€¤ã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä½œæˆã•れã¾ã™ã€‚ プライマリーキーã«é–¢ã™ã‚‹ãƒã‚§ãƒƒã‚¯ãŒãŠã“ãªã‚れã¾ã™: + * ãã®ã¾ã¾æŒ‡å®šã—ãŸãƒ—ライマリーキーãŒå®Ÿåœ¨ã™ã‚‹å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + * ãã®ã¾ã¾æŒ‡å®šã—ãŸãƒ—ライマリーキーãŒå®Ÿåœ¨ã—ãªã„å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•れã¾ã™ã€‚ + * プライマリーキーを指定ã—ã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•ã‚Œã€æ¨™æº–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦ãƒ—ライマリーキー値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ +> 値を格ç´ã—ã¦ã„ã‚‹"\_\_KEY" プロパティã¯ã€"\_\_NEW" プロパティ㌠**false** ã«è¨­å®š (ã‚ã‚‹ã„ã¯çœç•¥) ã•れã¦ã„ã¦ã€ã‹ã¤å¯¾å¿œã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå­˜åœ¨ã™ã‚‹å ´åˆã®ã¿ã€è€ƒæ…®ã•れã¾ã™ã€‚ ãれ以外ã®å ´åˆã«ã¯ã€"\_\_KEY" プロパティ値ã¯ç„¡è¦–ã•れるãŸã‚ã€ãƒ—ライマリーキーã®å€¤ã¯ãã®ã¾ã¾æ¸¡ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +**リレートエンティティ** + +*objectCol* 引数ã®ã‚ªãƒ–ジェクトã¯ã€ä¸€ã¤ä»¥ä¸Šã®ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトをãƒã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£é–“ã®ãƒªãƒ³ã‚¯ã‚’作æˆãƒ»æ›´æ–°ã™ã‚‹ã®ã«æœ‰ç”¨ã§ã™ã€‚ + +リレートエンティティã«ç›¸å½“ã™ã‚‹ãƒã‚¹ãƒˆã•れãŸã‚ªãƒ–ジェクトã¯ã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ライマリーキー値を格ç´ã—㟠"\_\_KEY" プロパティã‚ã‚‹ã„ã¯ãƒ—ライマリーキー属性を格ç´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ â€\_\_KEY†プロパティを使用ã™ã‚‹ã¨ã€ãƒ—ライマリーキー属性åã«ä¾å­˜ã™ã‚‹å¿…è¦ãŒã‚りã¾ã›ã‚“。 +> ã“ã®æ©Ÿæ§‹ã«ã‚ˆã£ã¦ã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä¸­èº«ã‚’作æˆãƒ»æ›´æ–°ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +**記å·** + +"\_\_STAMP" ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ã‚¹ã‚¿ãƒ³ãƒ—ã¨ã®ãƒã‚§ãƒƒã‚¯ãŒãŠã“ãªã‚れã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れるã“ã¨ãŒã‚りã¾ã™ ("与ãˆã‚‰ã‚ŒãŸã‚¹ã‚¿ãƒ³ãƒ—ã¯ãƒ†ãƒ¼ãƒ–ルXXX ã®ãƒ¬ã‚³ãƒ¼ãƒ‰# XXã®ã‚«ãƒ¬ãƒ³ãƒˆã®ã‚‚ã®ã¨åˆè‡´ã—ã¾ã›ã‚“")。 詳細ã«ã¤ã„ã¦ã¯ [エンティティロッキング](ORDA/entities.md#エンティティロッキング) ã‚’å‚ç…§ãã ã•ã„。 + +**settings** + +ä»»æ„ã® *settings* パラメーターã«ã¯ã€è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ãƒ—ロパティãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| context | テキスト | エンティティセレクションã«é©ç”¨ã•れã¦ã„る最é©åŒ–コンテキストã®ãƒ©ãƒ™ãƒ«ã€‚ エンティティセレクションを扱ã†ã‚³ãƒ¼ãƒ‰ã¯ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使ã†ã“ã¨ã§æœ€é©åŒ–ã®æ©æµã‚’å—ã‘ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ [ORDA ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼å‡¦ç†](ORDA/entities.md#クライアント/サーãƒãƒ¼ã®æœ€é©åŒ–)を想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ | + + +#### 例題 1 + +既存ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã—ã¾ã™ã€‚ \_\_NEW プロパティã¯ãªãã€å¾“業員ã®ãƒ—ライマリーキーã¯å±žæ€§ã«å®Ÿåœ¨ã®å€¤ã‚’指定ã—ã¦æ¸¡ã—ã¾ã™: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=668 // Employeeテーブルã®å®Ÿåœ¨ã™ã‚‹ä¸»ã‚­ãƒ¼ + $emp.firstName:="Arthur" + $emp.lastName:="Martin" + $emp.employer:=New object("ID";121) // リレートデータクラス Company ã®å®Ÿåœ¨ã™ã‚‹ä¸»ã‚­ãƒ¼ + // リレートデータクラス Company ã«å®Ÿåœ¨ã™ã‚‹åˆ¥ã®ä¸»ã‚­ãƒ¼ã‚’指定ã™ã‚Œã°ã€ä¼šç¤¾ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### 例題 2 + +既存ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã—ã¾ã™ã€‚ \_\_NEW プロパティã¯ãªãã€å¾“業員ã®ãƒ—ライマリーキー㯠\_\_KEY プロパティã«å®Ÿåœ¨ã®å€¤ã‚’指定ã—ã¦æ¸¡ã—ã¾ã™: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.__KEY:=1720 // Employeeテーブルã®å®Ÿåœ¨ã™ã‚‹ä¸»ã‚­ãƒ¼ + $emp.firstName:="John" + $emp.lastName:="Boorman" + $emp.employer:=New object("ID";121) // リレートデータクラス Company ã®å®Ÿåœ¨ã™ã‚‹ä¸»ã‚­ãƒ¼ + // リレートデータクラス Company ã«å®Ÿåœ¨ã™ã‚‹åˆ¥ã®ä¸»ã‚­ãƒ¼ã‚’指定ã™ã‚Œã°ã€ä¼šç¤¾ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### 例題 3 + +å˜ç´”ã«ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰æ–°ã—ã„エンティティを作æˆã—ã¾ã™: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Victor" + $emp.lastName:="Hugo" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### 例題 4 + +æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã—ã¾ã™ã€‚ \_\_NEW プロパティ㯠true ã§ã€å¾“業員ã®ãƒ—ãƒ©ã‚¤ãƒžãƒªãƒ¼ã‚­ãƒ¼ã¯æŒ‡å®šã—ã¾ã›ã‚“: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Mary" + $emp.lastName:="Smith" + $emp.employer:=New object("__KEY";121) // リレートデータクラス Company ã®å®Ÿåœ¨ã™ã‚‹ä¸»ã‚­ãƒ¼ + $emp.__NEW:=True + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) + + + + + + +``` + +#### 例題 5 + +æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã—ã¾ã™ã€‚ \_\_NEW プロパティã¯ãªãã€å¾“業員ã®ãƒ—ライマリーキー属性を指定ã—ã¾ã™ãŒã€ãã®å€¤ã¯å®Ÿåœ¨ã—ã¾ã›ã‚“: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10000 // 実在ã—ãªã„主キー + $emp.firstName:="Françoise" + $emp.lastName:="Sagan" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### 例題 6 + +2ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒåŒã˜ãƒ—ライマリーキーをæŒã¤å ´åˆã€æœ€åˆã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆãƒ»ä¿å­˜ã•れã¾ã™ãŒã€2ã¤ã‚ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å‡¦ç†ã¯å¤±æ•—ã—ã¾ã™: + +```4d + var $empsCollection : Collection + var $emp; $emp2 : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10001 // 実在ã—ãªã„主キー + $emp.firstName:="Simone" + $emp.lastName:="Martin" + $emp.__NEW:=True + $empsCollection.push($emp) + + $emp2:=New object + $emp2.ID:=10001 // 上ã¨åŒã˜ä¸»ã‚­ãƒ¼ + $emp2.firstName:="Marc" + $emp2.lastName:="Smith" + $emp2.__NEW:=True + $empsCollection.push($emp2) + $employees:=ds.Employee.fromCollection($empsCollection) + // 最åˆã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•れã¾ã™ + // 2ã¤ã‚ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯é‡è¤‡ã‚­ãƒ¼ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ +``` + +#### å‚ç…§ + +[**.toCollection()**](EntitySelectionClass.md#tocollection) + + + +## .get() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
        **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity + +| 引数 | タイプ | | 説明 | +| ---------- | --------- |:--:| ----------------------- | +| primaryKey | æ•´æ•°ã¾ãŸã¯æ–‡å­—列 | -> | å–å¾—ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ライマリーキー値 | +| settings | オブジェクト | -> | ビルドオプション: context | +| 戻り値 | 4D.Entity | <- | 指定ã—ãŸãƒ—ライマリーキーã«åˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | + +#### 説明 + +The `.get()` function queries the dataclass to retrieve the entity matching the *primaryKey* parameter. + +*primaryKey* ã«ã¯ã€å–å¾—ã—ãŸã„エンティティã®ãƒ—ライマリーキーã®å€¤ã‚’渡ã—ã¾ã™ã€‚ 値ã®åž‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã§è¨­å®šã•れãŸãƒ—ライマリーキーã®åž‹ (å€é•·æ•´æ•°ã‚ã‚‹ã„ã¯ãƒ†ã‚­ã‚¹ãƒˆ) ã¨åˆè‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ [`.getKey()`](EntityClass.md#getkey) 関数㫠`dk key as string` 引数を渡ã™ã¨ã€ãƒ—ライマリーキーã®å€¤ãŒå¸¸ã«ãƒ†ã‚­ã‚¹ãƒˆåž‹ã§è¿”ã•れるよã†ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +*primaryKey* 引数ã®ãƒ—ライマリーキーをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€**Null** エンティティãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã«ã¯ãƒ¬ã‚¤ã‚¸ãƒ¼ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒé©ç”¨ã•れã€ãƒªãƒ¬ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã¯å¿…è¦ãªæ™‚ã«ã®ã¿ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +**settings** + +ä»»æ„ã® *settings* パラメーターã«ã¯ã€è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ãƒ—ロパティãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | テキスト | エンティティã«é©ç”¨ã•れã¦ã„ã‚‹è‡ªå‹•ã®æœ€é©åŒ–コンテキストã®ãƒ©ãƒ™ãƒ«ã€‚ エンティティを読ã¿è¾¼ã‚€ä»¥é™ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使ã†ã“ã¨ã§æœ€é©åŒ–ã®æ©æµã‚’å—ã‘ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ [ORDA ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼å‡¦ç†](ORDA/entities.md#クライアント/サーãƒãƒ¼ã®æœ€é©åŒ–)を想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ | + + + +#### 例題 1 + +```4d + var $entity : cs.EmployeeEntity + var $entity2 : cs.InvoiceEntity + $entity:=ds.Employee.get(167) // プライマリーキーã®å€¤ãŒ 167ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ + $entity2:=ds.Invoice.get("DGGX20030") // プライマリーキーã®å€¤ãŒ "DGGX20030" ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ +``` + +#### 例題 2 + +*context* プロパティã®ä½¿ç”¨ã«ã¤ã„ã¦ç´¹ä»‹ã—ã¾ã™: + +```4d + var $e1; $e2; $e3; $e4 : cs.EmployeeEntity + var $settings; $settings2 : Object + + $settings:=New object("context";"detail") + $settings2:=New object("context";"summary") + + $e1:=ds.Employee.get(1;$settings) + completeAllData($e1) // completeAllData メソッドã«ãŠã„ã¦æœ€é©åŒ–ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã€"detail" コンテキストãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ + + $e2:=ds.Employee.get(2;$settings) + completeAllData($e2) // completeAllData メソッドã«ã¯ã€"detail" コンテキストã«ä»˜éšã™ã‚‹æœ€é©åŒ–ãŒé©ç”¨ã•れã¾ã™ + + $e3:=ds.Employee.get(3;$settings2) + completeSummary($e3) // completeSummary メソッドã«ãŠã„ã¦æœ€é©åŒ–ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã€"summary" コンテキストãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ + + $e4:=ds.Employee.get(4;$settings2) + completeSummary($e4) // completeSummary メソッドã«ã¯ã€"summary" コンテキストã«ä»˜éšã™ã‚‹æœ€é©åŒ–ãŒé©ç”¨ã•れã¾ã™ +``` + + + + +## .getDataStore() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getDataStore()** : cs.DataStore +| 引数 | タイプ | | 説明 | +| --- | ------------ |:--:| ------------------ | +| 戻り値 | cs.DataStore | <- | データクラスãŒå±žã—ã¦ã„るデータストア | + + +#### 説明 + +The `.getDataStore( )` function returns the datastore for the specified dataclass. + +è¿”ã•ã‚Œã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯æ¬¡ã®ã„ãšã‚Œã‹ã§ã™: + +* `ds` コマンドã«ã‚ˆã£ã¦è¿”ã•れるメインデータストア +* `Open datastore` コマンドを使用ã—ã¦é–‹ã‹ã‚ŒãŸãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ + + +#### 例題 + +***SearchDuplicate*** プロジェクトメソッドã¯ã€ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã®é‡è¤‡ã—ãŸå€¤ã‚’検索ã—ã¾ã™ã€‚ + +```4d + var $pet : cs.CatsEntity + $pet:=ds.Cats.all().first() // エンティティをå–å¾—ã—ã¾ã™ + SearchDuplicate($pet;"Dogs") +``` + +```4d + // SearchDuplicate メソッド + // SearchDuplicate(entity_to_search;dataclass_name) + + #DECLARE ($pet : Object ; $dataClassName : Text) + var $dataStore; $duplicates : Object + + $dataStore:=$pet.getDataClass().getDataStore() + $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name) +``` + + + + +## .getInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getInfo()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ | -- | --------- | +| 戻り値 | オブジェクト | <- | ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®æƒ…å ± | + + +#### 説明 + +The `.getInfo( )` function returns an object providing information about the dataclass. ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã‚’書ãã®ã«æœ‰ç”¨ã§ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +| プロパティ | タイプ | 説明 | +| ----------- | ---- | -------------------- | +| name | テキスト | データクラスã®åç§° | +| primaryKey | テキスト | データクラスã®ãƒ—ライマリーキー属性ã®åç§° | +| tableNumber | æ•´æ•° | 内部的㪠4Dãƒ†ãƒ¼ãƒ–ãƒ«ç•ªå· | + + + +#### 例題 1 + +```4d + #DECLARE ($entity : Object) + var $status : Object + + computeEmployeeNumber($entity) // エンティティã«å¯¾ã™ã‚‹ä½•らã‹ã®æ“作 + + $status:=$entity.save() + if($status.success) + ALERT("テーブル "+$entity.getDataClass().getInfo().name+" ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒæ›´æ–°ã•れã¾ã—ãŸã€‚") + End if +``` + +#### 例題 2 + +```4d + var $settings : Object + var $es : cs.ClientsSelection + + $settings:=New object + $settings.parameters:=New object("receivedIds";getIds()) + $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey) + $es:=ds.Clients.query(":pk in :receivedIds";$settings) +``` + +#### 例題 3 + +```4d + var $pk : Text + var $dataClassAttribute : Object + + $pk:=ds.Employee.getInfo().primaryKey + $dataClassAttribute:=ds.Employee[$pk] // å¿…è¦ã«å¿œã˜ã¦ãƒ—ライマリーキー属性ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã§ã™ +``` + + + + +## .new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +**.new()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- | -- | --------------- | +| 戻り値 | 4D.Entity | <- | ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | + + +#### 説明 + +The `.new( )` function creates in memory and returns a new blank entity related to the Dataclass. + +エンティティオブジェクトã¯ãƒ¡ãƒ¢ãƒªå†…ã«ä½œæˆã•れã¾ã™ãŒã€[`.save( )`](EntityClass.md#save) 関数ãŒå‘¼ã³å‡ºã•れるã¾ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã¯ä¿å­˜ã•れã¾ã›ã‚“。 エンティティをä¿å­˜ã™ã‚‹å‰ã«å‰Šé™¤ã—ãŸå ´åˆã€å¾©å…ƒã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +**4D Server**: クライアント/サーãƒãƒ¼ã«ãŠã„ã¦ã¯ã€å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®ãƒ—ライマリーキーãŒè‡ªå‹•インクリメントã§ã‚ã£ãŸå ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚µãƒ¼ãƒãƒ¼å´ã«ä¿å­˜ã•れãŸã¨ãã«è¨ˆç®—ã•れã¾ã™ã€‚ + +エンティティã®å…¨å±žæ€§ã¯ **null** 値ã§åˆæœŸåŒ–ã•れã¾ã™ã€‚ + +> 4Dデータベースã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ¬ãƒ™ãƒ«ã§ **ヌル値を空値ã«ãƒžãƒƒãƒ—** オプションãŒé¸æŠžã•れã¦ã„れã°ã€å±žæ€§ã¯ãƒ‡ãƒ•ォルト値ã§åˆæœŸåŒ–ã•れã¾ã™ã€‚ + +#### 例題 + +以下ã®ã‚³ãƒ¼ãƒ‰ã¯ "Log" ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ–°ã—ã„エンティティを作æˆã—ã€"info" å±žæ€§ã«æƒ…報を記録ã—ã¾ã™: + +```4d + var $entity : cs.LogEntity + $entity:=ds.Log.new() // å‚照を作æˆã—ã¾ã™ + $entity.info:="New entry" // 情報を格ç´ã—ã¾ã™ + $entity.save() // エンティティをä¿å­˜ã—ã¾ã™ +``` + + + + + +## .newSelection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| --------- | ------------------ | -- | ------------------------------------------------------------------------------------------------------- | +| keepOrder | æ•´æ•° | -> | `dk keep ordered`: 順列ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™
        `dk non ordered` (ã‚ã‚‹ã„ã¯çœç•¥æ™‚): 順列ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™ | +| 戻り値 | 4D.EntitySelection | <- | データクラスã®ç©ºã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.newSelection( )` function creates a new, blank, non-shareable entity selection, related to the dataclass, in memory. + +> 追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è©³ç´°ã¯ [共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‚’å‚ç…§ãã ã•ã„。 + + +順列ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã«ã¯ã€*keepOrder* ã« `dk keep ordered` セレクターを渡ã—ã¾ã™ã€‚ ã“ã®å¼•æ•°ã‚’çœç•¥ã—ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã€ã‚ã‚‹ã„㯠`dk non ordered` セレクターを渡ã—ãŸå ´åˆã«ã¯ã€é–¢æ•°ã¯é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ 順列ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æ–¹ãŒé€Ÿã„ã§ã™ãŒã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½®ã«é ¼ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 詳細ã«ã¤ã„ã¦ã¯ã€[エンティティセレクションã®é †åˆ—ã‚り/順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) ã‚’å‚ç…§ãã ã•ã„。 + +作æˆã•ã‚ŒãŸæ™‚点ã§ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“(`mySelection.length` ã¯0ã‚’è¿”ã—ã¾ã™)。 ã‚ã¨ã‹ã‚‰ [`add()`](EntitySelectionClass.md#add) 関数を呼ã³å‡ºã™ã“ã¨ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å¾ã€…ã«ãƒ“ルドã—ã¦ã„ãã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $USelection; $OSelection : cs.EmployeeSelection + $USelection:=ds.Employee.newSelection() // 順列ãªã—ã®ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™ + $OSelection:=ds.Employee.newSelection(dk keep ordered) // 順列ã‚りã®ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™ +``` + + + + + +## .query() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------- | +| v17 R6 | Formula パラメーターをサãƒãƒ¼ãƒˆ | +| v17 R5 | 値ã®ãƒ—レースホルダーをサãƒãƒ¼ãƒˆ | +| v17 | 追加 | +
        + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
        **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ------------- | ------------------ | -- | ------------------------------------------------------------------------------------ | +| queryString | テキスト | -> | 検索æ¡ä»¶ (文字列) | +| formula | オブジェクト | -> | 検索æ¡ä»¶ (フォーミュラオブジェクト) | +| value | any | -> | プレースホルダー用ã®å€¤ | +| querySettings | オブジェクト | -> | クエリオプション: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| 戻り値 | 4D.EntitySelection | <- | *queryString* ã¾ãŸã¯ *formula* ã«æ¸¡ã—ãŸæ¤œç´¢æ¡ä»¶ã«åˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰æ§‹æˆã•ã‚ŒãŸæ–°ã—ã„エンティティセレクション | + + +#### 説明 + +The `.query( )` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s), for all the entities in the dataclass, and returns a new object of type `EntitySelection` containing all the entities that are found. ã“ã®é–¢æ•°ã«ã¯ã€ãƒ¬ã‚¤ã‚¸ãƒ¼ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒé©ç”¨ã•れã¾ã™ã€‚ + +エンティティãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +**queryString 引数** + +*queryString* 引数ã«ã¯ã€ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™: + +```4d +attributePath|formula æ¯”è¼ƒæ¼”ç®—å­ å€¤ + {è«–ç†æ¼”ç®—å­ attributePath|formula æ¯”è¼ƒæ¼”ç®—å­ å€¤} + {order by attributePath {desc | asc}} +``` + +詳細ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +* **attributePath**: クエリã®å®Ÿè¡Œå¯¾è±¡ã¨ãªã‚‹å±žæ€§ãƒ‘ス。 ã“ã®å¼•æ•°ã¯ã€å˜ç´”ãªåå‰ ("country" ãªã©) ã®ã»ã‹ã€ã‚らゆる有効ãªå±žæ€§ãƒ‘ス ("country.name" ãªã©) ã®å½¢ã‚’ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 属性パス㌠`Collection` åž‹ã§ã‚ã‚‹å ´åˆã€ã™ã¹ã¦ã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ã‚’管ç†ã™ã‚‹ã«ã¯\[ ] 記法を使用ã—ã¦ãã ã•ã„ (例: "children\[ ].age" ãªã©)。 ã¾ãŸã€**プレースホルダー** を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™(後述å‚ç…§)。 +> *".", "\[ ]", ã‚„ "=", ">", "#"..., ãªã©ã®ç‰¹æ®Šæ–‡å­—ã¯ã‚¯ã‚¨ãƒªæ–‡å­—列ã®ä¸­ã§æ­£ã—ã評価ã•れãªã„ãŸã‚ã€ã“れらãŒå«ã¾ã‚ŒãŸå±žæ€§åを直接使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªå±žæ€§ã‚’クエリã™ã‚‹ã«ã¯ã€ãƒ—レースホルダーã®ä½¿ç”¨ã‚’検討ã—ã¾ã™ã€‚ã“れã«ã‚ˆã‚Šã€å±žæ€§ãƒ‘ス内ã§ä½¿ç”¨ã§ãる文字ã®ç¯„囲ãŒåºƒãŒã‚Šã¾ã™ (後述ã®* **プレースホルダーã®ä½¿ç”¨** *å‚ç…§)。* + +* **formula**: テキストã¾ãŸã¯ã‚ªãƒ–ジェクト形å¼ã§æ¸¡ã•ã‚ŒãŸæœ‰åйãªãƒ•ォーミュラ。 フォーミュラã¯å‡¦ç†ã•れるエンティティã”ã¨ã«è©•価ã•れã€ãƒ–ール値を返ã•ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 処ç†ä¸­ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ•ォーミュラ内ã«ãŠã„㦠`This` ã§å‚ç…§ã•れã¾ã™ã€‚ + + * **テキスト**: フォーミュラ文字列ã®å‰ã« `eval( )` ステートメントãŒå¿…è¦ã§ã™ã€‚ã“れã«ã‚ˆã‚Šã€ã‚¯ã‚¨ãƒªãŒå¼ã‚’æ­£ã—ã解釈ã—ã¾ã™ã€‚ 例: *"eval(length(This.lastname) >=30)"* + * **オブジェクト**: [フォーミュラオブジェクト](FunctionClass.md) 㯠**プレースホルダー** (後述å‚ç…§) を使ã£ã¦å—ã‘æ¸¡ã—ã¾ã™ã€‚ ã“ã®ãƒ•ォーミュラã¯ã€[`Formula`](FunctionClass.md#formula) ã¾ãŸã¯ [`Formula from string`](FunctionClass.md#formula-from-string) コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸã‚‚ã®ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 +> * 4Dフォーミュラã¯ã€`&` ãŠã‚ˆã³ `|` 記å·ã®ã¿ã‚’è«–ç†æ¼”ç®—å­ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã™ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ +> * フォーミュラ以外ã«ã‚‚検索æ¡ä»¶ãŒã‚ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªã‚¨ãƒ³ã‚¸ãƒ³ã®æœ€é©åŒ–ã«ã‚ˆã£ã¦ã»ã‹ã®æ¤œç´¢æ¡ä»¶ (ãŸã¨ãˆã°ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹å±žæ€§) ã®å‡¦ç†ãŒå„ªå…ˆã•れる場åˆãŒã‚りã€ãã®å ´åˆã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚µãƒ–セットã®ã¿ãŒãƒ•ォーミュラã®è©•価対象ã¨ãªã‚Šã¾ã™ã€‚ + + クエリã«ä½¿ç”¨ã™ã‚‹ãƒ•ォーミュラ㯠$1 ã«å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯å¾Œè¿°ã® **フォーミュラ引数** ã‚’å‚ç…§ãã ã•ã„。 +> * フォーミュラãŒè¤‡é›‘ãªå ´åˆãªã©ã€`queryString` パラメーターを使ã‚ãšã«ã€`formula` パラメーターã«ã‚ªãƒ–ジェクトを直接渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 後述㮠**フォーミュラ引数** ã‚’å‚ç…§ãã ã•ã„。 +> * セキュリティã®ãŸã‚〠`query()` 関数内ã®ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ä½¿ç”¨ã‚’ç¦æ­¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `querySettings` パラメーターã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + +* **比較演算å­**: *attributePath* 引数㨠*value* å¼•æ•°ã®æ¯”較ã«ä½¿ç”¨ã™ã‚‹è¨˜å· 以下ã®è¨˜å·ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™: + + | 比較 | è¨˜å· | 説明 | + | ------------- | ----------- | ---------------------------------------------------------------- | + | ç­‰ã—ã„ | =, == | 一致ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã€‚ワイルドカード (@) をサãƒãƒ¼ãƒˆã—ã€æ–‡å­—ã®å¤§å°/ã‚¢ã‚¯ã‚»ãƒ³ãƒˆã®æœ‰ç„¡ã¯åŒºåˆ¥ã—ã¾ã›ã‚“。 | + | | ===, IS | 一致ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã€‚ワイルドカード (@) ã¯æ¨™æº–ã®æ–‡å­—ã¨ã—ã¦èªè­˜ã•ã‚Œã€æ–‡å­—ã®å¤§å°/アクセント記å·ã®æœ‰ç„¡ã¯åŒºåˆ¥ã—ã¾ã›ã‚“。 | + | ç­‰ã—ããªã„ | #, != | ワイルドカード (@) をサãƒãƒ¼ãƒˆã—ã¾ã™ | + | | !==, IS NOT | ワイルドカード (@) ã¯æ¨™æº–ã®æ–‡å­—ã¨ã—ã¦èªè­˜ã•れã¾ã™ | + | å°ã•ã„ | < | | + | 大ãã„ | > | | + | 以下 | <= | | + | 以上 | >= | | + | å«ã¾ã‚Œã‚‹ | IN | コレクションã€ã‚ã‚‹ã„ã¯è¤‡æ•°ã®å€¤ã®ã†ã¡ã€ã©ã‚Œã‹ä¸€ã¤ã®å€¤ã¨ç­‰ã—ã„データをå–å¾—ã—ã¾ã™ã€‚ワイルドカード (@) をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ | + | 宣言㫠Not æ¡ä»¶ã‚’é©ç”¨ | NOT | è¤‡æ•°ã®æ¼”ç®—å­ãŒå«ã¾ã‚Œã‚‹å®£è¨€ã®å‰ã« NOT を使用ã™ã‚‹å ´åˆã«ã¯ã‚«ãƒƒã‚³ã‚’ã¤ã‘ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ | + | キーワードをå«ã‚€ | % | キーワードã¯ã€æ–‡å­—列ã‚ã‚‹ã„ã¯ãƒ”クãƒãƒ£ãƒ¼åž‹ã®å±žæ€§å†…ã§ä½¿ç”¨ã•れるもã®ãŒå¯¾è±¡ã§ã™ã€‚ | + +* **値**: コレクションã®å„è¦ç´ ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„エンティティã®ãƒ—ロパティã®ã‚«ãƒ¬ãƒ³ãƒˆå€¤ã«å¯¾ã—ã¦æ¯”較ã™ã‚‹å€¤ã€‚ **プレースホルダー** (後述㮠**プレースホルダーã®ä½¿ç”¨** å‚ç…§) ã‹ã€ã‚ã‚‹ã„ã¯ãƒ‡ãƒ¼ã‚¿åž‹ãƒ—ロパティã¨åŒã˜åž‹ã®å¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

        定数値を使用ã™ã‚‹å ´åˆã€ä»¥ä¸‹ã®åŽŸå‰‡ã«å¾“ã†å¿…è¦ãŒã‚りã¾ã™: + * **テキスト** テキスト型ã®å®šæ•°å€¤ã®å ´åˆã¯å˜ä¸€å¼•用符ã¤ãã€ã‚ã‚‹ã„ã¯ãªã—ã§ã‚‚渡ã™ã“ã¨ãŒã§ãã¾ã™(後述㮠**引用符を使用ã™ã‚‹** å‚ç…§)。 æ–‡å­—åˆ—ä¸­ã®æ–‡å­—列を検索ã™ã‚‹ ("å«ã¾ã‚Œã‚‹" クエリ) ã«ã¯ã€ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰è¨˜å· (@) を使用ã—ã¦æ¤œç´¢æ–‡å­—列を指定ã—ã¾ã™ (例: "@Smith@")。 ã¾ãŸä»¥ä¸‹ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã¯ãƒ†ã‚­ã‚¹ãƒˆå®šæ•°ã«ãŠã„ã¦ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“: true, false。 + * **ブール** åž‹ã®å®šæ•°å€¤: **true** ã¾ãŸã¯ **false** (文字ã®å¤§å°ã‚’区別ã—ã¾ã™) + * **数値** åž‹ã®å®šæ•°å€¤: æµ®å‹•å°æ•°ç‚¹ã¯ '.' (ピリオド) ã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ 日付型ã®å®šæ•°å€¤: "YYYY-MM-DD" フォーマット。 + * **null** 定数値: "null" キーワードを使用ã—ãŸå ´åˆã€**null** 㨠**undefined** プロパティã®ä¸¡æ–¹ãŒæ¤œç´¢ã•れã¾ã™ã€‚ + * IN 記å·ã‚’使用ã—ãŸã‚¯ã‚¨ãƒªã®å ´åˆã€å€¤ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã€attributePath ã®åž‹ã«åˆè‡´ã™ã‚‹ã€\[ ] ã§ããられãŸã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã®å€¤ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ (文字列ã«ãŠã„ã¦ã¯ã€" ã®è¨˜å·ã¯"\"ã§ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 +* **è«–ç†æ¼”ç®—å­**: è¤‡æ•°ã®æ¡ä»¶ã‚’クエリ内ã§çµåˆã•ã›ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™(ä»»æ„)。 以下ã®è«–ç†æ¼”ç®—å­ã®ã„ãšã‚Œã‹ä¸€ã¤ã‚’使用ã§ãã¾ã™ (åå‰ã‚ã‚‹ã„ã¯è¨˜å·ã®ã©ã¡ã‚‰ã‹ã‚’渡ã—ã¾ã™): + + | çµåˆ | è¨˜å· | + | --- | ----------------------- | + | AND | &, &&, and | + | OR | |,||, or | + +* **order by attributePath**: クエリ㫠"order by attributePath" ステートメントを追加ã™ã‚‹ã“ã¨ã§ã€çµæžœã‚’ソートã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ カンマã§åŒºåˆ‡ã‚‹ã“ã¨ã§ã€è¤‡æ•°ã® order by ステートメントを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (例: order by *attributePath1* desc, *attributePath2* asc)。 デフォルトã®ä¸¦ã³é †ã¯æ˜‡é †ã§ã™ã€‚ 並ã³é †ã‚’指定ã™ã‚‹ã«ã¯ã€é™é †ã®å ´åˆã¯ 'desc'ã€æ˜‡é †ã®å ´åˆã¯ 'asc' を追加ã—ã¾ã™ã€‚ +> * ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’使用ã—ãŸå ´åˆã€é †åºã‚りエンティティセレクションãŒè¿”ã•れã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ [エンティティセレクションã®é †åˆ—ã‚り/順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) ã‚’å‚ç…§ãã ã•ã„)。 + +**引用符を使用ã™ã‚‹** + +クエリ内ã§å¼•用符を使用ã™ã‚‹å ´åˆã€ã‚¯ã‚¨ãƒªå†…ã«ãŠã„ã¦ã¯å˜ä¸€å¼•用符 ' ' を使用ã—ã€ã‚¯ã‚¨ãƒªå…¨ä½“ã‚’ããã‚‹ã«ã¯äºŒé‡å¼•用符 " " を使用ã—ã¾ã™ã€‚クオートを混åŒã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +"employee.name = 'smith' AND employee.firstname = 'john'" +``` +> å˜ä¸€å¼•用符 (') ã¯ã€ã‚¯ã‚¨ãƒªæ–‡å­—列を分解ã—ã¦ã—ã¾ã†ãŸã‚ã€æ¤œç´¢å€¤ã¨ã—ã¦ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 ãŸã¨ãˆã°ã€"comp.name = 'John's pizza' " ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ å˜ä¸€å¼•用符をå«ã‚€å€¤ã‚’検索ã™ã‚‹ã«ã¯ã€ãƒ—レースホルダーを使用ã—ã¾ã™ (後述å‚ç…§)。 + +**カッコã®ä½¿ç”¨** + +クエリ内ã§ã‚«ãƒƒã‚³ã‚’使用ã™ã‚‹ã¨ã€è¨ˆç®—ã«å„ªå…ˆé †ä½ã‚’ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚¯ã‚¨ãƒªã‚’æ•´ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```4d +"(employee.age >= 30 OR employee.age <= 65) AND (employee.salary <= 10000 OR employee.status = 'Manager')" +``` + + +**プレースホルダーã®ä½¿ç”¨** + +4D ã§ã¯ã€*queryString* 引数内㮠*attributePath*ã€*formula* ãŠã‚ˆã³ *値* ã«ãƒ—レースホルダーを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ プレースホルダーã¨ã¯ã€ã‚¯ã‚¨ãƒªæ–‡å­—åˆ—ã«æŒ¿å…¥ã™ã‚‹ãƒ‘ラメーターã§ã€ã‚¯ã‚¨ãƒªæ–‡å­—列ãŒè©•価ã•れる時ã«ä»–ã®å€¤ã§ç½®ãæ›ãˆã‚‰ã‚Œã‚‹ã‚‚ã®ã§ã™ã€‚ プレースホルダーã®å€¤ã¯ã‚¯ã‚¨ãƒªé–‹å§‹æ™‚ã«ä¸€åº¦ã ã‘評価ã•れã¾ã™ã€‚å„è¦ç´ ã«å¯¾ã—ã¦æ¯Žå›žè©•価ã•れるã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 + +プレースホルダーã«ã¯äºŒã¤ã®ç¨®é¡žãŒã‚りã¾ã™ã€‚**インデックスプレースホルダー** ãŠã‚ˆã³ **命åプレースホルダー** ã§ã™: + +| - | インデックスプレースホルダー | 命åプレースホルダー | +| -- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| 定義 | queryString ã« :paramIndex (例 :1, :2...) ã¨ã„ã†å½¢å¼ã§ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ãŒæŒ¿å…¥ã•れã€ãれã«å¯¾å¿œã™ã‚‹å€¤ã¯å¾Œã«ç¶šã value å¼•æ•°ãŒæä¾›ã—ã¾ã™ã€‚ 最大㧠128個㮠value 引数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ | :paramName (例: myparam ãªã©) ã¨ã„ã†å½¢ã§ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ãŒæŒ¿å…¥ã•れã€ãã®å€¤ã¯ querySettings 引数㮠attributes ã¾ãŸã¯ parameters ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§æä¾›ã•れã¾ã™ã€‚ | +| 例題 | $r:=class.query(":1=:2";"city";"Chicago") | $o.attributes:=New object("att";"city")
        $o.parameters:=New object("name";"Chicago")
        $r:=class.query(":att=:name";$o) | + +*queryString* ã«ã¯ã€ã™ã¹ã¦ã®ç¨®é¡žã®å¼•æ•°ã‚’æ··ãœã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ *queryString* 引数ã¯ã€*attributePath* 㨠*formula* 㨠*値* ã«ä»¥ä¸‹ã®ã‚‚ã®ã‚’å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™: + + +* 定数値 (プレースホルダーを使用ã—ãªã„) +* インデックスプレースホルダーや命åプレースホルダー + +以下ã®ç†ç”±ã‹ã‚‰ã€**クエリã§ã®ãƒ—レースホルダーã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™**: + +1. 悪æ„ã‚ã‚‹ã‚³ãƒ¼ãƒ‰ã®æŒ¿å…¥ã‚’防ãŽã¾ã™: ユーザーã«ã‚ˆã£ã¦å€¤ãŒä»£å…¥ã•れãŸå¤‰æ•°ã‚’クエリ文字列ã¨ã—ã¦ç›´æŽ¥ä½¿ç”¨ã—ãŸå ´åˆã€ä½™è¨ˆãªã‚¯ã‚¨ãƒªå¼•数を入力ã™ã‚‹ã“ã¨ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’変更ã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªæ–‡å­—列を考ãˆã¾ã™: + + ```4d + $vquery:="status = 'public' & name = "+myname // ユーザーãŒè‡ªåˆ†ã®åå‰ã‚’入力ã—ã¾ã™ + $result:=$col.query($vquery) + ``` + + éžå…¬é–‹ã®ãƒ‡ãƒ¼ã‚¿ãŒãƒ•ィルタリングã•れã¦ã„ã‚‹ãŸã‚ã€ã“ã®ã‚¯ã‚¨ãƒªã¯ä¸€è¦‹å®‰å…¨ãªã‚ˆã†ã«è¦‹ãˆã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã‚‚ã—ユーザー㌠*myname* ã« *smith OR status='private'* ã®ã‚ˆã†ãªå…¥åŠ›ã‚’ã—ãŸå ´åˆã€ã‚¯ã‚¨ãƒªæ–‡å­—列ã¯è§£é‡ˆæ™‚ã«å¤‰æ›´ã•れã€éžå…¬é–‹ãƒ‡ãƒ¼ã‚¿ã‚‚è¿”ã—ã¦ã—ã¾ã†å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + + プレースホルダーを使用ã—ãŸå ´åˆã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ¡ä»¶ã‚’上書ãã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™: + + ```4d + $result:=$col.query("status='public' & name=:1";myname) + ``` + + ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ *myname* エリア㫠*smith OR status='private'* ã¨å…¥åŠ›ã—ãŸå ´åˆã§ã‚‚ã€ãれã¯ã‚¯ã‚¨ãƒªæ–‡å­—列ã¨ã¯ã¿ãªã•れãšã€å€¤ã¨ã—ã¦æ¸¡ã•れるã ã‘ã§ã™ã€‚ "smith OR status='private' " ã¨ã„ã†åå‰ã®äººç‰©ã‚’検索ã—ãŸã¨ã“ã‚ã§ã€çµæžœã¯å¤±æ•—ã«çµ‚ã‚ã‚‹ã ã‘ã§ã™ã€‚ + +2. フォーマットや文字ã®å•題を心é…ã™ã‚‹å¿…è¦ãŒã‚りã¾ã›ã‚“。ã“れã¯ã€*attributePath* ã‚„ *値* ãŒãŸã¨ãˆã° "."ã€"[' ...ãªã©ã®è‹±æ•°å­—ã§ãªã„文字を格ç´ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆã«ã¨ãã«æœ‰ç”¨ã§ã™ã€‚ + +3. クエリã«å¤‰æ•°ã‚„å¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: + + ```4d + $result:=$col.query("address.city = :1 & name =:2";$city;$myVar+"@") + $result2:=$col.query("company.name = :1";"John's Pizzas") + ``` + +**nullå€¤ã®æ¤œç´¢** + +null値を検索ã™ã‚‹å ´åˆã€ãƒ—レースホルダーシンタックスã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。ãªãœãªã‚‰ã‚¯ã‚¨ãƒªã‚¨ãƒ³ã‚¸ãƒ³ã¯ null を予期ã›ã¬æ¯”較値ã¨ã—ã¦ã¿ãªã™ã‹ã‚‰ã§ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ãŸå ´åˆ: + +```4d +$vSingles:=ds.Person.query("spouse = :1";Null) // 機能ã—ã¾ã›ã‚“ +``` + +ã“ã®å ´åˆ 4D 㯠null値をã€å¼•æ•°ã®è©•価 (別ã®ã‚¯ã‚¨ãƒªã‹ã‚‰æ¸¡ã•れãŸå±žæ€§ãªã©) ã«èµ·å› ã™ã‚‹ã‚¨ãƒ©ãƒ¼ã¨è§£é‡ˆã™ã‚‹ãŸã‚ã€æœŸå¾…ã—ãŸçµæžœã¯å¾—られã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªã‚¯ã‚¨ãƒªã‚’ãŠã“ãªã†ã«ã¯ã€ç›´æŽ¥çš„ãªã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +```4d + $vSingles:=ds.Person.query("spouse = null") // æ­£ã—ã„シンタックス +``` + + +**コレクションè¦ç´ ã¨ã‚¯ã‚¨ãƒªæ¡ä»¶ã®ãƒªãƒ³ã‚¯** + +プロパティを複数æŒã¤ã‚ªãƒ–ジェクトè¦ç´ ã‹ã‚‰ãªã‚ŠãŸã£ã¦ã„るコレクションãŒã€ã•らã«è¦ªã‚ªãƒ–ジェクトã®å±žæ€§å€¤ã§ã‚ã‚‹å ´åˆã«ã€å½“該コレクションã«ç‰¹å®šè¦ç´ ãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’æ¡ä»¶ã«è¦ªã‚ªãƒ–ジェクトを検出ã—ãŸã„ケースを考ãˆã¾ã™ã€‚AND 演算å­ã§çµåˆã•れãŸè¤‡æ•°ã®ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’使用ã—ã¦æ¤œç´¢ã™ã‚‹ã ã‘ã§ã¯ã€ç•°ãªã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ãŒãれãžã‚Œæ¤œç´¢æ¡ä»¶ã«åˆè‡´ã™ã‚‹ãƒ—ロパティ値をæŒã¤å ´åˆã«ã‚‚å½“è©²è¦ªã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¤œå‡ºã•れã¦ã—ã¾ã„ã¾ã™ã€‚ ã“れをé¿ã‘ã‚‹ã«ã¯ã€ã™ã¹ã¦ã®æ¡ä»¶ã«åˆè‡´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®ã¿ãŒæ¤œå‡ºã•れるよã†ã€ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’コレクションè¦ç´ ã«ãƒªãƒ³ã‚¯ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãª 2ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚ã‚‹ã¨ã: + +``` +エンティティ1: +ds.People.name: "martin" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"paris" + } ] } + +エンティティ2: +ds.People.name: "smith" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"lyon" + } , { + "kind":"office", + "city":"paris" + } ] } +``` + +"locations" 属性ã«ã€"kind=home" ã‹ã¤ "city=paris" ã§ã‚ã‚‹è¦ç´ ã‚’æŒã¤äººã‚’探ã—ãŸã„ã¨ã—ã¾ã™ã€‚ 以下ã®ã‚ˆã†ã«æ›¸ã„ãŸå ´åˆ: + +```4d +ds.People.query("places.locations[].kind= :1 and places.locations[].city= :2";"home";"paris") +``` + +... クエリ㯠"martin" 㨠"smith" ã®**両方**ã‚’è¿”ã—ã¾ã™ã€‚ãªãœãªã‚‰ "smith" ã‚‚ "kind=home" ã§ã‚ã‚‹ "location" è¦ç´ ã‚’æŒã£ã¦ãŠã‚Šã€"city=paris" ã§ã‚ã‚‹ "location" è¦ç´ ã‚’ã‚‚æŒã£ã¦ã„ã‚‹ã‹ã‚‰ã§ã™ (ã§ã™ãŒã“れら 2ã¤ã¯ç•°ãªã‚‹è¦ç´ ã§ã™)。 + +検索æ¡ä»¶ã«åˆè‡´ã™ã‚‹å±žæ€§ãŒåŒä¸€ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã«å«ã¾ã‚Œã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã¿ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€**クエリæ¡ä»¶ã‚’リンク** ã—ã¾ã™ã€‚ クエリæ¡ä»¶ã‚’リンクã™ã‚‹ã«ã¯: + +- リンクã™ã‚‹æœ€åˆã®ã‚¯ã‚¨ãƒªæ¡ä»¶ã«ã¦ãƒ‘ス㮠\[] å†…ã«æ–‡å­—を追加ã—ã€åŒæ§˜ã«ä»–ã®ã‚¯ã‚¨ãƒªæ¡ä»¶ã§ã‚‚åŒã˜æ–‡å­—を追加ã—ã¾ã™ã€‚ 例: `locations[a].city and locations[a].kind`。 ローマ字ã§ã‚れã°ã©ã®æ–‡å­—ã§ã‚‚使用å¯èƒ½ã§ã™ (文字ã®å¤§å°ã¯åŒºåˆ¥ã•れã¾ã›ã‚“)。 +- åŒã˜ã‚¯ã‚¨ãƒªå†…ã«ã€ç•°ãªã‚‹ãƒªãƒ³ã‚¯æ¡ä»¶ã‚’追加ã™ã‚‹ã«ã¯ã€åˆ¥ã®æ–‡å­—を使用ã—ã¾ã™ã€‚ å˜ä¸€ã®ã‚¯ã‚¨ãƒªå†…ã§ã¯ã€æœ€å¤§ã§ 26組ã®ãƒªãƒ³ã‚¯æ¡ä»¶ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +上記㮠2ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ãŠã„ã¦ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ã„ãŸå ´åˆ: + +```4d +ds.People.query("places.locations[a].kind= :1 and places.locations[a].city= :2";"home";"paris") +``` + +... クエリã¯ã€"kind=home" ã‹ã¤ "city=paris" ã§ã‚ã‚‹ "locations" è¦ç´ ã‚’æŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ "martin" ã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚ "home" ã¨"paris" ãŒåŒã˜ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ å†…ã«ãªã„ "smith" ã¯ã€ã‚¯ã‚¨ãƒªã®çµæžœã«å«ã¾ã‚Œã¾ã›ã‚“。 + + + +**formula 引数** + +*queryString* 引数ã«ãƒ•ォーミュラを挿入 (上記å‚ç…§) ã™ã‚‹ä»£ã‚りã«ã€formula オブジェクトをブール検索æ¡ä»¶ã¨ã—ã¦ç›´æŽ¥æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ トークナイズã®åˆ©ç‚¹ã‚’生ã‹ã›ã‚‹ã€ã‚³ãƒ¼ãƒ‰ãŒæ¤œç´¢ã—ã‚„ã™ã読ã¿ã‚„ã™ã„ã€ãªã©ã¨ã„ã£ãŸé¢ã‹ã‚‰ã€ã‚¯ã‚¨ãƒªã«ãŠã‘るフォーミュラオブジェクトã®ä½¿ç”¨ã¯ **推奨** ã•れã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ•ォーミュラã¯ã€`Formula` ã¾ãŸã¯ `Formula from string` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸã‚‚ã®ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã“ã®å ´åˆã«ãŠã„ã¦: + +* フォーミュラã¯å‡¦ç†ã•れるエンティティã”ã¨ã«è©•価ã•れã€true ã¾ãŸã¯ false ã‚’è¿”ã•ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 クエリã®å®Ÿè¡Œä¸­ã€ãƒ•ォーミュラã®çµæžœãŒãƒ–ール値ã§ãªã‹ã£ãŸå ´åˆã€ãれ㯠false ã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™ã€‚ +* 処ç†ä¸­ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ•ォーミュラ内ã«ãŠã„㦠`This` ã§å‚ç…§ã•れã¾ã™ã€‚ +* `Formula` オブジェクト㌠**null** ã®å ´åˆã€ã‚¨ãƒ©ãƒ¼1626 ("テキストã¾ãŸã¯ãƒ•ォーミュラãŒå¿…è¦ã§ã™") ãŒç”Ÿæˆã•れã¾ã™ã€‚ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ `ON ERR CALL` ã§å®Ÿè£…ã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦å‰²ã‚Šè¾¼ã¿å¯èƒ½ã§ã™ã€‚ +> セキュリティã®ãŸã‚〠`query()` 関数内ã®ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ä½¿ç”¨ã‚’ç¦æ­¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ *querySettings* パラメーターã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + +**フォーミュラã«å¼•数を渡ã™** + +`query()` クラス関数ã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れるフォーミュラã¯ã€å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* 引数ã¯ã€*querySettings* 引数㮠**args** プロパティ (オブジェクト) を通ã—ã¦æ¸¡ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +* フォーミュラ㯠**args** オブジェクトを **$1** ã«å—ã‘å–りã¾ã™ã€‚ + +以下ã®çŸ­ã„コードã¯ã€å¼•æ•°ã‚’ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã«æ¸¡ã™ä»•組ã¿ã‚’示ã—ã¦ã„ã¾ã™: + +```4d + $settings:=New object("args";New object("exclude";"-")) // 引数を渡ã™ãŸã‚ã® args オブジェクト + $es:=ds.Students.query("eval(checkName($1.exclude))";$settings) // $1 ㌠args ã‚’å—ã‘å–りã¾ã™ +``` + +ã•らãªã‚‹ä½¿ç”¨ä¾‹ã¯ã€ä¾‹é¡Œ3ã«ã¦ç´¹ä»‹ã•れã¦ã„ã¾ã™ã€‚ + +**4D Server**: クライアント/サーãƒãƒ¼ã«ãŠã„ã¦ã¯ã€ãƒ•ォーミュラã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€`querySettings.args` オブジェクトã®ã¿ãŒãƒ•ォーミュラã«é€ä¿¡ã•れã¾ã™ã€‚ + + + +**querySettings 引数** + +*querySettings* 引数ã¯ã€è¿½åŠ ã®ã‚ªãƒ—ションを格ç´ã—ãŸã‚ªãƒ–ジェクトã§ã™ã€‚ 以下ã®ã‚ªãƒ–ジェクトプロパティãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| parameters | オブジェクト | *queryString* ã¾ãŸã¯ *formula* ã« **値ã®å‘½åプレースホルダー** を使用ã—ãŸå ´åˆã«æ¸¡ã™ã‚ªãƒ–ジェクト。 値ã¯ã€ãƒ—ロパティ/値ã®ãƒšã‚¢ã§è¡¨ç¾ã•れã¾ã™ã€‚プロパティã¯ã€*queryString* ã¾ãŸã¯ *formula* ã«å€¤ã®ä»£ã‚ã‚Šã«æŒ¿å…¥ã•れãŸãƒ—レースホルダーå (":placeholder"ãªã©) ã§ã€å€¤ã¯ã€å®Ÿéš›ã«æ¯”較ã•れる値ã§ã™ã€‚ インデックスプレースホルダー (value引数ã¨ã—ã¦å€¤ã‚’ç›´æŽ¥æ¸¡ã™æ–¹æ³•) ã¨å‘½åプレースホルダーã¯ã€åŒã˜ã‚¯ã‚¨ãƒªå†…ã§åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ | +| attributes | オブジェクト | *queryString* ã¾ãŸã¯ *formula* ã« **属性パスã®å‘½åプレースホルダー** を使用ã—ãŸå ´åˆã«æ¸¡ã™ã‚ªãƒ–ジェクト。 属性パスã¯ã€ãƒ—ロパティ/値ã®ãƒšã‚¢ã§è¡¨ç¾ã•れã¾ã™ã€‚プロパティã¯ã€*queryString* ã¾ãŸã¯ *formula* ã«å±žæ€§ãƒ‘スã®ä»£ã‚ã‚Šã«æŒ¿å…¥ã•れãŸãƒ—レースホルダーå (":placeholder"ãªã©) ã§ã€å€¤ã¯ã€å±žæ€§ãƒ‘ã‚¹ã‚’è¡¨ã™æ–‡å­—列ã¾ãŸã¯æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ 値ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¹ã‚«ãƒ©ãƒ¼å±žæ€§ãƒ»ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ãƒ»ã‚ªãƒ–ジェクトフィールド内ã®ãƒ—ロパティã¸ã®å±žæ€§ãƒ‘スを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

        タイプ説明
        Stringドット記法を使用ã—ã¦è¡¨ç¾ã•れ㟠attributePath (例: "name" ã¾ãŸã¯ "user.address.zipCode")
        文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„è¦ç´ ãŒ attributePath ã®éšŽå±¤ã‚’表ã—ã¾ã™ (例: ["name"] ã¾ãŸã¯ ["user","address","zipCode"])。 コレクションを使用ã™ã‚‹ã“ã¨ã§ã€ãƒ‰ãƒƒãƒˆè¨˜æ³•ã«æº–ã˜ã¦ã„ãªã„åå‰ã®å±žæ€§ã«å¯¾ã—ã¦ã‚‚クエリã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (例: \["4Dv17.1","en/fr"])。
        インデックスプレースホルダー (*value* 引数ã¨ã—ã¦å€¤ã‚’ç›´æŽ¥æ¸¡ã™æ–¹æ³•) ã¨å‘½åプレースホルダーã¯ã€åŒã˜ã‚¯ã‚¨ãƒªå†…ã§åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ | +| args | オブジェクト | ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã«æ¸¡ã™å¼•数。 **args** オブジェクトã¯ã€ãƒ•ォーミュラ内㮠$1 ãŒå—ã‘å–ã‚‹ã®ã§ã€ãã®å€¤ã¯ *$1.property* ã¨ã„ã†å½¢ã§åˆ©ç”¨å¯èƒ½ã§ã™ (例題3 å‚ç…§)。 | +| allowFormulas | ブール | クエリ内ã§ãƒ•ォーミュラã®å‘¼ã³å‡ºã—を許å¯ã™ã‚‹ã«ã¯ true (デフォルト)。 ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©å®Ÿè¡Œã‚’ç¦æ­¢ã™ã‚‹ã«ã¯ false を渡ã—ã¾ã™ã€‚ false ã«è¨­å®šã•れã¦ã„ã‚‹ã¨ãã«ã€ãƒ•ォーミュラ㌠`query()` ã«æ¸¡ã•れãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ (1278 - フォーミュラã¯ã“ã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“)。 | +| context | テキスト | エンティティセレクションã«é©ç”¨ã•れã¦ã„ã‚‹è‡ªå‹•ã®æœ€é©åŒ–コンテキストã®ãƒ©ãƒ™ãƒ«ã€‚ エンティティセレクションを扱ã†ã‚³ãƒ¼ãƒ‰ã¯ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使ã†ã“ã¨ã§æœ€é©åŒ–ã®æ©æµã‚’å—ã‘ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼å‡¦ç†ã‚’想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[**クライアント/サーãƒãƒ¼ã®æœ€é©åŒ–**](entities.md#クライアントサーãƒãƒ¼ã®æœ€é©åŒ–) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 | +| queryPlan | ブール | 戻り値ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã€å®Ÿè¡Œã™ã‚‹ç›´å‰ã®ã‚¯ã‚¨ãƒªã®è©³ç´° (クエリプラン) ã‚’å«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ è¿”ã•れるプロパティã¯ã€ã‚¯ã‚¨ãƒªãƒ—ラン ã‚ã‚‹ã„ã¯ã‚µãƒ–クエリ (複åˆã‚¯ã‚¨ãƒªã®å ´åˆ) ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトã§ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ã‚¢ãƒ—リケーションã®é–‹ç™ºãƒ•ェーズã«ãŠã„ã¦æœ‰ç”¨ã§ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯é€šå¸¸ queryPath ã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã•れã¾ã™ã€‚ çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト: false。 **注:** ã“ã®ãƒ—ロパティ㯠`entitySelection.query( )` ãŠã‚ˆã³ `dataClass.query( )` 関数ã«ãŠã„ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ | +| queryPath | ブール | 戻り値ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã€å®Ÿéš›ã«å®Ÿè¡Œã•れãŸã‚¯ã‚¨ãƒªã®è©³ç´°ã‚’å«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ è¿”ã•れãŸãƒ—ロパティã¯ã€ã‚¯ã‚¨ãƒªã§å®Ÿéš›ã«ä½¿ç”¨ã•れãŸãƒ‘ス (通常㯠queryPlan ã¨åŒä¸€ã§ã™ãŒã€ã‚¨ãƒ³ã‚¸ãƒ³ãŒã‚¯ã‚¨ãƒªã‚’最é©åŒ–ã—ãŸå ´åˆã«ã¯ç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™)ã€å‡¦ç†æ™‚é–“ã¨æ¤œå‡ºãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトã§ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ã‚¢ãƒ—リケーションã®é–‹ç™ºãƒ•ェーズã«ãŠã„ã¦æœ‰ç”¨ã§ã™ã€‚ çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト: false。 **注:** ã“ã®ãƒ—ロパティ㯠`entitySelection.query( )` ãŠã‚ˆã³ `dataClass.query( )` 関数ã«ãŠã„ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ | + +**queryPlan 㨠queryPath ã«ã¤ã„ã¦** + +`queryPlan`/`queryPath` ã«æ ¼ç´ã•れる情報ã«ã¯ã€ã‚¯ã‚¨ãƒªã®ç¨®é¡ž (インデックスã‚ã‚‹ã„ã¯ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«)ã€å¿…è¦ãªã‚µãƒ–クエリãŠã‚ˆã³ãã®é€£çµæ¼”ç®—å­ãŒå«ã¾ã‚Œã¾ã™ã€‚ クエリパスã«ã¯ã€è¦‹ã¤ã‹ã£ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ•°ã¨å„検索æ¡ä»¶ã‚’実行ã™ã‚‹ã«ã«ã‹ã‹ã£ãŸæ™‚é–“ã‚‚å«ã¾ã‚Œã¾ã™ã€‚ ã“ã®æƒ…å ±ã¯ã€ã‚¢ãƒ—リケーションã®é–‹ç™ºä¸­ã«è§£æžã™ã‚‹ã“ã¨ã§æœ‰åŠ¹ã«æ´»ç”¨ã§ãã¾ã™ã€‚ 一般的ã«ã¯ã€ã‚¯ã‚¨ãƒªãƒ—ランã¨ã‚¯ã‚¨ãƒªãƒ‘スã®è©³ç´°ã¯åŒä¸€ã«ãªã‚‹ã¯ãšã§ã™ãŒã€4D ã¯ãƒ‘フォーマンスã®å‘上ã®ãŸã‚ã«ã€å‹•çš„ãªæœ€é©åŒ–をクエリ実行時ã«å®Ÿè£…ã™ã‚‹ã“ã¨ãŒã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚ ãŸã¨ãˆã°ã€ãã®æ–¹ãŒæ—©ã„ã¨åˆ¤æ–­ã—ãŸå ´åˆã«ã¯ã€4Dエンジンã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä»˜ãクエリをシーケンシャルãªã‚‚ã®ã¸ã¨å‹•çš„ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ ã“ã‚Œã¯æ¤œç´¢ã•れã¦ã„ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ•°ãŒå°‘ãªã„ã¨ãã«èµ·ã“りãˆã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚¯ã‚¨ãƒªã‚’実行ã—ãŸå ´åˆ: + +```4d + $sel:=ds.Employee.query("salary < :1 and employer.name = :2 or employer.revenues > :3";\ + 50000;"Lima West Kilo";10000000;New object("queryPath";True;"queryPlan";True)) +``` + +queryPlan: + +```4d +{Or:[{And:[{item:[index : Employee.salary ] < 50000}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.name ] = Lima West Kilo}]}]}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.revenues ] > 10000000}]}]} +``` + +queryPath: + +```4d +{steps:[{description:OR,time:63,recordsfounds:1388132, + steps:[{description:AND,time:32,recordsfounds:131, + steps:[{description:[index : Employee.salary ] < 50000,time:16,recordsfounds:728260},{description:Join on Table : Company : Employee.employerID = Company.ID,time:0,recordsfounds:131, + steps:[{steps:[{description:[index : Company.name ] = Lima West Kilo,time:0,recordsfounds:1}]}]}]},{description:Join on Table : Company : Employee.employerID = Company.ID,time:31,recordsfounds:1388132, + steps:[{steps:[{description:[index : Company.revenues ] > 10000000,time:0,recordsfounds:933}]}]}]}]} +``` + +#### 例題 1 + +ã“ã®ä¾‹é¡Œã§ã¯ã€æ§˜ã€…ãªã‚¯ã‚¨ãƒªã®ä¾‹ã‚’紹介ã—ã¾ã™ã€‚ + +文字列ã®ã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Customer.query("firstName = 'S@'") +``` + +NOT節を用ã„ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("not(firstName=Kim)") +``` + +日付ã®ã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("birthDate > :1";"1970-01-01") +$entitySelection:=ds.Employee.query("birthDate <= :1";Current date-10950) +``` + +値ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Customer.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@") +``` + +リレートデータクラス対ã—ã¦å€¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("lastName = :1 and manager.lastName = :2";"M@";"S@") +``` + +é™é †ã® order by ステートメントをå«ã‚“ã ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Student.query("nationality = :1 order by campus.name desc, lastname";"French") +``` + +値ã®å‘½åプレースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings:=New object +$querySettings.parameters:=New object("userId";1234;"extraInfo";New object("name";"Smith")) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name = :extraInfo.name";$querySettings) +``` + +値ã®å‘½åプレースホルダーã¨ã€å€¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーã®ä¸¡æ–¹ã‚’使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings.parameters:=New object("userId";1234) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name=:1";"Smith";$querySettings) +``` + +queryPlan ãŠã‚ˆã³ queryPath オブジェクトを返ã™ã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@";New object("queryPlan";True;"queryPath";True)) + + // 戻り値ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰ä»¥ä¸‹ã®ãƒ—ロパティをå–å¾—ã§ãã¾ã™ +var $queryPlan; $queryPath : Object +$queryPlan:=$entitySelection.queryPlan +$queryPath:=$entitySelection.queryPath +``` + +コレクション型ã®å±žæ€§ãƒ‘スを用ã„ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[].name = :1";"horsebackriding") +``` + +コレクション型ã®å±žæ€§ãƒ‘スã¨ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’リンクã—ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and extraInfo.hobbies[a].level=:2";"horsebackriding";2) +``` + +コレクション型ã®å±žæ€§ãƒ‘スã¨ã‚¯ã‚¨ãƒªæ¡ä»¶ã‚’ã€è¤‡æ•°ãƒªãƒ³ã‚¯ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and + extraInfo.hobbies[a].level = :2 and extraInfo.hobbies[b].name = :3 and + extraInfo.hobbies[b].level = :4";"horsebackriding";2;"Tennis";5) +``` + +オブジェクト型ã®å±žæ€§ãƒ‘スを用ã„ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("extra.eyeColor = :1";"blue") +``` + +IN節を用ã„ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("firstName in :1";New collection("Kim";"Dixie")) +``` + +NOT (IN) 節を用ã„ãŸã‚¯ã‚¨ãƒª: + +```4d +$entitySelection:=ds.Employee.query("not (firstName in :1)";New collection("John";"Jane")) +``` + +属性パスã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Employee.query(":1 = 1234 and :2 = 'Smith'";"salesperson.userId";"name") + // salesperson ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ +``` + +属性パスã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーをã€å€¤ã®å‘½åプレースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d +var $es : cs.EmployeeSelection +var $querySettings : Object +$querySettings:=New object +$querySettings.parameters:=New object("customerName";"Smith") +$es:=ds.Customer.query(":1 = 1234 and :2 = :customerName";"salesperson.userId";"name";$querySettings) + // salesperson ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ +``` + +属性パスã¨å€¤ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ—レースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Clients.query(":1 = 1234 and :2 = :3";"salesperson.userId";"name";"Smith") + // salesperson ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ +``` + +#### 例題 2 + +ã“ã®ä¾‹é¡Œã§ã¯ã€å±žæ€§ãƒ‘スã®å‘½åプレースホルダーを使用ã™ã‚‹ã‚¯ã‚¨ãƒªã‚’紹介ã—ã¾ã™ã€‚ + +2ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’も㤠Employee ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’å‰æã«è€ƒãˆã¾ã™: + +エンティティ1: + +```4d +name: "Marie" +number: 46 +softwares:{ +"Word 10.2": "Installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +エンティティ2: + +```4d +name: "Sophie" +number: 47 +softwares:{ +"Word 10.2": "Not installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +属性パスã®å‘½åプレースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + $querySettings:=New object + $querySettings.attributes:=New object("attName";"name";"attWord";New collection("softwares";"Word 10.2")) + $es:=ds.Employee.query(":attName = 'Marie' and :attWord = 'Installed'";$querySettings) + //$es.length=1 (Employee Marie) +``` + +属性パスã¨å€¤ã®å‘½åプレースホルダーを使用ã—ãŸã‚¯ã‚¨ãƒª: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + var $name : Text + $querySettings:=New object + // 値ã®å‘½åプレースホルダー + // ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æ¤œç´¢ã™ã‚‹åå‰ã‚’入力ã—ã¦ã‚‚らã„ã¾ã™ + $name:=Request("検索ã™ã‚‹åå‰ã‚’入力ã—ã¦ãã ã•ã„:") + If(OK=1) + $querySettings.parameters:=New object("givenName";$name) + // 属性パスã®å‘½åプレースホルダー + $querySettings.attributes:=New object("attName";"name") + $es:=ds.Employee.query(":attName= :givenName";$querySettings) + End if +``` + +#### 例題 3 + +ã“ã®ä¾‹é¡Œã§ã¯ã€ã‚¯ã‚¨ãƒªã«ãŠã„ã¦ã€å¼•æ•°ã‚り・引数ãªã—ã§ãƒ•ォーミュラを使用ã™ã‚‹æ§˜ã€…ãªæ–¹æ³•を紹介ã—ã¾ã™ã€‚ + +`eval()` を使ã„ã€ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦ãƒ•ォーミュラを *queryString* ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã™ã‚¯ã‚¨ãƒª: + +```4d + var $es : cs.StudentsSelection + $es:=ds.Students.query("eval(length(This.lastname) >=30) and nationality='French'") +``` + +プレースホルダーを使ã„ã€`Formula`オブジェクトã¨ã—ã¦ãƒ•ォーミュラを渡ã™ã‚¯ã‚¨ãƒª: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query(":1 and nationality='French'";$formula) +``` + +`Formula` オブジェクトã®ã¿ã‚’検索æ¡ä»¶ã¨ã—ã¦æ¸¡ã—ãŸã‚¯ã‚¨ãƒª: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query($formula) +``` + +フォーミュラを複数é©ç”¨ã—ãŸã‚¯ã‚¨ãƒª: + +```4d + var $formula1; $1; $formula2 ;$0 : Object + $formula1:=$1 + $formula2:=Formula(Length(This.firstname)>=30) + $0:=ds.Students.query(":1 and :2 and nationality='French'";$formula1;$formula2) +``` + + +*queryString* ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ•ォーミュラãŒå¼•æ•°ã‚’å—ã‘å–るクエリ: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query("eval(checkName($1.filter)) and nationality=:1";"French";$settings) +``` + +```4d + // checkName メソッド + #DECLARE($exclude : Text) -> $result : Boolean + $result:=(Position($exclude;This.lastname)=0) +``` + +åŒã˜ ***checkName*** メソッドを `Formula` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ ¼ç´ã—ã¦ãƒ—ãƒ¬ãƒ¼ã‚¹ãƒ›ãƒ«ãƒ€ãƒ¼ã§æ¸¡ã—ã€å¼•æ•°ã‚’å—ã‘å–るクエリ: + +```4d + var $es : cs.StudentsSelection + var $settings; $formula : Object + $formula:=Formula(checkName($1.filter)) + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) + $settings.args.filter:="*" // $formula ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ›´æ–°ã›ãšã«å¼•数を変更ã—ã¾ã™ + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) +``` + +ユーザーãŒã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹å ´åˆãªã©ã«ã€ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã‚’ç¦æ­¢ã™ã‚‹å ´åˆ: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + var $queryString : Text + $queryString:=Request("Enter your query:") + if(OK=1) + $settings:=New object("allowFormulas";False) + $es:=ds.Students.query($queryString;$settings) // $queryString ã«ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ãŒæ ¼ç´ã•れã¦ã„ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ + End if +``` + +#### å‚ç…§ + +エンティティセレクション㮠[`.query()`](EntitySelectionClass.md#query) + + diff --git a/website/translated_docs/ja/API/DataStoreClass.md b/website/translated_docs/ja/API/DataStoreClass.md new file mode 100644 index 00000000000000..ebec2bcf219dd0 --- /dev/null +++ b/website/translated_docs/ja/API/DataStoreClass.md @@ -0,0 +1,955 @@ +--- +id: DataStoreClass +title: DataStore +--- + +[データストア](ORDA/dsMapping.md#datastore) ã¨ã¯ã€ORDA ã«ã‚ˆã£ã¦æä¾›ã•れるインターフェースオブジェクトã§ã™ã€‚データストアã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¸ã®å‚ç…§ã¨ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ `Datastore` オブジェクトã¯ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦è¿”ã•れã¾ã™: + +* [ds](#ds): メインデータストアã¸ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ +* [Open datastore](#open-datastore): リモートデータストアを開ãã¾ã™ + +### æ¦‚è¦ + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cancelTransaction()**](#canceltransaction)

            cancels the transaction | +| [***.dataclassName*** : 4D.DataClass](#dataclassname)

            contains a description of the dataclass | +| [**.encryptionStatus()**: Object](#encryptionstatus)

            returns an object providing the encryption status for the current data file | +| [**.getInfo()**: Object](#getinfo)

            returns an object providing information about the datastore | +| [**.getRequestLog()** : Collection](#getrequestlog)

            returns the ORDA requests logged in memory on the client side | +| [**.makeSelectionsAlterable()**](#makeselectionsalterable)

            sets all entity selections as alterable by default in the current application datastores | +| [**.provideDataKey**( *curPassPhrase* : Text ) : Object
        **.provideDataKey**( *curDataKey* : Object ) : Object ](#providedatakey)

            allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data | +| [**.setAdminProtection**( *status* : Boolean )](#setadminprotection)

            allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions | +| [**.startRequestLog**()
        **.startRequestLog**( *file* : 4D.File )
        **.startRequestLog**( *reqNum* : Integer )](#startrequestlog)

            starts the logging of ORDA requests on the client side | +| [**.startTransaction()**](#starttransaction)

            starts a transaction in the current process on the database matching the datastore to which it applies | +| [**.stopRequestLog()** ](#stoprequestlog)

            stops any logging of ORDA requests on the client side | +| [**.validateTransaction()** ](#validatetransaction)

            accepts the transaction | + + + + + +## ds + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | ------------------- | +| v18 | localID パラメーターをサãƒãƒ¼ãƒˆ | +| v17 | 追加 | +
        + +**ds** { ( *localID* : Text ) } : cs.DataStore +| 引数 | タイプ | | 説明 | +| ------- | ------------ | -- | ------------------------- | +| localID | テキスト | -> | å‚ç…§ã‚’å–å¾—ã—ãŸã„リモートデータストアã®ãƒ­ãƒ¼ã‚«ãƒ«ID | +| 戻り値 | cs.DataStore | <- | データストアå‚ç…§ | + + +#### 説明 + +The `ds` command returns a reference to the datastore matching the current 4D database or the database designated by *localID*. + +*localID* ã‚’çœç•¥ã—㟠(ã¾ãŸã¯ç©ºã®æ–‡å­—列 "" を渡ã—ãŸ) å ´åˆã«ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«4Dデータベース (4D Server ã§ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ã„ã¦ã„ã‚‹å ´åˆã«ã¯ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹) ã«åˆè‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ データストアã¯è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã€`ds` を介ã—ã¦ç›´æŽ¥åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +é–‹ã‹ã‚Œã¦ã„るリモートデータストアã®ãƒ­ãƒ¼ã‚«ãƒ«IDã‚’ *localID* ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã™ã¨ã€ãã®å‚ç…§ã‚’å–å¾—ã§ãã¾ã™ã€‚ ã“ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯ã€ã‚らã‹ã˜ã‚カレントデータベース (ホストã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ) ã«ã‚ˆã£ã¦ [`Open datastore`](#open-datastore) コマンドã§é–‹ã‹ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ãŸã¨ãã«ãƒ­ãƒ¼ã‚«ãƒ«IDãŒå®šç¾©ã•れã¾ã™ã€‚ +> ローカルIDã®ã‚¹ã‚³ãƒ¼ãƒ—ã¯ã€å½“該データストアを開ã„ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚ + +*localID* ã«åˆè‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã¯ **Null** ã‚’è¿”ã—ã¾ã™ã€‚ + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +#### 例題 1 + +4Dデータベースã®ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’使用ã—ã¾ã™: + +```4d + $result:=ds.Employee.query("firstName = :1";"S@") +``` + +#### 例題 2 + +```4d + var $connectTo; $firstFrench; $firstForeign : Object + + var $frenchStudents; $foreignStudents : cs.DataStore + + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + //... + //... + $firstFrench:=getFirst("french";"Students") + $firstForeign:=getFirst("foreign";"Students") +``` + +```4d + // getFirst メソッド + // getFirst(localID;dataclass) -> entity + #DECLARE( $localId : Text; $dataClassName : Text ) -> $entity : 4D.Entity + + $0:=ds($localId)[$dataClassName].all().first() +``` + + + + +## Open datastore + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**Open datastore**( *connectionInfo* : Object ; *localID* : Text ) : cs.DataStore +| 引数 | タイプ | | 説明 | +| -------------- | ------------ | -- | ------------------------------------------ | +| connectionInfo | オブジェクト | -> | リモートデータストアã¸ã®æŽ¥ç¶šã«ä½¿ç”¨ã™ã‚‹æŽ¥ç¶šãƒ—ロパティ | +| localID | テキスト | -> | ローカルアプリケーション内ã§ã€é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«å¯¾ã—ã¦å‰²ã‚Šå½“ã¦ã‚‹ ID (å¿…é ˆ) | +| 戻り値 | cs.DataStore | <- | データストアオブジェクト | + + +#### 説明 + +The `Open datastore` command connects the application to the 4D database identified by the *connectionInfo* parameter and returns a matching `cs.DataStore` object associated with the *localID* local alias. + +*connectionInfo* ã§æŒ‡å®šã™ã‚‹ 4Dデータベースã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ¼ã‚¹ãƒˆã‚¢ã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Šã€ä»¥ä¸‹ã®æ¡ä»¶ã‚’満ãŸã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +* データベース㮠Webサーãƒãƒ¼ã¯ã€http ã¾ãŸã¯ https ãŒæœ‰åŠ¹åŒ–ã•れãŸçŠ¶æ…‹ã§é–‹å§‹ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +* データベース㮠+ +**REST サーãƒãƒ¼ã¨ã—ã¦å…¬é–‹** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚
      • + + * データベースã«ãŠã„ã¦ã€å°‘ãªãã¨ã‚‚ 1ã¤ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒåˆ©ç”¨å¯èƒ½ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +åˆè‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€`Open datastore` 㯠**Null** ã‚’è¿”ã—ã¾ã™ã€‚ + +*localID* 引数ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ä¸Šã§é–‹ã‹ã‚Œã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã§ã™ã€‚ *localID* 引数㮠ID ãŒã™ã§ã«ã‚¢ãƒ—リケーションã«å­˜åœ¨ã—ã¦ã„ã‚‹å ´åˆã€ãã® ID ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ ãã†ã§ãªã„å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚ªãƒ–ジェクトãŒä½¿ç”¨ã•れãŸã¨ãã« *localID* ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæ–°è¦ã«ä½œæˆã•れã¾ã™ã€‚ + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +一旦セッションãŒé–‹ã‹ã‚Œã‚‹ã¨ã€ä»¥ä¸‹ã® 2行ã®å®£è¨€ã¯åŒç­‰ã®ã‚‚ã®ã¨ãªã‚Šã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ã‚’è¿”ã—ã¾ã™: + + + +```4d + $myds:=Open datastore(connectionInfo;"myLocalId") + $myds2:=ds("myLocalId") + //$myds 㨠$myds2 ã¯åŒä¸€ã®ã‚‚ã®ã§ã™ +``` + + +*connectionInfo* ã«ã¯ã€æŽ¥ç¶šã—ãŸã„リモートデータストアã®è©³ç´°ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã—ã¾ã™ã€‚ オブジェクトã¯ä»¥ä¸‹ã®ãƒ—ロパティを格ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (*hostname* を除ãã€ã™ã¹ã¦ã®ãƒ—ロパティã¯ä»»æ„ã§ã™): + +| プロパティ | タイプ | 説明 | +| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hostname | Text | リモートデータストアã®åå‰ã¾ãŸã¯ IPアドレス + ":" + ãƒãƒ¼ãƒˆç•ªå· (ãƒãƒ¼ãƒˆç•ªå·ã¯å¿…é ˆ) | +| user | Text | ユーザーå | +| password | Text | ユーザーパスワード | +| idleTimeout | Longint | アクティビティãŒãªã‹ã£ãŸå ´åˆã«ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã™ã‚‹ã¾ã§ã®æ™‚é–“ (分å˜ä½)。ã“ã®æ™‚é–“ã‚’éŽãŽã‚‹ã¨ã€4D ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト㯠60 (1時間) ã§ã™ã€‚ 60 (分) 未満ã®å€¤ã‚’指定ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (60 未満ã®å€¤ã‚’渡ã—ãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ 60 (分) ã«è¨­å®šã•れã¾ã™)。 詳細ã«ã¤ã„ã¦ã¯ã€[**セッションã®çµ‚了**](datastores.md#セッションã®çµ‚了) ã‚’å‚ç…§ãã ã•ã„。 | +| tls | Boolean | å®‰å…¨ãªæŽ¥ç¶šã‚’ä½¿ç”¨ã—ã¾ã™(*)。 çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト㯠false ã§ã™ã€‚ å¯èƒ½ãªã‹ãŽã‚Šå®‰å…¨ãªæŽ¥ç¶šã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ | +| type | Text | "4D Server" ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“ | + + +(*) tls ㌠true ã ã£ãŸå ´åˆã€ä»¥ä¸‹ã®æ¡ä»¶ãŒæº€ãŸã•れã¦ã„れã°ã€HTTPSプロトコルãŒä½¿ç”¨ã•れã¾ã™: + +* リモートデータストア㧠HTTPS ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„る。 +* 指定ã•れãŸãƒãƒ¼ãƒˆç•ªå·ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã§è¨­å®šã•れã¦ã„ã‚‹ HTTPS ãƒãƒ¼ãƒˆã¨åˆè‡´ã—ã¦ã„る。 +* ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æœ‰åйãªè¨¼æ˜Žæ›¸ã¨éžå…¬é–‹æš—å·éµãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„る。 æ¡ä»¶ã‚’満ãŸã•ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ "1610 - ホスト xxx ã¸ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¤±æ•—ã—ã¾ã—ãŸ" ãŒç”Ÿæˆã•れã¾ã™ã€‚ + + + +#### 例題 1 + +user / password を指定ã›ãšã«ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã—ã¾ã™: + + + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $remoteDS:=Open datastore($connectTo;"students") + ALERT("ã“ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã¯ "+String($remoteDS.Students.all().length)+" åã®ç”Ÿå¾’ãŒç™»éŒ²ã•れã¦ã„ã¾ã™") +``` + + + + +#### 例題 2 + +user / password / timeout / tls を指定ã—ã¦ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã—ã¾ã™: + + + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";\"192.168.18.11:4443";\ + "user";"marie";"password";$pwd;"idleTimeout";70;"tls";True) + $remoteDS:=Open datastore($connectTo;"students") + ALERT("ã“ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã¯ "+String($remoteDS.Students.all().length)+" åã®ç”Ÿå¾’ãŒç™»éŒ²ã•れã¦ã„ã¾ã™") +``` + + + + +#### 例題 3 + +複数ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¨æŽ¥ç¶šã—ã¾ã™: + + + +```4d + var $connectTo : Object + var $frenchStudents; $foreignStudents : cs.DataStore + $connectTo:=New object("hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + ALERT("フランスã®ç”Ÿå¾’㯠"+String($frenchStudents.Students.all().length)+" åã§ã™") + ALERT("外国ã®ç”Ÿå¾’㯠"+String($foreignStudents.Students.all().length)+" åã§ã™") +``` + + + + +#### ã‚¨ãƒ©ãƒ¼ç®¡ç† + +エラーãŒèµ·ããŸå ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã¯ **Null** ã‚’è¿”ã—ã¾ã™ã€‚ リモートデータベースã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã‹ã£ãŸå ´åˆ (アドレスé•ã„ã€Webサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„ãªã„ã€http/https ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ãªã„ã€ç­‰)ã€ã‚¨ãƒ©ãƒ¼1610 "ホスト XXX ã¸ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¤±æ•—ã—ã¾ã—ãŸ" ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ `ON ERR CALL` ã§å®Ÿè£…ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã§å‰²ã‚Šè¾¼ã¿å¯èƒ½ã§ã™ã€‚ + + + + + +## *.dataclassName* + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +***.dataclassName*** : 4D.DataClass + + + +#### 説明 + +データストアã®å„データクラス㯠[DataStore オブジェクト](ORDA/dsMapping.md#データストア) ã®ãƒ—ロパティã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ The returned object contains a description of the dataclass. + + + + +#### 例題 + + + +```4d + var $emp : cs.Employee + var $sel : cs.EmployeeSelection + $emp:=ds.Employee //$emp 㯠Employeeデータクラスを格ç´ã—ã¾ã™ + $sel:=$emp.all() // 全従業員ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ + + // ã‚ã‚‹ã„ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ç›´æŽ¥æ›¸ãã“ã¨ã‚‚å¯èƒ½ã§ã™: + $sel:=ds.Employee.all() +``` + + + + + + + + + +## .cancelTransaction() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**.cancelTransaction()** + +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + + + + +#### 説明 + +The `.cancelTransaction()` function cancels the transaction opened by the [`.startTransaction()`](#starttransaction) function at the corresponding level in the current process for the specified datastore. + +`.cancelTransaction()` 関数ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ä¸­ã«ãŠã“ãªã‚れãŸãƒ‡ãƒ¼ã‚¿å¤‰æ›´ã‚’ã™ã¹ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã—ã¾ã™ã€‚ + +複数ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãƒã‚¹ãƒˆã™ã‚‹ã“㨠(サブトランザクション) ãŒå¯èƒ½ã§ã™ã€‚ メイントランザクションãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¨ã€ã‚µãƒ–トランザクションも (ãŸã¨ãˆå€‹ã€…ã«[`.validateTransaction()`](#validatetransactions) é–¢æ•°ã§æ‰¿èªã•れã¦ã„ã¦ã‚‚) ã™ã¹ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚ + + + + +#### 例題 + +[`.startTransaction()`](#starttransaction) 関数ã®ä¾‹é¡Œã‚’å‚ç…§ãã ã•ã„。 + + + + + + + +## .encryptionStatus() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.encryptionStatus()**: Object + +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ---------------------------- | +| 戻り値 | オブジェクト | <- | カレントデータストアã¨ã€å„ãƒ†ãƒ¼ãƒ–ãƒ«ã®æš—å·åŒ–ã«ã¤ã„ã¦ã®æƒ…å ± | + + + + + +#### 説明 + +The `.encryptionStatus()` function returns an object providing the encryption status for the current data file (i.e., the data file of the `ds` datastore). å„テーブルã®çŠ¶æ…‹ã‚‚æä¾›ã•れã¾ã™ã€‚ + + +> ãã®ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®æš—å·åŒ–状態を調ã¹ã‚‹ã«ã¯ã€`Data file encryption status` コマンドを使ã„ã¾ã™ã€‚ + +**戻り値** + +戻り値ã®ã‚ªãƒ–ジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | | | タイプ | 説明 | +| ----------- | ----------- | ------------- | ------ | ----------------------------------------- | +| isEncrypted | | | ブール | ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ãŒæš—å·åŒ–ã•れã¦ã„れ㰠true | +| keyProvided | | | ブール | æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«åˆè‡´ã™ã‚‹æš—å·åŒ–ã‚­ãƒ¼ãŒæä¾›ã•れã¦ã„れ㰠true (*) | +| tables | | | オブジェクト | æš—å·åŒ–å¯èƒ½ãŠã‚ˆã³æš—å·åŒ–ã•れãŸãƒ†ãƒ¼ãƒ–ルã¨åŒã˜æ•°ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクト | +| | *tableName* | | オブジェクト | æš—å·åŒ–å¯èƒ½ã¾ãŸã¯æš—å·åŒ–ã•れãŸãƒ†ãƒ¼ãƒ–ル | +| | | name | テキスト | テーブルå | +| | | num | 数値 | ãƒ†ãƒ¼ãƒ–ãƒ«ç•ªå· | +| | | isEncryptable | ブール | ストラクãƒãƒ£ãƒ¼ãƒ•ァイルã«ãŠã„ã¦ã€ãƒ†ãƒ¼ãƒ–ãƒ«ãŒæš—å·åŒ–å¯èƒ½ã¨å®£è¨€ã•れã¦ã„れ㰠true | +| | | isEncrypted | ブール | データファイルã«ãŠã„ã¦ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒæš—å·åŒ–ã•れã¦ã„れ㰠true | + + +(*) æš—å·åŒ–キーã¯ã€ä»¥ä¸‹ã®æ‰‹æ®µã®ã„ãšã‚Œã‹ã§æä¾›ã•れã¾ã™: + +* `.provideDataKey()` コマンド +* データストアを開ãå‰ã«æŽ¥ç¶šã•れã¦ã„ãŸãƒ‡ãƒã‚¤ã‚¹ã®ãƒ«ãƒ¼ãƒˆ +* `Discover data key` コマンド + + + +#### 例題 + +ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«å†…ã§æš—å·åŒ–ã•れã¦ã„ã‚‹ãƒ†ãƒ¼ãƒ–ãƒ«ã®æ•°ã‚’知りãŸã„å ´åˆ: + + + +```4d + var $status : Object + + $status:=dataStore.encryptionStatus() + + If($status.isEncrypted) // ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæš—å·åŒ–ã•れã¦ã„れ㰠+ C_LONGINT($vcount) + C_TEXT($tabName) + For each($tabName;$status.tables) + If($status.tables[$tabName].isEncrypted) + $vcount:=$vcount+1 + End if + End for each + ALERT("データベースã«ã¯ "+String($vcount)+" ä»¶ã®æš—å·åŒ–ã•れãŸãƒ†ãƒ¼ãƒ–ルãŒå­˜åœ¨ã—ã¦ã„ã¾ã™ã€‚") + Else + ALERT("ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯æš—å·åŒ–ã•れã¦ã„ã¾ã›ã‚“。") + End if +``` + + + + + + + +## .getInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + + +
        + +**.getInfo()**: Object + +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ------------ | +| 戻り値 | オブジェクト | <- | データストアã®ãƒ—ロパティ | + + + + +#### 説明 + +The `.getInfo()` function returns an object providing information about the datastore. ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã‚’書ãã®ã«æœ‰ç”¨ã§ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +| プロパティ | タイプ | 説明 | +| ---------- | ------- | -------------------------------------------------------------------------------------------------------------------- | +| type | string |
      • "4D": ds ã§åˆ©ç”¨å¯èƒ½ãªãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢
      • "4D Server": Open datastore ã§é–‹ã‹ã‚ŒãŸãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢
      • | +| networked | boolean |
      • true: ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢
      • false: ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šã‚’介ã•ãšã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ã„るデータストア (ローカルデータベース)
      • | +| localID | text | マシン上ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ID。 ã“れã¯ã€`Open datastore` コマンドã§è¿”ã•れる localId 文字列ã§ã™ã€‚ メインデータストアã®å ´åˆã¯ç©ºã®æ–‡å­—列 ("") ã§ã™ã€‚ | +| connection | object | ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢æŽ¥ç¶šã®æƒ…報を格ç´ã—ãŸã‚ªãƒ–ジェクト (メインデータストアã®å ´åˆã¯è¿”ã•れã¾ã›ã‚“)。 次ã®ãƒ—ロパティをå«ã¿ã¾ã™:

        プロパティタイプ説明
        hostnametextリモートデータストア㮠IPアドレスã¾ãŸã¯åç§° + ":" + ãƒãƒ¼ãƒˆç•ªå·
        tlsbooleanリモートデータストアã¨ã‚»ã‚­ãƒ¥ã‚¢æŽ¥ç¶šã‚’利用ã—ã¦ã„ã‚‹å ´åˆã¯ true
        idleTimeoutnumberセッションéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–タイムアウト (分å˜ä½)。
        usertextリモートデータストアã«ã¦èªè¨¼ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼
        | + + +* `.getInfo()` 関数ãŒã€4D Server ã¾ãŸã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‰ˆ 4D 上ã§å®Ÿè¡Œã•れãŸå ´åˆã€`networked` 㯠false ã¨ãªã‚Šã¾ã™ã€‚ +* `.getInfo()` 関数ãŒã€ãƒªãƒ¢ãƒ¼ãƒˆç‰ˆ 4D 上ã§å®Ÿè¡Œã•れãŸå ´åˆã€`networked` 㯠true ã¨ãªã‚Šã¾ã™ã€‚ + + + + +#### 例題 1 + + + +```4d + var $info : Object + + $info:=ds.getInfo() // 4D Server ã¾ãŸã¯ 4D 上ã§å®Ÿè¡Œã—ãŸå ´åˆ + //{"type":"4D","networked":false,"localID":""} + + $info:=ds.getInfo() // リモート版4D 上ã§å®Ÿè¡Œã—ãŸå ´åˆ + //{"type":"4D","networked":true,"localID":""} +``` + + + + +#### 例題 2 + +リモートデータストアã®å ´åˆ: + + + +```4d + var $remoteDS : cs.DataStore + var $info; $connectTo : Object + + $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa") + $remoteDS:=Open datastore($connectTo;"students") + $info:=$remoteDS.getInfo() + + //{"type":"4D Server", + //"localID":"students", + //"networked":true, + //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}} +``` + + + + + + + + +## .getRequestLog() + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R6 | 追加 | +
        + +**.getRequestLog()** : Collection + +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ---------------------------------- | +| 戻り値 | コレクション | <- | オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (è¦ç´ æ¯Žã«ä¸€ã¤ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’記述ã—ã¾ã™) | + + + + + +#### 説明 + +The `.getRequestLog()` function returns the ORDA requests logged in memory on the client side. ORDAリクエストã®ãƒ­ã‚°ãŒã€[`.startRequestLog()`](#startrequestlog) 関数ã«ã‚ˆã£ã¦äº‹å‰ã«æœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒªãƒ¢ãƒ¼ãƒˆã® 4D ã§å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ ã“れã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ç’°å¢ƒã§ã®ãƒ‡ãƒãƒƒã‚°ã‚’想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ + +**戻り値** + +スタックã•れãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ ç›´è¿‘ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã¯ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ 0 ãŒæŒ¯ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +ORDAリクエストログã®ãƒ•ォーマットã®è©³ç´°ã¯ã€[**ORDAクライアントリクエスト**](https://doc.4d.com/4Dv18R6/4D/18-R6/Description-of-log-files.300-5217819.ja.html#4385373) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + + + + +#### 例題 + +[`.startRequestLog()`](#startrequestlog) ã®ä¾‹é¡Œ2ã‚’å‚ç…§ãã ã•ã„。 + + + + + +## .isAdminProtected() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.isAdminProtected()** : Boolean + +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ---------------------------------------------------------- | +| 戻り値 | ブール | <- | データエクスプローラーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒç„¡åйã«è¨­å®šã•れã¦ã„ã‚‹ã®å ´åˆã¯ trueã€æœ‰åйã®å ´åˆã¯ false (デフォルト) | + + + + + +#### 説明 + +The `.isAdminProtected()` function returns `True` if [Data Explorer](Admin/dataExplorer.md) access has been disabled for the working session. + +`webAdmin`セッションã«ãŠã„ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åйã¨ãªã£ã¦ã„ã¾ã™ãŒã€ç®¡ç†è€…ã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ãŸã‚無効ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ ([`.setAdminProtection()`](#setadminprotection) 関数å‚ç…§)。 + + + +#### å‚ç…§ + +[`.setAdminProtection()`](#setadminprotection) + + + + + + + +## .makeSelectionsAlterable() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.makeSelectionsAlterable()** + +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + + + + +#### 説明 + +The `.makeSelectionsAlterable()` function sets all entity selections as alterable by default in the current application datastores (including [remote datastores](ORDA/remoteDatastores.md)). ã“れã¯ãŸã¨ãˆã° `On Startup` データベースメソッドãªã©ã§ã€ä¸€åº¦ã ã‘使用ã™ã‚‹ã“ã¨ãŒæƒ³å®šã•れã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã°ã‚Œã¦ãªã„å ´åˆã€æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ãれãžã‚Œã® "親" ã®æ€§è³ªã‚„ä½œæˆæ–¹æ³•ã«å¿œã˜ã¦ã€å…±æœ‰å¯èƒ½ã«è¨­å®šã•れる場åˆã‚‚ã‚りã¾ã™ ([共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) å‚ç…§)。 + + + +> ã“ã®é–¢æ•°ã¯ã€`OB Copy` ã¾ãŸã¯ [`.copy()`](#copy) ã« `ck shared` オプションを明示的ã«ä½¿ç”¨ã—ã¦ä½œæˆã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯é©ç”¨ã•れã¾ã›ã‚“。 + + + + +> **äº’æ›æ€§ã«é–¢ã™ã‚‹æ³¨è¨˜**: ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ 4D v18 R5 よりå‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‹ã‚‰å¤‰æ›ã•れãŸãƒ—ロジェクトã§ã€[.add()](EntitySelectionClass.md#add) ã®å‘¼ã³å‡ºã—を使用ã—ã¦ã„ã‚‹ã‚‚ã®ã«ãŠã„ã¦ã®ã¿ä½¿ç”¨ã—ã¦ãã ã•ã„。 ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€`.makeSelectionsAlterable()` を使用ã™ã‚‹ã“ã¨ã§ã€æ—¢å­˜ãƒ—ロジェクト内ã§ä»¥å‰ã® 4D ã®ãµã‚‹ã¾ã„ã‚’å†ç¾ã—ã€æ™‚間を節約ã§ãã¾ã™ã€‚ 逆ã«ã€4D v18 R5 以é™ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½œæˆã•ã‚ŒãŸæ–°è¦ãƒ—ロジェクトã«ãŠã„ã¦ã¯ã€ã“ã®é–¢æ•°ã®ä½¿ç”¨ã¯ **推奨ã•れã¦ã„ã¾ã›ã‚“**。エンティティセレクションを共有å¯èƒ½ã«ã§ããªã„ãŸã‚ã€ãƒ‘フォーマンスã¨ã‚¹ã‚±ãƒ¼ãƒ©ãƒ“リティã®è¦³ç‚¹ã§å¦¨ã’ã«ãªã‚‹ã‹ã‚‰ã§ã™ã€‚ + + + + + + +## .provideDataKey() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.provideDataKey**( *curPassPhrase* : Text ) : Object
        **.provideDataKey**( *curDataKey* : Object ) : Object + +| 引数 | タイプ | | 説明 | +| ------------- | ------ | -- | ------------- | +| curPassPhrase | テキスト | -> | カレントã®ãƒ‘スフレーズ | +| curDataKey | オブジェクト | -> | カレントã®ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キー | +| 戻り値 | オブジェクト | <- | æš—å·åŒ–キーã®ãƒã‚§ãƒƒã‚¯ã®çµæžœ | + + + + + +#### 説明 + +The `.provideDataKey()` function allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data. ã“ã®é–¢æ•°ã¯ã€æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ãã¨ãã‚„ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®å†æš—å·åŒ–ãªã©æš—å·åŒ–キーãŒå¿…è¦ã¨ãªã‚‹æš—å·åŒ–オペレーションを実行ã™ã‚‹éš›ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + + +> * `.provideDataKey()` é–¢æ•°ã¯æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã§å‘¼ã³å‡ºã•れる必è¦ãŒã‚りã¾ã™ã€‚ æš—å·åŒ–ã•れã¦ã„ãªã„データベース内ã§å‘¼ã³å‡ºã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼2003 (æš—å·åŒ–キーã¯ãƒ‡ãƒ¼ã‚¿ã¨åˆè‡´ã—ã¾ã›ã‚“) ãŒè¿”ã•れã¾ã™ã€‚ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæš—å·åŒ–ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’調ã¹ã‚‹ã«ã¯ `Data file encryption status` コマンドを使用ã—ã¾ã™ã€‚ +> * リモート㮠4D ã¾ãŸã¯æš—å·åŒ–ã•れãŸãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‹ã‚‰ã€`.provideDataKey()` 関数を呼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +*curPassPhrase* パラメーターを使用ã™ã‚‹å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キーã®ç”Ÿæˆã«ä½¿ç”¨ã—ãŸæ–‡å­—列を渡ã—ã¾ã™ã€‚ ã“ã®ãƒ‘ラメーターを使用ã—ãŸå ´åˆã€æš—å·åŒ–キーãŒç”Ÿæˆã•れã¾ã™ã€‚ + +*curDataKey* パラメーターを使用ã™ã‚‹å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キー (*encodedKey* プロパティ) ã‚’æ ¼ç´ã™ã‚‹ã‚ªãƒ–ジェクトを渡ã—ã¾ã™ã€‚ ã“ã®ã‚­ãƒ¼ã¯ã€`New data key` コマンドã§ç”Ÿæˆã•れãŸå¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + +æœ‰åŠ¹ãªæš—å·åŒ–ã‚­ãƒ¼ãŒæä¾›ã•れãŸå ´åˆã€ãã®ã‚­ãƒ¼ã¯ãƒ¡ãƒ¢ãƒªå†…ã® *keyChain* ã«è¿½åŠ ã•ã‚Œã€æš—å·åŒ–ãƒ¢ãƒ¼ãƒ‰ãŒæœ‰åйã«ãªã‚Šã¾ã™: + +* æš—å·åŒ–å¯èƒ½ãƒ†ãƒ¼ãƒ–ルã«å¯¾ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ç·¨é›†ã¯ã™ã¹ã¦ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Š (.4DDã€.journal〠.4Dindx ファイル) ã§æš—å·åŒ–ã•れã¾ã™ã€‚ +* æš—å·åŒ–å¯èƒ½ãƒ†ãƒ¼ãƒ–ルã‹ã‚‰èª­ã¿å‡ºã—ãŸã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ãƒ¡ãƒ¢ãƒªå†…ã§å¾©å·åŒ–ã•れã¾ã™ã€‚ + +**戻り値** + +コマンドã®å®Ÿè¡Œçµæžœã¯ã€æˆ»ã‚Šå€¤ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ ¼ç´ã•れã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ------------------------ | ------ | ------------------------------------------- | +| success | | ブール | æä¾›ã•ã‚ŒãŸæš—å·åŒ–ã‚­ãƒ¼ãŒæš—å·åŒ–データã¨åˆè‡´ã™ã‚Œã° trueã€ãれ以外㯠false | +| | | | 以下ã®ãƒ—ロパティã¯ã€success ㌠*FALSE* ã§ã‚ã£ãŸå ´åˆã«ã®ã¿è¿”ã•れã¾ã™ã€‚ | +| status | | 数値 | エラーコード (æä¾›ã•ã‚ŒãŸæš—å·åŒ–キーãŒé–“é•ã£ã¦ã„ãŸå ´åˆã«ã¯ 4) | +| statusText | | テキスト | エラーメッセージ | +| errors | | コレクション | エラーã®ã‚¹ã‚¿ãƒƒã‚¯ã€‚ 最åˆã®ã‚¨ãƒ©ãƒ¼ã«æœ€ã‚‚高ã„インデックスãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ | +| | \[ ].componentSignature | テキスト | 内部コンãƒãƒ¼ãƒãƒ³ãƒˆå | +| | \[ ].errCode | 数値 | ã‚¨ãƒ©ãƒ¼ç•ªå· | +| | \[ ].message | テキスト | エラーメッセージ | + + +*curPassphrase* ãŠã‚ˆã³ *curDataKey* ã®ã©ã¡ã‚‰ã®å¼•数も渡ã•れãªã‹ã£ãŸå ´åˆã€`.provideDataKey()` 㯠**null** ã‚’è¿”ã—ã¾ã™ (ã“ã®å ´åˆã‚¨ãƒ©ãƒ¼ã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 + + + + + +#### 例題 + + + +```4d + var $keyStatus : Object + var $passphrase : Text + + $passphrase:=Request("パスフレーズを入力ã—ã¦ãã ã•ã„。") + If(OK=1) + $keyStatus:=ds.provideDataKey($passphrase) + If($keyStatus.success) + ALERT("æä¾›ã•ã‚ŒãŸæš—å·åŒ–ã‚­ãƒ¼ã¯æœ‰åйã§ã™ã€‚") + Else + ALERT("æä¾›ã•ã‚ŒãŸæš—å·åŒ–キーã¯ç„¡åйã§ã™ã€‚æš—å·åŒ–データã®ç·¨é›†ã¯ã§ãã¾ã›ã‚“。") + End if + End if +``` + + + + + + + +## .setAdminProtection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.setAdminProtection**( *status* : Boolean ) + +| 引数 | タイプ | | 説明 | +| ------ | --- | -- | ----------------------------------------------------------------------------- | +| status | ブール | -> | `webAdmin`ãƒãƒ¼ãƒˆä¸Šã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’無効ã«ã™ã‚‹ã«ã¯ trueã€ã‚¢ã‚¯ã‚»ã‚¹ã‚’有効ã«ã™ã‚‹ã«ã¯ false (デフォルト) | + + + + + +#### 説明 + +The `.setAdminProtection()` function allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions. + +ã“ã®é–¢æ•°ãŒå‘¼ã³å‡ºã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーを使用ã—㟠`WebAdmin` 権é™ã‚’æŒã¤ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã€Web管ç†ãƒãƒ¼ãƒˆä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¯å¸¸ã«è¨±å¯ã•れã¾ã™ã€‚ 環境ã«ã‚ˆã£ã¦ã¯ (ãŸã¨ãˆã°ã€ã‚¢ãƒ—リケーションサーãƒãƒ¼ãŒç¬¬ä¸‰è€…ã®ãƒžã‚·ãƒ³ä¸Šã§ãƒ›ã‚¹ãƒˆã•れã¦ã„ã‚‹å ´åˆ)〠管ç†è€…ã«å¯¾ã—㦠[access key](Admin/webAdmin.md#access-key) 設定をå«ã‚€ã‚µãƒ¼ãƒãƒ¼è¨­å®šã®ç·¨é›†ã¯è¨±å¯ã—ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿é–²è¦§ã¯ã§ããªã„よã†ã«ã—ãŸã„ã‹ã‚‚ã—れã¾ã›ã‚“。 + +ã“ã®ã‚ˆã†ãªå ´åˆã«ã“ã®é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒ `WebAdmin` 権é™ã‚’æŒã£ã¦ã„ã¦ã‚‚ã€ãƒžã‚·ãƒ³ã® Web管ç†ãƒãƒ¼ãƒˆä¸Šã§ã®ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’無効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®é–¢æ•°ã‚’実行ã™ã‚‹ã¨ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯å³åº§ã«ä¿è­·ã•れã€ãã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜ã•れã¾ã™: アプリケーションをå†èµ·å‹•ã—ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯ä¿è­·ã•れãŸã¾ã¾ã§ã™ã€‚ + + + + +#### 例題 + +é‹ç”¨å‰ã«å‘¼ã³å‡ºã™ *protectDataFile* プロジェクトメソッドを作æˆã—ã¾ã™: + + + +```4d + ds.setAdminProtection(True) // データエクスプローラーã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã‚’無効化ã—ã¾ã™ +``` + + + + +#### å‚ç…§ + +[`.isAdminProtected()`](#isadminprotected) + + + + + +## .startRequestLog() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R6 | 追加 | +
        + +**.startRequestLog**()
        **.startRequestLog**( *file* : 4D.File )
        **.startRequestLog**( *reqNum* : Integer ) + +| 引数 | タイプ | | 説明 | +| ------ | ------- | -- | ---------------- | +| file | 4D.File | -> | File オブジェクト | +| reqNum | æ•´æ•° | -> | メモリ内ã«ä¿ç®¡ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æ•° | + + + + + +#### 説明 + +The `.startRequestLog()` function starts the logging of ORDA requests on the client side. + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒªãƒ¢ãƒ¼ãƒˆå´ã® 4D ã§å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã€ãれ以外ã®å ´åˆã«ã¯ä½•ã‚‚ã—ã¾ã›ã‚“。 ã“れã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ç’°å¢ƒã§ã®ãƒ‡ãƒãƒƒã‚°ã‚’想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ + +ORDA リクエストログã¯ã€æ¸¡ã—ãŸå¼•æ•°ã«ã‚ˆã£ã¦ãƒ•ァイルã¾ãŸã¯ãƒ¡ãƒ¢ãƒªã«é€ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* `File` コマンドã§ä½œæˆã•れ㟠*file* オブジェクトを渡ã—ãŸå ´åˆã€ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã¯ã‚ªãƒ–ジェクト (JSON フォーマット) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ å„オブジェクトã¯ä¸€ã¤ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’表ã—ã¾ã™ã€‚
        ファイルãŒã¾ã å­˜åœ¨ã—ãªã„å ´åˆã«ã¯ã€ä½œæˆã•れã¾ã™ã€‚ ã‚‚ã—ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€æ–°ã—ã„ログデータã¯ãã“ã«è¿½åŠ ã•れã¦ã„ãã¾ã™ã€‚ メモリã¸ã®ãƒ­ã‚°è¨˜éŒ²ãŒæ—¢ã«å§‹ã¾ã£ã¦ã„る状態ã§ã€ `.startRequestLog( )`㌠file 引数付ãã§å‘¼ã³å‡ºã•れãŸå ´åˆã€ãƒ¡ãƒ¢ãƒªã«è¨˜éŒ²ã•れã¦ã„ãŸãƒ­ã‚°ã¯åœæ­¢ã•れ消去ã•れã¾ã™ã€‚ + + +> JSON 評価を実行ã™ã‚‹ã«ã¯ã€ãƒ•ァイルã®çµ‚ã‚ã‚Šã«æ‰‹å‹•ã§ \] 文字を追加ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +* *reqNum* (å€é•·æ•´æ•°) 引数を渡ã—ãŸå ´åˆã€ãƒ¡ãƒ¢ãƒªå†…ã®ãƒ­ã‚°ã¯ (ã‚れã°) 消去ã•ã‚Œã€æ–°ã—ã„ログãŒåˆæœŸåŒ–ã•れã¾ã™ã€‚ *reqNum* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹æ•°ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ãŒåˆ°é”ã™ã‚‹ã¾ã§ã¯ã€ãƒ­ã‚°ã¯ãƒ¡ãƒ¢ãƒªã«ä¿ç®¡ã•れã€åˆ°é”ã—ãŸå ´åˆã«ã¯å¤ã„エントリーã‹ã‚‰æ¶ˆåŽ»ã•れã¦ã„ãã¾ã™ (FIFO スタック)。
        ファイルã¸ã®ãƒ­ã‚°è¨˜éŒ²ãŒæ—¢ã«å§‹ã¾ã£ã¦ã„る状態ã§ã€`.startRequestLog()` ㌠reqNum 引数付ãã§å‘¼ã³å‡ºã•れãŸå ´åˆã€ãƒ•ァイルã¸ã®ãƒ­ã‚°ã¯åœæ­¢ã•れã¾ã™ã€‚ + +* 引数を何も渡ã•ãªã‹ã£ãŸå ´åˆã€ãƒ­ã‚°ã¯ãƒ¡ãƒ¢ãƒªã«è¨˜éŒ²ã•れã¦ã„ãã¾ã™ã€‚ å‰ã‚‚ã£ã¦ `.startRequestLog()` ãŒ*reqNum* 引数付ã㧠呼ã³å‡ºã•れã¦ã„ãŸå ´åˆ (ãŸã ã— `.stopRequestLog()` ã®å‰)ã€ãƒ­ã‚°ãŒæ¬¡å›žæ¶ˆåŽ»ã•れるã‹ã¾ãŸã¯`.stopRequestLog()` ãŒå‘¼ã³å‡ºã•れるã¾ã§ã€ãƒ­ã‚°ãƒ‡ãƒ¼ã‚¿ã¯ãƒ¡ãƒ¢ãƒªå†…ã«ã‚¹ã‚¿ãƒƒã‚¯ã•れã¾ã™ã€‚ + +ORDAリクエストログã®ãƒ•ォーマットã®è©³ç´°ã¯ã€[**ORDAクライアントリクエスト**](https://doc.4d.com/4Dv18R6/4D/18-R6/Description-of-log-files.300-5217819.ja.html#4385373) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + + + +#### 例題 1 + +ORDA クライアントリクエストをファイルã«è¨˜éŒ²ã—ã€ãƒ­ã‚°ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã‚’使用ã—ã¾ã™: + + + +```4d + var $file : 4D.File + var $e : cs.PersonsEntity + + $file:=File("/LOGS/ORDARequests.txt") // Logs フォルダー + + SET DATABASE PARAMETER(Client Log Recording;1) // グローãƒãƒ«ãƒ­ã‚°ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã‚’トリガーã—ã¾ã™ + ds.startRequestLog($file) + $e:=ds.Persons.get(30001) // リクエストをé€ä¿¡ã—ã¾ã™ + ds.stopRequestLog() + SET DATABASE PARAMETER(Client Log Recording;0) +``` + + + + +#### 例題 2 + +ORDA クライアントリクエストをメモリã«è¨˜éŒ²ã—ã¾ã™: + + + +```4d + var $es : cs.PersonsSelection + var $log : Collection + + ds.startRequestLog(3) // メモリã«ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ 3ã¤ã¾ã§ä¿ç®¡ã—ã¾ã™ + $es:=ds.Persons.query("name=:1";"Marie") + $es:=ds.Persons.query("name IN :1";New collection("Marie")) + $es:=ds.Persons.query("name=:1";"So@") + + $log:=ds.getRequestLog() + ALERT("The longest request lasted: "+String($log.max("duration"))+" ms") +``` + + + + + + + + +## .startTransaction() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**.startTransaction()** + +| 引数 | タイプ | | 説明 | +| -- | --- | | ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + + + + +#### 説明 + +The `.startTransaction()` function starts a transaction in the current process on the database matching the datastore to which it applies. トランザクションプロセス中ã«ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«åŠ ãˆã‚‰ã‚ŒãŸå¤‰æ›´ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒç¢ºå®šã•れるã‹ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¾ã§ä¸€æ™‚çš„ã«ä¿ç®¡ã•れãŸã¾ã¾ã«ãªã‚Šã¾ã™ã€‚ + + +> ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒ¡ã‚¤ãƒ³ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ (`ds` コマンドã§è¿”ã•れるデータストア) ã§å‘¼ã°ã‚ŒãŸå ´åˆã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯ãƒ¡ã‚¤ãƒ³ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¨ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§å®Ÿè¡Œã•れるã™ã¹ã¦ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«é©ç”¨ã•れã¾ã™ã€‚ã“れã«ã¯ã€ãã“ã§å®Ÿè¡Œã•れる ORDA ã¨ã‚¯ãƒ©ã‚·ãƒƒã‚¯è¨€èªžã‚‚å«ã¾ã‚Œã¾ã™ã€‚ + +複数ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãƒã‚¹ãƒˆã™ã‚‹ã“㨠(サブトランザクション) ãŒå¯èƒ½ã§ã™ã€‚ 個々ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚µãƒ–トランザクションã¯ã€ãれãžã‚Œã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã‹ç¢ºå®šã•れる必è¦ãŒã‚りã¾ã™ã€‚ メイントランザクションãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¨ã€ã‚µãƒ–トランザクションも (ãŸã¨ãˆå€‹ã€…ã«`.validateTransaction()` é–¢æ•°ã§æ‰¿èªã•れã¦ã„ã¦ã‚‚) ã™ã¹ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚ + + + + +#### 例題 + + + + +```4d + var $connect; $status : Object + var $person : cs.PersonsEntity + var $ds : cs.DataStore + var $choice : Text + var $error : Boolean + + Case of + :($choice="local") + $ds:=ds + :($choice="remote") + $connect:=New object("hostname";"111.222.3.4:8044") + $ds:=Open datastore($connect;"myRemoteDS") + End case + + $ds.startTransaction() + $person:=$ds.Persons.query("lastname=:1";"Peters").first() + + If($person#Null) + $person.lastname:="Smith" + $status:=$person.save() + End if + ... + ... + If($error) + $ds.cancelTransaction() + Else + $ds.validateTransaction() + End if +``` + + + + + + + + + + +## .stopRequestLog() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R6 | 追加 | +
        + +**.stopRequestLog()** + + +| 引数 | タイプ | | 説明 | +| -- | --- | | ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + + + + +#### 説明 + +The `.stopRequestLog()` function stops any logging of ORDA requests on the client side (in file or in memory). ã“れã¯ã€é–‹ã‹ã‚ŒãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’実際ã«é–‰ã˜ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã™ã‚‹ãŸã‚ã€ãƒ•ァイルã«ãƒ­ã‚°ã‚’å–ã£ã¦ã„ã‚‹å ´åˆã«ã¨ãã«æœ‰ç”¨ã§ã™ã€‚ + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒªãƒ¢ãƒ¼ãƒˆå´ã® 4D ã§å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã€ãれ以外ã®å ´åˆã«ã¯ä½•ã‚‚ã—ã¾ã›ã‚“。 ã“れã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ç’°å¢ƒã§ã®ãƒ‡ãƒãƒƒã‚°ã‚’想定ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ + + + + +#### 例題 + +[`.startRequestLog()`](#startrequestlog) ã®ä¾‹é¡Œã‚’å‚ç…§ãã ã•ã„。 + + + + + + + +## .validateTransaction() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**.validateTransaction()** + + +| 引数 | タイプ | | 説明 | +| -- | --- | | ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + + + + +#### 説明 + +The `.validateTransaction()` function accepts the transaction that was started with [`.startTransaction()`](#starttransaction) at the corresponding level on the specified datastore. + +ã“ã®é–¢æ•°ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ä¸­ã«ãŠã“ãªã‚れãŸãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›´ã‚’ä¿å­˜ã—ã¾ã™ã€‚ + +複数ã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãƒã‚¹ãƒˆã™ã‚‹ã“㨠(サブトランザクション) ãŒå¯èƒ½ã§ã™ã€‚ メイントランザクションãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¨ã€ã‚µãƒ–トランザクションも (ãŸã¨ãˆå€‹ã€…ã«ã“ã®é–¢æ•°ã§æ‰¿èªã•れã¦ã„ã¦ã‚‚) ã™ã¹ã¦ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚ + + + + +#### 例題 + +[`.startTransaction()`](#starttransaction) ã®ä¾‹é¡Œã‚’å‚ç…§ãã ã•ã„。 + + + diff --git a/website/translated_docs/ja/API/Directory.md b/website/translated_docs/ja/API/Directory.md new file mode 100644 index 00000000000000..8e2d17e2ba329e --- /dev/null +++ b/website/translated_docs/ja/API/Directory.md @@ -0,0 +1,599 @@ +--- +id: Directory +title: Directory クラス +--- + +## 説明 + + +## .creationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationDate** : Date + +#### 説明 + +The `.creationDate` property returns the creation date of the folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + + ## .creationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationTime** : Time + + +#### 説明 + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + + +## .exists + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.exists** : Boolean + +#### 説明 + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + + +## .extension + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.extension** : Text + +#### 説明 + +The `.extension` property returns the extension of the folder name (if any). æ‹¡å¼µå­ã¯å¿…ãš"." ã§å§‹ã¾ã‚Šã¾ã™ã€‚ フォルダーåãŒæ‹¡å¼µå­ã‚’æŒãŸãªã„å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + +## .fullName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.fullName** : Text + +#### 説明 + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + +## .hidden + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.hidden** : Boolean + +#### 説明 + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + + +## .isAlias + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isAlias** : Boolean + + +#### 説明 + +The `.isAlias` property returns always **false** for a `Folder` object. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .isFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFile** : Boolean + +#### 説明 + +The `.isFile` property returns always **false** for a folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .isFolder + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFolder** : Boolean + +#### 説明 + +The `.isFolder` property returns always **true** for a folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .isPackage + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isPackage** : Boolean + +#### 説明 + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). ãれ以外ã®å ´åˆã¯ false ã‚’è¿”ã—ã¾ã™ã€‚ + +Windows 上ã«ãŠã„ã¦ã¯ã€`.isPackage` ã¯å¸¸ã« **false** ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + +## .modificationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationDate** : Date + +#### 説明 + +The `.modificationDate` property returns the date of the folder's last modification. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + +## .modificationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationTime** : Time + +#### 説明 + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .name + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + + +**.name** : Text + +#### 説明 + +The `.name` property returns the name of the folder, without extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .original + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.original** : 4D.Folder + +#### 説明 + +The `.original` property returns the same Folder object as the folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ +> ã“ã®ãƒ—ロパティã¯ã€ãƒ•ォルダーやファイルを処ç†ã™ã‚‹æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã‚’書ããŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + + +--- + + +## .parent + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.parent** : 4D.Folder + +#### 説明 + +The `.parent` property returns the parent folder object of the folder. パスãŒã‚·ã‚¹ãƒ†ãƒ ãƒ‘スを表ã™å ´åˆ (例: "/DATA/")ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スãŒè¿”ã•れã¾ã™ã€‚ + +親フォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆ (root) ã¯ã€ã“ã®ãƒ—ロパティ㯠null値を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + +## .path + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.path** : Text + +#### 説明 + +The `.path` property returns the POSIX path of the folder. パスãŒãƒ•ァイルシステムを表ã™å ´åˆ (例: "/DATA/")ã€ãƒ•ァイルシステムãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + +--- + +## .platformPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.platformPath** : Text + +#### 説明 + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +--- + + + + + +## .copyTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| 引数 | タイプ | | 説明 | +| ----------------- | --------- |:--:| --------------------------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | コピー先フォルダーã®åå‰ | +| overwrite | æ•´æ•° | -> | 既存è¦ç´ ã‚’上書ãã™ã‚‹ã«ã¯ `fk overwrite` を渡ã—ã¾ã™ | +| 戻り値 | 4D.Folder | <- | コピーã•れãŸãƒ•ォルダー | + + +#### 説明 + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ãƒ•ォルダーã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ãŸã¾ã¾ã‚³ãƒ”ーã•れã¾ã™ã€‚ コピーã®éš›ã«ãƒ•ォルダーåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„åå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダー内ã«åŒã˜åå‰ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãƒ‡ãƒ•ォルトã§ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ *overwrite* ã« `fk overwrite` 定数を渡ã™ã“ã¨ã§ã€æ—¢å­˜ã®ãƒ•ォルダーを無視ã—ã¦ä¸Šæ›¸ãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| -------------- | - | ------------------ | +| `fk overwrite` | 4 | 既存è¦ç´ ãŒã‚れã°ã€ãれを上書ãã—ã¾ã™ | + + +**戻り値** + +コピーã•れ㟠`Folder` オブジェクト。 + +#### 例題 + +ユーザーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ォルダーã«ã‚るピクãƒãƒ£ãƒ¼ãƒ•ォルダーをã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ォルダー内ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + +--- + + +## .file() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.file**( *path* : Text ) : 4D.File +| 引数 | タイプ | | 説明 | +| ---- | ------- | -- | ------------------------------- | +| path | テキスト | -> | ファイルã®POSIX相対パスå | +| 戻り値 | 4D.File | <- | `File` オブジェクト (無効ãªãƒ‘スã®å ´åˆã«ã¯ null) | + +#### 説明 + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +*path* ã«ã¯ã€è¿”ã™ã¹ãファイルã®ç›¸å¯¾çš„パスを POSIX å½¢å¼ã§æ¸¡ã—ã¾ã™ã€‚ ã“ã®ãƒ‘スã¯ã€è¦ªãƒ•ォルダーを起点ã¨ã—ã¦è©•価ã•れã¾ã™ã€‚ + +**戻り値** + +`File` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null)。 + +#### 例題 + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + +--- + +## .files() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.files**( { *options* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ------------------ | +| options | æ•´æ•° | -> | ファイルリストã®ã‚ªãƒ—ション | +| 戻り値 | コレクション | <- | å­ãƒ•ァイルオブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.files()` function returns a collection of `File` objects contained in the folder. +> エイリアスã¾ãŸã¯ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã¯è§£æ±ºã•れã¾ã›ã‚“。 + +*options*引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€ãƒ•ォルダーã®ç¬¬ä¸€éšŽå±¤ã«ã‚るファイルã®ã¿ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿”ã•れã¾ã™ã€‚ã“れã«ã¯éžè¡¨ç¤ºã®ãƒ•ァイルやã€ãƒ•ォルダーもå«ã¾ã‚Œã¾ã™ã€‚ *options* 引数ã«ä»¥ä¸‹ã®å®šæ•°ã‚’一ã¤ä»¥ä¸Šæ¸¡ã™ã“ã¨ã§ã€ã“ã®ãµã‚‹ã¾ã„を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------- | - | ------------------------------------------- | +| `fk recursive` | 1 | コレクションã«ã¯ã€æŒ‡å®šãƒ•ォルダーã¨ãã®ã‚µãƒ–フォルダーã®ãƒ•ァイル/フォルダーãŒå«ã¾ã‚Œã¾ã™ | +| `fk ignore invisible` | 8 | éžè¡¨ç¤ºè¨­å®šã®ãƒ•ァイルやフォルダーã¯è¡¨ç¤ºã•れã¾ã›ã‚“ | + +**戻り値** + +`File` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +#### 例題 1 + +データベースフォルダー内ã«éžè¡¨ç¤ºãƒ•ァイルãŒãªã„ã‹ã©ã†ã‹ã‚’調ã¹ã¾ã™: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("データベースフォルダーã«ã¯éžè¡¨ç¤ºã®ãƒ•ァイルãŒå­˜åœ¨ã—ã¾ã™ã€‚") + End if +``` + +#### 例題 2 + +ドキュメントフォルダー内ã«ã‚ã‚‹ã€éžè¡¨ç¤ºã§ãªã„ファイルをã™ã¹ã¦å–å¾—ã—ã¾ã™: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + +--- + +## .folder() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.folder**( *path* : Text ) : 4D.Folder +| 引数 | タイプ | | 説明 | +| ---- | --------- | -- | --------------------------------------------- | +| path | テキスト | -> | ファイルã®POSIX相対パスå | +| 戻り値 | 4D.Folder | <- | 作æˆã•れ㟠`Folder` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null) | + +#### 説明 + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +*path* ã«ã¯ã€è¿”ã™ã¹ãフォルダーã®ç›¸å¯¾çš„パスを POSIX å½¢å¼ã§æ¸¡ã—ã¾ã™ã€‚ ã“ã®ãƒ‘スã¯ã€è¦ªãƒ•ォルダーを起点ã¨ã—ã¦è©•価ã•れã¾ã™ã€‚ + +**戻り値** + +`Folder` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null)。 + +#### 例題 + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + +--- + +## .folders() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.folders**( { *options* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ------------------- | +| options | æ•´æ•° | -> | フォルダーリストã®ã‚ªãƒ—ション | +| 戻り値 | コレクション | <- | å­ãƒ•ォルダーオブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +*options*引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€ãƒ•ォルダーã®ç¬¬ä¸€éšŽå±¤ã«ã‚るフォルダーã®ã¿ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿”ã•れã¾ã™ã€‚ *options* 引数ã«ä»¥ä¸‹ã®å®šæ•°ã‚’一ã¤ä»¥ä¸Šæ¸¡ã™ã“ã¨ã§ã€ã“ã®ãµã‚‹ã¾ã„を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------- | - | ------------------------------------------- | +| `fk recursive` | 1 | コレクションã«ã¯ã€æŒ‡å®šãƒ•ォルダーã¨ãã®ã‚µãƒ–フォルダーã®ãƒ•ァイル/フォルダーãŒå«ã¾ã‚Œã¾ã™ | +| `fk ignore invisible` | 8 | éžè¡¨ç¤ºè¨­å®šã®ãƒ•ァイルやフォルダーã¯è¡¨ç¤ºã•れã¾ã›ã‚“ | + +**戻り値** + +`Folder` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +#### 例題 + +データベースフォルダー内ã«ã‚ã‚‹ã™ã¹ã¦ã®ãƒ•ォルダーãŠã‚ˆã³ã‚µãƒ–フォルダーã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + +--- + +## .getIcon() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getIcon**( { *size* : Integer } ) : Picture +| 引数 | タイプ | | 説明 | +| ---- | ----- | -- | ------------------------ | +| size | æ•´æ•° | -> | å–å¾—ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ä¸€è¾ºã®é•·ã• (ピクセルå˜ä½) | +| 戻り値 | ピクãƒãƒ£ãƒ¼ | <- | アイコン | + + +#### 説明 + +The `.getIcon()` function returns the icon of the folder. + +ä»»æ„ã® *size* 引数を渡ã™ã¨ã€è¿”ã•れるアイコンã®ã‚µã‚¤ã‚ºã‚’ピクセルå˜ä½ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å€¤ã¯ã€å®Ÿéš›ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’æ ¼ç´ã—ã¦ã„る正方形ã®ä¸€è¾ºã®é•·ã•を表ã—ã¦ã„ã¾ã™ã€‚ アイコンã¯é€šå¸¸ã€32x32ピクセル ("大ãã„アイコン") ã¾ãŸã¯ 16x16ピクセル ("å°ã•ã„アイコン") ã§å®šç¾©ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å¼•æ•°ã« 0 を渡ã™ã‹çœç•¥ã—ãŸå ´åˆã€"大ãã„アイコン" ãŒè¿”ã•れã¾ã™ã€‚ + +フォルダーãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ãƒ‡ãƒ•ォルトã®ç©ºã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +**戻り値** + +フォルダーアイコン㮠[ピクãƒãƒ£ãƒ¼](Concepts/dt_picture.md)。 + + + + diff --git a/website/translated_docs/ja/API/Document.md b/website/translated_docs/ja/API/Document.md new file mode 100644 index 00000000000000..499b1e066fcf0e --- /dev/null +++ b/website/translated_docs/ja/API/Document.md @@ -0,0 +1,578 @@ +--- +id: Document +title: Document クラス +--- + +## 説明 + + +## .creationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationDate** : Date + +#### 説明 + +The `.creationDate` property returns the creation date of the file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + ## .creationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationTime** : Time + +#### 説明 + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .exists + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.exists** : Boolean + +#### 説明 + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + + +## .extension + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.extension** : Text +#### 説明 + +The `.extension` property returns the extension of the file name (if any). æ‹¡å¼µå­ã¯å¿…ãš"." ã§å§‹ã¾ã‚Šã¾ã™ã€‚ ファイルåãŒæ‹¡å¼µå­ã‚’æŒãŸãªã„å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .fullName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.fullName** : Text +#### 説明 + +The `.fullName` property returns the full name of the file, including its extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .hidden + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.hidden** : Boolean + +#### 説明 + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .isAlias + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isAlias** : Boolean + +#### 説明 + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .isFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFile** : Boolean + +#### 説明 + +The `.isFile` property returns always true for a file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .isFolder + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFolder** : Boolean + +#### 説明 + +The `.isFolder` property returns always false for a file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .isWritable + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isWritable** : Boolean + +#### 説明 + +The `.isWritable` property returns true if the file exists on disk and is writable. +> ã“ã®ãƒ—ロパティ㯠4DアプリケーションãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã‚ã‚‹ã‹ã©ã†ã‹ (アクセス権é™) ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ãƒ•ァイル㮠*writable* (書ãè¾¼ã¿å¯èƒ½) 属性ã®ã¿ä¾å­˜ã™ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + +**例題** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + +## .modificationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationDate** : Date + +#### 説明 + +The `.modificationDate` property returns the date of the file's last modification. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .modificationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationTime** : Time + +##### 説明 + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .name + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.name** : Text + +#### 説明 + +The `.name` property returns the name of the file without extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + +## .original + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.original** : 4D.File
        **.original** : 4D.Folder + +#### 説明 + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. ターゲットè¦ç´ ã¯ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã§ã™: + +* File オブジェクト +* Folder オブジェクト + +エイリアスã§ãªã„ファイルã«ã¤ã„ã¦ã¯ã€ãƒ—ロパティã¯åŒã˜ãƒ•ァイルオブジェクトをファイルã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .parent + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.parent** : 4D.Folder + +#### 説明 + +The `.parent` property returns the parent folder object of the file. パスãŒã‚·ã‚¹ãƒ†ãƒ ãƒ‘スを表ã™å ´åˆ (例: "/DATA/")ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .path + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.path** : Text + +#### 説明 + +The `.path` property returns the POSIX path of the file. パスãŒãƒ•ァイルシステムを表ã™å ´åˆ (例: "/DATA/")ã€ãƒ•ァイルシステムãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .platformPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.platformPath** : Text + +#### 説明 + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .size + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.size** : Real + +#### 説明 + +The `.size` property returns the size of the file expressed in bytes. ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ã‚µã‚¤ã‚ºã¯ 0 ã«ãªã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + + + + + + +## .copyTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| 引数 | タイプ | | 説明 | +| ----------------- | --------- |:--:| --------------------------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | コピー先フォルダーã®åå‰ | +| overwrite | æ•´æ•° | -> | 既存è¦ç´ ã‚’上書ãã™ã‚‹ã«ã¯ `fk overwrite` を渡ã—ã¾ã™ | +| 戻り値 | 4D.File | <- | コピーã•れãŸãƒ•ァイル | + + +#### 説明 + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ãƒ•ァイルã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ãŸã¾ã¾ã‚³ãƒ”ーã•れã¾ã™ã€‚ コピーã®éš›ã«ãƒ•ォルダーåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„åå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダー内ã«åŒã˜åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãƒ‡ãƒ•ォルトã§ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ *overwrite* ã« `fk overwrite` 定数を渡ã™ã“ã¨ã§ã€æ—¢å­˜ã®ãƒ•ォルダーを無視ã—ã¦ä¸Šæ›¸ãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| -------------- | - | ------------------ | +| `fk overwrite` | 4 | 既存è¦ç´ ãŒã‚れã°ã€ãれを上書ãã—ã¾ã™ | + + +**戻り値** + +コピーã•れ㟠`File` オブジェクト。 + +#### 例題 + +ユーザーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ォルダーã«ã‚るピクãƒãƒ£ãƒ¼ãƒ•ァイルをã€ã‚¢ãƒ—リケーションフォルダー内ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + +## .getContent() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------- | +| v19 R2 | 4D.Blob ã‚’è¿”ã—ã¾ã™ | +| v17 R5 | 追加 | +
        + +**.getContent( )** : 4D.Blob +| 引数 | タイプ | | 説明 | +| --- | ------- | -- | ---------- | +| 戻り値 | 4D.Blob | <- | ファイルã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ | + + +#### 説明 + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. BLOB ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[BLOB](Concepts/dt_blob.md) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**戻り値** + +`4D.Blob` オブジェクト。 + +#### 例題 + +ドキュメントã®ä¸­èº«ã‚’ `BLOB` フィールドã«ä¿å­˜ã—ã¾ã™: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) // キュメントãŒé¸æŠžã•れã¦ã„れ㰠+ [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + +## .getIcon() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getIcon**( { *size* : Integer } ) : Picture +| 引数 | タイプ | | 説明 | +| ---- | ----- | -- | ------------------------ | +| size | æ•´æ•° | -> | å–å¾—ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ä¸€è¾ºã®é•·ã• (ピクセルå˜ä½) | +| 戻り値 | ピクãƒãƒ£ãƒ¼ | <- | アイコン | + + +#### 説明 + +The `.getIcon()` function returns the icon of the file. + +ä»»æ„ã® *size* 引数を渡ã™ã¨ã€è¿”ã•れるアイコンã®ã‚µã‚¤ã‚ºã‚’ピクセルå˜ä½ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å€¤ã¯ã€å®Ÿéš›ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’æ ¼ç´ã—ã¦ã„る正方形ã®ä¸€è¾ºã®é•·ã•を表ã—ã¦ã„ã¾ã™ã€‚ アイコンã¯é€šå¸¸ã€32x32ピクセル ("大ãã„アイコン") ã¾ãŸã¯ 16x16ピクセル ("å°ã•ã„アイコン") ã§å®šç¾©ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å¼•æ•°ã« 0 を渡ã™ã‹çœç•¥ã—ãŸå ´åˆã€"大ãã„アイコン" ãŒè¿”ã•れã¾ã™ã€‚ + +ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ãƒ‡ãƒ•ォルトã®ç©ºã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +**戻り値** + +ファイルアイコン㮠[ピクãƒãƒ£ãƒ¼](../Concepts/picture.html)。 + + + + + + +## .getText() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
        **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| 引数 | タイプ | | 説明 | +| ----------- | ---- | -- | ---------------- | +| charSetName | テキスト | -> | 文字セットã®åå‰ | +| charSetNum | æ•´æ•° | -> | 文字セットã®ç•ªå· | +| breakMode | æ•´æ•° | -> | 改行ã®å‡¦ç†ãƒ¢ãƒ¼ãƒ‰ | +| 戻り値 | テキスト | <- | ドキュメントã‹ã‚‰å–å¾—ã—ãŸãƒ†ã‚­ã‚¹ãƒˆ | + + +#### 説明 +The `.getText()` function returns the contents of the file as text . + +ä»»æ„ã§ã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®èª­ã¿å–りã«ä½¿ç”¨ã™ã‚‹æ–‡å­—セットを渡ã—ã¾ã™ã€‚ ã“れã«ã¯ã€æ¬¡ã®äºŒã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- *charSetName* ã«æ¨™æº–ã®æ–‡å­—セットåã‚’å«ã‚“ã æ–‡å­—列 ("ISO-8859-1" ã‚„ "UTF-8" ãªã©) を渡ã—ã¾ã™ã€‚ +- *charSetNum* ã«æ¨™æº–ã®æ–‡å­—セットåã® MIBEnum ID (å€é•·æ•´æ•°) を渡ã—ã¾ã™ã€‚ + +> 4D ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る文字セットã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ã€`CONVERT FROM TEXT` コマンドをå‚ç…§ãã ã•ã„。 + +ドキュメントã«ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ãƒžãƒ¼ã‚¯ (BOM) ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€4D 㯠*charSetName* ã¾ãŸã¯ *charSetNum* 引数ã§è¨­å®šã•れã¦ã„る文字セットã§ã¯ãªãã€BOM ã§æŒ‡å®šã•れãŸã‚‚ã®ã‚’使用ã—ã¾ã™ (çµæžœã¨ã—ã¦å¼•æ•°ã¯ç„¡è¦–ã•れã¾ã™)。 ドキュメント㫠BOM ãŒå«ã¾ã‚Œã¦ãŠã‚‰ãšã€ã¾ãŸ *charSetName* ãŠã‚ˆã³ *charSetNum* å¼•æ•°ãŒæ¸¡ã•れãªã‹ã£ãŸå ´åˆã€4D ã¯ãƒ‡ãƒ•ォルト㧠"UTF-8" を文字セットã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +*breakMode* ã«ã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ”¹è¡Œæ–‡å­—ã«å¯¾ã—ã¦ãŠã“ãªã†å‡¦ç†ã‚’指定ã™ã‚‹å€é•·æ•´æ•°ã‚’渡ã—ã¾ã™ã€‚ "System Documents" テーマã®ã€ä»¥ä¸‹ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------- | - | --------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | 何も処ç†ã‚’ã—ã¾ã›ã‚“。 | +| `Document with native format` | 1 | (デフォルト) 改行㯠OS ã®ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã«å¤‰æ›ã•れã¾ã™ã€‚macOS ã§ã¯ CR (キャリッジリターン) ã«ã€Windows ã§ã¯ CRLF (キャリッジリターン+ラインフィード) ã«å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CRLF` | 2 | 改行㯠Windowsフォーマット (CRLFã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ï¼‹ãƒ©ã‚¤ãƒ³ãƒ•ィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CR` | 3 | 改行㯠macOSフォーマット (CRã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with LF` | 4 | 改行㯠Unixフォーマット (LFã€ãƒ©ã‚¤ãƒ³ãƒ•ィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | + +*breakMode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€æ”¹è¡Œã¯ãƒã‚¤ãƒ†ã‚£ãƒ–モード (1) ã§å‡¦ç†ã•れã¾ã™ã€‚ + +**戻り値** + +ファイルã®ãƒ†ã‚­ã‚¹ãƒˆã€‚ + +#### 例題 + +以下ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¤ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒã‚ã‚‹å ´åˆã‚’考ãˆã¾ã™ (フィールドã¯ã‚¿ãƒ–区切りã§ã™): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã¨: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") // デフォルトã§UTF-8 + $txt:=$myFile.getText() +``` +以下ã®çµæžœãŒå¾—られã¾ã™: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR (キャリッジリターン) +``` + + + + + + + diff --git a/website/translated_docs/ja/API/EmailObjectClass.md b/website/translated_docs/ja/API/EmailObjectClass.md new file mode 100644 index 00000000000000..379034754af309 --- /dev/null +++ b/website/translated_docs/ja/API/EmailObjectClass.md @@ -0,0 +1,611 @@ +--- +id: EmailObjectClass +title: Email +--- + +4Dã«ãŠã‘るメールã®ä½œæˆãƒ»é€ä¿¡ãƒ»å—信㯠`Email` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ“作よã£ã¦ãŠã“ãªã‚れã¾ã™ã€‚ + +*transporter* クラス関数を使ã£ã¦ãƒ¡ãƒ¼ãƒ«ã‚’å–å¾—ã™ã‚‹éš›ã«ã€ `Email` オブジェクトãŒä½œæˆã•れã¾ã™ã€‚ + +- IMAP - [`.getMail()`](IMAPTransporterClass.md#getmail) ãŠã‚ˆã³ [`.getMails()`](IMAPTransporterClass.md#getmails) 関数㯠IMAPサーãƒãƒ¼ã‹ã‚‰ãƒ¡ãƒ¼ãƒ«ã‚’å—ä¿¡ã—ã¾ã™ã€‚ +- POP3 - [`.getMail()`](POP3TransporterClass.md#getmail) 関数㯠POP3サーãƒãƒ¼ã‹ã‚‰ãƒ¡ãƒ¼ãƒ«ã‚’å—ä¿¡ã—ã¾ã™ã€‚ + +> ã¾ãŸã€[`New object`](https://doc.4d.com/4dv18/help/command/en/page1471.html) 4Dコマンドを使ã£ã¦æ–°è¦ã‹ã¤ç©ºã® `Email` オブジェクトを作æˆã—ã¦ã‹ã‚‰ã€[Email オブジェクトプロパティ](#email-オブジェクト) を設定ã—ã¦ã„ãã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +`Email` オブジェクト㯠SMTP [`.send()`](SMTPTransporterClass.md#send) 関数を使ã£ã¦é€ä¿¡ã—ã¾ã™ã€‚ + +[`MAIL Convert from MIME`](#mail-convert-from-mime) ãŠã‚ˆã³ [`MAIL Convert to MIME`](#mail-convert-to-mime) コマンドã¯ã€MIME コンテンツã‹ã‚‰ `Email` オブジェクトã«ã€ã¾ãŸã¯ãã®é€†ã®å¤‰æ›ã‚’ãŠã“ãªã†ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + + +### Email オブジェクト + +Email ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®ãƒ—ロパティをæä¾›ã—ã¾ã™: + +> 4D 㯠Email オブジェクトã®ãƒ•ォーマット㯠[JMAP specification](https://jmap.io/spec-mail.html) ã«æº–æ‹ ã—ã¾ã™ã€‚ + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.attachments** : Collection](#attachments)

            collection of `4D.MailAttachment` object(s) | +| [**.bcc** : Text
        **.bcc** : Object
        **.bcc** : Collection](#bcc)

            Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email | +| [**.bodyStructure** : Object](#bodystructure)

            *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional) | +| [**.bodyValues** : Object](#bodyvalues)

            *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional) | +| [**.cc** : Text
        **.cc** : Object
        **.cc** : Collection](#cc)

            Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email | +| [**.comments** : Text](#comments)

            additional comments header | +| [**.from** : Text
        **.from** : Object
        **.from** : Collection](#from)

            Originating [address(es)](#email-addresses) of the email | +| [**.headers** : Collection](#headers)

            collection of `EmailHeader` objects, in the order they appear in the message | +| [**.htmlBody** : Text](#htmlbody)

            HTML representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.id** : Text](#id)

            unique ID from the IMAP server | +| [**.inReplyTo** : Text](#inreplyto)

            message identifier(s) of the original message(s) to which the current message is a reply | +| [**.keywords** : Object](#keywords)

            set of keywords as an object, where each property name is a keyword and each value is true | +| [**.messageId** : Text](#messageid)

            message identifier header ("message-id") | +| [**.receivedAt** : Text](#receivedat)

            timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z) | +| [**.references** : Collection](#references)

            Collection of all message-ids of messages in the preceding reply chain | +| [**.replyTo** : Text
        **.replyTo** : Object
        **.replyTo** : Collection](#replyto)

            [addresse(s)](#email-addresses) for responses | +| [**.sendAt** : Text](#sendat)

            Email timestamp in ISO 8601 UTC format | +| [**.sender** : Text
        **.sender** : Object
        **.sender** : Collection](#sender)

            email source [addresse(s)](#email-addresses) of the email | +| [**.size** : Integer](#size)

            size (expressed in bytes) of the Email object returned by the IMAP server | +| [**.subject** : Text](#subject)

            description of topic | +| [**.textBody** : Text](#textbody)

            Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.to** : Text
        **.to** : Object
        **.to** : Collection](#to)

            primary recipient [addresse(s)](#email-addresses) of the email | + + +### メールアドレス + +メールアドレスを格ç´ã™ã‚‹ãƒ—ロパティ ([`from`](#from), [`cc`](#cc), [`bcc`](#bcc), [`to`](#to), [`sender`](#sender), [`replyTo`](#replyto)) ã¯ã™ã¹ã¦ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ»ã‚ªãƒ–ジェクト・コレクション型ã®å€¤ã‚’å—ã‘付ã‘ã¾ã™ã€‚ + +#### テキスト + +- å˜ä¸€ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹: "somebody@domain.com" +- å˜ä¸€ã®è¡¨ç¤ºå+メールアドレス: "Somebody " +- 複数ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹: "Somebody ,me@home.org" + +#### オブジェクト + +2ã¤ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクト: + +| プロパティ | タイプ | 説明 | +| ----- | ---- | -------------- | +| name | Text | 表示å (null ã‚‚å¯èƒ½) | +| email | Text | メールアドレス | + +#### コレクション + +アドレスオブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + +### ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„ + +[`textBody`](#textbody) ãŠã‚ˆã³ [`htmlBody`](#htmlbody) ã¯ã©ã¡ã‚‰ã‚‚[SMTP.send()](SMTPTransporterClass.md#send) ã§ã®ã¿ä½¿ç”¨ã•れã€ã“れã«ã‚ˆã£ã¦å˜ç´”ãªãƒ¡ãƒ¼ãƒ«ã®é€ä¿¡ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ プロパティãŒä¸¡æ–¹ã¨ã‚‚ã‚ã‚‹å ´åˆã€MIME content-type ã® multipart/alternative ãŒä½¿ç”¨ã•れã¾ã™ã€‚ メールクライアント㯠multipart/alternative パートをèªè­˜ã—ã€å¿…è¦ã«å¿œã˜ã¦ãƒ†ã‚­ã‚¹ãƒˆéƒ¨ã¾ãŸã¯ html 部を表示ã—ã¾ã™ã€‚ + +[Email オブジェクト](email-オブジェクト) ㌠MIME ドキュメントã‹ã‚‰ãƒ“ルドã•れãŸå ´åˆ (例: `MAIL Convert from MIME` コマンドã§ç”Ÿæˆã•れãŸã¨ã) ã¯ã€[`bodyStructure`](#bodystructure) ãŠã‚ˆã³ [`bodyValues`](#bodyvalues) ㌠[SMTP](SMTPTransporterClass.md) ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ã“ã®å ´åˆã€`bodyStructure` ãŠã‚ˆã³ `bodyValues` プロパティã¯ä¸¡æ–¹ä¸€ç·’ã«æ¸¡ã•れる必è¦ãŒã‚りã€`textBody` ãŠã‚ˆã³ `htmlBody` ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 + +#### bodyStructure ãŠã‚ˆã³ bodyValues オブジェクトã®ä¾‹ + +```json +"bodyStructure": { + "type": "multipart/mixed", + "subParts": [ + { + "partId": "p0001", + "type": "text/plain" + }, + { + "partId": "p0002", + "type": "text/html" + } + ] +}, +"bodyValues": { + "p0001": { + "value": "I have the most brilliant plan. Let me tell you all about it." + }, + "p0002": { + "value": "

        I have the most brilliant plan. Let me tell you all about it.
        " + } +} +``` + + + + + + +## .attachments + +**.attachments** : Collection + +#### 説明 + + + +The `.attachments` property contains a collection of `4D.MailAttachment` object(s). + +MailAttachment オブジェクト㯠[`MAIL New attachment`](MailAttachmentClass.md#mail-new-attachment) コマンドã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ MailAttachment オブジェクトã¯ç‰¹æœ‰ã® [プロパティや関数](MailAttachmentClass.md) ã‚’æŒã¡ã¾ã™ã€‚ + + + + +## .bcc + +**.bcc** : Text
        **.bcc** : Object
        **.bcc** : Collection + +#### 説明 + +The `.bcc` property contains the Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email. + + + + +## .bodyStructure + +**.bodyStructure** : Object + +#### 説明 + +The `.bodyStructure` property contains the *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional). [ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„](#ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„) ã‚’å‚ç…§ãã ã•ã„。 + +`.bodyStructure` オブジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 値 | +| ----------- | ------------------- | ----------------------------------------------------------------------------------------------------- | +| partID | Text | メールã®ãƒ‘ートを固有ã«è­˜åˆ¥ã™ã‚‹ ID | +| type | Text | (å¿…é ˆ) パート㮠Content-Type ヘッダーフィールドã®å€¤ | +| charset | Text | Content-Type ヘッダーフィールド㮠Charset ã®å€¤ | +| encoding | Text | `isEncodingProblem=true` ã®å ´åˆã€Content-Transfer-Encoding ã®å€¤ãŒè¿½åŠ ã•れã¾ã™ (デフォルトã§ã¯æœªå®šç¾©) | +| disposition | Text | パート㮠Content-Disposition ヘッダーフィールドã®å€¤ | +| language | Text ã® Collection | パート㮠Content-Language ヘッダーフィールドã®ã€[RFC3282](https://tools.ietf.org/html/rfc3282) ã§å®šç¾©ã•れã¦ã„る言語タグã®ä¸€è¦§ (ã‚れã°) | +| location | Text | パート㮠Content-Location ヘッダーフィールドã®ã€[RFC2557](https://tools.ietf.org/html/rfc2557) ã§å®šç¾©ã•れã¦ã„ã‚‹ URI (ã‚れã°) | +| subParts | Object ã® Collection | ãれãžã‚Œã®å­ã®æœ¬æ–‡ãƒ‘ート (*EmailBodyPart* オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) | +| headers | Object ã® Collection | パート内ã®å…¨ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ィールドã®ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å†…ã§å‡ºç¾ã™ã‚‹é †ã®ä¸€è¦§ (*EmailHeader* オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚[headers](#headers) プロパティå‚ç…§) | + + + + +## .bodyValues + +**.bodyValues** : Object + +#### 説明 + +The `.bodyValues` property contains the *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional). [ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„](#ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„) ã‚’å‚ç…§ãã ã•ã„。 + +`.bodyValues` オブジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 値 | +| -------------------------- | ------- | --------------------------------------------------------------------------------------------------------- | +| *partID*.value | text | 本文パートã®å€¤ | +| *partID*.isEncodingProblem | boolean | 文字セットをデコーディング中ã«ã€ä¸æ­£ãªãƒ•ォーマットã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã€æœªçŸ¥ã®æ–‡å­—セットã€ã‚ã‚‹ã„ã¯æœªçŸ¥ã® content-transfer-encoding ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã«ã¯ true。 デフォルト㯠false。 | + + + + +## .cc + +**.cc** : Text
        **.cc** : Object
        **.cc** : Collection + +#### 説明 + +The `.cc` property contains the Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email. + + + + + + +## .comments + +**.comments** : Text + +#### 説明 + +The `.comments` property contains an additional comments header. + +コメントã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚»ã‚¯ã‚·ãƒ§ãƒ³å†…ã«ã®ã¿è¡¨ç¤ºã•れã¾ã™ (ã¤ã¾ã‚Šæœ¬æ–‡éƒ¨åˆ†ã«ã¯è§¦ã‚Œãªã„ã¨ã„ã†ã“ã¨ã§ã™)。 + +特定ã®ãƒ•ォーマットæ¡ä»¶ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[RFC#5322](https://tools.ietf.org/html/rfc5322) ã‚’å‚ç…§ãã ã•ã„。 + + + + +## .from + +**.from** : Text
        **.from** : Object
        **.from** : Collection + +#### 説明 + +The `.from` property contains the Originating [address(es)](#email-addresses) of the email. + + +é€ä¿¡ã•れるメールã«ã¯ã€ãれãžã‚Œ [sender](#sender) ãŠã‚ˆã³ **from** アドレスã®ä¸¡æ–¹ãŒã¤ã„ã¦ã„ã¾ã™: + +- sender ドメインã¯ã€å—ä¿¡å´ã®ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ã„ãŸã¨ãã«å—ã‘å–るドメインã§ã™ã€‚ +- from アドレスã¯ã€å—信者ã‹ã‚‰è¦‹ãˆã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ + +混乱をé¿ã‘ã‚‹ãŸã‚ã€sender ãŠã‚ˆã³ from アドレスã«ã¯åŒã˜ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + + + +## .headers + +**.headers** : Collection + +#### 説明 + +The `.headers` property contains a collection of `EmailHeader` objects, in the order they appear in the message. ã“れã«ã‚ˆã£ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ‹¡å¼µã•れ㟠(登録ã•れãŸ) ヘッダーやã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å®šç¾©ã•れ㟠(登録ã•れã¦ã„ãªã„ã€"X" ã§å§‹ã¾ã‚‹) ヘッダーを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> メールレベルã§ã™ã§ã«ãƒ—ロパティã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹ "from" ã¾ãŸã¯ "cc" ãªã©ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’ `EmailHeader` オブジェクトプロパティãŒå®šç¾©ã—ã¦ã„ã‚‹å ´åˆã€`EmailHeader` プロパティã¯ç„¡è¦–ã•れã¾ã™ã€‚ + +ヘッダーコレクションã®å„オブジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | タイプ | 値 | +| -------- | ---- | ----------------------------------------------------------------------------------------------------------------------- | +| [].name | text | (å¿…é ˆ) [RFC#5322](https://tools.ietf.org/html/rfc5322) ã§å®šç¾©ã•れã¦ã„るヘッダーフィールドå。 null ã¾ãŸã¯æœªå®šç¾©ã®å ´åˆã«ã¯ã€ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ィールド㯠MIME ヘッダーã«è¿½åŠ ã•れã¾ã›ã‚“。 | +| [].value | text | [RFC#5322](https://tools.ietf.org/html/rfc5322) ã§å®šç¾©ã•れã¦ã„るヘッダーフィールド値。 | + + + + + + + +## .htmlBody + +**.htmlBody** : Text + +#### 説明 + +The `.htmlBody` property contains the HTML representation of the email message (default charset is UTF-8) (optional, SMTP only). [ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„](#ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„) ã‚’å‚ç…§ãã ã•ã„。 + + + + + + + +## .id + +**.id** : Text + +#### 説明 + +[IMAP transporter](IMAPTransporterClass.md) ã®ã¿ã€‚ + +The `.id` property contains the unique ID from the IMAP server. + + + + + + +## .inReplyTo + +**.inReplyTo** : Text + +#### 説明 + +The `.inReplyTo` property contains the message identifier(s) of the original message(s) to which the current message is a reply. + +特定ã®ãƒ•ォーマットæ¡ä»¶ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[RFC#5322](https://tools.ietf.org/html/rfc5322) ã‚’å‚ç…§ãã ã•ã„。 + + + + + + +## .keywords + +**.keywords** : Object + +#### 説明 + +The `.keywords` property contains a set of keywords as an object, where each property name is a keyword and each value is true. + +ã“ã®ãƒ—ロパティ㯠"keywords" ヘッダーã§ã™ ([RFC#4021](https://tools.ietf.org/html/rfc4021) å‚ç…§)。 + +| プロパティ | タイプ | 値 | +| -------------- | ------- | ------------------------------- | +| .\ | boolean | 設定ã™ã‚‹ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ (値㯠true ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“)。 | + +予約ã•れãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰: +* $draft - メッセージãŒä¸‹æ›¸ãã§ã‚ã‚‹ã“ã¨ã‚’表ã—ã¾ã™ +* $seen - メッセージãŒèª­ã¾ã‚ŒãŸã“ã¨ã‚’表ã—ã¾ã™ +* $flagged - ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ³¨è¦–ã•れるã¹ãã§ã‚ã‚‹ã“ã¨ã‚’表ã—ã¾ã™ (例: 至急ã®ãƒ¡ãƒ¼ãƒ«) +* $answered - メッセージã«è¿”ä¿¡ãŒã•れãŸã“ã¨ã‚’表ã—ã¾ã™ +* $deleted - ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒæ¶ˆåŽ»ã•れるã“ã¨ã‚’表ã—ã¾ã™ + +#### 例題 + +``` + $mail.keywords["$flagged"]:=True + $mail.keywords["4d"]:=True +``` + + + + +## .messageId + +**.messageId** : Text + +#### 説明 + +The `.messageId` property contains a message identifier header ("message-id"). + +通常ã¯ã€"lettersOrNumbers@domainname" ã®å½¢å¼ã€ãŸã¨ãˆã° "abcdef.123456@4d.com" ãªã©ã§ã™ã€‚ ã“ã®å›ºæœ‰ID ã¯ç‰¹ã«ãƒ•ォーラムや公開メーリングリストã§ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ 一般的ã«ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¯é€ä¿¡ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«ã“ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’自動的ã«è¿½åŠ ã—ã¾ã™ã€‚ + + + +## .receivedAt + +**.receivedAt** : Text + +#### 説明 + +[IMAP transporter](IMAPTransporterClass.md) ã®ã¿ã€‚ + +The `.receivedAt` property contains the timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z). + + + + + + +## .references + +**.references** : Collection + +#### 説明 + +The `.references` property contains the Collection of all message-ids of messages in the preceding reply chain. + +特定ã®ãƒ•ォーマットæ¡ä»¶ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[RFC#5322](https://tools.ietf.org/html/rfc5322) ã‚’å‚ç…§ãã ã•ã„。 + + + + +## .replyTo + +**.replyTo** : Text
        **.replyTo** : Object
        **.replyTo** : Collection + +#### 説明 + +The `.replyTo` property contains the [addresse(s)](#email-addresses) for responses. + + + + + +## .sendAt + +**.sendAt** : Text + +#### 説明 + +The `.sendAt` property contains the Email timestamp in ISO 8601 UTC format. + + + + +## .sender + +**.sender** : Text
        **.sender** : Object
        **.sender** : Collection + +#### 説明 + +The `.sender` property contains the email source [addresse(s)](#email-addresses) of the email. + + +é€ä¿¡ã•れるメールã«ã¯ã€ãれãžã‚Œ **sender** ãŠã‚ˆã³ **[from](#from)** アドレスã®ä¸¡æ–¹ãŒã¤ã„ã¦ã„ã¾ã™: + +- sender ドメインã¯ã€å—ä¿¡å´ã®ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ã„ãŸã¨ãã«å—ã‘å–るドメインã§ã™ã€‚ +- from アドレスã¯ã€å—信者ã‹ã‚‰è¦‹ãˆã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™ã€‚ + +混乱をé¿ã‘ã‚‹ãŸã‚ã€sender ãŠã‚ˆã³ from アドレスã«ã¯åŒã˜ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + + + +## .size + +**.size** : Integer + +#### 説明 + +[IMAP transporter](IMAPTransporterClass.md) ã®ã¿ã€‚ + +The `.size` property contains the size (expressed in bytes) of the Email object returned by the IMAP server. + + + + +## .subject + +**.subject** : Text + +#### 説明 + +The `.subject` property contains the description of topic. + + + + + +## .textBody + +**.textBody** : Text + +#### 説明 + +The `.textBody` property contains the Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only). [ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„](#ãƒ¡ãƒ¼ãƒ«æœ¬æ–‡ã®æ‰±ã„) ã‚’å‚ç…§ãã ã•ã„。 + + + +## .to + +**.to** : Text
        **.to** : Object
        **.to** : Collection + +#### 説明 + +The `.to` property contains the primary recipient [addresse(s)](#email-addresses) of the email. + + +## MAIL Convert from MIME + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**MAIL Convert from MIME**( *mime* : Blob ) : Object
        **MAIL Convert from MIME**( *mime* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ---------- |:--:| ------------ | +| mime | Blob, Text | -> | MIMEå½¢å¼ã®ãƒ¡ãƒ¼ãƒ« | +| 戻り値 | オブジェクト | <- | Email オブジェクト | + +#### 説明 + +The `MAIL Convert from MIME` command converts a MIME document into a valid email object. +> 戻り値㮠Email オブジェクトã®ãƒ•ォーマット㯠[JMAP specification](https://jmap.io/spec-mail.html) ã«æº–æ‹ ã—ã¾ã™ã€‚ + +*mime* ã«ã¯ã€å¤‰æ›ã™ã‚‹æœ‰åŠ¹ãª MIME ドキュメントを渡ã—ã¾ã™ã€‚ ã“れã¯ã©ã®ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã¾ãŸã¯ã‚¢ãƒ—リケーションã‹ã‚‰æä¾›ã•れãŸã‚‚ã®ã§ã‚‚å¯èƒ½ã§ã™ã€‚ *mime* 引数ã¨ã—ã¦ã€BLOB ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ MIME ãŒãƒ•ァイルã‹ã‚‰æ¸¡ã•れãŸå ´åˆã€æ–‡å­—ã‚»ãƒƒãƒˆã¨æ”¹è¡Œã‚³ãƒ¼ãƒ‰å¤‰æ›ã«é–¢ã™ã‚‹å•題をé¿ã‘ã‚‹ãŸã‚ã€BLOBåž‹ã®å¼•数を使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +#### è¿”ã•れるオブジェクト + +Email オブジェクト。 + +#### 例題 1 + +テキストドキュメントã¨ã—ã¦ä¿å­˜ã•れ㟠MIME ã®ãƒ¡ãƒ¼ãƒ«ã®ãƒ†ãƒ³ãƒ—レートを読ã¿è¾¼ã¿ã€ãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ã¾ã™ã€‚ + +```4d +C_BLOB($mime) +C_OBJECT($mail;$server;$transporter;$status) + +$mime:=File("/PACKAGE/Mails/templateMail.txt").getContent()) + +$mail:=[#current_title_incode]($mime) +$mail.to:="smith@mail.com" +$mail.subject:="Hello world" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="test@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($mail) +``` + +#### 例題 2 + +ã“ã®ä¾‹é¡Œã§ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãŒå«ã¾ã‚ŒãŸ 4D Write Pro ドキュメントを直接é€ä¿¡ã—ã¾ã™: + +```4d +C_TEXT($mime) +C_OBJECT($email;$server;$transporter;$status) + +// 4D Write Pro ドキュメントを MIME ã«æ›¸ã出ã—ã¾ã™ +WP EXPORT VARIABLE(WParea;$mime;wk mime html) + +// 4D Write Pro MIME 変数をメールオブジェクトã«å¤‰æ›ã—ã¾ã™ +$email:=MAIL Convert from MIME($mime) + +// Email オブジェクトã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’設定ã—ã¾ã™ +$email.subject:="4D Write Pro HTML body" +$email.from:="YourEmail@gmail.com" +$email.to:="RecipientEmail@mail.com" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="YourEmail@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($email) +``` + + + + + +## MAIL Convert to MIME + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +| v17 R5 | 変更 | +
        + +**MAIL Convert to MIME**( *mail* : Object { ; *options* : Object } ) : Text +| 引数 | タイプ | | 説明 | +| ------- | ------ |:--:| ----------------------- | +| mail | オブジェクト | -> | Email オブジェクト | +| options | オブジェクト | -> | 文字セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®ãƒ¡ãƒ¼ãƒ«ã‚ªãƒ—ション | +| 戻り値 | テキスト | <- | MIME ã«å¤‰æ›ã•れ㟠Emailオブジェクト | + +#### 説明 + +The `MAIL Convert to MIME` command converts an email object into MIME text. ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€Email オブジェクトをé€ä¿¡ã™ã‚‹å‰ã«æ•´å½¢ã™ã‚‹ç›®çš„ã§[SMTP_transporter.send()](SMTPTransporterClass.md#send) コマンドã«ã‚ˆã£ã¦å†…部的ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ ã¾ãŸã€ã‚ªãƒ–ジェクト㮠MIME フォーマットを解æžã™ã‚‹ãŸã‚ã«ã‚‚使用ã•れã¾ã™ã€‚ + +*mail* ã«ã¯ã€å¤‰æ›ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¨ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã®è©³ç´°ã‚’渡ã—ã¾ã™ã€‚ ã“ã®æƒ…å ±ã«ã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ (é€ä¿¡è€…ã¨å—信者)ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãã®ã‚‚ã®ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®è¡¨ç¤ºã‚¿ã‚¤ãƒ—ãªã©ãŒå«ã¾ã‚Œã¾ã™ã€‚ +> Email オブジェクトã®ãƒ•ォーマット㯠[JMAP specification](https://jmap.io/spec-mail.html) ã«æº–æ‹ ã—ã¾ã™ã€‚ + +*options* 引数を渡ã™ã¨ã€ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦ç‰¹å®šã®æ–‡å­—セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°è¨­å®šã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 次ã®ãƒ—ロパティを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------- | +| headerCharset | Text | メールã®ä»¥ä¸‹ã®éƒ¨åˆ†ã§ä½¿ç”¨ã•れる文字セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°: ä»¶åã€æ·»ä»˜ãƒ•ァイルåã€ãƒ¡ãƒ¼ãƒ«åã®å±žæ€§ã€‚ ã¨ã‚Šã†ã‚‹å€¤:

        定数値説明
        mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
        • headerCharset: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • bodyCharset: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        mail mode ISO88591ISO-8859-1
        • headerCharset: ISO-8859-1 & Quoted-printable
        • bodyCharset: ISO-8859-1 & 8-bit
        mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (**デフォルト値**)
        mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64
        | +| bodyCharset | Text | メール㮠HTML ãŠã‚ˆã³ãƒ†ã‚­ã‚¹ãƒˆæœ¬æ–‡ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã§ä½¿ç”¨ã•れる文字セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å–りã†ã‚‹å€¤: headerCharset ã¨åŒã˜(上記å‚ç…§) | + +*options* 引数ãŒçœç•¥ã•れãŸå ´åˆã€ãƒ˜ãƒƒãƒ€ãƒ¼ãŠã‚ˆã³æœ¬æ–‡ã«ãŠã„ã¦ã¯ mail mode UTF8 設定ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + + +#### 例題 + +```4d +C_OBJECT($mail) +C_TEXT($mime) +$mail:=New object + +// ãƒ¡ãƒ¼ãƒ«ä½œæˆ +$mail.from:="tsales@massmarket.com" +$mail.subject:="Terrific Sale! This week only!" +$mail.textBody:="Text format email" +$mail.htmlBody:="HTML format email" +$mail.to:=New collection +$mail.to.push(New object ("email";"noreply@4d.com")) +$mail.to.push(New object ("email";"test@4d.com")) + +// Email オブジェクトを MIME ã«å¤‰æ›ã—ã¾ã™ +$mime:=[#current_title_incode]($mail) + +// $mime ã®ä¸­èº«: +// MIME-Version: 1.0 +// Date: Thu, 11 Oct 2018 15:42:25 GMT +// Message-ID: <7CA5D25B2B5E0047A36F2E8CB30362E2> +// Sender: tsales@massmarket.com +// From: tsales@massmarket.com +// To: noreply@4d.com +// To: test@4d.com +// Content-Type: multipart/alternative; boundary="E0AE5773D5E95245BBBD80DD0687E218" +// Subject: Terrific Sale! This week only! +// +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/plain; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// Text format email +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/html; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// HTML format email +// --E0AE5773D5E95245BBBD80DD0687E218-- +``` + + + diff --git a/website/translated_docs/ja/API/EntityClass.md b/website/translated_docs/ja/API/EntityClass.md new file mode 100644 index 00000000000000..633b1f3cf43d1f --- /dev/null +++ b/website/translated_docs/ja/API/EntityClass.md @@ -0,0 +1,1618 @@ +--- +id: EntityClass +title: Entity +--- + +レコードã¨ãƒ†ãƒ¼ãƒ–ルã®é–¢ä¿‚ã¨åŒæ§˜ã«ã€[エンティティ](ORDA/dsMapping.md#エンティティ) 㯠[データクラス](ORDA/dsMapping.md#データクラス) ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ エンティティã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¨åŒã˜å±žæ€§ã‚’æŒã¤ã»ã‹ã€ãƒ‡ãƒ¼ã‚¿å€¤ã‚„ã€ç‰¹æœ‰ã®ãƒ—ロパティãŠã‚ˆã³é–¢æ•°ã‚’æŒã¡ã¾ã™ã€‚ + + +### æ¦‚è¦ + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : any](#attributename)

            stores the attribute value for the entity | +| [**.clone()** : 4D.Entity](#clone)

            creates in memory a new entity referencing the same record as the original entity | +| [**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection](#diff)

            compares the contents of two entities and returns their differences | +| [**.drop**( {*mode* : Integer} ) : Object](#drop)

            deletes the data contained in the entity from the datastore | +| [**.first()**: 4D.Entity](#first)

            returns a reference to the entity in first position of the entity selection which the entity belongs to | +| [**.fromObject**( *filler* : Object )](#fromobject)

            fills an entity with the *filler* content | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

            returns the dataclass of the entity | +| [**.getKey**( { *mode* : Integer } ) : Text
        **.getKey**( { *mode* : Integer } ) : Integer](#getkey)

            returns the primary key value of the entity | +| [**.getSelection()**: 4D.EntitySelection](#getselection)

            returns the entity selection which the entity belongs to | +| [**.getStamp()** : Integer](#getstamp)

             returns the current value of the stamp of the entity | +| [**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer](#indexof)

            returns the position of the entity in an entity selection | +| [**.isNew()** : Boolean](#isnew)

             returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore | +| [**.last()** : 4D.Entity](#last)

            returns a reference to the entity in last position of the entity selection which the entity belongs to | +| [**.lock**( { *mode* : Integer } ) : Object](#lock)

            puts a pessimistic lock on the record referenced by the entity | +| [**.next()** : 4D.Entity](#next)

            returns a reference to the next entity in the entity selection which the entity belongs to | +| [**.previous()** : 4D.Entity](#previous)

             returns a reference to the previous entity in the entity selection which the entity belongs to | +| [**.reload()** : Object](#reload)

            reloads the content of the entity in memory | +| [**.save**( { *mode* : Integer } ) : Object](#save)

            saves the changes made to the entity | +| [**.toObject**() : Object
        **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
        **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object](#toobject)

            returns an object which has been built from the entity | +| [**.touched()** : Boolean](#touched)

            tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved | +| [**.touchedAttributes()** : Collection](#touchedattributes)

            returns the names of the attributes that have been modified since the entity was loaded into memory | +| [**.unlock()** : Object](#unlock)

            removes the pessimistic lock on the record matching the entity | + + + + + + +## .*attributeName* + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +***.attributeName*** : any + +#### 説明 + +Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity. +> データクラス属性㯠\[ ] を使用ã—ãŸã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã§ã‚‚アクセスå¯èƒ½ã§ã™ã€‚ + +ã“ã®å±žæ€§å€¤ã‚¿ã‚¤ãƒ—ã¯å±žæ€§ã®ç¨®é¡ž ([](DataClassAttributeClass.md#kind).kind; リレーションã¾ãŸã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸) ã«ã‚ˆã‚Šã¾ã™ã€‚ + +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸åž‹ã®å ´åˆ: `.attributeName`㯠*attributeName* ã¨åŒã˜åž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ã®å ´åˆ: `.attributeName` ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ リレートエンティティã®å€¤ã¯ã€ãƒ‰ãƒƒãƒˆè¨˜æ³•ã§ãƒ—ロパティを繋ã’ã‚‹ã“ã¨ã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚例: "myEntity.employer.employees[0].lastname" +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºåž‹ã®å ´åˆ: `.attributeName` ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ–°ã—ã„エンティティセレクションを返ã—ã¾ã™ã€‚ é‡è¤‡ã—ã¦ã„るエンティティã¯å–り除ã‹ã‚Œã¾ã™ (è¿”ã•れるã®ã¯é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™)。 + + +#### 例題 + +```4d + var $myEntity : cs.EmployeeEntity + $myEntity:=ds.Employee.new() // エンティティを新è¦ä½œæˆã—ã¾ã™ + $myEntity.name:="Dupont" // 'Dupont' ã‚’ 'name' 属性ã«ä»£å…¥ã—ã¾ã™ + $myEntity.firstname:="John" // 'John' ã‚’ 'firstname' 属性ã«ä»£å…¥ã—ã¾ã™ + $myEntity.save() // エンティティをä¿å­˜ã—ã¾ã™ +``` + + + + + +## .clone() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + + +**.clone()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ------------------- | +| 戻り値 | 4D.Entity | <- | åŒãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å‚ç…§ã™ã‚‹æ–°ã—ã„エンティティ | + + +#### 説明 + +The `.clone()` function creates in memory a new entity referencing the same record as the original entity. ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã™ã‚‹ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å€‹åˆ¥ã«æ›´æ–°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> エンティティã«å¯¾ã—ã¦ä½•らã‹ã®å¤‰æ›´ã‚’ãŠã“ãªã£ãŸå ´åˆã€ãれら㯠[`.save( )`](#save) 関数ãŒå®Ÿè¡Œã•れãŸã¨ãã®ã¿ã€å‚ç…§å…ˆã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ä¿å­˜ã•れるã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã“ã®é–¢æ•°ã¯ã€ã™ã§ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ä¿å­˜ã•れã¦ã„るエンティティã«å¯¾ã—ã¦ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ æ–°è¦ã«ä½œæˆã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£([`.isNew()`](#isnew) ㌠**true** ã‚’è¿”ã™ã‚‚ã®) ã«å¯¾ã—ã¦å‘¼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + +#### 例題 + +```4d + var $emp; $empCloned : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $empCloned:=$emp.clone() + + $emp.lastName:="Smith" // $emp ã«å¯¾ã™ã‚‹å¤‰æ›´ã¯ $empCloned ã«ã¯é©ç”¨ã•れã¾ã›ã‚“ + +``` + + + + + + +## .diff() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------------- | --------- |:--:| ------------------- | +| entityToCompare | 4D.Entity | -> | å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨æ¯”較ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| attributesToCompare | コレクション | -> | 比較ã™ã‚‹å±žæ€§ã®åç§° | +| 戻り値 | コレクション | <- | エンティティ間ã®å·®ç•° | + + +#### 説明 + +The `.diff()` function compares the contents of two entities and returns their differences. + +*entityToCompare* ã«ã¯ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨æ¯”較をã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’渡ã—ã¾ã™ã€‚ + +*attributesToCompare* 引数ã§ã€æ¯”較ã™ã‚‹å±žæ€§ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れを渡ã—ãŸå ´åˆã€æŒ‡å®šã•れãŸå±žæ€§ã«å¯¾ã—ã¦ã®ã¿æ¯”較ãŒãŠã“ãªã‚れã¾ã™ã€‚ çœç•¥æ™‚ã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£é–“ã®å·®ç•°ãŒã™ã¹ã¦è¿”ã•れã¾ã™ã€‚ + +エンティティã®å·®ç•°ã¯ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦è¿”ã•れã¾ã™: + +| プロパティå | タイプ | 説明 | +| ------------- | ------------- | ---------------------- | +| attributeName | String | 属性å | +| value | any - 属性ã®åž‹ã«ã‚ˆã‚‹ | オリジナルエンティティã®å±žæ€§å€¤ | +| otherValue | any - 属性ã®åž‹ã«ã‚ˆã‚‹ | *entityToCompare* ã®å±žæ€§å€¤ | + +コレクションã«å«ã¾ã‚Œã‚‹ã®ã¯ç•°ãªã‚‹å€¤ã‚’æŒã£ã¦ã„ãŸå±žæ€§ã®ã¿ã§ã™ã€‚ 差異ãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€`diff()` ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€ç¨®é¡ž ([kind](DataClassAttributeClass.md#kind)) ㌠**storage** ã‚ã‚‹ã„㯠**relatedEntity** ã§ã‚るプロパティã«é©ç”¨ã•れã¾ã™ã€‚ リレート先ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãã®ã‚‚ã®ãŒå¤‰æ›´ã•れãŸå ´åˆ (外部キーã®å¤‰æ›´)ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®åç§°ã¨ãã®ãƒ—ライマリーキーå㌠*attributeName* プロパティã«è¿”ã•れã¾ã™ (リレーションåã«ã¤ã„ã¦ã® *value* ãŠã‚ˆã³ *otherValue* ã¯ç©ºã«ãªã‚Šã¾ã™)。 + +比較ã™ã‚‹ã©ã¡ã‚‰ã‹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒ **Null** ã§ã‚ã‚‹å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +#### 例題 1 + + +```4d + var $diff1; $diff2 : Collection + employee:=ds.Employee.query("ID=1001").first() + $clone:=employee.clone() + employee.firstName:="MARIE" + employee.lastName:="SOPHIE" + employee.salary:=500 + $diff1:=$clone.diff(employee) // ã™ã¹ã¦ã®å·®ç•°ãŒè¿”ã•れã¾ã™ + $diff2:=$clone.diff(employee;New collection"firstName";"lastName")) + // firstName 㨠lastName ã«ã¤ã„ã¦ã®å·®ç•°ã®ã¿ãŒè¿”ã•れã¾ã™ +``` + +$diff1: + +```4d +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + }, + { + "attributeName": "salary", + "value": 66600, + "otherValue": 500 + } +] +$diff2: + +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + } +] +``` + +#### 例題 2 + +```4d + var vCompareResult1; vCompareResult2; vCompareResult3; $attributesToInspect : Collection + vCompareResult1:=New collection + vCompareResult2:=New collection + vCompareResult3:=New collection + $attributesToInspect:=New collection + + $e1:=ds.Employee.get(636) + $e2:=ds.Employee.get(636) + + $e1.firstName:=$e1.firstName+" update" + $e1.lastName:=$e1.lastName+" update" + + $c:=ds.Company.get(117) + $e1.employer:=$c + $e2.salary:=100 + + $attributesToInspect.push("firstName") + $attributesToInspect.push("lastName") + + vCompareResult1:=$e1.diff($e2) + vCompareResult2:=$e1.diff($e2;$attributesToInspect) + vCompareResult3:=$e1.diff($e2;$e1.touchedAttributes()) +``` + +vCompareResult1 (ã™ã¹ã¦ã®å·®ç•°ãŒè¿”ã•れã¦ã„ã¾ã™): + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "salary", + "value": 33500, + "otherValue": 100 + }, + { + "attributeName": "employerID", // プライマリーキーå + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", // リレーションå + "value": "[object Entity]",// Company ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ 117 + "otherValue": "[object Entity]"// Company ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ 118 + } +] +``` + +vCompareResult2 ($attributesToInspect ã«ã¤ã„ã¦ã®å·®ç•°ã®ã¿è¿”ã•れã¾ã™) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + } +] +``` + +vCompareResult3 ($e1 ã«ãŠã„ã¦æ›´æ–°ã•れ㟠(touch ã•れãŸ) 属性ã®ã¿ãŒè¿”ã•れã¾ã™) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "employerID", // プライマリーキーå + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", // リレーションå + "value": "[object Entity]",// Company ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ 117 + "otherValue": "[object Entity]"// Company ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ 118 + + } +] +``` + + + + + +## .drop() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.drop**( {*mode* : Integer} ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| ------------------------------------------------------------ | +| mode | æ•´æ•° | -> | `dk force drop if stamp changed`: スタンプãŒå¤‰æ›´ã•れã¦ã„ãŸå ´åˆã§ã‚‚強制的ã«ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ | +| 戻り値 | オブジェクト | <- | ドロップã®çµæžœ | + +#### 説明 + +The `.drop()` function deletes the data contained in the entity from the datastore, from the table related to its Dataclass. エンティティãã®ã‚‚ã®ã¯ãƒ¡ãƒ¢ãƒªå†…ã«æ®‹ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +マルãƒãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã‚ã‚‹ã„ã¯ãƒžãƒ«ãƒãƒ—ロセスアプリケーションã«ãŠã„ã¦ã€`.drop()` 関数㯠["オプティミスティック・ロック"](ORDA/entities.md#entity-locking) 機構ã®ã‚‚ã¨ã§å®Ÿè¡Œã•れã¾ã™ã€‚ã“れã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒä¿å­˜ã•れるãŸã³ã«å†…部的ãªãƒ­ãƒƒã‚¯ã‚¹ã‚¿ãƒ³ãƒ—ãŒè‡ªå‹•çš„ã«å¢—分ã—ã¦ã„ãã¨ã„ã†æ©Ÿæ§‹ã§ã™ã€‚ + +*mode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä»–ã®ãƒ—ロセスã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã•れã¦ã„ãŸå ´åˆ (ã¤ã¾ã‚Šã€ã‚¹ã‚¿ãƒ³ãƒ—ãŒå¤‰æ›´ã•れã¦ã„ãŸå ´åˆ) ã«ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ (以下å‚ç…§)。 + +*mode* ã« `dk force drop if stamp changed` オプションを渡ã™ã¨ã€ã‚¹ã‚¿ãƒ³ãƒ—ãŒå¤‰æ›´ã•れã¦ã„ã¦ã‚‚エンティティã¯ãƒ‰ãƒ­ãƒƒãƒ—ã•れã¾ã™ (プライマリーキーã¯å¤‰ã‚らãªã„å ´åˆ)。 + +**戻り値** + +`.drop( )` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ------------- | ------------------- | ------------------- | ------------------------------------------------------------------------ | +| success | | boolean | ãƒ‰ãƒ­ãƒƒãƒ—ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| | | | ***エラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½:*** | +| status(*) | | number | エラーコードã€ä»¥ä¸‹å‚ç…§ | +| statusText(*) | | text | エラーã®è©³ç´°ã€ä»¥ä¸‹å‚ç…§ | +| | | | ***ペシミスティック・ロックエラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½:*** | +| LockKindText | | text | "Locked by record" | +| lockInfo | | object | ロック元ã«ã¤ã„ã¦ã®æƒ…å ± | +| | task_id | number | プロセスID | +| | user_name | text | マシン上ã§ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼å | +| | user4d_alias | text | `SET USER ALIAS` ã§è¨­å®šã•れã¦ã„れã°ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ãれ以外㯠4Dディレクトリã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å | +| | host_name | text | マシンå | +| | task_name | text | プロセスå | +| | client_version | text | | +| | | | ***深刻ãªã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ (深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ãƒ—ライマリーキーをé‡è¤‡ã•ã›ã‚ˆã†ã¨ã—ãŸã€ãƒ‡ã‚£ã‚¹ã‚¯ãŒã„ã£ã±ã„ã§ã‚ã£ãŸã€ãªã©ã§ã™):*** | +| errors | | Object ã® Collection | | +| | message | text | エラーメッセージ | +| | component signature | text | 内部コンãƒãƒ¼ãƒãƒ³ãƒˆç½²å (例 "dmbg" ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’表ã—ã¾ã™) | +| | errCode | number | エラーコード | + +(\*) エラー時ã«ã¯ *Result* オブジェクト㮠*status* ã‚ã‚‹ã„㯠*statusText* プロパティã«ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®å€¤ãŒè¿”ã•れã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------------------- | - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | エンティティã¯ã‚‚ã†ãƒ‡ãƒ¼ã‚¿å†…ã«å­˜åœ¨ã—ã¦ã„ã¾ã›ã‚“。 ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«èµ·ããˆã¾ã™:
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã‚‹ (スタンプãŒå¤‰æ›´ã•れã¦ã„ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã¯è§£æ”¾ã•れã¦ã„ã‚‹)
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã¦ã€ä»–ã®ãƒ—ライマリーキー値をæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ç½®ãæ›ãˆã‚‰ã‚Œã¦ã„ã‚‹ (スタンプã¯å¤‰æ›´ã•れã¦ã„ã¦ã€æ–°ã—ã„エンティティãŒãƒ¡ãƒ¢ãƒªç©ºé–“を使用ã—ã¦ã„ã‚‹)。 entity.drop( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk force drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ entity.lock( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk reload drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚
      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "エンティティã¯ã‚‚ã†å­˜åœ¨ã—ã¾ã›ã‚“" | +| `dk status locked` | 3 | エンティティã¯ãƒšã‚·ãƒŸã‚¹ãƒ†ã‚£ãƒƒã‚¯ãƒ»ãƒ­ãƒƒã‚¯ã§ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚
        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "æ—¢ã«ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™" | +| `dk status serious error` | 4 | 深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ©ãƒ¼ (例: é‡è¤‡ã‚­ãƒ¼)ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚¨ãƒ©ãƒ¼ãªã©ã§ã™ã€‚
        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "ãã®ä»–ã®ã‚¨ãƒ©ãƒ¼" | +| `dk status stamp has changed` | 2 | エンティティã®å†…部的ãªã‚¹ã‚¿ãƒ³ãƒ—値ãŒãƒ‡ãƒ¼ã‚¿å†…ã«ä¿å­˜ã•れã¦ã„るエンティティã®ã‚‚ã®ã¨åˆè‡´ã—ã¾ã›ã‚“ (オプティミスティック・ロック)。

      • entity.save( ) ã®å ´åˆ: dk auto merge オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.drop( ) ã®å ´åˆ: dk force drop if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.lock( ) ã®å ´åˆ: dk reload if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "スタンプãŒå¤‰æ›´ã•れã¦ã„ã¾ã™"
      • | + + +#### 例題 1 + +`dk force drop if stamp changed` オプションを使用ã—ãªã„例: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop() + Case of + :($status.success) + ALERT($employee.firstName+" "+$employee.lastName+" をドロップã—ã¾ã—ãŸã€‚") // ドロップã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ¡ãƒ¢ãƒªå†…ã«æ®‹ã‚Šã¾ã™ + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### 例題 2 + +`dk force drop if stamp changed` オプションを使用ã™ã‚‹ä¾‹: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop(dk force drop if stamp changed) + Case of + :($status.success) + ALERT($employee.firstName+" "+$employee.lastName+" をドロップã—ã¾ã—ãŸã€‚") // ドロップã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ¡ãƒ¢ãƒªå†…ã«æ®‹ã‚Šã¾ã™ + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + +## .first() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.first()**: 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ----------------------------------------- | +| 戻り値 | 4D.Entity | <- | エンティティセレクションã®å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.first()` function returns a reference to the entity in first position of the entity selection which the entity belongs to. + +å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã™ã‚‹æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã—ãªã„å ´åˆ (ã¤ã¾ã‚Š [entity.getSelection( )](#getselection) ㌠Null ã‚’è¿”ã™å ´åˆ)ã€é–¢æ•°ã¯ Null値を返ã—ã¾ã™ã€‚ + +#### 例題 + +```4d + var $employees : cs.EmployeeSelection + var $employee; $firstEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ 3ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æŒã¡ã¾ã™ + $employee:=$employees[2] + $firstEmployee:=$employee.first() // $firstEmployee ã¯ã€$employees エンティティセレクションã®å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ +``` + + + + +## .fromObject() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.fromObject**( *filler* : Object ) +| 引数 | タイプ | | 説明 | +| ------ | ------ |:--:| --------------------- | +| filler | オブジェクト | -> | エンティティã®å±žæ€§å€¤ã‚’設定ã™ã‚‹ã‚ªãƒ–ジェクト | + +#### 説明 + +The `.fromObject()` function fills an entity with the *filler* content. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’変更ã—ã¾ã™ã€‚ + +オブジェクトã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£é–“ã®ãƒžãƒƒãƒ”ングã¯å±žæ€§åã§ãŠã“ãªã‚れã¾ã™: + +* オブジェクトã®ãƒ—ロパティãŒãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å­˜åœ¨ã—ãªã„å ´åˆã€ãれã¯ç„¡è¦–ã•れã¾ã™ã€‚ +* データタイプã¯åŒã˜ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ オブジェクトã¨ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹é–“ã§åž‹ãŒåˆè‡´ã—ãªã„å ´åˆã€4D ã¯å¯èƒ½ã§ã‚れã°ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—よã†ã¨ã— ([`データタイプã®å¤‰æ›`](Concepts/data-types.md#データタイプã®å¤‰æ›)) å‚ç…§)ã€ãれ以外ã®å ´åˆã«ã¯ãã®å±žæ€§ã¯æ›´æ–°ã•れã¾ã›ã‚“。 +* プライマリーキーã¯ãã®ã¾ã¾ã€ã‚ã‚‹ã„㯠"__KEY" プロパティを (プライマリーキー値ã¨ã¨ã‚‚ã«) 使ã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãã®å€¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„å ´åˆã«ã¯ã€[.save()](#save) ãŒå‘¼ã³å‡ºã•れãŸã¨ãã«æŒ‡å®šå€¤ã‚’使ã£ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä½œæˆã•れã¾ã™ã€‚ プライマリーキーを指定ã—ã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä½œæˆã•れã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ«ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦ãƒ—ライマリーキー値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ 自動インクリメント機能ã¯ãƒ—ライマリーキー㌠null ã®å ´åˆã«ã®ã¿è¨ˆç®—ã•れã¾ã™ã€‚ + +*filler* 引数ã®ã‚ªãƒ–ジェクトã¯ã€ä»¥ä¸‹ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã—ã¦ã„ã‚‹å ´åˆã«ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’扱ã†ã“ã¨ãŒã§ãã¾ã™: + +* *filler* ãŒå¤–部キーを格ç´ã—ã¦ã„ã‚‹ +* *filler* ãŒã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åã¨åŒã˜åç§°ã®ãƒ—ロパティを格ç´ã—ã¦ãŠã‚Šã€ãã®å€¤ã§ã‚るオブジェクト㯠"\_\_KEY" ã¨ã„ã†åç§°ã®å˜ä¸€ã®ãƒ—ロパティを格ç´ã—ã¦ã„ã‚‹ +* リレートエンティティãŒå­˜åœ¨ã—ãªã„å ´åˆã€ç„¡è¦–ã•れã¾ã™ã€‚ + +#### 例題 + +以下ã®ã‚ˆã†ãª $o オブジェクトãŒã‚ã‚‹å ´åˆ: + +```4d +{ + "firstName": "Mary", + "lastName": "Smith", + "salary": 36500, + "birthDate": "1958-10-27T00:00:00.000Z", + "woman": true, + "managerID": 411,// ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¸»ã‚­ãƒ¼å±žæ€§å€¤ã§æŒ‡å®šã—ã¾ã™ + "employerID": 20 // ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¸»ã‚­ãƒ¼å±žæ€§å€¤ã§æŒ‡å®šã—ã¾ã™ +} +``` + + +以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã¨ã€manager ãŠã‚ˆã³ employerã¨ã„ã†ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã—ã¾ã™ã€‚ + + +```4d + var $o : Object + var $entity : cs.EmpEntity + $entity:=ds.Emp.new() + $entity.fromObject($o) + $entity.save() +``` + + +ã¾ãŸã€ã‚ªãƒ–ジェクトã¨ã—ã¦æä¾›ã•れãŸãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d + +{ + "firstName": "Marie", + "lastName": "Lechat", + "salary": 68400, + "birthDate": "1971-09-03T00:00:00.000Z", + "woman": false, + "employer": {// ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§æŒ‡å®šã—ã¾ã™ + "__KEY": "21" + }, + "manager": {// ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§æŒ‡å®šã—ã¾ã™ + "__KEY": "411" + } +} +``` + + + + + + +## .getDataClass() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | + +
        + +**.getDataClass()** : 4D.DataClass +| 引数 | タイプ | | 説明 | +| --- | ------------ |:--:| ------------------------------ | +| 戻り値 | 4D.DataClass | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã—ã¦ã„ã‚‹ DataClass オブジェクト | + +#### 説明 + +The `.getDataClass()` function returns the dataclass of the entity. ã“ã®é–¢æ•°ã¯æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã‚’書ãã®ã«æœ‰ç”¨ã§ã™ã€‚ + + +#### 例題 + +ä»¥ä¸‹ã®æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã¯ã€ã‚らゆるエンティティを複製ã—ã¾ã™: + +```4d + // duplicate_entity メソッド + // duplicate_entity($entity) + + #DECLARE($entity : 4D.Entity) + var $entityNew : 4D.Entity + var $status : Object + + $entityNew:=$entity.getDataClass().new() // è¦ªãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ–°ã—ã„エンティティを作æˆã—ã¾ã™ + $entityNew.fromObject($entity.toObject()) // 全属性をå–å¾—ã—ã¾ã™ + $entityNew[$entity.getDataClass().getInfo().primaryKey]:=Null // プライマリーキーをリセットã—ã¾ã™ + $status:=$entityNew.save() // 複製ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¿å­˜ã—ã¾ã™ +``` + + + + + +## .getKey() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.getKey**( { *mode* : Integer } ) : Text
        **.getKey**( { *mode* : Integer } ) : Integer +| 引数 | タイプ | | 説明 | +| ---- | ---- |:--:| -------------------------------------------------------- | +| mode | æ•´æ•° | -> | `dk key as string`: プライマリーキーã®åž‹ã«ã‹ã‹ã‚らãšã€ãƒ—ライマリーキーを文字列ã¨ã—ã¦è¿”ã—ã¾ã™ | +| 戻り値 | テキスト | <- | エンティティã®ãƒ†ã‚­ã‚¹ãƒˆåž‹ãƒ—ライマリーキーã®å€¤ | +| 戻り値 | æ•´æ•° | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ•°å€¤åž‹ãƒ—ライマリーキーã®å€¤ | + + +#### 説明 + +The `.getKey()` function returns the primary key value of the entity. + +ãƒ—ãƒ©ã‚¤ãƒžãƒªãƒ¼ã‚­ãƒ¼ã¯æ•°å€¤ (å€é•·æ•´æ•°) ã‚ã‚‹ã„ã¯æ–‡å­—列ã§ã™ã€‚ *mode* 引数ã¨ã—㦠`dk key as string` オプションを渡ã™ã“ã¨ã§ã€å®Ÿéš›ã®ãƒ—ライマリーキーã®åž‹ã«é–¢ä¿‚ãªãã€è¿”ã•れるプライマリーキー値ã®åž‹ã‚’文字列㫠"強制" ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 例題 + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees[0] + ALERT("プライマリーキー: "+$employee.getKey(dk key as string)) +``` + + + + + +## .getSelection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.getSelection()**: 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| --- | ------------------ |:--:| --------------------------------------- | +| 戻り値 | 4D.EntitySelection | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.getSelection()` function returns the entity selection which the entity belongs to. + +対象エンティティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„ãªã„å ´åˆã€é–¢æ•°ã¯ Null値を返ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $emp : cs.EmployeeEntity + var $employees; $employees2 : cs.EmployeeSelection + $emp:=ds.Employee.get(672) // エンティティセレクションã«å±žã—ã¦ã„ãªã„エンティティã§ã™ + $employees:=$emp.getSelection() // $employees 㯠Null ã§ã™ + + $employees2:=ds.Employee.query("lastName=:1";"Smith") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ 6ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ + $emp:=$employees2[0] // ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„るエンティティã§ã™ + + ALERT("エンティティセレクションã«ã¯ "+String($emp.getSelection().length)+" ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå«ã¾ã‚Œã¦ã„ã¾ã™") +``` + + + + +## .getStamp() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.getStamp()** : Integer +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ------------------------------------ | +| 戻り値 | æ•´æ•° | <- | エンティティã®ã‚¹ã‚¿ãƒ³ãƒ— (エンティティãŒä½œæˆã•れãŸã°ã‹ã‚Šã®å ´åˆã«ã¯ 0) | + +#### 説明 + +The `.getStamp()` function returns the current value of the stamp of the entity. + +内部スタンプã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä¿å­˜ã•れるãŸã³ã« 4D ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¾ã™ã€‚ ã“れã¯åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã™ã‚‹è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®åŒæ™‚アクセス・編集を管ç†ã—ã¾ã™ã€‚ã“ã®æ©Ÿæ§‹ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[**エンティティロッキング**](ORDA/entities.md#エンティティロッキング) ã‚’å‚ç…§ãã ã•ã„。 +> (一度もä¿å­˜ã•れã¦ã„ãªã„) æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦ã¯ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ 0 ã‚’è¿”ã—ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã¾ã ä½œæˆã•れãŸã°ã‹ã‚Šã‹ã©ã†ã‹ã‚’調ã¹ã‚‹ã«ã¯ã€[isNew()](#isnew) ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $entity : cs.EmployeeEntity + var $stamp : Integer + + $entity:=ds.Employee.new() + $entity.lastname:="Smith" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=1 + + $entity.lastname:="Wesson" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=2 +``` + + + + + +## .indexOf() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer +| 引数 | タイプ | | 説明 | +| --------------- | ------------------ |:--:| ----------------------------- | +| entitySelection | 4D.EntitySelection | -> | エンティティã®ä½ç½®ã‚’å–å¾—ã™ã‚‹å¯¾è±¡ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | æ•´æ•° | <- | エンティティセレクション内ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½® | + +#### 説明 + +The `.indexOf()` function returns the position of the entity in an entity selection. + +*entitySelection* å¼•æ•°ãŒæ¸¡ã•れãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€æ‰€å±žã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½®ãŒè¿”ã•れã¾ã™ã€‚ *entitySelection* 引数を渡ã—ãŸå ´åˆã¯ã€æŒ‡å®šã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ + +戻り値ã¯ã€0 ã¨ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length より 1 を引ã„ãŸå€¤ã®ç¯„å›²å†…ã®æ•°å€¤ã§ã™ã€‚ + +* エンティティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æŒãŸãªã„å ´åˆã€ã‚ã‚‹ã„㯠*entitySelection* å¼•æ•°ã§æŒ‡å®šã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«ã¯ã€-1 ãŒè¿”ã•れã¾ã™ã€‚ +* *entitySelection* å¼•æ•°ã§æŒ‡å®šã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚¯ã‚·ãƒ§ãƒ³ãŒ Null ã§ã‚ã‚‹ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚‚ã®ã§ãªã„å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +#### 例題 + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ 3ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ + $employee:=$employees[1] // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„ã¾ã™ + ALERT("The index of the entity in its own entity selection is "+String($employee.indexOf())) // 1 + + $employee:=ds.Employee.get(725) // ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„ãªã„エンティティã§ã™ + ALERT("The index of the entity is "+String($employee.indexOf())) // -1 +``` + + + + + +## .isNew() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.isNew()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ------------------------------------------ | +| 戻り値 | ブール | <- | エンティティãŒä½œæˆã•れãŸã°ã‹ã‚Šã§æœªä¿å­˜ã®å ´åˆã¯ true。 ãれ以外㯠false。 | + +#### 説明 + +The `.isNew()` function returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore. ãã†ã§ãªã„å ´åˆã«ã¯ã€false ã‚’è¿”ã—ã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $emp : cs.EmployeeEntity + + $emp:=ds.Employee.new() + + If($emp.isNew()) + ALERT("æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ã€‚") + End if +``` + + + + +## .last() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.last()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ----------------------------------------- | +| 戻り値 | 4D.Entity | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚エンティティã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.last()` function returns a reference to the entity in last position of the entity selection which the entity belongs to. + +å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã™ã‚‹æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã—ãªã„å ´åˆ (ã¤ã¾ã‚Š [entity.getSelection( )](#getselection) ㌠Null ã‚’è¿”ã™å ´åˆ)ã€é–¢æ•°ã¯ Null値を返ã—ã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $employees : cs.EmployeeSelection + var $employee; $lastEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ 3ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æŒã¡ã¾ã™ + $employee:=$employees[0] + $lastEmployee:=$employee.last() // $lastEmployee ã¯ã€$employees ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚エンティティã§ã™ +``` + + + + +## .lock() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.lock**( { *mode* : Integer } ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| -------------------------------------------------------- | +| mode | æ•´æ•° | -> | `dk reload if stamp changed`: スタンプãŒå¤‰æ›´ã•れã¦ã‚‹å ´åˆã¯ãƒ­ãƒƒã‚¯å‰ã«ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ | +| 戻り値 | オブジェクト | <- | ロックã®çµæžœ | + +#### 説明 + +The `.lock()` function puts a pessimistic lock on the record referenced by the entity. [ロック](ORDA/entities.md#エンティティロッキング)ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ã¨ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセス内ã®å½“該エンティティã®å‚ç…§ã™ã¹ã¦ã«å¯¾ã—ã¦ã‹ã‘られã¾ã™ã€‚ + +ä»–ã®ãƒ—ロセスã‹ã‚‰ã¯ã“ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãƒ­ãƒƒã‚¯ã•れã¦è¦‹ãˆã¾ã™ (ã“ã®é–¢æ•°ã‚’使ã£ã¦åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロックã—よã†ã¨ã—ãŸå ´åˆã€`result.success` プロパティã«ã¯ false ãŒè¿”ã•れã¾ã™)。 ロックをãŠã“ãªã£ãŸã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§å®Ÿè¡Œã•れる関数ã®ã¿ãŒã€å½“該エンティティã®å±žæ€§ã‚’編集・ä¿å­˜ã§ãã¾ã™ã€‚ ä»–ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’読ã¿å–り専用ã«ãƒ­ãƒ¼ãƒ‰ã§ãã¾ã™ãŒã€å€¤ã®å…¥åŠ›ãƒ»ä¿å­˜ã¯ã§ãã¾ã›ã‚“。 + +レコードã®ãƒ­ãƒƒã‚¯ã¯ã€ä»¥ä¸‹ã®å ´åˆã«è§£é™¤ã•れã¾ã™: + +* åŒãƒ—ロセス内ã§åˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—㦠[`.unlock()`](#unlock) 関数ãŒå‘¼ã³å‡ºã•れãŸå ´åˆ +* メモリ内ã®ã©ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰ã‚‚å‚ç…§ã•れãªããªã£ãŸå ´åˆã€è‡ªå‹•çš„ã«ãƒ­ãƒƒã‚¯ãŒè§£é™¤ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ­ãƒ¼ã‚«ãƒ«å‚ç…§ã«å¯¾ã—ã¦ã®ã¿ãƒ­ãƒƒã‚¯ãŒã‹ã‹ã£ã¦ã„ãŸå ´åˆã€é–¢æ•°ã®å®Ÿè¡ŒãŒçµ‚了ã™ã‚Œã°ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã¾ã™ã€‚ メモリ内ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ãŒã‚ã‚‹é™ã‚Šã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ãƒ­ãƒƒã‚¯ã•れãŸã¾ã¾ã§ã™ã€‚ + +*mode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä»–ã®ãƒ—ロセスã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã•れã¦ã„ãŸå ´åˆ (ã¤ã¾ã‚Šã€ã‚¹ã‚¿ãƒ³ãƒ—ãŒå¤‰æ›´ã•れã¦ã„ãŸå ´åˆ) ã«ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ (以下å‚ç…§)。 + +*mode* ã« `dk reload if stamp changed` オプションを渡ã™ã¨ã€ã‚¹ã‚¿ãƒ³ãƒ—ãŒå¤‰æ›´ã•れã¦ã„ã¦ã‚‚エラーã¯è¿”ã•れãšã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯å†èª­ã¿è¾¼ã¿ã•れã¾ã™ (エンティティãŒå¼•ãç¶šã存在ã—ã€ãƒ—ライマリーキーも変ã‚らãªã„å ´åˆ)。 + +**戻り値** + +`.lock( )` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------------- | ------------------- | ------------------- | ------------------------------------------------------------------------ | +| success | | boolean | ãƒ­ãƒƒã‚¯ã«æˆåŠŸã—ãŸå ´åˆ (ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã™ã§ã«ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã§ãƒ­ãƒƒã‚¯ã•れã¦ã„ãŸå ´åˆ) ã«ã¯ trueã€ãれ以外㯠false | +| | | | ***`dk reload if stamp changed` オプションãŒä½¿ç”¨ã•れã¦ã„ãŸå ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½:*** | +| **wasReloaded** | | boolean | エンティティãŒãƒªãƒ­ãƒ¼ãƒ‰ã•れã€ã‹ã¤ãƒªãƒ­ãƒ¼ãƒ‰ã«æˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| | | | ***エラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½:*** | +| status(\*) | | number | エラーコードã€ä»¥ä¸‹å‚ç…§ | +| statusText(\*) | | text | エラーã®è©³ç´°ã€ä»¥ä¸‹å‚ç…§ | +| | | | ***ペシミスティック・ロックエラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½:*** | +| lockKindText | | text | "Locked by record" | +| lockInfo | | object | ロック元ã«ã¤ã„ã¦ã®æƒ…å ± | +| | task_id | number | プロセスID | +| | user_name | text | マシン上ã§ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼å | +| | user4d_alias | text | 4D ユーザーã®åå‰ã¾ãŸã¯ã‚¨ã‚¤ãƒªã‚¢ã‚¹ | +| | user4d_id | number | 4Dデータベースディレクトリã§ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ID | +| | host_name | text | マシンå | +| | task_name | text | プロセスå | +| | client_version | text | | +| | | | ***深刻ãªã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½*** (深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ãƒ—ライマリーキーをé‡è¤‡ã•ã›ã‚ˆã†ã¨ã—ãŸã€ãƒ‡ã‚£ã‚¹ã‚¯ãŒã„ã£ã±ã„ã§ã‚ã£ãŸã€ãªã©ã§ã™): | +| errors | | Object ã® Collection | | +| | message | text | エラーメッセージ | +| | component signature | text | 内部コンãƒãƒ¼ãƒãƒ³ãƒˆç½²å (例 "dmbg" ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’表ã—ã¾ã™) | +| | errCode | number | エラーコード | + + +(\*) エラー時ã«ã¯ *Result* オブジェクト㮠*status* ã‚ã‚‹ã„㯠*statusText* プロパティã«ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®å€¤ãŒè¿”ã•れã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------------------- | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | エンティティã¯ã‚‚ã†ãƒ‡ãƒ¼ã‚¿å†…ã«å­˜åœ¨ã—ã¦ã„ã¾ã›ã‚“。 ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«èµ·ããˆã¾ã™:
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã‚‹ (スタンプãŒå¤‰æ›´ã•れã¦ã„ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã¯è§£æ”¾ã•れã¦ã„ã‚‹)
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã¦ã€ä»–ã®ãƒ—ライマリーキー値をæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ç½®ãæ›ãˆã‚‰ã‚Œã¦ã„ã‚‹ (スタンプã¯å¤‰æ›´ã•れã¦ã„ã¦ã€æ–°ã—ã„エンティティãŒãƒ¡ãƒ¢ãƒªç©ºé–“を使用ã—ã¦ã„ã‚‹)。 entity.drop( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk force drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ entity.lock( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk reload drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚

      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "エンティティã¯ã‚‚ã†å­˜åœ¨ã—ã¾ã›ã‚“" | +| `dk status locked` | 3 | エンティティã¯ãƒšã‚·ãƒŸã‚¹ãƒ†ã‚£ãƒƒã‚¯ãƒ»ãƒ­ãƒƒã‚¯ã§ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚

        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "æ—¢ã«ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™" | +| `dk status serious error` | 4 | 深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ©ãƒ¼ (例: é‡è¤‡ã‚­ãƒ¼)ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚¨ãƒ©ãƒ¼ãªã©ã§ã™ã€‚

        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "ãã®ä»–ã®ã‚¨ãƒ©ãƒ¼" | +| `dk status stamp has changed` | 2 | エンティティã®å†…部的ãªã‚¹ã‚¿ãƒ³ãƒ—値ãŒãƒ‡ãƒ¼ã‚¿å†…ã«ä¿å­˜ã•れã¦ã„るエンティティã®ã‚‚ã®ã¨åˆè‡´ã—ã¾ã›ã‚“ (オプティミスティック・ロック)。

      • entity.save( ) ã®å ´åˆ: dk auto merge オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.drop( ) ã®å ´åˆ: dk force drop if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.lock( ) ã®å ´åˆ: dk reload if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼

      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "スタンプãŒå¤‰æ›´ã•れã¦ã„ã¾ã™" | + + +#### 例題 1 + +エラーã®ã‚る例題: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(716) + $status:=$employee.lock() + Case of + :($status.success) + ALERT($employee.firstName+" "+$employee.lastName+"をロックã—ã¾ã—ãŸ") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + + +#### 例題 2 + +`dk reload if stamp changed` オプションを使用ã™ã‚‹ä¾‹: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(717) + $status:=$employee.lock(dk reload if stamp changed) + Case of + :($status.success) + ALERT($employee.firstName+" "+$employee.lastName+" をロックã—ã¾ã—ãŸ") + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + +## .next() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.next()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ------------------------------------------ | +| 戻り値 | 4D.Entity | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®æ¬¡ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.next()` function returns a reference to the next entity in the entity selection which the entity belongs to. + +å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã™ã‚‹æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã—ãªã„å ´åˆ (ã¤ã¾ã‚Š [entity.getSelection()](#getselection) ㌠Null ã‚’è¿”ã™å ´åˆ)ã€é–¢æ•°ã¯ Null値を返ã—ã¾ã™ã€‚ + +ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã«æœ‰åŠ¹ãªæ¬¡ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå­˜åœ¨ã—ãªã„å ´åˆ (ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚エンティティã®å ´åˆ)ã€é–¢æ•°ã¯ Null ã‚’è¿”ã—ã¾ã™ã€‚ 次ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ãŸå ´åˆã€é–¢æ•°ã¯ãã®æ¬¡ã®æœ‰åйãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ (ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã«è¾¿ã‚Šç€ã㨠Null ã‚’è¿”ã—ã¾ã™)。 + + +#### 例題 + +```4d + var $employees : cs.EmployeeSelection + var $employee; $nextEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ 3ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æŒã¡ã¾ã™ + $employee:=$employees[0] + $nextEmployee:=$employee.next() // $nextEmployee ã¯ã€$employees エンティティセレクション㮠2番目ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ + +``` + + + +## .previous() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.previous()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ------------------------------------------ | +| 戻り値 | 4D.Entity | <- | エンティティセレクション内ã®å‰ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.previous()` function returns a reference to the previous entity in the entity selection which the entity belongs to. + +å¯¾è±¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ‰€å±žã™ã‚‹æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå­˜åœ¨ã—ãªã„å ´åˆ (ã¤ã¾ã‚Š [entity.getSelection()](#getselection) ㌠Null ã‚’è¿”ã™å ´åˆ)ã€é–¢æ•°ã¯ Null値を返ã—ã¾ã™ã€‚ + +ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã«æœ‰åйãªå‰ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå­˜åœ¨ã—ãªã„å ´åˆ (セレクションã®å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å ´åˆ)ã€é–¢æ•°ã¯ Null ã‚’è¿”ã—ã¾ã™ã€‚ å‰ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ãŸå ´åˆã€é–¢æ•°ã¯ãã®å‰ã®æœ‰åйãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ (セレクションã®å…ˆé ­ã«è¾¿ã‚Šç€ã㨠Null ã‚’è¿”ã—ã¾ã™)。 + + +#### 例題 + +```4d + var $employees : cs.EmployeeSelection + var $employee; $previousEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ 3ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æŒã¡ã¾ã™ + $employee:=$employees[1] + $previousEmployee:=$employee.previous() // $previousEmployee ã¯ã€$employees エンティティセレクションã®å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ +``` + + + + +## .reload( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.reload()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ----------- | +| 戻り値 | オブジェクト | <- | ステータスオブジェクト | + +#### 説明 + +The `.reload()` function reloads the content of the entity in memory, according to information stored in the table related to the dataclass in the datastore. エンティティãŒåŒã˜ãƒ—ライマリーキーã§å­˜åœ¨ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿ãƒªãƒ­ãƒ¼ãƒ‰ã¯å®Ÿè¡Œã•れã¾ã™ã€‚ + +**戻り値** + +`.reload( )` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------------- | ------- | -------------------------------------------------------------------------------------------------------- | +| success | boolean | ãƒªãƒ­ãƒ¼ãƒ‰ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false

        ***エラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½***: | +| status(\*) | number | エラーコードã€ä»¥ä¸‹å‚ç…§ | +| statusText(\*) | text | エラーã®è©³ç´°ã€ä»¥ä¸‹å‚ç…§ | + +(\*) エラー時ã«ã¯ *Result* オブジェクト㮠*status* ã‚ã‚‹ã„㯠*statusText* プロパティã«ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®å€¤ãŒè¿”ã•れã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------------------- | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | エンティティã¯ã‚‚ã†ãƒ‡ãƒ¼ã‚¿å†…ã«å­˜åœ¨ã—ã¦ã„ã¾ã›ã‚“。 ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«èµ·ããˆã¾ã™:

      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã‚‹ (スタンプãŒå¤‰æ›´ã•れã¦ã„ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã¯è§£æ”¾ã•れã¦ã„ã‚‹)
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã¦ã€ä»–ã®ãƒ—ライマリーキー値をæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ç½®ãæ›ãˆã‚‰ã‚Œã¦ã„ã‚‹ (スタンプã¯å¤‰æ›´ã•れã¦ã„ã¦ã€æ–°ã—ã„エンティティãŒãƒ¡ãƒ¢ãƒªç©ºé–“を使用ã—ã¦ã„ã‚‹)。 entity.drop( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk force drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ entity.lock( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk reload drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚

      • ***割り当ã¦ã‚‰ã‚ŒãŸ statusText***: "エンティティã¯ã‚‚ã†å­˜åœ¨ã—ã¾ã›ã‚“" | +| `dk status serious error` | 4 | 深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ©ãƒ¼ (例: é‡è¤‡ã‚­ãƒ¼)ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚¨ãƒ©ãƒ¼ãªã©ã§ã™ã€‚
        ***割り当ã¦ã‚‰ã‚ŒãŸ statusText***: "ãã®ä»–ã®ã‚¨ãƒ©ãƒ¼" | + + +#### 例題 + +```4d + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + var $result : Object + + $employees:=ds.Employee.query("lastName=:1";"Hollis") + $employee:=$employees[0] + $employee.firstName:="Mary" + $result:=$employee.reload() + Case of + :($result.success) + ALERT("エンティティã¯ãƒªãƒ­ãƒ¼ãƒ‰ã•れã¾ã—ãŸ") + :($result.status=dk status entity does not exist anymore) + ALERT("エンティティã¯ãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã¾ã™") + End case +``` + + + +## .save() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.save**( { *mode* : Integer } ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| -------------------------------- | +| mode | æ•´æ•° | -> | `dk auto merge`: 自動マージモードを有効化ã—ã¾ã™ | +| 戻り値 | オブジェクト | <- | ä¿å­˜ã®çµæžœ | + +#### 説明 + +The `.save()` function saves the changes made to the entity in the table related to its dataClass. エンティティを作æˆã—ãŸã‚ã¨ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦ä¿å­˜ã—ãŸã„変更をãŠã“ãªã£ãŸã‚ã¨ã«ã¯ã“ã®é–¢æ•°ã‚’呼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ä¿å­˜å‡¦ç†ã¯ã€å°‘ãªãã¨ã‚‚一ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ãŒ "touched" ã§ã‚ã‚‹ (æ›´æ–°ã•れã¦ã„ã‚‹) å ´åˆã«ã®ã¿å®Ÿè¡Œã•れã¾ã™ ([`.touched()`](#touched) ãŠã‚ˆã³ [`.touchedAttributes()`](#touchedattributes) 関数å‚ç…§)。 ãã†ã§ãªã„å ´åˆã€é–¢æ•°ã¯ä½•ã‚‚ã—ã¾ã›ã‚“ (トリガーã¯å‘¼ã³å‡ºã•れã¾ã›ã‚“)。 + +マルãƒãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ã‚ã‚‹ã„ã¯ãƒžãƒ«ãƒãƒ—ロセスアプリケーションã«ãŠã„ã¦ã€`.save()` 関数㯠["オプティミスティック・ロック"](ORDA/entities.md#entity-locking) 機構ã®ã‚‚ã¨ã§å®Ÿè¡Œã•れã¾ã™ã€‚ã“れã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒä¿å­˜ã•れるãŸã³ã«å†…部的ãªãƒ­ãƒƒã‚¯ã‚¹ã‚¿ãƒ³ãƒ—ãŒè‡ªå‹•çš„ã«å¢—分ã—ã¦ã„ãã¨ã„ã†æ©Ÿæ§‹ã§ã™ã€‚ + +*mode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€ã„ãšã‚Œã®å±žæ€§ã«é–¢ã‚らãšåŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä»–ã®ãƒ—ロセスã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã•れã¦ã„ãŸå ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ (以下å‚ç…§)。 + +*mode* ã« `dk auto merge` オプションを渡ã™ã¨è‡ªå‹•ãƒžãƒ¼ã‚¸ãƒ¢ãƒ¼ãƒ‰ãŒæœ‰åŠ¹åŒ–ã•れã€åˆ¥ã®ãƒ—ロセス/ユーザーãŒåŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦åŒæ™‚ã«å¤‰æ›´ã‚’ãŠã“ãªã£ã¦ã„ã¦ã‚‚ã€ç•°ãªã‚‹å±žæ€§ã«å¯¾ã™ã‚‹å¤‰æ›´ã§ã‚れã°ã‚¨ãƒ©ãƒ¼ã¯ç”Ÿæˆã•れã¾ã›ã‚“。 エンティティã«ä¿å­˜ã•れるデータã¯ã€åˆ¥ã€…ã®å¤‰æ›´å‡¦ç†ã®çµ„ã¿åˆã‚ã› ("マージ (ä½µåˆ)") ã«ãªã‚Šã¾ã™ (åŒã˜å±žæ€§ã«å¯¾ã—ã¦å¤‰æ›´ãŒãŠã“ãªã‚れãŸå ´åˆã«ã¯ã€è‡ªå‹•マージモードã§ã‚ã£ã¦ã‚‚ä¿å­˜ã¯å¤±æ•—ã—ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™)。 +> ピクãƒãƒ£ãƒ¼ãƒ»ã‚ªãƒ–ジェクト・テキスト型属性ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚’外部ä¿å­˜ã«ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€è‡ªå‹•マージモードã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 ã“れらã®å±žæ€§ã«åŒæ™‚ã®å¤‰æ›´ãŒã‚ã£ãŸå ´åˆã«ã¯ `dk status stamp has changed` エラーã«ãªã‚Šã¾ã™ã€‚ + +**戻り値** + +`.save()` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ------------ | ------------------ | ------------------- | ------------------------------------------------------------------------ | +| success | | boolean | ä¿å­˜ã«æˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| | | | ***`dk auto merge` オプションãŒä½¿ç”¨ã•れã¦ã„ãŸå ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½***: | +| autoMerged | | boolean | 自動マージãŒå®Ÿè¡Œã•れãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| | | | ***エラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½***: | +| status | | number | エラーコードã€[以下å‚ç…§](#status-ã¨-statustext) | +| statusText | | text | エラーã®è©³ç´°ã€[以下å‚ç…§](#status-ã¨-statustext) | +| | | | ***ペシミスティック・ロックエラーã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½***: | +| lockKindText | | text | "Locked by record" | +| lockInfo | | object | ロック元ã«ã¤ã„ã¦ã®æƒ…å ± | +| | task_id | number | プロセスID | +| | user_name | text | マシン上ã§ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼å | +| | user4d_alias | text | `SET USER ALIAS` ã§è¨­å®šã•れã¦ã„れã°ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ãれ以外㯠4Dディレクトリã®ãƒ¦ãƒ¼ã‚¶ãƒ¼å | +| | host_name | text | マシンå | +| | task_name | text | プロセスå | +| | client_version | text | | +| | | | ***深刻ãªã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½*** (深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ãƒ—ライマリーキーをé‡è¤‡ã•ã›ã‚ˆã†ã¨ã—ãŸã€ãƒ‡ã‚£ã‚¹ã‚¯ãŒã„ã£ã±ã„ã§ã‚ã£ãŸã€ãªã©ã§ã™): | +| errors | | Object ã® Collection | | +| | message | text | エラーメッセージ | +| | componentSignature | text | 内部コンãƒãƒ¼ãƒãƒ³ãƒˆç½²å (例 "dmbg" ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’表ã—ã¾ã™) | +| | errCode | number | エラーコード | + +##### status 㨠statusText + +エラー時ã«ã¯ Result オブジェクト㮠`status` ã‚ã‚‹ã„㯠`statusText` プロパティã«ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®å€¤ãŒè¿”ã•れã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------------------- | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status automerge failed` | 6 | (`dk auto merge` オプションãŒä½¿ç”¨ã•れãŸã¨ãã®ã¿) エンティティをä¿å­˜ã™ã‚‹ã¨ãã«è‡ªå‹•マージオプションãŒå¤±æ•—ã—ã¾ã—ãŸã€‚

        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "自動マージ失敗" | +| `dk status entity does not exist anymore` | 5 | エンティティã¯ã‚‚ã†ãƒ‡ãƒ¼ã‚¿å†…ã«å­˜åœ¨ã—ã¦ã„ã¾ã›ã‚“。 ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«èµ·ããˆã¾ã™:

      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã‚‹ (スタンプãŒå¤‰æ›´ã•れã¦ã„ã¦ã€ãƒ¡ãƒ¢ãƒªç©ºé–“ã¯è§£æ”¾ã•れã¦ã„ã‚‹)
      • エンティティãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã¦ã€ä»–ã®ãƒ—ライマリーキー値をæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ç½®ãæ›ãˆã‚‰ã‚Œã¦ã„ã‚‹ (スタンプã¯å¤‰æ›´ã•れã¦ã„ã¦ã€æ–°ã—ã„エンティティãŒãƒ¡ãƒ¢ãƒªç©ºé–“を使用ã—ã¦ã„ã‚‹)。 entity.drop( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk force drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ entity.lock( ) を使用ã™ã‚‹ã¨ãã€ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ dk reload drop if stamp changed オプションを使用ã—ãŸå ´åˆã«è¿”ã•れるã“ã¨ãŒã‚りã¾ã™ã€‚

      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "エンティティã¯ã‚‚ã†å­˜åœ¨ã—ã¾ã›ã‚“" | +| `dk status locked` | 3 | エンティティã¯ãƒšã‚·ãƒŸã‚¹ãƒ†ã‚£ãƒƒã‚¯ãƒ»ãƒ­ãƒƒã‚¯ã§ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚

        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "æ—¢ã«ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™" | +| `dk status serious error` | 4 | 深刻ãªã‚¨ãƒ©ãƒ¼ã¨ã¯ã€ä½Žãƒ¬ãƒ™ãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ©ãƒ¼ (例: é‡è¤‡ã‚­ãƒ¼)ã€ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚¨ãƒ©ãƒ¼ãªã©ã§ã™ã€‚

        **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "ãã®ä»–ã®ã‚¨ãƒ©ãƒ¼" | +| `dk status stamp has changed` | 2 | エンティティã®å†…部的ãªã‚¹ã‚¿ãƒ³ãƒ—値ãŒãƒ‡ãƒ¼ã‚¿å†…ã«ä¿å­˜ã•れã¦ã„るエンティティã®ã‚‚ã®ã¨åˆè‡´ã—ã¾ã›ã‚“ (オプティミスティック・ロック)。

      • entity.save( ) ã®å ´åˆ: dk auto merge オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.drop( ) ã®å ´åˆ: dk force drop if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼
      • entity.lock( ) ã®å ´åˆ: dk reload if stamp changed オプションãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã‚¨ãƒ©ãƒ¼

      • **割り当ã¦ã‚‰ã‚ŒãŸ statusText**: "スタンプãŒå¤‰æ›´ã•れã¦ã„ã¾ã™" | + + +#### 例題 1 + +æ–°ã—ã„エンティティを作æˆã—ã¾ã™: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + $employee:=ds.Employee.new() + $employee.firstName:="Mary" + $employee.lastName:="Smith" + $status:=$employee.save() + If($status.success) + ALERT("Employee ãŒä½œæˆã•れã¾ã—ãŸ") + End if +``` + +#### 例題 2 + +`dk auto merge` オプションを使ã‚ãšã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã—ã¾ã™: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save() + Case of + :($status.success) + ALERT("Employee ãŒæ›´æ–°ã•れã¾ã—ãŸ") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### 例題 3 + +`dk auto merge` オプションを使ã£ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã—ã¾ã™: + +```4d + var $status : Object + + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save(dk auto merge) + Case of + :($status.success) + ALERT("Employee ã‚’æ›´æ–°ã—ã¾ã—ãŸ") + :($status.status=dk status automerge failed) + ALERT($status.statusText) + End case +``` + + + + +## .toObject() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.toObject**() : Object
        **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
        **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object +| 引数 | タイプ | | 説明 | +| ------------ | ------ |:--:| --------------------------------------------------------------------------------------------- | +| filterString | テキスト | -> | å–å¾—ã™ã‚‹å±žæ€§ (カンマ区切り) | +| filterCol | コレクション | -> | å–å¾—ã™ã‚‹å±žæ€§ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| options | æ•´æ•° | -> | `dk with primary key`: \_\_KEY プロパティを追加;
        `dk with stamp`: \_\_STAMP プロパティを追加 | +| 戻り値 | オブジェクト | <- | エンティティを元ã«ãƒ“ルドã•れãŸã‚ªãƒ–ジェクト | + +#### 説明 + +The `.toObject()` function returns an object which has been built from the entity. オブジェクト内部ã®ãƒ—ロパティåã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§åã¨åˆè‡´ã—ã¾ã™ã€‚ + +*filterString* 引数ãŒç©ºã®æ–‡å­—列ã€ã‚ã‚‹ã„㯠"*" ã®å ´åˆã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ãŒè¿”ã•れã¾ã™: + +* ã™ã¹ã¦ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ +* リレートエンティティ型ã®å±žæ€§ ([kind](DataClassAttributeClass.md#kind) ㌠`relatedEntity`) : リレートエンティティã¨åŒã˜åå‰ (N対1リレーションå) ã®ãƒ—ロパティ。 属性ã¯å˜ç´”ãªå½¢å¼ã§å–å¾—ã•れã¾ã™ã€‚ +* リレートエンティティズ型ã®å±žæ€§ ([kind](DataClassAttributeClass.md#kind) ㌠`relatedEntities`): 属性ã¯è¿”ã•れã¾ã›ã‚“。 + + +最åˆã®å¼•æ•°ã¨ã—ã¦ã€å–å¾—ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã‚’渡ã—ã¾ã™ã€‚ 以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* *filterString*: プロパティパスをカンマã§åŒºåˆ‡ã£ãŸæ–‡å­—列: "propertyPath1, propertyPath2, ..." ã¾ãŸã¯ +* *filterCol*: 文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³: \["propertyPath1","propertyPath2";...] + +filter 引数ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ã®å±žæ€§ã‚’指定ã™ã‚‹å ´åˆ: + +* propertyPath = "relatedEntity" -> å˜ç´”ãªå½¢å¼ã§å–å¾—ã•れã¾ã™: \_\_KEY プロパティ(プライマリーキー) ã‚’æŒã¤ã‚ªãƒ–ジェクト +* propertyPath = "relatedEntity.*" -> 全プロパティãŒå–å¾—ã•れã¾ã™ +* propertyPath = "relatedEntity.propertyName1; relatedEntity.propertyName2; ..." -> 指定ã•れãŸãƒ—ロパティã®ã¿ãŒå–å¾—ã•れã¾ã™ + +filter 引数ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºåž‹ã®å±žæ€§ã‚’指定ã™ã‚‹å ´åˆ: + +* propertyPath = "relatedEntities.*" -> 全プロパティãŒå–å¾—ã•れã¾ã™ +* propertyPath = "relatedEntities.propertyName1; relatedEntities.propertyName2; ..." -> 指定ã•れãŸãƒ—ロパティã®ã¿ãŒå–å¾—ã•れã¾ã™ + +*options* ã« `dk with primary key` ã¾ãŸã¯ `dk with stamp` セレクターを渡ã™ã“ã¨ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ライマリーキー/スタンプをã€å–å¾—ã™ã‚‹ã‚ªãƒ–ジェクトã«è¿½åŠ ã™ã‚‹ã‹ã©ã†ã‹ã‚’指定ã§ãã¾ã™ã€‚ + + +#### 例題 1 + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ä¾‹é¡Œã§ã¯ã€ä»¥ä¸‹ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’使ã„ã¾ã™: + +![](assets/en/API/dataclassAttribute4.png) + + +filter 引数を渡ã•ãªã„å ´åˆ: + +```4d +employeeObject:=employeeSelected.toObject() +``` + +戻り値: + +```4d +{ + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { // å˜ç´”ãªå½¢å¼ã§å–å¾—ã•れãŸãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + + + +#### 例題 2 + +プライマリーキーã¨ã‚¹ã‚¿ãƒ³ãƒ—ã‚’å–å¾—ã—ã¾ã™: + +```4d +employeeObject:=employeeSelected.toObject("";dk with primary key+dk with stamp) +``` + +戻り値: + +```4d +{ + "__KEY": 413, + "__STAMP": 1, + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + +#### 例題 3 + +リレートエンティティズã®ãƒ—ロパティをã™ã¹ã¦å±•é–‹ã—ã¾ã™: + +```4d +employeeObject:=employeeSelected.toObject("directReports.*") +``` + +```4d +{ + "directReports": [ + { + "ID": 418, + "firstName": "Lorena", + "lastName": "Boothe", + "salary": 44800, + "birthDate": "1970-10-02T00:00:00.000Z", + "woman": true, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 419, + "firstName": "Drew", + "lastName": "Caudill", + "salary": 41000, + "birthDate": "2030-01-12T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 420, + "firstName": "Nathan", + "lastName": "Gomes", + "salary": 46300, + "birthDate": "2010-05-29T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + } + ] +} +``` + +#### 例題 4 + +リレートエンティティズã®ä¸€éƒ¨ã®ãƒ—ロパティをå–å¾—ã—ã¾ã™: + +```4d + employeeObject:=employeeSelected.toObject("firstName, directReports.lastName") +``` + +戻り値: + +```4d +{ + "firstName": "Greg", + "directReports": [ + { + "lastName": "Boothe" + }, + { + "lastName": "Caudill" + }, + { + "lastName": "Gomes" + } + ] +} +``` + +#### 例題 5 + +リレートエンティティをå˜ç´”ãªå½¢å¼ã§å–å¾—ã—ã¾ã™: + +```4d + $coll:=New collection("firstName";"employer") + employeeObject:=employeeSelected.toObject($coll) +``` + +戻り値: + +```4d +{ + "firstName": "Greg", + "employer": { + "__KEY": 20 + } +} +``` + +#### 例題 6 + +リレートエンティティã®å…¨ãƒ—ロパティをå–å¾—ã—ã¾ã™: + +```4d + employeeObject:=employeeSelected.toObject("employer.*") +``` + +戻り値: + +```4d +{ + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } +} +``` + +#### 例題 7 + +リレートエンティティã®ä¸€éƒ¨ã®ãƒ—ロパティをå–å¾—ã—ã¾ã™: + +```4d + $col:=New collection + $col.push("employer.name") + $col.push("employer.revenues") + employeeObject:=employeeSelected.toObject($col) +``` + +戻り値: + +```4d +{ + "employer": { + "name": "India Astral Secretary", + "revenues": 12000000 + } +} +``` + + + + +## .touched( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.touched()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ---------------------------------------------------- | +| 戻り値 | ブール | <- | å°‘ãªãã¨ã‚‚一ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ãŒç·¨é›†ã•れã¦ã„ã¦æœªä¿å­˜ã®å ´åˆã« trueã€ãれ以外ã®å ´åˆã«ã¯ false | + +#### 説明 + +The `.touched()` function tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved. + +å±žæ€§ãŒæ›´æ–°ã‚ã‚‹ã„ã¯è¨ˆç®—ã•れã¦ã„ãŸå ´åˆã€é–¢æ•°ã¯ true ã‚’è¿”ã—ã€ãれ以外㯠false ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€([`.new( )`](DataClassClass.md#new) ã§ä½œæˆã•れãŸ) æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦ã¯å¸¸ã« false ã‚’è¿”ã—ã¾ã™ã€‚ ãŸã ã—ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§ã‚’計算ã™ã‚‹é–¢æ•°ã‚’使用ã—ãŸå ´åˆã«ã¯ã€`.touched()` 関数㯠true ã‚’è¿”ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ—ライマリーキーを計算ã™ã‚‹ãŸã‚ã« [`.getKey()`](#getkey) を呼ã³å‡ºã—ãŸå ´åˆã€`.touched()` メソッド㯠true ã‚’è¿”ã—ã¾ã™ã€‚ + +#### 例題 + +エンティティをä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã©ã†ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™: + +```4d + var $emp : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName // åŒã˜å€¤ã§æ›´æ–°ã•れã¦ã‚‚ã€å±žæ€§ã¯å¤‰æ›´ã•れãŸã¨åˆ¤å®šã•れã¾ã™ + + If($emp.touched()) // 一ã¤ä»¥ä¸Šã®å±žæ€§ãŒå¤‰æ›´ã•れã¦ã„ãŸå ´åˆ + $emp.save() + End if // ãã†ã§ãªã„å ´åˆã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¿å­˜ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“ +``` + + + +## .touchedAttributes( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.touchedAttributes()** : Collection +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ----------------------- | +| 戻り値 | コレクション | <- | 変更ã•れãŸå±žæ€§ã®åå‰ã€ã‚ã‚‹ã„ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.touchedAttributes()` function returns the names of the attributes that have been modified since the entity was loaded into memory. + +ã“ã®é–¢æ•°ã¯ã€ç¨®é¡ž ([kind](DataClassAttributeClass.md#kind)) ㌠`storage` ã‚ã‚‹ã„㯠`relatedEntity` ã§ã‚る属性ã«é©ç”¨ã•れã¾ã™ã€‚ + +リレート先ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãã®ã‚‚ã®ãŒæ›´æ–°ã•れã¦ã„ãŸå ´åˆ (外部キーã®å¤‰æ›´)ã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®åç§°ã¨ãã®ãƒ—ライマリーキーåãŒè¿”ã•れã¾ã™ã€‚ + +エンティティ属性ãŒã„ãšã‚Œã‚‚æ›´æ–°ã•れã¦ã„ãªã‹ã£ãŸå ´åˆã€é–¢æ•°ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +#### 例題 1 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + + $touchedAttributes:=New collection + $emp:=ds.Employee.get(725) + $emp.firstName:=$emp.firstName // åŒã˜ã§å€¤ã§æ›´æ–°ã•れã¦ã„ã¦ã‚‚ã€å±žæ€§ã¯å¤‰æ›´ã•れãŸã¨åˆ¤å®šã•れã¾ã™ + $emp.lastName:="Martin" + $touchedAttributes:=$emp.touchedAttributes() + //$touchedAttributes: ["firstName","lastName"] +``` + + +#### 例題 2 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + var $company : cs.CompanyEntity + + $touchedAttributes:=New collection + + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName + $emp.lastName:="Martin" + + $company:=ds.Company.get(121) + $emp.employer:=$company + + $touchedAttributes:=$emp.touchedAttributes() + + // $touchedAttributes コレクション: ["firstName","lastName","employer","employerID"] +``` + +ã“ã®å ´åˆã«ãŠã„ã¦: + +* firstName ãŠã‚ˆã³ lastName ã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸ (`storage`) åž‹ã§ã™ +* employer ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ (`relatedEntity`) åž‹ã§ã™ +* employerID ã¯ã€employer リレートエンティティã®å¤–部キーã§ã™ + + + +## .unlock() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.unlock()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ----------- | +| 戻り値 | オブジェクト | <- | ステータスオブジェクト | + +#### 説明 + +The `.unlock()` function removes the pessimistic lock on the record matching the entity in the datastore and table related to its dataclass. + +> 詳細ã«ã¤ã„ã¦ã¯ [エンティティロッキング](ORDA/entities.md#エンティティロッキング) ã‚’å‚ç…§ãã ã•ã„。 + +ロックã—ã¦ã„るプロセス内ã®ã©ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰ã‚‚レコードãŒå‚ç…§ã•れãªããªã£ãŸå ´åˆã€è‡ªå‹•çš„ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒ­ãƒƒã‚¯ãŒè§£é™¤ã•れã¾ã™ (ãŸã¨ãˆã°ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ­ãƒ¼ã‚«ãƒ«å‚ç…§ã«å¯¾ã—ã¦ã®ã¿ãƒ­ãƒƒã‚¯ãŒã‹ã‹ã£ã¦ã„ãŸå ´åˆã€ãƒ—ロセスãŒçµ‚了ã™ã‚Œã°ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŠã‚ˆã³ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã¾ã™)。 +> レコードãŒãƒ­ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ãƒ­ãƒƒã‚¯ã—ã¦ã„るプロセスã‹ã‚‰ã€ãƒ­ãƒƒã‚¯ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚ç…§ã«å¯¾ã—ã¦ãƒ­ãƒƒã‚¯ã‚’解除ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: ãŸã¨ãˆã°: + +```4d + $e1:=ds.Emp.all()[0] + $e2:=ds.Emp.all()[0] + $res:=$e1.lock() //$res.success=true + $res:=$e2.unlock() //$res.success=false + $res:=$e1.unlock() //$res.success=true +``` + +**戻り値** + +`.unlock()` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------- | --- | -------------------------------------------------------------------------------------------------------------------------------------- | +| success | ブール | ãƒ­ãƒƒã‚¯è§£é™¤ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false ドロップã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚„ã€ãƒ­ãƒƒã‚¯ã•れã¦ãªã„レコードã€ã‚ã‚‹ã„ã¯ä»–ã®ãƒ—ロセスや他ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã‚ˆã£ã¦ãƒ­ãƒƒã‚¯ã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã«å¯¾ã—ã¦ãƒ­ãƒƒã‚¯è§£é™¤ã‚’実行ã—ãŸå ´åˆã€success ã«ã¯ false ãŒè¿”ã•れã¾ã™ã€‚ | + +#### 例題 + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + + $employee:=ds.Employee.get(725) + $status:=$employee.lock() + ... // å‡¦ç† + $status:=$employee.unlock() + If($status.success) + ALERT("エンティティã®ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã¾ã—ãŸã€‚") + End if +``` + + + + + diff --git a/website/translated_docs/ja/API/EntitySelectionClass.md b/website/translated_docs/ja/API/EntitySelectionClass.md new file mode 100644 index 00000000000000..4288a7806a26d3 --- /dev/null +++ b/website/translated_docs/ja/API/EntitySelectionClass.md @@ -0,0 +1,2221 @@ +--- +id: EntitySelectionClass +title: EntitySelection +--- + + +エンティティセレクションã¨ã¯ã€åŒã˜ [データクラス](ORDA/dsMapping.md#データクラス) ã«æ‰€å±žã™ã‚‹ä¸€ã¤ä»¥ä¸Šã® [エンティティ](ORDA/dsMapping.md#エンティティ) ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„るオブジェクトã®ã“ã¨ã§ã™ã€‚ エンティティセレクションã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‹ã‚‰ 0個ã€1個ã€ã‚ã‚‹ã„㯠X個ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (X ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ ¼ç´ã•れã¦ã„るエンティティã®ç·æ•°ã§ã™)。 + +[`.all()`](DataClassClass.md#all)ã€[`.query()`](DataClassClass.md#query) ãªã©ã® [`DataClass` クラス](DataClassClass.md) ã®é–¢æ•°ã‚„ã€[`.and()`](#and)ã€[`orderBy()`](#orderby) ãªã© `EntitySelectionClass` クラス自身ã®é–¢æ•°ã‚’用ã„ã¦ã€æ—¢å­˜ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ 。 ã¾ãŸã€[`dataClass.newSelection()`](DataClassClass.md#newselection) 関数ã¾ãŸã¯ [`Create entity selection`](#create-new-selection) コマンドを使用ã—ã¦ã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### æ¦‚è¦ + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [***[index]*** : 4D.Entity](#91index93)

            allows you to access entities within the entity selection using the standard collection syntax | +| [***.attributeName*** : Collection
        ***.attributeName*** : 4D.EntitySelection](#attributename)

            a "projection" of values for the attribute in the entity selection | +| [**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection](#add)

            adds the specified *entity* to the entity selection and returns the modified entity selection | +| [**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#and)

            combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator | +| [**.average**( *attributePath* : Text ) : Real](#average)

            returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection | +| [**.contains**( *entity* : 4D.Entity ) : Boolean](#contains)

            returns true if entity reference belongs to the entity selection | +| [**.count**( *attributePath* : Text ) : Real](#count)

            returns the number of entities in the entity selection with a non-null value in *attributePath* | +| [**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection](#distinct)

            returns a collection containing only distinct (different) values from the *attributePath* in the entity selection | +| [**.drop**( { *mode* : Integer } ) : 4D.EntitySelection](#drop)

            removes the entities belonging to the entity selection from the table related to its dataclass within the datastore | +| [**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
        **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection](#extract)

            returns a collection containing *attributePath* values extracted from the entity selection | +| [**.first()** : 4D.Entity](#first)

            returns a reference to the entity in the first position of the entity selection | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

            returns the dataclass of the entity selection | +| [**.isAlterable()** : Boolean](#isalterable)

            returns True if the entity selection is alterable | +| [**.isOrdered()** : Boolean](#isordered)

            returns True if the entity selection is ordered | +| [**.last()** : 4D.Entity](#last)

            returns a reference to the entity in last position of the entity selection | +| [**.length** : Integer](#length)

            returns the number of entities in the entity selection | +| [**.max**( *attributePath* : Text ) : any](#max)

            returns the highest (or maximum) value among all the values of *attributePath* in the entity selection | +| [**.min**( *attributePath* : Text ) : any](#min)

             returns the lowest (or minimum) value among all the values of attributePath in the entity selection | +| [**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#minus)

            excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection | +| [**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#or)

            combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator | +| [**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
        **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection](#orderby)

            returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria | +| [**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
        **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection](#orderbyformula)

            returns a new, ordered entity selection | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
        **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection](#query)

            searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection | +| [**.queryPath** : Text](#querypath)

            contains a detailed description of the query as it was actually performed by 4D | +| [**.queryPlan** : Text](#queryplan)

             contains a detailed description of the query just before it is executed (i.e., the planned query) | +| [**.refresh()**](#refresh)

            immediately "invalidates" the entity selection data in the local ORDA cache | +| [**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object](#selected)

            returns an object describing the position(s) of *selectedEntities* in the original entity selection | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection](#slice)

            returns a portion of an entity selection into a new entity selection | +| [**.sum**( *attributePath* : Text ) : Real](#sum)

            returns the sum for all *attributePath* values in the entity selection | +| [**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
        **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
        **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*](#tocollection)

            creates and returns a collection where each element is an object containing a set of properties and values | + + + +## Create entity selection + +**Create entity selection** ( *dsTable* : Table { ; *settings* : Object } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| -------- | ------------------ |:--:| --------------------------------------------- | +| dsTable | テーブル | -> | エンティティセレクションã®å…ƒã¨ãªã‚‹ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå±žã™ã‚‹ 4Dデータベースã®ãƒ†ãƒ¼ãƒ–ル | +| settings | オブジェクト | -> | ビルドオプション: context | +| 戻り値 | 4D.EntitySelection | <- | 指定ã—ãŸãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +`Create entity selection` コマンドã¯ã€*dsTable* ã§æŒ‡å®šã—ãŸãƒ†ãƒ¼ãƒ–ルã«å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã® [追加å¯èƒ½ãª](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã€åŒãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«åŸºã¥ã„ã¦ãƒ“ルドã—ã¦è¿”ã—ã¾ã™ã€‚ + +ソートã•れãŸã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆã€[順列ã®ã‚ã‚‹](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) エンティティセレクションãŒä½œæˆã•れã¾ã™ (カレントセレクションã®ä¸¦ã³é †ãŒå—ã‘ç¶™ãŒã‚Œã¾ã™)。 カレントセレクションãŒã‚½ãƒ¼ãƒˆã•れã¦ã„ãªã„å ´åˆã€é †åˆ—ã®ãªã„エンティティセレクションãŒä½œæˆã•れã¾ã™ã€‚ + +[`ds`](API/DataStoreClass.md#ds) ã«ãŠã„㦠*dsTable* ãŒå…¬é–‹ã•れã¦ã„ãªã„å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ リモートデータストアã®å ´åˆã¯ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +ä»»æ„ã® *settings* ã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを渡ã›ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------- | ---- | ----------------------------------------------------------------------- | +| context | Text | エンティティセレクションã«é©ç”¨ã•れã¦ã„ã‚‹ [最é©åŒ–コンテキスト](ORDA/entities.md#クライアントサーãƒãƒ¼ã®æœ€é©åŒ–) ã®ãƒ©ãƒ™ãƒ«ã€‚ | + + +#### 例題 + +```4d +var $employees : cs.EmployeeSelection +ALL RECORDS([Employee]) +$employees:=Create entity selection([Employee]) +// $employees エンティティセレクションã«ã¯ã€ +// Employee データクラスã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ +``` + +#### å‚ç…§ + +[`dataClass.newSelection()`](DataClassClass.md#newselection) + +## [*index*] + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +***[index]*** : 4D.Entity + +#### 説明 + +The `EntitySelection[index]` notation allows you to access entities within the entity selection using the standard collection syntax: pass the position of the entity you want to get in the *index* parameter. + +対応ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‹ã‚‰å†èª­ã¿è¾¼ã¿ã•ã‚Œã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +*index* ã«ã¯ã€0 㨠`.length`-1 ã®ç¯„å›²å†…ã§æ•°å€¤ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* *index* ãŒç¯„囲外ã ã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ +* *index* ãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾å¿œã—ã¦ã„ãŸå ´åˆã€Null値ãŒè¿”ã•れã¾ã™ã€‚ +> **警告**: `EntitySelection[index]` ã¯ä»£å…¥ä¸å¯ã®å¼ã§ã™ã€‚ã“れã¯ã€[`.lock()`](EntityClass.md#lock) ã‚„ [`.save()`](EntityClass.md#save) ãªã©ã®é–¢æ•°ã«ãŠã„ã¦ã€ç·¨é›†å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚ç…§ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ããªã„ã€ã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ エンティティをæ“作ã™ã‚‹ã«ã¯ã€æˆ»ã‚Šå€¤ã‚’変数ãªã©ã®ä»£å…¥å¯èƒ½ãªå¼ã«å‰²ã‚Šå½“ã¦ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 例: + +```4d + $sel:=ds.Employee.all() // ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä½œæˆ + // 無効ãªã‚³ãƒ¼ãƒ‰: +$result:=$sel[0].lock() //動作ã—ã¾ã›ã‚“ + $sel[0].lastName:="Smith" //動作ã—ã¾ã›ã‚“ + $result:=$sel[0].save() //動作ã—ã¾ã›ã‚“ + // 有効ãªã‚³ãƒ¼ãƒ‰: + $entity:=$sel[0] //OK + $entity.lastName:="Smith" //OK + $entity.save() //OK +``` + +#### 例題 + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + $employee:=$employees[2] // $employees エンティティセレクションã®3番目ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒªãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ +``` + + + + + +## .*attributeName* + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +***.attributeName*** : Collection
        ***.attributeName*** : 4D.EntitySelection + +#### 説明 + +Any dataclass attribute can be used as a property of an entity selection to return a "projection" of values for the attribute in the entity selection. 戻り値ã¯ã€å±žæ€§ã®ç¨®é¡ž ([kind](DataClassAttributeClass.md#kind) ㌠`storage` ã‚ã‚‹ã„㯠`relation`) ã«ã‚ˆã£ã¦ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ã‚‹ã„ã¯æ–°ã—ã„エンティティセレクションã®ã©ã¡ã‚‰ã‹ã«ãªã‚Šã¾ã™ã€‚ + +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸åž‹ã®å ´åˆ: `.attributeName`㯠*attributeName* ã¨åŒã˜åž‹ã®å€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ã®å ´åˆ: `.attributeName` 㯠*attributeName* ã¨åŒã˜åž‹ã®ãƒªãƒ¬ãƒ¼ãƒˆå€¤ã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ é‡è¤‡ã—ã¦ã„るエンティティã¯å–り除ã‹ã‚Œã¾ã™ (è¿”ã•れるã®ã¯é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™)。 +* *attributeName* ã§æŒ‡å®šã—ãŸå±žæ€§ãŒãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºåž‹ã®å ´åˆ: `.attributeName` 㯠*attributeName* ã¨åŒã˜åž‹ã®ãƒªãƒ¬ãƒ¼ãƒˆå€¤ã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ é‡è¤‡ã—ã¦ã„るエンティティã¯å–り除ã‹ã‚Œã¾ã™ (è¿”ã•れるã®ã¯é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™)。 + + +エンティティセレクションã®ãƒ—ロパティã¨ã—ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ãŒä½¿ç”¨ã•れるã¨ã€è¿”ã•ã‚Œã‚‹çµæžœã¯ã€ãŸã¨ãˆè¿”ã•れるエンティティãŒä¸€ã¤ã ã‘ã ã¨ã—ã¦ã‚‚ã€å¸¸ã«æ–°ã—ã„エンティティセレクションã¨ãªã‚Šã¾ã™ã€‚ エンティティãŒä½•ã‚‚è¿”ã£ã¦ã“ãªã„å ´åˆã«ã¯ã€è¿”ã•れるã®ã¯ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + +属性ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã«å­˜åœ¨ã—ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + + + + + +#### 例題 1 + +ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å€¤ã®æŠ•å½±: + + +```4d + var $firstNames : Collection + $entitySelection:=ds.Employee.all() + $firstNames:=$entitySelection.firstName // firstName ã¯æ–‡å­—列型ã§ã™ +``` + +è¿”ã•れるã®ã¯æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ãªã‚Šã¾ã™ã€‚例: + +```4d +[ + "Joanna", + "Alexandra", + "Rick" +] +``` + +#### 例題 2 + +ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æŠ•å½±: + +```4d + var $es; $entitySelection : cs.EmployeeSelection + $entitySelection:=ds.Employee.all() + $es:=$entitySelection.employer // employer 㯠Companyデータクラスã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã¾ã™ +``` + +è¿”ã•れるオブジェクトã¯ã€é‡è¤‡ã—ã¦ã‚‹ã‚‚ã® (ã‚れã°) ã‚’å–り除ã„ãŸã€Company ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + +#### 例題 3 + +ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºã®æŠ•å½±: + +```4d + var $es : cs.EmployeeSelection + $es:=ds.Employee.all().directReports // directReports 㯠Employee データクラスã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã¾ã™ +``` + +è¿”ã•れるオブジェクトã¯ã€é‡è¤‡ã—ã¦ã‚‹ã‚‚ã® (ã‚れã°) ã‚’å–り除ã„ãŸã€Employee ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + + + + + +## .add() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------ | +| v18 R5 | 追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã¿ã‚’サãƒãƒ¼ãƒˆ | +| v17 | 追加 | +
        + + +**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| ----------------------- | +| entity | 4D.Entity | -> | エンティティセレクションã«è¿½åŠ ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| 戻り値 | 4D.EntitySelection | -> | 追加エンティティをå«ã‚€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.add()` function adds the specified *entity* to the entity selection and returns the modified entity selection. +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã™ã€‚ + +**警告:** エンティティセレクション㯠*追加å¯èƒ½* ã®ã‚‚ã®ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã¤ã¾ã‚Š [`.newSelection()`](DataClassClass.md#newselection) ã‚ã‚‹ã„㯠`Create entity selection` ãªã©ã§ä½œæˆã•れãŸã‚‚ã®ã§ãªã‘れã°ãªã‚‰ãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ãã†ã§ãªã„å ´åˆã€`.add()` ã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®è¿½åŠ ã‚’å—ã‘付ã‘ãªã„ã‹ã‚‰ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‚’å‚ç…§ãã ã•ã„。 + + +* エンティティセレクションãŒé †åˆ—ã‚りã®å ´åˆã€*entity* 引数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã«è¿½åŠ ã•れã¾ã™ã€‚ åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ãŒãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã™ã§ã«æ‰€å±žã—ã¦ã„ãŸå ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯é‡è¤‡ã™ã‚‹ã“ã¨ã«ãªã‚Šã€åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ–°ã—ã„å‚ç…§ãŒè¿½åŠ ã•れã¾ã™ã€‚ +* エンティティセレクションãŒé †åˆ—ãªã—ã®å ´åˆã€*entity* 引数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ä¸ç‰¹å®šã®å ´æ‰€ã¸è¿½åŠ ã•れã€é †ç•ªä»˜ã‘ã¯ã•れã¾ã›ã‚“。 +> 詳細ã«ã¤ã„ã¦ã¯ã€[エンティティセレクションã®é †åˆ—ã‚り/順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) ã‚’å‚ç…§ãã ã•ã„。 + +編集ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒé–¢æ•°ã‹ã‚‰è¿”ã•れるãŸã‚ã€é–¢æ•°ã®å‘¼ã³å‡ºã—ã‚’ã¤ãªã’ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +*entity* 引数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å±žã—ã¦ã„ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ 追加ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒ Null ã§ã‚ã£ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 + +#### 例題 1 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"S@") // 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ + $employee:=ds.Employee.new() + $employee.lastName:="Smith" + $employee.save() + $employees:=$employees.copy() // 追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ + $employees.add($employee) // $employee エンティティ㌠$employees エンティティセレクションã¸ã¨è¿½åŠ ã•れã¾ã™ +``` + +#### 例題 2 + +関数ã®å‘¼ã³å‡ºã—ã‚’ã¤ãªã„ã§ã„ãã“ã¨ãŒã§ãã¾ã™: + +```4d + var $sel : cs.ProductSelection + var $p1;$p2;$p3 : cs.ProductEntity + + $p1:=ds.Product.get(10) + $p2:=ds.Product.get(11) + $p3:=ds.Product.get(12) + $sel:=ds.Product.query("ID > 50") + $sel:=$sel.copy() + $sel:=$sel.add($p1).add($p2).add($p3) +``` + + + +## .and() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | +
        + +**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + +| 引数 | タイプ | | 説明 | +| --------------- | ------------------ |:--:| -------------------------------------- | +| entity | 4D.Entity | -> | 交差ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| entitySelection | 4D.EntitySelection | -> | 交差ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | 4D.EntitySelection | <- | ANDè«–ç†æ¼”ç®—å­ã«ã‚ˆã‚‹å…±é€šéƒ¨åˆ†ã®çµæžœã‚’æ ¼ç´ã™ã‚‹æ–°ã—ã„エンティティセレクション | + + +#### 説明 + +The `.and()` function combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator; it returns a new, unordered entity selection that contains only the entities that are referenced in both the entity selection and the parameter. + +* *entity* 引数を渡ã—ãŸå ´åˆã€å¼•æ•°ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’エンティティセレクションã¨çµåˆã•ã›ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ エンティティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å±žã—ã¦ã„ã‚‹å ´åˆã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã¿ã‚’æ ¼ç´ã™ã‚‹æ–°ã—ã„エンティティセレクションãŒè¿”ã•れã¾ã™ã€‚ ãã†ã§ãªã„å ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ +* *entitySelection* 引数を渡ã—ãŸå ´åˆã€äºŒã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’çµåˆã•ã›ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ 両方ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰å‚ç…§ã•れã¦ã„るエンティティã®ã¿ã‚’æ ¼ç´ã™ã‚‹æ–°ã—ã„エンティティセレクションãŒè¿”ã•れã¾ã™ã€‚ é‡è¤‡ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãªã‹ã£ãŸå ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ +> [順列ã‚りã¨é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) を比較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ è¿”ã•れるセレクションã¯å¸¸ã«é †åˆ—ãªã—ã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ã‚‹ã„㯠*entitySelection* 引数ãŒç©ºã§ã‚ã£ãŸå ´åˆã€ã‚ã‚‹ã„ã¯*entity* 引数㌠Null ã§ã‚ã£ãŸå ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŠã‚ˆã³å¼•æ•°ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚‚ã®ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + +#### 例題 1 + + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + // $employees エンティティセレクションã«ã¯ã€ä¸»ã‚­ãƒ¼710ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ + // ãã®ä»–ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå«ã¾ã‚Œã¾ã™ + // 例: "Colin Hetrick" / "Grady Harness" / "Sherlock Holmes" (主キー710) + $employee:=ds.Employee.get(710) // "Sherlock Holmes" ã‚’è¿”ã—ã¾ã™ + + $result:=$employees.and($employee) // $result ã¯ä¸»ã‚­ãƒ¼710 ("Sherlock Holmes") ã® + // エンティティã®ã¿ã‚’æ ¼ç´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ +``` + + +#### 例題 2 + +"Jones" ã¨ã„ã†åå‰ã§ã€New York ã«ä½ã‚“ã§ã„る従業員ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2) +``` + + + +## .average() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------------------------- | +| v18 R6 | エンティティセレクションãŒç©ºã®å ´åˆã«ã¯ undefined ã‚’è¿”ã—ã¾ã™ | +| v17 | 追加 | + +
        + +**.average**( *attributePath* : Text ) : Real +| 引数 | タイプ | | 説明 | +| ------------- | ---- |:--:| ------------------------------------------------------------- | +| attributePath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹å±žæ€§ãƒ‘ス | +| 戻り値 | 実数 | <- | エンティティã®å±žæ€§å€¤ã®ç®—è¡“å¹³å‡ (相加平å‡) (エンティティセレクションãŒã‹ã‚‰ã®å ´åˆã«ã¯ undefined ã‚’è¿”ã—ã¾ã™) | + +#### 説明 + +The `.average()` function returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection. + +*attributePath* 引数ã¨ã—ã¦ã€è©•価ã™ã‚‹å±žæ€§ãƒ‘スを渡ã—ã¾ã™ã€‚ + +計算ã®å¯¾è±¡ã¨ãªã‚‹ã®ã¯æ•°å€¤ã®ã¿ã§ã™ã€‚ ãŸã ã—ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® *attributePath* å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ‘スã«ç•°ãªã‚‹åž‹ã®å€¤ãŒæ··åœ¨ã—ã¦ã„ã‚‹å ´åˆã€`.average()` ã¯ã™ã¹ã¦ã®ã‚¹ã‚«ãƒ©ãƒ¼è¦ç´ ã‚’対象ã¨ã—ã¦å¹³å‡å€¤ã‚’算出ã—ã¾ã™ã€‚ +> æ—¥ä»˜å€¤ã¯æ•°å€¤ (ç§’æ•°) ã«å¤‰æ›ã•れã€å¹³å‡ã‚’計算ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +エンティティセレクションãŒç©ºã®å ´åˆã€ã¾ãŸã¯ *attributePath* å¼•æ•°ã«æ•°å€¤åž‹ã®å€¤ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã«ã¯ã€`.average()` 㯠**undefined** ã‚’è¿”ã—ã¾ã™ã€‚ + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„属性を指定ã—ã¦ã„ã‚‹å ´åˆã€‚ + + +#### 例題 + +給与ãŒå¹³å‡ã‚ˆã‚Šé«˜ã„従業員ã®ä¸€è¦§ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $averageSalary : Real + var $moreThanAv : cs.EmployeeSelection + $averageSalary:=ds.Employee.all().average("salary") + $moreThanAv:=ds.Employee.query("salary > :1";$averageSalary) +``` + + + + +## .contains() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.contains**( *entity* : 4D.Entity ) : Boolean +| 引数 | タイプ | | 説明 | +| ------ | --------- |:--:| ------------------------------------------------- | +| entity | 4D.Entity | -> | 評価ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| 戻り値 | ブール | <- | エンティティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å±žã—ã¦ã„ã‚‹å ´åˆã«ã¯ trueã€ãã†ã§ãªã„å ´åˆã¯ false | + +#### 説明 + +The `.contains()` function returns true if entity reference belongs to the entity selection, and false otherwise. + +*entity* 引数ã¨ã—ã¦ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã§æ¤œç´¢ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’渡ã—ã¾ã™ã€‚ エンティティ㌠Null ã®å ´åˆã€é–¢æ•°ã¯ false ã‚’è¿”ã—ã¾ã™ã€‚ + +*entity* 引数ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚‚ã®ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +#### 例題 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName=:1";"H@") + $employee:=ds.Employee.get(610) + + If($employees.contains($employee)) + ALERT("主キー610ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ©ã‚¹ãƒˆãƒãƒ¼ãƒ ã¯ H ã§å§‹ã¾ã‚Šã¾ã™ã€‚") + Else + ALERT("主キー610ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ©ã‚¹ãƒˆãƒãƒ¼ãƒ ã¯ H ã§å§‹ã¾ã‚Šã¾ã›ã‚“。") + End if +``` + + + + +## .count() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.count**( *attributePath* : Text ) : Real +| 引数 | タイプ | | 説明 | +| ------------- | ---- |:--:| --------------------------------------------- | +| attributePath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹å±žæ€§ãƒ‘ス | +| 戻り値 | 実数 | <- | エンティティセレクション内㮠*attributePath* ㌠null ã§ãªã„値ã®å€‹æ•° | + +#### 説明 + +The `.count()` function returns the number of entities in the entity selection with a non-null value in *attributePath*. +> 対象ã¨ãªã‚‹ã®ã¯ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã®ã¿ã§ã™ã€‚ オブジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®å€¤ã¯ Null値ã¨ã¿ãªã•れã¾ã™ã€‚ + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„å ´åˆã€‚ + +#### 例題 + +ã‚る会社ã®å…¨å¾“業員ã®ã†ã¡ã€å½¹è·ã®ãªã„者を除ã„ãŸäººæ•°ã‚’確èªã—ã¾ã™: + +```4d + var $sel : cs.EmployeeSelection + var $count : Real + + $sel:=ds.Employee.query("employer = :1";"Acme, Inc") + $count:=$sel.count("jobtitle") +``` + + + +## .copy() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | + +
        + +**.copy**( { *option* : Integer } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ----- | ------------------ |:--:| ----------------------------------- | +| オプション | æ•´æ•° | -> | `ck shared`: 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ | +| 戻り値 | 4D.EntitySelection | <- | エンティティセレクションã®ã‚³ãƒ”ー | + +#### 説明 + +The `.copy()` function returns a copy of the original entity selection. + +> ã“ã®é–¢æ•°ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*option* パラメーターãŒçœç•¥ã•れãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€ãŸã¨ãˆã‚³ãƒ”ー元ãŒå…±æœ‰å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸã¨ã—ã¦ã‚‚ã€é–¢æ•°ã¯ãƒ‡ãƒ•ォルトã§è¿½åŠ å¯èƒ½ãª (共有ä¸å¯ã®) æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã™ã‚‹ã«ã¯ã€*option* ã« `ck shared` 定数を渡ã—ã¾ã™ã€‚ + +> 詳細ã«ã¤ã„ã¦ã¯ [共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‚’å‚ç…§ãã ã•ã„。 + +#### 例題 + +フォームロード時ã«ã€å•†å“データを格ç´ã™ã‚‹ãŸã‚ã®æ–°è¦ã®ç©ºã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™: + +```4d + Case of + :(Form event code=On Load) + Form.products:=ds.Products.newSelection() + End case + +``` + +ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å•†å“を登録ã—ãŸã®ã¡ã«ã€è¤‡æ•°ã®ãƒ—ロセスã§ã“ã®å•†å“データを共有ã™ã‚‹ã«ã¯ã€ Form.products を共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦ã‚³ãƒ”ーã—ã¾ã™: + +```4d + ... + // Form.products エンティティセレクションã«å•†å“データを登録ã—ã¾ã™ + Form.products.add(Form.selectedProduct) + + Use(Storage) + If(Storage.products=Null) + Storage.products:=New shared object() + End if + + Use(Storage.products) + Storage.products:=Form.products.copy(ck shared) + End use + End use +``` + + + +## .distinct() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| ------------- | ------ |:--:| -------------------------------------------------------- | +| attributePath | テキスト | -> | é‡è¤‡ã—ãªã„値をå–å¾—ã™ã‚‹å±žæ€§ã®ãƒ‘ス | +| オプション | æ•´æ•° | -> | `dk diacritical`: アクセント等ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãªã„評価 (ãŸã¨ãˆã° "A" # "a") | +| 戻り値 | コレクション | <- | é‡è¤‡ã—ãªã„値ã®ã¿ã‚’æ ¼ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.distinct()` function returns a collection containing only distinct (different) values from the *attributePath* in the entity selection. + +è¿”ã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ **Null** 値ã¯è¿”ã•れã¾ã›ã‚“。 + +*attributePath* 引数ã¨ã—ã¦ã€å›ºæœ‰ã®å€¤ã‚’å–å¾—ã—ãŸã„エンティティ属性を渡ã—ã¾ã™ã€‚ スカラー値 (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ãƒ–ールã€ã‚ã‚‹ã„ã¯æ—¥ä»˜) ã®ã¿ãŒå¯èƒ½ã§ã™ã€‚ *attributePath* ã®ãƒ‘スãŒç•°ãªã‚‹åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„るオブジェクトプロパティã§ã‚ã£ãŸå ´åˆã€ã¾ãšæœ€åˆã«åž‹ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—分ã‘ã•れã€ãã®ã‚ã¨ã§ä¸¦ã¹æ›¿ãˆã•れã¾ã™ã€‚ åž‹ã¯ä»¥ä¸‹ã®é †ç•ªã§è¿”ã•れã¾ã™: + +1. ブール +2. 文字列 +3. 数値 +4. 日付 + +*attributePath* ãŒã‚ªãƒ–ジェクト内ã®ãƒ‘スã®å ´åˆã€`[]` を使ã£ã¦ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã§ãã¾ã™ (例題å‚ç…§)。 + +デフォルトã§ã¯ã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆç­‰ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã‚’無視ã—ãŸè©•価ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 評価ã®éš›ã«æ–‡å­—ã®å¤§å°ã‚’区別ã—ãŸã‚Šã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆè¨˜å·ã‚’区別ã—ãŸã„å ´åˆã«ã¯ã€*option* ã« `dk diacritical` 定数を渡ã—ã¾ã™ã€‚ + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„å ´åˆã€‚ + +#### 例題 + +国åã”ã¨ã«é‡è¤‡ã—ãªã„è¦ç´ ã‚’æ ¼ç´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $countries : Collection + $countries:=ds.Employee.all().distinct("address.country") +``` + +`extra` ãŒã‚ªãƒ–ジェクト属性ã§ã€`nicknames` ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆ: + +```4d +$values:=ds.Employee.all().distinct("extra.nicknames[].first") +``` + + + + +## .drop() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.drop**( { *mode* : Integer } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ---- | ------------------ |:--:| ------------------------------------------------------------- | +| mode | æ•´æ•° | -> | `dk stop dropping on first error`: 最åˆã®ãƒ‰ãƒ­ãƒƒãƒ—ä¸å¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§å®Ÿè¡Œã‚’æ­¢ã‚ã¾ã™ | +| 戻り値 | 4D.EntitySelection | <- | æˆåŠŸã—ãŸå ´åˆã«ã¯ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ãã†ã§ãªã„å ´åˆã«ã¯ãƒ‰ãƒ­ãƒƒãƒ—ä¸å¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.drop()` function removes the entities belonging to the entity selection from the table related to its dataclass within the datastore. エンティティセレクションã¯ãƒ¡ãƒ¢ãƒªå†…ã«æ®‹ã‚Šã¾ã™ã€‚ +> エンティティã®å‰Šé™¤ã¯æ’ä¹…çš„ãªã‚‚ã®ã§ã‚りã€å–り消ã—ã¯ã§ãã¾ã›ã‚“。 ロールãƒãƒƒã‚¯ã§æˆ»ã™ã“ã¨ãŒã§ãるよã†ã«ã€ã“ã®é–¢æ•°ã¯ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã§å‘¼ã³å‡ºã™ã“ã¨ãŒæŽ¨å¥¨ã•れã¦ã„ã¾ã™ã€‚ + +`.drop()` ã®å®Ÿè¡Œä¸­ã«ãƒ­ãƒƒã‚¯ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«é­é‡ã—ãŸå ´åˆã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯å‰Šé™¤ã•れã¾ã›ã‚“。 デフォルトã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’処ç†ã—ã€ãƒ‰ãƒ­ãƒƒãƒ—ä¸å¯ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã«è¿”ã—ã¾ã™ã€‚ 最åˆã®ãƒ‰ãƒ­ãƒƒãƒ—ä¸å¯ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«é­é‡ã—ãŸæ™‚点ã§ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œã‚’æ­¢ã‚ãŸã„å ´åˆã¯ã€*mode* パラメーター㫠`dk stop dropping on first error` 定数を渡ã—ã¾ã™ã€‚ + +#### 例題 + +`dk stop dropping on first error` オプションを使用ã—ãªã„例: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop() // $notDropped ã¯å‰Šé™¤ã•れãªã‹ã£ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ã™ã¹ã¦æ ¼ç´ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ + If($notDropped.length=0) // å‰Šé™¤ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒæˆåŠŸã—ã€ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå‰Šé™¤ã•れãŸå ´åˆ + ALERT(String($employees.length)+" ä»¶ã®ç¤¾å“¡ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã—ãŸã€‚") // 削除ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ¡ãƒ¢ãƒªã®ä¸­ã«ã¯æ®‹ã£ã¦ã„ã¾ã™ + Else + ALERT("削除中ã«å•題ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚時間をãŠã„ã¦å†åº¦ãŠè©¦ã—ãã ã•ã„。") + End if +``` + +`dk stop dropping on first error` オプションを使用ã™ã‚‹ä¾‹: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop(dk stop dropping on first error) //$notDropped ã¯å‰Šé™¤ã§ããªã‹ã£ãŸæœ€åˆã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ + If($notDropped.length=0) // å‰Šé™¤ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒæˆåŠŸã—ã€ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå‰Šé™¤ã•れãŸå ´åˆ + ALERT(String($employees.length)+" ä»¶ã®ç¤¾å“¡ãƒ‡ãƒ¼ã‚¿ã‚’削除ã—ã¾ã—ãŸã€‚") // 削除ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ¡ãƒ¢ãƒªã®ä¸­ã«ã¯æ®‹ã£ã¦ã„ã¾ã™ + Else + ALERT("削除中ã«å•題ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚時間をãŠã„ã¦å†åº¦ãŠè©¦ã—ãã ã•ã„。") + End if +``` + + + + + +## .extract() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | + +
        + + +**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
        **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection + +| 引数 | タイプ | | 説明 | +| ------------- | ------ |:--:| --------------------------------------------------------- | +| attributePath | テキスト | -> | æ–°ã—ã„ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æŠ½å‡ºã™ã‚‹å€¤ã®å±žæ€§ãƒ‘ス | +| targetPath | テキスト | -> | 抽出先ã®å±žæ€§ãƒ‘スã‚ã‚‹ã„ã¯å±žæ€§å | +| オプション | æ•´æ•° | -> | `ck keep null`: è¿”ã•れるコレクション㫠null 属性をå«ã‚ã¾ã™ (デフォルトã§ã¯ç„¡è¦–ã•れã¾ã™)。 | +| 戻り値 | コレクション | <- | 抽出ã—ãŸå€¤ã‚’æ ¼ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.extract()` function returns a collection containing *attributePath* values extracted from the entity selection. + +*attributePath* ã«ã¯ã€ä»¥ä¸‹ã®ã‚‚ã®ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* スカラーデータクラス属性 +* リレートエンティティ (å˜æ•°) +* リレートエンティティズ (複数) + +*attributePath* 引数ãŒç„¡åйãªå ´åˆã€ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ 2種類ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’å—ã‘入れã¾ã™ã€‚ + +**.extract( attributePath : Text { ; option : Integer } ) : Collection** + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã¨ã€`.extract()` ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ä¸­ã®ã€*attributePath* å¼•æ•°ã§æŒ‡å®šã•れãŸå€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¦è¿”ã—ã¾ã™ã€‚ + +デフォルトã§ã€*attributePath* ã§æŒ‡å®šã•れãŸå€¤ãŒ *null* ã¾ãŸã¯æœªå®šç¾©ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€è¿”ã•れるコレクション内ã§ã¯ç„¡è¦–ã•れã¾ã™ã€‚ *option* パラメーター㫠`ck keep null` 定数を渡ã™ã¨ã€ã“れらã®å€¤ã¯è¿”ã•れるコレクション㫠**null** è¦ç´ ã¨ã—ã¦æ ¼ç´ã•れã¾ã™ã€‚ + +* [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" ã§ã‚るデータクラス属性ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦å–å¾—ã•れã¾ã™ (é‡è¤‡ã—ãŸã‚‚ã®ã‚‚ä¿æŒã•れã¾ã™)。 +* [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" ã§ã‚るデータクラス属性ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦å–å¾—ã•れã¾ã™ã€‚ + + +**.extract ( attributePath ; targetPath { ; ...attributePathN ; ... targetPathN}) : Collection** + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã¨ã€`.extract()` 㯠*attributePath* å¼•æ•°ã§æŒ‡å®šã•れãŸãƒ—ロパティをæŒã¤ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¦è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãれãžã‚Œã®è¦ç´ ã¯ã€*targetPath* 引数ã®ãƒ—ロパティã¨ã€å¯¾å¿œã™ã‚‹*attributePath* 引数ã®ãƒ—ロパティを格ç´ã—ãŸã‚ªãƒ–ジェクトã§ã™ã€‚ Null値ã¯ãã®ã¾ã¾ä¿æŒã•れã¾ã™ (ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§ã¯ *option* ã«å¼•数を渡ã—ã¦ã‚‚無視ã•れã¾ã™)。 + +複数㮠*attributePath* å¼•æ•°ãŒæ¸¡ã—ãŸå ´åˆã€ãれãžã‚Œã«å¯¾ã—㦠*targetPath* 引数を渡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ 有効㪠\[*attributePath*, *targetPath*] ã®ãƒšã‚¢ã®ã¿ãŒå–å¾—ã•れã¾ã™ã€‚ + +* [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" ã§ã‚るデータクラス属性ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã—ã¦å–å¾—ã•れã¾ã™ã€‚ +* [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" ã§ã‚るデータクラス属性ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦å–å¾—ã•れã¾ã™ã€‚ + +> エンティティã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãŠã„ã¦ã€\[ ] 記法を使用ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã¯å†èª­ã¿è¾¼ã¿ã•れã¾ã›ã‚“。 + + +#### 例題 + +以下ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’剿ã¨ã—ã¾ã™: + +![](assets/en/API/entityselection.PNG) + +```4d + var $firstnames; $addresses; $mailing; $teachers : Collection + // + // + // $firstnames ã¯æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + + + $firstnames:=ds.Teachers.all().extract("firstname") + // + // $addresses 㯠addressリレートエンティティã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + // Null値もå–å¾—ãƒ»ä¿æŒã•れã¾ã™ + $addresses:=ds.Teachers.all().extract("address";ck keep null) + // + // + // $mailing 㯠"who" ãŠã‚ˆã³ "to" ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + // "who" プロパティã®ä¸­èº«ã¯æ–‡å­—列型 + // "to" プロパティã®ä¸­èº«ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ (Address データクラス) + $mailing:=ds.Teachers.all().extract("lastname";"who";"address";"to") + // + // + // $mailing 㯠"who" ãŠã‚ˆã³ "city" ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + // "who" プロパティã®ä¸­èº«ã¯æ–‡å­—列型 + // "city" プロパティã®ä¸­èº«ã¯æ–‡å­—列型 + $mailing:=ds.Teachers.all().extract("lastname";"who";"address.city";"city") + // + // $teachers ã¯"where" ãŠã‚ˆã³ "who" ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + // "where" プロパティã®ä¸­èº«ã¯æ–‡å­—列型 + // "who" プロパティã®ä¸­èº«ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (Teachers データクラス) + $teachers:=ds.Address.all().extract("city";"where";"teachers";"who") + // + //$teachers ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + $teachers:=ds.Address.all().extract("teachers") +``` + + + + +## .first() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.first()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ----------------------------------------- | +| 戻り値 | 4D.Entity | <- | エンティティセレクションã®å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.first()` function returns a reference to the entity in the first position of the entity selection. + +ã“ã®é–¢æ•°ã®çµæžœã¯ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™: + +```4d + $entity:=$entitySel[0] +``` + +ãŸã ã—ã€ã“ã® 2ã¤ã®å®£è¨€ã«ã¯ã€ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒç©ºã§ã‚ã£ãŸå ´åˆã«é•ã„ãŒã‚りã¾ã™: + + +```4d + var $entitySel : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySel:=ds.Emp.query("lastName = :1";"Nonexistentname") // åˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚りã¾ã›ã‚“ + // エンティティセレクションã¯ç©ºã«ãªã‚Šã¾ã™ + $entity:=$entitySel.first() // Null ã‚’è¿”ã—ã¾ã™ + $entity:=$entitySel[0] // エラーを生æˆã—ã¾ã™ +``` + +#### 例題 + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary > :1";100000) + If($entitySelection.length#0) + $entity:=$entitySelection.first() + End if +``` + + + + +## .getDataClass() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | + +
        + +**.getDataClass()** : 4D.DataClass + +| 引数 | タイプ | | 説明 | +| --- | ------------ |:--:| ------------------------- | +| 戻り値 | 4D.DataClass | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒæ‰€å±žã—ã¦ã„るデータクラス | + +#### 説明 + +The `.getDataClass()` function returns the dataclass of the entity selection. + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãŠã‚‚ã«æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§æœ‰ç”¨ã§ã™ã€‚ + +#### 例題 + +ä»¥ä¸‹ã®æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’複製ã—ã¾ã™: + +```4d + // duplicate_entities メソッド + // duplicate_entities($entity_selection) + + #DECLARE ( $entitySelection : 4D.EntitySelection ) + var $dataClass : 4D.DataClass + var $entity; $duplicate : 4D.Entity + var $status : Object + $dataClass:=$entitySelection.getDataClass() + For each($entity;$entitySelection) + $duplicate:=$dataClass.new() + $duplicate.fromObject($entity.toObject()) + $duplicate[$dataClass.getInfo().primaryKey]:=Null // プライマリーキーをリセットã—ã¾ã™ + $status:=$duplicate.save() + End for each +``` + + + +## .isAlterable() + +
        履歴 + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | + +
        + +**.isAlterable()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ------------------------------------------ | +| 戻り値 | ブール | <- | エンティティセレクションãŒè¿½åŠ å¯èƒ½ã§ã‚れ㰠trueã€ãれ以外ã®å ´åˆã«ã¯ false | + +#### 説明 + +The `.isAlterable()` function returns True if the entity selection is alterable, and False if the entity selection is not alterable. + +詳細ã«ã¤ã„ã¦ã¯ [共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/entities.md#共有å¯èƒ½è¿½åŠ å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‚’å‚ç…§ãã ã•ã„。 + +#### 例題 + +`Form.products` をフォーム内㮠[リストボックス](FormObjects/listbox_overview.md) ã«è¡¨ç¤ºã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ–°ã—ã„製å“を追加ã§ãるよã†ã«ã—ã¾ã™ã€‚ ユーザーãŒè£½å“を追加ã—ãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒèµ·ããªã„よã†ã€è¿½åŠ å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™: + +```4d +If (Not(Form.products.isAlterable())) + Form.products:=Form.products.copy() +End if +... +Form.products.add(Form.product) +``` + + + + +## .isOrdered() + +
        履歴 + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.isOrdered()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ----------------------------------------- | +| 戻り値 | ブール | <- | 順列ã‚りエンティティセレクションã®å ´åˆã«ã¯ trueã€ãã†ã§ãªã„å ´åˆã¯ false | + +#### 説明 + +The `.isOrdered()` function returns True if the entity selection is ordered, and False if it is unordered. +> リモートデータストアã«å±žã—ã¦ã„るエンティティセレクションã®å ´åˆã¯å¸¸ã« true ã‚’è¿”ã—ã¾ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€[エンティティセレクションã®é †åˆ—ã‚り/順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) ã‚’å‚ç…§ãã ã•ã„。 + + +#### 例題 + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $isOrdered : Boolean + $employees:=ds.Employee.newSelection(dk keep ordered) + $employee:=ds.Employee.get(714) // プライマリーキー 714 ã‚’æŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å–å¾—ã—ã¾ã™ + + // 順列ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆã€åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’複数回追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™(é‡è¤‡ã—ã¦ã‚‹ã‚‚ã®ã¯ä¿æŒã•れã¾ã™) + $employees.add($employee) + $employees.add($employee) + $employees.add($employee) + + $isOrdered:=$employees.isOrdered() + If($isOrdered) + ALERT("エンティティセレクションã«ã¯é †åˆ—ãŒã‚りã€"+String($employees.length)+" ä»¶ã®ç¤¾å“¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å«ã¿ã¾ã™ã€‚") + End if +``` + + + + + +## .last() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.last()** : 4D.Entity +| 引数 | タイプ | | 説明 | +| --- | --------- |:--:| ----------------------------------------- | +| 戻り値 | 4D.Entity | <- | ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€çµ‚エンティティã¸ã®å‚ç…§ (見ã¤ã‹ã‚‰ãªã‘れ㰠null) | + +#### 説明 + +The `.last()` function returns a reference to the entity in last position of the entity selection. + +ã“ã®é–¢æ•°ã®çµæžœã¯ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã«ä¼¼ã¦ã„ã¾ã™: + +```4d + $entity:=$entitySel[length-1] +``` + +エンティティセレクションãŒç©ºã®å ´åˆã€é–¢æ•°ã¯ null ã‚’è¿”ã—ã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary < :1";50000) + If($entitySelection.length#0) + $entity:=$entitySelection.last() + End if +``` + + + + +## .length + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.length** : Integer + +#### 説明 + +The `.length` property returns the number of entities in the entity selection. エンティティセレクションãŒç©ºã®å ´åˆã€é–¢æ•°ã¯ 0 ã‚’è¿”ã—ã¾ã™ã€‚ + +エンティティセレクションã¯ã€å¸¸ã« `.length` プロパティをæŒã£ã¦ã„ã¾ã™ã€‚ + + +#### 例題 + +```4d + var $vSize : Integer + $vSize:=ds.Employee.query("gender = :1";"male").length + ALERT(String(vSize)+" 人ã®ç”·æ€§ç¤¾å“¡ãŒè¦‹ã¤ã‹ã‚Šã¾ã—ãŸã€‚") +``` + + + + +## .max() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------------------------- | +| v17 | 追加 | +| v18 R6 | エンティティセレクションãŒç©ºã®å ´åˆã«ã¯ undefined ã‚’è¿”ã—ã¾ã™ | + +
        + +**.max**( *attributePath* : Text ) : any + +| 引数 | タイプ | | 説明 | +| ------------- | ---- |:--:| ----------- | +| attributePath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹å±žæ€§ãƒ‘ス | +| 戻り値 | any | <- | å±žæ€§ã®æœ€å¤§å€¤ | + +#### 説明 + +The `.max()` function returns the highest (or maximum) value among all the values of *attributePath* in the entity selection. 実際ã«ã¯ã€[`.orderBy()`](#orderby) 関数を使用ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’昇順ã«ä¸¦ã¹æ›¿ãˆãŸã¨ãã®æœ€å¾Œã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ + +*attributePath* ã«ã€ç•°ãªã‚‹åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„るオブジェクトプロパティを渡ã—ãŸå ´åˆã€`.max()` メソッドã¯åž‹ã®ãƒªã‚¹ãƒˆé †ã®ä¸­ã§æœ€åˆã®ã‚¹ã‚«ãƒ©ãƒ¼åž‹ã®å€¤ã®ä¸­ã®æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ ([`.sort()`](CollectionClass.md#sort) ã®è©³ç´°ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +エンティティセレクションãŒç©ºã®å ´åˆã€ã¾ãŸã¯ *attributePath* 引数ãŒã‚ªãƒ–ジェクト属性内ã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã«ã¯ã€`.max()` 㯠**undefined** ã‚’è¿”ã—ã¾ã™ã€‚ + + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„属性を指定ã—ã¦ã„ã‚‹å ´åˆã€‚ + + + +#### 例題 + +女性従業員ã®ä¸­ã§æœ€ã‚‚高ã„給与é¡ã‚’探ã—ã¾ã™: + +```4d + var $sel : cs.EmpSelection + var $maxSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $maxSalary:=$sel.max("salary") +``` + + + +## .min() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------------------------- | +| v17 | 追加 | +| v18 R6 | エンティティセレクションãŒç©ºã®å ´åˆã«ã¯ undefined ã‚’è¿”ã—ã¾ã™ | + + +
        + +**.min**( *attributePath* : Text ) : any +| 引数 | タイプ | | 説明 | +| ------------- | ---- |:--:| ----------- | +| attributePath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹å±žæ€§ãƒ‘ス | +| 戻り値 | any | <- | å±žæ€§ã®æœ€å°å€¤ | + +#### 説明 + +The `.min()` function returns the lowest (or minimum) value among all the values of attributePath in the entity selection. 実際ã«ã¯ã€[`.orderBy()`](#orderby) 関数を使用ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’昇順ã«ä¸¦ã¹æ›¿ãˆãŸã¨ãã®æœ€åˆã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ (**null**値ã¯é™¤ã)。 + +*attributePath* ã«ã€ç•°ãªã‚‹åž‹ã®å€¤ã‚’æ ¼ç´ã—ã¦ã„るオブジェクトプロパティを渡ã—ãŸå ´åˆã€`.min()` メソッドã¯åž‹ã®ãƒªã‚¹ãƒˆé †ã®ä¸­ã§æœ€åˆã®ã‚¹ã‚«ãƒ©ãƒ¼åž‹ã®å€¤ã®ä¸­ã®æœ€å°å€¤ã‚’è¿”ã—ã¾ã™([`.sort()`](CollectionClass.md#sort) ã®è©³ç´°ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +エンティティセレクションãŒç©ºã®å ´åˆã€ã¾ãŸã¯ *attributePath* 引数ãŒã‚ªãƒ–ジェクト属性内ã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã«ã¯ã€`.min()` 㯠**undefined** ã‚’è¿”ã—ã¾ã™ã€‚ + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„属性を指定ã—ã¦ã„ã‚‹å ´åˆã€‚ + + +#### 例題 + +女性従業員ã®ä¸­ã§æœ€ã‚‚低ã„給与é¡ã‚’探ã—ã¾ã™: + +```4d + var $sel : cs.EmpSelection + var $minSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $minSalary:=$sel.min("salary") +``` + + + +## .minus() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| --------------- | ------------------ |:--:| ------------------------------------------ | +| entity | 4D.Entity | -> | 除外ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| entitySelection | 4D.EntitySelection | -> | 除外ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | 4D.EntitySelection | <- | æ–°ã—ã„エンティティセレクションã€ã‚ã‚‹ã„ã¯æ—¢å­˜ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ | + +#### 説明 + +The `.minus()` function excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection. + +* *entity* を引数ã¨ã—ã¦æ¸¡ã—ãŸå ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ (*entity* ãŒå…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„ãŸå ´åˆ) *entity* を除外ã—ãŸæ–°ã—ã„エンティティセレクションを作æˆã—ã¾ã™ã€‚ *entity* ãŒå…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å«ã¾ã‚Œã¦ã„ãªã‹ã£ãŸå ´åˆã«ã¯ã€åŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ã€‚ +* *entitySelection* を引数ã¨ã—ã¦æ¸¡ã—ãŸå ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯ *entitySelection* ã«æ‰€å±žã—ã¦ã„るエンティティをã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã‚‰é™¤å¤–ã—ãŸæ–°ã—ã„エンティティセレクションを返ã—ã¾ã™ã€‚ +> [順列ã‚りã¨é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) を比較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ è¿”ã•れるセレクションã¯å¸¸ã«é †åˆ—ãªã—ã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒç©ºã§ã‚ã£ãŸå ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +*entitySelection* ãŒç©ºã€ã‚ã‚‹ã„㯠*entity* ㌠Null ã§ã‚ã£ãŸå ´åˆã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŠã‚ˆã³å¼•æ•°ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚‚ã®ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + +#### 例題 1 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName = :1";"H@") + // $employees エンティティセレクションã¯ã€ä¸»ã‚­ãƒ¼710 ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ä»–ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ + // 例: "Colin Hetrick", "Grady Harness", "Sherlock Holmes" (主キー710) + + $employee:=ds.Employee.get(710) // "Sherlock Holmes" ã‚’è¿”ã—ã¾ã™ + + $result:=$employees.minus($employee) // $result ã«ã¯ "Colin Hetrick", "Grady Harness" æ ¼ç´ã•れã¾ã™ +``` + + +#### 例題 2 + +"Jones" ã¨ã„ã†åå‰ã§ã€New York ã«ä½ã‚“ã§ã„る女性従業員ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2).minus(ds.Employee.query("gender='male'")) +``` + + + +## .or() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
        **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| --------------- | ------------------ |:--:| ----------------------------------------- | +| entity | 4D.Entity | -> | 交差ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ | +| entitySelection | 4D.EntitySelection | -> | 交差ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | 4D.EntitySelection | <- | æ–°ã—ã„エンティティセレクションã€ã‚ã‚‹ã„ã¯å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ | + +#### 説明 + +The `.or()` function combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator; it returns a new, unordered entity selection that contains all the entities from the entity selection and the parameter. + +* *entity* を渡ã—ãŸå ´åˆã€å¼•æ•°ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨æ¯”較ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ エンティティãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ‰€å±žã—ã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ã€‚ ãã†ã§ãªã„å ´åˆã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨æ¸¡ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ãŸæ–°ã—ã„エンティティセレクションãŒè¿”ã•れã¾ã™ã€‚ +* *entitySelection* を渡ã—ãŸå ´åˆã€äºŒã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’比較ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ *entitySelection* ã®ã©ã¡ã‚‰ã‹ã«æ‰€å±žã—ã¦ã„るエンティティを格ç´ã—ãŸæ–°ã—ã„エンティティセレクションãŒè¿”ã•れã¾ã™ (OR ã¯æŽ’ä»–çš„ã§ã¯ãªãã€ã¾ãŸä¸¡æ–¹ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§å‚ç…§ã•れã¦ã„るエンティティã¯ã€çµæžœã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¤‡æ•°æ ¼ç´ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“)。 +> [順列ã‚りã¨é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) を比較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ è¿”ã•れるセレクションã¯å¸¸ã«é †åˆ—ãªã—ã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ *entitySelection* ã®ä¸¡æ–¹ãŒç©ºã§ã‚ã£ãŸå ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒç©ºã§ã‚ã£ãŸå ´åˆã€*entitySelection* ã¸ã®å‚ç…§ã€ã‚ã‚‹ã„㯠*entity* ã®ã¿ã‚’æ ¼ç´ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +*entitySelection* ãŒç©ºã€ã‚ã‚‹ã„㯠*entity* ㌠Null ã§ã‚ã£ãŸå ´åˆã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ã€‚ + +å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŠã‚ˆã³å¼•æ•°ãŒåŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚‚ã®ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + +#### 例題 1 + +```4d + var $employees1; $employees2; $result : cs.EmployeeSelection + $employees1:=ds.Employee.query("lastName = :1";"H@") // "Colin Hetrick","Grady Harness" ã‚’è¿”ã—ã¾ã™ + $employees2:=ds.Employee.query("firstName = :1";"C@") // "Colin Hetrick", "Cath Kidston" ã‚’è¿”ã—ã¾ã™ + $result:=$employees1.or($employees2) // $result ã«ã¯ "Colin Hetrick", "Grady Harness","Cath Kidston" ãŒæ ¼ç´ã•れã¾ã™ +``` + +#### 例題 2 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // "Colin Hetrick","Grady Harness", "Sherlock Holmes" ã‚’è¿”ã—ã¾ã™ + $employee:=ds.Employee.get(686) // 主キー686 ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ $employees エンティティセレクションã«å±žã—ã¦ã„ã¾ã›ã‚“ + // 主キー686 㯠"Mary Smith" ã¨ã„ã†å¾“業員ã«åˆè‡´ã—ã¾ã™ + + $result:=$employees.or($employee) //$result ã«ã¯ "Colin Hetrick", "Grady Harness", "Sherlock Holmes", "Mary Smith" ãŒæ ¼ç´ã•れã¾ã™ +``` + + + +## .orderBy() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
        **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ----------- | ------------------ |:--:| ----------------------------- | +| pathString | テキスト | -> | エンティティセレクションã®å±žæ€§ãƒ‘スã¨ä¸¦ã¹æ›¿ãˆã®æŒ‡å®š | +| pathObjects | コレクション | -> | æ¡ä»¶ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | 4D.EntitySelection | <- | 指定ã•れãŸé †ç•ªã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚ŒãŸæ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.orderBy()` function returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria. +> * ã“ã®é–¢æ•°ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 +* 詳細ã«ã¤ã„ã¦ã¯ã€[エンティティセレクションã®é †åˆ—ã‚り/順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—) ã‚’å‚ç…§ãã ã•ã„。 + +引数を渡ã—ã¦ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä¸¦ã³æ›¿ãˆã‚’指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ä¸¦ã¹æ›¿ãˆã®æŒ‡å®šæ–¹æ³•㯠2ã¤ã‚りã¾ã™: + +* *pathString* (テキスト): ã“ã®å ´åˆã€ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Šã•れãŸã€1 〜 x 個ã®å±žæ€§ãƒ‘スã¨ä¸¦ã¹æ›¿ãˆé † (ä»»æ„) ã§æ§‹æˆã•れるフォーミュラを渡ã—ã¾ã™ã€‚ シンタックスã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +```4d +"attributePath1 {desc or asc}, attributePath2 {desc or asc},..." +``` + +属性を渡ã™é †ç•ªãŒã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä¸¦ã¹æ›¿ãˆã®å„ªå…ˆé †ä½ã‚’決定ã—ã¾ã™ã€‚ デフォルトã§ã¯ã€å±žæ€§ã¯æ˜‡é †ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ 並ã³é †ã‚’設定ã™ã‚‹ã«ã¯ã€ãƒ—ロパティパスã®å¾Œã«åŠè§’スペースã§åŒºåˆ‡ã£ãŸã‚ã¨ã«ã€æ˜‡é †ã‚’指定ã™ã‚‹ã«ã¯ "asc"ã€é™é †ã‚’指定ã™ã‚‹ã«ã¯ "desc" を渡ã—ã¾ã™ã€‚ + +* *pathObjects* (コレクション): コレクションã®å„è¦ç´ ã¯ã€ä»¥ä¸‹ã®æ§‹é€ ã‚’æŒã¤ã‚ªãƒ–ジェクトを格ç´ã—ã¾ã™: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +デフォルトã§ã¯ã€å±žæ€§ã¯æ˜‡é †ã«ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ ("descending" 㯠false)。 + +pathObjects コレクションã«ã¯å¿…è¦ãªæ•°ã ã‘オブジェクトを追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> Null ã¯ä»–ã®å€¤ã‚ˆã‚Šå°ã•ã„ã¨è©•価ã•れã¾ã™ã€‚ + +#### 例題 + + +```4d +// フォーミュラã§ã®ä¸¦ã¹æ›¿ãˆ + $sortedEntitySelection:=$entitySelection.orderBy("firstName asc, salary desc") + $sortedEntitySelection:=$entitySelection.orderBy("firstName") + + // コレクションã§ã®ä¸¦ã¹æ›¿ãˆã¨ã€æ˜‡é †ãƒ»é™é †ã®æŒ‡å®š + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"firstName";"descending";False)) + $orderColl.push(New object("propertyPath";"salary";"descending";True)) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) + + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"manager.lastName")) + $orderColl.push(New object("propertyPath";"salary")) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) +``` + + + + +## .orderByFormula( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R6 | 追加 | + +
        + +**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
        **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ------------- | ------------------ |:--:| ------------------------------------------ | +| formulaString | テキスト | -> | フォーミュラ文字列 | +| formulaObj | オブジェクト | -> | フォーミュラオブジェクト | +| sortOrder | æ•´æ•° | -> | `dk ascending` (デフォルト) ã¾ãŸã¯ `dk descending` | +| settings | オブジェクト | -> | ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã«æ¸¡ã™å¼•æ•° | +| 戻り値 | 4D.EntitySelection | <- | 順列ã‚ã‚Šã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.orderByFormula()` function returns a new, ordered entity selection containing all entities of the entity selection in the order defined through the *formulaString* or *formulaObj* and, optionally, *sortOrder* and *settings* parameters. +> ã“ã®é–¢æ•°ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +*formulaString* ã¾ãŸã¯ *formulaObj* 引数を渡ã™ã“ã¨ãŒã§ãã¾ã™: + +- *formulaString*: "Year of(this.birthDate)" ãªã©ã® 4Då¼ +- *formulaObj*: `Formula` ã¾ãŸã¯ `Formula from string` コマンドを使用ã—ã¦ä½œæˆã•れãŸã€æœ‰åйãªãƒ•ォーミュラオブジェクト + +*formulaString* ãŠã‚ˆã³ *formulaObj* ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„エンティティã«å¯¾ã—ã¦å®Ÿè¡Œã•れã€ãã®çµæžœã¯è¿”ã•れるエンティティセレクション内ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½®ã‚’決定ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ çµæžœã¯ä¸¦ã¹æ›¿ãˆå¯èƒ½ãªåž‹ (ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜ã€æ•°å€¤ã€ãƒ†ã‚­ã‚¹ãƒˆã€æ™‚é–“ã€Null) ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> Null値ã®çµæžœã¯å¸¸ã«æœ€å°ã®å€¤ã¨ã¿ãªã•れã¾ã™ã€‚ + +*sortOrder* 引数をçœç•¥ã—ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€è¿”ã•ã‚Œã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ˜‡é †ã«ä¸¦ã¹ã‚‰ã‚Œã¾ã™ã€‚ オプションã¨ã—ã¦ã€*sortOrder* ã«ä»¥ä¸‹ã®å€¤ã®ã„ãšã‚Œã‹ä¸€ã¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ------------- | - | ---------- | +| dk ascending | 0 | 昇順 (デフォルト) | +| dk descending | 1 | é™é † | + +*formulaString* ãŠã‚ˆã³ *formulaObj* 内ã§ã¯ã€å‡¦ç†ã•れるエンティティã¨ãã®å±žæ€§ã¯ `This` コマンドを通ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ (ãŸã¨ãˆã°ã€`This.lastName` ãªã©)。 + +`settings` 引数㮠`args` プロパティ (オブジェクト) を使用ã™ã‚‹ã“ã¨ã§ã€ãƒ•ォーミュラã«å¼•数を渡ã™ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“ã®ã¨ãフォーミュラã¯ã€`settings.args` オブジェクトを $1 ã«å—ã‘å–りã¾ã™ã€‚ + +#### 例題 1 + +テキストã¨ã—ã¦æ¸¡ã•れãŸãƒ•ォーミュラを使用ã—ã¦å­¦ç”Ÿã‚’ä¸¦ã¹æ›¿ãˆã¾ã™: + +```4d + var $es1; $es2 : cs.StudentsSelection + $es1:=ds.Students.query("nationality=:1";"French") + $es2:=$es1.orderByFormula("length(this.lastname)") // ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ˜‡é † + $es2:=$es1.orderByFormula("length(this.lastname)";dk descending) +``` + +åŒã˜ä¸¦ã³æ–¹ã‚’ã€ãƒ•ォーミュラオブジェクトを使用ã—ã¦æŒ‡å®šã—ã¾ã™: + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(Length(This.lastname)) + $es2:=$es1.orderByFormula($formula) // ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ˜‡é † + $es2:=$es1.orderByFormula($formula;dk descending) +``` + + +#### 例題 2 + +引数付ãã®ãƒ•ォーミュラオブジェクトを渡ã—ã¾ã™ã€‚`settings.args` オブジェクトã¯ã€***computeAverage*** メソッド内㧠$1 ãŒå—ã‘å–りã¾ã™ã€‚ + +ã“ã®ä¾‹é¡Œã§ã¯ã€**Students** データクラス内㮠"marks" オブジェクトフィールドã«ç§‘ç›®ã”ã¨ã®ç”Ÿå¾’ã®æˆç¸¾ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ フォーミュラオブジェクトを使用ã—ã€schoolA 㨠schoolB ã§ç•°ãªã‚‹ä¿‚数を用ã„ã¦ç”Ÿå¾’ã®å¹³å‡ã®æˆç¸¾ã‚’計算ã—ã¾ã™ã€‚ + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula; $schoolA; $schoolB : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(computeAverage($1)) + + $schoolA:=New object() // settingsオブジェクト + $schoolA.args:=New object("english";1;"math";1;"history";1) // å¹³å‡ã‚’計算ã™ã‚‹ãŸã‚ã®ä¿‚æ•° + + // school A ã®æ¡ä»¶ã«å¿œã˜ã¦å­¦ç”Ÿã‚’ä¸¦ã¹æ›¿ãˆã¾ã™ + $es2:=$es1.entitySelection.orderByFormula($formula;$schoolA) + + $schoolB:=New object() // settingsオブジェクト + $schoolB.args:=New object("english";1;"math";2;"history";3) // å¹³å‡ã‚’計算ã™ã‚‹ãŸã‚ã®ä¿‚æ•° + + // school B ã®æ¡ä»¶ã«å¿œã˜ã¦å­¦ç”Ÿã‚’ä¸¦ã¹æ›¿ãˆã¾ã™ + $es2:=$es1.entitySelection.orderByFormula($formula;dk descending;$schoolB) +``` + +```4d + // + // computeAverage メソッド + // ----------------------------- + #DECLARE ($coefList : Object) -> $result : Integer + var $subject : Text + var $average; $sum : Integer + + $average:=0 + $sum:=0 + + For each($subject;$coefList) + $sum:=$sum+$coefList[$subject] + End for each + + For each($subject;This.marks) + $average:=$average+(This.marks[$subject]*$coefList[$subject]) + End for each + + $result:=$average/$sum +``` + + + + +## .query() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------- | +| v17 R6 | Formula パラメーターをサãƒãƒ¼ãƒˆ | +| v17 R5 | 値ã®ãƒ—レースホルダーをサãƒãƒ¼ãƒˆ | +| v17 | 追加 | + +
        + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
        **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| ------------- | ------------------ |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| queryString | テキスト | -> | 検索æ¡ä»¶ (文字列) | +| formula | オブジェクト | -> | 検索æ¡ä»¶ (フォーミュラオブジェクト) | +| value | any | -> | プレースホルダー用ã®å€¤ | +| querySettings | オブジェクト | -> | クエリオプション: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| 戻り値 | 4D.EntitySelection | <- | New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula* | +#### 説明 + +The `.query()` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection, and returns a new object of type `EntitySelection` containing all the entities that are found. ã“ã®é–¢æ•°ã«ã¯ã€ãƒ¬ã‚¤ã‚¸ãƒ¼ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒé©ç”¨ã•れã¾ã™ã€‚ +> ã“ã®é–¢æ•°ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +エンティティãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +*queryString* ãŠã‚ˆã³ *value* ã‚„ *querySettings* パラメーターを使ã£ã¦ã‚¯ã‚¨ãƒªã‚’ビルドã™ã‚‹æ–¹æ³•ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€DataClass[`.query()`](DataClassClass.md#query) 関数をå‚ç…§ãã ã•ã„。 +> *queryString* 内㧠**order by** ステートメントをçœç•¥ã—ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€è¿”ã•れるエンティティセレクションã¯ã€[順列ãªã—](ORDA/dsMapping.md#エンティティセレクションã®é †åˆ—ã‚り順列ãªã—)ã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã¯ã€é †åˆ—ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžã† (エンティティã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚ã‚りã«è¿½åŠ ã•れã¦ã„ã) ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +#### 例題 1 + + +```4d + var $entitySelectionTemp : cs.EmployeeSelection + $entitySelectionTemp:=ds.Employee.query("lastName = :1";"M@") + Form.emps:=$entitySelectionTemp.query("manager.lastName = :1";"S@") +``` + + +#### 例題 2 + +追加ã®ã‚¯ã‚¨ãƒªä¾‹ã«ã¤ã„ã¦ã¯ã€[`DataClass.query()`](DataClassClass.md#query) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### å‚ç…§ + +データクラス㮠[`.query()`](DataClassClass.md#query) + + + + +## .queryPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.queryPath** : Text + +#### 説明 + +The `.queryPath` property contains a detailed description of the query as it was actually performed by 4D. ã“ã®ãƒ—ロパティã¯ã€[`.query()`](#query) 関数㮠*querySettings* 引数㫠`"queryPath":true` ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ¸¡ã•れã¦ã„ãŸå ´åˆã«ã€ã‚¯ã‚¨ãƒªã‚’通ã—ã¦ç”Ÿæˆã•れ㟠`EntitySelection` オブジェクトã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€DataClass[`.query()`](DataClassClass.html#query) ã® **querySettings** ã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + + + + +## .queryPlan + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.queryPlan** : Text + +#### 説明 + +The `.queryPlan` property contains a detailed description of the query just before it is executed (i.e., the planned query). ã“ã®ãƒ—ロパティã¯ã€[`.query()`](#query) 関数㮠*querySettings* 引数㫠`"queryPlan":true` ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ¸¡ã•れã¦ã„ãŸå ´åˆã«ã€ã‚¯ã‚¨ãƒªã‚’通ã—ã¦ç”Ÿæˆã•れ㟠`EntitySelection` オブジェクトã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +詳細ã«ã¤ã„ã¦ã¯ã€DataClass[`.query()`](DataClassClass.html#query) ã® **querySettings** ã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + + + +## .refresh() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | + +
        + +**.refresh()** +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + +#### 説明 +> ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ (クライアント/サーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã€ã¾ãŸã¯`Open datastore` 接続) ã«ãŠã„ã¦ã®ã¿å‹•作ã—ã¾ã™ã€‚ + +The `.refresh()` function immediately "invalidates" the entity selection data in the local ORDA cache so that the next time 4D requires the entity selection, it will be reloaded from the database. + +デフォルトã§ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ã® ORDA ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¯ 30秒後ã«ç„¡åŠ¹åŒ–ã•れã¾ã™ã€‚ クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠ORDA ã¨ã‚¯ãƒ©ã‚·ãƒƒã‚¯è¨€èªžã®ä¸¡æ–¹ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã§ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ãƒ—リケーションãŒå¿…ãšæœ€æ–°ã®ãƒ‡ãƒ¼ã‚¿ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã§ãã¾ã™ã€‚ + +#### 例題 1 + +クラシック㨠ORDA言語ã®ä¸¡æ–¹ãŒã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚’åŒæ™‚ã«ç·¨é›†ã™ã‚‹å ´åˆã‚’考ãˆã¾ã™: + +```4d + // 4Dリモート上ã§å®Ÿè¡Œ + + var $selection : cs.StudentsSelection + var $student : cs.StudentsEntity + + $selection:=ds.Students.query("lastname=:1";"Collins") + // 先頭エンティティを ORDA ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«èª­ã¿è¾¼ã¿ã¾ã™ + $student:=$selection.first() + + // 4Dã®ã‚¯ãƒ©ã‚·ãƒƒã‚¯è¨€èªžã§ãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã—ã¾ã™ã€‚ORDA キャッシュã¯ã“れを検知ã—ã¾ã›ã‚“ + QUERY([Students];[Students]lastname="Collins") + [Students]lastname:="Colin" + SAVE RECORD([Students]) + + // 最新情報をå–å¾—ã™ã‚‹ãŸã‚ã€ORDAキャッシュを無効化ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ + $selection.refresh() + // キャッシュãŒå¤±åйã—ã¦ã„ãªãã¦ã‚‚ã€å…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰å†èª­ã¿è¾¼ã¿ã•れã¾ã™ + $student:=$selection.first() + + //$student.lastname contains "Colin" +``` + + +#### 例題 2 + +リストボックス㫠Form.students エンティティセレクションを表示ã—ã€è¤‡æ•°ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒãれをæ“作ã™ã‚‹å ´åˆã‚’考ãˆã¾ã™ã€‚ + +```4d +// フォームメソッド: + Case of + :(Form event code=On Load) + Form.students:=ds.Students.all() + End case + // + // + // クライアント#1ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå…ˆé ­ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロードã—ã€æ›´æ–°ã—ã¦ä¿å­˜ã—ã¾ã™ + // クライアント#2ã§ã‚‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロードã—ã€æ›´æ–°ã—ã¦ä¿å­˜ã—ã¾ã™ + // + // + // クライアント#1ã«ãŠã„ã¦: + Form.students.refresh() // Form.students エンティティセレクション㮠ORDAキャッシュを無効化ã—ã¾ã™ + // リストボックスã®ä¸­èº«ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å†…å®¹ã§æ›´æ–°ã•れã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ#2 ãŒãŠã“ãªã£ãŸå¤‰æ›´ã‚‚åæ˜ ã—ã¾ã™ +``` + + + + +## .selected() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v19 R3 | 追加 | + +
        + +**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object +| 引数 | タイプ | | 説明 | +| ---------------- | ------------------ |:--:| --------------------------------------------------------------------------------- | +| selectedEntities | 4D.EntitySelection | -> | Entity selection with entities for which to know the rank in the entity selection | +| 戻り値 | オブジェクト | <- | Range(s) of selected entities in entity selection | + +#### 説明 + +The `.selected()` function returns an object describing the position(s) of *selectedEntities* in the original entity selection. +> ã“ã®é–¢æ•°ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +Pass in the *selectedEntities* parameter an entity selection containing entities for which you want to know the position in the original entity selection. *selectedEntities* must be an entity selection belonging to the same dataclass as the original entity selection, otherwise an error 1587 - "The entity selection comes from an incompatible dataclass" is raised. + +#### 戻り値 + +戻り値ã®ã‚ªãƒ–ジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| -------------- | ------ | ------------------------------- | +| ranges | コレクション | Collection of range objects | +| ranges[].start | æ•´æ•° | First entity index in the range | +| ranges[].end | æ•´æ•° | Last entity index in the range | + +If a `ranges` property contains a single entity, `start` = `end`. Index starts at 0. + +The function returns an empty collection in the `ranges` property if the original entity selection or the *selectedEntities* entity selection is empty. + +#### 例題 + +```4d +var $invoices; $cashSel; $creditSel : cs.Invoices +var $result1; $result2 : Object + +$invoices:=ds.Invoices.all() + +$cashSelection:=ds.Invoices.query("payment = :1"; "Cash") +$creditSel:=ds.Invoices.query("payment IN :1"; New collection("Cash"; "Credit Card")) + +$result1:=$invoices.selected($cashSelection) +$result2:=$invoices.selected($creditSel) + +//$result1 = {ranges:[{start:0;end:0},{start:3;end:3},{start:6;end:6}]} +//$result2 = {ranges:[{start:0;end:1},{start:3;end:4},{start:6;end:7}]} + +``` + + + + + + + + +## .slice() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection +| 引数 | タイプ | | 説明 | +| --------- | ------------------ |:--:| --------------------------------------- | +| startFrom | æ•´æ•° | -> | 処ç†ã‚’é–‹å§‹ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹) | +| end | æ•´æ•° | -> | 終了インデックス (å«ã¾ã‚Œãªã„) | +| 戻り値 | 4D.EntitySelection | <- | 抜粋エンティティを格ç´ã—ãŸæ–°ã—ã„エンティティセレクション (シャロウ・コピー) | + +#### 説明 + +The `.slice()` function returns a portion of an entity selection into a new entity selection, selected from the *startFrom* index to the *end* index (*end* is not included) or to the last entity of the entity selection. ã“ã®é–¢æ•°ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚·ãƒ£ãƒ­ã‚¦ãƒ»ã‚³ãƒ”ーを返ã—ã¾ã™ (åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚照を使用ã—ã¾ã™)。 +> ã“ã®é–¢æ•°ã¯ã€å…ƒã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¾ã›ã‚“。 + +戻り値ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€*startFrom* å¼•æ•°ã§æŒ‡å®šã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ (å«ã¾ã‚Œã‚‹) ã‹ã‚‰ã€*end* å¼•æ•°ã§æŒ‡å®šã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ã§ (å«ã¾ã‚Œãªã„) ã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™ã€‚ *startFrom* 引数ã®ã¿ã‚’渡ã—ãŸå ´åˆã«ã¯ã€*startFrom* å¼•æ•°ã§æŒ‡å®šã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‹ã‚‰æœ€å¾Œã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ã§ãŒæˆ»ã‚Šå€¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã•れã¾ã™ã€‚ + +* *startFrom* < 0 ã®å ´åˆã€*startFrom:=startFrom+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (エンティティセレクションã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 å†è¨ˆç®—ã•れãŸå€¤ã‚‚è² ã®å€¤ã ã£ãŸå ´åˆã€*startFrom* 㯠0 ã«è¨­å®šã•れã¾ã™ã€‚ +* *startFrom >= length* ã®å ´åˆã€é–¢æ•°ã¯ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ +* *end* < 0 ã®å ´åˆã€ãれ㯠*end:=end+length* ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ã€‚ +* 渡ã•れãŸå€¤ã€ã‚ã‚‹ã„ã¯å†è¨ˆç®—ã•れãŸå€¤ãŒ *end* < *startFrom* ã®å ´åˆã€é–¢æ•°ã¯ãªã«ã‚‚ã—ã¾ã›ã‚“。 + +エンティティセレクションã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãれらも返ã•れã¾ã™ã€‚ + +#### 例題 1 + +エンティティセレクションã®ã€æœ€åˆã® 9ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d +var $sel; $sliced : cs.EmployeeSelection +$sel:=ds.Employee.query("salary > :1";50000) +$sliced:=$sel.slice(0;9) // +``` + + +#### 例題 2 + +ds.Employee.all().length = 10 ã§ã‚ã‚‹å ´åˆ: + +```4d +var $slice : cs.EmployeeSelection +$slice:=ds.Employee.all().slice(-1;-2) // インデックス 9 ã‹ã‚‰ 8番ã¾ã§ã‚’è¿”ãã†ã¨ã—ã¾ã™ãŒã€9 > 8 ãªã®ã§ç©ºã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ + +``` + + + +## .sum( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + + +
        + +**.sum**( *attributePath* : Text ) : Real +| 引数 | タイプ | | 説明 | +| ------------- | ---- |:--:| ----------------- | +| attributePath | テキスト | -> | 計算ã«ä½¿ç”¨ã™ã‚‹å±žæ€§ãƒ‘ス | +| 戻り値 | 実数 | <- | エンティティセレクションã®å€¤ã®åˆè¨ˆ | + +#### 説明 + + +The `.sum()` function returns the sum for all *attributePath* values in the entity selection. + +エンティティセレクションãŒç©ºã®å ´åˆã€`.sum()` 㯠0 ã‚’è¿”ã—ã¾ã™ã€‚ + +ç·å’Œã¯ã€æ•°å€¤åž‹ã®å€¤ã«å¯¾ã—ã¦ã®ã¿å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ *attributePath* ãŒã‚ªãƒ–ジェクトプロパティã ã£ãŸå ´åˆã€è¨ˆç®—ã®å¯¾è±¡ã«ãªã‚‹ã®ã¯æ•°å€¤åž‹ã®å€¤ã®ã¿ã§ã™ (ä»–ã®å€¤ã®åž‹ã¯ç„¡è¦–ã•れã¾ã™)。 ã“ã®å ´åˆã§ã€*attributePath* ãŒã‚ªãƒ–ジェクト内ã«å­˜åœ¨ã—ãªã„パスã€ã‚ã‚‹ã„ã¯æ•°å€¤ã‚’å«ã‚“ã§ã„ãªã„属性ã¸ã®ãƒ‘スã§ã‚ã£ãŸå ´åˆã«ã¯ã€`.sum()` 㯠0 ã‚’è¿”ã—ã¾ã™ã€‚ + +以下ã®å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™: + +* *attributePath* ãŒæ•°å€¤åž‹ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクト型ã®å±žæ€§ã§ã¯ãªã„ +* *attributePath* ã¯ãƒªãƒ¬ãƒ¼ãƒˆå±žæ€§ã§ã‚ã‚‹ +* *attributePath* ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«å­˜åœ¨ã—ãªã„å ´åˆã€‚ + + + +#### 例題 + +```4d +var $sel : cs.EmployeeSelection +var $sum : Real + +$sel:=ds.Employee.query("salary < :1";20000) +$sum:=$sel.sum("salary") +``` + + + +## .toCollection( ) + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v17 | 追加 | + +
        + +**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
        **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
        **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection* +| 引数 | タイプ | | 説明 | +| ------------ | ------ |:--:| -------------------------------------------------------------------- | +| filterString | テキスト | -> | 抽出ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§ãƒ‘ã‚¹ã®æ–‡å­—列 | +| filterCol | コレクション | -> | 抽出ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§ãƒ‘スã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| options | æ•´æ•° | -> | `dk with primary key`: プライマリーキーを追加
        `dk with stamp`: スタンプを追加 | +| begin | æ•´æ•° | -> | 開始インデックス | +| howMany | æ•´æ•° | -> | 抽出ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£æ•° | +| 戻り値 | コレクション | <- | エンティティセレクションã®å±žæ€§ã¨å€¤ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.toCollection()` function creates and returns a collection where each element is an object containing a set of properties and values corresponding to the attribute names and values for the entity selection. + +filterString ãŠã‚ˆã³ filterCol 引数ãŒçœç•¥ã•れるã‹ã€ç©ºã®æ–‡å­—åˆ—ãŒæ¸¡ã•れるã‹ã€ã‚ã‚‹ã„㯠"*" ãŒæ¸¡ã•れãŸå ´åˆã€ã™ã¹ã¦ã®å±žæ€§ãŒæŠ½å‡ºã•れã¾ã™ã€‚ "[kind](DataClassAttributeClass.md#kind)" プロパティ㌠"relatedEntity" ã®å±žæ€§ã¯å˜ç´”ãªå½¢å¼ã§æŠ½å‡ºã•れã¾ã™: \_\_KEY プロパティ (プライマリーキー) ã‚’æŒã£ãŸã‚ªãƒ–ジェクト。 "relatedEntities" 型㮠"kind" プロパティã®å±žæ€§ã¯æŠ½å‡ºã•れã¾ã›ã‚“。 + +抽出ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã‚’é™å®šã—ãŸã„å ´åˆã«ã¯ã€ãれを指定ã™ã‚‹å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 2ã¤ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã™: + +* *filterString*: プロパティパスをカンマã§åŒºåˆ‡ã£ãŸæ–‡å­—列: "propertyPath1, propertyPath2, ..." +* *filterCol*: プロパティパスをå«ã‚€æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³: \["propertyPath1","propertyPath2",...] + + +引数ãŒã€`relatedEntity` (リレートエンティティ) åž‹ã®å±žæ€§ã‚’指定ã—ã¦ã„ãŸå ´åˆ: + +* propertyPath = "relatedEntity" -> å˜ç´”ãªå½¢å¼ã§å–å¾—ã•れã¾ã™ +* propertyPath = "relatedEntity.*" -> 全プロパティãŒå–å¾—ã•れã¾ã™ +* propertyPath = "relatedEntity.propertyName1, relatedEntity.propertyName2, ..." -> 指定ã•れãŸãƒ—ロパティã®ã¿ãŒå–å¾—ã•れã¾ã™ + + +引数ãŒã€`relatedEntities` (リレートエンティティズ) åž‹ã®å±žæ€§ã‚’指定ã—ã¦ã„ãŸå ´åˆ: + +* propertyPath = "relatedEntities.*" -> 全プロパティãŒå–å¾—ã•れã¾ã™ +* propertyPath = "relatedEntities.propertyName1, relatedEntities.propertyName2, ..." -> 指定ã•れãŸãƒ—ロパティã®ã¿ãŒå–å¾—ã•れã¾ã™ + + + +*options* ã« `dk with primary key` ã¾ãŸã¯ `dk with stamp` セレクターを渡ã™ã“ã¨ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ライマリーキー/スタンプをã€å–å¾—ã™ã‚‹ã‚ªãƒ–ジェクトã«è¿½åŠ ã™ã‚‹ã‹ã©ã†ã‹ã‚’指定ã§ãã¾ã™ã€‚ + +*begin* 引数を渡ã™ã“ã¨ã§ã€æŠ½å‡ºã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®é–‹å§‹ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 0 ã‹ã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®é•·ã• - 1 ã®ç¯„囲ã§å€¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +*howMany* 引数を渡ã™ã¨ã€*begin* å¼•æ•°ã§æŒ‡å®šã—ãŸä½ç½®ã‹ã‚‰æŠ½å‡ºã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä»¶æ•°ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ドロップã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯è¿”ã•れã¾ã›ã‚“ãŒã€*howMany* 引数ã®ã‚«ã‚¦ãƒ³ãƒˆã§ã¯è€ƒæ…®ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒ1ã¤ã‚ã‚‹å ´åˆã« *howMany*= 3 ã§ã‚れã°ã€2ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæŠ½å‡ºã•れã¾ã™ã€‚ + +*howMany* 引数ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã‚’è¶…ãˆã‚‹å ´åˆã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯(length - *begin*) ã®æ•°ã ã‘オブジェクトを返ã—ã¾ã™ã€‚ + +以下ã®ã„ãšã‚Œã‹ã®å ´åˆã«ã¯ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™: + +* エンティティセレクションãŒç©ºã§ã‚ã‚‹ +* *begin* 引数ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® length ã‚’è¶…ãˆã¦ã„ã‚‹ + + +#### 例題 1 + +ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®ä¾‹é¡Œã§ã¯ã€ä»¥ä¸‹ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’使ã„ã¾ã™: + +![](assets/en/API/dataclassAttribute4.png) + + +filterString ã‚„ filterColã€ãŠã‚ˆã³ options 引数を渡ã•ãªã„例: + +```4d + var $employeesCollection : Collection + var $employees : cs.EmployeeSelection + + $employeesCollection:=New collection + $employees:=ds.Employee.all() + $employeesCollection:=$employees.toCollection() +``` + +戻り値: + +```4d +[ + { + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + + } + }, + { + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + } +] +``` + +#### 例題 2 + +options を使用ã—ãŸä¾‹: + +```4d +var $employeesCollection : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection("";dk with primary key+dk with stamp) +``` + +戻り値: + +```4d +[ + { + "__KEY": 416, + "__STAMP": 1, + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }, + { + "__KEY": 417, + "__STAMP": 1, + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }] +``` + +#### 例題 3 + +抽出件数ã¨ã€filterCol ã§æŠ½å‡ºãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’æŒ‡å®šã—ãŸä¾‹: + +```4d +var $employeesCollection; $filter : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$filter:=New collection +$filter.push("firstName") +$filter.push("lastName") + +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection($filter;0;0;2) +``` + +戻り値: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl" + }, + { + "firstName": "Irma", + "lastName": "Durham" + } +] + +``` + + +#### 例題 4 + +`relatedEntity` (リレートエンティティ) åž‹ã®å±žæ€§ã‚’å˜ç´”ãªå½¢å¼ã§æŠ½å‡ºã—ãŸä¾‹: + + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName,lastName,employer") +``` + +戻り値: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "__KEY": 20 + } + } + ] +``` + +#### 例題 5 + +*filterCol* を使用ã—ãŸä¾‹: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection("firstName";"lastName") +$employeesCollection:=$employees.toCollection($coll) +``` + +戻り値: + +```4d +[ + { + "firstName": "Joanna", + "lastName": "Cabrera" + }, + { + "firstName": "Alexandra", + "lastName": "Coleman" + } +] +``` + +#### 例題 6 + +リレートエンティティã®å…¨ãƒ—ロパティを抽出ã™ã‚‹ä¾‹: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection +$coll.push("firstName") +$coll.push("lastName") +$coll.push("employer.*") +$employeesCollection:=$employees.toCollection($coll) +``` + +戻り値: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + } + ] +``` + +#### 例題 7 + +リレートエンティティã®ä¸€éƒ¨ã®ãƒ—ロパティを抽出ã™ã‚‹ä¾‹: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, employer.name") +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "name": "India Astral Secretary" + } + }] +``` + +#### 例題 8 + +`relatedEntities` (リレートエンティティズ) ã®ä¸€éƒ¨ã®ãƒ—ロパティを抽出ã™ã‚‹ä¾‹: + +```4d + var $employeesCollection : Collection + $employeesCollection:=New collection + $employeesCollection:=$employees.toCollection("firstName, lastName, directReports.firstName") +``` + +戻り値: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "firstName": "Gary" + }, + { + "firstName": "Sadie" + }, + { + "firstName": "Christie" + } + ] + }, + { + "firstName": "Gary", + + "lastName": "Reichert", + "directReports": [ + { + "firstName": "Rex" + }, + { + "firstName": "Jenny" + }, + { + "firstName": "Lowell" + } + ] + }] +``` + +#### 例題 9 + +`relatedEntities` (リレートエンティティズ) ã®å…¨ãƒ—ロパティを抽出ã™ã‚‹ä¾‹: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, directReports.*") + +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "ID": 425, + "firstName": "Gary", + "lastName": "Reichert", + "salary": 65800, + "birthDate": "1957-12-23T00:00:00.000Z", + "woman": false, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + }, + { + "ID": 426, + "firstName": "Sadie", + "lastName": "Gallant", + "salary": 35200, + "birthDate": "2022-01-03T00:00:00.000Z", + "woman": true, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + } + ] + }, + { + "firstName": "Gary", + "lastName": "Reichert", + "directReports": [ + { + "ID": 428, + "firstName": "Rex", + "lastName": "Chance", + "salary": 71600, + "birthDate": "1968-08-09T00:00:00.000Z", + "woman": false, + + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + }, + { + "ID": 429, + "firstName": "Jenny", + "lastName": "Parks", + "salary": 51300, + "birthDate": "1984-05-25T00:00:00.000Z", + "woman": true, + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + } + ] + } +] +``` + + + + + + + diff --git a/website/translated_docs/ja/API/FileClass.md b/website/translated_docs/ja/API/FileClass.md new file mode 100644 index 00000000000000..121dc838f482ff --- /dev/null +++ b/website/translated_docs/ja/API/FileClass.md @@ -0,0 +1,1168 @@ +--- +id: FileClass +title: File +--- + +`File` オブジェクト㯠[`File`](#file) コマンドã«ã‚ˆã£ã¦ä½œæˆã•れã¾ã™ã€‚ ã“れらã®ã‚ªãƒ–ジェクトã«ã¯ã€(実在ã—ã¦ã„ã‚‹ã‹å¦ã‹ã«é–¢ã‚らãš) ディスクファイルã¸ã®å‚ç…§ãŒæ ¼ç´ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ–°è¦ãƒ•ァイルを作æˆã™ã‚‹ãŸã‚ã« `File` コマンドを実行ã—ãŸå ´åˆã€æœ‰åŠ¹ãª `File` オブジェクトãŒä½œæˆã•れã¾ã™ãŒã€[`file.create()`](#create) 関数を呼ã³å‡ºã™ã¾ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã¯ãªã«ã‚‚ä¿å­˜ã•れã¦ã„ã¾ã›ã‚“。 + +### 例題 + +プロジェクトフォルダーã«ãƒ—リファレンスファイルを作æˆã—ã¾ã™: + +```code4d +var $created : Boolean +$created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + +### File オブジェクト + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](#copyto)

            copies the `File` object into the specified *destinationFolder* | +| [**.create()** : Boolean ](#create)

            creates a file on disk according to the properties of the `File` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

            creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

            the creation date of the file | +| [**.creationTime** : Time](#creationtime)

            the creation time of the file | +| [**.delete( )**](#delete)

            deletes the file | +| [**.exists** : Boolean](#exists)

            true if the file exists on disk | +| [**.extension** : Text](#extension)

            the extension of the file name (if any) | +| [**.fullName** : Text](#fullname)

            the full name of the file, including its extension (if any) | +| [**.getAppInfo**() : Object](#getappinfo)

            returns the contents of a **.exe**, **.dll** or **.plist** file information as an object | +| [**.getContent( )** : 4D.Blob](#getcontent)

        returns a `4D.Blob` object containing the entire content of a file | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

            the icon of the file | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
        **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](#gettext)

            returns the contents of the file as text | +| [**.hidden** : Boolean](#hidden)

            true if the file is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

            true if the file is an alias, a shortcut, or a symbolic link | +| [**.isFile** : Boolean](#isfile)

            always true for a file | +| [**.isFolder** : Boolean](#isfolder)

            always false for a file | +| [**.isWritable** : Boolean](#iswritable)

            true if the file exists on disk and is writable | +| [**.modificationDate** : Date](#modificationdate)

            the date of the file's last modification | +| [**.modificationTime** : Time](#modificationtime)

            the time of the file's last modification | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File](#moveto)

            moves or renames the `File` object into the specified *destinationFolder* | +| [**.name** : Text](#name)

            the name of the file without extension (if any) | +| [**.original** : 4D.File
        **.original** : 4D.Folder](#original)

            the target element for an alias, a shortcut, or a symbolic link file | +| [**.parent** : 4D.Folder](#parent)

            the parent folder object of the file | +| [**.path** : Text](#path)

            the POSIX path of the file | +| [**.platformPath** : Text](#platformpath)

            the path of the file expressed with the current platform syntax | +| [**.rename**( *newName* : Text ) : 4D.File](#rename)

            renames the file with the name you passed in *newName* and returns the renamed `File` object | +| [**.setAppInfo**( *info* : Object )](#setappinfo)

            writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file | +| [**.setContent** ( *content* : Blob ) ](#setcontent)

            rewrites the entire content of the file using the data stored in the *content* BLOB | +| [**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
        **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) ](#settext)

            writes *text* as the new contents of the file | +| [**.size** : Real](#size)

            the size of the file expressed in bytes | + + + +## File + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**File** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
        **File** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +| 引数 | タイプ | | 説明 | +| ------------ | ------- |:--:| ---------------------------------------------- | +| path | テキスト | -> | ファイルパス | +| fileConstant | æ•´æ•° | -> | 4Dファイル定数 | +| pathType | æ•´æ•° | -> | `fk posix path` (デフォルト) ã¾ãŸã¯ `fk platform path` | +| * | | -> | ホストデータベースã®ãƒ•ァイルを返ã™ã«ã¯ * を渡ã—ã¾ã™ | +| 戻り値 | 4D.File | <- | æ–°è¦ãƒ•ァイルオブジェクト | + + +#### 説明 + +The `File` command creates and returns a new object of the `4D.File` type. ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ 2種類ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’å—ã‘入れã¾ã™ã€‚ + +**File ( path { ; pathType } { ; \* })** + +*path* ã«ã¯ã€ãƒ•ァイルパス文字列を渡ã—ã¾ã™ã€‚ ã‚«ã‚¹ã‚¿ãƒ ã®æ–‡å­—列やファイルシステム (例: "/DATA/myfile.txt") を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> `File` コマンドã§ã¯çµ¶å¯¾ãƒ‘スåã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ + +デフォルトã§ã€4D 㯠POSIXシンタックスã§è¡¨ç¾ã•れãŸãƒ‘スを期待ã—ã¾ã™ã€‚ プラットフォームパスå (Windows ã¾ãŸã¯ macOS) を使用ã™ã‚‹å ´åˆã€*pathType* 引数を使用ã—ã¦ãã®ã“ã¨ã‚’宣言ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 以下ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ---------------- | - | ---------------------------------------------- | +| fk platform path | 1 | プラットフォーム特有ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§è¡¨ç¾ã•れãŸãƒ‘ス (プラットフォームパスåã®å ´åˆã«ã¯å¿…é ˆ) | +| fk posix path | 0 | POSIXシンタックスã§è¡¨ç¾ã•れãŸãƒ‘ス (デフォルト) | + +**File ( fileConstant { ; \* } )** + +*fileConstant* ã«ã¯ã€ä»¥ä¸‹ã®å®šæ•°ã®ã©ã‚Œã‹ä¸€ã¤ã‚’指定ã—㦠4Dビルトインã®ã€ã¾ãŸã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ•ァイルを渡ã—ã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------------------- | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Backup history file | 19 | ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—履歴ファイル。 ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ä¿å­˜å…ˆãƒ•ォルダã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Backup log file | 13 | カレントã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ãƒ­ã‚°ãƒ•ァイル。 アプリケーション㮠Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Backup settings file | 1 | プロジェクト㮠Settings フォルダーã«ã‚ã‚‹ã€ãƒ‡ãƒ•ォルト㮠backup.4DSettings ファイル (xml å½¢å¼) | +| Backup settings file for data | 17 | データフォルダー㮠Settings フォルダーã«ã‚ã‚‹ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル用㮠backup.4DSettings ファイル (xml å½¢å¼) | +| Build application log file | 14 | アプリケーションビルダーã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイル (xml å½¢å¼)。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Build application settings file | 20 | アプリケーションビルダーã®ãƒ‡ãƒ•ォルト設定ファイル ("buildApp.4DSettings")。 プロジェクト㮠Settings フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Compacting log file | 6 | Compact data file コマンドã«ã‚ˆã£ã¦ã€ã‚ã‚‹ã„ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹&セキュリティセンター (MSC) ã«ã‚ˆã£ã¦ä½œæˆã•れãŸã€ç›´è¿‘ã®åœ§ç¸®ã®ãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Current backup settings file | 18 | アプリケーションãŒç¾åœ¨ä½¿ç”¨ã—ã¦ã„ã‚‹ backup.4DSettings ファイル。 使用ã•れるã®ã¯ãƒ‡ãƒ•ォルトã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ファイルã€ã¾ãŸã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ファイルã§ã™ã€‚ | +| Debug log file | 12 | `SET DATABASE PARAMETER(Debug log recording)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Diagnostic log file | 11 | `SET DATABASE PARAMETER(Diagnostic log recording)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Directory file | 16 | プロジェクトアプリケーションã«ãŠã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã‚°ãƒ«ãƒ¼ãƒ— (ã‚れã°) ã®å®šç¾©ãŒæ ¼ç´ã•れ㟠directory.json ファイル。 ã“ã®ãƒ•ァイルã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® user settings フォルダー (デフォルトã€ãƒ—ロジェクトã«å¯¾ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«)ã€ã¾ãŸã¯ data settings フォルダー (データファイル専用) ã«ä¿ç®¡ã•れã¾ã™ã€‚ | +| HTTP debug log file | 9 | `WEB SET OPTION(Web debug log)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| HTTP log file | 8 | `WEB SET OPTION(Web log recording)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| IMAP Log file | 23 | `SET DATABASE PARAMETER(IMAP Log)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Last backup file | 2 | ä»»æ„ã®å ´æ‰€ã«æ ¼ç´ã•れã¦ã„ã‚‹ã€æœ€çµ‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル (åç§°ã¯: \[bkpNum].4BK) | +| Last journal integration log file | 22 | 最後ã®ãƒ­ã‚°çµ±åˆãƒ­ã‚°ãƒ•ァイル (ã‚れã°) ã®å®Œå…¨ãªãƒ‘スå (復元ã•れãŸã‚¢ãƒ—リケーション㮠Logs フォルダー内ã«ä¿å­˜ã•れã¾ã™)。 ã“ã®ãƒ•ァイルã¯ã€è‡ªå‹•修復モードã«ãŠã„ã¦ãƒ­ã‚°ãƒ•ァイル統åˆãŒç™ºç”Ÿã—ãŸæ™‚点ã§ä½œæˆã•れã¾ã™ã€‚ | +| Repair log file | 7 | メンテナンス&セキュリティセンター (MSC) 内ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä¿®å¾©ã®ãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| Request log file | 10 | `SET DATABASE PARAMETER(4D Server log recording)` ã‚ã‚‹ã„㯠`SET DATABASE PARAMETER(Client log recording)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•ã‚ŒãŸæ¨™æº–ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒ­ã‚°ãƒ•ァイル (Webリクエストã¯é™¤å¤–)。 サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れãŸå ´åˆã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒ­ã‚°ãŒè¿”ã•れã¾ã™ (ログファイルã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã® Logsフォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™)。 クライアントã§å®Ÿè¡Œã•れãŸå ´åˆã«ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ãƒ­ã‚°ãŒè¿”ã•れã¾ã™ (ログファイルã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®Logsフォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™)。 | +| SMTP log file | 15 | `SET DATABASE PARAMETER(SMTP Log)` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | +| User settings file | 3 | è¨­å®šãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨åŒã˜éšŽå±¤ã«ã‚ã‚‹ Preferences ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れãŸã€å…¨ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル㮠settings.4DSettings ファイル。 | +| User settings file for data | 4 | データファイルã¨åŒã˜éšŽå±¤ã«ã‚ã‚‹ Preferences ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れãŸã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ•ァイル㮠settings.4DSettings ファイル。 | +| Verification log file | 5 | `VERIFY CURRENT DATA FILE` ãŠã‚ˆã³ `VERIFY DATA FILE` コマンドã«ã‚ˆã£ã¦ã€ã‚ã‚‹ã„ã¯ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹&セキュリティセンター (MSC) ã«ã‚ˆã£ã¦ä½œæˆã•れãŸãƒ­ã‚°ãƒ•ァイル。 Logs フォルダーã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ | + +*fileConstant* å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ•ァイルãŒå­˜åœ¨ã—ãªã„å ´åˆã€null オブジェクトãŒè¿”ã•れã¾ã™ã€‚ エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“。 + +コマンドãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã³å‡ºã•れã¦ã„ã‚‹å ´åˆã€ * 引数を渡ã—ã¦ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘スをå–å¾—ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ * 引数をçœç•¥ã™ã‚‹ã¨ã€å¸¸ã« null オブジェクトãŒè¿”ã•れã¾ã™ã€‚ + + +## 4D.File.new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**4D.File.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
        **4D.File.new** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +#### 説明 + +The `4D.File.new()` function creates and returns a new object of the `4D.File` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`File`](#file) コマンドã¨åŒä¸€ã§ã™ã€‚ + +> `4D.File.new()` よりもã€çŸ­ã„ [`File`](#file) コマンドã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +## .copyTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| 引数 | タイプ | | 説明 | +| ----------------- | --------- |:--:| --------------------------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | コピー先フォルダーã®åå‰ | +| overwrite | æ•´æ•° | -> | 既存è¦ç´ ã‚’上書ãã™ã‚‹ã«ã¯ `fk overwrite` を渡ã—ã¾ã™ | +| 戻り値 | 4D.File | <- | コピーã•れãŸãƒ•ァイル | + + +#### 説明 + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ãƒ•ァイルã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ãŸã¾ã¾ã‚³ãƒ”ーã•れã¾ã™ã€‚ コピーã®éš›ã«ãƒ•ォルダーåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„åå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダー内ã«åŒã˜åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãƒ‡ãƒ•ォルトã§ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ *overwrite* ã« `fk overwrite` 定数を渡ã™ã“ã¨ã§ã€æ—¢å­˜ã®ãƒ•ォルダーを無視ã—ã¦ä¸Šæ›¸ãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| -------------- | - | ------------------ | +| `fk overwrite` | 4 | 既存è¦ç´ ãŒã‚れã°ã€ãれを上書ãã—ã¾ã™ | + + +**戻り値** + +コピーã•れ㟠`File` オブジェクト。 + +#### 例題 + +ユーザーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ォルダーã«ã‚るピクãƒãƒ£ãƒ¼ãƒ•ァイルをã€ã‚¢ãƒ—リケーションフォルダー内ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + + +## .create() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**Not available for ZIP archives** + +**.create()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- | -- | ------------------------------------ | +| 戻り値 | ブール | <- | ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ­£å¸¸ã«ä½œæˆã•れãŸå ´åˆã« trueã€ãれ以外ã®å ´åˆã¯ false | + +#### 説明 + +The `.create()` function creates a file on disk according to the properties of the `File` object. + +å¿…è¦ã§ã‚れã°ã€ 関数㯠[platformPath](#platformpath) ã‚ã‚‹ã„㯠[path](#path) プロパティã®è©³ç´°ã«åŸºã¥ã„ã¦ãƒ•ォルダー階層を作æˆã—ã¾ã™ã€‚ ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã€é–¢æ•°ã¯ä½•ã‚‚ã›ãšã€false ã‚’è¿”ã—ã¾ã™ (エラーã¯è¿”ã•れã¾ã›ã‚“)。 + +**戻り値** + +* ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ­£å¸¸ã«ä½œæˆã•れãŸå ´åˆã«ã¯ **true** +* ã™ã§ã«åŒã˜åå‰ã®ãƒ•ァイルãŒå­˜åœ¨ã™ã‚‹ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ **false** + +#### 例題 + +データベースフォルダー内ã«ãƒ—リファレンスファイルを作æˆã—ã¾ã™: + +```4d + var $created : Boolean + $created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + + + + + +## .createAlias() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File +| 引数 | タイプ | | 説明 | +| ----------------- | --------- | -- | ------------------------ | +| destinationFolder | 4D.Folder | -> | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®ä½œæˆå…ˆãƒ•ォルダー | +| aliasName | テキスト | -> | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®åç§° | +| aliasType | æ•´æ•° | -> | エイリアスリンクã®ã‚¿ã‚¤ãƒ— | +| 戻り値 | 4D.File | <- | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®ãƒ•ァイルå‚ç…§ | + + +#### 説明 + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the file with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +*aliasName* ã«ã¯ã€ä½œæˆã™ã‚‹ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + +macOS 上ã§ã¯ã€ã“ã®é–¢æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ¨™æº–エイリアスを作æˆã—ã¾ã™ã€‚ *aliasType* 引数を渡ã™ã“ã¨ã§ã€ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 以下ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ------------------ | - | ------------------- | +| `fk alias link` | 0 | エイリアスリンク (デフォルト) | +| `fk symbolic link` | 1 | シンボリックリンク (macOSã®ã¿) | + +Windows 上ã§ã¯ã€å¸¸ã«ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ (.lnk ファイル) ãŒä½œæˆã•れã¾ã™ (*aliasType* 引数ã¯ç„¡è¦–ã•れã¾ã™)。 + + +**è¿”ã•れるオブジェクト** + +`isAlias` プロパティ㌠**true** ã«è¨­å®šã•れ㟠`4D.File` オブジェクトを返ã—ã¾ã™ã€‚ + +#### 例題 + +データベースフォルダー内ã®ãƒ•ァイルã¸ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’作æˆã—ã¾ã™: + +```4d + $myFile:=Folder(fk documents folder).file("Archives/ReadMe.txt") + $aliasFile:=$myFile.createAlias(File("/PACKAGE");"ReadMe") +``` + + + + +## .creationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationDate** : Date + +#### 説明 + +The `.creationDate` property returns the creation date of the file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .creationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationTime** : Time + +#### 説明 + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .delete() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.delete( )** + +| 引数 | タイプ | | 説明 | +| -- | --- | | ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + +#### 説明 + +The `.delete()` function deletes the file. + +ファイルãŒç¾åœ¨é–‹ã„ã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€é–¢æ•°ã¯ä½•ã‚‚ã—ã¾ã›ã‚“ (エラーã¯ä½•も生æˆã•れã¾ã›ã‚“)。 +> **警告**: `.delete( )` ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ä»»æ„ã®ãƒ•ァイルを削除ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã¯ã€ä»–ã®ã‚¢ãƒ—リケーションã§ä½œæˆã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚„ã€ã‚¢ãƒ—リケーションãã®ã‚‚ã®ã‚‚対象ã«ãªã‚Šã¾ã™ã€‚ ãã®ãŸã‚ã€`.delete( )` ã¯ç‰¹ã«ååˆ†ãªæ³¨æ„を払ã£ã¦ä½¿ç”¨ã—ã¦ãã ã•ã„。 ファイルã®å‰Šé™¤ã¯æ’ä¹…çš„ãªæ“作ã§ã‚りå–り消ã—ã§ãã¾ã›ã‚“。 + +#### 例題 + +データベースフォルダー内ã®ç‰¹å®šã®ãƒ•ァイルを削除ã—ã¾ã™: + +```4d + $tempo:=File("/PACKAGE/SpecialPrefs/"+Current user+".prefs") + If($tempo.exists) + $tempo.delete() + ALERT("ユーザーã®ãƒ—リファレンスファイルãŒå‰Šé™¤ã•れã¾ã—ãŸã€‚") + End if +``` + + + + +## .exists + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.exists** : Boolean + +#### 説明 + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + + +## .extension + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.extension** : Text +#### 説明 + +The `.extension` property returns the extension of the file name (if any). æ‹¡å¼µå­ã¯å¿…ãš"." ã§å§‹ã¾ã‚Šã¾ã™ã€‚ ファイルåãŒæ‹¡å¼µå­ã‚’æŒãŸãªã„å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .fullName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.fullName** : Text +#### 説明 + +The `.fullName` property returns the full name of the file, including its extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .getAppInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.getAppInfo**() : Object +| 引数 | タイプ | | 説明 | +| --- | ------ | -- | ------------------------------------ | +| 戻り値 | オブジェクト | <- | .exe/.dll ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒªã‚½ãƒ¼ã‚¹ã‚„ .plist ファイルã®ä¸­èº« | + + +#### 説明 + +The `.getAppInfo()` function returns the contents of a **.exe**, **.dll** or **.plist** file information as an object. + +ã“ã®é–¢æ•°ã¯ã€æ—¢å­˜ã® .exeã€.dllã€ã‚ã‚‹ã„㯠.plist ファイルã¨ä½¿ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ã€æœ‰åŠ¹ãª .exe ã‚„ .dllã€.plist ファイルã§ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ç©ºã®ã‚ªãƒ–ジェクトを返ã—ã¾ã™ (エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 + +> ã“ã®é–¢æ•°ã¯ xmlå½¢å¼ã® .plist ファイル (テキスト) ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ ãƒã‚¤ãƒŠãƒªå½¢å¼ã® .plist ファイルを対象ã«ä½¿ç”¨ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +**.exe ã¾ãŸã¯ .dll ファイルã®å ´åˆã«è¿”ã•れるオブジェクト** + +> .exe ãŠã‚ˆã³ .dll ファイルã®èª­ã¿å–り㯠Windows上ã§ã®ã¿å¯èƒ½ã§ã™ã€‚ + +プロパティã¯ã™ã¹ã¦ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚ + +| プロパティ | タイプ | +| ---------------- | ---- | +| InternalName | テキスト | +| ProductName | テキスト | +| CompanyName | テキスト | +| LegalCopyright | テキスト | +| ProductVersion | テキスト | +| FileDescription | テキスト | +| FileVersion | テキスト | +| OriginalFilename | テキスト | + +**.plist ファイルã®å ´åˆã«è¿”ã•れるオブジェクト** + +xml ファイルã®ä¸­èº«ã¯è§£æžã•れã€ã‚ªãƒ–ジェクトã®ãƒ—ロパティã¨ã—ã¦ã‚­ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚キーã®åž‹ (テキストã€ãƒ–ãƒ¼ãƒ«ã€æ•°å€¤) ã¯ç¶­æŒã•れã¾ã™ã€‚ `.plist dict` 㯠JSON オブジェクトã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ã¾ãŸã€`.plist array` 㯠JSON é…列ã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ + +#### 例題 + +```4d + // アプリケーション㮠.exe ファイルã®è‘—作権情報を表示ã—ã¾ã™ (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=$exeFile.getAppInfo() +ALERT($info.LegalCopyright) + + // info.plistã®è‘—作権情報を表示ã—ã¾ã™ (Windows ãŠã‚ˆã³ macOS) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=$infoPlistFile.getAppInfo() +ALERT($info.Copyright) +``` + +#### å‚ç…§ + +[.setAppInfo()](#setappinfo) + + + +## .getContent() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------- | +| v19 R2 | 4D.Blob ã‚’è¿”ã—ã¾ã™ | +| v17 R5 | 追加 | +
        + +**.getContent( )** : 4D.Blob +| 引数 | タイプ | | 説明 | +| --- | ------- | -- | ---------- | +| 戻り値 | 4D.Blob | <- | ファイルã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ | + + +#### 説明 + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. BLOB ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[BLOB](Concepts/dt_blob.md) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +**戻り値** + +`4D.Blob` オブジェクト。 + +#### 例題 + +ドキュメントã®ä¸­èº«ã‚’ `BLOB` フィールドã«ä¿å­˜ã—ã¾ã™: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) // キュメントãŒé¸æŠžã•れã¦ã„れ㰠+ [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + + + +## .getIcon() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getIcon**( { *size* : Integer } ) : Picture +| 引数 | タイプ | | 説明 | +| ---- | ----- | -- | ------------------------ | +| size | æ•´æ•° | -> | å–å¾—ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ä¸€è¾ºã®é•·ã• (ピクセルå˜ä½) | +| 戻り値 | ピクãƒãƒ£ãƒ¼ | <- | アイコン | + + +#### 説明 + +The `.getIcon()` function returns the icon of the file. + +ä»»æ„ã® *size* 引数を渡ã™ã¨ã€è¿”ã•れるアイコンã®ã‚µã‚¤ã‚ºã‚’ピクセルå˜ä½ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å€¤ã¯ã€å®Ÿéš›ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’æ ¼ç´ã—ã¦ã„る正方形ã®ä¸€è¾ºã®é•·ã•を表ã—ã¦ã„ã¾ã™ã€‚ アイコンã¯é€šå¸¸ã€32x32ピクセル ("大ãã„アイコン") ã¾ãŸã¯ 16x16ピクセル ("å°ã•ã„アイコン") ã§å®šç¾©ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å¼•æ•°ã« 0 を渡ã™ã‹çœç•¥ã—ãŸå ´åˆã€"大ãã„アイコン" ãŒè¿”ã•れã¾ã™ã€‚ + +ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ãƒ‡ãƒ•ォルトã®ç©ºã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +**戻り値** + +ファイルアイコン㮠[ピクãƒãƒ£ãƒ¼](../Concepts/picture.html)。 + + + + + + +## .getText() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
        **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| 引数 | タイプ | | 説明 | +| ----------- | ---- | -- | ---------------- | +| charSetName | テキスト | -> | 文字セットã®åå‰ | +| charSetNum | æ•´æ•° | -> | 文字セットã®ç•ªå· | +| breakMode | æ•´æ•° | -> | 改行ã®å‡¦ç†ãƒ¢ãƒ¼ãƒ‰ | +| 戻り値 | テキスト | <- | ドキュメントã‹ã‚‰å–å¾—ã—ãŸãƒ†ã‚­ã‚¹ãƒˆ | + + +#### 説明 +The `.getText()` function returns the contents of the file as text . + +ä»»æ„ã§ã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®èª­ã¿å–りã«ä½¿ç”¨ã™ã‚‹æ–‡å­—セットを渡ã—ã¾ã™ã€‚ ã“れã«ã¯ã€æ¬¡ã®äºŒã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- *charSetName* ã«æ¨™æº–ã®æ–‡å­—セットåã‚’å«ã‚“ã æ–‡å­—列 ("ISO-8859-1" ã‚„ "UTF-8" ãªã©) を渡ã—ã¾ã™ã€‚ +- *charSetNum* ã«æ¨™æº–ã®æ–‡å­—セットåã® MIBEnum ID (å€é•·æ•´æ•°) を渡ã—ã¾ã™ã€‚ + +> 4D ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る文字セットã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ã€`CONVERT FROM TEXT` コマンドをå‚ç…§ãã ã•ã„。 + +ドキュメントã«ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ãƒžãƒ¼ã‚¯ (BOM) ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€4D 㯠*charSetName* ã¾ãŸã¯ *charSetNum* 引数ã§è¨­å®šã•れã¦ã„る文字セットã§ã¯ãªãã€BOM ã§æŒ‡å®šã•れãŸã‚‚ã®ã‚’使用ã—ã¾ã™ (çµæžœã¨ã—ã¦å¼•æ•°ã¯ç„¡è¦–ã•れã¾ã™)。 ドキュメント㫠BOM ãŒå«ã¾ã‚Œã¦ãŠã‚‰ãšã€ã¾ãŸ *charSetName* ãŠã‚ˆã³ *charSetNum* å¼•æ•°ãŒæ¸¡ã•れãªã‹ã£ãŸå ´åˆã€4D ã¯ãƒ‡ãƒ•ォルト㧠"UTF-8" を文字セットã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +*breakMode* ã«ã¯ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ”¹è¡Œæ–‡å­—ã«å¯¾ã—ã¦ãŠã“ãªã†å‡¦ç†ã‚’指定ã™ã‚‹å€é•·æ•´æ•°ã‚’渡ã—ã¾ã™ã€‚ "System Documents" テーマã®ã€ä»¥ä¸‹ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------- | - | --------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | 何も処ç†ã‚’ã—ã¾ã›ã‚“。 | +| `Document with native format` | 1 | (デフォルト) 改行㯠OS ã®ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã«å¤‰æ›ã•れã¾ã™ã€‚macOS ã§ã¯ CR (キャリッジリターン) ã«ã€Windows ã§ã¯ CRLF (キャリッジリターン+ラインフィード) ã«å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CRLF` | 2 | 改行㯠Windowsフォーマット (CRLFã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ï¼‹ãƒ©ã‚¤ãƒ³ãƒ•ィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CR` | 3 | 改行㯠macOSフォーマット (CRã€ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with LF` | 4 | 改行㯠Unixフォーマット (LFã€ãƒ©ã‚¤ãƒ³ãƒ•ィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | + +*breakMode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€æ”¹è¡Œã¯ãƒã‚¤ãƒ†ã‚£ãƒ–モード (1) ã§å‡¦ç†ã•れã¾ã™ã€‚ + +**戻り値** + +ファイルã®ãƒ†ã‚­ã‚¹ãƒˆã€‚ + +#### 例題 + +以下ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’æŒã¤ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒã‚ã‚‹å ´åˆã‚’考ãˆã¾ã™ (フィールドã¯ã‚¿ãƒ–区切りã§ã™): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã¨: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") // デフォルトã§UTF-8 + $txt:=$myFile.getText() +``` +以下ã®çµæžœãŒå¾—られã¾ã™: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR (キャリッジリターン) +``` + + + + + + + +## .hidden + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.hidden** : Boolean + +#### 説明 + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .isAlias + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isAlias** : Boolean + +#### 説明 + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .isFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFile** : Boolean + +#### 説明 + +The `.isFile` property returns always true for a file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isFolder + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFolder** : Boolean + +#### 説明 + +The `.isFolder` property returns always false for a file. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isWritable + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isWritable** : Boolean + +#### 説明 + +The `.isWritable` property returns true if the file exists on disk and is writable. +> ã“ã®ãƒ—ロパティ㯠4DアプリケーションãŒãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã‚ã‚‹ã‹ã©ã†ã‹ (アクセス権é™) ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ãƒ•ァイル㮠*writable* (書ãè¾¼ã¿å¯èƒ½) 属性ã®ã¿ä¾å­˜ã™ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + +**例題** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + + +## .modificationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationDate** : Date + +#### 説明 + +The `.modificationDate` property returns the date of the file's last modification. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .modificationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationTime** : Time + +##### 説明 + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .moveTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File +| 引数 | タイプ | | 説明 | +| ----------------- | --------- | -- | --------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | 移動先ã§ã®ãƒ•ァイルã®å®Œå…¨ãªåç§° | +| 戻り値 | 4D.File | <- | 移動ã—ãŸãƒ•ァイル | + + +#### 説明 + +The `.moveTo()` function moves or renames the `File` object into the specified *destinationFolder*. + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ç§»å‹•ã—ãŸãƒ•ァイルã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ã¾ã™ã€‚ 移動ã®éš›ã«ãƒ•ァイルåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„完全ãªåå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +移動後㮠`File` オブジェクト。 + +#### 例題 + + +```4d +$DocFolder:=Folder(fk documents folder) +$myFile:=$DocFolder.file("Current/Infos.txt") +$myFile.moveTo($DocFolder.folder("Archives");"Infos_old.txt") +``` + + + + +## .name + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.name** : Text + +#### 説明 + +The `.name` property returns the name of the file without extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .original + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.original** : 4D.File
        **.original** : 4D.Folder + +#### 説明 + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. ターゲットè¦ç´ ã¯ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã§ã™: + +* File オブジェクト +* Folder オブジェクト + +エイリアスã§ãªã„ファイルã«ã¤ã„ã¦ã¯ã€ãƒ—ロパティã¯åŒã˜ãƒ•ァイルオブジェクトをファイルã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .parent + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.parent** : 4D.Folder + +#### 説明 + +The `.parent` property returns the parent folder object of the file. パスãŒã‚·ã‚¹ãƒ†ãƒ ãƒ‘スを表ã™å ´åˆ (例: "/DATA/")ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .path + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.path** : Text + +#### 説明 + +The `.path` property returns the POSIX path of the file. パスãŒãƒ•ァイルシステムを表ã™å ´åˆ (例: "/DATA/")ã€ãƒ•ァイルシステムãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .platformPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.platformPath** : Text + +#### 説明 + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .rename() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.rename**( *newName* : Text ) : 4D.File +| 引数 | タイプ | | 説明 | +| ------- | ------- | -- | ------------- | +| newName | テキスト | -> | ãƒ•ã‚¡ã‚¤ãƒ«ã®æ–°ã—ã„完全ãªåç§° | +| 戻り値 | 4D.File | <- | å称変更ã•れãŸãƒ•ァイル | + +#### 説明 + +The `.rename()` function renames the file with the name you passed in *newName* and returns the renamed `File` object. + +*newName* 引数ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ åŒã˜åå‰ã®ãƒ•ァイルãŒã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ãƒ•ァイルã®å®Œå…¨ãªåå‰ã‚’編集ã™ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ã¤ã¾ã‚Šã€*newName* ã«æ‹¡å¼µå­ã‚’渡ã•ãªã‹ã£ãŸå ´åˆã€æ–°ã—ã„ファイルåã«ã¯æ‹¡å¼µå­ãŒã‚りã¾ã›ã‚“。 + + +**è¿”ã•れるオブジェクト** + +å称変更ã•れ㟠`File` オブジェクト。 + +#### 例題 + +"ReadMe.txt" ファイルを "ReadMe_new.txt" ã¨ã„ã†ãƒ•ァイルã«å称変更ã—ã¾ã™: + +```4d + $toRename:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + $newName:=$toRename.rename($toRename.name+"_new"+$toRename.extension) +``` + + +## .setAppInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.setAppInfo**( *info* : Object ) +| 引数 | タイプ | | 説明 | +| ---- | ------ | -- | ------------------------------------------- | +| info | オブジェクト | -> | .exe/.dll ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒªã‚½ãƒ¼ã‚¹ã‚„ .plist ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ã込むプロパティ | + + +#### 説明 + +The `.setAppInfo()` function writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file. + +ã“ã®é–¢æ•°ã¯ã€æ—¢å­˜ã® .exeã€.dllã€ã‚ã‚‹ã„㯠.plist ファイルã¨ä½¿ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ã€æœ‰åŠ¹ãª .exe ã‚„ .dllã€.plist ファイルã§ãªã„å ´åˆã€ã“ã®é–¢æ•°ã¯ä½•ã‚‚ã—ã¾ã›ã‚“ (エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 + +> ã“ã®é–¢æ•°ã¯ xmlå½¢å¼ã® .plist ファイル (テキスト) ã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ ãƒã‚¤ãƒŠãƒªå½¢å¼ã® .plist ファイルを対象ã«ä½¿ç”¨ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +**.exe ã¾ãŸã¯ .dll ファイル用㮠*info* オブジェクト** + +> .exe ãŠã‚ˆã³ .dll ãƒ•ã‚¡ã‚¤ãƒ«æƒ…å ±ã®æ›¸ãè¾¼ã¿ã¯ Windows上ã§ã®ã¿å¯èƒ½ã§ã™ã€‚ + +*info* オブジェクトã«è¨­å®šã•れãŸå„プロパティ㯠.exe ã¾ãŸã¯ .dll ファイルã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒªã‚½ãƒ¼ã‚¹ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ 以下ã®ãƒ—ロパティãŒä½¿ç”¨ã§ãã¾ã™ (ãれ以外ã®ãƒ—ロパティã¯ç„¡è¦–ã•れã¾ã™): + +| プロパティ | タイプ | +| ---------------- | ---- | +| InternalName | テキスト | +| ProductName | テキスト | +| CompanyName | テキスト | +| LegalCopyright | テキスト | +| ProductVersion | テキスト | +| FileDescription | テキスト | +| FileVersion | テキスト | +| OriginalFilename | テキスト | + +値ã¨ã—㦠null ã¾ãŸã¯ç©ºãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã¨ã€ç©ºã®æ–‡å­—列ãŒãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã«æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ テキストã§ãªã„åž‹ã®å€¤ã‚’渡ã—ãŸå ´åˆã«ã¯ã€æ–‡å­—列ã«å¤‰æ›ã•れã¾ã™ã€‚ + + +**.plist ファイル用㮠*info* オブジェクト** + +*info* オブジェクトã«è¨­å®šã•れãŸå„プロパティ㯠.plist ファイルã«ã‚­ãƒ¼ã¨ã—ã¦æ›¸ãè¾¼ã¾ã‚Œã¾ã™ã€‚ ã‚らゆるキーã®åç§°ãŒå—ã‘入れられã¾ã™ã€‚ 値ã®åž‹ã¯å¯èƒ½ãªé™ã‚Šç¶­æŒã•れã¾ã™ã€‚ + +*info* ã«è¨­å®šã•れãŸã‚­ãƒ¼ãŒ .plist ファイル内ã§ã™ã§ã«å®šç¾©ã•れã¦ã„ã‚‹å ´åˆã¯ã€ãã®å€¤ãŒæ›´æ–°ã•れã€å…ƒã®åž‹ãŒç¶­æŒã•れã¾ã™ã€‚ .plist ãƒ•ã‚¡ã‚¤ãƒ«ã«æ—¢å­˜ã®ãã®ã»ã‹ã®ã‚­ãƒ¼ã¯ãã®ã¾ã¾ç¶­æŒã•れã¾ã™ã€‚ + +> 日付型ã®å€¤ã‚’定義ã™ã‚‹ã«ã¯ã€Xcode plist エディターã®ã‚ˆã†ã«ãƒŸãƒªç§’を除ã„㟠ISO UTC å½¢å¼ã® JSONタイムスタンプ文字列 (例: "2003-02-01T01:02:03Z") を使用ã—ã¾ã™ã€‚ + +#### 例題 + +```4d + // .exe ファイルã®è‘—作権ãŠã‚ˆã³ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…報を設定ã—ã¾ã™ (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=New object +$info.LegalCopyright:="Copyright 4D 2021" +$info.ProductVersion:="1.0.0" +$exeFile.setAppInfo($info) +``` + +```4d + // info.plist ファイルã®ã‚­ãƒ¼ã‚’ã„ãã¤ã‹è¨­å®šã—ã¾ã™ (Windows ãŠã‚ˆã³ macOS) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=New object +$info.Copyright:="Copyright 4D 2021" // テキスト +$info.ProductVersion:=12 // æ•´æ•° +$info.ShipmentDate:="2021-04-22T06:00:00Z" // タイムスタンプ +$infoPlistFile.setAppInfo($info) +``` + +#### å‚ç…§ + +[.getAppInfo()](#getappinfo) + +## .setContent() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.setContent** ( *content* : Blob ) +| 引数 | タイプ | | 説明 | +| ------- | ---- | -- | ------------- | +| content | BLOB | -> | ãƒ•ã‚¡ã‚¤ãƒ«ã®æ–°ã—ã„コンテンツ | + + +#### 説明 + +The `.setContent( )` function rewrites the entire content of the file using the data stored in the *content* BLOB. BLOB ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[BLOB](Concepts/dt_blob.md) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +#### 例題 + +```4d + $myFile:=Folder(fk documents folder).file("Archives/data.txt") + $myFile.setContent([aTable]aBlobField) +``` + + + + + +## .setText() + + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
        **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) + +| 引数 | タイプ | | 説明 | +| ----------- | ---- | -- | ------------- | +| text | テキスト | -> | ファイルã«ä¿å­˜ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ | +| charSetName | テキスト | -> | 文字セットã®åå‰ | +| charSetNum | æ•´æ•° | -> | 文字セットã®ç•ªå· | +| breakMode | æ•´æ•° | -> | 改行ã®å‡¦ç†ãƒ¢ãƒ¼ãƒ‰ | +#### 説明 + +The `.setText()` function writes *text* as the new contents of the file. + +`File` オブジェクトã§å‚ç…§ã•れã¦ã„るファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒãã®ãƒ•ァイルを作æˆã—ã¾ã™ã€‚ ディスク上ã«ãƒ•ァイルãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãƒ•ァイルãŒé–‹ã‹ã‚Œã¦ã„ã‚‹å ´åˆã‚’除ãã€ä»¥å‰ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯æ¶ˆåŽ»ã•れã¾ã™ã€‚ファイルãŒé–‹ã‹ã‚Œã¦ã„ã‚‹å ´åˆã¯ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯ãƒ­ãƒƒã‚¯ã•れã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +*text* ã«ã¯ã€ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ã込むテキストを渡ã—ã¾ã™ã€‚ テキストリテラル ("my text" ãªã©) ã®ã»ã‹ã€4Dテキストフィールドや変数も渡ã›ã¾ã™ã€‚ + +ä»»æ„ã§ã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®æ›¸ãè¾¼ã¿ã«ä½¿ç”¨ã™ã‚‹æ–‡å­—セットを渡ã—ã¾ã™ã€‚ ã“れã«ã¯ã€æ¬¡ã®äºŒã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- *charSetName* ã«æ¨™æº–ã®æ–‡å­—セットåã‚’å«ã‚“ã æ–‡å­—列 ("ISO-8859-1" ã‚„ "UTF-8" ãªã©) を渡ã—ã¾ã™ã€‚ +- *charSetNum* ã«æ¨™æº–ã®æ–‡å­—セットåã® MIBEnum ID (å€é•·æ•´æ•°) を渡ã—ã¾ã™ã€‚ + +> 4D ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る文字セットã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ã€`CONVERT FROM TEXT` コマンドをå‚ç…§ãã ã•ã„。 + +文字セットã«ãƒã‚¤ãƒˆã‚ªãƒ¼ãƒ€ãƒ¼ãƒžãƒ¼ã‚¯ (BOM) ãŒå­˜åœ¨ã—ã€ã‹ã¤ãã®æ–‡å­—セット㫠"-no-bom" 接尾辞 (例: "UTF-8-no-bom") ãŒå«ã¾ã‚Œã¦ã„ãªã„å ´åˆã€4D 㯠BOM ã‚’ãƒ•ã‚¡ã‚¤ãƒ«ã«æŒ¿å…¥ã—ã¾ã™ã€‚ 文字セットを指定ã—ãªã„å ´åˆã€ 4D ã¯ãƒ‡ãƒ•ォルト㧠"UTF-8" ã®æ–‡å­—セットを使用ã—ã¾ã™ã€‚ + +*breakMode* ã«ã¯ã€ãƒ•ァイルをä¿å­˜ã™ã‚‹å‰ã«æ”¹è¡Œæ–‡å­—ã«å¯¾ã—ã¦ãŠã“ãªã†å‡¦ç†ã‚’指定ã™ã‚‹å€é•·æ•´æ•°ã‚’渡ã—ã¾ã™ã€‚ **System Documents** テーマ内ã«ã‚ã‚‹ã€ä»¥ä¸‹ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ----------------------------- | - | ------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | 何も処ç†ã‚’ã—ã¾ã›ã‚“。 | +| `Document with native format` | 1 | (デフォルト) 改行㯠OS ã®ãƒã‚¤ãƒ†ã‚£ãƒ–フォーマットã«å¤‰æ›ã•れã¾ã™ã€‚macOS ã§ã¯ LF (ラインフィード) ã«ã€Windows ã§ã¯ CRLF (キャリッジリターン+ラインフィード) ã«å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CRLF` | 2 | 改行㯠Windows ã®ãƒ‡ãƒ•ォルトフォーマットã§ã‚ã‚‹ CRLF (キャリッジリターン+ラインフィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with CR` | 3 | 改行ã¯ã‚¯ãƒ©ã‚·ãƒƒã‚¯ Mac OS ã®ãƒ‡ãƒ•ォルトフォーマットã§ã‚ã‚‹ CR (キャリッジリターン) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | +| `Document with LF` | 4 | 改行㯠Unix ãŠã‚ˆã³ macOS ã®ãƒ‡ãƒ•ォルトフォーマットã§ã‚ã‚‹ LF (ラインフィード) ã¸ã¨å¤‰æ›ã•れã¾ã™ã€‚ | + +*breakMode* 引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€æ”¹è¡Œã¯ãƒã‚¤ãƒ†ã‚£ãƒ–モード (1) ã§å‡¦ç†ã•れã¾ã™ã€‚ + +> **äº’æ›æ€§ã«é–¢ã™ã‚‹æ³¨è¨˜:** EOL (改行コード) ãŠã‚ˆã³ BOM ã®ç®¡ç†ã«ã¤ã„ã¦ã¯ã€äº’æ›æ€§ã‚ªãƒ—ションãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ doc.4d.com ã®[äº’æ›æ€§ãƒšãƒ¼ã‚¸](https://doc.4d.com/4dv19R/help/title/ja/page3239.html) ã‚’å‚ç…§ãã ã•ã„。 + +#### 例題 + +```4d +$myFile:=File("C:\\Documents\\Hello.txt";fk platform path) +$myFile.setText("Hello world") +``` + + + + + +## .size + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.size** : Real + +#### 説明 + +The `.size` property returns the size of the file expressed in bytes. ファイルãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ã‚µã‚¤ã‚ºã¯ 0 ã«ãªã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + diff --git a/website/translated_docs/ja/API/FolderClass.md b/website/translated_docs/ja/API/FolderClass.md new file mode 100644 index 00000000000000..f554aa4fc64676 --- /dev/null +++ b/website/translated_docs/ja/API/FolderClass.md @@ -0,0 +1,957 @@ +--- +id: FolderClass +title: Folder +--- + + + +`Folder` オブジェクト㯠[`Folder`](#folder) コマンドã«ã‚ˆã£ã¦ä½œæˆã•れã¾ã™ã€‚ ã“れらã®ã‚ªãƒ–ジェクトã«ã¯ã€(実在ã—ã¦ã„ã‚‹ã‹å¦ã‹ã«é–¢ã‚らãš) フォルダーã¸ã®å‚ç…§ãŒæ ¼ç´ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ–°è¦ãƒ•ォルダーを作æˆã™ã‚‹ãŸã‚ã« `Folder` コマンドを実行ã—ãŸå ´åˆã€æœ‰åŠ¹ãª `Folder` オブジェクトãŒä½œæˆã•れã¾ã™ãŒã€[`folder.create()`](#create) 関数を呼ã³å‡ºã™ã¾ã§ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã¯ãªã«ã‚‚ä¿å­˜ã•れã¦ã„ã¾ã›ã‚“。 + +### 例題 + +"JohnSmith" フォルダーを作æˆã—ã¾ã™: + +```code4d +Form.curfolder:=Folder(fk database folder) +Form.curfolder:=Folder("C:\\Users\\JohnSmith\\";fk platform path) +``` + +### Folder オブジェクト + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](#copyto)

            copies the `Folder` object into the specified *destinationFolder* | +| [**.create()** : Boolean](#create)

            creates a folder on disk according to the properties of the `Folder` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

            creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

            the creation date of the folder | +| [**.creationTime** : Time](#creationtime)

            the creation time of the folder | +| [**.delete**( { *option* : Integer } )](#delete)

            deletes the folder | +| [**.exists** : Boolean](#exists)

            true if the folder exists on disk | +| [**.extension** : Text](#extension)

            returns the extension of the folder name (if any) | +| [**.fullName** : Text](#fullname)

            returns the full name of the folder, including its extension (if any) | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

            returns the icon of the folder | +| [**.hidden** : Boolean](#hidden)

             true if the folder is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

            always **false** for a `Folder` object | +| [**.isFile** : Boolean](#isfile)

            always **false** for a folder | +| [**.isFolder** : Boolean](#isfolder)

            always **true** for a folder | +| [**.isPackage** : Boolean](#ispackage)

            true if the folder is a package on macOS (and exists on disk) | +| [**.modificationDate** : Date](#modificationdate)

             the date of the folder's last modification | +| [**.modificationTime** : Time](#modificationtime)

            the time of the folder's last modification | +| [**.name** : Text](#name)

             the name of the folder, without extension (if any) | +| [**.original** : 4D.Folder](#original)

            the same Folder object as the folder | +| [**.parent** : 4D.Folder](#parent)

            the parent folder object of the folder | +| [**.path** : Text](#path)

            the POSIX path of the folder | +| [**.platformPath** : Text](#platformpath)

            the path of the folder expressed with the current platform syntax | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder](#moveto)

            moves or renames the `Folder` object (source folder) into the specified *destinationFolder* | +| [**.rename**( *newName* : Text ) : 4D.Folder](#rename)

            renames the folder with the name you passed in *newName* and returns the renamed `Folder` object | + + + +## Folder + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**Folder** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
        **Folder** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +| 引数 | タイプ | | 説明 | +| -------------- | --------- |:--:| ---------------------------------------------- | +| path | テキスト | -> | フォルダーパス | +| folderConstant | æ•´æ•° | -> | 4Dフォルダー定数 | +| pathType | æ•´æ•° | -> | `fk posix path` (デフォルト) ã¾ãŸã¯ `fk platform path` | +| * | | -> | ホストデータベースã®ãƒ•ォルダーを返ã™ã«ã¯ * を渡ã—ã¾ã™ | +| 戻り値 | 4D.Folder | <- | æ–°è¦ãƒ•ォルダーオブジェクト | + + +#### 説明 + +The `Folder` command creates and returns a new object of the `4D.Folder` type. ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ 2種類ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’å—ã‘入れã¾ã™ã€‚ + +**Folder ( path { ; pathType } { ; \* } )** + +*path* ã«ã¯ã€ãƒ•ォルダーパス文字列を渡ã—ã¾ã™ã€‚ ã‚«ã‚¹ã‚¿ãƒ ã®æ–‡å­—列やファイルシステム (例: "/DATA") を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> `Folder` コマンドã§ã¯çµ¶å¯¾ãƒ‘スåã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ + +デフォルトã§ã€4D 㯠POSIXシンタックスã§è¡¨ç¾ã•れãŸãƒ‘スを期待ã—ã¾ã™ã€‚ プラットフォームパスå (Windows ã¾ãŸã¯ macOS) を使用ã™ã‚‹å ´åˆã€*pathType* 引数を使用ã—ã¦ãã®ã“ã¨ã‚’宣言ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 以下ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ---------------- | - | ---------------------------------------------- | +| fk platform path | 1 | プラットフォーム特有ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§è¡¨ç¾ã•れãŸãƒ‘ス (プラットフォームパスåã®å ´åˆã«ã¯å¿…é ˆ) | +| fk posix path | 0 | POSIXシンタックスã§è¡¨ç¾ã•れãŸãƒ‘ス (デフォルト) | + +**Folder ( folderConstant { ; \* } )** + +*folderConstant* ã«ã¯ã€ä»¥ä¸‹ã®å®šæ•°ã®ã©ã‚Œã‹ä¸€ã¤ã‚’指定ã—㦠4Dビルトインã®ã€ã¾ãŸã¯ã‚·ã‚¹ãƒ†ãƒ ãƒ•ォルダーを渡ã—ã¾ã™: + +| 定数 | 値 | 説明 | +| -------------------------- | --- | ------------------------------------------------------------------------ | +| fk applications folder | 116 | | +| fk data folder | 9 | 関連ã¥ã‘られãŸãƒ•ァイルシステム: "/DATA" | +| fk database folder | 4 | 関連ã¥ã‘られãŸãƒ•ァイルシステム: "/PACKAGE" | +| fk desktop folder | 115 | | +| fk documents folder | 117 | ユーザーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ォルダー | +| fk licenses folder | 1 | マシン㮠4Dライセンスファイルを格ç´ã—ã¦ã„るフォルダー | +| fk logs folder | 7 | 関連ã¥ã‘られãŸãƒ•ァイルシステム: "/LOGS" | +| fk mobileApps folder | 10 | 関連ã¥ã‘られãŸãƒ•ァイルシステム: "/DATA" | +| fk remote database folder | 3 | ãれãžã‚Œã® 4Dリモートマシン上ã«ä½œæˆã•れ㟠4Dデータベースフォルダー | +| fk resources folder | 6 | 関連ã¥ã‘られãŸãƒ•ァイルシステム: "/RESOURCES" | +| fk system folder | 100 | | +| fk user preferences folder | 0 | ユーザー環境設定ファイルを \ ディレクトリã«ä¿å­˜ã—ã¦ã„ã‚‹ 4Dフォルダー | +| fk web root folder | 8 | データベースã®ã‚«ãƒ¬ãƒ³ãƒˆã® Webルートフォルダー: ãŸã ã— "/PACKAGE/path" ã®ãƒ‘ッケージ内ã«ã‚ã‚‹å ´åˆã€‚ãã†ã§ãªã„å ´åˆã¯ãƒ•ルパス。 | + +コマンドãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã³å‡ºã•れã¦ã„ã‚‹å ´åˆã€ * 引数を渡ã—ã¦ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‘スをå–å¾—ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ * 引数をçœç•¥ã™ã‚‹ã¨ã€å¸¸ã« null オブジェクトãŒè¿”ã•れã¾ã™ã€‚ + + +## 4D.Folder.new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**4D.Folder.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
        **4D.Folder.new** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +#### 説明 + +The `4D.Folder.new()` function creates and returns a new object of the `4D.Folder` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`Folder`](#folder) コマンドã¨åŒä¸€ã§ã™ã€‚ + +> `4D.Folder.new()` よりもã€çŸ­ã„ [`Folder`](#folder) コマンドã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +## .copyTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| 引数 | タイプ | | 説明 | +| ----------------- | --------- |:--:| --------------------------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | コピー先フォルダーã®åå‰ | +| overwrite | æ•´æ•° | -> | 既存è¦ç´ ã‚’上書ãã™ã‚‹ã«ã¯ `fk overwrite` を渡ã—ã¾ã™ | +| 戻り値 | 4D.Folder | <- | コピーã•れãŸãƒ•ォルダー | + + +#### 説明 + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ãƒ•ォルダーã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ãŸã¾ã¾ã‚³ãƒ”ーã•れã¾ã™ã€‚ コピーã®éš›ã«ãƒ•ォルダーåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„åå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダー内ã«åŒã˜åå‰ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãƒ‡ãƒ•ォルトã§ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ *overwrite* ã« `fk overwrite` 定数を渡ã™ã“ã¨ã§ã€æ—¢å­˜ã®ãƒ•ォルダーを無視ã—ã¦ä¸Šæ›¸ãã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| -------------- | - | ------------------ | +| `fk overwrite` | 4 | 既存è¦ç´ ãŒã‚れã°ã€ãれを上書ãã—ã¾ã™ | + + +**戻り値** + +コピーã•れ㟠`Folder` オブジェクト。 + +#### 例題 + +ユーザーã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ•ォルダーã«ã‚るピクãƒãƒ£ãƒ¼ãƒ•ォルダーをã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ォルダー内ã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + + + + +## .create() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + + +**.create()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- | -- | -------------------------------------- | +| 戻り値 | ブール | <- | ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ­£å¸¸ã«ä½œæˆã•れãŸå ´åˆã«ã¯ trueã€ãれ以外ã®å ´åˆã¯ false | + + + +#### 説明 + +The `.create()` function creates a folder on disk according to the properties of the `Folder` object. + +å¿…è¦ã§ã‚れã°ã€ 関数㯠[platformPath](#platformpath) ã‚ã‚‹ã„㯠[path](#path) プロパティã®è©³ç´°ã«åŸºã¥ã„ã¦ãƒ•ォルダー階層を作æˆã—ã¾ã™ã€‚ フォルダーãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã€é–¢æ•°ã¯ä½•ã‚‚ã›ãšã€false ã‚’è¿”ã—ã¾ã™ (エラーã¯è¿”ã•れã¾ã›ã‚“)。 + +**戻り値** + +* ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ­£å¸¸ã«ä½œæˆã•れãŸå ´åˆã«ã¯ **true** +* ã™ã§ã«åŒã˜åå‰ã®ãƒ•ォルダーãŒå­˜åœ¨ã™ã‚‹ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ **false** + +#### 例題 1 + +データベースフォルダー内ã«ç©ºã®ãƒ•ォルダーを作æˆã—ã¾ã™: + +```4d +var $created : Boolean +$created:=Folder("/PACKAGE/SpecialPrefs").create() +``` + +#### 例題 2 + +データベースフォルダー内㫠"/Archives2019/January/" フォルダーを作æˆã—ã¾ã™: + +```4d +$newFolder:=Folder("/PACKAGE/Archives2019/January") +If($newFolder.create()) + ALERT($newFolder.name+" フォルダーãŒä½œæˆã•れã¾ã—ãŸã€‚") +Else + ALERT($newFolder.name+" フォルダーã¯ä½œæˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚") +End if +``` + + + + + +## .createAlias() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + +| 引数 | タイプ | | 説明 | +| ----------------- | --------- | -- | ------------------------ | +| destinationFolder | 4D.Folder | -> | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®ä½œæˆå…ˆãƒ•ォルダー | +| aliasName | テキスト | -> | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®åç§° | +| aliasType | æ•´æ•° | -> | エイリアスリンクã®ã‚¿ã‚¤ãƒ— | +| 戻り値 | 4D.File | <- | エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®ãƒ•ォルダーå‚ç…§ | + + +#### 説明 + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the folder with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +*aliasName* ã«ã¯ã€ä½œæˆã™ã‚‹ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + +macOS 上ã§ã¯ã€ã“ã®é–¢æ•°ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ¨™æº–エイリアスを作æˆã—ã¾ã™ã€‚ *aliasType* 引数を渡ã™ã“ã¨ã§ã€ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 以下ã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| ------------------ | - | ------------------- | +| `fk alias link` | 0 | エイリアスリンク (デフォルト) | +| `fk symbolic link` | 1 | シンボリックリンク (macOSã®ã¿) | + +Windows 上ã§ã¯ã€å¸¸ã«ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ (.lnk ファイル) ãŒä½œæˆã•れã¾ã™ (*aliasType* 引数ã¯ç„¡è¦–ã•れã¾ã™)。 + +**è¿”ã•れるオブジェクト** + +`isAlias` プロパティ㌠**true** ã«è¨­å®šã•れ㟠`4D.File` オブジェクトを返ã—ã¾ã™ã€‚ + +#### 例題 + +データベースフォルダー内ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–フォルダーã¸ã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’作æˆã—ã¾ã™: + +```4d +$myFolder:=Folder("C:\\Documents\\Archives\\2019\\January";fk platform path) +$aliasFile:=$myFolder.createAlias(Folder("/PACKAGE");"Jan2019") +``` + + +## .creationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationDate** : Date + +#### 説明 + +The `.creationDate` property returns the creation date of the folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .creationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.creationTime** : Time + + +#### 説明 + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .delete() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + + +**.delete**( { *option* : Integer } ) + +| 引数 | タイプ | | 説明 | +| ----- | --- | -- | ------------- | +| オプション | æ•´æ•° | -> | フォルダー削除ã®ã‚ªãƒ—ション | + + + +#### 説明 + +The `.delete()` function deletes the folder. + +セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€option 引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€`.delete()` ã¯ç©ºã®ãƒ•ォルダーã—ã‹å‰Šé™¤ã—ã¾ã›ã‚“。 空ã§ãªã„フォルダーを削除ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®å®šæ•°ã®ã„ãšã‚Œã‹ä¸€ã¤ã‚’ option 引数ã¨ã—ã¦æ¸¡ã™å¿…è¦ãŒã‚りã¾ã™: + +| 定数 | 値 | 説明 | +| ---------------------- | - | ----------------- | +| `Delete only if empty` | 0 | フォルダーãŒç©ºã®å ´åˆã®ã¿å‰Šé™¤ã—ã¾ã™ | +| `Delete with contents` | 1 | フォルダーを中身ã”ã¨å‰Šé™¤ã—ã¾ã™ | + +`Delete only if empty` ãŒæ¸¡ã•れãŸã€ã¾ãŸã¯ option 引数を渡ã•ãªã‹ã£ãŸå ´åˆ: + +* フォルダーãŒç©ºã®å ´åˆã«ã—ã‹å‰Šé™¤ã•れã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã¯ä½•ã‚‚ã›ãšã€ã‚¨ãƒ©ãƒ¼-47 ãŒç”Ÿæˆã•れã¾ã™ã€‚ +* フォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼-120 ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +`Delete with contents` を渡ã—ãŸå ´åˆ: + +* フォルダーã¨ã€ãã®ä¸­èº«ãŒã™ã¹ã¦å‰Šé™¤ã•れã¾ã™ã€‚ **警告**: フォルダーã¾ãŸã¯ãã®ä¸­èº«ãŒãƒ­ãƒƒã‚¯ã•れã¦ã„ã‚‹ã€ã‚ã‚‹ã„ã¯èª­ã¿å–り専用ã«è¨­å®šã•れã¦ã„ãŸã¨ã—ã¦ã‚‚ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒé©åˆ‡ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ãŸå ´åˆã«ã¯ã€ãƒ•ォルダーã¯ãã®ä¸­èº«ã”ã¨å‰Šé™¤ã•れã¾ã™ã€‚ +* ã“ã®ãƒ•ォルダーã€ã¾ãŸã¯ãã®ä¸­ã®ãƒ•ォルダーã®ã©ã„ãšã‚Œã‹ãŒå‰Šé™¤ã§ããªã‹ã£ãŸå ´åˆã€å‰Šé™¤ã§ããªã„è¦ç´ ãŒæ¤œçŸ¥ã•ã‚ŒãŸæ™‚点ã§å‰Šé™¤ã¯ä¸­æ­¢ã•れã€ã‚¨ãƒ©ãƒ¼(*) ãŒè¿”ã•れã¾ã™ã€‚ ã“ã®ã¨ãã€ãƒ•ォルダーã¯é€”中ã¾ã§ã—ã‹å‰Šé™¤ã•れã¦ã„ãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ 削除ãŒä¸­æ­¢ã•れãŸå ´åˆã€`GET LAST ERROR STACK` コマンドを使用ã—ã¦åŽŸå› ã¨ãªã£ãŸãƒ•ァイルã®åå‰ã¨ãƒ‘スをå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* フォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆã€ã‚³ãƒžãƒ³ãƒ‰ã¯ä½•ã‚‚ã›ãšã€ã‚¨ãƒ©ãƒ¼ã¯è¿”ã•れã¾ã›ã‚“。

        (*) Windowsã®å ´åˆ: -54 (ロックã•れãŸãƒ•ァイルを書ãè¾¼ã¿ã®ãŸã‚ã«é–‹ã“ã†ã¨ã—ãŸ)
        macOSã®å ´åˆ: -45 (ファイルã¯ãƒ­ãƒƒã‚¯ã•れã¦ã„ãŸã‹ä¸æ­£ãªãƒ‘スå) + + + + +## .exists + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.exists** : Boolean + +#### 説明 + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .extension + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.extension** : Text + +#### 説明 + +The `.extension` property returns the extension of the folder name (if any). æ‹¡å¼µå­ã¯å¿…ãš"." ã§å§‹ã¾ã‚Šã¾ã™ã€‚ フォルダーåãŒæ‹¡å¼µå­ã‚’æŒãŸãªã„å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯ç©ºã®æ–‡å­—列を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .file() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.file**( *path* : Text ) : 4D.File +| 引数 | タイプ | | 説明 | +| ---- | ------- | -- | ------------------------------- | +| path | テキスト | -> | ファイルã®POSIX相対パスå | +| 戻り値 | 4D.File | <- | `File` オブジェクト (無効ãªãƒ‘スã®å ´åˆã«ã¯ null) | + +#### 説明 + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +*path* ã«ã¯ã€è¿”ã™ã¹ãファイルã®ç›¸å¯¾çš„パスを POSIX å½¢å¼ã§æ¸¡ã—ã¾ã™ã€‚ ã“ã®ãƒ‘スã¯ã€è¦ªãƒ•ォルダーを起点ã¨ã—ã¦è©•価ã•れã¾ã™ã€‚ + +**戻り値** + +`File` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null)。 + +#### 例題 + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + + + + +## .files() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.files**( { *options* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ------------------ | +| options | æ•´æ•° | -> | ファイルリストã®ã‚ªãƒ—ション | +| 戻り値 | コレクション | <- | å­ãƒ•ァイルオブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.files()` function returns a collection of `File` objects contained in the folder. +> エイリアスã¾ãŸã¯ã‚·ãƒ³ãƒœãƒªãƒƒã‚¯ãƒªãƒ³ã‚¯ã¯è§£æ±ºã•れã¾ã›ã‚“。 + +*options*引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€ãƒ•ォルダーã®ç¬¬ä¸€éšŽå±¤ã«ã‚るファイルã®ã¿ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿”ã•れã¾ã™ã€‚ã“れã«ã¯éžè¡¨ç¤ºã®ãƒ•ァイルやã€ãƒ•ォルダーもå«ã¾ã‚Œã¾ã™ã€‚ *options* 引数ã«ä»¥ä¸‹ã®å®šæ•°ã‚’一ã¤ä»¥ä¸Šæ¸¡ã™ã“ã¨ã§ã€ã“ã®ãµã‚‹ã¾ã„を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------- | - | ------------------------------------------- | +| `fk recursive` | 1 | コレクションã«ã¯ã€æŒ‡å®šãƒ•ォルダーã¨ãã®ã‚µãƒ–フォルダーã®ãƒ•ァイル/フォルダーãŒå«ã¾ã‚Œã¾ã™ | +| `fk ignore invisible` | 8 | éžè¡¨ç¤ºè¨­å®šã®ãƒ•ァイルやフォルダーã¯è¡¨ç¤ºã•れã¾ã›ã‚“ | + +**戻り値** + +`File` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +#### 例題 1 + +データベースフォルダー内ã«éžè¡¨ç¤ºãƒ•ァイルãŒãªã„ã‹ã©ã†ã‹ã‚’調ã¹ã¾ã™: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("データベースフォルダーã«ã¯éžè¡¨ç¤ºã®ãƒ•ァイルãŒå­˜åœ¨ã—ã¾ã™ã€‚") + End if +``` + +#### 例題 2 + +ドキュメントフォルダー内ã«ã‚ã‚‹ã€éžè¡¨ç¤ºã§ãªã„ファイルをã™ã¹ã¦å–å¾—ã—ã¾ã™: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + + + + +## .folder() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.folder**( *path* : Text ) : 4D.Folder +| 引数 | タイプ | | 説明 | +| ---- | --------- | -- | --------------------------------------------- | +| path | テキスト | -> | ファイルã®POSIX相対パスå | +| 戻り値 | 4D.Folder | <- | 作æˆã•れ㟠`Folder` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null) | + +#### 説明 + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +*path* ã«ã¯ã€è¿”ã™ã¹ãフォルダーã®ç›¸å¯¾çš„パスを POSIX å½¢å¼ã§æ¸¡ã—ã¾ã™ã€‚ ã“ã®ãƒ‘スã¯ã€è¦ªãƒ•ォルダーを起点ã¨ã—ã¦è©•価ã•れã¾ã™ã€‚ + +**戻り値** + +`Folder` オブジェクト (無効㪠*path* ã®å ´åˆã«ã¯ null)。 + +#### 例題 + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + + + + +## .folders() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.folders**( { *options* : Integer } ) : Collection +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | ------------------- | +| options | æ•´æ•° | -> | フォルダーリストã®ã‚ªãƒ—ション | +| 戻り値 | コレクション | <- | å­ãƒ•ォルダーオブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + +#### 説明 + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +*options*引数を渡ã•ãªã‹ã£ãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€ãƒ•ォルダーã®ç¬¬ä¸€éšŽå±¤ã«ã‚るフォルダーã®ã¿ãŒã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è¿”ã•れã¾ã™ã€‚ *options* 引数ã«ä»¥ä¸‹ã®å®šæ•°ã‚’一ã¤ä»¥ä¸Šæ¸¡ã™ã“ã¨ã§ã€ã“ã®ãµã‚‹ã¾ã„を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------- | - | ------------------------------------------- | +| `fk recursive` | 1 | コレクションã«ã¯ã€æŒ‡å®šãƒ•ォルダーã¨ãã®ã‚µãƒ–フォルダーã®ãƒ•ァイル/フォルダーãŒå«ã¾ã‚Œã¾ã™ | +| `fk ignore invisible` | 8 | éžè¡¨ç¤ºè¨­å®šã®ãƒ•ァイルやフォルダーã¯è¡¨ç¤ºã•れã¾ã›ã‚“ | + +**戻り値** + +`Folder` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +#### 例題 + +データベースフォルダー内ã«ã‚ã‚‹ã™ã¹ã¦ã®ãƒ•ォルダーãŠã‚ˆã³ã‚µãƒ–フォルダーã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + + + + +## .fullName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.fullName** : Text + +#### 説明 + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .getIcon() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.getIcon**( { *size* : Integer } ) : Picture +| 引数 | タイプ | | 説明 | +| ---- | ----- | -- | ------------------------ | +| size | æ•´æ•° | -> | å–å¾—ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ä¸€è¾ºã®é•·ã• (ピクセルå˜ä½) | +| 戻り値 | ピクãƒãƒ£ãƒ¼ | <- | アイコン | + + +#### 説明 + +The `.getIcon()` function returns the icon of the folder. + +ä»»æ„ã® *size* 引数を渡ã™ã¨ã€è¿”ã•れるアイコンã®ã‚µã‚¤ã‚ºã‚’ピクセルå˜ä½ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å€¤ã¯ã€å®Ÿéš›ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’æ ¼ç´ã—ã¦ã„る正方形ã®ä¸€è¾ºã®é•·ã•を表ã—ã¦ã„ã¾ã™ã€‚ アイコンã¯é€šå¸¸ã€32x32ピクセル ("大ãã„アイコン") ã¾ãŸã¯ 16x16ピクセル ("å°ã•ã„アイコン") ã§å®šç¾©ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å¼•æ•°ã« 0 を渡ã™ã‹çœç•¥ã—ãŸå ´åˆã€"大ãã„アイコン" ãŒè¿”ã•れã¾ã™ã€‚ + +フォルダーãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ãªã„å ´åˆã€ãƒ‡ãƒ•ォルトã®ç©ºã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + +**戻り値** + +フォルダーアイコン㮠[ピクãƒãƒ£ãƒ¼](Concepts/dt_picture.md)。 + + + + + +## .hidden + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.hidden** : Boolean + +#### 説明 + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isAlias + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isAlias** : Boolean + + +#### 説明 + +The `.isAlias` property returns always **false** for a `Folder` object. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFile** : Boolean + +#### 説明 + +The `.isFile` property returns always **false** for a folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isFolder + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isFolder** : Boolean + +#### 説明 + +The `.isFolder` property returns always **true** for a folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .isPackage + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.isPackage** : Boolean + +#### 説明 + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). ãれ以外ã®å ´åˆã¯ false ã‚’è¿”ã—ã¾ã™ã€‚ + +Windows 上ã«ãŠã„ã¦ã¯ã€`.isPackage` ã¯å¸¸ã« **false** ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .modificationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationDate** : Date + +#### 説明 + +The `.modificationDate` property returns the date of the folder's last modification. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .modificationTime + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.modificationTime** : Time + +#### 説明 + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .moveTo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder +| 引数 | タイプ | | 説明 | +| ----------------- | --------- | -- | ---------------- | +| destinationFolder | 4D.Folder | -> | 宛先フォルダー | +| newName | テキスト | -> | 移動先ã§ã®ãƒ•ォルダーã®å®Œå…¨ãªåç§° | +| 戻り値 | 4D.Folder | <- | 移動ã—ãŸãƒ•ォルダー | + + +#### 説明 + +The `.moveTo( )` function moves or renames the `Folder` object (source folder) into the specified *destinationFolder*. + +*destinationFolder* å¼•æ•°ãŒæŒ‡å®šã™ã‚‹ãƒ•ォルダーã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã€ãã†ã§ãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +デフォルトã§ã€ç§»å‹•ã—ãŸãƒ•ォルダーã¯å…ƒã®åå‰ã‚’ç¶­æŒã—ã¾ã™ã€‚ 移動ã®éš›ã«ãƒ•ォルダーåを変更ã—ãŸã„å ´åˆã€æ–°ã—ã„完全ãªåå‰ã‚’ *newName* ã«æ¸¡ã—ã¾ã™ã€‚ æ–°ã—ã„åå‰ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +移動後㮠`Folder` オブジェクト。 + +#### 例題 + +フォルダーを移動ã—ã€å称も変更ã—ã¾ã™: + +```4d + var $tomove; $moved : Object + $docs:=Folder(fk documents folder) + $tomove:=$docs.folder("Pictures") + $tomove2:=$tomove.moveTo($docs.folder("Archives");"Pic_Archives") +``` + + +## .name + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + + + +**.name** : Text + +#### 説明 + +The `.name` property returns the name of the folder, without extension (if any). + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .original + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.original** : 4D.Folder + +#### 説明 + +The `.original` property returns the same Folder object as the folder. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ +> ã“ã®ãƒ—ロパティã¯ã€ãƒ•ォルダーやファイルを処ç†ã™ã‚‹æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã‚’書ããŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + + + + + + +## .parent + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.parent** : 4D.Folder + +#### 説明 + +The `.parent` property returns the parent folder object of the folder. パスãŒã‚·ã‚¹ãƒ†ãƒ ãƒ‘スを表ã™å ´åˆ (例: "/DATA/")ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スãŒè¿”ã•れã¾ã™ã€‚ + +親フォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆ (root) ã¯ã€ã“ã®ãƒ—ロパティ㯠null値を返ã—ã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .path + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.path** : Text + +#### 説明 + +The `.path` property returns the POSIX path of the folder. パスãŒãƒ•ァイルシステムを表ã™å ´åˆ (例: "/DATA/")ã€ãƒ•ァイルシステムãŒè¿”ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + +## .platformPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.platformPath** : Text + +#### 説明 + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + +## .rename() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.rename**( *newName* : Text ) : 4D.Folder + +| 引数 | タイプ | | 説明 | +| ------- | --------- | -- | -------------- | +| newName | テキスト | -> | ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ–°ã—ã„完全ãªåç§° | +| 戻り値 | 4D.Folder | <- | å称変更ã•れãŸãƒ•ォルダー | + + + +#### 説明 + +The `.rename()` function renames the folder with the name you passed in *newName* and returns the renamed `Folder` object. + +*newName* 引数ã¯å‘½åè¦å‰‡ã«å‰‡ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: ":", "/", ç­‰ã®æ–‡å­—ã‚’å«ã‚“ã§ã„ãªã„ã€ãªã©)。ãã†ã§ãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ åŒã˜åå‰ã®ãƒ•ァイルãŒã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +å称変更ã•れ㟠`Folder` オブジェクト。 + +#### 例題 + + +```4d + var $toRename : 4D.Folder + $toRename:=Folder("/RESOURCES/Pictures").rename("Images") +``` + + diff --git a/website/translated_docs/ja/API/FunctionClass.md b/website/translated_docs/ja/API/FunctionClass.md new file mode 100644 index 00000000000000..a3cb08b78d4da4 --- /dev/null +++ b/website/translated_docs/ja/API/FunctionClass.md @@ -0,0 +1,420 @@ +--- +id: FunctionClass +title: Formula +--- + + + +[Formula](#formula) ã‚ã‚‹ã„㯠[Formula from string](#formula-from-string) コマンドを使用ã™ã‚‹ã¨ã€ãƒã‚¤ãƒ†ã‚£ãƒ–㪠[`4D.Function`オブジェクト](#4dfunction-オブジェクトã«ã¤ã„ã¦) を作æˆã™ã‚‹ã“ã¨ãŒã§ãã€ãれã«ã‚ˆã£ã¦ã‚らゆる 4Då¼ã‚„テキストã¨ã—ã¦è¡¨ã•れãŸã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + + +### Formula オブジェクト + +Formulaオブジェクトã¯ã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã«æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```4d + var $f : 4D.Function + $f:=New object + $f.message:=Formula(ALERT("Hello world")) +``` + +ã“ã®ã‚ˆã†ãªãƒ—ロパティ㯠"オブジェクト関数"ã€ã¤ã¾ã‚Šè¦ªã‚ªãƒ–ジェクトã«ç´ã¥ã„ãŸé–¢æ•°ã§ã™ã€‚ オブジェクトプロパティã«ä¿å­˜ã•れã¦ã„る関数を実行ã™ã‚‹ã«ã¯ã€ãƒ—ロパティåã®ã‚ã¨ã« **()** ã‚’ã¤ã‘ã¾ã™: + +```4d + $f.message() // "Hello world" を表示ã—ã¾ã™ +``` + +大カッコを使用ã—ãŸã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚‚サãƒãƒ¼ãƒˆã•れã¾ã™: + +```4d + $f["message"]() // "Hello world" ã¨è¡¨ç¤ºã—ã¾ã™ +``` + +ãŸã¨ãˆå¼•æ•°ã‚’å—ã‘å–らãªã‹ã£ãŸã¨ã—ã¦ã‚‚ (後述å‚ç…§)ã€ã‚ªãƒ–ジェクト関数を実行ã™ã‚‹ãŸã‚ã«ã¯ã‚«ãƒƒã‚³ ( ) ã‚’ã¤ã‘ã¦å‘¼ã³å‡ºã™å¿…è¦ãŒã‚ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 オブジェクトプロパティã®ã¿ã‚’呼ã³å‡ºã—ãŸå ´åˆã€ãƒ•ォーミュラã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ (ãã—ã¦ãƒ•ォーミュラã¯å®Ÿè¡Œã¯ã•れã¾ã›ã‚“): + +```4d + $o:=$f.message // $o ã«ã¯ãƒ•ォーミュラオブジェクトãŒè¿”ã•れã¾ã™ +``` + +[`apply()`](#apply) ãŠã‚ˆã³ [`call()`](#call) 関数を使ã£ã¦é–¢æ•°ã‚’実行ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d + $f.message.apply() // "Hello world!" を表示ã—ã¾ã™ +``` + +#### 引数ã®å—ã‘æ¸¡ã— + +フォーミュラã«ã¯ã€[順番引数シンタックス](Concepts/parameters.md#順番引数) $1, $2...$n を使用ã—ã¦å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + var $f : Object + $f:=New object + $f.message:=Formula(ALERT("Hello "+$1)) + $f.message("John") // "Hello John" を表示ã—ã¾ã™ +``` + +ã‚ã‚‹ã„ã¯ã€[.call()](#call) 関数を使用ã—ã¦: + +```4d + var $f : Object + $f:=Formula($1+" "+$2) + $text:=$f.call(Null;"Hello";"World") // "Hello World" ã‚’è¿”ã—ã¾ã™ + $text:=$f.call(Null;"Welcome to";String(Year of(Current date))) // "Welcome to 2019" (例) ã‚’è¿”ã—ã¾ã™ +``` + +#### å˜ä¸€ãƒ¡ã‚½ãƒƒãƒ‰ç”¨ã®å¼•æ•° + +利便性ã®ãŸã‚ã«ã€ãƒ•ォーミュラãŒå˜ä¸€ã®ãƒ—ロジェクトメソッドã‹ã‚‰ä½œæˆã•れãŸå ´åˆã«ã¯ã€å¼•æ•°ã¯ãƒ•ォーミュラオブジェクトã®åˆæœŸåŒ–ã§ã¯çœç•¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ çœç•¥ã•れãŸå¼•æ•°ã¯ã€ãƒ•ォーミュラを呼ã³å‡ºã™æ™‚ã«ä¸€ç·’ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + var $f : 4D.Function + + $f:=Formula(myMethod) + // ã“ã“ã§ Formula(myMethod($1;$2) ã¨æ›¸ãå¿…è¦ã¯ã‚りã¾ã›ã‚“ + $text:=$f.call(Null;"Hello";"World") // "Hello World" ã‚’è¿”ã—ã¾ã™ + $text:=$f.call() // "How are you?" ã‚’è¿”ã—ã¾ã™ + + //myMethod + #DECLARE ($param1 : Text; $param2 : Text)->$return : Text + If(Count parameters=2) + $return:=$param1+" "+$param2 + Else + $return:="How are you?" + End if +``` + +引数ã¯ãƒ¡ã‚½ãƒƒãƒ‰å†…ã«ãŠã„ã¦ã€å‘¼ã³å‡ºã—æ™‚ã«æŒ‡å®šã—ãŸé †ã§å—ã‘å–られã¾ã™ã€‚ + +### 4D.Function オブジェクトã«ã¤ã„㦠+ +`4D.Function` オブジェクトã«ã¯ã‚³ãƒ¼ãƒ‰ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ `()` 演算å­ã‚’使用ã—ã¦ã€ã¾ãŸã¯ [`apply()`](#apply) ã‚„ [`call()`](#call) 関数を使用ã—ã¦å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D ã§ã¯ 3種類㮠Function オブジェクトãŒåˆ©ç”¨ã§ãã¾ã™: + +- ãƒã‚¤ãƒ†ã‚£ãƒ–関数ã€ã¤ã¾ã‚Šã€`collection.sort()` ã‚„ `file.copyTo()` ãªã©ã® 4Dクラスã«ãƒ“ルトインã•れãŸé–¢æ•°ã€‚ +- ユーザー関数 (ユーザー[クラス](Concepts/classes.md) ã«ãŠã„㦠[Function キーワード](Concepts/classes.md#function)を使ã£ã¦ä½œæˆã•れãŸã‚‚ã®)。 +- フォーミュラ関数 (4Dフォーミュラを実行ã™ã‚‹ã‚‚ã®)。 + + + +### æ¦‚è¦ + + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.apply**() : any
        **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any](#apply)

            executes the `formula` object to which it is applied and returns the resulting value | +| [**.call**() : any
        **.call**( *thisObj* : Object { ; ...*params* : any } ) : any](#call)

            executes the `formula` object to which it is applied and returns the resulting value | +| [**.source** : Text ](#source)

            contains the source expression of the `formula` as text | + + + + +## Formula + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------------------- | +| v17 R6 | å称変更 (New formula -> Formula) | +| v17 R3 | 追加 | +
        + +**Formula** ( *formulaExp* : Expression ) : 4D.Function +| 引数 | タイプ | | 説明 | +| ---------- | ----------- |:--:| ----------------------------------- | +| formulaExp | å¼ | -> | オブジェクトã¨ã—ã¦è¿”ã•れるフォーミュラ | +| 戻り値 | 4D.Function | <- | フォーミュラを格ç´ã—ã¦ã„ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–㪠Function オブジェクト | + + +#### 説明 + +The `Formula` command creates a `4D Function` object based upon the *formulaExp* expression. *formulaExp* ã«ã¯å˜ä¸€ã®å€¤ã®ã‚ˆã†ã«ã‚·ãƒ³ãƒ—ルãªã‚‚ã®ã‹ã‚‰ã€å¼•æ•°ã‚’æŒã¤ãƒ—ロジェクトメソッドã®ã‚ˆã†ã«è¤‡é›‘ãªã‚‚ã®ã¾ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +フォーミュラãŒã‚ªãƒ–ジェクトã¨ã—ã¦å­˜åœ¨ã™ã‚‹ã“ã¨ã§ã€ã‚³ãƒžãƒ³ãƒ‰ã‚„メソッドã«å¯¾ã—ã¦å¼•æ•° (計算ã•れãŸå±žæ€§) ã¨ã—ã¦æ¸¡ã—ãŸã‚Šã€"コンãƒãƒ¼ãƒãƒ³ãƒˆã¨ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é–“ã§å…±æœ‰" ã¨ã—ã¦å®£è¨€ã›ãšã¨ã‚‚様々ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å®Ÿè¡Œã—ãŸã‚Šã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ 呼ã³å‡ºã•れãŸãƒ•ォーミュラオブジェクトã¯ã€ãれを作æˆã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦è©•価ã•れã¾ã™ã€‚ + +è¿”ã•れãŸãƒ•ォーミュラã¯ä»¥ä¸‹ã®æ–¹æ³•ã§å‘¼ã³å‡ºã™ã“ã¨ãŒå¯èƒ½ã§ã™: + +* [`.call()`](#call) ã‚ã‚‹ã„㯠[`.apply()`](#apply) 関数 +* オブジェクト記法シンタックス ([Formula オブジェクト](#formula-オブジェクト) å‚ç…§) + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + $o:=New object("myFormula";$f) + + // フォーミュラを呼ã³å‡ºã™ 3ã¤ã®æ–¹æ³• + $f.call($o) // 3 ã‚’è¿”ã—ã¾ã™ + $f.apply($o) // 3 ã‚’è¿”ã—ã¾ã™ + $o.myFormula() // 3 ã‚’è¿”ã—ã¾ã™ +``` + +フォーミュラã«ã¯ [引数](#引数ã®å—ã‘æ¸¡ã—) を渡ã™ã“ã¨ãŒã§ãã¾ã™ ([例題4](#例題-4) å‚ç…§)。 + +フォーミュラã®å®Ÿè¡Œå¯¾è±¡ã¨ãªã‚‹ã‚ªãƒ–ジェクトを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([例題5](#例題-5) å‚ç…§)。 ã“ã®ã‚ªãƒ–ジェクトã®ãƒ—ロパティã¯ã€`This` コマンドã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ + +*formulaExp* ãŒãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’使用ã™ã‚‹å ´åˆã€è¿”ã•れるフォーミュラオブジェクトã®ä½œæˆæ™‚ã«ãã®å€¤ãŒãã“ã«ã‚³ãƒ”ーã•れä¿å­˜ã•れã¾ã™ã€‚ 実行時ã€ãƒ•ォーミュラã¯ãã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã®ç¾åœ¨å€¤ã§ã¯ãªãã€ã‚³ãƒ”ーã•れãŸå€¤ã‚’使用ã—ã¾ã™ã€‚ ローカル変数ã¨ã—ã¦é…列を使用ã™ã‚‹ã“ã¨ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ãªã„ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +`Formula` ã«ã‚ˆã£ã¦ä½œæˆã•れãŸã‚ªãƒ–ジェクトã¯ã€ãŸã¨ãˆã°ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ•ィールドや Blob ドキュメントãªã©ã«ä¿å­˜å¯èƒ½ã§ã™ã€‚ + + +#### 例題 1 + +å˜ç´”ãªãƒ•ォーミュラã®ä¾‹: + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + + var $o : Object + $o:=New object("f";$f) + + $result:=$o.f() // 3 ã‚’è¿”ã—ã¾ã™ +``` + +#### 例題 2 + +ローカル変数を使用ã™ã‚‹ãƒ•ォーミュラã®ä¾‹: + +```4d + + + $value:=10 + $o:=New object("f";Formula($value)) + $value:=20 + + $result:=$o.f() // 10 ã‚’è¿”ã—ã¾ã™ +``` + + +#### 例題 3 + +引数を用ã„ãŸã‚·ãƒ³ãƒ—ルãªãƒ•ォーミュラã®ä¾‹: + +```4d + $o:=New object("f";Formula($1+$2)) + $result:=$o.f(10;20) // 30 ã‚’è¿”ã—ã¾ã™ +``` + + +#### 例題 4 + +引数を用ã„ãŸãƒ—ロジェクトメソッドを使用ã™ã‚‹ä¾‹: + +```4d + $o:=New object("f";Formula(myMethod)) + $result:=$o.f("param1";"param2") // $result:=myMethod("param1";"param2") ã¨åŒç­‰ã§ã™ +``` + + +#### 例題 5 + +`This` を使用ã™ã‚‹ä¾‹: + +```4d + $o:=New object("fullName";Formula(This.firstName+" "+This.lastName)) + $o.firstName:="John" + $o.lastName:="Smith" + $result:=$o.fullName() // "John Smith" ã‚’è¿”ã—ã¾ã™ +``` + +#### 例題 6 + +オブジェクト記法を使用ã—ã¦ãƒ•ォーミュラを呼ã³å‡ºã™ä¾‹: + +```4d + var $feta; $robot : Object + var $calc : 4D.Function + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + // フォーミュラをオブジェクトプロパティã«è¨­å®šã—ã¾ã™ + $feta.calc:=$calc + $robot.calc:=$calc + + // フォーミュラを呼ã³å‡ºã—ã¾ã™ + $feta.calc() // $feta={name:Feta,price:12.5,quantity:5,total:62.5,calc:"[object Formula]"} + $robot.calc() // $robot={name:Robot,price:543,quantity:2,total:1086,calc:"[object Formula]"} +``` + + + + +## Formula from string + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------------------------------------------- | +| v17 R6 | å称変更 (New formula from string -> Formula from string) | +| v17 R3 | 追加 | +
        + +**Formula from string**( *formulaString* : Text ) : 4D.Function +| 引数 | タイプ | | 説明 | +| ------------- | ----------- |:--:| ------------------------- | +| formulaString | テキスト | -> | オブジェクトã¨ã—ã¦è¿”ã•れるフォーミュラ文字列 | +| 戻り値 | 4D.Function | <- | フォーミュラを格ç´ã—ã¦ã„ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–ãªã‚ªãƒ–ジェクト | + + +#### 説明 + +The `Formula from string` command creates a 4D.Function object based upon the *formulaString*. *formulaString* ã«ã¯å˜ä¸€ã®å€¤ã®ã‚ˆã†ã«ã‚·ãƒ³ãƒ—ルãªã‚‚ã®ã‹ã‚‰ã€å¼•æ•°ã‚’æŒã¤ãƒ—ロジェクトメソッドã®ã‚ˆã†ã«è¤‡é›‘ãªã‚‚ã®ã¾ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ [`Formula`](#formula) ã«ä¼¼ã¦ã„ã¾ã™ãŒã€ãƒ†ã‚­ã‚¹ãƒˆã«åŸºã¥ã„ãŸãƒ•ォーミュラを扱ã†ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ 多ãã®å ´åˆã«ãŠã„ã¦ã€`Formula` コマンドã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ `Formula from string` コマンドã¯ã€å…ƒã¨ãªã‚‹ãƒ•ォーミュラãŒãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦è¡¨ç¾ã•れã¦ã„ã‚‹å ´åˆ (例: 外部㮠JSON ファイルã«ä¿å­˜ã•れã¦ã„ãŸå ´åˆãªã©) ã«ã®ã¿ä½¿ç”¨ã•れるã¹ãã§ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€ãƒˆãƒ¼ã‚¯ãƒ³ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã®ä½¿ç”¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚ +> ローカル変数ã®ä¸­èº«ã¯ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ã§ã¯åå‰ã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãŒä¸å¯èƒ½ãªãŸã‚ã€*formulaString* 引数内ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 `Formula from string` コマンドを使用ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚’試ã¿ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼(-10737) ãŒç”Ÿæˆã•れã¾ã™ã€‚ + + +#### 例題 + +以下ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ•ォーマットã®ãƒ•ォーミュラをå—ã‘入れるダイアログを作æˆã—ã€: + +```4d + var $textFormula : Text + var $f : 4D.Function + $textFormula:=Request("フォーミュラを入力ã—ã¦ãã ã•ã„") + If(ok=1) + $f:=Formula from string($textFormula) + ALERT("çµæžœ = "+String($f.call())) + End if +``` + +![](assets/en/API/formulaDialog.png) + + +ãã®ãƒ•ォーミュラを実行ã—ã¾ã™: + + +![](assets/en/API/formulaAlert.png) + + + + + + +## .apply() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R3 | 追加 | +
        + +**.apply**() : any
        **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any +| 引数 | タイプ | | 説明 | +| ------------- | ------ |:--:| -------------------------------------- | +| thisObj | オブジェクト | -> | フォーミュラ内㧠This コマンドã«ã‚ˆã£ã¦è¿”ã•れるオブジェクト | +| formulaParams | コレクション | -> | フォーミュラãŒå®Ÿè¡Œã•れる際㫠$1...$n ã¨ã—ã¦æ¸¡ã•れる値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| 戻り値 | any | <- | フォーミュラã®å®Ÿè¡Œçµæžœ | + + +#### 説明 + +The `.apply()` function executes the `formula` object to which it is applied and returns the resulting value. `Formula` ã‚ã‚‹ã„㯠`Formula from string` コマンドã§ä½œæˆã•れãŸãƒ•ォーミュラãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + + +*thisObj* ã«ã¯ã€ãƒ•ォーミュラ内㧠`This` ã¨ã—ã¦ä½¿ç”¨ã•れるオブジェクトã¸ã®å‚照を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»»æ„ã® *formulaParams* 引数を渡ã™ã“ã¨ã§ã€ãƒ•ォーミュラ内㧠$1...$n ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã•れるコレクションを渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`.apply()` 㯠[`.call()`](#call) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€å¼•数をコレクションã¨ã—ã¦æ¸¡ã™ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ ã“れã¯è¨ˆç®—ã•れãŸçµæžœã‚’渡ã™ã®ã«ä¾¿åˆ©ã§ã™ã€‚ + + +#### 例題 1 + +```4d + var $f : 4D.Function + $f:=Formula($1+$2+$3) + + $c:=New collection(10;20;30) + $result:=$f.apply(Null;$c) // 60 ã‚’è¿”ã—ã¾ã™ +``` + + +#### 例題 2 + +```4d + var $calc : 4D.Function + var $feta; $robot : Object + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + $calc.apply($feta) // $feta={name:Feta,price:12.5,quantity:5,total:62.5} + $calc.apply($robot) // $robot={name:Robot,price:543,quantity:2,total:1086} +``` + + + +## .call() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R3 | 追加 | +
        + +**.call**() : any
        **.call**( *thisObj* : Object { ; ...*params* : any } ) : any +| 引数 | タイプ | | 説明 | +| ------- | ------ | -- | -------------------------------- | +| thisObj | オブジェクト | -> | フォーミュラ内㧠This コマンドã«ã‚ˆã£ã¦è¿”ã•れるオブジェクト | +| params | any | -> | フォーミュラãŒå®Ÿè¡Œã•れる際㫠$1...$n ã¨ã—ã¦æ¸¡ã•れる値 | +| 戻り値 | any | <- | フォーミュラã®å®Ÿè¡Œçµæžœ | + + +#### 説明 + +The `.call()` function executes the `formula` object to which it is applied and returns the resulting value. `Formula` ã‚ã‚‹ã„㯠`Formula from string` コマンドã§ä½œæˆã•れãŸãƒ•ォーミュラãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +*thisObj* ã«ã¯ã€ãƒ•ォーミュラ内㧠`This` ã¨ã—ã¦ä½¿ç”¨ã•れるオブジェクトã¸ã®å‚照を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»»æ„ã® *params* 引数を渡ã™ã“ã¨ã§ã€ãƒ•ォーミュラ内㧠*$1...$n* ã®å¼•æ•°ã¨ã—ã¦ä½¿ç”¨ã•れる値を渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`.call()` 㯠[`.apply()`](#apply) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€å¼•数を直接渡ã™ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ + +#### 例題 1 + +```4d + var $f : 4D.Function + $f:=Formula(Uppercase($1)) + $result:=$f.call(Null;"hello") // "HELLO" ã‚’è¿”ã—ã¾ã™ +``` + +#### 例題 2 + +```4d + $o:=New object("value";50) + $f:=Formula(This.value*2) + $result:=$f.call($o) // 100 ã‚’è¿”ã—ã¾ã™ +``` + + + + +## .source + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.source** : Text + +#### 説明 + +The `.source` property contains the source expression of the `formula` as text. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + +#### 例題 + +```4d + var $of : 4D.Function + var $tf : Text + $of:=Formula(String(Current time;HH MM AM PM)) + $tf:=$of.source //"String(Current time;HH MM AM PM)" +``` + + + + + diff --git a/website/translated_docs/ja/API/IMAPTransporterClass.md b/website/translated_docs/ja/API/IMAPTransporterClass.md new file mode 100644 index 00000000000000..7611f4d6ffc960 --- /dev/null +++ b/website/translated_docs/ja/API/IMAPTransporterClass.md @@ -0,0 +1,1965 @@ +--- +id: IMAPTransporterClass +title: IMAPTransporter +--- + +`IMAPTransporter` クラスを使ã£ã¦ã€IMAP メールサーãƒãƒ¼ã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +### IMAP Transporter オブジェクト + +IMAP Transporter オブジェクト㯠[IMP New transporter](#imap-new-transporter) コマンドã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ ã“れらã¯ã€æ¬¡ã®ãƒ—ロパティや関数をæŒã¡ã¾ã™: + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | +| [**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
        **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
        **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#addflags)

            adds flags to the `msgIDs` for the specified `keywords` | +| [**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object](#append)

            appends a `mailObj` to the `destinationBox` | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

             checks the connection using information stored in the transporter object | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

            the maximum time (in seconds) allowed prior to checking the connection to the server | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
        **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#copy)

            copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server | +| [**.createBox**( *name* : Text ) : Object](#createbox)

            creates a mailbox with the given `name` | +| [**.delete**( *msgsIDs* : Collection ) : Object
        **.delete**( *allMsgs* : Integer ) : Object](#delete)

            sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs` | +| [**.deleteBox**( *name* : Text ) : Object](#deletebox)

            permanently removes the mailbox with the given `name` from the IMAP server | +| [**.expunge()** : Object](#expunge)

            removes all messages with the "deleted" flag from the IMAP mail server. | +| [**.getBoxInfo**( { *name* : Text }) : Object](#getboxinfo)

            returns a `boxInfo` object corresponding to the mailbox *name* | +| [**.getBoxList**( { *parameters* : Object } ) : Collection](#getboxlist)

            returns a collection of mailboxes describing all of the available mailboxes | +| [**.getDelimiter()** : Text](#getdelimiter)

            returns the character used to delimit levels of hierarchy in the mailbox name | +| [**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
        **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object](#getmail)

            returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
        **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object](#getmails)

            returns an object containing a collection of `Email` objects | +| [**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
        **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob](#getmimeasblob)

            returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.host** : Text](#host)

            the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | +| [ | + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
        **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#move)

            moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server| |[**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection](#numtoid)

            converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg*| |[**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
        **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
        **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#removeflags)

            removes flags from the `msgIDs` for the specified `keywords`| |[**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object](#renamebox)

            changes the name of a mailbox on the IMAP server| |[**.port** : Integer](#port)

             the port number used for mail transactions| |[**.searchMails**( *searchCriteria* : Text ) : Collection](#searchmails)

            searches for messages that match the given *searchCriteria* in the current mailbox| |[**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object](#selectbox)

            selects the `name` mailbox as the current mailbox| |[**.subscribe**( *name* : Text ) : Object](#subscribe)

            allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes| |[**.unsubscribe**( *name* : Text ) : Object](#unsubscribe)

            removes a mailbox from a set of subscribed mailboxes| |[**.user** : Text](#user)

             the user name used for authentication on the mail server| + + + +## IMAP New transporter + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**IMAP New transporter**( *server* : Object ) : 4D.IMAPTransporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| --------------------------------------------------- | +| server | オブジェクト | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.IMAPTransporter | <- | [IMAP transporter オブジェクト](#imap-transporter-オブジェクト) | + + +#### 説明 + +The `IMAP New transporter` command configures a new IMAP connection according to the *server* parameter and returns a new *transporter* object. è¿”ã•れ㟠transporter オブジェクトã¯ã€é€šå¸¸ãƒ¡ãƒ¼ãƒ«ã®å—ä¿¡ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +*server* 引数ã¨ã—ã¦ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを渡ã—ã¾ã™: + +| *server* | デフォルト値 (çœç•¥æ™‚) | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
        .**accessTokenOAuth2**: Object

        OAuth2 èªè¨¼ã®è³‡æ ¼æƒ…報を表ã™ãƒ†ã‚­ã‚¹ãƒˆæ–‡å­—列ã¾ãŸã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚ªãƒ–ジェクト。 `authenticationMode` ㌠OAUTH2 ã®å ´åˆã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ `accessTokenOAuth2` ãŒä½¿ç”¨ã•れã¦ã„る㌠`authenticationMode` ãŒçœç•¥ã•れã¦ã„ãŸå ´åˆã€OAuth2 プロトコルãŒä½¿ç”¨ã•れã¾ã™ (サーãƒãƒ¼ã§è¨±å¯ã•れã¦ã„れã°)。 *[IMAP transporter](#imap-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã£ã¨ã‚‚セキュアãªèªè¨¼ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

            the maximum time (in seconds) allowed prior to checking the connection to the server | 300 | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

            the name or the IP address of the host server | *å¿…é ˆ* | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | ãªã— | +| .**password** : Text

        サーãƒãƒ¼ã¨ã®èªè¨¼ã®ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワード *[IMAP transporter](#imap-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.port** : Integer](#port)

             the port number used for mail transactions | 993 | +| [**.user** : Text](#user)

             the user name used for authentication on the mail server | ãªã— | +> **警告**: 定義ã•れãŸã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒã€ã‚µãƒ¼ãƒãƒ¼ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚ˆã‚ŠçŸ­ã„よã†ã«ã—ã¦ãã ã•ã„。ãã†ã§ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + + +#### 戻り値 + +ã“ã®é–¢æ•°ã¯ã€[**IMAP transporter オブジェクト**](#imap-transporter-オブジェクト) ã‚’è¿”ã—ã¾ã™ã€‚ è¿”ã•れるプロパティã¯ã™ã¹ã¦ **読ã¿å–り専用** ã§ã™ã€‚ +> IMAP接続ã¯ã€transporter ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•ã‚ŒãŸæ™‚点ã§è‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ + +#### 例題 + +```4d +$server:=New object +$server.host:="imap.gmail.com" // å¿…é ˆ +$server.port:=993 +$server.user:="4d@gmail.com" +$server.password:="XXXXXXXX" +$server.logFile:="LogTest.txt" // Logsフォルダーã«ä¿å­˜ã™ã‚‹ãƒ­ã‚°ãƒ•ァイル + +var $transporter : 4D.IMAPTransporter +$transporter:=IMAP New transporter($server) + +$status:=$transporter.checkConnection() +If(Not($status.success)) + ALERT("エラーãŒç™ºç”Ÿã—ã¾ã—ãŸ: "+$status.statusText) +End if +``` + + +## 4D.IMAPTransporter.new() + + +**4D.IMAPTransporter.new**( *server* : Object ) : 4D.IMAPTransporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| --------------------------------------------------- | +| server | オブジェクト | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.IMAPTransporter | <- | [IMAP transporter オブジェクト](#imap-transporter-オブジェクト) | + +#### 説明 + +The `4D.IMAPTransporter.new()` function creates and returns a new object of the `4D.IMAPTransporter` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`IMAP New transporter`](#imap-new-transporter) コマンドã¨åŒä¸€ã§ã™ã€‚ + +## .acceptUnsecureConnection + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.acceptUnsecureConnection** : Boolean + +#### 説明 + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +æš—å·åŒ–ã•れã¦ã„ãªã„接続ãŒè¨±å¯ã•れã¦ã„ãªã„å ´åˆã«ã¯ **false** ãŒæ ¼ç´ã•れã¦ãŠã‚Šã€ãã®å ´åˆã«æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šãŒä¸å¯èƒ½ãªå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +使用å¯èƒ½ãªã‚»ã‚­ãƒ¥ã‚¢ãªãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- SMTP + - 465: SMTPS + - 587 ã¾ãŸã¯ 25: STARTTLS アップグレードãŒã•れ㟠SMTP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- IMAP + - 143: IMAP éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 993: STARTTLS アップグレードãŒã•れ㟠IMAP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- POP3 + - 110: POP3 éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + +## .addFlags() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
        **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
        **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| 引数 | タイプ | | 説明 | +| -------- | ------ |:--:| --------------------------------------------------------------------------------------------------------- | +| msgIDs | コレクション | -> | 文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³: メッセージã®å›ºæœ‰ID (テキスト型)
        テキスト: メッセージã®å›ºæœ‰ID
        å€é•·æ•´æ•° (IMAP all): é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| keywords | オブジェクト | -> | 追加ã™ã‚‹ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãƒ•ラグ | +| 戻り値 | オブジェクト | <- | addFlags処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.addFlags()` function adds flags to the `msgIDs` for the specified `keywords`. + +`msgIDs` ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* 指定ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID ã‚’æ ¼ç´ã—㟠*コレクション* +* å˜ä¸€ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID (*テキスト*) +* 以下ã®å®šæ•° (*longint*) を使用ã™ã‚‹ã“ã¨ã§ã€é¸æŠžã•れã¦ã„るメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + + | 定数 | 値 | 説明 | + | -------- | - | ------------------------- | + | IMAP all | 1 | é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ | + +`keywords` ã«ã¯ã€`msgIDs` å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«å¯¾ã—ã¦è¿½åŠ ã™ã‚‹ãƒ•ラグã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰å€¤ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã—ã¾ã™ã€‚ 次ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| 引数 | タイプ | 説明 | +| --------- | ------- | --------------------------------------------- | +| $draft | Boolean | メッセージ㫠"draft" フラグを追加ã™ã‚‹ã«ã¯ true | +| $seen | Boolean | メッセージ㫠"seen" フラグを追加ã™ã‚‹ã«ã¯ true | +| $flagged | Boolean | True to add the "flagged" flag to the message | +| $answered | Boolean | メッセージ㫠"answered" フラグを追加ã™ã‚‹ã«ã¯ true | +| $deleted | Boolean | メッセージ㫠"deleted" フラグを追加ã™ã‚‹ã«ã¯ true | +> * false値ã¯ç„¡è¦–ã•れã¾ã™ã€‚ +> * キーワードフラグã®è§£é‡ˆã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã”ã¨ã«ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + +#### 例題 + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// transporter を作æˆã—ã¾ã™ +$transporter:=IMAP New transporter($options) + +// ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ +$boxInfo:=$transporter.selectBox("INBOX") + +// INBOXã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’既読ã«è¨­å®šã—ã¾ã™ +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.addFlags(IMAP all;$flags) +``` + + + +## .append() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object +| 引数 | タイプ | | 説明 | +| -------------- | ------ |:--:| ----------------------- | +| mailObj | オブジェクト | -> | Email オブジェクト | +| destinationBox | テキスト | -> | Emailオブジェクトをå—ä¿¡ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ | +| options | オブジェクト | -> | 文字セット情報を格ç´ã—ãŸã‚ªãƒ–ジェクト | +| 戻り値 | オブジェクト | <- | delete処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.append()` function appends a `mailObj` to the `destinationBox`. + +`mailObj` ã«ã¯ã€Email オブジェクトを渡ã—ã¾ã™ã€‚ メールプロパティã«é–¢ã™ã‚‹åŒ…括的ãªè©³ç´°ã«ã¤ã„ã¦ã¯ã€[Email オブジェクト](emails.html#email-オブジェクト) ã‚’å‚ç…§ãã ã•ã„。 `.append()` 関数㯠Email オブジェクト㮠`keywords` 属性内ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚¿ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +ä»»æ„ã® `destinationBox` ã«ã¯ã€`mailObj` ãŒè¿½åŠ ã•れるメールボックスã®åå‰ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ çœç•¥ã—ãŸå ´åˆã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ä»»æ„ã® `options` ã«ã¯ã€ãƒ¡ãƒ¼ãƒ«ã®ç‰¹å®šéƒ¨åˆ†ã®æ–‡å­—セットやエンコーディングを定義ã™ã‚‹ã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 次ã®ãƒ—ロパティをå«ã¿ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------- | ---- | --------------------------------------------------------------------------------- | +| headerCharset | Text | メールã®ä»¥ä¸‹ã®éƒ¨åˆ†ã§ä½¿ç”¨ã•れる文字セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°: ä»¶åã€æ·»ä»˜ãƒ•ァイルåã€ãƒ¡ãƒ¼ãƒ«åã®å±žæ€§ã€‚ å–り得る値: 以下ã®å¯èƒ½ãªæ–‡å­—セットテーブルをå‚ç…§ãã ã•ã„。 | +| bodyCharset | Text | メール㮠HTML ãŠã‚ˆã³ãƒ†ã‚­ã‚¹ãƒˆæœ¬æ–‡ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã§ä½¿ç”¨ã•れる文字セットã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€‚ å–り得る値: 以下ã®å¯èƒ½ãªæ–‡å­—セットテーブルをå‚ç…§ãã ã•ã„。 | + +使用å¯èƒ½ãªæ–‡å­—セット: + +| 定数 | 値 | 説明 | +| ------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
        • headerCharset: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • bodyCharset: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        | +| mail mode ISO88591 | ISO-8859-1 |
        • headerCharset: ISO-8859-1 & Quoted-printable
        • bodyCharset: ISO-8859-1 & 8-bit
        | +| mail mode UTF8 | US-ASCII_UTF8_QP | headerCharset & bodyCharset: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (**デフォルト値**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | headerCharset & bodyCharset: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64 | + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + +#### 例題 + +Drafts メールボックスã«ãƒ¡ãƒ¼ãƒ«ã‚’ä¿å­˜ã—ã¾ã™: + +```4d +var $settings; $status; $msg; $imap: Object + +$settings:=New object("host"; "domain.com"; "user"; "xxxx"; "password"; "xxxx"; "port"; 993) + +$imap:=IMAP New transporter($settings) + +$msg:=New object +$msg.from:="xxxx@domain.com" +$msg.subject:="Lorem Ipsum" +$msg.textBody:="Lorem ipsum dolor sit amet, consectetur adipiscing elit." +$msg.keywords:=New object +$msg.keywords["$seen"]:=True // ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«æ—¢èª­ãƒ•ラグをã¤ã‘ã¾ã™ +$msg.keywords["$draft"]:=True // // メッセージã«ä¸‹æ›¸ãフラグをã¤ã‘ã¾ã™ + +$status:=$imap.append($msg; "Drafts") +``` + + + + + + + + + + +## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.authenticationMode** : Text +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `IMAP authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `IMAP authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `IMAP authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + + + + + + +## .checkConnection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.checkConnection()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| -------------------------- | +| 戻り値 | オブジェクト | <- | transporter オブジェクト接続ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. ã“ã®é–¢æ•°ã‚’使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æä¾›ã•れãŸå€¤ãŒæœ‰åйã‹ã©ã†ã‹ã‚’検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +ã“ã®é–¢æ•°ã¯ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã€ãƒ¡ãƒ¼ãƒ«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ------------------------ | ---------- | ------------------------------------------------- | +| success | | boolean | ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| status | | number | (SMTPã®ã¿) メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚³ãƒ¼ãƒ‰ (メール処ç†ã«é–¢ä¿‚ãªã„å•題ã®å ´åˆã«ã¯ 0) | +| statusText | | text | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | collection | 4Dエラースタック (メールサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[ ].errCode | number | 4Dエラーコード | +| | \[ ].message | text | 4Dエラーã®è©³ç´° | +| | \[ ].componentSignature | text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + + + + +## .checkConnectionDelay + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.checkConnectionDelay** : Integer + +#### 説明 + +The `.checkConnectionDelay` property contains the maximum time (in seconds) allowed prior to checking the connection to the server. 関数呼ã³å‡ºã—ã®é–“éš”ãŒã“ã®æ™‚é–“ã‚’è¶…éŽã™ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼æŽ¥ç¶šãŒç¢ºèªã•れã¾ã™ã€‚ プロパティ㌠*server* オブジェクトã«ã‚ˆã£ã¦è¨­å®šã•れã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ォルト㧠300 ã¨ã„ã†å€¤ãŒä½¿ç”¨ã•れã¾ã™ã€‚ +> **警告**: 定義ã•れãŸã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆãŒã€ã‚µãƒ¼ãƒãƒ¼ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚ˆã‚ŠçŸ­ã„よã†ã«ã—ã¦ãã ã•ã„。ãã†ã§ãªã„å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ç„¡æ„味ã«ãªã‚Šã¾ã™ã€‚ + + + +## .connectionTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.connectionTimeOut** : Integer + + +#### 説明 + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる `server` オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルト㯠30 ã§ã™ã€‚ + + + + + +## .copy() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
        **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| 引数 | タイプ | | 説明 | +| -------------- | ------ |:--:| ------------------------------- | +| msgsIDs | コレクション | -> | メッセージã®å›ºæœ‰ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (テキスト) | +| allMsgs | æ•´æ•° | -> | `IMAP all`: é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| destinationBox | テキスト | -> | メッセージã®ã‚³ãƒ”ー先ã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ | +| 戻り値 | オブジェクト | <- | copy処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.copy()` function copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +- *msgsIDs* ã«ã¯ã€ã‚³ãƒ”ーã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID ã‚’æ ¼ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ +- *allMsgs* ã«ã¯ã€é¸æŠžã•れã¦ã„るメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コピーã™ã‚‹ãŸã‚ã®å®šæ•° (å€é•·æ•´æ•°åž‹): + +*destinationBox* ã«ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚³ãƒ”ー先メールボックスã®åç§°ã‚’ãƒ†ã‚­ã‚¹ãƒˆå€¤ã§æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + +#### 例題 1 + +é¸æŠžã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コピーã—ã¾ã™: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("inbox") + + // メッセージã®å›ºæœ‰ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // 見ã¤ã‹ã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "documents" メールボックスã¸ã‚³ãƒ”ーã—ã¾ã™ + $status:=$transporter.copy($mailIds;"documents") +``` + +#### 例題 2 + +カレントメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’コピーã—ã¾ã™: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("inbox") + + // 全メッセージを "documents" メールボックスã¸ã‚³ãƒ”ーã—ã¾ã™ + $status:=$transporter.copy(IMAP all;"documents") +``` + + + +## .createBox() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.createBox**( *name* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| ----------------- | +| name | テキスト | -> | æ–°è¦ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åç§° | +| 戻り値 | オブジェクト | <- | createBox処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.createBox()` function creates a mailbox with the given `name`. IMAPサーãƒãƒ¼ã®éšŽå±¤åŒºåˆ‡ã‚Šæ–‡å­—ãŒãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å内ã«å«ã¾ã‚Œã‚‹å ´åˆã€IMAPサーãƒãƒ¼ã¯æŒ‡å®šã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ã®ã«å¿…è¦ãªè¦ªéšŽå±¤ã‚’作æˆã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€"/" ãŒéšŽå±¤åŒºåˆ‡ã‚Šæ–‡å­—ã¨ã—ã¦ä½¿ã‚れるサーãƒãƒ¼ã«ãŠã„ã¦ã€"Projects/IMAP/Doc" を作æˆã—よã†ã¨ã—ãŸå ´åˆ: + +* "Projects" & "IMAP" ãŒã™ã§ã«å­˜åœ¨ã™ã‚‹å ´åˆã¯ "Doc" メールボックスã®ã¿ã‚’作æˆã—ã¾ã™ã€‚ +* “Projects†ã®ã¿ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ã€"IMAP" & "Doc" メールボックスを作æˆã—ã¾ã™ã€‚ +* ã„ãšã‚Œã‚‚存在ã—ãªã„å ´åˆã«ã¯ã€"Projects" & “IMAP†& "Doc" メールボックスをãれãžã‚Œä½œæˆã—ã¾ã™ã€‚ + +`name` ã«ã¯ã€æ–°ã—ã„メールボックスã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + +#### 例題 + +æ–°ã—ㄠ“Invoices†メールボックスを作æˆã—ã¾ã™: + + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") +If(OK=1) +$options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$status:=$transporter.createBox("Invoices") + +If ($status.success) +ALERT("メールボックスãŒä½œæˆã§ãã¾ã—ãŸã€‚") +Else +ALERT("エラー: "+$status.statusText) +End if +End if +``` + + + + + + + +## .delete() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.delete**( *msgsIDs* : Collection ) : Object
        **.delete**( *allMsgs* : Integer ) : Object +| 引数 | タイプ | | 説明 | +| ------- | ------ |:--:| ------------------------------- | +| msgsIDs | コレクション | -> | メッセージã®å›ºæœ‰ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (テキスト) | +| allMsgs | æ•´æ•° | -> | `IMAP all`: é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| 戻り値 | オブジェクト | <- | delete処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.delete()` function sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs`. + +以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +- `msgsIDs` ã«ã¯ã€å‰Šé™¤ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID ã‚’æ ¼ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ +- `allMsgs` ã«ã¯ã€é¸æŠžã•れã¦ã„るメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã™ã‚‹ãŸã‚ã®å®šæ•° (å€é•·æ•´æ•°åž‹): + +ã“ã®é–¢æ•°ã‚’実行ã—ã¦ã‚‚ã€ãƒ¡ãƒ¼ãƒ«ãŒå®Ÿéš›ã«å‰Šé™¤ã•れる訳ã§ã¯ã‚りã¾ã›ã‚“。 "削除済ã¿" フラグãŒã¤ã‘られãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚‚引ãç¶šã [.searchMails()](#searchmails) 関数ã«ã‚ˆã£ã¦æ¤œç´¢å¯èƒ½ã§ã™ã€‚ フラグãŒã¤ã‘られãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯ã€[`.expunge()`](#expunge) を実行ã—ãŸã¨ãã‹ã€åˆ¥ã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ãŸã¨ãã€ã‚ã‚‹ã„ã¯([IMAP New transporter](#imap-new-transporter) ã§ä½œæˆã•れãŸ) [transporter オブジェクト](#imap-transporter-オブジェクト) ãŒæ¶ˆåŽ»ã•れãŸã¨ãã«ã®ã¿ã€IMAPサーãƒãƒ¼ã‹ã‚‰å‰Šé™¤ã•れã¾ã™ã€‚ + + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + +#### 例題 1 + +é¸æŠžã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã—ã¾ã™: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("Inbox") + + // メッセージã®å›ºæœ‰ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ + $mailIds:=$transporter.searchMails("subject \"Reports\"") + + // é¸æŠžã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã—ã¾ã™ + $status:=$transporter.delete($mailIds) +``` + +#### 例題 2 + +カレントメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã—ã¾ã™: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("Junk Email") + + // カレントメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã—ã¾ã™ + $status:=$transporter.delete(IMAP all) +``` + + + +## .deleteBox() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.deleteBox**( *name* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| ----------------- | +| name | テキスト | -> | 削除ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åç§° | +| 戻り値 | オブジェクト | <- | deleteBox処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.deleteBox()` function permanently removes the mailbox with the given `name` from the IMAP server. 存在ã—ãªã„メールボックスã€ã¾ãŸã¯ INBOX を削除ã—よã†ã¨ã—ã¦å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +`name` ã«ã¯ã€å‰Šé™¤ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åå‰ã‚’渡ã—ã¾ã™ã€‚ +> * å­ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’æŒã¤è¦ªãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒ "\Noselect" 属性をæŒã£ã¦ã„ã‚‹å ´åˆã€ãã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¯å‰Šé™¤ã§ãã¾ã›ã‚“。 +> * 削除ã•れるメールボックス内ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚‚ã™ã¹ã¦å‰Šé™¤ã•れã¾ã™ã€‚ +> * メールボックス削除ã®å¯å¦ã¯ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ä¾å­˜ã—ã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + +#### 例題 + +"Bills" メールボックスã®éšŽå±¤ã‹ã‚‰ã€"Nova Orion Industries" ã®å­ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’削除ã—ã¾ã™: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// delete mailbox +$name:="Bills"+$transporter.getDelimiter()+"Nova Orion Industries" +$status:=$transporter.deleteBox($name) + +If ($status.success) + ALERT("メールボックスãŒå‰Šé™¤ã•れã¾ã—ãŸã€‚") + Else + ALERT("エラー: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .expunge() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.expunge()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| --------------- | +| 戻り値 | オブジェクト | <- | expunge処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + +#### 説明 + +The `.expunge()` function removes all messages with the "deleted" flag from the IMAP mail server. The "deleted" flag can be set with the [`.delete()`](#delete) or [`.addFlags()`](#addflags) methods. + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + +#### 例題 + +```4d +var $options;$transporter;$boxInfo;$status : Object +var $ids : Collection + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// transporter を作æˆã—ã¾ã™ +$transporter:=IMAP New transporter($options) + +// ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ +$boxInfo:=$transporter.selectBox("INBOX") + +// INBOX ã®æ—¢èª­ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã«å‰Šé™¤ãƒ•ラグを立ã¦ã¾ã™ +$ids:=$transporter.searchMails("SEEN") +$status:=$transporter.delete($ids) + +// "deleted" フラグãŒã¤ã„ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ã™ã¹ã¦æ¶ˆåŽ»ã—ã¾ã™ +$status:=$transporter.expunge() +``` + + + +## .getBoxInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | --------- | +| v18 R5 | name ãŒä»»æ„ã« | +| v18 R4 | 追加 | +
        + +**.getBoxInfo**( { *name* : Text }) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| -------------- | +| name | テキスト | -> | メールボックスã®åç§° | +| 戻り値 | オブジェクト | <- | boxInfo オブジェクト | + + +#### 説明 + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox *name*. ã“ã®é–¢æ•°ã¯ã€[`.selectBox()`](#selectbox) ã¨åŒã˜æƒ…報を返ã—ã¾ã™ãŒã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¯å¤‰ãˆã¾ã›ã‚“。 + +ä»»æ„ã® *name* パラメーターã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å称を渡ã—ã¾ã™ã€‚ ã“ã®åç§°ã¯æ˜Žç¢ºãªå·¦ã‹ã‚‰å³ã¸ã®éšŽå±¤ã‚’表ã—ã€ç‰¹å®šã®åŒºåˆ‡ã‚Šæ–‡å­—ã§ãƒ¬ãƒ™ãƒ«ã‚’区分ã‘ã—ã¾ã™ã€‚ ã“ã®åŒºåˆ‡ã‚Šæ–‡å­—㯠[`.getDelimiter()`](#getdelimiter) 関数ã§èª¿ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +è¿”ã•れる `boxInfo` オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------ | ------------------------------------------ | +| name | text | メールボックスã®åç§° | +| mailCount | number | メールボックス内ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•° | +| mailRecent | number | (æ–°ã—ã„メッセージã§ã‚ã‚‹ã“ã¨ã‚’表ã™) "recent" フラグãŒã¤ã„ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•° | + + + +#### 例題 + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $info:=$transporter.getBoxInfo("INBOX") + ALERT("INBOX ã«ã¯ "+String($info.mailRecent)+" ä»¶ã®æœ€è¿‘ã®ãƒ¡ãƒ¼ãƒ«ãŒã‚りã¾ã™ã€‚") +``` + + + + + +## .getBoxList() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------ | +| v18 R4 | 追加 | +| v19 | `isSubscribed` を追加 | +
        + +**.getBoxList**( { *parameters* : Object } ) : Collection +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| --------------------- | +| parameters | オブジェクト | -> | 引数ã®ã‚ªãƒ–ジェクト | +| 戻り値 | コレクション | <- | mailbox オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.getBoxList()` function returns a collection of mailboxes describing all of the available mailboxes. ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ã€IMAPメールサーãƒãƒ¼ä¸Šã«ã‚るメッセージã®ä¸€è¦§ã‚’ローカルã§ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +ä»»æ„ã® `parameters` パラメーターã«ã¯ã€è¿”ã•れるメールボックスをフィルターã™ã‚‹ãŸã‚ã®å€¤ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------ | --- | ---------------------------------------------------- | +| isSubscribed | ブール |
      • **True**: 購読ã—ã¦ã„るメールボックスã®ã¿ã‚’è¿”ã—ã¾ã™ã€‚
      • **False**: ã™ã¹ã¦ã®åˆ©ç”¨å¯èƒ½ãªãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’è¿”ã—ã¾ã™
      • | + +#### 戻り値 + +è¿”ã•れるコレクションã®å„オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------------- | ------- | --------------------------------------------------------------------------- | +| \[].name | text | メールボックスã®åç§° | +| \[].selectable | boolean | アクセス権ã§ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã§ãã‚‹ã‹ã©ã†ã‹ã‚’表ã—ã¾ã™:
        • true - メールボックスã¯é¸æŠžå¯èƒ½
        • false - メールボックスã¯é¸æŠžä¸å¯èƒ½
        | +| \[].inferior | boolean | アクセス権ã§ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã«ä¸‹ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ã‚’作æˆã§ãã‚‹ã‹ã©ã†ã‹ã‚’表ã—ã¾ã™:
        • true - 下ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ã¯ä½œæˆå¯èƒ½
        • false - 下ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ã¯ä½œæˆä¸å¯èƒ½
        | +| \[].interesting | boolean | サーãƒãƒ¼ãŒãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã« “interesting†ã®ãƒžãƒ¼ã‚¯ä»˜ã‘ã‚’ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’表ã—ã¾ã™:
        • true - メールボックスã¯ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ "interesting" ã®ãƒžãƒ¼ã‚¯ä»˜ã‘ã‚’ã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã«ã¯æ–°ç€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå…¥ã£ã¦ã„ã‚‹å ´åˆãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚
        • false - メールボックスã¯ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ "interesting" ã®ãƒžãƒ¼ã‚¯ä»˜ã‘ã‚’ã•れã¦ã„ã¾ã›ã‚“。
        | + + +アカウントã«ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒä¸€ã¤ã‚‚ãªã„å ´åˆã€ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.getBoxList()` ã¯æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ +> * æŽ¥ç¶šãŒæŒ‡å®šã•ã‚ŒãŸæ™‚é–“ (`IMAP New transporter` å‚ç…§) 以上ã«ä½¿ç”¨ã•れãªã‹ã£ãŸå ´åˆã«ã¯ã€`.checkConnection( )` 関数ãŒè‡ªå‹•çš„ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("æ–°è¦ãƒ¡ãƒ¼ãƒ«ãŒå±Šã„ã¦ã„ã¾ã™: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getDelimiter() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.getDelimiter()** : Text +| 引数 | タイプ | | 説明 | +| --- | ---- |:--:| ------- | +| 戻り値 | テキスト | <- | 階層区切り文字 | + + +#### 説明 + +The `.getDelimiter()` function returns the character used to delimit levels of hierarchy in the mailbox name. + +ã“ã®åŒºåˆ‡ã‚Šæ–‡å­—ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* 下層レベルã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’作æˆã™ã‚‹ +* メールボックスã®éšŽå±¤å†…ã§ã®ä¸Šå±¤ãƒ»ä¸‹å±¤ãƒ¬ãƒ™ãƒ«ã‚’検索ã™ã‚‹ + + +#### 戻り値 + +メールボックスåã®åŒºåˆ‡ã‚Šæ–‡å­— +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.getDelimiter()` ã¯æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ +> * æŽ¥ç¶šãŒæŒ‡å®šã•ã‚ŒãŸæ™‚é–“ ([IMAP New transporter](#checkconnectiondelay) å‚ç…§) 以上ã«ä½¿ç”¨ã•れãªã‹ã£ãŸå ´åˆã«ã¯ã€[`.checkConnection()`](#checkconnection) 関数ãŒè‡ªå‹•çš„ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ + + + +#### 例題 + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("æ–°è¦ãƒ¡ãƒ¼ãƒ«ãŒå±Šã„ã¦ã„ã¾ã™: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getMail() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
        **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object +| 引数 | タイプ | | 説明 | +| --------- | ------ |:--:| ------------------------------------------------ | +| msgNumber | æ•´æ•° | -> | メッセージã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| msgID | テキスト | -> | メッセージã®å›ºæœ‰ID | +| options | オブジェクト | -> | メッセージ管ç†ã‚ªãƒ—ション | +| 戻り値 | オブジェクト | <- | [Email オブジェクト](EmailObjectClass.md#email-オブジェクト) | + + +#### 説明 + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. ã“ã®é–¢ã™ã‚’使用ã™ã‚‹ã¨ã€ãƒ¡ãƒ¼ãƒ«ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„をローカルã§ç®¡ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +最åˆã®å¼•æ•°ã¨ã—ã¦ã€æ¬¡ã®ã„ãšã‚Œã‹ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* *msgNumber* ã«ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· (*å€é•·æ•´æ•°*) を渡ã—ã¾ã™ã€‚ +* *msgID*ã«ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID (*テキスト*) を渡ã—ã¾ã™ã€‚ + +ä»»æ„ã® *options* 引数ã¨ã—ã¦ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ‰±ã„方を定義ã™ã‚‹è¿½åŠ ã®ã‚ªãƒ–ジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 次ã®ãƒ—ロパティを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------- | -------------------------------------------------------------------------- | +| updateSeen | boolean | true 時ã«ã¯ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "既読" ã«ã—ã¾ã™ã€‚ false 時ã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®çŠ¶æ…‹ã¯å¤‰åŒ–ã—ã¾ã›ã‚“。 デフォルト値: true | +| withBody | boolean | true を渡ã™ã¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ã‚’è¿”ã—ã¾ã™ã€‚ false 時ã«ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒ˜ãƒƒãƒ€ãƒ¼ã®ã¿ãŒè¿”ã•れã¾ã™ã€‚ デフォルト値: true | +> * *msgID* 引数ãŒå­˜åœ¨ã—ãªã„メッセージを指定ã—ãŸå ´åˆã€é–¢æ•°ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã— **Null** ã‚’è¿”ã—ã¾ã™ã€‚ +> * [`.selectBox()`](#selectbox) ã«ã‚ˆã£ã¦é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.getMail()` 㯠[`.selectBox()`](#selectbox) ã§æœ€å¾Œã«æŒ‡å®šã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¸ã®æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ + + + +#### 戻り値 + +`.getMail()` ã¯ã€ä»¥ä¸‹ã® IMAP特有ã®ãƒ—ロパティをæŒã¤ [`Email` オブジェクト](EmailObjectClass.md#email-オブジェクト)ã‚’è¿”ã—ã¾ã™: *id*ã€*receivedAt*ã€ãŠã‚ˆã³ *size*。 + +#### 例題 + +ID = 1ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã—ã¾ã™: + +```4d + var $server : Object + var $info; $mail; $boxInfo : Variant + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + // transporter を作æˆã—ã¾ã™ + $transporter:=IMAP New transporter($server) + + //ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("Inbox") + + // ID = 1 ã® Emailオブジェクトをå–å¾—ã—ã¾ã™ + $mail:=$transporter.getMail(1) +``` + + + + +## .getMails() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
        **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object +| 引数 | タイプ | | 説明 | +| -------- | ------ |:--:| -------------------------------------------------------- | +| ids | コレクション | -> | メッセージID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| startMsg | æ•´æ•° | -> | 先頭メッセージã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| endMsg | æ•´æ•° | -> | 最後ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| options | オブジェクト | -> | メッセージ管ç†ã‚ªãƒ—ション | +| 戻り値 | オブジェクト | <- | 次ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクト:
        • [Email オブジェクト](EmailObjectClass.md#email-オブジェクト) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³
        • 見ã¤ã‹ã‚‰ãªã‹ã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã® ID ã¾ãŸã¯ç•ªå·ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³
        | + + +#### 説明 + +The `.getMails()` function returns an object containing a collection of `Email` objects. + +**第一シンタックス:** + +***.getMails( ids { ; options } ) -> result*** + +第一シンタックスを使用ã™ã‚‹ã¨ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ID ã«åŸºã¥ã„ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +*ids* 引数ã¨ã—ã¦ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’渡ã—ã¾ã™ã€‚ ã“れら㮠ID 㯠[`.getMail()`](#getmail) ã§å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»»æ„ã® *options* 引数を渡ã™ã¨ã€è¿”ã•れるメッセージã®ãƒ‘ートを定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 利用å¯èƒ½ãªãƒ—ロパティã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã® **オプション** ã®è¡¨ã‚’å‚ç…§ãã ã•ã„。 + +**第二シンタックス:** + + ***.getMails( startMsg ; endMsg { ; options } ) -> result*** + +第二シンタックスを使用ã™ã‚‹ã¨ã€é€£ç¶šã—ãŸãƒ¬ãƒ³ã‚¸ã«åŸºã¥ã„ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 渡ã•れる値ã¯ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã§ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ä½ç½®ã‚’表ã—ã¾ã™ã€‚ + +*startMsg* ã«ã¯ã€é€£ç¶šã—ãŸãƒ¬ãƒ³ã‚¸ã®æœ€åˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã«å¯¾å¿œã™ã‚‹ *å€é•·æ•´æ•°* ã®å€¤ã‚’渡ã—ã¾ã™ã€‚ è² ã®å€¤ (*startMsg* <= 0) を渡ã—ãŸå ´åˆã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æœ€åˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒé€£ç¶šãƒ¬ãƒ³ã‚¸ã®å…ˆé ­ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + +*endMsg* ã«ã¯ã€é€£ç¶šãƒ¬ãƒ³ã‚¸ã«å«ã‚る最後ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã«å¯¾å¿œã™ã‚‹ *å€é•·æ•´æ•°* ã®å€¤ã‚’渡ã—ã¾ã™ã€‚ è² ã®å€¤ (*startMsg* <= 0) を渡ã—ãŸå ´åˆã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æœ€å¾Œã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒé€£ç¶šãƒ¬ãƒ³ã‚¸ã®æœ€çµ‚メッセージã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + +ä»»æ„ã® *options* 引数を渡ã™ã¨ã€è¿”ã•れるメッセージã®ãƒ‘ートを定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**オプション** + +| プロパティ | タイプ | 説明 | +| ---------- | --- | ---------------------------------------------------------------------- | +| updateSeen | ブール | true 時ã«ã¯ã€æŒ‡å®šã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "既読" ã«ã—ã¾ã™ã€‚ false 時ã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®çŠ¶æ…‹ã¯å¤‰åŒ–ã—ã¾ã›ã‚“。 デフォルト値: true | +| withBody | ブール | true を渡ã™ã¨æŒ‡å®šã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æœ¬æ–‡ã‚’è¿”ã—ã¾ã™ã€‚ false 時ã«ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãƒ˜ãƒƒãƒ€ãƒ¼ã®ã¿ãŒè¿”ã•れã¾ã™ã€‚ デフォルト値: true | +> * [`.selectBox()`](#selectbox) ã«ã‚ˆã£ã¦é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.getMails()` 㯠[`.selectBox()`](#selectbox) ã§æœ€å¾Œã«æŒ‡å®šã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¸ã®æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ + + +#### 戻り値 + +`.getMails()` ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ + + +| プロパティ | タイプ | 説明 | +| ----- | ------ | ------------------------------------------------------------------------------------------------ | +| list | コレクション | [`Email`](EmailObjectClass.md#email-オブジェクト) オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ Email オブジェクトãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ | + +|notFound |コレクション| 次ã®è¦ç´ ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³:
        • 第一シンタックス - 指定ã—㟠ID ã®ã†ã¡ã€å­˜åœ¨ã—ãªã‹ã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã® ID
        • 第二シンタックス - startMsg 㨠endMsg ã®é–“ã®ç•ªå·ã®ã†ã¡ã€å­˜åœ¨ã—ãªã‹ã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·
        ã™ã¹ã¦ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆã«ã¯ã€ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚| + + +#### 例題 + +ç›´è¿‘ã® 20ä»¶ã®ãƒ¡ãƒ¼ãƒ«ã‚’ã€"既読" ステータスを変更ã›ãšã«å–å¾—ã—ã¾ã™: + +```4d + var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // ç›´è¿‘20ä»¶ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’ã€"既読" ã«ã›ãšã«å–å¾—ã—ã¾ã™ + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... + End for each + End if +``` + + + + +## .getMIMEAsBlob() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
        **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob + +| 引数 | タイプ | | 説明 | +| ---------- | ---- |:--:| ------------------------------------------------------------- | +| msgNumber | æ•´æ•° | -> | メッセージã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| msgID | テキスト | -> | メッセージã®å›ºæœ‰ID | +| updateSeen | ブール | -> | true 時ã«ã¯ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "既読" ã«ã—ã¾ã™ã€‚ false 時ã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®çŠ¶æ…‹ã¯å¤‰åŒ–ã—ã¾ã›ã‚“。 | +| 戻り値 | BLOB | <- | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れ㟠MIME文字列㮠BLOB | + + + + +#### 説明 + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. + +最åˆã®å¼•æ•°ã¨ã—ã¦ã€æ¬¡ã®ã„ãšã‚Œã‹ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* *msgNumber* ã«ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· (*å€é•·æ•´æ•°*) を渡ã—ã¾ã™ã€‚ +* *msgID*ã«ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID (*テキスト*) を渡ã—ã¾ã™ã€‚ + +ä»»æ„ã® *updateSeen* 引数を渡ã™ã¨ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã§ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ "既読" ã¨ãƒžãƒ¼ã‚¯ã•れるã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ 以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* **True** - メッセージ㯠"既読" ã¨ãƒžãƒ¼ã‚¯ã•れã¾ã™ (ã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒèª­ã¾ã‚ŒãŸã“ã¨ã‚’表ã—ã¾ã™) +* **False** - メッセージ㮠"既読" ステータスã¯å¤‰åŒ–ã—ã¾ã›ã‚“。 +> * *msgNumber* ã¾ãŸã¯ *msgID* 引数ãŒå­˜åœ¨ã—ãªã„メッセージを指定ã—ãŸå ´åˆã€é–¢æ•°ã¯ç©ºã® BLOB ã‚’è¿”ã—ã¾ã™ã€‚ +> * [`.selectBox()`](#selectbox) ã«ã‚ˆã£ã¦é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒãªã„å ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.getMIMEAsBlob()` 㯠`.selectBox()` ã§æœ€å¾Œã«æŒ‡å®šã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¸ã®æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ + + +#### 戻り値 + +`.getMIMEAsBlob()` 㯠`BLOB` ã‚’è¿”ã—ã¾ã™ã€‚ã“ã® BLOB ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã—ãŸã‚Šã€`MAIL Convert from MIME` コマンドを使用ã—㦠[`Email` オブジェクト](EmailObjectClass.md#email-object) ã¸ã¨å¤‰æ›ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### 例題 + + +```4d + var $server : Object + var $boxInfo : Variant + var $blob : Blob + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + // transporter を作æˆã—ã¾ã™ + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("Inbox") + + // BLOB ã‚’å–å¾—ã—ã¾ã™ + $blob:=$transporter.getMIMEAsBlob(1) +``` + + + + +## .host + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.host** : Text + +#### 説明 + +The `.host` property contains the name or the IP address of the host server. ã“ã®æƒ…å ±ã¯ãƒ¡ãƒ¼ãƒ«é€šä¿¡ (SMTPã€POP3ã€IMAP) ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + + + + + +## .logFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.logFile** : Text + +#### 説明 + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. パスã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆ Logs フォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã€ã‚ã‚‹ã„ã¯çµ¶å¯¾ãƒ‘スを指定ã§ãã¾ã™ã€‚ + +`SET DATABASE PARAMETER` ã‚³ãƒžãƒ³ãƒ‰ã§æœ‰åŠ¹åŒ–ã•れる通常ã®ãƒ­ã‚°ãƒ•ァイルã¨ã¯ç•°ãªã‚Šã€æ‹¡å¼µãƒ­ã‚°ãƒ•ァイルã¯ã™ã¹ã¦ã®é€ä¿¡ã•れãŸãƒ¡ãƒ¼ãƒ«ã® MIMEコンテンツをä¿å­˜ã—ã€ã‚µã‚¤ã‚ºåˆ¶é™ãŒã‚りã¾ã›ã‚“。 拡張ログファイルã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®ç« ã‚’ãれãžã‚Œå‚ç…§ãã ã•ã„: + +* **SMTP 接続** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 接続** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP 接続** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .move() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
        **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| 引数 | タイプ | | 説明 | +| -------------- | ------ |:--:| ------------------------------- | +| msgsIDs | コレクション | -> | メッセージã®å›ºæœ‰ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (テキスト) | +| allMsgs | æ•´æ•° | -> | `IMAP all`: é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| destinationBox | テキスト | -> | メッセージã®ç§»å‹•å…ˆã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ | +| 戻り値 | オブジェクト | <- | move処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.move()` function moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +以下ã®ã‚‚ã®ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +- *msgsIDs* ã«ã¯ã€ç§»å‹•ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID ã‚’æ ¼ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ +- *allMsgs* ã«ã¯ã€é¸æŠžã•れã¦ã„るメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’移動ã™ã‚‹ãŸã‚ã®å®šæ•° (å€é•·æ•´æ•°åž‹): + +*destinationBox* ã«ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç§»å‹•先メールボックスã®åç§°ã‚’ãƒ†ã‚­ã‚¹ãƒˆå€¤ã§æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> RFC [8474](https://tools.ietf.org/html/rfc8474) ã«æº–æ‹ ã—ã¦ã„ã‚‹ IMAPサーãƒãƒ¼ã§ã®ã¿ã€ã“ã®é–¢æ•°ã¯ã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ---------- | -------------------------------------------------- | +| success | | Boolean | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | Text | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | Collection | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + +#### 例題 1 + +é¸æŠžã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’移動ã—ã¾ã™: + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("inbox") + + // メッセージã®å›ºæœ‰IDã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ã¾ã™ + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // カレントメールボックス内ã§è¦‹ã¤ã‹ã£ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "documents" メールボックスã«ç§»å‹•ã—ã¾ã™ + $status:=$transporter.move($mailIds;"documents") +``` + +#### 例題 2 + +カレントメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’移動ã—ã¾ã™: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("inbox") + + // カレントメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ "documents" メールボックスã«ç§»å‹•ã—ã¾ã™ + $status:=$transporter.move(IMAP all;"documents") +``` + + + + +## .numToID() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection +| 引数 | タイプ | | 説明 | +| -------- | ------ |:--:| ---------------- | +| startMsg | æ•´æ•° | -> | 先頭メッセージã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| endMsg | æ•´æ•° | -> | 最後ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +| 戻り値 | コレクション | <- | 固有ID ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +The `.numToID()` function converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg* in the currently selected mailbox. + +*startMsg* ã«ã¯ã€é€£ç¶šã—ãŸãƒ¬ãƒ³ã‚¸ã®æœ€åˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã«å¯¾å¿œã™ã‚‹ *å€é•·æ•´æ•°* ã®å€¤ã‚’渡ã—ã¾ã™ã€‚ è² ã®å€¤ (*startMsg* <= 0) を渡ã—ãŸå ´åˆã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æœ€åˆã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒé€£ç¶šãƒ¬ãƒ³ã‚¸ã®å…ˆé ­ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + +*endMsg* ã«ã¯ã€é€£ç¶šãƒ¬ãƒ³ã‚¸ã«å«ã‚る最後ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã«å¯¾å¿œã™ã‚‹ *å€é•·æ•´æ•°* ã®å€¤ã‚’渡ã—ã¾ã™ã€‚ è² ã®å€¤ (*startMsg* <= 0) を渡ã—ãŸå ´åˆã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æœ€å¾Œã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒé€£ç¶šãƒ¬ãƒ³ã‚¸ã®æœ€çµ‚メッセージã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + + +#### 戻り値 + +ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–‡å­—列 (固有ID) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +#### 例題 + + +```4d + var $transporter : 4D.IMAPTransporter + var $server;$boxInfo;$status : Object + var $mailIds : Collection + + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + // ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ + $boxInfo:=$transporter.selectBox("inbox") + + // 最もå¤ã„ 5通ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ID ã‚’å–å¾—ã—ã¾ã™ + $mailIds:=$transporter.numToID(($boxInfo.mailCount-5);$boxInfo.mailCount) + + // カレントメールボックスã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’削除ã—ã¾ã™ + $status:=$transporter.delete($mailIds) +``` + + + +## .removeFlags() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
        **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
        **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| 引数 | タイプ | | 説明 | +| -------- | ------ |:--:| --------------------------------------------------------------------------------------------------------- | +| msgIDs | コレクション | -> | 文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³: メッセージã®å›ºæœ‰ID (テキスト型)
        テキスト: メッセージã®å›ºæœ‰ID
        å€é•·æ•´æ•° (IMAP all): é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ | +| keywords | オブジェクト | -> | 削除ã™ã‚‹ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãƒ•ラグ | +| 戻り値 | オブジェクト | <- | removeFlags処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.removeFlags()` function removes flags from the `msgIDs` for the specified `keywords`. + +`msgIDs` ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +* 指定ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID ã‚’æ ¼ç´ã—㟠*コレクション* +* å˜ä¸€ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®å›ºæœ‰ID (*テキスト*) +* 以下ã®å®šæ•° (*longint*) を使用ã™ã‚‹ã“ã¨ã§ã€é¸æŠžã•れã¦ã„るメールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + + | 定数 | 値 | 説明 | + | -------- | - | ------------------------- | + | IMAP all | 1 | é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ | + +`keywords` ã«ã¯ã€`msgIDs` å¼•æ•°ã§æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‹ã‚‰å‰Šé™¤ã™ã‚‹ãƒ•ラグã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰å€¤ã‚’æ ¼ç´ã—ãŸã‚ªãƒ–ジェクトを渡ã—ã¾ã™ã€‚ 次ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| 引数 | タイプ | 説明 | +| --------- | --- | --------------------------------- | +| $draft | ブール | メッセージ㮠"draft" フラグを削除ã™ã‚‹ã«ã¯ true | +| $seen | ブール | メッセージ㮠"seen" フラグを削除ã™ã‚‹ã«ã¯ true | +| $flagged | ブール | メッセージ㮠"flagged" フラグを削除ã™ã‚‹ã«ã¯ true | +| $answered | ブール | メッセージ㮠"answered" フラグを削除ã™ã‚‹ã«ã¯ true | +| $deleted | ブール | メッセージ㮠"deleted" フラグを削除ã™ã‚‹ã«ã¯ true | + +false値ã¯ç„¡è¦–ã•れã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + +#### 例題 + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// transporter を作æˆã—ã¾ã™ +$transporter:=IMAP New transporter($options) + +// ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã—ã¾ã™ +$boxInfo:=$transporter.selectBox("INBOX") + +// INBOX ã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’未読ã«ã—ã¾ã™ +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.removeFlags(IMAP all;$flags) +``` + + + +## .renameBox() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ----------- | ------ |:--:| ----------------- | +| currentName | テキスト | -> | カレントメールボックスã®åç§° | +| newName | テキスト | -> | æ–°ã—ã„メールボックスå | +| 戻り値 | オブジェクト | <- | renameBox処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.renameBox()` function changes the name of a mailbox on the IMAP server. 存在ã—ãªã„メールボックスã®å称を変更ã—よã†ã¨ã—ãŸã‚Šã€ã™ã§ã«ä½¿ã‚れã¦ã„るメールボックスåã«å¤‰æ›´ã—よã†ã¨ã—ãŸã‚Šã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +`currentName` ã«ã¯ã€å称変更ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + +ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æ–°ã—ã„å称㯠`newName` ã«æ¸¡ã—ã¾ã™ã€‚ + + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + +#### 例題 + +“Invoices†メールボックスを “Bills†ã«å称変更ã—ã¾ã™: + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// メールボックスã®å称変更 +$status:=$transporter.renameBox("Invoices"; "Bills") + +If ($status.success) + ALERT("メールボックスã®åç§°ãŒå¤‰æ›´ã•れã¾ã—ãŸã€‚") + Else + ALERT("エラー: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .port + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.port** : Integer + +#### 説明 + +The `.port` property contains the port number used for mail transactions. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる *server* オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れるãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + +## .searchMails() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R5 | 追加 | +
        + +**.searchMails**( *searchCriteria* : Text ) : Collection +| 引数 | タイプ | | 説明 | +| -------------- | ------ |:--:| -------------- | +| searchCriteria | テキスト | -> | 検索æ¡ä»¶ | +| 戻り値 | コレクション | <- | メッセージ番å·ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +#### 説明 + +> ã“ã®é–¢æ•°ã¯ã€[IMAP プロトコル](https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol) ã®ä»•様ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +The `.searchMails()` function searches for messages that match the given *searchCriteria* in the current mailbox. *searchCriteria* 引数ã«ã¯ã€ä¸€ã¤ä»¥ä¸Šã®æ¤œç´¢ã‚­ãƒ¼ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +*searchCriteria* ã¯ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å¼•æ•°ã§ã€ä¸€ã¤ä»¥ä¸Šã®æ¤œç´¢ã‚­ãƒ¼ (詳細ã¯å¾Œè¿°ã® [利用å¯èƒ½ãªæ¤œç´¢ã‚­ãƒ¼](#利用å¯èƒ½ãªæ¤œç´¢ã‚­ãƒ¼) å‚ç…§) ã‚’æ ¼ç´ã—ã€æ¤œç´¢ã™ã‚‹å€¤ã‚’渡ã—ã¾ã™ (渡ã•ãªã„å ´åˆã‚‚ã‚りã¾ã™)。 検索キーã¯å˜ä¸€ã¾ãŸã¯è¤‡æ•°ã®é …ç›®ã‹ã‚‰ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°: + +``` +SearchKey1 = FLAGGED +SearchKey2 = NOT FLAGGED +SearchKey3 = FLAGGED DRAFT +``` + +> 文字ã®å¤§å°ã¯é€šå¸¸åŒºåˆ¥ã•れã¾ã›ã‚“。 + +- *searchCriteria* 引数㌠null 文字列ã®å ´åˆã€æ¤œç´¢ã¯ "ã™ã¹ã¦ã‚’é¸æŠž" ã¨åŒç­‰ã§ã™ã€‚ +- 引数ãŒè¤‡æ•°ã®æ¤œç´¢ã‚­ãƒ¼ã‚’æ ¼ç´ã—ã¦ã„ã‚‹å ´åˆã€ãれらã™ã¹ã¦ã«åˆè‡´ã™ã‚‹å’Œé›†åˆ (AND) ãŒæ¤œç´¢çµæžœã«ãªã‚Šã¾ã™ã€‚ + +``` +searchCriteria = FLAGGED FROM "SMITH" +``` +... ã“ã®æ¤œç´¢çµæžœã¯ \Flagged フラグãŒè¨­å®šã•れã¦ã„ã¦ã€ã‹ã¤ Smith ã‹ã‚‰é€ã‚‰ã‚ŒãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’ã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ +- **OR** ãŠã‚ˆã³ **NOT** 演算å­ã‚’ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` +searchCriteria = OR SEEN FLAGGED +``` +... \Seen フラグãŒè¨­å®šã•れã¦ã„ã‚‹ã€ã‚ã‚‹ã„㯠\Flagged フラグãŒè¨­å®šã•れã¦ã„るメッセージをã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ + +``` +searchCriteria = NOT SEEN +``` +... \Seen フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージをã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ + +``` +searchCriteria = HEADER CONTENT-TYPE "MIXED" NOT HEADER CONTENT-TYPE "TEXT"... +``` +... content-type ヘッダー㌠"Mixed" ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ã‚‚ã®ã®ã†ã¡ã€"Text" ã¯æ ¼ç´ã—ã¦ã„ãªã„メッセージを返ã—ã¾ã™ã€‚ + +``` +searchCriteria = HEADER CONTENT-TYPE "E" NOT SUBJECT "o" NOT HEADER CONTENT-TYPE "MIXED" +``` +... content-type ヘッダー㌠"e" ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ã‚‚ã®ã®ã†ã¡ã€Subject ヘッダー㌠"o"ã‚’æ ¼ç´ã—ã¦ã„ãªã„ã‚‚ã®ã€ã‹ã¤ content-type ヘッダーãŒ"Mixed" ã§ãªã„メッセージを返ã—ã¾ã™ã€‚ + +最後㮠2例ã«ã¤ã„ã¦ã¯ã€æœ€åˆã®æ¤œç´¢ã‚­ãƒ¼ãƒªã‚¹ãƒˆã®ã‚«ãƒƒã‚³ã‚’å–り除ã„ã¦ã—ã¾ã†ã¨æ¤œç´¢çµæžœãŒç•°ãªã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +- *searchCriteria* 引数ã«ã¯ä»»æ„ã® \[CHARSET] 指定をå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れ㯠"CHARSET" ã¨ã„ã†å˜èªžã®å¾Œã«å®Ÿéš›ã®æ–‡å­—コード \[CHARSET] (US ASCII, ISO-8859 ãªã©) ãŒç¶šãã¾ã™ã€‚ ã“れ㯠*searchCriteria* æ–‡å­—åˆ—ã®æ–‡å­—コードを指定ã—ã¾ã™ã€‚ ãã®ãŸã‚ã€\[CHARSET] 指定を使用ã™ã‚‹å ´åˆã«ã¯ *searchCriteria* 文字列を指定ã•ã‚ŒãŸæ–‡å­—コードã¸ã¨å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ `CONVERT FROM TEXT` ã¾ãŸã¯ `Convert to text` コマンドをå‚ç…§ãã ã•ã„)。 デフォルトã§ã¯ã€searchCriteria å¼•æ•°ã«æ‹¡å¼µã•ã‚ŒãŸæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„ãŸå ´åˆã«ã¯4D ã¯ãれを Quotable Printable ã¸ã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +``` +searchCriteria = CHARSET "ISO-8859" BODY "Help" +``` +... ã“れã¯ã€æ¤œç´¢æ¡ä»¶ã« iso-8859 文字コードを使用ã—ã€å¿…è¦ã«å¿œã˜ã¦ã‚µãƒ¼ãƒãƒ¼ã¯æ¤œç´¢å‰ã«æ¤œç´¢æ¡ä»¶ã‚’ã“ã®æ–‡å­—コードã«å¤‰æ›ã—ãªã‘れã°ãªã‚‰ãªã„ã€ã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ + + +#### 検索ã™ã‚‹å€¤ã®åž‹ã«ã¤ã„㦠+ +検索キーã«ã‚ˆã£ã¦ã¯ã€æ¬¡ã®åž‹ã®æ¤œç´¢å€¤ãŒå¿…è¦ã¨ãªã‚‹å ´åˆãŒã‚りã¾ã™: + +- **æ—¥ä»˜å€¤ã®æ¤œç´¢ã‚­ãƒ¼**: date ã¯æ—¥ä»˜ã‚’指定ã™ã‚‹æ–‡å­—列ã§ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ•ォーマットã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: *date-day+"-"+date-month+"-"+date-year*。ã“ã“ã§ã® date-day ã¯æ—¥ä»˜ã®æ•°å€¤ (最大2æ¡) ã‚’æ„味ã—ã€date-month ã¯æœˆã®åå‰ (Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Dec) ã‚’æ„味ã—ã€date-year ã¯å¹´ (4æ¡) ã‚’æ„味ã—ã¾ã™ã€‚ 例: `searchCriteria = SENTBEFORE 1-Feb-2000` (日付ã¯ç‰¹æ®Šæ–‡å­—ã‚’å«ã¾ãªã„ãŸã‚ã€é€šå¸¸ã¯å¼•用符ã§ããã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“) + +- **æ–‡å­—åˆ—å€¤ã®æ¤œç´¢ã‚­ãƒ¼**: string ã¯ã‚らゆる文字列をå«ã¿ã†ã‚‹ãŸã‚ã€å¼•用符ã§ããらãªã‘れã°ãªã‚Šã¾ã›ã‚“。 文字列ãŒç‰¹æ®Šæ–‡å­— (スペース文字ãªã©) ã‚’ã¾ã£ãŸãå«ã¾ãªã„å ´åˆã«ã¯ã€å¼•ç”¨ç¬¦ã§æ‹¬ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªæ–‡å­—列を引用符ã§ããã‚‹ã“ã¨ã¯ã€æ¸¡ã—ãŸæ–‡å­—åˆ—å€¤ãŒæ­£ç¢ºã«è§£é‡ˆã•れるã“ã¨ã‚’ä¿è¨¼ã—ã¾ã™ã€‚ 例: `searchCriteria = FROM "SMITH"`
        文字列を使用ã™ã‚‹ã™ã¹ã¦ã®æ¤œç´¢ã‚­ãƒ¼ã«å¯¾ã—ã€ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æ–‡å­—åˆ—ã«æ¤œç´¢ã‚­ãƒ¼ãŒå«ã¾ã‚Œã‚‹å ´åˆã«ã¯æ¤œç´¢ã«åˆè‡´ã—ãŸã¨ã¿ãªã•れã¾ã™ã€‚ åˆè‡´ã¯æ–‡å­—ã®å¤§å°ã‚’区別ã—ã¾ã›ã‚“。 + +- **field-name å€¤ã®æ¤œç´¢ã‚­ãƒ¼**: field-name ã¯ãƒ˜ãƒƒãƒ€ãƒ¼ãƒ•ィールドã®åç§°ã§ã™ã€‚ 例: `searchCriteria = HEADER CONTENT-TYPE "MIXED"` + +- **ãƒ•ãƒ©ã‚°å€¤ã®æ¤œç´¢ã‚­ãƒ¼**: flag ã¯ä¸€ã¤ä»¥ä¸Šã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’ (標準ã®ãƒ•ラグをå«ã‚ã¦) å—ã‘入れã¾ã™ã€‚複数指定ã™ã‚‹å ´åˆã«ã¯ã‚¹ãƒšãƒ¼ã‚¹ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ 例: `searchCriteria = KEYWORD \Flagged \Draft` + +- **ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚»ãƒƒãƒˆå€¤ã®æ¤œç´¢ã‚­ãƒ¼**: 複数ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’識別ã—ã¾ã™ã€‚ メッセージシーケンス番å·ã¯ã€1 ã‹ã‚‰å§‹ã¾ã‚Šãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç·æ•°ã¾ã§ã®é€£ç¶šã—ãŸç•ªå·ã§ã™ã€‚ 個別ã®ç•ªå·ã¯ã‚«ãƒ³ãƒžã§åŒºåˆ‡ã‚Šã¾ã™ã€‚コロンã¯ã€ãã®å‰å¾Œã®ç•ªå·ã‚’å«ã‚ãŸé€£ç¶šã—ãŸç•ªå·ã‚’指定ã—ã¾ã™ã€‚ 例:
        `2,4:7,9,12:*` ã¯ã€15通ã‚るメールボックスã®å ´åˆã« `2,4,5,6,7,9,12,13,14,15` を指定ã—ã¾ã™ã€‚ `searchCriteria = 1:5 ANSWERED` ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· 1 ã‹ã‚‰ 5番ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ã†ã¡ã€\Answered フラグãŒè¨­å®šã•れã¦ã„るメッセージを検索ã—ã¾ã™ã€‚ `searchCriteria= 2,4 ANSWERED` ã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ç•ªå· 2番ã¨4番) ã®ã†ã¡ã€\Answered フラグãŒè¨­å®šã•れã¦ã„るメッセージを検索ã—ã¾ã™ã€‚ + + +#### 利用å¯èƒ½ãªæ¤œç´¢ã‚­ãƒ¼ + +**ALL**: メールボックスã®å…¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**ANSWERED**: \Answered フラグãŒè¨­å®šã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**UNANSWERED**: \Answered フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**DELETED**: \Deleted フラグãŒè¨­å®šã•れãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**UNDELETED**: \Deleted フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**DRAFT**: \Draft フラグãŒè¨­å®šã•れã¦ã„るメッセージ +**UNDRAFT**: \Draft フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**FLAGGED**: \Flagged フラグãŒè¨­å®šã•れã¦ã„るメッセージ +**UNFLAGGED**: \Flagged フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**RECENT**: \Recent フラグãŒè¨­å®šã•れã¦ã„るメッセージ +**OLD**: \Recent フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**SEEN**: \Seen フラグãŒè¨­å®šã•れã¦ã„るメッセージ +**UNSEEN**: \Seen フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**NEW**: \Recent フラグãŒè¨­å®šã•れã¦ã„る㌠\Seen フラグãŒè¨­å®šã•れã¦ã„ãªã„メッセージ。 ã“ã‚Œã¯æ©Ÿèƒ½çš„ã«ã¯ “(RECENT UNSEEN)†ã¨åŒã˜ã§ã™ã€‚ +**KEYWORD** : 指定ã•れãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒè¨­å®šã•れã¦ã„るメッセージ +**UNKEYWORD** : 指定ã•れãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãŒè¨­å®šã•れã¦ã„ãªã„メッセージ +**BEFORE** : å†…éƒ¨ã®æ—¥ä»˜ãŒæŒ‡å®šæ—¥ã‚ˆã‚Šå‰ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**ON** : å†…éƒ¨ã®æ—¥ä»˜ãŒæŒ‡å®šæ—¥ã«åˆè‡´ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**SINCE** : å†…éƒ¨ã®æ—¥ä»˜ãŒæŒ‡å®šæ—¥ã‚ˆã‚Šå¾Œã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**SENTBEFORE** : æ—¥ä»˜ãƒ˜ãƒƒãƒ€ãƒ¼ãŒæŒ‡å®šæ—¥ã‚ˆã‚Šå‰ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**SENTON** : æ—¥ä»˜ãƒ˜ãƒƒãƒ€ãƒ¼ãŒæŒ‡å®šæ—¥ã«åˆè‡´ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**SENTSINCE** : æ—¥ä»˜ãƒ˜ãƒƒãƒ€ãƒ¼ãŒæŒ‡å®šæ—¥ä»¥é™ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**TO** : TO ãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**FROM** : FROM ãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**CC** : CC ãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**BCC** : BCC ãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**SUBJECT** : ä»¶åãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**BODY** : ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**TEXT** : ヘッダーã¾ãŸã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**HEADER** : 指定フィールドåã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’æŒã¡ã€ãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰å†…ã«æŒ‡å®šæ–‡å­—列ãŒå«ã¾ã‚Œã¦ã„るメッセージ +**UID** : 指定ã•れãŸå›ºæœ‰è­˜åˆ¥å­ã«å¯¾å¿œã™ã‚‹å›ºæœ‰è­˜åˆ¥å­ã‚’æŒã¤ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**LARGER** : 指定ãƒã‚¤ãƒˆæ•°ä»¥ä¸Šã®ã‚µã‚¤ã‚ºã‚’æŒã¤ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**SMALLER** : 指定ãƒã‚¤ãƒˆæ•°ä»¥ä¸‹ã®ã‚µã‚¤ã‚ºã‚’æŒã¤ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ +**NOT** : 指定検索キーã«åˆè‡´ã—ãªã„メッセージ +**OR** : ã„ãšã‚Œã‹ã®æ¤œç´¢ã‚­ãƒ¼ã«åˆè‡´ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ + + + + +## .selectBox() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R4 | 追加 | +
        + +**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object +| 引数 | タイプ | | 説明 | +| ----- | ------ |:--:| -------------- | +| name | テキスト | -> | メールボックスã®åç§° | +| state | æ•´æ•° | -> | メールボックスã®ã‚¢ã‚¯ã‚»ã‚¹çŠ¶æ…‹ | +| 戻り値 | オブジェクト | <- | boxInfo オブジェクト | + + +#### 説明 + +The `.selectBox()` function selects the `name` mailbox as the current mailbox. ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> カレントメールボックスを変更ã›ãšã«ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‹ã‚‰æƒ…報をå–å¾—ã™ã‚‹ã«ã¯ã€[`.getBoxInfo()`](#getboxinfo) を使用ã—ã¾ã™ã€‚ + +`name` ã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åå‰ã‚’渡ã—ã¾ã™ã€‚ ã“ã®åç§°ã¯æ˜Žç¢ºãªå·¦ã‹ã‚‰å³ã¸ã®éšŽå±¤ã‚’表ã—ã€ç‰¹å®šã®åŒºåˆ‡ã‚Šæ–‡å­—ã§ãƒ¬ãƒ™ãƒ«ã‚’区分ã‘ã—ã¾ã™ã€‚ ã“ã®åŒºåˆ‡ã‚Šæ–‡å­—㯠[`.getDelimiter()`](#getdelimiter) 関数ã§èª¿ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»»æ„ã® `state` 引数を渡ã™ã¨ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚¿ã‚¤ãƒ—を定義ã§ãã¾ã™ã€‚ å–りã†ã‚‹å€¤ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +| 定数 | 値 | 説明 | +| --------------------- | - | -------------------------------------------------------------------------- | +| IMAP read only state | 1 | é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¯èª­ã¿å–り専用権é™ã§ã‚¢ã‚¯ã‚»ã‚¹ã•れã¾ã™ã€‚ æ–°ã—ã„メッセージを表㙠"æ–°ç€" フラグã¯ãã®ã¾ã¾å¤‰åŒ–ã—ã¾ã›ã‚“。 | +| IMAP read write state | 0 | é¸æŠžã•れãŸãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã¯èª­ã¿æ›¸ãå¯èƒ½æ¨©é™ã§ã‚¢ã‚¯ã‚»ã‚¹ã•れã¾ã™ã€‚ メッセージ㯠"既読" ã¨åˆ¤æ–­ã•れã€"æ–°ç€" フラグã¯å¤±ã‚れã¾ã™ã€‚ (デフォルト値) | +> * name 引数ãŒå­˜åœ¨ã—ãªã„メールボックスを指定ã—ãŸå ´åˆã€é–¢æ•°ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã— **Null** ã‚’è¿”ã—ã¾ã™ã€‚ +> * é–‹ã„ã¦ã„る接続ãŒãªã„å ´åˆã€`.selectBox()` ã¯æŽ¥ç¶šã‚’é–‹ãã¾ã™ã€‚ +> * æŽ¥ç¶šãŒæŒ‡å®šã•ã‚ŒãŸæ™‚é–“ (`IMAP New transporter` å‚ç…§) 以上ã«ä½¿ç”¨ã•れãªã‹ã£ãŸå ´åˆã«ã¯ã€[`.checkConnection()`](#checkconnection) 関数ãŒè‡ªå‹•çš„ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +è¿”ã•れる `boxInfo` オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------ | ----------------------- | +| name | テキスト | メールボックスã®åç§° | +| mailCount | number | メールボックス内ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•° | +| mailRecent | number | "recent" フラグãŒã¤ã„ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•° | + + +#### 例題 + + +```4d + var $server; $boxinfo : Object + $server:=New object + $server.host:="imap.gmail.com" // å¿…é ˆ + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + $boxInfo:=$transporter.selectBox("INBOX") +``` + + + + +## .subscribe() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.subscribe**( *name* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| ----------------- | +| name | テキスト | -> | メールボックスã®åç§° | +| 戻り値 | オブジェクト | <- | subscribe処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.subscribe()` function allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes. 利用å¯èƒ½ãªãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ãŒå¤§é‡ã«ã‚ã‚‹å ´åˆã€ã™ã¹ã¦ã‚’å–å¾—ã™ã‚‹ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã€ç¢ºèªã—ãŸã„メールボックスã ã‘を購読ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +`name` ã«ã¯ã€è³¼èª­ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + +#### 例題 + +"Bills" 階層下㮠"Atlas Corp†メールボックスを購読ã—ã¾ã™: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.subscribe($name) + +If ($status.success) + ALERT("メールボックスã®è³¼èª­ã«æˆåŠŸã—ã¾ã—ãŸã€‚") + Else + ALERT("エラー: "+$status.statusText) + End if +End if +``` + + + +## .unsubscribe() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.unsubscribe**( *name* : Text ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| ------------------- | +| name | テキスト | -> | メールボックスã®åç§° | +| 戻り値 | オブジェクト | <- | unsubscribe処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.unsubscribe()` function removes a mailbox from a set of subscribed mailboxes. ã“れã«ã‚ˆã‚Šã€ç¢ºèªã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®æ•°ã‚’減らã›ã¾ã™ã€‚ + +`name` ã«ã¯ã€è³¼èª­ã‚’解除ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åå‰ã‚’渡ã—ã¾ã™ã€‚ + +**è¿”ã•れるオブジェクト** + +ã“ã®é–¢æ•°ã¯ã€IMAP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ----------------------- | ------ | -------------------------------------------------- | +| success | | ブール | 処ç†ãŒæ­£å¸¸ã«çµ‚ã‚ã£ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| statusText | | テキスト | IMAPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | コレクション | 4Dエラースタック (IMAPサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errcode | 数値 | 4Dエラーコード | +| | \[].message | テキスト | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | テキスト | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + +#### 例題 + +"Bills" 階層下㮠"Atlas Corp†メールボックスã®è³¼èª­ã‚’解除ã—ã¾ã™: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.unsubscribe($name) + +If ($status.success) + ALERT("メールボックスã®è³¼èª­ã‚’解除ã—ã¾ã—ãŸã€‚") + Else + ALERT("エラー: "+$status.statusText) + End if +End if +``` + + + + +## .user + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.user** : Text + +#### 説明 +The `.user` property contains the user name used for authentication on the mail server. + + + + + + + diff --git a/website/translated_docs/ja/API/MailAttachmentClass.md b/website/translated_docs/ja/API/MailAttachmentClass.md new file mode 100644 index 00000000000000..6e93f5f300ed7a --- /dev/null +++ b/website/translated_docs/ja/API/MailAttachmentClass.md @@ -0,0 +1,271 @@ +--- +id: MailAttachmentClass +title: MailAttachment +--- + +Attachment オブジェクトã«ã‚ˆã£ã¦ã€[`Email`](EmailObjectClass.md) オブジェクト内ã®ãƒ•ァイルをå‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ MailAttachment オブジェクト㯠[`MAIL New attachment`](#mail-new-attachment) コマンドã«ã‚ˆã£ã¦ä½œæˆã•れã¾ã™ã€‚ + + +### Attachment オブジェクト + +Attachment オブジェクトã«ã¯ã€æ¬¡ã®èª­ã¿å–り専用プロパティやã€é–¢æ•°ã‚’æä¾›ã—ã¾ã™: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cid** : Text](#cid)

             the ID of the attachment | +| [**.disposition** : Text](#disposition)

            the value of the `Content-Disposition` header | +| [**.getContent()** : 4D.Blob](#getcontent)

            returns the contents of the attachment object in a `4D.Blob` object | +| [**.name** : Text](#name)

            the name and extension of the attachment | +| [**.path** : Text](#path)

            the POSIX path of the attachment file, if it exists | +| [**.platformPath** : Text](#platformpath)

            the path of the attachment file expressed with the current platform syntax | +| [**.type** : Text](#type)

            the `content-type` of the attachment file | + + +## MAIL New attachment + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ---------------------------------- | +| v19 R2 | 4D.File, 4D.ZipFile, 4D.Blob ã®å—ã‘入れ | +
        + +**MAIL New attachment**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **MAIL New attachment**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **MAIL New attachment**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **MAIL New attachment**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| 引数 | タイプ | | 説明 | +| ----------- | ----------------- |:--:| ------------------------------------------------------ | +| file | 4D.File | -> | 添付ファイル | +| zipFile | 4D.ZipFile | -> | 添付 Zipファイル | +| blob | 4D.Blob | -> | 添付を格ç´ã—㟠BLOB | +| path | Text | -> | 添付ファイルã®ãƒ‘ス | +| name | Text | -> | ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒæ·»ä»˜ã‚’指定ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹åå‰ + æ‹¡å¼µå­ | +| cid | Text | -> | 添付㮠ID (HTMLメッセージã®ã¿)ã€ã‚ã‚‹ã„㯠cid ãŒä¸è¦ãªå ´åˆã¯ "" (ç©ºã®æ–‡å­—列) | +| type | Text | -> | content-type ヘッダーã®å€¤ | +| disposition | Text | -> | content-disposition ヘッダーã®å€¤: "inline" ã‚ã‚‹ã„㯠"attachment" | +| 戻り値 | 4D.MailAttachment | <- | Attachment オブジェクト | + + +#### 説明 + +The `MAIL New attachment` command allows you to create an attachment object that you can add to an [Email object](EmailObjectClass.md#email-object). + +添付を定義ã™ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ‘ラメーターãŒä½¿ãˆã¾ã™: + +- *file*: 添付ファイルを格ç´ã™ã‚‹ `4D.File` オブジェクトを渡ã—ã¾ã™ã€‚ +- *zipfile*: 添付ファイルを格ç´ã™ã‚‹ `4D.ZipFile` オブジェクトを渡ã—ã¾ã™ã€‚ +- *blob*: 添付ãã®ã‚‚ã®ã‚’ `4D.Blob` ã«æ ¼ç´ã—ã¦æ¸¡ã—ã¾ã™ã€‚ +- *path*: システムシンタックスã§è¡¨ç¾ã•ã‚ŒãŸæ·»ä»˜ãƒ•ァイルã®ãƒ‘スを **テキスト** å€¤ã§æ¸¡ã—ã¾ã™ã€‚ 完全ãªãƒ‘スåã€ã¾ãŸã¯å˜ç´”ãªãƒ•ァイルåを渡ã™ã“ã¨ãŒã§ãã¾ã™ (ファイルåã®ã¿ã®å ´åˆã€4D ã¯ãƒ—ロジェクトファイルã¨åŒã˜ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªå†…を検索ã—ã¾ã™)。 + +ä»»æ„ã® *name* 引数ã¨ã—ã¦ã€æ·»ä»˜ã‚’指定ã™ã‚‹ãŸã‚ã«ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒä½¿ç”¨ã™ã‚‹åå‰ã¨æ‹¡å¼µå­ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ *name* ãŒçœç•¥ã•れãŸå ´åˆ: + +* ファイルパスを渡ã—ã¦ã„れã°ã€ãã®ãƒ•ァイルåã¨æ‹¡å¼µå­ãŒä½¿ç”¨ã•れã¾ã™ã€‚ +* BLOB を渡ã—ã¦ã„れã°ã€æ‹¡å¼µå­ãŒãªã„ランダムãªåå‰ãŒè‡ªå‹•çš„ã«ç”Ÿæˆã•れã¾ã™ã€‚ + +ä»»æ„ã® *cid* 引数を使用ã™ã‚‹ã¨ã€æ·»ä»˜ãƒ•ァイルã®å†…部ID を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã® ID 㯠`Content-Id` ヘッダーã®å€¤ã§ã€HTMLメッセージã«ãŠã„ã¦ã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ cid を使ã„ã€`\` ã®ã‚ˆã†ãª HTMLã‚¿ã‚°ã«ã‚ˆã£ã¦ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ã§å®šç¾©ã•れãŸå‚ç…§ã¨æ·»ä»˜ãƒ•ァイルãŒç´ã¥ã‘られã¾ã™ã€‚ ã“れã¯ã¤ã¾ã‚Šã€æ·»ä»˜ãƒ•ァイルã®ä¸­èº« (例: ピクãƒãƒ£ãƒ¼) ãŒãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆä¸Šã§ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡å†…ã«è¡¨ç¤ºã•れるã¹ãã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¦ã„ã¾ã™ã€‚ 最終的ãªè¡¨ç¤ºã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦è‹¥å¹²ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ *cid* を使用ã—ãŸããªã„å ´åˆã€ç©ºã®æ–‡å­—列を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ + +ä»»æ„ã® *type* 引数を渡ã™ã¨ã€æ·»ä»˜ãƒ•ァイル㮠`content-type` を明示的ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€MIMEタイプを定義ã™ã‚‹æ–‡å­—列 ("video/mpeg"ãªã©) を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã® content-type ã®å€¤ã¯æ‹¡å¼µå­ã¨ã¯é–¢ä¿‚ãªã添付ファイルã«å¯¾ã—ã¦è¨­å®šã•れã¾ã™ã€‚ MIMEタイプã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[Wikipedia 上ã®MIME ã«é–¢ã™ã‚‹ãƒšãƒ¼ã‚¸](https://ja.wikipedia.org/wiki/Multipurpose_Internet_Mail_Extensions) ã‚’å‚ç…§ãã ã•ã„。 + +ã“ã®å¼•æ•°ãŒçœç•¥ã•れãŸå ´åˆã€ã‚ã‚‹ã„ã¯ã“ã®å¼•æ•°ã«ç©ºã®æ–‡å­—åˆ—ãŒæ¸¡ã•れãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§ã€æ·»ä»˜ãƒ•ァイル㮠`content-type` ã¯æ‹¡å¼µå­ã«åŸºã¥ã„ã¦è¨­å®šã•れã¾ã™ã€‚ 主㪠MIMEタイプã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™: + +| æ‹¡å¼µå­ | Content-Type | +| --------- | ----------------------------- | +| jpg, jpeg | image/jpeg | +| png | image/png | +| gif | image/gif | +| pdf | application/pdf | +| doc | application/msword | +| xls | application/vnd.ms-excel | +| ppt | application/vnd.ms-powerpoint | +| zip | application/zip | +| gz | application/gzip | +| json | application/json | +| js | application/javascript | +| ps | application/postscript | +| xml | application/xml | +| htm, html | text/html | +| mp3 | audio/mpeg | +| *ãã®ä»–* | application/octet-stream | + +ä»»æ„ã® *disposition* 引数を渡ã—ã¦ã€æ·»ä»˜ãƒ•ァイル㮠`content-disposition` ヘッダーを指定ã§ãã¾ã™ã€‚ "Mail" 定数テーマ内ã®ã€ä»¥ä¸‹ã®å®šæ•°ã®ã„ãšã‚Œã‹ 1ã¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™: + +| 定数 | 値 | 説明 | +| --------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| mail disposition attachment | "attachment" | Content-disposition ヘッダーã®å€¤ã‚’ "attachment" ã«è¨­å®šã—ã¾ã™ã€‚ã“ã‚Œã¯æ·»ä»˜ãƒ•ァイルã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å†…ã§ãƒªãƒ³ã‚¯ã¨ã—ã¦æä¾›ã•れる必è¦ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ | +| mail disposition inline | "inline" | Content-disposition ヘッダーã®å€¤ã‚’ "inline" ã«è¨­å®šã—ã¾ã™ã€‚ã“ã‚Œã¯æ·»ä»˜ãƒ•ァイルã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡å†…ã®ã€"cid" ã®ä½ç½®ã«ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•れる必è¦ãŒã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ レンダリングã®çµæžœã¯ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ | + +*disposition* 引数ãŒçœç•¥ã•れãŸå ´åˆã¯ãƒ‡ãƒ•ォルトã§: + +* *cid* 引数ãŒä½¿ã‚れã¦ã„ãŸå ´åˆã€`Content-disposition` ヘッダー㯠"inline" ã«è¨­å®šã•れã¾ã™ã€‚ +* *cid* å¼•æ•°ãŒæ¸¡ã•れã¦ã„ãªã„ã€ã‚ã‚‹ã„ã¯ç©ºã®æ–‡å­—åˆ—ãŒæ¸¡ã•れã¦ã„ãŸå ´åˆã€`Content-disposition` ヘッダー㯠"attachment" ã«è¨­å®šã•れã¾ã™ã€‚ + +#### 例題 1 + +ユーザーãŒé¸æŠžã—ãŸãƒ•ァイルを添付ã—ã€HTML 本文ã«ç”»åƒã‚’埋ã‚込んã ãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ã¾ã™: + +```4d +$doc:=Select document("";"*";"添付ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ãŸãã ã•ã„";0) +If (OK=1) // ã‚‚ã—ドキュメントãŒé¸æŠžã•れã¦ã„れ㰠+ +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="test_user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="test_user@mail.com" +$email.to:="test_user@mail.com" +$email.subject:="添付ã®ä»˜ã„ãŸãƒ†ã‚¹ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã§ã™" + +// ファイルをダウンロードã™ã‚‹ãƒªãƒ³ã‚¯ã‚’追加ã—ã¾ã™ +$email.attachments:=New collection(MAIL New attachment(Document)) +// インラインピクãƒãƒ£ãƒ¼ã‚’挿入ã—ã¾ã™ (cid を使用) +$email.attachments[1]:=MAIL New attachment("c:\\Pictures\\4D.jpg";"";"4D") + +$email.htmlBody:=""+\ +"Hello World!"+\ +""+\ +""+\ +""+\ +"" + +$transporter.send($email) // メールをé€ä¿¡ã—ã¾ã™ + +End if +``` + +#### 例題 2 + +4D Write Pro エリアを添付ã—ãŸãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ã¾ã™: + +```4d +C_BLOB($blob) +WP EXPORT VARIABLE(WPArea;$blob;wk docx) + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="user@mail.com" +$email.to:="customer@mail.com" +$email.subject:="æ–°è¦å¹´æ¬¡ãƒ¬ãƒãƒ¼ãƒˆ" +$email.textBody:="添付ã®ã¨ãŠã‚Šã€æ–°ã—ã„年次レãƒãƒ¼ãƒˆã‚’ã”連絡ã—ã¾ã™ã€‚" +$email.attachments:=New collection(MAIL New attachment($blob;"Annual report.docx")) + +$transporter.send($email) +``` + + +## 4D.MailAttachment.new() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ---------------------------------- | +| v19 R2 | 4D.File, 4D.ZipFile, 4D.Blob ã®å—ã‘入れ | +
        + +**4D.MailAttachment.new**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **4D.MailAttachment.new**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **4D.MailAttachment.new**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
        **4D.MailAttachment.new**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| 引数 | タイプ | | 説明 | +| ----------- | ----------------- |:--:| ------------------------------------------------------ | +| file | 4D.File | -> | 添付ファイル | +| zipFile | 4D.ZipFile | -> | 添付 Zipファイル | +| blob | 4D.Blob | -> | 添付を格ç´ã—㟠BLOB | +| path | Text | -> | 添付ファイルã®ãƒ‘ス | +| name | Text | -> | ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒæ·»ä»˜ã‚’指定ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹åå‰ + æ‹¡å¼µå­ | +| cid | Text | -> | 添付㮠ID (HTMLメッセージã®ã¿)ã€ã‚ã‚‹ã„㯠cid ãŒä¸è¦ãªå ´åˆã¯ "" (ç©ºã®æ–‡å­—列) | +| type | Text | -> | content-type ヘッダーã®å€¤ | +| disposition | Text | -> | content-disposition ヘッダーã®å€¤: "inline" ã‚ã‚‹ã„㯠"attachment" | +| 戻り値 | 4D.MailAttachment | <- | Attachment オブジェクト | + + +#### 説明 + +The `4D.MailAttachment.new()` function creates and returns a new object of the `4D.MailAttachment` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`MAIL New attachment`](#mail-new-attachment) コマンドã¨åŒä¸€ã§ã™ã€‚ + + +## .cid + +**.cid** : Text + +#### 説明 + +The `.cid` property contains the ID of the attachment. ã“ã®ãƒ—ロパティ㯠HTMLメッセージã§ã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ ã“ã®ãƒ—ロパティãŒãªã„å ´åˆã€ãƒ•ァイルã¯å˜ãªã‚‹æ·»ä»˜ (リンク) ã¨ã—ã¦ç®¡ç†ã•れã¾ã™ã€‚ + + +## .disposition + +**.disposition** : Text + +#### 説明 + +The `.disposition` property contains the value of the `Content-Disposition` header. 二ã¤ã®å€¤ãŒåˆ©ç”¨å¯èƒ½ã§ã™: + +* "inline": 添付ファイルã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚³ãƒ³ãƒ†ãƒ³ãƒ„内ã«ã€"cid"ã®å ´æ‰€ã«ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•れã¾ã™ã€‚ レンダリングã®çµæžœã¯ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ +* "attachment": 添付ファイルã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸å†…ã§ãƒªãƒ³ã‚¯ã¨ã—ã¦æä¾›ã•れã¾ã™ã€‚ + + +## .getContent() + +**.getContent()** : 4D.Blob +| 引数 | タイプ | | 説明 | +| --- | ------- |:--:| ----- | +| 戻り値 | 4D.Blob | <- | 添付ã®ä¸­èº« | + + +#### 説明 + +The `.getContent()` function returns the contents of the attachment object in a `4D.Blob` object. [`MAIL Convert from MIME`](#mail-convert-from-mime) コマンドã«ã‚ˆã£ã¦å–å¾—ã—ãŸæ·»ä»˜ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## .name + +**.name** : Text + +#### 説明 + +The `.name` property contains the name and extension of the attachment. [`MAIL New attachment`](#mail-new-attachment) コマンドã§åˆ¥ã®å称を指定ã—ãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルトã¯ã€ãƒ•ァイルã®åç§°ã§ã™ã€‚ + +## .path + +**.path** : Text + +#### 説明 + +The `.path` property contains the POSIX path of the attachment file, if it exists. + + +## .platformPath + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.platformPath** : Text + +#### 説明 + +The `.platformPath` property returns the path of the attachment file expressed with the current platform syntax. + + +## .type + +**.type** : Text + +#### 説明 + +The `.type` property contains the `content-type` of the attachment file. [`MAIL New attachment`](#mail-new-attachment) コマンドã«ã¦ã€ã“ã®ã‚¿ã‚¤ãƒ—ãŒæ˜Žç¤ºçš„ã«æ¸¡ã•れã¦ã„ãªã„å ´åˆã€`content-type` ã¯ãƒ•ã‚¡ã‚¤ãƒ«ã®æ‹¡å¼µå­ã«åŸºã¥ãã¾ã™ã€‚ + + + + diff --git a/website/translated_docs/ja/API/POP3TransporterClass.md b/website/translated_docs/ja/API/POP3TransporterClass.md new file mode 100644 index 00000000000000..02109be36df296 --- /dev/null +++ b/website/translated_docs/ja/API/POP3TransporterClass.md @@ -0,0 +1,694 @@ +--- +id: POP3TransporterClass +title: POP3Transporter +--- + +`POP3Transporter` クラスを使ã£ã¦ã€POP3 メールサーãƒãƒ¼ã‹ã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +### POP3 Transporter オブジェクト + +POP3 Transporter オブジェクト㯠[POP3 New transporter](#pop3-new-transporter) コマンドã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ ã“れらã¯ã€æ¬¡ã®ãƒ—ロパティや関数をæŒã¡ã¾ã™: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

             checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.delete**( *msgNumber* : Integer )](#delete)

            flags the *msgNumber* email for deletion from the POP3 server | +| [**.getBoxInfo()** : Object](#getboxinfo)

            returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMail**( *msgNumber* : Integer ) : Object](#getmail)

            returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfo**( *msgNumber* : Integer ) : Object](#getmailinfo)

            returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfoList()** : Collection](#getmailinfolist)

            returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob](#getmimeasblob)

            returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object) | +| [**.host** : Text](#host)

            the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

             the port number used for mail transactions | +| [**.undeleteAll()**](#undeleteall)

            removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object) | +| [**.user** : Text](#user)

             the user name used for authentication on the mail server | + + + +## POP3 New transporter + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**POP3 New transporter**( *server* : Object ) : 4D.POP3Transporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| --------------------------------------------------- | +| server | object | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.POP3Transporter | <- | [POP3 transporter オブジェクト](#pop3-transporter-オブジェクト) | + + +#### 説明 + +The `POP3 New transporter` command configures a new POP3 connectionaccording to the *server* parameter and returns a new *[POP3 transporter](#pop3-transporter-object)* object. è¿”ã•れ㟠transporter オブジェクトã¯ã€é€šå¸¸ãƒ¡ãƒ¼ãƒ«ã®å—ä¿¡ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +*server* 引数ã¨ã—ã¦ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを渡ã—ã¾ã™: + + +| *server* | デフォルト値 (çœç•¥æ™‚) | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
        .**accessTokenOAuth2**: Object

        OAuth2 èªè¨¼ã®è³‡æ ¼æƒ…報を表ã™ãƒ†ã‚­ã‚¹ãƒˆæ–‡å­—列ã¾ãŸã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚ªãƒ–ジェクト。 `authenticationMode` ㌠OAUTH2 ã®å ´åˆã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ `accessTokenOAuth2` ãŒä½¿ç”¨ã•れã¦ã„る㌠`authenticationMode` ãŒçœç•¥ã•れã¦ã„ãŸå ´åˆã€OAuth2 プロトコルãŒä½¿ç”¨ã•れã¾ã™ (サーãƒãƒ¼ã§è¨±å¯ã•れã¦ã„れã°)。 *[POP3 transporter](#pop3-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã£ã¨ã‚‚セキュアãªèªè¨¼ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

            the name or the IP address of the host server | *å¿…é ˆ* | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | ãªã— | +| **.password** : Text

        サーãƒãƒ¼ã¨ã®èªè¨¼ã®ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワード *[POP3 transporter](#pop3-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.port** : Integer](#port)

             the port number used for mail transactions | 995 | +| [**.user** : Text](#user)

             the user name used for authentication on the mail server | ãªã— | + + +#### 戻り値 + +ã“ã®é–¢æ•°ã¯ã€[**POP3 transporter オブジェクト**](#pop3-transporter-オブジェクト) ã‚’è¿”ã—ã¾ã™ã€‚ è¿”ã•れるプロパティã¯ã™ã¹ã¦ **読ã¿å–り専用** ã§ã™ã€‚ +> POP3接続ã¯ã€transporter ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•ã‚ŒãŸæ™‚点ã§è‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ + +#### 例題 + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" // å¿…é ˆ + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + $server.logFile:="LogTest.txt" // Logsフォルダーã«ä¿å­˜ã™ã‚‹ãƒ­ã‚° + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + $status:=$transporter.checkConnection() + If(Not($status.success)) + ALERT("メールå—信中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: "+$status.statusText) + End if +``` + + +## 4D.POP3Transporter.new() + + +**4D.POP3Transporter.new**( *server* : Object ) : 4D.POP3Transporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| --------------------------------------------------- | +| server | オブジェクト | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.POP3Transporter | <- | [POP3 transporter オブジェクト](#pop3-transporter-オブジェクト) | + +#### 説明 + +The `4D.POP3Transporter.new()` function creates and returns a new object of the `4D.POP3Transporter` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`POP3 New transporter`](#pop3-new-transporter) コマンドã¨åŒä¸€ã§ã™ã€‚ + +## .acceptUnsecureConnection + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.acceptUnsecureConnection** : Boolean + +#### 説明 + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +æš—å·åŒ–ã•れã¦ã„ãªã„接続ãŒè¨±å¯ã•れã¦ã„ãªã„å ´åˆã«ã¯ **false** ãŒæ ¼ç´ã•れã¦ãŠã‚Šã€ãã®å ´åˆã«æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šãŒä¸å¯èƒ½ãªå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +使用å¯èƒ½ãªã‚»ã‚­ãƒ¥ã‚¢ãªãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- SMTP + - 465: SMTPS + - 587 ã¾ãŸã¯ 25: STARTTLS アップグレードãŒã•れ㟠SMTP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- IMAP + - 143: IMAP éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 993: STARTTLS アップグレードãŒã•れ㟠IMAP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- POP3 + - 110: POP3 éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + + +## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + + +**.authenticationMode** : Text + +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------------- | +| APOP | `POP3 authentication APOP` | APOP プロトコルを使用ã—ãŸèªè¨¼ (POP3 ã®ã¿) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `POP3 authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `POP3 authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `POP3 authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + + + + +## .checkConnection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.checkConnection()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| -------------------------- | +| 戻り値 | オブジェクト | <- | transporter オブジェクト接続ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. ã“ã®é–¢æ•°ã‚’使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æä¾›ã•れãŸå€¤ãŒæœ‰åйã‹ã©ã†ã‹ã‚’検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +ã“ã®é–¢æ•°ã¯ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã€ãƒ¡ãƒ¼ãƒ«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ------------------------ | ---------- | ------------------------------------------------- | +| success | | boolean | ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| status | | number | (SMTPã®ã¿) メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚³ãƒ¼ãƒ‰ (メール処ç†ã«é–¢ä¿‚ãªã„å•題ã®å ´åˆã«ã¯ 0) | +| statusText | | text | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | collection | 4Dエラースタック (メールサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[ ].errCode | number | 4Dエラーコード | +| | \[ ].message | text | 4Dエラーã®è©³ç´° | +| | \[ ].componentSignature | text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + + +#### 例題 + +```4d + var $pw : Text + var $options : Object + $options:=New object + + $pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + if(OK=1) + $options.host:="pop3.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=POP3 New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success) + ALERT("POP3接続ãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã—ã¾ã—ãŸã€‚") + Else + ALERT("Error: "+$status.statusText) + End if + End if +``` + + +## .connectionTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.connectionTimeOut** : Integer + + +#### 説明 + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる `server` オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルト㯠30 ã§ã™ã€‚ + + + + + + +## .delete() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.delete**( *msgNumber* : Integer ) +| 引数 | タイプ | | 説明 | +| --------- | --- |:--:| ------------ | +| msgNumber | æ•´æ•° | -> | 削除ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå· | + + +##### 説明 + +The `.delete( )` function flags the *msgNumber* email for deletion from the POP3 server. + +*msgNumber* ã«ã¯ã€å‰Šé™¤ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã®ç•ªå·ã‚’渡ã—ã¾ã™ã€‚ ã“ã®ç•ªå·ã¯ã€[`.getMailInfoList()`](#getmailinfolist) 関数ã«ã‚ˆã£ã¦ number プロパティã«è¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã‚’実行ã—ã¦ã‚‚ã€ãƒ¡ãƒ¼ãƒ«ãŒå®Ÿéš›ã«å‰Šé™¤ã•れる訳ã§ã¯ã‚りã¾ã›ã‚“。 フラグãŒç«‹ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¼ãƒ«ã¯ã€(`POP3 New transporter` ã§ä½œæˆã•れãŸ) `POP3_transporter` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•ã‚ŒãŸæ™‚ã«åˆã‚㦠POP3サーãƒãƒ¼ã‹ã‚‰å‰Šé™¤ã•れã¾ã™ã€‚ ç«‹ã¦ãŸãƒ•ラグã¯ã€`.undeleteAll()` 関数を使用ã—ã¦å‰Šé™¤ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +> カレントセッションãŒäºˆæœŸã›ãšçµ‚了ã—ã¦æŽ¥ç¶šãŒé–‰ã˜ã‚‰ã‚ŒãŸå ´åˆ (例: タイムアウトã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å•題等) ã«ã¯ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒç”Ÿæˆã•れã€å‰Šé™¤ãƒ•ラグãŒç«‹ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ¼ãƒ«ã¯å‰Šé™¤ã•れãšã« POP3サーãƒãƒ¼ä¸Šã«æ®‹ã‚Šã¾ã™ã€‚ + +##### 例題 + +```4d + $mailInfoList:=$POP3_transporter.getMailInfoList() + For each($mailInfo;$mailInfoList) + // "セッション終了時ã«å‰Šé™¤" ã¨ãƒ¡ãƒ¼ãƒ«ã®ãƒ•ラグを立ã¦ã¾ã™ + $POP3_transporter.delete($mailInfo.number) + End for each + // セッションを強制的ã«çµ‚了ã—ã€å‰Šé™¤ãƒ•ラグを立ã¦ãŸãƒ¡ãƒ¼ãƒ«ã‚’削除ã—ã¾ã™ + CONFIRM("é¸æŠžã•れã¦ã„るメッセージã¯å‰Šé™¤ã•れã¾ã™ã€‚";"削除ã™ã‚‹";"å…ƒã«æˆ»ã™") + If(OK=1) // 削除をé¸ã‚“ã å ´åˆ + $POP3_transporter:=Null + Else + $POP3_transporter.undeleteAll() // 削除フラグを消去ã—ã¾ã™ + End if +``` + + + + +## .getBoxInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.getBoxInfo()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| -------------- | +| 戻り値 | オブジェクト | <- | boxInfo オブジェクト | + + +##### 説明 + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +è¿”ã•れる `boxInfo` オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| --------- | ------ | ----------------- | +| mailCount | Number | メールボックス内ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•° | +| size | Number | メッセージã®ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | + + + +##### 例題 + +```4d + var $server; $boxinfo : Object + + $server:=New object + $server.host:="pop.gmail.com" // å¿…é ˆ + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + // メールボックス情報 + $boxInfo:=$transporter.getBoxInfo() + ALERT("メールボックスã«ã¯ "+String($boxInfo.mailCount)+" ä»¶ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚りã¾ã™ã€‚") +``` + + + + +## .getMail() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.getMail**( *msgNumber* : Integer ) : Object +| 引数 | タイプ | | 説明 | +| --------- | ------ |:--:| ------------------------------------------------ | +| msgNumber | æ•´æ•° | -> | リスト中ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå· | +| 戻り値 | オブジェクト | <- | [Email オブジェクト](EmailObjectClass.md#email-オブジェクト) | + + +##### 説明 + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). ã“ã®é–¢ã™ã‚’使用ã™ã‚‹ã¨ã€ãƒ¡ãƒ¼ãƒ«ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„をローカルã§ç®¡ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +*msgNumber* ã«ã¯ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã‚’渡ã—ã¾ã™ã€‚ ã“ã®ç•ªå·ã¯ã€[`.getMailInfoList()`](#getmailinfolist) 関数ã«ã‚ˆã£ã¦ number プロパティã«è¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€ä»¥ä¸‹ã®å ´åˆã«ã¯ Null ã‚’è¿”ã—ã¾ã™: + +* *msgNumber* ã§æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå­˜åœ¨ã—ãªã„å ´åˆ +* 指定ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ `.delete( )` ã«ã‚ˆã£ã¦å‰Šé™¤ãƒ•ラグãŒç«‹ã¦ã‚‰ã‚Œã¦ã„ãŸå ´åˆ + + +**è¿”ã•れるオブジェクト** + +`.getMail()` 㯠[`Email` オブジェクト](EmailObjectClass.md#email-object) ã‚’è¿”ã—ã¾ã™ã€‚ + + +##### 例題 + +メールボックスã«ã‚る最åˆã®ãƒ¡ãƒ¼ãƒ«ã®é€ä¿¡è€…を調ã¹ã¾ã™: + +```4d + var $server; $transporter : Object + var $mailInfo : Collection + var $sender : Variant + + $server:=New object + $server.host:="pop.gmail.com" // å¿…é ˆ + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $sender:=$transporter.getMail($mailInfo[0].number).from +``` + + + + +## .getMailInfo() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.getMailInfo**( *msgNumber* : Integer ) : Object +| 引数 | タイプ | | 説明 | +| --------- | ------ |:--:| --------------- | +| msgNumber | æ•´æ•° | -> | リスト中ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå· | +| 戻り値 | オブジェクト | <- | MailInfo オブジェクト | + + +##### 説明 + +The `.getMailInfo()` function returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ãƒ¡ãƒ¼ãƒ«ã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +*msgNumber* ã«ã¯ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã‚’渡ã—ã¾ã™ã€‚ ã“ã®ç•ªå·ã¯ã€[`.getMailInfoList()`](#getmailinfo) 関数ã«ã‚ˆã£ã¦ number プロパティã«è¿”ã•れã¾ã™ã€‚ + +è¿”ã•れる `mailInfo` オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ----- | ---- | ----------------- | +| size | 数値 | メッセージã®ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| id | テキスト | メッセージã®å›ºæœ‰ID | + +ã“ã®é–¢æ•°ã¯ã€ä»¥ä¸‹ã®å ´åˆã«ã¯ **Null** ã‚’è¿”ã—ã¾ã™: + +* *msgNumber* ã§æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå­˜åœ¨ã—ãªã„å ´åˆ +* 指定ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ `.delete( )` ã«ã‚ˆã£ã¦å‰Šé™¤ãƒ•ラグãŒç«‹ã¦ã‚‰ã‚Œã¦ã„ãŸå ´åˆ + + +##### 例題 + + +```4d + var $server; $mailInfo : Object + var $mailNumber : Integer + + $server.host:="pop.gmail.com" // å¿…é ˆ + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + // メッセージ情報 + $mailInfo:=$transporter.getMailInfo(1) // 先頭メールをå–å¾—ã—ã¾ã™ + If($mailInfo #Null) + ALERT("最åˆã®ãƒ¡ãƒ¼ãƒ«ã®ã‚µã‚¤ã‚ºã¯ "+String($mailInfo.size)+" ãƒã‚¤ãƒˆã§ã™ã€‚") + End if +``` + + + + +## .getMailInfoList() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.getMailInfoList()** : Collection +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| ------------------------ | +| 戻り値 | コレクション | <- | `mailInfo` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +##### 説明 + +The `.getMailInfoList()` function returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). ã“ã®é–¢æ•°ã‚’使用ã™ã‚‹ã¨ã€POP3メールサーãƒãƒ¼ä¸Šã«ã‚るメッセージã®ä¸€è¦§ã‚’ローカルã§ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +è¿”ã•れるコレクションã®å„ `mailInfo` オブジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------ | ---- | ----------------------------------- | +| \[ ].size | 数値 | メッセージã®ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| \[ ].number | 数値 | メッセージã®ç•ªå· | +| \[ ].id | テキスト | メッセージã®å›ºæœ‰ID (メッセージをローカルã«ä¿å­˜ã™ã‚‹å ´åˆã«æœ‰ç”¨ã§ã™) | + +メールボックスã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒä¸€é€šã‚‚ãªã„å ´åˆã€ç©ºã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ + + + +#### number 㨠id プロパティã«ã¤ã„㦠+ +*number* プロパティã¯ã€`POP3_transporter` ãŒä½œæˆã•ã‚ŒãŸæ™‚点ã§ã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã«ã‚ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æ•°ã§ã™ã€‚ *number* プロパティã¯ã€ç‰¹å®šã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ç´ã¥ã„ãŸé™çš„ãªå€¤ã§ã¯ãªãã€ã‚»ãƒƒã‚·ãƒ§ãƒ³é–‹å§‹æ™‚点ã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸åŒå£«ã®é–¢ä¿‚ã«å¿œã˜ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³é–“ã§å€¤ãŒç•°ãªã‚Šã¾ã™ã€‚ メッセージã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸç•ªå·ã¯ã€[`POP3_transporter`](#pop3-transporter-オブジェクト) ãŒç¶­æŒã•れã¦ã„ã‚‹é–“ã®ã¿æœ‰åйã§ã™ã€‚ `POP3_transporter` ãŒæ¶ˆåŽ»ã•れるã¨ã€å‰Šé™¤ãƒ•ラグãŒç«‹ã¦ã‚‰ã‚Œã¦ã„ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯å‰Šé™¤ã•れã¾ã™ã€‚ ユーザーãŒå†åº¦ã‚µãƒ¼ãƒãƒ¼ã«ãƒ­ã‚°ã‚¤ãƒ³ã—ãŸå ´åˆã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹å†…ã«ã‚るカレントメッセージã«å¯¾ã—ã¦ã€1 ã‹ã‚‰ x ã¾ã§ã®ç•ªå·ãŒå†åº¦å‰²ã‚ŠæŒ¯ã‚‰ã‚Œã¾ã™ã€‚ + +ã“れã«å¯¾ã—ã€*id* プロパティã¯ã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚µãƒ¼ãƒãƒ¼ã§å—ä¿¡ã•ã‚ŒãŸæ™‚ã«å‰²ã‚ŠæŒ¯ã‚‰ã‚Œã‚‹å›ºæœ‰ã®ç•ªå·ã§ã™ã€‚ ãã®ç•ªå·ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å—ä¿¡ã—ãŸæ—¥ä»˜ã¨æ™‚間を使用ã—ã¦è¨ˆç®—ã•れã€POP3サーãƒãƒ¼ã«ã‚ˆã£ã¦å€¤ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ 残念ãªãŒã‚‰ã€POP3サーãƒãƒ¼ã¯ *id* プロパティをメッセージã«å¯¾ã™ã‚‹ä¸»ãªå‚ç…§ã¨ã—ã¦ã¯ä½¿ç”¨ã—ã¾ã›ã‚“。 POP3 セッションã®é–“ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å‚ç…§ã™ã‚‹ã«ã¯ *number* プロパティを指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ メッセージå‚照をデータベース内ã«å–å¾—ã—ãªãŒã‚‰ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æœ¬æ–‡ã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã«æ®‹ã—ã¦ãŠãよã†ãªã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã‚’開発ã™ã‚‹å ´åˆã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æŒ‡å®šã«ã¯ç´°å¿ƒã®æ³¨æ„を払ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +##### 例題 + +メールボックス内ã«ã‚るメールã®ç·æ•°ã¨ç·ã‚µã‚¤ã‚ºã‚’å–å¾—ã—ã¾ã™: + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" // å¿…é ˆ + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + C_COLLECTION($mailInfo) + C_LONGINT($vNum;$vSize) + + $mailInfo:=$transporter.getMailInfoList() + $vNum:=$mailInfo.length + $vSize:=$mailInfo.sum("size") + + ALERT("メールボックスã«ã¯ "+String($vNum)+" ä»¶ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚りã¾ã™ã€‚åˆè¨ˆã‚µã‚¤ã‚ºã¯ "+String($vSize)+" ãƒã‚¤ãƒˆã§ã™ã€‚") +``` + + + + +## .getMIMEAsBlob() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | +
        + +**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob +| 引数 | タイプ | | 説明 | +| --------- | ---- |:--:| --------------------------- | +| msgNumber | æ•´æ•° | -> | リスト中ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå· | +| 戻り値 | BLOB | <- | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れ㟠MIME文字列㮠BLOB | + + +##### 説明 + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object). + +*msgNumber* ã«ã¯ã€å–å¾—ã™ã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç•ªå·ã‚’渡ã—ã¾ã™ã€‚ ã“ã®ç•ªå·ã¯ã€[`.getMailInfoList()`](#getmailinfolist) 関数ã«ã‚ˆã£ã¦ number プロパティã«è¿”ã•れã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€ä»¥ä¸‹ã®å ´åˆã«ã¯ç©ºã® BLOB ã‚’è¿”ã—ã¾ã™: + +* *msgNumber* ã§æŒ‡å®šã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå­˜åœ¨ã—ãªã„å ´åˆ +* 指定ã—ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ `.delete()` ã«ã‚ˆã£ã¦å‰Šé™¤ãƒ•ラグãŒç«‹ã¦ã‚‰ã‚Œã¦ã„ãŸå ´åˆ + + +**è¿”ã•れる BLOB** + +`.getMIMEAsBlob()` 㯠`BLOB` ã‚’è¿”ã—ã¾ã™ã€‚ã“ã® BLOB ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã—ãŸã‚Šã€`MAIL Convert from MIME` コマンドを使用ã—㦠[`Email` オブジェクト](EmailObjectClass.md#email-object) ã¸ã¨å¤‰æ›ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +##### 例題 + +メールボックス内ã«ã‚るメールã®ç·æ•°ã¨ç·ã‚µã‚¤ã‚ºã‚’å–å¾—ã—ã¾ã™: + +```4d + var $server : Object + var $mailInfo : Collection + var $blob : Blob + var $transporter : 4D.POP3Transporter + + $server:=New object + $server.host:="pop.gmail.com" + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $blob:=$transporter.getMIMEAsBlob($mailInfo[0].number) +``` + + + +## .host + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.host** : Text + +#### 説明 + +The `.host` property contains the name or the IP address of the host server. ã“ã®æƒ…å ±ã¯ãƒ¡ãƒ¼ãƒ«é€šä¿¡ (SMTPã€POP3ã€IMAP) ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + + + + + + + +## .logFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.logFile** : Text + +#### 説明 + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. パスã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆ Logs フォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã€ã‚ã‚‹ã„ã¯çµ¶å¯¾ãƒ‘スを指定ã§ãã¾ã™ã€‚ + +`SET DATABASE PARAMETER` ã‚³ãƒžãƒ³ãƒ‰ã§æœ‰åŠ¹åŒ–ã•れる通常ã®ãƒ­ã‚°ãƒ•ァイルã¨ã¯ç•°ãªã‚Šã€æ‹¡å¼µãƒ­ã‚°ãƒ•ァイルã¯ã™ã¹ã¦ã®é€ä¿¡ã•れãŸãƒ¡ãƒ¼ãƒ«ã® MIMEコンテンツをä¿å­˜ã—ã€ã‚µã‚¤ã‚ºåˆ¶é™ãŒã‚りã¾ã›ã‚“。 拡張ログファイルã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®ç« ã‚’ãれãžã‚Œå‚ç…§ãã ã•ã„: + +* **SMTP 接続** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 接続** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP 接続** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .port + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.port** : Integer + +#### 説明 + +The `.port` property contains the port number used for mail transactions. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる *server* オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れるãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + + +## .undeleteAll() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R2 | 追加 | +
        + +**.undeleteAll()** +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + +##### 説明 + +The `.undeleteAll()` function removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object). + + + + +## .user + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.user** : Text + +#### 説明 +The `.user` property contains the user name used for authentication on the mail server. + + + + + + diff --git a/website/translated_docs/ja/API/SMTPTransporterClass.md b/website/translated_docs/ja/API/SMTPTransporterClass.md new file mode 100644 index 00000000000000..41e0288d177402 --- /dev/null +++ b/website/translated_docs/ja/API/SMTPTransporterClass.md @@ -0,0 +1,523 @@ +--- +id: SMTPTransporterClass +title: SMTPTransporter +--- + +`SMTPTransporter` クラスを使ã£ã¦ã€SMTP接続ã®è¨­å®šã‚„ã€*SMTP transporter* オブジェクトを介ã—ãŸãƒ¡ãƒ¼ãƒ«ã®é€ä¿¡ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +### SMTP Transporter オブジェクト + +SMTP Transporter オブジェクト㯠[SMTP New transporter](#smtp-new-transporter) コマンドã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ ã“れらã¯ã€æ¬¡ã®ãƒ—ロパティや関数をæŒã¡ã¾ã™: + + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | +| [**.bodyCharset** : Text](#bodycharset)

             the charset and encoding used for the body part of the email | +| [**.checkConnection()** : Object](#checkconnection)

             checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.headerCharset** : Text](#headercharset)

             the charset and encoding used for the email header | +| [**.host** : Text](#host)

            the name or the IP address of the host server | +| [**.keepAlive** : Boolean](#keepalive)

            **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

             the port number used for mail transactions | +| [**.send**( *mail* : Object ) : Object](#send)

            sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object | +| [**.sendTimeOut** : Integer](#sendtimeout)

             the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | +| [**.user** : Text](#user)

             the user name used for authentication on the mail server | + + + +## SMTP New transporter + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------------------ | +| v18 | logFile プロパティを追加 | +| v17 R5 | bodyCharset 㨠headerCharset プロパティを追加 | +| v17 R4 | 追加 | +
        + +**SMTP New transporter**( *server* : Object ) : 4D.SMTPTransporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| ---------------------------------------------------- | +| server | オブジェクト | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.SMTPTransporter | <- | [SMTP transporter オブジェクト](#smtp-transporter-オブエジェクト) | + + +#### 説明 + +The `SMTP New transporter` command configures a new SMTP connection according to the *server* parameter and returns a new *[SMTP transporter](#smtp-transporter-object)* object. è¿”ã•れ㟠transporter オブジェクトã¯ã€é€šå¸¸ãƒ¡ãƒ¼ãƒ«ã®é€ä¿¡ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ SMTPサーãƒãƒ¼ã¨ã®æŽ¥ç¶šã‚’é–‹å§‹ã—ã¾ã›ã‚“。 SMTP接続ã¯ã€å®Ÿéš›ã«ã¯ [`.send()`](#send) 関数ãŒå®Ÿè¡Œã•ã‚ŒãŸæ™‚ã«é–‹ã‹ã‚Œã¾ã™ã€‚ +> +> SMTP接続ã¯ã€ä»¥ä¸‹ã®å ´åˆã«è‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™:
        * [`keepAlive`](#keepalive) プロパティ㌠true (デフォルト) ã®å ´åˆã«ã¯ã€transporter ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•ã‚ŒãŸæ™‚。 * [`keepAlive`](#keepalive) プロパティ㌠false ã®å ´åˆã«ã¯ã€å„ [`.send( )`](#send) 関数ãŒå®Ÿè¡Œã•れãŸå¾Œã€‚ + + + + +*server* 引数ã¨ã—ã¦ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを渡ã—ã¾ã™: + +| *server* | デフォルト値 (çœç•¥æ™‚) | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

            **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
        .**accessTokenOAuth2**: Object

        OAuth2 èªè¨¼ã®è³‡æ ¼æƒ…報を表ã™ãƒ†ã‚­ã‚¹ãƒˆæ–‡å­—列ã¾ãŸã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚ªãƒ–ジェクト。 `authenticationMode` ㌠OAUTH2 ã®å ´åˆã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ `accessTokenOAuth2` ãŒä½¿ç”¨ã•れã¦ã„る㌠`authenticationMode` ãŒçœç•¥ã•れã¦ã„ãŸå ´åˆã€OAuth2 プロトコルãŒä½¿ç”¨ã•れã¾ã™ (サーãƒãƒ¼ã§è¨±å¯ã•れã¦ã„れã°)。 *[SMTP transporter](#smtp-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.authenticationMode** : Text](#authenticationmode)

            the authentication mode used to open the session on the mail server | サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã£ã¨ã‚‚セキュアãªèªè¨¼ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ | +| [**.bodyCharset** : Text](#bodycharset)

             the charset and encoding used for the body part of the email | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

            the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.headerCharset** : Text](#headercharset)

             the charset and encoding used for the email header | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.host** : Text](#host)

            the name or the IP address of the host server | *å¿…é ˆ* | +| [**.keepAlive** : Boolean](#keepalive)

            **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | True | +| [**.logFile** : Text](#logfile)

            the path of the extended log file defined (if any) for the mail connection | ãªã— | +| **password** : Text

        サーãƒãƒ¼ã¨ã®èªè¨¼ã®ãŸã‚ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‘スワード *[SMTP transporter](#smtp-transporter-オブジェクト)* オブジェクトã«ã¯è¿”ã•れã¾ã›ã‚“。 | ãªã— | +| [**.port** : Integer](#port)

             the port number used for mail transactions | 587 | +| [**.sendTimeOut** : Integer](#sendtimeout)

             the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | 100 | +| [**.user** : Text](#user)

             the user name used for authentication on the mail server | ãªã— | + + + +#### 戻り値 + +ã“ã®é–¢æ•°ã¯ã€[**SMTP transporter オブジェクト**](#smtp-transporter-オブジェクト) ã‚’è¿”ã—ã¾ã™ã€‚ è¿”ã•れるプロパティã¯ã™ã¹ã¦ **読ã¿å–り専用** ã§ã™ã€‚ + + +#### 例題 + +```4d + $server:=New object + $server.host:="smtp.gmail.com" // å¿…é ˆ + $server.port:=465 + $server.user:="4D@gmail.com" + $server.password:="XXXX" + $server.logFile:="LogTest.txt" // Logsフォルダーã«ä¿å­˜ã™ã‚‹æ‹¡å¼µã•れãŸãƒ­ã‚° + + var $transporter : 4D.SMTPTransporter + $transporter:=SMTP New transporter($server) + + $email:=New object + $email.subject:="my first mail " + $email.from:="4d@gmail.com" + $email.to:="4d@4d.com;test@4d.com" + $email.textBody:="Hello World" + $email.htmlBody:="

        Hello World

        'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'

        \ +

        There are many variations of passages of Lorem Ipsum available."\ + +"The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

        " + + $status:=$transporter.send($email) + If(Not($status.success)) + ALERT("メールé€ä¿¡ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: "+$status.message) + End if +``` + + +## 4D.SMTPTransporter.new() + + +**4D.SMTPTransporter.new**( *server* : Object ) : 4D.SMTPTransporter +| 引数 | タイプ | | 説明 | +| ------ | ------------------ |:--:| ---------------------------------------------------- | +| server | オブジェクト | -> | メールサーãƒãƒ¼æƒ…å ± | +| 戻り値 | 4D.SMTPTransporter | <- | [SMTP transporter オブジェクト](#smtp-transporter-オブエジェクト) | + +#### 説明 + +The `4D.SMTPTransporter.new()` function creates and returns a new object of the `4D.SMTPTransporter` type. ã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ã€[`SMTP New transporter`](#smtp-new-transporter) コマンドã¨åŒä¸€ã§ã™ã€‚ + + + +## .acceptUnsecureConnection + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.acceptUnsecureConnection** : Boolean + +#### 説明 + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +æš—å·åŒ–ã•れã¦ã„ãªã„接続ãŒè¨±å¯ã•れã¦ã„ãªã„å ´åˆã«ã¯ **false** ãŒæ ¼ç´ã•れã¦ãŠã‚Šã€ãã®å ´åˆã«æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šãŒä¸å¯èƒ½ãªå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +使用å¯èƒ½ãªã‚»ã‚­ãƒ¥ã‚¢ãªãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- SMTP + - 465: SMTPS + - 587 ã¾ãŸã¯ 25: STARTTLS アップグレードãŒã•れ㟠SMTP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- IMAP + - 143: IMAP éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 993: STARTTLS アップグレードãŒã•れ㟠IMAP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- POP3 + - 110: POP3 éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + +## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + + +**.authenticationMode** : Text + +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `SMTP authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `SMTP authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `SMTP authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + + + + +## .bodyCharset + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------- | +| v18 | UTF8 base64 をサãƒãƒ¼ãƒˆ | +| v17 R5 | 追加 | +
        + +**.bodyCharset** : Text + +#### 説明 + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* ä»¶å +* 添付ファイルå +* メールå + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| 定数 | 値 | 説明 | +| ------------------------ | ------------------------------ | -------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
        • *headerCharset*: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        | +| mail mode ISO88591 | ISO-8859-1 |
        • *headerCharset*: ISO-8859-1 & Quoted-printable
        • *bodyCharset*: ISO-8859-1 & 8-bit
        | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (**デフォルト値**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64 | + + + + + + + +## .checkConnection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.checkConnection()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| -------------------------- | +| 戻り値 | オブジェクト | <- | transporter オブジェクト接続ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. ã“ã®é–¢æ•°ã‚’使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æä¾›ã•れãŸå€¤ãŒæœ‰åйã‹ã©ã†ã‹ã‚’検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +ã“ã®é–¢æ•°ã¯ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã€ãƒ¡ãƒ¼ãƒ«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ------------------------ | ---------- | ------------------------------------------------- | +| success | | boolean | ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| status | | number | (SMTPã®ã¿) メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚³ãƒ¼ãƒ‰ (メール処ç†ã«é–¢ä¿‚ãªã„å•題ã®å ´åˆã«ã¯ 0) | +| statusText | | text | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | collection | 4Dエラースタック (メールサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[ ].errCode | number | 4Dエラーコード | +| | \[ ].message | text | 4Dエラーã®è©³ç´° | +| | \[ ].componentSignature | text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + + +SMTPステータスコードã«ã¤ã„ã¦ã®è©³ç´°ã¯ [ã“ã¡ã‚‰ã®ãƒšãƒ¼ã‚¸](https://www.usps.org/info/smtp_status.html) ã‚’å‚ç…§ãã ã•ã„。 + +#### 例題 + +```4d + var $pw : Text + var $options : Object + var $transporter : 4D.SMTPTransporter + $options:=New object + + $pw:=Request("パスワードを入力ã—ã¦ãã ã•ã„:") + $options.host:="smtp.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=SMTP New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success=True) + ALERT("SMTP接続ãƒã‚§ãƒƒã‚¯ã«æˆåŠŸã—ã¾ã—ãŸã€‚") + Else + ALERT("エラー # "+String($status.status)+", "+$status.statusText) + End if +``` + + + +## .connectionTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.connectionTimeOut** : Integer + + +#### 説明 + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる `server` オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルト㯠30 ã§ã™ã€‚ + + + + + + + + +## .headerCharset + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.headerCharset** : Text + +#### 説明 + +The `.headerCharset` property contains the charset and encoding used for the email header. ヘッダーã«ã¯ãƒ¡ãƒ¼ãƒ«ã®æ¬¡ã®è¦ç´ ã‚’å«ã¿ã¾ã™: + +* ä»¶å +* 添付ファイルå +* メールå + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| 定数 | 値 | 説明 | +| ------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
        • *headerCharset*: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        | +| mail mode ISO88591 | ISO-8859-1 |
        • *headerCharset*: ISO-8859-1 & Quoted-printable
        • *bodyCharset*: ISO-8859-1 & 8-bit
        | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (デフォルト値) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64 | + + + + + + +## .host + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.host** : Text + +#### 説明 + +The `.host` property contains the name or the IP address of the host server. ã“ã®æƒ…å ±ã¯ãƒ¡ãƒ¼ãƒ«é€šä¿¡ (SMTPã€POP3ã€IMAP) ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + + + + + + +## .keepAlive + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.keepAlive** : Boolean + +#### 説明 + +The `.keepAlive` property contains **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed, and **False** otherwise. `SMTP New transporter` コマンド㧠`transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã™ã‚‹ `server` オブジェクトã«ãŠã„ã¦ã€ `keepAlive` ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルト㯠**true** ã§ã™ã€‚ + +SMTP接続ã¯ã€ä»¥ä¸‹ã®å ´åˆã«è‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™: + +* `.keepAlive` プロパティ㌠true (デフォルト) ã®å ´åˆã«ã¯ã€`transporter` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•ã‚ŒãŸæ™‚。 +* `.keepAlive` プロパティ㌠false ã®å ´åˆã«ã¯ã€å„ `.send( )` 関数ãŒå®Ÿè¡Œã•れãŸå¾Œã€‚ + + + + + + +## .logFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.logFile** : Text + +#### 説明 + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. パスã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆ Logs フォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã€ã‚ã‚‹ã„ã¯çµ¶å¯¾ãƒ‘スを指定ã§ãã¾ã™ã€‚ + +`SET DATABASE PARAMETER` ã‚³ãƒžãƒ³ãƒ‰ã§æœ‰åŠ¹åŒ–ã•れる通常ã®ãƒ­ã‚°ãƒ•ァイルã¨ã¯ç•°ãªã‚Šã€æ‹¡å¼µãƒ­ã‚°ãƒ•ァイルã¯ã™ã¹ã¦ã®é€ä¿¡ã•れãŸãƒ¡ãƒ¼ãƒ«ã® MIMEコンテンツをä¿å­˜ã—ã€ã‚µã‚¤ã‚ºåˆ¶é™ãŒã‚りã¾ã›ã‚“。 拡張ログファイルã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®ç« ã‚’ãれãžã‚Œå‚ç…§ãã ã•ã„: + +* **SMTP 接続** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 接続** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP 接続** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + + +## .port + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.port** : Integer + +#### 説明 + +The `.port` property contains the port number used for mail transactions. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる *server* オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れるãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + +## .send() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -------------- | +| v17 R5 | MIMEコンテンツをサãƒãƒ¼ãƒˆ | +| v17 R4 | 追加 | +
        + +**.send**( *mail* : Object ) : Object +| 引数 | タイプ | | 説明 | +| ---- | ------ |:--:| -------------------------------------------- | +| mail | オブジェクト | -> | é€ä¿¡ã™ã‚‹ [メール](EmailObjectClass.md#email-オブジェクト) | +| 戻り値 | オブジェクト | <- | SMTP ステータス | + + +#### 説明 + +The `.send()` function sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object. +> `transporter` オブジェクトã¯ã€äº‹å‰ã« `SMTP New transporter` コマンドã«ã‚ˆã£ã¦ä½œæˆã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ã€SMTP接続ãŒäº‹å‰ã«é–‹ã‹ã‚Œã¦ã„ãªã‹ã£ãŸå ´åˆã«ã¯ã€ãれを作æˆã—ã¾ã™ã€‚ `transporter` オブジェクト㮠`.keepAlive` プロパティ㌠false ã§ã‚ã£ãŸå ´åˆã€SMTP接続㯠`.send()` 実行後ã«è‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ã例外ã®å ´åˆã«ã¯ã€æŽ¥ç¶šã¯ `transporter` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¶ˆåŽ»ã•れるã¾ã§é–‹ã„ãŸã¾ã¾ã«ãªã‚Šã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[`SMTP New transporter`](#smtp-new-transporter) コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +*mail*ã«ã¯ã€é€ä¿¡ã™ã‚‹æœ‰åŠ¹ãª [`Email` オブジェクト](EmailObjectClass.md#email-オブジェクト) を渡ã—ã¾ã™ã€‚ メールã«ã¯é€ä¿¡å…ƒ (メールãŒã©ã“ã‹ã‚‰é€ã‚‰ã‚Œã‚‹ã‹) ã¨é€ä¿¡å…ˆ (一å以上ã®å—信者) プロパティãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ãŒã€ãã®ä»–ã®ãƒ—ロパティã¯ä»»æ„ã§ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +ã“ã®é–¢æ•°ã¯ã€SMTP ステータスを表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™. ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------- | --------------------------------------- | +| success | boolean | é€ä¿¡ã«æˆåŠŸã—ãŸå ´åˆã¯ trueã€ãれ以外㯠false | +| status | number | SMTPサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚³ãƒ¼ãƒ‰ (メール処ç†ã«é–¢ä¿‚ãªã„å•題ã®å ´åˆã«ã¯ 0) | +| statusText | text | SMTPã‹ã‚‰è¿”ã•れるステータスメッセージ | + +SMTP 処ç†ã¨ã¯é–¢ä¿‚ã®ãªã„å•題 (例: 必須プロパティãŒãƒ¡ãƒ¼ãƒ«ã«ãªã„) ãŒç™ºç”Ÿã—ãŸå ´åˆã€4D ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ã“れã¯ã€`ON ERR CALL` コマンドã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚¤ãƒ³ã‚¿ãƒ¼ã‚»ãƒ—トã§ãã¾ã™ã€‚ エラー情報をå–å¾—ã™ã‚‹ã«ã¯ã€`GET LAST ERROR STACK` コマンドを使用ã—ã¾ã™ã€‚ + +ã“ã®å ´åˆã€çµæžœã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚ªãƒ–ジェクトã«ã¯ä»¥ä¸‹ã®å€¤ãŒå«ã¾ã‚Œã¾ã™: + +| プロパティ | 値 | +| ---------- | ---------------------- | +| success | False | +| status | 0 | +| statusText | "Failed to send email" | + + +## .sendTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.sendTimeOut** : Integer + +#### 説明 +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. `.sendTimeOut` プロパティ㌠`server` オブジェクトã«ã‚ˆã£ã¦è¨­å®šã•れã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ォルト㧠100 ã¨ã„ã†å€¤ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + + + + + + +## .user + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.user** : Text + +#### 説明 +The `.user` property contains the user name used for authentication on the mail server. + + + + + diff --git a/website/translated_docs/ja/API/SessionClass.md b/website/translated_docs/ja/API/SessionClass.md new file mode 100644 index 00000000000000..1fa3cd37df2940 --- /dev/null +++ b/website/translated_docs/ja/API/SessionClass.md @@ -0,0 +1,363 @@ +--- +id: SessionClass +title: Session +--- + +[プロジェクトã«ãŠã„ã¦ã€ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ãƒ«ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹](WebServer/sessions.md#ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹åŒ–) å ´åˆã€[`Session`](#session) コマンドã«ã‚ˆã£ã¦ Session オブジェクトãŒè¿”ã•れã¾ã™ã€‚ Webクライアント (ブラウザーãªã©) ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’制御ã™ã‚‹ãŸã‚ã€4D Webサーãƒãƒ¼ã¯è‡ªå‹•的㫠Sessionオブジェクトを作æˆãƒ»ç®¡ç†ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¸ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを Webé–‹ç™ºè€…ã«æä¾›ã—ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®ç®¡ç†ã‚„ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜ã€ãƒ—ãƒ­ã‚»ã‚¹é–“ã®æƒ…報共有ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ã—ãŸãƒ—リエンプティブプロセスã®é–‹å§‹ãªã©ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +セッションã®å®Ÿè£…ã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[Webサーãƒãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³](WebServer/sessions.md) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +### æ¦‚è¦ + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.clearPrivileges()**](#clearprivileges)

            removes all the privileges associated to the session | +| [**.expirationDate** : Text](#expirationdate)

            the expiration date and time of the session cookie | +| [**.hasPrivilege**( *privilege* : Text ) : Boolean](#hasprivilege)

            returns True if the privilege is associated to the session, and False otherwise | +| [**.idleTimeout** : Integer](#idletimeout)

            the inactivity session timeout (in minutes), after which the session is automatically closed by 4D | +| [**.isGuest()** : Boolean](#isguest)

            returns True if the session is a Guest session (i.e. it has no privileges) | +| [**.setPrivileges**( *privilege* : Text )
        **.setPrivileges**( *privileges* : Collection )
        **.setPrivileges**( *settings* : Object )](#setprivileges)

            associates the privilege(s) defined in the parameter to the session | +| [**.storage** : Object](#storage)

            a shared object that can be used to store information available to all requests of the web client | +| [**.userName** : Text](#username)

            the user name associated to the session | + + + + +## セッション + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**Session** : 4D.Session + +| 引数 | タイプ | | 説明 | +| --- | ---------- |:--:| -------------- | +| 戻り値 | 4D.Session | <- | Session オブジェクト | + + +#### 説明 + +The `Session` command returns the `Session` object corresponding to the current scalable user web session. + +[ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ãƒ«ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹](WebServer/sessions.md#ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹åŒ–) å ´åˆã«ã®ã¿ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ©Ÿèƒ½ã—ã¾ã™ã€‚ セッションãŒç„¡åйãªå ´åˆã‚„ã€æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒä½¿ç”¨ã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€*Null* ã‚’è¿”ã—ã¾ã™ã€‚ + +ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ãƒ«ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã€`Session` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã‘ã‚‹ã€ã‚らゆる Webプロセスã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™: + +- `On Web Authentication`ã€`On Web Connection`ã€ãŠã‚ˆã³ `On REST Authentication` データベースメソッド +- RESTリクエストã§å‘¼ã³å‡ºã•れ㟠ORDA [データモデルクラス関数](ORDA/ordaClasses.md) +- セミダイナミックページã«ãŠã„ã¦ã€4Dã‚¿ã‚° (4DTEXT, 4DHTML, 4DEVAL, 4DSCRIPT/, 4DCODE) を介ã—ã¦å‡¦ç†ã•れるコード +- "公開オプション: 4Dã‚¿ã‚°ã¨URL(4DACTION...)" を有効化ã•れãŸã†ãˆã§ã€4DACTION/ URL ã‹ã‚‰å‘¼ã³å‡ºã•れãŸãƒ—ロジェクトメソッド + + +#### 例題 + +"公開オプション: 4Dã‚¿ã‚°ã¨URL(4DACTION...)" を有効ã«ã—㟠`action_Session` メソッドを定義ã—ã¾ã—ãŸã€‚ ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã«æ¬¡ã® URL を入力ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™: + +``` +IP:port/4DACTION/action_Session +``` + +```4d + //action_Session メソッド + Case of + :(Session#Null) + If(Session.hasPrivilege("WebAdmin")) // hasPrivilege 関数を呼ã³å‡ºã—ã¾ã™ + WEB SEND TEXT("4DACTION --> セッション㯠WebAdmin ã§ã™") + Else + WEB SEND TEXT("4DACTION --> セッション㯠WebAdmin ã§ã¯ã‚りã¾ã›ã‚“") + End if + Else + WEB SEND TEXT("4DACTION --> セッション㯠null ã§ã™") + End case +``` + + + +## .clearPrivileges() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.clearPrivileges()** +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + +#### 説明 + +The `.clearPrivileges()` function removes all the privileges associated to the session. çµæžœçš„ã«ã€å½“該セッションã¯è‡ªå‹•çš„ã«ã‚²ã‚¹ãƒˆã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ãªã‚Šã¾ã™ã€‚ + + +#### 例題 + +```4d +// セッションを無効ã«ã—ã¾ã™ +var $isGuest : Boolean + +Session.clearPrivileges() +$isGuest:=Session.isGuest() //$isGuest 㯠true +``` + + + + +## .expirationDate + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.expirationDate** : Text +#### 説明 + +The `.expirationDate` property contains the expiration date and time of the session cookie. 値㯠ISO 8601標準ã«å¾“ã£ã¦æ–‡å­—列ã§è¡¨ç¾ã•れã¾ã™: `YYYY-MM-DDTHH:MM:SS.mmmZ`. + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ [`.idleTimeout`](#idletimeout) プロパティ値ãŒå¤‰æ›´ã•れãŸå ´åˆã€æœ‰åŠ¹æœŸé™ã¯è‡ªå‹•çš„ã«å†è¨ˆç®—ã•れã¾ã™ã€‚ + +#### 例題 + +```4d +var $expiration : Text +$expiration:=Session.expirationDate // 例: "2021-11-05T17:10:42Z" +``` + + + + + +## .hasPrivilege() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | +
        + +**.hasPrivilege**( *privilege* : Text ) : Boolean +| 引数 | タイプ | | 説明 | +| --------- | ---- |:--:| ------------------------------------------------- | +| privilege | テキスト | <- | 確èªã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®åç§° | +| 戻り値 | ブール | <- | セッション㌠*privilege* ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„れ㰠trueã€ãれ以外㯠false | + + +#### 説明 + +The `.hasPrivilege()` function returns True if the privilege is associated to the session, and False otherwise. + + +#### 例題 + +"WebAdmin" アクセス権ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ç´ã¥ã„ã¦ã„ã‚‹ã‹ã‚’確èªã—ã¾ã™: + +```4d +If (Session.hasPrivilege("WebAdmin")) + // アクセス権ãŒä»˜ä¸Žã•れã¦ã„ã‚‹ã®ã§ã€ä½•ã‚‚ã—ã¾ã›ã‚“ +Else + // èªè¨¼ãƒšãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ + +End if +``` + + +## .idleTimeout + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.idleTimeout** : Integer +#### 説明 + +The `.idleTimeout` property contains the inactivity session timeout (in minutes), after which the session is automatically closed by 4D. + +プロパティ未設定時ã®ãƒ‡ãƒ•ォルト値㯠60 (1時間) ã§ã™ã€‚ + +ã“ã®ãƒ—ロパティãŒè¨­å®šã•れるã¨ã€ãれã«å¿œã˜ã¦ [`.expirationDate`](#expirationdate) プロパティも更新ã•れã¾ã™ã€‚ + +> 60 (分) 未満ã®å€¤ã‚’指定ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (60 未満ã®å€¤ã‚’設定ã—ãŸå ´åˆã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ 60 (分) ã«è¨­å®šã•れã¾ã™)。 + + +ã“ã®ãƒ—ロパティ㯠**èª­ã¿æ›¸ãå¯èƒ½** ã§ã™ã€‚ + +#### 例題 + +```4d +If (Session.isGuest()) + // ゲストセッションã¯ã€60分ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時間経éŽå¾Œã«çµ‚了ã—ã¾ã™ + Session.idleTimeout:=60 +Else + // ãã®ä»–ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯ã€120分ã®éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–時間経éŽå¾Œã«çµ‚了ã—ã¾ã™ + Session.idleTimeout:=120 +End if + +``` + + + +## .isGuest() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.isGuest()** : Boolean +| 引数 | タイプ | | 説明 | +| --- | --- |:--:| ----------------------------- | +| 戻り値 | ブール | <- | ゲストセッションã®å ´åˆã¯ trueã€ãれ以外㯠false | + +#### 説明 + +The `.isGuest()` function returns True if the session is a Guest session (i.e. it has no privileges). + + +#### 例題 + +`On Web Connection` データベースメソッドã«ã¦: + +```4d +If (Session.isGuest()) + // ゲストユーザー用ã®å‡¦ç† +End if +``` + + + + +## .setPrivileges() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.setPrivileges**( *privilege* : Text )
        **.setPrivileges**( *privileges* : Collection )
        **.setPrivileges**( *settings* : Object ) +| 引数 | タイプ | | 説明 | +| ---------- | ------ |:--:| ------------------------------------------- | +| privilege | テキスト | -> | アクセス権ã®åç§° | +| privileges | コレクション | -> | アクセス権ã®åç§°ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| settings | オブジェクト | -> | "privileges" プロパティ (文字列ã¾ãŸã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‚’æŒã¤ã‚ªãƒ–ジェクト | + +#### 説明 + +The `.setPrivileges()` function associates the privilege(s) defined in the parameter to the session. + +- *privilege* ã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®å称を文字列ã¨ã—ã¦æ¸¡ã—ã¾ã™ (複数ã®å ´åˆã¯ã‚«ãƒ³ãƒžåŒºåˆ‡ã‚Š)。 + +- *privileges* ã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®å称を文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ + +- *settings* ã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを渡ã—ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------------------- | -------------------------------------------------- | +| privileges | Text ã¾ãŸã¯ Collection |
      • アクセス権åã®æ–‡å­—列
      • アクセス権åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³
      • | +| userName | テキスト | (ä»»æ„) セッションã¨ç´ã¥ã‘るユーザーå | + +無効ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©åã‚’å«ã‚€å ´åˆã€`privileges` プロパティã¯ç„¡è¦–ã•れã¾ã™ã€‚ + +> ç¾åœ¨ã®å®Ÿè£…ã§ã¯ã€"WebAdmin" アクセス権ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +セッションã«ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒç´ã¥ã„ã¦ã„ãªã„å ´åˆã€ãã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯ãƒ‡ãƒ•ォルト㧠[ゲストセッション](#isguest) ã§ã™ã€‚ + +[`userName`](#username) プロパティ㯠Session オブジェクトレベルã§åˆ©ç”¨å¯èƒ½ã§ã™ (読ã¿å–り専用)。 + +#### 例題 + +カスタムãªèªè¨¼ãƒ¡ã‚½ãƒƒãƒ‰ã«ãŠã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã« "WebAdmin" アクセス権を付与ã—ã¾ã™: + +```4d +var $userOK : Boolean + +... // ユーザーèªè¨¼ + +If ($userOK) // ユーザーèªè¨¼ã«æˆåŠŸã—ãŸå ´åˆ + var $info : Object + $info:=New object() + $info.privileges:=New collection("WebAdmin") + Session.setPrivileges($info) +End if + +``` + + + +## .storage + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.storage** : Object +#### 説明 + +The `.storage` property contains a shared object that can be used to store information available to all requests of the web client. + +`Session` オブジェクトã®ä½œæˆæ™‚ã«ã¯ã€`.storage` プロパティã¯ç©ºã§ã™ã€‚ 共有オブジェクトã®ãŸã‚ã€ã“ã®ãƒ—ロパティã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã® `Storage` オブジェクトã«ãŠã„ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +> サーãƒãƒ¼ã® `Storage` オブジェクトã¨åŒæ§˜ã«ã€`.storage` プロパティã¯å¸¸ã« "å˜ç‹¬ã§" 存在ã—ã¾ã™ã€‚共有オブジェクトや共有コレクションを `.storage` ã«è¿½åŠ ã—ã¦ã‚‚ã€å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã¯ä½œæˆã•れã¾ã›ã‚“。 + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ãŒã€æˆ»ã‚Šå€¤ã®ã‚ªãƒ–ジェクトã¯èª­ã¿æ›¸ãå¯èƒ½ã§ã™ã€‚ + +#### 例題 + +クライアント㮠IP ã‚’ `.storage` プロパティã«ä¿å­˜ã—ã¾ã™ã€‚ `On Web Authentication` データベースメソッドã«ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: + +```4d +If (Session.storage.clientIP=Null) // 最åˆã®ã‚¢ã‚¯ã‚»ã‚¹ + Use (Session.storage) + Session.storage.clientIP:=New shared object("value"; $clientIP) + End use +End if + +``` + + + + + + +## .userName + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R6 | 追加 | + +
        + +**.userName** : Text +#### 説明 + +The `.userName` property contains the user name associated to the session. ã“ã®ãƒ—ロパティã¯ã€ã‚³ãƒ¼ãƒ‰å†…ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’確èªã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティã¯ãƒ‡ãƒ•ォルトã§ã¯ç©ºã®æ–‡å­—列ã§ã™ã€‚ ã“れã¯ã€[`setPrivileges()`](#setprivileges) 関数㮠`privileges` プロパティを使ã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + + + diff --git a/website/translated_docs/ja/API/SignalClass.md b/website/translated_docs/ja/API/SignalClass.md new file mode 100644 index 00000000000000..7f4fad9636e130 --- /dev/null +++ b/website/translated_docs/ja/API/SignalClass.md @@ -0,0 +1,254 @@ +--- +id: SignalClass +title: Signal +--- + +シグナルã¯ã€ãƒžãƒ«ãƒãƒ—ロセスアプリケーションã«ãŠã„ã¦ãƒ—ロセス間ã§ã®ã‚„りå–りを管ç†ã—è¡çªã‚’é¿ã‘ã‚‹ãŸã‚ã« 4Dãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ãŒæä¾›ã™ã‚‹ãƒ„ールã§ã™ã€‚ シグナルã¯ã€1ã¤ä»¥ä¸Šã®ãƒ—ロセスãŒå®Ÿè¡Œã‚’ä¸€æ™‚åœæ­¢ã—ã€ç‰¹å®šã®ã‚¿ã‚¹ã‚¯ãŒå®Œäº†ã™ã‚‹ã¾ã§å¾…ã¤ã‚ˆã†ã«ã™ã‚‹ä»•組ã¿ã§ã™ã€‚ ã©ã®ãƒ—ロセスもシグナルを待機ã¾ãŸã¯ãƒªãƒªãƒ¼ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> プロセス間ã®ã‚„りå–りを管ç†ã™ã‚‹ã«ã¯ã€ã‚»ãƒžãƒ•ォーも使用ã§ãã¾ã™ã€‚ セマフォーã¯ã€2ã¤ä»¥ä¸Šã®ãƒ—ロセスãŒåŒã˜ãƒªã‚½ãƒ¼ã‚¹ (ファイルã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãªã©) ã‚’åŒæ™‚ã«å¤‰æ›´ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã®ä»•組ã¿ã§ã™ã€‚ セマフォーを解除ã§ãã‚‹ã®ã¯ã€ãれを設定ã—ãŸãƒ—ロセスã®ã¿ã§ã™ã€‚ + + +### Signal オブジェクト + +シグナルã¯ã€ãƒ¯ãƒ¼ã‚«ãƒ¼ã‚„プロセスを呼ã³å‡ºã™/作æˆã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«å¯¾ã—ã¦å¼•æ•°ã¨ã—ã¦æ¸¡ã™å¿…è¦ã®ã‚る共有オブジェクトã§ã™ã€‚ + +`4D.Signal` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®ãƒ“ルトインã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ãŠã‚ˆã³ãƒ—ロパティをæŒã¡ã¾ã™: + +- [`.wait()`](#wait) +- [`.trigger()`](#trigger) +- [`.signaled`](#signaled) +- [`.description`](#description) + +シグナル㮠`.wait()` メソッドを呼ã³å‡ºã—ãŸãƒ¯ãƒ¼ã‚«ãƒ¼ã‚„プロセスã¯ã€`.signaled` プロパティ㌠true ã«ãªã‚‹ã¾ã§å®Ÿè¡Œã‚’åœæ­¢ã—ã¾ã™ã€‚ シグナルを待ã£ã¦ã„ã‚‹é–“ã€å‘¼ã³å‡ºã—ãŸãƒ—ロセス㯠CPU を消費ã—ã¾ã›ã‚“。 ã“れã¯ãƒžãƒ«ãƒãƒ—ロセスアプリケーションã®ãƒ‘フォーマンスを鑑ã¿ã‚‹ã¨æœ‰æ„義ãªä»•組ã¿ã§ã™ã€‚ `.signaled` プロパティã¯ã€ã„ãšã‚Œã‹ã®ãƒ¯ãƒ¼ã‚«ãƒ¼ã¾ãŸã¯ãƒ—ロセスãŒã‚·ã‚°ãƒŠãƒ«ã® `.trigger()` メソッドを呼ã³å‡ºã—ãŸæ™‚点㧠true ã«ãªã‚Šã¾ã™ã€‚ + +ã¾ãŸã€ã‚³ãƒ¼ãƒ‰ã®ãƒ–ロックをé¿ã‘ã‚‹ãŸã‚ã€`.wait()` 呼ã³å‡ºã—ã®éš›ã«å®šç¾©ã—ãŸã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚é–“ã«é”ã™ã‚‹ã“ã¨ã§ã‚‚待機状態を脱ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +Signal オブジェクトã¯ã€[New signal](#new-signal) コマンドã«ã‚ˆã£ã¦ä½œæˆã•れã¾ã™ã€‚ + + +### シグナルã®ä½¿ã„æ–¹ + +4D ã§ã¯ã€[`New signal`](#new-signal) コマンドを呼ã³å‡ºã™ã“ã¨ã§æ–°è¦ Signal オブジェクトを作æˆã—ã¾ã™ã€‚ 作æˆã—ãŸã‚·ã‚°ãƒŠãƒ«ã¯ã€`New process` ã‚ã‚‹ã„㯠`CALL WORKER` コマンドã«å¼•æ•°ã¨ã—ã¦æ¸¡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ãれã«ã‚ˆã‚Šã€ãƒ—ロセスやワーカーã¯ã‚¿ã‚¹ã‚¯ã‚’完了ã—ãŸéš›ã«ã‚·ã‚°ãƒŠãƒ«ã‚’æ›¸ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- `signal.wait()` ã¯ã€ä»–ã®ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã®ã‚¿ã‚¹ã‚¯ãŒå®Œäº†ã™ã‚‹ã¾ã§å¾…機ã™ã‚‹ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã‹ã‚‰å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ +- `signal.trigger()` ã¯ã€ä»–ã®ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスを待機状態ã‹ã‚‰è§£æ”¾ã™ã‚‹ãŸã‚ã«ã€ã‚¿ã‚¹ã‚¯å®Ÿè¡Œã‚’終ãˆãŸãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスãŒå‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +![](assets/en/API/signal.png) + +`signal.trigger()` ã®å‘¼ã³å‡ºã—ã«ã‚ˆã£ã¦è§£æ”¾ã•れãŸã‚·ã‚°ãƒŠãƒ«ã¯ ã€å†åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 別ã®ã‚·ã‚°ãƒŠãƒ«ã‚’設定ã™ã‚‹ã«ã¯ã€`New signal` コマンドをã‚らãŸã‚ã¦å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + +Signal オブジェクト㯠[共有オブジェクト](Concepts/shared.md) ã§ã‚ã‚‹ãŸã‚ã€å‘¼ã³å‡ºã•れãŸãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã‹ã‚‰çµæžœã‚’è¿”ã™ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€`Use...End use` 構文内ã§å€¤ã‚’書ã込む必è¦ãŒã‚りã¾ã™ã€‚ + +### 例題 + +```4d + var $signal : 4D.Signal + + // シグナルを作æˆã—ã¾ã™ + $signal:=New signal + + // メインプロセスを呼ã³å‡ºã—ã€OpenForm メソッドを実行ã—ã¾ã™ + CALL WORKER(1;"OpenForm";$signal) + // ä»–ã®è¨ˆç®—ã‚’ã—ã¾ã™ + ... + // プロセスã®çµ‚了を待機ã—ã¾ã™ + $signaled:=$signal.wait() + + // çµæžœã‚’処ç†ã—ã¾ã™ + $calc:=$signal.result+... +``` + +***OpenForm*** メソッド: + +```4d + #DECLARE ($signal : 4D.Signal) + var $form : Object + $form:=New object("value";0) + + // フォームを開ãã¾ã™ + $win:=Open form window("Information";Movable form dialog box) + DIALOG("Information";$form) + CLOSE WINDOW($win) + + // $signal å…±æœ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ–°ã—ã„属性を追加ã™ã‚‹ã“ã¨ã§ã€ä»–ã®ãƒ—ロセスã«è¿”り値をå—ã‘æ¸¡ã—ã¾ã™: + Use($signal) + $signal.result:=$form.value + End use + + // 待機プロセスã«å‘ã‘ã¦ã‚·ã‚°ãƒŠãƒ«ã‚’トリガーã—ã¾ã™ + $signal.trigger() +``` + +### æ¦‚è¦ + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.description** : Text](#description)

            contains a custom description for the `Signal` object. | +| [**.signaled** : Boolean](#signaled)

            contains the current state of the `Signal` object | +| [**.trigger( )**](#trigger)

            sets the `signaled` property of the signal object to **true** | +| [**.wait**( { *timeout* : Real } ) : Boolean ](#wait)

            makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire | + + + + +## New signal + + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**New signal** { ( *description* : Text ) } : 4D.Signal +| 引数 | タイプ | | 説明 | +| ----------- | --------- |:--:| -------------------- | +| description | テキスト | -> | シグナルã®è©³ç´° | +| 戻り値 | 4D.Signal | <- | シグナルを格ç´ã™ã‚‹ãƒã‚¤ãƒ†ã‚£ãƒ–オブジェクト | + + +#### 説明 + +The `New signal` command creates a `4D.Signal` object. + +シグナルã¯ã€ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã‹ã‚‰ä»–ã®ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã¸ã¨å¼•æ•°ã®ã‚ˆã†ã«æ¸¡ã›ã‚‹å…±æœ‰ã‚ªãƒ–ジェクトã§ã™ã€‚ãã®ãŸã‚ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™: + +* 呼ã³å‡ºã•れãŸãƒ¯ãƒ¼ã‚«ãƒ¼/プロセスã¯ç‰¹å®šã®å‡¦ç†ãŒå®Œäº†ã—ãŸå¾Œã« Signal オブジェクトを更新ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* 呼ã³å‡ºã—å…ƒã®ãƒ¯ãƒ¼ã‚«ãƒ¼/プロセス㯠CPUリソースを消費ã™ã‚‹ã“ã¨ãªãã€å®Ÿè¡Œã‚’åœæ­¢ã—ã¦ã‚·ã‚°ãƒŠãƒ«ãŒæ›´æ–°ã•れるã¾ã§å¾…ã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»»æ„ã§ *description* 引数ã«ã€ã‚·ã‚°ãƒŠãƒ«ã®è©³ç´°ã‚’説明ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒ†ã‚­ã‚¹ãƒˆã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ テキストã¯ã€ã‚·ã‚°ãƒŠãƒ«ã®ä½œæˆå¾Œã«å®šç¾©ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +Signal オブジェクトã¯å…±æœ‰ã‚ªãƒ–ジェクトã®ãŸã‚ã€`Use...End use` 構文を使用ã™ã‚‹ã“ã¨ã§ã€[`.description`](#description) プロパティã®ã»ã‹ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‹¬è‡ªã®ãƒ—ロパティを管ç†ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + +**戻り値** + +æ–°è¦ã® [`4D.Signal` オブジェクト](#signal-object)。 + +#### 例題 + +以下ã¯ã€ã‚·ã‚°ãƒŠãƒ«ã‚’設定ã™ã‚‹ãƒ¯ãƒ¼ã‚«ãƒ¼ã®å…¸åž‹çš„ãªä¾‹ã§ã™: + +```4d + var $signal : 4D.Signal + $signal:=New signal("This is my first signal") + + CALL WORKER("myworker";"doSomething";$signal) + $signaled:=$signal.wait(1) // 最大ã§1秒待機ã—ã¾ã™ + + If($signaled) + ALERT("myworker ã¯ã‚¿ã‚¹ã‚¯ã‚’終了ã—ã¾ã—ãŸã€‚ çµæžœ: "+$signal.myresult) + Else + ALERT("myworker 㯠1秒以内ã«ã‚¿ã‚¹ã‚¯ã‚’終了ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚") + End if +``` + + +以下ã¯ã€***doSomething*** メソッドã®ä¸€ä¾‹ã§ã™: + +```4d + #DECLARE ($signal : 4D.Signal) + // 何らã‹ã®å‡¦ç† + //... + Use($signal) + $signal.myresult:=$processingResult // çµæžœã‚’è¿”ã—ã¾ã™ + End use + $signal.trigger() // 処ç†ãŒå®Œäº†ã—ã¾ã—㟠+``` + + + +## .description + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.description** : Text +#### 説明 + +The `.description` property contains a custom description for the `Signal` object.. + +`.description` ã¯ã€Signal オブジェクトã®ä½œæˆæ™‚ã€ã‚ã‚‹ã„ã¯ãã®ä»–ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã§ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã ã—ã€`Signal` オブジェクトã¯å…±æœ‰ã‚ªãƒ–ジェクトã§ã‚ã‚‹ãŸã‚ã€`.description` ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã«æ›¸ã込む際ã«ã¯å¿…ãš `Use...End use` 構文を使ã‚ãªãã¦ã¯ãªã‚‰ãªã„点ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ + +**èª­ã¿æ›¸ãå¯èƒ½** プロパティã§ã™ã€‚ + + + + +## .signaled + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | + +
        + +**.signaled** : Boolean +#### 説明 + +The `.signaled` property contains the current state of the `Signal` object. Signal オブジェクトãŒä½œæˆã•ã‚ŒãŸæ™‚点ã§ã¯ã€`.signaled` 㯠**false** ã§ã™ã€‚ Signal オブジェクトã«å¯¾ã—㦠`.trigger()` ãŒå‘¼ã³å‡ºã•ã‚ŒãŸæ™‚ã« **true** ã¨ãªã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + + +## .trigger() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.trigger( )** +| 引数 | タイプ | | 説明 | +| -- | --- |::| ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + +#### 説明 + +The `.trigger( )` function sets the `signaled` property of the signal object to **true** and awakens all workers or processes waiting for this signal. + +Signal ãŒã™ã§ã«ã‚·ã‚°ãƒŠãƒ«ã•れã¦ã„ã‚‹ (ã¤ã¾ã‚Š `signaled` プロパティ㌠**true** ã«ãªã£ã¦ã„ã‚‹) 状態ã§ã‚ã£ãŸå ´åˆã€ã“ã®é–¢æ•°ã¯ä½•ã‚‚ã—ã¾ã›ã‚“。 + + + + +## .wait() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.wait**( { *timeout* : Real } ) : Boolean +| 引数 | タイプ | | 説明 | +| ------- | --- | -- | -------------------- | +| timeout | 実数 | -> | ã‚·ã‚°ãƒŠãƒ«ã®æœ€å¤§å¾…機時間 (ç§’å˜ä½) | +| 戻り値 | ブール | <- | `.signaled` プロパティã®çŠ¶æ…‹ | + + +#### 説明 + +The `.wait( )` function makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire. + +コード実行ã®ãƒ–ロックを防ããŸã‚ã€*timeout* 引数を使用ã—ã¦æœ€é•·å¾…機時間を秒å˜ä½ã§æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™(å°æ•°ã‚’使用ã§ãã¾ã™)。 +> **警告**: *timeout* 引数を渡ã•ãšã« `.wait()` ã‚’ 4D ã®ãƒ¡ã‚¤ãƒ³ãƒ—ロセスã§å‘¼ã³å‡ºã™ã“ã¨ã¯æŽ¨å¥¨ã•れã¦ã„ã¾ã›ã‚“。最悪ã®å ´åˆ 4Dアプリケーション全体ãŒãƒ•リーズã—ã¦ã—ã¾ã†æã‚ŒãŒã‚りã¾ã™ã€‚ + +Signal ãŒã™ã§ã«ã‚·ã‚°ãƒŠãƒ«ã•れã¦ã„ã‚‹ (ã¤ã¾ã‚Š `signaled` プロパティ㌠**true** ã«ãªã£ã¦ã„ã‚‹) 状態ã§ã‚ã£ãŸå ´åˆã€ã“ã®é–¢æ•°ã¯å³åº§ã«æˆ»ã‚Šå€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +ã“ã®é–¢æ•°ã¯ `.signaled` プロパティã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®å€¤ã‚’評価ã™ã‚‹ã“ã¨ã§ã€å¾…機ãŒçµ‚了ã—ãŸã®ã¯ `.trigger()` ãŒå‘¼ã³å‡ºã•れãŸãŸã‚ã‹ (`.signaled` プロパティ㯠**true**)ã€ãれã¨ã‚‚タイムアウト時間ãŒçµŒéŽã—ãŸãŸã‚ã‹ (`.signaled` プロパティ㯠**false**) を知るã“ã¨ãŒã§ãã¾ã™ã€‚ +> Signal オブジェクトを待機ã—ã¦ã„るプロセスã®çŠ¶æ…‹ã¯ `Waiting for internal flag` ã§ã™ã€‚ + + + + diff --git a/website/translated_docs/ja/API/Transporter.md b/website/translated_docs/ja/API/Transporter.md new file mode 100644 index 00000000000000..9e75893f3cb665 --- /dev/null +++ b/website/translated_docs/ja/API/Transporter.md @@ -0,0 +1,347 @@ +--- +id: Transporter +title: Transporter クラス +--- + +## 説明 + + +## .acceptUnsecureConnection + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.acceptUnsecureConnection** : Boolean + +#### 説明 + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +æš—å·åŒ–ã•れã¦ã„ãªã„接続ãŒè¨±å¯ã•れã¦ã„ãªã„å ´åˆã«ã¯ **false** ãŒæ ¼ç´ã•れã¦ãŠã‚Šã€ãã®å ´åˆã«æš—å·åŒ–ã•ã‚ŒãŸæŽ¥ç¶šãŒä¸å¯èƒ½ãªå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +使用å¯èƒ½ãªã‚»ã‚­ãƒ¥ã‚¢ãªãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- SMTP + - 465: SMTPS + - 587 ã¾ãŸã¯ 25: STARTTLS アップグレードãŒã•れ㟠SMTP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- IMAP + - 143: IMAP éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 993: STARTTLS アップグレードãŒã•れ㟠IMAP (サーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„れã°) + +- POP3 + - 110: POP3 éžæš—å·åŒ–ãƒãƒ¼ãƒˆ + - 995: POP3 with STARTTLS upgrade if supported by the server. + +--- + + ## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.authenticationMode** : Text +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `IMAP authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `IMAP authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `IMAP authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + +--- + + ## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + + +**.authenticationMode** : Text + +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------------- | +| APOP | `POP3 authentication APOP` | APOP プロトコルを使用ã—ãŸèªè¨¼ (POP3 ã®ã¿) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `POP3 authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `POP3 authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `POP3 authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + +--- + + ## .authenticationMode + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + + +**.authenticationMode** : Text + +#### 説明 + +`.authenticationMode` プロパティã¯ã€ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã®ã«ä½¿ç”¨ã•れるèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最も安全ãªãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +| 値 | 定数 | 説明 | +| -------- | ------------------------------ | --------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | CRAM-MD5 プロトコルを使用ã—ãŸèªè¨¼ | +| LOGIN | `SMTP authentication login` | LOGIN プロトコルを使用ã—ãŸèªè¨¼ | +| OAUTH2 | `SMTP authentication OAUTH2` | OAuth2 プロトコルを使用ã—ãŸèªè¨¼ | +| PLAIN | `SMTP authentication plain` | PLAIN プロトコルを使用ã—ãŸèªè¨¼ | + + +--- + +## .bodyCharset + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ----------------- | +| v18 | UTF8 base64 をサãƒãƒ¼ãƒˆ | +| v17 R5 | 追加 | +
        + +**.bodyCharset** : Text + +#### 説明 + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* ä»¶å +* 添付ファイルå +* メールå + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| 定数 | 値 | 説明 | +| ------------------------ | ------------------------------ | -------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
        • *headerCharset*: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        | +| mail mode ISO88591 | ISO-8859-1 |
        • *headerCharset*: ISO-8859-1 & Quoted-printable
        • *bodyCharset*: ISO-8859-1 & 8-bit
        | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (**デフォルト値**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64 | + + +--- + + +## .connectionTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.connectionTimeOut** : Integer + + +#### 説明 + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる `server` オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã®ãƒ‡ãƒ•ォルト㯠30 ã§ã™ã€‚ + + + +--- + +## .headerCharset + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.headerCharset** : Text + +#### 説明 + +The `.headerCharset` property contains the charset and encoding used for the email header. ヘッダーã«ã¯ãƒ¡ãƒ¼ãƒ«ã®æ¬¡ã®è¦ç´ ã‚’å«ã¿ã¾ã™: + +* ä»¶å +* 添付ファイルå +* メールå + +**ã¨ã‚Šã†ã‚‹å€¤:** + +| 定数 | 値 | 説明 | +| ------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
        • *headerCharset*: å¯èƒ½ãªã‚‰ US-ASCII ã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & Quoted-printable ã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        • *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€æ¬¡ã«å¯èƒ½ãªã‚‰ Japanese (ISO-2022-JP) & 7-bitã€ãれもä¸å¯ãªã‚‰ UTF-8 & Quoted-printable
        | +| mail mode ISO88591 | ISO-8859-1 |
        • *headerCharset*: ISO-8859-1 & Quoted-printable
        • *bodyCharset*: ISO-8859-1 & 8-bit
        | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: å¯èƒ½ãªã‚‰ US-ASCIIã€ãれãŒä¸å¯ãªã‚‰ UTF-8 & Quoted-printable (デフォルト値) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: å¯èƒ½ãªå ´åˆã¯ US-ASCIIã€ãれ以外㯠UTF-8 & base64 | + + +--- + + +## .host + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.host** : Text + +#### 説明 + +The `.host` property contains the name or the IP address of the host server. ã“ã®æƒ…å ±ã¯ãƒ¡ãƒ¼ãƒ«é€šä¿¡ (SMTPã€POP3ã€IMAP) ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + +--- + +## .logFile + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R5 | 追加 | +
        + +**.logFile** : Text + +#### 説明 + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. パスã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆ Logs フォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã€ã‚ã‚‹ã„ã¯çµ¶å¯¾ãƒ‘スを指定ã§ãã¾ã™ã€‚ + +`SET DATABASE PARAMETER` ã‚³ãƒžãƒ³ãƒ‰ã§æœ‰åŠ¹åŒ–ã•れる通常ã®ãƒ­ã‚°ãƒ•ァイルã¨ã¯ç•°ãªã‚Šã€æ‹¡å¼µãƒ­ã‚°ãƒ•ァイルã¯ã™ã¹ã¦ã®é€ä¿¡ã•れãŸãƒ¡ãƒ¼ãƒ«ã® MIMEコンテンツをä¿å­˜ã—ã€ã‚µã‚¤ã‚ºåˆ¶é™ãŒã‚りã¾ã›ã‚“。 拡張ログファイルã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ã®ç« ã‚’ãれãžã‚Œå‚ç…§ãã ã•ã„: + +* **SMTP 接続** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 接続** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP 接続** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + +--- + +## .port + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.port** : Integer + +#### 説明 + +The `.port` property contains the port number used for mail transactions. `SMTP New transporter` ã‚„ `POP3 New transporter`〠`IMAP New transporter` ã®ã‚³ãƒžãƒ³ãƒ‰ã§ `transporter` オブジェクトを作æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れる *server* オブジェクトã«ãŠã„ã¦ã€ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れるãƒãƒ¼ãƒˆã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + +--- + + +## .sendTimeOut + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.sendTimeOut** : Integer + +#### 説明 +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. `.sendTimeOut` プロパティ㌠`server` オブジェクトã«ã‚ˆã£ã¦è¨­å®šã•れã¦ã„ãªã„å ´åˆã¯ã€ãƒ‡ãƒ•ォルト㧠100 ã¨ã„ã†å€¤ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + + +--- + + +## .user + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.user** : Text + +#### 説明 +The `.user` property contains the user name used for authentication on the mail server. + + +--- + +## .checkConnection() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v17 R4 | 追加 | +
        + +**.checkConnection()** : Object +| 引数 | タイプ | | 説明 | +| --- | ------ |:--:| -------------------------- | +| 戻り値 | オブジェクト | <- | transporter オブジェクト接続ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +#### 説明 + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. ã“ã®é–¢æ•°ã‚’使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰æä¾›ã•れãŸå€¤ãŒæœ‰åйã‹ã©ã†ã‹ã‚’検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +ã“ã®é–¢æ•°ã¯ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã€ãƒ¡ãƒ¼ãƒ«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ---------- | ------------------------ | ---------- | ------------------------------------------------- | +| success | | boolean | ãƒã‚§ãƒƒã‚¯ãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| status | | number | (SMTPã®ã¿) メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚³ãƒ¼ãƒ‰ (メール処ç†ã«é–¢ä¿‚ãªã„å•題ã®å ´åˆã«ã¯ 0) | +| statusText | | text | メールサーãƒãƒ¼ã‹ã‚‰è¿”ã•れãŸã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã€ã¾ãŸã¯ 4Dエラースタック内ã«è¿”ã•ã‚ŒãŸæœ€å¾Œã®ã‚¨ãƒ©ãƒ¼ | +| errors | | collection | 4Dエラースタック (メールサーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒå—ä¿¡ã§ããŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[ ].errCode | number | 4Dエラーコード | +| | \[ ].message | text | 4Dエラーã®è©³ç´° | +| | \[ ].componentSignature | text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | + + + + + + diff --git a/website/translated_docs/ja/API/WebServerClass.md b/website/translated_docs/ja/API/WebServerClass.md new file mode 100644 index 00000000000000..02e67ccbf34a3a --- /dev/null +++ b/website/translated_docs/ja/API/WebServerClass.md @@ -0,0 +1,707 @@ +--- +id: WebServerClass +title: WebServer +--- + + +`WebServer` クラス API を使ã£ã¦ã€ãƒ¡ã‚¤ãƒ³ (ホスト) アプリケーションãŠã‚ˆã³ã€å„コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã‚’開始・モニターã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([Webサーãƒãƒ¼ã‚ªãƒ–ジェクト](WebServer/webServerObject.md) å‚ç…§)。 ã“ã®ã‚¯ãƒ©ã‚¹ã¯ `4D` クラスストアよりæä¾›ã•れã¾ã™ã€‚ + + + +### Webサーãƒãƒ¼ã‚ªãƒ–ジェクト + +Webサーãƒãƒ¼ã‚ªãƒ–ジェクト㯠[`WEB Server`](#web-server) コマンドã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ + +ã“れらã¯ã€æ¬¡ã®ãƒ—ロパティや関数をæŒã¡ã¾ã™: + + +### æ¦‚è¦ +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.accessKeyDefined** : Boolean](#accesskeydefined)

            true if an access key is defined in the settings of the web server | +| [**.certificateFolder** : Text](#certificatefolder)

            folder where the certificate files are located | +| [**.characterSet** : Number
        **.characterSet** : Text](#characterset)

            character set that the 4D Web Server should use to communicate with browsers connecting to the application | +| [**.cipherSuite** : Text](#ciphersuite)

            cipher list used for the secure protocol | +| [**.CORSEnabled** : Boolean](#corsenabled)

            CORS (*Cross-origin resource sharing*) service status for the web server | +| [**.CORSSettings** : Collection](#corssettings)

            list of allowed hosts and methods for the CORS service | +| [**.debugLog** : Number](#debuglog)

            status of the HTTP request log file | +| [**.defaultHomepage** : Text](#defaulthomepage)

            name of the default home page | +| [**.HSTSEnabled** : Boolean](#hstsenabled)

            HTTP Strict Transport Security (HSTS) status | +| [**.HSTSMaxAge** : Number](#hstsmaxage)

            maximum length of time (in seconds) that HSTS is active for each new client connection | +| [**.HTTPCompressionLevel** : Number](#httpcompressionlevel)

            compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies) | +| [**.HTTPCompressionThreshold** : Number](#httpcompressionthreshold)

            size threshold (bytes) for requests below which exchanges should not be compressed | +| [**.HTTPEnabled** : Boolean](#httpenabled)

            HTTP protocol state | +| [**.HTTPPort** : Number](#httpport)

            listening IP port number for HTTP | +| [**.HTTPTrace** : Boolean](#httptrace)

            activation of `HTTP TRACE` | +| [**.HTTPSEnabled** : Boolean](#httpsenabled)

            HTTPS protocol state | +| [**.HTTPSPort** : Number](#httpsport)

            listening IP port number for HTTPS | +| [**.inactiveProcessTimeout** : Number](#inactiveprocesstimeout)

            life duration (in minutes) of the inactive legacy session processes | +| [**.inactiveSessionTimeout** : Number](#inactivesessiontimeout)

            life duration (in minutes) of inactive legacy sessions (duration set in cookie) | +| [**.IPAddressToListen** : Text](#ipaddresstolisten)

            IP address on which the 4D Web Server will receive HTTP requests | +| [**.isRunning** : Boolean](#isrunning)

            web server running state | +| [**.keepSession** : Boolean](#keepsession)

            True if legacy sessions are enabled in the web server, False otherwise | +| [**.logRecording** : Number](#logrecording)

            log requests (logweb.txt) recording value | +| [**.maxConcurrentProcesses** : Number](#maxconcurrentprocesses)

            maximum number of concurrent web processes supported by the web server | +| [**.maxRequestSize** : Number](#maxrequestsize)

            maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process | +| [**.maxSessions** : Number](#maxsessions)

            maximum number of simultaneous legacy sessions | +| [**.minTLSVersion** : Number](#mintlsversion)

            minimum TLS version accepted for connections | +| [**.name** : Text](#name)

            name of the web server application | +| [**.openSSLVersion** : Text](#opensslversion)

            version of the OpenSSL library used | +| [**.perfectForwardSecrecy** : Boolean](#perfectforwardsecrecy)

            PFS availability on the server | +| [**.rootFolder** : Text](#rootfolder)

            path of web server root folder | +| [**.scalableSession** : Boolean](#scalablesession)

            True if scalable sessions are used in the web server, and False otherwise | + + +[**.sessionCookieDomain** : Text](#sessioncookiedomain)

            "domain" field of the session cookie| |[**.sessionCookieName** : Text](#sessioncookiename)

            name of the cookie used for storing the session ID| |[**.sessionCookiePath** : Text](#sessioncookiepath)

            "path" field of the session cookie| |[**.sessionCookieSameSite** : Text](#sessioncookiesamesite)

            "SameSite" session cookie value| |[**.sessionIPAddressValidation** : Boolean](#sessionipaddressvalidation)

            IP address validation for session cookies| |[ **.start**() : Object
        **.start**( *settings* : Object ) : Object](#start)

            starts the web server on which it is applied| |[**.stop()** ](#stop)

            stops the web server on which it is applied| + + + +## WEB Server + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ---------------------------- | +| v18 R3 | 追加 | +| v19 | .sessionCookieSameSite をサãƒãƒ¼ãƒˆ | + +
        + +**WEB Server** : 4D.WebServer
        **WEB Server**( *option* : Integer ) : 4D.WebServer + + +| 引数 | タイプ | | 説明 | +| ----- | ------------ | -- | ------------------------------------------------ | +| オプション | Integer | -> | å–å¾—ã™ã‚‹ Webサーãƒãƒ¼ (çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト = `Web server database`) | +| 戻り値 | 4D.WebServer | <- | WebServer オブジェクト | + + +The `WEB Server` command returns the default Web server object, or the Web server object defined through the *option* parameter. + +*option*ãŒçœç•¥ã•れãŸå ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® Webサーãƒãƒ¼ (デフォルトWebサーãƒãƒ¼) ã¸ã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ å–å¾—ã™ã‚‹ Webサーãƒãƒ¼ã‚’指定ã™ã‚‹ã«ã¯ã€*option* ã«ä»¥ä¸‹ã®å®šæ•°ã®ã„ãšã‚Œã‹ä¸€ã¤ã‚’渡ã—ã¦ãã ã•ã„: + +| 定数 | 値 | 説明 | +| ------------------------------ | - | ---------------------------------- | +| `Web server database` | 1 | カレントデータベース㮠Webサーãƒãƒ¼( çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト) | +| `Web server host database` | 2 | コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® Webサーãƒãƒ¼ | +| `Web server receiving request` | 3 | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ (ターゲットWebサーãƒãƒ¼) | + +è¿”ã•れる Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã«ã¯ã€Webサーãƒãƒ¼ãƒ—ロパティã®ã‚«ãƒ¬ãƒ³ãƒˆå€¤ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ + +#### 例題 + +コンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã‹ã‚‰ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® Webサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™: + +```4d + // コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¡ã‚½ãƒƒãƒ‰ + var $hostWS : 4D.WebServer + $hostWS:=WEB Server(Web server host database) + If($hostWS.isRunning) + ... + End if +``` + +## WEB Server list + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | +
        + +**WEB Server list** : Collection + + +| 引数 | タイプ | | 説明 | +| --- | ---------- | -- | -------------------------- | +| 戻り値 | Collection | <- | 利用å¯èƒ½ãª Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | + + +The `WEB Server list` command returns a collection of all Web server objects available in the 4D application. + +4Dアプリケーションã¯ä¸€ã¤ä»¥ä¸Šã® Webサーãƒãƒ¼ã‚’æŒã¤ã“ã¨ãŒå¯èƒ½ã§ã™: + +- ホストデータベース㮠Webサーãƒãƒ¼ã‚’1㤠(デフォルトWebサーãƒãƒ¼) +- コンãƒãƒ¼ãƒãƒ³ãƒˆæ¯Žã® Webサーãƒãƒ¼å„1㤠+ +サーãƒãƒ¼ãŒå®Ÿéš›ã«å®Ÿè¡Œä¸­ã‹å¦ã‹ã«é–¢ã‚らãšã€`WEB Server list` コマンドã¯åˆ©ç”¨å¯èƒ½ãª Webサーãƒãƒ¼ã‚’ã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ + +> デフォルト㮠Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã¯ã€4D 起動時ã«è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ ãã®ä¸€æ–¹ã§ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã¯ã€[`WEB Server`](#web-server) コマンドã«ã‚ˆã£ã¦ãれãžã‚Œã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +Webサーãƒã‚ªãƒ–ジェクト㮠[.name](#name) プロパティを使用ã™ã‚‹ã“ã¨ã§ã€ãƒªã‚¹ãƒˆå†…ã®å„ Webサーãƒãƒ¼ã‚ªãƒ–ジェクトãŒé–¢é€£ã¥ã‘られã¦ã„るデータベースã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’識別ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### 例題 + +利用å¯èƒ½ãª Webサーãƒãƒ¼ã®ã†ã¡ã„ãã¤ãŒå®Ÿè¡Œä¸­ã‹ã‚’調ã¹ã¾ã™: + +```4d + var $wSList : Collection + var $vRun : Integer + + $wSList:=WEB Server list + $vRun:=$wSList.countValues(True;"isRunning") + ALERT("利用å¯èƒ½ Webサーãƒãƒ¼ "+String($wSList.length)+" ã¤ä¸­ã€"+String($vRun)+" ã¤ã® Webサーãƒãƒ¼ãŒå®Ÿè¡Œä¸­ã§ã™ã€‚") + +``` + + + + +## .accessKeyDefined + + +**.accessKeyDefined** : Boolean + +The **.accessKeyDefined** property contains true if an access key is defined in the settings of the web server. ã“ã®ãƒ—ロパティ㯠WebAdmin Webサーãƒãƒ¼ã«ã‚ˆã£ã¦ã€ç®¡ç†ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã‚’有効化ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + + +## .certificateFolder + + + +**.certificateFolder** : Text + +Path of the folder where the certificate files are located. パスã¯ã€ãƒ•ァイルシステムを使用ã—㟠POSIXフルパスã®å½¢å¼ã§ã™ã€‚ [`.start()`](#start) é–¢æ•°ã«æ¸¡ã™ `settings` 引数内ã§ã“ã®ãƒ—ロパティを使用ã™ã‚‹å ´åˆã€[`Folder` オブジェクト](FolderClass.md) も使用å¯èƒ½ã§ã™ã€‚ + + + + +## .characterSet + + +**.characterSet** : Number
        **.characterSet** : Text + +The character set that the 4D Web Server should use to communicate with browsers connecting to the application. デフォルト値㯠OS ã®è¨€èªžã«ä¾å­˜ã—ã¾ã™ã€‚ 値ã«ã¯ã€MIBenum æ•´æ•°ã‚„åç§°ã®æ–‡å­—列ã€[IANA](http://www.iana.org/assignments/character-sets/character-sets.xhtml) ãŒå®šç¾©ã™ã‚‹è­˜åˆ¥å­ã‚’使用ã§ãã¾ã™ã€‚ 以下ã¯ã€4D Webサーãƒãƒ¼ãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„る文字セットã«å¯¾å¿œã™ã‚‹è­˜åˆ¥å­ã®ãƒªã‚¹ãƒˆã§ã™: + +* 4 = ISO-8859-1 +* 12 = ISO-8859-9 +* 13 = ISO-8859-10 +* 17 = Shift-JIS +* 2024 = Windows-31J +* 2026 = Big5 +* 38 = euc-kr +* 106 = UTF-8 +* 2250 = Windows-1250 +* 2251 = Windows-1251 +* 2253 = Windows-1253 +* 2255 = Windows-1255 +* 2256 = Windows-1256 + + + + +## .cipherSuite + + +**.cipherSuite** : Text + +The cipher list used for the secure protocol. ã“れã¯ã€4D Webサーãƒãƒ¼ãŒå®Ÿè£…ã™ã‚‹æš—å·åŒ–アルゴリズムã®å„ªå…ˆé †ä½ã‚’設定ã—ã¾ã™ã€‚ ã‚³ãƒ­ãƒ³åŒºåˆ‡ã‚Šã®æ–‡å­—列ã¨ã—ã¦è¨­å®šã§ãã¾ã™ (例: "ECDHE-RSA-AES128-...")。 詳細㯠Open SSL サイト㮠[ciphers ページ](https://www.openssl.org/docs/manmaster/man1/ciphers.html) ã‚’å‚ç…§ãã ã•ã„。 + + + + + +## .CORSEnabled + +**.CORSEnabled** : Boolean + +The CORS (*Cross-origin resource sharing*) service status for the web server. セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€"ドメイン間" ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ãƒ–ラウザーレベルã§ãƒ‡ãƒ•ォルトã§ç¦æ­¢ã•れã¦ã„ã¾ã™ã€‚ 有効化ã•れã¦ã„ã‚‹å ´åˆ (true)ã€ãƒ‰ãƒ¡ã‚¤ãƒ³å¤– Webページã‹ã‚‰ã® XHRコール (RESTリクエストãªã©) をアプリケーションã«ãŠã„ã¦è¨±å¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (CORSドメインリストã«è¨±å¯ã•れãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚後述㮠`CORSSettings` å‚ç…§)。 無効化ã•れã¦ã„ã‚‹å ´åˆ (falseã€ãƒ‡ãƒ•ォルト) ã«ã¯ã€CORS ã§é€ä¿¡ã•れãŸã‚µã‚¤ãƒˆé–“リクエストã¯ã™ã¹ã¦ç„¡è¦–ã•れã¾ã™ã€‚ 有効時 (true) ã«ã€è¨±å¯ã•れã¦ã„ãªã„ドメインやメソッドãŒã‚µã‚¤ãƒˆé–“リクエストをé€ä¿¡ã—ãŸå ´åˆã€"403 - forbidden" エラーレスãƒãƒ³ã‚¹ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ + +デフォルト: false (無効) + +CORS ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€Wikipedia ã®[Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) ページをå‚ç…§ãã ã•ã„。 + + + + +## .CORSSettings + + +**.CORSSettings** : Collection + +A list of allowed hosts and methods for the CORS service (see [`CORSEnabled`](#corsenabled) property). å„オブジェクトã¯å¿…ãš **host** プロパティを格ç´ã—ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。**methods** プロパティã¯ä»»æ„ã§ã™ã€‚ + +* **host** (テキストã€å¿…é ˆ): CORS を介ã—ãŸã‚µãƒ¼ãƒãƒ¼ã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆé€ä¿¡ãŒè¨±å¯ã•れã¦ã„る外部ページã®ãƒ‰ãƒ¡ã‚¤ãƒ³åã¾ãŸã¯ IPアドレス。 複数ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’追加ã—ã¦ãƒ›ãƒ¯ã‚¤ãƒˆãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ *host* ãŒå­˜åœ¨ã—ãªã„ã€ã¾ãŸã¯ç©ºã®å ´åˆã€å½“該オブジェクトã¯ç„¡è¦–ã•れã¾ã™ã€‚ 複数ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + - 192.168.5.17:8081 + - 192.168.5.17 + - 192.168.* + - 192.168.*:8081 + - http://192.168.5.17:8081 + - http://*.myDomain.com + - http://myProject.myDomain.com + - *.myDomain.com + - myProject.myDomain.com + - \* + +* **methods** (テキストã€ä»»æ„): 対応ã™ã‚‹ CORSホストã«å¯¾ã—ã¦è¨±å¯ã™ã‚‹ HTTPメソッド。 メソッドåã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³åŒºåˆ‡ã‚Šã§æŒ‡å®šã—ã¾ã™(例: "post;get")。 *methods* ãŒç©ºã€nullã€ã‚ã‚‹ã„㯠undefined ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒè¨±å¯ã•れã¾ã™ã€‚ + + + + +## .debugLog + + +**.debugLog** : Number + +The status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). + +* 0 = 無効 +* 1 = 有効ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆæœ¬æ–‡ãªã— (本文サイズã‚り) +* 3 = 有効ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®æœ¬æ–‡ã®ã¿ +* 5 = 有効ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ¬æ–‡ã®ã¿ +* 7 = 有効ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŠã‚ˆã³ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®æœ¬æ–‡ã‚り + + + + +## .defaultHomepage + + +**.defaultHomepage** : Text + +The name of the default home page or "" to not send the custom home page. + + + + +## .HSTSEnabled + +**.HSTSEnabled** : Boolean + +The HTTP Strict Transport Security (HSTS) status. HSTS ã«ã‚ˆã£ã¦ã€Webサーãƒãƒ¼ã¯ãƒ–ラウザーã«å¯¾ã—ã€ã‚»ã‚­ãƒ¥ã‚¢ãª HTTPS接続ã®ã¿ã‚’許å¯ã™ã‚‹ã¨å®£è¨€ã§ãã¾ã™ã€‚ Webサーãƒãƒ¼ã‹ã‚‰ã®åˆå›žãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’å—ã‘å–ã£ãŸéš›ã«ãƒ–ラウザー㯠HSTS情報を記録ã—ã€ä»¥é™ã® HTTPリクエストã¯è‡ªå‹•的㫠HTTPSリクエストã«å¤‰æ›ã•れã¾ã™ã€‚ ブラウザーå´ã§ã“ã®æƒ…å ±ãŒä¿å­˜ã•れる時間㯠`HSTSMaxAge` プロパティã«ã‚ˆã£ã¦æŒ‡å®šã•れã¾ã™ã€‚ HSTS ã®ãŸã‚ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ HTTPS ãŒæœ‰åйã«ãªã£ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã¾ãŸã€åˆå›žã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã‚’許å¯ã™ã‚‹ãŸã‚ã«ã€HTTP も有効ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + + +## .HSTSMaxAge + +**.HSTSMaxAge** : Number + +The maximum length of time (in seconds) that HSTS is active for each new client connection. ã“ã®æƒ…å ±ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§æŒ‡å®šã•ã‚ŒãŸæ™‚é–“ã®ã‚ã„ã ä¿å­˜ã•れã¾ã™ã€‚ + +デフォルト値: 63072000 (2å¹´)。 + + + + +## .HTTPCompressionLevel + +**.HTTPCompressionLevel** : Number + +The compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). ã“ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使ã£ã¦ã€å®Ÿè¡Œé€Ÿåº¦ã‚’優先ã™ã‚‹ã‹ (圧縮少)ã€ãれã¨ã‚‚圧縮レベルを優先ã™ã‚‹ã‹ (速度減) を指定ã—ã€é€šä¿¡ã‚’最é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +* 1 ã‹ã‚‰ 9 (1 ãŒä½Žåœ§ç¸®ã€9 ãŒé«˜åœ§ç¸®)。 +* -1 = 圧縮速度ã¨åœ§ç¸®çއã®å¦¥å”点を設定ã™ã‚‹ + +デフォルト = 1 (低圧縮)。 + + + + +## .HTTPCompressionThreshold + +**.HTTPCompressionThreshold** : Number + +The size threshold (bytes) for requests below which exchanges should not be compressed. ã“ã®è¨­å®šã¯ã€é€šä¿¡ã‚µã‚¤ã‚ºãŒå°ã•ã„å ´åˆã€åœ§ç¸®ã«å‡¦ç†æ™‚é–“ãŒè²»ã‚„ã•れるã®ã‚’é¿ã‘ã‚‹ã®ã«æœ‰ç”¨ã§ã™ã€‚ + +デフォルトã®ã—ãã„値 = 1024 ãƒã‚¤ãƒˆ + + + + +## .HTTPEnabled + + +**.HTTPEnabled** : Boolean + +The HTTP protocol state. + + + + + +## .HTTPPort + + +**.HTTPPort** : Number + +The listening IP port number for HTTP. + +デフォルト = 80 + + + + +## .HTTPTrace + +**.HTTPTrace** : Boolean + +The activation of `HTTP TRACE`. セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€Webサーãƒãƒ¼ã¯ãƒ‡ãƒ•ォルト㧠`HTTP TRACE` リクエストをエラー405 ã§æ‹’å¦ã—ã¾ã™ã€‚ 有効化ã•れã¦ã„ã‚‹å ´åˆã€`HTTP TRACE` リクエストã«å¯¾ã—㦠Webサーãƒãƒ¼ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆè¡Œã€ãƒ˜ãƒƒãƒ€ãƒ¼ã€ãŠã‚ˆã³æœ¬æ–‡ã‚’è¿”ã—ã¾ã™ã€‚ + + + + +## .HTTPSEnabled + + +**.HTTPSEnabled** : Boolean The HTTPS protocol state. + + + + +## .HTTPSPort + + +**.HTTPSPort** : Number The listening IP port number for HTTPS. + +デフォルト = 443 + + + + +## .inactiveProcessTimeout + +**.inactiveProcessTimeout** : Number +> [スケーラブルセッションモード](#scalablesession) ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 + +The life duration (in minutes) of the inactive legacy session processes. タイムアウト時間ãŒçµŒéŽã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ—ロセスを終了ã—ã¾ã™ã€‚ã™ã‚‹ã¨ã€`On Web Legacy Close Session` データベースメソッドãŒå‘¼ã³å‡ºã•ã‚Œã€æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯å‰Šé™¤ã•れã¾ã™ã€‚ + +デフォルト = 480 分 + + + + +## .inactiveSessionTimeout + +**.inactiveSessionTimeout** : Number +> [スケーラブルセッションモード](#scalablesession) ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 + +The life duration (in minutes) of inactive legacy sessions (duration set in cookie). タイムアウト時間ãŒçµŒéŽã™ã‚‹ã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³cookie ãŒç„¡åйã«ãªã‚Šã€HTTPクライアントã«ã‚ˆã£ã¦é€ä¿¡ã•れãªããªã‚Šã¾ã™ã€‚ + +デフォルト = 480 分 + + + + +## .IPAddressToListen + + +**.IPAddressToListen** : Text + +The IP address on which the 4D Web Server will receive HTTP requests. デフォルトã§ã¯ã€ç‰¹å®šã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¯å®šç¾©ã•れã¦ã„ã¾ã›ã‚“。 IPv6 ãŠã‚ˆã³ IPv4 文字列形å¼ã®ä¸¡æ–¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ + + + + + +## .isRunning + + +**.isRunning** : Boolean + +*読ã¿å–り専用プロパティ。* + +The web server running state. + + + + +## .keepSession + +**.keepSession** : Boolean + +True if legacy sessions are enabled in the web server, False otherwise. + +##### å‚ç…§: +[.scalableSession](#scalablesession) + + + + +## .logRecording + + +**.logRecording** : Number + +The log requests (logweb.txt) recording value. + +* 0 = 記録ã—ãªã„ (デフォルト) +* 1 = CLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ +* 2 = DLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ +* 3 = ELFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ +* 4 = WLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ + + + + +## .maxConcurrentProcesses + + +**.maxConcurrentProcesses** : Number + +The maximum number of concurrent web processes supported by the web server. ã“ã®æ•°å€¤ (マイナス1) ã«é”ã™ã‚‹ã¨ã€4D ã¯ãƒ—ロセスを作æˆã—ãªããªã‚Šã€æ–°è¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾ã—㦠HTTPステータス 503 - Service Unavailable ã‚’è¿”ã—ã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: 10 - 32000 + +デフォルト = 100 + + + + +## .maxRequestSize + + +**.maxRequestSize** : Number + +The maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process. 最大値 (2147483647) ã«è¨­å®šã—ãŸå ´åˆã€å®Ÿéš›ã«ã¯åˆ¶é™ç„¡ã—ã¨ã„ã†ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ 制é™ã‚’設ã‘ã‚‹ã“ã¨ã§ã€ã‚µã‚¤ã‚ºãŒéžå¸¸ã«å¤§ãã„リクエストã«ã‚ˆã£ã¦ Webサーãƒãƒ¼ãŒéŽè² è·çŠ¶æ…‹ã«é™¥ã‚‹ã“ã¨ã‚’防ãŽã¾ã™ã€‚ リクエストã®ã‚µã‚¤ã‚ºãŒåˆ¶é™ã«é”ã—ã¦ã„ã‚‹ã¨ã€Webサーãƒãƒ¼ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: 500000 - 2147483647 + + + + +## .maxSessions + +**.maxSessions** : Number +> [スケーラブルセッションモード](#scalablesession) ã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯è¿”ã•れã¾ã›ã‚“。 + +The maximum number of simultaneous legacy sessions. 制é™ã«é”ã™ã‚‹ã¨ã€Webサーãƒãƒ¼ãŒæ–°è¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã¨ãã«ã€ä¸€ç•ªå¤ã„æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ (`On Web Legacy Close Session` データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™)。 æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®åŒæ™‚セッション数ã¯ã€Webプロセスã®åˆè¨ˆå€¤ã‚’è¶…ãˆã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (`maxConcurrentProcesses` プロパティã€ãƒ‡ãƒ•ォルト値㯠100)。 + + + + +## .minTLSVersion + +**.minTLSVersion** : Number + +The minimum TLS version accepted for connections. ã“れよりも低ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +* 1 = TLSv1_0 +* 2 = TLSv1_1 +* 3 = TLSv1_2 (デフォルト) +* 4 = TLSv1_3 + +変更ã—ãŸå ´åˆã€è¨­å®šã‚’åæ˜ ã™ã‚‹ã«ã¯ Webサーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + + +## .name + + +**.name** : Text + +*読ã¿å–り専用プロパティ。* + +The name of the web server application. + + + + + +## .openSSLVersion + +**.openSSLVersion** : Text + +*読ã¿å–り専用プロパティ。* + +The version of the OpenSSL library used. + + + + +## .perfectForwardSecrecy + + +**.perfectForwardSecrecy** : Boolean + +*読ã¿å–り専用プロパティ。* + +The PFS availability on the server. + + + +## .rootFolder + + +**.rootFolder** : Text + +The path of web server root folder. パスã¯ã€ãƒ•ァイルシステムを使用ã—㟠POSIXフルパスã®å½¢å¼ã§ã™ã€‚ `settings` 引数内ã§ã“ã®ãƒ—ロパティを使用ã™ã‚‹å ´åˆã€
        Folder オブジェクトも使用å¯èƒ½ã§ã™ã€‚ + + +## .scalableSession + + +**.scalableSession** : Boolean + +True if scalable sessions are used in the web server, and False otherwise. + +##### å‚ç…§: +[.keepSession](#keepsession) + + +## .sessionCookieDomain + + +**.sessionCookieDomain** : Text + +The "domain" field of the session cookie. セッションcookie ã®ã‚¹ã‚³ãƒ¼ãƒ—を制御ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã“ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã« "/*.4d.fr" ã®å€¤ã‚’設定ã—ãŸå ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å®›å…ˆãŒ ".4d.fr" ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã«é™ã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ cookie ã‚’é€ä¿¡ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€å¤–部ã®é™çš„データをホストã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã¯é™¤å¤–ã•れã¾ã™ã€‚ + + + + +## .sessionCookieName + + +**.sessionCookieName** : Text + +The name of the cookie used for storing the session ID. + +*読ã¿å–り専用プロパティ。* + + + + +## .sessionCookiePath + + +**.sessionCookiePath** : Text + +The "path" field of the session cookie. セッションcookie ã®ã‚¹ã‚³ãƒ¼ãƒ—を制御ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã“ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã« "/4DACTION" ã¨ã„ã†å€¤ã‚’設定ã—ãŸå ´åˆã€4DACTION ã§å§‹ã¾ã‚‹å‹•的リクエストã®å ´åˆã«ã®ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ cookie ã‚’é€ä¿¡ã—ã€ãƒ”クãƒãƒ£ãƒ¼ã‚„é™çš„ページã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯é™¤å¤–ã•れã¾ã™ã€‚ + + + +## .sessionCookieSameSite + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
        + +**.sessionCookieSameSite** : Text + +The "SameSite" session cookie value. ã¨ã‚Šã†ã‚‹å€¤ (定数使用): + +| 定数 | 値 | 説明 | +| ------------------- | -------- | --------------------------------------------------------------- | +| Web SameSite Strict | "Strict" | *デフォルト値* - ファーストパーティーã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ cookie ãŒé€ä¿¡ã•れã¾ã™ã€‚ | +| Web SameSite Lax | "Lax" | サイト間ã®ã‚µãƒ–リクエストã«ãŠã„ã¦ã‚‚ cookie ãŒé€ä¿¡ã•れã¾ã™ãŒã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªãƒ³ã‚¯ã‚’辿ã£ã¦å¤§å…ƒã®ã‚µã‚¤ãƒˆã«æˆ»ã‚‹å ´åˆã«é™ã‚Šã¾ã™ã€‚ | +| Web SameSite None | "None" | ファーストパーティーやオリジン間リクエストã«ã‹ã‹ã‚らãšã€ã™ã¹ã¦ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠cookie ãŒé€ä¿¡ã•れã¾ã™ã€‚ | + +詳細ã«ã¤ã„ã¦ã¯ [Session Cookie SameSite](WebServer/webServerConfig.md#セッションcookie-samesite) ã‚’å‚ç…§ãã ã•ã„。 + + + + +## .sessionIPAddressValidation + + +**.sessionIPAddressValidation** : Boolean + +The IP address validation for session cookies. セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€ã‚»ãƒƒã‚·ãƒ§ãƒ³cookie ã‚’æŒã¤å„リクエストã«å¯¾ã—㦠Webサーãƒãƒ¼ã¯ãƒ‡ãƒ•ォルト㧠IPアドレスを検証ã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒã€cookieä½œæˆæ™‚ã® IPアドレスã¨åˆè‡´ã—ãªã„å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯æ‹’å¦ã•れã¾ã™ã€‚ アプリケーションã«ã‚ˆã£ã¦ã¯ã€ã“ã®æ¤œè¨¼æ©Ÿèƒ½ã‚’無効化ã—ã€IPアドレスãŒåˆè‡´ã—ãªãã¦ã‚‚セッションcookie ã‚’å—ã‘入れるよã†ã«ã—ãŸã„ã‹ã‚‚ã—れã¾ã›ã‚“。 ãŸã¨ãˆã°ã€ãƒ¢ãƒã‚¤ãƒ«ãƒ‡ãƒã‚¤ã‚¹ãŒ WiFi 㨠3G/4G ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’切り替ãˆãŸå ´åˆã€IPアドレスãŒå¤‰æ›´ã•れã¾ã™ã€‚ ã“ã®ã‚ˆã†ã« IPアドレスãŒå¤‰æ›´ã—ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã‚‹ Webセッションã®ç¶™ç¶šã‚’許å¯ã§ãã¾ã™ (アプリケーションã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ¬ãƒ™ãƒ«ã¯ä¸‹ãŒã‚Šã¾ã™)。 + + + + +## .start() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | +
        + + +**.start**() : Object
        **.start**( *settings* : Object ) : Object + + + +| 引数 | タイプ | | 説明 | +| -------- | ------ | -- | --------------- | +| settings | Object | -> | 開始時㮠Webサーãƒãƒ¼è¨­å®š | +| 戻り値 | Object | <- | Webサーãƒãƒ¼é–‹å§‹ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ | + + +The `.start()` function starts the web server on which it is applied, using properties set in the optional *settings* object parameter. + +プロジェクトã®è¨­å®šãƒ•ァイルã«å®šç¾©ã•れã¦ã„るデフォルトã®è¨­å®šã€ã¾ãŸã¯ `WEB SET OPTION` コマンドã§å®šç¾©ã•れãŸè¨­å®š (ホストデータベースã®ã¿) を使用ã—ã¦ã€Webサーãƒãƒ¼ã¯é–‹å§‹ã•れã¾ã™ã€‚ ã—ã‹ã—ã€*settings* 引数を渡ã›ã°ã€Webサーãƒãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ãŠã„ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸè¨­å®šã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[Web Server オブジェクト](#webサーãƒãƒ¼ã‚ªãƒ–ジェクト) ã®è¨­å®šã¯ã€èª­ã¿å–り専用プロパティ ([.isRunning](#isrunning)ã€[.name](#name)ã€[.openSSLVersion](#opensslversion)ã€[.perfectForwardSecrecy](#perfectforwardsecrecy)ã€[.sessionCookieName(#sessioncookiename)]) を除ã„ã¦ã€ã™ã¹ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ã§ã™ã€‚ + +カスタマイズã•れãŸè¨­å®šã¯ [`.stop()`](#stop) ãŒå‘¼ã³å‡ºã•れãŸã¨ãã«ãƒªã‚»ãƒƒãƒˆã•れã¾ã™ã€‚ + + +#### è¿”ã•れるオブジェクト + +関数㯠Webサーãƒãƒ¼ã®é–‹å§‹ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’表ã™ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れるã“ã¨ãŒã‚りã¾ã™: + +| プロパティ | | タイプ | 説明 | +| ------- | ----------------------- | ---------- | ------------------------------------- | +| success | | Boolean | Webサーãƒãƒ¼ãŒæ­£å¸¸ã«é–‹å§‹ã•れãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | +| errors | | Collection | エラースタック (Webサーãƒãƒ¼ãŒæ­£å¸¸ã«é–‹å§‹ã•れãŸå ´åˆã«ã¯è¿”ã•れã¾ã›ã‚“) | +| | \[].errCode | Number | 4Dエラーコード | +| | \[].message | Text | 4Dエラーã®è©³ç´° | +| | \[].componentSignature | Text | エラーを返ã—ãŸå†…部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ç½²å | +> Webサーãƒãƒ¼ãŒæ—¢ã«èµ·å‹•ã—ã¦ã„ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +#### 例題 + +```4d + var $settings;$result : Object + var $webServer : 4D.WebServer + + $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html") + + $webServer:=WEB Server + $result:=$webServer.start($settings) + If($result.success) + //... + End if +``` + + + + +## .stop() + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -- | +| v18 R3 | 追加 | +
        + +**.stop()** + +| 引数 | タイプ | | 説明 | +| -- | --- | | ----------------- | +| | | | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å¼•æ•°ã‚’å¿…è¦ã¨ã—ã¾ã›ã‚“ | + + +The `.stop()` function stops the web server on which it is applied. + +Webサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„ã‚‹å ´åˆã¯ã€å‡¦ç†ä¸­ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå®Œäº†æ¬¡ç¬¬ã€ã™ã¹ã¦ã® Web接続㨠WebプロセスãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ Webサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„ãªã‹ã£ãŸå ´åˆã€é–¢æ•°ã¯ãªã«ã‚‚ã—ã¾ã›ã‚“。 +> ã“ã®é–¢æ•°ã¯ã€[`.start()`](#start) 関数㮠*settings* 引数を使用ã—ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦å®šç¾©ã—ãŸã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れ㟠Web設定ãŒã‚ã£ãŸå ´åˆã€ãれらをリセットã—ã¾ã™ã€‚ + + +#### 例題 + +データベースWebサーãƒãƒ¼ã‚’åœæ­¢ã—ã¾ã™: + +```4d + var $webServer : 4D.WebServer + + $webServer:=WEB Server(Web server database) + $webServer.stop() +``` + + + + + + diff --git a/website/translated_docs/ja/API/ZipArchiveClass.md b/website/translated_docs/ja/API/ZipArchiveClass.md new file mode 100644 index 00000000000000..f99f6ef3e0c807 --- /dev/null +++ b/website/translated_docs/ja/API/ZipArchiveClass.md @@ -0,0 +1,374 @@ +--- +id: ZipArchiveClass +title: ZIPArchive +--- + + +4D ZIP アーカイブã¯ã€ä¸€ã¤ä»¥ä¸Šã®ãƒ•ァイルã¾ãŸã¯ãƒ•ォルダーを格ç´ã—ã¦ã„ã‚‹ `File` ã¾ãŸã¯ `Folder` オブジェクトã§ã€å…ƒã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå°ã•ããªã‚‹ã‚ˆã†ã«åœ§ç¸®ã•れã¦ã„ã‚‹ã‚‚ã®ã‚’ã„ã„ã¾ã™ã€‚ ã“れらã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–㯠".zip" æ‹¡å¼µå­ã‚’æŒã¤ã‚ˆã†ã«ä½œæˆã•れã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã®ç¢ºä¿ã‚„ã€ã‚µã‚¤ã‚ºåˆ¶é™ãŒã‚るメディア (例: メールã¾ãŸã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãªã©) 経由ã®ãƒ•ァイル転é€ã‚’容易ã«ã™ã‚‹ç”¨é€”ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +- 4D ZIPアーカイブ㯠[ZIP Create archive](#zip-create-archive) コマンドã§ä½œæˆã—ã¾ã™ã€‚ +- 4D [`ZIPFile`](ZipFileClass.md) ãŠã‚ˆã³ [`ZIPFolder`](ZipFolderClass.md) インスタンスã¯ã€[ZIP Read archive](#zip-read-archive) コマンドã«ã‚ˆã£ã¦è¿”ã•れるオブジェクト㮠[`root`](#root) プロパティ (`ZIPFolder`) を通ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + +### 例題 + +ZIPFile オブジェクトをå–å¾—ã—ã€ãã®ä¸­èº«ã‚’確èªã—ã¾ã™: + +```4d +var $path; $archive : 4D.File +var $zipFile : 4D.ZipFile +var $zipFolder : 4D.ZipFolder +var $txt : Text + +$path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") +$archive:=ZIP Read archive($path) +$zipFolder:=$archive.root // 圧縮ファイルã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダーをä¿å­˜ã—ã¾ã™ +$zipFile:=$zipFolder.files()[0] // 最åˆã®ãƒ•ァイルを読ã¿å–りã¾ã™ + +If($zipFile.extension=".txt") + $txt:=$zipFile.getText() +End if +``` + +### æ¦‚è¦ + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.root** : 4D.ZipFolder](#root)

            a virtual folder providing access to the contents of the ZIP archive | + + +## ZIP Create archive + +

        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**ZIP Create archive** ( *fileToZip* : 4D.File ; *destinationFile* : 4D.File ) : Object
        **ZIP Create archive** ( *folderToZip* : 4D.Folder ; *destinationFile* : 4D.File { ; *options* : Integer }) : Object
        **ZIP Create archive** ( *zipStructure* : Object ; *destinationFile* : 4D.File ) : Object +| 引数 | タイプ | | 説明 | +| --------------- | --------- |:--:| ------------------------------------------------------------------------------ | +| fileToZip | 4D.File | -> | 圧縮ã™ã‚‹ File ã¾ãŸã¯ Folder オブジェクト | +| folderToZip | 4D.Folder | -> | 圧縮ã™ã‚‹ File ã¾ãŸã¯ Folder オブジェクト | +| zipStructure | オブジェクト | -> | 圧縮ã™ã‚‹ File ã¾ãŸã¯ Folder オブジェクト | +| destinationFile | 4D.File | -> | アーカイブã®ä¿å­˜å…ˆãƒ•ァイル | +| options | æ•´æ•° | -> | *folderToZip* オプション: `ZIP Without enclosing folder` (外å´ã®ãƒ•ォルダーを除外ã—㦠ZIP圧縮をãŠã“ãªã†) | +| 戻り値 | オブジェクト | <- | ステータスオブジェクト | + + +#### 説明 + +The `ZIP Create archive` command creates a compressed ZIP archive object and returns the status of the operation. + +第1引数ã¨ã—ã¦ã€4D.Fileã€4D.Folderã€ã‚ã‚‹ã„㯠zipStructure オブジェクトを渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- *fileToZip*: 圧縮ã™ã‚‹ `4D.File` オブジェクトを引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ + +- *folderToZip*: 圧縮ã™ã‚‹ `4D.Folder` を渡ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ä»»æ„ã® *options* 引数を渡ã—ã¦ã€ãƒ•ォルダーã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã¿ã‚’圧縮 (ã¤ã¾ã‚Šã€å¤–å´ã®ãƒ•ォルダを除外) ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `ZIP Create archive` ã¯ãƒ‡ãƒ•ォルトã§ã€ãƒ•ォルダーã¨ãã®ä¸­èº«ã‚’圧縮ã™ã‚‹ã®ã§ã€å±•開処ç†ã‚’ã—ãŸã¨ãã«ã¯ãƒ•ォルダーをå†ä½œæˆã—ã¾ã™ã€‚ フォルダーã®ä¸­èº«ã®ã¿ã‚’è§£å‡å‡¦ç†ã§å¾©å…ƒã™ã‚‹ã«ã¯ã€*options* 引数㫠`ZIP Without enclosing folder` 定数を渡ã—ã¾ã™ã€‚ + +- *zipStructure*: ZIPArchive オブジェクトを表ã™ã‚ªãƒ–ジェクトを引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ 以下ã®ãƒ—ロパティを利用ã—ã¦ã€ã“ã®ã‚ªãƒ–ジェクトを定義ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™:
      • `4D.File` ã¾ãŸã¯ `4D.Folder` オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³
      • 以下ã®ãƒ—ロパティをæŒã£ãŸã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³:
      • + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + プロパティ + + タイプ + + 説明 +
        + source + + 4D.File ã¾ãŸã¯ 4D.Folder + + + File ã¾ãŸã¯ Folder +
        + destination + + Text + + (ä»»æ„) - アーカイブã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„æ§‹æˆã‚’変更ã™ã‚‹ãŸã‚ã®ç›¸å¯¾ãƒ•ァイルパス +
        + オプション + + number + + (ä»»æ„) - `ZIP Ignore invisible files` ã§éžè¡¨ç¤ºãƒ•ァイルを無視ã€0 を渡ã™ã¨å…¨ãƒ•ァイルを圧縮 +
        + + + + + + callback + + + + 4D.Function + + + + $1 ã«åœ§ç¸®ã®é€²æ— (0 - 100) ã‚’å—ã‘å–るコールãƒãƒƒã‚¯ãƒ•ォーミュラ + + + + +*destinationFile* ã«ã¯ã€ä½œæˆã™ã‚‹ ZIPアーカイブ (åå‰ã‚„ä½ç½®ãªã©) を記述ã™ã‚‹ `4D.File` オブジェクトを渡ã—ã¾ã™ã€‚ 作æˆã—㟠ZIPアーカイブãŒã‚らゆるソフトウェアã§è‡ªå‹•çš„ã«å‡¦ç†ã•れるよã†ã«ã™ã‚‹ãŸã‚ã€".zip" æ‹¡å¼µå­ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +アーカイブãŒä½œæˆã•れるã¨ã€[ZIP Read archive](#zip-read-archive) を使用ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**ステータスオブジェクト** + +戻り値ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚ªãƒ–ジェクトã«ã¯ã€ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ---------- | ------- | ----------------------------------------------------------------------------------------------------------- | +| statusText | Text | エラーメッセージ (ã‚れã°):
      • ZIPアーカイブを開ã‘ã¾ã›ã‚“
      • ZIPアーカイブを作æˆã§ãã¾ã›ã‚“
      • æš—å·åŒ–ã«ã¯ãƒ‘スワードãŒå¿…è¦ã§ã™ | +| status | Integer | ステータスコード | +| success | Boolean | ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ãŒæ­£å¸¸ã«ä½œæˆã•れãŸå ´åˆã«ã¯ trueã€ãれ以外㯠false | + + + + + +#### 例題 1 + +`4D.File` を圧縮ã—ã¾ã™: + + + +```4d + var $file; $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/file.zip") + $file:=Folder(fk desktop folder).file("MyDocs/text.txt") + + $status:=ZIP Create archive($file;$destination) +``` + + + + + +#### 例題 2 + +フォルダー自体ã¯åœ§ç¸®ã›ãšã« `4D.Folder` ã®ä¸­èº«ã ã‘を圧縮ã—ã¾ã™: + + + +```4D + var $folder : 4D.Folder + var $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/Images.zip") + $folder:=Folder(fk desktop folder).folder("MyDocs/Images") + + $status:=ZIP Create archive($folder;$destination;ZIP Without enclosing folder) +``` + + + + +#### 例題 3 + +ZIPアーカイブã®åœ§ç¸®ã«ãƒ‘スワードã¨é€²æ—ãƒãƒ¼ã‚’使ã„ã¾ã™: + + + +```4d + var $destination : 4D.File + var $zip;$status : Object + var progID : Integer + + $destination:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + + $zip:=New object + $zip.files:=Folder(fk desktop folder).folder("MyDocs/Resources").folders() + $zip.password:="password" + $zip.callback:=Formula(myFormulaCompressingMethod($1)) + + progID:=Progress New // 4D Progress コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’使ã„ã¾ã™ + + $status:=ZIP Create archive($zip;$destination) + + Progress QUIT(progID) +``` + + +`myFormulaCompressingMethod`: + + + +```4d + var $1 : Integer + Progress SET PROGRESS(progID;Num($1/100)) +``` + + + + + +#### 例題 4 + +*zipStructure* オブジェクトã«ã€åœ§ç¸®ã—ãŸã„フォルダーã¨ãƒ•ァイルを格ç´ã—ãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’渡ã—ã¾ã™: + + + +```4d + var $destination : 4D.File + var $zip;$err : Object + $zip:=New object + $zip.files:=New collection + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text2.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Images/image.png"))) + + $destination:=Folder(fk desktop folder).file("file.zip") + $err:=ZIP Create archive($zip;$destination) +``` + + + + + + + +## ZIP Read archive + +
        履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v18 | 追加 | +
        + +**ZIP Read archive** ( *zipFile* : 4D.File { ; *password* : Text }) : 4D.ZipArchive + +| 引数 | タイプ | | 説明 | +| -------- | ------------- |:--:| ----------------------- | +| zipFile | 4D.File | -> | ZIPアーカイブファイル | +| password | テキスト | -> | ZIPアーカイブã®ãƒ‘スワード (å¿…è¦ã§ã‚れã°) | +| 戻り値 | 4D.ZipArchive | <- | アーカイブオブジェクト | + + + + + +#### 説明 + +The `ZIP Read archive` command retrieves the contents of *zipFile* and returns it as a `4D.ZipArchive` object. + + + +> ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ ZIPアーカイブを展開ã™ã‚‹ã“ã¨ã¯ã—ã¾ã›ã‚“。ãã®ä¸­èº«ã«é–¢ã™ã‚‹æƒ…報をæä¾›ã™ã‚‹ã®ã¿ã§ã™ã€‚ アーカイブã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’å–り出ã™ã«ã¯ã€[file.copyTo()](Document.md#copyto) ã‚ã‚‹ã„㯠[folder.copyTo()](Directory.md#copyto) ãªã©ã®é–¢æ•°ã‚’使用ã—ã¾ã™ã€‚ + +*zipFile* 引数ã¨ã—ã¦ã€åœ§ç¸®ã•れ㟠ZIPアーカイブをå‚ç…§ã—ã¦ã„ã‚‹ `4D.File` オブジェクトを渡ã—ã¾ã™ã€‚ ターゲットã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ファイル㯠`ZIP Read archive` ãŒå®Ÿè¡Œã‚’終ãˆã‚‹ã¾ã§ (全コンテンツ/å‚ç…§ãŒå–å¾—/解放ã•れるã¾ã§) ã¯é–‹ã„ãŸçŠ¶æ…‹ã¨ãªã‚Šã€ãã®å¾Œè‡ªå‹•çš„ã«é–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ + +*zipFile* å¼•æ•°ã§æŒ‡å®šã—㟠ZIPファイルãŒãƒ‘スワードã§ä¿è­·ã•れã¦ã„ãŸå ´åˆã€ä»»æ„ã® *password* 引数を渡ã—ã¦ãƒ‘スワードをæä¾›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ パスワードãŒå¿…è¦ã«ã‚‚é–¢ã‚らãšã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„読ã¿å‡ºã—時ã«ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ãŒæç¤ºã•れãªã‹ã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +**アーカイブオブジェクト** + +戻り値㮠`4D.ZipArchive` オブジェクトã¯å˜ä¸€ã® [`root`](#root) プロパティを格ç´ã—ã¦ãŠã‚Šã€ãã®å€¤ã¯ `4D.ZipFolder` オブジェクトã§ã™ã€‚ ã“ã®ãƒ•ォルダー㯠ZIPアーカイブã®å…¨ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を表ã—ã¾ã™ã€‚ + + + + + +#### 例題 + +ZIPFile オブジェクトをå–å¾—ã—ã€ãã®ä¸­èº«ã‚’確èªã—ã¾ã™: + + + +```4d + var $archive : 4D.ZipArchive + var $path : 4D.File + + $path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + $archive:=ZIP Read archive($path) +``` + + +アーカイブ内ã®ãƒ•ァイルã¨ãƒ•ォルダーã®ä¸€è¦§ã‚’å–å¾—ã—ã¾ã™: + + + +```4d + $folders:=$archive.root.folders() + $files:=$archive.root.files() +``` + + +ファイルã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’ã€root フォルダーã‹ã‚‰å–り出ã™ã“ã¨ãªã読ã¿å‡ºã—ã¾ã™: + + + +```4d + + If($files[$i].extension=".txt") + $txt:=$files[$i].getText() + Else + $blob:=$files[$i].getContent() + End if +``` + + +root フォルダーã‹ã‚‰å–り出ã—ã¾ã™: + + + +```4d + // 特定ã®ãƒ•ァイルをå–å¾—ã—ã¾ã™ + $folderResult:=$files[$i].copyTo(Folder(fk desktop folder).folder("MyDocs")) + + // ã™ã¹ã¦ã®ãƒ•ァイルをå–å¾—ã—ã¾ã™ + $folderResult:=$archive.root.copyTo(Folder(fk desktop folder).folder("MyDocs")) +``` + + + + + + +## .root + +**.root** : 4D.ZipFolder + + + +#### 説明 + +The `.root` property contains a virtual folder providing access to the contents of the ZIP archive. + +`root` フォルダーã¨ãã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯ã€[ZipFile](ZipFileClass.md) ãŠã‚ˆã³ [ZipFolder](ZipFolderClass.md) ã®é–¢æ•°ã¨ãƒ—ロパティを使用ã™ã‚‹ã“ã¨ã§æ“作å¯èƒ½ã§ã™ã€‚ + +ã“ã®ãƒ—ロパティ㯠**読ã¿å–り専用** ã§ã™ã€‚ + + + diff --git a/website/translated_docs/ja/API/ZipFileClass.md b/website/translated_docs/ja/API/ZipFileClass.md new file mode 100644 index 00000000000000..4025e9151aed0c --- /dev/null +++ b/website/translated_docs/ja/API/ZipFileClass.md @@ -0,0 +1,33 @@ +--- +id: ZipFileClass +title: ZIPFile +--- + +[File](FileClass.md) ã‚¯ãƒ©ã‚¹ã®æ¬¡ã®ãƒ—ロパティや関数㯠`ZIPFile` オブジェクトã«ãŠã„ã¦åˆ©ç”¨å¯èƒ½ã§ã™: + +| ZIPFile ã§åˆ©ç”¨å¯èƒ½ãª [File](FileClass.md) API | 説明 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](FileClass.md#copyto) | | +| [**.creationDate** : Date](FileClass.md#creationdate) | | +| [**.creationTime** : Time](FileClass.md#creationtime) | | +| [**.exists** : Boolean](FileClass.md#exists) | | +| [**.extension** : Text](FileClass.md#extension) | | +| [**.fullName** : Text](FileClass.md#fullname) | | +| [**.getContent( )** : 4D.Blob](FileClass.md#getcontent) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FileClass.md#geticon) | | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
        **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](FileClass.md#gettext) | | +| [**.hidden** : Boolean](FileClass.md#hidden) | | +| [**.isAlias** : Boolean](FileClass.md#isalias) | | +| [**.isFile** : Boolean](FileClass.md#isfile) | | +| [**.isFolder** : Boolean](FileClass.md#isfolder) | | +| [**.isWritable** : Boolean](FileClass.md#iswritable) | ZIPアーカイブã®å ´åˆã¯å¸¸ã« false | +| [**.modificationDate** : Date](FileClass.md#modificationdate) | | +| [**.modificationTime** : Time](FileClass.md#modificationtime) | | +| [**.name** : Text](FileClass.md#name) | | +| [**.original** : 4D.File
        **.original** : 4D.Folder](FileClass.md#original) | | +| [**.parent** : 4D.Folder](FileClass.md#parent) | | +| [**.path** : Text](FileClass.md#path) | アーカイブを起点ã¨ã—ãŸç›¸å¯¾ãƒ‘スを返ã—ã¾ã™ | +| [**.platformPath** : Text](FileClass.md#platformpath) | | + + + diff --git a/website/translated_docs/ja/API/ZipFolderClass.md b/website/translated_docs/ja/API/ZipFolderClass.md new file mode 100644 index 00000000000000..c19a61d06851a6 --- /dev/null +++ b/website/translated_docs/ja/API/ZipFolderClass.md @@ -0,0 +1,37 @@ +--- +id: ZipFolderClass +title: ZIPFolder +--- + + +[Folder](FolderClass.md) ã‚¯ãƒ©ã‚¹ã®æ¬¡ã®ãƒ—ロパティや関数㯠`ZIPFolder` オブジェクトã«ãŠã„ã¦åˆ©ç”¨å¯èƒ½ã§ã™: + + +| ZIPFolder ã§åˆ©ç”¨å¯èƒ½ãª [Folder](FolderClass.md) API | 説明 | +| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](FolderClass.md#copyto) | | +| [**.creationDate** : Date](FolderClass.md#creationdate) | アーカイブ内ã®ãƒ•ォルダー㨠`root` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ—¥ä»˜ãŒç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™ | +| [**.creationTime** : Time](FolderClass.md#creationtime) | アーカイブ内ã®ãƒ•ォルダー㨠`root` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ™‚刻ãŒç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™ | +| [**.exists** : Boolean](FolderClass.md#exists) | | +| [**.extension** : Text](FolderClass.md#extension) | | +| [**.file**( *path* : Text ) : 4D.File](FolderClass.md#file) | | +| [**.files**( { *options* : Integer } ) : Collection](FolderClass.md#files) | | +| [**.folder**( *path* : Text ) : 4D.Folder](FolderClass.md#folder) | | +| [**.folders**( { *options* : Integer } ) : Collection](FolderClass.md#folders) | | +| [**.fullName** : Text](FolderClass.md#fullname) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FolderClass.md#geticon) | | +| [**.hidden** : Boolean](FolderClass.md#hidden) | | +| [**.isAlias** : Boolean](FolderClass.md#isalias) | | +| [**.isFile** : Boolean](FolderClass.md#isfile) | | +| [**.isFolder** : Boolean](FolderClass.md#isfolder) | | +| [**.isPackage** : Boolean](FolderClass.md#ispackage) | | +| [**.modificationDate** : Date](FolderClass.md#modificationdate) | アーカイブ内ã®ãƒ•ォルダー㨠`root` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ—¥ä»˜ãŒç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™ | +| [**.modificationTime** : Time](FolderClass.md#modificationtime) | アーカイブ内ã®ãƒ•ォルダー㨠`root` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ™‚刻ãŒç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™ | +| [**.name** : Text](FolderClass.md#name) | | +| [**.original** : 4D.Folder](FolderClass.md#original) | | +| [**.parent** : 4D.Folder](FolderClass.md#parent) | アーカイブã®ä»®æƒ³ `root` フォルダーã¯è¦ªã‚’æŒã¡ã¾ã›ã‚“。 ã—ã‹ã—ãªãŒã‚‰ã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–内ã®ãƒ•ォルダー㯠root 以外ã®è¦ªã‚’æŒã¤å ´åˆãŒã‚りã¾ã™ã€‚ | +| [**.path** : Text](FolderClass.md#path) | アーカイブを起点ã¨ã—ãŸç›¸å¯¾ãƒ‘スを返ã—ã¾ã™ | +| [**.platformPath** : Text](FolderClass.md#platformpath) | | + + + diff --git a/website/translated_docs/ja/API/overview.md b/website/translated_docs/ja/API/overview.md new file mode 100644 index 00000000000000..bbacae420f909b --- /dev/null +++ b/website/translated_docs/ja/API/overview.md @@ -0,0 +1,27 @@ +--- +id: overview +title: クラス API ã®æ¦‚è¦ +--- + +ã“ã®ç« ã§ã¯ã€ãƒ“ルトイン㮠4D クラス API ãŠã‚ˆã³é–¢é€£ã™ã‚‹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã‚’説明ã—ã¾ã™ã€‚ 4Dクラス関数ãŠã‚ˆã³ãƒ—ロパティã¯ã€ã‚¯ãƒ©ã‚¹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ オブジェクトã«ã‚ˆã£ã¦æä¾›ã•れã¾ã™ã€‚ + +- 関数ã¯ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«å¯¾ã—ã€() 演算å­ã‚’使ã£ã¦å‘¼ã³å‡ºã—ã¾ã™ã€‚ 例: `collection.sort()`。 + +- プロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã¯ã€ã‚«ãƒƒã‚³ã‚’使ã„ã¾ã›ã‚“。例: `file.creationTime`。 ã¾ãŸã€\[] シンタックスも使用å¯èƒ½ã§ã™ã€‚例: `file["creationTime"]`。 + +## 表記è¦å‰‡ + +関数シンタックスã§ã¯ã€æ¬¡ã®è¡¨è¨˜ãŒä½¿ã‚れã¦ã„ã¾ã™: + +- 中カッコ `{ }` ã¯ã€ä»»æ„ã®ãƒ‘ラメーターを示ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`.delete( { option : Integer } )` ã¨ã„ã†è¡¨è¨˜ã®å ´åˆã€é–¢æ•°ã‚’呼ã³å‡ºã™éš›ã« *option* パラメーターをçœç•¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `{ ; ...param }` ã¨ã„ã†è¡¨è¨˜ã¯ã€ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã®æ•°ã«åˆ¶é™ãŒãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`.concat( value : any { ;...valueN } ) : Collection` ã¨ã„ã†è¡¨è¨˜ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿åž‹ãŠã‚ˆã³æ•°ã«åˆ¶é™ãªã関数ã«å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `any` キーワードã¯ã€å±žæ€§ã¨ã—ã¦ä¿å­˜å¯èƒ½ãªç¯„囲 (数値ã€ãƒ†ã‚­ã‚¹ãƒˆã€ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜ã€æ™‚é–“ã€ã‚ªãƒ–ジェクトã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã§ãƒ‡ãƒ¼ã‚¿åž‹ã«åˆ¶é™ã®ãªã„パラメーターを示ã™ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +## ãã®ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ + +4Dランゲージã®åŸºæœ¬ã‚„コンセプトã«ã¤ã„ã¦ã®èª¬æ˜Žã¯ [4Dランゲージコンセプト](Concepts/about.md) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +4D ã® "クラシック" ランゲージã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[doc.4d.com](https://doc.4d.com) ã® *4Dランゲージリファレンス* ã‚’å‚ç…§ãã ã•ã„。 + + + diff --git a/website/translated_docs/ja/Admin/cli.md b/website/translated_docs/ja/Admin/cli.md new file mode 100644 index 00000000000000..bd89eac8a72a79 --- /dev/null +++ b/website/translated_docs/ja/Admin/cli.md @@ -0,0 +1,190 @@ +--- +id: cli +title: コマンドライン・インターフェース +--- + +macOS ã®ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã¾ãŸã¯ Windows ã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã‚’使用ã—ã¦ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã«ã‚ˆã‚‹ 4Dアプリケーション (4D ãŠã‚ˆã³ 4D Server) ã®èµ·å‹•ãŒã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™: + +- リモートã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹èµ·å‹•。ã“れã¯ç‰¹ã« Webサーãƒãƒ¼ã¨ã—ã¦å‹•作ã™ã‚‹ 4D ã®ç®¡ç†ã«ä¾¿åˆ©ã§ã™ã€‚ +- アプリケーションã®è‡ªå‹•テストã®å®Ÿè¡Œ + +## 基本情報 + +4Dアプリケーションã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã¯ã€macOS ã®ã‚¿ãƒ¼ãƒŸãƒŠãƒ«ã¾ãŸã¯ Windows ã®ã‚³ãƒ³ã‚½ãƒ¼ãƒ«ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ + +- macOS ã§ã¯ã€`open` コマンドを使用ã—ã¾ã™ã€‚ +- Windows ã§ã¯ã€å¼•数を直接渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> macOS ã§ã‚‚ã€ãƒ‘ッケージ内ã®ã‚¢ãƒ—リケーションãŒã‚るフォルダー (Contents/MacOS パス) ã«ç§»å‹•ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€å¼•数を直接渡ã™ã“ã¨ãŒã§ãã€ã‚¨ãƒ©ãƒ¼ã‚¹ãƒˆãƒªãƒ¼ãƒ  (stderr) ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€4Dパッケージ㌠`MyFolder` フォルダーã«ã‚ã‚‹å ´åˆã€æ¬¡ã®ã‚ˆã†ã«ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã‚’書ãå¿…è¦ãŒã‚りã¾ã™: `/MyFolder/4D.app/Contents/MacOS/4D`。 ã—ã‹ã—ãªãŒã‚‰ã€ã‚¨ãƒ©ãƒ¼ã‚¹ãƒˆãƒªãƒ¼ãƒ (stderr) ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒãªã„å ´åˆã«ã¯ã€`open` コマンドã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +## 4Dアプリケーションã®èµ·å‹• + +ã“ã“ã§ã¯ã€4Dアプリケーションを起動ã™ã‚‹ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã¨ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る引数ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +シンタックス: +``` + [--version] [--help] [--project] [ [--data ]] +[--opening-mode interpreted | compiled] [--create-data] [--user-param ] [--headless] [--dataless] +[--webadmin-settings-file] [--webadmin-access-key] [--webadmin-auto-start] [--webadmin-store-settings] +``` +| 引数                               | 値 | 説明 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `applicationPath` | 4Dã€4D Serverã€ã¾ãŸã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã¸ã®ãƒ‘ス。 | アプリケーションを起動ã—ã¾ã™ã€‚ 4Dアプリケーションをダブルクリックã™ã‚‹ã®ã¨åŒã˜å‹•作をã—ã¾ã™ã€‚ ストラクãƒãƒ£ãƒ¼ãƒ•ァイルを指定ã™ã‚‹å¼•æ•°ãªã—ã§å‘¼ã³å‡ºã•れãŸå ´åˆã€ã‚¢ãƒ—リケーションãŒå®Ÿè¡Œã•れã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é¸æŠžã™ã‚‹ãŸã‚ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ | +| `--version` | | アプリケーションã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ | +| `--help` | | ヘルプを表示ã—ã¦çµ‚了ã—ã¾ã™ã€‚ 代替引数: -?, -h | +| `--project` | projectPath | packagePath | 4dlinkPath | カレントデータファイルを開ãプロジェクトファイル。 ダイアログボックスã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 | +| `--data` | dataPath | 指定ã•れãŸãƒ—ロジェクトファイルã§é–‹ãデータファイル。 指定ã—ãªã„å ´åˆã€4D ã¯æœ€å¾Œã«é–‹ã„ãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使用ã—ã¾ã™ã€‚ | +| `--opening-mode` | interpreted | compiled | データベースをインタープリタモードã¾ãŸã¯ã‚³ãƒ³ãƒ‘イルモードã§é–‹ãよã†ã«æŒ‡ç¤ºã—ã¾ã™ã€‚ 指定ã®ãƒ¢ãƒ¼ãƒ‰ãŒåˆ©ç”¨ã§ããªã„å ´åˆã§ã‚‚ã€ã‚¨ãƒ©ãƒ¼ã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 | +| `--create-data` | | 有効ãªãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€æ–°ã—ã„データファイルを自動的ã«ä½œæˆã—ã¾ã™ã€‚ ダイアログボックスã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 "-data" å¼•æ•°ã§æ¸¡ã•れãŸãƒ•ァイルãŒã‚れã°ã€4D ã¯ãれを使用ã—ã¾ã™ (åŒã˜åå‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™)。 | +| `--user-param` | カスタムã®ãƒ¦ãƒ¼ã‚¶ãƒ¼æ–‡å­—列 | Get database parameter コマンドを通ã—㦠4Dアプリケーションã§åˆ©ç”¨å¯èƒ½ãªä»»æ„ã®æ–‡å­—列 (ãŸã ã—文字列ã¯äºˆç´„文字ã§ã‚ã‚‹ "-" ã‹ã‚‰å§‹ã¾ã£ã¦ã¯ã„ã‘ã¾ã›ã‚“)。 | +| `--headless` | | 4Dã€4D Serverã€ã¾ãŸã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションをインターフェースãªã— (ヘッドレスモード) ã§èµ·å‹•ã—ã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯:
      • デザインモードã¯ä½¿ãˆã¾ã›ã‚“。データベースã¯ã‚¢ãƒ—リケーションモードã§èµ·å‹•ã—ã¾ã™ã€‚
      • ツールãƒãƒ¼ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã€MDI ウィンドウやスプラッシュスクリーンã¯è¡¨ç¤ºã•れã¾ã›ã‚“。
      • Dock ã¾ãŸã¯ã‚¿ã‚¹ã‚¯ãƒãƒ¼ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。
      • é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€"最近使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹" メニューã«ç™»éŒ²ã•れã¾ã›ã‚“。
      • 4D診断ファイルã®è¨˜éŒ²ãŒè‡ªå‹•çš„ã«é–‹å§‹ã•れã¾ã™ ([SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/ja/page642.html)ã€å€¤79 å‚ç…§)
      • ダイアログボックスã¸ã®ã‚³ãƒ¼ãƒ«ã¯ã™ã¹ã¦ã‚¤ãƒ³ã‚¿ãƒ¼ã‚»ãƒ—トã•れã€è‡ªå‹•çš„ã«ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒè¿”ã•れã¾ã™ (例: [ALERT](https://doc.4d.com/4dv19/help/command/ja/page41.html) コマンドã®å ´åˆã¯ OKã€ã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã®å ´åˆã¯ Abort ãªã©)。 インターセプトã•れãŸã‚³ãƒžãƒ³ãƒ‰ (*) ã¯ã€è¨ºæ–­ãƒ•ァイルã«è¨˜éŒ²ã•れã¾ã™ã€‚

      • ä¿å®ˆä¸Šã®ç†ç”±ã‹ã‚‰ã€[LOG EVENT](https://doc.4d.com/4dv19/help/command/ja/page667.html) コマンドを使用ã—ã¦ä»»æ„ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’標準ã®å‡ºåŠ›ã‚¹ãƒˆãƒªãƒ¼ãƒ ã«é€ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ヘッドレスモード㮠4Dアプリケーションã¯ã€[QUIT 4D](https://doc.4d.com/4dv19/help/command/ja/page291.html) を呼ã³å‡ºã™ã‹ OSタスクマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã—ã‹çµ‚了ã§ããªã„ç‚¹ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ | +| `--dataless` | | 4Dã€4D Serverã€ã¾ãŸã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションをデータレスモードã§èµ·å‹•ã—ã¾ã™ã€‚ データレスモードã¯ã€4D ãŒãƒ‡ãƒ¼ã‚¿ã‚’å¿…è¦ã¨ã—ãªã„タスク (プロジェクトã®ã‚³ãƒ³ãƒ‘イルãªã©) を実行ã™ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯:
      • コマンドラインや `.4DLink` ãƒ•ã‚¡ã‚¤ãƒ«ã§æŒ‡å®šã•れã¦ã„ã¦ã‚‚ã€ã¾ãŸ `CREATE DATA FILE` ã‚„ `OPEN DATA FILE` コマンドを使用ã—ã¦ã„ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ãƒ•ァイルã¯é–‹ã‹ã‚Œã¾ã›ã‚“。
      • データをæ“作ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`CREATE RECORD` 㯠"ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã®å¯¾è±¡ã¨ãªã‚‹ãƒ†ãƒ¼ãƒ–ルãŒã‚りã¾ã›ã‚“" ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚

      • **注記**:
      • コマンドラインã§å¼•æ•°ãŒæ¸¡ã•れãŸå ´åˆã€ã‚¢ãƒ—リケーションを終了ã—ãªã„é™ã‚Šã€4D ã§é–‹ã‹ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ãƒ¬ã‚¹ãƒ¢ãƒ¼ãƒ‰ãŒé©ç”¨ã•れã¾ã™ã€‚
      • `.4DLink` ファイルを使ã£ã¦å¼•æ•°ãŒæ¸¡ã•れãŸå ´åˆã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¬ã‚¹ãƒ¢ãƒ¼ãƒ‰ã¯ `.4DLink` ãƒ•ã‚¡ã‚¤ãƒ«ã§æŒ‡å®šã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã®ã¿é©ç”¨ã•れã¾ã™ã€‚ `.4DLink` ファイルã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[プロジェクトを開ã (ãã®ä»–ã®æ–¹æ³•)](../Project/creating.md#プロジェクトを開ã-ãã®ä»–ã®æ–¹æ³•) ã‚’å‚ç…§ãã ã•ã„。
      • | +| `--webadmin-settings-file` | ファイルパス | [WebAdmin Webサーãƒãƒ¼](webAdmin.md) 用ã®ã‚«ã‚¹ã‚¿ãƒ  WebAdmin `.4DSettings` ファイルã®ãƒ‘ス | +| `--webadmin-access-key` | String | [WebAdmin Webサーãƒãƒ¼](webAdmin.md) 用ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ | +| `--webadmin-auto-start` | ブール | [WebAdmin Webサーãƒãƒ¼](webAdmin.md) 用ã®è‡ªå‹•スタートアップ設定ã®çŠ¶æ…‹ | +| `--webadmin-store-settings` | | アクセスキーã¨è‡ªå‹•スタートアップパラメーターをã€ç¾åœ¨ä½¿ç”¨ã—ã¦ã„る設定ファイル (デフォルト㮠[`WebAdmin.4DSettings`](webAdmin.md#webadmin-設定) ファイルã€ã¾ãŸã¯ `--webadmin-settings-path` ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã§æŒ‡å®šã•れãŸã‚«ã‚¹ã‚¿ãƒ ãƒ•ァイル) ã«ä¿å­˜ã—ã¾ã™ã€‚ å¿…è¦ã«å¿œã˜ã¦ `--webadmin-store-settings` 引数を使用ã—ã¦ã€ã“れらã®è¨­å®šã‚’ä¿å­˜ã—ã¾ã™ã€‚ | + (*) 一部ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ãå‰ã«è¡¨ç¤ºã•れるãŸã‚〠+ +[診断ログファイル](debugLogFiles.md#4ddiagnosticlogtxt) ã«è¨˜éŒ²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (ライセンス警告ã€å¤‰æ›ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é¸æŠžã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«é¸æŠž)。 ã“ã®ã‚ˆã†ãªå ´åˆã€ã‚¨ãƒ©ãƒ¼ã‚¹ãƒˆãƒªãƒ¼ãƒ  (stderr) ã¨ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ­ã‚°ã«ã‚¨ãƒ©ãƒ¼ãŒæŠ•ã’られã€ã‚¢ãƒ—リケーションãŒçµ‚了ã—ã¾ã™ã€‚ + +### 例題 + +以下ã®ä¾‹é¡Œã§ã¯ã€4DアプリケーションãŒãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—ã«ä¿å­˜ã•れã¦ãŠã‚Šã€é–‹ã“ã†ã¨ã—ã¦ã„るデータベース㌠"Documents" フォルダーã«ã‚ã‚‹ã‚‚ã®ã¨ã—ã¾ã™ã€‚ + +> ユーザーã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォルダーã¯ã€macOS ã§ã¯ "~" コマンドをã€Windows ã§ã¯ "%HOMEPATH%" コマンドを使用ã™ã‚‹ã“ã¨ã§å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +アプリケーションを起動: + +* macOS: + + +```bash +open ~/Desktop/4D.app +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe +``` + +macOS上ã§ãƒ‘ッケージファイルを指定ã—ã¦ã‚¢ãƒ—リケーションを起動: + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myDB.4dbase +``` + +プロジェクトファイルを指定ã—ã¦ã‚¢ãƒ—リケーションを起動: + +* macOS: + + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myProj/Project/myProj.4DProject +``` + + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myProj\Project\myProj.4DProject +``` + + + +プロジェクトファイルã¨ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを指定ã—ã¦ã‚¢ãƒ—リケーションを起動: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD +ã¾ãŸã¯ +%HOMEPATH%\Desktop\4D\4D.exe /project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject /data %HOMEPATH%\Documents\data\myData.4DD +``` + +.4DLink ファイルを指定ã—ã¦ã‚¢ãƒ—リケーションを起動: + +* macOS: + + +```bash +open ~/Desktop/4D.app MyDatabase.4DLink +``` + +```bash +open "~/Desktop/4D Server.app" MyDatabase.4DLink +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D.exe MyDatabase.4DLink +``` + +```bash +%HOMEPATH%\Desktop\4D Server.exe" MyDatabase.4DLink +``` + +アプリケーションをコンパイルモードã§èµ·å‹•ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒåˆ©ç”¨ã§ããªã„å ´åˆã«ã¯ä½œæˆã™ã‚‹: + +* macOS: + + +```bash +open ~/Desktop/4D.app ~/Documents/myBase.4dbase --args --opening-mode compiled --create-data true +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myBase.4dbase\myDB.4db --opening-mode compiled --create-data true +``` + +プロジェクトファイルã¨ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを指定ã—ã¦ã‚¢ãƒ—リケーションを起動ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼å¼•æ•°ã¨ã—ã¦æ–‡å­—列を渡ã™: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --user-param "Hello world" +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --user-param "Hello world" +``` + +インターフェースãªã—ã®ã‚¢ãƒ—リケーションを起動ã™ã‚‹ (ヘッドレスモード): + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --headless +``` + +```bash +open ~/Desktop/MyBuiltRemoteApp −−headless +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --headless +%HOMEPATH%\Desktop\4D\MyBuiltRemoteApp.exe --headless +``` diff --git a/website/translated_docs/ja/Admin/dataExplorer.md b/website/translated_docs/ja/Admin/dataExplorer.md new file mode 100644 index 00000000000000..c15650cab4d765 --- /dev/null +++ b/website/translated_docs/ja/Admin/dataExplorer.md @@ -0,0 +1,190 @@ +--- +id: dataExplorer +title: Webデータエクスプローラー +--- + +> **プレビュー**: Webデータエクスプローラーã¯ã€ãƒ—レビュー機能ã¨ã—ã¦æä¾›ã•れã¦ã„ã¾ã™ã€‚ é‹ç”¨ç’°å¢ƒã§ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 最終的ãªå®Ÿè£…ã¯è‹¥å¹²ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ + + +データエクスプローラーã¯ã€ãƒ—ロジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã‚るデータを表示・クエリã™ã‚‹ãŸã‚ã® Webインターフェースをæä¾›ã—ã¾ã™ã€‚ ã“ã®ãƒ„ールを使用ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ç°¡å˜ã«ç…§ä¼šã—ã€å±žæ€§å€¤ã«åŸºã¥ã„ã¦æ¤œç´¢ãƒ»ä¸¦ã¹æ›¿ãˆãƒ»ãƒ•ィルターã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ„ールã¯ã€é–‹ç™ºãƒ—ロセスã®ã©ã®æ®µéšŽã«ãŠã„ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ã‚’管ç†ã—ã€å•題を迅速ã«ç‰¹å®šã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dataExplorer1.png) + + +## アクセス設定 + +データエクスプローラーã®è¨­å®šã‚„èªè¨¼ã¯ [`WebAdmin`](webAdmin.md) Webサーãƒãƒ¼ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ + +- **設定**: データエクスプローラーã®è¨­å®šã¯ã€[`WebAdmin` Webサーãƒãƒ¼ã®è¨­å®š](webAdmin.md#webadmin-設定) ã‚’å†åˆ©ç”¨ã—ã¾ã™ã€‚ +- **èªè¨¼**: データエクスプローラーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€[èªè¨¼ã•れãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¦ãƒ¼ã‚¶ãƒ¼](webAdmin.md#èªè¨¼ã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³) ãŒã€"WebAdmin" 権é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«è¨±å¯ã•れã¾ã™ã€‚ **データエクスプローラー** ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›® (後述å‚ç…§) ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸå ´åˆã€èªè¨¼ã¯è‡ªå‹•çš„ã«ãŠã“ãªã‚れã¾ã™ã€‚ + +> データエクスプローラーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€[`.setAdminProtection()`](API/DataStoreClass.md#setadminprotection) 関数を使ã£ã¦ç„¡åŠ¹åŒ–ã§ãã¾ã™ã€‚ + + +## データエクスプローラーを開ã + +[`WebAdmin` Webサーãƒãƒ¼ã‚’é–‹å§‹](webAdmin.md#webadmin-webサーãƒãƒ¼ã®èµ·å‹•)ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ãƒšãƒ¼ã‚¸ãŒè‡ªå‹•çš„ã«åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +データエクスプローラーWebãƒšãƒ¼ã‚¸ã«æŽ¥ç¶šã™ã‚‹ã«ã¯: + +- インターフェースをæŒã¤ 4Dアプリケーションを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€**データエクスプローラー...** を次ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼å†…ã‹ã‚‰é¸æŠžã—ã¾ã™: + - **レコード** メニュー (4Dスタンドアロンã®å ´åˆ) + - **ウィンドウ** メニュー (4D Serverã®å ´åˆ) + +- ヘッドレス4Dアプリケーションを使用ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã«é–¢ã‚らãšã€Webブラウザーを開ã„ã¦æ¬¡ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’入力ã—ã¾ã™: + + `IPaddress:HTTPPort/dataexplorer`
        ã¾ãŸã¯
        `IPaddress:HTTPSPort/dataexplorer` + + ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ `WebAdmin` セッションを開ããŸã‚ã« [アクセスキー](webAdmin.md#アクセスキー) ã®å…¥åŠ›ã‚’æ±‚ã‚られã¾ã™ã€‚ + +![alt-text](assets/en/Admin/accessKeyEnter.png) + +> [HTTPPort](webAdmin.md#http-ãƒãƒ¼ãƒˆ) ãŠã‚ˆã³ [HTTPSPort](webAdmin.md#https-ãƒãƒ¼ãƒˆ) ã®å€¤ã¯ã€`WebAdmin` 設定内ã§å®šç¾©ã•れã¾ã™ã€‚ + + + +## データエクスプローラーã®ä½¿ç”¨ + +データエクスプローラーã§ã¯ã€åŒ…括的ã§ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã®è¡¨ç¤ºã«åŠ ãˆã¦ã€ãƒ‡ãƒ¼ã‚¿ã®ç…§ä¼šã‚„ä¸¦ã¹æ›¿ãˆã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### è¦ä»¶ + +データエクスプローラーã¯ã€ä»¥ä¸‹ã® Webブラウザーをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +- Chrome +- Safari +- Edge +- FireFox + +データエクスプローラーを使用ã™ã‚‹ãŸã‚ã®æœ€å°è§£åƒåº¦ã¯ 1280x720 ã§ã™ã€‚ 推奨解åƒåº¦ã¯ 1920x1080 ã§ã™ã€‚ + +### ç”»é¢ã®èª¬æ˜Ž + +データエクスプローラーã¯ã€[ORDAマッピングルール](ORDA/dsMapping.md#変æ›ã®ãƒ«ãƒ¼ãƒ«) ã«åŸºã¥ã„ã¦ã€ORDAデータモデルã¸ã®å…¨ä½“çš„ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +ページ下部ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使ã£ã¦ã€è¡¨ç¤ºãƒ†ãƒ¼ãƒžã‚’ **ダークモード** ã«åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dark.png) + +![alt-text](assets/en/Admin/dataExplorer2.png) + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã„ãã¤ã‹ã®ã‚¨ãƒªã‚¢ãŒã‚りã¾ã™: + +- å·¦å´ã«ã¯ **データクラスエリア** 㨠**属性エリア** ãŒã‚りã€è¡¨ç¤ºã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãŠã‚ˆã³å±žæ€§ã‚’é¸æŠžã§ãã¾ã™ã€‚ 属性ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã«ãŠã‘る作æˆé †ã«ã—ãŸãŒã£ã¦ä¸¦ã¹ã‚‰ã‚Œã¾ã™ã€‚ プライマリーキーãŠã‚ˆã³ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ä»˜ãã®å±žæ€§ã«ã¯ã€å°‚用アイコンãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 表示ã•れã¦ã„るデータクラスåã¨å±žæ€§åã®ãƒªã‚¹ãƒˆã¯ã€ãれãžã‚Œã®æ¤œç´¢ã‚¨ãƒªã‚¢ã‚’使ã£ã¦ãƒ•ィルターã§ãã¾ã™ã€‚ ![alt-text](assets/en/Admin/dataExplorer3.png) + +- 中央部ã«ã¯ã€**検索エリア** 㨠**データグリッド** (é¸æŠžã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒªã‚¹ãƒˆ) ãŒã‚りã¾ã™ã€‚ グリッドã®å„列ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®å±žæ€§ã‚’表ã—ã¾ã™ã€‚ + - デフォルトã§ã¯ã€ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 検索エリアを使用ã—ã¦ã€è¡¨ç¤ºã•れるエンティティをフィルターã§ãã¾ã™ã€‚ 2ã¤ã®ã‚¯ã‚¨ãƒªãƒ¢ãƒ¼ãƒ‰ãŒã‚りã¾ã™: [属性ã«åŸºã¥ãクエリ](#属性ã«åŸºã¥ãクエリ) (デフォルト)ã€ãŠã‚ˆã³ [å¼ã«ã‚ˆã‚‹é«˜åº¦ãªã‚¯ã‚¨ãƒª](#å¼ã«ã‚ˆã‚‹é«˜åº¦ãªã‚¯ã‚¨ãƒª) ã§ã™ã€‚ 対応ã™ã‚‹ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã€ã‚¯ã‚¨ãƒªãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ (**X** ボタンã¯ã€ã‚¯ã‚¨ãƒªã‚¨ãƒªã‚¢ã‚’リセットã—ã¦ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’åœæ­¢ã—ã¾ã™)。 ![alt-text](assets/en/Admin/dataExplorer4b.png) + + - é¸æŠžã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®åå‰ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚°ãƒªãƒƒãƒ‰ã®ä¸Šã«ã‚¿ãƒ–ã¨ã—ã¦è¿½åŠ ã•れã¾ã™ã€‚ ã“れらã®ã‚¿ãƒ–を使ã£ã¦ã€é¸æŠžã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’切り替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å‚ç…§ã•れã¦ã„るデータクラスを削除ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹åã®å³ã«è¡¨ç¤ºã•れる "削除" アイコンをクリックã—ã¾ã™ã€‚ + - å·¦å´ã®å±žæ€§ã®ãƒã‚§ãƒƒã‚¯ã‚’外ã™ã“ã¨ã§ã€è¡¨ç¤ºã•れã¦ã„る列数を減らã›ã¾ã™ã€‚ ã¾ãŸã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ãƒ‡ãƒ¼ã‚¿ã‚°ãƒªãƒƒãƒ‰ã®åˆ—ã®ä½ç½®ã‚’入れ替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 列ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã™ã‚‹ã¨ã€å€¤ã«å¿œã˜ã¦ [ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¸¦ã¹æ›¿ãˆã‚‹](#エンティティã®ä¸¦ã¹æ›¿ãˆ) ã“ã¨ãŒã§ãã¾ã™ (å¯èƒ½ãªå ´åˆ)。 + - 処ç†ã«æ™‚é–“ãŒã‹ã‹ã‚‹å ´åˆã¯ã€é€²æ—ãƒãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 赤ã„ボタンをクリックã™ã‚‹ã¨ã€ã„ã¤ã§ã‚‚実行中ã®å‡¦ç†ã‚’åœæ­¢ã§ãã¾ã™: + +![alt-text](assets/en/Admin/dataExplorer5.png) + + + +- å³å´ã«ã¯ **詳細エリア** ãŒã‚りã€é¸æŠžã•れã¦ã„るエンティティã®å±žæ€§å€¤ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ã‚„オブジェクト (json ã§è¡¨ç¾) ã‚’å«ã‚ãŸã€ã™ã¹ã¦ã®å±žæ€§ã‚¿ã‚¤ãƒ—ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ エリア下部ã«ã‚ã‚‹ **First** / **Previous** / **Next** / **Last** ã®ãƒªãƒ³ã‚¯ã‚’クリックã™ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£é–“を移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +### ãƒ‡ãƒ¼ã‚¿ã®æ›´æ–° + +データベースå´ã§ã€ORDAモデルやデータãŒå¤‰æ›´ã•れãŸå ´åˆ (テーブルã®è¿½åŠ ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ç·¨é›†ãƒ»å‰Šé™¤ãªã©)ã€F5キーãªã©ã§ãƒ‡ãƒ¼ã‚¿ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ãƒšãƒ¼ã‚¸ã‚’ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã§æ›´æ–°ã™ã‚‹ã ã‘ã§ã€å¤‰æ›´ãŒå映ã•れã¾ã™ã€‚ + + +### エンティティã®ä¸¦ã¹æ›¿ãˆ + +表示ã•れã¦ã„るエンティティã®ãƒªã‚¹ãƒˆã‚’ã€å±žæ€§å€¤ã«å¿œã˜ã¦ä¸¦ã¹æ›¿ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä¸¦ã¹æ›¿ãˆã«ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ã¨ã‚ªãƒ–ジェクトを除ãã™ã¹ã¦ã®å±žæ€§ã‚’使用ã§ãã¾ã™ã€‚ + +- 列ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã™ã‚‹ã¨ã€ãã®åˆ—ã®å±žæ€§å€¤ã«å¿œã˜ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¸¦ã¹æ›¿ãˆã¾ã™ã€‚ デフォルトã§ã¯ã€æ˜‡é †ã§ã‚½ãƒ¼ãƒˆã•れã¾ã™ã€‚ 2回クリックã™ã‚‹ã¨ã€é™é †ã§ã‚½ãƒ¼ãƒˆã•れã¾ã™ã€‚ ä¸¦ã¹æ›¿ãˆã®åŸºæº–ã¨ãªã‚‹åˆ—ã«ã¯å°ã•ãªã‚¢ã‚¤ã‚³ãƒ³ãŒä»˜ãã€å±žæ€§å㌠*イタリック* ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dataExplorer7.png) + +- 属性を基準ã«è¤‡æ•°ã®ãƒ¬ãƒ™ãƒ«ã§ã‚½ãƒ¼ãƒˆã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€å¾“業員を都市別ã«ã‚½ãƒ¼ãƒˆã—ãŸå¾Œã€çµ¦ä¸Žåˆ¥ã«ã‚½ãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã¯ã€**Shift** キーを押ã—ãªãŒã‚‰ã€ã‚½ãƒ¼ãƒˆåŸºæº–ã¨ã™ã‚‹å„列ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’é †ã«ã‚¯ãƒªãƒƒã‚¯ã—ã¾ã™ã€‚ + + +### 属性ã«åŸºã¥ãクエリ + +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚°ãƒªãƒƒãƒ‰ã®å±žæ€§åã®ä¸Šã®ã‚¨ãƒªã‚¢ã«æ¤œç´¢ (ã¾ãŸã¯é™¤å¤–) ã™ã‚‹å€¤ã‚’入力ã—ã¦ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’フィルターã—ã¾ã™ã€‚ 1ã¤ã¾ãŸã¯è¤‡æ•°ã®å±žæ€§ã§ãƒ•ィルターå¯èƒ½ã§ã™ã€‚ 入力ã™ã‚‹ã¨ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãƒªã‚¹ãƒˆã¯è‡ªå‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dataExplorer6.png) + +複数ã®å±žæ€§ã‚’指定ã—ãŸå ´åˆã¯ã€è‡ªå‹•的㫠AND ãŒé©ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°æ¬¡ã®ãƒ•ィルターã§ã¯ã€*firstname* 属性㌠"flo" ã§å§‹ã¾ã‚Šã€*salary* 属性値㌠> 50000ã§ã‚るエンティティãŒè¡¨ç¤ºã•れã¾ã™: + +![alt-text](assets/en/Admin/dataExplorer9.png) + +**X** ボタンã¯å…¥åŠ›ã•れãŸå±žæ€§å€¤ã‚’削除ã—ã€ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’åœæ­¢ã—ã¾ã™ã€‚ + +属性ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«å¿œã˜ã¦ã€ã•ã¾ã–ã¾ãªæ¼”ç®—å­ã‚„クエリオプションãŒåˆ©ç”¨ã§ãã¾ã™ã€‚ + +> ピクãƒãƒ£ãƒ¼ã‚„オブジェクト属性ã¯ãƒ•ィルターã§ãã¾ã›ã‚“。 + +#### æ¯”è¼ƒæ¼”ç®—å­ + +æ•°å€¤ã€æ—¥ä»˜ã€æ™‚é–“åž‹ã®å±žæ€§ã§ã¯ã€ãƒ‡ãƒ•ォルト㧠"=" 演算å­ãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚ ãŸã ã—ã€æ¼”ç®—å­ã®ãƒªã‚¹ãƒˆã‹ã‚‰åˆ¥ã®æ¼”ç®—å­ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ("=" アイコンをクリックã™ã‚‹ã¨ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•れã¾ã™)。 + +![alt-text](assets/en/Admin/DEFilter1.png) + +#### 日付 + +日付型属性ã§ã¯ã€ãƒ”ッカーを使ã£ã¦æ—¥ä»˜ã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (日付エリアをクリックã™ã‚‹ã¨ã‚«ãƒ¬ãƒ³ãƒ€ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™)。 + +![alt-text](assets/en/Admin/DEFilter2.png) + +#### ブール + +ブール型ã®å±žæ€§ã‚¨ãƒªã‚¢ã‚’クリックã™ã‚‹ã¨ã€**true**/**false** 値ã ã‘ã§ãªã **null**/**not null** 値ã§ã‚‚フィルターã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![alt-text](assets/en/Admin/DEFilter3.png) + +- **null** ã¯ã€ãã®å±žæ€§å€¤ãŒå®šç¾©ã•れã¦ã„ãªã„ã“ã¨ã‚’示ã—ã¾ã™ã€‚ +- **not null** ã¯ã€å±žæ€§å€¤ãŒå®šç¾©ã•れã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ (ã¤ã¾ã‚Šã€true ã¾ãŸã¯ false)。 + +#### テキスト + +テキストフィルターã¯ã€æ–‡å­—ã®å¤§å°ã‚’区別ã—ã¾ã›ã‚“ (a = A)。 + +フィルター㯠"~ã§å§‹ã¾ã‚‹" タイプã§ã™ã€‚ ãŸã¨ãˆã°ã€"Jim" ã¨å…¥åŠ›ã™ã‚‹ã¨ã€"Jim" 㨠"Jimmy" ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +ワイルドカード文字 (@) を使ã£ã¦ã€1ã¤ä»¥ä¸Šã®é–‹å§‹æ–‡å­—ã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +| フィルター文字列 | æ¤œå‡ºçµæžœ | +| -------- | ------------------------ | +| Bel | "Bel" ã§å§‹ã¾ã‚‹ã™ã¹ã¦ã®å€¤ | +| @do | "do" ã‚’å«ã‚€ã™ã¹ã¦ã®å€¤ | +| Bel@do | "Bel" ã§å§‹ã¾ã‚Šã€"do" ã‚’å«ã‚€ã™ã¹ã¦ã®å€¤ | + +"完全一致" ã®ã‚ˆã†ãªã€ã‚ˆã‚Šè©³ç´°ãªã‚¯ã‚¨ãƒªã‚’作æˆã™ã‚‹ã«ã¯ã€é«˜åº¦ãªã‚¯ã‚¨ãƒªæ©Ÿèƒ½ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +### å¼ã«ã‚ˆã‚‹é«˜åº¦ãªã‚¯ã‚¨ãƒª + +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãƒªã‚¹ãƒˆã®ä¸Šã«ã‚¯ã‚¨ãƒªã‚¨ãƒªã‚¢ãŒè¡¨ç¤ºã•れã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ãƒ•ィルターã«ä½¿ç”¨ã™ã‚‹ä»»æ„ã®å¼ã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dataExplorer8.png) + +属性クエリã§ã¯åˆ©ç”¨ã§ããªã„高度ãªã‚¯ã‚¨ãƒªã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€*firstname* 属性㫠"Jim" ãŒå«ã¾ã‚Œã€"Jimmy" ãŒå«ã¾ã‚Œã¦ã„ãªã„エンティティを探ã™ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«è¨˜è¿°ã—ã¾ã™: + +``` +firstname=="Jim" +``` + +[`query()` 関数ã®èª¬æ˜Ž](API/DataClassClass.md#query) ã«ã‚ã‚‹ ORDA クエリå¼ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ¬¡ã®åˆ¶é™ãŠã‚ˆã³ç›¸é•点ãŒã‚りã¾ã™: + +- セキュリティ上ã€`eval()` を使ã£ãŸå¼ã‚’実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- プレースホルダーã¯ä½¿ç”¨ã§ãã¾ã›ã‚“ã€‚å€¤ã®æŒ‡å®šã•れ㟠*クエリ文字列* を使用ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 +- スペース文字をå«ã‚€æ–‡å­—列値ã¯ã€äºŒé‡å¼•用符 ("") ã§å›²ã‚€å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€Employee データクラスã®å ´åˆã«ã€æ¬¡ã®ã‚ˆã†ã«è¨˜è¿°ã§ãã¾ã™: + +``` +firstname = "Marie Sophie" AND manager.lastname = "@th" +``` + +[`queryPlan`](API/DataClassClass.md#queryplan) 㨠[`queryPath`](API/DataClassClass.md#querypath) を両方表示ã™ã‚‹ã«ã¯ `v` アイコンをクリックã—ã¾ã™ã€‚ ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€ã‚µãƒ–クエリã®ãƒ–ロックã«ã‚«ãƒ¼ã‚½ãƒ«ã‚’åˆã‚ã›ã‚‹ã¨ã€ã‚µãƒ–クエリã”ã¨ã®è©³ç´°æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![alt-text](assets/en/Admin/dataExplorer12.png) + +クエリエリアã§å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ä»¥å‰ã®æœ‰åйãªã‚¯ã‚¨ãƒªãŒè¡¨ç¤ºã•れã¾ã™: + +![alt-text](assets/en/Admin/dataExplorer11.png) diff --git a/website/translated_docs/ja/Admin/debugLogFiles.md b/website/translated_docs/ja/Admin/debugLogFiles.md new file mode 100644 index 00000000000000..310bce60943c8d --- /dev/null +++ b/website/translated_docs/ja/Admin/debugLogFiles.md @@ -0,0 +1,510 @@ +--- +id: debugLogFiles +title: ログファイルã®è©³ç´° +--- + +4Dアプリケーションã¯ã€ãƒ‡ãƒãƒƒã‚°ã‚„å®Ÿè¡Œã®æœ€é©åŒ–ã®ãŸã‚ã«æœ‰ç”¨ãªè¤‡æ•°ã®ãƒ­ã‚°ãƒ•ァイルを生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ログã¯é€šå¸¸ [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/ja/page642.html) ã‚ã‚‹ã„㯠[WEB SET OPTION](https://doc.4d.com/4dv19/help/command/ja/page1210.html) コマンドã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’使用ã—ã¦é–‹å§‹ãƒ»åœæ­¢ã•れã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® [Logsフォルダー](Project/architecture.md#logs-フォルダー) 内ã«ä¿å­˜ã•れã¾ã™ã€‚ + +記録ã•ã‚ŒãŸæƒ…å ±ã¯ã€å•é¡Œã®æ¤œçŸ¥ã¨ä¿®æ­£ã®ãŸã‚ã«ã¯åˆ†æžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ç« ã§ã¯ã€ä»¥ä¸‹ã®ãƒ­ã‚°ãƒ•ァイルã®è©³ç´°ã‚’説明ã—ã¾ã™: + +* [4DRequestsLog.txt](#4drequestslogtxt) +* [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) +* [HTTPDebugLog.txt](#httpdebuglogtxt) +* 4DDebugLog.txt ([標準](#4ddebuglogtxt-標準) & [タブ分ã‘](#4ddebuglogtxt-タブ分ã‘)) +* [4DDiagnosticLog.txt](#4ddiagnosticlogtxt) +* [4DIMAPLog.txt](#4dsmtplogtxt-4dpop3logtxt-ãŠã‚ˆã³-4dimaplogtxt) +* [4DPOP3Log.txt](#4dsmtplogtxt-4dpop3logtxt-ãŠã‚ˆã³-4dimaplogtxt) +* [4DSMTPLog.txt](#4dsmtplogtxt-4dpop3logtxt-ãŠã‚ˆã³-4dimaplogtxt) +* [ORDA クライアントリクエストã®ãƒ­ã‚°ãƒ•ァイル](#ordaクライアントリクエスト) + +> サーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ä¸¡æ–¹ã«ãŠã„ã¦ãƒ­ã‚°ãƒ•ァイルãŒç”Ÿæˆå¯èƒ½ãªå ´åˆã€ã‚µãƒ¼ãƒãƒ¼å´ã®ãƒ­ã‚°ãƒ•ァイルåã«ã¯ "Server" ãŒè¿½åŠ ã•れã¾ã™ã€‚ãŸã¨ãˆã°ã€"4DRequestsLogServer.txt" ã®ã‚ˆã†ã«ã§ã™ã€‚ + +ã“れらã®ãƒ­ã‚°ãƒ•ァイルã¯ã€ãƒ‡ãƒãƒƒã‚°ä¸­ã«æ™‚系列を確立ã—エントリー間ã®ã¤ãªãŒã‚Šã‚’分ã‹ã‚Šã‚„ã™ãã™ã‚‹ãŸã‚ã«ã€ã„ãã¤ã‹ã®ãƒ•ィールドを共有ã—ã¦ã„ã¾ã™: + +* `sequence_number`: ã“ã®ç•ªå·ã¯ã™ã¹ã¦ã®ãƒ‡ãƒãƒƒã‚°ãƒ­ã‚°é–“ã«ãŠã„ã¦å›ºæœ‰ã§é‡è¤‡ã›ãšã€ãƒ­ã‚°ãƒ•ァイルã«é–¢ã‚ã‚‰ãšæ–°ã—ã„エントリーã”ã¨ã«å¢—分ã•れるã®ã§ã€ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®å޳坆ãªé †ç•ªã‚’知るã“ã¨ãŒã§ãã¾ã™ã€‚ +* `connection_uuid`: 4Dクライアントã§ä½œæˆã•れサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ 4Dプロセスã«ã¤ã„ã¦ã¯ã€ã“ã®æŽ¥ç¶šUUID ãŒã‚µãƒ¼ãƒãƒ¼å´ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã¨ã§è¨˜éŒ²ã•れã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šå„プロセスを開始ã—ãŸãƒªãƒ¢ãƒ¼ãƒˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’ç°¡å˜ã«è­˜åˆ¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 4DRequestsLog.txt + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—㟠4D Serverマシンã‚ã‚‹ã„㯠4Dリモートマシンã«ã‚ˆã£ã¦ãŠã“ãªã‚れる標準ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’記録ã—ã¾ã™ (Webリクエストを除ã)。 + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +* サーãƒãƒ¼ä¸Š: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) +// サーãƒãƒ¼ã‚µã‚¤ãƒ‰ +``` + + +* クライアント上: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) +// リモートサイド +``` +> ã“ã®å®£è¨€ã¯ [4DRequestsLog_ProcessInfo.txt](#4drequestslog_processinfotxt) ログファイルも開始ã•ã›ã¾ã™ã€‚ + +#### ヘッダー + +ã“ã®ãƒ•ァイルã¯ä»¥ä¸‹ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™: + +* Logã‚»ãƒƒã‚·ãƒ§ãƒ³è­˜åˆ¥å­ +* アプリケーションをホストã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå +* ユーザーログインå: サーãƒãƒ¼ä¸Šã§ 4Dアプリケーションを実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã® OS上ã®ãƒ­ã‚°ã‚¤ãƒ³å + +#### 内容 + +å„リクエストã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | +| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sequence_number | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | +| time | 'YYYY-MM-DDTHH:MM:SS.mmm' ã® ISO 8601フォーマットを使用ã—ãŸæ—¥ä»˜ã¨æ™‚é–“ | +| systemid | システムID | +| component | コンãƒãƒ¼ãƒãƒ³ãƒˆç½²å (例: '4SQLS' ã¾ãŸã¯ 'dbmg') | +| process\_info\_index | 4DRequestsLog_ProcessInfo.txt ログ㮠"index"フ ィールドã«å¯¾å¿œã—ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¨ãƒ—ロセスã®ãƒªãƒ³ã‚¯ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ | +| request | C/Sã§ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆIDã€ã‚ã‚‹ã„㯠SQLリクエストã¾ãŸã¯ `LOG EVENT` メッセージ用ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸æ–‡å­—列 | +| bytes_in | å—ä¿¡ã—ãŸãƒã‚¤ãƒˆæ•° | +| bytes_out | é€ä¿¡ã—ãŸãƒã‚¤ãƒˆæ•° | +| server\_duration | exec\_duration | ログãŒç”Ÿæˆã•れãŸå ´æ‰€ã«ã‚ˆã£ã¦å¤‰ã‚りã¾ã™:

      • *server\_duration* (クライアント上ã§ç”Ÿæˆã•れãŸå ´åˆ) -- サーãƒãƒ¼ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã—ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’è¿”ã™ã¾ã§ã«ã‹ã‹ã£ãŸæ™‚é–“ (マイクロ秒å˜ä½)。 以下ã®ç”»åƒã® Bã‹ã‚‰ Fã¾ã§ã«ç›¸å½“ã—ã¾ã™ã€‚
        ã‚ã‚‹ã„ã¯
      • *exec\_duration* (サーãƒãƒ¼ä¸Šã§ç”Ÿæˆã•れãŸå ´åˆ) -- サーãƒãƒ¼ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã™ã‚‹ã¾ã§ã«ã‹ã‹ã£ãŸæ™‚é–“ (マイクロ秒å˜ä½)。 以下ã®ç”»åƒã® Bã‹ã‚‰ Eã¾ã§ã«ç›¸å½“ã—ã¾ã™ã€‚
      • | +| write\_duration | 次ã®ã‚‚ã®ã‚’é€ä¿¡ã™ã‚‹ã®ã«ã‹ã‹ã£ãŸæ™‚é–“ (μs):

      • リクエスト (クライアント上ã§å®Ÿè¡Œã•れãŸå ´åˆ)。 以下ã®ç”»åƒã® Aã‹ã‚‰ Bã¾ã§ã«ç›¸å½“ã—ã¾ã™ã€‚
      • レスãƒãƒ³ã‚¹ (サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れãŸå ´åˆ)。 以下ã®ç”»åƒã® Eã‹ã‚‰ Fã¾ã§ã«ç›¸å½“ã—ã¾ã™ã€‚
      • | +| task_kind | プリエンプティブã‹ã‚³ã‚ªãƒšãƒ©ãƒ†ã‚£ãƒ–ã‹ (ãれãžã‚Œ 'p' 㨠'c' ã§è¡¨ã•れる) | +| rtt | クライアントãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã—ã¦ã‚µãƒ¼ãƒãƒ¼ãŒãれをå—ã‘å–ã‚‹ã¾ã§ã«ã‹ã‹ã‚‹æ™‚é–“ã®æ¦‚ç®— (マイクロ秒å˜ä½)。 以下ã®ç”»åƒã® Aã‹ã‚‰ Dã¾ã§ã¨ Eã‹ã‚‰ Hã¾ã§ã«ç›¸å½“ã—ã¾ã™ã€‚

      • ServerNet ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ã‚¤ãƒ¤ãƒ¼ã‚’使用ã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿è¨ˆæ¸¬ã•れã¾ã™ã€‚æ—§å¼ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ã‚¤ãƒ¤ã‚’使用ã—ã¦ã„ãŸå ´åˆã«ã¯ 0 ãŒè¿”ã•れã¾ã™ã€‚
      • Windows 10ã€ã‚ã‚‹ã„㯠Windows Server 2016 以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Windows ã«ãŠã„ã¦ã¯ã€ã“れを呼ã³å‡ºã™ã¨ 0 ãŒè¿”ã•れã¾ã™ã€‚
      • | + +リクエストフロー: + +![](assets/en/Admin/logRequestFlow.PNG) + +## 4DRequestsLog_ProcessInfo.txt + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—㟠4D Serverマシンã‚ã‚‹ã„㯠4Dリモートマシンã«ã‚ˆã£ã¦ä½œæˆã•れãŸå„プロセスã«ã¤ã„ã¦ã®æƒ…報を記録ã—ã¾ã™ (Webリクエストを除ã)。 + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +* サーãƒãƒ¼ä¸Š: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) // サーãƒãƒ¼ã‚µã‚¤ãƒ‰ +``` + +* クライアント上: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) // リモートサイド +``` +> ã“ã®å®£è¨€ã¯ [4DRequestsLog.txt](#4drequestslogtxt) ログファイルも開始ã•ã›ã¾ã™ã€‚ + +#### ヘッダー + +ã“ã®ãƒ•ァイルã¯ä»¥ä¸‹ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™: + +* Logã‚»ãƒƒã‚·ãƒ§ãƒ³è­˜åˆ¥å­ +* アプリケーションをホストã—ã¦ã„るサーãƒãƒ¼ã®ãƒ›ã‚¹ãƒˆå +* ユーザーログインå: サーãƒãƒ¼ä¸Šã§ 4Dアプリケーションを実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã® OS上ã®ãƒ­ã‚°ã‚¤ãƒ³å + + +#### 内容 + +å„プロセスã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | +| --------------------------------- | ---------------------------------------------------- | +| sequence_number | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | +| time | "YYYY-MM-DDTHH:MM:SS.mmm" ã® ISO 8601フォーマットを使用ã—ãŸæ—¥ä»˜ã¨æ™‚é–“ | +| process\_info\_index | 固有ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªãƒ—ãƒ­ã‚»ã‚¹ç•ªå· | +| CDB4DBaseContext | DB4Dコンãƒãƒ¼ãƒãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆUUID | +| systemid | システムID | +| server\_process\_id | サーãƒãƒ¼ä¸Šã®ãƒ—ロセスID | +| remote\_process\_id | クライアント上ã®ãƒ—ロセスID | +| process\_name | プロセスå | +| cID | 4D接続ã®è­˜åˆ¥å­ | +| uID | 4Dクライアントã®è­˜åˆ¥å­ | +| IP Client | IPv4/IPv6アドレス | +| host_name | クライアントã®ãƒ›ã‚¹ãƒˆå | +| user_name | クライアント上ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ­ã‚°ã‚¤ãƒ³å | +| connection\_uuid | プロセス接続㮠UUIDè­˜åˆ¥å­ | +| server\_process\_unique\_id | サーãƒãƒ¼ä¸Šã®å›ºæœ‰ãƒ—ロセスID | + +## HTTPDebugLog.txt + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€å„ HTTPリクエストã¨ãれãžã‚Œã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’ rawモードã§è¨˜éŒ²ã—ã¾ã™ã€‚ ヘッダーをå«ã‚€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå…¨ä½“ãŒè¨˜éŒ²ã•れã€ã‚ªãƒ—ションã§ãƒœãƒ‡ã‚£éƒ¨åˆ†ã‚‚記録ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +```4d +WEB SET OPTION(Web debug log;wdl enable without body) // ä»–ã®å€¤ã‚‚使用å¯èƒ½ +``` + +リクエストã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ä¸¡æ–¹ã«å¯¾ã—ã¦ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | +| -------------- | ----------------------------------- | +| SocketID | 通信ã«ä½¿ç”¨ã•れãŸã‚½ã‚±ãƒƒãƒˆã® ID | +| PeerIP | ホスト (ã‚ã‚‹ã„ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ã® IPv4アドレス | +| PeerPort | ホスト (ã‚ã‚‹ã„ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ãŒä½¿ç”¨ã—ãŸãƒãƒ¼ãƒˆç•ªå· | +| TimeStamp | (システムãŒé–‹å§‹ã•れã¦ã‹ã‚‰ã®) ミリ秒å˜ä½ã§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ— | +| ConnectionID | 接続UUID (通信ã«ä½¿ç”¨ã•れ㟠VTCPSocket ã® UUID) | +| SequenceNumber | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | + +## 4DDebugLog.txt (標準) + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€4Dプログラミングレベルã§ç™ºç”Ÿã™ã‚‹ãれãžã‚Œã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’記録ã—ã¾ã™ã€‚ 標準モードã§ã¯ã‚¤ãƒ™ãƒ³ãƒˆã®åŸºæœ¬çš„ãªãƒ“ューをæä¾›ã—ã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2) +// 標準ã€å…¨ãƒ—ロセスを記録 + +SET DATABASE PARAMETER(Current process debug log recording;2) +// 標準ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã®ã¿ã‚’記録 +``` + +ãれãžã‚Œã®ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| ã‚«ãƒ©ãƒ ç•ªå· | 説明 | +| ----- | ------------------------------------------------------------------ | +| 1 | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | +| 2 | ISO 8601ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ—¥ä»˜ã¨æ™‚é–“ (YYYY-MM-DDTHH:MM:SS.mmm) | +| 3 | プロセスID (p=xx) ã¨å›ºæœ‰ãƒ—ロセスID (puid=xx) | +| 4 | スタックレベル | +| 5 | コマンドå/メソッドå/メッセージ/タスクã®é–‹å§‹ãƒ»åœæ­¢æƒ…å ±/プラグインåã€ã‚¤ãƒ™ãƒ³ãƒˆã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯UUID ã¾ãŸã¯æŽ¥ç¶šUUID | +| 6 | ログオペレーションã«ã‹ã‹ã£ãŸæ™‚é–“ (ミリ秒å˜ä½) | + +## 4DDebugLog.txt (タブ分ã‘) + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€4Dã®ãƒ—ログラミングレベルã§ç™ºç”Ÿã™ã‚‹å„イベントã«ã¤ã„ã¦ã€(æ¨™æº–ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã«æ¯”ã¹ã¦) 追加情報をå«ã‚ãŸã€ã‚¿ãƒ–分ã‘ã•れãŸã‚³ãƒ³ãƒ‘クトãªãƒ•ォーマットã§è¨˜éŒ²ã—ã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2+4) +// æ‹¡å¼µã•れãŸã‚¿ãƒ–分ã‘ã•れãŸãƒ•ォーマットã€å…¨ãƒ—ロセスを記録 + +SET DATABASE PARAMETER(Current process debug log recording;2+4) +// æ‹¡å¼µã•れãŸã‚¿ãƒ–分ã‘ã•れãŸãƒ•ォーマットã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã®ã¿ã‚’記録 +``` + +ãれãžã‚Œã®ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| ã‚«ãƒ©ãƒ ç•ªå· | フィールドå | 説明 | +| ----- | --------------- | ------------------------------ | +| 1 | sequence_number | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | + +|2| time| ISO 8601ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ—¥ä»˜ã¨æ™‚é–“ (YYYY-MM-DDThh:mm:ss.mmm) | |3| ProcessID|プロセスID| |4| unique_processID|固有プロセスID| |5| stack_level|スタックレベル |6| operation_type| ログオペレーションタイプ。 ã“ã®å€¤ã¯çµ¶å¯¾å€¤ã‚’å–ã‚‹ã“ã¨ãŒã‚りã¾ã™:

        1. コマンド
        2. メソッド (プロジェクトメソッドã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã€ç­‰)
        3. メッセージ ([LOG EVENT](https://doc.4d.com/4dv19/help/command/ja/page667.html) コマンドã«ã‚ˆã£ã¦é€ä¿¡ã•れãŸã‚‚ã®ã®ã¿)
        4. プラグインメッセージ
        5. プラグインイベント
        6. プラグインコマンド
        7. プラグインコールãƒãƒƒã‚¯
        8. タスク
        9. メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ (コレクションã¾ãŸã¯ã‚ªãƒ–ジェクトã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るメソッド)

        スタックレベルを閉ã˜ã‚‹æ™‚ã«ã¯ã€`operation_type`ã€`operation` ãŠã‚ˆã³ `operation_parameters` カラムã«ã¯ `stack_opening_sequence_number` カラムã«è¨˜éŒ²ã•れãŸé–‹å§‹ã‚¹ã‚¿ãƒƒã‚¯ãƒ¬ãƒ™ãƒ«ã¨åŒã˜å€¤ãŒè¨˜éŒ²ã•れã¾ã™ã€‚ ãŸã¨ãˆã°:

        1. 121 15:16:50:777 5 8 1 2 CallMethod Parameters 0
        2. 122 15:16:50:777 5 8 2 1 283 0
        3. 123 15:16:50:777 5 8 2 1 283 0 122 3
        4. 124 15:16:50:777 5 8 1 2 CallMethod Parameters 0 121 61

        1行目㨠2行目ã¯ã‚¹ã‚¿ãƒƒã‚¯ãƒ¬ãƒ™ãƒ«ã‚’é–‹ãã€3行目㨠4行目ã¯ã‚¹ã‚¿ãƒƒã‚¯ãƒ¬ãƒ™ãƒ«ã‚’é–‰ã˜ã¾ã™ã€‚ 6ã€7ã€8カラム目ã®å€¤ã¯ã€çµ‚了スタックレベル行ã«ãŠã„ã¦ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ 10カラム目ã«ã¯ã‚¹ã‚¿ãƒƒã‚¯ãƒ¬ãƒ™ãƒ«é–‹å§‹ç•ªå·ã€ã¤ã¾ã‚Š 3行目㮠122 㨠4行目㮠121 ãŒæ ¼ç´ã•れã¾ã™ã€‚| |7|operation|以下ã®ã„ãšã‚Œã‹ã‚’表ã™å¯èƒ½æ€§ãŒã‚りã¾ã™ (オペレーションタイプã«ã‚ˆã‚‹):
      • ランゲージコマンドID (type=1 ã®å ´åˆ)
      • メソッドå (type=2 ã®å ´åˆ)
      • pluginIndex;pluginCommand ã®çµ„ã¿åˆã‚ã› (type=4ã€5ã€6 ã¾ãŸã¯ 7 ã®å ´åˆ)。 '3;2' ã®ã‚ˆã†ãªå½¢å¼ã§æ ¼ç´ã•れã¾ã™ã€‚
      • タスク接続UUID (type=8 ã®å ´åˆ)
      • +|8|operation_parameters|コマンドã€ãƒ¡ã‚½ãƒƒãƒ‰ã€ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã«æ¸¡ã•れãŸå¼•æ•°| |9|form_event|フォームイベント (ã‚れã°)。ãã®ä»–ã®å ´åˆã«ã¯ç©ºã«ãªã‚Šã¾ã™ (フォームメソッドã¾ãŸã¯ã‚ªãƒ–ジェクトメソッド内ã§ã‚³ãƒ¼ãƒ‰ãŒå®Ÿè¡Œã•れãŸå ´åˆã«ä½¿ç”¨ã•れるã¨è€ƒãˆã¦ä¸‹ã•ã„)| |10|stack_opening_sequence_number|スタックレベルを閉ã˜ã‚‹æ™‚ã®ã¿: 開始スタックレベルã«å¯¾å¿œã™ã‚‹ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·| |11|stack_level_execution_time|スタックレベルを閉ã˜ã‚‹æ™‚ã®ã¿: ç¾åœ¨è¨˜éŒ²ã•れã¦ã„るアクションã®çµŒéŽæ™‚間をマイクロ秒å˜ä½ã§è¡¨ã—ã¾ã™ (上記ログã®123 行目ã¨124 行目㮠10番目ã®ã‚«ãƒ©ãƒ ã‚’å‚ç…§ãã ã•ã„)| + +## 4DDiagnosticLog.txt + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã«ã¯ã€ã‚¢ãƒ—リケーションã®å†…部オペレーションã«é–¢é€£ã—ãŸè¤‡æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒã€äººé–“ã«ã‚‚読ã‚るよã†ã«è¨˜éŒ²ã•れã¾ã™ã€‚ [LOG EVENT](https://doc.4d.com/4dv19/help/command/ja/page667.html) コマンドを使用ã™ã‚‹ã“ã¨ã§ã€ã‚«ã‚¹ã‚¿ãƒ ã®æƒ…報をã“ã®ãƒ•ァイルã«å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +```4d + SET DATABASE PARAMETER(Diagnostic log recording;1) // 記録を開始 +``` + +ãれãžã‚Œã®ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | +| ------------------ | ---------------------------------------------- | +| sequenceNumber | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | +| timestamp | ISO 8601ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ—¥ä»˜ã¨æ™‚é–“ (YYYY-MM-DDTHH:MM:SS.mmm) | +| loggerID | ä»»æ„ | +| componentSignature | ä»»æ„ - 内部コンãƒãƒ¼ãƒãƒ³ãƒˆç½²å | +| messageLevel | 情報ã€è­¦å‘Šã€ã‚¨ãƒ©ãƒ¼ãªã© | +| message | ログエントリーã®è©³ç´° | + +イベントã«ã‚ˆã£ã¦ã€ã‚¿ã‚¹ã‚¯ã€ã‚½ã‚±ãƒƒãƒˆãªã©æ§˜ã€…ãªä»–ã®ãƒ•ィールドを記録ã«å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 4DSMTPLog.txt, 4DPOP3Log.txt, ãŠã‚ˆã³ 4DIMAPLog.txt + +ã“れらã®ãƒ­ã‚°ãƒ•ァイルã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦å§‹å‹•ã•れãŸã€4Dアプリケーションã¨ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒãƒ¼ (SMTPã€POP3ã€IMAP) é–“ã®é€šä¿¡ã‚’ãれãžã‚Œè¨˜éŒ²ã—ã¾ã™: + +* SMTP - [SMTP New transporter](API/SMTPTransporterClass.md#smtp-new-transporter) +* POP3 - [POP3 New transporter](API/POP3TransporterClass.md#pop3-new-transporter) +* IMAP - [IMAP New transporter](API/IMAPTransporterClass.md#imap-new-transporter) + +2種類ã®ãƒ­ã‚°ãƒ•ァイルを生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* 通常ãƒãƒ¼ã‚¸ãƒ§ãƒ³: + * 4DSMTPLog.txt, 4DPOP3Log.txt, ãŠã‚ˆã³ 4DIMAPLog.txt ã¨åå‰ãŒã¤ã‘られã¾ã™ã€‚ + * 添付ファイルã¯å«ã‚ã¾ã›ã‚“ + * 10MBã”ã¨ã®è‡ªå‹•循環ファイルリサイクルを使用ã—ã¾ã™ã€‚ + * 通常ã®ãƒ‡ãƒãƒƒã‚®ãƒ³ã‚°ç”¨é€”を想定ã—ã¦ã„ã¾ã™ã€‚ + + ã“ã®ãƒ­ã‚°ã‚’é–‹å§‹ã™ã‚‹ã«ã¯: + + ```4d + SET DATABASE PARAMETER(SMTP Log;1) // SMTPログを開始 + SET DATABASE PARAMETER(POP3 Log;1) // POP3ログを開始 + SET DATABASE PARAMETER(IMAP Log;1) // IMAPログを開始 + ``` + + 4D Server: 4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã® [メンテナンスページ](https://doc.4d.com/4Dv19/4D/19/Maintenance-Page.300-5422479.ja.html) ã® **リクエストã¨ãƒ‡ãƒãƒƒã‚°ã®ãƒ­ã‚°ã‚’é–‹å§‹** ボタンをクリックã—ã¾ã™ã€‚ + + ã“ã®ãƒ­ã‚°ã®ãƒ‘ス㯠`Get 4D file` コマンドã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ + +* æ‹¡å¼µãƒãƒ¼ã‚¸ãƒ§ãƒ³: + * 添付ファイルもå«ã¾ã‚Œã¾ã™ã€‚ 自動ファイルリサイクルã¯ä½¿ç”¨ã•れã¾ã›ã‚“。 + * カスタムã®åå‰ã‚’使用ã§ãã¾ã™ã€‚ + * 特定ã®ç›®çš„ã®ãŸã‚ã«ç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ + + ã“ã®ãƒ­ã‚°ã‚’é–‹å§‹ã™ã‚‹ã«ã¯: + + ```4d + $server:=New object + ... + // SMTP + $server.logFile:="MySMTPAuthLog.txt" + $transporter:=SMTP New transporter($server) + + // POP3 + $server.logFile:="MyPOP3AuthLog.txt" + $transporter:=POP3 New transporter($server) + + // IMAP + $server.logFile:="MyIMAPAuthLog.txt" + $transporter:=IMAP New transporter($server) + ``` + +#### 内容 + +å„リクエストã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| ã‚«ãƒ©ãƒ ç•ªå· | 説明 | +| ----- | --------------------------------------------- | +| 1 | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | +| 2 | RFC3339 ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ—¥ä»˜ã¨æ™‚é–“ (yyyy-mm-ddThh:mm:ss.ms) | +| 3 | 4DプロセスID | +| 4 | 固有プロセスID | +| 5 |
        • SMTPã€POP3ã€ã¾ãŸã¯ IMAPセッションスタートアップ情報。サーãƒãƒ¼ãƒ›ã‚¹ãƒˆåã€SMTPã€POP3ã€ã¾ãŸã¯ IMAPサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã®ã«ä½¿ç”¨ã•れãŸTCP ãƒãƒ¼ãƒˆç•ªå·ã¨TLSステータス
          +ã‚ã‚‹ã„ã¯
        • サーãƒãƒ¼ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆé–“ã§ã‚„りã¨ã‚Šã•れãŸãƒ‡ãƒ¼ã‚¿ã€‚"S <" (SMTPã€POP3〠ã¾ãŸã¯ IMAPサーãƒãƒ¼ã‹ã‚‰å—ä¿¡ã—ãŸãƒ‡ãƒ¼ã‚¿) ã¾ãŸã¯ "C >" (SMTPã€POP3ã€ã¾ãŸã¯ IMAPクライアントã‹ã‚‰é€ä¿¡ã•れãŸãƒ‡ãƒ¼ã‚¿) ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™: サーãƒãƒ¼ã‹ã‚‰é€ä¿¡ã•れãŸèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã®ä¸€è¦§ã¨é¸æŠžã•れãŸèªè¨¼ãƒ¢ãƒ¼ãƒ‰ã€SMTPã€POP3ã€ã¾ãŸã¯ IMAPサーãƒãƒ¼ã‹ã‚‰å ±å‘Šã•れãŸã‚¨ãƒ©ãƒ¼ã€é€ä¿¡ã•れãŸãƒ¡ãƒ¼ãƒ«ã®ãƒ˜ãƒƒãƒ€ãƒ¼æƒ…å ± (通常ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿) ãŠã‚ˆã³ãƒ¡ãƒ¼ãƒ«ãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã«ä¿å­˜ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã€‚
          +ã‚ã‚‹ã„ã¯
        • SMTPã€POP3ã€ã¾ãŸã¯ IMAPセッションã®åˆ‡æ–­æƒ…å ±
        | + +## ORDAクライアントリクエスト + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ãŒé€ä¿¡ã™ã‚‹ ORDAリクエストãŒè¨˜éŒ²ã•れã¾ã™ã€‚ ログ情報ã¯ãƒ¡ãƒ¢ãƒªã‹ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ­ã‚°ãƒ•ァイルã®åç§°ã‚„ä¿ç®¡å ´æ‰€ã¯ä»»æ„ã«æ±ºã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ã®é–‹å§‹æ–¹æ³•: + +```4d +// リモートマシンã§å®Ÿè¡Œã—ã¾ã™ +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +// メモリã«é€ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ +``` + +ORDAリクエストログã«ãŠã„ã¦ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã‚’使ã†ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«é–‹å§‹ã—ã¾ã™: + +```4d +// リモートマシンã§å®Ÿè¡Œã—ã¾ã™ + +SET DATABASE PARAMETER(Client Log Recording;1) +// ログシーケンス番å·ã®æœ‰åŠ¹åŒ– + +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +// メモリã«é€ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ + +SET DATABASE PARAMETER(Client Log Recording;0) +// ログシーケンス番å·ã®ç„¡åŠ¹åŒ– +``` + +å„リクエストã«å¯¾ã—ã¦ã€ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | 例題 | +| -------------- | ------------------------------ | --------------------------------------------------------- | +| sequenceNumber | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | 104 | +| url | クライアント㮠ORDAリクエストURL | "rest/Persons(30001)" | +| startTime | 開始日時 (ISO 8601 フォーマット) | "2019-05-28T08:25:12.346Z" | +| endTime | 終了日時 (ISO 8601 フォーマット) | "2019-05-28T08:25:12.371Z" | +| duration | ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå‡¦ç†æ™‚é–“ (ミリ秒) | 25 | +| response | サーãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚ªãƒ–ジェクト | {"status":200,"body":{"__entityModel":"Persons",\[...]}} | + + + +## Using a log configuration file + +You can use a **log configuration file** to easily manage log recording in a production environment. This file is preconfigured by the developer. Typically, it can be sent to customers so that they just need to select it or copy it in a local folder. Once enabled, the log configuration file triggers the recording of specific logs. + +### How to enable the file + +There are several ways to enable the log configuration file: + +- On 4D Server with interface, you can open the Maintenance page and click on the [Load logs configuration file](Admin/server-admin.md#load-logs-configuration-file) button, then select the file. In this case, you can use any name for the configuration file. It is immediately enabled on the server. +- You can copy the log configuration file in the [Settings folder](Project/architecture.md#settings-1) of the project. In this case, the file must be named `logConfig.json`. It is enabled at project startup (only on the server in client/server). +- With a built application, you can copy the `logConfig.json` file in the following folder: + + Windows: `Users\[userName]\AppData\Roaming\[application]` + + macOS: `/Users/[userName]/Library/ApplicationSupport/[application]` + +> If you want to enable the log configuration file for all projects in stand-alone, server and remote 4D applications, you can copy the `logConfig.json` file in the following folder: - Windows: `Users\[userName]\AppData\Roaming\4D or \4D Server` - macOS: `/Users/[userName]/Library/ApplicationSupport/4D or /4D Server` + +### JSON file description + +The log configuration file is a `.json` file that can contain the following properties: + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Logs Configuration File", + "description": "A file that controls the state of different types of logs in 4D clients and servers", + "type": "object", + "properties": { + "forceLoggingConfiguration": { + "description": "Forcing the logs configuration described in the file ingoring changes coming from code or user interface", + "type": "boolean", + "default": true + }, + "requestLogs": { + "description": "Configuration for request logs", + "type": "object", + "properties": { + "clientState": { + "description": "Enable/Disable client request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + }, + "serverState": { + "description": "Enable/Disable server request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "debugLogs": { + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "commandList": { + "description": "Commands to log or not log", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "state": { + "description": "integer to specify type of debuglog and options", + + "type": "integer", + "minimum": 0 + } + } + }, + "diagnosticLogs":{ + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "state":{ + "description": "Enable/Disable diagnostic logs 0 or 1 (0 = do not record, 1 = record)", + "type": "integer", + "minimum": 0 + } + } + }, + "httpDebugLogs": { + "description": "Configuration for http debug logs", + "type": "object", + "properties": { + "level": { + "description": "Configure http request logs", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "state": { + "description": "Enable/Disable recording of web requests", + "type": "integer", + "minimum": 0, + "maximum": 4 + } + } + }, + "POP3Logs": { + "description": "Configuration for POP3 logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable POP3 logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "SMTPLogs": { + "description": "Configuration for SMTP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable SMTP log recording (form 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "IMAPLogs": { + "description": "Configuration for IMAP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable IMAP log recording (form 0 to N)", + "type": "integer" + } + } + }, + "ORDALogs": { + "description": "Configuration for ORDA logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable ORDA logs (0 or 1)", + "type": "integer" + }, + "filename": { + "type": "string" + } + } + } + } +} +``` + +### 例題 + +Here is an example of log configuration file: + +```json +{ + "forceLoggingConfiguration": false, + "requestLogs": { + "clientState": 1, + "serverState": 1 + }, + "debugLogs": { + "commandList":["322","311","112"], + "state": 4 + }, + "diagnosticLogs":{ + "state" : 1 + }, + "httpDebugLogs": { + "level": 5, + "state" : 1 + }, + "POP3Logs": { + "state" : 1 + }, + "SMTPLogs": { + "state" : 1 + }, + "IMAPLogs": { + "state" : 1 + }, + "ORDALogs": { + "state" : 1, + "filename": "ORDALog.txt" + } +} +``` \ No newline at end of file diff --git a/website/translated_docs/ja/Admin/licenses.md b/website/translated_docs/ja/Admin/licenses.md new file mode 100644 index 00000000000000..4758bc216a8086 --- /dev/null +++ b/website/translated_docs/ja/Admin/licenses.md @@ -0,0 +1,146 @@ +--- +id: licenses +title: 4D ライセンスã®ç®¡ç† +--- + +ディスクã¸ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«çµ‚了後ã€4D 製å“を利用ã™ã‚‹ãŸã‚ã«ã¯ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ãŠã“ãªã„ã¾ã™ã€‚ [4D アカウントã§ã‚µã‚¤ãƒ³ã‚¤ãƒ³](GettingStarted/Installation.md) ã—ãŸå ´åˆã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ãŠã“ãªã‚れã¾ã™ã€‚ + +ã—ã‹ã—ã€å ´åˆã«ã‚ˆã£ã¦ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’手動ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ãŸã¨ãˆã°: + +- 自動アクティベーションãŒå¯èƒ½ã§ãªã„å ´åˆ +- 追加ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’購入ã—ãŸå ´åˆ + +以下ã®åˆ©ç”¨ãƒ¢ãƒ¼ãƒ‰ã®å ´åˆã«ã¯ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ã¯å¿…è¦ã¯ã‚りã¾ã›ã‚“: + +- リモートモードã§åˆ©ç”¨ã•れる 4D (4D Serverã¸ã®æŽ¥ç¶š) +- インタープリターモードã®ã‚¢ãƒ—リケーションプロジェクトを開ãå ´åˆã§ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã¸ã¯ã‚¢ã‚¯ã‚»ã‚¹ã—ãªã„ローカルモードã®4D + + +## åˆå›žã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ + +4D ã§ãŠã“ãªã†å ´åˆã¯ã€**ヘルプ** メニューã‹ã‚‰ **ライセンスマãƒãƒ¼ã‚¸ãƒ£ãƒ¼...** ã‚’é¸æŠžã—ã¾ã™ã€‚ 4D Server ã§ãŠã“ãªã†å ´åˆã¯ã€4D Server アプリケーションを起動ã—ã¾ã™ã€‚ [アクティベーションモード](#アクティベーションモード) ã‚’é¸æŠžã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/getStart/server1.png) + +4D 㯠3ã¤ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ãƒ¢ãƒ¼ãƒ‰ã‚’用æ„ã—ã¦ã„ã¾ã™ã€‚ 推奨ã•れるã®ã¯ **オンラインアクティベーション** ã§ã™ã€‚ + +### オンラインアクティベーション + +ユーザーID (メールアドレスã¾ãŸã¯ 4Dアカウント) ã¨ãƒ‘スワードを入力ã—ã¾ã™ã€‚ 既存ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒç„¡ã„å ´åˆã€ã¾ãšä»¥ä¸‹ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‹ã‚‰ä½œæˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +[https://account.4d.com/us/login.shtml](https://account.4d.com/us/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 + +- +- diff --git a/website/translated_docs/ja/Admin/server-admin.md b/website/translated_docs/ja/Admin/server-admin.md new file mode 100644 index 00000000000000..ee168fe42e5bc0 --- /dev/null +++ b/website/translated_docs/ja/Admin/server-admin.md @@ -0,0 +1,526 @@ +--- +id: server-admin +title: 4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ +--- + + +Windows ã¾ãŸã¯ macOS上ã§ã€4D Server をインターフェースã‚りã§èµ·å‹•ã™ã‚‹ã¨ã€ã‚°ãƒ©ãƒ•ィカルãªç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒåˆ©ç”¨ã§ãã€å…¬é–‹ã•れ㟠4Dアプリケーション用ã«å¤šãã®è§£æžãƒ»åˆ¶å¾¡ãƒ„ールをæä¾›ã—ã¾ã™ã€‚ é–‹ã„ã¦ã„るプロジェクト㮠4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã™ã‚‹ã«ã¯ã€**ウィンドウ>管ç†** ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã‚’é¸æŠžã™ã‚‹ã‹ã€**Ctrl+U** を押ã—ã¾ã™ã€‚ + +> 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ãƒªãƒ¢ãƒ¼ãƒˆã® 4D ã‹ã‚‰ã‚‚アクセスå¯èƒ½ã§ã™ã€‚ ã“ã®ç‚¹ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€ リモートマシンã‹ã‚‰ã®ç®¡ç†ã‚’å‚ç…§ãã ã•ã„。 + + +## モニターページ + +**モニター** ページã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹åˆ©ç”¨ã«é–¢ã™ã‚‹å‹•çš„ãªæƒ…å ±ã®ã»ã‹ã€ã‚·ã‚¹ãƒ†ãƒ ã‚„ 4D Serverã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/Admin/server-admin.png) + +> Windows ã§ã¯ã€ã“ã®ãƒšãƒ¼ã‚¸ã«è¡¨ç¤ºã•れるシステム情報ã®ä¸€éƒ¨ã¯ã€Windows パフォーマンスアナライザー (WPA) ツールを介ã—ã¦å–å¾—ã•れã¾ã™ã€‚ ã“れらã®ãƒ„ールã¯ã€4D Server ã‚’èµ·å‹•ã—ãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ã„ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã€å¿…è¦ãªç®¡ç†æ¨©é™ã‚’æŒã£ã¦ã„ã‚‹å ´åˆã«ã®ã¿ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +#### グラフィックエリア + +グラフィックエリアã§ã¯ã€è¤‡æ•°ã®ãƒ‘ラメーター (CPU使用率ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ィックã€ãŠã‚ˆã³ãƒ¡ãƒ¢ãƒª) ã®å¤‰åŒ–ãŒãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ウィンドウã®ä¸­å¤®ã«ã‚るメニューã‹ã‚‰è¡¨ç¤ºã™ã‚‹å†…å®¹ã‚’é¸æŠžã—ã¾ã™: + +![](assets/en/Admin/server-graphic.png) + +- **CPU使用率**: ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションã«ã‚ˆã‚‹ãƒžã‚·ãƒ³ã®å…¨ä½“的㪠CPU使用率。 ã“ã®ä½¿ç”¨çއã®ã†ã¡ã® 4D Server ã«ã‚ˆã‚‹ä½¿ç”¨åˆ†ã¯ã€"プロセッサー" æƒ…å ±ã‚¨ãƒªã‚¢ã§æä¾›ã•れã¾ã™ã€‚ +- **ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯**: マシン (サーãƒãƒ¼ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ㌠1ç§’ã‚ãŸã‚Šã«å—ä¿¡ã—ãŸãƒã‚¤ãƒˆæ•°ã€‚ é€ä¿¡ãƒã‚¤ãƒˆæ•°ã¯ "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯" æƒ…å ±ã‚¨ãƒªã‚¢ã§æä¾›ã•れã¾ã™ã€‚ +- **物ç†ãƒ¡ãƒ¢ãƒª**: 4D Server ãŒä½¿ç”¨ã™ã‚‹ã€ãƒžã‚·ãƒ³ã® RAM ã®é‡ã€‚ メモリã®åˆ©ç”¨ã«é–¢ã™ã‚‹ã‚ˆã‚Šè©³ç´°ãªæƒ…報㯠"メモリ" æƒ…å ±ã‚¨ãƒªã‚¢ã§æä¾›ã•れã¾ã™ã€‚ +- **仮想メモリ**: 4D Server アプリケーションãŒä½¿ç”¨ã™ã‚‹ä»®æƒ³ãƒ¡ãƒ¢ãƒªã®é‡ã€‚ ã“ã®ãƒ¡ãƒ¢ãƒªã¯ã€ã‚¢ãƒ—リケーションã®ãƒ‹ãƒ¼ã‚ºã«å¿œã˜ã¦ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã‚Šå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ エリアã®å³ä¸‹ã«è¡¨ç¤ºã•れる値ã¯ã€ç¾åœ¨ä½¿ç”¨ã•れã¦ã„るメモリé‡ã‚’示ã—ã¾ã™ã€‚ 左上ã«è¡¨ç¤ºã•れる値ã¯ã€åˆ©ç”¨å¯èƒ½ãªä»®æƒ³ãƒ¡ãƒ¢ãƒªã®æœ€å¤§å€¤ã‚’示ã—ã¾ã™ã€‚ 最大値ã¯ã€ã‚¢ãƒ—リケーションã®ä¸€èˆ¬ãƒ¡ãƒ¢ãƒªè¨­å®šã«åŸºã¥ãå‹•çš„ã«è¨ˆç®—ã•れã¾ã™ã€‚ +- **キャッシュ**: 4D Server アプリケーションãŒä½¿ç”¨ã™ã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ¡ãƒ¢ãƒªã®é‡ã€‚ エリアã®å³ä¸‹ã«è¡¨ç¤ºã•れる値ã¯ã€ç¾åœ¨ä½¿ç”¨ã•れã¦ã„るメモリé‡ã‚’示ã—ã¾ã™ã€‚ 左上ã«è¡¨ç¤ºã•れる値ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã«ã¦æŒ‡å®šã•れãŸã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ¡ãƒ¢ãƒªã®åˆè¨ˆã‚µã‚¤ã‚ºã‚’示ã—ã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ‰åйãªè§£æžã‚’ãŠã“ãªã†ãŸã‚ã«é•·ã‚ã®è¦³æ¸¬æ™‚é–“ãŒå¿…è¦ã¨ãªã‚‹ãŸã‚ã€ã‚°ãƒ©ãƒ•エリアã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã¯é…ããªã‚Šã¾ã™ã€‚ + + +#### 概è¦ã‚¨ãƒªã‚¢ + +"概è¦" エリアã§ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã€ã‚¢ãƒ—リケーションã€ãã—㦠4D Server マシンã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã«é–¢ã™ã‚‹æ§˜ã€…ãªæƒ…å ±ãŒæä¾›ã•れã¾ã™ã€‚ + +- **システム情報**: サーãƒãƒ¼ã®ãƒžã‚·ãƒ³ã€ã‚·ã‚¹ãƒ†ãƒ ãŠã‚ˆã³ IPアドレス +- **アプリケーション情報**: 4D Server ã®å†…部ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ãŠã‚ˆã³ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚·ãƒ£ãƒ‰ã‚¦ã‚³ãƒ”ーステータス +- **最大接続数**: サーãƒãƒ¼ã‚¿ã‚¤ãƒ—毎ã«å¯èƒ½ãªåŒæ™‚接続数 +- **ライセンス**: ライセンスã®è©³ç´°ã€‚ プロダクトライセンスã€ã‚ã‚‹ã„ã¯ä»˜éšã‚¨ã‚¯ã‚¹ãƒ‘ンションã®ã„ãšã‚Œã‹ãŒ 10日以内ã«å¤±åйã™ã‚‹ã¨ã (例: サブスクリプション型ライセンスãªã©)ã€4D Server ã¯è‡ªå‹•çš„ã«ãã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’ 4Dユーザーアカウントã‹ã‚‰æ›´æ–°ã—よã†ã¨ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ãªã‚“らã‹ã®ç†ç”± (接続エラーã€ç„¡åйãªã‚¢ã‚«ã‚¦ãƒ³ãƒˆçŠ¶æ…‹ã€å¥‘ç´„ãŒå»¶é•·ã•れã¦ã„ãªã„ãªã©) ã§è‡ªå‹•æ›´æ–°ãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚µãƒ¼ãƒãƒ¼ç®¡ç†è€…ã«è­¦å‘Šã‚’ä¼ãˆã‚‹ã‚¢ã‚¤ã‚³ãƒ³ãŒãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®éš£ã«è¡¨ç¤ºã•れã¾ã™ã€‚ エリア上ã«ãƒžã‚¦ã‚¹ã‚’ホãƒãƒ¼ã•ã›ã‚‹ã¨ã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æ›´æ–°çŠ¶æ…‹ã«ã¤ã„ã¦ã®è¿½åŠ ã®æƒ…報㌠tips ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Admin/server-licence-failed.png) + +ã“ã†ã„ã£ãŸå ´åˆã«ã¯é€šå¸¸ã€[**ライセンスマãƒãƒ¼ã‚¸ãƒ£ãƒ¼**](licenses.md) ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +#### 詳細エリア + +"詳細" エリアã¯ã€ã™ã§ã«ã‚°ãƒ©ãƒ•ィックエリアã§è¡¨ç¤ºã•れã¦ã„る情報ã®ä¸€éƒ¨ã¨ã€è¿½åŠ ã®æƒ…報をæä¾›ã—ã¾ã™ã€‚ + +- **ãƒãƒ¼ãƒ‰ãƒ‡ã‚£ã‚¹ã‚¯**: ãƒãƒ¼ãƒ‰ãƒ‡ã‚£ã‚¹ã‚¯å…¨ä½“ã€ãŠã‚ˆã³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ‡ãƒ¼ã‚¿ ( データファイルã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãƒ•ァイル) ã®ä½¿ç”¨ã‚¹ãƒšãƒ¼ã‚¹ã€ä»–ã®ãƒ•ァイルã®ä½¿ç”¨ã‚¹ãƒšãƒ¼ã‚¹ã€ç©ºãスペースãªã©ã‚’表示ã—ã¾ã™ã€‚ +- **メモリ**: マシンã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れ㟠RAMメモリã€4D Server ã«ã‚ˆã‚‹ä½¿ç”¨é‡ã€ä»–ã®ã‚¢ãƒ—リケーションã«ã‚ˆã‚‹ä½¿ç”¨é‡ã€ãŠã‚ˆã³ç©ºã容é‡ã€‚ 4D Server ãŒä½¿ç”¨ã™ã‚‹ãƒ¡ãƒ¢ãƒªã¯ã‚°ãƒ©ãƒ•ィックエリアã«ã‚‚å‹•çš„ã«è¡¨ç¤ºã§ãã¾ã™ã€‚ +- **プロセッサー**: 4D Server ã¨ä»–ã®ã‚¢ãƒ—リケーションã«ã‚ˆã‚‹ã€ãƒ—ロセッサーã®ä½¿ç”¨çŽ‡ã€‚ ã“ã®ä½¿ç”¨çއã¯çµ¶ãˆãšå†è¨ˆç®—ã•れã¾ã™ã€‚ 4D Server ã«ã‚ˆã‚‹ä½¿ç”¨çއã¯ã‚°ãƒ©ãƒ•ィックエリアã«ã‚‚å‹•çš„ã«è¡¨ç¤ºã§ãã¾ã™ã€‚ +- **ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯**: マシン (サーãƒãƒ¼ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ãŒå—ä¿¡ãŠã‚ˆã³é€ä¿¡ã—ãŸãã®çž¬é–“ã®ãƒã‚¤ãƒˆæ•°ã€‚ ã“ã®å€¤ã¯çµ¶ãˆãšæ›´æ–°ã•れã¾ã™ã€‚ å—ä¿¡ã—ãŸãƒã‚¤ãƒˆæ•°ã¯ã‚°ãƒ©ãƒ•ィックエリアã«ã‚‚å‹•çš„ã«è¡¨ç¤ºã§ãã¾ã™ã€‚ + + +## ユーザーページ + +**ユーザー** ページã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã—ã¦ã„るユーザーãŒè¡¨ç¤ºã•れã¾ã™: + + +![](assets/en/Admin/server-users.png) + +"ユーザー" ボタンã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŽ¥ç¶šä¸­ã®ãƒ¦ãƒ¼ã‚¶æ•°ãŒæ‹¬å¼§å†…ã«è¡¨ç¤ºã•れã¾ã™ (ã“ã®ç•ªå·ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«é©ç”¨ã•れる表示フィルターを考慮ã—ã¾ã›ã‚“)。 ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã€å‹•çš„ãªæ¤œç´¢ã‚¨ãƒªã‚¢ã‚„コントロールボタンもã‚りã¾ã™ã€‚ ヘッダーエリアをドラッグ&ドロップã—ã¦ã€åˆ—ã®é †ç•ªã‚’入れ替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆã®å€¤ãŒä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ クリックã™ã‚‹ã”ã¨ã«æ˜‡é †/é™é †ãŒå…¥ã‚Œæ›¿ã‚りã¾ã™ã€‚ + +![](assets/en/Admin/server-users-sort.png) + +### ユーザーリスト + +サーãƒãƒ¼ã«æŽ¥ç¶šã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã”ã¨ã«ã€ä»¥ä¸‹ã®æƒ…å ±ãŒãƒªã‚¹ãƒˆã«è¡¨ç¤ºã•れã¾ã™: + +- システム: クライアントマシンã®ã‚·ã‚¹ãƒ†ãƒ  (macOS/Windows)。 +- **4Dユーザー**: 4Dユーザーåã€ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒžã‚·ãƒ³ä¸Šã§ [`SET USER ALIAS`](https://doc.4d.com/4dv19/help/command/ja/page1666.html) コマンドã§è¨­å®šã•れã¦ã„れã°ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã€‚ ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ã‚·ã‚¹ãƒ†ãƒ ãŒæœ‰åйã«ãªã£ã¦ã„ãªã„å ´åˆã€ã‹ã¤ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚‚設定ã•れã¦ã„ãªã‘れã°ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ "Designer" ã¨ãªã‚Šã¾ã™ã€‚ +- **マシンå**: リモートマシンã®åå‰ã€‚ +- **セッションå**: リモートマシン上ã§é–‹ã‹ã‚ŒãŸã‚»ãƒƒã‚·ãƒ§ãƒ³å。 +- **IP アドレス**: リモートマシン㮠IPアドレス。 +- **ログイン日**: ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ãŒæŽ¥ç¶šã—ãŸæ—¥ä»˜ã¨æ™‚刻。 +- **CPU時間**: 接続ã—ã¦ã‹ã‚‰ã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¶ˆè²»ã—㟠CPU ã®æ™‚é–“ +- **Activity**: 4D Server ãŒã“ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãŸã‚ã«ä½¿ç”¨ã™ã‚‹æ™‚é–“ã®å‰²åˆ (動的表示)。 リモートマシンãŒã‚¹ãƒªãƒ¼ãƒ—モードã«åˆ‡ã‚Šæ›¿ã‚ã£ã¦ã„ã‚‹å ´åˆã«ã¯ "スリープ中" ã¨è¡¨ç¤º (以下å‚ç…§)。 + +#### スリープ中ユーザーã®ç®¡ç† + +4D Server ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹é–“ã«ã‚¹ãƒªãƒ¼ãƒ—モードã¸ã¨åˆ‡ã‚Šæ›¿ã‚ã£ã¦ã—ã¾ã£ãŸ 4Dリモートアプリケーションを実行ã—ã¦ã„るマシンã«ã¤ã„ã¦ã€ç‰¹åˆ¥ãªç®¡ç†ã‚’ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€æŽ¥ç¶šã•れã¦ã„ã‚‹ 4Dリモートアプリケーションã¯ã“ã®æ€¥ãªåˆ‡æ–­ã‚’ 4D Server ã¸ã¨è‡ªå‹•çš„ã«çŸ¥ã‚‰ã›ã¾ã™ã€‚ サーãƒãƒ¼å´ã§ã¯ã€æŽ¥ç¶šã—ã¦ã„るユーザーã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ“ティステータスを **スリープ中** ã¸ã¨å¤‰æ›´ã•れã¾ã™: + +![](assets/en/Admin/server-sleeping.png) + +ã“ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¯ã‚µãƒ¼ãƒãƒ¼å´ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’一部解放ã—ã¾ã™ã€‚ ã“れã«åŠ ãˆã€4Dリモートアプリケーションã¯ã‚¹ãƒªãƒ¼ãƒ—モードã‹ã‚‰å¾©å¸°ã—ãŸã¨ãã«è‡ªå‹•的㫠4D Server ã¸ã¨å†æŽ¥ç¶šã—ã¾ã™ã€‚ + +サãƒãƒ¼ãƒˆã•れるシナリオã¯ã€ä»¥ä¸‹ã®æ§˜ãªã‚‚ã®ã§ã™: ãŸã¨ãˆã°ãŠæ˜¼ä¼‘ã¿ãªã©ã§ãƒªãƒ¢ãƒ¼ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒä½œæ¥­ã‚’中断ã™ã‚‹ã‚‚ã€ã‚µãƒ¼ãƒãƒ¼ã¨ã®æŽ¥ç¶šã¯é–‹ã„ãŸã¾ã¾ã«ã—ãŸã¨ã—ã¾ã™ã€‚ マシンã¯ã‚¹ãƒªãƒ¼ãƒ—モードã¸ã¨åˆ‡ã‚Šæ›¿ã‚りã¾ã™ã€‚ ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæˆ»ã£ã¦ãã¦ãƒžã‚·ãƒ³ã‚’スリープã‹ã‚‰å¾©å¸°ã•ã›ã‚‹ã¨ã€4Dリモートアプリケーションã¯è‡ªå‹•çš„ã«ã‚µãƒ¼ãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’復元ã™ã‚‹ã¨ã¨ã‚‚ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚‚復元ã—ã¾ã™ã€‚ + +> スリープ状態ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯ã€48時間活動ã—ãªã„ã¨ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰è‡ªå‹•çš„ã«åˆ‡æ–­ã•れã¾ã™ã€‚ ã“ã®ãƒ‡ãƒ•ォルトã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’変更ã™ã‚‹ã«ã¯ã€[`SET DATABASE PARAMETER`](https://doc.4d.com/4dv19/help/command/ja/page642.html) コマンド㮠`Remote connection sleep timeout` セレクターを使用ã—ã¾ã™ã€‚ + + +### 検索/フィルターエリア + +ã“ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã€æ¤œç´¢ã‚¨ãƒªã‚¢ã«å…¥åŠ›ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã«å¯¾å¿œã™ã‚‹è¡Œã ã‘をリストã«è¡¨ç¤ºã•ã›ã€è¡Œæ•°ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ エリアã«ã¯ã€ã©ã®åˆ—ã«å¯¾ã—ã¦æ¤œç´¢/フィルターãŒå®Ÿè¡Œã•れるã‹ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚ ユーザーページã§ã¯ã€4D ユーザーã€ãƒžã‚·ãƒ³åã€ãã—ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³åã§ã™ã€‚ + +エリアã«ãƒ†ã‚­ã‚¹ãƒˆãŒå…¥åŠ›ã•れるã¨ã€ãƒªã‚¹ãƒˆã¯ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§æ›´æ–°ã•れã¾ã™ã€‚ 値をセミコロンã§åŒºåˆ‡ã‚‹ã“ã¨ã§ã€ä¸€ã¤ä»¥ä¸Šã®å€¤ã‚’使用ã—ã¦æ¤œç´¢ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆ `OR` ã‚¿ã‚¤ãƒ—ã®æ¼”ç®—ãŒãŠã“ãªã‚れã¾ã™ã€‚ ãŸã¨ãˆã°ã€"John;Mary;Peter" ã¨å…¥åŠ›ã™ã‚‹ã¨ã€John ã¾ãŸã¯ Mary ã¾ãŸã¯ Peter ãŒå¯¾è±¡ã¨ãªã‚‹åˆ—ã«ã‚る行ã®ã¿ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + +### 管ç†ãƒœã‚¿ãƒ³ + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ 3ã¤ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒœã‚¿ãƒ³ãŒã‚りã¾ã™ã€‚ ã“れらã®ãƒœã‚¿ãƒ³ã¯ã€æœ€ä½Ž 1ã¤ã®è¡ŒãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã«æœ‰åйã«ãªã‚Šã¾ã™ã€‚ **Shift**キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦é€£ç¶šã—ãŸè¡Œã‚’ã€ã‚ã‚‹ã„㯠**Ctrl** (Windows) / **Command** (macOS) キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã—ã¦é€£ç¶šã—ãªã„è¡Œã‚’è¤‡æ•°é¸æŠžã§ãã¾ã™ã€‚ + +#### メッセージé€ä¿¡ + +ã“ã®ãƒœã‚¿ãƒ³ã‚’使用ã—ã¦ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§é¸æŠžã—㟠4Dユーザーã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’é€ä¿¡ã§ãã¾ã™ã€‚ ユーザーãŒé¸æŠžã•れã¦ã„ãªã„ã¨ã€ãƒœã‚¿ãƒ³ã‚’使用ã§ãã¾ã›ã‚“。 ボタンをクリックã™ã‚‹ã¨ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’入力ã§ãã¾ã™ã€‚ ダイアログã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’å—ä¿¡ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æ•°ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Admin/server-message.png) + +クライアントマシン上ã§ã“ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¯è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ + +> [`SEND MESSAGE TO REMOTE USER`](https://doc.4d.com/4dv19/help/command/ja/page1632.html) コマンドを使用ã™ã‚‹ã“ã¨ã§ã‚‚ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦åŒã˜ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### プロセス監視 + +ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€é¸æŠžã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ—ロセスをã€ç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã® [**プロセス** ページ](#プロセスページ) ã«ç›´æŽ¥è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ボタンをクリックã™ã‚‹ã¨ã€4D Server ã¯ãƒ—ロセスページã«ç§»å‹•ã—ã€ã“ã®ãƒšãƒ¼ã‚¸ã®æ¤œç´¢/フィルターエリアã«é¸æŠžã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åを入力ã—ã¾ã™ã€‚ + +#### ユーザーをドロップ + +ã“ã®ãƒœã‚¿ãƒ³ã¯ã€é¸æŠžã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æŽ¥ç¶šã‚’強制的ã«è§£é™¤ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã€æŽ¥ç¶šè§£é™¤ã‚’å®Ÿè¡Œã™ã‚‹ã‹ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã‹é¸æŠžã§ãã¾ã™ã€‚確èªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãªã—ã«é¸æŠžãƒ¦ãƒ¼ã‚¶ãƒ¼ã®æŽ¥ç¶šã‚’解除ã™ã‚‹ã«ã¯ã€**Alt**キーを押ã—ãªãŒã‚‰ã€**ユーザーをドロップ** ボタンをクリックã—ã¾ã™ã€‚ + +> [`DROP REMOTE USER`](https://doc.4d.com/4dv19/help/command/ja/page1633.html) コマンドを使用ã™ã‚‹ã“ã¨ã§ã‚‚ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦åŒã˜ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## プロセスページ + +**プロセス** ページã«ã¯å®Ÿè¡Œä¸­ã®ãƒ—ロセスãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/Admin/server-admin-process-page.png) + + +"プロセス" ボタンã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã§å®Ÿè¡Œä¸­ã®ãƒ—ãƒ­ã‚»ã‚¹æ•°ãŒæ‹¬å¼§å†…ã«è¡¨ç¤ºã•れã¾ã™ (ã“ã®ç•ªå·ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«é©ç”¨ã•れる表示フィルターや **グループ毎ã«ãƒ—ロセスを表示** オプションã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’考慮ã—ã¾ã›ã‚“)。 + +列ヘッダーをドラッグ&ドロップã—ã¦ã€åˆ—ã®é †ç•ªã‚’入れ替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆã®å€¤ãŒä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¾ã™ã€‚ + +ユーザーページã¨åŒæ§˜ã«ã“ã®ãƒšãƒ¼ã‚¸ã«ã‚‚ã€æ¤œç´¢æ¬„ã«å…¥åŠ›ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã«å¯¾å¿œã™ã‚‹è¡Œã ã‘をリストã«è¡¨ç¤ºã•ã›ã€è¡Œæ•°ã‚’減らã™ã“ã¨ãŒã§ãる動的㪠[検索/フィルターエリア](#検索フィルターエリア) ãŒã‚りã¾ã™ã€‚ 検索/フィルターã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¨ãƒ—ロセスåã®åˆ—ã«å¯¾ã—ã¦å®Ÿè¡Œã•れã¾ã™ã€‚ + +ウィンドウã«è¡¨ç¤ºã•れるプロセスをã€ã‚¿ã‚¤ãƒ—毎ã«ãƒ•ィルターã™ã‚‹ãŸã‚ã®ãƒœã‚¿ãƒ³ãŒ 3ã¤ã‚りã¾ã™: + +![](assets/en/Admin/server-process-buttons.png) + +- **ユーザープロセス**: ユーザーセッションã«ã‚ˆã‚Šã€ã¾ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ãŸã‚ã«ä½œæˆã•れãŸãƒ—ロセス。 ã“ã®ãƒ—ロセスã«ã¯äººã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **4D プロセス**: 4D Server エンジンãŒç”Ÿæˆã—ãŸãƒ—ロセス。 ã“ã®ãƒ—ロセスã«ã¯æ­¯è»Šã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **予備プロセス**: 使用ã•れã¦ã„ãªã„ãŒä¸€æ™‚çš„ã«ä¿æŒã•れã€ã„ã¤ã§ã‚‚å†åˆ©ç”¨ãŒå¯èƒ½ãªãƒ—ロセス。 ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ 4D Server ã®å応性をå‘上ã•ã›ã¾ã™ã€‚ ã“ã®ãƒ—ロセスã«ã¯è–„æš—ã„人ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +**グループ毎ã«ãƒ—ロセスを表示** オプションを使用ã—ã¦ã€4D Server ã®å†…部プロセスやクライアントプロセスをグループ化ã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨: + +- 4Dクライアントã®ãƒ—ロセス (メイン㮠4Dクライアントプロセスや 4Dクライアントã®åŸºæœ¬ãƒ—ロセス。[プロセスタイプ](#プロセスタイプ) å‚ç…§) 㯠1ã¤ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¾ã™ã€‚ +- "タスクマãƒãƒ¼ã‚¸ãƒ£ãƒ¼" グループãŒä½œæˆã•れã€ã‚¿ã‚¹ã‚¯ã‚’分割ã™ã‚‹ãŸã‚ã®å†…部プロセス (共有ãƒãƒ©ãƒ³ã‚µãƒ¼ã€ãƒãƒƒãƒˆã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã€Exclusive pool worker) ãŒã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¾ã™ã€‚ +- "クライアントマãƒãƒ¼ã‚¸ãƒ£ãƒ¼" グループãŒä½œæˆã•れã€ã“れã«ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã•ã¾ã–ã¾ãªå†…部プロセスãŒå«ã¾ã‚Œã¾ã™ã€‚ + +ウィンドウã®ä¸‹æ®µã«ã¯é¸æŠžã—ãŸãƒ—ロセスã®ç¨¼åƒçжæ³ãŒã‚°ãƒ©ãƒ•ィカルã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +> **Shift**キーを押ã—ãªãŒã‚‰é€£ç¶šã—ãŸè¡Œã‚’ã€**Ctrl** (Windows) / **Command** (macOS) キーを押ã—ãªãŒã‚‰éžé€£ç¶šã®è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ + +プロセスã®ç¨¼åƒçжæ³ã¯ã€4D Server ãŒã“ã®ãƒ—ロセスã®ãŸã‚ã«ä½¿ç”¨ã—ãŸæ™‚é–“ã®ãƒ‘ーセンテージã§ã™ã€‚ ウィンドウã«ã¯ãƒ—ロセスã”ã¨ã«ä»¥ä¸‹ã®æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™: + +- プロセスタイプ (後述) +- セッション/情報: + - 4Dプロセス - 空白 + - ユーザープロセス - 4Dユーザーå + - Webプロセス - URLパス +- プロセスå +- ãƒ—ãƒ­ã‚»ã‚¹ç•ªå· (ãŸã¨ãˆã° [`New process`](https://doc.4d.com/4dv19/help/command/ja/page317.html) 関数ã§è¿”ã•れる値)。 プロセス番å·ã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ç•ªå·ã§ã™ã€‚ グローãƒãƒ«ãƒ—ロセスã®å ´åˆã€ã“ã®ç•ªå·ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ä¸Šã§å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸç•ªå·ã¨ç•°ãªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ +- プロセスã®ç¾åœ¨ã®çŠ¶æ³ +- 作æˆã•れã¦ã‹ã‚‰ã®ãƒ—ロセスã®å®Ÿè¡Œæ™‚é–“ (ç§’) +- 4D Server ãŒã“ã®ãƒ—ロセスã«ä½¿ç”¨ã—ãŸæ™‚é–“ã®ãƒ‘ーセンテージ + +### プロセスタイプ + +プロセスタイプã¯ã‚¢ã‚¤ã‚³ãƒ³ã§è­˜åˆ¥ã§ãã¾ã™ã€‚ アイコンã®è‰²ã‚„å½¢ã«å¯¾å¿œã™ã‚‹ãƒ—ロセスタイプã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +| icon | type | +| --------------------------------------- | --------------------------------------------------------------------------- | +| ![](assets/en/Admin/server-icon-1.png) | アプリケーションサーãƒãƒ¼ | +| ![](assets/en/Admin/server-icon-2.png) | SQL サーãƒãƒ¼ | +| ![](assets/en/Admin/server-icon-3.png) | DB4D サーãƒãƒ¼ (データベースエンジン) | +| ![](assets/en/Admin/server-icon-4.png) | Web サーãƒãƒ¼ | +| ![](assets/en/Admin/server-icon-5.png) | SOAP サーãƒãƒ¼ | +| ![](assets/en/Admin/server-icon-6.png) | ä¿è­·ã•れ㟠4Dクライアントプロセス (接続ã•れ㟠4D ã®é–‹ç™ºãƒ—ロセス) | +| ![](assets/en/Admin/server-icon-7.png) | メイン4Dクライアントプロセス (接続ã•れ㟠4D ã®ãƒ¡ã‚¤ãƒ³ãƒ—ロセス。 クライアントマシン上ã§ä½œæˆã•れãŸãƒ—ロセスã«å¯¾å¿œã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ãƒ—ロセス) | +| ![](assets/en/Admin/server-icon-8.png) | 4Dクライアント基本プロセス (4Dクライアントプロセスã¨ä¸¦åˆ—ãªãƒ—ロセス。 メイン4Dクライアントプロセスをコントロールã™ã‚‹ãƒ—リエンプティブプロセス) | +| ![](assets/en/Admin/server-icon-9.png) | 予備プロセス (以å‰ã¾ãŸã¯å¾Œã® "4Dクライアントデータベースプロセス") | +| ![](assets/en/Admin/server-icon-10.png) | SQL サーãƒãƒ¼ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒ—ロセス | +| ![](assets/en/Admin/server-icon-11.png) | HTTP サーãƒãƒ¼ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒ—ロセス | +| ![](assets/en/Admin/server-icon-12.png) | 4Dクライアントプロセス (接続ã•れ㟠4D 上ã§å®Ÿè¡Œä¸­ã®ãƒ—ロセス) | +| ![](assets/en/Admin/server-icon-13.png) | ストアドプロシージャー (接続ã•れ㟠4D ã«ã‚ˆã‚Šèµ·å‹•ã•れã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã—ã¦ã„るプロセス) | +| ![](assets/en/Admin/server-icon-14.png) | Web メソッド (4DACTION ãªã©ã«ã‚ˆã‚Šèµ·å‹•) | +| ![](assets/en/Admin/server-icon-15.png) | Web メソッド (プリエンプティブ) | +| ![](assets/en/Admin/server-icon-16.png) | SOAP メソッド (Webサービスã«ã‚ˆã‚Šèµ·å‹•) | +| ![](assets/en/Admin/server-icon-17.png) | SOAP メソッド (プリエンプティブ) | +| ![](assets/en/Admin/server-icon-18.png) | ロガー | +| ![](assets/en/Admin/server-icon-19.png) | TCP接続リスナー | +| ![](assets/en/Admin/server-icon-20.png) | TCPセッションマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ | +| ![](assets/en/Admin/server-icon-21.png) | ãã®ä»–ã®ãƒ—ロセス | +| ![](assets/en/Admin/server-icon-22.png) | ワーカープロセス (コオペラティブ) | +| ![](assets/en/Admin/server-icon-23.png) | 4Dクライアントプロセス (プリエンプティブ) | +| ![](assets/en/Admin/server-icon-24.png) | ストアドプロシージャー (プリエンプティブプロセス) | +| ![](assets/en/Admin/server-icon-25.png) | ワーカープロセス (プリエンプティブ) | + +> **グループ毎ã«ãƒ—ロセスを表示** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€ãれãžã‚Œã® 4Dクライアントメインプロセスã¨ã€ãã®å¯¾ã§ã‚ã‚‹ 4Dクライアント基本プロセスã¯ä¸€ç·’ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¦è¡¨ç¤ºã•れã¾ã™ã€‚ + + +### 管ç†ãƒœã‚¿ãƒ³ + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã€é¸æŠžã•れãŸãƒ—ロセスã«å¯¾ã—ã¦å‹•作ã™ã‚‹ 5ã¤ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒœã‚¿ãƒ³ãŒã‚りã¾ã™ã€‚ ユーザープロセスã«å¯¾ã—ã¦ã®ã¿ä½¿ç”¨ã§ãã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +![](assets/en/Admin/server-process-actions.png) + +- **プロセスを中断**: é¸æŠžã—ãŸãƒ—ロセスをアボートã—ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã€æ“作を続行ã¾ãŸã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã§ãã¾ã™ã€‚ + +> 確èªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãªã—ã«é¸æŠžã—ãŸãƒ—ロセスをアボートã™ã‚‹ã«ã¯ã€**Alt**キーを押ã—ãªãŒã‚‰ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€[`ABORT PROCESS BY ID`](https://doc.4d.com/4dv19/help/command/ja/page1634.html) コマンドを使用ã—ã¾ã™ã€‚ + +- **ãƒ—ãƒ­ã‚»ã‚¹ã‚’ä¸€æ™‚åœæ­¢**: é¸æŠžã—ãŸãƒ—ãƒ­ã‚»ã‚¹ã‚’ä¸€æ™‚åœæ­¢ã—ã¾ã™ã€‚ +- **プロセスをアクティベート**: é¸æŠžã—ãŸãƒ—ロセスã®å®Ÿè¡Œã‚’å†é–‹ã—ã¾ã™ã€‚ 対象ã®ãƒ—ロセスã¯ã€å‰è¿°ã®ãƒœã‚¿ãƒ³ã‹ãƒ—ログラムã«ã‚ˆã‚Šä¸€æ™‚åœæ­¢çŠ¶æ…‹ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã‘れã°ã€ã“ã®ãƒœã‚¿ãƒ³ã¯åŠ¹æžœã‚りã¾ã›ã‚“。 +- **プロセスをデãƒãƒƒã‚°**: é¸æŠžã—ãŸãƒ—ロセスã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚’サーãƒãƒ¼ãƒžã‚·ãƒ³ä¸Šã§é–‹ãã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã€æ“作を続行ã¾ãŸã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã§ãã¾ã™ã€‚ 4DコードãŒå®Ÿéš›ã«ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ä¸Šã§å®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•ã‚Œã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„ (ãŸã¨ãˆã°ã€ãƒˆãƒªã‚¬ãƒ¼ã‚„ "サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œ" 属性をæŒã¤ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œæ™‚ãªã©)。 + +> 確èªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãªã—ã«é¸æŠžã—ãŸãƒ—ロセスをデãƒãƒƒã‚°ã™ã‚‹ã«ã¯ã€**Alt**キーを押ã—ãªãŒã‚‰ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ + +- **ユーザーを表示**: é¸æŠžã•れãŸãƒ—ロセスã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã® [ユーザーページ](#ユーザーページ) ã«ç›´æŽ¥è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 1ã¤ä»¥ä¸Šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロセスãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã“ã®ãƒœã‚¿ãƒ³ã¯æœ‰åйã«ãªã‚Šã¾ã™ã€‚ + + +## メンテナンスページ + +**メンテナンス** ページã«ã¯ã€ã‚¢ãƒ—リケーションã®ç¾åœ¨ã®å‹•作状æ³ã«é–¢ã™ã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã¾ãŸã€åŸºæœ¬çš„ãªãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æ©Ÿèƒ½ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +![](assets/en/Admin/server-maintenance.png) + + +### æœ€æ–°ã®æ¤œæŸ»/圧縮: + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä¸Šã§å®Ÿè¡Œã•ã‚ŒãŸæœ€æ–°ã® [ãƒ‡ãƒ¼ã‚¿ã®æ¤œæŸ»](MSC/verify.md) ãŠã‚ˆã³ [圧縮処ç†](MSC/compact.md) ã®æ—¥ä»˜ã€æ™‚刻ã€çжæ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +#### レコードã¨ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’検査 + +ã“ã®ãƒœã‚¿ãƒ³ã‚’使用ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã‚’æ­¢ã‚ã‚‹ã“ã¨ãªã検査処ç†ã‚’直接起動ã§ãã¾ã™ã€‚ 検証ã®é–“ã€ã‚µãƒ¼ãƒãƒ¼ã®å‹•作ãŒé…ããªã‚‹ã‹ã‚‚ã—れãªã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +データベースã®ã™ã¹ã¦ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¨ã™ã¹ã¦ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ãŒæ¤œè¨¼ã•れã¾ã™ã€‚ 検査対象を絞り込んã ã‚Šã€è¿½åŠ ã®ã‚ªãƒ—ションを指定ã—ãŸã„å ´åˆã¯ã€[Maintenance & Security Center](MSC/overview.md) (MSC) を使用ã—ã¾ã™ã€‚ + +検査後ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã® [maintenance Logs](Project/architecture.md#logs) フォルダーã«ã€XMLå½¢å¼ã§ãƒ¬ãƒãƒ¼ãƒˆãƒ•ァイルãŒä½œæˆã•れã¾ã™ã€‚ **レãƒãƒ¼ãƒˆã‚’表示** (クライアントマシンã‹ã‚‰å‡¦ç†ãŒå®Ÿè¡Œã•れãŸå ´åˆã¯ **レãƒãƒ¼ãƒˆã‚’ダウンロード**) ボタンをクリックã™ã‚‹ã¨ã€ãƒ–ラウザーã«ãƒ¬ãƒãƒ¼ãƒˆã‚’表示ã§ãã¾ã™ã€‚ + + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦å®Ÿè¡Œã•れãŸå‡¦ç†ã®æ—¥ä»˜ã€æ™‚刻ã€çжæ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +#### データ圧縮 + +ã“ã®ãƒœã‚¿ãƒ³ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿åœ§ç¸®å‡¦ç†ã‚’直接起動ã§ãã¾ã™ã€‚ ã“ã®å‡¦ç†ã‚’ãŠã“ãªã†ã«ã¯ã‚µãƒ¼ãƒãƒ¼ã‚’åœæ­¢ã•ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ボタンをクリックã™ã‚‹ã¨ã€4D Server ã®çµ‚了ダイアログãŒè¡¨ç¤ºã•れã€çµ‚äº†æ–¹æ³•ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/Admin/server-shut.png) + +アプリケーションãŒå®Ÿéš›ã«åœæ­¢ã•れãŸå¾Œã€4D Server ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã™ã‚‹æ¨™æº–ã®åœ§ç¸®å‡¦ç†ã‚’ãŠã“ãªã„ã¾ã™ã€‚ 追加ã®ã‚ªãƒ—ションを指定ã—ãŸã„å ´åˆã¯ã€[Maintenance & Security Center](MSC/overview.md) (MSC) を使用ã—ã¾ã™ã€‚ + +圧縮ãŒçµ‚了ã™ã‚‹ã¨ã€4D Server ã¯è‡ªå‹•ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’å†é–‹ã—ã¾ã™ã€‚ ãã®å¾Œã€4Dユーザーã®å†æŽ¥ç¶šãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +> 圧縮リクエストãŒãƒªãƒ¢ãƒ¼ãƒˆã® 4Dマシンã‹ã‚‰ãªã•れãŸå ´åˆã€ã“ã®ãƒžã‚·ãƒ³ã¯ 4D Server ã«ã‚ˆã‚Šè‡ªå‹•ã§å†æŽ¥ç¶šã•れã¾ã™ã€‚ + +検査後ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã® [maintenance Logs](Project/architecture.md#logs) フォルダーã«ã€XMLå½¢å¼ã§ãƒ¬ãƒãƒ¼ãƒˆãƒ•ァイルãŒä½œæˆã•れã¾ã™ã€‚ **レãƒãƒ¼ãƒˆã‚’表示** (クライアントマシンã‹ã‚‰å‡¦ç†ãŒå®Ÿè¡Œã•れãŸå ´åˆã¯ **レãƒãƒ¼ãƒˆã‚’ダウンロード**) ボタンをクリックã™ã‚‹ã¨ã€ãƒ–ラウザーã«ãƒ¬ãƒãƒ¼ãƒˆã‚’表示ã§ãã¾ã™ã€‚ + + +### 動作時間 + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã‹ã‚‰ã®ç¨¼åƒæ™‚é–“ (æ—¥ã€æ™‚ã€åˆ†) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + +#### サーãƒã‚’å†èµ·å‹•... + +ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã‚µãƒ¼ãƒãƒ¼ã‚’å³åº§ã«å†èµ·å‹•ã§ãã¾ã™ã€‚ ボタンをクリックã™ã‚‹ã¨ã€4D Server ã®çµ‚了ダイアログãŒè¡¨ç¤ºã•れã€çµ‚äº†æ–¹æ³•ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å†èµ·å‹•後ã€4D Server ã¯è‡ªå‹•ã§ãƒ—ロジェクトをå†åº¦é–‹ãã¾ã™ã€‚ ãã®å¾Œã€4Dユーザーã®å†æŽ¥ç¶šãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ + +> å†èµ·å‹•リクエストãŒãƒªãƒ¢ãƒ¼ãƒˆã® 4Dマシンã‹ã‚‰ãªã•れãŸå ´åˆã€ã“ã®ãƒžã‚·ãƒ³ã¯ 4D Server ã«ã‚ˆã‚Šè‡ªå‹•ã§å†æŽ¥ç¶šã•れã¾ã™ã€‚ + +### å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® [å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—](MSC/backup.md) ã®æ—¥ä»˜ãƒ»æ™‚刻ã¨ã€äºˆå®šã•ã‚ŒãŸæ¬¡ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒã‚れã°ã€ãれã«é–¢ã™ã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **スケジューラー** ページã§è¨­å®šã—ã¾ã™ + +- **å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**: å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—日時。 +- **次回ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**: 予定ã•ã‚ŒãŸæ¬¡ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—日時。 +- **å¿…è¦ãªã‚¹ãƒšãƒ¼ã‚¹**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å¿…è¦ãªè¨ˆç®—ã•れãŸç©ºã容é‡ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã®å®Ÿéš›ã®ã‚µã‚¤ã‚ºã¯ (圧縮ãªã©ã®) 設定やã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®å¤‰åŒ–ã«ã‚ˆã‚Šå¤‰ã‚りã¾ã™ã€‚ +- **空ãスペース**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ボリュームã®ç©ºã容é‡ã€‚ + + +**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—é–‹å§‹** ボタンを使用ã—ã¦ã€ç¾åœ¨ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—パラメーター ( ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ãƒ•ァイルã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®å ´æ‰€ã€ã‚ªãƒ—ションãªã©) を使用ã—ãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å³åº§ã«é–‹å§‹ã§ãã¾ã™ã€‚ **環境設定...** ボタンをクリックã—ã¦ã€ã“れらã®ãƒ‘ラメーターを確èªã§ãã¾ã™ã€‚ サーãƒãƒ¼ä¸Šã§ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒãŠã“ãªã‚れる間ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã¯ãƒ–ロックã•れ (ãŸã ã—接続解除ã¯ã•れã¾ã›ã‚“)ã€æ–°è¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã¯ã§ããªããªã‚Šã¾ã™ã€‚ + + +### リクエストã¨ãƒ‡ãƒãƒƒã‚°ãƒ­ã‚° + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€(ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã«) ログファイルã®è¨˜éŒ²ã«è¦ã—ãŸæ™‚é–“ãŒè¡¨ç¤ºã•れã€ãƒ­ã‚°ã®æœ‰åŠ¹åŒ–ã‚‚ç®¡ç†ã§ãã¾ã™ã€‚ + +ログファイルã«ã¤ã„ã¦ã¯ã€[**ログファイルã®è©³ç´°**](debugLogFiles.md) ã‚’å‚ç…§ãã ã•ã„。 + +#### リクエストã¨ãƒ‡ãƒãƒƒã‚°ã®ãƒ­ã‚°ã‚’é–‹å§‹/åœæ­¢ + +**リクエストã¨ãƒ‡ãƒãƒƒã‚°ã®ãƒ­ã‚°ã‚’é–‹å§‹** ボタンã§ãƒ­ã‚°ãƒ•ァイルãŒé–‹å§‹ã•れã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šãƒ•ォーマンスãŒè‘—ã—ã低下ã™ã‚‹å ´åˆãŒã‚ã‚‹ãŸã‚ã€ã“れã¯ã‚¢ãƒ—リケーションã®é–‹ç™ºãƒ•ェーズã§ã®ã¿ä½¿ç”¨ã—ã¾ã™ã€‚ + +> ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¦ã„るオペレーションã—ã‹è¨˜éŒ²ã—ã¾ã›ã‚“。 + +ãƒ­ã‚°ãŒæœ‰åйã«ãªã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®ã‚¿ã‚¤ãƒˆãƒ«ãŒ **リクエストã¨ãƒ‡ãƒãƒƒã‚°ã®ãƒ­ã‚°ã‚’åœæ­¢** ã«å¤‰ã‚りã€ã„ã¤ã§ã‚‚リクエストã®è¨˜éŒ²ã‚’åœæ­¢ã§ãã¾ã™ã€‚ åœæ­¢å¾Œã«ãƒ­ã‚°ã‚’å†é–‹ã™ã‚‹ã¨ã€ä»¥å‰ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ¶ˆåŽ»ã•れるã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +#### レãƒãƒ¼ãƒˆã‚’表示 + +**レãƒãƒ¼ãƒˆã‚’表示** (リモートã®ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—クライアントã‹ã‚‰å‡¦ç†ã‚’実行ã—ãŸå ´åˆã¯ **レãƒãƒ¼ãƒˆã‚’ダウンロード**) ボタンをクリックã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‹ã„ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ­ã‚°ãƒ•ァイルãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +#### Load logs configuration file + +This button allows you to load a special server [log configuration file](debugLogFiles.md#using-a-log-configuration-file) (`.json` file). Such a file can be provided by 4D technical services to monitor and study specific cases. + + +#### Pause logging + +This button suspends all currently logging operations started on the server. This feature can be useful to temporarily lighten the server tasks. + +When the logs have been paused, the button title changes to **Resume logging**, so that you can resume the logging operations. + +> You can pause and resume logging using the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) command. + + +## アプリケーションサーãƒãƒ¼ãƒšãƒ¼ã‚¸ + +アプリケーションサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã«ã¯ã€4D Server ãŒå…¬é–‹ã—ã¦ã„るデスクトップアプリケーションã«ã¤ã„ã¦ã®æƒ…å ±ãŒã¾ã¨ã‚られã¦ã„ã¦ã€å…¬é–‹ã‚’管ç†ã§ãã¾ã™ã€‚ + +![](assets/en/Admin/server-admin-application-page.png) + + +ページã®ä¸Šéƒ¨ã«ã¯ã€4D Server アプリケーションサーãƒãƒ¼ã®ç¾åœ¨ã®çжæ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +- **状æ³**: é–‹å§‹ã¾ãŸã¯åœæ­¢ +- **開始時刻**: アプリケーションサーãƒãƒ¼ã®èµ·å‹•æ—¥ã¨æ™‚刻。 ã“れã¯ã€4D Server ã«ã‚ˆã£ã¦ãƒ—ロジェクトãŒé–‹ã‹ã‚ŒãŸæ—¥ä»˜ã§ã™ã€‚ +- **動作時間**: プロジェクトãŒã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦æœ€å¾Œã«é–‹ã‹ã‚Œã¦ã‹ã‚‰ã®çµŒéŽæ™‚間。 + +### æ–°è¦æŽ¥ç¶šã‚’è¨±å¯/æ‹’å¦ + +ã“ã®ãƒœã‚¿ãƒ³ã¯åˆ‡ã‚Šæ›¿ãˆè¡¨ç¤ºã•れã€ã‚¢ãƒ—リケーションサーãƒãƒ¼ã¸ã®æ–°ã—ã„ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®æŽ¥ç¶šã‚’ç®¡ç†ã—ã¾ã™ã€‚ + +プロジェクトãŒå…¬é–‹ã•ã‚ŒãŸæ™‚ã€ãƒ‡ãƒ•ォルトã§ã¯: +- ボタンã®ãƒ©ãƒ™ãƒ«ã¯ "æ–°è¦æŽ¥ç¶šã‚’æ‹’å¦" ã§ã™ã€‚ +- ライセンスãŒè¨±å¯ã™ã‚‹é™ã‚Šã€æ–°è¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯è‡ªç”±ã«æŽ¥ç¶šãŒå¯èƒ½ã§ã™ã€‚ +- プロジェクトåã¯æŽ¥ç¶šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«å…¬é–‹ã•れã¾ã™ ("起動時ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’公開ã™ã‚‹" オプションãŒã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã§æœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆ)。 + +**æ–°è¦æŽ¥ç¶šã‚’æ‹’å¦** ボタンをクリックã™ã‚‹ã¨: +- ボタンã®ãƒ©ãƒ™ãƒ«ã¯ "æ–°è¦æŽ¥ç¶šã‚’è¨±å¯" ã«å¤‰ã‚りã¾ã™ã€‚ +- æ–°è¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æŽ¥ç¶šä¸å¯ã«ãªã‚Šã¾ã™ã€‚ 接続ã—よã†ã¨ã—ãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã¯ä»¥ä¸‹ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Admin/server-error.png) + +- 接続ダイアログã«ãƒ—ロジェクトåãŒè¡¨ç¤ºã•れãªããªã‚Šã¾ã™ã€‚ +- ã™ã§ã«æŽ¥ç¶šæ¸ˆã¿ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æŽ¥ç¶šè§£é™¤ã•れãšã€é€šå¸¸é€šã‚Šã«æ“作ãŒå¯èƒ½ã§ã™ã€‚ + +> [`REJECT NEW REMOTE CONNECTIONS`](https://doc.4d.com/4dv19/help/command/ja/page1635.html) コマンドを使用ã™ã‚‹ã“ã¨ã§ã‚‚ã€åŒã˜ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- **æ–°è¦æŽ¥ç¶šã‚’è¨±å¯** ボタンをクリックã™ã‚‹ã¨ã€ã‚¢ãƒ—リケーションサーãƒãƒ¼ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã«æˆ»ã‚Šã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ãŸã¨ãˆã°ã€ã‚µãƒ¼ãƒãƒ¼é–‹å§‹ç›´å¾Œã«ç®¡ç†è€…ãŒæ§˜ã€…ãªãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹æ“作 (検証や圧縮ãªã©) ã‚’ãŠã“ãªã†ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ 管ç†è€…ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã‚’使用ã™ã‚‹å ´åˆã€ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šä¸€ã¤ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã ã‘ãŒãƒ‡ãƒ¼ã‚¿ã‚’æ›´æ–°ã§ãã‚‹ã“ã¨ã‚’確実ã«ã§ãã¾ã™ã€‚ ã¾ãŸã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ãŒæŽ¥ç¶šã•れã¦ã„ãªã„状態ã§ãŠã“ãªã‚ãªã‘れã°ãªã‚‰ãªã„メンテナンスæ“ä½œã®æº–å‚™ã®ãŸã‚ã«ã€ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 情報 + +#### 設定 + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãŒå…¬é–‹ã™ã‚‹ 4Dプロジェクトã«ã¤ã„ã¦ã®æƒ…å ± (データやストラクãƒãƒ£ãƒ¼ãƒ•ァイルã®åç§°ã¨å ´æ‰€ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ­ã‚°ãƒ•ァイルã®åç§°) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ストラクãƒãƒ£ãƒ¼ã‚„データファイルåをクリックã™ã‚‹ã¨ã€å®Œå…¨ãªãƒ‘スåを表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**モード** 欄ã¯ã‚¢ãƒ—リケーションã®ç¾åœ¨ã®å®Ÿè¡Œãƒ¢ãƒ¼ãƒ‰ ã€ã‚³ãƒ³ãƒ‘イル済ã¿ã‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã‹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +エリアã®ä¸‹éƒ¨ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼è¨­å®šãƒ‘ラメーター (サービスã¨ã—ã¦èµ·å‹•ã€ãƒãƒ¼ãƒˆã€IP アドレス) ã‚„ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼æŽ¥ç¶šç”¨ã® TSL ã®çŠ¶æ…‹ (SQL ã‚„ HTTP接続ã¯åˆ¥è¨­å®š) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +#### メモリ + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€**ç·ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ¡ãƒ¢ãƒª** (ストラクãƒãƒ£ãƒ¼è¨­å®šã§è¨­å®šã•れãŸãƒ‘ラメーター) 㨠**使用キャッシュメモリ** (å¿…è¦ã«å¿œã˜ã¦ 4D Server ãŒå‹•çš„ã«å‰²ã‚Šå½“ã¦) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + +#### アプリケーションサーãƒãƒ¼æŽ¥ç¶šæ•° + +- **最高**: アプリケーションサーãƒãƒ¼ã«è¨±å¯ã•ã‚ŒãŸæœ€å¤§ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆåŒæ™‚接続数を表ã—ã¾ã™ã€‚ ã“ã®å€¤ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るライセンスã«ã‚ˆã‚Šã¾ã™ã€‚ +- **使用中**: ç¾åœ¨ä½¿ç”¨ä¸­ã®å®Ÿéš›ã®æŽ¥ç¶šæ•°ã‚’表ã—ã¾ã™ã€‚ + + +## SQLサーãƒãƒ¼ãƒšãƒ¼ã‚¸ + +SQLサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã«ã¯ã€4D Server ã«çµ±åˆã•れ㟠SQLサーãƒãƒ¼ã«ã¤ã„ã¦ã®æƒ…å ±ãŒé›†ã‚られã¦ã„ã¾ã™ã€‚ ã¾ãŸã€SQLサーãƒãƒ¼ã‚’有効ã«ã™ã‚‹ãŸã‚ã®ãƒœã‚¿ãƒ³ã‚‚å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +![](assets/en/Admin/server-admin-sql-page.png) + + +ページã®ä¸Šéƒ¨ã«ã¯ã€4D Server ã® SQLサーãƒãƒ¼ã®ç¾åœ¨ã®çжæ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +- **状æ³**: é–‹å§‹ã¾ãŸã¯åœæ­¢ +- **開始時刻**: SQLサーãƒãƒ¼ã®èµ·å‹•æ—¥ã¨æ™‚刻。 +- **動作時間**: SQLサーãƒãƒ¼ãŒæœ€å¾Œã«é–‹å§‹ã•れã¦ã‹ã‚‰ã®çµŒéŽæ™‚間。 + +### SQLサーãƒãƒ¼é–‹å§‹/åœæ­¢ + +ã“ã®ãƒœã‚¿ãƒ³ã¯åˆ‡ã‚Šæ›¿ãˆè¡¨ç¤ºã•れã€4D Server SQLサーãƒãƒ¼ã‚’コントロールã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +- SQLサーãƒãƒ¼ã®çŠ¶æ…‹ãŒ "é–‹å§‹" ã®å ´åˆã€ãƒœã‚¿ãƒ³ã®ã‚¿ã‚¤ãƒˆãƒ«ã¯ **SQLサーãƒãƒ¼åœæ­¢** ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D Server SQLサーãƒãƒ¼ã¯å³åº§ã«åœæ­¢ã—ã€æŒ‡å®šã—㟠TCPãƒãƒ¼ãƒˆã§å—ä¿¡ã•れる外部ã‹ã‚‰ã® SQLクエリã«ã¯å¿œç­”ã—ãªããªã‚Šã¾ã™ã€‚ +- SQLサーãƒãƒ¼ã®çŠ¶æ…‹ãŒ "åœæ­¢" ã®å ´åˆã€ãƒœã‚¿ãƒ³ã®ã‚¿ã‚¤ãƒˆãƒ«ã¯ **SQLサーãƒãƒ¼é–‹å§‹** ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D Server SQLサーãƒãƒ¼ã¯å³åº§ã«é–‹å§‹ã—ã€æŒ‡å®šã—㟠TCPãƒãƒ¼ãƒˆã§å—ä¿¡ã•れる外部ã‹ã‚‰ã® SQLクエリã«å¿œç­”ã—ã¾ã™ã€‚ 4D SQLサーãƒãƒ¼ã‚’使用ã™ã‚‹ã«ã¯ã€é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ãªç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +> ストラクãƒãƒ£ãƒ¼è¨­å®šã§è¨­å®šã—ã¦ã‚¢ãƒ—リケーション起動ã¨åŒæ™‚ã«ã€ã¾ãŸã¯ãƒ—ログラムを使用ã—ã¦å¿…è¦ãªæ™‚ã«ã€SQLサーãƒãƒ¼ã‚’自動ã§é–‹å§‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 情報 + +#### 設定 + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€SQLサーãƒãƒ¼è¨­å®šã®ãƒ‘ラメーターãŒè¡¨ç¤ºã•れã¾ã™: 開始時ã®è‡ªå‹•èµ·å‹•ã€å¾…å—IPアドレスã€å¾…å—TCPãƒãƒ¼ãƒˆ (デフォルト㧠19812)ã€ãã—㦠SQL接続用㮠TSL ã®çŠ¶æ…‹ (4D ã‚„ Web接続ã¯åˆ¥è¨­å®š)。 + +ã“れらã®å€¤ã¯ 4D ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +#### 接続 + +4D Server上ã§ç¾åœ¨é–‹ã‹ã‚Œã¦ã„ã‚‹ SQLæŽ¥ç¶šã®æ•°ã€‚ + +#### 最大接続数 + +許å¯ã•ã‚Œã‚‹åŒæ™‚SQLæŽ¥ç¶šã®æœ€å¤§æ•°ã€‚ ã“ã®å€¤ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るライセンスã«ã‚ˆã‚Šã¾ã™ã€‚ + +## HTTPサーãƒãƒ¼ãƒšãƒ¼ã‚¸ + +HTTPサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã«ã¯ã€4D Server ã® Webサーãƒãƒ¼ã‚„ SOAPサーãƒãƒ¼ã«é–¢ã™ã‚‹æƒ…å ±ãŒé›†ã‚られã¦ã„ã¾ã™ã€‚ Webサーãƒãƒ¼ã¯ã€HTMLページやピクãƒãƒ£ãƒ¼ãªã©ã® Webコンテンツã®å…¬é–‹ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ SOAPサーãƒãƒ¼ã¯ Webサービスã®å…¬é–‹ã‚’管ç†ã—ã¾ã™ã€‚ ã“れら 2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ã¯ã€4D Server ã®å†…部的㪠HTTPサーãƒãƒ¼ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ + +![](assets/en/Admin/server-admin-web-page.png) + + +ページã®ä¸Šéƒ¨ã«ã¯ã€4D Server ã® HTTPサーãƒãƒ¼ã®ç¾åœ¨ã®çжæ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +- **状æ³**: é–‹å§‹ã¾ãŸã¯åœæ­¢ +- **開始時刻**: HTTPサーãƒãƒ¼ã®èµ·å‹•æ—¥ã¨æ™‚刻。 +- **動作時間**: HTTPサーãƒãƒ¼ãŒæœ€å¾Œã«é–‹å§‹ã•れã¦ã‹ã‚‰ã®çµŒéŽæ™‚間。 +- **ç·HTTPヒット数**: HTTPサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã‹ã‚‰ã€ã‚µãƒ¼ãƒãƒ¼ãŒå—ä¿¡ã—ãŸãƒ­ãƒ¼ãƒ¬ãƒ™ãƒ«ã® HTTPヒット数。 + + +### HTTPサーãƒãƒ¼é–‹å§‹/åœæ­¢ + +ã“ã®ãƒœã‚¿ãƒ³ã¯åˆ‡ã‚Šæ›¿ãˆè¡¨ç¤ºã•れã€4D Server HTTPサーãƒãƒ¼ã‚’コントロールã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +- HTTPサーãƒãƒ¼ã®çŠ¶æ…‹ãŒ "é–‹å§‹" ã®å ´åˆã€ãƒœã‚¿ãƒ³ã®ã‚¿ã‚¤ãƒˆãƒ«ã¯ **HTTPサーãƒãƒ¼åœæ­¢** ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D Server HTTPサーãƒãƒ¼ã¯å³åº§ã«åœæ­¢ã—ã€Webサーãƒãƒ¼ã€RESTサーãƒãƒ¼ã€ãŠã‚ˆã³ SOAPサーãƒãƒ¼ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å—ã‘付ã‘ãªããªã‚Šã¾ã™ã€‚ +- HTTPサーãƒãƒ¼ã®çŠ¶æ…‹ãŒ "åœæ­¢" ã®å ´åˆã€ãƒœã‚¿ãƒ³ã®ã‚¿ã‚¤ãƒˆãƒ«ã¯ **HTTPサーãƒãƒ¼é–‹å§‹** ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D Server HTTPサーãƒãƒ¼ã¯å³åº§ã«é–‹å§‹ã—ã€Webã€RESTã€ãŠã‚ˆã³ SOAPリクエストをå—ã‘付ã‘ã¾ã™ã€‚ + +> HTTPサーãƒãƒ¼ã‚’é–‹å§‹ã™ã‚‹ã«ã¯é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã§ã™ã€‚ +> +> ストラクãƒãƒ£ãƒ¼è¨­å®šã§è¨­å®šã—ã¦ã‚¢ãƒ—リケーション起動ã¨åŒæ™‚ã«ã€ã¾ãŸã¯ãƒ—ログラムを使用ã—ã¦å¿…è¦ãªæ™‚ã«ã€HTTPサーãƒãƒ¼ã‚’自動ã§é–‹å§‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### Web情報 + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€4D Server ã® Webサーãƒãƒ¼ã«é–¢ã™ã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +- **Web リクエスト**: å—ã‘入れã€ã¾ãŸã¯æ‹’å¦ã€‚ ã“ã®æƒ…報㯠Webサーãƒãƒ¼ãŒæœ‰åйã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ Webサーãƒãƒ¼ã¯ç›´æŽ¥ HTTPサーãƒãƒ¼ã«ãƒªãƒ³ã‚¯ã—ã¦ã„ã‚‹ãŸã‚ã€HTTPサーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„れ㰠Webリクエストã¯å—ä¿¡ã•れã€åœæ­¢ã•れã¦ã„ã‚Œã°æ‹’å¦ã•れã¾ã™ã€‚ +- **最大接続数**: 許å¯ã•れる WebæŽ¥ç¶šã®æœ€å¤§æ•°ã€‚ ã“ã®å€¤ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るライセンスã«ã‚ˆã‚Šã¾ã™ã€‚ + +### SOAP情報 + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€4D Server ã® SOAPサーãƒãƒ¼ã«é–¢ã™ã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒœã‚¿ãƒ³ã‚‚一ã¤å«ã¾ã‚Œã¾ã™ã€‚ + +- **SOAP リクエスト**: å—ã‘入れã€ã¾ãŸã¯æ‹’å¦ã€‚ ã“ã®æƒ…報㯠SOAPサーãƒãƒ¼ãŒæœ‰åйã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ SOAPリクエストをå—ã‘入れるãŸã‚ã«ã¯ã€HTTPサーãƒãƒ¼ãŒé–‹å§‹ã•れã€ã‹ã¤ SOAPサーãƒãƒ¼ãŒæ˜Žç¤ºçš„ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å—ã‘入れãªã‘れã°ãªã‚Šã¾ã›ã‚“ (ボタンã®èª¬æ˜Žå‚ç…§)。 +- **最大接続数**: 許å¯ã•れる SOAPæŽ¥ç¶šã®æœ€å¤§æ•°ã€‚ ã“ã®å€¤ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るライセンスã«ã‚ˆã‚Šã¾ã™ã€‚ +- **SOAPリクエストをå—ã‘入れる/å—ã‘入れãªã„** ボタン: ã“ã®ãƒœã‚¿ãƒ³ã¯åˆ‡ã‚Šæ›¿ãˆè¡¨ç¤ºã•れã€4D Server SOAPサーãƒãƒ¼ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® "Webサービス" ページ㮠**Webサービスリクエストを許å¯ã™ã‚‹** オプションãŒå¤‰æ›´ã•れã¾ã™ã€‚ã¾ãŸã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã®å½“該オプションãŒå¤‰æ›´ã•れれã°ã€ãƒœã‚¿ãƒ³ã®ãƒ©ãƒ™ãƒ«ã‚‚変ã‚りã¾ã™ã€‚ ã¾ãŸã€[`SOAP REJECT NEW REQUESTS`](https://doc.4d.com/4dv19/help/command/ja/page1636.html) コマンドを使ã£ã¦æ–°è¦ã® SOAPリクエストを拒å¦ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ **Webサービスリクエストを許å¯ã™ã‚‹** オプションã®å€¤ã‚’変更ã—ã¾ã›ã‚“。 + +HTTPサーãƒãƒ¼åœæ­¢ä¸­ã« **SOAPリクエストå—ã‘入れる** ボタンをクリックã™ã‚‹ã¨ã€4D ã¯è‡ªå‹•ã§ HTTPサーãƒãƒ¼ã‚’é–‹å§‹ã—ã¾ã™ã€‚ + +### HTTPサーãƒãƒ¼è¨­å®š + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€HTTPサーãƒãƒ¼ã®è¨­å®šãƒ‘ラメーターや動作ã«é–¢ã™ã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +- **開始時ã«è‡ªå‹•èµ·å‹•**: ストラクãƒãƒ£ãƒ¼è¨­å®šã§è¨­å®šã•れãŸãƒ‘ラメーター。 +- **HTTP サーãƒãƒ¼ãƒ—ロセス (使用/ç·è¨ˆ)**: サーãƒãƒ¼ä¸Šã§ä½œæˆã•れãŸHTTPプロセス数 (ç¾åœ¨ã®ãƒ—ロセス数 / 作æˆã•れãŸãƒ—ロセスã®ç·æ•°)。 +- **キャッシュメモリ**: HTTPサーãƒãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ¡ãƒ¢ãƒªã®ã‚µã‚¤ã‚º ( キャッシュãŒå®Ÿéš›ã«ä½¿ç”¨ã—ã¦ã„るサイズ / ストラクãƒãƒ£ãƒ¼è¨­å®šã§ç†è«–çš„ã«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸæœ€å¤§ã‚µã‚¤ã‚º)。 **キャッシュクリア** ボタンをクリックã™ã‚‹ã¨ã€ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’空ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **å¾…å—IP**ã€**HTTPãƒãƒ¼ãƒˆ** (デフォルト㯠80)ã€HTTP接続用㮠**TSL有効** (4D 㨠SQL接続ã¯åˆ¥è¨­å®š)ã€ãŠã‚ˆã³ **HTTPSãƒãƒ¼ãƒˆ**: ã“れらã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã¾ãŸã¯ãƒ—ログラミングã«ã‚ˆã‚Šè¨­å®šã•れãŸã€HTTPサーãƒãƒ¼ã®ç¾åœ¨ã® [設定パラメーター](WebServer/webServerConfig.md) を表示ã—ã¾ã™ã€‚ +- **ログファイル情報**: åç§°ã€ãƒ•ォーマットã€ãŠã‚ˆã³ HTTPサーãƒãƒ¼ã®æ¬¡å›žã®è‡ªå‹•ログãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æ—¥ä»˜ (logweb.txt ファイル)。 + + +## リアルタイムモニターページ + +リアルタイムモニターã¯ã€ã‚¢ãƒ—リケーションã«ã‚ˆã£ã¦å®Ÿè¡Œã•れãŸã€"é•·ã„" オペレーションã®çŠ¶æ…‹ã‚’ãƒªã‚¢ãƒ«ã‚¿ã‚¤ãƒ ã§ãƒ¢ãƒ‹ã‚¿ãƒ¼ã—ã¾ã™ã€‚ ã“れらã®ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¨ã¯ã€ãŸã¨ãˆã°ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ã‚¯ã‚¨ãƒªã‚„フォーミュラã®å®Ÿè¡Œãªã©ã§ã™: + +![](assets/en/Admin/server-admin-monitor-page.png) +> ã“ã®ãƒšãƒ¼ã‚¸ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã®ç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã‚りã¾ã™ãŒã€ãƒªãƒ¢ãƒ¼ãƒˆã® 4Dマシンã‹ã‚‰ã‚‚見られã¾ã™ã€‚ リモートマシンã®å ´åˆã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ä¸Šã§å®Ÿè¡Œã•れã¦ã„ã‚‹æ“作ã®ãƒ‡ãƒ¼ã‚¿ã‚’表示ã—ã¾ã™ã€‚ + +データã«å¯¾ã—ã¦å®Ÿè¡Œã•れã¦ã„ã‚‹é•·ã„処ç†ã¯ã€ãれãžã‚Œã«è¡ŒãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ æ“作ãŒå®Œäº†ã™ã‚‹ã¨ã€ã“ã®è¡Œã¯æ¶ˆãˆã¾ã™ (**オペレーションを最低5秒間表示ã™ã‚‹** オプションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã“ã¨ã§ã€çŸ­ã„オペレーションã§ã‚‚ 5秒間表示ã—ãŸã¾ã¾ã«ã§ãã¾ã™ã€‚以下å‚ç…§)。 + +å„行ã«ã¤ã„ã¦ã€ä»¥ä¸‹ã®æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™: + +- **開始時刻**: æ“作ã®é–‹å§‹æ™‚刻ãŒã€"dd/mm/yyyy - hh:mm:ss" ã¨ã„ã†ãƒ•ォーマットã§è¡¨ç¤ºã•れã¾ã™ã€‚ +- **çµŒéŽæ™‚é–“** (ç§’): é€²è¡Œä¸­ã®æ“作ã®çµŒéŽæ™‚é–“ãŒç§’å˜ä½ã§è¡¨ç¤ºã•れã¾ã™ã€‚ +- **情報**: æ“作ã®èª¬æ˜Žã€‚ +- **詳細**: ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€é¸æŠžã—ãŸã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦ã€ãã®è©³ç´°ãªæƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 具体的ã«ã¯ä»¥ä¸‹ã®æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™: + + **作æˆã•れãŸå ´æ‰€**: ãã®ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®çµæžœã‹ (クライアント上ã§ä½œæˆ)ã€ã‚¹ãƒˆã‚¢ãƒ‰ãƒ—ロシージャ―ã¾ãŸã¯ "サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œ" オプションを使用ã—ãŸçµæžœã‹ (サーãƒãƒ¼ä¸Šã§ä½œæˆ) を表示ã—ã¾ã™ã€‚ + + **オペレーション詳細**: オペレーションタイプã¨ã€(クエリオペレーションã«å¯¾ã—ã¦ã¯) クエリプランを表示ã—ã¾ã™ã€‚ + + **サブオペレーション** (ã‚れã°): é¸æŠžã—ãŸã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«å¾“属ã™ã‚‹ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã—ã¾ã™ (例:親レコードã®å‰ã«ãƒªãƒ¬ãƒ¼ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’削除ã™ã‚‹) + + **プロセス詳細**: テーブルã€ãƒ•ィールドã€ãƒ—ロセスやクライアントã«é–¢ã™ã‚‹è¿½åŠ æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚オペレーションã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +> リアルタイムモニターページã¯ã€[`GET ACTIVITY SNAPSHOT`](https://doc.4d.com/4dv19/help/command/ja/page1277.html) コマンドを内部的ã«ä½¿ç”¨ã—ã¦ã„ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + +ã“ã®ãƒšãƒ¼ã‚¸ã¯è¡¨ç¤ºå¾Œã™ãã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã‚Šã€æ’ä¹…çš„ã«æ›´æ–°ã•れ続ã‘ã¾ã™ã€‚ ãŸã ã—ã€ã“ã®å‡¦ç†ã«ã‚ˆã£ã¦ã€ã‚¢ãƒ—リケーションã®å®Ÿè¡Œã‚’極端ã«é…ãã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ä»¥ä¸‹ã®æ–¹æ³•を用ã„ã¦æ›´æ–°ã‚’一時的ã«åœæ­¢ã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™: + +- **åœæ­¢** ボタンをクリックã™ã‚‹ +- リストã®ä¸­ã‚’クリックã™ã‚‹ +- スペースãƒãƒ¼ã‚’押㙠+ +ãƒšãƒ¼ã‚¸ã‚’åœæ­¢ã•ã›ã‚‹ã¨ä¸€æ™‚åœæ­¢ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã€ãƒœã‚¿ãƒ³ã®è¡¨ç¤ºãŒ **å†é–‹** ã«å¤‰ã‚りã¾ã™ã€‚ ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°åœæ­¢æ“作ã¨åŒã˜æ“作をã™ã‚‹ã“ã¨ã§ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ã‚’å†é–‹ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 詳細モード + +å¿…è¦ã§ã‚れã°ã€RTMページã¯ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã”ã¨ã«è¿½åŠ ã®æƒ…報を表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +オペレーションã®ã‚¢ãƒ‰ãƒãƒ³ã‚¹ãƒ‰ãƒ¢ãƒ¼ãƒ‰ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€**Shift**キーを押ã—ãªãŒã‚‰ã€æƒ…報をå–å¾—ã—ãŸã„ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ ã™ã¹ã¦ã®é–²è¦§å¯èƒ½ãªæƒ…å ±ãŒã€ãƒ•ィルタリングãªã—ã§ "プロセス詳細" エリアã«è¡¨ç¤ºã•れã¾ã™(`GET ACTIVITY SNAPSHOT` コマンドã§è¿”ã•れるもã®ã¨åŒã˜ã§ã™)。 表示ã•れる情報ã¯ã€é¸æŠžã—ãŸã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +標準モードã§è¡¨ç¤ºã•れる情報ã®ä¾‹ã§ã™: + +![](assets/en/Admin/server-admin-monitor-adv1.png) + + +アドãƒãƒ³ã‚¹ãƒ‰ãƒ¢ãƒ¼ãƒ‰ (オペレーションを **Shift+クリック**) ã§ã¯ã€ã•らãªã‚‹æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Admin/server-admin-monitor-adv2.png) + +#### スナップショットボタン + +**コピー** ボタンを使用ã™ã‚‹ã¨ã€RTMパãƒãƒ«ã«è¡¨ç¤ºã•れã¦ã„る全オペレーションã¨ã€ãれã«é–¢é€£ã™ã‚‹è©³ç´° (プロセスã¨ã‚µãƒ–オペレーション情報) ãŒã‚¯ãƒªãƒƒãƒ—ボードã¸ã¨ã‚³ãƒ”ーã•れã¾ã™: + +![](assets/en/Admin/server-admin-monitor-snapshot.png) + + +#### オペレーションを最低5秒間表示ã™ã‚‹ + +**オペレーションを最低5秒間表示ã™ã‚‹** オプションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€è¡¨ç¤ºã•れãŸã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã©ã‚Œã‚‚ (実行ãŒçµ‚了ã—ãŸå¾Œã‚‚) 最低5ç§’é–“ã¯è¡¨ç¤ºã•れãŸã¾ã¾ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒé©ç”¨ã•れãŸã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã¯ã€ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆä¸­ã«ç°è‰²ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ã€ã¨ã¦ã‚‚æ—©ã終ã‚ã£ã¦ã—ã¾ã†ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®æƒ…報をå–å¾—ã—ãŸã„å ´åˆã«æœ‰åйã§ã™ã€‚ diff --git a/website/translated_docs/ja/Admin/tls.md b/website/translated_docs/ja/Admin/tls.md new file mode 100644 index 00000000000000..46b62d25a9786c --- /dev/null +++ b/website/translated_docs/ja/Admin/tls.md @@ -0,0 +1,106 @@ +--- +id: tls +title: TLSプロトコル (HTTPS) +--- + +ã™ã¹ã¦ã® 4Dサーãƒãƒ¼ã¯ã€TLS (Transport Layer Security) プロトコルを通ã˜ã¦ã€ä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§é€šä¿¡ã™ã‚‹äº‹ãŒã§ãã¾ã™: + +- Webサーãƒãƒ¼ +- アプリケーションサーãƒãƒ¼ (クライアントサーãƒãƒ¼ãƒ»ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—アプリケーション) +- SQLサーãƒãƒ¼ + +## æ¦‚è¦ + +TLSプロトコル (SSLプロトコルã®å¾Œç¶™ç‰ˆ) 㯠2ã¤ã®ã‚¢ãƒ—リケーションã€ä¸»ã« Webサーãƒãƒ¼ã¨ãƒ–ラウザー間ã§ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã‚’ä¿è­·ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ—ロトコルã¯å¹…広ã使用ã•れã¦ã„ã¦ã€å¤šãã® Webブラウザーã¨ã®äº’æ›æ€§ãŒã‚りã¾ã™ã€‚ + +ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ¬ãƒ™ãƒ«ã«ãŠã„ã¦ã¯ã€TLSプロトコル㯠TCP/IPレイヤー (低レベル) ã¨HTTP高レベルプロトコルã¨ã®é–“ã«æŒ¿å…¥ã•れã¾ã™ã€‚ TLS ã¯ä¸»ã« HTTP ã§å‹•作ã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•れã¾ã—ãŸã€‚ + +TLS を用ã„ãŸãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¨­å®š: + +![](assets/en/WebServer/tls1.png) + +TLSプロトコルã¯ã€é€ä¿¡è€…ã¨å—信者をèªè¨¼ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•れã€äº¤æ›ã•ã‚ŒãŸæƒ…å ±ã®æ©Ÿå¯†æ€§ã¨æ•´åˆæ€§ã‚’ä¿è¨¼ã—ã¾ã™: + +* **èªè¨¼**: é€ä¿¡è€…ã¨å—信者㮠ID を確èªã—ã¾ã™ã€‚ +* **機密性**: é€ä¿¡ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã—ã¾ã™ã€‚ãã®ãŸã‚第三者ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’解読ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 +* **æ•´åˆæ€§**: å—信データãŒå¶ç™ºçš„ã«ã¾ãŸã¯æ•…æ„ã«ä¿®æ­£ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 + +TLS ã¯å…¬é–‹éµæš—å·åŒ–技術を用ã„ã¾ã™ã€‚ã“れã¯ã€æš—å·åŒ–ã¨å¾©å·åŒ–ã®éžå¯¾ç§°éµã®ãƒšã‚¢ã§ã‚る公開éµã¨ç§˜å¯†éµã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ 秘密éµã¯ãƒ‡ãƒ¼ã‚¿ã‚’æš—å·åŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ é€ä¿¡è€… (Webサイト) ã¯ã€ãれを誰ã«ã‚‚渡ã—ã¾ã›ã‚“。 公開éµã¯æƒ…報を復å·åŒ–ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã€è¨¼æ˜Žæ›¸ã‚’通ã—ã¦å—信者 (Webブラウザー) ã¸é€ä¿¡ã•れã¾ã™ã€‚ インターãƒãƒƒãƒˆã§ TLS を使用ã™ã‚‹éš›ã€è¨¼æ˜Žæ›¸ã¯ Verisign® ãªã©ã®èªè¨¼æ©Ÿé–¢ã‚’通ã—ã¦ç™ºè¡Œã•れã¾ã™ã€‚ Webサイトã¯è¨¼æ˜Žæ›¸ã‚’èªè¨¼æ©Ÿé–¢ ã‹ã‚‰è³¼å…¥ã—ã¾ã™ã€‚ã“ã®è¨¼æ˜Žæ›¸ã¯ã‚µãƒ¼ãƒãƒ¼èªè¨¼ã‚’ä¿è¨¼ã—ã€ä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§ã®ãƒ‡ãƒ¼ã‚¿äº¤æ›ã‚’許å¯ã™ã‚‹å…¬é–‹éµã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ +> æš—å·åŒ–メソッドã¨å…¬é–‹éµãŠã‚ˆã³ç§˜å¯†éµã«é–¢ã™ã‚‹è©³ç´°ã¯ã€`ENCRYPT BLOB` コマンドã®è¨˜è¿°ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## 最低ãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +デフォルトã§ã€4D ã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„る最低é™ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ TLS 1.2 ã¨ãªã‚Šã¾ã™ã€‚ ã“ã®å€¤ã¯ `SET DATABASE PARAMETER` コマンド㧠`Min TLS version` セレクターを使用ã™ã‚‹ã“ã¨ã§å¤‰æ›´å¯èƒ½ã§ã™ã€‚ + +接続時ã«å—ã‘入れる [最低TLSãƒãƒ¼ã‚¸ãƒ§ãƒ³](WebServer/webServerConfig.md#最低TLSãƒãƒ¼ã‚¸ãƒ§ãƒ³) を定義ã™ã‚‹ã“ã¨ã§ã€Webサーãƒãƒ¼ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ¬ãƒ™ãƒ«ã‚’制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## 証明書ã®å–得方法 + +サーãƒãƒ¼ã‚’ä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§èµ·å‹•ã•ã›ã‚‹ã«ã¯ã€èªè¨¼æ©Ÿé–¢ã®é›»å­è¨¼æ˜Žæ›¸ãŒå¿…è¦ã§ã™ã€‚ ã“ã®è¨¼æ˜Žæ›¸ã«ã¯ã€ã‚µã‚¤ãƒˆID ã‚„ã€ã‚µãƒ¼ãƒãƒ¼ã¨ã®é€šä¿¡ã«ä½¿ç”¨ã™ã‚‹å…¬é–‹éµãªã©ã€æ§˜ã€…ãªæƒ…å ±ãŒæ ¼ç´ã•れã¾ã™ã€‚ ãã®ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã—ãŸéš›ã«ã€è¨¼æ˜Žæ›¸ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ (例: Webブラウザー) ã¸é€ã‚‰ã‚Œã¾ã™ã€‚ 証明書ãŒè­˜åˆ¥ã•れå—ã‘入れられるã¨ã€ä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§é€šä¿¡ãŒé–‹å§‹ã•れã¾ã™ã€‚ +> ブラウザーã¯ã€ãƒ«ãƒ¼ãƒˆè¨¼æ˜Žæ›¸ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸèªè¨¼æ©Ÿé–¢ã«ã‚ˆã£ã¦ç™ºè¡Œã•れãŸè¨¼æ˜Žæ›¸ã®ã¿ã‚’許å¯ã—ã¾ã™ã€‚ルート証明書ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ãªã„å ´åˆã€é€šå¸¸è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/WebServer/tls2.png) + +èªè¨¼æ©Ÿé–¢ã¯è¤‡æ•°ã®æ¡ä»¶ã«ã‚ˆã£ã¦é¸æŠžã•れã¾ã™ã€‚ èªè¨¼æ©Ÿé–¢ãŒä¸€èˆ¬ã«ã‚ˆã知られã¦ã„ã‚‹ã¨ã€è¨¼æ˜Žæ›¸ã¯å¤šãã®ãƒ–ラウザーã«ã‚ˆã£ã¦è¨±å¯ã•れã¾ã™ã€‚ãŸã ã—ã€è²»ç”¨ã¯é«˜ããªã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 + +デジタル証明書ã®å–å¾—: + +1. `GENERATE ENCRYPTION KEYPAIR` コマンドを使用ã—ã¦ã€ç§˜å¯†éµã‚’作æˆã—ã¾ã™ã€‚ +> **警告**: セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€ç§˜å¯†éµã¯å¸¸ã«æ©Ÿå¯†ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 実際ã€ç§˜å¯†éµã¯å¸¸ã«ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã¨ä¸€ç·’ã«å­˜åœ¨ã—ã¦ã„ã‚‹ã¹ãã§ã™ã€‚ Webサーãƒãƒ¼ã®å ´åˆã€Key.pem ファイル㯠Projectフォルダーã«ä¿å­˜ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +2. 証明書ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’発行ã™ã‚‹ãŸã‚ã« `GENERATE CERTIFICATE REQUEST` コマンドを使用ã—ã¾ã™ã€‚ + +3. ãã®è¨¼æ˜Žæ›¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é¸æŠžã•れãŸèªè¨¼æ©Ÿé–¢ã¸é€ã‚Šã¾ã™ã€‚

        証明書リクエストを記入ã™ã‚‹éš›ã€èªè¨¼æ©Ÿé–¢ã¸ã®å•ã„åˆã‚ã›ãŒå¿…è¦ã¨ãªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ èªè¨¼æ©Ÿé–¢ã¯é€ä¿¡ã•れã¦ããŸæƒ…å ±ãŒæ­£ç¢ºãªã‚‚ã®ã‹ã‚’確èªã—ã¾ã™ã€‚ ãã®è¨¼æ˜Žæ›¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ base64 ã§æš—å·åŒ–ã•れ㟠PKCSフォーマット (PEMフォーマット) を用ã„㦠BLOB ã«ä½œæˆã• れã¾ã™ã€‚ ã“ã®åŽŸç†ã‚’使用ã™ã‚‹ã¨ã€ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦ã‚­ãƒ¼ã‚’コピー&ペーストã§ãã¾ã™ã€‚キーã®å†…容を修正ã›ãšã«èªè¨¼æ©Ÿé–¢ã«æå‡ºã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«è¨¼æ˜Žæ›¸ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å«ã‚“ã§ã„ã‚‹ BLOB ã‚’ä¿å­˜ã—ã¾ã™ (`BLOB TO DOCUMENT` コマンドを使用)。ãã—ã¦ã€ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã‚’é–‹ãã€ãれをコピーã—ã¦ã€èªè¨¼æ©Ÿé–¢ã¸é€ä¿¡ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ã¾ãŸã¯ Webフォームã«ãƒšãƒ¼ã‚¹ãƒˆã—ã¾ã™ã€‚ + +4. 証明書をå–å¾—ã—ãŸã‚‰ã€"cert.pem" ã¨ã„ã†åå‰ã§ãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイルを作æˆã—ã€ãã®è¨¼æ˜Žæ›¸ã®å†…容をãã®ãƒ•ァイルã¸ã‚³ãƒ”ーã—ã¾ã™ã€‚

        è¨¼æ˜Žæ›¸ã¯æ§˜ã€…ãªæ–¹æ³•ã§å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ (通常㯠Eメールã¾ãŸã¯ HTMLå½¢å¼ã§å—ã‘å–りã¾ã™)。 4D ã¯è¨¼æ˜Žæ›¸ã«é–¢ã—ã¦ã¯å…¨ãƒ—ラットフォームã«é–¢é€£ã—ãŸãƒ†ã‚­ã‚¹ãƒˆãƒ•ォーマットをå—ã‘付ã‘ã¾ã™ (OS Xã€Windowsã€Linuxã€ç­‰)。 ãŸã ã—ã€è¨¼æ˜Žæ›¸ã¯ PEMフォーマットã€ã¤ã¾ã‚Š base64 ã§ PKCSエンコードã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> CR改行コードã¯ã€ãれå˜ä½“ã§ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。改行コード㯠CRLF ã¾ãŸã¯ LF を使用ã—ã¦ãã ã•ã„。 + +5. "cert.pem" ファイルを [é©åˆ‡ãªå ´æ‰€](#インストールã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³) ã«ä¿å­˜ã—ã¾ã™ã€‚ + +4Dサーãƒãƒ¼ãŒä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§å‹•作ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ 証明書㯠3ヶ月ã‹ã‚‰1å¹´é–“ã®é–“ã§æœ‰åйã§ã™ã€‚ + +## インストールã¨ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³ + +### `key.pem` 㨠`cert.pem` ファイルã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ« + +サーãƒãƒ¼ã¨ä¸€ç·’ã« TLSプロトコルを使用ã™ã‚‹ã«ã¯ã€**key.pem** (ç§˜å¯†ã®æš—å·éµã‚’å«ã‚€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ) 㨠**cert.pem** (証明書をå«ã‚€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ) ãŒæ‰€å®šã®å ´æ‰€ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 TLS を使用ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å ´æ‰€ãŒç•°ãªã‚Šã¾ã™ã€‚ +> デフォルト㮠*key.pem* 㨠*cert.pem* 㯠4D ã«ã‚ˆã£ã¦æä¾›ã•れã¦ã„ã¾ã™ã€‚ より高レベルã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã®ãŸã‚ã«ã¯ã€ã“れらã®ãƒ•ァイルをã”自身ã®è¨¼æ˜Žæ›¸ã§ç½®ãæ›ãˆã‚‹ã“ã¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚ + +#### Webサーãƒãƒ¼ã®å ´åˆ + +4D Webサーãƒãƒ¼ã§ä½¿ç”¨ã™ã‚‹ã«ã¯ã€**key.pem** 㨠**cert.pem** を次ã®å ´æ‰€ã«ä¿å­˜ã—ã¾ã™: + +- 4D (ローカル) ãŠã‚ˆã³ 4D Server ã§ã¯ã€[Project フォルダー](Project/architecture.md#project-フォルダー) ã¨åŒéšŽå±¤ã€‚ +- 4D ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã“れらã®ãƒ•ァイルã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ã® 4D Client Database フォルダーã«ç½®ã‹ã‚Œãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“ã®ãƒ•ォルダーã®å ´æ‰€ã«é–¢ã™ã‚‹æƒ…å ±ã¯ã€[`Get 4D Folder`](https://doc.4d.com/4dv19/help/command/ja/page485.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 + +ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ã«æ‰‹å‹•ã§ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +#### アプリケーションサーãƒãƒ¼ (クライアントサーãƒãƒ¼ãƒ»ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—アプリケーション) ã®å ´åˆ + +4D アプリケーションサーãƒãƒ¼ã§ä½¿ç”¨ã™ã‚‹ã«ã¯ã€**key.pem** 㨠**cert.pem** を次ã®å ´æ‰€ã«ä¿å­˜ã—ã¾ã™: + +- 4D Server アプリケーション㮠[**Resources**フォルダー](Project/architecture.md#resources)。 +- å„リモート4Dアプリケーション㮠**Resources** フォルダー (ã“ã®ãƒ•ォルダーã®å ´æ‰€ã«é–¢ã™ã‚‹æƒ…å ±ã¯ã€[`Get 4D Folder`](https://doc.4d.com/4dv19/help/command/ja/page485.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„)。 + +#### SQLサーãƒãƒ¼ã®å ´åˆ + +4D SQLサーãƒãƒ¼ã§ä½¿ç”¨ã™ã‚‹ã«ã¯ã€**key.pem** 㨠**cert.pem** ファイルã¯[Project フォルダー](Project/architecture.md#project-フォルダー) ã®éš£ã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +### TLSを有効ã«ã™ã‚‹ + +**key.pem** 㨠**cert.pem** ファイルをインストールã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€4Dサーãƒãƒ¼ã«ãŠã‘ã‚‹ TLS ã®ä½¿ç”¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ ãŸã ã—ã€ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦å—ã‘入れられるよã†ã«ã™ã‚‹ã«ã¯ã€TLS接続を有効化ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +- 4D Webサーãƒãƒ¼ã®å ´åˆã€[HTTPSを有効](WebServer/webServerConfig.md#HTTPSを有効ã«ã™ã‚‹) ã«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ [HSTSオプション](WebServer/webServerConfig.md#HSTSを有効ã«ã™ã‚‹) を設定ã—ã¦ã€HTTPãƒ¢ãƒ¼ãƒ‰ã§æŽ¥ç¶šã—よã†ã¨ã™ã‚‹ãƒ–ラウザーをリダイレクトã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- アプリケーションサーãƒãƒ¼ã§ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® "C/S (クライアントサーãƒãƒ¼)" ページ㧠**クライアント-サーãƒãƒ¼é€šä¿¡ã®æš—å·åŒ–** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- SQLサーãƒãƒ¼ã®å ´åˆã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® "SQL" ページ㧠**TLSを有効ã«ã™ã‚‹** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> 4D Webサーãƒãƒ¼ã¯ã€ã‚»ã‚­ãƒ¥ã‚¢ãª HTTPS接続ã®ã¿ã‚’許å¯ã™ã‚‹ã¨ãƒ–ラウザーã«å¯¾ã—ã¦å®£è¨€ã™ã‚‹ãŸã‚ã® [HSTSオプション](WebServer/webServerConfig.md#HSTSを有効ã«ã™ã‚‹) をサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + +## Perfect Forward Secrecy (PFS) + +[PFS](https://ja.wikipedia.org/wiki/Forward_secrecy) ã¯é€šä¿¡ã®ä¸­ã«æ–°ãŸãªãƒ¬ã‚¤ãƒ¤ãƒ¼ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’追加ã—ã¾ã™ã€‚ äº‹å‰æº–å‚™ã•れãŸäº¤æ›éµã‚’使用ã™ã‚‹ä»£ã‚りã«ã€PFS 㯠Diffie-Hellman (DH) アルゴリズムを用ã„ã¦é€šä¿¡ç›¸æ‰‹åŒå£«ã§å”åŒçš„ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚­ãƒ¼ã‚’作æˆã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«å”åŒã§éµã‚’作æˆã™ã‚‹ã“ã¨ã§ "共有ã®ç§˜å¯†" ãŒä½œæˆã•れã€å¤–部ã¸ã®æ¼æ´©ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +サーãƒãƒ¼ä¸Šã§ TLS ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ãã€PFS ã¯è‡ªå‹•çš„ã«æœ‰åйã•れã¾ã™ã€‚ *dhparams.pem* ファイル (サーãƒãƒ¼ã® DHéžå…¬é–‹éµã‚’å«ã‚€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ) ãŒã¾ã å­˜åœ¨ã—ã¦ã„ãªã„å ´åˆã€4D 㯠2048 ã®éµã‚µã‚¤ã‚ºã§è‡ªå‹•çš„ã«ãれを生æˆã—ã¾ã™ã€‚ ã“ã®ãƒ•ァイルã®ç”Ÿæˆã«ã¯æ•°åˆ†é–“ã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ã“ã®ãƒ•ァイルã¯ã€[*key.pem* ãŠã‚ˆã³ *cert.pem* ファイル](#key-pem-ã¨-cert-pem-ファイル)ã¨åŒã˜å ´æ‰€ã«ç½®ãã¾ã™ã€‚ + +[ã‚«ã‚¹ã‚¿ãƒ ã®æš—å·ãƒªã‚¹ãƒˆ](WebServer/webServerConfig.md#æš—å·ãƒªã‚¹ãƒˆ) を使用ã—ã¦ã„ã¦ã€PFS を有効化ã—ãŸã„å ´åˆã€DH ã‚ã‚‹ã„㯠ECDH (Elliptic-curve Diffie–Hellman) アルゴリズムã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒãã®ãƒªã‚¹ãƒˆã«å«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Admin/webAdmin.md b/website/translated_docs/ja/Admin/webAdmin.md new file mode 100644 index 00000000000000..b0dfe36d18e0df --- /dev/null +++ b/website/translated_docs/ja/Admin/webAdmin.md @@ -0,0 +1,156 @@ +--- +id: webAdmin +title: Web ç®¡ç† +--- + + +`WebAdmin` ã¨ã¯ã€4D ãŠã‚ˆã³ 4D Server ã«ä½¿ç”¨ã•れる組ã¿è¾¼ã¿ã® Webサーãƒãƒ¼ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®åç§°ã§ã€[データエクスプローラー](dataExplorer.md) ãªã©ã®ç®¡ç†æ©Ÿèƒ½ã¸ã®å®‰å…¨ãª Webアクセスをæä¾›ã—ã¾ã™ã€‚ ブラウザーやã€ä»»æ„ã® Webアプリケーションã‹ã‚‰ã€ãƒ­ãƒ¼ã‚«ãƒ«ã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆã§ã“ã® Webサーãƒãƒ¼ã«æŽ¥ç¶šã—ã€é–¢é€£ã® 4Dアプリケーションã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +WebAdmin 内部コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€"WebAdmin" 権é™ã‚’æŒã¤ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®èªè¨¼ã‚’処ç†ã—ã€ç®¡ç†ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ã„ã¦å°‚用インターフェースã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã—ã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ã€ãƒ˜ãƒƒãƒ‰ãƒ¬ã‚¹ã§å‹•作ã™ã‚‹ 4Dアプリケーションã§ã‚‚ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースをæŒã¤ 4Dアプリケーションã§ã‚‚使用ã§ãã¾ã™ã€‚ + + +## WebAdmin Webサーãƒãƒ¼ã®èµ·å‹• + +デフォルトã§ã¯ã€`WebAdmin` Webサーãƒãƒ¼ã¯é–‹å§‹ã—ã¾ã›ã‚“。 起動時ã«é–‹å§‹ã™ã‚‹ã‚ˆã†ã«è¨­å®šã™ã‚‹ã‹ã€(インターフェース付ãã®å ´åˆã¯) メニューã‹ã‚‰æ‰‹å‹•ã§é–‹å§‹ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +### 自動スタートアップ + +`WebAdmin` Webサーãƒãƒ¼ã¯ã€4D ã¾ãŸã¯ 4D Server アプリケーションã®èµ·å‹•時 (プロジェクトã®èª­ã¿è¾¼ã¿å‰) ã«é–‹å§‹ã™ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã™ã€‚ + +- インターフェースをæŒã¤ 4Dアプリケーションを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€**ファイル > Webç®¡ç† ï¼ž 設定...** ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![alt-text](assets/en/Admin/waMenu1.png) + +Web管ç†è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§ã€**Webサーãƒãƒ¼ç®¡ç†è‡ªå‹•スタートアップ** オプションをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +![alt-text](assets/en/Admin/waSettings.png) + +- ヘッドレス㮠4Dアプリケーションを使用ã—ã¦ã„ã‚‹ã‹ã«ã‹ã‹ã‚らãšã€ä»¥ä¸‹ã® *コマンドライン・インターフェース* ã®å¼•数を使用ã—ã¦ã€è‡ªå‹•スタートアップを有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + + +``` +open ~/Desktop/4D.app --webadmin-auto-start true +``` + +> `WebAdmin` Webサーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹ TCPãƒãƒ¼ãƒˆ (設定ã«ã‚ˆã‚Šã€[HTTPS](#https-port) ã¾ãŸã¯ [HTTP](#http-port)) ãŒé–‹å§‹æ™‚ã«ç©ºã„ã¦ã„ãªã„å ´åˆã€4D ã¯æ¬¡ã® 20個ã®ãƒãƒ¼ãƒˆã‚’é †ã«è©¦ã—ã€åˆ©ç”¨ã§ãる最åˆã®ãƒãƒ¼ãƒˆã‚’使用ã—ã¾ã™ã€‚ 利用å¯èƒ½ãªãƒãƒ¼ãƒˆãŒãªã„å ´åˆã€Webサーãƒãƒ¼ã¯é–‹å§‹ã›ãšã€ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れるã‹ã€(ヘッドレスアプリケーションã®å ´åˆã¯) コンソールã®ãƒ­ã‚°ã«è¨˜éŒ²ã•れã¾ã™ã€‚ + + +### é–‹å§‹ã¨åœæ­¢ + +インターフェースをæŒã¤ 4Dアプリケーションを使用ã—ã¦ã„ã‚‹å ´åˆã€ãƒ—ロジェクト㮠`WebAdmin` Webサーãƒãƒ¼ã¯ã„ã¤ã§ã‚‚é–‹å§‹ã¾ãŸã¯åœæ­¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +**ファイル > Webç®¡ç† ï¼ž Webサーãƒãƒ¼é–‹å§‹** ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![alt-text](assets/en/Admin/waMenu2.png) + +サーãƒãƒ¼ãŒé–‹å§‹ã•れã¦ã„ã‚‹ã¨ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …目㯠**Webサーãƒãƒ¼åœæ­¢** ã«ãªã‚Šã¾ã™ã€‚`WebAdmin` Webサーãƒãƒ¼ã‚’åœæ­¢ã™ã‚‹ã«ã¯ã€ã“ã‚Œã‚’é¸æŠžã—ã¾ã™ã€‚ + + + +## WebAdmin 設定 + +[**アクセスキー**](#access-key) を定義ã™ã‚‹ã«ã¯ã€`WebAdmin` コンãƒãƒ¼ãƒãƒ³ãƒˆã®è¨­å®šã¯å¿…é ˆã§ã™ã€‚ デフォルトã§ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ãŒè¨­å®šã•れã¦ã„ãªã„å ´åˆã¯ã€URL経由ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯è¨±å¯ã•れã¾ã›ã‚“。 + +`WebAdmin` コンãƒãƒ¼ãƒãƒ³ãƒˆã®è¨­å®šã¯ã€[Web管ç†è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹](#settings-dialog-box) (後述å‚ç…§) ã§ãŠã“ãªã„ã¾ã™ã€‚ + +> ヘッドレス4Dアプリケーションを使用ã—ã¦ã„ã‚‹å ´åˆã¯ã€[*コマンドライン・インターフェース* ã®å¼•æ•°](#webadmin-headless-configuration) を使用ã—ã¦åŸºæœ¬çš„ãªè¨­å®šã‚’定義ã§ãã¾ã™ã€‚ 高度ãªãƒ‘ラメーターを定義ã™ã‚‹ã«ã¯ã€è¨­å®šãƒ•ァイルをカスタマイズã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +### 設定ダイアログボックス + +Web管ç†ã®è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’é–‹ãã«ã¯ã€**ファイル > Web ç®¡ç† ï¼ž 設定...** ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![alt-text](assets/en/Admin/waMenu1.png) + +次ã®ã‚ˆã†ãªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™: + +![alt-text](assets/en/Admin/waSettings2.png) + +#### Webサーãƒãƒ¼ç®¡ç†è‡ªå‹•スタートアップ + +4D ã¾ãŸã¯ 4D Server アプリケーションã®èµ·å‹•時㫠`WebAdmin` Webサーãƒãƒ¼ã‚’自動的ã«é–‹å§‹ã•ã›ã‚‹ã«ã¯ã€ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ ([å‰è¿°å‚ç…§](#自動スタートアップ))。 デフォルトã§ã¯ã€ã“ã®ã‚ªãƒ—ションã¯ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¾ã›ã‚“。 + +#### ローカルホストã§HTTP接続をå—ã‘入れる + +ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€4Dアプリケーションã¨åŒã˜ãƒžã‚·ãƒ³ä¸Šã§ HTTP を介ã—㦠`WebAdmin` Webサーãƒãƒ¼ã«æŽ¥ç¶šã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€ã“ã®ã‚ªãƒ—ションã¯ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚ + +**注:** +- ローカルホスト以外ã«ã‚ˆã‚‹ HTTP接続ã¯å—ã‘付ã‘ã¾ã›ã‚“。 +- ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¦ã‚‚ã€[HTTPSã‚’å—ã‘入れる](#HTTPSã‚’å—ã‘入れる) ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¦ã€TLS ã®è¨­å®šãŒæœ‰åйãªå ´åˆã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã®æŽ¥ç¶šã¯ HTTPS を使用ã—ã¾ã™ã€‚ + + +#### HTTP ãƒãƒ¼ãƒˆ + +**ローカルホストã§HTTP接続をå—ã‘入れる** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйãªå ´åˆã€`WebAdmin` Webサーãƒãƒ¼ã¸ã® HTTP接続ã«ä½¿ç”¨ã™ã‚‹ãƒãƒ¼ãƒˆç•ªå·ã§ã™ã€‚ デフォルト値㯠7080 ã§ã™ã€‚ + + +#### HTTPSã‚’å—ã‘入れる + +ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€`WebAdmin` Webサーãƒãƒ¼ã« HTTPS を介ã—ã¦æŽ¥ç¶šã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€ã“ã®ã‚ªãƒ—ションã¯ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚ + +#### HTTPS ãƒãƒ¼ãƒˆ + +**HTTPSã‚’å—ã‘入れる** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйãªå ´åˆã€`WebAdmin` Webサーãƒãƒ¼ã¸ã® HTTPS接続ã«ä½¿ç”¨ã™ã‚‹ãƒãƒ¼ãƒˆç•ªå·ã§ã™ã€‚ デフォルト値㯠7443 ã§ã™ã€‚ + + +#### èªè¨¼ãƒ•ォルダパス + +TLS証明書ファイルãŒç½®ã‹ã‚Œã¦ã„るフォルダーã®ãƒ‘スã§ã™ã€‚ デフォルトã§ã¯èªè¨¼ãƒ•ォルダパスã¯ç©ºã§ã€4D ã¾ãŸã¯ 4D Server 㯠4Dアプリケーションã«çµ„ã¿è¾¼ã¾ã‚ŒãŸè¨¼æ˜Žæ›¸ãƒ•ァイルを使用ã—ã¾ã™ (カスタム証明書ã¯ãƒ—ロジェクトフォルダーã®éš£ã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 + +#### デãƒãƒƒã‚°ãƒ­ã‚°ãƒ¢ãƒ¼ãƒ‰ + +HTTPリクエストログファイル (アプリケーション㮠"Logs" ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¦ã„ã‚‹ HTTPDebugLog_*nn*.txt (nn ã¯ãƒ•ァイル番å·)) ã®çŠ¶æ…‹ã‚„ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’æŒ‡å®šã—ã¾ã™ã€‚ 次ã®ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- **無効化** (デフォルト) +- **bodyパーツを全ã¦** - レスãƒãƒ³ã‚¹ãŠã‚ˆã³ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒœãƒ‡ã‚£ãƒ‘ーツをå«ã‚ã‚‹å½¢ã§æœ‰åŠ¹åŒ–ã€‚ +- **bodyパーツをå«ã‚ãªã„** - ボディパーツをå«ã‚ãªã„å½¢ã§æœ‰åŠ¹åŒ– (ãƒœãƒ‡ã‚£ã‚¶ã‚¤ã‚ºã¯æä¾›ã•れã¾ã™) +- **リクエストã®body** - リクエストã®ãƒœãƒ‡ã‚£ãƒ‘ーツã®ã¿ã‚’å«ã‚ã‚‹å½¢ã§æœ‰åŠ¹åŒ–ã€‚ +- **レスãƒãƒ³ã‚¹ã®body** - レスãƒãƒ³ã‚¹ã®ãƒœãƒ‡ã‚£ãƒ‘ーツã®ã¿ã‚’å«ã‚ã‚‹å½¢ã§æœ‰åŠ¹åŒ–ã€‚ + +#### アクセスキー + +`WebAdmin` Webサーãƒãƒ¼ã¸ã® URL経由アクセスã®ãƒ­ãƒƒã‚¯ã‚’解除ã™ã‚‹ã«ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã®å®šç¾©ã¯å¿…é ˆã§ã™ (4Dメニューコマンドã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹ã«ã¯ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã¯å¿…è¦ã‚りã¾ã›ã‚“)。 アクセスキーãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆã€[データエクスプローラーページ](dataExplorer.md) ãªã©ã® Web管ç†ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース㫠Webクライアントを使ã£ã¦ URLを介ã—ãŸæŽ¥ç¶šã¯ã§ãã¾ã›ã‚“。 接続リクエストãŒã‚ã£ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãƒšãƒ¼ã‚¸ãŒè¿”ã•れã¾ã™: + +![alt-text](assets/en/Admin/accessKey.png) + +アクセスキーã¯ãƒ‘スワードã«ä¼¼ã¦ã„ã¾ã™ãŒã€ãƒ­ã‚°ã‚¤ãƒ³ã¨ã¯é–¢ä¿‚ã‚りã¾ã›ã‚“。 + +- æ–°ã—ã„アクセスキーを定義ã™ã‚‹ã«ã¯ã€**定義** ボタンをクリックã—ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã®æ–‡å­—列を入力ã—㦠**OK** をクリックã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ãƒ©ãƒ™ãƒ«ãŒ **編集** ã«å¤‰ã‚りã¾ã™ã€‚ +- アクセスキーを編集ã™ã‚‹ã«ã¯ã€**編集** ボタンをクリックã—ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã«æ–°ã—ã„ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã®æ–‡å­—列を入力ã—㦠**OK** をクリックã—ã¾ã™ã€‚ +- æ–°ã—ã„アクセスキーを削除ã™ã‚‹ã«ã¯ã€**編集** ボタンをクリックã—ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼æ¬„を空ã«ã—㦠**OK** をクリックã—ã¾ã™ã€‚ + + +## WebAdmin ã®ãƒ˜ãƒƒãƒ‰ãƒ¬ã‚¹è¨­å®š + +ã™ã¹ã¦ã® [WebAdmin 設定](#webadmin-設定) ã¯ã€`WebAdmin.4DSettings` ファイルã«ä¿å­˜ã•れã¾ã™ã€‚ 4D ãŠã‚ˆã³ 4D Server アプリケーション毎ã«ãƒ‡ãƒ•ォルト㮠`WebAdmin.4DSettings` ファイル㌠1ã¤å­˜åœ¨ã—ã€åŒã˜ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ä¸Šã§è¤‡æ•°ã®ã‚¢ãƒ—リケーションをé‹ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4D ãŠã‚ˆã³ 4D Server アプリケーションをヘッドレスã§å®Ÿè¡Œã—ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ•ォルト㮠`WebAdmin.4DSettings` ファイルを設定ã—ã¦ä½¿ç”¨ã™ã‚‹ã‹ã€ã‚«ã‚¹ã‚¿ãƒ ã® `.4DSettings` ファイルを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ファイルã®å†…容を設定ã™ã‚‹ã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースをæŒã¤ 4Dアプリケーションã®[WebAdmin設定ダイアログ](#設定ダイアログボックス) を使用ã—ã€ãã®å¾Œãƒ˜ãƒƒãƒ‰ãƒ¬ã‚¹ã§å®Ÿè¡Œã—ã¾ã™ã€‚ ã“ã®ã¨ãã€ãƒ‡ãƒ•ォルト㮠`WebAdmin.4DSettings` ファイルãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¾ãŸã€ã‚«ã‚¹ã‚¿ãƒ ã® `.4DSettings` ファイル (xmlå½¢å¼) を設定ã—ã€ãƒ‡ãƒ•ォルトファイルã®ä»£ã‚りã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã€[コマンドライン・インターフェース](cli.md) ã§ã¯ã„ãã¤ã‹ã®å°‚用ã®å¼•æ•°ãŒç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ + +> `.4DSettings` ファイルã«ãŠã„ã¦ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ã¯å¹³æ–‡ã§ã¯ä¿å­˜ã•れã¾ã›ã‚“。 + +例: + +``` +"%HOMEPATH%\Desktop\4D Server.exe" MyApp.4DLink --webadmin-access-key + "my Fabulous AccessKey" --webadmin-auto-start true + --webadmin-store-settings + +``` + + +## èªè¨¼ã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³ + +- 事å‰ã«æœ¬äººç¢ºèªã›ãšã« URL経由㧠Web管ç†ãƒšãƒ¼ã‚¸ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸå ´åˆã€èªè¨¼ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ ユーザーã¯ã€èªè¨¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã« [アクセスキー](#アクセスキー) を入力ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ `WebAdmin` 設定ã§ã‚¢ã‚¯ã‚»ã‚¹ã‚­ãƒ¼ãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆã«ã¯ã€URL経由ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã§ãã¾ã›ã‚“。 + +- 4D ã¾ãŸã¯ 4D Server ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›® (**レコード > データエクスプローラー** ã¾ãŸã¯ **ウィンドウ > データエクスプローラー** (4D Server) ãªã©) ã‹ã‚‰ Web管ç†ãƒšãƒ¼ã‚¸ã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸå ´åˆã€ã‚¢ã‚¯ã‚»ã‚¹ã¯èªè¨¼ãªã—ã§è¨±å¯ã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è‡ªå‹•çš„ã«èªè¨¼ã•れã¾ã™ã€‚ + +アクセスãŒè¨±å¯ã•れるã¨ã€4Dアプリケーション上㫠"WebAdmin" 権é™ã‚’æŒã¤ Web[セッション](WebServer/sessions.md) ãŒä½œæˆã•れã¾ã™ã€‚ カレントセッション㌠"WebAdmin" 権é™ã‚’æŒã£ã¦ã„ã‚‹é™ã‚Šã€`WebAdmin` コンãƒãƒ¼ãƒãƒ³ãƒˆã¯è¦æ±‚ã•れãŸãƒšãƒ¼ã‚¸ã‚’æä¾›ã—ã¾ã™ã€‚ + + diff --git a/website/translated_docs/ja/Backup/backup.md b/website/translated_docs/ja/Backup/backup.md index 45629b6900cd4e..ac1bd1e0cefb9d 100644 --- a/website/translated_docs/ja/Backup/backup.md +++ b/website/translated_docs/ja/Backup/backup.md @@ -1,95 +1,95 @@ --- id: backup -title: Backup +title: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— --- +4D ã§ã¯ã€æ¬¡ã® 3ã¤ã®æ–¹æ³•ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -## Starting a backup +- 手動ã«ã‚ˆã‚‹æ–¹æ³•: 4D ã® **ファイル** メニューã‹ã‚‰ **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—...** コマンドを使用ã—ã¾ã™ã€‚ã¾ãŸã¯ã€[Maintenance & Security Center (MSC)](MSC/backup.md) ã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—** ボタンをクリックã—ã¾ã™ã€‚ +- 自動的ã«è¡Œã†æ–¹æ³•: ストラクãƒãƒ£ãƒ¼è¨­å®šã‹ã‚‰ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ +- プログラムã«ã‚ˆã‚‹æ–¹æ³•: `BACKUP` コマンドを使用ã—ã¾ã™ã€‚ -A backup can be started in three ways: +> 4D Server: リモートマシンã‹ã‚‰ `BACKUP` を呼ã³å‡ºã™ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ã€æ‰‹å‹•ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã„ã‹ãªã‚‹å ´åˆã§ã‚‚ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¾ã™ã€‚ -- 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. +## 手動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— -> 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. +1. 4D ã® **ファイル** メニューã‹ã‚‰ **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ + ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ウインドウãŒè¡¨ç¤ºã•れã¾ã™: ![](assets/en/Backup/backup01.png) "ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã®ä¿å­˜å…ˆ" エリアã®éš£ã®ãƒãƒƒãƒ—アップメニューを使用ã—ã¦ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã®ä¿å­˜å ´æ‰€ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´æ‰€ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定** ページã«ã¦ã€è¨­å®šã•れã¦ã„ã¾ã™ã€‚ -### Manual backup +- 4D ã® [Maintenance & Security Center (MSC)](MSC/overview.md) ã‚’é–‹ã„ã¦ã€[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ページ](MSC/backup.md) ã‹ã‚‰æ“作ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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. +**データベースプロパティ...** ボタンをクリックã™ã‚‹ã¨ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定ページãŒè¡¨ç¤ºã•れã¾ã™ã€‚ -- You can also open the [Maintenance and Security Center](MSC/overview.md) of 4D and display the [Backup page](MSC/backup.md). + 2. **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—** をクリックã—ã€ç¾åœ¨ã®ãƒ‘ラメーターを用ã„ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã—ã¾ã™ã€‚ -The **Database properties...** button causes the Backup/Configuration page of the Database Settings to be displayed. -2. Click **Backup** to start the backup using current parameters. +## 定期的ãªè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— -### Scheduled automatic backup +自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯æŒ‡å®šã•れãŸã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«å®Ÿè¡Œã•れã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å‘¨æœŸã¯ã€**ストラクãƒãƒ£ãƒ¼è¨­å®š** ã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/スケジューラー** ページã«ã¦è¨­å®šã—ã¾ã™ã€‚ -Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Database Settings**. +ユーザーãŒä¸€åˆ‡æ“作ã—ãªãã¦ã‚‚ã€ã“ã®ãƒšãƒ¼ã‚¸ã§æŒ‡å®šã•ã‚ŒãŸæ™‚é–“ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè‡ªå‹•実行ã•れã¾ã™ã€‚ ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ã€[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãƒ¼](settings.md#スケジューラー) ã®é …目をå‚ç…§ã—ã¦ãã ã•ã„。 -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). -### BACKUP command +## BACKUP コマンド -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). +ä»»æ„ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¦ `BACKUP` 4Dランゲージコマンドを実行ã™ã‚‹ã¨ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã«å®šç¾©ã•れã¦ã„ã‚‹ç¾åœ¨ã®ãƒ‘ラメーターを用ã„ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã—ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—プロセスを処ç†ã™ã‚‹ãŸã‚ã€`On Backup Startup` ãŠã‚ˆã³ `On Backup Shutdown` データベースメソッド使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (詳細ã¯ã€*4Dランゲージリファレンス* マニュアルをå‚ç…§ãã ã•ã„)。 -## Managing the backup processing -Once a backup is started, 4D displays a dialog box with a thermometer indicating the progress of the backup: +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—処ç†ã®ç®¡ç† + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒé–‹å§‹ã™ã‚‹ã¨ 4Dã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é€²æ—状æ³ã‚’知らã›ã‚‹ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ã®ã‚るダイアログボックスを表示ã—ã¾ã™: ![](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. +MSC を使用ã—ã¦ã„ã‚‹å ´åˆã€ã“ã®é€²æ—インジケーター㯠[MSC ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ページ](MSC/backup.md) ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -The **Stop** button lets the user interrupt the backup at any time (refer to [Handling backup issues](backup.md#handling-backup-issues) below). +**中止** ボタンをクリックã™ã‚‹ã¨ã€ã„ã¤ã§ã‚‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を中断ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中ã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆ](backup.md#ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中ã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆ) å‚ç…§)。 -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**. +å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®çµæžœ (æˆåŠŸã¾ãŸã¯ä¸æˆåŠŸ) ã¯ã€[MSC ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ページ](MSC/backup.md) ã® "å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æƒ…å ±" エリアã€ã¾ãŸã¯ 4D Server ã® **メンテナンスページ** ã§ç¢ºèªã§ãã¾ã™ã€‚ ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル** (Backup Journal.txt) ã«ã‚‚記録ã•れã¾ã™ã€‚ -### Accessing the database during 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. +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—実行中ã®ã‚¢ãƒ—リケーションã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€4D ã«ã‚ˆã£ã¦åˆ¶é™ã•れã¾ã™ã€‚ 4D ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å«ã¾ã‚ŒãŸãƒ•ァイルタイプã«é–¢é€£ã™ã‚‹ãƒ—ロセルã¯ã™ã¹ã¦ãƒ­ãƒƒã‚¯ã—ã¾ã™: プロジェクトファイルã ã‘ãŒãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れã¦ã„ã‚‹å ´åˆã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã«ã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“ãŒã€ãƒ‡ãƒ¼ã‚¿ã«ã¯ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ -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: +å対ã«ã€ãƒ‡ãƒ¼ã‚¿ã ã‘ãŒãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れã¦ã„ã‚‹ã®ã§ã‚れã°ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯è¨±å¯ã•れã¾ã™ã€‚ ã“ã®å ´åˆã«ã€ã‚¢ãƒ—リケーションã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒå¯èƒ½ã‹ã©ã†ã‹ã‚’次ã«ç¤ºã—ã¾ã™: -- 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). +- シングルユーザー版㮠4D ã®å ´åˆã€ã‚¢ãƒ—リケーションã¯èª­ã¿è¾¼ã¿ã€æ›¸ãè¾¼ã¿ã¨ã‚‚ã«ãƒ­ãƒƒã‚¯ã•れã€ã™ã¹ã¦ã®ãƒ—ロセスãŒåœæ­¢ã—ã¾ã™ã€‚ 実行ã§ãるアクションã¯ã‚りã¾ã›ã‚“。 +- 4D Server ã®å ´åˆã€ã‚¢ãƒ—リケーションã¸ã®æ›¸ãè¾¼ã¿ã ã‘ãŒãƒ­ãƒƒã‚¯ã•れã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã¯ãƒ‡ãƒ¼ã‚¿ã‚’照会ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ クライアントマシンã‹ã‚‰ã‚µãƒ¼ãƒãƒ¼ã¸è¿½åŠ ãƒ»å‰Šé™¤ãƒ»å¤‰æ›´ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒé€ä¿¡ã•れるã¨ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•れã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®çµ‚了ã¾ã§å¾…機ã™ã‚‹ã‚ˆã†è¦æ±‚ã•れã¾ã™ã€‚ アプリケーションãŒä¿å­˜ã•れるã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‰ã˜ã‚‰ã‚Œã€è¦æ±‚ã—ãŸã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®çµ‚了ã¾ã§å¾…機ã›ãšã«ã€å‡¦ç†ä¸­ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’キャンセルã™ã‚‹ã«ã¯ã€**処ç†ã‚’キャンセル** ボタンをクリックã—ã¾ã™ã€‚ ãŸã ã—ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—å‰ã«é–‹å§‹ã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰è¦æ±‚ã•れãŸã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Ÿè¡Œå¾…機中ã§ã‚ã‚‹å ´åˆã€ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’キャンセルã™ã¹ãã§ã¯ã‚りã¾ã›ã‚“。ã“ã®å ´åˆã€å®Ÿè¡Œã™ã¹ã残りã®å‡¦ç†ã ã‘ãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¦ã—ã¾ã†ãŸã‚ã§ã™ã€‚ ã—ã‹ã‚‚ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸€éƒ¨ã¯å®Ÿè¡Œæ¸ˆã¿ãªã®ã§ã€ãƒ‡ãƒ¼ã‚¿ã«ãŠã„ã¦è«–ç†ä¸Šã®ä¸æ•´åˆãŒç”Ÿã˜ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ > 実行待機中ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰è¦æ±‚ã•れãŸã‚‚ã®ã§ã‚ã‚‹å ´åˆã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ **処ç†ã‚’キャンセル** ボタンをクリックã™ã‚‹ã¨ã€4D Server ã¯ã‚¨ãƒ©ãƒ¼ -9976 (データベースã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒé€²è¡Œä¸­ãªã®ã§ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯å®Ÿè¡Œã•れã¾ã›ã‚“) ã‚’è¿”ã—ã¾ã™ã€‚ -### Handling backup issues +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中ã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆ -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. +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒæ­£å¸¸ã«å®Ÿè¡Œã•れãªã„å ´åˆã‚‚ã‚りã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä¸æˆåŠŸã«çµ‚ã‚る原因ã¨ã—ã¦ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹ä¸­æ–­ã€æ·»ä»˜ãƒ•ァイルãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€ä¿å­˜å…ˆãƒ‡ã‚£ã‚¹ã‚¯ã®ãƒˆãƒ©ãƒ–ルã€ä¸å®Œå…¨ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã€ã„ãã¤ã‹è€ƒãˆã‚‰ã‚Œã¾ã™ã€‚4D ã¯åŽŸå› ã«å¿œã˜ã¦å•題ã«å¯¾å‡¦ã—ã¾ã™ã€‚ -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. +ã™ã¹ã¦ã®å ´åˆã«ãŠã„ã¦ã€å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ (æˆåŠŸã¾ãŸã¯ä¸æˆåŠŸ) ã¯ã€[MSC ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ページ](MSC/backup.md) ã® "å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æƒ…å ±" エリアã€4D Server ã® **メンテナンスページ**ã€ãŠã‚ˆã³ **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル** (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. +- **ユーザーã«ã‚ˆã‚‹ä¸­æ–­**: 進æ—ダイアログボックス㮠**中止** ボタンをクリックã™ã‚‹ã¨ã€ã„ã¤ã§ã‚‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を中断ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€å„é …ç›®ã®ã‚³ãƒ”ーãŒä¸­æ­¢ã•れã¦ã‚¨ãƒ©ãƒ¼ 1406 ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ `On Backup Shutdown` データベースメソッドã§é®ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **添付ファイルãŒè¦‹ã¤ã‹ã‚‰ãªã„**: 添付ファイルãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を部分的ã«å®Ÿè¡Œã— (アプリケーションファイルãŠã‚ˆã³ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ãªæ·»ä»˜ãƒ•ァイルã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—)ã€ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ +- **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ä¸å¯èƒ½** (ディスクフルã€ãƒ‡ã‚£ã‚¹ã‚¯ã®æ›¸ãè¾¼ã¿ä¿è­·ã€ãƒ‡ã‚£ã‚¹ã‚¯ãŒè¦‹ã¤ã‹ã‚‰ãªã„ã€ãƒ‡ã‚£ã‚¹ã‚¯éšœå®³ã€ä¸å®Œå…¨ãªãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã€å®šæœŸçš„ãªè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—時ã«ã‚¢ãƒ—リケーションãŒèµ·å‹•ã•れã¦ã„ãªã„ã€ãªã©): åˆå›žã®ã‚¨ãƒ©ãƒ¼ã®å ´åˆã€4D ã¯ã‚‚ã†ä¸€åº¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å®Ÿè¡Œã‚’試ã¿ã¾ã™ã€‚ ã“ã® 2回ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—é–“ã®å¾…機時間ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—&復旧** ãƒšãƒ¼ã‚¸ã§æŒ‡å®šã—ã¾ã™ã€‚ å†è©¦è¡Œã«ã‚‚失敗ã—ãŸå ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã®è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¦ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¨ãƒ©ãƒ¼ã¯ `On Backup Shutdown` データベースメソッドã§é®ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル -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. +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®è¿½è·¡ã‚„検証を容易ã«ã™ã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—モジュールã¯å®Ÿè¡Œã•れãŸå„処ç†ã®æ¦‚è¦ã‚’特別ãªãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ã“ã®ãƒ•ァイルã¯ã€ã„ã‚ゆる活動記録ã®ã‚ˆã†ãªã‚‚ã®ã§ã™ã€‚ 処ç†ãŒå®šæœŸçš„ã¾ãŸã¯æ‰‹å‹•ã®ã„ãšã‚Œã§ãŠã“ãªã‚れã¦ã„ã¦ã‚‚ã€ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ“作 (ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã€å¾©å…ƒã€ãƒ­ã‚°ãƒ•ァイルã®çµ±åˆ) ãŒã“ã®ãƒ•ァイルã«ã€æ—¥èªŒã®ã”ã¨ã記録ã•れã¾ã™ã€‚ ã“れらã®å‡¦ç†ãŒå®Ÿè¡Œã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻もã“ã®ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ã«è¨˜è¿°ã•れã¾ã™ã€‚ + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«ã¯ "Backup Journal[001].txt"ã¨ã„ã†åå‰ãŒä»˜ã‘られã€ãƒ—ロジェクト㮠"Logs" フォルダーã«é…ç½®ã•れã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã¯ã€ä»»æ„ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +#### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã®ã‚µã‚¤ã‚ºç®¡ç† -#### Management of backup journal size +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—方法ã«ã‚ˆã£ã¦ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã®ã‚µã‚¤ã‚ºãŒã™ãã«å¤§ãããªã£ã¦ã—ã¾ã†ã“ã¨ãŒã‚りã¾ã™ (ãŸã¨ãˆã°ã€æ·»ä»˜ãƒ•ァイルãŒä¸€ç·’ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れる場åˆ)。 ã“ã®ã‚µã‚¤ã‚ºã‚’管ç†ã™ã‚‹ã«ã¯ã€2ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- **自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—**: 4D ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã™ã‚‹å‰ã«ã‚«ãƒ¬ãƒ³ãƒˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルファイルã®ã‚µã‚¤ã‚ºã‚’確èªã—ã¾ã™ã€‚ 10MB よりも大ãã„å ´åˆã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ァイルã¯ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã•れã€[xxx] ã®ç•ªå·ãŒã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•ã‚ŒãŸæ–°ã—ã„ファイルを作æˆã—ã¾ã™ (例: "Backup Journal[002].txtâ€)。 ファイル番å·ãŒ 999 ã‚’è¶…ãˆã‚‹ã¨ã€ãƒŠãƒ³ãƒãƒªãƒ³ã‚°ã¯ 1 ã«æˆ»ã‚Šã€æ—¢å­˜ãƒ•ァイルãŒç½®æ›ã•れã¾ã™ã€‚ +- **記録ã™ã‚‹æƒ…å ±é‡ã‚’削減ã™ã‚‹**: ã“ã®ãŸã‚ã«ã¯ã€ãƒ—ロジェクト㮠*backup.4DSettings* ファイル㮠`VerboseMode` キーã®å€¤ã‚’変更ã—ã¾ã™ã€‚ デフォルトã§ã¯ã€true ã®å€¤ãŒè¨­å®šã•れã¦ã„ã¾ã™ã€‚ ã“ã®å€¤ã‚’ false ã«å¤‰æ›´ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«ã¯ä¸»è¦ãªæƒ…å ±ã®ã¿ãŒè¨˜éŒ²ã•れã¾ã™ (ã‚¹ã‚¿ãƒ¼ãƒˆæ™‚ã®æ—¥ä»˜ã¨æ™‚刻ã€ãã—ã¦ã‚¨ãƒ©ãƒ¼ã®æœ‰ç„¡)。 ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã«ä½¿ã‚れる XMLキーã«ã¤ã„ã¦ã®èª¬æ˜Žã¯ [ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ファイル](https://doc.4d.com/4Dv18/4D/18/4D-XML-Keys-Backup.100-4673706.ja.html) マニュアルをå‚ç…§ãã ã•ã„。 -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. +最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒå‡¦ç†ã«ã¤ã„ã¦ã®æƒ…å ±ã¯ã™ã¹ã¦ã€ã‚¢ãƒ—リケーション㮠**backupHistory.json** ファイルã«è¨˜éŒ²ã•れã¾ã™ã€‚ 記録ã•れるã®ã¯ã€ä¿å­˜ã•れãŸãƒ•ァイル (添付å«ã‚€) ã®ãƒ‘スã®ã»ã‹ã€å›žæ•°ã€æ—¥ä»˜ã€æ™‚åˆ»ã€æ‰€è¦æ™‚é–“ã€å„処ç†ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã§ã™ã€‚ ファイルサイズを制é™ã™ã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—&復旧ページã®ä¸€èˆ¬è¨­å®šã«ã‚ã‚‹ "最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã¿ä¿å­˜ X ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル" ã«æŒ‡å®šã—ãŸæ•°ã¨åŒã˜åˆ†ã ã‘ã€å‡¦ç†ã®ãƒ­ã‚°ã‚’ä¿æŒã—ã¾ã™ã€‚ -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: +**backupHistory.json** ファイルã¯ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ä¿å­˜å…ˆãƒ•ォルダーã«ä½œæˆã•れã¾ã™ã€‚ 以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ã§ã€ã“ã®ãƒ•ァイルã®å®Ÿéš›ã®ãƒ‘スをå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ```4d $backupHistory:=Get 4D file(Backup history file) ``` - -> **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 +> **警告** +> **backupHistory.json** ファイルを削除ã¾ãŸã¯ç§»å‹•ã—ãŸå ´åˆã€æ¬¡ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—番å·ã¯ãƒªã‚»ãƒƒãƒˆã•れるã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +> **backupHistory.json** ファイル㯠4D用ã«ãƒ•ォーマットã•れã¦ã„ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—処ç†ã®ãƒ¬ãƒãƒ¼ãƒˆã‚’直接読んã§ç¢ºèªã™ã‚‹ã«ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ã®æ–¹ãŒé©åˆ‡ã§ã™ã€‚ diff --git a/website/translated_docs/ja/Backup/log.md b/website/translated_docs/ja/Backup/log.md index d8aead277fe24d..1b751626ca6a5f 100644 --- a/website/translated_docs/ja/Backup/log.md +++ b/website/translated_docs/ja/Backup/log.md @@ -1,77 +1,81 @@ --- id: log -title: Log file (.journal) +title: ログファイル (.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. +継続的ã«ä½¿ç”¨ã•れるアプリケーションã§ã¯ã€å¤‰æ›´ãƒ»è¿½åŠ ãƒ»å‰Šé™¤ã®æ“作ã¯å¸¸ã«è¨˜éŒ²ã•れã¾ã™ã€‚ 定期的ã«ãƒ‡ãƒ¼ã‚¿ã‚’ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ã“ã¨ã¯é‡è¦ã§ã™ãŒã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã ã‘ã§ã¯ (予期ã—ãªã„障害ã®å ´åˆã«)ã€å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—以é™ã«å…¥åŠ›ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’回復ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 ã“ã®å¿…è¦æ€§ã«å¯¾å¿œã™ã‚‹ãŸã‚ã€4D ã¯å°‚用ツールã§ã‚るログファイルをæä¾›ã—ã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ•ァイルを使用ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŒå¸¸ã«ä¿è¨¼ã•れã¾ã™ã€‚ -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. +ã¾ãŸã€4D ã¯å¸¸ã«ãƒ¡ãƒ¢ãƒªãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦ä½œæ¥­ã‚’ãŠã“ãªã£ã¦ã„ã¾ã™ã€‚ アプリケーションã®ãƒ‡ãƒ¼ã‚¿ã¸ã®å¤‰æ›´ã¯ã™ã¹ã¦ã€ãƒãƒ¼ãƒ‰ãƒ‡ã‚£ã‚¹ã‚¯ã¸æ›¸ã込むå‰ã«ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã¸ä¸€æ™‚çš„ã«ä¿å­˜ã•れã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションã®å‡¦ç†é€Ÿåº¦ãŒå‘上ã—ã¾ã™ã€‚実際ã€ãƒ¡ãƒ¢ãƒªãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€ãƒãƒ¼ãƒ‰ãƒ‡ã‚£ã‚¹ã‚¯ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚ˆã‚Šã‚‚高速ã§ã™ã€‚ キャッシュã«ä¿å­˜ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’ãƒ‡ã‚£ã‚¹ã‚¯ã¸æ›¸ã込むå‰ã«éšœå®³ãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルを組ã¿è¾¼ã‚“ã§ã‚¢ãƒ—リケーションを完全ã«å¾©æ—§ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 -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. +ã•ら㫠4D ã«ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルã®å†…容を解æžã™ã‚‹æ©Ÿèƒ½ãŒçµ„ã¿è¾¼ã¾ã‚Œã¦ãŠã‚Šã€ã“れã«ã‚ˆã£ã¦ã‚¢ãƒ—リケーションã®ãƒ‡ãƒ¼ã‚¿ä¸Šã§å®Ÿè¡Œã•れãŸã™ã¹ã¦ã®å‡¦ç†ã‚’ã•ã‹ã®ã¼ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã‚Œã‚‰ã®æ©Ÿèƒ½ã¯ MSC ã«ã¦æä¾›ã•れã¦ã„ã¾ã™ ([ログ解æž](MSC/analysis.md) ページãŠã‚ˆã³ [ロールãƒãƒƒã‚¯](MSC/rollback.md) ページå‚ç…§)。 -## How the log file works +## ログファイルã«ã¤ã„㦠-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. +4D ãŒç”Ÿæˆã™ã‚‹ãƒ­ã‚°ãƒ•ァイルã«ã¯ã€ã‚¢ãƒ—リケーション上ã§ãŠã“ãªã‚ã‚ŒãŸæ“作ãŒã™ã¹ã¦é †æ¬¡è¨˜éŒ²ã•れã¦ã„ã¾ã™ã€‚ デフォルトã§ã¯ã€ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ãƒ­ã‚°ãŒå–られã¦ã„ã¾ã™ (ã¤ã¾ã‚Šãƒ­ã‚°ãƒ•ァイルã«å«ã¾ã‚Œã¦ã„ã¾ã™)。ã—ã‹ã—ã€**ログファイルã«å«ã‚ã‚‹** ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžè§£é™¤ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルをログã«å«ã‚ãªã„よã†ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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: +ã—ãŸãŒã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®Ÿè¡Œã—ãŸå„æ“作ã«ã‚ˆã‚Šã€2ã¤ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒåŒæ™‚ã«ãŠã“ãªã‚れã¾ã™ã€‚1ã¤ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ (命令を通常ã©ãŠã‚Šã«å®Ÿè¡Œ)ã€ã‚‚ã†1ã¤ã¯ãƒ­ã‚°ãƒ•ァイルã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ (処ç†ã®èª¬æ˜Žã‚’記録) ã§ã™ã€‚ ログファイルã¯å€‹åˆ¥ã«ä½œæˆã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ä½œæ¥­ã‚’妨ã’ãŸã‚Šä½œæ¥­é€Ÿåº¦ã‚’低下ã•ã›ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 1ã¤ã®ã‚¢ãƒ—リケーションã§ã¯ã€ä¸€åº¦ã« 1ã¤ã®ãƒ­ã‚°ãƒ•ァイルã ã‘を扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ログファイルã«ã¯ã€æ¬¡ã®æ“作ãŒè¨˜éŒ²ã•れã¾ã™: -- 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. +- データファイルã®é–‹é–‰ +- プロセス (コンテキスト) ã®é–‹é–‰ +- レコードã¾ãŸã¯ BLOB ã®è¿½åŠ  +- レコードã®å¤‰æ›´ +- レコードã®å‰Šé™¤ +- トランザクションã®ä½œæˆã‚„終了 -For more information about these actions, refer to the [Activity analysis](MSC/analysis.md) page of the MSC. +ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€MSC ã® [ログ解æž](MSC/analysis.md) ページをå‚ç…§ãã ã•ã„。 -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 ã«ã‚ˆã‚Šç®¡ç†ã•れã¾ã™ã€‚ ログファイルã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«å½±éŸ¿ã‚’与ãˆã‚‹ã™ã¹ã¦ã®æ“作を区別ãªã盛り込ã¿ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãŠã“ãªã£ãŸæ“作や 4Dメソッドã€SQLエンジンã€ãƒ—ラグインã€Webブラウザーやモãƒã‚¤ãƒ«ã‚¢ãƒ—リãªã©ã«ã‚ˆã‚‹å‡¦ç†ãªã©ã€ã‚らゆるæ“作を記録ã—ã¾ã™ã€‚ -The following illustration sums up how the log file works: +ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’ã¾ã¨ã‚ãŸå›³ã‚’次ã«ç¤ºã—ã¾ã™: ![](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. +カレントログファイルã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ä¸€ç·’ã«è‡ªå‹•ä¿å­˜ã•れã¾ã™ã€‚ ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã¯ã€2ã¤ã®éš›ç«‹ã£ãŸåˆ©ç‚¹ãŒã‚りã¾ã™: -## Creating the log file +- ログファイルãŒä¿å­˜ã•れるディスクã®å®¹é‡ãŒä¸€æ¯ã«ãªã‚‰ãªã„よã†ã«ã—ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ãªã„å ´åˆã€ãƒ­ã‚°ãƒ•ァイルã¯ä½¿ç”¨ã™ã‚‹ã«ã¤ã‚Œã¦å¾ã€…ã«å¤§ãããªã‚Šã€ ã„ãšã‚Œã¯ãƒ‡ã‚£ã‚¹ã‚¯ã®ç©ºã容é‡ã‚’ã™ã¹ã¦ä½¿ã„æžœãŸã—ã¦ã—ã¾ã„ã¾ã™ã€‚ データファイルをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ãŸã³ã«ã€4D ã‚„ 4D Server ã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルをクローズã—ã€ãã®ç›´å¾Œã«ç©ºãƒ•ァイルを新ãŸã«é–‹ããŸã‚ã€ãƒ‡ã‚£ã‚¹ã‚¯ãƒ•ルã«ãªã‚‹å±é™ºã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å¾Œã€å¤ã„ログファイルã¯ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã«ä¿å­˜ã•れã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚»ãƒƒãƒˆ (世代) を管ç†ã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«å¾“ã£ã¦æœ€çµ‚çš„ã«ã¯ç ´æ£„ã•れã¾ã™ã€‚ +- 後ã‹ã‚‰ã‚¢ãƒ—リケーションã®è§£æžã‚„修復をãŠã“ãªãˆã‚‹ã‚ˆã†ã«ã€å„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å¯¾å¿œã™ã‚‹ãƒ­ã‚°ãƒ•ァイルをä¿ç®¡ã—ã¾ã™ã€‚ ログファイルã®çµ±åˆã¯ã€ãれãŒå¯¾å¿œã™ã‚‹ã‚¢ãƒ—リケーションã‹ã‚‰ã®ã¿å®Ÿè¡Œã§ãã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«æ­£ã—ãログファイルを統åˆã™ã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–化ã•れãŸãƒ­ã‚°ãƒ•ァイルã¯ä¸€ç·’ã«ä¿ç®¡ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚ -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. +## ログファイルã®ä½œæˆ -To create a log file: +デフォルトã§ã¯ã€4D ã§ä½œæˆã•れãŸã™ã¹ã¦ã®ã‚¢ãƒ—リケーションã§ãƒ­ã‚°ãƒ•ァイルãŒä½¿ç”¨ã•れã¾ã™ (環境設定㮠**一般** ページ内ã§ãƒã‚§ãƒƒã‚¯ã•れã¦ã„るオプションã§ã™)。 ログファイルã«ã¯ *data.journal* ã®ã‚ˆã†ã«åå‰ãŒä»˜ã‘られã€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*. +アプリケーションã§ãƒ­ã‚°ãƒ•ァイルãŒä½¿ç”¨ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã¯ã€ã„ã¤ã§ã‚‚調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定** ページ㧠**ログを使用** オプションãŒé¸æŠžã•れã¦ã„ã‚‹ã‹ç¢ºèªã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã®é¸æŠžãŒè§£é™¤ã•れã¦ã„ãŸå ´åˆã€ã¾ãŸã¯ãƒ­ã‚°ãƒ•ァイルãªã—ã§ã‚¢ãƒ—リケーションを使用ã—ã¦ã„ã‚‹å ´åˆã§ã€ãƒ­ã‚°ãƒ•ァイルを用ã„ãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—方法を導入ã™ã‚‹ã«ã¯ã€ãƒ­ã‚°ãƒ•ァイルを作æˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -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. +ログファイルを作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®æ‰‹é †ã«å¾“ã£ã¦ãã ã•ã„: -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. ストラクãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定** ページã§ã€**ログを使用** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ 標準㮠"ファイルを開ã/æ–°è¦ä½œæˆ" ダイアログボックスãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ログファイルã«ã¯ãƒ‡ãƒ•ォルト㧠*data.journal* ã¨ã„ã†åå‰ãŒä»˜ã‘られã¾ã™ã€‚ -4. Validate the Database Settings dialog box. +2. デフォルトã®åå‰ã‚’使用ã™ã‚‹ã‹ã€ã¾ãŸã¯ãã®åå‰ã‚’変更ã—ã€æ¬¡ã«ãƒ•ァイルã®ä¿ç®¡å ´æ‰€ã‚’é¸æŠžã—ã¾ã™ã€‚ 2ã¤ä»¥ä¸Šã®ãƒãƒ¼ãƒ‰ãƒ‰ãƒ©ã‚¤ãƒ–ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ã€ã‚¢ãƒ—リケーションプロジェクトãŒä¿ç®¡ã•れã¦ã„るディスク以外ã®å ´æ‰€ã«ãƒ­ã‚°ãƒ•ァイルをä¿å­˜ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションãŒä¿ç®¡ã•れã¦ã„ã‚‹ãƒãƒ¼ãƒ‰ãƒ‰ãƒ©ã‚¤ãƒ–ãŒç ´æã—ãŸå ´åˆã§ã‚‚ã€ãƒ­ã‚°ãƒ•ァイルを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -In order for you to be able to create a log file directly, the database must be in one of the following situations: +3. **ä¿å­˜** をクリックã—ã¾ã™ã€‚ é–‹ã„ãŸãƒ­ã‚°ãƒ•ァイルã®ã‚¢ã‚¯ã‚»ã‚¹ãƒ‘スã¨åå‰ãŒãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® **ログを使用** エリアã«è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ã‚¨ãƒªã‚¢ã‚’クリックã™ã‚‹ã¨ã€ãƒãƒƒãƒ—アップメニューãŒè¡¨ç¤ºã•れã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ォルダーを確èªã§ãã¾ã™ã€‚ -- The data file is blank, -- You just performed a backup of the database and no changes have yet been made to the data. +4. ストラクãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’確定ã—ã¾ã™ã€‚ -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. +ログファイルを作æˆã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãŒæ¬¡ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã—ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: -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. +- データファイルãŒç©ºã§ã‚る。 +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ãŸç›´å¾Œã§ã‚りã€ãƒ‡ãƒ¼ã‚¿ã¸ã®å¤‰æ›´ãŒã¾ã ãŠã“ãªã‚れã¦ã„ãªã„。 -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). +ã„ãšã‚Œã®æ¡ä»¶ã‚‚満ãŸã—ã¦ã„ãªã„å ´åˆã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã™ã‚‹å¿…è¦ãŒã‚る旨を知らã›ã‚‹è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ **OK** をクリックã™ã‚‹ã¨ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒé–‹å§‹ã•れã€ãã®å¾Œã«ãƒ­ã‚°ãƒ•ァイルãŒä½œæˆã•れã¾ã™ã€‚ **キャンセル** をクリックã—ãŸå ´åˆã«ã¯ã€ãƒ­ã‚°ãƒ•ァイル作æˆã®è¦æ±‚ã¯ä¿å­˜ã•ã‚Œã€æ¬¡å›žã‚¢ãƒ—リケーションをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹æ™‚ã¾ã§ãƒ­ã‚°ãƒ•ァイルã®ä½œæˆã¯å»¶æœŸã•れã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªå®‰å…¨å¯¾ç­–ãŒä¸å¯æ¬ ãªç†ç”±ã¯ã€éšœå®³ã®ç™ºç”Ÿå¾Œã«ã‚¢ãƒ—リケーションを復元ã™ã‚‹ãŸã‚ã«ã€ãƒ­ã‚°ãƒ•ァイルã¸è¨˜éŒ²ã•れãŸå‡¦ç†ã‚’çµ±åˆã™ã‚‹ã‚¢ãƒ—リケーションã®ã‚³ãƒ”ーãŒå¿…è¦ã¨ãªã‚‹ã‹ã‚‰ã§ã™ã€‚ -## Stopping a log file +ã“れ以外ã«ä½•ã‚‚ãŠã“ãªã‚ãªãã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ä¸Šã§å®Ÿè¡Œã•れãŸã™ã¹ã¦ã®å‡¦ç†ãŒã“ã®ãƒ•ァイルã«è¨˜éŒ²ã•れã€ãã®å¾Œã‚¢ãƒ—リケーションを開ã„ãŸã¨ãã«ã“ã®ãƒ•ァイルãŒä½¿ç”¨ã•れã¾ã™ã€‚ -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. +æ–°è¦ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを作æˆã—ãŸã‚‰ã€åˆ¥ã®ãƒ­ã‚°ãƒ•ァイルを作æˆã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã¾ãŸã€ãƒ­ã‚°ãƒ•ァイルã«é–¢é€£ä»˜ã‘られã¦ã„ãªã„ (ã‚ã‚‹ã„ã¯ãƒ­ã‚°ãƒ•ァイルãŒè¦‹ã¤ã‹ã‚‰ãªã„) 別ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ã„ãŸå ´åˆã€ä»–ã®ãƒ­ã‚°ãƒ•ァイルを設定ã™ã‚‹ã‹ã€ä½œæˆã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 -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: + + +## ログファイルを中止ã™ã‚‹ + +カレントログファイルã¸ã®æ“作記録を中止ã—ãŸã„å ´åˆã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定** ページ㮠**ログを使用** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžè§£é™¤ã—ã¾ã™ã€‚ + +ã™ã‚‹ã¨ã€4D ã¯è­¦å‘Šãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¦ã€ã“ã®å‹•作ã«ã‚ˆã‚Šãƒ­ã‚°ãƒ•ァイルã«ã‚ˆã‚‹ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŒåˆ©ç”¨ã§ããªããªã‚‹ã“ã¨ã‚’知らã›ã¾ã™: ![](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). +**åœæ­¢** をクリックã™ã‚‹ã¨ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルãŒå³åº§ã«ã‚¯ãƒ­ãƒ¼ã‚ºã•れã¾ã™ (ã“ã®å¾Œã«ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’確定ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“)。 -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. +カレントログファイルãŒå¤§ãã™ãŽã‚‹ãŸã‚ã€ãれをクローズã—ãŸã„å ´åˆã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ã¦ãã ã•ã„。ã“れã«ã‚ˆã‚Šã€ãƒ­ã‚°ãƒ•ァイルã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒä½œæˆã•れã¾ã™ã€‚ -> **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:** `New log file` コマンドã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルを自動的ã«é–‰ã˜ã¦ã€æ–°ã—ã„ログファイルを開始ã—ã¾ã™ã€‚ 実行中ã«ä½•らã‹ã®ç†ç”±ã§ãƒ­ã‚°ãƒ•ァイルãŒåˆ©ç”¨ä¸èƒ½ã«ãªã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ 1274 ãŒç”Ÿæˆã•れã€4D Server ã¯ä¸€åˆ‡ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿ã‚’許å¯ã—ãªããªã‚Šã¾ã™ã€‚ å†ã³ãƒ­ã‚°ãƒ•ァイルãŒåˆ©ç”¨å¯èƒ½ã«ãªã£ãŸã‚‰ãƒ•ルãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 \ No newline at end of file diff --git a/website/translated_docs/ja/Backup/overview.md b/website/translated_docs/ja/Backup/overview.md index 2be3793f0cb601..34f1097b300fb0 100644 --- a/website/translated_docs/ja/Backup/overview.md +++ b/website/translated_docs/ja/Backup/overview.md @@ -3,18 +3,20 @@ id: overview title: æ¦‚è¦ --- -4D includes a full database backup and restore module. +4Dã«ã¯ã€ã‚¢ãƒ—リケーションã®ãƒ•ルãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¨å¾©å…ƒç”¨ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ãŒçµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚ -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. +ã“ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã«ã‚ˆã‚Šã€ç¾åœ¨ä½¿ç”¨ä¸­ã®ã‚¢ãƒ—リケーションを終了ã—ãªãã¦ã‚‚ã€ãã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¯ã€ãƒ—ロジェクトフォルダーã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ã»ã‹ã€ä»»æ„ã®è¿½åŠ ãƒ•ã‚¡ã‚¤ãƒ«ã‚„ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’å«ã‚られã¾ã™ã€‚ ã“れらã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã®æŒ‡å®šã¯ã€æœ€åˆã«ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã«ã¦ãŠã“ãªã„ã¾ã™ã€‚ -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. +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯æ‰‹å‹•ã§å®Ÿè¡Œã™ã‚‹ã‹ã€ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ“作ã—ãªãã¦ã‚‚定期的ã«è‡ªå‹•実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 特定ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ã‚„データベースメソッドを使用ã™ã‚‹ã¨ã€ç‹¬è‡ªã®ã‚¤ãƒ³ã‚¿ãƒ•ェースã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—機能を統åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -Databases can be restored automatically when a damaged database is opened. +æå‚·ã—ãŸã‚¢ãƒ—リケーションãŒé–‹ã‹ã‚ŒãŸå ´åˆã«ã¯ã€è‡ªå‹•çš„ã«ã‚¢ãƒ—リケーションを復元ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +ã¾ãŸã€ã“ã®çµ±åˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—モジュールã§ã¯ã€[ログファイル](log.md) (.journal æ‹¡å¼µå­ã®ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ãƒ•ァイル) を利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ•ァイルã¯ã€ãƒ‡ãƒ¼ã‚¿ä¸Šã§å®Ÿè¡Œã•れãŸå…¨æ“作ã®è¨˜éŒ²ã‚’ä¿ç®¡ã—ã€2回ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—é–“ã®å®‰å…¨æ€§ã‚’完全ã«ä¿è¨¼ã—ã¾ã™ã€‚ 使用中ã®ã‚¢ãƒ—リケーションã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆã¯ã€æ¬¡å›žãã®ã‚¢ãƒ—リケーションを開ã„ãŸã¨ãã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã‹ã‚‰å¤±ã‚ã‚ŒãŸæ“作ãŒè‡ªå‹•çš„ã«å†çµ±åˆã•れã¾ã™ã€‚ ログファイルã®å†…容ã¯ã„ã¤ã§ã‚‚確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> 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 +> ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を目的ã«ãƒ‡ãƒ¼ã‚¿ã‚’è¤‡è£½ãƒ»åŒæœŸã™ã‚‹ã“ã¨ã§ã€å¸¸ã«è¤‡æ•°ã®å®Œå…¨ä¸€è‡´ã™ã‚‹ã‚¢ãƒ—リケーションを管ç†ã—ãŸã„å ´åˆã«ã¯ã€ä»–ã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã‚’採用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“れらã®ã‚½ãƒªãƒ¥ãƒ¼ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚„技術ã«åŸºã¥ã„ã¦ã„ã¾ã™: +> - 4D Serverを使ã„ã€(çµ±åˆã•れãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—モジュールメカニズムを使用ã—ã¦) è«–ç†ãƒŸãƒ©ãƒ¼ã‚’設定ã™ã‚‹ +> - SQL ã«ã‚ˆã‚‹åŒæœŸ +> - HTTP ã«ã‚ˆã‚‹åŒæœŸ (/rest/url) + + +> 4Dã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ã®æ¦‚è¦ã«ã¤ã„ã¦ã¯ã€[4D Security guide](https://blog.4d.com/4d-security-guide/) ã‚’ã”覧ãã ã•ã„。 diff --git a/website/translated_docs/ja/Backup/restore.md b/website/translated_docs/ja/Backup/restore.md index 62fba87941bae5..039fcebc5626ec 100644 --- a/website/translated_docs/ja/Backup/restore.md +++ b/website/translated_docs/ja/Backup/restore.md @@ -1,48 +1,56 @@ --- id: restore -title: Restore +title: 復元 --- -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: +å•題ãŒç™ºç”Ÿã—ãŸã¨ãã¯ã€ä¸€é€£ã®ã‚¢ãƒ—リケーションファイル全体を復元ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 主㫠2ã¤ã®ã‚«ãƒ†ã‚´ãƒªã®å•題ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™: -- 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. +- アプリケーションãŒä½¿ç”¨ä¸­ã«äºˆæœŸã›ãšçµ‚了ã•れãŸã€‚ ã“ã®å•題ã¯é›»åŠ›ã®åˆ‡æ–­ã€ã‚·ã‚¹ãƒ†ãƒ ã®ã‚¨ãƒ©ãƒ¼ç­‰ã«ã‚ˆã‚Šç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€å•題ãŒç™ºç”Ÿã—ãŸçž¬é–“ã®ãƒ‡ãƒ¼ã‚¿ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®çŠ¶æ…‹ã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションã®å¾©æ—§ã«ã¯ç•°ãªã‚‹æ‰‹é †ãŒå¿…è¦ã¨ãªã‚Šã¾ã™: + - キャッシュãŒç©ºã®å ´åˆã€ã‚¢ãƒ—リケーションをå•題ãªãé–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸå¤‰æ›´ã¯ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«è¨˜éŒ²ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€ç‰¹åˆ¥ãªæ‰‹é †ã¯å¿…è¦ã‚りã¾ã›ã‚“。 + - ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«æœªä¿å­˜ã®å‡¦ç†ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã¯æå‚·ã—ã¦ã„ã¾ã›ã‚“ãŒã€ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ­ã‚°ãƒ•ァイルを統åˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + - キャッシュã®å†…å®¹ã‚’ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¿ä¸­ã ã£ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯ãŠãらãæå‚·ã—ã¦ã„ã¾ã™ã€‚ 最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã‚’ãŠã“ãªã„ã€ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ­ã‚°ãƒ•ァイルを統åˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -> 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. +- アプリケーションファイルを失ã£ãŸã€‚ ã“ã®å•題ã¯ã‚¢ãƒ—リケーションãŒé…ç½®ã•れãŸãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚»ã‚¯ã‚¿ãƒ¼ãŒèª­ã¿æ›¸ãä¸èƒ½ã«ãªã£ãŸã€ã‚ã‚‹ã„ã¯ã‚¦ã‚£ãƒ«ã‚¹ã€æ“作ミス等ã«ã‚ˆã‚Šç™ºç”Ÿã—ã¾ã™ã€‚ 最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã‚’ãŠã“ãªã„ã€ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ­ã‚°ãƒ•ァイルを統åˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ å•題発生後ã«ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãŒæå‚·ã—ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’見分ã‘ã‚‹ã«ã¯ã€4D ã§ã‚¢ãƒ—リケーションを起動ã—ã¾ã™ã€‚ 4Dã¯è‡ªå·±æ¤œè¨¼ã‚’ãŠã“ãªã„ã€å¿…è¦ãªå¾©å…ƒå‡¦ç†æ‰‹é †ã‚’示ã—ã¾ã™ã€‚ 自動モードã®å ´åˆã€ã“ã®å‡¦ç†ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãªã—ã§ç›´æŽ¥å®Ÿè¡Œã•れã¾ã™ã€‚ 定期的ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒãŠã“ãªã‚れã¦ã„れã°ã€4D ã®å¾©å…ƒãƒ„ールを使用ã—㦠(ã»ã¨ã‚“ã©ã®å ´åˆ) å•題ãŒç™ºç”Ÿã™ã‚‹ç›´å‰ã®çŠ¶æ…‹ã¾ã§ã‚¢ãƒ—リケーションを復旧ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## Manually restoring a backup (standard dialog) +> å•題発生後ã«ã€è‡ªå‹•ã§ 4Dã®ã‚¢ãƒ—リケーション復旧処ç†ã‚’èµ·å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—&復旧** ページã§åˆ©ç”¨ã§ãるオプションを使用ã—ã¦ç®¡ç†ã—ã¾ã™ã€‚ 詳細㯠[自動復元](settings.md#自動復元) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +> å•題ãŒã€ãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸä¸é©åˆ‡ãªå‡¦ç†ã®çµæžœå¼•ãèµ·ã“ã•れãŸå ´åˆ (ãŸã¨ãˆã°èª¤ã£ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’削除ã—ãŸç­‰)ã€ãƒ­ã‚°ãƒ•ァイル㮠"ロールãƒãƒƒã‚¯" 機能を使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを復旧ã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ MSC ã® [ロールãƒãƒƒã‚¯](MSC/rollback.md) ページã‹ã‚‰åˆ©ç”¨ã§ãã¾ã™ã€‚ -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. +## 手動ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹ (標準ダイアログ) -To restore a database manually via a standard dialog box: +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—モジュールを使用ã—ã¦ç”Ÿæˆã•れãŸã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®å†…å®¹ã‚’ã€æ‰‹å‹•ã§å¾©å…ƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 手動ã«ã‚ˆã‚‹å¾©å…ƒã¯ã€ãŸã¨ãˆã°ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–全体 (ストラクãƒãƒ£ãƒ¼ãƒ•ァイルや添付ã•れãŸãƒ•ァイル) ã‚’å†ç”Ÿæˆã—ãŸã„å ´åˆã‚„ã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®å†…容を見ãŸã„å ´åˆãªã©ã«å¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ 手動復元ã®éš›ã«ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルを統åˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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: +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æ‰‹å‹•復元ã¯ã€æ¨™æº–ã®ãƒ•ァイルを開ãダイアログボックスã€ã‚ã‚‹ã„㯠Maintenance and Security Center (MSC) ã® [復元](MSC/restore) ページã‹ã‚‰ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ MSC を使用ã—ãŸå¾©å…ƒã§ã¯è©³ç´°ãªã‚ªãƒ—ション設定をãŠã“ãªã£ãŸã‚Šã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®å†…容をプレビューã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»–æ–¹ã€é–‹ã‹ã‚Œã¦ã„るアプリケーションã«é–¢é€£ã—ãŸã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®ã¿ã‚’復元ã§ãã¾ã™ã€‚ + +標準ダイアログボックスを使用ã—ã¦ã‚¢ãƒ—リケーションを手動復元ã™ã‚‹ã«ã¯: + +1. 4Dアプリケーションを開始ã—ã€**ファイル** メニューã‹ã‚‰ **復元...** ã‚’é¸æŠžã—ã¾ã™ã€‚ アプリケーションプロジェクトãŒé–‹ã‹ã‚Œã¦ã„ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã¾ãŸã¯
        4Dメソッドã‹ã‚‰ `RESTORE` コマンドを実行ã—ã¾ã™ã€‚ 標準ã®ãƒ•ァイルを開ãダイアログボックスãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +2. 復元ã™ã‚‹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル (.4bk) ã¾ãŸã¯ãƒ­ã‚°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル (.4bl) ã‚’é¸æŠžã—ã€**é–‹ã** をクリックã—ã¾ã™ã€‚ 復元ã—ãŸãƒ•ァイルをé…ç½®ã™ã‚‹å ´æ‰€ã‚’指定ã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™: デフォルト㧠4D㯠アーカイブã¨åŒéšŽå±¤ã«ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–åã¨åŒã˜åå‰ (æ‹¡å¼µå­ãªã—) ã®ãƒ•ォルダーを作æˆã—ã€ãƒ•ァイルを復元ã—ã¾ã™ã€‚ 場所ãŒè¡¨ç¤ºã•れã¦ã„るエリアをクリックã—ã¦ã€ãƒ‘スを確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ![](assets/en/Backup/backup07.png) -You can also click on the **[...]** button to specify a different location. +**[...]** ボタンをクリックã—ã¦ç•°ãªã‚‹å ´æ‰€ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +3. **復元** ボタンをクリックã—ã¾ã™ã€‚ 4D ã¯æŒ‡å®šã•れãŸã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを展開ã—ã¾ã™ã€‚ カレントログファイルã€ã¾ãŸã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã¨åŒã˜ç•ªå·ã‚’æŒã¤ãƒ­ã‚°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルãŒåŒã˜ãƒ•ォルダーã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãã®å†…容を検証ã—ã¾ã™ã€‚ データファイル中ã«ç„¡ã„処ç†ãŒãƒ­ã‚°ãƒ•ァイルã«å«ã¾ã‚Œã¦ã„れã°ã€ãã®å‡¦ç†ã‚’çµ±åˆã™ã‚‹ã‹ã©ã†ã‹ 4D ãŒå°‹ã­ã¦ãã¾ã™ã€‚ **データベースãŒå®Œå…¨ã§ãªã„å ´åˆã€æœ€æ–°ã®ãƒ­ã‚°ã‚’çµ±åˆã™ã‚‹** オプションãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€çµ±åˆå‡¦ç†ã¯è‡ªå‹•ã§ãŠã“ãªã‚れã¾ã™ ([自動復元](settings.md#自動復元) å‚ç…§)。 + +4. (ä»»æ„) **OK** をクリックã—ã¦ã€å¾©å…ƒã—ãŸã‚¢ãƒ—リケーションã«ãƒ­ã‚°ãƒ•ァイルを統åˆã—ã¾ã™ã€‚ 復元ã¨çµ±åˆãŒæ­£ã—ã実行ã•れるã¨ã€4D ã¯å‡¦ç†ãŒæˆåŠŸã—ãŸã“ã¨ã‚’通知ã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’表示ã—ã¾ã™ã€‚ +5. **OK** をクリックã—ã¾ã™ã€‚ + +ä¿å­˜å…ˆãƒ•ォルダーãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—時ã®ãƒ•ァイルã®ä½ç½®ã«ã‹ã‹ã‚らãšã€4D ã¯ã™ã¹ã¦ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルをã“ã®ãƒ•ォルダーã«é…ç½®ã—ã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’æŽ¢ã™æ‰‹é–“ãŒçœã‘ã¾ã™ã€‚ + +> データファイルã®é–¢é€£è¦ç´  (ファイルや `Settings` フォルダー) ã¯ä¿å­˜å…ˆãƒ•ォルダー内㮠`Data` サブフォルダー内ã«è‡ªå‹•çš„ã«å¾©å…ƒã•れã¾ã™ã€‚ + -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. +## 手動ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹ (MSC) -## Manually restoring a backup (MSC) +Maintenance and Security Center (MSC) ã® [復元](MSC/restore.md)ページã‹ã‚‰ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を手動ã§å¾©å…ƒã§ãã¾ã™ã€‚ -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 +## 手動ã§ãƒ­ã‚°ã‚’çµ±åˆã™ã‚‹ -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. +MSC ã®å¾©å…ƒãƒšãƒ¼ã‚¸ã§ãƒ­ã‚°ãƒ•ァイルã®è‡ªå‹•çµ±åˆã‚’é¸æŠžã—ã¦ã„ãªã„å ´åˆ ([複数ã®ãƒ­ã‚°ãƒ•ァイルを連続ã—ã¦çµ±åˆã™ã‚‹](MSC/restore.md#successive-intergration-of-several-data-log-files) å‚ç…§)ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«ä¿å­˜ã•れã¦ã„ãªã„処ç†ãŒãƒ­ã‚°ãƒ•ァイル中ã«è¦‹ã¤ã‹ã‚‹ã¨ã€4D ã¯ã‚¢ãƒ—リケーションを開ãéš›ã«è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚ ![](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. +> ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’機能ã•ã›ã‚‹ãŸã‚ã«ã€4D ã¯ã‚«ãƒ¬ãƒ³ãƒˆã®å ´æ‰€ã«ã‚るログファイルã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã‘れã°ãªã‚Šã¾ã›ã‚“。 -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 +カレントログファイルを統åˆã™ã‚‹ã‹ã—ãªã„ã‹ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ カレントログファイルを統åˆã—ãªã„ã“ã¨ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ä¸­ã«ä½œæˆã•れãŸã‚¨ãƒ©ãƒ¼ã‚’å†ç”Ÿæˆã—ãªã„よã†ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Backup/settings.md b/website/translated_docs/ja/Backup/settings.md index b8b5d2e5a851bb..7cf40ae797dc9e 100644 --- a/website/translated_docs/ja/Backup/settings.md +++ b/website/translated_docs/ja/Backup/settings.md @@ -1,127 +1,129 @@ --- id: settings -title: Backup Settings +title: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定 --- -Backup settings are defined through three pages in the Database Settings dialog box. You can set: +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã®å®šç¾©ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹å†…ã§ 3ページã«ã‚ãŸã£ã¦ã„ã¾ã™ã€‚ 次ã®è¨­å®šãŒãŠã“ãªãˆã¾ã™: -- the scheduler for automatic backups -- the files to include in every backup -- the advanced features allowing to execute automatic tasks +- 自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—用ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãƒ¼è¨­å®š +- å„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å«ã‚るファイル +- 自動タスクã®å®Ÿè¡Œã‚’å¯èƒ½ã«ã™ã‚‹é«˜åº¦ãªè¨­å®š -> Settings defined in this dialog box are written in the *Backup.4DSettings* file, stored in the [Settings folder](Project/architecture.md#settings-folder). +> ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§å®šç¾©ã•れãŸè¨­å®šã¯ *Backup.4DSettings* ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã€[Settings フォルダー](Project/architecture.md#settings-フォルダー) ã«ä¿å­˜ã•れã¾ã™ã€‚ -## Scheduler +## スケジューラー -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. +4D ã‚„ 4D Server ã§é–‹ã‹ã‚Œã¦ã„るアプリケーションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を自動化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ãŒæŽ¥ç¶šã•れã¦ã„ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“)。 ã“れã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—周期 (æ™‚é–“ã€æ—¥ã€é€±ã€æœˆå˜ä½ç­‰) を設定ã™ã‚‹ã“ã¨ã«ã‚ˆã‚ŠãŠã“ãªã„ã¾ã™ã€‚ç¾åœ¨ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã«åŸºã¥ãã€4D ã¯è‡ªå‹•ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を実行ã—ã¾ã™ã€‚ -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)). +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•れるã¹ãã¨ãã«ã‚¢ãƒ—リケーションãŒèµ·å‹•ã•れã¦ã„ãªã‹ã£ãŸå ´åˆã«ã¯ã€æ¬¡ã«èµ·å‹•ã•れãŸã¨ã 4D ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¤±æ•—ã—ãŸã‚‚ã®ã¨èªè­˜ã—ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã®å†è©¦è¡Œè¨­å®šã‚’é©ç”¨ã—ã¾ã™ ([ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中ã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆ](backup.md#ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—中ã«å•題ãŒç™ºç”Ÿã—ãŸå ´åˆ) å‚ç…§)。 -The scheduler backup settings are defined on the **Backup/Scheduler** page of the Database Settings: +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«è¨­å®šã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/スケジューラー** ページã§ãŠã“ãªã„ã¾ã™: ![](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: +ã“ã®ãƒšãƒ¼ã‚¸ã«ã‚るオプションを使用ã—ã¦ã€ã‚¢ãƒ—リケーションã®è‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’設定ã§ãã¾ã™ã€‚ 標準ã®ã‚¯ã‚¤ãƒƒã‚¯è¨­å®šã€ã¾ãŸã¯å®Œå…¨ãªã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã‚’é¸æŠžã§ãã¾ã™ã€‚ **自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—** メニューã§ã®é¸æŠžã«åŸºã¥ãã€ã•ã¾ã–ã¾ãªã‚ªãƒ—ションãŒè¡¨ç¤ºã•れã¾ã™: -- **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. +- **ã—ãªã„**: スケジュールã«åŸºã¥ããƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ç„¡åйã¨ãªã‚Šã¾ã™ã€‚ +- **毎時**: æ¬¡ã®æ™‚間以é™ã€æ¯Žæ™‚é–“ã”ã¨ã«è‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã„ã¾ã™ã€‚ +- **毎日**: æ—¥ã«ä¸€å›žè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã„ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を何時ã«é–‹å§‹ã™ã‚‹ã‹ã‚’設定ã—ã¾ã™ã€‚ +- **毎週**: 週ã«ä¸€å›žè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã„ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹æ›œæ—¥ã¨æ™‚刻を入力ã™ã‚‹ã‚¨ãƒªã‚¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **毎月**: 月ã«ä¸€å›žè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã„ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹æ—¥ä»˜ã¨æ™‚刻を入力ã™ã‚‹ã‚¨ãƒªã‚¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **カスタマイズ**: 自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を詳細ã«ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã™ã‚‹å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€è¤‡æ•°ã®å…¥åŠ›ã‚¨ãƒªã‚¢ãŒè¡¨ç¤ºã•れã¾ã™: + + **X 時間ã”ã¨**: 時間å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é–“隔をスケジュールã§ãã¾ã™ã€‚ 1ã‹ã‚‰24ã¾ã§ã®å€¤ã‚’設定ã§ãã¾ã™ã€‚ + - **X æ—¥ã”ã¨**: æ—¥å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é–“隔をスケジュールã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žæ—¥ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã†ã«ã¯ 1 ã¨è¨­å®šã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãŸå ´åˆã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒé–‹å§‹ã•れる時刻を設定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + - **X 週ã”ã¨**: 週å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é–“隔をスケジュールã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žé€±ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã†ã«ã¯ 1 ã¨è¨­å®šã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãŸå ´åˆã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹æ›œæ—¥ã¨æ™‚刻を設定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 è¤‡æ•°ã®æ›œæ—¥ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žé€±æ°´æ›œæ—¥ã¨é‡‘曜日ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ã™ã‚‹ã‚ˆã†ãƒ—ログラムã§ãã¾ã™ã€‚ + - **X 月ã”ã¨**: 月å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é–“隔をスケジュールã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žæœˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã†ã«ã¯ 1 ã¨è¨­å®šã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãŸå ´åˆã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹æ—¥ä»˜ã¨æ™‚刻を設定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -## Configuration +> 夿™‚é–“ã¨æ¨™æº–時ã®åˆ‡ã‚Šæ›¿ãˆãŒã‚ã‚‹å ´åˆã«ã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ©ãƒ¼ãŒä¸€æ™‚çš„ã«å½±éŸ¿ã•ã‚Œã€æ¬¡ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—実行㌠1時間ãšã‚Œã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ ã“ã®ãšã‚Œã¯ä¸€å›žé™ã‚Šã§ã‚りã€ãã®å¾Œã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«æ™‚é–“ã©ãŠã‚Šã«å®Ÿè¡Œã•れã¾ã™ã€‚ -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. + +## 設定 + +ストラクãƒãƒ£ãƒ¼è¨­å®šã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/設定ページã§ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚„ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ‰åŠ¹åŒ–/無効化ã€ãŠã‚ˆã³ä¿å­˜å…ˆã‚’設定ã§ãã¾ã™ã€‚ ã“れらã®ãƒ‘ラメーターã¯ã€4D ã‚„ 4D Server ã§é–‹ã‹ã‚Œã‚‹å„アプリケーションã”ã¨ã«è¨­å®šã•れã¾ã™ã€‚ ![](assets/en/Backup/backup03.png) -> **4D Server:** These parameters can only be set from the 4D Server machine. +> **4D Server**: ã“れらã®ãƒ‘ラメーター㯠4D Server マシン上ã§ã®ã¿è¨­å®šã§ãã¾ã™ã€‚ -### Content +### 内容 +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€æ¬¡å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—時ã«ã‚³ãƒ”ー対象ã¨ã™ã‚‹ãƒ•ァイルやフォルダーを指定ã—ã¾ã™ã€‚ -This area allows you to set which files and/or folders to copy during the next backup. +- **データ**: アプリケーションã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル。 ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€æ¬¡ã®ã‚‚ã®ãŒãƒ‡ãƒ¼ã‚¿ã¨ã¨ã‚‚ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れã¾ã™: + - データベースã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイル (ã‚れã°) + - [データファイルã®éš£ã«ç½®ã‹ã‚ŒãŸ](Project/architecture.md#settings-フォルダー) `Settings` フォルダー (ã‚れã°)。ã“れ㯠*データファイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®š* ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ +- **ストラクãƒãƒ£ãƒ¼**: アプリケーション㮠Project フォルダーã¨ãƒ•ァイル。 プロジェクトãŒã‚³ãƒ³ãƒ‘イルã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã®ã‚ªãƒ—ション㯠.4dz ファイルをãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€[Project フォルダーã¨åŒéšŽå±¤ã«ç½®ã‹ã‚ŒãŸ](Project/architecture.md#settings-フォルダー-1) `Settings` フォルダーãŒè‡ªå‹•ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã•れã¾ã™ã€‚ã“れã¯ã€*ユーザー設定* ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ +- **ユーザーストラクãƒãƒ£ãƒ¼(ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã¿)**: *廃止予定* +- **添付**: ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€ã‚¢ãƒ—リケーションã¨åŒæ™‚ã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®å¯¾è±¡ã¨ã™ã‚‹ãƒ•ァイルやフォルダーを指定ã—ã¾ã™ã€‚ ã“ã“ã§ã¯ã©ã®ã‚ˆã†ãªã‚¿ã‚¤ãƒ—ã®ãƒ•ァイル (ドキュメントやプラグインã€ãƒ†ãƒ³ãƒ—レートã€ãƒ©ãƒ™ãƒ«ã€ãƒ¬ãƒãƒ¼ãƒˆã€ãƒ”クãƒãƒ£ãƒ¼ãªã©) ã§ã‚‚指定ã§ãã¾ã™ã€‚ 個々ã®ãƒ•ァイルã€ã¾ãŸã¯ä¸¸ã”ã¨ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹ãƒ•ォルダーを個々ã«è¨­å®šã§ãã¾ã™ã€‚ 添付エリアã«ã¯ã€è¨­å®šã•れãŸãƒ•ァイルã®ãƒ‘スãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - **削除**: é¸æŠžã—ãŸãƒ•ァイルを添付エリアã‹ã‚‰å–り除ãã¾ã™ã€‚ + - **フォルダー追加...**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«è¿½åŠ ã™ã‚‹ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚ 復元ã®å ´åˆã€ãƒ•ォルダーãŒãã®å†…容物ã¨ã¨ã‚‚ã«å¾©å…ƒã•れã¾ã™ã€‚ アプリケーションファイルをå«ã‚€ãƒ•ォルダーを除ãã€ã™ã¹ã¦ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚„ãƒžã‚·ãƒ³ã«æŽ¥ç¶šã•れãŸãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚’é¸æŠžã§ãã¾ã™ã€‚ + - **ファイル追加...**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«è¿½åŠ ã™ã‚‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¾ã™ã€‚ -- **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. -### Backup File Destination Folder +### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルä¿å­˜å…ˆ -This area lets you view and change the location where backup files as well as log backup files (where applicable) will be stored. +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒ•ã‚¡ã‚¤ãƒ«ã®æ ¼ç´å ´æ‰€ã‚’確èªã—ãŸã‚Šã€å¤‰æ›´ã—ãŸã‚Šã§ãã¾ã™ã€‚ -To view the location of the files, click in the area in order to display their pathname as a pop-up menu. +エリアをクリックã™ã‚‹ã¨ã€ãƒ•ァイルã®å ´æ‰€ãŒãƒãƒƒãƒ—アップã§è¡¨ç¤ºã•れã¾ã™ã€‚ -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. +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒ•ã‚¡ã‚¤ãƒ«ã®æ ¼ç´å ´æ‰€ã‚’変更ã™ã‚‹ã«ã¯ã€**[...]** ボタンをクリックã—ã¾ã™ã€‚ é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルをé…ç½®ã™ã‚‹ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚„ãƒ‡ã‚£ã‚¹ã‚¯ã‚’é¸æŠžã§ãã¾ã™ã€‚ "使用状æ³" 㨠"空ã容é‡" エリアã¯ã€é¸æŠžã—ãŸãƒ•ォルダーãŒå­˜åœ¨ã™ã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ã®çŠ¶æ…‹ã‚’è‡ªå‹•ã§è¡¨ç¤ºã—ã¾ã™ã€‚ -### Log management +### ãƒ­ã‚°ç®¡ç† -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. +**ログを使用** オプションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¢ãƒ—リケーションã¯ãƒ­ã‚°ãƒ•ァイルを使用ã—ã¾ã™ã€‚ ログファイルã®å ´æ‰€ã¯ã‚ªãƒ—ションã®ä¸‹ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€ãƒ­ã‚°ãƒ•ァイルãªã—ã§ã‚¢ãƒ—リケーションを開ãã“ã¨ã¯ã§ãã¾ã›ã‚“。 -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. +デフォルトã§ã¯ã€4D ã§ä½œæˆã•れãŸã™ã¹ã¦ã®ãƒ—ロジェクトã§ãƒ­ã‚°ãƒ•ァイルãŒä½¿ç”¨ã•れã¾ã™ (**環境設定** ã® **一般ページ** 内ã§ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ **ログを使用** オプションã§ã™)。 ログファイルã«ã¯ *data.journal* ã®ã‚ˆã†ã«åå‰ãŒä»˜ã‘られã€Data フォルダー内ã«ç½®ã‹ã‚Œã¾ã™ã€‚ -> 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 -Modifying backup and restore options is optional. Their default values correspond to a standard use of the function. +## ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—&復旧 + +ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—&復旧ã®è¨­å®šã¯å¿…è¦ã«å¿œã˜ã¦å¤‰æ›´ã—ã¾ã™ã€‚ デフォルトã®è¨­å®šã¯ã€æ¨™æº–çš„ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—動作をãŠã“ãªã„ã¾ã™ã€‚ ![](assets/en/Backup/backup04.png) -### General settings +### 一般設定 + +- **最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã¿ä¿å­˜ X ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル**: ã“ã®ãƒ‘ラメーターを有効ã«ã™ã‚‹ã¨ã€æŒ‡å®šã•ã‚ŒãŸæ•°ã®æœ€æ–°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã ã‘ãŒä¿æŒã•れã€å¤ã„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã¯å‰Šé™¤ã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—処ç†ãŒå®Œäº†ã—ãŸã‚‰ã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ãŒä½œæˆã•れãŸã®ã¨åŒã˜å ´æ‰€ã€åŒã˜åå‰ã®ã‚‚ã£ã¨ã‚‚å¤ã„アーカイブを削除ã—ã¾ã™ã€‚ディスクスペースを確ä¿ã™ã‚‹ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—å‰ã«å‰Šé™¤ã™ã‚‹ã‚ˆã†ã€å‰Šé™¤ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€3世代ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ä¿æŒã™ã‚‹ã‚ˆã†è¨­å®šã—ã¦ã„ã‚‹å ´åˆã€æœ€åˆã® 3回ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã§ MyBase-0001ã€MyBase-0002ã€MyBase-0003 ãŒä½œæˆã•れ〠4回目ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã§ MyBase-0004 ãŒä½œæˆã•れãŸã®ã¡ã« MyBase-0001 ãŒå‰Šé™¤ã•れã¾ã™ã€‚ ã“ã®è¨­å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åйã«ãªã£ã¦ãŠã‚Šã€4D 㯠3世代ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ä¿æŒã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’無効ã«ã™ã‚‹ã«ã¯ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžã‚’外ã—ã¾ã™ã€‚ +> ã“ã®ãƒ‘ラメーターã¯ã€ã‚¢ãƒ—リケーションãŠã‚ˆã³ãƒ­ã‚°ãƒ•ァイル両方ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å½±éŸ¿ã—ã¾ã™ã€‚ -- **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. +- **ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›´æ–°ã•れãŸå ´åˆã®ã¿ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を行ã†**: ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れãŸå ´åˆã€å‰å›žã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—以é™ã«ãƒ‡ãƒ¼ã‚¿ãŒè¿½åŠ ãƒ»å¤‰æ›´ãƒ»å‰Šé™¤ã•れãŸå ´åˆã®ã¿ã€4D ã¯å®šæœŸçš„ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã—ã¾ã™ã€‚ ãã†ã§ãªã„å ´åˆã€å®šæœŸçš„ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•ã‚Œã€æ¬¡å›žã®ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã¾ã§å»¶æœŸã•れã¾ã™ã€‚ エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“ãŒã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå»¶æœŸã•ã‚ŒãŸæ—¨è¨˜éŒ²ã•れã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションを使用ã™ã‚Œã°ã€ä¸»ã«å‚照目的ã§ä½¿ç”¨ã•れã¦ã„るアプリケーションã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«æ¶ˆè²»ã•れるマシン時間を節約ã§ãã¾ã™ã€‚ ストラクãƒãƒ£ãƒ¼ã‚„添付ファイルã«å¯¾ã—ã¦å¤‰æ›´ãŒãŠã“ãªã‚れã¦ã„ã¦ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–°ã¨ã—ã¦ã¯æ‰±ã‚れãªã„旨注æ„ã—ã¦ãã ã•ã„。 +> ã“ã®ãƒ‘ラメーターã¯ã€ã‚¢ãƒ—リケーションãŠã‚ˆã³ãƒ­ã‚°ãƒ•ァイル両方ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å½±éŸ¿ã—ã¾ã™ã€‚ -- **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. +- **最もå¤ã„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを削除**: ã“ã®ã‚ªãƒ—ション㯠"最新ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®ã¿ä¿å­˜ X ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル" ãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションを使用ã—ã¦ã€æœ€ã‚‚å¤ã„ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを削除ã™ã‚‹ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã‚’設定ã—ã¾ã™ã€‚é¸æŠžè‚¢ã¯ **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—å‰**ã€ã‚ã‚‹ã„㯠**ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—後** ã§ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæ©Ÿèƒ½ã™ã‚‹ã«ã¯ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルãŒå称変更ã•れãŸã‚Šã€ç§»å‹•ã•れãŸã‚Šã—ã¦ã„ã¦ã¯ãªã‚Šã¾ã›ã‚“。 -- **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. +- **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—失敗時**: ã“ã®ã‚ªãƒ—ションを使用ã—ã¦ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—失敗時ã®å‡¦ç†ã‚’設定ã§ãã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã§ããªã‹ã£ãŸå ´åˆã€4D ã§ã¯å†è©¦è¡Œã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + - **次回ã®äºˆå®šã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻ã«å†è©¦è¡Œã™ã‚‹**: ã“ã®ã‚ªãƒ—ションã¯ã€å®šæœŸçš„ãªè‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を設定ã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿æ„味ãŒã‚りã¾ã™ã€‚ 失敗ã—ãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚ エラーãŒç”Ÿæˆã•れã¾ã™ã€‚ + - **指定時間経éŽå¾Œã«å†è©¦è¡Œ**: ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€è¨­å®šã•れãŸå¾…ã¡æ™‚間経éŽå¾Œã«ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’å†è©¦è¡Œã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使用ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をブロックã™ã‚‹ã‚ˆã†ãªç‰¹å®šã®çжæ³ã«å¯¾å¿œã™ã‚‹ã“ã¨ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ ç§’ã€åˆ†ã€ã‚ã‚‹ã„ã¯æ™‚é–“å˜ä½ã§å¾…ã¡æ™‚間を設定ã§ãã¾ã™ã€‚ 次ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—試行ã«ã‚‚失敗ã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã€ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚¨ãƒªã‚¢ã«å¤±æ•—状æ³ãŒè¡¨ç¤ºã•れã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«ã‚‚記録ã•れã¾ã™ã€‚ + - **æ“作をキャンセル X 試行後**: ã“ã®ãƒ‘ラメーターを使用ã—ã¦ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—試行ã®å¤±æ•—最大数を設定ã§ãã¾ã™ã€‚ ã“ã®æœ€å¤§æ•°ã«é”ã—ã¦ã‚‚ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒæ­£ã—ã実行ã§ããªã‹ã£ãŸå ´åˆã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã€ã‚¨ãƒ©ãƒ¼ 1401 ("ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—è©¦è¡Œã®æœ€å¤§æ•°ã«é”ã—ã¾ã—ãŸã€‚自動ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ç„¡åйã«ãªã‚Šã¾ã™") ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’å†èµ·å‹•ã™ã‚‹ã‹ã€æ‰‹å‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒæˆåŠŸã™ã‚‹ã¾ã§è‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ãŠã“ãªã‚れã¾ã›ã‚“。 ã“ã®ãƒ‘ラメーターã¯ã€äººã«ã‚ˆã‚‹ä»‹å…¥ãŒå¿…è¦ã¨ãªã‚‹ã‚ˆã†ãªå•題ãŒã‚りã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—試行ãŒè‡ªå‹•çš„ã«ç¹°ã‚Šè¿”ã•れるã“ã¨ã«ã‚ˆã‚Šå…¨ä½“çš„ãªãƒ‘フォーマンスã«å½±éŸ¿ã™ã‚‹ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ デフォルトã§ã“ã®ã‚ªãƒ—ションã¯é¸æŠžã•れã¦ã„ã¾ã›ã‚“。 -- **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. +> 定期的ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•れる予定時刻ã«ã‚¢ãƒ—リケーションãŒèµ·å‹•ã•れã¦ã„ãªã‹ã£ãŸå ´åˆã€4D ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå¤±æ•—ã—ãŸã‚‚ã®ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ -> 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. +### アーカイブ +ã“れらã®ã‚ªãƒ—ションã¯ãƒ¡ã‚¤ãƒ³ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã¨ãƒ­ã‚°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã«é©ç”¨ã•れã¾ã™ã€‚ -### Archive +- **セグメントサイズ (MB)**: 4Dã§ã¯ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–をセグメントã«åˆ†å‰²ã§ãã¾ã™ã€‚ ã“ã®æŒ¯ã‚‹èˆžã„ã«ã‚ˆã‚Šã€ãŸã¨ãˆã°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを複数ã®ç•°ãªã‚‹ãƒ‡ã‚£ã‚¹ã‚¯ (DVDã‚„USBデãƒã‚¤ã‚¹ç­‰) ã«æ ¼ç´ã§ãã¾ã™ã€‚ 復元時ã€4D ã¯ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã‚’自動的ã«çµ±åˆã—ã¾ã™ã€‚ å„セグメントã«ã¯ MyApplication[xxxx-yyyy].4BK ã¨ã„ã£ãŸåç§°ãŒã¤ã‘られã¾ã™ (xxxx ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—番å·ã€yyyy ã¯ã‚»ã‚°ãƒ¡ãƒ³ãƒˆç•ªå·)。 ãŸã¨ãˆã°ã€MyApplication ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—㌠3ã¤ã®ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã«åˆ†å‰²ã•れるã¨ã€æ¬¡ã®ã‚ˆã†ãªåå‰ã«ãªã‚Šã¾ã™: MyApplication[0006-0001].4BKã€MyApplication[0006-0002].4BKã€MyApplication[0006-0003].4BK **セグメントサイズ** ã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã§ã‚りã€å„セグメントã®ã‚µã‚¤ã‚ºã‚’ MBå˜ä½ã§è¨­å®šã§ãã¾ã™ã€‚ メニューã‹ã‚‰å®šç¾©æ¸ˆã¿å€¤ã‚’é¸æŠžã™ã‚‹ã‹ã€0~2048 ã®å€¤ã‚’入力ã§ãã¾ã™ã€‚ 0 を指定ã™ã‚‹ã¨ã‚»ã‚°ãƒ¡ãƒ³ãƒˆåŒ–ã¯ã•れã¾ã›ã‚“ (**ãªã—** を指定ã—ãŸã®ã¨åŒã˜)。 -These options apply to main backup files and to log backup files. +- **圧縮率**: デフォルト㧠4D ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを圧縮ã—ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’節約ã—ã¾ã™ã€‚ ã—ã‹ã—大é‡ã®ãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚‹å ´åˆã€ãƒ•ァイルã®åœ§ç¸®å‡¦ç†ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã‹ã‹ã‚‹æ™‚é–“ã‚’é•·ãã—ã¾ã™ã€‚ **圧縮率** オプションを使用ã—ã¦ãƒ•ァイルã®åœ§ç¸®ãƒ¢ãƒ¼ãƒ‰ã‚’調整ã§ãã¾ã™: + - **ãªã—**: ファイルã®åœ§ç¸®ã¯ãŠã“ãªã‚れã¾ã›ã‚“。 ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯æ—©ããŠã“ãªã‚れã¾ã™ãŒã€ãƒ•ァイルサイズã¯å¤§ãããªã‚Šã¾ã™ã€‚ + - **速度** (デフォルト): ã“ã®ã‚ªãƒ—ションã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é€Ÿåº¦ã¨ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–サイズã®ãƒãƒ©ãƒ³ã‚¹ãŒè€ƒæ…®ã•れãŸã‚‚ã®ã§ã™ã€‚ + - **圧縮率**: ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã«æœ€å¤§ã®åœ§ç¸®çއãŒé©ç”¨ã•れã¾ã™ã€‚ アーカイブファイルã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§æœ€å°ã®ã‚µã‚¤ã‚ºã¨ãªã‚Šã¾ã™ãŒã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é€Ÿåº¦ã¯ä½Žä¸‹ã—ã¾ã™ã€‚ -- **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**). +- **インターレース率ã¨å†—長率**: 4D ã¯æœ€é©åŒ– (インターレース) ã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ (冗長) メカニズムã«åŸºã¥ã特定ã®ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’使用ã—ã¦ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を生æˆã—ã¾ã™ã€‚ ã“れらã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’å¿…è¦ã«å¿œã˜ã¦è¨­å®šã§ãã¾ã™ã€‚ ã“れらã®ã‚ªãƒ—ションã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ã¯ä½Žãƒ»ä¸­ãƒ»é«˜ãƒ»ãªã— (デフォルト) ã®é¸æŠžè‚¢ãŒã‚りã¾ã™ã€‚ + - **インターレース率**: インターレースã¨ã¯ãƒ‡ãƒ¼ã‚¿ã‚’連続ã—ãªã„é ˜åŸŸã«æ›¸ã込むã“ã¨ã«ã‚ˆã‚Šã€ã‚»ã‚¯ã‚¿ãƒ¼æå‚·ã®éš›ã®ãƒªã‚¹ã‚¯ã‚’低減ã•ã›ã‚‹ã‚‚ã®ã§ã™ã€‚ 率を上ã’ã‚‹ã“ã¨ã§ãƒªã‚¹ã‚¯ãŒã‚ˆã‚Šä½Žæ¸›ã•れã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã®å‡¦ç†ã«ã‚ˆã‚Šå¤šãã®ãƒ¡ãƒ¢ãƒªãŒå¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ + - **冗長率**: 冗長ã¯åŒã˜æƒ…報を複数回繰り返ã™ã“ã¨ã§ã€ãƒ•ァイル中ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿è­·ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ 冗長率を高ãã™ã‚‹ã¨ã‚ˆã‚Šãƒ•ァイルãŒä¿è­·ã•れã¾ã™ã€‚ã—ã‹ã—書ãè¾¼ã¿ã¯é…ããªã‚Šã€ãƒ•ァイルサイズも増大ã—ã¾ã™ã€‚ -- **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. -- **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 +- **データベースãŒå£Šã‚Œã¦ã„ãŸã‚‰ã€æœ€æ–°ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹**: ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ãƒ•ァイル破æãªã©ã®ç•°å¸¸ãŒæ¤œçŸ¥ã•れãŸå ´åˆã€4D ã¯èµ·å‹•時ã«ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹ãªæœ€æ–°ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã®å¾©æ—§ã‚’自動ã§é–‹å§‹ã—ã¾ã™ã€‚ ユーザーã«ã‚ˆã‚‹ä»‹å…¥ã¯å¿…è¦ã‚りã¾ã›ã‚“ãŒã€å‡¦ç†ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«è¨˜éŒ²ã•れã¾ã™ã€‚ -- **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. +- **データベースãŒå®Œå…¨ã§ãªã„å ´åˆã€æœ€æ–°ã®ãƒ­ã‚°ã‚’çµ±åˆã™ã‚‹**: ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れるã¨ã€ãƒ—ログラムã¯ã‚¢ãƒ—リケーションを開ãéš›ã¾ãŸã¯å¾©æ—§æ™‚ã«ã€è‡ªå‹•ã§ãƒ­ã‚°ãƒ•ァイルを統åˆã—ã¾ã™ã€‚ + - アプリケーションを開ãéš›ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«ä¿å­˜ã•れã¦ã„ãªã„処ç†ãŒãƒ­ã‚°ãƒ•ァイル中ã«è¦‹ã¤ã‹ã£ãŸå ´åˆã€4D ã¯è‡ªå‹•ã§ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルを統åˆã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ã«æ›¸ãè¾¼ã¾ã‚Œã¦ã„ãªã„データãŒã¾ã ã‚­ãƒ£ãƒƒã‚·ãƒ¥ä¸­ã«å­˜åœ¨ã™ã‚‹çŠ¶æ…‹ã§ã€é›»åŠ›ã®åˆ‡æ–­ãŒèµ·ããŸå ´åˆã«ç™ºç”Ÿã—ã¾ã™ã€‚ + - アプリケーションã®å¾©å…ƒæ™‚ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルやã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã¨åŒã˜ç•ªå·ã‚’æŒã¤ãƒ­ã‚°ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルãŒåŒã˜ãƒ•ォルダーã«å­˜åœ¨ã™ã‚‹å ´åˆã€4D ã¯ãã®å†…容を検証ã—ã¾ã™ã€‚ ãã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ãè¾¼ã¾ã‚Œã¦ã„ãªã„処ç†ãŒè¦‹ã¤ã‹ã‚Œã°ã€è‡ªå‹•ã§çµ±åˆå‡¦ç†ãŒãŠã“ãªã‚れã¾ã™ã€‚ -- **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. +ユーザーã«ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒæç¤ºã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 処ç†ã¯å®Œå…¨ã«è‡ªå‹•ã§ã™ã€‚ 処ç†ã¯ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナルã«è¨˜éŒ²ã•れã¾ã™ã€‚ -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 +> 自動復元ã®å ´åˆã€å¾©å…ƒã•れるã®ã¯æ¬¡ã®è¦ç´ ã«é™ã‚‰ã‚Œã¾ã™:
        - .4DD ファイル
        - .4DIndx ファイル
        - .4DSyncData ファイル
        - .4DSyncHeader ファイル
        - External Data フォルダー +> +> 添付ファイルやプロジェクトファイルをå–å¾—ã—ãŸã„å ´åˆã€[手動ã®å¾©å…ƒ](restore.md#手動ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‹ã‚‰å¾©å…ƒã™ã‚‹-標準ダイアログ) ã‚’ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Concepts/about.md b/website/translated_docs/ja/Concepts/about.md index 4901429d334931..14bb9fead17c1b 100644 --- a/website/translated_docs/ja/Concepts/about.md +++ b/website/translated_docs/ja/Concepts/about.md @@ -3,21 +3,22 @@ id: about title: 4D ランゲージã«ã¤ã„㦠--- -4Dã¯ç‹¬è‡ªã®ãƒ—ログラミング言語をæŒã£ã¦ã„ã¾ã™ã€‚1300ã‚’è¶…ãˆã‚‹ã“ã®ãƒ“ルトインã®è¨€èªžã«ã‚ˆã‚Šã€4Dã¯ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—上ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ãƒ—リケーションを作æˆã™ã‚‹ã€ãƒ‘ワフルãªé–‹ç™ºãƒ„ールã¨ãªã£ã¦ã„ã¾ã™ã€‚ å˜ç´”ãªè¨ˆç®—ã‹ã‚‰è¤‡é›‘ãªã‚«ã‚¹ã‚¿ãƒ ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã®ä½œæˆã¾ã§ã€4D è¨€èªžã¯æ§˜ã€…ãªã‚¿ã‚¹ã‚¯ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã“ã¨ãŒå¯èƒ½ã§ã™: +4Dã¯ç‹¬è‡ªã®ãƒ—ログラミング言語をæŒã£ã¦ã„ã¾ã™ã€‚1300ã‚’è¶…ãˆã‚‹ã“ã®ãƒ“ルトインã®è¨€èªžã«ã‚ˆã‚Šã€4D㯠Webã€ãƒ¢ãƒã‚¤ãƒ«ã€ãŠã‚ˆã³ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—アプリケーションを作æˆã™ã‚‹ã€ãƒ‘ワフルãªé–‹ç™ºãƒ„ールã¨ãªã£ã¦ã„ã¾ã™ã€‚ å˜ç´”ãªè¨ˆç®—ã‹ã‚‰è¤‡é›‘ãªã‚«ã‚¹ã‚¿ãƒ ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã®ä½œæˆã¾ã§ã€4D è¨€èªžã¯æ§˜ã€…ãªã‚¿ã‚¹ã‚¯ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã“ã¨ãŒå¯èƒ½ã§ã™: - ã‚¯ã‚¨ãƒªã‚„ä¸¦ã¹æ›¿ãˆãªã©ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ç®¡ç†ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ãƒ—ログラムã§ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ - ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®æƒ…報をもã¨ã«è¤‡é›‘ãªãƒ¬ãƒãƒ¼ãƒˆã‚„ラベルを作æˆãƒ»å°åˆ·ã™ã‚‹ - ä»–ã®ãƒ‡ãƒã‚¤ã‚¹ã¨é€šä¿¡ã™ã‚‹ -- メールをé€ä¿¡ã™ã‚‹ +- メールをé€ä¿¡ã™ã‚‹ - ドキュメントや Web サイトを管ç†ã™ã‚‹ -- 4D データベースã¨ä»–ã®ã‚¢ãƒ—リケーションã®é–“ã§ã€ãƒ‡ãƒ¼ã‚¿ã®æ›¸ã出ã—や読ã¿è¾¼ã¿ã‚’ãŠã“ãªã† +- 4D アプリケーションã¨ä»–ã®ã‚¢ãƒ—リケーションã®é–“ã§ã€ãƒ‡ãƒ¼ã‚¿ã®æ›¸ã出ã—や読ã¿è¾¼ã¿ã‚’ãŠã“ãªã† - 4D ã®ãƒ—ログラミング言語ã«ã€ä»–ã®è¨€èªžã§æ›¸ã‹ã‚ŒãŸãƒ—ロシージャーを組ã¿è¾¼ã‚€ -4D ã®ãƒ—ãƒ­ã‚°ãƒ©ãƒŸãƒ³ã‚°è¨€èªžã¯æŸ”軟性ã¨ãƒ‘ワーを備ãˆã€ã‚らゆるレベルã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„デベロッパーã«ã¨ã£ã¦å¤šç¨®å¤šæ§˜ãªæƒ…å ±ç®¡ç†æ¥­å‹™ã‚’锿ˆã™ã‚‹ãŸã‚ã®ç†æƒ³çš„ãªãƒ„ールã§ã™ã€‚ åˆå¿ƒè€…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚ã£ã¦ã‚‚ã€è¨ˆç®—処ç†ã‚’手早ã実行ã§ãã¾ã™ã€‚ ã‚る程度コンピューターã®çŸ¥è­˜ã‚’æŒã£ã¦ã„るユーザーã§ã‚れã°ã€ãƒ—ログラミング経験ãŒãªãã¦ã‚‚データベースをカスタマイズã§ãã¾ã™ã€‚ 熟練ã—ãŸãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã§ã‚れã°ã€4D ã®å¼·åŠ›ãªãƒ—ログラミング言語を駆使ã—ã¦ã€ãƒ•ァイル転é€ã‚„通信ã€ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ãªã©ã®é«˜åº¦ãªæ©Ÿèƒ½ã‚’データベースã«çµ„ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ 他言語ã§ãƒ—ログラミング経験ãŒã‚る開発者ã¯ã€ç‹¬è‡ªã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ 4D ã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +4D ã®ãƒ—ãƒ­ã‚°ãƒ©ãƒŸãƒ³ã‚°è¨€èªžã¯æŸ”軟性ã¨ãƒ‘ワーを備ãˆã€ã‚らゆるレベルã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„デベロッパーã«ã¨ã£ã¦å¤šç¨®å¤šæ§˜ãªæƒ…å ±ç®¡ç†æ¥­å‹™ã‚’锿ˆã™ã‚‹ãŸã‚ã®ç†æƒ³çš„ãªãƒ„ールã§ã™ã€‚ åˆå¿ƒè€…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã§ã‚ã£ã¦ã‚‚ã€è¨ˆç®—処ç†ã‚’手早ã実行ã§ãã¾ã™ã€‚ ã‚る程度コンピューターã®çŸ¥è­˜ã‚’æŒã£ã¦ã„るユーザーã§ã‚れã°ã€ãƒ—ログラミング経験ãŒãªãã¦ã‚‚アプリケーションをカスタマイズã§ãã¾ã™ã€‚ 熟練ã—ãŸãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã§ã‚れã°ã€4D ã®å¼·åŠ›ãªãƒ—ログラミング言語を駆使ã—ã¦ã€ãƒ•ァイル転é€ã‚„通信ã€ãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚°ãªã©ã®é«˜åº¦ãªæ©Ÿèƒ½ã‚’アプリケーションã«çµ„ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ 他言語ã§ãƒ—ログラミング経験ãŒã‚る開発者ã¯ã€ç‹¬è‡ªã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ 4D ã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + ## 4D ランゲージã¨ã¯ -4D ランゲージã¯ã€ç§ãŸã¡ãŒæ—¥ã”ã‚話ã—ã¦ã„る言語ã¨ã•ã—ã¦å¤‰ã‚りã‚りã¾ã›ã‚“。 アイデアã®è¡¨ç¾ã‚„ã€ä¼é”ã€æŒ‡ç¤ºã‚’ãŠã“ãªã†ãŸã‚ã®ã‚³ãƒŸãƒ¥ãƒ‹ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ä¸€å½¢æ…‹ã§ã™ã€‚ 話ã—言葉ã¨åŒæ§˜ã«ã€4D ã¯ç‹¬è‡ªã®èªžå½™ãƒ»æ–‡æ³•・構文をæŒã£ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚’使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚„データをã©ã®ã‚ˆã†ã«æ‰±ã†ã®ã‹ã‚’ 4D ã«ä¼ãˆã¾ã™ã€‚ +4D ランゲージã¯ã€ç§ãŸã¡ãŒæ—¥ã”ã‚話ã—ã¦ã„る言語ã¨ã•ã—ã¦å¤‰ã‚りã‚りã¾ã›ã‚“。 アイデアã®è¡¨ç¾ã‚„ã€ä¼é”ã€æŒ‡ç¤ºã‚’ãŠã“ãªã†ãŸã‚ã®ã‚³ãƒŸãƒ¥ãƒ‹ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ä¸€å½¢æ…‹ã§ã™ã€‚ 話ã—言葉ã¨åŒæ§˜ã«ã€4D ã¯ç‹¬è‡ªã®èªžå½™ãƒ»æ–‡æ³•・構文をæŒã£ã¦ã„ã¾ã™ã€‚ã“ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚’使用ã—ã¦ã€ã‚¢ãƒ—リケーションやデータをã©ã®ã‚ˆã†ã«æ‰±ã†ã®ã‹ã‚’ 4D ã«ä¼ãˆã¾ã™ã€‚ 4D を効果的ã«ä½¿ç”¨ã™ã‚‹ç›®çš„ã§ã¯ã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ã™ã¹ã¦ã‚’知ã£ã¦ã„ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 言葉を交ã‚ã™ãŸã‚ã«è¨€èªžã®ã™ã¹ã¦ã‚’知る必è¦ãŒãªã„ã®ã¨åŒã˜ã§ã™ã€‚実際ã€å°‘ãªã„語彙ã§ã‚‚雄å¼ã«èªžã‚‹ã“ã¨ã¯ã§ãã‚‹ã‚‚ã®ã§ã™ã€‚ 4D ランゲージもã€å‰µé€ æ€§ã‚’発æ®ã™ã‚‹ã®ã«å¿…è¦ã¨ãªã‚‹ã®ã¯ã»ã‚“ã®ä¸€éƒ¨ã§ã€æ®‹ã‚Šã¯å¿…è¦ã«å¿œã˜ã¦è¦šãˆã‚Œã°ã‚ˆã„ã®ã§ã™ã€‚ @@ -31,14 +32,14 @@ title: 4D ランゲージã«ã¤ã„㦠- ユーザーインタフェースã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«: ウィンドウãŠã‚ˆã³ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ç®¡ç†ã€ãƒ•ォームやインタフェースオブジェクトã®åˆ¶å¾¡ãŒã§ãã¾ã™ã€‚ - 高度ãªãƒ‡ãƒ¼ã‚¿ç®¡ç†: トランザクション処ç†ã€è¤‡é›‘ãªãƒ‡ãƒ¼ã‚¿æ¤œè¨¼ã€ãƒžãƒ«ãƒãƒ¦ãƒ¼ã‚¶ãƒ¼ç®¡ç†ã€ã‚»ãƒƒãƒˆã‚„命åセレクションã®å‡¦ç†ãªã©ãŒå«ã¾ã‚Œã¾ã™ã€‚ - コンピューターã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«: シリアルãƒãƒ¼ãƒˆé€šä¿¡ã‚„ドキュメント管ç†ã€ã‚¨ãƒ©ãƒ¼ç®¡ç†ãŒå¯èƒ½ã§ã™ã€‚ -- アプリケーションã®ä½œæˆ: アプリケーションモードã§å‹•作ã™ã‚‹ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã§ãã¾ã™ã€‚ +- アプリケーションã®ä½œæˆ: ダブルクリックã§èµ·å‹•ã™ã‚‹ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸã‚¢ãƒ—リケーションをビルドã§ãã¾ã™ã€‚ - ビルトイン 4D Web サーãƒãƒ¼ã®åˆ©ç”¨: ãƒ‡ãƒ¼ã‚¿ã‚’åæ˜ ã•ã›ãŸå‹•的㪠Web ページをビルドã—ã€æ›´æ–°ã§ãã¾ã™ã€‚ -ランゲージを使用ã™ã‚Œã°ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ã‚¶ã‚¤ãƒ³ã‚„処ç†ã‚’完全ã«åˆ¶å¾¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D ã¯ãƒ‘ãƒ¯ãƒ•ãƒ«ãªæ±Žç”¨ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’æä¾›ã—ã¦ã„ã¾ã™ãŒã€å¿…è¦ã«å¿œã˜ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’カスタマイズã™ã‚‹ã«ã¯ 4D ランゲージãŒå¿…è¦ã§ã™ã€‚ +ランゲージを使用ã™ã‚Œã°ã€ã‚¢ãƒ—リケーションã®ãƒ‡ã‚¶ã‚¤ãƒ³ã‚„処ç†ã‚’完全ã«åˆ¶å¾¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D ã¯ãƒ‘ãƒ¯ãƒ•ãƒ«ãªæ±Žç”¨ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’æä¾›ã—ã¦ã„ã¾ã™ãŒã€å¿…è¦ã«å¿œã˜ã¦ã‚¢ãƒ—リケーションをカスタマイズã™ã‚‹ã«ã¯ 4D ランゲージãŒå¿…è¦ã§ã™ã€‚ ## データ制御 -4D ランゲージを使用ã™ã‚Œã°ã€ãƒ‘ワフルã§ã‚¨ãƒ¬ã‚¬ãƒ³ãƒˆã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’コントロールã§ãã¾ã™ã€‚ 4D ランゲージã¯åˆå¿ƒè€…ã«ã‚‚使ã„ã‚„ã™ãã€çµŒé¨“豊ã‹ãªãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã®åˆ©ç”¨ã«è€ãˆã‚‹ã»ã©é«˜åº¦ã§ã™ã€‚ 言語ã®åˆ©ç”¨ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ“ルトイン機能ã‹ã‚‰ã€å®Œå…¨ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¹ãƒ ãƒ¼ã‚ºã«ç§»è¡Œã§ãã¾ã™ã€‚ +4D ランゲージを使用ã™ã‚Œã°ã€ãƒ‘ワフルã§ã‚¨ãƒ¬ã‚¬ãƒ³ãƒˆã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’コントロールã§ãã¾ã™ã€‚ 4D ランゲージã¯åˆå¿ƒè€…ã«ã‚‚使ã„ã‚„ã™ãã€çµŒé¨“豊ã‹ãªãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã®åˆ©ç”¨ã«è€ãˆã‚‹ã»ã©é«˜åº¦ã§ã™ã€‚ ランゲージã®åˆ©ç”¨ã«ã‚ˆã‚Šã€ãƒ“ルトインã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹æ©Ÿèƒ½ã‹ã‚‰ã€å®Œå…¨ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸã‚¢ãƒ—リケーションã«ã‚¹ãƒ ãƒ¼ã‚ºã«ç§»è¡Œã§ãã¾ã™ã€‚ 4D ランゲージã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦æ¨™æº–ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ç®¡ç†ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã€Œã‚¯ã‚¨ãƒªã€ãƒ„ールãƒãƒ¼ãƒœã‚¿ãƒ³ã‚’使ã£ã¦é–‹ã‘るクエリエディターã¯ã€`QUERY` コマンドを使用ã™ã‚‹ã“ã¨ã§ã‚‚表示ã•れã¾ã™ã€‚ ã•らã«ã€`QUERY` コマンドを使用ã™ã‚Œã°ã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã‹ãªãã¦ã‚‚指定ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’検索ã§ãã‚‹ã®ã§ã™ã€‚ ãŸã¨ãˆã° `QUERY ([People];[People]Last Name="Smith")` ã¨è¨˜è¿°ã™ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ "Smith" ã¨ã„ã†åå‰ã®äººç‰©ã‚’ã™ã¹ã¦æ¤œç´¢ã—ã¾ã™ã€‚ @@ -54,8 +55,8 @@ title: 4D ランゲージã«ã¤ã„㦠4D ランゲージã¯å¾“æ¥ã®ã‚³ãƒ³ãƒ”ュータ言語ã¨ã¯ç•°ãªã‚Šã¾ã™ã€‚ 4D ランゲージã¯ã€ä»Šæ—¥ã®ã‚³ãƒ³ãƒ”ュータã§ä½¿ç”¨ã§ãã‚‹æœ€ã‚‚å…ˆé€²çš„ã§æŸ”軟性ã®ã‚る言語ã®1ã¤ã§ã™ã€‚ 4D ランゲージã¯ã€äººãŒä½œæ¥­ã‚’ãŠã“ãªã†ã‚ˆã†ã«å‡¦ç†ã™ã‚‹ã‚ˆã†è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ -従æ¥ã®è¨€èªžã‚’使用ã—ã¦é–‹ç™ºã‚’行ã†å ´åˆã€ã¾ãšå¿µå…¥ã‚Šã«è¨ˆç”»ã‚’ç«‹ã¦ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 実際ã€è¨ˆç”»ã®ç«‹æ¡ˆã¯é–‹ç™ºã®é‡è¦ãªå·¥ç¨‹ã®1ã¤ã§ã™ã€‚ 4D ã«ãŠã„ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚らゆる部分ã§ã„ã¤ã§ã‚‚ランゲージを使ã„ã¯ã˜ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€åˆã‚ã«ãƒ•ォームã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’追加ã—ã€ã„ãã¤ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã‚ã¨ã‹ã‚‰è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ データベースãŒã‚ˆã‚Šé«˜åº¦ã«ãªã£ãŸã‚‰ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰å®Ÿè¡Œã™ã‚‹ãƒ—ロジェクトメソッドを追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 4D ランゲージã¯å¥½ããªã ã‘利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»–ã®å¤šãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚ˆã†ãª "ã™ã¹ã¦ã‹ç„¡ã‹" ã§ã¯ã‚りã¾ã›ã‚“。 +従æ¥ã®è¨€èªžã‚’使用ã—ã¦é–‹ç™ºã‚’行ã†å ´åˆã€ã¾ãšå¿µå…¥ã‚Šã«è¨ˆç”»ã‚’ç«‹ã¦ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 実際ã€è¨ˆç”»ã®ç«‹æ¡ˆã¯é–‹ç™ºã®é‡è¦ãªå·¥ç¨‹ã®1ã¤ã§ã™ã€‚ 4D ã«ãŠã„ã¦ã¯ã€ãƒ—ロジェクトã®ã‚らゆる部分ã§ã„ã¤ã§ã‚‚ランゲージを使ã„ã¯ã˜ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€åˆã‚ã«ãƒ•ォームã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’追加ã—ã€ã„ãã¤ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã‚ã¨ã‹ã‚‰è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションãŒã‚ˆã‚Šé«˜åº¦ã«ãªã£ãŸã‚‰ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰å®Ÿè¡Œã™ã‚‹ãƒ—ロジェクトメソッドを追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 4D ランゲージã¯å¥½ããªã ã‘利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»–ã®å¤šãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚ˆã†ãª "ã™ã¹ã¦ã‹ç„¡ã‹" ã§ã¯ã‚りã¾ã›ã‚“。 -従æ¥ã®è¨€èªžã§ã¯ã€ã‚らã‹ã˜ã‚オブジェクトを正å¼ãªè¨˜è¿°æ³•ã§å®£è¨€ãƒ»å®šç¾©ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã—ã‹ã—ã€4D ã§ã¯ãƒœã‚¿ãƒ³ãªã©ã®ã‚ªãƒ–ジェクトを作æˆã—ã€ãã®ã¾ã¾ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 作æˆã—ãŸã‚ªãƒ–ジェクトã¯è‡ªå‹•的㫠4D ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒœã‚¿ãƒ³ã‚’使用ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒœã‚¿ãƒ³ã‚’フォーム上ã«ä½œæˆã—ã¦åå‰ã‚’指定ã—ã¾ã™ã€‚ ユーザーãŒãƒœã‚¿ãƒ³ã‚’クリックã—ãŸæ™‚点ã§ã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ãŒè‡ªå‹•çš„ã«ãƒ¡ã‚½ãƒƒãƒ‰ã«é€šçŸ¥ã—ã¾ã™ã€‚ +従æ¥ã®è¨€èªžã§ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースオブジェクトをã‚らã‹ã˜ã‚æ­£å¼ãªè¨˜è¿°æ³•ã§å®£è¨€ãƒ»å®šç¾©ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã—ã‹ã—ã€4D ã§ã¯ãƒœã‚¿ãƒ³ãªã©ã®ã‚ªãƒ–ジェクトを作æˆã—ã€ãã®ã¾ã¾ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚作æˆã—ãŸã‚ªãƒ–ジェクトã¯è‡ªå‹•的㫠4D ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒœã‚¿ãƒ³ã‚’使用ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒœã‚¿ãƒ³ã‚’フォーム上ã«ä½œæˆã—ã¦åå‰ã‚’指定ã—ã¾ã™ã€‚ ユーザーãŒãƒœã‚¿ãƒ³ã‚’クリックã—ãŸæ™‚点ã§ã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ãŒè‡ªå‹•çš„ã«ãƒ¡ã‚½ãƒƒãƒ‰ã«é€šçŸ¥ã—ã¾ã™ã€‚ 従æ¥ã®è¨€èªžã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã®è¨˜è¿°æ–¹æ³•を制é™ã™ã‚‹ãªã©ã—ã¦ã€èžé€šæ€§ã«æ¬ ã‘ã‚‹ã“ã¨ãŒå¤šã„ã®ã«å¯¾ã—〠4D ランゲージã¯ä¼çµ±ã«ç¸›ã‚‰ã‚Œã‚‹ã“ã¨ãªã進化ã—ã¦ã„ãã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/arrays.md b/website/translated_docs/ja/Concepts/arrays.md index b79a4d67f4c8bc..0cd8dfbdf74472 100644 --- a/website/translated_docs/ja/Concepts/arrays.md +++ b/website/translated_docs/ja/Concepts/arrays.md @@ -7,6 +7,7 @@ title: é…列 > ã»ã¨ã‚“ã©ã®å ´åˆã«ãŠã„ã¦ã€**é…列** より **コレクション** ã®åˆ©ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ コレクションã¯é…列より柔軟ãªã ã‘ã§ãªãã€ãŸãã•ã‚“ã®å°‚用メソッドをæŒã¡ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[コレクション](Concepts/dt_collection.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ## é…列ã®ä½œæˆ é…列ã¯ã€"é…列" テーマã®é…列宣言コマンドã®ã„ãšã‚Œã‹ã‚’使用ã—ã¦ä½œæˆã—ã¾ã™ã€‚ é…列宣言コマンドã¯ã€1次元ã¾ãŸã¯ 2次元ã®é…列ã®ä½œæˆã‚„サイズ変更をã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 2次元é…列ã®è©³ç´°ã«ã¤ã„ã¦ã¯ [二次元é…列](#二次元é…列) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 @@ -18,13 +19,11 @@ title: é…列 ``` 次ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ã•ãã»ã©ä½œæˆã—ãŸé…列を20è¦ç´ ã«ã‚µã‚¤ã‚ºå¤‰æ›´ã—ã¾ã™: - ```4d ARRAY INTEGER(aiAnArray;20) ``` 次ã®ã‚³ãƒ¼ãƒ‰ã¯ã€ã“ã®é…列をè¦ç´ ãªã—ã«ã‚µã‚¤ã‚ºå¤‰æ›´ã—ã¾ã™: - ```4d ARRAY INTEGER(aiAnArray;0) ``` @@ -44,15 +43,15 @@ ARRAY INTEGER(aiAnArray;0) ALERT("è¦ç´ ç•ªå· #"+String($vlElem)+" ã®å€¤ã¯ "+atNames{$vlElem}+" ã§ã™ã€‚") End for ``` - atNames{$vlElem} ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 atNames{3} ã®ã‚ˆã†ã«æ•°å€¤ãƒªãƒ†ãƒ©ãƒ«ã‚’使ã†ã ã‘ã§ãªãã€æ•°å€¤å¤‰æ•°ã«ã‚ˆã£ã¦é…列ã®è¦ç´ ç•ªå·ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ループ構造ã«ã‚ˆã‚‹å復を使用ã™ã‚‹ã¨ (`For...End for`, `Repeat...Until` ã¾ãŸã¯ `While...End while`)ã€çŸ­ã„コードã§é…列ã®å…¨è¦ç´ ã€ã¾ãŸã¯ä¸€éƒ¨ã®è¦ç´ ã‚’対象ã¨ã—ãŸå‡¦ç†ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ **é‡è¦:** ä»£å…¥æ¼”ç®—å­ (:=) ã¨æ¯”è¼ƒæ¼”ç®—å­ (=) ã¨ã‚’æ··åŒã—ãªã„よã†ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ä»£å…¥ã¨æ¯”較ã¯ã€ã¾ã£ãŸãç•°ãªã£ãŸæ€§è³ªã®å‡¦ç†ã§ã™ã€‚ -### é…列ã¸ã®é…列ã®ä»£å…¥ +### é…列ã¸ã®é…列ã®ä»£å…¥ 文字列やテキスト変数ã¨é•ã£ã¦ã€é…列ã«é…列を代入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 é…列をãã£ãりãã®ã¾ã¾åˆ¥ã®é…列ã«ã‚³ãƒ”ーã™ã‚‹ã«ã¯ `COPY ARRAY` コマンドを使ã„ã¾ã™ã€‚ + ## é…列ã®è¦ç´ ã‚¼ãƒ­ é…列ã¯å¿…ãšã€è¦ç´ ã‚¼ãƒ­ã‚’æŒã¡ã¾ã™ã€‚ ドロップダウンリストãªã©ã®ãƒ•ォームオブジェクトã«é…列ãŒè¨­å®šã•れã¦ã„ãŸå ´åˆã€è¦ç´ ã‚¼ãƒ­ãŒè¡¨ç¤ºã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“ãŒã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã§ã®åˆ©ç”¨ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“ (*)。 @@ -80,12 +79,13 @@ atNames{$vlElem} ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 atNam (*) ã²ã¨ã¤ã ã‘例外ãŒã‚りã¾ã™ã€‚é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã€ç·¨é›†ä¸­ã®å…ƒã®å€¤ã‚’ä¿æŒã™ã‚‹ãŸã‚ã€å†…部的ã«é…列ã®è¦ç´ ã‚¼ãƒ­ãŒä½¿ç”¨ã•れã¾ã™ã€‚ã“ã®ç‰¹åˆ¥ãªã‚±ãƒ¼ã‚¹ã§ã¯ã€é–‹ç™ºè€…㯠0番目ã®è¦ç´ ã‚’利用ã§ãã¾ã›ã‚“。 + ## 二次元é…列 -é…列宣言コマンドã¯ãれãžã‚Œã€1次元ãŠã‚ˆã³ 2次元ã®é…列を作æˆã€ã¾ãŸã¯ã‚µã‚¤ã‚ºå¤‰æ›´ãŒã§ãã¾ã™ã€‚ 例: +é…列宣言コマンドã¯ãれãžã‚Œã€1次元ãŠã‚ˆã³ 2次元ã®é…列を作æˆã€ã¾ãŸã¯ã‚µã‚¤ã‚ºå¤‰æ›´ãŒã§ãã¾ã™ã€‚ 例: ```4d -

        ARRAY TEXT(atTopics;100;50) // 100行㨠50列ã‹ã‚‰ãªã‚‹ãƒ†ã‚­ã‚¹ãƒˆé…列を作æˆã—ã¾ã™ + ARRAY TEXT(atTopics;100;50) // 100行㨠50列ã‹ã‚‰ãªã‚‹ãƒ†ã‚­ã‚¹ãƒˆé…列を作æˆã—ã¾ã™ ``` 2次元é…列ã¯ã€æœ¬è³ªçš„ã«ã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚ªãƒ–ジェクトã§ã‚りã€è¡¨ç¤ºã‚„å°åˆ·ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 @@ -153,7 +153,7 @@ atNames{$vlElem} ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 atNam - 4ã¤ã®æƒ…報タイプ (郵便番å·ã€å¸‚ã€éƒ¡ã€å·ž) ã‚’ç¶­æŒã™ã‚‹ãŸã‚ã«ã¯ã€4ã¤ã®å¤§ããªé…列をメモリ内ã§ç¶­æŒã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ - é…列ã¯ã€å¸¸ã«å…¨ä½“ãŒãƒ¡ãƒ¢ãƒªå†…ã«ç¶­æŒã•れるãŸã‚ã€å¸¸æ™‚使用ã—ãªã„å ´åˆã§ã‚‚ã€ä½œæ¥­ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®é–“ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’メモリã«ç½®ã„ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ -- é…列全体ãŒå¸¸ã«ãƒ¡ãƒ¢ãƒªå†…ã«ç¶­æŒã•れるã“ã¨ã‹ã‚‰ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒé–‹å§‹ã•れるãŸã³ã« 4ã¤ã®é…列をディスクã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã—ã¦ã€çµ‚了時ã«ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚当該データãŒä½œæ¥­ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«ä½¿ç”¨ãƒ»å¤‰æ›´ã•れãªã„å ´åˆã‚‚ã“れをçœç•¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 +- é…列全体ãŒå¸¸ã«ãƒ¡ãƒ¢ãƒªå†…ã«ç¶­æŒã•れるã“ã¨ã‹ã‚‰ã€ã‚¢ãƒ—リケーションãŒé–‹å§‹ã•れるãŸã³ã« 4ã¤ã®é…列をディスクã‹ã‚‰ãƒ­ãƒ¼ãƒ‰ã—ã¦ã€çµ‚了時ã«ã¯ãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚当該データãŒä½œæ¥­ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«ä½¿ç”¨ãƒ»å¤‰æ›´ã•れãªã„å ´åˆã‚‚ã“れをçœç•¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 **çµè«–:** é…列ã¯ã€ã»ã©ã‚ˆã„é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’短時間維æŒã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ ä»–æ–¹ã€é…列ã¯ãƒ¡ãƒ¢ãƒªå†…ã«ç½®ã‹ã‚Œã‚‹ãŸã‚ã€æ‰±ã„ã‚„ã™ã高速æ“作ãŒå¯èƒ½ã§ã™ã€‚ @@ -162,7 +162,7 @@ atNames{$vlElem} ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 atNam | é…列タイプ | メモリ使用é‡ã®è¨ˆç®—å¼ (ãƒã‚¤ãƒˆå˜ä½) | | ------ | ---------------------------------- | | BLOB | (1+è¦ç´ æ•°) * 12 + å…¨BLOBè¦ç´ ã®åˆè¨ˆã‚µã‚¤ã‚º | -| ブール | (31+è¦ç´ æ•°)\8 | +| ブール | (31+è¦ç´ æ•°) \ 8 | | 日付 | (1+è¦ç´ æ•°) * 6 | | æ•´æ•° | (1+è¦ç´ æ•°) * 2 | | å€é•·æ•´æ•° | (1+è¦ç´ æ•°) * 4 | @@ -174,7 +174,6 @@ atNames{$vlElem} ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 atNam | 時間 | (1+è¦ç´ æ•°) * 4 | | 2次元 | (1+è¦ç´ æ•°) * 16 + é…列サイズã®åˆè¨ˆ | - **注:** - メモリ中ã®ãƒ†ã‚­ã‚¹ãƒˆã‚µã‚¤ã‚ºã¯ä»¥ä¸‹ã®å¼ã§è¨ˆç®—ã•れã¾ã™: ((Length + 1) * 2) diff --git a/website/translated_docs/ja/Concepts/cf_branching.md b/website/translated_docs/ja/Concepts/cf_branching.md index 59ac04e295736e..88bda254586612 100644 --- a/website/translated_docs/ja/Concepts/cf_branching.md +++ b/website/translated_docs/ja/Concepts/cf_branching.md @@ -3,6 +3,9 @@ id: branching title: åˆ†å²æ§‹é€  --- +åˆ†å²æ§‹é€ ã¯ã€æ¡ä»¶ã‚’テストã—ã€ãã®çµæžœã«åŸºã¥ã„ã¦ç•°ãªã‚‹æµã‚Œã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å°Žãã¾ã™ã€‚ + + ## If...Else...End if `If...Else...End if` ã«ã‚ˆã‚‹åˆ¶å¾¡ãƒ•ãƒ­ãƒ¼æ§‹é€ ã®æ­£å¼ãªæ§‹æ–‡ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: @@ -16,14 +19,13 @@ title: åˆ†å²æ§‹é€  ``` `Else` 部分ã¯ã‚ªãƒ—ションã§ã‚りã€çœç•¥ã—ã¦ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¿°ã§ãã¾ã™: - ```4d If(Boolean_Expression) statement(s) End if ``` -`If...Else...End if` 構造ã¯ã€æ¡ä»¶ (ブールå¼) ㌠TRUE ã‹ FALSE ã‹ã«ã‚ˆã£ã¦ã€å‡¦ç†ã®é¸æŠžè‚¢ã‚’2ã¤ãƒ¡ã‚½ãƒƒãƒ‰ã«ä¸Žãˆã¾ã™ã€‚ ブールå¼ãŒ TRUE ã®å ´åˆã¯ã€ãƒ†ã‚¹ãƒˆã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—〠ブールå¼ãŒ FALSE ã®å ´åˆã«ã¯ã€Else æ–‡ã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ã¾ã™ã€‚ ä»»æ„ã® `Else` ãŒçœç•¥ã•れã¦ã„ãŸå ´åˆã€`End if` ã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ (ã‚れã°) ã¸ã¨å®Ÿè¡ŒãŒç¶šè¡Œã•れã¾ã™ã€‚ +`If...Else...End if` 構造ã¯ã€æ¡ä»¶ (ブールå¼) ㌠true ã‹ false ã‹ã«ã‚ˆã£ã¦ã€å‡¦ç†ã®é¸æŠžè‚¢ã‚’2ã¤ãƒ¡ã‚½ãƒƒãƒ‰ã«ä¸Žãˆã¾ã™ã€‚ ブールå¼ãŒ true ã®å ´åˆã¯ã€ãƒ†ã‚¹ãƒˆã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—〠ブールå¼ãŒ FALSE ã®å ´åˆã«ã¯ã€Else æ–‡ã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ã¾ã™ã€‚ ä»»æ„ã® `Else` ãŒçœç•¥ã•れã¦ã„ãŸå ´åˆã€`End if` ã®ã™ã後ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ (ã‚れã°) ã¸ã¨å®Ÿè¡ŒãŒç¶šè¡Œã•れã¾ã™ã€‚ ブールå¼ã¯å¸¸ã«å…¨ä½“ãŒè©•価ã•れるã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆ: @@ -33,7 +35,7 @@ title: åˆ†å²æ§‹é€  End if ``` -ã“ã®å ´åˆã€ä¸¡æ–¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒ TRUE ã§ã‚ã‚‹å ´åˆã«é™ã‚Šã€å¼ã¯ TRUE ã«ãªã‚Šã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ *MethodA* ㌠FALSE ã‚ã£ã¦ã‚‚ã€4Dã¯*MethodB* も評価ã™ã‚‹ãŸã‚ã€ã“ã‚Œã¯æ™‚é–“ã®ç„¡é§„ã«ãªã‚Šã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªæ§‹é€ ã‚’使用ã™ã‚‹ã»ã†ãŒè³¢æ˜Žã¨ã„ãˆã¾ã™: +ã“ã®å ´åˆã€ä¸¡æ–¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒ true ã§ã‚ã‚‹å ´åˆã«é™ã‚Šã€å¼ã¯ true ã«ãªã‚Šã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ _MethodA_ ㌠false ã§ã‚ã£ã¦ã‚‚ã€4Dã¯_MethodB_ も評価ã™ã‚‹ãŸã‚ã€ã“ã‚Œã¯æ™‚é–“ã®ç„¡é§„ã«ãªã‚Šã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªæ§‹é€ ã‚’使用ã™ã‚‹ã»ã†ãŒè³¢æ˜Žã¨ã„ãˆã¾ã™: ```4d If(MethodA) @@ -43,7 +45,7 @@ title: åˆ†å²æ§‹é€  End if ``` -上記ã®çµæžœã¯ã»ã¼åŒã˜ã§ã€*MethodB* ã¯å¿…è¦ãªå ´åˆã«ã®ã¿è©•価ã•れã¾ã™ã€‚ +上記ã®çµæžœã¯ã»ã¼åŒã˜ã§ã€_MethodB_ ã¯å¿…è¦ãªå ´åˆã«ã®ã¿è©•価ã•れã¾ã™ã€‚ ### 例題 @@ -65,7 +67,6 @@ title: åˆ†å²æ§‹é€  statement(s) End if ``` - ã¾ãŸã¯: ```4d @@ -78,7 +79,6 @@ title: åˆ†å²æ§‹é€  ## Case of...Else...End case `Case of...Else...End case` ã«ã‚ˆã‚‹åˆ¶å¾¡ãƒ•ãƒ­ãƒ¼æ§‹é€ ã®æ­£å¼ãªæ§‹æ–‡ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: - ```4d Case of :(Boolean_Expression) @@ -97,7 +97,6 @@ title: åˆ†å²æ§‹é€  ``` `Else` 部分ã¯ã‚ªãƒ—ションã§ã‚りã€çœç•¥ã—ã¦ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¿°ã§ãã¾ã™: - ```4d Case of :(Boolean_Expression) @@ -112,8 +111,7 @@ title: åˆ†å²æ§‹é€  statement(s) End case ``` - -`If...Else...End if` ã¨åŒæ§˜ã«ã€`Case of...Else...End case` 構造も処ç†ã®é¸æŠžè‚¢ã‚’メソッドã«ä¸Žãˆã¾ã™ã€‚ `If...Else...End` ã¨ã®é•ã„ã¯ã€`Case of...Else...End case` 構造ãŒè¤‡æ•°ã®ãƒ–ールå¼ã‚’評価ã—ã€ãã®ä¸­ã‹ã‚‰æœ€åˆã« TRUE ã¨ãªã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã™ã‚‹ã“ã¨ã§ã™ã€‚ +`If...Else...End if` ã¨åŒæ§˜ã«ã€`Case of...Else...End case` 構造も処ç†ã®é¸æŠžè‚¢ã‚’メソッドã«ä¸Žãˆã¾ã™ã€‚ `If...Else...End` ã¨ã®é•ã„ã¯ã€`Case of...Else...End case` 構造ãŒè¤‡æ•°ã®ãƒ–ールå¼ã‚’評価ã—ã€ãã®ä¸­ã‹ã‚‰æœ€åˆã« true ã¨ãªã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã™ã‚‹ã“ã¨ã§ã™ã€‚ ブールå¼ã®å‰ã«ã¯ãれãžã‚Œã‚³ãƒ­ãƒ³ (`:`) を付ã‘ã¾ã™ã€‚ コロンã¨ãƒ–ールå¼ã®çµ„ã¿åˆã‚ã›ã‚’ケースã¨å‘¼ã³ã¾ã™ã€‚ 例ãˆã°ä»¥ä¸‹ã®è¡Œã¯ã‚±ãƒ¼ã‚¹ã§ã™: @@ -121,7 +119,7 @@ title: åˆ†å²æ§‹é€  :(bValidate=1) ``` -最åˆã« TRUE ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã«ç¶šã (次ã®ã‚±ãƒ¼ã‚¹ã¾ã§ã®) ステートメントã ã‘ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ TRUE ã«ãªã‚‹ã‚±ãƒ¼ã‚¹ãŒãªã„å ´åˆã€ã©ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚‚実行ã•れã¾ã›ã‚“ (`Else` æ–‡ãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆ) 。 +最åˆã« true ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã«ç¶šã (次ã®ã‚±ãƒ¼ã‚¹ã¾ã§ã®) ステートメントã ã‘ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ true ã«ãªã‚‹ã‚±ãƒ¼ã‚¹ãŒãªã„å ´åˆã€ã©ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚‚実行ã•れã¾ã›ã‚“ (`Else` æ–‡ãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆ) 。 最後ã®ã‚±ãƒ¼ã‚¹ã®å¾Œã« Else 文をå«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ ã™ã¹ã¦ã®ã‚±ãƒ¼ã‚¹ãŒ FALSE ã®å ´åˆã«ã€`Else` æ–‡ã®å¾Œã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãŒå®Ÿè¡Œã•れã¾ã™ã€‚ @@ -160,16 +158,18 @@ title: åˆ†å²æ§‹é€  End if ``` -`Case of...Else...End case` 構造ã¯ã€æœ€åˆã« TRUE ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã ã‘を実行ã—ã¾ã™ã€‚ 2ã¤ä»¥ä¸Šã®ã‚±ãƒ¼ã‚¹ãŒ TRUE ã®å ´åˆã¯ã€æœ€åˆã« TRUE ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã ã‘を実行ã—ã¾ã™ã€‚ +`Case of...Else...End case` 構造ã¯ã€æœ€åˆã« true ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã ã‘を実行ã—ã¾ã™ã€‚ 2ã¤ä»¥ä¸Šã®ã‚±ãƒ¼ã‚¹ãŒ true ã®å ´åˆã¯ã€æœ€åˆã« true ã«ãªã£ãŸã‚±ãƒ¼ã‚¹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã ã‘を実行ã—ã¾ã™ã€‚ -ã—ãŸãŒã£ã¦ã€éšŽå±¤çš„ãªãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹ã¨ãã«ã¯ã€éšŽå±¤ä¸Šã§ä½Žã„ä½ç½®ã«ã‚ã‚‹æ¡ä»¶ãŒãƒ†ã‚¹ãƒˆé †åºã§å…ˆã«è¨˜è¿°ã•れã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 以下ã®ä¾‹ã§ã¯ã€ã‚±ãƒ¼ã‚¹2㌠TRUE ã®å ´åˆã€ã‚±ãƒ¼ã‚¹1ã‚‚å¿…ãš TRUE ã§ã‚ã‚‹ãŸã‚ã€ã‚±ãƒ¼ã‚¹1ã¯å¾Œã«ä½ç½®ã™ã¹ãã§ã™ã€‚ ã“ã®ã¾ã¾ã®é †åºã§ã¯ã€ã‚±ãƒ¼ã‚¹2ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã‘ã£ã—ã¦å®Ÿè¡Œã•れã¾ã›ã‚“: +ã—ãŸãŒã£ã¦ã€éšŽå±¤çš„ãªãƒ†ã‚¹ãƒˆã‚’実行ã™ã‚‹ã¨ãã«ã¯ã€éšŽå±¤ä¸Šã§ä½Žã„ä½ç½®ã«ã‚ã‚‹æ¡ä»¶ãŒãƒ†ã‚¹ãƒˆé †åºã§å…ˆã«è¨˜è¿°ã•れã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 以下ã®ä¾‹ã§ã¯ã€ã‚±ãƒ¼ã‚¹2㌠true ã®å ´åˆã€ã‚±ãƒ¼ã‚¹1ã‚‚å¿…ãš true ã§ã‚ã‚‹ãŸã‚ã€ã‚±ãƒ¼ã‚¹1ã¯å¾Œã«ä½ç½®ã™ã¹ãã§ã™ã€‚ ã“ã®ã¾ã¾ã®é †åºã§ã¯ã€ã‚±ãƒ¼ã‚¹2ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã‘ã£ã—ã¦å®Ÿè¡Œã•れã¾ã›ã‚“: ```4d Case of :(vResult=1) - ... //statement(s) + ... + // ステートメントãªã© :((vResult=1) & (vCondition#2)) // ã“ã®ã‚±ãƒ¼ã‚¹ãŒåˆ¤å®šã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“ - ... //statement(s) + ... + // ステートメントãªã© End case ``` @@ -178,16 +178,18 @@ vResult = 1ã®åˆ¤å®šã«ã‚ˆã‚Šä»–ã®æ¡ä»¶ã‚’見るå‰ã«åˆ†å²ã™ã‚‹ã®ã§ã€ç¬¬ ```4d Case of :((vResult=1) & (vCondition#2)) // ã“ã®ã‚±ãƒ¼ã‚¹ãŒå…ˆã«åˆ¤å®šã•れã¾ã™ - ... //statement(s) + ... + // ステートメントãªã© :(vResult=1) - ... //statement(s) + ... + +// ステートメントãªã© End case ``` ã•らã«éšŽå±¤çš„ãªãƒ†ã‚¹ãƒˆã‚’実行ã—ãŸã„å ´åˆã€ã‚³ãƒ¼ãƒ‰ã‚‚階層化ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ **Tip:** åˆ†å²æ§‹é€ ã«ãŠã„ã¦ã€ã‚±ãƒ¼ã‚¹ã«ç¶šãステートメントã®è¨˜è¿°ã¯å¿…é ˆã§ã¯ã‚りã¾ã›ã‚“。 下ã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰ã¯ã©ã¡ã‚‰ã‚‚有効ã§ã™: - ```4d Case of :(Boolean_Expression) @@ -202,7 +204,6 @@ vResult = 1ã®åˆ¤å®šã«ã‚ˆã‚Šä»–ã®æ¡ä»¶ã‚’見るå‰ã«åˆ†å²ã™ã‚‹ã®ã§ã€ç¬¬ ``` ã¾ãŸã¯: - ```4d Case of :(Boolean_Expression) @@ -217,10 +218,9 @@ vResult = 1ã®åˆ¤å®šã«ã‚ˆã‚Šä»–ã®æ¡ä»¶ã‚’見るå‰ã«åˆ†å²ã™ã‚‹ã®ã§ã€ç¬¬ ``` ã¾ãŸã¯: - ```4d Case of Else statement(s) End case -``` \ No newline at end of file +``` diff --git a/website/translated_docs/ja/Concepts/cf_looping.md b/website/translated_docs/ja/Concepts/cf_looping.md index 3f32a219574482..1fe0dfe58c4da8 100644 --- a/website/translated_docs/ja/Concepts/cf_looping.md +++ b/website/translated_docs/ja/Concepts/cf_looping.md @@ -3,22 +3,22 @@ id: looping title: ループ構造 --- +ループ構造ã¯ã€æ¡ä»¶ãŒæº€ãŸã•れるã¾ã§ã€ã‚ã‚‹ã„ã¯æŒ‡å®šã—ãŸå›žæ•°ã¾ã§ã€åŒã˜å‡¦ç†ã‚’繰り返ã—ã¾ã™ã€‚ + + ## While...End while `While...End while` ã«ã‚ˆã‚‹åˆ¶å¾¡ãƒ•ãƒ­ãƒ¼æ§‹é€ ã®æ­£å¼ãªæ§‹æ–‡ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: - ```4d While(Boolean_Expression) statement(s) End while ``` +`While...End while` ループã¯ã€ãƒ–ールå¼ãŒ true ã§ã‚ã‚‹é™ã‚Šã€ãƒ«ãƒ¼ãƒ—内ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ç¶šã‘ã¾ã™ã€‚ ループã®å§‹ã‚ã«ãƒ–ールå¼ã‚’評価ã—ã€ãƒ–ールå¼ãŒ FALSE ã®å ´åˆã«ã¯ãƒ«ãƒ¼ãƒ—ã‚’ãŠã“ãªã„ã¾ã›ã‚“。 -`While...End while` ループã¯ã€ãƒ–ールå¼ãŒ TRUE ã§ã‚ã‚‹é™ã‚Šã€ãƒ«ãƒ¼ãƒ—内ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ç¶šã‘ã¾ã™ã€‚ ループã®å§‹ã‚ã«ãƒ–ールå¼ã‚’評価ã—ã€ãƒ–ールå¼ãŒ FALSE ã®å ´åˆã«ã¯ãƒ«ãƒ¼ãƒ—ã‚’ãŠã“ãªã„ã¾ã›ã‚“。 - -一般ã«ã€`While...End while` ループã«å…¥ã‚‹æ‰‹å‰ã§ã€ãƒ–ールå¼ã§åˆ¤å®šã™ã‚‹å€¤ã‚’åˆæœŸåŒ–ã—ã¦ãŠãã¾ã™ã€‚ 通常ã¯ãƒ–ールå¼ãŒ TRUE ã«ãªã‚‹ã‚ˆã†ã«è¨­å®šã—ã¦ã‹ã‚‰ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚Šã¾ã™ã€‚ - -ブールå¼ã¯ã€ãƒ«ãƒ¼ãƒ—内ã®è¦ç´ ã‚’使ã£ã¦è¨­å®šã•れãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã‘れã°ã€ãƒ«ãƒ¼ãƒ—ã¯æ°¸ä¹…ã«ç¶šãã§ã—ょã†ã€‚ 以下ã®ä¾‹ã§ã¯ã€*NeverStop* ãŒã„ã¤ã‚‚ TRUE ã§ã‚ã‚‹ã®ã§ã€ãƒ«ãƒ¼ãƒ—ã¯æ°¸ä¹…ã«ç¶šãã¾ã™ã€‚ +一般ã«ã€`While...End while` ループã«å…¥ã‚‹æ‰‹å‰ã§ã€ãƒ–ールå¼ã§åˆ¤å®šã™ã‚‹å€¤ã‚’åˆæœŸåŒ–ã—ã¦ãŠãã¾ã™ã€‚ 通常ã¯ãƒ–ールå¼ãŒ true ã«ãªã‚‹ã‚ˆã†ã«è¨­å®šã—ã¦ã‹ã‚‰ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚Šã¾ã™ã€‚ +ブールå¼ã¯ã€ãƒ«ãƒ¼ãƒ—内ã®è¦ç´ ã‚’使ã£ã¦è¨­å®šã•れãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã‘れã°ã€ãƒ«ãƒ¼ãƒ—ã¯æ°¸ä¹…ã«ç¶šãã§ã—ょã†ã€‚ 以下ã®ä¾‹ã§ã¯ã€_NeverStop_ ãŒã„ã¤ã‚‚ true ã§ã‚ã‚‹ã®ã§ã€ãƒ«ãƒ¼ãƒ—ã¯æ°¸ä¹…ã«ç¶šãã¾ã™ã€‚ ```4d NeverStop:=True While(NeverStop) @@ -30,7 +30,7 @@ title: ループ構造 ### 例題 ```4d - CONFIRM("æ–°è¦ã«ãƒ¬ã‚³ãƒ¼ãƒ‰è¿½åŠ ã—ã¾ã™ã‹ï¼Ÿ") // ユーザーã«ç¢ºèªã—ã¾ã™ + CONFIRM("æ–°è¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’追加ã—ã¾ã™ã‹ï¼Ÿ") // ユーザーã«ç¢ºèªã—ã¾ã™ While(OK=1) // åˆ©ç”¨è€…ãŒæœ›ã‚€é™ã‚Šãƒ«ãƒ¼ãƒ—ã—ã¾ã™ ADD RECORD([aTable]) // æ–°è¦ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’追加ã—ã¾ã™ End while // ループã¯å¿…ãš End while ã«ã‚ˆã£ã¦çµ‚ã‚りã¾ã™ @@ -41,16 +41,14 @@ title: ループ構造 ## Repeat...Until `Repeat...Until` ã«ã‚ˆã‚‹åˆ¶å¾¡ãƒ•ãƒ­ãƒ¼æ§‹é€ ã®æ­£å¼ãªæ§‹æ–‡ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: - ```4d Repeat statement(s) Until(Boolean_Expression) ``` - `Repeat...Until` ループã¯ã€[While...End while](flow-control#whileend-while) ループã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã¾ãšãƒ«ãƒ¼ãƒ—ã®å¾Œã§ãƒ–ールå¼ã‚’判定ã™ã‚‹ç‚¹ãŒç•°ãªã‚Šã¾ã™ã€‚ ã¤ã¾ã‚Šã€`Repeat...Until` ãƒ«ãƒ¼ãƒ—ã¯æœ€ä½Žã§ã‚‚1回ã¯å¿…ãšãƒ«ãƒ¼ãƒ—を実行ã—ã¾ã™ãŒã€`While...End while` ãƒ«ãƒ¼ãƒ—ã¯æœ€åˆã®ãƒ–ールå¼ãŒ FALSE ã§ã‚ã‚‹å ´åˆã«ã¯ã€ãƒ«ãƒ¼ãƒ—ã‚’1回も実行ã—ã¾ã›ã‚“。 -ã‚‚ã†ä¸€ã¤ã® `While...End while` ループã¨ã®ç›¸é•点ã¯ã€ `Repeat...Until` ã¯ãƒ–ールå¼ãŒ TRUE ã«ãªã‚‹ã¾ã§ãƒ«ãƒ¼ãƒ—を続行ã™ã‚‹ã“ã¨ã§ã™ã€‚ +ã‚‚ã†ä¸€ã¤ã® `While...End while` ループã¨ã®ç›¸é•点ã¯ã€ `Repeat...Until` ã¯ãƒ–ールå¼ãŒ true ã«ãªã‚‹ã¾ã§ãƒ«ãƒ¼ãƒ—を続行ã™ã‚‹ã“ã¨ã§ã™ã€‚ ### 例題 @@ -129,7 +127,7 @@ title: ループ構造 End for ``` -データベースã§ä½œæˆã™ã‚‹å¤§éƒ¨åˆ†ã® `For...End for` ループã¯ã€ä¸Šè¨˜ä¾‹é¡Œã®ã„ãšã‚Œã‹ã®å½¢å¼ã«ãªã‚‹ã§ã—ょã†ã€‚ +プロジェクトã§ä½œæˆã™ã‚‹å¤§éƒ¨åˆ†ã® `For...End for` ループã¯ã€ä¸Šè¨˜ä¾‹é¡Œã®ã„ãšã‚Œã‹ã®å½¢å¼ã«ãªã‚‹ã§ã—ょã†ã€‚ ### ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼å¤‰æ•°ã®æ¸›ç®— @@ -189,10 +187,10 @@ title: ループ構造 End for ``` + ### ãƒ«ãƒ¼ãƒ—æ§‹é€ ã®æ¯”較 `For...End for` ループã®ä¾‹ã‚’ã‚‚ã†ä¸€åº¦è¦‹ã¦ã¿ã¾ã—ょã†ã€‚ 以下ã®ä¾‹ã¯ã€100回ã®ç¹°ã‚Šè¿”ã—ã‚’ãŠã“ãªã„ã¾ã™: - ```4d For(vCounter;1;100) // ãªã‚“らã‹ã®å‡¦ç† @@ -200,7 +198,6 @@ title: ループ構造 ``` `While...End while` ループ㨠`Repeat...Until` ループã§ã€åŒã˜å‡¦ç†ã‚’実行ã™ã‚‹æ–¹æ³•を調ã¹ã¦ã¿ã¾ã—ょã†ã€‚ 以下ã¯ã€åŒã˜å‡¦ç†ã‚’実行ã™ã‚‹ `While...End while` ループã§ã™: - ```4d $i:=1 // カウンターã®åˆæœŸåŒ– While($i<=100) // 100回ã®ãƒ«ãƒ¼ãƒ— @@ -210,7 +207,6 @@ title: ループ構造 ``` åŒã˜ã“ã¨ã‚’ `Repeat...Until` ループã§è¨˜è¿°ã™ã‚‹ã¨ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: - ```4d $i:=1 // カウンターã®åˆæœŸåŒ– Repeat @@ -218,7 +214,6 @@ title: ループ構造 $i:=$i+1 // カウンターã®å¢—分ãŒå¿…è¦ Until($i=100) // 100回ã®ãƒ«ãƒ¼ãƒ— ``` - **Tip:** `For...End for` ループã¯ã€`While...End while` ã‚„ `Repeat...Until` ループよりも高速ã§ã™ã€‚ã“れã¯4DãŒå†…部的ã«ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼å¤‰æ•°ã®ãƒ†ã‚¹ãƒˆãŠã‚ˆã³å¢—加を行ã†ã‹ã‚‰ã§ã™ã€‚ ã—ãŸãŒã£ã¦ã€å¯èƒ½ãªé™ã‚Š `For...End for` ループã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ ### For...End for ãƒ«ãƒ¼ãƒ—ã®æœ€é©åŒ– @@ -298,32 +293,30 @@ title: ループ構造 | Current_Item ã®åž‹ | コレクションè¦ç´ ã¨åŒã˜åž‹ã®å¤‰æ•° | エンティティ | テキスト変数 | | Expression ã®åž‹ | (åŒã˜åž‹ã®è¦ç´ ã‚’æŒã¤) コレクション | エンティティセレクション | オブジェクト | | ループ数 (デフォルト) | コレクションã®è¦ç´ æ•° | セレクション内ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£æ•° | オブジェクトã®ãƒ—ロパティ数 | -| begin / end パラメーターã®ã‚µãƒãƒ¼ãƒˆ | â—¯ | â—¯ | × | - +| begin / end パラメーターをサãƒãƒ¼ãƒˆ | â—¯ | â—¯ | × | - ãƒ«ãƒ¼ãƒ—ã®æ•°ã¯é–‹å§‹æ™‚ã«è©•価ã•れã€å‡¦ç†ä¸­ã«å¤‰åŒ–ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 ループ中ã«é …目を追加・削除ã™ã‚‹ã“ã¨ã¯ã€ç¹°ã‚Šè¿”ã—ã®ä¸è¶³ãƒ»é‡è¤‡ã‚’引ãèµ·ã“ã™ã“ã¨ãŒã‚ã‚‹ãŸã‚ã€ä¸€èˆ¬çš„ã«ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 -- デフォルトã§ã¯ã€å†…部㮠*statement(s)* 部ã®å‡¦ç†ã¯ã€*Expression* ã®å„é …ç›®ã«å¯¾ã—ã¦å®Ÿè¡Œã•れã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ãƒ«ãƒ¼ãƒ—ã®å…ˆé ­ (`While`) ã‚ã‚‹ã„ã¯ãƒ«ãƒ¼ãƒ—ã®çµ‚ã‚り (`Until`) ã§æ¡ä»¶ã‚’テストã™ã‚‹ã“ã¨ã§ã€ãƒ«ãƒ¼ãƒ—を抜ã‘出ã™ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ +- デフォルトã§ã¯ã€å†…部㮠_statement(s)_ 部ã®å‡¦ç†ã¯ã€*Expression* ã®å„é …ç›®ã«å¯¾ã—ã¦å®Ÿè¡Œã•れã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ãƒ«ãƒ¼ãƒ—ã®å…ˆé ­ (`While`) ã‚ã‚‹ã„ã¯ãƒ«ãƒ¼ãƒ—ã®çµ‚ã‚り (`Until`) ã§æ¡ä»¶ã‚’テストã™ã‚‹ã“ã¨ã§ã€ãƒ«ãƒ¼ãƒ—を抜ã‘出ã™ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ - ä»»æ„ã® *begin* ãŠã‚ˆã³ *end* パラメーターを指定ã™ã‚‹ã“ã¨ã§ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŠã‚ˆã³ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ãƒ«ãƒ¼ãƒ—ã®ç¯„囲を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- `For each...End for each` ループ㯠**共有コレクション** ã‚„ **共有オブジェクト** ã«å¯¾ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ コレクションã®è¦ç´ ã¾ãŸã¯ã‚ªãƒ–ジェクトã®ãƒ—ロパティを変更ã™ã‚‹å ´åˆã¯ã€`Use...End use` 構文も追加ã§å¿…è¦ã§ã™ã€‚ `Use...End use` æ§‹æ–‡ã®ä½¿ã„æ–¹ã¯ã€ã¤ãŽã®ã‚ˆã†ã«çжæ³ã«å¿œã˜ã¦ç•°ãªã‚Šã¾ã™: +- `For each...End for each` ループ㯠**共有コレクション** ã‚„ **共有オブジェクト** ã«å¯¾ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ コレクションã®è¦ç´ ã¾ãŸã¯ã‚ªãƒ–ジェクトã®ãƒ—ロパティを変更ã™ã‚‹å ´åˆã¯ã€`Use...End use` 構文も追加ã§å¿…è¦ã§ã™ã€‚ `Use...End use` æ§‹æ–‡ã®ä½¿ã„æ–¹ã¯ã€ã¤ãŽã®ã‚ˆã†ã«çжæ³ã«å¿œã˜ã¦ç•°ãªã‚Šã¾ã™: - æ•´åˆæ€§ã®ãŸã‚è¦ç´ ã‚„プロパティを一括ã§å‡¦ç†ã—ãªãã¦ã¯ãªã‚‰ãªã„å ´åˆã«ã¯ã€ãƒ«ãƒ¼ãƒ—ã«å…¥ã‚‹å‰ (外å´) ã«ä½¿ã„ã¾ã™ã€‚ - - è¦ç´ ã‚„プロパティを個々ã«å¤‰æ›´ã—ã¦å·®ã—支ãˆãªã„å ´åˆã¯ã€ãƒ«ãƒ¼ãƒ—ã®ä¸­ã§ä½¿ã„ã¾ã™ã€‚ + - è¦ç´ ã‚„プロパティを個々ã«å¤‰æ›´ã—ã¦å·®ã—支ãˆãªã„å ´åˆã¯ã€ãƒ«ãƒ¼ãƒ—ã®ä¸­ã§ä½¿ã„ã¾ã™ã€‚ ### コレクション内ã®ãƒ«ãƒ¼ãƒ— -`For each...End for each` ㌠*Collection* 型㮠*Expression* ã«å¯¾ã—ã¦ä½¿ç”¨ã•れãŸå ´åˆã€*Current_Item* ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã¨åŒã˜åž‹ã®å¤‰æ•°ã§ã™ã€‚ デフォルトã§ã¯ã€ãƒ«ãƒ¼ãƒ—ã®å›žæ•°ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ æ•°ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +`For each...End for each` ㌠_Collection_ 型㮠_Expression_ ã«å¯¾ã—ã¦ä½¿ç”¨ã•れãŸå ´åˆã€_Current_Item_ ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã¨åŒã˜åž‹ã®å¤‰æ•°ã§ã™ã€‚ デフォルトã§ã¯ã€ãƒ«ãƒ¼ãƒ—ã®å›žæ•°ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ æ•°ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ -コレクションã®è¦ç´ ã¯ã™ã¹ã¦åŒã˜åž‹ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã«ã¯ã€*Current_Item* 変数ã«åˆ¥ã®åž‹ã®å€¤ãŒä»£å…¥ã•れãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +コレクションã®è¦ç´ ã¯ã™ã¹ã¦åŒã˜åž‹ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã«ã¯ã€_Current_Item_ 変数ã«åˆ¥ã®åž‹ã®å€¤ãŒä»£å…¥ã•れãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ -å„ループã®ç¹°ã‚Šè¿”ã—ã«ãŠã„ã¦ã€*Current_Item* 変数ã«ã¯ã€åˆè‡´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ãŒè‡ªå‹•çš„ã«ä»£å…¥ã•れã¾ã™ã€‚ ã“ã®ã¨ãã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: +å„ループã®ç¹°ã‚Šè¿”ã—ã«ãŠã„ã¦ã€_Current_Item_ 変数ã«ã¯ã€åˆè‡´ã™ã‚‹ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ãŒè‡ªå‹•çš„ã«ä»£å…¥ã•れã¾ã™ã€‚ ã“ã®ã¨ãã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: -- *Current_Item* 変数ãŒã‚ªãƒ–ジェクト型ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã§ã‚ã£ãŸå ´åˆ (ã¤ã¾ã‚Š *Expression* ãŒã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆ)ã€ã“ã®å¤‰æ•°ã‚’変更ã™ã‚‹ã¨è‡ªå‹•çš„ã«ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å¯¾å¿œã™ã‚‹è¦ç´ ã‚‚変更ã•れã¾ã™ (オブジェクトã¨ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯åŒã˜å‚照を共有ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™)。 変数ãŒã‚¹ã‚«ãƒ©ãƒ¼åž‹ã§ã‚ã‚‹å ´åˆã€å¤‰æ•°ã®ã¿ãŒå¤‰æ›´ã•れã¾ã™ã€‚ -- *Current_Item* 変数ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®åž‹ã¨åˆè‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ コレクションè¦ç´ ã®ã©ã‚Œã‹ä¸€ã¤ã§ã‚‚ã€å¤‰æ•°ã¨ç•°ãªã‚‹åž‹ã®ã‚‚ã®ãŒã‚ã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã€ãƒ«ãƒ¼ãƒ—ã¯åœæ­¢ã—ã¾ã™ã€‚ -- コレクション㌠**Null** 値ã®è¦ç´ ã‚’æ ¼ç´ã—ã¦ã„ãŸã¨ãã€*Current_Item* 変数ã®åž‹ãŒ **Null** 値をサãƒãƒ¼ãƒˆã—ãªã„åž‹ (å€é•·æ•´æ•°å¤‰æ•°ãªã©) ã§ã‚ã£ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +- _Current_Item_ 変数ãŒã‚ªãƒ–ジェクト型ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã§ã‚ã£ãŸå ´åˆ (ã¤ã¾ã‚Š _Expression_ ãŒã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆ)ã€ã“ã®å¤‰æ•°ã‚’変更ã™ã‚‹ã¨è‡ªå‹•çš„ã«ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å¯¾å¿œã™ã‚‹è¦ç´ ã‚‚変更ã•れã¾ã™ (オブジェクトã¨ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯åŒã˜å‚照を共有ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™)。 変数ãŒã‚¹ã‚«ãƒ©ãƒ¼åž‹ã§ã‚ã‚‹å ´åˆã€å¤‰æ•°ã®ã¿ãŒå¤‰æ›´ã•れã¾ã™ã€‚ +- _Current_Item_ 変数ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®åž‹ã¨åˆè‡´ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ コレクションè¦ç´ ã®ã©ã‚Œã‹ä¸€ã¤ã§ã‚‚ã€å¤‰æ•°ã¨ç•°ãªã‚‹åž‹ã®ã‚‚ã®ãŒã‚ã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã€ãƒ«ãƒ¼ãƒ—ã¯åœæ­¢ã—ã¾ã™ã€‚ +- コレクション㌠**Null** 値ã®è¦ç´ ã‚’æ ¼ç´ã—ã¦ã„ãŸã¨ãã€_Current_Item_ 変数ã®åž‹ãŒ **Null** 値をサãƒãƒ¼ãƒˆã—ãªã„åž‹ (å€é•·æ•´æ•°å¤‰æ•°ãªã©) ã§ã‚ã£ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ #### 例題 数値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’対象ã«ã€çµ±è¨ˆæƒ…報を計算ã—ã¾ã™: - ```4d C_COLLECTION($nums) $nums:=New collection(10;5001;6665;33;1;42;7850) @@ -347,7 +340,7 @@ title: ループ構造 ### エンティティセレクション内ã®ãƒ«ãƒ¼ãƒ— -`For each...End for each` ㌠*Entity selection* 型㮠*Expression* ã«å¯¾ã—ã¦ä½¿ç”¨ã•れãŸå ´åˆã€*Current_Item* ã¯ç¾åœ¨å‡¦ç†ä¸­ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ã€‚ +`For each...End for each` ㌠_Entity selection_ 型㮠_Expression_ ã«å¯¾ã—ã¦ä½¿ç”¨ã•れãŸå ´åˆã€_Current_Item_ ã¯ç¾åœ¨å‡¦ç†ä¸­ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™ã€‚ ループã®å›žæ•°ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ•°ã«åŸºã¥ãã¾ã™ã€‚ å„ループã®ç¹°ã‚Šè¿”ã—ã«ãŠã„ã¦ã€*Current_Item* ã«ã¯ã€å‡¦ç†ã®å¯¾è±¡ã§ã‚るエンティティセレクション内ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒè‡ªå‹•çš„ã«ä»£å…¥ã•れã¾ã™ã€‚ @@ -358,7 +351,6 @@ title: ループ構造 #### 例題 Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã上ã’ã¾ã™: - ```4d C_OBJECT(emp) For each(emp;ds.Employees.query("country='UK'")) @@ -376,7 +368,6 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã #### 例題 下ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ ¼ç´ã•れã¦ã„ã‚‹åå‰ã«é–¢ã—ãŸãƒ—ロパティã®å€¤ã‚’ã™ã¹ã¦å¤§æ–‡å­—ã«å¤‰ãˆã¾ã™: - ```4d { "firstname": "gregory", @@ -384,9 +375,7 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã "age": 20 } ``` - 以下ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: - ```4d For each(property;vObject) If(Value type(vObject[property])=Is text) @@ -394,14 +383,13 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã End if End for each ``` - - { - "firstname": "GREGORY", - "lastname": "BADIKORA", - "age": 20 - } - - +``` +{ + "firstname": "GREGORY", + "lastname": "BADIKORA", + "age": 20 +} +``` ### begin / end パラメーター ä»»æ„ã® begin 㨠end パラメーターを指定ã™ã‚‹ã“ã¨ã§ã€ç¹°ã‚Šè¿”ã—ã®ç¯„囲を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -409,15 +397,14 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã **注:** *begin* 㨠*end* パラメーターã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŠã‚ˆã³ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã«å¯¾ã™ã‚‹ãƒ«ãƒ¼ãƒ—ã«ãŠã„ã¦ã®ã¿ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (オブジェクト型ã®ã¨ãã¯ç„¡è¦–ã•れã¾ã™)。 - *begin* ã«ã¯ã€*Expression* ã«ãŠã„ã¦ãƒ«ãƒ¼ãƒ—ã‚’é–‹å§‹ã—ãŸã„è¦ç´ ä½ç½®ã‚’渡ã—ã¾ã™ (ã“ã®ã¨ã *begin* ã®å€¤ãŒæŒ‡ã™è¦ç´ ã¯ãƒ«ãƒ¼ãƒ—ã«å«ã¾ã‚Œã¾ã™)。 -- *end* ã«ã¯ã€*Expression* ã«ãŠã„ã¦ãƒ«ãƒ¼ãƒ—を終了ã™ã‚‹è¦ç´ ä½ç½®ã‚’渡ã—ã¾ã™ (ã“ã®ã¨ã *end* ã®å€¤ãŒæŒ‡ã™è¦ç´ ã¯ãƒ«ãƒ¼ãƒ—ã«å«ã¾ã‚Œã¾ã›ã‚“)。 +- *end* ã«ã¯ã€*Expression* ã«ãŠã„ã¦ãƒ«ãƒ¼ãƒ—を終了ã™ã‚‹è¦ç´ ä½ç½®ã‚’渡ã—ã¾ã™ (ã“ã®ã¨ã *end* ã®å€¤ãŒæŒ‡ã™è¦ç´ ã¯ãƒ«ãƒ¼ãƒ—ã«å«ã¾ã‚Œã¾ã›ã‚“)。 *end* ãŒçœç•¥ã•れã¦ã„ã‚‹ã€ã‚ã‚‹ã„㯠*end* ㌠*Expression* ã®è¦ç´ æ•°ã‚ˆã‚Šå¤§ãã„å ´åˆã€*begin* 引数ã®ä½ç½®ã‹ã‚‰æœ€å¾Œã®è¦ç´ ã¾ã§ (å«ã¾ã‚Œã‚‹) をループã—ã¾ã™ã€‚ *begin* 㨠*end* ãŒæ­£ã®å€¤ã®å ´åˆã€ãれら㯠*Expression* 内ã®è¦ç´ ã®å®Ÿéš›ã®ä½ç½®ã‚’表ã—ã¾ã™ã€‚ *begin* 引数ãŒè² ã®å€¤ã®å ´åˆã€ãれ㯠`begin:=begin+Expression ã®ã‚µã‚¤ã‚º` ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ (ã¤ã¾ã‚Šã€*Expression* ã®çµ‚端ã‹ã‚‰ã®ã‚ªãƒ•セットã§ã‚ã‚‹ã¨ã¿ãªã•れã¾ã™)。 å†è¨ˆç®—ã•れãŸå€¤ã‚‚è² ã®å€¤ã ã£ãŸå ´åˆã€*begin* ã¯0ã«è¨­å®šã•れã¾ã™ã€‚ **注:** *begin* ãŒè² ã®å€¤ã ã£ãŸã¨ã—ã¦ã‚‚ã€ç¹°ã‚Šè¿”ã—ãã®ã‚‚ã®ã¯æ¨™æº–ã®é †ç•ªã§å®Ÿè¡Œã•れã¾ã™ã€‚ *end* ãŒè² ã®å€¤ã ã£ãŸå ´åˆã€ãれ㯠`end:=end+Expression ã®ã‚µã‚¤ã‚º` ã¨ã—ã¦å†è¨ˆç®—ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: - - コレクションã«ã¯ 10ã®è¦ç´ ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ (ナンãƒãƒªãƒ³ã‚°ã¯ #0ã‹ã‚‰#9) - begin=-4 -> begin=-4+10=6 -> ループã¯6番目ã®è¦ç´  (#5) ã‹ã‚‰é–‹å§‹ã•れã¾ã™ -- end=-2 -> end=-2+10=8 -> 繰り返ã—ã¯8番目ã®è¦ç´  (#7) ã®å‰ã«çµ‚了ã—ã¾ã™ã€ã¤ã¾ã‚Š7番目 (#6) ã®è¦ç´ ã®å‡¦ç†ãŒæœ€å¾Œã®ãƒ«ãƒ¼ãƒ—ã¨ãªã‚Šã¾ã™ã€‚ +- end=-2 -> end=-2+10=8 -> 繰り返ã—ã¯8番目ã®è¦ç´  (#7) ã®å‰ã«çµ‚了ã—ã¾ã™ã€ã¤ã¾ã‚Š7番目 (#6) ã®è¦ç´ ã®å‡¦ç†ãŒæœ€å¾Œã®ãƒ«ãƒ¼ãƒ—ã¨ãªã‚Šã¾ã™ã€‚ #### 例題 @@ -438,7 +425,7 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã ### Until 㨠While æ¡ä»¶ -`For each...End for each` ã®å®Ÿè¡Œã¯ã€`Until` ã‚ã‚‹ã„㯠`While` æ¡ä»¶ã‚’追加ã™ã‚‹ã“ã¨ã§ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `Until(condition)` æ¡ä»¶ãŒãƒ«ãƒ¼ãƒ—ã«çµ„ã¿è¾¼ã¾ã‚ŒãŸå ´åˆã€condition ã®å¼ãŒ TRUE ã«è©•価ã•れるã¨ãƒ«ãƒ¼ãƒ—ã¯åœæ­¢ã—ã¾ã™ã€‚`While(condition)` æ¡ä»¶ã®å ´åˆã¯é€†ã«ã€condition ã®å¼ãŒ FALSE ã«ãªã‚‹ã¨ãƒ«ãƒ¼ãƒ—ãŒåœæ­¢ã—ã¾ã™ã€‚ +`For each...End for each` ã®å®Ÿè¡Œã¯ã€`Until` ã‚ã‚‹ã„㯠`While` æ¡ä»¶ã‚’追加ã™ã‚‹ã“ã¨ã§ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `Until(condition)` æ¡ä»¶ãŒãƒ«ãƒ¼ãƒ—ã«çµ„ã¿è¾¼ã¾ã‚ŒãŸå ´åˆã€condition ã®å¼ãŒ true ã«è©•価ã•れるã¨ãƒ«ãƒ¼ãƒ—ã¯åœæ­¢ã—ã¾ã™ã€‚`While(condition)` æ¡ä»¶ã®å ´åˆã¯é€†ã«ã€condition ã®å¼ãŒ false ã«ãªã‚‹ã¨ãƒ«ãƒ¼ãƒ—ãŒåœæ­¢ã—ã¾ã™ã€‚ 使用ã™ã‚‹æ¡ä»¶ã¯çжæ³ã«å¿œã˜ã¦é¸ã¹ã¾ã™: @@ -461,4 +448,5 @@ Employees データクラスã®ä¸­ã‹ã‚‰ã€è‹±å›½ã®å¾“業員ã®çµ¦ä¸Žã‚’引ã $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/ja/Concepts/classes.md b/website/translated_docs/ja/Concepts/classes.md index 1c4aea0c8de5f2..9003a88667f416 100644 --- a/website/translated_docs/ja/Concepts/classes.md +++ b/website/translated_docs/ja/Concepts/classes.md @@ -8,469 +8,730 @@ title: クラス 4D ランゲージã§ã¯ **クラス** ã®æ¦‚念ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ プログラミング言語ã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚’利用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€å±žæ€§ã‚„メソッドãªã©ã‚’æŒã¤ç‰¹å®šã®ã‚ªãƒ–ジェクト種を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -クラスãŒå®šç¾©ã•れã¦ã„れã°ã€ãã®ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトをコード内㧠**インスタンス化** ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å„オブジェクトã¯ã€ãれ自身ãŒå±žã™ã‚‹ã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ クラスã¯ã€åˆ¥ã®ã‚¯ãƒ©ã‚¹ã‚’継承ã™ã‚‹ã“ã¨ã§ã€ãã‚Œã‚‰ã®æ©Ÿèƒ½ã‚’å—ã‘ç¶™ãã“ã¨ãŒã§ãã¾ã™ã€‚ +ユーザークラスãŒå®šç¾©ã•れã¦ã„れã°ã€ãã®ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトをコード内㧠**インスタンス化** ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å„オブジェクトã¯ã€ãれ自身ãŒå±žã™ã‚‹ã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ A class can [`extend`](#class-extends-classname) another class, and then inherits from its [functions](#function) and properties ([static](#class-constructor) and [computed](#function-get-and-function-set)). -4D ã«ãŠã‘るクラスモデル㯠JavaScript ã®ã‚¯ãƒ©ã‚¹ã«é¡žä¼¼ã—ã¦ãŠã‚Šã€ãƒ—ロトタイプãƒã‚§ãƒ¼ãƒ³ã«åŸºã¥ãã¾ã™ã€‚ +> 4D ã«ãŠã‘るクラスモデル㯠JavaScript ã®ã‚¯ãƒ©ã‚¹ã«é¡žä¼¼ã—ã¦ãŠã‚Šã€ãƒ—ロトタイプãƒã‚§ãƒ¼ãƒ³ã«åŸºã¥ãã¾ã™ã€‚ -### Class オブジェクト +ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ã« `Person` クラスを定義ã—ãŸå ´åˆ: -クラスã¨ã¯ã€ãれ自身㌠"Class" クラスã®ã‚ªãƒ–ジェクトã§ã™ã€‚ Class ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®ãƒ—ロパティやメソッドをæŒã¡ã¾ã™: +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -- `name`: ECMAScript ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ -- `superclass` オブジェクト (ä»»æ„。無ã‘れ㰠null) -- `new()` メソッド: Class オブジェクトをインスタンス化ã—ã¾ã™ +Function get fullName() -> $fullName : text + $fullName:=This.firstName+" "+This.lastName -ã•らã«ã€Class ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã‚’å‚ç…§ã§ãã¾ã™: +Function sayHello()->$welcome : Text + $welcome:="Hello "+This.fullName +``` -- `constructor` オブジェクト (ä»»æ„) -- `prototype` オブジェクト: åå‰ä»˜ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚ªãƒ–ジェクトを格ç´ã—ã¾ã™ (ä»»æ„) +ã“ã® "Person" ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’メソッド内ã§ä½œæˆã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: -Class オブジェクトã¯å…±æœ‰ã‚ªãƒ–ジェクトã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ç•°ãªã‚‹ 4D プロセスã‹ã‚‰åŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +``` +var $person : cs.Person //object of Person class +var $hello : Text +$person:=cs.Person.new("John";"Doe") +// $person:{firstName: "John"; lastName: "Doe"; fullName: "John Doe"} +$hello:=$person.sayHello() //"Hello John Doe" +``` -### プロパティ検索ã¨ãƒ—ロトタイプ -4D ã®ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã¯ã€ãªã‚“らã‹ã®ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトã«å†…部的ã«ãƒªãƒ³ã‚¯ã—ã¦ã„ã¾ã™ã€‚ オブジェクト内ã«ã‚るプロパティãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ãã®ã‚¯ãƒ©ã‚¹ã®ãƒ—ロトタイプオブジェクト内を検索ã—ã¾ã™ã€‚見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ãã®ã‚¯ãƒ©ã‚¹ã®ã‚¹ãƒ¼ãƒ‘ークラスã®ãƒ—ロトタイプオブジェクト内を探ã—ã¾ã™ã€‚ã“れã¯ã€ã‚¹ãƒ¼ãƒ‘ークラスãŒå­˜åœ¨ã—ãªããªã‚‹ã¾ã§ç¶šãã¾ã™ã€‚ -ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã¯ã€ç¶™æ‰¿ãƒ„リーã®é ‚点ã§ã‚ã‚‹ "Object" クラスを継承ã—ã¾ã™ã€‚ +## クラスã®ç®¡ç† -```4d - // クラス: Polygon -Class constructor -C_LONGINT($1;$2) -This.area:=$1*$2 +### クラス定義 - //C_OBJECT($poly) -C_BOOLEAN($instance) -$poly:=cs.Polygon.new(4;3) +4D ã«ãŠã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã¨ã¯ã€`/Project/Sources/Classes/` フォルダーã«ä¿å­˜ã•れãŸå°‚用ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ァイル (.4dm) ã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ ファイルåãŒã‚¯ãƒ©ã‚¹åã«ãªã‚Šã¾ã™ã€‚ -$instance:=OB Instance of($poly;cs.Polygon) - // true -$instance:=OB Instance of($poly;4D.Object) - // true -``` +クラスを命åã™ã‚‹éš›ã«ã¯ã€æ¬¡ã®ãƒ«ãƒ¼ãƒ«ã«ç•™æ„ã—ã¦ãã ã•ã„: -オブジェクトã®ãƒ—ロパティを列挙ã™ã‚‹éš›ã«ã¯ã€å½“該クラスã®ãƒ—ロトタイプã¯åˆ—挙ã•れã¾ã›ã‚“。 ã—ãŸãŒã£ã¦ã€`For each` ステートメントや `JSON Stringify` コマンドã¯ã€ã‚¯ãƒ©ã‚¹ãƒ—ロトタイプオブジェクトã®ãƒ—ロパティを返ã—ã¾ã›ã‚“。 クラスã®ãƒ—ロトタイプオブジェクトプロパティã¯ã€å†…部的ãªéš ã‚Œãƒ—ロパティã§ã™ã€‚ +- [クラスå](identifiers.md#クラス) 㯠[プロパティåã®å‘½åè¦å‰‡](identifiers.md#オブジェクトプロパティ) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- クラスåã®å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ +- ç«¶åˆé˜²æ­¢ã®ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜åå‰ã®ã‚¯ãƒ©ã‚¹ã‚’作æˆã™ã‚‹ã®ã¯æŽ¨å¥¨ã•れãªã„ã“㨠-### クラス定義 +ãŸã¨ãˆã°ã€"Polygon" ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚’定義ã™ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ•ァイルを作æˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: -ユーザークラスファイルã¯ã€ã‚ªãƒ–ジェクトã®ã²ãªå½¢ã‚’定義ã—ã¾ã™ã€‚`new()` クラスメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã“ã¨ã§ã€ã“ã®ã²ãªå½¢ã«åŸºã¥ã„ãŸã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ クラスファイル内ã§ã¯ã€å°‚用㮠[クラスキーワード](#クラスキーワード) ã‚„ [クラスコマンド](#クラスコマンド) を使用ã—ã¾ã™ã€‚ +- Project フォルダー + + Project + * Sources + - クラス + + Polygon.4dm -ãŸã¨ãˆã°: +### クラスã®å‰Šé™¤ -```4d -// クラス: Person.4dm -Class constructor - C_TEXT($1) // åå‰ - C_TEXT($2) // åå­— - This.firstName:=$1 - This.lastName:=$2 -``` +既存ã®ã‚¯ãƒ©ã‚¹ã‚’削除ã™ã‚‹ã«ã¯: -メソッド内㧠"Person" ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã—ã¾ã™: +- ディスク上㧠"Classes" フォルダーより .4dm クラスファイルを削除ã—ã¾ã™ã€‚ +- 4D エクスプローラーã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚’é¸æŠžã—ãŸçŠ¶æ…‹ã§ ![](assets/en/Users/MinussNew.png) をクリックã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ˆã‚Š **移動 > ゴミ箱** ã‚’é¸æŠžã—ã¾ã™ã€‚ - C_OBJECT($o) - $o:=cs.Person.new("John";"Doe") - // $o: {firstName: "John";lastName: "Doe" } - -空ã®ã‚¯ãƒ©ã‚¹ãƒ•ァイルを作æˆã—ã€ç©ºã®ã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã® `Empty.4dm` クラスファイルを作æˆã—ã¾ã™: +### 4D インターフェースã®ä½¿ç”¨ -```4d -// Empty.4dm クラスファイル -// 空ã§ã™ -``` +**ファイル** メニューã¾ãŸã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーãªã©ã€4D インターフェースを介ã—ã¦ã‚¯ãƒ©ã‚¹ã‚’作æˆã—ãŸå ´åˆã«ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ•ァイルã¯è‡ªå‹•çš„ã«é©åˆ‡ãªå ´æ‰€ã«ä¿å­˜ã•れã¾ã™ã€‚ -メソッドã§ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: +#### ファイルメニューã¨ãƒ„ールãƒãƒ¼ -```4d -$o:=cs.Empty.new() -// $o : {} -$cName:=OB Class($o).name // "Empty" -``` +4D 開発㮠**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‚ˆã‚Š **æ–°è¦ > クラス...** ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ã€é–‹ã„ã¦ã„るプロジェクトã«ã‚¯ãƒ©ã‚¹ãƒ•ァイルを新è¦ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**Ctrl+Shift+Alt+k** ショートカットも使用ã§ãã¾ã™ã€‚ + +#### エクスプローラー + +エクスプローラー㮠**メソッド** ページã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ã¯ **クラス** カテゴリã«åˆ†é¡žã•れã¦ã„ã¾ã™ã€‚ + +クラスを新è¦ä½œæˆã™ã‚‹ã«ã¯æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- **クラス** ã‚«ãƒ†ã‚´ãƒªã‚’é¸æŠžã—ã€![](assets/en/Users/PlussNew.png) ボタンをクリックã—ã¾ã™ã€‚ +- エクスプローラーウィンドウã®ä¸‹éƒ¨ã«ã‚るアクションメニューã€ã¾ãŸã¯ã‚¯ãƒ©ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **æ–°è¦ã‚¯ãƒ©ã‚¹...** ã‚’é¸æŠžã—ã¾ã™ã€‚ ![](assets/en/Concepts/newClass.png) +- エクスプローラーã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ˆã‚Š **æ–°è¦ > クラス...** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +#### クラスã®ã‚³ãƒ¼ãƒ‰ã‚µãƒãƒ¼ãƒˆ + +å„種 4Dウィンドウ (コードエディターã€ã‚³ãƒ³ãƒ‘イラーã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラー) ã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ã‚³ãƒ¼ãƒ‰ã¯ "特殊ãªãƒ—ロジェクトメソッド" ã®ã‚ˆã†ã«æ‰±ã‚れã¾ã™: + +- コードエディター: + - クラスã¯å®Ÿè¡Œã§ãã¾ã›ã‚“ + - クラスメソッドã¯ã‚³ãƒ¼ãƒ‰ã®ãƒ–ロックã§ã™ + - オブジェクトメンãƒãƒ¼ã«å¯¾ã™ã‚‹ **定義ã«ç§»å‹•** æ“作ã¯ã‚¯ãƒ©ã‚¹ã® Function 宣言を探ã—ã¾ã™ã€‚例: "$o.f()" ã®å ´åˆã€"Function f" を見ã¤ã‘ã¾ã™ã€‚ + - クラスã®ãƒ¡ã‚½ãƒƒãƒ‰å®£è¨€ã«å¯¾ã™ã‚‹ **å‚照箇所を検索** æ“作ã¯ã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚ªãƒ–ジェクトメンãƒãƒ¼ã¨ã—ã¦ä½¿ã‚れã¦ã„る箇所を探ã—ã¾ã™ã€‚例: "Function f" ã®å ´åˆ "$o.f()" を見ã¤ã‘ã¾ã™ã€‚ +- ランタイムエクスプローラーãŠã‚ˆã³ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¯ \ コンストラクターã¾ãŸã¯ \.\ å½¢å¼ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ## クラスストア -利用å¯èƒ½ãªã‚¯ãƒ©ã‚¹ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢ã‚ˆã‚Šã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ クラスストアã«ã¯æ¬¡ã®ã‚‚ã®ãŒå­˜åœ¨ã—ã¾ã™: +定義ã•れãŸã‚¯ãƒ©ã‚¹ã«ã¯ã€ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢ã‚ˆã‚Šã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ クラスストアã«ã¯æ¬¡ã®äºŒã¤ãŒå­˜åœ¨ã—ã¾ã™: -- ビルトイン 4Dクラス専用ã®ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢: `4D` コマンドã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ -- é–‹ã‹ã‚Œã¦ã„ã‚‹å„データベースãŠã‚ˆã³ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢: `cs` コマンドã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ "ユーザークラス" ã¨ã‚‚ã„ã„ã¾ã™ã€‚ +- `cs` - ユーザークラスストア +- `4D` - ビルトインクラスストア -ãŸã¨ãˆã°ã€`cs.myClass.new()` ステートメント (`cs` 㯠*クラスストア (classstore)* ã‚’æ„味ã—ã¾ã™) を使ã£ã¦ myClass ã®ã‚ªãƒ–ジェクトインスタンスを新è¦ä½œæˆã§ãã¾ã™ã€‚ -## ユーザークラス -### クラスファイル +### `cs` -4D ã«ãŠã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã¨ã¯ã€`/Project/Sources/Classes/` フォルダーã«ä¿å­˜ã•れãŸå°‚用ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ァイル (.4dm) ã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ ファイルåãŒã‚¯ãƒ©ã‚¹åã«ãªã‚Šã¾ã™ã€‚ +#### cs -> classStore -ãŸã¨ãˆã°ã€"Polygon" ã¨ã„ã†åå‰ã®ã‚¯ãƒ©ã‚¹ã‚’定義ã™ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ•ァイルを作æˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: +| 引数 | タイプ | | 説明 | +| ---------- | ------ | -- | --------------------------- | +| classStore | object | <- | プロジェクトã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢ | -- データベースフォルダー - + Project - * Sources - - クラス - + Polygon.4dm +`cs` コマンドã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロジェクトã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢ã‚’è¿”ã—ã¾ã™ã€‚ ã“れã«ã¯ã€ãƒ—ロジェクトã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ã¦ [定義](#クラス定義) ã•れã¦ã„ã‚‹ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ãŒå«ã¾ã‚Œã¾ã™ã€‚ デフォルトã§ã¯ã€ [ORDAクラス](ORDA/ordaClasses.md) ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ -### クラスå +#### 例題 -クラスを命åã™ã‚‹éš›ã«ã¯ã€æ¬¡ã®ãƒ«ãƒ¼ãƒ«ã«ç•™æ„ã—ã¦ãã ã•ã„: +`myClass` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–°è¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: -- ECMAScript ã«æº–æ‹ ã—ãŸåå‰ã§ã‚ã‚‹ã“㨠-- 大文字ã¨å°æ–‡å­—ãŒåŒºåˆ¥ã•れるã“㨠-- ç«¶åˆé˜²æ­¢ã®ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルã¨åŒã˜åå‰ã®ã‚¯ãƒ©ã‚¹ã‚’作æˆã™ã‚‹ã®ã¯æŽ¨å¥¨ã•れãªã„ã“㨠+```4d +$instance:=cs.myClass.new() +``` -### 4D 開発インターフェース +### `4D` -**ファイル** メニューã¾ãŸã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーãªã©ã€4D 開発インターフェースを介ã—ã¦ã‚¯ãƒ©ã‚¹ã‚’作æˆã—ãŸå ´åˆã«ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ•ァイルã¯è‡ªå‹•çš„ã«é©åˆ‡ãªå ´æ‰€ã«ä¿å­˜ã•れã¾ã™ã€‚ +#### 4D -> classStore -#### ファイルメニューã¨ãƒ„ールãƒãƒ¼ +| 引数 | タイプ | | 説明 | +| ---------- | ------ | -- | -------- | +| classStore | object | <- | 4Dクラスストア | -4D 開発㮠**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‚ˆã‚Š **æ–°è¦ > クラス...** ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ã€é–‹ã„ã¦ã„るプロジェクトã®ã‚¯ãƒ©ã‚¹ãƒ•ァイルを新è¦ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +`4D` コマンドã¯ã€ãƒ“ルトイン 4Dクラスã®ã‚¯ãƒ©ã‚¹ã‚¹ãƒˆã‚¢ã‚’è¿”ã—ã¾ã™ã€‚ [CryptoKey](API/CryptoKeyClass.md) ãªã©ã®å°‚用 API ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ -**Ctrl+Shift+Alt+k** ショートカットも使用ã§ãã¾ã™ã€‚ +#### 例題 -#### エクスプローラー +`CryptoKey` ã‚¯ãƒ©ã‚¹ã«æ–°è¦ã‚­ãƒ¼ã‚’作æˆã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: -エクスプローラー㮠**メソッド** ページã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ã¯ **クラス** カテゴリã«åˆ†é¡žã•れã¦ã„ã¾ã™ã€‚ +```4d +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) +``` -クラスを新è¦ä½œæˆã™ã‚‹ã«ã¯æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: -- **クラス** ã‚«ãƒ†ã‚´ãƒªã‚’é¸æŠžã—ã€![](assets/en/Users/PlussNew.png) ボタンをクリックã—ã¾ã™ã€‚ -- エクスプローラーウィンドウã®ä¸‹éƒ¨ã«ã‚るアクションメニューã€ã¾ãŸã¯ã‚¯ãƒ©ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **æ–°è¦ã‚¯ãƒ©ã‚¹...** ã‚’é¸æŠžã—ã¾ã™ã€‚ ![](assets/en/Concepts/newClass.png) -- エクスプローラーã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ˆã‚Š **æ–°è¦ > クラス...** ã‚’é¸æŠžã—ã¾ã™ã€‚ -#### クラスコードサãƒãƒ¼ãƒˆ -å„種 4D 開発ウィンドウ (コードエディターã€ã‚³ãƒ³ãƒ‘イラーã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラー) ã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ã‚³ãƒ¼ãƒ‰ã¯ "特殊ãªãƒ—ロジェクトメソッド" ã®ã‚ˆã†ã«æ‰±ã‚れã¾ã™: +## Class オブジェクト -- コードエディター: - - クラスã¯å®Ÿè¡Œã§ãã¾ã›ã‚“ - - クラスメソッドã¯ã‚³ãƒ¼ãƒ‰ã®ãƒ–ロックã§ã™ - - オブジェクトメンãƒãƒ¼ã«å¯¾ã™ã‚‹ **定義ã«ç§»å‹•** æ“作ã¯ã‚¯ãƒ©ã‚¹ã® Function 宣言を探ã—ã¾ã™ã€‚例: "$o.f()" ã®å ´åˆã€"Function f" を見ã¤ã‘ã¾ã™ã€‚ - - クラスã®ãƒ¡ã‚½ãƒƒãƒ‰å®£è¨€ã«å¯¾ã™ã‚‹ **å‚照箇所を検索** æ“作ã¯ã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚ªãƒ–ジェクトメンãƒãƒ¼ã¨ã—ã¦ä½¿ã‚れã¦ã„る箇所を探ã—ã¾ã™ã€‚例: "Function f" ã®å ´åˆ "$o.f()" を見ã¤ã‘ã¾ã™ã€‚ -- ランタイムエクスプローラーãŠã‚ˆã³ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¯ \ コンストラクターã¾ãŸã¯ \.\ å½¢å¼ã§è¡¨ç¤ºã•れã¾ã™ã€‚ +プロジェクトã«ãŠã„ã¦ã‚¯ãƒ©ã‚¹ãŒ [定義](#クラス定義) ã•れã¦ã„れã°ã€ãれ㯠4Dランゲージ環境ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ クラスã¨ã¯ã€ãれ自身㌠["Class" クラス](API/ClassClass.md) ã®ã‚ªãƒ–ジェクトã§ã™ã€‚ Class ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®ãƒ—ロパティや関数をæŒã¡ã¾ã™: + +- [`name`](API/ClassClass.md#name) 文字列 +- [`superclass`](API/ClassClass.md#superclass) オブジェクト (ç„¡ã„å ´åˆã¯ null) +- [`new()`](API/ClassClass.md#new) 関数 (クラスオブジェクトをインスタンス化ã—ã¾ã™) + +ã¾ãŸã€Class オブジェクト㯠[`constructor`](#class-constructor) オブジェクトをå‚ç…§ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +Class オブジェクト㯠[共有オブジェクト](shared.md) ã§ã™ã€‚ã—ãŸãŒã£ã¦ã€ç•°ãªã‚‹ 4Dプロセスã‹ã‚‰åŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 継承 + +クラス宣言ã«ãŠã„㦠[Class extends](classes.md#class-extends-classname) キーワードを使ã†ã¨ã€ãã®ã‚¯ãƒ©ã‚¹ã¯è¦ªã‚¯ãƒ©ã‚¹ (ã¤ã¾ã‚Š + +`スーパークラス`) を継承ã—ã¾ã™ã€‚

        + +関数やプロパティãŒã‚¯ãƒ©ã‚¹å†…ã§è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ãã®ã‚¯ãƒ©ã‚¹ã® [`スーパークラス`](API/ClassClass.md#superclass) 内を検索ã—ã¾ã™ã€‚見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ã•らã«ã€ãã®ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚¹ãƒ¼ãƒ‘ークラス内を探ã—ã¾ã™ã€‚ã“れã¯ã€ã‚¹ãƒ¼ãƒ‘ークラスãŒå­˜åœ¨ã—ãªããªã‚‹ã¾ã§ç¶šãã¾ã™ (ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト㯠"Object" スーパークラスを継承ã—ã¦ã„ã¾ã™)。 -### クラスã®å‰Šé™¤ -既存ã®ã‚¯ãƒ©ã‚¹ã‚’削除ã™ã‚‹ã«ã¯: -- ディスク上㧠"Classes" フォルダーより .4dm クラスファイルを削除ã—ã¾ã™ã€‚ -- エクスプローラーã§ã¯ã€ã‚¯ãƒ©ã‚¹ã‚’é¸æŠžã—ãŸçŠ¶æ…‹ã§ ![](assets/en/Users/MinussNew.png) をクリックã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ˆã‚Š **移動 > ゴミ箱** ã‚’é¸æŠžã—ã¾ã™ã€‚ ## クラスキーワード クラス定義内ã§ã¯ã€å°‚用㮠4DキーワードãŒä½¿ç”¨ã§ãã¾ã™: -- `Function `: オブジェクトã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã—ã¾ã™ã€‚ -- `Class constructor`: オブジェクトã®ãƒ—ロパティを定義ã—ã¾ã™ (プロトタイプ定義)。 +- `Function `: オブジェクトã®ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’定義ã—ã¾ã™ã€‚ +- `Function get ` and `Function set ` to define computed properties of the objects. +- `Class constructor` to define static properties of the objects. - `Class extends `: 継承を定義ã—ã¾ã™ã€‚ -### Function + + + +### `Function` + + #### シンタックス -```js -Function + + +```4d +Function ({$parameterName : type; ...}){->$parameterName : type} // コード ``` -クラスメソッドã¨ã¯ã€å½“該クラスã®ãƒ—ロトタイプオブジェクトã®ãƒ—ロパティã§ã™ã€‚ ã¾ãŸã€ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¯ "Function" クラスã®ã‚ªãƒ–ジェクトã§ã‚‚ã‚りã¾ã™ã€‚ -クラス定義ファイルã§ã¯ã€`Function` キーワードã¨ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰åを使用ã—ã¦ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰å®£è¨€ã‚’ãŠã“ãªã„ã¾ã™ã€‚ ã“ã®ã¨ãã€ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰å㯠ECMAScript ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +クラス関数ã¨ã¯ã€å½“該クラスã®ãƒ—ロパティã§ã™ã€‚ クラス関数㯠[4D.Function](API/FunctionClass.md#4dfunction-オブジェクトã«ã¤ã„ã¦) クラスã®ã‚ªãƒ–ジェクトã§ã™ã€‚ + +クラス定義ファイルã§ã¯ã€`Function` キーワードã¨é–¢æ•°åを使用ã—ã¦å®£è¨€ã‚’ãŠã“ãªã„ã¾ã™ã€‚ 関数å㯠[プロパティåã®å‘½åè¦å‰‡](Concepts/identifiers.md#オブジェクトプロパティ) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + +> **Tip:** アンダースコア ("_") 文字ã§é–¢æ•°åã‚’é–‹å§‹ã™ã‚‹ã¨ã€ãã®é–¢æ•°ã¯ 4Dコードエディターã®è‡ªå‹•補完機能ã‹ã‚‰é™¤å¤–ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€`MyClass` ã« `Function _myPrivateFunction` を宣言ã—ãŸå ´åˆã€ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ãŠã„㦠`"cs.MyClass "` ã¨ã‚¿ã‚¤ãƒ—ã—ã¦ã‚‚ã€ã“ã®é–¢æ•°ã¯å€™è£œã¨ã—ã¦æç¤ºã•れã¾ã›ã‚“。 + +関数åã®ã™ã後ã«ã€åå‰ã¨ãƒ‡ãƒ¼ã‚¿åž‹ã‚’指定ã—㦠[引数](#引数) を宣言ã—ã¾ã™ (戻り値ã®å®£è¨€ã‚‚å¯)。 ãŸã¨ãˆã°: -> **Tip:** アンダースコア ("_") 文字ã§ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰åã‚’é–‹å§‹ã™ã‚‹ã¨ã€ãã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¯è‡ªå‹•補完機能ã‹ã‚‰é™¤å¤–ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€MyClase ã« `Function _myPrivateFunction` を宣言ã—ãŸå ´åˆã€ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ãŠã„㦠`"cs.MyClass "` ã¨ã‚¿ã‚¤ãƒ—ã—ã¦ã‚‚ã€ã“ã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¯å€™è£œã¨ã—ã¦æç¤ºã•れã¾ã›ã‚“。 -クラスメソッド内ã§ã‚ªãƒ–ジェクトインスタンスをå‚ç…§ã™ã‚‹ã«ã¯ `This` を使ã„ã¾ã™ã€‚ ãŸã¨ãˆã°: ```4d -Function getFullName - C_TEXT($0) - $0:=This.firstName+" "+Uppercase(This.lastName) +Function computeArea($width : Integer; $height : Integer)->$area : Integer +``` + + +クラスメソッド内ã§ã‚ªãƒ–ジェクトインスタンスをå‚ç…§ã™ã‚‹ã«ã¯ `This` コマンドを使ã„ã¾ã™ã€‚ ãŸã¨ãˆã°: + + -Function getAge - C_LONGINT($0) - $0:=(Current date-This.birthdate)/365.25 +```4d +Function setFullname($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function getFullname()->$fullname : Text + $fullname:=This.firstName+" "+Uppercase(This.lastName) ``` -クラスメソッドã®å ´åˆã«ã¯ã€`Current method name` ã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã‚’è¿”ã—ã¾ã™: "*\.\*" (例: "MyClass.myMethod")。 -データベースã®ã‚³ãƒ¼ãƒ‰å†…ã§ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚ªãƒ–ジェクトインスタンスã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦å‘¼ã³å‡ºã•れã€å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 次ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: +クラス関数ã®å ´åˆã«ã¯ã€`Current method name` ã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã‚’è¿”ã—ã¾ã™: "*\.\*" (例: "MyClass.myMethod")。 + +アプリケーションã®ã‚³ãƒ¼ãƒ‰å†…ã§ã¯ã€ã‚¯ãƒ©ã‚¹é–¢æ•°ã¯ã‚ªãƒ–ジェクトインスタンスã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦å‘¼ã³å‡ºã•れ〠**スレッドセーフã«é–¢ã™ã‚‹è­¦å‘Š:** クラスメソッドãŒã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ãªãã€"プリエンプティブプロセスã§å®Ÿè¡Œå¯èƒ½" ãªãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã•れãŸå ´åˆ: -> - 普通ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å ´åˆã¨ã¯ç•°ãªã‚Šã€ã‚³ãƒ³ãƒ‘イラーã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã›ã‚“。 -< -p> +> **スレッドセーフã«é–¢ã™ã‚‹è­¦å‘Š: ** クラス関数ãŒã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã¯ãªã„ã®ã«ã€"プリエンプティブプロセスã§å®Ÿè¡Œå¯èƒ½" ãªãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã•れãŸå ´åˆ: - 普通ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å ´åˆã¨ã¯ç•°ãªã‚Šã€ã‚³ãƒ³ãƒ‘イラーã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã›ã‚“。 - ランタイムã«ãŠã„ã¦ã®ã¿ã€4D ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ + + + + + + +#### 引数 + +関数ã®å¼•æ•°ã¯ã€å¼•æ•°åã¨ãƒ‡ãƒ¼ã‚¿åž‹ã‚’コロンã§åŒºåˆ‡ã£ã¦å®£è¨€ã—ã¾ã™ã€‚ パラメーターå㯠[プロパティåã®å‘½åè¦å‰‡](Concepts/identifiers.md#オブジェクトプロパティ) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 複数ã®ãƒ‘ラメーター (ãŠã‚ˆã³ãã®åž‹) を宣言ã™ã‚‹å ´åˆã¯ã€ãれらをセミコロン (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ + + + +```4d +Function add($x; $y : Variant; $z : Integer; $xy : Object) +``` + + + +> パラメーターã®åž‹ãŒå®£è¨€ã•れã¦ã„ãªã„å ´åˆã«ã¯ã€`ãƒãƒªã‚¢ãƒ³ãƒˆåž‹` ã¨ã—ã¦å®šç¾©ã•れã¾ã™ã€‚ + +é–¢æ•°ã®æˆ»ã‚Šå€¤ã‚’宣言ã™ã‚‹ã«ã¯ (ä»»æ„)ã€å…¥åŠ›ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ãƒªã‚¹ãƒˆã«çŸ¢å° (->) ã¨æˆ»ã‚Šå€¤ã®å®šç¾©ã‚’追加ã—ã¾ã™ã€‚ XPath: /ul[5]/li[2]/ClassName/ClassName/FunctionName/p[22] ãŸã¨ãˆã°: -> - ランタイムã«ãŠã„ã¦ã®ã¿ã€4D ã¯ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ -#### 例題 ```4d -// クラス: Rectangle -Class Constructor - C_LONGINT($1;$2) +Function add($x : Variant; $y : Integer)->$result : Integer +``` + + +戻り値ã¯ã€ã‚³ãƒ­ãƒ³ (:) 記å·ã®å¾Œã«æˆ»ã‚Šå€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ã ã‘を指定ã—ã¦å®£è¨€ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãã®å ´åˆã¯ã€è‡ªå‹•的㫠$0 ãŒä½¿ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: + + + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + + +> メソッド内ã®å¼•数宣言ã«ä½¿ç”¨ã•れる [従æ¥ã® 4D シンタックス](parameters.md#sequential-parameters) ã‚’ã€ã‚¯ãƒ©ã‚¹é–¢æ•°ã®å¼•数宣言ã«ä½¿ã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 両方ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ä½µç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ For example: +> +> ```4d +> Function add($x : Integer) +> var $2; $value : Integer +> var $0 : Text +> $value:=$x+$2 +> $0:=String($value) +> ``` + + + + + +#### Example + + + +```4d +// Class: Rectangle +Class constructor($width : Integer; $height : Integer) This.name:="Rectangle" - This.height:=$1 - This.width:=$2 + This.height:=$height + This.width:=$width + +// Function definition +Function getArea()->$result : Integer + $result:=(This.height)*(This.width) +``` + + -// Function 定義 -Function getArea - C_LONGINT($0) - $0:=(This.height)*(This.width) +```4d +// In a project method + +var $rect : cs.Rectangle +var $area : Real + +$rect:=cs.Rectangle.new(50;100) +$area:=$rect.getArea() //5000 ``` + + + + +### `Function get` and `Function set` + + + +#### Syntax + + + ```4d -// プロジェクトメソッド -C_OBJECT($o) -C_REAL($area) +Function get ()->$result : type +// code +``` + + -$o:=cs.Rectangle.new() -$area:=$o.getArea(50;100) //5000 + +```4d +Function set ($parameterName : type) +// code ``` -### Class Constructor -#### シンタックス +`Function get` and `Function set` are accessors defining **computed properties** in the class. A computed property is a named property with a data type that masks a calculation. When a computed property value is accessed, 4D substitutes the corresponding accessor's code: -```js -// クラス: MyClass -Class Constructor +- when the property is read, the `Function get` is executed, +- when the property is written, the `Function set` is executed. + +If the property is not accessed, the code never executes. + +Computed properties are designed to handle data that do not necessary need to be kept in memory. They are usually based upon persistent properties. For example, if a class object contains as persistent property the *gross price* and the *VAT rate*, the *net price* could be handled by a computed property. + +In the class definition file, computed property declarations use the `Function get` (the *getter*) and `Function set` (the *setter*) keywords, followed by the name of the property. The name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). + +`Function get` returns a value of the property type and `Function set` takes a parameter of the property type. Both arguments must comply with standard [function parameters](#parameters). + +When both functions are defined, the computed property is **read-write**. If only a `Function get` is defined, the computed property is **read-only**. In this case, an error is returned if the code tries to modify the property. If only a `Function set` is defined, 4D returns *undefined* when the property is read. + +The type of the computed property is defined by the `$return` type declaration of the *getter*. It can be of the following types: + +- Text +- Boolean +- Date +- Number +- Object +- Collection +- Image +- Blob + + + +> Assigning *undefined* to an object property clears its value while preserving its type. In order to do that, the `Function get` is first called to retrieve the value type, then the `Function set` is called with an empty value of that type. + + + +#### Examples + + + +```4d +//Class: Person.4dm + +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function get fullName() -> $fullName : Text + $fullName:=This.firstName+" "+This.lastName + +Function set fullName( $fullName : text ) + $p:=Position(" "; $fullName) + This.firstName:=Substring($fullName; 1; $p-1) + This.lastName:=Substring($fullName; $p+1) + +``` + + + + +```4d +//in a project method +$fullName:=$person.fullName // Function get fullName() is called +$person.fullName:="John Smith" // Function set fullName() is called +``` + + + + + +### `Class Constructor` + + + +#### Syntax + + + +```4d +// Class: MyClass +Class Constructor({$parameterName : type; ...}) // コード ``` -クラスコンストラクターメソッドを使ã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã¯å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -クラスコンストラクターãŒå®šç¾©ã•れã¦ã„ã‚‹ã¨ã€`new()` クラスメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ãŸã¨ãã«ã€å½“該コンストラクターãŒå‘¼ã³å‡ºã•れã¾ã™ (引数を指定ã—ã¦ã„ã‚‹å ´åˆã¯ `new()` メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã—ã¾ã™)。 +クラスコンストラクター関数を使ã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã¯ [引数](#引数) ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クラスコンストラクターãŒå®šç¾©ã•れã¦ã„ã‚‹ã¨ã€ [`new()`](API/ClassClass.md#new) 関数を呼ã³å‡ºã—ãŸã¨ãã«ã€å½“該コンストラクターãŒå‘¼ã³å‡ºã•れã¾ã™ (コンストラクターã§å¼•数を指定ã—ã¦ã„ã‚‹å ´åˆã¯ `new()` é–¢æ•°ã«æ¸¡ã—ã¾ã™)。 + +クラスコンストラクター関数ã®å ´åˆã«ã¯ã€ `Current method name` ã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã‚’è¿”ã—ã¾ã™: "*\:constructor*" (例: "MyClass:constructor")。 + + + -クラスコンストラクターメソッドã®å ´åˆã«ã¯ã€`Current method name` ã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã‚’è¿”ã—ã¾ã™: "*\.constructor*" (例: "MyClass.constructor")。 #### 例題: + + ```4d // クラス: MyClass // MyClass ã®ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ -Class Constructor -C_TEXT($1) -This.name:=$1 +Class Constructor ($name : Text) + This.name:=$name ``` + + + ```4d -// プロジェクトメソッド +// プロジェクトメソッドã«ã¦ // オブジェクトをインスタンス化ã—ã¾ã™ -C_OBJECT($o) +var $o : cs.MyClass $o:=cs.MyClass.new("HelloWorld") // $o = {"name":"HelloWorld"} ``` -### Class extends + + + + + + +### `Class extends ` + + #### シンタックス -```js + + +```4d // クラス: ChildClass Class extends ``` + クラス宣言ã«ãŠã„㦠`Class extends` キーワードを使ã†ã¨ã€åˆ¥ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã®å­ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å­ã‚¯ãƒ©ã‚¹ã¯ã€è¦ªã‚¯ãƒ©ã‚¹ã®ã™ã¹ã¦ã®æ©Ÿèƒ½ã‚’継承ã—ã¾ã™ã€‚ ã‚¯ãƒ©ã‚¹ç¶™æ‰¿ã¯æ¬¡ã®ãƒ«ãƒ¼ãƒ«ã«æ²¿ã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: - ユーザークラスã¯ãƒ“ルトインクラスを継承ã§ãã¾ã›ã‚“ (例外㯠4D.Object ã§ã€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã«ãƒ‡ãƒ•ォルトã§ç¶™æ‰¿ã•れã¾ã™) -- ユーザークラスã¯ã€åˆ¥ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚„コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚’継承ã§ãã¾ã›ã‚“。 +- ユーザークラスã¯ã€åˆ¥ã®ãƒ—ロジェクトやコンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã‚’継承ã§ãã¾ã›ã‚“。 - ユーザークラスã¯ã€è‡ªèº«ã‚’継承ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -- 間接的ã«ã‚‚ã€è‡ªèº«ã‚’継承ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (例: "a" extends "b" ã‹ã¤ "b" extends "a")。 +- 間接的ã«ã‚‚ã€è‡ªèº«ã‚’継承ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (例: "a" extends "b" ã‹ã¤ "b" extends "a")。 コードエディターやインタープリターã¯ã€ã“れらã®ãƒ«ãƒ¼ãƒ«ãŒç ´ã‚‰ã‚Œã¦ã„ã¦ã‚‚検知ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。コンパイラーãŠã‚ˆã³ "シンタックスãƒã‚§ãƒƒã‚¯" ã®ã¿ãŒã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ -派生クラスã¯ã€[`Super`](#super) コマンドを使ã£ã¦è¦ªã‚¯ãƒ©ã‚¹ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +派生クラスã¯ã€`Super` コマンドを使ã£ã¦è¦ªã‚¯ãƒ©ã‚¹ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + + #### 例題 `Polygon` クラスを継承ã—㟠`Square` クラスを作æˆã—ã¾ã™ã€‚ + + ```4d - // クラス: Square - // パス: Classes/Square.4dm +// クラス: Square + +// パス: Classes/Square.4dm - Class extends Polygon +Class extends Polygon - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // 親クラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ - // 長方形ã®é«˜ã•ãƒ»å¹…ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ­£æ–¹å½¢ã®ä¸€è¾ºã®é•·ã•を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ -Super($1;$1) - // 派生クラスã«ãŠã„ã¦ã¯ã€'This' を使用ã™ã‚‹ã‚ˆã‚Šå…ˆã« - // Super を呼ã³å‡ºã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ - This.name:="Square" +// 親クラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ +// 長方形ã®é«˜ã•ãƒ»å¹…ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ­£æ–¹å½¢ã®ä¸€è¾ºã®é•·ã•を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ + Super($side;$side) + // 派生クラスã«ãŠã„ã¦ã¯ã€'This' を使用ã™ã‚‹ã‚ˆã‚Šå…ˆã« + // Super を呼ã³å‡ºã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ + This.name:="Square" -Function getArea -C_LONGINT($0) -$0:=This.height*This.width + Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -### Super + + + +### `Super` + + + #### Super {( param{;...;paramN} )} {-> Object} -| 引数 | åž‹ | | 説明 | -| ----- | ------ | -- | ---------------- | -| param | æ··åˆ | -> | 親コンストラクターã«å—ã‘æ¸¡ã™å¼•æ•° | -| 戻り値 | Object | <- | 親オブジェクト | +| 引数 | åž‹ | | 説明 | +| ------ | ------ | -- | ---------------- | +| param | mixed | -> | 親コンストラクターã«å—ã‘æ¸¡ã™å¼•æ•° | +| Result | object | <- | 親オブジェクト | `Super` キーワードã«ã‚ˆã£ã¦ã‚¹ãƒ¼ãƒ‘ークラス (親クラス) を呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ `Super` ã¯æ¬¡ã®2ã¤ã®ç›®çš„ã®ãŸã‚ã«ä½¿ã„ã¾ã™: -- [コンストラクターコード](#class-constructor) 内ã«ãŠã„ã¦ã€ `Super` ã¯ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™ã‚³ãƒžãƒ³ãƒ‰ã§ã™ã€‚ コンストラクター内ã§ä½¿ç”¨ã™ã‚‹éš›ã«ã¯ã€`Super` コマンドã¯å˜ç‹¬ã§ä½¿ç”¨ã•れã€ã¾ãŸ `This` キーワードよりも先ã«ä½¿ç”¨ã•れる必è¦ãŒã‚りã¾ã™ã€‚ - - 継承ツリーã«ãŠã„ã¦ã€ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ãŒæ­£ã—ã呼ã³å‡ºã•れã¦ã„ãªã„å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10748 ãŒç”Ÿæˆã•れã¾ã™ã€‚ 呼ã³å‡ºã—ãŒæœ‰åйã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã®ã¯ã€é–‹ç™ºè€…ã®å½¹ç›®ã¨ãªã‚Šã¾ã™ã€‚ - - スーパークラスãŒã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ãƒˆã•れるより先ã«ã€`This` コマンドを使ã£ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10743 ãŒç”Ÿæˆã•れã¾ã™ã€‚ - - `Super` ã‚’ã€ã‚ªãƒ–ジェクトã®ã‚¹ã‚³ãƒ¼ãƒ—外ã§å‘¼ã³å‡ºã—ãŸå ´åˆã€ã¾ãŸã¯ã€ã™ã§ã«ã‚¹ãƒ¼ãƒ‘ークラスãŒã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ãƒˆã•れãŸã‚ªãƒ–ジェクトを対象ã«å‘¼ã³å‡ºã—ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10746 ãŒç”Ÿæˆã•れã¾ã™ã€‚ +- [コンストラクターコード](#class-constructor) 内ã«ãŠã„ã¦ã€ `Super` ã¯ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™ã‚³ãƒžãƒ³ãƒ‰ã§ã™ã€‚ コンストラクター内ã§ä½¿ç”¨ã™ã‚‹éš›ã«ã¯ã€`Super` コマンドã¯å˜ç‹¬ã§ä½¿ç”¨ã•れã€ã¾ãŸ `This` キーワードよりも先ã«ä½¿ç”¨ã•れる必è¦ãŒã‚りã¾ã™ã€‚ + + - 継承ツリーã«ãŠã„ã¦ã€ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ãŒæ­£ã—ã呼ã³å‡ºã•れã¦ã„ãªã„å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10748 ãŒç”Ÿæˆã•れã¾ã™ã€‚ 呼ã³å‡ºã—ãŒæœ‰åйã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã®ã¯ã€é–‹ç™ºè€…ã®å½¹ç›®ã¨ãªã‚Šã¾ã™ã€‚ + - スーパークラスãŒã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ãƒˆã•れるより先ã«ã€`This` コマンドを使ã£ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10743 ãŒç”Ÿæˆã•れã¾ã™ã€‚ + + - `Super` ã‚’ã€ã‚ªãƒ–ジェクトã®ã‚¹ã‚³ãƒ¼ãƒ—外ã§å‘¼ã³å‡ºã—ãŸå ´åˆã€ã¾ãŸã¯ã€ã‚¹ãƒ¼ãƒ‘ークラスコンストラクターãŒã™ã§ã«å‘¼ã³å‡ºã•れãŸã‚ªãƒ–ジェクトを対象ã«å‘¼ã³å‡ºã—ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ -10746 ãŒç”Ÿæˆã•れã¾ã™ã€‚ + + ```4d - // myClass コンストラクター - C_TEXT($1;$2) - Super($1) // ãƒ†ã‚­ã‚¹ãƒˆåž‹å¼•æ•°ã‚’ã‚¹ãƒ¼ãƒ‘ãƒ¼ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã«æ¸¡ã—ã¾ã™ - This.param:=$2 // 2番目ã®å¼•数を使用ã—ã¾ã™ +// myClass コンストラクター +var $text1; $text2 : Text +Super($text1) // ãƒ†ã‚­ã‚¹ãƒˆåž‹å¼•æ•°ã‚’ã‚¹ãƒ¼ãƒ‘ãƒ¼ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã«æ¸¡ã—ã¾ã™ +This.param:=$text2 // 2番目ã®å¼•数を使用ã—ã¾ã™ ``` -- [クラスメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰](#Function) 内ã«ãŠã„ã¦ã€`Super` ã¯ã‚¹ãƒ¼ãƒ‘ークラスã®ãƒ—ロトタイプを指ã—ã€ã‚¹ãƒ¼ãƒ‘ークラス階層ã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +- [クラスメンãƒãƒ¼é–¢æ•°](#function) 内ã«ãŠã„ã¦ã€`Super` ã¯ã‚¹ãƒ¼ãƒ‘ークラスã®ãƒ—ロトタイプを指ã—ã€ã‚¹ãƒ¼ãƒ‘ークラス階層ã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + + ```4d - Super.doSomething(42) // スーパークラスã«ã¦å®£è¨€ã•れã¦ã„ã‚‹ - // "doSomething" メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ +Super.doSomething(42) // スーパークラスã«ã¦å®£è¨€ã•れã¦ã„ã‚‹ +// "doSomething" メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ ``` + + + #### 例題 1 -クラスコンストレクター内㧠`Super` を使ã†ä¾‹ã§ã™ã€‚ `Rectangle` 㨠`Square` ã®å…±é€šè¦ç´ ãŒã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼å†…ã§é‡è¤‡ã—ãªã„よã†ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ã€‚ +クラスコンストレクター内㧠`Super` を使ã†ä¾‹ã§ã™ã€‚ `Rectangle` 㨠`Square` クラス ã®å…±é€šè¦ç´ ãŒã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼å†…ã§é‡è¤‡ã—ãªã„よã†ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ã€‚ + + ```4d - // クラス: Rectangle +// クラス: Rectangle +Class constructor($width : Integer; $height : Integer) + This.name:="Rectangle" + This.height:=$height + This.width:=$width - Class constructor - C_LONGINT($1;$2) - This.name:="Rectangle" - This.height:=$1 - This.width:=$2 - Function sayName - ALERT("Hi, I am a "+This.name+".") +Function sayName() + ALERT("Hi, I am a "+This.name+".") - Function getArea - C_LONGINT($0) - $0:=This.height*This.width +// 関数定義 +Function getArea() + var $0 : Integer + $0:=(This.height)*(This.width) ``` + + + ```4d - // クラス: Square +// クラス: Square - Class extends Rectangle +Class extends Rectangle - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // 親クラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ - // 長方形ã®é«˜ã•ãƒ»å¹…ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ­£æ–¹å½¢ã®ä¸€è¾ºã®é•·ã•を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ - Super($1;$1) + // 親クラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ + // 長方形ã®é«˜ã•ãƒ»å¹…ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ­£æ–¹å½¢ã®ä¸€è¾ºã®é•·ã•を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ + Super($side;$side) + // 派生クラスã«ãŠã„ã¦ã¯ã€'This' を使用ã™ã‚‹ã‚ˆã‚Šå…ˆã« + // Super を呼ã³å‡ºã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ + This.name:="Square" - // 派生クラスã«ãŠã„ã¦ã¯ã€'This' を使用ã™ã‚‹ã‚ˆã‚Šå…ˆã« - // Super を呼ã³å‡ºã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ - This.name:="Square" +Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` + + + #### 例題 2 クラスメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ `Super` を使ã†ä¾‹ã§ã™ã€‚ メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æŒã¤ `Rectangle` クラスを作æˆã—ã¾ã™: + + ```4d - // クラス: Rectangle +// クラス: Rectangle - Function nbSides - C_TEXT($0) - $0:="I have 4 sides" +Function nbSides() + var $0 : Text + $0:="I have 4 sides" ``` + `Square` クラスã«ã¯ã€ã‚¹ãƒ¼ãƒ‘ークラスメソッドを呼ã³å‡ºã™ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã—ã¾ã™: + + ```4d - // クラス: Square +// クラス: Square - Class extends Rectangle +Class extends Rectangle - Function description - C_TEXT($0) - $0:=Super.nbSides()+" which are all equal" +Function description() + var $0 : Text + $0:=Super.nbSides()+" which are all equal" ``` + ã™ã‚‹ã¨ã€ãƒ—ロジェクトメソッド内ã«ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: + + ```4d - C_OBJECT($square) - C_TEXT($message) - $square:=cs.Square.new() - $message:=$square.description() // I have 4 sides which are all equal +var $square : Object +var $message : Text +$square:=cs.Square.new() +$message:=$square.description() //I have 4 sides which are all equal ``` -### This + + + +### `This` + + #### This -> Object -| 引数 | åž‹ | | 説明 | -| --- | ------ | -- | ---------- | -| 戻り値 | Object | <- | カレントオブジェクト | +| 引数 | åž‹ | | 説明 | +| ------ | ------ | -- | ---------- | +| Result | object | <- | カレントオブジェクト | `This` キーワードã¯ã€ç¾åœ¨å‡¦ç†ä¸­ã®ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ `This` ã¯ã€4Dã«ãŠã„㦠[様々ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.ja.html) ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -`This` ã®å€¤ã¯ã€å‘¼ã°ã‚Œæ–¹ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ `This` ã®å€¤ã¯å®Ÿè¡Œæ™‚ã«ä»£å…¥ã«ã‚ˆã‚Šè¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã¾ãŸã€å‘¼ã³å‡ºã•れるãŸã³ã«é•ã†å€¤ã¨ãªã‚Šãˆã¾ã™ã€‚ +`This` ã®å€¤ã¯ã€å‘¼ã°ã‚Œæ–¹ã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ `This` ã®å€¤ã¯å®Ÿè¡Œæ™‚ã«ä»£å…¥ã«ã‚ˆã‚Šè¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã¾ãŸã€å‘¼ã³å‡ºã•れるãŸã³ã«é•ã†å€¤ã¨ãªã‚Šãˆã¾ã™ã€‚ オブジェクトã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦ãƒ•ォーミュラãŒå‘¼ã³å‡ºã•れãŸå ´åˆã€`This` ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—å…ƒã§ã‚るオブジェクトを指ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: + + ```4d $o:=New object("prop";42;"f";Formula(This.prop)) $val:=$o.f() //42 ``` -[クラスコンストラクター](#class-constructor) メソッド㌠`new()` キーワードã§ä½¿ç”¨ã•れãŸå ´åˆã€ãã®å†…部㮠`This` ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れる新è¦ã‚ªãƒ–ジェクトを指ã—ã¾ã™ã€‚ + +[クラスコンストラクター](#class-constructor) 関数㌠[`new()`](API/ClassClass.md#new) 関数ã«ã‚ˆã‚Šä½¿ç”¨ã•れãŸå ´åˆã€ãã®å†…部㮠`This` ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れる新è¦ã‚ªãƒ–ジェクトを指ã—ã¾ã™ã€‚ + + ```4d - // クラス: ob +// クラス: ob + +Class constructor -Class Constructor // This ã®ãƒ—ロパティを // 代入ã«ã‚ˆã£ã¦ä½œæˆã—ã¾ã™ This.a:=42 ``` + + + ```4d - // 4D メソッド +// 4Dメソッドã«ã¦ $o:=cs.ob.new() $val:=$o.a //42 ``` -> コンストラクター内㧠[Super](#super) キーワードを使ã£ã¦ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™å ´åˆã€å¿…ãš `This` よりも先ã«ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã¶å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。順番をé•ãˆã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ [ã“ã¡ã‚‰ã®ä¾‹é¡Œ](#例題-1) ã‚’å‚ç…§ãã ã•ã„。 + + + +> コンストラクター内㧠[Super](#super) キーワードを使ã£ã¦ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã³å‡ºã™å ´åˆã€å¿…ãš `This` より先ã«ã‚¹ãƒ¼ãƒ‘ークラスã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã‚’呼ã¶å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。順番をé•ãˆã‚‹ã¨ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã¡ã‚‰ã® [例題](#例題-1) ã‚’å‚ç…§ãã ã•ã„。 基本的ã«ã€`This` ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—å…ƒã®ã‚ªãƒ–ジェクトを指ã—ã¾ã™ã€‚ + + ```4d - // クラス: ob +// クラス: ob - Function f +Function f() $0:=This.a+This.b ``` + ã“ã®å ´åˆã€ãƒ—ロジェクトメソッドã«ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: + + ```4d $o:=cs.ob.new() $o.a:=5 @@ -478,20 +739,34 @@ $o.b:=3 $val:=$o.f() //8 ``` + ã“ã®ä¾‹ã§ã¯ã€å¤‰æ•° $o ã«ä»£å…¥ã•れãŸã‚ªãƒ–ジェクト㯠*f* プロパティをæŒãŸãªã„ãŸã‚ã€ã“れをクラスより継承ã—ã¾ã™ã€‚ *f* 㯠$o ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦å‘¼ã³å‡ºã•れるãŸã‚ã€ãƒ¡ã‚½ãƒƒãƒ‰å†…ã® `This` 㯠$o を指ã—ã¾ã™ã€‚ + + + ## クラスコマンド 4D ランゲージã«ã¯ã€ã‚¯ãƒ©ã‚¹æ©Ÿèƒ½ã‚’扱ã†è¤‡æ•°ã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚りã¾ã™ã€‚ -### OB Class + + + +### `OB Class` + + #### OB Class ( object ) -> Object | Null -`OB Class` ã¯å¼•æ•°ã¨ã—ã¦æ¸¡ã—ãŸã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ +`OB Class` ã¯å¼•æ•°ã¨ã—ã¦æ¸¡ã—ãŸã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ + + + + +### `OB Instance of` + -### OB Instance of #### OB Instance of ( object ; class ) -> Boolean -`object` ㌠`class`ã€ã¾ãŸã¯ãã®å­ã‚¯ãƒ©ã‚¹ã«å±žã—ã¦ã„れã°ã€`OB Instance of` 㯠`true` ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ `false` ã‚’è¿”ã—ã¾ã™ã€‚ \ No newline at end of file +`object` ㌠`class`ã€ã¾ãŸã¯ãã®å­ã‚¯ãƒ©ã‚¹ã«å±žã—ã¦ã„れã°ã€`OB Instance of` 㯠`true` ã‚’è¿”ã—ã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ `false` ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Concepts/components.md b/website/translated_docs/ja/Concepts/components.md index 1518d318f54bf5..5759ce2720f721 100644 --- a/website/translated_docs/ja/Concepts/components.md +++ b/website/translated_docs/ja/Concepts/components.md @@ -3,55 +3,109 @@ id: components title: コンãƒãƒ¼ãƒãƒ³ãƒˆ --- -4D ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã¯ã€ä»–ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¯èƒ½ãªã€1ã¤ä»¥ä¸Šã®æ©Ÿèƒ½ã‚’æŒã¤ 4D メソッドやフォームã®ä¸€å¼ã§ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¡ãƒ¼ãƒ«ã®é€å—ä¿¡ã‚’ãŠã“ãªã„ã€ãれらを 4D ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æ ¼ç´ã™ã‚‹ãŸã‚ã®æ©Ÿèƒ½ã‚’æŒã£ãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’作æˆã§ãã¾ã™ã€‚ +4D ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã¯ã€ä»–ã®ã‚¢ãƒ—リケーションã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å¯èƒ½ãªã€1ã¤ä»¥ä¸Šã®æ©Ÿèƒ½ã‚’æŒã¤ 4D メソッドやフォームã®ä¸€å¼ã§ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¡ãƒ¼ãƒ«ã®é€å—ä¿¡ã‚’ãŠã“ãªã„ã€ãれらを 4D ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã™ã‚‹ãŸã‚ã®æ©Ÿèƒ½ã‚’æŒã£ãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’作æˆã§ãã¾ã™ã€‚ -4D コンãƒãƒ¼ãƒãƒ³ãƒˆã®ä½œæˆã¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¯ç›´æŽ¥ 4D を使用ã—ã¦ãŠã“ãªã„ã¾ã™ã€‚ 4D ã§ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ [プラグイン](Concepts/plug-ins.md) ã®ã‚ˆã†ã«æ‰±ã‚れã€ä»¥ä¸‹ã®åŽŸå‰‡ãŒé©ç”¨ã•れã¾ã™: +## 説明 -- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€æ¨™æº–ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã¾ãŸã¯ãƒ‘ッケージ (.4dbase æ‹¡å¼µå­) ã®å½¢ã‚’ã—ãŸã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイル ( コンパイルã¾ãŸã¯éžã‚³ãƒ³ãƒ‘イル) ã§æ§‹æˆã•れã¾ã™ã€‚ -- データベースã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’インストールã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨åŒéšŽå±¤ã® "Components" フォルダーã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’コピーã—ã¾ã™ã€‚ -- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯æ¬¡ã® 4D ã®è¦ç´ ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: プロジェクトメソッドã€ãƒ—ロジェクトフォームã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã€é¸æŠžãƒªã‚¹ãƒˆã€ãƒ©ã‚¤ãƒ–ラリピクãƒãƒ£ãƒ¼ãªã©ã€‚ åé¢ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒå‘¼ã³å‡ºã›ãªã„ã‚‚ã®ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¨ãƒˆãƒªã‚¬ãƒ¼ã§ã™ã€‚ -- コンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§æ¨™æº–ã®ãƒ†ãƒ¼ãƒ–ルやデータファイルを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—ã€å¤–部データベースã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使用ã™ã‚Œã°ãƒ†ãƒ¼ãƒ–ルやフィールドを作æˆã—ã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸã‚Šèª­ã¿å‡ºã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 外部データベースã¯ã€ãƒ¡ã‚¤ãƒ³ã® 4D データベースã¨ã¯ç‹¬ç«‹ã—ã¦å­˜åœ¨ã—ã€SQLコマンドã§ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ +### 定義 -## 定義 +- **マトリクスプロジェクト**: コンãƒãƒ¼ãƒãƒ³ãƒˆé–‹ç™ºã«ä½¿ç”¨ã™ã‚‹4D プロジェクト。 マトリクスプロジェクトã¯ç‰¹åˆ¥ãªå±žæ€§ã‚’æŒãŸãªã„標準ã®ãƒ—ロジェクトã§ã™ã€‚ マトリクスプロジェクトã¯ã²ã¨ã¤ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æ§‹æˆã—ã¾ã™ã€‚ +- **ホストプロジェクト**: コンãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã€ãれを使用ã™ã‚‹ã‚¢ãƒ—リケーションプロジェクト。 +- **コンãƒãƒ¼ãƒãƒ³ãƒˆ**: ホストアプリケーションã«ã‚ˆã£ã¦ä½¿ç”¨ã•れる目的ã§ã€åŒã‚¢ãƒ—リケーション㮠[`Components`](Project/architecture.md) フォルダーã«ã‚³ãƒ”ーã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクト (コンパイル済ã¿ã¾ãŸã¯éžã‚³ãƒ³ãƒ‘イル)。 -4D ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆç®¡ç†ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§ã¯ã€ä»¥ä¸‹ã®ç”¨èªžã¨ã‚³ãƒ³ã‚»ãƒ—トを使ã„ã¾ã™: +### 原則 -- **マトリクスデータベース**: コンãƒãƒ¼ãƒãƒ³ãƒˆé–‹ç™ºã«ä½¿ç”¨ã™ã‚‹4D データベース。 マトリクスデータベースã¯ç‰¹åˆ¥ãªå±žæ€§ã‚’æŒãŸãªã„標準ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã™ã€‚ マトリクスデータベースã¯ã²ã¨ã¤ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æ§‹æˆã—ã¾ã™ã€‚ マトリクスデータベースã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ (ホストデータベース) ã® Components フォルダーã«ã‚³ãƒ”ーã—ã¦ä½¿ã„ã¾ã™ã€‚コンパイルã•れã¦ã„ã¦ã‚‚ã„ãªãã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。 -- **ホストデータベース**: コンãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã€ãれを使用ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã€‚ -- **コンãƒãƒ¼ãƒãƒ³ãƒˆ**: ホストデータベースã«ã‚ˆã£ã¦ä½¿ç”¨ã•れる目的ã§ã€åŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® Components フォルダーã«ã‚³ãƒ”ーã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ (コンパイル済ã¿ã¾ãŸã¯éžã‚³ãƒ³ãƒ‘イル)。 +4D コンãƒãƒ¼ãƒãƒ³ãƒˆã®ä½œæˆã¨ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¯ç›´æŽ¥ 4D を使用ã—ã¦ãŠã“ãªã„ã¾ã™ã€‚ 4D ã§ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ [プラグイン](Concepts/plug-ins.md) ã®ã‚ˆã†ã«æ‰±ã‚れã€ä»¥ä¸‹ã®åŽŸå‰‡ãŒé©ç”¨ã•れã¾ã™: -データベース㯠"マトリクス" ã«ã‚‚ "ホスト" ã«ã‚‚ãªã‚Šãˆã¾ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è‡ªä½“ã‚‚1 ã¤ä»¥ä¸Šã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã§ãã¾ã™ã€‚ ã—ã‹ã—コンãƒãƒ¼ãƒãƒ³ãƒˆãŒ "サブコンãƒãƒ¼ãƒãƒ³ãƒˆ" を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€æ¨™æº–ã® 4Dãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã§æ§‹æˆã•れã¾ã™ã€‚ +- コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’インストールã™ã‚‹ã«ã¯ã€[プロジェクト㮠`Components` フォルダー](Project/architecture.md) ã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’コピーã—ã¾ã™ã€‚ エイリアスã¾ãŸã¯ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚‚使用ã§ãã¾ã™ã€‚ +- プロジェクト㯠"マトリクス" ã«ã‚‚ "ホスト" ã«ã‚‚ãªã‚Šãˆã¾ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクト自体も1 ã¤ä»¥ä¸Šã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã§ãã¾ã™ã€‚ ã—ã‹ã—コンãƒãƒ¼ãƒãƒ³ãƒˆãŒ "サブコンãƒãƒ¼ãƒãƒ³ãƒˆ" を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯æ¬¡ã® 4D ã®è¦ç´ ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: プロジェクトメソッドã€ãƒ—ロジェクトフォームã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã€é¸æŠžãƒªã‚¹ãƒˆãªã©ã€‚ åé¢ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒå‘¼ã³å‡ºã›ãªã„ã‚‚ã®ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¨ãƒˆãƒªã‚¬ãƒ¼ã§ã™ã€‚ +- コンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§æ¨™æº–ã®ãƒ†ãƒ¼ãƒ–ルやデータファイルを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—ã€å¤–部データベースã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使用ã™ã‚Œã°ãƒ†ãƒ¼ãƒ–ルやフィールドを作æˆã—ã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸã‚Šèª­ã¿å‡ºã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 外部データベースã¯ã€ãƒ¡ã‚¤ãƒ³ã® 4D データベースã¨ã¯ç‹¬ç«‹ã—ã¦å­˜åœ¨ã—ã€SQLコマンドã§ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ +- インタープリターモードã§å‹•作ã™ã‚‹ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¾ãŸã¯ã‚³ãƒ³ãƒ‘イル済ã¿ã©ã¡ã‚‰ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚‚使用ã§ãã¾ã™ã€‚ コンパイルモードã§å®Ÿè¡Œã•れるホストデータベースã§ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã§ãã¾ã›ã‚“。 ã“ã®å ´åˆã€ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã¿ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ -### コンãƒãƒ¼ãƒãƒ³ãƒˆã®ä¿è­·: コンパイル -コンãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ•ォルトã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ 特ã«: -- エクスプローラーã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒšãƒ¼ã‚¸ã«å­˜åœ¨ã™ã‚‹å…±æœ‰ã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã—å¯èƒ½ã§ã™ã€‚ エクスプローラーã®ãƒ—レビューエリアã§ãれらã®å†…å®¹ã‚’é¸æŠžã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ã¾ãŸã€ãã®å†…容ã¯ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã§è¦‹ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãれらをメソッドエディター上ã§é–‹ã„ãŸã‚Šç·¨é›†ã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -- マトリクスデータベースã®ä»–ã®ãƒ—ロジェクトメソッドã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ç¾ã‚Œã¾ã›ã‚“。ã—ã‹ã—ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã«ã¯å†…容ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ -コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ—ロジェクトメソッドを効果的ã«ä¿è­·ã™ã‚‹ã«ã¯ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’コンパイルã—ã¦ã€ã‚¤ãƒ³ã‚¿ãƒ—リターコードをå«ã¾ãªã„ .4dc ファイルã¨ã—ã¦æä¾›ã—ã¾ã™ã€‚ コンパイルã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れるã¨: +## ランゲージコマンドã®ã‚¹ã‚³ãƒ¼ãƒ— + +[使用ã§ããªã„コマンド](#使用ã§ããªã„コマンド) を除ãã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ã¯ã™ã¹ã¦ã® 4D ランゲージコマンドãŒä½¿ç”¨ã§ãã¾ã™ã€‚ + +コマンドãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã°ã‚Œã‚‹ã¨ã€ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•れã¾ã™ã€‚ãŸã ã— `EXECUTE METHOD` ãŠã‚ˆã³ `EXECUTE FORMULA` コマンドã¯é™¤ãã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ‘ラメーターã«ã¦æŒ‡å®šã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã—ã¾ã™ã€‚ ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—テーマã®èª­ã¿å‡ºã—コマンドã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€èª­ã¿å‡ºã•れるã®ã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—情報ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ (コンãƒãƒ¼ãƒãƒ³ãƒˆã«å›ºæœ‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—ã¯ã‚りã¾ã›ã‚“)。 + +`SET DATABASE PARAMETER` 㨠`Get database parameter` コマンドã¯ä¾‹å¤–ã¨ãªã‚Šã¾ã™: ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã®ã‚¹ã‚³ãƒ¼ãƒ—ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã§ã™ã€‚ ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã³å‡ºã•れるã¨ã€çµæžœã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã«é©ç”¨ã•れã¾ã™ã€‚ + +ã•らã«ã€`Structure file` 㨠`Get 4D folder` コマンドã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®è¨­å®šãŒã§ãるよã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ + +`COMPONENT LIST` コマンドを使用ã—ã¦ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã«ãƒ­ãƒ¼ãƒ‰ã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã§ãã¾ã™ã€‚ + + +### 使用ã§ããªã„コマンド + +(読ã¿å–り専用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚) ストラクãƒãƒ£ãƒ¼ãƒ•ァイルを更新ã™ã‚‹ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 コンãƒãƒ¼ãƒãƒ³ãƒˆä¸­ã§ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã¨ã€-10511, "CommandName コマンドをコンãƒãƒ¼ãƒãƒ³ãƒˆã§ã‚³ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“" ã®ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™: + +- `ON EVENT CALL` +- `Method called on event` +- `SET PICTURE TO LIBRARY` +- `REMOVE PICTURE FROM LIBRARY` +- `SAVE LIST` +- `ARRAY TO LIST` +- `EDIT FORM` +- `CREATE USER FORM` +- `DELETE USER FORM` +- `CHANGE PASSWORD` +- `EDIT ACCESS` +- `Set group properties` +- `Set user properties` +- `DELETE USER` +- `CHANGE LICENSES` +- `BLOB TO USERS` +- `SET PLUGIN ACCESS` + +**注:** + +- `Current form table` コマンドã¯ã€ãƒ—ロジェクトフォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å‘¼ã³å‡ºã•れる㨠`Nil` ã‚’è¿”ã—ã¾ã™ã€‚ ゆãˆã«ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’コンãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- SQLデータ定義言語ã®ã‚³ãƒžãƒ³ãƒ‰ (`CREATE TABLE`ã€`DROP TABLE`ç­‰) をコンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ•レームワークã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ãŸã ã—ã€å¤–部データベースã®å ´åˆã¯ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (`CREATE DATABASE` SQL コマンドå‚ç…§)。 + -- エクスプローラーã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒšãƒ¼ã‚¸ã«å­˜åœ¨ã™ã‚‹å…±æœ‰ã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã—å¯èƒ½ã§ã™ã€‚ ã—ã‹ã—ã€ãã®å†…容ã¯ãƒ—レビューエリアã«ã‚‚デãƒãƒƒã‚¬ãƒ¼ã«ã‚‚表示ã•れã¾ã›ã‚“。 -- マトリクスデータベースã®ä»–ã®ãƒ—ロジェクトメソッドã¯ä¸€åˆ‡è¡¨ç¤ºã•れã¾ã›ã‚“。 ## プロジェクトメソッドã®å…±æœ‰ -マトリクスデータベースã®ã™ã¹ã¦ã®ãƒ—ロジェクトメソッド㯠ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«å«ã¾ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’コンãƒãƒ¼ãƒãƒ³ãƒˆåŒ–ã—ã¦ã‚‚ã€ã“れらã®ãƒ—ロジェクトメソッドã¯åŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ã¦å‘¼ã³å‡ºã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +マトリクスプロジェクトã®ã™ã¹ã¦ã®ãƒ—ロジェクトメソッド㯠ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«å«ã¾ã‚Œã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクトをコンãƒãƒ¼ãƒãƒ³ãƒˆåŒ–ã—ã¦ã‚‚ã€ã“れらã®ãƒ—ロジェクトメソッドã¯åŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ã¦å‘¼ã³å‡ºã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -ä»–æ–¹ã€ãƒ‡ãƒ•ォルトã§ã¯ã€ã“れらã®ãƒ—ロジェクトメソッドã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«è¡¨ç¤ºã•れãšã€å‘¼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 プロジェクトメソッドをホストデータベースã¨å…±æœ‰ã™ã‚‹ã«ã¯ã€ マトリクスデータベースå´ã§ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ãã®ã‚ˆã†ã«æ˜Žç¤ºçš„ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 設定ã™ã‚‹ã“ã¨ã§ã€ãれらã®ãƒ—ロジェクトメソッドã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã¦å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ (ã—ã‹ã—ホストデータベースã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ç·¨é›†ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® **エントリーãƒã‚¤ãƒ³ãƒˆ** ã¨ãªã‚Šã¾ã™ã€‚ +ä»–æ–¹ã€ãƒ‡ãƒ•ォルトã§ã¯ã€ã“れらã®ãƒ—ロジェクトメソッドã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã«è¡¨ç¤ºã•れãšã€å‘¼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 プロジェクトメソッドをホストプロジェクトã¨å…±æœ‰ã™ã‚‹ã«ã¯ã€ マトリクスプロジェクトå´ã§ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ãã®ã‚ˆã†ã«æ˜Žç¤ºçš„ã«è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 設定ã™ã‚‹ã“ã¨ã§ã€ãれらã®ãƒ—ロジェクトメソッドã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã«ã¦å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ (ã—ã‹ã—ホストプロジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ç·¨é›†ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® **エントリーãƒã‚¤ãƒ³ãƒˆ** ã¨ãªã‚Šã¾ã™ã€‚ -**注:** セキュリティã®ãŸã‚ã€ãƒ‡ãƒ•ォルトã§ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ—ロジェクトメソッドを実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 特定ã®å ´åˆã«ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ—ロジェクトメソッドã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 ãã†ã™ã‚‹ã«ã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ—ロジェクトメソッドå´ã§ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’å¯èƒ½ã«ã™ã‚‹ã‚ˆã†æ˜Žç¤ºçš„ã«æŒ‡å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +セキュリティã®ãŸã‚ã€ãƒ‡ãƒ•ォルトã§ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ—ロジェクトメソッドを実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 特定ã®å ´åˆã«ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ—ロジェクトメソッドã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 ãã†ã™ã‚‹ã«ã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ—ロジェクトメソッドå´ã§ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’å¯èƒ½ã«ã™ã‚‹ã‚ˆã†æ˜Žç¤ºçš„ã«æŒ‡å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰ãƒ—ロパティダイアログボックスã®ã€**コンãƒãƒ¼ãƒãƒ³ãƒˆã¨ãƒ›ã‚¹ãƒˆãƒ—ロジェクト間ã§å…±æœ‰** ã§è¨­å®šã—ã¾ã™ã€‚ ![](assets/en/Concepts/pict516563.en.png) +ホストプロジェクトã®ãƒ—ロジェクトメソッドãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰åˆ©ç”¨å¯èƒ½ã«ãªã£ã¦ã„れã°ã€`EXECUTE FORMULA` ã¾ãŸã¯ `EXECUTE METHOD` コマンドを使用ã—ã¦ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå´ã‹ã‚‰ãƒ›ã‚¹ãƒˆã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +// ホストメソッド +component_method("host_method_name") +``` + + +```4d +// コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ + C_TEXT($1) + EXECUTE METHOD($1) +``` + +> インタープリターコンãƒãƒ¼ãƒãƒ³ãƒˆãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターホストデータベースã¯ã€ãれãŒã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターコンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã•ãªã‘れã°ã€ã‚³ãƒ³ãƒ‘イル/シンタックスãƒã‚§ãƒƒã‚¯ãŒã§ãã¾ã™ã€‚ ãã†ã§ãªã„å ´åˆã€ã‚³ãƒ³ãƒ‘イルã¾ãŸã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚§ãƒƒã‚¯ã‚’実行ã—よã†ã¨ã™ã‚‹ã¨è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•ã‚Œã€æ“作を実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +> 一般的ã«ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターメソッドã¯ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã›ã¾ã™ãŒã€é€†ã¯ã§ãã¾ã›ã‚“。ã“れをãŠã“ãªã†ã«ã¯ `EXECUTE METHOD` ã‚„ `EXECUTE FORMULA` コマンドを使用ã—ã¾ã™ã€‚ + + + ## å¤‰æ•°ã®æ¸¡ã—æ–¹ -ローカルã€ãƒ—ロセスã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é–“ã§å…±æœ‰ã•れã¾ã›ã‚“。 ホストデータベースã‹ã‚‰ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®å¤‰æ•°ã€ã¾ãŸã¯ãã®é€†ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å”¯ä¸€ã®æ–¹æ³•ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ +ローカルã€ãƒ—ロセスã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ãƒ›ã‚¹ãƒˆãƒ—ロジェクト間ã§å…±æœ‰ã•れã¾ã›ã‚“。 ホストプロジェクトã‹ã‚‰ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®å¤‰æ•°ã‚’編集ã€ã¾ãŸã¯ãã®é€†ã‚’ãŠã“ãªã†å”¯ä¸€ã®æ–¹æ³•ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ é…列を使用ã—ãŸä¾‹: ```4d -// ホストデータベースå´: +// ホストプロジェクトå´: ARRAY INTEGER(MyArray;10) AMethod(->MyArray) @@ -62,38 +116,55 @@ title: コンãƒãƒ¼ãƒãƒ³ãƒˆ 変数を使用ã—ãŸä¾‹: ```4d - C_TEXT(myvariable) - component_method1(->myvariable) - C_POINTER($p) - $p:=component_method2(...) +C_TEXT(myvariable) +component_method1(->myvariable) ``` -ホストデータベースã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆé–“ã§ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¦é€šä¿¡ã‚’ãŠã“ãªã†ã«ã¯ã€ä»¥ä¸‹ã®ç‚¹ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: +```4d +C_POINTER($p) +$p:=component_method2(...) +``` + +ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ãªã„å ´åˆã§ã‚‚ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå´ã‹ã‚‰ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® (変数ãã®ã‚‚ã®ã§ã¯ãªã) 変数ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨è‡ªä½“ã¯å¯èƒ½ã§ã™ã—ã€ãã®é€†ã‚‚å¯èƒ½ã§ã™: + +```4d +// ホストデータベース内 +C_TEXT($input_t) +$input_t:="DoSomething" +component_method($input_t) +// component_method 㯠$1 ã« "DoSomething" ã‚’å—ã‘å–りã¾ã™ ($input_t 変数をå—ã‘å–ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“) +``` + + +ホストプロジェクトã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆé–“ã§ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¦é€šä¿¡ã‚’ãŠã“ãªã†ã«ã¯ã€ä»¥ä¸‹ã®ç‚¹ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: -- `Get pointer` をコンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§ä½¿ç”¨ã—ãŸå ´åˆã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。ã¾ãŸé€†ã«ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ホストデータベースã§ä½¿ç”¨ã—ãŸå ´åˆã‚‚åŒæ§˜ã§ã™ã€‚ +- `Get pointer` をコンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§ä½¿ç”¨ã—ãŸå ´åˆã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®å¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã›ã‚“。ã¾ãŸé€†ã«ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ホストプロジェクトã§ä½¿ç”¨ã—ãŸå ´åˆã‚‚åŒæ§˜ã§ã™ã€‚ -- コンパイル済ã¿ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターデータベースã®å ´åˆã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターãŠã‚ˆã³ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®åˆ©ç”¨ã¯ä»¥ä¸‹ã®åŽŸå‰‡ã‚’å®ˆã‚‰ãªã‘れã°ãªã‚Šã¾ã›ã‚“: インタープリターモードã§ã¯ã€ã‚³ãƒ³ãƒ‘イルモードã«ãŠã„ã¦ä½œæˆã•れãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解釈ã§ãã¾ã™ã€‚逆ã«ã‚³ãƒ³ãƒ‘イルモードã§ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã«ã¦ä½œæˆã•れãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解釈ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 以下ã®ä¾‹ã§ã“ã®åŽŸå‰‡ã‚’èª¬æ˜Žã—ã¾ã™: åŒã˜ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れ㟠2ã¤ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ C ( コンパイル済) 㨠I ( インタープリタ) ãŒã‚りã¾ã™: - +- コンパイル済ã¿ãƒ—ロジェクトã§ã¯ã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“ãŒã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタープロジェクトã®å ´åˆã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターãŠã‚ˆã³ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®åˆ©ç”¨ã¯ä»¥ä¸‹ã®åŽŸå‰‡ã‚’å®ˆã‚‰ãªã‘れã°ãªã‚Šã¾ã›ã‚“: インタープリターモードã§ã¯ã€ã‚³ãƒ³ãƒ‘イルモードã«ãŠã„ã¦ä½œæˆã•れãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解釈ã§ãã¾ã™ã€‚逆ã«ã‚³ãƒ³ãƒ‘イルモードã§ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã«ã¦ä½œæˆã•れãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’解釈ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 以下ã®ä¾‹ã§ã“ã®åŽŸå‰‡ã‚’èª¬æ˜Žã—ã¾ã™: åŒã˜ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れ㟠2ã¤ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ C ( コンパイル済) 㨠I ( インタープリタ) ãŒã‚りã¾ã™: - コンãƒãƒ¼ãƒãƒ³ãƒˆC ãŒå®šç¾©ã™ã‚‹å¤‰æ•° `myCvar` ãŒã‚ã‚‹ã¨ãã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆI ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ `->myCvar` を使用ã—ã¦å¤‰æ•°ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - - コンãƒãƒ¼ãƒãƒ³ãƒˆI ãŒå®šç¾©ã™ã‚‹å¤‰æ•° `myIvar` ãŒã‚ã‚‹ã¨ãã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆC ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ `->myIvar` を使用ã—ã¦ã‚‚変数ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯å®Ÿè¡Œã‚¨ãƒ©ãƒ¼ã‚’èµ·ã“ã—ã¾ã™ã€‚ -- `RESOLVE POINTER` を使用ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®æ¯”較ã¯ãŠå‹§ã‚ã§ãã¾ã›ã‚“。 変数ã®åˆ†é›¢ã®åŽŸå‰‡ã«ã‚ˆã‚Šã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ (ã‚ã‚‹ã„ã¯ä»–ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ) ã§åŒã˜åå‰ã®å¤‰æ•°ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ ¹æœ¬çš„ã«ãれらã¯ç•°ãªã‚‹å†…容をæŒã¡ã¾ã™ã€‚ 両コンテキストã§ã€å¤‰æ•°ã®ã‚¿ã‚¤ãƒ—ãŒé•ã†ã“ã¨ã•ãˆã‚りãˆã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ `myptr1` 㨠`myptr2` ãŒãれãžã‚Œå¤‰æ•°ã‚’指ã™ã¨ãã€ä»¥ä¸‹ã®æ¯”è¼ƒã¯æ­£ã—ããªã„çµæžœã¨ãªã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“: + - コンãƒãƒ¼ãƒãƒ³ãƒˆI ãŒå®šç¾©ã™ã‚‹å¤‰æ•° `myIvar` ãŒã‚ã‚‹ã¨ãã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆC ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ `->myIvar` を使用ã—ã¦ã‚‚変数ã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯å®Ÿè¡Œã‚¨ãƒ©ãƒ¼ã‚’èµ·ã“ã—ã¾ã™ã€‚ + +- `RESOLVE POINTER` を使用ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®æ¯”較ã¯ãŠå‹§ã‚ã§ãã¾ã›ã‚“。 変数ã®åˆ†é›¢ã®åŽŸå‰‡ã«ã‚ˆã‚Šã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ (ã‚ã‚‹ã„ã¯ä»–ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ) ã§åŒã˜åå‰ã®å¤‰æ•°ãŒå­˜åœ¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ ¹æœ¬çš„ã«ãれらã¯ç•°ãªã‚‹å†…容をæŒã¡ã¾ã™ã€‚ 両コンテキストã§ã€å¤‰æ•°ã®ã‚¿ã‚¤ãƒ—ãŒé•ã†ã“ã¨ã•ãˆã‚りãˆã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ `myptr1` 㨠`myptr2` ãŒãれãžã‚Œå¤‰æ•°ã‚’指ã™ã¨ãã€ä»¥ä¸‹ã®æ¯”è¼ƒã¯æ­£ã—ããªã„çµæžœã¨ãªã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“: ```4d RESOLVE POINTER(myptr1;vVarName1;vtablenum1;vfieldnum1) RESOLVE POINTER(myptr2;vVarName2;vtablenum2;vfieldnum2) If(vVarName1=vVarName2) - // 変数ãŒç•°ãªã£ã¦ã„ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšã€ã“ã®ãƒ†ã‚¹ãƒˆã¯True ã‚’è¿”ã—ã¾ã™ + // 変数ãŒç•°ãªã£ã¦ã„ã‚‹ã«ã‚‚ã‹ã‹ã‚らãšã€ã“ã®ãƒ†ã‚¹ãƒˆã¯true ã‚’è¿”ã—ã¾ã™ ``` - ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’比較ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: - ```4d If(myptr1=myptr2) // ã“ã®ãƒ†ã‚¹ãƒˆã¯False ã‚’è¿”ã—ã¾ã™ ``` -## ホストデータベースã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ +## ã‚¨ãƒ©ãƒ¼å‡¦ç† + +`ON ERR CALL` コマンドã«ã‚ˆã£ã¦å®Ÿè£…ã•れ㟠[エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰](Concepts/error-handling.md) ã¯ã€å®Ÿè¡Œä¸­ã®ãƒ—ロジェクトã«å¯¾ã—ã¦ã®ã¿é©ç”¨ã•れã¾ã™ã€‚ コンãƒãƒ¼ãƒãƒ³ãƒˆã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸã‚¨ãƒ©ãƒ¼ã®å ´åˆã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクト㮠`ON ERR CALL` エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å‘¼ã³å‡ºã•れãšã€ãã®é€†ã‚‚ã¾ãŸç„¶ã‚Šã§ã™ã€‚ + + +## ホストプロジェクトã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ -コンãƒãƒ¼ãƒãƒ³ãƒˆã§ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¦é€šä¿¡ã‚’行ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§å®Ÿè¡Œå¯èƒ½ãªãƒ¡ã‚½ãƒƒãƒ‰ã§ã™: +コンãƒãƒ¼ãƒãƒ³ãƒˆã§ãƒ†ãƒ¼ãƒ–ルを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¦é€šä¿¡ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§å®Ÿè¡Œå¯èƒ½ãªãƒ¡ã‚½ãƒƒãƒ‰ã§ã™: ```4d // コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã— @@ -103,8 +174,8 @@ methCreateRec(->[PEOPLE];->[PEOPLE]Name;"Julie Andrews") コンãƒãƒ¼ãƒãƒ³ãƒˆå†…ã® `methCreateRec` メソッドã®ã‚³ãƒ¼ãƒ‰: ```4d -C_POINTER($1) // ホストデータベースã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ -C_POINTER($2) // ホストデータベースã®ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ +C_POINTER($1) // ホストプロジェクトã®ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ +C_POINTER($2) // ホストプロジェクトã®ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ C_TEXT($3) // 代入ã™ã‚‹å€¤ $tablepointer:=$1 @@ -115,61 +186,11 @@ $fieldpointer->:=$3 SAVE RECORD($tablepointer->) ``` -## ランゲージコマンドã®ã‚¹ã‚³ãƒ¼ãƒ— - -[使用ã§ããªã„コマンド](#使用ã§ããªã„コマンド) を除ãã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ã¯ã™ã¹ã¦ã® 4D ランゲージコマンドãŒä½¿ç”¨ã§ãã¾ã™ã€‚ - -コマンドãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã°ã‚Œã‚‹ã¨ã€ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å®Ÿè¡Œã•れã¾ã™ã€‚ãŸã ã— `EXECUTE METHOD` コマンドã¯é™¤ãã¾ã™ã€‚ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ‘ラメーターã«ã¦æŒ‡å®šã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã—ã¾ã™ã€‚ ã¾ãŸã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—テーマã®èª­ã¿å‡ºã—コマンドã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€èª­ã¿å‡ºã•れるã®ã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—情報ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„ (コンãƒãƒ¼ãƒãƒ³ãƒˆã«å›ºæœ‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—ã¯ã‚りã¾ã›ã‚“)。 - -`SET DATABASE PARAMETER` 㨠`Get database parameter` コマンドã¯ä¾‹å¤–ã¨ãªã‚Šã¾ã™: ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã®ã‚¹ã‚³ãƒ¼ãƒ—ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ã§ã™ã€‚ ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰å‘¼ã³å‡ºã•れるã¨ã€çµæžœã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é©ç”¨ã•れã¾ã™ã€‚ - -ã•らã«ã€`Structure file` 㨠`Get 4D folder` コマンドã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®è¨­å®šãŒã§ãるよã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ - -`COMPONENT LIST` コマンドを使用ã—ã¦ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãƒ­ãƒ¼ãƒ‰ã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒªã‚¹ãƒˆã‚’å–å¾—ã§ãã¾ã™ã€‚ - -### 使用ã§ããªã„コマンド - -(読ã¿è¾¼ã¿å°‚用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚) ストラクãƒãƒ£ãƒ¼ãƒ•ァイルを更新ã™ã‚‹ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 コンãƒãƒ¼ãƒãƒ³ãƒˆä¸­ã§ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã¨ã€-10511, "CommandName コマンドをコンãƒãƒ¼ãƒãƒ³ãƒˆã§ã‚³ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“" ã®ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™: - -- `ON EVENT CALL` -- `Method called on event` -- `SET PICTURE TO LIBRARY` -- `REMOVE PICTURE FROM LIBRARY` -- `SAVE LIST` -- `ARRAY TO LIST` -- `EDIT FORM` -- `CREATE USER FORM` -- `DELETE USER FORM` -- `CHANGE PASSWORD` -- `EDIT ACCESS` -- `Set group properties` -- `Set user properties` -- `DELETE USER` -- `CHANGE LICENSES` -- `BLOB TO USERS` -- `SET PLUGIN ACCESS` - -**注:** - -- `Current form table` コマンドã¯ã€ãƒ—ロジェクトフォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å‘¼ã³å‡ºã•れる㨠`Nil` ã‚’è¿”ã—ã¾ã™ã€‚ ゆãˆã«ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’コンãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -- SQLデータ定義言語ã®ã‚³ãƒžãƒ³ãƒ‰ (`CREATE TABLE`ã€`DROP TABLE`ç­‰) をコンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ•レームワークã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ãŸã ã—ã€å¤–部データベースã®å ´åˆã¯ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (`CREATE DATABASE` SQL コマンドå‚ç…§)。 - -## ã‚¨ãƒ©ãƒ¼å‡¦ç† - -`ON ERR CALL` コマンドã«ã‚ˆã£ã¦å®Ÿè£…ã•れ㟠[エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰](Concepts/error-handling.md) ã¯ã€å®Ÿè¡Œä¸­ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã—ã¦ã®ã¿é©ç”¨ã•れã¾ã™ã€‚ コンãƒãƒ¼ãƒãƒ³ãƒˆã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸã‚¨ãƒ©ãƒ¼ã®å ´åˆã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® `ON ERR CALL` エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å‘¼ã³å‡ºã•れãšã€ãã®é€†ã‚‚ã¾ãŸç„¶ã‚Šã§ã™ã€‚ - -## フォームã®ä½¿ç”¨ - -- 特定ã®ãƒ†ãƒ¼ãƒ–ルã«å±žã•ãªã„" プロジェクトフォーム" ã®ã¿ãŒã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ マトリクスデータベースã®ã™ã¹ã¦ã®ãƒ—ロジェクトフォームをコンãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ†ãƒ¼ãƒ–ルフォームを使用ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ¼ãƒ‰ã§ãƒ•ォームを指定ã™ã‚‹ã«ã‚ãŸã£ã¦ã¯ã€ãƒ†ãƒ¼ãƒ–ルåã§ã¯ãªãã€ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ãªã‘れã°ãªã‚‰ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 - -**注:** コンãƒãƒ¼ãƒãƒ³ãƒˆãŒ `ADD RECORD` コマンドを使用ã™ã‚‹ã¨ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚«ãƒ¬ãƒ³ãƒˆã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€ãã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã«å¤‰æ•°ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãã®å¤‰æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。 - -- コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ•ォームをホストデータベース内ã§ã‚µãƒ–フォームã¨ã—ã¦å…¬é–‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã¯å…·ä½“çš„ã«ã¯ã€ã‚°ãƒ©ãƒ•ィックオブジェクトをæä¾›ã™ã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’開発ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€4Dç¤¾ãŒæä¾›ã™ã‚‹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚µãƒ–フォーム利用ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +> コンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€ãƒ†ãƒ¼ãƒ–ルフォームã¸ã®å‚ç…§ã¯ã™ã¹ã¦ãƒ›ã‚¹ãƒˆå´ã®ãƒ†ãƒ¼ãƒ–ルフォームã¸ã®å‚ç…§ã ã¨ 4D ã¯ã¿ãªã—ã¾ã™ (コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒ†ãƒ¼ãƒ–ルをæŒã¤ã“ã¨ãŒã§ããªã„ã‹ã‚‰ã§ã™)。 ## テーブルやフィールドã®åˆ©ç”¨ -コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã§å®šç¾©ã•れãŸãƒ†ãƒ¼ãƒ–ルやフィールドを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—外部データベースを作æˆã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルやフィールドを必è¦ã«å¿œã˜åˆ©ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ 外部データベースã®ä½œæˆã¨ç®¡ç†ã¯ SQL を用ã„ã¦ãŠã“ãªã„ã¾ã™ã€‚ 外部データベースã¯ã€ãƒ¡ã‚¤ãƒ³ã®4Dデータベースã‹ã‚‰ç‹¬ç«‹ã—ã¦ã„る別㮠4Dデータベースã§ã™ãŒã€ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰æ“作ãŒå¯èƒ½ã§ã™ã€‚ 外部データベースã®åˆ©ç”¨ã¯ã€ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’一時的ã«ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€4DãŒå®Ÿè¡Œã™ã‚‹ SQL クエリã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã—ã¦å¤–部データベースを指定ã—ã¾ã™ã€‚ 外部データベースã®ä½œæˆã¯ SQL ã® `CREATE DATABASE` コマンドを使用ã—ã¾ã™ã€‚ +コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクトã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã§å®šç¾©ã•れãŸãƒ†ãƒ¼ãƒ–ルやフィールドを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã—ã‹ã—外部データベースを作æˆã—ã€ãã®ãƒ†ãƒ¼ãƒ–ルやフィールドを必è¦ã«å¿œã˜åˆ©ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ 外部データベースã®ä½œæˆã¨ç®¡ç†ã¯ SQL を用ã„ã¦ãŠã“ãªã„ã¾ã™ã€‚ 外部データベースã¯ã€ãƒ¡ã‚¤ãƒ³ã®4Dプロジェクトã‹ã‚‰ç‹¬ç«‹ã—ã¦ã„る別㮠4Dプロジェクトã§ã™ãŒã€ãƒ¡ã‚¤ãƒ³ãƒ—ロジェクトã‹ã‚‰æ“作ãŒå¯èƒ½ã§ã™ã€‚ 外部データベースã®åˆ©ç”¨ã¯ã€ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’一時的ã«ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€4DãŒå®Ÿè¡Œã™ã‚‹ SQL クエリã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨ã—ã¦å¤–部データベースを指定ã—ã¾ã™ã€‚ 外部データベースã®ä½œæˆã¯ SQL ã® `CREATE DATABASE` コマンドを使用ã—ã¾ã™ã€‚ ### 例題 @@ -205,7 +226,7 @@ SAVE RECORD($tablepointer->) 外部データベースã¸ã®ãƒ‡ãƒ¼ã‚¿æ›¸ãè¾¼ã¿: ```4d - $Ptr_1:=$2 // ホストデータベースã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’通ã˜ã¦ãŠã“ãªã„ã¾ã™ + $Ptr_1:=$2 // ホストプロジェクトã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’通ã˜ã¦ãŠã“ãªã„ã¾ã™ $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -227,7 +248,7 @@ SAVE RECORD($tablepointer->) 外部データベースã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã¿: ```4d - $Ptr_1:=$2 // ホストデータベースã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’通ã˜ã¦ãŠã“ãªã„ã¾ã™ + $Ptr_1:=$2 // ホストプロジェクトã¸ã®ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’通ã˜ã¦ãŠã“ãªã„ã¾ã™ $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -246,18 +267,48 @@ SAVE RECORD($tablepointer->) End SQL ``` + +## フォームã®ä½¿ç”¨ + +- 特定ã®ãƒ†ãƒ¼ãƒ–ルã«å±žã•ãªã„" プロジェクトフォーム" ã®ã¿ãŒã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå†…ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ マトリクスプロジェクトã®ã™ã¹ã¦ã®ãƒ—ロジェクトフォームをコンãƒãƒ¼ãƒãƒ³ãƒˆã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ†ãƒ¼ãƒ–ルフォームを使用ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ¼ãƒ‰ã§ãƒ•ォームを指定ã™ã‚‹ã«ã‚ãŸã£ã¦ã¯ã€ãƒ†ãƒ¼ãƒ–ルåã§ã¯ãªãã€ãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ãªã‘れã°ãªã‚‰ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +> コンãƒãƒ¼ãƒãƒ³ãƒˆãŒ `ADD RECORD` コマンドを使用ã™ã‚‹ã¨ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ã‚«ãƒ¬ãƒ³ãƒˆã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€ãã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã«å¤‰æ•°ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¯ãã®å¤‰æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。 + +- コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ•ォームをホストプロジェクト内ã§ã‚µãƒ–フォームã¨ã—ã¦å…¬é–‹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã¯å…·ä½“çš„ã«ã¯ã€ã‚°ãƒ©ãƒ•ィックオブジェクトをæä¾›ã™ã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’開発ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€4Dç¤¾ãŒæä¾›ã™ã‚‹ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚µãƒ–フォーム利用ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ + +> コンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€å‚ç…§ã•れるプロジェクトフォームã¯ã™ã¹ã¦ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå†…ã«å­˜åœ¨ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆå†…ã«ãŠã„ã¦ã€`DIALOG` ã¾ãŸã¯ `Open form window` コマンドを使用ã—ã¦ãƒ›ã‚¹ãƒˆå´ã®ãƒ—ロジェクトフォームをå‚ç…§ã—よã†ã¨ã—ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + + ## リソースã®ä½¿ç”¨ -コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ リソース管ç†ã®åŽŸå‰‡ã«å¾“ã„ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒ .4dbase å½¢å¼ã®å ´åˆ (推奨ã•れるアーキテクãƒãƒ£ãƒ¼)ã€Resources フォルダ㯠.4dbase フォルダーã®ä¸­ã«ç½®ã‹ã‚Œã¾ã™ã€‚ +コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€è‡ªèº«ã® Resourcesフォルダーã«ã‚るリソースを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã£ã¦è‡ªå‹•ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ãŒæœ‰åйã¨ãªã‚Šã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® Resources フォルダー内ã§è¦‹ã¤ã‹ã£ãŸ XLIFF ファイルã¯ã€ åŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ã‚ˆã£ã¦ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ -1ã¤ä»¥ä¸Šã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’å«ã‚€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨åŒæ§˜ã«ãれãžã‚Œã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚‚固有ã®ãƒªã‚½ãƒ¼ã‚¹ãƒã‚§ãƒ¼ãƒ³ã‚’æŒã£ã¦ã„ã¾ã™ã€‚リソースã¯ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹é–“ã§åˆ†é›¢ã•れã¾ã™ã€‚コンãƒãƒ¼ãƒãƒ³ãƒˆA ã®ãƒªã‚½ãƒ¼ã‚¹ã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆB やホストデータベースã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +1ã¤ä»¥ä¸Šã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’å«ã‚€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã§ã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã¨åŒæ§˜ã«ãれãžã‚Œã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚‚固有ã®ãƒªã‚½ãƒ¼ã‚¹ãƒã‚§ãƒ¼ãƒ³ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ リソースã¯ç•°ãªã‚‹ãƒ—ロジェクト間ã§åˆ†é›¢ã•れã¾ã™ã€‚コンãƒãƒ¼ãƒãƒ³ãƒˆA ã®ãƒªã‚½ãƒ¼ã‚¹ã«ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆB やホストプロジェクトã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + +## åˆæœŸåŒ–ã®ã‚³ãƒ¼ãƒ‰ã®å®Ÿè¡Œ + +コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ã„ãŸã¨ãã¾ãŸã¯é–‰ã˜ãŸã¨ãã«ã€è‡ªå‹•的㫠4Dコードを実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã‚ˆã£ã¦ãŸã¨ãˆã°ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«é–¢é€£ã™ã‚‹è¨­å®šã‚„ユーザーã®çŠ¶æ…‹ãªã©ã‚’読ã¿è¾¼ã¿ãƒ»ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +åˆæœŸåŒ–やデータベースを閉ã˜ã‚‹ã‚³ãƒ¼ãƒ‰ã®å®Ÿè¡Œã¯ã€ `On Host Database Event` データベースメソッド を使用ã—ã¦ãŠã“ãªã‚れã¾ã™ã€‚ + +> セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€`On Host Database Event` データベースメソッドを使用å¯èƒ½ã«ã™ã‚‹ãŸã‚ã«ã¯ã€ãã®å®Ÿè¡Œã‚’ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§æ˜Žç¤ºçš„ã«è¨±å¯ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ãŸã‚ã«ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šç”»é¢ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒšãƒ¼ã‚¸å†…ã®ã€**コンãƒãƒ¼ãƒãƒ³ãƒˆã® "On Host Database Event" メソッドを実行** オプションã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¾ã™: + + +## コンãƒãƒ¼ãƒãƒ³ãƒˆã®ä¿è­·: コンパイル + +コンãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクトã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã‹ã‚‰ãƒ‡ãƒ•ォルトã§ã‚¢ã‚¯ã‚»ã‚¹å¯èƒ½ã§ã™ã€‚ 特ã«: + +- エクスプローラーã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒšãƒ¼ã‚¸ã«å­˜åœ¨ã™ã‚‹å…±æœ‰ã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã—å¯èƒ½ã§ã™ã€‚ エクスプローラーã®ãƒ—レビューエリアã§ãれらã®å†…å®¹ã‚’é¸æŠžã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ã¾ãŸã€ãã®å†…容ã¯ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã§è¦‹ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãれらをメソッドエディター上ã§é–‹ã„ãŸã‚Šç·¨é›†ã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- マトリクスプロジェクトã®ä»–ã®ãƒ—ロジェクトメソッドã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ç¾ã‚Œã¾ã›ã‚“。ã—ã‹ã—ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã«ã¯å†…容ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +コンãƒãƒ¼ãƒãƒ³ãƒˆã®ãƒ—ロジェクトメソッドを効果的ã«ä¿è­·ã™ã‚‹ã«ã¯ã€ãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクトをコンパイルã—ã¦ã€ã‚¤ãƒ³ã‚¿ãƒ—リターコードをå«ã¾ãªã„ .4dz ファイルã¨ã—ã¦æä¾›ã—ã¾ã™ã€‚ コンパイルã•れãŸãƒžãƒˆãƒªã‚¯ã‚¹ãƒ—ロジェクトãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れるã¨: + +- エクスプローラーã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒšãƒ¼ã‚¸ã«å­˜åœ¨ã™ã‚‹å…±æœ‰ã®ãƒ—ロジェクトメソッドã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã—å¯èƒ½ã§ã™ã€‚ ã—ã‹ã—ã€ãã®å†…容ã¯ãƒ—レビューエリアã«ã‚‚デãƒãƒƒã‚¬ãƒ¼ã«ã‚‚表示ã•れã¾ã›ã‚“。 +- マトリクスプロジェクトã®ä»–ã®ãƒ—ロジェクトメソッドã¯ä¸€åˆ‡è¡¨ç¤ºã•れã¾ã›ã‚“。 -## コンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ˜ãƒ«ãƒ— -コンãƒãƒ¼ãƒãƒ³ãƒˆã«ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ˜ãƒ«ãƒ—を追加ã§ãるよã†ã«ã€å°‚用ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ãŒå®Ÿè£…ã•れã¦ã„ã¾ã™ã€‚ 原ç†ã¯ 4D ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«æä¾›ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ã§ã™: -- コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ˜ãƒ«ãƒ—ã¯æ‹¡å¼µå­ãŒ .htm, .html ã¾ãŸã¯ (Windows ã®ã¿) .chm ã§æä¾›ã•れã¾ã™ã€‚ -- ヘルプファイルã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨åŒéšŽå±¤ã«ç½®ã‹ã‚Œã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã¨åŒã˜åå‰ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 -- ã“ã®ãƒ•ァイルã¯è‡ªå‹•çš„ã«ã‚¢ãƒ—リケーションã®ãƒ˜ãƒ«ãƒ—メニューã«ã€" ヘルプ: ヘルプファイルå" ã®ã‚¿ã‚¤ãƒˆãƒ«ã§ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/data-types.md b/website/translated_docs/ja/Concepts/data-types.md index 1d050bc970c710..58619cdde1cb5b 100644 --- a/website/translated_docs/ja/Concepts/data-types.md +++ b/website/translated_docs/ja/Concepts/data-types.md @@ -7,26 +7,25 @@ title: ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®æ¦‚è¦ ã“ã®2ã¤ã¯ãŠãŠã‚ˆãåŒã˜ã‚‚ã®ã§ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¬ãƒ™ãƒ«ã§æä¾›ã•れã¦ã„ã‚‹ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã«ãŠã„ã¦ã¯ç›´æŽ¥åˆ©ç”¨å¯èƒ½ã§ã¯ãªãã€è‡ªå‹•çš„ã«é©å®œå¤‰æ›ã•れã¾ã™ã€‚ åŒæ§˜ã«ã€ã„ãã¤ã‹ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã§ã—ã‹åˆ©ç”¨ã§ãã¾ã›ã‚“。 å„場所ã§åˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¨ã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã§ã®å®£è¨€ã®ä»•æ–¹ã®ä¸€è¦§ã§ã™: -| データタイプ | データベース | ランゲージ | 変数宣言 | -| ------------------------------------- | ------- | ------- | ---------------------------- | -| [文字列](dt_string.md) | â—¯ | テキストã«å¤‰æ› | - | -| [テキスト](Concepts/dt_string.md) | â—¯ | â—¯ | `C_TEXT`, `ARRAY TEXT` | -| [日付](Concepts/dt_date.md) | â—¯ | â—¯ | `C_DATE`, `ARRAY DATE` | -| [時間](Concepts/dt_time.md) | â—¯ | â—¯ | `C_TIME`, `ARRAY TIME` | -| [ブール](Concepts/dt_boolean.md) | â—¯ | â—¯ | `C_BOOLEAN`, `ARRAY BOOLEAN` | -| [æ•´æ•°](Concepts/dt_number.md) | â—¯ | å€é•·æ•´æ•°ã«å¤‰æ› | `ARRAY INTEGER` | -| [å€é•·æ•´æ•°](Concepts/dt_number.md) | â—¯ | â—¯ | `C_LONGINT`, `ARRAY LONGINT` | -| [64ビット整数](Concepts/dt_number.md) | â—¯ (SQL) | 実数ã«å¤‰æ› | - | -| [実数](Concepts/dt_number.md) | â—¯ | â—¯ | `C_REAL`, `ARRAY REAL` | -| [未定義](Concepts/dt_null_undefined.md) | - | â—¯ | - | -| [Null](Concepts/dt_null_undefined.md) | - | â—¯ | - | -| [ãƒã‚¤ãƒ³ã‚¿ãƒ¼](Concepts/dt_pointer.md) | - | â—¯ | `C_POINTER`, `ARRAY POINTER` | -| [ピクãƒãƒ£ãƒ¼](Concepts/dt_picture.md) | â—¯ | â—¯ | `C_PICTURE`, `ARRAY PICTURE` | -| [BLOB](Concepts/dt_blob.md) | â—¯ | â—¯ | `C_BLOB`, `ARRAY BLOB` | -| [オブジェクト](Concepts/dt_object.md) | â—¯ | â—¯ | `C_OBJECT`, `ARRAY OBJECT` | -| [コレクション](Concepts/dt_collection.md) | - | â—¯ | `C_COLLECTION` | -| ãƒãƒªã‚¢ãƒ³ãƒˆ | - | â—¯ | `C_VARIANT` | - +| データタイプ | データベース | ランゲージ | [`var` 宣言](variables.md#using-the-var-keyword) | [`C_` ã¾ãŸã¯ `ARRAY` 宣言](variables.md#using-a-c_-directive) | +| ------------------------------------- | ------- | ------- | ---------------------------------------------- | -------------------------------------------------------- | +| [文字列](dt_string.md) | â—¯ | テキストã«å¤‰æ› | - | - | +| [テキスト](Concepts/dt_string.md) | â—¯ | â—¯ | `テキスト` | `C_TEXT`, `ARRAY TEXT` | +| [日付](Concepts/dt_date.md) | â—¯ | â—¯ | `日付` | `C_DATE`, `ARRAY DATE` | +| [時間](Concepts/dt_time.md) | â—¯ | â—¯ | `時間` | `C_TIME`, `ARRAY TIME` | +| [ブール](Concepts/dt_boolean.md) | â—¯ | â—¯ | `ブール` | `C_BOOLEAN`, `ARRAY BOOLEAN` | +| [æ•´æ•°](Concepts/dt_number.md) | â—¯ | å€é•·æ•´æ•°ã«å¤‰æ› | `æ•´æ•°` | `ARRAY INTEGER` | +| [å€é•·æ•´æ•°](Concepts/dt_number.md) | â—¯ | â—¯ | `æ•´æ•°` | `C_LONGINT`, `ARRAY LONGINT` | +| [64ビット整数](Concepts/dt_number.md) | â—¯ (SQL) | 実数ã«å¤‰æ› | - | - | +| [実数](Concepts/dt_number.md) | â—¯ | â—¯ | `実数` | `C_REAL`, `ARRAY REAL` | +| [未定義](Concepts/dt_null_undefined.md) | - | â—¯ | - | - | +| [Null](Concepts/dt_null_undefined.md) | - | â—¯ | - | - | +| [ãƒã‚¤ãƒ³ã‚¿ãƒ¼](Concepts/dt_pointer.md) | - | â—¯ | `ãƒã‚¤ãƒ³ã‚¿ãƒ¼` | `C_POINTER`, `ARRAY POINTER` | +| [ピクãƒãƒ£ãƒ¼](Concepts/dt_picture.md) | â—¯ | â—¯ | `ピクãƒãƒ£ãƒ¼` | `C_PICTURE`, `ARRAY PICTURE` | +| [BLOB](Concepts/dt_blob.md) | â—¯ | â—¯ | `Blob`, `4D.Blob` | `C_BLOB`, `ARRAY BLOB` | +| [オブジェクト](Concepts/dt_object.md) | â—¯ | â—¯ | `オブジェクト` | `C_OBJECT`, `ARRAY OBJECT` | +| [コレクション](Concepts/dt_collection.md) | - | â—¯ | `コレクション` | `C_COLLECTION` | +| [ãƒãƒªã‚¢ãƒ³ãƒˆ](Concepts/dt_variant.md)(2) | - | â—¯ | `ãƒãƒªã‚¢ãƒ³ãƒˆ` | `C_VARIANT` | (1) ORDA ã§ã¯ã€ã‚ªãƒ–ジェクト (エンティティ) を介ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ィールドを扱ã†ãŸã‚ã€ã‚ªãƒ–ジェクトã«ãŠã„ã¦åˆ©ç”¨å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [オブジェクト](Concepts/dt_object.md) ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 @@ -34,21 +33,21 @@ title: ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®æ¦‚è¦ ## デフォルト値 -コンパイラ支æŒå­ã«ã‚ˆã£ã¦å¤‰æ•°ã®åž‹ãŒæ±ºã¾ã‚‹ã¨ãã€å¤‰æ•°ã¯ãƒ‡ãƒ•ォルトã®å€¤ã‚’å—ã‘å–りã€å‰²ã‚Šå½“ã¦ãŒã•れãªã„é™ã‚Šã‚»ãƒƒã‚·ãƒ§ãƒ³ã®é–“ã¯ãã®å€¤ã‚’ä¿ã¡ç¶šã‘ã¾ã™ã€‚ +コンパイラー指示å­ã«ã‚ˆã£ã¦å¤‰æ•°ã®åž‹ãŒæ±ºã¾ã‚‹ã¨ãã€å¤‰æ•°ã¯ãƒ‡ãƒ•ォルトã®å€¤ã‚’å—ã‘å–りã€å‰²ã‚Šå½“ã¦ãŒã•れãªã„é™ã‚Šã‚»ãƒƒã‚·ãƒ§ãƒ³ã®é–“ã¯ãã®å€¤ã‚’ä¿ã¡ç¶šã‘ã¾ã™ã€‚ -デフォルトã®å€¤ã¯ã€å¤‰æ•°ã®åž‹ã¨ã‚«ãƒ†ã‚´ãƒªã€ãã®å®Ÿè¡Œã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ (インタープリターã‹ã‚³ãƒ³ãƒ‘イルã‹) ã«åŠ ãˆã€ã‚³ãƒ³ãƒ‘イルモードã§ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã®ã‚³ãƒ³ãƒ‘イラーページã§å®šç¾©ã•れãŸã‚³ãƒ³ãƒ‘イルオプションã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™: +デフォルトã®å€¤ã¯ã€å¤‰æ•°ã®åž‹ã¨ã‚«ãƒ†ã‚´ãƒªã€ãã®å®Ÿè¡Œã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ (インタープリターã‹ã‚³ãƒ³ãƒ‘イルã‹) ã«åŠ ãˆã€ã‚³ãƒ³ãƒ‘イルモードã§ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã®ã‚³ãƒ³ãƒ‘イラーページã§å®šç¾©ã•れãŸã‚³ãƒ³ãƒ‘イルオプションã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™: - プロセス変数ãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã¯å¸¸ã« "ゼロã«ã™ã‚‹" ã«è¨­å®šã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€åž‹ã«ã‚ˆã£ã¦ã€"0"ã€ç©ºã®æ–‡å­—列ã€ç©ºã®Blobã€Nilãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€ç©ºã®æ—¥ä»˜ (00-00-00)ã€ã¨ã„ã†ã“ã¨ã§ã™ã€‚ -- ローカル変数ã¯ä»¥ä¸‹ã®æ§˜ã«è¨­å®šã•れã¾ã™: +- ローカル変数ã¯ä»¥ä¸‹ã®æ§˜ã«è¨­å®šã•れã¾ã™: - インタープリタモード: ゼロã«ã™ã‚‹ - - コンパイルモードã«ãŠã„ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã®**ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°åˆæœŸåŒ–オプション**ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: + - コンパイルモードã«ãŠã„ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã®**ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°åˆæœŸåŒ–オプション**ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: - "ゼロã«ã™ã‚‹" ãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã¯ã‚¼ãƒ­ã«ãªã‚Šã¾ã™ã€‚ - - "ランダム値ã«ã™ã‚‹" ãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€æ•°å€¤ã¨æ™‚é–“ã«ã¤ã„ã¦ã¯0x72677267ã€ãƒ–ールã«ã¤ã„ã¦ã¯å¸¸ã« Trueã€ä»–ã®ã‚‚ã®ã«ã¤ã„ã¦ã¯ "ゼロã«ã™ã‚‹" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ + - "ランダム値ã«ã™ã‚‹" ãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€æ•°å€¤ã¨æ™‚é–“ã«ã¤ã„ã¦ã¯0x72677267ã€ãƒ–ールã«ã¤ã„ã¦ã¯å¸¸ã« trueã€ä»–ã®ã‚‚ã®ã«ã¤ã„ã¦ã¯ "ゼロã«ã™ã‚‹" ã®å ´åˆã¨åŒã˜ã§ã™ã€‚ - "ãªã—" ãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€å¤‰æ•°ã¯åˆæœŸåŒ–ã•れãšã€ãƒ¡ãƒ¢ãƒªã«ã‚ã‚‹å€¤ãŒæŽ¡ç”¨ã•れã¾ã™ã€‚ãれã¯ã€åˆ¥ã®å¤‰æ•°ã«ä»¥å‰ä½¿ã‚れãŸå€¤ã‹ã‚‚ã—れã¾ã›ã‚“。 **注:** 4D ã§ã¯ "ゼロã«ã™ã‚‹" ã®è¨­å®šã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ 以下ã®è¡¨ã¯ã“れらã®ãƒ‡ãƒ•ォルトã®å€¤ã‚’ã‚らã‚ã—ãŸã‚‚ã®ã§ã™: -| åž‹ | インタープロセス変数 / プロセス変数 / インタープリターモードã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° / コンパイルモード㧠"ゼロã«ã™ã‚‹" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | コンパイルモード㧠"ランダム値ã«ã™ã‚‹" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | コンパイルモード㧠"ãªã—" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | +| タイプ | インタープロセス変数 / プロセス変数 / インタープリターモードã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° / コンパイルモード㧠"ゼロã«ã™ã‚‹" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | コンパイルモード㧠"ランダム値ã«ã™ã‚‹" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | コンパイルモード㧠"ãªã—" ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° | | ------ | -------------------------------------------------------------------- | ---------------------------- | --------------------------- | | ブール | False | True | True (å ´åˆã«ã‚ˆã‚‹) | | 日付 | 00-00-00 | 00-00-00 | 00-00-00 | @@ -70,17 +69,16 @@ title: ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®æ¦‚è¦ æ¬¡ã®è¡¨ã¯ã€åŸºæœ¬ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã€å¤‰æ›ã§ãるデータタイプã€ãれを実行ã™ã‚‹éš›ã«ä½¿ç”¨ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’示ã—ã¦ã„ã¾ã™: -| データタイプ | 文字列ã«å¤‰æ› | 数値ã«å¤‰æ› | 日付ã«å¤‰æ› | 時間ã«å¤‰æ› | ブールã«å¤‰æ› | -| ------- | ------ | ----- | ----- | ----- | ------ | -| 文字列 (1) | | Num | 日付 | 時間 | Bool | -| 数値 (2) | 文字列 | | | | Bool | -| 日付 | 文字列 | | | | Bool | -| 時間 | 文字列 | | | | Bool | -| ブール | | Num | | | | - +| データタイプ | 文字列ã«å¤‰æ› | 数値ã«å¤‰æ› | 日付ã«å¤‰æ› | 時間ã«å¤‰æ› | ブールã«å¤‰æ› | +| ------- | -------- | ----- | ----- | ----- | ------ | +| 文字列 (1) | | `Num` | `日付` | `時間` | `Bool` | +| 数値 (2) | `String` | | | | `Bool` | +| 日付 | `String` | | | | `Bool` | +| 時間 | `String` | | | | `Bool` | +| ブール | | `Num` | | | | (1) JSONå½¢å¼ã®æ–‡å­—列㯠`JSON Parse` コマンドを使ã£ã¦ã‚¹ã‚«ãƒ©ãƒ¼ãƒ‡ãƒ¼ã‚¿ã€ã‚ªãƒ–ジェクトã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¤‰æ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ (2) æ™‚é–“ã¯æ•°å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ -**注:** ã“ã®è¡¨ã«ç¤ºã™ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã®ä»–ã«ã€æ¼”ç®—å­ã¨ä»–ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’組ã¿åˆã›ã‚‹ã“ã¨ã§ã€ã‚ˆã‚Šæ´—ç·´ã•れãŸãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ \ No newline at end of file +**注:** ã“ã®è¡¨ã«ç¤ºã™ãƒ‡ãƒ¼ã‚¿å¤‰æ›ã®ä»–ã«ã€æ¼”ç®—å­ã¨ä»–ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’組ã¿åˆã›ã‚‹ã“ã¨ã§ã€ã‚ˆã‚Šæ´—ç·´ã•れãŸãƒ‡ãƒ¼ã‚¿å¤‰æ›ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Concepts/dt_blob.md b/website/translated_docs/ja/Concepts/dt_blob.md index 802540f0f53357..23aed975f49095 100644 --- a/website/translated_docs/ja/Concepts/dt_blob.md +++ b/website/translated_docs/ja/Concepts/dt_blob.md @@ -3,68 +3,184 @@ id: blob title: BLOB --- -- BLOB (Binary Large OBjects) フィールド・変数・å¼ã¨ã¯ã€é€£ç¶šã—ãŸå¯å¤‰é•·ãƒã‚¤ãƒˆã§ã‚りã€å„ãƒã‚¤ãƒˆã‚’個々ã«ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®šå¯èƒ½ãª 1ã¤ã®ã¾ã¨ã¾ã£ãŸã‚ªãƒ–ジェクトã¨ã—ã¦å–り扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ BLOB ã®ã‚µã‚¤ã‚ºã¯ç©º (é•·ã•ãŒNULL) ã‹ã‚‰ã€æœ€å¤§ 2,147,483,647 ãƒã‚¤ãƒˆ (2GB) ã¾ã§ã§ã™ã€‚ -- BLOB ã¯å…¨ä½“ãŒãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ BLOB 変数ã¯ãƒ¡ãƒ¢ãƒªå†…ã«ã ã‘ä¿æŒã•れã€å­˜åœ¨ã—ã¾ã™ã€‚ BLOB フィールドã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ä»–フィールドã¨åŒæ§˜ã«ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ -- 大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã§ãã‚‹ä»–ã®ãƒ•ィールドタイプ (ピクãƒãƒ£ãƒ¼ãªã©) ã¨åŒæ§˜ã«ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ã‚‚BLOBフィールドã¯ãƒ¡ãƒ¢ãƒªã«è¤‡è£½ã•れã¾ã›ã‚“。 ã—ãŸãŒã£ã¦ã€`Old` ãŠã‚ˆã³ `Modified` コマンドをBLOBフィールドã«é©ç”¨ã—ã¦ã‚‚ã€è¿”ã•ã‚Œã‚‹çµæžœã¯æ„味をæŒã¡ã¾ã›ã‚“。 +BLOB (Binary Large OBject) フィールド・変数・å¼ã¨ã¯ã€é€£ç¶šã—ãŸå¯å¤‰é•·ãƒã‚¤ãƒˆã§ã‚りã€å„ãƒã‚¤ãƒˆã‚’個々ã«ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®šå¯èƒ½ãª 1ã¤ã®ã¾ã¨ã¾ã£ãŸã‚ªãƒ–ジェクトã¨ã—ã¦å–り扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ -## 引数渡ã—ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€ãŠã‚ˆã³æˆ»ã‚Šå€¤ +BLOB ã¯å…¨ä½“ãŒãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ BLOB変数ã¯ãƒ¡ãƒ¢ãƒªå†…ã«ã ã‘ä¿æŒã•れã€å­˜åœ¨ã—ã¾ã™ã€‚ BLOBフィールドã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ä»–フィールドã¨åŒæ§˜ã«ã€ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ -4D ã® BLOB ã¯ã€4D コマンドã¾ãŸã¯ 4D プラグインã®å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã€BLOB ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã—ãŸã‚Šã€é–¢æ•°ã®æˆ»ã‚Šå€¤ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’ä¿æŒã§ãã‚‹ä»–ã®ãƒ•ィールドタイプ (ピクãƒãƒ£ãƒ¼ãªã©) ã¨åŒæ§˜ã«ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’æ›´æ–°ã—ã¦ã‚‚ BLOBフィールドã¯ãƒ¡ãƒ¢ãƒªã«è¤‡è£½ã•れã¾ã›ã‚“。 ã—ãŸãŒã£ã¦ã€`Old` ãŠã‚ˆã³ `Modified` コマンドを BLOBフィールドã«é©ç”¨ã—ã¦ã‚‚ã€è¿”ã•ã‚Œã‚‹çµæžœã¯æ„味をæŒã¡ã¾ã›ã‚“。 -ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¦ã€BLOB ã‚’ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã“ã¨ã‚‚出æ¥ã¾ã™ã€‚ãã®å ´åˆã¯ BLOB ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’定義ã—ã€ãã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’パラメーターã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ +## BLOB ã®ç¨®é¡ž -**例: ** +4Dランゲージã§ã¯ã€BLOB ã‚’æ‰±ã†æ–¹æ³•㌠2ã¤ã‚りã¾ã™: + +- **スカラー値ã¨ã—ã¦**: BLOB 㯠BLOB変数ã¾ãŸã¯ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æ ¼ç´ã•れã€å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **オブジェクト (`4D.Blob`)** ã¨ã—ã¦: `4D.Blob` 㯠BLOBオブジェクトã§ã™ã€‚ オリジナル㮠BLOB を変更ã™ã‚‹ã“ã¨ãªãã€BLOBãã®ã‚‚ã®ã€ã¾ãŸã¯ãã®ä¸€éƒ¨ã‚’ `4D.Blob` ã«æ ¼ç´ã§ãã¾ã™ã€‚ ã“ã®æ–¹æ³•ã‚’ [ボクシング](https://ja.wikipedia.org/wiki/%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E5%8C%96) ã¨å‘¼ã³ã¾ã™ã€‚ `4D.Blob` をインスタンス化ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[Blobクラス](../API/BlobClass.md) ã‚’å‚ç…§ãã ã•ã„。 + +å„ BLOBタイプã«ã¯ã€ãれãžã‚Œåˆ©ç‚¹ãŒã‚りã¾ã™ã€‚ 次ã®è¡¨ã‚’å‚考ã«ã—ã¦ã€ã©ã¡ã‚‰ãŒãƒ‹ãƒ¼ã‚ºã«åˆã†ã‹ã‚’確èªã—ã¦ãã ã•ã„: + +| | BLOB | 4D.Blob | +| ------------------- |:----:|:-------:| +| 変更å¯èƒ½ | â—¯ | × | +| オブジェクトやコレクション内ã§å…±æœ‰å¯èƒ½ | × | â—¯ | +| å‚照渡ã—\* | × | â—¯ | +| ãƒã‚¤ãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹éš›ã®ãƒ‘フォーマンス | + | - | +| 最大サイズ | 2GB | メモリ | + +\*スカラーBLOB をパラメーターã¨ã—ã¦å—ã‘å–るよã†ã«è¨­è¨ˆã•れ㟠4Dコマンドã¨ã¯ç•°ãªã‚Šã€ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã‚’ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã¨ã€ãƒ¡ãƒ¢ãƒªå†…ã§è¤‡è£½ã•れã¾ã™ã€‚ メソッドを使用ã™ã‚‹å ´åˆã¯ã€å‚ç…§ã«ã‚ˆã£ã¦æ¸¡ã•れる BLOBオブジェクト (`4D.Blob`) を使用ã™ã‚‹æ–¹ãŒåŠ¹çŽ‡çš„ã§ã™ã€‚ + +> デフォルトã§ã€4D ã¯ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã®æœ€å¤§ã‚µã‚¤ã‚ºã‚’ 2GB ã«è¨­å®šã—ã¦ã„ã¾ã™ãŒã€OSや空ã容é‡ã«ã‚ˆã£ã¦ã¯ã€ã“ã®åˆ¶é™ã‚µã‚¤ã‚ºãŒå°ã•ããªã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ + +BLOB ã«æ¼”ç®—å­ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## 変数ãŒã‚¹ã‚«ãƒ©ãƒ¼BLOB 㨠`4D.Blob` ã®ã©ã¡ã‚‰ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ã‹ã®ç¢ºèª + +値㌠BLOBåž‹ã¾ãŸã¯ã‚ªãƒ–ジェクト型ã§ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã™ã‚‹ã«ã¯ã€[Value type](https://doc.4d.com/4Dv19/4D/19/Value-type.301-5392983.ja.html) コマンドを使用ã—ã¾ã™ã€‚ 特定ã®ã‚ªãƒ–ジェクト㌠BLOBオブジェクト (`4D.Blob`) ã§ã‚ã‚‹ã“ã¨ã‚’確èªã™ã‚‹ã«ã¯ã€[OB instance of](https://doc.4d.com/4Dv19/4D/19/OB-Instance-of.301-5392294.ja.html) を使用ã—ã¾ã™ã€‚ ```4d - // BLOB タイプã®å¤‰æ•°ã‚’定義ã—ã¾ã™ - C_BLOB(anyBlobVar) +var $myBlob: Blob +var $myBlobObject: 4D.Blob + +$type:= Value type($myblobObject) // 38 (オブジェクト) +$is4DBlob:= OB Instance of($myblobObject; 4D.Blob) // true +``` + +## BLOB を引数ã¨ã—ã¦æ¸¡ã™ + +スカラーBLOB ã‚„ BLOBオブジェクトã¯ã€4Dコマンドã¾ãŸã¯ 4Dプラグインã®å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### BLOB ãŠã‚ˆã³ BLOBオブジェクト㮠4Dコマンドã¸ã®å—ã‘æ¸¡ã— +BLOB を引数ã¨ã—ã¦å—ã‘å–ã‚‹ 4Dコマンドã«ã¯ã€ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã¾ãŸã¯ `4D.Blob` を渡ã™ã“ã¨ãŒã§ãã¾ã™: + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text( $myBlob ; UTF8 text without length ) +``` + +4Dコマンドã®ä¸­ã«ã¯ã€å…ƒã® BLOB を変更ã™ã‚‹ã‚‚ã®ãŒã‚りã€ã“れら㯠`4D.Blob` タイプをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“: + +- [DELETE FROM BLOB](https://doc.4d.com/4dv19/help/command/en/page560.html) +- [INSERT IN BLOB](https://doc.4d.com/4dv19/help/command/en/page559.html) +- [INTEGER TO BLOB](https://doc.4d.com/4dv19/help/command/en/page548.html) +- [LONGINT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page550.html) +- [REAL TO BLOB](https://doc.4d.com/4dv19/help/command/en/page552.html) +- [SET BLOB SIZE](https://doc.4d.com/4dv19/help/command/en/page606.html) +- [TEXT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page554.html) +- [VARIABLE TO BLOB](https://doc.4d.com/4dv19/help/command/en/page532.html) +- [LIST TO BLOB](https://doc.4d.com/4dv19/help/command/en/page556.html) +- [SOAP DECLARATION](https://doc.4d.com/4dv19/help/command/en/page782.html) +- [WEB SERVICE SET PARAMETER](https://doc.4d.com/4dv19/help/command/en/page777.html) + +### BLOB ãŠã‚ˆã³ BLOBオブジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¸ã®å—ã‘æ¸¡ã— + +BLOB ã‚„ BLOBオブジェクト (`4D.Blob`) ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ å‚ç…§ã§æ¸¡ã•れる BLOBオブジェクトã¨ã¯ç•°ãªã‚Šã€ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れるã¨ãƒ¡ãƒ¢ãƒªå†…ã§è¤‡è£½ã•れるã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +### ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã£ãŸã‚¹ã‚«ãƒ©ãƒ¼BLOB ã®å‚照渡㗠+ +スカラーBLOB をメモリ上ã«è¤‡è£½ã™ã‚‹ã“ã¨ãªããƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã«ã¯ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ãã®å ´åˆã¯ BLOB変数ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’定義ã—ã€ãã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ + +**例: ** + +```4d +// BLOBåž‹ã®å¤‰æ•°ã‚’定義ã—ã¾ã™ +var $myBlobVar: Blob // 4Dコマンドã«å¼•æ•°ã¨ã—㦠BLOB を渡ã—ã¾ã™ - SET BLOB SIZE(anyBlobVar;1024*1024) + SET BLOB SIZE($myBlobVar;1024*1024) +``` -// プラグイン㫠BLOB を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ - $errCode:=Do Something With This BLOB(anyBlobVar) +```4d +// 外部ルーãƒãƒ³ã« BLOB を引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ + $errCode:=Do Something With This blob($myBlobVar) +``` -// BLOB を引数ã¨ã—ã¦æ¸¡ã—ã€æˆ»ã‚Šå€¤ã‚’BLOBã§å—ã‘å–りã¾ã™ - C_BLOB(retrieveBlob) - retrieveBlob:=Fill_Blob(anyBlobVar) +```4d +// BLOB を引数ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã—ã€æˆ»ã‚Šå€¤ã‚’ BLOB ã§å—ã‘å–りã¾ã™ + var $retrieveBlob: Blob + retrieveBlob:=Fill_Blob($myBlobVar) +``` +```4d // BLOB ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã—ã¾ã™ - COMPUTE BLOB(->anyBlobVar) +COMPUTE BLOB(->$myBlobVar) ``` **プラグイン開発ã«ã‚ãŸã£ã¦ã®æ³¨æ„:** BLOB 引数㯠“&O†(æ•°å­—ã®0ã§ã¯ãªãã€ã‚¢ãƒ«ãƒ•ァベットã®"O") ã¨ã—ã¦å®£è¨€ã—ã¾ã™ã€‚ -## 代入 +## BLOB変数ã®ä»£å…¥ -BLOB ã¯ç›¸äº’ã«ä»£å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +BLOB変数ã¯ç›¸äº’ã«ä»£å…¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: **例: ** ```4d - // BLOB åž‹ã®å¤‰æ•°ã‚’二ã¤å®£è¨€ã—ã¾ã™ - C_BLOB(vBlobA;vBlobB) +// BLOBåž‹ã®å¤‰æ•°ã‚’二ã¤å®£è¨€ã—ã¾ã™ + var $vBlobA; $vBlobB : Blob // 一ã¤ç›®ã® BLOB ã«10K ã®ã‚µã‚¤ã‚ºã‚’割り当ã¦ã¾ã™ - SET BLOB SIZE(vBlobA;10*1024) + SET BLOB SIZE($vBlobA;10*1024) // 一ã¤ç›®ã® BLOB を二ã¤ç›®ã® BLOB ã«ä»£å…¥ã—ã¾ã™ - vBlobB:=vBlobA + $vBlobB:=$vBlobA +``` + +## BLOB ã®è‡ªå‹•å¤‰æ› + +スカラーBLOB ㌠BLOBオブジェクト㫠(ã¾ãŸã¯ãã®é€†) 割り当ã¦ã‚‰ã‚Œã‚‹ã¨ã€4Dã¯ãれらを自動的ã«å¤‰æ›ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +// BLOBåž‹ã®å¤‰æ•°ã¨ã‚ªãƒ–ジェクト変数を作æˆã—ã¾ã™ +var $myBlob: Blob +var $myObject : Object + +// $myObject ã® "blob" ã¨ã„ã†ãƒ—ロパティ㫠BLOB変数を代入ã—ã¾ã™ +$myObject:=New object("blob"; $myBlob) + +// $myBlob ã«æ ¼ç´ã•れる BLOB ã¯è‡ªå‹•的㫠4D.Blob ã«å¤‰æ›ã•れã¾ã™ +$type:= OB Instance of($myObject.blob; 4D.Blob) // true + +// 4D.Blob ã‹ã‚‰ スカラーBLOB ã¸ã®å¤‰æ› +$myBlob:= $myObject.blob +$type:= Value type($myBlob) // BLOB +``` + +> `4D.Blob` をスカラーBLOB ã«å¤‰æ›ã™ã‚‹éš›ã«ã€`4D.Blob` ã®ã‚µã‚¤ã‚ºãŒã‚¹ã‚«ãƒ©ãƒ¼BLOB ã®æœ€å¤§ã‚µã‚¤ã‚ºã‚’è¶…ãˆã‚‹å ´åˆã€çµæžœã®ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã¯ç©ºã«ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã®æœ€å¤§ã‚µã‚¤ã‚ºãŒ 2GB ã®å ´åˆã€2.5GB ã® `4D.Blob` をスカラーBLOB ã«å¤‰æ›ã™ã‚‹ã¨ã€ç©ºã® BLOB ãŒå¾—られã¾ã™ã€‚ + +## スカラーBLOB ã®å¤‰æ›´ + +BLOBオブジェクトã¨ã¯ç•°ãªã‚Šã€ã‚¹ã‚«ãƒ©ãƒ¼BLOB ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +var $myBlob : Blob +SET BLOB SIZE ($myBlob ; 16*1024) ``` -ãŸã ã—ã€BLOB ã«æ¼”ç®—å­ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +## BLOB内ãƒã‚¤ãƒˆã¸ã®å€‹åˆ¥ã‚¢ã‚¯ã‚»ã‚¹ -## BLOB ã®ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®š +#### スカラーBLOB ã®ãƒã‚¤ãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ -中カッコ {...} を使用ã—ã€BLOB ã®å„ãƒã‚¤ãƒˆã‚’個別ã«ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ BLOB 内ã§ã¯ã€å„ãƒã‚¤ãƒˆã« 0 ã‹ã‚‰ N-1 ã®ç•ªå·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚N 㯠BLOB ã®ã‚µã‚¤ã‚ºã§ã™ã€‚ 例: +中カッコ {...} を使用ã—ã€BLOB ã®å„ãƒã‚¤ãƒˆã‚’個別ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ BLOB 内ã§ã¯ã€å„ãƒã‚¤ãƒˆã« 0 ã‹ã‚‰ N-1 ã®ç•ªå·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚N 㯠BLOB ã®ã‚µã‚¤ã‚ºã§ã™: ```4d - // BLOB を定義ã—ã¾ã™ - C_BLOB(vBlob) -// BLOB ã®ã‚µã‚¤ã‚ºã‚’ 256ãƒã‚¤ãƒˆã«è¨­å®šã—ã¾ã™ - SET BLOB SIZE(vBlob;256) -// 次ã®ãƒ«ãƒ¼ãƒ—ã¯ã€BLOB ã® 256ãƒã‚¤ãƒˆã‚’ゼロã«åˆæœŸåŒ–ã—ã¾ã™ - For(vByte;0;BLOB size(vBlob)-1) - vBlob{vByte}:=0 + // BLOB型変数を定義ã—ã¾ã™ + var $vBlob : Blob + // BLOB ã®ã‚µã‚¤ã‚ºã‚’ 256ãƒã‚¤ãƒˆã«è¨­å®šã—ã¾ã™ + SET BLOB SIZE($vBlob;256) + // 次ã®ãƒ«ãƒ¼ãƒ—ã¯ã€BLOB ã®å„ãƒã‚¤ãƒˆã‚’ゼロã«åˆæœŸåŒ–ã—ã¾ã™ + For(vByte;0;BLOB size($vBlob)-1) + $vBlob{vByte}:=0 End for ``` -BLOB ã®å„ãƒã‚¤ãƒˆã¯ã™ã¹ã¦å€‹åˆ¥ã«ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®šã§ãã‚‹ãŸã‚ã€BLOB フィールドã¾ãŸã¯å¤‰æ•°ã«ã¯å®Ÿéš›ã®ã¨ã“ã‚何ã§ã‚‚æ ¼ç´ã§ãã¾ã™ã€‚ \ No newline at end of file +BLOB ã®å„ãƒã‚¤ãƒˆã¯ã™ã¹ã¦å€‹åˆ¥ã«ã‚¢ãƒ‰ãƒ¬ã‚¹æŒ‡å®šã§ãã‚‹ãŸã‚ã€BLOB変数ã¾ãŸã¯ãƒ•ィールドã«ã¯ä½•ã§ã‚‚æ ¼ç´ã§ãã¾ã™ã€‚ + +#### `4D.Blob` ã®ãƒã‚¤ãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +大カッコ [...] を使用ã—ã€`4D.Blob` ã®å„ãƒã‚¤ãƒˆã‚’個別ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text ( $myBlob ; UTF8 text without length ) +$byte:=$myBlob[5] +``` + +`4D.Blob` ã¯å¤‰æ›´ã§ããªã„ãŸã‚ã€ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§ `4D.Blob` ã®ãƒã‚¤ãƒˆã‚’読むã“ã¨ã¯ã§ãã¾ã™ãŒã€å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 diff --git a/website/translated_docs/ja/Concepts/dt_boolean.md b/website/translated_docs/ja/Concepts/dt_boolean.md index f4e2213259de1a..4eb42820e38bbe 100644 --- a/website/translated_docs/ja/Concepts/dt_boolean.md +++ b/website/translated_docs/ja/Concepts/dt_boolean.md @@ -3,7 +3,7 @@ id: boolean title: ブール --- -ブールã®ãƒ•ィールドã€å¤‰æ•°ã€å¼ã¯ã€TRUE(真)ã¾ãŸã¯FALSE(å½ï¼‰ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ã€‚ +ブールã®ãƒ•ィールドã€å¤‰æ•°ã€å¼ã¯ã€true(真)ã¾ãŸã¯false(å½ï¼‰ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ã€‚ ## ブール関数 @@ -11,13 +11,13 @@ title: ブール ### 例題 -ボタンã®å€¤ã«åŸºã¥ã„ã¦ã€ãƒ–ール変数ã«å€¤ã‚’設定ã—ã¾ã™ã€‚ myButton ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚‰ myBoolean ã« True ã‚’ã€ã‚¯ãƒªãƒƒã‚¯ã•れã¦ã„ãªã‘れ㰠False を設定ã—ã¾ã™ã€‚ ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ãƒœã‚¿ãƒ³å¤‰æ•°ã®å€¤ã¯1ã«ãªã‚Šã¾ã™ã€‚ +ボタンã®å€¤ã«åŸºã¥ã„ã¦ã€ãƒ–ール変数ã«å€¤ã‚’設定ã—ã¾ã™ã€‚ myButton ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚‰ myBoolean ã« true ã‚’ã€ã‚¯ãƒªãƒƒã‚¯ã•れã¦ã„ãªã‘れ㰠false を設定ã—ã¾ã™ã€‚ ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ãƒœã‚¿ãƒ³å¤‰æ•°ã®å€¤ã¯1ã«ãªã‚Šã¾ã™ã€‚ ```4d If(myButton=1) // ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚‰ - myBoolean:=True // myBoolean ã‚’ True ã«è¨­å®š + myBoolean:=True // myBoolean ã‚’ true ã«è¨­å®š Else // ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れã¦ã„ãªã‘れ㰠- myBoolean:=False // myBoolean ã‚’ False ã«è¨­å®š + myBoolean:=False // myBoolean ã‚’ false ã«è¨­å®š End if ``` @@ -29,17 +29,16 @@ myBoolean:=(myButton=1) ## è«–ç†æ¼”ç®—å­ -4Dã¯ã€ãƒ–ールå¼ã«å¯¾ã—ã¦æ©Ÿèƒ½ã™ã‚‹æ¬¡ã®è«–ç†æ¼”ç®—å­ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: è«–ç†ç© (AND) ã¨è«–ç†å’Œ (OR)。 è«–ç†ç© (AND) ã¯ä¸¡æ–¹ã®å¼ãŒ TRUE ã§ã‚ã‚‹å ´åˆã« TRUE ã‚’è¿”ã—ã¾ã™ã€‚ è«–ç†å’Œ (OR) ã¯å°‘ãªãã¨ã‚‚一方ã®å¼ãŒ TRUE ã®æ™‚ã« TRUE ã‚’è¿”ã—ã¾ã™ã€‚ 次ã®è¡¨ã«ã€è«–ç†æ¼”ç®—å­ã‚’示ã—ã¾ã™: - -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | -| --- | -------------- | --- | --------------------------- | ----- | -| AND | ブール & ブール | ブール | ("A" = "A") & (15 # 3) | True | -| | | | ("A" = "B") & (15 # 3) | False | -| | | | ("A" = "B") & (15 = 3) | False | -| OR | ブール | ブール | ブール | ("A" = "A") | (15 # 3) | True | -| | | | ("A" = "B") | (15 # 3) | True | -| | | | ("A" = "B") | (15 = 3) | False | +4Dã¯ã€ãƒ–ールå¼ã«å¯¾ã—ã¦æ©Ÿèƒ½ã™ã‚‹æ¬¡ã®è«–ç†æ¼”ç®—å­ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: è«–ç†ç© (AND) ã¨è«–ç†å’Œ (OR)。 è«–ç†ç© (AND) ã¯ä¸¡æ–¹ã®å¼ãŒ true ã§ã‚ã‚‹å ´åˆã« true ã‚’è¿”ã—ã¾ã™ã€‚ è«–ç†å’Œ (OR) ã¯å°‘ãªãã¨ã‚‚一方ã®å¼ãŒ true ã®æ™‚ã« true ã‚’è¿”ã—ã¾ã™ã€‚ 次ã®è¡¨ã«ã€è«–ç†æ¼”ç®—å­ã‚’示ã—ã¾ã™: +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | +| --- | -------------- | --- | ---------------------------- | ----- | +| AND | ブール & ブール | ブール | ("A" = "A") & (15 # 3) | True | +| | | | ("A" = "B") & (15 # 3) | False | +| | | | ("A" = "B") & (15 = 3) | False | +| OR | ブール | ブール | ブール | ("A" = "A") | (15 # 3) | True | +| | | | ("A" = "B") | (15 # 3) | True | +| | | | ("A" = "B") | (15 = 3) | False | è«–ç†æ¼”ç®—å­ (AND) ã®çœŸå½è¡¨ã‚’示ã—ã¾ã™: @@ -50,7 +49,6 @@ myBoolean:=(myButton=1) | False | True | False | | False | False | False | - è«–ç†æ¼”ç®—å­ (OR) ã®çœŸå½è¡¨ã‚’示ã—ã¾ã™: | Expr1 | Expr2 | Expr1 | Expr2 | @@ -60,9 +58,8 @@ myBoolean:=(myButton=1) | False | True | True | | False | False | False | - **Tip:** å¼1ã¨å¼2ã®æŽ’ä»–çš„çµåˆå­æ¼”算を実行ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€æ¬¡ã®è©•価å¼ã‚’使用ã—ã¾ã™: ```4d (Expr1|Expr2) & Not(Expr1 & Expr2) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/ja/Concepts/dt_collection.md b/website/translated_docs/ja/Concepts/dt_collection.md index 31ba64775b4f98..02cb709aaf9465 100644 --- a/website/translated_docs/ja/Concepts/dt_collection.md +++ b/website/translated_docs/ja/Concepts/dt_collection.md @@ -3,9 +3,9 @@ id: collection title: コレクション --- -コレクションã¨ã¯ã€é¡žä¼¼ã¾ãŸã¯æ··åœ¨ã—ãŸåž‹ (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ã‚ªãƒ–ジェクトã€ãƒ–ールã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€null) ã®å€¤ãŒé †ç•ªã«ä¸¦ã¹ã‚‰ã‚ŒãŸãƒªã‚¹ãƒˆã§ã™ã€‚ +コレクションã¨ã¯ã€é¡žä¼¼ã¾ãŸã¯æ··åœ¨ã—ãŸåž‹ (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€æ—¥ä»˜ã€ã‚ªãƒ–ジェクトã€ãƒ–ールã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€null) ã®å€¤ãŒé †ç•ªã«ä¸¦ã¹ã‚‰ã‚ŒãŸãƒªã‚¹ãƒˆã§ã™ã€‚ -コレクション型ã®å¤‰æ•°ã‚’扱ã†ã«ã¯ã€ã‚ªãƒ–ジェクト記法を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ ([オブジェクト記法ã®ä½¿ç”¨](Concepts/dt_object.md#オブジェクト記法ã®ä½¿ç”¨) å‚ç…§)。 +コレクション型ã®å¤‰æ•°ã‚’扱ã†ã«ã¯ã€ã‚ªãƒ–ジェクト記法を使用ã—ã¾ã™ ([オブジェクト記法ã®ä½¿ç”¨](Concepts/dt_object.md#オブジェクト記法ã®ä½¿ç”¨) å‚ç…§)。 コレクションè¦ç´ ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€å¤§ã‚«ãƒƒã‚³å†…ã«è¦ç´ ç•ªå·ã‚’渡ã—ã¾ã™: @@ -13,7 +13,7 @@ title: コレクション collectionRef[expression] ``` -expression ã«ã¯æ­£ã®æ•´æ•°ã‚’è¿”ã™æœ‰åŠ¹ãª 4D å¼ã§ã‚れã°ã©ã‚“ãªã‚‚ã®ã§ã‚‚渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: +*expression* ã«ã¯æ­£ã®æ•´æ•°ã‚’è¿”ã™æœ‰åŠ¹ãª 4Då¼ã§ã‚れã°ã©ã‚“ãªã‚‚ã®ã§ã‚‚渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: ```4d myCollection[5] // コレクションã®6番目ã®è¦ç´ ã«ã‚¢ã‚¯ã‚»ã‚¹ @@ -22,7 +22,7 @@ expression ã«ã¯æ­£ã®æ•´æ•°ã‚’è¿”ã™æœ‰åŠ¹ãª 4D å¼ã§ã‚れã°ã©ã‚“ãªã‚‚ **注:** コレクションè¦ç´ ã¯0 番ã‹ã‚‰å§‹ã¾ã‚‹ã¨ã„ã†ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 -オブジェクト記法を使用ã—ã¦ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã«å€¤ã‚’代入ã—ãŸã‚Šã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®å€¤ã‚’å–å¾—ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +コレクションã®è¦ç´ ã«å€¤ã‚’代入ã—ãŸã‚Šã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã®å€¤ã‚’å–å¾—ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ```4d myCol[10]:="My new element" @@ -32,7 +32,7 @@ expression ã«ã¯æ­£ã®æ•´æ•°ã‚’è¿”ã™æœ‰åŠ¹ãª 4D å¼ã§ã‚れã°ã©ã‚“ãªã‚‚ ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€å¾Œã®è¦ç´ ã‚’è¶…ãˆã‚‹è¦ç´ ç•ªå· (インデックス) を指定ã—ãŸå ´åˆã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«ãƒªã‚µã‚¤ã‚ºã•れã€é€”中ã®ã™ã¹ã¦ã®å€¤ã«ã¯ null 値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‰ã¾ã™: ```4d - C_COLLECTION(myCol) + var myCol : Collection myCol:=New collection("A";"B") myCol[5]:="Z" //myCol[2]=null @@ -44,27 +44,25 @@ expression ã«ã¯æ­£ã®æ•´æ•°ã‚’è¿”ã™æœ‰åŠ¹ãª 4D å¼ã§ã‚れã°ã©ã‚“ãªã‚‚ `New collection` コマンドを使ã†ãªã©ã—ã¦ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚らã‹ã˜ã‚åˆæœŸåŒ–ã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚åˆæœŸåŒ–ã—ãªã„å ´åˆã€è¦ç´ ã®å–得や変更ã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã¨ãªã‚Šã¾ã™ã€‚ -例: +例: ```4d - C_COLLECTION($colVar) // コレクション型ã®å¤‰æ•°ã®å®£è¨€ - $colVar:=New collection // コレクションã®åˆæœŸåŒ–ã¨å¤‰æ•°ã¸ã®ä»£å…¥ + var $colVar : Collection // コレクション型㮠4D変数ã®å®£è¨€ + $colVar:=New collection // コレクションã®åˆæœŸåŒ–㨠4D変数ã¸ã®ä»£å…¥ ``` -### 通常コレクションã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ +### 通常コレクションã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ 二種類ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- `New collection` コマンドを使用ã—ã¦ä½œæˆã™ã‚‹é€šå¸¸ (éžå…±æœ‰) コレクション。 通常ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ç‰¹åˆ¥ãªã‚¢ã‚¯ã‚»ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ã›ãšã«ç·¨é›†å¯èƒ½ã§ã™ãŒã€ãƒ—ロセス間ã§å…±æœ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -- `New shared collection` コマンドを使用ã—ã¦ä½œæˆã™ã‚‹å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ 共有コレクションã¯ãƒ—ロセス間 (プリエンティブ・スレッドå«ã‚€) ã§å…±æœ‰å¯èƒ½ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ 共有コレクションã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ `Use...End use` 構造ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¦ã„ã¾ã™ã€‚ è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](Concepts/shared.md) ã‚’å‚ç…§ãã ã•ã„。 +- [`New collection`](API/CollectionClass.md#new-collection) コマンドを使用ã—ã¦ä½œæˆã™ã‚‹é€šå¸¸ (éžå…±æœ‰) コレクション。 通常ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ç‰¹åˆ¥ãªã‚¢ã‚¯ã‚»ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ã›ãšã«ç·¨é›†å¯èƒ½ã§ã™ãŒã€ãƒ—ロセス間ã§å…±æœ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- [`New shared collection`](API/CollectionClass.md#new-shared-collection) コマンドを使用ã—ã¦ä½œæˆã™ã‚‹å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ 共有コレクションã¯ãƒ—ロセス間 (プリエンティブ・スレッドå«ã‚€) ã§å…±æœ‰å¯èƒ½ãªã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ 共有コレクションã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ [`Use...End use`](Concepts/shared.md#useend-use) 構造ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¦ã„ã¾ã™ã€‚ -## コレクションメソッド +è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](Concepts/shared.md) ã‚’å‚ç…§ãã ã•ã„。 -4D コレクションã¸ã®å‚ç…§ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® *メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰* ã¨å‘¼ã°ã‚Œã‚‹ç‰¹åˆ¥ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクト記法ã«ã‚ˆã£ã¦ã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ã§ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å‚ç…§ã«å¯¾ã—ã¦é©ç”¨ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™: +## コレクション関数 -> {$result:=}myCollection.memberMethod( {params} ) - -引数ãŒãªãã¦ã‚‚ã€ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¿…ãšå°ã‚«ãƒƒã‚³ () 付ãã§å‘¼ã³å‡ºã™ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。ãã†ã§ãªã„å ´åˆã«ã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +4D コレクションã¸ã®å‚ç…§ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã® *メンãƒãƒ¼é–¢æ•°* ã¨å‘¼ã°ã‚Œã‚‹ç‰¹åˆ¥ãªã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ コレクション関数㯠[クラス API リファレンス](API/CollectionClass.md) ã«ã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°: @@ -73,21 +71,23 @@ $newCol:=$col.copy() // $col ã‚’ $newCol ã«ãƒ‡ã‚£ãƒ¼ãƒ—・コピー $col.push(10;100) // 10 㨠100 をコレクションã«è¿½åŠ  ``` -一部ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¦è¿”ã™ã®ã§ã€ã¤ãŽã®ã‚ˆã†ã«é€£ç¶šã—ã¦å‘¼ã³å‡ºã™ã“ã¨ãŒå¯èƒ½ã§ã™: +一部ã®é–¢æ•°ã¯å…ƒã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã—ã¦è¿”ã™ã®ã§ã€ã¤ãŽã®ã‚ˆã†ã«é€£ç¶šã—ã¦å‘¼ã³å‡ºã™ã“ã¨ãŒå¯èƒ½ã§ã™: ```4d $col:=New collection(5;20) $col2:=$col.push(10;100).sort() // $col2=[5,10,20,100] ``` + ### propertyPath 引数 -ã„ãã¤ã‹ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•°ã¨ã—㦠*propertyPath* ã‚’å—ã‘入れã¾ã™ã€‚ ã“ã®å¼•æ•°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ç”¨ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +ã„ãã¤ã‹ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³é–¢æ•°ã¯å¼•æ•°ã¨ã—㦠_propertyPath_ ã‚’å—ã‘入れã¾ã™ã€‚ ã“ã®å¼•æ•°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ç”¨ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™: - オブジェクトプロパティå〠例ãˆã° "lastName" - オブジェクトプロパティパス (ドット文字ã§ç¹‹ã’られãŸã‚µãƒ–プロパティã®éšŽå±¤ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ãªã©)。例: "employee.children.firstName" -**警告:** メソッド㫠propertyPath 引数を渡ã™å ´åˆã€ãã®ãƒ—ロパティåã«ã¯ "." (ドット)ã€"[ ]" (大カッコ)ã€ã‚ã‚‹ã„㯠" " (スペース) を使ãˆã¾ã›ã‚“。ã“れらを使用ã™ã‚‹ã¨ãƒ‘スを正ã—ãè§£æžã§ããªããªã‚Šã¾ã™: +**警告:** 関数㫠propertyPath 引数を渡ã™å ´åˆã€ãã®ãƒ—ロパティåã«ã¯ "." (ドット)ã€"[ ]" (大カッコ)ã€ã‚ã‚‹ã„㯠" " (スペース) を使ãˆã¾ã›ã‚“。ã“れらを使用ã™ã‚‹ã¨ãƒ‘スを正ã—ãè§£æžã§ããªããªã‚Šã¾ã™: ```4d $vmin:=$col.min("My.special.property") // undefined diff --git a/website/translated_docs/ja/Concepts/dt_date.md b/website/translated_docs/ja/Concepts/dt_date.md index f737ba7a0d6865..7bebda3a47533e 100644 --- a/website/translated_docs/ja/Concepts/dt_date.md +++ b/website/translated_docs/ja/Concepts/dt_date.md @@ -3,8 +3,9 @@ id: date title: 日付 --- -- 日付フィールドã€å¤‰æ•°ã€å¼ã¨ã—ã¦èªè­˜ã§ãる範囲ã¯ã€100/1/1 ã‹ã‚‰ 32,767/12/31 ã¾ã§ã§ã™ã€‚(日本語版㮠4D を使用ã—ãŸå ´åˆã€æ—¥ä»˜ã®é †åºã¯å¹´/月/æ—¥ã®é †ã«ãªã‚Šã¾ã™ã€‚) -- C_DATE ã«ã‚ˆã£ã¦å®£è¨€ã•ã‚ŒãŸæ—¥ä»˜ã¯ 32767å¹´ã¾ã§ã®ç¯„囲ã«å¯¾å¿œã—ã¦ã„ã¾ã™ãŒã€ã‚·ã‚¹ãƒ†ãƒ ã‚’経由ã™ã‚‹å‡¦ç†ã«ã‚ˆã£ã¦ã¯ä¸Šé™ã«ã•らãªã‚‹åˆ¶é™ãŒèª²ã›ã‚‰ã‚Œã¾ã™ã€‚ +日付フィールドã€å¤‰æ•°ã€å¼ã¨ã—ã¦èªè­˜ã§ãる範囲ã¯ã€100/1/1 ã‹ã‚‰ 32,767/12/31 ã¾ã§ã§ã™ã€‚(日本語版㮠4D を使用ã—ãŸå ´åˆã€æ—¥ä»˜ã®é †åºã¯å¹´/月/æ—¥ã®é †ã«ãªã‚Šã¾ã™ã€‚) + +C_DATE ã«ã‚ˆã£ã¦å®£è¨€ã•ã‚ŒãŸæ—¥ä»˜ã¯ 32767å¹´ã¾ã§ã®ç¯„囲ã«å¯¾å¿œã—ã¦ã„ã¾ã™ãŒã€ã‚·ã‚¹ãƒ†ãƒ ã‚’経由ã™ã‚‹å‡¦ç†ã«ã‚ˆã£ã¦ã¯ä¸Šé™ã«ã•らãªã‚‹åˆ¶é™ãŒèª²ã›ã‚‰ã‚Œã¾ã™ã€‚ **注:** 4D ランゲージリファレンスã§ã¯ã€ã‚³ãƒžãƒ³ãƒ‰èª¬æ˜Žã«ãŠã‘る日付引数ã¯ã¨ãã«æ˜Žè¨˜ã•れã¦ã„ãªã„é™ã‚Šã€ã€Œæ—¥ä»˜ã€ã¨è¡¨è¨˜ã•れã¦ã„ã¾ã™ã€‚ @@ -18,31 +19,31 @@ title: 日付 !2015-12-31! ``` -ç©ºã®æ—¥ä»˜ã¯ã€ *!00-00-00!* ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™ã€‚ +ç©ºã®æ—¥ä»˜ã¯ã€ _!00-00-00!_ ã®ã‚ˆã†ã«æŒ‡å®šã—ã¾ã™ã€‚ **Tip:** メソッドエディターã§ã¯ç©ºã®æ—¥ä»˜ã‚’入力ã™ã‚‹ãŸã‚ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãŒæä¾›ã•れã¦ã„ã¾ã™ã€‚ ç©ºã®æ—¥ä»˜ã‚’入力ã™ã‚‹ã«ã¯ã€ã‚¨ã‚¯ã‚¹ã‚¯ãƒ©ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒžãƒ¼ã‚¯ (!) ã®å…¥åŠ›å¾Œã« Enterキーを押ã—ã¾ã™ã€‚ **注:** -- äº’æ›æ€§ã®ç†ç”±ã‹ã‚‰ã€4D ã¯äºŒæ¡ã®å¹´æ¬¡ã®å…¥åŠ›ã‚’å—ã‘付ã‘ã¾ã™ã€‚ 数字㌠30以上ã®å ´åˆã¯ 20世紀 (1900年代)ã€30未満ã®å ´åˆã¯ 21世紀 (2000年代) ã§ã‚ã‚‹ã¨èªè­˜ã—ã¾ã™ (ãŸã ã—デフォルト設定㌠```SET DEFAULT CENTURY``` コマンドを使用ã—ã¦å¤‰æ›´ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã¾ã™)。 -- "地域特有ã®ã‚·ã‚¹ãƒ†ãƒ è¨­å®šã‚’使ã†" オプション ([メソッドページ](https://doc.4d.com/4Dv18/4D/18/Methods-Page.300-4575690.ja.html) å‚ç…§) ã«ãƒã‚§ãƒƒã‚¯ãŒã•れã¦ã„ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã§å®šç¾©ã•れã¦ã„る日付フォーマットを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 一般的ã«ã€US環境ã«ãŠã„ã¦ã¯ã€æ—¥ä»˜ã¯æœˆ/æ—¥/å¹´ã®å½¢å¼ã§å…¥åŠ›ã•れã€å€¤ã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ "/" ã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ +- äº’æ›æ€§ã®ç†ç”±ã‹ã‚‰ã€4D ã¯äºŒæ¡ã®å¹´æ¬¡ã®å…¥åŠ›ã‚’å—ã‘付ã‘ã¾ã™ã€‚ 数字㌠30以上ã®å ´åˆã¯ 20世紀 (1900年代)ã€30未満ã®å ´åˆã¯ 21世紀 (2000年代) ã§ã‚ã‚‹ã¨èªè­˜ã—ã¾ã™ (ãŸã ã—デフォルト設定㌠`SET DEFAULT CENTURY` コマンドを使用ã—ã¦å¤‰æ›´ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šã¾ã™)。 +- "地域特有ã®ã‚·ã‚¹ãƒ†ãƒ è¨­å®šã‚’使ã†" オプション ([メソッドページ](https://doc.4d.com/4Dv18/4D/18/Methods-Page.300-4575690.ja.html) å‚ç…§) ã«ãƒã‚§ãƒƒã‚¯ãŒã•れã¦ã„ã‚‹å ´åˆã€ã‚·ã‚¹ãƒ†ãƒ ã§å®šç¾©ã•れã¦ã„る日付フォーマットを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 一般的ã«ã€US環境ã«ãŠã„ã¦ã¯ã€æ—¥ä»˜ã¯æœˆ/æ—¥/å¹´ã®å½¢å¼ã§å…¥åŠ›ã•れã€å€¤ã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ "/" ã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ ## æ—¥ä»˜æ¼”ç®—å­ -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | -| ----- | ------------ | --- | ---------------------------- | ------------ | -| 日付ã®å·® | 日付 - 日付 | 数値 | !2017-01-20! - !2017-01-01! | 19 | -| 日付ã®åŠ ç®— | 日付 + 数値 | 日付 | !2017-01-20! + 9 | !2017-01-29! | -| æ—¥ä»˜ã®æ¸›ç®— | 日付 - 数値 | 日付 | !2017-01-20! - 9 | !2017-01-11! | -| ç­‰ã—ã„ | 日付 = 日付 | ブール | !2017-01-01! =!2017-01-01! | True | -| | | | !2017-01-20! = !2017-01-01! | False | -| ç•°ãªã‚‹ | 日付 # 日付 | ブール | !2017-01-20! # !2017-01-01! | True | -| | | | !2017-01-20! # !2017-01-20! | False | -| 大ãã„ | 日付 > 日付 | ブール | !2017-01-20! > !2017-01-01! | True | -| | | | !2017-01-20! > !2017-01-20! | False | -| å°ã•ã„ | 日付 < 日付 | ブール | !2017-01-01! < !2017-01-20! | True | -| | | | !2017-01-20! < !2017-01-20! | False | -| 以上 | 日付 >= 日付 | ブール | !2017-01-20! >=!2017-01-01! | True | -| | | | !2017-01-01!>=!2017-01-20! | False | -| 以下 | 日付 \<= Date | ブール | !2017-01-01!\<=!2017-01-20! | True | -| | | | !2017-01-20!\<=!2017-01-01! | False | \ No newline at end of file +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | +| ----- | ---------- | --- | ---------------------------- | ------------ | +| 日付ã®å·® | 日付 - 日付 | 数値 | !2017-01-20! - !2017-01-01! | 19 | +| 日付ã®åŠ ç®— | 日付 + 数値 | 日付 | !2017-01-20! + 9 | !2017-01-29! | +| æ—¥ä»˜ã®æ¸›ç®— | 日付 - 数値 | 日付 | !2017-01-20! - 9 | !2017-01-11! | +| ç­‰ã—ã„ | 日付 = 日付 | ブール | !2017-01-01! =!2017-01-01! | True | +| | | | !2017-01-20! = !2017-01-01! | False | +| ç•°ãªã‚‹ | 日付 # 日付 | ブール | !2017-01-20! # !2017-01-01! | True | +| | | | !2017-01-20! # !2017-01-20! | False | +| 大ãã„ | 日付 > 日付 | ブール | !2017-01-20! > !2017-01-01! | True | +| | | | !2017-01-20! > !2017-01-20! | False | +| å°ã•ã„ | 日付 < 日付 | ブール | !2017-01-01! < !2017-01-20! | True | +| | | | !2017-01-20! < !2017-01-20! | False | +| 以上 | 日付 >= 日付 | ブール | !2017-01-20! >=!2017-01-01! | True | +| | | | !2017-01-01!>=!2017-01-20! | False | +| 以下 | 日付 \<= 日付 | ブール | !2017-01-01!\<=!2017-01-20! | True | +| | | | !2017-01-20!\<=!2017-01-01! | False | diff --git a/website/translated_docs/ja/Concepts/dt_null_undefined.md b/website/translated_docs/ja/Concepts/dt_null_undefined.md index 400c735e519f1c..c55f08e4942d6e 100644 --- a/website/translated_docs/ja/Concepts/dt_null_undefined.md +++ b/website/translated_docs/ja/Concepts/dt_null_undefined.md @@ -3,6 +3,8 @@ id: null-undefined title: Null 㨠未定義 --- +Null ãŠã‚ˆã³æœªå®šç¾©ã¯ã€å¼ã®å€¤ãŒæœªçŸ¥ã®ã‚±ãƒ¼ã‚¹ã‚’扱ã†ãƒ‡ãƒ¼ã‚¿åž‹ã§ã™ã€‚ + ## Null Null 㯠**null** ã®å€¤ã®ã¿ã‚’ã¨ã‚‹ã“ã¨ã®ã§ãる特殊ãªãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã§ã™ã€‚ ã“ã®å€¤ã¯ã€å€¤ã‚’æŒãŸãªã„å¼ã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ @@ -27,12 +29,12 @@ $vEmp:=New object $vEmp.name:="Smith" $vEmp.children:=Null -$undefined:=Undefined($vEmp.name) // False -$null:=($vEmp.name=Null) //False +$undefined:=Undefined($vEmp.name) // false +$null:=($vEmp.name=Null) //false -$undefined:=Undefined($vEmp.children) // False -$null:=($vEmp.children=Null) //True +$undefined:=Undefined($vEmp.children) // false +$null:=($vEmp.children=Null) //true -$undefined:=Undefined($vEmp.parent) // True -$null:=($vEmp.parent=Null) //True -``` \ No newline at end of file +$undefined:=Undefined($vEmp.parent) // true +$null:=($vEmp.parent=Null) //true +``` diff --git a/website/translated_docs/ja/Concepts/dt_number.md b/website/translated_docs/ja/Concepts/dt_number.md index 72006e0f87e553..ab1d24e493e3b9 100644 --- a/website/translated_docs/ja/Concepts/dt_number.md +++ b/website/translated_docs/ja/Concepts/dt_number.md @@ -5,8 +5,8 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) 数値ã¨ã¯ã€ä»¥ä¸‹ã‚’示ã™ç·ç§°ã§ã™: -- 実数ã®ãƒ•ィールドã€å¤‰æ•°ã€ã¾ãŸã¯å¼ã€‚ 実数データタイプã®ç¯„囲ã¯ã€Â±1.7e±308 (有効数字13æ¡) ã§ã™ã€‚ -- å€é•·æ•´æ•°ã®ãƒ•ィールドã€å¤‰æ•°ã€ã¾ãŸã¯å¼ã€‚ å€é•·æ•´æ•° (4ãƒã‚¤ãƒˆæ•´æ•°) データタイプã®ç¯„囲ã¯ã€-2^31..(2^31)-1ã§ã™ã€‚ +- 実数ã®ãƒ•ィールドã€å¤‰æ•°ã€ã¾ãŸã¯å¼ã€‚ 実数データタイプã®ç¯„囲ã¯ã€Â±1.7e±308 (有効数字13æ¡) ã§ã™ã€‚ +- å€é•·æ•´æ•°ã®ãƒ•ィールドã€å¤‰æ•°ã€ã¾ãŸã¯å¼ã€‚ å€é•·æ•´æ•° (4ãƒã‚¤ãƒˆæ•´æ•°) データタイプã®ç¯„囲ã¯ã€-2^31..(2^31)-1ã§ã™ã€‚ - æ•´æ•°ã®ãƒ•ィールドã€å¤‰æ•°ã€ã¾ãŸã¯å¼ã€‚ æ•´æ•° (2ãƒã‚¤ãƒˆæ•´æ•°) データタイプã®ç¯„囲ã¯ã€-32,768..32,767 (2^15..(2^15)-1)ã§ã™ã€‚ **注:** 整数フィールドã®å€¤ã¯ã€4D ランゲージã§ä½¿ç”¨ã•れる際ã«ã¯è‡ªå‹•çš„ã«å€é•·æ•´æ•°ã«å¤‰æ›ã•れã¾ã™ã€‚ @@ -15,6 +15,7 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) **注:** 4D ランゲージリファレンスã§ã¯ã€å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«é–¢ã‚らãšã€ã‚³ãƒžãƒ³ãƒ‰èª¬æ˜Žã«ãŠã‘ã‚‹å®Ÿæ•°ã€æ•´æ•°ã€å€é•·æ•´æ•°ã®å¼•æ•°ã¯ã¨ãã«æ˜Žè¨˜ã•れã¦ã„ãªã„é™ã‚Šã€æ•°å€¤ã¨è¡¨è¨˜ã•れã¦ã„ã¾ã™ã€‚ + ## 数値リテラル 数値リテラル定数ã¯ã€å®Ÿæ•°ã¨ã—ã¦è¨˜è¿°ã—ã¾ã™ã€‚ ä¸‹è¨˜ã«æ•°å€¤å®šæ•°ã®ä¾‹ã‚’ã„ãã¤ã‹ç¤ºã—ã¾ã™: @@ -37,28 +38,27 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) ## æ•°å€¤æ¼”ç®—å­ -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | -| --------- | ------------ | --- | -------- | ----- | -| 加算 (è¶³ã—ç®—) | 数値 + 数値 | 数値 | 2 + 3 | 5 | -| 減算 (引ãç®—) | 数値 - 数値 | 数値 | 3 – 2 | 1 | -| ä¹—ç®— (ã‹ã‘ç®—) | 数値 * 数値 | 数値 | 5 * 2 | 10 | -| 除算 (割り算) | 数値 / 数値 | 数値 | 5 / 2 | 2.5 | -| å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®— | 数値 \ 数値 | 数値 | 5 \ 2 | 2 | -| モジューロ | 数値 % 数値 | 数値 | 5 % 2 | 1 | -| 指数 | 数値 ^ 数値 | 数値 | 2 ^ 3 | 8 | -| ç­‰ã—ã„ | 数値 = 数値 | ブール | 10 = 10 | True | -| | | | 10 = 11 | False | -| ç•°ãªã‚‹ | 数値 # 数値 | ブール | 10 # 11 | True | -| | | | 10 # 10 | False | -| 大ãã„ | 数値 > 数値 | ブール | 11 > 10 | True | -| | | | 10 > 11 | False | -| å°ã•ã„ | 数値 < 数値 | ブール | 10 < 11 | True | -| | | | 11 < 10 | False | -| 以上 | 数値 >= 数値 | ブール | 11 >= 10 | True | -| | | | 10 >= 11 | False | -| 以下 | 数値 <= Number | ブール | 10 <= 11 | True | -| | | | 11 <= 10 | False | - +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | +| --------- | -------- | --- | -------- | ----- | +| 加算 (è¶³ã—ç®—) | 数値 + 数値 | 数値 | 2 + 3 | 5 | +| 減算 (引ãç®—) | 数値 - 数値 | 数値 | 3 – 2 | 1 | +| ä¹—ç®— (ã‹ã‘ç®—) | 数値 * 数値 | 数値 | 5 * 2 | 10 | +| 除算 (割り算) | 数値 / 数値 | 数値 | 5 / 2 | 2.5 | +| å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®— | 数値 \ 数値 | 数値 | 5 \ 2 | 2 | +| モジューロ | 数値 % 数値 | 数値 | 5 % 2 | 1 | +| 指数 | 数値 ^ 数値 | 数値 | 2 ^ 3 | 8 | +| ç­‰ã—ã„ | 数値 = 数値 | ブール | 10 = 10 | True | +| | | | 10 = 11 | False | +| ç•°ãªã‚‹ | 数値 # 数値 | ブール | 10 # 11 | True | +| | | | 10 # 10 | False | +| 大ãã„ | 数値 > 数値 | ブール | 11 > 10 | True | +| | | | 10 > 11 | False | +| å°ã•ã„ | 数値 < 数値 | ブール | 10 < 11 | True | +| | | | 11 < 10 | False | +| 以上 | 数値 >= 数値 | ブール | 11 >= 10 | True | +| | | | 10 >= 11 | False | +| 以下 | 数値 <= 数値 | ブール | 10 <= 11 | True | +| | | | 11 <= 10 | False | ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ­æ¼”ç®—å­ % ã¯æœ€åˆã®æ•°å€¤ã‚’ 2ç•ªç›®ã®æ•°å€¤ã§é™¤ç®—ã—ã€ãã®ä½™ã‚Šã®æ•´æ•°ã‚’è¿”ã—ã¾ã™ã€‚ 次ã«ä¾‹ã‚’示ã—ã¾ã™: @@ -67,9 +67,8 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) - 10.5 % 2ã¯ã€0ã‚’è¿”ã—ã¾ã™ã€‚ä½™ã‚ŠãŒæ•´æ•°ã§ã¯ãªã„ (0.25) ã‹ã‚‰ã§ã™ã€‚ **警告:** - - ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ­æ¼”ç®—å­ % ã¯å€é•·æ•´æ•°ã®ç¯„囲内 (-2^31 ã‹ã‚‰ (2^31)-1 ã¾ã§) ã®æ•°å€¤ã«å¯¾ã—ã¦æœ‰åйãªå€¤ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ç¯„å›²å¤–ã®æ•°å€¤ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ­æ¼”算を実行ã™ã‚‹ã«ã¯ã€`Mod` コマンドを使用ã—ã¾ã™ã€‚ -- å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®—æ¼”ç®—å­ \ ã¯ã€æ•´æ•°å€¤ã®æœ‰åŠ¹å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +- å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®—æ¼”ç®—å­ \ ã¯ã€æ•´æ•°å€¤ã®æœ‰åŠ¹å€¤ã‚’è¿”ã—ã¾ã™ã€‚ ### å„ªå…ˆé †ä½ @@ -91,6 +90,7 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) カッコã¯ã€ä»–ã®ã‚«ãƒƒã‚³ã®çµ„ã®å†…å´ã«ãƒã‚¹ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å¼ã®è©•ä¾¡ãŒæ­£ã—ããŠã“ãªã‚れるよã†ã«ã€å¿…ãšå„左カッコã«å¯¾å¿œã™ã‚‹å³ã‚«ãƒƒã‚³ã‚’指定ã—ã¦ãã ã•ã„。 カッコã®ä¸è¶³ã¾ãŸã¯èª¤ç”¨ã¯ã€äºˆæ¸¬ã§ããªã„çµæžœã‚„ã€å¼ã®ç„¡åŠ¹åŒ–ã«ã¤ãªãŒã‚Šã¾ã™ã€‚ ã¾ãŸã‚³ãƒ³ãƒ‘イルã™ã‚‹å ´åˆã¯ã€å·¦ã‚«ãƒƒã‚³ã¨å³ã‚«ãƒƒã‚³ã¯åŒã˜æ•°ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。組ã«ãªã£ã¦ã„ãªã„カッコã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã¨ã—ã¦æ¤œå‡ºã•れã¾ã™ã€‚ + ## ãƒ“ãƒƒãƒˆãƒ¯ã‚¤ã‚ºæ¼”ç®—å­ ãƒ“ãƒƒãƒˆãƒ¯ã‚¤ã‚ºæ¼”ç®—å­ã¯ã€**å€é•·æ•´æ•°** å¼ã‚„値ã«å¯¾ã—ã¦æ¼”ç®—ã‚’ãŠã“ãªã„ã¾ã™ã€‚ @@ -99,7 +99,7 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) ビットワイズ演算å­ã‚’使用ã™ã‚‹å ´åˆã€å€é•·æ•´æ•°å€¤ã‚’32ビットã®é…列ã¨è€ƒãˆã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“れらã®ãƒ“ットã«ã¯ã€å³ã‹ã‚‰å·¦ã«0~31ã®ç•ªå·ãŒä»˜ã‘られã¾ã™ã€‚ -ãれãžã‚Œã®ãƒ“ットã¯0ã‹1ãªã®ã§ã€å€é•·æ•´æ•°å€¤ã¯32ã®ãƒ–ール値を格ç´ã§ãる値ã¨è€ƒãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 1ã«ç­‰ã—ã„ビット㯠**True**ã€0ã«ç­‰ã—ã„ビット㯠**False** ã‚’æ„味ã—ã¾ã™ã€‚ +ãれãžã‚Œã®ãƒ“ットã¯0ã‹1ãªã®ã§ã€å€é•·æ•´æ•°å€¤ã¯32ã®ãƒ–ール値を格ç´ã§ãる値ã¨è€ƒãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 1ã«ç­‰ã—ã„ビット㯠**true**ã€0ã«ç­‰ã—ã„ビット㯠**false** ã‚’æ„味ã—ã¾ã™ã€‚ ビットワイズ演算å­ã‚’使用ã™ã‚‹å¼ã¯å€é•·æ•´æ•°å€¤ã‚’è¿”ã—ã¾ã™ã€‚Bit Test 演算å­ã®å ´åˆã€å¼ã¯ä¾‹å¤–çš„ã«ãƒ–ール値を返ã—ã¾ã™ã€‚ 次ã®è¡¨ã«ãƒ“ットワイズ演算å­ã¨ãã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’示ã—ã¾ã™: @@ -114,72 +114,35 @@ title: 数値 (実数ã€å€é•·æ•´æ•°ã€æ•´æ•°) | Bit Clear | ?- | Long ?- Long | Long (注記2 å‚ç…§) | | Bit Test | ?? | Long ?? Long | Boolean (注記2 å‚ç…§) | - #### 注記 1. `Left Bit Shift` ãŠã‚ˆã³ `Right Bit Shift` 演算ã§ã¯ã€2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¯ã€çµæžœå€¤ã«ãŠã„ã¦1番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットãŒã‚·ãƒ•トã•れるビット数を示ã—ã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€ã“ã®2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¯ã€0~31ã®é–“ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 0ビットシフトã™ã‚‹ã¨ãã®å€¤ãŒãã®ã¾ã¾è¿”ã•れã¾ã™ã€‚ã¾ãŸã€31ビットより多ãシフトã™ã‚‹ã¨ã™ã¹ã¦ã®ãƒ“ットãŒãªããªã‚‹ã®ã§ã€0x00000000ãŒè¿”ã•れã¾ã™ã€‚ ãれ以外ã®å€¤ã‚’2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¨ã—ã¦æ¸¡ã—ãŸå ´åˆã€çµæžœã¯æ„味ã®ãªã„値ã«ãªã‚Šã¾ã™ã€‚ 2. `Bit Set`ã€`Bit Clear`ã€`Bit Test` 演算ã§ã¯ã€2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¯ã€ä½œç”¨ã®å¯¾è±¡ã¨ãªã‚‹ãƒ“ット番å·ã‚’示ã—ã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€ã“ã®2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã¯0 ~ 31ã®é–“ã§ã™ã€‚ãã†ã§ãªã„å ´åˆã€å¼ã®çµæžœã¯æ„味ã®ãªã„ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + + 次ã®è¡¨ã¯ã€ãƒ“ットワイズ演算å­ã¨ãã®åŠ¹æžœã‚’ç¤ºã—ã¾ã™: -| æ¼”ç®—å­ | 説明 | -| ----------- | -------------------------------- | -| Bitwise AND | ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®è«–ç†ANDã§ã™ã€‚ | - - -< - -下記ã¯ã€è«–ç†ANDã®çœŸå½è¡¨ã§ã™: - -- 1 & 1 --> 1 - - 0 & 1 --> 0 - - 1 & 0 --> 0 - - 0 & 0 --> 0

        - < - - p>ã™ãªã‚ã¡ã€ä¸¡ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットãŒ1ã®å ´åˆã€çµæžœãƒ“ットãŒ1ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ットãŒ0ã«ãªã‚Šã¾ã™ã€‚| |Bitwise OR (inclusive)|ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®è«–ç†ORã§ã™ã€‚ - - < - - p>下記ã¯ã€è«–ç†ORã®çœŸå½è¡¨ã§ã™: - - - 1 | 1 --> 1 - - 0 | 1 --> 1 - - 1 | 0 --> 1 - - 0 | 0 --> 0

        - < - - p>ã™ãªã‚ã¡ã€ã„ãšã‚Œã‹ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットãŒï¼‘ã®å ´åˆã€çµæžœãƒ“ットãŒ1ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ットãŒ0ã«ãªã‚Šã¾ã™ã€‚| |Bitwise OR (exclusive)|ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ãƒƒãƒˆã®æŽ’ä»–çš„è«–ç†ORã§ã™ã€‚ - - < - - p>下記ã¯ã€æŽ’他的論ç†ORã®çœŸå½è¡¨ã§ã™: - - - 1 \^| 1 --> 0 - - 0 \^| 1 --> 1 - - 1 \^| 0 --> 1 - - 0 \^| 0 --> 0

        - < - - p>ã™ãªã‚ã¡ã€ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®ã„ãšã‚Œã‹ä¸€æ–¹ã ã‘ãŒï¼‘ã®å ´åˆã€çµæžœãƒ“ットãŒï¼‘ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ットãŒ0ã«ãªã‚Šã¾ã™ã€‚| |Left Bit Shift|最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットãŒ2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ット数ã ã‘å·¦ã«ã‚·ãƒ•トã—ã¾ã™ã€‚ å·¦å´ã®ãƒ“ットãŒãªããªã‚Šã€å³å´ã®æ–°ã—ã„ビットã¯0ã«è¨­å®šã•れã¾ã™ã€‚ - - < - - p>**注記:** æ­£ã®æ•°ã ã‘を考ãˆã‚‹ã¨ã€Nビット左ã«ã‚·ãƒ•トã™ã‚‹ã“ã¨ã¯ã€2^Nを掛ã‘ã‚‹ã“ã¨ã¨åŒã˜ã§ã™ã€‚| |Right Bit Shift|最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットãŒ2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ット数ã ã‘å³ã«ã‚·ãƒ•トã—ã¾ã™ã€‚ å³å´ã®ãƒ“ットãŒãªããªã‚Šã€å·¦å´ã®æ–°ã—ã„ビットã¯0ã«è¨­å®šã•れã¾ã™ã€‚ - - < - - p>**注記:** æ­£ã®æ•°ã ã‘を考ãˆã‚‹ã¨ã€Nビット左ã«ã‚·ãƒ•トã™ã‚‹ã“ã¨ã¯ã€2^Nã§å‰²ã‚‹ã“ã¨ã¨åŒã˜ã§ã™ã€‚| |Bit Set|最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットã®ã†ã¡2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ットãŒ1ã«è¨­å®šã•れã¾ã™ã€‚ ä»–ã®ãƒ“ットã¯ãã®ã¾ã¾ã§ã™ã€‚| |Bit Clear|最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットã®ã†ã¡2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ットãŒ0ã«è¨­å®šã•れã¾ã™ã€‚ ä»–ã®ãƒ“ットã¯ãã®ã¾ã¾ã§ã™ã€‚| |Bit Test|最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ã†ã¡ã€2番目ã®ãƒ“ットã§ç¤ºã•れãŸãƒ“ットãŒ1ã®å ´åˆã€TrueãŒè¿”ã•れã¾ã™ã€‚ 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ã†ã¡ã€2番目ã®ãƒ“ットã§ç¤ºã•れãŸãƒ“ットãŒ0ã®å ´åˆã€FalseãŒè¿”ã•れã¾ã™ã€‚| - - ### 例題 - - | æ¼”ç®—å­ | 例題 | 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 +| æ¼”ç®—å­ | 説明 | +| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Bitwise AND | ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®è«–ç†ANDã§ã™ã€‚

        下記ã¯ã€è«–ç†ANDã®çœŸå½è¡¨ã§ã™:

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

        ã™ãªã‚ã¡ã€ä¸¡ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ット㌠1 ã®å ´åˆã€çµæžœãƒ“ット㌠1 ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ット㌠0 ã«ãªã‚Šã¾ã™ã€‚ | +| Bitwise OR (inclusive) | ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®è«–ç†ORã§ã™ã€‚

        下記ã¯ã€è«–ç†ORã®çœŸå½è¡¨ã§ã™:

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

        ã™ãªã‚ã¡ã€ã„ãšã‚Œã‹ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ット㌠1 ã®å ´åˆã€çµæžœãƒ“ット㌠1 ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ット㌠0 ã«ãªã‚Šã¾ã™ã€‚ | +| Bitwise OR (exclusive) | ãれãžã‚Œã®çµæžœãƒ“ットã¯2ã¤ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ãƒƒãƒˆã®æŽ’ä»–çš„è«–ç†ORã§ã™ã€‚

        下記ã¯ã€æŽ’他的論ç†ORã®çœŸå½è¡¨ã§ã™:

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

        ã™ãªã‚ã¡ã€ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ãƒ“ットã®ã„ãšã‚Œã‹ä¸€æ–¹ã ã‘㌠1 ã®å ´åˆã€çµæžœãƒ“ット㌠1 ã«ãªã‚Šã€ãã®ä»–ã®å ´åˆã¯çµæžœãƒ“ット㌠0 ã«ãªã‚Šã¾ã™ã€‚ | +| Left Bit Shift | 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットãŒ2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ット数ã ã‘å·¦ã«ã‚·ãƒ•トã—ã¾ã™ã€‚ å·¦å´ã®ãƒ“ットãŒãªããªã‚Šã€å³å´ã®æ–°ã—ã„ビットã¯0ã«è¨­å®šã•れã¾ã™ã€‚

        **注記:** æ­£ã®æ•°ã ã‘を考ãˆã‚‹ã¨ã€Nビット左ã«ã‚·ãƒ•トã™ã‚‹ã“ã¨ã¯ã€2^Nを掛ã‘ã‚‹ã“ã¨ã¨åŒã˜ã§ã™ã€‚ | +| Right Bit Shift | 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットãŒ2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ット数ã ã‘å³ã«ã‚·ãƒ•トã—ã¾ã™ã€‚ å³å´ã®ãƒ“ットãŒãªããªã‚Šã€å·¦å´ã®æ–°ã—ã„ビットã¯0ã«è¨­å®šã•れã¾ã™ã€‚

        **注記:** æ­£ã®æ•°ã ã‘を考ãˆã‚‹ã¨ã€Nビットå³ã«ã‚·ãƒ•トã™ã‚‹ã“ã¨ã¯ã€2^Nã§å‰²ã‚‹ã“ã¨ã¨åŒã˜ã§ã™ã€‚ | +| Bit Set | 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットã®ã†ã¡2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ットãŒ1ã«è¨­å®šã•れã¾ã™ã€‚ ä»–ã®ãƒ“ットã¯ãã®ã¾ã¾ã§ã™ã€‚ | +| Bit Clear | 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰å€¤ãŒçµæžœå€¤ã«è¨­å®šã•ã‚Œã€æ¬¡ã«çµæžœãƒ“ットã®ã†ã¡2番目ã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã§ç¤ºã•れãŸãƒ“ットãŒ0ã«è¨­å®šã•れã¾ã™ã€‚ ä»–ã®ãƒ“ットã¯ãã®ã¾ã¾ã§ã™ã€‚ | +| Bit Test | 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ã†ã¡ã€2番目ã®ãƒ“ットã§ç¤ºã•れãŸãƒ“ットãŒ1ã®å ´åˆã€trueãŒè¿”ã•れã¾ã™ã€‚ 最åˆã®ã‚ªãƒšãƒ©ãƒ³ãƒ‰ã®ã†ã¡ã€2番目ã®ãƒ“ットã§ç¤ºã•れãŸãƒ“ットãŒ0ã®å ´åˆã€falseãŒè¿”ã•れã¾ã™ã€‚ | + +### 例題 + +| æ¼”ç®—å­ | 例題 | 戻り値 | +| ---------------------- | ------------------------------- | ---------- | +| 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 | diff --git a/website/translated_docs/ja/Concepts/dt_object.md b/website/translated_docs/ja/Concepts/dt_object.md index c7b98ec1c527b4..d2b84936f9fb1d 100644 --- a/website/translated_docs/ja/Concepts/dt_object.md +++ b/website/translated_docs/ja/Concepts/dt_object.md @@ -5,38 +5,38 @@ title: オブジェクト オブジェクト型ã®å¤‰æ•°ãƒ»ãƒ•ィールド・å¼ã«ã¯ã•ã¾ã–ã¾ãªãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D ã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãªã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ§‹é€ ã¯ã€ã‚ˆãã‚る「プロパティ/値ã€(ã¾ãŸã¯ã€Œå±žæ€§/値ã€) ã¨ã„ã†ãƒšã‚¢ (連想é…列) ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ ã“れらオブジェクトã®è¨˜æ³•㯠JSON ã‚’ã‚‚ã¨ã«ã—ã¦ã„ã¾ã™ãŒã€å®Œå…¨ã«åŒã˜ã¨ã„ã†ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 -- プロパティåã¯å¿…ãšãƒ†ã‚­ã‚¹ãƒˆã§è¡¨ç¾ã•れã¾ã™ã€‚ +- プロパティåã¯å¿…ãšãƒ†ã‚­ã‚¹ãƒˆã§è¡¨ç¾ã•れã¾ã™ã€‚ プロパティåã«ã¯ [命åè¦å‰‡](identifiers.md#オブジェクトプロパティ) ãŒã‚りã¾ã™ã€‚ - プロパティ値ã¯ä»¥ä¸‹ã®ã©ã‚Œã‹ã®åž‹ã§è¡¨ç¾ã•れã¾ã™: - - 数値 (å®Ÿæ•°ã€æ•´æ•°ã€ç­‰) - - テキスト + - text - null - - ブール + - boolean - ãƒã‚¤ãƒ³ã‚¿ãƒ¼ (`JSON Stringify` コマンドã®ä½¿ç”¨ã€ã¾ãŸã¯ã‚³ãƒ”ーã®éš›ã«è©•価ã•れã¾ã™) - 日付 (日付型ã‚ã‚‹ã„㯠ISO日付フォーマット文字列) - - オブジェクト (オブジェクトã¯å…¥ã‚Œå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™) - - ピクãƒãƒ£ãƒ¼ (*) - - コレクション + - オブジェクト(1) (オブジェクトã¯å…¥ã‚Œå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™) + - ピクãƒãƒ£ãƒ¼(2) + - collection -(*) デãƒãƒƒã‚¬ãƒ¼å†…ã§ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦è¡¨ç¤ºã—ãŸã‚Šã€JSON ã¸ã¨æ›¸ã出ã•れãŸã‚Šã—ãŸå ´åˆã€ãƒ”クãƒãƒ£ãƒ¼åž‹ã®ã‚ªãƒ–ジェクトプロパティ㯠"[object Picture]" ã¨è¡¨ã•れã¾ã™ã€‚ +(1) [エンティティ](ORDA/dsMapping.md#エンティティ) ã‚„ [エンティティセレクション](ORDA/dsMapping.md#エンティティセレクション) ãªã©ã® ORDAオブジェクト㯠**オブジェクトフィールド** ã«ã¯ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ãŒã€ãƒ¡ãƒ¢ãƒªå†…ã® **オブジェクト変数** ã«ä¿å­˜ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ + +(2) デãƒãƒƒã‚¬ãƒ¼å†…ã§ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦è¡¨ç¤ºã—ãŸã‚Šã€JSON ã¸ã¨æ›¸ã出ã•れãŸã‚Šã—ãŸå ´åˆã€ãƒ”クãƒãƒ£ãƒ¼åž‹ã®ã‚ªãƒ–ジェクトプロパティ㯠"[object Picture]" ã¨è¡¨ã•れã¾ã™ã€‚ **警告:** 属性åã¯å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã™ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 -オブジェクト型ã®å¤‰æ•°ãƒ»ãƒ•ィールド・å¼ã‚’æ“作ã™ã‚‹ã«ã¯ **オブジェクト (ランゲージ)** テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã‹ã€ã‚ªãƒ–ジェクト記法 ([オブジェクト記法ã®ä½¿ç”¨](Concepts/dt_object.md#オブジェクト記法ã®ä½¿ç”¨) å‚ç…§)を用ã„ã¾ã™ã€‚ オブジェクト型フィールドã«å¯¾ã—ã¦å‡¦ç†ã‚’ãŠã“ãªã†ã«ã¯ `QUERY BY ATTRIBUTE`ã€`QUERY SELECTION BY ATTRIBUTE` ã‚„ `ORDER BY ATTRIBUTE` ãªã©ã€ã‚¯ã‚¨ãƒªãƒ†ãƒ¼ãƒžã®ç‰¹å®šã®ã‚³ãƒžãƒ³ãƒ‰ã‚‚使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +オブジェクト型ã®å¤‰æ•°ãƒ»ãƒ•ィールド・å¼ã‚’æ“作ã™ã‚‹ã«ã¯ [オブジェクト記法](dt_object.md#オブジェクト記法ã®ä½¿ç”¨) を用ã„ã‚‹ã‹ã€**オブジェクト (ランゲージ)** ãƒ†ãƒ¼ãƒžãŒæä¾›ã™ã‚‹å¾“æ¥ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¾ã™ã€‚ オブジェクト型フィールドã«å¯¾ã—ã¦å‡¦ç†ã‚’ãŠã“ãªã†ã«ã¯ `QUERY BY ATTRIBUTE`ã€`QUERY SELECTION BY ATTRIBUTE` ã‚„ `ORDER BY ATTRIBUTE` ãªã©ã€**クエリ** テーマã®ç‰¹å®šã®ã‚³ãƒžãƒ³ãƒ‰ã‚‚使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -オブジェクト記法を使ã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•れãŸãれãžã‚Œã®ãƒ—ロパティ値ã¯å¼ã¨ã¿ãªã•れã¾ã™ã€‚ データベース内ã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆè¨˜æ³•ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆ (以下å‚ç…§)ã€4D内ã§å¼ãŒæœŸå¾…ã•れる場所ã§ã‚れã°ã€ã©ã“ã§ã‚‚ã“ã®ã‚ˆã†ãªå€¤ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +オブジェクト記法を使ã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•れãŸãれãžã‚Œã®ãƒ—ロパティ値ã¯å¼ã¨ã¿ãªã•れã¾ã™ã€‚ 4D内ã§å¼ãŒæœŸå¾…ã•れる場所ã§ã‚れã°ã€ã©ã“ã§ã‚‚ã“ã®ã‚ˆã†ãªå€¤ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- 4Dコード内。メソッド (メソッドエディター) ã«æ›¸ã„ã¦ã‚‚ã€å¤–部化(フォーミュラã€PROCESS 4D TAGS ã‚ã‚‹ã„㯠Web Server ã«ã‚ˆã£ã¦å‡¦ç†ã•れる 4D tags ファイルã€4D Write Proドキュメントãªã©) ã—ã¦ã‚‚使用å¯èƒ½ã§ã™ã€‚ +- 4Dコード内。メソッド (メソッドエディター) ã«æ›¸ã„ã¦ã‚‚ã€å¤–部化(フォーミュラã€`PROCESS 4D TAGS` ã‚ã‚‹ã„㯠Web Server ã«ã‚ˆã£ã¦å‡¦ç†ã•れる 4D tags ファイルã€4D Write Proドキュメントãªã©) ã—ã¦ã‚‚使用å¯èƒ½ã§ã™ã€‚ - デãƒãƒƒã‚¬ãƒ¼åŠã³ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®å¼ã‚¨ãƒªã‚¢å†…。 -- フォームエディターã«ãŠã„ã¦ã€ãƒ•ォームオブジェクトã®ãƒ—ロパティリスト内。変数ã‚ã‚‹ã„ã¯å¼ãƒ•ィールド内ã®ä»–ã€æ§˜ã€…ãªã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åŠã³ã‚«ãƒ©ãƒ ã®å¼ (データソースã€èƒŒæ™¯è‰²ã€ã‚¹ã‚¿ã‚¤ãƒ«ã€ãƒ•ォントカラー等) ã«ãŠã„ã¦ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ +- フォームエディターã«ãŠã„ã¦ã€ãƒ•ォームオブジェクトã®ãƒ—ロパティリスト内。変数ã‚ã‚‹ã„ã¯å¼ãƒ•ィールド内ã®ä»–ã€æ§˜ã€…ãªã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åŠã³ã‚«ãƒ©ãƒ ã®å¼ (データソースã€èƒŒæ™¯è‰²ã€ã‚¹ã‚¿ã‚¤ãƒ«ã€ãƒ•ォントカラー等) ã«ãŠã„ã¦ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ ## åˆæœŸåŒ– `New object` コマンドを使ã†ãªã©ã—ã¦ã€ã‚ªãƒ–ジェクトã¯ã‚らã‹ã˜ã‚åˆæœŸåŒ–ã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚åˆæœŸåŒ–ã—ãªã„å ´åˆã€ãƒ—ロパティ値ã®å–得や変更ã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã¨ãªã‚Šã¾ã™ã€‚ -例: - +例: ```4d C_OBJECT($obVar) // オブジェクト型ã®å¤‰æ•°ã®ä½œæˆ $obVar:=New object // オブジェクトã®åˆæœŸåŒ–ã¨å¤‰æ•°ã¸ã®ä»£å…¥ @@ -46,9 +46,10 @@ title: オブジェクト 二種類ã®ã‚ªãƒ–ジェクトを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- `New object` コマンドを使用ã—ã¦ä½œæˆã™ã‚‹é€šå¸¸ (éžå…±æœ‰) コレクション。 通常ã®ã‚ªãƒ–ジェクトã¯ç‰¹åˆ¥ãªã‚¢ã‚¯ã‚»ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ã›ãšã«ç·¨é›†å¯èƒ½ã§ã™ãŒã€ãƒ—ロセス間ã§å…±æœ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- `New object` コマンドを使用ã—ã¦ä½œæˆã™ã‚‹é€šå¸¸ (éžå…±æœ‰) コレクション。 通常ã®ã‚ªãƒ–ジェクトã¯ç‰¹åˆ¥ãªã‚¢ã‚¯ã‚»ã‚¹ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’ã›ãšã«ç·¨é›†å¯èƒ½ã§ã™ãŒã€ãƒ—ロセス間ã§å…±æœ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 - `New shared object` コマンドを使用ã—ã¦ä½œæˆã™ã‚‹å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ 共有オブジェクトã¯ãƒ—ロセス間 (プリエンティブ・スレッドå«ã‚€) ã§å…±æœ‰å¯èƒ½ãªã‚ªãƒ–ジェクトã§ã™ã€‚ 共有オブジェクトã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ `Use...End use` 構造ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¦ã„ã¾ã™ã€‚ è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](Concepts/shared.md) ã‚’å‚ç…§ãã ã•ã„。 + ## オブジェクト記法ã®ä½¿ç”¨ オブジェクト記法を使ã†ã¨ã€ãƒˆãƒ¼ã‚¯ãƒ³ã®ãƒã‚§ãƒ¼ãƒ³ã‚’通ã—ã¦ã‚ªãƒ–ジェクトã®ãƒ—ロパティ値ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -59,16 +60,14 @@ title: オブジェクト - "ドット"記å·ã‚’使用ã™ã‚‹æ–¹æ³•: > object.propertyName -例: - +例: ```4d employee.name:="Smith" ``` - å¤§ã‚«ãƒƒã‚³å†…ã®æ–‡å­—列を使用ã™ã‚‹æ–¹æ³•: > object["propertyName"] -例: - +例: ```4d $vName:=employee["name"] // ã¾ãŸã¯: @@ -78,14 +77,12 @@ title: オブジェクト ``` オブジェクトプロパティ値ã«ã¯ã€ã‚ªãƒ–ジェクトやコレクションも設定ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã“れらã®ã‚µãƒ–プロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã€ã‚ªãƒ–ジェクト記法ã§ã¯é€£ç¶šã—ãŸå­—å¥ã‚’å—ã‘入れるã“ã¨ãŒã§ãã¾ã™: - ```4d $vAge:=employee.children[2].age ``` - オブジェクトを格ç´ã€ã‚ã‚‹ã„ã¯è¿”ã™ã‚らゆるランゲージè¦ç´ ã«å¯¾ã—ã¦ã‚ªãƒ–ジェクト記法を使用ã§ãã¾ã™ã€‚ãŸã¨ãˆã°: -- **オブジェクト** 自身 (変数ã€ãƒ•ィールドã€ã‚ªãƒ–ジェクトプロパティã€ã‚ªãƒ–ジェクトé…列ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ãªã©ã«ä¿å­˜ã•れã¦ã„ã‚‹ã‚‚ã®) 例: +- **オブジェクト** 自身 (変数ã€ãƒ•ィールドã€ã‚ªãƒ–ジェクトプロパティã€ã‚ªãƒ–ジェクトé…列ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ãªã©ã«ä¿å­˜ã•れã¦ã„ã‚‹ã‚‚ã®) 例: ```4d $age:=$myObjVar.employee.age // 変数 @@ -94,14 +91,14 @@ title: オブジェクト $pop:=$aObjCountries{2}.population // オブジェクトé…列 $val:=$myCollection[3].subvalue // コレクションè¦ç´  ``` +- オブジェクトを返㙠**4D コマンド** 例: -- オブジェクトを返㙠**4D コマンド** 例: ```4d $measures:=Get database measures.DB.tables ``` -- オブジェクトを返㙠**プロジェクトメソッド** 例: +- オブジェクトを返㙠**プロジェクトメソッド** 例: ```4d // MyMethod1 @@ -112,7 +109,7 @@ title: オブジェクト $result:=MyMethod1.a //10 ``` -- **コレクション** Example: +- **コレクション** 例: ```4d myColl.length // コレクションã®é•·ã• @@ -125,14 +122,12 @@ title: オブジェクト ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã£ã¦ã‚ªãƒ–ジェクトプロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€ç›´æŽ¥ã‚ªãƒ–ジェクトを使用ã™ã‚‹å ´åˆã¨æ–¹æ³•ãŒä¼¼ã¦ã„ã¾ã™ãŒã€"ドット" 記å·ã¯çœç•¥ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ - オブジェクト記法ã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹: - - > pointerOnObject->propertyName +> pointerOnObject->propertyName - 大カッコを使用ã™ã‚‹æ–¹æ³•: - - > pointerOnObject->["propertyName"] +> pointerOnObject->["propertyName"] -例: +例: ```4d C_OBJECT(vObj) @@ -196,13 +191,13 @@ title: オブジェクト End case ``` -- 未定義ã®å€¤ã‚’既存ã®ã‚ªãƒ–ジェクトプロパティã«ä»£å…¥ã—ãŸå ´åˆã€ãã®å€¤ã¯åž‹ã«å¿œã˜ã¦åˆæœŸåŒ–ã€ã‚ã‚‹ã„ã¯æ¶ˆåŽ»ã•れã¾ã™: +- 未定義ã®å€¤ã‚’既存ã®ã‚ªãƒ–ジェクトプロパティã«ä»£å…¥ã—ãŸå ´åˆã€ãã®å€¤ã¯åž‹ã«å¿œã˜ã¦åˆæœŸåŒ–ã€ã‚ã‚‹ã„ã¯æ¶ˆåŽ»ã•れã¾ã™: - オブジェクトã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼: Null - ピクãƒãƒ£ãƒ¼: 空ã®ãƒ”クãƒãƒ£ãƒ¼ - ブール: False - 文字列: "" - 数値: 0 - - 日付: "オブジェクトã§ã¯ISO日付フォーマットã®ä»£ã‚ã‚Šã«æ—¥ä»˜åž‹ã‚’使用ã™ã‚‹" è¨­å®šãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã¯ !00-00-00!ã€ãれ以外ã®å ´åˆã«ã¯ "" + - 日付: "オブジェクトã§ã¯ISO日付フォーマットã®ä»£ã‚ã‚Šã«æ—¥ä»˜åž‹ã‚’使用ã™ã‚‹" è¨­å®šãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã¯ !00-00-00!ã€ãれ以外ã®å ´åˆã«ã¯ "" - 時間: 0 (ミリ秒å˜ä½) - 未定義ã€Null: 変化ãªã— @@ -221,18 +216,6 @@ title: オブジェクト // 文字列ã®å€¤ãŒå¾—られるよã†ã«ã—ã¾ã™ ``` -## ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£è­˜åˆ¥å­ - -トークンメンãƒãƒ¼å (ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクト記法を使用ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã‚ªãƒ–ジェクトプロパティå) ã«ã¯ã€æ¨™æº–ã® 4Dオブジェクトåより厳格ãªè¦åˆ¶ãŒã‚りã¾ã™ã€‚ プロパティå㯠JavaScriptã®å­—奿–‡æ³•ã«å‰‡ã£ã¦ãªã‘れã°ãªã‚Šã¾ã›ã‚“ ([ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6) å‚ç…§): - -- 1文字目ã¯ã€æ–‡å­—ã€ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)ã€ã‚ã‚‹ã„ã¯ãƒ‰ãƒ«è¨˜å· ($) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€æ–‡å­—ã€æ•°å­—ã€ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã€ã¾ãŸã¯ãƒ‰ãƒ«è¨˜å·ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (スペース文字ã¯ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 -- å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ - -**注:** - -- テーブルフィールドをコレクションインデックスã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“㨠(例: a.b[[Table1]Id] ) ã¯è¨±å¯ã•れã¦ã„ã¾ã›ã‚“。 ã“ã®å ´åˆã«ã¯åª’介ã¨ã—ã¦å¤‰æ•°ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -- 大カッコã§ããã£ãŸæ–‡å­—列を使用ã—ã¦ã‚ªãƒ–ジェクト属性を作æˆã™ã‚‹ã¨ã€ECMAスクリプトã®ãƒ«ãƒ¼ãƒ«ã‚’無視ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€$o["My Att.name"] ã¨ã„ã†å±žæ€§ã¯ã‚¹ãƒšãƒ¼ã‚¹ã‚’å«ã¿ã¾ã™ãŒã€4D ã«ãŠã„ã¦æœ‰åйã§ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã“ã®å ´åˆã€ã“ã®å±žæ€§ã«å¯¾ã—ã¦ãƒ‰ãƒƒãƒˆè¨˜æ³•を使用ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚ ## 例題 @@ -275,8 +258,7 @@ title: オブジェクト $vCity:=$Emp.city // "Paris" $vPhone:=$Emp.phone.home // "0011223344" ``` - -- 大カッコ [ ] を使用ã™ã‚‹ã¨æ–‡å­—列を使ã£ã¦ãƒ—ロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™: +- 大カッコ [ ] を使用ã™ã‚‹ã¨æ–‡å­—列を使ã£ã¦ãƒ—ロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™: ```4d $Emp["city"]:="Berlin" // city プロパティを変更 @@ -287,4 +269,4 @@ title: オブジェクト $Emp[$addr+String($i)]:="" End for // $Emp object ã«ã¯4ã¤ã®ç©ºã®ãƒ—ロパティ "address1...address4" ãŒä½œæˆã•れã¾ã—㟠-``` \ No newline at end of file +``` diff --git a/website/translated_docs/ja/Concepts/dt_picture.md b/website/translated_docs/ja/Concepts/dt_picture.md index 15152a4f9f5e41..221b60b2b5782e 100644 --- a/website/translated_docs/ja/Concepts/dt_picture.md +++ b/website/translated_docs/ja/Concepts/dt_picture.md @@ -1,5 +1,5 @@ --- -id: picture +id: ピクãƒãƒ£ãƒ¼ title: ピクãƒãƒ£ãƒ¼ --- @@ -7,8 +7,8 @@ title: ピクãƒãƒ£ãƒ¼ 4D 㯠Windows 㨠macOS ã®ä¸¡æ–¹ã«ãŠã„ã¦ãƒã‚¤ãƒ†ã‚£ãƒ–㪠API を使用ã—ã¦ãƒ•ィールドや変数ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’エンコード (書ãè¾¼ã¿) ãŠã‚ˆã³ãƒ‡ã‚³ãƒ¼ãƒ‰ (読ã¿è¾¼ã¿) ã—ã¾ã™ã€‚ ã“れらã®å®Ÿè£…ã¯ç¾åœ¨ãƒ‡ã‚¸ã‚¿ãƒ«ã‚«ãƒ¡ãƒ©ã§ä½¿ç”¨ã•れã¦ã„ã‚‹ RAW フォーマットå«ã‚ã€æ•°å¤šãã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãªãƒ•ォーマットã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ -* Windows ã§ã¯ã€4Dã¯WIC (Windows Imaging Component) を使用ã—ã¾ã™ã€‚ -* macOS ã§ã¯ã€4D 㯠ImageIO を使用ã—ã¾ã™ã€‚ +* Windows ã§ã¯ã€4Dã¯WIC (Windows Imaging Component) を使用ã—ã¾ã™ã€‚ +* macOS ã§ã¯ã€4D 㯠ImageIO を使用ã—ã¾ã™ã€‚ WIC ãŠã‚ˆã³ ImageIO ã¯ãƒ”クãƒãƒ£ãƒ¼å†…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚ `SET PICTURE METADATA` ãŠã‚ˆã³ `GET PICTURE METADATA` コマンドを使用ã™ã‚‹ã“ã¨ã§ã€ãれらã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’開発ã«å½¹ç«‹ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -16,15 +16,17 @@ WIC ãŠã‚ˆã³ ImageIO ã¯ãƒ”クãƒãƒ£ãƒ¼å†…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã‚’ 4D ã¯å¤šæ§˜ãª [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](FormEditor/pictures.md#native-formats-supported) ã‚’ãƒã‚¤ãƒ†ã‚£ãƒ–ã«ã‚µãƒãƒ¼ãƒˆã—ã¾ã™: .jpeg, .png, .svg 等。 -4D ãŒèªè­˜ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット㯠`PICTURE CODEC LIST` コマンドã‹ã‚‰ãƒ”クãƒãƒ£ãƒ¼ Codec IDã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ ã“れã¯ä»¥ä¸‹ã®å½¢å¼ã§è¿”ã•れã¾ã™: +4D ãŒèªè­˜ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット㯠`PICTURE CODEC LIST` コマンドã‹ã‚‰ãƒ”クãƒãƒ£ãƒ¼ Codec IDã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ ã“れã¯ä»¥ä¸‹ã®å½¢å¼ã§è¿”ã•れã¾ã™: -* æ‹¡å¼µå­ (例: “.gifâ€) -* MIME タイプ (例: “image/jpegâ€) +* æ‹¡å¼µå­ (例: “.gifâ€) +* MIME タイプ (例: “image/jpegâ€) ãれãžã‚Œã®ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットã«å¯¾ã—ã¦è¿”ã•れる形å¼ã¯ã€å½“該 Codec ㌠OS レベルã§è¨˜éŒ²ã•れã¦ã„る方法ã«åŸºã¥ãã¾ã™ã€‚ エンコーディング (書ãè¾¼ã¿) 用コーデックã«ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚‹ãŸã‚ã€åˆ©ç”¨ã§ãるコーデックã®ä¸€è¦§ã¯ã€èª­ã¿è¾¼ã¿ç”¨ã¨æ›¸ãè¾¼ã¿ç”¨ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 多ãã® [4D ピクãƒãƒ£ãƒ¼ç®¡ç†ã‚³ãƒžãƒ³ãƒ‰](https://doc.4d.com/4Dv18/4D/18/Pictures.201-4504337.ja.html) 㯠Codec ID を引数ã¨ã—ã¦å—ã‘ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€`PICTURE CODEC LIST` ã‹ã‚‰è¿”ã•れるシステムIDを使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 4D ãŒèªè­˜ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット㯠`PICTURE CODEC LIST` コマンドã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ + + ## ピクãƒãƒ£ãƒ¼æ¼”ç®—å­ | æ¼”ç®—å­ | シンタックス | 戻り値 | 動作 | @@ -37,8 +39,7 @@ WIC ãŠã‚ˆã³ ImageIO ã¯ãƒ”クãƒãƒ£ãƒ¼å†…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã‚’ | 垂直移動 | ピクãƒãƒ£ãƒ¼ / 数値 | ピクãƒãƒ£ãƒ¼ | 指定ピクセル分ã€ãƒ”クãƒãƒ£ãƒ¼ã‚’縦ã«ç§»å‹•ã—ã¾ã™ã€‚ | | サイズ変更 | ピクãƒãƒ£ãƒ¼ * 数値 | ピクãƒãƒ£ãƒ¼ | 割åˆã«ã‚ˆã£ã¦ãƒ”クãƒãƒ£ãƒ¼ã‚’サイズ変更ã—ã¾ã™ã€‚ | | 水平スケール | ピクãƒãƒ£ãƒ¼ *+ 数値 | ピクãƒãƒ£ãƒ¼ | 割åˆã«ã‚ˆã£ã¦ãƒ”クãƒãƒ£ãƒ¼å¹…をサイズ変更ã—ã¾ã™ã€‚ | -| 垂直スケール | ピクãƒãƒ£ãƒ¼ *| 数値 | ピクãƒãƒ£ãƒ¼ | 割åˆã«ã‚ˆã£ã¦ãƒ”クãƒãƒ£ãƒ¼é«˜ã•をサイズ変更ã—ã¾ã™ã€‚ | - +| 垂直スケール | ピクãƒãƒ£ãƒ¼ *| 数値 | ピクãƒãƒ£ãƒ¼ | 割åˆã«ã‚ˆã£ã¦ãƒ”クãƒãƒ£ãƒ¼é«˜ã•をサイズ変更ã—ã¾ã™ã€‚ | **注:** @@ -47,49 +48,40 @@ WIC ãŠã‚ˆã³ ImageIO ã¯ãƒ”クãƒãƒ£ãƒ¼å†…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã‚’ - `TRANSFORM PICTURE` コマンドを使ã£ã¦ã€ã•らãªã‚‹ç”»åƒå‡¦ç†ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ - ピクãƒãƒ£ãƒ¼ç”¨ã®æ¯”較演算å­ã¯ã‚りã¾ã›ã‚“ãŒã€`Equal picture` コマンドを使ã£ã¦ 2ã¤ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’比較ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + ### 例題 æ°´å¹³é€£çµ - ```4d circle+rectangle // circle ã®å³ã« rectangle ãŒè¿½åŠ ã•れã¾ã™ã€‚ rectangle+circle // rectangle ã®å³ã« circle ãŒè¿½åŠ ã•れã¾ã™ã€‚ ``` - ![](assets/en/Concepts/concatHor.en.png) ![](assets/en/Concepts/concatHor2.en.png) åž‚ç›´é€£çµ - ```4d circle/rectangle // circle ã®ä¸‹ã« rectangle ãŒè¿½åŠ ã•れã¾ã™ã€‚ rectangle/circle // rectangle ã®ä¸‹ã« circle ãŒè¿½åŠ ã•れã¾ã™ã€‚ ``` - ![](assets/en/Concepts/concatVer.en.png) ![](assets/en/Concepts/concatVer2.en.png) 排他的論ç†å’Œ - ```4d Pict3:=Pict1 & Pict2 // Pict1 ã®ä¸Šã« Pict2 ã‚’é‡ã­ã¾ã™ã€‚ ``` - ![](assets/en/Concepts/superimpoExc.fr.png) 包括的論ç†å’Œ - ```4d Pict3:=Pict1|Pict2 // åŒã˜ã‚µã‚¤ã‚ºã®äºŒã¤ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’é‡ã­åˆã‚ã›ãŸä¸Šã§ãã®ãƒžã‚¹ã‚¯ã®çµæžœã‚’è¿”ã—ã¾ã™ã€‚ ``` - ![](assets/en/Concepts/superimpoInc.fr.png) 水平移動 - ```4d rectangle+50 // rectangle ã‚’å³ã« 50ピクセル移動ã—ã¾ã™ã€‚ rectangle-50 // rectangle を左㫠50ピクセル移動ã—ã¾ã™ã€‚ ``` - ![](assets/en/Concepts/hormove.en.png) 垂直移動 @@ -98,16 +90,14 @@ rectangle-50 // rectangle を左㫠50ピクセル移動ã—ã¾ã™ã€‚ rectangle/50 // rectangle を下㫠50ピクセル移動ã—ã¾ã™ã€‚ rectangle/-20 // rectangle を上㫠20ピクセル移動ã—ã¾ã™ã€‚ ``` - ![](assets/en/Concepts/vertmove.en.png)![](assets/en/Concepts/vertmove2.en.png) -サイズ変更 +拡大 ```4d rectangle*1.5 // rectangle ã‚’ 50%拡大ã—ã¾ã™ã€‚ rectangle*0.5 // rectangle ã‚’ 50%縮å°ã—ã¾ã™ã€‚ ``` - ![](assets/en/Concepts/resize.en.png)![](assets/en/Concepts/resisze2.en.png) 水平スケール @@ -123,7 +113,7 @@ circle*+0.25 // circle ã®å¹…ã‚’ 25%ã«ç¸®ã‚ã¾ã™ã€‚ ```4d circle*|2 // circle ã®é«˜ã•ã‚’ 2å€ã«ä¼¸ã°ã—ã¾ã™ã€‚ -circle *| 0.25 // circle ã®é«˜ã•ã‚’ 25%ã«ç¸®ã‚ã¾ã™ã€‚ +circle*|0.25 // circle ã®é«˜ã•ã‚’ 25%ã«ç¸®ã‚ã¾ã™ã€‚ ``` -![](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/ja/Concepts/dt_pointer.md b/website/translated_docs/ja/Concepts/dt_pointer.md index 1a62f980dd9ec9..5c3b0391602f67 100644 --- a/website/translated_docs/ja/Concepts/dt_pointer.md +++ b/website/translated_docs/ja/Concepts/dt_pointer.md @@ -7,13 +7,13 @@ title: ãƒã‚¤ãƒ³ã‚¿ãƒ¼ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€(プログラミングã«ãŠã‘ã‚‹) データをå‚ç…§ã™ã‚‹ãŸã‚ã®é«˜åº¦ãªæ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚ 4D ランゲージ使用時ã«ãƒ†ãƒ¼ãƒ–ル・フィールド・変数・é…列等ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€å˜ç´”ã«åå‰ã‚’用ã„ã¾ã™ã€‚ ã§ã™ãŒã€åå‰ã‚’使用ã—ãªã„ã§ãƒ‡ãƒ¼ã‚¿ã‚’å‚ç…§ã™ã‚‹ã€ã¾ãŸã¯ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸæ–¹ãŒä¾¿åˆ©ãªå ´åˆã‚‚ã‚りã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã†ã¨ã“れãŒå®Ÿç¾ã§ãã¾ã™ã€‚ -ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®èƒŒæ™¯ã«ã‚る概念ã¯ã€æ—¥å¸¸ç”Ÿæ´»ã§ã‚‚よã使ã‚れã¦ã„ã¾ã™ã€‚ 対象物を正確ã«çŸ¥ã‚‰ãªã„ã¾ã¾ã€ãれを示ã™ã“ã¨ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€å‹äººã«å¯¾ã—㦠"登録番å·123ABDã®è»Šã«ä¹—ã‚ã†" ã¨è¨€ã‚ãšã« "å›ã®è»Šã«ä¹—ã‚ã†" ã¨è¨€ã†å ´åˆã§ã™ã€‚ã¤ã¾ã‚Šã€"登録番å·123ABDã®è»Š" ã‚’ "å›ã®è»Š" ã§ç¤ºã—ãŸã‚ã‘ã§ã™ã€‚ã“ã®å ´åˆã€"登録番å·123ABDã®è»Š" ã¯ã‚ªãƒ–ジェクトã®åå‰ã§ã€"å›ã®è»Š" ã¯ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ãŸã‚ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¨è€ƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®èƒŒæ™¯ã«ã‚る概念ã¯ã€æ—¥å¸¸ç”Ÿæ´»ã§ã‚‚よã使ã‚れã¦ã„ã¾ã™ã€‚ 対象物を正確ã«çŸ¥ã‚‰ãªã„ã¾ã¾ã€ãれを示ã™ã“ã¨ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€å‹äººã«å¯¾ã—㦠"登録番å·123ABDã®è»Šã«ä¹—ã‚ã†" ã¨è¨€ã‚ãšã« "å›ã®è»Šã«ä¹—ã‚ã†" ã¨è¨€ã†å ´åˆã§ã™ã€‚ ã¤ã¾ã‚Šã€"登録番å·123ABDã®è»Š" ã‚’ "å›ã®è»Š" ã§ç¤ºã—ãŸã‚ã‘ã§ã™ã€‚ ã“ã®å ´åˆã€"登録番å·123ABDã®è»Š" ã¯ã‚ªãƒ–ジェクトã®åå‰ã§ã€"å›ã®è»Š" ã¯ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ãŸã‚ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¨è€ƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 対象物を明示ã—ãªã„ã§å‚ç…§ã§ãã‚‹ã¨ã€éžå¸¸ã«ä¾¿åˆ©ã§ã™ã€‚ ãŸã¨ãˆã°ã€å‹äººãŒæ–°ã—ã„車ã«è²·ã„替ãˆã¦ã‚‚ã€åŒã˜ã "å›ã®è»Š" ã¨è¨€ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚‚åŒã˜ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€åŒã˜ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒã‚ã‚‹æ™‚ã¯æ•°å€¤ãƒ•ィールド "Age" ã‚’å‚ç…§ã—ã€åˆ¥ã®æ™‚ã«ã¯æ•°å€¤å¤‰æ•° "Old Age" ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã„ãšã‚Œã®å ´åˆã«ã‚‚ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯æ•°å€¤ãƒ‡ãƒ¼ã‚¿ã‚’å‚ç…§ã—ã¦ãŠã‚Šã€ãれã¯è¨ˆç®—ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ テーブル・フィールド・変数・é…列・é…列è¦ç´ ãƒ»ã‚ªãƒ–ジェクトをå‚ç…§ã™ã‚‹ãŸã‚ã«ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®è¡¨ã«ã€å„タイプã®ä¾‹ã‚’示ã—ã¾ã™: -| åž‹ | å‚照時 | 使用時 | 代入時 | +| タイプ | å‚照時 | 使用時 | 代入時 | | ------ | ----------------------- | ------------------------ | ------------------------ | | テーブル | vpTable:=->[Table] | DEFAULT TABLE(vpTable->) | n/a | | フィールド | vpField:=->[Table]Field | ALERT(vpField->) | vpField->:="John" | @@ -30,18 +30,15 @@ title: ãƒã‚¤ãƒ³ã‚¿ãƒ¼ ```4d $MyVar:="Hello" ``` - -$MyVar ã¯ã€æ–‡å­—列 "Hello" ã‚’å«ã‚€å¤‰æ•°ã§ã™ã€‚$MyVar ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã—ã¾ã™: +$MyVar ã¯ã€æ–‡å­—列 "Hello" ã‚’å«ã‚€å¤‰æ•°ã§ã™ã€‚ $MyVar ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã—ã¾ã™: ```4d C_POINTER($MyPointer) $MyPointer:=->$MyVar ``` - -ãƒã‚¤ãƒ³ã‚¿è¨˜å· (->) ã¯ã€"・・・ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ã‚’求ã‚ã‚‹" ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ã“ã“ã§ã¯ã€$MyVar ã‚’å‚ç…§ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å–å¾—ã—ã¾ã™ã€‚ ã“ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ä»£å…¥æ¼”ç®—å­ (:=) ã§ $MyPointer ã«å¯¾ã—ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ +ãƒã‚¤ãƒ³ã‚¿ãƒ¼è¨˜å· (->) ã¯ã€"・・・ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’求ã‚ã‚‹" ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ã“ã®è¨˜å·ã¯ã€"ダッシュ" (-) ã®å¾Œã« "大ãªã‚Š" (>) を付ã‘ã¦æ§‹æˆã•れã¾ã™ã€‚ ã“ã“ã§ã¯ã€$MyVar ã‚’å‚ç…§ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å–å¾—ã—ã¾ã™ã€‚ ã“ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ä»£å…¥æ¼”ç®—å­ (:=) ã§ $MyPointer ã«å¯¾ã—ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ $MyPointer ã¯ã€$MyVar ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’æ ¼ç´ã™ã‚‹å¤‰æ•°ã§ã™ã€‚ $MyPointer ã¯ã€"Hello" ã¨ã„ㆠ$MyVar ã®å€¤ã‚’å«ã¿ã¾ã›ã‚“ãŒã€ãã®å€¤ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚ 以下ã®å¼ã¯ $MyVar ã®å€¤ã‚’è¿”ã—ã¾ã™: - ```4d $MyPointer-> ``` @@ -49,26 +46,21 @@ $MyPointer-> å‰è¿°ã®å¼ã¯ã€"Hello" ã¨ã„ã†æ–‡å­—列を返ã—ã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼è¨˜å· (->) ã‚’ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å¾Œã«ã¤ã‘ã‚‹ã¨ã€å‚ç…§å…ˆã®å€¤ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れをデリファレンス (å‚照外ã—) ã¨å‘¼ã³ã¾ã™ã€‚ ãƒã‚¤ãƒ³ã‚¿ãƒ¼è¨˜å· (->) を後ã«ã¤ã‘ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ãã®å‚照先を直接使ã†ã®ã¨åŒç¾©ã§ã‚ã‚‹ã“ã¨ã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚ ã¤ã¾ã‚Šã€å¤‰æ•° $MyVar を使用ã™ã‚‹ã“ã¨ã¨ã€$MyPointer-> を使用ã™ã‚‹ã“ã¨ã¯ã€ã¾ã£ãŸãåŒã˜æ„味ã«ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ–‡å­—列 "Hello" を表示ã—ã¾ã™: - ```4d ALERT($MyPointer->) ``` $MyPointer を使用ã—㦠$MyVar ã®å€¤ã‚’変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 下記ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€å¤‰æ•° $MyVar ã«æ–‡å­—列 "Goodbye" を代入ã—ã¾ã™: - ```4d $MyPointer->:="Goodbye" ``` - ã“ã®2ã¤ã® $MyPointer-> を使用ã—ãŸä¾‹ã®ã¨ãŠã‚Šã€$MyVar を使用ã™ã‚‹ã®ã¨ã¾ã£ãŸãåŒã˜å‹•作ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 以下ã®2ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚‚ã€åŒä¸€ã®å‹•作を実行ã—ã¾ã™ã€‚両方ã¨ã‚‚ã€å¤‰æ•° $MyVar ã®ç¾åœ¨ã®å€¤ã‚’アラートボックスã«è¡¨ç¤ºã—ã¾ã™: ```4d ALERT($MyPointer->) ALERT($MyVar) ``` - 以下ã®2ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚‚ã€åŒä¸€ã®å‹•作を実行ã—ã¾ã™ã€‚両方ã¨ã‚‚ $MyVar ã«ã€æ–‡å­—列 "Goodbye" を代入ã—ã¾ã™: - ```4d $MyPointer->:="Goodbye" $MyVar:="Goodbye" @@ -77,7 +69,6 @@ $MyVar:="Goodbye" ## ãƒã‚¤ãƒ³ã‚¿ãƒ¼æ¼”ç®—å­ å‰æ: - ```4d // vPtrA 㨠vPtrB ã¯åŒã˜å¯¾è±¡ã‚’å‚ç…§ã—ã¾ã™ vPtrA:=->anObject @@ -86,52 +77,39 @@ $MyVar:="Goodbye" vPtrC:=->anotherObject ``` -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | | --- | ------------- | --- | ------------- | ----- | | ç­‰ã—ã„ | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ = ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ブール | vPtrA = vPtrB | True | | | | | vPtrA = vPtrC | False | | ç•°ãªã‚‹ | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ # ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ブール | vPtrA # vPtrC | True | | | | | vPtrA # vPtrB | False | - ## ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®ä½¿ç”¨ä¾‹ - ### テーブルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - テーブルã®ä»£ã‚りã«ãƒ‡ãƒªãƒ•ァレンスã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ã‚ˆã†ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã€ãƒ†ãƒ¼ãƒ–ルã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã—ã¾ã™: - ```4d $TablePtr:=->[anyTable] ``` - ã‚ã‚‹ã„ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã« `Table` コマンドを使用ã—ã¦ãƒ†ãƒ¼ãƒ–ルã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™: - -```4d +```4d $TablePtr:=Table(20) ``` - å–å¾—ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ‡ãƒªãƒ•ァレンスã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™: - -```4d +```4d DEFAULT TABLE($TablePtr->) ``` - ### フィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - フィールドã®ä»£ã‚りã«ãƒ‡ãƒªãƒ•ァレンスã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ã‚ˆã†ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã€ãƒ•ィールドã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã—ã¾ã™: - ```4d $FieldPtr:=->[aTable]ThisField ``` ã‚ã‚‹ã„ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã« `Field` コマンドを使用ã—ã¦ãƒ•ィールドã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™: - ```4d $FieldPtr:=Field(1;2) ``` å–å¾—ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ‡ãƒªãƒ•ァレンスã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™: - ```4d OBJECT SET FONT($FieldPtr->;"Arial") ``` @@ -141,66 +119,51 @@ OBJECT SET FONT($FieldPtr->;"Arial") プロセス変数ã¾ãŸã¯ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã†å ´åˆã€å‚ç…§ã•れる変数ã¯ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒä½¿ç”¨ã•れる時点ã§ã™ã§ã«å®šç¾©ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ローカル変数ã¯ã€ãれらを作æˆã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡ŒãŒçµ‚ã‚ã‚‹ã¨ç ´æ£„ã•れã€ãƒ—ロセス変数もãれを作æˆã—ãŸãƒ—ロセスã®çµ‚了時ã«å‰Šé™¤ã•れる点ã«ç•™æ„ã—ã¦ãã ã•ã„。 存在ã—ãªã„変数をãƒã‚¤ãƒ³ã‚¿ãƒ¼ã§å‘¼ã³å‡ºãã†ã¨ã™ã‚‹ã¨ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã§ã¯ (「変数ãŒè¨­å®šã•れã¦ã„ã¾ã›ã‚“ã€ã¨ã„ã†å†…容ã®) シンタックスエラーãŒèµ·ãã¾ã™ã€‚コンパイルモードã§ã¯ã€ã•らã«é‡å¤§ãªã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ローカル変数ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã¨ã€ãƒ—ロセス変数ã®ä½¿ç”¨ã‚’控ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ローカル変数ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€åŒã˜ãƒ—ロセス内ã§ã®ã¿ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ デãƒãƒƒã‚¬ãƒ¼ã«ãŠã„ã¦ã€åˆ¥ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§å®£è¨€ã•れãŸãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’表示ã™ã‚‹ã¨ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å¾Œã‚ã®æ‹¬å¼§å†…ã«ãã®ãƒ¡ã‚½ãƒƒãƒ‰åãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 例ã¨ã—ã¦ã€Method1 ã§ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ã„ãŸã¨ã—ã¾ã™: - ```4d $MyVar:="Hello world" Method2(->$MyVar) ``` - Method2 実行中ã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã¯ $1 を次ã®ã‚ˆã†ã«è¡¨ç¤ºã—ã¾ã™: | $1 | ->$MyVar (Method1) | | -- | ------------------ | | | | - $1 ã®å€¤ã¯ã€æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: | $MyVar (Method1) | "Hello world" | | ---------------- | ------------- | | | | - ### é…列è¦ç´ ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - é…列è¦ç´ ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ä¾‹ã¯é…列を作æˆã—ã€é…åˆ—ã®æœ€åˆã®è¦ç´ ã‚’指ã—示ã™ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’変数 $ElemPtr ã«å‰²ã‚Šå½“ã¦ã¾ã™: - ```4d ARRAY REAL($anArray;10) // é…åˆ—ã‚’ä½œæˆ $ElemPtr:=->$anArray{1} // é…列è¦ç´ ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’ä½œæˆ ``` 以下ã®ã‚ˆã†ã«ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å‚ç…§å…ˆã§ã‚ã‚‹é…列è¦ç´ ã«å€¤ã‚’代入ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: - ```4d $ElemPtr->:=8 ``` ### é…列ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - é…列ã«å¯¾ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ä¾‹ã¯é…列を作æˆã—ã€é…列を指ã—示ã™ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’変数 $ArrPtr ã«å‰²ã‚Šå½“ã¦ã¾ã™: - ```4d ARRAY REAL($anArray;10) // é…åˆ—ã‚’ä½œæˆ $ArrPtr:=->$anArray // é…列ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’ä½œæˆ ``` - ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å‚ç…§å…ˆã¯ã‚ãã¾ã§ã‚‚é…列ã§ã‚りã€é…列è¦ç´ ã§ã¯ãªã„ã“ã¨ã‚’ç†è§£ã™ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ãƒªãƒ•ァレンスã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’以下ã®ã‚ˆã†ã«ä½¿ç”¨ã§ãã¾ã™: - ```4d SORT ARRAY($ArrPtr->;>) // é…列ã®ä¸¦ã¹æ›¿ãˆ ``` - é…列ã®4番目ã®è¦ç´ ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã®ã«é…列ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã†å ´åˆã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¿°ã—ã¾ã™: - ```4d ArrPtr->{4}:=84 ``` ### メソッドã®å¼•æ•°ã¨ã—ã¦ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯å¼•æ•°ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ メソッド内ã§ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å‚ç…§å…ˆã®å€¤ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ `takeTwo` ã¯ã€2ã¤ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’引数ã¨ã—ã¦å—ã‘å–りã¾ã™ã€‚ ãã—ã¦ã€æœ€åˆã®å¼•æ•°ã®å‚照先を大文字ã«å¤‰æ›ã—ã€2ã¤ã‚ã®å¼•æ•°ã®å‚ç…§å…ˆã‚’å°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™ã€‚ 当該プロジェクトメソッドã®ã‚³ãƒ¼ãƒ‰ã§ã™: - ```4d //takeTwo プロジェクトメソッド //$1 – 文字列フィールドã¾ãŸã¯å¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€‚ ã“れを大文字ã«å¤‰æ›ã—ã¾ã™ã€‚ @@ -210,18 +173,16 @@ SORT ARRAY($ArrPtr->;>) // é…列ã®ä¸¦ã¹æ›¿ãˆ ``` 以下ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã¯ãƒ¡ã‚½ãƒƒãƒ‰ `takeTwo` を使用ã—ã€ãƒ•ィールドã®å€¤ã‚’大文字ã«ã€å¤‰æ•°ã®å€¤ã‚’å°æ–‡å­—ã«å¤‰æ›ã—ã¾ã™: - - takeTwo(->[myTable]myField;->$MyVar) - +``` +takeTwo(->[myTable]myField;->$MyVar) +``` ã“ã®ãƒ•ィールド [myTable]myField ã®å€¤ãŒ "jones" ã§ã‚れã°ã€"JONES" ã«å¤‰æ›´ã•れã¾ã™ã€‚ ä»–æ–¹ã€å¤‰æ•° $MyVar ã®å€¤ãŒ "HELLO" ã§ã‚れã°ã€"hello" ã«å¤‰æ›´ã•れã¾ã™ã€‚ メソッド takeTwo ã§å®£è¨€ã•れã¦ã„る引数ã®åž‹ã¨ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å‚ç…§å…ˆã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒä¸€è‡´ã—ã¦ã„ã‚‹ã“ã¨ãŒé‡è¦ã§ã™ã€‚ ã“ã®ä¾‹ã§ã¯ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®å‚ç…§å…ˆã¯å¿…ãšæ–‡å­—列ã¾ãŸã¯ãƒ†ã‚­ã‚¹ãƒˆåž‹ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ### ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ - より複雑ãªä½¿ã„æ–¹ã¨ã—ã¦ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å‚ç…§ã™ã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 以下ã®ä¾‹ã‚’考ãˆã¾ã™: - ```4d $MyVar:="Hello" $PointerOne:=->$MyVar @@ -229,7 +190,6 @@ SORT ARRAY($ArrPtr->;>) // é…列ã®ä¸¦ã¹æ›¿ãˆ ($PointerTwo->)->:="Goodbye" ALERT(($PointerTwo->)->) ``` - ã“ã®ä¾‹ã¯ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã« "Goodbye" を表示ã—ã¾ã™ã€‚ å„行ã«ã¤ã„ã¦è¦‹ã¦ã„ãã¾ã—ょã†: @@ -241,14 +201,13 @@ SORT ARRAY($ArrPtr->;>) // é…列ã®ä¸¦ã¹æ›¿ãˆ - ALERT (($PointerTwo->)->) --> å…ˆã®èª¬æ˜Žã¨åŒæ§˜ã« $PointerTwo-> 㯠$PointerOne を示ã—ã€$PointerOne 㯠$MyVarを示ã—ã¦ã„ã¾ã™ã€‚ ã¤ã¾ã‚Šã€($PointerTwo->)-> ã¯ã€$MyVar を示ã—ã¦ã„ã¾ã™ã€‚ çµæžœã¨ã—ã¦ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã¯ $MyVar ã®å†…容ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 以下ã®ä¾‹ã§ã¯ã€$MyVar ã« "Hello" ãŒä»£å…¥ã•れã¾ã™: - ```4d ($PointerTwo->)->:="Hello" ``` 以下ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã¯ã€$NewVar ã« $MyVar ã®å€¤ã§ã‚ã‚‹ "Hello" ãŒä»£å…¥ã•れã¾ã™: +``` +$NewVar:=($PointerTwo->)-> +``` - $NewVar:=($PointerTwo->)-> - - -**é‡è¦:** デリファレンスを複数ãŠã“ãªã†ã«ã¯æ‹¬å¼§ãŒå¿…è¦ã§ã™ã€‚ \ No newline at end of file +**é‡è¦:** デリファレンスを複数ãŠã“ãªã†ã«ã¯æ‹¬å¼§ãŒå¿…è¦ã§ã™ã€‚ diff --git a/website/translated_docs/ja/Concepts/dt_string.md b/website/translated_docs/ja/Concepts/dt_string.md index 9e4acdf62c650c..b6f64671e9da7c 100644 --- a/website/translated_docs/ja/Concepts/dt_string.md +++ b/website/translated_docs/ja/Concepts/dt_string.md @@ -1,6 +1,6 @@ --- id: string -title: 文字列 +title: String --- 文字列ã¨ã¯ã€ä»¥ä¸‹ã‚’示ã™ç·ç§°ã§ã™: @@ -21,7 +21,6 @@ title: 文字列 ç©ºã®æ–‡å­—列ã¯ã€2ã¤ã®å¼•用符ã®é–“ã«ä½•も入れãªã„状態 ("") ã§è¡¨ã—ã¾ã™ã€‚ ### エスケープシーケンス - 以下ã®ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスを文字列内ã§ä½¿ç”¨ã§ãã¾ã™: | エスケープシーケンス | æ„味ã™ã‚‹æ–‡å­— | @@ -32,47 +31,43 @@ title: 文字列 | \\\ | \ (ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥) | | \\" | " (引用符) | - -**注:** \ (ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥) 㯠Windows ã§ãƒ‘スåã®åŒºåˆ‡ã‚Šæ–‡å­—ã¨ã—ã¦ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ 通常 4D ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«å…¥åŠ›ã•れãŸãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’自動㧠"\\\" ã«ç½®ãæ›ãˆã‚‹ã“ã¨ã§ã€ã“れを正ã—ã解釈ã—ã¾ã™ã€‚例ãˆã° "C:\Folder" ã¨å…¥åŠ›ã™ã‚‹ã¨ "C:\\\Folder" ã«å¤‰æ›ã•れã¾ã™ã€‚ã—ã‹ã— “C:\MyDocuments\New†ã¨å…¥åŠ›ã—ãŸå ´åˆã€4Dã¯äºŒç•ªç›®ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¯ "\N" (行é€ã‚Š) ã¨è§£é‡ˆã—ã¦ã—ã¾ã„ã€â€œC:\\\MyDocuments\Newâ€ã‚’表示ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ã¯é–‹ç™ºè€…ãŒãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’2ã¤å…¥åŠ›ã™ã‚‹ã‚ˆã†ã«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -ã•ã‚‰ã«æ­£è¦è¡¨ç¾ã®ãƒ‘ターン定義ã§ã‚‚ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ã€‚æ­£è¦è¡¨ç¾ãƒ‘ターン "\\\" ã‚’4Dã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«è¨˜è¿°ã™ã‚‹å ´åˆã¯ "\\\\\" ã¨ãªã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +**注:** \ (ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥) 㯠Windows ã§ãƒ‘スåã®åŒºåˆ‡ã‚Šæ–‡å­—ã¨ã—ã¦ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ 通常 4D ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«å…¥åŠ›ã•れãŸãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’自動㧠"\\\" ã«ç½®ãæ›ãˆã‚‹ã“ã¨ã§ã€ã“れを正ã—ã解釈ã—ã¾ã™ã€‚例ãˆã° "C:\Folder" ã¨å…¥åŠ›ã™ã‚‹ã¨ "C:\\\Folder" ã«å¤‰æ›ã•れã¾ã™ã€‚ã—ã‹ã— “C:\MyDocuments\New†ã¨å…¥åŠ›ã—ãŸå ´åˆã€4Dã¯äºŒç•ªç›®ã®ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¯ "\N" (行é€ã‚Š) ã¨è§£é‡ˆã—ã¦ã—ã¾ã„ã€â€œC:\\\MyDocuments\Newâ€ã‚’表示ã—ã¾ã™ã€‚ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ã¯é–‹ç™ºè€…ãŒãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã‚’2ã¤å…¥åŠ›ã™ã‚‹ã‚ˆã†ã«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。
        ã•ã‚‰ã«æ­£è¦è¡¨ç¾ã®ãƒ‘ターン定義ã§ã‚‚ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ãŒã‚¨ã‚¹ã‚±ãƒ¼ãƒ—シーケンスã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ã€‚æ­£è¦è¡¨ç¾ãƒ‘ターン "\\\" ã‚’4Dã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«è¨˜è¿°ã™ã‚‹å ´åˆã¯ "\\\\\" ã¨ãªã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ## æ–‡å­—åˆ—æ¼”ç®—å­ -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | -| -------- | ------------- | --- | ----------------------- | -------- | -| é€£çµ (çµåˆ) | 文字列 + 文字列 | 文字列 | "abc" + "def" | "abcdef" | -| 繰り返㗠| 文字列 * 数値 | 文字列 | "ab" * 3 | "ababab" | -| ç­‰ã—ã„ | 文字列 = 文字列 | ブール | "abc" = "abc" | True | -| | | | "abc" = "abd" | False | -| ç•°ãªã‚‹ | 文字列 # 文字列 | ブール | "abc" # "abd" | True | -| | | | "abc" # "abc" | False | -| 大ãã„ | 文字列 > 文字列 | ブール | "abd" > "abc" | True | -| | | | "abc" > "abc" | False | -| å°ã•ã„ | 文字列 < 文字列 | ブール | "abc" < "abd" | True | -| | | | "abc" < "abc" | False | -| 以上 | 文字列 >= 文字列 | ブール | "abd" >= "abc" | True | -| | | | "abc" >= "abd" | False | -| 以下 | 文字列 <= String | ブール | "abc" <= "abd" | True | -| | | | "abd" <= "abc" | False | -| キーワードをå«ã‚€ | 文字列 % 文字列 | ブール | "Alpha Bravo" % "Bravo" | True | -| | | | "Alpha Bravo" % "ravo" | False | -| | ピクãƒãƒ£ãƒ¼ % 文字列 | ブール | Picture_expr % "Mer" | True (*) | - +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | +| -------- | ----------- | ------ | ----------------------- | -------- | +| é€£çµ (çµåˆ) | 文字列 + 文字列 | String | "abc" + "def" | "abcdef" | +| 繰り返㗠| 文字列 * 数値 | String | "ab" * 3 | "ababab" | +| ç­‰ã—ã„ | 文字列 = 文字列 | ブール | "abc" = "abc" | True | +| | | | "abc" = "abd" | False | +| ç•°ãªã‚‹ | 文字列 # 文字列 | ブール | "abc" # "abd" | True | +| | | | "abc" # "abc" | False | +| 大ãã„ | 文字列 > 文字列 | ブール | "abd" > "abc" | True | +| | | | "abc" > "abc" | False | +| å°ã•ã„ | 文字列 < 文字列 | ブール | "abc" < "abd" | True | +| | | | "abc" < "abc" | False | +| 以上 | 文字列 >= 文字列 | ブール | "abd" >= "abc" | True | +| | | | "abc" >= "abd" | False | +| 以下 | 文字列 <= 文字列 | ブール | "abc" <= "abd" | True | +| | | | "abd" <= "abc" | False | +| キーワードをå«ã‚€ | 文字列 % 文字列 | ブール | "Alpha Bravo" % "Bravo" | True | +| | | | "Alpha Bravo" % "ravo" | False | +| | ピクãƒãƒ£ãƒ¼ % 文字列 | ブール | Picture_expr % "Mer" | True (*) | (*) キーワード "Mer" ãŒãƒ”クãƒãƒ£ãƒ¼å¼ (フィールドã¾ãŸã¯å¤‰æ•°) ã«æ ¼ç´ã•れãŸãƒ”クãƒãƒ£ãƒ¼ã® IPTC/Keywords メタデータã«å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€‚ ## 文字列比較ã®è©³ç´° - æ–‡å­—åˆ—ã¯æ–‡å­—ã”ã¨ã«æ¯”較ã•れã¾ã™ (後述㮠[キーワード](dt_string.md#キーワード) ã«ã‚ˆã‚‹æ¤œç´¢ã®å ´åˆã‚’除ãã¾ã™)。 -- æ–‡å­—åˆ—ãŒæ¯”較ã•れるã¨ã文字ã®å¤§å°æ–‡å­—ã¯ç„¡è¦–ã•れã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€"a"="A"㯠`TRUE` ã‚’è¿”ã—ã¾ã™ã€‚ 大文字ã¨å°æ–‡å­—を区別ã—ã¦æ¯”較ã™ã‚‹ã«ã¯ã€æ–‡å­—ã‚³ãƒ¼ãƒ‰ã§æ¯”較ã—ã¦ãã ã•ã„。 例ãˆã°æ¬¡ã®å¼ã¯ `FALSE` ã§ã™: +- æ–‡å­—åˆ—ãŒæ¯”較ã•れるã¨ã文字ã®å¤§å°æ–‡å­—ã¯ç„¡è¦–ã•れã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€"a"="A"㯠`true` ã‚’è¿”ã—ã¾ã™ã€‚ 大文字ã¨å°æ–‡å­—を区別ã—ã¦æ¯”較ã™ã‚‹ã«ã¯ã€æ–‡å­—ã‚³ãƒ¼ãƒ‰ã§æ¯”較ã—ã¦ãã ã•ã„。 例ãˆã°æ¬¡ã®å¼ã¯ `FALSE` ã§ã™: ```4d Character code("A")=Character code("a") // Character code("A") 㯠65 // Character code("a") 㯠97 ``` - -- æ–‡å­—åˆ—ãŒæ¯”較ã•れる場åˆã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆç­‰ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã¯ç„¡è¦–ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ—¥æœ¬èªžã«ãŠã„ã¦ã¯ä»¥ä¸‹ã®å¼ã¯ `TRUE` ã‚’è¿”ã—ã¾ã™: +- æ–‡å­—åˆ—ãŒæ¯”較ã•れる場åˆã€ã‚¢ã‚¯ã‚»ãƒ³ãƒˆç­‰ã®ç™ºéŸ³åŒºåˆ¥ç¬¦å·ã¯ç„¡è¦–ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ—¥æœ¬èªžã«ãŠã„ã¦ã¯ä»¥ä¸‹ã®å¼ã¯ `true` ã‚’è¿”ã—ã¾ã™: ```4d "ã‚"="ã‚¢" @@ -84,19 +79,19 @@ Character code("A")=Character code("a") ### ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰è¨˜å· (@) -4D ランゲージã§ã¯ **@** をワイルドカード記å·ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ ワイルドカードã¯ã€ã™ã¹ã¦ã®æ–‡å­—åˆ—ã®æ¯”較ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦ç½®ãæ›ã‚ã‚‹æ–‡å­—ã®æ•°ã¯æŒ‡å®šã•れã¾ã›ã‚“。 ãŸã¨ãˆã°ã€æ¬¡ã®å¼ã¯ `TRUE` ã«ãªã‚Šã¾ã™: +4D ランゲージã§ã¯ **@** をワイルドカード記å·ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ ワイルドカードã¯ã€ã™ã¹ã¦ã®æ–‡å­—åˆ—ã®æ¯”較ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦ç½®ãæ›ã‚ã‚‹æ–‡å­—ã®æ•°ã¯æŒ‡å®šã•れã¾ã›ã‚“。 ãŸã¨ãˆã°ã€æ¬¡ã®å¼ã¯ `true` ã«ãªã‚Šã¾ã™: ```4d "abcdefghij"="abc@" ``` -ãŸã ã—ã€è¤‡æ•°ã®æ–‡å­—を比較ã™ã‚‹ç›®çš„ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰è¨˜å·ã¯ã€æ¯”較演算å­ã®å³å´ã®å¼ã§ä½¿ç”¨ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 比較演算å­ã®å·¦å´ã®å¼ã«ãŠã„ã¦ã¯ã€"@" ã¯å˜ãªã‚‹æ–‡å­—ã§ã‚ã‚‹ã¨è§£é‡ˆã•れã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®å¼ã¯ `FALSE` ã§ã™: +ãŸã ã—ã€è¤‡æ•°ã®æ–‡å­—を比較ã™ã‚‹ç›®çš„ã®ãƒ¯ã‚¤ãƒ«ãƒ‰ã‚«ãƒ¼ãƒ‰è¨˜å·ã¯ã€æ¯”較演算å­ã®å³å´ã®å¼ã§ä½¿ç”¨ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 比較演算å­ã®å·¦å´ã®å¼ã«ãŠã„ã¦ã¯ã€"@" ã¯å˜ãªã‚‹æ–‡å­—ã§ã‚ã‚‹ã¨è§£é‡ˆã•れã¾ã™ã€‚ãŸã¨ãˆã°ã€æ¬¡ã®å¼ã¯ `FALSE` ã§ã™: ```4d "abc@"="abcdefghij" ``` -ワイルドカード㯠“0文字以上†をæ„味ã—ã¾ã™ã€‚ 以下ã®å¼ã¯ã™ã¹ã¦ `TRUE` ã§ã™: +ワイルドカード㯠“0文字以上†をæ„味ã—ã¾ã™ã€‚ 以下ã®å¼ã¯ã™ã¹ã¦ `true` ã§ã™: ```4d "abcdefghij"="abcdefghij@" @@ -119,7 +114,7 @@ Character code("A")=Character code("a") "abcd"<="abc@ef" // æœ‰åŠ¹ãªæ¯”較ã§ã¯ã‚りã¾ã›ã‚“ ``` -æ–‡å­—åˆ—ã®æ¯”較ã¾ãŸã¯æ¤œç´¢ã«ãŠã„ã¦ã€@ をワイルドカードã§ã¯ãªãä¸€èˆ¬ã®æ–‡å­—ã¨ã—ã¦æ‰±ã„ãŸã„å ´åˆã€`Character code (At sign)` 指示を使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ–‡å­—列㌠@ 文字ã§çµ‚ã‚ã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’知りãŸã„ã¨ã—ã¾ã™ã€‚ 以下ã®å¼ã¯ ($vsValue ãŒç©ºã§ãªã‘れã°) 常㫠`TRUE` ã§ã™: +æ–‡å­—åˆ—ã®æ¯”較ã¾ãŸã¯æ¤œç´¢ã«ãŠã„ã¦ã€@ をワイルドカードã§ã¯ãªãä¸€èˆ¬ã®æ–‡å­—ã¨ã—ã¦æ‰±ã„ãŸã„å ´åˆã€`Character code (At sign)` 指示を使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ–‡å­—列㌠@ 文字ã§çµ‚ã‚ã£ã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’知りãŸã„ã¨ã—ã¾ã™ã€‚ 以下ã®å¼ã¯ ($vsValue ãŒç©ºã§ãªã‘れã°) 常㫠`true` ã§ã™: ```4d ($vsValue[[Length($vsValue)]]="@") @@ -130,25 +125,22 @@ Character code("A")=Character code("a") ```4d (Character code($vsValue[[Length($vsValue)]])=64) ``` - **注:** ストラクãƒãƒ£ãƒ¼è¨­å®šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒšãƒ¼ã‚¸ã«ã¯ã€æ–‡å­—列㫠@ 記å·ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨ãã€ãれをã©ã†è§£é‡ˆã™ã‚‹ã‹ã‚’指定ã™ã‚‹ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæä¾›ã•れã¦ã„ã¾ã™ã€‚ ### キーワード -ä»–ã®æ–‡å­—列比較ã¨ç•°ãªã‚Šã€"%" 記å·ã‚’使ã£ãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã«ã‚ˆã‚‹æ¤œç´¢ã¯ãƒ†ã‚­ã‚¹ãƒˆä¸­ã®å˜èªžã‚’検索ã—ã¾ã™: å˜èªžã¯ä¸€ã¤ã®ã¾ã¨ã¾ã‚Šã¨ã—ã¦å€‹ã€…ã«æ‰±ã‚れã¾ã™ã€‚ 複数ã®å˜èªžã‚„ã€éŸ³ç¯€ãªã©å˜èªžã®ä¸€éƒ¨ã‚’検索ã™ã‚‹ã‚ˆã†ãªå ´åˆã€**%** 演算å­ã¯å¸¸ã« `False` ã‚’è¿”ã—ã¾ã™ã€‚ 区切り文字 (スペースやå¥èª­ç‚¹ãªã©) ã«å›²ã¾ã‚ŒãŸæ–‡å­—列ãŒå˜èªžã¨ã—ã¦èªè­˜ã•れã¾ã™ã€‚ “Today's†ã®ã‚ˆã†ã«ã‚¢ãƒã‚¹ãƒˆãƒ­ãƒ•ィをå«ã‚€å˜èªžã¯ã€é€šå¸¸ãれをå«ã‚㟠1ã¤ã®å˜èªžã¨ã—ã¦æ‰±ã‚れã¾ã™ãŒã€ç‰¹å®šã®å ´åˆã«ã¯ç„¡è¦–ã•れã¾ã™ (ä»¥ä¸‹ã®æ³¨è¨˜ã‚’å‚ç…§ãã ã•ã„)。 数字も検索ã§ãã¾ã™ã€‚å°æ•°ç‚¹ã¯åŒºåˆ‡ã‚Šæ–‡å­—ã§ã¯ãªãã€æ•°å­—ã®ä¸€éƒ¨ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ ãŸã ã—ã€é€šè²¨ã‚„温度ãªã©ã‚’表ã™è¨˜å·ã¯ç„¡è¦–ã•れã¾ã™ã€‚ +ä»–ã®æ–‡å­—列比較ã¨ç•°ãªã‚Šã€"%" 記å·ã‚’使ã£ãŸã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã«ã‚ˆã‚‹æ¤œç´¢ã¯ãƒ†ã‚­ã‚¹ãƒˆä¸­ã®å˜èªžã‚’検索ã—ã¾ã™: å˜èªžã¯ä¸€ã¤ã®ã¾ã¨ã¾ã‚Šã¨ã—ã¦å€‹ã€…ã«æ‰±ã‚れã¾ã™ã€‚ 複数ã®å˜èªžã‚„ã€éŸ³ç¯€ãªã©å˜èªžã®ä¸€éƒ¨ã‚’検索ã™ã‚‹ã‚ˆã†ãªå ´åˆã€**%** 演算å­ã¯å¸¸ã« `false` ã‚’è¿”ã—ã¾ã™ã€‚ 区切り文字 (スペースやå¥èª­ç‚¹ãªã©) ã«å›²ã¾ã‚ŒãŸæ–‡å­—列ãŒå˜èªžã¨ã—ã¦èªè­˜ã•れã¾ã™ã€‚ “Today's†ã®ã‚ˆã†ã«ã‚¢ãƒã‚¹ãƒˆãƒ­ãƒ•ィをå«ã‚€å˜èªžã¯ã€é€šå¸¸ãれをå«ã‚㟠1ã¤ã®å˜èªžã¨ã—ã¦æ‰±ã‚れã¾ã™ãŒã€ç‰¹å®šã®å ´åˆã«ã¯ç„¡è¦–ã•れã¾ã™ (ä»¥ä¸‹ã®æ³¨è¨˜ã‚’å‚ç…§ãã ã•ã„)。 数字も検索ã§ãã¾ã™ã€‚å°æ•°ç‚¹ã¯åŒºåˆ‡ã‚Šæ–‡å­—ã§ã¯ãªãã€æ•°å­—ã®ä¸€éƒ¨ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ ãŸã ã—ã€é€šè²¨ã‚„温度ãªã©ã‚’表ã™è¨˜å·ã¯ç„¡è¦–ã•れã¾ã™ã€‚ ```4d - "Alpha Bravo Charlie"%"Bravo" // True - "Alpha Bravo Charlie"%"vo" // False - "Alpha Bravo Charlie"%"Alpha Bravo" // False - "Alpha,Bravo,Charlie"%"Alpha" // True - "Software and Computers"%"comput@" // True + "Alpha Bravo Charlie"%"Bravo" // true + "Alpha Bravo Charlie"%"vo" // false + "Alpha Bravo Charlie"%"Alpha Bravo" // false + "Alpha,Bravo,Charlie"%"Alpha" // true + "Software and Computers"%"comput@" // true ``` - -> **注:** - 4Dã¯ã€<>=# 演算å­ã‚’使ã£ãŸæ–‡å­—列比較やã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®æ¤œå‡ºã«ICUライブラリを使用ã—ã¦ã„ã¾ã™ã€‚ 実装ã•れã¦ã„るルールã®è©³ç´°ã«é–¢ã—ã¦ã¯ã€ä»¥ä¸‹ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„: - 日本語版㮠4Dã§ã¯ã€ICU ã®ä»£ã‚りã«ãƒ‡ãƒ•ォルト㧠Mecab ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚è©³ç´°ãªæƒ…å ±ã«é–¢ã—ã¦ã¯ã€ [Mecab ã®ã‚µãƒãƒ¼ãƒˆ(日本語版)](https://doc.4d.com/4Dv18/4D/18/DatabaseData-storage-page.300-4575463.ja.html#1334024) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +> **注:**
        - 4Dã¯ã€<>=# 演算å­ã‚’使ã£ãŸæ–‡å­—列比較やã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã®æ¤œå‡ºã«ICUライブラリを使用ã—ã¦ã„ã¾ã™ã€‚ 実装ã•れã¦ã„るルールã®è©³ç´°ã«é–¢ã—ã¦ã¯ã€ä»¥ä¸‹ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å‚ç…§ã—ã¦ä¸‹ã•ã„: [http://www.unicode.org/unicode/reports/tr29/#Word_Boundaries](http://www.unicode.org/reports/tr29/#Word_Boundaries)
        - 日本語版㮠4Dã§ã¯ã€ICU ã®ä»£ã‚りã«ãƒ‡ãƒ•ォルト㧠Mecab ãŒä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚è©³ç´°ãªæƒ…å ±ã«é–¢ã—ã¦ã¯ã€ [Mecab ã®ã‚µãƒãƒ¼ãƒˆ(日本語版)](https://doc.4d.com/4Dv18/4D/18/DatabaseData-storage-page.300-4575463.ja.html#1334024) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 ## 文字å‚ç…§è¨˜å· - 文字å‚照記å·: [[...]] 文字å‚照記å·ã¯ã€æ–‡å­—列ã‹ã‚‰ä¸€æ–‡å­—ã®ã¿ã‚’å‚ç…§ã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®æ§‹æ–‡ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆãŠã‚ˆã³æ–‡å­—列型ã®å¤‰æ•°ã‚„フィールドã®ä»»æ„ã®ä½ç½®ã®æ–‡å­—を指ã—示ã—ã¾ã™ã€‚ @@ -187,10 +179,11 @@ End if - コンパイルモードã§ç¯„囲ãƒã‚§ãƒƒã‚¯ã‚ªãƒ—ションを無効ã«ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ãƒ¡ãƒ¢ãƒªé ˜åŸŸã‚’破壊ã™ã‚‹ãŠãれãŒã‚りã¾ã™ã€‚ - コンパイルモードã§ç¯„囲ãƒã‚§ãƒƒã‚¯ã‚ªãƒ—ションを有効ã«ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ã«æ–‡å­—列やテキストã®çµ‚点を超ãˆãŸä½ç½®ã«æ–‡å­—を書ã込むコードを実行ã™ã‚‹ã¨: - // 真似をã—ãªã„ã§ãã ã•ã„ - vsAnyText:="" - vsAnyText[[1]]:="A" - +``` +// 真似をã—ãªã„ã§ãã ã•ã„ + vsAnyText:="" + vsAnyText[[1]]:="A" +``` ランタイムã«ãŠã„ã¦ã‚¨ãƒ©ãƒ¼ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™: @@ -198,6 +191,7 @@ End if ### 例題 + 以下ã®ãƒ—ロジェクトメソッドã¯ã€æ–‡å­—列内ã®å„å˜èªžã®å…ˆé ­æ–‡å­—を大文字ã«å¤‰æ›ã—ã€çµæžœã®æ–‡å­—列を返ã—ã¾ã™ã€‚ ```4d @@ -225,4 +219,4 @@ ALERT(Capitalize_text("hello, my name is jane doe and i'm running for president! 以下ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: -![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/ja/Concepts/dt_time.md b/website/translated_docs/ja/Concepts/dt_time.md index 4c08668cb2660d..bd3bcee055b8f5 100644 --- a/website/translated_docs/ja/Concepts/dt_time.md +++ b/website/translated_docs/ja/Concepts/dt_time.md @@ -3,11 +3,13 @@ id: time title: 時間 --- -- 時間ã®ãƒ•ィールド・変数・å¼ã®ç¯„囲㯠00:00:00 ã‹ã‚‰ 596,000:00:00 ã¾ã§ã§ã™ã€‚ -- 時間㯠24時間制ã§ã™ã€‚ -- 時間ã®å€¤ã¯æ•°å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 時間ã‹ã‚‰è¿”ã•れる数値ã¯ã€ãã®æ™‚é–“ãŒè¡¨ã™ç·ç§’æ•°ã§ã™ã€‚ +時間ã®ãƒ•ィールド・変数・å¼ã®ç¯„囲㯠00:00:00 ã‹ã‚‰ 596,000:00:00 ã¾ã§ã§ã™ã€‚ -**注:** ã“ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§ã¯ã€ã‚³ãƒžãƒ³ãƒ‰èª¬æ˜Žã«ãŠã‘る時間引数ã¯ç‰¹ã«æ˜Žè¨˜ã•れã¦ã„ãªã„é™ã‚Šã€ã€Œæ™‚é–“ã€ã¨è¡¨è¨˜ã•れã¦ã„ã¾ã™ã€‚ +時間㯠24時間制ã§ã™ã€‚ + +時間ã®å€¤ã¯æ•°å€¤ã¨ã—ã¦æ‰±ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 時間ã‹ã‚‰è¿”ã•れる数値ã¯ã€ãã®æ™‚é–“ãŒè¡¨ã™ç·ç§’æ•°ã§ã™ã€‚ + +**注:** *4Dランゲージリファレンス* マニュアルã§ã¯ã€ã‚³ãƒžãƒ³ãƒ‰èª¬æ˜Žã«ãŠã‘る時間引数ã¯ç‰¹ã«æ˜Žè¨˜ã•れã¦ã„ãªã„é™ã‚Šã€ã€Œæ™‚é–“ã€ã¨è¡¨è¨˜ã•れã¦ã„ã¾ã™ã€‚ ## 時間リテラル @@ -29,30 +31,29 @@ title: 時間 ## æ™‚é–“æ¼”ç®—å­ -| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | çµæžœ | -| --------- | ---------- | --- | ----------------------- | ---------- | -| 加算 (è¶³ã—ç®—) | 時間 + 時間 | 時間 | ?02:03:04? + ?01:02:03? | ?03:05:07? | -| 減算 (引ãç®—) | 時間 - 時間 | 時間 | ?02:03:04? – ?01:02:03? | ?01:01:01? | -| 加算 (è¶³ã—ç®—) | 時間 + 数値 | 数値 | ?02:03:04? + 65 | 7449 | -| 減算 (引ãç®—) | 時間 - 数値 | 数値 | ?02:03:04? – 65 | 7319 | -| ä¹—ç®— (ã‹ã‘ç®—) | 時間 * 数値 | 数値 | ?02:03:04? * 2 | 14768 | -| 除算 (割り算) | 時間 / 数値 | 数値 | ?02:03:04? / 2 | 3692 | -| å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®— | 時間 \ 数値 | 数値 | ?02:03:04? \ 2 | 3692 | -| モジューロ | 時間 % 時間 | 時間 | ?20:10:00? % ?04:20:00? | ?02:50:00? | -| モジューロ | 時間 % 数値 | 数値 | ?02:03:04? % 2 | 0 | -| ç­‰ã—ã„ | 時間 = 時間 | ブール | ?01:02:03? = ?01:02:03? | True | -| | | | ?01:02:03? = ?01:02:04? | False | -| ç•°ãªã‚‹ | 時間 # 時間 | ブール | ?01:02:03? # ?01:02:04? | True | -| | | | ?01:02:03? # ?01:02:03? | False | -| 大ãã„ | 時間 > 時間 | ブール | ?01:02:04? > ?01:02:03? | True | -| | | | ?01:02:03? > ?01:02:03? | False | -| å°ã•ã„ | 時間 < 時間 | ブール | ?01:02:03? < ?01:02:04? | True | -| | | | ?01:02:03? < ?01:02:03? | False | -| 以上 | 時間 >= 時間 | ブール | ?01:02:03? >=?01:02:03? | True | -| | | | ?01:02:03? >=?01:02:04? | False | -| 以下 | 時間 <= Time | ブール | ?01:02:03? <=?01:02:03? | True | -| | | | ?01:02:04? <=?01:02:03? | False | - +| æ¼”ç®—å­ | シンタックス | 戻り値 | å¼ | 値 | +| --------- | -------- | --- | ----------------------- | ---------- | +| 加算 (è¶³ã—ç®—) | 時間 + 時間 | 時間 | ?02:03:04? + ?01:02:03? | ?03:05:07? | +| 減算 (引ãç®—) | 時間 - 時間 | 時間 | ?02:03:04? – ?01:02:03? | ?01:01:01? | +| 加算 (è¶³ã—ç®—) | 時間 + 数値 | 数値 | ?02:03:04? + 65 | 7449 | +| 減算 (引ãç®—) | 時間 - 数値 | 数値 | ?02:03:04? – 65 | 7319 | +| ä¹—ç®— (ã‹ã‘ç®—) | 時間 * 数値 | 数値 | ?02:03:04? * 2 | 14768 | +| 除算 (割り算) | 時間 / 数値 | 数値 | ?02:03:04? / 2 | 3692 | +| å€é•·æ•´æ•°ã‚’è¿”ã™é™¤ç®— | 時間 \ 数値 | 数値 | ?02:03:04? \ 2 | 3692 | +| モジューロ | 時間 % 時間 | 時間 | ?20:10:00? % ?04:20:00? | ?02:50:00? | +| モジューロ | 時間 % 数値 | 数値 | ?02:03:04? % 2 | 0 | +| ç­‰ã—ã„ | 時間 = 時間 | ブール | ?01:02:03? = ?01:02:03? | True | +| | | | ?01:02:03? = ?01:02:04? | False | +| ç•°ãªã‚‹ | 時間 # 時間 | ブール | ?01:02:03? # ?01:02:04? | True | +| | | | ?01:02:03? # ?01:02:03? | False | +| 大ãã„ | 時間 > 時間 | ブール | ?01:02:04? > ?01:02:03? | True | +| | | | ?01:02:03? > ?01:02:03? | False | +| å°ã•ã„ | 時間 < 時間 | ブール | ?01:02:03? < ?01:02:04? | True | +| | | | ?01:02:03? < ?01:02:03? | False | +| 以上 | 時間 >= 時間 | ブール | ?01:02:03? >=?01:02:03? | True | +| | | | ?01:02:03? >=?01:02:04? | False | +| 以下 | 時間 <= 時間 | ブール | ?01:02:03? <=?01:02:03? | True | +| | | | ?01:02:04? <=?01:02:03? | False | ### 例題 1 @@ -83,5 +84,6 @@ $vhSoon:=Time(Current time+3600) $t1:=?23:00:00? // ã“れã¯åˆå¾Œ11:00ã§ã™ // 2時間30分を追加ã—ã¾ã™ $t2:=$t1 +?02:30:00? // å˜ç´”ãªè¿½åŠ ã‚’è¡Œã†ã¨ $t2 㯠?25:30:00? ã«ãªã‚Šã¾ã™ã€‚ -$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 㯠?01:30:00? 㨠ãªã‚Šã¾ã™ã€‚ -``` \ No newline at end of file +$t2:=($t1 +?02:30:00?)%?24:00:00? // $t2 㯠?01:30:00? 㨠ãªã‚Šã¾ã™ã€‚ (翌æœ) +``` + diff --git a/website/translated_docs/ja/Concepts/dt_variant.md b/website/translated_docs/ja/Concepts/dt_variant.md index de0540d0640d28..1a1d20ac6ae66e 100644 --- a/website/translated_docs/ja/Concepts/dt_variant.md +++ b/website/translated_docs/ja/Concepts/dt_variant.md @@ -60,4 +60,4 @@ Case of End case ``` -> ãƒãƒªã‚¢ãƒ³ãƒˆåž‹å¤‰æ•°ãŒå¿…è¦ã§ã¯ãªã„å ´åˆ (ã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒåˆ†ã‹ã£ã¦ã„ã‚‹å ´åˆ)ã€åž‹ãŒå›ºå®šã•れãŸå¤‰æ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ å›ºå®šåž‹å¤‰æ•°ã®æ–¹ãŒãƒ‘フォーマンスやコードã®å¯èª­æ€§ã‚‚良ãã€äºˆæœŸã›ã¬ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を見éŽã”ã—ã¦ã—ã¾ã†ã‚ˆã†ãªãƒã‚°ã‚’防ã’ã‚‹ãŸã‚ã€ã‚³ãƒ³ãƒ‘イラーã«ã‚‚優ã—ã„ã¨ã„ãˆã¾ã™ã€‚ \ No newline at end of file +> ãƒãƒªã‚¢ãƒ³ãƒˆåž‹å¤‰æ•°ãŒå¿…è¦ã§ã¯ãªã„å ´åˆ (ã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒåˆ†ã‹ã£ã¦ã„ã‚‹å ´åˆ)ã€åž‹ãŒå›ºå®šã•れãŸå¤‰æ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ å›ºå®šåž‹å¤‰æ•°ã®æ–¹ãŒãƒ‘フォーマンスやコードã®å¯èª­æ€§ã‚‚良ãã€äºˆæœŸã›ã¬ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を見éŽã”ã—ã¦ã—ã¾ã†ã‚ˆã†ãªãƒã‚°ã‚’防ã’ã‚‹ãŸã‚ã€ã‚³ãƒ³ãƒ‘イラーã«ã‚‚優ã—ã„ã¨ã„ãˆã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/error-handling.md b/website/translated_docs/ja/Concepts/error-handling.md index 94580be981a216..e30142850e19a2 100644 --- a/website/translated_docs/ja/Concepts/error-handling.md +++ b/website/translated_docs/ja/Concepts/error-handling.md @@ -8,10 +8,17 @@ title: ã‚¨ãƒ©ãƒ¼å‡¦ç† ã‚¨ãƒ©ãƒ¼å‡¦ç†ã¯æ¬¡ã®2ã¤ã®è¦æœ›ã«å¿œãˆã¾ã™: - 開発フェーズã«ãŠã„ã¦ã€å•題ã¨ãªã‚Šã†ã‚‹ã‚³ãƒ¼ãƒ‰ã®ã‚¨ãƒ©ãƒ¼ã‚„ãƒã‚°ã‚’発見ã—ã¦ä¿®æ­£ã—ãŸã„。 -- é‹ç”¨ãƒ•ェーズã«ãŠã„ã¦ã€äºˆæœŸã—ãªã„エラーを検知ã—ã¦å›žå¾©ã—ãŸã„。ã¨ãã«ã€ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚° (ディスクãŒä¸€æ¯ã€ãƒ•ァイルãŒãªã„ã€ãªã©) を独自ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã«ç½®æ›ã§ãã¾ã™ã€‚ - +- é‹ç”¨ãƒ•ェーズã«ãŠã„ã¦ã€äºˆæœŸã—ãªã„エラーを検知ã—ã¦å›žå¾©ã—ãŸã„。ã¨ãã«ã€ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚° (ディスクãŒä¸€æ¯ã€ãƒ•ァイルãŒãªã„ã€ãªã©) を独自ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã«ç½®æ›ã§ãã¾ã™ã€‚ > 4D Server 上ã§å®Ÿè¡Œã•れるコードã®ãŸã‚ã€4D Server ã«ã¯ã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã—ã¦ãŠãã“ã¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã«ãŠã„ã¦äºˆæœŸã›ã¬ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れるã“ã¨ã‚’防ãŽã€ã‚¨ãƒ©ãƒ¼ã®èª¿æŸ»ã«å¿…è¦ãªãƒ­ã‚°ã‚’専用ファイルã«ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## エラー/ステータス + +`entity.save()` ã‚„ `transporter.send()` ãªã©ã€ãŠãŠãã® 4D クラス関数㯠*status* オブジェクトを返ã—ã¾ã™ã€‚ ランタイムã«ãŠã„㦠"想定ã•れる"ã€ãƒ—ログラムã®å®Ÿè¡Œã‚’åœæ­¢ã•ã›ãªã„エラー (無効ãªãƒ‘スワードã€ãƒ­ãƒƒã‚¯ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãªã©) ãŒã“ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ ¼ç´ã•れã¾ã™ã€‚ ã“れらã®ã‚¨ãƒ©ãƒ¼ã¸ã®å¯¾å¿œã¯ã€é€šå¸¸ã®ã‚³ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ディスク書ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼ã‚„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®å•題ãªã©ã®ã‚¤ãƒ¬ã‚®ãƒ¥ãƒ©ãƒ¼ãªä¸­æ–­ã¯ "想定ã•れãªã„" エラーã§ã™ã€‚ ã“れらã®ã‚¨ãƒ©ãƒ¼ã¯ä¾‹å¤–を発生ã•ã›ã€ã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’介ã—ã¦å¯¾å¿œã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + ## エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè£… 4D ã«ãŠã„ã¦ã¯ã€ã‚¨ãƒ©ãƒ¼å°‚用ã®ãƒ—ロジェクトメソッドã§ã‚ã‚‹ **エラー処ç†** (ã¾ãŸã¯ **エラーキャッãƒ**) メソッド内ã§ã™ã¹ã¦ã®ã‚¨ãƒ©ãƒ¼ã‚’キャッãƒã—ã€å‡¦ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -23,18 +30,11 @@ ON ERR CALL("IO_ERRORS") // エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実装ã—ã¾ã™ ``` ã‚¨ãƒ©ãƒ¼ã®æ¤œçŸ¥ã‚’中止ã™ã‚‹ã«ã¯ã€ç©ºã®æ–‡å­—列を指定ã—ã¦å†åº¦ `ON ERR CALL` コマンドをコールã—ã¾ã™: - ```4d ON ERR CALL("") // ã‚¨ãƒ©ãƒ¼ã®æ¤œçŸ¥ã‚’中止ã—ã¾ã™ ``` -### スコープã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ - -アプリケーションã«ãŠã„ã¦ä¸€ã¤ã®ã‚¨ãƒ©ãƒ¼ã‚­ãƒ£ãƒƒãƒãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã†ã‚„り方もã‚れã°ã€ã‚¢ãƒ—リケーションã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã”ã¨ã«é•ã†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã™ã‚‹æ–¹æ³•ã‚‚ã‚りã¾ã™ã€‚ ãŸã ã—ã€ä¸€ã¤ã®ãƒ—ロセスã«ã¤ã実装ã§ãã‚‹ã®ã¯ä¸€ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã¿ã§ã™ã€‚ - -`ON ERR CALL` コマンドã«ã‚ˆã£ã¦å®Ÿè£…ã•れãŸã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å®Ÿè¡Œä¸­ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã—ã‹é©ç”¨ã•れã¾ã›ã‚“。 ã¤ã¾ã‚Šã€**コンãƒãƒ¼ãƒãƒ³ãƒˆ** ã«ã‚ˆã£ã¦ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¦ã‚‚ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„㦠`ON ERR CALL` ã§å®Ÿè£…ã•れãŸã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å応ã—ã¾ã›ã‚“ã—ã€é€†ã‚‚ã¾ãŸç„¶ã‚Šã§ã™ã€‚ - -`Method called on error` コマンドã¯ã€`ON ERR CALL` ã«ã‚ˆã£ã¦ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るエラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰åã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ã¨ãã«æœ‰ç”¨ã§ã™ã€‚エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’一時的ã«å¤‰æ›´ã—ã€å¾Œã§å¾©å…ƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +`Method called on error` コマンドã¯ã€`ON ERR CALL` ã«ã‚ˆã£ã¦ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るエラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰åã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‰ã§ã¨ãã«æœ‰ç”¨ã§ã™ã€‚エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’一時的ã«å¤‰æ›´ã—ã€å¾Œã§å¾©å…ƒã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ```4d $methCurrent:=Method called on error @@ -46,20 +46,29 @@ ON ERR CALL("") // ã‚¨ãƒ©ãƒ¼ã®æ¤œçŸ¥ã‚’中止ã—ã¾ã™ ``` +### スコープã¨ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ + +アプリケーションã«ãŠã„ã¦ä¸€ã¤ã®ã‚¨ãƒ©ãƒ¼ã‚­ãƒ£ãƒƒãƒãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã†ã‚„り方もã‚れã°ã€ã‚¢ãƒ—リケーションã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã”ã¨ã«é•ã†ãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã™ã‚‹æ–¹æ³•ã‚‚ã‚りã¾ã™ã€‚ ãŸã ã—ã€ä¸€ã¤ã®ãƒ—ロセスã«ã¤ã実装ã§ãã‚‹ã®ã¯ä¸€ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã¿ã§ã™ã€‚ + +`ON ERR CALL` コマンドã«ã‚ˆã£ã¦å®Ÿè£…ã•れãŸã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å®Ÿè¡Œä¸­ã®ã‚¢ãƒ—リケーションã«ã—ã‹é©ç”¨ã•れã¾ã›ã‚“。 ã¤ã¾ã‚Šã€**コンãƒãƒ¼ãƒãƒ³ãƒˆ** ã«ã‚ˆã£ã¦ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¦ã‚‚ã€ãƒ›ã‚¹ãƒˆã‚¢ãƒ—リケーションã«ãŠã„㦠`ON ERR CALL` ã§å®Ÿè£…ã•れãŸã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯å応ã—ã¾ã›ã‚“ã—ã€é€†ã‚‚ã¾ãŸç„¶ã‚Šã§ã™ã€‚ + + ### メソッド内ã§ã®ã‚¨ãƒ©ãƒ¼å‡¦ç† 独自ã«ä½œæˆã—ã¦ã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ã¯ã€ã‚¨ãƒ©ãƒ¼ã‚’調査ã™ã‚‹ãŸã‚ã®æƒ…å ±ãŒã„ãã¤ã‹æä¾›ã•れã¦ã„ã¾ã™: - 専用ã®ã‚·ã‚¹ãƒ†ãƒ å¤‰æ•° (*): - + - `Error` (å€é•·æ•´æ•°): エラーコード - `Error method` (テキスト): エラーを生æˆã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã®åç§° - `Error line` (å€é•·æ•´æ•°): エラーを生æˆã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã®è¡Œç•ªå· - - `Error formula` (テキスト): エラーã®å…ƒã¨ãªã£ãŸ 4D コードã®ãƒ•ォーミュラ (テキスト) + - `Error formula` (テキスト): エラーã®å…ƒã¨ãªã£ãŸ 4D コードã®ãƒ•ォーミュラ (テキスト) (*) 4D ã¯ã€ã„ãã¤ã‹ã® **システム変数** ã¨å‘¼ã°ã‚Œã‚‹å°‚用ã®å¤‰æ•°ã‚’自動的ã«ç®¡ç†ã—ã¦ã„ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [4D ランゲージマニュアル](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.ja.html) ã‚’å‚ç…§ãã ã•ã„。 -- `GET LAST ERROR STACK` コマンドã¯ã€4Dアプリケーションã®ç¾åœ¨ã®ã‚¨ãƒ©ãƒ¼ã‚¹ã‚¿ãƒƒã‚¯ã«é–¢ã™ã‚‹æƒ…報を返ã—ã¾ã™ã€‚ +- `GET LAST ERROR STACK` コマンドã¯ã€4Dアプリケーションã®ç¾åœ¨ã®ã‚¨ãƒ©ãƒ¼ã‚¹ã‚¿ãƒƒã‚¯ã«é–¢ã™ã‚‹æƒ…報を返ã—ã¾ã™ã€‚ +- `Get call chain` コマンドã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセス内ã«ãŠã‘ã‚‹ã€ãƒ¡ã‚½ãƒƒãƒ‰å‘¼ã³å‡ºã—ãƒã‚§ãƒ¼ãƒ³ã®å„ステップを詳細ã«èª¬æ˜Žã™ã‚‹ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + #### 例題 @@ -90,4 +99,6 @@ If (Error=-43) ALERT("ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“。") End if ON ERR CALL("") -``` \ No newline at end of file +``` + + diff --git a/website/translated_docs/ja/Concepts/flow-control.md b/website/translated_docs/ja/Concepts/flow-control.md index dc5d7972ecd804..608d810afd7f15 100644 --- a/website/translated_docs/ja/Concepts/flow-control.md +++ b/website/translated_docs/ja/Concepts/flow-control.md @@ -6,12 +6,11 @@ title: 制御フロー メソッドãŒå˜ç´”ã‹è¤‡é›‘ã‹ã«é–¢ä¿‚ãªãã€é–‹ç™ºè€…ã¯3ã¤ã®ãƒ—ログラミング構造ã®ã†ã¡ã€1ã¤ä»¥ä¸Šã‚’常ã«ä½¿ç”¨ã—ã¾ã™ã€‚ プログラミング構造ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãŒå®Ÿè¡Œã•れる順åºã‚’決定ã™ã‚‹å®Ÿè¡Œãƒ•ローをコントロールã—ã¾ã™ã€‚ 3ã¤ã®ã‚¿ã‚¤ãƒ—ã®æ§‹é€ ãŒã‚りã¾ã™: - **シーケンシャル**: シーケンシャル構造ã¯å˜ç´”ãªç·šå½¢æ§‹é€ ã§ã™ã€‚ シーケンスã¨ã¯ã€4DãŒæœ€åˆã‹ã‚‰æœ€å¾Œã¾ã§æ¬¡ã€…ã«å®Ÿè¡Œã™ã‚‹ä¸€é€£ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã™ã€‚ オブジェクトメソッドã§é »ç¹ã«ä½¿ç”¨ã•れる1行ã‹ã‚‰æˆã‚‹ãƒ«ãƒ¼ãƒãƒ³ã¯ã‚‚ã£ã¨ã‚‚ç°¡å˜ãªã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«æ§‹é€ ã®ä¾‹ã§ã™ã€‚ 例: `[People]lastName:=Uppercase([People]lastName)` -- **[分å²](Concepts/cf_branching.md)**: åˆ†å²æ§‹é€ ã¯ã€æ¡ä»¶ã‚’テストã—ã€ãã®çµæžœã«åŸºã¥ã„ã¦ç•°ãªã‚‹æµã‚Œã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å°Žãã¾ã™ã€‚ æ¡ä»¶ã¯ TRUE ã¾ãŸã¯ FALSE ã«è©•価ã•れるブールå¼ã§ã™ã€‚ `If...Else...End if` æ§‹æ–‡ã¯åˆ†å²æ§‹é€ ã®ä¸€ä¾‹ã§ã€å‡¦ç†ãƒ•ローを二ã¤ã«åˆ†å²ã—ã¾ã™ã€‚ `Case of...Else...End case` æ§‹æ–‡ã‚‚åˆ†å²æ§‹é€ ã®ä¸€ã¤ã§ã€å‡¦ç†ãƒ•ローをもã£ã¨ãŸãã•ん分å²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- **[ループ](Concepts/cf_looping.md)**: メソッドã®ä½œæˆã«ã‚ãŸã£ã¦ã€ä½•度もåŒã˜å‡¦ç†ã‚’繰り返ã™ã“ã¨ãŒã‚りã¾ã™ã€‚ ã“れã«å®Ÿç¾ã™ã‚‹ãŸã‚ã«ã€4Dã¯ä»¥ä¸‹ã®ãƒ«ãƒ¼ãƒ—構造を備ãˆã¦ã„ã¾ã™: +- **[分å²](Concepts/cf_branching.md)**: åˆ†å²æ§‹é€ ã¯ã€æ¡ä»¶ã‚’テストã—ã€ãã®çµæžœã«åŸºã¥ã„ã¦ç•°ãªã‚‹æµã‚Œã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å°Žãã¾ã™ã€‚ æ¡ä»¶ã¯ true ã¾ãŸã¯ false ã«è©•価ã•れるブールå¼ã§ã™ã€‚ `If...Else...End if` æ§‹æ–‡ã¯åˆ†å²æ§‹é€ ã®ä¸€ä¾‹ã§ã€å‡¦ç†ãƒ•ローを二ã¤ã«åˆ†å²ã—ã¾ã™ã€‚ `Case of...Else...End case` æ§‹æ–‡ã‚‚åˆ†å²æ§‹é€ ã®ä¸€ã¤ã§ã€å‡¦ç†ãƒ•ローをもã£ã¨ãŸãã•ん分å²ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **[ループ](Concepts/cf_looping.md)**: メソッドã®ä½œæˆã«ã‚ãŸã£ã¦ã€ä½•度もåŒã˜å‡¦ç†ã‚’繰り返ã™ã“ã¨ãŒã‚りã¾ã™ã€‚ ã“れã«å®Ÿç¾ã™ã‚‹ãŸã‚ã«ã€4Dã¯ä»¥ä¸‹ã®ãƒ«ãƒ¼ãƒ—構造を備ãˆã¦ã„ã¾ã™: - `While...End while` - `Repeat...Until` - `For...End for` - - `For each...End for each` - ルー プを制御ã™ã‚‹æ–¹æ³•ã«ã¯ã€æ¡ä»¶ãŒæº€ãŸã•れるã¾ã§ãƒ«ãƒ¼ãƒ—ã™ã‚‹æ–¹æ³•ã¨ã€æŒ‡å®šã—ãŸå›žæ•°ã ã‘ループã™ã‚‹æ–¹æ³•ã®2通りãŒã‚りã¾ã™ã€‚ å„ループ構造ã¯ã„ãšã‚Œã®æ–¹æ³•ã«ã‚‚用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€`While` ループ㨠`Repeat` ãƒ«ãƒ¼ãƒ—ã¯æ¡ä»¶ãŒæº€ãŸã•れるã¾ã§ç¹°ã‚Šè¿”ã™å ´åˆã«ã€`For` ãƒ«ãƒ¼ãƒ—ã¯æŒ‡å®šã—ãŸå›žæ•°ã ã‘ループã™ã‚‹å ´åˆã®åˆ©ç”¨ã«é©åˆ‡ã§ã™ã€‚ `For each...End for each` ループã¯ä¸¡æ–¹ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã€ã‚ªãƒ–ジェクトやコレクション内ã§ãƒ«ãƒ¼ãƒ—ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ + - `For each...End for each`
        ルー プを制御ã™ã‚‹æ–¹æ³•ã«ã¯ã€æ¡ä»¶ãŒæº€ãŸã•れるã¾ã§ãƒ«ãƒ¼ãƒ—ã™ã‚‹æ–¹æ³•ã¨ã€æŒ‡å®šã—ãŸå›žæ•°ã ã‘ループã™ã‚‹æ–¹æ³•ã®2通りãŒã‚りã¾ã™ã€‚ å„ループ構造ã¯ã„ãšã‚Œã®æ–¹æ³•ã«ã‚‚用ã„ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€`While` ループ㨠`Repeat` ãƒ«ãƒ¼ãƒ—ã¯æ¡ä»¶ãŒæº€ãŸã•れるã¾ã§ç¹°ã‚Šè¿”ã™å ´åˆã«ã€`For` ãƒ«ãƒ¼ãƒ—ã¯æŒ‡å®šã—ãŸå›žæ•°ã ã‘ループã™ã‚‹å ´åˆã®åˆ©ç”¨ã«é©åˆ‡ã§ã™ã€‚ `For each...End for each` ループã¯ä¸¡æ–¹ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã€ã‚ªãƒ–ジェクトやコレクション内ã§ãƒ«ãƒ¼ãƒ—ã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ -**注:** 4Dã¯ãƒ—ログラム構造 (If/While/For/Caes of/Repeat/For each) ã‚’512レベルã¾ã§å…¥ã‚Œå­ã§è¨˜è¿°ã§ãã¾ã™ã€‚ \ No newline at end of file +**注:** 4Dã¯ãƒ—ログラム構造 (If/While/For/Caes of/Repeat/For each) ã‚’512レベルã¾ã§å…¥ã‚Œå­ã§è¨˜è¿°ã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Concepts/identifiers.md b/website/translated_docs/ja/Concepts/identifiers.md index 0adfdd1c97e88a..dfa4671b682383 100644 --- a/website/translated_docs/ja/Concepts/identifiers.md +++ b/website/translated_docs/ja/Concepts/identifiers.md @@ -3,231 +3,80 @@ id: identifiers title: 識別å­ã®å‘½åè¦å‰‡ --- -ã“ã®ç« ã§ã¯ã€4D ランゲージã«ãŠã‘ã‚‹ã•ã¾ã–ã¾ãªè¦ç´  (変数ã€ãƒ†ãƒ¼ãƒ–ルã€ã‚ªãƒ–ジェクトã€ãƒ•ォームãªã©) ã®å‘½åè¦å‰‡ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ +ã“ã®ç« ã§ã¯ã€4D ランゲージã«ãŠã‘ã‚‹ã•ã¾ã–ã¾ãªè¦ç´  (変数ã€ã‚ªãƒ–ジェクトプロパティã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ォームãªã©) ã®å‘½åè¦å‰‡ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ -## 基本ルール +> éžãƒ­ãƒ¼ãƒžæ–‡å­— (日本語ãªã©) ãŒè­˜åˆ¥å­ã«ä½¿ç”¨ã•れãŸå ´åˆã€ãã®æœ€å¤§é•·ã¯çŸ­ã‹ããªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ -以下ã®å‘½åè¦å‰‡ã¯ 4D フレームワークã«ãŠã„ã¦å…¨èˆ¬çš„ã«é©ç”¨ã•れã¾ã™: -- 識別å­ã® 1文字目ã¯ã€åŠè§’アルファベットã€ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ ("_")ã€ã‚ã‚‹ã„ã¯ãƒ‰ãƒ«è¨˜å· ("$") ã§å§‹ã‚ã¾ã™ã€‚ -- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€åŠè§’アルファベット文字・数字・スペース・アンダースコアを使用ãŒã§ãã¾ã™ã€‚ -- テーブル・フィールド・メソッド・変数ã®åç§°ã«ã€ãƒ”リオド (".") ãŠã‚ˆã³å¤§ã‚«ãƒƒã‚³ ("[ ]") ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 -- カンマ (,)・スラッシュ(/)・引用符(")・コロン(:) ã®ä½¿ç”¨ã¯ç¦æ­¢ã•れã¦ã„ã¾ã™ã€‚ -- 演算å­ã¨ã—ã¦ç”¨ã„ã‚‰ã‚Œã‚‹è¨˜å· ("*" ã‚„ "+" ãªã©) ã®ä½¿ç”¨ã¯ç¦æ­¢ã•れã¦ã„ã¾ã™ã€‚ -- 予約語を使用ã—ãªã„ã§ãã ã•ã„。予約語ã«ã¯ã‚³ãƒžãƒ³ãƒ‰å (`Date`, `Time` ç­‰)ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ (If, For ç­‰)ã€ãã—ã¦å®šæ•°ãŒå«ã¾ã‚Œã¾ã™ã€‚ -- åå‰ã®æœ€å¾Œã«ã¤ã‘ãŸã‚¹ãƒšãƒ¼ã‚¹ã¯ç„¡è¦–ã•れã¾ã™ã€‚ - -### ORDA ã«é©ç”¨ã•れる追加ルール - -- スペースã¯ä½¿ãˆã¾ã›ã‚“。 -- ピリオド (".") ãŠã‚ˆã³å¤§ã‚«ãƒƒã‚³ ("[ ]") ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 -- å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ - -### SQL ã§å‡¦ç†ã™ã‚‹å ´åˆã®è¿½åŠ ãƒ«ãƒ¼ãƒ« - -- 文字 _0123456789abcdefghijklmnopqrstuvwxyz ã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ -- åå‰ã« SQLキーワード (コマンドã€å±žæ€§ ç­‰) ãŒå«ã¾ã‚Œã¦ã„ã¦ã¯ãªã‚Šã¾ã›ã‚“。 - -**注:** ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚¤ãƒ³ã‚¹ãƒšã‚¯ã‚¿ãƒ¼ä¸‹éƒ¨ã«ã‚ã‚‹ â€SQL†エリアã«ã¯ã€ãƒ†ãƒ¼ãƒ–ルåやフィールドåã¨ã—ã¦è¨±å¯ã•れãªã„文字ãŒã‚ã‚‹ã¨è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -## テーブル - -大カッコ内 ([...]) ã«åå‰ã‚’入れるã“ã¨ã§ã€ãƒ†ãƒ¼ãƒ–ルを表ã—ã¾ã™ã€‚ テーブルåã¯ã€31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: - -```4d -DEFAULT TABLE([Orders]) -FORM SET INPUT([Clients];"Entry") -ADD RECORD([Letters]) -``` - -## フィールド - -フィールドãŒå±žã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを最åˆã«æŒ‡å®šã™ã‚‹ã“ã¨ã§ã€ãƒ•ィールドを表ã—ã¾ã™ã€‚ フィールドåã¯ãƒ†ãƒ¼ãƒ–ルåã®ã™ã後ã«ç¶šã‘ã¾ã™ã€‚ フィールドåã¯31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: - -```4d -[Orders]Total:=Sum([Line]Amount) -QUERY([Clients];[Clients]Name="Smith") -[Letters]Text:=Capitalize text([Letters]Text) -``` - -## インタープロセス変数 - -åå‰ã®å…ˆé ­ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) を付ã‘ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数を表ã—ã¾ã™ã€‚ - -インタープロセス変数åã¯ã€<> 記å·ã‚’除ã„ã¦æœ€å¤§31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -例: - -```4d -<>vlProcessID:=Current process -<>vsKey:=Char(KeyCode) -If(<>vtName#"") -``` - -## プロセス変数 - -(<>記å·ã‚„$記å·ã‹ã‚‰å§‹ã¾ã‚‰ãªã„) åå‰ã‚’使用ã—ã¦ã€ãƒ—ロセス変数を表ã—ã¾ã™ã€‚ プロセス変数ã®åå‰ã¯ã€æœ€å¤§31文字ã¾ã§ã®é•·ã•ã§æŒ‡å®šã§ãã¾ã™ã€‚ - -例: - -```4d -<>vrGrandTotal:=Sum([Accounts]Amount) -If(bValidate=1) -vsCurrentName:="" -``` - -## ローカル変数 - -ãƒ‰ãƒ«è¨˜å· ($) ã‚’åå‰ã®å…ˆé ­ã«ã¤ã‘ã¦ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’表ã—ã¾ã™ã€‚ ローカル変数åã¯ã€ãƒ‰ãƒ«è¨˜å· ($) を除ã„ã¦31文字ã¾ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -例: - -```4d -For($vlRecord;1;100) -If($vsTempVar="No") -$vsMyString:="Hello there" -``` ## é…列 -é…列ã¯ã€é…åˆ—ä½œæˆæ™‚ã«é…列宣言コマンド (ARRAY LONGINT ç­‰) ã«æ¸¡ã™åå‰ã§ã‚‚ã£ã¦è¡¨ã•れã¾ã™ã€‚ é…列ã¯å¤‰æ•°ã§ã‚りã€ã‚¹ã‚³ãƒ¼ãƒ—ã«åŸºã¥ã„ã¦æ¬¡ã®3種類ãŒã‚りã¾ã™: - -- インタープロセスé…列 -- プロセスé…列 -- ローカルé…列 - -### インタープロセスé…列 - -インタープロセスé…列ã®åå‰ã¯ã€å…ˆé ­ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) ãŒä»˜ãã¾ã™ã€‚ +[変数](#変数) ã¨åŒã˜ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™ã€‚ -インタープロセスé…列åã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) を除ã„ã¦31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: - -```4d -ARRAY TEXT(<>atSubjects;Records in table([Topics])) -SORT ARRAY(<>asKeywords;>) -ARRAY INTEGER(<>aiBigArray;10000) -``` -### プロセスé…列 +## クラス -(<>記å·ã‚„$記å·ã‹ã‚‰å§‹ã¾ã‚‰ãªã„) åå‰ã‚’使用ã—ã¦ã€ãƒ—ロセスé…列を表ã‚ã—ã¾ã™ã€‚ プロセスé…列åã¯31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +クラスåã¯31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -例: +クラスåã¯ã€ãƒ‰ãƒƒãƒˆè¨˜æ³•ã®ãŸã‚ã®æ¨™æº–的㪠[プロパティåã®å‘½åè¦å‰‡](Concepts/dt_object.md#オブジェクトプロパティ識別å­) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -```4d -ARRAY TEXT(atSubjects;Records in table([Topics])) -SORT ARRAY(asKeywords;>) -ARRAY INTEGER(aiBigArray;10000) -``` +> ç«¶åˆé˜²æ­¢ã®ãŸã‚ã€[データベーステーブル](#tables) ã¨åŒã˜åå‰ã®ã‚¯ãƒ©ã‚¹ã‚’作æˆã™ã‚‹ã®ã¯æŽ¨å¥¨ã•れãªã„ã“㨠-### ローカルé…列 -é…列åãŒãƒ‰ãƒ«è¨˜å· ($) ã§å§‹ã¾ã‚‹ã‚‚ã®ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«é…列ã§ã™ã€‚ ローカルé…列åã¯ã€ãƒ‰ãƒ« ($) 記å·ã‚’除ã„ã¦31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -例: +## 関数 -```4d -ARRAY TEXT($atSubjects;Records in table([Topics])) -SORT ARRAY($asKeywords;>) -ARRAY INTEGER($aiBigArray;10000) -``` +関数åã¯ã€ãƒ‰ãƒƒãƒˆè¨˜æ³•ã®ãŸã‚ã®æ¨™æº–的㪠[プロパティåã®å‘½åè¦å‰‡](#オブジェクトプロパティ) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -### é…列ã®è¦ç´  +> **Tip:** アンダースコア ("_") 文字ã§é–¢æ•°åã‚’é–‹å§‹ã™ã‚‹ã¨ã€ãã®é–¢æ•°ã¯ 4Dコードエディターã®è‡ªå‹•補完機能ã‹ã‚‰é™¤å¤–ã•れã¾ã™ã€‚ -中カッコ ("{ }") を使用ã—ã¦ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセスé…列ã€ãƒ—ロセスé…列ã€ãƒ­ãƒ¼ã‚«ãƒ«é…列ã®è¦ç´ ã‚’å‚ç…§ã—ã¾ã™ã€‚ å‚ç…§ã•れるé…列è¦ç´ ã¯æ•°å¼ã§è¡¨ã•れã¾ã™ã€‚ -例: -```4d - // インタープロセスé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If(<>asKeywords{1}="Stop") -<>atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=<>aiBigArray{Size of array(<>aiBigArray)} - - // プロセスé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If(asKeywords{1}="Stop") -atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=aiBigArray{Size of array(aiBigArray)} - - // ローカルé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If($asKeywords{1}="Stop") -$atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{Size of array($aiBigArray)} -``` +## オブジェクトプロパティ -### 二次元é…列ã®è¦ç´  +プロパティå (オブジェクト *属性* ã¨ã‚‚呼ã³ã¾ã™) ã¯255æ–‡å­—ä»¥å†…ã®æ–‡å­—åˆ—ã§æŒ‡å®šã—ã¾ã™ã€‚ -中カッコ ("{ }") ã‚’2回使用ã—ã¦ã€2次元é…列ã®è¦ç´ ã‚’å‚ç…§ã—ã¾ã™ã€‚ å‚ç…§ã•れるè¦ç´ ã¯2組ã®ä¸­ã‚«ãƒƒã‚³å†…ã®2ã¤ã®æ•°å¼ã§è¡¨ã•れã¾ã™ã€‚ +オブジェクトプロパティã¯ã€ã‚¹ã‚«ãƒ©ãƒ¼å€¤ãƒ»ORDAè¦ç´ ãƒ»ã‚¯ãƒ©ã‚¹é–¢æ•°ãƒ»ä»–ã®ã‚ªãƒ–ジェクト等をå‚ç…§ã§ãã¾ã™ã€‚ å‚ç…§å…ˆã«é–¢ã‚らãšã€**[ドット記法](dt_object.md#object-properties) を使用ã™ã‚‹ã«ã¯** オブジェクトプロパティåã¯æ¬¡ã®å‘½åè¦å‰‡ã«å¾“ã†å¿…è¦ãŒã‚りã¾ã™: -例: - -```4d - // 2次元インタープロセスé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If(<>asKeywords{$vlNextRow}{1}="Stop") -<>atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=<>aiBigArray{$vlSet}{Size of array(<>aiBigArray{$vlSet})} - - // 2次元プロセスé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If(asKeywords{$vlNextRow}{1}="Stop") -atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=aiBigArray{$vlSet}{Size of array(aiBigArray{$vlSet})} - - // 2次元ローカルé…列ã®è¦ç´ ã‚’指定ã—ã¾ã™ -If($asKeywords{$vlNextRow}{1}="Stop") -$atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{$vlSet}{Size of array($aiBigArray{$vlSet})} -``` - -## オブジェクト属性 +- 1文字目ã¯ã€æ–‡å­—ã€ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)ã€ã‚ã‚‹ã„ã¯ãƒ‰ãƒ«è¨˜å· ($) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€æ–‡å­—・数字・アンダースコア(_)ãƒ»ãƒ‰ãƒ«è¨˜å· ($) ãŒä½¿ç”¨ã§ãã¾ã™ã€‚ +- å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ -ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆè¨˜æ³•ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ãã€ãƒ‰ãƒƒãƒˆ (".") をオブジェクトå (ã‚ã‚‹ã„ã¯å±žæ€§å) ã¨å±žæ€§åã®é–“ã«ç½®ãã“ã¨ã§ã‚ªãƒ–ジェクト属性 (オブジェクトプロパティã¨ã‚‚呼ã³ã¾ã™) を指定ã—ã¾ã™ã€‚ 属性åã¯255æ–‡å­—ä»¥å†…ã®æ–‡å­—åˆ—ã§æŒ‡å®šã—ã€ã¾ãŸå¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 -例: +例: ```4d myObject.myAttribute:="10" $value:=$clientObj.data.address.city ``` -**注:** オブジェクト属性åã«ã¯ã•らã«ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™ (オブジェクト属性㯠ECMAScript ã®ä»•æ§˜ã«æ²¿ã†å¿…è¦ãŒã‚りã¾ã™)。 詳細ã«ã¤ã„ã¦ã¯ã€[オブジェクト記法ã®ä½¿ç”¨](Concepts/dt_object.md#オブジェクト記法ã®ä½¿ç”¨) ã‚’å‚ç…§ãã ã•ã„。 - -## フォーム - -フォームã®åå‰ã¯æ–‡å­—列を使用ã—ã¦è¡¨ã—ã¾ã™ã€‚ フォームåã¯31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +> 大カッコ [ ] ã«æ–‡å­—列をå«ã‚る記法を利用ã™ã‚Œã°ã€ãƒ—ロパティåã«ã¯ã‚らゆる文字を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (例: `myObject["1. First property"]`)。 -例: +詳細㯠[ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6) ã‚’å‚ç…§ãã ã•ã„。 -```4d -FORM SET INPUT([People];"Input") -FORM SET OUTPUT([People];"Output") -DIALOG([Storage];"Note box"+String($vlStage)) -``` - -## フォームオブジェクト +## 引数 -フォームオブジェクトを引数ã¨ã—ã¦ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã™ã«ã¯ã€æ–‡å­—列ã®åç§°ã®å‰ã«ã€ä»»æ„パラメーターã§ã‚ã‚‹ * 記å·ã‚’使ã„ã¾ã™ã€‚ オブジェクトåã«ã¯æœ€å¤§ã§255ãƒã‚¤ãƒˆã¾ã§å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +引数åã¯å¿…ãš `$` 文字ã§å§‹ã¾ã‚Šã¾ã™ã€‚ã¾ãŸã€[変数å](#variables) ã¨åŒã˜ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™ã€‚ -例: +例: ```4d -OBJECT SET FONT(*;"Binfo";"Times") +Function getArea($width : Integer; $height : Integer)-> $area : Integer + +#DECLARE ($i : Integer ; $param : Date) -> $myResult : Object ``` -**注:** フォームオブジェクト (ボタンã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã€å…¥åŠ›å¯èƒ½ãªå¤‰æ•°ãªã©) 㨠4Dランゲージã®ã‚ªãƒ–ジェクト型を混åŒã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 4Dランゲージã®ã‚ªãƒ–ジェクト型ã¯ã‚ªãƒ–ジェクト記法ã¨å°‚用ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ä½œæˆã—ã€ç®¡ç†ã•れã¾ã™ã€‚ ## プロジェクトメソッド -プロジェクトメソッド (プロシージャーãŠã‚ˆã³é–¢æ•°) ã¯åå‰ã«ã‚ˆã£ã¦è¡¨ã•れã¾ã™ã€‚ メソッドåã¯31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +プロジェクトメソッドå㯠31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -**注:** çµæžœã‚’è¿”ã•ãªã„プロジェクトメソッドã¯ãƒ—ロシージャーã¨ã‚‚呼ã°ã‚Œã¾ã™ã€‚ çµæžœã‚’è¿”ã™ãƒ—ロジェクトメソッドを関数ã¨å‘¼ã³ã¾ã™ã€‚ +- 1文字目ã¯ã€æ–‡å­—ã€æ•°å­—ã€ã‚ã‚‹ã„ã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€æ–‡å­—・数字・アンダースコア(_)・スペースãŒä½¿ç”¨ã§ãã¾ã™ã€‚ +- 予約語を使用ã—ãªã„ã§ãã ã•ã„。予約語ã«ã¯ã‚³ãƒžãƒ³ãƒ‰å (`Date`, `Time` ç­‰)ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ (`If`, `For` ç­‰)ã€ãã—ã¦å®šæ•° (`Euro`, `Black`, `Friday` ç­‰) ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã™ã€‚ -例: +例: ```4d If(New client) @@ -235,11 +84,11 @@ DELETE DUPLICATED VALUES APPLY TO SELECTION([Employees];INCREASE SALARIES) ``` -**Tip:** 4Dã®ãƒ“ルトインコマンドã¨åŒã˜å‘½åè¦ç´„を利用ã™ã‚‹ã“ã¨ã¯è‰¯ã„プログラミングテクニックã§ã™ã€‚ メソッドåã«ã¯å¤§æ–‡å­—を使用ã—ã¾ã™ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒé–¢æ•°ã®å ´åˆã«ã¯æœ€åˆã®æ–‡å­—ã ã‘を大文字ã«ã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«å‘½åã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€æ•°ãƒ¶æœˆå¾Œã«ä¿å®ˆã®ãŸã‚データベースをå†åº¦é–‹ã„ãŸã¨ãã«ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーウィンドウã§ãã®åå‰ã‚’見ãŸã ã‘ã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒçµæžœã‚’è¿”ã™ã‹ã©ã†ã‹ãŒã‚ã‹ã‚Šã¾ã™ã€‚ +**Tip:** 4Dã®ãƒ“ルトインコマンドã¨åŒã˜å‘½åè¦ç´„を利用ã™ã‚‹ã“ã¨ã¯è‰¯ã„プログラミングテクニックã§ã™ã€‚ メソッドåã«ã¯å¤§æ–‡å­—を使用ã—ã¾ã™ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå€¤ã‚’è¿”ã™å ´åˆã«ã¯æœ€åˆã®æ–‡å­—ã ã‘を大文字ã«ã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«å‘½åã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€æ•°ãƒ¶æœˆå¾Œã«ä¿å®ˆã®ãŸã‚プロジェクトをå†åº¦é–‹ã„ãŸã¨ãã«ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーウィンドウã§ãã®åå‰ã‚’見ãŸã ã‘ã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒçµæžœã‚’è¿”ã™ã‹ã©ã†ã‹ãŒã‚ã‹ã‚Šã¾ã™ã€‚ -**注:** メソッドを呼ã³å‡ºã™ã«ã¯ã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰åを入力ã—ã¾ã™ã€‚ ã—ã‹ã— `ON EVENT CALL` ãªã©ä¸€éƒ¨ã® 4Dã®ãƒ“ルトインコマンドやプラグインコマンドã«ãƒ¡ã‚½ãƒƒãƒ‰åを引数ã¨ã—ã¦æ¸¡ã™å ´åˆã«ã¯æ–‡å­—列 (ãƒ€ãƒ–ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§æ‹¬ã‚‹) ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ 例: + > メソッドを呼ã³å‡ºã™ã«ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰åを書ãã¾ã™ã€‚ ã—ã‹ã— `ON EVENT CALL` ãªã©ä¸€éƒ¨ã® 4Dã®ãƒ“ルトインコマンドやプラグインコマンドã«ã€å¼•æ•°ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰åを渡ã™å ´åˆã«ã¯ã€æ–‡å­—列 (ãƒ€ãƒ–ãƒ«ã‚¯ã‚©ãƒ¼ãƒˆã§æ‹¬ã‚‹) ã¨ã—ã¦æ¸¡ã—ã¾ã™ã€‚ -例: +例: ```4d // ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ¡ã‚½ãƒƒãƒ‰ (関数) ã¾ãŸã¯ãƒ•ォーミュラをå—ã‘å–りã¾ã™ @@ -250,174 +99,80 @@ APPLY TO SELECTION([Employees];INCREASE SALARIES) ON EVENT CALL("HANDLE EVENTS") ``` -プロジェクトメソッドã«ã¯å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ メソッドã«å¼•数を渡ã™å ´åˆã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰åã®å¾Œã®æ‹¬å¼§ () ã«å¼•数を入れ〠セミコロン (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ 引数ã¯å—ã‘å–りå´ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¦ã€å—ã‘å–り順ã«ç•ªå·ãŒä»˜ã‘られãŸãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° ($1, $2, ...$n) ã«æ ¼ç´ã•れã¾ã™ã€‚ ã•らã«ã€è¤‡æ•°ã®é€£ç¶šã™ã‚‹å¼•æ•°ã¯ã€${n}ã¨ã„ã†ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’用ã„ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚nã¯æ•°å€¤ã§å¼•æ•°ã®ç•ªå·ã‚’示ã—ã¾ã™ã€‚ - -é–¢æ•°ã®æˆ»ã‚Šå€¤ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° $0 ã«ä»£å…¥ã™ã‚‹ã“ã¨ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: - -```4d - // DROP SPACES メソッド内ã§ã€$1 ã¯ãƒ•ィールド [People]Name ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã§ã™ -DROP SPACES(->[People]Name) - - // Calc creator メソッド内ã§ã€ - //- $1 ã¯æ•°å€¤ã® 1 - //- $2 ã¯æ•°å€¤ã® 5 - //- $3 テキストã¾ãŸã¯æ–‡å­—列㮠"Nice" - //- 戻り値㯠$0 ã«ä»£å…¥ã•れã¾ã™ -$vsResult:=Calc creator(1;5;"Nice") - - // Dump メソッド内ã§ã€ - //- 3ã¤ã®å¼•æ•°ã¯ãƒ†ã‚­ã‚¹ãƒˆã¾ãŸã¯æ–‡å­—列ã§ã™ - //- ã“れらã®å¼•数㯠$1, $2, $3 ã§å‚ç…§ã§ãã¾ã™ - //- ã¾ãŸã€ã“れらã®å¼•æ•°ã‚’ ${$vlParam} ã§é–“接的ã«å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ ($vlParamã¯1, 2, 3) - //- 戻り値㯠$0 ã«ä»£å…¥ã•れã¾ã™ -vtClone:=Dump("is";"the";"it") -``` - -## プラグインコマンド - -プラグインã«ã‚ˆã‚Šå®šç¾©ã•れãŸåå‰ã‚’使用ã—ã¦ã€ãƒ—ラグインコマンドを表ã—ã¾ã™ã€‚ プラグインコマンドå㯠31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: - -```4d -$error:=SMTP_From($smtp_id;"henry@gmail.com") -``` - -## セット - -スコープã«åŸºã¥ãã€2種類ã®ã‚»ãƒƒãƒˆãŒã‚りã¾ã™: - -- インタープロセスセット -- プロセスセット -4D Server ã«ã¯ä»¥ä¸‹ã‚‚ã‚りã¾ã™: -- クライアントセット -### インタープロセスセット -インタープロセスセットã®åå‰ã¯ã€å…ˆé ­ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) ãŒä»˜ãã¾ã™ã€‚ +## テーブルã¨ãƒ•ィールド -インタープロセスセットåã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) を除ã„ã¦255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +大カッコ内 (\[...]) ã«åå‰ã‚’入れるã“ã¨ã§ã€ãƒ†ãƒ¼ãƒ–ルを表ã—ã¾ã™ã€‚ フィールドを表ã™ã«ã¯ã€ãã®ãƒ•ィールドãŒå±žã™ã‚‹ãƒ†ãƒ¼ãƒ–ルをã¾ãšæŒ‡å®šã—ã€ãƒ•ィールドåã‚’ç¶šã‘ã¦æ›¸ãã¾ã™ã€‚ -### プロセスセット +テーブルåãŠã‚ˆã³ãƒ•ィールドåã¯ã€31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -セットã®åå‰ã‚’è¡¨ã™æ–‡å­—列を使用ã—ã¦ãƒ—ロセスセットを表ã—ã¾ã™ (<>記å·ã‚‚$記å·ã‚‚åå‰ã®å…ˆé ­ã«ã¤ãã¾ã›ã‚“) 。 プロセスセットåã¯ã€255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -### クライアントセット - -クライアントセットåã¯ã€å…ˆé ­ã«ãƒ‰ãƒ«è¨˜å· ($) を指定ã—ã¾ã™ã€‚ クライアントセットåã¯ã€ãƒ‰ãƒ«è¨˜å·ã‚’除ã„ã¦255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +- 1文字目ã¯ã€æ–‡å­—ã€ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_)ã€ã‚ã‚‹ã„ã¯ãƒ‰ãƒ«è¨˜å· ($) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€åŠè§’アルファベット文字・数字・スペース・アンダースコアを使用ãŒã§ãã¾ã™ã€‚ +- 予約語を使用ã—ãªã„ã§ãã ã•ã„。予約語ã«ã¯ã‚³ãƒžãƒ³ãƒ‰å (`Date`, `Time` ç­‰)ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ (`If`, `For` ç­‰)ã€ãã—ã¦å®šæ•° (`Euro`, `Black`, `Friday` ç­‰) ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- SQLã§å‡¦ç†ã™ã‚‹å ´åˆã«ã¯è¿½åŠ ã®ãƒ«ãƒ¼ãƒ«ãŒã‚りã¾ã™: 文字 _0123456789abcdefghijklmnopqrstuvwxyz ã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ã¾ãŸã€åå‰ã« SQLキーワード (コマンドã€å±žæ€§ ç­‰) ãŒå«ã¾ã‚Œã¦ã„ã¦ã¯ãªã‚Šã¾ã›ã‚“。 -**注:** セットã¯ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ä¸Šã§ä¿å®ˆã•れã¾ã™ã€‚ 効率や特殊目的ã®ãŸã‚ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ä¸Šã§ãƒ­ãƒ¼ã‚«ãƒ«ã«ã‚»ãƒƒãƒˆã‚’使用ã—ãŸã„å ´åˆãŒã‚りã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªå ´åˆã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚»ãƒƒãƒˆã‚’使用ã—ã¾ã™ã€‚ -例: +例: ```4d - // インタープロセスセット -USE SET("<>Deleted Records") -CREATE SET([Customers];"<>Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - // プロセスセット -USE SET("Deleted Records") -CREATE SET([Customers];"Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - // クライアントセット -USE SET("$Deleted Records") -CREATE SET([Customers];"$Customer Orders") -If(Records in set("$Selection"+String($i))>0) -``` - -## 命åセレクション - -スコープã«åŸºã¥ãã€2種類ã®å‘½åセレクションãŒå­˜åœ¨ã—ã¾ã™: +FORM SET INPUT([Clients];"Entry") +ADD RECORD([Letters]) +[Orders]Total:=Sum([Line]Amount) +QUERY([Clients];[Clients]Name="Smith") +[Letters]Text:=Capitalize text([Letters]Text) -- インタープロセス命åセレクション -- プロセス命åセレクション +``` -### インタï¼ãƒ—ロセス命åセレクション +> ç«¶åˆé˜²æ­¢ã®ãŸã‚ã€[クラス](#クラス) ã¨åŒã˜åå‰ã®ãƒ†ãƒ¼ãƒ–ルを作æˆã™ã‚‹ã®ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 -インタープロセス命åセレクションã®åå‰ã¯ã€å…ˆé ­ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) ãŒä»˜ãã¾ã™ã€‚ +## 変数 -インタープロセス命åセレクションåã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) を除ã„ã¦255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +変数åã¯ã€ã‚¹ã‚³ãƒ¼ãƒ—è¨˜å· ($ ãŠã‚ˆã³ <>) を除ã„ã¦æœ€å¤§31æ–‡å­—ä»¥å†…ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -### プロセス命åセレクション +- 変数åã® 1文字目ã¯ã€æ–‡å­—ã‚ã‚‹ã„ã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢(_) ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã¾ãŸã€[引数](parameters.md) ã‚„ [ローカル変数](variables.md#ローカル変数) ã®å ´åˆã¯ãƒ‰ãƒ«è¨˜å· ($) ã€[インタープロセス変数](variables.md#インタープロセス変数) ã®å ´åˆã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) ã‚’ 1文字目ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +- 変数ã®1æ–‡å­—ç›®ã«æ•°å­—を使ã†ã“ã¨ã¯è¨±å¯ã•れã¦ã„ã¾ã™ãŒã€æŽ¨å¥¨ã•れã¾ã›ã‚“。ã¾ãŸã€[`var` 宣言ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹](variables.md#var-キーワードã«ã‚ˆã‚‹å®£è¨€) ã§ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 +- ãã®å¾Œã®æ–‡å­—ã«ã¯ã€æ–‡å­—・数字・アンダースコア(_) ãŒä½¿ç”¨ã§ãã¾ã™ã€‚ +- 変数åã«ã‚¹ãƒšãƒ¼ã‚¹ã‚’使ã†ã“ã¨ã¯è¨±å¯ã•れã¦ã„ã¾ã™ãŒã€æŽ¨å¥¨ã•れã¾ã›ã‚“。ã¾ãŸã€[`var` 宣言ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹](variables.md#var-キーワードã«ã‚ˆã‚‹å®£è¨€) ã§ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 +- 予約語を使用ã—ãªã„ã§ãã ã•ã„。予約語ã«ã¯ã‚³ãƒžãƒ³ãƒ‰å (`Date`, `Time` ç­‰)ã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ (`If`, `For` ç­‰)ã€ãã—ã¦å®šæ•° (`Euro`, `Black`, `Friday` ç­‰) ãŒå«ã¾ã‚Œã¾ã™ã€‚ +- 変数åã«ãŠã„ã¦ã¯ã€å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã›ã‚“。 -プロセス命åセレクションã®åå‰ã‚’è¡¨ã™æ–‡å­—列å¼ã‚’使用ã—ã¦ãƒ—ロセスセットを表ã—ã¾ã™ (<>記å·ã‚‚$記å·ã‚‚åå‰ã®å…ˆé ­ã«ã¤ãã¾ã›ã‚“) 。 インタープロセスセットåã¯255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -例: +例: ```4d - // インタープロセス命åセレクション -USE NAMED SELECTION([Customers];"<>ByZipcode") - // プロセス命åセレクション -USE NAMED SELECTION([Customers];"<>ByZipcode") +For($vlRecord;1;100) // ローカル変数 +$vsMyString:="Hello there" // ローカル変数 +var $vName; $vJob : Text // ローカル変数 +If(bValidate=1) // プロセス変数 +<>vlProcessID:=Current process() // インタープロセス変数 ``` -## プロセス - -シングルユーザー版ãŠã‚ˆã³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ç‰ˆã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã«ãŠã„ã¦ã€2種類ã®ãƒ—ロセスãŒã‚りã¾ã™: - -- グロï¼ãƒãƒ«ãƒ—ロセス -- ロï¼ã‚«ãƒ«ãƒ—ロセス +## ãã®ä»–ã®è­˜åˆ¥å­ -### グロï¼ãƒãƒ«ãƒ—ロセス +4Dランゲージã«ãŠã„ã¦ã¯ã€è­˜åˆ¥å­ãŒæ–‡å­—列ã¨ã—ã¦æ‰±ã‚れるè¦ç´ ã‚‚多数存在ã—ã¾ã™: **フォーム**, **フォームオブジェクト**, **命åセレクション**, **プロセス**, **セット**, **メニューãƒãƒ¼**, 等。 -$記å·ä»¥å¤–ã‹ã‚‰å§‹ã¾ã‚‹æ–‡å­—列を使用ã—ã¦ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ—ロセスã®åå‰ã‚’表ã—ã¾ã™ã€‚ グローãƒãƒ«ãƒ—ロセスåã¯ã€255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ +ã“ã®ã‚ˆã†ãªæ–‡å­—列åã¯ã€(該当ã™ã‚‹å ´åˆã¯ã‚¹ã‚³ãƒ¼ãƒ—記å·ã‚’除ã„ã¦) 255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ -### ローカルプロセス +- 文字列åã«ã¯ã‚らゆる文字を使用ã§ãã¾ã™ã€‚ +- 文字列åã«ãŠã„ã¦ã¯ã€å¤§æ–‡å­—ãƒ»å°æ–‡å­—ã¯åŒºåˆ¥ã•れã¾ã›ã‚“。 -åå‰ã®å‰ã«ãƒ‰ãƒ«è¨˜å· ($) ã‚’ã¤ã‘ã¦ãƒ­ãƒ¼ã‚«ãƒ«ãƒ—ロセスを表ã—ã¾ã™ã€‚ ローカルプロセスåã¯ã€ãƒ‰ãƒ«è¨˜å· ($) を除ã„ã¦255æ–‡å­—ä»¥å†…ã§æŒ‡å®šã—ã¾ã™ã€‚ - -例: +例: ```4d - // グローãƒãƒ«ãƒ—ロセス "Add Customers" ã‚’é–‹å§‹ã—ã¾ã™ +DIALOG([Storage];"Note box"+String($vlStage)) +OBJECT SET FONT(*;"Binfo";"Times") +USE NAMED SELECTION([Customers];"Closed")// プロセス命åセレクション +USE NAMED SELECTION([Customers];"<>ByZipcode") // インタープロセス命åセレクション + // グローãƒãƒ«ãƒ—ロセス "Add Customers" ã®é–‹å§‹: $vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") - // ローカルプロセス "$Follow Mouse Moves" ã‚’é–‹å§‹ã—ã¾ã™ + // ローカルプロセス "$Follow Mouse Moves" ã®é–‹å§‹: $vlProcessID:=New process("P_MOUSE_SNIFFER";16*1024;"$Follow Mouse Moves") -``` - -## 命åè¦å‰‡ã®ã¾ã¨ã‚ - -次ã®è¡¨ã¯ã€4Dã®å‘½åè¦å‰‡ã«ã¤ã„ã¦ã¾ã¨ã‚ã¦ã„ã¾ã™ã€‚ - -| è­˜åˆ¥å­ | 最大 é•· | 例題 | -| ---------------- | -------- | -------------------------- | -| テーブル | 31 | [Invoices] | -| フィールド | 31 | [Employees]Last Name | -| インタープロセス変数/é…列 | <> + 31 | <>vlNextProcessID | -| プロセス変数/é…列 | 31 | vsCurrentName | -| ローカル変数/é…列 | $ + 31 | $vlLocalCounter | -| オブジェクト属性 | 255 | $o.myAttribute | -| フォーム | 31 | "My Custom Web Input" | -| フォームオブジェクト | 255 | "MyButton" | -| プロジェクトメソッド | 31 | M_ADD_CUSTOMERS | -| プラグインコマンド | 31 | PDF SET ROTATION | -| インタープロセスセット | <> + 255 | "<>Records to be Archived" | -| プロセスセット | 255 | "Current selected records" | -| クライアントセット | $ + 255 | "$Previous Subjects" | -| 命åセレクション | 255 | "Employees A to Z" | -| インタï¼ãƒ—ロセス命åセレクション | <> + 255 | "<>Employees Z to A" | -| ローカルプロセス | $ + 255 | "$Follow Events" | -| グロï¼ãƒãƒ«ãƒ—ロセス | 255 | "*P_INVOICES_MODULE*" | -| セマフォー | 255 | "mysemaphore" | +CREATE SET([Customers];"Customer Orders")// プロセスセット +USE SET("<>Deleted Records") // インタープロセスセット +If(Records in set("$Selection"+String($i))>0) // クライアントセット +``` -**注:** éžãƒ­ãƒ¼ãƒžæ–‡å­— (日本語ãªã©) ãŒè­˜åˆ¥å­ã«ä½¿ç”¨ã•れãŸå ´åˆã€ãã®æœ€å¤§é•·ã¯çŸ­ã‹ããªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ - -## åå‰ãŒé‡è¤‡ã™ã‚‹å ´åˆ - -データベース内ã®è¦ç´ ã«å¯¾ã—ã¦ã€ãžã‚Œãžã‚Œé‡è¤‡ã—ãªã„åå‰ã‚’使用ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 特定ã®è¦ç´ ãŒåˆ¥ã‚¿ã‚¤ãƒ—ã®è¦ç´ ã¨åŒã˜åå‰ã‚’æŒã¤å ´åˆ (ãŸã¨ãˆã°ãƒ•ィールド㌠Person ã¨ã„ã†åå‰ã§ã€å¤‰æ•°ã‚‚ Person ã¨ã„ã†åå‰ã®å ´åˆ)ã€4Dã¯å„ªå…ˆé †ä½ã‚·ã‚¹ãƒ†ãƒ ã‚’使用ã—ã¾ã™ã€‚ - -4Dã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã§ä½¿ç”¨ã•れるåå‰ã‚’次ã®é †ä½ã§è­˜åˆ¥ã—ã¾ã™: - -1. フィールド -2. コマンド -3. メソッド -4. プラグインコマンド -5. 定義済ã¿å®šæ•° -6. 変数 - -ãŸã¨ãˆã°ã€4Dã«ã¯ `Date` ã¨ã„ã†ãƒ“ルトインコマンドãŒã‚りã¾ã™ã€‚ メソッド㫠*Date* ã¨ã„ã†åå‰ã‚’付ã‘ã¦ã‚‚ã€4Dã¯ãƒ“ルトインコマンド㮠`Date` ã¨ã—ã¦èªè­˜ã—ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã—ã¦ã¯èªè­˜ã—ã¾ã›ã‚“。 ã¤ã¾ã‚Šã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—ã¯ã§ããªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ãƒ•ィールドを "Date" ã¨å‘½åã—ãŸå ´åˆã«ã¯ã€4D㯠`Date` コマンドã®ä»£ã‚りã«ãƒ•ィールドã¨ã—ã¦ã®ä½¿ç”¨ã‚’試ã¿ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/interpreted.md b/website/translated_docs/ja/Concepts/interpreted.md index 4e6e1ef57a41c5..cbd20190958329 100644 --- a/website/translated_docs/ja/Concepts/interpreted.md +++ b/website/translated_docs/ja/Concepts/interpreted.md @@ -6,24 +6,23 @@ title: インタープリターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ 4D アプリケーション㯠**インタープリター** ã¾ãŸã¯ **コンパイル済ã¿** モードã§å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: - インタープリターモードã«ãŠã„ã¦ã€ã‚³ãƒ¼ãƒ‰ã¯å®Ÿè¡Œæ™‚ã«èª­ã¿è¾¼ã¾ã‚Œã¦ãƒžã‚·ãƒ³èªžã«ç¿»è¨³ã•れã¾ã™ã€‚ コードã¯ã„ã¤ã§ã‚‚追加・変更ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¢ãƒ—リケーションã¯è‡ªå‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ -- コンパイル済ã¿ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã¯ã€ã‚³ãƒ³ãƒ‘イル時ã«ã™ã¹ã¦ã®ã‚³ãƒ¼ãƒ‰ãŒä¸€æ‹¬ã§èª­ã¿è¾¼ã¾ã‚Œã¦ç¿»è¨³ã•れã¾ã™ã€‚ コンパイル後ã®ã‚¢ãƒ—リケーションã«ã¯ã‚¢ã‚»ãƒ³ãƒ–ãƒªãƒ¬ãƒ™ãƒ«ã®æŒ‡ç¤ºã®ã¿ãŒæ®‹ã•れã€ã‚³ãƒ¼ãƒ‰ç·¨é›†ã¯ã§ãã¾ã›ã‚“。 +- コンパイル済ã¿ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã¯ã€ã‚³ãƒ³ãƒ‘イル時ã«ã™ã¹ã¦ã®ã‚³ãƒ¼ãƒ‰ãŒä¸€æ‹¬ã§èª­ã¿è¾¼ã¾ã‚Œã¦ç¿»è¨³ã•れã¾ã™ã€‚ コンパイル後ã®ã‚¢ãƒ—リケーションã«ã¯ã‚¢ã‚»ãƒ³ãƒ–ãƒªãƒ¬ãƒ™ãƒ«ã®æŒ‡ç¤ºã®ã¿ãŒæ®‹ã•れã€ã‚³ãƒ¼ãƒ‰ç·¨é›†ã¯ã§ãã¾ã›ã‚“。 コンパイルã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ¡ãƒªãƒƒãƒˆãŒã‚りã¾ã™: -- **速度**: データベースã®å®Ÿè¡Œé€Ÿåº¦ã‚’3å€ã‹ã‚‰1000å€é€Ÿãã—ã¾ã™ã€‚ -- **コードãƒã‚§ãƒƒã‚¯**: ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚³ãƒ¼ãƒ‰ã®æ•´åˆæ€§ã‚’ãƒã‚§ãƒƒã‚¯ã—〠論ç†çš„矛盾や構文的矛盾を検出ã—ã¾ã™ã€‚ -- **ä¿è­·**: データベースをコンパイルã™ã‚‹ã¨ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターコードを削除ã§ãã¾ã™ã€‚ コンパイルã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€æ•…æ„çš„ã«ã‚‚䏿³¨æ„ã‹ã‚‰ã‚‚ストラクãƒãƒ£ãƒ¼ã‚„メソッドã®è¡¨ç¤ºãƒ»ä¿®æ­£ãŒã§ããªã„ã“ã¨ä»¥å¤–ã¯ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¨åŒã˜ã«å‹•作ã—ã¾ã™ã€‚ -- **ダブルクリックã§èµ·å‹•ã™ã‚‹ã‚¢ãƒ—リケーション**: コンパイル後ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€ç‹¬è‡ªã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’æŒã¤ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーション (.EXEファイル) ã«ä½œã‚Šå¤‰ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -- **プリエンプティブモードã§ã®å®Ÿè¡Œ**: プリエンプティブプロセスã¨ã—ã¦å®Ÿè¡Œã§ãã‚‹ã®ã¯ã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚³ãƒ¼ãƒ‰ã«é™ã‚‰ã‚Œã¾ã™ã€‚ +- **速度**: アプリケーションã®å®Ÿè¡Œé€Ÿåº¦ã‚’3å€ã‹ã‚‰1000å€é€Ÿãã—ã¾ã™ã€‚ +- **コードãƒã‚§ãƒƒã‚¯**: ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚³ãƒ¼ãƒ‰ã®æ•´åˆæ€§ã‚’ãƒã‚§ãƒƒã‚¯ã—〠論ç†çš„矛盾や構文的矛盾を検出ã—ã¾ã™ã€‚ +- **ä¿è­·**: アプリケーションをコンパイルã™ã‚‹ã¨ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターコードを削除ã§ãã¾ã™ã€‚ コンパイルã•れãŸã‚¢ãƒ—リケーションã¯ã€æ•…æ„çš„ã«ã‚‚䏿³¨æ„ã‹ã‚‰ã‚‚ストラクãƒãƒ£ãƒ¼ã‚„メソッドã®è¡¨ç¤ºãƒ»ä¿®æ­£ãŒã§ããªã„ã“ã¨ä»¥å¤–ã¯ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ã‚¢ãƒ—リケーションã¨åŒã˜ã«å‹•作ã—ã¾ã™ã€‚ +- **ダブルクリックã§èµ·å‹•ã™ã‚‹ã‚¢ãƒ—リケーション**: コンパイル後ã®ã‚¢ãƒ—リケーションã¯ã€ç‹¬è‡ªã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’æŒã¤ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーション (.EXEファイル) ã«ä½œã‚Šå¤‰ãˆã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +- **プリエンプティブモードã§ã®å®Ÿè¡Œ**: プリエンプティブプロセスã¨ã—ã¦å®Ÿè¡Œã§ãã‚‹ã®ã¯ã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚³ãƒ¼ãƒ‰ã«é™ã‚‰ã‚Œã¾ã™ã€‚ ## インタープリターコードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ¼ãƒ‰ã®é•ã„ - アプリケーションã®å‹•作ã¯åŒã˜ã§ã‚ã£ã¦ã‚‚ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ã«ã¯ã„ãã¤ã‹ã®ç›¸é•点ãŒã‚りã€ã‚³ãƒ³ãƒ‘イルã•れるコードを書ãã«ã‚ãŸã£ã¦ã¯ã“れらをæ„è­˜ã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ 基本的ã«ã€4D ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¯ã‚³ãƒ³ãƒ‘イラーより柔軟ã§ã™ã€‚ | コンパイル済ã¿ã‚³ãƒ¼ãƒ‰ | インタープリターコード | | ---------------------------------------------------------------------------------------- | -------------------------------- | | 変数åã¨ãƒ¡ã‚½ãƒƒãƒ‰åãŒè¢«ã£ã¦ã¯ã„ã‘ã¾ã›ã‚“。 | エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ | -| ã‚³ãƒ³ãƒ‘ã‚¤ãƒ©æŒ‡ç¤ºå­ (例: `C_LONGINT`) ã«ã‚ˆã£ã¦ã€ã¾ãŸã¯ã‚³ãƒ³ãƒ‘イル時ã«ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦ã€ã™ã¹ã¦ã®å¤‰æ•°ã¯åž‹æŒ‡å®šã•れãªã‘れã°ãªã‚Šã¾ã›ã‚“。 | 変数ã®åž‹ã¯å®Ÿè¡Œä¸­ã«æ±ºå®šã—ã¦ã„ãã“ã¨ãŒã§ãã¾ã™ (推奨ã•れã¾ã›ã‚“) | +| ã‚³ãƒ³ãƒ‘ã‚¤ãƒ©ãƒ¼æŒ‡ç¤ºå­ (例: `C_LONGINT`) ã«ã‚ˆã£ã¦ã€ã¾ãŸã¯ã‚³ãƒ³ãƒ‘イル時ã«ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦ã€ã™ã¹ã¦ã®å¤‰æ•°ã¯åž‹æŒ‡å®šã•れãªã‘れã°ãªã‚Šã¾ã›ã‚“。 | 変数ã®åž‹ã¯å®Ÿè¡Œä¸­ã«æ±ºå®šã—ã¦ã„ãã“ã¨ãŒã§ãã¾ã™ (推奨ã•れã¾ã›ã‚“) | | 変数やé…列ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 | 変数やé…列ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯å¤‰æ›´å¯èƒ½ã§ã™ (推奨ã•れã¾ã›ã‚“) | | 1次元é…列を2次元é…列ã«ã€ã¾ãŸ2次元é…列を1次元é…列ã«å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 | å¯èƒ½ã§ã™ã€‚ | | コンパイラーã«ã‚ˆã‚Šå¤‰æ•°ã®ã‚¿ã‚¤ãƒ—定義ã¯ãŠã“ãªã‚れã¾ã™ãŒã€ãƒ•ォーム上ã®å¤‰æ•°ã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒæ˜Žç¢ºã§ãªã„å ´åˆã¯ã€ã‚³ãƒ³ãƒ‘イラー指示å­ã‚’使用ã—ã¦å¤‰æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を指定ã™ã‚‹ã¹ãã§ã™ã€‚ | | @@ -31,12 +30,11 @@ title: インタープリターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ | メソッド㮠"プリエンプティブプロセスã§å®Ÿè¡Œå¯èƒ½" プロパティã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¦ã„ãŸå ´åˆã€ã‚³ãƒ¼ãƒ‰ã¯ä»–ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚¢ãƒ³ã‚»ãƒ¼ãƒ•ãªã‚³ãƒžãƒ³ãƒ‰ã‚„メソッドを呼ã³å‡ºã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 | プリエンプティブプロセスプロパティã¯ç„¡è¦–ã•れã¾ã™ã€‚ | | 特定ã®ãƒ«ãƒ¼ãƒ—ã®å ´åˆã€å‰²ã‚Šè¾¼ã¿ã‚’å¯èƒ½ã«ã™ã‚‹ã«ã¯ `IDLE` コマンドãŒå¿…è¦ã§ã™ã€‚ | ã„ã¤ã§ã‚‚割り込ã¿å¯èƒ½ã§ã™ã€‚ | - ## インタープリターã§ã‚³ãƒ³ãƒ‘イラー指示å­ã‚’使用ã™ã‚‹å ´åˆ -コンパイルã—ãªã„データベースã«ã¯ã€ã‚³ãƒ³ãƒ‘イラー命令ã¯å¿…é ˆã§ã¯ã‚りã¾ã›ã‚“。 インタープリターã¯ã€å„ステートメントã«ãŠã‘る変数ã®ä½¿ã„æ–¹ã«æº–ã˜ã¦è‡ªå‹•çš„ã«å¤‰æ•°ã®åž‹ã‚’設定ã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®å¤‰æ•°ã®åž‹ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +コンパイルã—ãªã„アプリケーションã«ã¯ã€ã‚³ãƒ³ãƒ‘イラー命令ã¯å¿…é ˆã§ã¯ã‚りã¾ã›ã‚“。 インタープリターã¯ã€å„ステートメントã«ãŠã‘る変数ã®ä½¿ã„æ–¹ã«æº–ã˜ã¦è‡ªå‹•çš„ã«å¤‰æ•°ã®åž‹ã‚’設定ã—ã€ã‚¢ãƒ—リケーションプロジェクト内ã®å¤‰æ•°ã®åž‹ã‚’変ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -インタープリターãŒã“ã®ã‚ˆã†ã«æŸ”軟ã«å¯¾å¿œã™ã‚‹ã®ã§ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å‹•作ãŒç•°ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ +インタープリターãŒã“ã®ã‚ˆã†ã«æŸ”軟ã«å¯¾å¿œã™ã‚‹ã®ã§ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚¢ãƒ—リケーションã®å‹•作ãŒç•°ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚ã‚‹ã¨ã“ã‚ã§ã¯æ¬¡ã®ã‚ˆã†ã«è¨˜è¿°ã—ã¦: @@ -44,8 +42,7 @@ title: インタープリターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ C_LONGINT(MyInt) ``` -データベースã®ä»–ã®å ´æ‰€ã§ã¯ã€ä¸‹è¨˜ã®ã‚ˆã†ã«è¨˜è¿°ã—ãŸå ´åˆ: - +プロジェクトã®ä»–ã®å ´æ‰€ã§ã¯ã€ä¸‹è¨˜ã®ã‚ˆã†ã«è¨˜è¿°ã—ãŸå ´åˆ: ```4d MyInt:=3.1416 ``` @@ -54,7 +51,8 @@ MyInt:=3.1416 4D ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¯ã€ã‚³ãƒ³ãƒ‘イラー指示å­ã‚’使用ã—ã¦å¤‰æ•°ã®åž‹ã‚’定義ã—ã¾ã™ã€‚ コード内ã§ã‚³ãƒ³ãƒ‘イラー指示å­ãŒæ¤œå‡ºã•れるã¨ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¯ãれã«å¾“ã£ã¦å¤‰æ•°ã®åž‹ã‚’定義ã—ã¾ã™ã€‚ ãれ以é™ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§é–“é•ã£ãŸå€¤ã‚’代入ã—よã†ã¨ã™ã‚‹ã¨ (ãŸã¨ãˆã°ã€æ•°å€¤å¤‰æ•°ã«æ–‡å­—を割り当ã¦ã‚‹ãªã©)ã€ä»£å…¥ã¯ãŠã“ãªã‚れãšã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ -コンパイラーã«ã¨ã£ã¦ã¯ã€ã“ã®2ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ã©ã¡ã‚‰ãŒå…ˆã«è¡¨ç¤ºã•れã¦ã‚‚å•題ã§ã¯ã‚りã¾ã›ã‚“。ã¯ã˜ã‚ã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“を調ã¹ã¦ã‚³ãƒ³ãƒ‘イラー指示å­ã‚’探ã™ã‹ã‚‰ã§ã™ã€‚ ã—ã‹ã—ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¯ç³»çµ±ç«‹ã¦ã¦å‡¦ç†ã™ã‚‹ã‚ã‘ã§ã¯ãªã〠実行ã•れる順ã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’解釈ã—ã¾ã™ã€‚ ユーザーãŒä½•ã‚’ãŠã“ãªã†ã‹ã«ã‚ˆã£ã¦ã€ã“ã®é †åºã¯å½“ç„¶ç•°ãªã‚Šã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€å¸¸ã«ã‚³ãƒ³ãƒ‘イラー指示å­ã«ã‚ˆã£ã¦åž‹å®šç¾©ã—ã¦ã‹ã‚‰å¤‰æ•°ã‚’使用ã™ã‚‹ã‚ˆã†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’計画ã™ã‚‹ã“ã¨ãŒè‚心ã§ã™ã€‚ +コンパイラーã«ã¨ã£ã¦ã¯ã€ã“ã®2ã¤ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã®ã©ã¡ã‚‰ãŒå…ˆã«è¡¨ç¤ºã•れã¦ã‚‚å•題ã§ã¯ã‚りã¾ã›ã‚“。ã¯ã˜ã‚ã«ãƒ—ロジェクト全体を調ã¹ã¦ã‚³ãƒ³ãƒ‘イラー指示å­ã‚’探ã™ã‹ã‚‰ã§ã™ã€‚ ã—ã‹ã—ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã¯ç³»çµ±ç«‹ã¦ã¦å‡¦ç†ã™ã‚‹ã‚ã‘ã§ã¯ãªã〠実行ã•れる順ã«ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’解釈ã—ã¾ã™ã€‚ ユーザーãŒä½•ã‚’ãŠã“ãªã†ã‹ã«ã‚ˆã£ã¦ã€ã“ã®é †åºã¯å½“ç„¶ç•°ãªã‚Šã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€å¸¸ã«ã‚³ãƒ³ãƒ‘イラー指示å­ã«ã‚ˆã£ã¦åž‹å®šç¾©ã—ã¦ã‹ã‚‰å¤‰æ•°ã‚’使用ã™ã‚‹ã‚ˆã†ãƒ—ロジェクトを計画ã™ã‚‹ã“ã¨ãŒè‚心ã§ã™ã€‚ + ## ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®ä½¿ç”¨ã§åž‹ã®çŸ›ç›¾ã‚’é¿ã‘ã‚‹ @@ -90,7 +88,6 @@ $0:=Length($result) ``` ã“ã®é–¢æ•°ã¯æ¬¡ã®ã‚ˆã†ã«ä½¿ãˆã¾ã™: - ```4d $var1:="my text" $var2:=5.3 @@ -100,4 +97,4 @@ $var4:=True $vLength:=Calc_Length(->$var1)+Calc_Length(->$var2)+Calc_Length (->$var3)+Calc_Length(->$var4) ALERT("é•·ã•ã®åˆè¨ˆ: "+String($vLength)) -``` \ No newline at end of file +``` diff --git a/website/translated_docs/ja/Concepts/methods.md b/website/translated_docs/ja/Concepts/methods.md index bdd2439d494468..c2c108c8367da4 100644 --- a/website/translated_docs/ja/Concepts/methods.md +++ b/website/translated_docs/ja/Concepts/methods.md @@ -4,35 +4,41 @@ title: メソッド --- -メソッドã¨ã¯ã€1ã¤ä»¥ä¸Šã®å‹•作を実行ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã®ã“ã¨ã§ã™ã€‚ 4D ランゲージã«ãŠã„ã¦ã€2種類ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå­˜åœ¨ã—ã¾ã™: +メソッドã¨ã¯ã€1ã¤ä»¥ä¸Šã®å‹•作を実行ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã®ã“ã¨ã§ã™ã€‚ メソッドã¯ã€ä¸€ã¤ä»¥ä¸Šã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§æ§‹æˆã•れã¾ã™ã€‚ステートメントã¨ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®1行ã®ã“ã¨ã§1ã¤ã®å‘½ä»¤ã‚’実行ã—ã¾ã™ã€‚ ステートメントã¯å˜ç´”ãªå ´åˆã‚‚ã‚れã°ã€è¤‡é›‘ãªå ´åˆã‚‚ã‚りã¾ã™ã€‚ å„ステートメントã¯å¸¸ã« 1行ã§ã™ãŒæœ€å¤§ 32,000文字ã¾ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- **ビルトインメソッド:** 4D ã¾ãŸã¯ã‚µãƒ¼ãƒ‰ãƒ‘ーティーã«ã‚ˆã£ã¦æä¾›ã•れるもã®ã§ã€ã“れらをコード内ã§åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ビルトインメソッドã«ã¯æ¬¡ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¾ã™: - - - 4D API ã®ã‚³ãƒžãƒ³ãƒ‰ã‚„関数 (`ALERT` ã‚„ `Current date` ãªã©) - - ãƒã‚¤ãƒ†ã‚£ãƒ–オブジェクトやコレクションã«ä»˜å±žã—ã¦ã„るメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ (`collection.orderBy()` ã‚„ `entity.save()` ãªã©) - - 4D やサードパーティーã«ã‚ˆã£ã¦æä¾›ã•れるプラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚³ãƒžãƒ³ãƒ‰ (`SVG_New_arc` ãªã©) - - ビルトインメソッドã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€* 4D ランゲージリファレンス* マニュアルやã€ãƒ—ラグイン・コンãƒãƒ¼ãƒãƒ³ãƒˆã®å°‚用マニュアルをå‚ç…§ãã ã•ã„。 +ãƒ¡ã‚½ãƒƒãƒ‰ã¯æœ€å¤§ 2GBã®ãƒ†ã‚­ã‚¹ãƒˆã¾ãŸã¯ã€32000行ã¾ã§è¨˜è¿°ã§ãã¾ã™ã€‚ -- **プロジェクトメソッド:** ä»»æ„ã®å‹•作ã®å®Ÿè¡Œã™ã‚‹ãŸã‚ã«ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ー自身ãŒä½œæˆã™ã‚‹ã‚³ãƒ¼ãƒ‰ã®ã“ã¨ã§ã™ã€‚ 作æˆã•れãŸãƒ—ロジェクトメソッドã¯ã€ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¸­ã§ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ä¸€éƒ¨ã¨ãªã‚Šã¾ã™ã€‚ プロジェクトメソッドã¯ã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§æ§‹æˆã•れã¾ã™ã€‚ステートメントã¨ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã® 1行ã®ã“ã¨ã§ 1ã¤ã®å‘½ä»¤ã‚’実行ã—ã¾ã™ã€‚ ステートメントã¯å˜ç´”ãªå ´åˆã‚‚ã‚れã°ã€è¤‡é›‘ãªå ´åˆã‚‚ã‚りã¾ã™ã€‚ å„ステートメントã¯å¸¸ã« 1行ã§ã™ãŒæœ€å¤§ 32,000文字ã¾ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã¯æœ€å¤§ 2GBã®ãƒ†ã‚­ã‚¹ãƒˆã¾ãŸã¯ã€32000行ã¾ã§è¨˜è¿°ã§ãã¾ã™ã€‚ +## メソッドタイプ + +4D ランゲージã«ãŠã„ã¦ã€æ•°ç¨®é¡žã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå­˜åœ¨ã—ã¾ã™ã€‚ ãã®å‘¼ã³å‡ºã—æ–¹ã«ã‚ˆã£ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯åŒºåˆ¥ã•れã¾ã™: + +| タイプ | 自動呼ã³å‡ºã—ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ | 引数ã®å—ã‘å–り | 説明 | +| ------------------------ | --------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | +| **プロジェクトメソッド** | 呼ã³å‡ºã—ã«å¿œã˜ã¦ ([プロジェクトメソッドã®å‘¼ã³å‡ºã—](#calling-project-methods) å‚ç…§) | â—¯ | ä»»æ„ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ãŸã‚ã®ã‚³ãƒ¼ãƒ‰ã§ã™ã€‚ 作æˆã•れãŸãƒ—ロジェクトメソッドã¯ã€ãã®ãƒ—ロジェクトã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ä¸€éƒ¨ã¨ãªã‚Šã¾ã™ã€‚ | +| **オブジェクト (ウィジェット) メソッド** | メソッドãŒè¨­å®šã•れãŸãƒ•ォームオブジェクトã«é–¢é€£ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | × | フォームオブジェクト (ウィジェットã¨ã‚‚呼ã³ã¾ã™) ã®ãƒ—ロパティã§ã™ã€‚ | +| **フォームメソッド** | メソッドãŒè¨­å®šã•れãŸãƒ•ォームã«é–¢é€£ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | × | フォームã®ãƒ—ロパティã§ã™ã€‚ フォームメソッドを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã¨ã‚ªãƒ–ジェクトを管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“れら目的ã«ã¯ã€ã‚ªãƒ–ジェクトメソッドを使用ã™ã‚‹æ–¹ãŒé€šå¸¸ã¯ç°¡å˜ã§ã‚りã€ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚ | +| **トリガー** (別å *テーブルメソッド*) | テーブルã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ“作 (追加・削除・修正) ã®åº¦ã« | × | テーブルã®ãƒ—ロパティã§ã™ã€‚ トリガーã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«å¯¾ã—ã¦ã€Œä¸æ­£ãªã€æ“作ãŒãŠã“ãªã‚れるã“ã¨ã‚’防ãŽã¾ã™ã€‚ | +| **データベースメソッド** | 作業セッションã®ã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | â—‹ (既定) | 4D ã«ã¯ 16ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚りã¾ã™ã€‚ 詳細ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®é …ã‚’å‚ç…§ãã ã•ã„。 | + + +> 4D ランゲージ㯠**クラス関数** もサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚クラス関数ã¯ã€ã‚ªãƒ–ジェクトインスタンスã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦å‘¼ã³å‡ºã•れã¾ã™ã€‚ クラス関数ã«ã¯ãƒ“ルトインã®ã‚‚ã®ã¨ (*例: * `collection.orderBy()` ã‚„ `entity.save()`)ã€[開発者ã«ã‚ˆã£ã¦ä½œæˆã•れるもã®](classes.md#function)ãŒã‚りã¾ã™ã€‚ -**注:** 4D ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¤ãƒ™ãƒ³ãƒˆã‚„フォームイベントã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å®Ÿè¡Œã•れるメソッドもå„種æä¾›ã•れã¦ã„ã¾ã™ã€‚ [特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰](#特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰) å‚照。 ## プロジェクトメソッドã®å‘¼ã³å‡ºã— ãã®å®Ÿè¡Œæ–¹æ³•や使用方法ã«å¿œã˜ã¦ã€ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®ã‚ˆã†ãªå½¹å‰²ã‚’æžœãŸã—ã¾ã™: -- サブルーãƒãƒ³ã¨é–¢æ•° -- オブジェクトã®ä»˜å±žãƒ¡ã‚½ãƒƒãƒ‰ +- サブルーãƒãƒ³ +- オブジェクトフォーミュラ - メニューメソッド - プロセスメソッド - イベントã¾ãŸã¯ã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ -### サブルーãƒãƒ³ã¨é–¢æ•° +### サブルーãƒãƒ³ サブルーãƒãƒ³ã¯ã€å‡¦ç†ã®ä¸‹è«‹ã‘çš„ãªãƒ—ロジェクトメソッドã§ã™ã€‚ ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã°ã‚Œã¦ã€è¦æ±‚ã•れãŸå‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ 関数ã¯ã€å‘¼ã³å‡ºã—å…ƒã®ãƒ¡ã‚½ãƒƒãƒ‰ã«å€¤ã‚’è¿”ã™ã‚µãƒ–ルーãƒãƒ³ã®ã“ã¨ã§ã™ã€‚ -プロジェクトメソッドを作æˆã™ã‚‹ã¨ã€ãれã¯åŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ä¸€éƒ¨ã¨ãªã‚Šã¾ã™ã€‚ プロジェクトメソッドã¯ã€4Dã®ãƒ“ルトインコマンドã¨åŒæ§˜ã«ã€ã»ã‹ã®ãƒ—ロジェクトメソッドや定義済ã¿ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ä½¿ç”¨ã•れるプロジェクトメソッドをサブルーãƒãƒ³ã¨å‘¼ã³ã¾ã™ã€‚ +プロジェクトメソッドを作æˆã™ã‚‹ã¨ã€ãれã¯åŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ä¸€éƒ¨ã¨ãªã‚Šã¾ã™ã€‚ プロジェクトメソッドã¯ã€4Dã®ãƒ“ルトインコマンドã¨åŒæ§˜ã«ã€ã»ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ (プロジェクトメソッドやオブジェクトメソッド) ã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ä½¿ç”¨ã•れるプロジェクトメソッドをサブルーãƒãƒ³ã¨å‘¼ã³ã¾ã™ã€‚ サブルーãƒãƒ³ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªç›®çš„ã§ä½¿ã„ã¾ã™: @@ -41,7 +47,7 @@ title: メソッド - メソッド改変ã®å®¹æ˜“化 - コードã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«åŒ– -ãŸã¨ãˆã°ã€é¡§å®¢ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ データベースをカスタマイズã—ã¦ã„ãã†ã¡ã«ã€é¡§å®¢ã‚’検索ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’修正ã™ã‚‹ã¨ã„ã†ä¸€é€£ã®ä½œæ¥­ã‚’繰り返ã—ãŠã“ãªã£ã¦ã„ã‚‹ã“ã¨ã«æ°—ã¥ã„ãŸã¨ã—ã¾ã™ã€‚ ãã®ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™: +ãŸã¨ãˆã°ã€é¡§å®¢ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ プロジェクトをカスタマイズã—ã¦ã„ãã†ã¡ã«ã€é¡§å®¢ã‚’検索ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’修正ã™ã‚‹ã¨ã„ã†ä¸€é€£ã®ä½œæ¥­ã‚’繰り返ã—ãŠã“ãªã£ã¦ã„ã‚‹ã“ã¨ã«æ°—ã¥ã„ãŸã¨ã—ã¾ã™ã€‚ ãã®ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™: ```4d // 顧客を検索ã—ã¾ã™ @@ -52,30 +58,31 @@ title: メソッド MODIFY RECORD([Customers]) ``` -サブルーãƒãƒ³ã‚’使用ã—ãªã‘れã°ã€é¡§å®¢ãƒ¬ã‚³ãƒ¼ãƒ‰ä¿®æ­£ã®ãŸã³ã«ã‚³ãƒ¼ãƒ‰ã‚’作æˆã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 データベース㮠10箇所ã§åŒã˜å‡¦ç†ãŒå¿…è¦ã§ã‚れã°ã€åŒã˜ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’ 10回も書ã‹ã­ã°ãªã‚Šã¾ã›ã‚“。 サブルーãƒãƒ³ã‚’使用ã™ã‚Œã° 1回コーディングã™ã‚‹ã ã‘ã§ã™ã¿ã¾ã™ã€‚ ã“れãŒã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®é‡è¤‡ã‚’減らã™ã¨ã„ã†ã‚µãƒ–ルーãƒãƒ³ã®ç¬¬ä¸€ã®åˆ©ç‚¹ã§ã™ã€‚ +サブルーãƒãƒ³ã‚’使用ã—ãªã‘れã°ã€é¡§å®¢ãƒ¬ã‚³ãƒ¼ãƒ‰ä¿®æ­£ã®ãŸã³ã«ã‚³ãƒ¼ãƒ‰ã‚’作æˆã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 プロジェクト㮠10箇所ã§åŒã˜å‡¦ç†ãŒå¿…è¦ã§ã‚れã°ã€åŒã˜ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’ 10回も書ã‹ã­ã°ãªã‚Šã¾ã›ã‚“。 サブルーãƒãƒ³ã‚’使用ã™ã‚Œã° 1回コーディングã™ã‚‹ã ã‘ã§ã™ã¿ã¾ã™ã€‚ ã“れãŒã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®é‡è¤‡ã‚’減らã™ã¨ã„ã†ã‚µãƒ–ルーãƒãƒ³ã®ç¬¬ä¸€ã®åˆ©ç‚¹ã§ã™ã€‚ -å…ˆã»ã©èª¬æ˜Žã—ãŸã‚³ãƒ¼ãƒ‰ãŒ `MODIFY CUSTOMER` ã¨å‘¼ã°ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚ã‚‹ã¨ã™ã‚Œã°ã€ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãã®ãƒ¡ã‚½ãƒƒãƒ‰åを使ã†ã“ã¨ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€é¡§å®¢ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’修正ã—ã€ãれã‹ã‚‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’プリントã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’書ãã“ã¨ãŒã§ãã¾ã™: +å…ˆã»ã©èª¬æ˜Žã—ãŸã‚³ãƒ¼ãƒ‰ãŒ `MODIFY_CUSTOMER` ã¨å‘¼ã°ã‚Œã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚ã‚‹ã¨ã™ã‚Œã°ã€ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãã®ãƒ¡ã‚½ãƒƒãƒ‰åを使ã†ã“ã¨ã§å®Ÿè¡Œã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€é¡§å®¢ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’修正ã—ã€ãれã‹ã‚‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’プリントã™ã‚‹ãŸã‚ã«ã€ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’書ãã“ã¨ãŒã§ãã¾ã™: ```4d - MODIFY CUSTOMER + MODIFY_CUSTOMER PRINT SELECTION([Customers]) ``` -ã“ã®æ©Ÿèƒ½ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’劇的ã«ã«ç°¡ç´ åŒ–ã—ã¾ã™ã€‚ ã•ãã»ã©ã®ä¾‹ã§è¨€ãˆã°ã€`MODIFY CUSTOMER` メソッドãŒã©ã®ã‚ˆã†ã«å‹•作ã™ã‚‹ã‹ã¯çŸ¥ã‚‹å¿…è¦ãŒãªãã€ä½•ã‚’ãŠã“ãªã†ã‹ã ã‘知ã£ã¦ã„れã°ã‚ˆã„ã®ã§ã™ã€‚ ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’サブルーãƒãƒ³åŒ–ã™ã‚‹ã“ã¨ã®2番目ã®ç†ç”±ã€å½¹å‰²ã®æ˜Žç¢ºåŒ–ã§ã™ã€‚ ã“ã®ã‚ˆã†ã«ã€ä½œæˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ 4Dランゲージを拡張ã—ã¾ã™ã€‚ +ã“ã®æ©Ÿèƒ½ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’劇的ã«ã«ç°¡ç´ åŒ–ã—ã¾ã™ã€‚ ã•ãã»ã©ã®ä¾‹ã§è¨€ãˆã°ã€`MODIFY_CUSTOMER` メソッドãŒã©ã®ã‚ˆã†ã«å‹•作ã™ã‚‹ã‹ã¯çŸ¥ã‚‹å¿…è¦ãŒãªãã€ä½•ã‚’ãŠã“ãªã†ã‹ã ã‘知ã£ã¦ã„れã°ã‚ˆã„ã®ã§ã™ã€‚ ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’サブルーãƒãƒ³åŒ–ã™ã‚‹ã“ã¨ã®2番目ã®ç†ç”±ã€å½¹å‰²ã®æ˜Žç¢ºåŒ–ã§ã™ã€‚ ã“ã®ã‚ˆã†ã«ã€ä½œæˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ 4Dランゲージを拡張ã—ã¾ã™ã€‚ -ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ä¾‹ã§é¡§å®¢ã®æ¤œç´¢æ–¹æ³•を変ãˆã‚‹å ´åˆã€10箇所ã§ã¯ãªãã€ãŸã£ãŸ1ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’変更ã™ã‚‹ã ã‘ã§ã™ã¿ã¾ã™ã€‚ ã“れãŒã‚µãƒ–ルーãƒãƒ³ã‚’使ã†ã‚‚ã†ä¸€ã¤ã®ç†ç”±ã€æ”¹å¤‰ã®å®¹æ˜“化ã§ã™ã€‚ +ã“ã®ãƒ—ロジェクトã®ä¾‹ã§é¡§å®¢ã®æ¤œç´¢æ–¹æ³•を変ãˆã‚‹å ´åˆã€10箇所ã§ã¯ãªãã€ãŸã£ãŸ1ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’変更ã™ã‚‹ã ã‘ã§ã™ã¿ã¾ã™ã€‚ ã“れãŒã‚µãƒ–ルーãƒãƒ³ã‚’使ã†ã‚‚ã†ä¸€ã¤ã®ç†ç”±ã€æ”¹å¤‰ã®å®¹æ˜“化ã§ã™ã€‚ -ã¾ãŸã€ã‚µãƒ–ルーãƒãƒ³ã®åˆ©ç”¨ã¯ã‚³ãƒ¼ãƒ‰ã‚’モジュール化ã—ã¾ã™ã€‚ ã“れã¯ã‚³ãƒ¼ãƒ‰ã‚’モジュール (サブルーãƒãƒ³) ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã€ãれãžã‚Œã¯è«–ç†çš„ãªå‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ å°åˆ‡æ‰‹æŒ¯ã‚Šå‡ºã—å£åº§ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’見ã¦ã¿ã¾ã—ょã†: +ã¾ãŸã€ã‚µãƒ–ルーãƒãƒ³ã®åˆ©ç”¨ã¯ã‚³ãƒ¼ãƒ‰ã‚’モジュール化ã—ã¾ã™ã€‚ ã“れã¯ã‚³ãƒ¼ãƒ‰ã‚’モジュール (サブルーãƒãƒ³) ã«åˆ†å‰²ã™ã‚‹ã“ã¨ã‚’æ„味ã—ã€ãれãžã‚Œã¯è«–ç†çš„ãªå‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ å°åˆ‡æ‰‹æŒ¯ã‚Šå‡ºã—å£åº§ã®ãƒ—ロジェクトã‹ã‚‰ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’見ã¦ã¿ã¾ã—ょã†: ```4d - FIND CLEARED CHECKS // 決済ã•れãŸå°åˆ‡æ‰‹ã®æ¤œç´¢ - RECONCILE ACCOUNT // å£åº§ã®ç…§åˆ - PRINT CHECK BOOK REPORT // レãƒãƒ¼ãƒˆã®å°åˆ· + FIND_CLEARED_CHECKS // 決済ã•れãŸå°åˆ‡æ‰‹ã®æ¤œç´¢ + RECONCILE_ACCOUNT // å£åº§ã®ç…§åˆ + PRINT_CHECK_BOOK_REPORT // レãƒãƒ¼ãƒˆã®å°åˆ· ``` -データベースを知らãªã„人ã§ã‚‚ã€ã“ã®ãƒ—ログラムãŒä½•ã‚’ã—ã¦ã„ã‚‹ã‹ã¯ã‚ã‹ã‚Šã¾ã™ã€‚ å„サブルーãƒãƒ³ã®å‡¦ç†æ‰‹é †ã‚’知る必è¦ã¯ã‚りã¾ã›ã‚“。 å„サブルーãƒãƒ³ã¯é•·ãã€è¤‡é›‘ãªå‡¦ç†ã§æ§‹æˆã•れã¦ã„ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ãŒã€ãれらãŒä½•を実行ã™ã‚‹ã®ã‹ã ã‘を知ã£ã¦ã„れã°å分ãªã®ã§ã™ã€‚ プログラムを論ç†çš„ãªå‡¦ç†å˜ä½ã‚„モジュールã«ã§ãã‚‹ã ã‘分割ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ +プロジェクトã®è©³ç´°ã‚’知らãªã„人ã§ã‚‚ã€ã“ã®ãƒ—ログラムãŒä½•ã‚’ã—ã¦ã„ã‚‹ã‹ã¯ã‚ã‹ã‚Šã¾ã™ã€‚ å„サブルーãƒãƒ³ã®å‡¦ç†æ‰‹é †ã‚’知る必è¦ã¯ã‚りã¾ã›ã‚“。 å„サブルーãƒãƒ³ã¯é•·ãã€è¤‡é›‘ãªå‡¦ç†ã§æ§‹æˆã•れã¦ã„ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ãŒã€ãれらãŒä½•を実行ã™ã‚‹ã®ã‹ã ã‘を知ã£ã¦ã„れã°å分ãªã®ã§ã™ã€‚ プログラムを論ç†çš„ãªå‡¦ç†å˜ä½ã‚„モジュールã«ã§ãã‚‹ã ã‘分割ã™ã‚‹ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ -### オブジェクトã®ä»˜å±žãƒ¡ã‚½ãƒƒãƒ‰ + +### オブジェクトフォーミュラ プロジェクトメソッドã¯ã€**フォーミュラ** オブジェクトã«ã‚«ãƒ—セル化ã—ã¦ã€ã‚ªãƒ–ジェクトã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -139,6 +146,8 @@ $result:=$o.fullName() //$result = "Jim Wesson" ``` + + ãŸã¨ãˆå¼•æ•°ã‚’å—ã‘å–らãªã‹ã£ãŸã¨ã—ã¦ã‚‚ã€ã‚ªãƒ–ジェクトメソッドを実行ã™ã‚‹ãŸã‚ã«ã¯ã‚«ãƒƒã‚³ () ã‚’ã¤ã‘ã¦å‘¼ã³å‡ºã™å¿…è¦ãŒã‚ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 オブジェクトプロパティã®ã¿ã‚’呼ã³å‡ºã—ãŸå ´åˆã€ãƒ•ォーミュラã¸ã®æ–°ã—ã„å‚ç…§ãŒè¿”ã•れã¾ã™ (ãã—ã¦ãƒ•ォーミュラã¯å®Ÿè¡Œã¯ã•れã¾ã›ã‚“): ```4d @@ -146,19 +155,18 @@ $o:=$f.message // $o ã«ã¯ãƒ•ォーミュラオブジェクトãŒè¿”ã•れ㾠``` ### メニューメソッド - -メニューメソッドã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰å‘¼ã³å‡ºã•れるプロジェクトメソッドã§ã™ã€‚ メニューエディターã¾ãŸã¯ "メニュー" テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’割り当ã¦ã¾ã™ã€‚ メニューãŒé¸æŠžã•れるã¨ã€ãれã«å¯¾å¿œã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ ã“ã®æ‰‹é †ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’カスタマイズã™ã‚‹ä¸»è¦ãªæ–¹æ³•ã®ä¸€ã¤ã§ã™ã€‚ 特定ã®å‡¦ç†ã‚’実行ã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’割り当ã¦ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ã§ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’カスタマイズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +メニューメソッドã¯ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰å‘¼ã³å‡ºã•れるプロジェクトメソッドã§ã™ã€‚ メニューエディターã¾ãŸã¯ "メニュー" テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’割り当ã¦ã¾ã™ã€‚ メニューãŒé¸æŠžã•れるã¨ã€ãれã«å¯¾å¿œã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 特定ã®å‡¦ç†ã‚’実行ã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’割り当ã¦ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ã§ã€ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—アプリケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースをカスタマイズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ メニューメソッドã«ã‚ˆã‚Šã€å˜ä¸€ã¾ãŸã¯è¤‡æ•°ã®å‡¦ç†ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã«ã€ä»¥ä¸‹ã®2ã¤ã®å‡¦ç†ã‚’実行ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’割り当ã¦ã‚‰ã‚Œã¾ã™ã€‚ã¾ãšé©åˆ‡ãªå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã‚’è¡¨ç¤ºã—ã€æ¬¡ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã¾ã§ã®é–“ `ADD RECORD` コマンドã«ã‚ˆã‚‹ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -連続ã—ãŸå‡¦ç†ã®è‡ªå‹•化ã¯ã€ãƒ—ログラミング言語ã®å¼·åŠ›ãªæ©Ÿèƒ½ã® 1ã¤ã§ã™ã€‚ カスタムメニューを使用ã™ã‚‹ã“ã¨ã§å‡¦ç†ã‚’自動化ã™ã‚‹ã“ã¨ãŒã§ãã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚Šå¤šãã®ã‚¬ã‚¤ãƒ€ãƒ³ã‚¹ã‚’æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +連続ã—ãŸå‡¦ç†ã®è‡ªå‹•化ã¯ã€ãƒ—ログラミング言語ã®å¼·åŠ›ãªæ©Ÿèƒ½ã® 1ã¤ã§ã™ã€‚ カスタムメニューを使用ã™ã‚‹ã“ã¨ã§å‡¦ç†ã‚’自動化ã™ã‚‹ã“ã¨ãŒã§ãã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚Šå¤šãã®ã‚¬ã‚¤ãƒ€ãƒ³ã‚¹ã‚’æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + ### プロセスメソッド **プロセスメソッド** ã¨ã¯ã€ãƒ—ロセスã®é–‹å§‹æ™‚ã«å‘¼ã³å‡ºã•れるプロジェクトメソッドã®ã“ã¨ã§ã™ã€‚ ワーカープロセスã®å ´åˆã‚’除ã„ã¦ã€ãƒ—ロセスã¯ãƒ—ロセスメソッドãŒå®Ÿè¡Œã•れã¦ã„ã‚‹é–“ã ã‘存続ã—ã¾ã™ã€‚ メニューã«å±žã™ã‚‹ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ—ロパティã¨ã—㦠*æ–°è¦ãƒ—ロセス開始* ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã„ã‚‹å ´åˆã€ãã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–°è¦ãƒ—ロセスã®ãƒ—ロセスメソッドã§ã‚‚ã‚りã¾ã™ã€‚ ### イベント・エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰ - **イベント処ç†ãƒ¡ã‚½ãƒƒãƒ‰** ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ãƒ—ロセスメソッドã¨ã—ã¦ã€åˆ†é›¢ã•れãŸãƒ—ロセス内ã§å®Ÿè¡Œã•れã¾ã™ã€‚ 通常ã€é–‹ç™ºè€…ã¯ã‚¤ãƒ™ãƒ³ãƒˆç®¡ç†ã®å¤§éƒ¨åˆ†ã‚’ 4Dã«ä»»ã›ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ãƒ¼ã‚¿å…¥åЛ䏭ã«ã‚­ãƒ¼ã‚¹ãƒˆãƒ­ãƒ¼ã‚¯ã‚„クリックを検出ã—㟠4Dã¯ã€æ­£ã—ã„オブジェクトã¨ãƒ•ォームメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ã“ã®ãŸã‚開発者ã¯ã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã—é©åˆ‡ã«å¿œç­”ã§ãã‚‹ã®ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ `ON EVENT CALL` コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 **エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰** ã¯ã€å‰²ã‚Šè¾¼ã¿ã‚’実行ã™ã‚‹ãƒ—ロジェクトメソッドã§ã™ã€‚ エラーや例外ãŒèµ·ã“る度ã«ã€ã‚¨ãƒ©ãƒ¼å‡¦ç†ãƒ¡ã‚½ãƒƒãƒ‰ã¯è‡ªèº«ãŒã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒ—ロセス内ã§å®Ÿè¡Œã•れã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ `ON ERR CALL` コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 @@ -173,7 +181,6 @@ $o:=$f.message // $o ã«ã¯ãƒ•ォーミュラオブジェクトãŒè¿”ã•れ㾠ã“れã¯å†å¸°å‘¼ã³å‡ºã—ã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ã€‚ 4D ランゲージã¯å†å¸°å‘¼ã³å‡ºã—を完全ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ 次ã«ä¾‹ã‚’示ã—ã¾ã™ã€‚ 以下ã®ãƒ•ィールドã‹ã‚‰æˆã‚‹ `[Friends and Relatives]` テーブルãŒã‚りã¾ã™: - - `[Friends and Relatives]Name` - `[Friends and Relatives]ChildrensName` @@ -239,14 +246,3 @@ $o:=$f.message // $o ã«ã¯ãƒ•ォーミュラオブジェクトãŒè¿”ã•れ㾠- `FOLDER LIST` 㨠`DOCUMENT LIST` コマンドを使用ã—ã¦ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã‚るドキュメントã¨ãƒ•ォルダーをブラウズã™ã‚‹ã€‚ フォルダーã«ã¯ãƒ•ォルダーã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã‚µãƒ–フォルダーã¯ã¾ãŸãƒ•ォルダーã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’å«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ **é‡è¦:** å†å¸°å‘¼ã³å‡ºã—ã¯ã€å¿…ãšã‚る時点ã§çµ‚了ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€`Genealogy of` メソッドãŒè‡ªèº«ã®å‘¼ã³å‡ºã—ã‚’æ­¢ã‚ã‚‹ã®ã¯ã€ã‚¯ã‚¨ãƒªãŒãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’è¿”ã•ãªã„ã¨ãã§ã™ã€‚ ã“ã®æ¡ä»¶ã®ãƒ†ã‚¹ãƒˆã‚’ã—ãªã„ã¨ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¯éš›é™ãªã自身を呼ã³å‡ºã—ã¾ã™ã€‚ (メソッド内ã§ä½¿ç”¨ã•れる引数やローカル変数ã®è“„ç©ã‚’å«ã‚€) å†å¸°å‘¼ã³å‡ºã—ã«ã‚ˆã£ã¦å®¹é‡ãŒä¸€æ¯ã«ãªã‚‹ã¨ã€æœ€çµ‚的㫠4D㯠“スタックãŒã„ã£ã±ã„ã§ã™â€ エラーを返ã—ã¾ã™ 。 - -## 特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ - -汎用的㪠**プロジェクトメソッド** ã¨ã¯åˆ¥ã«ã€4D ã¯ã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã«è‡ªå‹•çš„ã«å‘¼ã³å‡ºã•れる特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã„ãã¤ã‹ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: - -| åž‹ | 自動呼ã³å‡ºã—ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ | 引数ã®å—ã‘å–り | 説明 | -| ------------------------ | --------------------------------- | ------- | ------------------------------------------------------------------------------------------------ | -| **オブジェクト (ウィジェット) メソッド** | メソッドãŒè¨­å®šã•れãŸãƒ•ォームオブジェクトã«é–¢é€£ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | × | フォームオブジェクト (ウィジェットã¨ã‚‚呼ã³ã¾ã™) ã®ãƒ—ロパティã§ã™ã€‚ | -| **フォームメソッド** | メソッドãŒè¨­å®šã•れãŸãƒ•ォームã«é–¢é€£ã—ãŸã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | × | フォームã®ãƒ—ロパティã§ã™ã€‚ フォームメソッドを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã¨ã‚ªãƒ–ジェクトを管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“れら目的ã«ã¯ã€ã‚ªãƒ–ジェクトメソッドを使用ã™ã‚‹æ–¹ãŒé€šå¸¸ã¯ç°¡å˜ã§ã‚りã€ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚ | -| **トリガー** (別å *テーブルメソッド*) | テーブルã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ“作 (追加・削除・修正) ã®åº¦ã« | × | テーブルã®ãƒ—ロパティã§ã™ã€‚ トリガーã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«å¯¾ã—ã¦ã€Œä¸æ­£ãªã€æ“作ãŒãŠã“ãªã‚れるã“ã¨ã‚’防ãŽã¾ã™ã€‚ | -| **データベースメソッド** | 作業セッションã®ã‚¤ãƒ™ãƒ³ãƒˆç™ºç”Ÿæ™‚ã« | â—‹ (既定) | 4D ã«ã¯ 16ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚りã¾ã™ã€‚ 詳細ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®é …ã‚’å‚ç…§ãã ã•ã„。 | \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/parameters.md b/website/translated_docs/ja/Concepts/parameters.md index 7f9507083f1118..dc607bac3592c5 100644 --- a/website/translated_docs/ja/Concepts/parameters.md +++ b/website/translated_docs/ja/Concepts/parameters.md @@ -4,85 +4,189 @@ title: 引数 --- -## 引数ã«ã¤ã„㦠+メソッドや関数ã«ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™å¿…è¦ãŒã—ã°ã—ã°ç™ºç”Ÿã—ã¾ã™ã€‚ ã“れã¯å¼•æ•°ã«ã‚ˆã£ã¦å®¹æ˜“ã«ã§ãã¾ã™ã€‚ -メソッドã«ãƒ‡ãƒ¼ã‚¿ã‚’渡ã™å¿…è¦ãŒã—ã°ã—ã°ç™ºç”Ÿã—ã¾ã™ã€‚ ã“れã¯å¼•æ•°ã«ã‚ˆã£ã¦å®¹æ˜“ã«ã§ãã¾ã™ã€‚ +## æ¦‚è¦ -**引数** (ã¾ãŸã¯ **パラメーター**) ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‡¦ç†ã«å¿…è¦ã¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã“ã¨ã§ã™ã€‚ *引数* 㨠*パラメーター* ã¯å޳坆ã«ã¯é•ã†ã‚‚ã®ã§ã™ãŒã€ã“ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§ã¯åŒç¾©èªžã¨ã—ã¦ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ 引数ã¯ã€ãƒ“ルトイン㮠4Dコマンドã«ã‚‚渡ã•れã¾ã™ã€‚ 以下ã®ä¾‹ã¯ã€â€œHello†ã¨ã„ã†æ–‡å­—列を引数ã¨ã—ã¦ãƒ“ルトイン㮠`ALERT` ã‚³ãƒžãƒ³ãƒ‰ã¸æ¸¡ã—ã¾ã™: +**引数** (ã¾ãŸã¯ **パラメーター**) ã¨ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚„関数ãŒå‡¦ç†ã«å¿…è¦ã¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã“ã¨ã§ã™ã€‚ *引数* 㨠*パラメーター* ã¯å޳坆ã«ã¯é•ã†ã‚‚ã®ã§ã™ãŒã€ã“ã®ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§ã¯åŒç¾©èªžã¨ã—ã¦ä½¿ç”¨ã•れã¦ã„ã¾ã™ã€‚ 引数ã¯ã€ãƒ“ルトイン㮠4Dコマンドã«ã‚‚渡ã•れã¾ã™ã€‚ 以下ã®ä¾‹ã¯ã€â€œHello†ã¨ã„ã†æ–‡å­—列を引数ã¨ã—ã¦ãƒ“ルトイン㮠`ALERT` ã‚³ãƒžãƒ³ãƒ‰ã¸æ¸¡ã—ã¾ã™: ```4d ALERT("Hello") ``` -メソッドã«å¼•数を渡ã™å ´åˆã‚‚åŒæ§˜ã«ãŠã“ãªã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¡ã‚½ãƒƒãƒ‰ DO SOMETHING ãŒ3ã¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã¾ã™: +メソッドやクラス関数ã«å¼•数を渡ã™å ´åˆã‚‚åŒæ§˜ã«ãŠã“ãªã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`getArea()` クラス関数㌠2ã¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€ã“ã®ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’呼ã³å‡ºã™ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã¾ã™: -```4d -DO SOMETHING(WithThis;AndThat;ThisWay) +``` +$area:=$o.getArea(50;100) ``` -引数ã¯ã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ 引数ã®å€¤ã¯å‘¼ã³å‡ºã—時ã«è©•価ã•れã¾ã™ã€‚ - -サブルーãƒãƒ³ (呼ã³å‡ºã•れるメソッド) 内ã§ã€ãれãžã‚Œã®å¼•æ•°ã®å€¤ã¯è‡ªå‹•çš„ã«ã€é †ã«ç•ªå·ãŒä»˜ã‘られãŸãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° ($1, $2, $3...) ã«æ ¼ç´ã•れã¾ã™ã€‚ ローカル変数ã®ç•ªå·ã¯ã€å¼•æ•°ã®é †åºã‚’表ã‚ã—ã¾ã™ã€‚ +ã¾ãŸã€ãƒ—ロジェクトメソッド `DO SOMETHING` ãŒ3ã¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã¾ã™: ```4d - // DO SOMETHING メソッド - // ã™ã¹ã¦ã®å¼•æ•°ãŒãƒ†ã‚­ã‚¹ãƒˆåž‹ã¨ã—ã¾ã™ - C_TEXT($1;$2;$3) - ALERT("I received "+$1+" and "+$2+" and also "+$3) - // $1 ã«ã¯ WithThis 引数ãŒå…¥ã‚Šã¾ã™ - // $2 ã«ã¯ AndThat 引数ãŒå…¥ã‚Šã¾ã™ - // $3 ã«ã¯ ThisWay 引数ãŒå…¥ã‚Šã¾ã™ +DO_SOMETHING($WithThis;$AndThat;$ThisWay) ``` -ã“れらã®å¼•æ•° ($1, $2...) ã¯ã‚µãƒ–ルーãƒãƒ³å†…ã§ ä»–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¨åŒæ§˜ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã—ãŸå¤‰æ•°ã®å€¤ã‚’変更ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’サブルーãƒãƒ³å†…ã§ä½¿ç”¨ã™ã‚‹å ´åˆ (例: `Find in field`)ã€$1, $2ãªã©ã‚’直接渡ã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã¾ãšæ¨™æº–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ç­‰ã«ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: $myvar:=$1)。 +入力引数ã¯ã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ メソッドを実行ã™ã‚‹å°‚用コマンドを利用ã™ã‚‹ã¨ãã‚‚ã€åŒã˜åŽŸå‰‡ã§å¼•数を渡ã—ã¾ã™ã€‚ ```4d -EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/10!) +EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/20!) // サブフォーム "Cal2" ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠SetCalendarDate を実行㗠-// ãã®éš›ã«å¼•æ•°ã¨ã—ã¦æ—¥ä»˜ãƒªãƒ†ãƒ©ãƒ« !05/05/10! を渡ã—ã¾ã™ +// ãã®éš›ã«å¼•æ•°ã¨ã—ã¦æ—¥ä»˜ãƒªãƒ†ãƒ©ãƒ« !05/05/20! を渡ã—ã¾ã™ ``` -**注:** よりよã„コード実行ã®ãŸã‚ã€ã‚µãƒ–ルーãƒãƒ³ãŒå—ã‘å–る引数 `$1`, `$2`... ãŒæ­£ç¢ºã«å®£è¨€ã•れã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„ ([パラメーターã®å®£è¨€](#パラメーターã®å®£è¨€) å‚ç…§) +メソッドやクラス関数ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’ **è¿”ã™** ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 以下ã¯ã€æ–‡å­—列ã®ãƒ‡ãƒ¼ã‚¿é•·ã‚’è¿”ã™ãƒ“ルトイン㮠`Length` コマンドを用ã„ãŸã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã™ã€‚ ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã¯ã€`Length` 関数㌠*MyLength* ã¨ã„ã†å¤‰æ•°ã«å€¤ã‚’è¿”ã—ã¾ã™ã€‚ -### 引数ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹å¼ +```4d +MyLength:=Length("How did I get here?") +``` -引数ã¯ã‚らゆる [å¼](Concepts/quick-tour.md#å¼ã®ã‚¿ã‚¤ãƒ—) ã®å½¢ã§æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ãŒã€ä¾‹å¤–ãŒã‚りã¾ã™: +ã©ã®ã‚ˆã†ãªã‚µãƒ–ルーãƒãƒ³ã§ã‚‚値を返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ å„メソッドやクラス関数ã«ã¤ãã€å®šç¾©ã§ãる戻り値ã¯ä¸€ã¤ã ã‘ã§ã™ã€‚ -- テーブル -- arrays +入力ãŠã‚ˆã³å‡ºåЛ値ã¯å‘¼ã³å‡ºã—時㫠[評価](#å¼•æ•°ã®æ¸¡ã—æ–¹-値ã‹å‚ç…§ã‹) ã•れã€ãã®å€¤ã¯ãれãžã‚Œè‡ªå‹•çš„ã«ã‚µãƒ–ルーãƒãƒ³ (呼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¾ãŸã¯ã‚¯ãƒ©ã‚¹é–¢æ•°) 内ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«æ ¼ç´ã•れã¾ã™ã€‚ 呼ã³å‡ºã•れるメソッドã«ãŠã„ã¦ã€ã“れらã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’宣言ã™ã‚‹ã«ã¯æ¬¡ã® 2ã¤ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒåˆ©ç”¨ã§ãã¾ã™: -テーブルやé…列ã®å¼ã¯ [ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’介ã—ãŸå‚ç…§ã¨ã—ã¦](Concepts/dt_pointer.md#メソッドã®å¼•æ•°ã¨ã—ã¦ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼) 渡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ +- [åå‰ä»˜ã変数](#åå‰ä»˜ã引数) (ã»ã¨ã‚“ã©ã®å ´åˆã«æŽ¨å¥¨) +- [å—ã‘æ¸¡ã—é †ã«ç•ªå·ãŒä»˜ã‘られãŸå¤‰æ•°](#順番引数) (順番引数) -## 関数 -メソッドã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 値を返ã™ãƒ¡ã‚½ãƒƒãƒ‰ã‚’関数ã¨å‘¼ã³ã¾ã™ã€‚ +引数ã®å®£è¨€ã«ã‚ãŸã£ã¦ã€[åå‰ä»˜ã](#åå‰ä»˜ã引数) シンタックス㨠[順番](#順番引数) シンタックスã¯åˆ¶é™ãªã併用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: -値を返㙠4Dコマンドや 4Dプラグインコマンドも関数ã¨å‘¼ã³ã¾ã™ã€‚ +```4d +Function add($x : Integer) + var $0;$2 : Integer + $0:=$x+$2 +``` + + + + +## åå‰ä»˜ã引数 -以下ã¯ã€æ–‡å­—列ã®ãƒ‡ãƒ¼ã‚¿é•·ã‚’è¿”ã™ãƒ“ルトイン㮠`Length` 関数を用ã„ãŸã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã™ã€‚ ã“ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã§ã¯ã€`Length` 関数㌠*MyLength* ã¨ã„ã†å¤‰æ•°ã«å€¤ã‚’è¿”ã—ã¾ã™ã€‚ +呼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚„クラス関数ã«ãŠã„ã¦ã€å¼•æ•°ã®å€¤ã¯ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«ä»£å…¥ã•れã¾ã™ã€‚ 引数㯠**パラメーターå** ã¨ãã® **データ型** をコロン (:) ã§åŒºåˆ‡ã£ã¦å®£è¨€ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- クラス関数ã®å ´åˆã€å¼•数㯠`Function` キーワードã¨ã¨ã‚‚ã«å®£è¨€ã•れã¾ã™ã€‚ +- メソッドã®å ´åˆ (プロジェクトメソッドã€ãƒ•ォームオブジェクトメソッドã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã€ãƒˆãƒªã‚¬ãƒ¼)ã€å¼•æ•°ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚³ãƒ¼ãƒ‰å…ˆé ­ã® `#DECLARE` キーワードを使ã£ã¦å®£è¨€ã•れã¾ã™ã€‚ + +例: ```4d -MyLength:=Length("How did I get here?") +Function getArea($width : Integer; $height : Integer) -> $area : Integer +``` + +```4d + // myProjectMethod +#DECLARE ($i : Integer) -> $myResult : Object +``` + + +次ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™: + +- 宣言文ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚„関数ã®ã‚³ãƒ¼ãƒ‰ã®å…ˆé ­ã«ä½ç½®ã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。宣言文よりå‰ã«ç½®ã‘ã‚‹ã®ã¯ã‚³ãƒ¡ãƒ³ãƒˆã¨æ”¹è¡Œã®ã¿ã§ã‚りã€ãれ以外ã®å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- 引数åã¯å¿…ãš `$` 文字ã§å§‹ã¾ã‚Šã€[プロパティåã®å‘½åè¦å‰‡](dt_object.md#オブジェクトプロパティ識別å­) ã«æº–æ‹ ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- 複数ã®ãƒ‘ラメーター (ãŠã‚ˆã³ãã®åž‹) を宣言ã™ã‚‹å ´åˆã¯ã€ãれらをセミコロン (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ +- 複数行シンタックスãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ ("\\" 文字を使用)。 + + +ãŸã¨ãˆã°ã€`getArea()` 関数㫠2ã¤ã®å¼•数を渡ã—ã¦å‘¼ã³å‡ºã™å ´åˆ: + +```4d +$area:=$o.getArea(50;100) +``` + +クラス関数ã«ãŠã„ã¦ã€å¼•æ•°ã®å€¤ã¯ãれãžã‚Œå¯¾å¿œã™ã‚‹ãƒ‘ラメーターã«ä»£å…¥ã•れã¾ã™: + +```4d +// クラス: Polygon +Function getArea($width : Integer; $height : Integer)-> $area : Integer + $area:=$width*$height +``` +> パラメーターã®åž‹ãŒå®£è¨€ã•れã¦ã„ãªã„å ´åˆã«ã¯ã€[`Variant`](dt_variant.md) åž‹ã¨ã—ã¦å®šç¾©ã•れã¾ã™ã€‚ + +データベースメソッドをå«ã‚€ã™ã¹ã¦ã® 4Dメソッドã«ãŠã„㦠`#DECLARE` キーワードã®ä½¿ç”¨ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`On Web Authentication` データベースメソッドã«ãŠã„ã¦ã€æ¬¡ã®ã‚ˆã†ã«åå‰ä»˜ã引数を宣言ã§ãã¾ã™: + +```4d + // On Web Authentication データベースメソッド +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean +$entitySelection:=ds.User.query("login=:1"; $user) +// ãƒãƒƒã‚·ãƒ¥ãƒ‘スワードを確èª... ``` -ã©ã®ã‚ˆã†ãªã‚µãƒ–ルーãƒãƒ³ã§ã‚‚値を返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ è¿”ã™å€¤ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° `$0` ã«æ ¼ç´ã—ã¾ã™ã€‚ +### 戻り値 + +é–¢æ•°ã®æˆ»ã‚Šå€¤ã¯ã€å…¥åŠ›ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ãƒªã‚¹ãƒˆã«çŸ¢å° (->) を追加ã—ã€ãれã«ç¶šã‘ã¦å®£è¨€ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +Function add($x : Variant; $y : Integer) -> $result : Integer +``` + +矢å°ã¨å‡ºåŠ›å¤‰æ•°åã‚’çœç•¥ã—ã¦ã€ã‚³ãƒ­ãƒ³ (:) 記å·ã®å¾Œã«æˆ»ã‚Šå€¤ã®ãƒ‡ãƒ¼ã‚¿åž‹ã ã‘を指定ã—ãŸå ´åˆã¯ã€è‡ªå‹•的㫠`$0` ãŒä½¿ç”¨ã•れã¾ã™ã€‚([å—ã‘æ¸¡ã—順シンタックス](#戻り値-1) å‚ç…§)。 ãŸã¨ãˆã°: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` + + +### サãƒãƒ¼ãƒˆã•れã¦ã„るデータ型 -ãŸã¨ãˆã°ã€`Uppercase4` ã¨ã„ã†ä»¥ä¸‹ã®é–¢æ•°ã¯ã€å§‹ã‚ã® 4文字を大文字ã«å¤‰æ›ã—ãŸæ–‡å­—列を返ã—ã¾ã™: +åå‰ä»˜ã引数ã®å ´åˆã€[`var` キーワードã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹](variables.md#var-キーワードã«ã‚ˆã‚‹å®£è¨€) データ型 (クラスオブジェクトå«ã‚€) を使用ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +Function saveToFile($entity : cs.ShapesEntity; $file : 4D.File) +``` + + + + + +## 順番引数 + +[åå‰ä»˜ã引数](#åå‰ä»˜ã引数) シンタックスを使用ã™ã‚‹ã»ã‹ã«ã‚‚ã€å¼•æ•°ã¯å—ã‘æ¸¡ã—é †ã«ç•ªå·ãŒä»˜ã‘られãŸå¤‰æ•°ã‚’使ã£ã¦å®£è¨€ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: **$1**, **$2**, **$3**, ...。 ローカル変数ã®ç•ªå·ã¯ã€å¼•æ•°ã®é †ç•ªã‚’表ã‚ã—ã¾ã™ã€‚ + +> ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã‚¯ãƒ©ã‚¹é–¢æ•°ã®å ´åˆã‚‚サãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ãŒã€[åå‰ä»˜ã引数](#åå‰ä»˜ã引数) を使ã£ãŸã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã®æ–¹ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ãƒ—ロジェクトメソッド `DO SOMETHING` ãŒ3ã¤ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã¾ã™: + +```4d +DO_SOMETHING($WithThis;$AndThat;$ThisWay) +``` + +呼ã³å‡ºã•れるメソッドã«ãŠã„ã¦ã€ãれãžã‚Œã®å¼•æ•°ã®å€¤ã¯è‡ªå‹•çš„ã«ã€é †ã«ç•ªå·ãŒä»˜ã‘られãŸãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° ($1, $2, $3...) ã«æ ¼ç´ã•れã¾ã™: + +```4d + // DO_SOMETHING メソッド + // ã™ã¹ã¦ã®å¼•æ•°ã¯ãƒ†ã‚­ã‚¹ãƒˆåž‹ã§ã™ + C_TEXT($1;$2;$3) + ALERT($1+" 㨠"+$2+" 㨠"+$3+" ã‚’å—ã‘å–りã¾ã—ãŸã€‚") + //$1 ã«ã¯ $WithThis ã®å€¤ãŒä»£å…¥ã•れã¾ã™ + //$2 ã«ã¯ $AndThat ã®å€¤ãŒä»£å…¥ã•れã¾ã™ + //$3 ã«ã¯ $ThisWay ã®å€¤ãŒä»£å…¥ã•れã¾ã™ +``` + + +### 戻り値 + +戻り値ã¯è‡ªå‹•çš„ã«ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•° `$0` ã«æ ¼ç´ã—ã¾ã™ã€‚ + + +ãŸã¨ãˆã°ã€`Uppercase4` ã¨ã„ã†ä»¥ä¸‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€å§‹ã‚ã® 4文字を大文字ã«å¤‰æ›ã—ãŸæ–‡å­—列を返ã—ã¾ã™: ```4d // Uppercase4 メソッド $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -以下ã¯ã€Uppercase4 を関数ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ä¾‹ã§ã™: +以下ã¯ã€Uppercase4 をメソッドã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ä¾‹ã§ã™: ```4d -NewPhrase:=Uppercase4("This is good.") +$NewPhrase:=Uppercase4("This is good.") ``` -変数 *NewPhrase* ã«ã¯â€œTHIS is good.â€ ãŒæ ¼ç´ã•れã¾ã™ã€‚ +変数 *$NewPhrase* ã«ã¯â€œTHIS is good.â€ ãŒæ ¼ç´ã•れã¾ã™ã€‚ 戻り値 `$0` ã¯ã‚µãƒ–ルーãƒãƒ³å†…ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã§ã™ã€‚ ã—ãŸãŒã£ã¦ã€ã‚µãƒ–ルーãƒãƒ³å†…ã§é€šå¸¸ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã®ã‚ˆã†ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: @@ -94,23 +198,96 @@ ALERT($0) ã“ã®ä¾‹ã«ãŠã„ã¦ã€`$0` ã¯å¤§æ–‡å­—ã«å¤‰æ›ã—ãŸå¼•æ•° `$1` ã®å€¤ã‚’割り当ã¦ã‚‰ã‚Œã€ãã®å¾Œ `ALERT` コマンドã«å¼•æ•°ã¨ã—ã¦æ¸¡ã•れã¾ã—ãŸã€‚ ã“ã®ã‚ˆã†ã«ã€ã‚µãƒ–ルーãƒãƒ³å†…ã®ä»–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¨åŒã˜ã‚ˆã†ã« `$0` を使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ サブルーãƒãƒ³çµ‚了時ã«ã€ãã®æ™‚点ã§ã® `$0` ã®å€¤ã‚’呼ã³å‡ºã—å…ƒã®ãƒ¡ã‚½ãƒƒãƒ‰ã«æˆ»ã™ã®ã¯ 4DãŒãŠã“ãªã„ã¾ã™ã€‚ -## パラメーターã®å®£è¨€ -[インタープリターモード](Concepts/interpreted.md) ã§ã¯å¿…é ˆã§ã¯ãªã„ã‚‚ã®ã®ã€å•題をé¿ã‘ã‚‹ã«ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã®å„パラメーターを宣言ã—ã¦ãŠãã¹ãã§ã—ょã†ã€‚ +### サãƒãƒ¼ãƒˆã•れã¦ã„るデータ型 + +順番引数ã«ã¯ã€ã‚らゆる [å¼](quick-tour.md#å¼ã®ã‚¿ã‚¤ãƒ—) ã®å½¢ãŒä½¿ç”¨ã§ãã¾ã™ãŒã€ä¾‹å¤–ãŒã‚りã¾ã™: + +- テーブル +- é…列 + +テーブルやé…列ã®å¼ã¯ [ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’介ã—ãŸå‚ç…§ã¨ã—ã¦](dt_pointer.md#メソッドã®å¼•æ•°ã¨ã—ã¦ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼) 渡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ -次ã®ä¾‹ã§ã¯ `OneMethodAmongOthers` プロジェクトメソッドã«è¨­å®šã•れã¦ã„ã‚‹ 3ã¤ã®ãƒ‘ラメーターをãれãžã‚Œå®£è¨€ã—ã¦ã„ã¾ã™: +## 引数ã®é–“接å‚ç…§ (${N}) + +4Dプロジェクトメソッドã¯ã€å¯å¤‰å€‹ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `For...End for` ループや [`Count parameters`](https://doc.4d.com/4dv19/help/command/ja/page259.html) コマンドã€**引数ã®é–“接å‚照シンタックス** を使ã£ã¦ã€ã“れらã®å¼•数を扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ メソッド内ã§ã€é–“接å‚照㯠`${N}` ã®ã‚ˆã†ã«è¡¨ç¤ºã—ã¾ã™ã€‚ã“ã“ã® `N` ã¯æ•°å€¤å¼ã§ã™ã€‚ `${N}` ã‚’ **ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーター** (generic parameter) ã¨å‘¼ã³ã¾ã™ã€‚ + + + +### ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®ä½¿ã„æ–¹ + +以下ã¯é–“接å‚ç…§ã®ä¾‹ã§ã™ã€‚å¼•æ•°ã®æ•°å€¤ã‚’åˆè¨ˆã—ãŸçµæžœã‚’ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã•れãŸè¡¨ç¤ºå½¢å¼ã§è¿”ã™ã‚ˆã†ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ åˆè¨ˆã•ã‚Œã‚‹æ•°å€¤ã®æ•°ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã°ã‚Œã‚‹ãŸã³ã«å¤‰ã‚りã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯æ•°å€¤ã¨è¡¨ç¤ºå½¢å¼ã‚’引数ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +以下㯠`MySum` メソッドã§ã™: ```4d - // OneMethodAmongOthers プロジェクトメソッド - // OneMethodAmongOthers ( 実数 ; 日付 { ; å€é•·æ•´æ•° } ) - // OneMethodAmongOthers ( æ•°é‡ ; 日付 { ; å‰²åˆ } ) + #DECLARE($format : Text) -> $result : Text + $sum:=0 + For($i;2;Count parameters) + $sum:=$sum+${$i} + End for + $result:=String($sum;$format) +``` - C_REAL($1) // 1番目ã®ãƒ‘ラメーターã¯å®Ÿæ•°åž‹ã§ã™ - C_DATE($2) // 2番目ã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¯æ—¥ä»˜åž‹ã§ã™ - C_LONGINT($3) // 3番目ã®ãƒ‘ラメーターã¯å€é•·æ•´æ•°åž‹ã§ã™ +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®å¼•æ•°ã¯æ­£ã—ã„é †åºã§æ¸¡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚最åˆã«è¡¨ç¤ºå½¢å¼ã€æ¬¡ã«å¯å¤‰å€‹ã®æ•°å€¤å¼•æ•°ã§ã™ã€‚ + +```4d + Result:=MySum("##0.00";125,2;33,5;24) // "182.70" + Result:=MySum("000";1;2;200) // "203" ``` -次ã®ä¾‹ã§ã¯ `Capitalize` プロジェクトメソッドã¯ç¬¬1パラメーターã«ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã€æˆ»ã‚Šå€¤ã¨ã—ã¦ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å€¤ã‚’è¿”ã—ã¾ã™: +メソッド内㧠0ã€1ã€ã¾ãŸã¯ãれ以上ã®ãƒ‘ラメーターを宣言ã—ãŸå ´åˆã§ã‚‚ã€ä»»æ„ã®æ•°ã®å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 呼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ã¯ã€`${N}` シンタックスを使ã£ã¦å¼•数を利用ã§ãã€å¯å¤‰é•·å¼•æ•°ã®åž‹ã¯ãƒ‡ãƒ•ォルト㧠[ãƒãƒªã‚¢ãƒ³ãƒˆ](dt_variant.md) ã§ã™ ([コンパイラー指示å­](#ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®å®£è¨€) を使ã£ã¦ã“れらを宣言ã§ãã¾ã™)。 [`Count parameters`](https://doc.4d.com/4dv19/help/command/ja/page259.html) コマンドを使用ã—ã¦ã€ãƒ‘ラメーターãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’ã‚らã‹ã˜ã‚確èªã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +// foo メソッド +#DECLARE($p1: Text;$p2 : Text; $p3 : Date) +For($i;1;Count parameters) + ALERT("param "+String($i)+" = "+String(${$i})) +End for +``` + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®ã‚ˆã†ã«å‘¼ã³å‡ºã›ã¾ã™: + +```4d +foo("hello";"world";!01/01/2021!;42;?12:00:00?) // 追加ã®å¼•æ•°ãŒå—ã‘æ¸¡ã•れã¾ã™ +``` + +> 引数ã®é–“接å‚ç…§ã¯ä»¥ä¸‹ã®æ¡ä»¶ã‚’守るã“ã¨ã«ã‚ˆã‚Šã€æ­£ã—ã動作ã—ã¾ã™: 引数ã®ä¸€éƒ¨ã®ã¿ã‚’間接å‚ç…§ã™ã‚‹å ´åˆã€ç›´æŽ¥å‚ç…§ã™ã‚‹å¼•æ•°ã®å¾Œã«é–“接å‚照引数をé…ç½®ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ + + +### ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®å®£è¨€ + +ä»–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¨åŒæ§˜ã€ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã¯ã‚³ãƒ³ãƒ‘ã‚¤ãƒ©ãƒ¼ã«æŒ‡ç¤ºã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ãŸã ã—ã€æ›–昧ã•を回é¿ã™ã‚‹ãŸã‚ã«ã¯æŽ¨å¥¨ã•れã¾ã™ã€‚ 宣言ãªã—ã®ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã¯è‡ªå‹•的㫠[Variant](dt_variant.md)åž‹ã¨ãªã‚Šã¾ã™ã€‚ + +ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®å®£è¨€ã«ã¯ã€ã‚³ãƒ³ãƒ‘イラー指示å­ã« ${N} を渡ã™ã€ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¾ã™ (N 㯠1ã¤ç›®ã®æœ€åˆã®ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®ç•ªå·ã§ã™): + +```4d + C_TEXT(${4}) +``` + +> ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®å®£è¨€ã¯ [å—ã‘æ¸¡ã—é †](#順番引数) シンタックスã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€4番目以é™ã«é–“接å‚ç…§ã•れるã™ã¹ã¦ã®å¼•æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒãƒ†ã‚­ã‚¹ãƒˆã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ $1ã€$2ã€$3ã«ã¯ã€ã„ã‹ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚‚使用ã§ãã¾ã™ãŒã€ $2を間接å‚ç…§ã—ãŸå ´åˆã«ã¯ã€é–“接å‚ç…§ã®åž‹å®£è¨€ã®å½±éŸ¿ã‚’å—ã‘ã¾ã™ã€‚ ã“ã®ãŸã‚ã€ãŸã¨ãˆã° $2 ãŒå®Ÿæ•°ã§ã‚ã£ã¦ã‚‚ã€é–“接å‚ç…§ã•れれã°ãƒ†ã‚­ã‚¹ãƒˆã¨è¦‹ãªã•れã¾ã™ã€‚ + +> 宣言ã«ä½¿ç”¨ã™ã‚‹æ•°å€¤ã¯å¤‰æ•°ã§ã¯ãªãã€å®šæ•°ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + + + + + +## コンパイルモード用ã®ãƒ‘ラメーター宣言 + +[インタープリターモード](interpreted.md) ã§ã¯å¿…é ˆã§ã¯ãªã„ã‚‚ã®ã®ã€å•題をé¿ã‘ã‚‹ã«ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚„関数ã®å„パラメーターを宣言ã—ã¦ãŠãã¹ãã§ã—ょã†ã€‚ + +[åå‰ä»˜ã引数シンタックス](#åå‰ä»˜ã引数) を利用ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ãれらã®å¼•数㯠`#DECLARE` キーワードã¾ãŸã¯ `Function` プロトタイプã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å®£è¨€ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +Function add($x : Variant; $y : Integer)-> $result : Integer + // ã™ã¹ã¦ã®å¼•æ•°ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã¨ã¨ã‚‚ã«å®£è¨€ã•れã¾ã™ +``` + + +[順番引数シンタックス](#順番引数) を利用ã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€å¼•æ•°ãŒãれãžã‚Œé©åˆ‡ã«å®£è¨€ã•れã¦ã„ã‚‹ã“ã¨ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 次ã®ä¾‹ã§ã¯ `Capitalize` プロジェクトメソッドã¯ç¬¬1パラメーターã«ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å¼•æ•°ã‚’å—ã‘å–ã‚Šã€æˆ»ã‚Šå€¤ã¨ã—ã¦ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å€¤ã‚’è¿”ã—ã¾ã™: ```4d // Capitalize プロジェクトメソッド @@ -141,26 +318,27 @@ C_OBJECT($3) ... ``` -**注:** プロジェクトメソッドã®ãƒ‘ラメーター宣言ã¯ã€ã‚³ãƒ³ãƒ‘イルモード用ã«ã¾ã¨ã‚ã¦ã€"Compiler" ã§å§‹ã¾ã‚‹åç§°ã®å°‚用メソッドã«ã¦ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 専用メソッド内ã§å„メソッドã®ãƒ‘ラメーターをã‚らã‹ã˜ã‚宣言ã™ã‚‹å ´åˆã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: - -```4d +> プロジェクトメソッドã®ãƒ‘ラメーター宣言ã¯ã€ã‚³ãƒ³ãƒ‘イルモード用ã«ã¾ã¨ã‚ã¦ã€"Compiler" ã§å§‹ã¾ã‚‹åç§°ã®å°‚用メソッドã«ã¦ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 専用メソッド内ã§å„メソッドã®ãƒ‘ラメーターをã‚らã‹ã˜ã‚宣言ã™ã‚‹å ´åˆã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: +```4d + // Compiler_method C_REAL(OneMethodAmongOthers;$1) ``` - -詳細ã«ã¤ã„ã¦ã¯ [インタープリターモードã¨ã‚³ãƒ³ãƒ‘イルモード](Concepts/interpreted.md) ã‚’å‚ç…§ãã ã•ã„。 +詳細ã«ã¤ã„ã¦ã¯ [インタープリターモードã¨ã‚³ãƒ³ãƒ‘イルモード](interpreted.md) ã‚’å‚ç…§ãã ã•ã„。 パラメーターã®å®£è¨€ã¯æ¬¡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã‚‚å¿…é ˆã¨ãªã‚Šã¾ã™ (ã“れらã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯ "Compiler" メソッドã«ã‚ˆã‚‹ä¸€æ‹¬å®£è¨€ã‚’サãƒãƒ¼ãƒˆã—ã¾ã›ã‚“)。 -- データベースメソッド ãŸã¨ãˆã°ã€`On Web Connection データベースメソッド` 㯠6ã¤ã®ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å¼•æ•° $1 〜 $6 ã‚’å—ã‘å–りã¾ã™ã€‚ ãŸã¨ãˆã™ã¹ã¦ã®å¼•数を使用ã—ãªã„å ´åˆã§ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®å…ˆé ­ã§æ¬¡ã®ã‚ˆã†ã«å®£è¨€ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: +- データベースメソッド - ãŸã¨ãˆã°ã€`On Web Connection データベースメソッド` 㯠6ã¤ã®ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å¼•æ•° $1 〜 $6 ã‚’å—ã‘å–りã¾ã™ã€‚ ãŸã¨ãˆã™ã¹ã¦ã®å¼•数を使用ã—ãªã„å ´åˆã§ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®å…ˆé ­ã§æ¬¡ã®ã‚ˆã†ã«å®£è¨€ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: ```4d // On Web Connection C_TEXT($1;$2;$3;$4;$5;$6) ``` -- トリガー トリガーã®çµæžœã§ã‚ã‚‹ $0 パラメーター (å€é•·æ•´æ•°) ã¯ã€æ˜Žç¢ºã«å®šç¾©ã•れã¦ã„ãªã‘れã°ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦åž‹æŒ‡å®šã•れã¾ã™ã€‚ 定義ã™ã‚‹å ´åˆã¯ã€ãƒˆãƒªã‚¬ãƒ¼ã®ä¸­ã§ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ +> `#DECLARE` キーワードを使用ã—ã¦ã€[åå‰ä»˜ã引数](#åå‰ä»˜ã引数) を使ã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +- トリガー - トリガーã®çµæžœã§ã‚ã‚‹ $0 パラメーター (å€é•·æ•´æ•°) ã¯ã€æ˜Žç¢ºã«å®šç¾©ã•れã¦ã„ãªã‘れã°ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦åž‹æŒ‡å®šã•れã¾ã™ã€‚ 定義ã™ã‚‹å ´åˆã¯ã€ãƒˆãƒªã‚¬ãƒ¼ã®ä¸­ã§ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ -- `On Drag Over` フォームイベントをå—ã‘入れるオブジェクト `On Drag Over` フォームイベントã®çµæžœã§ã‚ã‚‹ $0 パラメーター (å€é•·æ•´æ•°) ã¯ã€æ˜Žç¢ºã«å®šç¾©ã•れã¦ã„ãªã‘れã°ã‚³ãƒ³ãƒ‘イラーãŒåž‹ã‚’決定ã—ã¾ã™ã€‚ 定義ã™ã‚‹å ´åˆã¯ã€ã‚ªãƒ–ジェクトメソッドã®ä¸­ã§ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ **注:** コンパイラー㯠$0 ã‚’åˆæœŸåŒ–ã—ã¾ã›ã‚“。 ã—ãŸãŒã£ã¦ã€`On Drag Over` フォームイベントを使用ã—ãŸã‚‰ã€ç›´ã¡ã« $0 ã‚’åˆæœŸåŒ–ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ãŸã¨ãˆã°: +- `On Drag Over` フォームイベントをå—ã‘入れるフォームオブジェクト - `On Drag Over` フォームイベントã®çµæžœã§ã‚ã‚‹ $0 パラメーター (å€é•·æ•´æ•°) ã¯ã€æ˜Žç¢ºã«å®šç¾©ã•れã¦ã„ãªã‘れã°ã‚³ãƒ³ãƒ‘イラーãŒåž‹ã‚’決定ã—ã¾ã™ã€‚ 定義ã™ã‚‹å ´åˆã¯ã€ã‚ªãƒ–ジェクトメソッドã®ä¸­ã§ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ **注:** コンパイラー㯠$0 ã‚’åˆæœŸåŒ–ã—ã¾ã›ã‚“。 ã—ãŸãŒã£ã¦ã€`On Drag Over` フォームイベントを使用ã—ãŸã‚‰ã€ç›´ã¡ã« $0 ã‚’åˆæœŸåŒ–ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ãŸã¨ãˆã°: ```4d C_LONGINT($0) @@ -174,82 +352,40 @@ C_TEXT($1;$2;$3;$4;$5;$6) End if ``` -## å¼•æ•°ã®æ¸¡ã—æ–¹: 値ã‹å‚ç…§ã‹ -引数を渡ã™ã¨ãã€4D ã¯å‘¼ã³å‡ºã—元メソッドã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ãã®å¼ã‚’評価ã—ã€**çµæžœã®å€¤** をサブルーãƒãƒ³ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã§ã‚ã‚‹ $1, $2 ... ã«æ¸¡ã—ã¾ã™ ([引数ã«ã¤ã„ã¦](#引数ã«ã¤ã„ã¦) å‚ç…§)。 ã“れらã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«æ ¼ç´ã•れã¦ã„ã‚‹ã®ã¯ã€å‘¼ã³å‡ºã—å…ƒã§ä½¿ç”¨ã•れã¦ã„るフィールドや変数ã€å¼ã§ã¯ãªãã€æ¸¡ã•れãŸå€¤ã®ã¿ã§ã™ã€‚ スコープãŒãƒ­ãƒ¼ã‚«ãƒ«ã«é™ã‚‰ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚µãƒ–ルーãƒãƒ³å†…ã§ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã®å€¤ã‚’変ãˆã¦ã‚‚ã€å‘¼ã³å‡ºã—元メソッドã«ã¯å½±éŸ¿ã‚りã¾ã›ã‚“。 ãŸã¨ãˆã°: -```4d - // MY_METHOD メソッド -DO_SOMETHING([People]Name) // [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ -ALERT([People]Name) +## 引数ã®åž‹é–“é•ã„ - // DO_SOMETHING メソッド - $1:=Uppercase($1) - ALERT($1) -``` - -`DO_SOMETHING` メソッドã«ã‚ˆã£ã¦è¡¨ç¤ºã•れãŸã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ "WILLIAMS" ã¨è¡¨ç¤ºã•れã€`MY_METHOD` メソッドã«ã‚ˆã£ã¦è¡¨ç¤ºã•れるアラートボックスã§ã¯ "williams" ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ `DO_SOMETHING` メソッド㯠$1 ã®å€¤ã‚’ローカルãªç¯„囲ã§å¤‰æ›´ã—ã¾ã—ãŸãŒã€ã“れ㯠`MY_METHOD` メソッドãŒã‚µãƒ–ルーãƒãƒ³ã«æ¸¡ã™å¼•æ•°ã¨ã—ã¦æŒ‡å®šã—㟠[People]Last Name フィールドã®å€¤ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 - -ã‚‚ã— `DO_SOMETHING` メソッド内ã§ãƒ•ィールドã®å€¤ã‚’変更ã—ãŸã„ã®ã§ã‚れã°ã€2通りã®ã‚„り方ãŒã‚りã¾ã™: - -1. サブルーãƒãƒ³ã«æ¸¡ã™å¼ã¨ã—ã¦ãƒ•ィールドã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: +é–“é•ã£ãŸåž‹ã®å¼•数を呼ã³å‡ºã™ã“ã¨ã¯ã€æ­£ã—ã„実行を妨ã’ã‚‹ [エラー](error-handling.md) ã¨ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’書ã„ãŸã¨ã—ã¾ã™: ```4d - // MY_METHOD メソッド - DO_SOMETHING(->[People]Name) // [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ - ALERT([People]Last Name) - - // DO_SOMETHING メソッド - $1->:=Uppercase($1->) - ALERT($1->) +// メソッド1 +#DECLARE($value : Text) ``` -ã“ã®ä¾‹ã§ã¯ã€å¼•æ•°ã¨ã—ã¦æŒ‡å®šã•れãŸå¼ã¯ãƒ•ィールドã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã§ã™ã€‚ ãã®ãŸã‚ã€`DO_SOMETHING` メソッド内ã«ãŠã„ã¦ã€$1 ã¯ãƒ•ィールドã®å€¤ã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã«ãªã£ã¦ã„ã¾ã™ã€‚ $1 引数ã«ã‚ˆã£ã¦ **å‚ç…§** ã•れる対象 (上記コード内ã§ã® $1->) ã¯ãƒ•ィールドãã®ã‚‚ã®ã§ã™ã€‚ ãã®çµæžœã€å‚ç…§ã•れã¦ã„る対象を変更ã™ã‚‹ã¨ã€ãã®å½±éŸ¿ã¯ã‚µãƒ–ルーãƒãƒ³ã®ã‚¹ã‚³ãƒ¼ãƒ—ã‚’è¶…ãˆã€å®Ÿéš›ã®ãƒ•ィールドも変更ã•れã¾ã™ã€‚ ã•ãã»ã©ã®ä¾‹é¡Œã«ãŠã„ã¦ã¯ã€ä¸¡æ–¹ã®ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã« "WILLIAMS" ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ - -2. `DO_SOMETHING` メソッド㫠"何ã‹ã•ã›ã‚‹" 代ã‚りã«ã€å€¤ã‚’è¿”ã™ã‚ˆã†ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’書ãç›´ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚³ãƒ¼ãƒ‰ã§ã™: - ```4d - // MY_METHOD メソッド - [People]Name:=DO_SOMETHING([People]Name) // ã‚‚ã¨ã® [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ - ALERT([People]Name) - - // DO_SOMETHING メソッド - $0:=Uppercase($1) - ALERT($0) +// メソッド2 +method1(42) // 型間é•ã„。期待ã•れるã®ã¯ãƒ†ã‚­ã‚¹ãƒˆ ``` -ã“ã®ã‚ˆã†ã«ã‚µãƒ–ルーãƒãƒ³ã®æˆ»ã‚Šå€¤ã‚’使ã†ã“ã¨ã‚’ "関数を使ã†" ã¨è¨€ã„ã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ [関数](#functions) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 +ã“ã®ã‚±ãƒ¼ã‚¹ã¯ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å¿œã˜ã¦ 4D ã§å‡¦ç†ã•れã¾ã™ã€‚ -### 特殊ケース: オブジェクトやコレクションã®å ´åˆ +- [コンパイル済ã¿ãƒ—ロジェクト](interpreted.md) ã§ã¯ã€å¯èƒ½ãªé™ã‚Šã‚³ãƒ³ãƒ‘イル時ã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ãれ以外ã®å ´åˆã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—時ã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ +- インタープリタープロジェクトã§ã¯: + + [åå‰ä»˜ãシンタックス](#åå‰ä»˜ã引数) (`#DECLARE` ã¾ãŸã¯ `Function`) を使用ã—ã¦å¼•æ•°ãŒå®£è¨€ã•れã¦ã„ã‚‹å ´åˆã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã—時ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + + [順番シンタックス](#順番引数) (`C_XXX`) を使用ã—ã¦å®£è¨€ã•れã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ©ãƒ¼ã¯ç™ºç”Ÿã›ãšã€å‘¼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯æœŸå¾…ã•れる型ã®ç©ºã®å€¤ã‚’å—ã‘å–りã¾ã™ã€‚ -オブジェクトやコレクションã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯å‚ç…§ (ã¤ã¾ã‚Šã€å†…部的㪠*ãƒã‚¤ãƒ³ã‚¿ãƒ¼*) を介ã—ãŸå½¢ã§ã®ã¿æ‰±ã‚れるã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ -ã—ãŸãŒã£ã¦ã€`$1ã€$2...` ã«ã¯ *値* ã§ã¯ãªã *å‚ç…§* ãŒæ ¼ç´ã•れã¾ã™ã€‚ `$1ã€$2...` ã®å€¤ã‚’サブルーãƒãƒ³å†…ã§å¤‰æ›´ã—ãŸå ´åˆã€ãã®å¤‰æ›´ã¯å…ƒã¨ãªã‚‹ã‚ªãƒ–ジェクトやコレクションãŒä½¿ç”¨ã•れã¦ã„ã‚‹ã¨ã“ã‚ã¸ã¨ä¼æ’­ã—ã¾ã™ã€‚ ã“れ㯠[ãƒã‚¤ãƒ³ã‚¿ãƒ¼](Concepts/dt_pointer.md#メソッドã®å¼•æ•°ã¨ã—ã¦ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼) ã«å¯¾ã™ã‚‹åŽŸç†ã¨åŒã˜ã‚‚ã®ã§ã™ãŒã€`$1ã€$2...` ã®ä½¿ç”¨ã«ã‚ãŸã£ã¦å‚照を外ã™å¿…è¦ã¯ã‚りã¾ã›ã‚“。 -次ã®ä¾‹ã§ã¯ã€`CreatePerson` メソッドã¯ã‚ªãƒ–ジェクトを作æˆã—ãŸã®ã¡ã€ãれを引数ã¨ã—㦠`ChangeAge` ã«æ¸¡ã—ã¾ã™: -```4d - // CreatePerson メソッド - C_OBJECT($person) - $person:=New object("Name";"Smith";"Age";40) - ChangeAge($person) - ALERT(String($person.Age)) -``` -`ChangeAge` メソッドã¯å—ã‘å–ã£ãŸã‚ªãƒ–ジェクト㮠Age 属性㫠10を加ãˆã¾ã™: +## 入力 / 出力変数 -```4d - //ChangeAge - C_OBJECT($1) - $1.Age:=$1.Age+10 - ALERT(String($1.Age)) -``` +ã“れらã®å¼•æ•° ($1, $2...) ã¯ã‚µãƒ–ルーãƒãƒ³å†…ã§ä»–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¨åŒæ§˜ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã—ãŸå¤‰æ•°ã®å€¤ã‚’変更ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’サブルーãƒãƒ³å†…ã§ä½¿ç”¨ã™ã‚‹å ´åˆ (例: `Find in field`)ã€$1, $2ãªã©ã‚’直接渡ã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã¾ãšæ¨™æº–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ç­‰ã«ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: $myvar:=$1)。 -`CreatePerson` メソッドを実行ã™ã‚‹ã¨ã€ã‚µãƒ–ルーãƒãƒ³ã«ãŠã„ã¦ã‚‚åŒã˜ã‚ªãƒ–ジェクトå‚ç…§ãŒæ‰±ã‚れã¦ã„ã‚‹ãŸã‚ã€ä¸¡æ–¹ã®ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã„㦠â€50†ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ -**4D Server:** "サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œ" オプションãŒä½¿ç”¨ã•れãŸå ´åˆãªã©ã€åŒã˜ãƒžã‚·ãƒ³ä¸Šã§å®Ÿè¡Œã•れãªã„メソッド間ã§å¼•æ•°ãŒæ¸¡ã•れる場åˆã€å‚照渡ã—ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€å‚ç…§ã®ä»£ã‚りã«ã‚ªãƒ–ジェクトã¨ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ”ーãŒå¼•æ•°ã¨ã—ã¦æ¸¡ã•れã¾ã™ã€‚ -## åå‰ä»˜ã引数 +## オブジェクトプロパティをåå‰ä»˜ã引数ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ 引数ã¨ã—ã¦ã‚ªãƒ–ジェクトを渡ã™ã“ã¨ã«ã‚ˆã£ã¦ **åå‰ä»˜ã引数** を扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ—ログラミング方法ã¯ã‚·ãƒ³ãƒ—ルã‹ã¤æŸ”軟ãªã ã‘ã§ãªãã€ã‚³ãƒ¼ãƒ‰ã®å¯èª­æ€§ã‚‚å‘上ã•ã›ã¾ã™ã€‚ @@ -257,7 +393,7 @@ ALERT([People]Name) ```4d // CreatePerson メソッド - C_OBJECT($person) + var $person : Object $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) ALERT(String($person.Age)) @@ -266,15 +402,14 @@ ALERT([People]Name) `ChangeAge` メソッドを次ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: ```4d - //ChangeAge - C_OBJECT($1;$para) + // ChangeAge メソッド + var $1; $para : Object $para:=$1 $para.Age:=$para.Age+10 ALERT($para.Name+" 㯠"+String($para.Age)+" æ­³ã§ã™ã€‚") ``` ã“れ㯠[ä»»æ„パラメーター](#ä»»æ„パラメーター) を指定ã™ã‚‹ã«ã‚ãŸã£ã¦éžå¸¸ã«ä¾¿åˆ©ãªæ–¹æ³•ã§ã™ (後述å‚ç…§)。 ã“ã®å ´åˆã€å¼•æ•°ã®ä¸è¶³ã¯æ¬¡ã®ã‚ˆã†ã«å¯¾å‡¦ã§ãã¾ã™: - - `Null` å€¤ã¨æ¯”較ã™ã‚‹ã“ã¨ã§ã€å¿…è¦ãªå¼•æ•°ãŒã™ã¹ã¦æä¾›ã•れã¦ã„ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ - 引数ã®å€¤ã‚’プリセットã—ã¾ã™ - 渡ã•れã¦ã„ãªã„引数ã¯ç©ºå€¤ã¨ã—ã¦æ‰±ã„ã¾ã™ @@ -282,13 +417,12 @@ ALERT([People]Name) 上述㮠`ChangeAge` メソッドã®ä¾‹ã§ã¯ã€Age ãŠã‚ˆã³Name プロパティã¯ã©ã¡ã‚‰ã‚‚å¿…é ˆã§ã‚ã‚‹ãŸã‚ã€å¼•数オブジェクトã«å«ã¾ã‚Œã¦ã„ãªã‘れã°ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ ã“れをé¿ã‘ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«è¨˜è¿°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ```4d - //ChangeAge - C_OBJECT($1;$para) + // ChangeAge メソッド + var $1; $para : Object $para:=$1 $para.Age:=Num($para.Age)+10 - ALERT(String($para.Name)+" 㯠"+String($para.Age)+" æ­³ã§ã™ã€‚") + ALERT(String($para.Name)+" 㯠"+String($para.Age)+"æ­³ã§ã™ã€‚") ``` - ã™ã‚‹ã¨ã€å¼•æ•°ãŒä¸è¶³ã—ã¦ã‚‚エラーã¯ç”Ÿæˆã•れãšã€ä¸¡æ–¹ãŒæ¬ è½ã—ãŸå ´åˆã®çµæžœã¯ " is 10 years old" ã¨ãªã£ã¦ã—ã¾ã†ã«ã›ã‚ˆã€ã„ãšã‚Œã®å¼•æ•°ã‚‚ä»»æ„ã¨ãªã‚Šã¾ã™ã€‚ åå‰ä»˜ã引数を利用ã™ã‚‹ã¨ã€ã‚¢ãƒ—リケーションã®ä¿å®ˆã‚„リファクタリングãŒç°¡å˜ã‹ã¤å®‰å…¨ã«ãŠã“ãªãˆã¾ã™ã€‚ ã•ãã»ã©ã®ä¾‹ã§ã€åŠ ç®—ã™ã‚‹å¹´æ•°ã‚’å ´åˆã«å¿œã˜ã¦å¤‰ãˆãŸã»ã†ãŒé©åˆ‡ã§ã‚ã‚‹ã¨ã€ã‚ã¨ã‹ã‚‰æ°—ã¥ã„ãŸã¨ã—ã¾ã™ã€‚ メソッドã®ãƒ‘ラメーターã¨ã—ã¦ã€åŠ ç®—å¹´æ•°ã‚’è¿½åŠ ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã“ã®å ´åˆã€æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: @@ -298,7 +432,7 @@ $person:=New object("Name";"Smith";"Age";40;"toAdd";10) ChangeAge($person) // ChangeAge メソッド -C_OBJECT($1;$para) +var $1;$para : Object $para:=$1 If ($para.toAdd=Null) $para.toAdd:=10 @@ -311,6 +445,8 @@ ALERT(String($para.Name)+" 㯠"+String($para.Age)+" æ­³ã§ã™ã€‚") åå‰ä»˜ã引数を使ã†ã¨ã€ã™ã¹ã¦ã®ãƒ‘ラメーターを任æ„ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 上ã®ä¾‹ã§ã¯ã™ã¹ã¦ã®ãƒ‘ラメーターãŒä»»æ„ã§ã€ã„ãšã‚Œã‚’指定ã—ã¦ã‚‚é †åºã¯ã‚りã¾ã›ã‚“。 + + ## ä»»æ„パラメーター *4D ランゲージリファレンス* ã«ãŠã„ã¦ã€ã‚³ãƒžãƒ³ãƒ‰ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ä¸­ã® { } 文字 (中括弧) ã¯ãã®å¼•æ•°ãŒçœç•¥å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€`ALERT (message{; okButtonTitle})` 㯠*okButtonTitle* ãŒçœç•¥ã§ãã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€æ¬¡ã®ã‚ˆã†ãªå‘¼ã³å‡ºã—æ–¹ãŒå¯èƒ½ã§ã™: @@ -320,9 +456,22 @@ ALERT("Are you sure?";"Yes I am") // 2ã¤ã®å¼•æ•° ALERT("Time is over") // 1ã¤ã®å¼•æ•° ``` -ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã‚‚åŒæ§˜ã«ã€åŒã˜åž‹ã®å¼•æ•°ã§ã‚れã°ã€å³å´ã«ä¸å®šæ•°ã®å¼•æ•°ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»»æ„パラメーターã®å•題ã¯ã€ãã‚Œã‚‰ãŒæŒ‡å®šã•れãªã„å ´åˆã¸ã®å¯¾å‡¦ãŒå¿…è¦ã ã¨ã„ã†ã“ã¨ã§ã™ã€‚欠è½ãŒã‚¨ãƒ©ãƒ¼ã«ç¹‹ãŒã£ã¦ã¯ã„ã‘ã¾ã›ã‚“。 使用ã•れãªã‹ã£ãŸãƒ‘ラメーターã«ãƒ‡ãƒ•ォルト値を代入ã™ã‚‹ã‚„り方ãŒåŠ¹æžœçš„ã§ã™ã€‚ +4Dメソッドや関数もã€ã“ã®ã‚ˆã†ãªä»»æ„パラメーターをå—ã‘入れã¾ã™ã€‚ ä»»æ„パラメーターã®å•題ã¯ã€ãã‚Œã‚‰ãŒæŒ‡å®šã•れãªã„å ´åˆã¸ã®å¯¾å‡¦ãŒå¿…è¦ã ã¨ã„ã†ã“ã¨ã§ã™ã€‚ デフォルトã§ã¯ã€å®£è¨€ã•れã¦ã„るよりも少ãªã„å¼•æ•°ã‚’ãƒ¡ã‚½ãƒƒãƒ‰ã‚„é–¢æ•°ã«æ¸¡ã—ãŸå ´åˆã€æŒ‡å®šã•れãªã‹ã£ãŸãƒ‘ラメーターã¯ã€[ãã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ãŸãƒ‡ãƒ•ォルト値](data-types.md#デフォルト値) ã¨ã—ã¦ã€å‘¼ã³å‡ºã•れãŸã‚³ãƒ¼ãƒ‰ã®ä¸­ã§å‡¦ç†ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d +// myClass クラス㮠"concate" 関数 +Function concate ($param1 : Text ; $param2 : Text)->$result : Text +$result:=$param1+" "+$param2 +``` +```4d + // 呼ã³å‡ºã—元メソッド + $class:=cs.myClass.new() + $class.concate("Hello") // "Hello " + $class.concate() // スペースã®ã¿: " " +``` + -> ä»»æ„パラメーターãŒå¿…è¦ãªå ´åˆã€[åå‰ä»˜ã引数](#åå‰ä»˜ã引数) を利用ã™ã‚‹ã¨åž‹ã®åˆ¶é™ãŒãªãã€æŸ”軟ã§ä¾¿åˆ©ã§ã™ã€‚ +> ä»»æ„パラメーターãŒå¿…è¦ãªå ´åˆã€[オブジェクトプロパティをåå‰ä»˜ã引数ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹](#オブジェクトプロパティをåå‰ä»˜ã引数ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹) ã¨åž‹ã®åˆ¶é™ãŒãªãã€æŸ”軟ã§ä¾¿åˆ©ã§ã™ã€‚ `Count parameters` コマンドを使用ã™ã‚‹ã¨ã€ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れãŸå¼•æ•°ã®æ•°ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€æ•°ã«å¿œã˜ã¦ç•°ãªã‚‹å‡¦ç†ã‚’ãŠã“ãªãˆã¾ã™ã€‚ @@ -333,85 +482,102 @@ ALERT("Time is over") // 1ã¤ã®å¼•æ•° // APPEND TEXT ( テキスト { ; テキスト { ; オブジェクト } } ) // APPEND TEXT ( メッセージ { ; パス { ; 4DWPエリア } } ) - C_TEXT($1;$2) - C_OBJECT($3) + Method($message : Text; $path : Text; $wpArea : Object) - ALERT($1) + ALERT($message) If(Count parameters>=3) - WP SET TEXT($3;$1;wk append) + WP SET TEXT($wpArea;$1;wk append) Else - If(Count parameters=2) - TEXT TO DOCUMENT($2;$1) + If(Count parameters>=2) + TEXT TO DOCUMENT($path;$message) End if - End if> + End if ``` - ã“ã®ãƒ—ロジェクトメソッドをアプリケーションã«è¿½åŠ ã—ãŸã‚ã¨ã¯ã€æ¬¡ã®ã‚ˆã†ã«å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: -```4d +```4d APPEND TEXT(vtSomeText) // メッセージを表示ã—ã¾ã™ APPEND TEXT(vtSomeText;$path) // メッセージを表示ã—ã¦ã€ $path ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«æ›¸ã出ã—ã¾ã™ APPEND TEXT(vtSomeText;"";$wpArea) // メッセージを表示ã—ã¦ã€ $wpArea ã®4D Write Pro ドキュメントã«è¿½è¨˜ã—ã¾ã™ ``` -## 引数ã®é–“接å‚ç…§ -プロジェクトメソッドãŒå—ã‘å–る引数ã¯ç›´æŽ¥çš„ã« $1, $2, ... ãªã©ã¨æŒ‡å®šã™ã‚‹ä»¥å¤–ã«ã‚‚ã€é–“接的㫠${ 数値変数 } ã¨ã„ã†å½¢ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れを **引数ã®é–“接å‚ç…§** ã¨ã„ã„ã¾ã™ã€‚ åŒã˜åž‹ã®ä¸å®šæ•°ã®å¼•æ•°ã‚’å—ã‘å–るメソッドã®å ´åˆã€`Count parameters` コマンドã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€ã“れらã®å¼•æ•°ã‚’ `For...End for` ループã¨å¼•数関節å‚ç…§ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -次ã®ä¾‹ã§ã¯ `SEND PACKETS` プロジェクトメソッドã¯ç¬¬1ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ™‚é–“ã‚’å—ã‘å–りã€ç¬¬2パラメーター以é™ã¯1以上ã®ãƒ†ã‚­ã‚¹ãƒˆã‚’å—ã‘å–りã¾ã™: -```4d - //SEND PACKETS プロジェクトメソッド - //SEND PACKETS ( 時間 ; テキスト { ; テキスト2... ; テキストN } ) - //SEND PACKETS ( docRef ; Data { ; Data2... ; DataN } ) +## å¼•æ•°ã®æ¸¡ã—æ–¹: 値ã‹å‚ç…§ã‹ - C_TIME($1) - C_TEXT(${2}) - C_LONGINT($vlPacket) +引数を渡ã™ã¨ãã€4D ã¯å‘¼ã³å‡ºã—元メソッドã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ãã®å¼ã‚’評価ã—ã€**çµæžœã®å€¤** をクラス関数ã¾ãŸã¯ã‚µãƒ–ルーãƒãƒ³ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«æ ¼ç´ã—ã¾ã™ã€‚ ã“れらã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã«æ ¼ç´ã•れã¦ã„ã‚‹ã®ã¯ã€å‘¼ã³å‡ºã—å…ƒã§ä½¿ç”¨ã•れã¦ã„るフィールドや変数ã€å¼ã§ã¯ãªãã€æ¸¡ã•れãŸå€¤ã®ã¿ã§ã™ã€‚ スコープãŒãƒ­ãƒ¼ã‚«ãƒ«ã«é™ã‚‰ã‚Œã¦ã„ã‚‹ãŸã‚ã€ã‚¯ãƒ©ã‚¹é–¢æ•° / サブルーãƒãƒ³å†…ã§ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã®å€¤ã‚’変ãˆã¦ã‚‚ã€å‘¼ã³å‡ºã—元メソッドã«ã¯å½±éŸ¿ã‚りã¾ã›ã‚“。 ãŸã¨ãˆã°: - For($vlPacket;2;Count parameters) - SEND PACKET($1;${$vlPacket}) - End for +```4d + // MY_METHOD メソッド +DO_SOMETHING([People]Name) // [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ +ALERT([People]Name) + + // DO_SOMETHING メソッド + $1:=Uppercase($1) + ALERT($1) ``` -引数ã®é–“接å‚ç…§ã¯ä»¥ä¸‹ã®æ¡ä»¶ã‚’守るã“ã¨ã«ã‚ˆã‚Šã€æ­£ã—ã動作ã—ã¾ã™: 引数ã®ä¸€éƒ¨ã®ã¿ã‚’間接å‚ç…§ã™ã‚‹å ´åˆã€ç›´æŽ¥å‚ç…§ã™ã‚‹å¼•æ•°ã®å¾Œã«é–“接å‚照引数をé…ç½®ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ メソッド内ã§ã€é–“接å‚ç…§ã¯${$i}ã®ã‚ˆã†ã«è¡¨ç¤ºã—ã¾ã™ã€‚$iã¯æ•°å€¤å¤‰æ•°ã§ã™ã€‚ ${$i}ã‚’ **ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメータ** (generic parameter) ã¨å‘¼ã³ã¾ã™ã€‚ +`DO_SOMETHING` メソッドã«ã‚ˆã£ã¦è¡¨ç¤ºã•れãŸã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ "WILLIAMS" ã¨è¡¨ç¤ºã•れã€`MY_METHOD` メソッドã«ã‚ˆã£ã¦è¡¨ç¤ºã•れるアラートボックスã§ã¯ "williams" ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ `DO_SOMETHING` メソッド㯠$1 ã®å€¤ã‚’ローカルãªç¯„囲ã§å¤‰æ›´ã—ã¾ã—ãŸãŒã€ã“れ㯠`MY_METHOD` メソッドãŒã‚µãƒ–ルーãƒãƒ³ã«æ¸¡ã™å¼•æ•°ã¨ã—ã¦æŒ‡å®šã—㟠[People]Last Name フィールドã®å€¤ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 -以下ã¯é–“接å‚ç…§ã®ä¾‹ã§ã™ã€‚å¼•æ•°ã®æ•°å€¤ã‚’åˆè¨ˆã—ãŸçµæžœã‚’ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã•れãŸè¡¨ç¤ºå½¢å¼ã§è¿”ã™ã‚ˆã†ãªé–¢æ•°ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ åˆè¨ˆã•ã‚Œã‚‹æ•°å€¤ã®æ•°ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã°ã‚Œã‚‹ãŸã³ã«å¤‰ã‚りã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯æ•°å€¤ã¨è¡¨ç¤ºå½¢å¼ã‚’引数ã¨ã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +ã‚‚ã— `DO_SOMETHING` メソッド内ã§ãƒ•ィールドã®å€¤ã‚’変更ã—ãŸã„ã®ã§ã‚れã°ã€2通りã®ã‚„り方ãŒã‚りã¾ã™: -ã“ã®é–¢æ•°ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¦å‘¼ã³å‡ºã—ã¾ã™: +1. サブルーãƒãƒ³ã«æ¸¡ã™å¼ã¨ã—ã¦ãƒ•ィールドã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: ```4d - Result:=MySum("##0.00";125,2;33,5;24) + // MY_METHOD メソッド + DO_SOMETHING(->[People]Name) // [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ + ALERT([People]Last Name) + // DO_SOMETHING メソッド + $1->:=Uppercase($1->) + ALERT($1->) ``` -ã“ã®å ´åˆã€æ•°å€¤ã‚’åˆè¨ˆã—ã€æŒ‡å®šã—ãŸå½¢å¼ã«ç·¨é›†ã•ã‚ŒãŸæ–‡å­—列 "182.70" ãŒè¿”ã•れã¾ã™ã€‚ 関数ã®å¼•æ•°ã¯æ­£ã—ã„é †åºã§æ¸¡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚最åˆã«è¡¨ç¤ºå½¢å¼ã€æ¬¡ã«æ•°å€¤ã§ã™ã€‚ +ã“ã®ä¾‹ã§ã¯ã€å¼•æ•°ã¨ã—ã¦æŒ‡å®šã•れãŸå¼ã¯ãƒ•ィールドã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã§ã™ã€‚ ãã®ãŸã‚ã€`DO_SOMETHING` メソッド内ã«ãŠã„ã¦ã€$1 ã¯ãƒ•ィールドã®å€¤ã§ã¯ãªãã€ãƒ•ィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã«ãªã£ã¦ã„ã¾ã™ã€‚ $1 引数ã«ã‚ˆã£ã¦ **å‚ç…§** ã•れる対象 (上記コード内ã§ã® $1->) ã¯ãƒ•ィールドãã®ã‚‚ã®ã§ã™ã€‚ ãã®çµæžœã€å‚ç…§ã•れã¦ã„る対象を変更ã™ã‚‹ã¨ã€ãã®å½±éŸ¿ã¯ã‚µãƒ–ルーãƒãƒ³ã®ã‚¹ã‚³ãƒ¼ãƒ—ã‚’è¶…ãˆã€å®Ÿéš›ã®ãƒ•ィールドも変更ã•れã¾ã™ã€‚ ã•ãã»ã©ã®ä¾‹é¡Œã«ãŠã„ã¦ã¯ã€ä¸¡æ–¹ã®ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã« "WILLIAMS" ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ -以下㯠`MySum` 関数ã§ã™: +2. `DO_SOMETHING` メソッド㫠"何ã‹ã•ã›ã‚‹" 代ã‚りã«ã€å€¤ã‚’è¿”ã™ã‚ˆã†ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’書ãç›´ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚³ãƒ¼ãƒ‰ã§ã™: ```4d - $Sum:=0 - For($i;2;Count parameters) - $Sum:=$Sum+${$i} - End for - $0:=String($Sum;$1) + // MY_METHOD メソッド + [People]Name:=DO_SOMETHING([People]Name) // ã‚‚ã¨ã® [People]Name ã®å€¤ãŒ "williams" ã ã¨ã—ã¾ã™ + ALERT([People]Name) + + // DO_SOMETHING メソッド + $0:=Uppercase($1) + ALERT($0) ``` -ã“ã®é–¢æ•°ã¯æ§˜ã€…ãªå‘¼ã³å‡ºã—æ–¹ãŒã§ãã¾ã™: +ã“ã®ã‚ˆã†ã«ã‚µãƒ–ルーãƒãƒ³ã®æˆ»ã‚Šå€¤ã‚’使ã†ã“ã¨ã‚’ "関数を使ã†" ã¨è¨€ã„ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [戻り値](#戻り値) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + + +### 特殊ケース: オブジェクトやコレクションã®å ´åˆ + +オブジェクトやコレクションã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯å‚ç…§ (ã¤ã¾ã‚Šã€å†…部的㪠*ãƒã‚¤ãƒ³ã‚¿ãƒ¼*) を介ã—ãŸå½¢ã§ã®ã¿æ‰±ã‚れるã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ + +ã—ãŸãŒã£ã¦ã€`$1ã€$2...` ã«ã¯ *値* ã§ã¯ãªã *å‚ç…§* ãŒæ ¼ç´ã•れã¾ã™ã€‚ `$1ã€$2...` ã®å€¤ã‚’サブルーãƒãƒ³å†…ã§å¤‰æ›´ã—ãŸå ´åˆã€ãã®å¤‰æ›´ã¯å…ƒã¨ãªã‚‹ã‚ªãƒ–ジェクトやコレクションãŒä½¿ç”¨ã•れã¦ã„ã‚‹ã¨ã“ã‚ã¸ã¨ä¼æ’­ã—ã¾ã™ã€‚ ã“れ㯠[ãƒã‚¤ãƒ³ã‚¿ãƒ¼](dt_pointer.md#メソッドã®å¼•æ•°ã¨ã—ã¦ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼) ã«å¯¾ã™ã‚‹åŽŸç†ã¨åŒã˜ã‚‚ã®ã§ã™ãŒã€`$1ã€$2...` ã®ä½¿ç”¨ã«ã‚ãŸã£ã¦å‚照を外ã™å¿…è¦ã¯ã‚りã¾ã›ã‚“。 + +次ã®ä¾‹ã§ã¯ã€`CreatePerson` メソッドã¯ã‚ªãƒ–ジェクトを作æˆã—ãŸã®ã¡ã€ãれを引数ã¨ã—㦠`ChangeAge` ã«æ¸¡ã—ã¾ã™: ```4d - Result:=MySum("##0.00";125,2;33,5;24) - Result:=MySum("000";1;18;4;23;17) + // CreatePerson メソッド + var $person : Object + $person:=New object("Name";"Smith";"Age";40) + ChangeAge($person) + ALERT(String($person.Age)) ``` -### ジェãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®å®£è¨€ - -ä»–ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã¨åŒæ§˜ã€ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã¯ã‚³ãƒ³ãƒ‘ã‚¤ãƒ©ãƒ¼ã«æŒ‡ç¤ºã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ãŸã ã—ã€æ›–昧ã«ãªã‚Šãã†ãªå ´åˆã‚„最é©åŒ–ã®ãŸã‚ã«å¿…è¦ãªå ´åˆã¯ コンパイラ支æŒå­ã« ${N} を渡ã™ã€ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (N ã¯æœ€åˆã®ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ãƒ‘ラメーターã®ç•ªå·ã§ã™): +`ChangeAge` メソッドã¯å—ã‘å–ã£ãŸã‚ªãƒ–ジェクト㮠Age 属性㫠10を加ãˆã¾ã™: ```4d - C_LONGINT(${4}) + // ChangeAge メソッド + #DECLARE ($person : Object) + $person.Age:=$person.Age+10 + ALERT(String($person.Age)) ``` -ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€4番目以é™ã«é–“接å‚ç…§ã•れるã™ã¹ã¦ã®å¼•æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒå€é•·æ•´æ•°ã§ã‚ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ $1ã€$2ã€$3ã«ã¯ã€ã„ã‹ãªã‚‹ãƒ‡ãƒ¼ã‚¿åž‹ã‚‚使用ã§ãã¾ã™ãŒã€ $2を間接å‚ç…§ã—ãŸå ´åˆã«ã¯ã€é–“接å‚ç…§ã®åž‹å®£è¨€ã®å½±éŸ¿ã‚’å—ã‘ã¾ã™ã€‚ ã“ã®ãŸã‚ã€ãŸã¨ãˆã° $2 ãŒå®Ÿæ•°ã§ã‚ã£ã¦ã‚‚ã€é–“接å‚ç…§ã•れれã°å€é•·æ•´æ•°ã¨è¦‹ãªã•れã¾ã™ã€‚ +`CreatePerson` メソッドを実行ã™ã‚‹ã¨ã€ã‚µãƒ–ルーãƒãƒ³ã«ãŠã„ã¦ã‚‚åŒã˜ã‚ªãƒ–ジェクトå‚ç…§ãŒæ‰±ã‚れã¦ã„ã‚‹ãŸã‚ã€ä¸¡æ–¹ã®ã‚¢ãƒ©ãƒ¼ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã„㦠â€50†ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ + +**4D Server:** "サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œ" オプションãŒä½¿ç”¨ã•れãŸå ´åˆãªã©ã€åŒã˜ãƒžã‚·ãƒ³ä¸Šã§å®Ÿè¡Œã•れãªã„メソッド間ã§å¼•æ•°ãŒæ¸¡ã•れる場åˆã€å‚照渡ã—ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ã€å‚ç…§ã®ä»£ã‚りã«ã‚ªãƒ–ジェクトã¨ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ”ーãŒå¼•æ•°ã¨ã—ã¦æ¸¡ã•れã¾ã™ã€‚ + -**注:** 宣言ã«ä½¿ç”¨ã™ã‚‹æ•°å€¤ã¯å¤‰æ•°ã§ã¯ãªãã€å®šæ•°ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/plug-ins.md b/website/translated_docs/ja/Concepts/plug-ins.md index 99e3dc89ba0759..4b01e8f9158c64 100644 --- a/website/translated_docs/ja/Concepts/plug-ins.md +++ b/website/translated_docs/ja/Concepts/plug-ins.md @@ -18,16 +18,15 @@ title: プラグイン プラグインã¨ã¯ã€4D 起動時ã«ãƒ­ãƒ¼ãƒ‰ã•れるコードã®ã“ã¨ã§ã™ã€‚ プラグインã¯ã€4D ã«æ©Ÿèƒ½ã‚’追加ã—ã¾ã™ã€‚ 通常ã€ãƒ—ラグインã¯: - - 4D ãŒã§ããªã„ã“ã¨ã‚’処ç†ã—ã¾ã™ (ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ç‰¹æœ‰ã®æŠ€è¡“ãªã©) - 4D ã ã‘ã§ã¯é›£ã—ã„ã“ã¨ã‚’実ç¾ã—ã¾ã™ - プラグインã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãƒã‚¤ãƒ³ãƒˆã®å½¢ã§ã®ã¿æä¾›ã•れã¦ã„る機能をæä¾›ã—ã¾ã™ プラグインã«ã¯é€šå¸¸è¤‡æ•°ã®ãƒ«ãƒ¼ãƒãƒ³ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ プラグインã¯å¤–部エリアをæ“作ã§ãã€å¤–部プロセスを実行ã§ãã¾ã™ã€‚ -- **プラグインルーãƒãƒ³** ã¨ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–言語 (通常㯠C ã‚ã‚‹ã„㯠C++) ã§æ›¸ã‹ã‚ŒãŸãƒ«ãƒ¼ãƒãƒ³ã§ã€ãªã‚“らã‹ã®å‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ +- **プラグインルーãƒãƒ³** ã¨ã¯ã€ãƒã‚¤ãƒ†ã‚£ãƒ–言語 (通常㯠C ã‚ã‚‹ã„㯠C++) ã§æ›¸ã‹ã‚ŒãŸãƒ«ãƒ¼ãƒãƒ³ã§ã€ãªã‚“らã‹ã®å‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ - **外部エリア** ã¨ã¯ãƒ•ォームã®ä¸€éƒ¨ã§ã€ã‚らゆるもã®ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã€å¿…è¦ã«å¿œã˜ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼æ“作をå—ã‘付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- **外部プロセス** ã¨ã¯ã€é€šå¸¸ã¯ãƒ«ãƒ¼ãƒ—å½¢å¼ã§å˜ç‹¬å®Ÿè¡Œã•れるプロセスã®ã“ã¨ã§ã™ã€‚ プロセスã®ã‚³ãƒ¼ãƒ‰ã¯ã™ã¹ã¦ãƒ—ラグインã«å±žã—ã¦ãŠã‚Šã€4D ã¯ãƒ—ロセスã«å¯¾ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€å—ä¿¡ã™ã‚‹ã ã‘ã§ã™ã€‚ +- **外部プロセス** ã¨ã¯ã€é€šå¸¸ã¯ãƒ«ãƒ¼ãƒ—å½¢å¼ã§å˜ç‹¬å®Ÿè¡Œã•れるプロセスã®ã“ã¨ã§ã™ã€‚ プロセスã®ã‚³ãƒ¼ãƒ‰ã¯ã™ã¹ã¦ãƒ—ラグインã«å±žã—ã¦ãŠã‚Šã€4D ã¯ãƒ—ロセスã«å¯¾ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€å—ä¿¡ã™ã‚‹ã ã‘ã§ã™ã€‚ ### é‡è¦ãªæ³¨è¨˜ @@ -48,14 +47,13 @@ Windows ãŠã‚ˆã³ macOS用㮠4Dプラグインã¯ã€â€œPluginName.bundle†フ Plugins フォルダー㯠2ã¤ã®ç•°ãªã‚‹å ´æ‰€ã«é…ç½®ã§ãã¾ã™: -- 4D実行アプリケーションレベル: +- 4D実行アプリケーションレベル: - Windows: .exeファイルã¨åŒéšŽå±¤ - - macOS: アプリケーションパッケージ内㮠Contentsフォルダーã®ç›´ä¸‹ã€‚ - ã“ã®å ´åˆã€ã“ã®ã‚¢ãƒ—リケーションã§é–‹ã‹ã‚Œã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ—ラグインを利用ã§ãã¾ã™ã€‚ -- データベースストラクãƒãƒ£ãƒ¼ãƒ•ァイルã¨åŒéšŽå±¤: ã“ã®å ´åˆã€ãƒ—ラグインã¯å½“該データベースã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + - macOS: アプリケーションパッケージ内㮠Contentsフォルダーã®ç›´ä¸‹ã€‚ ã“ã®å ´åˆã€ã“ã®ã‚¢ãƒ—リケーションã§é–‹ã‹ã‚Œã‚‹ã™ã¹ã¦ã®ãƒ—ロジェクトã‹ã‚‰ãƒ—ラグインを利用ã§ãã¾ã™ã€‚ +- Project フォルダーã¨åŒéšŽå±¤: ã“ã®å ´åˆã€ãƒ—ラグインã¯å½“該プロジェクトã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ 場所ã®é¸æŠžã¯ãƒ—ラグインをã©ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã‹ã«ã‚ˆã£ã¦æ±ºå®šã—ã¾ã™ã€‚ åŒã˜ãƒ—ラグインãŒä¸¡æ–¹ã®å ´æ‰€ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹å ´åˆã€4Dã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨åŒéšŽå±¤ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸã‚‚ã®ã®ã¿ã‚’ロードã—ã¾ã™ã€‚ コンパイルã•れã€4D Volume Desktop ãŒãƒžãƒ¼ã‚¸ã•れãŸã‚¢ãƒ—リケーションã§ã¯ã€åŒã˜ãƒ—ラグインã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒè¤‡æ•°å­˜åœ¨ã™ã‚‹å ´åˆã€ã‚¢ãƒ—リケーションを開ãã“ã¨ãŒã§ãã¾ã›ã‚“。 -プラグイン㯠4D 起動時ã«ãƒ­ãƒ¼ãƒ‰ã•れるã®ã§ã€ã“れらをインストールã™ã‚‹éš›ã«ã¯ 4Dアプリケーションを終了ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ インストールãŒçµ‚了ã—ãŸã‚‰ 4D ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ãã¾ã™ã€‚ プラグインã®åˆ©ç”¨ã«ç‰¹åˆ¥ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ãªå ´åˆã€ãƒ—ラグインã¯ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ãŒã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’インストールã™ã‚‹ã¾ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 \ No newline at end of file +プラグイン㯠4D 起動時ã«ãƒ­ãƒ¼ãƒ‰ã•れるã®ã§ã€ã“れらをインストールã™ã‚‹éš›ã«ã¯ 4Dアプリケーションを終了ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ インストールãŒçµ‚了ã—ãŸã‚‰ 4D ã§ãƒ—ロジェクトを開ãã¾ã™ã€‚ プラグインã®åˆ©ç”¨ã«ç‰¹åˆ¥ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ãªå ´åˆã€ãƒ—ラグインã¯ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ãŒã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’インストールã™ã‚‹ã¾ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 \ No newline at end of file diff --git a/website/translated_docs/ja/Concepts/quick-tour.md b/website/translated_docs/ja/Concepts/quick-tour.md index 1da5a46cf68313..e47007689353b9 100644 --- a/website/translated_docs/ja/Concepts/quick-tour.md +++ b/website/translated_docs/ja/Concepts/quick-tour.md @@ -6,7 +6,7 @@ sidebar_label: æ¦‚è¦ 4D ランゲージを使用ã—㦠"Hello, world!" メッセージを表示ã™ã‚‹ã«ã¯è¤‡æ•°ã®æ–¹æ³•ãŒã‚りã¾ã™ã€‚ 一番簡å˜ãªæ–¹æ³•ã¯ãŠãらãã€ãƒ—ロジェクトメソッドã«ã‚³ãƒ¼ãƒ‰ã‚’1è¡Œã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãやり方ã§ã™: -```4d +```4d ALERT("Hello, World!") ``` @@ -16,6 +16,7 @@ ALERT("Hello, World!") ã‚ã‚‹ã„ã¯ã€ãƒ•ォーム内ã®ãƒœã‚¿ãƒ³ã«ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’付ã‘ãŸå ´åˆã€ãƒ•ォームを実行ã—ãŸçŠ¶æ…‹ã§ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ãã®éƒ½åº¦ã‚¢ãƒ©ãƒ¼ãƒˆãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã„ãšã‚Œã®æ–¹æ³•ã§ã‚‚ã€å‰è¿°ã®1行ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã ã‘ã§ç›®çš„锿ˆã§ã™ï¼ + ## 値ã®ä»£å…¥ 変数ã€ãƒ•ィールドã€é…列è¦ç´ ãªã©ã‚’対象ã«ã€ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã—ãŸã‚Šã€æ ¼ç´ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’別ã®å¯¾è±¡ã«ã‚³ãƒ”ーã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 変数ã«ãƒ‡ãƒ¼ã‚¿ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ã‚’ã€å¤‰æ•°ã«ãƒ‡ãƒ¼ã‚¿ã‚’代入ã™ã‚‹ã¨è¨€ã„ã€ä»£å…¥æ¼”ç®—å­ (:=) を使ã£ã¦ãŠã“ãªã„ã¾ã™ã€‚ 代入演算å­ã¯ãƒ•ィールドやé…列è¦ç´ ã«å¯¾ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’代入ã™ã‚‹å ´åˆã«ã‚‚使ã„ã¾ã™ã€‚ @@ -48,17 +49,18 @@ var myPerson : cs.Person // Person ユーザークラスã®å¤‰æ•° ``` + 推奨ã¯ã•れã¾ã›ã‚“ãŒã€å¤‰æ•°ã‚’使用ã™ã‚‹ã“ã¨ã§å®£è¨€ã™ã‚‹ã“ã¨ã‚‚ã§ãã€å¿…ãšã—ã‚‚æ­£å¼ã«å®£è¨€ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ãŸã¨ãˆã°ã€ä»Šæ—¥ã®æ—¥ä»˜ã«30日足ã—ãŸå€¤ã‚’æ ¼ç´ã—ãŸå¤‰æ•°ãŒæ¬²ã—ã„å ´åˆã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: ```4d MyOtherDate:=Current date+30 ``` -上ã®ã‚³ãƒ¼ãƒ‰ã¯ "MyOtherDate ã«ã€ç¾åœ¨ã®æ—¥ä»˜ã«30日を加算ã—ãŸå€¤ã‚’代入ã—ã¾ã™" ã¨ã„ã†æ„味ã§ã™ã€‚ã“ã®1行ã§å¤‰æ•°ãŒå®£è¨€ã•れã€å¤‰æ•°ã« (ä»®ã®) データ型ã¨ãƒ‡ãƒ¼ã‚¿ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ä»£å…¥ã«ã‚ˆã£ã¦å®£è¨€ã•れãŸå¤‰æ•°ã¯ãƒ‡ãƒ¼ã‚¿åž‹ãŒè¦å®šã•れã¦ã„ãªã„ã¨è§£é‡ˆã•れã€ã‚³ãƒ¼ãƒ‰ã®é•ã†è¡Œã§ã¯åˆ¥ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã‚’代入ã™ã‚‹ã“ã¨ã‚‚ã§ãã€ãã®éš›ã«ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã‚’å‹•çš„ã«å¤‰åŒ–ã•ã›ã¾ã™ã€‚ `var` ã«ã‚ˆã£ã¦å®£è¨€ã•れãŸå¤‰æ•°ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã‚’変化ã•ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 [コンパイルモード](interpreted.md) ã«ãŠã„ã¦ã¯ã€ãã®å®£è¨€æ–¹æ³•ã«ã‹ã‹ã‚らãšã€å¤‰æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 +上ã®ã‚³ãƒ¼ãƒ‰ã¯ "MyOtherDate ã«ã€ç¾åœ¨ã®æ—¥ä»˜ã«30日を加算ã—ãŸå€¤ã‚’代入ã—ã¾ã™" ã¨ã„ã†æ„味ã§ã™ã€‚ ã“ã®1行ã§å¤‰æ•°ãŒå®£è¨€ã•れã€å¤‰æ•°ã« (ä»®ã®) データ型ã¨ãƒ‡ãƒ¼ã‚¿ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ä»£å…¥ã«ã‚ˆã£ã¦å®£è¨€ã•れãŸå¤‰æ•°ã¯ãƒ‡ãƒ¼ã‚¿åž‹ãŒè¦å®šã•れã¦ã„ãªã„ã¨è§£é‡ˆã•れã€ã‚³ãƒ¼ãƒ‰ã®é•ã†è¡Œã§ã¯åˆ¥ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å€¤ã‚’代入ã™ã‚‹ã“ã¨ã‚‚ã§ãã€ãã®éš›ã«ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã‚’å‹•çš„ã«å¤‰åŒ–ã•ã›ã¾ã™ã€‚ `var` ã«ã‚ˆã£ã¦å®£è¨€ã•れãŸå¤‰æ•°ã¯ãƒ‡ãƒ¼ã‚¿åž‹ã‚’変化ã•ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 [コンパイルモード](interpreted.md) ã«ãŠã„ã¦ã¯ã€ãã®å®£è¨€æ–¹æ³•ã«ã‹ã‹ã‚らãšã€å¤‰æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 ## コマンド -4D コマンドã¨ã¯ã€å‡¦ç†ã‚’実行ã™ã‚‹ãŸã‚ã« 4D ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„る命令文ã®ã“ã¨ã§ã™ã€‚ ã™ã¹ã¦ã® 4D コマンドã€ãŸã¨ãˆã° `CREATE RECORD` ã‚„ `ALERT` ãªã©ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ†ãƒ¼ãƒžåˆ¥ã« *4D ランゲージリファレンス* ã«è¨˜è¼‰ã•れã¦ã„ã¾ã™ã€‚ コマンドã«å¼•数を渡ã™å ´åˆã¯ã€ã‚³ãƒžãƒ³ãƒ‰åã®å¾Œã®æ‹¬å¼§ () ã«å¼•数を入れã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ 例: +4D コマンドã¨ã¯ã€å‡¦ç†ã‚’実行ã™ã‚‹ãŸã‚ã« 4D ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„る命令文ã®ã“ã¨ã§ã™ã€‚ ã™ã¹ã¦ã® 4D コマンドã€ãŸã¨ãˆã° `CREATE RECORD` ã‚„ `ALERT` ãªã©ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ†ãƒ¼ãƒžåˆ¥ã« _4D ランゲージリファレンス_ ã«è¨˜è¼‰ã•れã¦ã„ã¾ã™ã€‚ コマンドã«å¼•数を渡ã™å ´åˆã¯ã€ã‚³ãƒžãƒ³ãƒ‰åã®å¾Œã®æ‹¬å¼§ () ã«å¼•数を入れã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ (;) ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ 例: ```4d COPY DOCUMENT("folder1\\name1";"folder2\\" ; "new") @@ -88,10 +90,9 @@ PDF REMOVE PAGE(path;page) svgRef:=SVG_New objectRef:=SVG_New_arc(svgRef;100;100;90;90;180) ``` - 4D SVG 㯠4D ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ -## 定数 +## 定数 4D ã§ã¯å¤šãã®å®šç¾©æ¸ˆå®šæ•°ãŒç”¨æ„ã•れã¦ãŠã‚Šã€ãれらã®å€¤ã¯åå‰ã«ã‚ˆã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€`Read Mode` ã¯å®šæ•°ã§ã€ãã®å€¤ã¯ 2 ã§ã™ã€‚ メソッドエディターã«ãŠã„ã¦ã€å®šç¾©æ¸ˆå®šæ•°ã¯ãƒ‡ãƒ•ォルトã§ä¸‹ç·šä»˜ãã§è¡¨ç¤ºã•れã¾ã™ã€‚ 定義済ã¿ã®å®šæ•°ã«ã‚ˆã£ã¦ã€ã‚ˆã‚Šå¯èª­æ€§ã®é«˜ã„コードを書ãã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -135,6 +136,7 @@ ALERT($myText) //"HELLO" $0:=Uppercase($1) ``` + ## データタイプ 4D ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã§æ‰±ã†ãƒ‡ãƒ¼ã‚¿ã«ã¯ã„ãã¤ã‹ã®ç¨®åˆ¥ãŒã‚りã€ã“れらã®ãƒ‡ãƒ¼ã‚¿ç¨®åˆ¥ã‚’ "データタイプ" ã¨å‘¼ã³ã¾ã™ã€‚ 基本ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ— (æ–‡å­—ã€æ•°å€¤ã€æ—¥ä»˜ã€æ™‚é–“ã€ãƒ–ールã€ãƒ”クãƒãƒ£ãƒ¼ã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã€é…列) ã¨æ··åˆåž‹ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ— (BLOBã€ã‚ªãƒ–ジェクトã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ãŒã‚りã¾ã™ã€‚ @@ -149,7 +151,7 @@ $0:=Uppercase($1) [Products]Part_Number:=String(Number)+"abc" ``` -数値変数 *Number* ã®å€¤ãŒ17ã§ã‚れã°ã€*[Products]Part_Number* ã« "17abc" ã¨ã„ã†æ–‡å­—列ãŒä»£å…¥ã•れã¾ã™ã€‚ +数値変数 _Number_ ã®å€¤ãŒ17ã§ã‚れã°ã€_[Products]Part_Number_ ã« "17abc" ã¨ã„ã†æ–‡å­—列ãŒä»£å…¥ã•れã¾ã™ã€‚ データタイプã«ã¤ã„ã¦ã¯ [データタイプ](Concepts/data-types.md) ã®ç¯€ã§è©³ã—ã説明ã—ã¦ã„ã¾ã™ã€‚ @@ -175,10 +177,11 @@ $vAge:=employee.children[2].age オブジェクトã®ãƒ—ロパティ値ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ (フォーミュラ) をカプセル化ã—ãŸã‚ªãƒ–ジェクトã§ã‚ã‚‹å ´åˆã«ã¯ã€ãƒ—ロパティåã®å¾Œã«æ‹¬å¼§ ( ) ã‚’ã¤ã‘ã‚‹ã“ã¨ã§å®Ÿè¡Œã§ãã¾ã™: - $f:=New object - $f.message:=New formula(ALERT("Hello world!")) - $f.message() // "Hello world!" を表示ã—ã¾ã™ - +``` +$f:=New object +$f.message:=New formula(ALERT("Hello world!")) +$f.message() // "Hello world!" を表示ã—ã¾ã™ +``` コレクションã®è¦ç´ ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã¯ã€å¤§ã‚«ãƒƒã‚³ã§ããã£ãŸè¦ç´ ç•ªå·ã‚’渡ã—ã¾ã™: @@ -194,14 +197,14 @@ myColl[3] // コレクションã®4番目ã®è¦ç´ ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ (0 ã‚るメソッドã«ãŠã„ã¦ã€ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ã«ã¯ã€*クラスストア* (`cs`) よりユーザークラスを呼ã³å‡ºã—ã¦ã€`new()` メンãƒãƒ¼é–¢æ•°ã‚’使ã„ã¾ã™ã€‚ 引数を渡ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -```4d +```4d // 4D メソッド内 $o:=cs.myClass.new() ``` `myClass` クラスメソッド内ã§ã¯ã€*methodName* クラスメンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’宣言ã™ã‚‹ã®ã« `Function ` ステートメントを使ã„ã¾ã™ã€‚ ã»ã‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚ˆã†ã«ã€ã‚¯ãƒ©ã‚¹ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•°ã‚’å—ã‘å–ã£ãŸã‚Šã€å€¤ã‚’è¿”ã™ã“ã¨ãŒã§ãã€ã‚ªãƒ–ジェクトインスタンスã¨ã—㦠`This` を使ãˆã¾ã™ã€‚ -```4d +```4d // myClass.4dm ファイル内 Function hello C_TEXT($0) @@ -219,7 +222,7 @@ $message:=$o.myClass.hello() `Class constructor` キーワードを使用ã—ã¦ã‚ªãƒ–ジェクトã®ãƒ—ロパティを宣言ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (ä»»æ„)。 -```4d +```4d // Rectangle.4dm ファイル内 Class constructor C_LONGINT($1;$2) @@ -230,7 +233,7 @@ This.name:="Rectangle" クラスã¯ã»ã‹ã®ã‚¯ãƒ©ã‚¹ã‹ã‚‰ç¶™æ‰¿ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: `Class extends `。 ã¾ãŸã€`Super` コマンドを使ã£ã¦ã€ã‚¹ãƒ¼ãƒ‘ークラスを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: -```4d +```4d // Square.4dm ファイル内 Class extends Rectangle @@ -244,8 +247,8 @@ Super($1;$1) This.name:="Square" ``` -## æ¼”ç®—å­ +## æ¼”ç®—å­ ãƒ—ãƒ­ã‚°ãƒ©ãƒŸãƒ³ã‚°è¨€èªžã‚’ä½¿ç”¨ã™ã‚‹éš›ã«ã€ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆã¯éžå¸¸ã«ç¨€ã§ã™ã€‚ データを加工ã€ã¾ãŸã¯ä½•らã‹ã®ç›®çš„ã®ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã»ã¨ã‚“ã©ã§ã™ã€‚ ãã†ã„ã£ãŸè¨ˆç®—ã¯æ¼”ç®—å­ã‚’使ã£ã¦ãŠã“ãªã„ã¾ã™ã€‚ ä¸€èˆ¬çš„ã«æ¼”ç®—å­ã¨ã¯ã€2ã¤ã®ãƒ‡ãƒ¼ã‚¿ã‚’ã‚‚ã¨ã«å‡¦ç†ã‚’ãŠã“ãªã„ã€1ã¤ã®æ–°ã—ã„データを生æˆã—ã¾ã™ã€‚ 日常的ã«ä½¿ç”¨ã•れã¦ã„る演算å­ã‚‚多ãã‚りã¾ã™ã€‚ 例ãˆã°ã€1 + 2 ã¨ã„ã†å¼ã¯åŠ ç®—æ¼”ç®—å­ï¼ˆãƒ—ラス記å·ï¼‰ã‚’使用ã—ã€2ã¤ã®æ•°å€¤ã‚’è¶³ã—åˆã‚ã›ã¦ã€3ã¨ã„ã†çµæžœã‚’è¿”ã—ã¾ã™ã€‚ 以下ã«ã€ã‚ˆã知られã¦ã„ã‚‹ 4ã¤ã®æ¼”ç®—å­ã‚’示ã—ã¾ã™ã€‚ | æ¼”ç®—å­ | æ¼”ç®—å­ | 例題 | @@ -255,16 +258,15 @@ This.name:="Square" | * | ä¹—ç®— (ã‹ã‘ç®—) | 2 * 3 ã®çµæžœã¯ 6 | | / | 除算 (割り算) | 6 / 2 ã®çµæžœã¯ 3 | - 数値演算å­ã¯ã€ä½¿ç”¨å¯èƒ½ãªæ¼”ç®—å­ã®ã†ã¡ã® 1種ã«ã™ãŽã¾ã›ã‚“。 4Dã¯ã€æ•°å€¤ãƒ»ãƒ†ã‚­ã‚¹ãƒˆãƒ»æ—¥ä»˜ãƒ»ãƒ”クãƒãƒ£ãƒ¼ç­‰ã€ç•°ãªã‚‹ã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ãŸã‚ã«ã€å„ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã§æ¼”算を実行ã™ã‚‹ãŸã‚ã®æ¼”ç®—å­ã‚’å‚™ãˆã¦ã„ã¾ã™ã€‚ 対象ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ã€åŒã˜è¨˜å·ãŒç•°ãªã‚‹å‡¦ç†ã«ä½¿ç”¨ã•れる場åˆãŒã‚りã¾ã™ã€‚ 例ãˆã°ã€ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ãƒ—ãƒ©ã‚¹è¨˜å· (+) ã¯ä¸‹è¨˜ã®ã‚ˆã†ã«ç•°ãªã‚‹æ¼”算を実行ã—ã¾ã™: -| データタイプ | æ¼”ç®—å­ | 例題 | -| ------ | -------- | --------------------------------------------------------- | -| 数値 | 加算 (è¶³ã—ç®—) | 1 + 2 ã¯æ•°å€¤ã‚’加算ã—ã€çµæžœã¯ 3 ã§ã™ã€‚ | -| 文字列 | é€£çµ (çµåˆ) | "ã¿ãªã•ã‚“" + "ã“ã‚“ã«ã¡ã¯" ã¯æ–‡å­—ã‚’é€£çµ (çµåˆ) ã—ã€çµæžœã¯ "ã¿ãªã•ã‚“ã“ã‚“ã«ã¡ã¯" ã§ã™ã€‚ | -| æ—¥ä»˜ã¨æ•°å€¤ | 日付ã®åŠ ç®— | !2006/12/4! + 20 ã¯ã€2006å¹´12月4日㫠20日を加算ã—ã€çµæžœã¯ 2006å¹´12月24æ—¥ã§ã™ã€‚ | +| データタイプ | æ¼”ç®—å­ | 例題 | +| ------ | -------- | ---------------------------------------------------------- | +| 数値 | 加算 (è¶³ã—ç®—) | 1 + 2 ã¯æ•°å€¤ã‚’加算ã—ã€çµæžœã¯ 3 ã§ã™ã€‚ | +| String | é€£çµ (çµåˆ) | "ã¿ãªã•ã‚“" + "ã“ã‚“ã«ã¡ã¯" ã¯æ–‡å­—ã‚’é€£çµ (çµåˆ) ã—ã€çµæžœã¯ "ã¿ãªã•ã‚“ã“ã‚“ã«ã¡ã¯" ã§ã™ã€‚ | +| æ—¥ä»˜ã¨æ•°å€¤ | 日付ã®åŠ ç®— | !2006/12/4! + 20 ã¯ã€2006å¹´12月4日㫠20日を加算ã—ã€çµæžœã¯ 2006å¹´12月24æ—¥ã§ã™ã€‚ | ## å¼ @@ -273,7 +275,7 @@ This.name:="Square" コマンド・演算å­ãƒ»å¤‰æ•°ãƒ»ãƒ•ィールド・オブジェクトプロパティ・コレクションè¦ç´ ç­‰ã€è¤‡æ•°ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®è¦ç´ ã‚’組ã¿åˆã‚ã›ã¦å¼ã¯æ§‹æˆã•れã¾ã™ã€‚ å¼ã«ã‚ˆã‚Šã€ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ (メソッド㮠1文や 1行) ã‚’æ§‹æˆã—ã¾ã™ã€‚ データãŒå¿…è¦ãªã¨ãã€å¼ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ -å¼ãŒå˜ç‹¬ã§ä½¿ã‚れるã“ã¨ã¯ã»ã¨ã‚“ã©ã‚りã¾ã›ã‚“ãŒã€å˜ç‹¬ã§ä½¿ç”¨ã§ãã‚‹å ´åˆãŒã„ãã¤ã‹ã‚りã¾ã™ : +å¼ãŒå˜ç‹¬ã§ä½¿ã‚れるã“ã¨ã¯ã»ã¨ã‚“ã©ã‚りã¾ã›ã‚“ãŒã€ å˜ç‹¬ã§ä½¿ç”¨ã§ãã‚‹å ´åˆãŒã„ãã¤ã‹ã‚りã¾ã™ : - フォーミュラエディター (フォーミュラã«ã‚ˆã‚‹ã‚¯ã‚¨ãƒªã‚„ä¸¦ã¹æ›¿ãˆãªã©) - `EXECUTE FORMULA` コマンド @@ -281,41 +283,40 @@ This.name:="Square" - デãƒãƒƒã‚¬ãƒ¼å†…ã§å¼ã®å€¤ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ - クイックレãƒãƒ¼ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã‚«ãƒ©ãƒ ã«ãƒ•ォーミュラを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ -### å¼ã®ã‚¿ã‚¤ãƒ— +### å¼ã®ã‚¿ã‚¤ãƒ— 生æˆã™ã‚‹å€¤ã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ã€å¼ã®ã‚¿ã‚¤ãƒ—を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å¼ã®ã‚¿ã‚¤ãƒ—ã¯è¤‡æ•°ã‚りã¾ã™ã€‚ 様々ãªã‚¿ã‚¤ãƒ—ã®å¼ã®ä¾‹ã‚’以下ã«ç¤ºã—ã¾ã™ã€‚ -| å¼ | åž‹ | 説明 | -| --------------------------- | ----------- | ------------------------------------------------------------------------------- | -| "ã“ã‚“ã«ã¡ã¯" | 文字列 | ã“ã‚Œã¯æ–‡å­—列定数 "ã“ã‚“ã«ã¡ã¯" ã§ã™ã€‚ 文字列定数ã§ã‚ã‚‹ã“ã¨ã‚’表ã™ãŸã‚ã«äºŒé‡å¼•用符ãŒå¿…è¦ã§ã™ã€‚ | -| "ã¿ãªã•ã‚“" + "ã“ã‚“ã«ã¡ã¯" | 文字列 | 2ã¤ã®æ–‡å­—列 "ã¿ãªã•ã‚“" 㨠"ã“ã‚“ã«ã¡ã¯" ㌠+ 演算å­ã«ã‚ˆã‚Šçµåˆã•れ〠"ã¿ãªã•ã‚“ã“ã‚“ã«ã¡ã¯" ã‚’è¿”ã—ã¾ã™ã€‚ | -| [People]Name + "様" | 文字列 | 2ã¤ã®æ–‡å­—列ã®çµåˆã§ã™ã€‚ [People]Name ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨æ–‡å­—列 "様" ãŒçµåˆã•れã¾ã™ã€‚ フィールドã®å€¤ãŒ "å°æž—" ã®å ´åˆã€"å°æž—様" ã‚’è¿”ã—ã¾ã™ã€‚ | -| Uppercase ("smith") | 文字列 | ã“ã®å¼ã¯ `Uppercase` コマンドを使用ã—ã¦ã€æ–‡å­—列 "smith" を英大文字ã«å¤‰æ›ã—ã¾ã™ã€‚ ãã—㦠"SMITH" ã‚’è¿”ã—ã¾ã™ã€‚ | -| 4 | 数値 | ã“ã‚Œã¯æ•°å€¤å®šæ•° 4ã§ã™ã€‚ | -| 4 * 2 | 数値 | 2ã¤ã®æ•°å€¤ã€4 㨠2 ã®ä¹—ç®—ã§ã™ã€‚乗算演算å­ã® (*) を使用ã—ã¦ã„ã¾ã™ã€‚ 数値㮠8ã‚’è¿”ã—ã¾ã™ã€‚ | -| myButton | 数値 | ã“れã¯ãƒœã‚¿ãƒ³ã«ç´ã¥ã‘られãŸå¤‰æ•°ã§ã™ã€‚ ボタンã®ç¾åœ¨ã®å€¤ã‚’è¿”ã—ã¾ã™: クリックã•れãŸå ´åˆã« 1ã€ãれ以外㯠0 ã‚’è¿”ã—ã¾ã™ã€‚ | -| !06/12/24! ã¾ãŸã¯ !2006/12/24! | 日付 | ã“ã®å¼ã¯æ—¥ä»˜å®šæ•°ã§ 2006å¹´12月24日を表ã—ã¾ã™ã€‚ | -| Current date + 30 | 日付 | ã“ã‚Œã¯æ—¥ä»˜ã®è¨ˆç®—ã§ã™ã€‚`Current date` コマンドã¯ç¾åœ¨ã®æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ ç¾åœ¨ã®æ—¥ä»˜ã« 30日を加ãˆãŸæ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ | -| ?8:05:30? | 時間 | ã“ã‚Œã¯æ™‚間定数ã§ã€8時5分30秒を表ã—ã¾ã™ã€‚ | -| ?2:03:04? + ?1:02:03? | 時間 | 2ã¤ã®æ™‚é–“ã®è¶³ã—ç®—ã‚’ãŠã“ãªã„ã€3時5分7ç§’ã‚’è¿”ã—ã¾ã™ã€‚ | -| True | ブール | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ–ール値ã®TRUE (真) ã‚’è¿”ã—ã¾ã™ã€‚ | -| 10 # 20 | ブール | ã“れ㯠2ã¤ã®æ•°å€¤ã®è«–ç†æ¯”較ã§ã™ã€‚ #記å·ã¯ã€"ç­‰ã—ããªã„" を表ã—ã¾ã™ã€‚ 10ã¨20㯠"ç­‰ã—ããªã„" ãŸã‚ã€ã“ã®å¼ã¯ TRUE (真) ã‚’è¿”ã—ã¾ã™ã€‚ | -| "ABC" = "XYZ" | ブール | ã“ã‚Œã¯æ–‡å­—列ã®è«–ç†æ¯”較ã§ã™ã€‚ 文字列ã¯ç­‰ã—ããªã„ãŸã‚ã€å¼ã¯ FALSE (å½) ã‚’è¿”ã—ã¾ã™ã€‚ | -| My Picture + 50 | ピクãƒãƒ£ãƒ¼ | ã“ã®å¼ã¯ My Picture 変数ã«å…¥ã£ã¦ã„るピクãƒãƒ£ãƒ¼ã‚’å³ã« 50ピクセル移動ã—ãŸãƒ”クãƒãƒ£ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | -| ->[People]Name | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ã“ã®å¼ã¯ [People]Name フィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | -| Table (1) | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä¸€ç•ªç›®ã«å®šç¾©ã•れãŸãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | -| JSON Parse (MyString) | オブジェクト | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ MyString ãŒé©åˆ‡ãªãƒ•ォーマットã§ã‚れã°ã€ã‚ªãƒ–ジェクトã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ | -| JSON Parse (MyJSONArray) | コレクション | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ MyJSONArray ãŒé©åˆ‡ãªãƒ•ォーマットã§ã‚れã°ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ | -| Form.pageNumber | オブジェクトプロパティ | オブジェクトプロパティã¯å¼ã¨ã—ã¦ã€ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ã„ãšã‚Œã®ã‚¿ã‚¤ãƒ—ã§ã‚‚ã‚りãˆã¾ã™ã€‚ | -| Col[5] | コレクションè¦ç´  | コレクションè¦ç´ ã¯å¼ã¨ã—ã¦ã€ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ã„ãšã‚Œã®ã‚¿ã‚¤ãƒ—ã§ã‚‚ã‚りãˆã¾ã™ã€‚ | -| $entitySel[0] | エンティティ | ORDA ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã§ã‚ã‚‹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ ã“れ㯠**代入ä¸å¯ã®å¼** ã§ã™ã€‚ | - +| å¼ | タイプ | 説明 | +| --------------------------- | ----------- | ------------------------------------------------------------------------------ | +| "ã“ã‚“ã«ã¡ã¯" | String | ã“ã‚Œã¯æ–‡å­—列定数 "ã“ã‚“ã«ã¡ã¯" ã§ã™ã€‚ 文字列定数ã§ã‚ã‚‹ã“ã¨ã‚’表ã™ãŸã‚ã«äºŒé‡å¼•用符ãŒå¿…è¦ã§ã™ã€‚ | +| "ã¿ãªã•ã‚“" + "ã“ã‚“ã«ã¡ã¯" | String | 2ã¤ã®æ–‡å­—列 "ã¿ãªã•ã‚“" 㨠"ã“ã‚“ã«ã¡ã¯" ㌠+ 演算å­ã«ã‚ˆã‚Šçµåˆã•れ〠"ã¿ãªã•ã‚“ã“ã‚“ã«ã¡ã¯" ã‚’è¿”ã—ã¾ã™ã€‚ | +| [People]Name + "様" | String | 2ã¤ã®æ–‡å­—列ã®çµåˆã§ã™ã€‚[People]Name ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã¨æ–‡å­—列 "様" ãŒçµåˆã•れã¾ã™ã€‚ フィールドã®å€¤ãŒ "å°æž—" ã®å ´åˆã€"å°æž—様" ã‚’è¿”ã—ã¾ã™ã€‚ | +| Uppercase ("smith") | String | ã“ã®å¼ã¯ `Uppercase` コマンドを使用ã—ã¦ã€æ–‡å­—列 "smith" を英大文字ã«å¤‰æ›ã—ã¾ã™ã€‚ ãã—㦠"SMITH" ã‚’è¿”ã—ã¾ã™ã€‚ | +| 4 | 数値 | ã“ã‚Œã¯æ•°å€¤å®šæ•° 4ã§ã™ã€‚ | +| 4 * 2 | 数値 | 2ã¤ã®æ•°å€¤ã€4 㨠2 ã®ä¹—ç®—ã§ã™ã€‚乗算演算å­ã® (*) を使用ã—ã¦ã„ã¾ã™ã€‚ 数値㮠8ã‚’è¿”ã—ã¾ã™ã€‚ | +| myButton | 数値 | ã“れã¯ãƒœã‚¿ãƒ³ã«ç´ã¥ã‘られãŸå¤‰æ•°ã§ã™ã€‚ ボタンã®ç¾åœ¨ã®å€¤ã‚’è¿”ã—ã¾ã™: クリックã•れãŸå ´åˆã« 1ã€ãれ以外㯠0 ã‚’è¿”ã—ã¾ã™ã€‚ | +| !06/12/24! ã¾ãŸã¯ !2006/12/24! | 日付 | ã“ã®å¼ã¯æ—¥ä»˜å®šæ•°ã§ 2006å¹´12月24日を表ã—ã¾ã™ã€‚ | +| Current date + 30 | 日付 | ã“ã‚Œã¯æ—¥ä»˜ã®è¨ˆç®—ã§ã™ã€‚`Current date` コマンドã¯ç¾åœ¨ã®æ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ ç¾åœ¨ã®æ—¥ä»˜ã« 30日を加ãˆãŸæ—¥ä»˜ã‚’è¿”ã—ã¾ã™ã€‚ | +| ?8:05:30? | 時間 | ã“ã‚Œã¯æ™‚間定数ã§ã€8時5分30秒を表ã—ã¾ã™ã€‚ | +| ?2:03:04? + ?1:02:03? | 時間 | 2ã¤ã®æ™‚é–“ã®è¶³ã—ç®—ã‚’ãŠã“ãªã„ã€3時5分7ç§’ã‚’è¿”ã—ã¾ã™ã€‚ | +| True | ブール | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ–ール値㮠true (真) ã‚’è¿”ã—ã¾ã™ã€‚ | +| 10 # 20 | ブール | ã“れ㯠2ã¤ã®æ•°å€¤ã®è«–ç†æ¯”較ã§ã™ã€‚ #記å·ã¯ã€"ç­‰ã—ããªã„" を表ã—ã¾ã™ã€‚ 10ã¨20㯠"ç­‰ã—ããªã„" ãŸã‚ã€ã“ã®å¼ã¯ true (真) ã‚’è¿”ã—ã¾ã™ã€‚ | +| "ABC" = "XYZ" | ブール | ã“ã‚Œã¯æ–‡å­—列ã®è«–ç†æ¯”較ã§ã™ã€‚ 文字列ã¯ç­‰ã—ããªã„ãŸã‚ã€å¼ã¯ FALSE (å½) ã‚’è¿”ã—ã¾ã™ã€‚ | +| My Picture + 50 | ピクãƒãƒ£ãƒ¼ | ã“ã®å¼ã¯ My Picture 変数ã«å…¥ã£ã¦ã„るピクãƒãƒ£ãƒ¼ã‚’å³ã« 50ピクセル移動ã—ãŸãƒ”クãƒãƒ£ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | +| ->[People]Name | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ã“ã®å¼ã¯ [People]Name フィールドã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | +| Table (1) | ãƒã‚¤ãƒ³ã‚¿ãƒ¼ | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ä¸€ç•ªç›®ã«å®šç¾©ã•れãŸãƒ†ãƒ¼ãƒ–ルã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ | +| JSON Parse (MyString) | オブジェクト | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ MyString ãŒé©åˆ‡ãªãƒ•ォーマットã§ã‚れã°ã€ã‚ªãƒ–ジェクトã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ | +| JSON Parse (MyJSONArray) | コレクション | ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ MyJSONArray ãŒé©åˆ‡ãªãƒ•ォーマットã§ã‚れã°ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ | +| Form.pageNumber | オブジェクトプロパティ | オブジェクトプロパティã¯å¼ã¨ã—ã¦ã€ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ã„ãšã‚Œã®ã‚¿ã‚¤ãƒ—ã§ã‚‚ã‚りãˆã¾ã™ã€‚ | +| Col[5] | コレクションè¦ç´  | コレクションè¦ç´ ã¯å¼ã¨ã—ã¦ã€ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ã„ãšã‚Œã®ã‚¿ã‚¤ãƒ—ã§ã‚‚ã‚りãˆã¾ã™ã€‚ | +| $entitySel[0] | エンティティ | ORDA ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã§ã‚ã‚‹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è¿”ã—ã¾ã™ã€‚ ã“れ㯠**代入ä¸å¯ã®å¼** ã§ã™ã€‚ | ### ä»£å…¥å¯ vs 代入ä¸å¯ã®å¼ å¼ã¯ã€æ•°å€¤ã®4ã‚„"Hello" ã®æ–‡å­—列ã®ã‚ˆã†ãªãƒªãƒ†ãƒ©ãƒ«å®šæ•°ã§ã‚ã£ãŸã‚Šã€`$myButton` ã®ã‚ˆã†ãªå¤‰æ•°ã§ã‚ã£ãŸã‚Šã—ã¾ã™ã€‚ å¼ã«ã¯æ¼”ç®—å­ã‚‚å«ã‚られã¾ã™ã€‚ ãŸã¨ãˆã°ã€4 + 2 ã¨ã„ã†å¼ã¯åŠ ç®—æ¼”ç®—å­ã‚’使ã£ã¦äºŒã¤ã®æ•°å€¤ã‚’加算ã—ã€çµæžœã® 6 ã‚’è¿”ã—ã¾ã™ã€‚ リテラル定数や演算å­ã‚’使ã£ãŸå¼ã¯ **代入ä¸å¯ã®å¼**ã§ã€å¼ã«å€¤ã‚’代入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 **代入å¯èƒ½ãªå¼** も存在ã—ã¾ã™ã€‚ 代入演算å­ã®å·¦å´ã«ä½¿ãˆã‚‹ã‚‚ã®ãŒã€ä»£å…¥å¯èƒ½ãªå¼ã§ã™ã€‚ ãŸã¨ãˆã°: -```4d +```4d // 変数 $myVar ã¯ä»£å…¥å¯èƒ½ã§ã™: $myVar:="Hello" // $myVar ã« "Hello" を代入ã—ã¾ã™ //Form.pageNumber ã¯ä»£å…¥å¯èƒ½ã§ã™: @@ -323,9 +324,9 @@ Form.pageNumber:=10 // Form.pageNumber ã« 10 を代入ã—ã¾ã™ //Form.pageTotal-Form.pageNumber ã¯ä»£å…¥ä¸å¯ã§ã™: Form.pageTotal- Form.pageNumber:=10 // 代入ä¸å¯ã®ãŸã‚ã€ã‚¨ãƒ©ãƒ¼ ``` - ã“ã®ã‚ˆã†ã«ã€ãƒªãƒ†ãƒ©ãƒ«å®šæ•°ã§ã¯ãªãã¦ã‚‚ã€æ¼”ç®—å­ã‚’使ã£ã¦ã„ã‚‹å¼ã¯ä»£å…¥ä¸å¯ã§ã™ã€‚ ãŸã¨ãˆã°ã€`[Person]FirstName+" "+[Person]LastName` ã¯ä»£å…¥ä¸å¯ã§ã™ã€‚ + ## ãƒã‚¤ãƒ³ã‚¿ãƒ¼ ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã¯ã€ãƒ—ログラミングã«ãŠã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å‚ç…§ã™ã‚‹ãŸã‚ã®é«˜åº¦ãªæ–¹æ³•ã§ã™ã€‚ 4D ã§ã¯ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ィールドã€å¤‰æ•°ã€é…列ã€é…列è¦ç´ ã‚’å‚ç…§ã™ã‚‹ãŸã‚ã«ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -351,7 +352,7 @@ ALERT(MyPointer->) #### シングルラインコメント (//) -コードã®å¾Œã‚„è¡Œã®æœ€åˆã« `//` を使ã†ã¨ã€ãã®å¾Œã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã™ã¹ã¦ã‚³ãƒ¡ãƒ³ãƒˆã¨ãªã‚Šã¾ã™ã€‚ 例: +コードã®å¾Œã‚„è¡Œã®æœ€åˆã« `//` を使ã†ã¨ã€ãã®å¾Œã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã™ã¹ã¦ã‚³ãƒ¡ãƒ³ãƒˆã¨ãªã‚Šã¾ã™ã€‚ 例: ```4d // ã“れã¯ã‚³ãƒ¡ãƒ³ãƒˆã§ã™ @@ -366,7 +367,7 @@ For($vCounter;1;100) // ループを開始ã—ã¾ã™ コメントを `/*` 㨠`*/` ã§å›²ã‚€ã¨ã€ãã®ã‚ã„ã ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã‚³ãƒ¡ãƒ³ãƒˆã¨ãªã‚Šã¾ã™ã€‚ ã“ã®æ–¹æ³•ã§ã‚¤ãƒ³ãƒ©ã‚¤ãƒ³ãŠã‚ˆã³ãƒžãƒ«ãƒãƒ©ã‚¤ãƒ³ã‚³ãƒ¡ãƒ³ãƒˆãŒæ›¸ã‘ã¾ã™: -- **インラインコメント** 㮠例: +- **インラインコメント** 㮠例: ```4d For /* インラインコメント */ ($vCounter;1;100) @@ -374,7 +375,7 @@ For /* インラインコメント */ ($vCounter;1;100) End for ``` -- **マルãƒãƒ©ã‚¤ãƒ³ã‚³ãƒ¡ãƒ³ãƒˆ** ã¯è¤‡æ•°è¡Œã«ã‚ãŸã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã®ã“ã¨ã§ã™ã€‚ ã“ã®å½¢å¼ã®ã‚³ãƒ¡ãƒ³ãƒˆã¯å…¥ã‚Œå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã€4D コードエディターã§ã¯ã“れを展開ã—ãŸã‚ŠæŠ˜ã‚ŠãŸãŸã‚“ã ã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: +- **マルãƒãƒ©ã‚¤ãƒ³ã‚³ãƒ¡ãƒ³ãƒˆ** ã¯è¤‡æ•°è¡Œã«ã‚ãŸã‚‹ã‚³ãƒ¡ãƒ³ãƒˆã®ã“ã¨ã§ã™ã€‚ ã“ã®å½¢å¼ã®ã‚³ãƒ¡ãƒ³ãƒˆã¯å…¥ã‚Œå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã€4D コードエディターã§ã¯ã“れを展開ã—ãŸã‚ŠæŠ˜ã‚ŠãŸãŸã‚“ã ã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: ```4d For ($vCounter;1;100) diff --git a/website/translated_docs/ja/Concepts/shared.md b/website/translated_docs/ja/Concepts/shared.md index fb920dcaa3b018..76a02aefc5d803 100644 --- a/website/translated_docs/ja/Concepts/shared.md +++ b/website/translated_docs/ja/Concepts/shared.md @@ -3,8 +3,6 @@ id: shared title: 共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ --- -## æ¦‚è¦ - **共有オブジェクト** ãŠã‚ˆã³ **共有コレクション** ã¯ãƒ—ロセス間ã§ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を共有ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã€ç‰¹æ®Šãª [オブジェクト](Concepts/dt_object.md) 㨠[コレクション](Concepts/dt_collection.md) ã§ã™ã€‚ [インタープロセス変数](Concepts/variables.md#インタープロセス変数) ã«æ¯”ã¹ã‚‹ã¨ã€å…±æœ‰ã‚ªãƒ–ジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ **プリエンプティブ4Dプロセス** ã¨äº’æ›æ€§ãŒã‚ã‚‹ã¨ã„ã†ç‚¹ã§åˆ©ç‚¹ãŒã‚りã¾ã™ã€‚ã¤ã¾ã‚Šã€`New process` ã‚„ `CALL WORKER` ã¨ã„ã£ãŸã‚³ãƒžãƒ³ãƒ‰ã®å¼•æ•°ã¨ã—ã¦ã€å‚ç…§ã®å½¢ã§æ¸¡ã™ã“ã¨ãŒã§ãã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ 共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€æ¨™æº–ã® `C_OBJECT` 㨠`C_COLLECTION` コマンドã§å®£è¨€ã•れãŸå¤‰æ•°ã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€å°‚用ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: @@ -16,7 +14,7 @@ title: 共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ 共有オブジェクト/コレクションを編集ã™ã‚‹ã«ã¯ã€**Use...End use** 構文を使ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ 共有オブジェクト/コレクションã®å€¤ã‚’読むã«ã‚ãŸã£ã¦ã¯ã€**Use...End use** ã¯å¿…è¦ã‚りã¾ã›ã‚“。 -`Storage` コマンドãŒè¿”ã™ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦å›ºæœ‰ã‹ã¤ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªã‚«ã‚¿ãƒ­ã‚°ã¯ã€ãã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ã„ã¤ã§ã‚‚利用ã™ã‚‹ã“ã¨ãŒã§ãã€ã™ã¹ã¦ã®å…±æœ‰ã‚ªãƒ–ジェクトãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿å­˜ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +`Storage` コマンドãŒè¿”ã™ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦å›ºæœ‰ã‹ã¤ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªã‚«ã‚¿ãƒ­ã‚°ã¯ã€ãã®ã‚¢ãƒ—リケーション内ã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ã„ã¤ã§ã‚‚利用ã™ã‚‹ã“ã¨ãŒã§ãã€ã™ã¹ã¦ã®å…±æœ‰ã‚ªãƒ–ジェクトãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿å­˜ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ## 共有オブジェクト/共有コレクションã®ä½¿ç”¨ @@ -38,13 +36,13 @@ title: 共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ End Use ``` -一度㫠1プロセスã®ã¿ã€å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを編集ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `Use` ã¯å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを他ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„よã†ã«ãƒ­ãƒƒã‚¯ã™ã‚‹ä¸€æ–¹ã€`End use` ã¯ã“ã®ãƒ­ãƒƒã‚¯ã‚’解除ã—ã¾ã™ã€‚ `Use...End use` を使ã‚ãšã«å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを編集ã—よã†ã¨ã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã™ã§ã«ä»–ã®ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•れã¦ã„る共有オブジェクト/コレクションã«å¯¾ã—ã¦ã€åˆ¥ã®ãƒ—ロセス㌠`Use...End use` を呼ã³å‡ºã—ãŸå ´åˆã€å…ˆç€ãƒ—ロセス㌠`End use` ã§ãƒ­ãƒƒã‚¯ã‚’解除ã™ã‚‹ã¾ã§ã€ãã®å‘¼ã³å‡ºã—ã¯å¾…機状態ã«ãªã‚Šã¾ã™ (エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 ã—ãŸãŒã£ã¦ã€`Use...End use` 構文内ã®å‡¦ç†ã¯è¿…速ã«å®Ÿè¡Œã•れã€ãƒ­ãƒƒã‚¯ã¯å¯åŠçš„速やã‹ã«è§£é™¤ã•れる必è¦ãŒã‚りã¾ã™ã€‚ ãã®ãŸã‚ã€å…±æœ‰ã‚ªãƒ–ジェクト/コレクションをインターフェース(ダイアログボックスãªã©) ã‹ã‚‰ç›´æŽ¥ç·¨é›†ã™ã‚‹ã“ã¨ã¯é¿ã‘ã‚‹ã“ã¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚ +一度㫠1プロセスã®ã¿ã€å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを編集ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `Use` ã¯å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを他ã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„よã†ã«ãƒ­ãƒƒã‚¯ã™ã‚‹ä¸€æ–¹ã€`End use` ã¯ã“ã®ãƒ­ãƒƒã‚¯ã‚’解除ã—ã¾ã™ (ロックカウンター㌠0 ã®å ´åˆ; 後述å‚ç…§)。 . `Use...End use` を使ã‚ãšã«å…±æœ‰ã‚ªãƒ–ジェクト/コレクションを編集ã—よã†ã¨ã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ ã™ã§ã«ä»–ã®ãƒ—ロセスã«ã‚ˆã£ã¦ä½¿ç”¨ã•れã¦ã„る共有オブジェクト/コレクションã«å¯¾ã—ã¦ã€åˆ¥ã®ãƒ—ロセス㌠`Use...End use` を呼ã³å‡ºã—ãŸå ´åˆã€å…ˆç€ãƒ—ロセス㌠`End use` ã§ãƒ­ãƒƒã‚¯ã‚’解除ã™ã‚‹ã¾ã§ã€ãã®å‘¼ã³å‡ºã—ã¯å¾…機状態ã«ãªã‚Šã¾ã™ (エラーã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 ã—ãŸãŒã£ã¦ã€`Use...End use` 構文内ã®å‡¦ç†ã¯è¿…速ã«å®Ÿè¡Œã•れã€ãƒ­ãƒƒã‚¯ã¯å¯åŠçš„速やã‹ã«è§£é™¤ã•れる必è¦ãŒã‚りã¾ã™ã€‚ ãã®ãŸã‚ã€å…±æœ‰ã‚ªãƒ–ジェクト/コレクションをインターフェース(ダイアログボックスãªã©) ã‹ã‚‰ç›´æŽ¥ç·¨é›†ã™ã‚‹ã“ã¨ã¯é¿ã‘ã‚‹ã“ã¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚ 共有オブジェクト/コレクションを他ã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã®ãƒ—ロパティã‚ã‚‹ã„ã¯è¦ç´ ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã€ã“ã®ã¨ã **共有グループ** ãŒä½œæˆã•れã¾ã™ã€‚ 共有グループã¯ã€å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã®ãƒ—ロパティ値ã‚ã‚‹ã„ã¯è¦ç´ ã¨ã—ã¦ä»–ã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションãŒè¨­å®šã•れãŸã¨ãã«è‡ªå‹•çš„ã«ä½œæˆã•れã¾ã™ã€‚ 共有グループを使用ã™ã‚‹ã¨å…±æœ‰ã‚ªãƒ–ジェクトを入れå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ä»¥ä¸‹ã®ãƒ«ãƒ¼ãƒ«ã«æ°—ã‚’ã¤ã‘ã‚‹å¿…è¦ãŒã‚りã¾ã™: -- ã‚るグループã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã«å¯¾ã—㦠`Use` を使ã†ã¨ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ã™ã¹ã¦ã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã®ãƒ—ロパティ/è¦ç´ ãŒãƒ­ãƒƒã‚¯ã•れã¾ã™ã€‚ +- ã‚るグループã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã«å¯¾ã—㦠`Use` を使ã†ã¨ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ã™ã¹ã¦ã®å…±æœ‰ã‚ªãƒ–ジェクト/コレクションã®ãƒ—ロパティ/è¦ç´ ãŒãƒ­ãƒƒã‚¯ã•れã€ãƒ­ãƒƒã‚¯ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’ 1 増加ã•ã›ã¾ã™ã€‚ `End use` ã¯ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ­ãƒƒã‚¯ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’ 1 減らã—ã¾ã™ã€‚カウンター㌠0 ã«ãªã‚‹ã¨ã€ã™ã¹ã¦ã®ãƒªãƒ³ã‚¯ã•れãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã®ãƒ­ãƒƒã‚¯ãŒè§£é™¤ã•れã¾ã™ã€‚ - 共有オブジェクト/コレクションã¯ä¸€ã¤ã®å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã«ã—ã‹æ‰€å±žã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 ã™ã§ã«ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã—ã¦ã„る共有オブジェクト/コレクションを他ã®ã‚°ãƒ«ãƒ¼ãƒ—ã¸ã¨å‰²ã‚Šå½“ã¦ã‚ˆã†ã¨ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ -- 一旦グループ化ã•れãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã«ã¤ã„ã¦ã€ã‚°ãƒ«ãƒ¼ãƒ—を解除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 一度共有グループã«å«ã¾ã‚ŒãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã¯ãšã£ã¨åŒã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ 親オブジェクト/コレクションã‹ã‚‰å­ã‚ªãƒ–ジェクト/コレクションã¸ã®å‚ç…§ã‚’ã™ã¹ã¦å‰Šé™¤ã—ãŸã¨ã—ã¦ã‚‚ã€ä¸¡è€…ã®ãƒªãƒ³ã‚¯ãŒè§£é™¤ã•れるã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 +- 一旦グループ化ã•れãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã«ã¤ã„ã¦ã€ã‚°ãƒ«ãƒ¼ãƒ—を解除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 一度共有グループã«å«ã¾ã‚ŒãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã¯ãšã£ã¨åŒã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ 親オブジェクト/コレクションã‹ã‚‰å­ã‚ªãƒ–ジェクト/コレクションã¸ã®å‚ç…§ã‚’ã™ã¹ã¦å‰Šé™¤ã—ãŸã¨ã—ã¦ã‚‚ã€ä¸¡è€…ã®ãƒªãƒ³ã‚¯ãŒè§£é™¤ã•れるã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 共有グループã®ãƒ«ãƒ¼ãƒ«ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€ä¾‹é¡Œ2ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 @@ -82,84 +80,84 @@ title: 共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ 共有オブジェクトãŠã‚ˆã³å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒ—ロセス間㮠(ã¨ãã« **プリエンプティブ4Dプロセス** é–“ã®) 通信ãŒã§ãるよã†ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ 。 ã“れらã¯ãƒ—ロセスã‹ã‚‰ä»–ã®ãƒ—ロセスã¸ã€å‚ç…§åž‹ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 共有オブジェクトãŠã‚ˆã³å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€**共有オブジェクトã¨å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³** ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 共有オブジェクトãŠã‚ˆã³å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’扱ã†éš›ã«ã¯ã€è¤‡æ•°ãƒ—ロセスã«ã‚ˆã‚‹åŒæ™‚アクセスをé¿ã‘ã‚‹ãŸã‚ã«ã€å¿…ãšãれらを `Use...End use` キーワードã§ããã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -- **Use** ã®å®Ÿè¡ŒãŒæˆåŠŸã™ã‚‹ã¨ã€å¯¾å¿œã™ã‚‹ **End use ãŒå®Ÿè¡Œã•れるã¾ã§ã€*Shared_object_or_Shared_collection* ã®ãƒ—ã™ã¹ã¦ã®ãƒ­ãƒ‘ティ/è¦ç´ ã¯ä»–ã®ã‚らゆるプロセスã«å¯¾ã—書ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ãŒãƒ­ãƒƒã‚¯ã•れã¾ã™ã€‚

      • - - - *statement(s)* ã§å®Ÿè¡Œã•れるステートメントã¯ã€*Shared_object_or_Shared_collection* ã®ãƒ—ロパティ/è¦ç´ ã«å¯¾ã—ã¦ã€ç«¶åˆã‚¢ã‚¯ã‚»ã‚¹ã®ãƒªã‚¹ã‚¯ãªã—ã«å¤‰æ›´ã‚‚実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - - *Shared_object_or_Shared_collection* ã«ä»–ã®å…±æœ‰ã‚ªãƒ–ジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ—ロパティã¨ã—ã¦è¿½åŠ ã•れãŸå ´åˆã€ãれらもåŒã˜å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã¨ã—ã¦é€£çµã•れã¾ã™ (**共有オブジェクト/共有コレクションã®ä½¿ç”¨** ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 - - **Use...End use ** 内ステートメントã®å®Ÿè¡Œä¸­ã«ã€ä»–ã®ãƒ—ロセス㌠*Shared_object_or_Shared_collection* ã®ãƒ—ロパティやリンクã•れãŸãƒ—ロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã—ãŸå ´åˆã€ãã®ã‚¢ã‚¯ã‚»ã‚¹ã¯è‡ªå‹•çš„ã«ä¿ç•™ã•れã€å®Ÿè¡Œä¸­ã®å‡¦ç†ãŒçµ‚了ã™ã‚‹ã¾ã§å¾…機ã—ã¾ã™ã€‚ - - **End use** ã¯ã€*Shared_object_or_Shared_collection* プロパティãŠã‚ˆã³ã€åŒã˜ãƒ­ãƒƒã‚¯è­˜åˆ¥å­ã‚’共有ã™ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®ãƒ­ãƒƒã‚¯ã‚’解除ã—ã¾ã™ã€‚ - - 4D コード内ã§ã¯ã€è¤‡æ•°ã® **Use...End use** 構文を入れå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ­ãƒƒã‚¯ã¯ã‚¹ã‚¿ãƒƒã‚¯ã•れã€ãƒ—ロパティ/è¦ç´ ã¯æœ€å¾Œã® **End use** ãŒå®Ÿè¡Œã•れãŸã¨ãã«è§£é™¤ã•れã¾ã™ã€‚ - - **注:** コレクションã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã™ã‚‹å ´åˆã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡Œä¸­ã¯ã€å¯¾è±¡ã®å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—㦠**Use** ãŒå†…部的ã«è‡ªå‹•ã§å‘¼ã°ã‚Œã¾ã™ã€‚ - - ## 例題 1 - - ãれãžã‚Œç•°ãªã‚‹è£½å“ã®åœ¨åº«æ›´æ–°ã‚’実行ã™ã‚‹è¤‡æ•°ã®ãƒ—ロセスを起動ã—ã€åŒã˜å…±æœ‰ã‚ªãƒ–ジェクトを更新ã—ã¦ã„ãã¾ã™ã€‚ ã¾ãšãƒ¡ã‚¤ãƒ³ãƒ—ロセスã§ç©ºã®å…±æœ‰ã‚ªãƒ–ジェクトをインスタンス化ã—ã¦ã‹ã‚‰ã€å…±æœ‰ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ã¨å¯¾è±¡è£½å“を引数ã¨ã—ã¦æ¸¡ã—ã¦åˆ¥ãƒ—ロセス起動ã—ã¾ã™: - - ```4d - ARRAY TEXT($_items;0) - ... // 在庫を確èªã™ã‚‹è£½å“ã‚’é…åˆ—ã«æ ¼ç´ã—ã¾ã™ - $nbItems:=Size of array($_items) - C_OBJECT($inventory) - $inventory:=New shared object - Use($inventory) - $inventory.nbItems:=$nbItems - End use - - // プロセスを起動ã—ã¾ã™ - For($i;1;$nbItems) - $ps:=New process("HowMany";0;"HowMany_"+$_items{$i};$_items{$i};$inventory) - //$inventory オブジェクトã¯å‚ç…§ã§æ¸¡ã•れã¾ã™ - End for - ``` - - "HowMany" メソッド内ã§ã¯ã€åœ¨åº«ç¢ºèªãŒçµ‚ã‚ã‚‹ã¨ã™ãã« $inventory å…±æœ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ›´æ–°ã•れã¾ã™: - - ```4d - C_TEXT($1) - C_TEXT($what) - C_OBJECT($2) - C_OBJECT($inventory) - $what:=$1 // å¯èª­æ€§ã®ãŸã‚ - $inventory:=$2 - - $count:=CountMethod($what) // 在庫確èªç”¨ã®ãƒ¡ã‚½ãƒƒãƒ‰ - Use($inventory) // 共有オブジェクトを使用ã—ã¾ã™ - $inventory[$what]:=$count // 当該製å“ã®åœ¨åº«ã‚’ä¿å­˜ã—ã¾ã™ - End use - ``` - - ## 例題 2 - - 以下ã®ä¾‹é¡Œã¯ã€å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—を扱ã†éš›ã®ãƒ«ãƒ¼ãƒ«ã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™: - - ```4d - $ob1:=New shared object - $ob2:=New shared object - Use($ob1) - $ob1.a:=$ob2 // グループ1 ãŒä½œæˆã•れã¾ã™ - End use - - $ob3:=New shared object - $ob4:=New shared object - Use($ob3) - $ob3.a:=$ob4 // グループ2 ãŒä½œæˆã•れã¾ã™ - End use - - Use($ob1) // グループ1ã®ã‚ªãƒ–ジェクトを使用ã—ã¾ã™ - $ob1.b:=$ob4 // ã“れã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ - // $ob4 ã¯ã™ã§ã«ä»–ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã—ã¦ã„ã‚‹ãŸã‚ - // 代入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ - End use - - Use($ob3) - $ob3.a:=Null // グループ2ã‹ã‚‰$ob4 ã¸ã®å‚ç…§ã‚’ã™ã¹ã¦è§£é™¤ã—ã¾ã™ - - End use - - Use($ob1) // グループ1ã®ã‚ªãƒ–ジェクトを使用ã—ã¾ã™ - $ob1.b:=$ob4 // ã“れもエラーã«ãªã‚Šã¾ã™ - // $ob4 ã¯ä¾ç„¶ã¨ã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—2ã«æ‰€å±žã—ã¦ã„ã‚‹ãŸã‚ - // 代入ã¯ä¸å¯èƒ½ã§ã™ - End use - ``` \ No newline at end of file +- **Use** ã®å®Ÿè¡ŒãŒæˆåŠŸã™ã‚‹ã¨ã€å¯¾å¿œã™ã‚‹ **End use ãŒå®Ÿè¡Œã•れるã¾ã§ã€_Shared_object_or_Shared_collection_ ã®ãƒ—ã™ã¹ã¦ã®ãƒ­ãƒ‘ティ/è¦ç´ ã¯ä»–ã®ã‚らゆるプロセスã«å¯¾ã—書ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹ãŒãƒ­ãƒƒã‚¯ã•れã¾ã™ã€‚ +- _statement(s)_ ã§å®Ÿè¡Œã•れるステートメントã¯ã€*Shared_object_or_Shared_collection* ã®ãƒ—ロパティ/è¦ç´ ã«å¯¾ã—ã¦ã€ç«¶åˆã‚¢ã‚¯ã‚»ã‚¹ã®ãƒªã‚¹ã‚¯ãªã—ã«å¤‰æ›´ã‚‚実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- _Shared_object_or_Shared_collection_ ã«ä»–ã®å…±æœ‰ã‚ªãƒ–ジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒãƒ—ロパティã¨ã—ã¦è¿½åŠ ã•れãŸå ´åˆã€ãれらもåŒã˜å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—ã¨ã—ã¦é€£çµã•れã¾ã™ (**共有オブジェクト/共有コレクションã®ä½¿ç”¨** ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 +- **Use...End use ** 内ステートメントã®å®Ÿè¡Œä¸­ã«ã€ä»–ã®ãƒ—ロセス㌠_Shared_object_or_Shared_collection_ ã®ãƒ—ロパティやリンクã•れãŸãƒ—ロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã—ãŸå ´åˆã€ãã®ã‚¢ã‚¯ã‚»ã‚¹ã¯è‡ªå‹•çš„ã«ä¿ç•™ã•れã€å®Ÿè¡Œä¸­ã®å‡¦ç†ãŒçµ‚了ã™ã‚‹ã¾ã§å¾…機ã—ã¾ã™ã€‚ +- **End use** ã¯ã€_Shared_object_or_Shared_collection_ プロパティãŠã‚ˆã³ã€åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—ã®ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®ãƒ­ãƒƒã‚¯ã‚’解除ã—ã¾ã™ã€‚ +- 4D コード内ã§ã¯ã€è¤‡æ•°ã® **Use...End use** 構文を入れå­ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ グループã®å ´åˆã€**Use** を使用ã™ã‚‹ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ­ãƒƒã‚¯ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ãŒ 1 増加ã—〠**End use** ã”ã¨ã« 1 減少ã—ã¾ã™ã€‚最後㮠**End use** ã«ã‚ˆã£ã¦ãƒ­ãƒƒã‚¯ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ãŒ 0 ã«ãªã£ãŸå ´åˆã«ã®ã¿ã€ã™ã¹ã¦ã®ãƒ—ロパティ/è¦ç´ ã®ãƒ­ãƒƒã‚¯ãŒè§£é™¤ã•れã¾ã™ã€‚ + +**注:** コレクションã®ãƒ¡ãƒ³ãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ãŒå…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã™ã‚‹å ´åˆã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡Œä¸­ã¯ã€å¯¾è±¡ã®å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—㦠**Use** ãŒå†…部的ã«è‡ªå‹•ã§å‘¼ã°ã‚Œã¾ã™ã€‚ + + +## 例題 1 + +ãれãžã‚Œç•°ãªã‚‹è£½å“ã®åœ¨åº«æ›´æ–°ã‚’実行ã™ã‚‹è¤‡æ•°ã®ãƒ—ロセスを起動ã—ã€åŒã˜å…±æœ‰ã‚ªãƒ–ジェクトを更新ã—ã¦ã„ãã¾ã™ã€‚ ã¾ãšãƒ¡ã‚¤ãƒ³ãƒ—ロセスã§ç©ºã®å…±æœ‰ã‚ªãƒ–ジェクトをインスタンス化ã—ã¦ã‹ã‚‰ã€å…±æœ‰ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ã¨å¯¾è±¡è£½å“を引数ã¨ã—ã¦æ¸¡ã—ã¦åˆ¥ãƒ—ロセス起動ã—ã¾ã™: + +```4d + ARRAY TEXT($_items;0) + ... // 在庫を確èªã™ã‚‹è£½å“ã‚’é…åˆ—ã«æ ¼ç´ã—ã¾ã™ + $nbItems:=Size of array($_items) + C_OBJECT($inventory) + $inventory:=New shared object + Use($inventory) + $inventory.nbItems:=$nbItems + End use + + // プロセスを起動ã—ã¾ã™ + For($i;1;$nbItems) + $ps:=New process("HowMany";0;"HowMany_"+$_items{$i};$_items{$i};$inventory) + // $inventory オブジェクトã¯å‚ç…§ã§æ¸¡ã•れã¾ã™ + End for +``` + +"HowMany" メソッド内ã§ã¯ã€åœ¨åº«ç¢ºèªãŒçµ‚ã‚ã‚‹ã¨ã™ãã« $inventory å…±æœ‰ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ›´æ–°ã•れã¾ã™: + +```4d + C_TEXT($1) + C_TEXT($what) + C_OBJECT($2) + C_OBJECT($inventory) + $what:=$1 // å¯èª­æ€§ã®ãŸã‚ + $inventory:=$2 + + $count:=CountMethod($what) // 在庫確èªç”¨ã®ãƒ¡ã‚½ãƒƒãƒ‰ + Use($inventory) // 共有オブジェクトを使用ã—ã¾ã™ + $inventory[$what]:=$count // 当該製å“ã®åœ¨åº«ã‚’ä¿å­˜ã—ã¾ã™ + End use +``` + +## 例題 2 + +以下ã®ä¾‹é¡Œã¯ã€å…±æœ‰ã‚°ãƒ«ãƒ¼ãƒ—を扱ã†éš›ã®ãƒ«ãƒ¼ãƒ«ã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ã„ã¾ã™: + +```4d + $ob1:=New shared object + $ob2:=New shared object + Use($ob1) + $ob1.a:=$ob2 // グループ1 ãŒä½œæˆã•れã¾ã™ + End use + + $ob3:=New shared object + $ob4:=New shared object + Use($ob3) + $ob3.a:=$ob4 // グループ2 ãŒä½œæˆã•れã¾ã™ + End use + + Use($ob1) // グループ1ã®ã‚ªãƒ–ジェクトを使用ã—ã¾ã™ + $ob1.b:=$ob4 // ã“れã¯ã‚¨ãƒ©ãƒ¼ã«ãªã‚Šã¾ã™ + // $ob4 ã¯ã™ã§ã«ä»–ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã—ã¦ã„ã‚‹ãŸã‚ + // 代入ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ + End use + + Use($ob3) + $ob3.a:=Null // グループ2ã‹ã‚‰$ob4 ã¸ã®å‚ç…§ã‚’ã™ã¹ã¦è§£é™¤ã—ã¾ã™ + + End use + + Use($ob1) // グループ1ã®ã‚ªãƒ–ジェクトを使用ã—ã¾ã™ + $ob1.b:=$ob4 // ã“れもエラーã«ãªã‚Šã¾ã™ + // $ob4 ã¯ä¾ç„¶ã¨ã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—2ã«æ‰€å±žã—ã¦ã„ã‚‹ãŸã‚ + // 代入ã¯ä¸å¯èƒ½ã§ã™ + End use +``` diff --git a/website/translated_docs/ja/Concepts/variables.md b/website/translated_docs/ja/Concepts/variables.md index 36a109422444d4..3773c84d148417 100644 --- a/website/translated_docs/ja/Concepts/variables.md +++ b/website/translated_docs/ja/Concepts/variables.md @@ -7,12 +7,13 @@ title: 変数 データベースを作æˆã™ã‚‹éš›ã«ã¯ã€ãƒ•ィールドã«åå‰ã¨ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を指定ã—ã¾ã™ã€‚ åŒæ§˜ã«ã€å¤‰æ•°ã«ã‚‚åå‰ã¨ [データタイプ](Concepts/data-types.md) を指定ã—ã¾ã™ã€‚ -ã„ã£ãŸã‚“作æˆã•れãŸå¤‰æ•°ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§å¿…è¦ã¨ã•れる場所ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆå¤‰æ•°ã‚’åŒã˜ã‚¿ã‚¤ãƒ—ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æ ¼ç´ã™ã‚‹ã«ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: +ã„ã£ãŸã‚“作æˆã•れãŸå¤‰æ•°ã¯ã€ã‚¢ãƒ—リケーションã§å¿…è¦ã¨ã•れる場所ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ†ã‚­ã‚¹ãƒˆå¤‰æ•°ã‚’åŒã˜ã‚¿ã‚¤ãƒ—ã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æ ¼ç´ã™ã‚‹ã«ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: ```4d [MyTable]MyField:=MyText ``` + 変数ã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®è¦ç´ ã§ã™ã€‚ç”»é¢ä¸Šã«è¡¨ç¤ºã•れるã“ã¨ã®ãªã„ã€è£æ–¹ã«å¾¹ã—ãŸå¤‰æ•°ã‚’作æˆãƒ»åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã‚‚ã¡ã‚ã‚“ã€ãƒ•ォーム上ã«å¤‰æ•°ã®å€¤ã‚’表示ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚„BLOBを除ã)。ã¾ãŸã€å¤‰æ•°ã«å€¤ã‚’入力ã—ãŸã‚Šã€å¤‰æ•°ã®å€¤ã‚’レãƒãƒ¼ãƒˆã«å°åˆ·ã—ãŸã‚Šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ã“ã®ã¨ãã€å…¥åŠ›å¯ã‚„入力ä¸å¯ã®å¤‰æ•°ã‚ªãƒ–ジェクトã¯ãƒ•ィールドオブジェクトã¨åŒæ§˜ã«æŒ¯èˆžã„ã€æä¾›ã•れるコントロールも類似ã—ã¦ã„ã¾ã™ã€‚ フォーム上ã®ãƒœã‚¿ãƒ³ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚¨ãƒªã‚¢ã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ãªã©ã®ã‚ªãƒ–ジェクトも変数を使ã£ã¦åˆ¶å¾¡ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã»ã‹ã€ä¿å­˜ä¸è¦ãªè¨ˆç®—çµæžœã‚’表示ã•ã›ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ## 変数ã®å®£è¨€ @@ -20,7 +21,7 @@ title: 変数 変数ã¯å®£è¨€ã«ã‚ˆã£ã¦ä½œæˆã•れã¾ã™ã€‚ 4D ランゲージã§ã¯ã€å¤‰æ•°ã®å®£è¨€æ–¹æ³•ã¯2ã¤ã‚りã¾ã™: - `var` キーワードを使ã£ãŸå®£è¨€ (推奨ã€ã¨ãã«ã‚ªãƒ–ジェクトやクラスをコードã§ä½¿ç”¨ã™ã‚‹å ´åˆ) -- "コンパイラー" ã‚„ "é…列" テーマ㮠4D ランゲージコマンドを使ã£ãŸå®£è¨€ (廃止予定ã€ã‚¯ãƒ©ã‚·ãƒƒã‚¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ã¿) +- "コンパイラー" ã‚„ "é…列" テーマ㮠4D ランゲージコマンドを使ã£ãŸå®£è¨€ (クラシックランゲージã®ã¿) **注:** ã“ã®æ–¹æ³•ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“ãŒã€å˜ç´”ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦å¤‰æ•°ã‚’宣言ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚æ­£å¼ã«ãれらを定義ã™ã‚‹ã“ã¨ã¯å¿…é ˆã§ã¯ã‚りã¾ã›ã‚“。 ãŸã¨ãˆã°ã€ä»Šæ—¥ã®æ—¥ä»˜ã«30日足ã—ãŸå€¤ã‚’æ ¼ç´ã—ãŸå¤‰æ•°ã‚’宣言ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: @@ -30,193 +31,59 @@ title: 変数 // 30æ—¥å¾Œã®æ—¥ä»˜ãŒä»£å…¥ã•れã¾ã™ ``` + ### `var` キーワードã«ã‚ˆã‚‹å®£è¨€ オブジェクト変数をクラスã«ç´ã¥ã‘ã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€`var` キーワードを使ã£ãŸå¤‰æ•°å®£è¨€ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®è‡ªå‹•補完機能を強化ã—ã¾ã™ã€‚ `var` キーワードを使ã£ã¦å¤‰æ•°ã‚’宣言ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’用ã„ã¾ã™: -`var {, ,...}{ : }` +`var {; ;...}{ : }` ãŸã¨ãˆã°: ```4d var $myText : Text // テキスト変数 -var myDate1, myDate2 : Date // è¤‡æ•°ã®æ—¥ä»˜å¤‰æ•° +var myDate1; myDate2 : Date // è¤‡æ•°ã®æ—¥ä»˜å¤‰æ•° var $myFile : 4D.File // File クラスオブジェクト変数 var $myVar // ãƒãƒªã‚¢ãƒ³ãƒˆåž‹å¤‰æ•° ``` -`varName` ã«æŒ‡å®šã™ã‚‹å¤‰æ•°å㯠4Dã® [識別å­ã®å‘½åè¦å‰‡](Concepts/identifiers.md) ã«å¾“ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ +`varName` ã«æŒ‡å®šã™ã‚‹å¤‰æ•°å㯠4Dã® [識別å­ã®å‘½åè¦å‰‡](Concepts/identifiers.md) ã«å¾“ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ [ローカル変数ã¨ãƒ—ロセス変数](#ローカル変数ã¨ãƒ—ロセス変数) ã®å®£è¨€ã®ã¿ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚[インタープロセス変数](#インタープロセス変数) ãŠã‚ˆã³ [é…列](Concepts/arrays.md) ã«ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 `varType` ã«ã¯æ¬¡ãŒæŒ‡å®šã§ãã¾ã™: -- [基本ã®ãƒ‡ãƒ¼ã‚¿åž‹](Concepts/data-types.md): 変数ã«ã¯ã€å®£è¨€ã•れãŸåž‹ã®å€¤ãŒæ ¼ç´ã•れã¾ã™ +- [基本ã®ãƒ‡ãƒ¼ã‚¿åž‹](Concepts/data-types.md): 変数ã«ã¯ã€å®£è¨€ã•れãŸåž‹ã®å€¤ãŒæ ¼ç´ã•れã¾ã™ - [クラスå‚ç…§](Concepts/classes.md) (4Dクラスã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹): 変数ã«ã¯ã€å®šç¾©ã•れãŸã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクトã¸ã®å‚ç…§ãŒæ ¼ç´ã•れã¾ã™ `varType` ã‚’çœç•¥ã™ã‚‹ã¨ã€**variant** åž‹ã®å¤‰æ•°ãŒä½œæˆã•れã¾ã™ã€‚ サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ `varType` 値ã®ä¸€è¦§ã§ã™: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - varType - - 内容 -
        - Text - - テキスト値 -
        - Date - - 日付値 -
        - Time - - 時間値 -
        - Boolean - - ブール値 -
        - Integer - - å€é•·æ•´æ•°å€¤ -
        - Real - - 実数値 -
        - Pointer - - ãƒã‚¤ãƒ³ã‚¿ãƒ¼å€¤ -
        - Picture - - ピクãƒãƒ£ãƒ¼å€¤ -
        - BLOB - - BLOB値 -
        - Collection - - コレクション値 -
        - Variant - - ãƒãƒªã‚¢ãƒ³ãƒˆå€¤ -
        - Object - - デフォルトクラス (4D.Object) ã®ã‚ªãƒ–ジェクト -
        - 4D.\ - - 4Dクラスåã®ã‚ªãƒ–ジェクト -
        - cs.\ - - ユーザークラスåã®ã‚ªãƒ–ジェクト -
        +| varType | 内容 | +| ---------------------- | ---------------------------- | +| `Text` | テキスト値 | +| `Date` | 日付値 | +| `Time` | 時間値 | +| `Boolean` | ブール値 | +| `Integer` | å€é•·æ•´æ•°å€¤ | +| `Real` | 実数値 | +| `Pointer` | ãƒã‚¤ãƒ³ã‚¿ãƒ¼å€¤ | +| `Picture` | ピクãƒãƒ£ãƒ¼å€¤ | +| `BLOB` | BLOB値 | +| `Collection` | コレクション値 | +| `Variant` | ãƒãƒªã‚¢ãƒ³ãƒˆå€¤ | +| `Object` | デフォルトクラス (4D.Object) ã®ã‚ªãƒ–ジェクト | +| `4D.` | 4Dクラスåã®ã‚ªãƒ–ジェクト | +| `cs.` | ユーザークラスåã®ã‚ªãƒ–ジェクト | #### 例題 - 基本ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ãŠã‚ˆã³ãƒ—ロセス変数ã®å®£è¨€: ```4d -var $myText, myText, $vt : Text +var $myText; myText; $vt : Text var myVar //variant var $o : Object @@ -240,9 +107,10 @@ var $dataclass : cs.Employee var $entity : cs.EmployeeEntity ``` + ### C_ 指示å­ã«ã‚ˆã‚‹å®£è¨€ -> **äº’æ›æ€§ã«é–¢ã™ã‚‹æ³¨è¨˜:** 4D v18 R3 以é™ã¯å»ƒæ­¢äºˆå®šã¨ãªã£ã¦ã„ã¾ã™ã€‚ [var](#using-the-var-keyword) キーワードã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ +> **äº’æ›æ€§ã«é–¢ã™ã‚‹æ³¨è¨˜:** メソッド内ã§å¤‰æ•°ã‚’宣言ã™ã‚‹ã«ã‚ãŸã£ã¦ã€ã“ã®æ–¹æ³•ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 [var](#using-the-var-keyword) キーワードã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ "コンパイラー" ãƒ†ãƒ¼ãƒžã‚³ãƒžãƒ³ãƒ‰ã®æŒ‡ç¤ºå­ã‚’使ã£ã¦ã€åŸºæœ¬ã®ãƒ‡ãƒ¼ã‚¿åž‹ã®å¤‰æ•°ã‚’宣言ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -255,15 +123,14 @@ var $entity : cs.EmployeeEntity ã„ãã¤ã‹ã®åŸºæœ¬çš„ãªå¤‰æ•°å®£è¨€ã®ä¾‹ã§ã™: ```4d - C_BLOB(vxMyBlob) // プロセス変数 vxMyBlob ã‚’ BLOBåž‹ã¨ã—ã¦å®£è¨€ã—ã¾ã™ - C_DATE($vdCurDate) // ローカル変数 $vdCurDate を日付型ã¨ã—ã¦å®£è¨€ã—ã¾ã™ + C_BLOB(vxMyBlob) // プロセス変数 vxMyBlob ã‚’ BLOBåž‹ã¨ã—ã¦å®£è¨€ã—ã¾ã™ C_DATE($vdCurDate) // ローカル変数 $vdCurDate を日付型ã¨ã—ã¦å®£è¨€ã—ã¾ã™ C_LONGINT(vg1;vg2;vg3) // 3ã¤ã®ãƒ—ロセス変数 vg1, vg2, vg3 ã‚’å€é•·æ•´æ•°åž‹ã¨ã—ã¦å®£è¨€ã—ã¾ã™ C_OBJECT($vObj) // ローカル変数 $vObj をオブジェクト型ã¨ã—ã¦å®£è¨€ã—ã¾ã™ C_COLLECTION($vCol) // ローカル変数 $vCol をコレクション型ã¨ã—ã¦å®£è¨€ã—ã¾ã™ - ARRAY LONGINT(alAnArray;10) // プロセス変数 alAnArray ã‚’ 10個ã®å€é•·æ•´æ•°åž‹è¦ç´ ã‚’æŒã¤é…列ã¨ã—ã¦å®£è¨€ã—ã¾ã™ ``` -**注:** é…列ã¨ã¯ã€å¤‰æ•°ã®ä¸€ç¨®ã§ã™ã€‚ é…列ã¨ã¯ã€åŒã˜ã‚¿ã‚¤ãƒ—ã®å¤‰æ•°ã‚’番å·ä»˜ãã§ä¸¦ã¹ãŸã‚‚ã®ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [é…列](Concepts/arrays.md) ã‚’å‚ç…§ãã ã•ã„。 +**注:** é…列ã¨ã¯å¤‰æ•°ã®ä¸€ç¨®ã§ã€åŒã˜ã‚¿ã‚¤ãƒ—ã®å¤‰æ•°ã‚’番å·ä»˜ãã§ä¸¦ã¹ãŸã‚‚ã®ã§ã™ã€‚ é…列ã¯ã€é…列宣言コマンド (例: `ARRAY LONGINT(alAnArray;10)`) を使用ã—ã¦ä½œæˆã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [é…列](Concepts/arrays.md) ã‚’å‚ç…§ãã ã•ã„。 + ## 変数ã¸ã®ä»£å…¥ @@ -275,17 +142,17 @@ var $entity : cs.EmployeeEntity MyNumber:=3 ``` -ã¯å¤‰æ•° *MyNumber* を作æˆã—ã€æ•°å€¤ 3を代入ã—ã¾ã™ã€‚ MyNumber ãŒæ—¢ã«å­˜åœ¨ã—ã¦ã„れã°ã€ãã“ã«æ•°å€¤ 3ãŒä»£å…¥ã•れã¾ã™ã€‚ +ã¯å¤‰æ•° _MyNumber_ を作æˆã—ã€æ•°å€¤ 3を代入ã—ã¾ã™ã€‚ MyNumber ãŒæ—¢ã«å­˜åœ¨ã—ã¦ã„れã°ã€ãã“ã«æ•°å€¤ 3ãŒä»£å…¥ã•れã¾ã™ã€‚ > [データ型ã®å®£è¨€](#変数ã®ä½œæˆ) ã‚’ã›ãšã«å¤‰æ•°ã‚’作æˆã™ã‚‹ã“ã¨ã¯é€šå¸¸æŽ¨å¥¨ã•れã¾ã›ã‚“。 -ã‚‚ã¡ã‚ã‚“ã€å¤‰æ•°ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–り出ã™ã“ã¨ãŒã§ããªã‘れã°ã€ä¾¿åˆ©ã¨ã¯ã„ãˆã¾ã›ã‚“。 å†åº¦ä»£å…¥æ¼”ç®—å­ã‚’使用ã—ã¾ã™ã€‚ [Products]Size ã¨ã„ã†ãƒ•ィールド㫠*MyNumber* 変数ã®å€¤ã‚’代入ã™ã‚‹ã«ã¯ã€ä»£å…¥æ¼”ç®—å­ã®å³å´ã« MyNumber を書ãã¾ã™: +ã‚‚ã¡ã‚ã‚“ã€å¤‰æ•°ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–り出ã™ã“ã¨ãŒã§ããªã‘れã°ã€ä¾¿åˆ©ã¨ã¯ã„ãˆã¾ã›ã‚“。 å†åº¦ä»£å…¥æ¼”ç®—å­ã‚’使用ã—ã¾ã™ã€‚ [Products]Size ã¨ã„ã†ãƒ•ィールド㫠_MyNumber_ 変数ã®å€¤ã‚’代入ã™ã‚‹ã«ã¯ã€ä»£å…¥æ¼”ç®—å­ã®å³å´ã« MyNumber を書ãã¾ã™: ```4d [Products]Size:=MyNumber ``` -ã“れã§ã€*[Products]Size* ã®å€¤ã¯3ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ä¾‹ã¯ã¨ã¦ã‚‚å˜ç´”ã§ã™ãŒã€ã‚る場所ã‹ã‚‰åˆ¥ã®å ´æ‰€ã¸ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã•ã›ã‚‹åŸºæœ¬çš„ãªæ‰‹é †ã‚’表ã—ã¦ã„ã¾ã™ã€‚ +ã“れã§ã€_[Products]Size_ ã®å€¤ã¯3ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ä¾‹ã¯ã¨ã¦ã‚‚å˜ç´”ã§ã™ãŒã€ã‚る場所ã‹ã‚‰åˆ¥ã®å ´æ‰€ã¸ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’転é€ã•ã›ã‚‹åŸºæœ¬çš„ãªæ‰‹é †ã‚’表ã—ã¦ã„ã¾ã™ã€‚ é…列è¦ç´ ã«ãƒ‡ãƒ¼ã‚¿ã‚’代入ã™ã‚‹ã«ã¯ä¸­ã‚«ãƒƒã‚³ ({...}) を使用ã—ã¾ã™: @@ -299,7 +166,7 @@ atNames{1}:="Richard" ### ローカル変数 -ローカル変数ã¯ãã®åã®ã¨ãŠã‚Šãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚りã€å¤‰æ•°ãŒä½œæˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ç¯„囲内ã§ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã€ãã®ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰ã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。 メソッド内ã§ãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚ã‚‹ã¨ã„ã†ã®ã¯ã€æ­£å¼ã«ã¯ã€Œã‚¹ã‚³ãƒ¼ãƒ—ãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚ã‚‹ã€ã¨ã„ã„ã¾ã™ã€‚ローカル変数ã¯ã€ãã®ä½¿ç”¨ç¯„囲をメソッド内ã«é™å®šã™ã‚‹ãŸã‚ã«ç”¨ã„ã¾ã™ã€‚ +ローカル変数ã¯ãã®åã®ã¨ãŠã‚Šãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚りã€å¤‰æ•°ãŒä½œæˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã®ç¯„囲内ã§ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã€ãã®ä»–ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰ã¯ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。 メソッド内ã§ãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚ã‚‹ã¨ã„ã†ã®ã¯ã€æ­£å¼ã«ã¯ã€Œã‚¹ã‚³ãƒ¼ãƒ—ãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ã‚ã‚‹ã€ã¨ã„ã„ã¾ã™ã€‚ ローカル変数ã¯ã€ãã®ä½¿ç”¨ç¯„囲をメソッド内ã«é™å®šã™ã‚‹ãŸã‚ã«ç”¨ã„ã¾ã™ã€‚ ローカル変数ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªç›®çš„ã®ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™: @@ -309,9 +176,9 @@ atNames{1}:="Richard" ローカル変数ã®åå‰ã¯å¿…ãšãƒ‰ãƒ«è¨˜å· ($) ã§å§‹ã‚ã€ã“ã®è¨˜å·ã‚’除ã31文字ã¾ã§ã®æ–‡å­—を指定ã§ãã¾ã™ã€‚ ã“れより長ã„åå‰ã‚’指定ã™ã‚‹ã¨ã€4D ã¯ä½™åˆ†ã®32文字以é™ã‚’切りæ¨ã¦ã¾ã™ã€‚ -多ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚„変数をæŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ä½œæ¥­ã™ã‚‹å ´åˆã€ç¾åœ¨ä½œæ¥­ã—ã¦ã„るメソッドã®ç¯„囲内ã§ä¸€æ™‚çš„ã«å¤‰æ•°ãŒå¿…è¦ã¨ãªã‚‹å ´åˆãŒã‚ˆãã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€åŒã˜å¤‰æ•°åãŒä»–ã§ä½¿ç”¨ã•れã¦ã„ãªã„ã‹ã©ã†ã‹ã‚’æ°—ã«ã™ã‚‹ã“ã¨ãªãローカル変数を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +多ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚„変数をæŒã¤ã‚¢ãƒ—リケーションプロジェクトã§ä½œæ¥­ã™ã‚‹å ´åˆã€ç¾åœ¨ä½œæ¥­ã—ã¦ã„るメソッドã®ç¯„囲内ã§ä¸€æ™‚çš„ã«å¤‰æ•°ãŒå¿…è¦ã¨ãªã‚‹å ´åˆãŒã‚ˆãã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€åŒã˜å¤‰æ•°åãŒä»–ã§ä½¿ç”¨ã•れã¦ã„ãªã„ã‹ã©ã†ã‹ã‚’æ°—ã«ã™ã‚‹ã“ã¨ãªãローカル変数を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -データベースã§ã¯ã—ã°ã—ã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹å°‘é‡ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ `Request` コマンドを使ã£ã¦ã€ã“ã®æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’æ±‚ã‚るダイアログボックスを表示ã—〠ユーザーãŒãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ã¨ã€ãã®æƒ…報を戻り値ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸ã€ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§é•·æœŸé–“ç¶­æŒã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã“れã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’使用ã™ã‚‹å…¸åž‹çš„ãªä¾‹ã¨ã„ãˆã¾ã™ã€‚ 次ã«ä¾‹ã‚’示ã—ã¾ã™: +アプリケーションã§ã¯ã—ã°ã—ã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹å°‘é‡ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’å¿…è¦ã¨ã™ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ `Request` コマンドを使ã£ã¦ã€ã“ã®æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’æ±‚ã‚るダイアログボックスを表示ã—〠ユーザーãŒãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹ã¨ã€ãã®æƒ…報を戻り値ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªãƒ‡ãƒ¼ã‚¿ã¯é€šå¸¸ã€ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§é•·æœŸé–“ç¶­æŒã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã“れã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’使用ã™ã‚‹å…¸åž‹çš„ãªä¾‹ã¨ã„ãˆã¾ã™ã€‚ 次ã«ä¾‹ã‚’示ã—ã¾ã™: ```4d $vsID:=Request("ID を入力ã—ã¦ãã ã•ã„:") @@ -322,7 +189,7 @@ atNames{1}:="Richard" ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã« ID を入力ã™ã‚‹ã‚ˆã†ã«è¦æ±‚ã—ã¾ã™ã€‚ ローカル変数 $vsID ã«ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãŒä»£å…¥ã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå…¥åŠ›ã—㟠ID ã«åŸºã¥ã„ãŸæ¤œç´¢ãŒãŠã“ãªã‚れã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒçµ‚了ã—ãŸæ™‚点ã§ã€$vsID ローカル変数ã¯ãƒ¡ãƒ¢ãƒªã‹ã‚‰æ¶ˆåŽ»ã•れã¾ã™ã€‚ ã“ã®å¤‰æ•°ã¯ 1回ã®ã¿ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ã—ã‹ä½¿ã‚れãªã„ãŸã‚ã€ã“れ以上維æŒã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 -**注:** ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れる $1, $2...ç­‰ã®å¼•数㯠ローカル変数ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [パラメーター](Concepts/parameters.md) ã‚’å‚ç…§ãã ã•ã„。 +**注:** ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れる $1, $2...ç­‰ã®å¼•æ•°ã¯ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [パラメーター](Concepts/parameters.md) ã‚’å‚ç…§ãã ã•ã„。 ### プロセス変数 @@ -330,7 +197,7 @@ atNames{1}:="Richard" プロセス変数ã«ã¯åå‰ã«ä»˜ã‘る接頭辞ãŒã‚りã¾ã›ã‚“。 プロセス変数ã®åå‰ã¯ã€æœ€å¤§31文字ã¾ã§ã®é•·ã•ã§æŒ‡å®šã§ãã¾ã™ã€‚ -インタープリターモードã§ã¯ã€å¤‰æ•°ã¯å‹•çš„ã«ãƒ¡ãƒ¢ãƒªä¸Šã«ä½œæˆãƒ»æ¶ˆåŽ»ã•れã¾ã™ã€‚ã“れã«å¯¾ã—ã¦ã‚³ãƒ³ãƒ‘イルモードã§ã¯ã€ä½œæˆã—ãŸã™ã¹ã¦ã®ãƒ—ロセス (ユーザープロセス) ã§åŒã˜ãƒ—ロセス変数定義ãŒå…±æœ‰ã•れã¾ã™ãŒã€å¤‰æ•°ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ãƒ—ロセス毎ã«ç•°ãªã‚‹ã‚‚ã®ã¨ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ—ロセスP_1 ã¨ãƒ—ロセスP_2 ã®ä¸¡æ–¹ã«ãŠã„ã¦ãƒ—ロセス変数 myVar ãŒå­˜åœ¨ã—ã¦ã„ã¦ã‚‚ã€ãれらã¯ãれãžã‚Œåˆ¥ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ +インタープリターモードã§ã¯ã€å¤‰æ•°ã¯å‹•çš„ã«ãƒ¡ãƒ¢ãƒªä¸Šã«ä½œæˆãƒ»æ¶ˆåŽ»ã•れã¾ã™ã€‚ ã“れã«å¯¾ã—ã¦ã‚³ãƒ³ãƒ‘イルモードã§ã¯ã€ä½œæˆã—ãŸã™ã¹ã¦ã®ãƒ—ロセス (ユーザープロセス) ã§åŒã˜ãƒ—ロセス変数定義ãŒå…±æœ‰ã•れã¾ã™ãŒã€å¤‰æ•°ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ãƒ—ロセス毎ã«ç•°ãªã‚‹ã‚‚ã®ã¨ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ—ロセスP_1 ã¨ãƒ—ロセスP_2 ã®ä¸¡æ–¹ã«ãŠã„ã¦ãƒ—ロセス変数 myVar ãŒå­˜åœ¨ã—ã¦ã„ã¦ã‚‚ã€ãれらã¯ãれãžã‚Œåˆ¥ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã™ã€‚ ãƒãƒ¼ã‚¸ãƒ§ãƒ³6よりã€`GET PROCESS VARIABLE` ã‚„ `SET PROCESS VARIABLE` を使用ã—ã¦ã€ã‚るプロセスã‹ã‚‰ä»–ã®ãƒ—ロセスã®ãƒ—ロセス変数ã®å€¤ã‚’å–å¾—ã—ãŸã‚Šã€è¨­å®šã—ãŸã‚Šã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚ ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã®åˆ©ç”¨ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªçжæ³ã«é™å®šã™ã‚‹ã“ã¨ãŒã€è‰¯ã„プログラミングã®ä½œæ³•ã§ã™: @@ -342,10 +209,12 @@ atNames{1}:="Richard" ### インタープロセス変数 -インタープロセス変数ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ã™ã¹ã¦ã®ã‚³ã‚ªãƒšãƒ©ãƒ†ã‚£ãƒ–プロセスã§å…±æœ‰ã•れã¾ã™ã€‚ ã“れらã¯ä¸»ã¨ã—ã¦ãƒ—ãƒ­ã‚»ã‚¹é–“ã§æƒ…報を共有ã™ã‚‹ãŸã‚ã«ä½¿ã‚れã¾ã™ã€‚ +インタープロセス変数ã¯ãƒ—ロジェクト全体ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ã™ã¹ã¦ã®ã‚³ã‚ªãƒšãƒ©ãƒ†ã‚£ãƒ–プロセスã§å…±æœ‰ã•れã¾ã™ã€‚ ã“れらã¯ä¸»ã¨ã—ã¦ãƒ—ãƒ­ã‚»ã‚¹é–“ã§æƒ…報を共有ã™ã‚‹ãŸã‚ã«ä½¿ã‚れã¾ã™ã€‚ > プリエンプティブプロセスã«ãŠã„ã¦ã¯ä½¿ç”¨ã§ããªã„ã“ã¨ã¨ã€ã‚³ãƒ¼ãƒ‰ã®ä¿å®ˆç®¡ç†ã‚’煩雑ã«ã™ã‚‹ã“ã¨ã‹ã‚‰ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 インタープロセス変数ã®åå‰ã¯ã€å¿…ãšã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹è¨˜å· (<>) ã§å§‹ã‚ã¾ã™ã€‚記å·ã®å¾Œã«31ãƒã‚¤ãƒˆã¾ã§ã®åå‰ã‚’指定ã§ãã¾ã™ã€‚ -クライアント/サーãƒãƒ¼ã§ã¯ã€å„マシン (クライアントマシンã¨ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³) ã§åŒã˜ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数定義を共有ã—ã¾ã™ãŒã€ãƒžã‚·ãƒ³ã”ã¨ã«å„変数ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒå­˜åœ¨ã—ã¾ã™ã€‚ \ No newline at end of file +クライアント/サーãƒãƒ¼ã§ã¯ã€å„マシン (クライアントマシンã¨ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³) ã§åŒã˜ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数定義を共有ã—ã¾ã™ãŒã€ãƒžã‚·ãƒ³ã”ã¨ã«å„変数ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒå­˜åœ¨ã—ã¾ã™ã€‚ + + diff --git a/website/translated_docs/ja/Debugging/basics.md b/website/translated_docs/ja/Debugging/basics.md new file mode 100644 index 00000000000000..e988141ef6ba81 --- /dev/null +++ b/website/translated_docs/ja/Debugging/basics.md @@ -0,0 +1,97 @@ +--- +id: basics +title: ç”»é¢ã®èª¬æ˜Ž +--- + +ã‚¨ãƒ©ãƒ¼ã¯æ—¥å¸¸çš„ãªã‚‚ã®ã§ã™ã€‚ 相当行数ã®ã‚³ãƒ¼ãƒ‰ã‚’書ã„ã¦ã„ã‚‹ã®ã«ã€1ã¤ã‚‚エラーãŒå‡ºãªã„ã¨ã„ã†ã®ã¯éžå¸¸ã«ã¾ã‚Œã§ã™ã€‚ ã‚€ã—ã‚ã€ã‚¨ãƒ©ãƒ¼ã«å¯¾å¿œãƒ»ä¿®æ­£ã™ã‚‹ã“ã¨ã¯æ™®é€šã®ã“ã¨ãªã®ã§ã™ã€‚ + +4D ã®é–‹ç™ºç’°å¢ƒã«ã¯ã€ã‚らゆる種類ã®ã‚¨ãƒ©ãƒ¼ã«å¯¾å¿œã™ã‚‹ãŸã‚ã®ãƒ‡ãƒãƒƒã‚°ãƒ„ールãŒç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ + +## エラーã®ç¨®é¡ž + +### タイプミス + +タイプミスã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ã‚ˆã£ã¦æ¤œå‡ºã•れã¾ã™ã€‚ ã“れらã¯èµ¤è‰²ã§ç¤ºã•れã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸‹éƒ¨ã«è¿½åŠ æƒ…å ±ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 以下ã¯ã‚¿ã‚¤ãƒ—ミスã®ä¾‹ã§ã™: + +![ブレークãƒã‚¤ãƒ³ãƒˆ](assets/en/Debugging/typing-error.png) + + +ã“ã®ã‚ˆã†ãªã‚¿ã‚¤ãƒ—ミスã¯é€šå¸¸ã€ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã®åŽŸå› ã¨ãªã‚Šã¾ã™ (上ã®ä¾‹ã§ã¯ã€ãƒ†ãƒ¼ãƒ–ルåãŒé–“é•ã£ã¦ã„ã¾ã™)。 コードã®è©²å½“行ã®ç·¨é›†ã‚’確定ã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªå ´åˆã‚¿ã‚¤ãƒ—ミスを修正ã—㦠Enterキーを押ã™ã¨ã€å†åº¦ã‚³ãƒ¼ãƒ‰ã®æ¤œè¨¼ãŒãŠã“ãªã‚れã¾ã™ã€‚ + +### シンタックスエラー + +メソッドã®å®Ÿè¡Œæ™‚ã«é™ã£ã¦ã€ã¨ã‚‰ãˆã‚‹ã“ã¨ã®ã§ãるエラーãŒã‚りã¾ã™ã€‚ [シンタックスエラーウィンドウ](#シンタックスエラーウィンドウ) ã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸéš›ã«è¡¨ç¤ºã•れã¾ã™: ãŸã¨ãˆã°: + +![シンタックスエラー](assets/en/Debugging/syntax-error.png) + +**詳細** エリアを展開ã™ã‚‹ã¨ã€æœ€æ–°ã®ã‚¨ãƒ©ãƒ¼ã¨ç•ªå·ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +### 環境エラー + +時ã«ã€BLOB を作æˆã™ã‚‹ãŸã‚ã®å分ãªãƒ¡ãƒ¢ãƒªãŒãªã„å ´åˆãŒã‚りã¾ã™ã€‚ ディスク上ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã—ãŸæ™‚ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒå­˜åœ¨ã—ãªã„ã‹ã€ä»–ã®ã‚¢ãƒ—リケーションã«ã‚ˆã‚Šæ—¢ã«é–‹ã‹ã‚Œã¦ã„ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ã¯ã€ã‚³ãƒ¼ãƒ‰ã‚„ãã®æ›¸ã方を直接ã®åŽŸå› ã¨ã—ã¦ç™ºç”Ÿã™ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 ã»ã¨ã‚“ã©ã®å ´åˆã€ã“ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ã¯ `ON ERR CALL` コマンドã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れ㟠[エラー処ç†ãƒ¡ã‚½ãƒƒãƒ‰](Concepts/error-handling.md) ã§ç°¡å˜ã«å¯¾å‡¦ã§ãã¾ã™ã€‚ + +### 設計ã¾ãŸã¯ãƒ­ã‚¸ãƒƒã‚¯ã‚¨ãƒ©ãƒ¼ + +一般ã«ã€ã“れらã¯ç™ºè¦‹ãŒæœ€ã‚‚難ã—ã„タイプã®ã‚¨ãƒ©ãƒ¼ã§ã™ã€‚ ã“れã¾ã§ã«èª¬æ˜Žã—ã¦ã„るエラーã¯ã€ã‚¿ã‚¤ãƒ—ミスを除ã„ã¦ã€"設計ã¾ãŸã¯ãƒ­ã‚¸ãƒƒã‚¯ã®ã‚¨ãƒ©ãƒ¼" ã¨ã„ã†ç¯„ç–‡ã«è©²å½“ã—ã¾ã™ã€‚ ã“れらを検知ã™ã‚‹ã«ã¯ã€[デãƒãƒƒã‚¬ãƒ¼](debugger.md) を使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: + +- ã¾ã åˆæœŸåŒ–ã•れã¦ã„ãªã„変数を用ã„よã†ã¨ã—ãŸãŸã‚ã€*シンタックスエラー* ãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ +- é–“é•ã£ãŸå¼•æ•°ã‚’å—ã‘å–ã£ãŸã‚µãƒ–ルーãƒãƒ³ãŒã€ãã®é–“é•ã£ãŸåå‰ã«ã‚ˆã‚Šãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’é–‹ã“ã†ã¨ã—ãŸãŸã‚ã€*環境エラー* ãŒç™ºç”Ÿã—ã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ + +設計ã¾ãŸã¯ãƒ­ã‚¸ãƒƒã‚¯ã®ã‚¨ãƒ©ãƒ¼ã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªå ´åˆã‚‚ã‚りã¾ã™: + +- `SAVE RECORD` コマンドを呼ã³å‡ºã™éš›ã«ã€å¯¾è±¡ã¨ãªã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãƒ­ãƒƒã‚¯ã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã‚’最åˆã«ãƒ†ã‚¹ãƒˆã—ãªã‹ã£ãŸãŸã‚ã«ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒæ­£ã—ãæ›´æ–°ã•れãªã„。 +- オプション引数を追加ã—ãŸçŠ¶æ…‹ãŒãƒ†ã‚¹ãƒˆã•れã¦ã„ãªã„ãŸã‚ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒæƒ³å®šé€šã‚Šã«å‹•作ã—ãªã„。 + +å ´åˆã«ã‚ˆã£ã¦å•題ã®åŽŸå› ã¯ã€å®Ÿéš›ã«ä¸­æ–­ãŒç™ºç”Ÿã—ã¦ã„るコード部分ã§ã¯ãªãã€å¤–部ã«ã‚ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ + +### ランタイムエラー + +アプリケーションモードã§ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã§ã¯æ±ºã—ã¦è¦‹ã‚‰ã‚Œãªã„エラーãŒç™ºç”Ÿã™ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ 次ã«ä¾‹ã‚’示ã—ã¾ã™: + +![ランタイムエラー](assets/en/Debugging/runtimeError.png) + +å•題ã®åŽŸå› ã‚’è¿…é€Ÿã«ç™ºè¦‹ã™ã‚‹ã«ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®åå‰ã¨è¡Œç•ªå·ã‚’記録ã—ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リター版をå†ã³é–‹ã„ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®è©²å½“行を確èªã—ã¾ã™ã€‚ + +## シンタックスエラーウィンドウ + +メソッドã®å®Ÿè¡ŒãŒåœæ­¢ã•れるã¨ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã“れã¯ä»¥ä¸‹ã®ç†ç”±ã§èµ·ã“りã¾ã™: + +- 以é™ã®ãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡Œã‚’妨ã’るエラーãŒç™ºç”Ÿã—ãŸã€‚ +- メソッド㌠False ã®è¡¨æ˜Žã‚’生æˆã—㟠(`ASSERT` コマンドå‚ç…§)。 + +![シンタックスエラー](assets/en/Debugging/syntax-error.png) + +上部テキストエリアã«ã¯ã€ã‚¨ãƒ©ãƒ¼ã®èª¬æ˜Žãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 下部テキストエリアã«ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸæ™‚ã®å®Ÿè¡Œè¡ŒãŒè¡¨ç¤ºã•れã¾ã™ã€‚エラーãŒç™ºç”Ÿã—ãŸã‚¨ãƒªã‚¢ã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ 詳細ボタンをクリックã™ã‚‹ã¨ã€ãƒ—ロセスã®ã‚¨ãƒ©ãƒ¼ã‚¹ã‚¿ãƒƒã‚¯ã‚’表示ã™ã‚‹ã‚¨ãƒªã‚¢ã‚’展開ã§ãã¾ã™ã€‚ + +シンタックスエラーウィンドウã«ã¯ã„ãã¤ã‹ã®ã‚ªãƒ—ションãŒç”¨æ„ã•れã¦ã„ã¾ã™: + +- **編集**: ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡ŒãŒä¸­æ–­ã•れã¾ã™ã€‚ 4D ã¯ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã«åˆ‡ã‚Šæ›¿ã‚りã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§è¡¨ç¤ºã•れã€ã‚¨ãƒ©ãƒ¼ã‚’修正㙠るã“ã¨ãŒã§ãã¾ã™ã€‚ 原因ã«å¿ƒå½“ãŸã‚ŠãŒã‚りã€ã“れ以上調査ã—ãªãã¦ã‚‚修正ã§ãã‚‹å ´åˆã«ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ + +- **トレース**: トレース/デãƒãƒƒã‚¬ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã™ã€‚ [デãƒãƒƒã‚¬ãƒ¼](debugger.md) ウィンドウãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 該当行ã®ä¸€éƒ¨ãŒæœªå®Ÿè¡Œã®å ´åˆã«ã¯ã€**トレース** ボタンを数回クリックã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 + +- **続行**: 実行ãŒç¶™ç¶šã•れã¾ã™ã€‚ エラーãŒç™ºç”Ÿã—ãŸè¡Œã¯ã€ã‚¨ãƒ©ãƒ¼ã®ä½ç½®ã«ã‚ˆã£ã¦ã¯ä¸€éƒ¨ã®ã¿å®Ÿè¡Œæ¸ˆã¿ã§ã‚ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ æ…Žé‡ã«å®Ÿè¡Œã‚’継続ã—ã¦ãã ã•ã„: エラーãŒåŽŸå› ã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®æ®‹ã‚Šéƒ¨åˆ†ãŒæ­£å¸¸ã«å®Ÿè¡Œã§ããªã„å ´åˆãŒã‚りã¾ã™ã€‚ `SET WINDOW TITLE` ã®ã‚ˆã†ã«ã€ã‚³ãƒ¼ãƒ‰ã®æ®‹ã‚Šã®éƒ¨åˆ†ã®å®Ÿè¡Œã‚„テストã®å¦¨ã’ã«ãªã‚‰ãªã„å˜ç´”ãªå‘¼ã³å‡ºã—ã§ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€**続行** ボタンをクリックã™ã‚‹ã“ã¨ã‚’推奨ã—ã¾ã™ã€‚ + +> Tips: ループ中ãªã©ã§ç¹°ã‚Šè¿”ã—発生ã™ã‚‹ã‚¨ãƒ©ãƒ¼ã®å ´åˆã«ã¯ã€**続行** ボタンを **無視** ボタンã«å¤‰æ›´ã§ãã¾ã™ã€‚ **続行**ãƒœã‚¿ãƒ³ãŒæœ€åˆã«ç¾ã‚ŒãŸã¨ãã«ã€**Alt**キー (Windows) ã¾ãŸã¯ **Option**キー (macOS) を押ã—ãªãŒã‚‰ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€åŒã˜ã‚¨ãƒ©ãƒ¼ã«ã‚ˆã£ã¦ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒå‘¼ã³å‡ºã•れãŸã¨ãã«ã¯ã€ãƒœã‚¿ãƒ³ãƒ©ãƒ™ãƒ«ãŒ **無視** ã¸ã¨å¤‰åŒ–ã—ã¾ã™ã€‚ + +- **アボート**: メソッドãŒä¸­æ–­ã•れã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œã‚’é–‹å§‹ã™ã‚‹å‰ã®çŠ¶æ…‹ã«æˆ»ã‚Šã¾ã™: + + - イベントã«å¯¾ã—ã¦ãƒ•ォームメソッドã¾ãŸã¯ã‚ªãƒ–ジェクトメソッドãŒå®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“れらã¯åœæ­¢ã•れã€ãƒ•ã‚©ãƒ¼ãƒ ã«æˆ»ã‚Šã¾ã™ã€‚ + - メソッドãŒã‚¢ãƒ—リケーションモードã‹ã‚‰å®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã®ãƒ¢ãƒ¼ãƒ‰ã«æˆ»ã‚Šã¾ã™ã€‚ + +- **コピー**: デãƒãƒƒã‚°æƒ…報をクリップボードã«ã‚³ãƒ”ーã—ã¾ã™ã€‚ ã“ã®æƒ…å ±ã¯ã‚¨ãƒ©ãƒ¼ã®å†…部環境 (番å·ã‚„内部コンãƒãƒ¼ãƒãƒ³ãƒˆç­‰) を説明ã—ã¾ã™ã€‚ 情報ã¯ã‚¿ãƒ–区切り形å¼ã§è¨˜è¿°ã•れã¾ã™ã€‚ + +- **ä¿å­˜...**: シンタックスエラーウィンドウã®å†…容ã¨ã‚³ãƒ¼ãƒ«ãƒã‚§ãƒ¼ãƒ³ã‚’ `.txt` ファイルã«ä¿å­˜ã—ã¾ã™ã€‚ + +## デãƒãƒƒã‚¬ãƒ¼ + +エラー検出ã®éš›ã«ã‚ˆãã‚ã‚‹åˆæ­©çš„ãªå¤±æ•—ã¯ã€ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã® **アボート** ボタンをクリックã—ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«æˆ»ã‚Šã€ã‚³ãƒ¼ãƒ‰ã‚’表示ã—ã¦åŽŸå› ã‚’ç¢ºèªã—よã†ã¨ã™ã‚‹ã“ã¨ã§ã™ã€‚ ã“ã‚Œã¯æ­¢ã‚ã¦ãã ã•ã„。 **デãƒãƒƒã‚¬ãƒ¼** を常ã«ä½¿ç”¨ã™ã‚Œã°ã€ç›¸å½“ã®æ™‚é–“ã¨åŠ´åŠ›ã‚’ç¯€æ¸›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デãƒãƒƒã‚¬ãƒ¼ã‚’使ã†ã¨ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ステップã”ã¨ã«ã‚†ã£ãりã¨å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ デãƒãƒƒã‚¬ãƒ¼ã¯ã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸç†ç”±ã‚’知るãŸã‚ã«å¿…è¦ãªæƒ…報を表示ã§ãã¾ã™ã€‚ ã“ã®æƒ…å ±ãŒã‚れã°ã€ã‚¨ãƒ©ãƒ¼ã®ä¿®æ­£æ–¹æ³•ã¯ã‚ã‹ã‚Šã¾ã™ã€‚ + +デãƒãƒƒã‚¬ãƒ¼ã‚’使用ã™ã‚‹ã‚‚ㆠ1ã¤ã®ç†ç”±ã¯ã€ã‚³ãƒ¼ãƒ‰ã®ä½œæˆã§ã™ã€‚ ã„ã¤ã‚‚以上ã«è¤‡é›‘ãªã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã‚’作æˆã—ã¦ã—ã¾ã†å ´åˆãŒã‚りã¾ã™ã€‚ 锿ˆæ„Ÿã“ãã‚りã¾ã™ãŒã€ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒæ­£ã—ã„ã‹ã©ã†ã‹ã¯ 100%確ã‹ã¨ã¯ã„ãˆã¾ã›ã‚“。 見当もã¤ã‹ãªã„ã¾ã¾å®Ÿè¡Œã™ã‚‹ã®ã§ã¯ãªãã€ã‚³ãƒ¼ãƒ‰ã®æœ€åˆã§ `TRACE` コマンドを使用ã—ã¾ã™ã€‚ãã®å¾Œã€ã‚³ãƒ¼ãƒ‰ã‚’ステップã”ã¨ã«å®Ÿè¡Œã—ã¦ã€å‹•作を監視ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ブレーク + +デãƒãƒƒã‚°ä½œæ¥­ã§ã¯ã€ã‚³ãƒ¼ãƒ‰ã®ä¸€éƒ¨ã®ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’特定ã®è¡Œã¾ã§ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ ã¾ãŸã€ã‚ã‚‹å¼ãŒç‰¹å®šã®å€¤ã«ãªã£ãŸæ™‚ (例: "$myVar > 1000") ã‚„ã€ç‰¹å®šã® 4DコマンドãŒå‘¼ã³å‡ºã•れるãŸã³ã«ã‚³ãƒ¼ãƒ‰ã‚’トレースã—ãŸã„å ´åˆã‚‚ã‚りã¾ã™ã€‚ + +ã“ã®ã‚ˆã†ãªãƒ‹ãƒ¼ã‚ºã«å¯¾å¿œã™ã‚‹ãŸã‚ã«ã€**ブレークãƒã‚¤ãƒ³ãƒˆ** 㨠**キャッãƒã‚³ãƒžãƒ³ãƒ‰** 機能ãŒç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ ã“ã‚Œã‚‰ã®æ©Ÿèƒ½ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラーã‹ã‚‰è¨­å®šã§ãã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Debugging/breakpoints.md b/website/translated_docs/ja/Debugging/breakpoints.md new file mode 100644 index 00000000000000..1745a01348b82c --- /dev/null +++ b/website/translated_docs/ja/Debugging/breakpoints.md @@ -0,0 +1,125 @@ +--- +id: breakpoints +title: ブレークãƒã‚¤ãƒ³ãƒˆã¨ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ +--- + +## æ¦‚è¦ + + +ブレークãƒã‚¤ãƒ³ãƒˆã¨ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ã¯ã€éžå¸¸ã«åŠ¹çŽ‡çš„ãªãƒ‡ãƒãƒƒã‚°æ‰‹æ³•ã§ã™ã€‚ ã©ã¡ã‚‰ã‚‚ã€ã‚³ãƒ¼ãƒ‰ã®å®Ÿè¡Œã‚’ä»»æ„ã®ã‚¹ãƒ†ãƒƒãƒ—ã§ä¸€æ™‚åœæ­¢ã•ã›ã‚‹ (ã¾ã è¡¨ç¤ºã•れã¦ã„ãªã„å ´åˆã¯ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã•ã›ã‚‹) ã¨ã„ã†åŒã˜åŠ¹æžœãŒã‚りã¾ã™ã€‚ + +ブレークãƒã‚¤ãƒ³ãƒˆã¯ã€å®Ÿè¡Œã‚’ä¸€æ™‚åœæ­¢ã•ã›ãŸã„コードã®ä»»æ„ã®è¡Œã«è¨­å®šã—ã¾ã™ã€‚ ブレークãƒã‚¤ãƒ³ãƒˆã«ã¯æ¡ä»¶ã‚’関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +キャッãƒã‚³ãƒžãƒ³ãƒ‰ã¯ã€ç‰¹å®šã®ã‚³ãƒžãƒ³ãƒ‰ãŒå‘¼ã³å‡ºã•ã‚ŒãŸæ™‚点ã§ã€å‘¼ã³å‡ºã—元プロセスã®å®Ÿè¡Œã‚’トレース開始ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## ブレークãƒã‚¤ãƒ³ãƒˆ + + +ブレークãƒã‚¤ãƒ³ãƒˆã‚’設定ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã¾ãŸã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚¨ãƒªã‚¢ã®å·¦ãƒžãƒ¼ã‚¸ãƒ³å†…をクリックã—ã¾ã™ã€‚ + +次ã®å›³ã§ã¯ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆ (赤ã„点) ãŒãƒ‡ãƒãƒƒã‚¬ãƒ¼å†…ã§ã€`If ($in.dataClass#Null)` ã®è¡Œã«è¨­å®šã•れã¦ã„ã¾ã™: + +![ブレークãƒã‚¤ãƒ³ãƒˆ](assets/en/Debugging/break.png) + +上ã®çŠ¶æ…‹ã§ [**トレース終了**](./debugger.md/#トレース終了) ボタンをクリックã™ã‚‹ã¨ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆãŒè¨­å®šã•れãŸè¡Œã¾ã§å®Ÿè¡ŒãŒå†é–‹ã•れã¾ã™ã€‚ ãã®å¾Œã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã§ç¤ºã•れãŸè¡Œã¯å®Ÿè¡Œã•れãšã«ã€ãƒˆãƒ¬ãƒ¼ã‚¹ãƒ¢ãƒ¼ãƒ‰ã¸ 戻りã¾ã™ã€‚ プログラムカウンターより下方㮠(後ã«å®Ÿè¡Œã•れる) 行ã«ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’設定ã—ã€**トレース終了** ボタンをクリックã™ã‚‹ã¨ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã¾ã§ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’スキップã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +赤色ã®ç‚¹ã‚’クリックã™ã‚‹ã¨ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã¯å‰Šé™¤ã•れã¾ã™ã€‚ + + +### ブレークãƒã‚¤ãƒ³ãƒˆãƒ—ロパティ + +ブレークãƒã‚¤ãƒ³ãƒˆãƒ—ロパティウィンドウを使ã£ã¦ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã®ãµã‚‹ã¾ã„を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![ブレークãƒã‚¤ãƒ³ãƒˆãƒ—ロパティ](assets/en/Debugging/breakpoint-properties.png) + +ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ãŠã‚ˆã³ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã® [ソースコードエリア](debugger.md#ソースコードエリア) ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ æ¬¡ã®æ“作ãŒãŠã“ãªãˆã¾ã™: + +- ä»»æ„ã®è¡Œã‚’å³ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **ブレークãƒã‚¤ãƒ³ãƒˆã‚’編集...** ã‚’é¸æŠžã™ã‚‹ã€‚ +- 左マージン内㧠`Alt+クリック` (Windows) ã¾ãŸã¯ `Option+クリック` (macOS) を実行ã™ã‚‹ã€‚ + +ブレークãƒã‚¤ãƒ³ãƒˆãŒæ—¢ã«å­˜åœ¨ã™ã‚‹å ´åˆã€ãã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã«ã¤ã„ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãれ以外ã®å ´åˆã¯ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆãŒæ–°è¦ä½œæˆã•れã€ãã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã«é–¢ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã—ã¾ã™ã€‚ + +プロパティã¯ã€æ¬¡ã®é€šã‚Šã§ã™: + +* **場所**: メソッドåã¨ãƒ–レークãƒã‚¤ãƒ³ãƒˆãŒè¨­å®šã•れã¦ã„る行番å·ã‚’示ã—ã¾ã™ã€‚ +* **次ã®å¼ãŒçœŸã®ã¨ãブレーク**: `True` ã¾ãŸã¯ `False` を返㙠4Dフォーミュラを入力ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€**æ¡ä»¶ä»˜ãブレークãƒã‚¤ãƒ³ãƒˆ** を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€`Records in selection(\[aTable])=0` ã¨å…¥åŠ›ã™ã‚‹ã¨ã€ãƒ†ãƒ¼ãƒ–ル \[aTable] ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã«é™ã£ã¦ãƒ–レークãŒç™ºç”Ÿã—ã¾ã™ã€‚ ブレークãƒã‚¤ãƒ³ãƒˆã®æ¡ä»¶ã¯ã€[ブレークリスト](#ブレークリスト)ã® **æ¡ä»¶** カラムã§ã‚‚確èªã§ãã¾ã™ã€‚ +* **ブレークã®å‰ã«ã‚¹ã‚­ãƒƒãƒ—ã™ã‚‹å›žæ•°**: ループ構造 (Whileã€Repeatã€For) 内ã€ã¾ãŸã¯ãƒ«ãƒ¼ãƒ—ã‹ã‚‰å‘¼ã³å‡ºã•れã¦ã„るサブルーãƒãƒ³ã‚„関数内ã®ã‚³ãƒ¼ãƒ‰è¡Œã«ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* **ブレークãƒã‚¤ãƒ³ãƒˆãŒç„¡åйã§ã™**: ブレークãƒã‚¤ãƒ³ãƒˆãŒç¾åœ¨ã¯å¿…è¦ã§ãªã„ã‚‚ã®ã®ã€å¾Œã§å¿…è¦ã«ãªã‚‹ã‹ã‚‚ã—れãªã„å ´åˆã«ã¯ã€ä¸€æ™‚çš„ã«ç„¡åйã«ã—ã¦ãŠãã“ã¨ãŒã§ãã¾ã™ã€‚ 無効ãªãƒ–レークãƒã‚¤ãƒ³ãƒˆã¯ã€ç‚¹ (ï½¥) ã§ã¯ãªããƒ€ãƒƒã‚·ãƒ¥è¨˜å· (-) ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + + +### リモートデãƒãƒƒã‚°ã§ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆ + +ブレークãƒã‚¤ãƒ³ãƒˆã®ä¸€è¦§ã¯ãƒ­ãƒ¼ã‚«ãƒ«ã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ リモートデãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€èµ·å‹•ã—ãŸãƒ‡ãƒãƒƒã‚¬ãƒ¼ãŒãƒªãƒ¢ãƒ¼ãƒˆ4D ã ã£ãŸå ´åˆã€ãƒ‡ãƒãƒƒã‚°ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®é–“ã¯ãƒªãƒ¢ãƒ¼ãƒˆã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆä¸€è¦§ãŒã‚µãƒ¼ãƒãƒ¼ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆä¸€è¦§ã‚’一時的ã«ç½®ãæ›ãˆã¾ã™ã€‚ + +サーãƒãƒ¼ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆä¸€è¦§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ãƒ‡ãƒãƒƒã‚¬ãƒ¼ãŒèµ·å‹•ã—ãŸå ´åˆã«ã¯è‡ªå‹•çš„ã«å¾©å…ƒã•れ使用ã•れã¾ã™ã€‚ + +### ブレークリスト + +ブレークリストã¯ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦åˆã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ä½œæˆã—ãŸãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’管ç†ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラã®ãƒšãƒ¼ã‚¸ã§ã™ã€‚ ランタイムエクスプローラーã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[デザインリファレンスマニュアル](https://doc.4d.com/4Dv19/4D/19/Runtime-Explorer.200-5416614.ja.html) ã‚’å‚ç…§ãã ã•ã„。 + +ブレークリストã®ãƒšãƒ¼ã‚¸ã‚’é–‹ãã«ã¯: + +1. **実行** メニューã‹ã‚‰ **ランタイムエクスプローラー...** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +2. **ブレーク** タブをクリックã—ã¦ã€ãƒ–レークリストを表示ã•ã›ã¾ã™: + +![ランタイムエクスプローラーã®ãƒ–レークリスト](assets/en/Debugging/break-list.png) + +ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’使用ã—ã¦ã€ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã§ã™: + +* ブレークãƒã‚¤ãƒ³ãƒˆã® **æ¡ä»¶** を設定ã™ã‚‹ã€‚ +* マージンã®èµ¤ã„点をクリックã—ã¦ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’ãれãžã‚Œæœ‰åŠ¹ãƒ»ç„¡åŠ¹åŒ–ã™ã‚‹ã€‚ 無効化ã•れãŸãƒ–レークãƒã‚¤ãƒ³ãƒˆã¯é€æ˜Žãª (è–„ã„赤ã®) 点ã§è¡¨ã•れã¾ã™ã€‚ +* `Delete` ã¾ãŸã¯ `Backspace` キーを押ã™ã‹ã€ãƒªã‚¹ãƒˆä¸‹ã®**削除** ボタンをクリックã—ã¦ã€ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’削除ã™ã‚‹ã€‚ +* ブレークãƒã‚¤ãƒ³ãƒˆã‚’ダブルクリックã—ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§å¯¾è±¡ãƒ¡ã‚½ãƒƒãƒ‰ã‚’é–‹ã。 + +ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã‚‰æ–°ã—ã„ブレークãƒã‚¤ãƒ³ãƒˆã‚’追加ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ブレークãƒã‚¤ãƒ³ãƒˆã¯ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã®ã¿è¨­å®šã§ãã¾ã™ã€‚ + + +## コマンドã®ã‚­ãƒ£ãƒƒãƒ + +**キャッãƒ** コマンドリストã¯ã€4Dコマンドã®å‘¼ã³å‡ºã—ã‚’æ•æ‰ã—ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã™ã‚‹ã‚ˆã†æŒ‡ç¤ºã™ã‚‹ã“ã¨ãŒã§ãるランタイムエクスプローラã®ãƒšãƒ¼ã‚¸ã§ã™ã€‚ 特定メソッドã®ç‰¹å®šè¡Œã«åŠ¹æžœãŒé™å®šã•れるブレークãƒã‚¤ãƒ³ãƒˆã¨ã¯ç•°ãªã‚Šã€ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ã¯ã€ã™ã¹ã¦ã®ãƒ—ロセスãŠã‚ˆã³ãƒ¡ã‚½ãƒƒãƒ‰ãŒå¯¾è±¡ã¨ãªã‚Šã¾ã™ã€‚ + +キャッãƒã‚³ãƒžãƒ³ãƒ‰ (ã‚³ãƒžãƒ³ãƒ‰æ•æ‰) ã¯ã€å„所ã«ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’設定ã™ã‚‹ã“ã¨ãªãã€å¤§ããªç¯„囲ã§ãƒˆãƒ¬ãƒ¼ã‚¹ã‚’ãŠã“ãªãˆã‚‹ä¾¿åˆ©ãªæ–¹æ³•ã§ã™ã€‚ ãŸã¨ãˆã°ã€ã„ãã¤ã‹ã®ãƒ—ロセスを実行ã—ãŸå¾Œã«ã€å‰Šé™¤ã™ã¹ãã§ãªã„レコードãŒå‰Šé™¤ã•れã¦ã—ã¾ã†å ´åˆã«ã¯ã€`DELETE RECORD` ã‚„ `DELETE SELECTION` ã¨ã„ã£ãŸã‚³ãƒžãƒ³ãƒ‰ã®å‡¦ç†ã‚’キャッãƒã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€èª¿æŸ»ã®ç¯„囲を狭ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ キャッãƒå¯¾è±¡ã®ã‚³ãƒžãƒ³ãƒ‰ãŒå‘¼ã³å‡ºã•れるãŸã³ã«ãƒ‡ãƒãƒƒã‚¬ãƒ¼ãŒèµ·å‹•ã•れるã®ã§ã€å•題ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå‰Šé™¤ã•れã¦ã—ã¾ã†çµŒç·¯ã‚’調ã¹ã€ã‚³ãƒ¼ãƒ‰ã®èª¤ã£ãŸç®‡æ‰€ã‚’çªãæ­¢ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ブレークãƒã‚¤ãƒ³ãƒˆã¨ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ã¯çµ„ã¿åˆã‚ã›ã¦ä½¿ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +キャッãƒã‚³ãƒžãƒ³ãƒ‰ãƒšãƒ¼ã‚¸ã‚’é–‹ãã«ã¯: + +1. **実行** メニューã‹ã‚‰ **ランタイムエクスプローラ...** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +2. **キャッãƒ** タブをクリックã™ã‚‹ã¨ã€ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•れã¾ã™: + +![ランタイムエクスプローラーウィンドウ](assets/en/Debugging/catch-command.png) + +ã“ã®ãƒšãƒ¼ã‚¸ã¯ã€å®Ÿè¡Œä¸­ã«ã‚­ãƒ£ãƒƒãƒã•れるコマンドをリスト表示ã—ã¾ã™ã€‚ リスト㯠2ã¤ã®åˆ—ã§æ§‹æˆã•れã¦ã„ã¾ã™: + +* å·¦ã®åˆ—ã«ã¯ã€ã‚­ãƒ£ãƒƒãƒã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã®æœ‰åй/無効状æ³ã¨ã€ã‚³ãƒžãƒ³ãƒ‰åãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +* å³ã®åˆ—ã«ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ã«é–¢é€£ã™ã‚‹æ¡ä»¶ (ã‚れã°) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +キャッãƒã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’æ–°ã—ã追加ã™ã‚‹ã«ã¯: + +1. リスト下部ã«ã‚ã‚‹ **æ–°è¦ã‚­ãƒ£ãƒƒãƒã‚’追加** ボタン (+) をクリックã—ã¾ã™ã€‚ `ALERT` コマンドをデフォルトã¨ã—ã¦æ–°ã—ã„エントリーãŒè¿½åŠ ã•れã¾ã™ã€‚ +2. 次㫠**ALERT** ラベルをクリックã—ã€ã‚­ãƒ£ãƒƒãƒã—ãŸã„コマンドã®åå‰ã‚’入力ã—ã¾ã™ã€‚入力ã—ãŸã‚‰ã€**Enter**キーを押ã—ã¦é¸æŠžã‚’確定ã•ã›ã¾ã™ã€‚ + +キャッãƒã‚³ãƒžãƒ³ãƒ‰ã‚’無効ã€ã‚ã‚‹ã„ã¯æœ‰åйã«ã™ã‚‹ã«ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ©ãƒ™ãƒ«ã®å‰ã«ã‚る点 (•) をクリックã—ã¾ã™ã€‚ 逿˜Žãª (è–„ã„赤ã®) 点ã¯ã€ã‚­ãƒ£ãƒƒãƒãŒç„¡åŠ¹åŒ–ã•れã¦ã„ã‚‹ã“ã¨ã‚’表ã—ã¾ã™ã€‚ + +> コマンドキャッãƒã®ç„¡åŠ¹åŒ–ã¯ã€å‰Šé™¤ã™ã‚‹ã®ã¨ã»ã¼åŒç­‰ã®åŠ¹æžœãŒã‚りã¾ã™ã€‚ 実行中ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã¯ã»ã¼å…¨ãã¨è¨€ã£ã¦ã„ã„ã»ã©ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã«æ™‚間を使ã„ã¾ã›ã‚“。 エントリーを無効化ã™ã‚‹ã“ã¨ã®åˆ©ç‚¹ã¯ã€ãれãŒå†ã³å¿…è¦ã«ãªã£ãŸã¨ã一ã‹ã‚‰ä½œã‚Šç›´ã•ãªãã¦è‰¯ã„ã¨ã„ã†ç‚¹ã§ã™ã€‚ + +キャッãƒã‚³ãƒžãƒ³ãƒ‰ã‚’削除ã™ã‚‹ã«ã¯: + +1. リスト中ã®ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã—ã¾ã™ã€‚ +2. **Backspace** ã¾ãŸã¯ **Delete** キーを押ã™ã‹ã€ãƒªã‚¹ãƒˆä¸‹éƒ¨ã«ã‚ã‚‹ **削除** ボタンをクリックã—ã¾ã™ã€‚キャッãƒã‚³ãƒžãƒ³ãƒ‰ã‚’ã™ã¹ã¦å‰Šé™¤ã™ã‚‹ã«ã¯ã€**ã™ã¹ã¦ã‚’削除** ボタンをクリックã—ã¾ã™ã€‚ + +### キャッãƒã‚³ãƒžãƒ³ãƒ‰ã«æ¡ä»¶ã‚’設定ã™ã‚‹ + +1. エントリーã®å³ã®åˆ—をクリックã—ã¾ã™ã€‚ +2. ブール値を返㙠4Dフォーミュラ (å¼ã€ã‚³ãƒžãƒ³ãƒ‰ã‚„プロジェクトメソッド) を入力ã™ã‚‹ã€‚ + +> æ¡ä»¶ã‚’削除ã™ã‚‹ã«ã¯ãƒ•ォーミュラを削除ã—ã¾ã™ã€‚ + +æ¡ä»¶ã®è¨­å®šã«ã‚ˆã‚Šã€ã‚³ãƒžãƒ³ãƒ‰å‘¼ã³å‡ºã—時ã«ç‰¹å®šã®æ¡ä»¶ãŒæº€ãŸã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€å®Ÿè¡Œã‚’中止ã™ã‚‹äº‹ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€`DELETE SELECTION` コマンドã®ã‚­ãƒ£ãƒƒãƒã« `Records in selection(\[Emp]>10)` ã¨ã„ã†æ¡ä»¶ã‚’設定ã—ãŸå ´åˆã€\[Emp]テーブルã®ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒ 9レコード以下ã®å ´åˆã«ã¯ `DELETE SELECTION` コマンドã®å‘¼ã³å‡ºã—ã§å®Ÿè¡ŒãŒä¸­æ–­ã•れã¾ã›ã‚“。 + +例外ã®ãŸã³ã«æ¡ä»¶ã‚’評価ã™ã‚‹ã“ã¨ã«ãªã‚‹ãŸã‚ã€ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ã«æ¡ä»¶ã‚’追加ã™ã‚‹ã¨å®Ÿè¡Œé€Ÿåº¦ã¯é…ããªã‚Šã¾ã™ã€‚ ãã®ä¸€æ–¹ã§ã€æ¡ä»¶ã‚’追加ã™ã‚‹ã¨ãƒ‡ãƒãƒƒã‚°ãƒ—ãƒ­ã‚»ã‚¹ã¯æ—©ããªã‚Šã¾ã™ã€‚æ¡ä»¶ã«åˆè‡´ã—ãªã„オカレンスをã€4D ãŒè‡ªå‹•çš„ã«ã‚¹ã‚­ãƒƒãƒ—ã—ã¦ã„ãã‹ã‚‰ã§ã™ã€‚ + diff --git a/website/translated_docs/ja/Debugging/debugger.md b/website/translated_docs/ja/Debugging/debugger.md new file mode 100644 index 00000000000000..e43312405c1fb3 --- /dev/null +++ b/website/translated_docs/ja/Debugging/debugger.md @@ -0,0 +1,438 @@ +--- +id: debugger +title: デãƒãƒƒã‚¬ãƒ¼ +--- + +デãƒãƒƒã‚¬ãƒ¼ã¯ã€ã‚¨ãƒ©ãƒ¼ã‚’発見ã—ãŸã‚Šã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œã‚’監視ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«ä¾¿åˆ©ã§ã™ã€‚ デãƒãƒƒã‚¬ãƒ¼ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ステップã”ã¨ã«ã‚†ã£ãり確èªã—ã¦æƒ…報を検証ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ステップã”ã¨ã«ç¢ºèªã™ã‚‹å‡¦ç†ã¯ãƒˆãƒ¬ãƒ¼ã‚¹ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ + +![debugger-window-local](assets/en/Debugging/debugger-Window-local.png) + + +## デãƒãƒƒã‚¬ãƒ¼ã®å‘¼ã³å‡ºã— + +デãƒãƒƒã‚¬ãƒ¼ã‚’é–‹ãã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªæ–¹æ³•ãŒã‚りã¾ã™: + +* [シンタックスエラーウィンドウ](basics.md#シンタックスエラーウィンドウ) ã§ **トレース** ボタンをクリックã™ã‚‹ã€‚ +* [`TRACE`](https://doc.4d.com/4dv19/help/command/ja/page157.html) コマンドを使用ã™ã‚‹ã€‚ +* メソッド実行ウィンドウ㧠**デãƒãƒƒã‚°** ボタンをクリックã™ã‚‹ã€ã¾ãŸã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ **実行ã—ã¦ãƒ‡ãƒãƒƒã‚°** ãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚‹ã€‚ +* メソッド実行中㫠**Alt+Shift+å³ã‚¯ãƒªãƒƒã‚¯** (Windows) ã¾ãŸã¯ **Ctrl+Option+Cmd+クリック** (Macintosh) ã‚’ãŠã“ãªã„ã€è¡¨ç¤ºã•れるãƒãƒƒãƒ—アップウィンドウ内ã§ãƒˆãƒ¬ãƒ¼ã‚¹ã™ã‚‹ãƒ—ãƒ­ã‚»ã‚¹ã‚’é¸æŠžã™ã‚‹: + +![open-debugger](assets/en/Debugging/openDebugger.png) + +* ランタイムエクスプローラーã®ãƒ—ロセスページã«ã¦ãƒ—ãƒ­ã‚»ã‚¹ã‚’é¸æŠžã—ãŸå¾Œã€**トレース** ボタンをクリックã™ã‚‹ã€‚ +* メソッドエディターウィンドウã€ã¾ãŸã¯ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ãƒ–レークãŠã‚ˆã³ã‚­ãƒ£ãƒƒãƒãƒšãƒ¼ã‚¸ã§ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’作æˆã™ã‚‹ã€‚ + +デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã€ç¾åœ¨ãƒˆãƒ¬ãƒ¼ã‚¹ã—ã¦ã„るメソッドã¾ãŸã¯ã‚¯ãƒ©ã‚¹é–¢æ•°ã®åå‰ã‚„ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ãŒè¡¨ç¤ºã•れる原因ã¨ãªã£ãŸã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®æƒ…報を表示ã—ã¾ã™ã€‚ 上ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¾‹ã§ã¯ã€æ¬¡ã®æƒ…å ±ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™: + +* ç¾åœ¨ãƒˆãƒ¬ãƒ¼ã‚¹ã•れã¦ã„るメソッド㯠*Clients_BuildLogo* メソッドã§ã™ã€‚ +* デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒè¡¨ç¤ºã•れã¦ã„ã‚‹ã®ã¯ã€ã‚­ãƒ£ãƒƒãƒã‚³ãƒžãƒ³ãƒ‰ã®å¯¾è±¡ã«è¨­å®šã•れ㟠`C_PICTURE` コマンドã¸ã®å‘¼ã³å‡ºã—ãŒæ¤œå‡ºã•れãŸãŸã‚ã§ã™ã€‚ + + +æ–°ã—ã„デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®è¡¨ç¤ºã«ã¯ã€åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³å†…ã§è¡¨ç¤ºã•ã‚ŒãŸæœ€å¾Œã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨åŒã˜æ§‹æˆ (ウィンドウã®ã‚µã‚¤ã‚ºã¨ä½ç½®ã€åˆ†å‰²ç·šã®é…ç½®ãŠã‚ˆã³å¼è©•価エリアã®å†…容) を使用ã—ã¾ã™ã€‚ 複数ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ—ロセスを実行ã—ãŸå ´åˆã«ã¯ã€ãれãžã‚Œã®ãƒ—ロセスを個別ã«ãƒˆãƒ¬ãƒ¼ã‚¹ã§ãã¾ã™ã€‚ã¤ã¾ã‚Šã€å„プロセスã«ã¤ã 1ã¤ã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã§ãã¾ã™ã€‚ + +デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã€ä¸€èˆ¬çš„ã«ãã®ã‚³ãƒ¼ãƒ‰ãŒå®Ÿè¡Œã•れã¦ã„るマシン上ã«è¡¨ç¤ºã•れã¾ã™ã€‚ シングルユーザー版アプリケーションã®å ´åˆã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã¯å¸¸ã«ã‚¢ãƒ—リケーションを実行ã—ã¦ã„るマシン上ã«è¡¨ç¤ºã•れã¾ã™ã€‚ クライアント/サーãƒãƒ¼ç‰ˆã‚¢ãƒ—リケーションã®å ´åˆã¯: + +- ローカルã§å®Ÿè¡Œã•れã¦ã„るコードã®å ´åˆã«ã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆ4D 上ã«è¡¨ç¤ºã•れã¾ã™ã€‚ +- サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¦ã„るコード (**サーãƒãƒ¼ä¸Šã§å®Ÿè¡Œ** オプションãŒã¤ã‘られãŸãƒ¡ã‚½ãƒƒãƒ‰) ã®å ´åˆã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ä¸Šã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +> ヘッドレスモードã§å®Ÿè¡Œä¸­ã®ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’表示ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“ã®å ´åˆã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ [リモートマシンã‹ã‚‰ã®ãƒ‡ãƒãƒƒã‚°](./debugging-remote.md) å‚照。 + +## ツールãƒãƒ¼ãƒœã‚¿ãƒ³ + +デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¸Šéƒ¨ã«ã‚る実行制御ツールãƒãƒ¼ã«ã¯ã€ãƒ‡ãƒ•ォルトショートカットãŒè¨­å®šã•れãŸè¤‡æ•°ã®ãƒœã‚¿ãƒ³ãŒã‚りã¾ã™: + +![execution-control-toolbar-buttons](assets/en/Debugging/executionToolbarButtons.png) + +> デフォルトã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã¯ã€ç’°å¢ƒè¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãƒšãƒ¼ã‚¸ã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +#### トレース終了 + +トレースãŒåœæ­¢ã•れã€é€šå¸¸ã®ãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡ŒãŒå†é–‹ã•れã¾ã™ã€‚ + +> **Shift** + **F5** ã¾ãŸã¯ **Shift** を押ã—ãªãŒã‚‰ **トレース終了** ボタンをクリックã™ã‚‹ã¨ã€å®Ÿè¡ŒãŒå†é–‹ã•れã¾ã™ã€‚ ã“ã®æ“作ã«ã‚ˆã‚Šã€ä»¥é™ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã§ã®å…¨ã¦ã® TRACE 呼ã³å‡ºã—ãŒç„¡åйã«ãªã‚Šã¾ã™ã€‚ + +#### 次行ã«é€²ã‚€ + +ç¾åœ¨ã®ãƒ¡ã‚½ãƒƒãƒ‰è¡Œ (プログラムカウンターã¨å‘¼ã°ã‚Œã‚‹é»„色ã„矢å°ã§ç¤ºã•れã¦ã„る行) ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ ãã®å¾Œã€ãƒ‡ãƒãƒƒã‚¬ã¯æ¬¡ã®è¡Œã«ç§»å‹•ã—ã¾ã™ã€‚ + +"次ã®è¡Œã«é€²ã‚€" ボタンã¯ã€ã‚µãƒ–ルーãƒãƒ³ã‚„関数ã«ç§»å‹•ã™ã‚‹ã“ã¨ã¯ãªãã€ç¾åœ¨ãƒˆãƒ¬ãƒ¼ã‚¹ã®å¯¾è±¡ã¨ãªã£ã¦ã„るメソッドã®ãƒ¬ãƒ™ãƒ«ã«ã¨ã©ã¾ã‚Šã¾ã™ã€‚ 呼ã³å‡ºã•れるサブルーãƒãƒ³ã‚„関数もトレースã—ãŸã„å ´åˆã«ã¯ã€**呼ã³å‡ºã—メソッドもトレース** ボタンを使用ã—ã¾ã™ã€‚ + +リモートデãƒãƒƒã‚°ã«ãŠã„ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¦ã„ãŸå ´åˆã«ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®æœ€å¾Œã®è¡Œã®å®Ÿè¡Œå¾Œã«ãã®è¦ªãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã°ã‚Œã¾ã™ã€‚ ãã®æ™‚ã€è¦ªãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒªãƒ¢ãƒ¼ãƒˆå´ã§å®Ÿè¡Œã•れã¦ã„ãŸå ´åˆã«ã¯ã€ã“ã®ãƒœã‚¿ãƒ³ã¯ **トレース終了** ボタンã¨åŒã˜ã‚ˆã†ã«æŒ¯ã‚‹èˆžã„ã¾ã™ã€‚ + +#### 呼ã³å‡ºã—メソッドもトレース + +別ã®ãƒ¡ã‚½ãƒƒãƒ‰ (サブルーãƒãƒ³ã¾ãŸã¯é–¢æ•°) を呼ã³å‡ºã™è¡ŒãŒå®Ÿè¡Œã•れる時ã«ã“ã®ãƒœã‚¿ãƒ³ã‚’使用ã™ã‚‹ã¨ã€å‘¼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«è¡¨ç¤ºã•れã€ã‚¹ãƒ†ãƒƒãƒ—実行ã§ãã¾ã™ã€‚ + +デãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã® [呼ã³å‡ºã—連鎖エリア](#呼ã³å‡ºã—連鎖エリア) ã§ã¯ã€æ–°ã—ã呼ã³å‡ºã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚«ãƒ¬ãƒ³ãƒˆ (一番上) ã¨ãªã‚Šã¾ã™ã€‚ + +別ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¦ã„ãªã„行ãŒå®Ÿè¡Œã•れる場åˆã«ã¯ã€ã“ã®ãƒœã‚¿ãƒ³ã¯ **次行ã«é€²ã‚€** ボタンã¨åŒã˜ã‚ˆã†ã«æŒ¯ã‚‹èˆžã„ã¾ã™ã€‚ + +#### 中断 + +メソッドã¯ä¸­æ–­ã•れã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œã‚’é–‹å§‹ã™ã‚‹å‰ã®çŠ¶æ…‹ã«æˆ»ã‚Šã¾ã™ã€‚ +* イベントã«å¯¾ã—ã¦å®Ÿè¡Œã—ã¦ã„るフォームメソッドã¾ãŸã¯ã‚ªãƒ–ジェクトメソッドをトレースã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã„ãšã‚Œã®å ´åˆã«ã‚‚åœæ­¢ã•れã€ãƒ•ã‚©ãƒ¼ãƒ ã«æˆ»ã‚Šã¾ã™ã€‚ +* アプリケーションモードã‹ã‚‰å®Ÿè¡Œã—ã¦ã„るメソッドをトレースã—ã¦ã„ãŸå ´åˆã«ã¯ã€åœæ­¢å¾Œãã®ãƒ¢ãƒ¼ãƒ‰ã«æˆ»ã‚Šã¾ã™ã€‚ + +#### 中断&編集 + + +メソッドã¯ä¸­æ–­ã•れã¾ã™ã€‚ メソッドエディターウィンドウãŒé–‹ã„ã¦ã€**中断&編集** ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•ã‚ŒãŸæ™‚点ã§å®Ÿè¡Œã—ã¦ã„ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’表示ã—ã¾ã™ã€‚ +> **Tip**: ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ã‚³ãƒ¼ãƒ‰ã«ã©ã®ã‚ˆã†ãªå¤‰æ›´ãŒå¿…è¦ã‹ãŒæ˜Žã‚‰ã‹ã§ã‚りã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ†ã‚¹ãƒˆã‚’続行ã™ã‚‹ãŸã‚ã«ãã®å¤‰æ›´ãŒå¿…è¦ãªå ´åˆã«ä½¿ç”¨ã—ã¦ãã ã•ã„。 変更ãŒå®Œäº†ã—ãŸã‚‰ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’å†å®Ÿè¡Œã§ãã¾ã™ã€‚ + +#### 編集 + +メソッドã¯ä¸­æ–­ã•れã¾ã™ã€‚ メソッドエディターウィンドウãŒé–‹ã„ã¦ã€ç·¨é›†ãƒœã‚¿ãƒ³ãŒã‚¯ãƒªãƒƒã‚¯ã•ã‚ŒãŸæ™‚点ã§å®Ÿè¡Œã—ã¦ã„ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚’表示ã—ã¾ã™ã€‚ + +ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãƒ¡ã‚½ãƒƒãƒ‰ã‚’編集ã—ãŸå ´åˆã«ã¯ã€ç¾åœ¨ã®å®Ÿè¡Œã¯ä¸­æ–­ã•れãªã„ãŸã‚ã€ç·¨é›†å†…容ã®åæ˜ ã¯æ¬¡å›žå®Ÿè¡Œæ™‚ã«ãªã‚Šã¾ã™ã€‚ + +> **Tip**: ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ã‚³ãƒ¼ãƒ‰ã«å¿…è¦ãªå¤‰æ›´å†…容ãŒã‚ã‹ã£ã¦ã„ã‚‹å ´åˆã§ã€ãã®å¤‰æ›´ãŒã‚³ãƒ¼ãƒ‰ã®æ®‹ã‚Šéƒ¨åˆ†ã®å®Ÿè¡Œã‚„トレースã®å¦¨ã’ã«ãªã‚‰ãªã„å ´åˆã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +#### 設定ä¿å­˜ + +ç¾åœ¨ã®ãƒ‡ãƒãƒƒã‚¬ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æ§‹æˆã‚’ã€ãƒ‡ãƒ•ォルト構æˆã¨ã—ã¦ä¿å­˜ã—ã¾ã™ã€‚ æ§‹æˆã«ã¯æ¬¡ã®å†…容ãŒå«ã¾ã‚Œã¾ã™: +* ウィンドウã®ã‚µã‚¤ã‚ºã¨ä½ç½® +* 分割線ã®é…ç½®ãŠã‚ˆã³å¼è©•価エリアã®å†…容 + +ã“れらã¯ã€ãƒ—ロジェクト内ã«ä¿å­˜ã•れã¾ã™ã€‚ + +ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“ ([リモートマシンã‹ã‚‰ã®ãƒ‡ãƒãƒƒã‚°](./debugging-remote.md) å‚ç…§)。 + +## Watch Pane + +The **Watch pane** is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. 次ã«ä¾‹ã‚’示ã—ã¾ã™: + +![watch-pane](assets/en/Debugging/watchPane.png) + +> This pane is not available in remote debugging mode. + +The **Watch Pane** displays useful general information about the system, the 4D environment, and the execution environment. + +The **Expression** column displays the names of the objects and expressions. The **Value** column displays their current corresponding values. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. + +At any point, you can drag and drop themes, theme sublists (if any), and theme items to the [Custom Watch Pane](#custom-watch-pane). + +### Expression list + +#### Line Objects + +This theme lets you keep track of the values of the objects or expressions: + +* used in the line of code to be executed (the one marked with the program counter—the yellow arrow in the [Source Code Pane](#source-code-pane)), +* used in the previous line of code + +Since the previous line of code is the one that was just executed before, this theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: + +```4d +TRACE +$a:=1 +$b:=a+1 +$c:=a+b +``` + +1. A Debugger window opens with the program counter set to the line with `a:=1`. At this point the **Line Objects** theme displays: + + | $a | 未定義 | + | -- | --- | + | | | + + The `$a` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +2. You click the **Step Over** button. The program counter is now set to the line `b:=a+1`. At this point, the theme displays: + + | $a | 1 | + | -- | --- | + | $b | 未定義 | + + The value of the `$a` variable is now 1. The `$b` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +3. You click the **Step Over** button again. The program counter is now set on the line with c:=a+b. At this point the Line Objects theme displays: + + | $c | 未定義 | + | -- | --- | + | $a | 1 | + | $b | 2 | + + The value of the `$b` variable is now 2. The `$c` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +#### 変数 + +This theme is composed of the following subthemes: + +| Subtheme | 説明 | Can the values be modified? | +| ------------ | ------------------------------------------------------------ | --------------------------- | +| Interprocess | List of interprocess variables being used at this point | â—¯ | +| Process | List of process variables used by the current process | â—¯ | +| Local | List of local variables used by the method being traced | â—¯ | +| 引数 | List of parameters received by the method | â—¯ | +| Self | Pointer to the current object, when tracing an Object Method | × | + +Arrays, like other variables, appear in the Interprocess, Process, and Local subthemes, depending on their scope. The debugger displays the first 100 elements. Inside the **Value** column, you can modify the values of array elements, but not the size of the arrays. + +To display the variable types and their internal names, right click and check the **Show Types** option in the context menu: + +![show-types-menu-item](assets/en/Debugging/showTypes.png) + +Here's the result: + +![dynamic-variable-names](assets/en/Debugging/dynamicVariableNames.png) + +#### Current Form Values + +This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: + +![current-form-value](assets/en/Debugging/current-form-values.png) + +Some objects, such as list box arrays, can be presented as two distinct objects, the variable of the object itself and its data source. + +#### 定数 + +Like the Constants page of the Explorer window, this theme displays predefined constants provided by 4D. The expressions from this theme cannot be modified. + +#### Semaphores + +This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. The expressions from this theme cannot be modified. Global semaphores are not displayed. + +#### プロセス + +This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. + +#### テーブルã¨ãƒ•ィールド + +This theme lists the tables and fields in the 4D database. For each Table item, the Value column displays the size of the current selection for the current process as well as the number of **locked records**. + +For each Field item, the Value column displays the value of the field for the current record (except picture and BLOB). You can modify the field values but not the the tables' information. + +#### セット + +This theme lists the sets defined in the current process (the one you're currently tracing) and the interprocess sets. For each set, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### 命åセレクション + +This theme lists the named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### 情報 + +This theme contains general information regarding database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. + +#### Web + +This theme displays information regarding the main Web server of the application (only available if the Web server is active): + +* Web File To Send: name of Web file waiting to be sent (if any) +* Web Cache Usage: number of pages present in Web cache as well as its use percentage +* Web Server Elapsed Time: duration of Web server use in hours:minutes:seconds format +* Web Hits Count: total number of HTTP requests received since Web server launch, as well as the instantaneous number of requests per second +* Number of active Web processes: number of active Web processes, all Web processes together + +The expressions contained within this theme cannot be modified. + +### Contextual Menu + +Additional options are available from the contextual menu of the Watch pane. + +![context-menu](assets/en/Debugging/contextual-menu.png) + +* **Collapse All**: Collapses all levels of the hierarchical list. +* **Expand All**: Expand all levels of the hierarchical list. +* **Show Types**: Displays the type of each item (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field. Useful if you work with table or field numbers, or with pointers using commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the object type for each object. You can turn this option off in order to speed up the display, or just because you prefer to use only the **Show Types** option. +* **Sorted Tables and Fields**: Sorts the tables and fields in alphabetical order within their respective lists. +* **Show Integers in Hexadecimal**: Numbers are usually displayed in decimal notation. This option displays them in hexadecimal notation. Note: To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. +* **Enable activity monitoring**: Activates the monitoring of activity (advanced checking of internal activity of the application) and displays the information retrieved in the additional themes: **Scheduler**, **Web** and **Network**. + +## Call Chain Pane + +A method may call other methods or class functions, which may call other methods or functions. The Call Chain pane lets you keep track of that hierarchy. + +![call-chain-pane](assets/en/Debugging/call-chain-example.png) + +Each main level item is the name of a method or class function. The top item is the one you are currently tracing, the next main level item is the name of the caller (the method or function that called the one you are currently tracing), the next one is the caller's caller, and so on. + +In the image above: + +* `thirdMethod` has not received any parameter +* `$0` is currently undefined, as the method did not assign any value to `$0` (because it has not executed this assignment yet or because the method is a subroutine and not a function) +* `secondMethod` has received three parameters from `firstMethod`: + * $1 is a pointer to the `[Employee]` table + * $2 is a pointer to the `ID` field in the `[Employee]` table + * $3 is an alphanumeric parameter whose value is "Z" + +You can double-click the name of any method to display its contents in the [Source Code Pane](#source-code-pane). + +Clicking the icon next to a method or function name expands or collapses the parameters and the result (if any). Values appear on the right side of the pane. Clicking on any value on the right side allows you to change the value of any parameter or function result. + +To display the parameter type, check the **Show types** option in the contextual menu: + +![call-chain-show-types](assets/en/Debugging/callChainShowTypes.png) + +After you deploy the list of parameters, you can drag and drop parameters and function results to the [Custom Watch Pane](#custom-watch-pane). + +You can also use the [Get call chain](https://doc.4d.com/4dv19/help/command/en/page1662.html) command to retrieve the call chain programmatically. + +## Custom Watch Pane + +The Custom Watch Pane is useful for evaluating expressions. It is similar to the [Watch Pane](#watch-pane), except here you decide which expressions are displayed. Any type of expression can be evaluated: + +* field +* variable +* pointer +* calculation +* 4D command +* method +* and anything else that returns a value + +![custom-Watch-pane](assets/en/Debugging/custom-watch-pane.png) + +You can evaluate any expression that can be shown in text form. This does not cover picture and BLOB fields or variables. To display BLOB contents, you can use BLOB commands, such as [BLOB to text](https://doc.4d.com/4dv19/help/command/en/page555.html). + +### Handling expressions + +There are several ways to add expressions to the list: + +* Drag and drop an object or expression from the Watch Pane or the Call Chain Pane +* Select an expression in the [Source Code pane](#source-code-pane) and press **ctrl+D** (Windows) or **cmd+D** (macOS) +* Double-click somewhere in the empty space of the Custom Watch Pane (adds an expression with a placeholder name that you can edit) + +You can enter any formula that returns a result. + +To edit an expression, click on it to select it, then click again or press **Enter** on your keyboard. + +To delete an expression, click on it to select it, then press **Backspace** or **Delete** on your keyboard. +> **Warning:** Be careful when you evaluate a 4D expression modifying the value of one of the System Variables (for instance, the OK variable) because the execution of the rest of the method may be altered. + +### Contextual Menu + +The Custom Watch Pane’s context menu gives you access the 4D formula editor and other options: + +![custom-watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-context-menu.png) + +**New Expression**: This inserts a new expression and displays the 4D Formula Editor. + +![custom-Watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-formula-editor.png) + +For more information on the Formula Editor, see the
        4D Design Reference manual. + +* **Insert Command**: Shortcut for inserting a 4D command as a new expression. +* **Delete All**: Removes all expressions from the Custom Watch Pane. +* **Standard Expressions**: Copies the Watch Pane's list of expressions. +> This option is not available in remote debugging mode (see [Debugging from Remote Machines](https://doc.4d.com/4Dv19/4D/19/Debugging-from-Remote-Machines.300-5422483.en.html)). +* **Collapse All/Expand All**: Collapses or Expands all the hierarchical lists. +* **Show Types**: Displays the type of each item in the list (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field of the **Fields**. Useful if you work with tables, field numbers or pointers using the commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the type of each item. +* **Sorted Tables and Fields**: Displays the table and fields in alphabetical order. +* **Show Integers in Hexadecimal**: Displays numbers using hexadecimal notation. To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. + +## Source Code Pane + +The Source Code Pane shows the source code of the method or function currently being traced. + +This area also allows you to add or remove [**break points**](breakpoints.md). + +### Tool tip + +Hover your pointer over any expression to display a tool tip that indicates: + +* the declared type of the expression +* the current value of the expression + +![source-code-pane](assets/en/Debugging/sourceCodePane.png) + +This also works with selections: + +![source-code-pane-tip](assets/en/Debugging/sourcePaneTip.png) + +### Adding expressions to the Custom Watch Pane + +You can copy any selected expression from the Source Code Pane to the [Custom Watch Pane](#custom-watch-pane). + +1. In the Source code pane, select the expression to evaluate +2. Do one of the following: + * Drag and drop the selected text to the Expression area of the Custom Watch Pane + * Press **Ctrl+D** (Windows) or **Cmd+D** (macOS) + * Right-click the selected text **>** **Copy to Expression Pane** + +### Program Counter + +The yellow arrow in the left margin of the Source Code pane is called the program counter. It marks the next line to be executed. + +By default, the program counter line (also called the running line) is highlighted in the debugger. You can customize the highlight color in the [Methods page of the Preferences](Preferences/methods.md). + +#### Moving the program counter + +For debugging purposes, you can move the program counter for the method at the top of the call chain (the method currently executing). To do so, click and drag the yellow arrow to another line. + +This only tells the debugger to pursue tracing or executing from a different point. It does not execute lines or cancel their execution. All current settings, fields, variables, etc. are not impacted. + +ãŸã¨ãˆã°: + +```4d + // ... + If(This condition) + DO_SOMETHING + Else + DO_SOMETHING_ELSE + End if + // ... +``` + +Say the program counter is set to the line `If (This condition)`. When you click the **Step over** button, the program counter moves directly to the `DO_SOMETHING_ELSE` line. To examine the results of the `DO_SOMETHING` line, you can move the program counter to that line and execute it. + +### Contextual menu + +The contextual menu of the Source Code Pane provides access to several functions that are useful when executing methods in Trace mode: + +![source-code-pane-context-window](assets/en/Debugging/sourceCodePaneContext.png) + +* **Goto Definition**: Goes to where the selected object is defined. This command is available for: + * *Project methods:* displays method contents in a new window of the Method editor + * *Fields:* Displays field properties in the inspector of the Structure window + * *Tables:* Displays table properties in the inspector of the Structure window + * *Forms:* Displays form in the Form editor + * *Variables* (local, process, interprocess or $n parameter): displays the line in the current method or among the compiler methods where the variable is declared +* **Search References** (also available in Method editor): Searches all project objects (methods and forms) in which the current element of the method is referenced. The current element is the one selected or the one where the cursor is located. This can be the name of a field, variable, command, string, and so on. Search results are displayed in a new standard results window. +* **Copy**: Standard copy of the selected expression to the pasteboard. +* **Copy to Expression Pane**: Copy the selected expression to the Custom Watch Pane. +* **Run to Cursor**:Executes statements found between the program counter and the selected line of the method (where the cursor is found). +* **Set Next Statement**:Moves program counter to the selected line without executing this line or any intermediate ones. The designated line is only run if the user clicks on one of the execution buttons. +* **Toggle Breakpoint** (also available in Method editor): Alternately inserts or removes the breakpoint corresponding to the selected line. This modifies the breakpoint permanently: for instance, if you remove a breakpoint in the debugger, it no longer appears in the original method. +* **Edit Breakpoint** (also available in Method editor): Displays the Breakpoint Properties dialog box. Any changes made modify the breakpoint permanently. + +### Find Next/Previous + +Specific shortcuts allow you to find strings identical to the one selected: + +* To search for the next identical strings, press **Ctrl+E** (Windows) or **Cmd+E** (macOS) +* To search for the previous identical strings, press **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) + +The search is carried out only if you select at least one character in the Source code pane. + +## Shortcuts + +This section lists all the shortcuts available in the debugger window. + +> The tool bar also has [shortcuts](#tool-bar-buttons). + +#### Watch Pane & Custom Watch Pane + +* **Double-click** an item in the Watch Pane to copy it to the Custom Watch Pane +* **Double-Click** in the Custom Watch Pane to create a new expression + +#### Source Code Pane + +* Click in the left margin to set or remove break points. +* **Alt+Shift+Click** (Windows) or **Option+Shift+Click** (macOS) sets a temporary break point. +* **Alt-Click** (Windows) or **Option-Click** displays the Edit Break window for a new or existing break point. +* A selected expression or object can be copied to the Custom Watch Pane by simple drag and drop. +* **Ctrl+D** (Windows) or **Cmd+D** (macOS) key combinations copy the selected text to the Custom Watch Pane. +* **Ctrl+E** (Windows) or **Cmd+E** (macOS) key combinations find the next strings identical to the one selected. +* **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) key combinations find the previous strings identical to the one selected. + +#### All Panes + +- **Ctrl** + **+/-** (Windows) or **Command** + **+/-** (macOS) increases or decreases the font size for a better readability. The modified font size is also applied to the Method editor and is stored in the Preferences. +- **Ctrl + \*** (Windows) or **Command + \*** (macOS) forces the updating of the Watch Pane. +- When no item is selected in any pane, press **Enter** to step over. +- When an item value is selected, use the arrows keys to navigate through the list. +- When editing an item, use the arrow keys to move the cursor. Use Ctrl-A/X/C/V (Windows) or Command-A/X/C/V (macOS) as shortcuts to the Select All/Cut/Copy/Paste menu commands of the Edit menu. \ No newline at end of file diff --git a/website/translated_docs/ja/Debugging/debugging-remote.md b/website/translated_docs/ja/Debugging/debugging-remote.md new file mode 100644 index 00000000000000..575826f21b9449 --- /dev/null +++ b/website/translated_docs/ja/Debugging/debugging-remote.md @@ -0,0 +1,84 @@ +--- +id: debugging-remote +title: リモートマシンã‹ã‚‰ã®ãƒ‡ãƒãƒƒã‚° +--- + +## æ¦‚è¦ + +When a 4D database is running on 4D Server, you can debug the 4D code running on the server from a remote 4D client logged to the project. You just need to attach the debugger to a specific remote machine, and the code execution can be monitored in the debugger directly on the remote machine. + +On a remote machine, the [debugger window](debugger.md) displays a specific server icon and a blue background color to indicate that you are debugging server code: + +![debugger-window-remote](assets/en/Debugging/debuggerWindowRemote.png) + +This feature is particularly useful when 4D Server runs in headless mode (see [Command Line Interface](../Admin/cli.md)), or when access to the server machine is not easy. + + +## Attached debugger + +Only one debugger can debug a 4D Server application at a given time. It is called the **attached debugger**. The attached debugger can be: + +* the local 4D Server debugger (default) - if the server is not running headless. +* the debugger of a remote 4D client - if the remote session has access to Design mode. + +The attached debugger is called whenever a 4D Server encounters: +* a break point +* a `TRACE` command +* a caught command +* an error + +Keep in mind that error messages are sent to the attached debugger machine. This means that in the case of a remote debugger, server error messages are displayed on the remote 4D client. + +Note that: +* The code executed in the `On Server Startup Database` Method cannot be debugged remotely. It can only be debugged on the server side +* If no debugger is attached, the running code is not stopped by debugging commands + +## Attaching the debugger to a remote 4D client + +By default, the debugger is not attached to a remote 4D client: +* If 4D Server is not running headless, the debugger is attached to the server +* If 4D Server is running headless, no debugger is attached + +You can attach the debugger to any remote 4D client allowed to connect to the 4D Server application. + +> The remote 4D client's user session must have access to the Design environment of the database. + +To attach the debugger to a remote 4D client: + +* In the 4D Server menu bar, select **Edit** > **Detach Debugger** so that the debugger becomes available to remote machines. + - This step is useless if the 4D Server is running headless. + - You can attach the debugger back to the server by selecting **Edit** > **Attach debugger** (if not attached to a remote 4D client, see [Rejected attachment requests](#rejected-attachment-requests)). +* In a remote 4D client connected to the server, select **Run** > **Attach Remote Debugger** + +If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the menu command becomes **Detach Remote Debugger**. + +The debugger is then attached to the remote 4D client: +* until the end of the user session +* until you select `Detach Remote Debugger` + +## Attach Debugger or Remote Debugger at Startup + +4D allows you to automatically attach the debugger to a remote 4D client or the server at startup: + +* On the server (if not headless), this option is named **Attach Debugger At Startup**. When the server is started, it automatically attaches the debugger (default). + +> **Warning**: If this option is selected for a server which is subsequently launched in headless mode, the debugger won't be available for this server. + +* On a remote 4D client, this option is named **Attach Remote Debugger At Startup**. When selected, the remote 4D client will automatically try to attach the remote debugger at each subsequent connection to the same 4D Server database. If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the remote debugger is automatically attached to the remote 4D client and the **Detach Remote Debugger option is displayed**. + +> This setting is applied per project and is stored locally in the [`.4DPreferences`](Project/architecture.md#userpreferencesusername) file. + +## Rejected attachment requests + +While the debugger is already attached to a remote 4D client, or to 4D Server (default), no other machine can attach the debugger. + +If a machine tries to attach the debugger while it is already attached, the attachment is rejected and a dialog box appears: + +![attach-debugger-dialog](assets/en/Debugging/attach-debugger-dialog.png) + +![attach-debugger-dialog-2](assets/en/Debugging/attach-debugger-dialog-2.png) + +Attaching the debugger in this case requires that: + +* the attached debugger is detached from the remote 4D client using the **Detach remote debugger** menu command or from the server using the **Detach debugger** command +* the attached remote 4D client session is closed diff --git a/website/translated_docs/ja/Desktop/building.md b/website/translated_docs/ja/Desktop/building.md new file mode 100644 index 00000000000000..2feff32205d13c --- /dev/null +++ b/website/translated_docs/ja/Desktop/building.md @@ -0,0 +1,696 @@ +--- +id: building +title: アプリケーションビルド +--- + +4D ã«ã¯ãƒ—ロジェクトパッケージ (ファイナルビルド) を作æˆã™ã‚‹ãŸã‚ã®ã‚¢ãƒ—リケーションビルダーãŒçµ±åˆã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ“ルダーを使用ã™ã‚Œã°ã€ã‚³ãƒ³ãƒ‘イルã•れ㟠4D アプリケーションã®å±•開を簡易化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ OS ã”ã¨ã«ç•°ãªã‚‹ç‰¹å®šã®å‡¦ç†ã‚’自動ã§å‡¦ç†ã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®å±•é–‹ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ + +アプリケーションビルダーã§ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’行ãˆã¾ã™: + +* インタープリターコードをå«ã¾ãªã„コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã®ãƒ“ルド +* ダブルクリックã§èµ·å‹•å¯èƒ½ãªã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーションã®ãƒ“ルド (4D ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã§ã‚ã‚‹ 4D Volume Desktop を組ã¿è¾¼ã‚“ã  4D アプリケーション) +* XMLå½¢å¼ã®ãƒ—ロジェクトファイル定義を用ã„ã¦ã€åŒã˜ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‹ã‚‰ç•°ãªã‚‹ã‚¢ãƒ—リケーションã®ãƒ“ルド +* クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ãƒ“ルド +* クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã®è‡ªå‹•更新機能を備ãˆãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ãƒ“ルド +* ビルド設定ã®ä¿å­˜ (*設定ä¿å­˜* ボタン) + +> コンパイル済ã¿ã‚¢ãƒ—リケーションã¯ã€**読ã¿å–り専用** ã§ã‚ã‚‹ [.4dz files](#コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド) ファイルã«åŸºã¥ãã¾ã™ã€‚ コンパイル済ã¿ã‚¢ãƒ—リケーションã®å ´åˆã€ã‚½ãƒ¼ã‚¹ãƒ•ァイルを変更ã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚„関数 (`CREATE INDEX` ã‚„ `CREATE TABLE` (SQL)) ã¯ã€ãƒ‡ãƒ•ォルトã§ã¯ä½¿ç”¨ã§ããªã„ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€`PackProject` XML キー ([doc.4d.com](https://doc.4d.com) å‚ç…§) を使用ã™ã‚‹ã“ã¨ã§ã€ãƒ­ãƒ¼ã‚«ãƒ«ãªå¤‰æ›´ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + + +## æ¦‚è¦ + +プロジェクトパッケージをビルドã™ã‚‹ã«ã¯æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- [`BUILD APPLICATION`](https://doc.4d.com/4Dv19/4D/19/BUILD-APPLICATION.301-5392523.ja.html) コマンドを使ㆠ+- [アプリケーションビルド](#application-builder) ダイアログを使ㆠ+ + +### アプリケーションビルド + +ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‹ãã«ã¯ 4D ã®**デザイン**メニューã‹ã‚‰**アプリケーションビルド...**ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![](assets/en/Project/buildappProj.png) + +アプリケーションビルドウィンドウã«ã¯è¤‡æ•°ã®ãƒšãƒ¼ã‚¸ãŒã‚りã€ã‚¿ãƒ–を使用ã—ã¦ãƒšãƒ¼ã‚¸ã‚’移動ã§ãã¾ã™: + +![](assets/en/Project/appbuilderProj.png) + + +ビルドをãŠã“ãªã†å‰ã«ãƒ—ロジェクトã¯ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã¾ã ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ãªã„プロジェクトã§ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒ‘イル後ã«ã‚³ãƒ¼ãƒ‰ãŒå¤‰æ›´ã•れã¦ã„ã‚‹ã¨ã€ãƒ—ロジェクトを (å†) コンパイルã—ãªã‘れã°ãªã‚‰ãªã„æ—¨ã®è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + +### アプリケーションビルド設定 + + +アプリケーションビルドã«é–¢ã‚ã‚‹å„パラメーター設定㯠XML キーã®å½¢ã§ã€`buildApp.4DSettings` ã¨ã„ã†åç§°ã®ã‚¢ãƒ—リケーションプロジェクトファイルã«ä¿å­˜ã•れã¾ã™ã€‚ã“ã® XML ファイルã¯ãƒ—ロジェクト㮠`Settings` フォルダーã«é…ç½®ã•れã¾ã™ã€‚ + +アプリケーションビルドダイアログãŒåˆã‚ã¦è¡¨ç¤ºã•れるã¨ãã«ã¯ãƒ‡ãƒ•ォルトパラメーターãŒä½¿ç”¨ã•れã¾ã™ã€‚ **ビルド** ボタンや **設定ä¿å­˜** ボタンをクリックã™ã‚‹ã¨ã€ã“ã®ãƒ—ロジェクトファイルã®å†…å®¹ãŒæ›´æ–°ã•れã¾ã™ã€‚ åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã¤ã„ã¦å†…容ã®ç•°ãªã‚‹è¤‡æ•°ã® XML ファイルを定義ã—ã€[BUILD APPLICATION](https://doc.4d.com/4Dv19/4D/19/BUILD-APPLICATION.301-5392523.ja.html) コマンドã§ãれらを使ã„分ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã¾ãŸã€XML キーを使用ã™ã‚Œã°ã€ã‚¢ãƒ—リケーションビルドダイアログã«ã¯è¡¨ç¤ºã•れãªã„追加ã®è¨­å®šã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細ã¯å°‚用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ [アプリケーションビルド設定ファイル](https://doc.4d.com/4Dv19/4D/19/4D-XML-Keys-BuildApplication.100-5447429.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ログファイル + +アプリケーションをビルドã™ã‚‹ã¨ã€4D ã¯ãƒ­ã‚°ãƒ•ァイル (*BuildApp.log.xml*) を生æˆã—ã¦ã€ãƒ—ロジェクト㮠**Logs** フォルダーã«ä¿å­˜ã—ã¾ã™ã€‚ ログファイルã«ã¯ãƒ“ルド毎ã«ä»¥ä¸‹ã®æƒ…å ±ãŒæ›¸ãè¾¼ã¾ã‚Œã¾ã™: + +- ターゲットビルドã®é–‹å§‹ã¨çµ‚了 +- 生æˆã•れãŸãƒ•ァイルã®åç§°ã¨ãƒ•ルパス +- ãƒ“ãƒ«ãƒ‰ã®æ—¥ä»˜ã¨æ™‚刻 +- 発生ã—ãŸã‚¨ãƒ©ãƒ¼ +- ç½²åã®å•題 (例: ç½²åã•れã¦ã„ãªã„プラグイン) + +アプリケーションを公証ã™ã‚‹å ´åˆãªã©ã¯ã€ã“ã®ãƒ•ァイルを確èªã™ã‚‹ã“ã¨ã§ã€å¾Œã®é‹ç”¨æ‰‹é †ã§æ™‚間を節約ã§ãã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ + +> `Get 4D file(Build application log file)` コマンドを使ã£ã¦ã€ãƒ­ã‚°ãƒ•ァイルã®å ´æ‰€ã‚’å–å¾—ã—ã¾ã™ã€‚ + + +## アプリケーションåã¨ä¿å­˜å…ˆãƒ•ォルダー + +![](assets/en/Project/buidappstructureProj.png) + +**アプリケーションå** ã«ã¯ç”Ÿæˆã™ã‚‹ã‚¢ãƒ—リケーションã®åå‰ã‚’入力ã—ã¾ã™ã€‚ + +**ä¿å­˜å…ˆãƒ•ォルダー** ã«ã¯ãƒ“ルドã•れるアプリケーションã®ä¿å­˜å…ˆã‚’指定ã—ã¾ã™ã€‚ 指定ã—ãŸãƒ•ォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆã¯æ–°ãŸã«ä½œæˆã—ã¾ã™ã€‚ + + + +## コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒšãƒ¼ã‚¸ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€æ¨™æº–ã®ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルやコンパイル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルドã§ãã¾ã™ã€‚ + +![](assets/en/Project/appbuilderProj.png) + + +### コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド + +インタープリターコードをå«ã¾ãªã„アプリケーションをビルドã—ã¾ã™ã€‚ + +ã“れã«ã‚ˆã‚Šã€*Compiled Database/\* フォルダーã®ä¸­ã« *.4dz* ファイルãŒä½œæˆã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¢ãƒ—リケーションåã‚’ "MyProject" ã«ã—ãŸå ´åˆã€4D ã¯æ¬¡ã®ã‚‚ã®ã‚’作æˆã—ã¾ã™: + +*\/Compiled Database/MyProject/MyProject.4dz* + +.4dz ファイル㯠ZIP 圧縮ã•れãŸãƒ—ロジェクトフォルダーã§ã™ (**注:** ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å ´åˆã«ç”Ÿæˆã•れる .4DC ファイルã¨åŒç¾©ã§ã¯ãªã„ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™)。 .4dz ファイルを開ã‘ã‚‹ã®ã¯ 4D Serverã€4D Volume ライセンス (組ã¿è¾¼ã¿ã‚¢ãƒ—リケーション)ã€ãŠã‚ˆã³ 4D ã§ã™ã€‚ 圧縮・最é©åŒ–ã•れ㟠.4dz ファイルã«ã‚ˆã£ã¦ãƒ—ロジェクトパッケージã®å±•é–‹ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ + +> .4dz ファイルを生æˆã™ã‚‹éš›ã€4D ã¯ãƒ‡ãƒ•ォルト㧠**標準的ãª** zipå½¢å¼ã‚’使用ã—ã¾ã™ã€‚ ã“ã®ãƒ•ォーマットã®åˆ©ç‚¹ã¯ã€ã‚らゆる解å‡ãƒ„ールã§ç°¡å˜ã«èª­ã¿å–ã‚‹ã“ã¨ãŒã§ãã‚‹ã“ã¨ã§ã™ã€‚ ã“ã®æ¨™æº–å½¢å¼ã‚’使用ã—ãŸããªã„å ´åˆã¯ã€å€¤ã‚’ `False` ã«è¨­å®šã—㟠`UseStandardZipFormat` XMLキーを [`buildApp.4DSettings`](#アプリケーションビルド設定) ファイルã«è¿½åŠ ã—ã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ã€[doc.4d.com](https://doc.4d.com) ã® *アプリケーションビルド設定ファイル* マニュアルをå‚ç…§ãã ã•ã„)。 + + + + +#### 関連ã™ã‚‹ãƒ•ォルダーをå«ã‚€ + +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒ—ロジェクトã«é–¢é€£ã™ã‚‹ãƒ•ォルダーãŒã€Build フォルダー㮠*Components* ãŠã‚ˆã³ *Resources* フォルダーã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ ã“れらã®ãƒ•ォルダーã®è©³ç´°ã«ã¤ã„ã¦ã¯ [プロジェクトアーキテクãƒãƒ£ãƒ¼ã®èª¬æ˜Ž](Project/architecture.md) ã‚’å‚ç…§ãã ã•ã„。 + + +### コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルド + +ストラクãƒãƒ£ãƒ¼ã‹ã‚‰ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルドã—ã¾ã™ã€‚ + +コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ç‰¹å®šã®æ©Ÿèƒ½ã‚’実装ã—ãŸæ¨™æº–ã® 4D プロジェクトã§ã™ã€‚ ビルドã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ä»–ã® 4Dプロジェクト (ホストアプリケーションプロジェクト) ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã¨ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクトã¯ãã®æ©Ÿèƒ½ã‚’利用ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +アプリケーションåã‚’ *MyComponent* ã«æŒ‡å®šã—ãŸå ´åˆã€4D 㯠*Components* フォルダーを作æˆã—ã€ãã®ä¸­ã« *MyComponent.4dbase* フォルダーを生æˆã—ã¾ã™: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +*MyComponent.4dbase* フォルダーã«ã¯æ¬¡ã®ãƒ•ァイルãŒå«ã¾ã‚Œã¾ã™: +- *MyComponent.4DZ* ファイル +- *Resources* フォルダー: 関連リソースã¯è‡ªå‹•çš„ã«ã“ã®ãƒ•ォルダーã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ã€ä»–ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„プラグインを使用ã§ããªã„ãŸã‚ã€ãã®ä»–ã® "Components" ã‚„ "Plugins" フォルダーã¯ã‚³ãƒ”ーã•れã¾ã›ã‚“。 + + +## アプリケーションページ + +ã“ã®ã‚¿ãƒ–ã§ã¯ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‰ˆã‚¢ãƒ—リケーションをビルドã—ã¾ã™: + +![](assets/en/Project/standaloneProj.png) + +### スタンドアロンアプリケーションをビルド + +**スタンドアロンアプリケーションをビルド** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—㦠**ビルド** ボタンをクリックã™ã‚‹ã¨ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã® (ã¤ã¾ã‚Šã€ãƒ€ãƒ–ルクリックã§èµ·å‹•å¯èƒ½ãª) アプリケーションãŒã‚¢ãƒ—リケーションプロジェクトをもã¨ã«ä½œæˆã•れã¾ã™ã€‚ + +ビルドã«ã¯æ¬¡ã®ã‚‚ã®ãŒå¿…è¦ã§ã™: +- 4D Volume Desktop (4Dデータベースエンジン) +- é©åˆ‡ãª [ライセンス](#licenses) + +Windows ã«ãŠã„ã¦ã¯ã€.exe æ‹¡å¼µå­ã®ã¤ã„ãŸå®Ÿè¡Œãƒ•ァイルãŒä½œæˆã•れã¾ã™ã€‚ macOS ã«ãŠã„ã¦ã¯ã€ã‚½ãƒ•トウェアパッケージãŒä½œæˆã•れã¾ã™ã€‚ + +ã“ã®å‡¦ç†ã¯ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨4D Volume Desktopã‚’çµ±åˆã—ã¾ã™ã€‚ 4D Volume Desktop ãŒæä¾›ã™ã‚‹æ©Ÿèƒ½ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãƒšãƒ¼ã‚¸ã§æŒ‡å®šã™ã‚‹ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æƒ…å ±ã«åŸºã¥ãã¾ã™ã€‚ ã“ã®ç‚¹ã«ã¤ã„ã¦ã®è©³ç´°ãªæƒ…å ±ã¯ã€4D ã® [オンラインストア](https://store.4d.com/jp/) ã¨ã€ã‚»ãƒ¼ãƒ«ã‚¹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +データファイルã«ã¤ã„ã¦ã¯ã€ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを作æˆãƒ»ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ [最終アプリケーションã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ç®¡ç†](https://doc.4d.com/4Dv18/4D/18/Data-file-management-in-final-applications.300-4575558.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +ã„ãã¤ã‹ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ã‚’特定ã®é †ç•ªã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘組ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã®ã‚¢ãƒƒãƒ—デートを自動化ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ ([サーãƒãƒ¼ã¾ãŸã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘アプリã®è‡ªå‹•アップデート](https://doc.4d.com/4Dv18/4D/18/Automatic-updating-of-server-or-single-user-applications.300-4575550.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +#### 4D Volume Desktopã®å ´æ‰€ + +ダブルクリックã§èµ·å‹•ã•れるアプリケーションをビルドã™ã‚‹ã«ã¯ã€ã¾ãš 4D Volume Desktop ãŒæ ¼ç´ã•れã¦ã„るフォルダーã®å ´æ‰€ã‚’指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +* *Windows* ã§ã¯: 4D Volume Desktop.4DE ã‚„ 4D Volume Desktop.RSRã€ãã®ä»–動作ã«å¿…è¦ãªãƒ•ァイルやフォルダーをå«ã‚€ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¾ã™ã€‚ ã“れらã¯ã€é¸æŠžã•れãŸãƒ•ォルダー内ã§åŒã˜éšŽå±¤ã«ç½®ã‹ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +* *macOS* ã§ã¯: ソフトウェアパッケージã¨ã—㦠4D Volume Desktop ãŒæä¾›ã•れã¦ã„ã‚‹ã®ã§ã€ã“ã®ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚ + +4D Volume Desktop ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ã«ã¯ **[...]** ボタンをクリックã—ã¾ã™ã€‚ ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れãŸã‚‰ã€4D Volume Desktop フォルダー (Windows) ã¾ãŸã¯ãƒ‘ッケージ (macOS) ã‚’é¸æŠžã—ã¾ã™ã€‚ + +フォルダーãŒé¸æŠžã•れるã¨ãã®å®Œå…¨ãƒ‘スåãŒè¡¨ç¤ºã•れã€ãã“ã« 4D Volume Desktop ãŒå«ã¾ã‚Œã¦ã„れã°ãƒ“ãƒ«ãƒ‰ãƒœã‚¿ãƒ³ãŒæœ‰åйã«ãªã‚Šã¾ã™ã€‚ + +> 4D Volume Desktop ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¯ã€4D Developer ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¨åˆè‡´ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€4D Developer ã® v18 を利用ã—ã¦ã„れã°ã€4D Volume Desktop v18 ãŒå¿…è¦ã§ã™ã€‚ + +#### データリンクモードã®åŸºæº– + +ã“ã®ã‚ªãƒ—ションを使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã¨ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 二種類ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžå¯èƒ½ã§ã™: + +* **アプリケーションå** (デフォルト) - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€4D アプリケーションã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã«å¯¾å¿œã™ã‚‹ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚¢ãƒ—リケーションパッケージをディスク上ã§è‡ªç”±ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションを複製ã™ã‚‹å ´åˆã‚’除ã„ã¦ã€é€šå¸¸ã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«å¯¾ã—ã¦ã“ã®ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れるã¹ãã§ã™ã€‚ + +* **アプリケーションパス** - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€çµ„ã¿è¾¼ã¿ 4D アプリケーションã¯è‡ªèº«ã«ç´ã¥ã„ã¦ã„ã‚‹ *lastDataPath.xml* ファイルを解æžã—ã¦ã€èµ·å‹•アプリã®ãƒ•ルパスã«åˆè‡´ã™ã‚‹ "executablePath" 属性をæŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ‘スマップã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’探ã—〠åŒã‚¨ãƒ³ãƒˆãƒªãƒ¼å†…ã§ "dataFilePath" 属性ã§å®šç¾©ã•れã¦ã„るデータファイルを開ãã¾ã™ã€‚ ãªã„å ´åˆã¯ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ (デフォルトモード)。 + +データリンクモードã«ã¤ã„ã¦ã®è©³ç´°ã¯ [最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +#### 生æˆã•れるファイル + +**ビルド** ボタンをクリックã™ã‚‹ã¨ã€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* フォルダーもå«ã¾ã‚Œã¦ã„ã¾ã™ ([最終アプリケーションã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ç®¡ç†](#データファイルã®ç®¡ç†)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + * (オプション) データベースã«å«ã¾ã‚Œã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„プラグインãŒé…ç½®ã•れ㟠Components フォルダーãŠã‚ˆã³ Plugins フォルダー。 ã“ã®ç‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ [プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸](#プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + * Licenses フォルダー - アプリケーションã«çµ±åˆã•れãŸãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã® XML ファイルãŒå«ã¾ã‚Œã¾ã™ã€‚ ã“ã®ç‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ [ライセンス&証明書ページ](#ライセンス&証明書ページ) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + * 4D Volume Desktop フォルダーã«è¿½åŠ ã•れãŸãã®ä»–ã®é …ç›® (ã‚れã°) ([4D Volume Desktop フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º](#4d-volume-desktop-フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º) å‚ç…§) + + 実行ファイルã®å‹•作ã«ã¯ã€ã“れらã™ã¹ã¦ã®é …ç›®ãŒåŒã˜ãƒ•ォルダー内ã«å¿…è¦ã§ã™ã€‚ + +* *macOS* + - MyProject.app ã¨ã„ã†åç§°ã®ã‚½ãƒ•トウェアパッケージã«ã€ãƒ—ラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãªã©å¿…è¦ãªé …ç›®ãŒã™ã¹ã¦æ ¼ç´ã•れã¾ã™ã€‚ プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã®çµ±åˆã«é–¢ã™ã‚‹è©³ç´°ã¯ [プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸](#プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 ライセンスã®çµ±åˆã«é–¢ã—ã¦ã¯ [ライセンス&証明書ページ](#ライセンス&証明書ページ) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 **注**: macOSã§ã¯ã€4D ランゲージ㮠[Application file](https://doc.4d.com/4Dv18R4/4D/18-R4/Application-file.301-4982855.en.html) コマンドãŒè¿”ã™ã®ã¯ã€ã‚½ãƒ•トウェアパッケージ内㮠"Contents:macOS" フォルダー内ã«ã‚³ãƒ”ーã•れる ApplicationName ファイルã®ãƒ‘スåã§ã™ (ソフトウェアパッケージ㮠"Contents:Resources" フォルダー内㮠.comp ファイルã®ãƒ‘スã§ã¯ã‚りã¾ã›ã‚“)。 + + +#### 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 フォルダーやファイルã¯ç‰¹å®šã®å ´æ‰€ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ : + +* *cert.pem* 㨠*key.pem* ファイル (オプション): ã“れらã®ãƒ•ァイルã¯TLS接続ã¨ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–コマンドã«ä½¿ç”¨ã•れã¾ã™ã€‚ +* デフォルト Web ルートフォルダー + +インストール場所: + +- **Windows**: *Final Application\MyProject\Database* サブフォルダー内 +- **macOS**: *MyProject.app* ソフトウェアパッケージã¨åŒéšŽå±¤ + + + + + +## クライアント/サーãƒãƒ¼ãƒšãƒ¼ã‚¸ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®è‡ªå‹•更新もサãƒãƒ¼ãƒˆã§ãるクロスプラットフォームãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã™ã‚‹ãŸã‚ã®è¨­å®šã‚’ãŠã“ãªã„ã¾ã™ã€‚ + +![](assets/en/Project/buildappCSProj.png) + +### クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¨ã¯ + +クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯ã€ä»¥ä¸‹ã®3ã¤ã®é …ç›®ã®çµ„ã¿åˆã‚ã›ã‹ã‚‰æˆã‚Šã¾ã™: + +- コンパイルã•れ㟠4Dプロジェクト +- 4D Server アプリケーション +- 4D Volume Desktop アプリケーション (macOS / Windows) + +ビルドを行ã†ã¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーション㯠2ã¤ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ‘ーツ (サーãƒãƒ¼ã¨ã€å„クライアントマシンã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ã§æ§‹æˆã•れã¾ã™ã€‚ + +> Intel/AMD 㨠Apple Silicon ãƒžã‚·ãƒ³ãŒæ··åœ¨ã—ã¦ã„る環境ã§ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを実行ã™ã‚‹å ´åˆã€ãã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーション㯠macOS 上ã§ã€[å…¨ã¦ã®ãƒ—ロセッサ](Project/compiler.md#コンパイル対象cpu) å‘ã‘ã«ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ã“ã†ã™ã‚‹ã“ã¨ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯ã™ã¹ã¦ãƒã‚¤ãƒ†ã‚£ãƒ–ã«å®Ÿè¡Œã•れã¾ã™ã€‚ + +ビルドã•れãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯èµ·å‹•や接続処ç†ãŒç°¡æ˜“ã§ã™: + +- サーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 +- クライアントを起動ã™ã‚‹ã«ã‚‚ã€åŒæ§˜ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¸ã®æŽ¥ç¶šãŒç›´æŽ¥ãŠã“ãªã‚れるãŸã‚〠接続ダイアログã§ã‚µãƒ¼ãƒãƒ¼ã‚’é¸æŠžã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æŽ¥ç¶šå¯¾è±¡ã®ã‚µãƒ¼ãƒãƒ¼ã‚’åç§° (サーãƒãƒ¼ãŒåŒã˜ã‚µãƒ–ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã«ã‚ã‚‹å ´åˆ)ã€ã‚ã‚‹ã„ã¯IPアドレスã«ã‚ˆã£ã¦èªè­˜ã—ã¾ã™ã€‚IPã‚¢ãƒ‰ãƒ¬ã‚¹ã®æŒ‡å®šã¯ buildapp.4DSettings ファイル内㮠`IPAddress` XMLキーを使用ã—ã¦è¨­å®šã•れã¾ã™ã€‚ 接続ãŒå¤±æ•—ã—ãŸå ´åˆã®ãŸã‚ã«ã€ä»£æ›¿æ©Ÿæ§‹ã‚’実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã¤ã„ã¦ã¯ [クライアント接続ã®ç®¡ç†](#クライアント接続ã®ç®¡ç†) ã®ç« ã§èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ ã¾ãŸã€**Option** (macOS) ã‚„ **Alt** (Windows) キーを押ã—ãªãŒã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーション起動ã™ã‚‹ã¨ã€æ¨™æº–ã®æŽ¥ç¶šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’å¼·åˆ¶çš„ã«è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ サーãƒãƒ¼ã‚¢ãƒ—リケーションã«ã¯ã€å¯¾å¿œã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ã¿ãŒæŽ¥ç¶šã§ãã¾ã™ã€‚ 標準㮠4Dアプリケーションを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æŽ¥ç¶šã‚’è©¦ã¿ã‚‹ã¨ã€æŽ¥ç¶šã¯æ‹’å¦ã•れエラーãŒè¿”ã•れã¾ã™ã€‚ +- クライアントå´ã‚’ [ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«è‡ªå‹•æ›´æ–°](#サーãƒãƒ¼ã‚¢ãƒ—リケーション内部ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ã‚³ãƒ”ー) ã™ã‚‹ã‚ˆã†ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションを設定ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯æœ€åˆã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ãƒ“ルドã—ã¦é…布ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚以é™ã®ã‚¢ãƒƒãƒ—デートã¯ã€è‡ªå‹•アップデート機構を利用ã™ã‚‹ã“ã¨ã§ç®¡ç†ã—ã¾ã™ã€‚ +- ã¾ãŸã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ ([SET UPDATE FOLDER](https://doc.4d.com/4dv19/help/command/ja/page1291.html)ã€ãŠã‚ˆã³ [RESTART 4D](https://doc.4d.com/4dv19/help/command/ja/page1292.html)) を使用ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã‚’自動化ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ + + + +### サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド + +アプリケーションã®ã‚µãƒ¼ãƒãƒ¼éƒ¨åˆ†ã‚’ビルドã™ã‚‹ã«ã¯ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ ビルドã«ä½¿ç”¨ã™ã‚‹ 4D Server アプリケーションã®å ´æ‰€ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã® 4D Server ã¯ãƒ“ルドをãŠã“ãªã†ãƒ—ラットフォームã«å¯¾å¿œã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“ (ãŸã¨ãˆã°ã€Windows 用ã®ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã«ã¯ Windows 上ã§ãƒ“ルドを実行ã™ã‚‹å¿…è¦ãŒã‚りã€Windows 版㮠4D Server アプリケーションを指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 + +#### 4D Server ã®å ´æ‰€ + +4D Server ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ã«ã¯**[...]**ボタンをクリックã—ã¾ã™ã€‚ macOS ã§ã¯ 4D Server ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚ + +#### ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +生æˆã•れるアプリケーションã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’指定ã—ã¾ã™ã€‚ ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’ã‚‚ã¨ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã‹ã‚‰ã®æŽ¥ç¶šã‚’å—ã‘入れãŸã‚Šæ‹’å¦ã—ãŸã‚Šã§ãã¾ã™ã€‚ クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã§äº’æ›æ€§ã®ã‚る番å·ã®ç¯„囲㯠[XML キー](#アプリケーションビルド設定) ã§è¨­å®šã—ã¾ã™ã€‚ + +#### Allow connection of Silicon Mac clients + +When building a server on Windows, check this option to allow Apple Silicon clients to connect to your server application. You can then specify a path to the structure compiled for Apple Silicon/Intel. + +To allow Apple Silicon clients to connect to a Server application built on Windows, you must first build a client application on macOS, with a project compiled for Apple Silicon and Intel. This automatically creates a compiled structure, identical to the one created with the **[Build compiled structure](#build-compiled-structure)** option (without the related folders). + +Then, you can copy that structure to your Windows machine, and use it to build the server application: + +![](assets/en/Desktop/allow-mac-clients.png) + +#### Compiled structure location + +Path to the compiled structure of the Apple Silicon/Intel client application. + +#### データリンクモードã®åŸºæº– + +ã“ã®ã‚ªãƒ—ションを使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã¨ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 二種類ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžå¯èƒ½ã§ã™: + +* **アプリケーションå** (デフォルト) - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€4D アプリケーションã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã«å¯¾å¿œã™ã‚‹ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚¢ãƒ—リケーションパッケージをディスク上ã§è‡ªç”±ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションを複製ã™ã‚‹å ´åˆã‚’除ã„ã¦ã€é€šå¸¸ã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«å¯¾ã—ã¦ã“ã®ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れるã¹ãã§ã™ã€‚ + +* **アプリケーションパス** - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€çµ„ã¿è¾¼ã¿ 4D アプリケーションã¯è‡ªèº«ã«ç´ã¥ã„ã¦ã„ã‚‹ *lastDataPath.xml* ファイルを解æžã—ã¦ã€èµ·å‹•アプリã®ãƒ•ルパスã«åˆè‡´ã™ã‚‹ "executablePath" 属性をæŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ‘スマップã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’探ã—〠åŒã‚¨ãƒ³ãƒˆãƒªãƒ¼å†…ã§ "dataFilePath" 属性ã§å®šç¾©ã•れã¦ã„るデータファイルを開ãã¾ã™ã€‚ ãªã„å ´åˆã¯ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ (デフォルトモード)。 + +データリンクモードã«ã¤ã„ã¦ã®è©³ç´°ã¯ [最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +### クライアントアプリケーションをビルド + +アプリケーションã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆéƒ¨åˆ†ã‚’ビルドã™ã‚‹ã«ã¯ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨åŒæ™‚ã«: + +- [**サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド**](#サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド) ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠž: ç¾åœ¨ã®ãƒ—ラットフォーム用ã®ã‚µãƒ¼ãƒãƒ¼ã¨å¯¾å¿œã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’ビルドã—ã€(ä»»æ„ã§) 自動アップデートアーカイブファイルもå«ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ +- [**サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド**](#サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド) ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãªã„: 通常ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒ“ルド時ã«é¸æŠžã™ã‚‹ "別プラットフォーム" 用ã®ã‚¢ãƒƒãƒ—デートアーカイブをビルドã™ã‚‹ã¨ãã«ã“ã®è¨­å®šã‚’使ã„ã¾ã™ã€‚ + +#### 4D Volume Desktopã®å ´æ‰€ + +クライアントアプリケーションã®ãƒ“ルドã«ä½¿ç”¨ã™ã‚‹ 4D Volume Desktop アプリケーションã®å ´æ‰€ã‚’指定ã—ã¾ã™ã€‚ + +> 4D Volume Desktop ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¯ã€4D Developer ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¨åˆè‡´ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€4D v19 を利用ã—ã¦ã„れã°ã€4D Volume Desktop v19 ãŒå¿…è¦ã§ã™ã€‚ + +ã“ã® 4D Volume Desktop ã¯ãƒ“ルドをãŠã“ãªã†ãƒ—ラットフォームã«å¯¾å¿œã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ç•°ãªã‚‹ãƒ—ラットフォーム用ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをビルドã™ã‚‹ã«ã¯ã€ãã®ãƒ—ラットフォーム㧠4D アプリケーションを実行ã—ã€è¿½åŠ ã®ãƒ“ルド処ç†ã‚’ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +クライアントアプリã‹ã‚‰ç‰¹å®šã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’使用ã—㦠(サブãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã«ã‚µãƒ¼ãƒãƒ¼åãŒå…¬é–‹ã•れã¦ã„ãªã„) サーãƒãƒ¼ã«æŽ¥ç¶šã—ãŸã„å ´åˆã€buildapp.4DSettings ファイル内㮠`IPAddress` XML キーを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 詳細㯠[`BUILD APPLICATION`](https://doc.4d.com/4dv19/help/command/ja/page871.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 接続失敗時ã®ç‰¹å®šã®æ©Ÿæ§‹ã‚’実装ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 詳細㯠[クライアント接続ã®ç®¡ç†](#クライアント接続ã®ç®¡ç†) ã§èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ + +#### サーãƒãƒ¼ã‚¢ãƒ—リケーション内部ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ã‚³ãƒ”ー + +ã“ã®ã‚¨ãƒªã‚¢ã®ã‚ªãƒ—ションã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒ“ルドã•れãŸéš›ã®ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’自動更新ã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’設定ã—ã¾ã™ã€‚ ã“れらã®ã‚ªãƒ—ションã¯ã€**クライアントアプリケーションをビルド** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿æœ‰åйã§ã™ã€‚ + +- **Windows クライアントアプリケーションã®è‡ªå‹•更新を有効ã«ã™ã‚‹** - ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ã‚¢ãƒƒãƒ—デートã®éš›ã« Windowsプラットフォーム上ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã«é€ä¿¡ã•れる `.4darchive` ファイルを作æˆã—ã¾ã™ã€‚ +- **macOS クライアントアプリケーションã®è‡ªå‹•更新を有効ã«ã™ã‚‹** - ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ã‚¢ãƒƒãƒ—デートã®éš›ã« macOSプラットフォーム上ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã«é€ä¿¡ã•れる `.4darchive` ファイルを作æˆã—ã¾ã™ã€‚ + +`.4darchive` ã¯ä»¥ä¸‹ã®å ´æ‰€ã«ã‚³ãƒ”ーã•れã¾ã™: + +``` +_Build/Client Server executable/Upgrade4DClient/ +``` + +#### 別プラットフォームã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã®é¸æŠž + + + + +別プラットフォーム上ã§å‹•作ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーション用ã«ã€**自動更新を有効ã«ã™ã‚‹** オプションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ã€ä»¥ä¸‹ã®å ´åˆã«ã®ã¿æœ‰åйã§ã™: + +- **サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルド** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„る。 +- ç¾åœ¨ã®ãƒ—ラットフォームã§å®Ÿè¡Œã•れるクライアントアプリケーションã«ã¤ã„ã¦ã€**自動更新を有効ã«ã™ã‚‹** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„る。 + +ã“ã®æ©Ÿèƒ½ã‚’利用ã™ã‚‹ã«ã¯ã€**[...]** ボタンをクリックã—ã¦ã€ã‚¢ãƒƒãƒ—デートã«ä½¿ç”¨ã™ã‚‹ãƒ•ァイルã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®å ´æ‰€ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ é¸æŠžã™ã‚‹ãƒ•ァイルã¯ã€ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ãƒ—ラットフォームã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: + +| ç¾åœ¨ã®ã‚µãƒ¼ãƒãƒ¼ãƒ—ラットフォーム | å¿…è¦ãªãƒ•ァイル | 詳細 | +| --------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| macOS | Windows用4D Volume Desktop *ã¾ãŸã¯* Windows クライアントアップデートアーカイブ | デフォルトã§ã¯ã€Windows用㮠`4D Volume Desktop` ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ å‰ã‚‚ã£ã¦ Windowsä¸Šã§æ§‹ç¯‰ã•れ㟠`.4darchive` ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã«ã¯ã€**Shift** を押ã—ãªãŒã‚‰ [...] をクリックã—ã¾ã™ã€‚ | +| Windows | macOS クライアントアップデートアーカイブ | å‰ã‚‚ã£ã¦ macOS ã§ãƒ“ルドã•れãŸç½²å入り `.4darchive` ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ã¾ã™ã€‚ | + +[**クライアントアプリケーションをビルド**](#クライアントアプリケーションをビルド) 㨠[**自動更新を有効ã«ã™ã‚‹**](#copy-of-client-applications-inside-the-server-application) オプションã®ã¿ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ã€ã‚µãƒ¼ãƒãƒ¼ã¨ã¯ç•°ãªã‚‹ãƒ—ラットフォーム上㧠`.4darchive` ファイルをビルドã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### 更新通知ã®è¡¨ç¤º + +サーãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãŒæ›´æ–°ã•れるã¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¸ã®æ›´æ–°é€šçŸ¥ãŒè‡ªå‹•ã§ãŠã“ãªã‚れã¾ã™ã€‚ + +ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™: クライアント/サーãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ビルドã™ã‚‹éš›ã€æ–°ã—ã„クライアント㯠**ApplicationName** Server フォルダー内㮠**Upgrade4DClient** サブフォルダーã«åœ§ç¸®ã—ã¦æ ¼ç´ã•れã¾ã™ (macOS ã§ã¯ã€ã“れらã®ãƒ•ォルダーã¯ã‚µãƒ¼ãƒãƒ¼ãƒ‘ッケージ内ã«é…ç½®ã•れã¾ã™)。 クロスプラットフォームã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを生æˆã—ãŸå ´åˆã«ã¯ã€å„プラットフォーム用㫠*.4darchive* ã¨ã„ã†æ›´æ–°ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™: + +ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æ›´æ–°ã‚’通知ã™ã‚‹ã«ã¯ã€å¤ã„サーãƒãƒ¼ã‚¢ãƒ—リケーションを新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ç½®ãæ›ãˆã¦èµ·å‹•ã—ã¾ã™ã€‚ ã‚ã¨ã®å‡¦ç†ã¯è‡ªå‹•ã§ãŠã“ãªã‚れã¾ã™ã€‚ + +å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã€æ›´æ–°ã•れãŸã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã‚’試ã¿ã‚‹ã¨ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒåˆ©ç”¨å¯èƒ½ã§ã‚る旨をä¼ãˆã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ä¸Šã«è¡¨ç¤ºã•れã¾ã™ã€‚ ユーザーã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æ›´æ–°ã™ã‚‹ã‹ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’キャンセルã§ãã¾ã™ã€‚ + +* ユーザー㌠**OK** をクリックã™ã‚‹ã¨ã€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ ダウンロードãŒå®Œäº†ã™ã‚‹ã¨å¤ã„クライアントアプリケーションãŒé–‰ã˜ã‚‰ã‚Œã¦ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒèµ·å‹•ã—サーãƒãƒ¼ã«æŽ¥ç¶šã—ã¾ã™ã€‚ å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒ—リケーションã¯ãƒžã‚·ãƒ³ã®ã‚´ãƒŸç®±ã«ç§»å‹•ã•れã¾ã™ã€‚ +* ユーザー㌠**キャンセル** をクリックã™ã‚‹ã¨ã€æ›´æ–°æ‰‹ç¶šãã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚å¤ã„クライアントã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚µãƒ¼ãƒãƒ¼ã®è¨±å¯ã™ã‚‹ç¯„囲外ã§ã‚れ㰠(後述å‚ç…§)ã€ã‚¢ãƒ—リケーションã¯é–‰ã˜ã‚‰ã‚Œã¦ã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ãã†ã§ãªã‘れ㰠(デフォルトã§) 接続ãŒãŠã“ãªã‚れã¾ã™ã€‚ + +#### 自動更新ã®å¼·åˆ¶ + +æ›´æ–°ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’キャンセルã•ã›ãŸããªã„å ´åˆã€ ãŸã¨ãˆã°æ–°ã—ã„メジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® 4D Server を使用ã™ã‚‹ã‚ˆã†ãªå ´åˆã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをå„クライアントマシンã«å¿…ãšã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +更新を強制ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¨äº’æ›æ€§ã®ã‚ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã®ç¯„囲ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ç¾ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’除外ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€æœªæ›´æ–°ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®æŽ¥ç¶šã¯æ›´æ–°ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ãŒã® 6 ã®å ´åˆã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ãŒ 5 以下ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを許å¯ã—ãªã„よã†ã«ã§ãã¾ã™ã€‚ + +[ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·](#ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³) ã¯ã‚¢ãƒ—リケーションビルドダイアログã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒšãƒ¼ã‚¸ã§è¨­å®šã§ãã¾ã™ã€‚ 接続を許å¯ã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã®ç¯„囲㯠[XMLキー](#アプリケーションビルド設定) ã§è¨­å®šã—ã¾ã™ã€‚ + + +#### エラーãŒç™ºç”Ÿã™ã‚‹å ´åˆ + +ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã‚’実行ã§ããªã‹ã£ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã«ã¯æ¬¡ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: "ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ アプリケーションã¯çµ‚了ã—ã¾ã™ã€‚" + +ã“ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹åŽŸå› ã¯è¤‡æ•°ã‚りãˆã¾ã™ã€‚ ã“ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れるよã†ãªå ´åˆã¯ã€ã¾ã𿬡ã®ç‚¹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã¿ã¦ãã ã•ã„: + +* **パスå** - アプリケーションビルドダイアログや XMLキー (ãŸã¨ãˆã° *ClientMacFolderToWin*) ã§æŒ‡å®šã•れãŸãƒ‘スåã®æœ‰åŠ¹æ€§ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 ã¨ãã« 4D Volume Desktop ã¸ã®ãƒ‘スをãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 +* **èª­ã¿æ›¸ã権é™** - クライアントマシン上ã§ã‚«ãƒ¬ãƒ³ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを更新ã™ã‚‹æ›¸ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。 + + +### 生æˆã•れるファイル + +クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã¨ã€ä¿å­˜å…ˆãƒ•ォルダー内㫠**Client Server executable** ã¨ã„ã†åå‰ã®æ–°ã—ã„フォルダーãŒä½œæˆã•れã¾ã™ã€‚ ã“ã®ãƒ•ォルダーã«ã¯ã•らã«2ã¤ã®ã‚µãƒ–フォルダー〠*\ Client* 㨠*\ Server* ãŒã‚りã¾ã™ã€‚ +> エラーãŒç™ºç”Ÿã—ãŸå ´åˆã“れらã®ãƒ•ォルダーã¯ä½œæˆã•れã¾ã›ã‚“。 ãã®ã‚ˆã†ãªå ´åˆã«ã¯ã€ã‚¨ãƒ©ãƒ¼ã®åŽŸå› ã‚’ç‰¹å®šã™ã‚‹ãŸã‚ã« [ログファイル](#ログファイル) ã®å†…容を確èªã—ã¦ãã ã•ã„。 + +*\ Client* フォルダーã¯ã€ã‚¢ãƒ—リケーションビルダーを実行ã—ãŸãƒ—ラットフォームã«å¯¾å¿œã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを格ç´ã—ã¾ã™ã€‚ ã“ã®ãƒ•ォルダーをå„クライアントã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ *\ Server* フォルダーã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションを格ç´ã—ã¾ã™ã€‚ + +ã“れらã®ãƒ•ォルダーã®å†…容ã¯ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ—ラットフォームã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™: + +* *Windows* - å„フォルダーã«*\Client.exe* (クライアント用) ã‚ã‚‹ã„㯠*\Server.exe* (サーãƒãƒ¼ç”¨) ã¨ã„ã†åå‰ã®å®Ÿè¡Œãƒ•ァイルã€ãŠã‚ˆã³ãれãžã‚Œã«å¯¾å¿œã™ã‚‹.rsrファイルãŒä½œæˆã•れã¾ã™ã€‚ ã“れらã®ãƒ•ォルダーã«ã¯ã€ã‚¢ãƒ—リケーション実行ã®ãŸã‚ã«å¿…è¦ãªæ§˜ã€…ãªãƒ•ァイルやフォルダーã€ãŠã‚ˆã³å…ƒã® 4D Server ã‚„ 4D Volume Desktop ã«è¿½åŠ ã•れãŸã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºé …目も格ç´ã•れã¾ã™ã€‚ +* *macOS* - å„フォルダー㯠\ Client (クライアント用) 㨠\ Server (サーãƒãƒ¼ç”¨) ã¨ã„ã†åå‰ã®ã‚¢ãƒ—リケーションパッケージã«ãªã£ã¦ã„ã¾ã™ã€‚ å„パッケージã«ã¯å‹•作ã«å¿…è¦ãªã™ã¹ã¦ã®ãƒ•ァイルãŒå«ã¾ã‚Œã¾ã™ã€‚ macOS ã§ã¯ã€ã‚¢ãƒ—リケーションを実行ã™ã‚‹ãŸã‚ã«ãƒ‘ッケージをダブルクリックã—ã¾ã™ã€‚ + + > ビルドã•れ㟠macOSパッケージã«ã¯ã€Windows版ã®ã‚µãƒ–フォルダーã¨åŒã˜ã‚‚ã®ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ ビルドã•れ㟠macOS パッケージã®å†…容を表示ã™ã‚‹ã«ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’ **Control+クリック** ã—ã¦ã€"パッケージã®å†…容を表示"ã‚’é¸æŠžã—ã¾ã™ã€‚ + +"クライアントã®è‡ªå‹•更新を有効ã«ã™ã‚‹" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¦ã„ã‚‹å ´åˆã€*\Server* フォルダー/パッケージã«ã¯è¿½åŠ ã§ *Upgrade4DClient* サブフォルダーãŒä½œæˆã•れã¾ã™ã€‚ ã“ã®ã‚µãƒ–フォルダーã«ã¯ macOS/Windows 版ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションãŒåœ§ç¸®ã•ã‚Œã¦æ ¼ç´ã•れã¾ã™ã€‚ クライアントアプリケーションを自動更新ã™ã‚‹ã¨ãã«ã€ã“ã®ãƒ•ァイルã¯ä½¿ç”¨ã•れã¾ã™ã€‚ + + +#### Webファイルã®å ´æ‰€ + +サーãƒãƒ¼ã‚„クライアントを Webサーãƒãƒ¼ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã€Webサーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹ãƒ•ァイルを特定ã®å ´æ‰€ã«é…ç½®ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“ : + +- *cert.pem* 㨠*key.pem* ファイル (オプション): ã“れらã®ãƒ•ァイルã¯TLS接続ã¨ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–コマンドã«ä½¿ç”¨ã•れã¾ã™ã€‚ +- デフォルト Web ルートフォルダー (WebFolder) + +インストール場所: +* **Windows** + * **サーãƒãƒ¼ã‚¢ãƒ—リケーション** - *Client Server executable\ \Server\Server Database* サブフォルダー内ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ + * **クライアントアプリケーション** - *Client Server executable\ \Client* サブフォルダー内ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ + +* **macOS** + * **サーãƒãƒ¼ã‚¢ãƒ—リケーション** - *\Server* ソフトウェアパッケージã¨åŒéšŽå±¤ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ + * **クライアントアプリケーション** - *\Client* ソフトウェアパッケージã¨åŒéšŽå±¤ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ + + +### シングルユーザークライアントアプリケーションã®åŸ‹ã‚込㿠+ +4D ã§ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã«ã‚³ãƒ³ãƒ‘イル済ストラクãƒãƒ£ãƒ¼ã‚’埋ã‚込むã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã¨ã€ãŸã¨ãˆã°ã€`.4dlink` ファイルを `OPEN DATABASE` コマンドã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã§ç•°ãªã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ãª "ãƒãƒ¼ã‚¿ãƒ«" ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã‚’有効化ã™ã‚‹ãŸã‚ã«ã¯ã€*buildApp* 設定ファイル㫠`DatabaseToEmbedInClientWinFolder` ã¾ãŸã¯ `DatabaseToEmbedInClientMacFolder` キーを追加ã—ã¾ã™ã€‚ ã„ãšã‚Œã‹ã®ã‚­ãƒ¼ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ã‚¢ãƒ—リケーションビルドプロセスã®é€”中ã§çµ„ã¿è¾¼ã¿ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションãŒç”Ÿæˆã•れã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãŒ (EnginedServer.4Dlink ファイルã®ä»£ã‚りã«) "Database" フォルダー内ã«ç½®ã‹ã‚Œã¾ã™ã€‚ + +- シングルユーザーアプリケーション内㫠"Default Data" フォルダーãŒã‚れã°ã€ã‚¢ãƒ—リケーションã«ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒåŸ‹ã‚è¾¼ã¾ã‚Œã¾ã™ã€‚ +- シングルユーザーアプリケーション内㫠"Default Data" フォルダーãŒãªã‘れã°ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŠã‚ˆã³ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãªã—ã§ã‚¢ãƒ—リケーションãŒå®Ÿè¡Œã•れã¾ã™ã€‚ + +基本シナリオã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +1. アプリケーションビルド ダイアログボックス内ã«ã¦ã€"コンパイルã•れãŸã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã§ä½¿ç”¨ã•れるアプリケーション㮠.4DC ã¾ãŸã¯ .4DZ ファイルを生æˆã—ã¾ã™ã€‚ +2. クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーション㮠*buildApp.4DSettings* ファイル内ã§ã€ã‚³ãƒ³ãƒ‘イルã•れãŸã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションを格ç´ã—ã¦ã„るフォルダã¸ã®ãƒ‘スを以下㮠xml ã‚­ãƒ¼ã«æŒ‡ç¤ºã—ã¾ã™: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã—ã¾ã™ã€‚ ã“れã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™: + - シングルユーザーアプリケーションã®ãƒ•ォルダー全体ãŒã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã® "Database" フォルダー内ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ + - "Database" フォルダー㮠*EnginedServer.4Dlink* ファイルã¯ç”Ÿæˆã•れã¾ã›ã‚“。 + - シングルユーザーアプリケーションã®ã‚³ãƒ”ãƒ¼ãŒæŒã¤ .4DCã€.4DZã€.4DIndy ファイルã¯ã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®åå‰ã¸ã¨ãƒ•ァイルåãŒå¤‰æ›´ã•れã¾ã™ã€‚ + - `PublishName` キーã¯ã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã® *info.plist* ã«ã‚³ãƒ”ーã•れã¾ã›ã‚“。 + - シングルユーザーデータベース㫠"Default Data" フォルダーãŒãªã„å ´åˆã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ãƒ‡ãƒ¼ã‚¿ãªã—ã§å®Ÿè¡Œã•れã¾ã™ã€‚ + +4D Server ã®è‡ªå‹•アップデート機能 ([ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³](#ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³) 番å·ã€`SET UPDATE FOLDER コマンドãªã©...) ã¯ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションã«ãŠã„ã¦ã‚‚標準ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ãƒ—リケーションã¨åŒæ§˜ã«å‹•ãã¾ã™ã€‚ 接続時ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーション㯠CurrentVers` キーを 4D Server ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãƒ¬ãƒ³ã‚¸ã¨æ¯”較ã—ã¾ã™ã€‚ レンジ外ã ã£ãŸå ´åˆã€ã‚¢ãƒƒãƒ—デートã•れã¦ã„るシングルユーザーアプリケーションãŒã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•れã€ã‚¢ãƒƒãƒ—データーãŒãƒ­ãƒ¼ã‚«ãƒ«ã‚¢ãƒƒãƒ—デートプロセスを実行ã—ã¾ã™ã€‚ + + +### クライアントãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーåã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +クライアントãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーã¯ã€ãƒªã‚½ãƒ¼ã‚¹ã‚„コンãƒãƒ¼ãƒãƒ³ãƒˆãªã©ã®å…±æœ‰è¦ç´ ã‚’æ ¼ç´ã™ã‚‹ã®ã«ã—よã†ã•れã¾ã™ã€‚ ã“れらã¯ã€ã‚µãƒ¼ãƒãƒ¼ã¨ãƒªãƒ¢ãƒ¼ãƒˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆé–“ã®é€šä¿¡ã‚’管ç†ã™ã‚‹ã®ã«å¿…è¦ã§ã™ã€‚ クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ã‚·ã‚¹ãƒ†ãƒ ä¸¡æ–¹ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーã«ãƒ‡ãƒ•ォルトパスåを使用ã—ã¾ã™ã€‚ + +特殊ãªå ´åˆã«ãŠã„ã¦ã¯ã€ç‰¹å®šã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã‚’実装ã™ã‚‹ãŸã‚ã«ã€ã“れらã®ãƒ•ォルダーåをカスタマイズã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“ (後述å‚ç…§)。 ã“ã®ãŸã‚ã€4D 㯠*buildApp* 設定ファイルã«ã¦ä½¿ç”¨å¯èƒ½ãª `ClientServerSystemFolderName` ãŠã‚ˆã³ `ServerStructureFolderName` キーをæä¾›ã—ã¦ã„ã¾ã™ã€‚ + + +#### クライアントキャッシュフォルダー + +ãれãžã‚Œç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ã‚»ãƒƒãƒˆã‚’使用ã—ã¦ã„る以外ã¯åŒæ§˜ã®è¤‡æ•°ã®çµ„ã¿è¾¼ã¿ã‚µãƒ¼ãƒãƒ¼ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãŒæŽ¥ç¶šã™ã‚‹ã‚ˆã†ãªå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーåをカスタマイズã™ã‚‹ã¨ä¾¿åˆ©ã‹ã‚‚ã—れã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªå ´åˆã«ã€åŒã˜ãƒ­ãƒ¼ã‚«ãƒ«ãƒªã‚½ãƒ¼ã‚¹ã‚’複数回ダウンロードã™ã‚‹ã®ã‚’é¿ã‘ã‚‹ãŸã‚ã€åŒä¸€ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- デフォルトã®è¨­å®š (*サーãƒãƒ¼ã¸ã®æŽ¥ç¶šã”ã¨ã«å°‚用ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーãŒãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰/æ›´æ–°ã•れã¾ã™*): + +![](assets/en/Admin/cachea.png) + +- `ClientServerSystemFolderName` キーã®ä½¿ç”¨ (*ã™ã¹ã¦ã®ã‚µãƒ¼ãƒãƒ¼ã«å¯¾ã—ã¦åŒã˜ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーãŒä½¿ç”¨ã•れã¾ã™*): + +![](assets/en/Admin/cacheb.png) + + +#### サーãƒãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダー + +ãれãžã‚Œç•°ãªã‚‹ 4Dã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ãƒ“ルドã•れãŸåŒã˜ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションをåŒä¸€ã®ãƒžã‚·ãƒ³ä¸Šã§å®Ÿè¡Œã™ã‚‹å ´åˆã€ã‚µãƒ¼ãƒãƒ¼å´ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーåをカスタマイズã™ã‚‹ã¨ä¾¿åˆ©ã§ã™ã€‚ å„サーãƒãƒ¼ã§ç‹¬è‡ªã®ãƒªã‚½ãƒ¼ã‚¹ã‚’使用ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーをカスタマイズã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +- デフォルトã®è¨­å®š (*åŒã˜ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¯åŒã˜ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーを共有ã—ã¾ã™*): + +![](assets/en/Admin/cacheServera.png) + +- `ServerStructureFolderName` キーã®ä½¿ç”¨ (*å„サーãƒãƒ¼ã‚¢ãƒ—リケーションã«å°‚用ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ•ォルダーãŒä½¿ç”¨ã•れã¾ã™*): + +![](assets/en/Admin/cacheServerb.png) + + + + +## プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã«å«ã‚ã‚‹ [プラグイン](Concepts/plug-ins.md) ã‚„ [コンãƒãƒ¼ãƒãƒ³ãƒˆ](Concepts/components.md) を設定ã§ãã¾ã™ã€‚ + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã€ç¾åœ¨ã® 4Dアプリケーションã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ã„ã‚‹è¦ç´ ãŒãƒªã‚¹ãƒˆã•れã¾ã™: + +![](assets/en/Project/buildapppluginsProj.png) + +* **アクティブ** 列 - ビルドã™ã‚‹ã‚¢ãƒ—リケーションパッケージã«é …目を統åˆã™ã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ デフォルトã§ã™ã¹ã¦ã®é …ç›®ãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚ プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’除外ã™ã‚‹ã«ã¯ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžã‚’外ã—ã¾ã™ã€‚ + + + +* **プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆ** 列 - プラグイン/コンãƒãƒ¼ãƒãƒ³ãƒˆã®å称を表示ã—ã¾ã™ã€‚ + +* **ID** 列 - プラグイン/コンãƒãƒ¼ãƒãƒ³ãƒˆã® ID (ã‚れã°) を表示ã—ã¾ã™ã€‚ + +* **タイプ** 列 - ãã®è¦ç´ ãŒãƒ—ラグインã§ã‚ã‚‹ã‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ã‚ã‚‹ã‹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +ãã®ä»–ã®ãƒ—ラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’アプリケーションã«çµ±åˆã—ãŸã„å ´åˆã«ã¯ã€4D Server ã‚„ 4D Volume Desktop ã® **Plugins** ã‚„ **Components** フォルダーã«ãれらをé…ç½®ã—ã¾ã™ã€‚ ソースアプリケーションã®ãƒ•ォルダーã‹ã‚‰å†…容をコピーã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ  ([4D Volume Desktop フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º](#4D-Volume-Desktop-フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º) å‚ç…§) ã«ã‚ˆã‚Šã€ã©ã‚“ãªã‚¿ã‚¤ãƒ—ã®ãƒ•ァイルã§ã‚‚アプリケーションã«çµ±åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +åŒã˜ãƒ—ラグインã®ç•°ãªã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ (ç¾åœ¨ 4D ã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ãƒ—ラグインãŒã€ã‚½ãƒ¼ã‚¹ã‚¢ãƒ—リケーションã®ãƒ•ォルダーã«ã‚‚é…ç½®ã•れã¦ã„ã‚‹å ´åˆãªã©)ã€4D Volume Desktop/4D Server フォルダーã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒå„ªå…ˆã•れã¾ã™ã€‚ ä»–æ–¹ã€åŒã˜ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒä¸¡æ–¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ãŸå ´åˆã¯ã€ã‚¢ãƒ—リケーションを開ãã“ã¨ã¯ã§ãã¾ã›ã‚“。 +> é…布ã™ã‚‹ã‚¢ãƒ—リケーションã§ãƒ—ラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã™ã‚‹ã«ã¯ã€ãれãžã‚Œé©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã§ã™ã€‚ + + + + + + +## ライセンス&証明書ページ + +ライセンス&証明書ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€æ¬¡ã®ã‚ˆã†ãªã“ã¨ãŒã§ãã¾ã™: + +* シングルユーザーã®ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーションã«çµ±åˆã™ã‚‹ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã‚’指定ã—ã¾ã™ã€‚ +* macOS 環境下ã§ã¯ã€è¨¼æ˜Žæ›¸ã‚’使用ã—ã¦ã‚¢ãƒ—リケーションã«ç½²åã‚’ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/Admin/buildappCertif.png) + +### ライセンスリスト + +アプリケーションã«çµ±åˆã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã‚‹é…布ライセンスã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚ デフォルトã§ãƒªã‚¹ãƒˆã¯ç©ºã§ã™ã€‚ アプリケーションをビルドã™ã‚‹ã«ã¯ *4D Developer Professional* ライセンスã¨ã€ãã®é–‹ç™ºãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã«å¯¾å¿œã™ã‚‹ *4D Desktop Volume* ライセンスを指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ç¾åœ¨ä½¿ç”¨ã—ã¦ã„ã‚‹ã‚‚ã®ã¨ã¯åˆ¥ã® 4D Developer Professional ライセンス (ãŠã‚ˆã³ãã®ä»˜å±žãƒ©ã‚¤ã‚»ãƒ³ã‚¹) を追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ライセンスを追加ã¾ãŸã¯å–り除ãã«ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸‹éƒ¨ã® **[+]** ã¾ãŸã¯ **[-]** ボタンをクリックã—ã¾ã™ã€‚ + +\[+] ボタンをクリックã™ã‚‹ã¨ã€ãƒ•ァイルを開ãダイアログãŒè¡¨ç¤ºã•れã€ãƒžã‚·ãƒ³ã® *Licenses* フォルダーã®å†…容ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ãƒ•ォルダーã®å ´æ‰€ã«ã¤ã„ã¦ã¯ 詳ã—ã㯠[Get 4D folder](https://doc.4d.com/4Dv18/4D/18/Get-4D-folder.301-4505365.ja.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +開発ライセンスã¨ãれã«å¯¾å¿œã—ãŸé…å¸ƒãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ ã“れらã®ãƒ•ァイル㯠*4D Developer Professional* ライセンスや *4D Desktop Volume* ライセンスをアクティベーションã—ãŸéš›ã€ã“ã®å ´æ‰€ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ + +ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆã«é¸æŠžå†…容ãŒå映ã•れã¾ã™: + +* **ライセンス #** - 製å“ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå· +* **ライセンス** - プロダクトå +* **有効期é™** - ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®æœ‰åŠ¹æœŸé™ (ã‚れã°) +* **パス** - ディスク上ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®å ´æ‰€ + +ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒæœ‰åйã§ãªã„å ´åˆã€è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +å¿…è¦ãªã ã‘有効ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 実行å¯èƒ½ã‚¢ãƒ—リケーションをビルドã™ã‚‹éš›ã«ã€4D ã¯æœ€ã‚‚é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’使用ã—ã¾ã™ã€‚ +> "R-リリース" ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã«ã¯ã€å°‚用㮠"R" ライセンスãŒå¿…è¦ã§ã™ ("R" 製å“用ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã¯ "R-" ã‹ã‚‰å§‹ã¾ã‚‹ç•ªå·ã§ã™)。 + +アプリケーションビルド後ã€é…布ライセンスファイルã¯å®Ÿè¡Œå¯èƒ½ãƒ•ァイルã¨åŒéšŽå±¤ (Windows) やパッケージ内 (macOS) ã«è‡ªå‹•ã§ã‚³ãƒ”ーã•れã¾ã™ã€‚ + + +### OS X ç½²åã«ä½¿ç”¨ã™ã‚‹è¨¼æ˜Žæ›¸ + +アプリケーションビルダーã¯ã€macOS 環境下ã«ãŠã„ã¦çµ„ã¿è¾¼ã¿4Dアプリã«ç½²åã‚’ã™ã‚‹æ©Ÿèƒ½ã‚’å‚™ãˆã¦ã„ã¾ã™ (macOS ã®ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã€ã‚µãƒ¼ãƒãƒ¼ãŠã‚ˆã³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リ)。 アプリケーションを署åã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ macOS ã«ãŠã„ã¦ã€ŒMac App Store ã¨ç¢ºèªæ¸ˆã¿ã®é–‹ç™ºå…ƒã‹ã‚‰ã®ã‚¢ãƒ—リケーションを許å¯ã€ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã« Gatekeeper ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã‚¢ãƒ—リケーションを実行ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ (後述㮠"Gatekeeper ã«ã¤ã„ã¦" ã‚’å‚ç…§ãã ã•ã„)。 + +- **アプリケーションã«ç½²å** オプションã«ãƒã‚§ãƒƒã‚¯ã‚’ã™ã‚‹ã¨ã€macOS ã®ã‚¢ãƒ—リケーションビルド処ç†ã«èªè¨¼ãŒå«ã¾ã‚Œã¾ã™ã€‚4D ã¯ãƒ“ルドã®éš›ã«ã€èªè¨¼ã«å¿…è¦ãªè¦ç´ ã®æœ‰ç„¡ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™: + +![](assets/en/Admin/buildapposxcertProj.png) + +ã“ã®ã‚ªãƒ—ション㯠Windows 㨠macOS 両方ã®ç’°å¢ƒã§è¡¨ç¤ºã•れã¾ã™ãŒã€macOS ã®å ´åˆã«ãŠã„ã¦ã®ã¿æœ‰åйã§ã™ã€‚ + +* **èªè¨¼å** - Apple ã«ã‚ˆã£ã¦æœ‰åŠ¹åŒ–ã•れãŸãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーèªè¨¼åを入力ã—ã¦ãã ã•ã„。 ã“ã®èªè¨¼åã¯é€šå¸¸ã€ã‚­ãƒ¼ãƒã‚§ãƒ¼ãƒ³ã‚¢ã‚¯ã‚»ã‚¹ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£å†…ã®è¨¼æ˜Žæ›¸ã®åå‰ã¨ä¸€ç·’ã§ã™ (下図ã®èµ¤æž ): + +![](assets/en/Project/certificate.png) + +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/†フォルダーã«ã‚りã¾ã™ã€‚ エラーãŒèµ·ããŸéš›ã«ã¯ã€ã“ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¦ãã ã•ã„。 + +* **自己署å証明書ã®ç”Ÿæˆ** - 自己署å証明書を生æˆã™ã‚‹ãŸã‚ã® "証明書アシスタント" を実行ã—ã¾ã™ã€‚ Apple 社ã®ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーèªè¨¼ã‚’æŒãŸãªã„å ´åˆã«ã¯ã€è‡ªå·±ç½²å証明書をæä¾›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®è¨¼æ˜Žæ›¸ã‚’使ã†ã¨ã€ã‚¢ãƒ—リケーションを内部的ã«é‹ç”¨ã™ã‚‹å ´åˆã«è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã›ã‚“。 アプリケーションを外部ã§é‹ç”¨ã™ã‚‹å ´åˆ (http やメールを介ã—ãŸå ´åˆ) ã«ã¯ã€ã‚¢ãƒ—リケーションã®é–‹ç™ºè€…ãŒä¸æ˜Žã§ã‚ã‚‹ã¨ã„ã†è­¦å‘ŠãŒ macOS ã§ã®èµ·å‹•時ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ãã®å ´åˆã§ã‚‚ユーザーã¯ã‚¢ãƒ—リケーションを "強制的" ã«èµ·å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

        "証明書アシスタント" ã§ã¯ã€ã‚ªãƒ—ションをé©åˆ‡ã«é¸æŠžã—ã¾ã™: ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> Apple Developer Program ã«åŠ å…¥ã—ã€ã‚¢ãƒ—リケーションã®å…¬è¨¼ (後述å‚ç…§) ã«å¿…è¦ãªãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーèªè¨¼ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +#### Gatekeeper ã«ã¤ã„㦠+ +Gatekeeper ã¨ã¯ macOS ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ã§ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ããŸã‚¢ãƒ—リケーションã®å®Ÿè¡Œã‚’管ç†ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ ã‚‚ã—ダウンロードã—ãŸã‚¢ãƒ—リケーション㌠Apple Store ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸã‚‚ã®ã§ã¯ãªã„ã€ã¾ãŸã¯ç½²åã•れã¦ã„ãªã„å ´åˆã«ã¯å®Ÿè¡ŒãŒæ‹’å¦ã•れã¾ã™ã€‚ + +> Apple Silicon マシンã§ã¯ã€4D [コンãƒãƒ¼ãƒãƒ³ãƒˆ](components.md) ã¯å®Ÿéš›ã«ç½²åã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ç½²åã•れã¦ã„ãªã„コンãƒãƒ¼ãƒãƒ³ãƒˆã®å ´åˆã€ã‚¢ãƒ—リケーション起動時ã«ã‚¨ãƒ©ãƒ¼ ("lib4d-arm64.dylib ã‚’é–‹ã‘ã¾ã›ã‚“...") ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +アプリケーションビルダー㮠**アプリケーションã«ç½²å** 機能ã«ã‚ˆã£ã¦ã€ã“ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚ªãƒ—ションã¨äº’æ›æ€§ã®ã‚るアプリケーションやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’デフォルトã§ç”Ÿæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +#### ノータリゼーション (公証) ã«ã¤ã„㦠+ +macOS 10.14.5 (Mojave) ãŠã‚ˆã³ 10.15 (Catalina) ã«ãŠã„ã¦ã€ã‚¢ãƒ—リケーションã®ãƒŽãƒ¼ã‚¿ãƒªã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ (公証) ㌠Apple ã‚ˆã‚Šå¼·ãæŽ¨å¥¨ã•れã¦ã„ã¾ã™ã€‚公証を得ã¦ã„ãªã„アプリケーションをインターãƒãƒƒãƒˆã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸå ´åˆã€ãƒ‡ãƒ•ォルトã§ãƒ–ロックã•れã¾ã™ã€‚ + +Apple ã®å…¬è¨¼ã‚µãƒ¼ãƒ“スを利用ã™ã‚‹ã®ã«å¿…è¦ãªæ¡ä»¶ã‚’満ãŸã™ãŸã‚ã€4D ã® [ビルトインã®ç½²å機能](#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) ã‚’å‚ç…§ãã ã•ã„。

        + +## アプリケーションアイコンã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º + +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) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。) + + アイコンファイルã®åå‰ã¯ã€ãƒ—ロジェクトファイルå + "*.icns*" æ‹¡å¼µå­ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 4D ã¯è‡ªå‹•ã§ã“ã®ãƒ•ァイルをèªè­˜ã—ã€ã‚¢ã‚¤ã‚³ãƒ³ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ (*.icns* ファイル㯠*ApplicationName.icns* ã«å称変更ã•れ㦠Resourcesフォルダーã«ç½®ã‹ã‚Œã¾ã™ã€‚ã•ら㫠*info.plist* ファイル㮠*CFBundleFileIcon* エントリーを更新ã—ã¾ã™)。 + +* **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 ã®é …å‚ç…§)ã«ã‚ˆã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ 次ã®ã‚­ãƒ¼ãŒåˆ©ç”¨ã§ãã¾ã™: + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- ClientMacIconForWinPath +- ClientWinIconForWinPath + + + +## データファイルã®ç®¡ç† + +### データファイルを開ã + +ユーザーãŒçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã€ã¾ãŸã¯ã‚¢ãƒ—リã®ã‚¢ãƒƒãƒ—デート (シングルユーザーã€ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リ) ã‚’èµ·å‹•ã™ã‚‹ã¨ã€4D ã¯æœ‰åйãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—よã†ã¨ã—ã¾ã™ã€‚ アプリケーションã«ã‚ˆã£ã¦ã€è¤‡æ•°ã®å ´æ‰€ãŒé †æ¬¡æ¤œç´¢ã•れã¾ã™ã€‚ + +組ã¿è¾¼ã¿ã‚¢ãƒ—リ起動時ã®ã‚ªãƒ¼ãƒ—ニングシーケンスã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™: + +1. 4D ã¯æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ã“ã†ã¨ã—ã¾ã™ã€‚詳ã—ã㯠[後述ã®èª¬æ˜Ž](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ãã ã•ã„ (ã“れã¯åˆå›žèµ·å‹•時ã«ã¯é©ç”¨ã•れã¾ã›ã‚“)。 +2. 見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D 㯠.4DZ ファイルã¨åŒéšŽå±¤ã® Default Data フォルダー内ã«ã‚るデータファイルをã€èª­ã¿å–り専用モードã§é–‹ã“ã†ã¨ã—ã¾ã™ã€‚ +3. ã“れも見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯æ¨™æº–ã®ãƒ‡ãƒ•ォルトデータファイルを開ã“ã†ã¨ã—ã¾ã™ (.4DZ ファイルã¨åŒã˜å ´æ‰€ã«ã‚ã‚‹ã€åŒã˜åå‰ã®ãƒ•ァイル)。 +4. ã“れも見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D 㯠"データファイルを開ã" ダイアログボックスを表示ã—ã¾ã™ã€‚ + + +### 最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル + +#### 最後ã«é–‹ã‹ã‚ŒãŸãƒ•ァイルã¸ã®ãƒ‘ス +4D ã§ãƒ“ルドã•れãŸã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¯ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ãƒ‘スをアプリケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内ã«ä¿å­˜ã—ã¾ã™ã€‚ + +アプリケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã®å ´æ‰€ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¿”ã•れるパスã«å¯¾å¿œã—ã¦ã„ã¾ã™: + + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +データファイルパス㯠*lastDataPath.xml* ã¨ã„ã†åå‰ã®å°‚用ファイルã«ä¿å­˜ã•れã¾ã™ã€‚ + +ã“れã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションã®ã‚¢ãƒƒãƒ—デートをæä¾›ã—ãŸã¨ãã«ã‚‚ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル (最後ã«ä½¿ç”¨ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ãŒåˆå›žã®èµ·å‹•ã‹ã‚‰è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯æ¨™æº–çš„ãªé‹ç”¨ã«é©ã—ã¦ã„ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ç‰¹å®šã®å ´åˆã€ãŸã¨ãˆã°çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションを複製ã—ãŸå ´åˆãªã©ã«ãŠã„ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã‚¢ãƒ—リケーションã®ãƒªãƒ³ã‚¯ã‚’変ãˆãŸã„ã“ã¨ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“ (次章å‚ç…§)。 + +#### データリンクモードã®è¨­å®š + +コンパイルã•れãŸã‚¢ãƒ—リケーションã§ã¯ã€4D ã¯æœ€å¾Œã«ä½¿ç”¨ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを自動的ã«ä½¿ç”¨ã—ã¾ã™ã€‚ デフォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ãƒ‘スã¯ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内ã«ä¿å­˜ã•れ〠**アプリケーションå ** ã§ãƒªãƒ³ã‚¯ã•れã¾ã™ã€‚ + +ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使用ã™ã‚‹ãŸã‚ã«çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リを複製ã™ã‚‹å ´åˆã«ã¯ã€ã“ã®æ–¹æ³•ã¯é©ã•ãªã„ã‹ã‚‚ã—れã¾ã›ã‚“。 複製ã•れãŸã‚¢ãƒ—リã¯åŒã˜ã‚¢ãƒ—リケーションユーザー設定フォルダーを共有ã™ã‚‹ãŸã‚ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使用ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ (最後ã«ä½¿ç”¨ã•れãŸãƒ•ァイルãŒé–‹ã‹ã‚Œã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルåを変更ã—ãŸå ´åˆã§ã‚‚çµæžœã¯åŒã˜ã§ã™)。 + +ãã®ãŸã‚ 4D ã§ã¯ã€ã‚¢ãƒ—リケーションパスを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ãƒªãƒ³ã‚¯ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ã“ã®ã¨ãã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯ç‰¹å®šã®ãƒ‘スを使用ã—ã¦ãƒªãƒ³ã‚¯ã•れるã®ã§ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ•ァイルã§ã‚ã‚‹ã‹ã¯å•ã‚れã¾ã›ã‚“。 ã“ã®è¨­å®šã‚’使ã†ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã®åŸºæº–ã‚’ **アプリケーションパス** ã«è¨­å®šã—ã¾ã™ã€‚ + +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使ãˆã°ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リãŒã„ãã¤ã‚ã£ã¦ã‚‚ã€ãれãžã‚ŒãŒå°‚用ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ãˆã¾ã™ã€‚ ãŸã ã—ã€ãƒ‡ãƒ¡ãƒªãƒƒãƒˆã‚‚ã‚りã¾ã™: アプリケーションパッケージを移動ã•ã›ã¦ã—ã¾ã†ã¨ã‚¢ãƒ—リケーションパスãŒå¤‰ã‚ã£ã¦ã—ã¾ã†ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを見ã¤ã‘られãªããªã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯é–‹ãデータファイルを指定ã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’æç¤ºã•ã‚Œã€æ­£ã—ã„ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“ã€‚ä¸€åº¦é¸æŠžã•れれã°ã€*lastDataPath.xml* ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›´æ–°ã•ã‚Œã€æ–°ã—ã„ "executablePath" 属性ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒä¿å­˜ã•れã¾ã™ã€‚ + + +*データãŒã‚¢ãƒ—リケーションåã§ãƒªãƒ³ã‚¯ã•れã¦ã„ã‚‹å ´åˆã®è¤‡è£½:* ![](assets/en/Project/datalinking1.png) + +*データãŒã‚¢ãƒ—リケーションパスã§ãƒªãƒ³ã‚¯ã•れã¦ã„ã‚‹å ´åˆã®è¤‡è£½:* ![](assets/en/Project/datalinking2.png) + +ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã¯ã‚¢ãƒ—リケーションビルドã®éš›ã«é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトã«ãƒ˜ãƒ«ãƒ—メッセージを関連付ã‘ã‚‹ã«ã¯: + +- アプリケーションビルダー㮠[アプリケーションページ](#アプリケーションページ) ã¾ãŸã¯ [クライアント/サーãƒãƒ¼ãƒšãƒ¼ã‚¸](#クライアント-サーãƒãƒ¼ãƒšãƒ¼ã‚¸) を使用ã™ã‚‹ã€‚ +- シングルユーザーã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーション㮠**LastDataPathLookup** XMLキーを使用ã™ã‚‹ã€‚ + + +### デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ォルダーを定義ã™ã‚‹ + +4D ã§ã¯ã€ã‚¢ãƒ—リケーションビルド時ã«ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションã®åˆå›žèµ·å‹•時ã«ã€é–‹ãã¹ãローカルデータファイルãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆ (å‰è¿°ã® [オープニングシーケンス](#データファイルを開ã)å‚ç…§)ã€ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒèª­ã¿å–り専用モードã§è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã‚’使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リをåˆå›žèµ·å‹•ã—ãŸã¨ãã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル作æˆãƒ»é¸æŠžã®æ“作をより制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +具体的ã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªå ´åˆã«å¯¾å¿œã§ãã¾ã™: + +- æ–°ã—ã„ã€ã¾ãŸã¯ã‚¢ãƒƒãƒ—デートã•れãŸçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リを起動ã—ãŸã¨ãã«ã€"データファイルを開ã" ダイアログãŒè¡¨ç¤ºã•れるã®ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ãƒ•ォルトデータファイルãŒé–‹ã‹ã‚ŒãŸã“ã¨ã‚’èµ·å‹•æ™‚ã«æ¤œçŸ¥ã—ã¦ã€ç‹¬è‡ªã®ã‚³ãƒ¼ãƒ‰ã‚„ダイアログを実行ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ä½œæˆã‚„é¸æŠžã‚’ä¿ƒã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- デモアプリãªã©ã®ç”¨é€”ã§ã€èª­ã¿å–り専用データã—ã‹æŒãŸãªã„組ã¿è¾¼ã¿ã‚¢ãƒ—リをé…布ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを定義・使用ã™ã‚‹ã«ã¯: + +- デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル (åç§°ã¯å¿…ãš "Default.4DD") ã‚’ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ—ロジェクトã®ãƒ‡ãƒ•ォルトフォルダー (åç§°ã¯å¿…ãš "Default Data") 内ã«ä¿å­˜ã—ã¾ã™ã€‚ ã“ã®ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«ã¯ã€ãƒ—ロジェクト構æˆã«å¿œã˜ã¦å¿…è¦ãªãƒ•ァイルもã™ã¹ã¦æƒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: インデックス (.4DIndx)ã€å¤–部BLOBã€ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ã€ä»–。 å¿…ãšã€æœ‰åйãªãƒ‡ãƒ•ォルトデータファイルを用æ„ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 ãªãŠã€ãƒ‡ãƒ•ォルトデータファイルã¯ã¤ã­ã«èª­ã¿å–り専用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ä½œæˆå‰ã«ã€ã‚らã‹ã˜ã‚大元ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® "ログを使用" オプションをéžé¸æŠžã«ã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ +- アプリケーションをビルドã™ã‚‹ã¨ã€ã“ã®ãƒ‡ãƒ•ォルトデータフォルダーãŒçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«çµ±åˆã•れã¾ã™ã€‚ åŒãƒ•ォルダー内ファイルã¯ã™ã¹ã¦ä¸€ç·’ã«åŸ‹ã‚è¾¼ã¾ã‚Œã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã‚’図示ã™ã‚‹ã¨æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +![](assets/en/Project/DefaultData.png) + +デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒåˆå›žèµ·å‹•æ™‚ã«æ¤œçŸ¥ã•れãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯è‡ªå‹•çš„ã«èª­ã¿å–り専用モードã§é–‹ã‹ã‚Œã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®å¤‰æ›´ã‚’ä¼´ã‚ãªã„カスタムオペレーションを実行ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + + +## クライアント接続ã®ç®¡ç† + +ã“ã“ã§ã¯ã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リãŒé‹ç”¨ç’°å¢ƒã«ãŠã„ã¦å¯¾è±¡ã‚µãƒ¼ãƒãƒ¼ã¸ã¨æŽ¥ç¶šã™ã‚‹éš›ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +### 接続シナリオ + +組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã®æŽ¥ç¶šãƒ—ãƒ­ã‚·ãƒ¼ã‚¸ãƒ£ãƒ¼ã¯ã€å°‚用サーãƒãƒ¼ãŒä½¿ç”¨ä¸å¯èƒ½ãªå ´åˆã«ã‚‚柔軟ã«å¯¾å¿œã—ã¾ã™ã€‚ 4Dクライアントアプリã®ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—シナリオã¯ã€æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã¯æ¤œç´¢ã‚µãƒ¼ãƒ“スを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’試ã¿ã¾ã™ (åŒã˜ã‚µãƒ–ãƒãƒƒãƒˆå†…ã«å…¬é–‹ã•れãŸã‚µãƒ¼ãƒãƒ¼åã«åŸºã¥ã„ã¦æ¤œç´¢ã—ã¾ã™)。 + ã¾ãŸã¯ + クライアントアプリ内㮠"EnginedServer.4DLink" ãƒ•ã‚¡ã‚¤ãƒ«ã«æœ‰åŠ¹ãªæŽ¥ç¶šæƒ…å ±ãŒä¿å­˜ã•れã¦ã„ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã¯æŒ‡å®šã•れãŸã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã¸æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚ +- ã“れãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯ã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã«ä¿å­˜ã•れã¦ã„る情報 ("lastServer.xml" ファイルã€è©³ç´°ã¯å¾Œè¿°å‚ç…§) を使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚ +- ã“れãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯æŽ¥ç¶šã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’è¡¨ç¤ºã—ã¾ã™ã€‚ + - ユーザー㌠**é¸æŠž...** ボタンをクリックã—ãŸå ´åˆã€æ¨™æº–ã® "サーãƒãƒ¼æŽ¥ç¶š" ダイアログボックスãŒè¡¨ç¤ºã•れã¾ã™ (ãƒ“ãƒ«ãƒ‰ã®æ®µéšŽã§è¨±å¯ã•れã¦ã„ãŸå ´åˆã«é™ã‚Šã¾ã™ã€‚詳細ã¯å¾Œè¿°)。 + - ユーザー㌠**終了** ボタンをクリックã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯çµ‚了ã—ã¾ã™ã€‚ +- æŽ¥ç¶šãŒæˆåŠŸã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯å°†æ¥ã®ä½¿ç”¨ã®ãŸã‚ã«ã€ãã®æŽ¥ç¶šæƒ…å ±ã‚’ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã«ä¿å­˜ã—ã¾ã™ã€‚ + +### 最後ã«ä½¿ç”¨ã—ãŸã‚µãƒ¼ãƒãƒ¼ãƒ‘スをä¿å­˜ã™ã‚‹ + +最後ã«ä½¿ç”¨ã•れ検証ã•れãŸã‚µãƒ¼ãƒãƒ¼ãƒ‘スã¯ã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内㮠"lastServer.xml" ファイルã«è‡ªå‹•çš„ã«ä¿å­˜ã•れã¾ã™ã€‚ ã“ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã¯æ¬¡ã®å ´æ‰€ã«ä¿å­˜ã•れã¦ã„ã¾ã™: + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã€æœ€åˆã«æŒ‡å®šã—ãŸã‚µãƒ¼ãƒãƒ¼ãŒä½•らã‹ã®ç†ç”± (例ãˆã°ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãƒ¢ãƒ¼ãƒ‰ãªã©) ã§ä¸€æ™‚çš„ã«ä½¿ç”¨ã§ããªã„ケースã«å¯¾å¿œã—ã¾ã™ã€‚ ã“ã†ã„ã£ãŸçŠ¶æ…‹ãŒåˆã‚ã¦èµ·ã“ã£ãŸã¨ãã«ã¯ã‚µãƒ¼ãƒãƒ¼é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れ (ãŸã ã—許å¯ã•れã¦ã„ãŸå ´åˆã«é™ã‚Šã¾ã™ã€å¾Œè¿°å‚ç…§)ã€ã»ã‹ã®ã‚µãƒ¼ãƒãƒ¼ã‚’ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰‹å‹•ã§é¸æŠžã™ã‚‹ã¨ã€ãã®æŽ¥ç¶šãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ãã®ãƒ‘スãŒä¿å­˜ã•れã¾ã™ã€‚ ãれ以é™ã«æŽ¥ç¶šãŒã§ããªã‹ã£ãŸå ´åˆã«ã¯ã€"lastServer.xml" ã®ãƒ‘ス情報ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å¯¾å‡¦ã•れã¾ã™ã€‚ + +> - ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®è¨­å®šãªã©ã®å½±éŸ¿ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªãŒæ’ä¹…çš„ã«æ¤œç´¢ã‚µãƒ¼ãƒ“スを使ã£ãŸã‚µãƒ¼ãƒãƒ¼æŽ¥ç¶šãŒã§ããªã„å ´åˆã«ã¯ã€ãƒ“ルド時ã«ã‚らã‹ã˜ã‚ "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`: **True**値 ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) diff --git a/website/translated_docs/ja/Desktop/clientServer.md b/website/translated_docs/ja/Desktop/clientServer.md new file mode 100644 index 00000000000000..ff925de0189689 --- /dev/null +++ b/website/translated_docs/ja/Desktop/clientServer.md @@ -0,0 +1,96 @@ +--- +id: clientServer +title: クライアント/サーãƒãƒ¼ç®¡ç† +--- + + +組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ—ロジェクトã®å½¢ã§ã€4Dデスクトップアプリケーションをクライアント/サーãƒãƒ¼æ§‹æˆã§é‹ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- **組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーション** 㯠[アプリケーションビルダー](building.md#クライアントサーãƒãƒ¼ãƒšãƒ¼ã‚¸) を使ã£ã¦ç”Ÿæˆã—ã¾ã™ã€‚ ã“れらã¯ã€ã‚¢ãƒ—リケーションã®é‹ç”¨ã«ä½¿ã„ã¾ã™ã€‚ + +- **リモートプロジェクト** ã¨ã¯ã€4D Server 上ã§é–‹ã„㟠[.4DProject](Project/architecture.md) ファイルã®ã“ã¨ã§ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã® 4D を使ã£ã¦æŽ¥ç¶šã—ã¾ã™ã€‚ 4D Server ã¯ã€ãƒ—ロジェクト㮠[圧縮形å¼](building.md#コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド) ã§ã‚ã‚‹ .4dz ファイルをリモート㮠4D ã«é€ä¿¡ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¯èª­ã¿å–り専用ã§ã™ã€‚ ã“ã®æ§‹æˆã¯é€šå¸¸ã€ã‚¢ãƒ—リケーションã®ãƒ†ã‚¹ãƒˆã«ä½¿ã„ã¾ã™ã€‚ + +![](assets/en/getStart/localremote.png) + +> ãŸã ã—ã€**4D Server ã¨åŒã˜ãƒžã‚·ãƒ³** ã‹ã‚‰æŽ¥ç¶šã—ã¦ã„ã‚‹å ´åˆã«ã¯ã€ãƒ—ロジェクトファイルã®å¤‰æ›´ãŒå¯èƒ½ã§ã™ã€‚ ã“ã® [特殊機能](#4D-ã¨-4D-Server-ã®åŒã˜ãƒžã‚·ãƒ³ä¸Šã§ã®ä½¿ç”¨) ã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションをé‹ç”¨æ™‚ã¨åŒã˜ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é–‹ç™ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## 組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションを開ã + +ビルドã•れãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯èµ·å‹•や接続処ç†ãŒç°¡æ˜“ã§ã™: + +- サーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 +- クライアントを起動ã™ã‚‹ã«ã‚‚ã€åŒæ§˜ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¸ã®æŽ¥ç¶šãŒç›´æŽ¥ãŠã“ãªã‚れるãŸã‚〠+ +詳細ã«ã¤ã„ã¦ã¯ [アプリケーションビルド](building.md#クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¨ã¯) ページをå‚ç…§ãã ã•ã„。 + + +## リモートプロジェクトを開ã + +4D Server 上ã§å‹•ã„ã¦ã„るプロジェクトã«åˆã‚ã¦æŽ¥ç¶šã™ã‚‹å ´åˆã¯ã€é€šå¸¸ã¯æ¨™æº–ã®æŽ¥ç¶šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’ä½¿ã„ã¾ã™ã€‚ 以é™ã¯ã€**最近使用ã—ãŸãƒ—ロジェクトを開ã** メニューやã€4DLink ショートカットファイルを使ã£ã¦ç›´æŽ¥æŽ¥ç¶šã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +4D Server ã§å®Ÿè¡Œã•れã¦ã„ã‚‹ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã«æŽ¥ç¶šã™ã‚‹ã«ã¯: + +1. Welcome ウィザードã«ã¦ **4D Serverã«æŽ¥ç¶š** ã‚’é¸æŠžã—ã¾ã™ã€‚

        OR

        **ファイル** メニューより **é–‹ã > リモートプロジェクト...**ã‚’é¸æŠžã™ã‚‹ã‹ã€**é–‹ã** ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã‚ˆã‚ŠåŒæ§˜ã«é¸æŠžã—ã¾ã™ã€‚ + +4D Server ã«æŽ¥ç¶šã™ã‚‹ãŸã‚ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ダイアログã«ã¯ **最近使用**ã€**利用å¯**ã€ãŠã‚ˆã³ **カスタム** ã¨ã„ã†ã€3ã¤ã®ã‚¿ãƒ–ãŒã‚りã¾ã™ã€‚ + +リモート㮠4D ã¨åŒã˜ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã« 4D Server ãŒæŽ¥ç¶šã•れã¦ã„ã‚‹å ´åˆã¯ **利用å¯** ã‚¿ãƒ–ã‚’é¸æŠžã—ã¾ã™ã€‚ 4D Server ã«ã¯çµ„ã¿è¾¼ã¿ã® TCP/IP ブロードキャストシステムãŒã‚りã€ãƒ‡ãƒ•ォルトã§ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã«åˆ©ç”¨å¯èƒ½ãª 4D Server データベースã®åå‰ã‚’公開ã—ã¾ã™ã€‚ ã“ã®ãƒªã‚¹ãƒˆã¯ã€åå‰ãŒè¦‹ã¤ã‹ã£ãŸé †ã«è¡¨ç¤ºã•れã€å‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ + +![](assets/en/getStart/serverConnect.png) + +ã“ã®ãƒªã‚¹ãƒˆã‹ã‚‰ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€åå‰ä¸Šã§ãƒ€ãƒ–ルクリックã™ã‚‹ã‹ã€åå‰ã‚’é¸æŠžã—㦠**OK** ボタンをクリックã—ã¾ã™ã€‚ + +> æš—å·åŒ–ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйã§å…¬é–‹ã•れã¦ã„るデータベースåã®å‰ã«ã¯ã‚­ãƒ£ãƒ¬ãƒƒãƒˆ (^) ãŒç½®ã‹ã‚Œã¾ã™ã€‚ + +公開ã•れã¦ã„るプロジェクト㌠**利用å¯** タブã«è¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã«ã¯ã€**カスタム** タブを開ãã¾ã™ã€‚ カスタムページã§ã¯ã€IPアドレスã§ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã®ã‚µãƒ¼ãƒãƒ¼ã‚’指定ã—ã€ãれã«ä»»æ„ã®åå‰ã‚’ã¤ã‘られã¾ã™ã€‚ + +![](assets/en/getStart/serverConnect2.png) + + +- **プロジェクトå**: 4D Server プロジェクトã®ãƒ­ãƒ¼ã‚«ãƒ«åを指定ã§ãã¾ã™ã€‚ ã“ã®åå‰ã¯ **最近使用** ページã§ãƒ—ロジェクトをå‚ç…§ã™ã‚‹éš›ã«ä½¿ç”¨ã•れã¾ã™ã€‚ +- **ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚¢ãƒ‰ãƒ¬ã‚¹**: 4D Server ãŒèµ·å‹•ã•れãŸãƒžã‚·ãƒ³ã® IPアドレスを指定ã—ã¾ã™ã€‚

        2ã¤ã®ã‚µãƒ¼ãƒãƒ¼ãŒåŒã˜ãƒžã‚·ãƒ³ä¸Šã§åŒæ™‚ã«èµ·å‹•ã•れã¦ã„ã‚‹ã¨ãã¯ã€IPアドレスã®å¾Œã«ã‚³ãƒ­ãƒ³ã¨ãƒãƒ¼ãƒˆç•ªå·ã‚’ç¶šã‘ã¾ã™ã€‚例ãˆã°: `192.168.92.104:19820`。

        デフォルトã§ã€4D Server ã®å…¬é–‹ãƒãƒ¼ãƒˆã¯ 19813 ã§ã™ã€‚ ã“ã®ç•ªå·ã¯ã€ãƒ—ロジェクト設定ã§å¤‰æ›´ã§ãã¾ã™ã€‚ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã‚µãƒ¼ãƒãƒ¼ã‚’指定ã—ãŸã‚‰ã€**OK** ボタンをクリックã—ã¦ã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã§ãã¾ã™ã€‚ + +> ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæš—å·åŒ–ã•れã¦å…¬é–‹ã•れã¦ã„ã‚‹å ´åˆã€åå‰ã®å‰ã«ã‚­ãƒ£ãƒ¬ãƒƒãƒˆ (^) ã‚’ç½®ã‹ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã‘ã‚Œã°æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ 詳細ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼æŽ¥ç¶šã®æš—å·åŒ–ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +サーãƒãƒ¼ã¨ã®æŽ¥ç¶šãŒç¢ºç«‹ã•れるã¨ã€ãã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ—ロジェクト㯠**最近使用** タブã®ãƒªã‚¹ãƒˆã«åŠ ãˆã‚‰ã‚Œã¾ã™ã€‚ + +### サーãƒãƒ¼ä¸Šã®ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–° + +インタープリターモードã®å ´åˆã€4D Server 㯠*.4DProject* プロジェクトファイル (éžåœ§ç¸®) ã® [.4dz](building.md#コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド) ファイルを自動的ã«ä½œæˆã—ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ã«é€ä¿¡ã—ã¾ã™ã€‚ + +- プロジェクトãŒç·¨é›†ã•れ 4D Server ã«ãƒªãƒ­ãƒ¼ãƒ‰ã•れãŸå ´åˆãªã©ã€å¿…è¦ã«å¿œã˜ã¦ãƒ—ロジェクト㮠.4dzファイルã¯è‡ªå‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã¯æ¬¡ã®å ´åˆã«ãƒªãƒ­ãƒ¼ãƒ‰ã•れã¾ã™: + - 4D Server アプリケーションウィンドウ㌠OS ã®æœ€å‰é¢ã«æ¥ãŸã‚Šã€åŒã˜ãƒžã‚·ãƒ³ä¸Šã® 4D アプリケーションãŒç·¨é›†ã‚’ä¿å­˜ã—ãŸå ´åˆ (後述å‚ç…§) ã«è‡ªå‹•ã§ãƒªãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ + - `RELOAD PROJECT` コマンドãŒå®Ÿè¡Œã•れãŸã¨ãã«ãƒªãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ソース管ç†ã‚·ã‚¹ãƒ†ãƒ ã‚ˆã‚Šãƒ—ルã—ãŸã¨ããªã©ã«ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’呼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + + +### リモートマシンã®ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–° + +4D Server 上㧠.4dz ãƒ•ã‚¡ã‚¤ãƒ«ã®æ›´æ–°ç‰ˆãŒç”Ÿæˆã•れãŸå ´åˆã€ãã®æ›´æ–°ç‰ˆã‚’利用ã™ã‚‹ã«ã¯ã€æŽ¥ç¶šä¸­ã®ãƒªãƒ¢ãƒ¼ãƒˆ 4D マシンã¯ä¸€åº¦ãƒ­ã‚°ã‚¢ã‚¦ãƒˆã—ã€4D Server ã«å†æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +## 4D 㨠4D Server ã®åŒã˜ãƒžã‚·ãƒ³ä¸Šã§ã®ä½¿ç”¨ + +åŒã˜ãƒžã‚·ãƒ³ä¸Šã§ 4D ㌠4D Server ã«æŽ¥ç¶šã™ã‚‹ã¨ã€ã‚¢ãƒ—リケーションã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã® 4D ã®ã‚ˆã†ã«ãµã‚‹ã¾ã„ã€ãƒ‡ã‚¶ã‚¤ãƒ³ç’°å¢ƒã«ã¦ãƒ—ロジェクトファイルã®ç·¨é›†ãŒå¯èƒ½ã§ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションをé‹ç”¨æ™‚ã¨åŒã˜ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§é–‹ç™ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デザイン環境ã«ã¦ 4D ㌠**ã™ã¹ã¦ã‚’ä¿å­˜** アクションを (**ファイル** メニューを使ã£ã¦æ˜Žç¤ºçš„ã«ã€ã¾ãŸã¯ã€ã‚¢ãƒ—リケーションモードã¸ã®ç§»è¡Œã«ã‚ˆã‚Šæš—示的ã«) ãŠã“ãªã†ã¨ã€4D Server ã¯åŒæœŸçš„ã«ãƒ—ロジェクトファイルをリロードã—ã¾ã™ã€‚ 4D Server ã«ã‚ˆã‚‹ãƒ—ロジェクトファイルã®ãƒªãƒ­ãƒ¼ãƒ‰ãŒå®Œäº†ã™ã‚‹ã®ã‚’å¾…ã£ã¦ã€4D ã¯ç¶šè¡Œã—ã¾ã™ã€‚ + +ãŸã ã—ã€[標準ã®ãƒ—ロジェクトアーキテクãƒãƒ£ãƒ¼](Project/architecture.md) ã¨ã¯æ¬¡ã®ãµã‚‹ã¾ã„ã«ãŠã„ã¦ç•°ãªã‚Šã¾ã™ã®ã§ã€æ³¨æ„ãŒå¿…è¦ã§ã™: + +- 4D ãŒä½¿ç”¨ã™ã‚‹ userPreferences.{username} フォルダーã¯ã€4D Server ãŒä½¿ç”¨ã™ã‚‹ãƒ—ロジェクトフォルダー内ã®ã‚‚ã®ã¨åŒä¸€ã§ã¯ã‚りã¾ã›ã‚“。 ã“ã®å°‚用㮠"userPreferences" フォルダーã¯ãƒ—ロジェクトシステムフォルダー内 (ã¤ã¾ã‚Šã€.4dzプロジェクトを開ãå ´åˆã¨åŒã˜å ´æ‰€) ã«æ ¼ç´ã•れã¾ã™ã€‚ +- 4D ãŒä½¿ç”¨ã™ã‚‹ DerivedData フォルダーã¯ã€4D Server ãŒä½¿ç”¨ã™ã‚‹ãƒ—ロジェクトフォルダー内ã®ã‚‚ã®ã¨åŒä¸€ã§ã¯ã‚りã¾ã›ã‚“。 ã“ã®å°‚用㮠"DerivedDataRemote" フォルダーã¯ãƒ—ロジェクトã®ã‚·ã‚¹ãƒ†ãƒ ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼å†…ã«æ ¼ç´ã•れã¾ã™ã€‚ +- catalog.4DCatalog ファイル㯠4D ã§ã¯ãªã 4D Server ã«ã‚ˆã£ã¦ç·¨é›†ã•れã¾ã™ã€‚ catalog ã®æƒ…å ±ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚ˆã£ã¦åŒæœŸã•れã¾ã™ã€‚ +- directory.json ファイル㯠4D ã§ã¯ãªã 4D Server ã«ã‚ˆã£ã¦ç·¨é›†ã•れã¾ã™ã€‚ directory ã®æƒ…å ±ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚ˆã£ã¦åŒæœŸã•れã¾ã™ã€‚ +- 4D ã¯ã€4D Server 上ã®ã‚‚ã®ã§ã¯ãªãã€ç‹¬è‡ªã®å†…部的ãªã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„プラグインを使用ã—ã¾ã™ã€‚ + +> プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ 4D ã‚ã‚‹ã„㯠4D Server アプリケーションレベルã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã¯ã€æŽ¨å¥¨ã•れã¾ã›ã‚“。 + + + + + diff --git a/website/translated_docs/ja/Events/onActivate.md b/website/translated_docs/ja/Events/onActivate.md index 8acdaeef014b22..7c102c34ad7038 100644 --- a/website/translated_docs/ja/Events/onActivate.md +++ b/website/translated_docs/ja/Events/onActivate.md @@ -3,13 +3,15 @@ id: onActivate title: On Activate --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ---------------------------------------------- | -| 11 | フォーム | The form's window becomes the frontmost window | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------------------------------ | +| 11 | フォーム | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæœ€å‰é¢ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ãªã£ãŸã€ã¾ãŸã¯ã‚µãƒ–フォームãŒãƒ•ォーカスを得㟠| ## 説明 -If the window of a form was sent to the background, this event is called when the window becomes the frontmost window. +フォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒèƒŒé¢ã«é€ã‚‰ã‚Œã¦ã„ãŸå ´åˆã€ãã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæœ€å‰é¢ã«ãªã£ãŸã¨ãã«ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒå‘¼ã°ã‚Œã¾ã™ã€‚ -This event applies to the form as a whole and not to a particular object. Consequently, if the `On Activate` form event property is selected, only the form will have its form method called. \ No newline at end of file +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯å€‹ã€…ã®ã‚ªãƒ–ジェクトã«ã¯é©ç”¨ã•れãšã€ãƒ•ォーム全体ã«é©ç”¨ã•れã¾ã™ã€‚ ゆãˆã« `On Activate` フォームイベントプロパティãŒé¸æŠžã•れã¦ã„れã°ã€ãã®ãƒ•ォームã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã¿ãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ + +サブフォームã®å ´åˆã«ã¯ã€ã‚³ãƒ³ãƒ†ãƒŠãƒ¼ãŒãƒ•ォーカスを得ãŸã¨ã ([フォーカスå¯](FormObjects/properties_Entry.md#フォーカスå¯) プロパティãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆ) ã«ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒã‚µãƒ–ãƒ•ã‚©ãƒ¼ãƒ ã«æ¸¡ã•れã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onAfterEdit.md b/website/translated_docs/ja/Events/onAfterEdit.md index 3b1dca7175ed1e..e2fdbda3637aea 100644 --- a/website/translated_docs/ja/Events/onAfterEdit.md +++ b/website/translated_docs/ja/Events/onAfterEdit.md @@ -3,172 +3,106 @@ id: onAfterEdit title: On After Edit --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -| 45 | [4D View Pro area](FormObjects/viewProArea_overview) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [Hierarchical List](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | The contents of the enterable object that has the focus has just been modified | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | +| 45 | [4D View Pro エリア](FormObjects/viewProArea_overview) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [コンボボックス](FormObjects/comboBox_overview.md) - フォーム - [入力](FormObjects/input_overview.md) - [階層リスト](FormObjects/list_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | フォーカスã®ã‚る入力å¯èƒ½ã‚ªãƒ–ジェクトã®å†…å®¹ãŒæ›´æ–°ã•れ㟠| ## 説明 -### General case +### 一般的ãªã‚±ãƒ¼ã‚¹ -This event can be used filter the data entry in keyboard enterable objects at the lowest level. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰å…¥åŠ›å¯èƒ½ãªã‚ªãƒ–ジェクトã¸ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’æœ€ã‚‚ä½Žãƒ¬ãƒ™ãƒ«ã§ãƒ•ィルターã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ -When it is used, this event is generated after each change made to the contents of an enterable object, regardless of the action that caused the change, *i.e.*: +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€å¤‰æ›´ãŒãŠã“ãªã‚ã‚ŒãŸæ–¹æ³•ã«é–¢ä¿‚ãªãã€å…¥åŠ›å¯èƒ½ã‚ªãƒ–ジェクトã®å†…容ãŒå¤‰æ›´ã•れるãŸã³ã«ç”Ÿæˆã•れã¾ã™ã€‚*ã¤ã¾ã‚Š*: -- Standard editing actions which modify content like paste, cut, delete or cancel; -- Dropping a value (action similar to paste); -- Any keyboard entry made by the user; in this case, the `On After Edit` event is generated after the [`On Before Keystroke`](onBeforeKeystroke.md) and [`On After Keystroke`](onAfterKeystroke.md) events, if they are used. -- Any modification made using a language command that simulates a user action (i.e., `POST KEY`). +- ペーストやカットã€å‰Šé™¤ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ãªã©ã®æ¨™æº–ã®ç·¨é›†ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ +- 値ã®ãƒ‰ãƒ­ãƒƒãƒ— (ペーストã¨åŒæ§˜ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³) +- ユーザーãŒãŠã“ãªã£ãŸã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰ã®å…¥åŠ›ã€‚ã“ã®å ´åˆã€`On After Edit` イベント㯠[`On Before Keystroke`](onBeforeKeystroke.md) 㨠[`On After Keystroke`](onAfterKeystroke.md) イベントã®å¾Œã«ç”Ÿæˆã•れã¾ã™ã€‚ +- ユーザーアクションをシミュレートã™ã‚‹ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã‚‹å¤‰æ›´ (例: `POST KEY`)。 ### 4D View Pro -The object returned by the `FORM Event` command contains: +`FORM Event` ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: -| プロパティ | åž‹ | 説明 | +| プロパティ | タイプ | 説明 | | ----------- | ---- | --------------------------------------------------------------------------------------------------- | | code | å€é•·æ•´æ•° | On After Edit | -| description | テキスト | "On After Edit" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| action | テキスト | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | +| description | text | "On After Edit" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| action | text | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | - -Depending on the `action` property value, the [event object](overview.md#event-object) will contain additional properties. +`action` プロパティã®å€¤ã«å¿œã˜ã¦ã€[イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯è¿½åŠ ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¾ã™ã€‚ #### action = editChange -| プロパティ | åž‹ | 説明 | -| ----------- | ------- | --------------------------------- | -| range | object | Cell range | -| editingText | variant | The value from the current editor | - +| プロパティ | タイプ | 説明 | +| ----------- | ------- | ------------ | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | +| editingText | variant | カレントエディターã§ã®å€¤ | #### action = valueChanged -| プロパティ | åž‹ | 説明 | -| -------- | ------- | --------------------------- | -| range | object | Cell range | -| oldValue | variant | Value of cell before change | -| newValue | variant | Value of cell after change | +| プロパティ | タイプ | 説明 | +| -------- | ------- | -------- | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | +| oldValue | variant | 変更å‰ã®ã‚»ãƒ«ã®å€¤ | +| newValue | variant | 変更後ã®ã‚»ãƒ«ã®å€¤ | #### action = DragDropBlock -| プロパティ | åž‹ | 説明 | -| --------- | ------- | --------------------------------------------------- | -| fromRange | object | Range of source cell range (being dragged) | -| toRange | object | Range of the destination cell range (drop location) | -| copy | boolean | Specifies if the source range is copied or not | -| insert | boolean | Specifies if the source range is inserted or not | +| プロパティ | タイプ | 説明 | +| --------- | ------- | ------------------------- | +| fromRange | object | ソースセルレンジ (ドラッグã•れる範囲) ã®ãƒ¬ãƒ³ã‚¸ | +| toRange | object | 移行先セルレンジ (ドロップã•れる場所) ã®ãƒ¬ãƒ³ã‚¸ | +| copy | boolean | ソースレンジãŒã‚³ãƒ”ーã•れãŸã‹ã©ã†ã‹ã‚’表ã—ã¾ã™ | +| insert | boolean | ã‚½ãƒ¼ã‚¹ãƒ¬ãƒ³ã‚¸ãŒæŒ¿å…¥ã•れãŸã‹ã©ã†ã‹ã‚’表ã—ã¾ã™ | #### action = DragFillBlock -| プロパティ | åž‹ | 説明 | -| --------- | ------ | ------------------- | -| fillRange | object | Range used for fill | - autoFillType|longint|Value used for the fill. - -- 0: Cells are filled with all data (values, formatting, and formulas) - - 1: Cells are filled with automatically sequential data - - 2: Cells are filled with formatting only - - 3: Cells are filled with values but not formatting - - 4: Values are removed from the cells - - 5: Cells are filled automatically| |fillDirection|longint|Direction of the fill. - - 0: The cells to the left are filled - - 1: The cells to the right are filled - - 2: The cells above are filled - - 3: The cells below are filled| - #### action = formulaChanged - - | プロパティ | åž‹ | 説明 | - | ------- | ------ | ------------------- | - | range | object | Cell range | - | formula | テキスト | The formula entered | - - - #### action = clipboardPasted - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - プロパティ - - 型 - - 説明 -
        - range - - object - - Cell range -
        - pasteOption - - å€é•·æ•´æ•° - - Specifies what is pasted from the clipboard: - -
      • - 0: Everything is pasted (values, formatting, and formulas)
      • - 1: Only values are pasted
      • - 2: Only the formatting is pasted
      • - 3: Only formulas are pasted
      • - 4: Values and formatting are pasted (not formulas)
      • - 5: Formulas and formatting are pasted (not values)
      • - pasteData - - object - - The data from the clipboard to be pasted - -
      • - "text" (text): The text from the clipboard
      • - "html" (text): The HTML from the clipboard
      • - 例題 -

        -

        - Here is an example handling an On After Edit event: -

        -
         If(FORM Event.code=On After Edit)
        +| プロパティ     | タイプ    | 説明               |
        +| --------- | ------ | ---------------- |
        +| fillRange | object | 自動入力ã®ãŸã‚ã«ä½¿ç”¨ã•れるレンジ |
        + autoFillType|longint|自動入力ã®ãŸã‚ã«ä½¿ç”¨ã•れる値
      • 0: 全データ (å€¤ã€æ›¸å¼ã€ãƒ•ォーミュラ) ãŒã‚»ãƒ«ã«å…¥åŠ›ã•れãŸ
      • 1: 自動シーケンシャルデータãŒã‚»ãƒ«ã«å…¥åŠ›ã•れãŸ
      • 2: 書å¼ã®ã¿ãŒã‚»ãƒ«ã«å…¥åŠ›ã•れãŸ
      • 3: 値ã®ã¿ãŒã‚»ãƒ«ã«å…¥åŠ›ã•ã‚Œã€æ›¸å¼ã¯å…¥åŠ›ã•れã¦ã„ãªã„
      • 4: セルã‹ã‚‰å€¤ãŒé™¤åŽ»ã•れãŸ
      • 5: セルã¯è‡ªå‹•çš„ã«å…¥åŠ›ã•れãŸ| |fillDirection|longint|è‡ªå‹•å…¥åŠ›ã®æ–¹å‘
      • 0: å·¦å´ã®ã‚»ãƒ«ã«è‡ªå‹•入力ã•れãŸ
      • 1: å³å´ã®ã‚»ãƒ«ã«è‡ªå‹•入力ã•れãŸ
      • 2: 上å´ã®ã‚»ãƒ«ã«è‡ªå‹•入力ã•れãŸ
      • 3: 下å´ã®ã‚»ãƒ«ã«è‡ªå‹•入力ã•れãŸ| + + +#### action = formulaChanged + +| プロパティ | タイプ | 説明 | +| ------- | ------ | ----------- | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | +| formula | text | 入力ã•れãŸãƒ•ォーミュラ | + +#### action = clipboardPasted + +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | +| pasteOption | å€é•·æ•´æ•° | クリップボードã‹ã‚‰ä½•をペーストã•れãŸã‹ã‚’表ã—ã¾ã™:
      • 0: ã™ã¹ã¦ (å€¤ã€æ›¸å¼ã€ãƒ•ォーミュラ) ãŒãƒšãƒ¼ã‚¹ãƒˆã•れãŸ
      • 1: 値ã®ã¿ãŒãƒšãƒ¼ã‚¹ãƒˆã•れãŸ
      • 2: 書å¼ã®ã¿ãŒãƒšãƒ¼ã‚¹ãƒˆã•れãŸ
      • 3: フォーミュラã®ã¿ãŒãƒšãƒ¼ã‚¹ãƒˆã•れãŸ
      • 4: å€¤ã¨æ›¸å¼ãŒãƒšãƒ¼ã‚¹ãƒˆã•れ㟠(フォーミュラã¯ãƒšãƒ¼ã‚¹ãƒˆã•れãªã‹ã£ãŸ)
      • 5: ãƒ•ã‚©ãƒ¼ãƒŸãƒ¥ãƒ©ã¨æ›¸å¼ã®ã¿ãŒãƒšãƒ¼ã‚¹ãƒˆã•れ㟠(値ã¯ãƒšãƒ¼ã‚¹ãƒˆã•れãªã‹ã£ãŸ) | +| pasteData | object | クリップボードã‹ã‚‰ãƒšãƒ¼ã‚¹ãƒˆã•れるデータ
      • "text" (テキスト): クリップボードã‹ã‚‰ã®ãƒ†ã‚­ã‚¹ãƒˆ
      • "html" (テキスト): クリップボードã‹ã‚‰ã® HTML | + + +#### 例題 + +以下㯠`On After Edit` イベントを管ç†ã™ã‚‹ä¾‹ã§ã™: + +```4d + If(FORM Event.code=On After Edit) If(FORM Event.action="valueChanged") ALERT("WARNING: You are currently changing the value\ from "+String(FORM Event.oldValue)+\ " to "+String(FORM Event.newValue)+"!") End if End if -
      • -

        - The above example could generate an event object like this: -

        -
        {
        +```
        +
        +上記ã®ã‚³ãƒ¼ãƒ‰ã«ã‚ˆã‚Šç”Ÿæˆã•れãŸã‚¤ãƒ™ãƒ³ãƒˆã‚ªãƒ–ジェクトã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå½¢å¼ã‚’ã—ã¦ã„ã¾ã™:
        +
        +```
        +{
         
         "code":45;
         "description":"On After Edit";
        @@ -179,4 +113,4 @@ Depending on the `action` property value, the [event object](overview.md#event-o
         "oldValue":"The quick brown fox";
         "newValue":"jumped over the lazy dog";
         }
        -
        \ No newline at end of file +``` \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onAfterKeystroke.md b/website/translated_docs/ja/Events/onAfterKeystroke.md index 4378ae888dc4a5..9c031d180777bf 100644 --- a/website/translated_docs/ja/Events/onAfterKeystroke.md +++ b/website/translated_docs/ja/Events/onAfterKeystroke.md @@ -3,23 +3,39 @@ id: onAfterKeystroke title: On After Keystroke --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| 28 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **including** this character. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| 28 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [コンボボックス](FormObjects/comboBox_overview.md) - フォーム - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | フォーカスã®ã‚ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ–‡å­—ãŒå…¥åŠ›ã•れよã†ã¨ã—ã¦ã„る。 `Get edited text` ã¯ã“ã®æ–‡å­—ã‚’ **å«ã‚€** オブジェクトã®ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ | + +
        履歴 + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------------------------------------------------- | +| v18 R5 | - 入力ä¸å¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚µãƒãƒ¼ãƒˆ

        - イベント㯠IME確定後ã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ | +

        ## 説明 -> The `On After Keystroke` event can generally be replaced by the [`On After Edit`](onAfterEdit.md) event (see below). +> `On After Keystroke` イベントã¯ã€ä¸€èˆ¬çš„ã« [`On After Edit`](onAfterEdit.md) イベントã§ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ (後述å‚ç…§)。 + +[`On Before Keystroke`](onBeforeKeystroke.md) 㨠`On After Keystroke` ã‚¤ãƒ™ãƒ³ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã™ã‚‹ã¨ã€`FORM Event` コマンドを使用ã—ã¦è¿”ã•れる `On Before Keystroke` 㨠`On After Keystroke` イベントを検知ã—ã€ã‚ªãƒ–ジェクトã¸ã®ã‚­ãƒ¼ã‚¹ãƒˆãƒ­ãƒ¼ã‚¯ã‚’処ç†ã§ãã¾ã™ (詳細㯠`Get edited text` コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„)。 + +> ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ `POST KEY` ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’シミュレートã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦ã‚‚生æˆã•れã¾ã™ã€‚ + +`On After Keystroke` ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®å ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“: + +- [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) メソッドã®å ´åˆã€ãŸã ã—ã€ã‚»ãƒ«ã‚’編集ã—ã¦ã„ã‚‹å ´åˆã‚’除ãã¾ã™ ([リストボックス](FormObjects/listbox_overview.md) メソッドã§ã¯ã©ã®ã‚ˆã†ãªå ´åˆã§ã‚‚生æˆã•れã¾ã™)。 +- キーボードを使用ã›ãšã« (ペーストやドラッグ&ドロップã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹) ãŠã“ãªã‚れãŸå¤‰æ›´ã®å ´åˆã€‚ ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã«ã¯ [`On After Edit`](onAfterEdit.md) を使用ã—ã¾ã™ã€‚ -After the [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` event properties are selected for an object, you can detect and handle the keystrokes within the object, using the `FORM event` command that will return `On Before Keystroke` and then `On After Keystroke` (for more information, please refer to the description of the `Get edited text` command). -These events are also activated by language commands that simulate a user action like `POST KEY`. +### キーストロークシーケンス -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +入力ã«ä¸€é€£ã®ã‚­ãƒ¼ã‚¹ãƒˆãƒ­ãƒ¼ã‚¯ãŒå¿…è¦ãªå ´åˆã€[`On Before Keystroke`](onBeforeKeystroke.md) 㨠`On After Keystroke` イベントã¯ã€å…¥åŠ›ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å®Œå…¨ã«ç¢ºå®šã•れãŸã¨ãã«ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ `Keystroke` コマンドã¯ã€ç¢ºå®šæ¸ˆã¿ã®æ–‡å­—ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚±ãƒ¼ã‚¹ã¯ä¸»ã«ä»¥ä¸‹ã®ã‚ˆã†ã«ç™ºç”Ÿã—ã¾ã™: -> The [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. +- ^ ã‚„ ~ ã®ã‚ˆã†ãªç‰¹æ®Šã‚­ãƒ¼ãŒä½¿ç”¨ã•れãŸå ´åˆ: ãã®å¾Œã«æ‹¡å¼µã•ã‚ŒãŸæ–‡å­—ãŒå…¥åŠ›ã•れãŸå ´åˆã«ã®ã¿ç”Ÿæˆã•れã¾ã™ (例: "ê" ã‚„ "ñ")。 +- IME (Input Method Editor) ãŒã€æ–‡å­—ã®çµ„ã¿åˆã‚ã›ã‚’入力ã™ã‚‹ãŸã‚ã®ä¸­é–“çš„ãªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¦ã„ã‚‹å ´åˆ: IME ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒç¢ºå®šã•れãŸã¨ãã«ã®ã¿ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ã¾ã™ã€‚ -### See also -[On Before Keystroke](onBeforeKeystroke.md). \ No newline at end of file +### å‚ç…§ +[On Before Keystroke](onBeforeKeystroke.md)。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onAfterSort.md b/website/translated_docs/ja/Events/onAfterSort.md index 9d9f6791768dbe..19b255d69065d1 100644 --- a/website/translated_docs/ja/Events/onAfterSort.md +++ b/website/translated_docs/ja/Events/onAfterSort.md @@ -3,11 +3,11 @@ id: onAfterSort title: On After Sort --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| 30 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A standard sort has just been carried out in a list box column. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------- | ----------------------- | +| 30 | [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—å†…ã§æ¨™æº–ã®ã‚½ãƒ¼ãƒˆãŒãŠã“ãªã‚れ㟠| ## 説明 -This event is generated just after a standard sort is performed (*i.e.* it is NOT generated if $0 returns -1 in the [`On Header Click`](onHeaderClick.md) event). This mechanism is useful for storing the directions of the last sort performed by the user. In this event, the `Self` command returns a pointer to the variable of the sorted column header. \ No newline at end of file +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆãŒãŠã“ãªã‚れãŸç›´å¾Œã«ç”Ÿæˆã•れã¾ã™ (ãŸã ã— [`On Header Click`](onHeaderClick.md) イベント㧠$0 ã« -1 ãŒè¿”ã•れãŸå ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ãŠã“ãªã‚れãŸç›´è¿‘ã®ä¸¦ã¹æ›¿ãˆã®æ–¹å‘ã‚’ä¿å­˜ã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆå†…ã§ `Self` コマンドã¯ã€ä¸¦ã¹æ›¿ãˆã‚‰ã‚ŒãŸã‚«ãƒ©ãƒ ãƒ˜ãƒƒãƒ€ãƒ¼å¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onAlternativeClick.md b/website/translated_docs/ja/Events/onAlternativeClick.md index 55fe728fc7a440..75cb8816a34d68 100644 --- a/website/translated_docs/ja/Events/onAlternativeClick.md +++ b/website/translated_docs/ja/Events/onAlternativeClick.md @@ -3,65 +3,28 @@ id: onAlternativeClick title: On Alternative Click --- - - - - - - - - - - - - - - -
        - Code - - Can be called by - - Definition -
        - 38 - - Button - List Box - List Box Column - -
      • - Buttons: The "arrow" area of a button is clicked
      • - List boxes: In a column of an object array, an ellipsis button ("alternateButton" attribute) is clicked
      • - 説明 -

        -

        - Buttons -

        -

        - Some button styles can be linked to a pop-up menu and display an triangle. Clicking on this triangle causes a selection pop-up to appear that provides a set of alternative actions in relation to the primary button action. -

        -

        - 4D allows you to manage this type of button using the On Alternative Click event. This event is generated when the user clicks on the triangle (as soon as the mouse button is held down): -

        -
          -
        • - If the pop-up menu is separated,the event is only generated when a click occurs on the portion of the button with the arrow. -
        • -
        • - If the pop-up menu is linked, the event is generated when a click occurs on any part of the button. Note that the On Long Click event cannot be generated with this type of button. -
        • -
        -

        - -

        -

        - List box -

        -

        - This event is generated in columns of object array type list boxes, when the user clicks on a widget ellipsis button ("alternateButton" attribute). -

        -

        - -

        -

        - See the description of the "alternateButton" attribute. -

        \ No newline at end of file +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| 38 | [ボタン](FormObjects/button_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) |
      • ボタン: ボタン㮠"矢å°" ã®ã‚¨ãƒªã‚¢ãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸ
      • リストボックス: オブジェクトé…列ã®ã‚«ãƒ©ãƒ å†…ã«ãŠã„ã¦ã€ã‚¨ãƒªãƒ—シスボタン ("alternateButton" 属性) ãŒã‚¯ãƒªãƒƒã‚¯ã•れ㟠| + + +## 説明 + +### ボタン + +ã„ãã¤ã‹ã®ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã«ã¯ã€[ãƒãƒƒãƒ—アップメニュー](FormObjects/properties_TextAndPicture.md#ãƒãƒƒãƒ—アップメニューã‚り) をリンクã—ã€çŸ¢å°ã‚’表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®çŸ¢å°ã‚’クリックã™ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®ä¸»ãŸã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ä»£ã‚りã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’æä¾›ã™ã‚‹ãƒãƒƒãƒ—アップを表示ã—ã¾ã™ã€‚ + +4D ã§ã¯ `On Alternative Click` イベントを使用ã—ã¦ã“ã®å‹•作を管ç†ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€‚ユーザーãŒçŸ¢å°ã‚’クリックã™ã‚‹ã¨ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒæŠ¼ã•れã¦ã™ãã«ç”Ÿæˆã•れã¾ã™: + +- ãƒãƒƒãƒ—アップメニュー㌠**分離** ã•れã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒœã‚¿ãƒ³ä¸­ã§çŸ¢å°ã®ã‚るエリアãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ +- ãƒãƒƒãƒ—アップメニュー㌠**リンク** ã•れã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒœã‚¿ãƒ³ä¸Šã©ã“をクリックã—ã¦ã‚‚生æˆã•れã¾ã™ã€‚ ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒœã‚¿ãƒ³ã§ã¯ [`On Long Click`](onLongClick.md) イベントãŒç”Ÿæˆã•れãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +![](assets/en/Events/clickevents.png) + +### リストボックス + +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ [オブジェクトé…列型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹](FormObjects/listbox_overview.md#オブジェクトé…列カラムã®è¨­å®š) ã®ã‚«ãƒ©ãƒ ã«ãŠã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã®ã‚¨ãƒªãƒ—シスボタン ("alternateButton" 属性) をクリックã—ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ + +![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + +["alternateButton" 属性ã®èª¬æ˜Ž](FormObjects/listbox_overview.md#alternatebutton) ã‚’å‚ç…§ãã ã•ã„。 diff --git a/website/translated_docs/ja/Events/onBeforeDataEntry.md b/website/translated_docs/ja/Events/onBeforeDataEntry.md index 63e092af7c620f..7fd6872d522bdc 100644 --- a/website/translated_docs/ja/Events/onBeforeDataEntry.md +++ b/website/translated_docs/ja/Events/onBeforeDataEntry.md @@ -3,18 +3,18 @@ id: onBeforeDataEntry title: On Before Data Entry --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -| 41 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box cell is about to change to editing mode | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------- | --------------------------- | +| 41 | [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | リストボックスセルãŒç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«å¤‰æ›´ã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -This event is generated just before a cell in the list box is edited (before the entry cursor is displayed). This event allows the developer, for example, to display a different text depending on whether the user is in the display or edit mode. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã®ã‚»ãƒ«ãŒç·¨é›†ã•れる直å‰ã«ç”Ÿæˆã•れã¾ã™ (入力カーソルãŒè¡¨ç¤ºã•れるå‰)。 ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’使用ã—ã¦ã€ãŸã¨ãˆã°è¡¨ç¤ºä¸­ã¨ç·¨é›†ä¸­ã§ç•°ãªã‚‹ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -When the cursor arrives in the cell, the `On Before Data Entry` event is generated in the list box or column method. +カーソルãŒã‚»ãƒ«ã«å…¥ã‚‹ã¨ã€ãã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¾ãŸã¯åˆ—ã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ `On Before Data Entry` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ - ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€$0 ã« -1 を設定ã™ã‚‹ã¨ã€ãã®ã‚»ãƒ«ã¯å…¥åŠ›ä¸å¯ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ **Tab** ã‚„ **Shift+Tab** ãŒæŠ¼ã•れãŸå¾Œã«ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れãŸå ´åˆã«ã¯ã€ãƒ•ォーカスã¯ãれãžã‚Œæ¬¡ã‚ã‚‹ã„ã¯å‰ã®ã‚»ãƒ«ã«ç§»å‹•ã—ã¾ã™ã€‚ - $0 ㌠-1 ã§ãªã‘れ㰠(デフォルト㯠0)ã€åˆ—ã¯å…¥åŠ›å¯ã§ã‚り編集モードã«ç§»è¡Œã—ã¾ã™ã€‚ -See also [Managing entry](FormObjects/listbox_overview.md#managing-entry) section. \ No newline at end of file +[入力ã®ç®¡ç†](FormObjects/listbox_overview.md#入力ã®ç®¡ç†) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onBeforeKeystroke.md b/website/translated_docs/ja/Events/onBeforeKeystroke.md index 197ea5d7621c70..37935d9c6b7b5b 100644 --- a/website/translated_docs/ja/Events/onBeforeKeystroke.md +++ b/website/translated_docs/ja/Events/onBeforeKeystroke.md @@ -3,21 +3,43 @@ id: onBeforeKeystroke title: On Before Keystroke --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **without** this character. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| 17 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [コンボボックス](FormObjects/comboBox_overview.md) - フォーム - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | フォーカスã®ã‚ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ–‡å­—ãŒå…¥åŠ›ã•れよã†ã¨ã—ã¦ã„る。 `Get edited text` ã¯ã“ã®æ–‡å­—ã‚’ **å«ã¾ãªã„** オブジェクトã®ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ | + +
        履歴 + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | ------------------------------------------------------------------- | +| v18 R5 | - 入力ä¸å¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚µãƒãƒ¼ãƒˆ

        - イベント㯠IME確定後ã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ | +

        ## 説明 -After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) properties are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). +`On Before Keystroke` 㨠[`On After Keystroke`](onAfterKeystroke.md) ã‚¤ãƒ™ãƒ³ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã™ã‚‹ã¨ã€`FORM Event` コマンドを使用ã—ã¦è¿”ã•れる `On Before Keystroke` 㨠[`On After Keystroke`](onAfterKeystroke.md) イベントを検知ã—ã€ã‚ªãƒ–ジェクトã¸ã®ã‚­ãƒ¼ã‚¹ãƒˆãƒ­ãƒ¼ã‚¯ã‚’処ç†ã§ãã¾ã™ (詳細㯠`Get edited text` コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„)。 `On Before Keystroke` イベント内ã§ã¯ã€`FILTER KEYSTROKE` コマンドを使ã£ã¦ã€å…¥åŠ›ã•ã‚ŒãŸæ–‡å­—をフィルターã§ãã¾ã™ã€‚ + +> ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ `POST KEY` ã®ã‚ˆã†ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’シミュレートã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦ã‚‚生æˆã•れã¾ã™ã€‚ + +`On Before Keystroke` ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®å ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“: + +- [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) メソッドã®å ´åˆã€ãŸã ã—ã€ã‚»ãƒ«ã‚’編集ã—ã¦ã„ã‚‹å ´åˆã‚’除ãã¾ã™ ([リストボックス](FormObjects/listbox_overview.md) メソッドã§ã¯ã©ã®ã‚ˆã†ãªå ´åˆã§ã‚‚生æˆã•れã¾ã™)。 +- キーボードを使用ã›ãšã« (ペーストやドラッグ&ドロップã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹) ãŠã“ãªã‚れãŸå¤‰æ›´ã®å ´åˆã€‚ ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã«ã¯ [`On After Edit`](onAfterEdit.md) を使用ã—ã¾ã™ã€‚ + + +### 入力ä¸å¯ã‚ªãƒ–ジェクト + +`On Before Keystroke` イベントã¯ã€å…¥åŠ›ä¸å¯èƒ½ãªã‚ªãƒ–ジェクトã§ã‚‚発生ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚»ãƒ«ãŒå…¥åŠ›ä¸å¯èƒ½ã§ã‚ã£ãŸã‚Šã€è¡ŒãŒé¸æŠžä¸å¯èƒ½ã§ã‚ã£ãŸã‚Šã—ã¦ã‚‚ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ç™ºç”Ÿã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå€¤ã®æœ€åˆã®æ–‡å­—を入力ã™ã‚‹ã“ã¨ã§ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ç‰¹å®šã®è¡Œã«å‹•çš„ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã§ãるよã†ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを構築ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ リストボックスã®ã‚»ãƒ«ãŒå…¥åŠ›å¯èƒ½ãªå ´åˆã¯ã€`Is editing text` コマンドを使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå®Ÿéš›ã«ã‚»ãƒ«ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’入力ã—ã¦ã„ã‚‹ã®ã‹ã€ã‚¿ã‚¤ãƒ—アヘッド機能を使用ã—ã¦ã„ã‚‹ã®ã‹ã‚’確èªã—ã€é©åˆ‡ãªã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +### キーストロークシーケンス -These events are also activated by language commands that simulate a user action like `POST KEY`. +入力ã«ä¸€é€£ã®ã‚­ãƒ¼ã‚¹ãƒˆãƒ­ãƒ¼ã‚¯ãŒå¿…è¦ãªå ´åˆã€`On Before Keystroke` 㨠[`On After Keystroke`](onAfterKeystroke.md) イベントã¯ã€å…¥åŠ›ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å®Œå…¨ã«ç¢ºå®šã•れãŸã¨ãã«ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ `Keystroke` コマンドã¯ã€ç¢ºå®šæ¸ˆã¿ã®æ–‡å­—ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚±ãƒ¼ã‚¹ã¯ä¸»ã«ä»¥ä¸‹ã®ã‚ˆã†ã«ç™ºç”Ÿã—ã¾ã™: -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +- ^ ã‚„ ~ ã®ã‚ˆã†ãªç‰¹æ®Šã‚­ãƒ¼ãŒä½¿ç”¨ã•れãŸå ´åˆ: ãã®å¾Œã«æ‹¡å¼µã•ã‚ŒãŸæ–‡å­—ãŒå…¥åŠ›ã•れãŸå ´åˆã«ã®ã¿ç”Ÿæˆã•れã¾ã™ (例: "ê" ã‚„ "ñ")。 +- IME (Input Method Editor) ãŒã€æ–‡å­—ã®çµ„ã¿åˆã‚ã›ã‚’入力ã™ã‚‹ãŸã‚ã®ä¸­é–“çš„ãªãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã¦ã„ã‚‹å ´åˆ: IME ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒç¢ºå®šã•れãŸã¨ãã«ã®ã¿ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ã¾ã™ã€‚ -> The `On Before Keystroke` and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. -### See also +### å‚ç…§ -[On After Keystroke](onAfterKeystroke.md). \ No newline at end of file +[On After Keystroke](onAfterKeystroke.md)。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onBeginDragOver.md b/website/translated_docs/ja/Events/onBeginDragOver.md index 3546f1d707a293..56b7e35be47602 100644 --- a/website/translated_docs/ja/Events/onBeginDragOver.md +++ b/website/translated_docs/ja/Events/onBeginDragOver.md @@ -3,24 +3,24 @@ id: onBeginDragOver title: On Begin Drag Over --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- | -| 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | An object is being dragged | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | +| 17 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md#overview) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | オブジェクトãŒãƒ‰ãƒ©ãƒƒã‚°ã•れã¦ã„ã‚‹ | ## 説明 -The `On Begin Drag Over` form event can be selected for any form objects that can be dragged. It is generated in every case where the object has the [Draggable](FormObjects/properties_Action.md#draggable) property. It can be called from the method of the source object or the form method of the source object. +`On Begin Drag Over` フォームイベントã¯ã€ãƒ‰ãƒ©ãƒƒã‚°å¯èƒ½ãªã™ã¹ã¦ã®ãƒ•ォームオブジェクトã§é¸æŠžã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚ªãƒ–ジェクト㌠[ドラッグ有効](FormObjects/properties_Action.md#ドラッグ有効) プロパティをæŒã£ã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚±ãƒ¼ã‚¹ã§ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚½ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¾ãŸã¯ã‚½ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ•ォームメソッドã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -> Unlike the [`On Drag Over`](onDragOver.md) form event, `On Begin Drag Over` is called within the context of the **source object** of the drag action. +> [`On Drag Over`](onDragOver.md) フォームイベントã¨ã¯ç•°ãªã‚Šã€`On Begin Drag Over` イベントã¯ãƒ‰ãƒ©ãƒƒã‚°ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã® **ソースオブジェクト** ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§å‘¼ã³å‡ºã•れã¾ã™ã€‚ -The `On Begin Drag Over` event is useful for preparing of the drag action. It can be used to: +`On Begin Drag Over` イベントã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®æº–å‚™ã«å½¹ç«‹ã¡ã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ä½¿ç”¨ã§ãã¾ã™: -- Add data and signatures to the pasteboard (via the `APPEND DATA TO PASTEBOARD` command). -- Use a custom icon during the drag action (via the `SET DRAG ICON` command). -- Accept or refuse dragging via $0 in the method of the dragged object. - - To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute `$0:=0`. - - To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute `$0:=-1`. - - If no result is returned, 4D considers that drag actions are accepted. +- `APPEND DATA TO PASTEBOARD` コマンドを使ã£ã¦ã€ãƒšãƒ¼ã‚¹ãƒˆãƒœãƒ¼ãƒ‰ã«ãƒ‡ãƒ¼ã‚¿ã‚„ç½²åを追加ã™ã‚‹ã€‚ +- `SET DRAG ICON` コマンドを使ã£ã¦ã€ãƒ‰ãƒ©ãƒƒã‚°ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ä¸­ã«ã‚«ã‚¹ã‚¿ãƒ ã‚¢ã‚¤ã‚³ãƒ³ã‚’表示ã™ã‚‹ã€‚ +- ドラッグã•れãŸã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã® $0 を使用ã—ã¦ã€ãƒ‰ãƒ©ãƒƒã‚°ã‚’許å¯/æ‹’å¦ã™ã‚‹ã€‚ + - ドラッグアクションをå—ã‘入れるã«ã¯ã€ã‚½ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ (`$0:=0` を実行ã—ã¦) 0 (ゼロ) ã‚’è¿”ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + - ドラッグアクションを拒å¦ã™ã‚‹ã«ã¯ã€ã‚½ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ (`$0:=-1`を実行ã—ã¦) -1 (マイナス1) ã‚’è¿”ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + - çµæžœãŒè¿”ã•れãªã„å ´åˆã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå—ã‘入れられãŸã¨ 4D ã¯åˆ¤æ–­ã—ã¾ã™ã€‚ -4D data are put in the pasteboard before calling the event. For example, in the case of dragging without the **Automatic Drag** action, the dragged text is already in the pasteboard when the event is called. \ No newline at end of file +4D ã®ãƒ‡ãƒ¼ã‚¿ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆãŒå‘¼ã³å‡ºã•れるå‰ã«ã€ãƒšãƒ¼ã‚¹ãƒˆãƒœãƒ¼ãƒ‰ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ãŸã¨ãˆã°ã€**自動ドラッグ** アクションãªã—ã§ãƒ‰ãƒ©ãƒƒã‚°ã—ãŸå ´åˆã€ãƒ‰ãƒ©ãƒƒã‚°ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆãŒå‘¼ã³å‡ºã•れる時ã«ã¯ãƒšãƒ¼ã‚¹ãƒˆãƒœãƒ¼ãƒ‰ã«ã‚りã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onBeginUrlLoading.md b/website/translated_docs/ja/Events/onBeginUrlLoading.md index 2d323fdf10a5da..a5a8adc0ebcc25 100644 --- a/website/translated_docs/ja/Events/onBeginUrlLoading.md +++ b/website/translated_docs/ja/Events/onBeginUrlLoading.md @@ -3,13 +3,13 @@ id: onBeginUrlLoading title: On Begin URL Loading --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ----------------------------------- | -| 47 | [Web Area](FormObjects/webArea_overview.md) | A new URL is loaded in the Web area | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ------------------------ | +| 47 | [Webエリア](FormObjects/webArea_overview.md) | æ–°ã—ã„ URL ㌠Web エリアã«ãƒ­ãƒ¼ãƒ‰ã•れ㟠| ## 説明 -This event is generated at the start of loading a new URL in the Web area. The `URL` variable associated with the Web area can be used to find out the URL being loaded. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€Webã‚¨ãƒªã‚¢ã«æ–°ã—ã„ URL ã®ãƒ­ãƒ¼ãƒ‰ã‚’é–‹å§‹ã—ãŸæ™‚ã«ç”Ÿæˆã•れã¾ã™ã€‚ Webエリアã«é–¢é€£ä»˜ã‘られ㟠`URL` 変数を使用ã—ã¦ãƒ­ãƒ¼ãƒ‰ä¸­ã® URL を知るã“ã¨ãŒã§ãã¾ã™ã€‚ -> The URL being loaded is different from the [current URL](FormObjects/properties_WebArea.md#url-variable-and-wa-open-url-command) (refer to the description of the `WA Get current URL` command). \ No newline at end of file +> ロード中㮠URL 㯠[カレントURL](FormObjects/properties_WebArea.md#URL変数ã¨-WA-OPEN-URL-コマンド) ã¨ã¯ç•°ãªã‚Šã¾ã™ (`WA Get current URL` コマンドã®èª¬æ˜Žå‚ç…§)。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onBoundVariableChange.md b/website/translated_docs/ja/Events/onBoundVariableChange.md index 24b26f2d4e13ce..702ea9dbc27db7 100644 --- a/website/translated_docs/ja/Events/onBoundVariableChange.md +++ b/website/translated_docs/ja/Events/onBoundVariableChange.md @@ -3,13 +3,13 @@ id: onBoundVariableChange title: On Bound Variable Change --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------- | -| 54 | フォーム | The variable bound to a subform is modified | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ---------------------- | +| 54 | フォーム | サブフォームã«ãƒã‚¤ãƒ³ãƒ‰ã•れãŸå¤‰æ•°ãŒæ›´æ–°ã•れ㟠| ## 説明 -This event is generated in the context of the form method of a [subform](FormObjects/subform_overview.md) as soon as a value is assigned to the variable bound with the subform in the parent form (even if the same value is reassigned) and if the subform belongs to the current form page or to page 0. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€è¦ªãƒ•ォーム中ã®ã‚µãƒ–フォームã«ãƒã‚¤ãƒ³ãƒ‰ã•れãŸå¤‰æ•°ã®å€¤ãŒæ›´æ–°ã•れ (åŒã˜å€¤ãŒä»£å…¥ã•れãŸå ´åˆã§ã‚‚) ã€ã‹ã¤ã‚µãƒ–フォームãŒã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォームページã¾ãŸã¯ãƒšãƒ¼ã‚¸0 ã«å±žã—ã¦ã„ã‚‹å ´åˆã«ã€[サブフォーム](FormObjects/subform_overview.md) ã®ãƒ•ォームメソッドã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ç”Ÿæˆã•れã¾ã™ã€‚ -Form more information, refer to the [Managing the bound variable](FormObjects/subform_overview.md#managing-the-bound-variable) section. \ No newline at end of file +詳細ã«ã¤ã„ã¦ã€[ãƒã‚¤ãƒ³ãƒ‰ã•れãŸå¤‰æ•°ã®ç®¡ç†](FormObjects/subform_overview.md#ãƒã‚¤ãƒ³ãƒ‰ã•れãŸå¤‰æ•°ã®ç®¡ç†) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onClicked.md b/website/translated_docs/ja/Events/onClicked.md index 6d484b078a07e0..0eed092f91073e 100644 --- a/website/translated_docs/ja/Events/onClicked.md +++ b/website/translated_docs/ja/Events/onClicked.md @@ -3,45 +3,44 @@ id: onClicked title: On Clicked --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | -| 4 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A click occurred on an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | +| 4 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | オブジェクト上ã§ã‚¯ãƒªãƒƒã‚¯ã•れ㟠| ## 説明 -The `On Clicked` event is generated when the user clicks on an object. +` On Clicked` イベントã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ªãƒ–ジェクト上ã§ã‚¯ãƒªãƒƒã‚¯ã—ãŸã¨ãã«ç™ºç”Ÿã—ã¾ã™ã€‚ -> Some form objects can be activated with the keyboard. For example, once a check box gets the focus, it can be entered using the space bar. In such a case, the `On Clicked` event is still generated. +> ã„ãã¤ã‹ã®ãƒ•ォームオブジェクトã¯ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰ã‚‚æ“作å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒãƒ•ォーカスを得るã¨ã€ã‚¹ãƒšãƒ¼ã‚¹ãƒãƒ¼ã§ã‚ªãƒ³/オフを切り替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã§ã‚‚ `On Clicked` イベントã¯ç”Ÿæˆã•れã¾ã™ã€‚ -The `On Clicked` event usually occurs once the mouse button is released. However, there are several exceptions: +`On Clicked` イベントã¯é€šå¸¸ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒé›¢ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã—ã‹ã—ã€ã„ãã¤ã‹ä¾‹å¤–ãŒã‚りã¾ã™: -- [Invisible buttons](FormObjects/properties_Display.md#not-rendered): The `On Clicked` event occurs as soon as the click is made and does not wait for the mouse button to be released. -- [Rulers](FormObjects/ruler.md): If the [Execute object method](FormObjects/properties_Action.md#execute-object-method) option is set to **true**, the `On Clicked` event occurs as soon as the click is made. -- [Combo boxes](FormObjects/comboBox_overview.md): The `On Clicked` event occurs only if the user selects another value in the associated menu. A [combo box](FormObjects/comboBox_overview.md) must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the `On Before Keystroke`, `On After Keystroke` and `On Data Change` events. -- [Drop-down lists](FormObjects/dropdownList_Overview.md): The `On Clicked` event occurs only if the user selects another value in the menu. The `On Data Change` event allows you to detect the activation of the object when a value different from the current value is selected -- The `On Clicked` event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a list box [column](FormObjects/listbox_overview.md#list-box-columns) or [column header](FormObjects/listbox_overview.md#list-box-headers). +- [éžè¡¨ç¤ºãƒœã‚¿ãƒ³](FormObjects/properties_Display.md#レンダリングã—ãªã„): マウスãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ã€ãƒœã‚¿ãƒ³ãŒé›¢ã•れるã®ã‚’å¾…ãŸãšã« `On Clicked` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ +- [ルーラー](FormObjects/ruler.md): [オブジェクトメソッド実行](FormObjects/properties_Action.md#オブジェクトメソッド実行) オプション㌠**true** ã«è¨­å®šã•れã¦ã„ã‚‹ã¨ã€`On Clicked` イベントã¯ã‚¯ãƒªãƒƒã‚¯ãŒãŠã“ãªã‚れるã¨ã™ãã«ç”Ÿæˆã•れã¾ã™ã€‚ +- [コンボボックス](FormObjects/comboBox_overview.md): `On Clicked`イベントã¯ã€å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåˆ¥ã®å€¤ã‚’é¸æŠžã—ãŸå ´åˆã«ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚ [コンボボックス](FormObjects/comboBox_overview.md) ã¯ã€å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã«ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ãŒæä¾›ã•れãŸã€å…¥åŠ›å¯èƒ½ãªãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ ã¤ã¾ã‚Šã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹å†…ã«ãŠã‘るデータ入力処ç†ã¯ã€`On Before Keystroke` ã‚„ `On After Keystroke`ã€`On Data Change` イベントを使用ã—ã¦ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ +- [ドロップダウンリスト](FormObjects/dropdownList_Overview.md): `On Clicked` イベントã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§åˆ¥ã®å€¤ã‚’é¸æŠžã—ãŸå ´åˆã«ã®ã¿ç™ºç”Ÿã—ã¾ã™ã€‚ `On Data Change` イベントã¯ã€ç¾åœ¨ã®å€¤ã¨ã¯ç•°ãªã‚‹å€¤ãŒé¸æŠžã•れãŸã¨ãã«ã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ“作ã•れãŸã“ã¨ã‚’検出ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- リストボックスã®å…¥åŠ›ã‚»ãƒ«ãŒ [編集中](FormObjects/listbox_overview.md#入力ã®ç®¡ç†) ã®ã¨ãã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒæŠ¼ã•れる㨠`On Clicked` イベントãŒç™ºç”Ÿã™ã‚‹ã®ã§ã€`Contextual click` コマンドãªã©ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -In the context of an `On Clicked` event, you can test the number of clicks made by the user by means of the `Clickcount` command. +`On Clicked` イベントã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ `Clickcount` コマンドを使ã†ã“ã¨ã«ã‚ˆã£ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãŠã“ãªã£ãŸã‚¯ãƒªãƒƒã‚¯æ•°ã‚’テストã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -### On Clicked and On Double Clicked +### On Clicked 㨠On Double Clicked -After the `On Clicked` or [`On Double Clicked`](onDoubleClicked.md) object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns `On Clicked` or [`On Double Clicked`](onDoubleClicked.md), depending on the case. +`On Clicked` ã‚„ [`On Double Clicked`](onDoubleClicked.md) ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚¤ãƒ™ãƒ³ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã—ãŸã®ã¡ã€`FORM Event` コマンドを使用ã—ã¦ã‚ªãƒ–ジェクト上ã§ã®ã‚¯ãƒªãƒƒã‚¯ã‚’検知ã—処ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`FORM Event` コマンドã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«å¿œã˜ã€`On Clicked` ã¾ãŸã¯ [`On Double Clicked`](onDoubleClicked.md)ã‚’è¿”ã—ã¾ã™ã€‚ -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +両イベントãŒã‚ªãƒ–ジェクトã«å¯¾ã—é¸æŠžã•れã¦ã„ã‚‹å ´åˆã€ãƒ€ãƒ–ルクリックãŒãŠã“ãªã‚れるã¨ã¾ãš `On Clicked` ãŒã€ãã—㦠`On Double Clicked` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ ### 4D View Pro -This event is generated when the user clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| プロパティ | åž‹ | 説明 | -| ----------- | ------ | ------------------------------ | -| code | å€é•·æ•´æ•° | On Clicked | -| description | テキスト | "On Clicked" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| range | object | Cell range | +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro ドキュメント上ã§ã‚¯ãƒªãƒƒã‚¯ãŒç™ºç”Ÿã—ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ---------------- | +| code | å€é•·æ•´æ•° | On Clicked | +| description | text | "On Clicked" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | #### 例題 diff --git a/website/translated_docs/ja/Events/onCloseBox.md b/website/translated_docs/ja/Events/onCloseBox.md index 96c85f9e3b646a..e9af46c93f78bf 100644 --- a/website/translated_docs/ja/Events/onCloseBox.md +++ b/website/translated_docs/ja/Events/onCloseBox.md @@ -3,27 +3,27 @@ id: onCloseBox title: On Close Box --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------- | -| 22 | フォーム | The window’s close box has been clicked | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ---------------------- | +| 22 | フォーム | ウィンドウã®ã‚¯ãƒ­ãƒ¼ã‚ºãƒœãƒƒã‚¯ã‚¹ãŒã‚¯ãƒªãƒƒã‚¯ã•れ㟠| ## 説明 -The `On Close Box` event is generated when the user clicks on the clos box of the window. +`On Close Box` イベントã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚¯ãƒ­ãƒ¼ã‚ºãƒœãƒƒã‚¯ã‚¹ã‚’クリックã™ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ ### 例題 -This example shows how to respond to a close window event with a form used for record data entry: +ã“ã®ä¾‹é¡Œã§ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã«ä½¿ã‚れるフォームã§ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‰ã˜ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹æ–¹æ³•を示ã—ã¾ã™: ```4d - //Method for an input form + // 入力フォームã®ãƒ¡ã‚½ãƒƒãƒ‰ $vpFormTable:=Current form table Case of //... :(Form event code=On Close Box) If(Modified record($vpFormTable->)) - CONFIRM("This record has been modified. Save Changes?") + CONFIRM("レコードãŒå¤‰æ›´ã•れã¾ã—ãŸã€‚ ã¸ã‚“ã“ã†ã‚’ä¿å­˜ã—ã¾ã™ã‹ï¼Ÿ") If(OK=1) ACCEPT Else diff --git a/website/translated_docs/ja/Events/onCloseDetail.md b/website/translated_docs/ja/Events/onCloseDetail.md index 43e45abce127ae..e7a95d02761edf 100644 --- a/website/translated_docs/ja/Events/onCloseDetail.md +++ b/website/translated_docs/ja/Events/onCloseDetail.md @@ -3,14 +3,15 @@ id: onCloseDetail title: On Close Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | -------------------------------------------------------------- | -| 26 | Form - [List Box](FormObjects/listbox_overview.md) | You left the detail form and are going back to the output form | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------- | -------------------------- | +| 26 | フォーム - [リストボックス](FormObjects/listbox_overview.md) | 入力フォームã‹ã‚‰é›¢ã‚Œã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã«æˆ»ã‚ã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Close Detail` event can be used in the following contexts: +`On Close Detail` ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§åˆ©ç”¨ã§ãã¾ã™: + +- **出力フォーム**: ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€è©³ç´°ãƒ•ォームãŒé–‰ã˜ã‚‰ã‚Œã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒ ã«æˆ»ã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ +- [**セレクション型**](FormObjects/listbox_overview.md#セレクションリストボックス) ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹: ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られ㟠[詳細フォーム](FormObjects/properties_ListBox.md#詳細フォームå) ã«è¡¨ç¤ºã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ (レコードãŒå¤‰æ›´ã•れãŸã‹ã©ã†ã‹ã¯é–¢ä¿‚ã—ã¾ã›ã‚“)。 -- **Output forms**: the detail form is closed and the user goes back to the list form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record displayed in the [detail form](FormObjects/properties_ListBox.md#detail-form-name) associated with a selection type list box is about to be closed (regardless of whether or not the record was modified). \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onCollapse.md b/website/translated_docs/ja/Events/onCollapse.md index 781e1fcd56c10c..e4f9c448daa291 100644 --- a/website/translated_docs/ja/Events/onCollapse.md +++ b/website/translated_docs/ja/Events/onCollapse.md @@ -3,16 +3,16 @@ id: onCollapse title: On Collapse --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been collapsed using a click or a keystroke | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------- | ----------------------------------------- | +| 44 | [階層リスト](FormObjects/list_overview.md#overview) - [リストボックス](FormObjects/listbox_overview.md) | クリックやキーストロークã§éšŽå±¤ãƒªã‚¹ãƒˆã¾ãŸã¯éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¦ç´ ãŒæŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸ | ## 説明 -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is collapsed with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is collapsed. +- [階層リスト](FormObjects/list_overview.md): ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒžã‚¦ã‚¹ã‚¯ãƒªãƒƒã‚¯ã‚„キーストロークã§éšŽå±¤ãƒªã‚¹ãƒˆã®è¦ç´ ãŒæŠ˜ã‚ŠãŸãŸã¾ã‚Œã‚‹ãŸã³ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ +- [階層リストボックス](FormObjects/listbox_overview.md#階層リストボックス): ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡ŒãŒæŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -### See also +### å‚ç…§ [On Expand](onExpand.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onColumnMoved.md b/website/translated_docs/ja/Events/onColumnMoved.md index f28a4757b2852f..f19de475450f4c 100644 --- a/website/translated_docs/ja/Events/onColumnMoved.md +++ b/website/translated_docs/ja/Events/onColumnMoved.md @@ -3,13 +3,13 @@ id: onColumnMoved title: On Column Moved --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | -| 32 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box column is moved by the user via drag and drop | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------- | ------------------------------ | +| 32 | [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | リストボックスã®åˆ—ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ç§»å‹•ã•れ㟠| ## 説明 -This event is generated when a column of the list box is moved by the user using drag and drop ([if allowed](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). It is not generated if the column is dragged and then dropped in its initial location. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®åˆ—ãŒç§»å‹•ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ ([許å¯ã•れã¦ã„ã‚‹å ´åˆ](FormObjects/propertiesListBox.html#スクロールã—ãªã„列ã¨ãƒ‰ãƒ©ãƒƒã‚°ã—ãªã„列))。 ãŸã ã—ã€å…ƒã®å ´æ‰€ã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸå ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -The `LISTBOX MOVED COLUMN NUMBER` command returns the new position of the column. \ No newline at end of file +`LISTBOX MOVED COLUMN NUMBER` コマンドã¯åˆ—ã®æ–°ã—ã„ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onColumnResize.md b/website/translated_docs/ja/Events/onColumnResize.md index 4d96379833fd66..a21a8b199e4c40 100644 --- a/website/translated_docs/ja/Events/onColumnResize.md +++ b/website/translated_docs/ja/Events/onColumnResize.md @@ -3,32 +3,31 @@ id: onColumnResize title: On Column Resize --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| 33 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | The width of a column is modified directly by the user or consequently to a form window resize | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | +| 33 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | ユーザーã®ãƒžã‚¦ã‚¹æ“作ã«ã‚ˆã£ã¦ã€ã¾ãŸã¯ãƒ•ォームウィンドウã®ãƒªã‚µã‚¤ã‚ºã«ã‚ˆã£ã¦ã€ã‚«ãƒ©ãƒ ã®å¹…ãŒå¤‰æ›´ã•れ㟠| ## 説明 ### リストボックス -This event is generated when the width of a column in the list box is modified by a user. The event is triggered "live", *i.e.*, sent continuously during the event, for as long as the list box or column concerned is being resized. This resizing is performed manually by a user, or may occur as a result of the list box and its column(s) being resized along with the form window itself (whether the form is resized manually or using the `RESIZE FORM WINDOW` command). +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®åˆ—å¹…ãŒå¤‰æ›´ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ "ライブ" ã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€å¯¾è±¡ã¨ãªã‚‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚ã‚‹ã„ã¯ã‚«ãƒ©ãƒ ãŒãƒªã‚µã‚¤ã‚ºã•れã¦ã„ã‚‹é–“ã¯ãšã£ã¨ç¶™ç¶šã—ã¦é€ä¿¡ã•れã¤ã¥ã‘ã¾ã™ã€‚ リサイズã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦æ‰‹å‹•ã§ãŠã“ãªã‚れるã‹ã€ã‚ã‚‹ã„ã¯ãƒ•ォームウィンドウ自身ã®ãƒªã‚µã‚¤ã‚ºã®çµæžœãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¨ãã®ã‚«ãƒ©ãƒ ãŒãƒªã‚µã‚¤ã‚ºã•れる場åˆã‚‚å«ã¿ã¾ã™ (手動ã«ã‚ˆã‚‹ãƒ•ォームã®ãƒªã‚µã‚¤ã‚ºãŠã‚ˆã³ `RESIZE FORM WINDOW` コマンドを使用ã—ãŸãƒªã‚µã‚¤ã‚º)。 -> The `On Column Resize` event is not triggered when a [fake column](FormObjects/propertiesResizingOptions.html#about-the-fake-blank-column) is resized. +> [余白カラム](FormObjects/propertiesResizingOptions.html#余白カラムã«ã¤ã„ã¦) ãŒãƒªã‚µã‚¤ã‚ºã•れãŸå ´åˆã«ã¯ã€`On Column Resize` イベントã¯ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã›ã‚“ ### 4D View Pro -This event is generated when the width of a column is modified by a user. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| プロパティ | åž‹ | 説明 | -| ----------- | ------- | ------------------------------------------------------------------- | -| code | å€é•·æ•´æ•° | On Column Resize | -| description | テキスト | "On Column Resize" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| range | object | Cell range of the columns whose widths have changed | -| header | boolean | True if the row header column (first column) is resized, else false | +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚«ãƒ©ãƒ ã®å¹…ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: +| プロパティ | タイプ | 説明 | +| ----------- | ------- | --------------------------------------------------- | +| code | å€é•·æ•´æ•° | On Column Resize | +| description | text | "On Column Resize" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | å¹…ãŒå¤‰æ›´ã•れãŸã‚«ãƒ©ãƒ ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ | +| header | boolean | 行ヘッダーカラム (最åˆã®ã‚«ãƒ©ãƒ ) ãŒãƒªã‚µã‚¤ã‚ºã•れãŸå ´åˆã«ã¯ trueã€ãれ以外ã®å ´åˆã«ã¯ false | #### 例題 diff --git a/website/translated_docs/ja/Events/onDataChange.md b/website/translated_docs/ja/Events/onDataChange.md index 4f41941583064d..c79b803bd38ab3 100644 --- a/website/translated_docs/ja/Events/onDataChange.md +++ b/website/translated_docs/ja/Events/onDataChange.md @@ -3,15 +3,16 @@ id: onDataChange title: On Data Change --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| 20 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) | An object data has been modified | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | +| 20 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) | オブジェクトã®ãƒ‡ãƒ¼ã‚¿ãŒå¤‰æ›´ã•れ㟠| ## 説明 -When the `On Data Change` event property is selected for an object, you can detect and handle the change of the data source value, using the `FORM Event` command. +`On Data Change` イベントプロパティãŒã‚ªãƒ–ジェクトã§é¸æŠžã•れã¦ã„ã‚‹å ´åˆã€`FORM Event` コマンドを使ã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®å€¤ã®å¤‰åŒ–を検出ã—ã€å‡¦ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -The event is generated as soon as the variable associated with the object is updated internally by 4D (i.e., in general, when the entry area of the object loses the focus). +イベントã¯ã€ã‚ªãƒ–ジェクトã«çµã³ä»˜ã‘られãŸå¤‰æ•°ãŒ 4D ã«ã‚ˆã‚Šå†…éƒ¨çš„ã«æ›´æ–°ã•れ次第ã€ç”Ÿæˆã•れã¾ã™ (一般的ã«ã¯ã€å…¥åŠ›ã‚¨ãƒªã‚¢ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒãƒ•ォーカスを失ã£ãŸæ™‚)。 + +> [サブフォーム](FormObjects/subform_overview.md) ã«ãŠã„ã¦ã¯ã€`On Data Change` イベントã¯ã‚µãƒ–フォームオブジェクト変数ã®å€¤ãŒæ›´æ–°ã•れãŸã¨ãã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ -> With [subforms](FormObjects/subform_overview.md), the `On Data Change` event is triggered when the value of the variable of the subform object has been modified. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onDeactivate.md b/website/translated_docs/ja/Events/onDeactivate.md index 59ac9d6f7a01b8..2ef58ebcd8f466 100644 --- a/website/translated_docs/ja/Events/onDeactivate.md +++ b/website/translated_docs/ja/Events/onDeactivate.md @@ -3,17 +3,16 @@ id: onDeactivate title: On Deactivate --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------------------- | -| 12 | フォーム | The form’s window ceases to be the frontmost window | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------------- | +| 12 | フォーム | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæœ€å‰é¢ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ãªããªã£ãŸ | ## 説明 -If the window of a form was the frontmost window, this event is called when the window is sent to the background. +フォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæœ€å‰é¢ã«ã‚ã£ãŸå ´åˆã€ãã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒèƒŒé¢ã«é€ã‚‰ã‚ŒãŸã¨ãã«ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒå‘¼ã°ã‚Œã¾ã™ã€‚ -This event applies to the form as a whole and not to a particular object. Consequently, if the `On Deactivate` form event property is selected, only the form will have its form method called. - -### See also +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯å€‹ã€…ã®ã‚ªãƒ–ジェクトã«ã¯é©ç”¨ã•れãšã€ãƒ•ォーム全体ã«é©ç”¨ã•れã¾ã™ã€‚ ゆãˆã« `On Deactivate` フォームイベントプロパティãŒé¸æŠžã•れã¦ã„れã°ã€ãã®ãƒ•ォームã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã¿ãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ +### å‚ç…§ [On Activate](onActivate.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onDeleteAction.md b/website/translated_docs/ja/Events/onDeleteAction.md index ca1a46027a8f47..ff2efaf28d0625 100644 --- a/website/translated_docs/ja/Events/onDeleteAction.md +++ b/website/translated_docs/ja/Events/onDeleteAction.md @@ -3,13 +3,13 @@ id: onDeleteAction title: On Delete Action --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------- | ----------------------------------- | -| 58 | [Hierarchical List](FormObjects/list_overview.md) - [List Box](FormObjects/listbox_overview.md) | The user attempts to delete an item | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------- | -------------- | +| 58 | [階層リスト](FormObjects/list_overview.md) - [リストボックス](FormObjects/listbox_overview.md) | ユーザーãŒé …ç›®ã®å‰Šé™¤ã‚’試ã¿ãŸ | ## 説明 -This event is generated each time a user attempts to delete the selected item(s) by pressing a deletion key (**Delete** or **Backspace**) or selecting a menu item whose associated standard action is 'Clear' (such as the **Clear** command in the **Edit** menu). +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå‰Šé™¤ã‚­ãƒ¼ (**Delete** ã‚„ **Backspace** キー) を押ã—ã¦ã€ã¾ãŸã¯ã‚¯ãƒªã‚¢æ¨™æº–アクションãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›® (**編集** メニュー㮠**クリア** ç­‰) ã‚’é¸æŠžã—ã¦ã€é¸æŠžã•れãŸé …ç›®ã®å‰Šé™¤ã‚’指示ã—ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -Note that generating the event is the only action carried out by 4D: the program does not delete any items. It is up to the developer to handle the deletion and any prior warning messages that are displayed. \ No newline at end of file +4D ã¯ã‚¤ãƒ™ãƒ³ãƒˆã®ç”Ÿæˆã ã‘ã‚’ãŠã“ãªã†ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。4D ã¯é …目を消去ã—ã¾ã›ã‚“。 実際ã®å‰Šé™¤å‡¦ç†ã‚„事å‰è­¦å‘Šã®è¡¨ç¤ºãªã©ã¯é–‹ç™ºè€…ã®è²¬ä»»ã§ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onDisplayDetail.md b/website/translated_docs/ja/Events/onDisplayDetail.md index 208eabc005f8ba..c000485b76db3f 100644 --- a/website/translated_docs/ja/Events/onDisplayDetail.md +++ b/website/translated_docs/ja/Events/onDisplayDetail.md @@ -3,36 +3,38 @@ id: onDisplayDetail title: On Display Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| 8 | Form - [List Box](FormObjects/listbox_overview.md) | A record is about to be displayed in a list form or a row is about to be displayed in a list box. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------- | ----------------------------------------- | +| 8 | フォーム - [リストボックス](FormObjects/listbox_overview.md) | レコードãŒãƒªã‚¹ãƒˆãƒ•ォーム中ã«ã€ã‚ã‚‹ã„ã¯è¡ŒãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã«è¡¨ç¤ºã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Display Detail` event can be used in the following contexts: +`On Display Detail` ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§åˆ©ç”¨ã§ãã¾ã™: -### Output form +### 出力フォーム -A record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +`DISPLAY SELECTION` ã‚„ `MODIFY SELECTION` ã«ã‚ˆã£ã¦ã€ãƒªã‚¹ãƒˆãƒ•ォームã§ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’表示ã•れよã†ã¨ã—ã¦ã„ã¾ã™ã€‚ -> This event cannot be selected for project forms, it is only available with **table forms**. +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ -In this context, the following sequence of calls to methods and form events is triggered: +ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚„フォームイベントãŒå‘¼ã³å‡ºã•れる順åºã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: -- For each record: - - For each object in the detail area: - - Object method with `On Display Detail` event - - Form method with `On Display Detail` event +- レコードã”ã¨ã«: + - 詳細エリアã®ã‚ªãƒ–ジェクトã”ã¨ã«: + - オブジェクトメソッド㮠`On Display Detail` イベント + - フォームメソッド㮠`On Display Detail` イベント -> The header area is handled using the [`On Header`](onHeader.md) event. +> ヘッダーエリアã¯ã€[`On Header`](onHeader.md) イベントã§å‡¦ç†ã•れã¾ã™ã€‚ + +`On Display Detail` イベントã‹ã‚‰ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã™ã‚‹ 4Dコマンドを呼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“れã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã‚’èµ·ã“ã—ã¾ã™ã€‚ 以下ã®ã‚³ãƒžãƒ³ãƒ‰ãŒè©²å½“ã—ã¾ã™: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, `MODIFY SELECTION`。 -Calling a 4D command that displays a dialog box from the `On Display Detail` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. ### セレクションリストボックス -This event is generated when a row of a [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes) list box is displayed. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€[**セレクション型**](FormObjects/listbox_overview.md#セレクションリストボックス) ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡ŒãŒè¡¨ç¤ºã•れãŸã¨ãã«ç™ºç”Ÿã—ã¾ã™ã€‚ + ### Displayed line number -The `Displayed line number` 4D command works with the `On Display Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +`Displayed line number` 4Dコマンドã¯ã€`On Display Detail` フォームイベントã¨é€£å‹•ã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆã¾ãŸã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡ŒãŒç”»é¢ã«è¡¨ç¤ºã•れるã¨ãã«å‡¦ç†ã•れã¦ã„る行ã®ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onDoubleClicked.md b/website/translated_docs/ja/Events/onDoubleClicked.md index 0460ed02eac3a9..c95b93fa750a59 100644 --- a/website/translated_docs/ja/Events/onDoubleClicked.md +++ b/website/translated_docs/ja/Events/onDoubleClicked.md @@ -3,31 +3,30 @@ id: onDoubleClicked title: On Double Clicked --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------ | -| 13 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | A double click occurred on an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 13 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | オブジェクト上ã§ãƒ€ãƒ–ルクリックã•れ㟠| ## 説明 -The `On Double Clicked` event is generated when the user double-clicks on an object. The maximum length of time separating a double-click is defined in the system preferences. +`On Double Clicked` イベントã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ªãƒ–ジェクトをダブルクリックã—ãŸã¨ãã«ç™ºç”Ÿã—ã¾ã™ã€‚ ãƒ€ãƒ–ãƒ«ã‚¯ãƒªãƒƒã‚¯é–“éš”ã®æœ€å¤§æ™‚é–“ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ç’°å¢ƒè¨­å®šã§å®šç¾©ã•れã¦ã„ã¾ã™ã€‚ -If the [`On Clicked`](onClicked.md) or `On Double Clicked` onDoubleClicked.md object event property is selected for an object, you can detect and handle the clicks within or on the object, using the `FORM event` command that returns [`On Clicked`](onClicked.md) or `On Double Clicked`, depending on the case. +[`On Clicked`](onClicked.md) ã‚„ `On Double Clicked` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚¤ãƒ™ãƒ³ãƒˆãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã—ãŸã®ã¡ã€`FORM Event` コマンドを使用ã—ã¦ã‚ªãƒ–ジェクト上ã§ã®ã‚¯ãƒªãƒƒã‚¯ã‚’検知ã—処ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚`FORM Event` コマンドã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«å¿œã˜ã€[`On Clicked`](onClicked.md) ã¾ãŸã¯ `On Double Clicked` ã‚’è¿”ã—ã¾ã™ã€‚ -If both events are selected for an object, the `On Clicked` and then the `On Double Clicked` events will be generated when the user double-clicks the object. +両イベントãŒã‚ªãƒ–ジェクトã«å¯¾ã—é¸æŠžã•れã¦ã„ã‚‹å ´åˆã€ãƒ€ãƒ–ルクリックãŒãŠã“ãªã‚れるã¨ã¾ãš `On Clicked` ãŒã€ãã—㦠`On Double Clicked` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ ### 4D View Pro -This event is generated when the user doubl-clicks anywhere on a 4D View Pro document. On this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| プロパティ | åž‹ | 説明 | -| ----------- | ------ | ------------------------------ | -| code | å€é•·æ•´æ•° | 13 | -| description | テキスト | "On Double Clicked" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| range | object | Cell range | +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro ドキュメント上ã§ãƒ€ãƒ–ルクリックãŒç™ºç”Ÿã—ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ------------------- | +| code | å€é•·æ•´æ•° | 13 | +| description | text | "On Double Clicked" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | #### 例題 diff --git a/website/translated_docs/ja/Events/onDragOver.md b/website/translated_docs/ja/Events/onDragOver.md index efc4f68e76bf3a..ec26f2c19584c9 100644 --- a/website/translated_docs/ja/Events/onDragOver.md +++ b/website/translated_docs/ja/Events/onDragOver.md @@ -3,28 +3,28 @@ id: onDragOver title: On Drag Over --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 21 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data could be dropped onto an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| 21 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | データãŒã‚ªãƒ–ジェクト上ã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れるå¯èƒ½æ€§ãŒã‚ã‚‹ | ## 説明 -The `On Drag Over` event is repeatedly sent to the destination object when the mouse pointer is moved over the object. In response to this event, you usually: +`On Drag Over` イベントã¯ã€ãƒžã‚¦ã‚¹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒã‚ªãƒ–ジェクトã®ä¸Šã‚’移動ã™ã‚‹æ™‚ã«ã€ç¹°ã‚Šè¿”ã—ドロップ先オブジェクトã«é€ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã®å¿œç­”ã¨ã—ã¦ã€é–‹ç™ºè€…ã¯é€šå¸¸ã€ä»¥ä¸‹ã®ã“ã¨ã‚’ãŠã“ãªã„ã¾ã™: -- Get the data and signatures found in the pasteboard (via the `GET PASTEBOARD DATA` command). -- Depending on the nature and type of data in the pasteboard, you **accept** or **reject** the drag and drop. +- ペーストボード内ã«ã‚るデータや署åã‚’ (`GET PASTEBOARD DATA` コマンドを使用ã—ã¦) å–å¾—ã™ã‚‹ã€‚ +- ペーストボードã®ãƒ‡ãƒ¼ã‚¿ã®çŠ¶æ…‹ã‚„åž‹ã«åŸºã¥ãã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã® **å—ã‘付ã‘** ã¾ãŸã¯ **æ‹’å¦** ã‚’ãŠã“ãªã„ã¾ã™ã€‚ -To **accept** the drag, the destination object method must return 0 (zero), so you write `$0:=0`. To **reject** the drag, the object method must return -1 (minus one), so you write `$0:=-1`. During an `On Drag Over` event, 4D treats the object method as a function. If no result is returned, 4D assumes that the drag is accepted. +ドラッグを **å—ã‘付ã‘ã‚‹** ã«ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—å…ˆã®ã‚ªãƒ–ジェクトメソッド㌠(`$0:=0` を実行ã—ã¦) 0 (ゼロ) ã‚’è¿”ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ドラッグを **æ‹’å¦** ã™ã‚‹ã«ã¯ã€ã‚ªãƒ–ジェクトメソッド㌠(`$0:=-1` を実行ã—ã¦) -1 (マイナス1) ã‚’è¿”ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 `On Drag Over` イベント中ã€4D ã¯ã“ã®ã‚ªãƒ–ジェクトメソッドを関数ã¨ã—ã¦æ‰±ã„ã¾ã™ã€‚ çµæžœãŒè¿”ã•れãªã„å ´åˆã«ã¯ã€4D ã¯ãƒ‰ãƒ©ãƒƒã‚°ãŒå—ã‘付ã‘られãŸã‚‚ã®ã¨èªè­˜ã—ã¾ã™ã€‚ -If you accept the drag, the destination object is highlighted. If you reject the drag, the destination is not highlighted. Accepting the drag does not mean that the dragged data is going to be inserted into the destination object. It only means that if the mouse button was released at this point, the destination object would accept the dragged data and the [`On Drop`](onDrop.md) event would be fired. +ドラッグをå—ã‘入れるã¨ã€ãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトãŒãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ ドラッグを拒å¦ã—ãŸå ´åˆã€ãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã›ã‚“。 ドラッグをå—ã‘付ã‘ã‚‹ã“ã¨ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ã•れãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ‰ãƒ­ãƒƒãƒ—å…ˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æŒ¿å…¥ã•れるã¨ã„ã†æ„味ã§ã¯ã‚りã¾ã›ã‚“。 ã“れã¯ã€å˜ã«ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’ã“ã®å ´æ‰€ã§é›¢ã—ãŸã¨ãã«ã€ãƒ‰ãƒ©ãƒƒã‚°ã•れãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトã«ã‚ˆã£ã¦å—ã‘付ã‘られã€[`On Drop`](onDrop.md) イベントãŒå‹•ãã¨ã„ã†ã“ã¨ã‚’æ„味ã™ã‚‹ã ã‘ã§ã™ã€‚ -If you do not process the `On Drag Over` event for a droppable object, that object will be highlighted for all drag over operations, no matter what the nature and type of the dragged data. +ドロップå¯èƒ½ãªã‚ªãƒ–ジェクトã«å¯¾ã—ã¦é–‹ç™ºè€…㌠`On Drag Over` イベントを処ç†ã—ãªã„å ´åˆã«ã¯ã€ãã®ã‚ªãƒ–ジェクトã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ã•れãŸãƒ‡ãƒ¼ã‚¿ã®æ€§è³ªã‚„タイプã«é–¢ä¿‚ãªãã€ã™ã¹ã¦ã®ãƒ‰ãƒ©ãƒƒã‚°å‡¦ç†ã«å¯¾ã—ã¦ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ -The `On Drag Over` event is the means by which you control the first phase of a drag-and-drop operation. Not only can you test whether the dragged data is of a type compatible with the destination object, and then accept or reject the drag; you can simultaneously notify the user of this fact, because 4D highlights (or not) the destination object, based on your decision. +`On Drag Over` イベントã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—処ç†ã®æœ€åˆã®æ®µéšŽã‚’制御ã™ã‚‹æ‰‹æ®µã§ã™ã€‚ ドラッグã•れãŸãƒ‡ãƒ¼ã‚¿ãŒãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトã¨äº’æ›æ€§ã®ã‚るタイプã‹ã©ã†ã‹ã‚’テストã§ãã€ã¾ãŸãƒ‰ãƒ©ãƒƒã‚°ã®å—ã‘付ã‘ã‚„æ‹’å¦ã‚’ã§ãã‚‹ã ã‘ã§ãªãã€4D ãŒã‚ãªãŸã®åˆ¤æ–­ã«åŸºã¥ã„ã¦ãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトをãƒã‚¤ãƒ©ã‚¤ãƒˆ (ã¾ãŸã¯ç„¡å応) ã•れるãŸã‚ã€ã“ã®æ“ä½œãŒæœ‰åйã§ã‚ã‚‹ã“ã¨ã‚’æ“作者ã«ãƒ•ィードãƒãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -The code handling an `On Drag Over` event should be short and execute quickly, because that event is sent repeatedly to the current destination object, due to the movements of the mouse. +`On Drag Over` イベントã¯ãƒžã‚¦ã‚¹ã®ç§»å‹•ã«å¾“ã£ã¦ã€ç¾åœ¨ã®ãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトã«å¯¾ã—ã¦ç¹°ã‚Šè¿”ã—é€ã‚‰ã‚Œã‚‹ãŸã‚ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚³ãƒ¼ãƒ‰å‡¦ç†ã¯çŸ­ãã€çŸ­æ™‚é–“ã§å®Ÿè¡Œã•れるよã†ã«ã—ã¦ãã ã•ã„。 -#### See also +#### å‚ç…§ [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onDrop.md b/website/translated_docs/ja/Events/onDrop.md index 4d7bd9cedb68a1..d9e6b8cbca7932 100644 --- a/website/translated_docs/ja/Events/onDrop.md +++ b/website/translated_docs/ja/Events/onDrop.md @@ -3,17 +3,18 @@ id: onDrop title: On Drop --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| 16 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | Data has been dropped onto an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 16 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md#overview) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | データãŒã‚ªãƒ–ジェクトã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れ㟠| ## 説明 -The `On Drop` event is sent once to the destination object when the mouse pointer is released over the object. This event is the second phase of the drag-and-drop operation, in which you perform an operation in response to the user action. +`On Drop` イベントã¯ãƒžã‚¦ã‚¹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒãƒ‰ãƒ­ãƒƒãƒ—先オブジェクト上ã§ãƒªãƒªãƒ¼ã‚¹ã•れãŸã¨ãã«ãã®ã‚ªãƒ–ジェクトã«ä¸€åº¦é€ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—処ç†ã®ç¬¬2段階ã§ã‚りã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®å¿œç­”ã¨ã—ã¦å‡¦ç†ã‚’実行ã—ã¾ã™ã€‚ -This event is not sent to the object if the drag was not accepted during the [`On Drag Over`](onDragOver.md) events. If you process the `On Drag Over` event for an object and reject a drag, the `On Drop` event does not occur. Thus, if during the `On Drag Over` event you have tested the data type compatibility between the source and destination objects and have accepted a possible drop, you do not need to re-test the data during the `On Drop`. You already know that the data is suitable for the destination object. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€[`On Drag Over`](onDragOver.md) イベント中ã«ãƒ‰ãƒ©ãƒƒã‚°ãŒå—ã‘付ã‘られãªã‹ã£ãŸå ´åˆã«ã¯ã€ã‚ªãƒ–ジェクトã«é€ã‚‰ã‚Œã¾ã›ã‚“。 オブジェクトã«å¯¾ã—㦠`On Drag Over` イベントを処ç†ã—ã€ãƒ‰ãƒ©ãƒƒã‚°ã‚’æ‹’å¦ã—ãŸå ´åˆã«ã¯ã€`On Drop` イベントã¯ç™ºç”Ÿã—ã¾ã›ã‚“。 ã¤ã¾ã‚Šã€`On Drag Over` イベント中ã«ã‚½ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã¨ãƒ‰ãƒ­ãƒƒãƒ—先オブジェクト間ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®äº’æ›æ€§ã‚’テストã—ã¦ã€æœ‰åйãªãƒ‰ãƒ­ãƒƒãƒ—ã‚’å—ã‘付ã‘ãŸå ´åˆã«ã¯ã€`On Drop` 中ã«ãƒ‡ãƒ¼ã‚¿ã®å†ãƒ†ã‚¹ãƒˆã‚’ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 データãŒãƒ‰ãƒ­ãƒƒãƒ—先オブジェクトã«å¯¾ã—ã¦é©åˆ‡ã§ã‚ã‚‹ã“ã¨ã¯æ—¢ã«ã‚ã‹ã£ã¦ã„ã‚‹ãŸã‚ã§ã™ã€‚ -#### See also + +#### å‚ç…§ [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onEndUrlLoading.md b/website/translated_docs/ja/Events/onEndUrlLoading.md index 1f109c7f957ce2..1235c7b02b03fe 100644 --- a/website/translated_docs/ja/Events/onEndUrlLoading.md +++ b/website/translated_docs/ja/Events/onEndUrlLoading.md @@ -3,11 +3,11 @@ id: onEndUrlLoading title: On End URL Loading --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | --------------------------------------------- | -| 49 | [Web Area](FormObjects/webArea_overview.md) | All the resources of the URL have been loaded | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | -------------------- | +| 49 | [Webエリア](FormObjects/webArea_overview.md) | URL ã®ã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹ãŒãƒ­ãƒ¼ãƒ‰ã•れ㟠| ## 説明 -This event is generated once the loading of all resources of the URL is complete. You can call the `WA Get current URL` command in order to find out the URL that was loaded. \ No newline at end of file +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ç¾åœ¨ã® URL ã®ã™ã¹ã¦ã®ãƒªã‚½ãƒ¼ã‚¹ãŒãƒ­ãƒ¼ãƒ‰ãŒå®Œäº†ã™ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ `WA Get current URL` コマンドを使用ã—ã¦ã€ãƒ­ãƒ¼ãƒ‰ã•れ㟠URL を知るã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onExpand.md b/website/translated_docs/ja/Events/onExpand.md index 25679728bf1ccb..dadb5eb07ad8ec 100644 --- a/website/translated_docs/ja/Events/onExpand.md +++ b/website/translated_docs/ja/Events/onExpand.md @@ -3,16 +3,16 @@ id: onExpand title: On Expand --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| 44 | [Hierarchical List](FormObjects/list_overview.md#overview) - [List Box](FormObjects/listbox_overview.md) | An element of the hierarchical list or hierarchical list box has been expanded using a click or a keystroke | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------- | --------------------------------------- | +| 44 | [階層リスト](FormObjects/list_overview.md#overview) - [リストボックス](FormObjects/listbox_overview.md) | クリックやキーストロークã§éšŽå±¤ãƒªã‚¹ãƒˆã¾ãŸã¯éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¦ç´ ãŒå±•é–‹ã•れ㟠| ## 説明 -- [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is expanded with a mouse click or keystroke. -- [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is expanded. +- [階層リスト](FormObjects/list_overview.md): ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒžã‚¦ã‚¹ã‚¯ãƒªãƒƒã‚¯ã‚„キーストロークã§éšŽå±¤ãƒªã‚¹ãƒˆã®è¦ç´ ãŒå±•é–‹ã•れるãŸã³ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ +- [階層リストボックス](FormObjects/listbox_overview.md#階層リストボックス): ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡ŒãŒå±•é–‹ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -### See also +### å‚ç…§ [On Collapse](onCollapse.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onFooterClick.md b/website/translated_docs/ja/Events/onFooterClick.md index 938762c8432b95..80dc4e10a4eb63 100644 --- a/website/translated_docs/ja/Events/onFooterClick.md +++ b/website/translated_docs/ja/Events/onFooterClick.md @@ -3,13 +3,13 @@ id: onFooterClick title: On Footer Click --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | -| 57 | [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in the footer of a list box column | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------- | --------------------- | +| 57 | [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | リストボックス列ã®ãƒ•ッターãŒã‚¯ãƒªãƒƒã‚¯ã•れ㟠| ## 説明 -This event is available for a list box or list box column object. It is generated when a click occurs in the footer of a list box column. In this context, the `OBJECT Get pointer` command returns a pointer to the variable of the footer that is clicked. The event is generated for both left and right clicks. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚„リストボックス列ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚„リストボックス列ã®ãƒ•ッターエリアãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®å ´åˆã€`OBJECT Get pointer` コマンドã¯ã‚¯ãƒªãƒƒã‚¯ã•れãŸãƒ•ッター変数ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ イベントã¯å·¦ãŠã‚ˆã³å³ã‚¯ãƒªãƒƒã‚¯ã©ã¡ã‚‰ã§ã‚‚生æˆã•れã¾ã™ã€‚ -You can test the number of clicks made by the user by means of the `Clickcount` command. \ No newline at end of file +`Clickcount` コマンドを使ã†ã“ã¨ã«ã‚ˆã£ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãŠã“ãªã£ãŸã‚¯ãƒªãƒƒã‚¯æ•°ã‚’テストã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onGettingFocus.md b/website/translated_docs/ja/Events/onGettingFocus.md index ab2753eea713b6..49cdf7ce4bca56 100644 --- a/website/translated_docs/ja/Events/onGettingFocus.md +++ b/website/translated_docs/ja/Events/onGettingFocus.md @@ -3,13 +3,13 @@ id: onGettingFocus title: On Getting focus --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| 15 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is getting the focus | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | +| 15 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) - [Webエリア](FormObjects/webArea_overview.md) | フォームオブジェクトãŒãƒ•ォーカスを得㟠| ## 説明 -The `On Getting Focus` event, along with the [`On losing Focus`](onLosingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +`On Getting Focus` イベントや [`On Losing Focus`](onLosingFocus.md) イベントを使ã£ã¦ã€[フォーカスå¯](FormObjects/properties_Entry.md#フォーカスå¯) オブジェクトã®ãƒ•ォーカスã®å¤‰æ›´ã‚’処ç†ã§ãã¾ã™ã€‚ -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +[サブフォームオブジェクト](FormObjects/subform_overview.md) ã®å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒãƒ—ロパティリスト中ã§ãƒã‚§ãƒƒã‚¯ã•れã¦ã„れã°ã€ã‚µãƒ–フォームオブジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚µãƒ–フォームã®ãƒ•ォームメソッドã«é€ä¿¡ã•れã¾ã™ã€‚ã“れã«ã‚ˆã£ã¦ãŸã¨ãˆã°ã€ãƒ•ォーカスã«å¿œã˜ã¦ã‚µãƒ–フォーム中ã®ãƒŠãƒ“ゲーションボタンã®è¡¨ç¤ºã‚’管ç†ã§ãã¾ã™ã€‚ サブフォームオブジェクトã¯ã€ãれ自体ãŒãƒ•ォーカスをæŒã¤ç‚¹ã«ç•™æ„ã—ã¦ãã ã•ã„。 diff --git a/website/translated_docs/ja/Events/onHeader.md b/website/translated_docs/ja/Events/onHeader.md index 6e94bd8341163c..8623a028499404 100644 --- a/website/translated_docs/ja/Events/onHeader.md +++ b/website/translated_docs/ja/Events/onHeader.md @@ -3,23 +3,23 @@ id: onHeader title: On Header --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| 5 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form (list form only) - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form's header area is about to be printed or displayed. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | +| 5 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム (リストフォームã®ã¿) - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | フォームã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚¨ãƒªã‚¢ãŒå°åˆ·ã‚ã‚‹ã„ã¯è¡¨ç¤ºã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Header` event is called when a record is about to be displayed in a list form displayed via `DISPLAY SELECTION` and `MODIFY SELECTION`. +`On Header` イベントã¯ã€`DISPLAY SELECTION` ã‚„ `MODIFY SELECTION` ã«ã‚ˆã£ã¦ã€ãƒªã‚¹ãƒˆãƒ•ォームã§ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’表示ã•れよã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ -> This event cannot be selected for project forms, it is only available with **table forms**. +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ -In this context, the following sequence of calls to methods and form events is triggered: +ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚„フォームイベントãŒå‘¼ã³å‡ºã•れる順åºã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: -- For each object in the header area: - - Object method with `On Header` event - - Form method with `On Header` event +- ヘッダーエリアã®ã‚ªãƒ–ジェクトã”ã¨ã«: + - オブジェクトメソッド㮠`On Header` イベント + - フォームメソッド㮠`On Header` イベント -> Printed records are handled using the [`On Display Detail`](onDisplayDetail.md) event. +> å°åˆ·ã•れるレコードã¯ã€[`On Display Detail`](onDisplayDetail.md) イベントã§å‡¦ç†ã•れã¾ã™ã€‚ -Calling a 4D command that displays a dialog box from the `On Header` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. \ No newline at end of file +`On Header` イベントã‹ã‚‰ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã™ã‚‹ 4Dコマンドを呼ã³å‡ºã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。ã“れã¯ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒ©ãƒ¼ã‚’èµ·ã“ã—ã¾ã™ã€‚ 以下ã®ã‚³ãƒžãƒ³ãƒ‰ãŒè©²å½“ã—ã¾ã™: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, `MODIFY SELECTION`。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onHeaderClick.md b/website/translated_docs/ja/Events/onHeaderClick.md index 0acd651988d8fc..d8525888d36496 100644 --- a/website/translated_docs/ja/Events/onHeaderClick.md +++ b/website/translated_docs/ja/Events/onHeaderClick.md @@ -3,141 +3,36 @@ id: onHeaderClick title: On Header Click --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 42 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A click occurs in a column header | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| 42 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | リストボックスã®åˆ—ヘッダーã§ã‚¯ãƒªãƒƒã‚¯ãŒãŠã“ãªã‚れ㟠| ## 説明 ### リストボックス -This event is generated when a click occurs on the header of a column in the list box. In this case, the `Self` command lets you find out the header of the column that was clicked. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®åˆ—ヘッダーã§ã‚¯ãƒªãƒƒã‚¯ãŒãŠã“ãªã‚れるã¨ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®å ´åˆ `Self` コマンドを使用ã™ã‚Œã°ã‚¯ãƒªãƒƒã‚¯ã•れãŸåˆ—ヘッダーを知るã“ã¨ãŒã§ãã¾ã™ã€‚ -> The [`On Clicked`](onClicked.md) event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a column or column header. You can test the number of clicks made by the user by means of the `Clickcount` command. +リストボックス㧠[ソートå¯](FormObjects/properties_Action.md#ソートå¯) プロパティãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€`$0` ã« 0 ã¾ãŸã¯ -1 を渡ã—ã¦æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆã‚’ãŠã“ãªã†ã‹ã©ã†ã‹æŒ‡å®šã§ãã¾ã™: -If the [Sortable](FormObjects/properties_Action.md#sortable) property was selected for the list box, you can decide whether or not to authorize a standard sort of the column by passing the value 0 or -1 in the `$0` variable: +- `$0 = 0` ã®å ´åˆã€æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆãŒãŠã“ãªã‚れã¾ã™ã€‚ +- `$0 = -1` ã®å ´åˆã€æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆã¯ãŠã“ãªã‚れãšã€ãƒ˜ãƒƒãƒ€ãƒ¼ã«ã¯ä¸¦ã¹æ›¿ãˆçŸ¢å°ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 開発者㯠4Dランゲージを使用ã—ã¦ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸæ¡ä»¶ã«åŸºã¥ãä¸¦ã¹æ›¿ãˆã‚’実行ã§ãã¾ã™ã€‚ -- If `$0` equals 0, a standard sort is performed. -- If `$0` equals -1, a standard sort is not performed and the header does not display the sort arrow. The developer can still generate a column sort based on customized sort criteria using the 4D language. - -If the [Sortable](FormObjects/properties_Action.md#sortable) property is not selected for the list box, the `$0` variable is not used. +リストボックス㧠[ソートå¯](FormObjects/properties_Action.md#ソートå¯) プロパティãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã€`$0` ã¯ä½¿ç”¨ã•れã¾ã›ã‚“。 ### 4D View Pro -This event is generated when the user clicks on a column or row header in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro ドキュメント内ã®ã‚«ãƒ©ãƒ ãƒ˜ãƒƒãƒ€ãƒ¼ã¾ãŸã¯è¡Œãƒ˜ãƒƒãƒ€ãƒ¼ã§ã‚¯ãƒªãƒƒã‚¯ãŒç™ºç”Ÿã—ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - プロパティ - - 型 - - 説明 -
        - code - - å€é•·æ•´æ•° - - 42 -
        - description - - テキスト - - "On Header Click" -
        - objectName - - テキスト - - 4D View Pro area name -
        - sheetName - - テキスト - - Name of the sheet of the event -
        - range - - object - - Cell range -
        - sheetArea - - å€é•·æ•´æ•° - - The sheet location where the event took place:
        - -
      • - 0: The crossing area between column number/letter headers (top left of the sheet) -
      • - -
      • - 1: The column headers (area indicating the column numbers/letters) -
      • - -
      • - 2: The row headers (area indicating the row numbers) -
      • -
        +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ----------------------------------------------------------------------------------------------------- | +| code | å€é•·æ•´æ•° | 42 | +| description | text | "On Header Click" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | セルã®ãƒ¬ãƒ³ã‚¸ | +| sheetArea | å€é•·æ•´æ•° | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆã®å ´æ‰€:
      • 0: カラム文字ヘッダー / 行番å·ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã®é–“ã®äº¤å·®é ˜åŸŸ (シートã®å·¦ä¸Š)
      • 1:カラムヘッダー (カラム文字を示ã™é ˜åŸŸ)
      • 2:行ヘッダー (行番å·ã‚’示ã™é ˜åŸŸ)
      • | #### 例題 diff --git a/website/translated_docs/ja/Events/onLoad.md b/website/translated_docs/ja/Events/onLoad.md index 6a2f8f9987307e..f6c88003c7c3d9 100644 --- a/website/translated_docs/ja/Events/onLoad.md +++ b/website/translated_docs/ja/Events/onLoad.md @@ -3,23 +3,25 @@ id: onLoad title: On Load --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -| 1 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be displayed or printed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | +| 1 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) - [タブコントロール](FormObjects/tabControl.md) - [Webエリア](FormObjects/webArea_overview.md) | フォームãŒè¡¨ç¤ºã¾ãŸã¯å°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -This event is triggered when the form is being loaded or printed. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ•ォームãŒè¡¨ç¤ºã¾ãŸã¯å°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -All the objects of the form (from any page) whose `On Load` object event property is selected will have their object method called. Then, if the `On Load` form event property is selected, the form will have its form method called. +`On Load` オブジェクトイベントプロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã€ãƒ•ォームã®å…¨ãƒšãƒ¼ã‚¸ã®å…¨ã‚ªãƒ–ジェクトã®ã‚ªãƒ–ジェクトメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ ãã®å¾Œã€`On Load` フォームイベントプロパティãŒé¸æŠžã•れã¦ã„れã°ã€ãƒ•ォームメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ -> The `On Load` and [`On Unload`](onUnload.md) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> オブジェクト㮠`On Load` 㨠[`On Unload`](onUnload.md) イベントãŒç”Ÿæˆã•れるã«ã¯ã€ã‚ªãƒ–ジェクトã¨ã‚ªãƒ–ジェクトãŒå±žã™ã‚‹ãƒ•ォームã®ä¸¡æ–¹ã§æœ‰åйã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 オブジェクトã®ã¿ã§ã‚¤ãƒ™ãƒ³ãƒˆãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。ã“れら 2ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ•ォームレベルã§ã‚‚有効ã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -### Subform -The `On Load` event is generated when opening the subform (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is displayed (and not when the form is displayed). +### サブフォーム -### See also +`On Load` イベントã¯ã€ã‚µãƒ–フォームを開ãéš›ã«ç”Ÿæˆã•れã¾ã™ã€‚ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã¯è¦ªãƒ•ォームレベルã§ã‚‚有効ã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€è¦ªãƒ•ォームã®ã‚¤ãƒ™ãƒ³ãƒˆã‚ˆã‚Šã‚‚å‰ã«ç”Ÿæˆã•れる点ã«ç•™æ„ã—ã¦ãã ã•ã„。 ã¾ãŸã€ãƒ•ォームイベント動作ã®åŽŸå‰‡ã«å¾“ã„ã€ã‚µãƒ–フォーム㌠0 ã‚‚ã—ã㯠1 以外ã®ãƒšãƒ¼ã‚¸ã«é…ç½®ã•れã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒšãƒ¼ã‚¸ãŒé–‹ã‹ã‚Œã‚‹ã¨ãã«ç”Ÿæˆã•れã€ãƒ•ォームãŒé–‹ã‹ã‚Œã‚‹ã¨ãã§ã¯ãªã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + + +### å‚ç…§ [`On Unload`](onUnload.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onLoadRecord.md b/website/translated_docs/ja/Events/onLoadRecord.md index ca011693e666c9..aa271739dbc690 100644 --- a/website/translated_docs/ja/Events/onLoadRecord.md +++ b/website/translated_docs/ja/Events/onLoadRecord.md @@ -3,13 +3,16 @@ id: onLoadRecord title: On Load Record --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------------------- | -| 40 | フォーム | During user entry in list, a record is loaded and a field is edited | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | --------------------------------- | +| 40 | フォーム | リスト更新中ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãƒ­ãƒ¼ãƒ‰ã•れã€ãƒ•ィールドãŒç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã£ãŸ | ## 説明 -The `On Load Record` event can only be used in the context of an **output form**. It is triggered during data entry in list, after a record is highlighted and a field changes to editing mode. +`On Load Record` イベントã¯ã€**出力フォーム** ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒªã‚¹ãƒˆæ›´æ–°ä¸­ã«ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã€ãƒ•ィールドãŒç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«ãªã£ãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ + +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ + + -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onLongClick.md b/website/translated_docs/ja/Events/onLongClick.md index 36de94c7a18fb5..a1a4e61ecaa689 100644 --- a/website/translated_docs/ja/Events/onLongClick.md +++ b/website/translated_docs/ja/Events/onLongClick.md @@ -3,29 +3,28 @@ id: onLongClick title: On Long Click --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------- | ------------------------------------------------------------------------------------ | -| 39 | [ボタン](FormObjects/button_overview.md) | A button is clicked and the mouse button remains pushed for a certain length of time | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------- | --------------------------------- | +| 39 | [ボタン](FormObjects/button_overview.md) | ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れã€ç‰¹å®šã®æ™‚é–“ä»¥ä¸Šãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒæŠ¼ã•れ続ã‘ã¦ã„ã‚‹ | ## 説明 -This event is generated when a button receives a click and the mouse button is held for a certain length of time. In theory, the length of time for which this event is generated is equal to the maximum length of time separating a double-click, as defined in the system preferences. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒœã‚¿ãƒ³ãŒã‚¯ãƒªãƒƒã‚¯ã•れã€ä¸€å®šæ™‚é–“ä»¥ä¸Šãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒæŠ¼ã•れ続ã‘ã¦ã„ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ ç†è«–上ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れるãŸã‚ã®ã‚¯ãƒªãƒƒã‚¯ä¿æŒæ™‚é–“ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã®ç’°å¢ƒè¨­å®šã«è¨­å®šã•れãŸãƒ€ãƒ–ルクリックã®é–“隔最大時間ã«ç­‰ã—ããªã‚Šã¾ã™ã€‚ -This event can be generated for the following button styles: +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€æ¬¡ã®ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã§ç”Ÿæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- [ツールãƒãƒ¼](FormObjects/button_overview.md#toolbar) -- [ベベル](FormObjects/button_overview.md#bevel) -- [è§’ã®ä¸¸ã„ベベル](FormObjects/button_overview.md#rounded-bevel) -- [OS Xグラデーション](FormObjects/button_overview.md#os-x-gradient) -- [OS Xテクスãƒãƒ£ãƒ¼](FormObjects/button_overview.md#os-x-textured) +- [ツールãƒãƒ¼](FormObjects/button_overview.md#ツールãƒãƒ¼) +- [ベベル](FormObjects/button_overview.md#ベベル) +- [è§’ã®ä¸¸ã„ベベル](FormObjects/button_overview.md#è§’ã®ä¸¸ã„ベベル) +- [OS Xグラデーション](FormObjects/button_overview.md#OS-Xグラデーション) +- [OS Xテクスãƒãƒ£ãƒ¼](FormObjects/button_overview.md#OS-Xテクスãƒãƒ£ãƒ¼) - [Office XP](FormObjects/button_overview.md#office-xp) -- [ヘルプ](FormObjects/button_overview.md#help) -- [サークル](FormObjects/button_overview.md#circle) -- [カスタム](FormObjects/button_overview.md#custom) +- [ヘルプ](FormObjects/button_overview.md#ヘルプ) +- [サークル](FormObjects/button_overview.md#サークル) +- [カスタム](FormObjects/button_overview.md#カスタム) -This event is generally used to display pop-up menus in case of long button clicks. The [`On Clicked`](onClicked.md) event, if enabled, is generated if the user releases the mouse button before the "long click" time limit. - -### See also +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ä¸€èˆ¬çš„ã«ã€ãƒ­ãƒ³ã‚°ã‚¯ãƒªãƒƒã‚¯æ™‚ã«ãƒãƒƒãƒ—アップメニューを表示ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ユーザーãŒãƒ­ãƒ³ã‚°ã‚¯ãƒªãƒƒã‚¯ãŒæœ‰åйã«ãªã‚‹æ™‚é–“å‰ã«ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’離ã™ã¨ã€[`On Clicked`](onClicked.md) イベント㌠(有効ã§ã‚れã°) 生æˆã•れã¾ã™ã€‚ +### å‚ç…§ [`On Alternative Click`](onAlternativeClick.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onLosingFocus.md b/website/translated_docs/ja/Events/onLosingFocus.md index 1fd04c0310ae18..04abab9c3d901a 100644 --- a/website/translated_docs/ja/Events/onLosingFocus.md +++ b/website/translated_docs/ja/Events/onLosingFocus.md @@ -3,13 +3,13 @@ id: onLosingFocus title: On Losing focus --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | -| 14 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Web area](FormObjects/webArea_overview.md) | A form object is losing the focus | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | +| 14 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) - [Webエリア](FormObjects/webArea_overview.md) | フォームオブジェクトãŒãƒ•ォーカスを失ã£ãŸ | ## 説明 -The `On Losing Focus` event, along with the [`On Getting Focus`](onGettingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. +`On Losing Focus` イベントや [`On Getting Focus`](onGettingFocus.md) イベントを使ã£ã¦ã€[フォーカスå¯](FormObjects/properties_Entry.md#フォーカスå¯) オブジェクトã®ãƒ•ォーカスã®å¤‰æ›´ã‚’処ç†ã§ãã¾ã™ã€‚ -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +[サブフォームオブジェクト](FormObjects/subform_overview.md) ã®å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆãŒãƒ—ロパティリスト中ã§ãƒã‚§ãƒƒã‚¯ã•れã¦ã„れã°ã€ã‚µãƒ–フォームオブジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚µãƒ–フォームã®ãƒ•ォームメソッドã«é€ä¿¡ã•れã¾ã™ã€‚ã“れã«ã‚ˆã£ã¦ãŸã¨ãˆã°ã€ãƒ•ォーカスã«å¿œã˜ã¦ã‚µãƒ–フォーム中ã®ãƒŠãƒ“ゲーションボタンã®è¡¨ç¤ºã‚’管ç†ã§ãã¾ã™ã€‚ サブフォームオブジェクトã¯ã€ãれ自体ãŒãƒ•ォーカスをæŒã¤ç‚¹ã«ç•™æ„ã—ã¦ãã ã•ã„。 diff --git a/website/translated_docs/ja/Events/onMenuSelected.md b/website/translated_docs/ja/Events/onMenuSelected.md index 3b7ad85855be83..cf5ecade5358d4 100644 --- a/website/translated_docs/ja/Events/onMenuSelected.md +++ b/website/translated_docs/ja/Events/onMenuSelected.md @@ -3,13 +3,13 @@ id: onMenuSelected title: On Menu Selected --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------ | -| 18 | フォーム | A menu item has been chosen in the associated menu bar | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | --------------------- | +| 18 | フォーム | 連çµãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ãŒé¸æŠžã•れ㟠| ## 説明 -The `On Menu Selected` event is sent to the form method when a command of a menu bar associated to the form is selected. You can then call the `Menu selected` language command to test the selected menu. +`On Menu Selected` イベントã¯ã€ãƒ•ォームã«é–¢é€£ä»˜ã‘られãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®ã‚³ãƒžãƒ³ãƒ‰ãŒé¸æŠžã•れるã¨ã€ãƒ•ォームメソッドã«é€ã‚‰ã‚Œã¾ã™ã€‚ ãã®å¾Œã€`Menu selected` ランゲージコマンドを呼ã³å‡ºã—ã¦ã€é¸æŠžã•れãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’テストã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> You can associate a menu bar with a form in the Form properties. The menus on a form menu bar are appended to the current menu bar when the form is displayed as an output form in the Application environment. \ No newline at end of file +> メニューãƒãƒ¼ã‚’フォームã«é–¢é€£ä»˜ã‘ã‚‹ã«ã¯ã€ãƒ•ォームã®ãƒ—ロパティã§è¨­å®šã—ã¾ã™ã€‚ フォームメニューãƒãƒ¼ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ã€ã‚¢ãƒ—リケーション環境ã§ãƒ•ォームãŒå‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨ã—ã¦è¡¨ç¤ºã•れãŸã¨ãã«ã€ç¾åœ¨ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã«è¿½åŠ ã•れã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onMouseEnter.md b/website/translated_docs/ja/Events/onMouseEnter.md index 6c0e6662d83c5e..3d81eb59c6aced 100644 --- a/website/translated_docs/ja/Events/onMouseEnter.md +++ b/website/translated_docs/ja/Events/onMouseEnter.md @@ -3,24 +3,25 @@ id: onMouseEnter title: On Mouse Enter --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 35 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor enters the graphic area of an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | +| 35 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | マウスカーソルãŒã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢å†…ã«å…¥ã£ãŸ | ## 説明 -This event is generated once, when the mouse cursor enters the graphic area of a form object. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒžã‚¦ã‚¹ã‚«ãƒ¼ã‚½ãƒ«ãŒãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢ã«å…¥ã£ãŸã¨ãã«ä¸€åº¦ã ã‘発生ã—ã¾ã™ã€‚ -The `On Mouse Enter` event updates the *MouseX* and *MouseY* system variables. +`On Mouse Enter` イベントã¯ã€*MouseX* ãŠã‚ˆã³ *MouseY* システム変数を更新ã—ã¾ã™ã€‚ -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +`OBJECT SET VISIBLE` コマンドã®ä½¿ç”¨ã‚„ã€[表示状態](FormObjects/properties_Display.md#表示状態) プロパティã®è¨­å®šã«ã‚ˆã£ã¦éžè¡¨ç¤ºã«ã•れãŸã‚ªãƒ–ジェクトã§ã¯ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -### Calling stack -If the `On Mouse Enter` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### コールスタック -### See also +`On Mouse Enter` イベントãŒãƒ•ォームã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€å„フォームオブジェクトã«å¯¾ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れã¾ã™ã€‚ ã‚るオブジェクトã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã¯ã€ãã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ é‡ãªã£ãŸã‚ªãƒ–ジェクトãŒã‚ã‚‹å ´åˆã¯ãƒˆãƒƒãƒ—レベルã‹ã‚‰é †ã«ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã“ã¨ãŒã§ãる最åˆã®ã‚ªãƒ–ジェクトã«ã‚ˆã£ã¦ç”Ÿæˆã•れã¾ã™ã€‚ + +### å‚ç…§ - [`On Mouse Move`](onMouseMove.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onMouseLeave.md b/website/translated_docs/ja/Events/onMouseLeave.md index 9231cb50cd88de..962eb88d8340d5 100644 --- a/website/translated_docs/ja/Events/onMouseLeave.md +++ b/website/translated_docs/ja/Events/onMouseLeave.md @@ -3,24 +3,25 @@ id: onMouseLeave title: On Mouse Leave --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 36 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor leaves the graphic area of an object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | +| 36 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | マウスカーソルãŒã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢ã‹ã‚‰å‡ºãŸ | ## 説明 -This event is generated once when the mouse cursor leaves the graphic area of an object. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒžã‚¦ã‚¹ã‚«ãƒ¼ã‚½ãƒ«ãŒãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢ã‹ã‚‰å‡ºãŸã¨ãã«ä¸€åº¦ã ã‘発生ã—ã¾ã™ã€‚ -The `On Mouse Leave` event updates the *MouseX* and *MouseY* system variables. +`On Mouse Leave` イベントã¯ã€*MouseX* ãŠã‚ˆã³ *MouseY* システム変数を更新ã—ã¾ã™ã€‚ -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +`OBJECT SET VISIBLE` コマンドã®ä½¿ç”¨ã‚„ã€[表示状態](FormObjects/properties_Display.md#表示状態) プロパティã®è¨­å®šã«ã‚ˆã£ã¦éžè¡¨ç¤ºã«ã•れãŸã‚ªãƒ–ジェクトã§ã¯ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -### Calling stack -If the `On Mouse Leave` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### コールスタック -### See also +`On Mouse Leave` イベントãŒãƒ•ォームã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€å„フォームオブジェクトã«å¯¾ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れã¾ã™ã€‚ ã‚るオブジェクトã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã¯ã€ãã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ é‡ãªã£ãŸã‚ªãƒ–ジェクトãŒã‚ã‚‹å ´åˆã¯ãƒˆãƒƒãƒ—レベルã‹ã‚‰é †ã«ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã“ã¨ãŒã§ãる最åˆã®ã‚ªãƒ–ジェクトã«ã‚ˆã£ã¦ç”Ÿæˆã•れã¾ã™ã€‚ + +### å‚ç…§ - [`On Mouse Move`](onMouseMove.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onMouseMove.md b/website/translated_docs/ja/Events/onMouseMove.md index 63a1a7d29d192c..3f393eedf26f73 100644 --- a/website/translated_docs/ja/Events/onMouseMove.md +++ b/website/translated_docs/ja/Events/onMouseMove.md @@ -3,29 +3,30 @@ id: onMouseMove title: On Mouse Move --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| 37 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The mouse cursor moves at least one pixel OR a modifier key (Shift, Alt/Option, Shift Lock) was pressed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| 37 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | マウスカーソルãŒã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢ä¸Šã§ (最低1ピクセル) å‹•ã„ãŸã‹ã€å¤‰æ›´ã‚­ãƒ¼ (Shift, Alt/Option, Shift Lock) ãŒæŠ¼ã•れ㟠| ## 説明 -This event is generated: +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®å ´åˆã«ç”Ÿæˆã•れã¾ã™: -- when the mouse cursor moves at least one pixel -- OR when a modifier key (**Shift**, **Alt/Option**, **Shift Lock**) was pressed. This makes it possible to manage copy- or move-type drag-and-drop operations. +- マウスカーソル㌠1ピクセル以上動ã„㟠+- ã¾ãŸã¯ã€å¤‰æ›´ã‚­ãƒ¼ (**Shift**, **Alt/Option**, **Shift Lock**) ãŒæŠ¼ã•れ㟠ã“れã«ã‚ˆã‚Šã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã«ã‚ˆã‚‹ã‚³ãƒ”ーや移動も管ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ -If the event is checked for an object only, it is generated only when the cursor is within the graphic area of the object. +イベントãŒã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã®ã¿ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãŸå ´åˆã¯ã€ãƒžã‚¦ã‚¹ã‚«ãƒ¼ã‚½ãƒ«ãŒã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»ã‚¨ãƒªã‚¢å†…ã«ã‚ã£ãŸå ´åˆã«ã®ã¿ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れã¾ã™ã€‚ -The `On Mouse Move` event updates the *MouseX* and *MouseY* system variables. +`On Mouse Move` イベントã¯ã€*MouseX* ãŠã‚ˆã³ *MouseY* システム変数を更新ã—ã¾ã™ã€‚ -Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. +`OBJECT SET VISIBLE` コマンドã®ä½¿ç”¨ã‚„ã€[表示状態](FormObjects/properties_Display.md#表示状態) プロパティã®è¨­å®šã«ã‚ˆã£ã¦éžè¡¨ç¤ºã«ã•れãŸã‚ªãƒ–ジェクトã§ã¯ã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -### Calling stack -If the `On Mouse Move` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. +### コールスタック -### See also +`On Mouse Move` イベントãŒãƒ•ォームã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€å„フォームオブジェクトã«å¯¾ã—ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れã¾ã™ã€‚ ã‚るオブジェクトã«ãŠã„ã¦ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã¯ã€ãã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ é‡ãªã£ãŸã‚ªãƒ–ジェクトãŒã‚ã‚‹å ´åˆã¯ãƒˆãƒƒãƒ—レベルã‹ã‚‰é †ã«ã€ã‚¤ãƒ™ãƒ³ãƒˆã‚’処ç†ã™ã‚‹ã“ã¨ãŒã§ãる最åˆã®ã‚ªãƒ–ジェクトã«ã‚ˆã£ã¦ç”Ÿæˆã•れã¾ã™ã€‚ + +### å‚ç…§ - [`On Mouse Enter`](onMouseEnter.md) - [`On Mouse Leave`](onMouseLeave.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onMouseUp.md b/website/translated_docs/ja/Events/onMouseUp.md index 8796e2a1ba5105..eac4f05259a49a 100644 --- a/website/translated_docs/ja/Events/onMouseUp.md +++ b/website/translated_docs/ja/Events/onMouseUp.md @@ -3,17 +3,17 @@ id: onMouseUp title: On Mouse Up --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| 2 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) | The user has just released the left mouse button in a Picture object | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------- | ------------------------------ | +| 2 | [ピクãƒãƒ£ãƒ¼åž‹](FormObjects/properties_Object.md#å¼ã®åž‹å¼ã‚¿ã‚¤ãƒ—)ã®[入力](FormObjects/input_overview.md) | ユーザーãŒãƒ”クãƒãƒ£ãƒ¼ã‚ªãƒ–ジェクト内ã«ã¦å·¦ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’離ã—㟠| ## 説明 -The `On Mouse Up` event is generated when the user has just released the left mouse button while dragging in a picture input. This event is useful, for example, when you want the user to be able to move, resize or draw objects in a SVG area. +ピクãƒãƒ£ãƒ¼åž‹ã®å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆå†…ã§ã€ãƒ‰ãƒ©ãƒƒã‚°ä¸­ã«å·¦ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’リリースã—ãŸã¨ãã« `On Mouse Up` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãŸã¨ãˆã°ã€SVGエリア内ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ªãƒ–ジェクトを移動ã€ãƒªã‚µã‚¤ã‚ºã€æç”»ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ãŸã„å ´åˆã«æœ‰ç”¨ã§ã™ã€‚ -When the `On Mouse Up` event is generated, you can get the local coordinates where the mouse button was released. These coordinates are returned in the `MouseX` and `MouseY` System variables. 座標ã¯ãƒ”クセルå˜ä½ã§è¡¨ç¾ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šéš…ãŒèµ·ç‚¹ (0,0) ã¨ãªã‚Šã¾ã™ã€‚ +`On Mouse Up` イベントãŒç”Ÿæˆã•れるã¨ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒãƒªãƒªãƒ¼ã‚¹ã•れãŸãƒ­ãƒ¼ã‚«ãƒ«ã®åº§æ¨™ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 座標㯠`MouseX` 㨠`MouseY` システム変数 ã«è¿”ã•れã¾ã™ã€‚ 座標ã¯ãƒ”クセルå˜ä½ã§è¡¨ç¾ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šéš…ãŒèµ·ç‚¹ (0,0) ã¨ãªã‚Šã¾ã™ã€‚ -When using this event, you must also use the `Is waiting mouse up` command to handle cases where the "state manager" of the form is desynchronized, i.e. when the `On Mouse Up` event is not received after a click. This is the case for example when an alert dialog box is displayed above the form while the mouse button has not been released. For more information and an example of use of the `On Mouse Up` event, please refer to the description of the `Is waiting mouse up` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’使用ã™ã‚‹å ´åˆã€ãƒ•ォーム㮠"ステートマãƒãƒ¼ã‚¸ãƒ£ãƒ¼" ãŒéžåŒæœŸã®å¯èƒ½æ€§ãŒã‚ã‚‹å ´åˆ (ã¤ã¾ã‚Šã€ã‚¯ãƒªãƒƒã‚¯å¾Œã« `On Mouse Up` イベントをå—ã‘å–らãªã‹ã£ãŸå ´åˆ) を管ç†ã™ã‚‹ãŸã‚ã«ã€`Is waiting mouse up` コマンドも使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“れã¯ãŸã¨ãˆã°ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒãƒªãƒªãƒ¼ã‚¹ã•れるå‰ã«ãƒ•ォーム上ã«ã‚¢ãƒ©ãƒ¼ãƒˆãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れãŸå ´åˆãªã©ã§ã™ã€‚ `On Mouse Up` イベントã®ã‚ˆã‚Šè©³ç´°ãªæƒ…å ±ã¨ä½¿ç”¨ä¾‹ã«ã¤ã„ã¦ã¯ã€`Is waiting mouse up` コマンドã®è©³ç´°ã‚’å‚ç…§ãã ã•ã„。 -> If the [Draggable](FormObjects/properties_Action.md#draggable) option is enabled for the picture object, the `On Mouse Up` event is never generated. \ No newline at end of file +> ピクãƒãƒ£ãƒ¼ã‚ªãƒ–ジェクト㮠[ドラッグ有効](FormObjects/properties_Action.md#ドラッグ有効)オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€`On Mouse Up` イベントã¯ã„ã‹ãªã‚‹å ´åˆã‚‚生æˆã•れã¾ã›ã‚“。 diff --git a/website/translated_docs/ja/Events/onOpenDetail.md b/website/translated_docs/ja/Events/onOpenDetail.md index 2c57150b3245f3..e9c7fc9dac6125 100644 --- a/website/translated_docs/ja/Events/onOpenDetail.md +++ b/website/translated_docs/ja/Events/onOpenDetail.md @@ -3,18 +3,19 @@ id: onOpenDetail title: On Open Detail --- -| Code | Can be called by | Definition | -| ---- | -------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| 25 | Form - [List Box](FormObjects/listbox_overview.md) | The detail form associated with the output form or with the list box is about to be opened. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------- | ----------------------------------------- | +| 25 | フォーム - [リストボックス](FormObjects/listbox_overview.md) | 出力フォームã¾ãŸã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られãŸè©³ç´°ãƒ•ォームãŒé–‹ã‹ã‚Œã‚ˆã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Open Detail` event can be used in the following contexts: +`On Open Detail` ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§åˆ©ç”¨ã§ãã¾ã™: + +- **出力フォーム**: 出力フォームã«é–¢é€£ã¥ã‘られãŸè©³ç´°ãƒ•ォームã«ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¡¨ç¤ºã•れよã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ +- [**セレクション型**](FormObjects/listbox_overview.md#セレクションリストボックス) リストボックスã«é–¢é€£ä»˜ã‘られ㟠(ã¾ã é–‹ã‹ã‚Œã¦ã„ãªã„) 詳細フォームã«ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¡¨ç¤ºã•れよã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -- **Output forms**: A record is about to be displayed in the detail form associated with the output form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record is about to be displayed in the detail form associated with a list box of the selection type (and before this form is opened). ### Displayed line number -The `Displayed line number` 4D command works with the `On Open Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +`Displayed line number` 4Dコマンドã¯ã€`On Open Detail` フォームイベントã¨é€£å‹•ã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆã¾ãŸã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡ŒãŒç”»é¢ã«è¡¨ç¤ºã•れるã¨ãã«å‡¦ç†ã•れã¦ã„る行ã®ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onOpenExternalLink.md b/website/translated_docs/ja/Events/onOpenExternalLink.md index e39e09f5b6955e..27b586e702bfd1 100644 --- a/website/translated_docs/ja/Events/onOpenExternalLink.md +++ b/website/translated_docs/ja/Events/onOpenExternalLink.md @@ -3,17 +3,17 @@ id: onOpenExternalLink title: On Open External Link --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ---------------------------------------------- | -| 52 | [Web Area](FormObjects/webArea_overview.md) | An external URL has been opened in the browser | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ----------------- | +| 52 | [Webエリア](FormObjects/webArea_overview.md) | 外部URL ãŒãƒ–ラウザーã§é–‹ã‹ã‚ŒãŸ | ## 説明 -This event is generated when the loading of a URL was blocked by the Web area and the URL was opened with the current system browser, because of a filter set up via the `WA SET EXTERNAL LINKS FILTERS` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`WA SET EXTERNAL LINKS FILTERS` コマンドã§è¨­å®šã•れãŸãƒ•ィルターã«ã‚ˆã‚Šã€URL ã®ãƒ­ãƒ¼ãƒ‰ãŒ Webエリアã«ã‚ˆã£ã¦ãƒ–ロックã•れã€URL ãŒã‚«ãƒ¬ãƒ³ãƒˆã®ã‚·ã‚¹ãƒ†ãƒ ãƒ–ラウザーã§é–‹ã‹ã‚Œã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ -You can find out the blocked URL using the `WA Get last filtered URL` command. +`WA Get last filtered URL` コマンドコマンドを使用ã—ã¦ãƒ–ロックã•れ㟠URL を知るã“ã¨ãŒã§ãã¾ã™ã€‚ -### See also +### å‚ç…§ [`On URL Filtering`](onUrlFiltering.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onOutsideCall.md b/website/translated_docs/ja/Events/onOutsideCall.md index 3f1b055fa95de8..14c589cb914da9 100644 --- a/website/translated_docs/ja/Events/onOutsideCall.md +++ b/website/translated_docs/ja/Events/onOutsideCall.md @@ -3,13 +3,14 @@ id: onOutsideCall title: On Outside Call --- -| Code | Can be called by | Definition | -| ---- | ---------------- | -------------------------------------------- | -| 10 | フォーム | The form received a `POST OUTSIDE CALL` call | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------------------------- | +| 10 | フォーム | フォーム㌠`POST OUTSIDE CALL` ã«ã‚ˆã‚‹å‘¼ã³å‡ºã—ã‚’å—ã‘㟠| ## 説明 -This event is called when the form is called from another process through the `POST OUTSIDE CALL` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`POST OUTSIDE CALL` コマンドã«ã‚ˆã£ã¦ä»–ã®ãƒ—ロセスã‹ã‚‰ãƒ•ォームãŒå‘¼ã³å‡ºã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ + +> `On Outside Call` イベントã¯ã€å—ä¿¡ã—ãŸå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã®å…¥åŠ›ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å¤‰æ›´ã—ã¾ã™ã€‚ 特ã«ã€ãƒ•ィールドãŒç·¨é›†ã•れã¦ã„ãŸå ´åˆã«ã¯ã€[`On Data Change`](onDataChange.md) イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ -> The `On Outside Call` event modifies the entry context of the receiving input form. In particular, if a field was being edited, the [`On Data Change`](onDataChange.md) event is generated. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onPageChange.md b/website/translated_docs/ja/Events/onPageChange.md index ba334dc8c6bdc6..b56a47ba1838d1 100644 --- a/website/translated_docs/ja/Events/onPageChange.md +++ b/website/translated_docs/ja/Events/onPageChange.md @@ -3,17 +3,17 @@ id: onPageChange title: On Page Change --- -| Code | Can be called by | Definition | -| ---- | ---------------- | --------------------------------------- | -| 56 | フォーム | The current page of the form is changed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------- | +| 56 | フォーム | フォーム中ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ãŒå¤‰æ›´ã•れ㟠| ## 説明 -This event is only available at the form level (it is called in the form method). It is generated each time the current page of the form changes (following a call to the `FORM GOTO PAGE` command or a standard navigation action). +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ•ォームレベルã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ (フォームメソッド内ã§ã®ã¿ä½¿ç”¨ã—ã¾ã™)。 ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€(`FORM GOTO PAGE` コマンドã®å‘¼ã³å‡ºã—や標準ナビゲーションアクションã«ä¼´ã„) フォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ãŒå¤‰æ›´ã•れるãŸã³ã«ç”Ÿæˆã•れã¾ã™ã€‚ -Note that it is generated after the page is fully loaded, i.e. once all the objects it contains are initialized, including [Web areas](FormObjects/webArea_overview.md). +ページãŒå®Œå…¨ã«ãƒ­ãƒ¼ãƒ‰ã•れãŸå¾Œ (ã¤ã¾ã‚Šã€([Webエリア](FormObjects/webArea_overview.md) ã‚’å«ã‚€) ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトãŒåˆæœŸåŒ–ã•れãŸå¾Œ) ã«å‘¼ã³å‡ºã•れるã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 -> The only exception is 4D View Pro areas, for which you need to call the [On VP Ready](onVpReady.md) specific event. +> 唯一ã®ä¾‹å¤–㯠4D View Proエリアã§ã€ãã®å ´åˆã¯å°‚用㮠[On VP Ready](onVpReady.md) イベントを呼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ -The `On Page Change` event is useful for executing code that requires all objects to be initialized beforehand. You can also use it to optimize the application by executing code (for example, a search) only after a specific page of the form is displayed and not just as soon as page 1 is loaded. If the user does not go to this page, the code is not executed. \ No newline at end of file +`On Page Change` イベントã¯ã€ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトãŒåˆæœŸåŒ–済ã¿ã®çŠ¶æ…‹ã§å®Ÿè¡Œã™ã‚‹å¿…è¦ã®ã‚るコードãŒã‚ã‚‹ã¨ãã«æœ‰ç”¨ã§ã™ã€‚ ã¾ãŸã€ãƒ•ォームã®ãƒšãƒ¼ã‚¸1 ãŒãƒ­ãƒ¼ãƒ‰ã•れãŸã¨ãã«ã™ã¹ã¦ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã®ã§ã¯ãªãã€ç‰¹å®šã®ãƒšãƒ¼ã‚¸ãŒé–‹ã‹ã‚ŒãŸã¨ãã«ã®ã¿ (検索ãªã©ã®) コードを実行ã™ã‚‹ã‚ˆã†ã«ã—ã¦ã€ã‚¢ãƒ—リケーションを最é©åŒ–ã§ãã¾ã™ã€‚ ユーザーãŒãã®ãƒšãƒ¼ã‚¸ã‚’é–‹ã‹ãªã‘れã°ã€ã‚³ãƒ¼ãƒ‰ã¯å®Ÿè¡Œã•れã¾ã›ã‚“。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onPlugInArea.md b/website/translated_docs/ja/Events/onPlugInArea.md index d6ec22f29d75b4..5fd6e746deda7b 100644 --- a/website/translated_docs/ja/Events/onPlugInArea.md +++ b/website/translated_docs/ja/Events/onPlugInArea.md @@ -3,11 +3,11 @@ id: onPlugInArea title: On Plug in Area --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------ | ------------------------------------------------------------- | -| 19 | Form - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) | An external object requested its object method to be executed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------- | ------------------------------- | +| 19 | フォーム - [プラグインエリア](FormObjects/pluginArea_overview.md) | 外部オブジェクトã®ã‚ªãƒ–ジェクトメソッドã®å®Ÿè¡ŒãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れ㟠| ## 説明 -The event is generated when a plug-in requested its form area to execute the associated object method. \ No newline at end of file +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€é–¢é€£ã™ã‚‹ã‚ªãƒ–ジェクトメソッドã®å®Ÿè¡Œã‚’プラグインãŒãƒ•ォームエリアã«è¦æ±‚ã—ãŸã¨ãã«ç™ºç”Ÿã—ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onPrintingBreak.md b/website/translated_docs/ja/Events/onPrintingBreak.md index 9c67f2f1585433..1b6795f43f7e24 100644 --- a/website/translated_docs/ja/Events/onPrintingBreak.md +++ b/website/translated_docs/ja/Events/onPrintingBreak.md @@ -3,15 +3,18 @@ id: onPrintingBreak title: On Printing Break --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | -| 6 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | One of the form’s break areas is about to be printed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | +| 6 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | フォームã®ãƒ–レークエリアã®ã²ã¨ã¤ãŒå°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Printing Break` event can only be used in the context of an **output form**. It is triggered each time a break area in the output form is about to be printed, so that you can evaluate the break values, for example. +`On Printing Break` イベントã¯ã€**出力フォーム** ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã®ãƒ–レークエリアãŒå°åˆ·ã•れよã†ã¨ã™ã‚‹ãŸã³ã«ç™ºç”Ÿã—ã€ã“れã«ã‚ˆã£ã¦ãƒ–レーク値を評価ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯é€šå¸¸ã€`Subtotal` コマンドã®å‘¼ã³å‡ºã—後ã«ç™ºç”Ÿã—ã¾ã™ã€‚ + +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ + -This event usually follows a call to the `Subtotal` command. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onPrintingDetail.md b/website/translated_docs/ja/Events/onPrintingDetail.md index 1629ae0c48af40..9924cb8afa039d 100644 --- a/website/translated_docs/ja/Events/onPrintingDetail.md +++ b/website/translated_docs/ja/Events/onPrintingDetail.md @@ -3,15 +3,16 @@ id: onPrintingDetail title: On Printing Detail --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 23 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s detail area is about to be printed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | +| 23 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | フォームã®è©³ç´°ã‚¨ãƒªã‚¢ãŒå°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Printing Detail` event can only be used in the context of an **output form**. It is triggered when the detail area the output form is about to be printed, for example following a call to the `Print form` command. +`On Printing Detail` イベントã¯ã€**出力フォーム** ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`Print form` コマンドã®å‘¼ã³å‡ºã—ã®å¾Œãªã©ã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã®è©³ç´°ã‚¨ãƒªã‚¢ãŒå°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«ç™ºç”Ÿã—ã¾ã™ã€‚ -The `Print form` command generates only one `On Printing Detail` event for the form method. +`Print form` コマンド㯠`On Printing Detail` イベントを 1ã¤ã ã‘ã€ãƒ•ォームメソッドã«å¯¾ã—ã¦ç”Ÿæˆã—ã¾ã™ã€‚ + +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onPrintingFooter.md b/website/translated_docs/ja/Events/onPrintingFooter.md index 0aa1ea41a3b308..f660f6c9ab2c9c 100644 --- a/website/translated_docs/ja/Events/onPrintingFooter.md +++ b/website/translated_docs/ja/Events/onPrintingFooter.md @@ -3,15 +3,16 @@ id: onPrintingFooter title: On Printing Footer --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -| 7 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Tab control](FormObjects/tabControl.md) | The form’s footer area is about to be printed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | +| 7 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [タブコントロール](FormObjects/tabControl.md) | フォームã®ãƒ•ッターエリアãŒå°åˆ·ã•れよã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -The `On Printing Footer` event can only be used in the context of an **output form**. It is triggered when the footer area the output form is about to be printed, so that you can evaluate the footer values. +`On Printing Footer` イベントã¯ã€**出力フォーム** ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã®ãƒ•ッターエリアãŒå°åˆ·ã•れよã†ã¨ã™ã‚‹ã¨ãã«ç™ºç”Ÿã—ã€ã“れã«ã‚ˆã£ã¦ãƒ•ッター値を評価ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ -This event can be triggered in the context of a `PRINT SELECTION` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`PRINT SELECTION` コマンドã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ç™ºç”Ÿã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +> ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ—ロジェクトフォームã§ã¯é¸æŠžã§ããšã€**テーブルフォーム** ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onResize.md b/website/translated_docs/ja/Events/onResize.md index 7c6c01cca33815..8b66bb86551818 100644 --- a/website/translated_docs/ja/Events/onResize.md +++ b/website/translated_docs/ja/Events/onResize.md @@ -3,14 +3,14 @@ id: onResize title: On Resize --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| 29 | フォーム | The form's window is resized or the subform object is resized (in this case the event is generated in the form method of the subform) | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------------------------------------------------------------ | +| 29 | フォーム | フォームウィンドウã¾ãŸã¯ã‚µãƒ–フォームオブジェクトãŒãƒªã‚µã‚¤ã‚ºã•れ㟠(後者ã®å ´åˆã¯ã€ã‚µãƒ–フォームã®ãƒ•ォームメソッドã«ãŠã„ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç”Ÿæˆã•れã¾ã™) | ## 説明 -This event is called: +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯æ¬¡ã®å ´åˆã«ç”Ÿæˆã•れã¾ã™: -- when the window of the form is resized, -- in the context of subforms, when the size of the subform object in the parent form has changed. In this this case, this event is sent to the subform form method. \ No newline at end of file +- フォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒãƒªã‚µã‚¤ã‚ºã•れ㟠+- サブフォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ã€è¦ªãƒ•ォームã«ãŠã„ã¦ã‚µãƒ–フォームオブジェクトã®ã‚µã‚¤ã‚ºãŒå¤‰æ›´ã•れãŸå ´åˆã€‚ ã“ã®å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚µãƒ–フォームã®ãƒ•ォームメソッドãŒå—ã‘å–りã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onRowMoved.md b/website/translated_docs/ja/Events/onRowMoved.md index 3960d8a40e986f..1365c0b9d226f5 100644 --- a/website/translated_docs/ja/Events/onRowMoved.md +++ b/website/translated_docs/ja/Events/onRowMoved.md @@ -3,13 +3,13 @@ id: onRowMoved title: On Row Moved --- -| Code | Can be called by | Definition | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -| 34 | [List Box of the array type](FormObjects/listbox_overview.md#array-list-boxes) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A list box row is moved by the user via drag and drop | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------- | ------------------------------ | +| 34 | [é…列型リストボックス](FormObjects/listbox_overview.md#é…列リストボックス) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) | リストボックスã®è¡ŒãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã§ç§»å‹•ã•れ㟠| ## 説明 -This event is generated when a row of the list box ([array type only](FormObjects/listbox_overview.md#array-list-boxes)) is moved by the user using drag and drop ([if allowed](FormObjects/properties_Action.md#movable-rows). It is not generated if the row is dragged and then dropped in its initial location. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ— ([許å¯ã•れã¦ã„れã°](FormObjects/properties_Action.md#行ã®ç§»å‹•å¯)) ã§ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ ([é…列型ã®ã¿](FormObjects/listbox_overview.md#é…列リストボックス)) ã®è¡ŒãŒç§»å‹•ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ãŸã ã—ã€å…ƒã®å ´æ‰€ã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸå ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -The `LISTBOX MOVED ROW NUMBER` command returns the new position of the row. \ No newline at end of file +`LISTBOX MOVED ROW NUMBER` コマンドã¯è¡Œã®æ–°ã—ã„ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onRowResize.md b/website/translated_docs/ja/Events/onRowResize.md index 58bca05a049827..17a37ac2a984ad 100644 --- a/website/translated_docs/ja/Events/onRowResize.md +++ b/website/translated_docs/ja/Events/onRowResize.md @@ -3,24 +3,23 @@ id: onRowResize title: On Row Resize --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------- | -------------------------------------------------------- | -| 60 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The height of a row is modified by a user with the mouse | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------ | ---------------------- | +| 60 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) | 行ã®é«˜ã•ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒžã‚¦ã‚¹ã«ã‚ˆã£ã¦å¤‰æ›´ã•れ㟠| ## 説明 -This event is generated when the height of a row is modified by a user in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - -| プロパティ | åž‹ | 説明 | -| ----------- | ------- | ---------------------------------------------------------------- | -| code | å€é•·æ•´æ•° | 60 | -| description | テキスト | "On Row Resize" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| range | object | Cell range of the rows whose heights have changed | -| header | boolean | True if the column header row (first row) is resized, else false | +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro ドキュメント内ã§è¡Œã®é«˜ã•ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: +| プロパティ | タイプ | 説明 | +| ----------- | ------- | ------------------------------------------------- | +| code | å€é•·æ•´æ•° | 60 | +| description | text | "On Row Resize" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | 高ã•ãŒå¤‰æ›´ã•れãŸè¡Œã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ | +| header | boolean | カラムヘッダー行 (最åˆã®è¡Œ) ãŒãƒªã‚µã‚¤ã‚ºã•れãŸå ´åˆã«ã¯ trueã€ãれ以外ã®å ´åˆã«ã¯ false | #### 例題 diff --git a/website/translated_docs/ja/Events/onScroll.md b/website/translated_docs/ja/Events/onScroll.md index eed00e1f226a0e..113ecc1d780540 100644 --- a/website/translated_docs/ja/Events/onScroll.md +++ b/website/translated_docs/ja/Events/onScroll.md @@ -3,23 +3,25 @@ id: onScroll title: On Scroll --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| 59 | [Input](FormObjects/input_overview.md) of the `picture` [Type](FormObjects/properties_Object.md#type) - [List Box](FormObjects/listbox_overview.md) | The user scrolls the contents of a picture object or list box using the mouse or keyboard. | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | +| 59 | [ピクãƒãƒ£ãƒ¼åž‹](FormObjects/properties_Object.md#å¼ã®åž‹å¼ã‚¿ã‚¤ãƒ—)ã®[入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) | マウスやキーボードを使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ”クãƒãƒ£ãƒ¼ã‚ªãƒ–ジェクトやリストボックスã®å†…容をスクロールã—ãŸã€‚ | ## 説明 -This event can be generated in the context of a picture input or a list box. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ”クãƒãƒ£ãƒ¼å…¥åŠ›ã¾ãŸã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ç”Ÿæˆã•れã¾ã™ã€‚ -This event is triggered after any other user event related to the scrolling action ([On Clicked](onClicked.md), [On After Keystroke](onAfterKeystroke.md), etc.). The event is only generated in the object method (not in the form method). +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«é–¢é€£ã—ãŸä»–ã®ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ™ãƒ³ãƒˆ ([On Clicked](onClicked.md)ã€[On After Keystroke](onAfterKeystroke.md)ã€ç­‰) ã®å¾Œã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚ªãƒ–ジェクトメソッドã®ä¸­ã§ã®ã¿ç”Ÿæˆã•れã¾ã™ (フォームメソッドã§ã¯ç”Ÿæˆã•れã¾ã›ã‚“)。 -The event is triggered when the scroll is the result of a user action: using the scroll bars and/or cursors, using the mouse wheel or [the keyboard](FormObjects/properties_Appearance.md#vertical-scroll-bar). It is not generated when the object is scrolled due to the execution of the `OBJECT SET SCROLL POSITION` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®çµæžœã¨ã—ã¦ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã®ã¿ç”Ÿæˆã•れã¾ã™: スクロールãƒãƒ¼/カーソルã®ä½¿ç”¨ã€ãƒžã‚¦ã‚¹ãƒ›ã‚¤ãƒ¼ãƒ«ã¾ãŸã¯ [キーボード](FormObjects/properties_Appearance.md#縦スクロールãƒãƒ¼) ã®ä½¿ç”¨ã€ç­‰ã§ã™ã€‚ `OBJECT SET SCROLL POSITION` コマンド使用ã®çµæžœã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãŸå ´åˆã«ã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -### Picture input -The event is generated as soon as a user scrolls a picture within the picture input (field or variable) that contains it. You can scroll the contents of a picture area when the size of the area is smaller than its contents and the [display format](FormObjects/properties_Display.md#picture-format) is "Truncated (non Centered)". +### ピクãƒãƒ£ãƒ¼å…¥åŠ› -### List box +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ”クãƒãƒ£ãƒ¼å…¥åŠ› (フィールドや変数) 内ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’スクロールã™ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ã‚¨ãƒªã‚¢ã®ã‚µã‚¤ã‚ºãŒãƒ”クãƒãƒ£ãƒ¼ã‚ˆã‚Šã‚‚å°ã•ãã€ã‹ã¤è¡¨ç¤ºãƒ†ãƒ¼ãƒžã® [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](FormObjects/properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) プロパティ㌠"トランケート (中央åˆã‚ã›ãªã—)" ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã®ã¿ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãŒå¯èƒ½ã§ã™ã€‚ -The event is generated as soon as a user scrolls the rows or columns of the list box. \ No newline at end of file + +### リストボックス + +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã‚„列をスクロールã™ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Events/onSelectionChange.md b/website/translated_docs/ja/Events/onSelectionChange.md index 678c44204b39ce..76c50344e881f0 100644 --- a/website/translated_docs/ja/Events/onSelectionChange.md +++ b/website/translated_docs/ja/Events/onSelectionChange.md @@ -3,28 +3,27 @@ id: onSelectionChange title: On Selection Change --- -| Code | Can be called by | Definition | -| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | -| 31 | [4D View Pro area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) | The selection in the object is modified | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | +| 31 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) | オブジェクト内ã§é¸æŠžãŒå¤‰æ›´ã•れ㟠| ## 説明 -This event can be generated in different contexts. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯æ§˜ã€…ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ç™ºç”Ÿã—ã¾ã™ã€‚ -### 4D View Pro - -The current selection of rows or columns is modified. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: -| プロパティ | åž‹ | 説明 | -| ------------- | ------ | ------------------------------ | -| code | å€é•·æ•´æ•° | 31 | -| description | テキスト | "On Selection Change" | -| objectName | テキスト | 4D View Pro area name | -| sheetName | テキスト | Name of the sheet of the event | -| oldSelections | object | Cell range before change | -| newSelections | object | Cell range after change | +### 4D View Pro +ç¾åœ¨ã®è¡Œã‚„列ã®é¸æŠžãŒå¤‰æ›´ã•れãŸã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã€`FORM Event` コマンドã«ã‚ˆã£ã¦è¿”ã•れる [イベントオブジェクト](overview.md#イベントオブジェクト) ã«ã¯ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: +| プロパティ | タイプ | 説明 | +| ------------- | ------ | --------------------- | +| code | å€é•·æ•´æ•° | 31 | +| description | text | "On Selection Change" | +| objectName | text | 4D View Pro エリアå | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| oldSelections | object | 変更å‰ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ | +| newSelections | object | 変更後ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ | #### 例題 @@ -35,18 +34,21 @@ The current selection of rows or columns is modified. In this context, the [even End if ``` -### List form +### リストフォーム + +リストフォームã«ãŠã„ã¦ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰ã‚ã‚‹ã„ã¯ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¡Œé¸æŠžãŒå¤‰æ›´ã•れãŸã€‚ + + +### 階層リスト -The current record or the current selection of rows is modified in a list form. +階層リスト中ã®é¸æŠžãŒã‚¯ãƒªãƒƒã‚¯ã‚„キーストロークãªã©ã§å¤‰æ›´ã•れãŸã€‚ -### Hierarchical list -This event is generated every time the selection in the hierarchical list is modified after a mouse click or keystroke. +### 入力 & 4D Write Pro -### Input & 4D Write Pro +クリックやキーストロークã«ã‚ˆã‚Šã€é¸æŠžã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚„カーソルã®ä½ç½®ãŒã‚¨ãƒªã‚¢å†…ã§å¤‰æ›´ã•れãŸã€‚ -The text selection or the position of the cursor in the area is modified following a click or a keystroke. -### List box +### リストボックス +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã§ç¾åœ¨ã®è¡Œã‚„列ã®é¸æŠžãŒå¤‰æ›´ã•れるãŸã³ã«ç”Ÿæˆã•れã¾ã™ã€‚ -This event is generated each time the current selection of rows or columns of the list box is modified. \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onTimer.md b/website/translated_docs/ja/Events/onTimer.md index 9a9f7ab174fe39..6b8dd430229e75 100644 --- a/website/translated_docs/ja/Events/onTimer.md +++ b/website/translated_docs/ja/Events/onTimer.md @@ -3,13 +3,13 @@ id: onTimer title: On Timer --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ----------------------------------------------------------------- | -| 27 | フォーム | The number of ticks defined by the `SET TIMER` command has passed | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----- | ------------------------------------- | +| 27 | フォーム | `SET TIMER` コマンドã§è¨­å®šã—ãŸæ™‚é–“ (ティック数) ãŒçµŒéŽã—㟠| ## 説明 -This event is generated only if the form method contains a previous call to the `SET TIMER` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€äº‹å‰ã« `SET TIMER` コマンドãŒä½¿ç”¨ã•れãŸå ´åˆã«ã®ã¿ç”Ÿæˆã•れã¾ã™ã€‚ -When the `On Timer` form event property is selected, only the form method will receive the event, no object method will be called. \ No newline at end of file +`On Timer` フォームイベントプロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ãƒ•ォームメソッドã®ã¿ãŒã‚¤ãƒ™ãƒ³ãƒˆã‚’å—ã‘å–りã¾ã™ã€‚オブジェクトメソッドã¯å‘¼ã³å‡ºã•れã¾ã›ã‚“。 \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onUnload.md b/website/translated_docs/ja/Events/onUnload.md index 3f409caef56576..e8d17e5c7ed906 100644 --- a/website/translated_docs/ja/Events/onUnload.md +++ b/website/translated_docs/ja/Events/onUnload.md @@ -3,23 +3,26 @@ id: onUnload title: On Unload --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | -| 24 | [4D View Pro Area](FormObjects/viewProArea_overview.md) - [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) - [Web Area](FormObjects/webArea_overview.md) | The form is about to be exited and released | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 24 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) - [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) - [タブコントロール](FormObjects/tabControl.md) - [Webエリア](FormObjects/webArea_overview.md) | フォームを閉ã˜ã¦è§£æ”¾ã—よã†ã¨ã—ã¦ã„ã‚‹ | ## 説明 -This event is triggered when the form is being exited released. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãƒ•ォームを閉ã˜ã¦è§£æ”¾ã—よã†ã¨ã—ã¦ã„ã‚‹ã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ -All the objects of the form (from any page) whose `On Unload` object event property is selected will have their object method called. Then, if the `On Unload` form event property is selected, the form will have its form method called. +`On Unload` オブジェクトイベントプロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã€ãƒ•ォームã®å…¨ãƒšãƒ¼ã‚¸ã®å…¨ã‚ªãƒ–ジェクトã®ã‚ªãƒ–ジェクトメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ ãã®å¾Œã€`On Unload` フォームイベントプロパティãŒé¸æŠžã•れã¦ã„れã°ã€ãƒ•ォームメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ -> The [`On Load`](onLoad.md) and [`On Unload`] events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. +> オブジェクト㮠[`On Load`](onLoad.md) 㨠`On Unload` イベントãŒç”Ÿæˆã•れるã«ã¯ã€ã‚ªãƒ–ジェクトã¨ã‚ªãƒ–ジェクトãŒå±žã™ã‚‹ãƒ•ォームã®ä¸¡æ–¹ã§æœ‰åйã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 オブジェクトã®ã¿ã§ã‚¤ãƒ™ãƒ³ãƒˆãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。ã“れら 2ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ•ォームレベルã§ã‚‚有効ã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -### Subform -The `On Unload` event is generated when the subform is closing (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is closed (and not when the form is closed). -### See also +### サブフォーム + +`On Unload` イベントã¯ã€ã‚µãƒ–フォームを閉ã˜ã‚‹éš›ã«ç”Ÿæˆã•れã¾ã™ã€‚ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã¯è¦ªãƒ•ォームレベルã§ã‚‚有効ã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€è¦ªãƒ•ォームã®ã‚¤ãƒ™ãƒ³ãƒˆã‚ˆã‚Šã‚‚å‰ã«ç”Ÿæˆã•れる点ã«ç•™æ„ã—ã¦ãã ã•ã„。 ã¾ãŸã€ãƒ•ォームイベント動作ã®åŽŸå‰‡ã«å¾“ã„ã€ã‚µãƒ–フォーム㌠0 ã‚‚ã—ã㯠1 以外ã®ãƒšãƒ¼ã‚¸ã«é…ç½®ã•れã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒšãƒ¼ã‚¸ãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ãã«ç”Ÿæˆã•れã€ãƒ•ォームãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ãã§ã¯ãªã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + + +### å‚ç…§ [`On Load`](onLoad.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onUrlFiltering.md b/website/translated_docs/ja/Events/onUrlFiltering.md index f2fbfe8e74d716..4f6bde092ff7e2 100644 --- a/website/translated_docs/ja/Events/onUrlFiltering.md +++ b/website/translated_docs/ja/Events/onUrlFiltering.md @@ -3,17 +3,16 @@ id: onUrlFiltering title: On URL Filtering --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | --------------------------------- | -| 51 | [Web Area](FormObjects/webArea_overview.md) | A URL was blocked by the Web area | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ------------------- | +| 51 | [Webエリア](FormObjects/webArea_overview.md) | Webエリア㌠URL をブロックã—㟠| ## 説明 -This event is generated when the loading of a URL is blocked by the Web area because of a filter set up using the `WA SET URL FILTERS` command. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`WA SET URL FILTERS` コマンドã§è¨­å®šã•れãŸãƒ•ィルターã«ã‚ˆã‚Šã€Webエリアã«ã‚ˆã£ã¦ URL ã®ãƒ­ãƒ¼ãƒ‰ãŒãƒ–ロックã•れるã¨ç”Ÿæˆã•れã¾ã™ã€‚ -You can find out the blocked URL using the `WA Get last filtered URL` command. - -### See also +`WA Get last filtered URL` コマンドコマンドを使用ã—ã¦ãƒ–ロックã•れ㟠URL を知るã“ã¨ãŒã§ãã¾ã™ã€‚ +### å‚ç…§ [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onUrlLoadingError.md b/website/translated_docs/ja/Events/onUrlLoadingError.md index 1898f69eca4526..623808b55297bf 100644 --- a/website/translated_docs/ja/Events/onUrlLoadingError.md +++ b/website/translated_docs/ja/Events/onUrlLoadingError.md @@ -3,17 +3,17 @@ id: onUrlLoadingError title: On URL Loading Error --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ------------------------------------------ | -| 50 | [Web Area](FormObjects/webArea_overview.md) | An error occurred when the URL was loading | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ------------------ | +| 50 | [Webエリア](FormObjects/webArea_overview.md) | URL をロード中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—㟠| ## 説明 -This event is generated when an error is detected during the loading of a URL. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€URL ã®ãƒ­ãƒ¼ãƒ‰ä¸­ã«ã‚¨ãƒ©ãƒ¼ã‚’検出ã™ã‚‹ã¨ç”Ÿæˆã•れã¾ã™ã€‚ -You can call the `WA GET LAST URL ERROR` command in order to get information about the error. +`WA GET LAST URL ERROR` コマンドを使用ã—ã¦ã€ã‚¨ãƒ©ãƒ¼ã«é–¢ã™ã‚‹æƒ…報をå–å¾—ã§ãã¾ã™ã€‚ -### See also +### å‚ç…§ [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onUrlResourceLoading.md b/website/translated_docs/ja/Events/onUrlResourceLoading.md index 18e3bc10491843..6ea1db46283902 100644 --- a/website/translated_docs/ja/Events/onUrlResourceLoading.md +++ b/website/translated_docs/ja/Events/onUrlResourceLoading.md @@ -3,17 +3,17 @@ id: onUrlResourceLoading title: On URL Resource Loading --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | ---------------------------------------- | -| 48 | [Web Area](FormObjects/webArea_overview.md) | A new resource is loaded in the Web area | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ---------------------- | +| 48 | [Webエリア](FormObjects/webArea_overview.md) | æ–°ã—ã„リソース㌠Webエリアã«ãƒ­ãƒ¼ãƒ‰ã•れ㟠| ## 説明 -This event is generated each time a new resource (picture, frame, etc.) is loaded on the current Web page. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ç¾åœ¨ã® Webページ㫠(ピクãƒãƒ£ã‚„フレームãªã©ã®) æ–°ã—ã„リソースをロードã™ã‚‹ãŸã³ã«ç”Ÿæˆã•れã¾ã™ã€‚ -The [Progression](FormObjects/properties_WebArea.md#progression) variable associated with the area lets you find out the current state of the loading. +Webエリアã«é–¢é€£ä»˜ã‘られ㟠[進æ—状æ³å¤‰æ•°](FormObjects/properties_WebArea.md#進æ—状æ³å¤‰æ•°) 変数を使用ã—ã¦ãƒ­ãƒ¼ãƒ‰çжæ³ã‚’知るã“ã¨ãŒã§ãã¾ã™ã€‚ -### See also +### å‚ç…§ [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onValidate.md b/website/translated_docs/ja/Events/onValidate.md index f7157009e2fb20..4bca49b18a90f9 100644 --- a/website/translated_docs/ja/Events/onValidate.md +++ b/website/translated_docs/ja/Events/onValidate.md @@ -3,15 +3,16 @@ id: onValidate title: On Validate --- -| Code | Can be called by | Definition | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| 3 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Button](FormObjects/button_overview.md) - [Button Grid](FormObjects/buttonGrid_overview.md) - [Check Box](FormObjects/checkbox_overview.md) - [Combo Box](FormObjects/comboBox_overview.md) - [Dropdown list](FormObjects/dropdownList_Overview.md) - Form - [Hierarchical List](FormObjects/list_overview.md#overview) - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) - [Picture Button](FormObjects/pictureButton_overview.md) - [Picture Pop up menu](FormObjects/picturePopupMenu_overview.md) - [Plug-in Area](FormObjects/pluginArea_overview.md#overview) - [Progress Indicators](FormObjects/progressIndicator.md) - [Radio Button](FormObjects/radio_overview.md) - [Ruler](FormObjects/ruler.md) - [Spinner](FormObjects/spinner.md) - [Splitter](FormObjects/splitters.md) - [Stepper](FormObjects/stepper.md) - [Subform](FormObjects/subform_overview.md) - [Tab control](FormObjects/tabControl.md) | The record data entry has been validated | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| 3 | [4D Write Pro エリア](FormObjects/writeProArea_overview) - [ボタン](FormObjects/button_overview.md) - [ボタングリッド](FormObjects/buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) - [コンボボックス](FormObjects/comboBox_overview.md) - [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) - フォーム - [階層リスト](FormObjects/list_overview.md) - [入力](FormObjects/input_overview.md) - [リストボックス](FormObjects/listbox_overview.md) - [リストボックス列](FormObjects/listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) - [プラグインエリア](FormObjects/pluginArea_overview.md) - [進æ—インジケーター](FormObjects/progressIndicator.md) - [ラジオボタン](FormObjects/radio_overview.md) - [ルーラー](FormObjects/ruler.md) - [スピナー](FormObjects/spinner.md) - [スプリッター](FormObjects/splitters.md) - [ステッパー](FormObjects/stepper.md) - [サブフォーム](FormObjects/subform_overview.md) - [タブコントロール](FormObjects/tabControl.md) | レコードã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ãŒå—ã‘入れられ㟠| ## 説明 -This event is triggered when the record data entry has been validated, for example after a `SAVE RECORD` command call or an `accept` [standard action](FormObjects/properties_Action.md#standard-action). +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€`SAVE RECORD` コマンドコールや `accept` [標準アクションã®å¾Œ](FormObjects/properties_Action.md#標準アクション) ãªã©ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒ‡ãƒ¼ã‚¿ã®å…¥åŠ›ãŒå—ã‘入れられãŸã¨ãã«ãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ã€‚ -### Subform -The `On Validate` event is triggered when data entry is validated in the subform. \ No newline at end of file +### サブフォーム + +`On Validate` イベントã¯ã€ã‚µãƒ–フォーム中ã§ãƒ‡ãƒ¼ã‚¿ã®å—ã‘入れをãŠã“ãªã†éš›ã«ç™ºç”Ÿã—ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onVpRangeChanged.md b/website/translated_docs/ja/Events/onVpRangeChanged.md new file mode 100644 index 00000000000000..6c2b941a33e62b --- /dev/null +++ b/website/translated_docs/ja/Events/onVpRangeChanged.md @@ -0,0 +1,27 @@ +--- +id: onVpRangeChanged +title: On VP Range Changed +--- + +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------ | ------------------------------------------------------- | +| 61 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) | 4D Vierw Pro ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ãŒå¤‰æ›´ã•れ㟠(例: フォーミュラã®è¨ˆç®—ã€å€¤ãŒã‚»ãƒ«ã‹ã‚‰å‰Šé™¤ã•れãŸã€ãªã©) | + + +## 説明 + + +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro ドキュメント内ã§ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ãŒå¤‰æ›´ã•れãŸã¨ãã«ç”Ÿæˆã•れã¾ã™ã€‚ + +FORM Event ã«ã‚ˆã£ã¦è¿”ã•れるオブジェクトã«ã¯ä»¥ä¸‹ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¾ã™: + +| プロパティ | タイプ | 説明 | +| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| objectName | text | 4D View Pro エリアå | +| code | å€é•·æ•´æ•° | On VP Range Changed | +| description | text | "On VP Range Changed" | +| sheetName | text | イベントãŒç™ºç”Ÿã—ãŸã‚·ãƒ¼ãƒˆå | +| range | object | 変化ã—ãŸã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ | +| changedCells | object | 変化ã—ãŸã‚»ãƒ«ã®ã¿ã‚’æ ¼ç´ã—ãŸãƒ¬ãƒ³ã‚¸ã€‚ レンジãŒçµ„ã¿åˆã‚ã•れãŸã‚‚ã®ã§ã‚ã‚‹å¯èƒ½æ€§ã‚‚ã‚りã¾ã™ã€‚ | +| action | text | イベント生æˆã—ãŸæ“作ã®ã‚¿ã‚¤ãƒ—:

      • "clear" - レンジã®å€¤ã‚’クリアæ“作
      • "dragDrop" - ドラッグドロップæ“作
      • "dragFill" - ドラッグã«ã‚ˆã‚‹ãƒ•ィルæ“作
      • "evaluateFormula" - 特定ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ã«ãƒ•ォーミュラを設定ã—ãŸ
      • "paste" - ペーストæ“作
      • "setArrayFormula" - 特定ã®ã‚»ãƒ«ãƒ¬ãƒ³ã‚¸ã«ãƒ•ォーミュラを設定ã—ãŸ
      • "sort" - セルã®ãƒ¬ãƒ³ã‚¸ã‚’ä¸¦ã¹æ›¿ãˆãŸ
      • | +> [On After Edit](onAfterEdit.md) ã‚‚å‚ç…§ãã ã•ã„。 diff --git a/website/translated_docs/ja/Events/onVpReady.md b/website/translated_docs/ja/Events/onVpReady.md index 345d855c55b9af..6de3345cb01818 100644 --- a/website/translated_docs/ja/Events/onVpReady.md +++ b/website/translated_docs/ja/Events/onVpReady.md @@ -3,15 +3,15 @@ id: onVpReady title: On VP Ready --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------------------- | ----------------------------------------------- | -| 9 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The loading of the 4D View Pro area is complete | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ------------------------------------------------------ | ------------------------ | +| 9 | [4D View Pro エリア](FormObjects/viewProArea_overview.md) | 4D View Pro エリアã®ãƒ­ãƒ¼ãƒ‰ãŒå®Œäº†ã—㟠| ## 説明 -This event is generated when the 4D View Pro area loading is complete. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€4D View Pro エリアã®ãƒ­ãƒ¼ãƒ‰ãŒçµ‚ã‚ã£ãŸæ™‚ã«ç”Ÿæˆã•れã¾ã™ã€‚ -You need to use this event to write initialization code for the area. Any 4D View Pro area initialization code, for loading or reading values from or in the area, must be located in the `On VP Ready` form event of the area. This form event is triggered once the area loading is complete. Testing this event makes you sure that the code will be executed in a valid context. An error is returned if a 4D View Pro command is called before the `On VP Ready` form event is generated. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚¨ãƒªã‚¢ã®åˆæœŸåŒ–コードを書ãéš›ã«å¿…è¦ã«ãªã‚Šã¾ã™ã€‚ 4D View Pro ã‚¨ãƒªã‚¢ã‚’åˆæœŸåŒ–ã™ã‚‹ãŸã‚ã®ã‚³ãƒ¼ãƒ‰ (値ã®èª­ã¿è¾¼ã¿ãªã©) ã¯å½“該エリア㮠`On VP Ready` ãƒ•ã‚©ãƒ¼ãƒ ã‚¤ãƒ™ãƒ³ãƒˆå†…ã«æ›¸ãå¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ãƒ•ォームイベントã¯ã€ã‚¨ãƒªã‚¢ã®èª­ã¿è¾¼ã¿ãŒå®Œäº†ã—ãŸã¨ãã«ä¸€å›žç”Ÿæˆã•れã¾ã™ã€‚ åŒã‚¤ãƒ™ãƒ³ãƒˆã®åˆ©ç”¨ã«ã‚ˆã£ã¦ã€æœ‰åйãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå†…ã§ã‚³ãƒ¼ãƒ‰ãŒå®Ÿè¡Œã•れるã“ã¨ã‚’確実ã«ã§ãã¾ã™ã€‚ `On VP Ready` フォームイベントãŒç”Ÿæˆã•れるå‰ã« 4D View Pro コマンドを呼ã³å‡ºã—ã¦ã—ã¾ã†ã¨ã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ -> 4D View Pro areas are loaded asynchronously in 4D forms. It means that the standard [On load](onLoad.md) form event cannot be used for 4D View Pro initialization code, since it could be executed before the loading of the area is complete. `On VP Ready` is always generated after [On load](onLoad.md). \ No newline at end of file +> 4D View Pro エリアã¯éžåŒæœŸçš„ã« 4Dフォーム上ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€æ¨™æº–ã® [On load](onLoad.md) フォームイベント㯠4D View Pro エリアã®èª­ã¿è¾¼ã¿å®Œäº†ã‚’ä¿è¨¼ã›ãšã€4D View Pro ã®åˆæœŸåŒ–コードã«åˆ©ç”¨ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 `On VP Ready` ã¯å¸¸ã« [On load](onLoad.md) ã®å¾Œã«ç”Ÿæˆã•れã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Events/onWindowOpeningDenied.md b/website/translated_docs/ja/Events/onWindowOpeningDenied.md index 56d15258b5ec86..dd85fcdadfda6b 100644 --- a/website/translated_docs/ja/Events/onWindowOpeningDenied.md +++ b/website/translated_docs/ja/Events/onWindowOpeningDenied.md @@ -3,17 +3,17 @@ id: onWindowOpeningDenied title: On Window Opening Denied --- -| Code | Can be called by | Definition | -| ---- | ------------------------------------------- | -------------------------------- | -| 53 | [Web Area](FormObjects/webArea_overview.md) | A pop-up window has been blocked | +| コード | 呼ã³å‡ºã—å…ƒ | 定義 | +| --- | ----------------------------------------- | ------------------- | +| 53 | [Webエリア](FormObjects/webArea_overview.md) | ãƒãƒƒãƒ—アップウィンドウãŒãƒ–ロックã•れ㟠| ## 説明 -This event is generated when the opening of a pop-up window is blocked by the Web area. 4D Web areas do not allow the opening of pop-up windows. +ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€Webエリアã«ã‚ˆã‚Šãƒãƒƒãƒ—アップウィンドウãŒãƒ–ロックã•れるã¨ç”Ÿæˆã•れã¾ã™ã€‚ 4D Webエリアã¯ãƒãƒƒãƒ—アップウィンドウを許å¯ã—ã¾ã›ã‚“。 -You can find out the blocked URL using the `WA Get last filtered URL` command. +`WA Get last filtered URL` コマンドコマンドを使用ã—ã¦ãƒ–ロックã•れ㟠URL を知るã“ã¨ãŒã§ãã¾ã™ã€‚ -### See also +### å‚ç…§ [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/ja/Events/overview.md b/website/translated_docs/ja/Events/overview.md index 5fff1422b08180..f0b07292b67624 100644 --- a/website/translated_docs/ja/Events/overview.md +++ b/website/translated_docs/ja/Events/overview.md @@ -3,112 +3,118 @@ id: overview title: æ¦‚è¦ --- -Form events are events that can lead to the execution of the form method and/or form object method(s). Form events allow you to control the flow of your application and to write code that is executed only when a specific event occurs. +フォームイベントã¨ã¯ã€ãƒ•ォームメソッドやフォームオブジェクトメソッドã®å®Ÿè¡Œã«ã¤ãªãŒã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã®ã“ã¨ã§ã™ã€‚ フォームイベントã«ã‚ˆã‚Šã€ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æµã‚Œã‚’コントロールã—ãŸã‚Šã€ç‰¹å®šã®ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ãŸã¨ãã«ã®ã¿å®Ÿè¡Œã•れるコードを書ãã“ã¨ãŒã§ãã¾ã™ã€‚ -In your code, you control the events using the `FORM Event` command, that returns the triggered event. ãŸã¨ãˆã°: +コードã®ä¸­ã§ã¯ã€ãƒˆãƒªã‚¬ãƒ¼ã•れãŸã‚¤ãƒ™ãƒ³ãƒˆã‚’返㙠`FORM Event` コマンドを使ã£ã¦ã‚¤ãƒ™ãƒ³ãƒˆã‚’制御ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: -```4d -//code of a button +```4d +// ボタンã®ã‚³ãƒ¼ãƒ‰ If(FORM Event.code=On Clicked) -// do something when the button is clicked +// ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã¨ãã®å‹•作 End if ``` -> Every form and every active object on the form can listen to a predefined set of events, but only the events that you enabled at the form level and/or at every object level will actually occur. - -## Event object - -Each event is returned as an object by the `FORM Event` command. By default, it contains the following properties: - -| プロパティ | åž‹ | 説明 | -| ----- | - | -- | -| | | | - objectName|text|Name of the object triggering the event - Not included if the event is triggered by the form| |code|longint|Numeric value of the form event. Also returned by the - -`Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| - -Additional properties are returned when the event occurs on specific objects. For example, the [On After Edit](onAfterEdit.md) event object returned by a [4D View Pro area](FormObjects/viewProArea_overview.md) contains `sheetName` or `action` properties. - -## Events and Methods - -When a form event occurs, 4D performs the following actions: - -- First, it browses the objects of the form and calls the object method for any object (involved in the event) whose corresponding object event property has been selected. -- Second, it calls the form method if the corresponding form event property has been selected. - -Do not assume that the object methods, if any, will be called in a particular order. The rule of thumb is that the object methods are always called before the form method. If an object is a subform, the object methods of the subform’s list form are called, then the form method of the list form is called. 4D then continues to call the object methods of the parent form. In other words, when an object is a subform, 4D uses the same rule of thumb for the object and form methods within the subform object. - -Except for the [On Load](onLoad.md) and [On Unload](onUnload.md) events (see below), if the form event property is not selected for a given event, this does not prevent calls to object methods for the objects whose same event property is selected. In other words, enabling or disabling an event at the form level has no effect on the object event properties. - -The number of objects involved in an event depends on the nature of the event. - -## Call Table - -The following table summarizes how object and form methods are called for each event type: - -| Event | Object Methods | Form Method | Which Objects | -| ------------------------ | ----------------------------------- | ----------- | ---------------------- | -| On Load | â—¯ | â—¯ | All objects | -| On Unload | â—¯ | â—¯ | All objects | -| On Validate | â—¯ | â—¯ | All objects | -| On Clicked | â—¯ | â—¯ | Involved object only | -| On Double Clicked | â—¯ | â—¯ | Involved object only | -| On Before Keystroke | â—¯ | â—¯ | Involved object only | -| On After Keystroke | â—¯ | â—¯ | Involved object only | -| On After Edit | â—¯ | â—¯ | Involved object only | -| On Getting Focus | â—¯ | â—¯ | Involved object only | -| On Losing Focus | â—¯ | â—¯ | Involved object only | -| On Activate | Never | â—¯ | None | -| On Deactivate | Never | â—¯ | None | -| On Outside Call | Never | â—¯ | None | -| On Page Change | Never | â—¯ | None | -| On Begin Drag Over | â—¯ | â—¯ | Involved object only | -| On Drop | â—¯ | â—¯ | Involved object only | -| On Drag Over | â—¯ | Never | Involved object only | -| On Mouse Enter | â—¯ | â—¯ | All objects | -| On Mouse Move | â—¯ | â—¯ | All objects | -| On Mouse Leave | â—¯ | â—¯ | All objects | -| On Mouse Up | â—¯ | Never | Involved object only | -| On Menu Selected | Never | â—¯ | None | -| On Bound variable change | Never | â—¯ | None | -| On Data Change | â—¯ | â—¯ | Involved object only | -| On Plug in Area | â—¯ | â—¯ | Involved object only | -| On Header | â—¯ | â—¯ | All objects | -| On Printing Detail | â—¯ | â—¯ | All objects | -| On Printing Break | â—¯ | â—¯ | All objects | -| On Printing Footer | â—¯ | â—¯ | All objects | -| On Close Box | Never | â—¯ | None | -| On Display Detail | â—¯ | â—¯ | All objects | -| On Open Detail | Yes (List box) | â—¯ | None except List boxes | -| On Close Detail | Yes (List box) | â—¯ | None except List boxes | -| On Resize | Never | â—¯ | None | -| On Selection Change | â—¯ | â—¯ | Involved object only | -| On Load Record | Never | â—¯ | None | -| On Timer | Never | â—¯ | None | -| On Scroll | â—¯ | Never | Involved object only | -| On Before Data Entry | Yes (List box) | Never | Involved object only | -| On Column Moved | Yes (List box) | Never | Involved object only | -| On Row Moved | Yes (List box) | Never | Involved object only | -| On Column Resize | Yes (List box and 4D View Pro Area) | Never | Involved object only | -| On Header Click | Yes (List box and 4D View Pro Area) | Never | Involved object only | -| On Footer Click | Yes (List box) | Never | Involved object only | -| On After Sort | Yes (List box) | Never | Involved object only | -| On Long Click | Yes (Button) | â—¯ | Involved object only | -| On Alternative Click | Yes (Button and List box) | Never | Involved object only | -| On Expand | Yes (Hier. list and list box) | Never | Involved object only | -| On Collapse | Yes (Hier. list and list box) | Never | Involved object only | -| On Delete Action | Yes (Hier. list and list box) | Never | Involved object only | -| On URL Resource Loading | Yes (Web Area) | Never | Involved object only | -| On Begin URL Loading | Yes (Web Area) | Never | Involved object only | -| On URL Loading Error | Yes (Web Area) | Never | Involved object only | -| On URL Filtering | Yes (Web Area) | Never | Involved object only | -| On End URL Loading | Yes (Web Area) | Never | Involved object only | -| On Open External Link | Yes (Web Area) | Never | Involved object only | -| On Window Opening Denied | Yes (Web Area) | Never | Involved object only | -| On VP Ready | Yes (4D View Pro Area) | Never | Involved object only | -| On Row Resize | Yes (4D View Pro Area) | Never | Involved object only | - - -Always keep in mind that, for any event, the method of a form or an object is called if the corresponding event property is selected for the form or objects. The benefit of disabling events in the Design environment (using the Property List of the Form editor) is that you can reduce the number of calls to methods and therefore significantly optimize the execution speed of your forms. - -> WARNING: The [On Load](onLoad) and [On Unload](onUnloas) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. \ No newline at end of file +> ã™ã¹ã¦ã®ãƒ•ォームã¨ãƒ•ォーム上ã®ã™ã¹ã¦ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚ªãƒ–ジェクトã¯ã€äº‹å‰ã«å®šç¾©ã•れãŸã‚¤ãƒ™ãƒ³ãƒˆã®ã‚»ãƒƒãƒˆã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒ•ã‚©ãƒ¼ãƒ ã‚„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆæ¯Žã«æœ‰åйã«ã•れãŸã‚¤ãƒ™ãƒ³ãƒˆã ã‘ãŒå®Ÿéš›ã«ç™ºç”Ÿã—ã¾ã™ã€‚ + + +## イベントオブジェクト + +å„イベントã¯ã€`FORM Event` コマンドã«ã‚ˆã£ã¦ã‚ªãƒ–ジェクトã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ デフォルトã§ã€ä»¥ä¸‹ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +| プロパティ | タイプ | 説明 | +| ----- | --- | -- | +| | | | + objectName|text|イベントをトリガーã—ã¦ã„るオブジェクトå。フォームã«ã‚ˆã£ã¦ãƒˆãƒªã‚¬ãƒ¼ã•れã¦ã„ã‚‹å ´åˆã«ã¯å«ã¾ã‚Œã¦ã„ã¾ã›ã‚“。| |code|longint|ãƒ•ã‚©ãƒ¼ãƒ ã‚¤ãƒ™ãƒ³ãƒˆã®æ•°å€¤ã€‚ + +`Form event code` ã«ã‚ˆã£ã¦ã‚‚è¿”ã•れã¾ã™ã€‚| |description|text|フォームイベントå (例: "On After Edit")| + +イベントãŒç™ºç”Ÿã—ãŸã‚ªãƒ–ジェクトã«ã‚ˆã£ã¦ã¯è¿½åŠ ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ 特ã«: + +- [リストボック](FormObjects/listbox_overview.md#フォームイベント) ãŠã‚ˆã³ [リストボックス列](FormObjects/listbox_overview.md#フォームイベント-1) ã¯ã€`columnName` ã‚„ `isRowSelected` ã¨ã„ã£ãŸã€[追加ã®ãƒ—ロパティ](FormObjects/listbox_overview.md#追加プロパティ) ã‚’è¿”ã—ã¾ã™ã€‚ +- [4D View Pro エリア](FormObjects/viewProArea_overview.md) ã¯ã€`sheetName` ã‚„ `action` ã¨ã„ã£ãŸãƒ—ロパティを [On After Edit](onAfterEdit.md) イベントオブジェクトã«è¿”ã—ã¾ã™ã€‚ + + +## イベントã¨ãƒ¡ã‚½ãƒƒãƒ‰ + +フォームイベントãŒç™ºç”Ÿã™ã‚‹ã¨ã€4D ã¯ä»¥ä¸‹ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãŠã“ãªã„ã¾ã™: + +- ã¾ãš 4D ã¯ã€ãƒ•ォーム中ã®ã‚ªãƒ–ジェクトをブラウズã—ã€ç™ºç”Ÿã—ãŸã‚ªãƒ–ジェクトイベントãŒãƒ—ロパティã§é¸æŠžã•れã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®ã‚ªãƒ–ジェクトメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ +- 次ã«ã€ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾å¿œã™ã‚‹ãƒ•ォームイベントãŒãƒ•ォームã®ãƒ—ロパティã§é¸æŠžã•れã¦ã„れã°ã€ãƒ•ォームメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ + +オブジェクトメソッドãŒç‰¹å®šã®é †åºã§å‘¼ã³å‡ºã•れるã“ã¨ã‚’期待ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ãŠãŠã¾ã‹ã«è¨€ã£ã¦ã€ã‚ªãƒ–ジェクトメソッドã¯å¸¸ã«ãƒ•ォームメソッドよりもå‰ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ オブジェクトãŒã‚µãƒ–フォームã®å ´åˆã€ã‚µãƒ–フォームã®ãƒªã‚¹ãƒˆãƒ•ォームã®ã‚ªãƒ–ジェクトメソッドãŒå‘¼ã³å‡ºã•ã‚Œã€æ¬¡ã«ãƒªã‚¹ãƒˆãƒ•ォームã®ãƒ•ォームメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ ãã—㦠4D ã¯å¼•ãç¶šãã€è¦ªãƒ•ォームã®ã‚ªãƒ–ジェクトメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクトãŒã‚µãƒ–ãƒ•ã‚©ãƒ¼ãƒ ã®æ™‚〠4D ã¯ã‚µãƒ–フォームオブジェクト内ã§ã€ã‚ªãƒ–ジェクトã¨ãƒ•ォームメソッドã¨åŒã˜ãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã—ã¾ã™ã€‚ + +[On Load](onLoad.md) 㨠[On Unload](onUnload.md) イベントを除ã (後述å‚ç…§)ã€ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆãŒãƒ•ォームイベントプロパティã§é¸æŠžã•れã¦ã„ãªã‹ã£ãŸã¨ã—ã¦ã‚‚ã€ã‚ªãƒ–ジェクトプロパティã§é¸æŠžã•れã¦ã„れã°ã€ãã®ã‚ªãƒ–ジェクトメソッドã®å‘¼ã³å‡ºã—ãŒå¦¨ã’られるã“ã¨ã¯ã‚りã¾ã›ã‚“。 è¨€ã„æ›ãˆã‚Œã°ã€ãƒ•ォームレベルã§ã‚¤ãƒ™ãƒ³ãƒˆã‚’有効ã‚ã‚‹ã„ã¯ç„¡åйã«ã—ã¦ã‚‚ã€ã‚ªãƒ–ジェクトイベントプロパティã«ã¯å½±éŸ¿ã‚りã¾ã›ã‚“。 + +特定ã®ã‚¤ãƒ™ãƒ³ãƒˆã«é–¢é€£ã™ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•°ã¯ã€ã‚¤ãƒ™ãƒ³ãƒˆã®æ€§è³ªã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ + +## イベント一覧 + +以下ã®è¡¨ã¯ã€ãれãžã‚Œã®ã‚¤ãƒ™ãƒ³ãƒˆã”ã¨ã«ã©ã®ã‚ˆã†ã«ã‚ªãƒ–ジェクトメソッドã¨ãƒ•ォームメソッドãŒå‘¼ã°ã‚Œã‚‹ã‹ã‚’概説ã—ã¾ã™: + +| イベント | オブジェクトメソッド | フォームメソッド | 対象オブジェクト | +| ------------------------ | ---------------------------- | -------- | ------------ | +| On Load | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Unload | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Validate | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Clicked | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Double Clicked | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Before Keystroke | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On After Keystroke | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On After Edit | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Getting Focus | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Losing Focus | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Activate | X | â—¯ | ãªã— | +| On Deactivate | X | â—¯ | ãªã— | +| On Outside Call | X | â—¯ | ãªã— | +| On Page Change | X | â—¯ | ãªã— | +| On Begin Drag Over | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Drop | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Drag Over | â—¯ | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Mouse Enter | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Mouse Move | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Mouse Leave | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Mouse Up | â—¯ | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Menu Selected | X | â—¯ | ãªã— | +| On Bound variable change | X | â—¯ | ãªã— | +| On Data Change | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Plug in Area | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Header | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Printing Detail | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Printing Break | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Printing Footer | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Close Box | X | â—¯ | ãªã— | +| On Display Detail | â—¯ | â—¯ | ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト | +| On Open Detail | â—¯ (リストボックス) | â—¯ | リストボックスã®ã¿ | +| On Close Detail | â—¯ (リストボックス) | â—¯ | リストボックスã®ã¿ | +| On Resize | X | â—¯ | ãªã— | +| On Selection Change | â—¯ | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Load Record | X | â—¯ | ãªã— | +| On Timer | X | â—¯ | ãªã— | +| On Scroll | â—¯ | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Before Data Entry | â—¯ (リストボックス) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Column Moved | â—¯ (リストボックス) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Row Moved | â—¯ (リストボックス) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Column Resize | â—¯ (リストボックス㨠4D View Pro エリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Header Click | â—¯ (リストボックス㨠4D View Pro エリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Footer Click | â—¯ (リストボックス) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On After Sort | â—¯ (リストボックス) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Long Click | â—¯ (ボタン) | â—¯ | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Alternative Click | â—¯ (ボタンã¨ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Expand | â—¯ (階層 リストã¨ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Collapse | â—¯ (階層 リストã¨ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Delete Action | â—¯ (階層 リストã¨ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On URL Resource Loading | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Begin URL Loading | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On URL Loading Error | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On URL Filtering | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On End URL Loading | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Open External Link | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Window Opening Denied | â—¯ (Webエリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On VP Range Changed | â—¯ (4D View Pro エリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On VP Ready | â—¯ (4D View Pro エリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | +| On Row Resize | â—¯ (4D View Pro エリア) | X | 関係ã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ | + +イベントã«å¯¾å¿œã™ã‚‹ãƒ—ロパティãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€ãƒ•ォームやオブジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã³å‡ºã•れるã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 デザインモードã®ãƒ•ォームエディターã®ãƒ—ロパティリストã§ã‚¤ãƒ™ãƒ³ãƒˆã‚’無効ã«ã™ã‚‹ã¨ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã³å‡ºã•れる回数を減らã™ã“ã¨ãŒã§ãã€ãƒ•ォームã®å®Ÿè¡Œé€Ÿåº¦ã‚’最é©åŒ–ã§ãã¾ã™ã€‚ + +> 警告: オブジェクト㮠[On Load](onLoad) 㨠[On Unload](onUnloas) イベントãŒç”Ÿæˆã•れるã«ã¯ã€ã‚ªãƒ–ジェクトã¨ã‚ªãƒ–ジェクトãŒå±žã™ã‚‹ãƒ•ォームã®ä¸¡æ–¹ã§æœ‰åйã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 オブジェクトã®ã¿ã§ã‚¤ãƒ™ãƒ³ãƒˆãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€ã‚¤ãƒ™ãƒ³ãƒˆã¯ç”Ÿæˆã•れã¾ã›ã‚“。ã“れら 2ã¤ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ•ォームレベルã§ã‚‚有効ã«ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + diff --git a/website/translated_docs/ja/FormEditor/createStylesheet.md b/website/translated_docs/ja/FormEditor/createStylesheet.md index 13078ea5206e3b..1a8aec50bb70db 100644 --- a/website/translated_docs/ja/FormEditor/createStylesheet.md +++ b/website/translated_docs/ja/FormEditor/createStylesheet.md @@ -3,17 +3,16 @@ id: stylesheets title: スタイルシート --- -## æ¦‚è¦ ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨ã¯ã€ãƒ•ォームオブジェクトã®å±žæ€§ (テキスト属性ãªã©ã€æä¾›ã•れã¦ã„ã‚‹ã»ã¼ã™ã¹ã¦ã®å±žæ€§) ã®çµ„ã¿åˆã‚ã›ã‚’ã¾ã¨ã‚ãŸã‚‚ã®ã§ã™ã€‚ アプリケーションã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを統一ã™ã‚‹ã»ã‹ã«ã‚‚ã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã®åˆ©ç”¨ã«ã¯3ã¤ã®åˆ©ç‚¹ãŒã‚りã¾ã™: -* 開発時間ã®å‰Šæ¸›: オブジェクトã®ã•ã¾ã–ã¾ãªå±žæ€§ã‚’一括ã§è¨­å®šã§ãã¾ã™ã€‚ -* メンテナンスã®å®¹æ˜“化: スタイルシートã¯ã€ãれãŒä½¿ç”¨ã•れã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®å¤–観を一括ã§è¨­å®šã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã®ãƒ•ォントサイズを変更ã™ã‚‹ã ã‘ã§ã€ãã®å¤‰æ›´ã¯åŒã˜ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’使用ã™ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã«é©ç”¨ã•れã¾ã™ã€‚ -* マルãƒãƒ—ラットフォーム開発ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«: macOS 㨠Windows 両用ã®ã»ã‹ã€macOS 専用ã€Windows 専用ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ スタイルシートãŒè¨­å®šã•れã¦ã„ã‚‹ã¨ã€4Dã¯è‡ªå‹•ã§é©åˆ‡ãªã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’使用ã—ã¾ã™ã€‚ +* 開発時間ã®å‰Šæ¸›: オブジェクトã®ã•ã¾ã–ã¾ãªå±žæ€§ã‚’一括ã§è¨­å®šã§ãã¾ã™ã€‚ +* メンテナンスã®å®¹æ˜“化: スタイルシートã¯ã€ãれãŒä½¿ç”¨ã•れã¦ã„ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®å¤–観を一括ã§è¨­å®šã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã®ãƒ•ォントサイズを変更ã™ã‚‹ã ã‘ã§ã€ãã®å¤‰æ›´ã¯åŒã˜ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’使用ã™ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã«é©ç”¨ã•れã¾ã™ã€‚ +* マルãƒãƒ—ラットフォーム開発ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«: macOS 㨠Windows 両用ã®ã»ã‹ã€macOS 専用ã€Windows 専用ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ スタイルシートãŒè¨­å®šã•れã¦ã„ã‚‹ã¨ã€4Dã¯è‡ªå‹•ã§é©åˆ‡ãªã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’使用ã—ã¾ã™ã€‚ -### スタイルシートファイル +## スタイルシートファイル 4D ã¯æ¬¡ã®3種ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆãƒ•ァイルをå—ã‘付ã‘ã¾ã™: @@ -23,21 +22,24 @@ title: スタイルシート | styleSheets_mac.css | macOS 専用ã®å±žæ€§ã‚¹ã‚¿ã‚¤ãƒ«å®šç¾©ç”¨ | | styleSheets_windows.css | Windows 専用ã®å±žæ€§ã‚¹ã‚¿ã‚¤ãƒ«å®šç¾©ç”¨ | +ã“れらã®ãƒ•ァイルã¯ãƒ—ロジェクト㮠"/SOURCES" ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¾ã™ã€‚ ã¾ãŸã€ãƒ•ォームエディターã®ãƒ„ールãƒãƒ¼ã«ã‚ã‚‹ã€[スタイルシートプレビュー](formEditor.md#スタイルシートプレビュー) ã‹ã‚‰ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -ã“れらã®ãƒ•ァイルã¯ãƒ—ロジェクト㮠"/SOURCES" ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¾ã™ã€‚ -### スタイルシートアーキテクãƒãƒ£ãƒ¼ +## スタイルシートアーキテクãƒãƒ£ãƒ¼ -4D フォームã«é©åˆã™ã‚‹ã‚ˆã†èª¿æ•´ã—ã¦ã‚ã‚‹ã‚‚ã®ã®ã€ãƒ—ロジェクトデータベースã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¯åŸºæœ¬çš„ã« CSS2 ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¨æ–‡æ³•ã«æ²¿ã£ã¦ã„ã¾ã™ã€‚ +4D フォームã«é©åˆã™ã‚‹ã‚ˆã†èª¿æ•´ã—ã¦ã‚ã‚‹ã‚‚ã®ã®ã€ã‚¢ãƒ—リケーションプロジェクトã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¯åŸºæœ¬çš„ã« CSS2 ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¨æ–‡æ³•ã«æ²¿ã£ã¦ã„ã¾ã™ã€‚ スタイルシートã®ã‚¹ã‚¿ã‚¤ãƒ«è¦å‰‡ã¯äºŒã¤ã®éƒ¨åˆ†ã‹ã‚‰æ§‹æˆã•れã¦ã„ã¾ã™: -* *セレクター* ã¯ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ã‚’指定ã—ã¾ã™ã€‚ 4D ã§ã¯ "オブジェクトタイプ", "オブジェクトå", "クラス", "ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト", ãŠã‚ˆã³ "属性値" ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒä½¿ãˆã¾ã™ã€‚ +* *セレクター* ã¯ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ã‚’指定ã—ã¾ã™ã€‚ 4D ã§ã¯ "オブジェクトタイプ", "オブジェクトå", "クラス", "ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト", ãŠã‚ˆã³ "属性値" ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒä½¿ãˆã¾ã™ã€‚ + +* *宣言* ã¯å¯¾è±¡ã«é©ç”¨ã™ã¹ãスタイルを指定ã—ã¾ã™ã€‚ 複数ã®ã¾ã¨ã¾ã£ãŸå®£è¨€æ–‡ã¯å®£è¨€ãƒ–ロックを構æˆã—ã¾ã™ã€‚ CSS 宣言ブロック内ã®å„æ–‡ã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³ ";" ã§åŒºåˆ‡ã‚Šã€ãƒ–ロック全体ã¯ä¸­ã‚«ãƒƒã‚³ { } ã§ããりã¾ã™ã€‚ + -* *宣言* ã¯å¯¾è±¡ã«é©ç”¨ã™ã¹ãスタイルを指定ã—ã¾ã™ã€‚ 複数ã®ã¾ã¨ã¾ã£ãŸå®£è¨€æ–‡ã¯å®£è¨€ãƒ–ロックを構æˆã—ã¾ã™ã€‚ CSS 宣言ブロック内ã®å„æ–‡ã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³ ";" ã§åŒºåˆ‡ã‚Šã€ãƒ–ロック全体ã¯ä¸­ã‚«ãƒƒã‚³ { } ã§ããりã¾ã™ã€‚ ## スタイルシートセレクター + ### オブジェクトタイプ CSS ã® **è¦ç´ ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼**ã¨åŒæ§˜ã«ã€ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ã‚’ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚¿ã‚¤ãƒ—ã§æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -48,19 +50,21 @@ CSS ã® **è¦ç´ ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼**ã¨åŒæ§˜ã«ã€ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ã‚’ 次ã®ä¾‹ã§ã¯ã€*button* タイプã®ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã€è¡¨ç¤ºã™ã‚‹ãƒ•ォントを Helvetica Neue ã«ã€ãƒ•ォントサイズを 20 ãƒ”ã‚¯ã‚»ãƒ«ã«æŒ‡å®šã—ã¾ã™: - button { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +button { + font-family: Helvetica Neue; + font-size: 20px; +} +``` 複数ã®ã‚ªãƒ–ジェクトタイプã«åŒã˜ã‚¹ã‚¿ã‚¤ãƒ«ã‚’é©ç”¨ã™ã‚‹ã«ã¯ã€ãれらã®ã‚ªãƒ–ジェクトタイプをカンマ "," 区切りã§ä½µè¨˜ã—ã€ãã®å¾Œã®ä¸­ã‚«ãƒƒã‚³ { } 内ã«ã‚¹ã‚¿ã‚¤ãƒ«ã‚’宣言ã—ã¾ã™: - text, input { - text-align: left; - stroke: grey; - } - +``` +text, input { + text-align: left; + stroke: grey; +} +``` ### オブジェクトå @@ -70,11 +74,14 @@ CSS ã® **è¦ç´ ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼**ã¨åŒæ§˜ã«ã€ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ã‚’ 次ã®ä¾‹ã§ã¯ã€"okButton" ã¨ã„ã†ã‚ªãƒ–ジェクトåã‚’æŒã¤ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã€è¡¨ç¤ºã™ã‚‹ãƒ•ォントを Helvetica Neue ã«ã€ãƒ•ォントサイズを 20 ãƒ”ã‚¯ã‚»ãƒ«ã«æŒ‡å®šã—ã¾ã™: - #okButton { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +#okButton { + font-family: Helvetica Neue; + font-size: 20px; +} +``` + + ### クラス @@ -84,25 +91,29 @@ CSS ã® **クラスセレクター**ã¨åŒæ§˜ã«ã€ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ 次ã®ä¾‹ã§ã¯ã€`okButtons` クラスをæŒã¤ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã€è¡¨ç¤ºã™ã‚‹ãƒ•ォントを Helvetica Neue ã«ã€ãƒ•ォントサイズを 20 ãƒ”ã‚¯ã‚»ãƒ«ã«æŒ‡å®šã—ã¾ã™: - .okButtons { - font-family: Helvetica Neue; - font-size: 20px; - text-align: center; - } - +``` +.okButtons { + font-family: Helvetica Neue; + font-size: 20px; + text-align: center; +} +``` ã•らã«ã€ç‰¹å®šã®ã‚ªãƒ–ジェクトタイプã«é™å®šã—ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚’é©ç”¨ã™ã‚‹ã«ã¯ã€ãã®ã‚ªãƒ–ジェクトタイプã®å¾Œã«ãƒ‰ãƒƒãƒˆ "." 区切りã§ã‚¯ãƒ©ã‚¹åを指定ã—ã€ãã®å¾Œã®ä¸­ã‚«ãƒƒã‚³ { } 内ã«ã‚¹ã‚¿ã‚¤ãƒ«ã‚’宣言ã—ã¾ã™: - text.center { - text-align: center; - stroke: red; - } - +``` +text.center { + text-align: center; + stroke: red; +} +``` 4D フォーム㮠JSONå¼è¨˜è¿°ã«ãŠã„ã¦ã¯ã€ãƒ•ォームオブジェクトã«ã‚¯ãƒ©ã‚¹åを設定ã™ã‚‹ã«ã¯ `class` 属性を使ã„ã¾ã™ã€‚ ã“ã®å±žæ€§ã«ã¯ä¸€ã¤ä»¥ä¸Šã®ã‚¯ãƒ©ã‚¹åを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚複数ã®å ´åˆã¯ã‚¯ãƒ©ã‚¹åã‚’åŠè§’スペースã§åŒºåˆ‡ã‚Šã¾ã™: - class: "okButtons important" - +``` +class: "okButtons important" +``` + ### ã™ã¹ã¦ã®ã‚ªãƒ–ジェクト @@ -112,10 +123,12 @@ CSS ã® **クラスセレクター**ã¨åŒæ§˜ã«ã€ã‚¹ã‚¿ã‚¤ãƒ«ã®é©ç”¨å¯¾è±¡ 次ã®ä¾‹ã§ã¯ã€ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトã®å¡—りカラーをグレーã«ã—ã¾ã™: - * { - fill: gray; - } - +``` +* { + fill: gray; +} +``` + ### オブジェクト属性 @@ -132,96 +145,146 @@ CSS ã® **属性セレクター**ã¨åŒæ§˜ã«ã€ãƒ•ォームオブジェクト | [attribute~="value"] | `attribute` 属性値 (複数ã®å ´åˆã¯åŠè§’スペース区切り) ã« "value" ã¨åˆè‡´ã™ã‚‹ã‚‚ã®ãŒå«ã¾ã‚Œã¦ã„るオブジェクトãŒå¯¾è±¡ã§ã™ | | [attribute|="value"] | `attribute` 属性ã®å€¤ãŒ "value" ã§å§‹ã¾ã‚‹ã‚ªãƒ–ジェクトãŒå¯¾è±¡ã§ã™ | - #### 例題 `borderStyle` (境界線スタイル) 属性をæŒã¤ã™ã¹ã¦ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»è‰²ã‚’ç´«ã«æŒ‡å®šã—ã¾ã™: - [borderStyle] - { - stroke: purple; - } - +``` +[borderStyle] +{ + stroke: purple; +} +``` テキストタイプã‹ã¤ã€ã‚¿ã‚¤ãƒˆãƒ«ãƒ—ロパティ (text属性) ã®å€¤ãŒ "Hello" ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—色をé’ã«æŒ‡å®šã—ã¾ã™: - text[text=Hello] - { - stroke: blue; - } - + +``` +text[text=Hello] +{ + stroke: blue; +} +``` タイトルプロパティ (text属性) ã®å€¤ãŒ "Hello" ã‚’å«ã‚€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æç”»è‰²ã‚’é’ã«æŒ‡å®šã—ã¾ã™: - [text~=Hello] - { - stroke: blue; - } - - +``` +[text~=Hello] +{ + stroke: blue; +} + +``` テキストタイプã‹ã¤ã€ã‚¿ã‚¤ãƒˆãƒ«ãƒ—ロパティ (text属性) ã®å€¤ãŒ "Hello" ã§å§‹ã¾ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–‡å­—è‰²ã‚’é»„è‰²ã«æŒ‡å®šã—ã¾ã™: - text[text|=Hello] - { - stroke: yellow; - } - +``` +text[text|=Hello] +{ + stroke: yellow; + + +} +``` + ## スタイルシート宣言 -多ãã®ãƒ•ォームオブジェクト属性をスタイルシートã«ã‚ˆã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ¬¡ã®å±žæ€§ã¯é™¤å¤–ã•れã¾ã™: +### メディアクエリ -- "method" -- "type" -- "class" -- "event" -- choiceList, excludedList, labels, list, requiredList (リストタイプ) +メディアクエリã¯ã€ã‚¢ãƒ—リケーションã«ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚’é©ç”¨ã™ã‚‹ã®ã«åˆ©ç”¨ã—ã¾ã™ã€‚ -フォームオブジェクトã®å±žæ€§ã¯ã€ãれら㮠JSON åを使ã£ã¦ CSS 属性ã®ã‚ˆã†ã«æŒ‡å®šã§ãã¾ã™ (オブジェクトタイプやメソッドã€ã‚¤ãƒ™ãƒ³ãƒˆã€ãƒªã‚¹ãƒˆãªã©ã®å±žæ€§ã‚’除ã)。 詳細ã«ã¤ã„ã¦ã¯ãƒ‡ã‚¶ã‚¤ãƒ³ãƒªãƒ•ァレンス㮠[ダイナミックフォーム ](https://doc.4d.com/4Dv18/4D/18/Dynamic-Forms.300-4575729.ja.html) ã‚’å‚ç…§ãã ã•ã„。 +メディアクエリã¯ã€ãƒ¡ãƒ‡ã‚£ã‚¢ç‰¹æ€§ã¨å€¤ã«ã‚ˆã£ã¦æ§‹æˆã•れã¾ã™ (例: \:\ )。 -### 属性マッピング -次ã®å±žæ€§ã«ã¤ã„ã¦ã¯ã€4D ã®åç§°ã¾ãŸã¯ CSS ã®å称を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +使用å¯èƒ½ãªãƒ¡ãƒ‡ã‚£ã‚¢ç‰¹æ€§: + +* `prefers-color-scheme` + + +使用å¯èƒ½ãªãƒ¡ãƒ‡ã‚£ã‚¢ç‰¹æ€§ã®å€¤: + +* **light**
        ライトモード +* **dark**
        ダークモード + +> カラースキーム㯠macOS ã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ + +##### 例題 + +ライトモード (デフォルト) ãŠã‚ˆã³ãƒ€ãƒ¼ã‚¯ãƒ¢ãƒ¼ãƒ‰ã«ãŠã‘ã‚‹ã€ãƒ†ã‚­ã‚¹ãƒˆã¨ãƒ†ã‚­ã‚¹ãƒˆèƒŒæ™¯ã®è‰²æŒ‡å®šã‚’ CSS ã«ã‚ˆã£ã¦ãŠã“ãªã„ã¾ã™: + +``` +@media (prefers-color-scheme: light) { + .textScheme { + fill: LightGrey; + stroke: Black; + } +} + +@media (prefers-color-scheme: dark) { + .textScheme { + fill: DarkSlateGray; + stroke: LightGrey; + } +} +``` -| 4D | CSS | -| -------------- | ---------------- | -| borderStyle | border-style | -| fill | background-color | -| fontFamily | font-family | -| fontSize | font-size | -| fontStyle | font-style | -| fontWeight | font-weight | -| stroke | color | -| textAlign | text-align | -| textDecoration | text-decoration | -| verticalAlign | vertical-align | +### オブジェクト属性 + +多ãã®ãƒ•ォームオブジェクト属性をスタイルシートã«ã‚ˆã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€æ¬¡ã®å±žæ€§ã¯é™¤å¤–ã•れã¾ã™: + - `method` + - `type` + - `class` + - `event` + - `choiceList`, `excludedList`, `labels`, `list`, `requiredList` (リストタイプ) + +フォームオブジェクトã®å±žæ€§ã¯ã€ãれら㮠[JSONå](FormObjects/properties_Reference.md)を使ã£ã¦ CSS 属性ã®ã‚ˆã†ã«æŒ‡å®šã§ãã¾ã™ (オブジェクトタイプやメソッドã€ã‚¤ãƒ™ãƒ³ãƒˆã€ãƒªã‚¹ãƒˆãªã©ã®å±žæ€§ã‚’除ã)。 + +#### 属性マッピング + +次ã®å±žæ€§ã«ã¤ã„ã¦ã¯ã€4D ã®åç§°ã¾ãŸã¯ CSS ã®å称を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +| 4D | CSS | +| ---------------- | ------------------ | +| `borderStyle` | `border-style` | +| `fill` | `background-color` | +| `fontFamily` | `font-family` | +| `fontSize` | `font-size` | +| `fontStyle` | `font-style` | +| `fontWeight` | `font-weight` | +| `stroke` | `color` | +| `textAlign` | `text-align` | +| `textDecoration` | `text-decoration` | +| `verticalAlign` | `vertical-align` | +> CSS ã®å±žæ€§åを使用ã™ã‚‹å ´åˆã€4D ã«ç‰¹æœ‰ã®å€¤ (*例* `sunken` (ãã¼ã¿)) ã¯ã‚µãƒãƒ¼ãƒˆã•れã¾ã›ã‚“。 -> CSS ã®å±žæ€§åを使用ã™ã‚‹å ´åˆã€4D ã«ç‰¹æœ‰ã®å€¤ (*例* "sunken" (ãã¼ã¿)) ã¯ã‚µãƒãƒ¼ãƒˆã•れã¾ã›ã‚“。 -### 特殊ãªå±žæ€§å€¤ +#### 特殊ãªå±žæ€§å€¤ - `icon`, `picture`, ãŠã‚ˆã³ `customBackgroundPicture` ã®ã‚ˆã†ã«ã€å€¤ã¨ã—ã¦ç”»åƒã®ãƒ‘スをå—ã‘付ã‘る属性ã®å ´åˆã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: - icon: url("/RESOURCES/Images/Buttons/edit.png"); /* 絶対パス */ - icon: url("edit.png"); /* フォームファイルを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘ス */ - +``` +icon: url("/RESOURCES/Images/Buttons/edit.png"); /* 絶対パス */ +icon: url("edit.png"); /* フォームファイルを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘ス */ +``` - `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` ãŠã‚ˆã³ `verticalLineStroke` ã®å±žæ€§ã¯ 3種類ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’å—ã‘付ã‘ã¾ã™: - - - css カラーãƒãƒ¼ãƒ : `fill: red;` + + - CSS カラーãƒãƒ¼ãƒ : `fill: red;` - 16進数カラーコード: `fill: #FF0000;` - `rgb()` 関数: `fill:rgb(255,0,0)` + - CSS ã§ã¯ç¦ã˜ã‚‰ã‚Œã¦ã„る文字を使用ã—ã¦ã„る文字列ã«ã¤ã„ã¦ã¯ã€ãã®æ–‡å­—列をå˜ä¸€å¼•用符ã¾ãŸã¯äºŒé‡å¼•用符ã§ããã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: - - xliff å‚ç…§ã®å ´åˆ: `tooltip: ":xliff:CommonMenuFile";` - データソースãŒãƒ•ィールドå¼ã®å ´åˆ: `dataSource: "[Table_1:1]ID:1";` + ## å„ªå…ˆé †ä½ 4D プロジェクト内ã§ã‚¹ã‚¿ã‚¤ãƒ«ãŒç«¶åˆã™ã‚‹å ´åˆã«ã¯ã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚ˆã‚Šã‚‚フォームã®å®šç¾©ãŒå„ªå…ˆã•れã¾ã™ã€‚ + ### JSON vs スタイルシート フォーム㮠JSONå¼è¨˜è¿°ã¨ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã®ä¸¡æ–¹ã«ãŠã„ã¦å±žæ€§ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€4D 㯠JSON ファイルã®å€¤ã‚’採用ã—ã¾ã™ã€‚ @@ -234,7 +297,6 @@ CSS ã® **属性セレクター**ã¨åŒæ§˜ã«ã€ãƒ•ォームオブジェクト | ------------------- | ------------- | ---------- | | `"text": "Button",` | `text: Edit;` | `"Button"` | - **例 2:** | JSON å¼è¨˜è¿° | スタイルシート | 4D ã®è¡¨ç¤º | @@ -242,38 +304,42 @@ CSS ã® **属性セレクター**ã¨åŒæ§˜ã«ã€ãƒ•ォームオブジェクト | `"text": "Button",` | `text: Edit !important;` | `"Edit"` | + + ### 複数スタイルシート ランタイムã«ãŠã„ã¦è¤‡æ•°ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãれらã®å„ªå…ˆé †ä½ã¯æ¬¡ã®ã‚ˆã†ã«æ±ºã¾ã‚Šã¾ã™: -1. 4D フォームã¯ã¾ãšãƒ‡ãƒ•ォルト㮠CSS ファイル `/SOURCES/styleSheets.css` を読ã¿è¾¼ã¿ã¾ã™ã€‚ -2. 次ã«ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ラットフォーム専用㮠CSS ファイル `/SOURCES/styleSheets_mac.css` ã¾ãŸã¯ `/SOURCES/styleSheets_windows.css` ãŒãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ -3. ãã®å¾Œã€JSON フォーム内㫠CSS ファイルãŒå®šç¾©ã•れã¦ã„れã°ã€ãれを読ã¿è¾¼ã¿ã¾ã™: - -* 両プラットフォーム用ã®ãƒ•ァイル: - - - "css": "" - - -* ã¾ãŸã¯ã€ä¸¡ãƒ—ラットフォーム用ã«è¤‡æ•°ã®ãƒ•ァイル: - - - "css": [ - "", - "" - ], - -* ã¾ãŸã¯ã€ãƒ—ラットフォームã”ã¨ã®ãƒ•ァイルリスト: - - - "css": [ - {"path": "", "media": "mac"}, - {"path": "", "media": "windows"}, - ], - - -> ファイルパスã¯ç›¸å¯¾ãƒ‘スã¨çµ¶å¯¾ãƒ‘スãŒä½¿ãˆã¾ã™ã€‚ * 相対パスã®åŸºæº–㯠JSON フォームファイルã§ã™ã€‚ * セキュリティã®ãŸã‚ã€çµ¶å¯¾ãƒ‘スã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹ã®ã¯ãƒ•ァイルシステムパスã«é™ã‚‰ã‚Œã¾ã™ã€‚ (*例*: "/RESOURCES", "/DATA") +1. 4D フォームã¯ã¾ãšãƒ‡ãƒ•ォルト㮠CSS ファイル `/SOURCES/styleSheets.css` を読ã¿è¾¼ã¿ã¾ã™ã€‚ +2. 次ã«ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ラットフォーム専用㮠CSS ファイル `/SOURCES/styleSheets_mac.css` ã¾ãŸã¯ `/SOURCES/styleSheets_windows.css` ãŒãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ +3. ãã®å¾Œã€JSON フォーム内㫠CSS ファイルãŒå®šç¾©ã•れã¦ã„れã°ã€ãれを読ã¿è¾¼ã¿ã¾ã™: + + * 両プラットフォーム用ã®ãƒ•ァイル: + + ``` + "css": "" + ``` + + * ã¾ãŸã¯ã€ä¸¡ãƒ—ラットフォーム用ã«è¤‡æ•°ã®ãƒ•ァイル: + + ``` + "css": [ + "", + "" + ], + ``` + + * ã¾ãŸã¯ã€ãƒ—ラットフォームã”ã¨ã®ãƒ•ァイルリスト: + + ``` + "css": [ + {"path": "", "media": "mac"}, + {"path": "", "media": "windows"}, + ], + ``` + +> ファイルパスã¯ç›¸å¯¾ãƒ‘スã¨çµ¶å¯¾ãƒ‘スãŒä½¿ãˆã¾ã™ã€‚ * 相対パスã®åŸºæº–㯠JSON フォームファイルã§ã™ã€‚ * セキュリティã®ãŸã‚ã€çµ¶å¯¾ãƒ‘スã¨ã—ã¦ä½¿ç”¨ã§ãã‚‹ã®ã¯ãƒ•ァイルシステムパスã«é™ã‚‰ã‚Œã¾ã™ã€‚ (*例*: "/RESOURCES", "/DATA") + ## スタイルシートã®ä½œæˆã¨ç·¨é›† @@ -281,10 +347,10 @@ CSS ã® **属性セレクター**ã¨åŒæ§˜ã«ã€ãƒ•ォームオブジェクト 4D ã®ãƒ„ールボックス㮠**スタイル** ページã§ã¯ã€ãƒ—ラットフォーム専用ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’作æˆãƒ»ç·¨é›†ã™ã‚‹ãŸã‚ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãŒæä¾›ã•れã¦ã„ã¾ã™ã€‚ -1. デザインメニューã‹ã‚‰ **ツールボックス > スタイルシート** ã‚’é¸æŠžã™ã‚‹ã‹ã€ãƒ„ールãƒãƒ¼ã® **ツールボックス** アイコンをクリックã—㦠**スタイル** ページを開ãã¾ã™ã€‚ - +1. デザインメニューã‹ã‚‰ **ツールボックス > スタイルシート** ã‚’é¸æŠžã™ã‚‹ã‹ã€ãƒ„ールãƒãƒ¼ã® **ツールボックス** アイコンをクリックã—㦠**スタイル** ページを開ãã¾ã™ã€‚ + ![](assets/en/FormEditor/stylesheets.png) -2. 作æˆã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’é¸æŠžã—ã€**作æˆ** ボタン (ã¾ãŸã¯ **編集** ボタン) をクリックã—ã¾ã™: ![](assets/en/FormEditor/createButton.png) +2. 作æˆã™ã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã‚’é¸æŠžã—ã€**作æˆ** ボタン (ã¾ãŸã¯ **編集** ボタン) をクリックã—ã¾ã™: ![](assets/en/FormEditor/createButton.png) -3. 既定ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆãŒé–‹ã‹ã‚Œã¾ã™ã€‚ \ No newline at end of file +3. 既定ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆãŒé–‹ã‹ã‚Œã¾ã™ã€‚ diff --git a/website/translated_docs/ja/FormEditor/formEditor.md b/website/translated_docs/ja/FormEditor/formEditor.md new file mode 100644 index 00000000000000..c7c39974c4880d --- /dev/null +++ b/website/translated_docs/ja/FormEditor/formEditor.md @@ -0,0 +1,778 @@ +--- +id: formEditor +title: フォームエディター +--- + +4D ãŒæä¾›ã™ã‚‹ãƒ•ォームエディターを使用ã—ã¦ã€å¿…è¦ã¨ã•れる機能ã«é”ã™ã‚‹ã¾ã§ãƒ•ォームを完全ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ãã¾ã™ã€‚ フォームエディターã§ã¯ã€ã‚ªãƒ–ジェクトã®ä½œæˆã‚„å‰Šé™¤ã€æ“作ã€ãƒ•ォームやオブジェクトã®ãƒ—ロパティã®è¨­å®šãŒãŠã“ãªãˆã¾ã™ã€‚ + + +## インターフェース + +フォームエディターã¯å„JSONフォームを個別ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«è¡¨ç¤ºã—ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã”ã¨ã«ã‚ªãƒ–ジェクトãƒãƒ¼ã¨ãƒ„ールãƒãƒ¼ãŒã‚りã¾ã™ã€‚ 複数ã®ãƒ•ã‚©ãƒ¼ãƒ ã‚’åŒæ™‚ã«é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 表示オプション + +フォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã®å¤§éƒ¨åˆ†ã®ã‚¤ãƒ³ã‚¿ãƒ•ェースè¦ç´ ã¯ã€è¡¨ç¤ºã—ãŸã‚Šéžè¡¨ç¤ºã«ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- **継承ã•れãŸãƒ•ォーム**: 継承ã•れãŸãƒ•ォームオブジェクト ([継承ã•れãŸãƒ•ォーム](forms.md#継承フォーム) ãŒå­˜åœ¨ã™ã‚‹å ´åˆ) +- **ページ0**: [ページ0](forms.md#フォームã®ãƒšãƒ¼ã‚¸) ã®ã‚ªãƒ–ジェクト。 ã“ã®ã‚ªãƒ—ションã§ã€ãƒ•ォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã®ã‚ªãƒ–ジェクトã¨ãƒšãƒ¼ã‚¸0 ã®ã‚ªãƒ–ジェクトを区別ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **用紙**: å°åˆ·ãƒšãƒ¼ã‚¸ã®ç”¨ç´™å¢ƒç•Œã‚’示ã™ç°è‰²ã®ç·šã€‚ ã“ã®è¦ç´ ã¯ã€[å°åˆ·ç”¨](properties_FormProperties.md#フォームタイプ) タイプã®ãƒ•ォームã§ã®ã¿ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã§ãã¾ã™ã€‚ +- **ルーラー**: フォームエディターウィンドウã®ãƒ«ãƒ¼ãƒ©ãƒ¼ã€‚ +- **マーカー**: フォームã®ã‚¨ãƒªã‚¢ã‚’識別ã™ã‚‹å‡ºåŠ›ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ©ã‚¤ãƒ³ã¨ãƒžãƒ¼ã‚«ãƒ¼ã€‚ ã“ã®è¦ç´ ã¯ã€[リストフォーム](properties_FormProperties.md#フォームタイプ) タイプã®ãƒ•ォームã§ã®ã¿ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã§ãã¾ã™ã€‚ +- **マーカーラベル**: マーカーラベル。ã“れã¯å‡ºåŠ›ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ©ã‚¤ãƒ³ãŒè¡¨ç¤ºã•れã¦ã„ã‚‹å ´åˆã®ã¿æœ‰åйã§ã™ã€‚ ã“ã®è¦ç´ ã¯ã€[リストフォーム](properties_FormProperties.md#フォームタイプ) タイプã®ãƒ•ォームã§ã®ã¿ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã§ãã¾ã™ã€‚ +- **境界**: フォームã®å¢ƒç•Œã€‚ ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¢ãƒ—リケーションモードã§è¡¨ç¤ºã•れるã¨ãŠã‚Šã«ã€ãƒ•ォームãŒãƒ•ォームエディターã«è¡¨ç¤ºã•れã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã‚¢ãƒ—リケーションモードã«ç§»å‹•ã—ãªãã¦ã‚‚フォームを調整ã—ã‚„ã™ããªã‚Šã¾ã™ã€‚ +> [**サイズを決ã‚ã‚‹ã‚‚ã®**](properties_FormSize.md#サイズを決ã‚ã‚‹ã‚‚ã®), [**æ°´å¹³ マージン**](properties_FormSize.md#水平マージン) ãã—㦠[**垂直 マージン**](properties_FormSize.md#垂直マージン) フォームプロパティ設定ã¯ãƒ•ォーム境界ã«å½±éŸ¿ã—ã¾ã™ã€‚ ã“れらã®è¨­å®šã‚’使用ã™ã‚‹ã¨ã€ãƒ•ォーム上ã®ã‚ªãƒ–ジェクトã«åŸºã¥ã„ã¦å¢ƒç•Œã‚’設定ã§ãã¾ã™ã€‚ フォームã®å¢ƒç•Œã‚’決定ã™ã‚‹ä½ç½®ã«ã‚ªãƒ–ジェクトをé…ç½®ã—ãŸã‚Šã€ã‚µã‚¤ã‚ºã‚’変更ã—ãŸã‚Šã™ã‚‹ã¨ã€å¢ƒç•Œã‚‚変更ã•れã¾ã™ã€‚ + +#### デフォルト表示 + +エディターã§ãƒ•ォームを開ã„ãŸã¨ãã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースè¦ç´ ã¯ã€ä»¥ä¸‹ã«å¿œã˜ã¦ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã¾ãŸã¯éžè¡¨ç¤ºã«ãªã‚Šã¾ã™: + +- 環境設定ã§è¨­å®šã•れ㟠**新フォームã«ãƒ‡ãƒ•ォルトã§è¡¨ç¤º** オプション - ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„オプションã¯ãƒ‡ãƒ•ォルトã§ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 +- カレント㮠[フォームタイプ](properties_FormProperties.md#フォームタイプ): + - リストフォームã§ã¯ã€ãƒžãƒ¼ã‚«ãƒ¼ã¨ãƒžãƒ¼ã‚«ãƒ¼ãƒ©ãƒ™ãƒ«ã¯ãƒ‡ãƒ•ォルトã§å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + - 用紙㯠"å°åˆ·ç”¨" ã®ãƒ•ォームã®å ´åˆã€ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã•れã¾ã™ã€‚ + +#### è¦ç´ ã®è¡¨ç¤º/éžè¡¨ç¤º + +**フォーム** メニューã¾ãŸã¯ãƒ•ォームエディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **表示** ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒ•ォームエディターã®ã‚«ãƒ¬ãƒ³ãƒˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã§ã„ã¤ã§ã‚‚è¦ç´ ã®è¡¨ç¤º/éžè¡¨ç¤ºã‚’切り替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/FormEditor/showHideElements.png) + + +### ルーラー + +å³ã¨ä¸‹ã«ã‚るルーラーãŒã€ã‚ªãƒ–ジェクトã®é…置を手助ã‘ã—ã¾ã™ã€‚ ã“れらã¯ã€[表示ã¾ãŸã¯éžè¡¨ç¤º](#表示オプション) ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +**フォーム** メニュー㮠**ルーラー定義...** ã‚’é¸æŠžã™ã‚‹ã¨ã€å˜ä½ã‚’変更ã—ã¦ã€ã‚¤ãƒ³ãƒã€ã‚»ãƒ³ãƒã€ãƒ”クセルã®ã„ãšã‚Œã‹ã§è¡¨ç¤ºã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### ツールãƒãƒ¼ + +フォームエディターã®ãƒ„ールãƒãƒ¼ã¯ãƒ•ォームをæ“作・更新ã™ã‚‹ãŸã‚ã®ä¸€é€£ã®ãƒ„ールをæä¾›ã—ã¾ã™ã€‚ ウィンドウã”ã¨ã«å›ºæœ‰ã®ãƒ„ールãƒãƒ¼ã‚’æŒã¡ã¾ã™ã€‚ + +![](assets/en/FormEditor/toolbar.png) + +ツールãƒãƒ¼ã«ã¯ä»¥ä¸‹ã®è¦ç´ ãŒã‚りã¾ã™: + +| アイコン | åç§° | 説明 | +| --------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/execute.png) | フォーム実行 | フォームã®å®Ÿè¡Œã‚’テストã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D ã¯æ–°ã—ã„ウィンドウを開ãã€ãã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ãƒ•ォームを表示ã—ã¾ã™ (リストフォームã®å ´åˆãƒ¬ã‚³ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã€è©³ç´°ãƒ•ォームã®å ´åˆã‚«ãƒ¬ãƒ³ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰)。 フォームã¯ãƒ¡ã‚¤ãƒ³ãƒ—ロセスã§å®Ÿè¡Œã•れã¾ã™ã€‚ | +| ![](assets/en/FormEditor/selection.png) | [é¸æŠžãƒ„ãƒ¼ãƒ«](#オブジェクトã®é¸æŠž) | フォームオブジェクトã®é¸æŠžãƒ»ç§»å‹•・リサイズをãŠã“ãªã„ã¾ã™ã€‚

        **注**: テキストやグループボックスタイプã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€**Enter**キーを押ã™ã“ã¨ã§ç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«ãªã‚Šã¾ã™ã€‚ | +| ![](assets/en/FormEditor/zOrder.png) | [入力順](#データã®å…¥åЛ順) | "入力順" モードã«åˆ‡ã‚Šæ›¿ã‚りã€ãƒ•ォームã®ç¾åœ¨ã®å…¥åŠ›é †ã‚’è¡¨ç¤ºãƒ»å¤‰æ›´ã§ãã¾ã™ã€‚ 入力順ã¯ã€ãƒãƒƒã‚¸ã‚’使用ã—ã¦ç¢ºèªã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ | +| ![](assets/en/FormEditor/moving.png) | [移動](#オブジェクトã®ç§»å‹•) | "移動" モードã«ç§»è¡Œã—ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸­ã‚’ドラッグ&ドロップã™ã‚‹ã“ã¨ã§ç´ æ—©ãフォームã®è¡¨ç¤ºéƒ¨åˆ†ã‚’移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã‚«ãƒ¼ã‚½ãƒ«ã¯æ‰‹ã®å½¢ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯ã€ãƒ•ォームを拡大表示ã—ã¦ã„る時ã«ç‰¹ã«ä¾¿åˆ©ã§ã™ã€‚ | +| ![](assets/en/FormEditor/zoom.png) | [拡大](#拡大) | ãƒ•ã‚©ãƒ¼ãƒ è¡¨ç¤ºã®æ‹¡å¤§/縮å°çŽ‡ã‚’å¤‰æ›´ã§ãã¾ã™ (デフォルトã§100%)。 "拡大/縮å°" モードã«ã™ã‚‹ã«ã¯è™«çœ¼é¡ã‚’クリックã™ã‚‹ã‹ã€æ‹¡å¤§/縮å°çއãƒãƒ¼ã‚’クリックã—ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯å‰ç¯€ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/alignment.png) | [整列](#ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—) | ã“ã®ãƒœã‚¿ãƒ³ã«ã¯ã€ãƒ•ォーム中ã§ã‚ªãƒ–ジェクトã®ä¸¦ã³ã‚’æƒãˆã‚‹ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒãƒªãƒ³ã‚¯ã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã¯é¸æŠžã•れã¦ã„るオブジェクトã«å¿œã˜ã¦æœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚

        CSS プレビュー㌠"ãªã—" ã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ | +| ![](assets/en/FormEditor/distribution.png) | [å‡ç­‰é…ç½®](#オブジェクトã®å‡ç­‰é…ç½®) | ã“ã®ãƒœã‚¿ãƒ³ã«ã¯ã€ãƒ•ォーム中ã§ã‚ªãƒ–ジェクトをå‡ç­‰ã«é…ç½®ã™ã‚‹ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒãƒªãƒ³ã‚¯ã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã¯é¸æŠžã•れã¦ã„るオブジェクトã«å¿œã˜ã¦æœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚

        CSS プレビュー㌠"ãªã—" ã®å ´åˆã«ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ | +| ![](assets/en/FormEditor/level.png) | [レベル](#オブジェクトをé‡ã­ã‚‹) | ã“ã®ãƒœã‚¿ãƒ³ã«ã¯ã€ãƒ•ォーム上ã®ã‚ªãƒ–ジェクトã®éšŽå±¤ã‚’変更ã™ã‚‹ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã¯é¸æŠžã•れã¦ã„るオブジェクトã«å¿œã˜ã¦æœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚ | +| ![](assets/en/FormEditor/group.png) | [グループ化/グループ解除](#オブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—化) | ã“ã®ãƒœã‚¿ãƒ³ã«ã¯ã€ãƒ•ォーム上ã®é¸æŠžã‚ªãƒ–ジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—化やグループ解除をãŠã“ãªã†ãŸã‚ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã¯é¸æŠžã•れã¦ã„るオブジェクトã«å¿œã˜ã¦æœ‰åй/無効ã«ãªã‚Šã¾ã™ã€‚ | +| ![](assets/en/FormEditor/displyAndPage.png) | [表示ã¨ãƒšãƒ¼ã‚¸ç®¡ç†](forms.html#フォームã®ãƒšãƒ¼ã‚¸) | ã“ã®ã‚¨ãƒªã‚¢ã‚’使用ã—ã¦ã€ãƒ•ォームページ間ã®ç§»å‹•やページã®è¿½åŠ ãŒã§ãã¾ã™ã€‚ フォームページを移動ã™ã‚‹ã«ã¯çŸ¢å°ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€ã¾ãŸã¯ä¸­å¤®ã®ã‚¨ãƒªã‚¢ã‚’クリックã™ã‚‹ã¨ç¾ã‚れるメニューã‹ã‚‰è¡¨ç¤ºã—ãŸã„ãƒšãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚ 最終ページãŒè¡¨ç¤ºã•れã¦ã„る状態ã§ã€å³çŸ¢å°ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€4D ã¯ãƒšãƒ¼ã‚¸ã‚’追加ã—ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/cssPreviewicon.png) | [CSSプレビュー](#cssプレビュー) | ã“ã®ãƒœã‚¿ãƒ³ã§ã€ä½¿ç”¨ã™ã‚‹ CSSãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/views.png) | [ビュー管ç†](#オブジェクトビュー) | ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ãƒ“ューパレットã®è¡¨ç¤ºã‚„éžè¡¨ç¤ºã‚’ãŠã“ãªã„ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã¤ã„ã¦ã¯ "オブジェクトビューを使用ã™ã‚‹" ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/shields2.png) | [ãƒãƒƒã‚¸è¡¨ç¤º](#ãƒãƒƒã‚¸) | ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ãŸã³ã«ã€ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ—ã®ãƒ•ォームãƒãƒƒã‚¸ãŒé †ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ã¾ãŸã€ã“ã®ãƒœã‚¿ãƒ³ã«ã¯ã€è¡¨ç¤ºã™ã‚‹ãƒãƒƒã‚¸ã‚¿ã‚¤ãƒ—ã‚’ç›´æŽ¥é¸æŠžã§ãるメニューãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/library.png) | [定義済ã¿ã‚ªãƒ–ジェクトライブラリ](objectLibrary.html) | ã“ã®ãƒœã‚¿ãƒ³ã¯å®šç¾©æ¸ˆã¿ã‚ªãƒ–ジェクトライブラリを表示ã—ã¾ã™ã€‚ã“ã®ãƒ©ã‚¤ãƒ–ラリã¯å®šç¾©æ¸ˆã¿ã®ãƒ—ロパティをæŒã¤ã‚ªãƒ–ジェクトを多数æä¾›ã—ã¾ã™ã€‚ | +| ![](assets/en/FormEditor/listBoxBuilder1.png) | [リストボックスビルダー](#リストボックスビルダー) | ã“ã®ãƒœã‚¿ãƒ³ã¯ã€æ–°ã—ã„エンティティセレクション型リストボックスを作æˆã—ã¾ã™ã€‚ | + +### オブジェクトãƒãƒ¼ã‚’使用ã™ã‚‹ + +オブジェクトãƒãƒ¼ã«ã¯ã€4Dフォーム上ã§ä½¿ç”¨ã§ãるアクティブオブジェクトやéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトãŒã™ã¹ã¦å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ 一部ã®ã‚ªãƒ–ジェクトã¯ã€ãƒ†ãƒ¼ãƒžåˆ¥ã«ã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ å„テーマã§ã¯ã€è¤‡æ•°ã®é …ç›®ã®ãªã‹ã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトãƒãƒ¼ã«ãƒ•ォーカスãŒã‚ã‚‹å ´åˆã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã®ã‚­ãƒ¼ã‚’使用ã—ã¦ãƒœã‚¿ãƒ³ã‚’é¸æŠžã§ãã¾ã™ã€‚ 以下ã®è¡¨ã§åˆ©ç”¨å¯èƒ½ãªã‚ªãƒ–ジェクトグループã¨ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’示ã—ã¾ã™ã€‚ + +| ボタン | グループ | キー | +| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:--:| +| ![](assets/en/FormEditor/text.png) | [テキスト](FormObjects/text.md) / [グループボックス](FormObjects/groupBox.md) | T | +| ![](assets/en/FormEditor/input.png) | [入力](FormObjects/input_overview.md) | F | +| ![](assets/en/FormEditor/listbox.png) | [階層リスト](FormObjects/list_overview.md) / [リストボックス](FormObjects/listbox_overview.md) | L | +| ![](assets/en/FormEditor/combo.png) | [コンボボックス](FormObjects/comboBox_overview.md) / [ドロップダウンリスト](FormObjects/dropdownList_Overview.md) / [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) | P | +| ![](assets/en/FormEditor/button.png) | [ボタン](FormObjects/button_overview.md) / [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md) / [ボタングリッド](FormObjects/buttonGrid_overview.md) | B | +| ![](assets/en/FormEditor/radio.png) | [ラジオボタン](FormObjects/radio_overview.md) | R | +| ![](assets/en/FormEditor/checkbox.png) | [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) | C | +| ![](assets/en/FormEditor/indicator.png) | [進æ—インジケーター](FormObjects/progressIndicator.md) / [ルーラー](FormObjects/ruler.md) / [ステッパー](FormObjects/stepper.md) / [スピナー](FormObjects/spinner.md) | I | +| ![](assets/en/FormEditor/rectangle.png) | [四角](FormObjects/shapesOverview.html#四角) / [ç·š](FormObjects/shapesOverview.html#ç·š) / [楕円](FormObjects/shapesOverview.html#楕円) | S | +| ![](assets/en/FormEditor/splitter.png) | [スプリッター](FormObjects/splitters.md) / [タブコントロール](FormObjects/tabControl.md) | D | +| ![](assets/en/FormEditor/plugin.png) | [プラグインエリア](FormObjects/pluginArea_overview.md) / [サブフォーム](FormObjects/subform_overview.md) / [Webエリア](FormObjects/webArea_overview.md) / [4D Write Pro](FormObjects/writeProArea_overview.md) / [4D View Pro](FormObjects/viewProArea_overview.md) | â—‹ | + +ä»»æ„ã®ã‚ªãƒ–ジェクトタイプをæç”»ã™ã‚‹ã«ã¯ã€è©²å½“ã™ã‚‹ãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¦ã‹ã‚‰ã€ãƒ•ォーム上ã§ãã®ã‚ªãƒ–ジェクトをæãã¾ã™ã€‚ オブジェクトを作æˆã—ãŸå¾Œã§ã‚‚ã€ãƒ—ロパティリストを用ã„ã¦ã‚ªãƒ–ジェクトã®ã‚¿ã‚¤ãƒ—を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 強制的ã«ã‚ªãƒ–ジェクトをè¦å‰‡æ­£ã—ã„å½¢ã§æç”»ã™ã‚‹ã«ã¯ã€**Shift**キーを押ã—ãªãŒã‚‰ã‚ªãƒ–ジェクトを作æˆã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ç·šã¯æ°´å¹³æ–¹å‘ã€45度ã€ã¾ãŸã¯åž‚ç›´æ–¹å‘ã«å¼•ã‹ã‚Œã¾ã™ã€‚ã¾ãŸã€å››è§’ã¯æ­£æ–¹å½¢ã«ã€æ¥•å††ã¯æ­£å††ã«å›ºå®šã•れã¾ã™ã€‚ + +ãã®ãƒ†ãƒ¼ãƒžã§ç¾åœ¨é¸æŠžã•れã¦ã„るオブジェクトãŒãƒ•ã‚©ãƒ¼ãƒ ã«æŒ¿å…¥ã•れã¾ã™ã€‚ ボタンã®å³å´ã‚’クリックã™ã‚‹ã¨ã€ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/FormEditor/objectBar.png) + +ボタンを 2回クリックã™ã‚‹ã¨ã€ãƒ•ォーム上ã«ã‚ªãƒ–ジェクトをæç”»ã—ãŸå¾Œã‚‚ã€ãã®ãƒœã‚¿ãƒ³ãŒé¸æŠžã•れãŸã¾ã¾ã«ãªã‚Šã¾ã™ (é€£ç¶šé¸æŠž)。 ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€åŒã˜ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトを複数連続ã—ã¦ä½œæˆã—ã‚„ã™ããªã‚Šã¾ã™ã€‚ é€£ç¶šé¸æŠžã‚’è§£é™¤ã—ãŸã„å ´åˆã¯ã€åˆ¥ã®ã‚ªãƒ–ジェクトやツールをクリックã—ã¾ã™ã€‚ + +### プロパティリスト + +フォームãŠã‚ˆã³ãƒ•ォームオブジェクトã¯ãƒ—ロパティをæŒã¡ã€ãƒ•ォームã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚„フォームã®å¤–観ã€ãŠã‚ˆã³ãƒ•ォーム使用時ã®å‹•作ãŒåˆ¶å¾¡ã•れã¾ã™ã€‚ フォームプロパティã«ã¯ã€ãŸã¨ãˆã°ãƒ•ォームåã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã€ãƒ•ォームサイズãªã©ãŒã‚りã¾ã™ã€‚ ã¾ãŸã‚ªãƒ–ジェクトプロパティã«ã¯ã€ãŸã¨ãˆã°ã‚ªãƒ–ジェクトåã€ã‚ªãƒ–ジェクトサイズã€èƒŒæ™¯è‰²ã€ãƒ•ォントãªã©ãŒã‚りã¾ã™ã€‚ + +プロパティリストを使用ã—ã¦ã€ãƒ•ォームãŠã‚ˆã³ã‚ªãƒ–ジェクトプロパティを表示・変更ã§ãã¾ã™ã€‚ エディター上ã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆé¸æŠžã—ã¦ã„れã°ãã®ãƒ—ロパティãŒã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¦ã„ãªã„å ´åˆã¯ãƒ•ォームã®ãƒ—ロパティãŒãƒ—ロパティリストã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +プロパティリストを表示/éžè¡¨ç¤ºã«ã™ã‚‹ã«ã¯ã€**フォーム** メニューã€ã¾ãŸã¯ãƒ•ォームエディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **プロパティリスト** ã‚’é¸æŠžã—ã¾ã™ã€‚ ã•らã«ã€ãƒ•ォームã®ç©ºã®ã‚¨ãƒªã‚¢ã‚’ダブルクリックã™ã‚‹ã“ã¨ã§ã‚‚表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### ナビゲーションショートカット + +次ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’使用ã—ã€ãƒ—ロパティリスト内を移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* **矢å°ã‚­ãƒ¼** ↑ ↓: ã‚るセルã‹ã‚‰åˆ¥ã®ã‚»ãƒ«ã¸ç§»å‹•ã—ã¾ã™ã€‚ +* **矢å°ã‚­ãƒ¼** ↠→: テーマを展開/縮å°ã™ã‚‹ã‹ã€å…¥åŠ›ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã‚Šã¾ã™ã€‚ +* **PgUp** 㨠**PgDn**: プロパティリスト内をスクロールã—ã¾ã™ã€‚ +* **Home** 㨠**End**: ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãƒªã‚¹ãƒˆã®æœ€åˆã¾ãŸã¯æœ€å¾Œã®ã‚»ãƒ«ã‚’表示ã™ã‚‹ã‚ˆã†ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã¾ã™ã€‚ +* イベント上㧠**Ctrl+クリック** (Windows) ã¾ãŸã¯ **Command+クリック** (macOS) : クリックã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã®æœ€åˆã®çŠ¶æ…‹ã«å¿œã˜ã¦ã€ãƒªã‚¹ãƒˆã®å„ã‚¤ãƒ™ãƒ³ãƒˆã‚’é¸æŠž/é¸æŠžè§£é™¤ã—ã¾ã™ã€‚ +* テーマレベル上㧠**Ctrl+クリック** (Windows) ã¾ãŸã¯ **Command+クリック** (macOS) : リストã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒžã‚’展開/縮å°ã—ã¾ã™ã€‚ + + + +## ãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ“作 + +### オブジェクトã®è¿½åŠ  + +フォームã«ã‚ªãƒ–ジェクトを追加ã™ã‚‹æ–¹æ³•ã¯è¤‡æ•°ã‚りã¾ã™: + +* オブジェクトãƒãƒ¼ã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã—ã€ãƒ•ォームエディター上ã§ç›´æŽ¥ãれをæç”»ã™ã‚‹ ([オブジェクトãƒãƒ¼ã‚’使用ã™ã‚‹](#オブジェクトãƒãƒ¼ã‚’使用ã™ã‚‹) å‚ç…§)。 +* オブジェクトãƒãƒ¼ã‹ã‚‰ã‚ªãƒ–ジェクトをドラッグ&ドロップã™ã‚‹ã€‚ +* 定義済㿠[オブジェクトライブラリ](objectLibrary.md) ã‹ã‚‰é¸æŠžã—ãŸã‚ªãƒ–ジェクトをドラッグ&ドロップã‚ã‚‹ã„ã¯ã‚³ãƒ”ー/ペーストã™ã‚‹ã€‚ +* ä»–ã®ãƒ•ォームã‹ã‚‰ã‚ªãƒ–ジェクトをドラッグ&ドロップã™ã‚‹ã€‚ +* エクスプローラー (フィールド) やデザインモードã®ä»–ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ (リストやピクãƒãƒ£ãƒ¼ç­‰) ã‹ã‚‰ã‚ªãƒ–ジェクトをドラッグ&ドロップã™ã‚‹ã€‚ + +オブジェクトをフォームã«é…ç½®ã—ãŸã‚‰ã€ãƒ•ォームエディターを使用ã—ã¦ãã®ã‚ªãƒ–ジェクトã®ãƒ—ロパティを編集ã§ãã¾ã™ã€‚ + +フォームã§ã¯ 2ã¤ã®ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトを扱ã„ã¾ã™: + +* **スタティックオブジェクト** (ç·šã€æž ã€èƒŒæ™¯ãƒ”クãƒãƒ£ãƒ¼ç­‰): ã“れらã¯ä¸€èˆ¬çš„ã«ã€ãƒ•ォームã®ã‚¢ãƒ”アランスやラベルã€ã‚°ãƒ©ãƒ•ィックインターフェースを設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ã“れらã¯ãƒ•ォームエディターã®ã‚ªãƒ–ジェクトãƒãƒ¼ã‹ã‚‰åˆ©ç”¨ã§ãã¾ã™ã€‚ プロパティリストを使用ã—ã¦ã€ã“れらã®ã‚°ãƒ©ãƒ•ィック属性 (サイズã€ã‚«ãƒ©ãƒ¼ã€ãƒ•ォント等) やリサイズオプションも指定ã§ãã¾ã™ã€‚ アクティブオブジェクトã¨ç•°ãªã‚Šã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクトã«ã¯å¤‰æ•°ã‚„å¼ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã›ã‚“。 ã—ã‹ã—ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクトã«ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ã‚ªãƒ–ジェクトを挿入ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ + +* アクティブオブジェクト: ã“ã®ç¨®ã®ã‚ªãƒ–ジェクトã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース中ã§ã‚¿ã‚¹ã‚¯ã‚„機能を実行ã—ã¾ã™ã€‚フィールドã€ãƒœã‚¿ãƒ³ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãªã©æ§˜ã€…ãªç¨®é¡žãŒã‚りã¾ã™ã€‚ å„アクティブオブジェクトã«ã¯ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ + +### オブジェクトã®é¸æŠž + +ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ“作 (線幅やフォントã®å¤‰æ›´ãªã©) ã‚’ãŠã“ãªã†å‰ã«ã€å¯¾è±¡ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ツールãƒãƒ¼ã‚’使用ã—ã¦ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã«ã¯: + +1. ツールãƒãƒ¼ã®çŸ¢å°ãƒ„ールをクリックã—ã¾ã™ã€‚

        ![](assets/en/FormEditor/selection.png)

        マウスカーソルをフォームエリアã«ç§»å‹•ã™ã‚‹ã¨ã€ã‚«ãƒ¼ã‚½ãƒ«ã¯æ¨™æº–ã®çŸ¢å°ã®å½¢ã‚’ã—ãŸãƒã‚¤ãƒ³ã‚¿ãƒ¼ã«å¤‰ã‚りã¾ã™ã€‚ +2. é¸æŠžã—ãŸã„オブジェクトをクリックã—ã¾ã™ã€‚ サイズ変更ãƒãƒ³ãƒ‰ãƒ«ãŒè¡¨ç¤ºã•れã€ã‚ªãƒ–ジェクトãŒé¸æŠžã•れãŸã“ã¨ã‚’表ã‚ã—ã¾ã™ã€‚

        ![](assets/en/FormEditor/selectResize.png) + +プロパティリストを使用ã—ã¦ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã«ã¯: + +1. プロパティリストã®ä¸€ç•ªä¸Šã«ã‚るオブジェクトリストドロップダウンリストã‹ã‚‰ã‚ªãƒ–ジェクトåã‚’é¸æŠžã—ã¾ã™ã€‚

        ã“ã®æ–¹æ³•ã§ã¯ã€ä»–ã®ã‚ªãƒ–ジェクトã®ä¸‹ã«éš ã‚Œã¦ã„るオブジェクトやã€ã‚«ãƒ¬ãƒ³ãƒˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®è¡¨ç¤ºé ˜åŸŸå¤–ã«ç½®ã‹ã‚Œã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトã®é¸æŠžã‚’解除ã™ã‚‹ã«ã¯ã€ã‚ªãƒ–ジェクト境界ã®å¤–å´ã‚’クリックã™ã‚‹ã‹ã€ã¾ãŸã¯ã‚ªãƒ–ジェクト上㧠**Shift+クリック** ã—ã¾ã™ã€‚ +> "デザインモードを検索" ã®çµæžœã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã‚ªãƒ–ジェクトをダブルクリックã—ã¦é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### 複数オブジェクトã®é¸æŠž + +複数ã®ãƒ•ォームオブジェクトã«é–¢ã—ã¦åŒã˜æ“作をé©ç”¨ã—ãŸã„å ´åˆãŒã‚りã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚ªãƒ–ジェクトã®ç§»å‹•や整列ã€å¤–観ã®å¤‰æ›´ã‚’ãŠã“ãªã†å ´åˆãªã©ã§ã™ã€‚ 4D ã§ã¯ä¸€åº¦ã«è¤‡æ•°ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 複数ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹æ–¹æ³•ã¯ã„ãã¤ã‹ã‚りã¾ã™: + +* 編集メニュï¼ã‹ã‚‰ **ã™ã¹ã¦ã‚’é¸æŠž** ã‚’é¸æŠžã—ã¦ã€ã™ã¹ã¦ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã€‚ +* オブジェクト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **åŒã˜ç¨®é¡žã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠž** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã€‚ +* **Shift**キーを押ã—ãªãŒã‚‰ã€é¸æŠžã—ãŸã„オブジェクトをクリックã™ã‚‹ã€‚ +* é¸æŠžã—ãŸã„オブジェクトグループã®å¤–å´ã‹ã‚‰å„オブジェクトを囲むよã†ã«ãƒžãƒ¼ã‚­ãƒ¼ (é¸æŠžçŸ©å½¢ã¨ã‚‚呼ã°ã‚Œã¾ã™) ã‚’æç”»ã™ã‚‹ã€‚ マウスボタンを離ã™ã¨ã€ãƒžãƒ¼ã‚­ãƒ¼å†…åŠã³ãƒžãƒ¼ã‚­ãƒ¼ã«é‡ãªã‚‹ã‚ªãƒ–ジェクトãŒé¸æŠžã•れã¾ã™ã€‚ +* **Alt**キー (Windows) ã¾ãŸã¯ã€**Option**キー (macOS) を押ã—ãªãŒã‚‰ã€ãƒžãƒ¼ã‚­ãƒ¼ã‚’æç”»ã—ã¾ã™ã€‚ マーキーã«å®Œå…¨ã«å›²ã¾ã‚ŒãŸã‚ªãƒ–ジェクトãŒé¸æŠžã•れã¾ã™ã€‚ + +次ã®å›³ã¯ãƒžãƒ¼ã‚­ãƒ¼ãŒæç”»ã•れã€2ã¤ã®ã‚ªãƒ–ジェクトãŒé¸æŠžã•れã¦ã„る様å­ã‚’示ã—ã¦ã„ã¾ã™: + +![](assets/en/FormEditor/selectMultiple.png) + +一連ã®é¸æŠžã‚ªãƒ–ジェクトã‹ã‚‰ä»»æ„ã®ã‚ªãƒ–ジェクトを除外ã™ã‚‹ã«ã¯ã€**Shift**キーを押ã—ãªãŒã‚‰ãã®ã‚ªãƒ–ジェクトをクリックã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ä»–ã®ã‚ªãƒ–ジェクトã¯é¸æŠžã•れãŸã¾ã¾ã«ãªã‚Šã¾ã™ã€‚ é¸æŠžã•れã¦ã„るオブジェクトをã™ã¹ã¦é¸æŠžè§£é™¤ã™ã‚‹ã«ã¯ã€ã„ãšã‚Œã®ã‚ªãƒ–ジェクトã®å¢ƒç•Œã«ã‚‚ã‹ã‹ã‚‰ãªã„場所をクリックã—ã¾ã™ã€‚ + + +### オブジェクトã®è¤‡è£½ + +アクティブオブジェクトをå«ã‚€ä»»æ„ã®ã‚ªãƒ–ジェクトをフォーム上ã§è¤‡è£½ã§ãã¾ã™ã€‚ アクティブオブジェクトã®ã‚³ãƒ”ーã¯ã‚ªãƒ–ジェクトåを除ãã€å¤‰æ•°åã€åž‹ã€æ¨™æº–アクションã€è¡¨ç¤ºãƒ•ォーマットã€ã‚ªãƒ–ジェクトメソッドãªã©ã™ã¹ã¦ã®ãƒ—ロパティãŒä¿æŒã•れã¾ã™ã€‚ + +ツールパレットã®è¤‡è£½ãƒ„ールを使用ã—ã¦ã‚ªãƒ–ジェクトを直接複製ã™ã‚‹ã‹ã€"行列を指定ã—ã¦è¤‡è£½" ダイアログボックスã§ã‚ªãƒ–ジェクトを複数一気ã«ä½œæˆã§ãã¾ã™ã€‚ ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã§ã¯ã€2ã¤ã®ã‚³ãƒ”ー間ã®é–“隔も指定ã§ãã¾ã™ã€‚ + +オブジェクトを複製ã™ã‚‹ã«ã¯: + +1. 複製ã—ãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ +2. **編集** メニューã‹ã‚‰ **複製** ã‚’é¸æŠžã—ã¾ã™ã€‚ 4D ã¯é¸æŠžã•れãŸã‚ªãƒ–ジェクトã®ã‚³ãƒ”ーを作æˆã—ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã‚ªãƒ–ジェクトã®åŸºç‚¹ã‹ã‚‰å³ä¸‹ã«é…ç½®ã—ã¾ã™ã€‚複製ã•れãŸã‚³ãƒ”ーã¯ã‚ªãƒªã‚¸ãƒŠãƒ«ã®å‰é¢ã«ãŠã‹ã‚Œã¾ã™ã€‚  +3. コピーをé©åˆ‡ãªå ´æ‰€ã«é…ç½®ã—ã¾ã™ã€‚ ã“ã“ã§è¤‡è£½ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …目をå†ã³é¸æŠžã™ã‚‹ã¨ã€4D ã¯ã‚‚ã†ä¸€ã¤ã‚³ãƒ”ーを作æˆã—ã€æœ€åˆã®ã‚³ãƒ”ーã¨å…ƒã®ã‚ªãƒ–ジェクトã®é–“ã¨ã®åŒã˜è·é›¢åŒã˜æ–¹å‘ã«é…ç½®ã—ã¾ã™ã€‚ ã“れを活ã‹ã—ã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ”ーをã‚るライン上ã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã¯ã€ä»¥ä¸‹ã®æ‰‹é †ã§ãŠã“ãªã„ã¾ã™ã€‚ å…ƒã®ã‚ªãƒ–ジェクトを複製ã—ã€ãã®ã‚³ãƒ”ーをフォーム内ã®åˆ¥ã®å ´æ‰€ã«ç§»å‹•ã•ã›ã¦ã‹ã‚‰ã€ã‚³ãƒ”ーを複製ã—ã¾ã™ã€‚ 1ã¤ç›®ã®ã‚³ãƒ”ーã¨å…ƒã®ã‚ªãƒ–ジェクトã®ä½ç½®é–¢ä¿‚ã‚’å†ç¾ã™ã‚‹å½¢ã§ã€2ã¤ç›®ã®ã‚³ãƒ”ーも 1ã¤ç›®ã®ã‚³ãƒ”ーã«å¯¾ã—ã¦ã€è‡ªå‹•çš„ã«é…ç½®ã•れã¾ã™ã€‚ 後続ã®ã‚³ãƒ”ーもã€ãれãžã‚Œã®ã‚³ãƒ”ー元オブジェクトã¨åŒã˜ä½ç½®é–¢ä¿‚ã«é…ç½®ã•れã¾ã™ã€‚ 以下ã®å›³ã¯ã€ã“ã®ç›¸å¯¾çš„ãªã‚³ãƒ”ーã®é…ç½®ãŒå‹•作ã™ã‚‹æ§˜å­ã‚’示ã—ã¦ã„ã¾ã™: + +![](assets/en/FormEditor/duplicateObjects.png) + + +#### 行列を指定ã—ã¦è¤‡è£½ + +"行列を指定ã—ã¦è¤‡è£½" ダイアログボックスã¯ã€**オブジェクト** メニューã‹ã‚‰ **行列を指定ã—ã¦è¤‡è£½...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/FormEditor/duplcateMany.png) + +* 上ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ä½œæˆã—ãŸã„オブジェクトã®åˆ—æ•°ã¨è¡Œæ•°ã‚’入力ã—ã¾ã™ã€‚

        ãŸã¨ãˆã°ã€3列 2行ã®ã‚ªãƒ–ジェクトを作æˆã—ãŸã„å ´åˆã€åˆ—ã« 3 ã‚’ã€è¡Œã« 2 を入力ã—ã¾ã™ã€‚ 横㫠3ã¤ã®æ–°ã—ã„コピーを作æˆã—ãŸã„å ´åˆã¯ã€åˆ—欄㫠4 を入力ã—ã€è¡Œã¯ãƒ‡ãƒ•ォルト㮠1 ã®ã¾ã¾ã«ã—ã¾ã™ã€‚ + +* 列ã¨è¡Œãれãžã‚Œã«ã€ã‚³ãƒ”ー間ã®ã‚ªãƒ•セットを指定ã§ãã¾ã™ã€‚

        値ã¯ãƒã‚¤ãƒ³ãƒˆå˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚ オフセットã¯ã€å…ƒã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ç›¸å¯¾çš„ã«ã€ã‚³ãƒ”ー毎ã«é©ç”¨ã•れã¾ã™ã€‚

        ãŸã¨ãˆã°ã€å…ƒã®ã‚ªãƒ–ジェクトã®é«˜ã•㌠50ãƒã‚¤ãƒ³ãƒˆã§ã‚ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã”ã¨ã« 20ãƒã‚¤ãƒ³ãƒˆç¸¦ã‚ªãƒ•セットã™ã‚‹ã«ã¯ã€åˆ—ã® "オフセット" エリア㫠70 を入力ã—ã¾ã™ã€‚ + +* æ ¼å­çжã«å¤‰æ•°ã‚’作æˆã—ãŸã„å ´åˆã€**変数ã«ç•ªå·è¨­å®š** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã€ç•ªå·ã‚’振る方å‘を行ã¾ãŸã¯åˆ—ã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚ é¸æŠžã—ãŸã‚ªãƒ–ジェクトãŒå¤‰æ•°ã®å ´åˆã«ã®ã¿ã€ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æœ‰åйã«ãªã‚Šã¾ã™ã€‚ 詳細㯠*デザインリファレンス* ã§ [**グリッド上ã«ã‚ªãƒ–ジェクト作æˆ**](https://doc.4d.com/4Dv19/4D/19/Duplicating-on-a-matrix.300-5416673.ja.html) ã‚’å‚ç…§ãã ã•ã„。 + + +### オブジェクトã®ç§»å‹• + +テンプレートã§ä½œæˆã•れãŸãƒ•ィールドやオブジェクトをå«ã‚ã€ãƒ•ォーム上ã®ã‚°ãƒ©ãƒ•ィックやアクティブオブジェクトã¯ã™ã¹ã¦ç§»å‹•å¯èƒ½ã§ã™ã€‚ オブジェクトを移動ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªæ–¹æ³•ãŒã‚りã¾ã™: + +* オブジェクトをドラッグã—ã¦ç§»å‹•ã™ã‚‹ã€‚ +* 矢å°ã‚­ãƒ¼ã‚’使用ã—ã¦ã€ã‚ªãƒ–ジェクトを 1ピクセルãšã¤ç§»å‹•ã™ã‚‹ã€‚ +* Shiftキーã¨çŸ¢å°ã‚­ãƒ¼ã‚’使用ã—ã¦ã€ã‚ªãƒ–ジェクトを 1ステップãšã¤ç§»å‹•ã™ã‚‹ (デフォルト㧠1ステップ=20ピクセル)。 + +é¸æŠžã—ãŸã‚ªãƒ–ジェクトã®ãƒ‰ãƒ©ãƒƒã‚°ã‚’é–‹å§‹ã™ã‚‹ã¨ã€ãƒãƒ³ãƒ‰ãƒ«ãŒæ¶ˆãˆã¾ã™ã€‚ 4D ã¯ãƒ«ãƒ¼ãƒ©ãƒ¼ã«ã‚ªãƒ–ジェクトã®åº§æ¨™ã‚’示ã™ãƒžãƒ¼ã‚«ãƒ¼ã‚’表示ã™ã‚‹ã®ã§ã€é©åˆ‡ãªä½ç½®ã«ã‚ªãƒ–ジェクトをé…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã¨ãã€ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 ãƒãƒ³ãƒ‰ãƒ«ã‚’ドラッグã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®ã‚µã‚¤ã‚ºãŒå¤‰æ›´ã•れã¾ã™ã€‚ **Shift**キーを押ã—ãªãŒã‚‰ãƒ‰ãƒ©ãƒƒã‚°ã™ã‚‹ã¨ã€åˆ¶ç´„付ãã®ç§»å‹•ã«ãªã‚Šã¾ã™ã€‚ + +[マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰](#マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹) ãŒæœ‰åйãªå ´åˆã€ã‚°ãƒªãƒƒãƒ‰ã«å¸ç€ã™ã‚‹ã‚ˆã†ã«ã‚ªãƒ–ジェクトãŒç§»å‹•ã•れã¾ã™ã€‚ + +オブジェクトを 1ピクセルãšã¤ç§»å‹•ã™ã‚‹ã«ã¯: + +* 移動ã—ãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ä¸Šã®çŸ¢å°ã‚­ãƒ¼ã‚’使用ã—ã¦ã‚ªãƒ–ジェクトを移動ã—ã¾ã™ã€‚ 矢å°ã‚­ãƒ¼ã‚’押ã™ãŸã³ã«ã€çŸ¢å°ã®æ–¹å‘ã¸ã‚ªãƒ–ジェクト㌠1ピクセルãšã¤ç§»å‹•ã—ã¾ã™ã€‚ + +オブジェクトを 1ステップãšã¤ç§»å‹•ã™ã‚‹ã«ã¯: + +* 移動ã—ãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã€**Shift**キーを押ã—ãªãŒã‚‰ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ä¸Šã®çŸ¢å°ã‚­ãƒ¼ã‚’使用ã—ã¦ã€ã‚ªãƒ–ジェクトを移動ã—ã¾ã™ã€‚ デフォルト㧠1ステップã«ã¤ã 20ピクセル移動ã—ã¾ã™ã€‚ ã“ã®ãƒ”クセル数ã¯ã€ç’°å¢ƒè¨­å®šã®ãƒ•ォームページã§å¤‰æ›´ã§ãã¾ã™ã€‚ + + +### オブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—化 + +4D ã§ã¯ã‚ªãƒ–ジェクトをグループ化ã—ã¦ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—を一ã¤ã®ã‚ªãƒ–ジェクトã¨ã—ã¦é¸æŠžãƒ»ç§»å‹•・変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ グループ化ã•れãŸã‚ªãƒ–ジェクトåŒå£«ã®ç›¸å¯¾ä½ç½®ã¯ä¿æŒã•れã¾ã™ã€‚ 一般的ã«ã¯ã€ãƒ•ィールドã¨ãã®ãƒ©ãƒ™ãƒ«ã€é€æ˜Žãƒœã‚¿ãƒ³ã¨ãã®ã‚¢ã‚¤ã‚³ãƒ³ç­‰ã‚’グループ化ã™ã‚‹ã§ã—ょã†ã€‚ + +グループã®å¤§ãã•を変更ã™ã‚‹ã¨ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—内ã®å…¨ã‚ªãƒ–ジェクトã®ã‚µã‚¤ã‚ºãŒåŒã˜æ¯”率ã§å¤‰æ›´ã•れã¾ã™ (テキストエリアã¯é™¤ãã¾ã™ã€‚テキストエリアã®ã‚µã‚¤ã‚ºã¯ã€ãã®ãƒ•ォントサイズã«åˆã‚ã›ã¦å¤‰æ›´ã•れã¾ã™)。 + +グループ化を解除ã™ã‚‹ã¨ã€å†ã³å€‹ã€…ã«ã‚ªãƒ–ジェクトを扱ãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + +グループ化ã•れãŸã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã®ãƒ—ロパティやメソッドã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€ã‚°ãƒ«ãƒ¼ãƒ—化を解除ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã—ã‹ã—ã€ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã™ã‚‹ã‚ªãƒ–ジェクトをã€ã‚°ãƒ«ãƒ¼ãƒ—化を解除ã›ãšã«é¸æŠžã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ã“れã«ã¯ã€ã‚ªãƒ–ジェクトを **Ctrl+クリック** (Windows) ã¾ãŸã¯ **Command+クリック** (macOS) ã—ã¾ã™ (グループã¯ã‚らã‹ã˜ã‚é¸æŠžã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 + +グループ化ã¯ãƒ•ォームエディター上ã§ã®ã¿æ„味をæŒã¡ã¾ã™ã€‚ フォームã®å®Ÿè¡Œä¸­ã¯ã€ã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸã™ã¹ã¦ã®ã‚ªãƒ–ジェクトãŒã€ã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¦ã„ãªã„ã®ã¨åŒã˜ã«å‹•作ã—ã¾ã™ã€‚ +> ç•°ãªã‚‹ãƒ“ューã«å±žã™ã‚‹ã‚ªãƒ–ジェクトをグループ化ã™ã‚‹ã“ã¨ã¯ã§ããšã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ“ューã«å±žã™ã‚‹ã‚ªãƒ–ジェクトã®ã¿ã‚’グループ化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([オブジェクトビュー](#オブジェクトビュー) å‚ç…§)。 + +オブジェクトをグループ化ã™ã‚‹ã«ã¯: + +1. グループ化ã—ãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ +2. オブジェクトメニューã‹ã‚‰ **グループ化** ã‚’é¸æŠžã—ã¾ã™ã€‚

        OR

        フォームエディターã®ãƒ„ールãƒãƒ¼ã§ã‚°ãƒ«ãƒ¼ãƒ—化ボタンをクリックã—ã¾ã™ã€‚

        ![](assets/en/FormEditor/group.png)

        4D ã¯ã€æ–°ãŸã«ã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸã‚ªãƒ–ジェクトã®å¢ƒç•Œã‚’ãƒãƒ³ãƒ‰ãƒ«ã§è¡¨ã‚ã—ã¾ã™ã€‚ グループ内ã®å„オブジェクトã®å¢ƒç•Œã«ã¯ãƒãƒ³ãƒ‰ãƒ«ãŒè¡¨ç¤ºã•れã¾ã›ã‚“。 ã“れ以é™ã€ã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸã‚ªãƒ–ジェクトを編集ã™ã‚‹ã¨ã€ã‚°ãƒ«ãƒ¼ãƒ—ã‚’æ§‹æˆã™ã‚‹å…¨ã‚ªãƒ–ジェクトãŒå¤‰æ›´ã•れã¾ã™ã€‚ + +オブジェクトã®ã‚°ãƒ«ãƒ¼ãƒ—化を解除ã™ã‚‹ã«ã¯: + +1. グループ化を解除ã—ãŸã„ã‚°ãƒ«ãƒ¼ãƒ—ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ +2. **オブジェクト** メニューã‹ã‚‰ **グループ化解除** ã‚’é¸æŠžã—ã¾ã™ã€‚

        OR

        フォームエディターã®ãƒ„ールãƒãƒ¼ã§ **グループ化解除** ボタン (**グループ化** ボタンã®ã‚µãƒ–é …ç›®) をクリックã—ã¾ã™ã€‚

        **グループ化解除** ãŒé¸æŠžä¸å¯ã®å ´åˆã€é¸æŠžã—ãŸã‚ªãƒ–ジェクトã¯ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã—ã¦ã„ãªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚

        4D ã¯å€‹ã€…ã®ã‚ªãƒ–ジェクトã®å¢ƒç•Œã‚’ãƒãƒ³ãƒ‰ãƒ«ã§è¡¨ã‚ã—ã¾ã™ã€‚ + + +### ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ— + +フォーム上ã®ã‚ªãƒ–ジェクトを互ã„ã«æ•´åˆ—ã•ã›ãŸã‚Šã€ã¾ãŸã¯é€æ˜Žã‚°ãƒªãƒƒãƒ‰ã‚’用ã„ã¦æƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* オブジェクトåŒå£«ã‚’整列ã•ã›ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã®ä¸Šç«¯ã€ä¸‹ç«¯ã€å´é¢ã§æƒãˆãŸã‚Šã€ã¾ãŸã¯åˆ¥ã®ã‚ªãƒ–ジェクトã®ç¸¦ã‚„横ã®ä¸­å¿ƒç·šã«æ²¿ã£ã¦æƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 整列ツールを使用ã—ã¦é¸æŠžã‚ªãƒ–ジェクトを直接æƒãˆãŸã‚Šã€ã¾ãŸã¯æ•´åˆ—アシスタントを用ã„ã¦ã•らã«è©³ç´°ãªæ•´åˆ—ã‚’é©ç”¨ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ 整列アシスタントを使用ã—ãŸå ´åˆã€ãŸã¨ãˆã°ã€æ•´åˆ—ã®åŸºæº–ã¨ãªã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ãŸã‚Šã€æ•´åˆ—ã‚’é©ç”¨ã™ã‚‹å‰ã«ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã®æ•´åˆ—状態をプレビューã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +* 逿˜Žã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹ã¨ã€å„オブジェクトã®ä½ç½®ã‚’æ‰‹å‹•ã§æƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãã®éš›ã€ç§»å‹•中ã®ã‚ªãƒ–ジェクトãŒåˆ¥ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æŽ¥è¿‘ã™ã‚‹ã¨ã€"ç›®ã«è¦‹ãˆã‚‹" ä½ç½®ã‚¬ã‚¤ãƒ‰ã¨ã—ã¦ç‚¹ç·šãŒè¡¨ç¤ºã•れã€ã“れã«åŸºã¥ã„ã¦å„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 峿™‚整列ツールを使用ã™ã‚‹ + +ツールãƒãƒ¼ã®æ•´åˆ—ツールã€ã¾ãŸã¯ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®æ•´åˆ—サブメニューを使用ã—ã¦ã€é¸æŠžã—ãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’çž¬æ™‚ã«æƒãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/FormEditor/alignmentMenu.png) + +4D ãŒã‚ªãƒ–ジェクトをæƒãˆã‚‹å ´åˆã€é¸æŠžã‚ªãƒ–ジェクトã®ã†ã¡ 1ã¤ã‚’定ä½ç½®ã«ç½®ã„ãŸã¾ã¾ã€ãã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’åŸºæº–ã«æ®‹ã‚Šã®ã‚ªãƒ–ジェクトを整列ã•ã›ã¾ã™ã€‚ ã“ã®åŸºæº–オブジェクト㌠"アンカー" ã¨ãªã‚Šã¾ã™ã€‚ 整列をãŠã“ãªã†æ–¹å‘ã§æœ€ã‚‚離れãŸä½ç½®ã«ã‚るオブジェクトãŒã‚¢ãƒ³ã‚«ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れã€ä»–ã®ã‚ªãƒ–ジェクトã¯ã“ã®ã‚ªãƒ–ジェクトã«åˆã‚ã›ã‚‰ã‚Œã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä¸€é€£ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦å³æƒãˆã‚’実行ã—ãŸã„å ´åˆã€ä¸€ç•ªå³å´ã«ä½ç½®ã™ã‚‹ã‚ªãƒ–ジェクトãŒã‚¢ãƒ³ã‚«ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ã€‚ 次ã®å›³ã¯æ•´åˆ—ãªã—ã€å·¦æƒãˆã€ç¸¦ä¸­å¤®æƒãˆã€å³æƒãˆã®çŠ¶æ…‹ã‚’ç¤ºã—ã¦ã„ã¾ã™: + +![](assets/en/FormEditor/alignmentTools.png) + +#### 整列アシスタントを使用ã™ã‚‹ + +整列アシスタントを使用ã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã«é–¢ã™ã‚‹ã‚ã‚‰ã‚†ã‚‹ã‚¿ã‚¤ãƒ—ã®æ•´åˆ—ã‚„å‡ç­‰é…置を実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/FormEditor/alignmentAssistant.png) + + +ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã™ã‚‹ã«ã¯ã€æƒãˆãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã€**オブジェクト** メニューã€ã¾ãŸã¯ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **整列** サブメニューã‹ã‚‰ **整列...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ + +* "å·¦/峿•´åˆ—" ã‚„ "上/下整列" エリアã§ã€å®Ÿè¡Œã—よã†ã¨ã™ã‚‹æ•´åˆ—ã«å¯¾å¿œã™ã‚‹æ•´åˆ—アイコンをクリックã—ã¾ã™ã€‚

        見本エリアã«ã¯ã€é¸æŠžçµæžœãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +* 標準ã®ã‚¢ãƒ³ã‚«ãƒ¼æ–¹å¼ã«ã‚ˆã‚‹æ•´åˆ—を実行ã™ã‚‹ã«ã¯ã€**プレビュー** ã¾ãŸã¯ **é©ç”¨** をクリックã—ã¾ã™ã€‚

        ã“ã®å ´åˆã€æ•´åˆ—ã‚’ãŠã“ãªã†æ–¹å‘ã§æœ€ã‚‚離れãŸä½ç½®ã«ã‚るオブジェクトãŒã‚¢ãƒ³ã‚«ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れã€ä»–ã®ã‚ªãƒ–ジェクトã¯ã“ã®ã‚ªãƒ–ジェクトã«åˆã‚ã›ã‚‰ã‚Œã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä¸€é€£ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦å³æƒãˆã‚’実行ã—ãŸã„å ´åˆã€ä¸€ç•ªå³å´ã«ä½ç½®ã™ã‚‹ã‚ªãƒ–ジェクトãŒã‚¢ãƒ³ã‚«ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ã€‚

        ã¾ãŸã¯:

        特定ã®ã‚ªãƒ–ジェクトを基準ã«ã‚ªãƒ–ジェクトをæƒãˆã‚‹ã«ã¯ã€**整列** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã€æ•´åˆ—基準ã¨ã—ãŸã„オブジェクトを一覧ã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚ ã“ã®å ´åˆã€åŸºæº–オブジェクトã®ä½ç½®ã¯å¤‰ã‚りã¾ã›ã‚“。 + +**プレビュー** ボタンをクリックã™ã‚‹ã¨ã€æ•´åˆ—ã®çµæžœã‚’プレビューã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã™ã‚‹ã¨ãƒ•ォームエディター上ã®ã‚ªãƒ–ジェクトã¯è¦‹ã‹ã‘上整列ã—ã¾ã™ãŒã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れãŸã¾ã¾ãªã®ã§ã€ã“ã®æ•´åˆ—ã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã‚„é©ç”¨ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +> 整列アシスタントを使用ã™ã‚‹ã¨ã€1å›žã®æ“作ã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—ã‚„å‡ç­‰é…置をãŠã“ãªãˆã¾ã™ã€‚ オブジェクトをå‡ç­‰é…ç½®ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[オブジェクトã®å‡ç­‰é…ç½®](#オブジェクトã®å‡ç­‰é…ç½®) ã‚’å‚ç…§ãã ã•ã„。 + +#### マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹ + +フォームエディターã«ã¯ä»®æƒ³çš„ãªãƒžã‚°ãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰æ©Ÿèƒ½ãŒã‚りã¾ã™ã€‚ã“ã®æ©Ÿèƒ½ã¯ã€ãƒ•ォーム上ã§ã‚ªãƒ–ジェクトã®é…置や整列をãŠã“ãªã†éš›ã«å½¹ç«‹ã¡ã¾ã™ã€‚ オブジェクトã®ãƒžã‚°ãƒãƒ†ã‚£ãƒƒã‚¯æ•´åˆ—ã¯ã€ã‚ªãƒ–ジェクトåŒå£«ã®ç›¸å¯¾ä½ç½®ã«åŸºã¥ã„ã¦ãŠã“ãªã‚れã¾ã™ã€‚ マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã¯ã€2ã¤ä»¥ä¸Šã®ã‚ªãƒ–ジェクトãŒãƒ•ォーム上ã«å­˜åœ¨ã™ã‚‹å ´åˆã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯æ¬¡ã®ã‚ˆã†ã«ä½œç”¨ã—ã¾ã™ã€‚フォーム上ã®ã‚るオブジェクトを移動ã™ã‚‹éš›ã€4D ã¯ä»–ã®ãƒ•ォームオブジェクトã¨ã®ç›¸å¯¾çš„ãªä½ç½®é–¢ä¿‚ã«åŸºã¥ãã€ã“ã®ã‚ªãƒ–ジェクトã®ä½ç½®å€™è£œã‚’示ã—ã¾ã™ã€‚ 次ã®ã‚ˆã†ãªå ´åˆã«å€™è£œãŒç¤ºã•れã¾ã™: + +* 水平方å‘ã« 2ã¤ã®ã‚ªãƒ–ジェクトã®ç«¯ã¾ãŸã¯ä¸­å¤®ãŒåŒã˜ä½ç½®ã«ãªã‚‹å ´åˆã€‚ +* 垂直方å‘ã« 2ã¤ã®ã‚ªãƒ–ジェクトã®ç«¯ãŒåŒã˜ä½ç½®ã«ãªã‚‹å ´åˆã€‚ + +ã“ã®çжæ³ã«ãªã‚‹ã¨ã€4D ã¯ãã®ä½ç½®ã«ã‚ªãƒ–ジェクトをé…ç½®ã—ã€ãã“ãŒå€™è£œä½ç½®ã§ã‚ã‚‹ã“ã¨ã‚’示ã™èµ¤ã„ラインを表示ã—ã¾ã™: + +![](assets/en/FormEditor/magneticGrid1.png) + +オブジェクトをå‡ç­‰é…ç½®ã™ã‚‹å ´åˆã€4D ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース標準ã«åŸºã¥ã„ã¦ã‚ªãƒ–ジェクト間ã®è·é›¢ã‚’æç¤ºã—ã¾ã™ã€‚ マグãƒãƒ†ã‚£ãƒƒã‚¯æ•´åˆ—ã¨åŒæ§˜ã«ã€é…ç½®ãŒæ±ºå®šã—ãŸæ™‚点ã§ã€ãã®é–“éš”ãŒèµ¤ã„ラインã§è¡¨ã‚ã•れã¾ã™ã€‚ + +![](assets/en/FormEditor/magneticGrid2.png) + +ã“ã®å‡¦ç†ã¯ã€ã‚らゆるタイプã®ãƒ•ォームオブジェクトã«å¯¾ã—ã¦é©ç”¨ã•れã¾ã™ã€‚ **フォーム** メニューã¾ãŸã¯ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰** コマンドを使用ã—ã¦ã€ãƒžã‚°ãƒãƒ†ã‚£ãƒƒã‚¯æ©Ÿèƒ½ã‚’ã„ã¤ã§ã‚‚有効ã¾ãŸã¯ç„¡åйã«è¨­å®šã§ãã¾ã™ã€‚ ã¾ãŸã€**環境設定** ã® **フォーム** ページã«ãŠã„ã¦ã€ã“ã®æ©Ÿèƒ½ã‚’ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åйã«è¨­å®šã—ã¦ãŠãã“ã¨ã‚‚å¯èƒ½ã§ã™ (**デフォルトã§è‡ªå‹•æƒãˆã‚’有効ã«ã™ã‚‹** オプション)。 **Ctrl**キー (Windows) ã¾ãŸã¯ **Control**キー (macOS) を押ã—ã¦ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€æ‰‹å‹•ã§ãƒžã‚°ãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ãŒæœ‰åй/無効ã«è¨­å®šã•れã¾ã™ã€‚ +> 手動ã§ã‚ªãƒ–ジェクトサイズを変更ã™ã‚‹å ´åˆã‚‚ã€ã“ã®ãƒžã‚°ãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã®å½±éŸ¿ã‚’å—ã‘ã¾ã™ã€‚ + +### オブジェクトã®å‡ç­‰é…ç½® + +å„オブジェクトãŒåŒã˜é–“éš”ã§é…ç½®ã•れるよã†ã«ã€ã‚ªãƒ–ジェクトをå‡ç­‰é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã¯ã€ãƒ„ールパレットã¾ãŸã¯æ•´åˆ—アシスタントã®å‡ç­‰é…置ツールを用ã„ã¾ã™ã€‚ 整列アシスタントを使用ã™ã‚‹ã¨ã€1å›žã®æ“作ã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—ã‚„å‡ç­‰é…置をãŠã“ãªãˆã¾ã™ã€‚ +> [マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰](#マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹) ãŒæœ‰åйã®å ´åˆã€ã‚ªãƒ–ジェクトを手動ã§å‹•ã‹ã™ã¨ã€å‡ç­‰é…ç½®ã®ãŸã‚ガイドãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +åŒã˜é–“隔を空ã‘ã¦ã‚ªãƒ–ジェクトをé…ç½®ã™ã‚‹ã«ã¯: + +1. 3ã¤ä»¥ä¸Šã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã€å¸Œæœ›ã™ã‚‹å‡ç­‰é…置ツールをクリックã—ã¾ã™ã€‚ + +2. é©ç”¨ã—ãŸã„å‡ç­‰é…ç½®ã«å¯¾å¿œã™ã‚‹æ•´åˆ—ツールをツールãƒãƒ¼ä¸Šã§é¸æŠžã—ã¾ã™ã€‚

        ![](assets/en/FormEditor/distributionTool.png)

        OR

        **オブジェクト** メニューã€ã¾ãŸã¯ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **整列** サブメニューã‹ã‚‰å‡ç­‰æƒãˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚

        4D ã¯å„オブジェクトをå‡ç­‰ã«é…ç½®ã—ã¾ã™ã€‚ å„オブジェクトã®ä¸­å¿ƒã¾ã§ã®é–“éš”ã€ãŠã‚ˆã³éš£æŽ¥ã™ã‚‹ 2ã¤ã®ã‚ªãƒ–ジェクトã®é–“éš”ã®ã†ã¡æœ€ã‚‚広ã„é–“éš”ãŒåŸºæº–ã¨ã—ã¦ç”¨ã„られã¾ã™ã€‚ + +"整列ã¨å‡ç­‰é…ç½®" ダイアログボックスを用ã„ã¦ã‚ªãƒ–ジェクトをå‡ç­‰ã«é…ç½®ã™ã‚‹ã«ã¯: + +1. å‡ç­‰é…ç½®ã—ãŸã„ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ + +2. **オブジェクト** メニューã€ã¾ãŸã¯ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **整列** サブメニューã‹ã‚‰ **整列...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚

        以下ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™:![](assets/en/FormEditor/alignmentAssistant.png) + +3. "å·¦/峿•´åˆ—" ã‚„ "上/下整列" エリアã§ã€æ¨™æº–ã®å‡ç­‰é…置アイコンをクリックã—ã¾ã™: ![](assets/en/FormEditor/horizontalDistribution.png)

        (æ¨™æº–ã®æ¨ªå‡ç­‰æƒãˆã‚¢ã‚¤ã‚³ãƒ³)

        見本エリアã«ã¯ã€é¸æŠžçµæžœãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +4. 標準ã®å‡ç­‰é…置を実行ã™ã‚‹ã«ã¯ã€**プレビュー** ã¾ãŸã¯ *é©ç”¨* をクリックã—ã¾ã™ã€‚

        ã“ã®å ´åˆã€4D ã¯æ¨™æº–ã®å‡ç­‰é…置を実行ã—ã€ã‚ªãƒ–ジェクトã¯ç­‰é–“éš”ã§é…ç½®ã•れã¾ã™ã€‚

        ã¾ãŸã¯:

        特定ã®å‡ç­‰é…置を実行ã™ã‚‹ã«ã¯ã€**å‡ç­‰é…ç½®** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ (ãŸã¨ãˆã°å„オブジェクトã®å³è¾ºã¾ã§ã®è·é›¢ã‚’ã‚‚ã¨ã«ã—ã¦ã‚ªãƒ–ジェクトをå‡ç­‰ã«é…ç½®ã—ãŸã„å ´åˆ)。 ã“ã®ã‚ªãƒ—ションã¯ã‚¹ã‚¤ãƒƒãƒã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ å‡ç­‰é…ç½®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã“ã®ã‚ªãƒ—ションã®ä¸‹ã«ã‚るアイコンã¯ç•°ãªã‚‹å‹•作をãŠã“ãªã„ã¾ã™: + + * å·¦/峿•´åˆ—ã®å ´åˆã€å„ã‚¢ã‚¤ã‚³ãƒ³ã¯æ¬¡ã®å‡ç­‰é…ç½®ã«å¯¾å¿œã—ã¾ã™: é¸æŠžã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®å·¦è¾ºã€ä¸­å¤® (横)ã€å³è¾ºã§å‡ç­‰ã«æƒãˆã¾ã™ã€‚ + * 上/下整列ã®å ´åˆã€å„ã‚¢ã‚¤ã‚³ãƒ³ã¯æ¬¡ã®å‡ç­‰é…ç½®ã«å¯¾å¿œã—ã¾ã™: é¸æŠžã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®ä¸Šè¾ºã€ä¸­å¤® (縦)ã€ä¸‹è¾ºã§å‡ç­‰ã«æƒãˆã¾ã™ã€‚ + + **プレビュー** ボタンをクリックã™ã‚‹ã¨ã€ã“ã®è¨­å®šã«ã‚ˆã‚‹çµæžœã‚’プレビューã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®è¡¨ç¤ºã¯ãƒ•ォームエディター上ã§å®Ÿè¡Œã•れã¾ã™ãŒã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã¯å‰é¢ã«è¡¨ç¤ºã•れãŸã¾ã¾ã§ã™ã€‚ ã“ã®å¾Œã€å¤‰æ›´ã® **キャンセル** ã¾ãŸã¯ **é©ç”¨** ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§ã¯ã€æ•´åˆ—ã¨å‡ç­‰é…置をåˆã‚ã›ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 整列ã«é–¢ã™ã‚‹è©³ç´°ã¯ [ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—](#ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•´åˆ—) ã‚’å‚ç…§ãã ã•ã„。 + + +### オブジェクトをé‡ã­ã‚‹ + +フォーム上ã§ä»–ã®ã‚ªãƒ–ジェクトを隠ã—ã¦ã„るオブジェクトã®é…置を調整ã™ã‚‹å¿…è¦ãŒç”Ÿã˜ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ•ォーム上ã®ãƒ•ィールドã®èƒŒæ™¯ã«ã‚°ãƒ©ãƒ•ィックをé…ç½®ã—ãŸã„å ´åˆã§ã™ã€‚ 4D ã«ã¯ **å‰é¢ã¸**ã€**背é¢ã¸**ã€**一ã¤ä¸Šã®ãƒ¬ãƒ™ãƒ«ã¸**ã€**一ã¤ä¸‹ã®ãƒ¬ãƒ™ãƒ«ã¸** ã¨ã„ㆠ4ã¤ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼é …ç›®ãŒã‚りã€ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ãƒ•ォーム上ã®ã‚ªãƒ–ジェクトを "é‡ã­ã‚‹ (レイヤー)" ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®é‡ãªã‚Šã¯ã€ãƒ‡ãƒ•ォルトã®å…¥åŠ›é †ã‚‚è¦å®šã—ã¾ã™ (下㮠データã®å…¥åЛ順 å‚ç…§)。 次ã®å›³ã¯ã€ä»–ã®ã‚ªãƒ–ジェクトã®å‰é¢/背é¢ã«ç½®ã‹ã‚ŒãŸã‚ªãƒ–ジェクトを示ã—ã¦ã„ã¾ã™: + +![](assets/en/FormEditor/layering.png) + +é¸æŠžã—ãŸã‚ªãƒ–ジェクトã®ãƒ¬ãƒ™ãƒ«ã‚’変更ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®ä½œæ¥­ã‚’ãŠã“ãªã„ã¾ã™: + +* オブジェクトメニューã‹ã‚‰ **å‰é¢ã¸**ã€**背é¢ã¸**ã€**レベルを上ã’ã‚‹**ã€**レベルを下ã’ã‚‹** ã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã¾ã™ã€‚ +* エディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **レベルã«ç§»å‹•** サブメニュー内ã®ã‚³ãƒžãƒ³ãƒ‰ã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã¾ã™ã€‚ +* ツールãƒãƒ¼ã®ãƒ¬ãƒ™ãƒ«ç®¡ç†ãƒœã‚¿ãƒ³ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚³ãƒžãƒ³ãƒ‰ã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/level2.png) +> 複数ã®ã‚ªãƒ–ジェクトãŒé‡ãªã£ã¦ã„ã‚‹å ´åˆã€**Ctrl+Shift+クリック** / **Command+Shift+クリック** ショートカットを使用ã—ã¦ã€ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ãŸã³ã«ä¸‹ã®ãƒ¬ã‚¤ãƒ¤ãƒ¼ã«ã‚ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã§ãã¾ã™ã€‚ + +レベルã®é †åºã‚’考ãˆã‚‹ã«ã‚ãŸã£ã¦ã€4D ã¯å¸¸ã«èƒŒé¢ã‹ã‚‰å…¨é¢ã¸ã¨é€²ã¿ã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€å‰ãƒ»æ¬¡ã§è¡¨ç¾ã—ãŸå ´åˆã€"å‰ãƒ¬ãƒ™ãƒ«" 㯠1ã¤èƒŒé¢ã®ãƒ¬ãƒ™ãƒ«ã®ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ "次レベルã¯" 1ã¤å‰é¢ã®ãƒ¬ãƒ™ãƒ«ã®ã“ã¨ã§ã™ã€‚ + +### データã®å…¥åЛ順 + +データ入力順ã¨ã¯ã€å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã§ **Tab**キーや **改行**キーを押ã—ãŸã¨ãã«ã€ãƒ•ィールドやサブフォームã€ãã®ä»–ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトãŒé¸æŠžã•れる順番ã®ã“ã¨ã§ã™ã€‚ **Shift+Tab** ã‚„ **Shift+改行**キーを押ã™ã“ã¨ã§ã€ãƒ•ã‚©ãƒ¼ãƒ å†…ã‚’é€†æ–¹å‘ (逆ã®å…¥åЛ順) ã«ç§»å‹•ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +> 入力順ã¯ã€`FORM SET ENTRY ORDER` ãŠã‚ˆã³ `FORM GET ENTRY ORDER` コマンドを使用ã™ã‚‹ã“ã¨ã§ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +フォーカスå¯ãƒ—ロパティをサãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトãŒã€ãƒ‡ãƒ•ォルトã§ãƒ‡ãƒ¼ã‚¿å…¥åЛ順åºã«å«ã¾ã‚Œã¾ã™ã€‚ + +JSONフォームã®å…¥åЛ順åºã®è¨­å®šã¯ã€[`entryOrder`](properties_JSONref.md) プロパティã§è¡Œã„ã¾ã™ã€‚ + +独自ã®å…¥åŠ›é †ã‚’æŒ‡å®šã—ãªã„å ´åˆã€4D ã¯ã‚ªãƒ–ジェクトã®éšŽå±¤ã«å¾“ã„ã€"背é¢ã‹ã‚‰å‰é¢" ã¸å‘ã‘ã¦ãƒ‡ãƒ•ォルトã®å…¥åŠ›é †ã‚’æ±ºå®šã—ã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€æ¨™æº–ã®å…¥åЛ順ã¯ãƒ•ォーム上ã§ã®ã‚ªãƒ–ジェクトã®ä½œæˆé †ã«ãªã‚Šã¾ã™ã€‚ + +フォームã§ã¯åº¦ã€…ã€ç‹¬è‡ªã®å…¥åЛ順ãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®å›³ã§ã¯ãƒ•ォームã®ä½œæˆå¾Œã«ã€ä½æ‰€ã«é–¢é€£ã™ã‚‹ãƒ•ィールドãŒè¿½åŠ ã•れã¦ã„ã¾ã™ã€‚ ã“ã®çµæžœã€æ¨™æº–ã®å…¥åŠ›é †ãŒæ„味をãªã•ãªããªã‚Šã€æ‰±ã„ã¥ã‚‰ã„順番ã§ãƒ‡ãƒ¼ã‚¿ã‚’入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +![](assets/en/FormEditor/entryOrder1.png) + +ã“ã®ã‚ˆã†ãªã‚±ãƒ¼ã‚¹ã§ã¯ã€ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›é †ã‚’æŒ‡å®šã™ã‚‹ã¨ã€ã‚ˆã‚Šç†ã«ã‹ãªã£ãŸé †åºã§ãƒ‡ãƒ¼ã‚¿ã‚’入力ã§ãるよã†ã«ãªã‚Šã¾ã™: + +![](assets/en/FormEditor/entryOrder2.png) + +#### データ入力順ã®è¡¨ç¤ºã¨å¤‰æ›´ + +"入力順" ãƒãƒƒã‚¸ã¾ãŸã¯ "入力順" モードを使用ã—ã¦ã€ç¾åœ¨ã®å…¥åŠ›é †ã‚’è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ã€å…¥åŠ›é †ã‚’å¤‰æ›´ã™ã‚‹ã«ã¯ã€"入力順" モードを使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +ã“ã®ç¯€ã§ã¯ "入力順" モードを用ã„ã¦ã€å…¥åЛ順ã®è¡¨ç¤ºã¨å¤‰æ›´ã‚’ãŠã“ãªã†æ–¹æ³•ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ ãƒãƒƒã‚¸ã‚’用ã„ãŸå…¥åЛ順ã®è¡¨ç¤ºã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹](#ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹) ã‚’å‚ç…§ãã ã•ã„。 + +入力順モードã«åˆ‡ã‚Šæ›¿ãˆã€å…¥åŠ›é †ã‚’å¤‰æ›´ã™ã‚‹ã«ã¯: + +1. **フォーム** メニューã‹ã‚‰ **入力順** ã‚’é¸æŠžã™ã‚‹ã‹ã€ãƒ„ールãƒãƒ¼ã®å…¥åŠ›é †ãƒœã‚¿ãƒ³ã‚’ã‚¯ãƒªãƒƒã‚¯ã—ã¾ã™:

        ![](assets/en/FormEditor/zOrder.png)

        ãƒã‚¤ãƒ³ã‚¿ãƒ¼ãŒå…¥åЛ順ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã«å¤‰ã‚りã€4D ã¯ãƒ•ォーム上ã«ç·šã‚’引ã„ã¦ã€ãƒ‡ãƒ¼ã‚¿å…¥åŠ›æ™‚ã«ã‚ªãƒ–ジェクトãŒé¸æŠžã•れる順åºã‚’示ã—ã¾ã™ã€‚

        ツールパレット上ã®ä»–ã®ãƒ„ールをクリックã™ã‚‹ã¾ã§ã¯ã€å…¥åЛ順åºã®è¡¨ç¤ºã¨å¤‰æ›´æ“作ã—ã‹ãŠã“ãªãˆã¾ã›ã‚“。 + +2. データ入力順を変更ã™ã‚‹ã«ã¯ã€ãƒ•ォームオブジェクト上ã«ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’ç½®ãã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ã‚’押ã—ãŸã¾ã¾ã€æ¬¡ã®å…¥åЛ順ã«è¨­å®šã—ãŸã„オブジェクトã¾ã§ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’ドラッグã—ã¾ã™ã€‚

        ![](assets/en/FormEditor/entryOrder3.png)

        ã“れã«å¿œã˜ã¦ã€4D ã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›é †ã‚’èª¿æ•´ã—ã¾ã™ã€‚ + +3. 入力順を設定ã—ãŸã„ã ã‘ã€ã‚¹ãƒ†ãƒƒãƒ—2 を繰り返ã—ã¾ã™ã€‚ + +4. 入力順ã®è¨­å®šãŒçµ‚了ã—ãŸã‚‰ã€ãƒ„ールãƒãƒ¼ã®ä»–ã®ãƒ„ールをクリックã™ã‚‹ã‹ã€**フォーム** メニューã‹ã‚‰ **入力順** ã‚’é¸æŠžã—ã¾ã™ã€‚

        4Dã¯ã€ãƒ•ォームエディターã®é€šå¸¸æ“ä½œã«æˆ»ã‚Šã¾ã™ã€‚ + +> フォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã®å…¥åЛ順ã ã‘ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ フォームã®ãƒšãƒ¼ã‚¸0 や継承フォームã«å…¥åŠ›å¯ã‚ªãƒ–ジェクトãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒ•ォルトã®å…¥åŠ›é †ã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: 継承フォームã®ãƒšãƒ¼ã‚¸0 ã®ã‚ªãƒ–ジェクト→ 継承フォームã®ãƒšãƒ¼ã‚¸1 ã®ã‚ªãƒ–ジェクト→ é–‹ã‹ã‚Œã¦ã„るフォームã®ãƒšãƒ¼ã‚¸0 ã®ã‚ªãƒ–ジェクト→ é–‹ã‹ã‚Œã¦ã„るフォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã®ã‚ªãƒ–ジェクト。 + + +#### データ入力グループを使用ã™ã‚‹ + +入力順åºã‚’変更ã™ã‚‹éš›ã«ã€ãƒ•ォーム上ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚°ãƒ«ãƒ¼ãƒ—ã‚’é¸æŠžã—ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—内ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦æ¨™æº–ã®å…¥åЛ順åºã‚’é©ç”¨ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãƒ•ィールドãŒã‚°ãƒ«ãƒ¼ãƒ—や列ã«åˆ†ã‹ã‚Œã¦ã„るフォーム上ã§ã€ãƒ‡ãƒ¼ã‚¿å…¥åЛ順åºã‚’ç°¡å˜ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +データ入力グループを作æˆã™ã‚‹ã«ã¯: + +1. **フォーム** メニューã‹ã‚‰ *入力順* ã‚’é¸æŠžã™ã‚‹ã‹ã€ãƒ„ールãƒãƒ¼ã®å…¥åŠ›é †ãƒœã‚¿ãƒ³ã‚’ã‚¯ãƒªãƒƒã‚¯ã—ã¾ã™ã€‚ +2. データ入力用ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«æŒ‡å®šã—ãŸã„オブジェクトã®å‘¨å›²ã‚’マーキーã§å›²ã¿ã¾ã™ã€‚ + +マウスボタンを放ã™ã¨ã€ãƒžãƒ¼ã‚­ãƒ¼ã«å›²ã¾ã‚Œã¦ã„るオブジェクトやã€ãã®çŸ©å½¢ã«æŽ¥ã—ã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæ¨™æº–入力順ã«è¨­å®šã•れã¾ã™ã€‚ ãれ以外ã®ã‚ªãƒ–ジェクトã®ãƒ‡ãƒ¼ã‚¿å…¥åЛ順ã¯ã€å¿…è¦ã«å¿œã˜ã¦èª¿æ•´ã•れã¾ã™ã€‚ + +#### フィールドを入力順ã‹ã‚‰é™¤å¤–ã™ã‚‹ + +デフォルトã§ã¯ã€ã™ã¹ã¦ã®ãƒ•ォーカスå¯ã‚ªãƒ–ジェクトãŒå…¥åЛ順ã«çµ„ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ã€‚ ä»»æ„ã®ã‚ªãƒ–ジェクトを入力順ã‹ã‚‰é™¤å¤–ã™ã‚‹ã«ã¯: + +1. 入力順モードã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚ + +2. オブジェクト上㧠**Shift+クリック** ã—ã¾ã™ã€‚
        ã¾ãŸã¯ + +3. オブジェクト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **入力順ã‹ã‚‰å‰Šé™¤ã™ã‚‹** ã‚’é¸æŠžã—ã¾ã™ã€‚ + + + +## CSSプレビュー + +フォームエディターã§ã¯ã€CSSã®å€¤ã‚’é©ç”¨ã—ãŸçŠ¶æ…‹ã€ã¾ãŸã¯é©ç”¨ã—ãªã„状態ã§ãƒ•ォームを表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[スタイルシート](createStylesheet.md) ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ãƒ•ォーム (継承フォームã¨ã‚µãƒ–フォームをå«ã‚€) ã¯ãƒ‡ãƒ•ォルトã§ã€ç¾åœ¨ã® OS ã® CSSプレビューモードã§é–‹ã‹ã‚Œã¾ã™ã€‚ + + +### CSSプレビューモードã®é¸æŠž + +フォームエディターã®ãƒ„ールãƒãƒ¼ã«ã¯ã€ã‚¹ã‚¿ã‚¤ãƒ«ä»˜ãオブジェクトを表示ã™ã‚‹ãŸã‚ã® CSSボタンãŒã‚りã¾ã™: + +![](assets/en/FormEditor/cssToolbar.png) + +メニューã‹ã‚‰ã€ä»¥ä¸‹ã®ãƒ—レビューモードã®ã„ãšã‚Œã‹ã‚’é¸æŠžã—ã¾ã™: + +| ツールãƒãƒ¼ã‚¢ã‚¤ã‚³ãƒ³ | CSSプレビューモード | 説明 | +| ------------------------------------ | ----------- | ---------------------------------------------------------------- | +| ![](assets/en/FormEditor/cssNo.png) | ãªã— | CSS ã®å€¤ã¯ãƒ•ォームã«é©ç”¨ã•れãšã€CSS ã®å€¤ã‚„アイコンã¯ãƒ—ロパティリストã«è¡¨ç¤ºã•れã¾ã›ã‚“。 | +| ![](assets/en/FormEditor/cssWin.png) | Windows | Windowsプラットフォーム用㮠CSS値ãŒãƒ•ォームã«é©ç”¨ã•れã¾ã™ã€‚ プロパティリスト㫠CSSã®å€¤ã¨ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ | +| ![](assets/en/FormEditor/cssMac.png) | macOS | macOSプラットフォーム用㮠CSS値ãŒãƒ•ォームã«é©ç”¨ã•れã¾ã™ã€‚ プロパティリスト㫠CSSã®å€¤ã¨ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ | +> オブジェクトã«å¯¾ã—ã¦å¤§ãã™ãŽã‚‹ãƒ•ォントサイズãŒã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¾ãŸã¯ JSON ã§å®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã¯è‡ªå‹•çš„ã«ãƒ•ォントã«åˆã‚ã›ã¦ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ã•れã¾ã™ãŒã€ã‚ªãƒ–ジェクトã®ã‚µã‚¤ã‚ºã¯å¤‰æ›´ã•れã¾ã›ã‚“。 + +CSSプレビューモードã¯ã€[JSON vs スタイルシート](stylesheets.html#json-vs-スタイルシート) ã®é …ã§å®šç¾©ã—ãŸã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã¨ JSON属性ã«é©ç”¨ã•れる優先順ä½ã‚’åæ˜ ã—ã¾ã™ã€‚ + +CSSãƒ—ãƒ¬ãƒ“ãƒ¥ãƒ¼ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã¯è‡ªå‹•çš„ã«ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§å®šç¾©ã•れãŸã‚¹ã‚¿ã‚¤ãƒ« (ã‚れã°) ã§è¡¨ç¤ºã•れã¾ã™ã€‚ +> オブジェクトをコピーã¾ãŸã¯è¤‡è£½ã™ã‚‹ã¨ã€CSSå‚ç…§ (ã‚れã°) 㨠JSON値ã®ã¿ãŒã‚³ãƒ”ーã•れã¾ã™ã€‚ + + +### プロパティリスト㮠CSSサãƒãƒ¼ãƒˆ + +CSSプレビューモードã§ã¯ã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§å±žæ€§å€¤ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ãã®å±žæ€§åãŒè¡¨ç¤ºã•れã€ãã®æ¨ªã« CSSアイコンãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§å®šç¾©ã•れã¦ã„る属性値ã¯: + +```4d +.myButton { +font-family: comic sans; +font-size: 14; +stroke: #800080; +} +``` + +プロパティリスト㫠CSSアイコンã¨ã¨ã‚‚ã«è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/FormEditor/cssPpropList.png) + +スタイルシートã§å®šç¾©ã•れãŸå±žæ€§å€¤ã¯ã€JSONフォームã®è¨˜è¿°ã§ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (ãŸã ã—ã€CSS ã« `!important` 宣言ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã¯é™¤ãã¾ã™ã€‚後述å‚ç…§)。 ã“ã®å ´åˆã€ãƒ—ロパティリストã§ã¯ã€JSONフォームã®å€¤ãŒ **太字** ã§è¡¨ç¤ºã•れã¾ã™ã€‚ **Ctrl+クリック** (Windows) ã¾ãŸã¯ **Command+クリック** (macOs) ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã§ã€å€¤ã‚’スタイルシートã®å®šç¾©ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +> グループã€ã‚°ãƒ«ãƒ¼ãƒ—内ã®ã‚ªãƒ–ジェクトã€ã¾ãŸã¯è¤‡æ•°ã‚ªãƒ–ジェクトã®é¸æŠžç¯„囲内ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€`!important` 宣言ã¨ã¨ã‚‚ã«å±žæ€§ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ãã®å±žæ€§å€¤ã¯ãƒ­ãƒƒã‚¯ã•れã€ãƒ—ロパティリストã§å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +#### プロパティリスト CSSアイコン + +| アイコン | 説明 | +| ------------------------------------------ | ------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/cssIcon.png) | 属性値ãŒã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§å®šç¾©ã•れã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ | +| ![](assets/en/FormEditor/cssImportant.png) | 属性値ãŒã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§ `!important` 宣言ã¨ã¨ã‚‚ã«å®šç¾©ã•れã¦ã„ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ | +| ![](assets/en/FormEditor/cssIconMixed.png) | グループã¾ãŸã¯è¤‡æ•°ã®ã‚ªãƒ–ジェクトã®é¸æŠžé …ç›®ã®ã†ã¡ã€å°‘ãªãã¨ã‚‚ 1ã¤ã®ã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã§å®šç¾©ã•れãŸå±žæ€§å€¤ãŒä»–ã®ã‚ªãƒ–ジェクトã¨ç•°ãªã‚‹å ´åˆã«è¡¨ç¤ºã•れã¾ã™ã€‚ | + + + +## リストボックスビルダー + +**リストボックスビルダー** を使用ã—ã¦ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’ç´ æ—©ã作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 作æˆã—ãŸãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ã€ã™ãã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã€ãƒ•ォームエディターã§ç·¨é›†ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +リストボックスビルダーã§ã¯ã€ã„ãã¤ã‹ã®ç°¡å˜ãªæ“作ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ä½œæˆã¨å…¥åŠ›ãŒã§ãã¾ã™ã€‚ + + + +### リストボックスビルダーを使用ã™ã‚‹ + + +1. フォームエディターツールãƒãƒ¼ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ“ルダーアイコンをクリックã—ã¾ã™: + + ![](assets/en/FormEditor/listboxBuilderIcon.png) + + リストボックスビルダーãŒè¡¨ç¤ºã•れã¾ã™: + + ![](assets/en/FormEditor/listboxBuilder.png) + +2. **テーブル** ドロップダウンリストã‹ã‚‰ãƒ†ãƒ¼ãƒ–ãƒ«ã‚’é¸æŠžã—ã¾ã™: + + ![](assets/en/FormEditor/listboxBuilderTable.png) + +3. **フィールド** エリアã§ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è¡¨ç¤ºã™ã‚‹ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é¸æŠžã—ã¾ã™: + + ![](assets/en/FormEditor/listboxBuilderFields.png) + + デフォルトã§ã¯ã€ã™ã¹ã¦ã®ãƒ•ィールドãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚ フィールドã¯å€‹åˆ¥ã«é¸æŠž/é¸æŠžè§£é™¤ã™ã‚‹ã‹ã€**Ctrl+クリック** (Windows) ã¾ãŸã¯ **Cmd+クリック** (macOS) ã§ä¸€æ‹¬ã«é¸æŠž/é¸æŠžè§£é™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + ã¾ãŸã€ãƒ•ィールドをドラッグ&ドロップã™ã‚‹ã“ã¨ã§ã€ãƒ•ィールドã®é †ç•ªã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4. リストボックスをエンティティセレクションã¨ç´ã¥ã‘ã‚‹ãŸã‚ã®å¼ãŒã‚らã‹ã˜ã‚入力ã•れã¦ã„ã¾ã™: + + ![](assets/en/FormEditor/listboxBuilderExpression.png) + + ã“ã®å¼ã¯å¿…è¦ã«å¿œã˜ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +5. **コピー** ボタンをクリックã™ã‚‹ã¨ã€å…¨ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’メモリã«èª­ã¿è¾¼ã‚€å¼ãŒåˆæœŸåŒ–用ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ + + ![](assets/en/FormEditor/listboxBuilderCode.png) + +6. **ウィジェットをビルド** ボタンをクリックã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŒä½œæˆã•れã¾ã™ã€‚ + + ![](assets/en/FormEditor/listboxBuilderBuild.png) + +çµæžœã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã™: + +![](assets/en/FormEditor/listboxBuilderListbox.png) + + + + + + + + + +## ãƒãƒƒã‚¸ + +フォームエディターã§ã¯ãƒãƒƒã‚¸ã‚’使用ã—ã¦ã‚ªãƒ–ジェクトプロパティã®è¡¨ç¤ºã‚’容易ã«ã§ãã¾ã™ã€‚ ãƒãƒƒã‚¸ã¯ã€ãƒ•ォームã®ãƒ„ールãƒãƒ¼ã§é¸æŠžã—ã¾ã™: + +![](assets/en/FormEditor/shields.png) + + + + +ã“ã®æ©Ÿèƒ½ã¯æ¬¡ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™: å„ãƒãƒƒã‚¸ã¯ç‰¹å®šã®ãƒ—ロパティã«å¯¾å¿œã—ã¦ã„ã¾ã™ (ãŸã¨ãˆã°ã€**カレントビュー** ã¯ã€å½“該オブジェクトãŒã‚«ãƒ¬ãƒ³ãƒˆãƒ“ュー内ã«ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™)。 ãƒãƒƒã‚¸ã‚’有効ã«ã™ã‚‹ã¨ã€4D ã¯ãƒãƒƒã‚¸ã¨ã—ã¦é¸æŠžã•れãŸãƒ—ロパティãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るフォームオブジェクトã®å·¦ä¸Šã«å°ã•ãªã‚¢ã‚¤ã‚³ãƒ³ (ãƒãƒƒã‚¸) を表示ã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/shield.png) + +### ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹ + +ãƒãƒƒã‚¸ã‚’有効ã«ã™ã‚‹ã«ã¯ã€å¸Œæœ›ã™ã‚‹ãƒãƒƒã‚¸ãŒé¸æŠžã•れるã¾ã§ãƒ„ールãƒãƒ¼ã® *ãƒãƒƒã‚¸* ボタンをクリックã—ã¾ã™ã€‚ ã¾ãŸã€ãƒœã‚¿ãƒ³ã®å³å´ã‚’クリックã—ã¦è¡¨ç¤ºã•れるメニューã‹ã‚‰ã€ãƒãƒƒã‚¸ã®ç¨®é¡žã‚’ç›´æŽ¥é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + +ãƒãƒƒã‚¸ã‚’表示ã—ãŸããªã„å ´åˆã¯ã€**ãƒãƒƒã‚¸ãªã—** ã‚’é¸æŠžã—ã¾ã™ã€‚ +> アプリケーション環境設定ã®ãƒ•ォームページã§ã€ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã™ã‚‹ãƒãƒƒã‚¸ã‚’設定ã§ãã¾ã™ã€‚ + +### å„ãƒãƒƒã‚¸ã®èª¬æ˜Ž + +å„ãƒãƒƒã‚¸ã®èª¬æ˜Žã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +| アイコン | åç§° | 表示 | +| -------------------------------------------- | --------------------------- | -------------------------------------------------------------- | +| ![](assets/en/FormEditor/objectMethod.png) | オブジェクトメソッド | オブジェクトメソッドãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚ªãƒ–ジェクト | +| ![](assets/en/FormEditor/standardAction.png) | 標準アクション | 標準アクションãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚ªãƒ–ジェクト | +| ![](assets/en/FormEditor/resizing.png) | サイズ変更 | リサイズプロパティ㌠1ã¤ä»¥ä¸Šå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚ªãƒ–ジェクトã«ã¤ã„ã¦ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロパティã®çµ„ã¿åˆã‚ã›ã‚’表ã—ã¾ã™ | +| ![](assets/en/FormEditor/entryOrder.png) | 入力順 | 入力å¯èƒ½ãªã‚ªãƒ–ジェクトã®å…¥åŠ›é †ã‚’è¡¨ç¤ºã—ã¾ã™ | +| ![](assets/en/FormEditor/viewNumber.png) | カレントビュー | カレントビュー内ã«ã‚るオブジェクト | +| ![](assets/en/FormEditor/cssShield.png) | [スタイルシート](stylesheets.html) | 1ã¤ä»¥ä¸Šã®å±žæ€§å€¤ãŒã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆã«ã‚ˆã‚Šä¸Šæ›¸ãã•れãŸã‚ªãƒ–ジェクト | +| ![](assets/en/FormEditor/filter.png) | フィルター | 入力フィルターãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå…¥åŠ›å¯ã‚ªãƒ–ジェクト | +| ![](assets/en/FormEditor/helpTip.png) | ヘルプTips | ヘルプTips ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚ªãƒ–ジェクト | +| ![](assets/en/FormEditor/localized.png) | ローカライズ済㿠| ラベルã«å‚ç…§ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚ªãƒ–ジェクト (“:â€ã§å§‹ã¾ã‚‹ãƒ©ãƒ™ãƒ«)。 å‚ç…§ã¯ãƒªã‚½ãƒ¼ã‚¹ (STR#) ã¾ãŸã¯ XLIFFタイプ | +| ![](assets/en/FormEditor/noShields.png) | ãƒãƒƒã‚¸ãªã— | ãƒãƒƒã‚¸ã¯è¡¨ç¤ºã•れã¾ã›ã‚“ | + +## オブジェクトビュー + +フォームエディターã§ã¯ã€å¿…è¦ã«å¿œã˜ã¦è¡¨ç¤º/éžè¡¨ç¤ºãŒå¯èƒ½ãªç•°ãªã‚‹ãƒ“ューã«ãれãžã‚Œã‚ªãƒ–ジェクトをé…ç½®ã™ã‚‹ã“ã¨ã§ã€è¤‡é›‘ãªãƒ•ォーム作æˆãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ã‚¿ã‚¤ãƒ—ã”㨠(フィールドã€å¤‰æ•°ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクト等) ã«ã‚ªãƒ–ジェクトを異ãªã‚‹ãƒ“ューã«åˆ†ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ サブフォームやプラグインエリアをå«ã‚€ã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトをビューã«å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +フォームã”ã¨ã®ãƒ“ãƒ¥ãƒ¼ã®æ•°ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“。 å¿…è¦ãªã ã‘ã€ãƒ“ューを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãれãžã‚Œã®ãƒ“ューã”ã¨ã«ã€è¡¨ç¤º/éžè¡¨ç¤ºã¨ãƒ­ãƒƒã‚¯ãŒåˆ‡ã‚Šæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ + + +ビューã®ç®¡ç†ã¯ãƒ“ューパレットを使用ã—ã¦ãŠã“ãªã„ã¾ã™ã€‚ + +![](assets/en/FormEditor/viewEditor.png) + + +### ビューパレットã®è¡¨ç¤º + +ビューパレットを表示ã™ã‚‹ã«ã¯ã€æ¬¡ã® 3ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +* **ツールãƒãƒ¼**: フォームエディターã®ãƒ„ールãƒãƒ¼ã«ã‚るビューボタンをクリックã™ã‚‹ã€‚ (1ã¤ä»¥ä¸Šã®ã‚ªãƒ–ジェクトãŒãƒ‡ãƒ•ォルトビュー以外ã®ãƒ“ューã«å±žã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯å¡—り潰ã—表示ã•れã¾ã™)。 + + | デフォルトビューã®ã¿ | 追加ã®ãƒ“ューã‚り | + |:---------------------------------------------:|:----------------------------------------------:| + | ![](assets/en/FormEditor/icon.png "ビューã®ä½¿ç”¨ãªã—") | ![](assets/en/FormEditor/icon2.png "ビューã®ä½¿ç”¨ã‚り") | + +* **コンテキストメニュー** (フォームã¾ãŸã¯ã‚ªãƒ–ジェクト): フォームエディターã¾ãŸã¯ã‚ªãƒ–ジェクト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€**カレントビュー** ã‚’é¸æŠžã™ã‚‹ã€‚ + + ![](assets/en/FormEditor/contextMenu.png) + +é¸æŠžä¸­ã®ãƒ“ューã«ã¯ãƒã‚§ãƒƒã‚¯ãƒžãƒ¼ã‚¯ãŒä»˜ã„ã¦ã„ã¾ã™ (*例*: 上ã®ç”»åƒã§ã¯ "Work Address" ビューãŒé¸æŠžä¸­ã§ã™) + + +* **フォームメニュー**: **フォーム** メニューã‹ã‚‰ **ビューリスト** ã‚’é¸æŠžã™ã‚‹ã€‚ + +![](assets/en/FormEditor/formMenu.png) + + +### ビューを使ã„å§‹ã‚ã‚‹å‰ã« + +ビューを使用ã™ã‚‹å‰ã«çŸ¥ã£ã¦ãŠãã¹ãé‡è¦ãªã“ã¨ã‚’ã„ãã¤ã‹ç´¹ä»‹ã—ã¾ã™: + +* **利用ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ**: ビューã¯ç´”粋ã«è¡¨ç¤ºãƒ„ールã§ã‚りã€ãƒ•ォームエディター上ã®ã¿åŠ¹æžœãŒã‚りã¾ã™ã€‚プログラムã‹ã‚‰ãƒ“ューã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã‚Šã€ã‚¢ãƒ—リケーションモードã§ä½¿ç”¨ã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +* **ビューã¨ãƒšãƒ¼ã‚¸**: ã‚るビューã«ã¯ç•°ãªã‚‹ãƒ•ォームページ上ã®ã‚ªãƒ–ジェクトをå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ビューã®è¨­å®šã«ã‹ã‹ã‚らãšã€ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ (ãŠã‚ˆã³ãƒšãƒ¼ã‚¸0) ã®ã‚ªãƒ–ジェクトã®ã¿ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +* **ビューã¨ãƒ¬ãƒ™ãƒ«**: ビューã¯ã‚ªãƒ–ジェクトレベルã‹ã‚‰ç‹¬ç«‹ã—ã¦ã„ã¾ã™ã€‚ç•°ãªã‚‹ãƒ“ューã®é–“ã§è¡¨ç¤ºä¸Šã®éšŽå±¤ã¯ã‚りã¾ã›ã‚“。 + +* **ビューã¨ã‚°ãƒ«ãƒ¼ãƒ—**: カレントビューã«å±žã™ã‚‹ã‚ªãƒ–ジェクトåŒå£«ã®ã¿ã‚’グループ化ã§ãã¾ã™ã€‚ + +* **カレント/デフォルトビュー**: デフォルトビューã¯ãƒ•ã‚©ãƒ¼ãƒ ã®æœ€åˆã®ãƒ“ューã§ã€å‰Šé™¤ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。カレントビューã¯ç·¨é›†ä¸­ã®ãƒ“ューã§ã€åå‰ãŒå¤ªå­—ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + + + +### ãƒ“ãƒ¥ãƒ¼ç®¡ç† + +#### ビューã®ä½œæˆ + +フォーム内ã§ä½œæˆã•れãŸã‚ªãƒ–ジェクトã¯ã€ãã®ãƒ•ã‚©ãƒ¼ãƒ ã®æœ€åˆã®ãƒ“ュー ("View 1") ã«é…ç½®ã•れã¾ã™ã€‚ 最åˆã®ãƒ“ュー㯠**常ã«** デフォルトビューã§ã€åå‰ã®å¾Œã« (Default) ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ãƒ“ューã®åå‰ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒ ([ビューã®å称変更](#ビューã®å称変更) å‚ç…§)ã€ãƒ‡ãƒ•ォルトビューã§ã‚ã‚‹ã“ã¨ã«å¤‰ã‚りã¯ã‚りã¾ã›ã‚“。 + + +![](assets/en/FormEditor/createView.png) + +ビューを追加ã™ã‚‹ã«ã¯ 2ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™ã€‚ + +* ビューパレットã®ä¸‹éƒ¨ã«ã‚ã‚‹ **æ–°ã—ã„ビューを追加** ボタンをクリックã™ã‚‹ã€‚ + +![](assets/en/FormEditor/addView.png) + +* 既存ã®ãƒ“ューをå³ã‚¯ãƒªãƒƒã‚¯ã—㦠**ビューを追加** ã‚’é¸æŠžã™ã‚‹: + +![](assets/en/FormEditor/addView2.png) + +ãƒ“ãƒ¥ãƒ¼ã®æ•°ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“。 + +#### ビューã®å称変更 + +デフォルトã§ã¯ã€ãƒ“ューã®åå‰ã¯ "View" + ビュー番å·ã¨ãªã£ã¦ã„ã¾ã™ãŒã€å¯èª­æ€§ã®ãŸã‚ã¾ãŸã¯å¿…è¦æ€§ã«å¿œã˜ã¦ã€ã“れらã®åå‰ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ビューをå称変更ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®æ–¹æ³•ãŒã‚りã¾ã™: + +* ビューåを直接ダブルクリックã™ã‚‹ (ビューãŒé¸æŠžã•れã¾ã™)。 ã™ã‚‹ã¨ã€åå‰ãŒç·¨é›†å¯èƒ½ã«ãªã‚Šã¾ã™: + + ![](assets/en/FormEditor/rename.png) + +* ビューã®åå‰ã‚’å³ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã€‚ ã™ã‚‹ã¨ã€åå‰ãŒç·¨é›†å¯èƒ½ã«ãªã‚Šã¾ã™: + + ![](assets/en/FormEditor/rename2.png) + +#### ビューã®ä¸¦ã¹æ›¿ãˆ + +ビューパレット内ã®ãƒ“ューをドラッグ&ドロップã™ã‚‹ã“ã¨ã§ã€ãƒ“ューã®è¡¨ç¤ºé †ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãŸã ã—ã€ãƒ‡ãƒ•ォルトã®ãƒ“ューã¯å¤‰æ›´ã•れã¾ã›ã‚“: + +![](assets/en/FormEditor/reorderView.png) + + +#### ビューã®å‰Šé™¤ + +ビューをå称変更ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã„ãšã‚Œã‹ã®æ–¹æ³•ãŒã‚りã¾ã™: + +* ビューパレットã®ä¸‹éƒ¨ã«ã‚ã‚‹ **é¸æŠžã—ãŸãƒ“ューを削除** ボタンをクリックã™ã‚‹ã€‚ + + ![](assets/en/FormEditor/deleteView.png) + + +* 既存ã®ãƒ“ューをå³ã‚¯ãƒªãƒƒã‚¯ã—㦠**ビューを削除** ã‚’é¸æŠžã™ã‚‹: + + ![](assets/en/FormEditor/deleteView2.png) +> ビューを削除ã™ã‚‹ã¨ã€ãã®ä¸­ã®ã‚ªãƒ–ジェクトã¯è‡ªå‹•çš„ã«ãƒ‡ãƒ•ォルトビューã«ç§»å‹•ã—ã¾ã™ã€‚ + + + + +### ビューを使用ã™ã‚‹ + +ビューを作æˆã—ãŸã‚‰ã€ãƒ“ューパレットを使用ã—ã¦ä»¥ä¸‹ã®ã“ã¨ãŒãŠã“ãªãˆã¾ã™: + +* ビューã«ã‚ªãƒ–ジェクトを追加ã™ã‚‹ã€‚ +* オブジェクトを他ã®ãƒ“ューã«ç§»å‹•ã™ã‚‹ã€‚ +* åŒã˜ãƒ“ュー内ã®å…¨ã‚ªãƒ–ジェクトを 1クリックã§é¸æŠžã™ã‚‹ã€‚ +* ビューã”ã¨ã«è¡¨ç¤º/éžè¡¨ç¤ºã‚’切り替ãˆã‚‹ã€‚ +* ビューã®ã‚ªãƒ–ジェクトをロックã™ã‚‹ã€‚ + +#### ビューã«ã‚ªãƒ–ジェクトを追加ã™ã‚‹ + +1ã¤ã®ã‚ªãƒ–ジェクトã¯ã€1ã¤ã®ãƒ“ューã«ã®ã¿å±žã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ä»–ã®ãƒ“ューã«ã‚ªãƒ–ジェクトを作æˆã™ã‚‹ã«ã¯ã€ãƒ“ューパレットã§ç›®çš„ã®ãƒ“ューをクリックã—ã€ã‚らã‹ã˜ã‚é¸æŠžã—ã¦ãŠãã¾ã™ ([カレントビュー](#ビューを使ã„å§‹ã‚ã‚‹å‰ã«) ã«ç·¨é›†ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã€åå‰ãŒå¤ªå­—ã§è¡¨ç¤ºã•れã¾ã™)。 + +![](assets/en/FormEditor/addObject.png) + +#### ビュー間ã®ã‚ªãƒ–ジェクト移動 + +1ã¤ä»¥ä¸Šã®ã‚ªãƒ–ジェクトを他ã®ãƒ“ューã«ç§»å‹•ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“れをãŠã“ãªã†ã«ã¯ã€ãƒ“ューを変更ã—ãŸã„オブジェクトをフォーム上ã§é¸æŠžã—ã¾ã™ã€‚ ãれらã®ã‚ªãƒ–ジェクトãŒå±žã™ã‚‹ãƒ“ューãŒã€ãƒ“ューリスト上ã«è¨˜å·ã§ç¤ºã•れã¾ã™: + +![](assets/en/FormEditor/symbol.png) +> é¸æŠžã—ãŸã‚ªãƒ–ジェクトã¯ç•°ãªã‚‹ãƒ“ューã«å±žã—ã¦ã„ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ + +次ã«ç§»å‹•å…ˆã®ãƒ“ãƒ¥ãƒ¼ã‚’é¸æŠžã—ã€å³ã‚¯ãƒªãƒƒã‚¯ã—㦠**移行先** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/moveObject.png) + +OR + +次ã«ç§»å‹•å…ˆã®ãƒ“ãƒ¥ãƒ¼ã‚’é¸æŠžã—ã€ãƒ“ューパレットã®ä¸‹éƒ¨ã«ã‚ã‚‹ **é¸æŠžã•れãŸå…¨ã¦ã®ã‚ªãƒ–ジェクトをカレントã®ãƒ“ューã«ç§»å‹•** ボタンをクリックã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/moveObject3.png) + +é¸æŠžã•れã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ–°ã—ã„ビューã«ç§»å‹•ã•れã¾ã™: + +![](assets/en/FormEditor/objNewView.png) + +ã¾ãŸã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ã€ã‚ªãƒ–ジェクトを別ã®ãƒ“ューã«ç§»å‹•ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ オブジェクトをå³ã‚¯ãƒªãƒƒã‚¯ã—㦠**ビューã«ç§»å‹•** ã‚’é¸æŠžã—ã€åˆ©ç”¨å¯èƒ½ãªãƒ“ューã®ãƒªã‚¹ãƒˆã‹ã‚‰ç§»å‹•å…ˆã‚’é¸æŠžã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/moveObject2.png) +> [カレントビュー](#ビューを使ã„å§‹ã‚ã‚‹å‰ã«) ã¯å¤ªå­—ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + + + +#### ビューã®å…¨ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ + +フォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ä¸Šã§ã€åŒã˜ãƒ“ューã«å±žã™ã‚‹ã™ã¹ã¦ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã§ãã¾ã™ã€‚ 一連ã®ã‚ªãƒ–ジェクトã«åŒã˜å¤‰æ›´ã‚’é©ç”¨ã™ã‚‹å ´åˆã«ã€ã“ã®æ©Ÿèƒ½ã¯ä¾¿åˆ©ã§ã™ã€‚ + +ã“れをãŠã“ãªã†ã«ã¯ãƒ“ュー上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€**ビュー内ã®å…¨ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠž** をクリックã—ã¾ã™: + +![](assets/en/FormEditor/selectAll.png) + +ビューパレットã®ä¸‹éƒ¨ã«ã‚ã‚‹ **カレントビューã®å…¨ã¦ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠž** ボタンを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + +![](assets/en/FormEditor/selectAll2.png) + + +#### ビューã®ã‚ªãƒ–ジェクトを表示/éžè¡¨ç¤ºã«ã™ã‚‹ + +フォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ä¸Šã§ã€ãƒ“ューã«å±žã™ã‚‹ã‚ªãƒ–ジェクトã®è¡¨ç¤º/éžè¡¨ç¤ºã‚’切り替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ–¹æ³•ã§ã€ãƒ•ォームã®ç‰¹å®šã‚ªãƒ–ジェクトã«é›†ä¸­ã—ã¦æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +デフォルトã§ã™ã¹ã¦ã®ãƒ“ューãŒè¡¨ç¤ºã•れã¦ã„ã¦ã€ãƒ“ューã”ã¨ã® *表示ï¼éžè¡¨ç¤º* アイコンã§ç¤ºã•れã¦ã„ã¾ã™: + +![](assets/en/FormEditor/showHide.png) + +ビューを隠ã™ã«ã¯ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã—ã¾ã™ã€‚ アイコンãŒã‚°ãƒ¬ãƒ¼ã«ãªã‚Šã€ãã®ãƒ“ューã«å±žã™ã‚‹ã‚ªãƒ–ジェクトãŒéžè¡¨ç¤ºã¨ãªã‚Šã¾ã™: + +![](assets/en/FormEditor/hidden.png) +> [カレントビュー](#ビューを使ã„å§‹ã‚ã‚‹å‰ã«) ã¯éžè¡¨ç¤ºã«ã§ãã¾ã›ã‚“。 + +éžè¡¨ç¤ºã®ãƒ“ューを表示ã«ã™ã‚‹ã«ã¯ã€ãƒ“ãƒ¥ãƒ¼ã‚’é¸æŠžã™ã‚‹ã‹ã€*表示/éžè¡¨ç¤º* アイコンをクリックã—ã¾ã™ã€‚ + + + +#### ビューã®ã‚ªãƒ–ジェクトをロックã™ã‚‹ + +ビューã®ã‚ªãƒ–ジェクトをロックã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ロックã•れãŸã‚ªãƒ–ジェクトã¯é¸æŠžãƒ»å¤‰æ›´ãƒ»å‰Šé™¤ã§ããªããªã‚Šã¾ã™ã€‚ ã¾ãŸã€ã‚¯ãƒªãƒƒã‚¯ã‚„マウスドラッグã€**åŒã˜ç¨®é¡žã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠž** コマンドã§é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 ã“ã®æ©Ÿèƒ½ã¯ã€æ“作ミスを防ãã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã™ã¹ã¦ã®ãƒ“ューãŒãƒ­ãƒƒã‚¯ã•れã¦ã„ãªã„状態ã§ã™ã€‚ã“れã¯ã€ãƒ“ューã”ã¨ã® *ロック* アイコンã§ç¤ºã•れã¦ã„ã¾ã™: + +![](assets/en/FormEditor/lockUnlock.png) + +ビューをロックã™ã‚‹ã«ã¯ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã—ã¾ã™ã€‚ å—京錠ãŒé–‰ã¾ã‚Šã€ãƒ“ューãŒãƒ­ãƒƒã‚¯ã•れã¾ã™: + +![](assets/en/FormEditor/locked.png) +> [カレントビュー](#ビューを使ã„å§‹ã‚ã‚‹å‰ã«) ã¯ãƒ­ãƒƒã‚¯ã§ãã¾ã›ã‚“。 + +ビューã®ãƒ­ãƒƒã‚¯ã‚’解除ã™ã‚‹ã«ã¯ã€ãƒ“ãƒ¥ãƒ¼ã‚’é¸æŠžã™ã‚‹ã‹ã€*ロック* アイコンをクリックã—ã¾ã™ã€‚ + +## 拡大 + +カレントフォームを拡大/縮å°è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れをãŠã“ãªã†ã«ã¯ãƒ„ールãƒãƒ¼ã®è™«çœ¼é¡ã‚’クリックã™ã‚‹ã‹ã€æ‹¡å¤§çŽ‡ã‚’ç›´æŽ¥ã‚¯ãƒªãƒƒã‚¯ã—ã¾ã™ã€‚拡大/縮å°çŽ‡ã¯ 50%, 100%, 200%, 400% ãã—㦠800%ã§ã™ã€‚ + +![](assets/en/FormEditor/zoom.png) + +* 虫眼é¡ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ã‚«ãƒ¼ã‚½ãƒ«ã‚‚虫眼é¡ã«å¤‰ã‚りã¾ã™ã€‚ フォーム中をクリックã™ã‚Œã°æ‹¡å¤§è¡¨ç¤ºã•れã€Shiftキーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã™ã‚Œã°ç¸®å°è¡¨ç¤ºã•れã¾ã™ã€‚ +* 拡大率ãƒãƒ¼ã‚’クリックã™ã‚‹ã¨ã€å³åº§ã«è¡¨ç¤ºãŒå¤‰æ›´ã•れã¾ã™ã€‚ + +拡大/縮å°è¡¨ç¤ºä¸­ã‚‚ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®æ©Ÿèƒ½ã¯åˆ©ç”¨ã§ãã¾ã™ (*)。 + +(*) 技術的ãªç†ç”±ã‹ã‚‰ã€ãƒ•ォームエディターãŒã‚ºãƒ¼ãƒ ãƒ¢ãƒ¼ãƒ‰ã®æ™‚ã«ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¦ç´  (ヘッダーã€ã‚«ãƒ©ãƒ ã€ãƒ•ッター) ã‚’é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + + + + diff --git a/website/translated_docs/ja/FormEditor/forms.md b/website/translated_docs/ja/FormEditor/forms.md index ff83fa143c2340..90decd357baf93 100644 --- a/website/translated_docs/ja/FormEditor/forms.md +++ b/website/translated_docs/ja/FormEditor/forms.md @@ -1,129 +1,137 @@ --- id: forms -title: About 4D Forms +title: 4D フォームã«ã¤ã„㦠--- -## æ¦‚è¦ -Forms provide the interface through which information is entered, modified, and printed in a desktop application. Users interact with the data in a database using forms and print reports using forms. Forms can be used to create custom dialog boxes, palettes, or any featured custom window. +フォームã¯ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—アプリケーションã«ãŠã„ã¦ã€ãƒ‡ãƒ¼ã‚¿ã®å…¥åŠ›ãƒ»ä¿®æ­£ãƒ»å°åˆ·ã‚’ãŠã“ãªã†ãŸã‚ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã¨ãªã‚Šã¾ã™ã€‚ フォームを使用ã™ã‚‹ã“ã¨ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã‚’やりå–りã—ã€ãƒ¬ãƒãƒ¼ãƒˆã‚’å°åˆ·ã—ã¾ã™ã€‚ フォームを使用ã—ã¦ã€ã‚«ã‚¹ã‚¿ãƒ ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚„パレットã€ãã®ã»ã‹ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’作æˆã—ã¾ã™ã€‚ ![](assets/en/FormObjects/form1.png) -Forms can also contain other forms through the following features: - -- [subform objects](FormObjects/subform_overview.md) -- [inherited forms](properties_FormProperties.md#inherited-forms) - -## Creating forms - -You can add or modify 4D forms using the following elements: - -- **4D Developer interface:** Create new forms from the **File** menu or the **Explorer** window. -- **Form Editor**: Modify your forms using the **[Form Editor](FormEditor/formEditor.md)**. -- **JSON code:** Create and design your forms using JSON and save the form files at the [appropriate location](Project/architecture.md#sources-folder). 例: - - { - "windowTitle": "Hello World", - "windowMinWidth": 220, - "windowMinHeight": 80, - "method": "HWexample", - "pages": [ - null, - { - "objects": { - "text": { - "type": "text", - "text": "Hello World!", - "textAlign": "center", - "left": 50, - "top": 120, - "width": 120, - "height": 80 - }, - "image": { - "type": "picture", - "pictureFormat": "scaled", - "picture": "/RESOURCES/Images/HW.png", - "alignment":"center", - "left": 70, - "top": 20, - "width":75, - "height":75 - }, - "button": { - "type": "button", - "text": "OK", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } +ã¾ãŸã€ä»¥ä¸‹ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ãƒ•ォームã¯ä»–ã®ãƒ•ォームをå«ã‚€ã“ã¨ãŒã§ãã¾ã™: + +- [サブフォームオブジェクト](FormObjects/subform_overview.md) +- [継承フォーム](#継承フォーム) + + +## フォームを作æˆã™ã‚‹ + +4Dフォームã®è¿½åŠ ã‚„å¤‰æ›´ã¯ã€ä»¥ä¸‹ã®è¦ç´ ã‚’使ã£ã¦ãŠã“ãªã„ã¾ã™: + +- **4D Developer インターフェース:** **ファイル** メニューã¾ãŸã¯ **エクスプローラ** ウィンドウã‹ã‚‰æ–°è¦ãƒ•ォームを作æˆã§ãã¾ã™ã€‚ +- **フォームエディター**: フォームã®ç·¨é›†ã¯ **[フォームエディター](FormEditor/formEditor.md)** を使ã£ã¦ãŠã“ãªã„ã¾ã™ã€‚ +- **JSON コード:** JSON を使ã£ã¦ãƒ•ォームを作æˆãƒ»è¨­è¨ˆã—ã€ãƒ•ォーム ファイルを [é©åˆ‡ãªå ´æ‰€](Project/architecture.md#sources-フォルダー) ã«ä¿å­˜ã—ã¾ã™ã€‚ 例: + +``` +{ + "windowTitle": "Hello World", + "windowMinWidth": 220, + "windowMinHeight": 80, + "method": "HWexample", + "pages": [ + null, + { + "objects": { + "text": { + "type": "text", + "text": "Hello World!", + "textAlign": "center", + "left": 50, + "top": 120, + "width": 120, + "height": 80 + }, + "image": { + "type": "picture", + "pictureFormat": "scaled", + "picture": "/RESOURCES/Images/HW.png", + "alignment":"center", + "left": 70, + "top": 20, + "width":75, + "height":75 + }, + "button": { + "type": "button", + "text": "OK", + "action": "Cancel", + "left": 60, + "top": 160, + + + "width": 100, + "height": 20 } } - ] - } - + } + ] +} +``` -## Project form and Table form -There are two categories of forms: -* **Project forms** - Independent forms that are not attached to any table. They are intended more particularly for creating interface dialog boxes as well as components. Project forms can be used to create interfaces that easily comply with OS standards. +## プロジェクトフォームã¨ãƒ†ãƒ¼ãƒ–ルフォーム -* **Table forms** - Attached to specific tables and thus benefit from automatic functions useful for developing applications based on databases. Typically, a table has separate input and output forms. +2ã¤ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã®ãƒ•ォームãŒå­˜åœ¨ã—ã¾ã™: -Typically, you select the form category when you create the form, but you can change it afterwards. +* **プロジェクトフォーム** - テーブルã«å±žã•ãªã„独立ã—ãŸãƒ•ォームã§ã™ã€‚ ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒ•ォームã¯ã€ãŠã‚‚ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースダイアログボックスやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’作æˆã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ プロジェクトフォームを使用ã—ã¦ã‚ˆã‚Šç°¡å˜ã« OSæ¨™æº–ã«æº–æ‹ ã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを作æˆã§ãã¾ã™ã€‚ -## Form pages -Each form has is made of at least two pages: +* **テーブルフォーム** - 特定ã®ãƒ†ãƒ¼ãƒ–ルã«å±žã—ã¦ã„ã¦ã€ãれã«ã‚ˆã‚Šãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«åŸºã¥ãアプリケーションã®é–‹ç™ºã«ä¾¿åˆ©ãªè‡ªå‹•æ©Ÿèƒ½ã®æ©æµã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 通常ã€ãƒ†ãƒ¼ãƒ–ルã«ã¯å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ãŒåˆ¥ã€…ã«å­˜åœ¨ã—ã¾ã™ã€‚ -- a page 1: a main page, displayed by default -- a page 0: a background page, whose contents is displayed on every other page. +フォームを作æˆã™ã‚‹éš›ã«ãƒ•ã‚©ãƒ¼ãƒ ã‚«ãƒ†ã‚´ãƒªãƒ¼ã‚’é¸æŠžã—ã¾ã™ãŒã€å¾Œã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ -You can create multiple pages for an input form. If you have more fields or variables than will fit on one screen, you may want to create additional pages to display them. Multiple pages allow you to do the following: -- Place the most important information on the first page and less important information on other pages. -- Organize each topic on its own page. -- Reduce or eliminate scrolling during data entry. -- Provide space around the form elements for an attractive screen design. +## フォームã®ãƒšãƒ¼ã‚¸ -Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed. +å„フォームã¯ã€å°‘ãªãã¨ã‚‚ 2ã¤ã®ãƒšãƒ¼ã‚¸ã§æ§‹æˆã•れã¦ã„ã¾ã™: -There are no restrictions on the number of pages a form can have. The same field can appear any number of times in a form and on as many pages as you want. However, the more pages you have in a form, the longer it will take to display it. +- ページ1: デフォルトã§è¡¨ç¤ºã•れるメインページ +- ページ0: 背景ページ。ã“ã®ãƒšãƒ¼ã‚¸ä¸Šã«ç½®ã‹ã‚ŒãŸã‚ªãƒ–ジェクトã¯ã™ã¹ã¦ã®ãƒšãƒ¼ã‚¸ã§è¡¨ç¤ºã•れã¾ã™ -A multi-page form has both a background page and several display pages. Objects that are placed on the background page may be visible on all display pages, but can be selected and edited only on the background page. In multi-page forms, you should put your button palette on the background page. You also need to include one or more objects on the background page that provide page navigation tools for the user. +1ã¤ã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã«è¤‡æ•°ã®ãƒšãƒ¼ã‚¸ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 一画é¢ã«ç´ã¾ã‚Šãらãªã„æ•°ã®ãƒ•ィールドや変数ãŒã‚ã‚‹å ´åˆã¯ã€ã“れらを表示ã™ã‚‹ãŸã‚ã«ãƒšãƒ¼ã‚¸ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 複数ã®ãƒšãƒ¼ã‚¸ã‚’作æˆã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™: -## Inherited Forms +- ã‚‚ã£ã¨ã‚‚é‡è¦ãªæƒ…報を最åˆã®ãƒšãƒ¼ã‚¸ã«é…ç½®ã—ã€ä»–ã®æƒ…報を後ã‚ã®ãƒšãƒ¼ã‚¸ã«é…ç½®ã™ã‚‹ã€‚ +- トピックã”ã¨ã«ã€å°‚用ページã«ã¾ã¨ã‚る。 +- [入力順](../FormEditor/formEditor.html#データã®å…¥åЛ順)を設定ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿å…¥åЛ䏭ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«å‹•作を少ãªãã—ãŸã‚Šã€ã¾ãŸã¯ä¸è¦ã«ã™ã‚‹ã€‚ +- フォームè¦ç´ ã®å‘¨ã‚Šã®ç©ºé–“を広ã’ã€æ´—ç·´ã•れãŸç”»é¢ã‚’デザインã™ã‚‹ã€‚ -4D forms can use and be used as "inherited forms," meaning that all of the objects from *Form A* can be used in *Form B*. In this case, *Form B* "inherits" the objects from *Form A*. +複数ページã¯å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã«ã®ã¿å½¹ç«‹ã¡ã¾ã™ã€‚ å°åˆ·å‡ºåŠ›ã«ã¯å‘ãã¾ã›ã‚“。 マルãƒãƒšãƒ¼ã‚¸ãƒ•ォームをå°åˆ·ã™ã‚‹ã¨ã€æœ€åˆã®ãƒšãƒ¼ã‚¸ã—ã‹å°åˆ·ã•れã¾ã›ã‚“。 -References to an inherited form are always active: if an element of an inherited form is modified (button styles, for example), all forms using this element will automatically be modified. +フォームã®ãƒšãƒ¼ã‚¸æ•°ã«ã¯åˆ¶é™ãŒã‚りã¾ã›ã‚“。 フォーム内ã®è¤‡æ•°ãƒšãƒ¼ã‚¸ä¸Šã«åŒã˜ãƒ•ィールドを何度ã§ã‚‚表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãƒ•ォームã®ãƒšãƒ¼ã‚¸æ•°ãŒå¤šããªã‚‹ã»ã©ã€ãƒ•ォームã®è¡¨ç¤ºã«è¦ã™ã‚‹æ™‚é–“ãŒé•·ããªã‚Šã¾ã™ã€‚ -All forms (table forms and project forms) can be designated as an inherited form. However, the elements they contain must be compatible with use in different database tables. +マルãƒãƒšãƒ¼ã‚¸ãƒ•ォームã«ã¯ã€1ã¤ã®èƒŒæ™¯ãƒšãƒ¼ã‚¸ã¨è¤‡æ•°ã®è¡¨ç¤ºãƒšãƒ¼ã‚¸ãŒå­˜åœ¨ã—ã¾ã™ã€‚ 背景ページ上ã«ç½®ã‹ã‚ŒãŸã‚ªãƒ–ジェクトã¯ã™ã¹ã¦ã®è¡¨ç¤ºãƒšãƒ¼ã‚¸ã«ç¾ã‚Œã¾ã™ãŒã€ãれらã®ã‚ªãƒ–ジェクトã®é¸æŠžã‚„編集ã¯èƒŒæ™¯ãƒšãƒ¼ã‚¸ã§ã®ã¿å¯èƒ½ã§ã™ã€‚ 複数ページフォームã§ã¯ã€ãƒœã‚¿ãƒ³ãƒ‘レットを背景ページã«ç½®ãã¹ãã§ã™ã€‚ ã¾ãŸã€ãƒšãƒ¼ã‚¸ç§»å‹•ツールオブジェクトを背景ページã«é…ç½®ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æä¾›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -When a form is executed, the objects are loaded and combined in the following order: -1. Page zero of the inherited form -2. Page 1 of the inherited form -3. Page zero of the open form -4. Current page of the open form. +## 継承フォーム -This order determines the default entry order of objects in the form. +4D ã§ã¯ "継承フォーム" を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã¯ã¤ã¾ã‚Šã€*フォームA* ã®å…¨ã‚ªãƒ–ジェクト㌠*フォームB* ã§ä½¿ç”¨å¯èƒ½ã§ã‚ã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã“ã®å ´åˆã€*フォームB* 㯠*フォームA* ã‹ã‚‰ã‚ªãƒ–ジェクトを "継承" ã—ã¾ã™ã€‚ -> Only pages 0 and 1 of an inherited form can appear in other forms. +継承フォームã¸ã®å‚ç…§ã¯å¸¸ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã™ã€‚ãã®ãŸã‚ã€ç¶™æ‰¿ãƒ•ォームã®è¦ç´ ãŒå¤‰æ›´ã•れる㨠(ãŸã¨ãˆã°ã€ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«)ã€ã“ã®è¦ç´ ã‚’使用ã™ã‚‹å…¨ãƒ•ォームãŒè‡ªå‹•çš„ã«å¤‰æ›´ã•れã¾ã™ã€‚ -The properties and method of a form are not considered when that form is used as an inherited form. On the other hand, the methods of objects that it contains are called. +テーブルフォームãŠã‚ˆã³ãƒ—ロジェクトフォームã®ä¸¡æ–¹ã‚’継承フォームã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ ãŸã ã—ã€ç¶™æ‰¿ãƒ•ォームã«å«ã¾ã‚Œã‚‹è¦ç´ ã¯ã€ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã§ã®ä½¿ç”¨ã«å¯¾å¿œã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -To define an inherited form, the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) and [Inherited Form Table](properties_FormProperties.md#inherited-form-table) (for table form) properties must be defined in the form that will inherit something from another form. +フォームãŒå®Ÿè¡Œã•れるã¨ã€ã‚ªãƒ–ジェクトãŒãƒ­ãƒ¼ãƒ‰ã•ã‚Œã€æ¬¡ã®é †åºã§çµ„ã¿ç«‹ã¦ã‚‰ã‚Œã¾ã™: -A form can inherit from a project form, by setting the [Inherited Form Table](properties_FormProperties.md#inherited-form-table) property to **\** in the Property List (or " " in JSON). +1. 継承フォーム㮠0ページ +2. 継承フォーム㮠1ページ +3. é–‹ã‹ã‚ŒãŸãƒ•ォーム㮠0ページ +4. é–‹ã‹ã‚ŒãŸãƒ•ォームã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ -To stop inheriting a form, select **\** in the Property List (or " " in JSON) for the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) property. +ã“ã®é †åºã«ã‚ˆã‚Šã€ãƒ•ォームã«ãŠã‘るオブジェクト㮠[入力順](../FormEditor/formEditor.html#データã®å…¥åЛ順) ãŒæ±ºã¾ã‚Šã¾ã™ã€‚ + +> 継承フォーム㮠0ページ㨠1ページã ã‘ãŒä»–ã®ãƒ•ォームã«è¡¨ç¤ºå¯èƒ½ã§ã™ã€‚ + +継承フォームã¨ã—ã¦ä½¿ç”¨ã•れる場åˆã€ç¶™æ‰¿ãƒ•ォームã®ãƒ—ロパティã¨ãƒ•ォームメソッドã¯ä½¿ç”¨ã•れã¾ã›ã‚“。 ä»–æ–¹ã€ç¶™æ‰¿ãƒ•ォームã«å«ã¾ã‚Œã‚‹ã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å‘¼ã³å‡ºã•れã¾ã™ã€‚ + +継承フォームを設定ã™ã‚‹ã«ã¯ã€ä»–ã®ãƒ•ォームを継承ã™ã‚‹ãƒ•ォームã«ãŠã„ã¦ã€[継承ã•れãŸãƒ•ォームå](properties_FormProperties.md#継承ã•れãŸãƒ•ォームå) ãŠã‚ˆã³ [継承ã•れãŸãƒ•ォームテーブル](properties_FormProperties.md#継承ã•れãŸãƒ•ォームテーブル) (テーブルフォームã®å ´åˆ) プロパティを設定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +プロジェクトフォームを継承ã™ã‚‹ã«ã¯ [継承ã•れãŸãƒ•ォームテーブル](properties_FormProperties.md#継承ã•れãŸãƒ•ォームテーブル) プロパティ㧠**<ãªã—>** ã‚’é¸æŠžã—ã¾ã™ (JSON ã®å ´åˆã¯ " ")。 + +フォームã®ç¶™æ‰¿ã‚’ã‚„ã‚ã‚‹ã«ã¯ã€ãƒ—ロパティリスト㮠[継承ã•れãŸãƒ•ォームå](properties_FormProperties.md#継承ã•れãŸãƒ•ォームå) プロパティ㧠**<ãªã—>** オプション (JSONã®å ´åˆã¯ " ") ã‚’é¸æŠžã—ã¾ã™ã€‚ +> ä»»æ„ã®ãƒ•ォームã§ç¶™æ‰¿ãƒ•ォームを設定ã—ã€ãã®ãƒ•ォームを第3ã®ãƒ•ォームã®ç¶™æ‰¿ãƒ•ォームã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å†å¸°çš„ãªæ–¹æ³•ã§å„オブジェクトãŒé€£çµã•れã¾ã™ã€‚ 4Dã¯ã€å†å¸°çš„ループを見ã¤ã‘出㗠(ãŸã¨ãˆã°ã€[テーブル1]フォーム1 ㌠[テーブル1]フォーム1 を継承フォームã¨ã—ã¦å®šç¾©ã—ã¦ã„ã‚‹ã€ã¤ã¾ã‚Šè‡ªåˆ†è‡ªèº«ã‚’継承ã—ã¦ã„ã‚‹å ´åˆ)ã€ãƒ•ォームã®é€£éŽ–ã‚’ä¸­æ–­ã—ã¾ã™ã€‚ -> It is possible to define an inherited form in a form that will eventually be used as an inherited form for a third form. The combining of objects takes place in a recursive manner. 4D detects recursive loops (for example, if form [table1]form1 is defined as the inherited form of [table1]form1, in other words, itself) and interrupts the form chain. ## プロパティ一覧 -[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) \ No newline at end of file +[フォームタイプ](properties_FormProperties.md#フォームタイプ) - [フォームå](properties_FormProperties.md#フォームå) - [継承ã•れãŸãƒ•ォームテーブル](properties_FormProperties.md#継承ã•れãŸãƒ•ォームテーブル) - [継承ã•れãŸãƒ•ォームå](properties_FormProperties.md#継承ã•れãŸãƒ•ォームå) - [ウィンドウタイトル](properties_FormProperties.md#ウィンドウタイトル) - [é…置を記憶](properties_FormProperties.md#é…置を記憶) - [サブフォームã¨ã—ã¦å…¬é–‹](properties_FormProperties.md#サブフォームã¨ã—ã¦å…¬é–‹) - [固定幅](properties_WindowSize.md#固定幅) - [最å°å¹…](properties_WindowSize.md#最大幅-最å°å¹…) - [最大幅](properties_WindowSize.md#最大幅-最å°å¹…) - [固定高ã•](properties_WindowSize.md#固定高ã•) - [最å°é«˜ã•](properties_WindowSize.md#最大高ã•-最å°é«˜ã•) - [最大高ã•](properties_WindowSize.md#最大高ã•-最å°é«˜ã•) - [å°åˆ·è¨­å®š](properties_Print.md#設定) - [連çµãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼](properties_Menu.md#連çµãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼) - [フォームヘッダー](properties_Markers.md#フォームヘッダー) - [フォーム詳細](properties_Markers.md#フォーム詳細) - [フォームブレーク](properties_Markers.md#フォームブレーク) - [フォームフッター](properties_Markers.md#フォームフッター) - [メソッド](properties_Action.md#メソッド) - [Pages](properties_FormProperties.md#pages) diff --git a/website/translated_docs/ja/FormEditor/macros.md b/website/translated_docs/ja/FormEditor/macros.md new file mode 100644 index 00000000000000..b796e5973d0c05 --- /dev/null +++ b/website/translated_docs/ja/FormEditor/macros.md @@ -0,0 +1,333 @@ +--- +id: macros +title: フォームエディターマクロ +--- + + +4D ã®ãƒ•ォームエディターã¯ãƒžã‚¯ãƒ­ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ 1ã¤ä»¥ä¸Šã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ãŸã‚ã®æŒ‡ç¤ºã‚’マクロã¨å‘¼ã³ã¾ã™ã€‚ 呼ã³å‡ºã•れるã¨ã€ãƒžã‚¯ãƒ­ã¯ç™»éŒ²ã•ã‚ŒãŸæŒ‡ç¤ºã‚’実行ã—ã€è‡ªå‹•çš„ã«æŒ‡å®šã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãŠã“ãªã„ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€å®šæœŸãƒ¬ãƒãƒ¼ãƒˆã«ç‰¹å®šã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒæŒ‡å®šã•れã¦ã„ã‚‹å ´åˆ (例: テキストã«ã‚ˆã£ã¦ãƒ•ォントカラーãŒèµ¤ã‚„ç·‘ã§ã‚ã‚‹ãªã©)ã€ãƒžã‚¯ãƒ­ã‚’作æˆã—ã¦ãƒ•ォントカラーã®è¨­å®šã‚’自動ã§ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 4Dフォームエディターã®ãƒžã‚¯ãƒ­ã§ã¯ã€æ¬¡ã®ã“ã¨ãŒãŠã“ãªãˆã¾ã™: + +* 4Dコードを作æˆãƒ»å®Ÿè¡Œã™ã‚‹ +* ダイアログを表示ã™ã‚‹ +* ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ +* フォームやフォームオブジェクトãŠã‚ˆã³ãれらã®ãƒ—ロパティを追加・編集・削除ã™ã‚‹ +* プロジェクトファイルを編集ã™ã‚‹ (更新・削除) + +フォームエディター用ã®ã‚«ã‚¹ã‚¿ãƒ æ©Ÿèƒ½ã‚’定義ã™ã‚‹ãŸã‚ã€ãƒžã‚¯ãƒ­ã‚³ãƒ¼ãƒ‰ã¯ [クラス関数](Concepts/classes.md) 㨠[JSON ã®ãƒ•ォームオブジェクトプロパティ](FormObjects/properties_Reference.md) を使用ã§ãã¾ã™ã€‚ + +ホストプロジェクトãŠã‚ˆã³ã€ãƒ—ロジェクト内ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ã¦ãƒžã‚¯ãƒ­ã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 通常ã¯é–‹ç™ºç”¨ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ãƒžã‚¯ãƒ­ã‚’インストールã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +マクロãŒå‘¼ã³å‡ºã•れるã¨ã€æŒ‡å®šã•れã¦ã„る既存ã®å‹•作ã¯ãƒžã‚¯ãƒ­ã«ã‚ˆã£ã¦ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã•れã¾ã™ã€‚ + +## 例題 + +フォームã®å·¦ä¸Šã« "Hello World" アラートボタンを追加ã™ã‚‹ãƒžã‚¯ãƒ­ã‚’作æˆã—ã¾ã™ã€‚ + +1. プロジェクト㮠`Sources` フォルダー内ã«é…ç½®ã•れ㟠`formMacros.json` ファイルã«ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: + +```js +{ + "macros": { + "Add Hello World button": { + "class": "AddButton" + } + } +} +``` + +2. 次ã«ã€`AddButton` ã¨ã„ã†åå‰ã® 4Dクラスを作æˆã—ã¾ã™ã€‚ + +3. `AddButton` ã‚¯ãƒ©ã‚¹ã«æ¬¡ã®é–¢æ•°ã‚’定義ã—ã¾ã™: + +```4d +Function onInvoke($editor : Object)->$result : Object + + var $btnHello : Object + + // "Hello" ボタンを作æˆã—ã¾ã™ + $btnHello:=New object("type"; "button"; \ + "text"; "Hello World!"; \ + "method"; New object("source"; "ALERT(\"Hello World!\")"); \ + "events"; New collection("onClick"); \ + "width"; 120; \ + "height"; 20; \ + "top"; 0; \ + "left"; 0) + + // ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã«ãƒœã‚¿ãƒ³ã‚’追加ã—ã¾ã™ + $editor.editor.currentPage.objects.btnHello:=$btnHello + + // ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ä¸Šã§æ–°è¦ä½œæˆã—ãŸãƒœã‚¿ãƒ³ã‚’é¸æŠžã—ã¾ã™ + $editor.editor.currentSelection.clear() //unselect elements + $editor.editor.currentSelection.push("btnHello") + + // 4D ã«å¤‰æ›´å†…容を通知ã—ã¾ã™ + $result:=New object("currentSelection"; $editor.editor.currentSelection;\ + "currentPage"; $editor.editor.currentPage) +``` + +マクロを呼ã³å‡ºã—ã¾ã™: ![](assets/en/FormEditor/macroex1.png) ![](assets/en/FormEditor/macroex2.png) + + +## フォームエディターã§ãƒžã‚¯ãƒ­ã‚’呼ã³å‡ºã™ + +4Dプロジェクトã«ãƒžã‚¯ãƒ­ãŒå®šç¾©ã•れã¦ã„ã‚‹ã¨ã€ãƒ•ォームエディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使ã£ã¦ãƒžã‚¯ãƒ­ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/FormEditor/macroSelect.png) + +ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ `formMacros.json` [マクロ定義ファイル](#マクロファイルã®å ´æ‰€) ã‚’ã‚‚ã¨ã«ä½œæˆã•れã¦ã„ã¾ã™ã€‚ マクロメニュー項目ã¯ABCé †ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ã€ãƒ•ォームエディター内ã§å³ã‚¯ãƒªãƒƒã‚¯ã«ã‚ˆã‚Šé–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ é¸æŠžã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒã‚る状態やã€ãƒ•ォームオブジェクトã®ä¸Šã§ãƒžã‚¯ãƒ­ã‚’呼ã³å‡ºã—ãŸå ´åˆã¯ã€ãれらã®ã‚ªãƒ–ジェクトåãŒãƒžã‚¯ãƒ­ã® [`onInvoke`](#oninvoke) 関数㮠`$editor.currentSelection` ã‚„ `$editor.target` パラメーターã«å—ã‘æ¸¡ã•れã¾ã™ã€‚ + +1ã¤ã®ãƒžã‚¯ãƒ­ã«ã‚ˆã£ã¦è¤‡æ•°ã®å‡¦ç†ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ マクロã§å®Ÿè¡Œã—ãŸå‡¦ç†ã¯ã€ãƒ•ォームエディター㮠**å–り消ã—** 機能ã§ã‚‚ã¨ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## マクロファイルã®å ´æ‰€ + +4Dフォームエディターマクロã¯ã€ãƒ—ロジェクトã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã”ã¨ã« 1ã¤ã® JSONファイルã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™: `FormMacros.json`。 + +ã“ã®ãƒ•ァイルã¯ã€ãƒ›ã‚¹ãƒˆã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãƒ—ロジェクト㮠**Project** > **Sources** フィルダーã«é…ç½®ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +![](assets/en/FormEditor/macroStructure.png) + + + +## マクロã®å®£è¨€ + +`formMacros.json` ãƒ•ã‚¡ã‚¤ãƒ«ã®æ§‹é€ ã¯æ¬¡ã®é€šã‚Šã§ã™: + +```js +{ + "macros": { + : { + "class": , + : + } + } +} +``` + +JSONファイルã®èª¬æ˜Žã§ã™: + +| 属性 | | | タイプ | 説明 | +| ------ | ------------------- | ------------------------ | ------ | -------------------------- | +| macros | | | object | 定義ã•れãŸãƒžã‚¯ãƒ­ã®ãƒªã‚¹ãƒˆ | +| | `` | | object | マクロ定義 | +| | | class | string | マクロクラスå | +| | | `` | any | (ä»»æ„) コンストラクターã«ã‚ˆã£ã¦å–å¾—ã™ã‚‹ã‚«ã‚¹ã‚¿ãƒ å€¤ | + +カスタムプロパティã¯ãƒžã‚¯ãƒ­ã® [constructor](#class-constructor) 関数ã«å—ã‘æ¸¡ã•れã¾ã™ã€‚ + +### 例題 + +```js +{ + "macros": { + "Open Macros file": { + "class": "OpenMacro" + }, + "Align to Right on Target Object": { + "class": "AlignOnTarget", + "myParam": "right" + }, + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + + + +## マクロã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ– + +プロジェクトãŠã‚ˆã³ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ãŠã„ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã™ã‚‹ãƒžã‚¯ãƒ­ã¯ã€ãれãžã‚Œ [4Dクラス](Concepts/classes.md) ã¨ã—ã¦å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +クラスã®åç§°ã¯ã€`formMacros.json` ファイル㧠[class](#マクロã®å®£è¨€) 属性ã«å®šç¾©ã—ãŸåå‰ã¨åŒä¸€ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +マクロã¯ã€ã‚¢ãƒ—リケーションã®èµ·å‹•時ã«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ ãã®ãŸã‚ã€é–¢æ•°ã®è¿½åŠ ã‚„ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã®ç·¨é›†ãªã©ã€ãƒžã‚¯ãƒ­ã‚¯ãƒ©ã‚¹ã«ãªã‚“らã‹ã®å¤‰æ›´ã‚’加ãˆãŸå ´åˆã«ã¯ã€ãã‚Œã‚‰ã‚’åæ˜ ã™ã‚‹ã«ã¯ã‚¢ãƒ—リケーションをå†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + + +## マクロ関数 + +マクロクラスã¯ã€1ã¤ã® `Class constructor` ã®ã»ã‹ã«ã€`onInvoke()` ãŠã‚ˆã³ `onError()` ã¨ã„ㆠ2ã¤ã®é–¢æ•°ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +### Class constructor + +#### Class constructor($macro : Object) + +| 引数 | タイプ | 説明 | +| ------ | ------ | ---------------------------------- | +| $macro | オブジェクト | `formMacros.json` ファイルã®ãƒžã‚¯ãƒ­å®£è¨€ã‚ªãƒ–ジェクト | + +[Class constructor](Concepts/classes.md#class-constructor) 関数ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ãƒžã‚¯ãƒ­ã¯ãれã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ã€‚ + +アプリケーションã®èµ·å‹•時ã«ã‚¯ãƒ©ã‚¹ãŒã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れる際ã«ã€ã“ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ + +[マクロã®å®£è¨€](#マクロã®å®£è¨€) ã«è¿½åŠ ã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ—ロパティã¯ã€ã‚¯ãƒ©ã‚¹ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ãŒå¼•æ•°ã¨ã—ã¦å—ã‘å–りã¾ã™ã€‚ + + + +#### 例題 + +`formMacros.json` ãƒ•ã‚¡ã‚¤ãƒ«ã«æ¬¡ã®ã‚ˆã†ãªãƒžã‚¯ãƒ­å®£è¨€ã‚’ã—ãŸå ´åˆ: + +```js +{ + "macros": { + "最後ã«é¸æŠžã—ãŸã‚ªãƒ–ジェクトを基準ã«å·¦æƒãˆ": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + +以下ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```4d +// クラス "AlignOnTarget" +Class constructor($macro : Object) + This.myParameter:=$macro.myParam // left ... +``` + + +### onInvoke() + +#### onInvoke($editor : Object) -> $result : Object + +| 引数 | タイプ | 説明 | +| ------- | ------ | --------------------------------------------- | +| $editor | オブジェクト | フォームプロパティを格ç´ã™ã‚‹ Form Editor Macro Proxy オブジェクト | +| $result | オブジェクト | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸãƒ•ォームプロパティ (ä»»æ„) | + +マクロãŒå‘¼ã³å‡ºã•れるãŸã³ã«ã€`onInvoke` 関数ãŒè‡ªå‹•çš„ã«å®Ÿè¡Œã•れã¾ã™ã€‚ + +呼ã³å‡ºã—ã®éš›ã€é–¢æ•°ã¯ `$editor.editor` プロパティã«ã€ãƒ•ォームã®å…¨è¦ç´ ã¨ãれらã®ç¾åœ¨å€¤ã®ã‚³ãƒ”ーをå—ã‘å–りã¾ã™ã€‚ ã¤ã¾ã‚Šã€ã“れらã®ãƒ—ロパティã«å¯¾ã—ã¦ã€ä»»æ„ã®å‡¦ç†ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +マクロã«ã‚ˆã£ã¦ã‚ªãƒ–ジェクトを変更・追加・削除ã—ãŸå ´åˆã€æ“ä½œã‚’åæ˜ ã•ã›ã‚‹ã«ã¯æœ€å¾Œã«çµæžœã®ãƒ—ロパティを `$result` ã«è¿”ã—ã¾ã™ã€‚ è¿”ã•れãŸãƒ—ロパティã¯è§£æžã•れã€ãƒ•ォームã«å¯¾ã—ã¦å¤‰æ›´ãŒé©ç”¨ã•れã¾ã™ã€‚ 戻り値ã«å«ã¾ã‚Œã‚‹ãƒ—ロパティãŒå°‘ãªã„ã»ã©ã€ã“ã®å‡¦ç†ã«ã‹ã‹ã‚‹æ™‚間も削減ã•れã¾ã™ã€‚ + +*$editor* 引数ã«ã¦æ¸¡ã•ã‚Œã‚‹ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ¬¡ã®é€šã‚Šã§ã™: + +| プロパティ | タイプ | 説明 | +| -------------------------------- | ------ | -------------------------------- | +| $editor.editor.form | オブジェクト | フォーム全体 | +| $editor.editor.file | File | フォームファイル㮠Fileオブジェクト | +| $editor.editor.name | String | フォームã®åç§° | +| $editor.editor.table | number | フォームã®ãƒ†ãƒ¼ãƒ–ル番å·ã€‚プロジェクトフォームã®å ´åˆã¯ 0。 | +| $editor.editor.currentPageNumber | number | ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã®ç•ªå· | +| $editor.editor.currentPage | オブジェクト | ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ (フォームオブジェクトãŠã‚ˆã³å…¥åЛ順åºã‚’æ ¼ç´) | +| $editor.editor.currentSelection | コレクション | é¸æŠžã•れã¦ã„るオブジェクトã®åç§°ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| $editor.editor.formProperties | オブジェクト | カレントフォームã®ãƒ—ロパティ | +| $editor.editor.target | string | マクロ呼ã³å‡ºã—時ã«ãƒžã‚¦ã‚¹ã‚«ãƒ¼ã‚½ãƒ«ãŒç½®ã‹ã‚Œã¦ã„るオブジェクトã®åç§° | + +マクロã«ã‚ˆã‚‹å¤‰æ›´ã‚’フォームã«å映ã•ã›ãŸã„å ´åˆã«ã€`$result` ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ¸¡ã›ã‚‹ãƒ—ロパティã®ä¸€è¦§ã§ã™ã€‚ ã„ãšã‚Œã®ãƒ—ロパティも任æ„ã§ã™: + +| プロパティ | タイプ | 説明 | +| ----------------- | ------ | --------------------------------- | +| currentPage | オブジェクト | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸã‚ªãƒ–ジェクトをå«ã‚€ currentPage | +| currentSelection | コレクション | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れ㟠currentSelection | +| formProperties | オブジェクト | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れ㟠formProperties | +| editor.groups | オブジェクト | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸã‚°ãƒ«ãƒ¼ãƒ—情報 | +| editor.views | オブジェクト | マクロã«ã‚ˆã£ã¦å¤‰æ›´ã•れãŸãƒ“ュー情報 | +| editor.activeView | String | 有効ãªãƒ“ューå | + + +ãŸã¨ãˆã°ã€currentPage 㨠editor.groups ã®å†…容ãŒå¤‰ã‚ã£ãŸå ´åˆã«ã¯ã€æˆ»ã‚Šå€¤ã‚’次ã®ã‚ˆã†ã«è¨­å®šã—ã¾ã™: + +```4d + $result:=New object("currentPage"; $editor.editor.currentPage ; \ + "editor"; New object("groups"; $editor.editor.form.editor.groups)) + +``` + + +#### `method` 属性 + +フォームオブジェクト㮠`method` 属性をæ“作ã™ã‚‹å ´åˆã€å±žæ€§å€¤ã¯2é€šã‚Šã®æ–¹æ³•ã§å®šç¾©ã§ãã¾ã™: + +- [メソッドファイルåã‚ã‚‹ã„ã¯ãƒ‘スを指定ã™ã‚‹æ–‡å­—列](FormObjects/properties_Action.md#メソッド) ã®ä½¿ç”¨ + +- æ¬¡ã®æ§‹é€ ã‚’æŒã¤ã‚ªãƒ–ジェクトã®ä½¿ç”¨: + +| プロパティ | タイプ | 説明 | +| ----- | --- | -- | +| | | | + source|文字列|メソッドコード| + +後者ã®å ´åˆã€4D 㯠"objectMethods" フォルダー内ã«å½“該オブジェクトåを冠ã—ãŸãƒ•ァイルを作æˆã—ã€`source` å±žæ€§ã«æŒ‡å®šã—ãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚³ãƒ¼ãƒ‰ã‚’æ ¼ç´ã—ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ãƒžã‚¯ãƒ­ã‚³ãƒ¼ãƒ‰ã®å ´åˆã«ã®ã¿æœ‰åйã§ã™ã€‚ + +#### `currentPage.objects` ã® `$4dId` プロパティ + +`$4dId` プロパティã¯ã€ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã«ã‚ã‚‹å„オブジェクトã«ã¤ã„ã¦ä¸€æ„ã®IDを定義ã—ã¾ã™ã€‚ ã“ã®ã‚­ãƒ¼ã¯`$result.currentPage` ã®å¤‰æ›´ã‚’åæ˜ ã•ã›ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™: + +- フォーム上ãŠã‚ˆã³ `$result` 内ã®ã‚ªãƒ–ジェクトã®ä¸¡æ–¹ã§ `$4dId` キーãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã®ã‚ªãƒ–ジェクトã¯ä½œæˆã•れã¾ã™ã€‚ +- フォーム上ã§å­˜åœ¨ã™ã‚‹ `$4dId` キーãŒã€`$result` 内ã«ã¯å­˜åœ¨ã—ãªã„å ´åˆã€å½“該オブジェクトã¯å‰Šé™¤ã•れã¾ã™ã€‚ +- フォーム上ãŠã‚ˆã³ `$result` 内ã®ã‚ªãƒ–ジェクトã®ä¸¡æ–¹ã§ `$4dId` キーãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãã®ã‚ªãƒ–ジェクトã¯å¤‰æ›´ã•れã¾ã™ã€‚ + + +#### 例題 + +é¸æŠžã•れã¦ã„るオブジェクトã«å¯¾ã—ã¦ã€ãƒ•ォントカラーを赤ã«ã€ãƒ•ォントスタイルをイタリックã«å¤‰æ›´ã™ã‚‹ãƒžã‚¯ãƒ­é–¢æ•°ã‚’定義ã—ã¾ã™ã€‚ + +```4d +Function onInvoke($editor : Object)->$result : Object + var $name : Text + + If ($editor.editor.currentSelection.length>0) + // é¸æŠžã•れã¦ã„ã‚‹å„オブジェクト㮠stroke 属性を red ã«ã€style 属性を italic ã«è¨­å®šã—ã¾ã™ + For each ($name; $editor.editor.currentSelection) + $editor.editor.currentPage.objects[$name].stroke:="red" + $editor.editor.currentPage.objects[$name].fontStyle:="italic" + + End for each + + Else + ALERT("ãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¦ãã ã•ã„。") + End if + + // 4Dã«å¤‰æ›´ã‚’通知ã—ã¾ã™ + $result:=New object("currentPage"; $editor.editor.currentPage) +``` + + +### onError() + +#### onError($editor : Object; $resultMacro : Object ; $error : Collection) + +| 引数 | | タイプ | 説明 | +| ------------ | --------------------- | ------ | ------------------------------------ | +| $editor | | オブジェクト | [onInvoke](#oninvoke) ã«æ¸¡ã•れãŸã‚ªãƒ–ジェクト | +| $resultMacro | | オブジェクト | [onInvoke](#oninvoke) ã«ã‚ˆã£ã¦è¿”ã•れãŸã‚ªãƒ–ジェクト | +| $error | | コレクション | エラースタック | +| | [].errCode | 数値 | エラーコード | +| | [].message | テキスト | エラーã®è©³ç´° | +| | [].componentSignature | テキスト | 内部コンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚·ã‚°ãƒãƒãƒ£ãƒ¼ | + +マクロã®å®Ÿè¡Œæ™‚ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã€`onError` 関数ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ + +マクロã®å®Ÿè¡Œæ™‚ã«ç™ºç”Ÿã—ãŸã‚¨ãƒ©ãƒ¼ãŒã€ãƒžã‚¯ãƒ­ã®å–り消ã—ã‚’ä¸å¯èƒ½ã«ã™ã‚‹å†…容ã®å ´åˆã€ãƒžã‚¯ãƒ­ã¯å®Ÿè¡Œã•れã¾ã›ã‚“。 ãŸã¨ãˆã°æ¬¡ã®ã‚ˆã†ãªå ´åˆãŒè©²å½“ã—ã¾ã™: + +- 読ã¿å–り専用ファイルã®ã‚¹ã‚¯ãƒªãƒ—トを変更・削除ã—よã†ã¨ã—ãŸã¨ã +- åŒã˜å†…部ID ã‚’æŒã¤ã‚ªãƒ–ジェクトを複数作æˆã—よã†ã¨ã—ãŸã¨ã + +#### 例題 + +マクロクラス定義ã«ã€æ¬¡ã®ã‚ˆã†ãªæ±Žç”¨çš„ãªã‚¨ãƒ©ãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’書ãã“ã¨ãŒã§ãã¾ã™: + +```4d +Function onError($editor : Object; $resultMacro : Object; $error : Collection) + var $obj : Object + var $txt : Text + $txt:="" + + For each ($obj; $error) + $txt:=$txt+$obj.message+" \n" + End for each + + ALERT($txt) +``` diff --git a/website/translated_docs/ja/FormEditor/objectLibrary.md b/website/translated_docs/ja/FormEditor/objectLibrary.md index 1b7175413519c8..a21c90dab98676 100644 --- a/website/translated_docs/ja/FormEditor/objectLibrary.md +++ b/website/translated_docs/ja/FormEditor/objectLibrary.md @@ -3,15 +3,15 @@ id: objectLibrary title: オブジェクトライブラリ --- -## æ¦‚è¦ ãƒ•ã‚©ãƒ¼ãƒ ã®ä½œæˆã«ã‚ãŸã£ã¦ã¯ã€ã‚ªãƒ–ジェクトライブラリを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトライブラリã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—やコピー/ペーストã™ã‚‹ã ã‘ã§ãƒ•ォームã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã€ã‚らã‹ã˜ã‚設定ã•れãŸå„種オブジェクトをæä¾›ã—ã¦ã„ã¾ã™ã€‚ 4D ã§ã¯ 2種類ã®ã‚ªãƒ–ジェクトライブラリを利用ã§ãã¾ã™: -- 標準ã®è¨­å®šæ¸ˆã¿ã‚ªãƒ–ジェクトライブラリã¯ã™ã¹ã¦ã®ãƒ—ロジェクトã«åˆ©ç”¨ã§ãã¾ã™ +- 標準ã®è¨­å®šæ¸ˆã¿ã‚ªãƒ–ジェクトライブラリã¯ã™ã¹ã¦ã®ãƒ—ロジェクトã«åˆ©ç”¨ã§ãã¾ã™ - カスタムオブジェクトライブラリã¯ã€é–‹ç™ºè€…自身ãŒãŠæ°—ã«å…¥ã‚Šã®ãƒ•ォームオブジェクトやã€ã‚ã‚‹ã„ã¯ãƒ—ロジェクトフォームãã®ã‚‚ã®ã‚’ã¨ã£ã¦ãŠããŸã‚ã®ã‚‚ã®ã§ã™ + ## 標準ã®ã‚ªãƒ–ジェクトライブラリã®ä½¿ç”¨ 標準ã®ã‚ªãƒ–ジェクトライブラリã¯ãƒ•ォームエディターã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ツールãƒãƒ¼ã®å³ã«ã‚る次ã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¾ã™: @@ -25,25 +25,27 @@ title: オブジェクトライブラリ - Tips 付ãプレビューエリア: 中央ã®ã‚¨ãƒªã‚¢ã«ã¯å„オブジェクトã®ãƒ—レビューãŒè¡¨ç¤ºã•れã¾ã™ã€‚ オブジェクトã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã«é–¢ã™ã‚‹æƒ…報㌠Tips ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ - 表示オブジェクト㯠**カテゴリ** メニューを使ã£ã¦çµžã‚Šè¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™: ![](assets/en/FormEditor/library3.png) -- ライブラリã®ã‚ªãƒ–ジェクトをフォーム上ã§ä½¿ã†ã«ã¯: +- ライブラリã®ã‚ªãƒ–ジェクトをフォーム上ã§ä½¿ã†ã«ã¯: - オブジェクト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **コピー** ã‚’é¸æŠžã—ã¦ãƒ•ォーム上ã§åŒæ§˜ã« **ペースト** ã™ã‚‹ã‹ã€ - - ライブラリã‹ã‚‰ã‚ªãƒ–ジェクトをフォーム上ã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€ãƒ•ォームã«å½“該オブジェクトãŒè¿½åŠ ã•れã¾ã™ã€‚ + - ライブラリã‹ã‚‰ã‚ªãƒ–ジェクトをフォーム上ã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€ãƒ•ォームã«å½“該オブジェクトãŒè¿½åŠ ã•れã¾ã™ã€‚ 設定済ã¿ã‚ªãƒ–ジェクトライブラリã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 デフォルトオブジェクトを編集ã—ãŸã‚Šã€è¨­å®šæ¸ˆã¿ã‚ªãƒ–ジェクトやフォームã®ãƒ©ã‚¤ãƒ–ラリを独自ã«ä½œã‚‹ã«ã¯ã€ã‚«ã‚¹ã‚¿ãƒ ã‚ªãƒ–ジェクトライブラリを作æˆã—ã¾ã™ (後述å‚ç…§)。 標準ã®ã‚ªãƒ–ジェクトライブラリã«ã¦æä¾›ã•れã¦ã„るオブジェクトã«ã¤ã„ã¦ã¯ [doc.4d.com](https://doc.4d.com/4Dv18/4D/18/Library-objects.200-4575412.ja.html) ã§è©³ã—ã説明ã•れã¦ã„ã¾ã™ã€‚ + ## カスタムオブジェクトライブラリã®ä½œæˆã¨ä½¿ç”¨ -4Dã§ã‚«ã‚¹ã‚¿ãƒ ã‚ªãƒ–ジェクトライブラリを作æˆã—ã€ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ カスタムオブジェクトライブラリã¨ã¯ã€ä»»æ„ã®ã‚ªãƒ–ジェクト (ボタンã€ãƒ†ã‚­ã‚¹ãƒˆã€ãƒ”クãƒãƒ£ãƒ¼ç­‰) ã‚’æ ¼ç´ã™ã‚‹ 4D プロジェクトã§ã™ã€‚ã“れらã®ã‚ªãƒ–ジェクトã¯åˆ¥ã®ãƒ•ォームやプロジェクトã«ã¦å†åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +4Dã§ã‚«ã‚¹ã‚¿ãƒ ã‚ªãƒ–ジェクトライブラリを作æˆã—ã€ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ カスタムオブジェクトライブラリã¨ã¯ã€ä»»æ„ã®ã‚ªãƒ–ジェクト (ボタンã€ãƒ†ã‚­ã‚¹ãƒˆã€ãƒ”クãƒãƒ£ãƒ¼ç­‰) ã‚’æ ¼ç´ã™ã‚‹ 4D プロジェクトã§ã™ã€‚ ã“れらã®ã‚ªãƒ–ジェクトã¯åˆ¥ã®ãƒ•ォームやプロジェクトã«ã¦å†åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトã¯ãƒ—ロパティãŠã‚ˆã³ã‚ªãƒ–ジェクトメソッドã¨ã¨ã‚‚ã«æ ¼ç´ã•れã¾ã™ã€‚ ライブラリã¯ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã‚„ã€ã‚³ãƒ”ー/ペーストæ“作ã§åˆ©ç”¨ã§ãã¾ã™ã€‚ ライブラリを使用ã™ã‚‹ã¨ã€ã‚°ãƒ©ãƒ•ィックファミリーや振る舞ã„ã”ã¨ã«ã‚°ãƒ«ãƒ¼ãƒ—化ã—ãŸãƒ•ォームオブジェクトを作æˆã§ãã¾ã™ã€‚ + ### オブジェクトライブラリã®ä½œæˆ -オブジェクトライブラリを作æˆã™ã‚‹ã«ã¯ã€**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‹ã‚‰ **æ–°è¦>オブジェクトライブラリ...** ã‚’é¸æŠžã—ã¾ã™ã€‚ 標準ã®ãƒ•ァイルä¿å­˜ç”¨ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã€ã‚ªãƒ–ジェクトライブラリã®åå‰ã¨ä¿å­˜å…ˆã‚’指定ã§ãã¾ã™ã€‚ +オブジェクトライブラリを作æˆã™ã‚‹ã«ã¯ã€**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‹ã‚‰ **æ–°è¦ > オブジェクトライブラリ...** ã‚’é¸æŠžã—ã¾ã™ã€‚ 標準ã®ãƒ•ァイルä¿å­˜ç”¨ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã€ã‚ªãƒ–ジェクトライブラリã®åå‰ã¨ä¿å­˜å…ˆã‚’指定ã§ãã¾ã™ã€‚ ダイアログボックスをå—ã‘入れるã¨ã€4D ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«æ–°ã—ã„オブジェクトライブラリを作æˆã—ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«è¡¨ç¤ºã—ã¾ã™ (デフォルトã§ç©ºã§ã™)。 @@ -53,10 +55,9 @@ title: オブジェクトライブラリ ### オブジェクトライブラリを開ã -一ã¤ã®ã‚ªãƒ–ジェクトライブラリを複数ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§åŒæ™‚ã«é–‹ãã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ 一ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§è¤‡æ•°ã®ãƒ©ã‚¤ãƒ–ラリを開ãã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ - -カスタムã®ã‚ªãƒ–ジェクトライブラリを開ãã«ã¯ã€**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‹ã‚‰ **é–‹ã>オブジェクトライブラリ...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 標準ã®ãƒ•ァイルを開ãダイアログボックスãŒè¡¨ç¤ºã•れã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ©ã‚¤ãƒ–ãƒ©ãƒªã‚’é¸æŠžã§ãã¾ã™ã€‚ 次ã®ãƒ•ァイルタイプãŒé¸æŠžã§ãã¾ã™: +一ã¤ã®ã‚ªãƒ–ジェクトライブラリを複数ã®ãƒ—ロジェクトã§åŒæ™‚ã«é–‹ãã“ã¨ã¯ã§ãã¾ã›ã‚“ãŒã€ 一ã¤ã®ãƒ—ロジェクトã§è¤‡æ•°ã®ãƒ©ã‚¤ãƒ–ラリを開ãã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ +カスタムã®ã‚ªãƒ–ジェクトライブラリを開ãã«ã¯ã€**ファイル** メニューã¾ãŸã¯ãƒ„ールãƒãƒ¼ã‹ã‚‰ **é–‹ã > オブジェクトライブラリ...** ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 標準ã®ãƒ•ァイルを開ãダイアログボックスãŒè¡¨ç¤ºã•れã€ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ©ã‚¤ãƒ–ãƒ©ãƒªã‚’é¸æŠžã§ãã¾ã™ã€‚ 次ã®ãƒ•ァイルタイプãŒé¸æŠžã§ãã¾ã™: - **.4dproject** - **.4dz** @@ -65,6 +66,7 @@ title: オブジェクトライブラリ - プロジェクトフォーム - フォームã®ãƒšãƒ¼ã‚¸1 + ### ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ§‹ç¯‰ ドラッグ&ドロップやコピー/ペーストæ“作ã§ã€ã‚ªãƒ–ジェクトをオブジェクトライブラリã«é…ç½®ã§ãã¾ã™ã€‚ オブジェクトã¯ã€ãƒ•ォームã‚ã‚‹ã„ã¯ä»–ã®ã‚ªãƒ–ジェクトライブラリ ([標準ã®ã‚ªãƒ–ジェクトライブラリ](#標準ã®ã‚ªãƒ–ジェクトライブラリã®ä½¿ç”¨) å«ã‚€) ã‹ã‚‰ã‚³ãƒ”ーã§ãã¾ã™ 。 å…ƒã®ã‚ªãƒ–ジェクトã¨ã®ãƒªãƒ³ã‚¯ã¯ä¿æŒã•れãªã„ãŸã‚ã€ã‚ªãƒªã‚¸ãƒŠãƒ«ãŒç·¨é›†ã•れã¦ã‚‚ライブラリã®ã‚ªãƒ–ジェクトã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 @@ -78,7 +80,8 @@ title: オブジェクトライブラリ - ペーストボードã¸ã® **カット** ã¾ãŸã¯ **コピー** - ペーストボードã‹ã‚‰ã‚ªãƒ–ジェクトを **ペースト** - **クリア** ã§ãƒ©ã‚¤ãƒ–ラリã‹ã‚‰ã‚ªãƒ–ジェクトを削除 -- **å称変更** ã§ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒé–‹ãã€ã‚ªãƒ–ジェクトã®åå‰ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ライブラリ内ã®ã‚ªãƒ–ジェクトåã¯ä¸€æ„ã®ã‚‚ã®ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 +- **å称変更** ã§ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒé–‹ãã€ã‚ªãƒ–ジェクトã®åå‰ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ライブラリ内ã®ã‚ªãƒ–ジェクトåã¯ä¸€æ„ã®ã‚‚ã®ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + オブジェクトライブラリã«ã¯å€‹ã€…ã®ã‚ªãƒ–ジェクト (サブフォームå«ã‚€) やオブジェクトグループを格ç´ã§ãã¾ã™ã€‚ ãれãžã‚Œã®ã‚ªãƒ–ジェクトã¯1ã¤ã®ã‚¢ã‚¤ãƒ†ãƒ ã¨ã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¾ã™: @@ -89,7 +92,6 @@ title: オブジェクトライブラリ オブジェクトã¯ã€ã‚°ãƒ©ãƒ•ィックãŠã‚ˆã³å‹•作ã«é–¢ã‚ã‚‹ã™ã¹ã¦ã®ãƒ—ロパティã¨ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã‚‚ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ ã“れらã®ãƒ—ロパティã¯ã‚ªãƒ–ジェクトãŒãƒ•ォームや他ã®ãƒ©ã‚¤ãƒ–ラリã«ã‚³ãƒ”ーã•れる際ã«ã‚‚ä¿æŒã•れã¾ã™ã€‚ #### ä¾å­˜ã‚ªãƒ–ジェクト - コピー/ペーストやドラッグ&ドロップã§ç‰¹å®šã®ãƒ©ã‚¤ãƒ–ラリオブジェクトを使用ã™ã‚‹ã¨ã€ä¾å­˜ã‚ªãƒ–ジェクトも一緒ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒœã‚¿ãƒ³ã‚’コピーã™ã‚‹ã¨ã€ãã®ã‚ªãƒ–ジェクトã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ãŸã‚ªãƒ–ジェクトメソッドもコピーã•れã¾ã™ã€‚ ã“れらã®ä¾å­˜ã‚ªãƒ–ジェクトã¯ãれã®ã¿ã‚’直接コピーã—ãŸã‚Šãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ãŸã‚Šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 メインã®ã‚ªãƒ–ジェクトã¨ä¸€ç·’ã«ãƒ©ã‚¤ãƒ–ラリã«ç™»éŒ²ã•れるä¾å­˜ã‚ªãƒ–ジェクトã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: @@ -98,4 +100,5 @@ title: オブジェクトライブラリ - フォーマット/フィルター - ピクãƒãƒ£ãƒ¼ - ヘルプTips (フィールドã«ãƒªãƒ³ã‚¯) -- オブジェクトメソッド \ No newline at end of file +- オブジェクトメソッド + diff --git a/website/translated_docs/ja/FormEditor/pictures.md b/website/translated_docs/ja/FormEditor/pictures.md new file mode 100644 index 00000000000000..24cf7b595b8e35 --- /dev/null +++ b/website/translated_docs/ja/FormEditor/pictures.md @@ -0,0 +1,99 @@ +--- +id: pictures +title: ピクãƒãƒ£ãƒ¼ +--- + +フォーム上ã§ä½¿ç”¨ã•れるピクãƒãƒ£ãƒ¼ã«ã¤ã„ã¦ã€4Dã¯æ¬¡ã®ã‚ˆã†ã«ã‚µãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ + + +## サãƒãƒ¼ãƒˆã•れるãƒã‚¤ãƒ†ã‚£ãƒ–フォーマット + +4Dã¯ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットã®ãƒã‚¤ãƒ†ã‚£ãƒ–管ç†ã‚’çµ±åˆã—ã¦ã„ã¾ã™ã€‚ ã“れã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãŒå¤‰æ›ã•れるã“ã¨ãªãã€å…ƒã®ãƒ•ォーマットã®ã¾ã¾ 4D ã§æ ¼ç´ã€è¡¨ç¤ºã•れるã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ (シェイドやé€éŽãªã©) フォーマットã«ã‚ˆã‚Šç•°ãªã‚‹ç‰¹å®šã®æ©Ÿèƒ½ã¯ã‚³ãƒ”ー・ペーストã•れる際ã«ã‚‚ä¿æŒã•ã‚Œã€æ”¹å¤‰ãªã表示ã•れã¾ã™ã€‚ ã“ã®ãƒã‚¤ãƒ†ã‚£ãƒ–サãƒãƒ¼ãƒˆã¯ 4D ã«æ ¼ç´ã•れるã™ã¹ã¦ã®ãƒ”クãƒãƒ£ãƒ¼ (デザインモードã§ãƒ•ォームã«ãƒšãƒ¼ã‚¹ãƒˆã•れ㟠[スタティックピクãƒãƒ£ãƒ¼](FormObjects/staticPicture.md)ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã§ [入力オブジェクト](FormObjects/input_overview.md) ã«ãƒšãƒ¼ã‚¹ãƒˆã•れãŸãƒ”クãƒãƒ£ãƒ¼ãªã©) ã«å¯¾ã—ã¦æœ‰åйã§ã™ã€‚ + +ã‚‚ã£ã¨ã‚‚一般的ãªãƒ•ォーマット (例: jpegã€gifã€pngã€tiffã€bmpã€ç­‰) ã¯ã©ã¡ã‚‰ã®ãƒ•ォーマットã§ã‚‚サãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ macOS ã§ã¯ã€PDF フォーマットã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°/デコーディングもå¯èƒ½ã§ã™ã€‚ + +> サãƒãƒ¼ãƒˆã•れるフォーマットã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯ OS ã‚„ã€ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るカスタムコーデックã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ ã©ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ãŒåˆ©ç”¨å¯èƒ½ã‹ã‚’調ã¹ã‚‹ãŸã‚ã«ã¯ã€`PICTURE CODEC LIST` コマンドを使用ã—ã¦ãã ã•ã„。ã¾ãŸã€ãƒ‡ãƒ¼ã‚¿åž‹ã® [ピクãƒãƒ£ãƒ¼](Concepts/dt_picture.md) ã®é …ã‚‚å‚ç…§ãã ã•ã„。 + + + + +### 利用ä¸å¯èƒ½ãªãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット + +マシン上ã§åˆ©ç”¨ã§ããªã„フォーマットã®ãƒ”クãƒãƒ£ãƒ¼ã«å¯¾ã—ã¦ã¯ã€å°‚用ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ アイコンã®ä¸‹éƒ¨ã«ãã®æ‹¡å¼µå­ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +![](assets/en/FormEditor/picNoFormat.png) + +ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯ã€ãã®ãƒ”クãƒãƒ£ãƒ¼ãŒè¡¨ç¤ºã•れるã¹ãã¨ã“ã‚ã«è‡ªå‹•çš„ã«ä½¿ç”¨ã•れã¾ã™: + +![](assets/en/FormEditor/picNoFormat2.png) + +ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯ã€ãã®ãƒ”クãƒãƒ£ãƒ¼ãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ã¯è¡¨ç¤ºã‚‚編集もã§ããªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã§ã™ãŒã€ä¸­èº«ã‚’改変ã™ã‚‹ã“ã¨ãªãä¿å­˜ã—ã€ä»–ã®ãƒžã‚·ãƒ³ã§è¡¨ç¤ºã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€Windows ã§ã® PDF ピクãƒãƒ£ãƒ¼ã‚„ã€PICT フォーマットã®ãƒ”クãƒãƒ£ãƒ¼ãªã©ãŒè©²å½“ã—ã¾ã™ã€‚ + + +## 高解åƒåº¦ãƒ”クãƒãƒ£ãƒ¼ + +4D 㯠macOS ãŠã‚ˆã³ Windows ã®ä¸¡æ–¹ã§é«˜è§£åƒåº¦ãƒ”クãƒãƒ£ãƒ¼ã®è¡¨ç¤ºã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ã€‚ 高解åƒåº¦ãƒ”クãƒãƒ£ãƒ¼ã¯ã€ã‚¹ã‚±ãƒ¼ãƒ«ä¿‚æ•°ã¾ãŸã¯ dpi ã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ + +### スケール係数 (macOS ã®ã¿) + +従æ¥ã®æ¨™æº–çš„ãªãƒ‡ã‚£ã‚¹ãƒ—ãƒ¬ã‚¤ã¨æ¯”較ã—ã¦ã€é«˜è§£åƒåº¦ãƒ‡ã‚£ã‚¹ãƒ—レイã¯é«˜ã„画素密度をæŒã¡ã¾ã™ã€‚ ã“れらã®é«˜è§£åƒåº¦ãƒ‡ã‚£ã‚¹ãƒ—レイã«ãŠã„ã¦ãƒ”クãƒãƒ£ãƒ¼ãŒæ­£ã—ã表示ã•れるã«ã¯ã€é©ç”¨ã™ã‚‹ *スケール係数* (例: 2å€ã€3å€ãªã©) ã«å¿œã˜ã¦ãã®ç”»ç´ æ•°ã‚’増やã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + +高解åƒåº¦ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’使ã†å ´åˆã€ãƒ”クãƒãƒ£ãƒ¼åã« "@nx" (*n*: スケール係数) を付ã‘ã¦ã‚¹ã‚±ãƒ¼ãƒ«ä¿‚数を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 下ã®ãƒ†ãƒ¼ãƒ–ルã®ä¾‹ã§ã‚‚ã€é«˜è§£åƒåº¦ãƒ”クãƒãƒ£ãƒ¼ã®åå‰ã«ã€*circle@2x.png*ã€*circle@3x.png* ã¨ã„ã£ãŸå½¢ã§ã‚¹ã‚±ãƒ¼ãƒ«ä¿‚æ•°ãŒæŒ‡å®šã•れã¦ã„ã¾ã™ã€‚ + +| 表示タイプ | スケール係数 | 例題 | +| ----- | ------------------- | ------------------------------------------------------------------------ | +| 標準解åƒåº¦ | 1:1 ピクセル密度 | **1x**
        ![](assets/en/FormEditor/pictureScale1.png) *circle.png* | +| 高解åƒåº¦ | ピクセル密度ã¯2ã€ã¾ãŸã¯3ã®ä¿‚æ•°ã§å¢—加 |
        2x3x
        ![](assets/en/FormEditor/pictureScale2.png)*circle@2x.png*![](assets/en/FormEditor/pictureScale3.png)
        *circle@3x.png*
        | + + + +"@nx" ã§å®šç¾©ã•れãŸé«˜è§£åƒåº¦ãƒ”クãƒãƒ£ãƒ¼ã¯ã€æ¬¡ã®ã‚ªãƒ–ジェクトã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +* [スタティックピクãƒãƒ£ãƒ¼](FormObjects/staticPicture.md) +* [ボタン](FormObjects/button_overview.md)/[ラジオボタン](FormObjects/radio_overview.md)/[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](FormObjects/checkbox_overview.md) +* [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](FormObjects/pictureButton_overview.md)/[ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](FormObjects/picturePopupMenu_overview.md) +* [タブコントロール](FormObjects/tabControl.md) +* [リストボックスヘッダー](FormObjects/listbox_overview.md#リストボックスヘッダー) +* [メニューアイコン](Menus/properties.md#項目アイコン) + + + +4D ã¯è‡ªå‹•çš„ã«æœ€é«˜è§£åƒåº¦ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’優先ã—ã¾ã™ã€‚

        **例**: 標準解åƒåº¦ã¨é«˜è§£åƒåº¦ã®ï¼’ã¤ã®ãƒ‡ã‚£ã‚¹ãƒ—レイを使用ã—ã¦ã„ã‚‹éš›ã«ã€ç‰‡æ–¹ã‹ã‚‰ã‚‚ã†ç‰‡æ–¹ã¸ã¨ãƒ•ォームを移動ã•ã›ã‚‹ã¨ã€4D ã¯å¸¸ã«ä½¿ç”¨å¯èƒ½ãªç¯„囲内ã§ã®æœ€é«˜è§£åƒåº¦ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ã¾ã™ã€‚ コマンドã¾ãŸã¯ãƒ—ロパティ㌠*circle.png* を指定ã—ã¦ã„ãŸã¨ã—ã¦ã‚‚ã€*circle@3x.png* ãŒã‚れã°ã€ãれを使用ã—ã¾ã™ã€‚ +> è§£åƒåº¦ã®å„ªå…ˆé †ä½ä»˜ã‘ã¯ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ä¸Šã®ãƒ”クãƒãƒ£ãƒ¼è¡¨ç¤ºã«ã®ã¿é©ç”¨ã•れã€å°åˆ·ã«é–¢ã—ã¦ã¯è‡ªå‹•é©ç”¨ã•れãªã„ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ + + + +### DPI (macOS ãŠã‚ˆã³ Windows) + +高解åƒåº¦ãŒè‡ªå‹•çš„ã«å„ªå…ˆã•れã¾ã™ãŒã€ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚„ピクãƒãƒ£ãƒ¼ã® dpi *(\*)*ã€ãŠã‚ˆã³ãƒ”クãƒãƒ£ãƒ¼å½¢å¼ã«ã‚ˆã£ã¦ã€å‹•作ã«é•ã„ãŒç”Ÿã˜ã‚‹ã“ã¨ãŒã‚りã¾ã™: + +| æ¼”ç®—å­ | 動作 | +| --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| ドロップã€ãƒšãƒ¼ã‚¹ãƒˆ | ピクãƒãƒ£ãƒ¼ã®è¨­å®š:

        • **72dpi ã¾ãŸã¯ 96dpi** - ピクãƒãƒ£ãƒ¼ã¯ [中央åˆã‚ã›](FormObjects/properties_Picture.md#中央åˆã‚ã›-トランケート-中央åˆã‚ã›ã—ãªã„) 表示ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ã¦ã„るオブジェクトã¯åŒã˜ãƒ”クセル数ã§ã™ã€‚
        • **ãã®ä»–ã® dpi** - ピクãƒãƒ£ãƒ¼ã¯ "[スケーリング](FormObjects/properties_Picture.md#スケーリング)" 表示ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ã¦ã„るオブジェクトã®ãƒ”クセル数㯠(ピクãƒãƒ£ãƒ¼ã®ãƒ”クセル数 / ピクãƒãƒ£ãƒ¼ã® dpi) * (スクリーン㮠dpi) ã§ã™ã€‚
        • **dpi ãªã—** - ピクãƒãƒ£ãƒ¼ã¯ "[スケーリング](FormObjects/properties_Picture.md#スケーリング)" 表示ã•れã¾ã™ã€‚
        • | +| [自動サイズ](https://doc.4d.com/4Dv18/4D/18/Setting-object-display-properties.300-4575725.ja.html#148057) (フォームエディターã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼) | ピクãƒãƒ£ãƒ¼ã®è¡¨ç¤ºãŒ:
          • **[スケーリング](FormObjects/properties_Picture.md#スケーリング)** - ピクãƒãƒ£ãƒ¼ã‚’表示ã—ã¦ã„るオブジェクトã®ãƒ”クセル数㯠(ピクãƒãƒ£ãƒ¼ã®ãƒ”クセル数 / ピクãƒãƒ£ãƒ¼ã® dpi) * (スクリーン㮠dpi) ã«ãƒªã‚µã‚¤ã‚ºã•れã¾ã™ã€‚
          • **スケーリング以外** - ピクãƒãƒ£ãƒ¼ã‚’表示ã—ã¦ã„るオブジェクトã¯ã€ãƒ”クãƒãƒ£ãƒ¼ã¨åŒã˜ãƒ”クセル数ã§ã™ã€‚

          | + +*(\*) 通常㯠macOS = 72dpi, Windows = 96dpi* + + +## ダークモード (macOS ã®ã¿) + +[フォームãŒãƒ€ãƒ¼ã‚¯ã‚¹ã‚­ãƒ¼ãƒ ã‚’使用](properties_FormProperties.md#カラースキーム) ã—ã¦ã„ã‚‹å ´åˆã«ã€æ¨™æº–ã®ãƒ”クãƒãƒ£ãƒ¼ã®ä»£ã‚りã«ä½¿ç”¨ã™ã‚‹å°‚用ã®ãƒ”クãƒãƒ£ãƒ¼ã‚„アイコンを定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ダークモードピクãƒãƒ£ãƒ¼ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å®šç¾©ã—ã¾ã™: + +- ダークモードピクãƒãƒ£ãƒ¼ã¯ã€æ¨™æº– (ライトスキーム) ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¨åŒã˜åå‰ã§ã€"_dark "ã¨ã„ã†æŽ¥å°¾è¾žãŒä»˜ãã¾ã™ã€‚ +- ダークモードピクãƒãƒ£ãƒ¼ã¯ã€æ¨™æº–ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®éš£ã«ä¿å­˜ã—ã¾ã™ã€‚ + +ランタイム時ã«ã€4D 㯠[ç¾åœ¨ã®ãƒ•ォームã®ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ](https://doc.4d.com/4Dv19R2/4D/19-R2/FORM-Get-color-scheme.301-5494033.ja.html) ã«å¿œã˜ã¦ã€ãƒ©ã‚¤ãƒˆç”¨ã¾ãŸã¯ãƒ€ãƒ¼ã‚¯ç”¨ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’自動的ã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ + +![](assets/en/FormEditor/darkicon.png) + + + +## ピクãƒãƒ£ãƒ¼ä¸Šã®ãƒžã‚¦ã‚¹åº§æ¨™ + +4D ã§ã¯ã€[ピクãƒãƒ£ãƒ¼å¼](FormObjects/properties_Object.md#å¼ã®åž‹) ãŒè¨­å®šã•れ㟠[入力オブジェクト](FormObjects/input_overview.md) をクリックã€ã¾ãŸã¯ãƒ›ãƒãƒ¼ã—ãŸéš›ã®ãƒžã‚¦ã‚¹ã®ãƒ­ãƒ¼ã‚«ãƒ«åº§æ¨™ã‚’å–å¾—ã§ãã¾ã™ã€‚ã“れã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚„ズーム処ç†ãŒãŠã“ãªã‚れã¦ã„ã‚‹å ´åˆã§ã‚‚å¯èƒ½ã§ã™ã€‚ ã“ã®ãƒ”クãƒãƒ£ãƒ¼ãƒžãƒƒãƒ—ã«ä¼¼ãŸæ©Ÿæ§‹ã¯ã€ãŸã¨ãˆã°åœ°å›³ä½œè£½ã‚½ãƒ•トウェアã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースやã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«å¯èƒ½ãªãƒœã‚¿ãƒ³ãƒãƒ¼ã‚’管ç†ã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + +座標㯠*MouseX* 㨠*MouseY* [システム変数](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.ja.html) ã«è¿”ã•れã¾ã™ã€‚ 座標ã¯ãƒ”クセルå˜ä½ã§è¡¨ç¾ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šéš…ãŒèµ·ç‚¹ (0,0) ã¨ãªã‚Šã¾ã™ã€‚ マウスãŒãƒ”クãƒãƒ£ã®åº§æ¨™ã®å¤–å´ã«ã‚ã‚‹å ´åˆã«ã¯ã€*MouseX* 㨠*MouseY* ã«ã¯-1ãŒè¿”ã•れã¾ã™ã€‚ + +ã“れらã®å€¤ã¯ã€[`On Clicked`](Events/onClicked.md)ã€[`On Double Clicked`](Events/onDoubleClicked.md)ã€[`On Mouse up`](Events/onMouseUp.md)ã€[`On Mouse Enter`](Events/onMouseEnter.md)ã€ã‚ã‚‹ã„㯠[`On Mouse Move`](Events/onMouseMove.md) フォームイベントã®ä¸€éƒ¨ã¨ã—ã¦å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/FormEditor/properties_Action.md b/website/translated_docs/ja/FormEditor/properties_Action.md index 47921bc5fabc37..c3d3afac647270 100644 --- a/website/translated_docs/ja/FormEditor/properties_Action.md +++ b/website/translated_docs/ja/FormEditor/properties_Action.md @@ -6,24 +6,26 @@ title: 動作 ## メソッド -Reference of a method attached to the form. フォームメソッドを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã¨ã‚ªãƒ–ジェクトを管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“れら目的ã«ã¯ã€ã‚ªãƒ–ジェクトメソッドを使用ã™ã‚‹æ–¹ãŒé€šå¸¸ã¯ç°¡å˜ã§ã‚りã€ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚ See [Specialized methods](Concepts/methods.md#specialized-methods). +フォームã«é–¢é€£ã¥ã‘られãŸãƒ¡ã‚½ãƒƒãƒ‰ã¸ã®å‚照。 フォームメソッドを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ã¨ã‚ªãƒ–ジェクトを管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã ã—ã€ã“れら目的ã«ã¯ã€ã‚ªãƒ–ジェクトメソッドを使用ã™ã‚‹æ–¹ãŒé€šå¸¸ã¯ç°¡å˜ã§ã‚りã€ã‚ˆã‚ŠåŠ¹æžœçš„ã§ã™ã€‚ [特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰](Concepts/methods.md#特化ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰) å‚照。 -You do not call a form method—4D calls it automatically when an event involves the form to which the method is attached. +フォームメソッドã¯å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã›ã‚“。メソッドãŒé–¢é€£ã¥ã‘られã¦ã„るフォームã«é–¢ã‚るイベントãŒç™ºç”Ÿã—ãŸå ´åˆã€4D ã¯è‡ªå‹•çš„ã«ãƒ•ォームメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ -Several types of method references are supported: +メソッドå‚ç…§ã«ã¯ã„ãã¤ã‹ã®ã‚¿ã‚¤ãƒ—ãŒåˆ©ç”¨å¯èƒ½ã§ã™: -- a standard project method file path, i.e. that uses the following pattern: - `method.4dm` - This type of reference indicates that the method file is located at the default location ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). In this case, 4D automatically handles the form method when operations are executed on the form (renaming, duplication, copy/paste...) +- 標準ã®ãƒ—ロジェクトメソッドファイルパス: + `method.4dm` + ã“ã®ã‚¿ã‚¤ãƒ—ã®å‚ç…§ã¯ã€å½“該メソッドファイルãŒãƒ‡ãƒ•ォルトã®å ´æ‰€ ("sources/{TableForms/*numTable*} | {Forms}/*formName*/") ã«ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ä¸Šã§ãƒ•ォームメソッドã«å¯¾ã—ã¦æ“作 (å称変更ã€è¤‡è£½ã€ã‚³ãƒ”ー/ペーストãªã©) ãŒãŠã“ãªã‚れるã¨ã€4D ã¯ã“れらã®å¤‰æ›´ã‚’自動的ã«ãƒ•ォームメソッドã«å映ã•ã›ã¾ã™ã€‚ -- 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 form operations. +- æ‹¡å¼µå­ã‚’çœã„ãŸæ—¢å­˜ã®ãƒ—ロジェクトメソッドå: `myMethod`。ã“ã®å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§æ“作ãŒãŠã“ãªã‚れã¦ã‚‚ã€4D ã¯ãれらã®å¤‰æ›´ã‚’è‡ªå‹•åæ˜ ã—ã¾ã›ã‚“。 + +- .4dm æ‹¡å¼µå­ã‚’å«ã‚€ã‚«ã‚¹ã‚¿ãƒ ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ァイルパス: + `MyMethods/myFormMethod.4dm`。 ファイルシステムも使用ã§ãã¾ã™: + `/RESOURCES/Forms/FormMethod.4dm`。 ã“ã®å ´åˆã€ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§æ“作ãŒãŠã“ãªã‚れã¦ã‚‚ã€4D ã¯ãれらã®å¤‰æ›´ã‚’è‡ªå‹•åæ˜ ã—ã¾ã›ã‚“。 -- a custom method file path including the .4dm extension, e.g.: - `MyMethods/myFormMethod.4dm` You can also use a filesystem: - `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ------ | ---------------------------------------------------------------- | -| method | テキスト | Form method standard or custom file path, or project method name | \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ---------------------------------------- | +| method | text | ãƒ•ã‚©ãƒ¼ãƒ ãƒ¡ã‚½ãƒƒãƒ‰ã®æ¨™æº–ã¾ãŸã¯ã‚«ã‚¹ã‚¿ãƒ ã®ãƒ•ァイルパスã€ã¾ãŸã¯ãƒ—ロジェクトメソッドå | + diff --git a/website/translated_docs/ja/FormEditor/properties_FormProperties.md b/website/translated_docs/ja/FormEditor/properties_FormProperties.md index cce2fb228bfa03..f79b6f5a530264 100644 --- a/website/translated_docs/ja/FormEditor/properties_FormProperties.md +++ b/website/translated_docs/ja/FormEditor/properties_FormProperties.md @@ -1,156 +1,177 @@ --- id: propertiesForm -title: Form Properties +title: フォームプロパティ --- -* * * +--- + +## カラースキーム +> é…色プロパティã¯ã€macOS ã§ã®ã¿é©ç”¨ã•れã¾ã™ã€‚ + +ã“ã®ãƒ—ロパティã¯ã€ãƒ•ォームã®ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚’定義ã—ã¾ã™ã€‚ ã“ã®ãƒ—ロパティãŒè¨­å®šã•れã¦ã„ãªã„å ´åˆã®ãƒ‡ãƒ•ォルトã§ã¯ã€ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã®å€¤ã¯ **継承済ã¿** ã§ã™ (フォーム㯠[アプリケーションレベル](https://doc.4d.com/4dv19/help/command/ja/page1762.html) ã§å®šç¾©ã•れãŸã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚’使用ã—ã¾ã™)。 ã“れã¯ã€ãƒ•ォームã«å¯¾ã—ã¦ä»¥ä¸‹ã® 2ã¤ã®ã‚ªãƒ—ションã®ã„ãšã‚Œã‹ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* dark - æš—ã„èƒŒæ™¯ã«æ˜Žã‚‹ã„テキスト +* light - 明るã„èƒŒæ™¯ã«æš—ã„テキスト +> 定義ã•れãŸã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚’ CSS ã§ä¸Šæ›¸ãã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | --------------- | +| colorScheme | string | "dark", "light" | + +--- ## Pages -Each form has is made of at least two pages: +å„フォームã¯ã€å°‘ãªãã¨ã‚‚ 2ã¤ã®ãƒšãƒ¼ã‚¸ã§æ§‹æˆã•れã¦ã„ã¾ã™: + +- ページ0 (背景ページ) +- ページ1 (メインページ) -- a page 0 (background page) -- a page 1 (main page) +詳細ã«ã¤ã„ã¦ã¯ [フォームã®ãƒšãƒ¼ã‚¸](forms.md#フォームã®ãƒšãƒ¼ã‚¸) ã‚’å‚ç…§ãã ã•ã„。 -For more information, please refer to [Form pages](forms.md#form-pages). #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----- | ---------- | ------------------------------------------------------------------------ | -| pages | collection | Collection of pages (each page is an object, page 0 is the first element | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----- | ---------- | --------------------------------------- | +| pages | collection | ページã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (å„ページã¯ã‚ªãƒ–ジェクトã§ã€ãƒšãƒ¼ã‚¸0 ã¯æœ€åˆã®è¦ç´ ã§ã™) | + +--- -* * * +## フォームå -## Form Name +ã“ã®ãƒ—ロパティã¯ãƒ•ォームãã®ã‚‚ã®ã®åç§°ã§ã€4Dランゲージã§åå‰ã«ã‚ˆã£ã¦ãƒ•ォームをå‚ç…§ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ フォームåã¯ã€4Dã® [識別å­ã®å‘½åè¦å‰‡](Concepts/identifiers.md) ã«æº–ã˜ãŸã‚‚ã®ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -This property is the name of the form itself and is used to refer to the form by name using the 4D language. The form name must comply with the [rules specified for identifiers](Concepts/identifiers.md) in 4D. #### JSON 文法 -The form name is defined by the name of the folder that contains the form.4Dform file. See [project architecture](Project/architecture.md#sources-folder) for more information. +フォームåã¯ã€form.4Dform ファイルを格ç´ã™ã‚‹ãƒ•ォルダーã®åå‰ã§å®šç¾©ã•れã¾ã™ã€‚ 詳ã—ã㯠[プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼](Project/architecture.md#sources-フォルダー) ã‚’å‚ç…§ãã ã•ã„。 + +--- + +## フォームタイプ -* * * +フォームã®ã‚¿ã‚¤ãƒ—ã€*ã¤ã¾ã‚Š* ãã®å‡ºåŠ›å…ˆã«ã‚ˆã£ã¦ã€å½“該フォームã§åˆ©ç”¨ã§ãる機能ãŒå®šç¾©ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€[マーカー](properties_Markers.md) ã¯ãƒªã‚¹ãƒˆ (出力) テーブルフォームã§ã®ã¿è¨­å®šã§ãã¾ã™ã€‚ -## Form Type +データベースã®å„テーブルã¯é€šå¸¸ã€å°‘ãªãã¨ã‚‚ 2ã¤ã®ãƒ†ãƒ¼ãƒ–ルフォームをæŒã¡ã¾ã™ã€‚ 1ã¤ã¯ç”»é¢ä¸Šã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’一覧表示ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã€ã‚‚ㆠ1ã¤ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ 1ä»¶ãšã¤è¡¨ç¤ºã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ (データ入力や修正ã«ä½¿ç”¨): -The form type, *i.e.* its destination, defines the features that will be available to the form. For example, [markers](properties_Markers.md) can only be set for list (output) table forms. +- 出力フォーム - *出力フォーム* (ã¾ãŸã¯ *リストフォーム*) ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒªã‚¹ãƒˆã‚’ã€1レコードã«ã¤ã 1行ã§è¡¨ç¤ºã—ã¾ã™ã€‚ クエリã®çµæžœã¯å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã«è¡¨ç¤ºã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¡Œã‚’ダブルクリックã™ã‚‹ã¨ã€ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ç”¨ã«å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/formOutput.png) -Each table in a database generally has at least two table forms. One for listing records on-screen and the other for displaying one record at a time (used for data entry and modifications): +- 入力フォーム - データ入力ã«ä½¿ç”¨ã•れã¾ã™ã€‚ 1ã¤ã®ç”»é¢ã« 1ä»¶ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒè¡¨ç¤ºã•れã€ä¸€èˆ¬çš„ã«ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ç·¨é›†ã‚’ä¿å­˜ãƒ»ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ãŸã‚ã®ãƒœã‚¿ãƒ³ã‚„ã€ãƒ¬ã‚³ãƒ¼ãƒ‰é–“を移動ã™ã‚‹ãŸã‚ã®ãƒœã‚¿ãƒ³ (å…ˆé ­ãƒ¬ã‚³ãƒ¼ãƒ‰ã€æœ€çµ‚レコードã€å‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã€æ¬¡ãƒ¬ã‚³ãƒ¼ãƒ‰ç­‰) ã‚’å‚™ãˆã¦ã„ã¾ã™ã€‚ ![](assets/en/FormObjects/formInput.png) -- Output form - the *output form* or *list form* displays a list of records, with a single line per record. The results of queries are shown in an output form and users can double-click a line to display the input form for that record. ![](assets/en/FormObjects/formOutput.png) -- Input form - used for data entry. It displays a single record per screen and typically has buttons for saving and canceling modifications to the record and for navigating from record to record (*i.e.*, First Record, Last Record, Previous Record, Next Record). ![](assets/en/FormObjects/formInput.png) +サãƒãƒ¼ãƒˆã•れるタイプã¯ã€ãƒ•ォームã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -Supported types depend on the form category: -| Form Type | JSON grammar | 説明 | Supported with | -| ------------------------ | ---------------- | ------------------------------------------------------------- | --------------------------- | -| Detail Form | detailScreen | A display form for data entry and modification | Project forms - Table forms | -| Detail Form for Printing | detailPrinter | A printed report with one page per record, such as an invoice | Project forms - Table forms | -| List Form | listScreen | A form for listing records on the screen | Table forms | -| List Form for Printing | listPrinter | A printed report that list records | Table forms | -| None | *no destination* | A form with no specific feature | Project forms - Table forms | +| フォームタイプ | JSON 文法 | 説明 | サãƒãƒ¼ãƒˆã•れã¦ã„るフォーム | +| ---------- | ---------------- | ---------------------------- | ------------------- | +| 詳細フォーム | detailScreen | データ入力・修正用ã®è¡¨ç¤ºãƒ•ォーム | プロジェクトフォームã¨ãƒ†ãƒ¼ãƒ–ルフォーム | +| å°åˆ·ç”¨è©³ç´°ãƒ•ォーム | detailPrinter | 1ページã«ã¤ã 1レコードã®å°åˆ·ãƒ¬ãƒãƒ¼ãƒˆ (請求書ãªã©) | プロジェクトフォームã¨ãƒ†ãƒ¼ãƒ–ルフォーム | +| リストフォーム | listScreen | レコードを画é¢ä¸Šã«ä¸€è¦§è¡¨ç¤ºã™ã‚‹ãƒ•ォーム | テーブルフォーム | +| å°åˆ·ç”¨ãƒªã‚¹ãƒˆãƒ•ォーム | listPrinter | レコード一覧ã®å°åˆ·ãƒ¬ãƒãƒ¼ãƒˆ | テーブルフォーム | +| ãªã— | *no destination* | ç‰¹å®šã®æ©Ÿèƒ½ã‚’æŒãŸãªã„フォーム | プロジェクトフォームã¨ãƒ†ãƒ¼ãƒ–ルフォーム | #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------- | ------ | ------------------------------------------------------------ | | destination | string | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +--- -* * * +## 継承ã•れãŸãƒ•ォームå -## Inherited Form Name +ã“ã®ãƒ—ロパティã¯ã€ç¾åœ¨ã®ãƒ•ォーム㫠[継承ã™ã‚‹ãƒ•ォーム](forms.md#継承フォーム) を指定ã—ã¾ã™ã€‚ -This property designates the [form to inherit](forms.md#inherited-forms) in the current form. +テーブルフォームを継承ã™ã‚‹å ´åˆã¯ã€[継承ã•れãŸãƒ•ォームテーブル](#継承ã•れãŸãƒ•ォームテーブル) プロパティã«ãƒ†ãƒ¼ãƒ–ルを設定ã—ã¾ã™ã€‚ -To inherit from a table form, set the table in the [Inherited Form Table](#inherited-form-table) property. +継承を解除ã™ã‚‹ã«ã¯ã€ãƒ—ロパティリスト㧠**<ãªã—>** ã‚’é¸æŠžã—ã¾ã™ (JSON ã§ã¯ " ")。 -To remove inheritance, select **\** in the Property List (or " " in JSON). #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------ | -| inheritedForm | string | Name of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ------------------------------------------------------------------------ | +| inheritedForm | string | テーブルã¾ãŸã¯ãƒ—ロジェクトフォームã®åå‰, フォームを定義ã™ã‚‹ .json ファイルã¸ã® POSIXパス, ã¾ãŸã¯ãƒ•ォームを定義ã™ã‚‹ã‚ªãƒ–ジェクト | +--- -* * * -## Inherited Form Table +## 継承ã•れãŸãƒ•ォームテーブル -This property specifies the database table from which to [inherit a form](forms.md#inherited-forms) in the current form. +ã“ã®ãƒ—ロパティã¯ã€ç¾åœ¨ã®ãƒ•ォーム㫠[継承ã™ã‚‹ãƒ†ãƒ¼ãƒ–ルフォーム](forms.md#継承フォーム) ãŒå±žã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルを指定ã—ã¾ã™ã€‚ + +プロジェクトフォームを継承ã™ã‚‹å ´åˆã¯ã€ãƒ—ロパティリスト㧠**<ãªã—>** ã‚’é¸æŠžã—ã¾ã™ (JSON ã§ã¯ " ")。 -Set to **\** in the Property List (or " " in JSON) to inherited from a project form. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------ | ---------------- | -------------------------- | -| inheritedFormTable | string or number | table name or table number | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------ | ----------------- | -------------- | +| inheritedFormTable | string ã¾ãŸã¯ number | テーブルåã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ãƒ«ç•ªå· | + +--- -* * * +## サブフォームã¨ã—ã¦å…¬é–‹ -## Published as Subform +コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ•ォームをホストアプリケーション㮠[サブフォーム](FormObjects/subform_overview.md) ã¨ã—ã¦é¸æŠžã™ã‚‹ã«ã¯ã€æ˜Žç¤ºçš„ã«å…±æœ‰ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ãƒ—ロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ãƒ•ォームãŒãƒ›ã‚¹ãƒˆã‚¢ãƒ—リケーションã§å…¬é–‹ã•れã¾ã™ã€‚ + +公開ã•れãŸã‚µãƒ–フォームã¨ã—ã¦æŒ‡å®šã§ãã‚‹ã®ã¯ã€ãƒ—ロジェクトフォームã®ã¿ã§ã™ã€‚ -For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host database, it must have been explicitly shared. When this property is selected, the form will be published in the host database. -Only project forms can be specified as published subforms. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------ | ------- | ----------- | | shared | boolean | true, false | -* * * - -## Save Geometry +--- -When the option is used, if the window is opened using the `Open form window` command with the `*` parameter, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session: +## é…置を記憶 -* the current page, -* the position, size and visibility of each form object (including the size and visibility of list box columns). +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€`Open form window` コマンド㫠`*` 演算å­ã‚’渡ã—ã¦é–‹ã‹ã‚ŒãŸã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ãã€ãã®ãƒ•ォームã®ç‰¹å®šã®ãƒ—ロパティ値ã«ã¤ã„ã¦ã¯ã€ãれらãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«å¤‰æ›´ã•れãŸå ´åˆã€4D ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ä¿å­˜ã•れã¾ã™: -> This option does not take into account objects generated using the `OBJECT DUPLICATE` command. In order for a user to recover their environment when using this command, the developer must repeat the sequence of creation, definition and positioning of the objects. +* カレントページ +* ãれãžã‚Œã®ãƒ•ォームオブジェクトã®é…置・大ãã•・表示状態 (リストボックス列ã®ã‚µã‚¤ã‚ºã¨è¡¨ç¤ºçŠ¶æ…‹ã‚‚å«ã‚€)。 +> ã“ã®ã‚ªãƒ—ションã¯ã€ `OBJECT DUPLICATE` コマンドを使用ã—ã¦ä½œæˆã•れãŸã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã¯ç„¡åйã§ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ãŸã¨ãã«ä½¿ç”¨ç’°å¢ƒã‚’復元ã•ã›ã‚‹ã«ã¯ã€ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーãŒã‚ªãƒ–ジェクトã®ä½œæˆãƒ»å®šç¾©ãƒ»é…ç½®ã®æ‰‹é †ã‚’å†ç¾ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -When this option is selected, the [Save Value](FormObjects/properties_Object.md#save-value) option is available for certain objects. +ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã€ä¸€éƒ¨ã®ã‚ªãƒ–ジェクトã«ç½®ã„ã¦ã¯ [値を記憶](FormObjects/properties_Object.md#値を記憶) ã®ã‚ªãƒ—ションãŒé¸æŠžå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------------- | ------- | ----------- | | memorizeGeometry | boolean | true, false | +#### å‚ç…§ +[**値を記憶**](FormObjects/properties_Object.md#値を記憶) -#### See also -[**Save Value**](FormObjects/properties_Object.md#save-value) +--- -* * * +## ウィンドウタイトル -## Window Title +ウィンドウタイトルã¯ã€ã‚¢ãƒ—リケーションモード㧠`Open window` ã‚„ `Open form window` コマンドを用ã„ã¦ãƒ•ォームを開ãéš›ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ウィンドウタイトルã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚¿ã‚¤ãƒˆãƒ«ãƒãƒ¼ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -The window title is used when the form is opened using the `Open form window` and `Open window` 4D commands in Application environment. The window title appears in the Title bar of the window. +å‹•çš„å‚照を使用ã—ã¦ã€ãƒ•ォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚¿ã‚¤ãƒˆãƒ«ã‚’定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: -You can use dynamic references to set the window titles for forms, *i.e.*: +* Resourcesフォルダーã«ä¿å­˜ã•れãŸã€æ¨™æº–ã® XLIFFå‚ç…§ +* テーブル/フィールドラベル: é©ç”¨ã§ãるシンタックス㯠<?[TableNum]FieldNum> ã¾ãŸã¯ <?[TableName]FieldName> ã§ã™ã€‚ +* 変数ã¾ãŸã¯ãƒ•ィールド: é©ç”¨ã§ãるシンタックス㯠ã¾ãŸã¯ <[TableName]FieldName>。 フィールドや変数ã®ç¾åœ¨ã®å€¤ãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚¿ã‚¤ãƒˆãƒ«ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ -* A standard XLIFF reference stored in the Resources folder. -* A table or field label: The syntax to apply is or - - . +> ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚¿ã‚¤ãƒˆãƒ«ã®æœ€å¤§æ–‡å­—数㯠31 ã§ã™ã€‚ -* A variable or a field: The syntax to apply is \ or <[TableName]FieldName>. The current value of the field or variable will be displayed in the window title. +#### JSON 文法 -> The number of characters for a window title is limited to 31. +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | ------------------- | +| windowTitle | string | テキストã¾ãŸã¯å‚ç…§ã¨ã—ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å | -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------- | ------ | ------------------------------------------------------ | -| windowTitle | string | The name of the window as plain text or as a reference | \ No newline at end of file diff --git a/website/translated_docs/ja/FormEditor/properties_FormSize.md b/website/translated_docs/ja/FormEditor/properties_FormSize.md index 3ad4ca736ca87d..c278f583843a7f 100644 --- a/website/translated_docs/ja/FormEditor/properties_FormSize.md +++ b/website/translated_docs/ja/FormEditor/properties_FormSize.md @@ -1,254 +1,82 @@ --- id: formSize -title: Form Size +title: フォームサイズ --- -4D lets you set the size of both the form and the [window](properties_WindowSize.md). These properties are interdependent and your application interface results from their interaction. - -Size options depend on the value of the **Size based on** option. - -* * * - -## Size based on - -* **Automatic Size**: The size of the form will be that necessary to display all the objects, to which will be added the margin values (in pixels) entered in the [**Hor. Margin**](#hor-margin) and [**Vert. Margin**](#vert-margin) fields. - -< - -p> You can choose this option when you want to use active objects placed in an offscreen area (*i.e.*, outside the bounding rectangle of the window) with an automatic size window. Thanks to this option, the presence of these objects will not modify the size of the window. - -* **Set Size**: The size of the form will be based on what you enter (in pixels) in the [**Width**](#width) and [**Height**](#height) fields. - -* **\ - - - : The size of the form will be based on the position of the selected form object. For example, if you choose an object that is placed in the bottom-right part of the area to be displayed, the form size will consist of a rectangle whose upper left corner will be the origin of the form and the lower right corner will correspond to that of the selected object, plus any margin values.

          - -
          -

          - For output forms, only the Hor. margin or Width fields are available. -

          -
          - -

          - JSON 文法 -

          - - - - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - formSizeAnchor - - string - - Name of object to use to defined the size of the form -
          - -
          - -

          - Height -

          - -

          - Height of the form (in pixels) when the form size is Set size. -

          - -

          - JSON 文法 -

          - - - - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - height - - number - - integer value -
          - -
          - -

          - Hor. Margin -

          - -

          - Value to add (in pixels) to the right margin of the form when the form size is Automatic size or \ - - -

          - -

          - This value also determines the right-hand margins of forms used in the Label editor. -

          - -

          - JSON 文法 -

          - - - - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - rightMargin - - number - - integer value -
          - -
          - -

          - Vert. Margin -

          - -

          - Value to add (in pixels) to the bottom margin of the form when the form size is Automatic size or \ - - - .

          - -

          - This value also determines the top margins of forms used in the Label editor. -

          - -

          - JSON 文法 -

          - - - - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - bottomMargin - - number - - integer value -
          - -
          - -

          - å¹… -

          - -

          - Width of the form (in pixels) when the form size is Set size. -

          - -

          - JSON 文法 -

          - - - - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - width - - number - - integer value -
          \ No newline at end of file +4Dã§ã¯ã€ãƒ•ォーム㨠[ウィンドウ](properties_WindowSize.md) ã®ä¸¡æ–¹ã®ã‚µã‚¤ã‚ºã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ—ロパティã¯ç›¸äº’ã«ä¾å­˜ã—ã¦ãŠã‚Šã€ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã¯ã“れらã®ç›¸äº’作用ã«ã‚ˆã£ã¦ã‚‚ãŸã‚‰ã•れã¾ã™ã€‚ + +サイズオプションã¯ã€**サイズを決ã‚ã‚‹ã‚‚ã®** オプションã®å€¤ã«ä¾å­˜ã—ã¾ã™ã€‚ + +--- +## サイズを決ã‚ã‚‹ã‚‚ã® + + +* **自動サイズ**: フォームサイズã¯ã€ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトを表示ã™ã‚‹ãŸã‚ã«å¿…è¦ãªã‚µã‚¤ã‚ºã¨ã€[**æ°´å¹³ マージン**](#æ°´å¹³-マージン) ãŠã‚ˆã³ [**垂直 マージン**](#垂直-マージン) フィールドã¸å…¥åŠ›ã•れãŸãƒžãƒ¼ã‚¸ãƒ³å€¤ (ピクセルå˜ä½) ã‚’åˆè¨ˆã—ãŸã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚

          自動サイズã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’用ã„ã¦ã€ã‚ªãƒ•スクリーンエリア (ウィンドウã®çŸ©å½¢å¢ƒç•Œç·šã®å¤–å´ã®ã‚¨ãƒªã‚¢) ã«é…ç½®ã—ãŸã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトを使用ã—ãŸã„å ´åˆã«ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ã“れらã®ã‚ªãƒ–ジェクトã«ã‚ˆã‚Šã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚µã‚¤ã‚ºãŒå¤‰æ›´ã•れãªããªã‚Šã¾ã™ã€‚ + + +* **サイズを設定**: フォームサイズ㯠[**å¹…**](#å¹…) ãŠã‚ˆã³ [**高ã•**](#高ã•) フィールドã«å…¥åŠ›ã•れãŸå€¤ (ピクセルå˜ä½) ã«ã‚ˆã‚Šæ±ºã¾ã‚Šã¾ã™ 。 + +* **オブジェクトå**: フォームサイズã¯ã€é¸æŠžã—ãŸãƒ•ォームオブジェクトã®ä½ç½®ã«ã‚ˆã‚Šæ±ºã¾ã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€è¡¨ç¤ºã•れるエリアã®å³ä¸‹éƒ¨åˆ†ã«ç½®ã‹ã‚Œã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ãŸå ´åˆã¯ã€å·¦ä¸Šç«¯ãŒèµ·ç‚¹ã§ã‚りã€å³ä¸‹ç«¯ãŒé¸æŠžã—ãŸã‚ªãƒ–ジェクトã®å³ä¸‹ç«¯ã¨ãªã‚‹çŸ©å½¢ã«ãƒžãƒ¼ã‚¸ãƒ³å€¤ã‚’加算ã—ãŸã‚‚ã®ãŒãƒ•ォームサイズã«ãªã‚Šã¾ã™ã€‚ + + +> 出力フォームã®å ´åˆã¯ [**æ°´å¹³ マージン**](#æ°´å¹³-マージン) ã¾ãŸã¯ [**å¹…**](å¹…) フィールドã ã‘ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ---------------------------- | +| formSizeAnchor | string | フォームサイズを定義ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトã®åå‰ | + +--- +## 高㕠+ +[フォームサイズ](#サイズを決ã‚ã‚‹ã‚‚ã®) ㌠**サイズを設定** ã®å ´åˆã®ãƒ•ォームã®é«˜ã• (ピクセルå˜ä½) ã§ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ----- | +| height | number | 整数値 | + + +--- +## æ°´å¹³ マージン +[フォームサイズ](#サイズを決ã‚ã‚‹ã‚‚ã®)㌠**自動サイズ** ã¾ãŸã¯ **オブジェクトå** ã®å ´åˆã«ã€ãƒ•ォームã®å³ãƒžãƒ¼ã‚¸ãƒ³ã«è¿½åŠ ã™ã‚‹å€¤ (ピクセルå˜ä½) ã§ã™ã€‚ + +ã“ã®å€¤ã¯ã€ãƒ©ãƒ™ãƒ«ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ä½¿ç”¨ã•れるフォームã®å³ãƒžãƒ¼ã‚¸ãƒ³ã‚‚決定ã—ã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | ----- | +| rightMargin | number | 整数値 | + + +--- + +## 垂直 マージン +[フォームサイズ](#サイズを決ã‚ã‚‹ã‚‚ã®)㌠**自動サイズ** ã¾ãŸã¯ **オブジェクトå** ã®å ´åˆã«ã€ãƒ•ォームã®ä¸‹ãƒžãƒ¼ã‚¸ãƒ³ã«è¿½åŠ ã™ã‚‹å€¤ (ピクセルå˜ä½) ã§ã™ã€‚ + +ã“ã®å€¤ã¯ã€ãƒ©ãƒ™ãƒ«ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ä½¿ç”¨ã•れるフォームã®ä¸Šãƒžãƒ¼ã‚¸ãƒ³ã‚‚決定ã—ã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ----- | +| bottomMargin | number | 整数値 | + + +--- +## å¹… + +[フォームサイズ](#サイズを決ã‚ã‚‹ã‚‚ã®) ㌠**サイズを設定** ã®å ´åˆã®ãƒ•ォームã®å¹… (ピクセルå˜ä½) ã§ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----- | ------ | ----- | +| width | number | 整数値 | diff --git a/website/translated_docs/ja/FormEditor/properties_JSONref.md b/website/translated_docs/ja/FormEditor/properties_JSONref.md index dd86cd5b070a04..a973510d440c42 100644 --- a/website/translated_docs/ja/FormEditor/properties_JSONref.md +++ b/website/translated_docs/ja/FormEditor/properties_JSONref.md @@ -1,48 +1,52 @@ --- id: jsonReference -title: JSON property list +title: JSON プロパティリスト --- -This page provides a comprehensive list of all form properties, sorted by their JSON name. Click on a property name to access its detailed description. +ã“ã®ä¸€è¦§ã¯ã€ã™ã¹ã¦ã®ãƒ•ォームプロパティを JSONåé †ã«ä¸¦ã¹ã¦ã¾ã¨ã‚ãŸã‚‚ã®ã§ã™ã€‚ プロパティåをクリックã™ã‚‹ã¨ã€è©³ç´°èª¬æ˜Žã«ç§»å‹•ã—ã¾ã™ã€‚ +> "フォームプロパティ" ã®ç« ã§ã¯ã€ãƒ—ロパティリストã«ãŠã‘るテーマã¨åç§°ã§å„プロパティを紹介ã—ã¦ã„ã¾ã™ã€‚ -> In the "Form Properties" chapter, properties are sorted according to their names and themes in the Property List. +[a](#a) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [h](#h) - [i](#i) - [m](#m) - [p](#p) - [r](#r) - [s](#s) - [w](#w) -| プロパティ | 説明 | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| a | | | -| [bottomMargin](properties_FormSize.md#vert-margin) | Vertical margin value (in pixels) | 最å°å€¤: 0 | -| **d** | | | -| [destination](properties_FormProperties.md#form-type) | Form type | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | -| **e** | | | -| [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"...]. | -| **f** | | | -| [formSizeAnchor](properties_FormSize.md#form-size) | Name of the object whose position determines the size of the form. (minimum length: 1) | Name of a 4D object | -| **h** | | | -| [height](properties_FormSize.md#height) | Height of the form | 最å°å€¤: 0 | -| **i** | | | -| [inheritedForm](properties_FormProperties.md#inherited-form-name) | Designates the form to inherit | Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form | -| [inheritedFormTable](properties_FormProperties.md#inherited-form-table) | Designates the table an inherited form will use | A table name or number | -| **m** | | | -| [markerBody](properties_Markers.md#form-detail) | Detail marker position | 最å°å€¤: 0 | -| [markerBreak](properties_Markers.md#form-break) | Break marker position(s) | 最å°å€¤: 0 | -| [markerFooter](properties_Markers.md#form-footer) | Footer marker position | 最å°å€¤: 0 | -| [markerHeader](properties_Markers.md#forrm-header) | Header marker position(s) | integer minimum: 0; integer array minimum: 0 | -| [memorizeGeometry](properties_FormProperties.md#memorize-geometry) | Saves the form parameters when the form window is closed | true, false | -| [menuBar](properties_Menu.md#associated-menu-bar) | Menu bar to associate to the form | Name of a valid menu bar | -| [method](properties_Action.md#method) | A project method name. | The name of an existing project method | -| **p** | | | -| [pages](properties_FormProperties.md#pages) | Collection of pages (each page is an object) | Page objects | -| [pageFormat](properties_Print.md#settings) | object | Available print properties | -| **r** | | | -| [rightMargin](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | 最å°å€¤: 0 | -| **s** | | | -| [shared](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | -| **w** | | | -| [width](properties_FormSize.md#width) | Width of the form | 最å°å€¤: 0 | -| [windowMaxHeight](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | 最å°å€¤: 0 | -| [windowMaxWidth](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | 最å°å€¤: 0 | -| [windowMinHeight](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | 最å°å€¤: 0 | -| [windowMinWidth](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | 最å°å€¤: 0 | -| [windowSizingX](properties_WindowSize.md#fixed-width) | Form window's vertical sizing | "fixed", "variable" | -| [windowSizingY](properties_WindowSize.md#fixed-height) | Form window's horizontal sizing | "fixed", "variable" | -| [windowTitle](properties_FormProperties.md#window-title) | Designates a form window's title | A name for the form window | \ No newline at end of file +| プロパティ | 説明 | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------------------------------------------------------ | --------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| **a** | | | +| [`bottomMargin`](properties_FormSize.md#垂直-マージン) | 垂直マージン値 (ピクセルå˜ä½) | 最å°å€¤: 0 | +| **c** | | | +| [`colorScheme`](properties_FormProperties.md#カラースキーム) | フォームã®ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ  | "dark", "light" | +| **d** | | | +| [`destination`](properties_FormProperties.md#フォームタイプ) | フォームタイプ | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +| **e** | | | +| [`entryOrder`](formEditor.md#データã®å…¥åЛ順) | 入力フォーム㧠**Tab**キーや **改行**キーãŒä½¿ç”¨ã•れãŸã¨ãã«ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトãŒé¸æŠžã•れる順番。 | 4Dフォームオブジェクトåã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | +| [`events`](Events/overview.md) | オブジェクトã¾ãŸã¯ãƒ•ォームã«ã¤ã„ã¦é¸æŠžã•れã¦ã„るイベントã®ãƒªã‚¹ãƒˆ | イベントåã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚例: ["onClick","onDataChange"...]. | +| **f** | | | +| [`formSizeAnchor`](properties_FormSize.md#サイズを決ã‚ã‚‹ã‚‚ã®) | フォームサイズを定義ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚ªãƒ–ジェクトã®åå‰ (最å°é•·ã•: 1) | 4Dオブジェクトã®åå‰ | +| **h** | | | +| [`height`](properties_FormSize.md#高ã•) | フォームã®é«˜ã• | 最å°å€¤: 0 | +| **i** | | | +| [`inheritedForm`](properties_FormProperties.md#継承ã•れãŸãƒ•ォームå) | 継承フォームを指定ã—ã¾ã™ | テーブルã¾ãŸã¯ãƒ—ロジェクトフォームã®åå‰ (文字列), フォームを定義ã™ã‚‹ .json ファイルã¸ã® POSIX パス (文字列), ã¾ãŸã¯ãƒ•ォームを定義ã™ã‚‹ã‚ªãƒ–ジェクト | +| [`inheritedFormTable`](properties_FormProperties.md#継承ã•れãŸãƒ•ォームテーブル) | 継承フォームãŒãƒ†ãƒ¼ãƒ–ルã«å±žã—ã¦ã„れã°ã€ãã®ãƒ†ãƒ¼ãƒ–ル | テーブルåã¾ãŸã¯ãƒ†ãƒ¼ãƒ–ãƒ«ç•ªå· | +| **m** | | | +| [`markerBody`](properties_Markers.md#フォーム詳細) | 詳細マーカーã®ä½ç½® | 最å°å€¤: 0 | +| [`markerBreak`](properties_Markers.md#フォームブレーク) | ブレークマーカーã®ä½ç½® | 最å°å€¤: 0 | +| [`markerFooter`](properties_Markers.md#フォームフッター) | フッターマーカーã®ä½ç½® | 最å°å€¤: 0 | +| [`markerHeader`](properties_Markers.md#フォームヘッダー) | ヘッダーマーカーã®ä½ç½® | 最å°å€¤ (æ•´æ•°): 0; 最å°å€¤ (æ•´æ•°é…列): 0 | +| [`memorizeGeometry`](properties_FormProperties.md#é…置を記憶) | フォームウィンドウãŒé–‰ã˜ã‚‰ã‚ŒãŸæ™‚ã«ã€ãƒ•ォームパラメーターを記憶 | true, false | +| [`menuBar`](properties_Menu.md#連çµãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼) | フォームã¨é–¢é€£ã¥ã‘るメニューãƒãƒ¼ | 有効ãªãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®åç§° | +| [`method`](properties_Action.md#メソッド) | プロジェクトメソッドå | 存在ã™ã‚‹ãƒ—ロジェクトメソッドã®åå‰ | +| **p** | | | +| [`pages`](properties_FormProperties.md#pages) | ページã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (å„ページã¯ã‚ªãƒ–ジェクトã§ã™) | ページオブジェクト | +| [`pageFormat`](properties_Print.md#設定) | object | 利用å¯èƒ½ãªå°åˆ·ãƒ—ロパティ | +| **r** | | | +| [`rightMargin`](properties_FormSize.md#æ°´å¹³-マージン) | 水平マージン値 (ピクセルå˜ä½) | 最å°å€¤: 0 | +| **s** | | | +| [`shared`](properties_FormProperties.md#サブフォームã¨ã—ã¦å…¬é–‹) | フォームãŒã‚µãƒ–フォームã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã‹ã‚’指定ã—ã¾ã™ | true, false | +| **w** | | | +| [`width`](properties_FormSize.md#å¹…) | フォームã®å¹… | 最å°å€¤: 0 | +| [`windowMaxHeight`](properties_FormProperties.md#最大高ã•) | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å¤§é«˜ã• | 最å°å€¤: 0 | +| [`windowMaxWidth`](properties_FormProperties.md#最大幅) | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å¤§å¹… | 最å°å€¤: 0 | +| [`windowMinHeight`](properties_FormProperties.md#最å°é«˜ã•) | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å°é«˜ã• | 最å°å€¤: 0 | +| [`windowMinWidth`](properties_FormProperties.md#最å°å¹…) | ãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å°å¹… | 最å°å€¤: 0 | +| [`windowSizingX`](properties_FormSize.md#固定幅) | フォームウィンドウã®é«˜ã•固定 | "fixed", "variable" | +| [`windowSizingY`](properties_WindowSize.md#固定高ã•) | フォームウィンドウã®å¹…固定 | "fixed", "variable" | +| [`windowTitle`](properties_FormProperties.md#ウィンドウタイトル) | フォームウィンドウã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’指定ã—ã¾ã™ | フォームウィンドウã®åå‰ã€‚ | \ No newline at end of file diff --git a/website/translated_docs/ja/FormEditor/properties_Markers.md b/website/translated_docs/ja/FormEditor/properties_Markers.md index 60870d4b907077..60fbcbca3276fb 100644 --- a/website/translated_docs/ja/FormEditor/properties_Markers.md +++ b/website/translated_docs/ja/FormEditor/properties_Markers.md @@ -1,127 +1,120 @@ --- id: markers -title: Markers +title: マーカー --- -These properties let you specify the precise location of markers on the vertical ruler of a **table form**. Markers are mainly used in output forms. They control the information that is listed and set header, breaks, detail and footer areas of the form. Any object that placed in these areas is displayed or printed at the appropriate location. +ã“れらã®ãƒ—ロパティを使用ã—ã¦ã€**テーブルフォーム** ã®ç¸¦ãƒ«ãƒ¼ãƒ©ãƒ¼ä¸Šã§ã®ãƒžãƒ¼ã‚«ãƒ¼ã®ä½ç½®ã‚’ç²¾å¯†ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ マーカーã¯ä¸»ã«å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã§ä½¿ç”¨ã•れã¾ã™ã€‚ マーカーã¯ãƒªã‚¹ãƒˆã•れる情報を制御ã—ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚„ブレークã€è©³ç´°ã€ãƒ•ッターを設定ã—ã¾ã™ã€‚ å„エリア内ã«é…ç½®ã•れãŸã‚ªãƒ–ジェクトã¯ã€å¯¾å¿œã™ã‚‹å ´æ‰€ã«è¡¨ç¤ºã‚„å°åˆ·ã•れã¾ã™ã€‚ -Whenever any form is used for output, either for screen display or printing, the output marker lines take effect and the areas display or print at designated locations. The markers also take effect when a form is used as the List form in a subform area. However, they have no effect when a form is used for input. +フォームãŒå‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨ã—ã¦ä½¿ç”¨ã•れるã¨ãã¯ã€ç”»é¢ç”¨ã§ã‚れå°åˆ·ç”¨ã§ã‚れã€ãƒžãƒ¼ã‚«ãƒ¼è¨­å®šãŒè€ƒæ…®ã•れã¦å„ã‚¨ãƒªã‚¢ãŒæŒ‡å®šã•れãŸå ´æ‰€ã«è¡¨ç¤º/å°åˆ·ã•れã¾ã™ã€‚ ã¾ãŸã€ã‚µãƒ–フォームエリア内ã®ãƒªã‚¹ãƒˆãƒ•ォームã¨ã—ã¦ãƒ•ォームãŒä½¿ç”¨ã•れる場åˆã‚‚å‡ºåŠ›ãƒžãƒ¼ã‚«ãƒ¼ã¯æœ‰åйã§ã™ã€‚ ãŸã ã—ã€ãƒ•ォームãŒå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨ã—ã¦ä½¿ç”¨ã•れる場åˆã€ãƒžãƒ¼ã‚«ãƒ¼è¨­å®šã¯ç„¡è¦–ã•れã¾ã™ã€‚ -Methods that are associated with objects in these areas are executed when the areas are printed or displayed as long as the appropriate events have been activated. For example, a object method placed in the Header area is executed when the `On Header` event takes place. +ã“れらã®ã‚¨ãƒªã‚¢ã«é…ç½®ã•れãŸã‚ªãƒ–ジェクトã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€é©åˆ‡ãªã‚¤ãƒ™ãƒ³ãƒˆãŒæœ‰åйã«ã•れã¦ã„れã°ã€ã‚¨ãƒªã‚¢ãŒè¡¨ç¤º/å°åˆ·ã•れるã¨ãã«å®Ÿè¡Œã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚¨ãƒªã‚¢ã«é…ç½®ã•れãŸã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ `On Header` イベントã§å®Ÿè¡Œã•れã¾ã™ã€‚ -* * * +--- -## Form Break +## フォームブレーク -Form Break areas are displayed once at the end of the list of records and are printed once after the records have been printed in a report. +フォームブレークエリアã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã®ä¸‹ã«ä¸€å›žã ã‘表示ã‚ã‚‹ã„ã¯å°åˆ·ã•れã¾ã™ã€‚ -The Break area is defined as the area between the Detail control line and the Break control line. There can be [several Break areas](#additional-areas) in your report. +ブレークエリアã¯è©³ç´°ãƒžãƒ¼ã‚«ãƒ¼ (D) ã¨ãƒ–レークマーカー (B0) ã®é–“ã§ã™ã€‚ レãƒãƒ¼ãƒˆã« [複数ã®ãƒ–レークエリア](#追加マーカーã®ä½œæˆ)を追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -You can make Break areas smaller or larger. You can use a Break area to display information that is not part of the records (instructions, current date, current time, etc.), or to display a line or other graphic element that concludes the screen display. In a printed report, you can use a Break area for calculating and printing subtotals and other summary calculations. +ブレークエリアã®å¤§ãã•ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ レコードデータã§ã¯ãªã„情報 (èª¬æ˜Žã‚„æ—¥ä»˜ã€æ™‚刻ãªã©) ã®ã»ã‹ã€ç·šã‚„ãã®ä»–ã®ã‚°ãƒ©ãƒ•ィックè¦ç´ ã‚’表示ã™ã‚‹ãŸã‚ã«ãƒ–レークエリアを使用ã§ãã¾ã™ã€‚ å°åˆ·ãƒ¬ãƒãƒ¼ãƒˆã§ã¯ã€å°è¨ˆãªã©ã®ã‚µãƒžãƒªè¨ˆç®—ã‚’ãŠã“ãªã£ã¦å°åˆ·ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------- | --------------------------------- | ------------------------------------------------------------------------------------------- | -| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels. -Minimum value: 0 | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | --------------------------------- | ---------------------------------------------------------------- | +| markerBreak | integer | integer collection | ブレークマーカーã®ä½ç½® (ピクセルå˜ä½)ã€ã¾ãŸã¯ãƒ–レークマーカーä½ç½®ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã—ã¾ã™ã€‚
          最å°å€¤: 0 | -* * * +--- -## Form Detail +## フォーム詳細 -The form Detail area is displayed on the screen and printed once for each record in a report. The Detail area is defined as the area between the Header control line and the Detail control line. +フォーム詳細エリアã¯ã€ãƒ¬ãƒãƒ¼ãƒˆä¸­ã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ¯Žã«ç”»é¢ã«è¡¨ç¤ºã•れãŸã‚Šå°åˆ·ã•れãŸã‚Šã—ã¾ã™ã€‚ 詳細エリアã¯ãƒ˜ãƒƒãƒ€ãƒ¼ãƒžãƒ¼ã‚«ãƒ¼ (H) ã¨è©³ç´°ãƒžãƒ¼ã‚«ãƒ¼ (D) ã®é–“ã§ã™ã€‚ -You can make the Detail area smaller or larger. Whatever you place in the Detail area is displayed or printed once for each record. Most often you place fields or variables in the Detail area so that the information in each record is displayed or printed, but you can place other elements in the Detail area as well. +詳細エリアã®å¤§ãã•ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細エリアã«é…ç½®ã—ãŸã‚ªãƒ–ジェクトã¯ãƒ¬ã‚³ãƒ¼ãƒ‰æ¯Žã«è¡¨ç¤ºã¾ãŸã¯å°åˆ·ã•れã¾ã™ã€‚ 主ã«ãƒ•ィールドや変数をé…ç½®ã—ã¦ã€å„ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æƒ…報を表示/å°åˆ·ã—ã¾ã™ãŒã€ä»–ã®ã‚ªãƒ–ジェクトをé…ç½®ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------- | ------------------------------ | -| markerBody | integer | Detail marker position. 最å°å€¤: 0 | - - -* * * - -## Form Footer +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------- | ----------------- | +| markerBody | integer | 詳細マーカーã®ä½ç½®ã€‚ 最å°å€¤: 0 | -The Form Footer area is displayed on screen under the list of records. It is always printed at the bottom of every page of a report. The Footer area is defined as the area between the Break control line and the Footer control line. - -You make the Footer area smaller or larger. +--- -< +## フォームフッター -p> +フォームフッターエリアã¯ã€ç”»é¢ã§ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã®ä¸‹ã®è¡¨ç¤ºã•れã¾ã™ã€‚ å°åˆ·ãƒ¬ãƒãƒ¼ãƒˆã®å ´åˆã¯ã€å„ページã®ä¸€ç•ªä¸‹ã«å°åˆ·ã•れã¾ã™ã€‚ フッターエリアã¯ãƒ–レークマーカー (B0) ã¨ãƒ•ッターマーカー (F) ã®é–“ã§ã™ã€‚ +フッターエリアã®å¤§ãã•ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

          -You can use the Footer area to print graphics, page numbers, the current date, or any text you want at the bottom of each page of a report. For output forms designed for use on screen, the Footer area typically contains buttons that give the user options such as doing a search or sort, printing records, or putting away the current report. Active objects are accepted. +フッターエリアを使用ã—ã¦ç”»åƒã€ãƒšãƒ¼ã‚¸ç•ªå·ã€æ—¥ä»˜ã€ã¾ãŸå„ページã®ä¸‹éƒ¨ã«é…ç½®ã—ãŸã„テキストを何ã§ã‚‚å°åˆ·ã§ãã¾ã™ã€‚ 通常ã€ç”»é¢è¡¨ç¤ºç”¨ã®å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã§ã¯ã€ãƒ•ãƒƒã‚¿ãƒ¼ã‚¨ãƒªã‚¢ã«æ¤œç´¢ã‚„ä¸¦ã¹æ›¿ãˆã€å°åˆ·ãªã©ã‚’ãŠã“ãªã†ãŸã‚ã®ãƒœã‚¿ãƒ³ã‚’é…ç½®ã—ã¾ã™ã€‚ ã™ã¹ã¦ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトをé…ç½®ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------ | ------- | ------ | | markerFooter | integer | 最å°å€¤: 0 | -* * * - -## Form Header +--- -The form Header area is displayed at the top of each screen and is printed at the top of each page of a report. The Header area is defined as the area above the Header control line. +## フォームヘッダー -You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern. +フォームヘッダーエリアã¯ç”»é¢ã®ä¸€ç•ªä¸Šã«è¡¨ç¤ºã•れã€ã¾ãŸå°åˆ·æ™‚ã«ã¯å„ページã®ä¸€ç•ªä¸Šã«å°åˆ·ã•れã¾ã™ã€‚ ヘッダーエリアã¯ãƒ•ォームã®ä¸€ç•ªä¸Šã‹ã‚‰ãƒ˜ãƒƒãƒ€ãƒ¼ãƒžãƒ¼ã‚«ãƒ¼ (H) ã¾ã§ã®é–“ã§ã™ã€‚ +ヘッダーエリアã®å¤§ãã•ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ヘッダーエリアã«ã¯åˆ—ã®ã‚¿ã‚¤ãƒˆãƒ«ã€ãƒ•ォームã®èª¬æ˜Žã€ãã®ä»–ã®æƒ…å ±ã€ä¼šç¤¾ãƒ­ã‚´ãªã©ã®ç”»åƒã‚’é…ç½®ã—ã¾ã™ã€‚

          -< +サブフォームã¨ã—ã¦è¡¨ç¤ºã•れる出力フォームã€ã‚ã‚‹ã„㯠`DISPLAY SELECTION` ã‚„ `MODIFY SELECTION` コマンドを使用ã—ã¦è¡¨ç¤ºã•れる出力フォームã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚¨ãƒªã‚¢ã«ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトをé…ç½®ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 以下ã®ã‚ˆã†ãªã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトをé…ç½®ã§ãã¾ã™: -p> +- ボタンã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ +- コンボボックスã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã€ãƒ”クãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー +- 階層リストã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ +- ラジオボタンã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€3Dãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ +- 進æ—インジケーターã€ãƒ«ãƒ¼ãƒ©ãƒ¼ã€ã‚¹ãƒ†ãƒƒãƒ‘ーã€ã‚¹ãƒ”ナー -You can also place and use active objects in the Header area of output forms displayed as subforms, in the records display window or using the `DISPLAY SELECTION` and `MODIFY SELECTION` commands. The following active objects can be inserted: +`addSubrecord` (サブレコード追加) ã‚„ `cancel`ã€`automaticSplitter` (自動スプリッター) ãªã©ã®æ¨™æº–アクションをボタンã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ヘッダーエリアã«é…ç½®ã—ãŸã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã§ã¯ä»¥ä¸‹ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’使用ã§ãã¾ã™: `On Load`, `On Clicked`, `On Header`, `On Printing Footer`, `On Double Clicked`, `On Drop`, `On Drag Over`, `On Unload`。 フォームメソッド㌠`On Header` イベントã§å‘¼ã³å‡ºã•れるã®ã¯ã€ã‚¨ãƒªã‚¢ã®ã‚ªãƒ–ジェクトメソッドãŒå‘¼ã³å‡ºã•れãŸå¾Œã«ãªã‚Šã¾ã™ã€‚ -- Buttons, picture buttons, -- Combo boxes, drop-down lists, picture pop-up menus, -- hierarchical lists, list boxes -- Radio buttons, check boxes, 3D check boxes, -- Progress indicators, rulers, steppers, spinners. +フォームã«ã¯ã€[追加ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚¨ãƒªã‚¢](#追加マーカーã®ä½œæˆ) を作æˆã—ã€è¿½åŠ ãƒ–ãƒ¬ãƒ¼ã‚¯ã¨é–¢é€£ã¥ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ レベル1ヘッダーã¯ã€æœ€åˆã®ã‚½ãƒ¼ãƒˆãƒ•ィールドã«ã‚ˆã‚Šã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå°åˆ·ã•れる直å‰ã«å°åˆ·ã•れã¾ã™ã€‚ -Standard actions such as `Add Subrecord`, `Cancel` (lists displayed using `DISPLAY SELECTION` and `MODIFY SELECTION`) or `Automatic splitter` can be assigned to the inserted buttons. The following events apply to the active objects you insert in the Header area: `On Load`, `On Clicked`, `On Header`, `On Printing Footer`, `On Double Clicked`, `On Drop`, `On Drag Over`, `On Unload`. Keep in mind that the form method is called with the `On Header` event after calling the object methods of the area. -The form can contains [additional header areas](#additional-areas) to be associated with additional breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | --------------------------------- | --------------------------------------------------------------------------------------------- | -| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels. -Minimum value: 0 | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | --------------------------------- | ---------------------------------------------------------------- | +| markerHeader | integer | integer collection | ヘッダーマーカーã®ä½ç½® (ピクセルå˜ä½)ã€ã¾ãŸã¯ãƒ˜ãƒƒãƒ€ãƒ¼ãƒžãƒ¼ã‚«ãƒ¼ä½ç½®ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã—ã¾ã™ã€‚
          最å°å€¤: 0 | -* * * -## Additional areas +--- + +## 追加マーカーã®ä½œæˆ + +レãƒãƒ¼ãƒˆç”¨ã«è¿½åŠ ã®ãƒ–レークエリアやヘッダーエリアを作æˆã§ãã¾ã™ã€‚ ã“れらã®è¿½åŠ ã•れãŸã‚¨ãƒªã‚¢ã‚’使用ã—ã¦ã€å°è¨ˆãªã©ã®è¨ˆç®—çµæžœã‚’レãƒãƒ¼ãƒˆã«å°åˆ·ã—ãŸã‚Šã€ãã®ä»–ã®æƒ…報を効果的ã«è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -You can create additional Break areas and Header areas for a report. These additional areas allow you to print subtotals and other calculations in a report and to display other information effectively. +追加エリアã¯ã€[フォームブレーク](#フォームブレーク) 㨠[フォームヘッダー](#フォームヘッダー) ã®ãƒ—ロパティã«ãƒžãƒ¼ã‚«ãƒ¼ä½ç½®ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã™ã‚‹ã¨å®šç¾©ã•れã¾ã™ã€‚ -Additional areas are defined when you use a collection of positions in the [Form Break](#form-break) and [Form Header](#form-header) properties. +> 4Dフォームエディターã§ã¯ã€**Alt**キーを押ã—ãªãŒã‚‰é©åˆ‡ãªã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒžãƒ¼ã‚«ãƒ¼ã‚’クリックã—ã¦ã€è¿½åŠ ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãƒ©ã‚¤ãƒ³ã‚’作æˆã—ã¾ã™ã€‚ -> In the 4D Form editor, you create additional control lines by holding down the **Alt** key while clicking the appropriate control marker. +フォームã¯å¸¸ã«ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã€è©³ç´°ã€ãƒ–レーク (レベル0)ã€ãŠã‚ˆã³ãƒ•ッターエリアをæŒã£ãŸçŠ¶æ…‹ã§ä½œæˆã•れã¾ã™ã€‚ -A form always starts with a Header, Detail, Break level 0, and Footer areas. +ブレークレベル0 ã¯ã€ãƒ¬ãƒãƒ¼ãƒˆå¯¾è±¡ã®å…¨ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå°åˆ·ã•れãŸå¾Œã«å®Ÿè¡Œã•れã¾ã™ã€‚ 追加ã®ãƒ–レークマーカーã¯ãれãžã‚Œ "ブレークレベル1"ã€"ブレークレベル2" ãªã©ã¨å‘¼ã°ã‚Œã¾ã™ã€‚ -Break at level 0 zero takes in all the records; it occurs after all the records are printed. Additional Break areas can be added, i.e. a Break level 1, Break level 2, etc. +レベル1ã®ãƒ–レークã¯ä¸€ç•ªç›®ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドã§ã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå°åˆ·ã•れãŸå¾Œã«ç™ºç”Ÿã—ã¾ã™ã€‚ -A Break level 1 occurs after the records grouped by the first sorted field are printed. +| ラベル | 説明 | 実行タイミング | +| --- | -------- | --------------- | +| B1 | ブレークレベル1 | 一番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | +| B2 | ブレークレベル2 | 二番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | +| B3 | ブレークレベル3 | 三番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | -| Label | 説明 | Prints after groups created by: | -| ----- | -- | ------------------------------- | -| | | | - Form Break 1|Break at level 1|First sorted field Form Break 2|Break at level 2|Second sorted field Form Break 3|Break at level 3|Third sorted field| +追加ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¯ãƒ–レークã«é–¢é€£ä»˜ã‘られã¾ã™ã€‚ レベル1ヘッダーã¯ã€æœ€åˆã®ã‚½ãƒ¼ãƒˆãƒ•ィールドã«ã‚ˆã‚Šã‚°ãƒ«ãƒ¼ãƒ—化ã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå°åˆ·ã•れる直å‰ã«å°åˆ·ã•れã¾ã™ã€‚ -Additional Header areas are associated with Breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. +| ラベル | 説明 | 実行タイミング | +| --- | -------- | --------------- | +| H1 | ヘッダーレベル1 | 一番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | +| H2 | ヘッダーレベル2 | 二番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | +| H3 | ヘッダーレベル3 | 三番目ã®ã‚½ãƒ¼ãƒˆãƒ•ィールドå°åˆ·å¾Œ | -| Label | 説明 | Prints after groups created by: | -| ----- | -- | ------------------------------- | -| | | | - Form Header 1|Header at level 1|First sorted field Form Header 2|Header at level 2|Second sorted field Form Header 3|Header at level 3|Third sorted field| -If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. \ No newline at end of file +ブレーク処ç†ã‚’é–‹å§‹ã™ã‚‹ãŸã‚ã« `Subtotal` コマンドを使用ã™ã‚‹å ´åˆã€ã‚½ãƒ¼ãƒˆé †ã«å¾“ã£ã¦ä½œæˆã•れるã™ã¹ã¦ã®ãƒ–レークレベル数ã‹ã‚‰ 1 マイナスã—ãŸæ•°ã®ãƒ–レークエリアを作æˆã™ã¹ãã§ã™ã€‚ ブレークエリアã«ä½•ã‚‚å°åˆ·ã™ã‚‹å¿…è¦ãŒãªã„å ´åˆã€ãƒžãƒ¼ã‚«ãƒ¼ã‚’移動ã—ã¦ãã®é«˜ã•ã‚’ 0 ã«ã—ã¾ã™ã€‚ ãƒ–ãƒ¬ãƒ¼ã‚¯ã‚¨ãƒªã‚¢ã®æ•°ã‚ˆã‚Šã‚‚多ã„フィールド数ã§ã‚½ãƒ¼ãƒˆã™ã‚‹ã¨ã€å°åˆ·æ™‚ã«æœ€å¾Œã®ãƒ–レークエリアãŒç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ diff --git a/website/translated_docs/ja/FormEditor/properties_Menu.md b/website/translated_docs/ja/FormEditor/properties_Menu.md index aa6cde24e3c4d4..ce22b9fd2f4ba2 100644 --- a/website/translated_docs/ja/FormEditor/properties_Menu.md +++ b/website/translated_docs/ja/FormEditor/properties_Menu.md @@ -1,21 +1,23 @@ --- id: menu -title: Menu +title: メニュー --- -## Associated Menu Bar +## 連çµãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ -When a menu bar is associated to a form, it is added to the right of the current menu bar when the form is displayed in Application environment. +メニューãƒãƒ¼ã‚’フォームã«å‰²ã‚Šå½“ã¦ã‚‹ã¨ã€ã‚¢ãƒ—リケーションモードã§ãƒ•ォームãŒè¡¨ç¤ºã•れãŸã¨ãã«ã‚«ãƒ¬ãƒ³ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã®å³å´ã«è¿½åŠ ã•れã¾ã™ã€‚ -The selection of a menu command causes an `On Menu Selected` event to be sent to the form method; you can then use the `Menu selected` command to test the selected menu. +メニューコマンドãŒé¸æŠžã•れるã¨ã€`On Menu Selected` イベントãŒãƒ•ォームメソッドã«é€ã‚‰ã‚Œã¾ã™ã€‚コード内ã§ã¯ã€`Menu selected` コマンドを使ã£ã¦ã€é¸æŠžã•れãŸãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> If the menu bar of the form is identical to the current menu bar, it is not added. +> フォームã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ã¨ã‚«ãƒ¬ãƒ³ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ãƒãƒ¼ãŒåŒã˜å ´åˆã€è¿½åŠ ã¯ã•れã¾ã›ã‚“。 + +フォームメニューãƒãƒ¼ã¯ã€å…¥åŠ›ãŠã‚ˆã³å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã®ä¸¡æ–¹ã§å‹•作ã—ã¾ã™ã€‚ -The form menu bar will operate for both input and output forms. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------- | ------ | ------------------ | -| menuBar | string | Name of a menu bar | \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------- | ------ | --------- | +| menuBar | string | メニューãƒãƒ¼ã®åç§° | + diff --git a/website/translated_docs/ja/FormEditor/properties_Print.md b/website/translated_docs/ja/FormEditor/properties_Print.md index 248bdfda6cbf5e..d8317beb415b0d 100644 --- a/website/translated_docs/ja/FormEditor/properties_Print.md +++ b/website/translated_docs/ja/FormEditor/properties_Print.md @@ -1,33 +1,45 @@ --- id: print -title: Print +title: å°åˆ· --- -## Settings +## 設定 -Allows defining specific print settings for the form. This feature is useful to view printing page limits in the form editor. +フォーム毎ã«ç”¨ç´™è¨­å®šã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ã€ãƒ•ォームエディターã§å°åˆ·ãƒšãƒ¼ã‚¸ã®å¢ƒç•Œã‚’表示ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ -> **Compatibility:** Even if these settings are taken into account when the form is printed in Application mode, it is discouraged to rely on this feature to store print settings for the form, due to limitations regarding the platform and driver dependency. It is highly recommended to use the 4D commands `Print settings to BLOB`/`BLOB to print settings` which are more powerful. +> **äº’æ›æ€§ã«é–¢ã™ã‚‹æ³¨æ„:** アプリケーションモードã§ãƒ•ォームをå°åˆ·ã™ã‚‹ã¨ãã«ã“れらã®è¨­å®šãŒè€ƒæ…®ã•れãŸã¨ã—ã¦ã‚‚ã€ãƒ—ラットフォームãŠã‚ˆã³ãƒ‰ãƒ©ã‚¤ãƒãƒ¼ä¾å­˜æ€§ã«é–¢ã™ã‚‹åˆ¶ç´„ã‹ã‚‰ã€ãƒ•ォームã®å°åˆ·è¨­å®šã‚’ä¿å­˜ã™ã‚‹ã®ã«ã“ã®æ©Ÿèƒ½ã‚’使用ã™ã‚‹ã“ã¨ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 より強力㪠`Print settings to BLOB` / `BLOB to print settings` を使用ã™ã‚‹ã“ã¨ãŒå¼·ã推奨ã•れã¦ã„ã¾ã™ã€‚ + +次ã®å°åˆ·è¨­å®šãŒå¤‰æ›´ã§ãã¾ã™: + +* 用紙サイズ +* 用紙ã®å‘ã +* æ‹¡å¤§ç¸®å° + + +> 利用å¯èƒ½ãªã‚ªãƒ—ションã¯ã‚·ã‚¹ãƒ†ãƒ ã®è¨­å®šã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ -You can modify the following print settings: -* Paper format -* Paper orientation -* Page scaling -> Available options depend on the system configuration. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------- | ------ | ------------------------------------------------------------------------------------ | -| pageFormat | object | Available print properties: paperName, paperWidth, paperHeight, orientation, scale | -| paperName | string | "A4", "US Letter"... | -| paperWidth | string | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | -| paperHeight | string | Used if a paper named paperName was not found. Requires unit suffix: pt, in, mm, cm. | -| orientation | string | "landscape" (default is "portrait") | -| scale | number | 最å°å€¤: 0 | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | ------------------------------------------------------------------ | +| pageFormat | object | 利用å¯èƒ½ãªãƒ—ロパティ: paperName, paperWidth, paperHeight, orientation, scale | +| paperName | string | "A4", "レター"... | +| paperWidth | string | paperName ã¨ã„ã†åå‰ã®ç”¨ç´™ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れã¾ã™ã€‚ å˜ä½ã®æ˜Žè¨˜ãŒå¿…è¦ã§ã™: pt, in, mm, cm。 | +| paperHeight | string | paperName ã¨ã„ã†åå‰ã®ç”¨ç´™ãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã«ä½¿ç”¨ã•れã¾ã™ã€‚ å˜ä½ã®æ˜Žè¨˜ãŒå¿…è¦ã§ã™: pt, in, mm, cm。 | +| orientation | string | "landscape" (デフォルト㯠"portrait") | +| scale | number | 最å°å€¤: 0 | + + +--- + + + + + + -* * * \ No newline at end of file diff --git a/website/translated_docs/ja/FormEditor/properties_WindowSize.md b/website/translated_docs/ja/FormEditor/properties_WindowSize.md index dfbb6155d47ef7..cbb7050bb7c861 100644 --- a/website/translated_docs/ja/FormEditor/properties_WindowSize.md +++ b/website/translated_docs/ja/FormEditor/properties_WindowSize.md @@ -1,58 +1,65 @@ --- id: windowSize -title: Window Size +title: ウィンドウサイズ --- -## Fixed Height +## 固定高㕠-If you select this option, the window height will be locked and it will not be possible for the user to resize it. -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Height and Maximum Height](#maximum-height-minimum-height) properties can be used to determine the resizing limits. +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é«˜ã•ãŒå›ºå®šã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å¤‰æ›´ã§ããªããªã‚Šã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãªã„å ´åˆã€ãƒ•ォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é«˜ã•を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆ [最å°é«˜ã•ã¨æœ€å¤§é«˜ã•](#最大高ã•-最å°é«˜ã•) 入力エリアを使用ã—ã€å¤‰æ›´ã§ãるサイズを制é™ã§ãã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ------------------- | | windowSizingY | string | "fixed", "variable" | -* * * +--- + +## 固定幅 + -## Fixed Width +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å¹…ãŒå›ºå®šã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å¤‰æ›´ã§ããªããªã‚Šã¾ã™ã€‚ -If you select this option, the window width will be locked and it will not be possible for the user to resize it. +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãªã„å ´åˆã€ãƒ•ォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é«˜ã•を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆ [最å°å¹…ã¨æœ€å¤§å¹…](#最大幅-最å°å¹…) 入力エリアを使用ã—ã€å¤‰æ›´ã§ãるサイズを制é™ã§ãã¾ã™ã€‚ -If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Width and Maximum Width](#maximum-width-minimum-width) properties can be used to determine the resizing limits. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ------------------- | | windowSizingX | string | "fixed", "variable" | +--- + -* * * -## Maximum Height, Minimum Height +## 最大高ã•, 最å°é«˜ã• -Maximum and minimum height (in pixels) of a resizeable form window if the [Fixed Height](#fixed-height) option is not set. +[固定高ã•](#固定高ã•) オプションãŒè¨­å®šã•れã¦ã„ãªã„å ´åˆã®ã€ã‚µã‚¤ã‚ºå¤‰æ›´å¯èƒ½ãªãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å¤§ãŠã‚ˆã³æœ€å°ã®é«˜ã• (ピクセルå˜ä½) ã§ã™ã€‚ ##### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------------- | ------ | ------------- | -| windowMinHeight | number | integer value | -| windowMaxHeight | number | integer value | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------ | ----- | +| windowMinHeight | number | 整数値 | +| windowMaxHeight | number | 整数値 | -## Maximum Width, Minimum Width +## 最大幅, 最å°å¹… + +[固定幅](#固定幅) オプションãŒè¨­å®šã•れã¦ã„ãªã„å ´åˆã®ã€ã‚µã‚¤ã‚ºå¤‰æ›´å¯èƒ½ãªãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æœ€å¤§ãŠã‚ˆã³æœ€å°ã®å¹… (ピクセルå˜ä½) ã§ã™ã€‚ -Maximum and minimum width (in pixels) of a resizeable form window if the [Fixed Width](#fixed-width) option is not set. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------- | ------ | ------------- | -| windowMinWidth | number | integer value | -| windowMaxWidth | number | integer value | \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ----- | +| windowMinWidth | number | 整数値 | +| windowMaxWidth | number | 整数値 | + diff --git a/website/translated_docs/ja/FormObjects/buttonGrid_overview.md b/website/translated_docs/ja/FormObjects/buttonGrid_overview.md index e6db9ad12ae4da..973bae1946d292 100644 --- a/website/translated_docs/ja/FormObjects/buttonGrid_overview.md +++ b/website/translated_docs/ja/FormObjects/buttonGrid_overview.md @@ -3,14 +3,13 @@ id: buttonGridOverview title: ボタングリッド --- -## æ¦‚è¦ - ボタングリッドã¯é€æ˜Žãªã‚ªãƒ–ジェクトã§ã‚りã€ç”»åƒã®æœ€å‰é¢ã«é…ç½®ã•れã¾ã™ã€‚ ãŠã‚‚ã«ã€åˆ—ã¨è¡Œã®é…列を表ç¾ã™ã‚‹ç”»åƒã¨ã®çµ„ã¿åˆã‚ã›ã§ä½¿ç”¨ã—ã¾ã™ã€‚ ユーザーãŒã‚°ãƒ©ãƒ•ィック上ã§ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ãã“ãŒå‡¹ã‚“ã ã‚ˆã†ã«æç”»ã•れã¾ã™ã€‚ ![](assets/en/FormObjects/buttonGrid_smileys.png) ボタングリッドã®ã‚ªãƒ–ジェクトを使用ã™ã‚‹ã¨ã€ã‚°ãƒ©ãƒ•ィック上ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒªãƒƒã‚¯ã—ãŸå ´æ‰€ã‚’判別ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトメソッドã§ã¯ `On Clicked` イベントを使用ã—ã€ã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´æ‰€ã«å¿œã˜ã¦é©åˆ‡ãªå‹•作を実行ã—ã¾ã™ã€‚ + ## ボタングリッドã®ä½œæˆ ボタングリッドを作æˆã™ã‚‹ã«ã¯ã€èƒŒæ™¯ã‚°ãƒ©ãƒ•ィックをフォームã«è¿½åŠ ã—ã€ãã®æœ€å‰é¢ã«ãƒœã‚¿ãƒ³ã‚°ãƒªãƒƒãƒ‰ã‚’é…ç½®ã—ã¾ã™ã€‚ "行列数" テーマ㮠[行](properties_Crop.md#行) 㨠[列](properties_Crop.md#列) ã«è¡Œæ•°ã¨åˆ—数を指定ã—ã¾ã™ã€‚ @@ -23,10 +22,12 @@ title: ボタングリッド グリッド上ã®ãƒœã‚¿ãƒ³ã«ã¯ã€å·¦ä¸Šã‹ã‚‰å³ä¸‹ã«å‘ã‘ã¦ç•ªå·ãŒæŒ¯ã‚‰ã‚Œã¾ã™ã€‚ 上ã®ä¾‹ã§ã€ã‚°ãƒªãƒƒãƒ‰ã¯ 16列×16è¡Œã§æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ 左上ã«ã‚るボタンã¯ã‚¯ãƒªãƒƒã‚¯ã•れる㨠1 ã‚’è¿”ã—ã¾ã™ã€‚ 2行目ã®å³ç«¯ã«ã‚る赤ã„ボタンãŒé¸æŠžã•れるã¨ã€ãƒœã‚¿ãƒ³ã‚°ãƒªãƒƒãƒ‰ã¯ 32 ã‚’è¿”ã—ã¾ã™ã€‚ é¸æŠžã•れãŸãƒœã‚¿ãƒ³ãŒãªã‘れã°ã€0ãŒè¿”ã•れã¾ã™ã€‚ + ### ページ指定アクション ボタングリッドã«ãƒšãƒ¼ã‚¸æŒ‡å®šç”¨ã® `gotoPage` [標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html)を割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ¨™æº–アクションを設定ã™ã‚‹ã¨ã€4D ã¯ãƒœã‚¿ãƒ³ã‚°ãƒªãƒƒãƒ‰ã§é¸æŠžã•れãŸãƒœã‚¿ãƒ³ã®ç•ªå·ã«ç›¸å½“ã™ã‚‹ãƒ•ォームページを自動的ã«è¡¨ç¤ºã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã‚°ãƒªãƒƒãƒ‰ä¸Šã® 10 番目ã®ãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ç¾åœ¨ã®ãƒ•ォーム㮠10 ページ目を表示ã—ã¾ã™ (存在ã™ã‚‹å ´åˆ)。 + ## プロパティ一覧 -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [行](properties_Crop.md#行) - [列](properties_Crop.md#列) - [å·¦](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) - [ドロップ有効](properties_Action.md#ドロップ有効) \ No newline at end of file +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [行](properties_Crop.md#行) - [列](properties_Crop.md#列) - [å·¦](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/button_overview.md b/website/translated_docs/ja/FormObjects/button_overview.md index 99c3f6417581ec..c9045d7761d8f9 100644 --- a/website/translated_docs/ja/FormObjects/button_overview.md +++ b/website/translated_docs/ja/FormObjects/button_overview.md @@ -9,10 +9,6 @@ title: ボタン 割り当ã¦ã‚‰ã‚ŒãŸã‚¹ã‚¿ã‚¤ãƒ«ã‚„アクションã«å¿œã˜ã¦ã€ãƒœã‚¿ãƒ³ã¯ã•ã¾ã–ã¾ãªå½¹å‰²ã‚’æžœãŸã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ãƒ³ã‚±ãƒ¼ãƒˆã‚„フォーム内を移動ã—ãŸã‚Šã€é¸æŠžã—ãŸã‚Šã¨ã„ã£ãŸæ“作をå¯èƒ½ã«ã—ã¾ã™ã€‚ 設定ã«ã‚ˆã£ã¦ã€ãƒœã‚¿ãƒ³ã‚’ワンクリックã™ã‚‹ã“ã¨ã§ã‚³ãƒžãƒ³ãƒ‰å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚ã§ãれã°ã€è¤‡æ•°å›žã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã“ã¨ã§æœ›ã‚€çµæžœã‚’得られるよã†ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -< - -p> - ## ボタンã®ä½¿ç”¨ ボタンã«ã¯ã€ã‚らã‹ã˜ã‚設定ã•れã¦ã„ã‚‹ [標準アクション](properties_Action.md#standard-action) ã¾ãŸã¯ã‚ªãƒ–ジェクトメソッドを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 典型的ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ä¾‹ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®å—ã‘入れ・削除・編集キャンセルã®ã»ã‹ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚³ãƒ”ー / ペーストã€è¤‡æ•°ãƒšãƒ¼ã‚¸ã‚るフォームã«ãŠã‘るページ移動ã€ã‚µãƒ–フォームã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ“作ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã®ãƒ•ã‚©ãƒ³ãƒˆå±žæ€§ã®æ“作ã€ãªã©ã§ã™ã€‚ @@ -23,8 +19,12 @@ p> ボタンã«é–¢é€£ä»˜ã‘られãŸå¤‰æ•° ([variable](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 属性) ã¯ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã‚„アプリケーションモードã§ãƒ•ォームãŒåˆã‚ã¦é–‹ã‹ã‚Œã‚‹ã¨ãã«è‡ªå‹•ã§ **0** ã«åˆæœŸåŒ–ã•れã¾ã™ã€‚ ボタンをクリックã™ã‚‹ã¨ã€å¤‰æ•°ã®å€¤ã¯ **1** ã«ãªã‚Šã¾ã™ã€‚ + + > ボタンã«ã¯æ¨™æº–アクションã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã‚’割り当ã¦ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€æ¨™æº–アクションã«ã‚ˆã£ã¦ãƒœã‚¿ãƒ³ãŒç„¡åŠ¹åŒ–ã•れã¦ã„ãªã‘れã°ã€æ¨™æº–アクションより先ã«ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ + + ## ボタンスタイル ボタンスタイルã¯ã€ãƒœã‚¿ãƒ³ã®å¤–観を制御ã™ã‚‹ã¨åŒæ™‚ã«ã€æä¾›ã•れるプロパティをも決定ã—ã¾ã™ã€‚ ボタンã«ã¯ã€ã‚らã‹ã˜ã‚定義ã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã‚„ãƒãƒƒãƒ—アップメニューを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ—ロパティや動作を組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€å¤šæ•°ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒå¾—られã¾ã™ã€‚ @@ -33,6 +33,8 @@ p> æ¬¡ã®æ—¢å®šã‚¹ã‚¿ã‚¤ãƒ«ãŒæä¾›ã•れã¦ã„ã¾ã™: + + ### 通常 通常スタイルã®ãƒœã‚¿ãƒ³ã¯ã€æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ (長方形ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸã‚‚ã®)ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒªãƒƒã‚¯ã«å¿œã˜ã¦ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ @@ -44,6 +46,7 @@ p> #### JSON 例: ```4d + "myButton": { "type": "button", // オブジェクトタイプ "style":"regular", // ボタンスタイル @@ -57,8 +60,10 @@ p> } ``` + [デフォルトボタン](properties_Appearance.md#デフォルトボタン) ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæä¾›ã•れã¦ã„ã‚‹ã®ã¯ã€é€šå¸¸ã‚¹ã‚¿ã‚¤ãƒ«ã¨ãƒ•ラットスタイルã®ã¿ã§ã™ã€‚ + ### フラット フラットスタイルã®ãƒœã‚¿ãƒ³ã¯ã€æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ (長方形ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸã‚‚ã®)ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒªãƒƒã‚¯ã«å¿œã˜ã¦ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ @@ -70,7 +75,8 @@ p> #### JSON 例: ```4d -
          "myButton": { + + "myButton": { "type": "button", "style":"flat", "defaultButton":"true" @@ -83,6 +89,7 @@ p> } ``` + [デフォルトボタン](properties_Appearance.md#デフォルトボタン) ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæä¾›ã•れã¦ã„ã‚‹ã®ã¯ã€é€šå¸¸ã‚¹ã‚¿ã‚¤ãƒ«ã¨ãƒ•ラットスタイルã®ã¿ã§ã™ã€‚ ### ツールãƒãƒ¼ @@ -91,11 +98,11 @@ p> ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã¯ã€é€æ˜Žã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒãƒ‡ãƒ•ォルトã§ä»˜ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚"ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ä¸­å¤®ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚"ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ä¸­å¤®ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/button_toolbar.png) -- *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹éƒ¨åˆ†ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ #### JSON 例: @@ -113,17 +120,19 @@ p> } ``` + + ### ベベル ベベルスタイル㯠[通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ ベベルボタンã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒãƒ‡ãƒ•ォルトã§ä»˜ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/button_bevel.png) -- *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹éƒ¨åˆ†ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ #### JSON 例: @@ -141,17 +150,19 @@ p> } ``` + + ### è§’ã®ä¸¸ã„ベベル è§’ã®ä¸¸ã„ベベルスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯è§’ãŒä¸¸ã表示ã•れã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€è§’ã®ä¸¸ã„ベベルスタイル㯠[通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ è§’ã®ä¸¸ã„ベベルボタンã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒãƒ‡ãƒ•ォルトã§ä»˜ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ベベルボタンã¨åŒã˜ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - - ![](assets/en/FormObjects/button_roundedbevel.png) + - *Windows* - ベベルボタンã¨åŒã˜ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + ![](assets/en/FormObjects/button_roundedbevel.png) -- *macOS* - è§’ãŒä¸¸ããªã£ã¦ã„ã¾ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹éƒ¨åˆ†ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *macOS* - è§’ãŒä¸¸ããªã£ã¦ã„ã¾ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ #### JSON 例: @@ -169,17 +180,19 @@ p> } ``` + + ### OS Xグラデーション -OS Xグラデーションスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xグラデーションスタイル㯠[通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ +OS Xグラデーションスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xグラデーションスタイル㯠[通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ OS Xグラデーションボタンã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒãƒ‡ãƒ•ォルトã§ä»˜ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ベベルボタンã¨åŒã˜ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *Windows* - ベベルボタンã¨åŒã˜ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/button_osxgradient.png) -- *macOS* - 2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³ä¸‹éƒ¨åˆ†ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *macOS* - 2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ "ãƒãƒƒãƒ—アップメニューã‚り" プロパティを使用ã—ã¦ã„ã‚‹ã¨ã€ãƒœã‚¿ãƒ³ã®å³å´ã«ä¸‰è§’å½¢ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ #### JSON 例: @@ -197,17 +210,18 @@ OS Xグラデーションボタンã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ä¸­å¤®é… } ``` + ### OS Xテクスãƒãƒ£ãƒ¼ -OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ +OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€ã‚µã‚¤ã‚ºãŒã‚ˆã‚Šå°ã•ã„ã§ã™ (最大サイズ㯠macOS ã®æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã®ã‚µã‚¤ã‚ºã§ã™)。 ベベルスタイルã¨åŒæ§˜ã«ã€OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ デフォルトã§ã€OS Xテクスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®å¤–è¦³ã¯æ¬¡ã®é€šã‚Šã§ã™: -- *Windows* - 明るã„ブルーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸæ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ Vistaã«ãŠã„ã¦ã¯é€æ˜Žã«ãªã‚‹ç‰¹åˆ¥æ©Ÿèƒ½ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ - - ![](assets/en/FormObjects/button_osxtextured.png) + - *Windows* - 明るã„ブルーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸæ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ Vistaã«ãŠã„ã¦ã¯é€æ˜Žã«ãªã‚‹ç‰¹åˆ¥æ©Ÿèƒ½ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ -- *macOS* - ç°è‰²ã®ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹æ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 + ![](assets/en/FormObjects/button_osxtextured.png) + + - *macOS* - ç°è‰²ã®ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹æ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 #### JSON 例: @@ -225,17 +239,19 @@ OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨ã» } ``` + + ### Office XP ベベルスタイルã¨åŒæ§˜ã«ã€Office XPスタイル㯠[通常](#通常) スタイルã®å¤–観 (四角ã«ãƒ©ãƒ™ãƒ«) ã« [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã®é€éŽæ€§ã‚’加ãˆã€ãƒãƒƒãƒ—アップメニューを追加å¯èƒ½ã«ã—ãŸã‚‚ã®ã§ã™ã€‚ Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/button_officexp.png) -- *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + - *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ #### JSON 例: @@ -253,8 +269,11 @@ Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ } ``` + + ### ヘルプ + ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯ã‚·ã‚¹ãƒ†ãƒ æ¨™æº–ã®ãƒ˜ãƒ«ãƒ—ボタンを表示ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ デフォルトã§ã€ãƒ˜ãƒ«ãƒ—ボタンã¯ä¸¸ã®ä¸­ã«è¡¨ç¤ºã•れãŸãƒãƒ†ãƒŠãƒžãƒ¼ã‚¯ (ç–‘å•符) ã§ã™ã€‚ ![](assets/en/FormObjects/button_help.png) @@ -276,6 +295,7 @@ Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ > ãƒ˜ãƒ«ãƒ—ãƒœã‚¿ãƒ³ã¯æ¬¡ã®åŸºæœ¬ãƒ—ロパティをæŒã¡ã¾ã›ã‚“: [çŠ¶æ…‹ã®æ•°](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°)ã€[ピクãƒãƒ£ãƒ¼ãƒ‘スå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå)ã€[タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトルピクãƒãƒ£ãƒ¼ä½ç½®)。 + ### サークル サークルスタイルã®ãƒœã‚¿ãƒ³ã¯ã€å††å½¢ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã¯ macOS 用ã«ç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ @@ -284,19 +304,23 @@ Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ Windows ã®å ´åˆã€ã‚µãƒ¼ã‚¯ãƒ«ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 + #### JSON 例: - "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 + } +``` + + ### カスタム @@ -304,6 +328,7 @@ Windows ã®å ´åˆã€ã‚µãƒ¼ã‚¯ãƒ«ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 ![](assets/en/FormObjects/button_custom.png) + #### JSON 例: ```code @@ -321,16 +346,22 @@ Windows ã®å ´åˆã€ã‚µãƒ¼ã‚¯ãƒ«ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 } ``` + + + ## プロパティ一覧 ã™ã¹ã¦ã®ãƒœã‚¿ãƒ³ã¯æ¬¡ã®åŸºæœ¬ãƒ—ロパティを共有ã—ã¾ã™: + [タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [タイトル](properties_Object.md#タイトル) - [CSSクラス](properties_Object.md#CSSクラス) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [ピクãƒãƒ£ãƒ¼ãƒ‘スå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå)(1) - [çŠ¶æ…‹ã®æ•°](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°)(1) - [タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトルピクãƒãƒ£ãƒ¼ä½ç½®)(1) - [å·¦](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_Entry.md#ショートカット) - [表示状態](properties_Display.md#表示状態) - [レンダリングã—ãªã„](properties_Display.md#レンダリングã—ãªã„) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) - [ドロップ有効](properties_Action.md#ドロップ有効) > (1) [ヘルプ](#ヘルプ) スタイルã¯é™¤å¤– + [ボタンスタイル](#ボタンスタイル) ã«å¿œã˜ã¦ã€æ¬¡ã®è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒä½¿ç”¨ã§ãã¾ã™: - [背景パスå](properties_TextAndPicture.md#背景パスå) - [アイコンオフセット](properties_TextAndPicture.md#アイコンオフセット) - [横方å‘マージン](properties_TextAndPicture.md#横方å‘マージン) - [縦方å‘マージン](properties_TextAndPicture.md#縦方å‘マージン) (カスタムスタイル) - [デフォルトボタン](properties_Appearance.md#デフォルトボタン) (通常ã€ãƒ•ラット) -- [ãƒãƒƒãƒ—アップメニューã‚り](properties_TextAndPicture.md#ãƒãƒƒãƒ—アップメニューã‚り) (ツールãƒãƒ¼ã€ãƒ™ãƒ™ãƒ«ã€è§’ã®ä¸¸ã„ベベルã€OS X グラデーションã€OS X テクスãƒãƒ£ãƒ¼ã€Office XPã€ã‚µãƒ¼ã‚¯ãƒ«ã€ã‚«ã‚¹ã‚¿ãƒ ) \ No newline at end of file +- [ãƒãƒƒãƒ—アップメニューã‚り](properties_TextAndPicture.md#ãƒãƒƒãƒ—アップメニューã‚り) (ツールãƒãƒ¼ã€ãƒ™ãƒ™ãƒ«ã€è§’ã®ä¸¸ã„ベベルã€OS X グラデーションã€OS X テクスãƒãƒ£ãƒ¼ã€Office XPã€ã‚µãƒ¼ã‚¯ãƒ«ã€ã‚«ã‚¹ã‚¿ãƒ ) + diff --git a/website/translated_docs/ja/FormObjects/checkbox_overview.md b/website/translated_docs/ja/FormObjects/checkbox_overview.md index 47533bae1d498e..d9bfa219614fd9 100644 --- a/website/translated_docs/ja/FormObjects/checkbox_overview.md +++ b/website/translated_docs/ja/FormObjects/checkbox_overview.md @@ -3,28 +3,28 @@ id: checkboxOverview title: ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ --- -## æ¦‚è¦ - -ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ãƒœã‚¿ãƒ³ã®ä¸€ç¨®ã§ã€ãƒã‚¤ãƒŠãƒª (true-false) データã®å…¥åŠ›ã‚„è¡¨ç¤ºã‚’ãŠã“ãªã„ã¾ã™ã€‚ 基本的ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®çŠ¶æ…‹ã¯é¸æŠžã¾ãŸã¯æœªé¸æŠžã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ãŒã€3ã¤ã‚ã®çŠ¶æ…‹ã‚’å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (後述å‚ç…§)。 +ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ãƒœã‚¿ãƒ³ã®ä¸€ç¨®ã§ã€ãƒã‚¤ãƒŠãƒª (true-false) データã®å…¥åŠ›ã‚„è¡¨ç¤ºã‚’ãŠã“ãªã„ã¾ã™ã€‚ 基本的ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®çŠ¶æ…‹ã¯é¸æŠžã¾ãŸã¯æœªé¸æŠžã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ãŒã€[3ã¤ã‚ã®çŠ¶æ…‹](#スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹) を定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/checkbox.png) -ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã‚Šåˆ¶å¾¡ã•れã¾ã™ã€‚ ä»–ã®ãƒœã‚¿ãƒ³ã¨åŒã˜ã‚ˆã†ã«ã€ãƒ•ォームãŒåˆã‚ã¦é–‹ã‹ã‚Œã‚‹ã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å¤‰æ•°ã¯ 0 ã«åˆæœŸåŒ–ã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れるã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã¾ãŸã¯ [標準アクション](#標準アクションã®ä½¿ç”¨) を使ã£ã¦ç®¡ç†ã—ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れるã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ ä»–ã®ãƒœã‚¿ãƒ³ã¨åŒã˜ã‚ˆã†ã«ã€ãƒ•ォームãŒåˆã‚ã¦é–‹ã‹ã‚Œã‚‹ã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å¤‰æ•°ã¯ 0 ã«åˆæœŸåŒ–ã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯å°ã•ãªå››è§’å½¢ã®å³å´ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ ã“ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [タイトル](properties_Object.md#title) プロパティã§è¨­å®šã—ã¾ã™ã€‚ タイトルã«ã¯ã€XLIFFå‚照を入れるã“ã¨ã‚‚ã§ãã¾ã™ ([付録 B: XLIFFアーキテクãƒãƒ£ãƒ¼](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) å‚ç…§)。 + ## ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ä½¿ç”¨ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«ã¯æ•´æ•°åž‹ã¾ãŸã¯ãƒ–ール型㮠[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - **æ•´æ•°åž‹:** ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れるã¨ã€å¤‰æ•°ã®å€¤ã¯ 1 ã«ãªã‚Šã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã®å€¤ã¯ 0 ã§ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒ 3番目ã®çŠ¶æ…‹ (後述å‚ç…§) ã®ã¨ãã€å¤‰æ•°å€¤ã¯ 2 ã«ãªã‚Šã¾ã™ã€‚ -- **ブール型:** ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れるã¨ã€å¤‰æ•°ã®å€¤ã¯ `True` ã«ãªã‚Šã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã®å€¤ã¯ `False` ã§ã™ã€‚ +- **ブール型:** ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れるã¨ã€å¤‰æ•°ã®å€¤ã¯ `true` ã«ãªã‚Šã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã®å€¤ã¯ `False` ã§ã™ã€‚ + +フォーム上ã®ã™ã¹ã¦ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯é¸æŠž/æœªé¸æŠžã®ã„ãšã‚Œã‹ã®çŠ¶æ…‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’複数使用ã™ã‚‹ã“ã¨ã§ã€è¤‡æ•°ã®å€™è£œã‚’åŒæ™‚ã«é¸æŠžã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ -フォーム上ã®ã™ã¹ã¦ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯é¸æŠž/æœªé¸æŠžã®ã„ãšã‚Œã‹ã®çŠ¶æ…‹ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ã‚°ãƒ«ãƒ¼ãƒ—を使用ã™ã‚‹ã¨ã€è¤‡æ•°ã®å€™è£œã‚’é¸æŠžã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ ### スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ -[通常](checkbox_overview.md#通常) ãŠã‚ˆã³ [フラット](checkbox_overview.md#フラット) タイプã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ 3番目ã®çŠ¶æ…‹ã‚’å—ã‘入れã¾ã™ã€‚ ã“ã® 3番目ã®çŠ¶æ…‹ã¯ä¸­é–“çš„ãªçŠ¶æ…‹ã§ã‚りã€ä¸€èˆ¬çš„ã«ã¯è¡¨ç¤ºã®ãŸã‚ã«ç”¨ã„られã¾ã™ã€‚ ãŸã¨ãˆã°ã€é¸æŠžã•れãŸã‚ªãƒ–ジェクトãŒè¤‡æ•°ã‚ã‚‹ã†ã¡ã€ä¸€éƒ¨ã®ã‚ªãƒ–ジェクトã«ã®ã¿ç‰¹å®šã®ãƒ—ロパティãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’表ã™ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ +[ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) ㌠[通常](checkbox_overview.md#通常) ãŠã‚ˆã³ [フラット](checkbox_overview.md#フラット) タイプã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ 3番目ã®çŠ¶æ…‹ã‚’å—ã‘入れã¾ã™ã€‚ ã“ã® 3番目ã®çŠ¶æ…‹ã¯ä¸­é–“çš„ãªçŠ¶æ…‹ã§ã‚りã€ä¸€èˆ¬çš„ã«ã¯è¡¨ç¤ºã®ãŸã‚ã«ç”¨ã„られã¾ã™ã€‚ ãŸã¨ãˆã°ã€é¸æŠžã•れãŸã‚ªãƒ–ジェクトãŒè¤‡æ•°ã‚ã‚‹ã†ã¡ã€ä¸€éƒ¨ã®ã‚ªãƒ–ジェクトã«ã®ã¿ç‰¹å®šã®ãƒ—ロパティãŒå­˜åœ¨ã™ã‚‹ã“ã¨ã‚’表ã™ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ![](assets/en/FormObjects/checkbox_3states.png) @@ -33,9 +33,9 @@ title: ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ ã“ã®ãƒ—ロパティã¯ã€æ•°å€¤åž‹ã® [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«é–¢é€£ä»˜ã‘られãŸé€šå¸¸ãŠã‚ˆã³ãƒ•ラットスタイルã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«å¯¾ã—ã¦ã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ブール型ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ [スリーステート](properties_Display.md#スリーステート) プロパティを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ (ブールå¼ã«ã¯ä¸­é–“状態ãŒå­˜åœ¨ã—ã¾ã›ã‚“)。 ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒ 3番目ã®çŠ¶æ…‹ã«ãªã‚‹ã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られãŸå¤‰æ•°ã¯å€¤2ã‚’è¿”ã—ã¾ã™ã€‚ - > スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯å…¥åŠ›ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã€ãƒã‚§ãƒƒã‚¯ãªã— / ãƒã‚§ãƒƒã‚¯ / 中間状態 / ãƒã‚§ãƒƒã‚¯ãªã—ã€ã¨ã„ã†é †ã«çŠ¶æ…‹è¡¨ç¤ºã‚’åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚ 一般的ã«ã“ã®ä¸­é–“状態ã¯å…¥åŠ›ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚ã¾ã‚Šå½¹ã«ç«‹ãŸãªã„ãŸã‚ã€2ã¨ã„ã†å€¤ã«ãªã£ãŸå ´åˆã¯ã€ã‚³ãƒ¼ãƒ‰ä¸Šã§å¤‰æ•°ã®å€¤ã‚’強制的㫠0 ã«è¨­å®šã—ã€ãƒã‚§ãƒƒã‚¯ã•れãŸçŠ¶æ…‹ã‹ã‚‰ãƒã‚§ãƒƒã‚¯ãªã—ã®çŠ¶æ…‹ã¸ç›´æŽ¥ç§»è¡Œã—ã¾ã™ã€‚ + ## 標準アクションã®ä½¿ç”¨ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã« [標準アクション](properties_Action.md#標準アクション) を割り当ã¦ã‚‹ã“ã¨ã§ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã®å±žæ€§ã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€`fontBold` æ¨™æº–ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã«ãŠã„ã¦ãã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚¨ãƒªã‚¢å†…ã§é¸æŠžã•れãŸãƒ†ã‚­ã‚¹ãƒˆã® "bold" 属性を管ç†ã—ã¾ã™ã€‚ @@ -73,12 +73,11 @@ true/false ステータスã§è¡¨ã™ã“ã¨ã®ã§ãるアクション ("checkable | visibleReferences | | | widowAndOrphanControlEnabled | 4D Write Proエリアã®ã¿ | - -ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€[標準アクション](properties_Action.md#標準アクション) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 ## ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ« -ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚¹ã‚¿ã‚¤ãƒ«ã¯ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å¤–観を制御ã™ã‚‹ã¨åŒæ™‚ã«ã€æä¾›ã•れるプロパティをも決定ã—ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«ã¯ã€ã‚らã‹ã˜ã‚定義ã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ—ロパティや動作を組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€å¤šæ•°ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒå¾—られã¾ã™ã€‚ +ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル)ã¯ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å¤–観を制御ã™ã‚‹ã¨åŒæ™‚ã«ã€æä¾›ã•れるプロパティをも決定ã—ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«ã¯ã€ã‚らã‹ã˜ã‚定義ã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ—ロパティや動作を組ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€å¤šæ•°ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒå¾—られã¾ã™ã€‚ スタイルã«ã‚ˆã£ã¦ [æä¾›ã•れるプロパティ](#プロパティ一覧) ã¯ç•°ãªã‚Šã¾ã™ãŒã€å¤§å¤šæ•°ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ *構造上* åŒã˜ã§ã™ã€‚ é•ã„ã¯ã€é–¢é€£ã¥ã‘られãŸå¤‰æ•°ã®å‡¦ç†ã«ã‚りã¾ã™ã€‚ @@ -92,18 +91,21 @@ true/false ステータスã§è¡¨ã™ã“ã¨ã®ã§ãるアクション ("checkable #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"regular", - "text": "Cancel", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - "dataSourceTypeHint":"boolean" - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"regular", + "text": "Cancel", + "action": "Cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + "dataSourceTypeHint":"boolean" + } +``` + + ### フラット @@ -113,17 +115,20 @@ true/false ステータスã§è¡¨ã™ã“ã¨ã®ã§ãるアクション ("checkable #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"flat", - "text": "Cancel", - "action": "cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"flat", + "text": "Cancel", + "action": "cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### ツールãƒãƒ¼ãƒœã‚¿ãƒ³ @@ -135,24 +140,28 @@ true/false ステータスã§è¡¨ã™ã“ã¨ã®ã§ãるアクション ("checkable ![](assets/en/FormObjects/checkbox_toolbar.png) + #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"toolbar", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"toolbar", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### ベベル -ベベルスタイルã¯ãƒ‡ãƒ•ォルトã§ã¯ã€ãƒ™ãƒ™ãƒ«ãƒœã‚¿ãƒ³ã®ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ +ベベルスタイルã¯ãƒ‡ãƒ•ォルトã§ã¯ã€é€šå¸¸ãƒœã‚¿ãƒ³ã®ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ ベベルスタイルã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ã¦ã„ã¾ã™ã€‚ ã¾ãŸã€é€šå¸¸ã¯ [4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤ç”»åƒ](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) ãŒé–¢é€£ä»˜ã‘られã¾ã™ã€‚ @@ -160,33 +169,38 @@ true/false ステータスã§è¡¨ã™ã“ã¨ã®ã§ãるアクション ("checkable ![](assets/en/FormObjects/checkbox_bevel.png) + #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"bevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"bevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### è§’ã®ä¸¸ã„ベベル -è§’ã®ä¸¸ã„ベベルスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯è§’ãŒä¸¸ã表示ã•れã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€è§’ã®ä¸¸ã„ベベルスタイルã¯ãƒ™ãƒ™ãƒ«ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ +è§’ã®ä¸¸ã„ベベルスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯è§’ãŒä¸¸ã表示ã•れã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€è§’ã®ä¸¸ã„ベベルスタイルã¯é€šå¸¸ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ è§’ã®ä¸¸ã„ベベルスタイルã¯ã€æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ã¦ã„ã¾ã™ã€‚ ã¾ãŸã€é€šå¸¸ã¯ [4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤ç”»åƒ](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) ãŒé–¢é€£ä»˜ã‘られã¾ã™ã€‚ macOS ã®ä¾‹: -![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) + ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) > Windows 上ã§ã¯ã€è§’ã®ä¸¸ã„ベベルスタイル㯠[ベベル](#ベベル) スタイルã¨åŒã˜ã§ã™ã€‚ + #### JSON 例: ```4d @@ -203,175 +217,202 @@ macOS ã®ä¾‹: } ``` + + ### OS Xグラデーション -OS Xグラデーションスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xグラデーションスタイルã¯ãƒ™ãƒ™ãƒ«ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ +OS Xグラデーションスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xグラデーションスタイルã¯é€šå¸¸ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ -OS X ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã¯æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ã¦ã„ã¾ã™ã€‚macOS 上ã§ã¯2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ã¾ãŸã€é€šå¸¸ã¯ [4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤ç”»åƒ](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) ãŒé–¢é€£ä»˜ã‘られã¾ã™ã€‚ +OS X ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã¯æ˜Žã‚‹ã„グレーã®èƒŒæ™¯ã«ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ã¦ã„ã¾ã™ã€‚macOS 上ã§ã¯2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã¨ã—ã¦è¡¨ç¤ºã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ ã¾ãŸã€é€šå¸¸ã¯ [4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤ç”»åƒ](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) ãŒé–¢é€£ä»˜ã‘られã¾ã™ã€‚ -![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + ![](assets/en/FormObjects/checkbox_osxgradient_mac.png) > Windows 上ã§ã¯ã€ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨åŒã˜ã§ã™ã€‚ + #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"gradientBevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"gradientBevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + ### OS Xテクスãƒãƒ£ãƒ¼ -OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ ベベルスタイルã¨åŒæ§˜ã«ã€OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ãƒ™ãƒ™ãƒ«ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ +OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚µã‚¤ã‚ºãŒã‚ˆã‚Šå°ã•ã„ã§ã™ (最大サイズ㯠macOS ã®æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã®ã‚µã‚¤ã‚ºã§ã™)。 ベベルスタイルã¨åŒæ§˜ã«ã€OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯é€šå¸¸ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ + +デフォルトã§ã€OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã®å¤–è¦³ã¯æ¬¡ã®é€šã‚Šã§ã™: -デフォルトã§ã€OS Xテクスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®å¤–è¦³ã¯æ¬¡ã®é€šã‚Šã§ã™: + - *Windows* - 明るã„ブルーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸæ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ -- *Windows* - 明るã„ブルーã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒä»˜ã„ãŸæ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ - - ![](assets/en/FormObjects/checkbox_osxtextured.png) + ![](assets/en/FormObjects/checkbox_osxtextured.png) -- *macOS* - ç°è‰²ã®ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹æ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 - - ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) + - *macOS* - 標準ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 + + ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"texturedBevel", - "text": "Checkbox", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"texturedBevel", + "text": "Checkbox", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + ### Office XP -Office XPスタイルã¯ãƒ™ãƒ™ãƒ«ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã® [ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) ã‚¹ã‚¿ã‚¤ãƒ«ã®æ©Ÿèƒ½ã‚’組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ +Office XPスタイルã¯é€šå¸¸ãƒœã‚¿ãƒ³ã‚ˆã†ãªå¤–観ã«ã€[ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) スタイルã®å‹•作を組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ -Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: +Office XP スタイルã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãªã— / ãƒã‚§ãƒƒã‚¯ / ãƒã‚¤ãƒ©ã‚¤ãƒˆçŠ¶æ…‹ã®ä¾‹ã§ã™: - - ![](assets/en/FormObjects/checkbox_officexp.png) + - *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãªã— / ãƒã‚§ãƒƒã‚¯ / ãƒã‚¤ãƒ©ã‚¤ãƒˆçŠ¶æ…‹ã®ä¾‹ã§ã™: -- *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãªã— / ãƒã‚§ãƒƒã‚¯çŠ¶æ…‹ã®ä¾‹ã§ã™: - - ![](assets/en/FormObjects/checkbox_officexp_mac.png) + ![](assets/en/FormObjects/checkbox_officexp.png) + + - *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãªã— / ãƒã‚§ãƒƒã‚¯çŠ¶æ…‹ã®ä¾‹ã§ã™: + + ![](assets/en/FormObjects/checkbox_officexp_mac.png) #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"office", - "text": "Checkbox", - "action": "fontBold", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"office", + "text": "Checkbox", + "action": "fontBold", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### 折りãŸãŸã¿/展開 ã“ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚¹ã‚¿ã‚¤ãƒ«ã¯æ¨™æº–ã®æŠ˜ã‚ŠãŸãŸã¿/展開アイコンを表示ã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“れらã¯éšŽå±¤ãƒªã‚¹ãƒˆã§ä½¿ç”¨ã•れã¾ã™ã€‚ -- *Windows* - [+] ã¾ãŸã¯ [-] ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™ã€‚ - - ![](assets/en/FormObjects/checkbox_collapse.png) + - *Windows* - [+] ã¾ãŸã¯ [-] ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + + ![](assets/en/FormObjects/checkbox_collapse.png) + + - *macOS* - å³ã‚„下を指ã™ä¸‰è§’ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ + + ![](assets/en/FormObjects/checkbox_collapse_mac.png) -- *macOS* - å³ã‚„下を指ã™ä¸‰è§’ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ - - ![](assets/en/FormObjects/checkbox_collapse_mac.png) #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"disclosure", - "method": "m_collapse", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"disclosure", + "method": "m_collapse", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### 開示ボタン 開示ボタンスタイルãŒé©ç”¨ã•れãŸãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ macOS ãŠã‚ˆã³ Windowsã«ãŠã„ã¦ã€è©³ç´°æƒ…å ±ã®è¡¨ç¤º/éžè¡¨ç¤ºã«ã™ã‚‹ã®ã«ä½¿ã‚れる標準的ãªé–‹ç¤ºãƒœã‚¿ãƒ³ã¨ã—ã¦æç”»ã•れã¾ã™ã€‚ 値㌠0 ã®ã¨ãã«ã¯ãƒœã‚¿ãƒ³ã®çŸ¢å°ãŒä¸‹å‘ãã€å€¤ãŒ 1 ã®ã¨ãã¯ä¸Šå‘ãã«ãªã‚Šã¾ã™ã€‚ -- *Windows* - + - *Windows* + ![](assets/en/FormObjects/checkbox_disclosure.png) -- *macOS* - + - *macOS* + ![](assets/en/FormObjects/checkbox_disclosure_mac.png) + #### JSON 例: - "myCheckBox": { - "type": "checkbox", - "style":"roundedDisclosure", - "method": "m_disclose", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"roundedDisclosure", + "method": "m_disclose", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + ### カスタム カスタムスタイルã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ã€èƒŒæ™¯ãƒ”クãƒãƒ£ãƒ¼ã‚’使用ã§ãã‚‹ã»ã‹ã€ã•ã¾ã–ã¾ãªè¿½åŠ ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã‚’ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- [背景パスå](properties_TextAndPicture.md#backgroundPathname) -- [アイコンオフセット](properties_TextAndPicture.md#icon-offset) +- [背景パスå](properties_TextAndPicture.md#背景パスå) +- [アイコンオフセット](properties_TextAndPicture.md#アイコンオフセット) - [横方å‘マージン](properties_TextAndPicture.md#横方å‘マージン) 㨠[縦方å‘マージン](properties_TextAndPicture.md#縦方å‘マージン) カスタムãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«ã¯é€šå¸¸ã€[4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤ç”»åƒ](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) ãŒé–¢é€£ä»˜ã‘られã€ã“れã¯åŒã˜ã [4ã¤ã®çŠ¶æ…‹ã‚’æŒã¤](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) [背景ピクãƒãƒ£ãƒ¼](properties_TextAndPicture.md#backgroundPathname) ã¨åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ #### JSON 例: - "myCheckbox": { - "type": "checkbox", - "style":"custom", - "text": "OK", - "icon": "/RESOURCES/smiley.jpg", - "iconFrame": 4, - "customBackgroundPicture": "/RESOURCES/paper.jpg", - "iconOffset": 5, // クリック時ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚ªãƒ•セット - "left": 60, - "top": 160, - "width": 100, - "height": 20, - "customBorderX": 20, - "customBorderY": 5 - } - +``` + "myCheckbox": { + "type": "checkbox", + "style":"custom", + "text": "OK", + "icon": "/RESOURCES/smiley.jpg", + "iconFrame": 4, + "customBackgroundPicture": "/RESOURCES/paper.jpg", + "iconOffset": 5, // クリック時ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚ªãƒ•セット + "left": 60, + "top": 160, + "width": 100, + "height": 20, + "customBorderX": 20, + "customBorderY": 5 + } +``` + + + ## プロパティ一覧 ã™ã¹ã¦ã®ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯æ¬¡ã®åŸºæœ¬ãƒ—ロパティを共有ã—ã¾ã™: -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [タイトル](properties_Object.md#タイトル) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [å·¦](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_Entry.md#ショートカット) - [表示状態](properties_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) + +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [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) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Save value](properties_Object.md#save-value) - [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) - [タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [タイトル](properties_Object.md#タイトル) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [å·¦](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_Entry.md#フォーカスå¯) - [ショートカット](properties_Entry.md#ショートカット) - [表示状態](properties_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) + [ボタンスタイル](#ボタンスタイル) ã«å¿œã˜ã¦ã€æ¬¡ã®è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒä½¿ç”¨ã§ãã¾ã™: - [背景パスå](properties_TextAndPicture.md#背景パスå) - [アイコンオフセット](properties_TextAndPicture.md#アイコンオフセット) - [横方å‘マージン](properties_TextAndPicture.md#横方å‘マージン) - [縦方å‘マージン](properties_TextAndPicture.md#縦方å‘マージン) (カスタムスタイル) - [スリーステート](properties_Display.md#スリーステート) (通常ã€ãƒ•ラット) -- [ピクãƒãƒ£ãƒ¼ãƒ‘スå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå) - [çŠ¶æ…‹ã®æ•°](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) - [タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®) (ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã€ãƒ™ãƒ™ãƒ«ã€è§’ã®ä¸¸ã„ベベルã€OS X グラデーションã€OS X テクスãƒãƒ£ãƒ¼ã€Office XPã€ã‚«ã‚¹ã‚¿ãƒ ) \ No newline at end of file +- [ピクãƒãƒ£ãƒ¼ãƒ‘スå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå) - [çŠ¶æ…‹ã®æ•°](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) - [タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®) (ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã€ãƒ™ãƒ™ãƒ«ã€è§’ã®ä¸¸ã„ベベルã€OS X グラデーションã€OS X テクスãƒãƒ£ãƒ¼ã€Office XPã€ã‚«ã‚¹ã‚¿ãƒ ) diff --git a/website/translated_docs/ja/FormObjects/comboBox_overview.md b/website/translated_docs/ja/FormObjects/comboBox_overview.md index dd7e8f1e44754b..eaae2c0000642f 100644 --- a/website/translated_docs/ja/FormObjects/comboBox_overview.md +++ b/website/translated_docs/ja/FormObjects/comboBox_overview.md @@ -3,25 +3,56 @@ id: comboBoxOverview title: コンボボックス --- -## æ¦‚è¦ - コンボボックス㯠[ドロップダウンリスト](dropdownList_Overview.md#概è¦) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‹ã‚‰å…¥åŠ›ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’å—ã‘ã„れる点ã¨ã€äºŒã¤ã®è¿½åŠ ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒã¤ã„ã¦ã„る点ãŒç•°ãªã‚Šã¾ã™ã€‚ ![](assets/en/FormObjects/combo_box.png) -コンボボックスã®åˆæœŸåŒ–方法ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¨ã¾ã£ãŸãåŒã˜ã§ã™ 。 ユーザーãŒã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’入力ã™ã‚‹ã¨ã€ãã®å€¤ã¯é…列㮠0番目ã®è¦ç´ ã«ä»£å…¥ã•れã¾ã™ã€‚ ãã®ä»–ã®ç‚¹ã§ã¯ã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’入力エリアã¨åŒã˜ã‚ˆã†ã«å–り扱ã„ã€é…列ã¾ãŸã¯é¸æŠžãƒªã‚¹ãƒˆã‚’一連ã®ãƒ‡ãƒ•ォルト値ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ +基本的ã«ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã¯å…¥åŠ›ã‚¨ãƒªã‚¢ã¨åŒã˜ã‚ˆã†ã«å–り扱ã„ã€ã‚ªãƒ–ジェクトã€é…列ã€ã¾ãŸã¯é¸æŠžãƒªã‚¹ãƒˆã‚’一連ã®ãƒ‡ãƒ•ォルト値ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ -入力エリアã¸ã®å…¥åЛ内容ã¯ã€å…¥åŠ›ã‚¨ãƒªã‚¢ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¨åŒæ§˜ã« `On Data Change` イベントを使用ã—ã¦ç®¡ç†ã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€*4Dランゲージリファレンス* マニュアル㮠[Form event code](https://doc.4d.com/4Dv18/4D/18/Form-event-code.301-4505020.ja.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 +## ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã®æ“作 -## コンボボックスã®ã‚ªãƒ—ション +入力エリアã¸ã®å…¥åЛ内容ã¯ã€ãã®ä»–ã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¨åŒæ§˜ã« [`On Data Change`](Events/onDataChange.md) イベントを使用ã—ã¦ç®¡ç†ã—ã¾ã™ã€‚ -コンボボックスタイプã®ã‚ªãƒ–ジェクトã«ã¯ã€é–¢é€£ä»˜ã‘られãŸé¸æŠžãƒªã‚¹ãƒˆã«é–¢ã™ã‚‹ 2ã¤ã®ã‚ªãƒ—ションãŒã‚りã¾ã™ã€‚ +コンボボックスã®åˆæœŸåŒ–方法ã¯ã€[ドロップダウンリスト](dropdownList_Overview.md#overview) ã¨ã¾ã£ãŸãåŒã˜ã§ã€ã‚ªãƒ–ジェクトã€é…列ã€ã¾ãŸã¯é¸æŠžãƒªã‚¹ãƒˆã‚’使用ã§ãã¾ã™ã€‚ -- [自動挿入](properties_DataSource.md#自動挿入): ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã«é–¢é€£ä»˜ã‘られãŸé¸æŠžãƒªã‚¹ãƒˆã«ãªã„値をユーザーãŒå…¥åŠ›ã—ãŸå ´åˆã«ã€ãã®å€¤ãŒè‡ªå‹•çš„ã«ãƒ¡ãƒ¢ãƒªãƒ¼å†…ã®ãƒªã‚¹ãƒˆã«è¿½åŠ ã•れã¾ã™ã€‚ -- [除外リスト](properties_RangeOfValues.md#除外リスト) (除外ã•れる値ã®ãƒªã‚¹ãƒˆ): 除外ã•れる値ã®ãƒªã‚¹ãƒˆã‚’関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ユーザーãŒã“ã®ãƒªã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹å€¤ã‚’入力ã—ãŸã¨ãã€ãã®å…¥åŠ›ã¯è‡ªå‹•çš„ã«å´ä¸‹ã•れã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +### オブジェクトã®ä½¿ç”¨ -> [指定リスト](properties_RangeOfValues.md#指定リスト) ã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«ã¯å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ユーザーインターフェースã«ãŠã„ã¦ã€ã‚ªãƒ–ジェクト内ã«ã„ãã¤ã‹ã®æŒ‡å®šã•れãŸå€¤ã‚’表示ã—ãŸã„ã¨ãã«ã¯ã€[ãƒãƒƒãƒ—アップメニュータイプ](dropdownList_Overview.md#概è¦) ã®ã‚ªãƒ–ジェクトを使用ã—ã¦ä¸‹ã•ã„。 +コンボボックスã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ã€[コレクション](Concepts/dt_collection) を内包ã—㟠[オブジェクト](Concepts/dt_object.md) を使用ã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: -## プロパティ一覧 +| プロパティ | タイプ | 説明 | +| -------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Collection | å¿…é ˆ - スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ ã™ã¹ã¦ã®åŒã˜åž‹ã®å€¤ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹åž‹:

        • 文字列
        • 数値
        • 日付
        • 時間
        • 空ã€ã¾ãŸã¯æœªå®šç¾©ã®å ´åˆã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã¯ç©ºã«ãªã‚Šã¾ã™ | +| `currentValue` | Collectionè¦ç´ ã¨åŒã˜ | ユーザーã«ã‚ˆã‚‹å…¥åЛ値 | + +オブジェクトã«ãã®ä»–ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã¯ç„¡è¦–ã•れã¾ã™ã€‚ + +ユーザーã«ã‚ˆã£ã¦ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«å…¥åŠ›ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã¯ã€ã‚ªãƒ–ジェクト㮠`currentValue` プロパティãŒå—ã‘å–りã¾ã™ã€‚ + +### é…列ã®ä½¿ç”¨ + +é…åˆ—ã‚’åˆæœŸåŒ–ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦ã¯ã€[ドロップダウンリスト](dropdownList_Overview.md#é…列ã®ä½¿ç”¨) ページ㮠**é…列ã®ä½¿ç”¨** ã‚’å‚ç…§ãã ã•ã„。 + +ユーザーã«ã‚ˆã£ã¦ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«å…¥åŠ›ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã¯ã€é…列㮠0番目ã®è¦ç´ ãŒå—ã‘å–りã¾ã™ã€‚ + +### é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨ + +入力エリア (列挙型ã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°) ã®ç®¡ç†ã®ãŸã‚ã«ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’使用ã—ãŸã„å ´åˆã€ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã‚’フォームオブジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ç›´æŽ¥å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šåˆ—挙型ã®ãƒ•ィールド/変数を容易ã«ç®¡ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +> 階層リストã®å ´åˆã€ç¬¬ä¸€éšŽå±¤ã®å€¤ã®ã¿ãŒè¡¨ç¤ºãƒ»é¸æŠžã§ãã¾ã™ã€‚ -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [自動挿入](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å·¦](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_Entry.md#プレースホルダー) - [除外リスト](properties_RangeOfValues.md#除外リスト) - [文字フォーマット](properties_Display.md#文字フォーマット) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [表示状態](properties_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) \ No newline at end of file +コンボボックスã«ãƒ•ィールドや変数を関連付ã‘ã‚‹ã«ã¯ã€ãƒ•ォームオブジェクト㮠[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 欄ã«ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã®åå‰ã‚’直接入力ã—ã¾ã™ã€‚ + +フォームを実行ã™ã‚‹ã¨ã€4D ãŒè‡ªå‹•çš„ã«å…¥åЛ䏭ã¾ãŸã¯è¡¨ç¤ºä¸­ã®ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã®çŠ¶æ…‹ã‚’ç®¡ç†ã—ã¾ã™ã€‚ユーザーãŒå€¤ã‚’é¸æŠžã™ã‚‹ã¨ã€ãã®å€¤ã¯ãƒ•ィールドã«ä¿å­˜ã•れã€ã“ã®ãƒ•ィールドã®å€¤ã¯ãƒ•ォームãŒè¡¨ç¤ºã•れãŸã¨ãã«ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«è¡¨ç¤ºã•れã¾ã™: + +詳細ã«ã¤ã„ã¦ã¯ã€[ドロップダウンリスト](dropdownList_Overview.md#é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨) ページ㮠**é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨** ã‚’å‚ç…§ãã ã•ã„。 + + +## オプション + +コンボボックスタイプã®ã‚ªãƒ–ジェクトã«ã¯ã€2ã¤ã®å°‚用オプションãŒã‚りã¾ã™: + +- [自動挿入](properties_DataSource.md#自動挿入): ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã«é–¢é€£ä»˜ã‘られãŸãƒªã‚¹ãƒˆã«ãªã„値をユーザーãŒå…¥åŠ›ã—ãŸå ´åˆã«ã€ãã®å€¤ãŒè‡ªå‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«è¿½åŠ ã•れã¾ã™ã€‚ +- [除外リスト](properties_RangeOfValues.md#除外リスト) (除外ã•れる値ã®ãƒªã‚¹ãƒˆ): 除外ã•れる値ã®ãƒªã‚¹ãƒˆã‚’関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ユーザーãŒã“ã®ãƒªã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹å€¤ã‚’入力ã—ãŸã¨ãã€ãã®å…¥åŠ›ã¯è‡ªå‹•çš„ã«å´ä¸‹ã•れã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +> [指定リスト](properties_RangeOfValues.md#指定リスト) ã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«ã¯å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ユーザーインターフェースã«ãŠã„ã¦ã€ã‚ªãƒ–ジェクト内ã«ã„ãã¤ã‹ã®æŒ‡å®šã•れãŸå€¤ã‚’表示ã—ãŸã„ã¨ãã«ã¯ã€[ドロップダウンリスト](dropdownList_Overview.md#概è¦) ã®ã‚ªãƒ–ジェクトを使用ã—ã¦ä¸‹ã•ã„。 + +## プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å·¦](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_Display.md#文字フォーマット) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [表示状態](properties_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/dropdownList_Overview.md b/website/translated_docs/ja/FormObjects/dropdownList_Overview.md index 3d6fe44ff7270c..2c60e87d4db677 100644 --- a/website/translated_docs/ja/FormObjects/dropdownList_Overview.md +++ b/website/translated_docs/ja/FormObjects/dropdownList_Overview.md @@ -3,19 +3,78 @@ id: dropdownListOverview title: ドロップダウンリスト --- -## æ¦‚è¦ - -ドロップダウンリストã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚¹ãƒˆã‹ã‚‰é¸æŠžã‚’ãŠã“ãªãˆã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã®ã‚ªãƒ–ジェクトã§ã™ã€‚ ドロップダウンリストã«è¡¨ç¤ºã•れる項目ã¯ã€é…列ã€é¸æŠžãƒªã‚¹ãƒˆã€ã¾ãŸã¯æ¨™æº–アクションを用ã„ã¦ç®¡ç†ã—ã¾ã™ã€‚ +ドロップダウンリストã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚¹ãƒˆã‹ã‚‰é¸æŠžã‚’ãŠã“ãªãˆã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã®ãƒ•ォームオブジェクトã§ã™ã€‚ ドロップダウンリストã«è¡¨ç¤ºã•れる項目ã¯ã€ã‚ªãƒ–ジェクトã€é…列ã€é¸æŠžãƒªã‚¹ãƒˆã€ã¾ãŸã¯æ¨™æº–アクションを用ã„ã¦ç®¡ç†ã—ã¾ã™ã€‚ macOS ã«ãŠã„ã¦ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト㯠"ãƒãƒƒãƒ—アップメニュー" ã¨ã‚‚呼ã°ã‚Œã¾ã™ã€‚ ã©ã¡ã‚‰ã®åå‰ã‚‚åŒã˜ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトを指ã—ã¾ã™ã€‚ 次ã®ä¾‹ã«ç¤ºã™ã‚ˆã†ã«ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã®å¤–観ã¯ãƒ—ラットフォームã«ã‚ˆã£ã¦è‹¥å¹²ç•°ãªã‚Šã¾ã™: ![](assets/en/FormObjects/popupDropdown_appearance.png) -## é…列ã®ä½¿ç”¨ + +## ドロップダウンリストã®ç¨®é¡ž + +ãれãžã‚Œã«ç‰¹æœ‰ã®æ©Ÿèƒ½ã‚’æŒã¤ã€è¤‡æ•°ã‚¿ã‚¤ãƒ—ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ タイプを定義ã™ã‚‹ã«ã¯ã€ãƒ—ロパティリストã§é©åˆ‡ãª **å¼ã®åž‹** 㨠**データタイプ** ã®å€¤ã‚’é¸æŠžã™ã‚‹ã‹ã€ãれらã«ç›¸å½“ã™ã‚‹ JSON を指定ã—ã¾ã™ã€‚ + +| タイプ | 機能 | å¼ã®åž‹/å¼ã‚¿ã‚¤ãƒ— | データタイプ | JSON 定義 | +| ------------- | -------------------- | -------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| オブジェクト | コレクションã«åŸºã¥ã | オブジェクト | Numeric, Text, Date, ã¾ãŸã¯ Time | `dataSourceTypeHint: object` + `numberFormat: ` ã¾ãŸã¯ `textFormat: ` ã¾ãŸã¯ `dateFormat: ` ã¾ãŸã¯ `timeFormat: ` | +| é…列 | é…列ã«åŸºã¥ã | é…列 | Numeric, Text, Date, ã¾ãŸã¯ Time | `dataSourceTypeHint: arrayNumber` ã¾ãŸã¯ `arrayText` ã¾ãŸã¯ `arrayDate` ã¾ãŸã¯ `arrayTime` | +| é¸æŠžãƒªã‚¹ãƒˆ (値をä¿å­˜) | é¸æŠžãƒªã‚¹ãƒˆã«åŸºã¥ã (標準) | リスト | é¸æŠžã•れãŸé …目値 | `dataSourceTypeHint: text` + `saveAs: value` | +| é¸æŠžãƒªã‚¹ãƒˆ (å‚ç…§ã‚’ä¿å­˜) | é¸æŠžãƒªã‚¹ãƒˆã«åŸºã¥ã (é …ç›®ã®ä½ç½®ã‚’ä¿å­˜) | リスト | é¸æŠžã•れãŸé …ç›®å‚ç…§ | `dataSourceTypeHint: integer` + `saveAs: reference` | +| éšŽå±¤åž‹é¸æŠžãƒªã‚¹ãƒˆ | 階層型ã®è¡¨ç¤ºãŒå¯èƒ½ | リスト | リストå‚ç…§ | `dataSourceTypeHint: integer` | +| 標準アクション | アクションã«ã‚ˆã‚Šè‡ªå‹•ç”Ÿæˆ | *any* | *リストå‚照以外* | ã„ãšã‚Œã‹ã®å®šç¾© + `action: ` (他エリアã«é©ç”¨ã•れるアクションã®å ´åˆã¯ + `focusable: false`) | + + + +## ドロップダウンリストã®ä½¿ã„æ–¹ + +### オブジェクトã®ä½¿ç”¨ + +ドロップダウンリストã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ã€[コレクション](Concepts/dt_collection) を内包ã—㟠[オブジェクト](Concepts/dt_object.md) を使用ã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: + +| プロパティ | タイプ | 説明 | +| -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `values` | Collection | å¿…é ˆ - スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ ã™ã¹ã¦ã®åŒã˜åž‹ã®å€¤ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹åž‹:
        • 文字列
        • 数値
        • 日付
        • 時間
        • 空ã€ã¾ãŸã¯æœªå®šç¾©ã®å ´åˆã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¯ç©ºã«ãªã‚Šã¾ã™ | +| `index` | number | é¸æŠžé …ç›®ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (0 㨠`collection.length-1` ã®é–“ã®å€¤)。 -1 ã«è¨­å®šã™ã‚‹ã¨ã€ãƒ—レースホルダー文字列ã¨ã—㦠currentValue ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ | +| `currentValue` | Collectionè¦ç´ ã¨åŒã˜ | é¸æŠžä¸­ã®é …ç›® (コードã«ã‚ˆã‚Šè¨­å®šã—ãŸå ´åˆã¯ãƒ—レースホルダーã¨ã—ã¦ä½¿ç”¨ã•れる) | + +オブジェクトã«ãã®ä»–ã®ãƒ—ロパティãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã¯ç„¡è¦–ã•れã¾ã™ã€‚ + +ドロップダウンリストã«é–¢é€£ä»˜ã‘ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’åˆæœŸåŒ–ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: + +* プロパティリストã®[データソース](properties_DataSource.md)テーマã«ãŠã„ã¦ã€é¸æŠžãƒªã‚¹ãƒˆã®é …目㧠"\" ã‚’é¸ã³ã€ãƒ‡ãƒ•ォルト値ã®ãƒªã‚¹ãƒˆã‚’入力ã—ã¾ã™ã€‚ ã“れらã®ãƒ‡ãƒ•ォルト値ã¯ã€ã‚ªãƒ–ジェクトã¸ã¨è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ + +* オブジェクトã¨ãã®ãƒ—ロパティを作æˆã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã«ç´ã¥ã„㟠[変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ㌠"myList" ã§ã‚れã°ã€[On Load](Events/onLoad.md) ãƒ•ã‚©ãƒ¼ãƒ ã‚¤ãƒ™ãƒ³ãƒˆã«æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: + +```4d +// Form.myDrop ã¯ãƒ•ォームオブジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã§ã™ + +Form.myDrop:=New object +Form.myDrop.values:=New collection("apples"; "nuts"; "pears"; "oranges"; "carrots") +Form.myDrop.index:=-1 // currentValue をプレースホルダーã«ä½¿ã„ã¾ã™ +Form.myDrop.currentValue:="ãƒ•ãƒ«ãƒ¼ãƒ„ã‚’é¸æŠžã—ã¦ãã ã•ã„" +``` + +ドロップダウンリストã«ã¯ã€ãƒ—レースホルダー文字列ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/FormObjects/fruits2.png) + +ユーザーã«ã‚ˆã£ã¦é …ç›®ãŒé¸æŠžã•れるã¨: + +![](assets/en/FormObjects/fruits3.png) + +```4d +Form.myDrop.values // ["apples","nuts","pears","oranges","carrots"] +Form.myDrop.currentValue //"oranges" +Form.myDrop.index //3 +``` + + + +### é…列ã®ä½¿ç”¨ [é…列](Concepts/arrays.md) ã¨ã¯ã€ãƒ¡ãƒ¢ãƒªãƒ¼å†…ã®å€¤ã®ãƒªã‚¹ãƒˆã®ã“ã¨ã§ã€é…列ã®åå‰ã«ã‚ˆã£ã¦å‚ç…§ã•れã¾ã™ã€‚ ドロップダウンリストをクリックã™ã‚‹ã¨ã€ãã®é…列を値ã®ãƒªã‚¹ãƒˆã¨ã—ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ -値ã®ãƒªã‚¹ãƒˆã‚’é…列ã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹ã“ã¨ã§ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストãŒåˆæœŸåŒ–ã•れã¾ã™ã€‚ ã“れã¯è¤‡æ•°ã®æ–¹æ³•ã§ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™: +ドロップダウンリストã«é–¢é€£ä»˜ã‘ã‚‹é…åˆ—ã‚’åˆæœŸåŒ–ã™ã‚‹ã«ã¯ã€æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: * プロパティリストã®[データソース](properties_DataSource.md)テーマã«ãŠã„ã¦ã€é¸æŠžãƒªã‚¹ãƒˆã®é …目㧠"\" ã‚’é¸ã³ã€ãƒ‡ãƒ•ォルト値ã®ãƒªã‚¹ãƒˆã‚’入力ã—ã¾ã™ã€‚ ã“れらã®ãƒ‡ãƒ•ォルト値ã¯ã€é…列ã¸ã¨è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ オブジェクトã«é–¢é€£ä»˜ã‘ãŸå¤‰æ•°åを使用ã—ã¦ã€ã“ã®é…列をå‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ @@ -31,15 +90,15 @@ macOS ã«ãŠã„ã¦ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト㯠"ãƒãƒƒãƒ—アップメ aCities{6}:="Green Bay" ``` -ã“ã®å ´åˆã€ãƒ•ォームã®ã‚ªãƒ–ジェクトã«é–¢é€£ä»˜ã‘ãŸå¤‰æ•°å㯠*aCities* ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’フォームメソッド内ã«ç½®ãã€`On Load` フォームイベント発生時ã«å®Ÿè¡Œã•れるよã†ã«ã—ã¾ã™ã€‚ +ã“ã®å ´åˆã€ãƒ•ォームã®ã‚ªãƒ–ジェクトã«ç´ä»˜ã‘㟠[変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 㯠`aCities` ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’フォームメソッド内ã«ç½®ãã€`On Load` フォームイベント発生時ã«å®Ÿè¡Œã•れるよã†ã«ã—ã¾ã™ã€‚ -* オブジェクトãŒè¡¨ç¤ºã•れるå‰ã«ã€[LIST TO ARRAY](https://doc.4d.com/4Dv18/4D/18/LIST-TO-ARRAY.301-4504606.ja.html) コマンドを使ã£ã¦ãƒªã‚¹ãƒˆã®å€¤ã‚’é…列ã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: +* オブジェクトãŒè¡¨ç¤ºã•れるå‰ã«ã€[LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/ja/page288.html) コマンドを使ã£ã¦ãƒªã‚¹ãƒˆã®å€¤ã‚’é…列ã«ãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: ```4d LIST TO ARRAY("Cities";aCities) ``` -ã“ã®å ´åˆãƒ•ォームã®ã‚ªãƒ–ジェクトã«é–¢é€£ä»˜ã‘ãŸå¤‰æ•°å㯠*aCities* ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ã€å‰è¿°ã—ãŸä»£å…¥å‘½ä»¤æ–‡ã®ä»£ã‚りã«å®Ÿè¡Œã§ãã¾ã™ã€‚ +ã“ã®å ´åˆã«ã‚‚ ã€ãƒ•ォームã®ã‚ªãƒ–ジェクトã«ç´ä»˜ã‘㟠[変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 㯠`aCities` ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ã€å‰è¿°ã—ãŸä»£å…¥å‘½ä»¤æ–‡ã®ä»£ã‚りã«å®Ÿè¡Œã§ãã¾ã™ã€‚ ユーザーãŒãŠã“ãªã£ãŸé¸æŠžå†…容をフィールドã«ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚れã°ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ç™»éŒ²å¾Œã«ä»£å…¥å‘½ä»¤ã‚’実行ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ãª Caseæ–‡ã®ã‚³ãƒ¼ãƒ‰ã‚’作æˆã—ã¾ã™: @@ -63,32 +122,51 @@ macOS ã«ãŠã„ã¦ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト㯠"ãƒãƒƒãƒ—アップメ プロパティリストã®ã‚¤ãƒ™ãƒ³ãƒˆãƒ†ãƒ¼ãƒžã«ãŠã„ã¦ã€ä½œæˆã—㟠Case æ–‡ã®ä¸­ã§ä½¿ç”¨ã™ã‚‹å„ã‚¤ãƒ™ãƒ³ãƒˆã‚’é¸æŠžã—ã¦æœ‰åŠ¹åŒ–ã¾ã™ã€‚ é…列ã«ã¯å¸¸ã«æœ‰é™æ•°ã®é …ç›®ãŒç´ã‚られã¾ã™ã€‚ 項目リストã¯å‹•çš„ã§ã‚りã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦å¤‰æ›´å¯èƒ½ã§ã™ã€‚ é…列ã®é …ç›®ã¯å¤‰æ›´ãƒ»ä¸¦ã³æ›¿ãˆãƒ»è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨ -列挙型ã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã®ç®¡ç†ã®ãŸã‚ã«ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストを使用ã—ãŸã„å ´åˆã€ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã‚’オブジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ç›´æŽ¥å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šåˆ—挙型ã®ãƒ•ィールド/変数を容易ã«ç®¡ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +### é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨ -> 階層リストã®å ´åˆã€ç¬¬ä¸€éšŽå±¤ã®å€¤ã®ã¿ãŒè¡¨ç¤ºãƒ»é¸æŠžã§ãã¾ã™ã€‚ +入力エリア (列挙型ã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°) ã®ç®¡ç†ã®ãŸã‚ã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’使用ã—ãŸã„å ´åˆã€ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã‚’ドロップダウンリスト㮠[データソース](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¨ã—ã¦ç›´æŽ¥å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šåˆ—挙型ã®ãƒ•ィールド/変数を容易ã«ç®¡ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ -ãŸã¨ãˆã°ã€"White"ã€"Blue"ã€"Green"ã€"Red" ã¨ã„ã†å€¤ã®ã¿ã‚’å«ã‚€ "Color" ã¨ã„ã†ãƒ•ィールドãŒã‚ã£ãŸå ´åˆã€ã“れらã®å€¤ã‚’å«ã‚€ãƒªã‚¹ãƒˆã‚’作æˆã—ã€ãれを "Color" フィールドをå‚ç…§ã™ã‚‹ãƒãƒƒãƒ—アップメニューã«é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã†ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚ã¨ã¯ 4D ãŒè‡ªå‹•çš„ã«ã‚«ãƒ¬ãƒ³ãƒˆå€¤ã®å…¥åŠ›ã‚„è¡¨ç¤ºã«é–¢ã—ã¦ç®¡ç†ã—ã¦ãれã¾ã™ã€‚ +ãŸã¨ãˆã°ã€"White"ã€"Blue"ã€"Green"ã€"Red" ã¨ã„ã†å€¤ã®ã¿ã‚’å«ã‚€ "Color" ã¨ã„ã†ãƒ•ィールドãŒã‚ã£ãŸå ´åˆã€ã“れらã®å€¤ã‚’å«ã‚€ãƒªã‚¹ãƒˆã‚’作æˆã—ã€ãれを "Color" フィールドをå‚ç…§ã™ã‚‹ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã«é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã†ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚ã¨ã¯ 4D ãŒè‡ªå‹•çš„ã«ã‚«ãƒ¬ãƒ³ãƒˆå€¤ã®å…¥åŠ›ã‚„è¡¨ç¤ºã«é–¢ã—ã¦ç®¡ç†ã—ã¦ãれã¾ã™ã€‚ +> 階層リストã®å ´åˆã€ç¬¬ä¸€éšŽå±¤ã®å€¤ã®ã¿ãŒè¡¨ç¤ºãƒ»é¸æŠžã§ãã¾ã™ã€‚ 階層的ãªå†…容を表示ã—ãŸã„å ´åˆã¯ã€[階層型ã®é¸æŠžãƒªã‚¹ãƒˆ](#éšŽå±¤åž‹é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨) を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -ãƒãƒƒãƒ—アップメニュー/ドロップダウンリストやコンボボックスをフィールドや変数ã¨é–¢é€£ä»˜ã‘ã‚‹ã«ã¯ã€ã‚ªãƒ–ジェクト㮠[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 欄ã«ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã®åå‰ã‚’直接入力ã—ã¾ã™ã€‚ +ドロップダウンリストをフィールドや変数ã¨é–¢é€£ä»˜ã‘ã‚‹ã«ã¯ã€ãƒ—ロパティリスト㮠[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) 欄ã«ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã®åå‰ã‚’直接入力ã—ã¾ã™ã€‚ +> ã“ã®åŽŸç†ã¯ã€ã‚ªãƒ–ジェクトやé…列を用ã„ãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 "変数ã‚ã‚‹ã„ã¯å¼" ã®æ¬„ã«ãƒ•ィールドåを入力ã—ãŸå ´åˆã¯ã€å¿…ãšé¸æŠžãƒªã‚¹ãƒˆã‚’使用ã—ã¾ã™ã€‚ -フォームを実行ã™ã‚‹ã¨ã€4D ãŒè‡ªå‹•çš„ã«å…¥åЛ䏭ã¾ãŸã¯è¡¨ç¤ºä¸­ã®ãƒãƒƒãƒ—アップメニュー/コンボボックスã®çŠ¶æ…‹ã‚’ç®¡ç†ã—ã¾ã™ã€‚ユーザーãŒå€¤ã‚’é¸æŠžã™ã‚‹ã¨ã€ãã®å€¤ã¯ãƒ•ィールドã«ä¿å­˜ã•れã€ã“ã®ãƒ•ィールドã®å€¤ã¯ãƒ•ォームãŒè¡¨ç¤ºã•れãŸã¨ãã«ãƒãƒƒãƒ—アップメニューã«è¡¨ç¤ºã•れã¾ã™: +フォームを実行ã™ã‚‹ã¨ã€4D ãŒè‡ªå‹•çš„ã«å…¥åЛ䏭ã¾ãŸã¯è¡¨ç¤ºä¸­ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã®çŠ¶æ…‹ã‚’ç®¡ç†ã—ã¾ã™ã€‚ユーザーãŒå€¤ã‚’é¸æŠžã™ã‚‹ã¨ã€ãã®å€¤ã¯ãƒ•ィールドã«ä¿å­˜ã•れã€ã“ã®ãƒ•ィールドã®å€¤ã¯ãƒ•ォームãŒè¡¨ç¤ºã•れãŸã¨ãã«ãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト表示ã•れã¾ã™: ![](assets/en/FormObjects/popupDropdown_choiceList.png) -> ã“ã®åŽŸç†ã¯ã€é…列を用ã„ã¦ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’åˆæœŸåŒ–ã™ã‚‹æ–¹æ³•ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 変数ã‚ã‚‹ã„ã¯å¼ã®æ¬„ã«ãƒ•ィールドåを入力ã—ãŸå ´åˆã¯ã€å¿…ãšé¸æŠžãƒªã‚¹ãƒˆã‚’使用ã—ã¾ã™ã€‚ -### 関連付㑠+#### é¸æŠžã•れãŸé …目値 ã¾ãŸã¯ é¸æŠžã•れãŸé …ç›®å‚ç…§ + +é¸æŠžãƒªã‚¹ãƒˆåž‹ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストをフィールドや変数ã¨é–¢é€£ä»˜ã‘ãŸå ´åˆã€[**データタイプ**](properties_DataSource.md#データタイプ) プロパティを **é¸æŠžã•れãŸé …目値** ã¾ãŸã¯ **é¸æŠžã•れãŸé …ç›®å‚ç…§** ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ä¿å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã‚’最é©åŒ–ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +### éšŽå±¤åž‹é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨ + +階層型ドロップダウンリストã¯ã€ãƒªã‚¹ãƒˆã®å„é …ç›®ã«ã‚µãƒ–リストãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ 以下ã¯ã€éšŽå±¤åž‹ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã®ä¾‹ã§ã™: + +![](assets/en/FormObjects/popupDropdown_hierar.png) + +> フォーム上ã§ã¯ã€éšŽå±¤åž‹ãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト㯠2階層ã«åˆ¶é™ã•れã¦ã„ã¾ã™ã€‚ + +éšŽå±¤åž‹é¸æŠžãƒªã‚¹ãƒˆã‚’ãƒ‰ãƒ­ãƒƒãƒ—ãƒ€ã‚¦ãƒ³ãƒªã‚¹ãƒˆã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«å‰²ã‚Šå½“ã¦ã‚‹ã«ã¯ã€ãƒ—ロパティリスト㮠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#choice-list) 欄を使ã„ã¾ã™ã€‚ + +階層型ドロップダウンリストã®ç®¡ç†ã«ã¯ã€4Dランゲージ㮠**階層リスト** コマンドを使用ã—ã¾ã™ã€‚ `(*; "name")` シンタックスをサãƒãƒ¼ãƒˆã™ã‚‹ã™ã¹ã¦ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ã€éšŽå±¤åž‹ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã«ä½¿ç”¨ã§ãã¾ã™ (例: [`List item parent`](https://doc.4d.com/4dv19/help/command/ja/page633.html))。 + + +### 標準アクションã®ä½¿ç”¨ -ãƒãƒƒãƒ—アップメニュー/ドロップダウンリストã®å¼ã¨ã—ã¦ãƒ•ィールドをã€ã•らã«ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã«é¸æŠžãƒªã‚¹ãƒˆã‚’設定ã—ãŸå ´åˆã«ã¯ã€[関連付ã‘](properties_DataSource.md#関連付ã‘) プロパティãŒåˆ©ç”¨ã§ãã¾ã™ã€‚"リスト項目ã®å€¤" ã¾ãŸã¯ "リスト項目ã®å‚照番å·" ã‚’é¸æŠžã—ã¦ãƒ‡ãƒ¼ã‚¿ã®ä¿å­˜æ–¹å¼ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ä¿å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã‚’最é©åŒ–ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ +[標準アクション](properties_Action.md#標準アクション) を使ã£ã¦ã€ãƒ‰ãƒ­ãƒƒãƒ—ãƒ€ã‚¦ãƒ³ãƒªã‚¹ãƒˆã‚’è‡ªå‹•çš„ã«æ§‹ç¯‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: -## 標準アクションã®ä½¿ç”¨ +- `gotoPage` 標準アクションã®ä½¿ç”¨ã€‚ ã“ã®å ´åˆã€4D ã¯é¸æŠžã•れãŸé …ç›®ã®ç•ªå·ã«å¯¾å¿œã™ã‚‹ [フォームã®ãƒšãƒ¼ã‚¸](FormEditor/forms.md#フォームã®ãƒšãƒ¼ã‚¸) を自動的ã«è¡¨ç¤ºã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ 3番目ã®é …目をクリックã™ã‚‹ã¨ã€4Dã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォーム㮠3ページ目 (存在ã™ã‚‹å ´åˆ) を表示ã—ã¾ã™ã€‚ 実行時ã®ãƒ‡ãƒ•ォルトã§ã¯ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã«ã¯ãƒšãƒ¼ã‚¸ç•ªå· (1ã€2...) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ -ãƒãƒƒãƒ—アップメニュー/ドロップダウンリストã«ã¯ã€æ¨™æº–アクションを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ (プロパティリスト㮠"[アクション](properties_Action.md#標準アクション)" テーマ)。 ã“ã®ã‚ªãƒ–ジェクトã§ã¯ã€é …ç›®ã®ã‚µãƒ–リストを表示ã™ã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™ (例外: goto page アクション)。 ãŸã¨ãˆã°ã€`backgroundColor` æ¨™æº–ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãŸå ´åˆã€ã‚ªãƒ–ジェクトã¯ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã«ãŠã„ã¦èƒŒæ™¯è‰²ã®è‡ªå‹•リストを表示ã—ã¾ã™ã€‚ ã“ã®è‡ªå‹•リストã¯ã€å„é …ç›®ãŒä»»æ„ã®æ¨™æº–アクションを割り当ã¦ã‚‰ã‚ŒãŸé¸æŠžãƒªã‚¹ãƒˆã‚’設定ã™ã‚‹ã“ã¨ã§ä¸Šæ›¸ãã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +- é …ç›®ã®ã‚µãƒ–リストを表示ã™ã‚‹æ¨™æº–アクションã®ä½¿ç”¨ (例: `backgroundColor`)。 ã“ã®æ©Ÿèƒ½ã«ã¯ä»¥ä¸‹ã®æ¡ä»¶ãŒã‚りã¾ã™: + - スタイル付ãテキストエリア ([4D Write Pro エリア](writeProArea_overview.md) ã¾ãŸã¯ [マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) プロパティ付ã [入力](input_overview.md)) ãŒæ¨™æº–アクションã®ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã¨ã—ã¦ãƒ•ォーム内ã«å­˜åœ¨ã™ã‚‹ã€‚ + - ドロップダウンリスト㫠[フォーカスå¯](properties_Entry.md#フォーカスå¯) 設定ã•れã¦ã„ãªã„。 実行時ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¯ã€èƒŒæ™¯è‰²ãªã©ã®å€¤ã®è‡ªå‹•リストを表示ã—ã¾ã™ã€‚ ã“ã®è‡ªå‹•リストã¯ã€å„é …ç›®ãŒä»»æ„ã®æ¨™æº–アクションを割り当ã¦ã‚‰ã‚ŒãŸé¸æŠžãƒªã‚¹ãƒˆã‚’設定ã™ã‚‹ã“ã¨ã§ä¸Šæ›¸ãã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -è©³ç´°ãªæƒ…å ±ã«é–¢ã—ã¦ã¯ã€[標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 +> ã“ã®æ©Ÿèƒ½ã¯ã€éšŽå±¤åž‹ã®ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã§ã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 ## プロパティ一覧 -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [関連付ã‘](properties_DataSource.md#関連付ã‘) - [å·¦](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_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [表示状態](properties_Display.md#表示状態) - [レンダリングã—ãªã„](properties_Display.md#レンダリングã—ãªã„) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) \ No newline at end of file +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [データタイプ (å¼ã®åž‹)](properties_DataSource.md#データタイプ-å¼ã®åž‹) - [データタイプ (リスト)](properties_DataSource.md#データタイプ-リスト) - [å·¦](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_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [表示状態](properties_Display.md#表示状態) - [レンダリングã—ãªã„](properties_Display.md#レンダリングã—ãªã„) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/formObjects_overview.md b/website/translated_docs/ja/FormObjects/formObjects_overview.md index 431e5d8c2351c9..31484ca3cde674 100644 --- a/website/translated_docs/ja/FormObjects/formObjects_overview.md +++ b/website/translated_docs/ja/FormObjects/formObjects_overview.md @@ -9,17 +9,20 @@ title: 4D フォームオブジェクトã«ã¤ã„㦠4D フォームã§ã¯å¤šãã®ãƒ“ルトイン **アクティブ** オブジェクトãŠã‚ˆã³ **スタティック** ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæä¾›ã•れã¦ã„ã¾ã™: -- **アクティブオブジェクト** ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース機能やデータベースタスクを実行ã—ã¾ã™ã€‚ アクティブオブジェクトã®ç¨®é¡žã¯ã€ 入力フィールドã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ãªã©æ§˜ã€…ã§ã™ãŒã€ã„ãšã‚Œã‚‚データを表示ã—ãŸã‚Šã€ãƒ¡ãƒ¢ãƒªã«ä¸€æ™‚ä¿å­˜ã—ãŸã‚Šã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’é–‹ã・レãƒãƒ¼ãƒˆã‚’å°åˆ·ã™ã‚‹ãƒ»ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスを開始ã™ã‚‹ãªã©ã®å‹•作を実行ã—ãŸã‚Šã—ã¾ã™ã€‚ +- **アクティブオブジェクト** ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース機能やデータベースタスクを実行ã—ã¾ã™ã€‚ アクティブオブジェクトã®ç¨®é¡žã¯ã€ 入力フィールドã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ãªã©æ§˜ã€…ã§ã™ãŒã€ã„ãšã‚Œã‚‚データを表示ã—ãŸã‚Šã€ãƒ¡ãƒ¢ãƒªã«ä¸€æ™‚ä¿å­˜ã—ãŸã‚Šã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’é–‹ã・レãƒãƒ¼ãƒˆã‚’å°åˆ·ã™ã‚‹ãƒ»ãƒãƒƒã‚¯ã‚°ãƒ©ã‚¦ãƒ³ãƒ‰ãƒ—ロセスを開始ã™ã‚‹ãªã©ã®å‹•作を実行ã—ãŸã‚Šã—ã¾ã™ã€‚ - **スタティックオブジェクト** (ç·šã€æž ã€èƒŒæ™¯ãƒ”クãƒãƒ£ãƒ¼ç­‰) ã¯ä¸€èˆ¬çš„ã«ã€ãƒ•ォームã®ã‚¢ãƒ”アランスやラベルã€ã‚°ãƒ©ãƒ•ィックインターフェースを設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ アクティブオブジェクトã¨ç•°ãªã‚Šã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクトã«ã¯å¤‰æ•°ã‚„å¼ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã›ã‚“。 ã—ã‹ã—ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクトã«ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ã‚ªãƒ–ジェクトを挿入ã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ + ## ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ“作 4D フォームオブジェクトã®è¿½åŠ ã‚„ç·¨é›†ã¯æ¬¡ã®æ–¹æ³•ã§ãŠã“ãªãˆã¾ã™: -* **[フォームエディター](FormEditor/formEditor.md):** ツールãƒãƒ¼ã‹ã‚‰ã‚ªãƒ–ジェクトをフォーム上ã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ã¾ã™ã€‚ フォームã«é…ç½®ã—ãŸã‚‰ã€ãã®ã‚ªãƒ–ジェクトã®ãƒ—ロパティをプロパティリストã‹ã‚‰ç·¨é›†ã§ãã¾ã™ã€‚詳細ã«ã¤ã„ã¦ã¯ [フォームã®ä½œæˆ](https://doc.4d.com/4Dv18/4D/18/Building-forms.200-4575447.ja.html) ã‚’å‚ç…§ãã ã•ã„。 +* **[フォームエディター](FormEditor/formEditor.md):** ツールãƒãƒ¼ã‹ã‚‰ã‚ªãƒ–ジェクトをフォーム上ã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã—ã¾ã™ã€‚ フォームã«é…ç½®ã—ãŸã‚‰ã€ãã®ã‚ªãƒ–ジェクトã®ãƒ—ロパティをプロパティリストã‹ã‚‰ç·¨é›†ã§ãã¾ã™ã€‚ + 詳細ã«ã¤ã„ã¦ã¯ [フォームã®ä½œæˆ](https://doc.4d.com/4Dv18/4D/18/Building-forms.200-4575447.ja.html) ã‚’å‚ç…§ãã ã•ã„。 * **4D ランゲージ**: [オブジェクト(フォーム)](https://doc.4d.com/4Dv18/4D/18/Objects-Forms.201-4504342.ja.html) テーマã®ã‚³ãƒžãƒ³ãƒ‰ (`OBJECT DUPLICATE` ã‚„ `OBJECT SET FONT STYLE` ãªã©) を使ã£ã¦ã€ãƒ•ィームオブジェクトを作æˆãƒ»å®šç¾©ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -* **ダイナミックフォーム内㮠JSON コード:** JSON を使ã£ã¦ãƒ—ロパティを定義ã—ã¾ã™ã€‚ [type](properties_Object.md#type) プロパティã§ã‚ªãƒ–ジェクトタイプを定義ã—ã€æä¾›ã•れã¦ã„ã‚‹ä»–ã®ãƒ—ロパティã®ã†ã¡å¿…è¦ãªã‚‚ã®ã‚’設定ã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [ダイナミックフォーム](https://doc.4d.com/4Dv18/4D/18/Dynamic-Forms.300-4575729.ja.html) ページをå‚ç…§ãã ã•ã„。 - 次ã¯ãƒœã‚¿ãƒ³ã‚ªãƒ–ジェクトã®ä¾‹ã§ã™: - ``` { "type": "button", "style": "bevel", "text": "OK", "action": "Cancel", "left": 60, "top": 160, "width": 100, "height": 20 } \ No newline at end of file +* **ダイナミックフォーム内㮠JSON コード:** JSON を使ã£ã¦ãƒ—ロパティを定義ã—ã¾ã™ã€‚ [type](properties_Object.md#type) プロパティã§ã‚ªãƒ–ジェクトタイプを定義ã—ã€æä¾›ã•れã¦ã„ã‚‹ä»–ã®ãƒ—ロパティã®ã†ã¡å¿…è¦ãªã‚‚ã®ã‚’設定ã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [ダイナミックフォーム](https://doc.4d.com/4Dv18/4D/18/Dynamic-Forms.300-4575729.ja.html) ページをå‚ç…§ãã ã•ã„。 + 次ã¯ãƒœã‚¿ãƒ³ã‚ªãƒ–ジェクトã®ä¾‹ã§ã™: + ``` + { "type": "button", "style": "bevel", "text": "OK", "action": "Cancel", "left": 60, "top": 160, "width": 100, "height": 20 } diff --git a/website/translated_docs/ja/FormObjects/groupBox.md b/website/translated_docs/ja/FormObjects/groupBox.md index c543bbaa662794..96f572b12d9ff0 100644 --- a/website/translated_docs/ja/FormObjects/groupBox.md +++ b/website/translated_docs/ja/FormObjects/groupBox.md @@ -6,21 +6,22 @@ title: グループボックス グループボックスã¯ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクトã®ä¸€ã¤ã§ã€è¤‡æ•°ã®ãƒ•ォームオブジェクトを視覚的ã«ã¾ã¨ã‚ã¾ã™ã€‚ ![](assets/en/FormObjects/groupBox.png) - > グループボックスã®åå‰ã¯ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚ã“れã¯ä»–ã® 4D ラベルã¨åŒæ§˜ã«ãƒ­ãƒ¼ã‚«ãƒ©ã‚¤ã‚ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (4D デザインリファレンス㮠[スタティックテキスト中ã§å‚照を使用ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Using-references-in-static-text.300-4575714.ja.html) ãŠã‚ˆã³ [付録 B: XLIFF アーキテクãƒãƒ£ãƒ¼](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) ã®ç« ã‚’å‚ç…§ãã ã•ã„)。 + + #### JSON 例: - "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 + } +``` #### プロパティ一覧 - -[タイプ](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_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [横æƒãˆ](properties_Text.md#横æƒãˆ) \ 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_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [横æƒãˆ](properties_Text.md#横æƒãˆ) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/input_overview.md b/website/translated_docs/ja/FormObjects/input_overview.md index 58efc5fab8a14f..640a07d93a6489 100644 --- a/website/translated_docs/ja/FormObjects/input_overview.md +++ b/website/translated_docs/ja/FormObjects/input_overview.md @@ -3,7 +3,6 @@ id: inputOverview title: 入力 --- -## æ¦‚è¦ å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ä½¿ã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹[フィールド](Concepts/identifiers.md#フィールド) ã‚„ [変数](Concepts/variables.md) ã¨ã„ã£ãŸå¼ã‚’フォーム上ã«è¿½åŠ ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã¯æ–‡å­—ベースã®ãƒ‡ãƒ¼ã‚¿ (ãƒ†ã‚­ã‚¹ãƒˆã€æ—¥ä»˜ã€æ•°å€¤ãªã©) ãŠã‚ˆã³ãƒ”クãƒãƒ£ãƒ¼åž‹ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ãˆã¾ã™ã€‚ @@ -15,6 +14,7 @@ title: 入力 データã¯ã€[オブジェクトメソッドやフォームメソッド](Concepts/methods.md)を使ã£ã¦ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + ### JSON 例: ```4d @@ -28,16 +28,17 @@ title: 入力 } ``` + ## プロパティ一覧 -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [関連付ã‘](properties_DataSource.md#関連付ã‘) - [å·¦](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_Entry.md#入力フィルター) - [プレースホルダー](properties_Entry.md#プレースホルダー) - [自動スペルãƒã‚§ãƒƒã‚¯](properties_Entry.md#自動スペルãƒã‚§ãƒƒã‚¯) - [複数行](properties_Entry.md#複数行) - [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) - [é¸æŠžã‚’å¸¸ã«è¡¨ç¤º](properties_Entry.md#é¸æŠžã‚’å¸¸ã«è¡¨ç¤º) - [デフォルト値](properties_RangeOfValues.md#デフォルト値) - [指定リスト](properties_RangeOfValues.md#指定リスト) - [除外リスト](properties_RangeOfValues.md#除外リスト) - [文字フォーマット](properties_Display.md#文字フォーマット) - [数値フォーマット](properties_Display.md#数値フォーマット) - [テキスト (True時)/テキスト (False時)](properties_Display.md#テキスト-(True時)-テキスト-(False時)) - [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [日付フォーマット](properties_Display.md#日付フォーマット) - [表示状態](properties_Display.md#表示状態) - [ワードラップ](properties_Display.md#ワードラップ) - [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) - [横スクロールãƒãƒ¼](properties_Appearance.md#横スクロールãƒãƒ¼) - [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [æ–¹å‘](properties_Text.md#æ–¹å‘) - [マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) - [スタイルタグを全ã¦ä¿å­˜](properties_Text.md#スタイルタグを全ã¦ä¿å­˜) - [å°åˆ·æ™‚å¯å¤‰](properties_Print.md#å°åˆ·æ™‚å¯å¤‰) - [ドラッグ有効](properties_Action.md#ドラッグ有効) - [ドロップ有効](properties_Action.md#ドロップ有効) +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å·¦](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_Entry.md#入力フィルター) - [プレースホルダー](properties_Entry.md#プレースホルダー) - [自動スペルãƒã‚§ãƒƒã‚¯](properties_Entry.md#自動スペルãƒã‚§ãƒƒã‚¯) - [複数行](properties_Entry.md#複数行) - [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) - [é¸æŠžã‚’å¸¸ã«è¡¨ç¤º](properties_Entry.md#é¸æŠžã‚’å¸¸ã«è¡¨ç¤º) - [デフォルト値](properties_RangeOfValues.md#デフォルト値) - [指定リスト](properties_RangeOfValues.md#指定リスト) - [除外リスト](properties_RangeOfValues.md#除外リスト) - [文字フォーマット](properties_Display.md#文字フォーマット) - [数値フォーマット](properties_Display.md#数値フォーマット) - [テキスト (True時)/テキスト (False時)](properties_Display.md#テキスト-(True時)-テキスト-(False時)) - [テキスト (True時)/テキスト (False時)](properties_Display.md#テキスト-(True時)-テキスト-(False時)) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) - [表示状態](properties_Display.md#表示状態) - [ワードラップ](properties_Display.md#ワードラップ) [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) - [横スクロールãƒãƒ¼](properties_Appearance.md#横スクロールãƒãƒ¼) - [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [æ–¹å‘](properties_Text.md#æ–¹å‘) - [スタイルタグを全ã¦ä¿å­˜](properties_Text.md#スタイルタグを全ã¦ä¿å­˜) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) - [ピッカーã®ä½¿ç”¨ã‚’許å¯](properties_Text.md#ピッカーã®ä½¿ç”¨ã‚’許å¯) - [å°åˆ·æ™‚å¯å¤‰](properties_Print.md#å°åˆ·æ™‚å¯å¤‰) - [ドラッグ有効](properties_Action.md#ドラッグ有効) - [ドロップ有効](properties_Action.md#ドロップ有効) -* * * +--- ## 入力ã®ä»£æ›¿æ‰‹æ®µ フィールドや変数ãªã©ã®å¼ã¯ã€ãƒ•ォーム内ã«ãŠã„ã¦å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆä»¥å¤–ã‚’ç”¨ã„ã¦è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚具体的ã«ã¯ä»¥ä¸‹ã®æ–¹æ³•ãŒã‚りã¾ã™: -* データベースã®ãƒ•ィールドã‹ã‚‰ [セレクション型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹](listbox_overview.md) ã¸ã¨ã€ãƒ‡ãƒ¼ã‚¿ã‚’直接表示・入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -* [ãƒãƒƒãƒ—アップメニュー/ドロップダウンリスト](popupMenuDropdownList_overview) 㨠[コンボボックス](comboBox_overview.md) オブジェクトを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãƒªã‚¹ãƒˆãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã‚’フォーム内ã«ã¦ç›´æŽ¥è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -* ブール型ã®å¼ã¯ [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) ã‚„ [ラジオボタン](radio_overview.md) オブジェクトを用ã„ã¦æç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ \ No newline at end of file +* データベースã®ãƒ•ィールドã‹ã‚‰ [セレクション型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹](listbox_overview.md) ã¸ã¨ã€ãƒ‡ãƒ¼ã‚¿ã‚’直接表示・入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* [ãƒãƒƒãƒ—アップメニュー/ドロップダウンリスト](popupMenuDropdownList_overview) 㨠[コンボボックス](comboBox_overview.md) オブジェクトを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãƒªã‚¹ãƒˆãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã‚’フォーム内ã«ã¦ç›´æŽ¥è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* ブール型ã®å¼ã¯ [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) ã‚„ [ラジオボタン](radio_overview.md) オブジェクトを用ã„ã¦æç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/list_overview.md b/website/translated_docs/ja/FormObjects/list_overview.md index ad89d80dacad13..4c9362d093f5dd 100644 --- a/website/translated_docs/ja/FormObjects/list_overview.md +++ b/website/translated_docs/ja/FormObjects/list_overview.md @@ -3,7 +3,6 @@ id: listOverview title: 階層リスト --- -## æ¦‚è¦ éšŽå±¤ãƒªã‚¹ãƒˆã¯ãƒ•ォームオブジェクトã®ä¸€ã¤ã§ã€å±•é–‹/折りãŸãŸã¿å¯èƒ½ãªä¸€ã¤ä»¥ä¸Šã®éšŽå±¤ã‚’æŒã¤ãƒªã‚¹ãƒˆå½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ @@ -11,15 +10,17 @@ title: 階層リスト 展開/折りãŸãŸã¿ã‚¢ã‚¤ã‚³ãƒ³ã¯å¿…è¦ã«å¿œã˜ã¦é …ç›®ã®å·¦ã«è‡ªå‹•çš„ã«è¡¨ç¤ºã•れã¾ã™ã€‚ 階層リストã®ãƒ¬ãƒ™ãƒ«æ•°ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“。 + ## 階層リストã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ 階層リストã®ä¸­èº«ã¯æ¬¡ã®æ–¹æ³•ã§åˆæœŸåŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- 既存㮠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) を関連ã¥ã‘ã¾ã™ã€‚ é¸æŠžãƒªã‚¹ãƒˆã¯ã‚らã‹ã˜ã‚デザインモードã«ã¦ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’使ã£ã¦å®šç¾©ã—ã¾ã™ã€‚ -- 階層リストå‚照を直接 [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«è¨­å®šã—ã¾ã™ã€‚ +- 既存㮠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) を関連ã¥ã‘ã¾ã™ã€‚ é¸æŠžãƒªã‚¹ãƒˆã¯ã‚らã‹ã˜ã‚デザインモードã«ã¦ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’使ã£ã¦å®šç¾©ã—ã¾ã™ã€‚ +- 階層リストå‚照を直接 [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«è¨­å®šã—ã¾ã™ã€‚ ランタイムã«ãŠã„ã¦ã¯ã€4D ランゲージ㮠[階層リスト](https://doc.4d.com/4Dv18/4D/18/Hierarchical-Lists.201-4504360.ja.html) コマンドを使ã£ã¦éšŽå±¤ãƒªã‚¹ãƒˆã‚’管ç†ã—ã¾ã™ãŒã€ãã®éš›ã«ã¯å¯¾è±¡ã¨ãªã‚‹ãƒªã‚¹ãƒˆã® *ListRef* å‚照を用ã„ã¾ã™ã€‚ + ## ListRef ã¨ã‚ªãƒ–ジェクトå 階層リストã¯ãƒ¡ãƒ¢ãƒªä¸Šã«å­˜åœ¨ã™ã‚‹ **ランゲージオブジェクト** ã§ã‚ã‚‹ã¨åŒæ™‚ã« **フォームオブジェクト** ã§ã‚‚ã‚りã¾ã™ã€‚ @@ -49,15 +50,13 @@ mylist:=New list ```4d SET LIST ITEM FONT(*;"mylist1";*;thefont) ``` +> *mylist1* フォームオブジェクトã«é–¢é€£ä»˜ã‘られãŸéšŽå±¤ãƒªã‚¹ãƒˆé …ç›®ã®ãƒ•ォントを変更ã—ã¾ã™ã€‚ コマンド㯠*mylist1* オブジェクトã®ç¾åœ¨é¸æŠžã•れã¦ã„る項目を対象ã¨ã—ã¾ã™ãŒã€å¤‰æ›´ã¯ã™ã¹ã¦ã®ãƒ—ロセスã®ã™ã¹ã¦ã®ãƒªã‚¹ãƒˆã«å映ã•れã¾ã™ã€‚ -> ... *mylist1* フォームオブジェクトã«é–¢é€£ä»˜ã‘られãŸéšŽå±¤ãƒªã‚¹ãƒˆé …ç›®ã®ãƒ•ォントを変更ã—ã¾ã™ã€‚ コマンド㯠*mylist1* オブジェクトã®ç¾åœ¨é¸æŠžã•れã¦ã„る項目を対象ã¨ã—ã¾ã™ãŒã€å¤‰æ›´ã¯ã™ã¹ã¦ã®ãƒ—ロセスã®ã™ã¹ã¦ã®ãƒªã‚¹ãƒˆã«å映ã•れã¾ã™ã€‚ - -### @ã®ã‚µãƒãƒ¼ãƒˆ +### @をサãƒãƒ¼ãƒˆ ä»–ã®ã‚ªãƒ–ジェクトプロパティ管ç†ã‚³ãƒžãƒ³ãƒ‰ã®ã‚ˆã†ã«ã€`ListName` 引数㧠“@†文字を使用ã§ãã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ãƒ•ォーム上ã®è¤‡æ•°ã®ã‚ªãƒ–ジェクトを指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ã—ã‹ã—階層リストコマンドã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€ã“れã¯ã™ã¹ã¦ã®å ´åˆã«é©ç”¨ã•れるã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 コマンドã®ã‚¿ã‚¤ãƒ—ã«ã‚ˆã‚Šã€ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ 2ã¤ã®ç•°ãªã‚‹åŠ¹æžœãŒã‚りã¾ã™: - プロパティ設定用ã®ã‚³ãƒžãƒ³ãƒ‰ã«ãŠã„ã¦ã€ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯è©²å½“ã™ã‚‹åå‰ã®ã‚ªãƒ–ジェクトを対象ã¨ã—ã¾ã™ (標準ã®å‹•作)。 ãŸã¨ãˆã°ã€å¼•æ•° "LH@" ã¯ã€ã‚ªãƒ–ジェクトå㌠"LH" ã§å§‹ã¾ã‚‹éšŽå±¤ãƒªã‚¹ãƒˆã‚’指定ã—ã¾ã™ã€‚ - - `DELETE FROM LIST` - `INSERT IN LIST` - `SELECT LIST ITEMS BY POSITION` @@ -66,19 +65,20 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) - `SET LIST ITEM ICON` - `SET LIST ITEM PARAMETER` - `SET LIST ITEM PROPERTIES` + - プロパティå–得用ã®ã‚³ãƒžãƒ³ãƒ‰ã«ãŠã„ã¦ã€ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯è©²å½“ã™ã‚‹åå‰ã‚’æŒã¤æœ€åˆã®ã‚ªãƒ–ジェクトを対象ã¨ã—ã¾ã™: - - `Count list items` - `Find in list` - `GET LIST ITEM` - - `Get list item font` - - `GET LIST ITEM ICON` - - `GET LIST ITEM PARAMETER` - - `GET LIST ITEM PROPERTIES` + - `Get list item font` + - `GET LIST ITEM ICON` + - `GET LIST ITEM PARAMETER` + - `GET LIST ITEM PROPERTIES` - `List item parent` - `List item position` - `Selected list items` + ## 階層リストã«å¯¾ã—利用ã§ãる汎用コマンド ã„ãã¤ã‹ã® 4Dã®æ±Žç”¨ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ã€ãƒ•ォーム上ã®éšŽå±¤ãƒªã‚¹ãƒˆã‚ªãƒ–ジェクトã®è¦‹ãŸç›®ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã«ã¯ã€* を用ã„ãŸã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦éšŽå±¤ãƒªã‚¹ãƒˆã®ã‚ªãƒ–ジェクトåを渡ã™ã‹ã€ã‚ã‚‹ã„ã¯æ¨™æº–シンタックスを使用ã—ã¦éšŽå±¤ãƒªã‚¹ãƒˆã® ListRef å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„る変数を渡ã—ã¾ã™ã€‚ @@ -105,6 +105,7 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) ã“ã®åŽŸå‰‡ã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãŒå‘¼ã³å‡ºã•れãŸé †ç•ªã«é–¢ä¿‚ãªãé©ç”¨ã•れã¾ã™ã€‚ 階層リストコマンドを使用ã—ã¦å€‹ã€…ã«é …ç›®ã®ãƒ—ロパティを変更ã™ã‚‹ã¨ã€åŒç­‰ã®ã‚ªãƒ–ジェクトプロパティコマンドをãã®ã‚ã¨ã«å‘¼ã³å‡ºã—ãŸã¨ã—ã¦ã‚‚ã€ãã®é …ç›®ã«å¯¾ã—ã¦ã¯åŠ¹æžœã‚’æŒãŸãªããªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã° `SET LIST ITEM PROPERTIES` コマンドを使用ã—ã¦é …ç›®ã®ã‚«ãƒ©ãƒ¼ã‚’変更ã™ã‚‹ã¨ã€ã“ã®é …ç›®ã«å¯¾ã—㦠`OBJECT SET COLOR` コマンドã¯åŠ¹æžœã‚’æŒãŸãªããªã‚Šã¾ã™ã€‚ + ## ä½ç½®ã‚ã‚‹ã„ã¯å‚ç…§ã«ã‚ˆã‚‹é …ç›®ã®ç®¡ç† 階層リストã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ã€é€šå¸¸ã¯ä½ç½®ã¾ãŸã¯å‚ç…§ã®ã„ãšã‚Œã‹ã‚’使用ã—ã¦ãŠã“ãªã„ã¾ã™ã€‚ @@ -112,6 +113,7 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) - ä½ç½®ã‚’使用ã™ã‚‹å ´åˆã«ã¯ã€4D ã¯ç”»é¢ä¸Šã«è¡¨ç¤ºã•れã¦ã„るリスト項目ã®ä½ç½®ã«åŸºã¥ã„ã¦é …目を特定ã—ã¾ã™ã€‚ ã¤ã¾ã‚Šã€çµæžœã¯éšŽå±¤é …ç›®ãŒå±•é–‹ã•れã¦ã„ã‚‹ã‹æŠ˜ã‚ŠãŸãŸã¾ã‚Œã¦ã„ã‚‹ã‹ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ 複数ã®ãƒ•ォームオブジェクトã§åŒä¸€ã®ãƒªã‚¹ãƒˆã‚’使用ã—ã¦ã„ã‚‹å ´åˆã€ã‚ªãƒ–ジェクトã”ã¨ã«å±•é–‹/折りãŸãŸã¿ã®çŠ¶æ…‹ãŒç•°ãªã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ - å‚照を使用ã™ã‚‹å ´åˆã«ã¯ã€ãƒªã‚¹ãƒˆé …目㮠*itemRef* IDã‚’å‚ç…§ã—ã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãれãžã‚Œã®é …目を階層リスト中ã§ã®ä½ç½®ã‚„表示状態ã«é–¢ã‚らãšç‰¹å®šã§ãã¾ã™ã€‚ + ### é …ç›®å‚照番å·ã‚’使用ã™ã‚‹ (itemRef) 階層リストã®ãれãžã‚Œã®é …ç›®ã¯å€é•·æ•´æ•°åž‹ã®å‚ç…§ç•ªå· (*itemRef*) ã‚’æŒã¡ã¾ã™ã€‚ ã“ã®å€¤ã¯é–‹ç™ºè€…ãŒä½¿ã†ãŸã‚ã®ã‚‚ã®ã§ã€4D ã¯ç•ªå·ã‚’ç¶­æŒã™ã‚‹ã ã‘ã§ã™ã€‚ @@ -122,14 +124,14 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) 1. 項目をユニーク値ã§è­˜åˆ¥ã™ã‚‹å¿…è¦ãŒãªã„å ´åˆ (åˆå¿ƒè€…レベル) -- 最åˆã®ä¾‹ã¨ã—ã¦ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ–ックã§ä½¿ç”¨ã™ã‚‹ã‚¿ãƒ–システムを構築ã™ã‚‹ã¨ã—ã¾ã™ã€‚ システムã¯é¸æŠžã•れãŸã‚¿ãƒ–ã®ç•ªå·ã‚’è¿”ã™ã®ã§ã€ãã‚Œä»¥ä¸Šã®æƒ…å ±ã¯å¿…è¦ã‚りã¾ã›ã‚“。 ã“ã®å ´åˆã€é …ç›®å‚照番å·ã«ã¤ã„ã¦å¿ƒé…ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。0以外ã®å€¤ã‚’ *itemRef* ã«æ¸¡ã—ã¾ã™ã€‚ ãªãŠã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ–ックシステムã®å ´åˆã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ A-Z ã®ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹ã“ã¨ã‚‚ã§ãる点ã«ç•™æ„ã—ã¦ãã ã•ã„。 ã¾ãŸã€ãƒ—ログラムを使ãˆã°ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãªã„文字を除ã„ãŸãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -- 2ã¤ç›®ã®ä¾‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’利用ã™ã‚‹ã¨åŒæ™‚ã«è“„ç©ã—ã¦ã„ãタイプã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã‚’考ãˆã¾ã™ã€‚ ã“ã®ãƒªã‚¹ãƒˆã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³çµ‚了時㫠`SAVE LIST` ã‚„ `LIST TO BLOB` コマンドã§ä¿å­˜ã•れã€ã‚»ãƒƒã‚·ãƒ§ãƒ³é–‹å§‹æ™‚ã« `Load list` ã‚„ `BLOB to list` コマンドã§å†åº¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ ã“ã®ãƒªã‚¹ãƒˆã‚’フローティングパレットã«è¡¨ç¤ºã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’クリックã™ã‚‹ã¨ã€æœ€å‰é¢ã®ãƒ—ロセスã®é¸æŠžã•れãŸã‚¨ãƒªã‚¢ã«é …ç›®ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ é‡è¦ãªã®ã¯ã€`Selected list items` コマンドã¯é¸æŠžé …ç›®ã®ä½ç½®ã‚’è¿”ã™ãŸã‚ã€é¸æŠžã•れãŸé …ç›®ã®ã¿ã‚’扱ã†ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã“ã®ä½ç½®æƒ…報を `GET LIST ITEM` ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã›ã°ã€é …目テキストãŒå–å¾—ã§ãã¾ã™ã€‚ ã“ã®ä¾‹ã§ã‚‚ã€å€‹ã€…ã®é …目を識別ã™ã‚‹å¿…è¦ãŒãªã„ãŸã‚ã€ãƒªã‚¹ãƒˆæ§‹ç¯‰ã®éš›ã¯ *itemRef* 引数㫠0以外ã®ä»»æ„ã®æ•°å€¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + - 最åˆã®ä¾‹ã¨ã—ã¦ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ–ックã§ä½¿ç”¨ã™ã‚‹ã‚¿ãƒ–システムを構築ã™ã‚‹ã¨ã—ã¾ã™ã€‚ システムã¯é¸æŠžã•れãŸã‚¿ãƒ–ã®ç•ªå·ã‚’è¿”ã™ã®ã§ã€ãã‚Œä»¥ä¸Šã®æƒ…å ±ã¯å¿…è¦ã‚りã¾ã›ã‚“。 ã“ã®å ´åˆã€é …ç›®å‚照番å·ã«ã¤ã„ã¦å¿ƒé…ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。0以外ã®å€¤ã‚’ *itemRef* ã«æ¸¡ã—ã¾ã™ã€‚ ãªãŠã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ–ックシステムã®å ´åˆã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ A-Z ã®ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹ã“ã¨ã‚‚ã§ãる点ã«ç•™æ„ã—ã¦ãã ã•ã„。 ã¾ãŸã€ãƒ—ログラムを使ãˆã°ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãªã„文字を除ã„ãŸãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + - 2ã¤ç›®ã®ä¾‹ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’利用ã™ã‚‹ã¨åŒæ™‚ã«è“„ç©ã—ã¦ã„ãタイプã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã‚’考ãˆã¾ã™ã€‚ ã“ã®ãƒªã‚¹ãƒˆã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³çµ‚了時㫠`SAVE LIST` ã‚„ `LIST TO BLOB` コマンドã§ä¿å­˜ã•れã€ã‚»ãƒƒã‚·ãƒ§ãƒ³é–‹å§‹æ™‚ã« `Load list` ã‚„ `BLOB to list` コマンドã§å†åº¦èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ ã“ã®ãƒªã‚¹ãƒˆã‚’フローティングパレットã«è¡¨ç¤ºã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’クリックã™ã‚‹ã¨ã€æœ€å‰é¢ã®ãƒ—ロセスã®é¸æŠžã•れãŸã‚¨ãƒªã‚¢ã«é …ç›®ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ é‡è¦ãªã®ã¯ã€`Selected list items` コマンドã¯é¸æŠžé …ç›®ã®ä½ç½®ã‚’è¿”ã™ãŸã‚ã€é¸æŠžã•れãŸé …ç›®ã®ã¿ã‚’扱ã†ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã“ã®ä½ç½®æƒ…報を `GET LIST ITEM` ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã›ã°ã€é …目テキストãŒå–å¾—ã§ãã¾ã™ã€‚ ã“ã®ä¾‹ã§ã‚‚ã€å€‹ã€…ã®é …目を識別ã™ã‚‹å¿…è¦ãŒãªã„ãŸã‚ã€ãƒªã‚¹ãƒˆæ§‹ç¯‰ã®éš›ã¯ *itemRef* 引数㫠0以外ã®ä»»æ„ã®æ•°å€¤ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 2. 部分的ã«ãƒªã‚¹ãƒˆé …目を識別ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆ (中級者レベル) - ãã®é …目を処ç†ã™ã‚‹éš›ã«å¿…è¦ã¨ãªã‚‹æƒ…報をã‚らã‹ã˜ã‚é …ç›®å‚照番å·ã«æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ä¾‹ã¯`APPEND TO LIST` コマンド㮠[例題](https://doc.4d.com/4Dv18/4D/18/APPEND-TO-LIST.301-4505733.ja.html#22281) ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ ã“ã®ä¾‹é¡Œã§ã¯ã€é …ç›®å‚照番å·ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ç•ªå·ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ ã¾ãŸã€[Department] レコード由æ¥ã®é …目㨠[Employees] レコード由æ¥ã®é …目を区別ã™ã‚‹å¿…è¦ãŒã‚りã€ã“ã®ç‚¹ã‚‚例題ã«ã¦èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ + ãã®é …目を処ç†ã™ã‚‹éš›ã«å¿…è¦ã¨ãªã‚‹æƒ…報をã‚らã‹ã˜ã‚é …ç›®å‚照番å·ã«æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ä¾‹ã¯`APPEND TO LIST` コマンド㮠[例題](https://doc.4d.com/4Dv18/4D/18/APPEND-TO-LIST.301-4505733.ja.html#22281) ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ ã“ã®ä¾‹é¡Œã§ã¯ã€é …ç›®å‚照番å·ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ç•ªå·ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ ã¾ãŸã€[Department] レコード由æ¥ã®é …目㨠[Employees] レコード由æ¥ã®é …目を区別ã™ã‚‹å¿…è¦ãŒã‚りã€ã“ã®ç‚¹ã‚‚例題ã«ã¦èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ 3. ã™ã¹ã¦ã®é …目リストを個々ã«è­˜åˆ¥ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆ (上級レベル) - リストã®å…¨ãƒ¬ãƒ™ãƒ«ã«ãŠã„ã¦ã€å€‹ã€…ã®é …目を識別ã™ã‚‹å¿…è¦ã®ã‚る複雑ãªéšŽå±¤ãƒªã‚¹ãƒˆç®¡ç†ãƒ—ログラムを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ ã“れを実装ã™ã‚‹ç°¡å˜ãªæ–¹æ³•ã¯ç‹¬è‡ªã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ `APPEND TO LIST` コマンドを使用ã—㦠*hlList* リストを作æˆã™ã‚‹ã¨ã—ã¾ã™ã€‚ ã“ã“ã§ *vhlCounter* 変数を1ã«åˆæœŸåŒ–ã—ã¾ã™ã€‚ `APPEND TO LIST` ã‚„ `INSERT IN LIST` を呼ã³å‡ºã™ãŸã³ã«ã€ã“ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’インクリメント㗠`(vhlCounter:=vhlCounter+1)`〠カウンター値を項目å‚照番å·ã«è¨­å®šã—ã¾ã™ã€‚ 項目を削除ã™ã‚‹å ´åˆã§ã‚‚カウンターをデクリメントã—ãªã„ã“ã¨ãŒé‡è¦ã§ã™ã€‚ã¤ã¾ã‚Šã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯å¢—ãˆç¶šã‘ã‚‹ã®ã¿ã§ã™ã€‚ ã“ã®æ–¹æ³•ã§ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªé …ç›®å‚照番å·ã‚’ä¿è¨¼ã§ãã¾ã™ã€‚ 番å·ã¯å€é•·æ•´æ•°åž‹ãªã®ã§ã€20億以上ã®é …目をリストã«è¿½åŠ ã—ãŸã‚ŠæŒ¿å…¥ã—ãŸã‚Šã§ãã¾ã™ (ã‚‚ã£ã¨ã‚‚ã€ã“ã‚“ãªã«ã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ã®ã§ã‚れã°ã€ãƒªã‚¹ãƒˆã§ã¯ãªãテーブルを使用ã—ãŸã»ã†ãŒè‰¯ã„ã§ã™ãŒ)。 + リストã®å…¨ãƒ¬ãƒ™ãƒ«ã«ãŠã„ã¦ã€å€‹ã€…ã®é …目を識別ã™ã‚‹å¿…è¦ã®ã‚る複雑ãªéšŽå±¤ãƒªã‚¹ãƒˆç®¡ç†ãƒ—ログラムを作æˆã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã¨ã—ã¾ã™ã€‚ ã“れを実装ã™ã‚‹ç°¡å˜ãªæ–¹æ³•ã¯ç‹¬è‡ªã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã™ã€‚ `APPEND TO LIST` コマンドを使用ã—㦠*hlList* リストを作æˆã™ã‚‹ã¨ã—ã¾ã™ã€‚ ã“ã“ã§ *vhlCounter* 変数を1ã«åˆæœŸåŒ–ã—ã¾ã™ã€‚ `APPEND TO LIST` ã‚„ `INSERT IN LIST` を呼ã³å‡ºã™ãŸã³ã«ã€ã“ã®ã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã‚’インクリメント㗠`(vhlCounter:=vhlCounter+1)`〠カウンター値を項目å‚照番å·ã«è¨­å®šã—ã¾ã™ã€‚ 項目を削除ã™ã‚‹å ´åˆã§ã‚‚カウンターをデクリメントã—ãªã„ã“ã¨ãŒé‡è¦ã§ã™ã€‚ã¤ã¾ã‚Šã‚«ã‚¦ãƒ³ã‚¿ãƒ¼ã¯å¢—ãˆç¶šã‘ã‚‹ã®ã¿ã§ã™ã€‚ ã“ã®æ–¹æ³•ã§ã€ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªé …ç›®å‚照番å·ã‚’ä¿è¨¼ã§ãã¾ã™ã€‚ 番å·ã¯å€é•·æ•´æ•°åž‹ãªã®ã§ã€20億以上ã®é …目をリストã«è¿½åŠ ã—ãŸã‚ŠæŒ¿å…¥ã—ãŸã‚Šã§ãã¾ã™ (ã‚‚ã£ã¨ã‚‚ã€ã“ã‚“ãªã«ã‚‚多ãã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ã†ã®ã§ã‚れã°ã€ãƒªã‚¹ãƒˆã§ã¯ãªãテーブルを使用ã—ãŸã»ã†ãŒè‰¯ã„ã§ã™ãŒ)。 > ビットワイズ演算å­ã‚’使用ã—ã¦ã€é …ç›®å‚照番å·ã«æƒ…報を格ç´ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãŸã¨ãˆã° 2ã¤ã®æ•´æ•°å€¤ã€4ãƒã‚¤ãƒˆå€¤ã€32個ã®ãƒ–ール値ãªã©ã§ã™ã€‚ @@ -139,6 +141,7 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) 基本的ã«ã€é …ç›®ã®é¸æŠžã«é–¢ä¿‚ãªãã€ãƒ—ログラムã§ä»»æ„ã®ãƒªã‚¹ãƒˆé …ç›®ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã«é …ç›®å‚照番å·ãŒå¿…è¦ã§ã™ã€‚ + ## 編集å¯èƒ½é …ç›® ユーザーãŒéšŽå±¤ãƒªã‚¹ãƒˆã®é …目を変更ã§ãã‚‹ã‹ã©ã†ã‹ã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚階層リストã®é …ç›®ãŒä¿®æ­£å¯èƒ½ã§ã‚ã‚‹å ´åˆã€**Alt+クリック** (Windows) ã¾ãŸã¯ **Optionキー+クリック** (macOS) ショートカットを使用ã™ã‚‹ã‹ã€ã¾ãŸã¯é …ç›®ã®ãƒ†ã‚­ã‚¹ãƒˆä¸Šã§ãƒ­ãƒ³ã‚°ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ç·¨é›†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ @@ -147,6 +150,7 @@ SET LIST ITEM FONT(*;"mylist1";*;thefont) - ã¾ãŸã€ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ä½œæˆã—ãŸãƒªã‚¹ãƒˆã‚’用ã„ã¦éšŽå±¤ãƒªã‚¹ãƒˆã‚’生æˆã™ã‚‹å ´åˆã¯ã€ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã® **編集å¯èƒ½é …ç›®** オプションを使用ã—ã¦ã€éšŽå±¤ãƒªã‚¹ãƒˆã®é …ç›®ã®ä¿®æ­£ãŒå¯èƒ½ã‹ã©ã†ã‹ã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [リストプロパティã®è¨­å®š](https://doc.4d.com/4Dv18/4D/18/Setting-list-properties.300-4575487.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + ## プロパティ一覧 -[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å·¦](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_Entry.md#フォーカスå¯) - [入力フィルター](properties_Entry.md#入力フィルター) - [表示状態](properties_Display.md#表示状態) - [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) - [横スクロールãƒãƒ¼](properties_Appearance.md#横スクロールãƒãƒ¼) - [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [ドラッグ有効](properties_Action.md#ドラッグ有効) - [ドロップ有効](properties_Action.md#ドロップ有効) - [è¤‡æ•°é¸æŠžå¯](properties_Action.md#è¤‡æ•°é¸æŠžå¯) \ No newline at end of file +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å·¦](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_Entry.md#フォーカスå¯) - [入力フィルター](properties_Entry.md#入力フィルター) - [表示状態](properties_Display.md#表示状態) - [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) - [横スクロールãƒãƒ¼](properties_Appearance.md#横スクロールãƒãƒ¼) - [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [ドラッグ有効](properties_Action.md#ドラッグ有効) - [ドロップ有効](properties_Action.md#ドロップ有効) - [è¤‡æ•°é¸æŠžå¯](properties_Action.md#è¤‡æ•°é¸æŠžå¯) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/listbox_overview.md b/website/translated_docs/ja/FormObjects/listbox_overview.md index 30e74e3afe2e43..717869b489e6a3 100644 --- a/website/translated_docs/ja/FormObjects/listbox_overview.md +++ b/website/translated_docs/ja/FormObjects/listbox_overview.md @@ -3,7 +3,6 @@ id: listboxOverview title: リストボックス --- -## æ¦‚è¦ ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯è¤‡åˆã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã§ã€åŒæœŸåŒ–ã•れãŸè¤‡æ•°åˆ— (カラムã¨ã‚‚呼ã³ã¾ã™) ã®å½¢å¼ã§ãƒ‡ãƒ¼ã‚¿ã®è¡¨ç¤ºãƒ»å…¥åŠ›ãŒãŠã“ãªãˆã¾ã™ã€‚ リストボックスã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„レコードセレクションãªã©ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã»ã‹ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„é…列ãªã©ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¨ç´ã¥ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ データ入力ã€åˆ—ã®ä¸¦ã¹æ›¿ãˆã€ã‚¤ãƒ™ãƒ³ãƒˆç®¡ç†ã€å¤–観ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã€ 列ã®ç§»å‹•ãªã©ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã¯é«˜åº¦ãªæ©Ÿèƒ½ãŒå‚™ã‚ã£ã¦ã„ã¾ã™ã€‚ @@ -11,6 +10,8 @@ title: リストボックス リストボックスã«ã¯ 1ã¤ä»¥ä¸Šã®åˆ—ãŒã‚りã€ãã®å†…容ãŒè‡ªå‹•çš„ã«åŒæœŸåŒ–ã•れã¾ã™ã€‚ ç†è«–上ã€åˆ—æ•°ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“ (マシンã®ãƒªã‚½ãƒ¼ã‚¹ã«ä¾å­˜ã—ã¾ã™)。 +## æ¦‚è¦ + ### 基本ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼æ©Ÿèƒ½ 実行中ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ãƒªã‚¹ãƒˆã¨ã—ã¦ãƒ‡ãƒ¼ã‚¿ã‚’表示ã—ã€å…¥åŠ›ã‚’å—ã‘付ã‘ã¾ã™ã€‚ セルを編集å¯èƒ½ã«ã™ã‚‹ã«ã¯ ([ãã®åˆ—ã«ã¤ã„ã¦å…¥åŠ›ãŒè¨±å¯ã•れã¦ã„れã°](#入力ã®ç®¡ç†))ã€ã‚»ãƒ«ä¸Šã§2回クリックã—ã¾ã™: @@ -25,14 +26,15 @@ title: リストボックス ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ¨™æº–ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’使用ã—㦠1ã¤ä»¥ä¸Šã®è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚**Shift+クリック** ã§é€£ç¶šã—ãŸè¡Œã‚’ã€**Ctrl+クリック** (Windows) ã‚„ **Command+クリック** (macOS) ã§éžé€£ç¶šè¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ + ### ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®æ§‹æˆè¦ç´  リストボックスオブジェクトã¯ã€ä»¥ä¸‹4ã¤ã®é …ç›®ã§æ§‹æˆã•れã¾ã™: -* リストボックスオブジェクトã®å…¨ä½“ -* 列 -* 列ヘッダー -* 列フッター +* リストボックスオブジェクトã®å…¨ä½“ +* 列 +* 列ヘッダー +* 列フッター ![](assets/en/FormObjects/listbox_parts.png) @@ -45,46 +47,51 @@ title: リストボックス [ヘッダー](#リストボックスヘッダー) 㨠[フッター](#リストボックスフッター) ã§ç™ºç”Ÿã—ãŸã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ãã®åˆ—ã®ã‚ªãƒ–ジェクトメソッドãŒå—ã‘å–りã¾ã™ã€‚ + + ### リストボックスã®åž‹ リストボックスã«ã¯è¤‡æ•°ã®ã‚¿ã‚¤ãƒ—ãŒã‚りã€å‹•作やプロパティã®ç‚¹ã§ç•°ãªã‚Šã¾ã™ã€‚ リストボックスã®åž‹ã¯ [データソースプロパティ](properties_Object.md#データソース) ã§å®šç¾©ã—ã¾ã™: -- **é…列**: å„列㫠4D é…列を割り当ã¦ã¾ã™ã€‚ é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ [階層リストボックス](listbox_overview.md#階層リストボックス) ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **é…列**: å„列㫠4D é…列を割り当ã¦ã¾ã™ã€‚ é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ [階層リストボックス](listbox_overview.md#階層リストボックス) ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - **セレクション** (**カレントセレクション** ã¾ãŸã¯ **命åセレクション**): å„列ã«å¼ (ãŸã¨ãˆã°ãƒ•ィールド) を割り当ã¦ã¾ã™ã€‚ãれãžã‚Œã®è¡Œã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’基ã«è©•価ã•れã¾ã™ã€‚ -- **コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³**: å„列ã«å¼ã‚’割り当ã¦ã¾ã™ã€‚å„行ã®ä¸­èº«ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã”ã¨ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã”ã¨ã«è©•価ã•れã¾ã™ã€‚ - +- **コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³**: å„列ã«å¼ã‚’割り当ã¦ã¾ã™ã€‚å„行ã®ä¸­èº«ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ ã”ã¨ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã”ã¨ã«è©•価ã•れã¾ã™ã€‚ > 1ã¤ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã«è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ—を組ã¿åˆã‚ã›ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 データソースã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä½œæˆæ™‚ã«å®šç¾©ã•れ〠プログラムã«ã‚ˆã£ã¦å¾Œã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + ### リストボックスã®ç®¡ç† リストボックスオブジェクトã¯ãƒ—ロパティã«ã‚ˆã£ã¦ã‚らã‹ã˜ã‚設定å¯èƒ½ãªã»ã‹ã€ãƒ—ログラムã«ã‚ˆã‚Šå‹•çš„ã«ç®¡ç†ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 4D ランゲージã«ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹é–¢é€£ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ã¾ã¨ã‚㟠"リストボックス" テーマãŒå°‚用ã«è¨­ã‘られã¦ã„ã¾ã™ãŒã€"オブジェクトプロパティ" コマンドや `EDIT ITEM`ã€`Displayed line number` コマンドãªã©ã€ã»ã‹ã®ãƒ†ãƒ¼ãƒžã®ã‚³ãƒžãƒ³ãƒ‰ã‚‚利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ *4D ランゲージリファレンスマニュアル* ã®[リストボックスコマンド一覧](https://doc.4d.com/4Dv18/4D/18/List-Box-Commands-Summary.300-4505230.ja.html)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + ## リストボックスオブジェクト ### é…列リストボックス é…列リストボックスã§ã¯ã€ãれãžã‚Œã®åˆ—ã« 4D ã® 1次元é…列を割り当ã¦ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãƒã‚¤ãƒ³ã‚¿ãƒ¼é…列を除ãã™ã¹ã¦ã®ã‚¿ã‚¤ãƒ—ã®é…列を使用ã§ãã¾ ã™ã€‚ 行数ã¯é…列ã®è¦ç´ æ•°ã«ã‚ˆã‚Šæ±ºå®šã•れã¾ã™ã€‚ -デフォルト㧠4D ã¯å„列㫠“ColumnX†ã¨ã„ã†åå‰ã®é…列変数を割り当ã¦ã¾ã™ã€‚ ã“ã®é…列変数å㯠[列ã®ãƒ—ロパティ](listbox_overview.md#列特有ã®ãƒ—ロパティ) ã§å¤‰æ›´ã§ãã¾ã™ã€‚ 列ã”ã¨ã®è¡¨ç¤ºãƒ•ォーマットを指定ã™ã‚‹ã«ã¯ã€`OBJECT SET FORMAT` コマンドも使用ã§ãã¾ã™ã€‚ - +デフォルト㧠4D ã¯å„列㫠“ColumnX†ã¨ã„ã†åå‰ã‚’割り当ã¦ã¾ã™ã€‚ ã“ã®é…列変数å㯠[列ã®ãƒ—ロパティ](listbox_overview.md#列特有ã®ãƒ—ロパティ) ã§å¤‰æ›´ã§ãã¾ã™ (プロパティリスト㮠[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) プロパティを使用ã—ã¾ã™)。 列ã”ã¨ã®è¡¨ç¤ºãƒ•ォーマットを指定ã™ã‚‹ã«ã¯ã€`OBJECT SET FORMAT` コマンドも使用ã§ãã¾ã™ã€‚ > é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ã€ç‰¹åˆ¥ãªãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’も㤠[階層モード](listbox_overview.md#階層リストボックス) ã§è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã€å…¥åŠ›ã‚ã‚‹ã„ã¯è¡¨ç¤ºã•れる値㯠4Dランゲージã§åˆ¶å¾¡ã—ã¾ã™ã€‚ 列㫠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) を割り当ã¦ã¦ã€ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’åˆ¶å¾¡ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ リストボックスã®ãƒã‚¤ãƒ¬ãƒ™ãƒ«ã‚³ãƒžãƒ³ãƒ‰ (`LISTBOX INSERT ROWS` ã‚„ `LISTBOX DELETE ROWS` ç­‰) ã‚„é…列æ“作コマンドを使用ã—ã¦ã€åˆ—ã®å€¤ã‚’管ç†ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€åˆ—ã®å†…å®¹ã‚’åˆæœŸåŒ–ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®å‘½ä»¤ã‚’使用ã§ãã¾ã™: ```4d -ARRAY TEXT(ColumnName;size) +ARRAY TEXT(varCol;size) ``` リストを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: ```4d -LIST TO ARRAY("ListName";ColumnName) +LIST TO ARRAY("ListName";varCol) ``` - > **警告**: ç•°ãªã‚‹é…列サイズã®åˆ—ãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å«ã¾ã‚Œã‚‹å ´åˆã€ã‚‚ã£ã¨ã‚‚å°ã•ã„é…åˆ—ã‚µã‚¤ã‚ºã®æ•°ã ã‘を表示ã—ã¾ã™ã€‚ ãã®ãŸã‚ã€å„é…列ã®è¦ç´ æ•°ã¯åŒã˜ã«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 リストボックスã®åˆ—ãŒä¸€ã¤ã§ã‚‚空ã®å ´åˆ (ランゲージã«ã‚ˆã‚Šé…åˆ—ãŒæ­£ã—ã定義ã¾ãŸã¯ã‚µã‚¤ã‚ºè¨­å®šã•れãªã‹ã£ãŸã¨ãã«ç™ºç”Ÿã—ã¾ã™)ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ä½•も表示ã—ã¾ã›ã‚“。 + + + ### セレクションリストボックス ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã€åˆ—ã”ã¨ã«ãƒ•ィールド (例: `[Employees]LastName`) ã‚„å¼ã‚’割り当ã¦ã¾ã™ã€‚ å¼ã¯ 1ã¤ä»¥ä¸Šã®ãƒ•ィールド (ãŸã¨ãˆã° `[Employees]FirstName+“ â€[Employees]LastName`) ã¾ãŸã¯å˜ã«ãƒ•ォーミュラ (ãŸã¨ãˆã° `String(Milliseconds)`) を使用ã§ãã¾ã™ã€‚ å¼ã«ã¯ãƒ—ロジェクトメソッドã€å¤‰æ•°ã€ã‚ã‚‹ã„ã¯é…列項目も指定ã§ãã¾ã™ã€‚ カラムをプログラムã§å¤‰æ›´ã™ã‚‹ã«ã¯ã€`LISTBOX SET COLUMN FORMULA` ãŠã‚ˆã³ `LISTBOX INSERT COLUMN FORMULA` コマンドを使用ã—ã¾ã™ã€‚ @@ -93,6 +100,7 @@ LIST TO ARRAY("ListName";ColumnName) デー タソースãŒã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã‚‹å ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸå¤‰æ›´ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è‡ªå‹•ã§å映ã•れã€ã¾ãŸãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¸ã®å¤‰æ›´ã‚‚自動㧠データベースã«é©ç”¨ã•れã¾ã™ã€‚ ã¤ã¾ã‚Šã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å¸¸ã«ä¸¡æ–¹ã§åŒã˜ã§ã™ã€‚ + ### コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã€å„カラムã«å¼ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ å„行ã®ä¸­èº«ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã”ã¨ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã”ã¨ã«è©•価ã•れã¾ã™ã€‚ @@ -107,230 +115,155 @@ LIST TO ARRAY("ListName";ColumnName) myCol:=myCol.push("new value") // リストボックス㫠new value を表示 ``` -### プロパティ一覧 - -æä¾›ã•れるプロパティã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒ—ã«ä¾å­˜ã—ã¾ã™ã€‚ - -| プロパティ | é…列リストボックス | セレクションリストボックス | コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ | -| ---------------------------------------------------------------------------- | --------- | ------------- | ---------------------------- | -| [交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²](properties_BackgroundAndBorder.md#alternate-background-color) | â—‹ | â—‹ | â—‹ | -| [背景色](properties_BackgroundAndBorder.md#background-color) | â—‹ | â—‹ | â—‹ | -| [太字](properties_Text.md#bold) | â—‹ | â—‹ | â—‹ | -| [背景色å¼](properties_BackgroundAndBorder.md#background-color-expression) | | â—‹ | â—‹ | -| [境界線スタイル](properties_BackgroundAndBorder.md#border-line-style) | â—‹ | â—‹ | â—‹ | -| [下](properties_CoordinatesAndSizing.md#bottom) | â—‹ | â—‹ | â—‹ | -| [クラス](properties_Object.md#css-class) | â—‹ | â—‹ | â—‹ | -| [コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](properties_Object.md#collection-or-entity-selection) | | â—‹ | â—‹ | -| [カラム自動リサイズ](properties_ResizingOptions.md#column-auto-resizing) | â—‹ | â—‹ | â—‹ | -| [カレントã®é …ç›®](properties_DataSource.md#current-item) | | | â—‹ | -| [カレントã®é …ç›®ã®ä½ç½®](properties_DataSource.md#current-item-position) | | | â—‹ | -| [データソース](properties_Object.md#data-source) | â—‹ | â—‹ | â—‹ | -| [詳細フォームå](properties_ListBox.md#detail-form-name) | | â—‹ | | -| [ヘッダーを表示](properties_Headers.md#display-headers) | â—‹ | â—‹ | â—‹ | -| [フッターを表示](properties_Footers.md#display-footers) | â—‹ | â—‹ | â—‹ | -| [行をダブルクリック](properties_ListBox.md#double-click-on-row) | | â—‹ | | -| [ドラッグ有効](properties_Action.md#droppable) | â—‹ | â—‹ | â—‹ | -| [ドロップ有効](properties_Action.md#droppable) | â—‹ | â—‹ | â—‹ | -| [フォーカスå¯](properties_Entry.md#focusable) | â—‹ | â—‹ | â—‹ | -| [フォント](properties_Text.md#font) | â—‹ | â—‹ | â—‹ | -| [フォントカラー](properties_Text.md#font_color) | â—‹ | â—‹ | â—‹ | -| [フォントカラーå¼](properties_Text.md#font-color-expression) | | â—‹ | â—‹ | -| [フォントサイズ](properties_Text.md#font-size) | â—‹ | â—‹ | â—‹ | -| [高㕠(リストボックス)](properties_CoordinatesAndSizing.md#height) | â—‹ | â—‹ | â—‹ | -| [高㕠(ヘッダー)](properties_Headers.md#height) | â—‹ | â—‹ | â—‹ | -| [高㕠(フッター)](properties_Footers.md#height) | â—‹ | â—‹ | â—‹ | -| [追加ã®ç©ºç™½ã®è¡Œã‚’éžè¡¨ç¤º](properties_BackgroundAndBorder.md#hide-extra-blank-rows) | â—‹ | â—‹ | â—‹ | -| [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#hide-focus-rectangle) | â—‹ | â—‹ | â—‹ | -| [セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º](properties_Appearance.md#hide-selection-highlight) | â—‹ | â—‹ | â—‹ | -| [階層リストボックス](properties_Object.md#hierarchical-list-box) | â—‹ | | | -| [ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ](properties_ListBox.md#highlight-set) | | â—‹ | | -| [横æƒãˆ](properties_Text.md#horizontal-alignment) | â—‹ | â—‹ | â—‹ | -| [横線カラー](properties_Gridlines.md#horizontal-line-color) | â—‹ | â—‹ | â—‹ | -| [横スクロールãƒãƒ¼](properties_Appearance.md#horizontal-scroll-bar) | â—‹ | â—‹ | â—‹ | -| [横方å‘サイズ変更](properties_ResizingOptions.md#horizontal-sizing) | â—‹ | â—‹ | â—‹ | -| [イタリック](properties_Text.md#italic) | â—‹ | â—‹ | â—‹ | -| [å·¦](properties_CoordinatesAndSizing.md#left) | â—‹ | â—‹ | â—‹ | -| [マスターテーブル](properties_DataSource.md#table) | | â—‹ | | -| [メタ情報å¼](properties_Text.md#meta-info-expression) | | | â—‹ | -| [メソッド](properties_Action.md#method) | â—‹ | â—‹ | â—‹ | -| [行ã®ç§»å‹•å¯](properties_Action.md#movable-rows) | â—‹ | | | -| [命åセレクション](properties_DataSource.md#selectionName) | | â—‹ | | -| [列数](properties_ListBox.md#number-of-columns) | â—‹ | â—‹ | â—‹ | -| [スクロールã—ãªã„列数](properties_ListBox.md#number-of-locked-columns) | â—‹ | â—‹ | â—‹ | -| [ドラッグã—ãªã„列数](properties_ListBox.md#number-of-static-columns) | â—‹ | â—‹ | â—‹ | -| [オブジェクトå](properties_Object.md#object-name) | â—‹ | â—‹ | â—‹ | -| [å³](properties_CoordinatesAndSizing.md#right) | â—‹ | â—‹ | â—‹ | -| [行背景色é…列](properties_BackgroundAndBorder.md#row-background-color-array) | â—‹ | | | -| [行コントロールé…列](properties_ListBox.md#row-control-array) | â—‹ | | | -| [行フォントカラーé…列](properties_Text.md#row-font-color-array) | â—‹ | | | -| [行ã®é«˜ã•](properties_CoordinatesAndSizing.md#row-height) | â—‹ | | | -| [行高ã•é…列](properties_CoordinatesAndSizing.md#row-height-array) | â—‹ | | | -| [行スタイルé…列](properties_Text.md#row-style-array) | â—‹ | | | -| [é¸æŠžã•れãŸé …ç›®](properties_DataSource.md#selected-items) | | | â—‹ | -| [é¸æŠžãƒ¢ãƒ¼ãƒ‰](properties_ListBox.md#selection-mode) | â—‹ | â—‹ | â—‹ | -| [シングルクリック編集](properties_Entry.md#single-click-edit) | â—‹ | â—‹ | â—‹ | -| [ソートå¯](properties_Action.md#sortable) | â—‹ | â—‹ | â—‹ | -| [標準アクション](properties_Action.md#standard-action) | â—‹ | | | -| [スタイルå¼](properties_Text.md#style-expression) | | â—‹ | â—‹ | -| [上](properties_CoordinatesAndSizing.md#top) | â—‹ | â—‹ | â—‹ | -| [é€éŽ](properties_BackgroundAndBorder.md#transparent) | â—‹ | â—‹ | â—‹ | -| [åž‹](properties_Object.md#type) | â—‹ | â—‹ | â—‹ | -| [下線](properties_Text.md#underline) | â—‹ | â—‹ | â—‹ | -| [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#variable-or-expression) | â—‹ | â—‹ | | -| [縦æƒãˆ](properties_Text.md#vertical-alignment) | â—‹ | â—‹ | â—‹ | -| [縦線カラー](properties_Gridlines.md#vertical-line-color) | â—‹ | â—‹ | â—‹ | -| [縦スクロールãƒãƒ¼](properties_Appearance.md#vertical-scroll-bar) | â—‹ | â—‹ | â—‹ | -| [縦方å‘サイズ変更](properties_ResizingOptions.md#vertical-sizing) | â—‹ | â—‹ | â—‹ | -| [表示状態](properties_Display.md#visibility) | â—‹ | â—‹ | â—‹ | -| [å¹…](properties_CoordinatesAndSizing.md#width) | â—‹ | â—‹ | â—‹ | - - -> リストボックスã®åˆ—ã€ãƒ˜ãƒƒãƒ€ãƒ¼ãŠã‚ˆã³ãƒ•ッターã«ã‚‚ãれãžã‚Œå›ºæœ‰ã®ãƒ—ロパティãŒã‚りã¾ã™ã€‚ - -### フォームイベント - - - - - - - - - - - - - - - - - - +### プロパティ一覧 +æä¾›ã•れるプロパティã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒ—ã«ä¾å­˜ã—ã¾ã™ã€‚ +| プロパティ | é…列リストボックス | セレクションリストボックス | コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ | +| ------------------------------------------------------------------- | --------- | ------------- | ---------------------------- | +| [交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²](properties_BackgroundAndBorder.md#交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²) | â—‹ | â—‹ | â—‹ | +| [背景色](properties_BackgroundAndBorder.md#背景色-塗りカラー) | â—‹ | â—‹ | â—‹ | +| [太字](properties_Text.md#太字) | â—‹ | â—‹ | â—‹ | +| [背景色å¼](properties_BackgroundAndBorder.md#背景色å¼) | | â—‹ | â—‹ | +| [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) | â—‹ | â—‹ | â—‹ | +| [下](properties_CoordinatesAndSizing.md#下) | â—‹ | â—‹ | â—‹ | +| [クラス](properties_Object.md#CSSクラス) | â—‹ | â—‹ | â—‹ | +| [コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](properties_Object.md#コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) | | â—‹ | â—‹ | +| [カラム自動リサイズ](properties_ResizingOptions.md#カラム自動リサイズ) | â—‹ | â—‹ | â—‹ | +| [カレントã®é …ç›®](properties_DataSource.md#カレントã®é …ç›®) | | | â—‹ | +| [カレントã®é …ç›®ã®ä½ç½®](properties_DataSource.md#カレントã®é …ç›®ã®ä½ç½®) | | | â—‹ | +| [データソース](properties_Object.md#データソース) | â—‹ | â—‹ | â—‹ | +| [詳細フォームå](properties_ListBox.md#詳細フォームå) | | â—‹ | | +| [ヘッダーを表示](properties_Headers.md#ヘッダーを表示) | â—‹ | â—‹ | â—‹ | +| [フッターを表示](properties_Headers.md#フッターを表示) | â—‹ | â—‹ | â—‹ | +| [行をダブルクリック](properties_ListBox.md#行をダブルクリック) | | â—‹ | | +| [ドラッグ有効](properties_Action.md#ドラッグ有効) | â—‹ | â—‹ | â—‹ | +| [ドロップ有効](properties_Action.md#ドラッグ有効) | â—‹ | â—‹ | â—‹ | +| [フォーカスå¯](properties_Entry.md#フォーカスå¯) | â—‹ | â—‹ | â—‹ | +| [フォント](properties_Text.md#フォント) | â—‹ | â—‹ | â—‹ | +| [フォントカラー](properties_Text.md#フォントカラー) | â—‹ | â—‹ | â—‹ | +| [フォントカラーå¼](properties_Text.md#フォントカラーå¼) | | â—‹ | â—‹ | +| [フォントサイズ](properties_Text.md#フォントサイズ) | â—‹ | â—‹ | â—‹ | +| [高㕠(リストボックス)](properties_CoordinatesAndSizing.md#高ã•) | â—‹ | â—‹ | â—‹ | +| [高㕠(ヘッダー)](properties_Headers.md#高ã•) | â—‹ | â—‹ | â—‹ | +| [高㕠(フッター)](properties_Footers.md#高ã•) | â—‹ | â—‹ | â—‹ | +| [追加ã®ç©ºç™½ã®è¡Œã‚’éžè¡¨ç¤º](properties_BackgroundAndBorder.md#追加ã®ç©ºç™½ã®è¡Œã‚’éžè¡¨ç¤º) | â—‹ | â—‹ | â—‹ | +| [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) | â—‹ | â—‹ | â—‹ | +| [セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º](properties_Appearance.md#セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º) | â—‹ | â—‹ | â—‹ | +| [階層リストボックス](properties_Object.md#階層リストボックス) | â—‹ | | | +| [ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ](properties_ListBox.md#ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ) | | â—‹ | | +| [横æƒãˆ](properties_Text.md#横æƒãˆ) | â—‹ | â—‹ | â—‹ | +| [横線カラー](properties_Gridlines.md#横線カラー) | â—‹ | â—‹ | â—‹ | +| [横スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) | â—‹ | â—‹ | â—‹ | +| [横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) | â—‹ | â—‹ | â—‹ | +| [イタリック](properties_Text.md#イタリック) | â—‹ | â—‹ | â—‹ | +| [å·¦](properties_CoordinatesAndSizing.md#å·¦) | â—‹ | â—‹ | â—‹ | +| [マスターテーブル](properties_DataSource.md#マスターテーブル) | | â—‹ | | +| [メタ情報å¼](properties_Text.md#メタ情報å¼) | | | â—‹ | +| [メソッド](properties_Action.md#メソッド) | â—‹ | â—‹ | â—‹ | +| [行ã®ç§»å‹•å¯](properties_Action.md#行ã®ç§»å‹•å¯) | â—‹ | | | +| [命åセレクション](properties_DataSource.md#命åセレクション) | | â—‹ | | +| [列数](properties_ListBox.md#列数) | â—‹ | â—‹ | â—‹ | +| [スクロールã—ãªã„列数](properties_ListBox.md#スクロールã—ãªã„列数) | â—‹ | â—‹ | â—‹ | +| [ドラッグã—ãªã„列数](properties_ListBox.md#スクロールã—ãªã„列数) | â—‹ | â—‹ | â—‹ | +| [オブジェクトå](properties_Object.md#オブジェクトå) | â—‹ | â—‹ | â—‹ | +| [å³](properties_CoordinatesAndSizing.md#å³) | â—‹ | â—‹ | â—‹ | +| [行背景色é…列](properties_BackgroundAndBorder.md#行背景色é…列) | â—‹ | | | +| [行コントロールé…列](properties_ListBox.md#行コントロールé…列) | â—‹ | | | +| [行フォントカラーé…列](properties_Text.md#行フォントカラーå¼) | â—‹ | | | +| [行ã®é«˜ã•](properties_CoordinatesAndSizing.md#行ã®é«˜ã•) | â—‹ | | | +| [行高ã•é…列](properties_CoordinatesAndSizing.md#行高ã•é…列) | â—‹ | | | +| [行スタイルé…列](properties_Text.md#行スタイルé…列) | â—‹ | | | +| [é¸æŠžã•れãŸé …ç›®](properties_DataSource.md#é¸æŠžã•れãŸé …ç›®) | | | â—‹ | +| [é¸æŠžãƒ¢ãƒ¼ãƒ‰](properties_ListBox.md#é¸æŠžãƒ¢ãƒ¼ãƒ‰) | â—‹ | â—‹ | â—‹ | +| [シングルクリック編集](properties_Entry.md#シングルクリック編集) | â—‹ | â—‹ | â—‹ | +| [ソートå¯](properties_Action.md#ソートå¯) | â—‹ | â—‹ | â—‹ | +| [標準アクション](properties_Action.md#標準アクション) | â—‹ | | | +| [スタイルå¼](properties_Text.md#スタイルå¼) | | â—‹ | â—‹ | +| [上](properties_CoordinatesAndSizing.md#上) | â—‹ | â—‹ | â—‹ | +| [é€éŽ](properties_BackgroundAndBorder.md#é€éŽ) | â—‹ | â—‹ | â—‹ | +| [タイプ](properties_Object.md#タイプ) | â—‹ | â—‹ | â—‹ | +| [下線](properties_Text.md#下線) | â—‹ | â—‹ | â—‹ | +| [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) | â—‹ | â—‹ | | +| [縦æƒãˆ](properties_Text.md#縦æƒãˆ) | â—‹ | â—‹ | â—‹ | +| [縦線カラー](properties_Gridlines.md#縦線カラー) | â—‹ | â—‹ | â—‹ | +| [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) | â—‹ | â—‹ | â—‹ | +| [縦方å‘サイズ変更](properties_ResizingOptions.md#縦方å‘サイズ変更) | â—‹ | â—‹ | â—‹ | +| [表示状態](properties_Display.md#表示状態) | â—‹ | â—‹ | â—‹ | +| [å¹…](properties_CoordinatesAndSizing.md#å¹…) | â—‹ | â—‹ | â—‹ | +> リストボックスã®åˆ—ã€ãƒ˜ãƒƒãƒ€ãƒ¼ãŠã‚ˆã³ãƒ•ッターã«ã‚‚ãれãžã‚Œå›ºæœ‰ã®ãƒ—ロパティãŒã‚りã¾ã™ã€‚ +### フォームイベント -| フォームイベント | å–å¾—ã•れる追加プロパティ (メインプロパティã«ã¤ã„ã¦ã¯[Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.ja.html) å‚ç…§) | コメント | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *複åˆãƒ•ォーミュラã¯ã‚½ãƒ¼ãƒˆä¸å¯ -(例: This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *é…列リストボックスã®ã¿* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Close Detail | - [row](#additional-properties) | *カレントセレクション&命åセレクションリストボックスã®ã¿* | -| On Collapse | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *階層リストボックスã®ã¿* | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Delete Action | - [row](#additional-properties) | | -| On Display Detail | - [isRowSelected](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Expand | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *階層リストボックスã®ã¿* | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *é…列ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³&命åセレクションリストボックスã®ã¿* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†æ™‚ã®ã¿* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†å®Œäº†æ™‚ã®ã¿* | -| On Mouse Enter | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Mouse Leave | | | -| On Mouse Move | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Open Detail | - [row](#additional-properties) | *カレントセレクション&命åセレクションリストボックスã®ã¿* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *é…列リストボックスã®ã¿* | -| On Selection Change | | | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +| フォームイベント | å–å¾—ã•れる追加プロパティ (メインプロパティã«ã¤ã„ã¦ã¯[Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.ja.html) å‚ç…§) | コメント | +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| On After Edit |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On After Keystroke |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On After Sort |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [headerName](#追加プロパティ)
        • | *複åˆãƒ•ォーミュラã¯ã‚½ãƒ¼ãƒˆä¸å¯
          (例: This.firstName + This.lastName)* | +| On Alternative Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *é…列リストボックスã®ã¿* | +| On Before Data Entry |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Before Keystroke |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Begin Drag Over |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Clicked |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Close Detail |
        • [row](#追加プロパティ)
        • | *カレントセレクション&命åセレクションリストボックスã®ã¿* | +| On Collapse |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *階層リストボックスã®ã¿* | +| On Column Moved |
        • [columnName](#追加プロパティ)
        • [newPosition](#追加プロパティ)
        • [oldPosition](#追加プロパティ)
        • | | +| On Column Resize |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [newSize](#追加プロパティ)
        • [oldSize](#追加プロパティ)
        • | | +| On Data Change |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Delete Action |
        • [row](#追加プロパティ)
        • | | +| On Display Detail |
        • [isRowSelected](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Double Clicked |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Drag Over |
        • [area](#追加プロパティ)
        • [areaName](#追加プロパティ)
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Drop |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Expand |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *階層リストボックスã®ã¿* | +| On Footer Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [footerName](#追加プロパティ)
        • | *é…列ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³&命åセレクションリストボックスã®ã¿* | +| On Getting Focus |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†æ™‚ã®ã¿* | +| On Header Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [headerName](#追加プロパティ)
        • | | +| On Load | | | +| On Losing Focus |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†å®Œäº†æ™‚ã®ã¿* | +| On Mouse Enter |
        • [area](#追加プロパティ)
        • [areaName](#追加プロパティ)
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Mouse Leave | | | +| On Mouse Move |
        • [area](#追加プロパティ)
        • [areaName](#追加プロパティ)
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Open Detail |
        • [row](#追加プロパティ)
        • | *カレントセレクション&命åセレクションリストボックスã®ã¿* | +| On Row Moved |
        • [newPosition](#追加プロパティ)
        • [oldPosition](#追加プロパティ)
        • | *é…列リストボックスã®ã¿* | +| On Selection Change | | | +| On Scroll |
        • [horizontalScroll](#追加プロパティ)
        • [verticalScroll](#追加プロパティ)
        • | | +| On Unload | | | #### 追加プロパティ リストボックスやリストボックス列オブジェクトã«ã¦ç™ºç”Ÿã™ã‚‹ãƒ•ォームイベントã¯ã€æ¬¡ã®è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’è¿”ã™ã“ã¨ãŒã‚りã¾ã™: -| プロパティ | åž‹ | 説明 | +| プロパティ | タイプ | 説明 | | ---------------- | ------- | --------------------------------------------- | -| area | テキスト | リストボックスオブジェクトエリア ("header", "footer", "cell") | -| areaName | テキスト | エリアã®åç§° | +| area | text | リストボックスオブジェクトエリア ("header", "footer", "cell") | +| areaName | text | エリアã®åç§° | | column | å€é•·æ•´æ•° | åˆ—ç•ªå· | -| columnName | テキスト | 列ã®åç§° | -| footerName | テキスト | フッターã®åç§° | -| headerName | テキスト | ヘッダーã®åç§° | +| columnName | text | 列ã®åç§° | +| footerName | text | フッターã®åç§° | +| headerName | text | ヘッダーã®åç§° | | horizontalScroll | å€é•·æ•´æ•° | 峿–¹å‘スクロールã®å ´åˆã¯æ­£ã®æ•°å€¤ã€å·¦æ–¹å‘ã®å ´åˆã¯è² ã®æ•°å€¤ | -| isRowSelected | boolean | 行ãŒé¸æŠžã•れã¦ã„れ㰠Trueã€ã§ãªã‘れ㰠False | +| isRowSelected | boolean | 行ãŒé¸æŠžã•れã¦ã„れ㰠trueã€ã§ãªã‘れ㰠false | | newPosition | å€é•·æ•´æ•° | 列ã‚ã‚‹ã„ã¯è¡Œã®å¤‰æ›´å¾Œã®ä½ç½® | | newSize | å€é•·æ•´æ•° | 列ã¾ãŸã¯è¡Œã®å¤‰æ›´å¾Œã®ã‚µã‚¤ã‚º (ピクセルå˜ä½) | | oldPosition | å€é•·æ•´æ•° | 列ã‚ã‚‹ã„ã¯è¡Œã®å¤‰æ›´å‰ã®ä½ç½® | | oldSize | å€é•·æ•´æ•° | 列ã¾ãŸã¯è¡Œã®å¤‰æ›´å‰ã®ã‚µã‚¤ã‚º (ピクセルå˜ä½) | | row | å€é•·æ•´æ•° | è¡Œç•ªå· | | verticalScroll | å€é•·æ•´æ•° | 下方å‘スクロールã®å ´åˆã¯æ­£ã®æ•°å€¤ã€ä¸Šæ–¹å‘ã®å ´åˆã¯è² ã®æ•°å€¤ | +> "å½" カラムや存在ã—ãªã„カラムã«ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ã€ä¸»ã«ç©ºã®æ–‡å­—列ãŒè¿”ã•れã¾ã™ã€‚ + + + -> "å½" カラムや存在ã—ãªã„カラムã«ã¦ã‚¤ãƒ™ãƒ³ãƒˆãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ã€ä¸»ã«ç©ºã®æ–‡å­—列ãŒè¿”ã•れã¾ã™ã€‚ ## リストボックス列 @@ -339,101 +272,39 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 ![](assets/en/FormObjects/listbox_column.png) リストボックスã®å„åˆ—æ¯Žã«æ¨™æº–ã®ãƒ—ロパティ (テキストã€èƒŒæ™¯è‰²ãªã©) を設定ã§ãã¾ã™ã€‚設定ã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å¯¾ã™ã‚‹è¨­å®šã‚ˆã‚Šã‚‚ã“ã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ +> é…列型リストボックスã®ã‚«ãƒ©ãƒ ã«ã¤ã„ã¦ã¯ã€[å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€æ•´æ•°ã€ãƒ–ールã€ãƒ”クãƒãƒ£ãƒ¼ã€æ™‚é–“ã€æ—¥ä»˜ã€ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクト) を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> é…列型リストボックスã®ã‚«ãƒ©ãƒ ã«ã¤ã„ã¦ã¯ã€[å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã‚¿ã‚¤ãƒ—) (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€æ•´æ•°ã€ãƒ–ールã€ãƒ”クãƒãƒ£ãƒ¼ã€æ™‚é–“ã€æ—¥ä»˜ã€ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクト) を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ### 列特有ã®ãƒ—ロパティ -[オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã‚¿ã‚¤ãƒ— (é…列リストボックス列)](properties_Object.md#å¼ã‚¿ã‚¤ãƒ—) - [CSSクラス](properties_Object.md#CSSクラス) - [デフォルト値](properties_DataSource.md#デフォルト値) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å¼](properties_DataSource.md#å¼) - [データタイプ (セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—)](properties_DataSource.md#データタイプ) - [関連付ã‘](properties_DataSource.md#関連付ã‘) - [å¹…](properties_CoordinatesAndSizing.md#å¹…) - [自動行高](properties_CoordinatesAndSizing.md#自動行高) - [最å°å¹…](properties_CoordinatesAndSizing.md#最å°å¹…) - [最大幅](properties_CoordinatesAndSizing.md#最大幅) - [サイズ変更å¯](properties_ResizingOptions.md#サイズ変更å¯) - [入力å¯](properties_Entry.md#入力å¯) - [入力フィルター](properties_Entry.md#入力フィルター) - [指定リスト](properties_RangeOfValues.md#指定リスト) - [除外リスト](properties_RangeOfValues.md#除外リスト) - [表示タイプ](properties_Display.md#表示タイプ) - [文字フォーマット](properties_Display.md#文字フォーマット) - [数値フォーマット](properties_Display.md#数値フォーマット) - [テキスト (True時)/テキスト (False時)](properties_Display.md#テキスト-(True時)-テキスト-(False時)) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) - [éžè¡¨ç¤º](properties_Display.md#表示状態) - [ワードラップ](properties_Display.md#ワードラップ) [エリプシスを使用ã—ã¦çœç•¥](properties_Display.md#エリプシスを使用ã—ã¦çœç•¥) - [背景色](properties_Text.md#背景色) - [交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²](properties_BackgroundAndBorder.md#交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²) - [行背景色é…列](properties_BackgroundAndBorder.md#行背景色é…列) - [背景色å¼](properties_BackgroundAndBorder.md#背景色å¼) - [フォント](properties_Text.md#フォント) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [行スタイルé…列](properties_Text.md#行スタイルé…列) - [スタイルå¼](properties_Text.md#スタイルå¼) - [フォントカラー](properties_Text.md#フォントカラー) - [行フォントカラーé…列](properties_Text.md#行フォントカラーé…列) - [行フォントカラーå¼](properties_Text.md#行フォントカラーå¼) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [縦æƒãˆ](properties_Text.md#縦æƒãˆ) - [マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) - [メソッド](properties_Action.md#メソッド) +[オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã‚¿ã‚¤ãƒ— (é…列リストボックス列)](properties_Object.md#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) - [CSSクラス](properties_Object.md#CSSクラス) - [デフォルト値](properties_DataSource.md#デフォルト値) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) - [å¼](properties_DataSource.md#å¼) - [データタイプ (セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—)](properties_DataSource.md#データタイプ) - [関連付ã‘](properties_DataSource.md#関連付ã‘) - [å¹…](properties_CoordinatesAndSizing.md#å¹…) - [自動行高](properties_CoordinatesAndSizing.md#自動行高) - [最å°å¹…](properties_CoordinatesAndSizing.md#最å°å¹…) - [最大幅](properties_CoordinatesAndSizing.md#最大幅) - [サイズ変更å¯](properties_ResizingOptions.md#サイズ変更å¯) - [入力å¯](properties_Entry.md#入力å¯) - [入力フィルター](properties_Entry.md#入力フィルター) - [指定リスト](properties_RangeOfValues.md#指定リスト) - [除外リスト](properties_RangeOfValues.md#除外リスト) - [表示タイプ](properties_Display.md#表示タイプ) - [文字フォーマット](properties_Display.md#文字フォーマット) - [数値フォーマット](properties_Display.md#数値フォーマット) - [テキスト (True時)/テキスト (False時)](properties_Display.md#テキスト-(True時)-テキスト-(False時)) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) - [éžè¡¨ç¤º](properties_Display.md#表示状態) - [ワードラップ](properties_Display.md#ワードラップ) [エリプシスを使用ã—ã¦çœç•¥](properties_Display.md#エリプシスを使用ã—ã¦çœç•¥) - [背景色](properties_Text.md#背景色) - [交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²](properties_BackgroundAndBorder.md#交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰²) - [行背景色é…列](properties_BackgroundAndBorder.md#行背景色é…列) - [背景色å¼](properties_BackgroundAndBorder.md#背景色å¼) - [フォント](properties_Text.md#フォント) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [行スタイルé…列](properties_Text.md#行スタイルé…列) - [スタイルå¼](properties_Text.md#スタイルå¼) - [フォントカラー](properties_Text.md#フォントカラー) - [行フォントカラーé…列](properties_Text.md#行フォントカラーé…列) - [行フォントカラーå¼](properties_Text.md#行フォントカラーå¼) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [縦æƒãˆ](properties_Text.md#縦æƒãˆ) - [マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) - [メソッド](properties_Action.md#メソッド) ### フォームイベント - - - - - - - - - - - - - - - - - - - - -| フォームイベント | å–å¾—ã•れる追加プロパティ (メインプロパティã«ã¤ã„ã¦ã¯[Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.ja.html) å‚ç…§) | コメント | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *複åˆãƒ•ォーミュラã¯ã‚½ãƒ¼ãƒˆä¸å¯ -(例: This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *é…列リストボックスã®ã¿* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *é…列ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³&命åセレクションリストボックスã®ã¿* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†æ™‚ã®ã¿* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†å®Œäº†æ™‚ã®ã¿* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *é…列リストボックスã®ã¿* | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +| フォームイベント | å–å¾—ã•れる追加プロパティ (メインプロパティã«ã¤ã„ã¦ã¯[Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.ja.html) å‚ç…§) | コメント | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | +| On After Edit |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On After Keystroke |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On After Sort |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [headerName](#追加プロパティ)
        • | *複åˆãƒ•ォーミュラã¯ã‚½ãƒ¼ãƒˆä¸å¯
          (例: This.firstName + This.lastName)* | +| On Alternative Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *é…列リストボックスã®ã¿* | +| On Before Data Entry |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Before Keystroke |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Begin Drag Over |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Clicked |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Column Moved |
        • [columnName](#追加プロパティ)
        • [newPosition](#追加プロパティ)
        • [oldPosition](#追加プロパティ)
        • | | +| On Column Resize |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [newSize](#追加プロパティ)
        • [oldSize](#追加プロパティ)
        • | | +| On Data Change |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Double Clicked |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Drag Over |
        • [area](#追加プロパティ)
        • [areaName](#追加プロパティ)
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Drop |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | | +| On Footer Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [footerName](#追加プロパティ)
        • | *é…列ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³&命åセレクションリストボックスã®ã¿* | +| On Getting Focus |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†æ™‚ã®ã¿* | +| On Header Click |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [headerName](#追加プロパティ)
        • | | +| On Load | | | +| On Losing Focus |
        • [column](#追加プロパティ)
        • [columnName](#追加プロパティ)
        • [row](#追加プロパティ)
        • | *追加プロパティã®å–å¾—ã¯ã‚»ãƒ«ç·¨é›†å®Œäº†æ™‚ã®ã¿* | +| On Row Moved |
        • [newPosition](#追加プロパティ)
        • [oldPosition](#追加プロパティ)
        • | *é…列リストボックスã®ã¿* | +| On Scroll |
        • [horizontalScroll](#追加プロパティ)
        • [verticalScroll](#追加プロパティ)
        • | | +| On Unload | | | ## リストボックスヘッダー @@ -446,6 +317,7 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 リストボックスã®å„åˆ—ãƒ˜ãƒƒãƒ€ãƒ¼æ¯Žã«æ¨™æº–ã®ãƒ†ã‚­ã‚¹ãƒˆãƒ—ロパティを設定ã§ãã¾ã™ã€‚設定ã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚„列ã«å¯¾ã™ã‚‹è¨­å®šã‚ˆã‚Šã‚‚ã“ã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ + ã•らã«ã€ãƒ˜ãƒƒãƒ€ãƒ¼ç‰¹æœ‰ã®ãƒ—ロパティを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ [カスタマイズã•れãŸä¸¦ã³æ›¿ãˆ](#ソートã®ç®¡ç†) ãªã©ã®ç”¨é€”ã«ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã®åˆ—タイトルã®éš£ã€ã‚ã‚‹ã„ã¯ã‚¿ã‚¤ãƒˆãƒ«ã®ä»£ã‚りã«ã‚¢ã‚¤ã‚³ãƒ³ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/lbHeaderIcon.png) @@ -458,8 +330,11 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [タイトル](properties_Object.md#タイトル) - [CSSクラス](properties_Object.md#CSSクラス) - [パスå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå) - [アイコンã®å ´æ‰€](properties_TextAndPicture.md#アイコンã®å ´æ‰€) - [å¹…](properties_CoordinatesAndSizing.md#å¹…) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [縦æƒãˆ](properties_Text.md#縦æƒãˆ) - [ヘルプTips](properties_Help.md#ヘルプTips) -## リストボックスフッター + + + +## リストボックスフッター > リストボックスã®ãƒ•ッタープロパティã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã«ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ãƒ—ロパティリスト㧠[フッターを表示](properties_Footers.md#フッターを表示) オプションãŒé¸æŠžã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 リストボックスã¯ã€è¿½åŠ ã®æƒ…報を表示ã™ã‚‹ãŸã‚ã®å…¥åŠ›ã‚’å—ã‘付ã‘ãªã„ "フッター" ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ 表形å¼ã§è¡¨ç¤ºã•れるデータã«ã¤ã„ã¦ã€åˆè¨ˆã‚„å¹³å‡ãªã©ã®è¨ˆç®—値を表示ã™ã‚‹ãŸã‚ã«ãƒ•ッターã¯é€šå¸¸ä½¿ç”¨ã•れã¾ã™ã€‚ @@ -476,8 +351,10 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 ### フッター特有ã®ãƒ—ロパティ + [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [変数ã®è¨ˆç®—](properties_Object.md#変数ã®è¨ˆç®—) - [CSSクラス](properties_Object.md#CSSクラス) - [å¹…](properties_CoordinatesAndSizing.md#å¹…) - [文字フォーマット](properties_Display.md#文字フォーマット) - [数値フォーマット](properties_Display.md#数値フォーマット) - [日付フォーマット](properties_Display.md#日付フォーマット) - [時間フォーマット](properties_Display.md#時間フォーマット) - [ピクãƒãƒ£ãƒ¼ãƒ•ォーマット](properties_Display.md#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) - [ワードラップ](properties_Display.md#ワードラップ) [エリプシスを使用ã—ã¦çœç•¥](properties_Display.md#エリプシスを使用ã—ã¦çœç•¥) - [背景色](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [横æƒãˆ](properties_Text.md#横æƒãˆ) - [縦æƒãˆ](properties_Text.md#縦æƒãˆ) - [ヘルプTips](properties_Help.md#ヘルプTips) + ## 入力ã®ç®¡ç† リストボックスã®ã‚»ãƒ«ãŒå…¥åŠ›å¯èƒ½ã§ã‚ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®æ¡ä»¶ã‚’満ãŸã™å¿…è¦ãŒã‚りã¾ã™: @@ -527,14 +404,14 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 | | エンティティセレクションリストボックス | エンティティã¯ã‚ªãƒ¼ãƒˆãƒžãƒ¼ã‚¸ã‚ªãƒ—ションã€ã‚ªãƒ—ティミスティック・ロックモードã§ä¿å­˜ã•れã¾ã™ (entity.save( ) ã‚’å‚ç…§ãã ã•ã„)。 正常ã«ä¿å­˜ã§ããŸå ´åˆã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯æ›´æ–°ã•れ最新ã®çŠ¶æ…‹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ä¿å­˜å‡¦ç†ãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ | | | ã™ã¹ã¦ | On Losing Focus | - (*) エンティティセレクションリストボックスã§ã® `On Data Change` イベントã®å ´åˆ: - - [カレントã®é …ç›®](properties_DataSource.md#カレントã®é …ç›®) オブジェクトã«ã¯ç·¨é›†å‰ã®å€¤ãŒæ ¼ç´ã•れã¾ã™ã€‚ - `This` オブジェクトã«ã¯ã€ç·¨é›†å¾Œã®å€¤ãŒæ ¼ç´ã•れã¾ã™ã€‚ > コレクション/エンティティセレクション型ã§ã¯ã€å¼ãŒ null ã«è©•価ã•れる場åˆã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã«åˆ¶ç´„ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚»ãƒ«å†…ã® null 値を編集・削除ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + ## é¸æŠžè¡Œã®ç®¡ç† é¸æŠžè¡Œã®ç®¡ç†ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒ—ãŒé…列ã‹ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‹ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³/エンティティセレクションã‹ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ @@ -542,12 +419,11 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 - **セレクションリストボックス**: é¸æŠžè¡Œã¯ã€ãƒ‡ãƒ•ォルト㧠`$ListboxSetX` ã¨å‘¼ã°ã‚Œã‚‹å¤‰æ›´å¯èƒ½ãªã‚»ãƒƒãƒˆã«ã‚ˆã‚Šç®¡ç†ã•れã¾ã™ (X 㯠0 ã‹ã‚‰å§‹ã¾ã‚Šã€ãƒ•ォーム内ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®æ•°ã«å¿œã˜ã¦ä¸€ã¤ãšã¤å¢—加ã—ã¦ã„ãã¾ã™)。 ã“ã®ã‚»ãƒƒãƒˆã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®[プロパティリスト](properties_ListBox.md#ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ)ã§å®šç¾©ã—ã¾ã™ã€‚ ã“ã®ã‚»ãƒƒãƒˆã¯ 4D ãŒè‡ªå‹•ã§ç®¡ç†ã—ã¾ã™ã€‚ユーザーãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã§ 1ã¤ä»¥ä¸Šã®è¡Œã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚»ãƒƒãƒˆãŒå³åº§ã«æ›´æ–°ã•れã¾ã™ã€‚ ä»–æ–¹ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžã‚’プログラムã‹ã‚‰æ›´æ–°ã™ã‚‹ãŸã‚ã«ã€"セット" テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - **コレクション/エンティティセレクションリストボックス**: é¸æŠžé …ç›®ã¯ã€å°‚用ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ—ロパティを通ã—ã¦ç®¡ç†ã•れã¾ã™ã€‚ - - [カレントã®é …ç›®](properties_DataSource.md#カレントã®é …ç›®) ã¯ã€é¸æŠžã•れãŸè¦ç´ /エンティティをå—ã‘å–るオブジェクトã§ã™ã€‚ - [é¸æŠžã•れãŸé …ç›®](properties_DataSource.md#é¸æŠžã•れãŸé …ç›®) ã¯ã€é¸æŠžã•れãŸé …ç›®ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ - [カレントã®é …ç›®ã®ä½ç½®](properties_DataSource.md#カレントã®é …ç›®ã®ä½ç½®) ã¯ã€é¸æŠžã•れãŸè¦ç´ ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä½ç½®ã‚’è¿”ã—ã¾ã™ã€‚ -- **é…列リストボックス**: `LISTBOX SELECT ROW` コマンドを使用ã—ã¦ã€ãƒ—ログラムã‹ã‚‰ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ [リストボックスオブジェクトã«ãƒªãƒ³ã‚¯ã•れãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¯ã€è¡Œé¸æŠžã®å–å¾—ã€è¨­å®šã€ä¿å­˜ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®å¤‰æ•°ã¯ãƒ–ールé…列ã§ã€4DãŒè‡ªå‹•çš„ã«ä½œæˆãƒ»ç®¡ç†ã—ã¾ã™ã€‚ ã“ã®é…列ã®ã‚µã‚¤ã‚ºã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚µã‚¤ã‚ºã«ã‚ˆã‚Šæ±ºå®šã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€å„列ã«é–¢é€£ä»˜ã‘られãŸé…列ã®ã†ã¡ã€æœ€ã‚‚å°ã•ãªé…列ã¨åŒã˜æ•°ã®è¦ç´ ã‚’æŒã¡ã¾ã™ã€‚ ã“ã®é…列ã®å„è¦ç´ ã«ã¯ã€å¯¾å¿œã™ã‚‹è¡ŒãŒé¸æŠžã•れãŸå ´åˆã«ã¯ `True` ãŒã€ãれ以外ã®å ´åˆã¯ `False` ãŒè¨­å®šã•れã¾ã™ã€‚ 4D ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å‹•作ã«å¿œã˜ã¦ã“ã®é…列ã®å†…容を更新ã—ã¾ã™ã€‚ ã“れã¨ã¯é€†ã«ã€ã“ã®é…列è¦ç´ ã®å€¤ã‚’変更ã—ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã®é¸æŠžè¡Œã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»–æ–¹ã€ã“ã®é…列ã¸ã®è¦ç´ ã®æŒ¿å…¥ã‚„削除ã¯ã§ããšã€è¡Œã®ã‚¿ã‚¤ãƒ—変更もã§ãã¾ã›ã‚“。 `Count in array` コマンドを使用ã—ã¦ã€é¸æŠžã•れãŸè¡Œã®æ•°ã‚’調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã€æœ€åˆã®è¡Œã®é¸æŠžã‚’切り替ãˆã¾ã™: +- **é…列リストボックス**: `LISTBOX SELECT ROW` コマンドを使用ã—ã¦ã€ãƒ—ログラムã‹ã‚‰ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ [リストボックスオブジェクトã«ãƒªãƒ³ã‚¯ã•れãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¯ã€è¡Œé¸æŠžã®å–å¾—ã€è¨­å®šã€ä¿å­˜ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®å¤‰æ•°ã¯ãƒ–ールé…列ã§ã€4DãŒè‡ªå‹•çš„ã«ä½œæˆãƒ»ç®¡ç†ã—ã¾ã™ã€‚ ã“ã®é…列ã®ã‚µã‚¤ã‚ºã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚µã‚¤ã‚ºã«ã‚ˆã‚Šæ±ºå®šã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€å„列ã«é–¢é€£ä»˜ã‘られãŸé…列ã®ã†ã¡ã€æœ€ã‚‚å°ã•ãªé…列ã¨åŒã˜æ•°ã®è¦ç´ ã‚’æŒã¡ã¾ã™ã€‚ ã“ã®é…列ã®å„è¦ç´ ã«ã¯ã€å¯¾å¿œã™ã‚‹è¡ŒãŒé¸æŠžã•れãŸå ´åˆã«ã¯ `true` ãŒã€ãれ以外ã®å ´åˆã¯ `false` ãŒè¨­å®šã•れã¾ã™ã€‚ 4D ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å‹•作ã«å¿œã˜ã¦ã“ã®é…列ã®å†…容を更新ã—ã¾ã™ã€‚ ã“れã¨ã¯é€†ã«ã€ã“ã®é…列è¦ç´ ã®å€¤ã‚’変更ã—ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã®é¸æŠžè¡Œã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ä»–æ–¹ã€ã“ã®é…列ã¸ã®è¦ç´ ã®æŒ¿å…¥ã‚„削除ã¯ã§ããšã€è¡Œã®ã‚¿ã‚¤ãƒ—変更もã§ãã¾ã›ã‚“。 `Count in array` コマンドを使用ã—ã¦ã€é¸æŠžã•れãŸè¡Œã®æ•°ã‚’調ã¹ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã€æœ€åˆã®è¡Œã®é¸æŠžã‚’切り替ãˆã¾ã™: ```4d ARRAY BOOLEAN(tBListBox;10) // tBListBox ã¯ãƒ•ォーム内ã«ã‚るリストボックス変数ã®åå‰ã§ã™ @@ -560,6 +436,7 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 > `OBJECT SET SCROLL POSITION` コマンドã¯ã€æœ€åˆã«é¸æŠžã•れãŸè¡Œã¾ãŸã¯æŒ‡å®šã•れãŸè¡Œã‚’表示ã™ã‚‹ã‚ˆã†ã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’スクロールã—ã¾ã™ã€‚ + ### é¸æŠžè¡Œã®è¦‹ãŸç›®ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º リストボックス㮠[セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º](properties_Appearance.md#セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º) プロパティã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¦ã„ã‚‹å ´åˆã«ã¯ã€ä»–ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースオプションを活用ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžè¡Œã‚’å¯è¦–化ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãƒã‚¤ãƒ©ã‚¤ãƒˆãŒéžè¡¨ç¤ºã«ãªã£ã¦ã„ã¦ã‚‚é¸æŠžè¡Œã¯å¼•ãç¶šã 4D ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¦ã„ã¾ã™ã€‚ã¤ã¾ã‚Š: @@ -576,19 +453,17 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 é¸æŠžè¡Œã‚’ç‰¹å®šã™ã‚‹ã«ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® [ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ](properties_ListBox.md#ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ) ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã§æŒ‡å®šã•れã¦ã„るセットã«å¯¾è±¡è¡ŒãŒå«ã¾ã‚Œã¦ã„ã‚‹ã‹ã‚’調ã¹ã¾ã™: é¸æŠžè¡Œã®ã‚¢ãƒ”アランスを定義ã™ã‚‹ã«ã¯ã€ãƒ—ロパティリストã«ã¦ [カラーå¼ã¾ãŸã¯ã‚¹ã‚¿ã‚¤ãƒ«å¼ãƒ—ロパティ](#é…列ã¨å¼ã®ä½¿ç”¨) ã‚’ 1ã¤ä»¥ä¸Šä½¿ã„ã¾ã™ã€‚ 次ã®å ´åˆã«ã¯å¼ãŒè‡ªå‹•çš„ã«å†è©•価ã•れるã“ã¨ã«ç•™æ„ãã ã•ã„: - - リストボックスã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå¤‰ã‚ã£ãŸå ´åˆ - リストボックスãŒãƒ•ォーカスを得ãŸã€ã‚ã‚‹ã„ã¯å¤±ã£ãŸå ´åˆ - リストボックスãŒè¨­ç½®ã•れãŸãƒ•ã‚©ãƒ¼ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒæœ€å‰é¢ã«ãªã£ãŸã€ã‚ã‚‹ã„ã¯æœ€å‰é¢ã§ã¯ãªããªã£ãŸå ´åˆ -#### é…列リストボックス +#### é…列リストボックス é¸æŠžè¡Œã‚’ç‰¹å®šã™ã‚‹ã«ã¯ã€å½“該リストボックスã«ãƒªãƒ³ã‚¯ã—ã¦ã„るブールé…列 [変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) を調ã¹ã¾ã™: é¸æŠžè¡Œã®ã‚¢ãƒ”アランスを定義ã™ã‚‹ã«ã¯ã€ãƒ—ロパティリストã«ã¦ [行カラーé…列ã¾ãŸã¯è¡Œã‚¹ã‚¿ã‚¤ãƒ«é…列プロパティ](#é…列ã¨å¼ã®ä½¿ç”¨) ã‚’ 1ã¤ä»¥ä¸Šä½¿ã„ã¾ã™ã€‚ é¸æŠžè¡Œã®ã‚¢ãƒ”アランスを定義ã™ã‚‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹é…列ã¯ã€`On Selection Change` フォームイベント内ã§å†è¨ˆç®—ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ã¾ãŸã€ãƒ•ã‚©ãƒ¼ã‚«ã‚¹ã®æœ‰ç„¡ã‚’é¸æŠžè¡Œã®è¡¨ç¤ºã«å映ã•ã›ã‚‹ã«ã¯ã€æ¬¡ã®ãƒ•ォームイベント内ã§ã‚‚ã“れらã®é…列を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: - - `On Getting Focus` (リストボックスプロパティ) - `On Losing Focus` (リストボックスプロパティ) - `On Activate` (フォームプロパティ) @@ -602,8 +477,9 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å ´åˆã€[行背景色é…列](properties_BackgroundAndBorder.md#行背景色é…列) をプログラムã«ã‚ˆã‚Šæ›´æ–°ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®è¡ŒèƒŒæ™¯è‰²é…列を定義ã—ãŸå ´åˆ: - "rowFillSource": "_ListboxBackground", - +``` + "rowFillSource": "_ListboxBackground", +``` リストボックスã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã«æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: @@ -613,9 +489,9 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 $n:=Size of array(LB_Arrays) ARRAY LONGINT(_ListboxBackground;$n) // 行背景色é…列 For($i;1;$n) - If(LB_Arrays{$i}=True) // selected + If(LB_Arrays{$i}=True) // é¸æŠžã•れã¦ã„れ㰠_ListboxBackground{$i}:=0x0080C080 // 背景色を緑ã«ã—ã¾ã™ - Else // not selected + Else // é¸æŠžã•れã¦ã„ãªã‘れ㰠_ListboxBackground{$i}:=lk inherited End if End for @@ -626,10 +502,10 @@ myCol:=myCol.push("new value") // リストボックス㫠new value を表示 JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆãŠã‚ˆã³èƒŒæ™¯è‰²å¼ã‚’定義ã—ãŸå ´åˆ: - "highlightSet": "$SampleSet", - "rowFillSource": "UI_SetColor", - - +``` + "highlightSet": "$SampleSet", + "rowFillSource": "UI_SetColor", +``` *UI_SetColor* ãƒ¡ã‚½ãƒƒãƒ‰ã«æ¬¡ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: ```4d @@ -644,30 +520,32 @@ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚» > 階層リストボックスã«ãŠã„ã¦ã¯ã€[セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º](properties_Appearance.md#セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º) オプションをãƒã‚§ãƒƒã‚¯ã—ãŸå ´åˆã«ã¯ã€ãƒ–レーク行をãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 åŒéšŽå±¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã®è‰²ã¯å€‹åˆ¥æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ããªã„ãŸã‚ã€ä»»æ„ã®ãƒ–レーク行ã ã‘をプログラムã§ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã™ã‚‹æ–¹æ³•ã¯ã‚りã¾ã›ã‚“。 + ## ソートã®ç®¡ç† ヘッダーãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æ¨™æº–çš„ãªã‚«ãƒ©ãƒ ã®ä¸¦ã¹æ›¿ãˆã‚’自動的ã«ãŠã“ãªã„ã¾ã™ã€‚ 標準的ãªä¸¦ã¹æ›¿ãˆã¨ã¯ã€åˆ—ã®å€¤ã‚’英数字順ã«ä¸¦ã¹æ›¿ãˆã€ç¶šã‘ã¦ã‚¯ãƒªãƒƒã‚¯ã•ã‚Œã‚‹ã¨æ˜‡é †/é™é †ã‚’交互ã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚ ã™ã¹ã¦ã®åˆ—ã¯å¸¸ã«è‡ªå‹•ã§åŒæœŸã•れã¾ã™ã€‚ リストボックス㮠[ソートå¯](properties_Action.md#ソートå¯) プロパティã®é¸æŠžã‚’解除ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆã‚’ç¦æ­¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -開発者ã¯ã€`LISTBOX SORT COLUMNS` コマンドを使用ã™ã‚‹ã‹ã€ã¾ãŸã¯ `On Header Click` 㨠`On After Sort` フォームイベント (`FORM Event`コマンドå‚ç…§) ã‚’ 4D ã®é…列管ç†ã‚³ãƒžãƒ³ãƒ‰ã‚’組ã¿åˆã‚ã›ã¦ã€ç‹¬è‡ªã®ä¸¦ã¹æ›¿ãˆã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +開発者ã¯ã€`LISTBOX SORT COLUMNS` コマンドを使用ã™ã‚‹ã‹ã€ã¾ãŸã¯ `On Header Click` 㨠`On After Sort` フォームイベント ([`FORM Event`](https://doc.4d.com/4dv19/help/command/ja/page1606.html) コマンドå‚ç…§) ã‚’ 4D ã®é…列管ç†ã‚³ãƒžãƒ³ãƒ‰ã¨çµ„ã¿åˆã‚ã›ã¦ã€ç‹¬è‡ªã®ä¸¦ã¹æ›¿ãˆã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> [ソートå¯](properties_Action.md#ソートå¯) プロパティã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚`LISTBOX SORT COLUMNS` コマンドã¯ã€ã“ã®ãƒ—ロパティを考慮ã—ã¾ã›ã‚“。 +> [ソートå¯](properties_Action.md#ソートå¯) プロパティã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã‚‹æ¨™æº–ã®ä¸¦ã¹æ›¿ãˆã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚[`LISTBOX SORT COLUMNS`](https://doc.4d.com/4dv19/help/command/ja/page916.html) コマンドã¯ã€ã“ã®ãƒ—ロパティを考慮ã—ã¾ã›ã‚“。 [列ヘッダー変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼)ã®å€¤ã‚’使用ã™ã‚‹ã¨ã€åˆ—ã®ç¾åœ¨ã®ä¸¦ã¹æ›¿ãˆçŠ¶æ³ (読ã¿è¾¼ã¿) ã‚„ä¸¦ã¹æ›¿ãˆçŸ¢å°ã®è¡¨ç¤ºãªã©ã€è¿½åŠ æƒ…å ±ã‚’ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- 変数㌠0 ã®ã¨ãã€åˆ—ã¯ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚‰ãšã€çŸ¢å°ã¯è¡¨ç¤ºã•れã¦ã„ã¾ã›ã‚“; - ![](assets/en/FormObjects/sorticon0.png) +- 変数㌠0 ã®ã¨ãã€åˆ—ã¯ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚‰ãšã€çŸ¢å°ã¯è¡¨ç¤ºã•れã¦ã„ã¾ã›ã‚“。 + ![](assets/en/FormObjects/sorticon0.png) -- 変数㌠1 ã®ã¨ãã€åˆ—ã¯æ˜‡é †ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚Šã€ä¸¦ã¹æ›¿ãˆçŸ¢å°ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™; - ![](assets/en/FormObjects/sorticon1.png) +- 変数㌠1 ã®ã¨ãã€åˆ—ã¯æ˜‡é †ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚Šã€ä¸¦ã¹æ›¿ãˆçŸ¢å°ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚ ![](assets/en/FormObjects/sorticon1.png) -- 変数㌠2 ã®ã¨ãã€åˆ—ã¯é™é †ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚Šã€ä¸¦ã¹æ›¿ãˆçŸ¢å°ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚ - ![](assets/en/FormObjects/sorticon2.png) +- 変数㌠2 ã®ã¨ãã€åˆ—ã¯é™é †ã§ä¸¦ã¹æ›¿ãˆã‚‰ã‚Œã¦ãŠã‚Šã€ä¸¦ã¹æ›¿ãˆçŸ¢å°ãŒè¡¨ç¤ºã•れã¦ã„ã¾ã™ã€‚ ![](assets/en/FormObjects/sorticon2.png) + +> 列ヘッダー変数ã«ã¯ã€å®£è¨€ã•れãŸã€ã‚ã‚‹ã„ã¯å‹•的㪠[変数](Concepts/variables.md) ã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ ãã®ä»–ã® [å¼](Concepts/quick-tour.md#å¼) (例: `Form.sortValue`) ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 変数ã®å€¤ã‚’設定ã—㦠(ãŸã¨ãˆã° Header2:=2)ã€ã‚½ãƒ¼ãƒˆã‚’表ã™çŸ¢å°ã®è¡¨ç¤ºã‚’強制ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ã€åˆ—ã®ã‚½ãƒ¼ãƒˆé †ã¯å¤‰æ›´ã•れã¾ã›ã‚“ã€ã“れを処ç†ã™ã‚‹ã®ã¯é–‹ç™ºè€…ã®å½¹å‰²ã§ã™ã€‚ -> `OBJECT SET FORMAT` コマンドã¯ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸä¸¦ã¹æ›¿ãˆã‚¢ã‚¤ã‚³ãƒ³ã‚’サãƒãƒ¼ãƒˆã™ã‚‹æ©Ÿèƒ½ã‚’ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ç”¨ã«æä¾›ã—ã¦ã„ã¾ã™ã€‚ +> [`OBJECT SET FORMAT`](https://doc.4d.com/4dv19/help/command/ja/page236.html) コマンドã¯ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸä¸¦ã¹æ›¿ãˆã‚¢ã‚¤ã‚³ãƒ³ã‚’サãƒãƒ¼ãƒˆã™ã‚‹æ©Ÿèƒ½ã‚’ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ç”¨ã«æä¾›ã—ã¦ã„ã¾ã™ã€‚ + ## スタイルã¨ã‚«ãƒ©ãƒ¼ã€è¡¨ç¤ºã®ç®¡ç† @@ -678,6 +556,7 @@ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚» - リストボックスã¾ãŸã¯åˆ—ã”ã¨ã® [é…列やå¼](#é…列ã¨å¼ã®ä½¿ç”¨) プロパティを使用 - セルã”ã¨ã®ãƒ†ã‚­ã‚¹ãƒˆã«ã¦å®šç¾© ([マルãƒã‚¹ã‚¿ã‚¤ãƒ«ãƒ†ã‚­ã‚¹ãƒˆ](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) ã®å ´åˆ) + ### 優先順ä½ã¨ç¶™æ‰¿ 優先順ä½ã‚„継承ã®åŽŸç†ã¯ã€è¤‡æ•°ã®ãƒ¬ãƒ™ãƒ«ã«ã‚ãŸã£ã¦åŒã˜ãƒ—ロパティã«ç•°ãªã‚‹å€¤ãŒæŒ‡å®šã•れãŸå ´åˆã«é©ç”¨ã•れã¾ã™ã€‚ @@ -691,7 +570,6 @@ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚» | | リストボックスã®ãƒ—ロパティ | | 優先度低 | ãƒ¡ã‚¿æƒ…å ±å¼ (コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å ´åˆ) | - 例ã¨ã—ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ãƒ—ロパティã«ã¦ãƒ•ォントスタイルを設定ã—ãªãŒã‚‰ã€åˆ—ã«ã¯è¡Œã‚¹ã‚¿ã‚¤ãƒ«é…列を使用ã—ã¦ç•°ãªã‚‹ã‚¹ã‚¿ã‚¤ãƒ«ã‚’設定ã—ãŸå ´åˆã€å¾Œè€…ãŒæœ‰åйã¨ãªã‚Šã¾ã™ã€‚ ãれãžã‚Œã®å±žæ€§ (スタイルã€ã‚«ãƒ©ãƒ¼ã€èƒŒæ™¯è‰²) ã«ã¤ã„ã¦ã€ãƒ‡ãƒ•ォルトã®å€¤ã‚’使用ã—ãŸå ´åˆã€å±žæ€§ã® **継承** ãŒãŠã“ãªã‚れã¾ã™: @@ -718,17 +596,21 @@ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚» - リストボックスã®è¡Œã‚¹ã‚¿ã‚¤ãƒ«é…列ã®è¦ç´  4 ã«å®šæ•° `lk inherited` を渡ã—ã¾ã™ã€‚ã“れã«ã‚ˆã‚Šã€4 行目ã®ã‚¤ã‚¿ãƒªãƒƒã‚¯ã®ã‚¹ã‚¿ã‚¤ãƒ«ãŒé™¤åŽ»ã•れã¾ã™ã€‚ - リストボックスã®è¡ŒèƒŒæ™¯è‰²é…列ã®è¦ç´  2 ã«å®šæ•° `lk inherited` を渡ã—ã¾ã™ã€‚ã“れã«ã‚ˆã‚Šå…ƒã®ã€èƒŒæ™¯è‰²ãŒäº¤äº’ã«å¤‰ã‚るリストボックスã®çŠ¶æ…‹ã«æˆ»ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + ### é…列ã¨å¼ã®ä½¿ç”¨ リストボックスã®ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦ã€è¡Œã®ã‚«ãƒ©ãƒ¼ã‚„スタイルã€è¡¨ç¤ºã«ã¤ã„ã¦ä½¿ç”¨ã§ãるプロパティãŒç•°ãªã‚Šã¾ã™: -| プロパティ | é…列リストボックス | セレクションリストボックス | コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ | -| ------- | ---------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| 背景色 | [行背景色é…列](properties_BackgroundAndBorder.md#row-background-color-array) | [背景色å¼](properties_BackgroundAndBorder.md#background-color-expression) | [背景色å¼"](properties_BackgroundAndBorder.md#背景色å¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼) | -| フォントカラー | [行フォントカラーé…列](properties_Text.md#row-font-color-array) | [フォントカラーå¼](properties_Text.md#font-color-expression) | [フォントカラーå¼](properties_Text.md#フォントカラーå¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼) | +| プロパティ | é…列リストボックス | セレクションリストボックス | コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ | +| ------- | -------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------- | +| 背景色 | [行背景色é…列](properties_BackgroundAndBorder.md#行背景色é…列) | [背景色å¼](properties_BackgroundAndBorder.md#背景色å¼) | [背景色å¼"](properties_BackgroundAndBorder.md#背景色å¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼) | +| フォントカラー | [行フォントカラーé…列](properties_Text.md#行フォントカラーå¼) | [フォントカラーå¼](properties_Text.md#フォントカラーå¼) | [フォントカラーå¼](properties_Text.md#フォントカラーå¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼) | フォントスタイル| -[行スタイルé…列](properties_Text.md#行スタイルé…列)|[スタイルå¼](properties_Text.md#スタイルå¼)|[スタイルå¼](properties_Text.md#スタイルå¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼)| 表示|[行コントロールé…列](properties_ListBox.md#行コントロールé…列)|-|-| +[行スタイルé…列](properties_Text.md#行スタイルé…列)|[スタイルå¼](properties_Text.md#スタイルå¼)|[スタイルå¼](properties_Text.md#スタイルå¼) ã¾ãŸã¯ [メタ情報å¼](properties_Text.md#メタ情報å¼)| 表示|[行コントロールé…列](properties_ListBox.md#行コントロールé…列)|-|-| + + + ## リストボックスã®å°åˆ· @@ -745,299 +627,305 @@ JSON フォームã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ¬¡ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚» ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯: - オブジェクトã®é«˜ã•よりもå°åˆ·ã™ã‚‹è¡Œæ•°ãŒå°‘ãªã„å ´åˆã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ジェクトã®é«˜ã•ã¯è‡ªå‹•ã§æ¸›å°‘ã•ã›ã‚‰ã‚Œã¾ã™ ("空白" 行ã¯å°åˆ·ã•れã¾ã›ã‚“)。 ä»–æ–¹ã€ã‚ªãƒ–ジェクトã®å†…容ã«åŸºã¥ã高ã•ãŒè‡ªå‹•ã§å¢—大ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 実際ã«å°åˆ·ã•れるオブジェクトã®ã‚µã‚¤ã‚ºã¯ `LISTBOX GET PRINT INFORMATION` コマンドã§å–å¾—ã§ãã¾ã™ã€‚ -- リストボックスオブジェクト㯠"ãã®ã¾ã¾" å°åˆ·ã•れã¾ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚„グリッド線ã®è¡¨ç¤ºã€è¡¨ç¤º/éžè¡¨ç¤ºè¡Œãªã©ã€ç¾åœ¨ã®è¡¨ç¤ºè¨­å®šãŒè€ƒæ…®ã•れã¾ã™ã€‚ ã“れらã®è¨­å®šã«ã¯å°åˆ·ã•れる最åˆã®è¡Œã‚‚å«ã¿ã¾ã™ã€‚å°åˆ·ã‚’実行ã™ã‚‹å‰ã« `OBJECT SET SCROLL POSITION` を呼ã³å‡ºã™ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å°åˆ·ã•れる最åˆã®è¡Œã¯ã‚³ãƒžãƒ³ãƒ‰ã§æŒ‡å®šã—ãŸè¡Œã«ãªã‚Šã¾ã™ã€‚ +- リストボックスオブジェクト㯠"ãã®ã¾ã¾" å°åˆ·ã•れã¾ã™ã€‚è¨€ã„æ›ãˆã‚Œã°ã€ãƒ˜ãƒƒãƒ€ãƒ¼ã‚„グリッド線ã®è¡¨ç¤ºã€è¡¨ç¤º/éžè¡¨ç¤ºè¡Œãªã©ã€ç¾åœ¨ã®è¡¨ç¤ºè¨­å®šãŒè€ƒæ…®ã•れã¾ã™ã€‚ ã“れらã®è¨­å®šã«ã¯å°åˆ·ã•れる最åˆã®è¡Œã‚‚å«ã¿ã¾ã™ã€‚å°åˆ·ã‚’実行ã™ã‚‹å‰ã« `OBJECT SET SCROLL POSITION` を呼ã³å‡ºã™ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å°åˆ·ã•れる最åˆã®è¡Œã¯ã‚³ãƒžãƒ³ãƒ‰ã§æŒ‡å®šã—ãŸè¡Œã«ãªã‚Šã¾ã™ã€‚ - 自動メカニズムã«ã‚ˆã‚Šã€è¡¨ç¤ºå¯èƒ½ãªè¡Œä»¥ä¸Šã®è¡Œæ•°ã‚’å«ã‚€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å°åˆ·ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚連続ã—㦠`Print object` を呼ã³å‡ºã—ã€å‘¼ã³å‡ºã—毎ã«åˆ¥ã®è¡Œã®ã¾ã¨ã¾ã‚Šã‚’å°åˆ·ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `LISTBOX GET PRINT INFORMATION` コマンドを使用ã—ã¦ã€å°åˆ·ãŒãŠã“ãªã‚れã¦ã„ã‚‹é–“ã®çŠ¶æ…‹ã‚’ãƒã‚§ãƒƒã‚¯ã§ãã¾ã™ã€‚ + + + + ## 階層リストボックス -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). +4D ã§ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’階層表示ã«ã™ã‚‹ã‚ˆã†æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 階層リストボックスã¯å·¦ã®åˆ—ãŒéšŽå±¤çжã«è¡¨ç¤ºã•れã¾ã™ã€‚ã“ã®ã‚¿ã‚¤ãƒ—ã®è¡¨ç¤ºæ–¹æ³•ã¯ã€ç¹°ã‚Šè¿”ã•れる値やã€éšŽå±¤ã«ä¾å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®è¡¨ç¤ºãªã©ã«é©ç”¨ã§ãã¾ã™ (国/地域/都市ãªã©)。 + +> [é…列タイプ](#é…列リストボックス) ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã¿ã‚’階層ã«ã§ãã¾ã™ã€‚ -> Only [array type list boxes](#array-list-boxes) can be hierarchical. +階層リストボックスã¯ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹ç‰¹åˆ¥ãªæ–¹æ³•ã§ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã®æ§‹é€  (é…列) ã¯å¤‰æ›´ã—ã¾ã›ã‚“。 階層リストボックスã¯é€šå¸¸ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¨ã¾ã£ãŸãåŒã˜æ–¹æ³•ã§ç®¡ç†ã•れã¾ã™ã€‚ -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: +階層リストボックスã¨ã—ã¦æŒ‡å®šã™ã‚‹ã«ã¯ã€3ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: -* 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. +* フォームエディターã®ãƒ—ロパティリストを使用ã—ã¦éšŽå±¤è¦ç´ ã‚’手作業ã§è¨­å®šã™ã‚‹ (ã¾ãŸã¯ JSON フォームを編集ã™ã‚‹)。 +* フォームエディターã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ç®¡ç†ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使用ã—ã¦éšŽå±¤ã‚’生æˆã™ã‚‹ã€‚ +* [LISTBOX SET HIERARCHY](https://doc.4d.com/4Dv18/4D/18/LISTBOX-SET-HIERARCHY.301-4505193.ja.html) ã‚„ [LISTBOX GET HIERARCHY](https://doc.4d.com/4Dv18/4D/18/LISTBOX-GET-HIERARCHY.301-4505194.ja.html) コマンドを使用ã™ã‚‹ (*4D ランゲージリファレンス* å‚ç…§)。 -#### Hierarchical List Box property -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. +#### "階層リストボックス" プロパティã«ã‚ˆã‚‹éšŽå±¤åŒ– -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. +ã“ã®ãƒ—ロパティを使用ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®éšŽå±¤è¡¨ç¤ºã‚’設定ã—ã¾ã™ã€‚ JSON フォームã«ãŠã„ã¦ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã® [*dataSource* プロパティã®å€¤ãŒé…列åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã‚‹ã¨ã](properties_Object.md#階層リストボックス) ã«éšŽå±¤åŒ–ã—ã¾ã™ã€‚ -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. +*階層リストボックス* プロパティãŒé¸æŠžã•れるã¨ã€è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã§ã‚ã‚‹ **Variable 1...10** ãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“れらã«ã¯éšŽå±¤ã®å„レベルã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹é…列を指定ã—ã¾ã™ã€‚ã“れ㌠*dataSource* ã®å€¤ã§ã‚ã‚‹é…列åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ãªã‚Šã¾ã™ã€‚ 入力欄ã«å€¤ãŒå…¥åŠ›ã•れるã¨ã€æ–°ã—ã„入力欄ãŒè¿½åŠ ã•れã¾ã™ã€‚ 10個ã¾ã§ã®å¤‰æ•°ã‚’指定ã§ãã¾ã™ã€‚ ã“れらã®å¤‰æ•°ã¯å…ˆé ­åˆ—ã«è¡¨ç¤ºã•れる階層ã®ãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™ã€‚ -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: +Variable 1 ã¯å¸¸ã«ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å…ˆé ­åˆ—ã®å¤‰æ•°åã«å¯¾å¿œã—ã¾ã™ (ã“ã® 2ã¤ã®å€¤ã¯è‡ªå‹•ã§ãƒã‚¤ãƒ³ãƒ‰ã•れã¾ã™)。 Variable 1欄ã¯å¸¸ã«è¡¨ç¤ºã•れã€å…¥åŠ›ã§ãã¾ã™ã€‚ 例: country。 Variable 2 も常ã«è¡¨ç¤ºã•れã€å…¥åŠ›ã§ãã¾ã™ã€‚ã“れã¯äºŒç•ªç›®ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ã‚’指定ã—ã¾ã™ã€‚ 例: regions。 三番目以é™ã®æ¬„ã¯ã€ãã®å‰ã®ç•ªå·ã®æ¬„ãŒå…¥åŠ›ã•れるã¨è¡¨ç¤ºã•れã¾ã™ã€‚ 例ãˆã°: countiesã€cities等。 最大10レベルã¾ã§æŒ‡å®šã§ãã¾ã™ã€‚ ã‚る階層レベルã®å€¤ã‚’削除ã™ã‚‹ã¨ã€ãã®å¾Œã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ãŒç¹°ã‚Šä¸ŠãŒã‚Šã¾ã™ã€‚ + +最後ã®å¤‰æ•°ã«è¤‡æ•°ã®åŒã˜å€¤ãŒå­˜åœ¨ã—ã¦ã‚‚ã€ã“ã®å¤‰æ•°ãŒéšŽå±¤ã«ãªã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 ãŸã¨ãˆã°ã€arr1 ã« A A A B B Bã€arr2 ã« 1 1 1 2 2 2ã€ãã—ã¦arr3 ã« X X Y Y Y Z ãŒå€¤ã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹å ´åˆã€Aã€Bã€1ã€ãã—㦠2 ã¯éšŽå±¤ã§è¡¨ç¤ºã§ãã¾ã™ãŒã€X 㨠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. +ã“ã®åŽŸå‰‡ã¯éšŽå±¤ãŒã²ã¨ã¤ã ã‘設定ã•れã¦ã„ã‚‹å ´åˆã«ã¯é©ç”¨ã•れã¾ã›ã‚“。ã“ã®å ´åˆã€åŒã˜å€¤ã¯ã‚°ãƒ«ãƒ¼ãƒ—化ã•れã¾ã™ã€‚ +> 既存ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§éšŽå±¤ã‚’設定ã—ãŸå ´åˆã€(最åˆã®ã‚‚ã®ã‚’除ã) ã“れらã®åˆ—を削除ã¾ãŸã¯éžè¡¨ç¤ºã«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã§ãªã„ã¨ã€ãれらã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã§é‡è¤‡ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ エディターã®ãƒãƒƒãƒ—アップメニューを使用ã—ã¦éšŽå±¤ã‚’設定ã™ã‚‹ã¨ (階層リストボックスå‚ç…§)ã€ä¸è¦ãªåˆ—ã¯è‡ªå‹•ã§ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‹ã‚‰å–り除ã‹ã‚Œã¾ã™ã€‚ -> 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 +#### コンテキストメニューを使用ã—ãŸéšŽå±¤åŒ– -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: +フォームエディター内ã§é…列タイプã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ジェクトã®ä¸€ç•ªç›®ã‹ã‚‰ä»»æ„ã®æ•°ã®åˆ—ã‚’é¸æŠžã™ã‚‹ã¨ã€**階層を作æˆ** コマンドãŒã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰åˆ©ç”¨ã§ãるよã†ã«ãªã‚Šã¾ã™: ![](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: +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯éšŽå±¤åŒ–ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã§ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Ÿè¡Œã•れã¾ã™: -* 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). +* ãã®ã‚ªãƒ–ジェクトã®ãƒ—ロパティリスト㧠**階層リストボックス** オプションãŒé¸æŠžã•れã¾ã™ã€‚ +* ãã®åˆ—ã®å¤‰æ•°ãŒéšŽå±¤ã‚’指定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ æ—¢ã«è¨­å®šã•れã¦ã„ãŸå¤‰æ•°ã¯ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ +* (先頭列を除ã) é¸æŠžã•れãŸåˆ—ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã«è¡¨ç¤ºã•れãªããªã‚Šã¾ã™ã€‚ -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: +例: å·¦ã‹ã‚‰å›½ã€åœ°åŸŸã€éƒ½å¸‚ã€äººå£åˆ—ãŒè¨­å®šã•れãŸãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŒã‚りã¾ã™ã€‚ 国ã€åœ°åŸŸã€éƒ½å¸‚㌠(下図ã®é€šã‚Š) é¸æŠžã•れã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **階層を作æˆ** ã‚’é¸æŠžã™ã‚‹ã¨ã€å…ˆé ­åˆ—ã«3レベルã®éšŽå±¤ãŒä½œæˆã•れã€äºŒç•ªç›®ã¨ä¸‰ç•ªç›®ã®åˆ—ã¯å–り除ã‹ã‚Œã¾ã™ã€‚人å£åˆ—ãŒäºŒç•ªç›®ã«ãªã‚Šã¾ã™: ![](assets/en/FormObjects/listbox_hierarchy2.png) -##### Cancel hierarchy +##### 階層をキャンセル +階層リストボックスã¨ã—ã¦å®šç¾©ã•れãŸãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§å…ˆé ­åˆ—ã‚’é¸æŠžã™ã‚‹ã¨ã€**階層をキャンセル** コマンドを使用ã§ãã¾ã™ã€‚ ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã¨ä»¥ä¸‹ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒå®Ÿè¡Œã•れã¾ã™: -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: +* ãã®ã‚ªãƒ–ジェクト㮠**階層リストボックス** オプションã®é¸æŠžãŒè§£é™¤ã•れã¾ã™ã€‚ +* 2番目以é™ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ãŒå‰Šé™¤ã•れã€é€šå¸¸ã®åˆ—ã¨ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è¿½åŠ ã•れã¾ã™ã€‚ -* 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 +### 動作 -When a form containing a hierarchical list box is opened for the first time, by default all the rows are expanded. +階層リストボックスをå«ã‚€ãƒ•ã‚©ãƒ¼ãƒ ãŒæœ€åˆã«é–‹ã‹ã‚Œã‚‹éš›ã€ãƒ‡ãƒ•ォルトã§ã™ã¹ã¦ã®è¡ŒãŒå±•é–‹ã•れã¦ã„ã¾ã™ã€‚ -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: +é…列中ã§å€¤ãŒç¹°ã‚Šè¿”ã•れã¦ã„ã‚‹ã¨ã€ãƒ–レーク行ã¨éšŽå±¤ "ノード" ãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è‡ªå‹•ã§è¿½åŠ ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«éƒ½å¸‚ã«é–¢ã™ã‚‹ 4ã¤ã®é…列ãŒå«ã¾ã‚Œã¦ã„ã¦ã€ãれãžã‚Œå›½ã€åœ°åŸŸã€éƒ½å¸‚åã€äººå£ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨ã—ã¾ã™: ![](assets/en/FormObjects/hierarch1.png) -If this list box is displayed in hierarchical form (the first three arrays being included in the hierarchy), you obtain: +リストボックスãŒéšŽå±¤å½¢å¼ã§è¡¨ç¤ºã•れる㨠(先頭3ã¤ã®é…列ãŒéšŽå±¤åŒ–ã•れã¦ã„ã‚‹å ´åˆ)ã€ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: ![](assets/en/FormObjects/hierarch2.png) -The arrays are not sorted before the hierarchy is constructed. If, for example, an array contains the data AAABBAACC, the hierarchy obtained is: +階層を正ã—ãæ§‹ç¯‰ã™ã‚‹ãŸã‚ã«ã¯ã€äº‹å‰ã«é…列をソートã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ãŸã¨ãˆã°ã€é…列中ã«ãƒ‡ãƒ¼ã‚¿ãŒ AAABBAACC ã®é †ã§å«ã¾ã‚Œã¦ã„ã‚‹ã¨ã€éšŽå±¤ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: -> 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. +階層 "ノード" を展開ã—ãŸã‚ŠæŠ˜ã‚ŠãŸãŸã‚“ã ã‚Šã™ã‚‹ã«ã¯ã€ãƒŽãƒ¼ãƒ‰ä¸Šã‚’クリックã—ã¾ã™ã€‚ ノード上を **Alt+クリック** (Windows) ã¾ãŸã¯ **Option+クリック** (macOS) ã™ã‚‹ã¨ã€ã™ã¹ã¦ã®ã‚µãƒ–è¦ç´ ãŒåŒæ™‚ã«å±•é–‹ã•れãŸã‚ŠæŠ˜ã‚ŠãŸãŸã¾ã‚ŒãŸã‚Šã—ã¾ã™ã€‚ ã“れらã®å‹•作㯠`LISTBOX EXPAND` ãŠã‚ˆã³ `LISTBOX COLLAPSE` コマンドを使用ã™ã‚‹ã“ã¨ã§ãƒ—ログラミングã§ã‚‚実行å¯èƒ½ã§ã™ã€‚ -When values of the date or time type are included in a hierarchical list box, they are displayed in the short system format. +éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«æ—¥ä»˜ã‚„時間型ã®å€¤ã‚’表示ã™ã‚‹éš›ã€ãれら㯠Short system format ã§è¡¨ç¤ºã•れã¾ã™ã€‚ -#### Sorts in hierarchical list boxes +#### ソートã®ç®¡ç† -In a list box in hierarchical mode, a standard sort (carried out by clicking on the header of a list box column) is always constructed as follows: +階層モードã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã„ã¦ã€(リストボックス列ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’クリックã—ã¦å®Ÿè¡Œã•れる) 標準ã®ä¸¦ã¹æ›¿ãˆã¯å¸¸ã«ä»¥ä¸‹ã®ã‚ˆã†ã«ãŠã“ãªã‚れã¾ã™: -- 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. -- 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: +例ã¨ã—ã¦ã€ã¾ã ã‚½ãƒ¼ãƒˆã•れã¦ã„ãªã„以下ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŒã‚りã¾ã™: ![](assets/en/FormObjects/hierarch3.png) -If you click on the "Population" header to sort the populations by ascending (or alternately descending) order, the data appear as follows: +"Population" ヘッダーをクリックã—ã¦äººå£ã«åŸºã¥ã昇順ã‚ã‚‹ã„ã¯é™é †ã§ã‚½ãƒ¼ãƒˆã‚’行ãŠã“ãªã†ã¨ã€ãƒ‡ãƒ¼ã‚¿ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: ![](assets/en/FormObjects/hierarch4.png) -As for all list boxes, you can [disable the standard sort mechanism](properties_Action.md#sortable) and manage sorts using programming. +通常ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¨åŒæ§˜ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® [ソートå¯](properties_Action.md#ソートå¯) オプションã®é¸æŠžã‚’解除ã™ã‚‹ã“ã¨ã§æ¨™æº–ã®ã‚½ãƒ¼ãƒˆãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’無効ã«ã—ã€ãƒ—ログラムã§ã‚½ãƒ¼ãƒˆã‚’管ç†ã§ãã¾ã™ã€‚ + -#### 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). +階層リストボックスã¯ã€ãƒŽãƒ¼ãƒ‰ã®å±•é–‹ / 折りãŸãŸã¿çŠ¶æ…‹ã«ã‚ˆã‚Šã€ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ä¸Šã«è¡¨ç¤ºã•れる行数ãŒå¤‰ã‚りã¾ã™ã€‚ ã—ã‹ã—é…列ã®è¡Œæ•°ãŒå¤‰ã‚ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 表示ãŒå¤‰ã‚ã‚‹ã ã‘ã§ãƒ‡ãƒ¼ã‚¿ã«å¤‰æ›´ã¯ã‚りã¾ã›ã‚“。 ã“ã®åŽŸå‰‡ã‚’ç†è§£ã™ã‚‹ã“ã¨ã¯é‡è¦ã§ã™ã€‚階層リストボックスã«å¯¾ã™ã‚‹ãƒ—ログラムã«ã‚ˆã‚‹ç®¡ç†ã¯å¸¸ã«é…列データã«å¯¾ã—ã¦ãŠã“ãªã‚れるã®ã§ã‚りã€è¡¨ç¤ºã•れãŸãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦ãŠã“ãªã‚れるã‚ã‘ã§ã¯ãªã„ã‹ã‚‰ã§ã™ã€‚ ã¨ãã«ã€è‡ªå‹•ã§è¿½åŠ ã•れるブレーク行ã¯ã€è¡¨ç¤ºã‚ªãƒ—ションé…列ã§ã¯è€ƒæ…®ã•れã¾ã›ã‚“ (後述å‚ç…§)。 -Let’s look at the following arrays for example: +例ã¨ã—ã¦ä»¥ä¸‹ã®é…列を見ã¦ã¿ã¾ã—ょã†: ![](assets/en/FormObjects/hierarch5.png) -If these arrays are represented hierarchically, the row "Quimper" will not be displayed on the second row, but on the fourth, because of the two break rows that are added: +ã“れらã®é…列ãŒéšŽå±¤çš„ã«è¡¨ç¤ºã•れるã¨ã€2ã¤ã®ãƒ–レーク行ãŒè¿½åŠ ã•れるãŸã‚ã€"Quimper" 行㯠2行目ã§ã¯ãªã 4行目ã«è¡¨ç¤ºã•れã¾ã™: ![](assets/en/FormObjects/hierarch6.png) -Regardless of how the data are displayed in the list box (hierarchically or not), if you want to change the row containing "Quimper" to bold, you must use the statement Style{2} = bold. Only the position of the row in the arrays is taken into account. +階層ã§ã‚ã£ã¦ã‚‚ãªãã¦ã‚‚ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ã©ã®ã‚ˆã†ã«ãƒ‡ãƒ¼ã‚¿ãŒè¡¨ç¤ºã•れã¦ã„ã‚‹ã‹ã«ã‹ã‹ã‚らãšã€"Quimper" ãŒå«ã¾ã‚Œã‚‹è¡Œã‚’太字ã«ã—ãŸã„å ´åˆã¯ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆ Style{2} = bold を使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 é…列中ã®è¡Œã®ä½ç½®ã®ã¿ãŒè€ƒæ…®ã•れã¾ã™ã€‚ -This principle is implemented for internal arrays that can be used to manage: +ã“ã®åŽŸå‰‡ã¯ä»¥ä¸‹ã®ã‚‚ã®ã‚’管ç†ã™ã‚‹å†…部的ãªé…列ã«é©ç”¨ã•れã¾ã™: -- colors -- background colors -- styles -- hidden rows -- selections +- カラー +- 背景色 +- スタイル +- éžè¡¨ç¤ºè¡Œ +- é¸æŠžè¡Œ -For example, if you want to select the row containing Rennes, you must pass: +ãŸã¨ãˆã°ã€Rennes ã‚’å«ã‚€è¡Œã‚’é¸æŠžã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã¾ã™: ```4d ->MyListbox{3}:=True ``` -Non-hierarchical representation: ![](assets/en/FormObjects/hierarch7.png) Hierarchical representation: ![](assets/en/FormObjects/hierarch8.png) +éžéšŽå±¤è¡¨ç¤º: ![](assets/en/FormObjects/hierarch7.png) 階層表示: ![](assets/en/FormObjects/hierarch8.png) -> If one or more rows are hidden because their parents are collapsed, they are no longer selected. Only the rows that are visible (either directly or by scrolling) can be selected. In other words, rows cannot be both hidden and selected. +> è¦ªãŒæŠ˜ã‚ŠãŸãŸã¾ã‚Œã¦ã„ã‚‹ãŸã‚ã«è¡ŒãŒéžè¡¨ç¤ºã«ãªã£ã¦ã„ã‚‹ã¨ã€ãれらã¯é¸æŠžã‹ã‚‰é™¤å¤–ã•れã¾ã™ã€‚ (直接ã‚ã‚‹ã„ã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã«ã‚ˆã£ã¦) 表示ã•れã¦ã„る行ã®ã¿ã‚’é¸æŠžã§ãã¾ã™ã€‚ è¨€ã„æ›ãˆã‚Œã°ã€è¡Œã‚’é¸æŠžã‹ã¤éš ã•れãŸçŠ¶æ…‹ã«ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -As with selections, the `LISTBOX GET CELL POSITION` command will return the same values for a hierarchical list box and a non-hierarchical list box. This means that in both of the examples below, `LISTBOX GET CELL POSITION` will return the same position: (3;2). +é¸æŠžã¨åŒæ§˜ã«ã€`LISTBOX GET CELL POSITION` コマンドã¯éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¨éžéšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã„ã¦åŒã˜å€¤ã‚’è¿”ã—ã¾ã™ã€‚ ã¤ã¾ã‚Šä»¥ä¸‹ã®ä¸¡æ–¹ã®ä¾‹é¡Œã§ã€`LISTBOX GET CELL POSITION` ã¯åŒã˜ä½ç½® (3;2) ã‚’è¿”ã—ã¾ã™ã€‚ -*Non-hierarchical representation:* ![](assets/en/FormObjects/hierarch9.png) +*éžéšŽå±¤è¡¨ç¤º:* ![](assets/en/FormObjects/hierarch9.png) -*Hierarchical representation:* ![](assets/en/FormObjects/hierarch10.png) +*階層表示:* ![](assets/en/FormObjects/hierarch10.png) -When all the rows of a sub-hierarchy are hidden, the break line is automatically hidden. In the above example, if rows 1 to 3 are hidden, the "Brittany" break row will not appear. +サブ階層ã®ã™ã¹ã¦ã®è¡ŒãŒéš ã•れã¦ã„ã‚‹ã¨ãã€ãƒ–レーク行ã¯è‡ªå‹•ã§éš ã•れã¾ã™ã€‚ å…ˆã®ä¾‹é¡Œã§ 1ã‹ã‚‰ 3行目ã¾ã§ãŒéš ã•れã¦ã„ã‚‹ã¨ã€"Brittany" ã®ãƒ–レーク行ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 -#### Break rows +#### ブレーク行ã®ç®¡ç† -If the user selects a break row, `LISTBOX GET CELL POSITION` returns the first occurrence of the row in the corresponding array. In the following case: +ユーザーãŒãƒ–ãƒ¬ãƒ¼ã‚¯è¡Œã‚’é¸æŠžã™ã‚‹ã¨ã€`LISTBOX GET CELL POSITION` ã¯å¯¾å¿œã™ã‚‹é…åˆ—ã®æœ€åˆã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ã‚’è¿”ã—ã¾ã™ã€‚ 以下ã®ã‚±ãƒ¼ã‚¹ã§: ![](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. +`LISTBOX GET CELL POSITION` 㯠(2;4) ã‚’è¿”ã—ã¾ã™ã€‚ プログラムã§ãƒ–ãƒ¬ãƒ¼ã‚¯è¡Œã‚’é¸æŠžã™ã‚‹ã«ã¯ `LISTBOX SELECT BREAK` コマンドを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -Given for example the following list box (the names of the associated arrays are specified in parentheses): +ブレーク行ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚°ãƒ©ãƒ•ィカルãªè¡¨ç¤º (スタイルやカラー) を管ç†ã™ã‚‹å†…部的ãªé…列ã§ã¯è€ƒæ…®ã•れã¾ã›ã‚“。 ã—ã‹ã—ã€ã‚ªãƒ–ジェクトã®ã‚°ãƒ©ãƒ•ィックを管ç†ã™ã‚‹ã‚ªãƒ–ジェクト (フォーム) テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ãƒ–レーク行ã®è¡¨ç¤ºã‚’変更ã§ãã¾ã™ã€‚ 階層を構æˆã™ã‚‹é…列ã«å¯¾ã—ã¦ã€é©åˆ‡ãªã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ -*Non-hierarchical representation:* ![](assets/en/FormObjects/hierarch12.png) +以下ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’例題ã¨ã—ã¾ã™ (割り当ã¦ãŸé…列åã¯æ‹¬å¼§å†…ã«è¨˜è¼‰ã—ã¦ã„ã¾ã™): -*Hierarchical representation:* ![](assets/en/FormObjects/hierarch13.png) +*éžéšŽå±¤è¡¨ç¤º:* ![](assets/en/FormObjects/hierarch12.png) -In hierarchical mode, break levels are not taken into account by the style modification arrays named `tStyle` and `tColors`. To modify the color or style of break levels, you must execute the following statements: +*階層表示:* ![](assets/en/FormObjects/hierarch13.png) + +階層モードã§ã¯ `tStyle` ã‚„ `tColors` é…列ã§å¤‰æ›´ã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã¯ã€ãƒ–レーク行ã«é©ç”¨ã•れã¾ã›ã‚“。 ブレークレベルã§ã‚«ãƒ©ãƒ¼ã‚„スタイルを変更ã™ã‚‹ã«ã¯ã€ä»¥ä¸‹ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã‚’実行ã—ã¾ã™: ```4d 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: +çµæžœ: ![](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. +#### 展開/折りãŸãŸã¿ç®¡ç†ã®æœ€é©åŒ– + +`On Expand` ã‚„ `On Collapse` フォームイベントを使用ã—ã¦éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡¨ç¤ºã‚’最é©åŒ–ã§ãã¾ã™ã€‚ -A hierarchical list box is built from the contents of its arrays so it can only be displayed when all these arrays are loaded into memory. This makes it difficult to build large hierarchical list boxes based on arrays generated from data (through the `SELECTION TO ARRAY` command), not only because of the display speed but also the memory used. +階層リストボックスã¯ãã®é…列ã®å†…容ã‹ã‚‰æ§‹ç¯‰ã•れã¾ã™ã€‚ãã®ãŸã‚ã“れらã®é…列ã™ã¹ã¦ãŒãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れる必è¦ãŒã‚りã¾ã™ã€‚ 大é‡ã®ãƒ‡ãƒ¼ã‚¿ã‹ã‚‰ (`SELECTION TO ARRAY` コマンドを使用ã—ã¦) 生æˆã•れるé…列をもã¨ã«éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’構築ã™ã‚‹ã®ã¯ã€è¡¨ç¤ºé€Ÿåº¦ã ã‘ã§ãªãメモリ使用é‡ã®è¦³ç‚¹ã‹ã‚‰ã‚‚困難ãŒä¼´ã„ã¾ã™ã€‚ -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. +`On Expand` 㨠`On Collapse` フォームイベントを使用ã™ã‚‹ã“ã¨ã§ã€ã“ã®åˆ¶é™ã‚’回é¿ã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«åŸºã¥ã„ã¦éšŽå±¤ã®ä¸€éƒ¨ã ã‘を表示ã—ãŸã‚Šã€å¿…è¦ã«å¿œã˜ã¦é…列をロード/アンロードã§ãã¾ã™ã€‚ ã“れらã®ã‚¤ãƒ™ãƒ³ãƒˆã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã¯ã€`LISTBOX GET CELL POSITION` コマンドã¯ã€è¡Œã‚’展開/折りãŸãŸã‚€ãŸã‚ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒªãƒƒã‚¯ã—ãŸã‚»ãƒ«ã‚’è¿”ã—ã¾ã™ã€‚ -In this case, you must fill and empty arrays through the code. The principles to be implemented are: +ã“ã®å ´åˆã€é–‹ç™ºè€…ãŒã‚³ãƒ¼ãƒ‰ã‚’使用ã—ã¦é…列を空ã«ã—ãŸã‚Šå€¤ã‚’埋ã‚ãŸã‚Šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 実装ã™ã‚‹é𛿳¨æ„ã™ã¹ã原則ã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: +- リストボックスãŒè¡¨ç¤ºã•れる際ã€å…ˆé ­ã®é…列ã®ã¿å€¤ã‚’埋ã‚ã¾ã™ã€‚ ã—ã‹ã— 2番目ã®é…列を空ã®å€¤ã§ç”Ÿæˆã—ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å±•é–‹/折りãŸãŸã¿ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れるよã†ã«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: ![](assets/en/FormObjects/hierarch15.png) -- 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) +- ユーザーãŒå±•開アイコンをクリックã™ã‚‹ã¨ `On Expand` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ `LISTBOX GET CELL POSITION` コマンドã¯ã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚»ãƒ«ã‚’è¿”ã™ã®ã§ã€é©åˆ‡ãªéšŽå±¤ã‚’構築ã—ã¾ã™: 先頭ã®é…列ã«ç¹°ã‚Šè¿”ã—ã®å€¤ã‚’設定ã—ã€2番目ã®é…列ã«ã¯ `SELECTION TO ARRAY` コマンドã‹ã‚‰å¾—られる値を設定ã—ã¾ã™ã€‚ãã—ã¦`LISTBOX INSERT ROWS` コマンドを使用ã—ã¦å¿…è¦ãªã ã‘行を挿入ã—ã¾ã™ã€‚ ![](assets/en/FormObjects/hierarch16.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) +- ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæŠ˜ã‚ŠãŸãŸã¿ã‚¢ã‚¤ã‚³ãƒ³ã‚’クリックã™ã‚‹ã¨ `On Collapse` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ `LISTBOX GET CELL POSITION` コマンドã¯ã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚»ãƒ«ã‚’è¿”ã™ã®ã§ã€ `LISTBOX DELETE ROWS` コマンドを使用ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‹ã‚‰å¿…è¦ãªã ã‘行を削除ã—ã¾ã™ã€‚ -- 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 -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) -### Configuring an object array column -To assign an object array to a list box column, you just need to set the object array name in either the Property list ("Variable Name" field), or using the [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-INSERT-COLUMN.301-4311153.en.html) command, like with any array-based column. In the Property list, you can now select Object as a "Expression Type" for the column: +### オブジェクトé…列カラムã®è¨­å®š + +オブジェクトé…列をリストボックスã®ã‚«ãƒ©ãƒ ã«å‰²ã‚Šå½“ã¦ã‚‹ã«ã¯ã€ãƒ—ロパティリスト (ã® "変数å" 欄) ã«ã‚ªãƒ–ジェクトé…列åを設定ã™ã‚‹ã‹ã€é…列型ã®ã‚«ãƒ©ãƒ ã®ã‚ˆã†ã« [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-INSERT-COLUMN.301-4505224.ja.html) コマンドを使用ã—ã¾ã™ã€‚ プロパティリスト内ã§ã¯ã€ã‚«ãƒ©ãƒ ã«ãŠã„㦠"å¼ã‚¿ã‚¤ãƒ—" ã«ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã§ãã¾ã™: ![](assets/en/FormObjects/listbox_column_objectArray_config.png) -Standard properties related to coordinates, size, and style are available for object columns. You can define them using the Property list, or by programming the style, font color, background color and visibility for each row of an object-type list box column. These types of columns can also be hidden. +オブジェクトカラムã«å¯¾ã—ã¦ã¯ã€åº§æ¨™ã€ã‚µã‚¤ã‚ºã€ã‚¹ã‚¿ã‚¤ãƒ«ãªã©ã«é–¢é€£ã—ãŸæ¨™æº–ã®ãƒ—ロパティãŒä½¿ç”¨å¯èƒ½ã§ã™ã€‚ プロパティリストを使用ã—ã¦å®šç¾©ã™ã‚‹æ–¹æ³•ã®ã»ã‹ã«ã‚‚ã€ã‚ªãƒ–ジェクト型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã®ãれãžã‚Œã®è¡Œã«å¯¾ã—ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã€ãƒ•ォントカラーã€èƒŒæ™¯è‰²ã€è¡¨ç¤ºçŠ¶æ…‹ã‚’ãƒ—ãƒ­ã‚°ãƒ©ãƒ ã§å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“れらã®ã‚¿ã‚¤ãƒ—ã®ã‚«ãƒ©ãƒ ã¯éžè¡¨ç¤ºã«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ -However, the Data Source theme is not available for object-type list box columns. In fact, the contents of each column cell are based on attributes found in the corresponding element of the object array. Each array element can define: +ã—ã‹ã—ãªãŒã‚‰ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒžã¯ã€ã‚ªãƒ–ジェクト型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã¯é¸æŠžã§ãã¾ã›ã‚“。 実際ã€ã‚«ãƒ©ãƒ ã®å„セルã®ä¸­èº«ã¯ã€ãれã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトé…列ã®è¦ç´ ã®å±žæ€§ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ é…列ã®å„オブジェクトè¦ç´ ã«ã¯ã€ä»¥ä¸‹ã‚’定義ã§ãã¾ã™: -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: +値ã®åž‹ (å¿…é ˆ): テキストã€ã‚«ãƒ©ãƒ¼ã€ã‚¤ãƒ™ãƒ³ãƒˆã€ä»– 値ãã®ã‚‚ã® (ä»»æ„): 入力/出力ã«ä½¿ç”¨ セルã®å†…容表示 (ä»»æ„): ボタンã€ãƒªã‚¹ãƒˆã€ä»– 追加ã®è¨­å®š (ä»»æ„): 値ã®åž‹ã«ã‚ˆã‚Šã¾ã™ ã“れらã®ãƒ—ロパティを定義ã™ã‚‹ã«ã¯ã€é©åˆ‡ãªå±žæ€§ã‚’オブジェクト内ã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (使用å¯èƒ½ãªå±žæ€§ã¯ä»¥ä¸‹ã«ä¸€è¦§ã¨ã—ã¦ã¾ã¨ã‚ã¦ã‚りã¾ã™)。 ãŸã¨ãˆã°ã€ä»¥ä¸‹ã‚ˆã†ãªç°¡å˜ãªã‚³ãƒ¼ãƒ‰ã‚’使用ã—ã¦ã‚ªãƒ–ジェクトカラム内㫠"Hello World!" 書ã込むã“ã¨ãŒã§ãã¾ã™: -```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 +```4d +ARRAY OBJECT(obColumn;0) // カラムé…列 + C_OBJECT($ob) // 第一è¦ç´  + OB SET($ob;"valueType";"text") // 値ã®åž‹ã‚’定義 (å¿…é ˆ) + OB SET($ob;"value";"Hello World!") // 値を定義 APPEND TO ARRAY(obColumn;$ob) ``` ![](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. - -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 input | drop-down menu (required list) or combo box (choice list) | -| 実数 | 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 | テキスト | -| 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 | -| ---------- | ---------------------------------------------------------- | ----------------------- | -| テキスト | same as defined in object | any (no control) | -| 実数 | 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 | -| ブール | check box | N/A | -| color | N/A | N/A | -| event | N/A | N/A | - - -### Attributes - -Each element of the object array is an object that can contain one or more attributes that will define the cell contents and data display (see example above). - -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 | テキスト | 実数 | integer | boolean | color | event | -| --------------------- | --------------------------------------- | ---- | -- | ------- | ------- | ----- | ----- | -| *Attributes* | *説明* | | | | | | | -| 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ã¨ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º + +リストボックスカラムã«ã‚ªãƒ–ジェクトé…列ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ã¨ãã€ã‚»ãƒ«ã®è¡¨ç¤ºãƒ»å…¥åŠ›ãƒ»ç·¨é›†ã®æ–¹æ³•ã¯ã€é…列ã®è¦ç´ ã® valueType 属性ã«åŸºã¥ãã¾ã™ã€‚ 次㮠valueType ã®å€¤ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +* "text": テキスト値 +* "real": セパレーターをå«ã‚€æ•°å€¤ã€‚セパレーターã®ä¾‹: \, <.>, <,> +* "integer": 整数値 +* "boolean": true/false 値 +* "color": 背景色を定義 +* "event": ラベル付ボタンを表示 + +4D 㯠"valueType" ã®å€¤ã«å¿œã˜ãŸãƒ‡ãƒ•ォルトã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã‚’使用ã—ã¾ã™ (ã¤ã¾ã‚Šã€"text" ã¨è¨­å®šã™ã‚Œã°ãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ›ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆãŒè¡¨ç¤ºã•れã€"boolean" ã¨è¨­å®šã™ã‚Œã°ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™)。ã—ã‹ã—ã€ã‚ªãƒ—ションを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦è¡¨ç¤ºæ–¹æ³•ã®é¸æŠžãŒå¯èƒ½ãªå ´åˆã‚‚ã‚りã¾ã™ (ãŸã¨ãˆã°ã€"real" ã¨è¨­å®šã—ãŸå ´åˆã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンメニューã¨ã—ã¦ã‚‚表示ã§ãã¾ã™)。 以下ã®ä¸€è¦§ã¯ãれãžã‚Œã®å€¤ã®åž‹ã«å¯¾ã—ã¦ã®ãƒ‡ãƒ•ォルトã®è¡¨ç¤ºæ–¹æ³•ã¨ã€ä»–ã«é¸æŠžå¯èƒ½ãªè¡¨ç¤ºæ–¹ã®ä¸€è¦§ã‚’表ã—ã¦ã„ã¾ã™: + +| valueType | デフォルトã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆ | ä»–ã«é¸æŠžå¯èƒ½ãªã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆ | +| --------- | ----------------------- | --------------------------------------------------------- | +| text | テキスト入力 | ドロップダウンメニュー (指定リスト) ã¾ãŸã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ (é¸æŠžãƒªã‚¹ãƒˆ) | +| 実数 | 管ç†ã•れãŸãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ› (æ•°å­—ã¨ã‚»ãƒ‘レーター) | ドロップダウンメニュー (指定リスト) ã¾ãŸã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ (é¸æŠžãƒªã‚¹ãƒˆ) | +| integer | 管ç†ã•れãŸãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ› (æ•°å­—ã®ã¿) | ドロップダウンメニュー (指定リスト) ã¾ãŸã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ (é¸æŠžãƒªã‚¹ãƒˆ) ã¾ãŸã¯ã‚¹ãƒªãƒ¼ã‚¹ãƒ†ãƒ¼ãƒˆãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ | +| boolean | ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ | ドロップダウンメニュー (指定リスト) | +| color | 背景色 | text | +| event | ラベル付ボタン | | +| | | ã™ã¹ã¦ã®ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆã«ã¯ã€å˜ä½åˆ‡ã‚Šæ›¿ãˆãƒœã‚¿ãƒ³ ã¾ãŸã¯ çœç•¥ãƒœã‚¿ãƒ³ を追加ã§ã‚»ãƒ«ã«ä»˜å±žã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ | + +セルã®è¡¨ç¤ºã¨ã‚ªãƒ—ションã¯ã€ã‚ªãƒ–ジェクト内ã®ç‰¹å®šã®å±žæ€§ã‚’使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦è¨­å®šã§ãã¾ã™ (以下をå‚ç…§ãã ã•ã„)。 + +#### 表示フォーマットã¨å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ + +オブジェクト型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚«ãƒ©ãƒ ã«ãŠã„ã¦ã¯ã€è¡¨ç¤ºãƒ•ォーマットã¨å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’è¨­å®šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“れらã¯å€¤ã®åž‹ã«å¿œã˜ã¦è‡ªå‹•çš„ã«å®šç¾©ã•れã¾ã™ã€‚ ã©ã®ã‚ˆã†ã«å®šç¾©ã•れるã‹ã«ã¤ã„ã¦ã¯ã€ä»¥ä¸‹ä¸€è¦§ã«ã¾ã¨ã‚ã¦ã‚りã¾ã™: + +| 値ã®åž‹ | デフォルトã®ãƒ•ォーマット | 入力コントロール | +| ------- | ---------------------------------------- | ---------------------- | +| text | オブジェクト内ã§å®šç¾©ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ | 制é™ãªã— | +| 実数 | オブジェクト内ã§å®šç¾©ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ (システムã®å°æ•°ç‚¹ã‚»ãƒ‘レーターを使用) | "0-9" 㨠"." 㨠"-" | +| | | min>=0 ã®å ´åˆã€"0-9" 㨠"." | +| integer | オブジェクト内ã§å®šç¾©ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ | "0-9" 㨠"-" | +| | | min>=0 ã®å ´åˆã€"0-9" 㨠"." | +| ブール | ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ | N/A | +| color | N/A | N/A | +| event | N/A | N/A | + +### 属性 + +オブジェクトé…列ã®å„è¦ç´ ã¯ã€ã‚»ãƒ«ã®ä¸­èº«ã¨ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºã‚’定義ã™ã‚‹ä¸€ã¤ä»¥ä¸Šã®å±žæ€§ã‚’æ ¼ç´ã™ã‚‹ã‚ªãƒ–ジェクトã§ã™ (上記ã®ä¾‹ã‚’å‚ç…§ãã ã•ã„)。 + +唯一必須ã®å±žæ€§ã¯ "valueType" ã§ã‚りã€ã‚µãƒãƒ¼ãƒˆã•れる値㯠"text"ã€"real"ã€"integer"ã€"boolean"ã€"color" ãã—㦠"event"ã§ã™ã€‚ 以下ã®è¡¨ã«ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ジェクトé…列ã«ãŠã„㦠"valueType"ã®å€¤ã«å¿œã˜ã¦ã‚µãƒãƒ¼ãƒˆã•れるã™ã¹ã¦ã®å±žæ€§ãŒã¾ã¨ã‚ã¦ã‚りã¾ã™ (ä»–ã®å±žæ€§ã¯ã™ã¹ã¦ç„¡è¦–ã•れã¾ã™)。 表示フォーマットã«é–¢ã—ã¦ã¯ã€ãã®æ›´ã«ä¸‹ã«è©³ç´°ãªèª¬æ˜Žã¨ä¾‹ãŒã‚りã¾ã™ã€‚ + +| | valueType | text | 実数 | integer | boolean | color | event | +| --------------------- | ------------------------ | ---- | -- | ------- | ------- | ----- | ----- | +| *属性* | *説明* | | | | | | | +| value | セルã®å€¤ (入力ã¾ãŸã¯å‡ºåŠ›) | â—‹ | â—‹ | â—‹ | | | | +| min | 最å°å€¤ | | â—‹ | â—‹ | | | | +| max | 最大値 | | â—‹ | â—‹ | | | | +| behavior | "スリーステート" ã®å€¤ | | | â—‹ | | | | +| requiredList | オブジェクト内ã§å®šç¾©ã•れãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリスト | â—‹ | â—‹ | â—‹ | | | | +| choiceList | オブジェクト内ã§å®šç¾©ã•れãŸã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ | â—‹ | â—‹ | â—‹ | | | | +| requiredListReference | 4D リストå‚ç…§ ("saveAs"ã®å€¤ã«ã‚ˆã‚‹) | â—‹ | â—‹ | â—‹ | | | | +| requiredListName | 4D リストå ("saveAs"ã®å€¤ã«ã‚ˆã‚‹) | â—‹ | â—‹ | â—‹ | | | | +| saveAs | "reference" ã¾ãŸã¯ "value" | â—‹ | â—‹ | â—‹ | | | | +| choiceListReference | 4D リストå‚ç…§ã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’表示 | â—‹ | â—‹ | â—‹ | | | | +| choiceListName | 4D リストåã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’表示 | â—‹ | â—‹ | â—‹ | | | | +| unitList | Xè¦ç´ ã®é…列 | â—‹ | â—‹ | â—‹ | | | | +| unitReference | é¸æŠžã•れãŸè¦ç´ ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ | â—‹ | â—‹ | â—‹ | | | | +| unitsListReference | å˜ä½ã®4D リストå‚ç…§ | â—‹ | â—‹ | â—‹ | | | | +| unitsListName | å˜ä½ã®4D リストå | â—‹ | â—‹ | â—‹ | | | | +| alternateButton | 切り替ãˆãƒœã‚¿ãƒ³ã‚’追加 | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | | #### 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). +セルã®å€¤ã¯ "value" 属性ã«ä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å±žæ€§ã¯å…¥åŠ›ã¨å‡ºåŠ›ã«ä½¿ç”¨ã•れるã»ã‹ã€ リストを使用ã™ã‚‹éš›ã®ãƒ‡ãƒ•ォルト値を定義ã™ã‚‹ã®ã«ã‚‚使用ã§ãã¾ã™ (以下å‚ç…§)。 -```4d - ARRAY OBJECT(obColumn;0) //column array +````4d + ARRAY OBJECT(obColumn;0) // カラムé…列 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 + OB SET($ob1;"value";$entry) // ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ–°ã—ã„値を入力ã—ãŸå ´åˆã€ 編集ã•れãŸå€¤ã¯ $entry ã«æ ¼ç´ã•れã¾ã™ C_OBJECT($ob2) OB SET($ob2;"valueType";"real") OB SET($ob2;"value";2/3) @@ -1048,38 +936,35 @@ Cell values are stored in the "value" attribute. This attribute is used for inpu APPEND TO ARRAY(obColumn;$ob1) APPEND TO ARRAY(obColumn;$ob2) APPEND TO ARRAY(obColumn;$ob3) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_value.png) +> null 値ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ãŠã‚Šã€ç©ºã®ã‚»ãƒ«ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ -> Null values are supported and result in an empty cell. +#### min 㨠max -#### min and max +"valueType" ãŒ"real" ã¾ãŸã¯ "integer" ã§ã‚ã‚‹ã¨ãã€min 㨠max 属性もオブジェクトã«è¨­å®šã§ãã¾ã™ (値ã¯é©åˆ‡ãªç¯„囲ã§ã€ã‹ã¤ã€valueType ã¨åŒã˜åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 -When the "valueType" is "real" or "integer", the object also accepts min and max attributes with appropriate values (values must be of the same type as the valueType). +ã“れらã®å±žæ€§ã‚’使用ã™ã‚‹ã¨å…¥åЛ値ã®ç¯„囲を管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ セルãŒè©•価ã•れãŸã¨ã (フォーカスを失ã£ãŸã¨ã)ã€å…¥åŠ›ã•れãŸå€¤ãŒ min ã®å€¤ã‚ˆã‚Šä½Žã„å ´åˆã€ã¾ãŸã¯ max ã®å€¤ã‚ˆã‚Šå¤§ãã„å ´åˆã«ã¯ã€ãã®å€¤ã¯æ‹’å¦ã•れã¾ã™ã€‚ ã“ã®å ´åˆã€å…¥åŠ›ã‚’ã™ã‚‹å‰ã®å€¤ãŒä¿æŒã•れã€tip ã¨ã—ã¦èª¬æ˜ŽãŒè¡¨ç¤ºã•れã¾ã™ã€‚ -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) #### behavior -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) | 説明 | -| --------- | ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 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 | +behavior 属性ã¯ã€å€¤ã®é€šå¸¸ã®è¡¨ç¤ºã¨ã¯ç•°ãªã‚‹è¡¨ç¤ºæ–¹æ³•ã‚’æä¾›ã—ã¾ã™ã€‚ 4D v15ã§ã¯ã€ä¸€ã¤ã ã‘ä»–ã®è¡¨ç¤ºæ–¹æ³•ãŒç”¨æ„ã•れã¦ã„ã¾ã™: +| 属性 | 使用å¯èƒ½ãªå€¤ | valueType | 説明 | +| -------- | ----------- | --------- | ---------------------------------------------------------------------------------------------------------------- | +| behavior | threeStates | integer | スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’数値ã¨ã—ã¦è¡¨ç¾ã—ã¾ã™ã€‚
          2=セミãƒã‚§ãƒƒã‚¯ã€1=ãƒã‚§ãƒƒã‚¯ã€0=ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„ã€-1=éžè¡¨ç¤ºã€-2=ãƒã‚§ãƒƒã‚¯ãªã—ãŒç„¡åŠ¹åŒ–ã€-3=ãƒã‚§ãƒƒã‚¯ãŒç„¡åŠ¹åŒ–ã€-4=セミãƒã‚§ãƒƒã‚¯ãŒç„¡åŠ¹åŒ– | ```4d C_OBJECT($ob3) @@ -1093,20 +978,19 @@ The behavior attribute provides variations to the regular representation of valu ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_behavior.png) -#### requiredList and choiceList - -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: +#### requiredList 㨠choiceList -* 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. +"choiceList" ã¾ãŸã¯ "requiredList" 属性ãŒã‚ªãƒ–ジェクト内ã«å­˜åœ¨ã—ã¦ã„ã‚‹ã¨ãã€ãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ›ã¯ä»¥ä¸‹ã®å±žæ€§ã«å¿œã˜ã¦ã€ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¾ãŸã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã§ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™: -In both cases, a "value" attribute can be used to preselect a value in the widget. +* 属性㌠"choiceList" ã®å ´åˆã€ã‚»ãƒ«ã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ã“れã¯ã¤ã¾ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å€¤ã‚’é¸æŠžã€ã¾ãŸã¯å…¥åŠ›ã§ãã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ +* 属性㌠"requiredList" ã®å ´åˆã€ã‚»ãƒ«ã¯ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ã“れã¯ã¤ã¾ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒªã‚¹ãƒˆã«æä¾›ã•れã¦ã„る値ã‹ã‚‰ã©ã‚Œã‹ä¸€ã¤ã‚’é¸æŠžã™ã‚‹ã—ã‹ãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ -> 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. +ã©ã¡ã‚‰ã®å ´åˆã«ãŠã„ã¦ã‚‚ã€"value" 属性を使用ã—ã¦ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆå†…ã®å€¤ã‚’事å‰ã«é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ウィジェットã®å€¤ã¯é…列を通ã—ã¦å®šç¾©ã•れã¾ã™ã€‚ 既存㮠4Dリストをウィジェットã«å‰²ã‚Šå½“ã¦ãŸã„å ´åˆã€"requiredListReference"ã€"requiredListName"ã€"choiceListReference"ã€ã¾ãŸã¯ "choiceListName" 属性を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -例: +例: -* You want to display a drop-down list with only two options: "Open" or "Closed". "Closed" must be preselected: +* é¸æŠžè‚¢ãŒäºŒã¤ ("Open" ã¾ãŸã¯ "Closed") ã—ã‹ãªã„ドロップダウンリストを表示ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™ã€‚ デフォルトã§ã¯ "Closed" ãŒé¸æŠžã•れãŸçŠ¶æ…‹ã«ã—ãŸã„ã¨ã—ã¾ã™: ```4d ARRAY TEXT($RequiredList;0) @@ -1117,10 +1001,9 @@ In both cases, a "value" attribute can be used to preselect a value in the widge 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: +* 整数値ã§ã‚れã°ã™ã¹ã¦å—ã‘入れå¯èƒ½ãªçŠ¶æ…‹ã«ã—ã¦ãŠã„ãŸä¸Šã§ã€ã‚‚ã£ã¨ã‚‚一般的ãªå€¤ã‚’æç¤ºã™ã‚‹ãŸã‚ã«ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™: ```4d ARRAY LONGINT($ChoiceList;0) @@ -1131,24 +1014,22 @@ In both cases, a "value" attribute can be used to preselect a value in the widge APPEND TO ARRAY($ChoiceList;100) C_OBJECT($ob) OB SET($ob;"valueType";"integer") - OB SET($ob;"value";10) //10 as default value + OB SET($ob;"value";10) // 10 をデフォルト値ã¨ã—ã¦ä½¿ç”¨ OB SET ARRAY($ob;"choiceList";$ChoiceList) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_commonValues.png) -#### requiredListName and requiredListReference - -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. +#### requiredListName 㨠requiredListReference -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. +"requiredListName" 㨠"requiredListReference" 属性を使用ã™ã‚‹ã¨ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ (ツールボックス内) ã¾ãŸã¯ãƒ—ログラミングã«ã‚ˆã£ã¦ (`New list` コマンドを使用ã—ã¦) 4Dã§å®šç¾©ã•れãŸãƒªã‚¹ãƒˆã‚’リストボックスセル内ã«ãŠã„ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ セルã¯ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストã¨ã—ã¦è¡¨ç¤ºã•れるよã†ã«ãªã‚Šã¾ã™ã€‚ ã“れã¯ã¤ã¾ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒªã‚¹ãƒˆå†…ã«æä¾›ã•れãŸå€¤ã®ã©ã‚Œã‹ä¸€ã¤ã®ã¿ã‚’é¸æŠžã§ãã‚‹ã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ -> * 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". +"requiredListName" ã¾ãŸã¯ "requiredListReference" ã¯ã€ãƒªã‚¹ãƒˆã®ä½œæˆå…ƒã«å¿œã˜ã¦ä½¿ã„分ã‘ã¾ã™ã€‚リストãŒãƒ„ールボックスã§ä½œæˆã•れãŸå ´åˆã€ãƒªã‚¹ãƒˆåを渡ã—ã¾ã™ã€‚リストãŒãƒ—ログラミングã«ã‚ˆã£ã¦å®šç¾©ã•れãŸå ´åˆã¯ã€ãƒªã‚¹ãƒˆã®å‚照を渡ã—ã¾ã™ã€‚ ã©ã¡ã‚‰ã®å ´åˆã«ãŠã„ã¦ã‚‚ã€"value" 属性を使用ã—ã¦ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆå†…ã®å€¤ã‚’事å‰ã«é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> * ã“れらã®å€¤ã‚’å˜ç´”ãªé…列を通ã—ã¦å®šç¾©ã—ãŸã„å ´åˆã¯ã€"requiredList" 属性を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> * リストãŒå®Ÿæ•°å€¤ã‚’表ã™ãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã€å°æ•°ç‚¹ã¯ãƒ­ãƒ¼ã‚«ãƒ«è¨­å®šã«é–¢ã‚らãšã€ãƒ”リオド (".") ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚例: "17.6" "1234.456" -例: +例: -* 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: +* ツールボックスã§å®šç¾©ã•れ㟠"colors" リスト ("blue"ã€"yellow"ã€ãã—㦠"green" ã®å€¤ã‚’æ ¼ç´) ã«åŸºã¥ã„ãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリストを表示ã—ã€å€¤ã¨ã—ã¦ä¿å­˜ã—ã€ãƒ‡ãƒ•ォルトã®è¡¨ç¤ºã¯ "blue" ã«ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™: ![](assets/en/FormObjects/listbox_column_objectArray_colors.png) @@ -1159,10 +1040,9 @@ Use "requiredListName" or "requiredListReference" depending on the origin of the 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: +* プログラミングã«ã‚ˆã£ã¦å®šç¾©ã•れãŸãƒªã‚¹ãƒˆã«åŸºã¥ã„ãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリストを表示ã—ã€å‚ç…§ã¨ã—ã¦ä¿å­˜ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™: ```4d <>List:=New list @@ -1173,56 +1053,56 @@ Use "requiredListName" or "requiredListReference" depending on the origin of the C_OBJECT($ob) OB SET($ob;"valueType";"integer") OB SET($ob;"saveAs";"reference") - OB SET($ob;"value";2) //displays London by default + OB SET($ob;"value";2) // デフォルトã§Londonを表示 OB SET($ob;"requiredListReference";<>List) ``` - ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) - -#### choiceListName and choiceListReference + ![](assets/en/FormObjects/listbox_column_objectArray_cities.png) -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. +#### choiceListName 㨠choiceListReference -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. +"choiceListName" 㨠"choiceListReference" 属性を使用ã™ã‚‹ã¨ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ (ツールボックス内) ã¾ãŸã¯ãƒ—ログラミングã«ã‚ˆã£ã¦ (`New list` コマンドを使用ã—ã¦) 4Dã§å®šç¾©ã•れãŸãƒªã‚¹ãƒˆã‚’リストボックスセル内ã«ãŠã„ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ セルã¯ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã¨ã—ã¦è¡¨ç¤ºã•れるよã†ã«ãªã‚Šã¾ã™ã€‚ã“れã¯ã¤ã¾ã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯å€¤ã‚’é¸æŠžã€ã¾ãŸã¯å…¥åŠ›ã§ãã‚‹ã¨ã„ã†ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ -> * 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". +"choiceListName" ã¾ãŸã¯ "choiceListReference" ã¯ã€ãƒªã‚¹ãƒˆã®ä½œæˆå…ƒã«å¿œã˜ã¦ä½¿ã„分ã‘ã¾ã™ã€‚リストãŒãƒ„ールボックスã§ä½œæˆã•れãŸå ´åˆã€ãƒªã‚¹ãƒˆåを渡ã—ã¾ ã™ã€‚リストãŒãƒ—ログラミングã«ã‚ˆã£ã¦å®šç¾©ã•れãŸå ´åˆã¯ã€ãƒªã‚¹ãƒˆã®å‚照を渡ã—ã¾ã™ã€‚ ã©ã¡ã‚‰ã®å ´åˆã«ãŠã„ã¦ã‚‚ã€"value" 属性を使用ã—ã¦ã‚¦ã‚£ã‚¸ã‚§ãƒƒãƒˆå†…ã®å€¤ã‚’事å‰ã«é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> * ã“れらã®å€¤ã‚’å˜ç´”ãªé…列を通ã—ã¦å®šç¾©ã—ãŸã„å ´åˆã¯ã€"choiceList" 属性を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> * リストãŒå®Ÿæ•°å€¤ã‚’表ã™ãƒ†ã‚­ã‚¹ãƒˆã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã€å°æ•°ç‚¹ã¯ãƒ­ãƒ¼ã‚«ãƒ«è¨­å®šã«é–¢ã‚らãšã€ãƒ”リオド (".") ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚例: "17.6" "1234.456" -例: +例: -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: +ツールボックスã§å®šç¾©ã•れ㟠"colors" リスト ("blue"ã€"yellow"ã€ãã—㦠"green" ã®å€¤ã‚’æ ¼ç´) ã«åŸºã¥ã„ãŸãƒ‰ãƒ­ãƒƒãƒ—ダウンリストを表示ã—ã€å€¤ã¨ã—ã¦ä¿å­˜ã—ã€ãƒ‡ãƒ•ォルトã®è¡¨ç¤ºã¯ "green" ã«ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™: ![](assets/en/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ã€unitsListName〠unitsListReference 㨠unitReference -* "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. +特定ã®å€¤ã‚’使用ã™ã‚‹ã“ã¨ã§ã€ã‚»ãƒ«ã®å€¤ã«é–¢é€£ã—ãŸå˜ä½ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (*例*: "10 cm", "20 pixels" ç­‰)。 å˜ä½ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®å±žæ€§ã®ã©ã‚Œã‹ä¸€ã¤ã‚’使用ã—ã¾ã™: -Regardless of the way the unit list is defined, it can be associated with the following attribute: +* "unitsList": 利用å¯èƒ½ãªå˜ä½ (例: "cm"ã€"inches"ã€"km"ã€"miles"ã€ä»–) を定義ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ x è¦ç´ ã‚’æ ¼ç´ã—ãŸé…列。 オブジェクト内ã§å˜ä½ã‚’定義ã™ã‚‹ãŸã‚ã«ã¯ã€ã“ã®å±žæ€§ã‚’使用ã—ã¾ã™ã€‚ +* "unitsListReference": 利用å¯èƒ½ãªå˜ä½ã‚’å«ã‚“ã  4Dリストã¸ã®å‚照。 [New list](https://doc.4d.com/4Dv18/4D/18/New-list.301-4505738.ja.html) コマンドã§ä½œæˆã•れ㟠4D リストã§å˜ä½ã‚’定義ã™ã‚‹ãŸã‚ã«ã¯ã€ã“ã®å±žæ€§ã‚’使用ã—ã¾ã™ã€‚ +* "unitsListName": 利用å¯èƒ½ãªå˜ä½ã‚’å«ã‚“ã ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ä½œæˆã•れ㟠4Dリストå。 ツールボックスã§ä½œæˆã•れ㟠4Dリストã§å˜ä½ã‚’定義ã™ã‚‹ãŸã‚ã«ã¯ã€ã“ã®å±žæ€§ã‚’使用ã—ã¾ã™ã€‚ -* "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.) +* "unitReference": "unitList"ã€"unitsListReference" ã¾ãŸã¯ "unitsListName" ã®å€¤ãƒªã‚¹ãƒˆå†…ã§é¸æŠžã•れãŸé …ç›®ã¸ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (1ã‹ã‚‰x) ã‚’æ ¼ç´ã™ã‚‹å˜ä¸€ã®å€¤ã€‚ -例: +カレントã®å˜ä½ã¯ã€ãƒœã‚¿ãƒ³ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ã“ã®ãƒœã‚¿ãƒ³ã¯ã€ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ãŸã³ã« "unitList"ã€"unitsListReference" ã¾ãŸã¯ "unitsListName" ã®å€¤ã‚’切り替ãˆã¦ã„ãã¾ã™ (例: "pixels" -> "rows" -> "cm" -> "pixels" -> ç­‰)。 -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 +数値ã®å…¥åŠ›ã¨ã€ãã®å¾Œã«å¯èƒ½æ€§ã®ã‚る二ã¤ã®å˜ä½ ("lines" ã¾ãŸã¯ "pixels") ã‚’ç¶šã‘ã¦è¡¨ç¤ºã—ãŸã„å ´åˆã‚’考ãˆã¾ã™ã€‚ カレントã®å€¤ã¯ "2" + "lines" ã¨ã€ オブジェクト内ã§ç›´æŽ¥å®šç¾©ã•れãŸå€¤ ("unitsList" 属性) を使用ã™ã‚‹ã‚‚ã®ã¨ã—ã¾ã™: + +````4d ARRAY TEXT($_units;0) APPEND TO ARRAY($_units;"lines") APPEND TO ARRAY($_units;"pixels") @@ -1231,17 +1111,17 @@ OB SET($ob;"valueType";"integer") OB SET($ob;"value";2) // 2 "units" OB SET($ob;"unitReference";1) //"lines" OB SET ARRAY($ob;"unitsList";$_units) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_unitList.png) #### alternateButton -If you want to add an ellipsis button [...] to a cell, you just need to pass the "alternateButton" with the True value in the object. The button will be displayed in the cell automatically. +セルã«çœç•¥ãƒœã‚¿ãƒ³ [...] を追加ã—ãŸã„å ´åˆã€"alternateButton" 属性㫠true ã®å€¤ã‚’入れã¦ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ¸¡ã™ã ã‘ã§ã™ã€‚ çœç•¥ãƒœã‚¿ãƒ³ã¯è‡ªå‹•çš„ã«ã‚»ãƒ«å†…ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -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). +ã“ã®ãƒœã‚¿ãƒ³ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆã€`On Alternate Click` イベントãŒç”Ÿæˆã•れã€ãã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’自由ã«ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (è©³ç´°ãªæƒ…å ±ã«é–¢ã—ã¦ã¯ [イベント管ç†](#イベント管ç†) ã®ç« ã‚’å‚ç…§ãã ã•ã„)。 -例: +例: ```4d C_OBJECT($ob1) @@ -1253,47 +1133,52 @@ OB SET($ob;"value";$entry) ![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + #### color valueType -The "color" valueType allows you to display either a color or a text. +"color" valueType を使用ã™ã‚‹ã¨ã€è‰²ã€ã¾ãŸã¯è‰²ã‚’表ã™ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* å€¤ãŒæ•°å­—ã®å ´åˆã€è‰²ä»˜ã‘ã•れãŸé•·æ–¹å½¢ãŒã‚»ãƒ«å†…ã«è¡¨ç¤ºã•れã¾ã™ã€‚ 例: -* If the value is a number, a colored rectangle is drawn inside the cell. 例: - - ```4d + ````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) + + +* 値ãŒãƒ†ã‚­ã‚¹ãƒˆã®å ´åˆã€ãã®ãƒ†ã‚­ã‚¹ãƒˆãŒè¡¨ç¤ºã•れã¾ã™ (*例*: "value";"Automatic")。 -* If the value is a text, then the text is displayed (*e.g.*: "value";"Automatic"). #### event valueType -The "event" valueType displays a simple button that generates an `On Clicked` event when clicked. No data or value can be passed or returned. +"event" valueType を使用ã™ã‚‹ã¨ã€ã‚¯ãƒªãƒƒã‚¯ã—ãŸéš›ã« `On Clicked` イベントを生æˆã™ã‚‹å˜ç´”ãªãƒœã‚¿ãƒ³ã‚’表示ã—ã¾ã™ã€‚ データã¾ãŸã¯å€¤ã‚’渡ã™/è¿”ã™ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -Optionally, you can pass a "label" attribute. +オプションã¨ã—ã¦ã€"label" 属性を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -例: +例: -```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 -Several events can be handled while using an object list box array: +### ã‚¤ãƒ™ãƒ³ãƒˆç®¡ç† +オブジェクトリストボックスé…列を使用ã—ã¦ã„ã‚‹éš›ã«ã¯ã€è¤‡æ•°ã®ã‚¤ãƒ™ãƒ³ãƒˆã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* **On Data Change**: 以下ã®å ´æ‰€ã«ãŠã„ã¦ã€ã©ã‚“ãªå€¤ã§ã‚‚変更ã•れãŸå ´åˆã«ã¯ `On Data Change` イベントãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™: + * テキスト入力 + * ドロップダウンリスト + * コンボボックスエリア + * å˜ä½ãƒœã‚¿ãƒ³ (値 x ãŒå€¤ x+1 ã¸ã¨ã‚¹ã‚¤ãƒƒãƒã—ãŸã¨ã) + * ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ (ãƒã‚§ãƒƒã‚¯/ãƒã‚§ãƒƒã‚¯ãªã—ã®çŠ¶æ…‹ãŒã‚¹ã‚¤ãƒƒãƒã—ãŸã¨ã) +* **On Clicked**: ユーザーãŒã€"event" *valueType* 属性を使用ã—ã¦å®Ÿè£…ã•れãŸãƒœã‚¿ãƒ³ã‚’クリックã—ãŸå ´åˆã€`On Clicked` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ—ログラマーã«ã‚ˆã£ã¦ç®¡ç†ã•れã¾ã™ã€‚ +* **On Alternative Click**: ユーザーãŒçœç•¥ãƒœã‚¿ãƒ³ ("alternateButton" 属性) をクリックã—ãŸå ´åˆã€`On Alternative Click` イベントãŒç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ãƒ—ログラマーã«ã‚ˆã£ã¦ç®¡ç†ã•れã¾ã™ã€‚ + + -* **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 diff --git a/website/translated_docs/ja/FormObjects/pictureButton_overview.md b/website/translated_docs/ja/FormObjects/pictureButton_overview.md index 8a7e2cc5b9c0df..14d483218083dc 100644 --- a/website/translated_docs/ja/FormObjects/pictureButton_overview.md +++ b/website/translated_docs/ja/FormObjects/pictureButton_overview.md @@ -1,66 +1,63 @@ --- id: pictureButtonOverview -title: Picture Button +title: ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ --- -## æ¦‚è¦ +ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã¯ [標準ã®ãƒœã‚¿ãƒ³](button_overview.md) ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€ 3ã¤ã®çŠ¶æ…‹ (有効ã€ç„¡åйã€ã‚¯ãƒªãƒƒã‚¯) ã‚’æŒã¦ã‚‹æ¨™æº–ボタンã¨ã¯ç•°ãªã‚Šã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã§ã¯ã€ãã®åå‰ãŒè¡¨ã‚ã™ã‚ˆã†ã«ãれãžã‚Œã®çŠ¶æ…‹ã‚’åˆ¥ã€…ã®ãƒ”クãƒãƒ£ãƒ¼ã«ã‚ˆã‚Šè¡¨ã‚ã—ã¾ã™ã€‚ -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. +ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã¯ã€æ¬¡ã® 2ã¤ã®æ–¹æ³•ã§ä½¿ç”¨ã—ã¾ã™: -Picture buttons can be used in two ways: +* フォーム上ã®ã‚³ãƒžãƒ³ãƒ‰ãƒœã‚¿ãƒ³ã¨ã—ã¦ã€‚ ã“ã®å ´åˆã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã«ã¯é€šå¸¸ 4種類ã®çŠ¶æ…‹ãŒã‚りã¾ã™ (有効ã€ç„¡åйã€ã‚¯ãƒªãƒƒã‚¯ã€ãƒ­ãƒ¼ãƒ«ã‚ªãƒ¼ãƒãƒ¼)。 + ãŸã¨ãˆã°ã€1行 4列ã‹ã‚‰ãªã‚‹ã‚µãƒ ãƒãƒ¼ãƒ«ãƒ†ãƒ¼ãƒ–ルã®å ´åˆã€å„サムãƒãƒ¼ãƒ«ã¯ãƒ‡ãƒ•ォルトã€ã‚¯ãƒªãƒƒã‚¯ã€ãƒ­ãƒ¼ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã€ç„¡åйã¨ã„ã†çŠ¶æ…‹ã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ -* 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. + | プロパティ | JSON å | 値 | + | ------------- | ---------------------- | ---- | + | 行 | rowCount | 1 | + | 列 | columnCount | 4 | + | ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹ | switchBackWhenReleased | true | + | ロールオーãƒãƒ¼åŠ¹æžœ | switchWhenRollover | true | + | ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用 | useLastFrameAsDisabled | true | -| プロパティ | JSON å | çµæžœ | -| -------------------------- | ---------------------- | ---- | -| 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 | - - -* 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: +* 複数ã®é¸æŠžé …ç›®ã®ä¸­ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«é¸ã°ã›ã‚‹ãŸã‚ã®ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã¨ã—ã¦ã€‚ ã“ã®å ´åˆã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã‚’ãƒãƒƒãƒ—アップピクãƒãƒ£ãƒ¼ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ä»£ã‚りã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) ã§ã¯ã™ã¹ã¦ã®é¸æŠžè‚¢ãŒ (ãƒãƒƒãƒ—アップメニューã®é …ç›®ã¨ã—ã¦) åŒæ™‚ã«è¡¨ç¤ºã•れã¾ã™ã€‚他方ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã¯ã€é¸æŠžå€™è£œã‚’連続的ã«è¡¨ç¤ºã—ã¾ã™ (ボタンをクリックã™ã‚‹åº¦ã«å¤‰ã‚りã¾ã™)。 + 次ã«ç¤ºã™ã®ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®ä¾‹ã§ã™ã€‚ ãŸã¨ãˆã°ã€ã‚«ã‚¹ã‚¿ãƒ ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã€ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¿ãƒ•ェース言語をé¸ã°ã›ãŸã„ã‚‚ã®ã¨ã—ã¾ã™ã€‚ ãã“ã§ä¸‹å›³ã®ã‚ˆã†ã«ã€é¸æŠžå€™è£œã‚’ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã¨ã—ã¦ã‚«ã‚¹ã‚¿ãƒ ãƒ—ロパティダイアログボックスã«çµ„ã¿è¾¼ã¿ã¾ã™: ![](assets/en/FormObjects/button_pictureButton.png) -Clicking the object changes the picture. +オブジェクトをクリックã™ã‚‹ã¨ãƒ”クãƒãƒ£ãƒ¼ãŒå¤‰ã‚りã¾ã™ã€‚ + -## Using picture buttons +## ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®ä½¿ç”¨ -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) +1. ã¾ãšåˆã‚ã« 1ã¤ã®ç”»åƒã‚’用æ„ã—ã€ä¸€é€£ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’横ã€ç¸¦ã€ã¾ãŸã¯ç¸¦æ¨ªã®æ ¼å­çжã«ä¸¦ã¹ã¦ãã®ä¸­ã«ç´ã‚ã¦ãŠãã¾ã™ã€‚ -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) -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. +ピクãƒãƒ£ãƒ¼ã¯ã€ç¸¦ã€æ¨ªã€ã¾ãŸã¯ç¸¦æ¨ªæ ¼å­çŠ¶ã«æ•´ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (上図をå‚ç…§)。 ピクãƒãƒ£ãƒ¼ã‚’æ ¼å­çжã«ä¸¦ã¹ãŸå ´åˆã€å„ピクãƒãƒ£ãƒ¼ã«ã¯ä¸Šã®è¡Œã‹ã‚‰é †ã«å·¦ã‹ã‚‰å³ã¸ã¨ã€0ã‹ã‚‰å§‹ã¾ã‚‹ç•ªå·ãŒæŒ¯ã‚‰ã‚Œã¾ã™ã€‚ ãŸã¨ãˆã°ã€4行㨠3åˆ—ã§æ§‹æˆã•れる格å­ã«ãŠã„ã¦ã€2行目㮠2番目ã®ç”»åƒã®ç•ªå·ã¯ 4 ã«ãªã‚Šã¾ã™ (上ã®ä¾‹ã§ã¯è‹±å›½æ——)。 -3. Define the graphic's [Rows and Columns](properties_Crop.md) properties. +2. プロジェクト㮠Resouces フォルダーã«ç”»åƒãŒã‚ã‚‹ã®ã‚’確èªã—ã€ãã®ãƒ•ァイルパスを [パスå](properties_Picture.md#パスå) プロパティã«å…¥åŠ›ã—ã¾ã™ã€‚ -4. Specify when the images change by selecting appropriate [animation](properties_Animation.md) properties. +3. ç”»åƒã® [行ã¨åˆ—](properties_Crop.md) プロパティを設定ã—ã¾ã™ã€‚ -## Animation +4. ç”»åƒã®åˆ‡ã‚Šæ›¿ãˆæ¡ä»¶ã‚’ [アニメーション](properties_Animation.md) テーマã®ãƒ—ロパティã‹ã‚‰é¸æŠžã—ã¾ã™ã€‚ -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) +- デフォルト ([アニメーションオプション](properties_Animation.md) æœªé¸æŠž) ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ç³»åˆ—ä¸­ã®æ¬¡ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ã¾ã™ã€‚**Shift** キーを押ã—ãªãŒã‚‰ã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨ã€ç³»åˆ—中ã®å‰ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ã¾ã™ã€‚ ç³»åˆ—ä¸­ã®æœ€å¾Œã®ãƒ”クãƒãƒ£ãƒ¼ã«åˆ°é”ã™ã‚‹ã¨ã€ã‚‚ã†ä¸€åº¦ã‚¯ãƒªãƒƒã‚¯ã—ã¦ã‚‚ピクãƒãƒ£ãƒ¼ã¯å¤‰ã‚りã¾ã›ã‚“。 ã¤ã¾ã‚Šã“ã®è¨­å®šã§ã¯ã€ç³»åˆ—ä¸­ã®æœ€åˆã®ãƒ”クãƒãƒ£ãƒ¼ã¸ä¸€å·¡ã—ã¦æˆ»ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 -> 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. +次ã®ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +- [å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã«æˆ»ã‚‹](properties_Animation.md#å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã«æˆ»ã‚‹) +- [ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹](properties_Animation.md#ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹) +- [ロールオーãƒãƒ¼åŠ¹æžœ](properties_Animation.md#ロールオーãƒãƒ¼åŠ¹æžœ) +- [マウス押下中ã¯è‡ªå‹•æ›´æ–°](properties_Animation.md#マウス押下中ã¯è‡ªå‹•æ›´æ–°) +- [ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用](properties_Animation.md#ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用) +- [ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用](properties_Animation.md#ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用) +> ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã« [関連付ã‘ãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ã®ã‚µãƒ ãƒãƒ¼ãƒ«ãƒ†ãƒ¼ãƒ–ルã§ç¾åœ¨è¡¨ç¤ºã•れã¦ã„るピクãƒãƒ£ãƒ¼ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ç•ªå·ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ãƒ†ãƒ¼ãƒ–ル内ã®ãƒ”クãƒãƒ£ãƒ¼ç•ªå·ã¯ 0 ã‹ã‚‰å§‹ã¾ã‚Šã¾ã™ã€‚ ## プロパティ一覧 -[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 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [タイトル](properties_Object.md#タイトル) - [CSSクラス](properties_Object.md#CSSクラス) - [パスå](properties_Picture.md#パスå) - [行](properties_Crop.md#行) - [列](properties_Crop.md#列) - [マウス押下中ã¯è‡ªå‹•æ›´æ–°](properties_Animation.md#マウス押下中ã¯è‡ªå‹•æ›´æ–°) - [å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã«æˆ»ã‚‹](properties_Animation.md#å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã«æˆ»ã‚‹) - [ロールオーãƒãƒ¼åŠ¹æžœ](properties_Animation.md#ロールオーãƒãƒ¼åŠ¹æžœ) - [ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹](properties_Animation.md#ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹) - [ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用](properties_Animation.md#ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用) - [アニメーション間隔 (tick)](properties_Animation.md#アニメーション間隔-tick) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [å·¦](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_Entry.md#ショートカット) - [表示状態](properties_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) - [ドロップ有効](properties_Action.md#ドロップ有効) diff --git a/website/translated_docs/ja/FormObjects/picturePopupMenu_overview.md b/website/translated_docs/ja/FormObjects/picturePopupMenu_overview.md index 75b226dd88aea6..291f68ad1a1b60 100644 --- a/website/translated_docs/ja/FormObjects/picturePopupMenu_overview.md +++ b/website/translated_docs/ja/FormObjects/picturePopupMenu_overview.md @@ -1,28 +1,30 @@ --- id: picturePopupMenuOverview -title: Picture Pop-up Menu +title: ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー --- -## æ¦‚è¦ +ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã¯ã€ç”»åƒã®äºŒæ¬¡å…ƒé…列を表示ã™ã‚‹ãƒãƒƒãƒ—アップメニューã§ã™ã€‚ ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューを使用ã—ã¦ã€[ピクãƒãƒ£ãƒ¼ ボタン](pictureButton_overview.md) ã‚’ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã§ä½¿ç”¨ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ä½œæˆæ–¹æ³•ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ç”¨ã®ãƒ”クãƒãƒ£ãƒ¼ã¨ä¼¼ã¦ã„ã¾ã™ã€‚ ãã®æ¦‚念㯠[ボタングリッド](buttonGrid_overview.md) ã¨åŒã˜ã§ã™ãŒã€ã‚°ãƒ©ãƒ•ィックãŒãƒ•ォームオブジェクトã§ã¯ãªããƒãƒƒãƒ—アップメニューã¨ã—ã¦ä½¿ç”¨ã•れる点ãŒç•°ãªã‚Šã¾ã™ã€‚ -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 +## ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã®ä½¿ç”¨ -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: +ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューを作æˆã™ã‚‹ã«ã¯ã€[ç”»åƒã‚’å‚ç…§](properties_Picture.md#パスå) ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 次ã®ä¾‹ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã‹ã‚‰ã‚¤ãƒ³ã‚¿ãƒ•ェース言語をé¸ã¶ã“ã¨ãŒã§ãã¾ã™ã€‚ å„言語ã¯å¯¾å¿œã™ã‚‹å›½æ——ã§è¡¨ã‚ã•れã¦ã„ã¾ã™: ![](assets/en/FormObjects/picturePopupMenu_example.png) -### Programming +### プログラミング + +ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ç®¡ç†ã§ãã¾ã™ã€‚ [ボタングリッド](buttonGrid_overview.md) ã¨åŒæ§˜ã€ãƒ”クãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå¤‰æ•°ã«ã€é¸æŠžã•れãŸè¦ç´ ã®å€¤ãŒä»£å…¥ã•れã¾ã™ã€‚ é …ç›®ãŒé¸æŠžã•れãªã‘れã°ã€ã“ã®å€¤ã¯ 0 ã«ãªã‚Šã¾ã™ã€‚ å„ピクãƒãƒ£ãƒ¼ã«ã¯ä¸Šã®è¡Œã‹ã‚‰é †ã«å·¦ã‹ã‚‰å³ã¸ã¨ç•ªå·ãŒæŒ¯ã‚‰ã‚Œã¾ã™ã€‚ -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. ### ページ指定アクション -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. +ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューã«ãƒšãƒ¼ã‚¸æŒ‡å®š (`gotoPage`) [標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) を割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ãƒ”クãƒãƒ£ãƒ¼é…列ã§é¸æŠžã•れãŸãƒ”クãƒãƒ£ãƒ¼ä½ç½®ã«ç›¸å½“ã™ã‚‹ãƒ•ォームã®ãƒšãƒ¼ã‚¸ã‚’自動的ã«è¡¨ç¤ºã—ã¾ã™ã€‚ è¦ç´ ã¯å·¦ã‹ã‚‰å³ã€ä¸Šã‹ã‚‰ä¸‹ã«å‘ã‹ã£ã¦ç•ªå·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ3番目ã®è¦ç´ ã‚’クリックã™ã‚‹ã¨ã€4D ã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォーム㮠3ページ目 (存在ã™ã‚‹å ´åˆ) を表示ã—ã¾ã™ã€‚ クリックをプログラムã‹ã‚‰ç®¡ç†ã—ãŸã„å ´åˆã¯ "動作ãªã—" ã‚’é¸æŠžã—ã¾ã™ã€‚ -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`. -## プロパティ一覧 -[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 + +## プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [CSSクラス](properties_Object.md#CSSクラス) - [パスå](properties_Picture.md#パスå) - [行](properties_Crop.md#行) - [列](properties_Crop.md#列) - [å·¦](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [太字](properties_Text.md#太字) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/pluginArea_overview.md b/website/translated_docs/ja/FormObjects/pluginArea_overview.md index 53cd0409c261ec..f274f2c8698be2 100644 --- a/website/translated_docs/ja/FormObjects/pluginArea_overview.md +++ b/website/translated_docs/ja/FormObjects/pluginArea_overview.md @@ -1,32 +1,34 @@ --- id: pluginAreaOverview -title: Plug-in Area +title: プラグインエリア --- -## æ¦‚è¦ -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: +アプリケーションを開ãéš›ã€4D㯠[アプリケーションã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](#プラグインã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«) ã•れãŸãƒ—ラグインã®ãƒªã‚¹ãƒˆã‚’内部的ã«ä½œæˆã—ã¾ã™ã€‚ ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã‚¨ãƒªã‚¢ã‚’ãƒ•ã‚©ãƒ¼ãƒ ã«æŒ¿å…¥ã™ã‚‹ã¨ã€ãã®ãƒ—ロパティリスト内㮠**タイプ** リスト ("オブジェクト"テーマ内) ã«ã¦ã€ãƒ—ラグインを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™: ![](assets/en/FormObjects/pluginArea.png) -> Some plug-ins, such as 4D Internet Commands, cannot be used in forms or external windows. When a plug-in cannot be used in a form, it does not appear in the plug-in list of the Property List. +> 一部ã®ãƒ—ラグイン (4D Internet Commands ãªã©) ã¯ãƒ•ォームやプラグインウインドウã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 プラグインãŒãƒ•ォームã§ä½¿ç”¨ã§ããªã„å ´åˆã€ãã®ãƒ—ラグインã¯ãƒ—ロパティリストã«å€™è£œã¨ã—ã¦è¡¨ç¤ºã•れã¾ã›ã‚“。 -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. +作æˆã—ãŸãƒ—ラグインエリアãŒå°ã•ã™ãŽã‚‹å ´åˆã€4Dã¯ã‚¨ãƒªã‚¢ã‚’ボタンã¨ã—ã¦è¡¨ç¤ºã—ã€ã‚¨ãƒªã‚¢ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå¤‰æ•°åãŒãã®ã‚¿ã‚¤ãƒˆãƒ«ã«ä½¿ç”¨ã•れã¾ã™ã€‚ 実行時ユーザーã¯ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ãƒ—ラグインを表示ã™ã‚‹ãŸã‚ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ -### Advanced properties -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 +プラグインã®ä½œæˆè€…ãŒè©³ç´°ã‚ªãƒ—ションをæä¾›ã—ã¦ã„ã‚‹ã¨ã€ãƒ—ロパティリスト㮠**プラグイン** テーマ内㫠[**詳細設定**](properties_Plugins.md) ボタンãŒä½¿ç”¨å¯èƒ½ã«ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ãƒ—ラグインã®åˆ¶ä½œå…ƒã«ã‚ˆã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«ã¦ãれらã®ã‚ªãƒ—ションを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +プラグインを 4D環境ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã«ã¯ã€ã¾ãš 4Dを終了ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 4Dã¯èµ·å‹•時ã«ãƒ—ラグインをロードã—ã¾ã™ã€‚ プラグインã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã«é–¢ã™ã‚‹è©³ç´°ã¯ [プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«](https://doc.4d.com/4Dv18/4D/18/Installing-plugins-or-components.300-4575696.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -## プロパティ一覧 -[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 +## プラグインã®åˆ©ç”¨ + +独自ã«ãƒ—ラグインを作æˆã—ãŸã„å ´åˆã€ã‚ªãƒ¼ãƒ—ンソースã®ãƒ—ラグイン制作キットを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚­ãƒƒãƒˆã®å…¥æ‰‹ãŠã‚ˆã³ãƒ—ラグイン作æˆã«é–¢ã™ã‚‹æƒ…報㯠[(github上ã«ã‚ã‚‹) 完全ãªã‚­ãƒƒãƒˆ](https://github.com/4d/4D-Plugin-SDK) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +## プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [プラグインã®ç¨®é¡ž](properties_Object.md#プラグインã®ç¨®é¡ž) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [詳細設定](properties_Plugins.md) - [å·¦](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_Action.md#ドラッグ有効) - [ドロップ有効](properties_Action.md#ドロップ有効) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/progressIndicator.md b/website/translated_docs/ja/FormObjects/progressIndicator.md index ed41c4db6c2bb8..95e9f356afe1bf 100644 --- a/website/translated_docs/ja/FormObjects/progressIndicator.md +++ b/website/translated_docs/ja/FormObjects/progressIndicator.md @@ -1,68 +1,67 @@ --- id: progressIndicator -title: Progress Indicator +title: 進æ—インジケーター --- -## æ¦‚è¦ -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 +## インジケーターã®ä½¿ç”¨ -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. +インジケーターを使用ã—ã¦å€¤ã®è¡¨ç¤ºã‚„設定ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«å€¤ã‚’指定ã™ã‚‹ã¨ã€ãã®å€¤ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ユーザーãŒã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ãƒã‚¤ãƒ³ãƒˆã‚’ドラッグã™ã‚‹ã¨ã€ãã®å€¤ãŒå¤‰æ›´ã•れã¾ã™ã€‚ ã“ã®å€¤ã¯ãƒ•ィールドã€å…¥åŠ›å¯ã‚ªãƒ–ジェクトã€å…¥åŠ›ä¸å¯ã‚ªãƒ–ジェクト等ã®ä»–ã®ã‚ªãƒ–ジェクトã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -The variable associated with the indicator controls the display. You place values into, or use values from, the indicator using methods. For example, a method for a field or enterable object could be used to control a progress indicator: +インジケーターã«é–¢é€£ä»˜ã‘ãŸå¤‰æ•°ã«ã‚ˆã‚Šã€ãã®è¡¨ç¤ºã‚’管ç†ã—ã¾ã™ã€‚ メソッドを用ã„ã¦ã€ã“ã®å¤‰æ•°ã«å€¤ã‚’代入ã—ãŸã‚Šã€ã¾ãŸã¯ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã®å€¤ã‚’使用ã—ãŸã‚Šã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ•ィールドã¾ãŸã¯å…¥åŠ›å¯ã‚ªãƒ–ジェクトã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ã€ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ã‚’管ç†ã§ãã¾ã™: ```4d - $vTherm:=[Employees]Salary + 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. +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ Salary フィールドã®å€¤ã‚’ vTherm 変数ã«ä»£å…¥ã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ãŸã¨ãˆã°ãƒ•ォーム上㧠Salary フィールドã®ã‚ªãƒ–ジェクトメソッドã¨ã—ã¦è¨˜è¿°ã§ãã¾ã™ã€‚ -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: +逆ã«ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã‚’使用ã—ã¦ãƒ•ィールドã®å€¤ã‚’管ç†ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ユーザーã¯ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã‚’ドラッグã—ã¦å€¤ã‚’設定ã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®é€šã‚Šã§ã™: ```4d - [Employees]Salary:=$vTherm + [Employees]Salary:=vTherm ``` -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. +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã®å€¤ã‚’ Salary フィールドã«ä»£å…¥ã—ã¾ã™ã€‚ ユーザーãŒã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã‚’ドラッグã™ã‚‹ã¨ã€Salary フィールドã®å€¤ãŒå¤‰ã‚りã¾ã™ã€‚ -## Default thermometer + +## デフォルトサーモメーター ![](assets/en/FormObjects/indicator_progressBar.png) -The thermometer is the basic progress indicator. +サーモメーターã¯ãƒ‡ãƒ•ォルトã®é€²æ—インジケーターã§ã™ã€‚ -You can display horizontal or vertical thermometers bars. This is determined by the shape of the object that you draw. +縦ã¾ãŸã¯æ¨ªã®ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ãƒãƒ¼ã‚’表示ã§ãã¾ã™ã€‚ ã©ã¡ã‚‰ã«ãªã‚‹ã‹ã¯ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ä¸Šã«æã‹ã‚ŒãŸã‚ªãƒ–ジェクトã®å½¢ã«ã‚ˆã‚Šæ±ºå®šã•れã¾ã™ã€‚ -Multiple graphical options are available: minimum/maximum values, graduations, steps. +æç”»ã«é–¢ã™ã‚‹ãƒ—ロパティをã„ãã¤ã‹è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: 最å°/最大値ã€ç›®ç››ã‚Šã®å˜ä½ã€ã‚¹ãƒ†ãƒƒãƒ—ã€ãã®ä»–ã®è¡¨ç¤ºã‚ªãƒ—ションãªã©ã§ã™ã€‚ ### プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ("æ•´æ•°", "数値", "日付", "時間" ã®ã¿) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [最å°](properties_Scale.md#最å°) - [最大](properties_Scale.md#最大) - [目盛りã®ã‚¹ãƒ†ãƒƒãƒ—](properties_Scale.md#目盛りã®ã‚¹ãƒ†ãƒƒãƒ—) - [ステップ](properties_Scale.md#ステップ) - [ラベルä½ç½®](properties_Scale.md#ラベルä½ç½®) - [目盛りを表示](properties_Scale.md#目盛りを表示) - [ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—](properties_Scale.md#ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—) - [å·¦](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [オブジェクトメソッド実行](properties_Action.md#オブジェクトメソッド実行) -[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. +**ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—** ã¯ãƒ‡ãƒ•ォルトサーモメーターã®ä¸€ç¨®ã§ã™ã€‚ ã“ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã«ã¯ [ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—](properties_Scale.md#ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—) プロパティをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ +> JSON コードã«ãŠã„ã¦ã¯ã€ãƒ‡ãƒ•ォルトサーモメーターã®ã‚ªãƒ–ジェクトã‹ã‚‰ "max" プロパティをå–り除ãã ã‘ã§ã€ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ãŒãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—ã«ãªã‚Šã¾ã™ã€‚ -> In JSON code, just remove "max" property from a default thermometer object to enable the Barber shop variant. +ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—㯠[スピナー](spinner.md) ã®ã‚ˆã†ã«é€£ç¶šã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã—ã¾ã™ã€‚ ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¯é€šå¸¸ãƒ—ログラムãŒä½•らã‹ã®å‡¦ç†ã‚’行ã£ã¦ã„ã¦ã€ãれãŒçµ‚了ã™ã‚‹æ™‚é–“ãŒäºˆæ¸¬ã§ããªã„å ´åˆã€ãã®ã“ã¨ã‚’ユーザーã«é€šçŸ¥ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ãŒé¸æŠžã•れるã¨ãƒ—ロパティリスト㮠[スケール](properties_Scale.md) テーマã¯éžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚ -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. +フォームãŒå®Ÿè¡Œã•れãŸã¨ãã€ã‚ªãƒ–ジェクトã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¯é–‹å§‹ã•れã¾ã›ã‚“。 [割り当ã¦ã‚‰ã‚ŒãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«å€¤ã‚’代入ã—ã¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’管ç†ã—ã¾ã™: -When the form is executed, the object is not animated. You manage the animation by passing a value to its [associated variable or expression](properties_Object.md#variable-or-expression): +* éž 0 値 = アニメーション開始 +* 0 = ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³åœæ­¢ -* 1 (or any value other than 0) = Start animation, -* 0 = Stop animation. ### プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ("æ•´æ•°", "数値", "日付", "時間" ã®ã¿) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—](properties_Scale.md#ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—) - [å·¦](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_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [オブジェクトメソッド実行](properties_Action.md#オブジェクトメソッド実行) -[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 +## å‚ç…§ +- [ルーラー](ruler.md) +- [ステッパー](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Action.md b/website/translated_docs/ja/FormObjects/properties_Action.md index 5043f362047f30..b46aa04d2e0b94 100644 --- a/website/translated_docs/ja/FormObjects/properties_Action.md +++ b/website/translated_docs/ja/FormObjects/properties_Action.md @@ -4,186 +4,195 @@ title: 動作 --- -* * * - +--- ## ドラッグ有効 -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. -- **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. +- **カスタム**: ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸãƒ‰ãƒ©ãƒƒã‚°æ“作ã¯ã€å½“該オブジェクトã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠`On Begin Drag` フォームイベントを発生ã•ã›ã¾ã™ã€‚ ã“れを利用ã—ã¦ã€é–‹ç™ºè€…ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦ãƒ‰ãƒ©ãƒƒã‚°ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’管ç†ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + ã¤ã¾ã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—æ“作ã®ã™ã¹ã¦ãŒé–‹ç™ºè€…ã«ã‚ˆã‚Šç®¡ç†ã•れã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã«åŸºã¥ã„ãŸã‚らゆるインターフェースを実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã¯ãƒ‡ãƒ¼ã‚¿ã®è»¢é€ã‚’å¿…ãšã—ã‚‚ä¼´ã‚ãªã„ã‚‚ã®ã‚‚å«ã¾ã‚Œã€ãƒ•ァイルを開ãや計算をトリガーã™ã‚‹ãªã©ã®ä»»æ„ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯å°‚用ã®ãƒ—ロパティã€ã‚¤ãƒ™ãƒ³ãƒˆã€`ペーストボード` テーマã®ã‚³ãƒžãƒ³ãƒ‰ç­‰ã®çµ„ã¿åˆã‚ã›ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +- **自動**: ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°å…ƒã®ãƒ•ォームオブジェクトã‹ã‚‰ãƒ†ã‚­ã‚¹ãƒˆã‚„ピクãƒãƒ£ãƒ¼ãŒ 4D ã«ã‚ˆã£ã¦ **コピー** ã•れã¾ã™ã€‚ ã“ã®ã‚³ãƒ”ーã¯ã€åŒã˜ 4Dエリア内ã€2ã¤ã® 4Dエリア間ã€4D ã¨ä»–ã®ã‚¢ãƒ—リケーション間ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€è‡ªå‹•ドラッグ (&ドロップ) を使用ã—ã¦ã€ãƒ—ログラムを使用ã›ãšã€2ã¤ã®ãƒ•ィールド間ã§å€¤ã‚’コピーã§ãã¾ã™: + ![](assets/en/FormObjects/property_automaticDragDrop.png) ![](assets/en/FormObjects/property_automaticDragDrop2.png) ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€`On Begin Drag` フォームイベントã¯ç”Ÿæˆã•れã¾ã›ã‚“。 è‡ªå‹•ãƒ‰ãƒ©ãƒƒã‚°ãŒæœ‰åйã®ã¨ãã«æ¨™æº–ã®ãƒ‰ãƒ©ãƒƒã‚°ã‚’ "強制" ã—ãŸã„å ´åˆã€ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã®é–“ **Alt** (Windows) ã¾ãŸã¯ **Option** (macOS) キーを押ã—ãªãŒã‚‰æ“作ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ãƒ”クãƒãƒ£ãƒ¼ã§ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“。 -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. +詳細ã«ã¤ã„ã¦ã¯ *4Dランゲージリファレンス* マニュアル㮠[ドラッグ&ドロップ](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------- | ------ | ------------------------------------------------------------ | -| dragging | テキスト | "none" (default), "custom", "automatic" (excluding list box) | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------- | ------ | -------------------------------------------------- | +| dragging | text | "none" (デフォルト), "custom", "automatic" (リストボックスを除ã) | #### 対象オブジェクト -[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) +[4D Write Pro エリア](writeProArea_overview.md) - [入力](input_overview.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [プラグインエリア](pluginArea_overview.md) + -#### See also -[ドロップ有効](#droppable) -* * * +#### å‚ç…§ +[ドロップ有効](#ドロップ有効) + +--- ## ドロップ有効 -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. -- **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. +- **カスタム**: ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ãŠã“ãªã‚れãŸãƒ‰ãƒ­ãƒƒãƒ—æ“作ã¯ã€å½“該オブジェクトã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠`On Drag Over` 㨠`On Drop` フォームイベントを発生ã•ã›ã¾ã™ã€‚ ã“れを利用ã—ã¦ã€é–‹ç™ºè€…ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦ãƒ‰ãƒ­ãƒƒãƒ—アクションを管ç†ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + ã¤ã¾ã‚Šã€ã‚«ã‚¹ã‚¿ãƒ ãƒ¢ãƒ¼ãƒ‰ã«ãŠã„ã¦ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—æ“作ã®ã™ã¹ã¦ãŒé–‹ç™ºè€…ã«ã‚ˆã‚Šç®¡ç†ã•れã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã«åŸºã¥ã„ãŸã‚らゆるインターフェースを実装ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã¯ãƒ‡ãƒ¼ã‚¿ã®è»¢é€ã‚’å¿…ãšã—ã‚‚ä¼´ã‚ãªã„ã‚‚ã®ã‚‚å«ã¾ã‚Œã€ãƒ•ァイルを開ãや計算をトリガーã™ã‚‹ãªã©ã®ä»»æ„ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯å°‚用ã®ãƒ—ロパティã€ã‚¤ãƒ™ãƒ³ãƒˆã€`ペーストボード` テーマã®ã‚³ãƒžãƒ³ãƒ‰ç­‰ã®çµ„ã¿åˆã‚ã›ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ +- **自動**: ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€4D ã¯å¯èƒ½ãªé™ã‚Šè‡ªå‹•ã§ã€ã‚ªãƒ–ジェクトã«ãƒ‰ãƒ­ãƒƒãƒ—ã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚„ピクãƒãƒ£ãƒ¼åž‹ãƒ‡ãƒ¼ã‚¿ã®æŒ¿å…¥ã‚’管ç†ã—ã¾ã™ (データã¯ã‚ªãƒ–ジェクトã«ãƒšãƒ¼ã‚¹ãƒˆã•れã¾ã™)。 ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€`On Drag Over` 㨠`On Drop` フォームイベントã¯ç”Ÿæˆã•れã¾ã›ã‚“。 ä»–æ–¹ã€ãƒ‰ãƒ­ãƒƒãƒ—中㮠`On After Edit` ã¨ã‚ªãƒ–ジェクトãŒãƒ•ォーカスを失ã£ãŸæ™‚ã® `On Data Change` イベントã¯ç”Ÿæˆã•れã¾ã™ã€‚ -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. +詳細ã«ã¤ã„ã¦ã¯ *4Dランゲージリファレンス* マニュアル㮠[ドラッグ&ドロップ](https://doc.4d.com/4Dv18/4D/18/Drag-and-Drop.300-4505037.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------- | ------ | ------------------------------------------------------------ | -| dropping | テキスト | "none" (default), "custom", "automatic" (excluding list box) | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------- | ------ | -------------------------------------------------- | +| dropping | text | "none" (デフォルト), "custom", "automatic" (リストボックスを除ã) | #### 対象オブジェクト -[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 +[4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [入力](input_overview.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [プラグインエリア](pluginArea_overview.md) -[ドラッグ有効](#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. +--- +## オブジェクトメソッド実行 +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãŸå ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã®å€¤ã‚’変更ã™ã‚‹ã¨ *åŒæ™‚ã«* `On Data Change` イベントãŒç”Ÿæˆã•れã€ã‚ªãƒ–ジェクトメソッドãŒå®Ÿè¡Œã•れã¾ã™ã€‚ デフォルトã§ã¯ã€*変更後ã«* メソッドãŒå®Ÿè¡Œã•れã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------- | ------- | ----------- | | continuousExecution | boolean | true, false | - #### 対象オブジェクト -[Progress bar](progressIndicator.md) - [Ruler](ruler.md) - [Stepper](stepper.md) +[進æ—インジケーター](progressIndicator.md) - [ルーラー](ruler.md) - [ステッパー](stepper.md) -* * * + + + + +--- ## メソッド -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. +オブジェクトã«é–¢é€£ã¥ã‘られãŸãƒ¡ã‚½ãƒƒãƒ‰ã¸ã®å‚照。 オブジェクトメソッドã¯é€šå¸¸ã€ãƒ•ォームãŒè¡¨ç¤ºã¾ãŸã¯å°åˆ·ã•れã¦ã„ã‚‹é–“ã€ã‚ªãƒ–ジェクトを "管ç†" ã—ã¾ã™ã€‚ オブジェクトメソッドã¯å‘¼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã›ã‚“。オブジェクトメソッドãŒé–¢é€£ã¥ã‘られã¦ã„るオブジェクトã«é–¢ã‚るイベントãŒç™ºç”Ÿã—ãŸå ´åˆã€4D ã¯è‡ªå‹•çš„ã«ã‚ªãƒ–ジェクトメソッドを呼ã³å‡ºã—ã¾ã™ã€‚ -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` + (`objectName` ã«ã¯å®Ÿéš›ã® [オブジェクトå](properties_Object.md#オブジェクトå) ãŒå…¥ã‚Šã¾ã™)。 ã“ã®ã‚¿ã‚¤ãƒ—ã®å‚ç…§ã¯ã€å½“該メソッドファイルãŒãƒ‡ãƒ•ォルトã®å ´æ‰€ ("sources/forms/*formName*/ObjectMethods/") ã«ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ä¸Šã§ãƒ•ォームオブジェクトã«å¯¾ã—ã¦æ“作 (å称変更ã€è¤‡è£½ã€ã‚³ãƒ”ー/ペーストãªã©) ãŒãŠã“ãªã‚れるã¨ã€4D ã¯ã“れらã®å¤‰æ›´ã‚’自動的ã«ã‚ªãƒ–ジェクトメソッドã«å映ã•ã›ã¾ã™ã€‚ -- 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. +- æ‹¡å¼µå­ã‚’çœã„ãŸæ—¢å­˜ã®ãƒ—ロジェクトメソッドå: `myMethod`。ã“ã®å ´åˆã€ãƒ•ォームオブジェクトã«å¯¾ã—ã¦æ“作ãŒãŠã“ãªã‚れã¦ã‚‚ã€4D ã¯ãれらã®å¤‰æ›´ã‚’è‡ªå‹•åæ˜ ã—ã¾ã›ã‚“。 + +- .4dm æ‹¡å¼µå­ã‚’å«ã‚€ã‚«ã‚¹ã‚¿ãƒ ã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒ•ァイルパス: + `../../CustomMethods/myMethod.4dm`。 ファイルシステムも使用ã§ãã¾ã™: + `/RESOURCES/Buttons/bOK.4dm`。 ã“ã®å ´åˆã€ãƒ•ォームオブジェクトã«å¯¾ã—ã¦æ“作ãŒãŠã“ãªã‚れã¦ã‚‚ã€4D ã¯ãれらã®å¤‰æ›´ã‚’è‡ªå‹•åæ˜ ã—ã¾ã›ã‚“。 -- 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. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ------ | ------------------------------------------------------------------ | -| method | テキスト | Object method standard or custom file path, or project method name | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ------------------------------------------ | +| method | text | ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã®æ¨™æº–ã¾ãŸã¯ã‚«ã‚¹ã‚¿ãƒ ã®ãƒ•ァイルパスã€ã¾ãŸã¯ãƒ—ロジェクトメソッドå | #### 対象オブジェクト -[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) - [Forms](forms.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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [フォーム](FormEditor/forms.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [Web エリア](webArea_overview.md) + -* * * -## 行ã®ç§»å‹•å¯ -`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). +ランタイムã«ãŠã‘る行ã®ç§»å‹•を許å¯ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ォルトã§é¸æŠžã•れã¦ã„ã¾ã™ã€‚ [セレクション型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹](listbox_overview.md#セレクションリストボックス) ãŠã‚ˆã³ [階層リストボックス](properties_Hierarchy.md#階層リストボックス) ã§ã¯ã€ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æä¾›ã•れã¦ã„ã¾ã›ã‚“。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------- | ------- | ----------- | | movableRows | boolean | true, false | - #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + + + -* * * -## Multi-selectable +--- +## è¤‡æ•°é¸æŠžå¯ -Allows the selection of multiple records/options in a [hierarchical list](list_overview.md). +[階層リスト](list_overview.md) ã«ãŠã„ã¦ã€è¤‡æ•°é …ç›®ã®é¸æŠžã‚’許å¯ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ---------------------------- | -| selectionMode | テキスト | "multiple", "single", "none" | - +| selectionMode | text | "multiple", "single", "none" | #### 対象オブジェクト [階層リスト](list_overview.md) -* * * + + +--- ## ã‚½ãƒ¼ãƒˆå¯ -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. +[リストボックス](listbox_overview.md) ヘッダーã®ã‚¯ãƒªãƒƒã‚¯ã«ã‚ˆã‚‹åˆ—データã®ä¸¦ã¹æ›¿ãˆã‚’有効ã«ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ォルトã§é¸æŠžã•れã¦ã„ã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼åž‹é…列 (列) ã¯ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã§ã¯ã‚½ãƒ¼ãƒˆã§ãã¾ã›ã‚“。 -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | -------- | ------- | ----------- | | sortable | boolean | true, false | - #### 対象オブジェクト - [リストボックス](listbox_overview.md) -* * * -## 標準アクション -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. -You can also set this property using the `OBJECT SET ACTION` command. -#### JSON 文法 +--- +## 標準アクション +アクティブオブジェクトã«ã‚ˆã‚Šå®Ÿè¡Œã•れる典型的ãªå‡¦ç† (*例*: レコードã®å…¥åŠ›ãƒ»å–り消ã—・削除ã€ãƒ¬ã‚³ãƒ¼ãƒ‰é–“ã®ç§»å‹•ã€ãƒžãƒ«ãƒãƒšãƒ¼ã‚¸ãƒ•ォームã§ã®ãƒšãƒ¼ã‚¸é–“ã®ç§»å‹•ã€ãªã©) ã¯ã€4D より標準アクションã¨ã—ã¦æä¾›ã•れã¦ã„ã¾ã™ã€‚ è©³ç´°ãªæƒ…å ±ã«é–¢ã—ã¦ã¯ã€*デザインリファレンス* ã® [標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +フォームオブジェクトã«ã¯ã€æ¨™æº–アクションã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€æ¨™æº–アクションã¯é€šå¸¸ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å¾Œã«å®Ÿè¡Œã•れã¾ã™ã€‚ã¾ãŸã€4D ã¯ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ã¦ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å¿œã˜ã¦ã‚ªãƒ–ジェクトを有効化/無効化ã—ã¾ã™ フォームオブジェクトãŒç„¡åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ã€é–¢é€£ã¥ã‘られãŸãƒ¡ã‚½ãƒƒãƒ‰ã¯å®Ÿè¡Œã•れã¾ã›ã‚“。 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ------ | ---------------------------------------------------------------------------------------------------------------- | -| action | string | The name of a [valid standard action](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html). | +ã“ã®ãƒ—ロパティ㯠`OBJECT SET ACTION` コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ---------------------------------------------------------------------------------- | +| action | string | 有効㪠[標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) | #### 対象オブジェクト -[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_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [リストボックス](listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [タブコントロール](tabControl.md) diff --git a/website/translated_docs/ja/FormObjects/properties_Animation.md b/website/translated_docs/ja/FormObjects/properties_Animation.md index 1d8fc2f0133688..326f43202caa9f 100644 --- a/website/translated_docs/ja/FormObjects/properties_Animation.md +++ b/website/translated_docs/ja/FormObjects/properties_Animation.md @@ -1,106 +1,122 @@ --- id: propertiesAnimation -title: Animation +title: アニメーション --- -* * * +--- +## å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã«æˆ»ã‚‹ -## 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | -------------------- | ------- | ----------- | | loopBackToFirstFrame | boolean | true, false | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) + + -* * * +--- +## ãƒžã‚¦ã‚¹ã‚¢ãƒƒãƒ—ã§æˆ»ã‚‹ -## Switch back when released +ユーザーãŒãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã„ã‚‹ã¨ã以外ã¯ã€ä¸€ç•ªç›®ã®ãƒ”クãƒãƒ£ãƒ¼ãŒå¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ã€ãƒžã‚¦ã‚¹ãƒœã‚¿ãƒ³ãŒæ”¾ã•れるã¾ã§äºŒç•ªç›®ã®ãƒ”クãƒãƒ£ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã¨ã€ãれãžã‚Œã®çŠ¶æ…‹ (アイドルã¨ã‚¯ãƒªãƒƒã‚¯) ã”ã¨ã«ç•°ãªã‚‹ãƒ”クãƒãƒ£ãƒ¼ã‚’使用ã—ãŸå‹•作ボタンを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使ã£ã¦ 3D 効果を作æˆã—ãŸã‚Šã€ãƒœã‚¿ãƒ³ã®å‹•作を表ç¾ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------------------- | ------- | ----------- | | switchBackWhenReleased | boolean | true, false | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------ | ------- | ----------- | | switchContinuously | boolean | true, false | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](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. +--- +## アニメーション間隔 (tick) + +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã¨ã€ä¸€å®šã®ã‚¹ãƒ”ード㧠(tick å˜ä½) ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®å†…容ãŒç¹°ã‚Šè¿”ã—表示ã•れã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ä»–ã®ã™ã¹ã¦ã®ã‚ªãƒ—ションãŒç„¡è¦–ã•れã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------- | ------- | ------ | | frameDelay | integer | 最å°å€¤: 0 | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------ | ------- | ----------- | | switchWhenRollover | boolean | true, false | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) + + + + -* * * -## Use Last frame as disabled +--- +## ç„¡åŠ¹æ™‚ã«æœ€çµ‚フレームを使用 + +ボタンãŒç„¡åйãªå ´åˆã«è¡¨ç¤ºã™ã‚‹ã‚µãƒ ãƒãƒ¼ãƒ«ã¨ã—ã¦ã€æœ€å¾Œã®ã‚µãƒ ãƒãƒ¼ãƒ«ã‚’使用ã—ã¾ã™ã€‚ ボタンãŒä½¿ç”¨ä¸å¯ã®å ´åˆã«ç”¨ã„られるサムãƒãƒ¼ãƒ«ã¯ã€4Dã«ã‚ˆã‚Šåˆ¥ã«å‡¦ç†ã•れã¾ã™ã€‚ã“ã®ã‚ªãƒ—ション㨠â€ãƒžã‚¦ã‚¹æŠ¼ä¸‹ä¸­ã¯è‡ªå‹•更新†ãŠã‚ˆã³ â€å…ˆé ­ãƒ•ãƒ¬ãƒ¼ãƒ ã¸æˆ»ã‚‹â€ オプションを組ã¿åˆã‚ã›ã‚‹ã¨ã€æœ€çµ‚ピクãƒãƒ£ãƒ¼ã¯ãƒœã‚¿ãƒ³ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸé †åºã‹ã‚‰å¤–ã•れã€ç„¡åŠ¹æ™‚ã«ã®ã¿è¡¨ç¤ºã•れるよã†ã«ãªã‚Šã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:---------------------- | ------- | ----------- | | useLastFrameAsDisabled | boolean | true, false | #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) \ No newline at end of file +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Appearance.md b/website/translated_docs/ja/FormObjects/properties_Appearance.md index 0b70719d3868bc..502f185cc76989 100644 --- a/website/translated_docs/ja/FormObjects/properties_Appearance.md +++ b/website/translated_docs/ja/FormObjects/properties_Appearance.md @@ -3,8 +3,7 @@ id: propertiesAppearance title: アピアランス --- -* * * - +--- ## デフォルトボタン フォーム上ã®ãƒœã‚¿ãƒ³ã®ã„ãšã‚Œã«ã‚‚ [フォーカスå¯](properties_Entry.md#focusable) プロパティãŒè¨­å®šã•れã¦ã„ãªã„å ´åˆã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒœã‚¿ãƒ³ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæœ‰åŠ¹åŒ–ã•れãŸãƒœã‚¿ãƒ³ãŒãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã«ãŠã„ã¦æœ€åˆã®ãƒ•ォーカスを得ã¾ã™ã€‚ @@ -21,398 +20,416 @@ Windows上ã§ã¯ "æŽ¨å¥¨é¸æŠžè‚¢" ã®æ¦‚念ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ãªã„㟠![](assets/en/FormObjects/property_defaultButtonWindows.en.png) + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - defaultButton|boolean|true, false | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + defaultButton|boolean|true, false | #### 対象オブジェクト -[Regular Button](button_overview.md#regular) - [Flat Button](button_overview.md#regular) +[通常ボタン](button_overview.md#通常) - [フラットボタン](button_overview.md#フラット) + -* * * + +--- ## フォーカスã®å››è§’ã‚’éš ã™ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------- | ----------- | | hideFocusRing | boolean | true, false | - #### 対象オブジェクト -[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) +[4D Write Pro エリア](writeProArea_overview.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [サブフォーム](subform_overview.md) -* * * + +--- ## セレクションãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤º +`セレクション型リストボックス` -`Selection type list boxes` +リストボックスã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚’éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -This property is used to disable the selection highlight in list boxes. +ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã‘ã‚‹è¡Œé¸æŠžã‚’å¯è¦–化ã™ã‚‹ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒã‚¤ãƒ©ã‚¤ãƒˆãŒéžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚ ãƒã‚¤ãƒ©ã‚¤ãƒˆãŒéžè¡¨ç¤ºã«ãªã£ã¦ã„ã¦ã‚‚é¸æŠžè¡Œã¯å¼•ãç¶šãæ©Ÿèƒ½çš„ã«æœ‰åйã§ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€ç”»é¢ä¸Šã§ã¯é¸æŠžçŠ¶æ…‹ãŒæ˜Žç¤ºã•れãªããªã‚‹ãŸã‚ã€[プログラムã«ã‚ˆã£ã¦é¸æŠžè¡Œã‚’å¯è¦–化](listbox_overview.md#é¸æŠžè¡Œã®è¦‹ãŸç›®ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º) ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -When this option is enabled, the selection highlight is no longer visible for selections made in list boxes. Selections themselves are still valid and work in exactly the same way as previously; however, they are no longer represented graphically onscreen, and you will need to [define their appearance programmatically](listbox_overview.md#customizing-appearance-of-selected-rows). +デフォルトã§ã¯ã€ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã›ã‚“。 -By default, this option is not enabled. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------- | ------- | ----------- | | hideSystemHighlight | boolean | true, false | - #### 対象オブジェクト [リストボックス](listbox_overview.md) -* * * + + +--- ## 横スクロールãƒãƒ¼ -An interface tool allowing the user to move the viewing area to the left or right. +表示エリアを左å³ã«ç§»å‹•ã§ãるよã†ã«ã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースツールã§ã™ã€‚ -Available values: +使用å¯èƒ½ãªå€¤: -| Property List | JSON value | 説明 | -| ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| â—¯ | "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). | -| × | "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 | +| プロパティリスト | JSON 値 | 説明 | +| -------- | ----------- | ----------------------------------------------------------------------- | +| â—¯ | "visible" | スクロールãƒãƒ¼ã¯å¿…è¦ã®ãªã„å ´åˆã§ã‚‚常ã«è¡¨ç¤ºã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã‚µã‚¤ã‚ºãŒãƒ•レームã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå°ã•ã„å ´åˆã§ã‚‚表示ã•れã¾ã™ã€‚ | +| × | "hidden" | スクロールãƒãƒ¼ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 | +| 自動 | "automatic" | スクロールãƒãƒ¼ã¯å¿…è¦ãªã¨ãã«è¡¨ç¤ºã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã‚µã‚¤ã‚ºãŒãƒ•レームã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå¤§ãã„å ´åˆã«ã¯è¡¨ç¤ºã•れã¾ã™ã€‚ | -> Picture objects can have scrollbars when the display format of the picture is set to “Truncated (non-centered).†+> ピクãƒãƒ£ãƒ¼åž‹ã®ã‚ªãƒ–ジェクトã¯ã€è¡¨ç¤ºãƒ•ォーマット㌠"トランケート (中央åˆã‚ã›ãªã—)" ã«è¨­å®šã•れã¦ã„ã‚‹ã¨ãã«ã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------- | ------ | -------------------------------- | -| scrollbarHorizontal | テキスト | "visible", "hidden", "automatic" | - +| scrollbarHorizontal | text | "visible", "hidden", "automatic" | #### 対象オブジェクト -[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 +[階層リスト](list_overview.md) - [サブフォーム](subform_overview.md) - [リストボックス](listbox_overview.md) - [入力](input_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) -[Vertical scroll bar](#vertical-scroll-bar) +#### å‚ç…§ +[縦スクロールãƒãƒ¼](#縦スクロールãƒãƒ¼) -* * * +--- +## è§£åƒåº¦ -## Resolution +4D Write Pro エリアã®ç”»é¢è§£åƒåº¦ã‚’設定ã—ã¾ã™ã€‚ デフォルト値㯠72dpi (macOS) ã§ã€ã“れã¯ã™ã¹ã¦ã®ãƒ—ラットフォームã«ãŠã‘ã‚‹ 4Dãƒ•ã‚©ãƒ¼ãƒ ã®æ¨™æº–è§£åƒåº¦ã§ã™ã€‚ 96dpi ã«æŒ‡å®šã™ã‚‹ã¨ã€Windows/Web レンダリングを macOS ãŠã‚ˆã³ Windows ã®ä¸¡ãƒ—ラットフォームã«è¨­å®šã—ã¾ã™ã€‚ ã“ã®é …目を **自動** ã«è¨­å®šã™ã‚‹ã¨ã€macOS 㨠Windows é–“ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ¬ãƒ³ãƒ€ãƒªãƒ³ã‚°ãŒç•°ãªã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - dpi|number|0=automatic, 72, 96 | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + dpi|number|0=automatic, 72, 96 | #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) + + -* * * +--- +## 背景を表示 -## Show background +ページã®èƒŒæ™¯ç”»åƒãŠã‚ˆã³èƒŒæ™¯è‰²ã‚’表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides both background images and background color. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showBackground|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showBackground|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) -* * * +--- +## フッター表示 -## Show footers +[ビューモード](#ビューモード) ㌠"ページ" ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã«ã€ãƒšãƒ¼ã‚¸ã®ãƒ•ッターを表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides the footers when [Page view mode](#view-mode) is set to "Page". #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showFooters|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showFooters|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) + -* * * +--- +## フォーミュラãƒãƒ¼ã‚’表示 -## Show Formula Bar +有効化ã™ã‚‹ã¨ã€4D View Pro エリアã«ãŠã„ã¦ãƒ„ールãƒãƒ¼ã®ã™ã下ã«ãƒ•ォーミュラãƒãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ é¸æŠžã•れã¦ã„ãªã„å ´åˆã€ãƒ•ォーミュラãƒãƒ¼ã¯éžè¡¨ç¤ºã¨ãªã‚Šã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - withFormulaBar|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + withFormulaBar|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D View Pro area](viewProArea_overview.md) +[4D View Pro エリア](viewProArea_overview.md) -* * * +--- +## ヘッダーを表示 -## Show headers +[ビューモード](#ビューモード) ㌠"ページ" ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã«ã€ãƒšãƒ¼ã‚¸ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides the headers when [Page view mode](#view-mode) is set to "Page". #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showHeaders|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showHeaders|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) + -* * * -## Show hidden characters +--- +## éžè¡¨ç¤ºæ–‡å­—を表示 + +éžè¡¨ç¤ºã®æ–‡å­—を表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides invisible characters #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showHiddenChars|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showHiddenChars|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) -* * * -## Show horizontal ruler +--- +## 水平ルーラーを表示 + +ドキュメントビュー㌠[ページモード](#ビューモード) ã®å ´åˆã«ã€æ°´å¹³ãƒ«ãƒ¼ãƒ©ãƒ¼ã‚’表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides the horizontal ruler when the document view is in [Page mode](#view-mode). #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showHorizontalRuler|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showHorizontalRuler|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](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. + + +--- +## HTML WYSYWIG 表示 + +HTML WYSIWYG ビューを有効/無効ã«ã—ã¾ã™ã€‚ã“ã®ãƒ“ューã§ã¯ã€ã™ã¹ã¦ã®ãƒ–ラウザーã«å¯¾å¿œã—ã¦ã„ãªã„ 4D Write Pro ã®å±žæ€§ãŒå–り除ã‹ã‚Œã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showHTMLWysiwyg|boolean|true, false (default)| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showHTMLWysiwyg|boolean|true, false (デフォルト)| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) -* * * +--- +## ページフレームを表示 -## Show page frame +[ビューモード](#ビューモード) ㌠"ページ" ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã«ã€ãƒšãƒ¼ã‚¸ã®ãƒ•レームを表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides the page frame when [Page view mode](#view-mode) is set to "Page". #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showPageFrames|boolean|true, false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showPageFrames|boolean|true, false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](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. +--- +## å‚照を表示 + +ドキュメント㫠*å‚ç…§* ã¨ã—ã¦æŒ¿å…¥ã•れ㟠4Då¼ã‚’ã™ã¹ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒç„¡åйã«ãªã£ã¦ã„ã‚‹ã¨ã€4D Write Pro ã¯æŒ¿å…¥ã•れ㟠4Då¼ã‚’カレント値ã§è©•価ã—ã¦ã€ãã®*値* を表示ã—ã¾ã™ã€‚ 4Dフィールドã¾ãŸã¯å¼ã‚’挿入ã™ã‚‹ã¨ã€4D Write Pro ã¯ãƒ‡ãƒ•ォルトã§ãã®ã‚«ãƒ¬ãƒ³ãƒˆå€¤ã‚’表示ã—ã¾ã™ã€‚ ã‚‚ã¨ã®ãƒ•ィールドやå¼ã‚’確èªã—ãŸã„ã¨ãã«ã¯ã€ã“ã®ã‚ªãƒ—ションを有効ã«ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€ã“れらã®å‚ç…§ã¯ç°è‰²ã®èƒŒæ™¯è‰²ã¨ã¨ã‚‚ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆå†…ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -For example, you have inserted the current date along with a format, the date is displayed: +ãŸã¨ãˆã°ã€ãƒ•ォーマットを指定ã—ãŸã‚«ãƒ¬ãƒ³ãƒˆæ—¥ä»˜ã‚’挿入ã—ã¦ã„ã‚‹ã¨ã€ãƒ‡ãƒ•ォルトã§ã¯æ¬¡ã®è¡¨ç¤ºã«ãªã‚Šã¾ã™: ![](assets/en/FormObjects/writePro1.png) -With the Show references property on, the reference is displayed: +å‚照を表示オプションを有効ã«ã™ã‚‹ã¨ã€ä»£ã‚りã«ã‚‚ã¨ã®å‚ç…§ãŒè¡¨ç¤ºã•れã¾ã™: ![](assets/en/FormObjects/writeProExpr.png) -> 4D expressions can be inserted using the `ST INSERT EXPRESSION` command. +> 4D å¼ã‚’挿入ã™ã‚‹ã«ã¯ã€`ST INSERT EXPRESSION` コマンドを使ã„ã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showReferences|boolean|true, false (default)| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showReferences|boolean|true, false (デフォルト)| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) -* * * +--- +## 垂直ルーラーを表示 -## Show vertical ruler +ドキュメントビュー㌠[ページモード](#ビューモード) ã®å ´åˆã«ã€åž‚直ルーラーを表示/éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ -Displays/hides the vertical ruler when the document view is in [Page mode](#view-mode). #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - showVerticalRuler|boolean|true (default), false| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + showVerticalRuler|boolean|true (デフォルト), false| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](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. +フォーム上ã®ã‚¿ãƒ–コントロールã®ä½ç½®ã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ—ロパティã«ã¯ã™ã¹ã¦ã®ãƒ—ラットフォームã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ãŒã€macOS 上ã§ã®ã¿å‹•作ã—ã¾ã™ã€‚ タブコントロールã¯ä¸Š (標準)ã€ã¾ãŸã¯ä¸‹ã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -When tab controls with a custom direction are displayed under Windows, they automatically return to the standard direction (top). +ä½ç½®ãŒã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸã‚¿ãƒ–コントロールを Windows ã§è¡¨ç¤ºã™ã‚‹ã¨ã€è‡ªå‹•çš„ã«æ¨™æº–ã®ä½ç½® (上) ã«æˆ»ã•れã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - labelsPlacement|boolean|"top", "bottom" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + labelsPlacement|boolean|"top", "bottom" | #### 対象オブジェクト -[Tab Control](tabControl.md) +[タブコントロール](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**. +4D View Pro エリアã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを追加ã™ã‚‹ã“ã¨ã§ã€ã‚¨ãƒ³ãƒ‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŸºæœ¬çš„ãªç·¨é›†ã¨ãƒ‡ãƒ¼ã‚¿æ“作をãŠã“ãªãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ 4D ã§ã¯ 2種類ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース (**リボン** 㨠**ツールãƒãƒ¼**) ã‚’æä¾›ã—ã¦ãŠã‚Šã€ãã®ã©ã¡ã‚‰ã‹ã‚’é¸ã¶ã“ã¨ãŒã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - userInterface|text|"none" (default), "ribbon", "toolbar" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + userInterface|text|"none" (デフォルト), "ribbon", "toolbar" | #### 対象オブジェクト -[4D View Pro area](viewProArea_overview.md) +[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) +#### å‚ç…§ -* * * +[4D View Pro リファレンスガイド](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.ja.html) +--- ## 縦スクロールãƒãƒ¼ -An interface tool allowing the user to move the viewing area up and down. +表示エリアを上下ã«ç§»å‹•ã§ãるよã†ã«ã™ã‚‹ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースツールã§ã™ã€‚ + +使用å¯èƒ½ãªå€¤: + +| プロパティリスト | JSON 値 | 説明 | +| -------- | ----------- | ----------------------------------------------------------------------- | +| â—¯ | "visible" | スクロールãƒãƒ¼ã¯å¿…è¦ã®ãªã„å ´åˆã§ã‚‚常ã«è¡¨ç¤ºã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã‚µã‚¤ã‚ºãŒãƒ•レームã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå°ã•ã„å ´åˆã§ã‚‚表示ã•れã¾ã™ã€‚ | +| × | "hidden" | スクロールãƒãƒ¼ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 | +| 自動 | "automatic" | スクロールãƒãƒ¼ã¯å¿…è¦ãªã¨ãã«è¡¨ç¤ºã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ã‚µã‚¤ã‚ºãŒãƒ•レームã®ã‚µã‚¤ã‚ºã‚ˆã‚Šå¤§ãã„å ´åˆã«ã¯è¡¨ç¤ºã•れã¾ã™ã€‚ | -Available values: +> ピクãƒãƒ£ãƒ¼åž‹ã®ã‚ªãƒ–ジェクトã¯ã€è¡¨ç¤ºãƒ•ォーマット㌠"トランケート (中央åˆã‚ã›ãªã—)" ã«è¨­å®šã•れã¦ã„ã‚‹ã¨ãã«ã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ -| Property List | JSON value | 説明 | -| ------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| â—¯ | "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). | -| × | "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) | +> テキスト入力オブジェクトã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ãŒãªã„å ´åˆã€çŸ¢å°ã‚­ãƒ¼ã‚’使用ã—ã¦ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã§ãã¾ã™ã€‚ -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------------- | ------ | -------------------------------- | -| scrollbarVertical | テキスト | "visible", "hidden", "automatic" | - +| scrollbarVertical | text | "visible", "hidden", "automatic" | #### 対象オブジェクト -[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) +[階層リスト](list_overview.md) - [サブフォーム](subform_overview.md) - [リストボックス](listbox_overview.md) - [入力](input_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) + +#### å‚ç…§ -#### See also +[横スクロールãƒãƒ¼](#横スクロールãƒãƒ¼) -[Horizontal scroll bar](#horizontal-scroll-bar) +--- +## ビューモード -* * * +フォームエリア内㮠4D Write Pro ドキュメントã®è¡¨ç¤ºãƒ¢ãƒ¼ãƒ‰ã‚’設定ã—ã¾ã™ã€‚ 次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: -## View mode +- **ページ**: ã‚‚ã£ã¨ã‚‚完全ã¨ã„ãˆã‚‹ãƒ“ューモードã§ã€ãƒšãƒ¼ã‚¸ã®æž ã€ä½™ç™½ã€æ”¹ãƒšãƒ¼ã‚¸ã€ãƒ˜ãƒƒãƒ€ãƒ¼ & フッターãªã©ã‚’å«ã¿ã¾ã™ã€‚ +- **下書ã**: 基本ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãƒ—ロパティをå«ã‚€ä¸‹æ›¸ãモードã§ã™ã€‚ +- **埋ã‚è¾¼ã¿**: 埋ã‚è¾¼ã¿ã‚¨ãƒªã‚¢ã«é©åˆ‡ãªãƒ“ューモードã§ã™ã€‚余白やã€ãƒ˜ãƒƒãƒ€ãƒ¼ & フッターã€ãƒšãƒ¼ã‚¸ãƒ•レームãªã©ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 ã“ã®ãƒ¢ãƒ¼ãƒ‰ã¯ Web ã«ä¼¼ãŸå‡ºåŠ›ã‚’ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (ã“ã®å ´åˆã«ã¯ã€[è§£åƒåº¦ã‚’ 96dpi](#è§£åƒåº¦) ã«è¨­å®šã®ã†ãˆã€[HTML WYSIWYG 表示](#HTML-WYSIWYG-表示) オプションを有効ã«ã—ã¾ã™)。 -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). -> The View mode property is only used for onscreen rendering. Regarding printing settings, specific rendering rules are automatically used. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - layoutMode|text|"page", "draft", "embedded"| +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + layoutMode|text|"page", "draft", "embedded"| #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) -* * * +--- +## 拡大 -## Zoom +4D Write Pro エリアã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„表示ã«ä½¿ç”¨ã™ã‚‹ã‚ºãƒ¼ãƒ çŽ‡ã‚’è¨­å®šã—ã¾ã™ã€‚ -Sets the zoom percentage for displaying 4D Write Pro area contents. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| - | ------ | ----- | -| | | | - zoom|number|minimum = 0 | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -- | ------ | ----- | +| | | | + zoom|number|minimum = 0 | #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) \ No newline at end of file +[4D Write Pro エリア](writeProArea_overview.md) + + diff --git a/website/translated_docs/ja/FormObjects/properties_BackgroundAndBorder.md b/website/translated_docs/ja/FormObjects/properties_BackgroundAndBorder.md index dec961a24f5bdb..17cb2830d892b6 100644 --- a/website/translated_docs/ja/FormObjects/properties_BackgroundAndBorder.md +++ b/website/translated_docs/ja/FormObjects/properties_BackgroundAndBorder.md @@ -1,230 +1,280 @@ --- id: propertiesBackgroundAndBorder -title: Background and Border +title: 背景色ã¨å¢ƒç•Œç·š --- -* * * - +--- ## 交互ã«ä½¿ç”¨ã™ã‚‹èƒŒæ™¯è‰² -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------- | ------ | ----------------------------------------- | -| alternateFill | string | any css value; "transparent"; "automatic" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ---------------------------------------------------------- | +| alternateFill | string | ä»»æ„ã® CSS値; "transparent"; "automatic"; "automaticAlternate" | #### 対象オブジェクト +[リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) -[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. +オブジェクトã®èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™ã€‚ -In the case of a list box, by default *Automatic* is selected: the column uses the background color set at the list box level. +リストボックスã®å ´åˆã«ã¯ãƒ‡ãƒ•ォルトã§ã€*自動* ãŒé¸æŠžã•れã¦ãŠã‚Šã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ¬ãƒ™ãƒ«ã§è¨­å®šã•れã¦ã„る背景色を列も使用ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---- | ------ | ----------------------------------------- | -| fill | string | any css value; "transparent"; "automatic" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---- | ------ | ------------------------------------ | +| fill | string | ä»»æ„ã® css値; "transparent"; "automatic" | #### 対象オブジェクト -[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 +[階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [楕円](shapes_overview.md#楕円) - [四角](shapes_overview.md#四角) - [テキストエリア](text.md) -[é€éŽ](#transparent) +#### å‚ç…§ +[é€éŽ](#é€éŽ) -* * * +--- ## èƒŒæ™¯è‰²å¼ -`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. +リストボックスã®å„行ã«ã‚«ã‚¹ã‚¿ãƒ ã®èƒŒæ™¯è‰²ã‚’指定ã™ã‚‹ãŸã‚ã®å¼ã¾ãŸã¯å¤‰æ•° (é…列変数ã¯ä½¿ç”¨ä¸å¯)。 å¼ã¾ãŸã¯å¤‰æ•°ã¯è¡¨ç¤ºè¡Œã”ã¨ã«è©•価ã•れã€RGB値を返ã•ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 詳細ã«ã¤ã„ã¦ã¯ã€*4Dランゲージリファレンス* マニュアル㮠[`OBJECT SET RGB COLORS`](https://livedoc.4d.com/--18/-/OBJECT-SET-RGB-COLORS.301-4505456.ja.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ãã ã•ã„。 -> 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). +ã¾ãŸã€ã“ã®ãƒ—ロパティ㯠`LISTBOX SET PROPERTY` コマンド㫠`lk background color expression` 定数を指定ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +> コレクション/エンティティセレクション型リストボックスã§ã¯ã€ã“ã®ãƒ—ロパティ㯠[メタ情報å¼](properties_Text.md#メタ情報å¼) を使用ã—ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------- | ------ | ----------------------------------------- | -| rowFillSource | string | An expression returning a RGB color value | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ----------- | +| rowFillSource | string | RGBカラー値を返ã™å¼ | #### 対象オブジェクト +[リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + + -[List Box](listbox_overview.md#overview) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + +--- ## 境界線スタイル -Allows setting a standard style for the object border. +リストボックスã®å¢ƒç•Œç·šã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’設定ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------- | ------ | ----------------------------------------------------------------- | -| borderStyle | テキスト | "system", "none", "solid", "dotted", "raised", "sunken", "double" | - +| borderStyle | text | "system", "none", "solid", "dotted", "raised", "sunken", "double" | #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ルーラー](ruler.md) - [スピナー](spinner.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * -## Dotted Line Type -Describes dotted line type as a sequence of black and white points. +--- +## 点線タイプ -#### JSON 文法 +点線ã®ã‚¿ã‚¤ãƒ—ã‚’ã€ç‚¹ã¨ç™½ã®ãƒ‘ターンã«ã‚ˆã‚ŠæŒ‡å®šã—ã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------------- | ---------------------- | ------------------------------------------------------------------------ | -| strokeDashArray | number array or string | Ex. "6 1" or \[6,1\] for a sequence of 6 black point and 1 white point | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ---------- | -------------------------------------------------- | +| strokeDashArray | 数値é…列ã¾ãŸã¯æ–‡å­—列 | 例: 6個ã®ç‚¹ã¨1個ã®ç©ºç™½ã®ãƒ‘ターン㯠"6 1" ã¾ãŸã¯ \[6,1\] ã«ã‚ˆã£ã¦è¡¨ã—ã¾ã™ã€‚ | #### 対象オブジェクト -[Rectangle](shapes_overview.md#rectangle) - [Oval](shapes_overview.md#oval) - [Line](shapes_overview.md#line) +[四角](shapes_overview.md#四角) - [楕円](shapes_overview.md#楕円) - [ç·š](shapes_overview.md#ç·š) + -* * * + +--- ## 追加ã®ç©ºç™½ã®è¡Œã‚’éžè¡¨ç¤º -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: +リストボックスオブジェクト下部ã«è¿½åŠ ã•れる余分ãªç©ºç™½è¡Œã®è¡¨ç¤ºã‚’管ç†ã—ã¾ã™ã€‚ デフォルトã§ã€4D ã¯ç©ºã®ã‚¨ãƒªã‚¢ã‚’埋ã‚ã‚‹ãŸã‚ã«ã“ã®ã‚ˆã†ãªè¡Œã‚’追加ã—ã¾ã™: ![](assets/en/FormObjects/property_hideExtraBlankRows1.png) -You can remove these empty rows by selecting this option. The bottom of the list box object is then left blank: +ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ã“れらã®ç©ºç™½è¡Œã‚’除去ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ リストボックスオブジェクトã®ä¸‹éƒ¨ã¯ç©ºã®ã¾ã¾ã«ãªã‚Šã¾ã™: ![](assets/en/FormObjects/property_hideExtraBlankRows2.png) + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------ | ------- | ----------- | | hideExtraBlankRows | boolean | true, false | - #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + + + -* * * +--- +## 線カラー + +オブジェクトã®ç·šã®è‰²ã‚’指定ã—ã¾ã™ã€‚ ã‚«ãƒ©ãƒ¼ã¯æ¬¡ã®æ–¹æ³•ã§æŒ‡å®šã§ãã¾ã™: -## Line Color +* カラーãƒãƒ¼ãƒ  - 例: "red" +* 16進数値 - 例: "#ff0000" +* RGB値 - 例: "rgb(255,0,0)" -Designates the color of the object's lines. The color can be specified by: +ã“ã®ãƒ—ロパティ㯠+OBJECT SET RGB COLORS** コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

          -* a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ------ | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ------------------------------------ | +| stroke | string | ä»»æ„ã® css値; "transparent"; "automatic" | + + + + +> ã“ã®ãƒ—ロパティã¯ãƒ†ã‚­ã‚¹ãƒˆç³»ã®ã‚ªãƒ–ジェクトã§ã‚‚利用å¯èƒ½ã§ã™ã€‚ã“ã®å ´åˆã€ã“ã®ãƒ—ロパティã¯ãƒ•ォントカラーãŠã‚ˆã³ã‚ªãƒ–ジェクトã®ç·šã‚«ãƒ©ãƒ¼ã®ä¸¡æ–¹ã‚’指定ã—ã¾ã™ ([フォントカラー](properties_Text.md#フォントカラー) å‚ç…§)。 -> 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). #### 対象オブジェクト -[Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) +[ç·š](shapes_overview.md#ç·š) - [楕円](shapes_overview.md#楕円) - [四角](shapes_overview.md#四角) + + + + + +--- + + +## ç·šå¹… -* * * +ç·šã®å¹…を指定ã—ã¾ã™ã€‚ -## Line Width -Designates the thickness of a line. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------- | ------ | ----------------------------------------------------------------- | -| strokeWidth | number | 0 for smallest width on a printed form, or any integer value < 20 | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | --------------------------------- | +| strokeWidth | number | å°åˆ·ã•れるフォームã«ãŠã‘る最å°å¹… 0 ã‹ã‚‰ã€æ•´æ•°å€¤ < 20 ã¾ã§ | + + #### 対象オブジェクト -[Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) +[ç·š](shapes_overview.md#ç·š) - [楕円](shapes_overview.md#楕円) - [四角](shapes_overview.md#四角) + + + + + + + + + +--- -* * * ## 行背景色é…列 -`Array type list boxes` +`é…列型リストボックス` + +リストボックスã¾ãŸã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã®å„行ã«ã‚«ã‚¹ã‚¿ãƒ ã®èƒŒæ™¯è‰²ã‚’é©ç”¨ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹é…列åã§ã™ã€‚ + +å€é•·æ•´æ•°åž‹ã®é…列ã®åå‰ã‚’入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 é…列ã®ãれãžã‚Œã®è¦ç´ ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œ (ã‚ã‚‹ã„ã¯åˆ—ã®ã‚»ãƒ«) ã«å¯¾å¿œã—ã¾ã™ã€‚ã¤ã¾ã‚Šã“ã®é…列ã¯ã€å„列ã«é–¢é€£ã¥ã‘られã¦ã„ã‚‹é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 ã“ã“ã§ã¯ [SET RGB COLORS](https://doc.4d.com/4Dv18/4D/18/SET-RGB-COLORS.302-4504454.ja.html) テーマã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã‚‚ã—上ã®ãƒ¬ãƒ™ãƒ«ã§å®šç¾©ã•れã¦ã„る背景色をãã®ã¾ã¾ã‚»ãƒ«ã«ç¶™æ‰¿ã—ãŸã„å ´åˆã«ã¯ã€å¯¾å¿œã™ã‚‹é…列ã®è¦ç´ ã« -255 を渡ã—ã¾ã™ã€‚ -The name of an array to apply a custom background color to each row of the list box or column. +ãŸã¨ãˆã°ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ—ロパティã«ã¦ã‚°ãƒ¬ãƒ¼/ライトグレーカラーãŒè¡Œã®äº¤äº’背景色ã¨ã—ã¦è¨­å®šã•れã¦ã„ã‚‹ã¨ã—ã¾ã™ã€‚ åŒã˜ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è¡ŒèƒŒæ™¯è‰²é…åˆ—ãŒæŒ‡å®šã•れã¦ãŠã‚Šã€è¡Œå†…ã§è² ã®å€¤ãŒä¸€ã¤ã§ã‚‚ã‚れã°è‰²ã‚’オレンジã«å¤‰ãˆã¾ã™: -The name of a Longint array must be entered. 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. -For example, given a list box where the rows have an alternating gray/light gray color, defined in the properties of the list box. A background color array has also been set for the list box in order to switch the color of rows where at least one value is negative to light orange: ```4d - <>_BgndColors{$i}:=0x00FFD0B0 // orange - <>_BgndColors{$i}:=-255 // default value + <>_BgndColors{$i}:=0x00FFD0B0 // オレンジ + <>_BgndColors{$i}:=-255 // デフォルト値 ``` + ![](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: +次ã«ã€è² ã®å€¤ã‚’æŒã¤ã‚»ãƒ«ã®è‰²ã‚’濃ã„オレンジã§ç¤ºã—ãŸã„å ´åˆã€ å„列ã«ã‚‚行背景色é…列を設定ã—ã¾ã™ (例: <>_BgndColor_1, <>_BgndColor_2 㨠<>_BgndColor_3)。 ã“れらã®é…列ã®å€¤ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ—ロパティã«è¨­å®šã•れã¦ã„ã‚‹ã‚‚ã®ã‚„ã€å…¨ä½“用ã®è¡ŒèƒŒæ™¯è‰²é…列よりも優先ã•れã¾ã™ã€‚ + + ```4d - <>_BgndColorsCol_3{2}:=0x00FF8000 // dark orange + <>_BgndColorsCol_3{2}:=0x00FF8000 // 濃ã„オレンジ <>_BgndColorsCol_2{5}:=0x00FF8000 <>_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. +`LISTBOX SET ROW FONT STYLE` ã‚„ `LISTBOX SET ROW COLOR` コマンドを使ã£ã¦ã‚‚åŒã˜ã‚ˆã†ãªåŠ¹æžœãŒå¾—られã¾ã™ã€‚ コマンドを使ã†åˆ©ç‚¹ã¯ã€ã‚¹ã‚¿ã‚¤ãƒ«/カラーé…列をã‚らã‹ã˜ã‚列ã«è¨­å®šã™ã‚‹å¿…è¦ãŒãªã„ã“ã¨ã§ã™ã€‚ã“ã®å ´åˆã€ã“れらã¯ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦å‹•çš„ã«ä½œæˆã•れã¾ã™ã€‚ + + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------- | ------ | ---------------------------- | -| rowFillSource | string | The name of a longint array. | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ---------- | +| rowFillSource | string | å€é•·æ•´æ•°åž‹é…列ã®åå‰ | + + #### 対象オブジェクト -[List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) +[リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + + + + + + + +--- -* * * ## é€éŽ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---- | ------ | ------------- | -| fill | テキスト | "transparent" | +| fill | text | "transparent" | + + #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + + -#### See also +#### å‚ç…§ -[Background Color / Fill Color](#background-color-fill-color) \ No newline at end of file +[背景色/塗りカラー](#背景色-塗りカラー) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_CoordinatesAndSizing.md b/website/translated_docs/ja/FormObjects/properties_CoordinatesAndSizing.md index 8ba8db06983f1f..418abfa686bc19 100644 --- a/website/translated_docs/ja/FormObjects/properties_CoordinatesAndSizing.md +++ b/website/translated_docs/ja/FormObjects/properties_CoordinatesAndSizing.md @@ -1,241 +1,256 @@ --- id: propertiesCoordinatesAndSizing -title: Coordinates & Sizing +title: 座標ã¨ã‚µã‚¤ã‚º --- -* * * +--- +## 自動行高 + +ã“ã®ãƒ—ロパティã¯ã€é…列型ã‹ã¤éšŽå±¤ã®ãªã„リストボックスã«ãŠã„ã¦ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ ã“ã®ãƒ—ロパティã¯ãƒ‡ãƒ•ォルトã§ã¯ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¾ã›ã‚“。 -## Automatic Row Height +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ã€ã‚«ãƒ©ãƒ ã®å†…容ã«å¿œã˜ã¦å„行ã®é«˜ã•㌠4D ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«è¨ˆç®—ã•れã¾ã™ 行ã®é«˜ã•を計算ã™ã‚‹éš›ã«ã¯ã€ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„るカラムã®ã¿ãŒè€ƒæ…®ã•れるã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ +> リストボックス㮠[横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) プロパティ㫠"拡大" を設定ã—ã¦ã„ã‚‹å ´åˆã«ãƒ•ォームをリサイズã™ã‚‹ã¨ã€ä¸€ç•ªå³ã®ã‚«ãƒ©ãƒ ã®å¹…ã¯å¿…è¦ã«å¿œã˜ã¦æœ€å¤§å¹…ã‚’è¶…ãˆã¦æ‹¡å¤§ã•れã¾ã™ã€‚ -This property is only available for array-based, non-hierarchical list boxes. The property is not selected by default. +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ã€ã‚»ãƒ«ã®å†…容ãŒã™ã¹ã¦è¡¨ç¤ºã•れã€åˆ‡ã‚Šè½ã¨ã•れるã“ã¨ãŒãªã„よã†ã«å„行ã®é«˜ã•ãŒè‡ªå‹•çš„ã«è¨ˆç®—ã•れã¾ã™ (ãŸã ã—[ワードラップ](properties_Display.md#ワードラップ) オプションãŒç„¡åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã‚’除ãã¾ã™)。 -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. +* 行ã®é«˜ã•を計算ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®ã‚‚ã®ãŒè€ƒæ…®ã•れã¾ã™: + * 中身ã®åž‹ (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€æ—¥ä»˜ã€æ™‚é–“ã€ãƒ”クãƒãƒ£ãƒ¼ (è¨ˆç®—çµæžœã¯ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットã«ã‚ˆã‚Šã¾ã™)ã€ã‚ªãƒ–ジェクト) + * コントロールã®åž‹ (入力ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€ãƒªã‚¹ãƒˆã€ãƒ‰ãƒ­ãƒƒãƒ—ダウン) + * フォントã€ãƒ•ォントスタイルã€ãƒ•ォントサイズ + * [ワードラップ](properties_Display.md#ワードラップ) オプション: 無効化ã•れã¦ã„ã‚‹å ´åˆã€é«˜ã•ã¯æ®µè½ã®æ•°ã«å¿œã˜ã¾ã™ (行ã¯åˆ‡ã‚Šè½ã¨ã•れã¾ã™)。有効化ã•れã¦ã„ã‚‹å ´åˆã€é«˜ã•ã¯è¡Œæ•°ã«å¿œã˜ã¾ã™ (切りè½ã¨ã•れã¾ã›ã‚“)。 -> 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. -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------- | ----------- | | rowHeightAuto | boolean | true, false | - #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) +[リストボックス列](listbox_overview.md#リストボックス列) + -* * * + + +--- ## 下 -Bottom coordinate of the object in the form. +フォーム上ã®ã‚ªãƒ–ジェクトã®ä¸‹ã®åº§æ¨™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------ | ------ | ------ | | bottom | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [四角](shapes_overview.md#四角) - [ルーラー](ruler.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * +--- ## å·¦ -Left coordinate of the object on the form. +フォーム上ã®ã‚ªãƒ–ジェクトã®å·¦ã®åº§æ¨™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---- | ------ | ------ | | left | number | 最å°å€¤: 0 | #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) + -* * * +--- ## å³ -Right coordinate of the object in the form. +フォーム上ã®ã‚ªãƒ–ジェクトã®å³ã®åº§æ¨™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----- | ------ | ------ | | right | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) + -* * * + +--- ## 上 -Top coordinate of the object in the form. +フォーム上ã®ã‚ªãƒ–ジェクトã®ä¸Šã®åº§æ¨™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --- | ------ | ------ | | top | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * -## 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: + +--- +## è§’ã®åŠå¾„ + +[四角](shapes_overview.md#四角) åž‹ã®å›³å½¢ã«ã¤ã„ã¦ã€è§’ã®ä¸¸ã¿ã‚’ピクセルå˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚ デフォルトã§ã¯ã€å››è§’ã®è§’ã®åŠå¾„㯠0ピクセルã¨ãªã£ã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ—ロパティを変更ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ç‹¬è‡ªã®å½¢ã®è§’ã®ä¸¸ã„四角をæç”»ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ![](assets/en/FormObjects/shape_rectangle.png) -Minimum value is 0, in this case a standard non-rounded rectangle is drawn. Maximum value depends on the rectangle size (it cannot exceed half the size of the shortest rectangle side) and is calculated dynamically. +最å°å€¤ã¯ 0 ã§ã€ã“ã®å ´åˆã«ã¯æ¨™æº–ã® (è§’ã®ä¸¸ããªã„) å››è§’ãŒæç”»ã•れã¾ã™ã€‚ 最大値ã¯å››è§’ã®ã‚µã‚¤ã‚ºã«å¿œã˜ã¦å¤‰åŒ–ã—ã€å‹•çš„ã«è¨ˆç®—ã•れã¾ã™ (ãŸã ã—四角ã®çŸ­è¾ºã®åŠåˆ†ã‚’è¶…ãˆã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“)。 -You can also set this property using the [OBJECT Get corner radius](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-Get-corner-radius.301-4311357.en.html) and [OBJECT SET CORNER RADIUS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-CORNER-RADIUS.301-4311356.en.html) commands. +ã“ã®ãƒ—ロパティã¯ã€[OBJECT Get corner radius](https://doc.4d.com/4Dv18/4D/18/OBJECT-Get-corner-radius.301-4505428.ja.html) 㨠[OBJECT SET CORNER RADIUS](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-CORNER-RADIUS.301-4505427.ja.html) コマンドを使用ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------ | ------- | ------ | | borderRadius | integer | 最å°å€¤: 0 | - #### 対象オブジェクト -[Rectangle](shapes_overview.md#rectangle) +[四角](shapes_overview.md#四角) -* * * -## Height -This property designates an object's vertical size. -> Some objects may have a predefined height that cannot be altered. +--- +## 高㕠+ +オブジェクトã®ç¸¦ã®ã‚µã‚¤ã‚ºã‚’指定ã—ã¾ã™ã€‚ +> オブジェクトã«ã‚ˆã£ã¦ã¯é«˜ã•ãŒè¦å®šã•れã¦ã„ã‚‹ã‚‚ã®ãŒã‚りã€ãã®å ´åˆã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------ | ------ | ------ | | height | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * +--- ## å¹… -This property designates an object's horizontal size. +ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ¨ªã®ã‚µã‚¤ã‚ºã‚’指定ã—ã¾ã™ã€‚ +> * オブジェクトã«ã‚ˆã£ã¦ã¯é«˜ã•ãŒè¦å®šã•れã¦ã„ã‚‹ã‚‚ã®ãŒã‚りã€ãã®å ´åˆã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 +> * [リストボックス列](listbox_overview.md#リストボックス列) ã« [サイズ変更å¯](properties_ResizingOptions.md#サイズ変更å¯) プロパティãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ‰‹å‹•ã§ã‚«ãƒ©ãƒ ã‚µã‚¤ã‚ºã‚’変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +> * リストボックス㮠[横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) プロパティ㫠"拡大" を設定ã—ã¦ã„ã‚‹å ´åˆã«ãƒ•ォームをリサイズã™ã‚‹ã¨ã€ä¸€ç•ªå³ã®ã‚«ãƒ©ãƒ ã®å¹…ã¯å¿…è¦ã«å¿œã˜ã¦æœ€å¤§å¹…ã‚’è¶…ãˆã¦æ‹¡å¤§ã•れã¾ã™ã€‚ -> * 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----- | ------ | ------ | | width | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) + + -* * * -## 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. + + + +--- +## 最大幅 + +åˆ—ã®æœ€å¤§å¹… (ピクセルå˜ä½)。 列やフォームをサイズ変更ã™ã‚‹éš›ã€ã“ã®ã‚µã‚¤ã‚ºã‚ˆã‚Šã‚‚列幅を大ããã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +> リストボックス㮠[横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) プロパティ㫠"拡大" を設定ã—ã¦ã„ã‚‹å ´åˆã«ãƒ•ォームをリサイズã™ã‚‹ã¨ã€ä¸€ç•ªå³ã®ã‚«ãƒ©ãƒ ã®å¹…ã¯å¿…è¦ã«å¿œã˜ã¦æœ€å¤§å¹…ã‚’è¶…ãˆã¦æ‹¡å¤§ã•れã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | -------- | ------ | ------ | | maxWidth | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) +[リストボックス列](listbox_overview.md#リストボックス列) -* * * -## 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. +åˆ—ã®æœ€å°å¹… (ピクセルå˜ä½)。 列やフォームをサイズ変更ã™ã‚‹éš›ã€ã“ã®ã‚µã‚¤ã‚ºã‚ˆã‚Šã‚‚列幅をå°ã•ãã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +> リストボックス㮠[横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) プロパティ㫠"拡大" を設定ã—ã¦ã„ã‚‹å ´åˆã«ãƒ•ォームをリサイズã™ã‚‹ã¨ã€ä¸€ç•ªå³ã®ã‚«ãƒ©ãƒ ã®å¹…ã¯å¿…è¦ã«å¿œã˜ã¦æœ€å¤§å¹…ã‚’è¶…ãˆã¦æ‹¡å¤§ã•れã¾ã™ã€‚ -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | -------- | ------ | ------ | | minWidth | number | 最å°å€¤: 0 | - #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) +[リストボックス列](listbox_overview.md#リストボックス列) + + + + + -* * * + +--- ## 行ã®é«˜ã• -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 文法 +リストボックス行ã®é«˜ã•を設定ã—ã¾ã™ (ヘッダーãŠã‚ˆã³ãƒ•ッターã¯é™¤ãã¾ã™)。 デフォルトã§ã€è¡Œã®é«˜ã•ã¯ãƒ—ラットフォームã¨ãƒ•ォントサイズã«åŸºã¥ã設定ã•れã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------- | ------ | ---------------------------------------- | -| rowHeight | string | css value in unit "em" or "px" (default) | +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------- | ------ | ------------------------------- | +| rowHeight | string | "em" ã¾ãŸã¯ "px" (デフォルト) å˜ä½ã® css 値 | #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + -#### See also +#### å‚ç…§ +[行高ã•é…列](#行高ã•é…列) -[行高ã•é…列](#row-height-array) -* * * +--- ## 行高ã•é…列 -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). +ã“ã®ãƒ—ロパティã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘ãŸã„行高ã•é…列ã®åå‰ã‚’指定ã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ 行高ã•é…åˆ—ã¯æ•°å€¤åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ (デフォルトã¯å€é•·æ•´æ•°)。 -When a row height array is defined, each of its elements whose value is different from 0 (zero) is taken into account to determine the height of the corresponding row in the list box, based on the current Row Height unit. +行高ã•é…列ãŒå®šç¾©ã•れã¦ã„ã‚‹ã¨ãã€0 ã§ã¯ãªã„値ã®è¦ç´ ã¯ãれãžã‚Œã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å¯¾å¿œã™ã‚‹è¡Œã®é«˜ã•を決定ã™ã‚‹éš›ã«ã€é¸æŠžã•れã¦ã„る行ã®é«˜ã•å˜ä½ã«åŸºã¥ã„ã¦è€ƒæ…®ã•れã¾ã™ã€‚ ãŸã¨ãˆã°: @@ -244,22 +259,24 @@ ARRAY LONGINT(RowHeights;20) 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. +ã“ã“ã§è¡Œã®å˜ä½ãŒ "行" ã§ã‚ã£ãŸã¨ã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® 5行目㯠3行分ã®é«˜ã•ã«ãªã‚‹ä¸€æ–¹ã€ä»–ã®è¡Œã¯ãƒ‡ãƒ•ォルトã®é«˜ã•ã‚’ä¿ã¡ã¾ã™ã€‚ +> * 行高ã•é…列プロパティã¯ã€éšŽå±¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å¯¾ã—ã¦ã¯åŠ¹åŠ›ã‚’æŒã¡ã¾ã›ã‚“。 +> * é…列型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å ´åˆã€ã“ã®ãƒ—ロパティ㯠[自動行高](#自動行高) オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã«é™ã‚Šä½¿ç”¨å¯èƒ½ã§ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------------- | ------ | ---------------------------- | -| rowHeightSource | string | Name of a 4D array variable. | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------ | ---------- | +| rowHeightSource | string | 4D é…列変数ã®åå‰ | #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + + +#### å‚ç…§ +[行ã®é«˜ã•](#行ã®é«˜ã•) + + -#### See also -[行ã®é«˜ã•](#row-height) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Crop.md b/website/translated_docs/ja/FormObjects/properties_Crop.md index 6a6fa1c438d019..4cba22b55e2503 100644 --- a/website/translated_docs/ja/FormObjects/properties_Crop.md +++ b/website/translated_docs/ja/FormObjects/properties_Crop.md @@ -1,38 +1,47 @@ --- id: propertiesCrop -title: Crop +title: 行列数 --- -* * * - -## Columns +--- +## 列 -Sets the number of columns in a thumbnail table. +サムãƒãƒ¼ãƒ«ãƒ†ãƒ¼ãƒ–ルを構æˆã™ã‚‹è¡Œæ•°ã‚’指定ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:----------- |:-------:| ------ | | columnCount | integer | 最å°å€¤: 1 | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ピクãƒãƒ£ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) -* * * -## Rows -Sets the number of rows in a thumbnail table. + +--- +## 行 + +サムãƒãƒ¼ãƒ«ãƒ†ãƒ¼ãƒ–ルを構æˆã™ã‚‹åˆ—数を指定ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:-------- |:-------:| ------ | | rowCount | integer | 最å°å€¤: 1 | - #### 対象オブジェクト -[Picture Button](pictureButton_overview.md) - [Button Grid](buttonGrid_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) \ No newline at end of file +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ピクãƒãƒ£ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) + + + + + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_DataSource.md b/website/translated_docs/ja/FormObjects/properties_DataSource.md index 136520b106f818..8fa270ab49694f 100644 --- a/website/translated_docs/ja/FormObjects/properties_DataSource.md +++ b/website/translated_docs/ja/FormObjects/properties_DataSource.md @@ -3,296 +3,340 @@ id: propertiesDataSource title: データソース --- -* * * - +--- ## 自動挿入 -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. +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ¬¡ã®ãƒ•ォームオブジェクトã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: -For example, given a choice list containing "France, Germany, Italy" that is associated with a "Countries" combo box: if the **automatic insertion** property is set and a user enters "Spain", then the value "Spain" is automatically added to the list in memory: +- é¸æŠžãƒªã‚¹ãƒˆã¨ç´ã¥ã‘られã¦ã„ã‚‹ [コンボボックス](comboBox_overview.md) ãŠã‚ˆã³ [リストボックス列](listbox_overview.md#リストボックス列) フォームオブジェクト。 +- é…列ã¾ãŸã¯ã‚ªãƒ–ジェクトデータソースã«ã‚ˆã‚Šã€ç´ã¥ã‘られãŸãƒªã‚¹ãƒˆãŒç”Ÿæˆã•れã¦ã„ã‚‹ [コンボボックス](comboBox_overview.md) フォームオブジェクト。 + +ãŸã¨ãˆã°ã€"France, Germany, Italy" ã¨ã„ã†å€¤ã‚’å«ã‚€é¸æŠžãƒªã‚¹ãƒˆãŒ "Countries" ã¨ã„ã†ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られã¦ã„ãŸå ´åˆã‚’考ãˆã¾ã™ã€‚**自動挿入** ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã‚’ã•れã¦ã„ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ "Spain" ã¨ã„ã†å€¤ã‚’入力ã™ã‚‹ã¨ã€"Spain" ã¨ã„ã†å€¤ãŒè‡ªå‹•çš„ã«ãƒ¡ãƒ¢ãƒªãƒ¼å†…ã®ãƒªã‚¹ãƒˆã«è¿½åŠ ã•れã¾ã™: ![](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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------------ | ------- | ----------- | | automaticInsertion | boolean | true, false | - #### 対象オブジェクト -[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) +[コンボボックス](comboBox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + -* * * + +--- ## é¸æŠžãƒªã‚¹ãƒˆ -Associates a choice list with an object. It can be a choice list name (a list reference) or a collection of default values. +é¸æŠžãƒªã‚¹ãƒˆã‚’ãƒ•ã‚©ãƒ¼ãƒ ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«é–¢é€£ã¥ã‘ã¾ã™ã€‚ 指定ã§ãã‚‹ã®ã¯é¸æŠžãƒªã‚¹ãƒˆå (リストã®å‚ç…§) ã¾ãŸã¯ãƒ‡ãƒ•ォルト値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã™ã€‚ + +é¸æŠžãƒªã‚¹ãƒˆã‚’ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«ç´ã¥ã‘ã‚‹ã«ã¯ã€[OBJECT SET LIST BY NAME](https://doc.4d.com/4dv19/help/command/ja/page237.html) ã¾ãŸã¯ [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4dv19/help/command/ja/page1266.html) コマンドを使ã£ã¦ã‚‚ãŠã“ãªãˆã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ---------------- | --------------------------------------------------- | -| choiceList | list, collection | A list of possible values | -| list | list, collection | A list of possible values (hierarchical lists only) | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ---------- | -------------------- | +| choiceList | リストã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | é¸æŠžå¯èƒ½ãªå€¤ã®ãƒªã‚¹ãƒˆ | +| list | リストã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | é¸æŠžå¯èƒ½ãªå€¤ã®ãƒªã‚¹ãƒˆ (階層リストã®ã¿) | #### 対象オブジェクト -[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) +[ドロップダウンリスト](dropdownList_Overview.md) - [コンボボックス](comboBox_overview.md) - [階層リスト](list_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) -* * * -## Choice List (static list) -List of static values to use as labels for the tab control object. +--- +## é¸æŠžãƒªã‚¹ãƒˆ (é™çš„リスト) -#### JSON 文法 +タブコントロールオブジェクトã®ãƒ©ãƒ™ãƒ«ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹é™çš„ãªå€¤ã®ãƒªã‚¹ãƒˆã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ---------------- | ---------------------------------------- | -| labels | list, collection | A list of values to fill the tab control | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ---------- | ---------------------- | +| labels | リストã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | タブコントロールラベルã«ä½¿ç”¨ã™ã‚‹å€¤ã®ãƒªã‚¹ãƒˆã€‚ | #### 対象オブジェクト -[Tab Control](tabControl.md) +[タブコントロール](tabControl.md) -* * * +--- ## カレントã®é …ç›® +`コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` -`Collection or entity selection list boxes` +ユーザーã«ã‚ˆã£ã¦é¸æŠžã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ /エンティティãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã‚’指定ã—ã¾ã™ã€‚ オブジェクト変数ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクトをå—ã‘入れる割り当ã¦å¯èƒ½ãªå¼ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ユーザーãŒä½•ã‚‚é¸æŠžã—ãªã‹ã£ãŸå ´åˆã€ã‚ã‚‹ã„ã¯ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ãŸå ´åˆã€Null 値ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ +> ã“ã®ãƒ—ロパティã¯ã€Œèª­ã¿å–り専用ã€ã§ã‚りã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã‘るユーザーアクションã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ ã“ã®å€¤ã‚’編集ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžçŠ¶æ…‹ã‚’å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------------- | ------ | --------- | +| currentItemSource | string | オブジェクト型ã®å¼ | + +#### 対象オブジェクト +[リストボックス ](listbox_overview.md) -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------------- | ------ | ----------------- | -| currentItemSource | string | Object expression | +--- + +## カレントã®é …ç›®ã®ä½ç½® +`コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` +ユーザーã«ã‚ˆã£ã¦é¸æŠžã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ /エンティティã®ä½ç½®ã‚’表ã™å€é•·æ•´æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã‚’指定ã—ã¾ã™ã€‚ + +* è¦ç´ /エンティティãŒé¸æŠžã•れã¦ã„ãªã„å ´åˆã€å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã¯ 0 ã‚’å—ã‘å–りã¾ã™ã€‚ +* å˜ä¸€ã®è¦ç´ /エンティティãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã¯ãã®ä½ç½®ã‚’å—ã‘å–りã¾ã™ã€‚ +* 複数ã®è¦ç´ /エンティティãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã€å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã¯æœ€å¾Œã«é¸æŠžã•れãŸè¦ç´ /エンティティã®ä½ç½®ã‚’å—ã‘å–りã¾ã™ã€‚ +> ã“ã®ãƒ—ロパティã¯ã€Œèª­ã¿å–り専用ã€ã§ã‚りã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã‘るユーザーアクションã«åŸºã¥ã„ã¦è‡ªå‹•çš„ã«æ›´æ–°ã•れã¾ã™ã€‚ ã“ã®å€¤ã‚’編集ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžçŠ¶æ…‹ã‚’å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------------- | ------ | ----- | +| currentItemPositionSource | string | 数値型ã®å¼ | #### 対象オブジェクト +[リストボックス ](listbox_overview.md) -[リストボックス ](listbox_overview.md#overview) -* * * -## カレントã®é …ç›®ã®ä½ç½® -`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. +- セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã® [リストボックス列](listbox_overview.md#リストボックス列)。 +- オブジェクトã¾ãŸã¯é…列ã¨ç´ã¥ã„㟠[ドロップダウンリスト](dropdownList_Overview.md)。 -> 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. +[å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã®åž‹å¼ã‚¿ã‚¤ãƒ—) ã®ç« ã‚‚å‚ç…§ãã ã•ã„。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------------- | ------ | ----------------- | -| currentItemPositionSource | string | Number expression | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------ | ------ | -------------------------------------------------- | +| dataSourceTypeHint | string |
        • **リストボックス列:** "boolean", "number", "picture", "text", date", "time"。 *é…列/セレクションリストボックスã®ã¿*: "integer", "object"
        • **ドロップダウンリスト:** "object", "arrayText", "arrayDate", "arrayTime", "arrayNumber"
        • | #### 対象オブジェクト -[リストボックス ](listbox_overview.md) +オブジェクトã¾ãŸã¯é…列ã¨ç´ã¥ã„㟠[ドロップダウンリスト](dropdownList_Overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + + + +--- +## データタイプ (リスト) -* * * +[ドロップダウンリスト](dropdownList_Overview.md) ã«é–¢é€£ã¥ã‘られãŸãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã«ä¿å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã®ç¨®é¡žã‚’定義ã—ã¾ã™ã€‚ ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã¯æ¬¡ã®ãƒ•ォームオブジェクトã§ä½¿ç”¨ã•れã¾ã™: -## データタイプ +- [é¸æŠžãƒªã‚¹ãƒˆã¨ç´ã¥ã„ãŸ](dropdownList_Overview.md#é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨) ドロップダウンリスト。 +- [階層型ã®é¸æŠžãƒªã‚¹ãƒˆã¨ç´ã¥ã„ãŸ](dropdownList_Overview.md#éšŽå±¤åž‹é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨) ドロップダウンリスト + +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: + +- **リストå‚ç…§**: ドロップダウンリストãŒéšŽå±¤åž‹ã§ã‚ã‚‹ã“ã¨ã‚’宣言ã—ã¾ã™ã€‚ ã“ã®ãƒ‰ãƒ­ãƒƒãƒ—ãƒ€ã‚¦ãƒ³ãƒªã‚¹ãƒˆã¯æœ€å¤§ã§ 2ã¤ã®éšŽå±¤ãƒ¬ãƒ™ãƒ«ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã€ãã®å†…容㯠**Hierarchical Lists** テーマã®4Dランゲージコマンドã§ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **é¸æŠžã•れãŸé …目値** (デフォルト): ドロップダウンリストã¯éšŽå±¤åž‹ã§ãªãã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦é¸æŠžã•れãŸé …ç›®ã®å€¤ãŒç›´æŽ¥ä¿å­˜ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ "Blue" ã¨ã„ã†å€¤ã‚’é¸æŠžã—ãŸå ´åˆã€ã“ã®å€¤ãŒãƒ•ィールドã«ä¿å­˜ã•れã¾ã™ã€‚ +- **é¸æŠžã•れãŸé …ç›®å‚ç…§**: ドロップダウンリストã¯éšŽå±¤åž‹ã§ãªãã€é¸æŠžãƒªã‚¹ãƒˆé …ç›®ã®å‚ç…§ãŒã‚ªãƒ–ジェクトã«ä¿å­˜ã•れã¾ã™ã€‚ ã“ã®å‚照番å·ã¨ã¯ [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/ja/page376.html) ã¾ãŸã¯ [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/ja/page385.html) コマンド㮠*itemRef* パラメーターã€ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’通ã—ã¦ãれãžã‚Œã®é …ç›®ã¨é–¢é€£ä»˜ã‘ã•ã‚ŒãŸæ•°å€¤ã§ã™ã€‚ ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ãƒ¡ãƒ¢ãƒªãƒ¼ã‚’節約ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æ•°å€¤ã‚’ä¿å­˜ã™ã‚‹ã®ã¯æ–‡å­—列をä¿å­˜ã™ã‚‹ã‚ˆã‚Šå®¹é‡ãŒè»½ã„ã‹ã‚‰ã§ã™ã€‚ ã¾ãŸã€ã“れã«ã‚ˆã‚Šã‚¢ãƒ—リケーションã®ç¿»è¨³ãŒç°¡å˜ã«ãªã‚Šã¾ã™ã€‚åŒã˜é …ç›®ã®å‚照値をæŒã¤ã€ç•°ãªã‚‹è¨€èªžã§æ›¸ã‹ã‚ŒãŸè¤‡æ•°ã®ãƒªã‚¹ãƒˆã‚’用æ„ã—ã¦ãŠã„ã¦ã€ã‚¢ãƒ—リケーションã®è¨€èªžã«å¿œã˜ãŸãƒªã‚¹ãƒˆã‚’ロードã™ã‚‹ã ã‘ã§å¤šè¨€èªžã«å¯¾å¿œã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ + +**é¸æŠžã•れãŸé …ç›®å‚ç…§** オプションã®ä½¿ç”¨ã®éš›ã«ã¯ã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: +- å‚ç…§ã‚’ä¿å­˜ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã¯ã€æ•°å€¤åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ (リスト内ã«è¡¨ç¤ºã•れã¦ã„る値ã®åž‹ã¨ã¯é–¢ä¿‚ã‚りã¾ã›ã‚“)。 [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹å¼ã‚¿ã‚¤ãƒ—) プロパティã¯è‡ªå‹•çš„ã«è¨­å®šã•れã¾ã™ã€‚ +- リストã®é …ç›®ã«ã¯æœ‰åйã‹ã¤å›ºæœ‰ã®å‚ç…§ãŒé–¢é€£ä»˜ã‘られã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- ドロップダウンリストã¯ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã¨ç´ã¥ã„ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | -------------------- | +| saveAs | string | "value", "reference" | + + +> `"type": "dropdown"` フォームオブジェクト㫠`"dataSourceTypeHint" : "integer"` ã®ã¿ã‚’設定ã™ã‚‹ã¨ã€éšŽå±¤ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストãŒå®£è¨€ã•れã¾ã™ã€‚ -Please refer to [Expression Type](properties_Object.md#expression-type) section. #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) +リストã¨ç´ã¥ã„㟠[ドロップダウンリスト](dropdownList_Overview.md) -* * * -## Default (list of) values +--- + +## デフォルト値 -List of values that will be used as default values for the list box column (array type only). These values are automatically available in the [array variable](properties_Object.md#variable-or-expression) associated with this column when the form is executed. Using the language, you can manage the object by referring to this array. +é…列型リストボックスã«ãŠã„ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã®ãƒ‡ãƒ•ォルト値ã¨ã—ã¦ä½¿ç”¨ã•れる値ã®ãƒªã‚¹ãƒˆã§ã™ã€‚ ã“れらã®å€¤ã¯è‡ªå‹•ã§ã€ãƒ•ォームを実行ã—ãŸã¨ãã«ãã®åˆ—ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸ [é…列変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«ä»£å…¥ã•れã¾ã™ã€‚ ã“ã®é…列をå‚ç…§ã™ã‚‹ã“ã¨ã§ã€ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚’使ã£ã¦ã‚ªãƒ–ジェクトを管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> Do not make confusion between this property and the "[default value](properties_RangeOfValues.md#default-list-of-values)" property that allows to define a field value in new records. +> ã“ã®ãƒ—ロパティã¨ã€æ–°è¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ãƒ•ィールド値を定義ã™ã‚‹ã®ã«ä½¿ãˆã‚‹å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã® [デフォルト値](properties_RangeOfValues.md#デフォルト値) ã‚’æ··åŒã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 -You must enter a list of values. In the Form editor, a specific dialog box allows you to enter values separated by carriage returns: +デフォルト値ã®ãƒªã‚¹ãƒˆã‚’入力ã—ã¾ã™ã€‚ フォームエディター上ã§å°‚用ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒé–‹ãã€æ”¹è¡Œã§åŒºåˆ‡ã‚‰ã‚ŒãŸå€¤ã‚’入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/defaultValues.png) -> You can also define a [choice list](properties_DataSource.md#choice-list) with the list box column. However, a choice list will be used as list of selectable values for each column row, whereas the default list fill all column rows. +> リストボックス列㫠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) を定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ é¸æŠžãƒªã‚¹ãƒˆã¯åˆ—ã®å„行ã«ãŠã„ã¦é¸æŠžå¯èƒ½ãªå€¤ã®å€™è£œã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ãŒã€ãƒ‡ãƒ•ォルト値ã®ãƒªã‚¹ãƒˆã¯ã‚«ãƒ©ãƒ ã®å„行ã«ä¸Šã‹ã‚‰é †ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ---------- | ---------------------------------------------------------------- | -| values | collection | A collection of default values (strings), ex: "a", "b", "c", "d" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ---------- | ------------------------------------------ | +| values | collection | デフォルト値 (文字列) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚例: "a", "b", "c", "d" | #### 対象オブジェクト -[List Box Column (array type only)](listbox_overview.md#list-box-columns) +[リストボックス列 (é…列型ã®ã¿)](listbox_overview.md#リストボックス列) + + -* * * +--- ## å¼ -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. - -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: - - * 文字列 - * Numeric - * 日付 - * 時間 - * ピクãƒãƒ£ãƒ¼ - * 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: - - * 文字列 - * Numeric - * 日付 - * ピクãƒãƒ£ãƒ¼ - * ブール - - - 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. +[セレクション型](listbox_overview.md#セレクションリストボックス) ãŠã‚ˆã³ [コレクション/エンティティセレクション型](listbox_overview.md#コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) リストボックスã®ãƒ—ロパティã§ã™ã€‚ **[変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼)** ã®ç« ã‚‚å‚ç…§ãã ã•ã„。 -#### JSON 文法 +列ã«å‰²ã‚Šå½“ã¦ã‚‹ 4Då¼ã§ã™ã€‚ 以下ã®ã‚‚ã®ã‚’指定ã§ãã¾ã™: + +- **å˜ç´”ãªå¤‰æ•°** (ã“ã®å ´åˆã€ã‚³ãƒ³ãƒ‘ã‚¤ãƒ«ç”¨ã«æ˜Žç¤ºçš„ã«åž‹å®£è¨€ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 BLOB ã¨é…列型以外ã®ã©ã‚“ãªåž‹ã®å¤‰æ•°ã‚‚使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 変数ã®å€¤ã¯é€šå¸¸ `On Display Detail` イベントã§è¨ˆç®—ã•れã¾ã™ã€‚ + +- 標準㮠[Table]Field シンタックスを使用ã—㟠**フィールド** ([セレクション型リストボックス](listbox_overview.md#セレクションリストボックス) ã®ã¿) 例: `[Employees]LastName`。 以下ã®åž‹ã®ãƒ•ィールドを使用ã§ãã¾ã™: + * String + * 数値 + * 日付 + * 時間 + * ピクãƒãƒ£ãƒ¼ + * ブール + マスターテーブルãŠã‚ˆã³ä»–ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ•ィールドを指定ã§ãã¾ã™ã€‚ + +- **4Då¼** (å˜ç´”ãªå¼ã€ãƒ•ォーミュラã€ã¾ãŸã¯ 4Dメソッド)。 å¼ã¯å€¤ã‚’è¿”ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ 値㯠`On Display Detail` ãŠã‚ˆã³ `On Data Change` イベントã§è©•価ã•れã¾ã™ã€‚ å¼ã®çµæžœã¯ã€ã‚¢ãƒ—リケーションモードã§ãƒ•ォームを実行ã™ã‚‹ã¨è‡ªå‹•ã§è¡¨ç¤ºã•れã¾ã™ã€‚ å¼ã¯ã€ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ãƒžã‚¹ã‚¿ãƒ¼ãƒ†ãƒ¼ãƒ–ル㮠(カレントã¾ãŸã¯å‘½å) セレクションã®å„レコードã”ã¨ã«ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„è¦ç´ ã”ã¨ã«ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã§ã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã”ã¨ã«è©•価ã•れã¾ã™ã€‚ 空ã®å ´åˆã€åˆ—ã«ã¯ä½•も表示ã•れã¾ã›ã‚“。 + 以下ã®åž‹ã®å¼ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + * String + * 数値 + * 日付 + * ピクãƒãƒ£ãƒ¼ + * ブール -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | ----------------------------------------------------------------------- | -| dataSource | string | A 4D variable, field name, or an arbitrary complex language expression. | + コレクション/エンティティセレクション型リストボックスã«ãŠã„ã¦ã¯ã€Null ã‚ã‚‹ã„ã¯ã‚µãƒãƒ¼ãƒˆã•れãªã„åž‹ã¯ç©ºã®æ–‡å­—列ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ +コレクションã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã™ã‚‹å ´åˆã€ã‚«ãƒ©ãƒ ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸè¦ç´ ãƒ—ロパティ/エンティティ属性ã¯ã€é€šå¸¸ [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.ja.html) ã‚’å«ã‚€å¼ã‚’用ã„ã¦å®£è¨€ã—ã¾ã™ã€‚ ã“ã® `This` ã¯ç¾åœ¨å‡¦ç†ä¸­ã®è¦ç´ ã¸ã®å‚ç…§ã‚’è¿”ã™ã€å°‚用㮠4Dコマンドã§ã™ã€‚ ãŸã¨ãˆã°ã€**This.\** (ã“ã“ã§ã®**\** ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒ—ロパティパスã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ãƒ‘ス) を使用ã™ã‚‹ã“ã¨ã§ã€å„è¦ç´ /エンティティã®ã‚«ãƒ¬ãƒ³ãƒˆã®å€¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ãŸå ´åˆã€4D ã¯å„コレクションè¦ç´ ã«å¯¾ã—ã¦ã€å˜ä¸€ã®ãƒ—ロパティ (åå‰ã¯ "value") ã‚’æŒã¤ã‚ªãƒ–ジェクトを作æˆã—ã€ãれã«è¦ç´ ã®å€¤ã‚’æ ¼ç´ã—ã¾ã™ã€‚ ã“ã®å ´åˆã€**This.value** ã‚’å¼ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + + [代入ä¸å¯ãªå¼](Concepts/quick-tour.md#å¼) (例: `[Person]FirstName+" "+[Person]LastName` ãªã©) を使用ã—ãŸå ´åˆã€[入力å¯](properties_Entry.md#入力ã‹) オプションãŒé¸æŠžã•れã¦ã„ã¦ã‚‚ã€ãã®åˆ—ã«å€¤ã‚’入力ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +フィールドã€å¤‰æ•°ã€ã‚ã‚‹ã„ã¯ä»£å…¥å¯èƒ½ãªå¼ (*例: Person.lastName*) を使用ã—ãŸå ´åˆã€[入力å¯](properties_Entry.md#入力å¯) プロパティã®è¨­å®šã«åŸºã¥ã列ã¸ã®å…¥åŠ›å¯/ä¸å¯ãŒæ±ºå®šã•れã¾ã™ã€‚ + + +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | ------------------------- | +| dataSource | string | 4D変数ã€ãƒ•ィールドåã€ã‚ã‚‹ã„ã¯ä»»æ„ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸å¼ | #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) +[リストボックス列](listbox_overview.md#リストボックス列) -* * * -## マスターテーブル -`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. +--- -All database tables can be used, regardless of whether the form is related to a table (table form) or not (project form). +## マスターテーブル +`カレントセレクションリストボックス` -#### JSON 文法 +使用ã™ã‚‹ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒå±žã™ã‚‹ãƒ†ãƒ¼ãƒ–ルを指定ã—ã¾ã™ã€‚ ã“ã®ãƒ†ãƒ¼ãƒ–ルã¨ãã®ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®åˆ—ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ•ィールドã®å‚ç…§ã‚’å½¢æˆã—ã¾ã™ (フィールドå‚照やフィールドをå«ã‚€å¼)。 ã‚る列ãŒä»–ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ•ィールドをå‚ç…§ã—ã¦ã„ã‚‹ã¨ã—ã¦ã‚‚ã€è¡¨ç¤ºã•ã‚Œã‚‹è¡Œã®æ•°ã¯ãƒžã‚¹ã‚¿ãƒ¼ãƒ†ãƒ–ルã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰æ•°ã¨ãªã‚Šã¾ã™ã€‚ + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルãŒåˆ©ç”¨ã§ãã¾ã™ã€‚フォームãŒãƒ†ãƒ¼ãƒ–ルã«å±žã—ã¦ã„ã‚‹ã‹ (テーブルフォームã®å ´åˆ) ã‚ã‚‹ã„ã¯å±žã—ã¦ã„ãªã„ã‹ (プロジェクトフォーム) ã¯é–¢ä¿‚ã‚りã¾ã›ã‚“。 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----- | ------ | ------------ | -| table | number | Table number | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----- | ------ | ------ | +| table | number | ãƒ†ãƒ¼ãƒ–ãƒ«ç•ªå· | #### 対象オブジェクト +[リストボックス](listbox_overview.md) + -[リストボックス](listbox_overview.md#overview) -* * * +--- ## 関連付㑠-This property is available in the following conditions: +ã“ã®ãƒ—ロパティã¯ä»¥ä¸‹ã®å ´åˆã«è¡¨ç¤ºã•れã¾ã™: -- a [choice list](#choice-list) is associated with the object -- for [inputs](input_overview.md) and [list box columns](listbox_overview.md#list-box-columns), a [required list](properties_RangeOfValues.md#required-list) is also defined for the object (both options should use usually the same list), so that only values from the list can be entered by the user. +- オブジェクトã«å¯¾ã—㦠[é¸æŠžãƒªã‚¹ãƒˆ](#é¸æŠžãƒªã‚¹ãƒˆ) ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ +- [入力](input_overview.md) ãŠã‚ˆã³ [リストボックス列](listbox_overview.md#リストボックス列) ã®å ´åˆã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒªã‚¹ãƒˆå†…ã®å€¤ã®ã¿å…¥åŠ›ã§ãるよã†ã«ã€ã‚ªãƒ–ジェクトã«å¯¾ã—㦠[指定リスト](properties_RangeOfValues.md#指定リスト) も定義ã•れã¦ã„ã‚‹ (通常ã¯ä¸¡æ–¹ã®ã‚ªãƒ—ションã§åŒã˜ãƒªã‚¹ãƒˆã‚’使用ã—ã¦ã„ã‚‹ã¯ãšã§ã™)。 -This property specifies, in the context of a field or variable associated with a list of values, the type of contents to save: +ã“ã®ãƒ—ロパティã¯ã€é¸æŠžãƒªã‚¹ãƒˆã«é–¢é€£ä»˜ã‘ã•れãŸãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã«ãŠã„ã¦ã€ãƒ•ィールドã«ä¿å­˜ã™ã‚‹å†…容ã®åž‹ã‚’指定ã—ã¾ã™: -- **Save as Value** (default option): the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. -- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the `APPEND TO LIST` or `SET LIST ITEM` commands, or in the lists editor. +- **リスト項目ã®å€¤** (デフォルトã®ã‚ªãƒ—ション): ユーザーã«ã‚ˆã£ã¦é¸æŠžã•れãŸé …ç›®ã®å€¤ãŒç›´æŽ¥ä¿å­˜ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ "Blue" ã¨ã„ã†å€¤ã‚’é¸æŠžã—ãŸå ´åˆã€ã“ã®å€¤ãŒãƒ•ィールドã«ä¿å­˜ã•れã¾ã™ã€‚ +- **リスト項目ã®å‚照番å·**: é¸æŠžãƒªã‚¹ãƒˆé …ç›®ã®å‚ç…§ãŒã‚ªãƒ–ジェクトã«ä¿å­˜ã•れã¾ã™ã€‚ ã“ã®å‚照番å·ã¨ã¯ [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/ja/page376.html) ã¾ãŸã¯ [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/ja/page385.html) コマンド㮠*itemRef* パラメーターã€ã¾ãŸã¯ãƒªã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’通ã—ã¦ãれãžã‚Œã®é …ç›®ã¨é–¢é€£ä»˜ã‘ã•ã‚ŒãŸæ•°å€¤ã§ã™ã€‚ -This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. +ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ãƒ¡ãƒ¢ãƒªãƒ¼ã‚’節約ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã«æ•°å€¤ã‚’ä¿å­˜ã™ã‚‹ã®ã¯æ–‡å­—列をä¿å­˜ã™ã‚‹ã‚ˆã‚Šå®¹é‡ãŒè»½ã„ã‹ã‚‰ã§ã™ã€‚ ã¾ãŸã€ã“れã«ã‚ˆã‚Šã‚¢ãƒ—リケーションã®ç¿»è¨³ãŒç°¡å˜ã«ãªã‚Šã¾ã™ã€‚åŒã˜é …ç›®ã®å‚照値をæŒã¤ã€ç•°ãªã‚‹è¨€èªžã§æ›¸ã‹ã‚ŒãŸè¤‡æ•°ã®ãƒªã‚¹ãƒˆã‚’用æ„ã—ã¦ãŠã„ã¦ã€ã‚¢ãƒ—リケーションã®è¨€èªžã«å¿œã˜ãŸãƒªã‚¹ãƒˆã‚’ロードã™ã‚‹ã ã‘ã§å¤šè¨€èªžã«å¯¾å¿œã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ -Using this property requires compliance with the following principles: +リスト項目ã®å‚照番å·ã®ä½¿ç”¨ã®éš›ã«ã¯ã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +- å‚ç…§ã‚’ä¿å­˜ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ã¯ã€æ•°å€¤åž‹ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ (リスト内ã«è¡¨ç¤ºã•れã¦ã„る値ã®åž‹ã¨ã¯é–¢ä¿‚ã‚りã¾ã›ã‚“)。 [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹å¼ã‚¿ã‚¤ãƒ—) プロパティã¯è‡ªå‹•çš„ã«è¨­å®šã•れã¾ã™ã€‚ +- リストã®é …ç›®ã«ã¯æœ‰åйã‹ã¤å›ºæœ‰ã®å‚ç…§ãŒé–¢é€£ä»˜ã‘られã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). -- 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------ | ------ | -------------------- | | saveAs | string | "value", "reference" | - #### 対象オブジェクト +[入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) -[Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * +--- ## é¸æŠžã•れãŸé …ç›® +`コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` -`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. +ユーザーã«ã‚ˆã£ã¦é¸æŠžã•れã¦ã„る一ã¤ä»¥ä¸Šã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ /エンティティãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å¤‰æ•°ã‚ã‚‹ã„ã¯å¼ã‚’指定ã—ã¾ã™ã€‚ -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------- | ------ | --------------------- | -| selectedItemsSource | string | Collection expression | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------- | ------ | ------- | +| selectedItemsSource | string | ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å¼ | #### 対象オブジェクト +[リストボックス ](listbox_overview.md) -[リストボックス ](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. +使用ã™ã‚‹å‘½åセレクションを指定ã—ã¾ã™ã€‚ 有効ãªå‘½åセレクションã®åå‰ã‚’入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 使用ã§ãã‚‹ã®ã¯ãƒ—ロセスã‚ã‚‹ã„ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス命åセレクションã§ã™ã€‚ リストボックスã®å†…容ã¯ã“ã®ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«åŸºã¥ãã¾ã™ã€‚ é¸æŠžã•れãŸå‘½åセレクションã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れる時点ã§å­˜åœ¨ã—ã€æœ‰åйã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¯ç©ºã§è¡¨ç¤ºã•れã¾ã™ã€‚ -> Named selections are ordered lists of records. They are used to keep the order and current record of a selection in memory. For more information, refer to **Named Selections** section in the *4D Language Reference manual*. +> 命åセレクションã¯ã‚½ãƒ¼ãƒˆæ¸ˆã¿ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãƒªã‚¹ãƒˆã§ã™ã€‚ ã“れã¯ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ä¸­ã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰ã¨ä¸¦ã³é †ã‚’メモリーã«ä¿æŒã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ 詳細ã¯ã€*4Dランゲージリファレンス マニュアル* ã® **命åセレクション** ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------- | ------ | -------------------- | -| namedSelection | string | Named selection name | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ----------- | +| namedSelection | string | 命åセレクションã®åå‰ | #### 対象オブジェクト - -[リストボックス](listbox_overview.md#overview) \ No newline at end of file +[リストボックス](listbox_overview.md) diff --git a/website/translated_docs/ja/FormObjects/properties_Display.md b/website/translated_docs/ja/FormObjects/properties_Display.md index 6ef85d82f5f810..84fbc842100788 100644 --- a/website/translated_docs/ja/FormObjects/properties_Display.md +++ b/website/translated_docs/ja/FormObjects/properties_Display.md @@ -1,583 +1,614 @@ --- id: propertiesDisplay -title: Display +title: 表示 --- -* * * - -## 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: +文字フォーマットã¯ã€è¡¨ç¤ºã‚„å°åˆ·æ™‚ã«æ–‡å­—フィールドや変数ã«ãƒ‡ãƒ¼ã‚¿ã‚’表示ã™ã‚‹æ–¹æ³•を制御ã—ã¾ã™ã€‚ ä»¥ä¸‹ã¯æ–‡å­—ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ç”¨ã«æä¾›ã•れるフォーマットã®ãƒªã‚¹ãƒˆã§ã™: ![](assets/en/FormObjects/property_alphaFormat.png) -You can choose a format from this list or use any custom format. The default list contains formats for some of the most common alpha fields that require formats: US telephone numbers (local and long distance), Social Security numbers, and zip codes. You can also enter a custom format name set in the Filters and formats editor of the tool box. In this case, the format cannot be modified in the object properties. Any custom formats or filters that you have created are automatically available, preceded by a vertical bar (|). +ã“ã®ãƒªã‚¹ãƒˆã‹ã‚‰ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒœãƒœãƒƒã‚¯ã‚¹ã«å…¥åŠ›ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ フォーマットãƒãƒƒãƒ—アップメニューã«ã¯ã€ä¸»ã«ä½¿ç”¨ã•れる文字フォーマット (電話番å·ç­‰) ãŒç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ ã¾ãŸã€ãƒ„ールボックスã®ãƒ•ィルターã¨ãƒ•ォーマットã§è¨­å®šã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ãã®ãƒ•ォーマットをオブジェクトプロパティã§å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 開発者ãŒä½œæˆã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ•ォーマットやフィルターã¯ãƒªã‚¹ãƒˆã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -The number sign (#) is the placeholder for an alphanumeric display format. You can include the appropriate dashes, hyphens, spaces, and any other punctuation marks that you want to display. You use the actual punctuation marks you want and the number sign for each character you want to display. +シャープ (#) ã¯æ–‡å­—表示フォーマットã®ãƒ—レースホルダーã§ã™ã€‚ ãƒã‚¤ãƒ•ンやスペースã€ãã®ä»–ã®å¥èª­ç‚¹ã‚’表示ã—ãŸã„å ´æ‰€ã«æŒ¿å…¥ã§ãã¾ã™ã€‚ 表示ã—ãŸã„実際ã®å¥èª­ç‚¹ã¨ã€æ–‡å­—データを表示ã™ã‚‹å ´æ‰€ã«ã¯ # ã‚’ç½®ãã¾ã™ã€‚ -For example, consider a part number with a format such as "RB-1762-1". +ãŸã¨ãˆã°éƒ¨å“番å·ãŒ "RB-1762-1" ã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ™‚〠-The alpha format would be: +文字フォーマットを以下ã®ã‚ˆã†ã«æ›¸ã‘ã¾ã™: ##-####-# - -When the user enters "RB17621," the field displays: +ユーザー㌠“RB17621†ã¨å…¥åŠ›ã™ã‚‹ã¨ã€ãƒ•ィールドã«ã¯ä»¥ä¸‹ã®é€šã‚Šã«è¡¨ç¤ºã•れã¾ã™: RB-1762-1 - -The field actually contains "RB17621". +フィールドã«å®Ÿéš›ã«æ ¼ç´ã•れる値㯠“RB17621†ã§ã™ã€‚ -If the user enters more characters than the format allows, 4D displays the last characters. For example, if the format is: +フォーマットãŒè¨±å¯ã™ã‚‹ã‚ˆã‚Šã‚‚多ãã®æ–‡å­—ãŒå…¥åŠ›ã•れるã¨ã€4Dã¯æœ€å¾Œã®æ–‡å­—を表示ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ãƒ•ォーマットãŒä»¥ä¸‹ã®æ™‚: - (#######) - + (#######) -and the user enters "proportion", the field displays: +ãã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ “proportion†ã¨å…¥åŠ›ã™ã‚‹ã¨ã€ãƒ•ィールドã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: - (portion) - + (portion) -The field actually contains "proportion". 4D accepts and stores the entire entry no matter what the display format. No information is lost. +フィールドã«ã¯ “proportionâ€ ãŒæ ¼ç´ã•れã¾ã™ã€‚ 表示フォーマットã«ã‹ã‹ã‚らãšã€4Dã¯å…¥åŠ›ã•ã‚ŒãŸæ–‡å­—ã‚’å—ã‘å…¥ã‚Œã€æ ¼ç´ã—ã¾ã™ã€‚ データãŒå¤±ã‚れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | ------------------------------------------------------------------------------------ | -| textFormat | string | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", custom formats | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | -------------------------------------------------------------------------------- | +| textFormat | string | "### ####", "(###) ### ####", "### ### ####", "### ## ####", "00000", カスタムフォーマット | #### 対象オブジェクト -[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) +[コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) + + + -* * * -## 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: -| Format name | JSON String | Example (US system) | + + +--- + +## 日付フォーマット + +日付フォーマットã¯ã€è¡¨ç¤ºã‚„å°åˆ·æ™‚ã«æ—¥ä»˜ã‚’表示ã™ã‚‹æ–¹æ³•を制御ã—ã¾ã™ã€‚ データ入力ã®éš›ã¯é¸æŠžã—ãŸè¡¨ç¤ºãƒ•ォーマットã¨ã¯é–¢ä¿‚ãªãã€YYYY/MM/DD å½¢å¼ã§æ—¥ä»˜ã‚’入力ã—ã¾ã™ã€‚ +> [数値フォーマット](#数値フォーマット) ã‚„ [文字フォï¼ãƒžãƒƒãƒˆ](#文字フォï¼ãƒžãƒƒãƒˆ) ã¨ç•°ãªã‚Šã€æ—¥ä»˜è¡¨ç¤ºãƒ•ã‚©ï¼ãƒžãƒƒãƒˆã¯4Dã®çµ„ã¿è¾¼ã¿ãƒ•ォーマットã®ãªã‹ã‹ã‚‰é¸æŠžã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +利用å¯èƒ½ãªæ—¥ä»˜è¡¨ç¤ºãƒ•ォーマットã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +| フォーマット | JSON 文字列 | 例 | | ------------------------------- | ------------ | ----------------------------- | -| System date short | - (default) | 03/25/20 | -| System date abbreviated *(1)* | systemMedium | Wed, Mar 25, 2020 | -| System date long | systemLong | Wednesday, March 25, 2020 | +| System date short | - (デフォルト) | 20/03/25 | +| System date abbreviated *(1)* | systemMedium | 2020/03/25 | +| System date long | systemLong | 2020å¹´3月25æ—¥ 水曜日 | | RFC 822 | rfc822 | Tue, 25 Mar 2020 22:00:00 GMT | -| Short Century | shortCentury | 03/25/20 but 04/25/2032 *(2)* | +| Short Century | shortCentury | 03/25/20ã€ãŸã ã— 04/25/2032 *(2)* | | Internal date long | long | March 25, 2020 | | Internal date abbreviated *(1)* | abbreviated | Mar 25, 2020 | | Internal date short | short | 03/25/2020 | | ISO Date Time *(3)* | iso8601 | 2020-03-25T00:00:00 | +*(1)* "June" 㯠"Jun"ã€â€July†㯠"Jul" ã«çœç•¥ã•れã¾ã™ã€‚ -*(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. +*(2)* å¹´ã¯ã€1930å¹´~2029å¹´ã®é–“ã¯2æ¡ã®æ•°å­—ã§è¡¨ç¤ºã•れã¾ã™ãŒã€ãれ以外ã®å ´åˆã¯4æ¡ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ã“れã¯ãƒ‡ãƒ•ォルト設定ã§ã™ãŒã€[SET DEFAULT CENTURY](https://doc.4d.com/4Dv18/4D/18/SET-DEFAULT-CENTURY.301-4505667.ja.html) コマンドã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -*(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. +*(3)* `ISO Date Time` フォーマット㯠XML ã®æ—¥ä»˜ã¨æ™‚間表ç¾ã®æ¨™æº– (ISO8601) ã«å¯¾å¿œã—ã¾ã™ã€‚ ã“れã¯ä¸»ã« XML フォーマットや Web サービスã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚“ã ã‚Šæ›¸ã出ã—ãŸã‚Šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +> 表示フォーマットã«ã‹ã‹ã‚らãšã€å¹´åº¦ã‚’2 æ¡ã§å…¥åŠ›ã™ã‚‹ã¨ã€4D ã¯å¹´ãŒ00~29 ã®é–“ã§ã‚れ㰠21 世紀ã¨ã¿ãªã—ã€30~99 ã®é–“ã§ã‚れ㰠20 世紀ã¨ã¿ãªã—ã¾ã™ã€‚ ã“れã¯ãƒ‡ãƒ•ォルト設定ã§ã™ãŒã€[SET DEFAULT CENTURY](https://doc.4d.com/4Dv18/4D/18/SET-DEFAULT-CENTURY.301-4505667.ja.html) コマンドã§å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| dateFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (can be combined with the other possible values) | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| dateFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "rfc822", "short", "shortCentury", "abbreviated", "long", "blankIfNull" (ä»–ã®å€¤ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™) | #### 対象オブジェクト -[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) +[コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) + -* * * -## Number Format +--- +## 数値フォーマット +> 数値フィールドã«ã¯æ•´æ•°ã€å€é•·æ•´æ•°ã€æ•´æ•°64bitã€å®Ÿæ•°ã€ãã—ã¦ãƒ•ロート型ãŒå«ã¾ã‚Œã¾ã™ã€‚ -> 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. +4Dã¯æ§˜ã€…ãªãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æ•°å€¤è¡¨ç¤ºãƒ•ォーマットをæä¾›ã—ã¦ã„ã¾ã™ã€‚ -4D provides various default number formats. +### プレースホルダー -### Placeholders +ãれãžã‚Œã®æ•°å€¤è¡¨ç¤ºãƒ•ォーマットã§ã¯ã€æ•°å€¤è¨˜å· (#)ã€ã‚¼ãƒ­ (0)ã€ã‚­ãƒ£ãƒ¬ãƒƒãƒˆ (^)ã€ã‚¢ã‚¹ã‚¿ãƒªã‚¹ã‚¯ (*) をプレースホルダーã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ 表示ã—よã†ã¨ã™ã‚‹å„æ¡ã«å¯¾ã—㦠1ã¤ã®ãƒ—レースホルダーを使用ã—ã€ç‹¬è‡ªã®æ•°å€¤è¡¨ç¤ºãƒ•ォーマットを作æˆã§ãã¾ã™ã€‚ -In each of the number display formats, the number sign (#), zero (0), caret (^), and asterisk (*) are used as placeholders. You create your own number formats by using one placeholder for each digit you expect to display. +| プレースホルダー | åƒé …åŠã³æœ«å°¾ã®ã‚¼ãƒ­ | +| -------- | ----------- | +| # | 何も表示ã—ãªã„ | +| 0 | 0を表示 | +| ^ | スペースを表示 (1) | +| * | アスタリスクを表示 | -| プレースホルダー | Effect for leading or trailing zero | -| -------- | ----------------------------------- | -| # | Displays nothing | -| 0 | Displays 0 | -| ^ | Displays a space (1) | -| * | Displays an asterisk | +(1) キャレット (^) ã¯ã€ã»ã¨ã‚“ã©ã®ãƒ•ã‚©ãƒ³ãƒˆã®æ•°å­—ã¨åŒã˜å¹…ã‚’å ã‚るスペースを生æˆã—ã¾ã™ã€‚ -(1) The caret (^) generates a space character that occupies the same width as a digit in most fonts. +ãŸã¨ãˆã°ã€3æ¡ã®æ•°å­—を表示ã™ã‚‹å ´åˆã€###ã¨ã„ã†ãƒ•ォーマットを使用ã§ãã¾ã™ã€‚ フォーマットã«ã‚ˆã‚Šè¨±å¯ã•ã‚ŒãŸæ¡æ•°ã‚’è¶…ãˆã¦å…¥åŠ›ã™ã‚‹ã¨ã€4D㯠<<< をフィールドã«è¡¨ç¤ºã—ã€è¡¨ç¤ºãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æŒ‡å®šã•ã‚ŒãŸæ¡æ•°ã‚’è¶…ãˆã‚‹å…¥åŠ›ãŒãŠã“ãªã‚れãŸã“ã¨ã‚’示ã—ã¾ã™ã€‚ -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. +ユーザーãŒãƒžã‚¤ãƒŠã‚¹ã®æ•°å€¤ã‚’入力ã™ã‚‹ã¨ã€å·¦ç«¯ã®æ–‡å­—ã¯ãƒžã‚¤ãƒŠã‚¹è¨˜å·ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ (è² æ•°ã®è¡¨ç¤ºãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆ)。 ##0ã¨ã„ã†ãƒ•ォーマットã§ã‚れã°ã€ãƒžã‚¤ãƒŠã‚¹ 26 㯠-26 ã¨è¡¨ç¤ºã•れã¾ã™ã€‚マイナス260 㯠<<< ã¨è¡¨ç¤ºã•れã¾ã™ãŒã€ã“れã¯ãƒ—レースホルダー㌠3æ¡åˆ†ã—ã‹æŒ‡å®šã•れã¦ã„ãªã„ã¨ã“ã‚ã«ã€ãƒžã‚¤ãƒŠã‚¹è¨˜å·ã«ã‚ˆã‚Š 1ã¤ã®ãƒ—レースホルダãŒä½¿ç”¨ã•れã¦ã—ã¾ã„ã€æ¡ã‚ãµã‚Œã—ãŸãŸã‚ã§ã™ã€‚ +> 表示フォï¼ãƒžãƒƒãƒˆã¨ã¯é–¢ä¿‚ãªãã€4Dã¯ãƒ•ã‚£ï¼ãƒ«ãƒ‰ã«å…¥åŠ›ã•ã‚ŒãŸæ•°å€¤ã‚’å—ã‘入れã€ä¿å­˜ã—ã¾ã™ã€‚ データãŒå¤±ã‚れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 -> 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. +ãŸã¨ãˆã° ##0 ã¨ã„ã†ãƒ•ォーマットを使用ã—㦠3æ¡ã®æ•°å­—を表示ã™ã‚‹ã‚‚ã®ã¨ã—ã¾ã™ã€‚ ユーザーãŒãƒ•ィールドã«ä½•も入力ã—ãªã„ã¨ã€ãƒ•ィールドã«ã¯ 0 ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 26 ã¨å…¥åŠ›ã™ã‚‹ã¨ã€ãƒ•ィールドã«ã¯ 26 ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ -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 #. +数値表示フォーマット (科学的記数法を除ã) ã¯è‡ªå‹•ã§ã‚·ã‚¹ãƒ†ãƒ ã®åœ°åŸŸãƒ‘ラメーターã«åŸºã¥ãã¾ã™ã€‚ 4D 㯠OS ã«å®šç¾©ã•れãŸå°æ•°ç‚¹ã¨åƒã®ä½åŒºåˆ‡ã‚Šæ–‡å­—を使用ã—㦠“.†㨠“,†文字をãれãžã‚Œç½®ãæ›ãˆã¾ã™ã€‚ 0 ã‚„ # ã«ç¶šãピリオドã¨ã‚³ãƒ³ãƒžã¯ãƒ—レースホルダー文字ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ +> Windows 環境下ã§ã€ãƒ†ãƒ³ã‚­ãƒ¼ã®å°æ•°ç‚¹ã‚­ãƒ¼ã‚’使用ã—ãŸéš›ã€4Dã¯ã‚«ãƒ¼ã‚½ãƒ«ãŒä½ç½®ã—ã¦ã„るフィールドã®åž‹ã«å¿œã˜ã¦æŒ™å‹•ãŒå¤‰åŒ–ã—ã¾ã™: * 実数型ã®ãƒ•ィールドã®å ´åˆã€ã“ã®ã‚­ãƒ¼ã‚’使用ã™ã‚‹ã¨ã‚·ã‚¹ãƒ†ãƒ ã«ã‚ˆã£ã¦å®šç¾©ã•ã‚ŒãŸæµ®å‹•å°æ•°ç‚¹ã‚’挿入ã—ã¾ã™ã€‚ * ãれ以外ã®åž‹ã®ãƒ•ィールドã®å ´åˆã€ã“ã®ã‚­ãƒ¼ã‚’使用ã™ã‚‹ã¨ãã®ã‚­ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸæ–‡å­—を挿入ã—ã¾ã™ã€‚通常ã¯ãƒ”リオド (.) ã¾ãŸã¯ã‚«ãƒ³ãƒž (,) ã§ã™ã€‚ -> 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 +### å°æ•°ç‚¹ã¨ãã®ä»–ã®è¡¨ç¤ºæ–‡å­— -You can use a decimal point in a number display format. If you want the decimal to display regardless of whether the user types it in, it must be placed between zeros. +表示フォーマット内ã§ã¯ 1ã¤ã®å°æ•°ç‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ユーザーãŒå°æ•°ç‚¹ã‚’入力ã™ã‚‹ã‹ã©ã†ã‹ã«é–¢ä¿‚ãªãã€å°æ•°ç‚¹ã‚’表示ã—ãŸã„å ´åˆã€ã‚¼ãƒ­ã®é–“ã«å°æ•°ç‚¹ã‚’ç½®ã‹ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -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 - + ï¿¥##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. -Spaces are treated as characters in number display formats. +ãƒã‚¤ãƒ³ãƒˆ (点) ã¯ã€ãƒ¦ãƒ¼ã‚¶ãŒå°‘ãªãã¨ã‚‚4æ¡ä»¥ä¸Šã®æ•°å€¤ã‚’入力ã—ãŸå ´åˆã«ã®ã¿è¡¨ç¤ºã•れã¾ã™ã€‚ -### Formats for positive, negative, and zero +数値表示フォーマットã«ãŠã„ã¦ã€ã‚¹ãƒšãƒ¼ã‚¹ã¯æ–‡å­—ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ -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 - +æ•°å€¤è¡¨ç¤ºãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯æœ€å¤§ã§ 3ã¤ã®éƒ¨åˆ†ã«åˆ†ã‘られã€ãれãžã‚Œæ­£æ•°ã€è² æ•°ã€ã‚¼ãƒ­ã®å€¤ã«å¯¾å¿œã™ã‚‹è¡¨ç¤ºãƒ•ォーマットを指定ã§ãã¾ã™ã€‚ ãれãžã‚Œã®éƒ¨åˆ†ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ä¸¦ã³ã€ã‚»ãƒŸã‚³ãƒ­ãƒ³ã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™: -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. +3ã¤ã®éƒ¨åˆ†ã™ã¹ã¦ã‚’指定ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 1ã¤ã®éƒ¨åˆ†ã ã‘を使用ã™ã‚‹å ´åˆã€4Dã¯ã™ã¹ã¦ã®æ•°å€¤ã«å¯¾ã—ã¦ãã®ãƒ•ォーマットを使用ã—ã€è² ã®æ•°ã®å…ˆé ­ã«ãƒžã‚¤ãƒŠã‚¹è¨˜å·ã‚’é…ç½®ã—ã¾ã™ã€‚ -> 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. +2ã¤ã®éƒ¨åˆ†ã‚’指定ã™ã‚‹å ´åˆã€4D 㯠1番目ã®ãƒ•ォーマットを正数ã¨ã‚¼ãƒ­ã«å¯¾ã—ã¦ä½¿ç”¨ã—ã€è² æ•°ã«ã¯ 2番目ã®ãƒ•ォーマットを使用ã—ã¾ã™ã€‚ 3ã¤ã®éƒ¨åˆ†ã‚’ã™ã¹ã¦æŒ‡å®šã™ã‚‹ã¨ã€1番目ã®ãƒ•ォーマットを正数ã€2 番目を負数ã€3 番目をゼロã«ä½¿ç”¨ã—ã¾ã™ã€‚ +> 3番目ã®éƒ¨åˆ† (ゼロ) ã¯è§£é‡ˆã•れãšã€æ–‡å­—ã®ç½®ãæ›ãˆã‚’ãŠã“ãªã„ã¾ã›ã‚“。 `###;###;#` ã¨æŒ‡å®šã—ãŸå ´åˆã€ã‚¼ãƒ­å€¤ã¯ "#" ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ è¨€ã„æ›ãˆã‚‹ã¨ã€è¡¨ç¤ºãƒ•ォーマットã¨ã—ã¦å®Ÿéš›ã«æŒ‡å®šã•れãŸã‚‚ã®ãŒã€ã‚¼ãƒ­å€¤ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ -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); - + ï¿¥###,##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: +2ã¤ç›®ã®ã‚»ãƒŸã‚³ãƒ­ãƒ³ã«ã‚ˆã‚Šã€ã‚¼ãƒ­ã®è¡¨ç¤ºã«ã¯ä½•も使用ã—ãªã„ã“ã¨ã‚’ 4Dã«æŒ‡ç¤ºã—ã¦ã„ã‚‹ç‚¹ã«æ³¨ç›®ã—ã¦ãã ã•ã„。 次ã®ãƒ•ォーマットã¯å‰ã®ä¾‹ã¨ä¼¼ã¦ã„ã¾ã™ãŒã€2ã¤ç›®ã®ã‚»ãƒŸã‚³ãƒ­ãƒ³ãŒæŒ‡å®šã•れã¦ã„ã¾ã›ã‚“。ã“れã«ã‚ˆã‚Šã€ã‚¼ãƒ­ã«å¯¾ã—ã¦æ­£æ•°ã®ãƒ•ォーマットを使用ã™ã‚‹ã‚ˆã† 4Dã«æŒ‡ç¤ºã—ã¦ã„ã¾ã™: - $###,##0.00;($###,##0.00) - + ï¿¥###,##0.00;(ï¿¥###,##0.00) -In this case, the display for zero would be $0.00. +ã“ã®å ´åˆã€ã‚¼ãƒ­ã¯ “¥0.00†ã¨è¡¨ç¤ºã•れã¾ã™ã€‚ -### Scientific notation +### 科学的記数法 -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: +759.62 ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: 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. -### Hexadecimal formats +科学的記数法フォーマットã¯ã€è¡¨ç¤ºã•れる数値を自動的ã«ä¸¸ã‚る唯一ã®ãƒ•ォーマットã§ã™ã€‚ å‰è¿°ã®ä¾‹ã§ã¯ã€æ•°å€¤ãŒ 7.59e+2 ã¨åˆ‡ã‚Šæ¨ã¦ã‚‰ã‚Œãšã« 7.60e+2 ã«ä¸¸ã‚られã¦ã„ã‚‹ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +### 16進フォーマット -You can display a number in hexadecimal using the following display formats: +次ã®è¡¨ç¤ºãƒ•ォーマットを使用ã—ã¦ã€æ•°å€¤ã‚’ 16進表記ã§è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -* `&x`: This format displays hexadecimal numbers using the “0xFFFF†format. -* `&$`: This format displays hexadecimal numbers using the “$FFFF†format. +* `&x`: ã“ã®ãƒ•ォーマットã§ã¯ 16進数㌠“0xFFFF†形å¼ã§è¡¨ç¤ºã•れã¾ã™ã€‚ +* `&$`: ã“ã®ãƒ•ォーマットã§ã¯ 16進数㌠“$FFFF†形å¼ã§è¡¨ç¤ºã•れã¾ã™ã€‚ -### XML notation +### XML記法 -The `&xml` format will make a number compliant with XML standard rules. In particular, the decimal separator character will be a period "." in all cases, regardless of the system settings. +`&xml` フォーマットを使用ã™ã‚‹ã¨ã€æ•°å­—ã‚’ XML æ¨™æº–ãƒ«ãƒ¼ãƒ«ã«æ²¿ã£ãŸã‚‚ã®ã«ã—ã¾ã™ã€‚ 特ã«å°æ•°ç‚¹ãŒã‚·ã‚¹ãƒ†ãƒ è¨­å®šã«é–¢ä¿‚ãªãã™ã¹ã¦ã®å ´åˆã«ãŠã„ã¦ãƒã‚¤ãƒ³ãƒˆ (ピリオド) ã«å¤‰æ›ã•れã¾ã™ã€‚ -### Displaying a number as a time +### 数値を時間ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ -You can display a number as a time (with a time format) by using `&/` followed by a digit. Time is determined by calculating the number of seconds since midnight that the value represents. The digit in the format corresponds to the order in which the time format appears in the Format drop-down menu. +`&/`ã®å¾Œã«æ•°å­—を指定ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€æ•°å€¤ã‚’時間ã¨ã—㦠(時間フォーマットã§) 表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 時間ã¯åˆå‰0 時を基点ã¨ã—ãŸç§’æ•°ã¨ã—ã¦è¨ˆç®—ã•れã¾ã™ã€‚ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆå†…ã®æ•°å­—ã¯è¡¨ç¤ºãƒ•ォーマットドロップダウンメニュー上ã§ãã®æ™‚間フォーマットãŒè¡¨ç¤ºã•れる順番ã«ç›¸å½“ã—ã¾ã™ã€‚ -For example, the format: +ãŸã¨ãˆã°æ¬¡ã®ãƒ•ォーマットを指定ã™ã‚‹ã¨: - &/5 - + &/7 -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: +ドロップダウンメニューã®7ç•ªç›®ã®æ™‚間フォーマット (AM/PM ã§è¡¨ã‚ã™æ™‚é–“) ã«å¯¾å¿œã—ã¾ã™ã€‚ ã“ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒæŒ‡å®šã•ã‚ŒãŸæ•°å€¤ãƒ•ィールドã®å ´åˆã€25000 ã¯æ¬¡ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: 6:56 AM - ### 例題 -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 | - +次ã®è¡¨ã¯å„ç¨®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã®æ•°å€¤è¡¨ç¤ºã¸ã®åŠ¹æžœã‚’è¡¨ã‚ã—ã¦ã„ã¾ã™ã€‚ 正数ã€è² æ•°ã€ã‚¼ãƒ­ã¨ã„ㆠ3ã¤ã®æ¬„ã§ã¯ 1234.50ã€-1234.50ã€0 ãŒãれãžã‚Œã©ã®ã‚ˆã†ã«è¡¨ç¤ºã•れるã‹ã‚’示ã—ã¦ã„ã¾ã™ã€‚ + +| 入力ã•れãŸãƒ•ォーマット | 正数 | è² æ•° | ゼロ | +| -------------------------------------- | ---------------- | ------------- | ---------------------------- | +| ### | <<< | <<< | | +| #### | 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ------ | -------------------------------------------------------------- | -| numberFormat | string | Numbers (including a decimal point or minus sign if necessary) | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | -------------------------- | +| numberFormat | string | 数値 (å¿…è¦ã«å¿œã˜ã¦å°æ•°ç‚¹ãŠã‚ˆã³ãƒžã‚¤ãƒŠã‚¹è¨˜å·ã‚’å«ã‚€) | #### 対象オブジェクト -[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) +[コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [進æ—インジケーター](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. -The truncation and scaling options do not affect the picture itself. The contents of a Picture field are always saved. Only the display on the particular form is affected by the picture display format. -### Scaled to fit -`JSON grammar: "scaled"` +--- +## ピクãƒãƒ£ãƒ¼ãƒ•ォーマット -The **Scaled to fit** format causes 4D to resize the picture to fit the dimensions of the area. +ピクãƒãƒ£ãƒ¼ãƒ•ォーマットã¯ãƒ”クãƒãƒ£ãƒ¼ãŒè¡¨ç¤ºã‚ã‚‹ã„ã¯å°åˆ·ã•れる際ã®è¡¨ç¤ºæ–¹æ³•を制御ã—ã¾ã™ã€‚ データ入力時ã¯ãƒ•ォーマットã«é–¢ã‚らãšã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¯ãƒªãƒƒãƒ—ボードã‹ã‚‰ã®ãƒšãƒ¼ã‚¹ãƒˆã‚„ドラッグ&ドロップã§ãƒ”クãƒãƒ£ãƒ¼ã‚’入力ã—ã¾ã™ã€‚ -![](assets/en/FormObjects/property_pictureFormat_ScaledToFit.png) +トランケートã¨ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚°ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¦ã‚‚ã€ãƒ”クãƒãƒ£ãƒ¼ãŒå¤‰æ›´ã•れるã“ã¨ã¯ãªã〠ピクãƒãƒ£ãƒ¼ãƒ•ィールドã®ãƒ‡ãƒ¼ã‚¿ã¯å¤±ã‚れã¾ã›ã‚“。 ピクãƒãƒ£ãƒ¼è¡¨ç¤ºãƒ•ォーマットã¯ãƒ”クãƒãƒ£ãƒ¼ã®è¡¨ç¤ºã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚ + +### スケーリング + +`JSON 文法ã§ã¯: "scaled"` + +**スケーリング** ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒ”クãƒãƒ£ãƒ¼ã¯ãƒ•ィールドエリアã®å¤§ãã•ã«åˆã†ã‚ˆã†ã«ãƒªã‚µã‚¤ã‚ºã•れã¾ã™ã€‚ -### Truncated (centered and non-centered) +![](assets/en/FormObjects/property_pictureFormat_ScaledToFit.png) -`JSON grammar: "truncatedCenter" / "truncatedTopLeft"` +### トランケート (中央åˆã‚ã›/中央åˆã‚ã›ã—ãªã„) -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. +`JSON 文法ã§ã¯: "truncatedCenter" / "truncatedTopLeft"` -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. +**トランケート (中央åˆã‚ã›)** ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ã‚¨ãƒªã‚¢ã®ä¸­å¤®ã«ãƒ”クãƒãƒ£ãƒ¼ã‚’é…ç½®ã—ã€åŽã¾ã‚‰ãªã„部分ã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã¾ã™ã€‚ 上下ã€ãŠã‚ˆã³å·¦å³ã®ã¯ã¿å‡ºã—é‡ã¯åŒã˜ã«ãªã‚Šã¾ã™ã€‚ -> When the picture format is **Truncated (non-centered)**, it is possible to add scroll bars to the input area. +**トランケート (中央åˆã‚ã›ã—ãªã„)** ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šè§’をフィールドã®å·¦ä¸Šè§’ã«åˆã‚ã›ã¦é…ç½®ã—ã€ãƒ•ィールドエリアã«åŽã¾ã‚‰ãªã„部分ã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ã¯å³ã¨ä¸‹ã«ã¯ã¿å‡ºã—ã¾ã™ã€‚ +> ピクãƒãƒ£ãƒ¼ãƒ•ォーマット㌠**トランケート (中央åˆã‚ã›ã—ãªã„)** ã®å ´åˆã€å…¥åŠ›ã‚¨ãƒªã‚¢ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã‚’追加ã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/property_pictureFormat_Truncated.png) -### Scaled to fit (proportional) and Scaled to fit centered (proportional) +### スケーリング (プロãƒãƒ¼ã‚·ãƒ§ãƒŠãƒ«) ã¨ã‚¹ã‚±ãƒ¼ãƒªãƒ³ã‚° (中央åˆã‚ã›ãƒ»ãƒ—ロãƒãƒ¼ã‚·ãƒ§ãƒŠãƒ«) -`JSON grammar: "proportionalTopLeft" / "proportionalCenter"` +`JSON 文法ã§ã¯: "proportionalTopLeft" / "proportionalCenter"` -When you use **Scaled to fit (proportional)**, the picture is reduced proportionally on all sides to fit the area created for the picture. The **Scaled to fit centered (proportional)** option does the same, but centers the picture in the picture area. +**スケーリング (プロãƒãƒ¼ã‚·ãƒ§ãƒŠãƒ«)** を使用ã™ã‚‹ã¨ã€ãƒ”クãƒãƒ£ãƒ¼ã‚¨ãƒªã‚¢ã«åŽã¾ã‚‹ã‚ˆã†ã€æ¯”率をä¿ã£ãŸã¾ã¾ã‚µã‚¤ã‚ºãŒèª¿æ•´ã•れã¾ã™ã€‚ **スケーリング (中央åˆã‚ã›ãƒ»ãƒ—ロãƒãƒ¼ã‚·ãƒ§ãƒŠãƒ«)** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚‚åŒæ§˜ã§ã™ãŒã€ãƒ”クãƒãƒ£ãƒ¼ã¯ã‚¨ãƒªã‚¢ã®ä¸­å¤®ã«é…ç½®ã•れã¾ã™ã€‚ -If the picture is smaller than the area set in the form, it will not be modified. If the picture is bigger than the area set in the form, it is proportionally reduced. Since it is proportionally reduced, the picture will not appear distorted. +ピクãƒãƒ£ãƒ¼ãŒã‚¨ãƒªã‚¢ã‚ˆã‚Šã‚‚å°ã•ã„å ´åˆã€ã‚µã‚¤ã‚ºã¯å¤‰æ›´ã•れã¾ã›ã‚“。 ピクãƒãƒ£ãƒ¼ãŒã‚¨ãƒªã‚¢ã‚ˆã‚Šã‚‚大ãã„å ´åˆã€ãã®ã‚¨ãƒªã‚¢å†…ã«å…¨ä½“ãŒè¡¨ç¤ºã•れるよã†ã€æ¯”率をä¿ã£ãŸã¾ã¾ã‚µã‚¤ã‚ºãŒå°ã•ããªã‚Šã¾ã™ã€‚ 比率ãŒä¿ãŸã‚Œã‚‹ãŸã‚ã€ãƒ”クãƒãƒ£ãƒ¼ã¯æ­ªã‚€ã“ã¨ãªã表示ã•れã¾ã™ã€‚ -If you have applied the **Scaled to fit centered (proportional)** format, the picture is also centered in the area: +**中央åˆã‚ã›** ã‚’é¸æŠžã—ãŸå ´åˆã€ç”»åƒã¯ã‚¨ãƒªã‚¢ã®ä¸­å¤®ã«é…ç½®ã•れã¾ã™: ![](assets/en/FormObjects/property_pictureFormat_ScaledProportional.png) -### Replicated -`JSON grammar: "tiled"` +### 繰り返㗠+ +`JSON 文法ã§ã¯: "tiled"` -When the area that contains a picture with the **Replicated** format is enlarged, the picture is not deformed but is replicated as many times as necessary in order to fill the area entirely. +**繰り返ã—** フォーマットをæŒã¤ãƒ”クãƒãƒ£ãƒ¼ãŒå«ã¾ã‚Œã‚‹ã‚¨ãƒªã‚¢ãŒæ‹¡å¤§ã•れるã¨ã€ãƒ”クãƒãƒ£ãƒ¼ã¯å¤‰å½¢ã•れãšã€ã‚¨ãƒªã‚¢å…¨ä½“を埋ã‚ã‚‹ã®ã«å¿…è¦ãªã ã‘ピクãƒãƒ£ãƒ¼ãŒç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ ![](assets/en/FormObjects/property_pictureFormat_Replicated.png) -If the field is reduced to a size smaller than that of the original picture, the picture is truncated (non-centered). +フィールドãŒã‚ªãƒªã‚¸ãƒŠãƒ«ã®ãƒ”クãƒãƒ£ãƒ¼ã‚ˆã‚Šã‚‚å°ã•ã„サイズã«ã•れãŸå ´åˆã€ãƒ”クãƒãƒ£ãƒ¼ã¯ãƒˆãƒ©ãƒ³ã‚±ãƒ¼ãƒˆ (中央åˆã‚ã›ãªã—) ã•れã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ----------------------------------------------------------------------------------------------------- | | pictureFormat | string | "truncatedTopLeft", "scaled", "truncatedCenter", "tiled", "proportionalTopLeft", "proportionalCenter" | +#### 対象オブジェクト + +[入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) + + + + + +--- +## 時間フォーマット + +時間フォーマットã¯ã€è¡¨ç¤ºã‚„å°åˆ·æ™‚ã«æ™‚間を表示ã™ã‚‹æ–¹æ³•を制御ã—ã¾ã™ã€‚ é¸æŠžã—ãŸè¡¨ç¤ºãƒ•ォーマットã¨ã¯é–¢ä¿‚ãªãã€ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã®éš›ã¯ 24時間制㮠“HH:MM:SS†フォーマットã€ã¾ãŸã¯ 12時間制㮠“HH:MM:SS AM/PMâ€ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æ™‚間を入力ã—ã¾ã™ã€‚ +> [文字](#文字フォーマット) ã‚„ [数値](#数値フォーマット) ã®è¡¨ç¤ºãƒ•ォーマットã¨ã¯ç•°ãªã‚Šã€æ™‚é–“ã®è¡¨ç¤ºãƒ•ã‚©ï¼ãƒžãƒƒãƒˆã¯ãƒ•ォーマットãƒãƒƒãƒ—アップメニューã‹ã‚‰é¸æŠžã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +次ã®è¡¨ã¯ã€æ™‚間フィールドã®è¡¨ç¤ºãƒ•ォーマットã¨ãれãžã‚Œã®ãƒ•ォーマットã®ä¾‹ã‚’示ã—ã¦ã„ã¾ã™: + +| フォーマット | JSON 文字列 | コメント | 04:30:25 ã®ä¾‹ | +| ---------------------------- | ------------ | --------------------------------------------------------------------------------- | ------------------- | +| HH:MM:SS | hh_mm_ss | | 04:30:25 | +| HH:MM | hh_mm | | 04:30 | +| Hour Min Sec | HH_MM_SS | | 4 時 30 分 25 ç§’ | +| Hour Min | HH_MM | | 4 時 30 分 | +| HH:MM AM/PM | hh_mm_am | | 4:30 AM | +| MM SS | mm_ss | 00:00:00ã‹ã‚‰ã®çµŒéŽæ™‚é–“ | 270:25 | +| Min Sec | MM_SS | 00:00:00ã‹ã‚‰ã®çµŒéŽæ™‚é–“ | 270 分 25 ç§’ | +| ISO Date Time | iso8601 | 時間ã«é–¢é€£ã™ã‚‹ XML 標準表ç¾ã«å¯¾å¿œã€‚ 主㫠XML フォーマットã§ã®ãƒ‡ãƒ¼ã‚¿ã®ã‚„りå–りã«ä½¿ç”¨ã—ã¾ã™ã€‚ | 0000-00-00T04:30:25 | +| System time short | - (デフォルト) | システムã«å®šç¾©ã•ã‚ŒãŸæ¨™æº–ã®æ™‚間フォーマット | 04:30:25 | +| System time long abbreviated | systemMedium | macOSã®ã¿: システムã«å®šç¾©ã•ã‚ŒãŸæ™‚間フォーマットã®çŸ­ç¸®åž‹ã€‚
          Windows ã§ã¯ System time short フォーマットã¨åŒã˜ | 04:30:25 | +| System time long | systemLong | macOSã®ã¿: システムã«å®šç¾©ã•ã‚ŒãŸæ™‚間フォーマット。
          Windows ã§ã¯ System time short フォーマットã¨åŒã˜ | 04:30:25 JST | + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| timeFormat | string | "systemShort", "systemMedium", "systemLong", "iso8601", "hh_mm_ss", "hh_mm", "hh_mm_am", "mm_ss", "HH_MM_SS", "HH_MM", "MM_SS", "blankIfNull" (ä»–ã®å€¤ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™) | #### 対象オブジェクト -[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Footer](listbox_overview.md#list-box-footers) +[コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) -* * * -## 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. +--- +## テキスト (True時)/テキスト (False時) -The table below shows the Time field display formats and gives examples: +[ブールå¼](properties_Object.md#å¼ã®åž‹) を次ã®ãƒ•ォームオブジェクトã§è¡¨ç¤ºã—ãŸå ´åˆ: +- [入力オブジェクト](input_overview.md) ã«ãƒ†ã‚­ã‚¹ãƒˆã¨ã—㦠+- [リストボックス列](listbox_overview.md#リストボックス列) ã«è¡¨ç¤ºã‚¿ã‚¤ãƒ— ["ãƒãƒƒãƒ—アップ"](properties_Display.md#表示タイプ) ã‚’é¸æŠžã—㦠-| Format name | JSON string | コメント | Example for 04:30:25 | -| ---------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- | -| HH:MM:SS | hh_mm_ss | | 04:30:25 | -| HH:MM | hh_mm | | 04:30 | -| Hour Min Sec | HH_MM_SS | | 4 hours 30 minutes 25 seconds | -| Hour Min | HH_MM | | 4 hours 30 minutes | -| HH:MM AM/PM | hh_mm_am | | 4:30 a.m. | -| MM SS | mm_ss | Time expressed as a duration from 00:00:00 | 270:25 | -| 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 | +... 値ã®ä»£ã‚りã«è¡¨ç¤ºã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆã‚’指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +- **テキスト (True時)** - 値㌠"true" ã®æ™‚ã«è¡¨ç¤ºã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ +- **テキスト (False時)** - 値㌠"false" ã®æ™‚ã«è¡¨ç¤ºã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆ +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ----------------------------------------------------------- | +| booleanFormat | string | "\<*テキスト (true時)*\>;\<*テキスト (false時)*\>", 例: "済ã¿;未処ç†" / | + + +#### 対象オブジェクト + +[リストボックス列](listbox_overview.md#リストボックス列) - [入力](input_overview.md) + + + + +--- +## 表示タイプ + +列ã®ãƒ‡ãƒ¼ã‚¿ã«è¡¨ç¤ºãƒ•ォーマットを割り当ã¦ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ æä¾›ã•れるフォーマットã¯å¤‰æ•°åž‹ (é…列型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿/フィールド型 (セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ + +ブールå¼ãŠã‚ˆã³æ•°å€¤ (数値ã¾ãŸã¯æ•´æ•°) å¼ã®åˆ—ã¯ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 表示タイプã«ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚’é¸æŠžã™ã‚‹ã¨ã€[タイトル](#タイトル)プロパティãŒè¡¨ç¤ºã•れã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’設定ã§ãã¾ã™ã€‚ + +ブールå¼ã®åˆ—ã¯ãƒãƒƒãƒ—アップメニューã¨ã—ã¦ã‚‚表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€[テキスト (True時) ã¨ãƒ†ã‚­ã‚¹ãƒˆ (False時)](#テキスト-True時-テキスト-False時) プロパティãŒè¡¨ç¤ºã•れã€ãƒãƒƒãƒ—アップメニューã®å¯¾å¿œã™ã‚‹ã‚¿ã‚¤ãƒˆãƒ«ã‚’設定ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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) | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- | +| controlType | string |
        • **数値列**: "automatic" (デフォルト) ã¾ãŸã¯ "checkbox"
        • **ブール列**: "checkbox" (デフォルト) ã¾ãŸã¯ "popup" | + +#### 対象オブジェクト + +[リストボックス列](listbox_overview.md#リストボックス列) + + + + +--- +## レンダリングã—ãªã„ + +ã“ã®ãƒ—ロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¢ãƒ—リケーションモードã§ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãŒæç”»ã•れã¾ã›ã‚“ (ã‚ã¨ã‹ã‚‰æç”»ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™)。 + +ã“ã®ãƒ—ロパティã¯ã€â€é€æ˜Žâ€ ボタンã®å®Ÿè£…ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ レンダリングã•れã¦ã„ãªã„ボタンã¯ã€æç”»ã‚ªãƒ–ジェクトã®ä¸Šã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ レンダリングã•れã¦ã„ãªã„ボタンã¯ã€ã‚¯ãƒªãƒƒã‚¯ã•れã¦ã‚‚ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れるã“ã¨ã¯ãªãéžè¡¨ç¤ºã®ã¾ã¾ã§ã™ãŒã€ã‚¯ãƒªãƒƒã‚¯ã«ã‚ˆã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã¯ç™ºç”Ÿã—ã¾ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------- | ------- | ----------- | +| display | boolean | true, false | #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) + + + -* * * -## 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), +--- +## スリーステート + + + +ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ジェクトã«ã€3 番目ã®çŠ¶æ…‹ã‚’ä»˜åŠ ã—ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒ 3番目ã®çŠ¶æ…‹ã«ãªã‚‹ã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られãŸå¤‰æ•°ã¯å€¤2ã‚’è¿”ã—ã¾ã™ã€‚ + -... 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" +[å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) ãŒæ•°å€¤åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã¯ã€ã‚¹ãƒªãƒ¼ã‚¹ãƒ†ãƒ¼ãƒˆãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¨ã—ã¦è¡¨ç¤ºã§ãã¾ã™ã€‚ スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã™ã‚‹ã¨ã€ä»¥ä¸‹ã®å€¤ãŒè¡¨ç¤ºã•れã¾ã™: +* 0 = ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„ +* 1 = ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ +* 2 (ã¾ãŸã¯2以上ã®ä»»æ„ã®æ•°å€¤) セミãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ (三番目ã®çŠ¶æ…‹) データ入力時ã€ã“ã®çŠ¶æ…‹ã¯2ã‚’è¿”ã—ã¾ã™ã€‚ +* -1 = éžè¡¨ç¤ºãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ +* -2 = ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„ã€å…¥åŠ›ä¸å¯ +* -3 = ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã€å…¥åŠ›ä¸å¯ +* -4 = セミãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€å…¥åŠ›ä¸å¯ + +スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®å ´åˆã‚‚ã€[タイトル](#タイトル)プロパティãŒè¡¨ç¤ºã•れã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’設定ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------- | ------ | ------------------------------------------------------------------------ | -| booleanFormat | string | "\<*textWhenTrue*\>;\<*textWhenFalse*\>", e.g. "Assigned;Unassigned" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------- | ----------- | +| threeState | boolean | true, false | + +#### 対象オブジェクト + +[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + + +--- +## タイトル + +タイトルã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã®ãƒ—ロパティã¨ã—ã¦æ¬¡ã®å ´åˆã«æä¾›ã•れã¾ã™: +- [å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) ㌠**ブール** ã§ [表示タイプ](properties_Display.md#表示タイプ) ㌠"ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹" ã®å ´åˆ +- [å¼ã‚¿ã‚¤ãƒ—](properties_Object.md#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) ㌠**数値** (数値ã¾ãŸã¯æ•´æ•°) ã§ [表示タイプ](properties_Display.md#表示タイプ) ㌠"スリーステートãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹" ã®å ´åˆ + +ã“れらã®å ´åˆã«ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®ã‚¿ã‚¤ãƒˆãƒ«ã‚’ã“ã®ãƒ—ロパティã§è¨­å®šã§ãã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ------------- | +| controlTitle | string | タイトル用ã®ã‚らゆる文字列 | + +#### 対象オブジェクト + +[リストボックス列](listbox_overview.md#リストボックス列) + + + + +--- + +## エリプシスを使用ã—ã¦çœç•¥ + +リストボックスã®ã‚«ãƒ©ãƒ ãŒã€ä¸­èº«ã‚’ã™ã¹ã¦è¡¨ç¤ºã™ã‚‹ã®ã«ã¯ç‹­ã™ãŽã‚‹å ´åˆã®å€¤ã®è¡¨ç¤ºã‚’管ç†ã—ã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションã¯ã€ã©ã®ã‚ˆã†ãªåž‹ã®ä¸­èº«ã«å¯¾ã—ã¦ã‚‚利用å¯èƒ½ã§ã™(ãŸã ã—ピクãƒãƒ£ãƒ¼ã¨ã‚ªãƒ–ジェクトを除ã)。 + +* ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã (デフォルト)ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚»ãƒ«ã®ä¸­èº«ãŒã‚«ãƒ©ãƒ ã®å¹…ã‚’è¶…ãˆãŸå ´åˆã€ãれらã¯çœç•¥ã•れã€ã‚¨ãƒªãƒ—シスãŒè¡¨ç¤ºã•れã¾ã™: + + ![](assets/en/FormObjects/property_truncate1.png) +> エリプシスã®ä½ç½®ã¯OSã«ã‚ˆã£ã¦å¤‰ã‚りã¾ã™ã€‚ 上記ã®ä¾‹ (Windows) ã§ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆã®å³å´ã«è¡¨ç¤ºã•れã¾ã™ (テキストã®å¾ŒåŠãŒçœç•¥ã•れã¾ã™)。 macOS 上ã§ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆã®çœŸã‚“中ã«è¡¨ç¤ºã•れã¾ã™ (テキストã®ä¸­ç›¤ãŒçœç•¥ã•れã¾ã™)。 + +* ã“ã®ã‚ªãƒ—ションã®ãƒã‚§ãƒƒã‚¯ãŒå¤–れã¦ã„ã‚‹ã¨ãã€ã‚»ãƒ«ã®ä¸­èº«ãŒã‚«ãƒ©ãƒ ã®å¹…ã‚’è¶…ãˆã¦ã„ãŸå ´åˆã€åŽã¾ã‚Šãらãªã„部分ã¯è¡¨ç¤ºã•れãšã€ã‚¨ãƒªãƒ—シスも表示ã•れã¾ã›ã‚“: + + ![](assets/en/FormObjects/property_truncate2.png) + +エリプシスã§çœç•¥ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ォルトã§ã¯ãƒã‚§ãƒƒã‚¯ã•れã¦ãŠã‚Šã€é…列ã€ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å¯¾ã—ã¦æŒ‡å®šå¯èƒ½ã§ã™ã€‚ + + +> テキストã¾ãŸã¯æ–‡å­—列型ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦é©ç”¨ã—ãŸå ´åˆã€ã‚¨ãƒªãƒ—シスã§çœç•¥ã‚ªãƒ—ション㯠[ワードラップ](#ワードラップ) オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã«ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ ワードラップオプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãŸå ´åˆã€ã‚»ãƒ«å†…ã‚’è¶…ãˆãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã«ã¤ã„ã¦ã¯ãƒ¯ãƒ¼ãƒ‰ãƒ©ãƒƒãƒ—機能ã«ã‚ˆã£ã¦ç®¡ç†ã•れã¾ã™ã®ã§ã€ã‚¨ãƒªãƒ—シスã§çœç•¥ã‚ªãƒ—ションã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +エリプシスã§çœç•¥ã‚ªãƒ—ションã¯ãƒ–ール型ã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦ã‚‚é©ç”¨å¯èƒ½ã§ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€[セルã®ãƒ•ォーマット](#表示タイプ)ã«ã‚ˆã£ã¦è¡¨ç¤ºã•ã‚Œã‚‹çµæžœã¯ç•°ãªã‚Šã¾ã™: +- 表示タイプãŒãƒãƒƒãƒ—アップã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã¯ã€ã‚¨ãƒªãƒ—シスã§ãƒ©ãƒ™ãƒ«ãŒçœç•¥ã•れã¾ã™ã€‚ +- 表示タイプãŒãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã¯ã€ãƒ©ãƒ™ãƒ«ã¯å¸¸ã«è¦‹åˆ‡ã‚Œã¾ã™ (エリプシスã§çœç•¥ã•れã¾ã›ã‚“)。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ---------------------- | +| truncateMode | string | "withEllipsis", "none" | + + + +#### 対象オブジェクト + +[リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) + + + + + +--- +## 表示状態 + +ã“ã®ãƒ—ロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¢ãƒ—リケーションモードã§ã‚ªãƒ–ジェクトãŒãƒ‡ãƒ•ォルトã§éžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚ + +大部分ã®ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã€è¡¨ç¤ºçŠ¶æ…‹ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ—ロパティを使用ã™ã‚‹ã¨ã€ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを容易ã«é–‹ç™ºã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ インターフェースを開発ã™ã‚‹ã¨ãã€å¤šãã®å ´åˆã¯ãƒ•ォーム㮠`On Load` イベント中ã«ãƒ—ログラムã‹ã‚‰ã‚ªãƒ–ジェクトをéžè¡¨ç¤ºã«ã—ãŸå¾Œã§ã€ä¸€éƒ¨ã®ã‚ªãƒ–ジェクトをå†åº¦è¡¨ç¤ºã™ã‚‹å¿…è¦æ€§ãŒé »ç¹ã«ç”Ÿã˜ã¾ã™ã€‚ 表示状態プロパティを使用ã™ã‚‹ã¨ã€ç‰¹å®šã‚ªãƒ–ジェクトをã‚らã‹ã˜ã‚éžè¡¨ç¤ºã«ã—ã¦ãŠãã“ã¨ã«ã‚ˆã‚Šã€ã“ã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’逆ã«åƒã‹ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å¾Œã€çжæ³ã«å¿œã˜ã¦ `OBJECT SET VISIBLE` コマンドを使用ã—ã€ã“れらã®ã‚ªãƒ–ジェクトを表示ã™ã‚‹ã‚ˆã†ãƒ—ログラミングã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | ------------------- | +| visibility | string | "visible", "hidden" | + #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) + + + + + + +--- +## ワードラップ + +> [入力](input_overview.md) オブジェクトã«ãŠã„ã¦ã¯ã€[複数行](properties_Entry.md#複数行) プロパティ㌠"ã¯ã„"ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã«ã®ã¿ã€ã“ã®ãƒ—ロパティã¯è¡¨ç¤ºã•れã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションã¯ã€è¡¨ç¤ºã™ã‚‹å†…容ãŒã‚ªãƒ–ジェクトã®å¹…ã‚’è¶…ãˆãŸã¨ãã®è¡¨ç¤ºã‚’管ç†ã—ã¾ã™ã€‚ + +#### リストボックスã«ã¦ãƒã‚§ãƒƒã‚¯ / 入力オブジェクト㧠"ã¯ã„" ã«è¨­å®š +`JSON 文法ã§ã¯: "normal"` + +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€ãƒ†ã‚­ã‚¹ãƒˆãŒã‚«ãƒ©ãƒ ã‚„エリアã®å¹…ã‚’è¶ŠãˆãŸã¨ãã«ã€ã‚«ãƒ©ãƒ ã‚„エリアã®é«˜ã•ãŒè¨±å®¹ã™ã‚‹ç¯„囲内ã§è‡ªå‹•çš„ã«æ¬¡ã®è¡Œã¸ã¨æ”¹è¡Œã—ã¾ã™ã€‚ + +- 一行ã®ã‚«ãƒ©ãƒ ã‚„エリアã®å ´åˆã€å…¨ä½“ãŒè¡¨ç¤ºã§ãる最後ã®å˜èªžã¾ã§ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 4Dã¯æ”¹è¡Œã‚’挿入ã—ã¾ã™ã€‚下矢å°ã‚­ãƒ¼ã‚’押ã™ã“ã¨ã§ã€ã‚¨ãƒªã‚¢ã®å†…容をスクロールã§ãã¾ã™ã€‚ -* * * +- 複数行ã®ã‚«ãƒ©ãƒ ã‚„エリアã®å ´åˆã€4Dã¯è‡ªå‹•改行を実行ã—ã¾ã™ã€‚ -## Display Type +![](assets/en/FormObjects/wordwrap2.png) -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). -Boolean and number (numeric or integer) columns can be displayed as check boxes. In this case, the [Title](#title) property can be defined. -Boolean columns can also be displayed as pop-up menus. In this case, the [Text when False and Text when True](#text-when-false-text-when-true) properties must be defined. +#### リストボックスã«ã¦ãƒã‚§ãƒƒã‚¯ãªã— / 入力オブジェクト㧠"ã„ã„ãˆ" ã«è¨­å®š +`JSON 文法ã§ã¯: "none"` + +ã“ã®ã‚ªãƒ–ションã®å ´åˆã€4D ã¯ã„ã£ã•ã„自動改行をãŠã“ãªã„ã¾ã›ã‚“。表示å¯èƒ½ãªæœ€å¾Œã®å˜èªžã¯ã‚¨ãƒªã‚¢ã‚’ã¯ã¿å‡ºã—ã¾ã™ã€‚ テキストタイプã®ã‚¨ãƒªã‚¢ã§ã¯æ”¹è¡ŒãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™: + +![](assets/en/FormObjects/wordwrap3.png) + +リストボックスã®å ´åˆã€é•·ã™ãŽã‚‹ãƒ†ã‚­ã‚¹ãƒˆã¯åˆ‡ã‚Šè½ã¨ã•れã€çœç•¥è¨˜å· (...) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 以下ã®ä¾‹ã§ã¯ã€å·¦ã®åˆ—ã§ã¯ãƒ¯ãƒ¼ãƒ‰ãƒ©ãƒƒãƒ—ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¦ã€å³ã®åˆ—ã§ã¯ã•れã¦ã„ã¾ã›ã‚“: + +![](assets/en/FormObjects/property_wordwrap1.png) + +ワードラップ㮠オプションã®å€¤ã«é–¢ã‚らãšã€è¡Œã®é«˜ã•ã¯å¤‰åŒ–ã—ãªã„ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 改行をå«ã‚€ãƒ†ã‚­ã‚¹ãƒˆãŒã‚«ãƒ©ãƒ ã®ä¸­ã«è¡¨ç¤ºã—ãれãªã„ã¨ãã€è¡¨ç¤ºã—ãれãªã„部分㯠切りè½ã¨ã•れã€çœç•¥è¨˜å·ã‚‚表示ã•れã¾ã›ã‚“。 å˜ä¸€ã®è¡Œã‚’表示ã™ã‚‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å ´åˆã€ãƒ†ã‚­ã‚¹ãƒˆã®æœ€åˆã®è¡Œã®ã¿è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/FormObjects/property_wordwrap2.png) + + +#### 入力オブジェクト㧠"自動" ã«è¨­å®š (デフォルト) +`JSON 文法ã§ã¯: "automatic"` + +- 一行ã®ã‚¨ãƒªã‚¢ã®å ´åˆã€è¡Œã®æœ€å¾Œã«è¡¨ç¤ºã•れるå˜èªžã¯åˆ‡ã‚Šè½ã¨ã•ã‚Œã€æ”¹è¡Œã¯ã•れã¾ã›ã‚“。 +- 複数行ã®ã‚¨ãƒªã‚¢ã®å ´åˆã€4Dã¯è‡ªå‹•改行を実行ã—ã¾ã™ã€‚ + +![](assets/en/FormObjects/wordwrap1.png) + #### JSON 文法 -- **number columns**: "automatic" (default) or "checkbox" - - **boolean columns**: "checkbox" (default) or "popup" - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------- | ------- | ----------- | - | display | boolean | true, false | - - - #### 対象オブジェクト - - [Button](button_overview.md) - [Drop-down List](dropdownList_Overview.md) - - * * * - - ## Three-States - - Allows a check box object to accept a third state. ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒ 3番目ã®çŠ¶æ…‹ã«ãªã‚‹ã¨ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã«é–¢é€£ä»˜ã‘られãŸå¤‰æ•°ã¯å€¤2ã‚’è¿”ã—ã¾ã™ã€‚ - - #### 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------- | ------- | ----------- | - | threeState | boolean | true, false | - - - #### 対象オブジェクト - - [Check box](checkbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## タイトル - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------ | ------ | ---------------------------------- | - | controlTitle | string | Any custom label for the check box | - - - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------ | ------ | ---------------------- | - | truncateMode | string | "withEllipsis", "none" | - - - #### 対象オブジェクト - - [List Box Column](listbox_overview.md#list-box-columns) - [List Box Header](listbox_overview.md#list-box-footers) - - * * * - - ## 表示状態 - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------- | ------ | ------------------- | - | visibility | string | "visible", "hidden" | - - - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | -------- | ------ | -------------------------------------------------- | - | wordwrap | string | "automatic" (excluding list box), "normal", "none" | - - - #### 対象オブジェクト - - [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 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------- | ------ | ------------------------------------------ | +| wordwrap | string | "automatic" (リストボックスを除ã), "normal", "none" | + +#### 対象オブジェクト + +[入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Entry.md b/website/translated_docs/ja/FormObjects/properties_Entry.md index 39ac86a57d1434..05bda818bbc3f8 100644 --- a/website/translated_docs/ja/FormObjects/properties_Entry.md +++ b/website/translated_docs/ja/FormObjects/properties_Entry.md @@ -1,314 +1,426 @@ --- id: propertiesEntry -title: Entry +title: 入力 --- -* * * +--- +## 自動スペルãƒã‚§ãƒƒã‚¯ -## Auto Spellcheck +4D ã«ã¯ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªã‚¹ãƒšãƒ«ãƒã‚§ãƒƒã‚¯æ©Ÿèƒ½ãŒãƒ“ルトインã•れã¦ã„ã¾ã™ã€‚ スペルãƒã‚§ãƒƒã‚¯ã¯ãƒ†ã‚­ã‚¹ãƒˆåž‹ã® [入力](input_overview.md) オブジェクトã€ãã—㦠[4D Write Pro](writeProArea_overview.md)ドキュメントã«å¯¾ã—ã¦å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ -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. +自動スペルãƒã‚§ãƒƒã‚¯ãƒ—ロパティã¯ã€å„オブジェクトã®ã‚¹ãƒšãƒ«ãƒã‚§ãƒƒã‚¯ã‚’有効ã«ã—ã¾ã™ ã“ã®å ´åˆã€ã‚¹ãƒšãƒ«ãƒã‚§ãƒƒã‚¯ã¯ã‚¿ã‚¤ãƒ—中ã«è‡ªå‹•çš„ã«å®Ÿè¡Œã•れã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ã—ãŸã„オブジェクトãれãžã‚Œã«å¯¾ã—㦠`SPELL CHECKING` 4Dランゲージコマンドを呼ã³å‡ºã—ã¦å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------- | ------- | ----------- | | spellcheck | boolean | true, false | #### 対象オブジェクト -[4D Write Pro area](writeProArea_overview.md) - [Input](input_overview.md) +[4D Write Pro エリア](writeProArea_overview.md) - [入力](input_overview.md) -* * * -## Context Menu +--- +## コンテキストメニュー -Allows the user access to a standard context menu in the object when the form is executed. +ã“ã®ãƒ—ロパティを有効ã«ã™ã‚‹ã¨ã€ãƒ•ォームã®å®Ÿè¡Œä¸­ã«ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦æ¨™æº–ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ãŒä½¿ç”¨ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ -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. +ピクãƒãƒ£ãƒ¼åž‹ã® [入力](input_overview.md) オブジェクトã®å ´åˆã€æ¨™æº–ã®ç·¨é›†ã‚³ãƒžãƒ³ãƒ‰ (カットã€ã‚³ãƒ”ーã€ãƒšãƒ¼ã‚¹ãƒˆã€ãã—ã¦ã‚¯ãƒªã‚¢) ã«åŠ ãˆã€ãƒ•ァイルã‹ã‚‰ãƒ”クãƒãƒ£ãƒ¼ã‚’読ã¿è¾¼ã‚€ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã®ã§ãã‚‹ **読ã¿è¾¼ã¿...** コマンドã€ãƒ”クãƒãƒ£ãƒ¼ã‚’ディスクã«ä¿å­˜ã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ **別åã§ä¿å­˜...** コマンドãªã©ãŒã‚りã¾ã™ã€‚ ã¾ãŸã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使用ã—ã¦ãƒ”クãƒãƒ£ãƒ¼ã®è¡¨ç¤ºãƒ•ォーマットを変更ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚**トランケート (中央åˆã‚ã›ãªã—)**ã€**スケーリング** ãã—㦠**スケーリング (中央åˆã‚ã›/プロãƒãƒ¼ã‚·ãƒ§ãƒŠãƒ«)** ã‹ã‚‰é¸æŠžã§ãã¾ã™ã€‚ ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使用ã—㟠[表示フォーマット](properties_Display#ピクãƒãƒ£ãƒ¼ãƒ•ォーマット) ã®å¤‰æ›´ã¯ä¸€æ™‚çš„ãªã‚‚ã®ã§ã‚りã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ã¯ä¿å­˜ã•れã¾ã›ã‚“。 -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: +[マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„るテキスト型㮠[入力](input_overview.md) オブジェクトã®å ´åˆã€æ¨™æº–ã®ç·¨é›†ã‚³ãƒžãƒ³ãƒ‰ä»¥å¤–ã«ä»¥ä¸‹ã®æ§˜ãªã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +- **フォント...**: フォントシステムダイアログボックスを表示ã•ã›ã¾ã™ã€‚ +- **最近使用ã—ãŸãƒ•ォント**: ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«æœ€è¿‘使用ã•れãŸãƒ•ォントåを表示ã—ã¾ã™ã€‚ リストã«ã¯æœ€å¤§ã§ 10フォントã¾ã§è¡¨ç¤ºã•れã¾ã™ (ãれ以上ã¯å¤ã„ã‚‚ã®ã‹ã‚‰ç½®ãæ›ãˆã‚‰ã‚Œã¦ã„ãã¾ã™)。 デフォルトã§ã¯ãƒªã‚¹ãƒˆã¯ç©ºã«ãªã£ã¦ã„ã‚‹ã®ã§ã€ã“ã®ã‚ªãƒ—ションã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 ã“ã®ãƒªã‚¹ãƒˆã¯ `SET RECENT FONTS` 㨠`FONT LIST` コマンドを使用ã—ã¦ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- スタイルã®å¤‰æ›´ã‚’ãŠã“ãªã†ãŸã‚ã®ã‚³ãƒžãƒ³ãƒ‰: スタイルã€ã‚µã‚¤ã‚ºã€ã‚«ãƒ©ãƒ¼ã€èƒŒæ™¯è‰²ã€‚ ã“ã®ãƒãƒƒãƒ—アップメニューを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¹ã‚¿ã‚¤ãƒ«å±žæ€§ã‚’編集ã™ã‚‹ ã¨ã€4D 㯠`On After Edit` フォームイベントを生æˆã—ã¾ã™ã€‚ -- **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. +[Webエリア](webArea_overview.md) ã®å ´åˆã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®å†…容ã¯ãƒ—ãƒ©ãƒƒãƒˆãƒ•ã‚©ãƒ¼ãƒ ã®æç”»ã‚¨ãƒ³ã‚¸ãƒ³ã«ã‚ˆã‚Šè¨­å®šã•れã¾ã™ã€‚ コンテキストメニューã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ [`WA SET PREFERENCE`](https://doc.4d.com/4Dv18/4D/18/WA-SET-PREFERENCE.301-4504849.ja.html) コマンドを使用ã—ã¦åˆ¶å¾¡ã§ãã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------- | ------ | ------------------------------------- | -| contextMenu | string | "automatic" (used if missing), "none" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | ------------------------------- | +| contextMenu | string | "automatic" (çœç•¥æ™‚ã®ãƒ‡ãƒ•ォルト), "none" | #### 対象オブジェクト -[Input](input_overview.md) - [Web Area](webArea_overview.md) - [4D Write Pro areas](writeProArea_overview.md) +[入力](input_overview.md) - [Webエリア](webArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) + + + + -* * * -## Enterable +--- +## å…¥åŠ›å¯ + +入力å¯å±žæ€§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ªãƒ–ジェクトã«å€¤ã‚’入力ã§ãã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ -The Enterable attribute indicates whether users can enter values into the object. +ã™ã¹ã¦ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã¯ãƒ‡ãƒ•ォルトã§å…¥åŠ›å¯ã§ã™ã€‚ フォーム上ã®ç‰¹å®šã®ãƒ•ィールドやオブジェクトを入力ä¸å¯ã«ã—ãŸã„å ´åˆã€å…¥åŠ›å¯ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžã‚’解除ã—ã¾ã™ã€‚ 入力ä¸å¯ã®ã‚ªãƒ–ジェクトã¯ãƒ‡ãƒ¼ã‚¿ã®è¡¨ç¤ºã®ã¿ã‚’ãŠã“ãªã„ã¾ã™ã€‚ 当該フィールドåや変数åを使用ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’制御ã—ã¾ã™ã€‚ 入力ä¸å¯ã‚ªãƒ–ジェクトã§ã‚‚ `On Clicked`, `On Double Clicked`, `On Drag Over`, `On Drop`, `On Getting Focus` ãã—㦠`On Losing Focus` フォームイベントã¯ä½¿ç”¨ã§ãã¾ã™ã€‚ ã“れらã«ã‚ˆã£ã¦ã€ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ç®¡ç†ãŒå®¹æ˜“ã«ãªã‚Šã€å…¥åŠ›ä¸å¯å¤‰æ•°ã‚’ドラッグ&ドロップã—ãŸã‚Šé¸æŠžã—ãŸã‚Šã§ãるインターフェースをデザインã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -Objects are enterable by default. If you want to make a field or an object non-enterable for that form, you can disable the Enterable property for the object. A non-enterable object only displays data. You control the data by methods that use the field or variable name. You can still use the `On Clicked`, `On Double Clicked`, `On Drag Over`, `On Drop`, `On Getting Focus` and `On Losing Focus` form events with non-enterable objects. This makes it easier to manage custom context menus and lets you design interfaces where you can drag-and-drop and select non-enterable variables. +ã“ã®ãƒ—ロパティを無効ã«ã—ãŸå ´åˆã€ãƒªã‚¹ãƒˆã«ã‚ˆã£ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã«é–¢é€£ä»˜ã‘られãŸãƒãƒƒãƒ—アップメニューも使用ã§ããªããªã‚Šã¾ã™ã€‚ -When this property is disabled, any pop-up menus associated with a list box column via a list are disabled. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------- | ------- | ----------- | | enterable | boolean | true, false | +#### 対象オブジェクト + +[4D Write Pro エリア](writeProArea_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [進æ—インジケーター](progressIndicator.md) - [ルーラー](ruler.md) - [ステッパー](stepper.md) + + +--- +## 入力フィルター + +**æ—¥æœ¬èªžåˆ©ç”¨æ™‚ã®æ³¨æ„点**: å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯æ—¥æœ¬èªžIME ã¨äº’æ›æ€§ãŒã‚りã¾ã›ã‚“。入力文字種ã®åˆ¶é™åŠã³#を使用ã—ãŸå…¥åŠ›æ–‡å­—æ•°ã®åˆ¶é™ã‚‚ã§ãã¾ã›ã‚“。ãŸã¨ãˆã°åŠè§’æ•°å­—ã®ã¿ã‚’ 2文字ã ã‘入力を許å¯ã™ã‚‹ç›®çš„ã§ã€å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã«&9##ã¨æŒ‡å®šã—ã¦ã‚‚ã€IME経由ã§ã®å…¨è§’æ•°å­—ã‚„ãã®ä»–日本語文字ã®å…¥åŠ›ã‚’é˜²ãã“ã¨ã¯ã§ãã¾ã›ã‚“ã—ã€ä»»æ„ã®æ•°ã®æ–‡å­—ãŒå…¥åŠ›ã§ãã¦ã—ã¾ã„ã¾ã™ã€‚アプリケーション仕様ã¨ã—ã¦ã“ã®ã‚ˆã†ãªåˆ¶å¾¡ãŒå¿…è¦ãªå ´åˆã¯ 4Dコマンドを使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚

          入力フィルターを使用ã™ã‚‹ã¨ãƒ‡ãƒ¼ã‚¿å…¥åЛ䏭ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¿ã‚¤ãƒ—ã§ãる文字を制御ã§ãã¾ã™ã€‚ [指定リスト](properties_RangeOfValues.md#指定リスト) ã¨ã¯ç•°ãªã‚Šã€å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯æ–‡å­—ã”ã¨ã«å‡¦ç†ãŒãŠã“ãªã‚れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‘ーツ番å·ãŒå¸¸ã« 2ã¤ã®æ–‡å­—ã¨ãれã«ç¶šã 3ã¤ã®æ•°å­—ã§æ§‹æˆã•れるã¨ãã€å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’é€šã—ã¦ãã®ãƒ‘ターンを強制ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã•らã«ç‰¹å®šã®æ–‡å­—ã‚„æ•°å­—ã®ã¿ã‚’使用ã™ã‚‹ã‚ˆã†åˆ¶å¾¡ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +入力フィルターã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›æ™‚ã«ã®ã¿å‹•作ã—ã¾ã™ã€‚ オブジェクトã®é¸æŠžã‚’ユーザーãŒè§£é™¤ã—ãŸå¾Œã®ãƒ‡ãƒ¼ã‚¿è¡¨ç¤ºã«ã¯åŠ¹æžœãŒã‚りã¾ã›ã‚“。 通常ã¯ã€å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’ [表示フォーマット](properties_Display.md) ã¨ä¸€ç·’ã«ä½¿ç”¨ã—ã¾ã™ã€‚ フィルターã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’åˆ¶ç´„ã—ã€è¡¨ç¤ºãƒ•ォーマットã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›å¾Œã®å€¤ã®è¡¨ç¤ºã‚’制御ã—ã¾ã™ã€‚ + +データ入力中ã€ã‚¿ã‚¤ãƒ—ã•れるãŸã³ã«å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯æ–‡å­—を評価ã—ã¾ã™ã€‚ ユーザーãŒç„¡åйãªå…¥åŠ›ã‚’ã™ã‚‹ã¨ (ãŸã¨ãˆã°æ–‡å­—ã®ä»£ã‚ã‚Šã«æ•°å­—)ã€4D ã¯ãã®å…¥åŠ›ã‚’å—ã‘付ã‘ã¾ã›ã‚“。 ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæœ‰åйãªå…¥åŠ›ã‚’ãŠã“ãªã†ã¾ã§å€¤ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 + +入力フィルターã«è¡¨ç¤ºãƒ•ォーマットを併用ã™ã‚‹ã“ã¨ã§ã€å½¢å¼çš„ãªæ–‡å­—をユーザーãŒå…¥åŠ›ã—ãªãã¦ã™ã‚€ã‚ˆã†ã«ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¢ãƒ¡ãƒªã‚«åˆè¡†å›½ã®é›»è©±ç•ªå·ã¯ 3æ¡ã®ã‚¨ãƒªã‚¢ã‚³ãƒ¼ãƒ‰ã«ã€3æ¡ã¨4æ¡ã«åˆ†å‰²ã•れる 7æ¡ã®ç•ªå·ãŒç¶šãã¾ã™ã€‚ エリアコードをカッコã§ããりã€é›»è©±ç•ªå·ã®3ã¤ç›®ã®æ•°å­—ã®å¾Œã«ãƒ€ãƒƒã‚·ãƒ¥ã‚’表示ã™ã‚‹ã‚ˆã†ãªè¡¨ç¤ºãƒ•ォーマットを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ˆã†ãªãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆãŒæŒ‡å®šã•れã¦ã„ã‚‹å ´åˆã€ã‚«ãƒƒã‚³ã‚„ダッシュをユーザーãŒå…¥åŠ›ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 + +### 入力フィルターã®å®šç¾© + +ã»ã¨ã‚“ã©ã®å ´åˆã€ã‚らã‹ã˜ã‚用æ„ã•れã¦ã„ã‚‹ 4D ã® [ビルトインフィルター](#デフォルト入力フィルター) を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã—ã‹ã—ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ•ィルターを作æˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™: + +- 入力フィルターコードを直接入力ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- ツールボックスã®ãƒ•ィルターエディターã§å…¥åŠ›ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã‚’ä½œæˆã—ã€ãã®åå‰ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 開発者ãŒä½œæˆã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ•ィルターã¯ãƒªã‚¹ãƒˆã®å…ˆé ­ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +入力フィルターã®ä½œæˆã«é–¢ã™ã‚‹è©³ç´°ã¯ [フィルターã¨ãƒ•ォーマットã®ã‚³ãƒ¼ãƒ‰](https://doc.4d.com/4Dv18/4D/18/Filter-and-format-codes.300-4575706.ja.html) ã‚’å‚ç…§ãã ã•ã„。 + + +### デフォルト入力フィルター + +入力フィルタードロップダウンリストã‹ã‚‰é¸æŠžã§ãる入力フィルターã®èª¬æ˜Žã¯ä»¥ä¸‹ã®è¡¨ã®é€šã‚Šã§ã™: + +| 入力フィルター | 説明 | +| -------------------- | -------------------------------------------------------------------- | +| ~A | ã™ã¹ã¦ã®æ–‡å­—ãŒå…¥åŠ›å¯èƒ½ã€ãŸã ã—大文字ã«å¤‰æ›ã•れã¾ã™ã€‚ | +| &9 | æ•°å­—ã®ã¿å…¥åŠ›å¯èƒ½ã€‚ | +| &A | å¤§æ–‡å­—ã®æ–‡å­—ã ã‘ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| &a | 文字ã ã‘ãŒå…¥åŠ›å¯èƒ½ (大文字ã¨å°æ–‡å­—)。 | +| &@ | æ•°å­—ã¨æ–‡å­—ãŒå…¥åŠ›å¯èƒ½ã€‚ 特殊記å·ã‚’除ãã¾ã™ã€‚ | +| ~a## | 2æ¡ã®ä»»æ„ã®æ–‡å­—ãŒå…¥åŠ›å¯èƒ½ã€å¤§æ–‡å­—ã«å¤‰æ›ã•れã¾ã™ã€‚ (アメリカåˆè¡†å›½ã®å·žåãªã©ã«ä½¿ã‚れã¾ã™) | +| !0&9##/##/## | æ¨™æº–ã®æ—¥ä»˜å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã€‚ 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®æ•°å€¤ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| !0&9##å¹´##月##æ—¥ | カスタム日付入力フォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®æ•°å€¤ãŒå…¥åŠ›å¯èƒ½ã€‚ 年月日㌠2æ¡ãšã¤å…¥åŠ›å¯èƒ½ã€‚ | +| !0&9##:## | 時間入力フォーマット。 時ã¨åˆ†ã ã‘ãŒå…¥åŠ›å¯èƒ½ã€‚ 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®4æ¡ã®æ•°å­—ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| !0&9##時##分 | 時間入力フォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ 時間ã¨åˆ†æ•°ã‚’ 2æ¡ãšã¤å…¥åŠ›å¯èƒ½ã€‚ | +| !0&9##時##分##ç§’ | 時間入力フォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ 時間ã¨åˆ†æ•°ã€ç§’æ•°ã‚’ 2æ¡ãšã¤å…¥åŠ›å¯èƒ½ã€‚ | +| !0&9###-#### | ローカルãªéƒµä¾¿ç•ªå·ãƒ•ォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®æ•°å€¤ãŒå…¥åŠ›å¯èƒ½ã€‚ (3æ¡ã®æ•°å­—㨠4æ¡ã®æ•°å­—) | +| !_&9(###) !0###-#### | é•·è·é›¢é›»è©±ç•ªå·ãƒ•ォーマット。 先頭㮠3æ¡ã®å…¥åŠ›é ˜åŸŸã¯ã‚«ãƒƒã‚³ã§å›²ã¿ (空ã®å ´åˆã¯ã‚¢ãƒ³ãƒ€ãƒ¼ã‚¹ã‚³ã‚¢ã‚’表示ã—)ã€æ®‹ã‚Šã®å…¥åŠ›é ˜åŸŸã« 0 を表示。 | +| !0&9###-###-### | é•·è·é›¢é›»è©±ç•ªå·ãƒ•ォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®æ•°å€¤ãŒå…¥åŠ›å¯èƒ½ã€‚ 3æ¡ã¨ 3æ¡ã¨ 4æ¡ã®æ•°å­—ã‚’ãƒã‚¤ãƒ•ンã§åŒºåˆ†ã€‚ | +| !0&9###-##-#### | アメリカåˆè¡†å›½ã®ç¤¾ä¼šä¿éšœç•ªå·ãƒ•ォーマット。 入力領域㫠0 を表示ã—ã¾ã™ã€‚ ä»»æ„ã®æ•°å€¤ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| ~"A-Z;0-9; ;,;.;-" | å¤§æ–‡å­—ã®æ–‡å­—ã¨å¥èª­ç‚¹ã€‚ å¤§æ–‡å­—ã®æ–‡å­—ã€æ•°å­—ã€ã‚¹ãƒšãƒ¼ã‚¹ã€ã‚³ãƒ³ãƒžã€ãƒ”リオドã€ãƒã‚¤ãƒ•ンã ã‘ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| &"a-z;0-9; ;,;.;-" | 大文字ã¨å°æ–‡å­—ã®æ–‡å­—ã¨å¥èª­ç‚¹ã€‚ 大å°ã®æ–‡å­—ã€æ•°å­—ã€ã‚¹ãƒšãƒ¼ã‚¹ã€ã‚³ãƒ³ãƒžã€ãƒ”リオドã€ãƒã‚¤ãƒ•ンã ã‘ãŒå…¥åŠ›å¯èƒ½ã€‚ | +| &"0-9;.;-" | 数字。 æ•°å­—ã€å°æ•°ç‚¹ã€ãƒã‚¤ãƒ•ン (マイナス記å·) ã ã‘ãŒå…¥åŠ›å¯èƒ½ã€‚ | + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | --------------------------------------------------------------------------- | +| entryFilter | string |
        • 入力フィルターコードã€ã¾ãŸã¯
        • 入力フィルターå | + + +#### 対象オブジェクト + +[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - + +コンボボックス - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列)

          + + + + + + + + + +--- + + +## ãƒ•ã‚©ãƒ¼ã‚«ã‚¹å¯ + +オブジェクトã«å¯¾ã— **フォーカスå¯** プロパティãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ãã®ã‚ªãƒ–ジェクトã¯ãƒ•ォーカスを得るã“ã¨ãŒã§ãã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ãªã©ã‚’使用ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オブジェクトã¯ãƒ•ォーカスを得るã¨ã€ã‚ªãƒ–ジェクトã”ã¨ã‚ã‚‹ã„㯠OS ã”ã¨ã«å®šã‚ã‚‰ã‚ŒãŸæ–¹æ³•ã§ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ãŸã ã— [フォーカスã®å››è§’ã‚’éš ã™](properties_Appearance.md#hide-focus-rectangle) オプションãŒé¸æŠžã•れã¦ã„ã‚‹å ´åˆã‚’除ãã¾ã™ã€‚ + + + +> [入力å¯](#入力å¯) ã«è¨­å®šã•れ㟠[入力オブジェクト](input_overview.md) ã¯å¸¸ã«ãƒ•ォーカスå¯ã§ã™ã€‚ + +* ![](assets/en/FormObjects/property_focusable1.png)
          é¸æŠžæ™‚ã«ãƒ•ォーカスを表示ã—ã¦ã„ã‚‹ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ +

          +

          + +* ![](assets/en/FormObjects/property_focusable2.png)
          é¸æŠžã•れã¦ã„ã‚‹ãŒã€ãƒ•ォーカスを表示ã—ã¦ã„ãªã„ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ + +入力ã§ããªã„オブジェクト㫠**フォーカスå¯** プロパティãŒè¨­å®šã•れã¦ã„ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚¨ãƒªã‚¢ã®å†…å®¹ã‚’é¸æŠžã€ã‚³ãƒ”ーã€ãŠã‚ˆã³ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------- | ------- | ----------- | +| focusable | boolean | true, false | + + + + + +#### 対象オブジェクト + +[4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [プラグインエリア](pluginArea_overview.md) - [ラジオボタン](radio_overview.md) - [サブフォーム](subform_overview.md) + + + + + + +--- + + +## キーボードレイアウト + +ã“ã®ãƒ—ロパティ㯠[入力](input_overview.md) オブジェクトã«å¯¾ã—ã¦ç‰¹å®šã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’関連付ã‘ã¾ã™ã€‚ ãŸã¨ãˆã°ã€å›½éš›çš„ãªã‚¢ãƒ—リケーションã«ãŠã„ã¦ã€ãƒ•ォーム内ã«ã‚®ãƒªã‚·ãƒ£æ–‡å­—ã§å…¥åŠ›ã—ãªã‘れã°ãªã‚‰ãªã„フィールドãŒã‚ã£ãŸå ´åˆã€"ギリシャ語" ã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’ã“ã®ãƒ•ィールドã«å¯¾ã—ã¦é–¢é€£ä»˜ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ã“ã®ãƒ•ィールドãŒãƒ•ォーカスをå—ã‘ã¦ã„ã‚‹å ´åˆã«ã¯ãƒ‡ãƒ¼ã‚¿å…¥åŠ›æ™‚ã«ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰è¨­å®šãŒè‡ªå‹•çš„ã«å¤‰ã‚りã¾ã™ã€‚ + +デフォルトã§ã¯ã€ã‚ªãƒ–ジェクトã¯ã‚«ãƒ¬ãƒ³ãƒˆã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’使用ã—ã¾ã™ã€‚ + + + +> ã“ã®ãƒ—ロパティã¯ã€`OBJECT SET KEYBOARD LAYOUT` 㨠`OBJECT Get keyboard layout` コマンドを使用ã—ã¦å‹•çš„ã«è¨­å®šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------ | ---------------------------------------------------------------- | +| keyboardDialect | text | 言語コード (例: "ar-ma", "cs" ãªã©) RFC3066, ISO639 ãŠã‚ˆã³ ISO3166 ã‚’å‚ç…§ãã ã•ã„。 | + + + + + +#### 対象オブジェクト + +[4D Write Pro エリア](writeProArea_overview.md) - [入力](input_overview.md) + + + + + +--- + + +## 複数行 + +ã“ã®ãƒ—ロパティã¯ã€ãƒ†ã‚­ã‚¹ãƒˆã‚¿ã‚¤ãƒ—ã®å¼ã‚„ã€æ–‡å­—ãŠã‚ˆã³ãƒ†ã‚­ã‚¹ãƒˆã‚¿ã‚¤ãƒ—ã®ãƒ•ィールドãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ [入力オブジェクト](input_overview.md) ã§ä½¿ç”¨ã§ãã¾ã™ã€‚ 値ã¯ã€ã‚り・ãªã—・自動 (デフォルト) ãŒé¸æŠžã§ãã¾ã™ã€‚ + + + +#### 自動 + +- 一行ã®å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§ã¯ã€è¡Œã®æœ€å¾Œã«ã‚ã‚‹å˜èªžã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã€æ”¹è¡Œã¯ãŠã“ãªã‚れã¾ã›ã‚“。 +- 複数行ã®å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®å ´åˆã€4D ã¯è‡ªå‹•ã§æ”¹è¡Œã—ã¾ã™: + ![](assets/en/FormObjects/multilineAuto.png) + + + +#### × + +- 一行ã®å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã§ã¯ã€è¡Œã®æœ€å¾Œã«ã‚ã‚‹å˜èªžã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã€æ”¹è¡Œã¯ãŠã“ãªã‚れã¾ã›ã‚“。 +- 改行ã¯ãŠã“ãªã‚れã¾ã›ã‚“。テキストã¯å¸¸ã«ä¸€è¡Œã§è¡¨ç¤ºã•れã¾ã™ã€‚ 文字やテキストã®ãƒ•ィールドã¾ãŸã¯å¤‰æ•°ãŒæ”¹è¡Œæ–‡å­—ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã€ã‚¨ãƒªã‚¢ãŒæ›´æ–°ã•れるã¨ã™ãã«æœ€åˆã®ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ã‚ˆã‚Šå¾Œã®ãƒ†ã‚­ã‚¹ãƒˆãŒå–り除ã‹ã‚Œã¾ã™: + ![](assets/en/FormObjects/multilineNo.png) + + + +#### â—¯ + +ã“ã®å€¤ã‚’é¸æŠžã™ã‚‹ã¨ã€è¿½åŠ ã® [ワードラップ](properties_Display.md#ワードラップ) オプションãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------- | ------ | ------------------------------------------- | +| multiline | text | "yes", "no", "automatic" (定義ã•れã¦ã„ãªã„å ´åˆã®ãƒ‡ãƒ•ォルト) | + + + + + +#### 対象オブジェクト + +[入力](input_overview.md) + + + + + +--- + + +## プレースホルダー + +4D ã§ã¯ã€ãƒ•ォームã®ãƒ•ィールド内ã«ãƒ—レースホルダーテキストを表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒ•ィールド内ã§åŠé€æ˜Žã®ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦è¡¨ç¤ºã•れã€å…¥åŠ›ã•れるデータã«é–¢ã™ã‚‹ãƒ˜ãƒ«ãƒ—ã€æŒ‡ç¤ºã€å…·ä½“例ãªã©ã‚’表示ã—ã¾ã™ã€‚ ã“ã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ–‡å­—をエリアã«å…¥åŠ›ã—ãŸçž¬é–“ã«è¡¨ç¤ºã•れãªããªã‚Šã¾ã™: + +![](assets/en/FormObjects/property_placeholder.png) + +プレースホルダーテキストã¯ã€ãƒ•ィールドã®ä¸­èº«ãŒæ¶ˆåŽ»ã•れるã¨å†ã³è¡¨ç¤ºã•れã¾ã™ã€‚ + +プレースホルダーã¨ã—ã¦è¡¨ç¤ºã§ãるデータã®åž‹ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- 文字列 (テキストã¾ãŸã¯æ–‡å­—) +- 日付ã¾ãŸã¯æ™‚刻 (**ヌルã®ã¨ãブランクã«ã™ã‚‹** ã®ãƒ—ロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã«é™ã‚Šã¾ã™) + +xliff å‚ç…§ã‚’ ":xliff:resname" ã®å½¢ã§ãƒ—レースホルダーã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ãŸã¨ãˆã°: + + :xliff:PH_Lastname + + +ã“ã®å ´åˆã€"プレースホルダー" ã®ãƒ•ィールドã«ã¯å‚ç…§ã®ã¿ã‚’渡ã—ã¾ã™ã€‚å‚ç…§ã¨é™çš„ãªãƒ†ã‚­ã‚¹ãƒˆã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + +> プレースホルダーã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã€[OBJECT SET PLACEHOLDER](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-PLACEHOLDER.301-4505467.ja.html) 㨠[OBJECT Get placeholder](https://doc.4d.com/4Dv18/4D/18/OBJECT-Get-placeholder.301-4505473.ja.html) コマンドを使ã£ã¦ã€ãƒ—ログラミングã«ã‚ˆã£ã¦è¨­å®šã—ãŸã‚Šå–å¾—ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | -------------------------------- | +| placeholder | string | オブジェクトã«å€¤ãŒæ ¼ç´ã•れã¦ã„ãªã„å ´åˆã«è¡¨ç¤ºã™ã‚‹åŠé€æ˜Žã®ãƒ†ã‚­ã‚¹ãƒˆ | + + + #### 対象オブジェクト -[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) +[コンボボックス](comboBox_overview.md) - [入力](input_overview.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. -An entry filter operates only during data entry. It has no effect on data display after the user deselects the object. In general, you use entry filters and [display formats](properties_Display.md) together. The filter constrains data entry and the format ensures proper display of the value after data entry. +#### å‚ç…§ -During data entry, an entry filter evaluates each character as it is typed. If the user attempts to type an invalid character (a number instead of a letter, for example), 4D simply does not accept it. The null character remains unchanged until the user types a valid character. +[ヘルプTips](properties_Help.md) -Entry filters can also be used to display required formatting characters so that the user need not enter them. For example, an American telephone number consists of a three-digit area code, followed by a seven-digit number that is broken up into two groups of three and four digits, respectively. A display format can be used to enclose the area code in parentheses and display a dash after the third digit of the telephone number. When such a format is used, the user does not need to enter the parentheses or the dashes. -### Defining an entry filter -Most of the time, you can use one of the [built-in filters](#default-entry-filters) of 4D for what you need; however, you can also create and use custom filters: -- you can directly enter a filter definition string -- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). -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 +## é¸æŠžã‚’å¸¸ã«è¡¨ç¤º + +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクト中ã§é¸æŠžã—ãŸæ–‡å­—列ã®å転状態ãŒã€ãƒ•ォーカスを失ã£ãŸå¾Œã‚‚表示ã•れるよã†ã«ãªã‚Šã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãƒ†ã‚­ã‚¹ãƒˆã‚¹ã‚¿ã‚¤ãƒ«ã‚’æ›´æ–°ã™ã‚‹ã‚ˆã†ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã®å®Ÿè£…ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ ([マルãƒã‚¹ã‚¿ã‚¤ãƒ«](properties_Text.md#マルãƒã‚¹ã‚¿ã‚¤ãƒ«) å‚ç…§)。 -Here is a table that explains each of the entry filter choices in the Entry Filter drop-down list: -| Entry Filter | 説明 | -| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| ~A | Allow any letters, but convert to uppercase. | -| &9 | Allow only numbers. | -| &A | Allow only capital letters. | -| &a | Allow only letters (uppercase and lowercase). | -| &@ | 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##:## | 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. | -| ~"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). | #### JSON 文法 -- Entry filter code or - - Entry filter name (filter names start with | ) - #### 対象オブジェクト - - [Combo Box](comboBox_overview.md) - [Hierarchical List](list_overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - - * * * - - ## ãƒ•ã‚©ãƒ¼ã‚«ã‚¹å¯ - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | --------- | ------- | ----------- | - | focusable | boolean | true, false | - - - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | --------------- | ------ | --------------------------------------------------------------------------- | - | keyboardDialect | テキスト | Language code, for example "ar-ma" or "cs". See RFC3066, ISO639 and ISO3166 | - - - #### 対象オブジェクト - - [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) - #### × - - - 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) - #### â—¯ - - When this value is selected, the property is managed by the [Wordwrap](properties_Display.md#wordwrap) option. - - #### JSON 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | --------- | ------ | ------------------------------------------------- | - | multiline | テキスト | "yes", "no", "automatic" (default if not defined) | - - - #### 対象オブジェクト - - [入力](input_overview.md) - - * * * - - ## プレースホルダー - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----------- | ------ | ---------------------------------------------------------------------------- | - | placeholder | string | Text to be displayed (grayed out) when the object does not contain any value | - - - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------- | ------- | ----------- | - | showSelection | boolean | true, false | - - - #### 対象オブジェクト - - [4D Write Pro areas](writeProArea_overview.md) - [Input](input_overview.md) - - * * * - - ## ショートカット - - 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 文法 - - - 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]" - #### 対象オブジェクト - - [Button](button_overview.md) - [Check Box](checkbox_overview.md) - [Picture Button](pictureButton_overview.md) - [Radio Button](radio_overview.md) - - * * * - - ## シングルクリック編集 - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | --------------- | ------- | ----------- | - | singleClickEdit | boolean | true, false | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------- | ----------- | +| showSelection | boolean | true, false | + + + + + +#### 対象オブジェクト + +[4D Write Pro エリア](writeProArea_overview.md) - [入力](input_overview.md) + + + + + +--- + + +## ショートカット + +[ボタン](button_overview.md)ã€[ラジオボタン](radio_overview.md) ãŠã‚ˆã³ [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) ã«ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ショートカットã«ã‚ˆã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒžã‚¦ã‚¹ã‚’使用ã—ãªãã¦ã‚‚キーボードã‹ã‚‰ã“れらã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ショートカットã®è¨­å®šã‚’ãŠã“ãªã†ã«ã¯ã€ãƒ—ロパティリストã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãƒ—ロパティ㮠[...] ボタンをクリックã—ã¾ã™: + +![](assets/en/FormObjects/property_shortcut.png) + + +> カスタムメニューコマンドã«ã‚‚ショートカットを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 2ã¤ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã«è¡çªãŒã‚ã‚‹å ´åˆã«ã¯ã€ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトãŒå„ªå…ˆã•れã¾ã™ã€‚ メニューã¸ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®å‰²ã‚Šå½“ã¦ã«ã¤ã„ã¦ã¯ [メニュープロパティを設定ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Setting-menu-properties.300-4575512.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +4D ã®ãƒ‡ã‚¶ã‚¤ãƒ³ç’°å¢ƒã§ä½¿ç”¨ã§ãるショートカットã®ä¸€è¦§ã¯ã€ç’°å¢ƒè¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã® [ショートカットページ](https://doc.4d.com/4Dv18/4D/18/Shortcuts-Page.300-4575689.ja.html) ã«ã¦ç¢ºèªã§ãã¾ã™ã€‚ + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| shortcutAccel | boolean | true, false (Windows: Ctrl/macOS: Command) | +| shortcutAlt | boolean | true, false | +| shortcutCommand | boolean | true, false | +| shortcutControl | boolean | true, false (macOS: Control) | +| shortcutShift | boolean | true, false | +| | | | +| shortcutKey | string |

        • ä»»æ„ã®æ–‡å­—キー: "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]" | + + + + + +#### 対象オブジェクト + +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ラジオボタン](radio_overview.md) + + + + + + + +--- + + +## シングルクリック編集 + +リストボックスã«ãŠã„ã¦ã€ç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã¸ã®ç›´æŽ¥ç§»è¡Œã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ãã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å½“該エリアãŒäº‹å‰ã«é¸æŠžã•れã¦ã„ãŸã‹ã©ã†ã‹ã«é–¢ã‚らãšã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ¯ãƒ³ã‚¯ãƒªãƒƒã‚¯ã ã‘ã§ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚»ãƒ«ã‚’編集モードã¸ã¨ç§»è¡Œã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® [é¸æŠžãƒ¢ãƒ¼ãƒ‰](properties_ListBox.md#é¸æŠžãƒ¢ãƒ¼ãƒ‰) ㌠"ãªã—" ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã§ã‚‚セルã®ç·¨é›†ã‚’å¯èƒ½ã«ã™ã‚‹ã¨è¨€ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã€ã‚»ãƒ«ã®å†…容を編集ã™ã‚‹ã«ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã¾ãšæœ€åˆã«ç·¨é›†ã—ãŸã„セルã®è¡Œã‚’é¸æŠžã—ã€ãã®æ¬¡ã«ç·¨é›†ã™ã‚‹ã‚»ãƒ«ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------- | ----------- | +| singleClickEdit | boolean | true, false | + + + + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Footers.md b/website/translated_docs/ja/FormObjects/properties_Footers.md index 60b34f79702acb..97854da6e8dcd4 100644 --- a/website/translated_docs/ja/FormObjects/properties_Footers.md +++ b/website/translated_docs/ja/FormObjects/properties_Footers.md @@ -1,69 +1,70 @@ --- id: propertiesFooters -title: Footers +title: フッター --- -* * * - +--- ## フッターを表示 -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. +ã“ã®ãƒ—ロパティã¯ã€[リストボックス列フッター](listbox_overview.md#リストボックスフッター) ã®è¡¨ç¤º/éžè¡¨ç¤ºã‚’指定ã—ã¾ã™ã€‚ 列ã”ã¨ã« 1ã¤ã®ãƒ•ッターを表示ã§ãã¾ã™ã€‚ãれãžã‚Œã®ãƒ•ッターã¯å€‹åˆ¥ã«è¨­å®šã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------- | ------- | ----------- | | showFooters | boolean | true, false | - #### 対象オブジェクト [リストボックス](listbox_overview.md) -* * * -## Height -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. +--- +## 高㕠+ +ã“ã®ãƒ—ロパティã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ•ッターã®é«˜ã•ã‚’ **行** ã¾ãŸã¯ **ピクセル** å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚ åŒã˜ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã§ç•°ãªã‚‹å˜ä½ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +* *ピクセル* - 指定ã•れãŸå€¤ã¯å½“該行ã«å¯¾ã—直接é©ç”¨ã•れã€åˆ—ãŒä½¿ç”¨ã—ã¦ã„るフォントサイズ等ã¯è€ƒæ…®ã•れã¾ã›ã‚“。 フォントãŒè¡Œã®é«˜ã•ã«å¯¾ã—ã¦å¤§ãã„å ´åˆã€ãƒ†ã‚­ã‚¹ãƒˆã¯åˆ‡ã‚Šå–られã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ã¯ãƒ•ォーマットã«åŸºã¥ãã€åˆ‡ã‚Šå–られるã‹ãƒªã‚µã‚¤ã‚ºã•れã¾ã™ã€‚ + +* *行* - 高ã•ã¯è¡Œã®ãƒ•ォントサイズã«åˆã‚ã›ã¦è¨ˆç®—ã•れã¾ã™ã€‚ + * 複数ã®ç•°ãªã‚‹ã‚µã‚¤ã‚ºãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆã€4D ã¯ã‚‚ã£ã¨ã‚‚大ããªã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€è¡Œã« "Verdana 18", "Geneva 12" ãã—㦠"Arial 9" ãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆã€4D ã¯è¡Œã®é«˜ã•ã®æ±ºå®šã« "Verdana 18" を使用ã—ã¾ã™ã€‚ 複数行ã®å ´åˆã¯ã“ã®é«˜ã•ã®å€æ•°ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + * ã“ã®è¨ˆç®—ã«ã¯ãƒ”クãƒãƒ£ãƒ¼ã®ã‚µã‚¤ã‚ºã‚„ã€ãƒ•ォントã«é©ç”¨ã•れるスタイルã¯è€ƒæ…®ã•れã¾ã›ã‚“。 + * macOS 環境下ã§ã¯ã€é¸æŠžã•れãŸãƒ•ォントã§ä½¿ç”¨ã§ããªã„文字をユーザーãŒå…¥åŠ›ã—ãŸå ´åˆã€è¡Œã®é«˜ã•ãŒæ­£ã—ããªããªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ä»£ç†ãƒ•ォントãŒä½¿ç”¨ã•れã€ãã®çµæžœã‚µã‚¤ã‚ºã«ã°ã‚‰ã¤ããŒå‡ºã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ +> フッターã®é«˜ã•㯠[LISTBOX SET FOOTERS HEIGHT](https://doc.4d.com/4Dv18/4D/18/LISTBOX-SET-FOOTERS-HEIGHT.301-4505199.ja.html) コマンドを使用ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -* *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. +å˜ä½ã®å¤‰æ›: å˜ä½ã‚’変更ã—ãŸå ´åˆã€4D ã¯è‡ªå‹•ã§å€¤ã‚’å†è¨ˆç®—ã—ã€çµæžœã‚’プロパティリストã«è¡¨ç¤ºã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä½¿ç”¨ã•れるフォント㌠"Lucida grande 24" ã§é«˜ã•㌠"1 行" ã«è¨­å®šã•れã¦ã„れ㰠"30 ピクセル" ã«ã€é«˜ã•㌠"60 ピクセル" ãªã‚‰ "2 行" ã«ãªã‚Šã¾ã™ã€‚ -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". +å˜ä½ã®å¤‰æ›´ã‚’繰り返ã™ã¨ã€4D ãŒè‡ªå‹•ã§è¨ˆç®—を行ã†ãŸã‚ã€æœ€åˆã®å€¤ã¨ã¯çµæžœãŒç•°ãªã£ã¦ã—ã¾ã†ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: -Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: +*(Arial 18)*: 52 ピクセル -> 2 行 -> 40 ピクセル *(Arial 12)*: 3 ピクセル -> 0.4 行㌠1 行ã«åˆ‡ã‚Šä¸Šã’られる -> 19 ピクセル -*(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 例: - "List Box": { - "type": "listbox", - "showFooters": true, - "footerHeight": "44px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showFooters": true, + "footerHeight": "44px", + ... + } +``` -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ------ | ----------------------------- | -| footerHeight | string | positive decimal+px | em | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | --------------------- | +| footerHeight | string | æ­£ã®10進数 + px | em | #### 対象オブジェクト [リストボックス](listbox_overview.md) -#### See also -[Headers](properties_Headers.md) - [List box footers](listbox_overview.md#list-box-footers) \ No newline at end of file +#### å‚ç…§ + +[ヘッダー](properties_Headers.md) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Gridlines.md b/website/translated_docs/ja/FormObjects/properties_Gridlines.md index a12ab5a4c13c1c..f073c5580778cf 100644 --- a/website/translated_docs/ja/FormObjects/properties_Gridlines.md +++ b/website/translated_docs/ja/FormObjects/properties_Gridlines.md @@ -1,37 +1,36 @@ --- id: propertiesGridlines -title: Gridlines +title: グリッド線 --- -* * * - +--- ## 横線カラー -Defines the color of the horizontal lines in a list box (gray by default). +ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã®æ¨ªç·šã®è‰²ã‚’指定ã—ã¾ã™ (デフォルトã¯ã‚°ãƒ¬ãƒ¼)。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------------- | ------ | ------------------------------------------ | -| horizontalLineStroke | color | any css value, "'transparent", "automatic" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------------- | ------ | ------------------------------------ | +| horizontalLineStroke | color | ä»»æ„ã® css値; "transparent"; "automatic" | #### 対象オブジェクト [リストボックス](listbox_overview.md) -* * * + + +--- ## 縦線カラー -Defines the color of the vertical lines in a list box (gray by default). +リストボックス内ã®ç¸¦ç·šã®è‰²ã‚’指定ã—ã¾ã™ (デフォルトã¯ã‚°ãƒ¬ãƒ¼)。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------ | ------ | ------------------------------------------ | -| verticalLineStroke | color | any css value, "'transparent", "automatic" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------ | ------ | ------------------------------------ | +| verticalLineStroke | color | ä»»æ„ã® css値; "transparent"; "automatic" | #### 対象オブジェクト diff --git a/website/translated_docs/ja/FormObjects/properties_Headers.md b/website/translated_docs/ja/FormObjects/properties_Headers.md index 80d9a1b87f4362..9d4e6a51f737f3 100644 --- a/website/translated_docs/ja/FormObjects/properties_Headers.md +++ b/website/translated_docs/ja/FormObjects/properties_Headers.md @@ -1,69 +1,69 @@ --- id: propertiesHeaders -title: Headers +title: ヘッダー --- -* * * - +--- ## ヘッダーを表示 -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. +ã“ã®ãƒ—ロパティã¯ã€[リストボックス列ヘッダー](listbox_overview.md#リストボックスヘッダー) ã®è¡¨ç¤º/éžè¡¨ç¤ºã‚’指定ã—ã¾ã™ã€‚ 列ã”ã¨ã« 1ã¤ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’表示ã§ãã¾ã™ã€‚ãれãžã‚Œã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¯å€‹åˆ¥ã«è¨­å®šã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ----------- | ------- | ----------- | | showHeaders | boolean | true, false | - #### 対象オブジェクト [リストボックス](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. +--- +## 高㕠+ +ã“ã®ãƒ—ロパティã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã®é«˜ã•ã‚’ **行** ã¾ãŸã¯ **ピクセル** å˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚ åŒã˜ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã§ç•°ãªã‚‹å˜ä½ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: -* *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. +* *行* - 高ã•ã¯è¡Œã®ãƒ•ォントサイズã«åˆã‚ã›ã¦è¨ˆç®—ã•れã¾ã™ã€‚ + * 複数ã®ç•°ãªã‚‹ã‚µã‚¤ã‚ºãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆã€4D ã¯ã‚‚ã£ã¨ã‚‚大ããªã‚‚ã®ã‚’使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€è¡Œã« "Verdana 18", "Geneva 12" ãã—㦠"Arial 9" ãŒè¨­å®šã•れã¦ã„ã‚‹å ´åˆã€4D ã¯è¡Œã®é«˜ã•ã®æ±ºå®šã« "Verdana 18" を使用ã—ã¾ã™ã€‚ 複数行ã®å ´åˆã¯ã“ã®é«˜ã•ã®å€æ•°ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + * ã“ã®è¨ˆç®—ã«ã¯ãƒ”クãƒãƒ£ãƒ¼ã®ã‚µã‚¤ã‚ºã‚„ã€ãƒ•ォントã«é©ç”¨ã•れるスタイルã¯è€ƒæ…®ã•れã¾ã›ã‚“。 + * macOS 環境下ã§ã¯ã€é¸æŠžã•れãŸãƒ•ォントã§ä½¿ç”¨ã§ããªã„文字をユーザーãŒå…¥åŠ›ã—ãŸå ´åˆã€è¡Œã®é«˜ã•ãŒæ­£ã—ããªããªã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ä»£ç†ãƒ•ォントãŒä½¿ç”¨ã•れã€ãã®çµæžœã‚µã‚¤ã‚ºã«ã°ã‚‰ã¤ããŒå‡ºã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ +> ヘッダーã®é«˜ã•㯠[LISTBOX SET HEADERS HEIGHT](https://doc.4d.com/4Dv18/4D/18/LISTBOX-SET-HEADERS-HEIGHT.301-4505200.ja.html) コマンドを使用ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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". +å˜ä½ã®å¤‰æ›: å˜ä½ã‚’変更ã—ãŸå ´åˆã€4D ã¯è‡ªå‹•ã§å€¤ã‚’å†è¨ˆç®—ã—ã€çµæžœã‚’プロパティリストã«è¡¨ç¤ºã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä½¿ç”¨ã•れるフォント㌠"Lucida grande 24" ã§é«˜ã•㌠"1 行" ã«è¨­å®šã•れã¦ã„れ㰠"30 ピクセル" ã«ã€é«˜ã•㌠"60 ピクセル" ãªã‚‰ "2 行" ã«ãªã‚Šã¾ã™ã€‚ -Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: +å˜ä½ã®å¤‰æ›´ã‚’繰り返ã™ã¨ã€4D ãŒè‡ªå‹•ã§è¨ˆç®—を行ã†ãŸã‚ã€æœ€åˆã®å€¤ã¨ã¯çµæžœãŒç•°ãªã£ã¦ã—ã¾ã†ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: -*(font Arial 18)*: 52 pixels -> 2 lines -> 40 pixels *(font Arial 12)*: 3 pixels -> 0.4 line rounded up to 1 line -> 19 pixels +*(Arial 18)*: 52 ピクセル -> 2 行 -> 40 ピクセル *(Arial 12)*: 3 ピクセル -> 0.4 行㌠1 行ã«åˆ‡ã‚Šä¸Šã’られる -> 19 ピクセル #### JSON 例: - "List Box": { - "type": "listbox", - "showHeaders": true, - "headerHeight": "22px", - ... - } - +``` + "List Box": { + "type": "listbox", + "showHeaders": true, + "headerHeight": "22px", + ... + } +``` + -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ------ | ------------------------------- | -| headerHeight | string | positive decimal+px | em ) | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ----------------------- | +| headerHeight | string | æ­£ã®10進数 + px | em ) | #### 対象オブジェクト [リストボックス](listbox_overview.md) -#### See also -[Footers](properties_Footers.md) - [List box headers](listbox_overview.md#list-box-headers) \ No newline at end of file +#### å‚ç…§ + +[フッター](properties_Footers.md) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Help.md b/website/translated_docs/ja/FormObjects/properties_Help.md index 14cf5cff7e3d92..c96f99a988698f 100644 --- a/website/translated_docs/ja/FormObjects/properties_Help.md +++ b/website/translated_docs/ja/FormObjects/properties_Help.md @@ -3,48 +3,51 @@ id: propertiesHelp title: ヘルプ --- -* * * - -## Help Tip +--- +## ヘルプTips -This property allows associating help messages with active objects in your forms. They can be displayed at runtime: +ã“ã®ãƒ—ロパティã§ã€ãƒ•ォーム上ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã«ãƒ˜ãƒ«ãƒ—Tip を付加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ランタイムã«ãŠã„ã¦ãƒžã‚¦ã‚¹ãŒã‚ªãƒ–ジェクト上ã«ã‚ã‚‹ã¨ãã€ãƒ˜ãƒ«ãƒ—メッセージ㌠Tip ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™: ![](assets/en/FormObjects/property_helpTip.png) -> - The display delay and maximum duration of help tips can be controlled using the `Tips delay` and `Tips duration` selectors of the **[SET DATABASE PARAMETER](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html)** command. -> - Help tips can be globally disabled or enabled for the application using the Tips enabled selector of the [**SET DATABASE PARAMETER**](https://doc.4d.com/4Dv17R5/4D/17-R5/SET-DATABASE-PARAMETER.301-4128139.en.html) command. +> - **[SET DATABASE PARAMETER](https://doc.4d.com/4Dv18/4D/18/SET-DATABASE-PARAMETER.301-4505363.ja.html)** コマンド㮠`Tips delay` ãŠã‚ˆã³ `Tips duration` セレクターを使用ã™ã‚‹ã“ã¨ã§ã€Tips ã®è¡¨ç¤ºé…延や最大表示時間を指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> - **[SET DATABASE PARAMETER](https://doc.4d.com/4Dv18/4D/18/SET-DATABASE-PARAMETER.301-4505363.ja.html)** コマンド㮠`Tips enabled` セレクターを使用ã™ã‚‹ã“ã¨ã§ã€ã‚¢ãƒ—リケーション全体ã«å¯¾ã—ã¦ãƒ˜ãƒ«ãƒ—Tipsを有効化ã‚ã‚‹ã„ã¯ç„¡åŠ¹åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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)). +- 4D ã® [ヘルプTipエディター](https://doc.4d.com/4Dv18/4D/18/Help-tips.200-4575424.ja.html) ã§ã‚らã‹ã˜ã‚作æˆã—ãŸãƒ˜ãƒ«ãƒ—Tip を指定ã—ã¾ã™ã€‚ +- ã¾ãŸã¯ã€ãƒ—ロパティリストã«ç›´æŽ¥ Tip を文字列ã¨ã—ã¦å…¥åŠ›ã—ã¾ã™ã€‚ ã“ã®æ–¹æ³•ã§ã¯ã€XLIFF アーキテクãƒãƒ£ãƒ¼ã‚’利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ XLIFFå‚照を指定ã™ã‚‹ã“ã¨ã§ã€ã‚¢ãƒ—リケーションã®è¨€èªžã«å¿œã˜ãŸãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ (XLIFF ã«ã¤ã„ã¦ã®è©³ç´°ã¯ [付録 B: XLIFFアーキテクãƒãƒ£ãƒ¼](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) ã‚’å‚ç…§ãã ã•ã„)。 ã¾ãŸã€4D å‚照を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ ([スタティックテキスト中ã§å‚照を使用ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Using-references-in-static-text.300-4575714.ja.html) å‚ç…§)。 +> macOS ã«ãŠã„ã¦ã¯ã€Pop up window (32) åž‹ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ãƒ˜ãƒ«ãƒ—Tips ã®è¡¨ç¤ºãŒã§ãã¾ã›ã‚“。 -> In macOS, displaying help tips is not supported in pop-up type windows. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:-------:|:------:| ------------------------------------- | -| tooltip | テキスト | additional information to help a user | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:-------:|:------:| ----------- | +| tooltip | text | ユーザー用ã®ãƒ˜ãƒ«ãƒ—情報 | #### 対象オブジェクト -[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_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [コンボボックス](comboBox_overview.md) - [階層リスト](list_overview.md) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [ラジオボタン](radio_overview.md) + + +#### 追加ã®ãƒ˜ãƒ«ãƒ—機能 + +オブジェクトã«ãƒ˜ãƒ«ãƒ—Tip を関連付ã‘る方法ã¯ä»–ã«ã‚‚ 2通りã‚りã¾ã™: + +- データベースストラクãƒãƒ£ãƒ¼ãƒ¬ãƒ™ãƒ«ã«ãŠã„ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (フィールドã®ã¿)。 ã“ã®å ´åˆã€å½“該フィールドãŒè¡¨ç¤ºã•れるã™ã¹ã¦ã®ãƒ•ォームã«ãŠã„ã¦ã€ã“ã®ãƒ˜ãƒ«ãƒ—Tip ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [フィールドプロパティ](https://doc.4d.com/4Dv18/4D/18/Field-properties.300-4575567.ja.html#3367486) ã®ãƒ˜ãƒ«ãƒ—Tip ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 +- **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-HELP-TIP.301-4505445.ja.html)** コマンドを使ã£ã¦ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセス内ã§å‹•çš„ã«è¨­å®šã—ã¾ã™ã€‚ + +åŒã˜ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦è¤‡æ•°ã® Tip ãŒé–¢é€£ã¥ã‘られã¦ã„ã‚‹å ´åˆã«ã¯ã€æ¬¡ã®å„ªå…ˆé †ä½ã«å¾“ã£ã¦è¡¨ç¤ºã•れã¾ã™: -#### Other help features +1. ストラクãƒãƒ£ãƒ¼ãƒ¬ãƒ™ãƒ« (最低優先度) +2. フォームエディターレベル +3. **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-HELP-TIP.301-4505445.ja.html)** コマンド (最高優先度) -You can also associate help messages with form objects in two other ways: -- at the level of the database structure (fields only). In this case, the help tip of the field is displayed in every form where it appears. For more information, refer to “Help Tips†in [Field properties](https://doc.4d.com/4Dv17R5/4D/17-R5/Field-properties.300-4163580.en.html). -- using the **[OBJECT SET HELP TIP](https://doc.4d.com/4Dv17R5/4D/17-R5/OBJECT-SET-HELP-TIP.301-4128221.en.html)** command, for the current process. +#### å‚ç…§ -When different tips are associated with the same object in several locations, the following priority order is applied: +[プレースホルダー](properties_Entry.md#プレースホルダー) -1. structure level (lowest priority) -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 -[プレースホルダー](properties_Entry.md#placeholder) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Hierarchy.md b/website/translated_docs/ja/FormObjects/properties_Hierarchy.md index b3dd5f0c03299b..4e2e868c3ab82e 100644 --- a/website/translated_docs/ja/FormObjects/properties_Hierarchy.md +++ b/website/translated_docs/ja/FormObjects/properties_Hierarchy.md @@ -1,27 +1,26 @@ --- id: propertiesHierarchy -title: Hierarchy +title: 階層 --- -* * * - +--- ## 階層リストボックス +`é…列型リストボックス` -`Array type list boxes` +ã“ã®ãƒ—ロパティを使用ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®éšŽå±¤è¡¨ç¤ºã‚’設定ã—ã¾ã™ã€‚ JSON フォームã«ãŠã„ã¦ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã® [*dataSource* プロパティã®å€¤ãŒé…列åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã‚‹ã¨ã](properties_Object.md#階層リストボックス) ã«éšŽå±¤åŒ–ã—ã¾ã™ã€‚ -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. +*階層リストボックス* プロパティãŒé¸æŠžã•れるã¨ã€è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã§ã‚ã‚‹ **Variable 1...10** ãŒåˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ã“れらã«ã¯éšŽå±¤ã®å„レベルã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹é…列を指定ã—ã¾ã™ã€‚ã“れ㌠*dataSource* ã®å€¤ã§ã‚ã‚‹é…列åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ãªã‚Šã¾ã™ã€‚ 入力欄ã«å€¤ãŒå…¥åŠ›ã•れるã¨ã€æ–°ã—ã„入力欄ãŒè¿½åŠ ã•れã¾ã™ã€‚ 10個ã¾ã§ã®å¤‰æ•°ã‚’指定ã§ãã¾ã™ã€‚ ã“れらã®å¤‰æ•°ã¯å…ˆé ­åˆ—ã«è¡¨ç¤ºã•れる階層ã®ãƒ¬ãƒ™ãƒ«ã‚’設定ã—ã¾ã™ã€‚ -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. +[階層リストボックス](listbox_overview.md#階層リストボックス) å‚ç…§ -See [Hierarchical list boxes](listbox_overview.md#hierarchical-list-boxes) -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------------ | ------------------------------------------------ | -| datasource | string array | Collection of array names defining the hierarchy | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ---------- | ----------------- | +| datasource | 文字列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | 階層を定義ã™ã‚‹é…列åã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | #### 対象オブジェクト -[リストボックス](listbox_overview.md) \ No newline at end of file +[リストボックス](listbox_overview.md) diff --git a/website/translated_docs/ja/FormObjects/properties_ListBox.md b/website/translated_docs/ja/FormObjects/properties_ListBox.md index 49de26e5b22e03..811edca55373a3 100644 --- a/website/translated_docs/ja/FormObjects/properties_ListBox.md +++ b/website/translated_docs/ja/FormObjects/properties_ListBox.md @@ -3,245 +3,247 @@ id: propertiesListBox title: リストボックス --- -* * * +--- +## 列 + +リストボックス列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------- | --------------- | --------------------- | +| columns | 列オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ | リストボックス列ã®ãƒ—ロパティを格ç´ã—ã¾ã™ã€‚ | + +列オブジェクトã«é–¢ã—ã¦ã‚µãƒãƒ¼ãƒˆã•れã¦ã„るプロパティã®ä¸€è¦§ã«ã¤ã„ã¦ã¯ [列特有ã®ãƒ—ロパティ](listbox_overview#列特有ã®ãƒ—ロパティ) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### 対象オブジェクト -## Columns +[リストボックス](listbox_overview.md) + +--- +## 詳細フォームå +`セレクション型リストボックス` -Collection of columns of the list box. +リストボックスã®å€‹ã€…ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’編集・表示ã™ã‚‹éš›ã«ä½¿ç”¨ã™ã‚‹ãƒ•ォームを指定ã—ã¾ã™ã€‚ + +指定ã•れãŸãƒ•ォームã¯ä»¥ä¸‹ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã§è¡¨ç¤ºã•れã¾ã™: + +* リストボックスã«é–¢é€£ä»˜ã‘られã¦ã„ã‚‹ `addSubrecord` (サブレコード追加)ã€ã¾ãŸã¯ `editSubrecord` (サブレコード編集) ã®æ¨™æº–アクションを使用ã—ãŸã¨ã ([標準アクションã®ä½¿ç”¨](https://doc.4d.com/4Dv18/4D/18/Using-standard-actions.300-4575640.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 +* [行をダブルクリック](#行をダブルクリック) プロパティãŒã€Œãƒ¬ã‚³ãƒ¼ãƒ‰ç·¨é›†ã€ã‹ã€Œãƒ¬ã‚³ãƒ¼ãƒ‰è¡¨ç¤ºã€ã«è¨­å®šã•れã¦ã„ã‚‹å ´åˆã«è¡Œã‚’ダブルクリックã—ãŸã¨ã。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------- | ---------------------------- | ------------------------------------------------ | -| columns | collection of column objects | Contains the properties for the list box columns | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| detailForm | string |
        • テーブルã¾ãŸã¯ãƒ—ロジェクトフォームã®åå‰ (文字列)
        • フォームを定義ã™ã‚‹ .json ファイルã¸ã® POSIX パス (文字列)
        • フォームを定義ã™ã‚‹ã‚ªãƒ–ジェクト | +#### 対象オブジェクト -For a list of properties supported by column objects, please refer to the [Column Specific Properties](listbox_overview#column-specific-properties) section. +[リストボックス](listbox_overview.md) + + + + + + +--- +## 行をダブルクリック +`セレクション型リストボックス` + +ユーザーãŒãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã‚’ダブルクリックã—ãŸéš›ã«å®Ÿè¡Œã•れるアクションを指定ã—ã¾ã™ã€‚ é¸æŠžå¯èƒ½ãªã‚ªãƒ—ションã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +* **何もã—ãªã„** (デフォルト): 行をダブルクリックã—ã¦ã‚‚自動アクションã¯ç™ºå‹•ã—ã¾ã›ã‚“。 +* **レコード編集**: 行をダブルクリックã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è¨­å®šã•れ㟠[詳細フォーム](#詳細フォームå) ã«å½“該レコードãŒè¡¨ç¤ºã•れã¾ã™ レコードã¯èª­ã¿æ›¸ãå¯èƒ½ãƒ¢ãƒ¼ãƒ‰ã§é–‹ã‹ã‚Œã‚‹ã®ã§ã€ç·¨é›†ãŒå¯èƒ½ã§ã™ã€‚ +* **レコード表示**: レコード編集ã¨åŒæ§˜ã®æŒ™å‹•ã‚’ã—ã¾ã™ãŒã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯èª­ã¿å–り専用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚ã€ç·¨é›†ã¯ã§ãã¾ã›ã‚“。 +> 空ã®è¡Œã¸ã®ãƒ€ãƒ–ルクリックã¯ç„¡è¦–ã•れã¾ã™ã€‚ + +é¸æŠžã•れã¦ã„るアクションã«é–¢ã‚らãšã€`On Double Clicked` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ + +「レコード編集ã€ã€Œãƒ¬ã‚³ãƒ¼ãƒ‰è¡¨ç¤ºã€ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«é–¢ã—ã¦ã¯ `On Open Detail` フォームイベントも生æˆã•れã¾ã™ã€‚ リストボックスã«é–¢é€£ä»˜ã‘られãŸè©³ç´°ãƒ•ォームã«è¡¨ç¤ºã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒé–‰ã˜ã‚‰ã‚Œã‚‹éš›ã«ã¯ `On Close Detail` フォームイベントãŒç”Ÿæˆã•れã¾ã™ (レコードãŒç·¨é›†ã•れãŸã‹ã©ã†ã‹ã¯å•ã„ã¾ã›ã‚“)。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------------------- | ------ | ----------------------------------- | +| doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | #### 対象オブジェクト [リストボックス](listbox_overview.md) -* * * -## 詳細フォームå -`Selection type list box` -Specifies the form to use for modifying or displaying individual records of the list box. +--- +## ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ + +`セレクション型リストボックス` + +ã“ã®ãƒ—ロパティを使用ã—ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã§ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’管ç†ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã™ã‚‹ã‚»ãƒƒãƒˆåを指定ã—ã¾ã™ (**é…列** ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ãŒæŒ‡å®šã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«å‰²ã‚Šå½“ã¦ãŸå¤‰æ•°ã¨åŒã˜åå‰ã®ãƒ–ールé…列をã“ã®ç”¨é€”ã§ä½¿ç”¨ã—ã¾ã™)。 + +4D 㯠*ListBoxSetN* (*N* 㯠0 ã‹ã‚‰å§‹ã¾ã‚Šã€ãƒ•ォーム上ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•°ã«å¾“ã„増分ã•れã¾ã™) ã¨ã„ã†åå‰ã®ãƒ‡ãƒ•ォルトセットを作æˆã—ã¾ã™ãŒã€ å¿…è¦ã«å¿œã˜ã¦ã“ã®åå‰ã‚’変更ã§ãã¾ã™ã€‚ セットã¯ãƒ­ãƒ¼ã‚«ãƒ«ã€ãƒ—ロセスãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセスセットを使用ã§ãã¾ã™ (ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒˆãƒ©ãƒ•ィックを制é™ã™ã‚‹ãŸã‚ã€*$LBSet* ã®ã‚ˆã†ãªãƒ­ãƒ¼ã‚«ãƒ«ã‚»ãƒƒãƒˆã®ä½¿ç”¨ã‚’推奨ã—ã¾ã™)。 指定ã•れãŸã‚»ãƒƒãƒˆã¯ 4D ãŒè‡ªå‹•ã§ç®¡ç†ã—ã¾ã™ã€‚ ユーザー㌠1ã¤ä»¥ä¸Šã®è¡Œã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚»ãƒƒãƒˆã¯å³åº§ã«æ›´æ–°ã•れã¾ã™ã€‚ プログラムを使用ã—ã¦è¡Œã‚’é¸æŠžã—ãŸã„å ´åˆã€"セット" テーマã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ã“ã®ã‚»ãƒƒãƒˆã«é©ç”¨ã§ãã¾ã™ã€‚ +> * リストボックス行ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¨ãƒ†ãƒ¼ãƒ–ルレコードã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¯å®Œå…¨ã«ç‹¬ç«‹ã—ã¦ã„ã¾ã™ã€‚ +> * "ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ" プロパティã«åå‰ãŒæŒ‡å®šã•れã¦ã„ãªã„å ´åˆã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã§è¡Œã‚’é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ------ | +| highlightSet | string | セットã®åç§° | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + +--- +## スクロールã—ãªã„列ã¨ãƒ‰ãƒ©ãƒƒã‚°ã—ãªã„列 + +リストボックスã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„列ã¨ãƒ‰ãƒ©ãƒƒã‚°ã—ãªã„列ã¯ãれãžã‚Œç‹¬ç«‹ã—ã¦å‹•作ã—ã¾ã™: + +* スクロールã—ãªã„列ã¯å¸¸ã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å·¦å´ã«è¡¨ç¤ºã•ã‚Œã€æ¨ªã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã•れã¾ã›ã‚“。 +* ドラッグã—ãªã„列ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ä¸­ã§ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã«ã‚ˆã‚‹åˆ—ã®ç§»å‹•ãŒã§ãã¾ã›ã‚“。 +> ã“れらã®ãƒ—ロパティã¯ãƒ—ログラミングã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚詳細㯠[4Dランゲージリファレンス](https://doc.4d.com/4Dv18/4D/18/4D-Language-Reference.100-4504285.ja.html) マニュアル㮠[リストボックス](https://doc.4d.com/4Dv18/4D/18/List-Box.201-4504332.ja.html) ã‚’å‚ç…§ãã ã•ã„。 + +ã“れらã®ãƒ—ロパティã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ç›¸äº’作用ã—ã¾ã™: + +* 列を "ドラッグã—ãªã„" ã®ã¿ã‚’設定ã—ãŸå ´åˆã€ãã®åˆ—ã¯ç§»å‹•ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +* 列を "スクロールã—ãªã„" ã®ã¿ã«è¨­å®šã—ãŸå ´åˆã€æ¨ªã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„エリア内ã«é™ã‚Šãƒ‰ãƒ©ãƒƒã‚°ã§åˆ—を移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„エリアを越ãˆã¦ç§»å‹•ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +![](assets/en/FormObjects/property_lockedStaticColumns1.png) + +* "スクロールã—ãªã„" 列㨠"ドラッグã—ãªã„" 列をåŒã˜æ•°ã«è¨­å®šã—ãŸå ´åˆã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„エリア内ã§ã¯ãƒ‰ãƒ©ãƒƒã‚°ã§ç§»å‹•ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 + +![](assets/en/FormObjects/property_lockedStaticColumns2.png) + +* å¿…è¦ã«å¿œã˜ã¦ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„列数ã¨ãƒ‰ãƒ©ãƒƒã‚°ã—ãªã„列数をãれãžã‚Œè¨­å®šã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„列を 3ã€ãƒ‰ãƒ©ãƒƒã‚°ã—ãªã„列を 1ã«è¨­å®šã—ãŸå ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ¨ªã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ãªã„エリア内ã§å³å´ 2ã¤ã®åˆ—を入れ替ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### スクロールã—ãªã„列数 + +ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ¨ªã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã—ã¦ã‚‚ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å·¦å´ã«å¸¸ã«è¡¨ç¤ºã•ã‚Œã‚‹åˆ—ã®æ•°ã‚’指定ã—ã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------------- | ------- | ------ | +| lockedColumnCount | integer | 最å°å€¤: 0 | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + -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". +実行時ã«ãƒ‰ãƒ©ãƒƒã‚°ã§ç§»å‹•ã§ããªã„åˆ—ã®æ•°ã‚’指定ã—ã¾ã™ã€‚ #### JSON 文法 -* Name (string) of table or project form - * POSIX path (string) to a .json file describing the form - * Object describing the form - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## 行をダブルクリック - - `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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------------------- | ------ | ----------------------------------- | - | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚»ãƒƒãƒˆ - - `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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------ | ------ | --------------- | - | highlightSet | string | Name of the set | - - - #### 対象オブジェクト - - [リストボックス](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 columns that must stay permanently displayed in the left part of the list box, even when the user scrolls through the columns horizontally. - - #### JSON 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----------------- | ------- | ------ | - | lockedColumnCount | integer | 最å°å€¤: 0 | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - ### ドラッグã—ãªã„列数 - - Number of columns that cannot be moved during execution. - - #### JSON 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----------------- | ------- | ------ | - | staticColumnCount | integer | 最å°å€¤: 0 | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## 列数 - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----------- | ------- | ------ | - | columnCount | integer | 最å°å€¤: 1 | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## 行コントロールé…列 - - `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 | çµæžœ | 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). ãŸã¨ãˆã°: - - ```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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------------- | ------ | ---------------------- | - | rowControlSource | string | Row control array name | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## é¸æŠžãƒ¢ãƒ¼ãƒ‰ - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------- | ------ | ---------------------------- | - | selectionMode | string | "multiple", "single", "none" | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------------- | ------- | ------ | +| staticColumnCount | integer | 最å°å€¤: 0 | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + + + + +--- +## 列数 + +リストボックスã«è¡¨ç¤ºã•ã‚Œã‚‹åˆ—ã®æ•°ã‚’指定ã—ã¾ã™ã€‚ +> [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-INSERT-COLUMN.301-4505224.ja.html) ã‚„ [LISTBOX DELETE COLUMN](https://doc.4d.com/4Dv18/4D/18/LISTBOX-DELETE-COLUMN.301-4505185.ja.html) ãªã©ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使ã†ã“ã¨ã§ã€ãƒ—ログラミングã«ã‚ˆã£ã¦åˆ—æ•°ã‚’å‹•çš„ã«å¤‰æ›´ (列ã®è¿½åŠ ãƒ»å‰Šé™¤) ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------- | ------ | +| columnCount | integer | 最å°å€¤: 1 | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + + +--- +## 行コントロールé…列 + +`é…列型リストボックス` + +リストボックス行ã®è¡¨ç¤ºã‚’管ç†ã™ã‚‹ãŸã‚ã® 4Dé…列ã§ã™ã€‚ + +é…列型リストボックスã®ä»»æ„行㮠"éžè¡¨ç¤º"ã€"無効化"ã€"é¸æŠžå¯èƒ½" プロパティを管ç†ã™ã‚‹ãŸã‚ã«ã€ã“ã®é…列を使用ã—ã¾ã™ã€‚ ã“ã®ãƒ—ロパティ㯠`LISTBOX SET ARRAY` コマンドを使用ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +行コントロールé…列ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã®è¦ç´ æ•°ã¨åŒã˜æ•°ã‚’å«ã‚“ã§ã„ã‚‹å€é•·æ•´æ•°åž‹ã®é…列ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 *行コントロールé…列* ã®å„è¦ç´ ã¯å¯¾å¿œã™ã‚‹è¡Œã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースステータスを定義ã—ã¾ã™ã€‚ "リストボックス" 定数テーマã®å®šæ•°ã‚’使ã£ã¦ã€3ã¤ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースプロパティãŒåˆ©ç”¨å¯èƒ½ã§ã™: + +| 定数 | 値 | 説明 | +| ------------------------ | - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| lk row is disabled | 2 | 対応ã™ã‚‹è¡Œã¯ç„¡åŠ¹åŒ–ã•れã¦ã„ã¾ã™ã€‚ テキストやã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãªã©ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«é¡žã¯æš—ããªã£ã¦ã„ã‚‹ã‹ã‚°ãƒ¬ãƒ¼ã‚¢ã‚¦ãƒˆã•れã¦ã„ã¾ã™ã€‚ 入力å¯èƒ½ãªãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ›ã‚¨ãƒªã‚¢ã¯å…¥åŠ›å¯èƒ½ã§ã¯ã‚りã¾ã›ã‚“。 デフォルト値: 有効化 | +| lk row is hidden | 1 | 対応ã™ã‚‹è¡Œã¯éžè¡¨ç¤ºã§ã™ã€‚ 行をéžè¡¨ç¤ºã«ã™ã‚‹ã“ã¨ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¦‹ãŸç›®ã«ã®ã¿å½±éŸ¿ã—ã¾ã™ã€‚ éžè¡¨ç¤ºã®è¡Œã¯é…列内ã«ã¯å­˜åœ¨ã—ã€ãƒ—ログラミングを通ã—ã¦ç®¡ç†å¯èƒ½ã§ã™ã€‚ ランゲージコマンド (具体的ã«ã¯ `LISTBOX Get number of rows` ã¾ãŸã¯ `LISTBOX GET CELL POSITION`) ã¯è¡Œã®è¡¨ç¤º/éžè¡¨ç¤ºã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’考慮ã—ã¾ã›ã‚“。 ãŸã¨ãˆã°ã€10行ã‚るリストボックスã®ã€æœ€åˆã® 9行ãŒéžè¡¨ç¤ºã«ãªã£ã¦ã„ãŸå ´åˆã€`LISTBOX Get number of rows` ã¯10ã‚’è¿”ã—ã¾ã™ã€‚ ユーザーã®è¦–点ã§ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã®éžè¡¨ç¤ºè¡Œã®å­˜åœ¨ã¯è¦–覚的ã«ã¯èªè­˜ã§ãã¾ã›ã‚“。 表示ã•れã„ã¦ã„る行ã®ã¿ãŒ (ãŸã¨ãˆã°ã€"ã™ã¹ã¦ã‚’é¸æŠž" コマンドãªã©ã§) é¸æŠžå¯èƒ½ã§ã™ã€‚ デフォルト値: 表示 | +| lk row is not selectable | 4 | 対応ã™ã‚‹è¡Œã¯é¸æŠžå¯èƒ½ã«ãªã£ã¦ã„ã¾ã›ã‚“ (ãƒã‚¤ãƒ©ã‚¤ãƒˆã§ãã¾ã›ã‚“)。 入力å¯èƒ½ãªãƒ†ã‚­ã‚¹ãƒˆå…¥åŠ›ã‚¨ãƒªã‚¢ã¯ [シングルクリック編集](properties_Entry.md#シングルクリック編集) ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйã«ãªã£ã¦ã„ãªã„é™ã‚Šå…¥åŠ›å¯èƒ½ã§ã¯ã‚りã¾ã›ã‚“。 ã—ã‹ã—ãªãŒã‚‰ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãªã©ã®ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã¨ãƒªã‚¹ãƒˆã¯æ©Ÿèƒ½ã—ã¦ã„ã¾ã™ã€‚ ã“ã®è¨­å®šã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžãƒ¢ãƒ¼ãƒ‰ãŒ "ãªã—" ã®å ´åˆã«ã¯ç„¡è¦–ã•れã¾ã™ã€‚ デフォルト値: é¸æŠžå¯èƒ½ | + +行ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’変ãˆã‚‹ãŸã‚ã«ã¯ã€å¯¾å¿œã™ã‚‹é…列ã®è¦ç´ ã«é©åˆ‡ãªå®šæ•°ã‚’設定ã™ã‚‹ã ã‘ã§ã™ã€‚ ãŸã¨ãˆã°ã€10è¡Œç›®ã‚’é¸æŠžä¸å¯èƒ½ã«è¨­å®šã—ãŸã„å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```4d + aLControlArr{10}:=lk row is not selectable +``` + +![](assets/en/FormObjects/listbox_styles5.png) + +複数ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ã‚§ãƒ¼ã‚¹ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’åŒæ™‚ã«å®šç¾©ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d + aLControlArr{8}:=lk row is not selectable + lk row is disabled +``` + +![](assets/en/FormObjects/listbox_styles6.png) + +è¦ç´ ã«å¯¾ã—ã¦ãƒ—ロパティを設定ã™ã‚‹ã¨ã€(å†è¨­å®šã—ãªã„é™ã‚Š) åŒè¦ç´ ã®ä»–ã®å€¤ã‚’上書ãã™ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ãŸã¨ãˆã°: + +```4d + aLControlArr{6}:=lk row is disabled + lk row is not selectable + // 6行目を無効化ã—ã€ã‹ã¤é¸æŠžä¸å¯ã«è¨­å®šã—ã¾ã™ + aLControlArr{6}:=lk row is disabled + // 6行目を無効化ã™ã‚‹ãŒã€é¸æŠžä¸å¯ã‚’å†è¨­å®šã—ã¦ã„ãªã„ã®ã§é¸æŠžãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ +``` + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------------- | ------ | ------------ | +| rowControlSource | string | 行コントロールé…列ã®åç§° | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + +--- +## é¸æŠžãƒ¢ãƒ¼ãƒ‰ + +リストボックス行ã®é¸æŠžãƒ¢ãƒ¼ãƒ‰ã‚’指定ã—ã¾ã™: +- **ãªã—**: è¡Œã‚’é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 [シングルクリック編集](properties_Entry.md#シングルクリック編集) オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã‚’除ãã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚’クリックã—ã¦ã‚‚効果ã¯ã‚りã¾ã›ã‚“。 ナビゲーションキーを使用ã—ã¦ã‚‚ã€ãƒªã‚¹ãƒˆã‚’スクロールã™ã‚‹ã ã‘ã¨ãªã‚Šã€ãã®éš›ã« `On Selection Change` フォームイベントã¯ç”Ÿæˆã•れã¾ã›ã‚“。 +- **å˜ä¸€**: 一度ã«ä¸€è¡Œã®ã¿é¸æŠžã§ãã¾ã™ã€‚ クリックã™ã‚‹ã“ã¨ã§ã€è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ **Ctrl+クリック** (Windows) ã‚„ **Command+クリック** (macOS) を使ã†ã¨ã€å¯¾è±¡è¡Œã®é¸æŠžçŠ¶æ…‹ (é¸æŠžãƒ»éžé¸æŠž) ãŒåˆ‡ã‚Šæ›¿ã‚りã¾ã™ã€‚ + 上下キーを使ã†ã¨ãƒªã‚¹ãƒˆã®å‰å¾Œã®è¡ŒãŒé¸æŠžã•れã¾ã™ã€‚ ãã®ä»–ã®ãƒŠãƒ“ゲーションキーã¯ãƒªã‚¹ãƒˆã‚’スクロールã—ã¾ã™ã€‚ カレントã®è¡ŒãŒå¤‰æ›´ã•れるãŸã³ã«ã€`On Selection Change` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ +- **複数**: 標準ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’使用ã—ã¦è¤‡æ•°è¡Œã‚’åŒæ™‚ã«é¸æŠžã§ãã¾ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------- | ------ | ---------------------------- | +| selectionMode | string | "multiple", "single", "none" | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Object.md b/website/translated_docs/ja/FormObjects/properties_Object.md index 90bdd618aaf218..53941fe01d7d43 100644 --- a/website/translated_docs/ja/FormObjects/properties_Object.md +++ b/website/translated_docs/ja/FormObjects/properties_Object.md @@ -1,107 +1,117 @@ --- id: propertiesObject -title: Objects +title: オブジェクト --- -* * * +--- +## タイプ -## åž‹ + `必須設定ã§ã™ã€‚` -`MANDATORY SETTING` +ã“ã®ãƒ—ロパティ㯠[アクティブã¾ãŸã¯ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãªãƒ•ォームオブジェクト](formObjects_overview.md) ã®ã‚¿ã‚¤ãƒ—を指定ã—ã¾ã™ã€‚ -This property designates the type of the [active or inactive form object](formObjects_overview.md). #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 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" | #### 対象オブジェクト -[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 エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * +--- ## オブジェクトå -Each active form object is associated with an object name. Each object name must be unique. +å„アクティブフォームオブジェクトã«ã¯ã‚ªãƒ–ジェクトåãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ å„オブジェクトåã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +> オブジェクトåã®ã‚µã‚¤ã‚ºä¸Šé™ã¯ 255ãƒã‚¤ãƒˆã§ã™ã€‚ -> Object names are limited to a size of 255 bytes. +4Dランゲージを使用ã™ã‚‹éš›ã€ã‚ªãƒ–ジェクトåを使用ã—ã¦ã‚¢ã‚¯ãƒ†ã‚£ãƒ–フォームオブジェクトをå‚ç…§ã§ãã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ 4Dランゲージリファレンス㮠[オブジェクトプロパティ](https://doc.4d.com/4Dv18/4D/18/Object-Properties.300-4505419.ja.html) ã‚’å‚ç…§ãã ã•ã„)。 -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 文法 +フォームオブジェクトã®å‘½åè¦å‰‡ã«ã¤ã„ã¦ã¯ [識別å­](Concepts/identifiers.md) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---- | ------ | -------------------------------------------------------------------- | -| name | string | Any allowed name which does not belong to an already existing object | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---- | ------ | ------------------------------- | +| name | string | 既存オブジェクトã«ã‚ˆã£ã¦ä½¿ç”¨ã•れã¦ã„ãªã„ã€å‘½åè¦å‰‡ã«æ²¿ã£ãŸåç§° | #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [ラジオボタン](radio_overview.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) -* * * +--- ## 値を記憶 -This property is available when the [Save Geometry](FormEditor/properties_FormProperties.md#save-geometry) option is checked for the form. +ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ•ォーム㮠[é…置を記憶](FormEditor/properties_FormProperties.md#é…置を記憶) プロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ -This feature is only supported for objects that contribute to the overall geometry of the form. For example, this option is available for check boxes because their value can be used to hide or display additional areas in the window. +ã“ã®æ©Ÿèƒ½ã¯ã€ãƒ•ォームã®å…¨ä½“çš„ãªé…ç½®ã«é–¢ä¿‚ã™ã‚‹ã‚ªãƒ–ジェクトã«å¯¾ã—ã¦ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã¯ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã®è¿½åŠ ã‚¨ãƒªã‚¢ã‚’è¡¨ç¤º/éžè¡¨ç¤ºã™ã‚‹ã®ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ãŸã‚ã€ã“ã®ã‚ªãƒ—ションãŒå­˜åœ¨ã—ã¾ã™ã€‚ -Here is the list of objects whose value can be saved: +「値ã€ã‚’ä¿å­˜ã§ãるオブジェクトã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: -| オブジェクト | Saved value | -| -------------------------------------- | -------------------------------------------------------------------------------------- | -| [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) | Value of associated variable (0, 1, 2) | -| [ドロップダウンリスト](dropdownList_Overview.md) | Number of selected row | -| [Radio Button](radio_overview.md) | Value of associated variable (1, 0, True or False for buttons according to their type) | -| [Tab control](tabControl.md) | Number of selected tab | +| オブジェクト | ä¿å­˜ã•れる値 | +| -------------------------------------- | -------------------------------------------- | +| [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) | 関連付ã‘られãŸå¤‰æ•°ã®å€¤ (0, 1, 2) | +| [ドロップダウンリスト](dropdownList_Overview.md) | é¸æŠžã•れã¦ã„ã‚‹é …ç›®ã®ç•ªå· | +| [ラジオボタン](radio_overview.md) | 関連付ã‘られãŸå¤‰æ•°ã®å€¤ (1ã€0ã€ãƒœã‚¿ãƒ³ã«ãŠã„ã¦ã¯ true/false ãªã©åž‹ã«ã‚ˆã‚‹) | +| [タブコントロール](tabControl.md) | é¸æŠžã•れã¦ã„るタブã®ç•ªå· | #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------- | ----------- | | memorizeValue | boolean | true, false | - #### 対象オブジェクト -[Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Radio Button](radio_overview.md) - [Tab control](tabControl.md) +[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [ラジオボタン](radio_overview.md) - [タブコントロール](tabControl.md) -* * * + +--- ## 変数ã‚ã‚‹ã„ã¯å¼ -> See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. +> セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã«é–¢ã—ã¦ã¯ **[å¼](properties_DataSource.md#å¼)** ã®ç« ã‚‚å‚ç…§ãã ã•ã„。 + -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. +ã“ã®ãƒ—ロパティã¯ã€ãƒ‡ãƒ¼ã‚¿ã®ã‚½ãƒ¼ã‚¹ã‚’指定ã—ã¾ã™ã€‚ å„アクティブフォームオブジェクトã«ã¯ã‚ªãƒ–ジェクトåã¨å¤‰æ•°åãŒé–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ 変数åã¨ã‚ªãƒ–ジェクトåã¯é•ã£ã¦ã„ã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。 åŒã˜ãƒ•ォーム内ã§è¤‡æ•°ã®ã‚¢ã‚¯ãƒ†ã‚£ãƒ–オブジェクトã«åŒã˜å¤‰æ•°åを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€[オブジェクトå](#オブジェクトå) ã¯ãれãžã‚Œãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +> 変数åã®ä¸Šé™ã¯ 31ãƒã‚¤ãƒˆã§ã™ã€‚ 命åè¦å‰‡ã«ã¤ã„ã¦ã¯ [識別å­](Concepts/identifiers.md) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -> Variable name size is limited to 31 bytes. See [Identifiers](Concepts/identifiers.md) section for more information about naming rules. +フォームオブジェクト変数を使ã£ã¦ã€ã‚ªãƒ–ジェクトを監視・コントロールã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒœã‚¿ãƒ³ãŒã‚¯ãƒªãƒƒã‚¯ã•れるã¨ã€ãã®å¤‰æ•°ã®å€¤ã¯ 1 ã«è¨­å®šã•れã¾ã™ã€‚ãれ以外ã®å ´åˆã¯ 0 ã§ã™ã€‚ 進æ—インジケーターã«é–¢é€£ã¥ã‘られãŸå¼ã¯ã€ç¾è¨­å®šã®å–得・変更をå¯èƒ½ã«ã—ã¾ã™ã€‚ + +代入å¯ãƒ»ä»£å…¥ä¸å¯ã®å¤‰æ•°ãŠã‚ˆã³å¼ãŒä½¿ç”¨ã§ãã€å–å¾—ã§ãるデータ型ã¯ãƒ†ã‚­ã‚¹ãƒˆã€æ•´æ•°ã€æ•°å€¤ã€æ—¥ä»˜ã€æ™‚é–“ã€ãƒ”クãƒãƒ£ãƒ¼ã€ãƒ–ールã€ãã—ã¦ã‚ªãƒ–ジェクトã§ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| dataSource | 文字列ã€ã¾ãŸã¯æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ |
        • 4D変数ã€ãƒ•ィールドåã€ã‚ã‚‹ã„ã¯ä»»æ„ã®å¼
        • [ダイナミック変数](#ダイナミック変数) ã®å ´åˆã¯ã€ç©ºã®æ–‡å­—列
        • [階層リストボックス](listbox_overview.md#階層リストボックス) 列ã®å ´åˆã«ã€æ–‡å­—列 (é…列å) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ | -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. -Variables or expressions can be enterable or non-enterable and can receive data of the Text, Integer, Numeric, Date, Time, Picture, Boolean, or Object type. ### å¼ -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). +オブジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹ã¨ã—ã¦ã€[å¼](Concepts/quick-tour.md#å¼) を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 有効㪠4Då¼ã§ã‚れã°ä½•ã§ã‚‚å—ã‘入れられã¾ã™ã€‚シンプルãªå¼ã€ã‚ªãƒ–ジェクトプロパティã€ãƒ•ォーミュラã€4D関数ã€ãƒ—ロジェクトメソッドåã€æ¨™æº–ã® `[Table]Field` シンタックスを使用ã—ãŸãƒ•ィールドåを使用ã§ãã¾ã™ã€‚ å¼ã¯ãƒ•ォームãŒå®Ÿè¡Œã•れãŸã¨ãã«è©•価ã•れã€ãƒ•ォームイベント毎ã«å†è©•価ã•れã¾ã™ã€‚ å¼ã«ã¯ã€[代入å¯ãŠã‚ˆã³ä»£å…¥ä¸å¯ã®å¼](Concepts/quick-tour.md#å¼) ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ +> 入力ã•れãŸå¼ãŒã€å¤‰æ•°åã¨ãƒ¡ã‚½ãƒƒãƒ‰åã®ä¸¡æ–¹ã§ä½¿ç”¨ã•れã¦ã„ã‚‹å ´åˆã€4Dã¯ãƒ¡ã‚½ãƒƒãƒ‰åãŒæŒ‡å®šã•れãŸã‚‚ã®ã¨åˆ¤æ–­ã—ã¾ã™ã€‚ -> 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. +### ダイナミック変数 -When a variable is not named, when the form is loaded, 4D creates a new variable for the object, with a calculated name that is unique in the space of the process variables of the interpreter (which means that this mechanism can be used even in compiled mode). This temporary variable will be destroyed when the form is closed. In order for this principle to work in compiled mode, it is imperative that dynamic variables are explicitly typed. There are two ways to do this: +ボタンã€å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ç­‰ã®ãƒ•ォームオブジェクトã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹å¤‰æ•°ã‚’ã€å¿…è¦ã«å¿œã˜ã¦å‹•çš„ã«ã€4Dã«ä½œæˆã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れをãŠã“ãªã†ã«ã¯ã€"変ã‚ã‚‹ã„ã¯å¼" プロパティを空ã«ã—ã¾ã™ (ã‚ã‚‹ã„㯠JSON ã® `dataSource` フィールド): -- You can set the type using the [Expression type](#expression-type) property. -- You can use a specific initialization code when the form is loaded that uses, for example, the `VARIABLE TO VARIABLE` command: +変数åãŒä¸Žãˆã‚‰ã‚Œã¦ã„ãªã„å ´åˆã€4D ã¯ãƒ•ォームãŒãƒ­ãƒ¼ãƒ‰ã•れãŸã¨ãã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターã®ãƒ—ロセス変数ã®ç©ºé–“内ã§ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªåå‰ã‚’計算ã—ã€ãã®åå‰ã§ã‚ªãƒ–ジェクト用ã®å¤‰æ•°ã‚’æ–°è¦ä½œæˆã—ã¾ã™ (ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã‚³ãƒ³ãƒ‘イルモードã§ã‚‚使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™)。 ã“ã®ä¸€æ™‚çš„ãªå¤‰æ•°ã¯ãƒ•ォームãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ãã«ç ´æ£„ã•れã¾ã™ã€‚ ã“ã®æ–¹å¼ã‚’コンパイルモードã§å‹•作ã•ã›ã‚‹ãŸã‚ã«ã¯ã€ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯å¤‰æ•°ã®åž‹ã‚’æ˜Žç¤ºçš„ã«æŒ‡å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“れをãŠã“ãªã†ã«ã¯ 2ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- プロパティリスト㮠[å¼ã‚¿ã‚¤ãƒ—](#å¼ã®åž‹-å¼ã‚¿ã‚¤ãƒ—) を使用ã—ã¦åž‹ã‚’指定ã™ã‚‹ã€‚ +- ãŸã¨ãˆã° `VARIABLE TO VARIABLE` コマンドを使用ã™ã‚‹ã€å°‚用ã®åˆæœŸåŒ–コードをフォームロード時ã«å®Ÿè¡Œã™ã‚‹ã€‚ ```4d If(Form event=On Load) @@ -112,218 +122,267 @@ 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. ãŸã¨ãˆã°: +4Dコード中ã§ã¯ã€ `OBJECT Get pointer` コマンドã§å–å¾—ã§ãã‚‹ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’介ã—ã¦ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯å¤‰æ•°ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°: ```4d - // assign the time 12:00:00 to the variable for the "tstart" object + // "tstart" オブジェクトã®å¤‰æ•°ã«æ™‚刻 12:00:00 を代入ã—ã¾ã™ $p :=OBJECT Get pointer(Object named;"tstart") $p->:=?12:00:00? ``` -There are two advantages with this mechanism: +ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使用ã™ã‚‹åˆ©ç‚¹ã¯ 2ã¤ã‚りã¾ã™: + +- ã²ã¨ã¤ã®ãƒ›ã‚¹ãƒˆãƒ•ォーム上ã§è¤‡æ•°å€‹é…ç½®ã™ã‚‹ã“ã¨ã®å¯èƒ½ãª "サブフォーム" タイプã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆé–‹ç™ºã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€é–‹å§‹æ—¥ã¨çµ‚了日を設定ã™ã‚‹ 2ã¤ã®æ—¥ä»˜ãƒ”ッカーサブフォームをホストフォーム上ã«é…ç½®ã™ã‚‹ã‚±ãƒ¼ã‚¹ã‚’考ãˆã¦ã¿ã¾ã—ょã†ã€‚ ã“ã®ã‚µãƒ–フォームã§ã¯ã€æ—¥ä»˜ã‚’é¸æŠžã™ã‚‹ãŸã‚ã®ã‚ªãƒ–ジェクトãŒä½¿ç”¨ã•れã¾ã™ã€‚ é–‹å§‹æ—¥ã¨çµ‚了日をãれãžã‚Œé¸æŠžã§ãるよã†ã€ã“れらオブジェクトã«ã¯ãれãžã‚Œåˆ¥ã®å¤‰æ•°ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 4Dã«ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯å¤‰æ•°ã‚’生æˆã•ã›ã‚‹ã“ã¨ã§ãƒ¦ãƒ‹ãƒ¼ã‚¯ãªå¤‰æ•°ã‚’å¾—ã‚‹ã“ã¨ãŒã§ãã€ã“ã®å•題を解決ã§ãã¾ã™ã€‚ +- ã¾ãŸã€ãƒ¡ãƒ¢ãƒªã®åˆ©ç”¨ã‚’減少ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ フォームオブジェクトã§ã¯ã€ãƒ—ロセス変数ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“。 ã—ã‹ã—コンパイルモードã§ã¯ã€å„プロセス変数ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ãŒ (サーãƒãƒ¼ãƒ—ロセスをå«ã‚) ã™ã¹ã¦ã®ãƒ—ロセスã«å¯¾ã—ã¦ä½œæˆã•れã¾ã™ã€‚ ã“ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸­ã«ãƒ•ォームãŒä½¿ç”¨ã•れãªã„å ´åˆã§ã‚‚メモリを消費ã—ã¾ã™ã€‚ フォームã®ãƒ­ãƒ¼ãƒ‰æ™‚ã€4Dã«ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯å¤‰æ•°ã‚’作æˆã•ã›ã‚‹ã“ã¨ã§ã€ãƒ¡ãƒ¢ãƒªã‚’節約ã§ãã¾ã™ã€‚ + + +### é…列リストボックス + +é…列型リストボックスã®å ´åˆã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ãŠã‚ˆã³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å„列㮠**変数ã‚ã‚‹ã„ã¯å¼** プロパティã«ã¯ã€ãれãžã‚Œã«é–¢é€£ä»˜ã‘ã‚‹é…列変数ã®åå‰ã‚’指定ã—ã¾ã™ã€‚ ãŸã ã—ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® JSON定義ã«ãŠã„ã¦ã¯ã€åˆ—ã® *dataSource* 値ã¨ã—ã¦ã€é…列å (文字列) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’指定ã™ã‚‹ã¨ [階層リストボックス](listbox_overview.md#階層リストボックス) ãŒå®šç¾©ã•れã¾ã™ã€‚ + + + + +#### 対象オブジェクト + +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [ステッパー](stepper.md) - [タブコントロール](tabControl.md) - [サブフォーム](subform_overview.md) - [ラジオボタン](radio_overview.md) - [Web エリア](webArea_overview.md) + + + + + + + + + + + +--- +## å¼ã®åž‹/å¼ã‚¿ã‚¤ãƒ— + +> [セレクション型](listbox_overview.md#セレクションリストボックス) ãŠã‚ˆã³ [コレクション型](listbox_overview.md#コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã‚„ã€[オブジェクト](FormObjects/dropdownList_Overview.md#オブジェクトã®ä½¿ç”¨) ã‚„ [é…列](FormObjects/dropdownList_Overview.md#é…列ã®ä½¿ç”¨) ã«é–¢é€£ä»˜ã‘られãŸ[ドロップダウンリスト](dropdownList_Overview.md) ã®ãƒ—ロパティリストã§ã¯ã€ã“ã®ãƒ—ロパティã¯ã€[**データタイプ**](properties_DataSource.md#データタイプ-å¼ã®åž‹) ã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ã€‚ + + +オブジェクトã«é–¢é€£ä»˜ã‘られãŸå¼ã¾ãŸã¯å¤‰æ•°ã®ãƒ‡ãƒ¼ã‚¿åž‹ã‚’指定ã—ã¾ã™ã€‚ ã“ã®è¨­å®šã®ä¸»ãªç›®çš„ã¯ã€ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãƒªã‚¹ãƒˆå†…ã§æä¾›ã•れるテーマã¨ã‚ªãƒ—ションãŒã€ãƒ‡ãƒ¼ã‚¿ã®åž‹ã¨å¯¾å¿œã™ã‚‹ã‚ˆã†ã«ã™ã‚‹ãŸã‚ã§ã™ã€‚ ã¤ã¾ã‚Šã€å®Ÿéš›ã«å¤‰æ•°ã®åž‹ãã®ã‚‚ã®ã‚’決ã‚ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 プロジェクトをコンパイルã™ã‚‹ã«ã¯ã€[変数を宣言](Concepts/variables.md#変数ã®å®£è¨€) ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ãŸã ã—ã€æ¬¡ã®ç‰¹å®šã®å ´åˆã«ã¯ã€ã“ã®ãƒ—ロパティã¯åž‹å®£è¨€ã®æ©Ÿèƒ½ã‚’æŒã¡ãˆã¾ã™: + +- **[ダイナミック変数](#ダイナミック変数)**: ã“ã®ãƒ—ロパティを使ã£ã¦ã€ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯å¤‰æ•°ã®åž‹ã‚’宣言ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **[リストボックス列](listbox_overview.md#リストボックス列)**: ã“ã®ãƒ—ロパティã¯åˆ—データã«è¡¨ç¤ºãƒ•ォーマットを関連ã¥ã‘ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ æä¾›ã•れるフォーマットã¯å¤‰æ•°åž‹ (é…列型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) ã¾ãŸã¯ãƒ‡ãƒ¼ã‚¿/フィールド型 (セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹) ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ 使用ã§ãる標準㮠4D フォーマットã¯ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€æ•´æ•°ã€æ—¥ä»˜ã€æ™‚é–“ã€ãƒ”クãƒãƒ£ãƒ¼ã€ãã—ã¦ãƒ–ールã§ã™ã€‚ テキストã®å ´åˆã¯å°‚用ã®è¡¨ç¤ºãƒ•ォーマットãŒã‚りã¾ã›ã‚“。 標準フォーマットã®ã»ã‹ã«ã€å®šç¾©ã—ãŸã‚«ã‚¹ã‚¿ãƒ ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚‚é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **[ピクãƒãƒ£ãƒ¼å¤‰æ•°](input_overview.md)**: ã“ã®ãƒ—ロパティを使ã†ã¨ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタモードã«ãŠã„ã¦ãƒ•ォームロードå‰ã«å¤‰æ•°ã‚’宣言ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ フォーム上ã®ãƒ”クãƒãƒ£ãƒ¼å¤‰æ•°ã«ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã™ã‚‹éš›ã«ã¯ç‰¹åˆ¥ãªãƒ¡ã‚«ãƒ‹ã‚ºãƒ ãŒä½¿ç”¨ã•れã¾ã™ã€‚ ãã®ãŸã‚ã€ä»–ã®åž‹ã®å¤‰æ•°ã¨ã¯é•ã£ã¦ã€ãƒ”クãƒãƒ£ãƒ¼å¤‰æ•°ã®å®£è¨€ã¯ã€ãƒ•ã‚©ãƒ¼ãƒ ãƒ­ãƒ¼ãƒ‰å‰ (`On Load` フォームイベントよりも先) ã«ãŠã“ãªã†å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ãŸã‚ã€ãƒ•ォームを呼ã³å‡ºã™å‰ (ãŸã¨ãˆã° `DIALOG` コマンドを呼ã³å‡ºã™å‰) ã«`C_PICTURE(varName)` を実行ã™ã‚‹ã‹ã€ã‚らã‹ã˜ã‚プロパティリストã®å¼ã®åž‹ã«ãƒ”クãƒãƒ£ãƒ¼ã‚’é¸æŠžã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ã„ãšã‚Œã‹ã‚’ãŠã“ãªã‚ãªã„å ´åˆã€ãƒ”クãƒãƒ£ãƒ¼å¤‰æ•°ã¯ãƒ”クãƒãƒ£ãƒ¼ã‚’æ­£ã—ã表示ã§ãã¾ã›ã‚“ (インタープリターモードã®ã¿)。 + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSourceTypeHint | string |
        • **標準ã®ã‚ªãƒ–ジェクト:** "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "collection", "object", "undefined"
        • **リストボックス列:** "boolean", "number", "picture", "text", date", "time") *é…列/セレクションリストボックスã®ã¿*: "integer", "object" | + +#### 対象オブジェクト + +[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [入力](input_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [スピナー](spinner.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) + + +--- +## CSSクラス + +[cssファイル](FormEditor/createStylesheet.md#スタイルシートファイル) ã«ã¦ã‚¯ãƒ©ã‚¹ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã¨ã—ã¦ä½¿ç”¨ã•れるã€(複数ã®å ´åˆã¯åŠè§’スペース区切りã®) クラスåã®ãƒªã‚¹ãƒˆã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----- | ------ | --------------------------- | +| class | string | (複数ã®å ´åˆã¯åŠè§’スペース区切りã®) クラスåã®æ–‡å­—列 | + + +#### 対象オブジェクト + +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [リストボックス](listbox_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [ラジオボタン](radio_overview.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [サブフォーム](subform_overview.md) - [テキストエリア](text.md) - [Web エリア](webArea_overview.md) + + + +--- +## コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + +コレクションè¦ç´ ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’使用ã—ã¦ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã®ä¸­èº«ã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +コレクションã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã™å¼ã‚’入力ã—ã¾ã™ã€‚ 一般的ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ã¦ã„る変数åã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã€ã‚ã‚‹ã„ã¯ãƒ—ロパティを入力ã—ã¾ã™ã€‚ + +コレクションãŠã‚ˆã³ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒ•ォームロード時ã«ãƒ•ォームã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 コレクションã®å„è¦ç´ ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„エンティティã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã¸ã¨å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã€[This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.ja.html) コマンドを通ã—ã¦ã‚ªãƒ–ジェクトã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™: + +* オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹å¼å†…ã§ **This** コマンドを呼ã³å‡ºã™ã“ã¨ã§ã€å„プロパティ値ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚例: **This.\**。 +* エンティティセレクションを使用ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹å¼å†…ã§ **This** コマンドを呼ã³å‡ºã™ã“ã¨ã§ã€å„属性値ã¸ã¨ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚例: **This.\**。 +> (オブジェクトã§ãªã„) スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚½ãƒ¼ã‚¹å¼å†…ã§ **This.value** を呼ã³å‡ºã™ã“ã¨ã§å„値ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ãŸã ã—ã€ã“ã®å ´åˆã¯å€¤ã‚’編集ã—ãŸã‚Šã€"カレントã®é …ç›®" オブジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (以下å‚ç…§)。
          注: エンティティセレクションã«ã¤ã„ã¦ã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[ORDA](https://doc.4d.com/4Dv18/4D/18/ORDA.200-4575453.ja.html) ã®ç« ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | -------------------------- | +| dataSource | string | コレクションã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã™å¼ | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + + + + +--- +## データソース + +リストボックスã®ç¨®é¡žã‚’指定ã—ã¾ã™ã€‚ -- 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. +![](assets/en/FormObjects/listbox_dataSource.png) -### 階層リストボックス +- **é…列** (デフォルト): リストボックスã®å„行㫠é…列è¦ç´ ã‚’割り当ã¦ã¾ã™ã€‚ +- **カレントセレクション**: 指定ã—ãŸãƒ†ãƒ¼ãƒ–ルã®ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„レコードã”ã¨ã«å¼ã€ãƒ•ィールドã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒè©•価ã•れã¾ã™ã€‚ +- **命åセレクション**: 指定ã—ãŸå‘½åセレクションã«å«ã¾ã‚Œã‚‹å„レコードã”ã¨ã«å¼ã€ãƒ•ィールドã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒè©•価ã•れã¾ã™ã€‚ +- **コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³**: コレクションè¦ç´ ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’使用ã—ã¦ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œã®ä¸­èº«ã‚’定義ã—ã¾ã™ã€‚ ã“ã®å ´åˆ [コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](properties_Object.md#コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) プロパティを定義ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------- | ------ | ----------------------------------------------------------- | +| listboxType | string | "array", "currentSelection", "namedSelection", "collection" | + +#### 対象オブジェクト + +[リストボックス](listbox_overview.md) + + + + + + +--- +## プラグインã®ç¨®é¡ž + +オブジェクトã«é–¢é€£ä»˜ã‘ã‚‹ [ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ãŒæä¾›ã™ã‚‹å¤–部エリア](pluginArea_overview.md) ã®å称。 ã“ã“ã§æŒ‡å®šã™ã‚‹åç§°ã¯ã€ãƒ—ラグイン㮠manifest.json ファイルã«ã¦å…¬é–‹ã•れã¦ã„ã¾ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ------------------------------------------------------------- | +| pluginAreaKind | string | ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ãŒæä¾›ã™ã‚‹å¤–部エリアã®ã€% 文字ã§å§‹ã¾ã‚‹åç§° (プロパティリストã®å€™è£œè¡¨ç¤ºã§ã¯ã€ã“ã® % 文字ã¯è¡¨ç¤ºã•れã¾ã›ã‚“) | + + +#### 対象オブジェクト +[プラグインエリア](pluginArea_overview.md) -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). + + +--- + +## ラジオグループ + +複数ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚’連動ã•ã›ã‚‹ãŸã‚ã®ãƒ—ロパティã§ã™ã€‚åŒã˜ãƒ©ã‚¸ã‚ªã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã—ã¦ã„る複数ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã€ä¸€åº¦ã«ãã®å†…ã®ä¸€ã¤ã®ã¿ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ #### JSON 文法 -- 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] - #### 対象オブジェクト - - [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 文法 - - - **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" - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----- | ------ | --------------------------------------------------------- | - | class | string | One string with CSS name(s) separated by space characters | - - - #### 対象オブジェクト - - [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) - - * * * - - ## コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------- | ------ | ------------------------------------------------------------ | - | dataSource | string | Expression that returns a collection or an entity selection. | - - - #### 対象オブジェクト - - [リストボックス](listbox_overview.md) - - * * * - - ## データソース - - 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ----------- | ------ | ----------------------------------------------------------- | - | listboxType | string | "array", "currentSelection", "namedSelection", "collection" | - - - #### 対象オブジェクト - - [リストボックス](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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | -------------- | ------ | ------------------------------------------------------------- | - | pluginAreaKind | string | Name of the plug-in external area (starts with a % character) | - - - #### 対象オブジェクト - - [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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---------- | ------ | ---------------- | - | radioGroup | string | Radio group name | - - - #### 対象オブジェクト - - [Radio Button](radio_overview.md) - - * * * - - ## タイトル - - オブジェクトã«ãƒ©ãƒ™ãƒ«ã‚’追加ã—ã¾ã™ã€‚ ã“ã®ãƒ©ãƒ™ãƒ«ã®ãƒ•ォントã¨ã‚¹ã‚¿ã‚¤ãƒ«ã¯æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - - \文字 (ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¾ãŸã¯å††ãƒžãƒ¼ã‚¯) を使用ã™ã‚‹ã¨ã€ãƒ©ãƒ™ãƒ«å†…ã§å¼·åˆ¶çš„ã«æ”¹è¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - - ![](assets/en/FormObjects/property_title.png) - - ラベル㫠\ を表示ã—ãŸã„å ´åˆã¯ \\ ã¨å…¥åŠ›ã—ã¾ã™ã€‚ - - デフォルトã§ãƒ©ãƒ™ãƒ«ã¯ã‚ªãƒ–ジェクトã®ä¸­å¤®ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ã¾ãŸã‚ªãƒ–ジェクトã«ã‚¢ã‚¤ã‚³ãƒ³ã‚‚å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€[タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトルピクãƒãƒ£ãƒ¼ä½ç½®) プロパティを用ã„ã¦ã€ã“れら2 ã¤ã®è¦ç´ ã®ç›¸å¯¾ä½ç½®ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - - インターフェースã®ç¿»è¨³ã®ç›®çš„ã§ã€XLIFF å‚照をボタンã®ã‚¿ã‚¤ãƒˆãƒ«ã‚¨ãƒªã‚¢ã«å…¥åŠ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([付録 B: XLIFFアーキテクãƒãƒ£ãƒ¼](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) å‚ç…§)。 - - #### JSON 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ---- | ------ | --------- | - | テキスト | string | ãªã‚“らã‹ã®ãƒ†ã‚­ã‚¹ãƒˆ | - - - #### 対象オブジェクト - - [ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](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 | テキスト | 日付 | 時間 | Bool | Pict | footer var type | - | --------------------- | --- | ---- | -- | -- | ---- | ---- | ------------------- | - | Minimum | â—‹ | | â—‹ | â—‹ | â—‹ | | Same as column type | - | Maximum | â—‹ | | â—‹ | â—‹ | â—‹ | | Same as column type | - | Sum | â—‹ | | â—‹ | | â—‹ | | Same as column type | - | Count | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | å€é•·æ•´æ•° | - | Average | â—‹ | | | â—‹ | | | 実数 | - | Standard deviation(*) | â—‹ | | | â—‹ | | | 実数 | - | Variance(*) | â—‹ | | | â—‹ | | | 実数 | - | Sum squares(*) | â—‹ | | | â—‹ | | | 実数 | - | Custom ("none") | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | 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 文法 - - | å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | - | ------------------- | ------ | ----------------------------------------------------------------------------------------------------- | - | variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | - - - #### 対象オブジェクト - - [List Box Footer](listbox_overview.md#list-box-footers) \ No newline at end of file +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | -------- | +| radioGroup | string | ラジオグループå | + + +#### 対象オブジェクト + +[ラジオボタン](radio_overview.md) + + + +--- + +## タイトル + +オブジェクトã«ãƒ©ãƒ™ãƒ«ã‚’追加ã—ã¾ã™ã€‚ ã“ã®ãƒ©ãƒ™ãƒ«ã®ãƒ•ォントã¨ã‚¹ã‚¿ã‚¤ãƒ«ã¯æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +\文字 (ãƒãƒƒã‚¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ã¾ãŸã¯å††ãƒžãƒ¼ã‚¯) を使用ã™ã‚‹ã¨ã€ãƒ©ãƒ™ãƒ«å†…ã§å¼·åˆ¶çš„ã«æ”¹è¡Œã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/FormObjects/property_title.png) + +ラベル㫠\ を表示ã—ãŸã„å ´åˆã¯ \\ ã¨å…¥åŠ›ã—ã¾ã™ã€‚ + +デフォルトã§ãƒ©ãƒ™ãƒ«ã¯ã‚ªãƒ–ジェクトã®ä¸­å¤®ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ã¾ãŸã‚ªãƒ–ジェクトã«ã‚¢ã‚¤ã‚³ãƒ³ã‚‚å«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€[タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトルピクãƒãƒ£ãƒ¼ä½ç½®) プロパティを用ã„ã¦ã€ã“れら2 ã¤ã®è¦ç´ ã®ç›¸å¯¾ä½ç½®ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +インターフェースã®ç¿»è¨³ã®ç›®çš„ã§ã€XLIFF å‚照をボタンã®ã‚¿ã‚¤ãƒˆãƒ«ã‚¨ãƒªã‚¢ã«å…¥åŠ›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([付録 B: XLIFFアーキテクãƒãƒ£ãƒ¼](https://doc.4d.com/4Dv18/4D/18/Appendix-B-XLIFF-architecture.300-4575737.ja.html) å‚ç…§)。 + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---- | ------ | --------- | +| text | string | ãªã‚“らã‹ã®ãƒ†ã‚­ã‚¹ãƒˆ | + +#### 対象オブジェクト + +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) + + + + + + + +--- +## 変数ã®è¨ˆç®— + +ã“ã®ãƒ—ロパティã¯ã€[リストボックスフッター](listbox_overview.md#リストボックスフッター) エリアã«é©ç”¨ã•れる計算タイプを設定ã—ã¾ã™ã€‚ +> リストボックスã®ãƒ•ッターã«å‰²ã‚Šå½“ã¦ã‚‹è‡ªå‹•計算㯠[`LISTBOX SET FOOTER CALCULATION`](https://doc.4d.com/4dv19/help/command/ja/page1140.html) 4Dコマンドを使用ã—ã¦ã‚‚設定ã§ãã¾ã™ã€‚ + +様々ãªè‡ªå‹•計算ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ 以下ã®è¡¨ã¯ã€åˆ—ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«å¿œã˜ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã®ã§ãる計算ã¨ã€(ã‚³ãƒ¼ãƒ‰ã§æ˜Žç¤ºçš„ã«å®£è¨€ã•れã¦ã„ãªã„ã¨ã) 4D ã«ã‚ˆã£ã¦ãƒ•ッター変数ã«è‡ªå‹•ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹åž‹ã‚’示ã—ã¦ã„ã¾ã™: + +| 計算タイプ | Num | テキスト | 日付 | 時間 | Bool | ピクãƒãƒ£ãƒ¼ | フッター変数ã®åž‹ | +| --------------------- | --- | ---- | -- | -- | ---- | ----- | -------- | +| æœ€å° | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | | 列ã®åž‹ã¨åŒã˜ | +| 最大 | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | | 列ã®åž‹ã¨åŒã˜ | +| åˆè¨ˆ | â—‹ | | | â—‹ | â—‹ | | 列ã®åž‹ã¨åŒã˜ | +| カウント | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | å€é•·æ•´æ•° | +| å¹³å‡ | â—‹ | | | â—‹ | | | 実数 | +| 標準åå·®(*) | â—‹ | | | â—‹ | | | 実数 | +| 分散(*) | â—‹ | | | â—‹ | | | 実数 | +| 平方和(*) | â—‹ | | | â—‹ | | | 実数 | +| カスタム (JSON ã§ã¯ "none") | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | â—‹ | 制é™ãªã— | + +(*) é…列型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã¿ + +> フッター計算ã«ã¯ã€å®£è¨€ã•れãŸã€ã‚ã‚‹ã„ã¯å‹•的㪠[変数](Concepts/variables.md) ã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ ãã®ä»–ã® [å¼](Concepts/quick-tour.md#å¼) (例: `Form.value`) ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。 + +自動計算ã®éš›ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹è¡Œã®è¡¨ç¤º/éžè¡¨ç¤ºçŠ¶æ…‹ã¯è€ƒæ…®ã•れã¾ã›ã‚“。 表示行ã ã‘を計算対象ã«ã—ãŸã„å ´åˆã€ã‚«ã‚¹ã‚¿ãƒ ã‚’é¸æŠžã—ã¦ãƒ—ログラムコードã§è¨ˆç®—ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +*Null* 値ã¯è¨ˆç®—ã«ãŠã„ã¦ç„¡è¦–ã•れã¾ã™ã€‚ + +ç•°ãªã‚‹åž‹ã®å€¤ãŒã‚«ãƒ©ãƒ ã«å«ã¾ã‚Œã‚‹å ´åˆ (コレクションã«åŸºã¥ã„ã¦ã„ã‚‹å ´åˆãªã©): + +- å¹³å‡ã¨åˆè¨ˆã¯æ•°å€¤ã®ã¿ã‚’計算ã«å«ã‚ã¾ã™ (ä»–ã®åž‹ã®å€¤ã¯ç„¡è¦–ã•れã¾ã™)。 +- 最å°ã¨æœ€å¤§ã¯ã€[collection.sort()](API/CollectionClass.md#sort) 関数ã«ã¦å®šç¾©ã•れるã®ã¨åŒã˜æœ€å°å€¤ã¨æœ€å¤§å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + +å¼ã«åŸºã¥ã„ã¦ã„る列ã®ãƒ•ッターã«ãŠã„ã¦è‡ªå‹•計算を使用ã™ã‚‹ã«ã‚ãŸã£ã¦ã¯ã€æ¬¡ã®åˆ¶é™ãŒã‚りã¾ã™: + +- å¼ãŒ "å˜ç´”" ãªã‚‚ã®ã®å ´åˆ (`[table]field` ã‚„ `this.attribute` ãªã©) ã«ã¯ã€ã™ã¹ã¦ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚¿ã‚¤ãƒ—ã§ **サãƒãƒ¼ãƒˆã•れã¾ã™** +- å¼ãŒ "複雑" (ã¤ã¾ã‚Šã€`this.attribute` 以外) ã§ã€ã‹ã¤ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œæ•°ãŒå¤šã„å ´åˆã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³/エンティティセレクションリストボックスã«ãŠã„㦠**サãƒãƒ¼ãƒˆã¯ã•れるもã®ã®**ã€ãƒ‘フォーマンス上ã®ç†ç”±ã«ã‚ˆã‚Š **推奨ã•れã¾ã›ã‚“**。 +- å¼ãŒ "複雑" ãªå ´åˆã«ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³/命åセレクションリストボックスã«ãŠã„㦠**サãƒãƒ¼ãƒˆã•れã¾ã›ã‚“**。 ã“れらã®å ´åˆã«ã¯ã€ã‚«ã‚¹ã‚¿ãƒ è¨ˆç®—を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +**カスタム** (JSON ã§ã¯ "none") ã‚’é¸æŠžã—ãŸå ´åˆã€4D ã¯è‡ªå‹•計算をãŠã“ãªã„ã¾ã›ã‚“。プログラムを使用ã—ã¦è¡¨ç¤ºã™ã‚‹å€¤ã‚’エリアã®å¤‰æ•°ã«ä»£å…¥ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------------- | ------ | ----------------------------------------------------------------------------------------------------- | +| variableCalculation | string | "none", "minimum", "maximum", "sum", "count", "average", "standardDeviation", "variance", "sumSquare" | + +#### 対象オブジェクト + +[リストボックスフッター](listbox_overview.md#リストボックスフッター) + + + + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Picture.md b/website/translated_docs/ja/FormObjects/properties_Picture.md index 3d646cda14b553..0d0a2d94436e58 100644 --- a/website/translated_docs/ja/FormObjects/properties_Picture.md +++ b/website/translated_docs/ja/FormObjects/properties_Picture.md @@ -3,69 +3,71 @@ id: propertiesPicture title: ピクãƒãƒ£ãƒ¼ --- -* * * +--- +## パスå -## Pathname +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md)ã€[ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md)ã€ã¾ãŸã¯ [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) ã«è¡¨ç¤ºã•ã›ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ãƒ‘スåã§ã™ã€‚ POSIX シンタックスを使用ã—ã¾ã™ã€‚ -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. +ピクãƒãƒ£ãƒ¼ãƒ‘ã‚¹ã«æŒ‡å®šã§ãã‚‹å ´æ‰€ã¯æ¬¡ã® 2箇所ã§ã™: -Two main locations can be used for static picture path: +- プロジェクト㮠**Resources** フォルダー。 プロジェクト内ã®è¤‡æ•°ã®ãƒ•ォームã§ç”»åƒã‚’共有ã™ã‚‹å ´åˆã«é©åˆ‡ã§ã™ã€‚ ã“ã®å ´åˆã€ãƒ‘スå㯠"/RESOURCES/\" ã¨ãªã‚Šã¾ã™ã€‚ +- フォームフォルダー内ã®ç”»åƒç”¨ãƒ•ォルダー (ãŸã¨ãˆã°ã€**Images** ã¨å付ã‘ãŸãƒ•ォルダー)。 特定ã®ãƒ•ォームã§ã—ã‹ç”»åƒãŒä½¿ã‚れãªã„å ´åˆã‚„ã€ãã®ãƒ•ォームã®å…¨ä½“を複製ã—ã¦ãƒ—ロジェクト内ã€ã¾ãŸã¯åˆ¥ã®ãƒ—ロジェクトã«ç§»å‹•ã•ã›ãŸã„å ´åˆã«é©åˆ‡ã§ã™ã€‚ ã“ã®å ´åˆã€ãƒ‘スå㯠"\" ã¨ãªã‚Šã€ãƒ•ォームフォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã§ã™ã€‚ -- 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/\". -- 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:-------:|:------:| ------------------------------------------- | -| picture | テキスト | Relative or filesystem path in POSIX syntax | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:-----:|:------:| ------------------------------- | +| ピクãƒãƒ£ãƒ¼ | text | POSIX シンタックスã®ç›¸å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ•ァイルシステムパス | #### 対象オブジェクト -[Picture button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Static Picture](staticPicture.md) +[ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) + -* * * +--- +## 表示 -## Display -### Scaled to fit +### スケーリング -`JSON grammar: "scaled"` +`JSON 文法ã§ã¯: "scaled"` -The **Scaled to fit** format causes 4D to resize the picture to fit the dimensions of the area. +**スケーリング** ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒ”クãƒãƒ£ãƒ¼ã¯ãƒ•ィールドエリアã®å¤§ãã•ã«åˆã†ã‚ˆã†ã«ãƒªã‚µã‚¤ã‚ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/property_pictureFormat_ScaledToFit.png) -### Replicated +### 繰り返㗠-`JSON grammar: "tiled"` +`JSON 文法ã§ã¯: "tiled"` -When the area that contains a picture with the **Replicated** format is enlarged, the picture is not deformed but is replicated as many times as necessary in order to fill the area entirely. +**繰り返ã—** フォーマットをæŒã¤ãƒ”クãƒãƒ£ãƒ¼ãŒå«ã¾ã‚Œã‚‹ã‚¨ãƒªã‚¢ãŒæ‹¡å¤§ã•れるã¨ã€ãƒ”クãƒãƒ£ãƒ¼ã¯å¤‰å½¢ã•れãšã€ã‚¨ãƒªã‚¢å…¨ä½“を埋ã‚ã‚‹ã®ã«å¿…è¦ãªã ã‘ピクãƒãƒ£ãƒ¼ãŒç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ ![](assets/en/FormObjects/property_pictureFormat_Replicated.png) -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"` -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. +`JSON 文法ã§ã¯: "truncatedCenter" / "truncatedTopLeft"` -> When the picture format is **Truncated (non-centered)**, it is possible to add scroll bars to the input area. +**中央åˆã‚ã›** ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ã‚¨ãƒªã‚¢ã®ä¸­å¤®ã«ãƒ”クãƒãƒ£ãƒ¼ã‚’é…ç½®ã—ã€åŽã¾ã‚‰ãªã„部分ã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã¾ã™ã€‚ 上下ã€ãŠã‚ˆã³å·¦å³ã®ã¯ã¿å‡ºã—é‡ã¯åŒã˜ã«ãªã‚Šã¾ã™ã€‚ + +**トランケート (中央åˆã‚ã›ã—ãªã„)** ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹ã¨ã€4D ã¯ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šè§’をフィールドã®å·¦ä¸Šè§’ã«åˆã‚ã›ã¦é…ç½®ã—ã€ãƒ•ィールドエリアã«åŽã¾ã‚‰ãªã„部分ã¯ã‚¨ãƒªã‚¢ã‹ã‚‰ã¯ã¿å‡ºã—ã¾ã™ã€‚ ピクãƒãƒ£ãƒ¼ã¯å³ã¨ä¸‹ã«ã¯ã¿å‡ºã—ã¾ã™ã€‚ +> ピクãƒãƒ£ãƒ¼ãƒ•ォーマット㌠**トランケート (中央åˆã‚ã›ã—ãªã„)** ã®å ´åˆã€å…¥åŠ›ã‚¨ãƒªã‚¢ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã‚’追加ã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/property_pictureFormat_Truncated.png) + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | -------------------------------------------------------- | | pictureFormat | string | "scaled", "tiled", "truncatedCenter", "truncatedTopLeft" | - #### 対象オブジェクト -[Static Picture](staticPicture.md) \ No newline at end of file +[スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_Plugins.md b/website/translated_docs/ja/FormObjects/properties_Plugins.md index e9e4633c68a413..fdbb965ed049d4 100644 --- a/website/translated_docs/ja/FormObjects/properties_Plugins.md +++ b/website/translated_docs/ja/FormObjects/properties_Plugins.md @@ -3,21 +3,23 @@ id: propertiesPlugIns title: プラグイン --- -* * * +--- +## 詳細設定 + +プラグインã®ä½œæˆè€…ãŒè©³ç´°ã‚ªãƒ—ションをæä¾›ã—ã¦ã„ã‚‹ã¨ã€ãƒ—ロパティリストã«ã¦ **詳細設定** ボタンãŒä½¿ç”¨å¯èƒ½ã«ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ãƒ—ラグインã®åˆ¶ä½œå…ƒã«ã‚ˆã‚‹ã‚«ã‚¹ã‚¿ãƒ ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«ã¦ãれらã®ã‚ªãƒ—ションを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- | -| customProperties | テキスト | Plugin specific properties, passed to plugin as a JSON string if an object, or as a binary buffer if a base64 encoded string | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------------- | ------ | ------------------------------------------------------------------------------ | +| customProperties | text | プラグイン専用ã®ãƒ—ロパティã§ã™ã€‚オブジェクトã®å ´åˆã¯ JSON 文字列ã¨ã—ã¦ã€ãƒã‚¤ãƒŠãƒªã®å ´åˆã¯ base64ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã®æ–‡å­—列ã¨ã—ã¦ãƒ—ãƒ©ã‚°ã‚¤ãƒ³ã«æ¸¡ã•れã¾ã™ã€‚ | #### 対象オブジェクト -[Plug-in Area](pluginArea_overview.md) \ No newline at end of file +[プラグインエリア](pluginArea_overview.md) + diff --git a/website/translated_docs/ja/FormObjects/properties_Print.md b/website/translated_docs/ja/FormObjects/properties_Print.md index 19a48cb69c589f..1fa8916aaf82cb 100644 --- a/website/translated_docs/ja/FormObjects/properties_Print.md +++ b/website/translated_docs/ja/FormObjects/properties_Print.md @@ -1,35 +1,36 @@ --- id: propertiesPrint -title: Print +title: å°åˆ· --- -* * * +--- +## å°åˆ·æ™‚å¯å¤‰ + +ã“ã®ãƒ—ロパティã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ä¸­èº«ã«å¿œã˜ã¦ã‚µã‚¤ã‚ºãŒå¤‰åŒ–ã—ã†ã‚‹ã‚ªãƒ–ジェクトã®å°åˆ·ãƒ¢ãƒ¼ãƒ‰ã‚’管ç†ã—ã¾ã™ã€‚ ã“れらã®ã‚ªãƒ–ジェクト固定長フレームã¾ãŸã¯å¯å¤‰é•·ãƒ•レームã§ã®å°åˆ·ã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 固定長フレームオブジェクトã¯ã€ãƒ•ォーム上ã§ã‚ªãƒ–ジェクト作æˆã™ã‚‹ã‚ˆã†ã«ã€ã‚ªãƒ–ジェクトã®ã‚µã‚¤ã‚ºã®åˆ¶é™å†…ã§å°åˆ·ã‚’ã—ã¾ã™ã€‚ å¯å¤‰é•·ãƒ•レームオブジェクトã¯ã‚ªãƒ–ジェクトã®ä¸­èº«ã‚’ã™ã¹ã¦å°åˆ·ã™ã‚‹ãŸã‚ã«ã€å°åˆ·æ™‚ã«å±•é–‹ã—ã¾ã™ã€‚ å¯å¤‰ã‚µã‚¤ã‚ºã¨ã—ã¦å°åˆ·ã•れるオブジェクト幅 (オブジェクトプロパティã«ã‚ˆã£ã¦å®šç¾©) ã¯ã“ã®ã‚ªãƒ—ションã«ã‚ˆã£ã¦å½±éŸ¿ã¯ã•れãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。オブジェクトã®ä¸­èº«ã«å¿œã˜ã¦ã€é«˜ã•ã®ã¿ãŒå¤‰åŒ–ã—ã¾ã™ã€‚ -## 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. +> `Print object` 㨠`Print form` コマンドã¯ã“ã®ãƒ—ロパティをサãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。 -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. -> The `Print object` and `Print form` commands do not support this property. +å°åˆ·ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®é€šã‚Šã§ã™: -The print options are: +- **å¯å¤‰** オプション (**å°åˆ·æ™‚å¯å¤‰** é¸æŠžæ™‚): ã™ã¹ã¦ã®ã‚µãƒ–レコードãŒå°åˆ·ã•れるよã†ã€4D ã¯ãƒ•ォームオブジェクトエリアを拡大ã‚ã‚‹ã„ã¯ç¸®å°ã—ã¾ã™ã€‚ -- **Variable** option / **Print Variable Frame** checked: 4D enlarges or reduces the form object area in order to print all the subrecords. +- **固定 (切りæ¨ã¦)** オプション (**å°åˆ·æ™‚å¯å¤‰** éžé¸æŠžæ™‚): オブジェクトエリアã«è¡¨ç¤ºã•れã¦ã„る内容ã®ã¿ã‚’ 4D ã¯å°åˆ·ã—ã¾ã™ã€‚ フォームãŒå°åˆ·ã•れるã®ã¯ä¸€åº¦ã®ã¿ã§ã€å°åˆ·ã•れãªã‹ã£ãŸå†…容ã¯ç„¡è¦–ã•れã¾ã™ã€‚ -- **Fixed (Truncation)** option / **Print Variable Frame** unchecked: 4D only prints the contents that appear in the object area. The form is only printed once and the contents not printed are ignored. +- **固定 (複数レコード)** (サブフォームã®ã¿): サブフォームã®åˆæœŸã‚µã‚¤ã‚ºã‚’ç¶­æŒã—ã¾ã™ãŒã€4D ã¯ã™ã¹ã¦ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå°åˆ·ã•れるã¾ã§è¤‡æ•°å›žã«ã‚ãŸã£ã¦ãƒ•ォームをå°åˆ·ã—ã¾ã™ã€‚ -- **Fixed (Multiple Records)** (subforms only): the initial size of the subform area is kept but 4D prints the form several times in order to print all the records. +> ã“ã®ãƒ—ロパティ㯠`OBJECT SET PRINT VARIABLE FRAME` コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> This property can be set by programming using the `OBJECT SET PRINT VARIABLE FRAME` command. #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:----------:|:------:| --------------------------------------------------- | -| printFrame | string | "fixed", "variable", (subform only) "fixedMultiple" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:----------:|:------:| ----------------------------------------------- | +| printFrame | string | "fixed", "variable", (サブフォームã®ã¿) "fixedMultiple" | #### 対象オブジェクト -[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_overview.md) - [サブフォーム](subform_overview.md) (リストサブフォームã®ã¿) - [4D Write Pro エリア](writeProArea_overview.md) diff --git a/website/translated_docs/ja/FormObjects/properties_RangeOfValues.md b/website/translated_docs/ja/FormObjects/properties_RangeOfValues.md index 79e4789ef51fae..c53983a3c6a7b8 100644 --- a/website/translated_docs/ja/FormObjects/properties_RangeOfValues.md +++ b/website/translated_docs/ja/FormObjects/properties_RangeOfValues.md @@ -1,82 +1,83 @@ --- id: propertiesRangeOfValues -title: Range of Values +title: 値ã®ç¯„囲 --- -* * * - -## 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: +入力オブジェクトã«ãƒ‡ãƒ•ォルト値を割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ—ロパティã¯ã€å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«è¨­å®šã•れã¦ã„ã‚‹ [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ãŒãƒ•ィールドã§ã‚ã‚‹ã¨ãã«ä¾¿åˆ©ã§ã™ã€‚æ–°è¦ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒä½œæˆã•れã€åˆã‚ã¦è¡¨ç¤ºã•れるã¨ãã«ãƒ‡ãƒ•ォルト値ãŒä»£å…¥ã•れã¾ã™ã€‚ エリア㌠[入力ä¸å¯](properties_Entry.md#入力å¯) ã«è¨­å®šã•れã¦ã„ãªã‘れã°ã€ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã‚’æ›¸ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- text/string -- number/integer +デフォルト値を指定ã§ãã‚‹ã®ã¯ã€[å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) ãŒæ¬¡ã®ã„ãšã‚Œã‹ã®å ´åˆã§ã™: +- テキスト/文字列 +- 数値/æ•´æ•° - date - time - boolean -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: +æ—¥ä»˜ã€æ™‚刻ã€ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã«ã¤ã„ã¦ã¯ã€4D ãŒæä¾›ã™ã‚‹è¨˜å·ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ æ—¥ä»˜ã¨æ™‚刻ã¯ã‚·ã‚¹ãƒ†ãƒ ã‹ã‚‰å–å¾—ã•れã¾ã™ã€‚ シーケンス番å·ã¯ 4D ãŒè‡ªå‹•ã§ç”Ÿæˆã—ã¾ã™ã€‚ 自動ã§ä½¿ç”¨ã§ãるデフォルト値ã®è¨˜å·ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: -| Stamp | Meaning | -| ----- | --------------- | -| #D | Current date | -| #H | Current time | -| #N | Sequence number | +| è¨˜å· | æ„味 | +| -- | ------- | +| #D | æœ¬æ—¥ã®æ—¥ä»˜ | +| #H | ç¾åœ¨ã®æ™‚刻 | +| #N | ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· | +カレントデータファイルã®ç‰¹å®šã®ãƒ†ãƒ¼ãƒ–ルã«ãŠã„ã¦ã€ãƒ¬ã‚³ãƒ¼ãƒ‰æ¯Žã®ãƒ¦ãƒ‹ãƒ¼ã‚¯ç•ªå·ã‚’生æˆã™ã‚‹ãŸã‚ã«ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå·ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ シーケンス番å·ã¯å€é•·æ•´æ•°åž‹ã§æ–°è¦ãƒ¬ã‚³ãƒ¼ãƒ‰æ¯Žã«ç”Ÿæˆã•れã¾ã™ã€‚ 番å·ã¯ 1 ã‹ã‚‰å§‹ã¾ã‚Šã€1ãšã¤å¢—加ã—ã¾ã™ã€‚ シーケンス番å·ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒãƒ†ãƒ¼ãƒ–ルã‹ã‚‰å‰Šé™¤ã•れã¦ã‚‚ã€ãã®ç•ªå·ã¯å†åˆ©ç”¨ã•れã¾ã›ã‚“。 シーケンス番å·ã¯å„テーブルãŒä¿æœ‰ã™ã‚‹å†…部カウンターãŒç®¡ç†ã—ã¾ã™ã€‚ 詳細㯠[自動インクリメント](https://doc.4d.com/4Dv18/4D/18/Field-properties.300-4575567.ja.html#976029) ã®æ®µè½ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -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. +> ã“ã®ãƒ—ロパティã¨ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã«å›ºå®šå€¤ã‚’表示ã•ã›ã‚‹ãŸã‚ã® "[デフォルト値](properties_DataSource.md#デフォルト値)" ã‚’æ··åŒã—ãªã„よã†ã«ã—ã¦ãã ã•ã„。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ----------------------------------- | ------------------------------------------ | -| defaultValue | string, number, date, time, boolean | Any value and/or a stamp: "#D", "#H", "#N" | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ----------------------------------- | ------------------------------ | +| defaultValue | string, number, date, time, boolean | ä»»æ„ã®å€¤ã€‚次ã®è¨˜å·ã‚’å«ã‚€: "#D", "#H", "#N" | #### 対象オブジェクト [入力](input_overview.md) -* * * -## 除外リスト -Allows setting a list whose values cannot be entered in the object. ユーザーãŒã“ã®ãƒªã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹å€¤ã‚’入力ã—ãŸã¨ãã€ãã®å…¥åŠ›ã¯è‡ªå‹•çš„ã«å´ä¸‹ã•れã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +--- -> If a specified list is hierarchical, only the items of the first level are taken into account. +## 除外リスト -#### JSON 文法 +除外リストを使用ã™ã‚‹ã¨ã€å½“該リストã®é …ç›®ã¯å…¥åŠ›ã§ããªããªã‚Šã¾ã™ã€‚ ユーザーãŒã“ã®ãƒªã‚¹ãƒˆã«å«ã¾ã‚Œã‚‹å€¤ã‚’入力ã—ãŸã¨ãã€ãã®å…¥åŠ›ã¯è‡ªå‹•çš„ã«å´ä¸‹ã•れã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +> 階層リストを指定ã—ãŸå ´åˆã¯ã€ç¬¬ä¸€ãƒ¬ãƒ™ãƒ«ã®é …ç›®ã®ã¿ãŒè€ƒæ…®ã•れã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ------ | -------------------------------- | -| excludedList | list | A list of values to be excluded. | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | --------- | +| excludedList | list | 除外ã™ã‚‹å€¤ã®ãƒªã‚¹ãƒˆ | #### 対象オブジェクト -[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) +[コンボボックス](comboBox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [入力](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 文法 +指定リストを指定ã—ã¦ã‚‚ã€ãƒ•ィールドãŒé¸æŠžã•れãŸã¨ãã«ãƒªã‚¹ãƒˆã¯è‡ªå‹•ã§è¡¨ç¤ºã•れã¾ã›ã‚“。 指定リストを表示ã—ãŸã„å ´åˆã¯ã€"データソース"テーマ㮠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) プロパティã«åŒã˜ãƒªã‚¹ãƒˆã‚’指定ã—ã¾ã™ã€‚ ãŸã ã—ã€[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) プロパティã ã‘ãŒæŒ‡å®šã•れã¦ã„ã‚‹ã¨ãã¨ã¯ç•°ãªã‚Šã€æŒ‡å®šãƒªã‚¹ãƒˆã‚‚設定ã•れã¦ã„ã‚‹å ´åˆã«ã¯ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã«ã‚ˆã‚‹å…¥åŠ›ã¯ã§ãã¾ã›ã‚“。ãƒãƒƒãƒ—アップメニューã§ã®ãƒªã‚¹ãƒˆé …ç›®ã®é¸æŠžã ã‘ãŒå¯èƒ½ã§ã™ã€‚ [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ) ã¨æŒ‡å®šãƒªã‚¹ãƒˆã«ãれãžã‚Œåˆ¥ã®ãƒªã‚¹ãƒˆãŒæŒ‡å®šã•れã¦ã„ã‚‹å ´åˆã€æŒ‡å®šãƒªã‚¹ãƒˆãŒå„ªå…ˆã•れã¾ã™ã€‚ +> 階層リストを指定ã—ãŸå ´åˆã¯ã€ç¬¬ä¸€ãƒ¬ãƒ™ãƒ«ã®é …ç›®ã®ã¿ãŒè€ƒæ…®ã•れã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------ | ------ | --------------------------- | -| requiredList | list | A list of mandatory values. | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------------ | ------ | ---------- | +| requiredList | list | 有効ãªå…¥åЛ値ã®ãƒªã‚¹ãƒˆ | #### 対象オブジェクト -[Combo Box](comboBox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) - [Input](input_overview.md) \ No newline at end of file +[コンボボックス](comboBox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [入力](input_overview.md) + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Reference.md b/website/translated_docs/ja/FormObjects/properties_Reference.md index 4ccc6c57140539..e999a140b6158a 100644 --- a/website/translated_docs/ja/FormObjects/properties_Reference.md +++ b/website/translated_docs/ja/FormObjects/properties_Reference.md @@ -1,219 +1,17 @@ --- id: propertiesReference -title: JSON property list +title: JSON プロパティリスト --- -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. +ã“ã®ä¸€è¦§ã¯ã€ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトプロパティを JSONåé †ã«ä¸¦ã¹ã¦ã¾ã¨ã‚ãŸã‚‚ã®ã§ã™ã€‚ プロパティåをクリックã™ã‚‹ã¨ã€è©³ç´°èª¬æ˜Žã«ç§»å‹•ã—ã¾ã™ã€‚ +> "フォームオブジェクトプロパティ" ã®ç« ã§ã¯ã€ãƒ—ロパティリストã«ãŠã‘るテーマã¨åç§°ã§å„プロパティを紹介ã—ã¦ã„ã¾ã™ã€‚ -> 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) -| プロパティ | 説明 | ã¨ã‚Šã†ã‚‹å€¤ | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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. | 最å°å€¤: 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). | 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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 | -| [entryFilter](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 | 最å°å€¤: 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). | 最å°å€¤: 0 | -| **g** | | | -| [graduationStep](properties_Scale.md#graduation-step) | Scale display measurement. | 最å°å€¤: 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 | 最å°å€¤: 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. | POSIX シンタックスã®ç›¸å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ•ァイルシステムパス | -| [iconFrames](properties_TextAndPicture.md#number-of-states) | Sets the exact number of states present in the picture. | 最å°å€¤: 1 | -| [iconPlacement](properties_TextAndPicture.md#icon-location) | フォームオブジェクトã«å¯¾ã™ã‚‹ã‚¢ã‚¤ã‚³ãƒ³ã®é…置を指定ã—ã¾ã™ã€‚ | "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. | 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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 | POSIX シンタックスã®ç›¸å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ•ァイルシステムパス | -| [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. | 最å°å€¤: 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. | 最å°å€¤: 0 | -| [rowControlSource](properties_ListBox.md#row-control-array) | A 4D array defining the list box rows. | é…列 | -| [rowCount](properties_Crop.md#rows) | Sets the number of rows. | 最å°å€¤: 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). 最å°å€¤: 0 | -| [rowHeightAutoMin](properties_CoordinatesAndSizing.md#minimum-width) | Designates the smallest height allowed for list box rows. | CSS value unit "em" or "px" (default). 最å°å€¤: 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. | 最å°å€¤: 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. | 最å°å€¤: 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 "" | -| [テキスト](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). | 最å°å€¤: 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 | 最å°å€¤: 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 + +`list` (`choiceList` å‚ç…§) + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_ResizingOptions.md b/website/translated_docs/ja/FormObjects/properties_ResizingOptions.md index 448f2d9d752d97..defda52aa6f2f6 100644 --- a/website/translated_docs/ja/FormObjects/properties_ResizingOptions.md +++ b/website/translated_docs/ja/FormObjects/properties_ResizingOptions.md @@ -1,141 +1,144 @@ --- id: propertiesResizingOptions -title: Resizing Options +title: リサイズオプション --- -* * * - +--- ## カラム自動リサイズ -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. +ã“ã®ãƒ—ロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã (JSON ã®å€¤ã¯ `rightToLeft`)ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹åˆ—ã¯å®šç¾©ã•れ㟠[最大幅](properties_CoordinatesAndSizing.md#maximum-width) 㨠[最å°å¹…](properties_CoordinatesAndSizing.md#minimum-width) ã®ç¯„囲ã®ä¸­ã§ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã¨å…±ã«è‡ªå‹•çš„ã«ãƒªã‚µã‚¤ã‚ºã•れã¾ã™ã€‚ -When this property is disabled (`legacy` value in JSON), only the rightmost column of the list box is resized, even if its width exceeds the maximum value defined. +ã“ã®ãƒ—ロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„ã¨ãã«ã¯ (JSON ã®å€¤ã¯ `legacy`)ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã§æœ€ã‚‚å³ã®ã‚«ãƒ©ãƒ ã®ã¿ãŒ (定義ã•ã‚ŒãŸæœ€å¤§å¹…ã‚’è¶…ãˆãŸã¨ã—ã¦ã‚‚) リサイズã•れã¾ã™ã€‚ -### 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. +* リストボックスã®å¹…を拡大ã™ã‚‹ã¨ã€ãã®åˆ—も一ã¤ãšã¤ã€å³ã‹ã‚‰å·¦ã¸ã¨é †ã«ã€[最大幅](properties_CoordinatesAndSizing.md#最大幅) ã«é”ã™ã‚‹ã¾ã§æ‹¡å¤§ã•れã¦ã„ãã¾ã™ã€‚ [サイズ変更å¯](#サイズ変更å¯) プロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„る列ã ã‘ãŒãƒªã‚µã‚¤ã‚ºã•れã¾ã™ -* 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. +* リストボックスã®å¹…を縮å°ã™ã‚‹ã¨ãã‚‚åŒã˜æ‰‹é †ãŒé©ç”¨ã•れã¾ã™ãŒã€é †ç•ªãŒé€†ã«ãªã‚Šã¾ã™ (å·¦ã‹ã‚‰å³ã¸ã¨åˆ—ãŒãƒªã‚µã‚¤ã‚ºã•れã¦ã„ãã¾ã™)。 列ã®å¹…ãŒãれãžã‚Œ [最å°å¹…](properties_CoordinatesAndSizing.md#最å°å¹…) ã«é”ã™ã‚‹ã¨ã€æ°´å¹³ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã‚Šã¾ã™ã€‚ -* 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. +* ã™ã¹ã¦ã®åˆ—ãŒæœ€å¤§å¹…ã«åˆ°é”ã™ã‚‹ã¨ã€ã“れらã¯ãれ以上拡大ã•れãšã€ä½™åˆ†ãªç©ºç™½ã‚’埋ã‚ã‚‹å½¢ã§ç©ºã®åˆ—ãŒå³ã«è¿½åŠ ã•れã¾ã™ã€‚ ã“ã®ä½™ç™½ã‚«ãƒ©ãƒ ãŒã‚ã‚‹ã¨ãã«ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å¹…を縮å°ã•ã›ãŸå ´åˆã€ä½™ç™½ã‚«ãƒ©ãƒ ã‹ã‚‰å…ˆã«ç¸®å°ã•れã¦ã„ãã¾ã™ã€‚ ![](assets/en/FormObjects/property_columnAutoResizing.png) -#### About the fake (blank) column +#### 余白カラムã«ã¤ã„㦠-The appearance of the fake column matches that of the existing columns; it will have a fake header and/or footer if these elements are present in the existing list box columns and it will have the same background color(s) applied. +余白カラムã®è¦‹ãŸç›®ã¯æ—¢å­˜ã®åˆ—ã¨åŒã˜ã«ãªã‚Šã¾ã™ã€‚既存ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã«ãƒ˜ãƒƒãƒ€ãƒ¼/フッターãŒã‚ã‚‹å ´åˆã«ã¯ä½™ç™½ã‚«ãƒ©ãƒ ã«ã‚‚ã“れらã®è¦ç´ ãŒã‚りã€åŒã˜èƒŒæ™¯è‰²ãŒé©ç”¨ã•れã¾ã™ã€‚ -The fake header and/or footer can be clicked but this does not have any effect on the other columns (e.g.: no sort is performed); nevertheless, the `On Clicked`, `On Header Click` and `On Footer Click` events are generated accordingly. +余白カラムã®ãƒ˜ãƒƒãƒ€ãƒ¼/フッターã¯ã‚¯ãƒªãƒƒã‚¯å¯èƒ½ã§ã™ãŒã€ä»–ã®ã‚«ãƒ©ãƒ ã«ã¯ä½•ã®å½±éŸ¿ã‚‚åŠã¼ã—ã¾ã›ã‚“ (ã¤ã¾ã‚Šä¸¦ã³æ›¿ãˆãªã©ã¯ãŠã“ãªã‚れã¾ã›ã‚“)。ã—ã‹ã—ãªãŒã‚‰ã€`On Clicked`ã€`On Header Click` ãã—㦠`On Footer Click` イベントã¯ãれãžã‚Œç”Ÿæˆã•れã¾ã™ã€‚ + +余白カラム内ã®ã‚»ãƒ«ãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆã€[LISTBOX GET CELL POSITION](https://doc.4d.com/4Dv18/4D/18/LISTBOX-GET-CELL-POSITION.301-4505216.ja.html) コマンドã¯åˆ—番å·ã¨ã—㦠"X+1" ã‚’è¿”ã—ã¾ã™ (X ã¯æ—¢å­˜ã®åˆ—æ•°ã§ã™)。 -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------ | ------ | ----------------------- | | resizingMode | string | "rightToLeft", "legacy" | - #### 対象オブジェクト [リストボックス](listbox_overview.md) -* * * -## 横方å‘サイズ変更 -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: +--- +## 横方å‘サイズ変更 -| オプション | 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 | +ã“ã®ãƒ—ロパティã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ•ォームã®å¹…をサイズ変更ã—ãŸã¨ãã®ã€å½“è©²ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æŒ™å‹•を指定ã—ã¾ã™ã€‚ ã“ã®ãƒ—ロパティ㯠`OBJECT SET RESIZING OPTIONS` ランゲージコマンドã«ã‚ˆã£ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: -> This property works in conjunction with the [Vertical Sizing](#vertical-sizing) property. +| オプション | JSON 値 | 戻り値 | +| ----- | ------- | ---------------------------------------------- | +| 拡大 | "grow" | ユーザーãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å¹…を変更ã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®å¹…ã«ã‚‚åŒã˜å‰²åˆã‚’é©ç”¨ã—ã¾ã™ã€‚ | +| 移動 | "move" | ユーザーãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å¹…を変更ã™ã‚‹ã¨ã€å¹…ã®å¢—加分ã¨åŒã˜ã ã‘オブジェクトを左ã‹å³ã«ç§»å‹•ã—ã¾ã™ã€‚ | +| ãªã— | "fixed" | フォームサイズãŒå¤‰æ›´ã•れã¦ã‚‚ã€ã‚ªãƒ–ジェクトã¯å›ºå®šã•れãŸã¾ã¾ã§ã™ã€‚ | +> ã“ã®ãƒ—ロパティ㯠[縦方å‘サイズ変更](#縦方å‘サイズ変更) プロパティã¨é€£æºã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------- | ------ | ----------------------- | | sizingX | string | "grow", "move", "fixed" | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [Web エリア](webArea_overview.md) -* * * +--- ## 縦方å‘サイズ変更 -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: +ã“ã®ãƒ—ロパティã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ•ォームã®é«˜ã•をサイズ変更ã—ãŸã¨ãã®ã€å½“è©²ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æŒ™å‹•を指定ã—ã¾ã™ã€‚ ã“ã®ãƒ—ロパティ㯠`OBJECT SET RESIZING OPTIONS` ランゲージコマンドã«ã‚ˆã£ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -| オプション | 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 | +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: - -> This property works in conjunction with the [Horizontal Sizing](#horizontal-sizing) property. +| オプション | JSON 値 | 戻り値 | +| ----- | ------- | ------------------------------------------------ | +| 拡大 | "grow" | ユーザーãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é«˜ã•を変更ã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®é«˜ã•ã«ã‚‚åŒã˜å‰²åˆã‚’é©ç”¨ã—ã¾ã™ã€‚ | +| 移動 | "move" | ユーザーãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®é«˜ã•を変更ã™ã‚‹ã¨ã€é«˜ã•ã®å¤‰æ›´åˆ†ã¨åŒã˜ã ã‘オブジェクトを上ã‹ä¸‹ã«ç§»å‹•ã—ã¾ã™ã€‚ | +| ãªã— | "fixed" | フォームサイズãŒå¤‰æ›´ã•れã¦ã‚‚ã€ã‚ªãƒ–ジェクトã¯å›ºå®šã•れãŸã¾ã¾ã§ã™ã€‚ | +> ã“ã®ãƒ—ロパティ㯠[横方å‘サイズ変更](#横方å‘サイズ変更) プロパティã¨é€£æºã—ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------- | ------ | ----------------------- | | sizingY | string | "grow", "move", "fixed" | - #### 対象オブジェクト -[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) +[4D View Pro エリア](viewProArea_overview.md) - [4D Write Pro エリア](writeProArea_overview.md) - [ボタン](button_overview.md) - [ボタングリッド](buttonGrid_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [ç·š](shapes_overview.md#ç·š) - [リストボックス列](listbox_overview.md#リストボックス列) - [楕円](shapes_overview.md#楕円) - [ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](pictureButton_overview.md) - [ピクãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニュー](picturePopupMenu_overview.md) - [プラグインエリア](pluginArea_overview.md) - [進æ—インジケーター](progressIndicator.md) - [ラジオボタン](radio_overview.md) - [ルーラー](ruler.md) - [四角](shapes_overview.md#四角) - [スピナー](spinner.md) - [スプリッター](splitters.md) - [スタティックピクãƒãƒ£ãƒ¼](staticPicture.md) - [ステッパー](stepper.md) - [サブフォーム](subform_overview.md) - [タブコントロール](tabControl.md) - [Web エリア](webArea_overview.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. +プロパティをé©ç”¨ã™ã‚‹ã¨ã‚¹ãƒ—リッターオブジェクト㯠"プッシャー" ã«ãªã‚Šã€ãã®ã‚ªãƒ–ジェクトã®å³å´ (垂直スプリッター) ã¾ãŸã¯ä¸‹å´ (水平スプリッター) ã«ã‚ã‚‹ä»–ã®ã‚ªãƒ–ジェクトã¯ã€ã‚¹ãƒ—リッターã¨ä¸€ç·’ã«æŠ¼ã—出ã•れã¦ç§»å‹•ã—ã¾ã™ã€‚ -Here is the result of a “pusher†splitter being moved: ![](assets/en/FormObjects/splitter_pusher1.png) +"プッシャー" スプリッターを移動ã—ãŸå ´åˆã®çµæžœã‚’次ã«ç¤ºã—ã¾ã™: ![](assets/en/FormObjects/splitter_pusher1.png) ![](assets/en/FormObjects/splitter_pusher3.png) -When this property is not applied to the splitter, the result is as follows: +スプリッターã«å¯¾ã—ã¦ã“ã®ãƒ—ロパティを指定ã—ãªã„å ´åˆã€çµæžœã¯æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: ![](assets/en/FormObjects/splitter_pusher2.png) -#### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:------------ |:------:|:------------------------------------:| -| splitterMode | string | "move" (pusher), "resize" (standard) | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:------------ |:------:|:-----------------------------:| +| splitterMode | string | "move" (プッシャー), "resize" (標準) | #### 対象オブジェクト -[Splitter](splitterTabControlOverview#splitters) +[スプリッター](splitterTabControlOverview#スプリッター) -* * * -## Resizable -Designates if the size of the column can be modified by the user. + +--- +## ã‚µã‚¤ã‚ºå¤‰æ›´å¯ + +ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ˜ãƒƒãƒ€ãƒ¼ã‚¨ãƒªã‚¢ã®å³å´ã‚’ドラッグã™ã‚‹ã“ã¨ã§åˆ—ã®ã‚µã‚¤ã‚ºã‚’変更ã§ãã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:--------- |:-------:|:---------------:| | resizable | boolean | "true", "false" | - #### 対象オブジェクト -[List Box Column](listbox_overview.md#list-box-columns) \ No newline at end of file +[リストボックス列](listbox_overview.md#リストボックス列) + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Scale.md b/website/translated_docs/ja/FormObjects/properties_Scale.md index da18224adfae19..c49464c90e265b 100644 --- a/website/translated_docs/ja/FormObjects/properties_Scale.md +++ b/website/translated_docs/ja/FormObjects/properties_Scale.md @@ -1,130 +1,137 @@ --- id: propertiesScale -title: Scale +title: スケール --- -* * * - -## Barber shop +--- +## ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ— -Enables the "barber shop" variant for the thermometer. +ã“ã®ãƒ—ロパティã¯ã€ã‚µãƒ¼ãƒ¢ãƒ¡ãƒ¼ã‚¿ãƒ¼ã® "ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—" ãƒãƒªã‚¨ãƒ¼ã‚·ãƒ§ãƒ³ã‚’有効ã«ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:---------------:|:------:| ----------------------------------------------------------- | -| [max](#maximum) | number | NOT passed = enabled; passed = disabled (basic thermometer) | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:----------:|:------:| ------------------------------------------ | +| [max](#最大) | number | プロパティãŒå­˜åœ¨ã—ãªã„ = 有効; 存在ã™ã‚‹ = 無効 (デフォルトサーモメーター) | #### 対象オブジェクト -[Barber shop](progressIndicator.md#barber-shop) +[ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—](progressIndicator.md#ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—) -* * * -## Display graduation -Displays/Hides the graduations next to the labels. +--- +## 目盛りを表示 + +ラベルã®éš£ã«ç›®ç››ã‚’表示ã€ã¾ãŸã¯éžè¡¨ç¤ºã«ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:---------------:|:-------:| --------------- | | showGraduations | boolean | "true", "false" | - #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) -* * * -## Graduation step -Scale display measurement. +--- +## 目盛りã®ã‚¹ãƒ†ãƒƒãƒ— + +目盛ã®è¡¨ç¤ºå˜ä½ã§ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:--------------:|:-------:| ------ | | graduationStep | integer | 最å°å€¤: 0 | #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) + -* * * -## Label Location +--- +## ラベルä½ç½® -Specifies the location of an object's displayed text. +ラベルãŒè¡¨ç¤ºã•れる際ã®ä½ç½®ã§ã™ã€‚ -* None - no label is displayed -* Top - Displays labels to the left of or above an indicator -* Bottom - Displays labels to the right of or below an indicator +* ãªã— - ラベルã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 +* 上 - インジケーターã®ä¸Šã¾ãŸã¯å·¦ã«ãƒ©ãƒ™ãƒ«ã‚’表示ã—ã¾ã™ã€‚ +* 下 - インジケーターã®ä¸‹ã¾ãŸã¯å³ã«ãƒ©ãƒ™ãƒ«ã‚’表示ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:---------------:|:------:| ---------------------------------------- | | labelsPlacement | string | "none", "top", "bottom", "left", "right" | - #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) -* * * -## Maximum -Maximum 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. -- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. +ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã®æœ€å¤§å€¤ã§ã™ã€‚ -#### JSON 文法 +- 時間型ã®ã‚¹ãƒ†ãƒƒãƒ‘ーã®å ´åˆã€å€¤ã¯ç§’を表ã—ã¾ã™ã€‚日付型ã®ã‚¹ãƒ†ãƒƒãƒ‘ーã§ã¯ã€æœ€å°ãŠã‚ˆã³æœ€å¤§ãƒ—ロパティã¯ç„¡è¦–ã•れã¾ã™ã€‚ +- [ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—サーモメーター](progressIndicator.md#ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—) を有効ã«ã™ã‚‹ã«ã¯ã€ã“ã®ãƒ—ロパティをå–り除ãã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:---:|:---------------:| ----------------------------------- | -| max | string / number | minimum: 0 (for numeric data types) | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:---:|:---------------:| --------------- | +| max | string / number | 最å°å€¤: 0 (数値型ã®å ´åˆ) | #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) - [ステッパー](stepper.md) + -* * * -## Minimum +--- +## æœ€å° -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -|:---:|:---------------:| ----------------------------------- | -| min | string / number | minimum: 0 (for numeric data types) | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:---:|:---------------:| --------------- | +| min | string / number | 最å°å€¤: 0 (数値型ã®å ´åˆ) | #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) - [ステッパー](stepper.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. + +--- +## ステップ + +使用時ã«å„値ã®é–“ã«ã‚ã‘ã‚‹ã“ã¨ãŒã§ãる最å°ã®é–“éš”ã§ã™ã€‚ 時間型ã®ã‚¹ãƒ†ãƒƒãƒ‘ーã®å ´åˆã€ã“ã®ãƒ—ロパティã¯ç§’を表ã—ã¾ã™ã€‚日付型ã®ã‚¹ãƒ†ãƒƒãƒ‘ーã§ã¯æ—¥æ•°ã‚’表ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:----:|:-------:| ------ | | step | integer | 最å°å€¤: 1 | #### 対象オブジェクト -[Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) \ No newline at end of file +[デフォルトサーモメーター](progressIndicator.md#デフォルトサーモメーター) - [ルーラー](ruler.md) - [ステッパー](stepper.md) + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_Subform.md b/website/translated_docs/ja/FormObjects/properties_Subform.md index f9cc17bc3c96ba..5efbffba474261 100644 --- a/website/translated_docs/ja/FormObjects/properties_Subform.md +++ b/website/translated_docs/ja/FormObjects/properties_Subform.md @@ -1,182 +1,169 @@ --- id: propertiesSubform -title: Subform +title: サブフォーム --- -* * * - -## Allow Deletion +--- +## å‰Šé™¤ã‚’è¨±å¯ -Specifies if the user can delete subrecords in a list subform. +リストサブフォーム内ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚µãƒ–レコードを削除ã§ãã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------------- | ------- | --------------------------- | -| deletableInList | boolean | true, false (default: true) | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------- | ------------------------- | +| deletableInList | boolean | true, false (デフォルト㯠true) | #### 対象オブジェクト -[Subform](subform_overview.md) +[サブフォーム](subform_overview.md) -* * * -## Detail Form +--- +## 詳細フォーム -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. +- ウィジェット (ページタイプã®ã‚µãƒ–フォームã§ã€ç‰¹å®šã®æ©Ÿèƒ½ã‚’実ç¾ã™ã‚‹ãŸã‚ã«ä½œæˆã•れã¦ã„ã¾ã™)。 ã“ã®å ´åˆã€[リストフォーム](#リストフォーム) ãŠã‚ˆã³ [ソース](#ソース) プロパティã¯å­˜åœ¨ã—ãªã„ã‹ã€ç©ºã§ãªãã¦ã¯ã„ã‘ã¾ã›ã‚“。 + コンãƒãƒ¼ãƒãƒ³ãƒˆã§å…¬é–‹ã•れã¦ã„れã°ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãƒ•ォームåã‚’é¸ã¹ã¾ã™ã€‚ +> サブフォームを介ã—ã¦è¿½åŠ ã®æ©Ÿèƒ½ã‚’æä¾›ã™ã‚‹ [コンãƒãƒ¼ãƒãƒ³ãƒˆ](Concepts/components.md) を作æˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ -> You can generate [components](Concepts/components.md) providing additional functionalities through subforms. +- [リストサブフォーム](#リストフォーム) ã«é–¢é€£ã¥ã‘る詳細フォーム。 詳細フォームã¯ã‚µãƒ–レコードを入力ã—ãŸã‚Šè¡¨ç¤ºã—ãŸã‚Šã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ 通常ã€è©³ç´°ãƒ•ォームã«ã¯ãƒªã‚¹ãƒˆã‚µãƒ–フォームより多ãã®æƒ…å ±ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ 詳細フォームã¯ã€ã‚µãƒ–フォームã¨åŒã˜ãƒ†ãƒ¼ãƒ–ルã«å±žã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 典型的ã«ã¯ã€å‡ºåŠ›ãƒ•ã‚©ãƒ¼ãƒ ã‚’ãƒªã‚¹ãƒˆãƒ•ã‚©ãƒ¼ãƒ  ã«ã€å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã‚’è©³ç´°ãƒ•ã‚©ãƒ¼ãƒ ã«æŒ‡å®šã—ã¾ã™ã€‚ 詳細フォームを指定ã—ãªã„å ´åˆã€4Dã¯è‡ªå‹•ã§ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ•ォルト入力フォームを使用ã—ã¾ã™ã€‚ -- 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- | -| 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 | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | ------------------------------------------------------------------------------------- | +| detailForm | string | テーブルã¾ãŸã¯ãƒ—ロジェクトフォームã®åå‰ (文字列), フォームを定義ã™ã‚‹ .json ファイルã¸ã® POSIX パス (文字列), ã¾ãŸã¯ãƒ•ォームを定義ã™ã‚‹ã‚ªãƒ–ジェクト | #### 対象オブジェクト -[Subform](subform_overview.md) - -* * * +[サブフォーム](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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------------------------- | ------ | ---------------------------------- | -| doubleClickInEmptyAreaAction | string | "addSubrecord" or "" to do nothing | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------------------------- | ------ | --------------------------- | +| doubleClickInEmptyAreaAction | string | "addSubrecord", 何もã—ãªã„å ´åˆã¯ "" | #### 対象オブジェクト -[Subform](subform_overview.md) - -#### See also +[サブフォーム](subform_overview.md) -[Double click on row](#double-click-on-row) - -* * * +#### å‚ç…§ +[行をダブルクリック](#行をダブルクリック) +--- ## 行をダブルクリック -`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. +* **何もã—ãªã„** (デフォルト): 行をダブルクリックã—ã¦ã‚‚自動アクションã¯ç™ºå‹•ã—ã¾ã›ã‚“。 +* **レコード編集**: 行をダブルクリックã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆã‚µãƒ–フォームã«è¨­å®šã•れ㟠[詳細フォーム](#詳細フォーム) ã«å½“該レコードãŒè¡¨ç¤ºã•れã¾ã™ã€‚ レコードã¯èª­ã¿æ›¸ãå¯èƒ½ãƒ¢ãƒ¼ãƒ‰ã§é–‹ã‹ã‚Œã‚‹ã®ã§ã€ç·¨é›†ãŒå¯èƒ½ã§ã™ã€‚ +* **レコード表示**: レコード編集ã¨åŒæ§˜ã®æŒ™å‹•ã‚’ã—ã¾ã™ãŒã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯èª­ã¿å–り専用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚ã€ç·¨é›†ã¯ã§ãã¾ã›ã‚“。 -Regardless of the action selected/chosen, the `On Double clicked` form event is generated. +é¸æŠžã•れã¦ã„るアクションã«é–¢ã‚らãšã€`On Double Clicked` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ -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). +「レコード編集ã€ã€Œãƒ¬ã‚³ãƒ¼ãƒ‰è¡¨ç¤ºã€ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«é–¢ã—ã¦ã¯ `On Open Detail` フォームイベントも生æˆã•れã¾ã™ã€‚ リストボックスã«é–¢é€£ä»˜ã‘られãŸè©³ç´°ãƒ•ォームã«è¡¨ç¤ºã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ãŒé–‰ã˜ã‚‰ã‚Œã‚‹éš›ã«ã¯ `On Close Detail` フォームイベントãŒç”Ÿæˆã•れã¾ã™ (レコードãŒç·¨é›†ã•れãŸã‹ã©ã†ã‹ã¯å•ã„ã¾ã›ã‚“)。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------------------- | ------ | ----------------------------------- | | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - #### 対象オブジェクト -[Subform](subform_overview.md) +[サブフォーム](subform_overview.md) -#### See also -[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). +> ã“れをãŠã“ãªã†ã«ã¯ã€æ›´æ–°ã™ã‚‹ãƒ•ィールド上㧠2回クリックをãŠã“ãªã„ã€ç·¨é›†ãƒ¢ãƒ¼ãƒ‰ã«ã—ã¾ã™ (ダブルクリックã«ãªã‚‰ãªã„よã†ã‚¯ãƒªãƒƒã‚¯ã®é–“隔をã‚ã‘ãªã‘れã°ãªã‚Šã¾ã›ã‚“)。 -> 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------------- | ------- | ----------- | | enterableInList | boolean | true, false | #### 対象オブジェクト -[Subform](subform_overview.md) - -* * * +[サブフォーム](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. +リストサブフォームをデータ入力ã«ä½¿ç”¨ã™ã‚‹ã«ã¯ 2ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™ã€‚一ã¤ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚µãƒ–フォームã«ç›´æŽ¥ãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹æ–¹æ³•ã§ã™ã€‚ã‚‚ã†ä¸€ã¤ã¯ [入力フォーム](#詳細フォーム) ã‚’é–‹ã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚’入力ã™ã‚‹æ–¹æ³•ã§ã™ã€‚ 後者ã®è¨­å®šã§ã¯ã€ã‚µãƒ–フォームã¨ã—ã¦ä½¿ç”¨ã•れるフォームãŒãƒªã‚¹ãƒˆãƒ•ォーム〠入力ã®ãŸã‚ã«ä½¿ç”¨ã•れるフォームãŒè©³ç´°ãƒ•ォームã¨ãªã‚Šã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- | -| 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 | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------- | ------ | ------------------------------------------------------------------------------------- | +| listForm | string | テーブルã¾ãŸã¯ãƒ—ロジェクトフォームã®åå‰ (文字列), フォームを定義ã™ã‚‹ .json ファイルã¸ã® POSIX パス (文字列), ã¾ãŸã¯ãƒ•ォームを定義ã™ã‚‹ã‚ªãƒ–ジェクト | #### 対象オブジェクト -[Subform](subform_overview.md) +[サブフォーム](subform_overview.md) -* * * -## Source -Specifies the table that the list subform belongs to (if any). +--- +## ソース -#### JSON 文法 +リストサブフォームãŒå±žã™ã‚‹ãƒ†ãƒ¼ãƒ–ル (ã‚れã°) を指定ã—ã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----- | ------ | --------------------------------- | -| table | string | 4D table name, or "" if no table. | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----- | ------ | ----------------------- | +| table | string | 4D テーブルå, テーブルãªã—ã®å ´åˆã¯ "" | #### 対象オブジェクト -[Subform](subform_overview.md) - -* * * +[サブフォーム](subform_overview.md) +--- ## é¸æŠžãƒ¢ãƒ¼ãƒ‰ -Designates the option for allowing users to select rows: +リストボックス行ã®é¸æŠžãƒ¢ãƒ¼ãƒ‰ã‚’指定ã—ã¾ã™: +- **ãªã—**: è¡Œã‚’é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 [リスト更新å¯](properties_Entry.md#リスト更新å¯) オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã‚’除ãã€ãƒªã‚¹ãƒˆã‚’クリックã—ã¦ã‚‚効果ã¯ã‚りã¾ã›ã‚“。 ナビゲーションキーを使用ã—ã¦ã‚‚ã€ãƒªã‚¹ãƒˆã‚’スクロールã™ã‚‹ã ã‘ã¨ãªã‚Šã€ãã®éš›ã« `On Selection Change` フォームイベントã¯ç”Ÿæˆã•れã¾ã›ã‚“。 +- **å˜ä¸€**: 一度ã«ä¸€è¡Œã®ã¿é¸æŠžã§ãã¾ã™ã€‚ クリックã™ã‚‹ã“ã¨ã§ã€è¡Œã‚’é¸æŠžã§ãã¾ã™ã€‚ **Ctrl+クリック** (Windows) ã‚„ **Command+クリック** (macOS) を使ã†ã¨ã€å¯¾è±¡è¡Œã®é¸æŠžçŠ¶æ…‹ (é¸æŠžãƒ»éžé¸æŠž) ãŒåˆ‡ã‚Šæ›¿ã‚りã¾ã™ã€‚ + 上下キーを使ã†ã¨ãƒªã‚¹ãƒˆã®å‰å¾Œã®è¡ŒãŒé¸æŠžã•れã¾ã™ã€‚ ãã®ä»–ã®ãƒŠãƒ“ゲーションキーã¯ãƒªã‚¹ãƒˆã‚’スクロールã—ã¾ã™ã€‚ カレントã®è¡ŒãŒå¤‰æ›´ã•れるãŸã³ã«ã€`On Selection Change` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ +- **複数**: 標準ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’使用ã—ã¦è¤‡æ•°è¡Œã‚’åŒæ™‚ã«é¸æŠžã§ãã¾ã™ã€‚ + - é¸æŠžã•れãŸã‚µãƒ–レコード㯠`GET HIGHLIGHTED RECORDS` ã§å–å¾—ã§ãã¾ã™ã€‚ + - レコードã¯ã‚¯ãƒªãƒƒã‚¯ã«ã‚ˆã‚Šé¸æŠžã•れã¾ã™ãŒã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¬ã‚³ãƒ¼ãƒ‰ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 + - **Ctrl+クリック** (Windows) ã‚„ **Command+クリック** (macOS) を使ã†ã¨ã€å¯¾è±¡ãƒ¬ã‚³ãƒ¼ãƒ‰ã®é¸æŠžçŠ¶æ…‹ (é¸æŠžãƒ»éžé¸æŠž) ãŒåˆ‡ã‚Šæ›¿ã‚りã¾ã™ã€‚ 上下キーを使ã†ã¨ãƒªã‚¹ãƒˆã®å‰å¾Œã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒé¸æŠžã•れã¾ã™ã€‚ ãã®ä»–ã®ãƒŠãƒ“ゲーションキーã¯ãƒªã‚¹ãƒˆã‚’スクロールã—ã¾ã™ã€‚ é¸æŠžãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå¤‰æ›´ã•れるãŸã³ã«ã€`On Selection Change` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ -- **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 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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ---------------------------- | | selectionMode | string | "multiple", "single", "none" | - #### 対象オブジェクト -[Subform](subform_overview.md) \ No newline at end of file +[サブフォーム](subform_overview.md) diff --git a/website/translated_docs/ja/FormObjects/properties_Text.md b/website/translated_docs/ja/FormObjects/properties_Text.md index 8d69f6c8f9f918..6c5a67fbaa353f 100644 --- a/website/translated_docs/ja/FormObjects/properties_Text.md +++ b/website/translated_docs/ja/FormObjects/properties_Text.md @@ -3,339 +3,391 @@ id: propertiesText title: テキスト --- -* * * +--- +## ピッカーã®ä½¿ç”¨ã‚’è¨±å¯ -## Allow font/color picker +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹ã¨ã€[OPEN FONT PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-FONT-PICKER.301-4505612.ja.html) ã¾ãŸã¯ [OPEN COLOR PICKER](https://doc.4d.com/4Dv18/4D/18/OPEN-COLOR-PICKER.301-4505611.ja.html) を使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ•ォントピッカー/カラーピッカーを呼ã³å‡ºã™ã“ã¨ã‚’許å¯ã—ã¾ã™ã€‚ ã“れらã®ãƒ”ッカーウィンドウを使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ãƒ•ォームオブジェクトã®ãƒ•ォントやカラーをクリックã«ã‚ˆã£ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ ã“ã®ãƒ—ロパティãŒç„¡åйã«ãªã£ã¦ã„る㨠(デフォルト)ã€ãƒ”ッカーを開ãコマンドã¯ä½¿ç”¨ã§ãã¾ã›ã‚“。 -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 文法 -| プロパティ | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------------- | ------- | --------------------- | -| allowFontColorPicker | boolean | false (default), true | - +| プロパティ | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------------- | ------- | ------------------- | +| allowFontColorPicker | boolean | false (デフォルト), true | #### 対象オブジェクト [入力](input_overview.md) -* * * - +--- ## 太字 -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.** +ã“ã®ãƒ—ロパティ㯠[**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-FONT-STYLE.301-4505468.ja.html) コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ã“れã¯é€šå¸¸ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚
          **ã“れã¯å¤ªå­—ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚** #### JSON 文法 | プロパティ | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------- | ------ | ---------------- | -| fontWeight | テキスト | "normal", "bold" | - +| fontWeight | text | "normal", "bold" | #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) -* * * +--- ## イタリック -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.* +ã“ã®ãƒ—ロパティ㯠[**OBJECT SET FONT STYLE**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-FONT-STYLE.301-4505468.ja.html) コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ã“れã¯é€šå¸¸ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚
          *ã“れã¯ã‚¤ã‚¿ãƒªãƒƒã‚¯ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚* #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------- | ------ | ------------------ | | fontStyle | string | "normal", "italic" | - #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) -* * * -## 下線 -Sets the text to have a line running beneath it. -> This is normal text. -> This is underlined text. +--- +## 下線 +é¸æŠžãƒ†ã‚­ã‚¹ãƒˆã®ä¸‹ã«ç·šã‚’引ãã¾ã™ã€‚ +> ã“れã¯é€šå¸¸ã®ãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚
          ã“れã¯ä¸‹ç·šã®ä»˜ã„ãŸãƒ†ã‚­ã‚¹ãƒˆã§ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | -------------- | ------ | --------------------- | | textDecoration | string | "normal", "underline" | - #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) + -* * * + + + +--- ## フォント -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. ### フォントテーマ -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: +フォントテーマプロパティã«ã¯ã€è‡ªå‹•スタイルã®åå‰ã‚’指定ã—ã¾ã™ã€‚ 自動スタイルã¯ã€ã‚ªãƒ–ジェクトã«ä½¿ã‚れるフォントファミリー・フォントサイズ・フォントカラーをシステムパラメーターã«å¿œã˜ã¦å‹•çš„ã«å®šã‚ã¾ã™ã€‚ ã“れらã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¯æ¬¡ã«ä¾å­˜ã—ã¾ã™: -- the platform, -- the system language, -- and the type of form object. +- プラットフォーム +- システム言語 +- フォームオブジェクトã®ã‚¿ã‚¤ãƒ— -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: +3ã¤ã®ãƒ•ã‚©ãƒ³ãƒˆãƒ†ãƒ¼ãƒžãŒæä¾›ã•れã¦ã„ã¾ã™: +- **normal**: フォームエディター内ã§ä½œæˆã•ã‚ŒãŸæ–°è¦ã‚ªãƒ–ジェクトã«ãƒ‡ãƒ•ォルトã§é©ç”¨ã•れる自動スタイルã§ã™ã€‚ +- **main** ãŠã‚ˆã³ **additional** フォントテーマ㯠[テキストエリア](text.md) 㨠[入力](input_overview.md) オブジェクトã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ ã“れらã®ãƒ†ãƒ¼ãƒžã¯ã€ãŠã‚‚ã«ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã®ãƒ‡ã‚¶ã‚¤ãƒ³ã‚’ç›®çš„ã«æä¾›ã•れã¦ã„ã¾ã™ã€‚ インターフェースウィンドウã«ãŠã„㦠main ãƒ•ã‚©ãƒ³ãƒˆãƒ†ãƒ¼ãƒžã¯æœ¬æ–‡ç”¨ã€additional テーマã¯è©³ç´°æƒ…報を追記ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ 下㫠macOS ãŠã‚ˆã³ Windows ã«ã¦ã“れらã®ãƒ•ォントテーマを使ã£ãŸãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã®ä¾‹ã‚’示ã—ã¾ã™: ![](assets/en/FormObjects/FontThemes.png) -> Font themes manage the font as well as its size and color. You can apply custom style properties (Bold, Italic or Underline) without altering its functioning. +> フォントテーマã¯ãƒ•ォントã ã‘ã§ãªãã€ã‚µã‚¤ã‚ºã‚„カラーも定ã‚ã¾ã™ã€‚ 一部ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¹ã‚¿ã‚¤ãƒ«ãƒ—ロパティ (太字ã€ã‚¤ã‚¿ãƒªãƒƒã‚¯ã€ä¸‹ç·š) ã¯å‹•作ã«å½±éŸ¿ãªãé©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------- | ------ | ------------------------------ | | fontTheme | string | "normal", "main", "additional" | #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) -### Font Family -There are two types of font family names: -* *family-name:* The name of a font-family, like "times", "courier", "arial", etc. -* *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. -#### JSON 文法 +次㮠2種類ã®ãƒ•ォントファミリーãŒå­˜åœ¨ã—ã¾ã™: + +* *フォントファミリー:* "times", "courier", "arial" ãªã©ã®ãƒ•ォントファミリーã®å称。 +* *ç·ç§°ãƒ•ァミリー:* "serif", "sans-serif", "cursive", "fantasy", "monospace" ãªã©ã®æ±Žç”¨ãƒ•ァミリーã®å称。 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | -------------------- | -| fontFamily | string | CSS font family name | +ã“ã®ãƒ—ロパティ㯠[**OBJECT SET FONT**](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-FONT.301-4505454.ja.html) コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ã“れ㯠游ゴシック フォントã§ã™ã€‚
          ã“ã‚Œã¯ æ¸¸æ˜Žæœ ãƒ•ã‚©ãƒ³ãƒˆã§ã™ã€‚ +#### JSON 文法 -> 4D recommends using only [web safe](https://www.w3schools.com/cssref/css_websafe_fonts.asp) fonts. +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | -------------- | +| fontFamily | string | CSS フォントファミリーå | +> 4D ã§ã¯ [Webセーフ](https://www.w3schools.com/cssref/css_websafe_fonts.asp) フォントã ã‘を使ã†ã“ã¨ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) -* * * + +--- ## フォントサイズ -Allows defining the object's font size in points. +文字ã®å¤§ãã•ã‚’ãƒã‚¤ãƒ³ãƒˆã§æŒ‡å®šã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------- | ------- | --------------------------- | -| fontSize | integer | Font size in points. 最å°å€¤: 0 | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------- | ------- | ----------------------- | +| fontSize | integer | フォントサイズ (ãƒã‚¤ãƒ³ãƒˆå˜ä½) 最å°å€¤: 0 | #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) -* * * +--- ## フォントカラー -Designates the font color. +文字ã®è‰²ã‚’指定ã—ã¾ã™ã€‚ + +> オブジェクト㮠[境界線スタイル](properties_backgrounandborder.md#境界線スタイル) ã« "標準" ã¾ãŸã¯ "ドット" ã‚’é¸æŠžã—ã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ—ロパティã¯ãã®å¢ƒç•Œç·šã®è‰²ã‚‚指定ã—ã¾ã™ã€‚ + +ã‚«ãƒ©ãƒ¼ã¯æ¬¡ã®æ–¹æ³•ã§æŒ‡å®šã§ãã¾ã™: + +* カラーãƒãƒ¼ãƒ  - 例: "red" +* 16進数値 - 例: "#ff0000" +* RGB値 - 例: "rgb(255,0,0)" -> This property also sets the color of object's [border](#border-line-style-dotted-line-type) (if any) when "plain" or "dotted" style is used. +ã“ã®ãƒ—ロパティã¯OBJECT SET RGB COLORS** コマンドã«ã‚ˆã£ã¦è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚

          -The color can be specified by: -* a color name - like "red" -* a HEX value - like "#ff0000" -* an RGB value - like "rgb(255,0,0)" -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ------ | ------ | ----------------------------------------- | -| stroke | string | any css value, "transparent", "automatic" | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ------ | ------ | ------------------------------------ | +| stroke | string | ä»»æ„ã® css値; "transparent"; "automatic" | + + #### 対象オブジェクト -[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) +[ボタン](button_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [コンボボックス](comboBox_overview.md) - [ドロップダウンリスト](dropdownList_Overview.md) - [グループボックス](groupBox.md) - [階層リスト](list_overview.md) - [入力](input_overview.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [進æ—インジケーター](progressIndicator.md) - [ルーラー](ruler.md) - [ラジオボタン](radio_overview.md) - [テキストエリア](text.md) + + + + + +--- + -* * * ## ãƒ•ã‚©ãƒ³ãƒˆã‚«ãƒ©ãƒ¼å¼ -`Selection and collection/entity selection type list boxes` +`セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³/エンティティセレクション型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` + +リストボックスã®å„行ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã—ãŸãƒ•ォントカラーをé©ç”¨ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ RGBカラーを使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã“ã®ç‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ 4Dランゲージリファレンスマニュアル㮠[OBJECT SET RGB COLORS](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-RGB-COLORS.301-4505456.ja.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -Used to apply a custom font color to each row of the list box. You must use RGB color values. For more information about this, refer to the description of the [OBJECT SET RGB COLORS](https://doc.4d.com/4Dv17R6/4D/17-R6/OBJECT-SET-RGB-COLORS.301-4311385.en.html) command in the 4D Language Reference manual. +å¼ã¾ãŸã¯å¤‰æ•° (é…列を除ã) を入力ã—ã¾ã™ã€‚ 表示ã•れる行ã”ã¨ã«å¼ã‚„変数ã¯è©•価ã•れã¾ã™ã€‚ ã“ã“ã§ã¯ [SET RGB COLORS](https://doc.4d.com/4Dv18/4D/18/SET-RGB-COLORS.302-4504454.ja.html) テーマã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +ã¾ãŸã€ã“ã®ãƒ—ロパティ㯠`LISTBOX SET PROPERTY` コマンド㫠`lk font color expression` 定数を指定ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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). +> ã“ã®ãƒ—ロパティ㯠[メタ情報å¼](properties_Text.md#メタ情報å¼) を使用ã—ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +以下ã®ä¾‹ã¯å¤‰æ•°åを使用ã—ã¦ã„ã¾ã™ã€‚**フォントカラーå¼** ã« *CompanyColor* を入力ã—ã€ãƒ•ォームメソッドã«ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: + -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) ``` + + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------------- | ------ | --------------------- | -| rowStrokeSource | string | Font color expression | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------------- | ------ | -------- | +| rowStrokeSource | string | ãƒ•ã‚©ãƒ³ãƒˆã‚«ãƒ©ãƒ¼å¼ | + + #### 対象オブジェクト -[リストボックス](listbox_overview.md#overview) +[リストボックス](listbox_overview.md) + + + +--- -* * * ## ã‚¹ã‚¿ã‚¤ãƒ«å¼ -`Selection and collection/entity selection type list boxes` +`セレクションãŠã‚ˆã³ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³/エンティティセレクション型ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` -Used to apply a custom character style to each row of the list box or each cell of the column. +リストボックスã®å„行ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸæ–‡å­—スタイルをé©ç”¨ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ -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. +å¼ã¾ãŸã¯å¤‰æ•° (é…列を除ã) を入力ã—ã¾ã™ã€‚ å¼ã‚„変数ã¯ã€è¡¨ç¤ºè¡Œã”㨠(リストボックスã®ãƒ—ロパティã®å ´åˆ) ã¾ãŸã¯è¡¨ç¤ºã‚»ãƒ«ã”㨠(リストボックス列ã®ãƒ—ロパティã®å ´åˆ) ã«è©•価ã•れã¾ã™ã€‚ ã“ã“ã§ã¯ [Font Styles](https://doc.4d.com/4Dv18/4D/18/Font-Styles.302-4504412.ja.html) テーマã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 例: + + ```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). +ã¾ãŸã€ã“ã®ãƒ—ロパティ㯠`LISTBOX SET PROPERTY` コマンド㫠`lk font style expression` 定数を指定ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + +> ã“ã®ãƒ—ロパティ㯠[メタ情報å¼](properties_Text.md#メタ情報å¼) を使用ã—ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------- | ------ | ----------------------------------------------- | -| rowStyleSource | string | Style expression to evaluate for each row/cell. | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ----------------------- | +| rowStyleSource | string | 表示ã•れる行/セルã”ã¨ã«è©•価ã•れるスタイルå¼ã€‚ | + + #### 対象オブジェクト -[List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) +[リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) + + + + + + + + +--- -* * * ## 横æƒãˆ -Horizontal location of text within the area that contains it. +エリア中ã®ãƒ†ã‚­ã‚¹ãƒˆã®æ¨ªä½ç½®ã‚’指定ã—ã¾ã™ã€‚ + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------- | ------ | ------------------------------------------------- | | textAlign | string | "automatic", "right", "center", "justify", "left" | + + #### 対象オブジェクト -[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) +[グループボックス](groupBox.md) - [リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [テキストエリア](text.md) + + + + +--- -* * * ## 縦æƒãˆ -Vertical location of text within the area that contains it. +エリア中ã®ãƒ†ã‚­ã‚¹ãƒˆã®ç¸¦ä½ç½®ã‚’指定ã—ã¾ã™ã€‚ + +**デフォルト** オプション (JSON値: `automatic`) ã®å ´åˆã¯ã€å„列ã®ãƒ‡ãƒ¼ã‚¿åž‹ã«åŸºã¥ã整列方å‘ãŒæ±ºå®šã•れã¾ã™: + +- ピクãƒãƒ£ãƒ¼ã‚’除ãã€ã™ã¹ã¦ `下` ã§ã™ã€‚ +- ピクãƒãƒ£ãƒ¼ã¯ `上` ã§ã™ã€‚ + +ã“ã®ãƒ—ロパティã¯ã€[OBJECT Get vertical alignment](https://doc.4d.com/4Dv18/4D/18/OBJECT-Get-vertical-alignment.301-4505442.ja.html) 㨠[OBJECT SET VERTICAL ALIGNMENT](https://doc.4d.com/4Dv18/4D/18/OBJECT-SET-VERTICAL-ALIGNMENT.301-4505430.ja.html) コマンドを使用ã—ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | -------------------------------------- | | verticalAlign | string | "automatic", "top", "middle", "bottom" | + + #### 対象オブジェクト -[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) +[リストボックス](listbox_overview.md) - [リストボックス列](listbox_overview.md#リストボックス列) - [リストボックスフッター](listbox_overview.md#リストボックスフッター) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) -* * * -## 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 | åž‹ | 説明 | -| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 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. | -| 無効 | 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: -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` -In the *Color* method, write the following code: +--- + + +## ãƒ¡ã‚¿æƒ…å ±å¼ + +`コレクションã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹` + +表示ã•れる行ã”ã¨ã«è©•価ã•れるå¼ã‚ã‚‹ã„ã¯å¤‰æ•°ã‚’指定ã—ã¾ã™ã€‚ 行テキスト属性全体を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ **オブジェクト変数**ã€ã‚ã‚‹ã„㯠**オブジェクトを返ã™å¼** を指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 以下ã®ã‚ªãƒ–ジェクトプロパティãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +| プロパティå | タイプ | 説明 | +| ------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| stroke | string | フォントカラー。 ä»»æ„ã® CSSカラー (例: "#FF00FF"), "automatic", "transparent" | +| fill | string | 背景色。 ä»»æ„ã® CSSカラー (例: "#F00FFF"), "automatic", "transparent" | +| fontStyle | string | "normal","italic" | +| fontWeight | string | "normal","bold" | +| textDecoration | string | "normal","underline" | +| unselectable | boolean | 対応ã™ã‚‹è¡ŒãŒé¸æŠžä¸å¯ (ã¤ã¾ã‚Šãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã“ã¨ãŒã§ããªã„状態) ã§ã‚ã‚‹ã“ã¨ã‚’指定ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã€å…¥åŠ›å¯èƒ½ã‚¨ãƒªã‚¢ã¯å…¥åŠ›å¯èƒ½ã§ã¯ãªããªã‚Šã¾ã™ (ãŸã ã— "シングルクリック編集" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹å ´åˆã‚’除ã)。 ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã‚„リストã¨ã„ã£ãŸã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«é¡žã¯å¼•ãç¶šã稼åƒã—ã¾ã™ã€‚ ã“ã®è¨­å®šã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžãƒ¢ãƒ¼ãƒ‰ãŒ "ãªã—" ã®å ´åˆã«ã¯ç„¡è¦–ã•れã¾ã™ã€‚ デフォルト値: false | +| disabled | boolean | 対応ã™ã‚‹è¡Œã‚’無効化ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れるã¨ã€å…¥åŠ›å¯èƒ½ã‚¨ãƒªã‚¢ã¯å…¥åŠ›å¯èƒ½ã§ã¯ãªããªã‚Šã¾ã™ã€‚ テキストやã€(ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€ãƒªã‚¹ãƒˆãªã©ã®) ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«é¡žã¯æš—ããªã£ã¦ã„ã‚‹ã‹ã‚°ãƒ¬ãƒ¼ã‚¢ã‚¦ãƒˆã•れã¾ã™ã€‚ デフォルト値: false | +| cell.\ | object | プロパティをå˜ä¸€ã®ã‚«ãƒ©ãƒ ã«é©ç”¨ã™ã‚‹ã¨ãã«ä½¿ç”¨ã—ã¾ã™ã€‚ \ ã«ã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚«ãƒ©ãƒ ã®ã‚ªãƒ–ジェクトåを渡ã—ã¾ã™ã€‚ **注**: "unselectable" ãŠã‚ˆã³ "disabled" プロパティã¯è¡Œãƒ¬ãƒ™ãƒ«ã§ã®ã¿å®šç¾©å¯èƒ½ã§ã™ã€‚ "セル" ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æŒ‡å®šã—ãŸå ´åˆã€ã“れらã¯ç„¡è¦–ã•れã¾ã™ã€‚ | + + + + +> ã“ã®ãƒ—ロパティã§è¨­å®šã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã¯ã€ãƒ—ロパティリスト内ã§ä»–ã®ã‚¹ã‚¿ã‚¤ãƒ«è¨­å®šãŒå¼ã«ã‚ˆã‚Šå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã«ã¯ç„¡è¦–ã•れã¾ã™ ([スタイルå¼](#スタイルå¼)ã€[フォントカラーå¼](#フォントカラーå¼)ã€[背景色å¼](#背景色å¼))。 + +**例題** + +*Color* プロジェクトメソッドã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: + + ```4d -//Color method -//Sets font color for certain rows and the background color for a specific column: +// Color メソッド +// 特定ã®è¡Œã«å¯¾ã—ã¦ãƒ•ォントカラーをã€ãã—ã¦ç‰¹å®šã®ã‚«ãƒ©ãƒ ã«å¯¾ã—ã¦èƒŒæ™¯è‰²ã‚’設定ã—ã¾ã™: C_OBJECT($0) -If(This.ID>5) //ID is an attribute of collection objects/entities +Form.meta:=New object +If(This.ID>5) // ID ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ–ジェクト/エンティティã®å±žæ€§ã§ã™ Form.meta.stroke:="purple" Form.meta.cell:=New object("Column2";New object("fill";"black")) Else @@ -344,37 +396,86 @@ End if $0:=Form.meta ``` -> See also the [This](https://doc.4d.com/4Dv17R6/4D/17-R6/This.301-4310806.en.html) command. + +**ベストプラクティス:** ã“ã®ã‚ˆã†ãªå ´åˆã«ã¯æœ€é©åŒ–ã®ãŸã‚ã€ãƒ•ォームメソッド内㧠`meta.cell` オブジェクトを作æˆã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + + +```4d + // フォームメソッド +Case of + :(Form event code=On Load) + Form.colStyle:=New object("Column2";New object("fill";"black")) +End case +``` + + +*Color* メソッドã«ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: + + + +```4d + // Color メソッド + ... + If(This.ID>5) + Form.meta.stroke:="purple" + Form.meta.cell:=Form.colStyle // より良ã„パフォーマンスã®ãŸã‚ã€åŒã˜ã‚ªãƒ–ジェクトをå†åˆ©ç”¨ã—ã¾ã™ + ... +``` + + + +> [This](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.ja.html) コマンドもå‚ç…§ã—ã¦ãã ã•ã„。 + + + + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---------- | ------ | ------------------------------------------------ | -| metaSource | string | Object expression to evaluate for each row/cell. | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---------- | ------ | ------------------------- | +| metaSource | string | 表示ã•れる行/セルã”ã¨ã«è©•価ã•れるオブジェクトå¼ã€‚ | + + #### 対象オブジェクト [リストボックス](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. + + + + + + +--- + + +## マルãƒã‚¹ã‚¿ã‚¤ãƒ« + +ã“ã®ãƒ—ロパティã¯ã€é¸æŠžã‚¨ãƒªã‚¢ã§ã‚¹ã‚¿ã‚¤ãƒ«ã®åˆ©ç”¨ã‚’å¯èƒ½ã«ã™ã‚‹ã‹ã©ã†ã‹ã‚’指定ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ プロパティリストã§ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€4D ã¯ã‚¨ãƒªã‚¢ä¸­ã® \ HTMLタグをスタイル属性ã¨ã—ã¦è§£é‡ˆã—ã¾ã™ã€‚

          + +

          + デフォルトã§ã¯ã€ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã¯æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã›ã‚“。

          -

          + + + + +

          JSON 文法

          - +
          - å + åç§° @@ -401,38 +502,50 @@ This property enables the possibility of using specific styles in the selected a
          -

          + + +

          対象オブジェクト

          -

          - 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: +

          + テキストエリアã®è§’度 (回転) を変更ã—ã¾ã™ã€‚ テキストエリアã¯ã€90°å˜ä½ã§å›žè»¢ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãれãžã‚Œã®å›žè»¢è§’度をé©ç”¨ã™ã‚‹ã¨ãã€ã‚ªãƒ–ジェクトã®å·¦ä¸‹ã®è§’ã¯å›ºå®šã•れãŸã¾ã¾ã§å›žè»¢ã—ã¦ã„ãã¾ã™:

          - +
          - Orientation value + 回転角度 - Result + 戻り値
          - 0 (default) + 0 (デフォルト) @@ -471,18 +584,23 @@ This property enables the possibility of using specific styles in the selected a
          -

          - 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. +

          + スタティックãªãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ ã®ã»ã‹ã«ã€å…¥åŠ›ä¸å¯ ã«è¨­å®šã•れ㟠入力オブジェクト も回転ã•ã›ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚ å…¥åŠ›ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ–¹å‘プロパティã«ã¦ 0°以外ã®ã‚ªãƒ—ションをé¸ã‚“ã å ´åˆã€ 入力å¯ãƒ—ロパティ㯠(é¸æŠžã•れã¦ã„ãŸå ´åˆ) 自動的ã«è§£é™¤ã•れã¾ã™ã€‚ ãã®éš›ã€ã“ã®ã‚ªãƒ–ジェクトã¯å…¥åЛ順ã‹ã‚‰è‡ªå‹•çš„ã«é™¤å¤–ã•れã¾ã™ã€‚

          -

          + + + + + +

          JSON 文法

          - +
          - å + åç§° @@ -509,40 +627,51 @@ This property enables the possibility of using specific styles in the selected a
          -

          + + +

          対象オブジェクト

          -

          - Input (non-enterable) - Text Area +

          + 入力 (入力ä¸å¯) - テキストエリア

          + + + + + +
          -

          + +

          行フォントカラーé…列

          -

          - 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. +

          + å€é•·æ•´æ•°åž‹ã®é…列ã®åå‰ã‚’入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 é…列ã®ãれãžã‚Œã®è¦ç´ ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œ (ã‚ã‚‹ã„ã¯åˆ—ã®ã‚»ãƒ«) ã«å¯¾å¿œã—ã¾ã™ã€‚ã¤ã¾ã‚Šã“ã®é…列ã¯ã€å„列ã«é–¢é€£ã¥ã‘られã¦ã„ã‚‹é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 ã“ã“ã§ã¯ SET RGB COLORS テーマã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã‚‚ã—上ã®ãƒ¬ãƒ™ãƒ«ã§å®šç¾©ã•れã¦ã„る背景色をãã®ã¾ã¾ã‚»ãƒ«ã«ç¶™æ‰¿ã—ãŸã„å ´åˆã«ã¯ã€å¯¾å¿œã™ã‚‹é…列ã®è¦ç´ ã« -255 を渡ã—ã¾ã™ã€‚

          -

          + + +

          JSON 文法

          - +
          - å + åç§° @@ -564,45 +693,57 @@ This property enables the possibility of using specific styles in the selected a - The name of a longint array + å€é•·æ•´æ•°åž‹é…列ã®åå‰
          -

          + + +

          対象オブジェクト

          -

          - List Box - List Box Column +

          + リストボックス - リストボックス列

          + + + + + +
          -

          + +

          行スタイルé…列

          -

          - 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. +

          + å€é•·æ•´æ•°åž‹ã®é…列ã®åå‰ã‚’入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 é…列ã®ãれãžã‚Œã®è¦ç´ ã¯ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®è¡Œ (ã‚ã‚‹ã„ã¯åˆ—ã®ã‚»ãƒ«) ã«å¯¾å¿œã—ã¾ã™ã€‚ã¤ã¾ã‚Šã“ã®é…列ã¯ã€å„列ã«é–¢é€£ã¥ã‘られã¦ã„ã‚‹é…列ã¨åŒã˜ã‚µã‚¤ã‚ºã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 é…列ã¸ã¯ã€Font Styles テーマã®å®šæ•°ã‚’使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (メソッドを使用ã—ã¦ã®å…¥åŠ›ã‚‚å¯èƒ½)。 定数åŒå£«ã‚’è¶³ã—åˆã‚ã›ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚’組ã¿åˆã‚ã›ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã‚‚ã—上ã®ãƒ¬ãƒ™ãƒ«ã§å®šç¾©ã•れã¦ã„るスタイルをãã®ã¾ã¾ã‚»ãƒ«ã«ç¶™æ‰¿ã—ãŸã„å ´åˆã«ã¯ã€å¯¾å¿œã™ã‚‹é…列ã®è¦ç´ ã« -255 を渡ã—ã¾ã™ã€‚

          -

          + + + +

          JSON 文法

          - +
          - å + åç§° @@ -624,59 +765,68 @@ This property enables the possibility of using specific styles in the selected a - The name of a longint array. + å€é•·æ•´æ•°åž‹é…列ã®åå‰
          -

          + + +

          対象オブジェクト

          -

          - 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 文法

          - +
          - å + åç§° @@ -698,15 +848,38 @@ This property enables the possibility of using specific styles in the selected a - true, false (default). + true, false (デフォルト)
          -

          + + +

          対象オブジェクト

          -

          +

          入力 -

          \ No newline at end of file +

          + + + + + + + + + + + + + + + + + + + + + diff --git a/website/translated_docs/ja/FormObjects/properties_TextAndPicture.md b/website/translated_docs/ja/FormObjects/properties_TextAndPicture.md index d61ed168754333..c99da2b19fe0f6 100644 --- a/website/translated_docs/ja/FormObjects/properties_TextAndPicture.md +++ b/website/translated_docs/ja/FormObjects/properties_TextAndPicture.md @@ -3,8 +3,7 @@ id: propertiesTextAndPicture title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ --- -* * * - +--- ## 背景パスå オブジェクトã®èƒŒæ™¯ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ãƒ‘スを指定ã—ã¾ã™ã€‚ [複数ã®çŠ¶æ…‹](#çŠ¶æ…‹ã®æ•°) ã‚’æŒã¤ [アイコン](#ピクãƒãƒ£ãƒ¼ãƒ‘スå) ã‚’æŒã¤ã‚ªãƒ–ジェクトã®å ´åˆã€èƒŒæ™¯ãƒ”クãƒãƒ£ãƒ¼ã«ã‚‚åŒã˜çŠ¶æ…‹ã®æ•°ãŒé©ç”¨ã•れã¾ã™ã€‚ @@ -13,34 +12,39 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ----------------------- | ------ | ------------------------------------------------------------------------------------------------------------ | -| customBackgroundPicture | string | Relative path in POSIX syntax. Must be used in conjunction with the style property with the "custom" option. | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ----------------------- | ------ | ----------------------------------------------------------- | +| customBackgroundPicture | string | POSIX シンタックスã®ç›¸å¯¾ãƒ‘ス。 style プロパティ㮠"custom" オプションã¨ä½µç”¨ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ | #### 対象オブジェクト [カスタムボタン](button_overview.md#カスタム) - [カスタムãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md#カスタム) - [カスタムラジオボタン](radio_overview.md#カスタム) -* * * + + +--- ## ボタンスタイル ボタンã®å¤–観を設定ã—ã¾ã™ã€‚ スタイルã«ã‚ˆã£ã¦ã¯ã€ç‰¹å®šã®ã‚ªãƒ—ションãŒåˆ©ç”¨ã§ããªããªã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | |:-----:|:------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| style | テキスト | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | +| style | text | "regular", "flat", "toolbar", "bevel", "roundedBevel", "gradientBevel", "texturedBevel", "office", "help", "circular", "disclosure", "roundedDisclosure", "custom" | #### 対象オブジェクト [ボタン](button_overview.md) - [ラジオボタン](radio_overview.md) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) -* * * + + +--- ## 横方å‘マージン ボタン内å´ã®æ¨ªæ–¹å‘ã®ãƒžãƒ¼ã‚¸ãƒ³ã‚µã‚¤ã‚º (ピクセルå˜ä½) を指定ã—ã¾ã™ã€‚ マージンã«ã‚ˆã‚Šã€ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³ã¨ã‚¿ã‚¤ãƒˆãƒ«ã®é ˜åŸŸã‚’制é™ã—ã¾ã™ã€‚ @@ -51,22 +55,22 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ | ------------ | --------------------------------------------------------- | | マージンãªã— | ![](assets/en/FormObjects/property_horizontalMargin1.png) | | 13 ピクセルã®ãƒžãƒ¼ã‚¸ãƒ³ | ![](assets/en/FormObjects/property_horizontalMargin2.png) | - - > ã“ã®ãƒ—ロパティ㯠[縦方å‘マージン](#縦方å‘マージン) プロパティã¨ã®çµ„ã¿åˆã‚ã›ã§æ©Ÿèƒ½ã—ã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ----------------------- | | customBorderX | number | "カスタム" スタイルã§åˆ©ç”¨å¯ã€‚ 最å°å€¤: 0 | - #### 対象オブジェクト [カスタムボタン](button_overview.md#カスタム) - [カスタムãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md#カスタム) - [カスタムラジオボタン](radio_overview.md#カスタム) -* * * + + + +--- ## アイコンã®å ´æ‰€ @@ -74,17 +78,19 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ----------------------- | | iconPlacement | string | "none", "left", "right" | - #### 対象オブジェクト -[[リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー)](listbox_overview.md#list-box-headers) +[[リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー)](listbox_overview.md#リストボックスヘッダー) + + -* * * + +--- ## アイコンオフセット ボタンクリック時ã®ã‚ªãƒ•セット値をピクセルå˜ä½ã§æŒ‡å®šã—ã¾ã™ã€‚ @@ -93,17 +99,17 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------ | ------ | ------ | | customOffset | number | 最å°å€¤: 0 | - #### 対象オブジェクト [カスタムボタン](button_overview.md#カスタム) - [カスタムãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md#カスタム) - [カスタムラジオボタン](radio_overview.md#カスタム) -* * * + +--- ## çŠ¶æ…‹ã®æ•° ã“ã®ãƒ—ロパティ㯠[ボタン](button_overview.md)ã€[ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md)ã€[ラジオボタン](radio_overview.md) ã®ã‚¢ã‚¤ã‚³ãƒ³ã¨ã—ã¦ä½¿ç”¨ã•れるピクãƒãƒ£ãƒ¼ã«å«ã¾ã‚Œã‚‹çŠ¶æ…‹ã®æ•°ã‚’指定ã—ã¾ã™ã€‚ 一般的ã«ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³ã¯ 4ã¤ã®çŠ¶æ…‹ (アクティブã€ã‚¯ãƒªãƒƒã‚¯ã€ãƒ­ãƒ¼ãƒ«ã‚ªãƒ¼ãƒãƒ¼ã€ç„¡åй) ã‚’å«ã‚“ã§ã„ã¾ã™ã€‚ @@ -113,25 +119,27 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ ![](assets/en/property_numberOfStates.png) çŠ¶æ…‹ã¯æ¬¡ã®é †ç•ªã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™: - 1. ボタン未クリック / ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹æœªé¸æŠž (変数値=0) 2. ボタンクリック / ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹é¸æŠž (変数値=1) 3. ロールオーãƒãƒ¼ -4. 無効 +4. disabled + #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ---------- | ------ | ------ | | iconFrames | number | 最å°å€¤: 1 | - #### 対象オブジェクト [ボタン](button_overview.md) ([ヘルプ](button_overview.md#ヘルプ)ボタンを除ã) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ラジオボタン](radio_overview.md) -* * * + + + +--- ## ピクãƒãƒ£ãƒ¼ãƒ‘スå オブジェクトã®ã‚¢ã‚¤ã‚³ãƒ³ã«ä½¿ç”¨ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ã®ãƒ‘スを指定ã—ã¾ã™ã€‚ @@ -142,45 +150,46 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| ---- | ------- | ------------------------------- | -| icon | picture | POSIX シンタックスã®ç›¸å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ•ァイルシステムパス | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| ---- | ------ | ------------------------------- | +| icon | ピクãƒãƒ£ãƒ¼ | POSIX シンタックスã®ç›¸å¯¾ãƒ‘スã€ã¾ãŸã¯ãƒ•ァイルシステムパス | #### 対象オブジェクト [ボタン](button_overview.md) ([ヘルプ](button_overview.md#ヘルプ)ボタンを除ã) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [リストボックスヘッダー](listbox_overview.md#リストボックスヘッダー) - [ラジオボタン](radio_overview.md) -* * * + + +--- ## タイトル/ピクãƒãƒ£ãƒ¼ä½ç½® ã“ã®ãƒ—ロパティã¯ã‚¢ã‚¤ã‚³ãƒ³ã«å¯¾ã™ã‚‹ãƒœã‚¿ãƒ³ã‚¿ã‚¤ãƒˆãƒ«ã®ç›¸å¯¾çš„ãªä½ç½®ã‚’指定ã—ã¾ã™ã€‚ ボタン内ã«ã€ã‚¿ã‚¤ãƒˆãƒ«ã®ã¿ (関連ピクãƒãƒ£ãƒ¼ãªã—)ã€ã¾ãŸã¯ãƒ”クãƒãƒ£ãƒ¼ã®ã¿ (タイトルãªã—) ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ã“ã®ãƒ—ロパティã¯åŠ¹æžœã‚りã¾ã›ã‚“。 デフォルトã§ã¯ã€ãƒ”クãƒãƒ£ãƒ¼ã®ä¸‹éƒ¨ã«ã‚¿ã‚¤ãƒˆãƒ«ãŒç½®ã‹ã‚Œã¾ã™ã€‚ ã“ã®ãƒ—ロパティã®å„種オプションã®çµæžœã‚’次ã«ç¤ºã—ã¾ã™: -| オプション | 説明 | 例題 | -| ------ | --------------------------------------------------------- | -------------------------------------------------------------- | -| **å·¦** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®å·¦ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯å³æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_left.en.png) | -| **上** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®ä¸Šã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_top.png) | -| **å³** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®å³ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯å·¦æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_right.png) | -| **下** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®ä¸‹ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_bottom.png) | -| **中央** | アイコンã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒœã‚¿ãƒ³å†…ã§ç¸¦ã¨æ¨ªã«ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ テキストをアイコンã®ä¸­ã«çµ„ã¿è¾¼ã‚€ã‚ˆã†ãªå ´åˆã«åˆ©ç”¨ã—ã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_centered.png) | - +| オプション | 説明 | 例題 | +| --------- | --------------------------------------------------------- | -------------------------------------------------------------- | +| **å·¦** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®å·¦ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯å³æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_left.en.png) | +| **上** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®ä¸Šã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_top.png) | +| **å³** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®å³ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯å·¦æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_right.png) | +| **下** | テキストã¯ã‚¢ã‚¤ã‚³ãƒ³ã®ä¸‹ã«ç½®ã‹ã‚Œã¾ã™ã€‚ ボタンã®å†…容ã¯ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_bottom.png) | +| **中央åˆã‚ã›** | アイコンã®ãƒ†ã‚­ã‚¹ãƒˆã¯ãƒœã‚¿ãƒ³å†…ã§ç¸¦ã¨æ¨ªã«ä¸­å¤®æƒãˆã•れã¾ã™ã€‚ テキストをアイコンã®ä¸­ã«çµ„ã¿è¾¼ã‚€ã‚ˆã†ãªå ´åˆã«åˆ©ç”¨ã—ã¾ã™ã€‚ | ![](assets/en/FormObjects/property_titlePosition_centered.png) | #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ------------------------------------------ | | textPlacement | string | "left", "top", "right", "bottom", "center" | - #### 対象オブジェクト [ボタン](button_overview.md) ([ヘルプ](button_overview.md#ヘルプ)ボタンを除ã) - [ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md) - [ラジオボタン](radio_overview.md) -* * * + + +--- ## 縦方å‘マージン ボタン内å´ã®ç¸¦æ–¹å‘ã®ãƒžãƒ¼ã‚¸ãƒ³ã‚µã‚¤ã‚º (ピクセルå˜ä½) を指定ã—ã¾ã™ã€‚ マージンã«ã‚ˆã‚Šã€ãƒœã‚¿ãƒ³ã‚¢ã‚¤ã‚³ãƒ³ã¨ã‚¿ã‚¤ãƒˆãƒ«ã®é ˜åŸŸã‚’制é™ã—ã¾ã™ã€‚ @@ -191,17 +200,18 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | ------------- | ------ | ----------------------- | | customBorderY | number | "カスタム" スタイルã§åˆ©ç”¨å¯ã€‚ 最å°å€¤: 0 | - #### 対象オブジェクト [カスタムボタン](button_overview.md#カスタム) - [カスタムãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹](checkbox_overview.md#カスタム) - [カスタムラジオボタン](radio_overview.md#カスタム) -* * * + + +--- ## ãƒãƒƒãƒ—アップメニューã‚り ã“ã®ãƒ—ロパティを使用ã™ã‚‹ã¨ã€ãƒœã‚¿ãƒ³å†…ã«é€†ä¸‰è§’å½¢ã¨ã—ã¦è¡¨ã‚れるシンボルを表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®ã‚·ãƒ³ãƒœãƒ«ã¯ã€ãƒãƒƒãƒ—アップメニューãŒä»˜å±žã™ã‚‹ã“ã¨ã‚’示ã—ã¾ã™: @@ -210,6 +220,7 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ ã“ã®ã‚·ãƒ³ãƒœãƒ«ã®å¤–観ã¨ä½ç½®ã¯ã€ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã¨ãƒ—ラットフォームã«ã‚ˆã£ã¦å¤‰ã‚りã¾ã™ã€‚ + ### リンクã¨åˆ†é›¢ ãƒãƒƒãƒ—アップメニューシンボルをボタンã«ä»˜åŠ ã™ã‚‹éš›ã«ã€ãƒªãƒ³ã‚¯ã¨åˆ†é›¢ã¨ã„ã†2ã¤ã®ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: @@ -217,54 +228,25 @@ title: テキストã€ãƒ”クãƒãƒ£ãƒ¼ | リンク | 分離 | |:----------------------------------------------------:|:-------------------------------------------------------:| | ![](assets/en/FormObjects/property_popup_linked.png) | ![](assets/en/FormObjects/property_popup_separated.png) | - - > 実際㫠"分離" モードを利用ã§ãã‚‹ã‹ã©ã†ã‹ã¯ã€ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã¨ãƒ—ラットフォームã«ã‚ˆã£ã¦æ±ºã¾ã‚Šã¾ã™ã€‚ ãれãžã‚Œã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ãƒœã‚¿ãƒ³ã¨ãƒãƒƒãƒ—アップメニューã¨ã®é–¢ä¿‚ãŒæŒ‡å®šã•れã¾ã™: -
        • - ãƒãƒƒãƒ—アップメニュー㌠分離 ã—ã¦ã„ã‚‹å ´åˆã€ãƒœã‚¿ãƒ³ã®å·¦éƒ¨åˆ†ã‚’クリックã™ã‚‹ã¨ãƒœã‚¿ãƒ³ã®ã‚«ãƒ¬ãƒ³ãƒˆã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒç›´æŽ¥å®Ÿè¡Œã•れã¾ã™ã€‚ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒœã‚¿ãƒ³ã®å³å´ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ãƒãƒƒãƒ—アップメニューを使用ã—ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
        • - ãƒãƒƒãƒ—アップメニュー㌠リンク ã—ã¦ã„ã‚‹å ´åˆã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã‚‚ãƒãƒƒãƒ—アップメニューãŒè¡¨ç¤ºã•れるã ã‘ã§ã™ã€‚ ã“ã®ãƒãƒƒãƒ—アップメニュー上ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãªã„ã¨ã€å®Ÿè¡Œã¯ãŠã“ãªã‚れã¾ã›ã‚“。

          - ãƒãƒƒãƒ—アップメニューã®ç®¡ç† -

          -

          - "ãƒãƒƒãƒ—アップメニューã‚り" プロパティã¯ã€ãƒœã‚¿ãƒ³ã®ã‚°ãƒ©ãƒ•ィックé¢ã ã‘を管ç†ã™ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ ãƒãƒƒãƒ—アップメニューã¨ãã®å€¤ã®è¡¨ç¤ºã¯ã€ã™ã¹ã¦é–‹ç™ºè€…ãŒå‡¦ç†ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。具体的ã«ã¯ãƒ•ォームイベントや Dynamic pop up menuã€Pop up menu コマンドを使用ã—ã¦ã“れを処ç†ã—ã¾ã™ã€‚ -

          -

          - JSON 文法 -

          - - - - - - - - - - - - - - -
          - å - - データタイプ - - ã¨ã‚Šã†ã‚‹å€¤ -
          - popupPlacement - - string - -
        • - "none"
        • - "linked"
        • - "separated"
        • - 対象オブジェクト -

          -

          - ツールãƒãƒ¼ãƒœã‚¿ãƒ³ - ベベルボタン - è§’ã®ä¸¸ã„ã¹ã¹ãƒ«ãƒœã‚¿ãƒ³ - OS X グラデーションボタン - OS X テクスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ - Office XP ボタン - サークルボタン - カスタムボタン -

          \ No newline at end of file +
        • ãƒãƒƒãƒ—アップメニュー㌠**分離** ã—ã¦ã„ã‚‹å ´åˆã€ãƒœã‚¿ãƒ³ã®å·¦éƒ¨åˆ†ã‚’クリックã™ã‚‹ã¨ãƒœã‚¿ãƒ³ã®ã‚«ãƒ¬ãƒ³ãƒˆã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒç›´æŽ¥å®Ÿè¡Œã•れã¾ã™ã€‚ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€ãƒœã‚¿ãƒ³ã®å³å´ã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ãƒãƒƒãƒ—アップメニューを使用ã—ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚
        • ãƒãƒƒãƒ—アップメニュー㌠**リンク** ã—ã¦ã„ã‚‹å ´åˆã€ãƒœã‚¿ãƒ³ã‚’クリックã—ã¦ã‚‚ãƒãƒƒãƒ—アップメニューãŒè¡¨ç¤ºã•れるã ã‘ã§ã™ã€‚ ã“ã®ãƒãƒƒãƒ—アップメニュー上ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ãªã„ã¨ã€å®Ÿè¡Œã¯ãŠã“ãªã‚れã¾ã›ã‚“。 + + +### ãƒãƒƒãƒ—アップメニューã®ç®¡ç† + +"ãƒãƒƒãƒ—アップメニューã‚り" プロパティã¯ã€ãƒœã‚¿ãƒ³ã®ã‚°ãƒ©ãƒ•ィックé¢ã ã‘を管ç†ã™ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ ãƒãƒƒãƒ—アップメニューã¨ãã®å€¤ã®è¡¨ç¤ºã¯ã€ã™ã¹ã¦é–‹ç™ºè€…ãŒå‡¦ç†ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。具体的ã«ã¯ãƒ•ォームイベントや [Dynamic pop up menu](https://doc.4d.com/4Dv18/4D/18/Dynamic-pop-up-menu.301-4505524.ja.html)ã€[Pop up menu](https://doc.4d.com/4Dv18/4D/18/Pop-up-menu.301-4504659.ja.html) コマンドを使用ã—ã¦ã“れを処ç†ã—ã¾ã™ã€‚ + + +#### JSON 文法 + +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +|:-------------- | ------ | ---------------------------------------------------------------------------------------------------- | +| popupPlacement | string |
        • "none"
        • "linked"
        • "separated" | + + +#### 対象オブジェクト + +[ツールãƒãƒ¼ãƒœã‚¿ãƒ³](button_overview.md#ツールãƒãƒ¼) - [ベベルボタン](button_overview.md#ベベル) - [è§’ã®ä¸¸ã„ã¹ã¹ãƒ«ãƒœã‚¿ãƒ³](button_overview.md#è§’ã®ä¸¸ã„ベベル) - [OS X グラデーションボタン](button_overview.md#OS-X-グラデーション) - [OS X テクスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³](button_overview.md#OS-X-テクスãƒãƒ£ãƒ¼) - [Office XP ボタン](button_overview.md#office-XP) - [サークルボタン](button_overview.md#サークル) - [カスタムボタン](button_overview.md#カスタム) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/properties_WebArea.md b/website/translated_docs/ja/FormObjects/properties_WebArea.md index 1dcb6338051d73..aaa84d90ad275a 100644 --- a/website/translated_docs/ja/FormObjects/properties_WebArea.md +++ b/website/translated_docs/ja/FormObjects/properties_WebArea.md @@ -1,102 +1,100 @@ --- id: propertiesWebArea -title: Web Area +title: Webエリア --- -* * * +--- +## 4Dãƒ¡ã‚½ãƒƒãƒ‰ã‚³ãƒ¼ãƒ«ã‚’è¨±å¯ -## Access 4D methods +Webエリアã§å®Ÿè¡Œã•れる JavaScripe コードã‹ã‚‰ 4Dメソッドを呼ã³å‡ºã—ã¦ã€æˆ»ã‚Šå€¤ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4Dメソッドを Webエリアã‹ã‚‰å‘¼ã³å‡ºã›ã‚‹ã‚ˆã†ã«ã™ã‚‹ã«ã¯ã€ãƒ—ロパティリスト㮠"4Dメソッドコールを許å¯" ã«ãƒã‚§ãƒƒã‚¯ã‚’ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -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"). +> ã“ã®æ©Ÿèƒ½ã¯ Webエリア㌠[埋ã‚è¾¼ã¿Webレンダリングエンジンを使用](#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) ã—ã¦ã„ã‚‹å ´åˆã«é™ã‚Šã€ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ -> This property is only available if the Web area [uses the embedded Web rendering engine](#use-embedded-web-rendering-engine). +ã“ã®ãƒ—ロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ç‰¹åˆ¥ãª JavaScript オブジェクト `$4d` ㌠Webエリア内ã«ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã€ã“れを使用ã—ã¦[4Dプロジェクトメソッドã®å‘¼ã³å‡ºã—を管ç†](webArea_overview.md#4dオブジェクトã®ä½¿ç”¨) ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ -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 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------------- | ------ | ----------------------- | -| methodsAccessibility | string | "none" (default), "all" | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------------- | ------ | --------------------- | +| methodsAccessibility | string | "none" (デフォルト), "all" | #### 対象オブジェクト -[Web Area](webArea_overview.md) +[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. +å€é•·æ•´æ•°åž‹å¤‰æ•°ã®åå‰ã§ã™ã€‚ ã“ã®å¤‰æ•°ã«ã¯ 0 ã‹ã‚‰ 100 ã¾ã§ã®å€¤ãŒæ ¼ç´ã•れã€ã“ã®æ•°å€¤ã¯ Webエリアã«è¡¨ç¤ºã•れるページã®ãƒ­ãƒ¼ãƒ‰ã•れãŸãƒ‘ーセンテージを表ã—ã¾ã™ã€‚ ã“ã®å¤‰æ•°ã¯ 4D ãŒè‡ªå‹•ã§æ›´æ–°ã—ã¾ã™ã€‚手動ã§å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| -------------- | ------ | -------------------------- | -| progressSource | string | Name of a Longint variable | - +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| -------------- | ------ | ---------- | +| progressSource | string | å€é•·æ•´æ•°åž‹å¤‰æ•°ã®åå‰ | #### 対象オブジェクト -[Web Area](webArea_overview.md) +[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. +--- +## URL -Schematically, this variable functions like the address area of a Web browser. You can represent it via a text area above the Web area. +文字列型ã®å¤‰æ•°ã§ã€Webエリアã«ãƒ­ãƒ¼ãƒ‰ã•れ㟠URL ã¾ãŸã¯ãƒ­ãƒ¼ãƒ‰ä¸­ã® URL ãŒæ ¼ç´ã•れã¾ã™ã€‚ 変数㨠Webエリア間ã®é€£æºã¯åŒæ–¹å‘ã§ãŠã“ãªã‚れã¾ã™ã€‚ -### URL Variable and WA OPEN URL command +* ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ–°ã—ã„ URL を変数ã«å‰²ã‚Šå½“ã¦ã‚‹ã¨ã€ãã® URL ã¯è‡ªå‹•ã§ Webエリアã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ +* Webエリアã§ãƒ–ラウズã•れるã¨ã€è‡ªå‹•ã§å¤‰æ•°ã®å†…å®¹ãŒæ›´æ–°ã•れã¾ã™ã€‚ -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: +ã“ã®ã‚¨ãƒªã‚¢ã¯ Webブラウザーã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒãƒ¼ã®ã‚ˆã†ã«æ©Ÿèƒ½ã—ã¾ã™ã€‚ Webエリアã®ä¸Šå´ã«ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã‚’ç½®ã„ã¦ã€å†…容を表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- 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. -- When the Web area is not displayed in the form (when it is located on another page of the form), executing the [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.en.html) command has no effect, whereas assigning a value to the URL variable can be used to update the current URL. +### URL変数㨠WA OPEN URL コマンド -#### JSON 文法 +URL変数㯠[WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.ja.html) コマンドã¨åŒã˜åŠ¹æžœã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ä»¥ä¸‹ã®é•ã„ã«æ³¨æ„ã—ã¦ãã ã•ã„。 +- ドキュメントã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã€ã“ã®å¤‰æ•°ã¯ RFC準拠 ("file://c:/My%20Doc") 㪠URL ã®ã¿ã‚’å—ã‘付ã‘ã€ã‚·ã‚¹ãƒ†ãƒ ãƒ‘スå ("c:\MyDoc") ã¯å—ã‘付ã‘ã¾ã›ã‚“。 [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.ja.html) コマンドã¯ä¸¡æ–¹ã®è¨˜æ³•ã‚’å—ã‘付ã‘ã¾ã™ã€‚ +- URL変数ãŒç©ºã®æ–‡å­—列ã®å ´åˆã€Webエリア㯠URL をロードã—ã¾ã›ã‚“。 [WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.ja.html) コマンドã¯ã“ã®å ´åˆã«ã‚¨ãƒ©ãƒ¼ã‚’生æˆã—ã¾ã™ã€‚ +- URL変数ãŒãƒ—ロトコル (http, mailto, file ãªã©) ã‚’å«ã¾ãªã„å ´åˆã€Webエリア㯠"http://" を付加ã—ã¾ã™ã€‚[WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.ja.html) コマンドã¯ã“れを付加ã—ã¾ã›ã‚“。 +- WebエリアãŒãƒ•ォーム上ã§è¡¨ç¤ºã•れã¦ã„ãªã„å ´åˆ (フォームã®åˆ¥ãƒšãƒ¼ã‚¸ã« WebエリアãŒã‚ã‚‹å ´åˆç­‰)ã€[WA OPEN URL](https://doc.4d.com/4Dv18/4D/18/WA-OPEN-URL.301-4504841.ja.html) コマンドを実行ã—ã¦ã‚‚効果ã¯ã‚りã¾ã›ã‚“。一方ã€URL変数ã«å€¤ã‚’代入ã™ã‚‹ã¨ã€ã‚«ãƒ¬ãƒ³ãƒˆURL ãŒæ›´æ–°ã•れã¾ã™ã€‚ -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | -| --------- | ------ | ------ | -| urlSource | string | A URL. | +#### JSON 文法 +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| --------- | ------ | ----- | +| urlSource | string | URL | #### 対象オブジェクト -[Web Area](webArea_overview.md) +[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. +--- +## 埋ã‚è¾¼ã¿Webレンダリングエンジンを使用 + +ã“ã®ã‚ªãƒ—ションを使用ã—ã¦ã€Webエリアã§ä½¿ç”¨ã™ã‚‹æç”»ã‚¨ãƒ³ã‚¸ãƒ³ã‚’ 2ã¤ã®ã†ã¡ã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* **ãƒã‚§ãƒƒã‚¯ãªã—** - `JSON値: system` (デフォルト): ã“ã®å ´åˆã€4Dã¯ã‚·ã‚¹ãƒ†ãƒ ã®æœ€é©ãªã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã—ã¾ã™ã€‚ Windows ã§ã¯ã€4Dã¯ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•ã‚ŒãŸæœ€æ–°ã®ãƒ–ラウザー (IE11ã€MS Edgeã€ç­‰) を自動的ã«ä½¿ç”¨ã—ã¾ã™ã€‚ macOS ã§ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® WebKit (Safari) ã§ã™ã€‚ ã“ã®çµæžœã€HTML5 ã‚„ JavaScript ã®æœ€æ–° Webæç”»ã‚¨ãƒ³ã‚¸ãƒ³ã‚’自動的ã«åˆ©ç”¨ã§ãã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ ã—ã‹ã—ã€Internet Explorer/Edge 㨠WebKit é–“ã§è‹¥å¹²æç”»ã«é•ã„ãŒã§ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ +* **ãƒã‚§ãƒƒã‚¯ã‚り** - `JSON値: embedded`: ã“ã®å ´åˆã€4D㯠Google (CEF) ã® Blink エンジンを使用ã—ã¾ã™ã€‚ 埋ã‚è¾¼ã¿Webレンダリングエンジンを使用ã™ã‚‹ã¨ã€Webã‚¨ãƒªã‚¢ã®æç”»ã¨ãã®å‹•作㌠(ピクセルå˜ä½ã§ã®è‹¥å¹²ã®ç›¸é•ã‚„ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯å®Ÿè£…ã«é–¢é€£ã™ã‚‹é•ã„を除ã) プラットフォームã«é–¢ã‚らãšåŒã˜ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れるã¨ã€OS ã«ã‚ˆã‚ŠãŠã“ãªã‚れる自動更新ãªã©ã®åˆ©ç‚¹ã‚’å¾—ã‚‹ã“ã¨ãŒã§ããªããªã‚Šã¾ã™ã€‚ä½¿ç”¨ã‚¨ãƒ³ã‚¸ãƒ³ã®æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ 4D ã®ãƒªãƒªãƒ¼ã‚¹ã‚’通ã—ã¦æä¾›ã•れã¾ã™ã€‚ + +Blinkエンジンã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªåˆ¶ç´„ãŒã‚りã¾ã™: + +- [WA SET PAGE CONTENT](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PAGE-CONTENT.301-5232965.ja.html): ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹å ´åˆã€([WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.ja.html) コマンドを呼ã³å‡ºã™ã‹ã‚ã‚‹ã„ã¯ã‚¨ãƒªã‚¢ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸ URL変数ã¸ã®ä»£å…¥ã‚’通ã—ã¦) å°‘ãªãã¨ã‚‚既㫠1ページãŒã‚¨ãƒªã‚¢å†…ã«èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- [WA SET PREFERENCE](https://doc.4d.com/4Dv18/4D/18.4/WA-SET-PREFERENCE.301-5232962.ja.html) コマンド㮠`WA enable URL drop` セレクターã«ã‚ˆã£ã¦ URLドロップãŒè¨±å¯ã•れã¦ã„ã‚‹å ´åˆã€æœ€åˆã®ãƒ‰ãƒ­ãƒƒãƒ—ã‚’ã™ã‚‹å‰ã«å°‘ãªãã¨ã‚‚ 1度㯠[WA OPEN URL](https://doc.4d.com/4Dv18/4D/18.4/WA-OPEN-URL.301-5232954.ja.html) コマンドを呼ã³å‡ºã™ã‹ã€ã¾ãŸã¯ã‚¨ãƒªã‚¢ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã‚‹ URL変数㫠URL ãŒæ¸¡ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ #### JSON 文法 -| å | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | +| åç§° | データタイプ | ã¨ã‚Šã†ã‚‹å€¤ | | --------- | ------ | -------------------- | | webEngine | string | "embedded", "system" | - #### 対象オブジェクト -[Web Area](webArea_overview.md) \ No newline at end of file +[Webエリア](webArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/radio_overview.md b/website/translated_docs/ja/FormObjects/radio_overview.md index 99237cf348d163..210bedf77e6e83 100644 --- a/website/translated_docs/ja/FormObjects/radio_overview.md +++ b/website/translated_docs/ja/FormObjects/radio_overview.md @@ -1,142 +1,160 @@ --- id: radiobuttonOverview -title: Radio Button +title: ラジオボタン --- -## æ¦‚è¦ +ラジオボタンã¯ã€ãƒœã‚¿ãƒ³ã‚°ãƒ«ãƒ¼ãƒ—ã®ä¸­ã‹ã‚‰1ã¤ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãるオブジェクトã§ã™ã€‚ -Radio buttons are objects that allow the user to select one of a group of buttons. - -Usually, a radio button shows a small bullseye with text. However, radio buttons can have [various appearances](#button-styles). +ラジオボタンã¯é€šå¸¸ã€å°ã•ãªç›®çŽ‰çŠ¶ã®å††ã¨ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã—ã¾ã™ã€‚ ã—ã‹ã—ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã« [ãれ以外ã®å¤–観](#ボタンスタイル) を設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ![](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 +## ラジオボタンã®è¨­å®š -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. +ラジオボタンã¯çµ„織的ãªé›†åˆã®ä¸­ã§ä½¿ç”¨ã•れã¾ã™ã€‚ãã®é›†åˆã®ãªã‹ã‹ã‚‰ä¸€åº¦ã«ã²ã¨ã¤ã®ãƒœã‚¿ãƒ³ã—ã‹é¸æŠžã§ãã¾ã›ã‚“。 一連ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ãŒé€£æºã—ãŸçŠ¶æ…‹ã§å‹•作ã™ã‚‹ãŸã‚ã«ã¯ã€ãれらã«ã¯åŒã˜ [ラジオグループ](properties_Object.md#ラジオグループ) プロパティãŒè¨­å®šã•れã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 -Radio buttons are controlled with methods. Like all buttons, a radio button is set to 0 when the form is first opened. A method associated with a radio button executes when the button is selected. The following is an example of a group of radio buttons used in a video collection database to enter the speed of the recording (SP, LP, or EP): +ラジオボタンã®çµæžœã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’用ã„ã¦ç®¡ç†ã—ã¾ã™ã€‚ ã‚らゆるボタンã¨åŒæ§˜ã«ã€ãƒ•ォームãŒåˆã‚ã¦é–‹ã‹ã‚Œã‚‹æ™‚ラジオボタン㯠0 ã«åˆæœŸåŒ–ã•れã¦ã„ã¾ã™ã€‚ ラジオボタンãŒé¸æŠžã•れるã¨ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ 次ã®ä¾‹ã§ã¯ã€ãƒ“デオåŽé›†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚’使用ã—ã€ãƒ¬ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã®é€Ÿã• (SPã€LPã€EP) を入力ã—ã¾ã™: ![](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. +グループã®ãªã‹ã‹ã‚‰ 1ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ãã®ãƒœã‚¿ãƒ³ã«ã¯ 1 ãŒä»£å…¥ã•れã€ã‚°ãƒ«ãƒ¼ãƒ—内ã®ä»–ã®ã™ã¹ã¦ã®ãƒœã‚¿ãƒ³ã«ã¯ 0 ãŒä»£å…¥ã•れã¾ã™ã€‚ 一度ã«1ã¤ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã—ã‹é¸æŠžã§ãã¾ã›ã‚“。 +> ラジオボタンã«ã¯ [ブール型ã®å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚°ãƒ«ãƒ¼ãƒ—内ã§é¸æŠžã•れãŸãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®å¤‰æ•°ã«ã¯ true ãŒä»£å…¥ã•ã‚Œã€æ®‹ã‚Šã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®å¤‰æ•°ã«ã¯ false ãŒä»£å…¥ã•れã¾ã™ã€‚ + +ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ ¼ç´ã•れãŸå€¤ã¯ (ブールフィールドã®å ´åˆã‚’除ã) 自動ä¿å­˜ã•れã¾ã›ã‚“ã€‚å¤‰æ•°ã«æ ¼ç´ã•れãŸãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®å€¤ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã§ç®¡ç†ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + -> 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. ## ボタンスタイル -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. +ラジオ [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル)ã¯ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®å¤–観を制御ã™ã‚‹ã¨åŒæ™‚ã«ã€æä¾›ã•れるプロパティをも決定ã—ã¾ã™ã€‚ ラジオボタンã«ã¯ã€ã‚らã‹ã˜ã‚定義ã•れãŸã‚¹ã‚¿ã‚¤ãƒ«ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ãŒé©åˆ‡ã«å‹•作ã™ã‚‹ã«ã¯ã€åŒã˜ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã™ã¹ã¦åŒã˜ãƒœã‚¿ãƒ³ã‚¹ã‚¿ã‚¤ãƒ«ã«è¨­å®šã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +æ¬¡ã®æ—¢å®šã‚¹ã‚¿ã‚¤ãƒ«ãŒæä¾›ã•れã¦ã„ã¾ã™: -4D provides radio buttons in the following predefined styles: ### 通常 -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. +通常スタイルã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã€æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ (å°ã•ãªç›®çŽ‰çŠ¶ã®å††ã¨ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã—ãŸã‚‚ã®)ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒªãƒƒã‚¯ã«å¿œã˜ã¦ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ ![](assets/en/FormObjects/radio_regular.png) -In addition to initiating code execution, the Regular radio button style changes bullsey color when being hovered. +通常スタイルã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã™ã‚‹ã¨ã€"目玉" ã®è‰²ãŒå¤‰åŒ–ã—ã¾ã™ã€‚ + ### フラット -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. +フラットスタイルã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã€æ¨™æº–çš„ãªã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ (å°ã•ãªç›®çŽ‰çŠ¶ã®å††ã¨ãƒ†ã‚­ã‚¹ãƒˆã‚’表示ã—ãŸã‚‚ã®)ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒªãƒƒã‚¯ã«å¿œã˜ã¦ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã¾ã™ã€‚ ![](assets/en/FormObjects/radio_flat.png) -By default, the Flat style has a minimalist appearance. フラットボタンã®ã‚°ãƒ©ãƒ•ィック的ãªè£…é£¾ã¯æœ€å°é™ã§ã‚ã‚‹ãŸã‚ã€å°åˆ·ã•れるフォームã§ã®ä½¿ç”¨ã«é©ã—ã¦ã„ã¾ã™ã€‚ +フラットスタイルã§ã¯ã€è£…é£¾ãŒæœ€å°é™ã«æŠ‘ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ フラットボタンã®ã‚°ãƒ©ãƒ•ィック的ãªè£…é£¾ã¯æœ€å°é™ã§ã‚ã‚‹ãŸã‚ã€å°åˆ·ã•れるフォームã§ã®ä½¿ç”¨ã«é©ã—ã¦ã„ã¾ã™ã€‚ + ### ツールãƒãƒ¼ -The Toolbar radio button style is primarily intended for integration in a toolbar. +ツールãƒãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã€ä¸»ã¨ã—ã¦ãƒ„ールãƒãƒ¼ã§ä½¿ç”¨ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã¯ã€é€æ˜Žã®èƒŒæ™¯ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒãƒ‡ãƒ•ォルトã§ä»˜ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ + - *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/radio_toolbar.png) -- *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 + - *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 + + ### ベベル -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. ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: +ベベルスタイル㯠[ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã¨ä¼¼ãŸå‹•作をã—ã¾ã™ãŒã€è–„ã„グレーã®èƒŒæ™¯ã«ã‚°ãƒ¬ãƒ¼ã®æž ãŒæç”»ã•れã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ - - ![](assets/en/FormObjects/radio_bevel.png) + - *Windows* - ボタンãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã™ã€‚ + + ![](assets/en/FormObjects/radio_bevel.png) + + - *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 -- *macOS* - ボタンã¯ãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã¾ã›ã‚“。 ### è§’ã®ä¸¸ã„ベベル è§’ã®ä¸¸ã„ベベルスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯è§’ãŒä¸¸ã表示ã•れã¾ã™ã€‚ -- *Windows* - the button is identical to the [Bevel](#bevel) style. + - Windows 上ã§ã¯ã€ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨åŒã˜ã§ã™ã€‚ + + - *macOS* - è§’ãŒä¸¸ããªã£ã¦ã„ã¾ã™ã€‚ ![](assets/en/FormObjects/roundedBevel.png) -- *macOS* - è§’ãŒä¸¸ããªã£ã¦ã„ã¾ã™ã€‚ ![](assets/en/FormObjects/roundedBevel.png) ### OS Xグラデーション OS Xグラデーションスタイル㯠[ベベル](#ベベル) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ -- *Windows* - the button is identical to the [Bevel](#bevel) style. + - Windows 上ã§ã¯ã€ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ベベル](#ベベル) スタイルã¨åŒã˜ã§ã™ã€‚ + + - *macOS* - 2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ + -- *macOS* - 2トーンã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ ### OS Xテクスãƒãƒ£ãƒ¼ -The OS X Textured radio button style is nearly identical to the [Toolbar](#toolbar) style except, depending on the OS, it may have a different appearance and does not display hover. +OS Xテクスãƒãƒ£ãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã¯ [ツールãƒãƒ¼](#ツールãƒãƒ¼) スタイルã¨ã»ã¼åŒä¸€ã§ã™ãŒã€OSã«ã‚ˆã£ã¦ã¯ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼æ™‚ã®å¤‰åŒ–ãŒãªã„ã»ã‹ã€å¤–観ã®ç•°ãªã‚‹ç‚¹ãŒã‚りã¾ã™ã€‚ デフォルトã§ã€OS Xテクスãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã®å¤–è¦³ã¯æ¬¡ã®é€šã‚Šã§ã™: -- *Windows* - a toolbar-like button with a label in the center and the background is always displayed. + - *Windows* - ツールãƒãƒ¼ã‚¹ã‚¿ã‚¤ãƒ«ã®ã‚ˆã†ãªãƒœã‚¿ãƒ³ã«ä¸­å¤®é…ç½®ã®ãƒ©ãƒ™ãƒ«ãŒä»˜ãã€èƒŒæ™¯ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + + - *macOS* - ç°è‰²ã®ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹æ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 + + ![](assets/en/FormObjects/OSXTextured.png) + -- *macOS* - ç°è‰²ã®ã‚°ãƒ©ãƒ‡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹æ¨™æº–ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³ã§ã™ã€‚ 高ã•ã¯å®šç¾©æ¸ˆã¿ã§ã€å¤‰æ›´ã§ãã¾ã›ã‚“。 - - ![](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. +Office XPスタイルã¯é€šå¸¸ãƒœã‚¿ãƒ³ (標準ã®ã‚·ã‚¹ãƒ†ãƒ ãƒœã‚¿ãƒ³) よã†ãªå¤–観ã«ã€[ツールãƒãƒ¼ãƒœã‚¿ãƒ³](#ツールãƒãƒ¼ãƒœã‚¿ãƒ³) スタイルã®å‹•作を組ã¿åˆã‚ã›ãŸã‚‚ã®ã§ã™ã€‚ Office XPボタンã®å転表示ã¨èƒŒæ™¯ã®ã‚«ãƒ©ãƒ¼ã¯ã‚·ã‚¹ãƒ†ãƒ ã‚«ãƒ©ãƒ¼ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ ボタンã«ãƒžã‚¦ã‚¹ã‚ªãƒ¼ãƒãƒ¼ã—ãŸã¨ãã®è¡¨ç¤ºã¯ OS ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™: -- *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - - ![](assets/en/FormObjects/radio_xp.png) + - *Windows* - マウスオーãƒãƒ¼æ™‚ã«ã®ã¿èƒŒæ™¯ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + + ![](assets/en/FormObjects/radio_xp.png) + + - *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + -- *macOS* - 背景ã¯å¸¸ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ### 折りãŸãŸã¿/展開 -This button style can be used to add a standard collapse/expand icon. ã“れらã¯éšŽå±¤ãƒªã‚¹ãƒˆã§ä½¿ç”¨ã•れã¾ã™ã€‚ In Windows, the button looks like a [+] or a [-]; in macOS, it looks like a triangle pointing right or down. +ã“ã®ã‚¹ã‚¿ã‚¤ãƒ«ã¯æ¨™æº–ã®æŠ˜ã‚ŠãŸãŸã¿/展開アイコンを表示ã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“れらã¯éšŽå±¤ãƒªã‚¹ãƒˆã§ä½¿ç”¨ã•れã¾ã™ã€‚ Windows ã§ã¯ [+] ã¾ãŸã¯ [-] ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™ã€‚macOS ã§ã¯ã€å³ã‚„下を指ã™ä¸‰è§’ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ![](assets/en/FormObjects/checkbox_collapse.png) + + ### 開示ボタン -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. +開示ボタンスタイルãŒé©ç”¨ã•れるã¨ã€è©³ç´°æƒ…å ±ã®è¡¨ç¤º/éžè¡¨ç¤ºã«ã™ã‚‹ã®ã«ä½¿ã‚れる標準的ãªé–‹ç¤ºãƒœã‚¿ãƒ³ã¨ã—ã¦æç”»ã•れã¾ã™ã€‚ 値㌠0 ã®ã¨ãã«ã¯ãƒœã‚¿ãƒ³ã®çŸ¢å°ãŒä¸‹å‘ãã€å€¤ãŒ 1 ã®ã¨ãã¯ä¸Šå‘ãã«ãªã‚Šã¾ã™ã€‚ ![](assets/en/FormObjects/checkbox_disclosure.png) + ### カスタム -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). +カスタムスタイルã®ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã¯ã€èƒŒæ™¯ãƒ”クãƒãƒ£ãƒ¼ã‚’使用ã§ãã‚‹ã»ã‹ã€ã•ã¾ã–ã¾ãªè¿½åŠ ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã‚’ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([アイコンオフセット](properties_TextAndPicture.md#アイコンオフセット) ã‚„ [マージン](properties_TextAndPicture.md#横方å‘マージン))。 + -## Supported properties +## プロパティ一覧 -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) - [Save value](properties_Object.md#save-value) - [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) +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [タイトル](properties_Object.md#タイトル) - [ラジオグループ](properties_Object.md#ラジオグループ) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [ボタンスタイル](properties_TextAndPicture.md#ボタンスタイル) - [å·¦](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_Entry.md#ショートカット) - [表示状態](properties_Display.md#表示状態) - [フォント](properties_Text.md#フォント) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [ヘルプTips](properties_Help.md#ヘルプTips) - [メソッド](properties_Action.md#メソッド) -Additional specific properties are available depending on the [button style](#button-styles): +[ボタンスタイル](#ボタンスタイル) ã«å¿œã˜ã¦ã€æ¬¡ã®è¿½åŠ ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒä½¿ç”¨ã§ãã¾ã™: - [背景パスå](properties_TextAndPicture.md#背景パスå) - [アイコンオフセット](properties_TextAndPicture.md#アイコンオフセット) - [横方å‘マージン](properties_TextAndPicture.md#横方å‘マージン) - [縦方å‘マージン](properties_TextAndPicture.md#縦方å‘マージン) (カスタムスタイル) - [ピクãƒãƒ£ãƒ¼ãƒ‘スå](properties_TextAndPicture.md#ピクãƒãƒ£ãƒ¼ãƒ‘スå) - [çŠ¶æ…‹ã®æ•°](properties_TextAndPicture.md#çŠ¶æ…‹ã®æ•°) - [タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®](properties_TextAndPicture.md#タイトル/ピクãƒãƒ£ãƒ¼ä½ç½®) (ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã€ãƒ™ãƒ™ãƒ«ã€è§’ã®ä¸¸ã„ベベルã€OS X グラデーションã€OS X テクスãƒãƒ£ãƒ¼ã€Office XPã€ã‚«ã‚¹ã‚¿ãƒ ) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/ruler.md b/website/translated_docs/ja/FormObjects/ruler.md index 37d5c0cf65a0e1..0b84b4fdf31afe 100644 --- a/website/translated_docs/ja/FormObjects/ruler.md +++ b/website/translated_docs/ja/FormObjects/ruler.md @@ -1,23 +1,22 @@ --- id: ruler -title: Ruler +title: ルーラー --- -## æ¦‚è¦ -The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. +ルーラーã¯ã€ã‚«ãƒ¼ã‚½ãƒ«ã‚’使用ã—ã¦ç›®ç››ã‚Šä¸Šã‚’移動ã™ã‚‹ã“ã¨ã§å€¤ã‚’é¸æŠžã™ã‚‹æ¨™æº–ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースオブジェクトã§ã™ã€‚ ![](assets/en/FormObjects/indicator_ruler.png) -You can assign its [associated variable or expression](properties_Object.md#expression-type) to an enterable area (field or variable) to store or modify the current value of the object. +[割り当ã¦ã‚‰ã‚ŒãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã®å€¤ã‚’入力エリア (フィールドã¾ãŸã¯å¤‰æ•°) ã«ä»£å…¥ã—ã¦æ ¼ç´ã—ãŸã‚Šã€é€†ã«ã‚ªãƒ–ジェクトã®ç¾åœ¨å€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -For more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. +詳細ã«ã¤ã„ã¦ã¯ [インジケーターã®ä½¿ç”¨](progressIndicator.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) - [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) +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [最å°](properties_Scale.md#最å°) - [最大](properties_Scale.md#最大) - [目盛りã®ã‚¹ãƒ†ãƒƒãƒ—](properties_Scale.md#目盛りã®ã‚¹ãƒ†ãƒƒãƒ—) - [ステップ](properties_Scale.md#ステップ) - [ラベルä½ç½®](properties_Scale.md#ラベルä½ç½®) - [目盛りを表示](properties_Scale.md#目盛りを表示) - [å·¦](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [太字](properties_Text.md#太字) - [ヘルプTips](properties_Help.md#ヘルプTips) - [オブジェクトメソッド実行](properties_Action.md#オブジェクトメソッド実行) -## See also +## å‚ç…§ -- [progress indicators](progressIndicator.md) -- [steppers](stepper.md) \ No newline at end of file +- [進æ—インジケーター](progressIndicator.md) +- [ステッパー](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/shapes_overview.md b/website/translated_docs/ja/FormObjects/shapes_overview.md index 52e14d87773928..b17bacaab0aa3b 100644 --- a/website/translated_docs/ja/FormObjects/shapes_overview.md +++ b/website/translated_docs/ja/FormObjects/shapes_overview.md @@ -1,21 +1,22 @@ --- id: shapesOverview -title: Shapes +title: 図形 --- -Shapes are [static objects](formObjects_overview.md#active-and-static-objects) that can be added to 4D forms. +図形ã¯ã€4D フォームã«è¨­ç½®ã™ã‚‹ã“ã¨ã®ã§ãã‚‹ [スタティックオブジェクト](formObjects_overview.md#アクティブオブジェクトã¨ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクト) ã§ã™ã€‚ -4D forms support the following basic shapes: +次ã®åŸºæœ¬ã®å›³å½¢ãŒæä¾›ã•れã¦ã„ã¾ã™: -- rectangles -- lines -- ovals +- 四角 +- ç·š +- 楕円 -## Rectangle -A static rectangle is a decorative object for forms. Rectangles are constrained to squared shapes. +## 四角 -The design of rectangles is controlled through many properties (color, line thickness, pattern, etc.). Specifically, the [roundness](properties_CoordinatesAndSizing.md#corner-radius) of its corners can be defined. +フォーム上ã«å››è§’ã‚’é…ç½®ã™ã‚‹ã“ã¨ã§ã€è¦–覚的ãªåŠ¹æžœãŒå¾—られã¾ã™ã€‚ å››è§’ã§æç”»ã§ãã‚‹ã®ã¯é•·æ–¹å½¢ã«é™ã‚‰ã‚Œã¾ã™ã€‚ + +四角ã®ã‚°ãƒ©ãƒ•ィック属性 (線カラーã€ç·šå¹…ã€ç‚¹ç·šã‚¿ã‚¤ãƒ—ç­‰) やリサイズオプションã¯ãƒ—ロパティリストã«ã¦æŒ‡å®šã§ãã¾ã™ã€‚ è§’ã® [丸ã¿](properties_CoordinatesAndSizing.md#è§’ã®åŠå¾„) を指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/shapes_rectangle2.png) @@ -23,66 +24,70 @@ The design of rectangles is controlled through many properties (color, line thic ```4d "myRectangle": { - "type": "rectangle", //define the type of object - "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 - "borderRadius": 20 //define the roundness of the corners + "type": "rectangle", // オブジェクトタイプ + "left": 60, // フォーム上ã®åº§æ¨™ (å·¦) + "top": 160, // フォーム上ã®åº§æ¨™ (上) + "width": 100, // å¹… + "height": 20, // 高㕠+ "borderRadius": 20 // è§’ã®åŠå¾„ (丸ã¿) } ``` + #### プロパティ一覧 +[タイプ](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_CoordinatesAndSizing.md#è§’ã®åŠå¾„) - [横方å‘サイズ変更](properties_ResizingOptions.md#横方å‘サイズ変更) - [縦方å‘サイズ変更](properties_ResizingOptions.md#縦方å‘サイズ変更) - [表示状態](properties_Display.md#表示状態) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [線カラー](properties_BackgroundAndBorder.md#線カラー) - [ç·šå¹…](properties_BackgroundAndBorder.md#ç·šå¹…) - [点線タイプ](properties_BackgroundAndBorder.md#点線タイプ) + +## ç·š -[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 +ç·šã®ã‚°ãƒ©ãƒ•ィック属性 (線カラーã€ç·šå¹…ã€ç‚¹ç·šã‚¿ã‚¤ãƒ—ç­‰) やリサイズオプションã¯ãƒ—ロパティリストã«ã¦æŒ‡å®šã§ãã¾ã™ã€‚ -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 プロパティ +`startPoint` JSON プロパティã¯ã€ç·šã®å§‹ç‚¹ã‚’定義ã—ã¾ã™ (JSON例å‚ç…§)。 -### startPoint property +> フォームエディター上ã§ã¯ç·šã®å§‹ç‚¹ãŒã‚ãらã‹ãªãŸã‚ã€ãƒ—ロパティリストã«ãŠã„㦠`startPoint` プロパティã¯éžè¡¨ç¤ºã§ã™ã€‚ -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: +#### JSON 例: + +``` + "myLine": { + "type": "line", + "left": 20, + "top": 40, + "width": 100, + "height": 80, + "startPoint": "topLeft", // ç¬¬ä¸€ã®æ–¹å‘ + "strokeDashArray": "6 2" // ç ´ç·š + } +``` +çµæžœ: ![](assets/en/FormObjects/shape_line1.png) - "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", // ç¬¬äºŒã®æ–¹å‘ + "strokeDashArray": "6 2" // ç ´ç·š + } +``` +çµæžœ: ![](assets/en/FormObjects/shape_line2.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) #### プロパティ一覧 +[タイプ](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_Display.md#表示状態) - [線カラー](properties_BackgroundAndBorder.md#線カラー) - [ç·šå¹…](properties_BackgroundAndBorder.md#ç·šå¹…) - [点線タイプ](properties_BackgroundAndBorder.md#点線タイプ) - [startPoint](#startpoint-プロパティ) -[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 - -A static oval is a decorative object for forms. Oval objects can be used to draw circular shapes (when [width](properties_CoordinatesAndSizing.md#width) and [height](properties_CoordinatesAndSizing.md#height) properties are equal). +ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã«æ¥•円をé…ç½®ã™ã‚‹ã“ã¨ã§ã€è¦–覚的ãªåŠ¹æžœãŒå¾—られã¾ã™ã€‚ 楕円を使ã£ã¦å††ã‚’æãã“ã¨ãŒã§ãã¾ã™ ([å¹…](properties_CoordinatesAndSizing.md#å¹…) 㨠[高ã•](properties_CoordinatesAndSizing.md#高ã•) ã‚’åŒã˜å€¤ã«è¨­å®šã—ã¾ã™)。 ![](assets/en/FormObjects/shape_oval.png) @@ -90,15 +95,15 @@ A static oval is a decorative object for forms. Oval objects can be used to draw ```4d "myOval": { - "type": "oval", //define the type of object - "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 - "fill": "blue" //define the background color + "type": "oval", // オブジェクトタイプ + "left": 60, // フォーム上ã®åº§æ¨™ (å·¦) + "top": 160, // フォーム上ã®åº§æ¨™ (上) + "width": 100, // å¹… + "height": 20, // 高㕠+ "fill": "blue" // 塗りカラー } ``` -#### プロパティ一覧 -[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 +#### プロパティ一覧 +[タイプ](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_Display.md#表示状態) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [線カラー](properties_BackgroundAndBorder.md#線カラー) - [ç·šå¹…](properties_BackgroundAndBorder.md#ç·šå¹…) - [点線タイプ](properties_BackgroundAndBorder.md#点線タイプ) \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/spinner.md b/website/translated_docs/ja/FormObjects/spinner.md index c00237cf5dafde..cc889b54fc47a4 100644 --- a/website/translated_docs/ja/FormObjects/spinner.md +++ b/website/translated_docs/ja/FormObjects/spinner.md @@ -1,21 +1,20 @@ --- id: spinner -title: Spinner +title: スピナー --- -## æ¦‚è¦ - -The spinner is a circular indicator that displays a continuous animation, like the [Barber shop](progressIndicator.md#barber-shop). +スピナーã¯å††å½¢ã®ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã§ã€[ãƒãƒ¼ãƒãƒ¼ã‚·ãƒ§ãƒƒãƒ—](progressIndicator.md#barber-shop) ã®ã‚ˆã†ã«é€£ç¶šã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã—ã¾ã™ã€‚ ![](assets/en/FormObjects/spinner.gif) -You use this type of object to indicate that an operation such as establishing a network connection or a performing a calculation is underway. When this indicator is selected, [graphical Scale properties](properties_Scale.md) are not available. +ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトã¯é€šå¸¸ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã¸ã®æŽ¥ç¶šã‚„ã€è¨ˆç®—ãªã©ã®å‡¦ç†ãŒå®Ÿè¡Œä¸­ã§ã‚ã‚‹ã“ã¨ã‚’表ã™ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ ã“ã®ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ãŒé¸æŠžã•れるã¨ãƒ—ロパティリスト㮠[スケール](properties_Scale.md) テーマã¯éžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚ -When the form is executed, the object is not animated. You manage the animation by passing a value to its [associated variable or expression](properties_Object.md#variable-or-expression): +フォームãŒå®Ÿè¡Œã•れãŸã¨ãã€ã‚ªãƒ–ジェクトã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã¯é–‹å§‹ã•れã¾ã›ã‚“。 [割り当ã¦ã‚‰ã‚ŒãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã«å€¤ã‚’代入ã—ã¦ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’管ç†ã—ã¾ã™: -* 1 (or any value other than 0) = Start animation, -* 0 = Stop animation +* éž 0 値 = アニメーション開始 +* 0 = ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³åœæ­¢ ### プロパティ一覧 -[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 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](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_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [ヘルプTips](properties_Help.md#ヘルプTips) + \ No newline at end of file diff --git a/website/translated_docs/ja/FormObjects/splitters.md b/website/translated_docs/ja/FormObjects/splitters.md index 6c785cfd36447d..e5ce66548109f8 100644 --- a/website/translated_docs/ja/FormObjects/splitters.md +++ b/website/translated_docs/ja/FormObjects/splitters.md @@ -1,24 +1,25 @@ --- id: splitters -title: Splitter +title: スプリッター --- -## æ¦‚è¦ -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.†-Splitter are used for example in output forms so that columns can be resized: +スプリッターã¯ãƒ•ォームを2ã¤ã®ã‚¨ãƒªã‚¢ã«åˆ†å‰²ã—ã¾ã™ã€‚ユーザーã¯ã„ãšã‚Œã‹ã®æ–¹å‘ã¸ã‚¹ãƒ—リッターを移動ã—ã¦ã‚¨ãƒªã‚¢ã‚’æ‹¡ã’ãŸã‚Šç¸®ã‚ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 水平方å‘ã¾ãŸã¯åž‚ç›´æ–¹å‘ã®ã‚¹ãƒ—リッターを作æˆã§ãã¾ã™ã€‚ スプリッターã§ã¯å„オブジェクトã®ã‚µã‚¤ã‚ºèª¿æ•´ãƒ—ロパティãŒè€ƒæ…®ã•れã¾ã™ã€‚ã¤ã¾ã‚Šä½œæˆã™ã‚‹ã‚¢ãƒ—リケーションã®ã‚¤ãƒ³ã‚¿ãƒ•ェースをã™ã¹ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã€ã‚¹ãƒ—リッター㯠“プッシャー†(押ã—è¾¼ã¿ã‚¿ã‚¤ãƒ—) ã«ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +ãŸã¨ãˆã°ã€ã‚¹ãƒ—リッターã¯åˆ—ã®ã‚µã‚¤ã‚ºã‚’変更ã§ãるよã†ã€ãƒªã‚¹ãƒˆãƒ•ォームã§ä½¿ç”¨ã•れã¾ã™: ![](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. +スプリッターã®ä¸€èˆ¬çš„ãªç‰¹å¾´ã‚’ã„ãã¤ã‹æ¬¡ã«èª¬æ˜Žã—ã¾ã™: + +* ã‚らゆるタイプã®ãƒ•ォーム上ã«ã‚¹ãƒ—リッターを必è¦ãªã ã‘設置å¯èƒ½ã§ã‚りã€ä¸€ã¤ã®ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã§æ°´å¹³ã¨åž‚ç›´ã®ã‚¹ãƒ—リッターを一緒ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* スプリッターã¯ã‚ªãƒ–ジェクトを横切るã“ã¨ãŒã§ãã¾ã™ (オーãƒãƒ¼ãƒ©ãƒƒãƒ—)。 スプリッターを動ã‹ã™ã¨ã€ã“ã®ã‚ªãƒ–ジェクトã®ã‚µã‚¤ã‚ºãŒå¤‰æ›´ã•れã¾ã™ã€‚ +* フォーム上ã§ç§»å‹•ã•れãŸã‚ªãƒ–ジェクトãŒå®Œå…¨ã«è¡¨ç¤ºã•れãŸã¾ã¾ã«ãªã‚‹ã‚ˆã†ã«ã€ã¾ãŸåˆ¥ã®ã‚¹ãƒ—リッターを超ãˆãªã„よã†ã«ã€ã‚¹ãƒ—リッターã®åœæ­¢ä½ç½®ãŒè¨ˆç®—ã•れã¾ã™ã€‚ [以é™ã®ã‚ªãƒ–ジェクトを移動ã™ã‚‹](properties_ResizingOptions.md#以é™ã®ã‚ªãƒ–ジェクトを移動ã™ã‚‹) (プッシャー) プロパティをスプリッターã«å‰²ã‚Šå½“ã¦ã‚‹ã¨ã€ã‚¹ãƒ—ãƒªãƒƒã‚¿ãƒ¼ã‚’å³æ–¹å‘ã¾ãŸã¯ä¸‹æ–¹å‘ã¸å‹•ã‹ã—ã¦ã‚‚åœæ­¢ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 +* スプリッターを使用ã™ã‚‹ãƒ•ォームã®ã‚µã‚¤ã‚ºã‚’変更ã™ã‚‹ã¨ã€ãƒ•ォームãŒè¡¨ç¤ºã•れã¦ã„ã‚‹é–“ã ã‘ã€ãƒ•ã‚©ãƒ¼ãƒ ã®æ–°ã—ã„サイズãŒä¿å­˜ã•れã¾ã™ã€‚ フォームを閉ã˜ã‚‹ã¨ã€æœ€åˆã®å¤§ãã•ã«æˆ»ã‚Šã¾ã™ã€‚ -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). +ã‚¹ãƒ—ãƒªãƒƒã‚¿ãƒ¼ã¯æŒ¿å…¥ã•れるã¨ç·šã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ãã® [ç·šã®ã‚¹ã‚¿ã‚¤ãƒ«](properties_BackgroundAndBorder.md#境界線スタイル) を変更ã—ã¦ã•らã«ç´°ã„ç·šã«è¨­å®šã—ãŸã‚Šã€ç·šã®ç¨®é¡žã«ã‚ˆã£ã¦ã¯ [ç·šã®è‰²](properties_BackgroundAndBorder.md#線カラー) を設定ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ #### JSON 例: @@ -29,37 +30,37 @@ Once it is inserted, the splitter appears as a line. You can modify its [border "top": 160, "width": 100, "height": 20, - "splitterMode": "move" //pusher + "splitterMode": "move" // プッシャー } ``` -### プロパティ一覧 -[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) +### プロパティ一覧 -## Interaction with the properties of neighboring objects +[タイプ](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_ResizingOptions.md#以é™ã®ã‚ªãƒ–ジェクトを移動ã™ã‚‹) - [表示状態](properties_Display.md#表示状態) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [線カラー](properties_BackgroundAndBorder.md#線カラー) - [ヘルプTips](properties_Help.md#ヘルプTips) -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) | -| サイズ変更 | Keep original position(s), but are resized according to the splitter’s new position | | | -| Move | Are moved with the splitter | | | +フォーム上ã§ã¯ã€ã‚¹ãƒ—リッター周辺ã«ã‚ã‚‹å„オブジェクトã®ãƒªã‚µã‚¤ã‚ºã‚ªãƒ—ションã«åŸºã¥ã„ã¦ã€ã‚¹ãƒ—リッターã¨ã“れらã®ã‚ªãƒ–ジェクトã¨ãŒä½œç”¨ã—ã‚ã„ã¾ã™: +| オブジェクトã®ãƒªã‚µã‚¤ã‚ºã‚ªãƒ—ション | 水平スプリッターã®ä¸Šã€ã¾ãŸã¯åž‚直スプリッターã®å·¦ã«ã‚るオブジェクト(1) | 水平スプリッターã®ä¸‹ã€ã¾ãŸã¯åž‚直スプリッターã®å³ã«ã‚るオブジェクト (éž "プッシャー" ã®å ´åˆ) | 水平スプリッターã®ä¸‹ã€ã¾ãŸã¯åž‚直スプリッターã®å³ã«ã‚るオブジェクト ("プッシャー" ã®å ´åˆ) | +| ---------------- | ------------------------------------ | ---------------------------------------------------------------------------------- | -------------------------------------------------------- | +| ãªã— | ãã®ã¾ã¾å¤‰ã‚らãªã„ | 次ã«åœæ­¢ã™ã‚‹ã¾ã§ã‚¹ãƒ—リッターã¨ã¨ã‚‚ã«ç§»å‹• (スプリッターã¨ã®ç›¸å¯¾çš„ãªä½ç½®ã¯å¤‰æ›´ã•れãªã„)。 下ã¾ãŸã¯å³ã¸ã®ç§»å‹•時ã®åœæ­¢ä½ç½®ã¯ã‚¦ã‚¤ãƒ³ãƒ‰ã‚¦ã®å¢ƒç•Œã¾ãŸã¯åˆ¥ã®ã‚¹ãƒ—リッター。 | 無制é™ã«ã‚¹ãƒ—リッターã¨ã¨ã‚‚ã«ç§»å‹• (スプリッターã¨ã®ç›¸å¯¾çš„ãªä½ç½®ã¯å¤‰æ›´ã•れãªã„)。 åœæ­¢ã—ãªã„ (次節をå‚ç…§)。 | +| 拡大 | å…ƒã®ä½ç½®ã®ã¾ã¾ã ãŒã€ã‚¹ãƒ—ãƒªãƒƒã‚¿ãƒ¼ã®æ–°ã—ã„ä½ç½®ã«åŸºã¥ã„ã¦ã‚µã‚¤ã‚ºãŒèª¿æ•´ã•れる | | | +| 移動 | スプリッターã¨ã¨ã‚‚ã«ç§»å‹•ã™ã‚‹ | | | -*(1) You cannot drag the splitter past the right (horizontal) or bottom (vertical) side of an object located in this position.* +*(1) ã“ã®ä½ç½®ã«ã‚るオブジェクトを超ãˆã¦ã€å³å´ (æ°´å¹³)ã€ã¾ãŸã¯ä¸‹å´ (垂直) ã¸ã‚¹ãƒ—リッターをドラッグã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。* +> スプリッターãŒå®šç¾©ã•れる矩形内ã«ã™ã¹ã¦ç´ã¾ã‚‹ã‚ªãƒ–ジェクトã¯ã€ã‚¹ãƒ—リッターã¨ä¸€ç·’ã«ç§»å‹•ã—ã¾ã™ã€‚ -> An object completely contained in the rectangle that defines the splitter is moved at the same time as the splitter. +## プログラムã«ã‚ˆã‚‹ã‚¹ãƒ—リッターã®ç®¡ç† -## Managing splitters programmatically -You can associate an object method with a splitter and it will be called with the `On Clicked` event throughout the entire movement. +ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã‚’ã‚¹ãƒ—ãƒªãƒƒã‚¿ãƒ¼ã«æŒ‡å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚スプリッターを移動ã™ã‚‹é–“ `On Clicked` イベントã§ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ -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. +å„スプリッターã«ã¯ *å€é•·æ•´æ•°* 型㮠[変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®å¤‰æ•°ã¯ã‚ªãƒ–ジェクトメソッドやフォームメソッドã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®å¤‰æ•°ã®å€¤ã«ã‚ˆã‚Šã€ã‚¹ãƒ—ãƒªãƒƒã‚¿ãƒ¼ã®æœ€åˆã®ä½ç½®ã«å¯¾ã™ã‚‹ç¾åœ¨ä½ç½®ãŒãƒ”クセルå˜ä½ã§ç¤ºã•れã¾ã™ã€‚ -* 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. +* ã“ã®å€¤ãŒè² æ•°ã®å ´åˆ: スプリッターã¯ä¸Šã¾ãŸã¯å·¦æ–¹å‘ã¸ç§»å‹•ã•れã¾ã—ãŸã€‚ +* ã“ã®å€¤ãŒæ­£æ•°ã®å ´åˆ: スプリッターã¯ä¸‹ã¾ãŸã¯å³æ–¹å‘ã¸ç§»å‹•ã•れã¾ã—ãŸã€‚ +* ã“ã®å€¤ãŒ 0 ã®å ´åˆ: スプリッターã¯å…ƒã®ä½ç½®ã«ç§»å‹•ã•れã¾ã—ãŸã€‚ -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 +プログラムã«ã‚ˆã£ã¦ã‚¹ãƒ—リッターを移動ã•ã›ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ã“れをãŠã“ãªã†ã«ã¯ã€é–¢é€£ä»˜ã‘ãŸå¤‰æ•°ã®å€¤ã‚’設定ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€åž‚直スプリッター㫠`split1` ã¨ã„ã†åå‰ã®å¤‰æ•°ãŒé–¢é€£ä»˜ã‘られã¦ã„ã‚‹å ´åˆã€`split1:=-10` ã¨ã„ã†å‘½ä»¤ã‚’実行ã™ã‚‹ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰‹å‹•ã§å‹•ã‹ã™å ´åˆã¨åŒã˜ã‚ˆã†ã«ã€ã‚¹ãƒ—リッター㯠10ピクセル左方å‘ã¸ç§»å‹•ã—ã¾ã™ã€‚ 移動ãŒå®Ÿéš›ã«ãŠã“ãªã‚れるã®ã¯ã€ã“ã®å‘½ä»¤æ–‡ãŒè¨˜è¿°ã•れã¦ã„るフォームメソッドã¾ãŸã¯ã‚ªãƒ–ジェクトメソッドを実行ã—ãŠã‚ã£ãŸã¨ãã§ã™ã€‚ diff --git a/website/translated_docs/ja/FormObjects/staticPicture.md b/website/translated_docs/ja/FormObjects/staticPicture.md index 1490fbd21693eb..f4003e0d5129c8 100644 --- a/website/translated_docs/ja/FormObjects/staticPicture.md +++ b/website/translated_docs/ja/FormObjects/staticPicture.md @@ -1,27 +1,30 @@ --- id: staticPicture -title: Static picture +title: スタティックピクãƒãƒ£ãƒ¼ --- -## æ¦‚è¦ -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: +スタティックピクãƒãƒ£ãƒ¼ã¯ã€4D フォームã«è¨­ç½®ã™ã‚‹ã“ã¨ã®ã§ãã‚‹ [スタティックオブジェクト](formObjects_overview.md#アクティブオブジェクトã¨ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã‚ªãƒ–ジェクト) ã§ã€ãƒ•ォームã®è£…飾やã€èƒŒæ™¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースãªã©ã®ç›®çš„ã§ä½¿ç”¨ã•れã¾ã™ã€‚ ![](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. +スタティックピクãƒãƒ£ãƒ¼ã¯ãƒ•ã‚©ãƒ¼ãƒ å¤–ã«æ ¼ç´ã•れã€å‚ç…§ã«ã‚ˆã£ã¦æŒ¿å…¥ã•れã¾ã™ã€‚ フォームエディターã«ãŠã„ã¦ã¯ã€ã‚³ãƒ”ーペーストやドラッグ & ドロップæ“作ã«ã‚ˆã£ã¦ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼ã‚ªãƒ–ジェクトãŒä½œæˆã•れã¾ã™ã€‚ -## Format and location +> 複数ページã‚るフォーム㮠0ページã«ãƒ”クãƒãƒ£ãƒ¼ã‚’é…ç½®ã™ã‚‹ã¨ã€ãã®ãƒ”クãƒãƒ£ãƒ¼ã¯è‡ªå‹•ã§ã™ã¹ã¦ã®ãƒšãƒ¼ã‚¸ã«èƒŒæ™¯ã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ ã¾ãŸãƒ”クãƒãƒ£ãƒ¼ã‚’継承フォームã«ç½®ãã“ã¨ã‚‚ã§ãã€ãã®ãƒ•ォームを継承ã™ã‚‹ã™ã¹ã¦ã®ãƒ•ォームã®èƒŒæ™¯ã¨ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã©ã¡ã‚‰ã®æ–¹æ³•ã‚‚ã€ãれãžã‚Œã®ãƒšãƒ¼ã‚¸ã«ãƒ”クãƒãƒ£ãƒ¼ã‚’é…ç½®ã™ã‚‹ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションã®å‹•作ãŒé€Ÿããªã‚Šã¾ã™ã€‚ -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/\". -- 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. +## å½¢å¼ã¨ä¿å­˜å ´æ‰€ + +ピクãƒãƒ£ãƒ¼ã¯ 4D ãŒãƒã‚¤ãƒ†ã‚£ãƒ–ã«ç®¡ç†ã™ã‚‹ãƒ•ォーマットã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“ (4Dã¯ä¸»ãªãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットをèªè­˜ã—ã¾ã™: JPEG, PNG, BMP, SVG, GIF, ç­‰)。 + +ピクãƒãƒ£ãƒ¼ãƒ‘ã‚¹ã«æŒ‡å®šã§ãã‚‹å ´æ‰€ã¯æ¬¡ã® 2箇所ã§ã™: + +- プロジェクト㮠**Resources** フォルダー。 プロジェクト内ã®è¤‡æ•°ã®ãƒ•ォームã§ç”»åƒã‚’共有ã™ã‚‹å ´åˆã«é©åˆ‡ã§ã™ã€‚ ã“ã®å ´åˆã€ãƒ‘スå㯠"/RESOURCES/\" ã¨ãªã‚Šã¾ã™ã€‚ +- フォームフォルダー内ã®ç”»åƒç”¨ãƒ•ォルダー (ãŸã¨ãˆã°ã€**Images** ã¨å付ã‘ãŸãƒ•ォルダー)。 特定ã®ãƒ•ォームã§ã—ã‹ç”»åƒãŒä½¿ã‚れãªã„å ´åˆã‚„ã€ãã®ãƒ•ォームã®å…¨ä½“を複製ã—ã¦ãƒ—ロジェクト内ã€ã¾ãŸã¯åˆ¥ã®ãƒ—ロジェクトã«ç§»å‹•ã•ã›ãŸã„å ´åˆã«é©åˆ‡ã§ã™ã€‚ ã“ã®å ´åˆã€ãƒ‘スå㯠"<\picture path\>" ã¨ãªã‚Šã€ãƒ•ォームフォルダーを基準ã¨ã—ãŸç›¸å¯¾ãƒ‘スã§ã™ã€‚ + ## プロパティ一覧 -[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 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [CSSクラス](properties_Object.md#CSSクラス) - [パスå](properties_Picture.md#パスå) - [表示](properties_Picture.md#表示) - [å·¦](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_Display.md#表示状態) diff --git a/website/translated_docs/ja/FormObjects/stepper.md b/website/translated_docs/ja/FormObjects/stepper.md index d85ec1e53e8a0f..90cdde576bd198 100644 --- a/website/translated_docs/ja/FormObjects/stepper.md +++ b/website/translated_docs/ja/FormObjects/stepper.md @@ -1,35 +1,37 @@ --- id: stepper -title: Stepper +title: ステッパー --- -## æ¦‚è¦ - -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 - -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. +[割り当ã¦ã‚‰ã‚ŒãŸå¤‰æ•°](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã®å€¤ã‚’入力エリア (フィールドã¾ãŸã¯å¤‰æ•°) ã«ä»£å…¥ã—ã¦æ ¼ç´ã—ãŸã‚Šã€é€†ã«ã‚ªãƒ–ジェクトã®ç¾åœ¨å€¤ã‚’設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -* 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 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. +* 時間型ã®å€¤ã§ã¯æœ€å°ã€æœ€å¤§ã€[ステップ](properties_Scale.md#ステップ) プロパティã¯ç§’を表ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¹ãƒ†ãƒƒãƒ‘ーを 8:00 ã‹ã‚‰ 18:00 ã¾ã§ 10分ã®ã‚¹ãƒ†ãƒƒãƒ—ã§è¨­å®šã™ã‚‹ã«ã¯: + * [最å°](properties_Scale.md#最å°) = 28,800 (8\*60\*60) + * [最大](properties_Scale.md#最大) = 64,800 (18\*60\*60) + * [ステップ](properties_Scale.md#ステップ) = 600 (10\*60) +* 日付タイプã®å€¤ã§ã¯ [ステップ](properties_Scale.md#ステップ) プロパティã«å…¥åŠ›ã•れãŸå€¤ãŒæ—¥æ•°ã‚’表ã—ã¾ã™ã€‚ 最å°ã¨æœ€å¤§ãƒ—ロパティã¯ç„¡è¦–ã•れã¾ã™ã€‚ +> ステッパーを時間や日付変数ã«å¯¾ã—ã¦å‹•作ã•ã›ã‚‹ãŸã‚ã«ã¯ã€ãƒ—ロパティリストã§åž‹ã‚’設定ã™ã‚‹ã ã‘ã§ãªãã€[C_TIME](https://doc.4d.com/4Dv18/4D/18/C-TIME.301-4505778.ja.html) ã¾ãŸã¯ [C_DATE](https://doc.4d.com/4Dv18/4D/18/C-DATE.301-4505791.ja.html) ã‚³ãƒžãƒ³ãƒ‰ã§æ˜Žç¤ºçš„ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -For more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. +詳細ã«ã¤ã„ã¦ã¯ [インジケーターã®ä½¿ç”¨](progressIndicator.md#インジケーターã®ä½¿ç”¨) ã‚’å‚ç…§ãã ã•ã„。 ## プロパティ一覧 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [最å°](properties_Scale.md#最å°) - [最大](properties_Scale.md#最大) - [ステップ](properties_Scale.md#ステップ) - [å·¦](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#境界線スタイル) - [ヘルプTips](properties_Help.md#ヘルプTips) - [オブジェクトメソッド実行](properties_Action.md#オブジェクトメソッド実行) + + +## å‚ç…§ +- [進æ—インジケーター](progressIndicator.md) +- [ルーラー](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/ja/FormObjects/subform_overview.md b/website/translated_docs/ja/FormObjects/subform_overview.md index 86d51f25b63246..82958efb2cc3ec 100644 --- a/website/translated_docs/ja/FormObjects/subform_overview.md +++ b/website/translated_docs/ja/FormObjects/subform_overview.md @@ -1,91 +1,92 @@ --- id: subformOverview -title: Subform +title: サブフォーム --- -## æ¦‚è¦ -A subform is a form included in another form. +サブフォームã¨ã¯ã€ä»–ã®ãƒ•ォームã«çµ„ã¿è¾¼ã¾ã‚Œã‚‹ãƒ•ォームã®ã“ã¨ã§ã™ã€‚ -### Terminology -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. +サブフォームã«å®Ÿè£…ã•れãŸã‚³ãƒ³ã‚»ãƒ—トを明確ã«èª¬æ˜Žã™ã‚‹ãŸã‚ã«ã€ã„ãã¤ã‹ã®ç”¨èªžã«ã¤ã„ã¦ã“ã“ã§å®šç¾©ã—ã¾ã™: -## List subforms +* **サブフォーム**: ä»–ã®ãƒ•ォームã«çµ„ã¿è¾¼ã¾ã‚Œã‚‹ã“ã¨ã‚’æ„図ã—ãŸãƒ•ォーム。 +* **親フォーム**: 1ã¤ä»¥ä¸Šã®ã‚µãƒ–フォームをå«ã‚€ãƒ•ォーム。 +* **サブフォームコンテナー**: 親フォームã«çµ„ã¿è¾¼ã¾ã‚ŒãŸã€ã‚µãƒ–フォームã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’表示ã™ã‚‹ã‚ªãƒ–ジェクト。 +* **サブフォームインスタンス**: 親フォームã«è¡¨ç¤ºã•れãŸã‚µãƒ–フォームã®å®Ÿä½“。 ã“ã®ã‚³ãƒ³ã‚»ãƒ—トã¯ã¨ã¦ã‚‚é‡è¦ã§ã™ã€‚親フォームã«ã¯ã€åŒã˜ã‚µãƒ–フォームã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’複数表示ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã‹ã‚‰ã§ã™ã€‚ +* **リストフォーム**: データをリストã¨ã—ã¦è¡¨ç¤ºã™ã‚‹ã‚µãƒ–フォームインスタンス。 +* **詳細フォーム**: リストサブフォームをダブルクリックã™ã‚‹ã“ã¨ã§ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã€ãƒšãƒ¼ã‚¸ã‚¿ã‚¤ãƒ—ã®å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã€‚ -A list subform lets you enter, view, and modify data in other tables. You usually use list subforms in databases in which you have established One to Many relations. A list subform on a form in a related One table lets you view, enter, and modify data in a related Many table. You can have several subforms coming from different tables in the same form. However, it is not possible to place two subforms that belong to the same table on the same page of a form. -For example, a Contacts manager database might use a list subform to display all the telephone numbers for a particular contact. Although the telephone numbers appear on the Contacts screen, the information is actually stored in a related table. Using a One to Many relation, this database design makes it easy to store an unlimited number of telephone numbers per contact. With automatic relations, you can support data entry directly into the related Many table without programming. +## リストサブフォーム -Although list subforms are generally associated with Many tables, a subform instance can display the records of any other database table. +リストサブフォームを使ã†ã“ã¨ã§ã€ä»–ã®ãƒ†ãƒ¼ãƒ–ルã®ãƒ‡ãƒ¼ã‚¿ã‚’入力ã€è¡¨ç¤ºã€ãŠã‚ˆã³æ›´æ–°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 通常㯠1対NリレーションãŒè¨­å®šã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ãƒªã‚¹ãƒˆã‚µãƒ–フォームを使用ã—ã¾ã™ã€‚ リレートã•れ㟠1テーブルã®ãƒ•ォーム上ã®ãƒªã‚¹ãƒˆã‚µãƒ–フォームã§ã¯ã€ãƒªãƒ¬ãƒ¼ãƒˆã•れ㟠Nテーブルã®ãƒ‡ãƒ¼ã‚¿ã‚’入力・表示・更新ã—ã¾ã™ã€‚ 一ã¤ã®ãƒ•ォーム上ã«ã€ãれãžã‚Œç•°ãªã‚‹ãƒ†ãƒ¼ãƒ–ルã«å±žã™ã‚‹è¤‡æ•°ã®ã‚µãƒ–フォームをé…ç½®ã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãƒ•ォームã®åŒã˜ãƒšãƒ¼ã‚¸ä¸Šã«ã¯ã€åŒã˜ãƒ†ãƒ¼ãƒ–ルã«å±žã™ã‚‹ã‚µãƒ–フォームを複数é…ç½®ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -You can also allow the user to enter data in the List form. Depending on the configuration of the subform, the user may display the detail form by double-clicking on a subrecord or by using the commands for adding and editing subrecords. +ãŸã¨ãˆã°ã€é€£çµ¡å…ˆç®¡ç†ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã¯ã€ã‚る連絡先ã®ã™ã¹ã¦ã®é›»è©±ç•ªå·ã‚’表示ã™ã‚‹ãŸã‚ã«ãƒªã‚¹ãƒˆã‚µãƒ–フォームãŒä½¿ç”¨ã•れるã§ã—ょã†ã€‚ 連絡先テーブルã®ç”»é¢ã«é›»è©±ç•ªå·ãŒè¡¨ç¤ºã•れã¾ã™ãŒã€æƒ…å ±ã¯ãƒªãƒ¬ãƒ¼ãƒˆãƒ†ãƒ¼ãƒ–ãƒ«ã«æ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ 1対Nリレーションを使用ã™ã‚‹ã“ã¨ã§ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­è¨ˆã¯é€£çµ¡å…ˆã”ã¨ã«è¤‡æ•°ã®é›»è©±ç•ªå·ã‚’ç°¡å˜ã«æ ¼ç´ã§ãるよã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ 自動リレーションã«ã‚ˆã‚Šã€ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã‚‹ Nテーブルã¸ã®ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ãŒãƒ—ログラムãªã—ã§ç›´æŽ¥ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ -> 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. +リストサブフォームã¯é€šå¸¸ Nテーブルã«çµã³ä»˜ã‘られã¾ã™ãŒã€ãれã ã‘ã§ãªãä»–ã®ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’サブフォームã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«è¡¨ç¤ºã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -## 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. +> 4Dã¯ã‚µãƒ–レコードを管ç†ã™ã‚‹åŸºæœ¬çš„ãªãƒ‹ãƒ¼ã‚ºã«å¿œãˆã‚‹ 3ã¤ã®æ¨™æº–アクション `editSubrecord` (サブレコード編集)ã€`deleteSubrecord` (サブレコード削除) ãŠã‚ˆã³ `addSubrecord` (サブレコード追加) ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ フォームã«è¤‡æ•°ã®ã‚µãƒ–フォームインスタンスãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãƒ•ォーカスをæŒã£ã¦ã„るサブフォームã«ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ãŒé©ç”¨ã•れã¾ã™ã€‚ -The page subform uses the input form indicated by the [Detail Form](properties_Subform.md#detail-form) property. Unlike a list subform, the form used can come from the same table as the parent form. It is also possible to use a project form. When executed, a page subform has the same standard display characteristics as an input form. -> 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 +ページサブフォームã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆã‚µãƒ–レコードã®ãƒ‡ãƒ¼ã‚¿ã‚„ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«åŸºã¥ã関連ã™ã‚‹å€¤ (変数やピクãƒãƒ£ãƒ¼ãªã©) を表示ã§ãã¾ã™ã€‚ ページサブフォームを使用ã™ã‚‹åˆ©ç‚¹ã®ä¸€ã¤ã¯ã€ãれらãŒé«˜åº¦ãªæ©Ÿèƒ½ã‚’æä¾›ã—ãŸã‚Šã€è¦ªãƒ•ォームã¨ç›¸äº’作用ã—ãŸã‚Šã§ãã‚‹ã“ã¨ã§ã™ (ウィジェット)。 ページサブフォームã«ã¯å°‚用ã®ãƒ—ロパティやイベントãŒã‚りã€ãƒ—ログラムã‹ã‚‰å®Œå…¨ã«åˆ¶å¾¡ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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: +ページサブフォーム㯠[詳細フォーム](properties_Subform.md#詳細フォーム) ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã§æŒ‡å®šã•れãŸå…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã‚’ä½¿ç”¨ã—ã¾ã™ã€‚ リストサブフォームã¨ç•°ãªã‚Šã€ä½¿ç”¨ã•れるフォームã¯è¦ªãƒ•ォームã¨åŒã˜ãƒ†ãƒ¼ãƒ–ãƒ«ã«æ‰€å±žã—ã¦ã„ã¦ã‚‚ã‹ã¾ã„ã¾ã›ã‚“。 ã¾ãŸã€ãƒ—ロジェクトフォームを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 実行時ã€ãƒšãƒ¼ã‚¸ã‚µãƒ–フォームã¯å…¥åŠ›ãƒ•ã‚©ãƒ¼ãƒ ã¨åŒã˜æ¨™æº–ã®è¡¨ç¤ºç‰¹æ€§ã‚’æŒã¡ã¾ã™ã€‚ -![](assets/en/FormObjects/subforms1.png) +> 4Dウィジェットã¯ã€ãƒšãƒ¼ã‚¸ã‚µãƒ–フォームã«åŸºã¥ã„ãŸå®šç¾©æ¸ˆã¿ã®è¤‡åˆã‚ªãƒ–ジェクトã§ã™ã€‚ 詳細ã¯å°‚用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ [4D Widgets (ウィジェット)](https://doc.4d.com/4Dv18/4D/18/4D-Widgets.100-4690706.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### ãƒã‚¤ãƒ³ãƒ‰ã•れãŸå¤‰æ•°ã®ç®¡ç† -Both objects (time variable and subform container) *have the same variable name*. In this case, when you open the parent form, 4D synchronizes both values automatically. If the variable value is set at several locations, 4D uses the value that was loaded last. It applies the following loading order: 1-Object methods of subform 2-Form method of subform 3-Object methods of parent form 4-Form method of parent form +サブフォームã«ãƒã‚¤ãƒ³ãƒ‰ã•れ㟠[変数](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) を使用ã—㦠2ã¤ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ (親フォームã¨ã‚µãƒ–フォーム) をリンクã—ã€æ´—ç·´ã•れãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€å‹•çš„ãªæ™‚計をæä¾›ã™ã‚‹ã‚µãƒ–フォームを置ãã¨ã—ã¾ã™ã€‚ã“ã®ã‚µãƒ–フォームãŒç½®ã‹ã‚Œã‚‹è¦ªãƒ•ォームã«ã¯å…¥åŠ›å¯ã®æ™‚間型変数ãŒç½®ã‹ã‚Œã¦ã„ã¾ã™: + +![](assets/en/FormObjects/subforms1.png) -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. +両オブジェクト (時間変数ã¨ã‚µãƒ–フォームコンテナー) ã«ã¯ *åŒã˜å¤‰æ•°å* ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ ã“ã®å ´åˆã€è¦ªãƒ•ォームを開ã„ãŸã¨ãã€4Dã¯è‡ªå‹•ã§ä¸¡æ–¹ã®å€¤ã‚’åŒæœŸåŒ–ã—ã¾ã™ã€‚ 変数ã®å€¤ãŒè¤‡æ•°ã®å ´æ‰€ã§è¨­å®šã•れã¦ã„ã‚‹å ´åˆã€4Dã¯æœ€å¾Œã«ãƒ­ãƒ¼ãƒ‰ã•れãŸå€¤ã‚’使用ã—ã¾ã™ã€‚ 以下ã®ãƒ­ãƒ¼ãƒ‰é †ãŒé©ç”¨ã•れã¾ã™:
          1 - サブフォームã®ã‚ªãƒ–ジェクトメソッド
          2 - サブフォームã®ãƒ•ォームメソッド
          3 - 親フォームã®ã‚ªãƒ–ジェクトメソッド
          4 - 親フォームã®ãƒ•ォームメソッド -#### Updating subform contents +親フォームãŒå®Ÿè¡Œã•れるã¨ãã€é–‹ç™ºè€…ã¯é©åˆ‡ãªãƒ•ォームイベントを使用ã—ã¦å¤‰æ•°ã®åŒæœŸã‚’処ç†ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 2タイプã®ç›¸äº’作用 (親フォーム → サブフォームã€ã‚µãƒ–フォーム → 親フォーム) ãŒå¯èƒ½ã§ã™ã€‚ -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). +#### サブフォームã®å†…å®¹ã®æ›´æ–° +ケース1: 親フォームã®å¤‰æ•°ã®å€¤ãŒæ›´æ–°ã•れã€ã“ã®æ›´æ–°ã‚’サブフォームã«å映ã•ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ä¾‹ã§ã¯ ParisTime 変数ã®å€¤ãŒãƒ¦ãƒ¼ã‚¶ãƒ¼å…¥åŠ›ã€ã‚ã‚‹ã„ã¯å‹•的㫠(ãŸã¨ãˆã° `Current time` コマンドã§) 12:15:00 ã«å¤‰æ›´ã•れã¾ã—ãŸã€‚ -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. +ã“ã®å ´åˆã«ã¯ã€`On bound variable change` フォームイベントを使用ã—ã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚µãƒ–フォームプロパティ内ã§é¸æŠžã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã‚µãƒ–フォームã®ãƒ•ォームメソッドã§ç”Ÿæˆã•れã¾ã™ã€‚ ![](assets/en/FormObjects/subforms2.png) -The `On Bound Variable Change` form event is generated: +`On Bound Variable Change` フォームイベントã¯ä»¥ä¸‹ã®ã¨ãã«ç”Ÿæˆã•れã¾ã™: -- as soon as a value is assigned to the variable of the parent form, even if the same value is reassigned, -- if the subform belongs to the current form page or to page 0. +- 親フォームã®å¤‰æ•°ã«å€¤ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã¨ã (åŒã˜å€¤ãŒå†ä»£å…¥ã•れãŸå ´åˆã§ã‚‚) ã§ã€ +- サブフォーム㌠0ページã¾ãŸã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォームページã«ç½®ã‹ã‚Œã¦ã„ã‚‹ã¨ã。 -Note that, as in the above example, it is preferable to use the `OBJECT Get pointer` command which returns a pointer to the subform container rather than its variable because it is possible to insert several subforms in the same parent form (for example, a window displaying different time zones contains several clocks). In this case, only a pointer lets you know which subform container is at the origin of the event. +å…ˆã®ä¾‹ã®ã¨ãŠã‚Šã€ç›´æŽ¥å¤‰æ•°åを使用ã™ã‚‹ã®ã§ã¯ãªãã€ã‚µãƒ–フォームコンテナーã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’返㙠`OBJECT Get pointer` コマンドã®åˆ©ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚親フォームã«åŒã˜ã‚µãƒ–フォームを複数é…ç½®ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã ã‹ã‚‰ã§ã™ (ãŸã¨ãˆã°ã€è¤‡æ•°ã®ã‚¿ã‚¤ãƒ ã‚¾ãƒ¼ãƒ³ã‚’表示ã™ã‚‹ãŸã‚ã«æ™‚計を複数表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦)。 ã“ã®å ´åˆãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã§ã®ã¿ã€ã©ã®ã‚µãƒ–フォームコンテナーãŒã‚¤ãƒ™ãƒ³ãƒˆã®ç”Ÿæˆå…ƒã‹ã‚’知るã“ã¨ãŒã§ãã¾ã™ã€‚ -#### Updating parent form contents +#### 親フォームã®å†…å®¹ã®æ›´æ–° -Case 2: The contents of the subform are modified and this modification must be passed on to the parent form. In our example, imagine that the subform interface lets the user "manually" move the hands of the clock. +ケース2: サブフォームã®å†…å®¹ãŒæ›´æ–°ã•れã€ãã®æ›´æ–°ã‚’親フォームã«å映ã•ã›ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ä¾‹ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ™‚計ã®é‡ã‚’手動ã§å‹•ã‹ã™ã“ã¨ãŒã§ãるよã†ãªã‚µãƒ–フォームを使ã£ãŸã‚±ãƒ¼ã‚¹ã§ã™ã€‚ -In this case, from the subform, you must assign the object value to the variable of the parent subform container. As in the previous example, we recommend that you use the `OBJECT Get pointer` command with the `Object subform container` selector which returns a pointer to the subform container. +ã“ã®å ´åˆã€ã‚µãƒ–フォームã‹ã‚‰ã€è¦ªã‚µãƒ–フォームコンテナーã®å¤‰æ•°ã«ã‚ªãƒ–ジェクトã®å€¤ã‚’割り当ã¦ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 å…ˆã®ä¾‹ã®é€šã‚Šã€`OBJECT Get pointer` コマンドを `Object subform container` セレクターã¨ã¨ã‚‚ã«ä½¿ç”¨ã—ã€ã‚µãƒ–フォームコンテナーã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å¾—ã‚‹æ–¹æ³•ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ -Assigning the value to the variable generates the `On Data Change` form event in the object method of the parent subform container, which lets you perform any type of action. The event must be selected in the properties of the subform container. +変数ã«å€¤ã‚’割り当ã¦ã‚‹ã¨ã€è¦ªã‚µãƒ–フォームコンテナーã®ã‚ªãƒ–ジェクトメソッド㧠`On Data Change` フォームイベントãŒç”Ÿæˆã•れã€ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã§ãã¾ã™ã€‚ ã“ã®ã‚¤ãƒ™ãƒ³ãƒˆã¯ã€ã‚µãƒ–フォームコンテナーã®ãƒ—ロパティリストã§é¸æŠžã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ![](assets/en/FormObjects/subforms3.png) -> 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. +> 時計ã®é‡ã‚’手動ã§å‹•ã‹ã™ã¨ã€ã‚µãƒ–フォーム中㮠*clockValue* 変数ã®ã‚ªãƒ–ジェクトメソッド㧠`On Data Change` フォームイベントãŒç”Ÿæˆã•れã¾ã™ã€‚ -### Using the subform bound object +### サブフォームã«ãƒã‚¤ãƒ³ãƒ‰ã•れãŸã‚ªãƒ–ジェクトã®ä½¿ç”¨ -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. +4Dã¯è‡ªå‹•çš„ã«ã‚ªãƒ–ジェクト (`C_OBJECT`) ã‚’ãれãžã‚Œã®ã‚µãƒ–フォームã¨ãƒã‚¤ãƒ³ãƒ‰ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã®ä¸­èº«ã¯ã‚µãƒ–フォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‹ã‚‰èª­ã¿æ›¸ãå¯èƒ½ãªãŸã‚ã€ãƒ­ãƒ¼ã‚«ãƒ«ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦å€¤ã‚’共有ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -The object can be created automatically or be the parent container variable, if explicitely named and typed as Object (see below). In all cases, the object is returned by the `Form` command, which can be called directy the subform (using a pointer is useless). Since objects are always passed by reference, if the user modifies a property value in the subform, it will automatically be saved in the object itself. +オブジェクトã¯è‡ªå‹•çš„ã«ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã—ã€æ˜Žç¤ºçš„ã«å‘½åã—オブジェクトã¨ã—ã¦åž‹æŒ‡å®šã•れãŸå ´åˆã«ã¯ã€è¦ªã‚³ãƒ³ãƒ†ãƒŠãƒ¼ã®å¤‰æ•°ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ (以下å‚ç…§)。 ã„ãšã‚Œã®å ´åˆã«ã‚‚ã€ã‚ªãƒ–ジェクト㯠`Form` コマンドã«ã‚ˆã£ã¦è¿”ã•れã€ã‚µãƒ–フォームã‹ã‚‰ç›´æŽ¥å‘¼ã³å‡ºã™ã“ã¨ãŒå¯èƒ½ã§ã™ (ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®ä½¿ç”¨ã¯ä¸è¦ã§ã™)。 オブジェクトã¯å¸¸ã«å‚ç…§ã«ã‚ˆã£ã¦æ¸¡ã•れるãŸã‚ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚µãƒ–フォーム内ã§ãƒ—ロパティ値を変更ã—ãŸå ´åˆã«ã¯ã€ãã®å€¤ã¯è‡ªå‹•çš„ã«ã‚ªãƒ–ジェクト自身ã«ä¿å­˜ã•れã¾ã™ã€‚ -For example, in your subform, field labels are stored in the bound object so that you can display different languages: +ãŸã¨ãˆã°ã€ã‚µãƒ–フォームã«ãŠã„ã¦ç•°ãªã‚‹è¨€èªžã§ã®è¡¨ç¤ºã‚’å¯èƒ½ã«ã™ã‚‹ãŸã‚ã«ã€ãƒã‚¤ãƒ³ãƒ‰ã•れãŸã‚ªãƒ–ジェクトã«ãƒ•ィールドラベルãŒä¿å­˜ã•れã¦ã„ã‚‹å ´åˆã‚’考ãˆã¾ã™: ![](assets/en/FormObjects/subforms4.png) -You can modify the labels from the subform by assigning values to the *InvoiceAddress* object: +*InvoiceAddress* オブジェクトã«å€¤ã‚’割り当ã¦ã‚‹ã“ã¨ã§ã€ã‚µãƒ–フォームã®ãƒ©ãƒ™ãƒ«ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: ```4d C_OBJECT($lang) @@ -102,50 +103,49 @@ You can modify the labels from the subform by assigning values to the *InvoiceAd ![](assets/en/FormObjects/subforms5.png) -### Advanced inter-form programming +### 高度ãªãƒ•ォーム間通信プログラム +親フォームã¨ã‚µãƒ–フォームインスタンス間ã®é€šä¿¡ã§ã¯ã€ãƒã‚¤ãƒ³ãƒ‰ã—ãŸå¤‰æ•°ã‚’通ã—ã¦å€¤ã‚’交æ›ã™ã‚‹ä»¥ä¸Šã®ã“ã¨ã‚’ãŠã“ãªã†å¿…è¦ãŒã‚ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ 実際ã€è¦ªãƒ•ォームã§ãŠã“ãªã‚れãŸã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«åŸºã¥ãサブフォーム中ã®å¤‰æ•°ã‚’æ›´æ–°ã—ãŸã‚Šã€ãã®é€†ã®å‡¦ç†ã‚’ã—ãŸã„å ´åˆãŒã‚ã‚‹ã§ã—ょã†ã€‚ 先㮠"å‹•çš„ãªæ™‚計" タイプã®ã‚µãƒ–フォームã®ä¾‹ã§è¨€ãˆã°ã€å„時計ã”ã¨ã«ã‚¢ãƒ©ãƒ¼ãƒ æ™‚刻を複数設定ã—ãŸã„å ´åˆãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚ -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ã¯ä»¥ä¸‹ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’実装ã—ã¦ã„ã¾ã™: -4D has implemented the following mechanisms to meet these needs: +- `OBJECT Get name` コマンド㧠"subform" 引数を使用ã—ã¦ã‚µãƒ–フォームオブジェクトを指定ã—ã€`OBJECT Get pointer` コマンドを使用ã™ã‚‹ã€ +- `CALL SUBFORM CONTAINER` コマンドを使用ã—ã¦ã‚µãƒ–フォームã‹ã‚‰ã‚³ãƒ³ãƒ†ãƒŠãƒ¼ã‚ªãƒ–ジェクトを呼ã³å‡ºã™ã€ +- `EXECUTE METHOD IN SUBFORM` コマンドを使用ã—ã¦ã‚µãƒ–フォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã™ã‚‹ã€‚ -- Use of the "subform" parameter with the `OBJECT Get name` command to specify the subform object and the `OBJECT Get pointer` command. -- 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 㨠Object get name コマンド +`OBJECT Get pointer` コマンド㯠`Object subform container` ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã‚’ä½¿ã†æ–¹æ³•以外ã«ã‚‚ã€ç¬¬äºŒå¼•æ•°ã«æŒ‡å®šã—ãŸåå‰ã‚’æŒã¤ã‚ªãƒ–ジェクトを検索ã™ã‚‹éš›ã«ã€ã©ã®ã‚µãƒ–フォーム内を検索ã™ã‚‹ã‹ã‚’指定ã™ã‚‹ãŸã‚ã®å¼•æ•°ã‚’æ¸¡ã™æ–¹æ³•ã§ã‚‚利用ã§ãã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ `Object named` ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ãŒæ¸¡ã•れãŸå ´åˆã®ã¿ä½¿ç”¨ã§ãã¾ã™ã€‚ -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: +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®å¼ã¯: ```4d $ptr:=OBJECT Get pointer(Object named;"MyButton";"MySubForm") ``` -... retrieves a pointer to the "MyButton" variable that is located in the "MySubForm" subform object. This syntax can be used to access from the parent form any object found in a subform. Also note the `OBJECT Get name` command which can be used to retrieve the name of the object that has the focus. - -#### CALL SUBFORM CONTAINER command +"MySubForm" サブフォームオブジェクト中㮠"MyButton" オブジェクトã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå¤‰æ•°ã¸ã®ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚Œã°ã€è¦ªãƒ•ォームã‹ã‚‰ã‚µãƒ–フォーム内ã®ã‚ªãƒ–ジェクトã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ ã¾ãŸã€`OBJECT Get name` コマンドを使用ã™ã‚Œã°ãƒ•ォーカスをæŒã¤ã‚ªãƒ–ジェクトã®åå‰ã‚’å–å¾—ã§ãã¾ã™ã€‚ -The `CALL SUBFORM CONTAINER` command lets a subform instance send an event to the subform container object, which can then process it in the context of the parent form. The event is received in the container object method. It may be at the origin of any event detected by the subform (click, drag-and-drop, etc.). +#### CALL SUBFORM CONTAINER コマンド -The code of the event is unrestricted (for example, 20000 or -100). You can use a code that corresponds to an existing event (for example, 3 for `On Validate`), or use a custom code. In the first case, you can only use events that you have checked in the Property List for subform containers. In the second case, the code must not correspond to any existing form event. It is recommended to use a negative value to be sure that this code will not be used by 4D in future versions. +`CALL SUBFORM CONTAINER` コマンドを使用ã™ã‚‹ã¨ã€ã‚µãƒ–フォームインスタンスã‹ã‚‰ã‚µãƒ–フォームコンテナーオブジェクトã«ã‚¤ãƒ™ãƒ³ãƒˆã‚’é€ä¿¡ã§ãã¾ã™ã€‚ãã®çµæžœã€è¦ªãƒ•ォームã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§å‡¦ç†ãŒå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ イベントã¯ã‚³ãƒ³ãƒ†ãƒŠãƒ¼ã‚ªãƒ–ジェクトメソッドã§å—ä¿¡ã•れã¾ã™ã€‚ (クリックやドラッグ&ドロップãªã©) サブフォームã«ã‚ˆã‚Šæ¤œçŸ¥ã•れãŸã™ã¹ã¦ã®ã‚¤ãƒ™ãƒ³ãƒˆã®ç™ºç”Ÿå…ƒã¨ãªã‚Šãˆã¾ã™ã€‚ -For more information, refer to the description of the `CALL SUBFORM CONTAINER` command. +é€ä¿¡ã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆã‚³ãƒ¼ãƒ‰ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“ (ãŸã¨ãˆã° 20000 ã‚„ -100 ãªã©)。 既存ã®ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾å¿œã™ã‚‹ã‚³ãƒ¼ãƒ‰ (ãŸã¨ãˆã° `On Validate` ã«å¯¾å¿œã™ã‚‹ 3) を使用ã™ã‚‹ã“ã¨ã‚‚ã€ã‚«ã‚¹ã‚¿ãƒ ã‚³ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ å‰è€…ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã‚µãƒ–フォームコンテナーã®ãƒ—ロパティリストã§ãƒã‚§ãƒƒã‚¯ã‚’入れãŸã‚¤ãƒ™ãƒ³ãƒˆã®ã¿ã‚’使用ã§ãã¾ã™ã€‚ 後者ã®å ´åˆã€ä½¿ç”¨ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã¯æ—¢å­˜ã®ãƒ•ォームイベントã«å¯¾å¿œã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 å°†æ¥ã® 4Dãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ç•ªå·ãŒè¡çªã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã«ã€è² æ•°ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ -#### EXECUTE METHOD IN SUBFORM command +詳細㯠`CALL SUBFORM CONTAINER` コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 -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. +#### EXECUTE METHOD IN SUBFORM コマンド +`EXECUTE METHOD IN SUBFORM` コマンドを使用ã™ã‚‹ã¨ã€è¦ªãƒ•ォームやãã®ã‚ªãƒ–ジェクトã‹ã‚‰ã€ã‚µãƒ–フォームインスタンスã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã‘るメソッド実行をリクエストã§ãã¾ã™ã€‚ã“れã«ã‚ˆã‚Šã€ã‚µãƒ–フォームã®å¤‰æ•°ã‚„オブジェクト等ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•°ã‚‚å—ã‘å–れã¾ã™ã€‚ -This mechanism is illustrated in the following diagram: +ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’図示ã™ã‚‹ã¨ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: ![](assets/en/FormObjects/subforms6.png) -For more information, refer to the description of the `EXECUTE METHOD IN SUBFORM` command. +詳細㯠`EXECUTE METHOD IN SUBFORM` コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +#### GOTO OBJECT コマンド +`GOTO OBJECT` ã¯ã‚µãƒ–フォームã‹ã‚‰å®Ÿè¡Œã•れã¦ã‚‚ã€è¦ªãƒ•ォーム内ã«ã¦ç›®çš„ã®ã‚ªãƒ–ジェクトを検索ã—ã¾ã™ã€‚ -#### GOTO OBJECT command -The `GOTO OBJECT` command looks for the destination object in the parent form even if it is executed from a subform. ## プロパティ一覧 -[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 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [CSSクラス](properties_Object.md#CSSクラス) - [ソース](properties_Subform.md#ソース) - [リストフォーム ](properties_Subform.md#リストフォーム) - [詳細フォーム](properties_Subform.md#詳細フォーム) - [é¸æŠžãƒ¢ãƒ¼ãƒ‰](properties_Subform.md#é¸æŠžãƒ¢ãƒ¼ãƒ‰) - [リスト更新å¯](properties_Subform.md#リスト更新å¯) - [行をダブルクリック](properties_Subform.md#行をダブルクリック) - [空行をダブルクリック](properties_Subform.md#空行をダブルクリック) - [å·¦](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_Appearance.md#フォーカスã®å››è§’ã‚’éš ã™) - [横スクロールãƒãƒ¼](properties_Appearance.md#横スクロールãƒãƒ¼) - [縦スクロールãƒãƒ¼](properties_Appearance.md#縦スクロールãƒãƒ¼) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [å°åˆ·æ™‚å¯å¤‰](properties_Print.md#å°åˆ·æ™‚å¯å¤‰) - [メソッド](properties_Action.md#メソッド) diff --git a/website/translated_docs/ja/FormObjects/tabControl.md b/website/translated_docs/ja/FormObjects/tabControl.md index 6f4df0c631ddb6..521534b815c8a2 100644 --- a/website/translated_docs/ja/FormObjects/tabControl.md +++ b/website/translated_docs/ja/FormObjects/tabControl.md @@ -1,29 +1,30 @@ --- id: tabControl -title: Tab Controls +title: タブコントロール --- -A tab control creates an object that lets the user choose among a set of virtual screens that are enclosed by the tab control object. Each screen is accessed by clicking its tab. +タブコントロールã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¤‡æ•°ã®ä»®æƒ³ç”»é¢ã®ä¸­ã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ã®ã§ãるオブジェクトを作æˆã—ã¾ã™ã€‚ã“ã®ç”»é¢ã¯ã‚¿ãƒ–コントロールオブジェクトã«ã‚ˆã‚Šå›²ã¾ã‚Œã¦ã„ã¾ã™ã€‚ タブをクリックã™ã‚‹ã“ã¨ã§ã€å„ç”»é¢ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ -The following multi-page form uses a tab control object: +次ã®è¤‡æ•°ãƒšãƒ¼ã‚¸ãƒ•ォームã§ã¯ã‚¿ãƒ–コントロールオブジェクトãŒä½¿ç”¨ã•れã¦ã„ã¾ã™: ![](assets/en/FormObjects/tabControl1.png) -To navigate from screen to screen, the user simply clicks the desired tab. +å„ç”»é¢ã‚’移動ã™ã‚‹ã«ã¯ã€ç›®çš„ã®ã‚¿ãƒ–をクリックã—ã¾ã™ã€‚ -The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command or the `gotoPage` standard action would be used when a user clicks a tab. +ã“れらã®ç”»é¢ã¯ã€ãƒžãƒ«ãƒãƒšãƒ¼ã‚¸ãƒ•ォームã®å„ページを表ã‚ã—ãŸã‚Šã€ã¾ãŸã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¿ãƒ–ãŒã‚¯ãƒªãƒƒã‚¯ã™ã‚‹ã¨å¤‰åŒ–ã™ã‚‹ã‚ªãƒ–ジェクトを表ã‚ã™ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ タブコントロールをページ移動ツールã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¿ãƒ–をクリックã™ã‚‹ã¨ [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/ja/page247.html) コマンドã¾ãŸã¯`gotoPage` 標準アクションを使用ã—ã¾ã™ã€‚ -Another use of the tab control is to control the data that is displayed in a subform. For example, a Rolodex could be implemented using a tab control. The tabs would display the letters of the alphabet and the tab control’s action would be to load the data corresponding to the letter that the user clicked. +タブコントロールã®ä»–ã®åˆ©ç”¨æ³•ã¯ã€ã‚µãƒ–フォームやリストボックスã«è¡¨ç¤ºã•れるデータを制御ã™ã‚‹ã“ã¨ã§ã™ã€‚ ãŸã¨ãˆã°ã€å刺帳ã¯ã‚¿ãƒ–コントロールを用ã„ã¦å®Ÿç¾ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ タブã«ã¯ã²ã‚‰ãŒãªã®å„文字を表示ã—ã€ã‚¿ãƒ–コントロールã®å‹•作ã¨ã—ã¦ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒªãƒƒã‚¯ã—ãŸæ–‡å­—ã¨ä¸€è‡´ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚’ロードã—ã¾ã™ã€‚ -Each tab can display labels or labels and a small icon. If you include icons, they appear to the left of each label. Here is an example of a tab control that uses icons: +å„タブã«ã¯ãƒ©ãƒ™ãƒ«ã ã‘ã€ã¾ãŸã¯ãƒ©ãƒ™ãƒ«ã¨å°ã•ãªã‚¢ã‚¤ã‚³ãƒ³ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アイコンãŒå«ã¾ã‚Œã‚‹å ´åˆã€ãã®ã‚¢ã‚¤ã‚³ãƒ³ã¯å„ラベルã®å·¦å´ã«è¡¨ç¤ºã•れã¾ã™ã€‚ 次ã®å›³ã¯ã‚¢ã‚¤ã‚³ãƒ³ã‚’使用ã™ã‚‹ã‚¿ãƒ–コントロールã®ä¾‹ã§ã™: ![](assets/en/FormObjects/tabControl2.png) -When you create a tab control, 4D manages the spacing and placement of the tabs. You only need to supply the labels in the form of an array, or the icons and labels in the form of a hierarchical list. +タブコントロールを作æˆã™ã‚‹ã¨ã€4DãŒã‚¿ãƒ–ã®é–“éš”ã¨é…置を管ç†ã—ã¾ã™ã€‚ ラベルã¯é…列形å¼ã§å®šç¾©ã—ã€ã‚¢ã‚¤ã‚³ãƒ³ã¨ãƒ©ãƒ™ãƒ«ã¯éšŽå±¤ãƒªã‚¹ãƒˆå½¢å¼ã§å®šç¾©ã—ã¾ã™ã€‚ -If the tab control is wide enough to display all the tabs with both the labels and icons, it displays both. If the tab control is not wide enough to display both the labels and icons, 4D displays the icons only. If it can’t fit all the icons, it places scroll arrows to the right of the last visible tab. The scroll arrows allow the user to scroll the icons to the left or right. +タブコントロールãŒå分大ããã€ãƒ©ãƒ™ãƒ«ã¨ã‚¢ã‚¤ã‚³ãƒ³ãŒè¨­å®šã•れãŸã‚¿ãƒ–ã‚’ã™ã¹ã¦è¡¨ç¤ºã§ãã‚‹å ´åˆã¯ã€ãã®ä¸¡æ–¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ タブコントロールã®å¤§ãã•ãŒè¶³ã‚‰ãšã€ãƒ©ãƒ™ãƒ«ã¨ã‚¢ã‚¤ã‚³ãƒ³ã‚’両方ã¨ã‚‚表示ã§ããªã„å ´åˆã«ã¯ã€4Dã¯ã‚¢ã‚¤ã‚³ãƒ³ã ã‘を表示ã—ã¾ã™ã€‚ ã™ã¹ã¦ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒåŽã¾ã‚Šãらãªã„å ´åˆã€è¡¨ç¤ºã•れる最後ã®ã‚¿ãƒ–ã®å³å´ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«çŸ¢å°ãŒç½®ã‹ã‚Œã¾ã™ã€‚ ã“ã®ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«çŸ¢å°ã‚’使用ã—ã€ã‚¢ã‚¤ã‚³ãƒ³ã‚’å·¦å³ã«ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã§ãã¾ã™ã€‚ + +macOSã®å ´åˆã€ã‚¿ãƒ–コントロールを標準ä½ç½® (上) ã ã‘ã§ãªãã€ä¸‹ã«ã‚‚é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -Under macOS, in addition to the standard position (top), the tab controls can also be aligned to the bottom. ### JSON 例: @@ -34,16 +35,48 @@ Under macOS, in addition to the standard position (top), the tab controls can al "top": 160, "width": 100, "height": 20, - "labelsPlacement": "bottom" //define the direction + "labelsPlacement": "bottom" // タブコントロールã®ä½ç½® } ``` -## 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. +## タブコントロールã¸ã®ãƒ©ãƒ™ãƒ«ã®è¿½åŠ  + +タブコントロールã«ãƒ©ãƒ™ãƒ«ã‚’設定ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚‚ã®ã‚’利用ã§ãã¾ã™: + +- オブジェクト +- é¸æŠžãƒªã‚¹ãƒˆ +- é…列 + +### オブジェクトã®ä½¿ç”¨ + +[コレクション](Concepts/dt_collection) をカプセル化ã—㟠[オブジェクト](Concepts/dt_object.md) をタブコントロール㮠[データソース](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¨ã—ã¦å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ–ジェクトã«ã¯ã€æ¬¡ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæ ¼ç´ã•れã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: + +| プロパティ | タイプ | 説明 | +| -------------- | ------ | --------------------------------------------------------------------- | +| `values` | コレクション | å¿…é ˆ - スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€‚ 文字列ã®å€¤ã®ã¿ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ 無効ã€ç©ºã€ã¾ãŸã¯æœªå®šç¾©ã®å ´åˆã€ã‚¿ãƒ–コントロールã¯ç©ºã«ãªã‚Šã¾ã™ | +| `index` | number | タブコントロールã®ã‚«ãƒ¬ãƒ³ãƒˆãƒšãƒ¼ã‚¸ã®ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ (0 㨠`collection.length-1` ã®é–“ã®å€¤) | +| `currentValue` | テキスト | ç¾åœ¨é¸æŠžã•れã¦ã„る値 | + +ã“ã®åˆæœŸåŒ–コードã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ•ォームを表示ã™ã‚‹å‰ã«å®Ÿè¡Œã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +次ã®ä¾‹ã§ã¯ã€ã‚¿ãƒ–コントロール㮠[å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) ã¨ã—㦠`Form.tabControl` ãŒå®šç¾©ã•れã¦ã„ã¾ã™ã€‚ フォームオブジェクト㫠[`gotoPage` 標準アクション](#gotopage-標準アクション) を関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +```4d +Form.tabControl:=New object +Form.tabControl.values:=New collection("Page 1"; "Page 2"; "Page 3") +Form.tabControl.index:=2 // ページ3 ã‹ã‚‰é–‹å§‹ã—ã¾ã™ +``` + + +### é¸æŠžãƒªã‚¹ãƒˆã®ä½¿ç”¨ + +タブコントロール㫠[é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ-é™çš„リスト) を関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (é™çš„リスト)ã€ã¾ãŸã¯ jsonリスト ("$ref") ã¸ã® JSONãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ リストエディターã«ã¦ãƒªã‚¹ãƒˆé …ç›®ã«é–¢é€£ä»˜ã‘られãŸã‚¢ã‚¤ã‚³ãƒ³ã¯ã‚¿ãƒ–コントロールã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +### テキストé…列ã®ä½¿ç”¨ + +フォームã®å„ページã®åå‰ã‚’æ ¼ç´ã™ã‚‹ãƒ†ã‚­ã‚¹ãƒˆé…列を作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ãƒ•ォームを表示ã™ã‚‹å‰ã«å®Ÿè¡Œã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ãŸã¨ãˆã°ã€ã“ã®ã‚³ãƒ¼ãƒ‰ã‚’タブコントロールã®ã‚ªãƒ–ジェクトメソッドã«ç½®ã„ã¦ã€`On Load` イベントãŒç”Ÿã˜ãŸã¨ãã«ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã—ã¾ã™ã€‚ ```4d ARRAY TEXT(arrPages;3) @@ -51,22 +84,22 @@ There are several ways to supply the labels for a tab control: arrPages{2}:="Address" arrPages{3}:="Notes" ``` +> ページã®åå‰ã‚’階層リストã«ä¿å­˜ã—ã€[LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/ja/page288.html) コマンドを使用ã—ã¦å€¤ã‚’ロードã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ -> 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 +## Goto page 機能 -### FORM GOTO PAGE command +### FORM GOTO PAGE コマンド -You can use the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command in the tab control’s method: +タブコントロールã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/ja/page247.html) コマンドを使用ã§ãã¾ã™: ```4d FORM GOTO PAGE(arrPages) ``` -The command is executed when the `On Clicked` event occurs. You should then clear the array when the `On Unload` event occurs. +[`On Clicked`](Events/onClicked.md) イベントãŒç™ºç”Ÿã™ã‚‹ã¨ã€ã“ã®ã‚³ãƒžãƒ³ãƒ‰ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ ã“ã®å¾Œ [`On Unload`](Events/onUnload.md) イベントã®ç™ºç”Ÿæ™‚ã«ã“ã®é…列をクリアã—ã¾ã™ã€‚ -Here is an example object method: +オブジェクトメソッドã®ä¾‹ã‚’次ã«ç¤ºã—ã¾ã™: ```4d Case of @@ -79,12 +112,14 @@ Here is an example object method: End case ``` -### Goto Page action +### gotoPage 標準アクション + +タブコントロール㫠`gotoPage` [標準アクション](properties_Action.md#標準アクション) を割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã™ã‚‹ã¨ã€4Dã¯ã‚¯ãƒªãƒƒã‚¯ã•れãŸã‚¿ãƒ–コントロールã®ç•ªå·ã«ç›¸å½“ã™ã‚‹ãƒ•ォームã®ãƒšãƒ¼ã‚¸ã‚’自動的ã«è¡¨ç¤ºã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ 3番目ã®ã‚¿ãƒ–をクリックã™ã‚‹ã¨ã€4Dã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォーム㮠3ページ目 (存在ã™ã‚‹å ´åˆ) を表示ã—ã¾ã™ã€‚ -When you assign the `gotoPage` [standard action](properties_Action.md#standard-action) to a tab control, 4D will automatically display the page of the form that corresponds to the number of the tab that is selected. -For example, if the user selects the 3rd tab, 4D will display the third page of the current form (if it exists). ## プロパティ一覧 -[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) - [Save value](properties_Object.md#save-value) - [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 +[タイプ](properties_Object.md#タイプ) - [オブジェクトå](properties_Object.md#オブジェクトå) - [変数ã‚ã‚‹ã„ã¯å¼](properties_Object.md#変数ã‚ã‚‹ã„ã¯å¼) - [å¼ã®åž‹](properties_Object.md#å¼ã®åž‹) - [値を記憶](properties_Object.md#値を記憶) - [CSSクラス](properties_Object.md#CSSクラス) - [é¸æŠžãƒªã‚¹ãƒˆ](properties_DataSource.md#é¸æŠžãƒªã‚¹ãƒˆ-é™çš„リスト) - [å·¦](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_Display.md#表示状態) - [タブコントロールã®ä½ç½®](properties_Appearance.md#タブコントロールã®ä½ç½®) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [ヘルプTips](properties_Help.md#ヘルプTips) - [標準アクション](properties_Action.md#標準アクション) diff --git a/website/translated_docs/ja/FormObjects/text.md b/website/translated_docs/ja/FormObjects/text.md index c5aa13ca3d192e..725098674c9203 100644 --- a/website/translated_docs/ja/FormObjects/text.md +++ b/website/translated_docs/ja/FormObjects/text.md @@ -1,11 +1,10 @@ --- -id: テキスト +id: text title: テキスト --- -## æ¦‚è¦ -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). +テキストオブジェクトを使ã£ã¦ã€æŒ‡ç¤ºãƒ»ã‚¿ã‚¤ãƒˆãƒ«ãƒ»ãƒ©ãƒ™ãƒ«ãªã©ã®é™çš„ (スタティック) ãªãƒ†ã‚­ã‚¹ãƒˆã‚’フォーム上ã«è¡¨ç¤ºã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ†ã‚­ã‚¹ãƒˆã¯ã€å‚ç…§ã‚’å«ã‚€ã“ã¨ã§å‹•çš„ã«ã‚‚ãªã‚Šã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [スタティックテキスト中ã§å‚照を使用ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Using-references-in-static-text.300-4575714.ja.html) ã‚’å‚ç…§ãã ã•ã„。 #### JSON 例: @@ -18,27 +17,28 @@ A text object allows you to display static written content (*e.g.*, instructions "top": 160, "width": 100, "height": 20, - "stroke": "#ff0000" //text color + "stroke": "#ff0000" // テキストカラー "fontWeight": "bold" } ``` -## Rotation -4D lets you rotate text areas in your forms using the [Orientation](properties_Text.md#orientation) property. +## 回転 + +4D ã§ã¯ã€ãƒ•ォーム内ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒªã‚¢ã‚’ [回転](properties_Text.md#æ–¹å‘) ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/staticText.png) -> Text rotation can be defined for a process using the `OBJECT SET TEXT ORIENTATION` language command. +> ã“ã®ãƒ—ロパティ㯠`OBJECT SET TEXT ORIENTATION` ランゲージコマンドã«ã‚ˆã£ã¦ã‚‚設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -Once a text is rotated, you can still change its size or position, as well as all its properties. Note that the text area’s height and width properties do not depend on its orientation: +テキストãŒå›žè»¢ã•れãŸå¾Œã§ã‚‚ã€ã‚µã‚¤ã‚ºã‚„ä½ç½®ãªã©ã™ã¹ã¦ã®ãƒ—ロパティを変更ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ テキストエリアã®é«˜ã•ã¨å¹…ã¯ã€å›žè»¢ã®æ–¹å‘ã«ä¾ã‚‰ãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„: ![](assets/en/FormObjects/staticText2.png) -- If the object is resized in direction A, its [width](properties_CoordinatesAndSizing.md#width) is modified; -- 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. +- オブジェクト㌠A æ–¹å‘ã«ãƒªã‚µã‚¤ã‚ºã•れるã¨ãã€å¤‰æ›´ã•れるã®ã¯ [å¹…](properties_CoordinatesAndSizing.md#å¹…) ã§ã™ã€‚ +- オブジェクト㌠C æ–¹å‘ã«ãƒªã‚µã‚¤ã‚ºã•れるã¨ãã€å¤‰æ›´ã•れるã®ã¯ [高ã•](properties_CoordinatesAndSizing.md#高ã•) ã§ã™ã€‚ +- オブジェクト㌠B æ–¹å‘ã«ãƒªã‚µã‚¤ã‚ºã•れるã¨ãã€[å¹…](properties_CoordinatesAndSizing.md#å¹…) 㨠[高ã•](properties_CoordinatesAndSizing.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) - [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 +## プロパティ一覧 +[タイプ](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_Display.md#表示状態) - [塗りカラー](properties_BackgroundAndBorder.md#背景色-塗りカラー) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [フォント](properties_Text.md#フォント) - [フォントサイズ](properties_Text.md#フォントサイズ) - [太字](properties_Text.md#太字) - [イタリック](properties_Text.md#イタリック) - [下線](properties_Text.md#下線) - [フォントカラー](properties_Text.md#フォントカラー) - [æ–¹å‘](properties_Text.md#æ–¹å‘) - [横æƒãˆ](properties_Text.md#横æƒãˆ) diff --git a/website/translated_docs/ja/FormObjects/viewProArea_overview.md b/website/translated_docs/ja/FormObjects/viewProArea_overview.md index 64565dbe97c86e..d73c44db693249 100644 --- a/website/translated_docs/ja/FormObjects/viewProArea_overview.md +++ b/website/translated_docs/ja/FormObjects/viewProArea_overview.md @@ -1,18 +1,20 @@ --- id: viewProAreaOverview -title: 4D View Pro area +title: 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. +4D View Pro を使用ã™ã‚‹ã¨ã€4Dフォーム内ã«ã‚¹ãƒ—レッドシートエリアを挿入・表示ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ スプレッドシートã¨ã¯ã€ã‚»ãƒ«ã®ã‚°ãƒªãƒƒãƒ‰ã‚’æ ¼ç´ã—ãŸã‚¢ãƒ—リケーションã®ã“ã¨ã§ã€ã“れらã®ã‚»ãƒ«ã«æƒ…報を入力ã—ãŸã‚Šã€è¨ˆç®—を実行ã•ã›ãŸã‚Šã€ã‚ã‚‹ã„ã¯ãƒ”クãƒãƒ£ãƒ¼ã‚’表示ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ![](assets/en/FormObjects/viewPro2.png) -Once you use 4D View Pro areas in your forms, you can import and export spreadsheets documents. +フォーム内㧠4D View Pro エリアを使用ã™ã‚‹ã¨ã€ã‚¹ãƒ—レッドシートドキュメントを読ã¿è¾¼ã‚“ã ã‚Šæ›¸ã出ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## 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. +## 4D View Pro エリアã®ä½¿ç”¨ + +4D View Pro ã«ã¤ã„ã¦ã®è©³ç´°ã¯ [4D View Pro リファレンス](https://doc.4d.com/4Dv18/4D/18/4D-View-Pro-Reference.100-4522233.ja.html) マニュアルをå‚ç…§ãã ã•ã„。 + ## プロパティ一覧 -[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 +[タイプ](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_Display.md#表示状態) - [ユーザーインターフェース](properties_Appearance.md#ユーザーインターフェース) - [フォーミュラãƒãƒ¼ã‚’表示](properties_Appearance.md#フォーミュラãƒãƒ¼ã‚’表示) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [メソッド](properties_Action.md#メソッド) diff --git a/website/translated_docs/ja/FormObjects/webArea_overview.md b/website/translated_docs/ja/FormObjects/webArea_overview.md index 6a864c38da2f33..e55897d600e548 100644 --- a/website/translated_docs/ja/FormObjects/webArea_overview.md +++ b/website/translated_docs/ja/FormObjects/webArea_overview.md @@ -1,85 +1,82 @@ --- id: webAreaOverview -title: Web Area +title: Webエリア --- -## æ¦‚è¦ -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). +Webエリアã¯ã€é™çš„ãŠã‚ˆã³å‹•的㪠HTMLページã€ãƒ•ァイルã€ãƒ”クãƒãƒ£ãƒ¼ã€JavaScript ãªã©ã®æ§˜ã€…㪠Webコンテンツをフォーム中ã§è¡¨ç¤ºã™ã‚‹ã“ã¨ã®ã§ãるオブジェクトã§ã™ã€‚ Webã‚¨ãƒªã‚¢ã®æç”»ã‚¨ãƒ³ã‚¸ãƒ³ã¯ã€ã‚¢ãƒ—リケーションã®å®Ÿè¡Œãƒ—ラットフォームãŠã‚ˆã³ [埋ã‚è¾¼ã¿Webレンダリングエンジンを使用](properties_WebArea.md#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) オプションã®è¨­å®šçŠ¶æ…‹ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ -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). +åŒã˜ãƒ•ォーム内ã«è¤‡æ•°ã® Webエリアをé…ç½®ã§ãã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€Webã‚¨ãƒªã‚¢ã®æŒ¿å…¥ã«ã¯ [ã„ãã¤ã‹ã®åˆ¶ç´„](#webエリアã®ãƒ«ãƒ¼ãƒ«) ãŒã¤ãäº‹ã«æ³¨æ„ã—ã¦ä¸‹ã•ã„。 -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. +ã„ãã¤ã‹ã®å°‚用㮠[標準アクション](#標準アクション)ã€å¤šæ•°ã® [ランゲージコマンド](https://doc.4d.com/4Dv18/4D/18/Web-Area.201-4504309.ja.html)ã€ãã—ã¦æ±Žç”¨ãŠã‚ˆã³å°‚用㮠[フォームイベント](#フォームイベント) を使用ã—ã¦ã€Webエリアã®å‹•作を制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 特別ãªå¤‰æ•°ã‚’使用ã—ã¦ã€ã‚¨ãƒªã‚¢ã¨ 4Dç’°å¢ƒé–“ã§æƒ…報を交æ›ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ +> Webエリアã«ãŠã‘ã‚‹ WebプラグインãŠã‚ˆã³ Javaアプレットã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•れã¦ã„ã¾ã›ã‚“。ã“れらã¯ã€ã¨ãã«ã‚¤ãƒ™ãƒ³ãƒˆç®¡ç†ãƒ¬ãƒ™ãƒ«ã«ãŠã„㦠4D ã®å‹•作をä¸å®‰å®šã«ã•ã›ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ -> 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 +## 特有ã®ãƒ—ロパティ -### Associated variables +### 割り当ã¦ã‚‰ã‚Œã‚‹å¤‰æ•° -Two specific variables can be associated with each web area: +Webエリアã«ã¯ 2ã¤ã®ç‰¹åˆ¥ãªå¤‰æ•°ãŒè‡ªå‹•ã§å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™: +- [`URL`](properties_WebArea.md#url) -- Webエリアã«è¡¨ç¤ºã•れã¦ã„ã‚‹ URL ã®ç®¡ç†ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +- [`進æ—状æ³å¤‰æ•°`](properties_WebArea.md#進æ—状æ³å¤‰æ•°) -- Webエリアã«ãƒ­ãƒ¼ãƒ‰ä¸­ã®ãƒšãƒ¼ã‚¸ã®ãƒ‘ーセンテージを知るãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ -- [`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. +### Webレンダリングエンジン -### Web rendering engine +Webエリアã§ã¯ã€[2ã¤ã®æç”»ã‚¨ãƒ³ã‚¸ãƒ³](properties_WebArea.md#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) ã†ã¡ã‹ã‚‰ä½¿ç”¨ã™ã‚‹ã‚‚ã®ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +"埋ã‚è¾¼ã¿Webレンダリングエンジンを使用" ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã—ã¦ã„ã‚‹å ´åˆã€"4Dメソッドコールを許å¯" プロパティãŒé¸æŠžå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ -Selecting the embedded web rendering engine allows you to call 4D methods from the web area. +### 4Dãƒ¡ã‚½ãƒƒãƒ‰ã‚³ãƒ¼ãƒ«ã‚’è¨±å¯ -### Access 4D methods +[4Dメソッドコールを許å¯](properties_WebArea.md#4Dメソッドコールを許å¯) ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ã‚’é¸æŠžã—ã¦ã„ã‚‹å ´åˆã€Webエリアã‹ã‚‰ 4Dメソッドを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -When the [Access 4D methods](properties_WebArea.md#access-4d-methods) property is selected, you can call 4D methods from a web area. +> ã“ã®æ©Ÿèƒ½ã¯ Webエリア㌠[埋ã‚è¾¼ã¿Webレンダリングエンジンを使用](properties_WebArea.md#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) ã—ã¦ã„ã‚‹å ´åˆã«é™ã‚Šã€ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ -> This property is only available if the web area [uses the embedded web rendering engine](#use-embedded-web-rendering-engine). +### $4dオブジェクトã®ä½¿ç”¨ -### $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. +[4Dã®åŸ‹ã‚è¾¼ã¿Webレンダリングエンジン](properties_WebArea.md#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) ã¯ã€$4d ã¨ã„ㆠJavaScriptã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ã‚¨ãƒªã‚¢ã«æä¾›ã—ã¾ã™ã€‚$4dオブジェクト㨠"." (ドット) オブジェクト記法を使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ä»»æ„ã® 4Dプロジェクトメソッドを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -For example, to call the `HelloWorld` 4D method, you just execute the following statement: +ãŸã¨ãˆã°ã€`HelloWorld` ã¨ã„ㆠ4Dメソッドを呼ã³å‡ºã™å ´åˆã«ã¯ã€ä»¥ä¸‹ã®å®£è¨€ã‚’実行ã—ã¾ã™: ```codeJS $4d.HelloWorld(); ``` +> JavaScript ã¯å¤§æ–‡å­—å°æ–‡å­—を区別ã™ã‚‹ãŸã‚ã€ã‚ªãƒ–ジェクトã®åå‰ã¯ $4d (dã¯å°æ–‡å­—) ã§ã‚ã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ -> 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: +4Dメソッドã¸ã®å‘¼ã³å‡ºã—ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: ```codeJS $4d.4DMethodName(param1,paramN,function(result){}) ``` +- `param1...paramN`: 4Dメソッドã«å¯¾ã—ã¦å¿…è¦ãªã ã‘引数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®å¼•æ•°ã¯ã€JavaScript ã«ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹åž‹ã§ã‚れã°ã©ã‚“ãªã‚‚ã®ã§ã‚‚渡ã›ã¾ã™ (æ–‡å­—åˆ—ã€æ•°å€¤ã€é…列ã€ã‚ªãƒ–ジェクト)。 -- `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. +- `function(result)`: 最後ã®å¼•æ•°ã¨ã—ã¦æ¸¡ã•れる関数ã§ã™ã€‚ ã“ã® "コールãƒãƒƒã‚¯" 関数ã¯ã€4DメソッドãŒå®Ÿè¡Œã‚’終ãˆã‚‹ã¨åŒæ™‚ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ ã“ã®é–¢æ•°ã¯ `result` 引数をå—ã‘å–りã¾ã™: -- `result`: Execution result of the 4D method, returned in the "$0" expression. This result can be of any type supported by JavaScript (string, number, array, object). You can use the `C_OBJECT` command to return the objects. +- `result`: "$0" å¼ã«è¿”ã•れるã€4Dãƒ¡ã‚½ãƒƒãƒ‰å®Ÿè¡Œã®æˆ»ã‚Šå€¤ã§ã™ã€‚ 戻り値㯠JavaScript ã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹åž‹ (æ–‡å­—åˆ—ã€æ•°å€¤ã€é…列ã€ã‚ªãƒ–ジェクト) ã®ã„ãšã‚Œã‹ã«ãªã‚Šã¾ã™ã€‚ `C_OBJECT` コマンドを使用ã—ã¦ã€ã‚ªãƒ–ジェクトを返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -> 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: `` +> デフォルトã¨ã—ã¦ã€4D㯠UTF-8 文字コードã§å‹•作ã—ã¦ã„ã¾ã™ã€‚ (アクセントãŒä»˜ã„ãŸæ–‡å­—ãªã©ã®) 拡張文字をå«ã‚€ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã™å ´åˆã«ã¯ã€Webエリアã§è¡¨ç¤ºã•ã‚Œã‚‹ãƒšãƒ¼ã‚¸ã®æ–‡å­—コード㌠UTF-8 ã«å®£è¨€ã•れã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。文字コード㌠UTF-8 ã§ãªã„å ´åˆã€æ–‡å­—ãŒæ­£ã—ã表示ã•れãªã„å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€ä»¥ä¸‹ã® 1行を HTMLページã«è¿½åŠ ã—ã¦æ–‡å­—コードを宣言ã—ã¦ãã ã•ã„:
          `` #### 例題 1 -Given a 4D project method named `today` that does not receive parameters and returns the current date as a string. +`today` ã¨ã„ã†åã® 4DプロジェクトメソッドãŒã‚りã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•°ã‚’å—ã‘付ã‘ãšã€ã‚«ãƒ¬ãƒ³ãƒˆã®æ—¥ä»˜ã‚’文字列ã¨ã—ã¦è¿”ã™å ´åˆã«ã¤ã„ã¦è€ƒãˆã¦ã¿ã¾ã™ã€‚ -4D code of `today` method: +`today` メソッド㮠4Dコードã§ã™: ```4d C_TEXT($0) $0:=String(Current date;System date long) ``` -In the web area, the 4D method can be called with the following syntax: +Webエリアã§ã¯ã€ 4Dメソッドã¯ä»¥ä¸‹ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§å‘¼ã³å‡ºã—å¯èƒ½ã§ã™: ```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. +ã“ã® 4Dメソッドã¯å¼•æ•°ã‚’å—ã‘å–りã¾ã›ã‚“ãŒã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å®Ÿè¡Œå¾Œã« $0 ã®å€¤ã‚’ã€4Dã«ã‚ˆã£ã¦å‘¼ã³å‡ºã•れるコールãƒãƒƒã‚¯é–¢æ•°ã¸ã¨è¿”ã—ã¾ã™ã€‚ Webエリアã«ã‚ˆã£ã¦ãƒ­ãƒ¼ãƒ‰ã•れ㟠HTMLページ内ã«ã“ã®æ—¥ä»˜ã‚’表示ã—ã¾ã™ã€‚ -Here is the code of the HTML page: +HTMLページã®ã‚³ãƒ¼ãƒ‰ã§ã™: ```html @@ -93,20 +90,20 @@ $4d.today(function(dollarZero) }); -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,99 +111,104 @@ 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). +## 標準アクション + +Webエリアを自動ã§ç®¡ç†ã™ã‚‹ãŸã‚ã«ã€4ã¤ã®ç‰¹åˆ¥ãªè‡ªå‹•アクション (`openBackURL`ã€`openForwardURL`ã€`refreshCurrentURL`ã€ãã—㦠`stopLoadingURL`) を使用ã§ãã¾ã™ã€‚ ボタンやメニューコマンドã«ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’割り当ã¦ã‚‹ã“ã¨ã§ã€åŸºæœ¬ã® Webインターフェースを素早ã実装ã§ãã¾ã™ã€‚ ã“れらã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã¯ [標準アクション](https://doc.4d.com/4Dv18/4D/18/Standard-actions.300-4575620.ja.html) ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ -## Form events -Specific form events are intended for programmed management of web areas, more particularly concerning the activation of links: +## フォームイベント -- `On Begin URL Loading` -- `On URL Resource Loading` -- `On End URL Loading` -- `On URL Loading Error` -- `On URL Filtering` -- `On Open External Link` -- `On Window Opening Denied` +特定ã®ãƒ•ォームイベントã¯ã€Webエリアをプログラミングã§ç®¡ç†ã™ã‚‹ã“を目的ã¨ã—ã¦ã„ã¾ã™ã€‚ã™ãªã‚ã¡ã€ãƒªãƒ³ã‚¯ã®èµ·å‹•ã«é–¢é€£ã—ã¦ã„ã¾ã™: -In addition, web areas support the following generic form events: +- [`On Begin URL Loading`](Events/onBeginUrlLoading.md) +- [`On URL Resource Loading`](Events/onUrlResourceLoading.md) +- [`On End URL Loading`](Events/onEndUrlLoading.md) +- [`On URL Loading Error`](Events/onUrlLoadingError.md) +- [`On URL Filtering`](Events/onUrlFiltering.md) +- [`On Open External Link`](Events/onOpenExternalLink.md) +- [`On Window Opening Denied`](Events/onWindowOpeningDenied.md) -- `On Load` -- `On Unload` -- `On Getting Focus` -- `On Losing Focus` +æ›´ã«ã€Webエリアã¯ä»¥ä¸‹ã®æ±Žç”¨ãƒ•ォームイベントをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™: -## Web area rules +- [`On Load`](Events/onLoad.md) +- [`On Unload`](Events/onUnload.md) +- [`On Getting Focus`](Events/onGettingFocus.md) +- [`On Losing Focus`](Events/onLosingFocus.md) -### 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: +## Webエリアã®ãƒ«ãƒ¼ãƒ« -- **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 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 web area. +### ユーザーインターフェース -### Subforms +フォームãŒå®Ÿè¡Œã•れるã¨ã€ä»–ã®ãƒ•ォームエリアã¨ã®å¯¾è©±ã‚’å¯èƒ½ã«ã™ã‚‹ã€æ¨™æº–ã®ãƒ–ラウザーインタフェース機能㌠Web エリア内ã§åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ -For reasons related to window redrawing mechanisms, the insertion of a web area into a subform is subject to the following constraints: +- **編集メニューコマンド**: Webエリアã«ãƒ•ォーカスãŒã‚ã‚‹ã¨ãã€**編集** メニューコマンドを使用ã—ã¦ã‚³ãƒ”ーやペーストã€ã™ã¹ã¦ã‚’é¸æŠžãªã©ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã«å¿œã˜ã¦å®Ÿè¡Œã§ãã¾ã™ã€‚ +- **コンテキストメニュー**: Webエリアã§ã€ã‚·ã‚¹ãƒ†ãƒ æ¨™æº–ã® [コンテキストメニュー](properties_Entry.md#コンテキストメニュー) を使用ã§ãã¾ã™ã€‚ コンテキストメニューã®è¡¨ç¤ºã¯ã€`WA SET PREFERENCE` コマンドを使用ã™ã‚‹ã“ã¨ã§ç®¡ç†å¯èƒ½ã§ã™ã€‚ +- **ドラッグ&ドロップ**: 4D ã®ã‚ªãƒ–ジェクトプロパティã«åŸºã¥ãã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ Webエリア内ã§ã€ã¾ãŸã¯ Webエリア㨠4Dフォームオブジェクト間ã§ã€ãƒ†ã‚­ã‚¹ãƒˆã‚„ピクãƒãƒ£ãƒ¼ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ドラッグ&ドロップã§ãã¾ã™ã€‚ セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€ãƒ•ァイルã¾ãŸã¯ URL ã®ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã«ã‚ˆã£ã¦ Webエリアã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を変更ã™ã‚‹ã“ã¨ã¯ã€ãƒ‡ãƒ•ォルトã§ç¦æ­¢ã•れã¦ã„ã¾ã™ã€‚ ã“ã®å ´åˆã€ã‚«ãƒ¼ã‚½ãƒ«ã¯ "ç¦æ­¢" アイコン ![](assets/en/FormObjects/forbidden.png) を表示ã—ã¾ã™ã€‚ エリアã¸ã®ãƒ•ァイルや URL ã®ãƒ‰ãƒ­ãƒƒãƒ—を許å¯ã™ã‚‹ã«ã¯ã€`WA SET PREFERENCE` コマンドを使用ã—ã¦æ˜Žç¤ºçš„ã«ãƒ‰ãƒ­ãƒƒãƒ—を許å¯ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -- The subform must not be able to scroll -- The limits of the web area must not exceed the size of the subform +### サブフォーム -> Superimposing a web area on top of or beneath other form objects is not supported. +ウィンドウã®å†æç”»æ©Ÿæ§‹ã«é–¢ã‚ã‚‹ç†ç”±ã‹ã‚‰ã€ã‚µãƒ–フォーム㫠Webエリアを挿入ã™ã‚‹å ´åˆã«ã¯ä»¥ä¸‹ã®åˆ¶ç´„ãŒã¤ãã¾ã™: -### Web Area and Web server conflict (Windows) +- サブフォームをスクロールå¯èƒ½ã«ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 +- Webエリアã®ã‚µã‚¤ã‚ºãŒã‚µãƒ–フォームã®ã‚µã‚¤ã‚ºã‚’è¶…ãˆã¦ã¯ã„ã‘ã¾ã›ã‚“。 -In 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) -### Insertion of protocol (macOS) +Windows ã«ãŠã„ã¦ã¯ã€Webエリアã‹ã‚‰ã€åŒã˜ 4Dアプリケーションã§èµ·å‹•中㮠Webサーãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ãŠå‹§ã‚ã§ãã¾ã›ã‚“。ã“れをãŠã“ãªã†ã¨ã‚³ãƒ³ãƒ•リクトãŒç™ºç”Ÿã—ã€ã‚¢ãƒ—リケーションãŒãƒ•リーズã™ã‚‹ã“ã¨ãŒã‚りã¾ã™ã€‚ ã‚‚ã¡ã‚ã‚“ã€ãƒªãƒ¢ãƒ¼ãƒˆã® 4D ã‹ã‚‰ 4D Server ã® Webサーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã™ã€‚自身㮠Webサーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ -The URLs handled by programming in web areas in 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 in your forms or in offscreen web areas. The web inspector is a debugger which is provided by the embedded Web engine. It allows parsing the code and the flow of information of the web pages. +## Webインスペクターã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ -### Displaying the web inspector +オフスクリーン㮠Webエリアやã€ãƒ•ォームã®Web エリア内ã«ãŠã„ã¦ã€Webインスペクターを見ãŸã‚Šä½¿ç”¨ã—ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ Webインスペクターã¯ã€åŸ‹ã‚è¾¼ã¿Webエンジンã«ã‚ˆã£ã¦æä¾›ã•れã¦ã„るデãƒãƒƒã‚¬ãƒ¼ã§ã™ã€‚ Webãƒšãƒ¼ã‚¸ã®æƒ…å ±ã®ã€ã‚³ãƒ¼ãƒ‰ã¨ãƒ•ローを解æžã—ã¾ã™ã€‚ -To display the web inspector, you can either execute the `WA OPEN WEB INSPECTOR` command, or use the context menu of the web area. +### Webインスペクターã®è¡¨ç¤º -- **Execute the `WA OPEN WEB INSPECTOR` command** - This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). +Webインスペクターを表示ã•ã›ã‚‹ã«ã¯ã€`WA OPEN WEB INSPECTOR` コマンドを実行ã™ã‚‹ã‹ã€ Webエリアã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ -- **Use the web area context menu** - This feature can only be used with onscreen web areas and requires that the following conditions are met: - - - the embedded web rendering engine is selected for the area - - the [context menu](properties_Entry.md#context-menu) for the web area is enabled - - the use of the inspector is expressly enabled in the area by means of the following statement: +- **`WA OPEN WEB INSPECTOR` コマンドã®å®Ÿè¡Œ**
          ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ä¸Š (フォームオブジェクト) ã®ã€ã¾ãŸã¯ã‚ªãƒ•スクリーン㮠Webエリアã«å¯¾ã—ã¦ç›´æŽ¥ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ オフスクリーン㮠Webエリアã®å ´åˆã€ãã®ã‚¨ãƒªã‚¢ã¯ [埋ã‚è¾¼ã¿Webレンダリングエンジン](properties_WebArea.md#埋ã‚è¾¼ã¿Webレンダリングエンジンを使用) を使用ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (Webインスペクターã¯ã“ã®è¨­å®šã§ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™)。 + +- **Webエリアコンテキストメニューã®ä½¿ç”¨**
          ã“ã®æ©Ÿèƒ½ã¯ã‚ªãƒ³ã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã® Webエリアã§ã®ã¿ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã€ä»¥ä¸‹ã®æ¡ä»¶ã‚’満ãŸã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: + - エリアã«å¯¾ã—㦠"埋ã‚è¾¼ã¿Webレンダリングエンジンを使用" プロパティãŒé¸æŠžã•れã¦ã„る。 + - エリアã«å¯¾ã—㦠[コンテキストメニュー](properties_Entry.md#コンテキストメニュー) ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„る。 + - インスペクターã®ä½¿ç”¨ãŒã€ä»¥ä¸‹ã®å®£è¨€ã‚’用ã„ã¦æ˜Žç¤ºçš„ã«æœ‰åŠ¹åŒ–ã•れã¦ã„ã‚‹: ```4d WA SET PREFERENCE(*;"WA";WA enable Web inspector;True) ``` -For more information, refer to the description of the `WA SET PREFERENCE` command. +詳細㯠`WA SET PREFERENCE` コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +### Webインスペクターã®ä½¿ç”¨ + +上記ã®ã¨ãŠã‚Šè¨­å®šã‚’完了ã™ã‚‹ã¨ã€ã‚¨ãƒªã‚¢å†…ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼å†…ã« **è¦ç´ ã‚’調査** ã¨ã„ã†æ–°ã—ã„オプションãŒè¿½åŠ ã•れã¦ã„ã‚‹ã¯ãšã§ã™: ã“ã®é …ç›®ã‚’é¸æŠžã™ã‚‹ã¨ã€WebインスペクターウィンドウãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +> ã“ã® Webインスペクターã¯ã€åŸ‹ã‚è¾¼ã¿Webレンダリングエンジンã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã®æ©Ÿèƒ½ã®è©³ç´°ã«é–¢ã—ã¦ã¯ã€Webレンダリングエンジンã«ã‚ˆã‚Šæä¾›ã•れã¦ã„るドキュメントをå‚ç…§ã—ã¦ãã ã•ã„。 -### Using the web inspector -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..1ca81245a85d5d 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#éžè¡¨ç¤ºæ–‡å­—を表示) - [HTML WYSIWYG 表示](properties_Appearance.md#HTML-WYSIWYG-表示) - [水平ルーラーを表示](properties_Appearance.md#水平ルーラーを表示) - [垂直ルーラーを表示](properties_Appearance.md#垂直ルーラーを表示) - [境界線スタイル](properties_BackgroundAndBorder.md#境界線スタイル) - [å°åˆ·æ™‚å¯å¤‰](properties_Print.md#å°åˆ·æ™‚å¯å¤‰) - [メソッド](properties_Action.md#メソッド) - [ドラッグ有効](properties_Action.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..6aa275a1ae610e --- /dev/null +++ b/website/translated_docs/ja/GettingStarted/Installation.md @@ -0,0 +1,48 @@ +--- +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 製å“ã®ã‚¢ã‚¤ã‚³ãƒ³ã‚’ダブルクリックã—ã¾ã™ã€‚ + +![](assets/en/getStart/logo4d.png) + +ã™ã‚‹ã¨ã€Welcome ウィザードãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/getStart/welcome2.png) + +- 4D を試用ã™ã‚‹ã«ã¯ã€"åˆã‚㦠4D ã‚’ãŠä½¿ã„ã§ã™ã‹ï¼Ÿ" ã®ä¸‹ã«ã‚ã‚‹ã€**無料体験版を開始ã™ã‚‹ã«ã¯ã“ã“をクリック** ã‹ã‚‰å…ˆã«é€²ã¿ã¾ã™ (4D アカウントã§ãƒ­ã‚°ã‚¤ãƒ³ã€ã¾ãŸã¯ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’æ–°è¦ä½œæˆã™ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 + +- 4D アカウントをã™ã§ã«æŒã£ã¦ã„ã‚‹å ´åˆã¯ã€Welcome ウィザードã®å³ä¸Šã«ã‚ã‚‹ **ログイン** リンクをクリックã—ã€ã‚¢ã‚«ã‚¦ãƒ³ãƒˆæƒ…報を入力ã—ã¾ã™ã€‚ マシン上ã§ã‚¢ã‚¯ãƒ†ã‚£ãƒ™ãƒ¼ã‚·ãƒ§ãƒ³æ¸ˆã¿ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã¯è‡ªå‹•çš„ã«æ›´æ–° (追加ライセンスãŒã‚れã°è‡ªå‹•çš„ã«ãƒ­ãƒ¼ãƒ‰) ã•れã¾ã™ã€‚ + +**アプリケーションプロジェクトを開始ã¾ãŸã¯ä½œæˆ** 項目を展開ã™ã‚‹ã¨ã€ã„ãã¤ã‹ã®é¸æŠžè‚¢ãŒè¡¨ç¤ºã•れã¾ã™: + +- **4D Server ã«æŽ¥ç¶š** - 4D をリモートクライアントã¨ã—ã¦è©¦ç”¨ã—ã€4D Server ã«ã¦ã™ã§ã«èµ·å‹•ã•れã¦ã„ã‚‹ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æŽ¥ç¶šã—ã¾ã™ã€‚ + +- **ローカルアプリケーションプロジェクトを開ã** - ディスク上ã«ä¿å­˜ã•れã¦ã„る既存ã®ã‚¢ãƒ—リケーションプロジェクトを開ãã¾ã™ã€‚ + +- **æ–°è¦ã«ã‚¢ãƒ—リケーションプロジェクトを作æˆã™ã‚‹** - ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«æ–°è¦ã®ã‚¢ãƒ—リケーションプロジェクトを作æˆã—ã¾ã™ã€‚ + +ãœã² 4D を楽ã—ã‚“ã§ãã ã•ã„ï¼ + diff --git a/website/translated_docs/ja/MSC/analysis.md b/website/translated_docs/ja/MSC/analysis.md index 842986803d7551..6d6c24719434db 100644 --- a/website/translated_docs/ja/MSC/analysis.md +++ b/website/translated_docs/ja/MSC/analysis.md @@ -1,44 +1,43 @@ --- 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. - - Update context: Change in extra data (e.g. a call to `CHANGE CURRENT USER` or `SET USER ALIAS`). -- **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. -- **System User**: System 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 session name of the user is displayed. -- **4D User**: 4D user name of the user that performed the operation. If an alias is defined for the user, the alias is displayed instead of the 4D user name. -- **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 ã‚’æ ¼ç´ã—㟠+ - 削除: レコードを削除ã—㟠+ - æ›´æ–°: レコードを更新ã—㟠+ - トランザクションã®é–‹å§‹: トランザクションを開始ã—㟠+ - トランザクションã®å—ã‘入れ: トランザクションをå—ã‘入れ㟠+ - トランザクションã®ã‚­ãƒ£ãƒ³ã‚»ãƒ«: トランザクションをキャンセルã—㟠+ - ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®æ›´æ–°: 追加データを変更ã—㟠(例: `CHANGE CURRENT USER` ã‚ã‚‹ã„㯠`SET USER ALIAS` ã®å‘¼ã³å‡ºã—) + +- **テーブル**: 追加/削除/æ›´æ–°ã•れãŸãƒ¬ã‚³ãƒ¼ãƒ‰ã¾ãŸã¯ BLOB ã®æ‰€å±žãƒ†ãƒ¼ãƒ–ル +- **プライマリーキー/BLOB**: å„レコードã®ãƒ—ライマリーキーã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ (プライマリーキーãŒè¤‡æ•°ã®ãƒ•ィールドã‹ã‚‰æ§‹æˆã•れã¦ã„ã‚‹ã¨ãã«ã¯ã€å€¤ã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³ã§åŒºåˆ‡ã‚‰ã‚Œã¦ã„ã¾ã™)ã€ã¾ãŸã¯ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«é–¢é€£ã—㟠BLOB ã®ã‚·ãƒ¼ã‚±ãƒ³ã‚¹ç•ªå· +- **プロセス**: 処ç†ãŒå®Ÿè¡Œã•れãŸå†…部プロセス番å·ã€‚ ã“ã®å†…部番å·ã¯å‡¦ç†ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å¯¾å¿œã—ã¾ã™ã€‚ +- **サイズ**: æ“作ã«ã‚ˆã‚Šå‡¦ç†ã•れãŸãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) +- **æ—¥ä»˜ã¨æ™‚刻**: 処ç†ãŒå®Ÿè¡Œã•ã‚ŒãŸæ—¥ä»˜ã¨æ™‚刻 +- **システムユーザー**: æ“作を実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚·ã‚¹ãƒ†ãƒ å。 クライアント/サーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³åãŒè¡¨ç¤ºã•れã¾ã™ã€‚シングルユーザーモードã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³åãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **4Dユーザー**: æ“作を実行ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã® 4Dユーザーå。 ユーザーã«å¯¾ã—ã¦ã‚¨ã‚¤ãƒªã‚¢ã‚¹ãŒè¨­å®šã•れã¦ã„ãŸå ´åˆã€4Dユーザーåã®ä»£ã‚りã®ãã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **値**: レコードã®è¿½åŠ ã‚„æ›´æ–°ã®å ´åˆã€ãƒ•ィールドã®å€¤ã€‚ 値ã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³ “;†ã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ 文字形å¼ã«è¡¨ç¾ã§ãる値ã®ã¿ã‚’表示ã—ã¾ã™ã€‚ + ***注**: ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæš—å·åŒ–ã•れã¦ãŠã‚Šã€é–‹ã‹ã‚ŒãŸãƒ­ã‚°ãƒ•ァイルã«å¯¾å¿œã™ã‚‹æœ‰åйãªãƒ‡ãƒ¼ã‚¿ã‚­ãƒ¼ãŒæä¾›ã•れã¦ã„ãªã„å ´åˆã€æš—å·åŒ–ã•れãŸå€¤ã¯ã“ã®ã‚«ãƒ©ãƒ ã«ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。* +- **レコード**: ãƒ¬ã‚³ãƒ¼ãƒ‰ç•ªå· + +é¸æŠžã—ãŸã‚¢ãƒ—リケーションã®ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイル (デフォルト㧠"データファイルå.journal" ã¨ã„ã†ãƒ•ァイルå) ã®å†…容を更新ã™ã‚‹ã«ã¯ **è§£æž** をクリックã—ã¾ã™ã€‚ **ブラウズ**ボタンをクリックã™ã‚‹ã¨ã€ã‚¢ãƒ—リケーションã®ä»–ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã§ãã¾ã™ã€‚ **書ã出ã—...** ボタンを使用ã—ã¦ãƒ•ァイルã®å†…容をテキストã¨ã—ã¦æ›¸ã出ã›ã¾ã™ã€‚ + diff --git a/website/translated_docs/ja/MSC/backup.md b/website/translated_docs/ja/MSC/backup.md index 908bbd3f3460c6..ca031b9a5c7ea1 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 +ã“ã®ãƒšãƒ¼ã‚¸ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—パラメーターを変更ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“れをãŠã“ãªã†ã«ã¯ **データベースプロパティ...** ボタンをクリックã—ã¾ã™ã€‚ \ 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..3536adb696c051 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å½¢å¼ã§ä½œæˆã•れã€*ApplicationName_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: +- *ApplicationName* ã¯æ‹¡å¼µå­ã‚’除ã„ãŸãƒ—ロジェクトファイルã®åå‰ã§ã™ (例: "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 dd41baade79d7b..fa03f086a1b431 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å½¢å¼ã§ä½œæˆã•れã€"*ApplicationName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" ã¾ãŸã¯ "*ApplicationName_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..a294b989b09168 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ライセンスフォルダーã®åå‰ã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®ã‚¿ã‚¤ãƒ—ã€ãŠã‚ˆã³ã€ã‚«ãƒ¬ãƒ³ãƒˆ 4Dユーザーã®åå‰ã‚’表示ã—ã¾ã™ã€‚ -- **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..37210a2f8f0071 100644 --- a/website/translated_docs/ja/MSC/overview.md +++ b/website/translated_docs/ja/MSC/overview.md @@ -4,37 +4,37 @@ 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) + ã“ã®æ©Ÿèƒ½ã‚’呼ã³å‡ºã™ã¨ã€æ¨™æº–ã®ãƒ•ァイルを開ãダイアログボックスãŒè¡¨ç¤ºã•ã‚Œã€æ¤œæŸ»ã™ã‚‹ *.4DProject* ã¾ãŸã¯ *.4dz* ファイルを指定ã§ãã¾ã™ã€‚ プロジェクトã¯é–‹ã‹ã‚Œã¾ã›ã‚“。 -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" 標準アクションを使用ã™ã‚‹ã€‚ +- `OPEN SECURITY CENTER` ランゲージコマンドを使用ã™ã‚‹ã€‚ -## Feature availability +## アクセス権 -Certain MSC functions are not available depending on the MSC opening mode: +特定㮠MSC機能ã¯ã€MSC ãŒé–‹ã‹ã‚ŒãŸãƒ¢ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦ã¯åˆ©ç”¨ã§ãã¾ã›ã‚“: -- 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 ã¯ãƒ¡ã‚¤ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãƒ¢ãƒ¼ãƒ‰ã§é–‹ã‹ã‚Œã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“) 。 ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãŒæ¨™æº–モードã§é–‹ã‹ã‚Œã¦ã„る時ã«ã“ã‚Œã‚‰ã®æ©Ÿèƒ½ã‚’試ã¿ãŸå ´åˆã¯ã€ãƒ¡ã‚¤ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãƒ¢ãƒ¼ãƒ‰ã§ã‚¢ãƒ—リケーションå†èµ·å‹•を促ã™ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦ã¯ã€æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ã¾ãŸã¯ .journal ファイルã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã«ã¯æœ‰åйãªãƒ‡ãƒ¼ã‚¿ã‚­ãƒ¼ãŒæä¾›ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ ([æš—å·åŒ–ページ](encrypt.md) å‚ç…§)。 æä¾›ã•れã¦ã„ãªã„å ´åˆã€æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ã¯è¦‹ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 diff --git a/website/translated_docs/ja/MSC/repair.md b/website/translated_docs/ja/MSC/repair.md index 93479e5fd89eb5..f1dea4032360f8 100644 --- a/website/translated_docs/ja/MSC/repair.md +++ b/website/translated_docs/ja/MSC/repair.md @@ -1,74 +1,71 @@ --- 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 - -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. +## データファイル修復 -### 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. +### オリジナルをã“ã“ã«ç§»å‹• +デフォルトã§ä¿®å¾©å‡¦ç†ã®å‰ã«å…ƒã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒè¤‡è£½ã•れã¾ã™ã€‚ ã“ã®ãƒ•ァイルã¯ã€ã‚¢ãƒ—リケーションフォルダー㮠"Replaced files (repairing)" サブフォルダーã«é…ç½®ã•れã¾ã™ã€‚ 二ã¤ç›®ã® **[...]** ボタンを使用ã—ã¦ã€è¤‡è£½ãƒ•ァイルã®ä¿å­˜å…ˆã‚’変更ã§ãã¾ã™ã€‚ ã¨ãã«å¤§ããªãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを修復ã™ã‚‹éš›ã€ã‚³ãƒ”ー先を別ã®ãƒ‡ã‚£ã‚¹ã‚¯ã«å¤‰æ›´ã™ã‚‹ãŸã‚ã«ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ -### Repaired files +### 修復済ファイル +4Dã¯å…ƒã®ãƒ•ァイルã®å ´æ‰€ã«ç©ºã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを新è¦ä½œæˆã—ã¾ã™ã€‚ å…ƒã®ãƒ•ァイルã¯ã€"\Replaced Files (Repairing) {日付} {時刻}"ã¨ã„ã†åå‰ã®ãƒ•ォルダーãŒã‚ªãƒªã‚¸ãƒŠãƒ«ã®ç§»å‹•å…ˆã«æŒ‡å®šã—ãŸãƒ•ォルダー内ã«ä½œæˆã•れ (デフォルトã¯ã‚¢ãƒ—リケーションフォルダー)ã€ãã“ã«ç§»å‹•ã•れã¾ã™ã€‚ 修復ã•れãŸãƒ‡ãƒ¼ã‚¿ã¯ã€æ–°è¦ä½œæˆã•れãŸç©ºã®ãƒ•ã‚¡ã‚¤ãƒ«ã«æ ¼ç´ã•れã¾ã™ã€‚ -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) +修復æ“作ãŒå®Œäº†ã™ã‚‹ã¨ã€MSCã® "修復" ページãŒè¡¨ç¤ºã•れã€ä¿®å¾©ã®çµæžœãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ä¿®å¾©ã«æˆåŠŸã—ã¦ã„れã°ã€ãã®æ—¨ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ãã®å ´åˆã€ã‚¢ãƒ—リケーションをãã®ã¾ã¾ä½¿ã„å§‹ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ![](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ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ã‚µã‚¤ã‚ºãŒå¯å¤‰ã§ã™ã€‚æ•…ã«ã€ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロードã™ã‚‹ã«ã¯ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã©ã“ã«æ ¼ç´ã•れã¦ã„ã‚‹ã‹ã€ãã®å ´æ‰€ã‚’ "アドレステーブル" ã¨ã„ã†å°‚用テーブルã«è¨˜éŒ²ã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ プログラムã¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚„アドレステーブルを経由ã—ã¦ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ レコードやインデックスã®ã¿ãŒæå‚·ã‚’å—ã‘ã¦ã„ã‚‹å ´åˆã€æ¨™æº–ã®ä¿®å¾©ã‚’使用ã™ã‚Œã°é€šå¸¸ã¯å•題ãŒè§£æ±ºã•れã¾ã™ã€‚ ã—ã‹ã—ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ†ãƒ¼ãƒ–ãƒ«è‡ªèº«ãŒæå‚·ã‚’å—ã‘ã¦ã„ã‚‹å ´åˆã«ã¯ã€ã“ã‚Œã‚’å†æ§‹ç¯‰ã—ãªãã¦ã¯ãªã‚‰ãªã„ãŸã‚ã€ã‚ˆã‚Šé«˜åº¦ãªä¿®å¾©ä½œæ¥­ãŒå¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ ã“れをãŠã“ãªã†ãŸã‚ã«ã€MSC ã¯å„レコードã®ãƒ˜ãƒƒãƒ€ãƒ¼ã«ä½ç½®ã™ã‚‹ãƒžãƒ¼ã‚«ãƒ¼ã‚’使用ã—ã¾ã™ã€‚ マーカーãŒãƒ¬ã‚³ãƒ¼ãƒ‰æƒ…å ±ã®ã‚µãƒžãƒªãƒ¼ã¨æ¯”較ã•れるã“ã¨ã«ã‚ˆã‚Šã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ†ãƒ¼ãƒ–ルãŒå†æ§‹ç¯‰å¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ -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**. +> ストラクãƒãƒ£ãƒ¼ã®ãƒ†ãƒ¼ãƒ–ルプロパティ㧠**レコードを完全ã«å‰Šé™¤** オプションを解除ã—ã¦ã„ã‚‹ã¨ã€ãƒ˜ãƒƒãƒ€ãƒ¼ãƒžãƒ¼ã‚«ãƒ¼ã‚’使用ã—ãŸå¾©æ—§ã«ã‚ˆã£ã¦å‰Šé™¤ã—ãŸã¯ãšã®ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒå¾©æ´»ã™ã‚‹åŽŸå› ã¨ãªã‚Šã¾ã™ã€‚ +> +> ヘッダーã«ã‚ˆã‚‹å†ç”Ÿã«ãŠã„ã¦ã€æ•´åˆæ€§ã®åˆ¶ç´„ã¯è€ƒæ…®ã•れã¾ã›ã‚“。 ã“ã®å‡¦ç†ã‚’ãŠã“ãªã£ãŸå¾Œã€é‡è¤‡ä¸å¯ãƒ•ィールドã«é‡è¤‡ã™ã‚‹å€¤ãŒç¾ã‚ŒãŸã‚Šã€**NULL値を許å¯ã—ãªã„** ã«å®šç¾©ã—ãŸãƒ•ィールド㫠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å½¢å¼ã§ä½œæˆã•れã€*ApplicationName_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". +- *ApplicationName* ã¯æ‹¡å¼µå­ã‚’除ã„ãŸãƒ—ロジェクトファイルã®åå‰ã§ã™ (例: "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 a69985d4a26baf..b177d4c1b60991 100644 --- a/website/translated_docs/ja/MSC/restore.md +++ b/website/translated_docs/ja/MSC/restore.md @@ -1,66 +1,63 @@ --- 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. - -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. +> 4D ã®è‡ªå‹•復元機能ã¯ã€ã‚¢ãƒ—リケーション復元後ã«å ´åˆã«å¿œã˜ã¦ãƒ‡ãƒ¼ã‚¿ãƒ­ã‚°ãƒ•ァイルを統åˆã—ã¾ã™ã€‚ -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. +ã“ã®ãƒªã‚¹ãƒˆã‹ã‚‰ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å³å´ã«ã¯ãã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«ã¤ã„ã¦ã®èª¬æ˜ŽãŒè¡¨ç¤ºã•れã¾ã™: -The **Restore** button launches the manual restoration of the selected element(s). +- **パス**: é¸æŠžã•れãŸãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã®å®Œå…¨ãƒ‘スå。 **表示** ボタンをクリックã™ã‚‹ã¨ã€ã‚·ã‚¹ãƒ†ãƒ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- **æ—¥ä»˜ã¨æ™‚刻**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®æ—¥ä»˜ã¨æ™‚刻 +- **内容**: ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルã®å†…容。 å„é …ç›®ã®å³å´ã«ã¯ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ãŒã‚りã€å¾©å…ƒã‚’ãŠã“ãªã†ã‹ã©ã†ã‹ã€ãƒ•ァイルã”ã¨ã«é¸æŠžã§ãã¾ã™ã€‚ **ã™ã¹ã¦ã‚’é¸æŠžã™ã‚‹** ã‚„ **ã™ã¹ã¦ã®é¸æŠžã‚’ã¯ãšã™** ボタンを利用ã—ã¦ã€å¾©å…ƒã™ã‚‹ãƒ•ァイルã®è¨­å®šã‚’ãŠã“ãªã†ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ +- **復元ã•れãŸãƒ•ァイルã®ä¿å­˜å…ˆãƒ•ォルダー**: 復元ã•れãŸãƒ•ァイルãŒé…ç½®ã•れるフォルダー。 デフォルト㧠4D 㯠Projectフォルダーã¨åŒéšŽå±¤ã«ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–å (æ‹¡å¼µå­ãªã—) ã®ãƒ•ォルダーを作æˆã—ã€ãã“ã«ãƒ•ァイルを復元ã—ã¾ã™ã€‚ ã“ã®å ´æ‰€ã‚’変更ã™ã‚‹ã«ã¯ **[...]** をクリックã—ã¦å¾©å…ƒãƒ•ァイルã®é…置場所を指定ã—ã¾ã™ã€‚ -## 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. +## 複数ã®ãƒ­ã‚°ãƒ•ァイルを連続ã—ã¦çµ±åˆã™ã‚‹ -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. +**復元後ã«ã²ã¨ã¤ä»¥ä¸Šã®ãƒ­ã‚°ãƒ•ァイルを統åˆ** オプションを使用ã—ã¦ã€ã‚¢ãƒ—リケーションã«è¤‡æ•°ã®ãƒ­ã‚°ãƒ•ァイルを統åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€4ã¤ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã«å¯¾å¿œã™ã‚‹ 4ã¤ã®ãƒ­ã‚°ãƒ•ァイルアーカイブãŒã‚ã‚‹å ´åˆã€æœ€åˆã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã—ã¦ã€ãƒ­ã‚°ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を一ã¤ãšã¤çµ±åˆã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ãŸã¨ãˆã°æœ€æ–°ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイルを失ã£ãŸå ´åˆã§ã‚‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを復旧ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## Restoring an encrypted database +ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€4Dã¯å¾©å…ƒå¾Œã«æ¨™æº–ã®ãƒ•ァイルを開ãダイアログを表示ã—ã¾ã™ã€‚ã“ã“ã§çµ±åˆã™ã‚‹ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã§ãã¾ã™ã€‚ ファイルを開ãダイアログã¯ã€ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¾ã§çµ±åˆã®éƒ½åº¦è¡¨ç¤ºã•れã¾ã™ã€‚ -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. +## æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å¾©å…ƒ -When restoring a backup and integrating the current log file in a encrypted database: +カレントアプリケーションã¨è¤‡æ•°ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル (.4BK) やログファイル (.4BL) ã®é–“ã§ã€ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–キー (パスフレーズ) ãŒå¤‰æ›´ã•れã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ åˆè‡´ã—ãŸæš—å·åŒ–キーã¯å¸¸ã«å¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ -- 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. +æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã—ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ­ã‚°ãƒ•ァイルを統åˆã—ãŸã„å ´åˆã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„: -The following sequence illustrates the principles of a multi-key backup/restore operation: +- å¤ã„パスフレーズを使用ã—ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を復元ã—ãŸå ´åˆã€ãã®ãƒ‘ã‚¹ãƒ•ãƒ¬ãƒ¼ã‚ºã¯æ¬¡å›žã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹èµ·å‹•時ã«å¿…è¦ã¨ãªã‚Šã¾ã™ã€‚ +- æš—å·åŒ–ã®ã‚ã¨ã€æš—å·åŒ–ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãéš›ã«ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒå®Ÿè¡Œã•れ新ã—ã„ログファイルãŒä½œæˆã•れã¾ã™ã€‚ ãã®ãŸã‚ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ファイル (.4BK) を特定ã®ã‚­ãƒ¼ã§å¾©å·åŒ–ã—ãŸå¾Œã€ç•°ãªã‚‹ã‚­ãƒ¼ã§æš—å·åŒ–ã•れãŸãƒ­ã‚°ãƒ•ァイル (.4BL) ã‚’ãれã«çµ±åˆã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 -| æ¼”ç®—å­ | 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..049a6bfffa118c 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ã¯ç©ºã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ã„ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/MSC/verify.md b/website/translated_docs/ja/MSC/verify.md index e3601bcc1c9912..e571364c2c22ba 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å½¢å¼ã§ã€ãƒ•ァイルå㯠*ApplicationName*__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. +- *ApplicationName* ã¯æ‹¡å¼µå­ã‚’除ã„ãŸãƒ—ロジェクトファイルã®åå‰ã§ã™ (例: "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 b378e78c2cb2eb..76a7f6d1f634e0 100644 --- a/website/translated_docs/ja/Menus/bars.md +++ b/website/translated_docs/ja/Menus/bars.md @@ -1,39 +1,43 @@ --- 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..1296c3f6ca52b6 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..b272ff46afc34c 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..b507780f83dd57 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. +- Windows: + - Ctrl+文字 + - Ctrl+Shift+文字 + - Ctrl+Alt+文字 + - Ctrl+Shift+Alt+文字 -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. +- macOS: + - Command+文字 + - Command+Shift+文字 + - Command+Option+文字 + - Command+Shift+Option+文字 -These reserved key combinations are listed in the following table: +> 標準アクションã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸãƒ‡ãƒ•ォルトã®ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã¯å¤‰æ›´ã—ãªã„ã“ã¨ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ -| 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 | +**ファイル** ã‚„ **編集** メニューã€ãŠã‚ˆã³ 4D ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã«äºˆç´„ã•れã¦ã„る標準メニューã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’除ãã€ã™ã¹ã¦ã®è‹±æ•°å­—をキーボードショートカット文字ã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ +予約ã•れã¦ã„る組ã¿åˆã‚ã›ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: -To assign a keyboard shortcut in the Menu editor: +| キー (Windows) | キー (macOS) | æ¼”ç®—å­ | +| ------------- | ---------------- | ---- | +| Ctrl+C | Command+C | コピー | +| Ctrl+Q | Command+Q | 終了 | +| Ctrl+V | Command+V | ペースト | +| Ctrl+X | Command+X | カット | +| Ctrl+Z | Command+Z | å–り消㗠| +| Ctrl+. (ピリオド) | Command+. (ピリオド) | å®Ÿè¡Œåœæ­¢ | -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` コマンドを使ã„ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Menus/sdi.md b/website/translated_docs/ja/Menus/sdi.md index 46f9ffe7980007..06c2d759513f9f 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 +## SDIモード利用æ¡ä»¶ -The SDI mode is available in the following execution environment only: +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/Notes/updates.md b/website/translated_docs/ja/Notes/updates.md new file mode 100644 index 00000000000000..d73b4bc79989d8 --- /dev/null +++ b/website/translated_docs/ja/Notes/updates.md @@ -0,0 +1,35 @@ +--- +id: updates +title: ドキュメンテーション更新情報 +--- + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãŠã‚‚ãªæ›´æ–°å†…容ã®ãƒªã‚¹ãƒˆã§ã™ã€‚ 4D製å“ã®æ–°æ©Ÿèƒ½ã«ã¤ã„ã¦ã®ä¸€èˆ¬çš„ãªæƒ…å ±ã¯ã€[doc.4d.com](https://doc.4d.com) ã® **リリースノート** ã‚’å‚ç…§ãã ã•ã„。 + +## 4D v19 R2 + +- æ–°è¦ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆä½œæˆæ™‚ã« [デフォルトã®.gitignoreファイル](Preferences/general.md#gitignore-ファイルを作æˆã™ã‚‹) ãŒä½œæˆå¯èƒ½ +- æ–°ã—ã„ [`4D.Blob`](Concepts/dt_blob.md#blob-ã®ç¨®é¡ž) オブジェクトを扱ã†ãŸã‚ã®æ–°ã—ã„[BlobクラスAPI](API/BlobClass.md) +- [`.setText()`](API/FileClass.md#settext) ã«ãŠã‘ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æ”¹è¡Œã‚³ãƒ¼ãƒ‰ (EOL) ã®æŒ‡å®šã¨ `no-bom` ã®ã‚µãƒãƒ¼ãƒˆ + + +## 4D v19 + +- [IMAPTransporter クラス](API/IMAPTransporterClass.md): æ–°ã—ã„ `.createBox()`, `.deleteBox()`, `.renameBox()`, `.subscribe()`, `.unsubscribe()` 関数 +- [File クラス](API/FileClass.md): æ–°ã—ã„ `setAppInfo()` ãŠã‚ˆã³ `getAppInfo()` 関数 +- æ–°ã—ã„ [4DEACH](Tags/tags.md#4deach-and-4dendeach) 変æ›ã‚¿ã‚° +- Web サーãƒãƒ¼: æ–°ã—ã„ [SameSite セッションcookie](WebServer/webServerConfig.md#セッションcookie-samesite) 設定 +- [フォーム](FormEditor/properties_FormProperties.md#カラースキーム) ãŠã‚ˆã³ [スタイルシート](FormEditor/createStylesheet.md#メディアクエリ) 用ã®ãƒ€ãƒ¼ã‚¯ãŠã‚ˆã³ãƒ©ã‚¤ãƒˆã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚µãƒãƒ¼ãƒˆ +- [メソッドエディター環境設定](Preferences/methods.md#テーマリスト) ã®æ–°ã—ã„デフォルト㮠Dark ãŠã‚ˆã³ Lightテーマ +- Apple Silicon プロセッサー用㮠[ãƒã‚¤ãƒ†ã‚£ãƒ–コンパイル](Project/compiler.md#コンパイラーメソッド) +- エンティティセレクション型リストボックスã®åˆ—ã§ã€[変数ã®è¨ˆç®—](FormObjects/properties_Object.md#変数ã®è¨ˆç®—) プロパティãŒã‚µãƒãƒ¼ãƒˆã•れるよã†ã«ãªã‚Šã¾ã—ãŸã€‚ +- æ–°ã—ã„包括的㪠[CLI](Admin/cli.md) (コマンドラインインターフェース) ページ + + +## 4D v18 R6 + +- [EntitySelection クラス](API/EntitySelectionClass.md): `.average()`, `.max()` ãŠã‚ˆã³ `.min()` 関数ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒç©ºã®å ´åˆã«ã¯ *undefined* ã‚’è¿”ã™ã‚ˆã†ã«ãªã‚Šã¾ã—ãŸã€‚ +- [IMAP Mail](API/IMAPTransporterClass.md), [POP3 Mail](API/POP3TransporterClass.md) and [SMTP Mail](API/SMTPTransporterClass.md): `authenticationMode` プロパティ㯠OAuth 2.0 を有効化ã—ã¾ã™ã€‚ +- [IMAP Mail](API/IMAPTransporterClass.md): æ–°ã—ã„ `.expunge()` ãŠã‚ˆã³ `.append()` 関数ã®è¿½åŠ ã€‚ +- æ–°ã—ã„ [Web管ç†](Admin/webAdmin.md) Webサーãƒãƒ¼ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ +- æ–°ã—ã„ [データエクスプローラー](Admin/dataExplorer) インターフェース +- æ–°ã—ã„ Web [ユーザーセッション](WebServer/sessions.md) ãŠã‚ˆã³ [ãã® API](API/SessionClass.md) diff --git a/website/translated_docs/ja/ORDA/dsMapping.md b/website/translated_docs/ja/ORDA/dsMapping.md new file mode 100644 index 00000000000000..40761958128225 --- /dev/null +++ b/website/translated_docs/ja/ORDA/dsMapping.md @@ -0,0 +1,257 @@ +--- +id: dsmapping +title: データモデルオブジェクト +--- + +ORDA ã¯ã€ä¸‹åœ°ã§ã‚るデータベースストラクãƒãƒ£ãƒ¼ã¸ã®è‡ªå‹•マッピングã«åŸºã¥ã„ãŸæŠ€è¡“ã§ã™ã€‚ ORDA ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚„エンティティセレクションオブジェクトを介ã—ã¦ãƒ‡ãƒ¼ã‚¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚‚æä¾›ã—ã¾ã™ã€‚ çµæžœçš„ã« ORDA ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚ªãƒ–ジェクト一å¼ã®å½¢ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“を公開ã—ã¾ã™ã€‚ + + +## ストラクãƒãƒ£ãƒ¼ãƒžãƒƒãƒ”ング + +[`ds`](API/DataStoreClass.md#ds) ãŠã‚ˆã³ [`Open datastore`](API/DataStoreClass.md#open-datastore) コマンドを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’呼ã³å‡ºã™ã¨ã€æˆ»ã‚Šå€¤ã® [データストア](#データストア) オブジェクトã«ã¯ã€å¯¾å¿œã™ã‚‹ 4D ストラクãƒãƒ£ãƒ¼ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒ•ィールドã¸ã®å‚ç…§ãŒå±žæ€§ã¨ã—ã¦æ ¼ç´ã•れã¦ã„ã¾ã™: + +* テーブルã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¸ã¨ãƒžãƒƒãƒ—ã•れã¾ã™ã€‚ +* フィールドã¯ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±žæ€§ã¸ã¨ãƒžãƒƒãƒ—ã•れã¾ã™ã€‚ +* リレーションã¯ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã¸ã¨ãƒžãƒƒãƒ—ã•れã¾ã™ã€‚ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼å†…ã§å®šç¾©ã•れãŸãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³åã¯ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§åã¨ã—ã¦ä½¿ç”¨ã•れã¾ã™ã€‚ + +![](assets/en/ORDA/datastoreMapping.png) + + +### 変æ›ã®ãƒ«ãƒ¼ãƒ« + +変æ›ã®éš›ã«ã¯ä»¥ä¸‹ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™: + +* テーブルã€ãƒ•ィールドã€ãã—ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³åã¯ã‚ªãƒ–ジェクトプロパティåã¸ã¨ãƒžãƒƒãƒ—ã•れã¾ã™ã€‚ ãれらã®åå‰ãŒæ¨™æº–ã®ã‚ªãƒ–ジェクト命åè¦å‰‡ã«å‰‡ã£ã¦ã„るよã†ã«ã—ã¦ãã ã•ã„ ([識別å­ã®å‘½åè¦å‰‡](Concepts/identifiers.md) å‚ç…§)。 +* データストアã¯å˜ä¸€ã®ãƒ—ライマリーキーをæŒã¤ãƒ†ãƒ¼ãƒ–ルã®ã¿ã‚’å‚ç…§ã—ã¾ã™ã€‚ 以下ã®ãƒ†ãƒ¼ãƒ–ルã¯å‚ç…§ã•れã¾ã›ã‚“: + * プライマリーキーãŒãªã„テーブル + * 複åˆãƒ—ライマリーキーをæŒã¤ãƒ†ãƒ¼ãƒ–ル +* BLOBフィールドã¯ã€[BLOB オブジェクト](Concepts/dt_blob.md#blob-ã®ç¨®é¡ž) åž‹ã®å±žæ€§ã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +> ORDA ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãƒžãƒƒãƒ”ングã§ã¯ã€æ¬¡ã®ã‚‚ã®ã¯è€ƒæ…®ã•れã¾ã›ã‚“: +> - テーブルã‚ã‚‹ã„ã¯ãƒ•ィールドã®"éžè¡¨ç¤º"オプション
          - `SET TABLE TITLES` ã‚ã‚‹ã„㯠`SET FIELD TITLES` を通ã—ã¦å®šç¾©ã•れãŸãƒãƒ¼ãƒãƒ£ãƒ«ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼
          - リレーションã®"手動"ã‚ã‚‹ã„ã¯"自動"プロパティ + + +### リモートデータストアã®åˆ©ç”¨ + +`Open datastore` コマンドã¾ãŸã¯ [REST リクエスト](REST/gettingStarted.md) ã«ã‚ˆã£ã¦ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹å ´åˆã€**RESTリソースã¨ã—ã¦å…¬é–‹** プロパティãŒè¨­å®šã•れã¦ã„るテーブルã¨ãƒ•ィールドã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +ã“ã®ãƒ—ロパティã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãŠã‚ˆã³å±žæ€§ã¨ã—ã¦å…¬é–‹ã—ãŸã„å„テーブルãŠã‚ˆã³ãƒ•ィールドã«ã¤ã„㦠4D ストラクãƒãƒ£ãƒ¼ã®ãƒ¬ãƒ™ãƒ«ã§è¨­å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +![](assets/en/ORDA/ExposeDataclass.png) + + +### データモデルã®ã‚¢ãƒƒãƒ—デート + +データベースストラクãƒãƒ£ãƒ¼ãƒ¬ãƒ™ãƒ«ã§å¤‰æ›´ãŒãŠã“ãªã‚れるã¨ã€ã‚«ãƒ¬ãƒ³ãƒˆã® ORDA モデルレイヤーã¯ç„¡åŠ¹åŒ–ã•れã¾ã™ã€‚ ã“れらã®å¤‰æ›´ã«ã¯ã€ä»¥ä¸‹ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¾ã™: + +* テーブルã€ãƒ•ィールドã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®è¿½åŠ ã¾ãŸã¯å‰Šé™¤ +* テーブルã€ãƒ•ィールドã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®å称変更 +* ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã®æ ¸ã¨ãªã‚‹ãƒ—ロパティ (åž‹ã€é‡è¤‡ä¸å¯ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã€è‡ªå‹•インクリメントã€null値サãƒãƒ¼ãƒˆãªã©) ã®å¤‰æ›´ + +カレント㮠ORDA モデルレイヤーãŒç„¡åŠ¹åŒ–ã•れるã¨ã€ãã®å¾Œ 4D ã¾ãŸã¯ 4D Server ã®ãƒ­ãƒ¼ã‚«ãƒ«ã® `ds` データストアを呼ã³å‡ºã—ãŸæ™‚ã«ãƒ¢ãƒ‡ãƒ«ãƒ¬ã‚¤ãƒ¤ãƒ¼ãŒè‡ªå‹•çš„ã«å†èª­ã¿è¾¼ã¿ã•ã‚Œã€æ›´æ–°ã•れã¾ã™ã€‚ ãŸã ã—ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚„エンティティセレクションãªã©ã€ORDA オブジェクトã¸ã®æ—¢å­˜ã®å‚ç…§ã¯ã€å†ç”Ÿæˆã•れるã¾ã§ã¯ãれらãŒä½œæˆã•れãŸã¨ãã®ãƒ¢ãƒ‡ãƒ«ã‚’使用ã—ç¶šã‘ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +ã¾ãŸã€ã‚¢ãƒƒãƒ—デートã•れ㟠ORDA モデルレイヤーã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯è‡ªå‹•çš„ã«ã¯åˆ©ç”¨å¯èƒ½ã«ã¯ãªã‚Šã¾ã›ã‚“: + +* 4D Server ã«æŽ¥ç¶šã—ãŸãƒªãƒ¢ãƒ¼ãƒˆã® 4D -- リモートã®ã‚¢ãƒ—リケーションã¯ã‚µãƒ¼ãƒãƒ¼ã«å†æŽ¥ç¶šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ +* `Open datastore` ã¾ãŸã¯ [REST 呼ã³å‡ºã—](REST/gettingStarted.md) を使用ã—ã¦é–‹ã‹ã‚ŒãŸãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ -- æ–°ã—ã„セッションを開ãå¿…è¦ãŒã‚りã¾ã™ + + +## オブジェクトã®å®šç¾© + +### データストア + +データストアã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¸ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースオブジェクトã§ã™ã€‚ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å…¨ä½“ã‚’åæ˜ ã—ãŸã‚‚ã®ã‚’オブジェクトã¨ã—ã¦ãƒ“ルドã—ã¾ã™ã€‚ データストア㯠**モデル** 㨠**データ** ã‹ã‚‰æ§‹æˆã•れã¦ã„ã¾ã™: + +- モデルã«ã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’æ§‹æˆã™ã‚‹ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãŒæ ¼ç´ã•れã€ãã®è©³ç´°ãªæƒ…報もå«ã¾ã‚Œã¾ã™ã€‚ ã“れã¯ãã®ä¸‹åœ°ã«ã‚るデータベース自体ã‹ã‚‰ã¯ç‹¬ç«‹ã—ãŸå­˜åœ¨ã§ã™ã€‚ +- データã¨ã¯ã€ãã®ãƒ¢ãƒ‡ãƒ«å†…ã§ä½¿ç”¨ãƒ»ä¿å­˜ã•れる情報を指ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€å¾“業員ã®åå‰ã€ä½æ‰€ã€ç”Ÿå¹´æœˆæ—¥ãªã©ã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢å†…ã§æ‰±ã†ã“ã¨ãŒã§ãるデータã«å«ã¾ã‚Œã¾ã™ã€‚ + +ã‚³ãƒ¼ãƒ‰å†…ã§æ‰±ã†ã«ã‚ãŸã£ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯ã‚ªãƒ–ジェクトã§ã‚りã€å…¬é–‹ã•れã¦ã„ã‚‹ã™ã¹ã¦ã® [データクラス](#dataclass) をプロパティã¨ã—ã¦æŒã¡ã¾ã™ã€‚ + +4D ã§ã¯æ¬¡ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’扱ã†ã“ã¨ãŒã§ãã¾ã™: + +- カレント 4D データベースã«åŸºã¥ã„ãŸã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã€‚ã“れã¯ã€`ds` コマンドã§è¿”ã•れるメインデータストアã§ã™ã€‚ +- リモートデータベースã«ã‚ˆã£ã¦ REST リソースã¨ã—ã¦å…¬é–‹ã•れãŸã€ä¸€ã¤ä»¥ä¸Šã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã€‚ã“れらã¯ã€`Open datastore` コマンドã§è¿”ã•れã¾ã™ã€‚ + +データストアã¯å˜ä¸€ã®ã€ãƒ­ãƒ¼ã‚«ãƒ«ã‚ã‚‹ã„ã¯ãƒªãƒ¢ãƒ¼ãƒˆã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’å‚ç…§ã—ã¾ã™ã€‚ + +データストアオブジェクト自身ã¯ã€ã‚ªãƒ–ジェクトã¨ã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“: + +```4d +$mydatastore:=OB Copy(ds) // null ã‚’è¿”ã—ã¾ã™ +``` + + +ã—ã‹ã—ãªãŒã‚‰ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãƒ—ロパティã¯å–å¾—å¯èƒ½ã§ã™: + + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds;$prop) + // $prop ã«ã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®åå‰ãŒæ ¼ç´ã•れã¾ã™ +``` + + + +メイン (デフォルト) ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯ `ds` コマンドを通ã—ã¦å¸¸ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚`Open datastore` コマンドを使ãˆã°ã€ã‚らゆるリモートデータストアをå‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### データクラス + +データクラスã¨ã¯ã€ãƒ†ãƒ¼ãƒ–ルã«ç›¸å½“ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ オブジェクトモデルã¨ã—ã¦ä½¿ç”¨ã•れã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«å±žæ€§ (データクラス間ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã«åŸºã¥ã„ã¦ãƒ“ルドã•れãŸå±žæ€§) ã‚’å«ã‚ã¦ã™ã¹ã¦ã®ãƒ•ィールドを属性ã¨ã—ã¦å‚ç…§ã—ã¾ã™ã€‚ リレーショナル属性ã¯ã‚¯ã‚¨ãƒªã«ãŠã„ã¦é€šå¸¸ã®å±žæ€§ã®ã‚ˆã†ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4D プロジェクト内ã®ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¯ã€`ds` データストアã®ãƒ—ロパティã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ `Open datastore` コマンドã¾ãŸã¯ [REST リクエスト](REST/gettingStarted.md) ã«ã‚ˆã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¨ã—ã¦å…¬é–‹ã—ãŸã„å„テーブルã«ã¤ã„㦠4D ストラクãƒãƒ£ãƒ¼ã®ãƒ¬ãƒ™ãƒ«ã§ **RESTリソースã¨ã—ã¦å…¬é–‹** プロパティを設定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€4D ストラクãƒãƒ£ãƒ¼å†…ã®ä»¥ä¸‹ã®ãƒ†ãƒ¼ãƒ–ルã«ã¤ã„ã¦è€ƒãˆã¾ã™ã€‚ + +![](assets/en/ORDA/companyTable.png) + +`Company` テーブル㯠`ds` データストア内ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¨ã—ã¦è‡ªå‹•çš„ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ 以下ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```4d +var $compClass : cs.Company // Company クラスã®ã‚ªãƒ–ジェクト変数ã¨ã—㦠$compClass を宣言ã—ã¾ã™ +$compClass:=ds.Company // Company データクラスã¸ã®å‚ç…§ã‚’ $compClass ã«ä»£å…¥ã—ã¾ã™ +``` + +データクラスオブジェクトã¯ä»¥ä¸‹ã®ã‚‚ã®ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* attributes +* リレーション属性 + +データクラスã¯å®Ÿéš›ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®æ¦‚略をæä¾›ã—ã€æ¦‚念的ãªãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã®ç®¡ç†ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ データクラスã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’クエリã™ã‚‹å”¯ä¸€ã®æ–¹æ³•ã§ã™ã€‚ クエリã¯å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’通ã—ã¦å®Ÿè¡Œã•れã¾ã™ã€‚ クエリã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®å±žæ€§ãŠã‚ˆã³ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§åã«åŸºã¥ã„ã¦ãƒ“ルドã•れã¾ã™ã€‚ リレーション属性ã¯ã€ä¸€ã¤ã®ã‚¯ã‚¨ãƒªå†…ã§è¤‡æ•°ã®ãƒªãƒ³ã‚¯ã•れãŸãƒ†ãƒ¼ãƒ–ルを用ã„る手段ã§ã™ã€‚ + +データクラスオブジェクト自身ã¯ã€ã‚ªãƒ–ジェクトã¨ã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“: + +```4d +$mydataclass:=OB Copy(ds.Employee) // null ã‚’è¿”ã—ã¾ã™ +``` + +ã—ã‹ã—ãªãŒã‚‰ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãƒ—ロパティã¯å–å¾—å¯èƒ½ã§ã™: + +```code4d +ARRAY TEXT($prop;0) +OB GET PROPERTY NAMES(ds.Employee;$prop) +// $prop ã«ã¯ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã®åå‰ãŒæ ¼ç´ã•れã¾ã™ +``` + + +### 属性 + +データクラスプロパティã¯ã€ä¸‹åœ°ã«ã‚るフィールドやリレーションを説明ã™ã‚‹å±žæ€§ã‚ªãƒ–ジェクトã§ã™ã€‚ ãŸã¨ãˆã°: + +```4d + $nameAttribute:=ds.Company.name // クラス属性ã¸ã®å‚ç…§ + $revenuesAttribute:=ds.Company["revenues"] // åˆ¥ã®æ›¸ãæ–¹ +``` + +ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ã€`$nameAttribute` ãŠã‚ˆã³ `$revenuesAttribute` ã«ã€`Company` クラス㮠name ãŠã‚ˆã³ revenues 属性ã®å‚ç…§ã‚’ãれãžã‚Œä»£å…¥ã—ã¾ã™ã€‚ ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯å±žæ€§å†…ã«ä¿ç®¡ã•れã¦ã„る値を返ã™ã®ã§ã¯ã‚りã¾ã›ã‚“。ãã®ä»£ã‚りã«ã€å±žæ€§è‡ªèº«ã¸ã®å‚ç…§ã‚’è¿”ã—ã¾ã™ã€‚ 値を管ç†ã™ã‚‹ãŸã‚ã«ã¯ã€[エンティティ](#エンティティ) を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +テーブル内ã®é©æ ¼ãªãƒ•ィールドã¯ã™ã¹ã¦ã€è¦ª [データクラス](#データクラス) ã®å±žæ€§ã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ `Open datastore` コマンドã¾ãŸã¯ [REST リクエスト](REST/gettingStarted.md) ã«ã‚ˆã£ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®å ´åˆã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®å±žæ€§ã¨ã—ã¦å…¬é–‹ã—ãŸã„å„フィールドã«ã¤ã„㦠4D ストラクãƒãƒ£ãƒ¼ã®ãƒ¬ãƒ™ãƒ«ã§ **RESTリソースã¨ã—ã¦å…¬é–‹** プロパティを設定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +#### ストレージ属性ã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ + +データクラス属性ã«ã¯ã„ãã¤ã‹ã®ç¨®é¡žãŒã‚りã¾ã™ã€‚ストレージã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºã§ã™ã€‚ スカラーã§ã‚る属性 (å˜ä¸€ã®å€¤ã®ã¿ã‚’æä¾›ã™ã‚‹ã‚‚ã®) ã¯æ¨™æº–ã® 4D データ型 (æ•´æ•°ã€ãƒ†ã‚­ã‚¹ãƒˆã€ã‚ªãƒ–ジェクトãªã©) をサãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ + +* **ストレージ属性** ã¯4D データベース内ã®ãƒ•ィールドã«ç›¸å½“ã™ã‚‹ã‚‚ã®ã§ã€ã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã‚’ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ストレージ属性ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸå€¤ã¯ã€ä¿å­˜æ™‚ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ä¸€éƒ¨ã¨ã—ã¦ä¿å­˜ã•れã¾ã™ã€‚ ストレージ属性ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ãã€ãã®å€¤ã¯ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‹ã‚‰ç›´æŽ¥å–り出ã•れã¾ã™ã€‚ ストレージ属性ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ§‹æˆã™ã‚‹ã‚‚ã£ã¨ã‚‚基礎的ãªè¦ç´ ã§ã‚りã€åå‰ã¨ãƒ‡ãƒ¼ã‚¿åž‹ã«ã‚ˆã‚Šå®šç¾©ã•れã¾ã™ã€‚ +* **リレーション属性** ã¯ä»–ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ リレーション属性ã¯å˜ä¸€ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ (ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãªã—) ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (0ã‹ã‚‰Nã¾ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£) ã®ã©ã¡ã‚‰ã‹ã«ãªã‚Šã¾ã™ã€‚ リレーション属性ã¯ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã® "クラシックãª" リレーションã«åŸºã¥ã„ã¦ãŠã‚Šã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ã‚‹ã„ã¯ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ºã¸ã®ç›´æŽ¥çš„ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ リレーション属性ã¯ã€ORDA ã«ãŠã„ã¦ã¯åå‰ã‚’使用ã™ã‚‹ã“ã¨ã§ç›´æŽ¥çš„ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®éƒ¨åˆ†çš„ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã¨ã€ãã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ロパティã«ã¤ã„ã¦è€ƒãˆã¾ã™: + +![](assets/en/ORDA/relationProperties.png) + +ã™ã¹ã¦ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±žæ€§ã¯è‡ªå‹•çš„ã«åˆ©ç”¨å¯èƒ½ã§ã™: + +* Project データクラス内: "ID", "name", ãŠã‚ˆã³ "companyID" +* Company データクラス内: "ID", "name", ãŠã‚ˆã³ "discount" + +ã“れã«åŠ ãˆã¦ã€ä»¥ä¸‹ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚‚ã¾ãŸè‡ªå‹•çš„ã«åˆ©ç”¨å¯èƒ½ã«ãªã‚Šã¾ã™: + +* Project データクラス内: "リレートエンティティ" 型㮠**theClient** å±žæ€§ã€‚å„ Project (クライアント) ã«å¯¾ã—ã¦æœ€å¤§ 1ã¤ã® Company㌠ã‚りã¾ã™ã€‚ +* Company データクラス内: "リレートエンティティズ" åž‹ã®**companyProjects** å±žæ€§ã€‚å„ Company ã«å¯¾ã—ã¦ä¸å®šæ•°ã® Project ãŒã‚りã¾ã™ã€‚ +> ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®æ‰‹å‹•ã‚ã‚‹ã„ã¯è‡ªå‹•プロパティã¯ã€ORDA ã«ãŠã„ã¦ã¯ä½•ã®åŠ¹åŠ›ã‚‚æŒã¡ã¾ã›ã‚“。 + +ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ãƒ—ロパティã¨ã—ã¦å…¬é–‹ã•れã¦ã„ã¾ã™: + +![](assets/en/ORDA/dataclassProperties.png) + +ã“れらã®ã‚ªãƒ–ジェクトã¯å±žæ€§ã‚’表ã—ã¾ã™ãŒã€ãƒ‡ãƒ¼ã‚¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ä¸Žãˆãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 データã®èª­ã¿æ›¸ã㯠[エンティティオブジェクト](entities.md#エンティティ属性ã®ä½¿ç”¨) を通ã—ã¦ãŠã“ãªã‚れã¾ã™ã€‚ + +#### Computed attributes + +[Computed attributes](ordaClasses.md#computed-attributes) are declared using a `get ` function in the [Entity class definition](ordaClasses.md#entity-class). Their value is not stored but evaluated each time they are accessed. They do not belong to the underlying database structure, but are built upon it and can be used as any attribute of the data model. + + +### エンティティ + +エンティティã¨ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ç›¸å½“ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ 実際ã«ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å‚ç…§ã™ã‚‹ã‚ªãƒ–ジェクトã§ã™ã€‚ エンティティã¯ã€[データクラス](#データクラス) ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨ã‚‚解釈å¯èƒ½ãªã‚ªãƒ–ジェクトã§ã™ã€‚ åŒæ™‚ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãŒã‚‚ã¨ã«ã—ã¦ã„るデータベースã«ç›¸é–¢ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚‚æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ + +エンティティã®ç›®çš„ã¯ãƒ‡ãƒ¼ã‚¿ã®ç®¡ç† (作æˆã€æ›´æ–°ã€å‰Šé™¤) ã§ã™ã€‚ エンティティセレクションを用ã„ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚ç…§ã‚’å–å¾—ã—ãŸå ´åˆã€ãã®å‚ç…§ã«ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã®æƒ…å ±ã‚‚ä¿æŒã•れるãŸã‚ã€ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’走査ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +エンティティオブジェクト自身ã¯ã€ã‚ªãƒ–ジェクトã¨ã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“: + +```4d + $myentity:=OB Copy(ds.Employee.get(1)) // null ã‚’è¿”ã—ã¾ã™ +``` + +ã—ã‹ã—ãªãŒã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãƒ—ロパティã¯å–å¾—å¯èƒ½ã§ã™: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.get(1);$prop) + // $prop ã«ã¯ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã®åå‰ãŒæ ¼ç´ã•れã¾ã™ +``` + + +### エンティティセレクション + +エンティティセレクションã¨ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ‰€å±žã™ã‚‹ä¸€ã¤ä»¥ä¸Šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„るオブジェクトã®ã“ã¨ã§ã™ã€‚ 通常ã€ã‚¯ã‚¨ãƒªã®çµæžœã¨ã—ã¦ã€ã‚ã‚‹ã„ã¯ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã®æˆ»ã‚Šå€¤ã¨ã—ã¦ä½œæˆã•れã¾ã™ã€‚ エンティティセレクションã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‹ã‚‰ 0個ã€1個ã€ã‚ã‚‹ã„㯠X個ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (X ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ ¼ç´ã•れã¦ã„るエンティティã®ç·æ•°ã§ã™)。 + +例: + +```4d +var $e : cs.EmployeeSelection // EmployeeSelection クラスã®ã‚ªãƒ–ジェクト変数ã¨ã—㦠$e を宣言ã—ã¾ã™ +$e:=ds.Employee.all() // çµæžœã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®å‚ç…§ã‚’ $e ã«ä»£å…¥ã—ã¾ã™ +``` + +エンティティセレクションã«ã¯æ¬¡ã®ç¨®é¡žãŒå­˜åœ¨ã—ã¾ã™: + +- "共有å¯èƒ½" ã¾ãŸã¯ "共有ä¸å¯" +- "順列ã‚り" ã¾ãŸã¯ "順列ãªã—" + +詳細ã¯å¾Œè¿°ã‚’å‚ç…§ãã ã•ã„。 + +エンティティセレクションオブジェクト自身ã¯ã€ã‚ªãƒ–ジェクトã¨ã—ã¦ã‚³ãƒ”ーã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“: + +```4d + $myentitysel:=OB Copy(ds.Employee.all()) // null ã‚’è¿”ã—ã¾ã™ +``` + +ã—ã‹ã—ãªãŒã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãƒ—ロパティã¯å–å¾—å¯èƒ½ã§ã™: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.all();$prop) + // $prop ã«ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒ—ロパティåãŒæ ¼ç´ã•れã¾ã™ + // ("length", "00", "01"...) +``` + + +#### エンティティセレクションã®é †åˆ—ã‚り/順列ãªã— + +`orderBy( )` メソッドを使用ã—ãŸå ´åˆã€ã‚ã‚‹ã„ã¯ç‰¹å®šã®ã‚ªãƒ—ションを使用ã—ãŸå ´åˆã¯é™¤ãã€4D ORDA ã¯æœ€é©åŒ–ã®è¦³ç‚¹ã‹ã‚‰ãƒ‡ãƒ•ォルトã§é †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’作æˆã—ã¾ã™ã€‚ ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€æŒ‡å®šã•れã¦ã„ã‚‹å ´åˆã‚’除ãã€"エンティティセレクション" 㯠"順列ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³" を指ã™ã“ã¨ã¨ã—ã¾ã™ã€‚ + +順列ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã€å¿…è¦ãªå ´åˆã«ãŠã„ã¦ã€ã‚ã‚‹ã„ã¯ã‚ªãƒ—ションを使用ã—ã¦ç‰¹åˆ¥ã«è¦æ±‚ã—ãŸå ´åˆã«é™ã‚Šä½œæˆã•れã¾ã™ã€‚ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã§ã™: + +* セレクション (タイプをå•ã‚ãš) ã«å¯¾ã—ã¦ã€ã‚ã‚‹ã„ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å¯¾ã—㦠`orderBy( )` を使ã£ãŸå ´åˆã®æˆ»ã‚Šå€¤ +* `newSelection( )` メソッド㫠`dk keep ordered` オプションを渡ã—ãŸå ´åˆã®æˆ»ã‚Šå€¤ + +順列ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå ´åˆã«ä½œæˆã•れã¾ã™: + +* セレクション (タイプをå•ã‚ãš) ã«å¯¾ã—ã¦ã€ã‚ã‚‹ã„ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å¯¾ã—ã¦æ¨™æº–ã® `query( )` を使ã£ãŸå ´åˆã®æˆ»ã‚Šå€¤ +* オプションãªã—ã§ `newSelection( )` メソッドを使用ã—ãŸå ´åˆã®æˆ»ã‚Šå€¤ +* ä»»æ„ã®æ¼”算メソッド (or( ), and( ), minus( ) ) を使ã£ãŸå ´åˆã®æˆ»ã‚Šå€¤ (入力セレクションタイプã¯å•ã„ã¾ã›ã‚“)。 +> 次ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯å¸¸ã« **順列ã‚り** ã¨ãªã‚Šã¾ã™ã€‚ +> +> * 4D Server ã‹ã‚‰ãƒªãƒ¢ãƒ¼ãƒˆã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«è¿”ã•れるエンティティセレクション +> * リモートデータストアã«ãŠã„ã¦ä½œæˆã•れるエンティティセレクション + +順列ã‚りã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒé †åˆ—ãªã—ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãªã£ãŸå ´åˆã€é‡è¤‡ã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚ç…§ã¯ã™ã¹ã¦å‰Šé™¤ã•れã¾ã™ã€‚ diff --git a/website/translated_docs/ja/ORDA/entities.md b/website/translated_docs/ja/ORDA/entities.md new file mode 100644 index 00000000000000..6a48466d360df0 --- /dev/null +++ b/website/translated_docs/ja/ORDA/entities.md @@ -0,0 +1,495 @@ +--- +id: entities +title: データæ“作 +--- + +ORDA ã§ã¯ã€[エンティティ](dsMapping.md#entity) ãŠã‚ˆã³ [エンティティセレクション](dsMapping.md#エンティティセレクション) を介ã—ã¦ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ ã“れらã®ã‚ªãƒ–ジェクトを使ã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ãƒ‡ãƒ¼ã‚¿ã‚’作æˆãƒ»æ›´æ–°ãƒ»ã‚¯ã‚¨ãƒªãƒ»ã‚½ãƒ¼ãƒˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +## エンティティã®ä½œæˆ + +ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã«æ–°ã—ã„エンティティを作æˆã™ã‚‹æ–¹æ³•ã¯äºŒã¤ã‚りã¾ã™: + +* エンティティã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¬ã‚³ãƒ¼ãƒ‰ã¸ã®å‚ç…§ã§ã‚ã‚‹ãŸã‚ã€"クラシックãª" 4Dランゲージを使用ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’作æˆã—ã€ãれを`entity.next( )` ã‚„ `entitySelection.first( )` ã¨ã„ã£ãŸ ORDAメソッドã§å‚ç…§ã™ã‚‹ã“ã¨ã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã§ãã¾ã™ã€‚ +* ã¾ãŸã€`dataClass.new( )` メソッドを使用ã™ã‚‹ã“ã¨ã§ã‚‚エンティティも作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +エンティティã¯ãƒ¡ãƒ¢ãƒªå†…ã«ã—ã‹ä½œæˆã•れãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 データストアã«è¿½åŠ ã—ãŸã„å ´åˆã€`entity.save( )` メソッドを呼ã¶å¿…è¦ãŒã‚りã¾ã™ã€‚ + +エンティティ属性ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ªãƒ–ジェクトã®ãƒ—ロパティã¨ã—ã¦ç›´æŽ¥åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[エンティティ属性ã®ä½¿ç”¨](#エンティティ属性ã®ä½¿ç”¨) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ãŸã¨ãˆã°ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢å†…ã® "Employee" ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ–°ã—ã„エンティティを作æˆã—ã€firstname 㨠name 属性㫠"John" 㨠"Dupont" を割り当ã¦ãŸã„å ´åˆã‚’考ãˆã¾ã™: + +```4d +var $myEntity : cs.EmployeeEntity +$myEntity:=ds.Employee.new() // ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ã®æ–°è¦ã‚ªãƒ–ジェクトを作æˆã—ã¾ã™ +$myEntity.name:="Dupont" // 'Dupont' ã‚’ 'name' 属性ã«ä»£å…¥ã—ã¾ã™ +$myEntity.firstname:="John" // 'John' ã‚’ 'firstname' 属性ã«ä»£å…¥ã—ã¾ã™ +$myEntity.save() // エンティティをä¿å­˜ã—ã¾ã™ +``` +> エンティティã¯ã€ãれãŒä½œæˆã•れãŸãƒ—ロセス内ã§ã®ã¿å®šç¾©ã•れã¾ã™ã€‚ ãã®ãŸã‚ã€ãŸã¨ãˆã°ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数内ã«ä¿å­˜ã—ã¦ä»–ã®ãƒ—ロセスã§ä½¿ç”¨ã™ã‚‹ã€ã¨ã„ã£ãŸã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +## エンティティã¨å‚ç…§ + +エンティティã«ã¯ã€4Dレコードã¸ã®å‚ç…§ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ ç•°ãªã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒåŒã˜ 4Dレコードをå‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã‚り得ã¾ã™ã€‚ ã¾ãŸã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ 4Dオブジェクト変数ã«ä¿å­˜å¯èƒ½ã§ã‚ã‚‹ã“ã¨ã‹ã‚‰ã€ç•°ãªã‚‹å¤‰æ•°ãŒåŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ã“ã¨ã‚‚ã‚り得ã¾ã™ã€‚ + +以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ãŸå ´åˆ: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) // ID 1ã‚’ã‚‚ã¤ç¤¾å“¡ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ + $e2:=$e1 + $e1.name:="Hammer" + //$e1 ã‚‚ $e2 ã‚‚ã€ã©ã¡ã‚‰ã‚‚åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚照を共有ã—ã¾ã™ + //$e2.name ã®ä¸­èº«ã‚‚ "Hammer" ã§ã™ +``` + +ã“れã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å›³è§£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/ORDA/entityRef1.png) + +次ã«ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ãŸå ´åˆ: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) + $e2:=ds.Employee.get(1) + $e1.name:="Hammer" + //変数 $e1 ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ + //変数 $e2 ã¯åˆ¥ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„ã¾ã™ + //$e2.name ã®ä¸­èº«ã¯ "smith" ã§ã™ +``` + +ã“れã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å›³è§£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/ORDA/entityRef2.png) + +ã—ã‹ã—ã€ä¸¡æ–¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒåŒã˜ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å‚ç…§ã—ã¦ã„ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ã©ã¡ã‚‰ã®å ´åˆã§ã‚‚ã€`entity.save( )` メソッドを呼ã³å‡ºã—ãŸå ´åˆã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯æ›´æ–°ã•れã¾ã™ (è¡çªãŒç™ºç”Ÿã—ãŸå ´åˆã‚’除ãã¾ã™ã€‚[エンティティロッキング](#エンティティロッキング) å‚ç…§)。 + +実際ã«ã¯ã€`$e1` ã‚‚ `$e2` もエンティティãã®ã‚‚ã®ã§ã¯ãªãã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã§ã™ã€‚ ã“れã¯ã¤ã¾ã‚Šã€ã©ã®ã‚ˆã†ãªé–¢æ•°ã‚„メソッドã«ã‚‚直接å—ã‘æ¸¡ã™ã“ã¨ãŒã§ãã€ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã®ã‚ˆã†ã«æŒ¯ã‚‹èˆžã†ã¨ã„ã†ã“ã¨ã§ã™ã€‚ãã—ã¦ã“れ㯠4Dãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚ˆã‚Šã‚‚ãšã£ã¨é«˜é€Ÿã§ã™ã€‚ ãŸã¨ãˆã°: + +```4d + For each($entity;$selection) + do_Capitalize($entity) + End for each +``` + +ãã—㦠do_Capitalize メソッドãŒä»¥ä¸‹ã®ã‚ˆã†ãªå½¢ã§ã‚ã£ãŸå ´åˆ: + +```4d + $entity:=$1 + $name:=$entity.lastname + If(Not($name=Null)) + $name:=Uppercase(Substring($name;1;1))+Lowercase(Substring($name;2)) + End if + $entity.lastname:=$name +``` + +ä»–ã® 4D ã®ã‚ªãƒ–ジェクトã¨åŒæ§˜ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’扱ã†ã“ã¨ãŒã§ãã€[引数](Concepts/parameters.md) ã¨ã—ã¦ãã®å‚照を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +> エンティティã§ã¯ã€ã‚¯ãƒ©ã‚·ãƒƒã‚¯ãª 4D言語ã®ã‚ˆã†ãª "カレントレコード" ã¨ã„ã†æ¦‚念ã¯ã‚りã¾ã›ã‚“。 エンティティã¯ã€ã„ãã¤ã§ã‚‚å¿…è¦ãªæ•°ã‚’åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã¯è‡ªå‹•ãƒ­ãƒƒã‚¯ã®æ©Ÿæ§‹ãŒå‚™ã‚ã£ã¦ã„ã¾ã™ ([エンティティロッキング](#エンティティロッキング) å‚ç…§)。 エンティティã®èª­ã¿è¾¼ã¿ã«ã¯ã€[レイジーローディング](glossary.md#レイジーローディング) 機構ãŒä½¿ç”¨ã•れã¾ã™ã€‚ã“れã¯ã¤ã¾ã‚Šå¿…è¦ãªåˆ†ã®æƒ…å ±ã ã‘ãŒèª­ã¿è¾¼ã¾ã‚Œã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã„ãšã‚Œã«ã›ã‚ˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã§ã¯å¿…è¦ã§ã‚れã°ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’直接自動的ã«èª­ã¿è¾¼ã‚€ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + + +## エンティティ属性ã®ä½¿ç”¨ + +エンティティ属性ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã—ã€å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ãƒ•ィールドをマップã—ã¾ã™ã€‚ ストレージ型ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ªãƒ–ジェクトã®å˜ç´”ãªãƒ—ロパティã¨ã—ã¦è¨­å®šã‚„å–å¾—ãŒã§ãã¾ã™ãŒã€**リレートエンティティ (relatedEntity)** 型㨠**リレートエンティティズ (relatedEntities)** åž‹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ +> 属性ã®åž‹ã«ã¤ã„ã¦ã®è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[ストレージ属性ã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§](dsMapping.md#ストレージ属性ã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§) ã®æ®µè½ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ãŸã¨ãˆã°ã€ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±žæ€§ã‚’設定ã™ã‚‹ãŸã‚ã«ã¯: + +```4d + $entity:=ds.Employee.get(1) //get employee attribute with ID 1 + $name:=$entity.lastname //get the employee name, e.g. "Smith" + $entity.lastname:="Jones" //set the employee name + $entity.save() //save the modifications +``` + +> Database Blob fields ([scalar blobs](Concepts/blob.md) are automatically converted to and from blob object attributes ([`4D.Blob`](Concepts/blob.md)) when handled through ORDA. When saving a blob object attribute, keep in mind that, unlike blob object size which is only limited by the available memory, Blob field size is limited to 2GB. + +リレート属性ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã‚‹ã‹ã©ã†ã‹ã¯ã€å±žæ€§ã®åž‹ã«ã‚ˆã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãŒã‚ã‚‹ã¨ã: + +![](assets/en/ORDA/entityAttributes.png) + +リレートã•れãŸã‚ªãƒ–ジェクトを通ã—ã¦ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```4d + $entity:=ds.Project.all().first().theClient // 先頭プロジェクトã«é–¢é€£ã™ã‚‹ Company エンティティをå–å¾—ã—ã¾ã™ + $EntitySel:=ds.Company.all().first().companyProjects // 先頭ã®ä¼šç¤¾ã«é–¢é€£ã™ã‚‹ Project エンティティセレクションをå–å¾—ã—ã¾ã™ +``` + +上記ã®ä¾‹ã«ãŠã„ã¦ã€*theClient* 㨠*companyProjects* ã¯ã©ã¡ã‚‰ã‚‚プライマリーリレーション属性ã§ã‚りã€äºŒã¤ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹é–“ã®ç›´æŽ¥çš„ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表ã™ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ã—ã‹ã—ãªãŒã‚‰ã€è¤‡æ•°ã®ãƒ¬ãƒ™ãƒ«ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’通ã—ãŸãƒ‘スã«åŸºã¥ã„ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’ビルドã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™(循環å‚ç…§å«ã‚€)。 ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã®å ´åˆã‚’考ãˆã¾ã™: + +![](assets/en/ORDA/entityAttributes2.png) + +社員ã¯ãれãžã‚Œãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã«ã‚‚ãªã‚Šãˆã¾ã™ã—ã€ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’æŒã¤ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã‚る社員ã®ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã®ãƒžãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’å–å¾—ã—ãŸã„å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```4d + $myEmp:=ds.Employee.get(50) + $manLev2:=$myEmp.manager.manager.lastname +``` + +## リレーション属性ã¸ã®å€¤ã®ä»£å…¥ + +ORDAアーキテクãƒãƒ£ãƒ¼ã§ã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ãƒªãƒ¬ãƒ¼ãƒˆã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’直接格ç´ã—ã¾ã™: + +* N対1型リレーション属性 (**リレートエンティティ (relatedEntity)** åž‹) ã¯ä¸€ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ ¼ç´ã—ã¾ã™ã€‚ +* 1対N型リレーション属性 (**リレートエンティティズ (relatedEntities)** åž‹) ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +以下㮠(å˜ç´”化ã•れãŸ) ストラクãƒãƒ£ãƒ¼ã‚’見ã¦ã¿ã¾ã—ょã†: + +![](assets/en/ORDA/entityAttributes3.png) + +ã“ã®ä¾‹ã§ã¯ã€"Employee" データクラスã«å±žã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã® "employer" 属性ã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£åž‹ã®ã‚ªãƒ–ジェクト (ã‚ã‚‹ã„㯠null値) ãŒæ ¼ç´ã•れã¾ã™ã€‚ "Company" データクラスã«å±žã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã® "staff" 属性ã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ã‚ªãƒ–ジェクト (ã‚ã‚‹ã„㯠null値) ãŒæ ¼ç´ã•れã¾ã™ã€‚ +> ORDAã§ã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã®è‡ªå‹•ã‚ã‚‹ã„ã¯æ‰‹å‹•プロパティã¯ä½•ã®åŠ¹åŠ›ã‚‚æŒã¡ã¾ã›ã‚“。 + +"employer" 属性ã«ç›´æŽ¥å€¤ã‚’代入ã—ãŸã„å ´åˆã«ã¯ã€"Company" ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’渡ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + $emp:=ds.Employee.new() // æ–°è¦ã®ç¤¾å“¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã—ã¾ã™ + $emp.lastname:="Smith" // 属性ã«å€¤ã‚’代入ã—ã¾ã™ + $emp.employer:=ds.Company.query("name =:1";"4D")[0] // リレーション属性ã«ä¼šç¤¾ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’代入ã—ã¾ã™ + $emp.save() +``` + +4D ã§ã¯ã€"1" エンティティã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã‚‹ N エンティティå´ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã¸ã®å…¥åŠ›ã‚’å®¹æ˜“ã«ã™ã‚‹ãŸã‚ã®è¿½åŠ ã®æ‰‹æ®µãŒæä¾›ã•れã¦ã„ã¾ã™: リレーション属性ã«ä»£å…¥ã™ã‚‹éš›ã«ã€"1" エンティティã®ãƒ—ãƒ©ã‚¤ãƒžãƒªãƒ¼ã‚­ãƒ¼ã‚’ç›´æŽ¥æ¸¡ã™æ–¹æ³•ã§ã™ã€‚ ã“れãŒå‹•作ã™ã‚‹ãŸã‚ã«ã¯ã€æ•°å€¤ã‚ã‚‹ã„ã¯ãƒ†ã‚­ã‚¹ãƒˆåž‹ã®ãƒ‡ãƒ¼ã‚¿ (プライマリーキー値) ã‚’ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã«æ¸¡ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ 4D ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã®è©²å½“ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’è‡ªå‹•çš„ã«æ¤œç´¢ã—ã¦ãれã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + $emp:=ds.Employee.new() + $emp.lastname:="Wesson" + $emp.employer:=2 // リレーション属性ã«ãƒ—ライマリーキーを代入ã—ã¾ã™ + // 4D ã¯ãƒ—ライマリーキー (ã“ã®å ´åˆã€ID) ã®å€¤ãŒ 2 ã§ã‚る会社を検索ã—〠+ // ãれを社員ã«ä»£å…¥ã—ã¾ã™ + $emp.save() +``` + +ã“れã¯ã¨ãã«ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å¤§é‡ã®ãƒ‡ãƒ¼ã‚¿ã‚’読ã¿è¾¼ã‚€ã¨ãã«æœ‰ç”¨ã§ã™ã€‚ ã“ã®ã‚ˆã†ãªèª­ã¿è¾¼ã¿ã§ã¯é€šå¸¸ "ID" カラムãŒå«ã¾ã‚Œã¦ãŠã‚Šã€ã“れã¯ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã«ç›´æŽ¥å‰²ã‚Šå½“ã¦å¯èƒ½ãªãƒ—ライマリーキーをå‚ç…§ã—ã¦ã„ã¾ã™ã€‚ + +ã“れã¯ã¾ãŸã€1 データクラスå´ã§å¯¾å¿œã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’事å‰ã«ä½œæˆã™ã‚‹ã“ã¨ãªã N エンティティå´ã®ãƒ—ライマリーキーを割り当ã¦ã‚‹ã“ã¨ãŒã§ãã‚‹ã¨ã„ã†ã“ã¨ã§ã™ã€‚ リレートã•れã¦ã„るデータクラスã«å­˜åœ¨ã—ãªã„プライマリーキーを割り当ã¦ãŸå ´åˆã€ãれã¯ä¿ç®¡ã•れã€"1" データクラスå´ã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä½œæˆã•れãŸã¨ãã« 4D ã«ã‚ˆã£ã¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™ã€‚ + +"N" データクラスå´ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’通ã—ã¦ã€"1" リレートエンティティã®å±žæ€§å€¤ã‚’ã€ç›´æŽ¥ä»£å…¥ãƒ»å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€Employee エンティティã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã‚‹ Company エンティティ㮠name 属性を変更ã—ãŸã„å ´åˆã€ä»¥ä¸‹ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```code4d + $emp:=ds.Employee.get(2) // プライマリーキー㌠2 ã® Employee エンティティを読ã¿è¾¼ã¿ã¾ã™ + $emp.employer.name:="4D, Inc." // リレートã•れã¦ã„ã‚‹ Company ã® name 属性を変更ã—ã¾ã™ + $emp.employer.save() // リレーション属性ã®å¤‰æ›´ã‚’ä¿å­˜ã—ã¾ã™ + // リレートã•れã¦ã„るエンティティも更新ã•れã¾ã™ +``` + +## エンティティセレクションã®ä½œæˆ + +ä»¥ä¸‹ã®æ–¹æ³•ã§ã€[エンティティセレクション](dsMapping.md#エンティティセレクション) åž‹ã®ã‚ªãƒ–ジェクトを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* [データクラス](API/DataClassClass.md#query) ã¾ãŸã¯ [既存ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³](API/EntitySelectionClass.md#query) ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã—ã¦ã‚¯ã‚¨ãƒªã‚’実行ã™ã‚‹; +* [`.all( )`](API/DataClassClass.md#all) DataClassクラス関数を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’é¸æŠžã™ã‚‹; +* `Create entity selection` コマンドã‚ã‚‹ã„㯠[`.newSelection( )`](API/DataClassClass.md#newselection) DataClassクラス関数を使用ã—ã¦ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ–ジェクトを作æˆã™ã‚‹; +* [`.copy( )`](API/EntitySelectionClass.md#copy) EntitySelectionクラス関数を使用ã—ã¦ã€æ—¢å­˜ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’複製ã™ã‚‹; +* [EntitySelectionクラス](API/EntitySelectionClass.md) ã®æ§˜ã€…ãªé–¢æ•°ã®ä¸­ã‹ã‚‰ã€[`.or( )`](API/EntitySelectionClass.md#or) ã®ã‚ˆã†ã«æ–°ã—ã„エンティティセレクションを返ã™ã‚‚ã®ã‚’使用ã™ã‚‹; +* "リレートエンティティズ" åž‹ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’使用ã™ã‚‹ (以下å‚ç…§) + +データクラスã«å¯¾ã—ã¦ã€ç•°ãªã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’好ããªã ã‘åŒæ™‚ã«ä½œæˆã—ã€ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ エンティティセレクションã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã—ã¦ã„ã‚‹ã«éŽãŽãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ç•°ãªã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒåŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã‚’æ ¼ç´ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +### 共有å¯èƒ½/追加å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + +エンティティセレクションã«ã¯ 2種類ã‚りã¾ã™: **共有å¯èƒ½ (shareable)** (複数ã®ãƒ—ロセスã§èª­ã¿è¾¼ã¿å¯èƒ½ã€ãŸã ã—追加ä¸å¯) ã®ã‚‚ã®ã¨ã€**追加å¯èƒ½ (alterable)** ([`add()`](API/EntitySelectionClass.md#add) 関数ãŒä½¿ç”¨å¯èƒ½ã€ãŸã ã—カレントプロセスã§ã®ã¿åˆ©ç”¨å¯) ã®ã‚‚ã®ã§ã™: + +#### プロパティ + +**共有å¯èƒ½** ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªç‰¹å¾´ã‚’æŒã¡ã¾ã™: + +- 共有オブジェクトã¾ãŸã¯å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã€è¤‡æ•°ã®ãƒ—ロセス間ã‚ã‚‹ã„ã¯ãƒ¯ãƒ¼ã‚«ãƒ¼é–“ã§å¼•æ•°ã¨ã—ã¦å—ã‘æ¸¡ã—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- 複数ã®å…±æœ‰ã‚ªãƒ–ジェクトã¾ãŸã¯å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ã¾ãŸã€ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã—ã¦ã„る共有オブジェクトã¾ãŸã¯å…±æœ‰ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä¿å­˜ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ (ã¤ã¾ã‚Šã€*ロック識別å­* ã‚’æŒã£ã¦ã„ãªã„ã¨ã„ã†ã“ã¨ã§ã™)。 +- æ–°ãŸã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’追加ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’追加ã—よã†ã¨ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ (エラー1637 - ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ç·¨é›†ä¸å¯ã§ã™)。 共有å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’追加ã—ãŸã„å ´åˆã€[`.add( )`](API/EntitySelectionClass.md#add) 関数を呼ã³å‡ºã™å‰ã«ã€[`.copy( )`](API/EntitySelectionClass.md#copy) 関数を使用ã—ã¦å…±æœ‰ä¸å¯ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã¨å¤‰æ›ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> 大多数ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³é–¢æ•° ([`.slice()`](API/EntitySelectionClass.md#slice), [`.and()`](API/EntitySelectionClass.md#and) ç­‰) ã¯ã€å‘¼ã³å‡ºã—対象ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’変更ã›ãšã«æ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã™ãŸã‚ã€å…±æœ‰å¯èƒ½ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +**追加å¯èƒ½** ãªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªç‰¹å¾´ã‚’æŒã¡ã¾ã™: + +- プロセス間ã§ã®å…±æœ‰ã¯ã§ãã¾ã›ã‚“。ã¾ãŸå…±æœ‰ã‚ªãƒ–ジェクト/コレクションã¸ã®ä¿å­˜ã‚‚ã§ãã¾ã›ã‚“。 共有ä¸å¯ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’共有オブジェクト/コレクションã«ä¿å­˜ã—よã†ã¨ã—ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒãƒˆãƒªã‚¬ãƒ¼ã•れã¾ã™ (エラー -10721 - 共有オブジェクトã¾ãŸã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ãŠã„ã¦ã‚µãƒãƒ¼ãƒˆã•れる値ã®åž‹ã§ã¯ã‚りã¾ã›ã‚“)。 +- æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ (ã¤ã¾ã‚Šã€[`.add()`](API/EntitySelectionClass.md#add) 関数を使用ã§ãã¾ã™)。 + + +#### 共有å¯èƒ½/追加å¯èƒ½ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å®šç¾© + +エンティティセレクション㌠**共有å¯èƒ½** ã¾ãŸã¯ **追加å¯èƒ½** ã®ã„ãšã‚Œã®ç‰¹æ€§ã‚’æŒã¤ã‹ã¯ã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ä½œæˆæ™‚ã«å®šç¾©ã•れã€ã‚ã¨ã‹ã‚‰å¤‰æ›´ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 エンティティセレクションã®ç‰¹æ€§ã¯ã€[.isAlterable()](API/EntitySelectionClass.md#isalterable) 関数ã¾ãŸã¯ `OB Is shared` コマンドを使ã£ã¦ç¢ºèªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +æ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®å ´åˆã« **共有å¯èƒ½** ã§ã™: + +- データクラスã«å¯¾ã—ã¦å‘¼ã³å‡ºã•れ㟠ORDAクラス関数ã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸå ´åˆ: [dataClass.all()](API/DataClassClass.md#all), [dataClass.fromCollection()](API/DataClassClass.md#fromcollection), [dataClass.query()](API/DataClassClass.md#query) 等。 +- リレーション属性をもã¨ã«ç”Ÿæˆã•れã€[entity.*attributeName*](API/EntityClass.md#attributename) (例: "company.employees") ã® *attributeName* ㌠1対Nリレーション属性ã§ã€ã‹ã¤ entity 自身ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å±žã—ã¦ã„ãªã„å ´åˆã€‚ +- `ck shared` オプションを指定ã—ãŸã†ãˆã§ã€[`entitySelection.copy()`](API/EntitySelectionClass.md#copy) ã¾ãŸã¯ `OB Copy` を使用ã—ã€æ˜Žç¤ºçš„ã«å…±æœ‰å¯èƒ½ã¨ã—ã¦ã‚³ãƒ”ーã•れãŸå ´åˆã€‚ + +例: +```4d +$myComp:=ds.Company.get(2) // $myComp ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å±žã—ã¦ã„ã¾ã›ã‚“ +$employees:=$myComp.employees // $employees ã¯å…±æœ‰å¯èƒ½ã§ã™ +``` + +æ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®å ´åˆã« **追加å¯èƒ½** ã§ã™: + +- [`dataClass.newSelection()`](API/DataClassClass.md#newselection) 関数ã¾ãŸã¯ `Create entity selection` コマンドを使用ã—ã¦æ–°è¦ä½œæˆã•れãŸç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å ´åˆã€‚ +- `ck shared` オプションを指定ã›ãšã«ã€[`entitySelection.copy()`](API/EntitySelectionClass.md#copy) ã¾ãŸã¯ `OB Copy` を使用ã—ã€æ˜Žç¤ºçš„ã«è¿½åŠ å¯èƒ½ã¨ã—ã¦ã‚³ãƒ”ーã•れãŸå ´åˆã€‚ + +例: +```4d +$toModify:=ds.Company.all().copy() // $toModify ã¯è¿½åŠ å¯èƒ½ã§ã™ +``` + + +æ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯æ¬¡ã®å ´åˆã«ã€å…ƒã¨ãªã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ç‰¹æ€§ã‚’ **継承** ã—ã¾ã™: + +- 既存ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦å‘¼ã³å‡ºã•れ㟠ORDAクラス関数 ([.query()](API/EntitySelectionClass.md#query), [.slice()](API/EntitySelectionClass.md#slice), ç­‰) ã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸå ´åˆ . +- リレーションã«åŸºã¥ã„ã¦ç”Ÿæˆã•れãŸå ´åˆ: + - [entity.*attributeName*](API/EntityClass.md#attributename) (例: "company.employees") ã® *attributeName* ㌠1対Nリレーション属性ã§ã€ã‹ã¤ entity 自身ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å±žã—ã¦ã„ã‚‹å ´åˆ ([entity.getSelection()](API/EntityClass.md#getselection) エンティティセレクションã¨åŒã˜ç‰¹æ€§ã«ãªã‚Šã¾ã™)。 + - [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (例: "employees.employer") ã® *attributeName* ãŒãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã®å ´åˆ (エンティティセレクションã¨åŒã˜ç‰¹æ€§ã«ãªã‚Šã¾ã™)。 + - [entitySelection.extract()](API/EntitySelectionClass.md#extract) ã‹ã‚‰è¿”ã•れるコレクションãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’å«ã‚€å ´åˆ (エンティティセレクションã¨åŒã˜ç‰¹æ€§ã«ãªã‚Šã¾ã™)。 + +例: + +```4d +$highSal:=ds.Employee.query("salary >= :1"; 1000000) + // データクラスã«å¯¾ã™ã‚‹ã‚¯ã‚¨ãƒªã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸãŸã‚ $highSal ã¯å…±æœ‰å¯èƒ½ã§ã™ +$comp:=$highSal.employer // $highSal ãŒå…±æœ‰å¯èƒ½ãªãŸã‚ $comp も共有å¯èƒ½ã§ã™ + +$lowSal:=ds.Employee.query("salary <= :1"; 10000).copy() + // オプション無ã—ã® copy( ) ã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸãŸã‚ $lowSal ã¯è¿½åŠ å¯èƒ½ã§ã™ +$comp2:=$lowSal.employer // $lowSal ãŒè¿½åŠ å¯èƒ½ãªãŸã‚ $comp2 も追加å¯èƒ½ã§ã™ +``` + + +#### プロセス間ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…±æœ‰ (例題) + +二ã¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã—ã€ãã‚Œã‚‰ã‚’ãƒ¯ãƒ¼ã‚«ãƒ¼ãƒ—ãƒ­ã‚»ã‚¹ã«æ¸¡ã—ã¦é©åˆ‡ãªç›¸æ‰‹ã«ãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ãŸã„å ´åˆã‚’考ãˆã¾ã™: + +```4d + +var $paid; $unpaid : cs.InvoicesSelection +// 支払済ãŠã‚ˆã³æœªæ‰•ã„ã®è«‹æ±‚書ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ãれãžã‚Œå–å¾—ã—ã¾ã™ +$paid:=ds.Invoices.query("status=:1"; "支払済") +$unpaid:=ds.Invoices.query("status=:1"; "未払ã„") + +// ã“れらã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å‚照をワーカーã«å¼•æ•°ã¨ã—ã¦æ¸¡ã—ã¾ã™ +CALL WORKER("mailing"; "sendMails"; $paid; $unpaid) + +``` + +`sendMails` メソッドã®ã‚³ãƒ¼ãƒ‰ã§ã™: + +```4d + + #DECLARE ($paid : cs.InvoicesSelection; $unpaid : cs.InvoicesSelection) + var $invoice : cs.InvoicesEntity + + var $server; $transporter; $email; $status : Object + + // ãƒ¡ãƒ¼ãƒ«ã®æº–å‚™ + $server:=New object() + $server.host:="exchange.company.com" + $server.user:="myName@company.com" + $server.password:="my!!password" + $transporter:=SMTP New transporter($server) + $email:=New object() + $email.from:="myName@company.com" + + // エンティティセレクションをループã—ã¾ã™ + For each($invoice;$paid) + $email.to:=$invoice.customer.address // 顧客ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ + $email.subject:="請求書 # "+String($invoice.number) + "ã®ãŠæ”¯æ‰•ã„を確èªã„ãŸã—ã¾ã—ãŸã€‚" + $status:=$transporter.send($email) + End for each + + For each($invoice;$unpaid) + $email.to:=$invoice.customer.address // 顧客ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ + $email.subject:="請求書 # "+String($invoice.number) + "ã®ãŠæ”¯æ‰•ã„ãŒç¢ºèªã§ãã¦ã„ã¾ã›ã‚“。" + $status:=$transporter.send($email) + End for each +``` + + +### エンティティセレクションã¨ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±žæ€§ + +ã™ã¹ã¦ã®ã‚¹ãƒˆãƒ¬ãƒ¼ã‚¸å±žæ€§ (ãƒ†ã‚­ã‚¹ãƒˆã€æ•°å€¤ã€ãƒ–ãƒ¼ãƒ«ã€æ—¥ä»˜) ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ロパティã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ エンティティセレクションã¨çµ„ã¿åˆã‚ã›ã¦ä½¿ç”¨ã—ãŸå ´åˆã€ã‚¹ã‚«ãƒ©ãƒ¼å±žæ€§ã¯ã‚¹ã‚«ãƒ©ãƒ¼å€¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ ãŸã¨ãˆã°: + +```4d + $locals:=ds.Person.query("city = :1";"San Jose") // 個人ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + $localEmails:=$locals.emailAddress // メールアドレス (文字列) ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ +``` + +ã“ã®ã‚³ãƒ¼ãƒ‰ã¯ *$localEmails* å†…ã«æ–‡å­—列ã¨ã—ã¦ã®ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã—ã¾ã™ã€‚ + +### エンティティセレクションã¨ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ + +様々ãªã‚¯ã‚¨ãƒªã®æ–¹æ³•ã«åŠ ãˆã¦ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’エンティティセレクションã®ãƒ—ロパティã¨ã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ã§æ–°ã—ã„エンティティセレクションを得るã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã®å ´åˆã‚’考ãˆã¾ã™: + +![](assets/en/ORDA/entitySelectionRelationAttributes.png) + +```4d + $myParts:=ds.Part.query("ID < 100") // ID ㌠100未満ã®ãƒ‘ーツを返ã—ã¾ã™ + $myInvoices:=$myParts.invoiceItems.invoice + // $myParts 内ã®ãƒ‘ーツã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„る請求項目を1行以上å«ã‚“ã§ã„ã‚‹ã™ã¹ã¦ã®è«‹æ±‚書 +``` + +最後ã®è¡Œã¯ã€$myParts エンティティセレクション内ã®ãƒ‘ーツã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„る請求項目ãŒå°‘ãªãã¨ã‚‚1行å«ã¾ã‚Œã¦ã„ã‚‹ã™ã¹ã¦ã®è«‹æ±‚書ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’ã€$myInvoices 内ã«è¿”ã—ã¾ã™ã€‚ エンティティセレクションã®ãƒ—ロパティã¨ã—ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ãŒä½¿ç”¨ã•れるã¨ã€è¿”ã•ã‚Œã‚‹çµæžœã¯ã€ãŸã¨ãˆè¿”ã•れるエンティティãŒä¸€ã¤ã ã‘ã ã¨ã—ã¦ã‚‚ã€å¸¸ã«æ–°ã—ã„エンティティセレクションã¨ãªã‚Šã¾ã™ã€‚ エンティティセレクションã®ãƒ—ロパティã¨ã—ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ãŒä½¿ç”¨ã•れãŸçµæžœã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä½•ã‚‚è¿”ã£ã¦ã“ãªã„å ´åˆã«ã¯ã€è¿”ã•れるã®ã¯ç©ºã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚りã€null ã§ã¯ã‚りã¾ã›ã‚“。 + + +## エンティティロッキング + +一般的ã«ã€è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚ã‚‹ã„ã¯ãƒ—ロセスãŒåŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’åŒæ™‚ã«èª­ã¿è¾¼ã‚“ã§å¤‰æ›´ã—よã†ã¨ã—ãŸéš›ã«ã‚³ãƒ³ãƒ•リクトãŒç™ºç”Ÿã™ã‚‹å¯èƒ½æ€§ã‚’管ç†ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ レコードロックã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦ãƒ‡ãƒ¼ã‚¿ã«çŸ›ç›¾ã—ãŸæ›´æ–°ãŒãªã•れãªã„よã†ã«ã™ã‚‹ãŸã‚ã®æ‰‹æ®µã§ã™ã€‚ 読ã¿è¾¼ã¿æ™‚ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロックã—ã¦ä»–ã®ãƒ—ãƒ­ã‚»ã‚¹ãŒæ›´æ–°ã§ããªã„よã†ã«ã™ã‚‹ã€ã‚ã‚‹ã„ã¯é€†ã«ä¿å­˜æ™‚ã«èª­ã¿è¾¼ã‚“ã§ã‹ã‚‰ã®é–“ã«ä»–ã®ãƒ—ロセスãŒãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’変更ã—ã¦ã„ãªã„ã‹ã©ã†ã‹ã‚’検証ã™ã‚‹ã€ã¨ã„ã†ã®ãŒåŸºæœ¬çš„ãªæ¦‚念ã§ã™ã€‚ å‰è€…㯠**ペシミスティック・レコードロック** ã¨å‘¼ã°ã‚Œã€ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロックã™ã‚‹ã“ã¨ã§ã€å¤‰æ›´ã—ãŸã„レコードを書ã込むã“ã¨ãŒã§ãるよã†ã«ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ 後者㯠**オプティミスティック・レコードロック** ã¨å‘¼ã°ã‚Œã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒæ›´æ–°ã•れる必è¦ãŒã‚ã‚‹å ´åˆã«ã®ã¿æ›¸ãè¾¼ã¿æ¨©é™ã‚’与ãˆã‚‹ã¨ã„ã†æŸ”軟性ãŒã‚りã¾ã™ã€‚ ペシミスティック・レコードロックã§ã¯ã€æ›´æ–°ã•れる必è¦ãŒãªã„ã¨ãã§ã‚‚レコードã¯ãƒ­ãƒƒã‚¯ã•れãŸã¾ã¾ã§ã™ã€‚ オプティミスティック・レコードロックã§ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ›¸ãè¾¼ã¿ã®å¯èƒ½/ä¸å¯èƒ½ã¯æ›´æ–°æ™‚ã«åˆ¤æ–­ã•れã¾ã™ã€‚ + +ORDA ã§ã¯ã€ä»¥ä¸‹ã®äºŒã¤ã®ãƒ­ãƒƒã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +- 自動的㪠"オプティミスティック" モード。多ãã®ã‚¢ãƒ—リケーションã«é©ã—ã¦ã„ã¾ã™ã€‚ +- "ペシミスティック" モード。エンティティをアクセスã™ã‚‹å‰ã«ãƒ­ãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 自動オプティミスティック・ロック + +ã“ã®è‡ªå‹•機構ã¯ã€"オプティミスティック・ロック" ã«åŸºã¥ã„ãŸã‚‚ã®ã§ã€ã“れ㯠Webアプリケーションã®å ´åˆã«ã¨ãã«é©ã—ã¦ã„ã¾ã™ã€‚ ã“ã®æ¦‚念ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå‹•作原ç†ã«åŸºã¥ã„ã¦ã„ã¾ã™: + +* ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯å¿…ãšèª­ã¿æ›¸ãå¯èƒ½ãªçŠ¶æ…‹ã§ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚エンティティ㮠*事å‰* ロックã¨ã„ã†ã®ã¯ã‚りã¾ã›ã‚“。 +* å„エンティティã«ã¯ä¿å­˜ã•れるãŸã³ã«ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れる内部的ãªãƒ­ãƒƒã‚¯ã‚¹ã‚¿ãƒ³ãƒ—ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ +* プロセスã‚ã‚‹ã„ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ `entity.save( )` メソッドã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¿å­˜ã—よã†ã¨ã—ãŸå ´åˆã€4D ã¯ä¿å­˜ã—よã†ã¨ã—ã¦ã„るエンティティã®ã‚¹ã‚¿ãƒ³ãƒ—ã®å€¤ã¨ãƒ‡ãƒ¼ã‚¿å†…ã«ã‚るエンティティã®ã‚¹ã‚¿ãƒ³ãƒ—ã®å€¤ã‚’比較ã—ã¾ã™ (データ編集ã®å ´åˆ): + * 値ãŒåˆè‡´ã—ã¦ã„ã‚‹å ´åˆã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä¿å­˜ã•れã€å†…部スタンプã®å€¤ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¾ã™ã€‚ + * 値ãŒåˆè‡´ã—ãªã„å ´åˆã€èª­ã¿è¾¼ã¿ã‹ã‚‰ä¿å­˜ã¾ã§ã®é–“ã«ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’編集ã—ãŸã“ã¨ã«ãªã‚Šã¾ã™ã€‚ ä¿å­˜ã¯å®Ÿè¡Œã•れãšã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +オプティミスティック・ロックã®å‹•作ã¯ä»¥ä¸‹ã‚ˆã†ã«å›³è§£ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +1. 二ã¤ã®ãƒ—ロセスãŒåŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’読ã¿è¾¼ã‚“ã ã¨ã—ã¾ã™ã€‚

          ![](assets/en/ORDA/optimisticLock1.png) + +2. 最åˆã®ãƒ—ロセスãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’編集ã—ã€ãれをä¿å­˜ã—よã†ã¨ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ `entity.save( )` メソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ 4Dエンジンã¯ã€ç·¨é›†ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å†…部スタンプ値ã¨ãƒ‡ãƒ¼ã‚¿ã«ä¿å­˜ã•れã¦ã„るエンティティã®å†…éƒ¨ã‚¹ã‚¿ãƒ³ãƒ—å€¤ã‚’è‡ªå‹•çš„ã«æ¯”較ã—ã¾ã™ã€‚ ã“れã¯åˆè‡´ã—ã¾ã™ã®ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä¿å­˜ã•れã€ãã®å†…部スタンプ値ã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¾ã™ã€‚

          ![](assets/en/ORDA/optimisticLock2.png) + +3. 二ã¤ç›®ã®ãƒ—ロセスも読ã¿è¾¼ã‚“ã ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’編集ã—ã€ãれをä¿å­˜ã—よã†ã¨ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ `entity.save( )` メソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ 編集ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å†…部スタンプ値ã¯ãƒ‡ãƒ¼ã‚¿ã«ä¿å­˜ã•れã¦ã„るエンティティã®å†…部スタンプ値ã¨åˆè‡´ã—ãªã„ã®ã§ã€ä¿å­˜ã¯å®Ÿè¡Œã•れãšã€ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚

          ![](assets/en/ORDA/optimisticLock3.png) + + +ã“ã®æµã‚Œã¯ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã®ã‚ˆã†ã«åˆ†è§£ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d + $person1:=ds.Person.get(1) // エンティティをå‚ç…§ + $person2:=ds.Person.get(1) // åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®åˆ¥ã®å‚ç…§ + $person1.name:="Bill" + $result:=$person1.save() // $result.success=true, 変更ã¯ä¿å­˜ã•れã¾ã™ + $person2.name:="William" + $result:=$person2.save() // $result.success=false, 変更ã¯ä¿å­˜ã•れã¾ã›ã‚“ +``` + +ã“ã®ä¾‹ã§ã¯ã€$person1 ã« Person ã®ã€ã‚­ãƒ¼ãŒ 1 ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’代入ã—ã¾ã™ã€‚ 次ã«ã€åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®åˆ¥ã®å‚照を変数 $person2 ã«ä»£å…¥ã—ã¾ã™ã€‚ $person1 を用ã„ã¦ã€äººç‰©ã®åå‰ã‚’変更ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ä¿å­˜ã—ã¾ã™ã€‚ åŒã˜ã“ã¨ã‚’ $person2 を使用ã—ã¦å®Ÿè¡Œã—よã†ã¨ã™ã‚‹ã¨ã€4D ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€å¤‰æ•° $person2 ã«ä»£å…¥ã•れãŸã‚‚ã®ã¨åŒã˜ã‹ã©ã†ã‹ã‚’調ã¹ã¾ã™ã€‚ çµæžœã¨ã—ã¦ã“れã¯åŒã˜ã‚‚ã®ã§ã¯ç„¡ã„ã®ã§ã€success プロパティã«ã¯ false ãŒè¿”ã•れã€äºŒã¤ç›®ã®å¤‰æ›´ã¯ä¿å­˜ã•れã¾ã›ã‚“。 + +ã“ã†ã„ã£ãŸçжæ³ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ã€ãŸã¨ãˆã° `entity.reload()` メソッドを使用ã—ã¦ãƒ‡ã‚£ã‚¹ã‚¯ã‹ã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å†èª­è¾¼ã—ã€å¤‰æ›´ã‚’ã‚‚ã†ä¸€åº¦ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸ `entity.save()` メソッドã¯ã€ç•°ãªã‚‹ãƒ—ロセスãŒãれãžã‚Œç•°ãªã‚‹å±žæ€§ã‚’変更ã—ã¦ã„ãŸå ´åˆã«ã¯ä¿å­˜ã‚’実行ã™ã‚‹ "automerge" オプションもæä¾›ã—ã¦ã„ã¾ã™ã€‚ + +> **トランザクション** 内ã«ãŠã„ã¦ã¯ã€ç‰¹å®šãƒ¬ã‚³ãƒ¼ãƒ‰ã®ã‚³ãƒ”ーãŒã‚³ãƒ³ã‚¿ã‚­ã‚¹ãƒˆå†…ã«ä¸€ã¤ã—ã‹å­˜åœ¨ã—ãªã„ãŸã‚ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚¹ã‚¿ãƒ³ãƒ—ã¯ä½¿ç”¨ã•れã¾ã›ã‚“。 レコードをå‚ç…§ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒè¤‡æ•°ã‚ã£ã¦ã‚‚ã€åŒã˜ã‚³ãƒ”ãƒ¼ãŒæ¤œåŽã•れるãŸã‚ `entity.save()` ã«ã‚ˆã‚‹å‡¦ç†ãŒã‚¹ã‚¿ãƒ³ãƒ—エラーを生æˆã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 + +### ペシミスティック・ロック + +エンティティã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹æ™‚ã«ä»»æ„ã«ãƒ­ãƒƒã‚¯ãŠã‚ˆã³ã‚¢ãƒ³ãƒ­ãƒƒã‚¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ エンティティãŒãƒ—ロセスã‹ã‚‰ãƒ­ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ—ロセスã«èª­ã¿æ›¸ãå¯èƒ½ãƒ¢ãƒ¼ãƒ‰ã§èª­ã¿è¾¼ã¾ã‚Œã¦ã„ã¾ã™ãŒã€ä»–ã®ã™ã¹ã¦ã®ãƒ—ロセスã«å¯¾ã—ã¦ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã™ã€‚ ロックã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€ä»–ã®ãƒ—ロセスã‹ã‚‰ã¯èª­ã¿è¾¼ã¿ãƒ¢ãƒ¼ãƒ‰ã§ã®ã¿èª­ã¿è¾¼ã‚€ã“ã¨ãŒã§ãã¾ã™ã€‚ã¤ã¾ã‚Šã€ãã®å€¤ã‚’編集・ä¿å­˜ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“ã®æ©Ÿèƒ½ã¯ `Entity` クラス㮠2ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«åŸºã¥ã„ã¦ã„ã¾ã™: + +* `entity.lock()` +* `entity.unlock()` + +è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +### 4Dクラシック・ロックã¨ORDAã®ãƒšã‚·ãƒŸã‚¹ãƒ†ã‚£ãƒƒã‚¯ãƒ»ãƒ­ãƒƒã‚¯ã®çµ„ã¿åˆã‚ã› + +クラシックコマンド㨠ORDA コマンドã®ä¸¡æ–¹ã‚’使用ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロックã™ã‚‹å ´åˆã€ä»¥ä¸‹ã®åŽŸå‰‡ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +* クラシック4Dコマンドを使用ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロックã—ãŸå ´åˆã€ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ç›¸å½“ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ ORDA ã§ãƒ­ãƒƒã‚¯ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +* ORDA を使用ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロックã—ãŸå ´åˆã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ç›¸å½“ã™ã‚‹ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’クラシック4Dコマンドã§ãƒ­ãƒƒã‚¯ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +ã“れらã®åŽŸç†ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªå›³ã«è¡¨ã™ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/ORDA/concurrent1.png) + +**トランザクションロック** ã¯ã‚¯ãƒ©ã‚·ãƒƒã‚¯ã‚³ãƒžãƒ³ãƒ‰ã¨ ORDAコマンドã®ä¸¡æ–¹ã«é©ç”¨ã•れã¾ã™ã€‚ マルãƒãƒ—ロセスã‚ã‚‹ã„ã¯ãƒžãƒ«ãƒãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リケーションã«ãŠã„ã¦ã¯ã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³å†…ã§ã‚¯ãƒ©ã‚·ãƒƒã‚¯ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã—ã¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’ロックã—ãŸå ´åˆã€ãã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãŒ OK ã‚ã‚‹ã„ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れるã¾ã§ã€ä»–ã®ãƒ—ロセスã‹ã‚‰ãã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«ç›¸å½“ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロックã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (逆もã¾ãŸç„¶ã‚Šã§ã™)。 + +* クラシックコマンドを使用ã—ã¦ãƒ­ãƒƒã‚¯ã—ãŸå ´åˆ:

          ![](assets/en/ORDA/concurrent2.png) +* ORDAメソッドを使用ã—ã¦ãƒ­ãƒƒã‚¯ã—ãŸå ´åˆ:

          ![](assets/en/ORDA/concurrent3.png) + + + +## クライアント/サーãƒãƒ¼ã®æœ€é©åŒ– + +4Dã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ç’°å¢ƒã«ãŠã„ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’読ã¿è¾¼ã‚€ ORDAリクエストã«ã¤ã„ã¦è‡ªå‹•çš„ã«æœ€é©åŒ–ã™ã‚‹æ©Ÿæ§‹ã‚’æä¾›ã—ã¦ã„ã¾ã™ã€‚ ã“ã®æœ€é©åŒ–機構ã¯ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯é–“ã§ã‚„りå–りã•れるデータã®é‡ã‚’大幅ã«ç¸®å°ã•ã›ã‚‹ã“ã¨ã§ 4Dã®å®Ÿè¡Œé€Ÿåº¦ã‚’å‘上ã•ã›ã¾ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã«ã¯ã€ä»¥ä¸‹ã®æœ€é©åŒ–機構ãŒå®Ÿè£…ã•れã¦ã„ã¾ã™: + +* クライアントãŒã‚µãƒ¼ãƒãƒ¼ã«å¯¾ã—ã¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ã‚‹ã¨ã€4D ã¯ã‚³ãƒ¼ãƒ‰å®Ÿè¡Œã®é€”中ã§ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã©ã®å±žæ€§ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§å®Ÿéš›ã«ä½¿ç”¨ã•れã¦ã„ã‚‹ã‹ã‚’自動的㫠"学習" ã—ã€ãれã«å¯¾å¿œã—㟠"最é©åŒ–コンテキスト" をビルドã—ã¾ã™ã€‚ ã“ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ä»˜éšã—ã€ä½¿ç”¨ã•れãŸå±žæ€§ã‚’ä¿å­˜ã—ã¦ã„ãã¾ã™ã€‚ ä»–ã®å±žæ€§ãŒã‚ã¨ã§ä½¿ç”¨ã•れãŸå ´åˆã«ã¯è‡ªå‹•çš„ã«æƒ…報を更新ã—ã¦ã„ãã¾ã™ã€‚ + +* サーãƒãƒ¼ä¸Šã®åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ãã®å¾Œã«é€ã‚‰ã‚ŒãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€æœ€é©åŒ–コンテキストをå†åˆ©ç”¨ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰å¿…è¦ãªå±žæ€§ã®ã¿ã‚’å–å¾—ã—ã¦ã„ãã“ã¨ã§ã€å‡¦ç†ã‚’速ãã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã®ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«ãŠã„ã¦ã¯ã€"学習" ãƒ•ã‚§ãƒ¼ã‚ºã¯æœ€åˆã®è¡Œã‚’表示中ã«ãŠã“ãªã‚れるãŸã‚ã€æ¬¡ã®è¡Œã‹ã‚‰ã¯è¡¨ç¤ºãŒæœ€é©åŒ–ã•れã¦ã„ã¾ã™ã€‚ + +* æ—¢å­˜ã®æœ€é©åŒ–コンテキストã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ä»–ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚れã°ãƒ—ロパティã¨ã—ã¦æ¸¡ã™ã“ã¨ãŒã§ãã‚‹ã®ã§ã€å­¦ç¿’フェーズをçœç•¥ã—ã¦ã€ã‚¢ãƒ—リケーションをより速ã実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (以下㮠[contextプロパティã®ä½¿ç”¨](#contextプロパティã®ä½¿ç”¨) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 + +以下ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚½ãƒ¼ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®æœ€é©åŒ–ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’ã€æˆ»ã‚Šå€¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«è‡ªå‹•çš„ã«ä»˜ä¸Žã—ã¾ã™: + +* `entitySelection.and()` +* `entitySelection.minus()` +* `entitySelection.or()` +* `entitySelection.orderBy()` +* `entitySelection.slice()` +* `entitySelection.drop()` + + + +**例題** + +以下ã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ã¨ã: + +```4d + $sel:=$ds.Employee.query("firstname = ab@") + For each($e;$sel) + $s:=$e.firstname+" "+$e.lastname+" works for "+$e.employer.name // $e.employer 㯠Company テーブルをå‚ç…§ã—ã¾ã™ + End for each +``` + +最é©åŒ–機構ã®ãŠã‹ã’ã§ã€ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯å­¦ç¿’フェーズ以é™ã¯ã€*$sel* ã®ä¸­ã§å®Ÿéš›ã«ä½¿ç”¨ã•れã¦ã„る属性 (firstname, lastname, employer, employer.name) ã®ãƒ‡ãƒ¼ã‚¿ã®ã¿ã‚’å–å¾—ã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ã€‚ + + + +### contextプロパティã®ä½¿ç”¨ + +**context** プロパティを使用ã™ã‚‹ã“ã¨ã§ã€æœ€é©åŒ–ã®åˆ©ç‚¹ã‚’ã•らã«å¢—å¹…ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ—ロパティã¯ã€ã‚るエンティティセレクション用㫠"学習ã—ãŸ" 最é©åŒ–コンテキストをå‚ç…§ã—ã¾ã™ã€‚ ã“れを新ã—ã„エンティティセレクションを返㙠ORDA メソッドã«å¼•æ•°ã¨ã—ã¦æ¸¡ã™ã“ã¨ã§ã€ãã®è¿”ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã¯å­¦ç¿’フェーズを最åˆã‹ã‚‰çœç•¥ã—ã¦ä½¿ç”¨ã•れる属性をサーãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +åŒã˜æœ€é©åŒ– context プロパティã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«å¯¾ã—ã¦ã§ã‚れã°ã©ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã‚‚渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ エンティティセレクションを扱ã†ã™ã¹ã¦ã® ORDAメソッドã¯ã€contextプロパティをサãƒãƒ¼ãƒˆã—ã¾ã™ (ãŸã¨ãˆã°`dataClass.query( )` ã‚ã‚‹ã„㯠`dataClass.all( )` メソッドãªã©)。 ãŸã ã—〠コードã®ä»–ã®éƒ¨åˆ†ã§æ–°ã—ã„属性ãŒä½¿ç”¨ã•れãŸéš›ã«ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯è‡ªå‹•çš„ã«æ›´æ–°ã•れるã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 åŒã˜ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’ç•°ãªã‚‹ã‚³ãƒ¼ãƒ‰ã§å†åˆ©ç”¨ã—ã™ãŽã‚‹ã¨ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’読ã¿è¾¼ã¿éŽãŽã¦ã€çµæžœã¨ã—ã¦åŠ¹çŽ‡ãŒè½ã¡ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ +> åŒæ§˜ã®æ©Ÿæ§‹ã¯èª­ã¿è¾¼ã¾ã‚ŒãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã‚‚実装ã•れã¦ãŠã‚Šã€ãれã«ã‚ˆã£ã¦ä½¿ç”¨ã—ãŸå±žæ€§ã®ã¿ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れるよã†ã«ãªã‚Šã¾ã™ (`dataClass.get( )` メソッドå‚ç…§)。 + + + +**`dataClass.query( )` メソッドを使用ã—ãŸä¾‹:** + +```4d + var $sel1; $sel2; $sel3; $sel4; $querysettings; $querysettings2 : Object + var $data : Collection + $querysettings:=New object("context";"shortList") + $querysettings2:=New object("context";"longList") + + $sel1:=ds.Employee.query("lastname = S@";$querysettings) + $data:=extractData($sel1) // extractData メソッドã«ãŠã„ã¦ã€æœ€é©åŒ–ã¯ãƒˆãƒªã‚¬ãƒ¼ã•れã¦ãŠã‚Šã€"shortList" ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + + $sel2:=ds.Employee.query("lastname = Sm@";$querysettings) + $data:=extractData($sel2) // extractData メソッドã«ãŠã„ã¦ã€"shortList" ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„る最é©åŒ–ãŒé©ç”¨ã•れã¾ã™ã€‚ + + $sel3:=ds.Employee.query("lastname = Smith";$querysettings2) + $data:=extractDetailedData($sel3) // extractDetailedData メソッドã«ãŠã„ã¦ã€æœ€é©åŒ–ã¯ãƒˆãƒªã‚¬ãƒ¼ã•れã¦ãŠã‚Šã€"longList" ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + + $sel4:=ds.Employee.query("lastname = Brown";$querysettings2) + $data:=extractDetailedData($sel4) // extractDetailedData メソッドã«ãŠã„ã¦ã€"longList" ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„る最é©åŒ–ãŒé©ç”¨ã•れã¾ã™ã€‚ +``` + +### エンティティセレクション型リストボックス + +クライアント/サーãƒãƒ¼ç’°å¢ƒã«ãŠã‘るエンティティセレクション型リストボックスã«ãŠã„ã¦ã¯ã€ãã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„を表示ã¾ãŸã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã™ã‚‹éš›ã«ã€æœ€é©åŒ–ãŒè‡ªå‹•çš„ã«é©ç”¨ã•れã¾ã™ã€‚ã¤ã¾ã‚Šã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã«è¡¨ç¤ºã•れã¦ã„る属性ã®ã¿ãŒã‚µãƒ¼ãƒãƒ¼ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れã¾ã™ã€‚ + +ã¾ãŸã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã® **カレントã®é …ç›®** ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£å¼ ([コレクション/エンティティセレクション型リストボックス](FormObjects/listbox_overview.md#リストボックスã®åž‹) å‚ç…§) を介ã—ã¦ã‚«ãƒ¬ãƒ³ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロードã™ã‚‹å ´åˆã«ã¯ã€å°‚用㮠"ページモード" ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒæä¾›ã•れã¾ã™ã€‚ ã“れã«ã‚ˆã£ã¦ã€"ページ" ãŒè¿½åŠ å±žæ€§ã‚’ãƒªã‚¯ã‚¨ã‚¹ãƒˆã—ã¦ã‚‚ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰ãŒé¿ã‘られã¾ã™ã€‚ ãªãŠã€ãƒšãƒ¼ã‚¸ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ç”Ÿæˆ/使用㯠**カレントã®é …ç›®** å¼ã‚’使用ã—ãŸå ´åˆã«é™ã‚Šã¾ã™ (ãŸã¨ãˆã°ã€`entitySelection[index]` を介ã—ã¦åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸå ´åˆã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒå¤‰åŒ–ã—ã¾ã™)。 + +ãã®å¾Œã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’走査ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚‚ã€åŒã˜æœ€é©åŒ–ãŒé©ç”¨ã•れã¾ã™ã€‚ 以下ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€ã‚½ãƒ¼ã‚¹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æœ€é©åŒ–ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’ã€æˆ»ã‚Šå€¤ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«è‡ªå‹•çš„ã«ä»˜ä¸Žã—ã¾ã™: + +* `entity.next( )` +* `entity.first( )` +* `entity.last( )` +* `entity.previous( )` + +ãŸã¨ãˆã°ã€æ¬¡ã®ã‚³ãƒ¼ãƒ‰ã¯é¸æŠžã—ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロードã—ã€æ‰€å±žã—ã¦ã„るエンティティセレクションを走査ã—ã¾ã™ã€‚ エンティティã¯ç‹¬è‡ªã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãƒ­ãƒ¼ãƒ‰ã•れã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯å½±éŸ¿ã•れã¾ã›ã‚“: + +```4d + $myEntity:=Form.currentElement // カレントã®é …ç›®å¼ + //... ãªã‚“らã‹ã®å‡¦ç† + $myEntity:=$myEntity.next() // 次ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚‚åŒã˜ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã—ã¦ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ +``` diff --git a/website/translated_docs/ja/ORDA/glossary.md b/website/translated_docs/ja/ORDA/glossary.md new file mode 100644 index 00000000000000..909f09d344ef16 --- /dev/null +++ b/website/translated_docs/ja/ORDA/glossary.md @@ -0,0 +1,210 @@ +--- +id: glossary +title: 用語集 +--- + +## 主ãªã‚³ãƒ³ã‚»ãƒ—ãƒˆã®æ¦‚è¦ + +![](assets/en/ORDA/mainConcepts.png) + + + +## 属性 + +属性ã¨ã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å†…ã«ãŠã‘る最å°ã®ä¿å­˜ã‚»ãƒ«ã§ã™ ([リレーション属性](#リレーション属性) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„)。 データクラス属性ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å±žæ€§ã‚’æ··åŒã—ãªã„よã†ã«ã—ã¦ãã ã•ã„: + +* データクラスオブジェクトã«ãŠã‘ã‚‹å„プロパティã¯ã€å¯¾å¿œã™ã‚‹ãƒ†ãƒ¼ãƒ–ルã®å¯¾å¿œã™ã‚‹ãƒ•ィールドã¸ã¨ãƒžãƒƒãƒ—ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã§ã™ (åŒã˜åå‰ã¨åž‹)。 +* エンティティオブジェクトã«ãŠã‘るエンティティ属性ã¯ã€å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢å±žæ€§ã®å€¤ã‚’æ ¼ç´ã™ã‚‹ãƒ—ロパティã§ã™ã€‚ +> *属性* 㨠*プロパティ* ã¯ä¼¼ãŸæ¦‚念ã§ã™ã€‚ "属性" ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãƒ—ロパティを指定ã™ã‚‹ã®ã«ä½¿ã‚れるã®ã«å¯¾ã—ã€"プロパティ"ã¯ã‚ˆã‚Šä¸€èˆ¬çš„ãªæ¦‚念ã§ã‚ªãƒ–ジェクト内ã§ä¿å­˜ã•れるデータを定義ã—ã¾ã™ã€‚ + +## 属性パス + +属性パスã¨ã¯ã€ã‚るデータクラスã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å†…ã®å±žæ€§ã¸ã®ãƒ‘スã§ã™ã€‚ [プロパティパス](#プロパティパス) ã‚‚å‚ç…§ã—ã¦ãã ã•ã„。 + + +## クラスコード + +ユーザークラス関数ã®ã‚³ãƒ¼ãƒ‰ã€‚ + + +## Computed attribute + +A computed attribute doesn't actually store information. Instead, it determines its value based on other values from the same entity or from other entities, attributes or functions. When a computed attribute is referenced, the underlying "computation" is evaluated to determine the value. Computed attributes may even be assigned values where user-defined code determines what to do during the assignment. + +## データモデルクラス + +データモデルオブジェクトã«é–¢é€£ã—ã¦æä¾›ã•れる拡張クラス。 + +## データモデルオブジェクト + +ORDA を通ã—ã¦æä¾›ã•れã¦ã„るデータベースオブジェクト (データストアã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³)。 + +## データモデル関数 + +ORDA データモデルクラスã®é–¢æ•°ã€‚ + +## データクラス + +データクラスã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’記述ã™ã‚‹ã‚ªãƒ–ジェクトモデルã§ã™ã€‚ データストアã«ã‚ˆã£ã¦æä¾›ã•れるデータベースã®ãƒ†ãƒ¼ãƒ–ルã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’通ã—ã¦ç®¡ç†ã•れã¾ã™ã€‚ データストアã‹ã‚‰æä¾›ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å„テーブルã¯ã€å¯¾å¿œã™ã‚‹åŒåã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’æŒã¡ã¾ã™ã€‚ テーブルã®å„フィールドã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®å±žæ€§ã§ã™ã€‚ + +データクラスã¯å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ãƒªãƒ¬ãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ + + +## DataClass クラス + +カスタム関数を追加ã™ã‚‹ã“ã¨ã®ã§ãã‚‹ã€ç‰¹å®šã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクト用ã®ã‚¯ãƒ©ã‚¹ã€‚ + +## データストア + +データストアã¨ã¯ã€ORDA ã«ã‚ˆã£ã¦æä¾›ã•れるインターフェースオブジェクトã§ã™ã€‚データストアã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’å‚ç…§ã—ã€ãƒ‡ãƒ¼ã‚¿ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ `ds` コマンドã«ã‚ˆã£ã¦è¿”ã•れるメインデータベースã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ (メインデータストア) ã¨ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +データストアã¯ä»¥ä¸‹ã®ã‚‚ã®ã‚’æä¾›ã—ã¾ã™: + +* 4Dデータベースã¸ã®æŽ¥ç¶š +* データベースを扱ã†ãŸã‚ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚»ãƒƒãƒˆ + +利用ã§ãるデータベースã¯ã€ã‚¹ã‚¿ãƒ³ãƒ€ãƒ­ãƒ³ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã§é–‹ã„ã¦ã„るメイン㮠4D データベース (メインデータストア)ã€ãŠã‚ˆã³ REST リソースã¨ã—ã¦å…¬é–‹ã•れ㟠4D Server データベースã§ã™ (リモートデータストア)。 + +データストアã¯å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã¿ã‚’å‚ç…§ã—ã¾ã™ãŒã€ 複数ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’アクセスã™ã‚‹ãŸã‚ã«è¤‡æ•°ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’é–‹ãã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +## DataStore クラス + +カスタム関数を追加ã™ã‚‹ã“ã¨ã®ã§ãã‚‹ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚ªãƒ–ジェクト用ã®ã‚¯ãƒ©ã‚¹ã€‚ + + +## DataStoreImplementation + +`4D` クラスストア内㮠DataStore クラスã®å†…部的ãªå称。 + +## ディープコピー + +ディープコピーã¯ã€ã‚るオブジェクトã¨ãã“ã«æ ¼ç´ã•れã¦ã„ã‚‹ã™ã¹ã¦ã®å‚照を複製ã—ã¾ã™ã€‚ ディープコピーã®ã‚ã¨ã€ã‚³ãƒ”ーã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«ã¯ã€ã™ã¹ã¦ã®ã‚ªãƒªã‚¸ãƒŠãƒ«è¦ç´ ã®è¤‡è£½ (ã¤ã¾ã‚Šæ–°è¦å‚ç…§) ãŒæ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ [シャロウコピー](#シャロウコピー) ã‚‚åˆã‚ã›ã¦å‚ç…§ã—ã¦ãã ã•ã„。 + +## ds + +`ds` ã¯ã€[データストア](dsMapping.md#データストア) ã®ã‚ªãƒ–ジェクトå‚照を返㙠4Dランゲージコマンドã§ã™ã€‚ ã“ã®å‚照㯠4D ã®ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒæä¾›ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«åˆè‡´ã—ã¾ã™ã€‚ + +## エンティティ + +エンティティã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãƒ¢ãƒ‡ãƒ«ã«å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトã§ã™ã€‚ エンンティティã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¨åŒã˜å±žæ€§ãŒæ ¼ç´ã•れã¾ã™ã€‚ + +エンティティã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨ã‚‚解釈å¯èƒ½ãªã‚ªãƒ–ジェクトã§ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒªãƒ¬ãƒ¼ãƒˆã•れãŸãƒ‡ãƒ¼ã‚¿ã‚‚æ ¼ç´ã—ã¦ã„ã¾ã™ã€‚ エンティティã®ç›®çš„ã¯ãƒ‡ãƒ¼ã‚¿ã®ç®¡ç† (作æˆã€æ›´æ–°ã€å‰Šé™¤) ã§ã™ã€‚ + +è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ã€[エンティティ](entities.md) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +## エンティティセレクション + +エンティティセレクションã¯ã€ä¸€ã¤ã®ã‚ªãƒ–ジェクトã§ã™ã€‚ データストアをクエリã™ã‚‹ã¨ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚ エンティティセレクションã¨ã¯ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«æ‰€å±žã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®å‚ç…§ã®ã‚»ãƒƒãƒˆã®ã“ã¨ã§ã™ã€‚ + +エンティティセレクションã¯ä»¥ä¸‹ã‚’æ ¼ç´ã—ã¾ã™: + +* 0 ã‹ã‚‰ X ã¾ã§ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£å‚ç…§ã®ã‚»ãƒƒãƒˆ +* length プロパティ(常ã«å­˜åœ¨ã—ã¾ã™) +* queryPlan ãŠã‚ˆã³ queryPath プロパティ (クエリ時ã«è¦æ±‚ã—ãŸå ´åˆã«å­˜åœ¨ã—ã¾ã™) + +エンティティセレクションã¯ç©ºã§ã‚ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ + + +## 汎用クラス + +エンティティやデータクラスãªã©ã® ORDA オブジェクト用ã®ãƒ“ルトインクラス。 汎用クラスã®ãƒ—ロパティや関数ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼æ‹¡å¼µã‚¯ãƒ©ã‚¹ (例: `EmployeeEntity`) ã«ãŠã„ã¦è‡ªå‹•ã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + +## レイジーローディング + +エンティティã¯å‚ç…§ã¨ã—ã¦ç®¡ç†ã•れã¦ã„ã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ã¯å¿…è¦ãªã¨ãã«ã®ã¿ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ã¤ã¾ã‚Šã‚³ãƒ¼ãƒ‰ã‚„ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースウィジェットを通ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã¨ããªã©ã§ã™ã€‚ ã“ã®æœ€é©åŒ–原ç†ã¯ã€ãƒ¬ã‚¤ã‚¸ãƒ¼ãƒ­ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¨å‘¼ã°ã‚Œã¦ã„ã¾ã™ã€‚ + +## メインデータストア + +é–‹ã‹ã‚Œã¦ã„ã‚‹ 4Dデータベース (シングルユーザーã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼) ã«å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚ªãƒ–ジェクト。 メインデータストア㯠`ds` コマンドã«ã‚ˆã£ã¦è¿”ã•れã¾ã™ã€‚ + +## メソッド + +データストアã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãªã©ã® ORDA オブジェクトã¯ã€ã‚ªãƒ–ジェクトã®ã‚¯ãƒ©ã‚¹ã‚’定義ã—ã¾ã™ã€‚ ã“れらã®ã‚¯ãƒ©ã‚¹ã«ã¯ã€ã‚ªãƒ–ジェクトを直接æ“作ã™ã‚‹ãŸã‚ã®å°‚用ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒæä¾›ã•れã¦ã„ã¾ã™ã€‚ ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ãƒ¡ãƒ³ãƒãƒ¼é–¢æ•°ã¨ã‚‚呼ã°ã‚Œã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã™ã‚‹ã«ã¯ã€ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«å¯¾ã—ã¦å‘¼ã³å‡ºã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€`query()` メソッドã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ãƒ¡ãƒ³ãƒãƒ¼é–¢æ•°ã§ã™ã€‚ `$myClass` 変数ã«ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚ªãƒ–ジェクトを格ç´ã—ã¦ã„ã‚‹å ´åˆã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```code4d +$myClass.query("name = smith") +``` + +## ミックスデータ型 + +ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å±žæ€§ã«ä¿å­˜å¯èƒ½ãªå€¤ã®æ§˜ã€…ãªåž‹ã‚’指定ã™ã‚‹ãŸã‚ã«ã€"ミックス" データ型ãŒä½¿ç”¨ã•れã¾ã™ã€‚ : + +* number +* text +* null +* boolean +* date +* object +* collection +* ピクãƒãƒ£ãƒ¼ (\*) + +*(\*) ピクãƒãƒ£ãƒ¼åž‹ã¯* `entitySelection.max( )` *ãªã©ã®çµ±è¨ˆåž‹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã›ã‚“。* + +## オプティミスティック・ロック + +"オプティミスティック・ロック" モードã§ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯æ›´æ–°ã•れるã¾ã§ã¯æ˜Žç¤ºçš„ã«ã¯ãƒ­ãƒƒã‚¯ã•れã¦ã„ã¾ã›ã‚“。 å„エンティティã¯ã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•れるãŸã³ã«è‡ªå‹•ã§ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れる内部スタンプをæŒã£ã¦ã„ã¾ã™ã€‚ `entity.save( )` ãŠã‚ˆã³ `entity.drop( )` メソッドã¯(メモリ内ã«) ロードã•れãŸã‚¹ã‚¿ãƒ³ãƒ—ã¨ã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚¹ã‚¿ãƒ³ãƒ—ãŒåˆè‡´ã—ãªã„å ´åˆã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒãƒ‰ãƒ­ãƒƒãƒ—ã•れã¦ã„ã‚‹å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ オプティミスティック・ロック㯠ORDA 実装内ã§ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ [ペシミスティック・ロック](#ペシミスティック・ロック) ã‚‚åˆã‚ã›ã¦å‚ç…§ã—ã¦ãã ã•ã„。 + +## ペシミスティック・ロック + +"ペシミスティック・ロック" ã¨ã¯ã€`entity.lock( )` メソッドã«ã‚ˆã‚Šã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚¢ã‚¯ã‚»ã‚¹ã•れるå‰ã«ãれをロックã™ã‚‹ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ ロックãŒè§£é™¤ã•れるã¾ã§ã€ä»–ã®ãƒ—ロセスã‹ã‚‰ã¯ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã™ã‚‹ã“ã¨ã‚‚ã€ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 クラシック 4Dランゲージã«ãŠã„ã¦ã¯ãƒšã‚·ãƒŸã‚¹ãƒ†ã‚£ãƒƒã‚¯ãƒ»ãƒ­ãƒƒã‚¯ã®ã¿ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ [オプティミスティック・ロック](#オプティミスティック・ロック) ã‚‚åˆã‚ã›ã¦å‚ç…§ã—ã¦ãã ã•ã„。 + +## プロパティ + +[属性](#属性) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +> 属性ã¨ãƒ—ロパティã¯ä¼¼ãŸæ¦‚念ã§ã™ã€‚ "属性" ã¯ãƒ‡ãƒ¼ã‚¿ã‚’ä¿å­˜ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ãƒ—ロパティを指定ã™ã‚‹ã®ã«ä½¿ã‚れるã®ã«å¯¾ã—ã€"プロパティ"ã¯ã‚ˆã‚Šä¸€èˆ¬çš„ãªæ¦‚念ã§ã‚ªãƒ–ジェクト内ã§ä¿å­˜ã•れるデータを定義ã—ã¾ã™ã€‚ + +## プロパティパス + +プロパティパスã¨ã¯ã€ã‚るオブジェクトã®ãƒ—ロパティã¸ã®ãƒ‘スã§ã™ã€‚ プロパティãŒè¤‡æ•°ã®éšŽå±¤ã«ãƒã‚¹ãƒˆã•れã¦ã„ã‚‹å ´åˆã€å„階層ã¯ãƒ‰ãƒƒãƒˆ (".") ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ + +## 通常クラス + +ORDA オブジェクトã¨ã¯é–¢ã‚りã®ãªã„ユーザークラス。 + +## リレートã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ + +リレートã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã¨ã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã«ã‚ˆã£ã¦ãƒªãƒ³ã‚¯ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã“ã¨ã‚’指ã—ã¾ã™ã€‚ + +## リレーション属性 + +リレーション属性ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹é–“ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ (1対N ãŠã‚ˆã³ N対1) を概念化ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ + +* N対1リレーション (データクラスA ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹B ã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ã‚’å‚ç…§ã—ã¾ã™): リレーション属性ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹A 内ã§åˆ©ç”¨å¯èƒ½ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹B ã®ä¸€ã¤ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’å‚ç…§ã—ã¾ã™ã€‚ +* 1対Nリレーション (データクラスB ã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ãŒãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹A ã®è¤‡æ•°ã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ã‚’å‚ç…§ã—ã¾ã™): リレーション属性ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹B 内ã§åˆ©ç”¨å¯èƒ½ã§ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹A ã®è¤‡æ•°ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’å‚ç…§ã—ã¾ã™ã€‚ + +データクラスã¯å†å¸°çš„ãªãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’æŒã¤ã“ã¨ãŒã§ãã¾ã™ã€‚ + +エンティティ内ã§ã¯ã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã®å€¤ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨ãªã‚Šã¾ã™ã€‚ + +## リレートエンティティ + +リレートエンティティã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¨ã—ã¦ã¿ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +エンティティセレクションã¯ã€å¯¾å¿œã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹å†…ã§å®šç¾©ã•れãŸãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã«å¿œã˜ã¦ã€è¤‡æ•°ã®ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å‚ç…§ã™ã‚‹ã“ã¨ã‚‚ã‚りã¾ã™ã€‚ + +## リモートデータストア + +4D ã¾ãŸã¯ (HTTP経由ã§åˆ©ç”¨å¯èƒ½ãª) 4D Server 上ã§é–‹ã‹ã‚Œã¦ã„ã‚‹ã€REST リソースã¨ã—ã¦å…¬é–‹ã•れ㟠4Dデータベース。 ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ä»–ã®ãƒžã‚·ãƒ³ã«ãŠã„ã¦ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¨ã—ã¦ãƒ­ãƒ¼ã‚«ãƒ«ã«å‚ç…§ã™ã‚‹ã“ã¨ãŒã§ãã€ãã®éš›ã«ã¯å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸ locaID ã§è­˜åˆ¥ã•れã¾ã™ã€‚ リモートデータストア㯠ORDA ã®æ¦‚念 (データストアã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ç­‰) を使ã£ã¦åˆ©ç”¨ã§ãã¾ã™ã€‚ 利用ã«ã‚ãŸã£ã¦ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒæ¶ˆè²»ã•れã¾ã™ã€‚ + +## セッション + +4DアプリケーションãŒãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã™ã‚‹ã¨ã€4D Server (HTTP) 上ã§ã¯ セッション ãŒä½œæˆã•れã¾ã™ã€‚ セッションcookie ãŒç”Ÿæˆã•れã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ID ã¨ç´ã¥ã‘られã¾ã™ã€‚ + +æ–°è¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‹å§‹ã•れるã”ã¨ã«ã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒæ¶ˆè²»ã•れã¾ã™ã€‚ セッションãŒé–‰ã˜ã‚‰ã‚Œã‚‹ã¨ã€ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã¯è§£æ”¾ã•れã¾ã™ã€‚ + +アクティビティã®ãªã„セッションã¯ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆå¾Œã«è‡ªå‹•çš„ã«çµ‚了ã—ã¾ã™ã€‚ デフォルトã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ 48時間ã§ã€ä»»æ„ã«è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (最少時間㯠60分)。 + +## シャロウコピー + +シャロウコピーã¯ã€è¦ç´ ã®æ§‹é€ ã®ã¿ã‚’複製ã—ã€åŒã˜å†…部å‚ç…§ã‚’ä¿æŒã—ã¾ã™ã€‚ シャロウコピーã®ã‚ã¨ã€äºŒã¤ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã•れãŸå€‹ã€…ã®è¦ç´ ã¯åŒã˜ã‚‚ã®ãŒå…±æœ‰ã•れã¦ã„ã¾ã™ã€‚ [ディープコピー](#ディープコピー) ã‚‚åˆã‚ã›ã¦å‚ç…§ã—ã¦ãã ã•ã„。 + +## è¨˜å· + +"オプティミステック" ロックテクノロジーã«ãŠã„ã¦ä½¿ç”¨ã•れるもã®ã§ã™ã€‚ ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã¯ã‚¹ã‚¿ãƒ³ãƒ—ã¨å‘¼ã°ã‚Œã‚‹å†…部カウンターãŒã‚りã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒä¿å­˜ã•れるãŸã³ã«ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¦ã„ãã¾ã™ã€‚ エンティティ内ã®ã‚¹ã‚¿ãƒ³ãƒ—ã¨ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜ã•れã¦ã„るエンティティã®ã‚¹ã‚¿ãƒ³ãƒ—ã‚’è‡ªå‹•çš„ã«æ¯”較ã™ã‚‹ã“ã¨ã§ã€4D ã¯åŒã˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®æ›¸ãè¾¼ã¿ã®è¡çªã‚’防ã„ã§ã„ã¾ã™ã€‚ + +## Storage attribute + +A storage attribute (sometimes referred to as a scalar attribute) is the most basic type of attribute in a datastore class and most directly corresponds to a field in a relational database. A storage attribute holds a single value for each entity in the class. diff --git a/website/translated_docs/ja/ORDA/ordaClasses.md b/website/translated_docs/ja/ORDA/ordaClasses.md new file mode 100644 index 00000000000000..5c14f648bf39fc --- /dev/null +++ b/website/translated_docs/ja/ORDA/ordaClasses.md @@ -0,0 +1,821 @@ +--- +id: ordaClasses +title: データモデルクラス +--- + + + +ORDA を使用ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ä¸Šã«é«˜ãƒ¬ãƒ™ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã£ã¦ãƒ“ジãƒã‚¹æŒ‡å‘ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã€APIã®ã‚ˆã†ã« "公開" ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ データストアã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ãŠã‚ˆã³ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ãれãžã‚Œã€é–¢æ•°ã‚’æŒã¤ã“ã¨ã®ã§ãるクラスオブジェクトã¨ã—ã¦æä¾›ã•れã¦ã„ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€é¸æŠžä¸­ã®ç¤¾å“¡ã‚ˆã‚Šçµ¦ä¸Žã®é«˜ã„社員一覧を返㙠`getNextWithHigherSalary()` 関数を `EmployeeEntity` クラスã«ä½œæˆã—ãŸã¨ã—ã¾ã™ã€‚ ã“ã®é–¢æ•°ã¯ç°¡å˜ã«å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: + +```4d +$nextHigh:=ds.Employee(1).getNextWithHigherSalary() +``` + +ã“れらã®é–¢æ•°ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã ã‘ã§ãªãã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚„リモートアーキテクãƒãƒ£ãƒ¼ã§ã‚‚使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([リモートデータストアã®ä¾‹](#リモートデータストアã®ä¾‹) ã‚’å‚ç…§ãã ã•ã„): + +```4d + //$cityManager ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¸ã®å‚ç…§ã§ã™ +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) +``` + +ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€4D アプルケーションã®ãƒ“ジãƒã‚¹ãƒ­ã‚¸ãƒƒã‚¯ã‚’ã¾ã‚‹ã”ã¨ç‹¬ç«‹ã—ãŸãƒ¬ã‚¤ãƒ¤ãƒ¼ã«ä¿å­˜ã—ã€é«˜ãƒ¬ãƒ™ãƒ«ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã§ç°¡å˜ã«ç®¡ç†ãƒ»åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- ã‚ã‹ã‚Šã‚„ã™ã使ã„ã‚„ã™ã„関数ã®ã¿ã‚’公開ã—ã€ãã®è£ã«ã‚る構造ã®è¤‡é›‘性を "éš ã™" ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- 構造ãŒç™ºå±•ã—ãŸå ´åˆã«ã¯å½±éŸ¿ã‚’å—ã‘る関数をé©å¿œã•ã›ã‚‹ã ã‘ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯å¼•ãç¶šãé€éŽçš„ã«ãれらを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +- By default, all of your data model class functions (including [computed attribute functions](#computed-attributes)) are **not exposed** to remote applications and cannot be called from REST requests. 公開ã™ã‚‹é–¢æ•°ã¯ [`exposed`](#公開vséžå…¬é–‹é–¢æ•°) キーワードã«ã‚ˆã£ã¦æ˜Žç¤ºçš„ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +![](assets/en/ORDA/api.png) + + +å„データモデルオブジェクトã«é–¢ã‚るクラスã¯ã€4D ã«ã‚ˆã£ã¦ [ã‚らã‹ã˜ã‚自動的ã«ä½œæˆ](#クラスã®ä½œæˆ) ã•れã¾ã™ã€‚ + + +## アーキテクãƒãƒ£ãƒ¼ + +ORDA ã§ã¯ã€**`4D`** [クラスストア](Concepts/classes.md#クラスストア) を介ã—ã¦å…¬é–‹ã•れる **汎用クラス** ã¨ã€**`cs`** [クラスストア](Concepts/classes.md#クラスストア) ã§å…¬é–‹ã•れる **ユーザークラス** ãŒæä¾›ã•れã¦ã„ã¾ã™: + +![](assets/en/ORDA/ClassDiagramImage.png) + +ORDA データモデルクラスã¯ã™ã¹ã¦ **`cs`** クラスストアã®ãƒ—ロパティã¨ã—ã¦å…¬é–‹ã•れã¾ã™ã€‚ 次㮠ORDA ã‚¯ãƒ©ã‚¹ãŒæä¾›ã•れã¦ã„ã¾ã™: + +| クラス | 例 | 次ã«ã‚ˆã£ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ | +| --------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cs.DataStore | cs.DataStore | [`ds`](API/DataStoreClass.md#ds) コマンド | +| cs.*DataClassName* | cs.Employee | [`dataStore.DataClassName`](API/DataStoreClass.md#dataclassname), `dataStore[DataClassName]` | +| cs.*DataClassName*Entity | cs.EmployeeEntity | [`dataClass.get()`](API/DataClassClass.md#get), [`dataClass.new()`](API/DataClassClass.md#new), [`entitySelection.first()`](API/EntitySelectionClass.md#first), [`entitySelection.last()`](API/EntitySelectionClass.md#last), [`entity.previous()`](API/EntityClass.md#previous), [`entity.next()`](API/EntityClass.md#next), [`entity.first()`](API/EntityClass.md#first), [`entity.last()`](API/EntityClass.md#last), [`entity.clone()`](API/EntityClass.md#clone) | +| cs.*DataClassName*Selection | cs.EmployeeSelection | [`dataClass.query()`](API/DataClassClass.md#query), [`entitySelection.query()`](API/EntitySelectionClass.md#query), [`dataClass.all()`](API/DataClassClass.md#all), [`dataClass.fromCollection()`](API/DataClassClass.md#fromcollection), [`dataClass.newSelection()`](API/DataClassClass.md#newselection), [`entitySelection.drop()`](API/EntitySelectionClass.md#drop), [`entity.getSelection()`](API/EntityClass.md#getselection), [`entitySelection.and()`](API/EntitySelectionClass.md#and), [`entitySelection.minus()`](API/EntitySelectionClass.md#minus), [`entitySelection.or()`](API/EntitySelectionClass.md#or), [`entitySelection.orderBy()`](API/EntitySelectionClass.md#or), [`entitySelection.orderByFormula()`](API/EntitySelectionClass.md#orderbyformula), [`entitySelection.slice()`](API/EntitySelectionClass.md#slice), `Create entity selection` | + +> ORDA ユーザークラスã¯é€šå¸¸ã®ã‚¯ãƒ©ã‚¹ãƒ•ァイル (.4dm) ã¨ã—ã¦ãƒ—ロジェクト㮠Classes サブフォルダーã«ä¿å­˜ã•れã¾ã™ [(後述å‚ç…§)](#クラスファイル)。 + +ORDA データモデルユーザークラスã®ã‚ªãƒ–ジェクトインスタンスã¯ã€ãれらã®è¦ªã‚¯ãƒ©ã‚¹ã®ãƒ—ロパティや関数を使ã†ã“ã¨ãŒã§ãã¾ã™: + +- Datastore クラスオブジェクトã¯ã€[ORDA Datastore 汎用クラス](API/DataStoreClass.md) ã®é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- Datastore クラスオブジェクトã¯ã€[ORDA DataClass 汎用クラス](API/DataClassClass.md) ã®é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- EntitySelection クラスオブジェクト㯠[ORDA EntitySelection 汎用クラス](API/EntitySelectionClass.md) ã®é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ +- Entity クラスオブジェクト㯠[ORDA Entity 汎用クラス](API/EntityClass.md) ã®é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## クラスã®èª¬æ˜Ž + +

          履歴 + +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ------ | -------------------------------------------------------------------- | +| v18 R5 | データモデルクラス関数ã¯ã€ãƒ‡ãƒ•ォルトã§ã¯ REST ã«å…¬é–‹ã•れã¾ã›ã‚“。 æ–°ã—ã„ `exposed` ãŠã‚ˆã³ `local` キーワード。 | +
          + + +### DataStore クラス + + +4D ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€è‡ªèº«ã® DataStore クラスを `cs` クラスストアã«å…¬é–‹ã—ã¾ã™ã€‚ + +- **親クラス**: 4D.DataStoreImplementation +- **クラスå**: cs.DataStore + +DataStore クラス内ã«ã¯ã€`ds` オブジェクトを介ã—ã¦ä½¿ç”¨ã™ã‚‹é–¢æ•°ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 例題 + +```4d +// cs.DataStore class + +Class extends DataStoreImplementation + +Function getDesc + $0:="社員ã¨ä¼šç¤¾ã‚’公開ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹" +``` + + +ã“ã®é–¢æ•°ã¯æ¬¡ã®ã‚ˆã†ã«ä½¿ãˆã¾ã™: + +```4d +$desc:=ds.getDesc() //"社員ã¨ä¼šç¤¾ã‚’..." +``` + + + +### DataClass クラス + +ORDA ã§å…¬é–‹ã•れるテーブル毎ã«ã€DataClass クラス㌠`cs` クラスストアã«å…¬é–‹ã•れã¾ã™ã€‚ + +- **親クラス**: 4D.DataClass +- **クラスå**: cs.*DataClassName* (*DataClassName* ã¯ãƒ†ãƒ¼ãƒ–ルåã§ã™) +- **例**: cs.Employee + + + +#### 例題 + +```4D +// cs.Company クラス + + +Class extends DataClass + +// åŽç›ŠãŒå¹³å‡ä»¥ä¸Šã®ä¼šç¤¾ã‚’è¿”ã—ã¾ã™ +// Company DataClass ã«ãƒªãƒ¬ãƒ¼ãƒˆã—ã¦ã„るエンティティセレクションを返ã—ã¾ã™ + +Function GetBestOnes() + $sel:=This.query("revenues >= :1";This.all().average("revenues")); + $0:=$sel +``` + +全会社データã‹ã‚‰å¹³å‡ä»¥ä¸Šã®ä¼šç¤¾ãƒ‡ãƒ¼ã‚¿ã‚’ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æŠ½å‡ºã™ã‚‹ã«ã¯æ¬¡ã‚’実行ã—ã¾ã™: + +```4d + var $best : cs.CompanySelection + $best:=ds.Company.GetBestOnes() +``` + +> [Computed attributes](#computed-attributes) are defined in the [Entity Class](#entity-class). + + +#### リモートデータストアã®ä¾‹ + +次㮠*City* カタログをリモートデータストアã¨ã—ã¦å…¬é–‹ã—ã¦ã„ã¾ã™: + +![](assets/en/ORDA/Orda_example.png) + +`City クラス` 㯠API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +```4d +// cs.City クラス + +Class extends DataClass + +Function getCityName() + var $1; $zipcode : Integer + var $zip : 4D.Entity + var $0 : Text + + $zipcode:=$1 + $zip:=ds.ZipCode.get($zipcode) + $0:="" + + If ($zip#Null) + $0:=$zip.city.name + End if +``` + +クライアントã¯ã¾ãšã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹å§‹ã—ã¾ã™: + +```4d +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +``` + +クライアントアプリケーション㯠API を使ã„ã€ãŸã¨ãˆã°ãƒ•ォームã«å…¥åŠ›ã•れãŸéƒµä¾¿ç•ªå· (zipcode) ã«åˆè‡´ã™ã‚‹éƒ½å¸‚ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```4d +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) + +``` + + +### EntitySelection クラス + +ORDA ã§å…¬é–‹ã•れるテーブル毎ã«ã€EntitySelection クラス㌠`cs` クラスストアã«å…¬é–‹ã•れã¾ã™ã€‚ + +- **親クラス**: 4D.EntitySelection +- **クラスå**: *DataClassName*Selection (*DataClassName* ã¯ãƒ†ãƒ¼ãƒ–ルåã§ã™) +- **例**: cs.EmployeeSelection + + +#### 例題 + +```4d +// cs.EmployeeSelection クラス + + +Class extends EntitySelection + +// 給与ãŒå¹³å‡è¶…ãˆã®ç¤¾å“¡ã‚’当該エンティティセレクションã‹ã‚‰æŠ½å‡ºã—ã¾ã™ + +Function withSalaryGreaterThanAverage + C_OBJECT($0) + $0:=This.query("salary > :1";This.average("salary")).orderBy("salary") + +``` + +ä»»æ„ã®ç¤¾å“¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ˆã‚Šã€çµ¦ä¸ŽãŒå¹³å‡ä»¥ä¸Šã®ç¤¾å“¡ã‚’å–å¾—ã™ã‚‹ã«ã¯: + +```4d +$moreThanAvg:=ds.Company.all().employees.withSalaryGreaterThanAverage() +``` + +### Entity クラス + +ORDA ã§å…¬é–‹ã•れるテーブル毎ã«ã€Entity クラス㌠`cs` クラスストアã«å…¬é–‹ã•れã¾ã™ã€‚ + +- **親クラス**: 4D.Entity +- **クラスå**: *DataClassName*Entity (*DataClassName* ã¯ãƒ†ãƒ¼ãƒ–ルåã§ã™) +- **例**: cs.CityEntity + +Entity classes allow you to define **computed attributes** using specific keywords: + +- `Function get` *attributeName* +- `Function set` *attributeName* +- `Function query` *attributeName* +- `Function orderBy` *attributeName* + +For more information, please refer to the [Computed attributes](#computed-attributes) section. + +#### 例題 + +```4d +// cs.CityEntity クラス + +Class extends Entity + +Function getPopulation() + $0:=This.zips.sum("population") + + +Function isBigCity +C_BOOLEAN($0) +// 関数 getPopulation() をクラス内ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ +$0:=This.getPopulation()>50000 +``` + +次ã®ã‚ˆã†ã«é–¢æ•°ã‚’呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: + +```4d +var $cityManager; $city : Object + +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +$city:=$cityManager.City.getCity("Caguas") + +If ($city.isBigCity()) + ALERT($city.name + " ã¯å¤§ããªç”ºã§ã™ã€‚") +End if +``` + +### 定義è¦å‰‡ + +データモデルクラスを作æˆãƒ»ç·¨é›†ã™ã‚‹éš›ã«ã¯æ¬¡ã®ãƒ«ãƒ¼ãƒ«ã«ç•™æ„ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“: + +- 4D ã®ãƒ†ãƒ¼ãƒ–ルåã¯ã€**cs** [クラスストア](Concepts/classes.md#クラスストア) 内ã«ãŠã„ã¦è‡ªå‹•的㫠DataClass クラスåã¨ã—ã¦ä½¿ç”¨ã•れるãŸã‚ã€**cs** åå‰ç©ºé–“ã«ãŠã„ã¦è¡çªãŒã‚ã£ã¦ã¯ãªã‚Šã¾ã›ã‚“。 特ã«: + - 4D テーブル㨠[ユーザークラスå](Concepts/classes.md#クラスå) ã«åŒã˜åå‰ã‚’使用ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 è¡çªãŒèµ·ããŸå ´åˆã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ã®ã‚³ãƒ³ã‚¹ãƒˆãƒ©ã‚¯ã‚¿ãƒ¼ã¯ä½¿ç”¨ä¸å¯ã¨ãªã‚Šã¾ã™ (コンパイラーã«ã‚ˆã‚Šè­¦å‘ŠãŒè¿”ã•れã¾ã™)。 + - 4D テーブルã«äºˆç´„語を使用ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“ (例: "DataClass")。 + +- クラス定義ã®éš›ã€[`Class extends`](Concepts/classes.md#class-extends-classname) ステートメントã«ä½¿ç”¨ã™ã‚‹è¦ªã‚¯ãƒ©ã‚¹ã®åå‰ã¯å®Œå…¨ã«åˆè‡´ã™ã‚‹ã‚‚ã®ã§ãªãã¦ã¯ã„ã‘ã¾ã›ã‚“ (文字ã®å¤§å°ãŒåŒºåˆ¥ã•れã¾ã™)。 ãŸã¨ãˆã°ã€EntitySelection クラスを継承ã™ã‚‹ã«ã¯ `Class extends EntitySelection` ã¨æ›¸ãã¾ã™ã€‚ + +- データモデルクラスオブジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã« `new()` キーワードã¯ä½¿ãˆã¾ã›ã‚“ (エラーãŒè¿”ã•れã¾ã™)。 上述㮠ORDA クラステーブルã«ä¸€è¦§åŒ–ã•れã¦ã„ã‚‹ã€é€šå¸¸ã® [ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã®æ–¹æ³•](#アーキテクãƒãƒ£ãƒ¼) を使ã†å¿…è¦ãŒã‚りã¾ã™ã€‚ + +- **`4D`** [クラスストア](Concepts/classes.md#クラスストア) ã®ãƒã‚¤ãƒ†ã‚£ãƒ–㪠ORDA クラス関数をã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹é–¢æ•°ã§ã‚ªãƒ¼ãƒãƒ¼ãƒ©ã‚¤ãƒ‰ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + +## Computed attributes + + +### æ¦‚è¦ + +A computed attribute is a dataclass attribute with a data type that masks a calculation. [Standard 4D classes](Concepts/classes.md) implement the concept of computed properties with `get` (*getter*) and `set` (*setter*) [accessor functions](Concepts/classes.md#function-get-and-function-set). ORDA dataclass attributes benefit from this feature and extend it with two additional functions: `query` and `orderBy`. + +At the very minimum, a computed attribute requires a `get` function that describes how its value will be calculated. When a *getter* function is supplied for an attribute, 4D does not create the underlying storage space in the datastore but instead substitutes the function's code each time the attribute is accessed. If the attribute is not accessed, the code never executes. + +A computed attribute can also implement a `set` function, which executes whenever a value is assigned to the attribute. The *setter* function describes what to do with the assigned value, usually redirecting it to one or more storage attributes or in some cases other entities. + +Just like storage attributes, computed attributes may be included in **queries**. Normally, when a computed attribute is used in a ORDA query, the attribute is calculated once per entity examined. In many cases this is sufficient. However, computed attributes can implement a `query` function that substitutes other attributes during the query. This allows computed attributes to be queried quickly by redirecting searches to other attributes, including indexed storage attributes. + +Similarly, computed attributes can be included in **sorts**. When a computed attribute is used in a ORDA sort, the attribute is calculated once per entity examined. Just like in queries, this is sufficient in many cases. However, computed attributes can implement an `orderBy` function that substitutes other attributes during the sort, thus increasing performance. + + +### How to define computed attributes + +You create a computed attribute by defining a `get` accessor in the [**entity class**](#entity-class) of the dataclass. The computed attribute will be automatically available in the dataclass attributes and in the entity attributes. + +Other computed attribute functions (`set`, `query`, and `orderBy`) can also be defined in the entity class. They are optional. + +Within computed attribute functions, [`This`](Concepts/classes.md#this) designates the entity. Computed attributes can be used and handled as any dataclass attribute, i.e. they will be processed by [entity class](API/EntityClass.md) or [entity selection class](API/EntitySelectionClass.md) functions. + +> ORDA computed attribute functions can be [**exposed**](#exposed-vs-non-exposed-functions) or not. + + +### `Function get ` + +#### シンタックス + +```4d +Function get ({$event : Object}) -> $result : type +// code +``` +The *getter* function is mandatory to declare the *attributeName* computed attribute. Whenever the *attributeName* is accessed, 4D evaluates the `Function get` code and returns the *$result* value. Since this code becomes part of the attribute’s definition, it need not be referenced again in the application. + +> A computed attribute can use the value of other computed attribute(s). However, only one level is allowed, recursive calls generate errors. + +The *getter* function defines the data type of the computed attribute thanks to the *$result* parameter. The following resulting types are allowed: + +- Scalar (text, boolean, date, number) +- オブジェクト +- Image +- BLOB +- Entity class (i.e. cs.EmployeeEntity) +- Entity selection class (i.e. cs.EmployeeSelection) + +The *$event* parameter contains the following properties: + +| プロパティ | タイプ | 説明 | +| ------------- | ----- | -------------------------------------------------------------------------- | +| attributeName | テキスト | Computed attribute name | +| dataClassName | テキスト | Dataclass name | +| kind | テキスト | "get" | +| result | ãƒãƒªã‚¢ãƒ³ãƒˆ | Add this property with Null value if you want the attribute to return Null | + + +#### 例題 + +- *fullName* computed attribute: + +```4d +Function get fullName($event : Object)-> $result : Text + + If (This.firstName=Null) & (This.lastName=Null) + $event.result:=Null //only way to return a null value + Else + If (This.firstName=Null) + $result:=This.lastName + Else + If (This.lastname=Null) + $result:=This.firstName + Else + $result:=This.firstName+" "+This.lastName + End if + End if +``` + +- A computed attribute can be based upon a related attribute: + +```4d +Function get bigBoss($event : Object)-> $result: cs.EmployeeEntity + If (This.manager.manager=Null) + $event.result:=Null + Else + $result:=This.manager.manager + End if + +``` + +- A computed attribute can be based upon related attributes: + +```4d +Function get coWorkers($event : Object)-> $result: cs.EmployeeSelection + If (This.manager.manager=Null) + $result:=ds.Employee.newSelection() + Else + $result:=This.manager.directReports.minus(this) + End if +``` + +### `Function set ` + +#### シンタックス + +```4d +Function set ($value : Variant {; $event : Object}) +// code +``` + +The *setter* function executes whenever a value is assigned to the attribute. This function usually processes the input value(s) and the result is dispatched between one or more other attributes. + +The *$value* parameter receives the value assigned to the attribute. + +The *$event* parameter contains the following properties: + +| プロパティ | タイプ | 説明 | +| ------------- | ----- | --------------------------------------------- | +| attributeName | テキスト | Computed attribute name | +| dataClassName | テキスト | Dataclass name | +| kind | テキスト | "set" | +| value | ãƒãƒªã‚¢ãƒ³ãƒˆ | Value to be handled by the computed attribute | + +#### 例題 + +```4d +Function set fullName($value : Text; $event : Object) + var $vals : Collection + $vals:=Split string($value; " "; sk ignore empty strings) + If ($vals.length>0) + This.firstName:=$vals[0] + End if + If ($vals.length>1) + This.lastName:=$vals[1] + End if + End if +``` + + + +### `Function query ` + +#### シンタックス + +```4d +Function query ($event : Object) +Function query ($event : Object) -> $result : Text +Function query ($event : Object) -> $result : Object +// code +``` + +This function supports three syntaxes: + +- With the first syntax, you handle the whole query through the `$event.result` object property. +- With the second and third syntaxes, the function returns a value in *$result*: + - If *$result* is a Text, it must be a valid query string + - If *$result* is an Object, it must contain two properties: + + | プロパティ | タイプ | 説明 | + | ------------------ | ------ | --------------------------------------------------- | + | $result.query | テキスト | Valid query string with placeholders (:1, :2, etc.) | + | $result.parameters | コレクション | values for placeholders | + +The `query` function executes whenever a query using the computed attribute is launched. It is useful to customize and optimize queries by relying on indexed attributes. When the `query` function is not implemented for a computed attribute, the search is always sequential (based upon the evaluation of all values using the `get ` function). + +> The following features are not supported: - calling a `query` function on computed attributes of type Entity class or Entity selection class - using the `order by` keyword in the resulting query string. + +The *$event* parameter contains the following properties: + +| プロパティ | タイプ | 説明 | +| ------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| attributeName | テキスト | Computed attribute name | +| dataClassName | テキスト | Dataclass name | +| kind | テキスト | "query" | +| value | ãƒãƒªã‚¢ãƒ³ãƒˆ | Value to be handled by the computed attribute | +| operator | テキスト | Query operator (see also the [`query` class function](API/DataClassClass.md#query)). ã¨ã‚Šã†ã‚‹å€¤:
        • == (equal to, @ is wildcard)
        • === (equal to, @ is not wildcard)
        • != (not equal to, @ is wildcard)
        • !== (not equal to, @ is not wildcard)
        • < (less than)
        • <= (less than or equal to)
        • > (greater than)
        • >= (greater than or equal to)
        • IN (included in)
        • %% (contains keyword)
        • | +| result | ãƒãƒªã‚¢ãƒ³ãƒˆ | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default query (always sequential for computed attributes). | + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + +#### 例題 + +- Query on the *fullName* computed attribute. The result is returned as Text (query string). + +```4d +Function query fullName($event : Object)-> $result : Text + var $vals : Collection + var $oper; $result : Text + + $vals:=Split string($event.value; " "; sk ignore empty strings) + $oper:=$event.operator + $result:="" + + If (($oper="==") | ($oper="===")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" and lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName == '' and lastName == ''" + End if + + Else + If (($oper="!=") | ($oper="!==")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" or lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName != '' or lastName != ''" + End if + Else + $result:="firstName "+$oper+" '"+$vals[0]+"'" + End if + + End if + +``` + +Calling code, for example: + +```4d +$emps:=ds.Employee.query("fullName = :1"; "Flora Pionsin") +``` + +- This function handles queries on the *age* computed attribute and returns an object with parameters: + +```4d +Function query age($event : Object)->$result : Object + + var $operator : Text + var $age : Integer + var $_ages : Collection + + $operator:=$event.operator + + If ($operator="in") + + Case of + : (Value type($event.value)=Is collection) + $_ages:=$event.value + + : (Value type($event.value)=Is text) + $_ages:=JSON Parse($event.value) + End case + + Else + + $age:=Num($event.value) // integer + $d1:=Add to date(Current date; -$age-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + $parameters:=New collection($d1; $d2) + End if + + Case of + + : ($operator="==") + $query:="birthday > :1 and birthday <= :2" // after d1 and before or egal d2 + + : ($operator=">=") + $query:="birthday <= :2" + + //... other operators + + : ($operator="in") + + If ($_ages.length<=3) + + $parameters:=New collection + $phIndex:=1 + + $query:="" + For ($i; 0; $_ages.length-1) + + $ph1:=":"+String($phIndex) //-> ":1" + $ph2:=":"+String($phIndex+1) //-> ":2" + + $phIndex:=$phIndex+2 // next will be :3 :4, :5 :6, etc. + + $d1:=Add to date(Current date; -$_ages[$i]-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + + $parameters.push($d1) + $parameters.push($d2) + + If ($i>0) + $query:=$query+" or " + End if + $query:=$query+"(birthday > "+$ph1+" and birthday <= "+$ph2+")" // > :1 and <= :2 + End for + + Else // let 4d do the job !!! + $event.result:=Null + End if + + Else + $event.result:=Null + End case + + + If (Undefined($event.result)) + $result:=New object + $result.query:=$query + $result.parameters:=$parameters + End if + +``` + +### `Function orderBy ` + +#### シンタックス + +```4d +Function orderBy ($event : Object) +Function orderBy ($event : Object)-> $result : Text + +// code +``` + +The `orderBy` function executes whenever the computed attribute needs to be ordered. It allows sorting the computed attribute. For example, you can sort *fullName* on first names then last names, or conversely. When the `orderBy` function is not implemented for a computed attribute, the sort is always sequential (based upon the evaluation of all values using the `get ` function). + +> Calling an `orderBy` function on computed attributes of type Entity class or Entity selection class **is not supported**. + +The *$event* parameter contains the following properties: + +| プロパティ | タイプ | 説明 | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| attributeName | テキスト | Computed attribute name | +| dataClassName | テキスト | Dataclass name | +| kind | テキスト | "orderBy" | +| value | ãƒãƒªã‚¢ãƒ³ãƒˆ | Value to be handled by the computed attribute | +| descending | Booelan | `true` for descending order, `false` for ascending order | +| result | ãƒãƒªã‚¢ãƒ³ãƒˆ | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default sort . | + +You can return the `orderBy` string either in the `$event.result` object property or in the *$result* function result. + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + + +#### 例題 + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + If ($event.descending=True) + $result:="firstName desc, lastName desc" + Else + $result:="firstName, lastName" + End if +``` + + +## 公開vséžå…¬é–‹é–¢æ•° + +セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã¯ãƒ‡ãƒ•ォルトã§ã™ã¹ã¦ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾ã— **éžå…¬é–‹** (ã¤ã¾ã‚Šãƒ—ライベート) ã«è¨­å®šã•れã¦ã„ã¾ã™ã€‚ + +リモートリクエストã«ã¯æ¬¡ã®ã‚‚ã®ãŒå«ã¾ã‚Œã¾ã™: + +- `Open datastore` ã«ã‚ˆã£ã¦æŽ¥ç¶šã•れãŸãƒªãƒ¢ãƒ¼ãƒˆã® 4DアプリケーションãŒé€ä¿¡ã™ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆ +- RESTリクエスト + +> 通常㮠4Dクライアント/サーãƒãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯å½±éŸ¿ã•れã¾ã›ã‚“。 ã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã«ãŠã„ã¦ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã¯å¸¸ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +公開ã•れã¦ã„ãªã„関数ã¯ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ãƒ—リケーションã§åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ããšã€RESTリクエストã«ã‚ˆã‚‹ã‚ªãƒ–ジェクトインスタンスã«å¯¾ã—ã¦å‘¼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾ã›ã‚“。 リモートアプリケーションãŒéžå…¬é–‹é–¢æ•°ã‚’アクセスã—よã†ã¨ã™ã‚‹ã¨ã€"-10729 (未知ã®ãƒ¡ãƒ³ãƒãƒ¼æ©Ÿèƒ½ã§ã™)" エラーãŒè¿”ã•れã¾ã™ã€‚ + +リモートリクエストã«ã‚ˆã‚‹å‘¼ã³å‡ºã—を許å¯ã™ã‚‹ã«ã¯ã€`exposed` キーワードを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’明示的ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯æ¬¡ã®é€šã‚Šã§ã™: + +```4d +// 公開関数ã®å®£è¨€ +exposed Function +``` + +> `exposed` キーワードã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã«å¯¾ã—ã¦ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ [通常ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹](Concepts/classes.md) 関数ã«å¯¾ã—ã¦ä½¿ã£ãŸå ´åˆã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã¯ç„¡è¦–ã•れã€ã‚³ãƒ³ãƒ‘イラーã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +### 例題 + +公開ã•れãŸé–¢æ•°ã«ã‚ˆã£ã¦ã€DataClass クラスã®ãƒ—ライベート関数を呼ã³å‡ºã—ã¾ã™: + +```4d +Class extends DataClass + +// 公開関数 +exposed Function registerNewStudent($student : Object) -> $status : Object + +var $entity : cs.StudentsEntity + +$entity:=ds.Students.new() +$entity.fromObject($student) +$entity.school:=This.query("name=:1"; $student.schoolName).first() +$entity.serialNumber:=This.computeSerialNumber() +$status:=$entity.save() + +// éžå…¬é–‹ (プライベート) 関数 +Function computeIDNumber()-> $id : Integer +// æ–°è¦ID番å·ã‚’算出ã—ã¾ã™ +$id:=... + +``` + +呼ã³å‡ºã—å…ƒã®ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®é€šã‚Šã§ã™: + +```4d +var $remoteDS; $student; $status : Object +var $id : Integer + +$remoteDS:=Open datastore(New object("hostname"; "127.0.0.1:8044"); "students") +$student:=New object("firstname"; "Mary"; "lastname"; "Smith"; "schoolName"; "Math school") + +$status:=$remoteDS.Schools.registerNewStudent($student) // OK +$id:=$remoteDS.Schools.computeIDNumber() // エラー (未知ã®ãƒ¡ãƒ³ãƒãƒ¼æ©Ÿèƒ½ã§ã™) +``` + + +## ローカル関数 + +クライアント/サーãƒãƒ¼ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã§ã¯ãƒ‡ãƒ•ォルトã§ã€ORDA データモデル関数㯠**サーãƒãƒ¼ä¸Šã§** 実行ã•れã¾ã™ã€‚ 関数リクエストã¨ãã®çµæžœã ã‘ãŒé€šä¿¡ã•れるãŸã‚ã€é€šå¸¸ã¯ãƒ™ã‚¹ãƒˆãƒ‘ãƒ•ã‚©ãƒ¼ãƒžãƒ³ã‚¹ãŒæä¾›ã•れã¾ã™ã€‚ + +ã—ã‹ã—ãªãŒã‚‰ã€çжæ³ã«ã‚ˆã£ã¦ã¯ãã®é–¢æ•°ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§å®Œçµã™ã‚‹ã‚‚ã®ã‹ã‚‚ã—れã¾ã›ã‚“ (ãŸã¨ãˆã°ã€ã™ã§ã«ãƒ­ãƒ¼ã‚«ãƒ«ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ã‚るデータを処ç†ã™ã‚‹å ´åˆãªã©)。 ãã®ã‚ˆã†ãªå ´åˆã«ã¯ã€`local` キーワードを使ã£ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ãŠã“ãªã‚ãªã„よã†ã«ã—ã€ã‚¢ãƒ—リケーションã®ãƒ‘フォーマンスをå‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯æ¬¡ã®é€šã‚Šã§ã™: + +```4d +// クライアント/サーãƒãƒ¼ã«ãŠã„ã¦ãƒ­ãƒ¼ã‚«ãƒ«å®Ÿè¡Œã™ã‚‹é–¢æ•°ã®å®£è¨€ +local Function +``` + +ã“ã®ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã‚’使ã†ã¨ã€é–¢æ•°ã¯å¸¸ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µã‚¤ãƒ‰ã§å®Ÿè¡Œã•れã¾ã™ã€‚ + +> `local` キーワードã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°ã«å¯¾ã—ã¦ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ [通常ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹](Concepts/classes.md) 関数ã«å¯¾ã—ã¦ä½¿ã£ãŸå ´åˆã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã¯ç„¡è¦–ã•れã€ã‚³ãƒ³ãƒ‘イラーã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ + +最終的ã«ã‚µãƒ¼ãƒãƒ¼ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒå¿…è¦ã«ãªã£ã¦ã‚‚ (ORDAã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒæœ‰åŠ¹æœŸé™åˆ‡ã‚Œã«ãªã£ãŸå ´åˆãªã©) 関数ã¯å‹•作ã—ã¾ã™ã€‚ ã‚‚ã£ã¨ã‚‚ã€ãれã§ã¯ãƒ­ãƒ¼ã‚«ãƒ«å®Ÿè¡Œã«ã‚ˆã‚‹ãƒ‘フォーマンスã®å‘上ã¯è¦‹è¾¼ã‚ãªã„ãŸã‚ã€ãƒ­ãƒ¼ã‚«ãƒ«é–¢æ•°ãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã®ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãªã„ã“ã¨ã‚’確èªã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ サーãƒãƒ¼ã«å¯¾ã—ã¦è¤‡æ•°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ãŠã“ãªã†ãƒ­ãƒ¼ã‚«ãƒ«é–¢æ•°ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¦çµæžœã ã‘ã‚’è¿”ã™é–¢æ•°ã‚ˆã‚Šã‚‚éžåŠ¹çŽ‡çš„ã§ã™ã€‚ ãŸã¨ãˆã°ã€Schools Entityã‚¯ãƒ©ã‚¹ã®æ¬¡ã®é–¢æ•°ã‚’考ãˆã¾ã™: + +```4d +// 2000年以é™ã®ç”Ÿã¾ã‚Œã®ç”Ÿå¾’を検索ã—ã¾ã™ +// local キーワードをé©åˆ‡ã«ä½¿ç”¨ã—ã¦ã„ãªã„例ã§ã™ +local Function getYoungest + var $0 : Object + $0:=This.students.query("birthDate >= :1"; !2000-01-01!).orderBy("birthDate desc").slice(0; 5) +``` +- `local` キーワードを **使ã‚ãªã„** å ´åˆã€1ã¤ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§çµæžœãŒå¾—られã¾ã™ã€‚ +- `local` キーワードを **使ã†** å ´åˆã€4ã¤ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒå¿…è¦ã«ãªã‚Šã¾ã™: Schools エンティティ㮠students エンティティセレクションã®å–å¾—ã€`query()` ã®å®Ÿè¡Œã€`orderBy()` ã®å®Ÿè¡Œã€`slice()` ã®å®Ÿè¡Œã€‚ ã“ã®ä¾‹ã§ã¯ã€`local` キーワードを使用ã™ã‚‹ã®ã¯é©åˆ‡ã§ã¯ã‚りã¾ã›ã‚“。 + + +### 例題 + +#### å¹´é½¢ã®è¨ˆç®— + +*birthDate* (生年月日) 属性をæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚ã‚‹å ´åˆã«ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹å†…ã§å‘¼ã³å‡ºã™ãŸã‚ã® `age()` 関数を定義ã—ã¾ã™ã€‚ ã“ã®é–¢æ•°ã‚’クライアントサイドã§å®Ÿè¡Œã™ã‚‹ã“ã¨ã§ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã®å„行ãŒã‚µãƒ¼ãƒãƒ¼ã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’生æˆã™ã‚‹ã®ã‚’防ãŽã¾ã™ã€‚ + +*StudentsEntity* クラス: + +```4d +Class extends Entity + +local Function age() -> $age: Variant + +If (This.birthDate#!00-00-00!) + $age:=Year of(Current date)-Year of(This.birthDate) +Else + $age:=Null +End if +``` + +#### 属性ã®ãƒã‚§ãƒƒã‚¯ + +クライアントã«ãƒ­ãƒ¼ãƒ‰ã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦æ›´æ–°ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§ã«ã¤ã„ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã¸ä¿å­˜ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’出ã™ã¾ãˆã«ã€ãれらã®ä¸€è²«æ€§ã‚’検査ã—ã¾ã™ã€‚ + +*StudentsEntity* クラスã®ãƒ­ãƒ¼ã‚«ãƒ«é–¢æ•° `checkData()` ã¯ç”Ÿå¾’ã®å¹´é½¢ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™: + +```4d +Class extends Entity + +local Function checkData() -> $status : Object + +$status:=New object("success"; True) +Case of + : (This.age()=Null) + $status.success:=False + $status.statusText:="生年月日ãŒå…¥åŠ›ã•れã¦ã„ã¾ã›ã‚“。" + + :((This.age() <15) | (This.age()>30) ) + $status.success:=False + $status.statusText:="生徒ã®å¹´é½¢ã¯ 15 〜 30 ã®ç¯„囲ã§å…¥åŠ›ã—ã¦ãã ã•ã„。ã“ã®ç”Ÿå¾’ã®å¹´é½¢ã¯ "+String(This.age()+"ã§ã™ã€‚") +End case +``` + +呼ã³å‡ºã—å…ƒã®ã‚³ãƒ¼ãƒ‰: + +```4d +var $status : Object + +// Form.student ã¯å…¨å±žæ€§ã¨ã¨ã‚‚ã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ãŠã‚Šã€ãƒ•ã‚©ãƒ¼ãƒ ä¸Šã§æ›´æ–°ã•れã¾ã—㟠+$status:=Form.student.checkData() +If ($status.success) + $status:=Form.student.save() // サーãƒãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ +End if +``` + + + +## データモデルクラスã®ç®¡ç† + + +### クラスファイル + +ORDA データモデルユーザークラスã¯ã€ã‚¯ãƒ©ã‚¹ã¨åŒã˜åç§°ã® .4dm ファイルを [通常ã®ã‚¯ãƒ©ã‚¹ãƒ•ァイルã¨åŒã˜å ´æ‰€](Concepts/classes.md#クラスファイル) (ã¤ã¾ã‚Šã€Project フォルダー内㮠`/Sources/Classes` フォルダー) ã«è¿½åŠ ã™ã‚‹ã“ã¨ã§å®šç¾©ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€`Utilities` データクラスã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚¯ãƒ©ã‚¹ã¯ã€`UtilitiesEntity.4dm` ファイルã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ + + +### クラスã®ä½œæˆ + +å„データモデルオブジェクトã«é–¢ã‚るクラスã¯ã€4D ã«ã‚ˆã£ã¦ã‚らã‹ã˜ã‚自動的ã«ãƒ¡ãƒ¢ãƒªå†…ã«ä½œæˆã•れã¾ã™ã€‚ + +![](assets/en/ORDA/ORDA_Classes-3.png) + +> 空㮠ORDA クラスã¯ã€ãƒ‡ãƒ•ォルトã§ã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«è¡¨ç¤ºã•れã¾ã›ã‚“。 表示ã™ã‚‹ã«ã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ã‚ªãƒ—ションメニューより **データクラスを全ã¦è¡¨ç¤º** ã‚’é¸æŠžã—ã¾ã™: ![](assets/en/ORDA/showClass.png) + +ORDA ユーザークラスã¯é€šå¸¸ã®ã‚¯ãƒ©ã‚¹ã¨ã¯ç•°ãªã‚‹ã‚¢ã‚¤ã‚³ãƒ³ã§è¡¨ã•れã¾ã™ã€‚ 空ã®ã‚¯ãƒ©ã‚¹ã¯è–„ã表示ã•れã¾ã™: + +![](assets/en/ORDA/classORDA2.png) + +ORDA クラスファイルを作æˆã™ã‚‹ã«ã¯ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーã§ä»»æ„ã®ã‚¯ãƒ©ã‚¹ã‚’ダブルクリックã—ã¾ã™ã€‚ 4D ã¯ã‚¯ãƒ©ã‚¹ãƒ•ァイルを作æˆã—ã€`extends` ステートメントを自動ã§è¿½åŠ ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€Entity クラスを継承ã™ã‚‹ã‚¯ãƒ©ã‚¹ã®å ´åˆã¯: + +``` +Class extends Entity +``` + +定義ã•れãŸã‚¯ãƒ©ã‚¹ã¯ã‚¨ã‚¯ã‚¹ãƒ—ãƒ­ãƒ¼ãƒ©ãƒ¼å†…ã§æ¿ƒã表示ã•れã¾ã™ã€‚ + + +### クラスã®ç·¨é›† + +定義ã•れ㟠ORDA クラスファイルを 4D メソッドエディターã§é–‹ãã«ã¯ã€ORDA クラスåã‚’é¸æŠžã—ã¦ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ã‚ªãƒ–ションメニューã€ã¾ãŸã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **編集...** を使用ã™ã‚‹ã‹ã€ORDA クラスåをダブルクリックã—ã¾ã™: + +![](assets/en/ORDA/classORDA4.png) + +ローカルデータストア (`ds`) ã«åŸºã¥ã„㟠ORDA クラスã®å ´åˆã«ã¯ã€4D ストラクãƒãƒ£ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã‚‰ã‚‚直接クラスコードã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™: + +![](assets/en/ORDA/classORDA5.png) + + +### メソッドエディター + +4D メソッドエディターã«ãŠã„ã¦ã€ORDA クラス型ã¨ã—ã¦å®šç¾©ã•れãŸå¤‰æ•°ã¯ã€è‡ªå‹•補完機能ã®å¯¾è±¡ã¨ãªã‚Šã¾ã™ã€‚ Entity クラス変数ã®ä¾‹ã§ã™: + +![](assets/en/ORDA/AutoCompletionEntity.png) + diff --git a/website/translated_docs/ja/ORDA/overview.md b/website/translated_docs/ja/ORDA/overview.md new file mode 100644 index 00000000000000..38bd97ef0e7d82 --- /dev/null +++ b/website/translated_docs/ja/ORDA/overview.md @@ -0,0 +1,34 @@ +--- +id: overview +title: ORDAã¨ã¯ä½•ã‹ +--- + +ORDA ã¨ã¯ **オブジェクト・リレーショナル・データアクセス (Object Relational Data Access)** ã®æ„味ã§ã™ã€‚ ã“れã¯ã€ã‚ªãƒ–ジェクトを介ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ¢ãƒ‡ãƒ«ã¨ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹é©æ–°çš„ãªãƒ†ã‚¯ãƒŽãƒ­ã‚¸ãƒ¼ã§ã™ã€‚ + +ã“ã®æ¦‚念ã«ã¯ã€[レイジーローディング](glossary.md#レイジーローディング) ã¨åˆã‚ã›ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ãŒæš—示的ã«ç¹”り込ã¾ã‚Œã¦ãŠã‚Šã€ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã¯ã‚りãŒã¡ãªãƒ‡ãƒ¼ã‚¿ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„転é€ã®ç…©ã‚ã—ã•ã‹ã‚‰è§£æ”¾ã•れã¾ã™ã€‚ + +ORDA ã§ã¯ã€[データストア](dsMapping.md#データストア) ã¨å‘¼ã°ã‚Œã‚‹æŠ½è±¡åŒ–レイヤーを通ã—ã¦ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã™ã€‚ データストアã¨ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¢ãƒ‡ãƒ«ã¨ãƒ‡ãƒ¼ã‚¿ã¸ã®ã€ã‚ªãƒ–ジェクトやクラスを介ã—ãŸã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースをæä¾›ã™ã‚‹ã‚ªãƒ–ジェクトã§ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ†ãƒ¼ãƒ–ル㯠[データクラス](dsMapping.md#データクラス) オブジェクトã«ãƒžãƒƒãƒ—ã•れã€ãƒ•ィールドã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã® [属性](dsMapping.md#属性)ã§ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ [エンティティ](dsMapping.md#entity) ãŠã‚ˆã³ [エンティティセレクション](dsMapping.md#エンティティセレクション) を介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã•れã¾ã™ã€‚ + + +## ORDAを使ã†ç†ç”± + +テーブルã€ãƒ•ィールドã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¨ã—ã¦æƒ…報を表示ã™ã‚‹ä»£ã‚りã«ã€ORDA ã§ã¯ã€ã‚ˆã‚Šæ­£ç¢ºã«ç¾å®Ÿä¸–ç•Œã®æ¦‚念ã«ãƒ‡ãƒ¼ã‚¿ã‚’マップã™ã‚‹ã€åˆ¥ã®ã‚¢ãƒ—ローãƒã‚’使用ã—ã¾ã™ã€‚ + +効率ã«å½±éŸ¿ã™ã‚‹ã“ã¨ãªãã€ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’éžæ­£è¦åŒ–ã™ã‚‹èƒ½åŠ›ã‚’æƒ³åƒã—ã¦ã¿ã¦ãã ã•ã„。 リレーショナルãªã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’完全ã«ç†è§£ã™ã‚‹å¿…è¦ãŒãªãã€å˜ç´”ã‹ã¤åˆ†ã‹ã‚Šã‚„ã™ãデータを使用ã§ãるよã†ã€ã‚¢ãƒ—リケーション内ã®ã™ã¹ã¦ã®ãƒ“ジãƒã‚¹ã‚ªãƒ–ジェクトを定義ã™ã‚‹ã“ã¨ã‚’想åƒã—ã¦ã¿ã¦ãã ã•ã„。 + +ORDA ã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã§ã¯ã€å˜ä¸€ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã ã‘ã§æ—§æ¥ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒŠãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ†ãƒ¼ãƒ–ルを構æˆã—ã¦ã„ãŸè¦ç´ ã®ã™ã¹ã¦ã‚’å–り込むã“ã¨ãŒã§ãã‚‹ã†ãˆã«ã€ãƒªãƒ¬ãƒ¼ãƒˆã•れãŸè¦ªã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å€¤ã‚„ã€ãƒªãƒ¬ãƒ¼ãƒˆã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¸ã®ç›´æŽ¥å‚ç…§ã‚‚å«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +クエリã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¨å‘¼ã°ã‚Œã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã€ã“れ㯠SQL ã®ã‚¯ã‚¨ãƒªã®è¡Œã‚»ãƒƒãƒˆã®å½¹å‰²ã‚’æžœãŸã—ã¾ã™ã€‚ é•ã„ã¯ã€å„エンティティã¯è‡ªèº«ãŒã©ã“ã«æ‰€å±žã™ã‚‹ã‹ã‚’ "知ã£ã¦ã„ã‚‹" ã†ãˆã€ä»–ã®ã™ã¹ã¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¨ã®ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ "ç†è§£ã—ã¦ã„ã‚‹" ã¨ã„ã†ã“ã¨ã§ã™ã€‚ ã“れã¯ã¤ã¾ã‚Šã€ã‚¯ã‚¨ãƒªå†…ã«ãŠã„ã¦æ§˜ã€…ãªæƒ…å ±ã®æ–­ç‰‡ã‚’ã©ã®ã‚ˆã†ã«ãƒªãƒ¬ãƒ¼ãƒˆã•ã›ãŸã‚‰ã„ã„ã‹ã€ã‚ã‚‹ã„ã¯ã€å¤‰æ›´ã•れãŸå€¤ã‚’リレーショナルストラクãƒãƒ£ãƒ¼ã«æ›¸ã込む際ã«ã©ã®ã‚ˆã†ã«ãれを更新ã—ãŸã‚‰ã„ã„ã‹ã‚’ã€ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーã¯èª¬æ˜Žã™ã‚‹å¿…è¦ãŒãªã„ã¨ã„ã†ã“ã¨ã§ã™ã€‚ + +ã“れã«åŠ ãˆã¦ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚ã‚‹ã„ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãªã©ã® ORDA オブジェクトã¯ã€ãƒªã‚¹ãƒˆãƒœãƒƒã‚¯ã‚¹ã‚„変数ãªã©ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース (UI) オブジェクトã«ç°¡å˜ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `This` ã‚„ `Form` コマンドã¨ã„ã£ãŸå¼·åŠ›ãªæ©Ÿèƒ½ã¨çµ„ã¿åˆã‚ã›ã‚‹ã“ã¨ã§ã€ã‚ªãƒ–ジェクトやコレクションã«åŸºã¥ã„ãŸã€ãƒ¢ãƒ€ãƒ³ã§ãƒ¢ã‚¸ãƒ¥ãƒ©ãƒ¼ãªã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースをビルドã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ + +## ORDAã®ä½¿ã„æ–¹ + +原則ã¨ã—ã¦ã€ORDA ã¯ã‚ªãƒ–ジェクト型を扱ã„ã¾ã™ã€‚ ORDA ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢è‡ªèº«ã‚’å«ã‚ã™ã¹ã¦ã®ä¸»è¦ãªæ¦‚念ã¯ã€ã‚ªãƒ–ジェクトを通ã—ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ 4D ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯è‡ªå‹•的㫠[4D ストラクãƒãƒ£ãƒ¼ã«ãƒžãƒƒãƒ”ングã•れã¾ã™](dsMapping.md)。 + +ORDA ã®ã‚ªãƒ–ジェクト㯠4D ã®æ¨™æº–オブジェクトã¨åŒæ§˜ã«æ‰±ãˆã¾ã™ãŒã€ã©ã‚Œã ã‘ã§ãªã特定ã®ãƒ—ロパティãŠã‚ˆã³ãƒ¡ã‚½ãƒƒãƒ‰ã®æ©æµã‚’自動的ã«äº«å—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ORDA オブジェクト㯠4D メソッドã«ã‚ˆã£ã¦å¿…è¦ãªã¨ãã«ä½œæˆãƒ»ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•れã¾ã™ (別途作æˆã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“)。 ã¾ãŸã€ORDA データモデルオブジェクトã¯ã€[カスタム関数ãŒè¿½åŠ å¯èƒ½ãªã‚¯ãƒ©ã‚¹](ordaClasses.md) ã¨ã‚‚関連ã¥ã‘られã¾ã™ã€‚ + + + diff --git a/website/translated_docs/ja/ORDA/quickTour.md b/website/translated_docs/ja/ORDA/quickTour.md new file mode 100644 index 00000000000000..6ad198e95e5330 --- /dev/null +++ b/website/translated_docs/ja/ORDA/quickTour.md @@ -0,0 +1,194 @@ +--- +id: quickTour +title: ORDA ã®æ¦‚è¦ +--- + +ORDA ã¯ã‚ªãƒ–ジェクトベースã§ã‚ã‚‹ãŸã‚ã€ORDA を使ã†ã«ã¯ã‚ªãƒ–ジェクト指å‘プログラミングã®åŸºæœ¬çš„ãªçŸ¥è­˜ãŒå¿…è¦ã§ã™ã€‚ + +## データストアã®èª¬æ˜Ž + +4Dデータベースストラクãƒãƒ£ãƒ¼ãŒ [ORDA ã®å‰ææ¡ä»¶](overview.md#orda-prerequisites) ã«æº–æ‹ ã—ã¦ã„れã°ã€ORDA ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã¯è‡ªå‹•çš„ã«ã“れã«åŸºã¥ã„ã¦æ©Ÿèƒ½ã—ã¾ã™ã€‚ + +ã“ã®ä¾‹é¡Œã§ã¯ã€ä»¥ä¸‹ã®å˜ç´”㪠4Dデータベースストラクãƒãƒ£ãƒ¼ã‚’使用ã—ã¾ã™: + +![](assets/en/ORDA/struc.png) + +データストアã¨ã—ã¦å…¬é–‹ã•れã¦ã„ã‚‹ã‚‚ã®ã‚’知るãŸã‚ã«ã€æ–°ã—ã„プロジェクトメソッドを作æˆã—ã€ä»¥ä¸‹ã®è¡Œã‚’記述ã—ã¾ã™: + +```code4d +TRACE +``` + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã™ã‚‹ã¨ã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ å¼ã‚’挿入ã™ã‚‹ãŸã‚ã«å¼ã‚¨ãƒªã‚¢ã‚’ダブルクリックã—ã€`ds` ã¨å…¥åŠ›ã—ã¾ã™ã€‚ ã“れã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ オブジェクトを展開ã™ã‚‹ã¨ã€`ds` オブジェクトã®ãƒ—ロパティã¨ã—ã¦ãƒ†ãƒ¼ãƒ–ルã¨ãƒ•ィールド㌠ORDA ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å…¬é–‹ã•れるã“ã¨ãŒã‚ã‹ã‚Šã¾ã™ã€‚ + +![](assets/en/ORDA/debug1.png) + +ã“れã¯ã¤ã¾ã‚Šã€ãŸã¨ãˆã° [Company]テーブル㮠cityフィールドをå‚ç…§ã™ã‚‹å¿…è¦ãŒã‚ã‚‹å ´åˆã€ORDA ã§ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ãã ã‘事足りã¾ã™: + +```code4d +ds.Company.city // 都市ã®åå‰ã‚’è¿”ã—ã¾ã™ +``` + +> ORDA ã®ä¸–界ã§ã¯ï¼Œds.Company 㯠**データクラス** ã§ã™ã€‚ ds.Company.city 㯠**属性** ã§ã™ã€‚ + +> ORDA ã¯å¤§æ–‡å­—ã¨å°æ–‡å­—を区別ã—ã¾ã™ã€‚ ` ds.company.city` ㌠ds.Company.city 属性をå‚ç…§ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 + +ã¾ãŸã€ds.Company データクラス㫠`hires` プロパティãŒè¿½åŠ ã•れã¦ã„ã‚‹ã“ã¨ã«ãŠæ°—ã¥ãã§ã—ょã†ã‹ã€‚ ã“れã¯ãƒ•ィールドã«å¯¾å¿œã—ãŸå±žæ€§ã§ã¯ã‚りã¾ã›ã‚“。 `hires` ã¯ã€å®Ÿéš›ã«ã¯ Company 㨠Employee ã®é–“ã® *1対N* リレーションã®åå‰ã§ã™: + +![](assets/en/ORDA/struc2s.png) *インスペクターã§å®šç¾©ã•れã¦ã„るリレーションã®åå‰* + +ã¤ã¾ã‚Šã€ã‚る会社ã§åƒã従業員ã®ãƒªã‚¹ãƒˆã«ã‚¢ã‚¯ã‚»ã‚¹ã—ãŸã„ã¨ãã€ORDA ã§ã¯æ¬¡ã®ã‚ˆã†ã«æ›¸ãã¾ã™: + +```code4d +ds.Company.hires // 従業員ã®ãƒªã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ +``` + +ã—ã‹ã—ã€æ€¥ãŽã™ãŽã¦ã¯ã„ã‘ã¾ã›ã‚“。 ã¾ãšã¯ã€ORDA ã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«ãƒ‡ãƒ¼ã‚¿ã‚’記録ã™ã‚‹æ–¹æ³•を見ã¦ã„ãã¾ã—ょã†ã€‚ + + +## データã®è¿½åŠ  + +ORDA ã§ã¯ã€`new()` コマンドを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> ORDA ã®ä¸–界ã§ã¯ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ã¯ **エンティティ** ã§ã‚りã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãれ自体ãŒã‚ªãƒ–ジェクトã§ã™ã€‚ 特定ã®ã‚ªãƒ–ジェクトã«ä»˜éšã™ã‚‹ã‚³ãƒžãƒ³ãƒ‰ã‚’ **メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰** ã¨å‘¼ã³ã¾ã™ã€‚ + +```code4d +$entity:=ds.Company.new() // Company データクラス㫠+// æ–°ã—ã„エンティティå‚照を作æˆã—〠+// ãれを $entity 変数ã«ä»£å…¥ã—ã¾ã™ +``` + +æ–°ã—ã„エンティティオブジェクトã«ã¯ã€ãã®è¦ªãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã™ã¹ã¦ã®å±žæ€§ã® "コピー" ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã®ã§ã€ãれらã«å€¤ã‚’代入ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +```code4d +$entity.name:="ACME, inc." +$entity.city:="London" +//$entity.ID ã¯è‡ªå‹•çš„ã«è¨­å®šã•れã¾ã™ +``` + +今ã®ã¨ã“ã‚ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ¡ãƒ¢ãƒªä¸Šã«ã—ã‹å­˜åœ¨ã—ã¾ã›ã‚“。 データファイルã«ä¿å­˜ã™ã‚‹ã«ã¯ã€`save()` メンãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã£ã¦ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +```code4d +$status:=$entity.save() +``` + + + + + + + + +ユーザーã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¯ 4Dã®ãƒ„ールボックスã«ã‚りã¾ã™ã€‚ + +![](assets/en/Users/editor.png) + +### ユーザーã®è¿½åŠ ã¨å¤‰æ›´ + +ユーザーエディターを使用ã—ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã®ä½œæˆã‚„プロパティã®è¨­å®šã€å„グループã¸ã®å‰²ã‚Šå½“ã¦ã‚’ãŠã“ãªã„ã¾ã™ã€‚ + +ユーザーを追加ã™ã‚‹ã«ã¯: + +1. **デザイン** メニューã‹ã‚‰ **ツールボックス>ユーザー** ã‚’é¸æŠžã€ã¾ãŸã¯ 4Dツールãƒãƒ¼ã® **ツールボックス** ボタンをクリックã—ã¾ã™ã€‚ 4Dã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’表示ã—ã¾ã™ã€‚ + +ユーザーリストã«ã¯ã€[デザイナーã¨ç®¡ç†è€…](#デザイナーã¨ç®¡ç†è€…) ã‚’å«ã‚€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™: + +2. ユーザーリストã®ä¸‹ã«ã‚る追加ボタン ![](assets/en/Users/PlussNew.png) をクリックã—ã¾ã™ã€‚ ã¾ãŸã¯
          ユーザーリスト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **追加** ã¾ãŸã¯ **複製** ã‚’é¸æŠžã™ã‚‹ã€‚ + +> **複製** コマンドを使用ã™ã‚‹ã¨ã€åŒã˜ç‰¹æ€§ã‚’æŒã¤è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ç´ æ—©ã作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4D ã¯æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’リストã«è¿½åŠ ã—ã€ãƒ‡ãƒ•ォルトã¨ã—㦠"æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼X" ã¨ã„ã†åå‰ã‚’設定ã—ã¾ã™ã€‚ + +3. æ–°ã—ã„ユーザーåを入力ã—ã¾ã™ã€‚ ã“ã®åå‰ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ãéš›ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ユーザーåã‚’ã„ã¤ã§ã‚‚変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚変更ã™ã‚‹ã«ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **å称変更** コマンドを使用ã™ã‚‹ã‹ã€Alt+クリック (Windows) ã¾ãŸã¯ Option+クリック (macOS) ショートカットを使用ã€ã¾ãŸã¯å¤‰æ›´ã—ãŸã„åå‰ã‚’ 2回クリックã—ã¾ã™ã€‚ + +4. ユーザーã®ãƒ‘スワードを設定ã™ã‚‹ã«ã¯ã€ãƒ—ロパティエリア㧠**編集...** ボタンをクリックã—ã¦ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® 2ã¤ã®ãƒ‘スワード欄ã«åŒã˜ãƒ‘スワードをãれãžã‚Œå…¥åŠ›ã—ã¾ã™ã€‚ パスワードã«ã¯ 15æ¡ã¾ã§ã®è‹±æ•°å­—を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ パスワードã§ã¯æ–‡å­—ã®å¤§å°ãŒåŒºåˆ¥ã•れã¾ã™ã€‚ + +> データベース設定㮠"セキュリティ" ページã§è¨±å¯ã•れã¦ã„れã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è‡ªåˆ†ã®ãƒ‘スワードを変更ã§ãã¾ã™ã€‚ã¾ãŸã€ãƒ‘スワード㯠`CHANGE PASSWORD` コマンドを使ã£ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +5. グループメンãƒãƒ¼è¡¨ã‚’用ã„ã¦ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰€å±žã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—を設定ã—ã¾ã™ã€‚ メンãƒãƒ¼ã‚«ãƒ©ãƒ ã®è©²å½“ã™ã‚‹ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã—ã¦ã€é¸æŠžã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’グループã«å¯¾ã—ã¦è¿½åŠ ãƒ»å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +[グループページ](#グループã®è¨­å®š) を使用ã—ã¦ã€å„ã‚°ãƒ«ãƒ¼ãƒ—ã®æ‰€å±žãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’設定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +### ユーザーã®å‰Šé™¤ + +ユーザーを削除ã™ã‚‹ã«ã¯ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’é¸æŠžã—ã¦ã‹ã‚‰å‰Šé™¤ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‹ã€ã¾ãŸã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **削除** コマンドを使用ã—ã¾ã™ã€‚ ![](assets/en/Users/MinussNew.png) + +削除ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¯ã€ãã®å¾Œãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 削除ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã® ID番å·ã¯ã€æ–°è¦ã‚¢ã‚«ã‚¦ãƒ³ãƒˆä½œæˆã®éš›ã«å†åº¦å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 + +### ユーザープロパティ + +- **ユーザーã®ç¨®é¡ž**: "デザイナー"ã€"管ç†è€…"ã€ã¾ãŸã¯ (ãれ以外ã®ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å ´åˆã«ã‚) "ユーザー" + +- **開始メソッド**: ユーザーãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ã„ãŸã¨ãã«è‡ªå‹•実行ã•れるメソッドã®åç§° (ä»»æ„) ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã£ã¦ã€ãŸã¨ãˆã°ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã‚’ロードã§ãã¾ã™ã€‚ + + +## グループエディター + +グループã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¯ 4Dã®ãƒ„ールボックスã«ã‚りã¾ã™ã€‚ + +### グループã®è¨­å®š + +グループエディターを使用ã—ã¦ã€å„グループ内ã«ç´ã‚ã‚‹è¦ç´  (ユーザーや他ã®ã‚°ãƒ«ãƒ¼ãƒ—) を設定ã—ãŸã‚Šã€ãƒ—ラグインã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’割り当ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +グループã¯ä¸€æ—¦ä½œæˆã•れるã¨ã€å‰Šé™¤ã§ããªã„ã¨ã„ã†ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ グループを使用ã—ãŸããªã„å ´åˆã¯ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®æ‰€å±žãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ã™ã¹ã¦å–り除ãã¾ã™ã€‚ + +グループを作æˆã™ã‚‹ã«ã¯: + +1. **デザイン** メニューã‹ã‚‰ **ツールボックス>ユーザーグループ** ã‚’é¸æŠžã€ã¾ãŸã¯ 4Dツールãƒãƒ¼ã® **ツールボックス** ボタンをクリックã—ã€**グループ** ページを開ãã¾ã™ã€‚ 4D ã¯ã‚°ãƒ«ãƒ¼ãƒ—エディターウインドウを表示ã—ã¾ã™: グループリストã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã™ã¹ã¦ã®ã‚°ãƒ«ãƒ¼ãƒ—ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +2. グループリストã®ä¸‹ã«ã‚る追加ボタン ![](assets/en/Users/PlussNew.png) をクリックã—ã¾ã™ã€‚ + ã¾ãŸã¯ + グループリスト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **追加** ã¾ãŸã¯ **複製** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +> 複製コマンドを使用ã™ã‚‹ã¨ã€åŒã˜ç‰¹æ€§ã‚’æŒã¤è¤‡æ•°ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ç´ æ—©ã作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4D ã¯æ–°è¦ã‚°ãƒ«ãƒ¼ãƒ—をリストã«è¿½åŠ ã—ã€ãƒ‡ãƒ•ォルトã¨ã—㦠"æ–°è¦ã‚°ãƒ«ãƒ¼ãƒ—X" ã¨ã„ã†åå‰ã‚’設定ã—ã¾ã™ã€‚ + +3. æ–°ã—ã„グループã®åå‰ã‚’入力ã—ã¾ã™ã€‚ グループåã«ã¯ 15æ¡ã¾ã§ã®æ–‡å­—を使用ã§ãã¾ã™ã€‚ グループåã‚’ã„ã¤ã§ã‚‚変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚変更ã™ã‚‹ã«ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **å称変更** コマンドを使用ã™ã‚‹ã‹ã€Alt+クリック (Windows) ã¾ãŸã¯ Option+クリック (macOS) ショートカットを使用ã€ã¾ãŸã¯å¤‰æ›´ã—ãŸã„åå‰ã‚’ 2回クリックã—ã¾ã™ã€‚ + + +### ユーザーやグループをグループã«å…¥ã‚Œã‚‹ + +ä»»æ„ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„グループをグループ内ã«é…ç½®ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã•らã«ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—自体を他ã®ã„ãã¤ã‹ã®ã‚°ãƒ«ãƒ¼ãƒ—内ã«å…¥ã‚Œã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ å¿…ãšã—もユーザーをグループã«å…¥ã‚Œã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 + +ユーザーやグループをグループã«é…ç½®ã™ã‚‹ã«ã¯ã€å½“該グループã®ãƒ¦ãƒ¼ã‚¶ãƒ¼/グループ一覧ã«ã¦ãƒ¡ãƒ³ãƒãƒ¼ã‚«ãƒ©ãƒ ã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¾ã™: + +![](assets/en/Users/groups.png) + +ユーザーåã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚°ãƒ«ãƒ¼ãƒ—ã«è¿½åŠ ã•れã¾ã™ã€‚ グループåã‚’ãƒã‚§ãƒƒã‚¯ã—ãŸå ´åˆã¯ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã®å…¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚°ãƒ«ãƒ¼ãƒ—ã¸è¿½åŠ ã•れã¾ã™ã€‚ メンãƒãƒ¼ã®ä¸€å“¡ã¨ãªã£ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚„グループã«ã¯ã€ãã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸã‚‚ã®ã¨åŒã˜ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒä¸Žãˆã‚‰ã‚Œã¾ã™ã€‚ + +グループを別ã®ã‚°ãƒ«ãƒ¼ãƒ—内ã«å…¥ã‚Œã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®éšŽå±¤æ§‹é€ ãŒä½œæˆã•れã¾ã™ã€‚ 別ã®ã‚°ãƒ«ãƒ¼ãƒ—ã®é…下ã«å…¥ã‚Œã‚‰ã‚ŒãŸã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€ä¸¡ã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’ä¿æŒã—ã¾ã™ã€‚ 後述㮠[アクセス権ã®éšŽå±¤æ§‹é€ ](#アクセス権ã®éšŽå±¤æ§‹é€ ) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + +ユーザーやグループをグループã‹ã‚‰å–り除ãã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼/グループ一覧ã§ãƒã‚§ãƒƒã‚¯ã‚’解除ã—ã¾ã™ã€‚ + +### プラグインやサーãƒãƒ¼ã«ã‚°ãƒ«ãƒ¼ãƒ—を割り当ã¦ã‚‹ + +データベースã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸãƒ—ラグインã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’グループã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã¯ 4D ã®ãƒ—ラグインã¨ä»»æ„ã®ã‚µãƒ¼ãƒ‰ãƒ‘ーティープラグインãŒå«ã¾ã‚Œã¾ã™ã€‚ + +プラグインã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’割り当ã¦ã‚‹ã¨ã€æ‰€æœ‰ã™ã‚‹ãƒ—ラグインライセンスã®ä½¿ç”¨ã‚’管ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ プラグインã®ã‚¢ã‚¯ã‚»ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã•ãªã„ユーザーã¯ã€ãã®ãƒ—ラグインをロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 + +ã¾ãŸã€ãƒ—ラグインアクセスエリアを使用ã—ã¦ã€4D Client Webサーãƒãƒ¼ã¨ SOAPサーãƒãƒ¼ã®ä½¿ç”¨ã‚’制é™ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ + +ツールボックスã®ã‚°ãƒ«ãƒ¼ãƒ—ページã«ã‚ã‚‹ "プラグイン" エリアã«ã¯ã€4Dアプリケーションã«ã‚ˆã‚Šãƒ­ãƒ¼ãƒ‰ã•れãŸãƒ—ラグインãŒã™ã¹ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ プラグインã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’グループã«ä¸Žãˆã‚‹ã«ã¯ã€è©²å½“ã™ã‚‹ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +![](assets/en/Users/plugins.png) + +**4D Client Web Server** ã‚„ **4D Client SOAP Server** 項目を使用ã—ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã® 4D ãŒãれãžã‚Œ Web ãŠã‚ˆã³ SOAP (Webサービス) 公開をãŠã“ãªãˆã‚‹ã‹ã©ã†ã‹ã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れらã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã¯ 4D Server å´ã§ã¯ãƒ—ラグインライセンスã¨ã—ã¦ã¿ãªã•れã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€ãƒ—ラグインã¨åŒã˜æ–¹æ³•ã§ã€ã“れらã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®ä½¿ç”¨æ¨©ã‚’特定ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚°ãƒ«ãƒ¼ãƒ—ã«é™å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + +### アクセス権ã®éšŽå±¤æ§‹é€  + +データベースã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’確ä¿ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ç•°ãªã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã‚’æä¾›ã™ã‚‹æœ€ã‚‚åŠ¹æžœçš„ãªæ–¹æ³•ã¯ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®éšŽå±¤æ§‹é€ ã‚’利用ã™ã‚‹ã“ã¨ã§ã™ã€‚ ユーザーをé©åˆ‡ãªã‚°ãƒ«ãƒ¼ãƒ—ã«å‰²ã‚ŠæŒ¯ã‚Šã€å„グループをãƒã‚¹ãƒˆã™ã‚‹ã“ã¨ã§ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®éšŽå±¤æ§‹é€ ã‚’å½¢æˆã§ãã¾ã™ã€‚ ã“ã®ç¯€ã§ã¯ã€ã“ã®ã‚ˆã†ãªæ§‹é€ ã®å–ã‚Šæ‰±ã„æ–¹ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ + +ã“ã®ä¾‹é¡Œã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ‹…当業務ã«å¿œã˜ã¦ 3ã¤ã‚るグループ㮠1ã¤ã«å‰²ã‚ŠæŒ¯ã‚‰ã‚Œã¾ã™ã€‚ データ入力担当ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€Accounting (会計) グループã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚ ãƒ¬ã‚³ãƒ¼ãƒ‰ã®æ›´æ–°ã‚„無効データã®å‰Šé™¤ãªã©ãƒ‡ãƒ¼ã‚¿ç®¡ç†ã‚’担当ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€Finances (財務) グループã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚ 検索ã®å®Ÿè¡Œã‚„分æžãƒ¬ãƒãƒ¼ãƒˆã®å°åˆ·ãªã©ãƒ‡ãƒ¼ã‚¿åˆ†æžã‚’担当ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã€General Management (ç·åˆç®¡ç†) グループã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚ + +割り当ã¦å®Œäº†å¾Œã¯ã€å„グループã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æ¨©é™ãŒæ­£ã—ãé…分ã•れるよã†ã«ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ãƒã‚¹ãƒˆã—ã¾ã™ã€‚ + +- General Managementグループã«ã¯ "高レベル" ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã ã‘ãŒå«ã¾ã‚Œã¾ã™ã€‚ ![](assets/en/Users/schema1.png) + +- Financesグループã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ç®¡ç†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ General ManagementグループãŒå«ã¾ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€General Managementグループã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ Financesã‚°ãƒ«ãƒ¼ãƒ—ã®æ¨©é™ã‚‚ä¿æŒã—ã¾ã™ã€‚ ![](assets/en/Users/schema2.png) + +- Accountingグループã«ã¯ã€ãƒ‡ãƒ¼ã‚¿å…¥åŠ›ã‚’ãŠã“ãªã†ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ FinancesグループãŒå«ã¾ã‚Œã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€Financesグループã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ General Managementグループã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ Accountingã‚°ãƒ«ãƒ¼ãƒ—ã®æ¨©é™ã‚‚利用ã§ãã¾ã™ã€‚ ![](assets/en/Users/schema3.png) + +所属ユーザーã®è²¬å‹™ã«åŸºã¥ã„ã¦ã€å„グループã«å‰²ã‚Šå½“ã¦ã‚‹ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’決定ã—ã¾ã™ã€‚ + +ã“ã®ã‚ˆã†ãªéšŽå±¤ã‚·ã‚¹ãƒ†ãƒ ã‚’使用ã™ã‚‹ã¨ã€æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å‰²ã‚Šå½“ã¦ã‚‹ã¹ãグループãŒã‚ã‹ã‚Šã‚„ã™ããªã‚Šã¾ã™ã€‚ å„ユーザーを 1ã¤ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å‰²ã‚Šå½“ã¦ã‚‹ã ã‘ã§ã€ã‚°ãƒ«ãƒ¼ãƒ—ã®éšŽå±¤ã‚’介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’決定ã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/ORDA/remoteDatastores.md b/website/translated_docs/ja/ORDA/remoteDatastores.md new file mode 100644 index 00000000000000..e6716624102894 --- /dev/null +++ b/website/translated_docs/ja/ORDA/remoteDatastores.md @@ -0,0 +1,60 @@ +--- +id: datastores +title: リモートデータストアã®åˆ©ç”¨ +--- + +4D アプリケーション上ã§å…¬é–‹ã•れ㟠[データストア](dsMapping.md#データストア) ã¯ã€ç•°ãªã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã‚ŠåŒæ™‚ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- 4D リモートアプリケーション㯠ORDA を使ã£ã¦ã„れã°ã€`ds` コマンドã§ãƒ¡ã‚¤ãƒ³ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ ã“ã® 4D リモートアプリケーションã¯å¾“æ¥ã®ãƒ¢ãƒ¼ãƒ‰ã§ã‚‚データベースã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ ã“れらã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’処ç†ã™ã‚‹ã®ã¯ **4Dアプリケーションサーãƒãƒ¼** ã§ã™ã€‚ +- ä»–ã® 4Dアプリケーション (4Dリモートã€4D Server) ã¯ã€`Open datastore` コマンドを使ã£ã¦ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹å§‹ã§ãã¾ã™ã€‚ アクセスを処ç†ã™ã‚‹ã®ã¯ **HTTP REST サーãƒãƒ¼** ã§ã™ã€‚ +- iOS アプリケーションを更新ã™ã‚‹ãŸã‚ã€4D for iOS ã®ã‚¯ã‚¨ãƒªã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ アクセスを処ç†ã™ã‚‹ã®ã¯ **HTTP サーãƒãƒ¼** ã§ã™ã€‚ + + +`Open datastore` コマンドã«ã‚ˆã£ã¦å‚ç…§ã•れるリモートデータストアã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå…ƒãƒ—ロセスã¨ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢é–“ã®æŽ¥ç¶šã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã‚ˆã‚Šç®¡ç†ã•れã¾ã™ã€‚ + + +## セッションã®é–‹å§‹ + +4Dアプリケーション (ã®ãƒ—ロセス) ㌠`Open datastore` コマンドを使ã£ã¦å¤–部ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã‚’é–‹ãã¨ã€ã“ã®æŽ¥ç¶šã‚’ç®¡ç†ã™ã‚‹ãŸã‚ã«ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã§ã¯ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‹å§‹ã•れã¾ã™ã€‚ ã“ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯å†…部的ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ID ã«ã‚ˆã£ã¦è­˜åˆ¥ã•れã€4Dアプリケーション上ã§ã¯ ` localID` ã¨ç´ã¥ã„ã¦ã„ã¾ã™ã€‚ データã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã“ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«ç®¡ç†ã•れã¾ã™ã€‚ + +`localID` ã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã—ã¦ã„るマシンã«ãŠã‘るローカルãªè­˜åˆ¥IDã§ã™: + +* åŒã˜ã‚¢ãƒ—リケーションã®åˆ¥ãƒ—ロセスãŒåŒã˜ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã™ã‚‹å ´åˆã€`localID` ã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯å…±æœ‰ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* åŒã˜ã‚¢ãƒ—リケーションã®åˆ¥ãƒ—ロセスãŒåˆ¥ã® `localID` を使ã£ã¦åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã—ãŸå ´åˆã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã§ã¯æ–°ã—ã„セッションãŒé–‹å§‹ã•れã¾ã™ã€‚ +* ä»–ã®ãƒžã‚·ãƒ³ãŒåŒã˜ `localID` を使ã£ã¦åŒã˜ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«æŽ¥ç¶šã—ãŸå ´åˆã€æ–°ã—ã„ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæ–°ã—ã„ cookie ã§é–‹å§‹ã•れã¾ã™ã€‚ + +ã“れらã®åŽŸå‰‡ã‚’ä¸‹å›³ã«ç¤ºã—ã¾ã™: + +![](assets/en/ORDA/sessions.png) + +> REST リクエストã«ã‚ˆã£ã¦é–‹ã‹ã‚ŒãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ã¤ã„ã¦ã¯ã€[ユーザーã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³](REST/authUsers.md) ã‚’å‚ç…§ãã ã•ã„。 + +## セッションã®ç›£è¦– + +データストアアクセスを管ç†ã—ã¦ã„るセッション㯠4D Server ã®ç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«è¡¨ç¤ºã•れã¾ã™: + +* プロセスå: "REST Handler: \" +* タイプ: HTTP Server Worker +* セッション: `Open datastore` ã‚³ãƒžãƒ³ãƒ‰ã«æ¸¡ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å + +次ã®ä¾‹ã§ã¯ã€1ã¤ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸Šã§ 2ã¤ã®ãƒ—ロセスãŒå®Ÿè¡Œä¸­ã§ã™: + +![](assets/en/ORDA/sessionAdmin.png) + +## ロッキングã¨ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ + +エンティティロッキングやトランザクションã«é–¢é€£ã—㟠ORDA 機能ã¯ã€ORDA ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ / サーãƒãƒ¼ãƒ¢ãƒ¼ãƒ‰ã¨åŒæ§˜ã«ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ãŠã„ã¦ã‚‚プロセスレベルã§ç®¡ç†ã•れã¾ã™: + +* ã‚るプロセスãŒãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ロックã—ãŸå ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®å…±æœ‰å¦‚何ã«é–¢ã‚らãšã€ä»–ã®ã™ã¹ã¦ã®ãƒ—ロセスã«å¯¾ã—ã¦ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ãƒ­ãƒƒã‚¯ã•れãŸçŠ¶æ…‹ã§ã™ ([エンティティロッキング](entities.md#エンティティロッキング) å‚ç…§)。 åŒä¸€ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã«å¯¾å¿œã™ã‚‹è¤‡æ•°ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒ 1ã¤ã®ãƒ—ロセスã«ã‚ˆã£ã¦ãƒ­ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€åŒãƒ—ロセス内ã§ãれらãŒã™ã¹ã¦ã‚¢ãƒ³ãƒ­ãƒƒã‚¯ã•れãªã„ã¨ã€ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã¾ã›ã‚“。 ãªãŠã€ãƒ­ãƒƒã‚¯ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã™ã‚‹å‚ç…§ãŒãƒ¡ãƒ¢ãƒªä¸Šã«å­˜åœ¨ã—ãªããªã£ãŸå ´åˆã«ã‚‚ã€ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã¾ã™ã€‚ +* トランザクション㯠`dataStore.startTransaction( )`ã€`dataStore.cancelTransaction( )`ã€`dataStore.validateTransaction( )` ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使ã£ã¦ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã”ã¨ã«å€‹åˆ¥ã«é–‹å§‹ãƒ»èªè¨¼ãƒ»ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã‚Œã‚‰ã®æ“作ã¯ä»–ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 +* 従æ¥ã® 4Dランゲージコマンド (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) 㯠`ds` ã§è¿”ã•れるメインデータストアã«å¯¾ã—ã¦ã®ã¿å‹•作ã—ã¾ã™ã€‚ リモートデータストアã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚るプロセスã®ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã§ä½¿ã‚れã¦ã„ã‚‹å ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®å…±æœ‰å¦‚何ã«é–¢ã‚らãšã€ä»–ã®ã™ã¹ã¦ã®ãƒ—ロセスã¯ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã§ãã¾ã›ã‚“。 +* 次ã®å ´åˆã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ­ãƒƒã‚¯ã¯è§£é™¤ã•れã€ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™: + * プロセスãŒå¼·åˆ¶çµ‚了ã•れ㟠+ * サーãƒãƒ¼ä¸Šã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒé–‰ã˜ã‚‰ã‚ŒãŸ + * サーãƒãƒ¼ç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‹ã‚‰ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒå¼·åˆ¶çµ‚了ã•れ㟠+ +## セッションã®çµ‚了 + +アクティビティãªã—ã«ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚é–“ãŒçµŒéŽã™ã‚‹ã¨ã€4D ã¯è‡ªå‹•çš„ã«ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’終了ã—ã¾ã™ã€‚ デフォルトã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚間㯠60分ã§ã™ã€‚`Open datastore` コマンド㮠`connectionInfo` パラメーターを指定ã—ã¦ã€ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚間を変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +セッション終了後ã«ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã«é€ä¿¡ã•れãŸå ´åˆã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯å¯èƒ½ãªé™ã‚Š (ライセンスãŒã‚りã€ã‚µãƒ¼ãƒãƒ¼ãŒåœæ­¢ã—ã¦ã„ãªã„ã€ãªã©) å†é–‹ã•れã¾ã™ã€‚ ãŸã ã—セッションãŒå†é–‹ã—ã¦ã‚‚ã€ãƒ­ãƒƒã‚¯ã‚„トランザクションã«é–¢ã‚るコンテキストã¯å¤±ã‚れã¦ã„ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ (å‰è¿°å‚ç…§)。 diff --git a/website/translated_docs/ja/Preferences/forms.md b/website/translated_docs/ja/Preferences/forms.md new file mode 100644 index 00000000000000..e177b69d1b2812 --- /dev/null +++ b/website/translated_docs/ja/Preferences/forms.md @@ -0,0 +1,35 @@ +--- +id: forms +title: フォームページ +--- + + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€4Dフォームエディターã®ãƒ‡ãƒ•ォルトã®å‹•作ã¨è¡¨ç¤ºã‚’設定ã§ãã¾ã™ã€‚ + +## 移動 + +ã“ã®ã‚ªãƒ—ショングループã§ã¯ã€ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚„マウスを使用ã—ã¦ãƒ•ォームエディター上ã®ã‚ªãƒ–ジェクトを移動ã™ã‚‹éš›ã®ãƒ‘ラメーターを設定ã§ãã¾ã™ã€‚ + +### キーボードを使用ã—ã¦ã‚¹ãƒ†ãƒƒãƒ— + +ã“ã®ã‚ªãƒ—ションã§ã¯ **Shift**キーを押ã—ãªãŒã‚‰ã‚­ãƒ¼ãƒœãƒ¼ãƒ‰ã‚’使用ã—ã¦ã‚ªãƒ–ジェクトを移動ã‚ã‚‹ã„ã¯ã‚µã‚¤ã‚ºå¤‰æ›´ã—ãŸã¨ãã®ã‚¹ãƒ†ãƒƒãƒ—å˜ä½ã‚’ãƒã‚¤ãƒ³ãƒˆã§æŒ‡å®šã§ãã¾ã™ã€‚ + +### ウィンドウã®å¤–ã«ç§»å‹•ã™ã‚‹å ´åˆ + +ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ•ォームエディターã«ãŠã„ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®å¢ƒç•Œå¤–ã«ã‚ªãƒ–ジェクトをマウスã§ç§»å‹•ã—ãŸéš›ã®å‹•作を設定ã—ã¾ã™ã€‚ + +* **自動スクロール**: ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®ç§»å‹•ã«åˆã‚ã›ã¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã§ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãŒãŠã“ãªã‚れã¾ã™ã€‚ ã“ã®å‹•作ã¯å¤§ããªãƒ•ォーム内ã§ã‚ªãƒ–ジェクトを移動ã™ã‚‹éš›ã«ä¾¿åˆ©ã§ã™ã€‚ +* **ドラッグ&ドロップを開始**: ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼å¤–ã¸ã®ã‚ªãƒ–ジェクト移動ã¯ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã¨ã—ã¦è§£é‡ˆã•れã¾ã™ã€‚ フォームウィンドウã¯å¤‰æ›´ã•れãšã€ç§»å‹•ã•れãŸã‚ªãƒ–ジェクト㯠(ãŸã¨ãˆã°ä»–ã®ãƒ•ォームãªã©) ä»–ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ãƒ‰ãƒ­ãƒƒãƒ—ã§ãã¾ã™ (アクションã«äº’æ›æ€§ãŒã‚ã‚‹å ´åˆ)。 ã“ã®å‹•作ã¯ã€è¤‡æ•°ãƒ•ォームã§ã®ã‚ªãƒ–ジェクトã®ãƒªã‚µã‚¤ã‚¯ãƒ«ã‚„オブジェクトライブラリã®åˆ©ç”¨æ™‚ã«ä¾¿åˆ©ã§ã™ ([カスタムオブジェクトライブラリã®ä½œæˆã¨ä½¿ç”¨](FormEditor/objectLibrary.md#カスタムオブジェクトライブラリã®ä½œæˆã¨ä½¿ç”¨) å‚ç…§)。 + +作業慣習や開発ニーズã«å¿œã˜ã¦ã“ã®ã‚ªãƒ—ションを設定ã§ãã¾ã™ã€‚ + +### デフォルトã§è‡ªå‹•æƒãˆã‚’有効ã«ã™ã‚‹ + +ã“ã®ã‚ªãƒ—ションã¯ãƒ•ォームエディターã§ã®è‡ªå‹•æƒãˆã‚’有効ã«ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ãƒ•ォームウィンドウ内ã§ã‚‚変更ã§ãã¾ã™ ([マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹](FormEditor/formEditor.md#マグãƒãƒ†ã‚£ãƒƒã‚¯ã‚°ãƒªãƒƒãƒ‰ã‚’使用ã™ã‚‹) å‚ç…§)。 + +## 新フォームã®ãƒ‡ãƒ•ォルト表示 + +- **境界**, **ルーラー**, ...: フォームエディターã®å„æ–°è¦ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ãƒ‡ãƒ•ォルトã§è¡¨ç¤ºã™ã‚‹é …目をãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ フォームエディター㮠**表示** 階層メニューを使ã£ã¦ã€å„ウィンドウã®è¡¨ç¤ºã‚’個別ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **マーカーラインã®ã‚«ãƒ©ãƒ¼**: ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ•ォームエディター中㧠(ヘッダーã€ãƒ–レークã€è©³ç´°ã€ãƒ•ッター) エリアを定義ã™ã‚‹ãƒžãƒ¼ã‚«ãƒ¼ãƒ©ã‚¤ãƒ³ã®è‰²ã‚’設定ã—ã¾ã™ã€‚ マーカーã«é–¢ã™ã‚‹è©³ç´°ã¯ [出力コントロールラインを使用ã™ã‚‹](https://doc.4d.com/4Dv19/4D/19/Using-output-control-lines.300-5416762.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 +- **デフォルトã§è¡¨ç¤ºã™ã‚‹ãƒãƒƒã‚¸**: ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ•ã‚©ãƒ¼ãƒ ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®æ–°ã—ã„ウィンドウを開ãéš›ã€ã©ã®ãƒãƒƒã‚¸ã‚’デフォルトã§è¡¨ç¤ºã™ã‚‹ã‹ã‚’設定ã—ã¾ã™ã€‚ ãƒãƒƒã‚¸ã«é–¢ã™ã‚‹è©³ç´°ã¯ [ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹](FormEditor/formEditor.md#ãƒãƒƒã‚¸ã‚’使用ã™ã‚‹) ã‚’å‚ç…§ãã ã•ã„。 + diff --git a/website/translated_docs/ja/Preferences/general.md b/website/translated_docs/ja/Preferences/general.md new file mode 100644 index 00000000000000..c4941978468f33 --- /dev/null +++ b/website/translated_docs/ja/Preferences/general.md @@ -0,0 +1,145 @@ +--- +id: general +title: 一般ページ +--- + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ã€4Dアプリケーションã®ä¸€èˆ¬çš„ãªå‹•作を設定ã™ã‚‹ãŸã‚ã®ã‚ªãƒ—ションãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +## オプション + +### 開始時 + +ã“ã®ã‚ªãƒ—ションã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ãƒ—リケーションã®ã¿ã‚’èµ·å‹•ã—ãŸã¨ãã€4D ãŒèµ·å‹•æ™‚ã«æä¾›ã™ã‚‹ãƒ‡ãƒ•ォルトã®è¡¨ç¤ºã‚’設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* **何もã—ãªã„**: アプリケーションウィンドウã®ã¿ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +* **ローカルプロジェクトを開ãダイアログ**: 4Dã¯æ¨™æº–ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’é–‹ãダイアログボックスを表示ã—ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* **最後ã«ä½¿ç”¨ã—ãŸãƒ—ロジェクトを開ã**: 4D ã¯æœ€å¾Œã«ä½¿ç”¨ã•れãŸãƒ—ロジェクトスを直接開ãã¾ã™ã€‚ドキュメントを開ãダイアログボックスã¯è¡¨ç¤ºã•れã¾ã›ã‚“。 >ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã«ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’é–‹ãダイアログボックスを強制的ã«è¡¨ç¤ºã•ã›ã‚‹ã«ã¯ã€ãƒ—ロジェクトを起動ã™ã‚‹éš›ã«ã€**Alt** (Windows) ã¾ãŸã¯ **Option** (macOS) キーを押ã—ã¾ã™ã€‚ +* **リモートプロジェクトを開ãダイアログ**: 4D 㯠4D Server ã«ãƒ­ã‚°ã‚ªãƒ³ã™ã‚‹æ¨™æº–ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’表示ã—ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«å…¬é–‹ã•れãŸãƒ—ロジェクトを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +* **Welcomeウィザードを開ãダイアログ** (åˆæœŸè¨­å®š): 4D 㯠Welcomeウィザードダイアログボックスを表示ã—ã¾ã™ã€‚ +> **4D Server**: 4D Server アプリケーションã¯ã€ã“ã®ã‚ªãƒ—ションを無視ã—ã¾ã™ã€‚ ã“ã®ç’°å¢ƒã«ãŠã„ã¦ã¯ã€**何もã—ãªã„** モードãŒå¸¸ã«é¸æŠžã•れã¾ã™ã€‚ + +### è‡ªå‹•ãƒ•ã‚©ãƒ¼ãƒ ä½œæˆ + +> ã“ã®ã‚ªãƒ—ションã¯ã€ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã§ã®ã¿ä½¿ç”¨ã•れã€ãƒ—ロジェクトアーキテクãƒãƒ£ãƒ¼ã§ã¯ç„¡è¦–ã•れã¾ã™ã€‚ doc.4d.com ã‚’å‚ç…§ãã ã•ã„。 + +### ウィンドウã®ã‚¿ãƒ– (macOSã®ã¿) + +macOS Sierra 以é™ã€Mac ã®ã‚¢ãƒ—リケーションã¯ã€è¤‡æ•°ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’æ•´ç†ã—ã‚„ã™ãã™ã‚‹è‡ªå‹•ウィンドウタブ機能を利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚å˜ä¸€ã®è¦ªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’ç©ã¿é‡ã­ã€ã‚¿ãƒ–を通ã—ã¦ãƒ–ラウズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯å°ã•ãªã‚¹ã‚¯ãƒªãƒ¼ãƒ³ã‚„ã€ãƒˆãƒ©ãƒƒã‚¯ãƒ‘ッドを使用ã—ã¦ã„ã‚‹å ´åˆãªã©ã«æœ‰ç”¨ã§ã™ã€‚ + +ã“ã®æ©Ÿèƒ½ã¯ã€ä»¥ä¸‹ã®ç’°å¢ƒã«ãŠã„ã¦åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (4D 64-bit版ã®ã¿): + +* メソッドエディターウィンドウ +* フォームエディターウィンドウ + +ã“れらã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã™ã¹ã¦ã€ã‚¿ãƒ–å½¢å¼ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/Preferences/general2.png) + +**ウィンドウ** メニューã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦ã€ã‚¿ãƒ–を管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/Preferences/general3.png) + +4D ã®ç’°å¢ƒè¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹å†…ã§ã¯ã€**ウィンドウタブ** オプションã§ã“ã®æ©Ÿèƒ½ã‚’管ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/Preferences/general4.png) + +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: + +* **システム設定ã«å¾“ã†** (デフォルト): 4D ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã€macOSシステム環境設定ã§å®šç¾©ã•れã¦ã„るよã†ã«æŒ¯ã‚‹èˆžã„ã¾ã™ (フルスクリーン時ã®ã¿ã€å¸¸ã«ã€ã‚ã‚‹ã„ã¯æ‰‹å‹•)。 +* **ã—ãªã„**: 4Dフォームエディターã‚ã‚‹ã„ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ã‹ã‚ŒãŸæ–°ã—ã„ドキュメントã¯å¸¸ã«æ–°ã—ã„ウィンドウを作æˆã—ã¾ã™ (タブã¯ä½œæˆã•れã¾ã›ã‚“)。 +* **常ã«ã™ã‚‹**: 4Dフォームエディターã‚ã‚‹ã„ã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ã‹ã‚ŒãŸæ–°ã—ã„ドキュメントã¯å¸¸ã«æ–°ã—ã„タブを作æˆã—ã¾ã™ã€‚ + +### アピアランス (macOSã®ã¿) + +ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ã€**4D開発**環境ã§ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã‚’é¸æŠžã—ã¾ã™ã€‚ 指定ã•れãŸã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã¯ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¨ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«é©ç”¨ã•れã¾ã™ã€‚ + +> **デスクトップアプリケーション** ã§ä½¿ç”¨ã™ã‚‹ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® "インターフェース" ページã§è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: + +* **システムã®ã‚«ãƒ©ãƒ¼ã‚¹ã‚­ãƒ¼ãƒ è¨­å®šã«åˆã‚ã›ã‚‹** (デフォルト): macOSシステム環境設定ã§å®šç¾©ã•れã¦ã„るカラースキームを使用ã—ã¾ã™ã€‚ +* **Light**: ライトテーマを使用ã—ã¾ã™ã€‚ +* **Dark**: ダークテーマを使用ã—ã¾ã™ã€‚ + +> ã“ã®è¨­å®šã¯ macOS ã§ã®ã¿ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ Windows上ã§ã¯ã€"Light" テーマãŒå¸¸ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + + +### アプリケーションモードã«ç§»å‹•ã™ã‚‹æ™‚ã«ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã‚’終了ã™ã‚‹ + +ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€**アプリケーションモード** コマンドを使用ã—ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ãƒ—リケーションモードã«ç§»å‹•ã™ã‚‹éš›ã«ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã®ã™ã¹ã¦ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„㨠(åˆæœŸè¨­å®š)ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¯ã‚¢ãƒ—リケーションモードã®å¾Œã‚ã«è¡¨ç¤ºã•れãŸã¾ã¾ã¨ãªã‚Šã¾ã™ã€‚ + + +### ãƒã‚¤ãƒŠãƒªãƒ¼å½¢å¼ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä½œæˆã‚’有効化ã™ã‚‹ + +ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€**ファイル > æ–°è¦** メニューã¨ã€ãƒ„ールãƒãƒ¼ã® **æ–°è¦** ボタンã«ã€2ã¤ã®é …ç›®ãŒè¿½åŠ ã•れã¾ã™: + +* **データベース...** +* **ストラクãƒãƒ£ãƒ¼å®šç¾©ã‚’使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹...** + +![](assets/en/Preferences/general5.png) + +ã“ã®é …目を使用ã™ã‚‹ã¨ãƒã‚¤ãƒŠãƒªãƒ¼ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™([æ–°ã—ã„データベースを作æˆã™ã‚‹](https://doc.4d.com/4Dv19/4D/19/Creating-a-new-database.300-5416694.ja.html) ã®ç« ã‚’å‚ç…§)。 ã“れらã®é …ç›®ã¯ãƒ‡ãƒ•ォルトã§ã¯è¡¨ç¤ºã•れã¾ã›ã‚“。今後 4D ã¯ã€æ–°è¦ã®é–‹ç™ºã«ã¯ãƒ—ロジェクトベースã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã‚’使用ã™ã‚‹ã“ã¨ã‚’推奨ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +## æ–°è¦ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆä½œæˆæ™‚ + +### ログファイルを使用 + +ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€æ–°è¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ä½œæˆæ™‚ã«ãƒ­ã‚°ãƒ•ァイルãŒè‡ªå‹•çš„ã«é–‹å§‹ã•れã€ä½¿ç”¨ã•れã¾ã™ã€‚ è©³ç´°ãªæƒ…å ±ã«ã¤ã„ã¦ã¯ [ログファイル (.journal)](Backup/log.md) ã‚’å‚ç…§ãã ã•ã„。 + +### パッケージを作æˆã™ã‚‹ + +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€4Dデータベースã¯è‡ªå‹•ã§ .4dbase æ‹¡å¼µå­ãŒä»˜ã„ãŸãƒ•ォルダーã«ä½œæˆã•れã¾ã™ã€‚ + +ã“ã®åŽŸå‰‡ã®ãŸã‚ã€macOS ã§ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ォルダーãŒå°‚用プロパティ付ãã®ãƒ‘ッケージã¨ã—ã¦è¡¨ç¤ºã•れã¾ã™ã€‚ Windows ã§ã¯ã€ã“ã‚Œã¯æ™®é€šã®ãƒ•ォルダーã¨å¤‰ã‚りã‚りã¾ã›ã‚“。 + +### `.gitignore` ファイルを作æˆã™ã‚‹ + +æ–°ã—ã„プロジェクトã§ã¯ã€ã„ãã¤ã‹ã®ãƒ•ァイルを git ã«ç„¡è¦–ã•ã›ãŸã„ã“ã¨ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 + +ã“ã®è¨­å®šã‚’ãŠã“ãªã†ã«ã¯ã€**.gitignore ファイルを作æˆã™ã‚‹** オプションをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +![](assets/en/Preferences/gitignore.png) + +ã“ã®ãƒœãƒƒã‚¯ã‚¹ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€4D ã§ãƒ—ロジェクトを作æˆã™ã‚‹ã¨ã€4D 㯠`.gitignore` ファイルを `Project` フォルダーã¨åŒéšŽå±¤ã«ä½œæˆã—ã¾ã™ ([プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼](Project/architecture.md#.gitignore-ファイル-ä»»æ„) å‚ç…§)。 + +鉛筆アイコンをクリックã™ã‚‹ã¨ã€`.gitignore` ファイルã®ãƒ‡ãƒ•ォルトã®å†…容を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€.gitignore 設定ファイルãŒãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ã‹ã‚Œã¾ã™ã€‚ ã“ã®ãƒ•ァイルã®å†…容ã¯ã€æ–°è¦ãƒ—ロジェクト㧠`.gitignore` ファイルを生æˆã™ã‚‹éš›ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +`.gitignore` ファイルã®ä»•組ã¿ã‚’ç†è§£ã™ã‚‹ã«ã¯ã€[git ã®å…¬å¼ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ](https://git-scm.com/docs/gitignore) ãŒå‚考ã«ãªã‚Šã¾ã™ã€‚ + +### テキスト比較ã®è¨€èªž + +ã“ã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¯æ–°è¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã„ã¦ã€æ–‡å­—列ã®å‡¦ç†ã¨æ¯”較ã§ä½¿ç”¨ã•れるデフォルトã®è¨€èªžã‚’設定ã—ã¾ã™ã€‚ 言語ã®é¸æŠžã¯ã€ãƒ†ã‚­ã‚¹ãƒˆã®ä¸¦ã¹æ›¿ãˆã‚„æ¤œç´¢ã€æ–‡å­—ã®å¤§å°ãªã©ã®æ¯”較ルール等ã«ç›´æŽ¥å½±éŸ¿ã‚’与ãˆã¾ã™ã€‚ãŸã ã—ã€ãƒ†ã‚­ã‚¹ãƒˆã®ç¿»è¨³ã‚„日付・時刻・通貨ã®ãƒ•ォーマットã¯ã‚·ã‚¹ãƒ†ãƒ ã®è¨€èªžè¨­å®šãŒä½¿ç”¨ã•れã€ã“ã®è¨­å®šã«ã¯å½±éŸ¿ã•れã¾ã›ã‚“。 åˆæœŸè¨­å®šã§ã¯ã€4D ã¯ã‚·ã‚¹ãƒ†ãƒ ã«è¨­å®šã•れã¦ã„るカレントã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨€èªžã‚’使用ã—ã¾ã™ã€‚ + +ã¤ã¾ã‚Šã€4Dデータベースã¯ã‚·ã‚¹ãƒ†ãƒ è¨€èªžã¨ã¯ç•°ãªã‚‹è¨€èªžã§å‹•作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ データベースãŒé–‹ã‹ã‚Œã‚‹ã¨ãã€4Dエンジンã¯ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«ä½¿ç”¨ã•れã¦ã„る言語を検知ã—ã€(インタープリターやコンパイルモードã®) ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã«æä¾›ã—ã¾ã™ã€‚ データベースエンジンã€ã‚ã‚‹ã„ã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã®ã„ãšã‚ŒãŒãƒ†ã‚­ã‚¹ãƒˆæ¯”較をãŠã“ãªã†ã‹ã«é–¢ã‚らãšã€åŒã˜è¨€èªžãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +æ–°è¦ã«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを作æˆã™ã‚‹éš›ã€4D ã¯ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§è¨­å®šã•れã¦ã„る言語を使用ã—ã¾ã™ã€‚ ストラクãƒãƒ£ãƒ¼ã®è¨€èªžã¨ç•°ãªã‚‹è¨€èªžã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®è¨€èªžãŒä½¿ç”¨ã•れã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã«è¨€èªžã‚³ãƒ¼ãƒ‰ãŒã‚³ãƒ”ーã•れã¾ã™ã€‚ +> データベース設定を使用ã—ã¦ã€é–‹ã‹ã‚Œã¦ã„るデータベースã®è¨€èªžã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([テキスト比較](https://doc.4d.com/4Dv19/4D/19/DatabaseData-storage-page.300-5416926.ja.html#460252) å‚ç…§)。 + +## ドキュメントã®å ´æ‰€ + +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ–ラウザーã«è¡¨ç¤ºã•れる 4D HTMLドキュメントã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’設定ã—ã¾ã™: + +* メソッドエディターã§ã€4Dクラス関数ã¾ãŸã¯ã‚³ãƒžãƒ³ãƒ‰åã«ã‚«ãƒ¼ã‚½ãƒ«ãŒã‚ã‚‹ã¨ãã«ã€**F1**キーを押ã—ãŸã¨ã +* エクスプローラー㮠**コマンドページ** 上㮠4Dコマンドをダブルクリックã—ãŸã¨ã + + +### ドキュメント言語 + +表示ã™ã‚‹ HTMLドキュメントã®è¨€èªžã€‚ アプリケーションã®è¨€èªžã¨ã¯åˆ¥ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆè¨€èªžã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### 最åˆã«ãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ォルダーを見る + +> ã“ã®ã‚ªãƒ—ションã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã«é–¢ã—ã¦ã®ã¿è€ƒæ…®ã•れã¾ã™ (クラス関数を除ã)。 + +4DãŒãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒšãƒ¼ã‚¸ã‚’探ã™å ´æ‰€ã‚’設定ã—ã¾ã™ã€‚ + +* ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆ (デフォルト)ã€4D ã¯ã¾ãšãƒ­ãƒ¼ã‚«ãƒ«ãƒ•ォルダーã§ãƒšãƒ¼ã‚¸ã‚’探ã—ã¾ã™ (後述å‚ç…§)。 ページãŒè¦‹ã¤ã‹ã‚Œã°ã€4D ã¯ãã®ãƒšãƒ¼ã‚¸ã‚’カレントブラウザーã§è¡¨ç¤ºã—ã¾ã™ã€‚ 見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯è‡ªå‹•ã§ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã® Webサイトをå‚ç…§ã—ã¾ã™ã€‚ ã“ã®å ´åˆã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã«æŽ¥ç¶šã•れã¦ã„ãªã„環境ã§ã‚‚ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒå‚ç…§ã§ãã¾ã™ã€‚ +* ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã€4D ã¯ã‚ªãƒ³ãƒ©ã‚¤ãƒ³ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã® Webサイトã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã—ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ–ラウザーã§ãƒšãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚ ページãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯ãƒ–ラウザーã«ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ã€‚ + +### ローカルフォルダー + +> ã“ã®ã‚ªãƒ—ションã¯ã€ã‚³ãƒžãƒ³ãƒ‰ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã«é–¢ã—ã¦ã®ã¿è€ƒæ…®ã•れã¾ã™ (クラス関数を除ã)。 + +スタティック㪠HTMLドキュメントã®å ´æ‰€ã‚’指定ã—ã¾ã™ã€‚ デフォルトã§ã“れ㯠\Help\Command\language サブフォルダーã«è¨­å®šã•れã¦ã„ã¾ã™ã€‚ ã“ã®ã‚¨ãƒªã‚¢ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„るメニューをクリックã™ã‚‹ã¨ã€å ´æ‰€ã‚’見るã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚µãƒ–フォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆã€å ´æ‰€ã¯èµ¤ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + +ã“ã®å ´æ‰€ã¯å¿…è¦ã«å¿œã˜ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ãŸã¨ãˆã°ã€ã‚¢ãƒ—リケーションã®è¨€èªžã¨ã¯ç•°ãªã‚‹è¨€èªžã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’表示ã—ãŸã„å ´åˆãªã©ã§ã™ã€‚ HTMLドキュメントã¯ã€ç•°ãªã‚‹ãƒœãƒªãƒ¥ãƒ¼ãƒ ã‚„ Webサーãƒãƒ¼ä¸Šãªã©ã«ç½®ãã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ä»–ã®å ´æ‰€ã‚’指定ã™ã‚‹ã«ã¯ã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®éš£ã® **[...]** ボタンをクリックã—ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダー (`fr`, `en`, `es`, `de` ã¾ãŸã¯ `ja` ãªã©ã®è¨€èªžã«å¯¾å¿œã™ã‚‹ãƒ•ォルダー) ã‚’é¸æŠžã—ã¾ã™ã€‚ diff --git a/website/translated_docs/ja/Preferences/methods.md b/website/translated_docs/ja/Preferences/methods.md new file mode 100644 index 00000000000000..bc617ca5066e5d --- /dev/null +++ b/website/translated_docs/ja/Preferences/methods.md @@ -0,0 +1,186 @@ +--- +id: methods +title: メソッドページ +--- + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースやデフォルトã®è¡¨ç¤ºã€ãŠã‚ˆã³å‹•作ã«é–¢ã™ã‚‹ã‚ªãƒ—ションを設定ã—ã¾ã™ã€‚ ページã¯ãƒ†ãƒ¼ãƒžã¨ã‚ªãƒ—ションã¨ã„ㆠ2ã¤ã®ã‚¿ãƒ–ã«åˆ†ã‘られã¦ã„ã¾ã™ã€‚ + +## テーマ + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ãƒ†ãƒ¼ãƒžã‚’é¸æŠžãƒ»ä½œæˆãƒ»è¨­å®šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ テーマã¯ã€ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«è¡¨ç¤ºã•れる項目ã®ãƒ•ォントã€ãƒ•ォントサイズã€ã‚«ãƒ©ãƒ¼ã€ã‚¹ã‚¿ã‚¤ãƒ«ã‚’定義ã—ã¾ã™ã€‚ + +![](assets/en/Preferences/themes.png) + +### テーマリスト + +ã“ã®ãƒªã‚¹ãƒˆã§ã¯ã€ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«é©ç”¨ã™ã‚‹ãƒ†ãƒ¼ãƒžã‚’é¸æŠžã—ã¾ã™ã€‚ 利用å¯èƒ½ãªãƒ†ãƒ¼ãƒžãŒã™ã¹ã¦è¡¨ç¤ºã•れã€ã‚«ã‚¹ã‚¿ãƒ ãƒ†ãƒ¼ãƒžãŒã‚ã‚‹å ´åˆã¯ãれも表示ã•れã¾ã™ã€‚ 4D ã¯ãƒ‡ãƒ•ォルト㧠2ã¤ã®ãƒ†ãƒ¼ãƒžã‚’用æ„ã—ã¦ã„ã¾ã™: + +* **デフォルトã®Lightテーマ** +* **デフォルトã®Darkテーマ** + +> デフォルトã®ãƒ†ãƒ¼ãƒžã¯å¤‰æ›´ã‚„削除ãŒã§ãã¾ã›ã‚“。 + +以å‰ã® 4Dリリースã§ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒ«ã‚’カスタマイズã—ã¦ã„ãŸå ´åˆã€**myTheme** テーマãŒè‡ªå‹•çš„ã«è¿½åŠ ã•れã¾ã™ã€‚ + +### カスタムテーマã®ä½œæˆ + +完全ã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãªãƒ†ãƒ¼ãƒžã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ テーマを作æˆã™ã‚‹ã«ã¯ã€æ—¢å­˜ã®ãƒ†ãƒ¼ãƒžã‚’é¸æŠžã—ã¦ã€ãƒ†ãƒ¼ãƒžãƒªã‚¹ãƒˆã®ä¸‹éƒ¨ã«ã‚ã‚‹ **+** をクリックã—ã¾ã™ã€‚ ã¾ãŸã€`4D Editor Themes` フォルダー内ã®ãƒ†ãƒ¼ãƒžãƒ•ァイルをコピーã—ã¦ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã—ãŸãƒ†ãƒ¼ãƒžã‚’追加ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (後述å‚ç…§)。 + +### カスタムテーマファイル + +カスタムテーマã¯ã€ãれãžã‚Œåˆ¥ã® *themeName.json* ã¨ã„ㆠJSONãƒ•ã‚¡ã‚¤ãƒ«ã«æ ¼ç´ã•れã¾ã™ã€‚カスタムテーマ㮠JSONファイルã¯ã€4D [preferences](overview.md#ストレージ) ファイルã¨åŒã˜éšŽå±¤ã«ã‚ã‚‹ `4D Editor Themes` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¾ã™ã€‚ + +カスタムテーマã§ã‚­ãƒ¼å€¤ãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆã¯ã€*デフォルトã®Lightテーマ* ã®å€¤ãŒãƒ‡ãƒ•ォルトã¨ãªã‚Šã¾ã™ã€‚ JSONテーマファイルãŒç„¡åйãªå ´åˆã€*デフォルトã®Lightテーマ* ãŒèª­ã¿è¾¼ã¾ã‚Œã€ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã™ã€‚ + +> 外部エディターã§ãƒ†ãƒ¼ãƒžãƒ•ァイルを変更ã—ãŸå ´åˆã¯ã€å¤‰æ›´å†…å®¹ã‚’åæ˜ ã•ã›ã‚‹ãŸã‚ã« 4Dã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +## テーマã®å®šç¾© + +テーマを定義ã™ã‚‹ã¨ã¯ã€ä»¥ä¸‹ã®ã“ã¨ã‚’æ„味ã—ã¾ã™: + +- コードエディター全体ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«ãƒ•ォントã¨ãƒ•ォントサイズを設定ã™ã‚‹ã€‚ +- 4D ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸è¦ç´  (フィールドã€ãƒ†ãƒ¼ãƒ–ルã€å¤‰æ•°ã€å¼•æ•°ã€SQL ãªã©)ã€SQL ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸è¦ç´  (キーワードã€é–¢æ•°ãªã©)ã€ãã—ã¦èƒŒæ™¯è‰²ã®ãれãžã‚Œã«ã‚¹ã‚¿ã‚¤ãƒ«ã¨è‰²ã‚’割り当ã¦ã‚‹ã€‚ + +ç•°ãªã‚‹è‰²ã‚„スタイルを組ã¿åˆã‚ã›ã‚‹ã“ã¨ã¯ã€ã‚³ãƒ¼ãƒ‰ã®ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ç›®çš„ã«ç‰¹ã«ä¾¿åˆ©ã§ã™ã€‚ + +### フォントã¨ãƒ•ォントサイズ + +**フォント** 㨠**フォントサイズ** ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã§ã€ã™ã¹ã¦ã®ã‚«ãƒ†ã‚´ãƒªãƒ¼ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®å…¥åŠ›ã‚¨ãƒªã‚¢ã§ä½¿ç”¨ã™ã‚‹ãƒ•ォントåã¨ã‚µã‚¤ã‚ºã‚’é¸æŠžã§ãã¾ã™ã€‚ + +### 4D ランゲージ㨠SQL ランゲージ + +ランゲージè¦ç´ ã®ç¨®é¡žã”ã¨ã«ã€ç•°ãªã‚‹ãƒ•ォントスタイルやカラー (フォントカラーや背景色) を設定ã§ãã¾ã™ã€‚ カスタマイズã™ã‚‹è¦ç´ ã¯ã€ã‚«ãƒ†ã‚´ãƒªãƒ¼ãƒªã‚¹ãƒˆã§é¸æŠžã§ãã¾ã™ã€‚ + + +### ãã®ä»–ã®ã‚¹ã‚¿ã‚¤ãƒ« + +ã“れらã®ã‚ªãƒ—ションã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¨ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã§ä½¿ç”¨ã•れる様々ãªã‚«ãƒ©ãƒ¼ã‚’設定ã—ã¾ã™ã€‚ + +![](assets/en/Preferences/categories.png) + + +| | 説明 | +| -------------------- | ---------------------------------------------------------------------------------- | +| **背景色** | メソッドエディターウィンドウã®èƒŒæ™¯è‰²ã€‚ | +| **デãƒãƒƒã‚¬å†…ã®å®Ÿè¡Œè¡Œã®å¢ƒç•Œç·š** | [オプション](#オプション) ページ㧠"実行行をãƒã‚¤ãƒ©ã‚¤ãƒˆ" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã§ç¾åœ¨å®Ÿè¡Œä¸­ã®è¡Œã‚’囲む境界線ã®è‰²ã€‚ | +| **カーソル行背景色** | カーソルã®ã‚る行ã®èƒŒæ™¯è‰²ã€‚ | +| **実行行背景色** | デãƒãƒƒã‚¬ãƒ¼ã§å®Ÿè¡Œä¸­ã®è¡Œã®èƒŒæ™¯è‰²ã€‚ | +| **検索ã§è¦‹ã¤ã‹ã£ãŸå˜èªžã®ãƒã‚¤ãƒ©ã‚¤ãƒˆ** | 検索ã—ã¦è¦‹ã¤ã‹ã£ãŸå˜èªžã®ãƒã‚¤ãƒ©ã‚¤ãƒˆè‰²ã€‚ | +| **カッコã®ãƒã‚¤ãƒ©ã‚¤ãƒˆ** | 対応ã™ã‚‹ã‚«ãƒƒã‚³ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆè‰² (カッコã®ãƒšã‚¢ãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れる時ã«ä½¿ç”¨ã•れã¾ã™ã€‚[オプション](#オプション) å‚ç…§)。 | +| **ブロックã®ãƒã‚¤ãƒ©ã‚¤ãƒˆ** | [オプション](#オプション) ã§ "è«–ç†ãƒ–ロックを強調" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ãŸå ´åˆã®ã€é¸æŠžã•れãŸè«–ç†ãƒ–ロックã®ãƒã‚¤ãƒ©ã‚¤ãƒˆè‰²ã€‚ | +| **åŒã˜å¤‰æ•°ã‚„フィールドã®ãƒã‚¤ãƒ©ã‚¤ãƒˆ** | [オプション](#オプション) ã§ "変数ã¨ãƒ•ィールドを強調" ã‚ªãƒ—ã‚·ãƒ§ãƒ³ãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€åŒã˜å¤‰æ•°ã¾ãŸã¯ãƒ•ィールドテキストã®ä»–ã®å‡ºç¾ç®‡æ‰€ã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚«ãƒ©ãƒ¼ã€‚ | +| **デãƒãƒƒã‚¬å†…ã®å®Ÿè¡Œè¡Œã®ãƒã‚¤ãƒ©ã‚¤ãƒˆ** | [オプション](#オプション) ã§ "実行行をãƒã‚¤ãƒ©ã‚¤ãƒˆ" ãŒæœ‰åйã«ãªã£ã¦ã„ã‚‹å ´åˆã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã§ç¾åœ¨å®Ÿè¡Œä¸­ã®è¡Œã®ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚«ãƒ©ãƒ¼ã€‚ | +| **é¸æŠžç¯„å›²ã®èƒŒæ™¯è‰²** | é¸æŠžç¯„å›²ã®èƒŒæ™¯è‰²ã€‚ | +| **サジェストテキスト** | メソッドエディターã§è¡¨ç¤ºã•れるオートコンプリートテキストã®è‰²ã€‚ | + + + +## オプション + + +ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®è¡¨ç¤ºã‚ªãƒ—ションを設定ã—ã¾ã™ã€‚ + +![](assets/en/Preferences/options.png) + + +### オプション + + + +#### 4Dプログラミングランゲージ (リージョンシステム設定を使ã†) + +ローカル4Dアプリケーション用㮠"国際的ãª" コード設定を有効化/無効化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- **ãƒã‚§ãƒƒã‚¯ç„¡ã—** (デフォルト): 4Dメソッドã«ãŠã„㦠English-US設定ã¨è‹±èªžã§ã®ãƒ—ログラミングランゲージãŒä½¿ç”¨ã•れã¾ã™ã€‚ +- **ãƒã‚§ãƒƒã‚¯æœ‰ã‚Š**: リージョン設定ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +> ã“ã®ã‚ªãƒ—ションを変更ã—ãŸå ´åˆã€å¤‰æ›´ã‚’åæ˜ ã™ã‚‹ã«ã¯ 4Dアプリケーションをå†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +#### インデント + +メソッドエディターã§ã€4DコードãŒä½¿ç”¨ã™ã‚‹ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆã®å€¤ã‚’設定ã—ã¾ã™ã€‚ 値ã¯ãƒã‚¤ãƒ³ãƒˆã§è¨­å®šã—ã¾ã™ (デフォルト㯠10)。 + +4D ã¯æ§‹é€ ã‚’明確ã«ã™ã‚‹ãŸã‚ã«è‡ªå‹•ã§ã‚³ãƒ¼ãƒ‰ã‚’インデントã—ã¾ã™: + +![](assets/en/Preferences/optionsIndent.png) + +アルゴリズムãŒè¤‡é›‘ã«ãªã‚Šã€éšŽå±¤ãƒ¬ãƒ™ãƒ«æ•°ãŒå¢—ãˆãŸå ´åˆã«ã€ã“ã®å€¤ã‚’変更ã™ã‚‹ã¨ä¾¿åˆ©ãªå ´åˆãŒã‚りã¾ã™ã€‚ 具体的ã«ã¯ã€ã“ã®å€¤ã‚’減らã™ã“ã¨ã§æ°´å¹³ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚’減らã™ã“ã¨ãŒã§ãã¾ã™ã€‚ + +#### 行番å·ã‚’表示 + +メソッドエディターã§ã€è¡Œç•ªå·ã‚’デフォルト表示ã™ã‚‹ã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚ メソッドエディターã«ã¦ã€ç›´æŽ¥ã®è¡Œç•ªå·ã‚’表示/éžè¡¨ç¤ºè¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +#### リスト表示 + +メソッドエディターウィンドウを開ã„ãŸã¨ãã«ã€ã‚ªãƒ–ジェクト (コマンドã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ィールド等) ã®ãƒªã‚¹ãƒˆã‚’デフォルトã§è¡¨ç¤ºã™ã‚‹ã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚ メソッドエディターã§ç›´æŽ¥ã“ã®ãƒªã‚¹ãƒˆã‚’表示/éžè¡¨ç¤ºã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +#### è«–ç†ãƒ–ロックを強調 + +ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€å±•é–‹ã•れãŸãƒŽãƒ¼ãƒ‰ã®ä¸Šã«ãƒžã‚¦ã‚¹ã‚’ç½®ã„ãŸã¨ãã«è«–ç†ãƒ–ロック(ãŸã¨ãˆã° If/End if ãªã©) ã«å«ã¾ã‚Œã¦ã„るコードãŒã™ã¹ã¦ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™: + +![](assets/en/Preferences/optionsLogicalBlocks.png) + +ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚«ãƒ©ãƒ¼ã¯ [テーマ](#テーマã®å®šç¾©) ページã«ã¦è¨­å®šãŒå¯èƒ½ã§ã™ã€‚ + +#### ブロック行を常ã«è¡¨ç¤º + +垂直ã®ãƒ–ロック線を常ã«éžè¡¨ç¤ºã«ã§ãã¾ã™ã€‚ ブロック線ã¯ãƒŽãƒ¼ãƒ‰ã‚’視覚的ã«ç¹‹ããŸã‚ã®ã‚‚ã®ã§ã™ã€‚ デフォルトã§ã¯ã€ã“れらã¯å¸¸ã«è¡¨ç¤ºã•れã¦ã„ã¾ã™ (ãŸã ã—展開/折りãŸãŸã¿ã‚¢ã‚¤ã‚³ãƒ³ãŒéžè¡¨ç¤ºã®å ´åˆã¯é™¤ãã¾ã™ã€‚以下å‚ç…§)。 + +![](assets/en/Preferences/optionsBlockLines.png) + +#### 折りãŸãŸã¿/展開アイコンを隠㙠+ +コードを表示ã™ã‚‹éš›ã«ã€å±•é–‹/折りãŸãŸã¿ã‚¢ã‚¤ã‚³ãƒ³ã‚’デフォルトã§éžè¡¨ç¤ºã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ãã€ãƒŽãƒ¼ãƒ‰ã‚¢ã‚¤ã‚³ãƒ³ (ã¨ãƒ–ロック線。å‰è¿°å‚ç…§)ã¯ã€ãƒžã‚¦ã‚¹ãŒãƒŽãƒ¼ãƒ‰ã®ä¸Šã«ç½®ã‹ã‚ŒãŸéš›ã«ã®ã¿ä¸€æ™‚çš„ã«è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Preferences/optionsHideIcons.png) + +#### () ã¨å¯¾å¿œã™ã‚‹é–‰ã˜ã‚‹ } ) ] " ã‚’è‡ªå‹•ã§æŒ¿å…¥ + +コード入力中㫠() ã¨ã€é–‰ã˜ã‚‹ã‚«ãƒƒã‚³ã‚’è‡ªå‹•çš„ã«æŒ¿å…¥ã™ã‚‹ã‚ˆã†ã«ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã§ã¯ 2ã¤ã®è‡ªå‹•機能を管ç†ã—ã¾ã™: + +- **()カッコã®ãƒšã‚¢**: 4Dコマンドã€ã‚­ãƒ¼ãƒ¯ãƒ¼ãƒ‰ã€ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ãŒææ¡ˆãƒªã‚¹ãƒˆã‚ã‚‹ã„ã¯è£œå®Œãƒªã‚¹ãƒˆã‹ã‚‰æŒ¿å…¥ã•れる時ã€ãã®æŒ¿å…¥è¦ç´ ãŒä¸€ã¤ä»¥ä¸Šã®å¼•æ•°ã‚’å¿…é ˆã¨ã—ã¦ã„ã‚‹å ´åˆã«è¿½åŠ ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€"C_OB" ã¨å…¥åŠ›ã—㦠Tabキーを押ã™ã¨ã€4D ã¯è‡ªå‹•的㫠"C_OBJECT()" ã¨è¡¨ç¤ºã—ã€ã‚«ãƒ¼ã‚½ãƒ«ã‚’ () ã®å†…部ã«è¨­å®šã—ã¾ã™ã€‚ + +- **é–‰ã˜ã‚‹ }, ), ], "**: {, (, [, ã‚ã‚‹ã„㯠" ãªã©ã®é–‹ãカッコを入力ã—ãŸæ™‚ã«ã€å¯¾å¿œã™ã‚‹é–‰ã˜ã‚‹ã‚«ãƒƒã‚³ãŒè¿½åŠ ã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ã‚«ãƒ¼ã‚½ãƒ«ä½ç½®ã«ã€ã‚ã‚‹ã„ã¯é¸æŠžã•れãŸãƒ†ã‚­ã‚¹ãƒˆã‚’囲むよã†ã«ã€å¯¾å¿œã™ã‚‹ã‚«ãƒƒã‚³è¨˜å·ã‚’挿入ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ–‡å­—列をãƒã‚¤ãƒ©ã‚¤ãƒˆã—ã¦å˜ä¸€ã® " を入力ã™ã‚‹ã¨ã€é¸æŠžã•ã‚ŒãŸæ–‡å­—列全体㌠"" ã§å›²ã¾ã‚Œã¾ã™: + +![](assets/en/Preferences/optionsClosing.png) -> " -> ![](assets/en/Preferences/optionsClosing2.png) + +#### 括弧ã®ãƒžãƒƒãƒãƒ³ã‚° + +コード中ã§ã®å¯¾å¿œã™ã‚‹æ‹¬å¼§ã€äºŒé‡å¼•用符ãªã©ã‚’強調ã™ã‚‹æ–¹æ³•を設定ã—ã¾ã™ã€‚ ã“ã®å¼·èª¿ã¯ã€æ‹¬å¼§ (大カッコ[]ã€ä¸­ã‚«ãƒƒã‚³{}ã€å°ã‚«ãƒƒã‚³()) ã‚ã‚‹ã„ã¯äºŒé‡å¼•用符 "" ãŒé¸æŠžã•れãŸã¨ãã«è¡¨ç¤ºã•れã¾ã™ã€‚ 次ã®ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- **ãªã—**: 強調ãªã— +- **四角** (デフォルト): 括弧や二é‡å¼•用符ãŒé»’ã„四角ã§å›²ã¾ã‚Œã¾ã™ã€‚ + ![](assets/en/Preferences/optionsRectangle.png) +- **背景色**: 括弧や二é‡å¼•用符ãŒãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ (色㯠[テーマ](#テーマã®å®šç¾©) ページã§è¨­å®šã—ã¾ã™)。 +- **太字**: 括弧や二é‡å¼•用符ãŒå¤ªå­—ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + +#### 変数ã¨ãƒ•ィールドを強調 + +é–‹ã‹ã‚ŒãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦å†…ã§ã€åŒã˜å¤‰æ•°ã‚„フィールド等ã®ã‚ªã‚«ãƒ¬ãƒ³ã‚¹ã‚’ã™ã¹ã¦ãƒã‚¤ãƒ©ã‚¤ãƒˆã—ã¾ã™ã€‚ + +![](assets/en/Preferences/optionsVariables.png) + +- **ã—ãªã„**(デフォルト): ãƒã‚¤ãƒ©ã‚¤ãƒˆãªã— +- **カーソル上ã®ã¿**: テキストãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸéš›ã«ã®ã¿ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ +- **é¸æŠžç¯„å›²ä¸Šã®ã¿**: テキストãŒé¸æŠžã•れãŸéš›ã«ã®ã¿ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¾ã™ã€‚ + +ãƒã‚¤ãƒ©ã‚¤ãƒˆã‚«ãƒ©ãƒ¼ã¯ [テーマ](#テーマã®å®šç¾©) ページã«ã¦è¨­å®šãŒå¯èƒ½ã§ã™ã€‚ + +#### デãƒãƒƒã‚° (実行行をãƒã‚¤ãƒ©ã‚¤ãƒˆ) + +通常ã®é»„色ã®çŸ¢å°ã‚¤ãƒ³ã‚¸ã‚±ãƒ¼ã‚¿ãƒ¼ã«åŠ ãˆã€ãƒ‡ãƒãƒƒã‚¬ãƒ¼ã§å®Ÿè¡Œä¸­ã®è¡Œã‚’ãƒã‚¤ãƒ©ã‚¤ãƒˆã™ã‚‹ã‹ã©ã†ã‹ã‚’設定ã—ã¾ã™ã€‚ + +![](assets/en/Preferences/optionsLine.png) + +ã“ã®ã‚ªãƒ—ションã®é¸æŠžã‚’解除ã™ã‚‹ã¨ã€é»„色ã®çŸ¢å°ã®ã¿ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +### ææ¡ˆ + +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®è‡ªå‹•補完メカニズムを設定ã—ã¦ã€ä½œæ¥­ç¿’æ…£ã«åˆã‚ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +| | 説明 | +| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ウィンドウを自動ã§é–‹ã | 次ã®è¦ç´ ã«é–¢ã™ã‚‹ææ¡ˆã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’自動ã§é–‹ãã‹ã‚’指定ã—ã¾ã™:

          • 定数 +
          • 変数(ローカルã¾ãŸã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス)ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクト属性
          • テーブル
          • プロトタイプ (例: クラス関数)

          ãŸã¨ãˆã°ã€"変数(ローカルã¾ãŸã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス)ã‚ã‚‹ã„ã¯ã‚ªãƒ–ジェクト属性" オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€$ 文字を入力ã™ã‚‹ã¨ææ¡ˆã•れるローカル変数ã®ãƒªã‚¹ãƒˆãŒè¡¨ç¤ºã•れã¾ã™:

          ![](assets/en/Preferences/suggestionsAutoOpen.png)

          対応ã™ã‚‹ã‚ªãƒ—ションã®ãƒã‚§ãƒƒã‚¯ã‚’外ã™ã“ã¨ã§ã€è¦ç´ ã”ã¨ã«ã“ã®æ©Ÿèƒ½ã‚’無効ã«ã§ãã¾ã™ã€‚ | +| ææ¡ˆã®æ±ºå®š | メソッドエディターã§ã€è‡ªå‹•補完ウィンドウã«è¡¨ç¤ºã•れãŸã‚«ãƒ¬ãƒ³ãƒˆã®ææ¡ˆã‚’å—ã‘入れるãŸã‚ã®ã€å…¥åŠ›ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’è¨­å®šã—ã¾ã™ã€‚

          • **タブã¨åŒºåˆ‡ã‚Šæ–‡å­—**
            ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ã‚¿ãƒ–キーã¾ãŸã¯ç¾åœ¨ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«é–¢é€£ã™ã‚‹åŒºåˆ‡ã‚Šæ–‡å­—ã§ã€ç¾åœ¨é¸æŠžã•れã¦ã„ã‚‹ææ¡ˆã‚’決定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã° "ALE" ã¨å…¥åŠ›ã—㦠"(" を入力ã™ã‚‹ã¨ã€4Dã¯è‡ªå‹•ã§ "ALERT(" ã¨ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«æ›¸ãè¾¼ã¿ã¾ã™ã€‚ 区切り文字ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™:
            ( ; : = < [ {
          • **タブã®ã¿**
            ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€ç¾åœ¨ã®ææ¡ˆã¯ã‚¿ãƒ–キーを押ã—ãŸã¨ãã«ã®ã¿å—ã‘入れられã¾ã™ã€‚ ã“れã¯ç‰¹ã« ${1} ã®ã‚ˆã†ã«ã€è¦ç´ åã«åŒºåˆ‡ã‚Šæ–‡å­—を入力ã™ã‚‹ã“ã¨ã‚’容易ã«ã—ã¾ã™ã€‚

            **注記**: ウィンドウ内をダブルクリックã™ã‚‹ã‹ã€æ”¹è¡Œã‚­ãƒ¼ã‚’押ã™ã“ã¨ã§ææ¡ˆã‚’å—ã‘入れるã“ã¨ã‚‚ã§ãã¾ã™ã€‚

          | + + diff --git a/website/translated_docs/ja/Preferences/overview.md b/website/translated_docs/ja/Preferences/overview.md new file mode 100644 index 00000000000000..8c17831dc783e9 --- /dev/null +++ b/website/translated_docs/ja/Preferences/overview.md @@ -0,0 +1,43 @@ +--- +id: overview +title: æ¦‚è¦ +--- + +環境設定ã¯ã€ä½œæ¥­ç’°å¢ƒã«å½±éŸ¿ã™ã‚‹æ§˜ã€…ãªã‚ªãƒ—ションを指定ã—ã¾ã™ (例: デフォルトオプションã€è¡¨ç¤ºãƒ†ãƒ¼ãƒžã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼æ©Ÿèƒ½ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆ)。 ã“れらã®è¨­å®šã¯ã€4D ã‚„ 4D Server アプリケーションã§é–‹ãã™ã¹ã¦ã®ãƒ—ロジェクトã«é©ç”¨ã•れã¾ã™ã€‚ + +**4D Server**: 複数ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒåŒæ™‚ã«ç’°å¢ƒè¨­å®šã‚’æ›´æ–°ã—よã†ã¨ã™ã‚‹ã¨ã€ã‚ªãƒ–ジェクトã®ãƒ­ãƒƒã‚¯ãŒç™ºç”Ÿã—ã¾ã™ã€‚ 一度ã«ä¸€äººã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ã¿ãŒç’°å¢ƒè¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’使用ã§ãã¾ã™ã€‚ +> 4D ã¯é–‹ã‹ã‚Œã¦ã„るプロジェクト固有ã®è¨­å®šã‚’ãŠã“ãªã†ãŸã‚ã® **ストラクãƒãƒ£ãƒ¼è¨­å®š** ダイアログもæä¾›ã—ã¦ã„ã¾ã™ (**デザイン** メニューã‹ã‚‰åˆ©ç”¨å¯èƒ½ã§ã™)。 詳細ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +## アクセス + +環境設定ダイアログボックスã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ **編集** (Windows) ã¾ãŸã¯ **4D** アプリケーションメニュー (macOS) ã‹ã‚‰ **環境設定...** ã‚’é¸æŠžã—ã¾ã™: + +![](assets/en/Preferences/overviewAccess.png) + +ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã¯ã€ãƒ—ロジェクトãŒé–‹ã‹ã‚Œã¦ã„ãªã„å ´åˆã§ã‚‚利用ã§ãã¾ã™ã€‚ + +`OPEN SETTINGS WINDOW` コマンドやã€"環境設定" 標準アクションを (ボタンやメニューã«å‰²ã‚Šå½“ã¦ã¦) 使用ã™ã‚‹ã“ã¨ã§ã€ã‚¢ãƒ—リケーションモードã§ã‚‚環境設定ダイアログボックスを表示ã§ãã¾ã™ã€‚ + +## ストレージ + +環境設定ダイアログã«ä¿å­˜ã•れãŸè¨­å®šã¯ XMLフォーマット㧠**4D Preferences vXX.4DPreferences** ã¨ã„ã†åç§°ã®ãƒ•ァイルã«ä¿å­˜ã•れã¾ã™ã€‚ã“ã®ãƒ•ァイルã¯ã€[`Get 4D folder`](https://doc.4d.com/4Dv19/4D/19/Get-4D-folder.301-5392528.ja.html) ãŒè¿”ã™ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ã® Active 4D Folder ã«ä¿å­˜ã•れã¾ã™: + +* Windows: `{disk}\Users\{UserName}\AppData\Roaming\4D` +* macOS: `{disk}:Users:{UserName}:Library:Application Support:4D` + +## パラメーターã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã¨åˆæœŸè¨­å®š + +設定ダイアログボックスã§ã¯ã€å¤‰æ›´ã•れãŸè¨­å®šå†…容ã¯å¤ªå­—ã§è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Preferences/overviewUser.png) + +環境設定ã«ãŠã„ã¦ã¯ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§ç›´æŽ¥å¤‰æ›´ã•れãŸã‹ã€å¤‰æ›ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®å ´åˆä»¥å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§å¤‰æ›´ã•れãŸè¨­å®šãŒã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºç®‡æ‰€ã¨ã—ã¦æ‰±ã‚れã¾ã™ã€‚ + +ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã¯æ‰‹ä½œæ¥­ã§ãƒ‡ãƒ•ォルト値ã«ç½®ãæ›ãˆã‚‰ã‚ŒãŸã¨ãã«ã‚‚太字ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ‘ラメーターã¯ã™ã¹ã¦ç›®è¦–ã§è­˜åˆ¥ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã‚’ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æˆ»ã—ã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸã“ã¨ã‚’示ã™å¤ªå­—スタイルをå–り除ããŸã‚ã«ã¯ã€**åˆæœŸè¨­å®šã«ãƒªã‚»ãƒƒãƒˆ** ボタンをクリックã—ã¾ã™: + +![](assets/en/Preferences/overviewSettings.png) + +ã“ã®ãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã¨ã€ç¾åœ¨è¡¨ç¤ºã•れã¦ã„るページã®å…¨ãƒ‘ラメーターãŒãƒªã‚»ãƒƒãƒˆã•れã¾ã™ã€‚ ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã§æœ€ä½Žã§ã‚‚一ã¤ã®ãƒ‘ラメーターãŒå¤‰æ›´ã•れるã¨ã€ã“ã®ãƒœã‚¿ãƒ³ã¯ã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã«ãªã‚Šã¾ã™ã€‚ + diff --git a/website/translated_docs/ja/Preferences/shortcuts.md b/website/translated_docs/ja/Preferences/shortcuts.md new file mode 100644 index 00000000000000..0c8c87ea008c64 --- /dev/null +++ b/website/translated_docs/ja/Preferences/shortcuts.md @@ -0,0 +1,14 @@ +--- +id: shortcuts +title: ショートカットページ +--- + +ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ 4Dã®ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ä½¿ç”¨ã•れるã™ã¹ã¦ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆãŒãƒªã‚¹ãƒˆã•れã¦ã„ã¾ã™ (コピー (Ctrl+C/Command+C) ãªã©ã®ã‚·ã‚¹ãƒ†ãƒ ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’除ã)。 + +![](assets/en/Preferences/shortcuts.png) + +ショートカットを変更ã™ã‚‹ã«ã¯ã€è¨­å®šã™ã‚‹é …ç›®ã®ãƒ¢ãƒ‡ã‚£ãƒ•ァイアキー (Shift ãŠã‚ˆã³ Alt) ãŠã‚ˆã³æ–‡å­—をリスト中ã§å¤‰æ›´ã—ã¾ã™ã€‚ ã¾ãŸãƒ€ãƒ–ルクリックã™ã‚‹ã¨å°‚用ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã®ç·¨é›†ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™: + +ãれãžã‚Œã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã«ã¯æš—黙㫠**Ctrl** (Windows) ã¾ãŸã¯ **Command** (macOS) キーãŒå«ã¾ã‚Œã‚‹ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +ã“ã®ãƒªã‚¹ãƒˆã‚’編集ã™ã‚‹ã¨ã€ã‚«ã‚¹ã‚¿ãƒ ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆè¨­å®šã¯ [ユーザー Preferences ファイル](overview.md#ストレージ) ã¨åŒã˜éšŽå±¤ã«ã‚ã‚‹ *4D Shortcuts vXX.xml* ファイルã«ä¿å­˜ã•れã¾ã™ã€‚ ãã®ãŸã‚ã€4DãŒã‚¢ãƒƒãƒ—デートã•れã¦ã‚‚ã€ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆç’°å¢ƒè¨­å®šã¯æ®‹ã•れã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Preferences/structure.md b/website/translated_docs/ja/Preferences/structure.md new file mode 100644 index 00000000000000..16ac7232698112 --- /dev/null +++ b/website/translated_docs/ja/Preferences/structure.md @@ -0,0 +1,26 @@ +--- +id: structure +title: ストラクãƒãƒ£ãƒ¼ãƒšãƒ¼ã‚¸ +--- + +## プライマリーキー + +環境設定内ã®ã“れらã®ã‚ªãƒ—ションã«ã‚ˆã£ã¦ã€æ–°ã—ãテーブルãŒè¿½åŠ ã•れãŸã¨ãã€ã¾ãŸã¯ [プライマリーキー管ç†](hthttps://doc.4d.com/4Dv19/4D/19/Primary-key-manager.300-5416826.ja.html) 機能ã®ä½¿ç”¨ã«ã‚ˆã£ã¦ 4D ãŒè‡ªå‹•çš„ã«è¿½åŠ ã™ã‚‹ãƒ—ライマリーキーã®ãƒ‡ãƒ•ォルトã®åå‰ã¨åž‹ã‚’変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +次ã®ã‚ªãƒ—ションã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +* **Name** (デフォルトã§ã¯ "ID"): プライマリーキーã®ãƒ•ィールドã®ãƒ‡ãƒ•ォルトåを設定ã—ã¾ã™ã€‚ [4D ã®å‘½åè¦å‰‡](Concepts/identifiers.md#テーブルã¨ãƒ•ィールド) ã«å¾“ã†ç¯„囲内ã§ã‚れã°ã©ã‚“ãªåå‰ã‚‚使用ã§ãã¾ã™ã€‚ +* **デフォルトタイプ** (デフォルトã§ã¯ [å€é•·æ•´æ•°](Concepts/dt_number.md)): プライマリーキーフィールドã®ãƒ‡ãƒ•ォルトã®åž‹ã‚’設定ã—ã¾ã™ã€‚ UUID ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒ‡ãƒ•ォルトã§ä½œæˆã•れãŸãƒ—ライマリーキーフィールド㯠[文字型](Concepts/dt_string.md) ã¨ãªã‚Šã€**UUIDフォーマット** ã¨ã€€**自動UUID** プロパティã«ãƒã‚§ãƒƒã‚¯ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚ + +## ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ + +ã“ã®ã‚ªãƒ—ショングループã§ã¯ã€4Dストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®è¡¨ç¤ºã‚’設定ã—ã¾ã™ã€‚ + +### ストラクãƒãƒ£ãƒ¼ã®æç”»ã‚¯ã‚©ãƒªãƒ†ã‚£ + +ã“ã®ã‚ªãƒ—ションã§ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®æç”»ãƒ¬ãƒ™ãƒ«ã‚’変更ã§ãã¾ã™ã€‚ デフォルトã§å“質㯠**高** ã«è¨­å®šã•れã¦ã„ã¾ã™ã€‚ 標準å“è³ªã‚’é¸æŠžã—ã¦ã€è¡¨ç¤ºé€Ÿåº¦ã‚’優先ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®è¨­å®šã®åŠ¹æžœã¯ä¸»ã«ã‚ºãƒ¼ãƒ æ©Ÿèƒ½ã‚’使用ã™ã‚‹éš›ã«å®Ÿæ„Ÿã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ([ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼](https://doc.4d.com/4Dv19/4D/19/Structure-editor.300-5416818.ja.html) ã®ã‚ºãƒ¼ãƒ å‚ç…§)。 + +### フォルダーãŒè¡¨ç¤ºå¯¾è±¡å¤–ã®ã¨ã + +ã“ã®ã‚ªãƒ—ションã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ãƒ•ォルダーã«ã‚ˆã£ã¦é¸æŠžã™ã‚‹éš›ã®ã€ãƒ†ãƒ¼ãƒ–ルãŒè¡¨ç¤ºå¯¾è±¡å¤–ã®ã¨ãã®ã‚¢ãƒ”アランスを設定ã§ãã¾ã™ ([フォルダーã”ã¨ã«ãƒ†ãƒ¼ãƒ–ルをãƒã‚¤ãƒ©ã‚¤ãƒˆ/è–„æš—ãã™ã‚‹](https://doc.4d.com/4Dv19/4D/19/Structure-editor.300-5416818.ja.html#4592928) å‚ç…§)。 è–„æš—ã表示 (テーブルイメージã®ä»£ã‚りã«å½±ãŒè¡¨ç¤ºã•れる) ã¾ãŸã¯éžè¡¨ç¤º (テーブルã¯å®Œå…¨ã«è¦‹ãˆãªããªã‚‹) ãŒé¸æŠžã§ãã¾ã™ã€‚ + diff --git a/website/translated_docs/ja/Project/_compiling.md b/website/translated_docs/ja/Project/_compiling.md deleted file mode 100644 index 37612df00ac715..00000000000000 --- a/website/translated_docs/ja/Project/_compiling.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -id: compiling -title: Compiling a project ---- - -Compilation is an indispensable step between the development and deployment phases. When project development has reached a point where it's ready to be deployed as an application, compilation is a must. - -## Why compile a project? - -There are five fundamental benefits of compiling a database project: - -* **Faster execution** - - * Code Translation - - When a database project is compiled, the entire project code is translated into in machine language. Execution speed is therefore, faster since the need to spend time translating code statements has been removed. - - *Example* - - Take the case of a loop containing a sequence of statements that is repeated 50 times: - - For($i;1;50) - //Sequence of statements - End for - - - Before compilation, each statement in the sequence is translated 50 times. Compiling the project eliminates the translation phase for each statement. For every statement in the sequence, we save 50 translations. - - * Access to Variables and Methods - - In interpreted (not compiled) database projects, variables are accessed through a name which 4D must access in order to obtain the variable’s value. When the code is compiled, the compiler attaches an address to each variable, writes it directly in the code, and goes directly to it whenever necessary. - - > * Operations requiring disk access may not be affected because their speed of execution is limited by the rate of transmission between the computer and its peripherals (drive or hard disk). - > * Comments are not translated, don't appear in compiled code, and don't affect execution time. - -* **Code checking** - - The 4D compiler operates as a syntax checker for your database projects. It systematically checks your code and notes possible ambiguities. The entire database is scanned and each statement analyzed. Abnormalities (*i.e.*, logical and syntactical conflicts, if any) are detected and error messages or warnings are generated to alert you of the problem. - -* **Code protection** - - Once a database project is compiled, the application builder should be used to erase the interpreted code. This eliminates access to the Design environment (except for records) and commands related to development are disabled. While functionally identical to the original, the structure and procedures cannot be viewed or modified (intentionally or accidentally), so the code is protected. - -* **Stand-alone applications** - - Compiled database projects can be transformed into stand-alone applications (.EXE files) with their own icons. - -* **Preemptive mode** - - Only compiled code can be executed in a preemptive process. - -## Compilation Process - -The process of compiling a database project is entirely automatic. You can launch compilation via: - -* the **Start Compilation** command in the **Design** menu - ![](assets/en/Project/compilerdesignProj.png) -* the **Compiler** button menu associated with the of the tool bar: ![](assets/en/Project/compilertoolbarProj.png) - -Compiling is carried out using the following dialog box: - -![](assets/en/Project/compiledialogProj.png) - -Compilation is carried out in keeping with the compilation options set on the **Database Settings > Compiler** page. - -![](assets/en/Project/compilerProj.png) - -### Compilation logs - -If the *Compilation Options* to generate a symbol file or an error file is checked in the Compiler page of the Database Settings (see image above), they will be generated during compilation and placed in the the **Logs** folder with the naming convention: *\_symbols.txt* and *\_errors.xml*. - -## Integrated compiler - -The compiler in 4D compiles the database methods, project methods, triggers, form methods and object methods in your database. If you do not have any of these elements in an application, the compiler will have nothing to compile. - -For more in-depth information about the compiler and how to use it, see [Compiler](https://livedoc.4d.com/What-s-new/4D-Language-Reference-18/Compiler.201-4504364.en.html). \ No newline at end of file diff --git a/website/translated_docs/ja/Project/architecture.md b/website/translated_docs/ja/Project/architecture.md index 556168590e24d4..2d6849f7eddb65 100644 --- a/website/translated_docs/ja/Project/architecture.md +++ b/website/translated_docs/ja/Project/architecture.md @@ -1,149 +1,155 @@ --- id: architecture -title: 4D プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ +title: プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ --- -4D プロジェクトã¯ã€ä¸€ã¤ã®è¦ªãƒ—ロジェクトフォルダー (パッケージフォルダー) ã«æ ¼ç´ã•れãŸã€è¤‡æ•°ã®ãƒ•ァイルやフォルダーã‹ã‚‰æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°: - -- MyProject - - コンãƒãƒ¼ãƒãƒ³ãƒˆ - - Data - - Logs - - Settings - - Documentation - - Plugins - - Project - - DerivedData - - Sources - - Trash - - Resources - - Settings - - userPreference.username - - WebFolder - -> ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å¤‰æ›ã•れãŸãƒ—ロジェクトã®å ´åˆã«ã¯ã€è¿½åŠ ã®ãƒ•ォルダーãŒå­˜åœ¨ã—ã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ (doc.4d.com ã«ã¦ "[データベースをプロジェクトモードã«å¤‰æ›ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" å‚ç…§)。 +4D プロジェクトã¯ã€ä¸€ã¤ã®è¦ªã‚¢ãƒ—リケーションフォルダー (パッケージフォルダー) ã«æ ¼ç´ã•れãŸã€è¤‡æ•°ã®ãƒ•ァイルやフォルダーã‹ã‚‰æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°: + +- MyProject + - `Components` + - `Data` + - `Logs` + - `Settings` + - `Documentation` + - `Plugins` + - `Project` + - `DerivedData` + - `Sources` + - `Trash` + - `Resources` + - `Settings` + - `userPreferences.jSmith` + - `WebFolder` + +> ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å¤‰æ›ã•れãŸãƒ—ロジェクトã®å ´åˆã«ã¯ã€è¿½åŠ ã®ãƒ•ォルダーãŒå­˜åœ¨ã—ã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ (doc.4d.com ã«ã¦ "[データベースをプロジェクトモードã«å¤‰æ›ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" å‚ç…§)。 + ## Project フォルダー 典型的㪠Project ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ§‹é€ ã§ã™: -- *databaseName*.4DProject ファイル -- Sources - + クラス - + DatabaseMethods - + メソッド - + フォーム - + TableForms - + Triggers -+ DerivedData -+ Trash (ã‚れã°) +- `.4DProject` ファイル +- `Sources` + + `Classes` + + `DatabaseMethods` + + `Methods` + + `Forms` + + `TableForms` + + `Triggers` +- `DerivedData` +- `Trash` (ã‚れã°) -### *databaseName*.4DProject ファイル + +### `.4DProject` ファイル プロジェクトを定義ã—ã€èµ·å‹•ã™ã‚‹ãŸã‚ã®ãƒ—ロジェクト開発ファイルã§ã™ã€‚ ã“ã®ãƒ•ァイルを開ãã«ã¯æ¬¡ã®ã„ãšã‚Œã‹ãŒå¿…è¦ã§ã™: -- 4D Developer -- 4D Server (デザインモードã¯èª­ã¿å–り専用;[プロジェクトã®é–‹ç™º](developing.md) å‚ç…§) +- 4D +- 4D Server (読ã¿å–り専用;[リモートプロジェクトを開ã](Desktop/clientServer.md#リモートプロジェクトを開ã) å‚ç…§) + +> 4D プロジェクトã®é–‹ç™ºã¯ 4D ã«ã‚ˆã£ã¦ãŠã“ãªã„ã€ãƒžãƒ«ãƒãƒ¦ãƒ¼ã‚¶ãƒ¼é–‹ç™ºã¯ã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ„ールã«ã‚ˆã£ã¦ç®¡ç†ã—ã¾ã™ã€‚ 4D Server 㯠.4DProject ファイルを開ãã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®é–‹ç™ºã¯ãŠã“ãªãˆã¾ã›ã‚“。 -**注:** 4D プロジェクトã®é–‹ç™ºã¯ 4D Developer ã«ã‚ˆã£ã¦ãŠã“ãªã„ã€ãƒžãƒ«ãƒãƒ¦ãƒ¼ã‚¶ãƒ¼é–‹ç™ºã¯ã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ„ールã«ã‚ˆã£ã¦ç®¡ç†ã—ã¾ã™ã€‚ 4D Server 㯠.4DProject ファイルを開ãã“ã¨ãŒã§ãã¾ã™ãŒã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®é–‹ç™ºã¯ãŠã“ãªãˆã¾ã›ã‚“。 -### Sources フォルダー +### `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 フォルダー +#### `DatabaseMethods` | 内容 | 説明 | å½¢å¼ | | ------------------------ | -------------------------------------------------- | ---- | -| *databaseMethodName*.4dm | データベース内ã§å®šç¾©ã•れã¦ã„るデータベースメソッド (1ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¤ã1ファイル)。 | テキスト | - +| *databaseMethodName*.4dm | プロジェクト内ã§å®šç¾©ã•れã¦ã„るデータベースメソッド (1ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¤ã1ファイル)。 | text | -#### Methods フォルダー +#### `メソッド` -| 内容 | 説明 | å½¢å¼ | -| ---------------- | -------------------------------------------- | ---- | -| *methodName*.4dm | データベース内ã§å®šç¾©ã•れã¦ã„るプロジェクトメソッド (1ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¤ã1ファイル)。 | テキスト | +| 内容 | 説明 | å½¢å¼ | +| ---------------- | --------------------------------------------- | ---- | +| *methodName*.4dm | プロジェクト内ã§å®šç¾©ã•れã¦ã„るプロジェクトメソッド (1ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã¤ã1ファイル)。 | text | - -#### Classes フォルダー +#### `クラス` | 内容 | 説明 | å½¢å¼ | | --------------- | --------------------------------------------------------------------- | ---- | -| *className*.4dm | 特定ã®ã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ãŸã‚ã®ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ç”¨ã®å®šç¾©ãƒ¡ã‚½ãƒƒãƒ‰ã€‚ 1クラスã«ã¤ã1ファイル。ファイルåãŒã‚¯ãƒ©ã‚¹åã«ãªã‚Šã¾ã™ã€‚ | テキスト | - - -#### Forms フォルダー +| *className*.4dm | 特定ã®ã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ãŸã‚ã®ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¯ãƒ©ã‚¹ç”¨ã®å®šç¾©ãƒ¡ã‚½ãƒƒãƒ‰ã€‚ 1クラスã«ã¤ã1ファイル。ファイルåãŒã‚¯ãƒ©ã‚¹åã«ãªã‚Šã¾ã™ã€‚ | text | -| 内容 | 説明 | å½¢å¼ | -| ----------------------------------------- | ---------------------------------- | ------- | -| *formName*/form.4DForm | プロジェクトフォームã®å®šç¾© | JSON | -| *formName*/method.4dm | プロジェクトフォームメソッド | テキスト | -| *formName*/Images/*pictureName* | プロジェクトフォームã®ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼ | picture | -| *formName*/ObjectMethods/*objectName*.4dm | オブジェクトメソッド (1ã¤ã®ã‚ªãƒ–ジェクトメソッドã«ã¤ã1ファイル) | テキスト | +#### `フォーム` -#### TableForms フォルダー +| 内容 | 説明 | å½¢å¼ | +| ----------------------------------------- | ----------------------------------- | ----- | +| *formName*/form.4DForm | プロジェクトフォームã®å®šç¾© | json | +| *formName*/method.4dm | プロジェクトフォームメソッド | text | +| *formName*/Images/*pictureName* | プロジェクトフォームã®ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼ | ピクãƒãƒ£ãƒ¼ | +| *formName*/ObjectMethods/*objectName*.4dm | オブジェクトメソッド (1ã¤ã®ã‚ªãƒ–ジェクトメソッドã«ã¤ã1ファイル) | text | -| 内容 | 説明 | å½¢å¼ | -| ---------------------------------------------------- | --------------------------------------------- | ------- | -| *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ファイル) | テキスト | +#### `TableForms` +| 内容 | 説明 | å½¢å¼ | +| ---------------------------------------------------- | ---------------------------------------------- | ----- | +| *n*/Input/*formName*/form.4DForm | 入力テーブルフォームã®å®šç¾© (n: テーブル番å·) | json | +| *n*/Input/*formName*/Images/*pictureName* | 入力テーブルフォームã®ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼ | ピクãƒãƒ£ãƒ¼ | +| *n*/Input/*formName*/method.4dm | 入力テーブルフォームã®ãƒ•ォームメソッド | text | +| *n*/Input/*formName*/ObjectMethods/*objectName*.4dm | 入力テーブルフォームã®ã‚ªãƒ–ジェクトメソッド (1ã¤ã®ã‚ªãƒ–ジェクトメソッドã«ã¤ã1ファイル) | text | +| *n*/Output/*formName*/form.4DForm | 出力テーブルフォーム (n: テーブル番å·) | json | +| *n*/Output/*formName*/Images/*pictureName* | 出力テーブルフォームã®ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼ | ピクãƒãƒ£ãƒ¼ | +| *n*/Output/*formName*/method.4dm | 出力テーブルフォームã®ãƒ•ォームメソッド | text | +| *n*/Output/*formName*/ObjectMethods/*objectName*.4dm | 出力テーブルフォームã®ã‚ªãƒ–ジェクトメソッド (1ã¤ã®ã‚ªãƒ–ジェクトメソッドã«ã¤ã1ファイル) | text | -#### Triggers フォルダー - -| 内容 | 説明 | å½¢å¼ | -| ------------- | ---------------------------------------------------- | ---- | -| table_*n*.4dm | データベース内ã§å®šç¾©ã•れã¦ã„るトリガーメソッド ( 1ã¤ã®ãƒ†ãƒ¼ãƒ–ルã«ã¤ã1ファイル;n: テーブル番å·) | テキスト | +#### `Triggers` +| 内容 | 説明 | å½¢å¼ | +| ------------- | ----------------------------------------------------- | ---- | +| table_*n*.4dm | プロジェクト内ã§å®šç¾©ã•れã¦ã„るトリガーメソッド ( 1ã¤ã®ãƒ†ãƒ¼ãƒ–ルã«ã¤ã1ファイル;n: テーブル番å·) | text | **注:** æ‹¡å¼µå­ .4dm ã®ãƒ•ァイルã¯ã€4D メソッドã®ã‚³ãƒ¼ãƒ‰ã‚’テキスト形å¼ã§æ ¼ç´ã—ã¦ãŠã‚Šã€ ソース管ç†ãƒ„ールã«å¯¾å¿œã—ã¦ã„ã¾ã™ã€‚ -### Trash フォルダー + +### `Trash` プロジェクトã‹ã‚‰å‰Šé™¤ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã‚„フォームãŒã‚れã°ã€Trash フォルダーã«ã¯ãã‚Œã‚‰ãŒæ ¼ç´ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã¤ãŽã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ ¼ç´ã•れã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™: -- メソッド -- フォーム -- TableForms +- `Methods` +- `Forms` +- `TableForms` 削除ã•れãŸè¦ç´ ã¯ãƒ•ァイルåã«æ‹¬å¼§ãŒä»˜ã„ãŸå½¢ã§ãƒ•ォルダー内ã«ç½®ã‹ã‚Œã¾ã™ (例: "(myMethod).4dm")。 ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®æ§‹æˆã¯ [Sources](#sources) フォルダーã¨åŒã˜ã§ã™ã€‚ -### DerivedData フォルダー + +### `DerivedData` DerivedData フォルダーã«ã¯ã€å‡¦ç†ã‚’最é©åŒ–ã™ã‚‹ãŸã‚ 4D ãŒå†…部的ã«ä½¿ç”¨ã™ã‚‹ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãƒ‡ãƒ¼ã‚¿ãƒ¼ãŒæ ¼ç´ã•れã¾ã™ã€‚ ã“れらã¯å¿…è¦ã«å¿œã˜ã¦è‡ªå‹•çš„ã«ç”Ÿæˆãƒ»å†ç”Ÿæˆã•れã¾ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ç„¡è¦–ã—ã¦ã‹ã¾ã„ã¾ã›ã‚“。 -## Resources フォルダー +## `Libraries` + +> ã“ã®ãƒ•ォルダー㯠macOS ã§ã®ã¿ä½¿ç”¨ã•れã¾ã™ã€‚ + +Libraries フォルダーã«ã¯ã€macOS 上㧠[Apple Silicon用ã«ã‚³ãƒ³ãƒ‘イル](compiler.md#siliconコンパイラ) ã•れãŸçµæžœã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ -Resources フォルダーã«ã¯ã€è¿½åŠ ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒªã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã‚„ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ãŒæ ¼ç´ã•れã¾ã™ã€‚ アプリケーションインターフェースã®ç¿»è¨³ã‚„カスタマイズã«å¿…è¦ãªãƒ•ァイルã¯ã™ã¹ã¦ã“ã“ã«æ ¼ç´ã—ã¾ã™ (ピクãƒãƒ£ãƒ¼ã€ãƒ†ã‚­ã‚¹ãƒˆã€XLIFF ファイルãªã©)。 4D ã¯è‡ªå‹•ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã‚ˆã£ã¦ãƒ•ォルダー内ã®ãƒ•ァイル (ã¨ãã« XLIFF ファイルãŠã‚ˆã³ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒ”クãƒãƒ£ãƒ¼) を扱ã„ã¾ã™ã€‚ リモートモードã«ãŠã„ã¦ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã¨ã™ã¹ã¦ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³é–“ã§ãƒ•ァイルを共有ã™ã‚‹ã“ã¨ãŒ Resources フォルダーã«ã‚ˆã£ã¦å¯èƒ½ã§ã™ (*4D Server リファレンスマニュアル* ã® [リソースフォルダã®ç®¡ç†](https://doc.4d.com/4Dv18/4D/18/Managing-the-Resources-folder.300-4672420.ja.html) ã‚’å‚ç…§ãã ã•ã„)。 +## `Resources` -| 内容 | 説明 | å½¢å¼ | -| --------------------- | ------------------------------------------------------------------------- | ------- | -| *item* | データベースリソースファイルã¨ãƒ•ォルダー | 様々 | -| Images/Library/*item* | ピクãƒãƒ£ãƒ¼ãƒ©ã‚¤ãƒ–ラリã®å€‹åˆ¥ãƒ”クãƒãƒ£ãƒ¼ãƒ•ァイル(*)。 å„アイテムã®åç§°ãŒãƒ•ァイルåã¨ãªã‚Šã¾ã™ã€‚ åç§°ãŒé‡è¤‡ã™ã‚‹å ´åˆã«ã¯ã€åç§°ã«ç•ªå·ãŒè¿½åŠ ã•れã¾ã™ã€‚ | picture | +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* | ピクãƒãƒ£ãƒ¼ãƒ©ã‚¤ãƒ–ラリã®å€‹åˆ¥ãƒ”クãƒãƒ£ãƒ¼ãƒ•ァイル(*)。 å„アイテムã®åç§°ãŒãƒ•ァイルåã¨ãªã‚Šã¾ã™ã€‚ åç§°ãŒé‡è¤‡ã™ã‚‹å ´åˆã«ã¯ã€åç§°ã«ç•ªå·ãŒè¿½åŠ ã•れã¾ã™ã€‚ | ピクãƒãƒ£ãƒ¼ | (*) .4db ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰å¤‰æ›ã•れãŸãƒ—ロジェクトã®å ´åˆã®ã¿ -## Data フォルダー + +## `Data` Data フォルダーã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ã»ã‹ã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã‚ã‚‹ã™ã‚‹ãƒ•ァイルやフォルダーãŒã™ã¹ã¦æ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ @@ -153,79 +159,84 @@ Data フォルダーã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ã»ã‹ã€ãƒ‡ãƒ¼ã‚¿ã«é–¢ã‚ | data.journal | データベースãŒãƒ­ã‚°ãƒ•ァイルを使用ã™ã‚‹å ´åˆã®ã¿ä½œæˆã•れã¾ã™ã€‚ ログファイルã¯2ã¤ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—é–“ã®ãƒ‡ãƒ¼ã‚¿ä¿è­·ã‚’確実ãªã‚‚ã®ã«ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã•れã¾ã™ã€‚ データã«å¯¾ã—ã¦å®Ÿè¡Œã•れãŸã™ã¹ã¦ã®å‡¦ç†ãŒã€ã“ã®ãƒ•ァイルã«é †ç•ªã«è¨˜éŒ²ã•れã¾ã™ã€‚ ã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ã«å¯¾ã—ã¦æ“作ãŒãŠã“ãªã‚れるãŸã³ã«ã€ãƒ‡ãƒ¼ã‚¿ä¸Šã®å‡¦ç† (æ“作ã®å®Ÿè¡Œ) ã¨ãƒ­ã‚°ãƒ•ァイル上ã®å‡¦ç† (æ“作ã®è¨˜éŒ²) ã¨ã„ㆠ2ã¤ã®å‡¦ç†ãŒåŒæ™‚ã«ç™ºç”Ÿã—ã¾ã™ã€‚ ログファイルã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®å‡¦ç†ã‚’妨ã’ãŸã‚Šé…ãã—ãŸã‚Šã™ã‚‹ã“ã¨ãªãã€ç‹¬ç«‹ã—ã¦æ§‹ç¯‰ã•れã¾ã™ã€‚ データベース㯠1ã¤ã®ãƒ­ã‚°ãƒ•ァイルã—ã‹åŒæ™‚ã«ä½¿ç”¨ã§ãã¾ã›ã‚“。 ログファイルã«ã¯ãƒ¬ã‚³ãƒ¼ãƒ‰ã®è¿½åŠ ãƒ»æ›´æ–°ãƒ»å‰Šé™¤ã‚„ãƒˆãƒ©ãƒ³ã‚¶ã‚¯ã‚·ãƒ§ãƒ³ãªã©ã®å‡¦ç†ãŒè¨˜éŒ²ã•れã¾ã™ã€‚ ログファイルã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒä½œæˆã•れる際ã«ãƒ‡ãƒ•ォルトã§ç”Ÿæˆã•れã¾ã™ã€‚ | ãƒã‚¤ãƒŠãƒª | | data.match | (内部用) テーブル番å·ã«å¯¾å¿œã™ã‚‹ UUID | XML | - (*) .4db ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ—ロジェクトã«å¤‰æ›ã—ãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯å¤‰æ›ã«ã‚ˆã‚‹å½±éŸ¿ã‚’å—ã‘ã¾ã›ã‚“。 ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®å称を変更ã—ã¦ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -### Settings フォルダー +### `Settings` -Settings フォルダーã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ç®¡ç†ã«ä½¿ç”¨ã•れる **データファイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®š** ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ +Settings フォルダーã«ã¯ã€ã‚¢ãƒ—リケーションã®ç®¡ç†ã«ä½¿ç”¨ã•れる **データファイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®š** ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ -> ã“ã®è¨­å®šã¯ **[ユーザー設定](#settings-folder-1)** ã‚„ **ストラクãƒãƒ£ãƒ¼è¨­å®š** より優先ã•れã¾ã™ã€‚ +> ã“ã®è¨­å®šã¯ **[ユーザー設定](#settings-フォルダー-1)** ã‚„ **[ストラクãƒãƒ£ãƒ¼è¨­å®š](#sources-フォルダー)** より優先ã•れã¾ã™ã€‚ | 内容 | 説明 | å½¢å¼ | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | +| directory.json | ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ã£ã¦ã‚¢ãƒ—リケーションãŒå®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã™ã‚‹ 4D グループã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãŠã‚ˆã³ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®å®šç¾© | JSON | | Backup.4DSettings | ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã™ã‚‹ [ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—オプション](Backup/settings.md) を定義ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã§ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ã«ä½¿ã‚れるキーã«ã¤ã„ã¦ã®èª¬æ˜Žã¯ [ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—設定ファイル](https://doc.4d.com/4Dv18/4D/18/4D-XML-Keys-Backup.100-4673706.ja.html) マニュアルをå‚ç…§ãã ã•ã„。 | XML | -| settings.4DSettings | データファイル用ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®š | XML | -| directory.json | ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒå®Ÿè¡Œã•れã¦ã„ã‚‹å ´åˆã«ä½¿ç”¨ã™ã‚‹ 4D グループã¨ãƒ¦ãƒ¼ã‚¶ãƒ¼ã€ãŠã‚ˆã³ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã®å®šç¾© | JSON | +| settings.4DSettings | データファイル用ã®ã‚«ã‚¹ã‚¿ãƒ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šã€‚ | XML | -### Logs フォルダー +### `Logs` Logs フォルダーã«ã¯ã€ãƒ—ロジェクトãŒä½¿ç”¨ã™ã‚‹ã™ã¹ã¦ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ 以下ã®ãƒ­ã‚°ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™: - ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å¤‰æ› - Webサーãƒãƒ¼ãƒªã‚¯ã‚¨ã‚¹ãƒˆ -- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/復元アクションã®ã‚¸ãƒ£ãƒ¼ãƒŠãƒ« (*Backup Journal\[xxx].txt*ã€[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル](Backup/backup.md#ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル) å‚ç…§) +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/復元アクションã®ã‚¸ãƒ£ãƒ¼ãƒŠãƒ« (*Backup Journal\[xxx].txt*ã€[ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ジャーナル](Backup/backup.md#backup-journal) å‚ç…§) - コマンドデãƒãƒƒã‚° - 4D Serverリクエスト (クライアントマシンãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ç”Ÿæˆ) -> データフォルダーãŒèª­ã¿å–り専用モードã®å ´åˆã‚„メンテナンスログファイルã®ä¿å­˜ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー (Active 4D Folder ã®ã“ã¨ã€è©³ã—ã㯠[Get 4D folder](https://doc.4d.com/4Dv18/4D/18/Get-4D-folder.301-4505365.ja.html) コマンドå‚ç…§) 内ã«ã‚ã‚‹ Logs フォルダーãŒåˆ©ç”¨ã•れã¾ã™ã€‚ +> データフォルダーãŒèª­ã¿å–り専用モードã®å ´åˆã‚„メンテナンスログファイルã®ä¿å­˜ã«ã¯ã€ã‚·ã‚¹ãƒ†ãƒ ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー (Active 4D Folder ã®ã“ã¨ã€è©³ã—ã㯠[Get 4D folder](https://doc.4d.com/4Dv18R4/4D/18-R4/Get-4D-folder.301-4982857.ja.html) コマンドå‚ç…§) 内ã«ã‚ã‚‹ Logs フォルダーãŒåˆ©ç”¨ã•れã¾ã™ã€‚ -## Settings フォルダー +## `Settings` -ã“ã®ãƒ•ォルダーã«ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ç®¡ç†ã«ä½¿ç”¨ã•れる **ユーザー設定** ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ å¿…è¦ã«å¿œã˜ã¦ã“ã®ãƒ•ォルダーã«ãƒ•ァイルãŒè¿½åŠ ã•れã¾ã™ã€‚ +Settings フォルダーã«ã¯ã€ã‚¢ãƒ—リケーションã®ç®¡ç†ã«ä½¿ç”¨ã•れる **ユーザー設定** ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ -> [Data フォルダー](#settings-フォルダー)ã® Setting フォルダー内ã«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ァイルãŒã‚ã‚‹å ´åˆã«ã¯ã€ãã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ +> ã“ã®è¨­å®šã¯ **[ストラクãƒãƒ£ãƒ¼è¨­å®š](#sources-フォルダー)** より優先ã•れã¾ã™ã€‚ ãŸã ã—ã€**[データファイル用ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ァイル](#settings-フォルダー)** ãŒå­˜åœ¨ã™ã‚‹å ´åˆã«ã¯ã€ãã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ | 内容 | 説明 | å½¢å¼ | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | | 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.` +ブレークãƒã‚¤ãƒ³ãƒˆã‚„ウィンドウã®ä½ç½®ãªã©ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç’°å¢ƒè¨­å®šã‚’定義ã™ã‚‹ãƒ•ァイルを格ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ç„¡è¦–ã—ã¦ã‹ã¾ã„ã¾ã›ã‚“。 æ ¼ç´ã•れるファイルã®ä¾‹ã§ã™: -## userPreferences.*userName* フォルダー +| 内容 | 説明 | å½¢å¼ | +| -------------------------- | ----------------------------------- | ------ | +| methodPreferences.json | カレントユーザーã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ç’°å¢ƒè¨­å®š | JSON | +| methodWindowPositions.json | カレントユーザーã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒã‚¸ã‚·ãƒ§ãƒ³ | JSON | +| formWindowPositions.json | カレントユーザーã®ãƒ•ォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒã‚¸ã‚·ãƒ§ãƒ³ | JSON | +| workspace.json | é–‹ã‹ã‚Œã¦ã„るウィンドウã®ãƒªã‚¹ãƒˆï¼›macOS ã§ã¯ã‚¿ãƒ–ウィンドウã®é †åº | JSON | +| debuggerCatches.json | キャッãƒã‚³ãƒžãƒ³ãƒ‰ãƒªã‚¹ãƒˆ | JSON | +| recentTables.json | 最近開ã‹ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆ | JSON | +| preferences.4DPreferences | カレントデータパスãŠã‚ˆã³ä¸»ãªã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä½ç½® | XML | +| CompilerIntermediateFiles | Apple Silicon用ã«ã‚³ãƒ³ãƒ‘イルã—ãŸçµæžœç”Ÿæˆã•れる中間ファイル | Folder | -ブレークãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ãªã©ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ç’°å¢ƒè¨­å®šã‚’定義ã™ã‚‹ãƒ•ァイルを格ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ç„¡è¦–ã—ã¦ã‹ã¾ã„ã¾ã›ã‚“。 æ ¼ç´ã•れるファイルã®ä¾‹ã§ã™: -| 内容 | 説明 | å½¢å¼ | -| ---------------------------- | ---------------------------------- | ---- | -| methodPreferences.json | カレントユーザーã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ç’°å¢ƒè¨­å®š | JSON | -| methodWindowPositions.json | カレントユーザーã®ãƒ¡ã‚½ãƒƒãƒ‰ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒã‚¸ã‚·ãƒ§ãƒ³ | JSON | -| formWindowPositions.json | カレントユーザーã®ãƒ•ォームã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãƒã‚¸ã‚·ãƒ§ãƒ³ | JSON | -| workspace.json | é–‹ã‹ã‚Œã¦ã„るウィンドウã®ãƒªã‚¹ãƒˆï¼›macOS ã§ã¯ã‚¿ãƒ–ウィンドウã®é †åº | JSON | -| debuggerCatches.json | キャッãƒã‚³ãƒžãƒ³ãƒ‰ãƒªã‚¹ãƒˆ | JSON | -| recentTables.json | 最近開ã‹ã‚ŒãŸãƒ†ãƒ¼ãƒ–ルã®ãƒªã‚¹ãƒˆ | JSON | -| preferencesv15.4DPreferences | ユーザー環境設定 | JSON | +## `Components` +アプリケーションプロジェクトãŒåˆ©ç”¨ã™ã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æ ¼ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ã€Project フォルダーã¨åŒã˜éšŽå±¤ã«ç½®ãã¾ã™ã€‚ -## Components フォルダー +> アプリケーションプロジェクトã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™:
          - 開発ã«ãŠã„ã¦ã¯ã€ãƒ›ã‚¹ãƒˆãƒ—ロジェクト㮠Components フォルダー㫠.4dproject ファイルã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’ç½®ãã¾ã™ã€‚ - é‹ç”¨æ™‚ã«ãŠã„ã¦ã¯ã€[コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルド](Desktop/building.md#コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルド) ã—ã€ç”Ÿæˆã•れ㟠.4dz ファイルを .4dbase ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã—ã€ãれをホストアプリケーション㮠Components フォルダーã«ç½®ãã¾ã™ã€‚ -プロジェクトデータベースãŒåˆ©ç”¨ã™ã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’æ ¼ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ã€Project フォルダーã¨åŒã˜éšŽå±¤ã«ç½®ãã¾ã™ã€‚ -> プロジェクトデータベースã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã¨ã—ã¦åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -> - 開発ã«ãŠã„ã¦ã¯ã€ãƒ›ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ¼ãƒ™ãƒ¼ã‚¹ã® Components フォルダー㫠.4dproject ファイルã®ã‚¨ã‚¤ãƒªã‚¢ã‚¹ã‚’ç½®ãã¾ã™ã€‚ - é‹ç”¨æ™‚ã«ãŠã„ã¦ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルド㗠([プロジェクトパッケージã®ãƒ“ルド](building.md))ã€ç”Ÿæˆã•れ㟠.4dz ファイルを .4dbase ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã—ã€ãれをホストデータベース㮠Components フォルダーã«ç½®ãã¾ã™ã€‚ +## `Plugins` -## Plugins フォルダー +アプリケーションプロジェクトãŒåˆ©ç”¨ã™ã‚‹ãƒ—ラグインを格ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ã€Project フォルダーã¨åŒã˜éšŽå±¤ã«ç½®ãã¾ã™ã€‚ -プロジェクトデータベースãŒåˆ©ç”¨ã™ã‚‹ãƒ—ラグインを格ç´ã™ã‚‹ãƒ•ォルダーã§ã™ã€‚ ã“ã®ãƒ•ォルダーã¯ã€Project フォルダーã¨åŒã˜éšŽå±¤ã«ç½®ãã¾ã™ã€‚ -## Documentation フォルダー +## `Documentation` ã“ã®ãƒ•ォルダーã«ã¯ã€ã‚¯ãƒ©ã‚¹ãƒ»ãƒ¡ã‚½ãƒƒãƒ‰ãƒ»ãƒ•ォームãªã©ã®ãƒ—ロジェクトè¦ç´ ã«ã¤ã„ã¦ä½œæˆã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイル (.md) ãŒã™ã¹ã¦æ ¼ç´ã•れã¾ã™ã€‚ ドキュメンテーションファイルã¯ã€4D エクスプローラーã«ã¦è¡¨ç¤ºãƒ»ç®¡ç†ã•れã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³](Project/documentation.md) ã‚’å‚ç…§ãã ã•ã„。 -## WebFolder +## `WebFolder` + +ページã€ãƒ”クãƒãƒ£ãƒ¼ãªã©ã®ãŸã‚ã®ã€4D Web サーãƒãƒ¼ã®ãƒ‡ãƒ•ォルトã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダー。 Web サーãƒãƒ¼ãŒåˆå›žèµ·å‹•時ã«ã€è‡ªå‹•ã§ä½œæˆã•れã¾ã™ã€‚ + +## `.gitignore` ファイル (ä»»æ„) -ページã€ãƒ”クãƒãƒ£ãƒ¼ãªã©ã®ãŸã‚ã®ã€4D Web サーãƒãƒ¼ã®ãƒ‡ãƒ•ォルトã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダー。 Web サーãƒãƒ¼ãŒåˆå›žèµ·å‹•時ã«ã€è‡ªå‹•ã§ä½œæˆã•れã¾ã™ã€‚ \ No newline at end of file +git ãŒç„¡è¦–ã™ã‚‹ãƒ•ァイルを指定ã—ã¾ã™ã€‚ プロジェクト㫠gitignore ファイルをå«ã‚ã‚‹ã«ã¯ã€ç’°å¢ƒè¨­å®š > **一般** ページ㮠**.gitignore ファイルを作æˆã™ã‚‹** オプションを使用ã—ã¾ã™ã€‚ ã“ã®ãƒ•ァイルã®å†…容を設定ã™ã‚‹ã«ã¯ã€[`.gitignore` ファイルを作æˆã™ã‚‹](Preferences/general.md#gitignore-ファイルを作æˆã™ã‚‹) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 diff --git a/website/translated_docs/ja/Project/building.md b/website/translated_docs/ja/Project/building.md deleted file mode 100644 index fc540803d998c8..00000000000000 --- a/website/translated_docs/ja/Project/building.md +++ /dev/null @@ -1,539 +0,0 @@ ---- -id: building -title: プロジェクトパッケージã®ãƒ“ルド ---- - -4D Developer ã«ã¯ãƒ—ロジェクトパッケージ (ファイナルビルド) を作æˆã™ã‚‹ãŸã‚ã®ã‚¢ãƒ—リケーションビルダーãŒçµ±åˆã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ“ルダーを使用ã™ã‚Œã°ã€ã‚³ãƒ³ãƒ‘イルã•れ㟠4D アプリケーションã®å±•開を簡易化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ OS ã”ã¨ã«ç•°ãªã‚‹ç‰¹å®šã®å‡¦ç†ã‚’自動ã§å‡¦ç†ã—ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®å±•é–‹ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ - -アプリケーションビルダーã§ã¯ä»¥ä¸‹ã®ã“ã¨ã‚’行ãˆã¾ã™: - -* インタープリターコードをå«ã¾ãªã„コンパイル済ã¿ã‚¢ãƒ—リケーションã®ãƒ“ルド -* ダブルクリックã§èµ·å‹•å¯èƒ½ãªã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーションã®ãƒ“ルド (4D ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¨ãƒ³ã‚¸ãƒ³ã§ã‚ã‚‹ 4D Volume Desktop を組ã¿è¾¼ã‚“ã  4D アプリケーション) -* XMLå½¢å¼ã®ãƒ—ロジェクトファイル定義を用ã„ã¦ã€åŒã˜ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ç•°ãªã‚‹ã‚¢ãƒ—リケーションã®ãƒ“ルド -* クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ãƒ“ルド -* クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã®è‡ªå‹•更新機能を備ãˆãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ãƒ“ルド -* ビルド設定ã®ä¿å­˜ (*設定ä¿å­˜* ボタン) - -## アプリケーションã®ãƒ“ルド - -プロジェクトパッケージをビルドã™ã‚‹ã«ã¯æ¬¡ã®æ–¹æ³•ãŒã‚りã¾ã™: - -- [BUILD APPLICATION](https://doc.4d.com/4Dv18/4D/18/BUILD-APPLICATION.301-4505371.ja.html) コマンドを使ㆠ-- [アプリケーションビルド](#application-builder)ウィンドウを使ㆠ- -ã“ã®ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’é–‹ãã«ã¯ 4D ã®**デザイン**メニューã‹ã‚‰**アプリケーションビルド...**ã‚’é¸æŠžã—ã¾ã™ã€‚ - -![](assets/en/Project/buildappProj.png) - -アプリケーションビルドウィンドウã«ã¯è¤‡æ•°ã®ãƒšãƒ¼ã‚¸ãŒã‚りã€ã‚¿ãƒ–を使用ã—ã¦ãƒšãƒ¼ã‚¸ã‚’移動ã§ãã¾ã™: - -![](assets/en/Project/appbuilderProj.png) - -ビルドをãŠã“ãªã†å‰ã«ã‚¢ãƒ—リケーションã¯ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã¾ã ã‚³ãƒ³ãƒ‘イルã•れã¦ã„ãªã„アプリケーションã§ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ³ãƒ‘イル後ã«ã‚³ãƒ¼ãƒ‰ãŒå¤‰æ›´ã•れã¦ã„ã‚‹ã¨ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’ (å†) コンパイルã—ãªã‘れã°ãªã‚‰ãªã„æ—¨ã®è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -### アプリケーションビルド設定 - -アプリケーションビルドã«é–¢ã‚ã‚‹å„パラメーター設定㯠XML キーã®å½¢ã§ã€"buildApp.4DSettings" ã¨ã„ã†åç§°ã®ã‚¢ãƒ—リケーションプロジェクトファイルã«ä¿å­˜ã•れã¾ã™ã€‚ã“ã® XML ファイルã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã® Settings フォルダーã«é…ç½®ã•れã¾ã™ã€‚ - -アプリケーションビルドダイアログãŒåˆã‚ã¦è¡¨ç¤ºã•れるã¨ãã«ã¯ãƒ‡ãƒ•ォルトパラメーターãŒä½¿ç”¨ã•れã¾ã™ã€‚ **ビルド** ボタンや **設定ä¿å­˜** ボタンをクリックã™ã‚‹ã¨ã€ã“ã®ãƒ—ロジェクトファイルã®å†…å®¹ãŒæ›´æ–°ã•れã¾ã™ã€‚ åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ã¤ã„ã¦å†…容ã®ç•°ãªã‚‹è¤‡æ•°ã® XML ファイルを定義ã—ã€[BUILD APPLICATION](https://doc.4d.com/4Dv18/4D/18/BUILD-APPLICATION.301-4505371.ja.html) コマンドã§ãれらを使ã„分ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -ã¾ãŸã€XML キーを使用ã™ã‚Œã°ã€ã‚¢ãƒ—リケーションビルドダイアログã«ã¯è¡¨ç¤ºã•れãªã„追加ã®è¨­å®šã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳細ã¯å°‚用ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ [アプリケーションビルド設定ファイル](https://doc.4d.com/4Dv18/4D/18/4D-XML-Keys-BuildApplication.100-4670981.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -### ログファイル - -アプリケーションをビルドã™ã‚‹ã¨ã€4D ã¯ãƒ­ã‚°ãƒ•ァイルを生æˆã—㦠**Logs** フォルダーã«ä¿å­˜ã—ã¾ã™ã€‚ ログファイルã«ã¯ãƒ“ルド毎ã«ä»¥ä¸‹ã®æƒ…å ±ãŒæ›¸ãè¾¼ã¾ã‚Œã¾ã™: - -- ターゲットビルドã®é–‹å§‹ã¨çµ‚了 -- 生æˆã•れãŸãƒ•ァイルã®åç§°ã¨ãƒ•ルパス -- ãƒ“ãƒ«ãƒ‰ã®æ—¥ä»˜ã¨æ™‚刻 -- 発生ã—ãŸã‚¨ãƒ©ãƒ¼ - -## アプリケーションåã¨ä¿å­˜å…ˆãƒ•ォルダー - -![](assets/en/Project/buidappstructureProj.png) - -**アプリケーションå** ã«ã¯ç”Ÿæˆã™ã‚‹ã‚¢ãƒ—リケーションã®åå‰ã‚’入力ã—ã¾ã™ã€‚ - -**ä¿å­˜å…ˆãƒ•ォルダー** ã«ã¯ãƒ“ルドã•れるアプリケーションã®ä¿å­˜å…ˆã‚’指定ã—ã¾ã™ã€‚ 指定ã—ãŸãƒ•ォルダーãŒå­˜åœ¨ã—ãªã„å ´åˆã¯æ–°ãŸã«ä½œæˆã—ã¾ã™ã€‚ - -## コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒšãƒ¼ã‚¸ - -ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€æ¨™æº–ã®ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルやコンパイル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルドã§ãã¾ã™ã€‚ - -![](assets/en/Project/appbuilderProj.png) - -### コンパイル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚’ビルド - -インタープリターコードをå«ã¾ãªã„アプリケーションをビルドã—ã¾ã™ã€‚ - -ã“れã«ã‚ˆã‚Šã€*Compiled Database* フォルダーã®ä¸­ã« *.4dz* ファイルãŒä½œæˆã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¢ãƒ—リケーションåã‚’ "MyProject" ã«ã—ãŸå ´åˆã€4D ã¯æ¬¡ã®ã‚‚ã®ã‚’作æˆã—ã¾ã™: - -*\/Compiled Database/\/MyProject.4dz* - -> .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) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -### コンãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルド - -ストラクãƒãƒ£ãƒ¼ã‹ã‚‰ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’ビルドã—ã¾ã™ã€‚ - -コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ç‰¹å®šã®æ©Ÿèƒ½ã‚’実装ã—ãŸæ¨™æº–ã® 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/MyComponent.4dbase/* - -*MyComponent.4dbase* フォルダーã«ã¯æ¬¡ã®ãƒ•ァイルãŒå«ã¾ã‚Œã¾ã™: - *MyComponent.4DZ* ファイル - *Resources* フォルダー: 関連リソースã¯è‡ªå‹•çš„ã«ã“フォルダーã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ コンãƒãƒ¼ãƒãƒ³ãƒˆã¯ä»–ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„プラグインを使用ã§ããªã„ãŸã‚ã€ãã®ä»–ã® "Components" ã‚„ "Plugins" フォルダーã¯ã‚³ãƒ”ーã•れã¾ã›ã‚“。 - -## アプリケーションページ - -ã“ã®ã‚¿ãƒ–ã§ã¯ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã®ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‰ˆã‚¢ãƒ—リケーションをビルドã—ã¾ã™: - -![](assets/en/Project/standaloneProj.png) - -### スタンドアロンアプリケーションをビルド - -**スタンドアロンアプリケーションをビルド** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—㦠**ビルド** ボタンをクリックã™ã‚‹ã¨ã€ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã® (ã¤ã¾ã‚Šã€ãƒ€ãƒ–ルクリックã§èµ·å‹•å¯èƒ½ãª) アプリケーションãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ—ロジェクトをもã¨ã«ä½œæˆã•れã¾ã™ã€‚ - -ビルドã«ã¯æ¬¡ã®ã‚‚ã®ãŒå¿…è¦ã§ã™: - -- 4D Volume Desktop (4D データベースエンジン) -- [é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹](#ライセンス証明書ページ) - -Windows ã«ãŠã„ã¦ã¯ã€.exe æ‹¡å¼µå­ã®ã¤ã„ãŸå®Ÿè¡Œãƒ•ァイルãŒä½œæˆã•れã¾ã™ã€‚ macOS ã«ãŠã„ã¦ã¯ã€ã‚½ãƒ•トウェアパッケージãŒä½œæˆã•れã¾ã™ã€‚ - -ã“ã®å‡¦ç†ã¯ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã¨4D Volume Desktopã‚’çµ±åˆã—ã¾ã™ã€‚ 4D Volume Desktop ãŒæä¾›ã™ã‚‹æ©Ÿèƒ½ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãƒšãƒ¼ã‚¸ã§æŒ‡å®šã™ã‚‹ãƒ©ã‚¤ã‚»ãƒ³ã‚¹æƒ…å ±ã«åŸºã¥ãã¾ã™ã€‚ ã“ã®ç‚¹ã«ã¤ã„ã¦ã®è©³ç´°ãªæƒ…å ±ã¯ã€4D ã® [オンラインストア](http://store.4d.com/jp/) ã¨ã€ã‚»ãƒ¼ãƒ«ã‚¹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -データファイルã«ã¤ã„ã¦ã¯ã€ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ç‹¬è‡ªã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを作æˆãƒ»ä½¿ç”¨ã™ã‚‹ã“ã¨ã‚’許å¯ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ [最終アプリケーションã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ç®¡ç†](https://doc.4d.com/4Dv18/4D/18/Data-file-management-in-final-applications.300-4575558.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 - -ã„ãã¤ã‹ã®ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ã‚’特定ã®é †ç•ªã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘組ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã®ã‚¢ãƒƒãƒ—デートを自動化ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ ([サーãƒãƒ¼ã¾ãŸã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼å‘ã‘アプリã®è‡ªå‹•アップデート](https://doc.4d.com/4Dv18/4D/18/Automatic-updating-of-server-or-single-user-applications.300-4575550.ja.html) ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 - -#### 4D Volume Desktopã®å ´æ‰€ - -ダブルクリックã§èµ·å‹•ã•れるアプリケーションをビルドã™ã‚‹ãŸã‚ã«ã¯ã€ã¾ãš 4D Volume Desktop ãŒæ ¼ç´ã•れã¦ã„るフォルダーã®å ´æ‰€ã‚’指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: - -* *Windows* ã§ã¯: 4D Volume Desktop.4DE ã‚„ 4D Volume Desktop.RSRã€ãã®ä»–動作ã«å¿…è¦ãªãƒ•ァイルやフォルダーをå«ã‚€ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¾ã™ã€‚ -* *macOS* ã§ã¯: ソフトウェアパッケージã¨ã—㦠4D Volume Desktop ãŒæä¾›ã•れã¦ã„ã‚‹ã®ã§ã€ã“ã®ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚ - -4D Volume Desktop ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ã«ã¯ **[...]** ボタンをクリックã—ã¾ã™ã€‚ ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れãŸã‚‰ã€4D Volume Desktop フォルダー (Windows) ã¾ãŸã¯ãƒ‘ッケージ (macOS) ã‚’é¸æŠžã—ã¾ã™ã€‚ - -フォルダーãŒé¸æŠžã•れるã¨ãã®å®Œå…¨ãƒ‘スåãŒè¡¨ç¤ºã•れã€ãã“ã« 4D Volume Desktop ãŒå«ã¾ã‚Œã¦ã„れã°ãƒ“ãƒ«ãƒ‰ãƒœã‚¿ãƒ³ãŒæœ‰åйã«ãªã‚Šã¾ã™: - -> 4D Volume Desktop ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¯ã€4D Developer ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã¨åˆè‡´ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãŸã¨ãˆã°ã€4D Developer ã® v18 を利用ã—ã¦ã„れã°ã€4D Volume Desktop v18 ãŒå¿…è¦ã§ã™ã€‚ - -#### データリンクモードã®åŸºæº– - -ã“ã®ã‚ªãƒ—ションを使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã¨ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 二種類ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžå¯èƒ½ã§ã™: - -* **アプリケーションå** (デフォルト) - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€4D アプリケーションã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã«å¯¾å¿œã™ã‚‹ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚¢ãƒ—リケーションパッケージをディスク上ã§è‡ªç”±ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションを複製ã™ã‚‹å ´åˆã‚’除ã„ã¦ã€é€šå¸¸ã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«å¯¾ã—ã¦ã“ã®ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れるã¹ãã§ã™ã€‚ - -* **アプリケーションパス** - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€çµ„ã¿è¾¼ã¿ 4D アプリケーションã¯è‡ªèº«ã«ç´ã¥ã„ã¦ã„ã‚‹ *lastDataPath.xml* ファイルを解æžã—ã¦ã€èµ·å‹•アプリã®ãƒ•ルパスã«åˆè‡´ã™ã‚‹ "executablePath" 属性をæŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ‘スマップã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’探ã—〠åŒã‚¨ãƒ³ãƒˆãƒªãƒ¼å†…ã§ "dataFilePath" 属性ã§å®šç¾©ã•れã¦ã„るデータファイルを開ãã¾ã™ã€‚ - -データリンクモードã«ã¤ã„ã¦ã®è©³ç´°ã¯ [最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -#### 生æˆã•れるファイル - -**ビルド** ボタンをクリックã™ã‚‹ã¨ã€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* フォルダーもå«ã¾ã‚Œã¦ã„ã¾ã™ ([最終アプリケーションã§ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ç®¡ç†](#データファイルã®ç®¡ç†)ã‚’å‚ç…§ã—ã¦ãã ã•ã„)。 - * (オプション) データベースã«å«ã¾ã‚Œã‚‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„プラグインãŒé…ç½®ã•れ㟠Components フォルダーãŠã‚ˆã³ Plugins フォルダー。 ã“ã®ç‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ [プラグイン & コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸](#プラグインコンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸)ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - * Licenses フォルダー - アプリケーションã«çµ±åˆã•れãŸãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã® XML ファイルãŒå«ã¾ã‚Œã¾ã™ã€‚ ã“ã®ç‚¹ã«é–¢ã™ã‚‹è©³ç´°ã¯ [ライセンス & 証明書ページ](#ライセンス証明書ページ) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - * 4D Volume Desktop フォルダーã«è¿½åŠ ã•れãŸãã®ä»–ã®é …ç›® (ã‚れã°)([4D Volume Desktop フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º](#4D-Volume-Desktop-フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º) å‚ç…§) - - 実行ファイルã®å‹•作ã«ã¯ã€ã“れらã™ã¹ã¦ã®é …ç›®ãŒåŒã˜ãƒ•ォルダー内ã«å¿…è¦ã§ã™ã€‚ - -* *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 ファイルã®ãƒ‘スã§ã¯ã‚りã¾ã›ã‚“)。 - -#### 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 フォルダーやファイルã¯ç‰¹å®šã®å ´æ‰€ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: - -* *cert.pem* 㨠*key.pem* ファイル (オプション): ã“れらã®ãƒ•ァイルã¯SSL接続ã¨ãƒ‡ãƒ¼ã‚¿æš—å·åŒ–コマンドã«ä½¿ç”¨ã•れã¾ã™ã€‚ -* デフォルト Web ルートフォルダー - -インストール場所: - -- **Windows**: *Final Application\MyProject\Database* サブフォルダー内 -- **macOS**: *MyProject.app* ソフトウェアパッケージã¨åŒéšŽå±¤ - -## クライアント/サーãƒãƒ¼ãƒšãƒ¼ã‚¸ - -ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®è‡ªå‹•更新もサãƒãƒ¼ãƒˆã§ãるクロスプラットフォームãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã™ã‚‹ãŸã‚ã®è¨­å®šã‚’ãŠã“ãªã„ã¾ã™ã€‚ - -![](assets/en/Project/buildappCSProj.png) - -### クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¨ã¯ - -クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯ã€ä»¥ä¸‹ã®3ã¤ã®é …ç›®ã®çµ„ã¿åˆã‚ã›ã‹ã‚‰æˆã‚Šã¾ã™: - -- コンパイルã•れ㟠4D データベース -- 4D Server アプリケーション -- 4D Volume Desktop アプリケーション (macOS / Windows) - -ビルドを行ã†ã¨ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯2ã¤ã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れãŸãƒ‘ーツ (サーãƒãƒ¼ã¨ã€å„クライアントマシンã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ã§æ§‹æˆã•れã¾ã™ã€‚ - -ビルドã•れãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リケーションã¯èµ·å‹•や接続処ç†ãŒç°¡æ˜“ã§ã™: - -- サーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é¸æŠžã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 -- クライアントを起動ã™ã‚‹ã«ã‚‚ã€åŒæ§˜ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをダブルクリックã—ã¾ã™ã€‚ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¸ã®æŽ¥ç¶šãŒç›´æŽ¥ãŠã“ãªã‚れるãŸã‚〠接続ダイアログã§ã‚µãƒ¼ãƒãƒ¼ã‚’é¸æŠžã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯æŽ¥ç¶šå¯¾è±¡ã®ã‚µãƒ¼ãƒãƒ¼ã‚’åç§° (サーãƒãƒ¼ãŒåŒã˜ã‚µãƒ–ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã«ã‚ã‚‹å ´åˆ)ã€ã‚ã‚‹ã„ã¯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 アプリケーションを指定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™)。 - -#### 4D Server ã®å ´æ‰€ - -4D Server ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã™ã‚‹ã«ã¯**[...]**ボタンをクリックã—ã¾ã™ã€‚ macOS ã§ã¯ 4D Server ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸ã‚’é¸æŠžã—ã¾ã™ã€‚ - -#### ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ - -生æˆã•れるアプリケーションã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’指定ã—ã¾ã™ã€‚ ã“ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’ã‚‚ã¨ã«ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã‹ã‚‰ã®æŽ¥ç¶šã‚’å—ã‘入れãŸã‚Šæ‹’å¦ã—ãŸã‚Šã§ãã¾ã™ã€‚ クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã§äº’æ›æ€§ã®ã‚る番å·ã®ç¯„囲㯠[XML キー](#アプリケーションビルド設定) ã§è¨­å®šã—ã¾ã™ã€‚ - -#### データリンクモードã®åŸºæº– - -ã“ã®ã‚ªãƒ—ションを使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションã¨ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‚’é¸æŠžã—ã¾ã™ã€‚ 二種類ã®ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžå¯èƒ½ã§ã™: - -* **アプリケーションå** (デフォルト) - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€4D アプリケーションã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ãƒ•ァイルã«å¯¾å¿œã™ã‚‹ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ãã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã‚¢ãƒ—リケーションパッケージをディスク上ã§è‡ªç”±ã«ç§»å‹•ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションを複製ã™ã‚‹å ´åˆã‚’除ã„ã¦ã€é€šå¸¸ã¯çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«å¯¾ã—ã¦ã“ã®ãƒ¢ãƒ¼ãƒ‰ãŒä½¿ç”¨ã•れるã¹ãã§ã™ã€‚ - -* **アプリケーションパス** - ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯ã€çµ„ã¿è¾¼ã¿ 4D アプリケーションã¯è‡ªèº«ã«ç´ã¥ã„ã¦ã„ã‚‹ *lastDataPath.xml* ファイルを解æžã—ã¦ã€èµ·å‹•アプリã®ãƒ•ルパスã«åˆè‡´ã™ã‚‹ "executablePath" 属性をæŒã¤ãƒ‡ãƒ¼ã‚¿ãƒ‘スマップã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ã‚’探ã—〠åŒã‚¨ãƒ³ãƒˆãƒªãƒ¼å†…ã§ "dataFilePath" 属性ã§å®šç¾©ã•れã¦ã„るデータファイルを開ãã¾ã™ã€‚ - -データリンクモードã«ã¤ã„ã¦ã®è©³ç´°ã¯ [最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -### クライアントアプリケーションをビルド - -クライアント部分をビルドã™ã‚‹ã«ã¯ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¾ã™ã€‚ - -#### 4D Volume Desktop ã®å ´æ‰€ - -ビルドã«ä½¿ç”¨ã™ã‚‹ 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) コマンドをå‚ç…§ã—ã¦ãã ã•ã„。 接続失敗時ã®ç‰¹å®šã®æ©Ÿæ§‹ã‚’実装ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ 詳細㯠[クライアント接続ã®ç®¡ç†](#クライアント接続ã®ç®¡ç†) ã§èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ - -#### サーãƒãƒ¼ã‚¢ãƒ—リケーション内部ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ã‚³ãƒ”ー - -ã“ã®ã‚¨ãƒªã‚¢ã®ã‚ªãƒ—ションを使用ã—ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒ“ルドã•れãŸéš›ã®ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚’自動更新ã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’設定ã§ãã¾ã™ã€‚ - -- **Windows クライアントアプリケーションã®è‡ªå‹•更新を有効ã«ã™ã‚‹** - ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã® Windows クライアントã®è‡ªå‹•更新を有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -- **macOS クライアントアプリケーションã®è‡ªå‹•更新を有効ã«ã™ã‚‹** - ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã® macOS クライアントã®è‡ªå‹•更新を有効ã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -- クロスプラットフォームãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®å ´åˆã«ã¯ã€ãƒ“ルドをãŠã“ãªã†ãƒžã‚·ãƒ³ã¨ã¯åˆ¥ã®ãƒ—ラットフォーム用㮠4D Volume Desktop アプリケーションã®å ´æ‰€ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ - - ãŸã¨ãˆã° Windows 上㧠**[...]** ボタンをクリックã—ã€macOS 用㮠4D Volume Desktop.app ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠžã—ã¾ã™ã€‚ - -#### 更新通知ã®è¡¨ç¤º - -サーãƒãƒ¼ãŒæ›´æ–°ã•れるã¨ã€å„クライアントマシン上ã«è‡ªå‹•ã§æ›´æ–°é€šçŸ¥ãŒãŠã“ãªã‚れã¾ã™ã€‚ - -ã“ã‚Œã¯æ¬¡ã®ã‚ˆã†ã«å‹•作ã—ã¾ã™: クライアント/サーãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’ビルドã™ã‚‹éš›ã€æ–°ã—ã„クライアント㯠**ApplicationName** Server フォルダー内㮠**Upgrade4DClient** サブフォルダーã«åœ§ç¸®ã—ã¦æ ¼ç´ã•れã¾ã™ (macOSã§ã¯ã€ã“れらã®ãƒ•ォルダーã¯ã‚µãƒ¼ãƒãƒ¼ãƒ‘ッケージ内ã«é…ç½®ã•れã¾ã™)。 クロスプラットフォームã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを生æˆã—ãŸå ´åˆã«ã¯ã€å„プラットフォーム用㫠*.4darchive* ã¨ã„ã†æ›´æ–°ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™: - -ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æ›´æ–°ã‚’通知ã™ã‚‹ã«ã¯ã€å¤ã„サーãƒãƒ¼ã‚¢ãƒ—リケーションを新ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ç½®ãæ›ãˆã¦èµ·å‹•ã—ã¾ã™ã€‚ ã‚ã¨ã®å‡¦ç†ã¯è‡ªå‹•ã§ãŠã“ãªã‚れã¾ã™ã€‚ - -å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãŒã€æ›´æ–°ã•れãŸã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã‚’試ã¿ã‚‹ã¨ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒåˆ©ç”¨å¯èƒ½ã§ã‚る旨をä¼ãˆã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ä¸Šã«è¡¨ç¤ºã•れã¾ã™ã€‚ ユーザーã¯ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’æ›´æ–°ã™ã‚‹ã‹ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’キャンセルã§ãã¾ã™ã€‚ - -* ユーザー㌠**OK** をクリックã™ã‚‹ã¨ã€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã«ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ ダウンロードãŒå®Œäº†ã™ã‚‹ã¨å¤ã„クライアントアプリケーションãŒé–‰ã˜ã‚‰ã‚Œã¦ã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒèµ·å‹•ã—サーãƒãƒ¼ã«æŽ¥ç¶šã—ã¾ã™ã€‚ å¤ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã‚´ãƒŸç®±ã«ç§»å‹•ã•れã¾ã™ã€‚ -* ユーザー㌠**キャンセル** をクリックã™ã‚‹ã¨ã€æ›´æ–°æ‰‹ç¶šãã¯ã‚­ãƒ£ãƒ³ã‚»ãƒ«ã•れã¾ã™ã€‚å¤ã„クライアントã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚µãƒ¼ãƒãƒ¼ã®è¨±å¯ã™ã‚‹ç¯„囲外ã§ã‚れ㰠(後述å‚ç…§)ã€ã‚¢ãƒ—リケーションã¯é–‰ã˜ã‚‰ã‚Œã¦ã€æŽ¥ç¶šã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ãã†ã§ãªã‘ã‚Œã°æŽ¥ç¶šãŒè¡Œã‚れã¾ã™ã€‚ - -#### 自動更新ã®å¼·åˆ¶ - -æ›´æ–°ã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã‚’キャンセルã•ã›ãŸããªã„å ´åˆã€ ãŸã¨ãˆã°æ–°ã—ã„メジャーãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® 4D Server を使用ã™ã‚‹ã‚ˆã†ãªå ´åˆã€æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションをå„クライアントマシンã«å¿…ãšã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 - -更新を強制ã™ã‚‹ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¨äº’æ›æ€§ã®ã‚ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã®ç¯„囲ã‹ã‚‰ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã®ç¾ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’除外ã—ã¾ã™ã€‚ ã™ã‚‹ã¨ã€æœªæ›´æ–°ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®æŽ¥ç¶šã¯æ›´æ–°ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ãŒã® 6 ã®å ´åˆã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ãŒ 5 以下ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを許å¯ã—ãªã„よã†ã«ã§ãã¾ã™ã€‚ - -[ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³](build-server-application) ã¯ã‚¢ãƒ—リケーションビルドダイアログã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ãƒšãƒ¼ã‚¸ã§è¨­å®šã§ãã¾ã™ (å‰è¿°)。 接続を許å¯ã™ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã®ç¯„囲㯠[XML キー](#アプリケーションビルド設定) ã§è¨­å®šã—ã¾ã™ã€‚ - -#### エラーãŒç™ºç”Ÿã™ã‚‹å ´åˆ - -ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã‚’実行ã§ããªã‹ã£ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆãƒžã‚·ãƒ³ã«ã¯æ¬¡ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: "ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®æ›´æ–°ã«å¤±æ•—ã—ã¾ã—ãŸã€‚ アプリケーションã¯çµ‚了ã—ã¾ã™ã€‚" - -ã“ã®ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹åŽŸå› ã¯è¤‡æ•°ã‚りãˆã¾ã™ã€‚ ã“ã®ã‚¨ãƒ©ãƒ¼ãŒè¡¨ç¤ºã•れるよã†ãªå ´åˆã¯ã€ã¾ã𿬡ã®ç‚¹ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ã¿ã¦ãã ã•ã„: - -* **パスå** - アプリケーションビルドダイアログや XML キー (ãŸã¨ãˆã° *ClientMacFolderToWin*) ã§æŒ‡å®šã•れãŸãƒ‘スåã®æœ‰åŠ¹æ€§ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 ã¨ãã« 4D Volume Desktop ã¸ã®ãƒ‘スをãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„。 -* **èª­ã¿æ›¸ã権é™** - クライアントマシン上ã§ã‚«ãƒ¬ãƒ³ãƒˆãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを更新ã™ã‚‹æ›¸ãè¾¼ã¿ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’æŒã£ã¦ã„ã‚‹ã‹ç¢ºèªã—ã¦ãã ã•ã„。 - -### 生æˆã•れるファイル - -クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã¨ã€ä¿å­˜å…ˆãƒ•ォルダー内㫠**Client Server executable** ã¨ã„ã†åå‰ã®æ–°ã—ã„フォルダーãŒä½œæˆã•れã¾ã™ã€‚ ã“ã®ãƒ•ォルダーã«ã¯ã•らã«2ã¤ã®ã‚µãƒ–フォルダー〠*\ Client* 㨠*\ Server* ãŒã‚りã¾ã™ã€‚ - -> エラーãŒç™ºç”Ÿã—ãŸå ´åˆã“れらã®ãƒ•ォルダーã¯ä½œæˆã•れã¾ã›ã‚“。 ãã®ã‚ˆã†ãªå ´åˆã¯ã‚¨ãƒ©ãƒ¼ã®åŽŸå› ã‚’ç‰¹å®šã™ã‚‹ãŸã‚ã« [ログファイル](#ログファイル) ã®å†…容を確èªã—ã¦ãã ã•ã„。 - -*\ Client* フォルダーã¯ã€ã‚¢ãƒ—リケーションビルダーを実行ã—ãŸãƒ—ラットフォームã«å¯¾å¿œã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションを格ç´ã—ã¾ã™ã€‚ ã“ã®ãƒ•ォルダーをå„クライアントã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¾ã™ã€‚ *\ Server* フォルダーã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションを格ç´ã—ã¾ã™ã€‚ - -ã“れらã®ãƒ•ォルダーã®å†…容ã¯ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ—ラットフォームã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™: - -* *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 版ã®ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションãŒåœ§ç¸®ã•ã‚Œã¦æ ¼ç´ã•れã¾ã™ã€‚ クライアントアプリケーションを自動更新ã™ã‚‹ã¨ãã«ã€ã“ã®ãƒ•ァイルã¯ä½¿ç”¨ã•れã¾ã™ã€‚ - -#### サーãƒãƒ¼ã‚„クライアントフォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º - -クライアント/サーãƒãƒ¼ã‚¢ãƒ—リケーションã®ãƒ“ルド中ã«ã€4D Server フォルダーã®å†…容㯠Server サブフォルダーã«ã€4D Volume Desktop フォルダーã®å†…容㯠Client サブフォルダーã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ 元㮠4D Server 㨠4D Volume Desktop ã®å†…容ã¯å¿…è¦ã«å¿œã˜ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ãªã“ã¨ãŒå¯èƒ½ã§ã™ - -- 特定ã®è¨€èªžã«å¯¾å¿œã—ãŸ4D Serverをインストールã™ã‚‹ -- Plugins フォルダーã«ãƒ—ラグインを追加ã™ã‚‹ - -#### Web ファイルã®å ´æ‰€ - -サーãƒãƒ¼ã‚„クライアントを Web サーãƒãƒ¼ã¨ã—ã¦ä½¿ç”¨ã™ã‚‹å ´åˆã€Web サーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹ãƒ•ァイルを 特定ã®å ´æ‰€ã«é…ç½®ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: - -- *cert.pem* 㨠*key.pem* ファイル (オプション): ã“れらã®ãƒ•ァイル㯠SSL 接続ã§ä½¿ç”¨ã•れã¾ã™ã€‚ -- デフォルト Web ルートフォルダー (WebFolder) - -インストール場所: * **Windows** * **サーãƒãƒ¼ã‚¢ãƒ—リケーション** - *Client Server executable\ \ Server\Server Database* サブフォルダー内ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ * **クライアントアプリケーション** - *Client Server executable\ \ Client* サブフォルダー内ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ - -* **macOS** - * **サーãƒãƒ¼ã‚¢ãƒ—リケーション** - *\ Server* ソフトウェアパッケージã¨åŒéšŽå±¤ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ - * **クライアントアプリケーション** - *\ Client* ソフトウェアパッケージã¨åŒéšŽå±¤ã«ã“れらã®é …目をé…ç½®ã—ã¾ã™ã€‚ - -## プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆãƒšãƒ¼ã‚¸ - -ã“ã®ãƒšãƒ¼ã‚¸ã§ã¯ãƒ“ルドã™ã‚‹ã‚¢ãƒ—リケーションã«å«ã‚ã‚‹ [プラグイン](Concepts/plug-ins.md) ã‚„ [コンãƒãƒ¼ãƒãƒ³ãƒˆ](Concepts/components.md) を設定ã§ãã¾ã™ã€‚ - -ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ç¾åœ¨ 4D ã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ã„るプラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆãŒãƒªã‚¹ãƒˆã•れã¾ã™: - -![](assets/en/Project/buildapppluginsProj.png) - -* **アクティブ** 列 - ãã®è¡Œã®é …目をビルドã™ã‚‹ã‚¢ãƒ—リケーションã«çµ±åˆã™ã‚‹ã‹ã©ã†ã‹ã‚’指定ã—ã¾ã™ã€‚ デフォルトã§ã™ã¹ã¦ã®é …ç›®ãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚ プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’アプリケーションã‹ã‚‰é™¤å¤–ã™ã‚‹ã«ã¯ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã®é¸æŠžã‚’外ã—ã¾ã™ã€‚ - -* **プラグイン&コンãƒãƒ¼ãƒãƒ³ãƒˆ** 列 - プラグイン/コンãƒãƒ¼ãƒãƒ³ãƒˆã®å称を表示ã—ã¾ã™ã€‚ - -* **ID** 列 - プラグイン/コンãƒãƒ¼ãƒãƒ³ãƒˆã® ID (ã‚れã°) を表示ã—ã¾ã™ã€‚ - -* **タイプ** 列 - ãã®è¦ç´ ãŒãƒ—ラグインã§ã‚ã‚‹ã‹ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã§ã‚ã‚‹ã‹ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -アプリケーションã«ãã®ä»–ã® (ç¾åœ¨ 4D ã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ã„ãªã„) プラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’çµ±åˆã—ãŸã„å ´åˆã€4D Server ã‚„ 4D Volume Desktop ã® **Plugins** ã‚„ **Components** フォルダーã«ãれらをé…ç½®ã—ã¾ã™ã€‚ ソースアプリケーションã®ãƒ•ォルダーã‹ã‚‰å†…容をコピーã™ã‚‹ãƒ¡ã‚«ãƒ‹ã‚ºãƒ  ([4D Volume Desktop フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º](#4D-Volume-Desktop-フォルダーã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º) å‚ç…§) ã«ã‚ˆã‚Šã€ã©ã‚“ãªã‚¿ã‚¤ãƒ—ã®ãƒ•ァイルã§ã‚‚アプリケーションã«çµ±åˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -åŒã˜ãƒ—ラグインã®ç•°ãªã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ (ç¾åœ¨ 4D ã«ãƒ­ãƒ¼ãƒ‰ã•れã¦ã„ã‚‹ã‚‚ã®ã¨åŒã˜ãƒ—ラグインãŒã€ã‚½ãƒ¼ã‚¹ã‚¢ãƒ—リケーションã®ãƒ•ォルダーã«ã‚‚é…ç½®ã•れã¦ã„ã‚‹å ´åˆãªã©)ã€4D Volume Desktop/4D Server フォルダーã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ã‚‹ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒå„ªå…ˆã•れã¾ã™ã€‚ ä»–æ–¹ã€åŒã˜ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆãŒä¸¡æ–¹ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„ãŸå ´åˆã¯ã€ã‚¢ãƒ—リケーションを開ãã“ã¨ã¯ã§ãã¾ã›ã‚“。 - -> é…布ã™ã‚‹ã‚¢ãƒ—リケーションã§ãƒ—ラグインやコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã™ã‚‹ã«ã¯ã€ãれãžã‚Œé©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã§ã™ã€‚ - -## ライセンス&証明書ページ - -ライセンス&証明書ã®ãƒšãƒ¼ã‚¸ã§ã¯ã€æ¬¡ã®ã‚ˆã†ãªã“ã¨ãŒã§ãã¾ã™: - -* シングルユーザーã®ã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã‚¢ãƒ—リケーションã«çµ±åˆã™ã‚‹ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã‚’指定ã—ã¾ã™ã€‚ -* macOS 環境下ã§ã¯ã€è¨¼æ˜Žæ›¸ã‚’使用ã—ã¦ã‚¢ãƒ—リケーションã«ç½²åã‚’ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -![](assets/en/Project/buildapplicenseProj.png) - -### ライセンスリスト - -アプリケーションã«çµ±åˆã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã‚‹é…付ライセンスã®ä¸€è¦§ã‚’表示ã—ã¾ã™ã€‚ デフォルトã§ãƒªã‚¹ãƒˆã¯ç©ºã§ã™ã€‚ アプリケーションをビルドã™ã‚‹ã«ã¯ *4D Developer Professional* ライセンスã¨ã€ãã®é–‹ç™ºãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã«å¯¾å¿œã™ã‚‹ *4D Desktop Volume* ライセンスを指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 - -ライセンスを追加ã¾ãŸã¯å–り除ãã«ã¯ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ä¸‹éƒ¨ã® **[+]** ã¾ãŸã¯ **[-]** ボタンをクリックã—ã¾ã™ã€‚ - -\[+] ボタンをクリックã™ã‚‹ã¨ã€ãƒ•ァイルを開ãダイアログãŒè¡¨ç¤ºã•れã€ãƒžã‚·ãƒ³ã® *Licenses* フォルダーã®å†…容ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã“ã®ãƒ•ォルダーã®å ´æ‰€ã«ã¤ã„ã¦ã¯ 詳ã—ã㯠[Get 4D folder](https://doc.4d.com/4Dv18/4D/18/Get-4D-folder.301-4505365.ja.html) コマンドã®èª¬æ˜Žã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - -開発ライセンスã¨ãれã«å¯¾å¿œã—ãŸé…å¸ƒãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’é¸æŠžã—ã¾ã™ã€‚ ã“れらã®ãƒ•ァイル㯠*4D Developer Professional* ライセンスや *4D Desktop Volume* ライセンスをアクティベーションã—ãŸéš›ã€ã“ã®å ´æ‰€ã«ã‚³ãƒ”ーã•れã¾ã™ã€‚ - -ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã¨ã€ãƒªã‚¹ãƒˆã«é¸æŠžå†…容ãŒå映ã•れã¾ã™: - -* **ライセンス #** - 製å“ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå· -* **ライセンス** - プロダクトå -* **有効期é™** - ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®æœ‰åŠ¹æœŸé™ (ã‚れã°) -* **パス** - ディスク上ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã®å ´æ‰€ - -ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒæœ‰åйã§ãªã„å ´åˆã€è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -å¿…è¦ãªã ã‘有効ãªãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 実行å¯èƒ½ã‚¢ãƒ—リケーションをビルドã™ã‚‹éš›ã« 4D ã¯æœ€ã‚‚é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’使用ã—ã¾ã™ã€‚ - -> "R-リリース" ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¢ãƒ—リケーションをビルドã™ã‚‹ã«ã¯ã€å°‚用㮠"R" ライセンスãŒå¿…è¦ã§ã™ ("R" 製å“用ã®ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ç•ªå·ã¯ "R-" ã‹ã‚‰å§‹ã¾ã‚‹ç•ªå·ã§ã™)。 - -アプリケーションビルド後ã€é…布ライセンスファイルã¯å®Ÿè¡Œå¯èƒ½ãƒ•ァイルã¨åŒéšŽå±¤ (Windows) やパッケージ内 (macOS) ã«è‡ªå‹•ã§ã‚³ãƒ”ーã•れã¾ã™ã€‚ - -### OS X ç½²åã«ä½¿ç”¨ã™ã‚‹è¨¼æ˜Žæ›¸ - -アプリケーションビルダーã¯ã€macOS 環境下ã«ãŠã„ã¦çµ„ã¿è¾¼ã¿ 4D アプリã«ç½²åã‚’ã™ã‚‹æ©Ÿèƒ½ã‚’å‚™ãˆã¦ã„ã¾ã™ (macOS ã®ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¢ãƒ—リã€ã‚µãƒ¼ãƒãƒ¼ãŠã‚ˆã³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リ)。 アプリケーションを署åã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€ macOS ã«ãŠã„ã¦ã€ŒMac App Store ã¨ç¢ºèªæ¸ˆã¿ã®é–‹ç™ºå…ƒã‹ã‚‰ã®ã‚¢ãƒ—リケーションを許å¯ã€ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ãã« Gatekeeper ã®æ©Ÿèƒ½ã‚’使用ã—ã¦ã‚¢ãƒ—リケーションを実行ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ (後述㮠"Gatekeeper ã«ã¤ã„ã¦" ã‚’å‚ç…§ãã ã•ã„)。 - -- **アプリケーションã«ç½²å** オプションã«ãƒã‚§ãƒƒã‚¯ã‚’ã™ã‚‹ã¨ã€macOS ã®ã‚¢ãƒ—リケーションビルド処ç†ã«èªè¨¼ãŒå«ã¾ã‚Œã¾ã™ã€‚ 4D ã¯ãƒ“ルドã®éš›ã«ã€èªè¨¼ã«å¿…è¦ãªè¦ç´ ã®æœ‰ç„¡ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™: - -![](assets/en/Project/buildapposxcertProj.png) - -ã“ã®ã‚ªãƒ—ション㯠Windows 㨠macOS 両方ã®ç’°å¢ƒã§è¡¨ç¤ºã•れã¾ã™ãŒã€macOS ã®å ´åˆã«ãŠã„ã¦ã®ã¿æœ‰åйã§ã™ã€‚ - -* **èªè¨¼å** - Apple ã«ã‚ˆã£ã¦æœ‰åŠ¹åŒ–ã•れãŸãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーèªè¨¼åを入力ã—ã¦ãã ã•ã„。 ã“ã®èªè¨¼åã¯é€šå¸¸ã€ã‚­ãƒ¼ãƒã‚§ãƒ¼ãƒ³ã‚¢ã‚¯ã‚»ã‚¹ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£å†…ã®è¨¼æ˜Žæ›¸ã®åå‰ã¨ä¸€ç·’ã§ã™: - -![](assets/en/Project/certificate.png) - -Apple ã‹ã‚‰ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘èªè¨¼ã‚’å–å¾—ã™ã‚‹ãŸã‚ã«ã¯ã€ã‚­ãƒ¼ãƒã‚§ãƒ¼ãƒ³ã‚¢ã‚¯ã‚»ã‚¹ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’使用ã™ã‚‹ã‹ã€æ¬¡ã®ãƒªãƒ³ã‚¯ã¸ç§»å‹•ã—ã¦ãã ã•ã„: - -> ã“ã®è¨¼æ˜Žæ›¸ã®å–å¾—ã«ã¯ Apple ã® codesign ユーティリティãŒå¿…è¦ã«ãªã‚Šã¾ã™ã€‚ã“ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æä¾›ã•れã¦ãŠã‚Šã€é€šå¸¸ “/usr/bin/codesign†フォルダーã«ã‚りã¾ã™ã€‚ エラーãŒèµ·ããŸéš›ã«ã¯ã€ã“ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ãŒãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ã‚ã‚‹ã‹ã©ã†ã‹ã‚’確èªã—ã¦ãã ã•ã„。 - -#### Gatekeeper ã«ã¤ã„㦠- -Gatekeeper ã¨ã¯ macOS ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ã§ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ã¦ããŸã‚¢ãƒ—リケーションã®å®Ÿè¡Œã‚’管ç†ã™ã‚‹ã‚‚ã®ã§ã™ã€‚ ã‚‚ã—ダウンロードã—ãŸã‚¢ãƒ—リケーション㌠Apple Store ã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸã‚‚ã®ã§ã¯ãªã„ã€ã¾ãŸã¯ç½²åã•れã¦ã„ãªã„å ´åˆã«ã¯å®Ÿè¡ŒãŒæ‹’å¦ã•れã¾ã™ã€‚ - -アプリケーションビルダー㮠**アプリケーションã«ç½²å** 機能ã«ã‚ˆã£ã¦ã€ã“ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚ªãƒ—ションã¨ãƒ‡ãƒ•ォルトã§äº’æ›æ€§ã®ã‚るアプリケーションを生æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -#### ノータリゼーション (公証) ã«ã¤ã„㦠- -macOS 10.14.5 (Mojave) ãŠã‚ˆã³ 10.15 (Catalina) ã«ãŠã„ã¦ã€ã‚¢ãƒ—リケーションã®ãƒŽãƒ¼ã‚¿ãƒªã‚¼ãƒ¼ã‚·ãƒ§ãƒ³ (公証) ㌠Apple ã‚ˆã‚Šå¼·ãæŽ¨å¥¨ã•れã¦ã„ã¾ã™ã€‚公証を得ã¦ã„ãªã„アプリケーションをインターãƒãƒƒãƒˆã‹ã‚‰ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã—ãŸå ´åˆã€ãƒ‡ãƒ•ォルトã§ãƒ–ロックã•れã¾ã™ã€‚ - -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) ã‚’å‚ç…§ãã ã•ã„。 - -## アプリケーションアイコンã®ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚º - -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) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。) - - アイコンファイルã®åå‰ã¯ãƒ—ロジェクトファイルå+"*.icns*" æ‹¡å¼µå­ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 4D ã¯è‡ªå‹•ã§ã“ã®ãƒ•ァイルをèªè­˜ã—ã€ã‚¢ã‚¤ã‚³ãƒ³ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ (*.icns* ファイル㯠*ApplicationName.icns* ã«å称変更ã•れ㦠Resourcesフォルダーã«ç½®ã‹ã‚Œã¾ã™ã€‚ã•ら㫠*info.plist* ファイル㮠*CFBundleFileIcon* エントリーを更新ã—ã¾ã™)。 - -* **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 ã®é …å‚ç…§)ã«ã‚ˆã£ã¦æŒ‡å®šã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ 次ã®ã‚­ãƒ¼ãŒåˆ©ç”¨ã§ãã¾ã™: - -- RuntimeVLIconWinPath -- RuntimeVLIconMacPath -- ServerIconWinPath -- ServerIconMacPath -- ClientMacIconForMacPath -- ClientWinIconForMacPath -- ClientMacIconForWinPath -- ClientWinIconForWinPath - -## データファイルã®ç®¡ç† - -### データファイルを開ã - -ユーザーãŒçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã€ã¾ãŸã¯ã‚¢ãƒ—リã®ã‚¢ãƒƒãƒ—デート (シングルユーザーã€ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼ã‚¢ãƒ—リ) ã‚’èµ·å‹•ã™ã‚‹ã¨ã€4D ã¯æœ‰åйãªãƒ‡ãƒ¼ã‚¿ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—よã†ã¨ã—ã¾ã™ã€‚ アプリケーションã«ã‚ˆã£ã¦ã€è¤‡æ•°ã®å ´æ‰€ãŒé †æ¬¡æ¤œç´¢ã•れã¾ã™ã€‚ - -組ã¿è¾¼ã¿ã‚¢ãƒ—リ起動時ã®ã‚ªãƒ¼ãƒ—ニングシーケンスã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™: - -1. 4D ã¯æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを開ã“ã†ã¨ã—ã¾ã™ã€‚詳ã—ã㯠[後述ã®èª¬æ˜Ž](#最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ã‚’å‚ç…§ãã ã•ã„ (ã“れã¯åˆå›žèµ·å‹•時ã«ã¯é©ç”¨ã•れã¾ã›ã‚“)。 -2. 見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D 㯠.4DZ ファイルã¨åŒéšŽå±¤ã® Default Data フォルダー内ã«ã‚るデータファイルをã€èª­ã¿è¾¼ã¿å°‚用モードã§é–‹ã“ã†ã¨ã—ã¾ã™ã€‚ -3. ã“れも見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D ã¯æ¨™æº–ã®ãƒ‡ãƒ•ォルトデータファイルを開ã“ã†ã¨ã—ã¾ã™(.4DZ ファイルã¨åŒã˜å ´æ‰€ã«ã‚ã‚‹ã€åŒã˜åå‰ã®ãƒ•ァイル)。 -4. ã“れも見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D 㯠"データファイルを開ã" ダイアログボックスを表示ã—ã¾ã™ã€‚ - -### 最後ã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル - -#### 最後ã«é–‹ã‹ã‚ŒãŸãƒ•ァイルã¸ã®ãƒ‘ス - -4D ã§ãƒ“ルドã•れãŸã‚¹ã‚¿ãƒ³ãƒ‰ã‚¢ãƒ­ãƒ³ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¯ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ãƒ‘スをアプリケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内ã«ä¿å­˜ã—ã¾ã™ã€‚ - -アプリケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã®å ´æ‰€ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¿”ã•れるパスã«å¯¾å¿œã—ã¦ã„ã¾ã™: - -```4d -userPrefs:=Get 4D folder(Active 4D Folder) -``` - -データファイルパス㯠*lastDataPath.xml* ã¨ã„ã†åå‰ã®å°‚用ファイルã«ä¿å­˜ã•れã¾ã™ã€‚ - -ã“れã«ã‚ˆã‚Šã€ã‚¢ãƒ—リケーションã®ã‚¢ãƒƒãƒ—デートをæä¾›ã—ãŸã¨ãã«ã‚‚ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル (最後ã«ä½¿ç”¨ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイル) ãŒåˆå›žã®èµ·å‹•ã‹ã‚‰è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã¾ã™ã€‚ - -ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯æ¨™æº–çš„ãªé‹ç”¨ã«é©ã—ã¦ã„ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ç‰¹å®šã®å ´åˆã€ãŸã¨ãˆã°çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リケーションを複製ã—ãŸå ´åˆãªã©ã«ãŠã„ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã‚¢ãƒ—リケーションã®ãƒªãƒ³ã‚¯ã‚’変ãˆãŸã„ã“ã¨ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“ (次章å‚ç…§)。 - -#### データリンクモードã®è¨­å®š - -コンパイルã•れãŸã‚¢ãƒ—リケーションã§ã¯ã€4D ã¯æœ€å¾Œã«ä½¿ç”¨ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを自動的ã«ä½¿ç”¨ã—ã¾ã™ã€‚ デフォルトã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ãƒ‘スã¯ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内ã«ä¿å­˜ã•れ〠**アプリケーションå ** ã§ãƒªãƒ³ã‚¯ã•れã¾ã™ã€‚ - -ç•°ãªã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使用ã™ã‚‹ãŸã‚ã«çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リを複製ã™ã‚‹å ´åˆã«ã¯ã€ã“ã®æ–¹æ³•ã¯é©ã•ãªã„ã‹ã‚‚ã—れã¾ã›ã‚“。 複製ã•れãŸã‚¢ãƒ—リã¯åŒã˜ã‚¢ãƒ—リケーションユーザー設定フォルダーを共有ã™ã‚‹ãŸã‚ã€åŒã˜ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使用ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ (最後ã«ä½¿ç”¨ã•れãŸãƒ•ァイルãŒé–‹ã‹ã‚Œã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルåを変更ã—ãŸå ´åˆã§ã‚‚çµæžœã¯åŒã˜ã§ã™)。 - -ãã®ãŸã‚ 4D ã§ã¯ã€ã‚¢ãƒ—リケーションパスを使用ã—ã¦ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ãƒªãƒ³ã‚¯ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ã“ã®ã¨ãã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯ç‰¹å®šã®ãƒ‘スを使用ã—ã¦ãƒªãƒ³ã‚¯ã•れるã®ã§ã€æœ€å¾Œã«é–‹ã‹ã‚ŒãŸãƒ•ァイルã§ã‚ã‚‹ã‹ã¯å•ã‚れã¾ã›ã‚“。 ã“ã®è¨­å®šã‚’使ã†ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã®åŸºæº–ã‚’ **アプリケーションパス** ã«è¨­å®šã—ã¾ã™ã€‚ - -ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使ãˆã°ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リãŒã„ãã¤ã‚ã£ã¦ã‚‚ã€ãれãžã‚ŒãŒå°‚用ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを使ãˆã¾ã™ã€‚ ãŸã ã—ã€ãƒ‡ãƒ¡ãƒªãƒƒãƒˆã‚‚ã‚りã¾ã™: アプリケーションパッケージを移動ã•ã›ã¦ã—ã¾ã†ã¨ã‚¢ãƒ—リケーションパスãŒå¤‰ã‚ã£ã¦ã—ã¾ã†ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを見ã¤ã‘られãªããªã‚Šã¾ã™ã€‚ã“ã®å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯é–‹ãデータファイルを指定ã™ã‚‹ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’æç¤ºã•ã‚Œã€æ­£ã—ã„ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“ã€‚ä¸€åº¦é¸æŠžã•れれã°ã€*lastDataPath.xml* ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ›´æ–°ã•ã‚Œã€æ–°ã—ã„ "executablePath" 属性ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãŒä¿å­˜ã•れã¾ã™ã€‚ - -*データãŒã‚¢ãƒ—リケーションåã§ãƒªãƒ³ã‚¯ã•れã¦ã„ã‚‹å ´åˆã®è¤‡è£½:* ![](assets/en/Project/datalinking1.png) - -*データãŒã‚¢ãƒ—リケーションパスã§ãƒªãƒ³ã‚¯ã•れã¦ã„ã‚‹å ´åˆã®è¤‡è£½:* ![](assets/en/Project/datalinking2.png) - -ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒªãƒ³ã‚¯ãƒ¢ãƒ¼ãƒ‰ã¯ã‚¢ãƒ—リケーションビルドã®éš›ã«é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 次ã®äºŒã¤ã‹ã‚‰é¸æŠžå¯èƒ½ã§ã™: - -- アプリケーションビルダー㮠[アプリケーションページ](#アプリケーションページ) ã¾ãŸã¯ [クライアント/サーãƒãƒ¼ãƒšãƒ¼ã‚¸](#client-server) を使用ã™ã‚‹ã€‚ -- シングルユーザーã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーション㮠**LastDataPathLookup** XMLキーを使用ã™ã‚‹ã€‚ - -### デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ォルダーを定義ã™ã‚‹ - -4D ã§ã¯ã€ã‚¢ãƒ—リケーションビルド時ã«ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションã®åˆå›žèµ·å‹•時ã«ã€é–‹ãã¹ãローカルデータファイルãŒè¦‹ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆ (å‰è¿°ã® [オープニングシーケンス](#データファイルを開ã)å‚ç…§)ã€ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒèª­ã¿è¾¼ã¿å°‚用モードã§è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã‚’使ã£ã¦ã€çµ„ã¿è¾¼ã¿ã‚¢ãƒ—リをåˆå›žèµ·å‹•ã—ãŸã¨ãã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル作æˆãƒ»é¸æŠžã®æ“作をより制御ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -具体的ã«ã¯ã€æ¬¡ã®ã‚ˆã†ãªå ´åˆã«å¯¾å¿œã§ãã¾ã™: - -- æ–°ã—ã„ã€ã¾ãŸã¯ã‚¢ãƒƒãƒ—デートã•れãŸçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リを起動ã—ãŸã¨ãã«ã€"データファイルを開ã" ダイアログãŒè¡¨ç¤ºã•れるã®ã‚’防ãã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ‡ãƒ•ォルトデータファイルãŒé–‹ã‹ã‚ŒãŸã“ã¨ã‚’èµ·å‹•æ™‚ã«æ¤œçŸ¥ã—ã¦ã€ç‹¬è‡ªã®ã‚³ãƒ¼ãƒ‰ã‚„ダイアログを実行ã—ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ä½œæˆã‚„é¸æŠžã‚’ä¿ƒã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -- デモアプリãªã©ã®ç”¨é€”ã§ã€èª­ã¿è¾¼ã¿å°‚用データã—ã‹æŒãŸãªã„組ã¿è¾¼ã¿ã‚¢ãƒ—リをé…布ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを定義・使用ã™ã‚‹ã«ã¯: - -- デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル (åç§°ã¯å¿…ãš "Default.4DD") ã‚’ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ—ロジェクトã®ãƒ‡ãƒ•ォルトフォルダー (åç§°ã¯å¿…ãš "Default Data") 内ã«ä¿å­˜ã—ã¾ã™ã€‚ ã“ã®ãƒ‡ãƒ•ォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã«ã¯å¿…è¦ãªãƒ•ァイルもã™ã¹ã¦æƒã£ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™: インデックス (.4DIndx)ã€å¤–部BLOBã€ã‚¸ãƒ£ãƒ¼ãƒŠãƒ«ã€ä»–。 å¿…ãšã€æœ‰åйãªãƒ‡ãƒ•ォルトデータファイルを用æ„ã™ã‚‹ã‚ˆã†ã«ã—ã¦ãã ã•ã„。 ãªãŠã€ãƒ‡ãƒ•ォルトデータファイルã¯ã¤ã­ã«èª­ã¿è¾¼ã¿å°‚用モードã§é–‹ã‹ã‚Œã‚‹ãŸã‚ã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã®ä½œæˆå‰ã«ã€ã‚らã‹ã˜ã‚大元ã®ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® "ログを使用" オプションをéžé¸æŠžã«ã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ -- アプリケーションをビルドã™ã‚‹ã¨ã€ã“ã®ãƒ‡ãƒ•ォルトデータフォルダーãŒçµ„ã¿è¾¼ã¿ã‚¢ãƒ—リã«çµ±åˆã•れã¾ã™ã€‚ åŒãƒ•ォルダー内ファイルã¯ã™ã¹ã¦ä¸€ç·’ã«åŸ‹ã‚è¾¼ã¾ã‚Œã¾ã™ã€‚ - -ã“ã®æ©Ÿèƒ½ã‚’図示ã™ã‚‹ã¨æ¬¡ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: - -![](assets/en/Project/DefaultData.png) - -デフォルトã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルãŒåˆå›žèµ·å‹•æ™‚ã«æ¤œçŸ¥ã•れãŸå ´åˆã€ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¯è‡ªå‹•çš„ã«èª­ã¿è¾¼ã¿å°‚用モードã§é–‹ã‹ã‚Œã€ã‚«ã‚¹ã‚¿ãƒ ã®ã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å®Ÿè¡ŒãŒã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ - -## クライアント接続ã®ç®¡ç† - -ã“ã“ã§ã¯ã€çµ„ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リãŒé‹ç”¨ç’°å¢ƒã«ãŠã„ã¦å¯¾è±¡ã‚µãƒ¼ãƒãƒ¼ã¸ã¨æŽ¥ç¶šã™ã‚‹éš›ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ æ©Ÿæ§‹ã«ã¤ã„ã¦èª¬æ˜Žã—ã¾ã™ã€‚ - -### 接続シナリオ - -組ã¿è¾¼ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã®æŽ¥ç¶šãƒ—ãƒ­ã‚·ãƒ¼ã‚¸ãƒ£ãƒ¼ã¯ã€å°‚用サーãƒãƒ¼ãŒä½¿ç”¨ä¸å¯èƒ½ãªå ´åˆã«ã‚‚柔軟ã«å¯¾å¿œã—ã¾ã™ã€‚ 4D クライアントアプリã®ã‚¹ã‚¿ãƒ¼ãƒˆã‚¢ãƒƒãƒ—シナリオã¯ã€æ¬¡ã®ã¨ãŠã‚Šã§ã™: - -- ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã¯æ¤œç´¢ã‚µãƒ¼ãƒ“スを使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’試ã¿ã¾ã™ (åŒã˜ã‚µãƒ–ãƒãƒƒãƒˆå†…ã«å…¬é–‹ã•れãŸã‚µãƒ¼ãƒãƒ¼åã«åŸºã¥ã„ã¦æ¤œç´¢ã—ã¾ã™)。 - ã¾ãŸã¯ - クライアントアプリ内㮠"EnginedServer.4DLink" ãƒ•ã‚¡ã‚¤ãƒ«ã«æœ‰åŠ¹ãªæŽ¥ç¶šæƒ…å ±ãŒä¿å­˜ã•れã¦ã„ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã¯æŒ‡å®šã•れãŸã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã¸æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚ -- ã“れãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯ã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã«ä¿å­˜ã•れã¦ã„る情報 ("lastServer.xml" ファイルã€è©³ç´°ã¯å¾Œè¿°å‚ç…§) を使用ã—ã¦ã‚µãƒ¼ãƒãƒ¼ã¸ã®æŽ¥ç¶šã‚’試ã¿ã¾ã™ã€‚ -- ã“れãŒå¤±æ•—ã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯æŽ¥ç¶šã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã‚’è¡¨ç¤ºã—ã¾ã™ã€‚ - - ユーザー㌠**é¸æŠž...** ボタンをクリックã—ãŸå ´åˆã€æ¨™æº–ã® "サーãƒãƒ¼æŽ¥ç¶š" ダイアログボックスãŒè¡¨ç¤ºã•れã¾ã™ (ãƒ“ãƒ«ãƒ‰ã®æ®µéšŽã§è¨±å¯ã•れã¦ã„ãŸå ´åˆã«é™ã‚Šã¾ã™ã€‚詳細ã¯å¾Œè¿°)。 - - ユーザー㌠**終了** ボタンをクリックã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯çµ‚了ã—ã¾ã™ã€‚ -- æŽ¥ç¶šãŒæˆåŠŸã—ãŸå ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—リケーションã¯å°†æ¥ã®ä½¿ç”¨ã®ãŸã‚ã«ã€ãã®æŽ¥ç¶šæƒ…å ±ã‚’ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã«ä¿å­˜ã—ã¾ã™ã€‚ - -### 最後ã«ä½¿ç”¨ã—ãŸã‚µãƒ¼ãƒãƒ¼ãƒ‘スをä¿å­˜ã™ã‚‹ - -最後ã«ä½¿ç”¨ã•れ検証ã•れãŸã‚µãƒ¼ãƒãƒ¼ãƒ‘スã¯ã€ã‚¢ãƒ—リケーションã®ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダー内㮠"lastServer.xml" ファイルã«è‡ªå‹•çš„ã«ä¿å­˜ã•れã¾ã™ã€‚ ã“ã®ãƒ•ã‚©ãƒ«ãƒ€ã¯æ¬¡ã®å ´æ‰€ã«ä¿å­˜ã•れã¦ã„ã¾ã™: - -```4d -userPrefs:=Get 4D folder(Active 4D Folder) -``` - -ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ã€æœ€åˆã«æŒ‡å®šã—ãŸã‚µãƒ¼ãƒãƒ¼ãŒä½•らã‹ã®ç†ç”± (例ãˆã°ãƒ¡ãƒ³ãƒ†ãƒŠãƒ³ã‚¹ãƒ¢ãƒ¼ãƒ‰ãªã©) ã§ä¸€æ™‚çš„ã«ä½¿ç”¨ã§ããªã„ケースã«å¯¾å¿œã—ã¾ã™ã€‚ ã“ã†ã„ã£ãŸçŠ¶æ…‹ãŒåˆã‚ã¦èµ·ã“ã£ãŸã¨ãã«ã¯ã‚µãƒ¼ãƒãƒ¼é¸æŠžãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒè¡¨ç¤ºã•れ (ãŸã ã—許å¯ã•れã¦ã„ãŸå ´åˆã«é™ã‚Šã¾ã™ã€å¾Œè¿°å‚ç…§)ã€ã»ã‹ã®ã‚µãƒ¼ãƒãƒ¼ã‚’ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰‹å‹•ã§é¸æŠžã™ã‚‹ã¨ã€ãã®æŽ¥ç¶šãŒæˆåŠŸã—ãŸå ´åˆã«ã¯ãã®ãƒ‘スãŒä¿å­˜ã•れã¾ã™ã€‚ ãれ以é™ã«æŽ¥ç¶šãŒã§ããªã‹ã£ãŸå ´åˆã«ã¯ã€"lastServer.xml" ã®ãƒ‘ス情報ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å¯¾å‡¦ã•れã¾ã™ã€‚ - -> - ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã®è¨­å®šãªã©ã®å½±éŸ¿ã§ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¢ãƒ—ãƒªãŒæ’ä¹…çš„ã«æ¤œç´¢ã‚µãƒ¼ãƒ“スを使ã£ãŸã‚µãƒ¼ãƒãƒ¼æŽ¥ç¶šãŒã§ããªã„å ´åˆã«ã¯ã€ãƒ“ルド時ã«ã‚らã‹ã˜ã‚ "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`: **True**値 ![](assets/en/Project/connect2.png) ![](assets/en/Project/connect3.png) \ No newline at end of file diff --git a/website/translated_docs/ja/Project/compiler.md b/website/translated_docs/ja/Project/compiler.md new file mode 100644 index 00000000000000..d128f55f84ac5b --- /dev/null +++ b/website/translated_docs/ja/Project/compiler.md @@ -0,0 +1,331 @@ +--- +id: compiler +title: コンパイル +--- + +プロジェクトã¯ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚コンパイルã¨ã¯ã€ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’マシン言語ã«ç¿»è¨³ã™ã‚‹ã“ã¨ã§ã™ã€‚ プロジェクトをコンパイルã™ã‚‹ã¨ã€ã‚³ãƒ¼ãƒ‰ã®æ•´åˆæ€§ã‚’調ã¹ãŸã‚Šã€å®Ÿè¡Œé€Ÿåº¦ã‚’å‘上ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã•らã«ã€ã‚³ãƒ¼ãƒ‰å…¨ä½“を難読化ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šä¿è­·ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ 4D ã§ãƒ—ロジェクト開発をãŠã“ãªã„ã€ãれをスタンドアロンアプリケーションã¨ã—ã¦é…布ã™ã‚‹ã¾ã§ã®é–“ã®æ‰‹é †ã¨ã—ã¦ã€ã‚³ãƒ³ãƒ‘イルã¯ä¸å¯æ¬ ã§ã™ã€‚ + + +## コンパイル + +コンパイル処ç†ã¯ã™ã¹ã¦ 4Dアプリケーションã«ã‚ˆã‚Šè‡ªå‹•çš„ã§ãŠã“ãªã‚れã¾ã™ã€‚ + +> macOS上ã§ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã«ã¯ã€`Xcode` をインストールã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ã“ã¨ã«ã¤ã„ã¦ã®è©³ç´°ã¯ [Apple Silicon用コンパイラー](#Apple-Silicon用コンパイラー) ã‚’å‚ç…§ãã ã•ã„。 + +1. コンパイラーウィンドウを表示ã™ã‚‹ã«ã¯ã€**デザイン** メニュー㮠**コンパイラー...** ã‚’é¸æŠžã™ã‚‹ã‹ã€ã¾ãŸã¯ãƒ„ールãƒãƒ¼ã«ã‚ã‚‹ **コンパイラー** ボタンをクリックã—ã¾ã™ã€‚ + + ![](assets/en/Project/compilerWin1.png) + + ![](assets/en/Project/comp1.png) + +> ã¾ãŸã€**デザイン** メニュー㮠**コンパイル開始...** ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚³ãƒ³ãƒ‘イル処ç†ã‚’直接開始ã§ãã¾ã™ã€‚ + +2. **コンパイル** ボタンをクリックã™ã‚‹ã¨ã€ç¾åœ¨ã® [コンパイル設定](#コンパイル設定) ã«åŸºã¥ã„ã¦ã‚³ãƒ³ãƒ‘イル処ç†ã‚’é–‹å§‹ã—ã¾ã™ã€‚ + +ã‚¨ãƒ©ãƒ¼ãŒæ¤œå‡ºã•れãªã‘れã°ã€å®Ÿéš›ã®ã‚³ãƒ³ãƒ‘イル処ç†ãŒé–‹å§‹ã—ã¾ã™ã€‚コンパイル処ç†ãŒå®Œäº†ã™ã‚‹ã¨ã€"ã‚³ãƒ³ãƒ‘ã‚¤ãƒ«ã«æˆåŠŸã—ã¾ã—ãŸ" ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¸‹éƒ¨ã«è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Project/success.png) + +コンパイルãŒçµ‚了次第ã€[アプリケーションをコンパイル済ã¿ãƒ¢ãƒ¼ãƒ‰ã§å®Ÿè¡Œ](#コンパイル済ã¿å®Ÿè¡Œ)ã—ã€å®Ÿè¡Œé€Ÿåº¦ãŒã©ã‚Œã ã‘å‘上ã—ãŸã®ã‹ç¢ºèªã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã‚¨ãƒ©ãƒ¼ãŒæ¤œå‡ºã•れるã¨å‡¦ç†ãŒä¸­æ­¢ã•れã€"コンパイルã«å¤±æ•—ã—ã¾ã—ãŸ" ã¨ã„ã†ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æƒ…報エリアã«ã€å•題ã¨ãªã‚‹ãƒ¡ã‚½ãƒƒãƒ‰åã¨è¡Œç•ªå·ãŒéšŽå±¤ãƒªã‚¹ãƒˆå½¢å¼ã§è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/Project/compilerWin2.png) + +関係ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’直接 4D ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ãã«ã¯ã€æ¤œå‡ºã•れãŸå„エラーをダブルクリックã—ã¾ã™ã€‚ エラーをå«ã‚€è¡ŒãŒãƒã‚¤ãƒ©ã‚¤ãƒˆè¡¨ç¤ºã•れã€ã‚¨ãƒ©ãƒ¼ã®ç¨®é¡žãŒã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚¨ãƒªã‚¢ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +**メソッド** メニューã‹ã‚‰ **å‰ã®ã‚¨ãƒ©ãƒ¼** / **次ã®ã‚¨ãƒ©ãƒ¼** ã‚’é¸æŠžã™ã‚‹ã¨ã€ã‚¨ãƒ©ãƒ¼ãŒå«ã¾ã‚Œã‚‹å„行を移動ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +åˆã‚ã¦ã®ã‚³ãƒ³ãƒ‘ã‚¤ãƒ«ã§æ¤œå‡ºã•ã‚Œã‚‹ã‚¨ãƒ©ãƒ¼ã®æ•°ã«è¾Ÿæ˜“ã™ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“ãŒã€æ°—ã«ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 ã»ã©ãªãã€ã“れらã®ã‚¨ãƒ©ãƒ¼ãŒåŒã˜åŽŸå› ã«ã‚ˆã‚‹ã‚‚ã®ã§ã‚ã‚‹ã“ã¨ã«æ°—ã¥ãã§ã—ょã†ã€‚ãŸã¨ãˆã°ã€ç‰¹å®šã®ãƒ—ロジェクトè¦ç´„ã«å¯¾ã™ã‚‹é•åãªã©ã§ã™ã€‚ コンパイラーã¯ã€ã‚¨ãƒ©ãƒ¼ã®è¨‚æ­£ã«å½¹ç«‹ã¤ã‚ˆã† [正確ãªã‚¨ãƒ©ãƒ¼è¨ºæ–­](#エラーファイル) ã‚’æä¾›ã—ã¾ã™ã€‚ + +> コンパイルã«ã¯ã€é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ã§ã™ã€‚ ライセンスãŒãªã„å ´åˆã€ã‚³ãƒ³ãƒ‘イルを実行ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (ボタンãŒç„¡åйã«ãªã‚Šã¾ã™)。 ãã®å ´åˆã§ã‚‚ã€ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚§ãƒƒã‚¯ã¨å¤‰æ•°å®šç¾©ãƒ¡ã‚½ãƒƒãƒ‰ã®ç”Ÿæˆã¯ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## コンパイル済ã¿å®Ÿè¡Œ + +プロジェクトãŒã‚³ãƒ³ãƒ‘イルã•れるã¨ã€[インタープリターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰](Concepts/interpreted.md) を切り替ãˆã¦å®Ÿè¡Œã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ã“ã®éš›ã€4Dアプリケーションを終了ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“ (インタプリターコードを削除ã—ã¦ã„ã‚‹å ´åˆã¯é™¤ãã¾ã™)。 切り替ãˆã«ã¯ã€**実行** メニュー㮠**インタープリターå†èµ·å‹•** ã‚„ **コンパイル済ã¿å†èµ·å‹•** コマンドを使用ã—ã¾ã™ã€‚ [プロジェクトを開ãダイアログボックス](creating.md#オプション) ã§ã‚‚ã€èµ·å‹•時ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リターモードã¨ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ¢ãƒ¼ãƒ‰ã‹ã‚‰é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +モードを変更ã™ã‚‹ã¨ã€4D ã¯ç¾åœ¨ã®ãƒ¢ãƒ¼ãƒ‰ã‚’é–‰ã˜ã€æ–°ã—ã„モードを開ãã¾ã™ã€‚ ã¤ã¾ã‚Šã€ã‚¢ãƒ—リケーションãŒé–‰ã˜ã‚‰ã‚Œã€å†ã³é–‹ã‹ã‚Œã¾ã™ã€‚ モードを切り替ãˆã‚‹ãŸã³ã«ã€4D 㯠2ã¤ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ (定義ã•れã¦ã„れã°) を次ã®é †ç•ªã«å®Ÿè¡Œã—ã¾ã™: `On Exit` -> `On Startup`。 + +インタープリターモードã§ãƒ—ロジェクトを編集ã—ãŸã‚‰ã€ãれをコンパイルコードã«å映ã•ã›ã‚‹ã«ã¯å†ã‚³ãƒ³ãƒ‘イルã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +## コンパイラーウィンドウ + +コンパイラーウィンドウã§ã¯ã€[**コンパイル** ボタン](#コンパイル) ã®ä»–ã«ã‚‚ã€ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆé–‹ç™ºæ™‚ã«æœ‰ç”¨ãªæ©Ÿèƒ½ãŒæä¾›ã•れã¦ã„ã¾ã™ã€‚ + +### シンタックスãƒã‚§ãƒƒã‚¯ + +**シンタックスãƒã‚§ãƒƒã‚¯** ボタンã¯ã€ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚§ãƒƒã‚¯ãƒ•ェーズã®å®Ÿè¡Œã‚’é–‹å§‹ã—ã¾ã™ã€‚ ãƒã‚§ãƒƒã‚¯ãŒçµ‚了ã™ã‚‹ã¨ã€æ¤œå‡ºã•れãŸã‚¨ãƒ©ãƒ¼ãŒã™ã¹ã¦æƒ…報エリアã«è¡¨ç¤ºã•れã¾ã™ã€‚ エラー行をダブルクリックã™ã‚‹ã¨ã€å¯¾å¿œã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’表示ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +シンタックスãƒã‚§ãƒƒã‚¯ã¯ã€ãƒ„ールãƒãƒ¼ã® **コンパイラー** ボタンã«å‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸ **シンタックスãƒã‚§ãƒƒã‚¯** コマンドã‹ã‚‰å®Ÿè¡Œã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ アプリケーションをコンパイルã™ã‚‹ãŸã‚ã®é©åˆ‡ãªãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã‚’æŒãŸãªã„å ´åˆã¯ã€ã“ã®ã‚ªãƒ—ションã—ã‹ä½¿ç”¨ã§ãã¾ã›ã‚“。 + +### 変数定義を生æˆã™ã‚‹ + +**変数定義を生æˆ** ボタンã¯ã€å¤‰æ•°å®šç¾©ã§ã‚ã‚‹ "コンパイラーメソッド"ã‚’ä½œæˆ (ã¾ãŸã¯æ›´æ–°) ã—ã¾ã™ã€‚ コンパイラーメソッドã¯ã€ã™ã¹ã¦ã®å¤‰æ•°ãƒ»é…列ã®åž‹å®£è¨€ (プロセスãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス) ã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®å¼•数定義を集約ã—ãŸãƒ—ロジェクトメソッドã§ã™ã€‚ ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå­˜åœ¨ã™ã‚‹å ´åˆã«ã¯ã€ã“れらãŒç›´æŽ¥ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦ã‚³ãƒ³ãƒ‘イル中ã«åˆ©ç”¨ã•れるãŸã‚ã€ã‚³ãƒ³ãƒ‘イル速度ãŒå‘上ã—ã¾ã™ã€‚ + +ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã€å¿…ãš `Compiler_` ã§å§‹ã¾ã‚Šã¾ã™ã€‚ [コンパイラー設定](#コンパイラーメソッド) ã«ã¦ã€5ã¤ã®ã‚³ãƒ³ãƒ‘イラーメソッドãれãžã‚Œã«å¯¾ã—ã¦ãƒ‡ãƒ•ォルトåを設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D ã«ã‚ˆã‚Šç”Ÿæˆã€ç®¡ç†ã•れるコンパイラーメソッドã¯è‡ªå‹•的㫠"éžè¡¨ç¤º" 属性ãŒå‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¾ã™: + +![](assets/en/Project/compilerWin3.png) + +コンパイラーメソッドã¯ã€å¿…è¦ãª (ã¤ã¾ã‚Šã€ãƒ—ロジェクト内ã«å­˜åœ¨ã™ã‚‹é …ç›®ã®åˆ†) ã ã‘ãŒä½œæˆã•れã¾ã™ã€‚ + +情報エリアã«ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ä½œæˆãƒ»æ›´æ–°æ™‚ã«æ¤œå‡ºã•れãŸã‚¨ãƒ©ãƒ¼ãŒç¤ºã•れã¾ã™ã€‚ エラー行をダブルクリックã™ã‚‹ã¨ã€å¯¾å¿œã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã¨è¡ŒãŒãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ä¸Šã«è¡¨ç¤ºã•れã¾ã™ã€‚ + + +### コンパイルコードを削除 + +**コンパイルコードを削除** ボタンを使用ã™ã‚‹ã¨ã€ãƒ—ロジェクトã®ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ¼ãƒ‰ãŒå‰Šé™¤ã•れã¾ã™ã€‚ ボタンをクリックã™ã‚‹ã¨ã€[コンパイル時ã«ç”Ÿæˆã•れãŸã‚³ãƒ¼ãƒ‰](#クラシックコンパイラー) ãŒã™ã¹ã¦å‰Šé™¤ã•れã¾ã™ã€‚**実行** メニュー㮠**コンパイル済ã¿å†èµ·å‹•** コマンドãŒç„¡åйã«ãªã‚Šã€é–‹å§‹æ™‚ã® "é–‹ã: コンパイルモード済ã¿ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹" オプションã¯ã‚°ãƒ¬ãƒ¼è¡¨ç¤ºã•れã¾ã™ã€‚ + + +### 警告を表示/éš ã™ + +警告ã¯ã€ã‚³ãƒ³ãƒ‘イラーãŒã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒã‚§ãƒƒã‚¯ã‚’ãŠã“ãªã†éš›ã«ç”Ÿæˆã™ã‚‹ã¨ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã§ã™ã€‚ ã“れらã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®ç›®çš„ã¯ã€å®Ÿè¡Œæ™‚エラーを引ãèµ·ã“ã™å¯èƒ½æ€§ã®ã‚ã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«æ³¨æ„ã‚’å‘ã‘ã‚‹ã“ã¨ã§ã™ã€‚ 警告ã«ã‚ˆã‚Šã‚³ãƒ³ãƒ‘イルãŒä¸­æ–­ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 + +状æ³ã‚„使用ã•れるプログラミングスタイルã«ã‚ˆã£ã¦ã€ã“れらã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®é‡è¦æ€§ã¯å¤‰åŒ–ã—ã¾ã™ã€‚ **警告を表示/éš ã™** ボタンをクリックã™ã‚‹ã“ã¨ã§ã€è­¦å‘Šã®è¡¨ç¤ºãƒ»éžè¡¨ç¤ºã‚’切り替ãˆã‚‰ã‚Œã¾ã™ã€‚ + +![](assets/en/Project/compilerWin4.png) + +ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã«ã¯ä»–ã®ã‚¨ãƒ©ãƒ¼ã‚¿ã‚¤ãƒ—ã®å¾Œã«è­¦å‘Š (ã‚れã°) ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ 実際ã®è¡¨ç¤ºã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +![](assets/en/Project/compilerWin5.png) + +警告をダブルクリックã™ã‚‹ã¨ã€å¯¾å¿œã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ãŒé–‹ã‹ã‚Œã¾ã™ã€‚ + +#### コンパイル時ã«è­¦å‘Šã‚’無効ã«ã™ã‚‹ + +コンパイル時ã«ç‰¹å®šã®è­¦å‘Šã‚’é¸æŠžçš„ã«ç„¡åйã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れをãŠã“ãªã†ã«ã¯ã€4Dメソッドã®ã‚³ãƒ¼ãƒ‰å†…ã«æ¬¡ã‚’挿入ã—ã¾ã™: + +```4d + //%W- +``` + +無効化ã§ãã‚‹ã®ã¯ã€ç•ªå·ã®ä»˜ã„ãŸè­¦å‘Šã«é™ã‚‰ã‚Œã¾ã™ã€‚ 警告番å·ã¯ã€ã‚³ãƒ³ãƒ‘イルエラーリストã®å„ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã®æœ€å¾Œã«ç¤ºã•れã¦ã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®è­¦å‘Šã‚’無効ã«ã—ãŸã„ã‚‚ã®ã¨ã—ã¾ã™: + +*1: é…列定義コマンド内ã«ãƒã‚¤ãƒ³ã‚¿ãŒå­˜åœ¨ã—ã¾ã™ (518.5)* + +ã“ã®å ´åˆã€4D メソッド (ã§ãれ㰠`COMPILER_xxx` メソッド) ã«æ¬¡ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’記述ã—ã¾ã™: + +```4d + //%W-518.5 +``` + + + +## コンパイラー設定 + +ストラクãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® "コンパイラー" ページã§ã¯ã€ãƒ—ロジェクトã®ã‚³ãƒ³ãƒ‘イルã«é–¢é€£ã™ã‚‹ãƒ‘ラメーターを設定ã§ãã¾ã™ã€‚ [コンパイラーウィンドウ](#コンパイラーウィンドウ) ã® **コンパイラー設定** ボタンをクリックã™ã‚‹ã¨ã€ã‚³ãƒ³ãƒ‘イラーページを直接開ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +![](assets/en/Project/compilerWin6.png) + + +### コンパイルオプション + +ã“ã®ã‚¨ãƒªã‚¢ã«ã¯ã€ã‚³ãƒ³ãƒ‘イル処ç†ä¸­ã«ä½¿ç”¨ã•れる一般的ãªã‚ªãƒ—ションãŒã¾ã¨ã‚られã¦ã„ã¾ã™ã€‚ + +#### Symbolãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç”Ÿæˆ + +Symbolファイルを生æˆã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ ([Symbolファイル](#symbolファイル) å‚ç…§)。 Symbolファイルã¯ã€ãƒ—ロジェクトフォルダー内㫠`ProjectName_symbols.txt` ã¨ã„ã†åå‰ã§ä½œæˆã•れã¾ã™ã€‚ + +#### ã‚¨ãƒ©ãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç”Ÿæˆ + +シンタックスãƒã‚§ãƒƒã‚¯æ™‚ã«ã‚¨ãƒ©ãƒ¼ãƒ•ァイルを生æˆã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ ([エラーファイル](#エラーファイル) å‚ç…§)。 エラーファイルã¯ã€ãƒ—ロジェクトフォルダー内ã«`ProjectName_errors.xml` ã¨ã„ã†åå‰ã§ä½œæˆã•れã¾ã™ã€‚ + + +#### コンパイルパス + +コンパイラーã«ã‚ˆã£ã¦å®Ÿæ–½ã•れるコード解æžã®å®Ÿè¡Œå‘¨æœŸæ•°ã‚’設定ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ã“れã¯ã€ã‚³ãƒ³ãƒ‘ã‚¤ãƒ«ã®æ‰€è¦æ™‚é–“ã«å½±éŸ¿ã—ã¾ã™ã€‚ + +- **ã™ã¹ã¦å®šç¾©ã•ã›ã‚‹**: コンパイルã®ãŸã‚ã«å®Ÿæ–½ã§ãるステップをã™ã¹ã¦ãŠã“ãªã„ã¾ã™ã€‚ +- **ローカル変数ã®ã¿è‡ªå‹•定義ã•ã›ã‚‹**: プロセスãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã®åž‹ã‚’決定ã™ã‚‹å‡¦ç†ã¯ãŠã“ãªã‚れã¾ã›ã‚“。 ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹å ´åˆã€ã™ã¹ã¦ã®ãƒ—ロセス変数ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã¯é–‹ç™ºè€…自身ãŒå®£è¨€ã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒ‘イラーメソッドを自動生æˆã™ã‚‹æ©Ÿèƒ½ã‚’使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +- **自動変数定義ã¯è¡Œã‚ãªã„**: ローカルã€ãƒ—ロセスãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã®åž‹ã‚’決定ã™ã‚‹å‡¦ç†ã¯ãŠã“ãªã‚れã¾ã›ã‚“。 ã“ã®ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹å ´åˆã€ã™ã¹ã¦ã®å¤‰æ•°ãŒæ˜Žç¤ºçš„ã«å®£è¨€ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +#### コンパイル対象CPU + +

          履歴 +| ãƒãƒ¼ã‚¸ãƒ§ãƒ³ | 内容 | +| ----- | -- | +| v19 | 追加 | +
          + +ã“ã®è¨­å®šã§ã€4Dプロジェクトをãƒã‚¤ãƒ†ã‚£ãƒ–コンパイルã™ã‚‹å¯¾è±¡ã¨ãªã‚‹ãƒ—ãƒ­ã‚»ãƒƒã‚µãƒ¼ãƒ»ãƒ•ã‚¡ãƒŸãƒªãƒ¼ã‚’é¸æŠžã—ã¾ã™ã€‚ 4D ã®ã‚³ãƒ³ãƒ‘イラー㯠2ã¤ã®ãƒ—ロセッサー・ファミリーã«å‘ã‘ã¦ãƒŠã‚¤ãƒ†ã‚£ãƒ–コードをビルドã§ãã¾ã™: + +- **Intel/AMD** プロセッサー (ã™ã¹ã¦ã®ãƒžã‚·ãƒ³) +- **Apple Silicon** プロセッサー + +対象CPUã®é¸æŠžè‚¢ã¯ 2ã¤æç¤ºã•れã¾ã™ã€‚ çµæžœã¯ã€4D を実行ã—ã¦ã„るマシンã®ãƒ—ロセッサーã«ä¾å­˜ã—ã¾ã™ã€‚ + +| *オプション* | *Windows Intel/AMD* | *macOS Intel* | *macOS Silicon* | +| ------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| **å…¨ã¦ã®ãƒ—ロセッサ (Intel/AMD ãŠã‚ˆã³ Apple Silicon)** | Intel/AMD 用コードã®ã¿
          *Windows上㧠Apple Silicon 用ã®ã‚³ãƒ¼ãƒ‰ã¯ç”Ÿæˆã§ãã¾ã›ã‚“* | Apple Silicon + Intel/AMD 用コード
          *2種類ã®ã‚³ãƒ³ãƒ‘イルコードãŒç”Ÿæˆã•れã¾ã™* | Apple Silicon + Intel/AMD 用コード
          *2種類ã®ã‚³ãƒ³ãƒ‘イルコードãŒç”Ÿæˆã•れã¾ã™* | +| **自分ã®ãƒ—ロセッサ (プロセッサーå)** | Intel/AMD 用コード | Intel/AMD 用コード | Apple Silicon 用コード | + +> Apple Silicon 用ã«ã‚³ãƒ³ãƒ‘イルã™ã‚‹ã«ã¯ã€ãƒžã‚·ãƒ³ã« **Clang** アプリケーションをインストールã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ Clang ã¯æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® Xcode ã«å«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [Apple Silicon用コンパイルã®è¦ä»¶](#è¦ä»¶) ã‚’å‚ç…§ãã ã•ã„。 + +### デフォルトã®åž‹æŒ‡å®š + +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€æ›–昧ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚ªãƒ–ジェクトã®ãƒ‡ãƒ•ォルト型を設定ã—ã¾ã™ã€‚ + +- **数値**: 実数ã¾ãŸã¯å€é•·æ•´æ•°ã«æ•°å€¤ã‚’型指定ã—ã¾ã™ã€‚ プロジェクトã«ã¦åž‹æŒ‡å®šãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ãŒæ›¸ã‹ã‚Œã¦ã„ã‚‹å ´åˆã€ãã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ å€é•·æ•´æ•°ã‚’指定ã™ã‚‹ã“ã¨ã§ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’最é©åŒ–ã§ãã¾ã™ã€‚ +- **ボタン**: 実数ã¾ãŸã¯å€é•·æ•´æ•°ã«ãƒœã‚¿ãƒ³ã‚’型指定ã—ã¾ã™ã€‚ プロジェクトã«ã¦åž‹æŒ‡å®šãƒ‡ã‚£ãƒ¬ã‚¯ãƒ†ã‚£ãƒ–ãŒæ›¸ã‹ã‚Œã¦ã„ã‚‹å ´åˆã€ãã¡ã‚‰ãŒå„ªå…ˆã•れã¾ã™ã€‚ ã“ã®åž‹æŒ‡å®šã¯ãƒœã‚¿ãƒ³ã®ã»ã‹ã€ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€ãƒ”クãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ã€ãƒœã‚¿ãƒ³ã‚°ãƒªãƒƒãƒ‰ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã€ãƒ”クãƒãƒ£ãƒ¼ãƒãƒƒãƒ—アップメニューãŠã‚ˆã³ãƒ‰ãƒ­ãƒƒãƒ—ダウンリストãŒå¯¾è±¡ã¨ãªã‚Šã¾ã™ã€‚ + +### コンパイラーメソッド... + +ã“ã®ã‚¨ãƒªã‚¢ã§ã¯ã€[変数定義を生æˆ](#変数定義を生æˆ) をクリックã—ãŸã¨ãã«ã‚³ãƒ³ãƒ‘イラーãŒè‡ªå‹•生æˆã™ã‚‹ã‚³ãƒ³ãƒ‘イラーメソッドã®åå‰ã‚’設定ã§ãã¾ã™ã€‚ + +最大 5ã¤ã®ã‚³ãƒ³ãƒ‘イラーメソッドãŒç”Ÿæˆã•れã¾ã™ã€‚プロジェクトã«å¯¾å¿œã™ã‚‹è¦ç´ ãŒå­˜åœ¨ã™ã‚‹å ´åˆã®ã¿ã€ã‚³ãƒ³ãƒ‘イラーメソッドã¯ä½œæˆã•れã¾ã™: + +- **変数**: プロセス変数定義を集約ã—ã¾ã™ã€‚ +- **インタープロセス変数**: インタープロセス変数定義を集約ã—ã¾ã™ã€‚ +- **é…列**: プロセスé…列定義を集約ã—ã¾ã™ã€‚ +- **インタープロセスé…列**: インタープロセスé…列定義を集約ã—ã¾ã™ã€‚ +- **メソッド**: メソッドã®å¼•æ•°ã‚’å—ã‘入れるローカル変数定義を集約ã—ã¾ã™ (例: `C_LONGINT(mymethod;$1)`)。 + +ãれãžã‚Œã®å¯¾å¿œã™ã‚‹ã‚¨ãƒªã‚¢ã§ã€ä½œæˆã•れるメソッドåを編集ã§ãã¾ã™ãŒã€ã“れらã«ã¯å¿…ãš `Compiler_` ã¨ã„ã†æŽ¥é ­è¾žãŒä»˜ãã¾ã™ã€‚ã“れã¯å¤‰æ›´ã§ãã¾ã›ã‚“。 å„メソッドåã¯ã€æŽ¥é ­è¾žã‚’å«ã‚㦠31文字以下ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã¾ãŸã€ãƒ¡ã‚½ãƒƒãƒ‰åã¯ãƒ¦ãƒ‹ãƒ¼ã‚¯ã§ãªã‘れã°ãªã‚‰ãšã€[メソッドã®å‘½åè¦å‰‡](Concepts/identifiers.md#プロジェクトメソッド) ã«æº–ã˜ãŸã‚‚ã®ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + + +## コンパイルツール + +### Symbolファイル + +コンパイラー設定㮠[**Symbolファイルを生æˆ**](#symbolファイルを生æˆ) ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã™ã‚‹ã¨ã€`ProjectName_symbols.txt` ã¨ã„ã†åç§°ã® SymbolファイルãŒã‚³ãƒ³ãƒ‘イル時ã«ä½œæˆã•れã¾ã™ã€‚ ã“ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯ã„ãã¤ã‹ã®éƒ¨åˆ†ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™: + +#### プロセスãŠã‚ˆã³ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã®ãƒªã‚¹ãƒˆ + +ã“れら 2ã¤ã®ãƒªã‚¹ãƒˆã¯ã€4ã¤ã®ã‚«ãƒ©ãƒ ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™: + +- プロジェクト内ã§ä½¿ç”¨ã•れã¦ã„るプロセス変数ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã€ãŠã‚ˆã³é…列ã®åå‰ã€‚ 変数㯠ABCé †ã«è¡¨ç¤ºã•れã¾ã™ã€‚ +- 変数ã®åž‹ã€‚ 変数ã®åž‹ã¯ã€ã‚³ãƒ³ãƒ‘イラー命令コマンドã«ã‚ˆã‚Šè¨­å®šã•れるã‹ã€å¤‰æ•°ã®ä½¿ã‚れ方ã«åŸºã¥ã„ã¦ã‚³ãƒ³ãƒ‘イラーãŒåˆ¤æ–­ã—ã¾ã™ã€‚ 変数ã®åž‹ãŒç‰¹å®šã§ããªã„å ´åˆã€ã“ã®ã‚«ãƒ©ãƒ ã¯ç©ºæ¬„ã«ãªã‚Šã¾ã™ã€‚ +- 変数ãŒé…列ã®å ´åˆã«ã€ãã®æ¬¡å…ƒæ•°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- コンパイラーãŒå¤‰æ•°ã®åž‹ã‚’決定ã—ãŸã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¸ã®å‚照。 変数ãŒè¤‡æ•°ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ä½¿ç”¨ã•れã¦ã„ã‚‹å ´åˆã¯ã€ã‚³ãƒ³ãƒ‘イラーãŒå¤‰æ•°ã®åž‹ã‚’決定ã™ã‚‹éš›ã«ä½¿ç”¨ã—ãŸã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§æ¤œå‡ºã•れãŸå ´åˆã€(M)* ã«ç¶šã‘㦠4D ã§å®šç¾©ã•れãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰åãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰å†…ã§æ¤œå‡ºã•れãŸå ´åˆã€(M) ã«ç¶šã‘㦠4D ã§å®šç¾©ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰åãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒãƒˆãƒªã‚¬ãƒ¼ (テーブルメソッド) å†…ã§æ¤œå‡ºã•れãŸå ´åˆã€(TM) ã«ç¶šã‘ã¦ãƒ†ãƒ¼ãƒ–ルåãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒãƒ•ã‚©ãƒ¼ãƒ ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§æ¤œå‡ºã•れãŸå ´åˆã€ãƒ†ãƒ¼ãƒ–ルå㨠(FM) ã«ç¶šã‘ã¦ãƒ•ォームåãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰å†…ã§æ¤œå‡ºã•れãŸå ´åˆã€ãƒ•ォームåã€ãƒ†ãƒ¼ãƒ–ルåã€(OM) ã«ç¶šã‘ã¦ã‚ªãƒ–ジェクトメソッドåãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + - 変数ãŒãƒ•ォーム上ã®ã‚ªãƒ–ジェクトã§ã‚りã€ãƒ—ロジェクトメソッドã€ãƒ•ォームメソッドã€ã‚ªãƒ–ジェクトメソッドã€ãƒˆãƒªã‚¬ãƒ¼ã®ã„ãšã‚Œã§ã‚‚使用ã•れã¦ã„ãªã„å ´åˆã¯ã€(F) ã«ç¶šã‘ã¦ãã®ã‚ªãƒ–ジェクトãŒä½¿ç”¨ã•れるフォームåãŒè¡¨ç¤ºã•れã¾ã™ã€‚ å„ãƒªã‚¹ãƒˆã®æœ€å¾Œã«ã¯ã€ãƒ—ロセス変数ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—ロセス変数ã®ã‚µã‚¤ã‚ºãŒãƒã‚¤ãƒˆå˜ä½ã§è¡¨ç¤ºã•れã¾ã™ã€‚ + +> コンパイル時ã«ã€ã‚³ãƒ³ãƒ‘イラーã¯ç‰¹å®šã®ãƒ—ロセス変数ãŒä½¿ç”¨ã•れã¦ã„るプロセスを判別ã§ãã¾ã›ã‚“。 プロセス変数ã«ã¯ã€ãƒ—ロセスã”ã¨ã«ç•°ãªã‚‹å€¤ãŒæ ¼ç´ã•れã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ã€‚ ãã®ãŸã‚ã€æ–°è¦ãƒ—ロセスãŒé–‹å§‹ã•れるãŸã³ã«ã€ã™ã¹ã¦ã®ãƒ—ãƒ­ã‚»ã‚¹å¤‰æ•°ãŒæ„図的ã«è¤‡è£½ã•れã¾ã™ã€‚ã—ãŸãŒã£ã¦ã€ãƒ¡ãƒ¢ãƒªä¸Šã§ã“れらã®ãƒ—ロセス変数ãŒå ã‚る容é‡ã«æ³¨æ„ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ ã¾ãŸã€ãƒ—ロセス変数ã«ä½¿ã‚れる容é‡ã¯ã€ãƒ—ロセスã®ã‚¹ã‚¿ãƒƒã‚¯ã‚µã‚¤ã‚ºã¨ã¯é–¢é€£ã—ãªã„ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ + +#### ローカル変数ã®ãƒªã‚¹ãƒˆ + +ローカル変数ã®ãƒªã‚¹ãƒˆã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã€ãƒ—ロジェクトメソッドã€ãƒˆãƒªã‚¬ãƒ¼ã€ãƒ•ォームメソッドã€ã‚ªãƒ–ジェクトメソッドã”ã¨ã«ã€4D内ã¨åŒã˜é †ç•ªã§ä¸¦ã¹ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“ã®ãƒªã‚¹ãƒˆã¯ã€3ã¤ã®ã‚«ãƒ©ãƒ ã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™: + +- メソッドã§ä½¿ç”¨ã•れるローカル変数ã®ãƒªã‚¹ãƒˆ +- 変数ã®åž‹ +- 変数ãŒé…列ã®å ´åˆã«ã€ãã®æ¬¡å…ƒæ•° + +#### メソッドã®å…¨ãƒªã‚¹ãƒˆ + +ãƒ•ã‚¡ã‚¤ãƒ«ã®æœ€å¾Œã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¨ãƒ—ロジェクトメソッドã®å…¨ãƒªã‚¹ãƒˆãŒã€ãれãžã‚Œæ¬¡ã®æƒ…å ±ã¨ã¨ã‚‚ã«ç´ã‚られã¾ã™: + +- 戻り値ã®åž‹ (戻り値ã®ã‚るプロシージャーã¾ãŸã¯é–¢æ•°) +- パラメーターã®åž‹ (å—ã‘æ¸¡ã•れる引数ãŠã‚ˆã³æˆ»ã•れる値) +- コール数 +- スレッドセーフã¾ãŸã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚¢ãƒ³ã‚»ãƒ¼ãƒ•・プロパティ + +ã“ã®æƒ…å ±ã¯ã€æ¬¡ã®å½¢å¼ã§ç¤ºã•れã¾ã™: + +``` +プロシージャーã¾ãŸã¯é–¢æ•° <メソッドå>(パラメーターã®åž‹):戻り値ã®åž‹, コール数, スレッドセーフã¾ãŸã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚¢ãƒ³ã‚»ãƒ¼ãƒ• +``` + +### エラーファイル + +コンパイラー設定㮠[**エラーファイルを生æˆ**](#エラーファイルを生æˆ) オプションを使用ã—ã¦ã€ã‚³ãƒ³ãƒ‘イル時ã«ã‚¨ãƒ©ãƒ¼ãƒ•ァイルを生æˆã™ã‚‹ã‹ã©ã†ã‹ã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ エラーファイルã¯ã€ãƒ—ロジェクトフォルダー内㫠`ProjectName_errors.txt` ã¨ã„ã†åå‰ã§ä½œæˆã•れã¾ã™ã€‚ + +[コンパイラーウインドウ](#コンパイラーウインドウ) ã‹ã‚‰ã‚¨ãƒ©ãƒ¼ã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ãŒã€ãƒžã‚·ãƒ³ã‹ã‚‰ãƒžã‚·ãƒ³ã¸é€ä¿¡ã§ãるエラーファイルãŒã‚ã‚‹ã¨ä¾¿åˆ©ãªå ´åˆãŒã‚りã¾ã™ã€‚ エラーファイルã¯ã€ãã®å†…容を自動的ã«è§£æžã—ã‚„ã™ã„よã†ã« XMLフォーマットã§ç”Ÿæˆã•れã¾ã™ã€‚ ã“れを利用ã—ã¦ã€ã‚¨ãƒ©ãƒ¼è¡¨ç¤ºç”¨ã«ç‹¬è‡ªã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースを作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +エラーファイルã®é•·ã•ã¯ã€ã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã‚Šç”Ÿæˆã•れるエラーã¨è­¦å‘Šã®æ•°ã«ã‚ˆã‚Šå¤‰ã‚りã¾ã™ã€‚ + +ã‚¨ãƒ©ãƒ¼ãƒ•ã‚¡ã‚¤ãƒ«ã®æ§‹é€ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: + +- ファイルã®ä¸€ç•ªä¸Šã«ã¯ã‚¨ãƒ©ãƒ¼ã¨è­¦å‘Šã®ãƒªã‚¹ãƒˆãŒã‚りã€ãƒ¡ã‚½ãƒƒãƒ‰ã”ã¨ã€ãã—㦠4D ã§ä½œæˆã•れãŸé †åºã§ä¸¦ã¹ã‚‰ã‚Œã¾ã™ã€‚ ***全般的ãªã‚¨ãƒ©ãƒ¼*** セクションã«ã¯ã€ã‚¿ã‚¤ãƒ—定義ãŒãŠã“ãªãˆãªã„ã‚‚ã®ã¨è­˜åˆ¥ãŒä¸æ˜Žç¢ºãªã‚‚ã®ãŒã™ã¹ã¦é›†ã‚られã¾ã™ã€‚ ã“れらã®ã‚¨ãƒ©ãƒ¼ã¨è­¦å‘Šã¯ã€æ¬¡ã®å½¢å¼ã§è¡¨ç¤ºã•れã¾ã™: + - メソッドã«ãŠã‘ã‚‹è¡Œç•ªå· (0 ã¯å…¨èˆ¬çš„ãªã‚¨ãƒ©ãƒ¼) + - warning属性ã¯ã€æ¤œå‡ºã•れãŸç•°å¸¸ãŒè­¦å‘Šã§ã‚ã‚‹ã®ã‹ (warning="true")ã€ã‚ã‚‹ã„ã¯ã‚¨ãƒ©ãƒ¼ã§ã‚ã‚‹ã®ã‹ (warning="false") を表ã‚ã—ã¾ã™ + - エラーを解説ã™ã‚‹è¨ºæ–­ã®è¡¨ç¤º + +プロジェクトã«å…¨èˆ¬çš„ãªã‚¨ãƒ©ãƒ¼ãŒå­˜åœ¨ã—ãªã„å ´åˆã€ãã®ãƒ•ァイルã«ã¯ *全般的ãªã‚¨ãƒ©ãƒ¼* セクションãŒã‚りã¾ã›ã‚“。 + +エラーファイルã«ã¯ã€æ¬¡ã® 3ã¤ã®ã‚¿ã‚¤ãƒ—ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒå«ã¾ã‚Œã¾ã™: + +- **特定ã®è¡Œã«é–¢é€£ã™ã‚‹ã‚¨ãƒ©ãƒ¼**: ã“れらã®ã‚¨ãƒ©ãƒ¼ã¯ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ (エラーãŒè¦‹ã¤ã‹ã£ãŸè¡Œ) 内ã«èª¬æ˜Žã¨ã¨ã‚‚ã«è¡¨ç¤ºã•れã¾ã™ã€‚ コンパイラーã¯ã€ãƒ‡ãƒ¼ã‚¿åž‹ã‚„シンタックスã«é–¢ã™ã‚‹çŸ›ç›¾ã‚’å«ã‚€å¼ã§è¦‹ã¤ã‘ã‚‹ã¨ã€ã“ã®ã‚¿ã‚¤ãƒ—ã®ã‚¨ãƒ©ãƒ¼ã‚’レãƒãƒ¼ãƒˆã—ã¾ã™ã€‚ コンパイラーウィンドウã§ã¯ã€æ¤œå‡ºã•れãŸå„エラーをダブルクリックã™ã‚‹ã¨ã€è©²å½“ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ãŒç›´æŽ¥ 4Dã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ã‹ã‚Œã€ã‚¨ãƒ©ãƒ¼ã‚’å«ã‚€è¡ŒãŒå転表示ã•れã¾ã™ã€‚ + +- **全般的ãªã‚¨ãƒ©ãƒ¼**: ã“れらã®ã‚¨ãƒ©ãƒ¼ã¯ã€ãƒ—ロジェクトã®ã‚³ãƒ³ãƒ‘イルをä¸å¯èƒ½ã«ã—ã¾ã™ã€‚ コンパイラーãŒå…¨èˆ¬çš„ãªã‚¨ãƒ©ãƒ¼ã‚’生æˆã™ã‚‹ã‚±ãƒ¼ã‚¹ã¯ã€æ¬¡ã® 2ã¤ã§ã™: + - プロセス変数ã®ãƒ‡ãƒ¼ã‚¿åž‹ãŒæ±ºå®šã§ããªã‹ã£ãŸã€‚ + - ç•°ãªã‚‹ 2ã¤ã®ã‚ªãƒ–ジェクトãŒåŒã˜åç§°ã§ã‚る。 全般的ãªã‚¨ãƒ©ãƒ¼ã¯ç‰¹å®šã®ãƒ¡ã‚½ãƒƒãƒ‰ã«é–¢é€£ã—ã¦ã„ãªã„ãŸã‚ã€ã“ã®ã‚ˆã†ãªåå‰ãŒä»˜ã‘られã¦ã„ã¾ã™ã€‚ 最åˆã®ã‚±ãƒ¼ã‚¹ã¯ã€ã‚³ãƒ³ãƒ‘イラーãŒãƒ—ロジェクトã®ã„ãšã‚Œã®ç®‡æ‰€ã§ã‚‚ã€æŒ‡å®šã•れãŸåž‹å®šç¾©ã‚’実行ã§ããªã‹ã£ãŸå ´åˆã§ã™ã€‚ 2番目ã®ã‚±ãƒ¼ã‚¹ã§ã¯ã€ã„ãšã‚Œã®ã‚ªãƒ–ジェクトã«ç‰¹å®šã®åå‰ã‚’割り当ã¦ã‚‹ã¹ãã‹ã‚’決定ã§ãã¾ã›ã‚“。 + +- **警告**: 警告ã¯ã‚¨ãƒ©ãƒ¼ã§ã¯ã‚りã¾ã›ã‚“。 警告ã«ã‚ˆã‚Šã€ãƒ—ロジェクトãŒã‚³ãƒ³ãƒ‘イルã§ããªããªã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。ã“れã¯ã€ã‚¨ãƒ©ãƒ¼ã«ãªã‚‹å¯èƒ½æ€§ã®ã‚るコードを示ã™ã ã‘ã§ã™ã€‚ コンパイラーウィンドウã«ãŠã„ã¦ã€è­¦å‘Šã¯ã‚¤ã‚¿ãƒªãƒƒã‚¯ä½“ã§è¡¨ç¤ºã•れã¾ã™ã€‚ ãれãžã‚Œã®è­¦å‘Šã‚’ダブルクリックã™ã‚‹ã¨ã€è©²å½“ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ãŒç›´æŽ¥ 4Dã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§é–‹ã‹ã‚Œã€ãã®è­¦å‘Šã«é–¢ä¿‚ã™ã‚‹è¡ŒãŒå転表示ã•れã¾ã™ã€‚ + + + + +### 範囲ãƒã‚§ãƒƒã‚¯ + +4Dコンパイラーã«ã‚ˆã£ã¦ç”Ÿæˆã•れãŸã‚³ãƒ¼ãƒ‰ã§ã¯ã€é…列è¦ç´ ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚„文字å‚ç…§ãŒå®Ÿéš›ã«é…列や文字列ã®ç¯„囲内ã§ãŠã“ãªã‚れã¦ã„ã‚‹ã‹ãŒè‡ªå‹•çš„ã«ç¢ºèªã•れã¾ã™ã€‚ 範囲外ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã¯ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ å®Ÿè¡Œã‚¨ãƒ©ãƒ¼ã‚’誘発ã—ã¾ã™ã€‚ + +コード内ã§é–“é•ã„ãŒãªã„ã¨æ€ã‚れる箇所ã«å¯¾ã—ã¦ç¯„囲ãƒã‚§ãƒƒã‚¯ã‚’é©ç”¨ã—ãŸããªã„ã¨ãã‚‚ã‚りã¾ã™ã€‚ 具体的ã«ã¯ã€ã‹ãªã‚Šã®å›žæ•°ç¹°ã‚Šè¿”ã•れるループã«é–¢ã—ã€æ—§å¼ã®ãƒžã‚·ãƒ³ä¸Šã§ã‚³ãƒ³ãƒ‘イル済ã¿ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’実行ã™ã‚‹ã¨ã€ç¯„囲ãƒã‚§ãƒƒã‚¯ã«ã‚ˆã‚Šå‡¦ç†é€Ÿåº¦ãŒè‘—ã—ã低下ã™ã‚‹ãŠãれãŒã‚りã¾ã™ã€‚ 関連ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã«èª¤ã‚ŠãŒãªãã€ã‚·ã‚¹ãƒ†ãƒ ã‚¨ãƒ©ãƒ¼ã‚’引ãèµ·ã“ã•ãªã„ã“ã¨ãŒç¢ºå®Ÿã§ã‚れã°ã€ç¯„囲ãƒã‚§ãƒƒã‚¯ã‚’ローカル上ã§ç„¡åйã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“れをãŠã“ãªã†ã«ã¯ã€ç¯„囲ãƒã‚§ãƒƒã‚¯ã‹ã‚‰å¤–ã™ã‚³ãƒ¼ãƒ‰ã‚’特殊ãªã‚³ãƒ¡ãƒ³ãƒˆã§ã‚ã‚‹ `//%R-` 㨠`//%R+` ã§å›²ã¿ã¾ã™ã€‚ `//%R-` コメントã¯ç¯„囲ãƒã‚§ãƒƒã‚¯ã‚’無効ã«ã—ã€`//%R+` ã¯ãれをå†ã³æœ‰åйã«ã—ã¾ã™: + +```4d + // %R- 範囲ãƒã‚§ãƒƒã‚¯ã‚’無効化 + + ... // ã“ã“ã«ç¯„囲ãƒã‚§ãƒƒã‚¯ã‹ã‚‰å¤–ã™ã‚³ãƒ¼ãƒ‰ã‚’記述ã—ã¾ã™ + + // %R+ 以é™ã¯ç¯„囲ãƒã‚§ãƒƒã‚¯ãŒå†ã³æœ‰åйã«ãªã‚Šã¾ã™ +``` + +## コンパイラーã«ã¤ã„㦠+ +4D ã«ã¯ 2種類ã®ã‚³ãƒ³ãƒ‘イラーãŒã‚りã¾ã™: + +- "クラシック" コンパイラー㯠Intel/AMDプロセッサーå‘ã‘ã®ãƒã‚¤ãƒ†ã‚£ãƒ–コードをコンパイルã—ã¾ã™ +- "Apple Silicon用コンパイラー" 㯠Apple Silicon プロセッサーå‘ã‘ã®ãƒã‚¤ãƒ†ã‚£ãƒ–コードをコンパイルã—ã¾ã™ + +クラシックコンパイラー㯠Windows ãŠã‚ˆã³ macOS ã®ã©ã¡ã‚‰ã§ã‚‚使用ã§ãã¾ã™ãŒã€Apple SIlicon用コンパイラー㯠macOS マシンã§ã®ã¿ä½¿ç”¨ã§ãã¾ã™: + +| | Windows用コンパイル | Intel Mac用コンパイル | Silicon Mac用コンパイル | +| ----------- |:-------------:|:---------------:|:-----------------:| +| Windows | O | O | X | +| Intel Mac | O | O | O | +| Silicon Mac | O | O | O | + + +ã©ã¡ã‚‰ã®ã‚³ãƒ³ãƒ‘イラーも 4D ã«çµ±åˆã•れã¦ã„ã¾ã™ã€‚ [コンパイル対象CPU](#コンパイル対象CPU) オプションã®è¨­å®šã«å¿œã˜ã¦ã€é©åˆ‡ãªã‚³ãƒ³ãƒ‘イラーãŒè‡ªå‹•çš„ã«é¸æŠžã•れã¾ã™ã€‚ + + + +### クラシックコンパイラー + +マシン㮠OS ã«é–¢ã‚らãšã€ã‚¯ãƒ©ã‚·ãƒƒã‚¯ã‚³ãƒ³ãƒ‘イラー㯠Intel/AMDプロセッサーå‘ã‘ã®ãƒã‚¤ãƒ†ã‚£ãƒ–コンパイルコードを生æˆã—ã¾ã™ã€‚ 特別ãªè¨­å®šã¯å¿…è¦ã‚りã¾ã›ã‚“。 + +çµæžœã®ã‚³ãƒ³ãƒ‘イルコードã¯ãƒ—ロジェクト㮠[DerivedData](architecture.md#deriveddata-フォルダー) フォルダーã«ä¿å­˜ã•れã¾ã™ã€‚ + + +### Apple Silicon用コンパイラー + +Apple Silicon用コンパイラー㯠*Apple M1* ãªã©ã® Apple Silicon プロセッサーå‘ã‘ã®ãƒã‚¤ãƒ†ã‚£ãƒ–コンパイルコードを生æˆã—ã¾ã™ã€‚ + +çµæžœã®ã‚³ãƒ³ãƒ‘イルコードã¯ãƒ—ロジェクト㮠[Libraries](architecture.md#libraries-フォルダー) フォルダーã«ä¿å­˜ã•れã¾ã™ã€‚ + + +#### è¦ä»¶ + +- **macOS マシン**: Apple Silicon用コンパイラー㯠Apple ã®ãƒžã‚·ãƒ³ä¸Šã§ã®ã¿å®Ÿè¡Œå¯èƒ½ã§ã™ã€‚ +- **4D プロジェクトアーキテクãƒãƒ£ãƒ¼**: Apple Silicon用コンパイラー㯠[プロジェクトアーキテクãƒãƒ£ãƒ¼](architecture.md) を使ã£ãŸ 4D開発ã§ã®ã¿åˆ©ç”¨ã§ãã¾ã™ã€‚ +- **Xcode ã¾ãŸã¯ Developer Tools**: コンパイル㮠[2ã¤ç›®ã®ã‚¹ãƒ†ãƒƒãƒ—](#インクリメンタルコンパイルラー) ã«ãŠã„ã¦ã€ãƒ—ロジェクトを C++ コードã‹ã‚‰ã‚³ãƒ³ãƒ‘イルã™ã‚‹ãŸã‚ã«ã€Apple Silicon用コンパイラーã¯ã‚ªãƒ¼ãƒ—ンソース macOS コンパイラー **Clang** を呼ã³å‡ºã—ã¾ã™ã€‚ *Clang* 㯠Apple ãƒã‚¤ãƒ†ã‚£ãƒ–ライブラリを必è¦ã¨ã—ã¾ã™ã€‚ã“れら㯠**Xcode** ã¾ãŸã¯ **Developer Tools** パッケージよりæä¾›ã•れã¦ã„ã¾ã™ã€‚ + - Xcode ã‚„ Developer Tools をマシン上ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸçŠ¶æ…‹ã§ **ã™ã§ã«æŒã£ã¦ã„ã‚‹å ´åˆ**ã€ãれらã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ 4D ã®è¦ä»¶ã¨åˆã£ã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¾ã™ã€‚ + - マシンã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れãŸçŠ¶æ…‹ã§ã“れらã®ãƒ„ールを **æŒã£ã¦ã„ãªã„å ´åˆ**ã€Apple Developer ã® Webサイトã‹ã‚‰ã„ãšã‚Œã‹ã‚’ダウンロードã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> インストール手順ãŒç°¡å˜ãªãŸã‚ **Xcode** ã®ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã‚’推奨ã—ã¦ã„ã¾ã™ã€‚ よりコンパクト㪠**Developer Tools** をインストールã—ã¦ã‚‚å•題ã‚りã¾ã›ã‚“ãŒã€ã“ã¡ã‚‰ã¯ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«æ‰‹é †ãŒã‚„や複雑ã§ã™ã€‚ + +ã„ãšã‚Œã«ã›ã‚ˆã€è¦ä»¶ãŒæº€ãŸã•れã¦ã„ãªã„å ´åˆã«ã¯ã€4D ã® Apple Silicon用コンパイラーãŒè­¦å‘Šã‚’発ã—ã¾ã™ã€‚ + + +#### インクリメンタルコンパイラー + +Apple Silicon用コンパイラーã¯ã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ã‚¿ãƒ«ã‚³ãƒ³ãƒ‘イラーã§ã™: + +- åˆã‚ã¦ã®ã‚³ãƒ³ãƒ‘イルã«ãŠã„ã¦ã¯ã€**ã™ã¹ã¦ã® 4Dメソッド** ãŒã‚³ãƒ³ãƒ‘イルã•れã¾ã™ã€‚ ã“れã«ã¯æ™‚é–“ãŒã‹ã‹ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™ãŒã€ 一度ãりã§ã™ã€‚ +- 以é™ã®ã‚³ãƒ³ãƒ‘イルã«ãŠã„ã¦ã¯ã€**æ–°è¦ã¾ãŸã¯ç·¨é›†ã•れãŸãƒ¡ã‚½ãƒƒãƒ‰** ã®ã¿ãŒå‡¦ç†ã•れã€ã‚³ãƒ³ãƒ‘イル時間を大幅ã«çŸ­ç¸®ã—ã¾ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Project/components.md b/website/translated_docs/ja/Project/components.md new file mode 100644 index 00000000000000..6751e37c89ce77 --- /dev/null +++ b/website/translated_docs/ja/Project/components.md @@ -0,0 +1,29 @@ +--- +id: components +title: 4D コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ©ã‚¤ãƒ–ラリ +--- + +4Dã«ã¯ã€ãƒ“ルトイン 4Dコンãƒãƒ¼ãƒãƒ³ãƒˆã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ [コンãƒãƒ¼ãƒãƒ³ãƒˆ](Concepts/components.md)ã¯ã€4Dプロジェクトã«è¿½åŠ æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ + +## 4Dコンãƒãƒ¼ãƒãƒ³ãƒˆã®ä¸€è¦§ + +| コンãƒãƒ¼ãƒãƒ³ãƒˆå | 説明 | ドキュメンテーションã®å ´æ‰€ | +| --------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------- | +| 4D Mobile App Server | èªè¨¼ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ç®¡ç†ã€ãƒ¢ãƒã‚¤ãƒ«ã‚¢ãƒ—リケーション開発ã®ãŸã‚ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£ã‚¯ãƒ©ã‚¹ã¨é–¢æ•°ã®ã‚»ãƒƒãƒˆ | [4d-go-mobile github リãƒã‚¸ãƒˆãƒª](https://github.com/4d-go-mobile/4D-Mobile-App-Server) | +| 4D Progress | 1ã¤ä»¥ä¸Šã®é€²æ—ãƒãƒ¼ã‚’åŒã˜ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§é–‹ã | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Progress.100-5461799.en.html) | +| 4D SVG | 一般的㪠svgグラフィックオブジェクトã®ä½œæˆãƒ»æ“作 | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-SVG-Component.300-5462064.en.html) | +| 4D ViewPro | フォームã«è¿½åŠ ã§ãる表計算機能 | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-View-Pro-Reference.100-5442901.en.html) | +| 4D Widgets | DatePicker, TimePicker, SearchPicker 4Dウィジェットã®ç®¡ç† | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Widgets.100-5462909.en.html) | +| 4D WritePro Interface | 4D Write Pro パレットã®ç®¡ç† | [4d github リãƒã‚¸ãƒˆãƒª](https://github.com/4d/4D-WritePro-Interface) | + + +> 独自㮠4Dコンãƒãƒ¼ãƒãƒ³ãƒˆã‚’開発ã—ã€ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 詳ã—ã㯠[ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³](Concepts/components.md) ã‚’å‚ç…§ãã ã•ã„。 + + +## エクスプローラーã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ + +インストールã•れãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã«ãƒ¡ã‚½ãƒƒãƒ‰ãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆã€ãれらã¯ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ãƒ¡ã‚½ãƒƒãƒ‰ãƒšãƒ¼ã‚¸ã® **コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰** テーマã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +コンãƒãƒ¼ãƒãƒ³ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã‚’é¸æŠžã—ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®**ドキュメント** ボタンをクリックã™ã‚‹ã¨ã€ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã«é–¢ã™ã‚‹æƒ…å ±ãŒå¾—られã¾ã™ ([ã‚れã°](documentation.md))。 + +![alt-text](assets/en/Project/compDoc.png) \ No newline at end of file diff --git a/website/translated_docs/ja/Project/creating.md b/website/translated_docs/ja/Project/creating.md index a29e8446d5c778..15d2639aef7b6c 100644 --- a/website/translated_docs/ja/Project/creating.md +++ b/website/translated_docs/ja/Project/creating.md @@ -1,31 +1,115 @@ --- id: creating -title: 4D プロジェクトã®ä½œæˆ +title: プロジェクトを開発ã™ã‚‹ --- -## è¦ä»¶ +4Dプロジェクトã¯ã€åŒ…括的ãªçµ±åˆé–‹ç™ºç’°å¢ƒ (IDE) ã‚’æä¾›ã™ã‚‹ **4D** アプリケーションを使ã£ã¦ä½œæˆãƒ»é–‹ç™ºã—ã¾ã™ã€‚ **4D Server** ã‚‚ã€ç©ºã®ãƒ—ロジェクトを新è¦ä½œæˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -æ–°è¦ã® 4D プロジェクトを作æˆã§ãã‚‹ã®ã¯ **4D Developer** アプリケーションã®ã¿ã§ã™ ([プロジェクトã®é–‹ç™º](developing.md) å‚ç…§)。 +マルãƒãƒ¦ãƒ¼ã‚¶ãƒ¼é–‹ç™ºã¯æ¨™æº–的㪠**ソース管ç†** リãƒã‚¸ãƒˆãƒªãƒ„ール (Perforce, Git, SVN ç­‰) を使ã£ã¦ãŠã“ãªã„ã¾ã™ã€‚ã“れã«ã‚ˆã£ã¦ã€ç•°ãªã‚‹ãƒ–ランãƒã§é–‹ç™ºã—ã€æ¯”較ã—ã¦ãƒžãƒ¼ã‚¸ã¾ãŸã¯å¤‰æ›´ã‚’戻ã™ã¨ã„ã£ãŸå‡¦ç†ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ -**注:** 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)" å‚照。 +## プロジェクトã®ä½œæˆ -## プロジェクトファイルã®ä½œæˆ +æ–°è¦ã® 4Dアプリケーションプロジェクト㯠**4D** ã¾ãŸã¯ **4D Server** アプリケーションを使ã£ã¦ä½œæˆã—ã¾ã™ã€‚ ã„ãšã‚Œã®å ´åˆã‚‚ã€ãƒ—ロジェクトファイルã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒžã‚·ãƒ³ä¸Šã«ä¿å­˜ã—ã¾ã™ã€‚ -æ–°è¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ—ロジェクトを作æˆã™ã‚‹ã«ã¯: +æ–°è¦ãƒ—ロジェクトを作æˆã™ã‚‹ã«ã¯: -1. 4D Developer アプリケーションを起動ã—ã¾ã™ã€‚ -2. **ファイル**メニューã‹ã‚‰**æ–°è¦ ï¼ž データベースプロジェクト...**ã‚’é¸æŠžã—ã¾ã™: ![](assets/en/Project/project-create1.png) - ã¾ãŸã¯ - ツールãƒãƒ¼ã®**æ–°è¦**ボタンã®çŸ¢å°ã‚’クリックã—ã¦**データベースプロジェクト...**ã‚’é¸æŠžã—ã¾ã™: ![](assets/en/Project/projectCreate2.png) - 標準ã®**ä¿å­˜**ダイアログãŒé–‹ãã€4D データベースプロジェクトを格ç´ã™ã‚‹ãƒ•ォルダーã®åç§°ã¨å ´æ‰€ãŒæŒ‡å®šã§ãã¾ã™ã€‚ -3. プロジェクトフォルダーåを入力ã—ãŸã‚‰ã€**ä¿å­˜**をクリックã—ã¾ã™ã€‚ ã“ã®åç§°ã¯ã¤ãŽã®å ´æ‰€ã«ä½¿ç”¨ã•れã¾ã™: - - プロジェクトを格ç´ã™ã‚‹ãƒ•ォルダーã®åç§° ([4D プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼](Project/architecture.md) ã§ç´¹ä»‹ã—ã¦ã„る例ã§ã¯ "MyFirstProject") - - "Project" フォルダーã®ä¸­ã«ã‚ã‚‹ .4DProject ファイルã®åç§° - - OS ã«ã‚ˆã£ã¦è¨±å¯ã•れã¦ã„ã‚‹åç§°ã§ã‚れã°ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ *警告:* ç•°ãªã‚‹ OS ã§ã®ä½¿ç”¨ã‚’予定ã—ã¦ã„ãŸã‚Šã€ã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ„ールを利用ã—ãŸã‚Šã™ã‚‹ã®ã§ã‚れã°ã€ãれらã®å‘½åè¦å‰‡ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +1. 4D ã¾ãŸã¯ 4D Server ã‚’èµ·å‹•ã—ã¾ã™ã€‚ +2. **ファイル** メニューより **æ–°è¦ > プロジェクト...**ã‚’é¸æŠžã—ã¾ã™:

          ![](assets/en/getStart/projectCreate1.png)

          OR

          (4D ã®ã¿) **æ–°è¦** ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã‚ˆã‚Š **プロジェクト...**ã‚’é¸æŠžã—ã¾ã™:

          ![](assets/en/getStart/projectCreate2.png)

          標準㮠**ä¿å­˜** ダイアログãŒè¡¨ç¤ºã•れã€4D プロジェクトã®åå‰ã¨ä¿å­˜å ´æ‰€ã‚’指定ã—ã¾ã™ã€‚ -ダイアログボックスをå—ã‘入れるã¨ã€4D ã¯é–‹ã„ã¦ã„るデータベース (ã‚れã°) ã‚’é–‰ã˜ã€æŒ‡å®šã®å ´æ‰€ã«ãƒ—ロジェクトフォルダーを作æˆã—ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ—ロジェクトã«å¿…è¦ãªãƒ•ァイルを設置ã—ã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ [4D プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼](Project/architecture.md) ã‚’å‚ç…§ãã ã•ã„)。 +3. プロジェクトフォルダーåを入力ã—ãŸã‚‰ã€**ä¿å­˜**をクリックã—ã¾ã™ã€‚

          ã“ã®åç§°ã¯ã¤ãŽã®å ´æ‰€ã«ä½¿ç”¨ã•れã¾ã™: + - プロジェクト全体をä¿å­˜ã™ã‚‹ãƒ•ォルダーã®åç§° + - "Project" フォルダーã®ä¸­ã«ã‚ã‚‹ .4DProject ファイルã®åç§°

          -ã¤ãŽã«ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーを最å‰é¢ã«ã—㟠4D アプリケーションウィンドウãŒè¡¨ç¤ºã•れã¾ã™ã€‚ プロジェクトãŒä½œæˆã•れãŸã‚‰ã€ãƒ—ロジェクトフォームã®ä½œæˆã‚„ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’é–‹ã„ã¦ãƒ†ãƒ¼ãƒ–ルãŠã‚ˆã³ãƒ•ィールドを追加ã™ã‚‹ãªã©ã€é–‹ç™ºä½œæ¥­ã¸ã¨é€²ã¿ã¾ã™ã€‚ \ No newline at end of file + OS ã«ã‚ˆã£ã¦è¨±å¯ã•れã¦ã„ã‚‹åç§°ã§ã‚れã°ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ç•°ãªã‚‹ OS ã§ã®ä½¿ç”¨ã‚’予定ã—ã¦ã„ãŸã‚Šã€ã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ„ールを利用ã—ãŸã‚Šã™ã‚‹ã®ã§ã‚れã°ã€ãれらã®å‘½åè¦å‰‡ã‚’考慮ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +**ä¿å­˜** ダイアログをå—ã‘入れるã¨ã€4D ã¯é–‹ã„ã¦ã„るプロジェクト (ã‚れã°) ã‚’é–‰ã˜ã€æŒ‡å®šã®å ´æ‰€ã«ãƒ—ロジェクトフォルダーを作æˆã—ã€ãƒ—ロジェクトã«å¿…è¦ãªãƒ•ァイルを設置ã—ã¾ã™ã€‚ (詳細ã«ã¤ã„ã¦ã¯ [4D プロジェクトã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼](Project/architecture.md) ã‚’å‚ç…§ãã ã•ã„)。 + +ã“れã§ã€ãƒ—ロジェクトã®é–‹ç™ºã‚’å§‹ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## プロジェクトを開ã + +既存ã®ãƒ—ロジェクトを 4D ã§é–‹ãã«ã¯: + +1. Welcome ウィザードã«ã¦ **ローカルアプリケーションプロジェクトを開ã** ã‚’é¸æŠžã—ã¾ã™ã€‚

          OR

          **ファイル** メニューより **é–‹ã > ローカルプロジェクト...**ã‚’é¸æŠžã™ã‚‹ã‹ã€**é–‹ã** ツールãƒãƒ¼ãƒœã‚¿ãƒ³ã‚ˆã‚ŠåŒæ§˜ã«é¸æŠžã—ã¾ã™ã€‚

          標準ã®ãƒ•ァイルを開ããŸã‚ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ + +2. プロジェクト㮠`.4dproject` ãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã—ã€**é–‹ã** をクリックã—ã¾ã™ã€‚

          デフォルトã§ã€ãƒ—ロジェクトã¯ã‚«ãƒ¬ãƒ³ãƒˆãƒ‡ãƒ¼ã‚¿ãƒ•ァイルã¨ã¨ã‚‚ã«é–‹ã‹ã‚Œã¾ã™ã€‚ ã»ã‹ã«ã‚‚ã€æ¬¡ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚¿ã‚¤ãƒ—ã‚’é¸æŠžã§ãã¾ã™: + + - *圧縮ã•れãŸãƒ—ロジェクトファイル*: `.4dz` æ‹¡å¼µå­ - é‹ç”¨ãƒ—ロジェクト + - *ショートカットファイル*: `.4DLink` æ‹¡å¼µå­ - プロジェクトやアプリケーションを起動ã™ã‚‹éš›ã«å¿…è¦ãªè¿½åŠ ã®ãƒ‘ラメーターを格ç´ã—ã¦ã„ã¾ã™ (アドレスã€èªè¨¼æƒ…å ±ã€ä»–) + - *ãƒã‚¤ãƒŠãƒªãƒ•ァイル*: `.4db` ã¾ãŸã¯ `.4dc` æ‹¡å¼µå­ - 従æ¥ã® 4D ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹å½¢å¼ + +### オプション + +標準ã®ã‚·ã‚¹ãƒ†ãƒ ã‚ªãƒ—ションã«åŠ ãˆã€4D ãŒæä¾›ã™ã‚‹ *é–‹ã* ダイアログボックスã«ã¯ã€*é–‹ã* ã¨**データファイル** ã¨ã„ã†ã€2ã¤ã®ã‚ªãƒ—ションãŒã‚りã¾ã™ã€‚ + +- **é–‹ã** - プロジェクトを開ãモードを指定ã§ãã¾ã™: + - **インタープリター** ã¾ãŸã¯ **コンパイル済ã¿**: ã“れらã®ã‚ªãƒ—ションã¯ã€é¸æŠžã—ãŸãƒ—ロジェクト㌠[インタープリターãŠã‚ˆã³ã‚³ãƒ³ãƒ‘イル済ã¿ã‚³ãƒ¼ãƒ‰](Concepts/interpreted.md) ã‚’å«ã‚“ã§ã„ã‚‹å ´åˆã«é¸æŠžå¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ + - **[Maintenance Security Center](MSC/overview.md)**: æå‚·ã‚’å—ã‘ãŸãƒ—エロジェクトã«å¿…è¦ãªä¿®å¾©ã‚’æ–½ã™ãŸã‚ã«ã€ä¿è­·ãƒ¢ãƒ¼ãƒ‰ã§ãƒ—ロジェクトを開ãã¾ã™ã€‚ + +- **データファイル** - プロジェクトã§ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ¼ã‚¿ãƒ•ァイルを指定ã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€**ç¾åœ¨ã®ãƒ‡ãƒ¼ã‚¿ãƒ•ァイル** オプションãŒé¸æŠžã•れã¦ã„ã¾ã™ã€‚ + +## プロジェクトを開ã (ãã®ä»–ã®æ–¹æ³•) + +4D ã§ã¯ã€é–‹ãダイアログを経由ã—ãªãã¦ã‚‚プロジェクトを開ãã“ã¨ã®ã§ãる方法ãŒã„ãã¤ã‹ã‚りã¾ã™: + +- メニューを使用: + - *メニューãƒãƒ¼* - **ファイル** > **最近使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ã / {project name}** + - *4D ツールãƒãƒ¼* - **é–‹ã** ボタンã¨ãã®ã‚µãƒ–メニューを使ã£ã¦ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã—ã¾ã™ã€‚ + +- 4D 環境設定を使用: + - 4D 環境設定㮠**開始時** オプション㫠**最後ã«ä½¿ç”¨ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’é–‹ã** を指定ã—ã¾ã™ã€‚ + +- `.4DLink` ファイルを使用 + +### 4DLinkファイルを使ã£ã¦ãƒ—ロジェクトを開ã + +4Dアプリケーションを起動ã—ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã® 4Dプロジェクトを開ãã®ã« [`.4DLink` ファイル](#4DLinkファイルã«ã¤ã„ã¦) ãŒåˆ©ç”¨ã§ãã¾ã™ã€‚ ã“れをãŠã“ãªã†ã«ã¯ 2ã¤ã®æ–¹æ³•ãŒã‚りã¾ã™: + +- `.4DLink` をダブルクリックã€ã‚ã‚‹ã„㯠4Dアプリケーションã«ãƒ‰ãƒ©ãƒƒã‚°ï¼†ãƒ‰ãƒ­ãƒƒãƒ—ã™ã‚‹ +- **ファイル** > **最近使用ã—ãŸãƒ—ロジェクトを開ã** ã®ã‚µãƒ–メニューを開ãã€ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã‚’é¸æŠžã™ã‚‹ + +![最近使用ã—ãŸãƒ•ァイルを開ã](assets/en/Project/4Dlinkfiles.png) + +"リモートプロジェクト" タイプ㮠.4DLinkファイルã¯ã€ä»–ã®ãƒžã‚·ãƒ³ã«ã‚³ãƒ”ーã—ã¦ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +> 4D 㨠4D Server ã®æŽ¥ç¶šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã§ 4DLinkãƒ•ã‚¡ã‚¤ãƒ«ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ (ローカルプロジェクトã®é–‹å§‹ã®ã¿)。 + +## 4DLinkファイルã«ã¤ã„㦠+ +`.4DLink` æ‹¡å¼µå­ãŒä»˜ã„ãŸãƒ•ァイル㯠XMLファイルã§ã€ãƒ­ãƒ¼ã‚«ãƒ«ã¾ãŸã¯ãƒªãƒ¢ãƒ¼ãƒˆ4Dプロジェクトã®é–‹å§‹ã‚’簡略化・自動化ã™ã‚‹ãŸã‚ã®è¨­å®šã‚’æ ¼ç´ã—ã¾ã™ã€‚ + +`.4DLink` ファイルã¯ã€4Dプロジェクトã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚„接続識別å­ã‚’ä¿å­˜ã—ã€ãƒ—ロジェクトを開ããŸã‚ã®æ“作を短縮ã—ã¾ã™ã€‚ + +ローカルプロジェクトをåˆã‚ã¦é–‹ãã¨ãã€ã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ã«åˆã‚ã¦æŽ¥ç¶šã™ã‚‹ã¨ãã€4D 㯠`.4DLink` ファイルを自動生æˆã—ã¾ã™ã€‚ ã“ã®ãƒ•ァイルã¯ã€æ¬¡ã®å ´æ‰€ã«ã‚るローカル環境設定フォルダーã«ç½®ã‹ã‚Œã¾ã™: + +- Windows 7 以上: C:\Users\UserName\AppData\Roaming\4D\Favorites vXX\ +- OS X: Users/UserName/Library/Application Support/4D/Favorites vXX/ + +XX ã¯ã‚¢ãƒ—リケーションã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå·ã‚’æ„味ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€4D v19 ãªã‚‰ "Favorites v19" ã¨ãªã‚Šã¾ã™ã€‚ + +ã“ã®ãƒ•ォルダーã«ã¯ã€2ã¤ã®ã‚µãƒ–フォルダーãŒã‚りã¾ã™: +- **Local** フォルダーã«ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ãƒ—ロジェクトã®é–‹å§‹ã«ä½¿ç”¨ã§ãã‚‹ `.4DLink` ãƒ•ã‚¡ã‚¤ãƒ«ãŒæ ¼ç´ã•れã¾ã™ã€‚ +- **Remote** フォルダーã«ã¯ã€æœ€è¿‘ã®ãƒªãƒ¢ãƒ¼ãƒˆãƒ—ロジェクト㮠`4DLink` ファイルãŒç½®ã‹ã‚Œã¾ã™ã€‚ + +`.4DLink` ファイル㯠XMLエディターã§ä½œæˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +`.4DLink` ファイルを構築ã™ã‚‹ãŸã‚ã«ä½¿ç”¨ã§ãã‚‹ XMLキーを定義ã—㟠DTD ãŒ4D よりæä¾›ã•れã¾ã™ã€‚ ã“ã® DTD 㯠database_link.dtd ã¨ã„ã†åå‰ã§ã€4Dアプリケーション㮠\Resources\DTD\ サブフォルダーã«ã‚りã¾ã™ã€‚ + + +## ファイルã®ä¿å­˜ + +4D ã§ãƒ—ロジェクトを開発ã™ã‚‹ã«ã‚ãŸã£ã¦ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¦ç´ ã‚„メソッドã€ãƒ•ォームã®ä½œæˆãƒ»å¤‰æ›´ãƒ»ä¿å­˜ã«ã¯ 4D ã®ãƒ“ルトインエディターを利用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ **ä¿å­˜** ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚’é¸æŠžã™ã‚‹ã‹ã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ãŒãƒ•ォーカスを得ãŸ/失ã£ãŸã¨ãã«ã€ç·¨é›†å†…容ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«ä¿å­˜ã•れã¾ã™ã€‚ + +ã“ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã®ä½œæ¥­å¯¾è±¡ã¯ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã®ãƒ•ァイルãªãŸã‚ã€åŒã˜ãƒ•ァイルãŒåŒæ™‚ã«ç·¨é›†ã•れã¦ã„ãŸã‚Šå‰Šé™¤ã•れã¦ã„ãŸã‚Šã¨ã„ã£ãŸå ´åˆã«ã¯ç«¶åˆãŒç™ºç”Ÿã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä¸€ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’メソッドエディターã§ç·¨é›†ã—ã¤ã¤ã€æ¨™æº–ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ã‚‚é–‹ã„ã¦å¤‰æ›´ã—ãŸå ´åˆã«ç«¶åˆãŒèµ·ã“りãˆã¾ã™ã€‚ + +4D ã®ãƒ•レームワークã«ã¯åŒæ™‚アクセスを制御ã™ã‚‹ãŸã‚ã®ãƒ•ァイルアクセスマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ãŒå«ã¾ã‚Œã¦ã„ã¾ã™: + +- é–‹ã‹ã‚Œã¦ã„るファイル㌠OS レベルã§èª­ã¿å–り専用ã®å ´åˆã€ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«ã¯éµã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™: ![](assets/en/Project/lockicon.png) +- é–‹ã‹ã‚Œã¦ã„るファイルãŒè¤‡æ•°ã®ã‚¢ã‚¯ã‚»ã‚¹ã«ã‚ˆã£ã¦åŒæ™‚編集をå—ã‘ã¦ã„ã‚‹å ´åˆã€4D ã¯ä¿å­˜æ™‚ã«è­¦å‘Šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’表示ã—ã¾ã™: + +![](assets/en/Project/projectReload.png) + - **ã¯ã„**: 編集内容を破棄ã—ã¦ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ + - **ã„ã„ãˆ**: 編集内容ã§ä¸Šæ›¸ãä¿å­˜ã—ã¾ã™ + - **キャンセル**: ä¿å­˜ã—ã¾ã›ã‚“ + +ã“ã®æ©Ÿèƒ½ã¯ã™ã¹ã¦ã®ãƒ“ルトインエディター (ストラクãƒãƒ£ãƒ¼ã€ãƒ•ォームã€ãƒ¡ã‚½ãƒƒãƒ‰ã€è¨­å®šã€ãƒ„ールボックス) ã«ãŠã„ã¦æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã™). \ No newline at end of file diff --git a/website/translated_docs/ja/Project/deploying.md b/website/translated_docs/ja/Project/deploying.md deleted file mode 100644 index 2512952e806dc5..00000000000000 --- a/website/translated_docs/ja/Project/deploying.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -id: deploying -title: Deploying a project ---- - -A database project is deployed via a single packed .4dz file. A .4dz file is essentially a zipped version of the [project folder](architecture.md). Compact and with an optimized size, .4dz project files can be easily deployed. - -.4dz files can be used by: - -- 4D Server -- 4D Volume license (merged applications) -- 4D Developer - -.4dz files are generated by the build application feature (Application builder dialog box or ```BUILD APPLICATION``` command). \ No newline at end of file diff --git a/website/translated_docs/ja/Project/developing.md b/website/translated_docs/ja/Project/developing.md deleted file mode 100644 index 8c21c15c36137a..00000000000000 --- a/website/translated_docs/ja/Project/developing.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -id: developing -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) - - **ã¯ã„**: 編集内容を破棄ã—ã¦ãƒªãƒ­ãƒ¼ãƒ‰ã—ã¾ã™ - - **ã„ã„ãˆ**: 編集内容ã§ä¸Šæ›¸ãä¿å­˜ã—ã¾ã™ - - **キャンセル**: ä¿å­˜ã—ã¾ã›ã‚“ - -ã“ã®æ©Ÿèƒ½ã¯ã™ã¹ã¦ã®ãƒ“ルトインエディターã«ãŠã„ã¦æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã™: - -- ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ -- フォームエディター -- メソッドエディター -- 環境設定 -- ツールボックス \ No newline at end of file diff --git a/website/translated_docs/ja/Project/documentation.md b/website/translated_docs/ja/Project/documentation.md index 2acf3e40150745..03c682d0744ba1 100644 --- a/website/translated_docs/ja/Project/documentation.md +++ b/website/translated_docs/ja/Project/documentation.md @@ -1,11 +1,11 @@ --- id: documentation -title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ +title: ドキュメンテーション --- -## æ¦‚è¦ -プロジェクトデータベースã«ãŠã„ã¦ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚„フォームã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ィールドã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 複数ã®ãƒ—ログラマーã«ã‚ˆã£ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¿ã‚’開発ã—ã¦ã„ã‚‹å ´åˆãªã©ã«ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ä½œæˆã¯ã¨ãã«é©ã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€ä¸€èˆ¬çš„ã«è‰¯ã„プログラミングã®ä½œæ³•ã¨ã—ã¦ã‚‚推奨ã•れã¾ã™ã€‚ ドキュメンテーションã«ã¯ã€è¦ç´ ã®èª¬æ˜Žã ã‘ã§ãªãã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã«ãŠã‘ã‚‹ãã®è¦ç´ ã®æ©Ÿèƒ½ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«å¿…è¦ãªã‚らゆる情報をå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +アプリケーションプロジェクトã«ãŠã„ã¦ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚„フォームã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ィールドã«é–¢ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 複数ã®ãƒ—ログラマーã«ã‚ˆã£ã¦ãƒ—ロジェクトを開発ã—ã¦ã„ã‚‹å ´åˆãªã©ã«ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ä½œæˆã¯ã¨ãã«é©ã—ã¦ã„ã¾ã™ã€‚ã¾ãŸã€ä¸€èˆ¬çš„ã«è‰¯ã„プログラミングã®ä½œæ³•ã¨ã—ã¦ã‚‚推奨ã•れã¾ã™ã€‚ ドキュメンテーションã«ã¯ã€è¦ç´ ã®èª¬æ˜Žã ã‘ã§ãªãã€ã‚¢ãƒ—リケーションã«ãŠã‘ã‚‹ãã®è¦ç´ ã®æ©Ÿèƒ½ã‚’ç†è§£ã™ã‚‹ãŸã‚ã«å¿…è¦ãªã‚らゆる情報をå«ã‚ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ドキュメントã™ã‚‹ã“ã¨ãŒã§ãるプロジェクトè¦ç´ ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: @@ -21,6 +21,7 @@ title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ ã¾ãŸã€[コードエディターã®ãƒ˜ãƒ«ãƒ—Tip](#コードエディターã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹) ã¨ã—ã¦éƒ¨åˆ†çš„ã«è¡¨ç¤ºã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + ## ドキュメンテーションファイル ### ドキュメンテーションファイルå @@ -29,39 +30,40 @@ title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ エクスプローラー上ã§ã¯ã€é¸æŠžã—ãŸè¦ç´ ã¨åŒã˜ãƒ•ァイルåã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãŒè‡ªå‹•çš„ã«è¡¨ç¤ºã•れã¾ã™ (後述å‚ç…§)。 + ### ドキュメンテーションファイルã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ ドキュメンテーションファイルã¯ã™ã¹ã¦ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ•ォルダーã®ãƒ«ãƒ¼ãƒˆã«ã‚ã‚‹ `Documentation` ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¾ã™ã€‚ `Documentation` フォルダーã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãƒ¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: -- **Documentation** - - + **クラス** +- `Documentation` + + `クラス` * myClass.md - * **DatabaseMethods** + + `DatabaseMethods` * onStartup.md * ... - * **フォーム** + + `フォーム` * loginDial.md * ... - * **メソッド** + + `メソッド` * myMethod.md * ... - * **TableForms** - * **1** + + `TableForms` + * **1** - input.md - ... - - ... - - **Triggers** + * ... + + `Triggers` * table1.md * ... -* プロジェクトフォームã¨ãã®ãƒ—ロジェクトフォームメソッドã¯ã€åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルをフォームã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã«ã¤ã„ã¦å…±æœ‰ã—ã¾ã™ã€‚ -* テーブルフォームã¨ãã®ãƒ†ãƒ¼ãƒ–ルフォームメソッドã¯ã€åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルをフォームã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã«ã¤ã„ã¦å…±æœ‰ã—ã¾ã™ã€‚ +- プロジェクトフォームã¨ãã®ãƒ—ロジェクトフォームメソッドã¯ã€åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルをフォームã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã«ã¤ã„ã¦å…±æœ‰ã—ã¾ã™ã€‚ +- テーブルフォームã¨ãã®ãƒ†ãƒ¼ãƒ–ルフォームメソッドã¯ã€åŒã˜ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルをフォームã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸¡æ–¹ã«ã¤ã„ã¦å…±æœ‰ã—ã¾ã™ã€‚ > ドキュメントã•れã¦ã„るプロジェクトè¦ç´ ã‚’å称変更ã—ãŸã‚Šã€å‰Šé™¤ã—ãŸã‚Šã™ã‚‹ã¨ã€ãã®è¦ç´ ã«ç´ã¥ã„ã¦ã„ã‚‹ Markdown ファイルも自動ã§å称変更ã€ã¾ãŸã¯å‰Šé™¤ã•れã¾ã™ã€‚ + ## エクスプローラーã¨ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ ### ドキュメンテーションã®è¡¨ç¤º @@ -93,6 +95,8 @@ title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ é¸æŠžè¦ç´ ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルãŒå­˜åœ¨ã—ã¦ã„れã°ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーã®ã‚ªãƒ—ションメニューã¾ãŸã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚ˆã‚Š **ドキュメンテーションを編集...** ã‚’é¸æŠžã™ã‚‹ã“ã¨ã§ã€Markdown エディターã«é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ + + ## コードエディターã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹ 4D ã®ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã®ä¸€éƒ¨ã‚’ヘルプTip ã¨ã—ã¦è¡¨ç¤ºã—ã¾ã™ã€‚ @@ -104,10 +108,12 @@ title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ - Markdown ファイルã®å…ˆé ­ã«è¨­ç½®ã—ãŸã€HTML コメントタグã§å›²ã¾ã‚ŒãŸãƒ†ã‚­ã‚¹ãƒˆ (*\*) - HTML ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚¿ã‚°ãŒä½¿ç”¨ã•れã¦ã„ãªã‘れã°ã€Markdown ファイル㮠`# Description` ã‚¿ã‚°å¾Œã®æœ€åˆã®æ–‡ç«  - ã“ã®å ´åˆã€æœ€åˆã®æ–‡ç« ã«ã¯ 4D コードパーサーã«ã‚ˆã£ã¦è‡ªå‹•生æˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã® **プロトタイプ** ãŒå…¥ã‚Šã¾ã™ã€‚ - + ã“ã®å ´åˆã€æœ€åˆã®æ–‡ç« ã«ã¯ 4D コードパーサーã«ã‚ˆã£ã¦è‡ªå‹•生æˆã•れãŸãƒ¡ã‚½ãƒƒãƒ‰ã® **プロトタイプ** ãŒå…¥ã‚Šã¾ã™ã€‚ + > ãれ以外ã®å ´åˆã«ã¯ã€[メソッドコードã®å…ˆé ­ã®ã‚³ãƒ¡ãƒ³ãƒˆãƒ–ロック](https://doc.4d.com/4Dv18R3/4D/18-R3/Writing-a-method.300-4919495.ja.html#4618226) ãŒã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + + ## ドキュメンテーションファイルã®å®šç¾© 4D ã¯ãƒ†ãƒ³ãƒ—レートを用ã„ã¦æ–°è¦ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ãƒ•ァイルを作æˆã—ã¾ã™ã€‚ ã“ã®ãƒ†ãƒ³ãƒ—レートã¯ã€[コードエディターã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹](#コードエディターã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹) ã®ã«åˆ©ç”¨ã§ãã‚‹é …ç›®ãŒæä¾›ã—ã¦ã„ã¾ã™ã€‚ @@ -118,116 +124,78 @@ title: プロジェクトã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ ![](assets/en/Project/comments-explo4.png) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - Line - - 説明 -
          - \ - - HTML コメントタグ。 メソッドã®èª¬æ˜Žã¨ã—ã¦å„ªå…ˆçš„㫠コードエディターTip ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -
          - ## Description - - Markdown ã®ãƒ¬ãƒ™ãƒ«2 見出ã—タグ。 HTML コメントタグãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã€ã“ã®ã‚¿ã‚°å¾Œã®æœ€åˆã®æ–‡ç« ãŒãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¨ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼Tip ã«è¡¨ç¤ºã•れã¾ã™ã€‚ -
          - ## Example - - レベル2 見出ã—タグ。サンプルコードã®è¨˜è¿°ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ -
          - ```4D
          Type your example here ``` -
          - 4D サンプルコードã®ãƒ•ォーマットã«ä½¿ã„ã¾ã™ (highlight.js ライブラリを使用)。 -
          +| ç·š | 説明 | +| -------------------------------------------------- | --------------------------------------------------------------------------------------- | +| "\" | HTML コメントタグ。 メソッドã®èª¬æ˜Žã¨ã—ã¦å„ªå…ˆçš„ã« [コードエディターTip](#コードエディターã§ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³ã‚’表示ã™ã‚‹) ã«è¡¨ç¤ºã•れã¾ã™ã€‚ | +| ## Description | Markdown ã®ãƒ¬ãƒ™ãƒ«2 見出ã—タグ。 HTML コメントタグãŒä½¿ç”¨ã•れã¦ã„ãªã„å ´åˆã€ã“ã®ã‚¿ã‚°å¾Œã®æœ€åˆã®æ–‡ç« ãŒãƒ¡ã‚½ãƒƒãƒ‰ã®èª¬æ˜Žã¨ã—ã¦ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼Tip ã«è¡¨ç¤ºã•れã¾ã™ã€‚ | +| ## Example | レベル2 見出ã—タグ。サンプルコードã®è¨˜è¿°ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ | +| \``` 4D
          Type your example here \` `` | 4D サンプルコードã®ãƒ•ォーマットã«ä½¿ã„ã¾ã™ (highlight.js ライブラリを使用)。 | -### サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ Markdown +### サãƒãƒ¼ãƒˆã•れã¦ã„ã‚‹ Markdown - 見出ã—ã‚¿ã‚°: - - # 見出㗠1 - ## 見出㗠2 - ### 見出㗠3 - +``` +# 見出㗠1 +## 見出㗠2 +### 見出㗠3 +``` - スタイルタグ (イタリックã€å¤ªå­—ã€å–り消ã—ç·š) : - _イタリック_ - **太字** - **_太字/イタリック_** - ~~å–り消ã—ç·š~~ - - -- 4D コードãƒã‚¤ãƒ©ã‚¤ãƒˆãŒä»˜ãコードブロックタグ (```4d ...```) : - - \ - - 4d - C_TEXT($txt) - $txt:="Hello world!" - \ +``` +_イタリック_ +**太字** +**_太字/イタリック_** +~~å–り消ã—ç·š~~ +``` + + +- 4D コードãƒã‚¤ãƒ©ã‚¤ãƒˆãŒä»˜ãコードブロックタグ (\```4d ... ```) + + \``` 4d + C_TEXT($txt) + $txt:="Hello world!" + \` `` + - テーブルタグ: - | 引数 | åž‹ | 説明 | - | --------- | ------ | ------------ | - | wpArea | 文字列 |Write pro エリア| - | toolbar | 文字列 |ツールãƒãƒ¼å | - +``` +| 引数 | åž‹ | 説明 | +| --------- | ------ | ------------ | +| wpArea | 文字列 |Write pro エリア| +| toolbar | 文字列 |ツールãƒãƒ¼å | +``` + - リンクタグ: - // 例 1 - コマンド㮠[ドキュメンテーション](https://doc.4d.com) 㯠... - - // 例 2 - [4D ブログ][1] - - [1]: https://blog.4d.com - +``` +// 例 1 +コマンド㮠[ドキュメンテーション](https://doc.4d.com) 㯠... + +// 例 2 +[4D ブログ][1] + +[1]: https://blog.4d.com +``` - ç”»åƒã‚¿ã‚°: - ![ç”»åƒã®èª¬æ˜Ž](pictures/image.png) - - ![4D ロゴ](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") - - [![4D ブログã®ãƒ­ã‚´ã¨ãƒªãƒ³ã‚¯](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) - +``` +![ç”»åƒã®èª¬æ˜Ž](pictures/image.png) + +![4D ロゴ](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") [![4D ブログã®ãƒ­ã‚´ã¨ãƒªãƒ³ã‚¯](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) +``` +[![4D ブログã®ãƒ­ã‚´ã¨ãƒªãƒ³ã‚¯](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D ブログロゴ")](https://blog.4d.com) > 詳細ã«ã¤ã„ã¦ã¯ [GitHug Markdown guide](https://guides.github.com/features/mastering-markdown/) (英文) ã‚’å‚ç…§ãã ã•ã„。 + + + ## 例題 `WP SwitchToolbar.md` ファイルã«ã€æ¬¡ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: @@ -261,4 +229,4 @@ $logo:=GetLogo(5) - エクスプローラーã®è¡¨ç¤º: ![](assets/en/Project/explorer_Doc.png) -- コードエディターã®è¡¨ç¤º: ![](assets/en/Project/comments-explo5.png) \ No newline at end of file +- コードエディターã®è¡¨ç¤º: ![](assets/en/Project/comments-explo5.png) diff --git a/website/translated_docs/ja/Project/exporting.md b/website/translated_docs/ja/Project/exporting.md deleted file mode 100644 index d0164b8adb4954..00000000000000 --- a/website/translated_docs/ja/Project/exporting.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -id: exporting -title: Exporting from a 4D database ---- - -You can convert a 4D binary database (.4db file) into a 4D project. Because the export only creates a new version of the existing database, the original files are never touched. Thus, you can convert your database as many times as you need. - -Keep in mind that an export is a one-way operation: - -- once a 4D database has been exported as a project, both versions become independent of each other. -- a 4D project cannot be exported to a .4db file - -## Converting a database - -When you convert an existing 4D database to a project, the .4db file is left untouched: a folder named "Project" is created next to your .4db file, and will contain all necessary files. - -**Note:** If a folder named "Project" already exists at the same level as your .4db file (for example if a conversion has been done already), it will be replaced by the conversion process. - -To convert a database to a project: - -1. Open the database to convert. -2. Select **File > Export > Structure to project**. - ![](assets/en/Project/exportProj.png) **Notes:** - -- This command is only available if a binary database is open -- it is disabled in project databases. -- You can also use the **Export structure file** language command. - -If the conversion is successful and no blocking errors are encountered, the following dialog box is diplayed: ![](assets/en/Project/exportProj2.png) - -- **Reveal log**: highlights the conversion log file on your disk. Reading this file is highly recommended since the conversion process could have modified some parts of the application (see [Check the conversion](#check-the-conversion)). - -- **Open project**: restarts the 4D application and loads the converted project. - -### About the data file - -The data file is left untouched by the conversion. Only development elements are converted. You can still open the data file with the .4db structure file after a conversion. - -## Resulting project - -During the conversion, a new "Project" folder is created at the same level as your .4db structure file. It contains all of your application development as text files: forms, structure, methods, triggers, menus, tips, lists. It also contains a .4DProject file, which is your converted 4D project main file: - -![](assets/en/Project/exportProj3.png) - -When you open the .4DProject file with your 4D application, the project uses the same resources folder and web folder as the existing .4db file, which makes it easier to test your project. - -You can still open the .4db database, perform modifications if required (see below), then export it again, and test it. You can repeat this operation until you are satisfied with the conversion. - -## Check the conversion - -A log file in JSON format is created by default during the conversion process to reference all issues that required an action from the converter. In this file, messages are classified into three categories ("severity" property), for example: - -```codejs - { - "message": "Exporting picture id:1, name:logo.png, types:.png to <...>:Resources:Images:library:logo.png", - "severity": "info" - } -``` - -- **info**: describes a necessary action executed automatically by the converter that will not have an impact on the application interface or features. For example, if you have images in the pictures library, 4D exports them to the **Resources** folder of the database (see example above). - -- **warning**: describes a necessary action executed automatically by the converter that could lead to differences in the application's features or interface, but without preventing the database to run. Warnings usually require that you control the impact of the conversion on your code. For example, warnings are returned when unsupported compatibility settings, such as "Unicode mode" or "Radio buttons grouped by name" are automatically switched. - -- **error**: describes an issue that requires your intervention to be corrected. It can prevent the database from running properly. For example, some legacy form objects are no longer supported, such as highlight buttons. In this case, you must convert the button by yourself to a 3D button in the .4db file before relaunching the conversion operation. - -When edits are required in the .4db database, just modify the code or the form accordingly and export the structure again. Repeat as necessary until you are satisfied with the result. - -## Compatibility issues - -During the conversion, some legacy 4D technologies are converted to more modern implementations, and some others are temporarily disregarded. - -In particular: - -- The picture library no longer exists. During conversion, 4D exports all of your images to the **Resources** folder of the database. -- Form objects and form object properties have been updated (they now use the same grammar as dynamic forms). Deprecated parts are not supported. -- Compatibility settings are reset as for a new database. See the Conversion log file to verify the status of compatibility settings for your database. - -For a detailed list of compatibility issues, please refer to [Legacy technologies](https://doc.4d.com/4Dv17R5/4D/17-R5/Deprecated-or-removed-features-in-v17-product-range.200-4245348.en.html#4020272) section on Doc Center. - -## And now? - -Once your are satisfied with your converted database and want to start working on your project, you can clean up your working directory: - -1. Remove your .4db and .4dindy files from the application folder (e.g., move them to a backup directory). -2. On macOS, remove the .4dbase folder extension during the entire development phase. Since you are going to work with text files and put them under a source control tool, you will need to have direct access to them. - -If you want the data file to be open automatically after the project is moved to other machines, you can make it compliant with the [project architecture](architecture.md): - -1. Rename your data file "data.4dd". -2. Create a folder named "Data" and move the *data.4dd* file within that folder -3. Store the *Data* folder at the same level as the Project folder. \ 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 6944efd66d2090..817d6a40d532c0 100644 --- a/website/translated_docs/ja/Project/overview.md +++ b/website/translated_docs/ja/Project/overview.md @@ -3,33 +3,31 @@ id: overview title: æ¦‚è¦ --- -データベースストラクãƒãƒ£ãƒ¼ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース (フォームやメニューã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã€ãã®ä»–å¿…è¦ãªãƒªã‚½ãƒ¼ã‚¹å«ã‚€) ã¾ã§ã€4D データベースアプリケーションã®ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãŒ 4D プロジェクトã«ã¯æ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ 4D プロジェクトã¯ä¸»ã«ãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイルã«ã‚ˆã£ã¦æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ +Web やモãƒã‚¤ãƒ«ã€ãƒ‡ã‚¹ã‚¯ãƒˆãƒƒãƒ—ã®é‹ç”¨å½¢æ…‹ã«é–¢ã‚らãšã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‹ã‚‰ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースã¾ã§ (コードã€ãƒ•ォームã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šã€ãã®ä»–å¿…è¦ãªãƒªã‚½ãƒ¼ã‚¹å«ã‚€) ã€4D アプリケーションã®ã™ã¹ã¦ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãŒ 4D プロジェクトã«ã¯æ ¼ç´ã•れã¦ã„ã¾ã™ã€‚ 4D プロジェクトã¯ä¸»ã«ãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイルã«ã‚ˆã£ã¦æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ -4D プロジェクト㯠4D Developer アプリケーションを使ã£ã¦ä½œæˆãƒ»ç·¨é›†ã—ã¾ã™ã€‚ プロジェクトファイルをもã¨ã«ãƒ“ルドã—ãŸã‚¢ãƒ—リケーションé‹ç”¨ãƒ•ァイルã¯ã€4D Server ã‚„ 4D Volume ライセンスã§é–‹ãã“ã¨ãŒã§ãã¾ã™ (組ã¿è¾¼ã¿ã‚¢ãƒ—リケーション)。 ## プロジェクトファイル -4D プロジェクトファイル㯠4D ã§é–‹ã„ã¦ç·¨é›†ã—ã¾ã™ã€‚ ストラクãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€ãƒ•ォームエディターã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ãªã©ã€æ©Ÿèƒ½ã®å……実ã—ãŸã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’使ã£ã¦ãƒ•ァイルを扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +4D プロジェクトファイル㯠4D ã¾ãŸã¯ 4D Server ã§é–‹ã„ã¦ç·¨é›†ã—ã¾ã™ã€‚ 4D ã§ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€ãƒ¡ã‚½ãƒƒãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã€ãƒ•ォームエディターã€ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ãªã©ã€æ©Ÿèƒ½ã®å……実ã—ãŸã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’使ã£ã¦ãƒ•ァイルを扱ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã¾ãŸã€äººé–“ã«ã‚‚解読å¯èƒ½ãªãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイル (JSONã€XMLç­‰) å½¢å¼ã§æä¾›ã•れã¦ã„ã‚‹ãŸã‚ã€ãƒ—ロジェクトã®èª­ã¿æ›¸ãã¯ä»»æ„ã®ã‚³ãƒ¼ãƒ‰ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã§ãŠã“ãªã†ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ -## ã‚½ãƒ¼ã‚¹ç®¡ç† +4D プロジェクトファイルã«ã‚ˆã£ã¦ã€æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€ã‚¢ãƒ—リケーションテンプレートã®ä½œæˆã‚„ã€ã‚³ãƒ¼ãƒ‰ã‚·ã‚§ã‚¢ãƒªãƒ³ã‚°ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ プロジェクトã¯å†…部的㫠[フォルダーã¨ãƒ•ァイル](Project/architecture.md) ã§æ§‹æˆã•れã¦ã„ã¾ã™ã€‚ -4D プロジェクトファイルã«ã‚ˆã£ã¦ã€æ±Žç”¨çš„ãªã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã€ã‚¢ãƒ—リケーションテンプレートã®ä½œæˆã‚„ã€ã‚³ãƒ¼ãƒ‰ã‚·ã‚§ã‚¢ãƒªãƒ³ã‚°ãŒå®¹æ˜“ã«ãªã‚Šã¾ã™ã€‚ -4D ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆé–‹ç™ºã®æŸ”軟性ãŒä¸€ç•ªé¡•è‘—ã«ãªã‚‹ã®ã¯ã€è¤‡æ•°ã®ãƒ‡ãƒ™ãƒ­ãƒƒãƒ‘ーãŒã‚¢ãƒ—リケーションã®åŒã˜éƒ¨åˆ†ã§åŒæ™‚ã«ä½œæ¥­ã—ãªã‘れã°ãªã‚‰ãªã„ã¨ãã§ã™ã€‚ 4D プロジェクトファイルã®ç®¡ç†ã«ã¯ã€Perforceã€Gitã€SVNãªã©ã®**ソース管ç†**リãƒã‚¸ãƒˆãƒªãŒã¨ãã«é©ã—ã¦ãŠã‚Šã€ã“れらã«ã‚ˆã£ã¦é–‹ç™ºãƒãƒ¼ãƒ ã¯ã¤ãŽã®ã‚ˆã†ãªæ©Ÿèƒ½ã‚’活用ã§ãã¾ã™: +## 開発 -- ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç®¡ç† -- リビジョン比較 -- ロールãƒãƒƒã‚¯ +4D プロジェクト㯠**4D** アプリケーションを使ã£ã¦ä½œæˆã—ã¾ã™ã€‚ 4D 㯠4D プロジェクト用ã®çµ±åˆé–‹ç™ºç’°å¢ƒ (IDE) ã‚’æä¾›ã™ã‚‹ã ã‘ã§ãªãã€Webサーãƒãƒ¼ã€ãƒ¢ãƒã‚¤ãƒ«ãƒ—ロジェクトジェãƒãƒ¬ãƒ¼ã‚¿ãƒ¼ã€ãŠã‚ˆã³ã‚¢ãƒ—リケーションランタイムもæä¾›ã—ã€ãƒ—ロジェクトã®é–‹ç™ºãƒ»ãƒ†ã‚¹ãƒˆãƒ»ãƒ‡ãƒãƒƒã‚°ã«ä½¿ã„ã¾ã™ã€‚ -## プロジェクトã§é–‹ç™ºã™ã‚‹ +マルãƒãƒ¦ãƒ¼ã‚¶ãƒ¼é–‹ç™ºã¯æ¨™æº–的㪠**ソース管ç†** リãƒã‚¸ãƒˆãƒªãƒ„ール (Perforce, Git, SVN ç­‰) を使ã£ã¦ãŠã“ãªã„ã¾ã™ã€‚ã“れã«ã‚ˆã£ã¦ã€ç•°ãªã‚‹ãƒ–ランãƒã§é–‹ç™ºã—ã€æ¯”較ã—ã¦ãƒžãƒ¼ã‚¸ã¾ãŸã¯å¤‰æ›´ã‚’戻ã™ã¨ã„ã£ãŸå‡¦ç†ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ -4D データベースプロジェクトを作æˆã™ã‚‹æ–¹æ³•ã¯äºŒã¤ã‚りã¾ã™: -- ã¾ã£ã•らãªãƒ—ロジェクトを新è¦ä½œæˆã™ã‚‹ -- [4D プロジェクトã®ä½œæˆ](creating.md) å‚ç…§ -- 既存㮠4D ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’プロジェクトã¸ã¨å¤‰æ›ã™ã‚‹ -- doc.4d.com ã«ã¦ "[データベースをプロジェクトモードã«å¤‰æ›ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Converting-databases-to-projects.300-4606146.ja.html)" å‚ç…§ +## アプリケーションã®ä»•上㒠-プロジェクトã®é–‹ç™ºã¯ 4D Developer アプリケーションを用ã„ã¦ã€ãƒ­ãƒ¼ã‚«ãƒ«ã«ãŠã“ãªã„ã¾ã™ -- [プロジェクトã®é–‹ç™º](developing.md) å‚照。 ãƒãƒ¼ãƒ é–‹ç™ºã«ã‚ˆã‚‹ã‚½ãƒ¼ã‚¹ã®ç®¡ç†ã«ã¯ã‚½ãƒ¼ã‚¹ç®¡ç†ãƒ„ールを使ã„ã¾ã™ã€‚ +プロジェクトファイル㯠[コンパイル](compiler.md) ã—ã€ç°¡å˜ã«é‹ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ プロジェクトをもã¨ã«ã€æ¬¡ã® 3種ã®ã‚¢ãƒ—リケーションを作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -4D プロジェクトã¯ã‚³ãƒ³ãƒ‘イルã—ã¦åœ§ç¸®ã—ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¾ãŸã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ã‚¢ãƒ—リケーションã¨ã—ã¦ç°¡å˜ã«é‹ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ -- [プロジェクトパッケージã®ãƒ“ルド](building.md) å‚照。 \ No newline at end of file +- [Web](WebServer/webServer.md) アプリケーション +- [モãƒã‚¤ãƒ«](https://developer.4d.com/4d-for-ios/) アプリケーション +- [デスクトップ](Desktop/building.md) アプリケーション (クライアント/サーãƒãƒ¼ã¾ãŸã¯ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼) + +ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚¢ãƒ—リケーションã¯ã€4D Server ã¾ãŸã¯ 4D ã§é‹ç”¨ã™ã‚‹ã»ã‹ã€4D Volume ライセンスã¨çµ±åˆã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ \ No newline at end of file diff --git a/website/translated_docs/ja/Project/pictures.md b/website/translated_docs/ja/Project/pictures.md deleted file mode 100644 index 6aebcfae1afd08..00000000000000 --- a/website/translated_docs/ja/Project/pictures.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: pictures -title: ピクãƒãƒ£ãƒ¼ ---- - -## サãƒãƒ¼ãƒˆã•れるãƒã‚¤ãƒ†ã‚£ãƒ–フォーマット - -4Dã¯ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットã®ãƒã‚¤ãƒ†ã‚£ãƒ–管ç†ã‚’çµ±åˆã—ã¦ã„ã¾ã™ã€‚ ã“れã¯ã€ãƒ”クãƒãƒ£ãƒ¼ãŒå¤‰æ›ã•れるã“ã¨ãªãã€å…ƒã®ãƒ•ォーマットã®ã¾ã¾ 4D ã§æ ¼ç´ã€è¡¨ç¤ºã•れるã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ (シェイドやé€éŽãªã©) フォーマットã«ã‚ˆã‚Šç•°ãªã‚‹ç‰¹å®šã®æ©Ÿèƒ½ã¯ã‚³ãƒ”ー・ペーストã•れる際ã«ã‚‚ä¿æŒã•ã‚Œã€æ”¹å¤‰ãªã表示ã•れã¾ã™ã€‚ ã“ã®ãƒã‚¤ãƒ†ã‚£ãƒ–サãƒãƒ¼ãƒˆã¯ 4D ã«æ ¼ç´ã•れるã™ã¹ã¦ã®ãƒ”クãƒãƒ£ãƒ¼ (スタティックピクãƒãƒ£ãƒ¼ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã§ãƒ•ォームã«ãƒšãƒ¼ã‚¹ãƒˆã•れãŸãƒ”クãƒãƒ£ãƒ¼ã€ã‚¢ãƒ—リケーションモードã§ãƒ•ィールドや変数ã«ãƒšãƒ¼ã‚¹ãƒˆã•れãŸãƒ”クãƒãƒ£ãƒ¼ãªã©) ã«å¯¾ã—ã¦æœ‰åйã§ã™ã€‚ - -4D 㯠Windows 㨠macOS ã®ä¸¡æ–¹ã«ãŠã„ã¦ãƒã‚¤ãƒ†ã‚£ãƒ–㪠API を使用ã—ã¦ãƒ•ィールドや変数ã®ãƒ”クãƒãƒ£ãƒ¼ã‚’エンコード (書ãè¾¼ã¿) ãŠã‚ˆã³ãƒ‡ã‚³ãƒ¼ãƒ‰ (読ã¿è¾¼ã¿) ã—ã¾ã™ã€‚ ã“れらã®å®Ÿè£…ã¯ç¾åœ¨ãƒ‡ã‚¸ã‚¿ãƒ«ã‚«ãƒ¡ãƒ©ã§ä½¿ç”¨ã•れã¦ã„ã‚‹ RAW フォーマットå«ã‚ã€æ•°å¤šãã®ãƒã‚¤ãƒ†ã‚£ãƒ–ãªãƒ•ォーマットã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ - -* Windows ã§ã¯ã€4Dã¯WIC (Windows Imaging Component) を使用ã—ã¾ã™ã€‚ -* macOS ã§ã¯ã€4D 㯠ImageIO を使用ã—ã¾ã™ã€‚ - -ã‚‚ã£ã¨ã‚‚一般的ãªãƒ•ォーマット (例: jpegã€gifã€pngã€tiffã€bmpã€ç­‰) ã¯ã©ã¡ã‚‰ã®ãƒ•ォーマットã§ã‚‚サãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ macOS ã§ã¯ã€PDF フォーマットã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°/デコーディングもå¯èƒ½ã§ã™ã€‚ - -サãƒãƒ¼ãƒˆã•れるフォーマットã®å®Œå…¨ãªãƒªã‚¹ãƒˆã¯ OS ã‚„ã€ãƒžã‚·ãƒ³ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¦ã„るカスタムコーデックã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ ã©ã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯ãŒåˆ©ç”¨å¯èƒ½ã‹ã‚’調ã¹ã‚‹ãŸã‚ã«ã¯ã€`PICTURE CODEC LIST` コマンドを使用ã—ã¦ãã ã•ã„。 エンコーディング (書ãè¾¼ã¿) 用コーデックã«ã¯ãƒ©ã‚¤ã‚»ãƒ³ã‚¹ãŒå¿…è¦ãªå ´åˆãŒã‚ã‚‹ãŸã‚ã€åˆ©ç”¨ã§ãるコーデックã®ä¸€è¦§ã¯ã€èª­ã¿è¾¼ã¿ç”¨ã¨æ›¸ãè¾¼ã¿ç”¨ã§ç•°ãªã‚‹å¯èƒ½æ€§ãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„。 - -> WIC ãŠã‚ˆã³ ImageIO ã¯ãƒ”クãƒãƒ£ãƒ¼å†…ã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã®æ›¸ãè¾¼ã¿ã‚’許å¯ã—ã¦ã„ã¾ã™ã€‚ `SET PICTURE METADATA` ãŠã‚ˆã³ `GET PICTURE METADATA` コマンドを使用ã™ã‚‹ã“ã¨ã§ã€ãれらã®ãƒ¡ã‚¿ãƒ‡ãƒ¼ã‚¿ã‚’開発ã«å½¹ç«‹ã¦ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -### ピクãƒãƒ£ãƒ¼ Codec ID - -4D ãŒèªè­˜ã™ã‚‹ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット㯠`PICTURE CODEC LIST` コマンドã‹ã‚‰ãƒ”クãƒãƒ£ãƒ¼ Codec IDã¨ã—ã¦è¿”ã•れã¾ã™ã€‚ ã“れã¯ä»¥ä¸‹ã®å½¢å¼ã§è¿”ã•れã¾ã™: - -* æ‹¡å¼µå­ (例: “.gifâ€) -* MIME タイプ (例: “image/jpegâ€) - -ãれãžã‚Œã®ãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマットã«å¯¾ã—ã¦è¿”ã•れる形å¼ã¯ã€å½“該 Codec ㌠OS レベルã§è¨˜éŒ²ã•れã¦ã„る方法ã«åŸºã¥ãã¾ã™ã€‚ - -多ãã® 4Dピクãƒãƒ£ãƒ¼ç®¡ç†ã‚³ãƒžãƒ³ãƒ‰ã¯ Codec ID を引数ã¨ã—ã¦å—ã‘ã¨ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€`PICTURE CODEC LIST` ã‹ã‚‰è¿”ã•れるシステムIDを使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 - -### 利用ä¸å¯èƒ½ãªãƒ”クãƒãƒ£ãƒ¼ãƒ•ォーマット - -マシン上ã§åˆ©ç”¨ã§ããªã„フォーマットã®ãƒ”クãƒãƒ£ãƒ¼ã«å¯¾ã—ã¦ã¯ã€å°‚用ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ アイコンã®ä¸‹éƒ¨ã«ãã®æ‹¡å¼µå­ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ - -![](assets/en/Project/picNoFormat.png) - -ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯ã€ãã®ãƒ”クãƒãƒ£ãƒ¼ãŒè¡¨ç¤ºã•れるã¹ãã¨ã“ã‚ã«è‡ªå‹•çš„ã«ä½¿ç”¨ã•れã¾ã™: - -![](assets/en/Project/picNoFormat2.png) - -ã“ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯ã€ãã®ãƒ”クãƒãƒ£ãƒ¼ãŒãƒ­ãƒ¼ã‚«ãƒ«ã§ã¯è¡¨ç¤ºã‚‚編集もã§ããªã„ã“ã¨ã‚’æ„味ã—ã¾ã™ã€‚ã§ã™ãŒã€ä¸­èº«ã‚’改変ã™ã‚‹ã“ã¨ãªãä¿å­˜ã—ã€ä»–ã®ãƒžã‚·ãƒ³ã§è¡¨ç¤ºã™ã‚‹ã“ã¨ã¯å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€Windows ã§ã® PDF ピクãƒãƒ£ãƒ¼ã‚„ã€PICT フォーマットã®ãƒ”クãƒãƒ£ãƒ¼ãªã©ãŒè©²å½“ã—ã¾ã™ã€‚ - -### ピクãƒãƒ£ãƒ¼ã®è§£åƒåº¦ - -macOS ãŠã‚ˆã³ Windows ã®ä¸¡æ–¹ã§é«˜è§£åƒåº¦è¡¨ç¤ºãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„るピクãƒãƒ£ãƒ¼ã¯æ¬¡ã®ã¨ãŠã‚Šã§ã™: - -* スタティックピクãƒãƒ£ãƒ¼ -* 3D ボタン / ラジオ / ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ -* ピクãƒãƒ£ãƒ¼ãƒœã‚¿ãƒ³ / ãƒãƒƒãƒ—アップ -* タブコントロール -* メニューアイコン -* リストボックスヘッダー - -High resolution displays have a higher pixel density than traditional standard displays. For pictures to render correctly on high resolution displays, the number of pixels in the picture must be multiplied by the *scale factor* (*i.e.*, two times larger, three times larger, etc.). - -The following table demonstrates the difference between display resolution and picture pixel density. - -| Display Type | Scale Factor | 例題 | -| ------------------- | ---------------------------------------------- | ---------------------------------------------------------------- | -| Standard Resolution | 1:1 pixel density. | **1x** -![](assets/en/Project/pictureScale1.png) -*circle.png* | -| High Resolution | Pixel density increased by a factor of 2 or 3. | | - - - - - - - - - - - - -
          - 2x - - 3x -
          - ![](assets/en/Project/pictureScale2.png)
          *circle@2x.png* -
          - ![](assets/en/Project/pictureScale3.png)
          *circle@3x.png* -
          - -When using high resolution pictures, the scale factor is specified by adding "@nx" in the picture's name (*n* designates the scale factor). In the table above, you can see that the scale factor is indicated in the names of the high resolution pictures, *circle@2x.png* and *circle@3x.png*. - -4D automatically prioritizes pictures with the highest resolution.
          -**Example**: When using two screens (one high resolution display, one standard display) and you move a form from one screen to another, 4D automatically renders the highest possible resolution of the picture. Even if a command or property specifies *circle.png*, *circle@3x.png* will be used (if it exists). - -> Note that this prioritization occurs only for displaying pictures onscreen, there is no automatic prioritization made when printing. - -This resolution behavior is supported for project databases by all [4D form objects](../FormObjects/formObjectsOverview.html) which support images. - -## ピクãƒãƒ£ãƒ¼ä¸Šã®ãƒžã‚¦ã‚¹åº§æ¨™ - -4D ã§ã¯ãƒ”クãƒãƒ£ãƒ¼ãƒ•ィールドや変数をクリックã€ã¾ãŸã¯ãƒ›ãƒãƒ¼ã—ãŸéš›ã®ãƒžã‚¦ã‚¹ã®ãƒ­ãƒ¼ã‚«ãƒ«åº§æ¨™ã‚’å–å¾—ã§ãã¾ã™ã€‚ã“れã¯ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ã‚„ズーム処ç†ãŒãŠã“ãªã‚れã¦ã„ã‚‹å ´åˆã§ã‚‚å¯èƒ½ã§ã™ã€‚ ã“ã®ãƒ”クãƒãƒ£ãƒ¼ãƒžãƒƒãƒ—ã«ä¼¼ãŸæ©Ÿæ§‹ã¯ã€ãŸã¨ãˆã°åœ°å›³ä½œè£½ã‚½ãƒ•トウェアã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースやã€ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«å¯èƒ½ãªãƒœã‚¿ãƒ³ãƒãƒ¼ã‚’管ç†ã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ - -座標㯠*MouseX* 㨠*MouseY* [システム変数](https://doc.4d.com/4Dv18/4D/18/System-Variables.300-4505547.ja.html) ã«è¿”ã•れã¾ã™ã€‚ 座標ã¯ãƒ”クセルå˜ä½ã§è¡¨ç¾ã•れã€ãƒ”クãƒãƒ£ãƒ¼ã®å·¦ä¸Šéš…ãŒèµ·ç‚¹ (0,0) ã¨ãªã‚Šã¾ã™ã€‚ マウスãŒãƒ”クãƒãƒ£ã®åº§æ¨™ã®å¤–å´ã«ã‚ã‚‹å ´åˆã«ã¯ã€*MouseX* 㨠*MouseY* ã«ã¯-1ãŒè¿”ã•れã¾ã™ã€‚ - -ã“れらã®å€¤ã¯ã€`On Clicked`ã€`On Double Clicked`ã€`On Mouse up`ã€`On Mouse Enter`ã€ã‚ã‚‹ã„㯠`On Mouse Move` フォームイベントã®ä¸€éƒ¨ã¨ã—ã¦å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ - -## ピクãƒãƒ£ãƒ¼æ¼”ç®—å­ - -4Dã§ã¯ãƒ”クãƒãƒ£ãƒ¼ã®é€£çµã‚„é‡ã­åˆã‚ã›ãªã©ã®ãƒ”クãƒãƒ£ãƒ¼ **演算** ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“れ㯠*4Dランゲージリファレンス* ã® *ピクãƒãƒ£ãƒ¼æ¼”ç®—å­* ã®ç« ã§èª¬æ˜Žã•れã¦ã„ã¾ã™ã€‚ \ No newline at end of file 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` を使ã†ã“ã¨ã§ã€ï¼‘ã¤ã§ã‚‚æ“作ã«å•題ãŒã‚ã£ãŸå ´åˆã«ã™ã¹ã¦ã®æ“作をキャンセルã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `$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..7a238f8c2fd802 100644 --- a/website/translated_docs/ja/REST/$catalog.md +++ b/website/translated_docs/ja/REST/$catalog.md @@ -4,326 +4,365 @@ 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 | 文字列 | 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 | +| プロパティ | タイプ | 説明 | +| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------- | +| 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 属性ã®é€†æ–¹å‘リレーションå | -### 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) +### プライマリーキー + +key オブジェクトã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã® **プライマリーキー** ã¨ã—ã¦å®šç¾©ã•れãŸå±žæ€§ã® **åç§° (name プロパティ)** ãŒè¿”ã•れã¾ã™ã€‚ -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. ### 例題 -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..6459c593777707 100644 --- a/website/translated_docs/ja/REST/$upload.md +++ b/website/translated_docs/ja/REST/$upload.md @@ -4,55 +4,104 @@ title: '$upload' --- -Returns an ID of the file uploaded to the server +サーãƒãƒ¼ã«ã‚¢ãƒƒãƒ—ロードã—ãŸãƒ•ァイル㮠ID ã‚’è¿”ã—ã¾ã™ ## 説明 -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`. +サーãƒãƒ¼ã«ã‚¢ãƒƒãƒ—ロードã—ãŸã„ファイルãŒã‚ã‚‹å ´åˆã«ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ POST ã—ã¾ã™ã€‚ ç”»åƒã®å ´åˆã«ã¯ `$rawPict=true` を渡ã—ã¾ã™ã€‚ ãã®ä»–ã®ãƒ•ァイルã®å ´åˆã¯ `$binary=true` を渡ã—ã¾ã™ã€‚ -You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout parameter`. +デフォルトã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ 120ç§’ã§ã™ãŒã€`$timeout` パラメーターã«ä»»æ„ã®æ•°å€¤ã‚’渡ã—ã¦ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã‚’変更ã§ãã¾ã™ã€‚ -## 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` +次ã«ã€ä¸‹ã®ã‚ˆã†ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’使用ã—ã¦ã€é¸æŠžã—ãŸç”»åƒã‚’ 4D Server ã«ã‚¢ãƒƒãƒ—ロードã—ã¾ã™: -**Result**: + `POST /rest/$upload?$rawPict=true` + +ãã®çµæžœã€ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ã¯ãƒ•ァイルを識別ã™ã‚‹ ID ãŒè¿”ã•れã¾ã™ã€‚ + +**レスãƒãƒ³ã‚¹**: `{ "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 + } + },} +``` + +## 4D HTTPクライアントを使ã£ãŸä¾‹ + +次ã®ä¾‹ã§ã¯ã€4D HTTPクライアントを使用ã—ã¦ã€*.pdf* ファイルをサーãƒãƒ¼ã«ã‚¢ãƒƒãƒ—ロードã™ã‚‹æ–¹æ³•を示ã—ã¾ã™ã€‚ + +```4d +var $params : Text +var $response : Object +var $result : Integer +var $blob : Blob + + +ARRAY TEXT($headerNames; 1) +ARRAY TEXT($headerValues; 1) + +$url:="localhost:80/rest/$upload?$binary=true" // RESTãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æº–å‚™ + +$headerNames{1}:="Content-Type" +$headerValues{1}:="application/octet-stream" + +DOCUMENT TO BLOB("c:\\invoices\\inv003.pdf"; $blob) // ãƒã‚¤ãƒŠãƒªã®èª­ã¿è¾¼ã¿ + + // ファイルをアップロードã™ã‚‹ãŸã‚ã® 1ã¤ç›®ã® POSTリクエスト +$result:=HTTP Request(HTTP POST method; $url; $blob; $response; $headerNames; $headerValues) + +If ($result=200) + var $data : Object + $data:=New object + $data.__KEY:="3" + $data.__STAMP:="3" + $data.pdf:=New object("ID"; String($response.ID)) + + $url:="localhost:80/rest/Invoices?$method=update" // エンティティを更新ã™ã‚‹ãŸã‚ã® 2ã¤ç›®ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆ + + $headerNames{1}:="Content-Type" + $headerValues{1}:="application/json" + + $result:=HTTP Request(HTTP POST method; $url; $data; $response; $headerNames; $headerValues) +Else + ALERT(String($result)+" Error") +End if +``` 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/ClassFunctions.md b/website/translated_docs/ja/REST/ClassFunctions.md new file mode 100644 index 00000000000000..cde34749d9ca1f --- /dev/null +++ b/website/translated_docs/ja/REST/ClassFunctions.md @@ -0,0 +1,579 @@ +--- +id: classFunctions +title: ORDAクラス関数ã®å‘¼ã³å‡ºã— +--- + + +RESTリクエストを使ã£ã¦ã€ORDAデータモデルã«å®šç¾©ã•れã¦ã„ã‚‹ [データモデルクラス関数](ORDA/ordaClasses.md) を呼ã³å‡ºã™ã“ã¨ã§ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆ 4Dアプリケーションã®å…¬é–‹API を活用ã§ãã¾ã™ã€‚ + +関数を呼ã³å‡ºã™ã«ã¯ () ã‚’çœãã€é©åˆ‡ãª ORDA ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠POST リクエストã§ãŠã“ãªã„ã¾ã™ã€‚ ãŸã¨ãˆã°ã€City DataClassクラス㫠`getCity()` 関数を定義ã—ãŸå ´åˆã€æ¬¡ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: + +`/rest/City/getCity` + +POST リクエストã®ãƒœãƒ‡ã‚£ã«é–¢æ•°ã«æ¸¡ã™å¼•æ•°ã‚’å«ã‚ã¾ã™: `["Aguada"]` + +ã“ã®å‘¼ã³å‡ºã—ã¯ã€4Dランゲージã§ã¯æ¬¡ã®ã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆã«ç›¸å½“ã—ã¾ã™: + +```4d +$city:=ds.City.getCity("Aguada") +``` + +> RESTリクエストã§ç›´æŽ¥å‘¼ã³å‡ºã›ã‚‹ã®ã¯ `exposed` キーワードãŒä»˜ã„ãŸé–¢æ•°ã®ã¿ã§ã™ã€‚ [公開vséžå…¬é–‹é–¢æ•°](ORDA/ordaClasses.md#公開vséžå…¬é–‹é–¢æ•°) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +## 関数ã®å‘¼ã³å‡ºã— + +関数ã¯å¿…ãš REST ã® **POST** リクエストã§å‘¼ã³å‡ºã•ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“ (GETリクエストã®å ´åˆã¯ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™)。 + +サーãƒãƒ¼ã®ãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãƒ¼ã®å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトを対象ã«ã€é–¢æ•°ã¯å‘¼ã³å‡ºã•れã¾ã™ã€‚ + +| クラス関数 | シンタックス | +| -------------------------------------------------------------- | --------------------------------------------------------------------------- | +| [DataStore クラス](ORDA/ordaClasses.md#datastore-クラス) | `/rest/$catalog/DataStoreClassFunction` | +| [DataClass クラス](ORDA/ordaClasses.md#dataclass-クラス) | `/rest/{dataClass}/DataClassClassFunction` | +| [EntitySelection クラス](ORDA/ordaClasses.md#entityselection-クラス) | `/rest/{dataClass}/EntitySelectionClassFunction` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$entityset/entitySetNumber` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$filter` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$orderby` | +| [Entity クラス](ORDA/ordaClasses.md#entity-クラス) | `/rest/{dataClass}(key)/EntityClassFunction/` | + + + +> `/rest/{dataClass}/Function` 㯠DataClassクラスã¾ãŸã¯ EntitySelectionクラスã®é–¢æ•°ã‚’呼ã³å‡ºã™ã®ã«ä½¿ãˆã¾ã™ (`/rest/{dataClass}` ã¯ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’エンティティセレクションã«è¿”ã—ã¾ã™)。 +> EntitySelection クラスã®é–¢æ•°ãŒå…ˆã«æŽ¢ã•れã¾ã™ã€‚ 見ã¤ã‹ã‚‰ãªã„å ´åˆã«ã€DataClassクラスを探ã—ã¾ã™ã€‚ ã¤ã¾ã‚Šã€åŒã˜åç§°ã®é–¢æ•°ãŒ DataClassクラス㨠EntitySelectionクラスã®ä¸¡æ–¹ã«å®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€DataClassクラスã®é–¢æ•°ãŒå®Ÿè¡Œã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 + + +## 引数 + + + +ORDAユーザークラスã«å®šç¾©ã•れãŸé–¢æ•°ã«ã¯ã€å¼•数を渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ サーãƒãƒ¼ã‚µã‚¤ãƒ‰ã§ã“れらã®å¼•æ•°ã¯ã€ã‚¯ãƒ©ã‚¹é–¢æ•°ã® $1, $2 ãªã©ã®ãƒ‘ラメーターã«å—ã‘æ¸¡ã•れã¾ã™ã€‚ + +次ã®ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™: + +- 引数ã¯ã™ã¹ã¦ã€**POSTリクエストã®ãƒœãƒ‡ã‚£** ã«æ¸¡ã™å¿…è¦ãŒã‚りã¾ã™: +- 引数ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (JSONå½¢å¼) ã®ä¸­ã«æ ¼ç´ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- JSON コレクションãŒã‚µãƒãƒ¼ãƒˆã—ã¦ã„るスカラーãªãƒ‡ãƒ¼ã‚¿åž‹ã¯ã™ã¹ã¦å¼•æ•°ã¨ã—ã¦æ¸¡ã›ã¾ã™ã€‚ +- エンティティやエンティティセレクションも引数ã¨ã—ã¦å—ã‘æ¸¡ã›ã¾ã™ã€‚ ã“ã®éš›ã€å¯¾å¿œã™ã‚‹ ORDAオブジェクトã«ãƒ‡ãƒ¼ã‚¿ã‚’割り当ã¦ã‚‹ãŸã‚ã« RESTサーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹å°‚用ã®å±žæ€§ (__DATACLASS, __ENTITY, __ENTITIES, __DATASET) ã‚’ JSONオブジェクトã«å«ã‚ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +[エンティティを引数ã¨ã—ã¦å—ã‘å–る例題](#エンティティを引数ã¨ã—ã¦å—ã‘å–ã‚‹) 㨠[エンティティセレクションを引数ã¨ã—ã¦å—ã‘å–る例題](#エンティティセレクションを引数ã¨ã—ã¦å—ã‘å–ã‚‹) ã‚’å‚ç…§ãã ã•ã„。 + + +### スカラー値ã®å¼•æ•° + +引数ã¯ã€ãƒœãƒ‡ã‚£ã«å®šç¾©ã•れãŸã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«æ ¼ç´ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€DataClass クラス関数 `getCities()` ã¯ãŒãƒ†ã‚­ã‚¹ãƒˆå¼•æ•°ã‚’å—ã‘å–ã‚‹å ´åˆ: `/rest/City/getCities` + +**ボディã®å¼•æ•°:** ["Aguada","Paris"] + +引数ã¨ã—ã¦ã‚µãƒãƒ¼ãƒˆã•れるã®ã¯ã€JSONãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’å«ã‚€ã™ã¹ã¦ã® JSON ã®ãƒ‡ãƒ¼ã‚¿åž‹ã§ã™ã€‚ 日付㯠ISO 8601å½¢å¼ã®æ–‡å­—列ã¨ã—ã¦æ¸¡ã›ã¾ã™ (例: "2020-08-22T22:00:000Z")。 + + +### エンティティ引数 + +引数ã¨ã—ã¦æ¸¡ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã€ã‚­ãƒ¼ (__KEY プロパティ) ã«ã‚ˆã£ã¦ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å‚ç…§ã•れã¾ã™ã€‚ リクエストã«ãŠã„ã¦ã‚­ãƒ¼ãŒçœç•¥ã•れã¦ã„れã°ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒ¡ãƒ¢ãƒªã«æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæŒã¤å±žæ€§ã«ã¤ã„ã¦ã€å€¤ã‚’å—ã‘æ¸¡ã™ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ サーãƒãƒ¼ä¸Šã§ã“れらã®å€¤ã¯è‡ªå‹•çš„ã«å½“該エンティティ用ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +> サーãƒãƒ¼ä¸Šã®æ—¢å­˜ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«ã¤ã„ã¦å¤‰æ›´ã•れãŸå±žæ€§å€¤ã‚’リクエストãŒé€ä¿¡ã—ãŸå ´åˆã€å‘¼ã³å‡ºã—㟠ORDAデータモデル関数ã¯è‡ªå‹•çš„ã«å¤‰æ›´å¾Œã®å€¤ã§å®Ÿè¡Œã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã£ã¦ã€ãŸã¨ãˆã°ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã«å¯¾ã™ã‚‹å‡¦ç†ã®ã€ã™ã¹ã¦ã®ãƒ“ジãƒã‚¹ãƒ«ãƒ¼ãƒ«ã‚’é©ç”¨ã—ãŸå¾Œã®çµæžœã‚’クライアントアプリケーションã‹ã‚‰ç¢ºèªã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ãã®çµæžœã‚’ã‚‚ã¨ã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’サーãƒãƒ¼ä¸Šã§ä¿å­˜ã™ã‚‹ã‹ã©ã†ã‹ã‚’判断ã§ãã¾ã™ã€‚ + + +| プロパティ | タイプ | 説明 | +| ----------- | ----------------- | ------------------------------------ | +| エンティティã®å±žæ€§ | æ··åˆ | ä»»æ„ - 変更ã™ã‚‹å€¤ | +| __DATACLASS | String | å¿…é ˆ - エンティティã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã‚’指定ã—ã¾ã™ | +| __ENTITY | ブール | å¿…é ˆ - true ã¯å¼•æ•°ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã‚ã‚‹ã“ã¨ã‚’サーãƒãƒ¼ã«é€šçŸ¥ã—ã¾ã™ | +| __KEY | æ··åˆ (プライマリーキーã¨åŒã˜åž‹) | ä»»æ„ - エンティティã®ãƒ—ライマリーキー | + +- __KEY ãŒçœç•¥ã•れãŸå ´åˆã€æŒ‡å®šã—ãŸå±žæ€§ã‚’æŒã¤æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒã‚µãƒ¼ãƒãƒ¼ä¸Šã§ä½œæˆã•れã¾ã™ã€‚ +- __KEY ãŒæä¾›ã•れãŸå ´åˆã€__KEY ãŒåˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæŒ‡å®šã—ãŸå±žæ€§ã¨ã¨ã‚‚ã«ã‚µãƒ¼ãƒãƒ¼ä¸Šã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ + +エンティティを [作æˆ](#エンティティを作æˆã™ã‚‹) ã¾ãŸã¯ [æ›´æ–°](#エンティティを更新ã™ã‚‹) ã™ã‚‹ä¾‹é¡Œã‚’å‚ç…§ãã ã•ã„。 + +#### リレートエンティティ引数 + +[エンティティ引数](#エンティティ引数) ã¨åŒã˜ãƒ—ロパティをæŒã¡ã¾ã™ã€‚ ç•°ãªã‚‹ç‚¹ã¯ã€ãƒªãƒ¬ãƒ¼ãƒˆã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯å­˜åœ¨ã—ã¦ã„ãªã‘れã°ãªã‚‰ãªã„ãŸã‚ã€ãƒ—ライマリーキーを格ç´ã™ã‚‹ __KEY ã‚’çœç•¥ã§ãã¾ã›ã‚“。 + +リレートエンティティをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’ [作æˆ](#リレートエンティティをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã™ã‚‹) ã¾ãŸã¯ [æ›´æ–°](#リレートエンティティをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã™ã‚‹) ã™ã‚‹ä¾‹é¡Œã‚’å‚ç…§ãã ã•ã„。 + + +### エンティティセレクション引数 + +引数ã¨ã—ã¦æ¸¡ã™ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯ã‚らã‹ã˜ã‚ [$method=entityset]($method.md#methodentityset) ã«ã‚ˆã£ã¦å®šç¾©ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> 変更ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’リクエストãŒã‚µãƒ¼ãƒãƒ¼ã«é€ä¿¡ã—ãŸå ´åˆã€å‘¼ã³å‡ºã—㟠ORDAデータモデル関数ã¯è‡ªå‹•çš„ã«å¤‰æ›´å¾Œã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§å®Ÿè¡Œã•れã¾ã™ã€‚ + + +| プロパティ | タイプ | 説明 | +| ---------- | ------ | ------------------------------------------ | +| エンティティã®å±žæ€§ | æ··åˆ | ä»»æ„ - 変更ã™ã‚‹å€¤ | +| __DATASET | String | å¿…é ˆ - エンティティセレクションã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆID (UUID) | +| __ENTITIES | ブール | å¿…é ˆ - true ã¯å¼•æ•°ãŒã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã‚‹ã“ã¨ã‚’サーãƒãƒ¼ã«é€šçŸ¥ã—ã¾ã™ | + +[エンティティセレクションを引数ã¨ã—ã¦å—ã‘å–る例題](#エンティティセレクションを引数ã¨ã—ã¦å—ã‘å–ã‚‹) ã‚’å‚ç…§ãã ã•ã„。 + + +## リクエストã®ä¾‹é¡Œ + +ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã¯ã€localhost (ãƒãƒ¼ãƒˆ8111) 上ã§ãƒªãƒ¢ãƒ¼ãƒˆãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ãƒ¼ã¨ã—ã¦å…¬é–‹ã•れã¦ã„ã¾ã™ã€‚ + +![alt-text](assets/en/REST/ordastructure.png) + +### データストアークラス関数を使用ã™ã‚‹ + +US_Cities `DataStore`クラス㯠API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +``` +// cs.DataStore クラス + +Class extends DataStoreImplementation + +exposed Function getName() + $0:="US cities and zip codes manager" +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8111/rest/$catalog/getName` + +#### 戻り値 + +``` +{ +"result": "US cities and zip codes manager" +} +``` + +### DataClassクラス関数を使用ã™ã‚‹ + +`City` DataClassクラスã¯ã€å¼•æ•°ã¨ã—ã¦å—ã‘å–ã£ãŸåå‰ã‚’ã‚‚ã¨ã« City エンティティを返㙠API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +``` +// cs.City クラス + +Class extends DataClass + +exposed Function getCity() + var $0 : cs.CityEntity + var $1,$nameParam : text + $nameParam:=$1 + $0:=This.query("name = :1";$nameParam).first() +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8111/rest/City/getCity` + +リクエストã®ãƒœãƒ‡ã‚£: ["Aguada"] + +#### 戻り値 + +çµæžœã¯ã€æ¬¡ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã§ã™: +``` +{ + "__entityModel": "City", + "__DATACLASS": "City", + "__KEY": "1", + "__TIMESTAMP": "2020-03-09T08:03:19.923Z", + "__STAMP": 1, + "ID": 1, + "name": "Aguada", + "countyFIPS": 72003, + "county": { + "__deferred": { + "uri": "/rest/County(72003)", + "__KEY": "72003" + } + }, + "zips": { + "__deferred": { + "uri": "/rest/City(1)/zips?$expand=zips" + } + } +} +``` + +### Entityクラス関数を使用ã™ã‚‹ + +`CityEntity` Entityクラス㯠API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +``` +// cs.CityEntity クラス + +Class extends Entity + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8111/rest/City(2)/getPopulation` + +#### 戻り値 + +``` +{ + "result": 48814 +} +``` + + +### EntitySelectionクラス関数を使用ã™ã‚‹ + +`CitySelection` EntitySelectionクラス㯠API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +``` +// cs.CitySelection クラス + +Class extends EntitySelection + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8111/rest/City/getPopulation/?$filter="ID<3"` + +#### 戻り値 + +``` +{ + "result": 87256 +} +``` + +### EntitySelectionクラス関数ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’使用ã™ã‚‹ + +`StudentsSelection` クラス㯠`getAgeAverage` 関数をæŒã¡ã¾ã™: + +``` +// cs.StudentsSelection クラス + +Class extends EntitySelection + +exposed Function getAgeAverage + C_LONGINT($sum;$0) + C_OBJECT($s) + + $sum:=0 + For each ($s;This) + $sum:=$sum+$s.age() + End for each + $0:=$sum/This.length +``` + +ã‚らã‹ã˜ã‚作æˆã—ãŸæ—¢å­˜ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’使ã„ã€æ¬¡ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8044/rest/Students/getAgeAverage/$entityset/17E83633FFB54ECDBF947E5C620BB532` + +#### 戻り値 + +``` +{ + "result": 34 +} +``` + +### EntitySelectionクラス関数㨠orderBy を使用ã™ã‚‹ + +`StudentsSelection` クラス㯠`getLastSummary` 関数をæŒã¡ã¾ã™: + +``` +// cs.StudentsSelection クラス + + +Class extends EntitySelection + +exposed Function getLastSummary + C_TEXT($0) + C_OBJECT($last) + + $last:=This.last() + $0:=$last.firstname+" - "+$last.lastname+" is ... "+String($last.age()) +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `127.0.0.1:8044/rest/Students/getLastSummary/$entityset/?$filter="lastname=b@"&$orderby="lastname"` + + +#### 戻り値 + +``` +{ + "result": "Wilbert - Bull is ... 21" +} +``` + + +### エンティティを作æˆã™ã‚‹ + + +`Students` DataClassクラスã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚’å«ã‚€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’クライアントã‹ã‚‰å—ã‘å–ã‚‹ `pushData()` 関数をæŒã¡ã¾ã™ã€‚ `checkData()` メソッドã¯ã„ãã¤ã‹ã®æ¤œè¨¼ã‚’実行ã—ã¾ã™ã€‚ å•題ãŒãªã‘れã°ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä¿å­˜ã•れã¦è¿”ã•れã¾ã™ã€‚ + +``` +// cs.Students クラス + +Class extends DataClass + +exposed Function pushData + var $1, $entity, $status, $0 : Object + + $entity:=$1 + + $status:=checkData($entity) // $status 㯠success ブールプロパティをæŒã¤ã‚ªãƒ–ジェクトã§ã™ + + $0:=$status + + If ($status.success) + $status:=$entity.save() + If ($status.success) + $0:=$entity + End if + End if + +``` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `http://127.0.0.1:8044/rest/Students/pushData` + +リクエストã®ãƒœãƒ‡ã‚£: + +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"Ann", +"lastname":"Brown" +}] +``` + +`__KEY` ãŒæä¾›ã•れã¦ã„ãªã„ãŸã‚ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ã¯ **クライアントã‹ã‚‰å—ã‘å–ã£ãŸå±žæ€§ã‚’æŒã¤** æ–°è¦ã® StudentsエンティティãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ `pushData()` 関数㌠`save()` を実行ã™ã‚‹ãŸã‚ã€ã“ã®æ–°è¦ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ä¿å­˜ã•れã¾ã™ã€‚ + + +#### 戻り値 + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T10:54:41.805Z", + "__STAMP": 1, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWN", + "schoolID": null, + "school": null +} +``` + +### エンティティを更新ã™ã‚‹ + +__KEY 属性を使ã£ã¦ã€ä¸Šã®ä¾‹é¡Œã¨åŒã˜ã“ã¨ã‚’ãŠã“ãªã†ã¨ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã—ã¾ã™ã€‚ + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +リクエストã®ãƒœãƒ‡ã‚£: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"lastname":"Brownie", +"__KEY":55 +}] +``` + +`__KEY` ãŒæä¾›ã•れã¦ã„ã‚‹ãŸã‚ã€**クライアントã‹ã‚‰å—ã‘å–ã£ãŸ lastname属性値をæŒã¤** プライマリーキー㌠55 ã® StudentsエンティティãŒèª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ pushData() 関数㌠`save()` を実行ã™ã‚‹ãŸã‚ã€ã“ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯æ›´æ–°ã•れã¾ã™ã€‚ + +#### 戻り値 + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T11:10:21.679Z", + "__STAMP": 3, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWNIE", + "schoolID": null, + "school": null +} +``` + +### リレートエンティティをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’作æˆã™ã‚‹ + +プライマリーキー 2 ã‚’æŒã¤ Schoolsエンティティをリレートエンティティã¨ã—ã¦ã€æ–°è¦ Studentsエンティティを作æˆã—ã¾ã™ã€‚ + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +リクエストã®ãƒœãƒ‡ã‚£: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"John", +"lastname":"Smith", +"school":{"__KEY":2} +}] +``` + +#### 戻り値 + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "56", + "__TIMESTAMP": "2020-06-16T11:16:47.601Z", + "__STAMP": 1, + "ID": 56, + "firstname": "John", + "lastname": "SMITH", + "schoolID": 2, + "school": { + "__deferred": { + "uri": "/rest/Schools(2)", + "__KEY": "2" + } + } +} +``` + + +### リレートエンティティをæŒã¤ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’æ›´æ–°ã™ã‚‹ + +既存㮠Schools エンティティを既存㮠Studentsエンティティã«ç´ä»˜ã‘ã¾ã™ã€‚ `StudentsEntity` ã‚¯ãƒ©ã‚¹ã¯æ¬¡ã® API ã‚’æä¾›ã—ã¦ã„ã¾ã™: + +``` +// cs.StudentsEntity クラス + +Class extends Entity + +exposed Function putToSchool() + var $1, $school , $0, $status : Object + + // $1 㯠Schools エンティティ + $school:=$1 + // Schools リレートエンティティをカレント㮠Students エンティティã«ç´ä»˜ã‘ã¾ã™ + This.school:=$school // ã“ã®ã¨ãã€school 㯠N対1リレーションåã§ã™ + + $status:=This.save() + + $0:=$status +``` + +Studentsã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å¯¾è±¡ã«æ¬¡ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™:
          **POST** `http://127.0.0.1:8044/rest/Students(1)/putToSchool`
          リクエストã®ãƒœãƒ‡ã‚£: +``` +[{ +"__DATACLASS":"Schools", +"__ENTITY":true, +"__KEY":2 +}] +``` + +#### 戻り値 + +``` +{ + "result": { + "success": true + } +} +``` + + +### エンティティセレクションを引数ã¨ã—ã¦å—ã‘å–ã‚‹ + +`Students` DataClassクラスã¯ã€å—ã‘å–ã£ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ ($1) ã‚’æ›´æ–°ã™ã‚‹ `setFinalExam()` 関数をæŒã¡ã¾ã™ã€‚ 実際ã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®å„エンティティ㮠*finalExam* 属性値をã€2ã¤ç›®ã«æ¸¡ã—ãŸå¼•æ•° ($2) ã«æ›´æ–°ã—ã¾ã™ã€‚ 最後ã«ã€æ›´æ–°ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ—ライマリーキーを返ã—ã¾ã™ã€‚ + +``` +// cs.Students クラス + +Class extends DataClass + +exposed Function setFinalExam() + + var $1, $es, $student, $status : Object + var $2, $examResult : Text + + var $keys, $0 : Collection + + // エンティティセレクション + $es:=$1 + + $examResult:=$2 + + $keys:=New collection() + + // エンティティセレクションをループã—ã¾ã™ + For each ($student;$es) + $student.finalExam:=$examResult + $status:=$student.save() + If ($status.success) + $keys.push($student.ID) + End if + End for each + + $0:=$keys +``` + +次ã®ã‚ˆã†ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’ã‚らã‹ã˜ã‚作æˆã—ã¾ã™: + +`http://127.0.0.1:8044/rest/Students/?$filter="ID<3"&$method=entityset` + +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’実行ã—ã¾ã™: + +**POST** `http://127.0.0.1:8044/rest/Students/setFinalExam` + +リクエストã®ãƒœãƒ‡ã‚£: + +``` +[ +{ +"__ENTITIES":true, +"__DATASET":"9B9C053A111E4A288E9C1E48965FE671" +}, +"Passed" +] + +``` + +#### 戻り値 + +プライマリーキー 1ã¨2 ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒæ›´æ–°ã•れã¾ã—ãŸ: + +``` +{ + "result": [ + 1, + 2 + ] +} +``` + +### クライアントå´ã§æ›´æ–°ã•れãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’使用ã™ã‚‹ + +[å‰è¿°](#EntitySelectionクラス関数ã¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’使用ã™ã‚‹) ã® `getAgeAverage()` 関数を使ã„ã¾ã™ã€‚ + +```4d +var $remoteDS, $newStudent, $students : Object +var $ageAverage : Integer + +$remoteDS:=Open datastore(New object("hostname";"127.0.0.1:8044");"students") + +// $newStudent ã¯å‡¦ç†ã™ã‚‹ Studentsエンティティã§ã™ +$newStudent:=... +$students:=$remoteDS.Students.query("school.name = :1";"Math school") +// クライアントå´ã§ $students エンティティセレクションã«ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’追加ã—ã¾ã™ +$students.add($newStudent) + +// StudentsSelectionクラスã«å¯¾ã—ã¦ã€åŒã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ç”Ÿå¾’エンティティã®å¹³å‡å¹´é½¢ã‚’è¿”ã™é–¢æ•°ã‚’呼ã³å‡ºã—ã¾ã™ +// ã“ã®é–¢æ•°ã¯ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®è¿½åŠ ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å«ã‚€æ›´æ–°ã•れãŸå†…容㮠$students エンティティセレクションã«å¯¾ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§å®Ÿè¡Œã•れã¾ã™ +$ageAverage:=$students.getAgeAverage() +``` \ 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..ae906c708d2f7d 100644 --- a/website/translated_docs/ja/REST/REST_requests.md +++ b/website/translated_docs/ja/REST/REST_requests.md @@ -1,57 +1,50 @@ --- id: REST_requests -title: About REST Requests +title: RESTリクエストã«ã¤ã„㦠--- -The following structures are supported for REST requests: +RESTリクエストã§ã¯æ¬¡ã®æ§‹æ–‡ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: -| URI | Resource | {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) | -| | | | [$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | -| | | | [?$filter]($filter.md) | -| | | [{attribute}](manData.html#selecting-attributes-to-get)/ | [?$compute]($compute.md) | -| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | -| | [{dataClass}:{attribute}(value)](%7BdataClass%7D%7Battribute%7D_value.html) | | | -| | [$catalog]($catalog.md) | | | -| | [$directory]($directory.md) | | | -| | [$info]($info.md) | | | +| URI | リソース (入力) | /? ã¾ãŸã¯ &{filter} (出力) | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... | +| | [{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | [$method=...]($method.md) | +| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey) | [$attributes]($attributes.md) | +| | [{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue) | | +RESTリクエストã«ã¯ã€URI ã¨ãƒªã‚½ãƒ¼ã‚¹ãŒå¿…ãšå«ã¾ã‚Œã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“ãŒã€è¿”ã•れるデータをフィルダーã™ã‚‹å‡ºåŠ›ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã®ä½¿ç”¨ã¯ä»»æ„ã§ã™ã€‚ -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. +ã™ã¹ã¦ã® URI ã¨åŒæ§˜ã«ã€å…ˆé ­ãƒ‘ラメーター㯠"?" ã«ç¶šã‘ã¦æŒ‡å®šã—ã€ãれ以é™ã®ãƒ‘ラメーター㯠"&" ã§åŒºåˆ‡ã‚Šã¾ã™ã€‚ ãŸã¨ãˆã°: -As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. ãŸã¨ãˆã°: + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +> 曖昧ã•回é¿ã®ãŸã‚ã€å€¤ã¯å¼•ç”¨ç¬¦å†…ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä¸Šã®ä¾‹ã§ã¯åå­— (lastName) ã®å€¤ã‚’å˜ä¸€å¼•ç”¨ç¬¦å†…ã«æ›¸ã‘ã¾ã™: "lastName!='Jones'"。 -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +パラメーターを利用ã™ã‚‹ã“ã¨ã§ã€4Dプロジェクトã®ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã§ãã¾ã™ã€‚ `GET` HTTPメソッドを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ä»¥å¤–ã«ã‚‚ã€`POST` HTTPメソッドを使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’追加・更新・削除ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ -> 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'". +JSON ã®ä»£ã‚りã«é…列形å¼ã§ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã«ã¯ [`$asArray`]($asArray.md) パラメーターを使ã„ã¾ã™ã€‚ -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. -If you want the data to be returned in an array instead of JSON, use the [`$asArray`]($asArray.md) parameter. +## RESTステータスã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ +å„ RESTリクエストã«å¯¾ã—ã€ã‚µãƒ¼ãƒãƒ¼ã¯ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ (エラー付ãã€ã¾ãŸã¯ã‚¨ãƒ©ãƒ¼ç„¡ã—) ã‚’è¿”ã—ã¾ã™ã€‚ -## REST Status and Response +### リクエストステータス +RESTリクエストをãŠã“ãªã†ã¨ã€ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã¨ã¨ã‚‚ã«ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãŒè¿”ã•れã¾ã™ã€‚ 主ãªã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚’ã„ãã¤ã‹ç´¹ä»‹ã—ã¾ã™: -With each REST request, the server returns the status and a response (with or without an error). +| ステータス | 説明 | +| ------------------------- | ------------------------------------- | +| 0 | リクエストã¯å‡¦ç†ã•れã¾ã›ã‚“ã§ã—㟠(サーãƒãƒ¼æœªèµ·å‹•ã®å¯èƒ½æ€§) | +| 200 OK | リクエストã¯ã‚¨ãƒ©ãƒ¼ãªã処ç†ã•れã¾ã—㟠| +| 401 Unauthorized | 権é™ã‚¨ãƒ©ãƒ¼ (ユーザーã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©é™ã‚’確èªã™ã‚‹å¿…è¦ãŒã‚りã¾ã™) | +| 402 No session | ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ€å¤§æ•°ã«é”ã—ã¦ã„ã¾ã™ | +| 404 Not Found | データクラス㌠REST ã«å…¬é–‹ã•れã¦ã„ãªã„ã‹ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå­˜åœ¨ã—ã¾ã›ã‚“ | +| 500 Internal Server Error | RESTリクエスト処ç†ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—㟠| -### Request Status +### レスãƒãƒ³ã‚¹ -With each REST request, you get the status along with the response. Below are a few of the statuses that can arise: +è¿”ã•れるレスãƒãƒ³ã‚¹ (JSONå½¢å¼) ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚ˆã£ã¦å¤‰ã‚りã¾ã™ã€‚ -| 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. | +エラーãŒç™ºç”Ÿã—ãŸå ´åˆã€ãã®å†…容ã¯ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã¨ã¨ã‚‚ã«è¿”ã•れるã‹ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãã®ã‚‚ã®ã«ãªã‚Šã¾ã™ã€‚ + -### 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..88aa217d772f7e 100644 --- a/website/translated_docs/ja/REST/authUsers.md +++ b/website/translated_docs/ja/REST/authUsers.md @@ -1,85 +1,114 @@ --- id: authUsers -title: Users and sessions +title: ユーザーã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³ --- +RESTリクエスト㯠[Webユーザーセッション](WebServer/sessions.md) ã®æ©æµã‚’å—ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“れã«ã‚ˆã‚Šã€è¤‡æ•°ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å‡¦ç†ã‚„ã€Webクライアントプロセス間ã®ãƒ‡ãƒ¼ã‚¿å…±æœ‰ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼æ¨©é™ãªã©ã®è¿½åŠ æ©Ÿèƒ½ã‚’åˆ©ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## Authenticating users +4D Server上㧠RESTセッションを開ãã«ã¯ã€ã¾ãšãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒèªè¨¼ã•れãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. -You log in a user to your application by passing the user's name and password to [`$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. +アプリケーションã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ログインã™ã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードをヘッダーã«å«ã‚㟠POSTリクエスト内㧠[`$directory/login`]($directory.md#directorylogin) を呼ã³å‡ºã—ã¾ã™ã€‚ ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ `On REST Authentication` データベースメソッド (存在ã™ã‚Œã°) を呼ã³å‡ºã—ã¾ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®èªè¨¼ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ (後述å‚ç…§)。 -The session will automatically be closed once the timeout is reached. +## セッションã®é–‹å§‹ -## Session cookie +[スケーラブルセッションを有効化](WebServer/sessions.md#ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹åŒ–) (推奨) ã—ã¦ã„ã‚‹å ´åˆã«ã€`On REST Authentication` データベースメソッド㌠`true` ã‚’è¿”ã™ã¨ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯è‡ªå‹•çš„ã«é–‹ã‹ã‚Œã€`Session` オブジェクトãŠã‚ˆã³ [Session API](API/SessionClass.md) を介ã—ã¦ç®¡ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 後続㮠RESTリクエストã¯åŒã˜ã‚»ãƒƒã‚·ãƒ§ãƒ³cookie を使用ã—ã¾ã™ã€‚ -Each REST request is handled through a specific session on the 4D server. +`On REST Authentication` データベースメソッドãŒå®šç¾©ã•れã¦ãªã„å ´åˆã«ã¯ã€`guest` セッションãŒé–‹ã‹ã‚Œã¾ã™ã€‚ -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: - 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. +ã“ã®ä¾‹ã§ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ htmlページã«ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨ãƒ‘スワードを入力ã—ã€POST ã§ [`$directory/login`]($directory.md#directorylogin) をリクエストã—ã¾ã™ (htmlページã®é€ä¿¡ã«ãŠã„ã¦ã¯ã€HTTPS接続ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™)。 ã“れã«ã‚ˆã¦å‘¼ã³å‡ºã•れ㟠`On REST Authentication` データベースメソッドãŒãƒ¦ãƒ¼ã‚¶ãƒ¼èªè¨¼ã‚’ãŠã“ãªã„ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’確立ã—ã¾ã™ã€‚ -### 例題 +htmlログインページ: -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. +![alt-text](assets/en/REST/login.png) -```4d -// Creating headers -ARRAY TEXT(headerNames;0) -ARRAY TEXT(headerValues;0) -APPEND TO ARRAY(headerNames;"username-4D") -APPEND TO ARRAY(headerNames;"session-4D-length") -APPEND TO ARRAY(headerNames;"hashed-password-4D") +```html + + +
          +
          +メールアドレス:
          +パスワード:
          + + +
          +
          -APPEND TO ARRAY(headerValues;"kind user") -APPEND TO ARRAY(headerValues;"60") -APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) + -//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;*) ``` +サーãƒãƒ¼ã«ãƒ­ã‚°ã‚¤ãƒ³æƒ…å ±ãŒé€ä¿¡ã•れるã¨ã€`On REST Authentication` データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™: + ```4d -// buildHeader project method + // On REST Authentication データベースメソッド + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + // ヘッダー㫠username-4D 㨠password-4D ã‚’å«ã‚㦠'/rest' URL ãŒå‘¼ã³å‡ºã•れã¾ã—㟠+If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if +``` -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> 一旦呼ã³å‡ºã•れ㦠`True` ã‚’è¿”ã™ã¨ã€åŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ãŠã„㦠`On REST Authentication` データベースメソッドã¯ãれ以上呼ã³å‡ºã•れã¾ã›ã‚“。 -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +`fillSession` プロジェクトメソッドã¯ã€ãŸã¨ãˆã°æ¬¡ã®ã‚ˆã†ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’åˆæœŸåŒ–ã—ã¾ã™: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use +``` diff --git a/website/translated_docs/ja/REST/configuration.md b/website/translated_docs/ja/REST/configuration.md index 74e38a86a6e29e..0cc3d746b1ca0c 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上ã§ã¯ã€ãƒ†ã‚¹ãƒˆç›®çš„ã§ RESTセッションを 3ã¤é–‹ãã“ã¨ãŒã§ãã¾ã™ã€‚ +> - リクエストをãŠã“ãªã†ã‚¢ãƒ—リケーション㮠[セッション](authUsers.md) ã¯åˆ¥é€”管ç†ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ -## 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ã‚µãƒ¼ãƒ“ã‚¹ãŒæœ‰åŠ¹åŒ–ã•れるã¨ã€[データストアインターフェース](ORDA/dsMapping.md#データストア) を通ã—㦠4Dデータベースã®ã™ã¹ã¦ã®ãƒ†ãƒ¼ãƒ–ルã¨ãƒ•ィールドãŠã‚ˆã³æ ¼ç´ãƒ‡ãƒ¼ã‚¿ãŒ 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..9a42a8ad972549 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..6df5034a24f618 100644 --- a/website/translated_docs/ja/REST/manData.md +++ b/website/translated_docs/ja/REST/manData.md @@ -1,251 +1,249 @@ --- 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#テーブルやフィールドã®å…¬é–‹)ã€ãã—㦠[関数](ClassFunctions.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.html#dataclasskey) ã§ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ã„ã¡ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚’å–å¾—ã™ã‚‹ä»¥å¤–ã«ã‚‚ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„コレクションを返㙠[クラス関数](ClassFunctions.md#関数ã®å‘¼ã³å‡ºã—) を用æ„ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -## 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) を使ã„ã¾ã™ã€‚ + +エンティティセット内ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®å±žæ€§å€¤ã‚’編集ã™ã‚‹ã¨ã€ãれらã®å€¤ãŒæ›´æ–°ã•れã¾ã™ã€‚ ãŸã ã—ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã®ç”Ÿæˆã«ä½¿ç”¨ã—ãŸã‚¯ã‚¨ãƒªæ¡ä»¶ã«åˆè‡´ã™ã‚‹å€¤ã‹ã‚‰åˆè‡´ã—ãªã„値ã«å¤‰æ›´ã—ãŸã¨ã—ã¦ã‚‚ã€ãã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‹ã‚‰å‰Šé™¤ã•れã¾ã›ã‚“。 エンティティを削除ã—ãŸå ´åˆã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‹ã‚‰ã‚‚削除ã•れã¾ã™ã€‚ -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. +4D Server ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‹ã‚‰ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆãŒæ¶ˆãˆã¦ã„ãŸå ´åˆã€10分ã®ãƒ‡ãƒ•ォルトタイムアウトã§å†ä½œæˆã•れã¾ã™ã€‚ ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆãŒæ¶ˆãˆã¦ã„ãŸå ´åˆã€å†ä½œæˆã•れるエンティティセットã®å†…å®¹ã¯æ›´æ–°ã•れãŸã‚‚ã®ã§ã™ (æ–°ã—ãエンティティãŒè¿½åŠ ã•れã¦ã„ãŸã‚Šã€å­˜åœ¨ã—ã¦ã„ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒå‰Šé™¤ã•れã¦ã„ãŸã‚Šã™ã‚‹å ´åˆãŒã‚りãˆã¾ã™)。 -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. +[`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityset.md#entitysetentitysetidoperatorothercollection) を使ã£ã¦ã€äº‹å‰ã«ä½œæˆã—㟠2ã¤ã®ã‚»ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’çµ±åˆã§ãã¾ã™ã€‚ 両セットã®å†…容を統åˆã™ã‚‹ (集åˆã®å’Œ) ã»ã‹ã€å…±é€šã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã¿ã‚’è¿”ã—ãŸã‚Š (集åˆã®ç©) ã€å…±é€šã§ãªã„エンティティã®ã¿ã‚’è¿”ã—ãŸã‚Š (集åˆã®å¯¾ç§°å·®) ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +ã“ã®å ´åˆmæ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ãŒè¿”ã•れã¾ã™ã€‚RESTãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ€å¾Œã« [`$method=entityset`]($method.md#methodentityset) を追加ã™ã‚‹ã“ã¨ã§æ–°è¦ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒƒãƒˆã‚’作æˆã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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. +## データã®è¨ˆç®— -For example, to get the highest salary: +[`$compute`]($compute.md) を使ã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã®ä»»æ„ã®å±žæ€§ã«ã¤ã„ã¦ã€**average**ã‚„ **count**ã€**min**ã€**max**ã€**sum** ã¨ã„ã£ãŸè¨ˆç®—ãŒãŠã“ãªãˆã¾ã™ã€‚ $all キーワードを使ãˆã°ã€å…¨ç¨®ã®å€¤ã‚’計算ã§ãã¾ã™ã€‚ -`/rest/Employee/salary/?$compute=sum` +ãŸã¨ãˆã°ã€ä¸€ç•ªé«˜ã„給与をå–å¾—ã™ã‚‹ã«ã¯: -To compute all values and return a JSON object: +`/rest/Employee/salary/?$compute=max` + +全種ã®å€¤ã‚’計算ã—㦠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 +POSTリクエストを使ã£ã¦ã€ORDAデータモデル㮠[ユーザークラス関数](ClassFunctions.md) を呼ã³å‡ºã™ã“ã¨ã§ã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆã‚¢ãƒ—リケーションã®å…¬é–‹API を活用ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€City DataClassクラス㫠`getCity()` 関数を定義ã—ãŸå ´åˆã€æ¬¡ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™: -The following example is a dataclass method that reveives parameters and returns an object: +`/rest/City/getCity` -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$lastname:=$2 +データã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒœãƒ‡ã‚£ã«å«ã‚ã¾ã™: `["Paris"]` -$0:=ds.Employee.query("firstname = :1 and lastname = :2";$firstname;$lastname).first().toObject() -``` -The method properties are configured accordingly on the 4D project side: +> RESTサービスã¨ã—ã¦å…¬é–‹ã•れ㟠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: +## å–å¾—ã™ã‚‹å±žæ€§ã®é¸æŠž -```4d -C_TEXT($content) -C_OBJECT($response) +RESTレスãƒãƒ³ã‚¹ã«ã©ã®å±žæ€§ã‚’å«ã‚ã¦è¿”ã—ã¦ã‚‚らã†ã‹ã‚’指定ã™ã‚‹ã«ã¯ã€åˆæœŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å±žæ€§ã®ãƒ‘スを追加ã—ã¾ã™ (*例*: `Company(1)/name,revenues/`)。 -$content:="[\"Toni\",\"Dickey\"]" +ã“ã®ãƒ•ã‚£ãƒ«ã‚¿ãƒ¼ã¯æ¬¡ã®æ–¹æ³•ã§é©ç”¨ã§ãã¾ã™: -$statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) -``` +| オブジェクト | シンタックス | 例題 | +| ------------- | --------------------------------------------------- | ------------------------------------------------------------- | +| データクラス | {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 | -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. +属性åã¯ã‚³ãƒ³ãƒžåŒºåˆ‡ã‚Šã§æ¸¡ã—ã¾ã™ (*例*: `/Employee/firstName,lastName,salary`)。 ストレージ属性ãŠã‚ˆã³ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’渡ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ -## 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: +ã“ã®æ–¹æ³•ã¯æ¬¡ã‚’対象ã«ä½¿ç”¨ã§ãã¾ã™: -| オブジェクト | シンタックス | 例題 | -| ---------------------- | --------------------------------------------------- | ------------------------------------------------------------- | -| 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 | +- データクラス (データクラスã®å…¨ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã¾ãŸã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) +- 特定ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ +- エンティティセット +#### データクラスã®ä¾‹ -The attributes must be delimited by a comma, *i.e.*, `/Employee/firstName,lastName,salary`. Storage or relation attributes can be passed. +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€People データクラス (データクラス全体ã¾ãŸã¯ `$filter` ã®å®šç¾©ã«å¿œã˜ãŸã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³) ã‹ã‚‰åå­— (firstName) ã¨åå‰ (lastName) 属性ã®ã¿ã‚’å–å¾—ã—ã¾ã™ã€‚ -### 例題 + `GET /rest/People/firstName,lastName/` -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@'"/` +**çµæžœ**: -**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" }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - + { + __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@'"/` + +**çµæžœ**: + +```` +{ + __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..9578ebcd14e15f 100644 --- a/website/translated_docs/ja/REST/{dataClass}.md +++ b/website/translated_docs/ja/REST/{dataClass}.md @@ -7,321 +7,235 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +エンティティやセンティティセレクションã€ã¾ãŸã¯ã‚¯ãƒ©ã‚¹é–¢æ•°ã‚’利用ã™ã‚‹ã«ã‚ãŸã£ã¦ã€RESTリクエスト内ã«ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹åを直接使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -## Available syntaxes +## 使用å¯èƒ½ãªã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ + +| シンタックス | 例題 | 説明 | +| ---------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| [**{dataClass}**](#dataClass) | `/Employee` | データクラスã®å…¨ãƒ‡ãƒ¼ã‚¿ (デフォルトã§ã¯å…ˆé ­ã® 100エンティティ) ã‚’è¿”ã—ã¾ã™ | +| [**{dataClass}({key})**](#dataclasskey) | `/Employee(22)` | データクラスã®ãƒ—ライマリーキーã«ã‚ˆã£ã¦ç‰¹å®šã•れるエンティティã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ | +| [**{dataClass}:{attribute}(value)**](#dataclassattributevalue) | `/Employee:firstName(John)` | 指定ã—ãŸå±žæ€§å€¤ã‚’æŒã¤ 1ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ | +| [**{dataClass}/{DataClassClassFunction}**](ClassFunctions.md#function-calls) | `/City/getCity` | DataClassクラス関数を実行ã—ã¾ã™ | +| [**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls) | `/City/getPopulation/?$filter="ID<3"` | EntitySelectionクラス関数を実行ã—ã¾ã™ | +| [**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls) | `City(2)/getPopulation` | Entityクラス関数を実行ã—ã¾ã™ | + +> 関数ã®å‘¼ã³å‡ºã—ã«ã¤ã„ã¦ã®è©³ç´°ã¯ [ORDAクラス関数](ClassFunctions.md) ã‚’å‚ç…§ãã ã•ã„。 -| シンタックス | 例題 | 説明 | -| -------------------------------------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- | -| [**{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": "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": "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": "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": "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" } } - .....//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")` - -### 説明 - -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**. - -For more information about the data returned, refer to [{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). ãŸã¨ãˆã°: - -`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: - -`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. - -`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" + }, + { + "__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" + } } } - } - - -## {dataClass}:{attribute}(value) - -Returns the data for one entity in which the attribute's value is defined +.....//more entities here + ] +} +```` -### 説明 -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)` -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). ãŸã¨ãˆã°: -`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: - -`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` -### 例題 - -The following request returns all the public data of the employee named "Jones". +## {dataClass}({key}) -`GET /rest/Employee:lastname(Jones)` +データクラスã®ãƒ—ライマリーキーã«ã‚ˆã£ã¦ç‰¹å®šã•れるエンティティã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ (*例*: `Company(22)` ã¾ãŸã¯ Company("IT0911AB2200") ãªã©)。 -## {dataClass}/{method} and {dataClass}({key})/{method} -Returns an object or a collection based on a project method. ### 説明 -Project methods are called through a dataclass (table) or an entity (record), and must return either an object or a collection. +データクラスã¨ã‚­ãƒ¼ã‚’渡ã™ã“ã¨ã§ã€å…¬é–‹ã•れã¦ã„ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æƒ…報をå–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ キー (key) ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«å®šç¾©ã•れã¦ã„るプライマリーキーã®å€¤ã§ã™ã€‚ プライマリーキーã®å®šç¾©ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒªãƒ•ァレンスマニュアル㮠**[主キーを設定ã€å‰Šé™¤ã™ã‚‹](https://doc.4d.com/4Dv18/4D/18/Table-properties.300-4575566.ja.html#1282230)** ã‚’å‚ç…§ãã ã•ã„。 -`POST /rest/Employee/getHighSalaries` +è¿”ã•れるデータã«ã¤ã„ã¦ã®è©³ç´°ã¯ [{DataClass}](#dataclass) ã‚’å‚ç…§ãã ã•ã„。 -`POST /rest/Employee(52)/getFullName` +å–å¾—ã™ã‚‹å±žæ€§ã‚’指定ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使ã£ã¦ãŠã“ãªã„ã¾ã™: [{attribute1, attribute2, ...}](manData.md#å–å¾—ã™ã‚‹å±žæ€§ã®é¸æŠž)。 ãŸã¨ãˆã°: -### 4D Configuration - -To be called in a REST request, a method must: +`GET /rest/Company(1)/name,address` -- 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 +`$expand` を使ã£ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’展開ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æŒ‡ç¤ºã—ã¾ã™: -![alt-text](assets/en/REST/MethodProp.png) +`GET /rest/Company(1)/name,address,staff?$expand=staff` -### Passing Parameters to a Method -You can also pass parameters to a method in a POST. -`POST /rest/Employee/addEmployee` +### 例題 -You can POST data in the body part of the request, for example: +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€Company データクラスã§ä¸»ã‚­ãƒ¼ãŒ 1 ã§ã‚るエンティティã®å…¬é–‹ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ -["John","Smith"] +`GET /rest/Company(1)` -### 例題 +**çµæžœ**: + + + +```` +{ + "__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" + } + } +} +```` -#### Table scope -Call of a `getAverage` method: -- on [Employee] table -- with **Table** scope -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` -`POST /rest/Employee/getAverage` -Result: +## {dataClass}:{attribute}(value) - { - "result": { - "ageAverage": 44.125 - } - } - +指定ã—ãŸå±žæ€§å€¤ã‚’æŒã¤ 1ä»¶ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®ãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™ -#### Current record scope -Call of a `getFullName` method: -- on [Employee] table -- with **Current record** scope +### 説明 -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` +*dataClass* ã«åŠ ãˆã¦ *attribute (属性)* ãŠã‚ˆã³ *value (値)*を渡ã™ã“ã¨ã§ã€å½“該エンティティã®å…¬é–‹ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦å–å¾—ã§ãã¾ã™ã€‚ 指定ã™ã‚‹å€¤ã¯ã€ãã®å±žæ€§ã«ãŠã„ã¦ä¸€æ„ã®ã‚‚ã®ã§ã™ãŒã€ä¸»ã‚­ãƒ¼ã§ã¯ã‚りã¾ã›ã‚“。 -`POST /rest/Employee(3)/getFullName` +`GET /rest/Company:companyCode(Acme001)` -Result: +å–å¾—ã™ã‚‹å±žæ€§ã‚’指定ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使ã£ã¦ãŠã“ãªã„ã¾ã™: [{attribute1, attribute2, ...}](manData.md#å–å¾—ã™ã‚‹å±žæ€§ã®é¸æŠž)。 ãŸã¨ãˆã°: - { - "result": { - "fullName": "John Smith" - } - } - +`GET /rest/Company:companyCode(Acme001)/name,address` -#### Current selection scope +[$attributes]($attributes.md) を使ã£ã¦ãƒªãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³å±žæ€§ã‚’使用ã™ã‚‹ã«ã¯ã€æ¬¡ã®ã‚ˆã†ã«æŒ‡ç¤ºã—ã¾ã™: -Call of a `updateSalary` method: +`GET /rest/Company:companyCode(Acme001)?$attributes=name,address,staff.name` -- on [Employee] table -- with **Current selection** scope -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` +### 例題 -POST data (in the request body): [1.5] +次ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€åå‰ãŒ "Jones" ã§ã‚る社員 (Employee) ã®å…¬é–‹ãƒ‡ãƒ¼ã‚¿ã‚’ã™ã¹ã¦è¿”ã—ã¾ã™ã€‚ -Result: +`GET /rest/Employee:lastname(Jones)` - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/ja/Tags/tags.md b/website/translated_docs/ja/Tags/tags.md new file mode 100644 index 00000000000000..8c98879c1300b2 --- /dev/null +++ b/website/translated_docs/ja/Tags/tags.md @@ -0,0 +1,762 @@ +--- +id: tags +title: 変æ›ã‚¿ã‚° +--- + +4Dã§ã¯ã€å‚ç…§ã‚’ 4D変数やå¼ã«æŒ¿å…¥ã—ãŸã‚Šã€æ§˜ã€…ãªå‡¦ç†ã‚’ソーステキスト ("テンプレート") ã«å¯¾ã—ã¦å®Ÿè¡Œã—ãŸã‚Šã™ã‚‹ãŸã‚ã®å¤‰æ›ã‚¿ã‚°ã®ã‚»ãƒƒãƒˆã‚’用æ„ã—ã¦ã„ã¾ã™ã€‚ ã“れらã®ã‚¿ã‚°ã¯ã€ã‚½ãƒ¼ã‚¹ãƒ†ã‚­ã‚¹ãƒˆãŒå®Ÿè¡Œã•れã¦ã‚¢ã‚¦ãƒˆãƒ—ットテキストãŒç”Ÿæˆã•れãŸã¨ãã«è§£é‡ˆã•れã¾ã™ã€‚ + +4D Webサーãƒãƒ¼ã«ãŠã„㦠[Web テンプレートページ](WebServer/templates.md) をビルドã™ã‚‹ã«ã‚ãŸã£ã¦ã€ã“ã®åŽŸç†ãŒä½¿ç”¨ã•れã¾ã™ã€‚ + +ã“れらã®ã‚¿ã‚°ã¯åŽŸå‰‡ã¨ã—㦠HTMLコメント (`<--#Tag Contents-->`) ã¨ã—ã¦æŒ¿å…¥ã•れã¾ã™ã€‚ã—ã‹ã—ãªãŒã‚‰ã€ [xml ã«æº–ã˜ãŸä»£æ›¿ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹](#4dtext-4dhtml-4deval-ã®ä»£æ›¿ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹) も一部利用å¯èƒ½ã§ã™ã€‚ + +複数タイプã®ã‚¿ã‚°ã‚’混用ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã® HTML構造ã¯ã€å•題ãªã実行å¯èƒ½ã§ã™: + +```html + + + (メソッド呼ã³å‡ºã—) + (If æ¡ä»¶) + (サブページ挿入) + (End if) + + + + + (カレントセレクションã§ã®ãƒ«ãƒ¼ãƒ—) + (If [TABLE]ValNum>10) + (ã‚µãƒ–ãƒšãƒ¼ã‚¸ã®æŒ¿å…¥) + (Else) + Value:
          (フィールド表示) + + (End for) + + +``` + + + +## タグ利用ã®åŽŸå‰‡ + +### è§£æž + +*テンプレート* ソースã®è§£æžã¯ã€2ã¤ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ãŠã“ãªã‚れã¾ã™: + +- `PROCESS 4D TAGS` コマンド使用時: ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã¯ *テンプレート* ã«åŠ ãˆã¦ä»»æ„ã®å¼•æ•°ã‚’å—ã‘入れã€å‡¦ç†ã®çµæžœã§ã‚るテキストを返ã—ã¾ã™ã€‚ + +- 4D ã®çµ±åˆã•れ㟠HTTPサーãƒãƒ¼ä½¿ç”¨æ™‚: `WEB SEND FILE` (.htm, .html, .shtm, .shtml)ã€`WEB SEND BLOB` (text/htmlåž‹ BLOB)ã€ãŠã‚ˆã³ `WEB SEND TEXT` コマンドã«ã‚ˆã£ã¦ [テンプレートページ](WebServer/templates.md) ã‚’é€ä¿¡ã€ã‚ã‚‹ã„㯠URL ã§å‘¼ã³å‡ºã—ã¾ã™ã€‚ URL ã§å‘¼ã³å‡ºã™å ´åˆã€".htm" 㨠".html" ã§çµ‚ã‚ã‚‹ãƒšãƒ¼ã‚¸ã¯æœ€é©åŒ–ã®ãŸã‚è§£æžã•れã¾ã›ã‚“。 ã“ã®å ´åˆã« HTMLページを解æžã•ã›ã‚‹ã«ã¯ã€çµ‚ã‚りを ".shtm" ã¾ãŸã¯ ".shtml" ã¨ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: http://www.server.com/dir/page.shtm)。 + + +### å†èµ·çš„å‡¦ç† + +4Dã‚¿ã‚°ã¯ç¹°ã‚Šè¿”ã—解釈ã•れã¾ã™ã€‚4D ã¯å¸¸ã«å¤‰æ›ã®çµæžœã‚’解釈ã—よã†ã¨ã—ã€æ–°ã—ã„変æ›ãŒèµ·ããŸéš›ã«ã¯ãれã«ä¼´ã†æ–°ã—ã„解釈ãŒå®Ÿè¡Œã•れã€å–å¾—çµæžœã®å¤‰æ›ãŒå¿…è¦ãŒãªããªã‚‹ã¾ã§ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚¹ãƒ†ãƒ¼ãƒˆãƒ¡ãƒ³ãƒˆãŒã‚ã£ãŸå ´åˆ: + +```html + +``` + +ã‚‚ã— `[Mail]Letter_type` テキストフィールド自体ã«ã‚‚ã‚¿ã‚° (ãŸã¨ãˆã°``) ãŒå«ã¾ã‚Œã¦ã„ãŸå ´åˆã€ã“ã®ã‚¿ã‚°ã¯ 4DHTMLã‚¿ã‚°ã®è§£é‡ˆã®å¾Œã«ã€ãれã«ä¼´ã£ã¦è©•価ã•れã¾ã™ã€‚ + +ã“ã®å¼·åŠ›ãªåŽŸå‰‡ã¯ã€ãƒ†ã‚­ã‚¹ãƒˆå¤‰æ›ã«é–¢é€£ã™ã‚‹ã»ã¨ã‚“ã©ã®éœ€è¦ã‚’満ãŸã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€Webコンテキストã«ãŠã„ã¦ã€ã“れã¯å ´åˆã«ã‚ˆã£ã¦æ‚ªæ„ã®ã‚るコードã®ä¾µå…¥ã‚’許ã™å¯èƒ½æ€§ãŒã‚ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ã“ã‚Œã‚’é˜²ãæ–¹æ³•ã«ã¤ã„ã¦ã¯ [悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止](WebServer/templates.md#悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止) ã‚’å‚ç…§ãã ã•ã„。 + + +### トークンを使用ã—ãŸè­˜åˆ¥å­ + +4D ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚„言語設定ã«å·¦å³ã•れãšã«ã€ã‚¿ã‚°çµŒç”±ã®å¼ã®è©•ä¾¡ãŒæ­£ã—ããŠã“ãªã‚れるã“ã¨ã‚’確実ã«ã™ã‚‹ãŸã‚ã€ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã§åå‰ãŒå¤‰ã‚りã†ã‚‹è¦ç´  (コマンドã€ãƒ†ãƒ¼ãƒ–ルã€ãƒ•ィールドã€å®šæ•°) ã«ã¤ã„ã¦ã¯ã€ãƒˆãƒ¼ã‚¯ãƒ³ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€`Current time` コマンドを挿入ã™ã‚‹ã«ã¯ã€"`Current time:C178`"ã¨å…¥åŠ›ã—ã¾ã™ã€‚ + +### "." ã‚’å°æ•°ç‚¹ã¨ã—ã¦ä½¿ç”¨ + +`4DTEXT`ã€`4DHTML`ã€ãŠã‚ˆã³ `4DEVAL` ã® 4Dã‚¿ã‚°ã§æ•°å€¤è¡¨ç¾ã‚’評価ã™ã‚‹éš›ã€4D ã¯å¸¸ã«ãƒ”リオド文字 (.) ã‚’å°æ•°ç‚¹ã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ リージョン設定ã¯ç„¡è¦–ã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€4Dã®è¨€èªžè¨­å®šã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒç•°ãªã£ã¦ã„ã¦ã‚‚メンテナンスãŒå®¹æ˜“ã¨ãªã‚Šäº’æ›æ€§ãŒä¿ãŸã‚Œã¾ã™ã€‚ + + +## 4DBASE + +#### シンタックス: `` + +`` タグ㯠`` ã‚¿ã‚°ã§ä½¿ç”¨ã•れるワーキングディレクトリを指定ã—ã¾ã™ã€‚ + +Webページ内ã§å‘¼ã³å‡ºã•れるã¨ã€`` ã‚¿ã‚°ã¯åŒãƒšãƒ¼ã‚¸å†…ã§ã‚ã¨ã«ç¶šãã™ã¹ã¦ã® `` 呼ã³å‡ºã—ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’変更ã—ã¾ã™ (次㮠`` ãŒã‚ã‚‹ã¾ã§)。 組ã¿è¾¼ã¾ã‚ŒãŸãƒ•ァイル内㧠``フォルダーãŒå¤‰æ›´ã•れるã¨ã€è¦ªã®ãƒ•ァイルã‹ã‚‰å…ƒã¨ãªã‚‹å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ + +*folderPath* 引数ã«ã¯ç¾åœ¨ã®ãƒšãƒ¼ã‚¸ã«å¯¾ã™ã‚‹ç›¸å¯¾ãƒ‘スを指定ã—ã€ãƒ‘ス㯠"/" ã§çµ‚ã‚ã£ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ã¾ãŸã€æŒ‡å®šãƒ•ォルダー㯠Webフォルダー内ã«ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +"WEBFOLDER" キーワードを渡ã™ã¨ã€(ãã®ãƒšãƒ¼ã‚¸ã«å¯¾ã—ã¦ç›¸å¯¾ã®) ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆãƒ‘ã‚¹ã«æˆ»ã•れã¾ã™ã€‚ + +以下ã®ã‚ˆã†ã«ã€å„呼ã³å‡ºã—ã”ã¨ã«ç›¸å¯¾ãƒ‘スを指定ã—ãŸã‚³ãƒ¼ãƒ‰ã¯: + +```html + + + + + +``` +以下ã®ã‚³ãƒ¼ãƒ‰ã¨åŒä¸€ã§ã™: + +```html + + + + + + + + +``` + +ãŸã¨ãˆã°ã€ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’設定ã™ã‚‹å ´åˆ: + +```html +/* Index.html */ + + + + + + + + +``` + +上ã§çµ„ã¿è¾¼ã¾ã‚Œã‚‹ "head.html" ファイル内ã§ã‚«ãƒ¬ãƒ³ãƒˆãƒ•ォルダー㌠`` を使用ã—ã¦å¤‰æ›´ã•れã¦ã‚‚ã€"index.html" 内ã§ã¯å¤‰æ›´ã•れã¾ã›ã‚“: + +```html +/* Head.htm */ +/* ã“ã“ã§ã®ãƒ¯ãƒ¼ã‚­ãƒ³ã‚°ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã¯ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã•れるファイルã«å¯¾ã—ã¦ç›¸å¯¾çš„ (FR/ ã¾ãŸã¯ US/) */ + + + + + + +``` + + +## 4DCODE + +#### シンタックス: `` + +`4DCODE` タグを使用ã™ã‚‹ã¨ã€è¤‡æ•°è¡Œã®4Dコードã®ãƒ–ãƒ­ãƒƒã‚¯ã‚’ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã«æŒ¿å…¥ã§ãã¾ã™ã€‚ + +"``"シークエンスã¾ã§ã®ã‚³ãƒ¼ãƒ‰ã‚’解釈ã—ã¾ã™ã€‚ コードブロック自体ã¯ã‚­ãƒ£ãƒªãƒƒã‚¸ãƒªã‚¿ãƒ¼ãƒ³ã‚‚ラインフィードもã€ã‚ã‚‹ã„ã¯ãã®ä¸¡æ–¹ã‚‚å«ã‚€ã“ã¨ãŒã§ãã€4D ã«ã‚ˆã£ã¦ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ã«è§£é‡ˆã•れã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```html + +``` + + +4DCODE ã‚¿ã‚°ã®æ©Ÿèƒ½ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +- `TRACE` コマンドãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚ã“れ㯠4Dデãƒãƒƒã‚¬ãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã®ã§ã€ãƒ†ãƒ³ãƒ—レートコードをデãƒãƒƒã‚°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- ã‚¨ãƒ©ãƒ¼ã¯æ¨™æº–ã®ã‚¨ãƒ©ãƒ¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚’表示ã—ã¾ã™ã€‚ã“れを使ã£ã¦ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ã‚³ãƒ¼ãƒ‰ã®å®Ÿè¡Œã‚’中止ã—ãŸã‚Šãƒ‡ãƒãƒƒã‚°ãƒ¢ãƒ¼ãƒ‰ã«å…¥ã£ãŸã‚Šã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `` ã®é–“ã®ãƒ†ã‚­ã‚¹ãƒˆã¯æ”¹è¡Œã•れã€ã©ã®ã‚ˆã†ãªæ”¹è¡Œã‚³ãƒ¼ãƒ‰ã§ã‚‚å—ã‘å–りã¾ã™ (crã€lfã€ã¾ãŸã¯ crlf)。 +- テキスト㯠`PROCESS 4D TAGS` を呼ã³å‡ºã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ã¦ãƒˆãƒ¼ã‚¯ãƒŠã‚¤ã‚ºã•れã¾ã™ã€‚ ã“れã¯ã€ãŸã¨ãˆã°ãƒ—ロジェクトメソッドã®èªè­˜ç­‰ã«ãŠã„ã¦é‡è¦ã§ã™ã€‚ [公開オプション: 4Dã‚¿ã‚°ã¨URL(4DACTION...)](WebServer/allowProject.md) メソッドプロパティã¯è€ƒæ…®ã•れã¾ã›ã‚“。 +- テキストãŒå¸¸ã« English-US設定ã§ã‚ã£ãŸã¨ã—ã¦ã‚‚ã€4Dã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³é–“ã«ãŠã„ã¦ã‚³ãƒžãƒ³ãƒ‰ã‚„定数åãŒæ”¹åã•れるã“ã¨ã«ã‚ˆã‚‹å•題をé¿ã‘ã‚‹ãŸã‚ã€ã‚³ãƒžãƒ³ãƒ‰åや定数åã¯ãƒˆãƒ¼ã‚¯ãƒ³ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã„ã¾ã™ã€‚ + +> 4DCODE ã‚¿ã‚°ãŒã‚らゆる 4DランゲージコマンドãŠã‚ˆã³ãƒ—ロジェクトメソッドを呼ã³å‡ºã›ã‚‹ã¨ã„ã†äº‹å®Ÿã¯ã€ã¨ãã«ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãŒ HTTP経由ã§ä½¿ç”¨å¯èƒ½ãªå ´åˆç­‰ã«ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•題ã«ãªã‚Šå¾—ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã‚¿ã‚°ã¯ã‚µãƒ¼ãƒãƒ¼å´ã®ã‚³ãƒ¼ãƒ‰ã‚’テンプレートファイルã‹ã‚‰å®Ÿè¡Œã™ã‚‹ãŸã‚ã€ã‚¿ã‚°ãã®ã‚‚ã®ã¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ä¸Šã®å•題ã«ãªã‚Šã¾ã›ã‚“。 ã“ã®ã‚ˆã†ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦ã¯ã€ã‚らゆる Webサーãƒãƒ¼ã¨åŒæ§˜ã«ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¯ä¸»ã«ã‚µãƒ¼ãƒãƒ¼ãƒ•ァイルã¸ã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¢ã‚¯ã‚»ã‚¹ãƒ¬ãƒ™ãƒ«ã«ãŠã„ã¦ç®¡ç†ã•れã¦ã„ã¾ã™ã€‚ + + +## 4DEACH 㨠4DENDEACH + +#### シンタックス: `` `` + +`` コメントã¯ã€*expression* ã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®è¦ç´ ã«å¯¾ã—ã¦å‡¦ç†ã‚’繰り返ã—ã¾ã™ã€‚ å„è¦ç´ ã¯ *variable* ã«ä»£å…¥ã•れã€ãã®åž‹ã¯ *expression* ã®åž‹ã«ä¾å­˜ã—ã¾ã™ã€‚ + +`` コメント㯠3種類㮠*expression* を対象ã«å復処ç†ã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™: + +- [コレクション](#--4deach-item-in-collection--): コレクションã®å„è¦ç´ ã‚’ループã—ã¾ã™ +- [エンティティセレクション](#--4deach-entity-in-entityselection--): エンティティセレクションã®å„エンティティをループã—ã¾ã™ +- [オブジェクト](#--4deach-property-in-object--): オブジェクトã®å„プロパティをループã—ã¾ã™ + +ãƒ«ãƒ¼ãƒ—ã®æ•°ã¯é–‹å§‹æ™‚ã«è©•価ã•れã€å‡¦ç†ä¸­ã«å¤‰åŒ–ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 ループ中ã«é …目を追加・削除ã™ã‚‹ã“ã¨ã¯ã€ç¹°ã‚Šè¿”ã—ã®ä¸è¶³ãƒ»é‡è¤‡ã‚’引ãèµ·ã“ã™ã“ã¨ãŒã‚ã‚‹ãŸã‚ã€ä¸€èˆ¬çš„ã«ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“。 + + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„è¦ç´ ã‚’対象ã«å復処ç†ã‚’ãŠã“ãªã„ã¾ã™ã€‚ `` 㨠`` ã®é–“ã«æ›¸ã‹ã‚ŒãŸã‚³ãƒ¼ãƒ‰ãŒã€å„コレクションè¦ç´ ã«ã¤ã„ã¦ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ + +*item* ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è¦ç´ ã¨åŒã˜åž‹ã®å¤‰æ•°ã§ã™ã€‚ + +コレクション㮠**è¦ç´ ã¯ã™ã¹ã¦åŒã˜åž‹** ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。ãã†ã§ãªã„å ´åˆã«ã¯ã€*item* 変数ã«åˆ¥ã®åž‹ã®å€¤ãŒä»£å…¥ã•れãŸã¨ãã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +ループã®å›žæ•°ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®è¦ç´ æ•°ã«åŸºã¥ã„ã¦ã„ã¾ã™ã€‚ å„繰り返ã—ã«ãŠã„ã¦ã€*item* 変数ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®åˆè‡´ã™ã‚‹è¦ç´ ãŒè‡ªå‹•çš„ã«ä»£å…¥ã•れã¾ã™ã€‚ ã“ã®ã¨ãã€ä»¥ä¸‹ã®ç‚¹ã«æ³¨æ„ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +- *item* 変数ãŒã‚ªãƒ–ジェクト型ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³åž‹ã§ã‚ã£ãŸå ´åˆ (ã¤ã¾ã‚Š *expression* ãŒã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã€ã‚ã‚‹ã„ã¯ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã§ã‚ã£ãŸå ´åˆ)ã€ã“ã®å¤‰æ•°ã‚’変更ã™ã‚‹ã¨è‡ªå‹•çš„ã«ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å¯¾å¿œã™ã‚‹è¦ç´ ã‚‚変更ã•れã¾ã™ (オブジェクトã¨ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã¯åŒã˜å‚照を共有ã—ã¦ã„ã‚‹ã‹ã‚‰ã§ã™)。 変数ãŒã‚¹ã‚«ãƒ©ãƒ¼åž‹ã§ã‚ã‚‹å ´åˆã€å¤‰æ•°ã®ã¿ãŒå¤‰æ›´ã•れã¾ã™ã€‚ +- *item* 変数ã«ã¯ã€ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å…ˆé ­è¦ç´ ã®åž‹ãŒè¨­å®šã•れã¾ã™ã€‚ コレクションè¦ç´ ã®ã©ã‚Œã‹ä¸€ã¤ã§ã‚‚ã€å¤‰æ•°ã¨ç•°ãªã‚‹åž‹ã®ã‚‚ã®ãŒã‚ã£ãŸå ´åˆã€ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã€ãƒ«ãƒ¼ãƒ—ã¯åœæ­¢ã—ã¾ã™ã€‚ +- コレクション㌠Null値ã®è¦ç´ ã‚’æ ¼ç´ã—ã¦ã„ãŸã¨ãã€*item* 変数ã®åž‹ãŒ Null値をサãƒãƒ¼ãƒˆã—ãªã„åž‹ (å€é•·æ•´æ•°å¤‰æ•°ãªã©) ã§ã‚ã£ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ãŒç”Ÿæˆã•れã¾ã™ã€‚ + +#### 例題: スカラー値ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + +*getNames* ã¯æ–‡å­—列ã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã™ãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ [公開オプション: 4Dã‚¿ã‚°ã¨URL](WebServer/allowProject.md) ãŒæœ‰åйã«ãªã£ã¦ã„ã¾ã™ã€‚ + + +```html + + + + + + + + + +
          Name
          +``` + +#### 例題: オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ + +*getSalesPersons* ã¯ã‚ªãƒ–ジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚’è¿”ã™ãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ã€‚ + +```html + + + + + + + + + + + +
          IDFirstnameLastname
          +``` + + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„エンティティを対象ã«å復処ç†ã‚’ãŠã“ãªã„ã¾ã™ã€‚ `` 㨠`` ã®é–“ã«æ›¸ã‹ã‚ŒãŸã‚³ãƒ¼ãƒ‰ãŒã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®å„エンティティã«ã¤ã„ã¦ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ + +*entity* 㯠Entityクラスã®ã‚ªãƒ–ジェクト変数ã§ã™ã€‚ + + +ループã®å›žæ•°ã¯ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã®æ•°ã«åŸºã¥ãã¾ã™ã€‚ å„繰り返ã—ã«ãŠã„ã¦ã€*entity* オブジェクト変数ã«ã¯ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã®åˆè‡´ã™ã‚‹ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ãŒè‡ªå‹•çš„ã«ä»£å…¥ã•れã¾ã™ã€‚ + +#### 例題: html ã®ãƒ†ãƒ¼ãƒ–ル + +```html + + + + + + + + + + + +
          IDNameTotal purchase
          +``` + +#### 例題: `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ã‚ªãƒ–ジェクトã®å„プロパティを対象ã«å復処ç†ã‚’ãŠã“ãªã„ã¾ã™ã€‚ `` 㨠`` ã®é–“ã«æ›¸ã‹ã‚ŒãŸã‚³ãƒ¼ãƒ‰ãŒã€å„オブジェクトプロパティã«ã¤ã„ã¦ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ + +*property* ã¯ç¾åœ¨å‡¦ç†ä¸­ã®ãƒ—ロパティåãŒè‡ªå‹•代入ã•れãŸãƒ†ã‚­ã‚¹ãƒˆå¤‰æ•°ã§ã™ã€‚ + +オブジェクトã®ãƒ—ロパティã¯ä½œæˆé †ã«å‡¦ç†ã•れã¦ã„ãã¾ã™ã€‚ ループ中ã€ãƒ—ロパティをオブジェクトã«è¿½åŠ /削除ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ãŒã€ãã®å ´åˆã§ã‚‚残りã®ãƒ«ãƒ¼ãƒ—回数ã¯ã€ã‚ªãƒ–ジェクトã®å…ƒã®ãƒ—ロパティ数ã«åŸºã¥ã„ã¦ã„ã‚‹ãŸã‚ã€å¤‰åŒ–ã—ã¾ã›ã‚“。 + +#### 例題: オブジェクトã®ãƒ—ロパティ + +*getGamers* ã¯ã€ã‚²ãƒ¼ãƒ ã‚¹ã‚³ã‚¢ã‚’管ç†ã™ã‚‹ãŸã‚ã« ("Mary"; 10; "Ann"; 20; "John"; 40) ã®ã‚ˆã†ãªã‚ªãƒ–ジェクトを返ã™ãƒ—ロジェクトメソッドã§ã™ã€‚ + +```html + + + + + + + + + + + +
          GamersScores
          +``` + + + + +## 4DEVAL + +#### シンタックス: `` +#### 代替シンタックス: `$4DEVAL(expression)` + +`4DEVAL` タグを使用ã™ã‚‹ã¨ã€4Dã®å¤‰æ•°ã‚„å¼ã‚’評価ã§ãã¾ã™ã€‚ [`4DHTML`](#4dhtml) ã‚¿ã‚°ã®ã‚ˆã†ã«ã€`4DEVAL` ã‚¿ã‚°ã¯ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã™éš›ã«HTML特殊文字をエスケープã—ã¾ã›ã‚“。 ã—ã‹ã—ãªãŒã‚‰ã€[`4DHTML`](#4dhtml) ã‚„ [`4DTEXT`](#4dtext) ã¨ç•°ãªã‚Šã€`4DEVAL` ã¯æœ‰åŠ¹ãª 4D宣言ã§ã‚れã°ã©ã‚Œã§ã‚‚実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (値を返ã•ãªã„代入やå¼ã‚‚å«ã¾ã‚Œã¾ã™)。 + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®æ§˜ãªã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +``` + $input:="" // 代入 + $input:=$input+"" // 計算 + PROCESS 4D TAGS($input;$output) + // $output = "43" +``` + +解釈エラーã®å ´åˆã€"`: ## エラー # エラーコード`" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +> セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€[悪æ„ã‚るコードã®ä¾µå…¥ãƒ»æŒ¿å…¥](WebServer/templates.md#悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止)を防ããŸã‚ã«ã€ã‚¢ãƒ—リケーション外ã‹ã‚‰å°Žå…¥ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã¨ãã«ã¯ [`4DTEXT`](#4dtext) ã‚¿ã‚°ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +## 4DHTML + +#### シンタックス: `` +#### 代替シンタックス: `$4DHTML(expression)` + + +`4DTEXT` ã‚¿ã‚°åŒæ§˜ã€ã“ã®ã‚¿ã‚°ã‚’使用ã™ã‚‹ã¨ã€4Dã®å¤‰æ•°ã‚„値を返ã™å¼ã‚’ HTMLå¼ã¨ã—ã¦æŒ¿å…¥ã§ãã¾ã™ã€‚ 一方 `4DTEXT` ã‚¿ã‚°ã¨ã¯ç•°ãªã‚Šã€ã“ã®ã‚¿ã‚°ã¯HTML特殊文字(例: ">")をエスケープã—ã¾ã›ã‚“。 + +ãŸã¨ãˆã°ã€4Dタグを使用ã—㦠4Dã®ãƒ†ã‚­ã‚¹ãƒˆå¤‰æ•° myvar を処ç†ã—ãŸçµæžœã¯ä»¥ä¸‹ã®æ§˜ã«ãªã‚Šã¾ã™: + +| myvar ã®å€¤ | ã‚¿ã‚° | 戻り値 | +| -------------------- | ---------------------------- | ------------------- | +| `myvar:=""` | `` | `<B>` | +| `myvar:=""` | `` | `` | + +解釈エラーã®å ´åˆã€"`: ## エラー # エラーコード`" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +> セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€[悪æ„ã‚るコードã®ä¾µå…¥ãƒ»æŒ¿å…¥](WebServer/templates.md#悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止)を防ããŸã‚ã«ã€ã‚¢ãƒ—リケーション外ã‹ã‚‰å°Žå…¥ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã¨ãã«ã¯ [`4DTEXT`](#4dtext) ã‚¿ã‚°ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + +## 4DIF, 4DELSE, 4DELSEIF 㨠4DENDIF + +#### シンタックス: `` {`...`} {``} `` + +`` (ä»»æ„), `` (ä»»æ„) ãŠã‚ˆã³ `` コメントã¨å…±ã«ä½¿ç”¨ã™ã‚‹ã“ã¨ã§ã€`` コメントã¯ã‚³ãƒ¼ãƒ‰ã®ä¸€éƒ¨ã«æ¡ä»¶åˆ†å²ã‚’実行ã•ã›ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ + +*expression* ã¯ãƒ–ãƒ¼ãƒ«å€¤ã‚’è¿”ã™æœ‰åŠ¹ãª 4Då¼ã§ã™ã€‚ å¼ã¯æ‹¬å¼§ã®ä¸­ã«è¨˜è¿°ã•れã€4Dã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒ«ãƒ¼ãƒ«ã«æº–æ‹ ã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +`` ... `` ã¯è¤‡æ•°ãƒ¬ãƒ™ãƒ«ã§ãƒã‚¹ãƒˆã§ãã¾ã™ã€‚ 4Dã¨åŒã˜ãã€ãれãžã‚Œã® `` ã«ã¯å¯¾å¿œã™ã‚‹ `` ãŒãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +解釈エラーã®å ´åˆã€`` 㨠`` ã®é–“ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ä»£ã‚りã«ã€"``: ブールå¼ãŒå¿…è¦ã§ã™" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ åŒæ§˜ã«ã€`` ãŒåŒã˜æ•°ã® `` ã§é–‰ã˜ã‚‰ã‚Œã¦ã„ãªã„å ´åˆã€`` 㨠`` ã®é–“ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ä»£ã‚り㫠"``: 4DENDIFãŒå¿…è¦ã§ã™" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +`` タグを使用ã™ã‚‹ã¨ã€æ•°ã«åˆ¶é™ãªãæ¡ä»¶ã‚’テストã§ãã¾ã™ã€‚ 最åˆã« `true` ã¨åˆ¤å®šã•れãŸãƒ–ロック内ã«ã‚るコードã ã‘ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ `true` ブロックãŒãªãã€`` ã‚‚ãªã„å ´åˆã«ã¯ã€ãªã«ã‚‚実行ã•れã¾ã›ã‚“。 ``ã‚¿ã‚°ã¯ã€æœ€å¾Œã® `` ã®å¾Œã«è¨˜è¿°ã§ãã¾ã™ã€‚ ãれã¾ã§ã®æ¡ä»¶ãŒã™ã¹ã¦ `false` ã®å ´åˆã€``ãƒ–ãƒ­ãƒƒã‚¯ã®æ–‡ãŒå®Ÿè¡Œã•れã¾ã™ã€‚ + +以下ã®2ã¤ã®ã‚³ãƒ¼ãƒ‰ã¯åŒç­‰ã§ã™ã€‚ + +`4DELSE` ã®ã¿ã‚’使用ã™ã‚‹å ´åˆ: + +```html + + /* Condition1 ㌠true ã®å ´åˆ*/ + + + /* Condition2 ㌠true ã®å ´åˆ*/ + + + /* Condition3 ㌠true ã®å ´åˆ */ + + /*ã„ãšã‚Œã®æ¡ä»¶ã‚‚ true ã§ãªã„å ´åˆ*/ + + + +``` + +åŒã˜å†…容を `4DELSEIF` タグを使用ã—ã¦è¨˜è¿°ã—ãŸå ´åˆ: + +``` + + /* Condition1 ㌠true ã®å ´åˆ*/ + + /* Condition2 ㌠true ã®å ´åˆ*/ + + /* Condition3 ㌠true ã®å ´åˆ */ + + /* ã„ãšã‚Œã®æ¡ä»¶ã‚‚ true ã§ãªã„å ´åˆ*/ + +``` + +スタティック㪠HTMLãƒšãƒ¼ã‚¸ã«æ›¸ã‹ã‚ŒãŸã“ã®ä¾‹é¡Œã®ã‚³ãƒ¼ãƒ‰ã¯ã€`vname#""` å¼ã®çµæžœã«å¿œã˜ã€ç•°ãªã‚‹ãƒ©ãƒ™ãƒ«ã‚’表示ã—ã¾ã™: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +ã“ã®ä¾‹é¡Œã¯æŽ¥ç¶šã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚ˆã£ã¦ç•°ãªã‚‹ãƒšãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### シンタックス: `` + +ã“ã®ã‚¿ã‚°ã¯ä¸»ã«ã€ã‚ã‚‹ (*path* ã§æŒ‡å®šã•れãŸ) HTMLページを別㮠HTMLページã«å«ã‚ã‚‹ãŸã‚ã«ãƒ‡ã‚¶ã‚¤ãƒ³ã•れã¾ã—ãŸã€‚ デフォルトã§ã€HTMLページã®ãƒœãƒ‡ã‚£ãƒ¼éƒ¨ã€ã¤ã¾ã‚Š `` ã¨`` ã‚¿ã‚°ã®é–“ã®å†…容ã ã‘ãŒçµ±åˆã•れã¾ã™ (bodyã‚¿ã‚°ã¯å«ã¾ã‚Œã¾ã›ã‚“)。 ã“れã«ã‚ˆã‚Šã€ãƒ˜ãƒƒãƒ€ãƒ¼ã«å«ã¾ã‚Œã‚‹ãƒ¡ã‚¿ã‚¿ã‚°é–¢é€£ã®è¡çªãŒå›žé¿ã•れã¾ã™ã€‚ + +ã—ã‹ã—ã€æŒ‡å®šã•れ㟠HTMLページ中㫠`` `` ã‚¿ã‚°ãŒãªã„å ´åˆã€ãƒšãƒ¼ã‚¸å…¨ä½“ãŒçµ±åˆã•れã¾ã™ã€‚ ã“ã®å ´åˆã€ãƒ¡ã‚¿ã‚¿ã‚°ã®æ•´åˆæ€§ã‚’管ç†ã™ã‚‹ã®ã¯é–‹ç™ºè€…ã®å½¹å‰²ã§ã™ã€‚ + +`` コメントã¯ã€ãƒ†ã‚¹ãƒˆ (``) やループ (``) ã¨ä½¿ç”¨ã™ã‚‹ã¨ã¨ã¦ã‚‚便利ã§ã™ã€‚ æ¡ä»¶ã«åŸºã¥ãã‚ã‚‹ã„ã¯ãƒ©ãƒ³ãƒ€ãƒ ã«ãƒãƒŠãƒ¼ãªã©ã‚’挿入ã™ã‚‹ä¾¿åˆ©ãªæ–¹æ³•ã§ã™ã€‚ ã“ã®ã‚¿ã‚°ã‚’使用ã—ã¦ãƒšãƒ¼ã‚¸ã‚’インクルードã™ã‚‹ã¨ãã€æ‹¡å¼µå­ã«ã‹ã‹ã‚らãšã€4Dã¯å‘¼ã³å‡ºã•れãŸãƒšãƒ¼ã‚¸ã‚’è§£æžã—ã¦ã‹ã‚‰ã€å†…容を `4DINCLUDE` 呼ã³å‡ºã—å…ƒã®ãƒšãƒ¼ã‚¸ã«æŒ¿å…¥ã—ã¾ã™ã€‚ + +`` ã‚³ãƒ¡ãƒ³ãƒˆã§æŒ¿å…¥ã•れãŸãƒšãƒ¼ã‚¸ã¯ã€URLã§å‘¼ã°ã‚ŒãŸãƒšãƒ¼ã‚¸ã‚„ `WEB SEND FILE` コマンドã§é€ä¿¡ã•れãŸãƒšãƒ¼ã‚¸ã¨åŒã˜ã‚ˆã†ã«ã€Webサーãƒãƒ¼ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ + +*path* ã«ã¯ã€æŒ¿å…¥ã™ã‚‹ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ãƒ‘スを記述ã—ã¾ã™ã€‚ 警告: `4DINCLUDE` を呼ã³å‡ºã™å ´åˆã€ãƒ‘スã¯è§£æžã•れる親ドキュメントを起点ã¨ã—ãŸç›¸å¯¾ãƒ‘スã§ã™ã€‚ フォルダ区切り文字ã«ã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ (/) を使用ã—ã€ãƒ¬ãƒ™ãƒ«ã‚’ã•ã‹ã®ã¼ã‚‹ã«ã¯ 2ã¤ã®ãƒ‰ãƒƒãƒˆ (..) を使用ã—ã¾ã™ (HTMLシンタックス)。 `PROCESS 4D TAGS` コマンド㧠`4DINCLUDE` タグを使用ã™ã‚‹å ´åˆã®ãƒ‡ãƒ•ォルトフォルダーã¯ãƒ—ロジェクトフォルダーã§ã™ã€‚ + +> `4DINCLUDE` ã‚¿ã‚°ã§ä½¿ç”¨ã•れるデフォルトフォルダー㯠[``](#4dbase) タグを使ã£ã¦å¤‰æ›´ã§ãã¾ã™ã€‚ + +ページ内ã§ä½¿ç”¨ã§ãã‚‹ `` æ•°ã«åˆ¶é™ã¯ã‚りã¾ã›ã‚“。 ã—ã‹ã— `` ã®å‘¼ã³å‡ºã—㯠1レベルã®ã¿æœ‰åйã§ã™ã€‚ ã¤ã¾ã‚Šã€ãŸã¨ãˆã° *mydoc1.html* ページ㫠`` ã«ã‚ˆã£ã¦æŒ¿å…¥ã•れる *mydoc2.html* ãŒã‚ã‚‹å ´åˆã€ãã®ãƒœãƒ‡ã‚£å†…ã§ã•ら㫠`` を使ã†ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã•らã«ã€4Dã¯ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ãŒå†å¸°çš„ã‹ã©ã†ã‹ã‚’確èªã—ã¾ã™ã€‚ + +エラーã®å ´åˆã€"`` : ドキュメントを開ã‘ã¾ã›ã‚“" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +例: + +```html + + + +``` + + + +## 4DLOOP 㨠4DENDLOOP + +#### シンタックス: `` `` + +ã“ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’使用ã—ã¦ã€æ¡ä»¶ã‚’満ãŸã™é–“ã€ã‚³ãƒ¼ãƒ‰ã®ä¸€éƒ¨ã‚’繰り返ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 繰り返ã—部ã®ã‚³ãƒ¼ãƒ‰ã¯ `` 㨠`` ã§æŒŸã¾ã‚Œã¾ã™ã€‚ + +`` ... `` ブロックã¯ãƒã‚¹ãƒˆã§ãã¾ã™ã€‚ 4Dã¨åŒã˜ãã€ãれãžã‚Œã® `` ã«ã¯å¯¾å¿œã™ã‚‹ `` ãŒãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +5ç¨®é¡žã®æ¡ä»¶ã‚’使用ã§ãã¾ã™: + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€ã‚«ãƒ¬ãƒ³ãƒˆãƒ—ロセスã®ã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã«åŸºã¥ãã€æŒ‡å®šã—ãŸãƒ†ãƒ¼ãƒ–ルã®ãƒ¬ã‚³ãƒ¼ãƒ‰æ¯Žã«ãƒ«ãƒ¼ãƒ—ã—ã¾ã™ã€‚ カレントセレクションレコード毎ã«ã€2ã¤ã®ã‚³ãƒ¡ãƒ³ãƒˆã®é–“ã®ã‚³ãƒ¼ãƒ‰ã¯ç¹°ã‚Šè¿”ã•れã¾ã™ã€‚ + +> テーブルをæ¡ä»¶ã¨ã—㦠`4DLOOP` ã‚¿ã‚°ãŒä½¿ç”¨ã•れるã¨ã€ãƒ¬ã‚³ãƒ¼ãƒ‰ãŒ "読ã¿å–り専用" モードã§ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ + +以下ã®ã‚³ãƒ¼ãƒ‰ã¯: + +```html + +
          + +``` + +4Dランゲージã§è¡¨ã™ã¨ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€é…列項目ã”ã¨ã«ãƒ«ãƒ¼ãƒ—ã—ã¾ã™ã€‚ 2ã¤ã®ã‚³ãƒ¡ãƒ³ãƒˆã®é–“ã®ã‚³ãƒ¼ãƒ‰ãŒç¹°ã‚Šè¿”ã•れるãŸã³ã«ã€é…列ã®ã‚«ãƒ¬ãƒ³ãƒˆé …ç›®ãŒã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¾ã™ã€‚ + +> ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§äºŒæ¬¡å…ƒé…列を使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ã“ã®å ´åˆã«ã¯ã€ä»£ã‚りã«ãƒ¡ã‚½ãƒƒãƒ‰ã‚’æ¡ä»¶ã¨ã—ãŸãƒ«ãƒ¼ãƒ—ã‚’ãƒã‚¹ãƒˆã—ã¦ä½¿ç”¨ã—ã¾ã™ã€‚ + +以下ã®ã‚³ãƒ¼ãƒ‰ã¯: + +```html + +
          + +``` + +4Dランゲージã§è¡¨ã™ã¨ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒ `true` ã‚’è¿”ã™é–“ループãŒãŠã“ãªã‚れã¾ã™ã€‚ メソッドã¯ã€å€é•·æ•´æ•°ã‚¿ã‚¤ãƒ—ã®å¼•æ•°ã‚’å—ã‘å–りã¾ã™ã€‚ ã¾ãšãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•° 0 を渡ã•れã¾ã™ã€‚ã“れ㯠(å¿…è¦ã«å¿œã˜ã¦) åˆæœŸåŒ–ステージã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ãã®å¾Œã€`true` ãŒè¿”ã•れるã¾ã§ 1, 2, 3 ã¨æ¸¡ã•れる引数値ãŒã‚¤ãƒ³ã‚¯ãƒªãƒ¡ãƒ³ãƒˆã•れã¾ã™ã€‚ + +セキュリティã®ãŸã‚ã€Webプロセス内ã§ã¯ã€`On Web Authentication` データベースメソッドãŒåˆæœŸåŒ–ステージ (引数ã«0ãŒæ¸¡ã•れã¦å®Ÿè¡Œã•れる) ã®å‰ã«ä¸€åº¦å‘¼ã³å‡ºã•れã¾ã™ã€‚ èªè¨¼ã«æˆåŠŸã™ã‚‹ã¨ã€åˆæœŸåŒ–ã«é€²ã¿ã¾ã™ã€‚ + +コンパイルã®ãŸã‚ã€`C_BOOLEAN($0)` 㨠`C_LONGINT($1)` ãŒå¿…ãšå®£è¨€ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +以下ã®ã‚³ãƒ¼ãƒ‰ã¯: + +```html + +
          + +``` + +4Dランゲージã§è¡¨ã™ã¨ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +`my_method` ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã§ã¯ã€`4DLOOP` タグ㯠*expression* ã«æŒ‡å®šã—ãŸå¼ãŒ `true` ã‚’è¿”ã™é–“ループãŒãŠã“ãªã‚れã¾ã™ã€‚ å¼ã¯æœ‰åйãªãƒ–ールå¼ã§ã‚れã°ã‚ˆãã€ç„¡é™ãƒ«ãƒ¼ãƒ—を防ããŸã‚ã«ã€ãƒ«ãƒ¼ãƒ—ã”ã¨ã«è©•価ã•れる変数部分をå«ã‚“ã§ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã¯: + +```html + + + + + +``` + +以下ã®çµæžœã‚’生æˆã—ã¾ã™: + +``` +0 +1 +2 +3 +``` + +### `` + +ã“ã®å ´åˆã€`4DLOOP` ã‚¿ã‚°ã¯é…列ã®ã¨ãã¨åŒã˜ã‚ˆã†ã«æŒ¯ã‚‹ã¾ã„ã¾ã™: ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã«ã‚ˆã£ã¦å‚ç…§ã•れãŸé…列ã®è¦ç´ ã”ã¨ã«ãƒ«ãƒ¼ãƒ—を繰り返ã—ã¾ã™ã€‚ カレントã®é…列è¦ç´ ã¯ã€ã‚³ãƒ¼ãƒ‰ãŒç¹°ã‚Šè¿”ã•れる度ã«å¢—加ã—ã¦ã„ãã¾ã™ã€‚ + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ `PROCESS 4D TAGS` コマンドã«å¯¾ã—ã¦é…列ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚’渡ã—ãŸå ´åˆã«æœ‰ç”¨ã§ã™ã€‚ + +例: + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +解釈エラーã®å ´åˆã€`` 㨠`` ã®é–“ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ä»£ã‚り㫠"``: エラーã®èª¬æ˜Žâ€ ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +以下ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: + +- 予期ã—ãªã„å¼ã®ã‚¿ã‚¤ãƒ— (標準ã®ã‚¨ãƒ©ãƒ¼); +- テーブルåãŒæ­£ã—ãã‚りã¾ã›ã‚“ (テーブルåã®ã‚¨ãƒ©ãƒ¼); +- é…列ãŒå¿…è¦ã§ã™ (変数ãŒé…列ã§ãªã„ã‹ã€äºŒæ¬¡å…ƒé…åˆ—ãŒæŒ‡å®šã•れãŸ); +- メソッドãŒå­˜åœ¨ã—ã¾ã›ã‚“; +- シンタックスエラー (メソッド実行時); +- アクセス権エラー (テーブルやメソッドã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹æ¨©é™ãŒãªã„); +- 4DENDLOOP ãŒå¿…è¦ã§ã™ (`` ãŒå¯¾å¿œã™ã‚‹ `` ã§é–‰ã˜ã‚‰ã‚Œã¦ã„ãªã„)。 + +## 4DSCRIPT/ + +#### シンタックス: `` + +`4DSCRIPT` ã‚¿ã‚°ã¯ã€ãƒ†ãƒ³ãƒ—レートを処ç†ã™ã‚‹éš›ã« 4Dメソッドを実行ã™ã‚‹ã“ã¨ã‚’å¯èƒ½ã«ã—ã¾ã™ã€‚ `` タグ㌠HTMLコメントã¨ã—ã¦ãƒšãƒ¼ã‚¸ã«ç¾ã‚Œã‚‹ã¨ã€`MyMethod` メソッド㌠`$1` ã« `Param` ã‚’å—ã‘å–ã£ã¦å®Ÿè¡Œã•れã¾ã™ã€‚ + +> タグ㌠Webプロセスã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„ã¦å‘¼ã³å‡ºã•れãŸå ´åˆã€WebページãŒãƒ­ãƒ¼ãƒ‰ã•れるã¨ã€4D㯠`On Web Authentication` データベースメソッドを (存在ã™ã‚Œã°) 呼ã³å‡ºã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒ `true` ã‚’è¿”ã™ã¨ã€4Dã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã—ã¾ã™ã€‚ + +メソッド㯠`$0` ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã™å¿…è¦ãŒã‚りã¾ã™ã€‚ æ–‡å­—åˆ—ãŒæ–‡å­—コード 1 (ã¤ã¾ã‚Šã€`Char(1)` ã®ã“ã¨) ã‹ã‚‰å§‹ã¾ã£ã¦ã„ã‚‹ã¨ã€ãれ㯠HTMLソースã¨ã—ã¦æ‰±ã‚れã¾ã™ (`4DHTML` ã¨åŒã˜åŽŸå‰‡)。 + +ãŸã¨ãˆã°ã€æ¬¡ã®ã‚³ãƒ¡ãƒ³ãƒˆã‚’テンプレートWebãƒšãƒ¼ã‚¸ã«æŒ¿å…¥ã—ãŸã¨ã—ã¾ã—ょã†: `"ä»Šæ—¥ã®æ—¥ä»˜ã¯"` 。 ページをロードã™ã‚‹éš›ã€4D㯠`On Web Authentication` データベースメソッドを (存在ã™ã‚Œã°) 呼ã³å‡ºã—ã€ãã—㦠`MYMETH` メソッド㮠`$1` ã«æ–‡å­—列 “/MYPARAM†を引数ã¨ã—ã¦æ¸¡ã—ã¦å‘¼ã³å‡ºã—ã¾ã™ã€‚ メソッド㯠`$0` ã«ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã—ã¾ã™ (ãŸã¨ãˆã° “21/12/31â€)。`"ä»Šæ—¥ã®æ—¥ä»˜ã¯ â€` ã¨ã„ã†ã‚³ãƒ¡ãƒ³ãƒˆã®çµæžœã¯ â€ä»Šæ—¥ã®æ—¥ä»˜ã¯ 21/12/31†ã¨ãªã‚Šã¾ã™ã€‚ + +`MYMETH` メソッドã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d + //MYMETH + C_TEXT($0;$1) // ã“れらã®ãƒ‘ラメーターã¯å¸¸ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ + $0:=String(Current date) +``` + +> `4DSCRIPT` ã‹ã‚‰å‘¼ã³å‡ºã•れるメソッドã¯ã€ã‚¤ãƒ³ã‚¿ãƒ•ェースè¦ç´  (`DIALOG`, `ALERT` ãªã©) を呼ã³å‡ºã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 + +4Dã¯ãƒ¡ã‚½ãƒƒãƒ‰ã‚’見ã¤ã‘ãŸé †ã«å®Ÿè¡Œã™ã‚‹ãŸã‚ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®å¾Œã®æ–¹ã§å‚ç…§ã•れる変数ã®å€¤ã‚’設定ã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã“ã¨ã‚‚å¯èƒ½ã§ã™ã€‚モードã¯é–¢ä¿‚ã‚りã¾ã›ã‚“。 テンプレートã«ã¯å¿…è¦ãªã ã‘`< コメントを記述ã§ãã¾ã™ã€‚

          + +

          4DTEXT

          + +

          シンタックス: `

          +#### 代替シンタックス: `$4DTEXT(expression)` + + +ã‚¿ã‚° `` を使用ã—㦠4D変数や値を返ã™å¼ã¸ã®å‚照を挿入ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€(HTMLページ内ã«ã¦) 以下ã®ã‚ˆã†ã«è¨˜è¿°ã™ã‚‹ã¨: + +```html +

          ã¸ã‚ˆã†ã“ãï¼

          +``` + +4D変数 `vtSiteName` ã®å€¤ãŒ HTMLページã«é€ä¿¡æ™‚ã«æŒ¿å…¥ã•れã¾ã™ã€‚ 値ã¯ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦æŒ¿å…¥ã•れã¾ã™ã€‚">"ã®ã‚ˆã†ãªHTMLã®ç‰¹æ®Šæ–‡å­—ã¯ã€è‡ªå‹•çš„ã«ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•れã¾ã™ã€‚ + +4DTEXT タグを使用ã—ã¦ã€4Då¼ã‚‚挿入ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒ•ィールドã®å€¤ã‚’直接挿入ã§ãã‚‹ã»ã‹ (``) ã€é…列è¦ç´ ã®å€¤ã‚‚挿入ã§ãã¾ã™ã— (``) ã€å€¤ã‚’è¿”ã™ãƒ¡ã‚½ãƒƒãƒ‰ã‚‚使用ã§ãã¾ã™ (``)。 å¼ã®å¤‰æ›ã«ã¯ã€å¤‰æ•°ã®å ´åˆã¨åŒã˜ãƒ«ãƒ¼ãƒ«ãŒé©ç”¨ã•れã¾ã™ã€‚ ã•らã«ã€å¼ã¯ 4Dã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãƒ«ãƒ¼ãƒ«ã«é©åˆã—ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +> セキュリティ上ã®ç†ç”±ã‹ã‚‰ã€[悪æ„ã‚るコードã®ä¾µå…¥ãƒ»æŒ¿å…¥](WebServer/templates.md#悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止)を防ããŸã‚ã«ã€ã‚¢ãƒ—リケーション外ã‹ã‚‰å°Žå…¥ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’処ç†ã™ã‚‹ã¨ãã«ã¯ã€ã“ã®ã‚¿ã‚°ã®ä½¿ç”¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +解釈エラーã®å ´åˆã€"` : ## エラー # エラーコード`" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒæŒ¿å…¥ã•れã¾ã™ã€‚ + +- プロセス変数を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +- ピクãƒãƒ£ãƒ¼ãƒ•ィールドã®å†…容を表示ã§ãã¾ã™ã€‚ ã—ã‹ã—ã€ãƒ”クãƒãƒ£ãƒ¼é…列ã®è¦ç´ ã‚’表示ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 +- 4Då¼ã‚’使用ã—ã¦ã€ã‚ªãƒ–ジェクトフィールドã®ä¸­èº«ã‚’表示ã•ã›ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®æ§˜ã«è¨˜è¿°ã—ã¾ã™: ``. +- 通常ã¯ãƒ†ã‚­ã‚¹ãƒˆå¤‰æ•°ã‚’使用ã—ã¾ã™ã€‚ ã—ã‹ã—ã€BLOB変数を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ã“ã®å ´åˆã€é•·ã•情報ãªã—ã®ãƒ†ã‚­ã‚¹ãƒˆBLOBを使用ã—ã¾ã™ã€‚ + + + + + + +## 4dtext, 4dhtml, 4deval ã®ä»£æ›¿ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ + +ã„ãã¤ã‹ã®æ—¢å­˜ã® 4D変æ›ã‚¿ã‚°ã¯ã€$-ベースã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ã¦è¡¨ç¾ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +#### $4dtag (expression) +ã¨ã„ã†è¡¨è¨˜ã‚’次ã®ä»£ã‚りã«ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: +#### `` + +ã“ã®ä»£æ›¿ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã¯ã€å‡¦ç†å¾Œã®å€¤ã‚’è¿”ã™ã‚¿ã‚°ã«ãŠã„ã¦ã®ã¿ä½¿ç”¨å¯èƒ½ã§ã™: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(ãã®ä»–ã®ã‚¿ã‚°ã€ãŸã¨ãˆã° 4DIF ã‚„ 4DSCRIPT ãªã©ã§ã¯ã€é€šå¸¸ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使用ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“)。 + +ãŸã¨ãˆã°: + +```html +$4DEVAL(UserName) +``` + +ã¯æ¬¡ã®ä»£ã‚りã«ãªã‚Šã¾ã™: + +```html + +``` + +ã“ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã®ä¸»ãªåˆ©ç‚¹ã¯ã€XML準拠ã®ãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆãŒæ›¸ã‘ã‚‹ã“ã¨ã§ã™ã€‚ 一部㮠4Dデベロッパーã¯ã€XML準拠ã®ãƒ†ãƒ³ãƒ—レートを標準㮠XMLパーサーツールã§ä½œæˆãƒ»è©•価ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ "<" 文字㯠XML属性値ã¨ã—ã¦ã¯ç„¡åйãªãŸã‚ã€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’破らãšã«4Dã‚¿ã‚°ã® "``" シンタックスを使用ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ ãã®ä¸€æ–¹ã§ã€"<" 文字をエスケープã—ã¦ã—ã¾ã†ã¨ã€4DãŒã‚¿ã‚°ã‚’正常ã«è§£é‡ˆã§ããªããªã£ã¦ã—ã¾ã„ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã¯å±žæ€§å€¤ã®æœ€åˆã® "<" 文字ã®ãŸã‚ã« XMLパースエラーを引ãèµ·ã“ã—ã¾ã™: + +```xml + +``` + +$シンタックスを使用ã™ã‚‹ã¨ã€ãƒ‘ーサーã«ã‚ˆã£ã¦ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ãŒè©•価ã•れã¾ã™: + +```xml + +``` + +ã“ã“ã§ã€`$4dtag` 㨠`<--#4dtag-->` ã¯å޳坆ã«ã¯åŒã˜ã§ã¯ãªã„ã¨ã„ã†ç‚¹ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚`<--#4dtag-->` ã¨ã¯ç•°ãªã‚Šã€`$4dtag` 㯠4Dã‚¿ã‚°ã‚’ [繰り返ã—解釈](#å†èµ·çš„処ç†) ã™ã‚‹ã“ã¨ã¯ã‚りã¾ã›ã‚“。 `$` ã‚¿ã‚°ã¯å¸¸ã«ä¸€åº¦ã ã‘解釈ã•れã€ãã®çµæžœã¯æ¨™æº–テキストã¨ã—ã¦èª­ã¾ã‚Œã¾ã™ã€‚ + +ã“ã®é•ã„ã®ç†ç”±ã¯ã€æ‚ªæ„ã‚るコードã®ä¾µå…¥ã‚’防ããŸã‚ã«ã‚りã¾ã™ã€‚ [悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止](WebServer/templates.md#悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止) ã®ç« ã§èª¬æ˜Žã•れã¦ã„るよã†ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ†ã‚­ã‚¹ãƒˆã‚’使用ã™ã‚‹å ´åˆã«ä¸è¦ãªã‚¿ã‚°ã®å†è§£é‡ˆã‚’é¿ã‘ã‚‹ã«ã¯ã€`4DHTML` ã‚¿ã‚°ã§ã¯ãªã `4DTEXT` ã‚¿ã‚°ã®ä½¿ç”¨ãŒå¼·ã推奨ã•れã¾ã™ã€‚`4DTEXT` を使用ã—ãŸå ´åˆã€"<" ãªã©ã®ç‰¹æ®Šè¨˜å·ã¯ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã•れるãŸã‚ã€`` シンタックスを使用ã—ã¦ã„ã‚‹ 4Dã‚¿ã‚°ã¯ã™ã¹ã¦å…ƒã®æ„味を失ã„ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€`4DTEXT` 㯠`$` 記å·ã‚’エスケープã—ãªã„ãŸã‚ã€æ‚ªæ„ã‚るコードã®ä¾µå…¥ã‚’防ããŸã‚ã« `$4dtag (expression)` シンタックスã«ãŠã‘ã‚‹å†å¸°çš„処ç†ã¯ã‚µãƒãƒ¼ãƒˆã—ãªã„ã“ã¨ã«ãªã‚Šã¾ã—ãŸã€‚ + +以下ã®ä¾‹ã§ã¯ã€ä½¿ç”¨ã•れるシンタックスã¨ã‚¿ã‚°ã«ã‚ˆã‚‹å‡¦ç†ã®çµæžœã®é•ã„を表ã—ã¦ã„ã¾ã™: + +```4d + // 例 1 + myName:="" // 悪æ„ã‚るコードã®ä¾µå…¥ + input:="My name is: " + PROCESS 4D TAGS(input;output) + // 4D ã¯çµ‚了ã—ã¦ã„ã¾ã„ã¾ã™ +``` +```4d + // 例 2 + myName:="" // 悪æ„ã‚るコードã®ä¾µå…¥ + input:="My name is: " + PROCESS 4D TAGS(input;output) + // çµæžœã¯ "My name is: " +``` +```4d + // 例 3 + myName:="$4DEVAL(QUIT 4D)" // 悪æ„ã‚るコードã®ä¾µå…¥ + input:="My name is: " + PROCESS 4D TAGS(input;output) + // çµæžœã¯ "My name is: $4DEVAL(QUIT 4D)" +``` + +`$4dtag` シンタックスã¯ã€å¼•用符や括弧ã®é–‹é–‰ãƒšã‚¢ã‚’サãƒãƒ¼ãƒˆã—ã¦ã„ã‚‹ã¨ã„ã†ç‚¹ã«æ³¨æ„ã—ã¦ãã ã•ã„。 ãŸã¨ãˆã°ã€ä»¥ä¸‹ã® (éžç¾å®Ÿçš„ãª) 文字列を評価ã—ãªã‘れã°ãªã‚‰ãªã„å ´åˆ: + +``` +String(1) + "\"(hello)\"" +``` + +以下ã®ã‚ˆã†ã«æ›¸ãã“ã¨ãŒã§ãã¾ã™: + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + --> çµæžœã¯: 1"(hello)" +``` + + diff --git a/website/translated_docs/ja/Users/handling_users_groups.md b/website/translated_docs/ja/Users/handling_users_groups.md index 5300d323e1018c..c7070f3c0340d1 100644 --- a/website/translated_docs/ja/Users/handling_users_groups.md +++ b/website/translated_docs/ja/Users/handling_users_groups.md @@ -1,151 +1,156 @@ --- 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: -- 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. +## デザイナーã¨ç®¡ç†è€… -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. +最も強力ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ **デザイナー (Designer)** ã§ã™ã€‚ デザイナーã¯ã€ã‚¢ãƒ—リケーションã«é–¢ã™ã‚‹ã‚らゆるæ“作をãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã¯æ¬¡ã®ã“ã¨ãŒã§ãã¾ã™: +- 制é™ãªãã€ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションサーãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã€‚ +- ユーザーやグループを作æˆã™ã‚‹ã€‚ +- グループã«ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’割り当ã¦ã‚‹ã€‚ +- デザインモードを使用ã™ã‚‹ã€‚ シングルユーザー環境ã§ã¯ã€å¸¸ã«ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒä½¿ç”¨ã•れã¾ã™ã€‚ クライアント/サーãƒãƒ¼ç’°å¢ƒã«ãŠã„ã¦ã¯ã€ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã«ãƒ‘スワードを割り当ã¦ã‚‹ã“ã¨ã§ã€4DユーザーログインダイアログãŒè¡¨ç¤ºã•れるよã†ã«ãªã‚Šã¾ã™ã€‚ ã“ã®ç’°å¢ƒã§ã¯ã€ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ã¯èª­ã¿å–り専用ã§ã™ã€‚ -The Administrator can: +ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã®æ¬¡ã«å¼·åŠ›ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ **管ç†è€… (Administrator)**ã§ã‚りã€é€šå¸¸ã¯ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ã‚¢ã‚¯ã‚»ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã‚„ç®¡ç†æ©Ÿèƒ½ã‚’扱ã†å½¹å‰²ã‚’与ãˆã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +管ç†è€…ã¯æ¬¡ã®ã“ã¨ãŒã§ãã¾ã™: +- ユーザーやグループを作æˆã™ã‚‹ã€‚ +- 4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã¨ãƒ¢ãƒ‹ã‚¿ãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã€‚ +- ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã€å¾©å…ƒã€ã‚µãƒ¼ãƒãƒ¼ã®ç›£è¦–ã®ãŸã‚ã€MSC ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã€‚ -The Administrator cannot: +管ç†è€…ã¯æ¬¡ã®ã“ã¨ãŒã§ãã¾ã›ã‚“: +- デザイナーユーザーを編集ã™ã‚‹ã€‚ +- アプリケーションã®ä¿è­·ã•れãŸé ˜åŸŸã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã€‚ ã¨ãã«ãƒ‡ã‚¶ã‚¤ãƒ³ãƒ¢ãƒ¼ãƒ‰ãŒåˆ¶é™ã•れã¦ã„ã‚‹å ´åˆã«ã¯ã€ç®¡ç†è€…ã¯ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 管ç†è€…ãŒã‚¢ãƒ—リケーション内ã§ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’å¾—ã‚‹ã«ã¯ã€1ã¤ä»¥ä¸Šã®ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 管ç†è€…ã¯ã™ã¹ã¦ã®æ–°è¦ã‚°ãƒ«ãƒ¼ãƒ—ã«å«ã¾ã‚Œã¾ã™ãŒã€ä»»æ„ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰ç®¡ç†è€…ã®åå‰ã‚’å–り除ãã“ã¨ãŒã§ãã¾ã™ã€‚ -- 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. +デザイナーã¨ç®¡ç†è€…ã¯ã€ã™ã¹ã¦ã®ã‚¢ãƒ—リケーションã«ãŠã„ã¦ãƒ‡ãƒ•ォルトã§åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ [ユーザー管ç†ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹](#ユーザーエディター)ã«ãŠã„ã¦ã€ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã¨ç®¡ç†è€…ã®ã‚¢ã‚¤ã‚³ãƒ³ã¯ã€ãれãžã‚Œèµ¤è‰²ã¨ç·‘色ã§è¡¨ç¤ºã•れã¾ã™: -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: +- デザイナーアイコン: ![](assets/en/Users/iconDesigner.png) +- 管ç†è€…アイコン: ![](assets/en/Users/iconAdmin.png) -- Designer icon: ![](assets/en/Users/IconDesigner.png) -- Administrator icon: ![](assets/en/Users/IconAdmin.png) +デザイナーã¨ç®¡ç†è€…ã®åå‰ã¯å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ランゲージã«ãŠã„ã¦ã€ãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã¨ç®¡ç†è€…ã® ID値ã¯ã€å¸¸ã« 1 㨠2 ã«è¨­å®šã•れã¾ã™ã€‚ -You can rename the Designer and Administrator users. In the language, the Designer ID is always 1 and the Administrator ID is always 2. +デザイナーã¨ç®¡ç†è€…ã¯ã€ãれãžã‚Œ 16,000 ã®ã‚°ãƒ«ãƒ¼ãƒ—㨠16,000 ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +1. **デザイン** メニューã‹ã‚‰ **ツールボックス>ユーザー** ã‚’é¸æŠžã€ã¾ãŸã¯ 4Dツールãƒãƒ¼ã® **ツールボックス** ボタンをクリックã—ã¾ã™ã€‚ 4Dã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’表示ã—ã¾ã™ã€‚ -To add a user from the Toolbox : +ユーザーリストã«ã¯ã€[デザイナーã¨ç®¡ç†è€…](#デザイナーã¨ç®¡ç†è€…) ã‚’å«ã‚€ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè¡¨ç¤ºã•れã¾ã™: -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. +2. ユーザーリストã®ä¸‹ã«ã‚る追加ボタン ![](assets/en/Users/PlussNew.png) をクリックã—ã¾ã™ã€‚ ã¾ãŸã¯
          ユーザーリスト上ã§å³ã‚¯ãƒªãƒƒã‚¯ã—ã€ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‹ã‚‰ **追加** ã¾ãŸã¯ **複製** ã‚’é¸æŠžã™ã‚‹ã€‚ -The list of users displays all the users, including the [Designer and the Administrator](#designer-and-administrator). +> **複製** コマンドを使用ã™ã‚‹ã¨ã€åŒã˜ç‰¹æ€§ã‚’æŒã¤è¤‡æ•°ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ç´ æ—©ã作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -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. +4D ã¯æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’リストã«è¿½åŠ ã—ã€ãƒ‡ãƒ•ォルトã¨ã—㦠"æ–°è¦ãƒ¦ãƒ¼ã‚¶ãƒ¼X" ã¨ã„ã†åå‰ã‚’設定ã—ã¾ã™ã€‚ -> The **Duplicate** command can be used to create several users having the same characteristics quickly. +3. æ–°ã—ã„ユーザーåを入力ã—ã¾ã™ã€‚ ã“ã®åå‰ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚¢ãƒ—リケーションを開ãéš›ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ユーザーåã‚’ã„ã¤ã§ã‚‚変更ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚変更ã™ã‚‹ã«ã¯ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆãƒ¡ãƒ‹ãƒ¥ãƒ¼ã® **å称変更** コマンドを使用ã™ã‚‹ã‹ã€Alt+クリック (Windows) ã¾ãŸã¯ Option+クリック (macOS) ショートカットを使用ã€ã¾ãŸã¯å¤‰æ›´ã—ãŸã„åå‰ã‚’ 2回クリックã—ã¾ã™ã€‚ -4D adds a new user to the list, named "New userX" by default. +4. ユーザーã®ãƒ‘スワードを設定ã™ã‚‹ã«ã¯ã€ãƒ—ロパティエリア㧠**編集...** ボタンをクリックã—ã¦ã€ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® 2ã¤ã®ãƒ‘スワード欄ã«åŒã˜ãƒ‘スワードをãれãžã‚Œå…¥åŠ›ã—ã¾ã™ã€‚ パスワードã«ã¯ 15æ¡ã¾ã§ã®è‹±æ•°å­—を使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ パスワードã§ã¯æ–‡å­—ã®å¤§å°ãŒåŒºåˆ¥ã•れã¾ã™ã€‚ -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. +> ストラクãƒãƒ£ãƒ¼è¨­å®šã® "セキュリティ" ページã§è¨±å¯ã•れã¦ã„れã°ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯è‡ªåˆ†ã®ãƒ‘スワードを変更ã§ãã¾ã™ã€‚ã¾ãŸã€ãƒ‘スワード㯠`CHANGE PASSWORD` コマンドを使ã£ã¦å¤‰æ›´ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ -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. +5. グループメンãƒãƒ¼è¡¨ã‚’用ã„ã¦ã€ãã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ‰€å±žã™ã‚‹ã‚°ãƒ«ãƒ¼ãƒ—を設定ã—ã¾ã™ã€‚ メンãƒãƒ¼ã‚«ãƒ©ãƒ ã®è©²å½“ã™ã‚‹ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã—ã¦ã€é¸æŠžã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’グループã«å¯¾ã—ã¦è¿½åŠ ãƒ»å‰Šé™¤ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> 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. 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. +プラグインã¸ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’割り当ã¦ã‚‹ã¨ã€æ‰€æœ‰ã™ã‚‹ãƒ—ラグインライセンスã®ä½¿ç”¨ã‚’管ç†ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ プラグインã®ã‚¢ã‚¯ã‚»ã‚¹ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã•ãªã„ユーザーã¯ã€ãã®ãƒ—ラグインをロードã™ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“。 -> Used licenses remain attached to 4D user accounts in the group for the whole 4D session. +> 使用ã•れãŸãƒ©ã‚¤ã‚»ãƒ³ã‚¹ã¯ 4Dセッションã®é–“ã€å½“è©²ã‚°ãƒ«ãƒ¼ãƒ—ã«æ‰€å±žã™ã‚‹ 4Dユーザーアカウントã«ç´ã¥ã‘られã¾ã™ã€‚ -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 8bf7f4f49d4432..6579d2dbf9c1bc 100644 --- a/website/translated_docs/ja/Users/overview.md +++ b/website/translated_docs/ja/Users/overview.md @@ -3,57 +3,70 @@ 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 を求ã‚られã¾ã›ã‚“)。 ã¤ã¾ã‚Šã€ã‚¢ãƒ—リケーションã®ã‚らゆる部分を開ãã“ã¨ãŒã§ãã¾ã™ã€‚ + +デザイナーã«ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ãŒæŒ‡å®šã•れるã¨ã€ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ãŒæœ‰åйã«ãªã‚Šã¾ã™ã€‚ リモートユーザーãŒã‚¢ãƒ—リケーションを開ãã«ã¯ã€ãƒ‘スワードを入力ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 -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. -## Users and groups in project architecture +## プロジェクトアーキテクãƒãƒ£ãƒ¼ã«ãŠã‘るユーザー&グループ + +プロジェクトアプリケーション (.4DProject ãŠã‚ˆã³ .4dz ファイル) ã§ã¯ã€ã‚·ãƒ³ã‚°ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŠã‚ˆã³ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚µãƒ¼ãƒãƒ¼ç’°å¢ƒã®ä¸¡æ–¹ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã‚°ãƒ«ãƒ¼ãƒ—を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã ã—ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã¯ 4D Server ã§ã®ã¿æœ‰åйã§ã™ã€‚ 次ã®è¡¨ã¯ã€ä¸»ãªãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã®æ©Ÿèƒ½ã¨ã€ãれらãŒåˆ©ç”¨ã‹ã©ã†ã‹ã‚’一覧ã«ç¤ºã—ã¾ã™: + +| | 4D (シングルユーザー) | 4D Server | +| ---------------------------- | -------------------- | --------- | +| ユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—ã®è¿½åŠ /編集 | â—¯ | â—¯ | +| ユーザー/グループã«ã‚µãƒ¼ãƒãƒ¼ã‚¢ã‚¯ã‚»ã‚¹ã‚’割り振る | â—¯ | â—¯ | +| ユーザーèªè¨¼ | × (ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã§ã™) | â—¯ | +| デザイナーã¸ã®ãƒ‘スワード設定ã«ã‚ˆã‚‹ã‚¢ã‚¯ã‚»ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã®èµ·å‹• | × (ã™ã¹ã¦ã®ã‚¢ã‚¯ã‚»ã‚¹ãŒãƒ‡ã‚¶ã‚¤ãƒŠãƒ¼ã§ã™) | â—¯ | + -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. The whole users and groups configuration can also be edited during application execution using 4D language commands of the [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.en.html) theme. +> ランタイムã«ãŠã„ã¦ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’表示ã•ã›ã‚‹ã«ã¯ [EDIT ACCESS](https://doc.4d.com/4Dv18/4D/18/EDIT-ACCESS.301-4504687.ja.html) コマンドを使用ã—ã¾ã™ã€‚ ユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—ã®è¨­å®šã¯ã€ã‚¢ãƒ—リケーション実行中ã§ã‚‚ [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.ja.html) テーマ㮠4Dランゲージコマンドを使ã£ã¦ç·¨é›†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + + + +## Directory.json ファイル -## Directory.json file +ユーザーã€ã‚°ãƒ«ãƒ¼ãƒ—ã€ãŠã‚ˆã³ãれらã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã¯ã€**directory.json** ã¨ã„ã†åç§°ã®å°‚用ã®ãƒ—ロジェクトファイルã«ä¿å­˜ã•れã¾ã™ã€‚ -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +ã“ã®ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã¯æ¬¡ã®å ´æ‰€ã«ä¿å­˜ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -This file can be stored at the following locations: +- ユーザー設定フォルダー (ã¤ã¾ã‚Š "Project" フォルダーã¨åŒéšŽå±¤ã«ã‚ã‚‹ "Settings" フォルダー) 内。 ã“れらã®è¨­å®šã¯ã‚¢ãƒ—リケーションã«ã‚ˆã‚Šãƒ‡ãƒ•ォルトã§ä½¿ç”¨ã•れã¾ã™ã€‚ +- データ設定フォルダー (ã¤ã¾ã‚Š "Data" フォルダーã®ä¸­ã® "Settings" フォルダー) 内。 **directory.json** ファイルãŒã“ã®å ´æ‰€ã«ä¿å­˜ã•れã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼è¨­å®šãƒ•ォルダーã®ãƒ•ァイルよりも優先ã•れã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã«ã‚ˆã‚Šã€ã‚«ã‚¹ã‚¿ãƒ /ローカルãªãƒ¦ãƒ¼ã‚¶ãƒ¼ï¼†ã‚°ãƒ«ãƒ¼ãƒ—設定を定義ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ アプリケーションをアップグレードã—ã¦ã‚‚ã€ã‚«ã‚¹ã‚¿ãƒ è¨­å®šã¯ãã®ã¾ã¾ã§ã™ã€‚ -- 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. +> ユーザーã¨ã‚°ãƒ«ãƒ¼ãƒ—ã®ç®¡ç†ãŒæœ‰åŠ¹åŒ–ã•れã¦ã„ãªã„å ´åˆã€**directory.json** ファイルã¯ç”Ÿæˆã•れã¾ã›ã‚“。 -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file diff --git a/website/translated_docs/ja/WebServer/allowProject.md b/website/translated_docs/ja/WebServer/allowProject.md new file mode 100644 index 00000000000000..4e6ce9203de727 --- /dev/null +++ b/website/translated_docs/ja/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: プロジェクトメソッドã®è¨±å¯ +--- + + +`4DEVAL`, `4DTEXT`, `4DHTML` ãªã©ã® 4Dã‚¿ã‚°ã‚„ [`/4DACTION URL`](httpRequests.md#/4daction) を使用ã™ã‚‹ã¨ã€Webã«å…¬é–‹ã•れ㟠4Dプロジェクトã®ã‚らゆるプロジェクトメソッドãŒå®Ÿè¡Œã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆ *http://www.server.com/4DACTION/login* 㯠***login*** プロジェクトメソッドを (存在ã™ã‚Œã°) 実行ã—ã¾ã™ã€‚ + +ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯å…·ä½“çš„ã«ã¯ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆä¸Šã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒæ•…æ„ã« (ã‚ã‚‹ã„ã¯äºˆæœŸã›ãš) Web用ã§ãªã„メソッドを実行ã—ã¦ã—ã¾ã†ã¨ã„ã†ã‚ˆã†ãªã€ã‚¢ãƒ—リケーションã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã‚’è„…ã‹ã™ãƒªã‚¹ã‚¯ã‚’ã‚‚ãŸã‚‰ã—ã¾ã™ã€‚ ã“ã®ãƒªã‚¹ã‚¯ã¯ä»¥ä¸‹ã® 3ã¤ã®æ–¹æ³•ã§å›žé¿ã§ãã¾ã™: + +* [`On Web Authentication`](authentication.md#on-web-authentication) データベースメソッドを使用ã—㦠URL ã‹ã‚‰å‘¼ã³å‡ºã•れるメソッドをフィルターã™ã‚‹ã€‚ 欠点: データベースã«å¤šãã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã€ã“ã®æ–¹æ³•ã¯ç®¡ç†ãŒå›°é›£ã«ãªã‚Šã¾ã™ã€‚ + +* **公開オプション: 4Dã‚¿ã‚°ã¨URL (4DACTION...)** (メソッドプロパティ) を使用ã™ã‚‹: + +![](assets/en/WebServer/methodProperties.png) + +ã“ã®ã‚ªãƒ—ションを使用ã—ã¦ãƒ—ロジェクトメソッドã”ã¨ã«ã€ç‰¹åˆ¥ãª URL `4DACTION` ã‚„ `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF`, `4DLOOP` ãªã©ã® 4Dタグを使用ã—ãŸå‘¼ã³å‡ºã—を許å¯ã™ã‚‹ã‹ã—ãªã„ã‹ã‚’設定ã§ãã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã€ãã®ãƒ—ロジェクトメソッド㯠HTTPリクエストã‹ã‚‰ç›´æŽ¥å®Ÿè¡Œã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 ä»–æ–¹ã€ä»–ã®ã‚¿ã‚¤ãƒ—ã®å‘¼ã³å‡ºã— (フォーミュラや他ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‹ã‚‰ã®å‘¼ã³å‡ºã—ãªã©) ã§ã¯ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’実行ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ォルトã§ãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã¾ã›ã‚“。 `4DACTION` ã‚„ã‚¿ã‚°ãªã©ã‚’使用ã—ã¦å‘¼ã³å‡ºã™ã“ã¨ã®ã§ãるメソッドã¯ã€æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã“ã®ãƒ—ãƒ­ãƒ‘ãƒ†ã‚£ãŒæŒ‡å®šã•れãŸãƒ—ロジェクトメソッドã¯ã€ã‚¨ã‚¯ã‚¹ãƒ—ローラーã§ä»¥ä¸‹ã®ã‚¢ã‚¤ã‚³ãƒ³ãŒè¡¨ç¤ºã•れã¾ã™: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/website/translated_docs/ja/WebServer/authentication.md b/website/translated_docs/ja/WebServer/authentication.md new file mode 100644 index 00000000000000..3edf16b2b2457d --- /dev/null +++ b/website/translated_docs/ja/WebServer/authentication.md @@ -0,0 +1,199 @@ +--- +id: authentication +title: èªè¨¼ +--- + +Webユーザーã«ç‰¹å®šã®ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’与ãˆã‚‹ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’èªè¨¼ã™ã‚‹ã“ã¨ãŒå¿…è¦ã§ã™ã€‚ èªè¨¼ã¨ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®è³‡æ ¼æƒ…å ± (通常ã¯åå‰ã¨ãƒ‘スワード) ã‚’å–得・処ç†ã™ã‚‹æ–¹æ³•ã®ã“ã¨ã§ã™ã€‚ + + +## èªè¨¼ãƒ¢ãƒ¼ãƒ‰ + +4D Webサーãƒãƒ¼ã§ã¯ã€3ã¤ã®èªè¨¼ãƒ¢ãƒ¼ãƒ‰ãŒç”¨æ„ã•れã¦ãŠã‚Šã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® **Web**/**オプション (I)** ページã§é¸æŠžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +![](assets/en/WebServer/authentication.png) + +> **カスタムã®èªè¨¼** を使用ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¦ã„ã¾ã™ã€‚ + +### æ¦‚è¦ + +4D Webサーãƒãƒ¼ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚·ã‚¹ãƒ†ãƒ ã®å‡¦ç†ã‚’以下ã«å›³ç¤ºã—ã¾ã™: + +![](assets/en/WebServer/serverAccess.png) + +> `rest/` ã§å§‹ã¾ã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€[RESTサーãƒãƒ¼](REST/configuration.md) ãŒç›´æŽ¥å‡¦ç†ã—ã¾ã™ã€‚ + + +### カスタムã®èªè¨¼ (デフォルト) + +ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§ã¯åŸºæœ¬çš„ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’èªè¨¼ã™ã‚‹æ–¹æ³•ã¯é–‹ç™ºè€…ã«å§”ã­ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ 4Dã¯ã€[èªè¨¼ã‚’å¿…è¦ã¨ã™ã‚‹](#データベースメソッドã®å‘¼ã³å‡ºã—) HTTPリクエストã®ã¿ã‚’評価ã—ã¾ã™ã€‚ + +ã“ã®èªè¨¼ãƒ¢ãƒ¼ãƒ‰ã¯æœ€ã‚‚柔軟性ãŒé«˜ãã€ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã§ã™: + +- ユーザーèªè¨¼ã‚’サードパーティ・アプリケーション (例: ソーシャルãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã€SSO) ã«å§”ã­ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- 顧客データベースã«ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã§ãるよã†ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェース (Webフォームãªã©) ã‚’æä¾›ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚登録後ã¯ã€ä»»æ„ã®ã‚«ã‚¹ã‚¿ãƒ ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã§ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’èªè¨¼ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ ("ユーザーセッション" ã®ç« ã® [例題](sessions.md#例題) ã‚’å‚ç…§ãã ã•ã„)。 é‡è¦ãªã®ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ãªã‚³ãƒ¼ãƒ‰ã‚’使ã£ã¦ã€æ±ºã—ã¦ãƒ‘スワードを平文ã§ä¿å­˜ã—ãªã„ã“ã¨ã§ã™: + +```4d +//... ユーザーアカウントã®ä½œæˆ +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +"ã¯ã˜ã‚ã«" ã®ç« ã® [例題](gettingStarted.md#ユーザーèªè¨¼) ã‚‚å‚ç…§ãã ã•ã„。 + +カスタムèªè¨¼ãŒæä¾›ã•れã¦ã„ãªã„å ´åˆã€4D 㯠[`On Web Authentication`](#on-web-authentication) データベースメソッドを呼ã³å‡ºã—ã¾ã™ (ã‚れã°)。 $1 㨠$2 ã«åŠ ãˆã¦ã€ãƒ–ラウザーã¨ã‚µãƒ¼ãƒãƒ¼ã® IPアドレス ($3 ã¨$ 4) ã®ã¿ãŒæä¾›ã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワード ($5 㨠$6) ã¯ç©ºã§ã™ã€‚ ユーザーèªè¨¼ãŒæˆåŠŸã—ãŸå ´åˆã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ $0 ã« **True** ã‚’è¿”ã•ãªã‘れã°ãªã‚Šã¾ã›ã‚“。ã“ã®å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れãŸãƒªã‚½ãƒ¼ã‚¹ãŒæä¾›ã•れã¾ã™ã€‚èªè¨¼ãŒå¤±æ•—ã—ãŸå ´åˆã«ã¯ã€$0 ã« **False** ã‚’è¿”ã—ã¾ã™ã€‚ + +> **警告:** `On Web Authentication` データベースメソッドãŒå­˜åœ¨ã—ãªã„å ´åˆã€æŽ¥ç¶šã¯è‡ªå‹•çš„ã«å—ã‘入れられã¾ã™ (テストモード)。 + + +### BASICèªè¨¼ + +ユーザーãŒã‚µãƒ¼ãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ã¨ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ãŒãƒ–ラウザー上ã«è¡¨ç¤ºã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードã®å…¥åŠ›ã‚’æ±‚ã‚られã¾ã™ã€‚ + +> ユーザーãŒå…¥åŠ›ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ã¯æš—å·åŒ–ã•れãšã«ã€HTTPリクエストヘッダーã«å«ã‚られã¦é€ä¿¡ã•れã¾ã™ã€‚ ã“ã®ãƒ¢ãƒ¼ãƒ‰ã§æ©Ÿå¯†æ€§ã‚’確ä¿ã™ã‚‹ã«ã¯é€šå¸¸ã€HTTPSã‚’å¿…è¦ã¨ã—ã¾ã™ã€‚ + +入力ã•れãŸå€¤ã¯æ¬¡ã®ã‚ˆã†ã«è©•価ã•れã¾ã™: + +- **4Dパスワードをå«ã‚€** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®èªè¨¼æƒ…å ±ã¯ã¾ãšã€[内部㮠4Dユーザーテーブル](Users/overview.md) ã«å¯¾ã—ã¦è©•価ã•れã¾ã™ã€‚ + - ブラウザーã‹ã‚‰é€ä¿¡ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å㌠4D ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã—ã€ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ãŒæ­£ã—ã„å ´åˆã€æŽ¥ç¶šã¯å—ã‘入れられã¾ã™ã€‚ ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ãŒæ­£ã—ããªã‘ã‚Œã°æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ + - ユーザーå㌠4D ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ†ãƒ¼ãƒ–ルã«å­˜åœ¨ã—ãªã„å ´åˆã€[`On Web Authentication`](#on-web-authentication) データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ `On Web Authentication` データベースメソッドãŒå­˜åœ¨ã—ãªã„å ´åˆã€æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ + +- **4Dパスワードをå«ã‚€** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®èªè¨¼æƒ…å ±ã¯ã€ãã®ä»–ã®æŽ¥ç¶šæƒ…å ± (IPアドレスã€ãƒãƒ¼ãƒˆã€URL ãªã©) ã¨ã¨ã‚‚ã« [`On Web Authentication`](#on-web-authentication) データベースメソッドã«å—ã‘æ¸¡ã•れã¾ã™ã€‚ `On Web Authentication` データベースメソッドãŒå­˜åœ¨ã—ãªã„å ´åˆã€æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ +> 4Dクライアント㮠Webサーãƒãƒ¼ã§ã¯ã€ã™ã¹ã¦ã® 4DクライアントマシンãŒåŒã˜ãƒ¦ãƒ¼ã‚¶ãƒ¼ãƒ†ãƒ¼ãƒ–ルを共有ã™ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ ユーザーå/ãƒ‘ã‚¹ãƒ¯ãƒ¼ãƒ‰ã®æ¤œè¨¼ã¯ 4D Serverアプリケーションã§ãŠã“ãªã‚れã¾ã™ã€‚ + +### DIGESTèªè¨¼ + +DIGESTモードã¯ã‚ˆã‚Šé«˜ã„セキュリティレベルをæä¾›ã—ã¾ã™ã€‚èªè¨¼æƒ…å ±ã¯å¾©å·ãŒå›°é›£ãªä¸€æ–¹å‘ãƒãƒƒã‚·ãƒ¥ã‚’使用ã—ã¦å‡¦ç†ã•れã¾ã™ã€‚ + +BASICモードã¨åŒæ§˜ã«ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æŽ¥ç¶šæ™‚ã«è‡ªåˆ†ã®åå‰ã¨ãƒ‘スワードを入力ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ãã®å¾Œã€[`On Web Authentication`](#on-web-authentication) データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ DIGESTãƒ¢ãƒ¼ãƒ‰ãŒæœ‰åŠ¹ã®æ™‚ã€$6引数 (パスワード) ã¯å¸¸ã«ç©ºã®æ–‡å­—åˆ—ãŒæ¸¡ã•れã¾ã™ã€‚ 実際ã“ã®ãƒ¢ãƒ¼ãƒ‰ã‚’使用ã™ã‚‹ã¨ãã€ã“ã®æƒ…å ±ã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‹ã‚‰ã‚¯ãƒªã‚¢ãƒ†ã‚­ã‚¹ãƒˆ (平文) ã§ã¯æ¸¡ã•れã¾ã›ã‚“。 ã“ã®å ´åˆã€æŽ¥ç¶šãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ `WEB Validate digest` コマンドを使用ã—ã¦æ¤œè¨¼ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +> ã“れらã®ãƒ‘ラメーターã®å¤‰æ›´ã‚’åæ˜ ã•ã›ã‚‹ãŸã‚ã«ã¯ã€Webサーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + + +## On Web Authentication + +`On Web Authentication` データベースメソッド㯠Webサーãƒãƒ¼ã‚¨ãƒ³ã‚¸ãƒ³ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ç®¡ç†ã‚’担当ã—ã¾ã™ã€‚ 4D ã¾ãŸã¯ 4D Server ã¯ã€å‹•的㪠HTTPリクエストをå—ã‘å–ã‚‹ã¨ã€ã“ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ã€‚ + +### データベースメソッドã®å‘¼ã³å‡ºã— + +`On Web Authentication` データベースメソッドã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚„処ç†ãŒ 4Dコードã®å®Ÿè¡Œã‚’å¿…è¦ã¨ã™ã‚‹ã¨ã (REST呼ã³å‡ºã—を除ã) ã«è‡ªå‹•ã§å‘¼ã³å‡ºã•れã¾ã™ã€‚ ã¾ãŸã€Webサーãƒãƒ¼ãŒç„¡åйãªé™çš„URLã‚’å—ä¿¡ã—ãŸå ´åˆ (è¦æ±‚ã•れãŸé™çš„ページãŒå­˜åœ¨ã—ãªã„å ´åˆãªã©) ã«ã‚‚呼ã³å‡ºã•れã¾ã™ã€‚ + +ã¤ã¾ã‚Šã€`On Web Authentication` ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ¬¡ã®å ´åˆã«å‘¼ã³å‡ºã•れã¾ã™: + +- Webサーãƒãƒ¼ãŒã€å­˜åœ¨ã—ãªã„ãƒªã‚½ãƒ¼ã‚¹ã‚’è¦æ±‚ã™ã‚‹ URL ã‚’å—ä¿¡ã—ãŸå ´åˆ +- Webサーãƒãƒ¼ãŒ `4DACTION/`, `4DCGI/` ... ã§å§‹ã¾ã‚‹ URL ã‚’å—ä¿¡ã—ãŸå ´åˆ +- Webサーãƒãƒ¼ãŒãƒ«ãƒ¼ãƒˆã‚¢ã‚¯ã‚»ã‚¹ URL ã‚’å—ä¿¡ã—ãŸãŒã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã¾ãŸã¯ `WEB SET HOME PAGE` コマンドã§ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ãŒè¨­å®šã•れã¦ã„ãªã„ã¨ã +- Webサーãƒãƒ¼ãŒã€ã‚»ãƒŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãƒšãƒ¼ã‚¸å†…ã§ã‚³ãƒ¼ãƒ‰ã‚’実行ã™ã‚‹ã‚¿ã‚° (`4DSCRIPT`ãªã©) を処ç†ã—ãŸå ´åˆã€‚ + +次ã®å ´åˆã«ã¯ã€`On Web Authentication` データベースメソッドã¯å‘¼ã³å‡ºã•れã¾ã›ã‚“: + +- Webサーãƒãƒ¼ãŒæœ‰åйãªé™çš„ãƒšãƒ¼ã‚¸ã‚’è¦æ±‚ã™ã‚‹ URL ã‚’å—ä¿¡ã—ãŸã¨ã。 +- Webサーãƒãƒ¼ãŒ `rest/` ã§å§‹ã¾ã‚‹ URL ã‚’å—ä¿¡ã—ã€RESTサーãƒãƒ¼ãŒèµ·å‹•ã—ãŸã¨ã (ã“ã®å ´åˆã€èªè¨¼ã¯ [`On REST Authentication`データベースメソッド](REST/configuration.md#On-REST-Authentication-データベースメソッドを使用ã™ã‚‹) ã¾ãŸã¯ [ストラクãƒãƒ£ãƒ¼è¨­å®š](REST/configuration.md#ストラクãƒãƒ£ãƒ¼è¨­å®šã‚’使用ã™ã‚‹) ã«ã‚ˆã£ã¦å‡¦ç†ã•れã¾ã™)。 + + +### シンタックス + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +| 引数 | タイプ | | 説明 | +| -- | ---- |:--:| -------------------------------------------- | +| $1 | テキスト | <- | URL | +| $2 | テキスト | <- | HTTPヘッダー + HTTPボディ (32 KBã¾ã§) | +| $3 | テキスト | <- | Webクライアント (ブラウザー) ã® IPアドレス | +| $4 | テキスト | <- | サーãƒãƒ¼ã® IPアドレス | +| $5 | テキスト | <- | ユーザーå | +| $6 | テキスト | <- | パスワード | +| $0 | ブール | -> | True = リクエストã¯å—ã‘入れられã¾ã—ãŸã€False = ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒæ‹’å¦ã•れã¾ã—㟠| + +ã“れらã®å¼•数を以下ã®ã‚ˆã†ã«å®£è¨€ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +```4d +// On Web Authentication データベースメソッド + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +// メソッドã®ã‚³ãƒ¼ãƒ‰ +``` + +ã‚ã‚‹ã„ã¯ã€[åå‰ä»˜ã引数](Concepts/parameters.md#åå‰ä»˜ã引数) シンタックスを利用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d +// On Web Authentication データベースメソッド +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` +> `On Web Authentication` データベースメソッドã®ã™ã¹ã¦ã®å¼•æ•°ãŒå¿…ãšå€¤ã‚’å—ã‘å–ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 データベースメソッドãŒå—ã‘å–る情報ã¯ã€[èªè¨¼ãƒ¢ãƒ¼ãƒ‰](#authentication-mode)ã®è¨­å®šã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ + + +#### $1 - URL + +最åˆã®å¼•æ•° (`$1`) ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ Webブラウザーã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¨ãƒªã‚¢ã«å…¥åŠ›ã—ãŸURLã‹ã‚‰ãƒ›ã‚¹ãƒˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å–り除ã„ãŸã‚‚ã®ã§ã™ã€‚ + +イントラãƒãƒƒãƒˆæŽ¥ç¶šã®å ´åˆã‚’ã¿ã¦ã¿ã¾ã—ょã†ã€‚ 4D Webサーãƒãƒ¼ãƒžã‚·ãƒ³ã® IPアドレスを 123.45.67.89 ã¨ã—ã¾ã™ã€‚ 以下ã®è¡¨ã¯ Webブラウザーã«å…¥åŠ›ã•れ㟠URL ã«å¯¾ã—ã¦ã€$1 ãŒå—ã‘å–る値を示ã—ã¦ã„ã¾ã™: + +| Webブラウザーã«å…¥åŠ›ã•れãŸå€¤ | $1 ã®å€¤ | +| ------------------------------------ | ------------------------ | +| 123.45.67.89 | / | +| http://123.45.67.89 | / | +| 123.45.67.89/Customers | /Customers | +| http://123.45.67.89/Customers/Add | /Customers/Add | +| 123.45.67.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +#### $2 - HTTPリクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ + +二番目ã®å¼•æ•° (`$2`) ã¯ã€Webブラウザーã‹ã‚‰é€ä¿¡ã•れ㟠HTTPリクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ã§ã™ã€‚ ã“ã®æƒ…報㯠`On Web Authentication` データベースメソッド㫠"ãã®ã¾ã¾" 渡ã•れるã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 ãã®å†…容ã¯ã€æŽ¥ç¶šã‚’試ã¿ãŸ Webブラウザーã®ä»•様ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ + +アプリケーションã§ã“ã®æƒ…報を使用ã™ã‚‹ã«ã¯ã€é–‹ç™ºè€…ãŒãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ã‚’è§£æžã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 `WEB GET HTTP HEADER` ã‚„ `WEB GET HTTP BODY` コマンドを使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +> パフォーマンス上ã®ç†ç”±ã«ã‚ˆã‚Šã€$2 を介ã—ã¦æ¸¡ã•れるデータã®ã‚µã‚¤ã‚ºã¯ 32KB 以下ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã“れを超éŽã™ã‚‹åˆ†ã¯ã€4D HTTPサーãƒãƒ¼ã«ã‚ˆã‚Šåˆ‡ã‚Šå–られã¾ã™ã€‚ + +#### $3 - Webクライアント㮠IPアドレス + +`$3` 引数ã¯ãƒ–ラウザーマシン㮠IPアドレスをå—ã‘å–りã¾ã™ã€‚ ã“ã®æƒ…報を使用ã—ã¦ã€ã‚¤ãƒ³ãƒˆãƒ©ãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’区別ã§ãã¾ã™ã€‚ +> 4D 㯠IPv4 アドレスをã€96-bit ã®æŽ¥é ­è¾žä»˜ãã®ãƒã‚¤ãƒ–リッド型 IPv6/IPv4 フォーマットã§è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€::ffff:192.168.2.34 ã¯ã€192.168.2.34 ã¨ã„ㆠIPv4 アドレスをæ„味ã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[IPv6 ã®ã‚µãƒãƒ¼ãƒˆã«ã¤ã„ã¦](webServerConfig.md#IPv6-ã®ã‚µãƒãƒ¼ãƒˆã«ã¤ã„ã¦) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + + +#### $4 - サーãƒãƒ¼ IPアドレス + +`$4` 引数㯠Webサーãƒãƒ¼ã‚’呼ã³å‡ºã™ãŸã‚ã«ä½¿ç”¨ã•れ㟠IPアドレスをå—ã‘å–りã¾ã™ã€‚ 4D ã¯ãƒžãƒ«ãƒãƒ›ãƒ¼ãƒŸãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€è¤‡æ•°ã® IPアドレスをæŒã¤ãƒžã‚·ãƒ³ã‚’使用ã§ãã¾ã™ã€‚ 詳細㯠[設定ページ](webServerConfig.md#リクエストをå—ã‘付ã‘ã‚‹-IPアドレス) ã‚’å‚ç…§ãã ã•ã„。 + + +#### $5 㨠$6 - ユーザーåã¨ãƒ‘スワード + +`$5` 㨠`$6` 引数ã¯ã€ãƒ–ラウザーãŒè¡¨ç¤ºã™ã‚‹æ¨™æº–ã®èªè¨¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå…¥åŠ›ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードをå—ã‘å–りã¾ã™ã€‚ [BASIC](#basicèªè¨¼) ã¾ãŸã¯ [DIGEST](#digestèªè¨¼) èªè¨¼ãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€æŽ¥ç¶šã®ãŸã³ã«ã“ã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +> ブラウザーã‹ã‚‰é€ä¿¡ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å㌠4D ã«å­˜åœ¨ã™ã‚‹å ´åˆã€$6 引数 (ユーザーパスワード) ã¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã®ãŸã‚渡ã•れã¾ã›ã‚“。 + +#### $0 引数 + +`On Web Authentication` データベースメソッドã¯ãƒ–ール値を $0 ã«è¿”ã—ã¾ã™: + +* $0=True: 接続をå—ã‘入れã¾ã™ã€‚ + +* $0=False: 接続をå—ã‘入れã¾ã›ã‚“。 + +`On Web Connection` データベースメソッドã¯ã€`On Web Authentication` データベースメソッドã«ã‚ˆã‚ŠæŽ¥ç¶šãŒå—ã‘å…¥ã‚Œã‚‰ã‚ŒãŸæ™‚ã«ã®ã¿å®Ÿè¡Œã•れã¾ã™ã€‚ +> **警告**
          $0 ã«å€¤ãŒè¨­å®šã•れãªã„ã‹ã€`On Web Authentication`データベースメソッド内㧠$0 ãŒå®šç¾©ã•れã¦ã„ãªã„å ´åˆã€æŽ¥ç¶šã¯å—ã‘入れられãŸã‚‚ã®ã¨ã•れã€`On Web Connection` データベースメソッドãŒå®Ÿè¡Œã•れã¾ã™ã€‚ +> * `On Web Authentication` データベースメソッド内ã§ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェースè¦ç´ ã‚’呼ã³å‡ºã—ã¦ã¯ã„ã‘ã¾ã›ã‚“ (`ALERT`, `DIALOG` ç­‰)。メソッドã®å®Ÿè¡ŒãŒä¸­æ–­ã•ã‚Œã€æŽ¥ç¶šãŒæ‹’å¦ã•れã¦ã—ã¾ã„ã¾ã™ã€‚ 処ç†ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã‚‚åŒæ§˜ã§ã™ã€‚ + + +### 例題 + +[DIGESTèªè¨¼ãƒ¢ãƒ¼ãƒ‰](#digestèªè¨¼) ã§ã® `On Web Authentication` データベースメソッドã®ä¾‹é¡Œ: + +```4d + // On Web Authentication データベースメソッド + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // ユーザーãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // ユーザーã¯å­˜åœ¨ã—ã¾ã›ã‚“ + End if +``` diff --git a/website/translated_docs/ja/WebServer/errorPages.md b/website/translated_docs/ja/WebServer/errorPages.md new file mode 100644 index 00000000000000..95cc710c8bfe30 --- /dev/null +++ b/website/translated_docs/ja/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: カスタム HTTPエラーページ +--- + +4D Web Server を使ã£ã¦ã€ã‚µãƒ¼ãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ã«åŸºã¥ã„ã¦ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ä¿¡ã•れる HTTPエラーページをカスタマイズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ エラーページã¨ã¯ã€ä»¥ä¸‹ã®ã‚‚ã®ã‚’指ã—ã¾ã™: + +* 4 ã‹ã‚‰å§‹ã¾ã‚‹ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ (クライアントエラー)。ãŸã¨ãˆã° 404 ãªã©ã€‚ + +* 5 ã‹ã‚‰å§‹ã¾ã‚‹ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ (サーãƒãƒ¼ã‚¨ãƒ©ãƒ¼)。ãŸã¨ãˆã° 501 ãªã©ã€‚ + +HTTPエラーステータスコードã®å®Œå…¨ãªè©³ç´°ã«ã¤ã„ã¦ã¯ã€[HTTPステータスコード](https://ja.wikipedia.org/wiki/HTTP%E3%82%B9%E3%83%86%E3%83%BC%E3%82%BF%E3%82%B9%E3%82%B3%E3%83%BC%E3%83%89) (Wikipedia) ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 + + +## デフォルトページã®ç½®æ› + +デフォルト㮠4D Web Server エラーページを独自ã®ãƒšãƒ¼ã‚¸ã§ç½®ãæ›ãˆã‚‹ãŸã‚ã«ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¾ã™: + +* カスタム HTMLページをアプリケーション㮠WebFolder フォルダーã®ç¬¬1レベルã«ç½®ãã¾ã™ã€‚ + +* カスタムページを "{statusCode}.html" (例: "404.html") ã¨ã„ã†åå‰ã«ã—ã¾ã™ã€‚ + +一ã¤ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ã«ã¤ãã€ä¸€ã¤ã®ã‚¨ãƒ©ãƒ¼ãƒšãƒ¼ã‚¸ã‚’定義ã™ã‚‹ã“ã¨ãŒã§ãã‚‹ã»ã‹ã€"{number}xx.html" ã¨åå‰ã‚’ã¤ã‘ã‚‹ã“ã¨ã§è¤‡æ•°ã®ã‚¨ãƒ©ãƒ¼ã«æ±Žç”¨çš„ãªã‚¨ãƒ©ãƒ¼ãƒšãƒ¼ã‚¸ã‚’定義ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚¨ãƒ©ãƒ¼å…¨èˆ¬ã«å¯¾ã™ã‚‹ãƒšãƒ¼ã‚¸ã¨ã—ã¦ã€"4xx.html" ã¨ã„ã†ãƒ•ァイルを作æˆã§ãã¾ã™ã€‚ 4D Web Server ã¯æœ€åˆã« {statusCode}.html ã®ãƒšãƒ¼ã‚¸ã‚’探ã—ã€ãれãŒå­˜åœ¨ã—ãªã„å ´åˆã«ã¯æ±Žç”¨çš„ãªãƒšãƒ¼ã‚¸ã‚’探ã—ã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€HTTPレスãƒãƒ³ã‚¹ãŒã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã‚³ãƒ¼ãƒ‰ 404 ã‚’è¿”ã™å ´åˆ: + +1. 4D Web Server ã¯ã€ã‚¢ãƒ—リケーション㮠WebFolder フォルダー内ã«ã‚ã‚‹ "404.html" ページをé€ä¿¡ã—よã†ã¨ã—ã¾ã™ã€‚ + +2. ãれãŒè¦‹ã¤ã‹ã‚‰ãªã„å ´åˆã€4D Web Server ã¯ã‚¢ãƒ—リケーション㮠WebFolder フォルダー内ã«ã‚ã‚‹ "4xx.html" ページをé€ä¿¡ã—よã†ã¨ã—ã¾ã™ã€‚ + +3. ãれも見ã¤ã‹ã‚‰ãªã„å ´åˆã€4D Web Server ã¯ãƒ‡ãƒ•ォルトã®ã‚¨ãƒ©ãƒ¼ãƒšãƒ¼ã‚¸ã‚’使用ã—ã¾ã™ã€‚ + +## 例題 + +WebFolder フォルダーã«ã€ä»¥ä¸‹ã®ã‚ˆã†ã«ã‚«ã‚¹ã‚¿ãƒ ãƒšãƒ¼ã‚¸ã‚’定義ã—ã¦ã„ã‚‹å ´åˆ: + +![](assets/en/WebServer/errorPage.png) + +* 403ã€404 HTTPレスãƒãƒ³ã‚¹ã«å¯¾ã—ã¦ã¯ã€"403.html" ãŠã‚ˆã³ "404.html" ページãŒãれãžã‚Œè¿”ã•れã¾ã™ã€‚ + +* ä»–ã® 4xx エラーステータス (400ã€401ãªã©) ã«å¯¾ã—ã¦ã¯ã€"4xx.html" ページãŒè¿”ã•れã¾ã™ã€‚ + +* 5xx エラーステータス全般ã«å¯¾ã—ã¦ã¯"5xx.html" ページãŒè¿”ã•れã¾ã™ã€‚ + diff --git a/website/translated_docs/ja/WebServer/gettingStarted.md b/website/translated_docs/ja/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..a0fdeefe425534 --- /dev/null +++ b/website/translated_docs/ja/WebServer/gettingStarted.md @@ -0,0 +1,285 @@ +--- +id: gettingStarted +title: ã¯ã˜ã‚ã« +--- + +ã“ã®ç« ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ‡ãƒ¼ã‚¿ã‚’扱ㆠ4D Webサイトをゼロã‹ã‚‰ä½œæˆã™ã‚‹æ–¹æ³•を知りãŸã„ã€åˆå¿ƒè€…ユーザーを対象ã¨ã—ã¦ã„ã¾ã™ã€‚ ã•ã‚ã€å§‹ã‚ã¾ã—ょã†ï¼ + + +## Hello World 例題 + +ã¾ãšã¯ã€Webサーãƒãƒ¼ã‹ã‚‰ãƒ–ラウザーã«å‘ã‘㦠"Hello World" ã‚’é€ä¿¡ã™ã‚‹ã¨ã“ã‚ã‹ã‚‰å§‹ã‚ã¾ã—ょã†ã€‚ ã‚‚ã£ã¨ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€ãƒ—ロジェクトを作æˆã—㦠Webサーãƒãƒ¼ã‚’é–‹å§‹ã—ã€`On Web Connection` データベースメソッドã«ãƒ†ã‚­ã‚¹ãƒˆã‚’è¿”ã™çŸ­ã„コードを書ãã“ã¨ã§ã™ã€‚ + +### Webサーãƒãƒ¼ã®é–‹å§‹ + +4D Webサーãƒãƒ¼ã‚’é–‹å§‹ã™ã‚‹ã«ã¯: + +1. 4Dアプリケーションを起動ã—ã€æ–°è¦ãƒ—ロジェクトを作æˆã—ã¾ã™ã€‚ +2. 上部㮠**実行** メニューã‹ã‚‰ã€**Webサーãƒãƒ¼é–‹å§‹** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +ã“れã ã‘ã§ã™ã€‚ Webサーãƒãƒ¼ãŒé–‹å§‹ã—ã¾ã™ (メニュー項目㌠**Webサーãƒãƒ¼åœæ­¢** ã«å¤‰ã‚ã£ãŸã®ãŒç¢ºèªã§ãã¾ã™)。 ã“れã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã§ãるよã†ã«ãªã‚Šã¾ã—ãŸã€‚ 確èªã®ãŸã‚ã€ãƒ‡ãƒ•ォルトホームページを表示ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +### デフォルトホームページã®è¡¨ç¤º + +4D Webサーãƒãƒ¼ã¯ã€Projectフォルダーã¨åŒã˜éšŽå±¤ã«ä½œæˆã•れãŸãƒ‡ãƒ•ォルト㮠`WebFolder` ルートフォルダーã«ã€ãƒ‡ãƒ•ォルト㮠`index.html` ページを自動的ã«ä½œæˆã—ã¾ã™ã€‚ + +1. Webブラウザーを起動ã—ã€Webサーãƒãƒ¼ã® IPアドレス (4D Webサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルト httpãƒãƒ¼ãƒˆã¯ 80) ã«æŽ¥ç¶šã—ã¾ã™ã€‚ Webサーãƒãƒ¼ã¨ãƒ–ラウザーãŒåŒã˜ãƒžã‚·ãƒ³ã«ã‚ã‚‹å ´åˆã¯ã€**実行** メニューã‹ã‚‰ **Webサーãƒãƒ¼ãƒ†ã‚¹ãƒˆ** ã‚’é¸æŠžã—ã¾ã™ã€‚ + +デフォルトã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/WebServer/defaultHomePage.png) + +### Hello World ã®è¡¨ç¤º + +1. エクスプローラーを開ã„ã¦ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸€è¦§ã‚’表示ã—ã€`On Web Connection` をダブルクリックã—ã¾ã™ã€‚ + +2. 次ã®ã‚³ãƒ¼ãƒ‰ã‚’入力ã—ã¾ã™: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // 404エラーãªã© +End case +``` + +[`On Web Connection`](httpRequests.md#on-web-connection) データベースメソッドã¯ã€å—信リクエストã«å¯¾ã—ã¦å‘¼ã³å‡ºã•れã€ã‚¿ãƒ¼ã‚²ãƒƒãƒˆURLを引数ã¨ã—㦠`$1` ã«å—ã‘å–りã¾ã™ã€‚ ã“ã®éžå¸¸ã«ã‚·ãƒ³ãƒ—ルãªã‚³ãƒ¼ãƒ‰ã¯ã€ãŸã ãƒ†ã‚­ã‚¹ãƒˆã‚’ブラウザーã«é€ä¿¡ã—ã¾ã™ã€‚ + +3. ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã§æ¬¡ã® URL を入力ã—ã¾ã™: + +``` +http://localhost/hello +``` + +Webサーãƒãƒ¼ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã—ã¦æ¬¡ã‚’è¿”ã—ã¾ã™: + +![](assets/en/WebServer/hello.png) + + +## データベースã®ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ + +次ã«ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã®ãŒã€ã„ã‹ã«ç°¡å˜ã‹è¦‹ã¦ã¿ã¾ã—ょã†ã€‚ ã¾ãšã€ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã€ãã“ã«ãƒ‡ãƒ¼ã‚¿ã‚’入力ã—ã¦ã„ãã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€æ•°ä»¶ã®ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’å«ã‚€ 1ã¤ã®ãƒ†ãƒ¼ãƒ–ルをæŒã¤åŸºæœ¬çš„ãªãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’作æˆã—ã¾ã™: + +![](assets/en/WebServer/hello2.png) ![](assets/en/WebServer/hello3.png) + +### ページã¸ã®ãƒ‡ãƒ¼ã‚¿è¡¨ç¤º + +データを表示ã™ã‚‹ã‚‚ã£ã¨ã‚‚ç°¡å˜ãªæ–¹æ³•ã¯ã€ã‚¿ã‚°ã‚’å«ã‚€ [テンプレートページ](templates.md) を呼ã³å‡ºã™ã“ã¨ã§ã™ã€‚ + +1. ä»»æ„ã®ãƒ†ã‚­ã‚¹ãƒˆã‚¨ãƒ‡ã‚£ã‚¿ãƒ¼ã‚’使用ã—ã¦ã€ä»¥ä¸‹ã®è¡Œã‚’æ ¼ç´ã™ã‚‹ãƒ•ァイルを作æˆã—ã¾ã™: + +```html + + + + +
          + + + +``` + +2. ファイルåã‚’ "friends.shtml" ã¨ã—ã€ãƒ—ロジェクト㮠**WebFolder** ã«ä¿å­˜ã—ã¾ã™ã€‚ +3. ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã§æ¬¡ã® URL を入力ã—ã¾ã™: + +``` +http://localhost/friends.shtml +``` + +`.shtml` ã®ãƒšãƒ¼ã‚¸ã¯ã€Webサーãƒãƒ¼ã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«å‡¦ç†ã•れã¾ã™ã€‚ データを表示ã™ã‚‹ãƒšãƒ¼ã‚¸ãŒè¿”ã•れã¾ã™: + +![](assets/en/WebServer/hello3bis.png) + +### RESTリクエスト + +データを *表示* ã™ã‚‹ã ã‘ã§ãªãã€*使用* ã™ã‚‹ã«ã¯ã€ORDA 㨠RESTサーãƒãƒ¼ã‚’使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ [ORDAコンセプト](ORDA/overview.md) ã«ã‚ˆã‚Šã€`Friends` テーブルã¯è‡ªå‹•çš„ã«ãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ã«ãƒžãƒƒãƒ”ングã•れã€[REST](REST/gettingStarted.md) を通ã˜ã¦åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + +1. RESTサーãƒãƒ¼ã‚’使ã£ã¦ãƒ‡ãƒ¼ã‚¿ã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¾ã—ょã†: "ストラクãƒãƒ£ãƒ¼è¨­å®š" ダイアログボックス㧠"Web/RESTリソース" ãƒšãƒ¼ã‚¸ã‚’é¸æŠžã—ã€**RESTサーãƒãƒ¼ã¨ã—ã¦å…¬é–‹** オプションをãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +![](assets/en/WebServer/hello5.png) + +2. ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã§æ¬¡ã® URL を入力ã—ã¾ã™: + +``` +http://localhost/rest/$catalog +``` + +Webサーãƒãƒ¼ã¯çµæžœã‚’ JSON ã§è¿”ã—ã¾ã™: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +カタログã€ã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ã‚¹ãƒˆã‚¢ã§å…¬é–‹ã•れã¦ã„るデータクラスã¨å±žæ€§ã®ãƒªã‚¹ãƒˆãŒå–å¾—ã•れã¾ã™ã€‚ + +ä»»æ„ã®ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +3. 以下ã®URLを入力ã—ã¾ã™: + +``` +http://localhost/rest/Friends +``` + +サーãƒãƒ¼ã¯ã€Friendsデータクラスã®ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã€ã¤ã¾ã‚Šãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã—ã¾ã™: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +ã“ã®éžå¸¸ã«ã‚·ãƒ³ãƒ—ルãªä¾‹ã§ã¯ã€Webサーãƒãƒ¼ãŒ [RESTサーãƒãƒ¼](REST/gettingStarted.md) ã¨é€éŽçš„ã«é€šä¿¡ã—ã€è¦æ±‚ã•れãŸãƒ‡ãƒ¼ã‚¿ãŒå…¬é–‹ã•れã¦ã„れã°ãã‚Œã‚’è¿”ã™æ§˜å­ã‚’示ã—ã¦ã„ã¾ã™ã€‚ è¿”ã•れãŸãƒ‡ãƒ¼ã‚¿ã¯ã€Webインターフェース内㧠javascript ã‚„ html ã®ã‚³ãƒ¼ãƒ‰ã¨ç°¡å˜ã«çµã³ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ データクラスã«ãƒã‚¤ãƒ³ãƒ‰ã•れã¦ã„ã‚‹ã€æ´—ç·´ã•れ㟠Webインターフェースã®ä¾‹ã¨ã—ã¦ã€ãƒ“ルトイン㮠[Webデータエクスプローラー](Admin/dataExplorer.md) ã‚’å‚ç…§ãã ã•ã„。 + + + + +## ログインã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³ + +上ã®ä¾‹ã§ Webリクエストã¯ã€ã‚¢ãƒ—リケーションã¸ã®è‡ªç”±ãªã‚¢ã‚¯ã‚»ã‚¹ã‚’å¾—ã¦ã„ã¾ã™ã€‚ ã—ã‹ã—ã€Webアプリケーションã®ä¸–界ã§ã¯ã€ãƒ‡ãƒ¼ã‚¿ã‚¢ã‚¯ã‚»ã‚¹ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãŒæœ€å„ªå…ˆã•れã¾ã™ã€‚ 4D Webサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹éš›ã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’èªè¨¼ã—ã€ãã®ãƒŠãƒ“ゲーションを制御ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +### ユーザーテーブルã®ä½œæˆ + +4D Webサーãƒãƒ¼ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ログインã•ã›ã‚‹ã€ã‚‚ã£ã¨ã‚‚シンプルã§å®‰å…¨ãªæ–¹æ³•ã¯ã€ä»¥ä¸‹ã®ã‚·ãƒŠãƒªã‚ªã«åŸºã¥ãã¾ã™: + +- ユーザーã¯ã€å°‚用ã®éžå…¬é–‹ãƒ†ãƒ¼ãƒ–ル (例: *WebUsers*) ã«ä¿å­˜ã•れã¾ã™ã€‚ +- [æš—å·åŒ–](MSC/encrypt.md) ã™ã‚‹ã“ã¨ã‚‚å¯èƒ½ãª *WebUsers* テーブルã«ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã®ãƒ­ã‚°ã‚¤ãƒ³åã¨ãƒ‘スワードã®ãƒãƒƒã‚·ãƒ¥ãŒä¿å­˜ã•れã¦ã„ã¾ã™ã€‚ + +1. ã„ãã¤ã‹ã®ãƒ•ィールドをæŒã¤ãƒ†ãƒ¼ãƒ–ルを作æˆã—ã¾ã™ã€‚ãŸã¨ãˆã°: + +![](assets/en/WebServer/helloUsers.png) + +2. 以下ã®ã‚³ãƒ¼ãƒ‰ã‚’実行ã—ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’作æˆã—ã¾ã™: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// パスワードã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒè‡ªèº«ã§å…¥åŠ›ã—ã¾ã™ +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### ユーザーèªè¨¼ + +> 通信ãŒå®‰å…¨ã§ã‚ã‚‹ãŸã‚ã«ã¯ã€æŽ¥ç¶šã¯ [https](webServerConfig.md#HTTPSを有効ã«ã™ã‚‹) ã§ç¢ºç«‹ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +1. エクスプローラーを開ãã€"login" ã¨ã„ã†ãƒ—ロジェクトメソッドを作æˆã—ã¾ã™ã€‚ + +3. 以下ã®ã‚³ãƒ¼ãƒ‰ã‚’書ãã¾ã™: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// リクエストヘッダーã«ã¦é€ä¿¡ã•れãŸå€¤ã‚’å–å¾—ã—ã¾ã™ +WEB GET VARIABLES($anames; $avalues) + +// ヘッダーã®ãƒ­ã‚°ã‚¤ãƒ³ãƒ•ィールドを探ã—ã¾ã™ +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +// 入力ã•れãŸåå‰ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’ users ãƒ†ãƒ¼ãƒ–ãƒ«ã§æŽ¢ã—ã¾ã™ +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) // ユーザーãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ + // パスワードを確èªã—ã¾ã™ + If (Verify password hash($password; $user.password)) + // パスワードãŒOKã§ã‚れã°ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«ç™»éŒ²ã—ã¾ã™ + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + // ユーザーセッションを使ã£ã¦ä»»æ„ã®æƒ…報をä¿å­˜ã§ãã¾ã™ + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. コードエディター㮠**[i]** ボタンã§ãƒ¡ã‚½ãƒƒãƒ‰ãƒ—ロパティを表示ã—ã€`4Dã‚¿ã‚°ã¨URL(4DACTION...)` オプションã«ãƒã‚§ãƒƒã‚¯ã‚’入れ㦠**OK** をクリックã—ã¾ã™ã€‚ + +![](assets/en/WebServer/hello0.png) + + +4. ãƒ–ãƒ©ã‚¦ã‚¶ãƒ¼ã§æ¬¡ã® URL を入力ã—ã¾ã™: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> ã“ã®ã‚ˆã†ãª URL ã®ä½¿ç”¨ã¯æŽ¨å¥¨ã•れã¾ã›ã‚“ãŒã€ã“ã“ã§ã¯ä¾‹ã‚’ç°¡å˜ã«ã™ã‚‹ãŸã‚ã«ä½¿ã£ã¦ã„ã¾ã™ã€‚ よりç¾å®Ÿçš„ãªãƒ­ã‚°ã‚¤ãƒ³ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€Webフォーム㨠POSTリクエストã§å‡¦ç†ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ フォーム㮠POST ã®ä¾‹ã¯ã€[ã“ã®ãƒšãƒ¼ã‚¸](sessions.md#例題) ã‚’å‚ç…§ãã ã•ã„。 + +ã™ã‚‹ã¨ã€ãã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ãƒ­ã‚°ã‚¤ãƒ³ã•れã¾ã™: + +![](assets/en/WebServer/login1.png) + +é–“é•ã£ãŸãƒ­ã‚°ã‚¤ãƒ³æƒ…å ±ã¯æ‹’å¦ã•れã¾ã™: + +![](assets/en/WebServer/login2.png) + +ユーザーãŒãƒ­ã‚°ã‚¤ãƒ³ã™ã‚‹ã¨ã€`WEB Get Current Session ID` メソッドを使ã£ã¦ã€é–¢é€£ã™ã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’処ç†ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ [ユーザーセッション](sessions.md) ã®ãƒšãƒ¼ã‚¸ã‚’å‚ç…§ãã ã•ã„。 + diff --git a/website/translated_docs/ja/WebServer/httpRequests.md b/website/translated_docs/ja/WebServer/httpRequests.md new file mode 100644 index 00000000000000..96659ebfc1852d --- /dev/null +++ b/website/translated_docs/ja/WebServer/httpRequests.md @@ -0,0 +1,353 @@ +--- +id: httpRequests +title: HTTPリクエストã®å‡¦ç† +--- + +4D Webサーãƒãƒ¼ã¯ã€HTTPリクエストを処ç†ã™ã‚‹ãŸã‚ã®æ©Ÿèƒ½ã‚’複数備ãˆã¦ã„ã¾ã™: + +- Webアプリケーションã®ãƒ«ãƒ¼ã‚¿ãƒ¼ã¨ãªã‚‹ `On Web Connection` データベースメソッド。 +- サーãƒãƒ¼ã‚µã‚¤ãƒ‰ã‚³ãƒ¼ãƒ‰ã‚’呼ã³å‡ºã™ãŸã‚ã® `/4DACTION` URL。 +- サーãƒãƒ¼ã«é€ä¿¡ã•れ㟠HTMLオブジェクトã‹ã‚‰å€¤ã‚’å–å¾—ã™ã‚‹ `WEB GET VARIABLES`。 +- `WEB GET HTTP BODY`ã€`WEB GET HTTP HEADER`ã€`WEB GET BODY PART` ãªã©ã®ã‚³ãƒžãƒ³ãƒ‰ã«ã‚ˆã£ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå‡¦ç†ã‚’カスタマイズã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (cookie å«ã‚€)。 +- 変数を宣言ã™ã‚‹ãŸã‚ã® *COMPILER_WEB* プロジェクトメソッド。 + + +## On Web Connection + +`On Web Connection` データベースメソッドã¯ã€4D Webサーãƒãƒ¼ã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãƒã‚¤ãƒ³ãƒˆã¨ã—ã¦ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### データベースメソッドã®å‘¼ã³å‡ºã— + +`On Web Connection` データベースメソッドã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã«å­˜åœ¨ã—ãªã„ページã¸ã®ãƒ‘スをサーãƒãƒ¼ãŒ URL ã¨ã—ã¦å—ã‘å–ã£ãŸå ´åˆã«ã€è‡ªå‹•çš„ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ データベースメソッドã¯ã€URL ã¨ã¨ã‚‚ã«å‘¼ã³å‡ºã•れã¾ã™ã€‚ + +ãŸã¨ãˆã°ã€"*a/b/c*" ã¨ã„ㆠURL ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã™ãŒã€[WebFolder](webServerConfig.md#ルートフォルダー) ã® "a/b" サブフォルダー㫠"c.html" ã¨ã„ã†ãƒšãƒ¼ã‚¸ãŒå­˜åœ¨ã™ã‚‹å ´åˆã€"*a/b/c.html*" ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã—ã¾ã›ã‚“。 + +> ã“ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ã€äº‹å‰ã« [`On Web Authentication`](authentication.md#on-web-authentication) データベースメソッド (ã‚れã°) ã«å—ã‘入れられã¦ã„ã‚‹ã¹ãã§ã€Webサーãƒãƒ¼ã‚‚èµ·å‹•ã—ã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +### シンタックス + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +| 引数 | タイプ | | 説明 | +| -- | ---- |:--:| ---------------------------- | +| $1 | テキスト | <- | URL | +| $2 | テキスト | <- | HTTPヘッダー + HTTPボディ (32 KBã¾ã§) | +| $3 | テキスト | <- | Webクライアント (ブラウザー) ã® IPアドレス | +| $4 | テキスト | <- | サーãƒãƒ¼ã® IPアドレス | +| $5 | テキスト | <- | ユーザーå | +| $6 | テキスト | <- | パスワード | + + +ã“れらã®å¼•数を以下ã®ã‚ˆã†ã«å®£è¨€ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +```4d +// On Web Connection データベースメソッド + + C_TEXT($1;$2;$3;$4;$5;$6) + +// メソッドã®ã‚³ãƒ¼ãƒ‰ +``` + +ã‚ã‚‹ã„ã¯ã€[åå‰ä»˜ã引数](Concepts/parameters.md#åå‰ä»˜ã引数) シンタックスを利用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```4d +// On Web Connection データベースメソッド +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> インターフェースè¦ç´  を表示ã™ã‚‹ 4Dコマンド (`DIALOG`ã€`ALERT` ãªã©) ã®å‘¼ã³å‡ºã—ã¯è¨±å¯ã•れãšã€ãƒ¡ã‚½ãƒƒãƒ‰ã®å‡¦ç†ã‚’終了ã—ã¾ã™ã€‚ + + +### $1 - URL追加データ + +最åˆã®å¼•æ•° ($1) ã¯ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ Webブラウザーã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¨ãƒªã‚¢ã«å…¥åŠ›ã—㟠URL ã‹ã‚‰ãƒ›ã‚¹ãƒˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å–り除ã„ãŸã‚‚ã®ã§ã™ã€‚ + +イントラãƒãƒƒãƒˆæŽ¥ç¶šã®å ´åˆã‚’見ã¦ã¿ã¾ã—ょã†ã€‚ 4D Webサーãƒãƒ¼ãƒžã‚·ãƒ³ã® IPアドレスを 123.4.567.89 ã¨ã—ã¾ã™ã€‚ 以下ã®è¡¨ã¯ Webブラウザーã«å…¥åŠ›ã•れ㟠URL ã«å¯¾ã—ã¦ã€$1 ãŒå—ã‘å–る値を示ã—ã¦ã„ã¾ã™: + +| Webブラウザーã«å…¥åŠ›ã•れãŸå€¤ | $1 ã®å€¤ | +| ------------------------------------ | ------------------------ | +| 123.4.567.89 | / | +| http://123.4.567.89 | / | +| 123.4.567.89/Customers | /Customers | +| http://123.4.567.89/Customers/Add | /Customers/Add | +| 123.4.567.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +ã“ã®å¼•æ•°ã¯å¿…è¦ã«å¿œã˜ã¦è‡ªç”±ã«åˆ©ç”¨ã§ãã¾ã™ã€‚ 4D ã¯å˜ã« URL ã®ãƒ›ã‚¹ãƒˆéƒ¨ã‚ˆã‚Šå¾Œã®éƒ¨åˆ†ã‚’無視ã—ã€$1 ã«æ¸¡ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€å€¤ "*/Customers/Add*" ㌠"`[Customers]` ãƒ†ãƒ¼ãƒ–ãƒ«ã«æ–°è¦ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’直接追加ã™ã‚‹" ã¨ã„ã†ã“ã¨ã‚’æ„味ã™ã‚‹ã‚ˆã†ãªã€ã‚ªãƒªã‚¸ãƒŠãƒ«ã®ãƒ«ãƒ¼ãƒ«ã‚’作æˆã§ãã¾ã™ã€‚ 利用å¯èƒ½ãªå€¤ã‚„デフォルトブックマークを Webãƒ¦ãƒ¼ã‚¶ãƒ¼ã«æä¾›ã™ã‚‹ã“ã¨ã§ã€ã‚¢ãƒ—リケーションã®ç•°ãªã‚‹éƒ¨åˆ†ã¸ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã‚’æä¾›ã§ãã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ã—ã¦ã€Webãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯æ–°ã—ãæŽ¥ç¶šã™ã‚‹ãŸã³ã«ãƒŠãƒ“ゲーションを通éŽã™ã‚‹ã“ã¨ãªãã€ç´ æ—©ã Webサイトã®ãƒªã‚½ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + + +### $2 - HTTPリクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ + +二番目ã®å¼•æ•° ($2) ã¯ã€Webブラウザーã‹ã‚‰é€ä¿¡ã•れ㟠HTTPリクエストã®ãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ã§ã™ã€‚ ã“ã®æƒ…報㯠`On Web Connection` データベースメソッド㫠"ãã®ã¾ã¾" 渡ã•れるã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 ãã®å†…容ã¯ã€æŽ¥ç¶šã‚’試ã¿ãŸ Webブラウザーã®ä»•様ã«ã‚ˆã‚Šç•°ãªã‚Šã¾ã™ã€‚ + +アプリケーションã§ã“ã®æƒ…報を使用ã™ã‚‹ã«ã¯ã€é–‹ç™ºè€…ãŒãƒ˜ãƒƒãƒ€ãƒ¼ã¨ãƒœãƒ‡ã‚£ã‚’è§£æžã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 `WEB GET HTTP HEADER` ã‚„ `WEB GET HTTP BODY` コマンドを使ã†ã“ã¨ãŒã§ãã¾ã™ã€‚ +> パフォーマンス上ã®ç†ç”±ã«ã‚ˆã‚Šã€$2 を介ã—ã¦æ¸¡ã•れるデータã®ã‚µã‚¤ã‚ºã¯ 32KB 以下ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã“れを超éŽã™ã‚‹åˆ†ã¯ã€4D HTTPサーãƒãƒ¼ã«ã‚ˆã‚Šåˆ‡ã‚Šå–られã¾ã™ã€‚ + + +### $3 - Webクライアント㮠IPアドレス + +$3 引数ã¯ãƒ–ラウザーマシン㮠IPアドレスをå—ã‘å–りã¾ã™ã€‚ ã“ã®æƒ…報を使用ã—ã¦ã€ã‚¤ãƒ³ãƒˆãƒ©ãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã¨ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚¢ã‚¯ã‚»ã‚¹ã‚’区別ã§ãã¾ã™ã€‚ +> 4D 㯠IPv4 アドレスをã€96-bit ã®æŽ¥é ­è¾žä»˜ãã®ãƒã‚¤ãƒ–リッド型 IPv6/IPv4 フォーマットã§è¿”ã—ã¾ã™ã€‚ãŸã¨ãˆã°ã€::ffff:192.168.2.34 ã¯ã€192.168.2.34 ã¨ã„ㆠIPv4 アドレスをæ„味ã—ã¾ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ã€[IPv6 ã®ã‚µãƒãƒ¼ãƒˆã«ã¤ã„ã¦](webServerConfig.md#IPv6-ã®ã‚µãƒãƒ¼ãƒˆã«ã¤ã„ã¦) ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +### $4 - サーãƒãƒ¼ IPアドレス + +$4 引数㯠4D Webサーãƒãƒ¼ã«ã‚ˆã£ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れ㟠IPアドレスをå—ã‘å–りã¾ã™ã€‚ 4D ã¯ãƒžãƒ«ãƒãƒ›ãƒ¼ãƒŸãƒ³ã‚°ã‚’サãƒãƒ¼ãƒˆã—ã¦ãŠã‚Šã€è¤‡æ•°ã® IPアドレスをæŒã¤ãƒžã‚·ãƒ³ã‚’使用ã§ãã¾ã™ã€‚ 詳細㯠[設定ページ](webServerConfig.md#リクエストをå—ã‘付ã‘ã‚‹-IPアドレス) ã‚’å‚ç…§ãã ã•ã„。 + +### $5 㨠$6 - ユーザーåã¨ãƒ‘スワード + +`$5` 㨠`$6` 引数ã¯ã€ãƒ–ラウザーãŒè¡¨ç¤ºã™ã‚‹æ¨™æº–ã®èªè¨¼ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã«ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå…¥åŠ›ã—ãŸãƒ¦ãƒ¼ã‚¶ãƒ¼åã¨ãƒ‘スワードをå—ã‘å–りã¾ã™ (入力ã•れã¦ã„れã°; [èªè¨¼ãƒšãƒ¼ã‚¸](authentication.md) å‚ç…§)。 +> ブラウザーã‹ã‚‰é€ä¿¡ã•れãŸãƒ¦ãƒ¼ã‚¶ãƒ¼å㌠4D ã«å­˜åœ¨ã™ã‚‹å ´åˆã€$6 引数 (ユーザーパスワード) ã¯ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã®ãŸã‚渡ã•れã¾ã›ã‚“。 + + + + +## /4DACTION + +***/4DACTION/***MethodName***
          **/4DACTION/******MethodName/Param* + +| 引数 | タイプ | | 説明 | +| ---------- | ---- |:--:| --------------------- | +| MethodName | テキスト | -> | 実行ã™ã‚‹ 4Dプロジェクトメソッドå | +| Param | テキスト | -> | ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆãƒ¡ã‚½ãƒƒãƒ‰ã«æ¸¡ã•れるテキスト引数 | + +**利用法**: URL ã¾ãŸã¯ãƒ•ォームアクション + +ã“ã® URL を使用ã—ã¦ã€ä»»æ„ã® *Param* テキスト引数ã¨ã¨ã‚‚ã« *MethodName* ã«æŒ‡å®šã—㟠4Dプロジェクトメソッドを呼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã™ã€‚ ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å¼•æ•°ã‚’ *$1* ã«å—ã‘å–りã¾ã™ã€‚ + +- 4Dプロジェクトメソッドã¯ã€[Webリクエスト用ã«è¨±å¯](allowProject.md)ã•れã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。メソッドã®ãƒ­ãƒ‘ティ㧠"公開オプション: 4Dã‚¿ã‚°ã¨URL(4DACTION...)" 属性ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ 属性ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆã€Webãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯æ‹’å¦ã•れã¾ã™ã€‚ +- `/4DACTION/MyMethod/Param` リクエストをå—ã‘å–ã‚‹ã¨ã€4D 㯠`On Web Authentication` データベースメソッド (ã‚れã°) を呼ã³å‡ºã—ã¾ã™ã€‚ + +`4DACTION/` ã¯ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãª Webページ㮠URL ã«å‰²ã‚Šå½“ã¦ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™: + +```html +Do Something +``` + +`MyMethod` プロジェクトメソッドã¯é€šå¸¸ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’è¿”ã™ã¹ãã§ã™ (`WEB SEND FILE` ã‚„ `WEB SEND BLOB` ã§ HTMLページをé€ä¿¡ã™ã‚‹ãªã©)。 ブラウザーをブロックã—ãªã„よã†ã«ã€å‡¦ç†ã¯å¯èƒ½ãªé™ã‚ŠçŸ­æ™‚é–“ã§ãŠã“ãªã‚れるよã†ã«ã—ã¾ã™ã€‚ + +> `4DACTION/` ã‹ã‚‰å‘¼ã³å‡ºã•れるメソッドã¯ã€ã‚¤ãƒ³ã‚¿ãƒ•ェースè¦ç´  (`DIALOG`, `ALERT` ãªã©) を呼ã³å‡ºã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 + +#### 例題 + +ã“ã®ä¾‹é¡Œã¯ã€HTMLピクãƒãƒ£ãƒ¼ã‚ªãƒ–ジェクト㫠`/4DACTION/` URL を割り当ã¦ã€ãƒšãƒ¼ã‚¸ä¸Šã§ãƒ”クãƒãƒ£ãƒ¼ã‚’å‹•çš„ã«è¡¨ç¤ºã™ã‚‹æ–¹æ³•を説明ã—ã¦ã„ã¾ã™ã€‚ スタティック HTMLページã«ä»¥ä¸‹ã®ã‚³ãƒ¼ãƒ‰ã‚’記述ã—ã¾ã™: + +```html + +``` + +`getPhoto` メソッドã¯ä»¥ä¸‹ã®ã¨ãŠã‚Šã§ã™: + +```4d +C_TEXT($1) // ã“ã®å¼•æ•°ã¯å¸¸ã«å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + // Resources フォルダー内㮠Images フォルダー内ã§ãƒ”クãƒãƒ£ãƒ¼ã‚’探ã—ã¾ã™ +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) // ピクãƒãƒ£ãƒ¼ã‚’ピクãƒãƒ£ãƒ¼å¤‰æ•°ã«å…¥ã‚Œã¾ã™ +PICTURE TO BLOB($PictVar;$BLOB;".png") // ピクãƒãƒ£ãƒ¼ã‚’ ".png" å½¢å¼ã«å¤‰æ›ã—ã¾ã™ +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION を使用ã—ã¦ãƒ•ォームをãƒã‚¹ãƒˆ + +4D Webサーãƒãƒ¼ã§ã¯ã€ãƒã‚¹ãƒˆã•れãŸãƒ•ォームを使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“れã¯ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãªãƒšãƒ¼ã‚¸ã‹ã‚‰ Webサーãƒãƒ¼ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã—ã€ã™ã¹ã¦ã®å€¤ã‚’ç°¡å˜ã«å–å¾—ã™ã‚‹ã¨ã„ã†ã‚‚ã®ã§ã™ã€‚ POSTタイプを使用ã—ã€ãƒ•ォームã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯ /4DACTION/MethodName ã§å§‹ã¾ã£ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +フォーム㯠2ã¤ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’使用ã—ã¦ã‚µãƒ–ミットã§ãã¾ã™ (4D ã§ã¯ä¸¡æ–¹ã®ã‚¿ã‚¤ãƒ—を使用ã§ãã¾ã™): +- POST ã¯é€šå¸¸ Webサーãƒãƒ¼ã«ãƒ‡ãƒ¼ã‚¿ã‚’é€ä¿¡ã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ +- GET ã¯é€šå¸¸ Webサーãƒãƒ¼ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’リクエストã™ã‚‹ã®ã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +> ã“ã®å ´åˆã€Webサーãƒãƒ¼ãŒãƒã‚¹ãƒˆã•れãŸãƒ•ォームをå—ä¿¡ã™ã‚‹ã¨ã€`On Web Authentication` データベースメソッド㌠(ã‚れã°) 呼ã³å‡ºã•れã¾ã™ã€‚ + +サーãƒãƒ¼ã«æŠ•稿ã•れ㟠HTMLページã«å«ã¾ã‚Œã‚‹ã™ã¹ã¦ã®ãƒ•ィールド㮠[åå‰ã¨å€¤ã‚’å–å¾—](#HTTPリクエストã‹ã‚‰å€¤ã‚’å–å¾—ã™ã‚‹) ã™ã‚‹ã«ã¯ã€ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰å†…ã§ `WEB GET VARIABLES` コマンドを呼ã³å‡ºã™å¿…è¦ãŒã‚りã¾ã™ã€‚ + +フォームã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’定義ã™ã‚‹ä¾‹: + +```html +
          +``` + +#### 例題 + +Webアプリケーションã«ãŠã„ã¦ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãªHTMLページを使ã„ã€ãƒ–ラウザーã‹ã‚‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’検索ã§ãるよã†ã«ã—ãŸã„ã¨ã—ã¾ã™ã€‚ ã“ã®ãƒšãƒ¼ã‚¸ã‚’ "search.htm" ã¨ã—ã¾ã™ã€‚ アプリケーションã«ã¯ã€æ¤œç´¢çµæžœã‚’表示ã™ã‚‹ãŸã‚ã®ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ ("results.htm") ã‚‚ã‚ã‚‹ã¨ã—ã¾ã™ã€‚ POSTメソッド㨠`/4DACTION/PROCESSFORM` アクションãŒãƒšãƒ¼ã‚¸ã«å‰²ã‚Šå½“ã¦ã‚‰ã‚Œã¦ã„ã¾ã™ã€‚ + +以下ã¯ã“ã®ãƒšãƒ¼ã‚¸ã® HTMLコードã§ã™: + +```html + +
          +Whole word
          + +
          +``` + +データ入力エリア㫠"ABCD" ã¨ã‚¿ã‚¤ãƒ—ã—ã€"Whole word (å¥ã¨ã—ã¦æ¤œç´¢)" オプションをãƒã‚§ãƒƒã‚¯ã—㦠**Search** (検索) ボタンをクリックã—ã¾ã™ã€‚ Webサーãƒãƒ¼ã«é€ä¿¡ã•れるリクエスト内部ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D 㯠`On Web Authentication` データベースメソッドを (ã‚れã°) 呼ã³å‡ºã—ã€ãã—ã¦ä»¥ä¸‹ã®`processForm` プロジェクトメソッドを呼ã³å‡ºã—ã¾ã™: + +```4d + C_TEXT($1) // コンパイルモードã®å ´åˆå¿…é ˆ + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) // フォーム上ã®å¤‰æ•°ã‚’ã™ã¹ã¦å–å¾—ã—ã¾ã™ + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) // オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„å ´åˆ + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
          " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") // æ¤œç´¢çµæžœãŒæŒ¿å…¥ã•れる results.htm ã‚’é€ä¿¡ã—ã¾ã™ + // ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯å¤‰æ•° vLIST ã®å‚ç…§ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ + // ãŸã¨ãˆã° ãªã© + //... +End if +``` + + + + +## HTTPリクエストã‹ã‚‰å€¤ã‚’å–å¾—ã™ã‚‹ + +4D Web サーãƒãƒ¼ã§ã¯ã€Webフォームや URL を介ã—㦠POST ã‚„ GET リクエストã§é€ä¿¡ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚’復元ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ヘッダーや URL ã«ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚ŒãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ Webサーãƒãƒ¼ãŒå—ä¿¡ã™ã‚‹ã¨ã€4D ã¯ãれã«å«ã¾ã‚Œã‚‹ HTMLオブジェクトã®å€¤ã‚’å—ã‘å–ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãŸã¨ãˆã° `WEB SEND FILE` コマンドã¾ãŸã¯ `WEB SEND BLOB` コマンドã§é€ä¿¡ã•れã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒå€¤ã‚’入力・修正ã—ã¦ç¢ºå®šãƒœã‚¿ãƒ³ã‚’クリックã™ã‚‹ã‚ˆã†ãª Webフォームã«ãŠã„ã¦ã‚‚ã“ã®åŽŸç†ã¯ä½¿ç”¨å¯èƒ½ã§ã™ã€‚ + +ã“ã®å ´åˆ 4D 㯠`WEB GET VARIABLES` コマンドを使ã£ã¦ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå†…ã® HTMLオブジェクトã®å€¤ã‚’å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ `WEB GET VARIABLES` コマンドã¯ã€å€¤ã‚’テキストã¨ã—ã¦å—ã‘å–りã¾ã™ã€‚ + +以下㮠HTMLページã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãŒã‚ã‚‹ã¨ã: + +```html + + + Welcome + + + +
          +

          Welcome to Spiders United

          +

          Please enter your name: +

          +

          + + +

          +

          + + + +

          +
          + + +``` + +4D ㌠Webブラウザーã«ãƒšãƒ¼ã‚¸ã‚’é€ä¿¡ã™ã‚‹ã¨ã€ä»¥ä¸‹ã®ã‚ˆã†ã«è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/WebServer/spiders.png) + +ã“ã®ãƒšãƒ¼ã‚¸ã®ä¸»ãªç‰¹å¾´ã¯: + +- é€ä¿¡ã®ãŸã‚ã® **Submit** ボタン㌠3ã¤ã‚りã¾ã™: `vsbLogOn`, `vsbRegister` ãã—㦠`vsbInformation`。 +- **Log On** をクリックã™ã‚‹ã¨ã€ãƒ•ォームã‹ã‚‰ã®é€ä¿¡ã¯ã¾ãšåˆã‚ã« JavaScript関数 `LogOn` ã«ã‚ˆã£ã¦å‡¦ç†ã•れã¾ã™ã€‚ åå‰ãŒå…¥åŠ›ã•れã¦ã„ãªã„å ´åˆã€ãƒ•ォーム㯠4Dã«é€ä¿¡ã™ã‚‰ã•れãšã€JavaScript ã«ã‚ˆã‚‹è­¦å‘ŠãŒè¡¨ç¤ºã•れã¾ã™ã€‚ +- フォーム㯠POST 4Dメソッドã«åŠ ãˆã¦ã€ãƒ–ラウザープロパティを *vtNav_App* ã‹ã‚‰å§‹ã¾ã‚‹åç§°ã® 4ã¤ã®éš ã—オブジェクトã¸ã¨ã‚³ãƒ”ーã™ã‚‹æŠ•稿スクリプト (*GetBrowserInformation*) ã‚’æŒã£ã¦ã„ã¾ã™ã€‚ ã¾ãŸã€ã“ã®ãƒšãƒ¼ã‚¸ã«ã¯ `vtUserName` オブジェクトもå«ã¾ã‚Œã¾ã™ã€‚ + +ユーザー㌠HTMLフォーム上ã®ãƒœã‚¿ãƒ³ã®ã©ã‚Œã‹ã‚’クリックã—ãŸéš›ã«å‘¼ã³å‡ºã•れる `WWW_STD_FORM_POST` ã¨ã„ㆠ4Dメソッドを検証ã—ã¦ã¿ã¾ã—ょã†ã€‚ + +```4d + // 変数ã®å€¤ã‚’å–å¾—ã—ã¾ã™ + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // Log On ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆ + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // WWW POST EVENT ãƒ¡ã‚½ãƒƒãƒ‰ãŒæƒ…報をデータベースã®ãƒ†ãƒ¼ãƒ–ルã«ä¿å­˜ã—ã¾ã™ + Else + + $0:=WWW Register + // WWW Register ãƒ¡ã‚½ãƒƒãƒ‰ã¯æ–°è¦ Webユーザーã®ç™»éŒ²ã‚’処ç†ã—ã¾ã™ + End if + + // Register ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆ + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // Information ボタンãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸå ´åˆ + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®æ©Ÿèƒ½ã¯: + +- 変数 *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, ãã—㦠*vtNav_userAgent* ã®å€¤ (åŒã˜åå‰ã‚’æŒã¤ HTMLオブジェクトã«ãれãžã‚Œãƒã‚¤ãƒ³ãƒ‰ã•れã¦ã„ã¾ã™) 㯠ã€`WEB GET VARIABLES` コマンドを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ JavaScript ã®ã‚¹ã‚¯ãƒªãƒ—ト *GetBrowserInformation* ã§ä½œæˆã•れ㟠HTMLオブジェクトã‹ã‚‰å–å¾—ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- 3ã¤ã®æŠ•稿ボタンã«ãƒã‚¤ãƒ³ãƒ‰ã•れã¦ã„る変数 *vsbLogOn*, *vsbRegister* 㨠*vsbInformation* ã®ã†ã¡ã€ã‚¯ãƒªãƒƒã‚¯ã•れãŸãƒœã‚¿ãƒ³ã«å¯¾å¿œã™ã‚‹ã‚‚ã®ã®ã¿ãŒ `WEB GET VARIABLES` コマンドã«ã‚ˆã£ã¦å–å¾—ã•れã¾ã™ã€‚ ã“ã® 3ã¤ã®ã†ã¡ã„ãšã‚Œã‹ã®ãƒœã‚¿ãƒ³ã«ã‚ˆã£ã¦æŠ•稿ãŒãŠã“ãªã‚れãŸã¨ãã€ãƒ–ラウザーã¯ã‚¯ãƒªãƒƒã‚¯ã•れãŸãƒœã‚¿ãƒ³ã®å€¤ã‚’ 4D ã«è¿”ã—ã¾ã™ã€‚ ã“れã«ã‚ˆã‚Šã€ã©ã®ãƒœã‚¿ãƒ³ãŒã‚¯ãƒªãƒƒã‚¯ã•れãŸã®ã‹ãŒåˆ†ã‹ã‚Šã¾ã™ã€‚ + +HTMLã§ã¯ã™ã¹ã¦ã®ã‚ªãƒ–ジェクトãŒãƒ†ã‚­ã‚¹ãƒˆã‚ªãƒ–ジェクトã§ã‚ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ SELECTè¦ç´ ã‚’使用ã—ãŸå ´åˆã€ `WEB GET VARIABLES` コマンドã§è¿”ã•れるã®ã¯ã‚ªãƒ–ジェクト内ã§ãƒã‚¤ãƒ©ã‚¤ãƒˆã•れã¦ã„ã‚‹è¦ç´ ã®å€¤ã§ã‚りã€4D ã®ã‚ˆã†ã«é…列内ã®è¦ç´ ã®ä½ç½®ã‚’è¿”ã™ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“。 `WEB GET VARIABLES` コマンドã¯å¿…ãšãƒ†ã‚­ã‚¹ãƒˆåž‹ã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ + + +## ãã®ä»–ã® Webサーãƒãƒ¼ã‚³ãƒžãƒ³ãƒ‰ + +4D Webサーãƒãƒ¼ã«ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å‡¦ç†ã‚’カスタマイズã™ã‚‹ãŸã‚ã®ã€ä½Žãƒ¬ãƒ™ãƒ« WebコマンドãŒã„ãã¤ã‹ç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ + +- `WEB GET HTTP BODY` コマンドã¯ã€ãƒœãƒ‡ã‚£ã‚’ãã®ã¾ã¾ã®çŠ¶æ…‹ã§ãƒ†ã‚­ã‚¹ãƒˆã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ã“れを必è¦ã«å¿œã˜ã¦è§£æžã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ +- `WEB GET HTTP HEADER` コマンドã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ カスタムcookie ãªã©ã‚’処ç†ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ (`WEB SET HTTP HEADER` コマンドも使用ã§ãã¾ã™)。 +- `WEB GET BODY PART` 㨠`WEB Get body part count` コマンドã¯ã€ãƒžãƒ«ãƒãƒ‘ートリクエストã®ãƒœãƒ‡ã‚£ãƒ‘ートを解æžã—ã¦ã€ãƒ†ã‚­ã‚¹ãƒˆå€¤ã‚’å–å¾—ã™ã‚‹ã ã‘ã§ãªãã€ãƒã‚¹ãƒˆã•れãŸãƒ•ァイルもBLOBã«å–å¾—ã—ã¾ã™ã€‚ + +ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯æ¬¡ã®å›³ã«ã¾ã¨ã‚られã¦ã„ã¾ã™: + +![](assets/en/WebServer/httpCommands.png) + +4D Webサーãƒãƒ¼ã¯ã€ã©ã® Webクライアントã‹ã‚‰ã§ã‚‚ãƒãƒ£ãƒ³ã‚¯ãƒ‰ãƒ»ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§ã‚¢ãƒƒãƒ—ロードã•れãŸãƒ•ァイルをサãƒãƒ¼ãƒˆã™ã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã—ãŸã€‚ ãƒãƒ£ãƒ³ã‚¯ãƒ‰ãƒ»ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ HTTP/1.1 ã«ã¦å®šç¾©ã•れã¦ã„ã‚‹ãƒ‡ãƒ¼ã‚¿è»¢é€æ–¹å¼ã§ã™ã€‚ ã“れを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã‚Šã€æœ€çµ‚çš„ãªãƒ‡ãƒ¼ã‚¿ã‚µã‚¤ã‚ºã‚’知る事ãªãã€ãƒ‡ãƒ¼ã‚¿ã‚’複数㮠"ãƒãƒ£ãƒ³ã‚¯" (部分) ã«åˆ†ã‘ã¦è»¢é€ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D Webサーãƒãƒ¼ã§ã¯ã€ã‚µãƒ¼ãƒãƒ¼ã‹ã‚‰ Webクライアントã¸ã®ãƒãƒ£ãƒ³ã‚¯ãƒ‰ãƒ»ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚‚サãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã™ (`WEB SEND RAW DATA` を使用ã—ã¾ã™)。 + +## COMPILER_WEB プロジェクトメソッド + +COMPILER_WEB メソッドãŒå­˜åœ¨ã™ã‚‹å ´åˆã€ãれ㯠HTTPサーãƒãƒ¼ãŒå‹•çš„ãªãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’å—ã‘å–りã€4Dエンジンを呼ã³å‡ºã—ãŸå ´åˆã«ã€ã‚·ã‚¹ãƒ†ãƒ ã‚’通ã—ã¦å‘¼ã³å‡ºã•れã¾ã™ã€‚ ã“れã¯ãŸã¨ãˆã° 4D Webサーãƒãƒ¼ãŒã€ãƒã‚¹ãƒˆã•れãŸãƒ•ォームã€ã¾ãŸã¯å‡¦ç†ã™ã¹ã URL ã‚’ [` COMPILER_WEB プロジェクトメソッド㯠(存在ã™ã‚Œã°)ã€SOAPリクエストãŒå—ã‘入れられるã”ã¨ã«å®Ÿè¡Œã•れã¾ã™ã€‚ + + diff --git a/website/translated_docs/ja/WebServer/preemptiveWeb.md b/website/translated_docs/ja/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..bceb43f238f965 --- /dev/null +++ b/website/translated_docs/ja/WebServer/preemptiveWeb.md @@ -0,0 +1,95 @@ +--- +id: preemptiveWeb +title: プリエンプティブWebプロセスã®ä½¿ç”¨ +--- + + +4D Webサーãƒãƒ¼ã‚’使ã£ã¦ã€ã‚³ãƒ³ãƒ‘イル済ã¿ã‚¢ãƒ—リケーションã§ãƒ—リエンプティブWebプロセスを使用ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€ãƒžãƒ«ãƒã‚³ã‚¢ã‚³ãƒ³ãƒ”ューターã®åˆ©ç‚¹ã‚’最大é™å¼•ã出ã™ã“ã¨ãŒã§ãã¾ã™ã€‚ 4D変æ›ã‚¿ã‚°ã‚„ Webデータベースメソッドをå«ã‚㟠Web関連コードをã€å¯èƒ½ãªé™ã‚Šå¤šãã®ã‚³ã‚¢ã§åŒæ™‚ã«å®Ÿè¡Œã™ã‚‹ã‚ˆã†è¨­å®šã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +4D ã®ãƒ—リエンプティブプロセスã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€*ランゲージリファレンス* ã® *プリエンプティブ4Dプロセス* ã®ç« ã‚’å‚ç…§ãã ã•ã„。 + +## Webプロセスã«ãŠã‘るプリエンプティブモードã®ä½¿ç”¨å¯èƒ½çŠ¶æ³ + +Webプロセスã«å¯¾ã—ã¦ãƒ—リエンプティブモードã®ä½¿ç”¨ãŒå¯èƒ½ãªã®ã¯ã€ä»¥ä¸‹ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®å ´åˆã«é™ã‚‰ã‚Œã¾ã™: + +* 4D Server ã‚ã‚‹ã„ã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¢ãƒ¼ãƒ‰ã® 4D を使用ã—ã¦ã„ã‚‹ (リモートモードã§ã® 4D ã¯ãƒ—リエンプティブモードをサãƒãƒ¼ãƒˆã—ã¦ã„ã¾ã›ã‚“) + +* コンパイル済ã¿ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚’使用ã—ã¦ã„ã‚‹ + +* データベース㮠**プリエンプティブプロセスを使用** 設定ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹(以下å‚ç…§) + +* Web関連ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã¨ãƒ—ロジェクトメソッドã¯ã€ã™ã¹ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã‚る㨠4Dコンパイラã‹ã‚‰ç¢ºèªæ¸ˆã¿ã§ã‚ã‚‹ + +上記ã®è¦é …ãŒã©ã‚Œã‹ä¸€ã¤ã§ã‚‚欠ã‘ã¦ã„ãŸå ´åˆã€Webサーãƒãƒ¼ã¯ã‚³ã‚ªãƒšãƒ©ãƒ†ã‚£ãƒ–プロセスを使用ã—ã¾ã™ã€‚ + +## Webサーãƒãƒ¼ã«ãŠã„ã¦ãƒ—リエンプティブモードを有効化ã™ã‚‹ + +アプリケーション㮠Webサーãƒãƒ¼ã‚³ãƒ¼ãƒ‰ã«ãŠã„ã¦ãƒ—リエンプティブモードを有効化ã™ã‚‹ã«ã¯ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã® "Web / オプション (I)" ページã®ã€**プリエンプティブプロセスを使用** ã«ãƒã‚§ãƒƒã‚¯ã‚’ã¤ã‘ã‚‹å¿…è¦ãŒã‚りã¾ã™: + +![](assets/en/WebServer/preemptive.png) + +ã“ã®ã‚ªãƒ—ションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ãã€4Dコンパイラ㯠Web関連ã®ã‚³ãƒ¼ãƒ‰ãれãžã‚Œã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•プロパティを自動的ã«è©•価㗠(以下å‚ç…§)ã€é•åãŒã‚ã£ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ +> ã“ã®ã‚ªãƒ—ション㯠Webサービスプロセス (サーãƒãƒ¼ã‚ã‚‹ã„ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ã«ã¯é©ç”¨ã•れã¾ã›ã‚“。 Webサービスプロセスã®ãƒ—リエンプティブモードã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãƒ¬ãƒ™ãƒ«ã§ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ã€‚公開済ã¿ã® SOAPサーãƒãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ (*4Dã§ Web サービスを公開ã™ã‚‹* å‚ç…§) ã‚ã‚‹ã„ã¯ãƒ—ロキシクライアントメソッド (*4Dã‹ã‚‰ Web サービスã¸ã‚µãƒ–スクライブã™ã‚‹* å‚ç…§) ã® "プリエンプティブプロセスã§å®Ÿè¡Œå¯èƒ½" プロパティをãƒã‚§ãƒƒã‚¯ã—ã€ãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚³ãƒ³ãƒ‘イラーã«ã‚ˆã£ã¦ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã¨ç¢ºèªã•れるよã†ã«ã—ã¾ã™ã€‚ + +## スレッドセーフãªWebサーãƒãƒ¼ã‚³ãƒ¼ãƒ‰ã®æ›¸ãæ–¹ + +Webプロセスをプリエンプティモードã§å®Ÿè¡Œã™ã‚‹ã«ã¯ã€Webサーãƒãƒ¼ã§å®Ÿè¡Œã•れるã™ã¹ã¦ã® 4DコードãŒã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 ストラクãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã«ãŠã„㦠**プリエンプティブプロセスを使用** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹å ´åˆã€ã‚¢ãƒ—リケーションã®ä»¥ä¸‹ã®éƒ¨åˆ†ãŒ 4Dコンパイラーã«ã‚ˆã£ã¦è‡ªå‹•çš„ã«è©•価ã•れã¾ã™: + +* ã™ã¹ã¦ã® Web関連データベースメソッド: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#on-rest-authentication-データベースメソッドを使用ã™ã‚‹) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* `compiler_web` プロジェクトメソッド (実際㮠"実行モード" プロパティã«é–¢ã‚らãšè©•価ã•れã¾ã™) + +* Webコンテキストã«ãŠã„㦠`PROCESS 4D TAGS` コマンドã«ã‚ˆã£ã¦å‡¦ç†ã•れる基本的ã«ã™ã¹ã¦ã®ã‚³ãƒ¼ãƒ‰ (.shtmlページを通ã—ã¦å®Ÿè¡Œã•れるもã®ãªã©) + +* "公開オプション: 4Dã‚¿ã‚°ã¨URL (`4DACTION`)..." å±žæ€§ãŒæœ‰åйãªãƒ—ロジェクトメソッド。 + +* "RESTリソースã¨ã—ã¦å…¬é–‹" å±žæ€§ãŒæœ‰åйãªãƒ†ãƒ¼ãƒ–ルã®ãƒˆãƒªã‚¬ãƒ¼ + +* REST経由ã§åˆ©ç”¨å¯èƒ½ãªãƒ—ロジェクトメソッド ("公開オプション: RESTサーãƒãƒ¼" プロパティãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„るメソッド) + +ã“れらãれãžã‚Œã®ãƒ¡ã‚½ãƒƒãƒ‰ã¨ã‚³ãƒ¼ãƒ‰ã®éƒ¨åˆ†ã«ã¤ã„ã¦ã€ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã®ãƒ«ãƒ¼ãƒ«ãŒéµå®ˆã•れã¦ã„ã‚‹ã‹ã‚’コンパイラーãŒãƒã‚§ãƒƒã‚¯ã—ã€å•題ãŒã‚ã£ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ã‚’è¿”ã—ã¾ã™ã€‚ スレッドセーフルールã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€*プロセス* ã®ç« ã® *スレッドセーフãªãƒ¡ã‚½ãƒƒãƒ‰ã®æ›¸ãæ–¹* ã®æ®µè½ã‚’å‚ç…§ãã ã•ã„。 + +## 4D Webコードã®ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ティ + +Web関連ã®ã»ã¨ã‚“ã©ã® 4Dコマンドや関数ã€ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã€ãã—㦠URL ãŒã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã¨ãªã‚Šã€ãƒ—リエンプティモードã§ä½¿ç”¨ã§ãã¾ã™ã€‚ + +### 4Dコマンドã¨ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ + +ã™ã¹ã¦ã® Web関連コマンドã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã™: + +* *Webサーãƒãƒ¼* テーマã®å…¨ã‚³ãƒžãƒ³ãƒ‰ +* *HTTPクライアント* テーマã®å…¨ã‚³ãƒžãƒ³ãƒ‰ + +Web関連ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã‚‚スレッドセーフã§ã‚りã€ãƒ—リエンプティモードã§ä½¿ç”¨ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™: `On Web Authentication`, `On Web Connection`, `On REST Authentication`...)。 + +ã‚‚ã¡ã‚ã‚“ã€ã“れらã®ãƒ¡ã‚½ãƒƒãƒ‰ã«ã‚ˆã£ã¦å®Ÿè¡Œã•れるコードもã¾ãŸã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +### Webサーãƒãƒ¼URL + +以下㮠4D Webサーãƒãƒ¼URLã¯ã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ã‚りã€ãƒ—リエンプティモードã§ä½¿ç”¨å¯èƒ½ã§ã™: + +* *4daction/* (呼ã³å‡ºã•れるプロジェクトメソッドもã¾ãŸã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“) +* *4dcgi/* (呼ã³å‡ºã•れるデータベースメソッドもã¾ãŸã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (ピクãƒãƒ£ãƒ¼ãƒ•ィールド㮠Webリクエストã«å¯¾ã— `PROCESS 4D TAGS` ã«ã‚ˆã£ã¦ç”Ÿæˆã•れã¾ã™) +* *4dimg/* (ピクãƒãƒ£ãƒ¼å¤‰æ•°ã® Webリクエストã«å¯¾ã— `PROCESS 4D TAGS` ã«ã‚ˆã£ã¦ç”Ÿæˆã•れã¾ã™) + +### プリエンプティブWebプロセスアイコン + +ランタイムエクスプローラー㨠4D Server管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®ä¸¡æ–¹ã«ãŠã„ã¦ã€ãƒ—リエンプティブ㪠Webプロセスã«å¯¾ã—専用アイコンãŒè¡¨ç¤ºã•れるよã†ã«ãªã‚Šã¾ã—ãŸ: + +| プロセスタイプ | アイコン | +| --------------- | ---------------------------------------- | +| プリエンプティブWebメソッド | ![](assets/en/WebServer/processIcon.png) | + + diff --git a/website/translated_docs/ja/WebServer/sessions.md b/website/translated_docs/ja/WebServer/sessions.md new file mode 100644 index 00000000000000..50a0b4b621292b --- /dev/null +++ b/website/translated_docs/ja/WebServer/sessions.md @@ -0,0 +1,172 @@ +--- +id: sessions +title: ユーザーセッション +--- + +4D Webサーãƒãƒ¼ã¯ã€**ユーザーセッション** を管ç†ã™ã‚‹ãƒ“ãƒ«ãƒˆã‚¤ãƒ³ã®æ©Ÿèƒ½ã‚’æä¾›ã—ã¾ã™ã€‚ ユーザーセッションを作æˆãƒ»ç¶­æŒã™ã‚‹ã“ã¨ã§ã€Webアプリケーション上ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚¨ã‚¯ã‚¹ãƒšãƒªã‚¨ãƒ³ã‚¹ã‚’管ç†ãƒ»å‘上ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœ‰åйã‹ã•れã¦ã„ã‚‹ã¨ã€Webクライアントã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆé–“ã§åŒã˜ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆ (セレクションや変数ã®å€¤) ã‚’å†åˆ©ç”¨ã§ãã¾ã™ã€‚ + +Webサーãƒãƒ¼ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã¯ã€ä»¥ä¸‹ã®ã“ã¨ãŒå¯èƒ½ã§ã™: + +- åŒä¸€ã®Webクライアントã‹ã‚‰ã®è¤‡æ•°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’ã€ç„¡åˆ¶é™ã®ãƒ—リエンプティブプロセスã§åŒæ™‚ã«å‡¦ç† (Webサーãƒãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯ **スケーラブル**ã§ã™)。 +- Webクライアントã®ãƒ—ロセス間ã§ãƒ‡ãƒ¼ã‚¿ã‚’共有。 +- ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã«æ¨©é™ã‚’関連付ã‘る。 +- `Session` オブジェクト㨠[Session API](API/SessionClass.md) を介ã—ãŸã‚¢ã‚¯ã‚»ã‚¹ã®å‡¦ç†ã€‚ + +> **注:** ç¾åœ¨ã®å®Ÿè£…ã¯ã€Webアプリケーション全体ã«ãŠã„ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’介ã—ã¦éšŽå±¤çš„ãªãƒ¦ãƒ¼ã‚¶ãƒ¼æ¨©é™ã‚’開発者ãŒç®¡ç†ã§ãるよã†ã«ã™ã‚‹ã€ä»Šå¾Œäºˆå®šã•れã¦ã„ã‚‹åŒ…æ‹¬çš„ãªæ©Ÿèƒ½ã®æœ€åˆã®ã‚¹ãƒ†ãƒƒãƒ—ã«éŽãŽã¾ã›ã‚“。 + + +## ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹åŒ– + +ã‚»ãƒƒã‚·ãƒ§ãƒ³ç®¡ç†æ©Ÿèƒ½ã¯ã€4D Webサーãƒãƒ¼ä¸Šã§æœ‰åйã¾ãŸã¯ç„¡åйã«ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ セッション管ç†ã‚’有効化ã™ã‚‹æ–¹æ³•ã¯è¤‡æ•°ã‚りã¾ã™: + +- ストラクãƒãƒ£ãƒ¼è¨­å®šã® Web / オプション (I) ページ㮠**スケーラブルセッション** を使用ã™ã‚‹ (永続的ãªè¨­å®š): ![alt-text](assets/en/WebServer/settingsSession.png) + +ã“ã®ã‚ªãƒ—ションã¯ã€æ–°è¦ãƒ—ロジェクトã§ã¯ãƒ‡ãƒ•ォルトã§é¸æŠžã•れã¦ã„ã¾ã™ã€‚ ã“れã¯ã€**セッションãªã—** ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã‚’é¸æŠžã—ã¦ç„¡åйã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ã“ã®å ´åˆã€Webセッション機能ã¯ç„¡åйã«ãªã‚Šã¾ã™ (`Session` オブジェクトã¯ä½¿ç”¨ã§ãã¾ã›ã‚“)。 + +- Webサーãƒãƒ¼ã‚ªãƒ–ジェクト㮠[`.scalableSession`](API/WebServerClass.md#scalablesession) プロパティを使用ã™ã‚‹ ([`.start()`](API/WebServerClass.md#start) 関数㫠*settings* 引数ã¨ã—ã¦æ¸¡ã—ã¾ã™ï¼‰ã€‚ ã“ã®å ´åˆã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šãƒ€ã‚¤ã‚¢ãƒ­ã‚°ãƒœãƒƒã‚¯ã‚¹ã§å®šç¾©ã•れãŸã‚ªãƒ—ションよりもã€Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã®è¨­å®šãŒå„ªå…ˆã•れã¾ã™ (ディスクã«ã¯ä¿å­˜ã•れã¾ã›ã‚“)。 + +> メイン㮠Webサーãƒãƒ¼ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ãƒ¢ãƒ¼ãƒ‰ã¯ã€`WEB SET OPTION` コマンドを使ã£ã¦è¨­å®šã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +ã„ãšã‚Œã®å ´åˆã‚‚ã€è¨­å®šã¯ãƒžã‚·ãƒ³ã«å¯¾ã—ローカルãªã‚‚ã®ã§ã™ã€‚ã¤ã¾ã‚Šã€4D Server ã® Webサーãƒãƒ¼ã¨ã€ãƒªãƒ¢ãƒ¼ãƒˆã® 4Dマシン㮠Webサーãƒãƒ¼ã§ç•°ãªã‚‹è¨­å®šãŒå¯èƒ½ã§ã™ã€‚ + +> **äº’æ›æ€§ã«ã¤ã„ã¦**: 4D v18 R6 以å‰ã® 4Dãƒãƒ¼ã‚¸ãƒ§ãƒ³ã§ä½œæˆã•れãŸãƒ—ロジェクトã§ã¯ã€**æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³** オプションãŒä½¿ç”¨ã§ãã¾ã™ (詳細ã«ã¤ã„ã¦ã¯ã€[doc.4d.com](https://doc.4d.com) ã® Webサイトをå‚ç…§ãã ã•ã„)。 + + +## セッションã®å®Ÿè£… + +[セッションを有効ã«ã™ã‚‹](#ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹åŒ–) ã¨ã€4D自身ãŒè¨­å®šã—ãŸãƒ—ライベート cookie ("4DSID_*AppName*"ã€*AppName* ã¯ã‚¢ãƒ—リケーションプロジェクトã®åç§°) ã«åŸºã¥ã„ã¦ã€è‡ªå‹•メカニズムãŒå®Ÿè£…ã•れã¾ã™ã€‚ ã“ã® cookie ã¯ã€ã‚¢ãƒ—リケーションã®ã‚«ãƒ¬ãƒ³ãƒˆWebセッションをå‚ç…§ã—ã¾ã™ã€‚ + +> ã“ã® cookie ã®åå‰ã¯ã€[`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) プロパティを使用ã—ã¦å–å¾—ã§ãã¾ã™ã€‚ + +1. Webサーãƒãƒ¼ã¯ã€å„Webクライアントリクエストã«ãŠã„ã¦ã€ãƒ—ライベート㪠"4DSID_*AppName*" cookie ã®å­˜åœ¨ã¨å€¤ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¾ã™ã€‚ + +2. cookie ã«å€¤ãŒã‚ã‚‹å ´åˆã€4D ã¯æ—¢å­˜ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ä¸­ã‹ã‚‰ã“ã®ã‚¯ãƒƒã‚­ãƒ¼ã‚’作æˆã—ãŸã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’探ã—ã€è¦‹ã¤ã‹ã£ãŸå ´åˆã«ã¯å†åˆ©ç”¨ã—ã¾ã™ã€‚ + +2. クライアントã‹ã‚‰ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒã€ã™ã§ã«é–‹ã‹ã‚Œã¦ã„るセッションã«å¯¾å¿œã—ã¦ã„ãªã„å ´åˆ: + +- プライベート㪠"4DSID_*AppName*" cookie ã‚’æŒã¤æ–°ã—ã„セッション㌠Webサーãƒãƒ¼ä¸Šã«ä½œæˆã•れã¾ã™ã€‚ +- æ–°ã—ã„ゲスト `Session` オブジェクトãŒä½œæˆã•れã€ã“ã®ã‚¹ã‚±ãƒ¼ãƒ©ãƒ–ルWebセッション専用ã«ä½¿ç”¨ã•れã¾ã™ã€‚ + +カレント㮠`Session` オブジェクトã¯ã€ã‚らゆる Webプロセスã®ã‚³ãƒ¼ãƒ‰ã«ãŠã„㦠[`Session`](API/SessionClass.md#session) コマンドを介ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +![alt-text](assets/en/WebServer/schemaSession.png) + +> Webプロセスã¯é€šå¸¸çµ‚了ã›ãšã€åŠ¹çŽ‡åŒ–ã®ãŸã‚ã«ãƒ—ールã•れリサイクルã•れã¾ã™ã€‚ プロセスãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å®Ÿè¡Œã‚’終ãˆã‚‹ã¨ã€ãƒ—ãƒ¼ãƒ«ã«æˆ»ã•ã‚Œã€æ¬¡ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾å¿œã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ Webプロセスã¯ã©ã®ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ã‚‚å†åˆ©ç”¨ã§ãã‚‹ãŸã‚ã€å®Ÿè¡Œçµ‚了時ã«ã¯ ([`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/ja/page89.html) ãªã©ã‚’使用ã—) コードã«ã‚ˆã£ã¦ [プロセス変数](Concepts/variables.md#プロセス変数) をクリアã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ 。 ã“ã®ã‚¯ãƒªã‚¢å‡¦ç†ã¯ã€é–‹ã‹ã‚ŒãŸãƒ•ァイルã¸ã®å‚ç…§ãªã©ã€ãƒ—ロセスã«é–¢é€£ã™ã‚‹ã™ã¹ã¦ã®æƒ…å ±ã«å¯¾ã—ã¦å¿…è¦ã§ã™ã€‚ ã“れãŒã€ã‚»ãƒƒã‚·ãƒ§ãƒ³é–¢é€£ã®æƒ…å ±ã‚’ä¿æŒã—ãŸã„å ´åˆã«ã¯ã€[Session](API/SessionClass.md) オブジェクトを使用ã™ã‚‹ã“ã¨ãŒ **推奨** ã•れるç†ç”±ã§ã™ã€‚ + + +## 情報ã®å…±æœ‰ + +å„ `Session` オブジェクトã«ã¯ã€å…±æœ‰ã‚ªãƒ–ジェクトã§ã‚ã‚‹ [`.storage`](API/SessionClass.md#storage) プロパティãŒç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ ã“ã®ãƒ—ロパティã«ã‚ˆã‚Šã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§å‡¦ç†ã•れるã™ã¹ã¦ã®ãƒ—ãƒ­ã‚»ã‚¹é–“ã§æƒ…報を共有ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹æœŸé™ + +スケーラブルWebセッションã¯ã€ä»¥ä¸‹ã®å ´åˆã«é–‰ã˜ã‚‰ã‚Œã¾ã™: + +- Webサーãƒãƒ¼ãŒåœæ­¢ã—ãŸã¨ã。 +- セッションcookie ãŒã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã—ãŸã¨ã。 + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–㪠cookie ã®æœ‰åŠ¹æœŸé™ã¯ã€ãƒ‡ãƒ•ォルトã§ã¯ 60分ã§ã™ã€‚ã¤ã¾ã‚Šã€Webサーãƒãƒ¼ã¯ã€éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’ 60分後ã«è‡ªå‹•çš„ã«é–‰ã˜ã¾ã™ã€‚ + +ã“ã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆã¯ã€`Session` オブジェクト㮠[`.idleTimeout`](API/SessionClass.md#idletimeout) プロパティã§è¨­å®šã§ãã¾ã™ (タイムアウト㯠60分未満ã«ã¯ã§ãã¾ã›ã‚“)。 + +スケーラブルWebセッションãŒé–‰ã˜ã‚‰ã‚ŒãŸå¾Œã« [`Session`](API/SessionClass.md#session) コマンドãŒå‘¼ã³å‡ºã•れるã¨: + +- `Session` オブジェクトã«ã¯æ¨©é™ãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“ (ゲストセッション)。 +- [`.storage`](API/SessionClass.md#storage) プロパティã¯ç©ºã§ã™ã€‚ +- æ–°ã—ã„セッションcookie ãŒã‚»ãƒƒã‚·ãƒ§ãƒ³ã«é–¢é€£ä»˜ã‘られã¦ã„ã¾ã™ã€‚ + + +## æ¨©é™ + +セッションã«ã¯ã€æ¨©é™ã‚’関連付ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ¨©é™ã«å¿œã˜ã¦ã€ç‰¹å®šã®ã‚¢ã‚¯ã‚»ã‚¹ã‚„機能を Webサーãƒãƒ¼ä¸Šã§æä¾›ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +権é™ã‚’割り当ã¦ã‚‹ã«ã¯ã€[`.setPrivileges()`](API/SessionClass.md#setprivileges) 関数を使用ã—ã¾ã™ã€‚ コード内ã§ã¯ã€[`.hasPrivilege()`](API/SessionClass.md#hasprivilege) 関数を使ã£ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æ¨©é™ã‚’ãƒã‚§ãƒƒã‚¯ã—ã€ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã¾ãŸã¯æ‹’å¦ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€æ–°ã—ã„ã‚»ãƒƒã‚·ãƒ§ãƒ³ã¯æ¨©é™ã‚’æŒãŸãšã€**ゲスト** セッションã¨ãªã‚Šã¾ã™ ([`.isGuest()`](API/SessionClass.md#isguest) 関数㯠true ã‚’è¿”ã—ã¾ã™)。 + +> ç¾åœ¨ã®å®Ÿè£…ã§ã¯ (v18 R6)ã€"WebAdmin" アクセス権ã®ã¿åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +例: + +```4d +If (Session.hasPrivilege("WebAdmin")) + // アクセス権ãŒä»˜ä¸Žã•れã¦ã„ã‚‹ã®ã§ã€ä½•ã‚‚ã—ã¾ã›ã‚“ +Else + // èªè¨¼ãƒšãƒ¼ã‚¸ã‚’表示ã—ã¾ã™ +End if +``` + + +## 例題 + +CRMアプリケーションを使ã£ã¦ã€å„営業担当者ãŒè‡ªåˆ†ã®é¡§å®¢ãƒãƒ¼ãƒˆãƒ•ォリオを管ç†ã—ã¾ã™ã€‚ データストアã«ã¯ã€å°‘ãªãã¨ã‚‚ 2ã¤ã®ãƒªãƒ³ã‚¯ã•れãŸãƒ‡ãƒ¼ã‚¿ã‚¯ãƒ©ã‚¹ Customers 㨠SalesPersons ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ (営業担当者ã¯è¤‡æ•°ã®é¡§å®¢ã‚’æŒã¡ã¾ã™)。 + +![alt-text](assets/en/WebServer/exampleSession.png) + +営業担当者ãŒãƒ­ã‚°ã‚¤ãƒ³ã—ã€Webサーãƒãƒ¼ä¸Šã§ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’é–‹ãã€ä¸Šä½3åã®é¡§å®¢ã‚’セッションã«èª­ã¿è¾¼ã¾ã›ãŸã„ã¨ã—ã¾ã™ã€‚ + + +1. セッションを開ããŸã‚ã«ä»¥ä¸‹ã® URL を実行ã—ã¾ã™: + +``` +http://localhost:8044/authenticate.shtml +``` + +> 本番環境ã§ã¯ã€æš—å·åŒ–ã•れã¦ã„ãªã„情報ãŒãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ä¸Šã‚’æµã‚Œã‚‹ã®ã‚’防ããŸã‚ã«ã€[HTTPS接続](API/WebServerClass.md#httpsenabled) を使用ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + + +2. `authenticate.shtml` ページã¯ã€*userId* 㨠*password* ã®å…¥åŠ›ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’å«ã‚€ãƒ•ォームã§ã€4DACTION ã® POSTアクションをé€ä¿¡ã—ã¾ã™: + +```html + + + +
          + UserId:
          + Password:
          + +
          + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. authenticate project メソッドã¯ã€*userID* ã«åˆè‡´ã™ã‚‹æ‹…当者を探ã—ã€*SalesPersons* テーブルã«ä¿å­˜ã•れã¦ã„ã‚‹ãƒãƒƒã‚·ãƒ¥å€¤ã‚’パスワードã¨ç…§åˆã—ã¾ã™ã€‚ + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` \ No newline at end of file diff --git a/website/translated_docs/ja/WebServer/templates.md b/website/translated_docs/ja/WebServer/templates.md new file mode 100644 index 00000000000000..a33a8a478249ca --- /dev/null +++ b/website/translated_docs/ja/WebServer/templates.md @@ -0,0 +1,94 @@ +--- +id: templates +title: テンプレートページ +--- + +4D ã® Webサーãƒãƒ¼ã§ã¯ã€ã‚¿ã‚°ã‚’å«ã‚€ HTMLテンプレートページを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã¤ã¾ã‚Šã€é™çš„㪠HTMLコードã¨ã€4DTEXTã€4DIFã€4DINCLUDEãªã©ã® [変æ›ã‚¿ã‚°](Tags/tags.md) ã«ã‚ˆã£ã¦è¿½åŠ ã•れ㟠4Då‚ç…§ã®çµ„ã¿åˆã‚ã›ã§ã™ã€‚ ã“れらã®ã‚¿ã‚°ã¯é€šå¸¸ã€HTMLタイプã®ã‚³ãƒ¡ãƒ³ãƒˆ (``) ã¨ã—ã¦ã€HTMLã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã«æŒ¿å…¥ã•れã¾ã™ã€‚ + +ã“れらã®ãƒšãƒ¼ã‚¸ãŒ HTTPサーãƒãƒ¼ã‹ã‚‰é€ä¿¡ã•れる際ã€ãƒšãƒ¼ã‚¸ã¯è§£æžã•れã€å«ã¾ã‚Œã¦ã„ã‚‹ã‚¿ã‚°ãŒå®Ÿè¡Œã•れã€çµæžœã®ãƒ‡ãƒ¼ã‚¿ã«ç½®ãæ›ãˆã‚‰ã‚Œã¾ã™ã€‚ ã“ã®ã‚ˆã†ã«ã€ãƒ–ラウザーãŒå—ã‘å–るページã¯ã€é™çš„ãªè¦ç´ ã¨ 4D ã®å‡¦ç†ã«ã‚ˆã‚‹å€¤ãŒçµ„ã¿åˆã‚ã•ã£ãŸã‚‚ã®ã§ã™ã€‚ + +ãŸã¨ãˆã°ã€HTMLページ内ã«ã¦ä»¥ä¸‹ã®ã‚ˆã†ã«è¨˜è¿°ã™ã‚‹ã¨: + +```html +

          ã¸ã‚ˆã†ã“ãï¼

          +``` + +4D変数 *vtSiteName* ã®å€¤ãŒ HTMLãƒšãƒ¼ã‚¸ã«æŒ¿å…¥ã•れã¾ã™ã€‚ + + +## テンプレート用タグ + +以下㮠4Dタグを使用ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- 4DTEXT: 4D変数ãŠã‚ˆã³å¼ã‚’テキストã¨ã—ã¦æŒ¿å…¥ã—ã¾ã™ã€‚ +- 4DHTML: HTMLコードを挿入ã—ã¾ã™ã€‚ +- 4DEVAL: 4Då¼ã‚’評価ã—ã¾ã™ã€‚ +- 4DSCRIPT: 4Dメソッドを実行ã—ã¾ã™ã€‚ +- 4DINCLUDE: ページを他ã®ãƒšãƒ¼ã‚¸ã«å«ã‚ã¾ã™ã€‚ +- 4DBASE: 4DINCLUDE ã‚¿ã‚°ãŒä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ•ォルトフォルダーを変更ã—ã¾ã™ã€‚ +- 4DCODE: 4Dコードを挿入ã—ã¾ã™ã€‚ +- 4DIF, 4DELSE, 4DELSEIF, 4DENDIF: HTMLã‚³ãƒ¼ãƒ‰ã«æ¡ä»¶å¼ã‚’挿入ã—ã¾ã™ã€‚ +- 4DLOOP, 4DENDLOOP: HTMLコードã«ãƒ«ãƒ¼ãƒ—を挿入ã—ã¾ã™ã€‚ +- 4DEACH, 4DENDEACH: コレクション内ã€ã‚¨ãƒ³ãƒ†ã‚£ãƒ†ã‚£ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³å†…ã€ã¾ãŸã¯ã‚ªãƒ–ジェクトã®ãƒ—ロパティをループã—ã¾ã™ã€‚ + +ã“れらã®ã‚¿ã‚°ã«ã¤ã„ã¦ã¯ã€[変æ›ã‚¿ã‚°](Tags/tags.md) ã®ãƒšãƒ¼ã‚¸ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ + +ã‚¿ã‚°ã¯æ··åœ¨ã•ã›ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ãŸã¨ãˆã°ã€æ¬¡ã®ã‚ˆã†ãª HTMLコードãŒèªã‚られã¦ã„ã¾ã™: + +```html + +... + + (メソッド呼ã³å‡ºã—) + (If æ¡ä»¶) + (サブページ挿入) + (End if) + + + + + (カレントセレクションã§ã®ãƒ«ãƒ¼ãƒ—) + (If [TABLE]ValNum>10) + (ã‚µãƒ–ãƒšãƒ¼ã‚¸ã®æŒ¿å…¥) + (Else) + Value:
          (フィールド表示) + + (End for) + + +``` + + +## ã‚¿ã‚°ã®è§£æž + +最é©åŒ–ã®ãŸã‚ã€".HTML" ã¾ãŸã¯ ".HTM" ã‚’æœ«å°¾ã«æŒã¤å˜ç´”㪠URL ã§ HTMLページを呼ã³å‡ºã—ãŸå ´åˆã€4D Webサーãƒãƒ¼ã¯ HTMLソースコードã®è§£æžã‚’ãŠã“ãªã„ã¾ã›ã‚“。 + +4D Web サーãƒãƒ¼ãŒé€ä¿¡ã™ã‚‹ãƒ†ãƒ³ãƒ—レートページã®è§£æžã¯ã€`WEB SEND FILE` (.htm, .html, .sthtm, .shtml)ã€`WEB SEND BLOB` (text/html type BLOB)ã€ã¾ãŸã¯ `WEB SEND TEXT` コマンドãŒå‘¼ã³å‡ºã•れãŸã¨ãã€ãŠã‚ˆã³ URL を使用ã—ã¦å‘¼ã³å‡ºã•れãŸãƒšãƒ¼ã‚¸ã‚’é€ä¿¡ã™ã‚‹ã¨ãã«ãŠã“ãªã‚れã¾ã™ã€‚ URL ã§å‘¼ã³å‡ºã™å ´åˆã€".htm" 㨠".html" ã§çµ‚ã‚ã‚‹ãƒšãƒ¼ã‚¸ã¯æœ€é©åŒ–ã®ãŸã‚è§£æžã•れã¾ã›ã‚“。 ã“ã®å ´åˆã« HTMLページã®è§£æžã‚’強制ã™ã‚‹ã«ã¯ã€æœ«å°¾ã‚’ ".shtm" ã¾ãŸã¯ ".shtml" ã¨ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (例: `http://www.server.com/dir/page.shtm`)。 ã“ã®ã‚¿ã‚¤ãƒ—ã®ãƒšãƒ¼ã‚¸ã®ä½¿ç”¨ä¾‹ã¯ã€`WEB GET STATISTICS` コマンドã®èª¬æ˜Žã«è¨˜è¼‰ã•れã¦ã„ã¾ã™ã€‚ XMLページ (.xmlã€.xsl) もサãƒãƒ¼ãƒˆã•れã¦ãŠã‚Šã€å¸¸ã« 4D ã«ã‚ˆã£ã¦è§£æžã•れã¾ã™ã€‚ + +`PROCESS 4D TAGS` コマンドを使用ã™ã‚‹ã¨ã€Webコンテキスト外ã§ã‚‚è§£æžã‚’ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +内部的ã«ã¯ã€ãƒ‘ーサー㯠UTF-16 文字列ã§å‹•作ã—ã¾ã™ãŒã€è§£æžã™ã‚‹ãƒ‡ãƒ¼ã‚¿ã¯ç•°ãªã‚‹æ–¹æ³•ã§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã•れã¦ã„ã‚‹å ´åˆãŒã‚りã¾ã™ã€‚ ã‚¿ã‚°ã«ãƒ†ã‚­ã‚¹ãƒˆãŒå«ã¾ã‚Œã¦ã„ã‚‹å ´åˆ (`4DHTML` ãªã©)ã€æä¾›ã•れã¦ã„る情報 (charset) や出所ã«å¿œã˜ã¦ã€4D ã¯å¿…è¦ã«å¿œã˜ã¦ãƒ‡ãƒ¼ã‚¿ã‚’変æ›ã—ã¾ã™ã€‚ 以下ã«ã€HTMLページã«å«ã¾ã‚Œã‚‹ã‚¿ã‚°ã‚’ 4D ãŒè§£æžã™ã‚‹å ´åˆã¨ã€ãŠã“ãªã‚れる変æ›ã‚’示ã—ã¾ã™: + +| 動作 / コマンド | é€ä¿¡ãƒšãƒ¼ã‚¸ã®è§£æž | $シンタックスã®ã‚µãƒãƒ¼ãƒˆ(*) | ã‚¿ã‚°è§£æžã«ä½¿ç”¨ã•れる文字セット | +| --------------------------------- | ------------------------------------ | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | +| URL ã§å‘¼ã³å‡ºã•れãŸãƒšãƒ¼ã‚¸ | â—‹ã€ãŸã ã—æ‹¡å¼µå­ãŒ ".htm" ã¾ãŸã¯ ".html" ã®ãƒšãƒ¼ã‚¸ã‚’除ã | â—‹ã€ãŸã ã—æ‹¡å¼µå­ãŒ ".htm" ã¾ãŸã¯ ".html" ã®ãƒšãƒ¼ã‚¸ã‚’除ã | ページ㮠"Content-Type" ヘッダーã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã•ã‚ŒãŸæ–‡å­—セットã«å¾“ã„ã¾ã™ã€‚ ãれãŒç„¡ã„å ´åˆã¯ã€META-HTTP EQUIVタグを探ã—ã¾ã™ã€‚ ãれも無ã‘れã°ã€HTTPサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルト文字セットを使用ã—ã¾ã™ã€‚ | +| `WEB SEND FILE` | â—‹ | - | ページ㮠"Content-Type" ヘッダーã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã•ã‚ŒãŸæ–‡å­—セットã«å¾“ã„ã¾ã™ã€‚ ãれãŒç„¡ã„å ´åˆã¯ã€META-HTTP EQUIVタグを探ã—ã¾ã™ã€‚ ãれも無ã‘れã°ã€HTTPサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルト文字セットを使用ã—ã¾ã™ã€‚ | +| `WEB SEND TEXT` | â—‹ | - | 変æ›ã¯ä¸è¦ã§ã™ã€‚ | +| `WEB SEND BLOB` | â—‹ (BLOB㌠"text/html" åž‹ã®å ´åˆ) | - | レスãƒãƒ³ã‚¹ã® "Content-Type" ãƒ˜ãƒƒãƒ€ãƒ¼ã«æŒ‡å®šã•ã‚ŒãŸæ–‡å­—セットを使ã„ã¾ã™ã€‚ ãれも無ã‘れã°ã€HTTPサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルト文字セットを使用ã—ã¾ã™ã€‚ | +| `` ã‚¿ã‚°ã«ã‚ˆã‚‹æŒ¿å…¥ | â—‹ | â—‹ | ページ㮠"Content-Type" ヘッダーã®ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ãƒ¼ã«æ¸¡ã•ã‚ŒãŸæ–‡å­—セットã«å¾“ã„ã¾ã™ã€‚ ãれãŒç„¡ã„å ´åˆã¯ã€META-HTTP EQUIVタグを探ã—ã¾ã™ã€‚ ãれも無ã‘れã°ã€HTTPサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルト文字セットを使用ã—ã¾ã™ã€‚ | +| `PROCESS 4D TAGS` | â—‹ | â—‹ | テキストデータã¯å¤‰æ›ã—ã¾ã›ã‚“。 BLOBデータã¯ã€äº’æ›æ€§ã®ãŸã‚ã« Mac-Roman 文字セットã‹ã‚‰è‡ªå‹•変æ›ã•れã¾ã™ã€‚ | + +(*) 4DHTMLã€4DTEXTã€4DEVALã‚¿ã‚°ã«ãŠã„ã¦ã¯ã€ä»£æ›¿ã® $ベースシンタックスãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + +## Webã‹ã‚‰ 4Dメソッドã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ + +`4DEACH`ã€`4DELSEIF`ã€`4DEVAL`ã€`4DHTML`ã€`4DIF`ã€`4DLOOP`ã€`4DSCRIPT`ã€ã¾ãŸã¯ `4DTEXT` ã§ Webリクエストã‹ã‚‰ 4Dメソッドを実行ã§ãã‚‹ã‹å¦ã‹ã¯ã€ãƒ¡ã‚½ãƒƒãƒ‰ãƒ—ロパティ㮠"公開オプション: 4D タグ㨠URL(4DACTION...)" 属性ã®è¨­å®šã«ä¾å­˜ã—ã¾ã™ã€‚ ã“ã®å±žæ€§ãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ãªã„メソッドã¯ã€Webリクエストã‹ã‚‰å‘¼ã³å‡ºã™ã“ã¨ãŒã§ãã¾ã›ã‚“。 + + +## 悪æ„ã‚るコードã®ä¾µå…¥ã‚’防止 + +4D変æ›ã‚¿ã‚°ã¯æ§˜ã€…ãªã‚¿ã‚¤ãƒ—ã®ãƒ‡ãƒ¼ã‚¿ã‚’引数ã¨ã—ã¦å—ã‘入れã¾ã™: テキストã€å¤‰æ•°ã€ãƒ¡ã‚½ãƒƒãƒ‰ã€ã‚³ãƒžãƒ³ãƒ‰åã€â€¦ã€‚ ã“れらã®ãƒ‡ãƒ¼ã‚¿ãŒè‡ªåˆ†ã§æ›¸ã„ãŸã‚³ãƒ¼ãƒ‰ã‹ã‚‰æä¾›ã•れる場åˆã€ãã®å—ã‘æ¸¡ã—を自分ã§ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã§ãã‚‹ã®ã§ã€æ‚ªæ„ã‚るコードã®ä¾µå…¥ã®ãƒªã‚¹ã‚¯ã¯ç„¡ã„ã¨è¨€ã£ã¦ã„ã„ã§ã—ょã†ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ データベースã®ã‚³ãƒ¼ãƒ‰æ‰±ã†ãƒ‡ãƒ¼ã‚¿ã¯å¤šãã®å ´åˆã€å¤–部ソース (ユーザー入力ã€èª­ã¿è¾¼ã¿ã€ç­‰) ã‹ã‚‰å°Žå…¥ã•れãŸã‚‚ã®ã§ã™ã€‚ + +ã“ã®å ´åˆã€`4DEVAL` ã‚„ `4DSCRIPT` ãªã©ã®å¤‰æ›ã‚¿ã‚°ã¯ **使用ã—ãªã„** ã®ãŒè³¢æ˜Žã§ã™ã€‚ãªãœãªã‚‰ã“れらã®ã‚¿ã‚°ã¯ã“ã†ã„ã£ãŸãƒ‡ãƒ¼ã‚¿ãŒæ ¼ç´ã•れãŸå¤‰æ•°ã‚’直接評価ã™ã‚‹ã‹ã‚‰ã§ã™ã€‚ + +ã“れã«åŠ ãˆã€[繰り返ã—ã®åŽŸå‰‡](Tags/tags.md#å†èµ·çš„処ç†) ã«å¾“ã„ã€æ‚ªæ„ã‚るコード自身ãŒå¤‰æ›ã‚¿ã‚°ã‚’å«ã‚“ã§ã„ã‚‹å¯èƒ½æ€§ã‚‚ã‚りã¾ã™ã€‚ ã“ã®å ´åˆã€`4DTEXT` タグを使用ã—ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 例ã¨ã—ã¦ã€"Name" ã¨ã„ã†åå‰ã® WebフォームフィールドãŒã‚りã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒãã“ã«åå‰ã‚’入力ã™ã‚‹å ´åˆã‚’考ãˆã¾ã™ã€‚ ã“ã®åå‰ã¯ `` タグを使用ã—ã¦ãƒšãƒ¼ã‚¸å†…ã«è¡¨ç¤ºã•れã¾ã™ã€‚ ã‚‚ã— "``" ã¨ã„ã†ãƒ†ã‚­ã‚¹ãƒˆãŒåå‰ã®ä»£ã‚りã«å…¥åŠ›ã•れãŸã¨ã—ãŸã‚‰ã€ã“ã®ã‚¿ã‚°ã‚’解釈ã™ã‚‹ã¨ã‚¢ãƒ—リケーションã¯çµ‚了ã—ã¦ã—ã¾ã„ã¾ã™ã€‚ ã“ã®ãƒªã‚¹ã‚¯ã‚’é¿ã‘ã‚‹ã«ã¯ã€`4DTEXT` タグを使用ã™ã‚‹ã“ã¨ã§å¯¾å¿œã§ãã¾ã™ã€‚ ã“ã®ã‚¿ã‚°ã¯ç‰¹æ®Š HTML文字をエスケープã™ã‚‹ãŸã‚ã€æŒ¿å…¥ã•ã‚ŒãŸæ‚ªæ„ã‚ã‚‹å†èµ·çš„コードãŒè§£é‡ˆã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 å‰ã®ä¾‹ã§ã„ã†ã¨ã€"Name" フィールドã«ã¯ "``" ãŒå«ã¾ã‚Œã‚‹ã“ã¨ã«ãªã‚Šã€ã“れã¯å¤‰æ›ã•れã¾ã›ã‚“。 diff --git a/website/translated_docs/ja/WebServer/webServer.md b/website/translated_docs/ja/WebServer/webServer.md new file mode 100644 index 00000000000000..93afe292b65fc3 --- /dev/null +++ b/website/translated_docs/ja/WebServer/webServer.md @@ -0,0 +1,62 @@ +--- +id: webServer +title: æ¦‚è¦ +--- + +4D ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒ¢ãƒ¼ãƒ‰ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã€ãŠã‚ˆã³ 4D Server ã«ã¯ Webサーãƒãƒ¼ã‚¨ãƒ³ã‚¸ãƒ³ (HTTPサーãƒãƒ¼) ãŒã‚りã¾ã™ã€‚ã“ã® Webサーãƒãƒ¼ã‚¨ãƒ³ã‚¸ãƒ³ã‚’使用ã—ã¦ã€4Dデータベースを最大é™ã«æ´»ç”¨ã§ãる強力㪠Webアプリケーションを設計・公開ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ç°¡å˜ãªãƒ¢ãƒ‹ã‚¿ãƒªãƒ³ã‚° + +Webアプリケーションã®å…¬é–‹ã¯ã€ã„ã¤ã§ã‚‚é–‹å§‹ã¾ãŸã¯åœæ­¢ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã€ã¾ãŸã¯ãƒ©ãƒ³ã‚²ãƒ¼ã‚¸ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã™ã‚‹ã ã‘ã§ã€æ“作ã§ãã¾ã™ã€‚ + +4D Webサーãƒãƒ¼ã®ç›£è¦–ã‚‚ç°¡å˜ã§ã€4D Server ã®ç®¡ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚„ [専用URL](webServerAdmin.md#管ç†ç”¨-url) を使ã£ã¦ãŠã“ãªã†ã“ã¨ãŒã§ãã¾ã™ã€‚ + +## ã™ãã«ä½¿ãˆã¾ã™ + +4D Webサーãƒãƒ¼ã¯ã€ãƒ‡ãƒ•ォルトã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダーã¨ãƒ‡ãƒ•ォルトã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã‚’自動作æˆã™ã‚‹ãŸã‚ã€ã™ãã«åˆ©ç”¨ã§ãã¾ã™ã€‚ + +## セキュリティ + +データセキュリティã¯ã€4D Webサーãƒãƒ¼ã®å®Ÿè£…ã®ã™ã¹ã¦ã®æ®µéšŽã«å­˜åœ¨ã—ã¾ã™ã€‚ セキュリティレベルã¯èª¿æ•´å¯èƒ½ã§ã€ãƒ‡ãƒ•ォルト設定ã§ã¯é€šå¸¸ã€ã‚‚ã£ã¨ã‚‚安全ãªã‚ªãƒ—ションãŒé¸æŠžã•れã¾ã™ã€‚ 4D Webサーãƒãƒ¼ã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ã¯ã€ä»¥ä¸‹ã®è¦ç´ ã«åŸºã¥ã„ã¦ã„ã¾ã™: + +* [**TLSプロトコル (HTTPS)**](Admin/tls.md) ã®æ‹¡å¼µã‚µãƒãƒ¼ãƒˆã€‚ + +* **èªè¨¼**: ビルトインã®è¨­å®šãŠã‚ˆã³ã€ãƒ•ォールãƒãƒƒã‚¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ (Webサーãƒãƒ¼ç”¨ã® [`On Web Authentication`](authentication.md#on-web-authentication)ã€RESTサーãƒãƒ¼ç”¨ã® [`On REST Authentication`](REST/configuration.md#on-rest-authentication-データベースメソッドを使用ã™ã‚‹)) ã«åŸºã¥ã柔軟ã§ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºå¯èƒ½ãª [èªè¨¼æ©Ÿèƒ½](authentication.md) + +* **公開ã™ã‚‹ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã®ç®¡ç†**: 明示的ã«å…¬é–‹ã—ãŸè¦ç´ ã®ã¿ãŒã€Web ã‚„ RESTリクエストã§ç›´æŽ¥åˆ©ç”¨ã§ãã¾ã™ã€‚ 次ã®ã‚‚ã®ã«ã¤ã„ã¦ã€å®£è¨€ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™: + - HTTPリクエストã§å…¬é–‹ã™ã‚‹ [プロジェクトメソッド](allowProject.md) + - RESTリクエストã§å…¬é–‹ã™ã‚‹ [ORDAã®ãƒ‡ãƒ¼ã‚¿ãƒ¢ãƒ‡ãƒ«ã‚¯ãƒ©ã‚¹é–¢æ•°](ORDA/ordaClasses.md#公開vséžå…¬é–‹é–¢æ•°) + - RESTリクエストã«å…¬é–‹ã—ãªã„ [テーブルやフィールド](REST/configuration.md#テーブルやフィールドã®å…¬é–‹) テーブルやフィールド + +* [デフォルトHTMLルート](webServerConfig.md#ルートフォルダー) フォルダーを定義ã™ã‚‹ã“ã¨ã«ã‚ˆã‚‹ **サンドボックス化** + +* **サーãƒãƒ¼ã«ã‚ˆã‚‹ãƒªã‚½ãƒ¼ã‚¹ä½¿ç”¨ã®ç®¡ç†** (例: [æœ€å¤§åŒæ™‚Webプロセス](webServerConfig.html#æœ€å¤§åŒæ™‚Webプロセス)オプション) +> 4Dã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£æ©Ÿèƒ½ã®æ¦‚è¦ã«ã¤ã„ã¦ã¯ã€[4D Security guide](https://blog.4d.com/4d-security-guide/) ã‚’ã”覧ãã ã•ã„。 + + +## ユーザーセッション + +4D Webサーãƒãƒ¼ã«ã¯ cookie を使用ã™ã‚‹ã€å®Œå…¨ã«è‡ªå‹•化ã•れ㟠[Webセッション](sessions.md) (ユーザーセッション) ç®¡ç†æ©Ÿèƒ½ãŒã‚りã¾ã™ã€‚ + + +## RESTリクエストã¸ã®ã‚²ãƒ¼ãƒˆã‚¦ã‚§ã‚¤ + +4D Webサーãƒãƒ¼ã«ã‚ˆã‚Šã€4Dアプリケーションã«ä¿å­˜ã•れã¦ã„るデータ㫠RESTリクエストを通ã˜ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã«ãªã‚Šã¾ã™ã€‚ RESTリクエストã«ã‚ˆã£ã¦ã€ãƒ‡ãƒ¼ã‚¿ã®è¿½åŠ ãƒ»èª­ã¿å–ã‚Šãƒ»ç·¨é›†ãƒ»ä¸¦ã¹æ›¿ãˆãƒ»æ¤œç´¢ãªã©ã€ã‚らゆるデータベースæ“作ã«ç›´æŽ¥ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ã€‚ + +RESTリクエストã®è©³ç´°ã«ã¤ã„ã¦ã¯ã€[RESTサーãƒãƒ¼](REST/gettingStarted.md) ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§ãã ã•ã„。 + +## 拡張設定 + +4D Webサーãƒãƒ¼ã®æ§‹æˆã¯ã€ã‚¢ãƒ—リケーションレベルã®åŒ…括的ãªè¨­å®šã«ã‚ˆã£ã¦å®šç¾©ã•れã¾ã™ã€‚ã“ã®è¨­å®šã¯ã€`webServer` オブジェクトã®ãƒ—ロパティã¾ãŸã¯ `WEB SET OPTION` コマンドを使用ã—ã¦ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³æ¯Žã«ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + +## テンプレートã¨URL + +4D Webサーãƒãƒ¼ã¯ã€ãƒ†ãƒ³ãƒ—レートページãŠã‚ˆã³å°‚用ã®URLを介ã—ã¦ã€4Dアプリケーションã«ä¿å­˜ã•れã¦ã„るデータã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ã€‚ + +- テンプレートページã«ã¯ã€ãƒ–ラウザーã«é€ä¿¡ã•れる際㫠Webサーãƒãƒ¼ã®å‡¦ç†ã‚’é–‹å§‹ã™ã‚‹ [特別ãªã‚¿ã‚°](templates.md) ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +- [専用ã®URL](httpRequests) ã¯ã€ä»»æ„ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã™ã‚‹ãŸã‚ã« 4D を呼ã³å‡ºã™ã‚‚ã®ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒ HTMLフォームを POST ã—ãŸã¨ãã«å‡¦ç†ã‚’é–‹å§‹ã™ã‚‹ãƒ•ォームアクションã¨ã—ã¦ã‚‚使用ã§ãã¾ã™ã€‚ + +## 専用ã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ + +`On Web Authentication`ã€`On Web Connection`ã€ãŠã‚ˆã³ `On REST Authentication` データベースメソッドã¯ã€Webサーãƒãƒ¼ã«ãŠã„ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ã‚¨ãƒ³ãƒˆãƒªãƒ¼ãƒã‚¤ãƒ³ãƒˆã§ã‚りã€ã‚らゆるタイプã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’評価・ルーティングã™ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ diff --git a/website/translated_docs/ja/WebServer/webServerAdmin.md b/website/translated_docs/ja/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..8663ebbd52f60d --- /dev/null +++ b/website/translated_docs/ja/WebServer/webServerAdmin.md @@ -0,0 +1,231 @@ +--- +id: webServerAdmin +title: ç®¡ç† +--- + +4Dã«ã¯ã€çµ±åˆã•れ㟠Webサーãƒãƒ¼ã‚’èµ·å‹•ãƒ»åœæ­¢ãƒ»ç›£è¦–ã™ã‚‹ãŸã‚ã®ãƒ„ールãŒã„ãã¤ã‹ç”¨æ„ã•れã¦ã„ã¾ã™ã€‚ + + +## 4D Webサーãƒãƒ¼ã®é–‹å§‹ + +> 4D ã‚„ 4D Server ã® Webサーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹ã«ã¯ã€"4D Web Application" ライセンスãŒå¿…è¦ã§ã™ã€‚ 詳細ã«ã¤ã„ã¦ã¯ [4D Webサイト](https://www.4d.com) ã‚’å‚ç…§ãã ã•ã„。 + + +4Dプロジェクトã¯ã€ãƒ¡ã‚¤ãƒ³ (ホスト) アプリケーションãŠã‚ˆã³ã€ãƒ›ã‚¹ãƒˆã•れãŸå„コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã‚’èµ·å‹•ã—ã¦ç›£è¦–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +4D Webサーãƒãƒ¼ã¯è¤‡æ•°ã®æ–¹æ³•ã§èµ·å‹•ã§ãã¾ã™: + +* ボタン/メニューコマンドã®ä½¿ç”¨ã€‚ + * 4D: **実行 > Webサーãƒãƒ¼é–‹å§‹** メニュー
          ![](assets/en/WebServer/start1.png) + * 4D Server: HTTPサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã® **HTTPサーãƒãƒ¼é–‹å§‹** ボタン
          ![](assets/en/WebServer/start2.png) + +* 4Dアプリケーション開始時㫠Webサーãƒãƒ¼ã‚’自動起動。 ã“れã«ã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **Web/設定**ページを表示ã—ã€**開始時ã«Webサーãƒãƒ¼ã‚’èµ·å‹•** オプションを有効ã«ã—ã¾ã™:
          ![](assets/en/WebServer/config.png) + +* [`webServer.start()`](API/WebServerClass.md#start) 関数ã¾ãŸã¯ `WEB START SERVER` コマンドを呼ã³å‡ºã—ã¦ãƒ—ログラムã§é–‹å§‹ã€‚ + +コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® WebServer オブジェクトã«å¯¾ã—㦠[`webServer.start()`](API/WebServerClass.md#start) 関数を呼ã³å‡ºã™ã“ã¨ã§é–‹å§‹ã§ãã¾ã™ã€‚ +> Webサーãƒãƒ¼ã‚’é–‹å§‹ã—ãŸã‚Šåœæ­¢ã—ãŸã‚Šã™ã‚‹ãŸã‚ã«ã€4Dアプリケーションをå†èµ·å‹•ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 + +## 4D Webサーãƒãƒ¼ã®åœæ­¢ + +4D Webサーãƒãƒ¼ã¯è¤‡æ•°ã®æ–¹æ³•ã§åœæ­¢ã§ãã¾ã™: + +* 4D ã® **実行 > Webサーãƒãƒ¼åœæ­¢** メニューを使用ã™ã‚‹ã‹ã€ 4D Server ã«ã¦ HTTPサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã® **HTTPサーãƒãƒ¼åœæ­¢** ボタンを使用ã™ã‚‹ (ã„ãšã‚Œã‚‚ã€ã‚µãƒ¼ãƒãƒ¼é–‹å§‹å‰ã¯ **…開始** ã¨è¡¨ç¤ºã•れã¦ã„ã¾ã™)。 + +* [`webServer.stop()`](API/WebServerClass.md#stop) 関数ã¾ãŸã¯ `WEB STOP SERVER` コマンドを呼ã³å‡ºã—ã¦ãƒ—ログラムã§åœæ­¢ã€‚ + +コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã¯ã€ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã® WebServer オブジェクトã«å¯¾ã—㦠`webServer.stop()` 関数を呼ã³å‡ºã™ã“ã¨ã§åœæ­¢ã§ãã¾ã™ã€‚ + + +## 4D Webサーãƒãƒ¼ã®ãƒ†ã‚¹ãƒˆ + +**Webサーãƒãƒ¼ãƒ†ã‚¹ãƒˆ** メニューコマンドを使用ã—ã¦ãƒ“ルトイン㮠Webサーãƒãƒ¼ãŒæ­£ã—ã実行ã•れã¦ã„ã‚‹ã‹ç¢ºèªã§ãã¾ã™ (4Dã®ã¿)。 ã“ã®ãƒ¡ãƒ‹ãƒ¥ãƒ¼ã¯ Webサーãƒãƒ¼ãŒå®Ÿè¡Œã•れã¦ã„ã‚‹ã¨ãã« **実行** メニューã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™: + +![](assets/en/WebServer/test1.png) + + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’é¸æŠžã™ã‚‹ã¨ã€4DアプリケーションãŒå…¬é–‹ã—ã¦ã„ã‚‹ Webサイトã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ãŒã€ãƒ‡ãƒ•ォルト Webブラウザーã«è¡¨ç¤ºã•れã¾ã™: + +![](assets/en/WebServer/defaultHomePage.png) + + +ã“ã®ã‚³ãƒžãƒ³ãƒ‰ã§ Webサーãƒãƒ¼ã®å‹•作やã€ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã®è¡¨ç¤ºãªã©ã‚’検証ã§ãã¾ã™ã€‚ ページã¯ã€WebブラウザーãŒå®Ÿè¡Œã•れã¦ã„るマシン㮠IPアドレスを指定ã™ã‚‹æ¨™æº–ã®ã‚·ãƒ§ãƒ¼ãƒˆã‚«ãƒƒãƒˆã§ã‚ã‚‹ã€*ローカルホスト* ã® URL を使用ã—ã¦å‘¼ã³å‡ºã•れã¾ã™ã€‚ コマンドã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã§æŒ‡å®šã•れ㟠[TCP 公開ãƒãƒ¼ãƒˆ](webServerConfig.md#http-ãƒãƒ¼ãƒˆ) 番å·ã‚’考慮ã«å…¥ã‚Œã¾ã™ã€‚ + + + +## キャッシュクリア + +ã„ã¤ã§ã‚‚ページやイメージをキャッシュã‹ã‚‰ã‚¯ãƒªã‚¢ã§ãã¾ã™ (ãŸã¨ãˆã°ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã‚’æ›´æ–°ã—ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«ãれをリロードã•ã›ãŸã„å ´åˆ)。 + +ã“れをãŠã“ãªã†ã«ã¯: + +- 4D: ストラクãƒãƒ£ãƒ¼è¨­å®šã® Web / オプション (I) ページ㮠**キャッシュクリア** ボタンをクリックã—ã¾ã™ã€‚ +- 4D Server: [4D Server 管ç†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦](Admin/server-admin.md#httpサーãƒãƒ¼ãƒšãƒ¼ã‚¸) ã® HTTPサーãƒãƒ¼ãƒšãƒ¼ã‚¸ã«ã¦ã€**キャッシュクリア** ボタンをクリックã—ã¾ã™ã€‚ + +キャッシュã¯å³åº§ã«ã‚¯ãƒªã‚¢ã•れã¾ã™ã€‚ +> 特殊ãªURL [/4DCACHECLEAR](#4dcacheclear) を使用ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ + + + +## ランタイムエクスプローラー + +Webサーãƒãƒ¼ã«é–¢é€£ã™ã‚‹æƒ…å ±ã¯ã€ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ローラーã«ã‚ã‚‹ **ウォッãƒ** ページ (**Web** 項目内) ã«è¡¨ç¤ºã•れã¾ã™ã€‚ + +* **Webキャッシュ使用**: Webキャッシュã«å­˜åœ¨ã™ã‚‹ãƒšãƒ¼ã‚¸æ•°ã¨ãã®ä½¿ç”¨çŽ‡ã‚’ç¤ºã—ã¾ã™ã€‚ Webサーãƒãƒ¼ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚ºãŒ 0 より大ãã„å ´åˆã®ã¿ã€ã“ã®æƒ…å ±ãŒåˆ©ç”¨ã§ãã¾ã™ã€‚ + +* **Webサーãƒãƒ¼çµŒéŽæ™‚é–“**: Webサーãƒãƒ¼ã®ä½¿ç”¨æ™‚é–“ã‚’ (時間 : 分: ç§’ フォーマットã§) 示ã—ã¾ã™ã€‚ Webサーãƒãƒ¼ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹å ´åˆã®ã¿ã€ã“ã®æƒ…å ±ãŒåˆ©ç”¨ã§ãã¾ã™ã€‚ + +* **Webヒット数**: Webサーãƒãƒ¼ãŒèµ·å‹•ã—ã¦ã‹ã‚‰å—ã‘å–ã£ãŸ HTTPリクエストã®ç·æ•°ã¨ã€æ¯Žç§’ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã‚’示ã—ã¾ã™ (ãƒ©ãƒ³ã‚¿ã‚¤ãƒ ã‚¨ã‚¯ã‚¹ãƒ—ãƒ­ãƒ¼ãƒ©ãƒ¼ã®æ›´æ–°ã®é–“ã§æ¸¬å®š) 。 Webサーãƒãƒ¼ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ã§ã‚ã‚‹å ´åˆã®ã¿ã€ã“ã®æƒ…å ±ãŒåˆ©ç”¨ã§ãã¾ã™ã€‚ + + + + +## 管ç†ç”¨ URL + +Webサイト管ç†ç”¨ã® URL を使用ã—ã¦ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã«å…¬é–‹ã—ã¦ã„ã‚‹ Webサイトをコントロールã§ãã¾ã™ã€‚ 4D Webサーãƒãƒ¼ã¯ã€*/4DSTATS*ã€*/4DHTMLSTATS*ã€*/4DCACHECLEAR* 㨠*/4DWEBTEST* ã® 4ã¤ã® URL ã‚’å—ã‘入れã¾ã™ã€‚ + +> */4DSTATS*ã€*/4DHTMLSTATS* 㨠*/4DCACHECLEAR* ã¯ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®è¨­è¨ˆè€…ã¨ç®¡ç†è€…ã®ã¿ãŒåˆ©ç”¨å¯èƒ½ã§ã™ã€‚ 4D ã®ãƒ‘スワードシステムãŒèµ·å‹•ã•れã¦ã„ãªã„ã¨ã€ã“れら㮠URL ã¯ã™ã¹ã¦ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã«å¯¾ã—ã¦åˆ©ç”¨å¯èƒ½ã¨ãªã‚Šã¾ã™ã€‚ */4DWEBTEST* ã¯ã€å¸¸ã«åˆ©ç”¨å¯èƒ½ã§ã™ã€‚ + + +### /4DSTATS + +**/4DSTATS** URL ã¯ä»¥ä¸‹ã®æƒ…報を (ブラウザーã§è¡¨ç¤ºå¯èƒ½ãª) HTML ã®è¡¨å½¢å¼ã§è¿”ã—ã¾ã™: + +| é …ç›® | 説明 | +| -------------------- | --------------------------------- | +| ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚º | Webサーãƒãƒ¼ã®ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| 最大キャッシュサイズ | ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å¤§ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| キャッシュã•れãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æœ€å¤§ã‚µã‚¤ã‚º | キャッシュã•れãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆä¸­ã§æœ€ã‚‚大ããªã‚‚ã® (ãƒã‚¤ãƒˆå˜ä½) | +| 使用キャッシュ | キャッシュ使用率 | +| キャッシュã•れã¦ã„るオブジェクト | キャッシュã•れã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•° (**ピクãƒãƒ£ãƒ¼å«ã‚€**)。 | + +ã“ã®æƒ…報を用ã„ã¦ã€ã‚µãƒ¼ãƒãƒ¼ã®æ©Ÿèƒ½ã‚’確èªã™ã‚‹ã“ã¨ãŒã§ãã€æœ€çµ‚çš„ã«ã¯å¯¾å¿œã™ã‚‹ãƒ‘ラメーターをé©åˆã•ã›ã¾ã™ã€‚ +> `WEB GET STATISTICS` コマンドを使用ã—ã¦ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã«å¯¾ã—ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã©ã®ã‚ˆã†ã«ä½¿ç”¨ã•れã¦ã„ã‚‹ã‹ã«é–¢ã™ã‚‹æƒ…報を入手ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +### /4DHTMLSTATS + +*/4DHTMLSTATS* URL ã¯ã€*/4DSTATS* URLã¨åŒã˜æƒ…報を HTML表形å¼ã§è¿”ã—ã¾ã™ã€‚ ãã®é•ã„㯠**キャッシュã•れã¦ã„るオブジェクト** ã« HTMLãƒšãƒ¼ã‚¸ã®æƒ…å ±ã®ã¿ãŒè¿”ã•れã€ãƒ”クãƒãƒ£ãƒ¼ãƒ•ァイルをカウントã—ãªã„ã“ã¨ã§ã™ã€‚ ã•らã«ã“ã® URL 㯠**フィルターã•れãŸã‚ªãƒ–ジェクト** ã®æƒ…報を返ã—ã¾ã™ã€‚ + +| é …ç›® | 説明 | +| -------------------- | --------------------------------------- | +| ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚º | Webサーãƒãƒ¼ã®ç¾åœ¨ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| 最大キャッシュサイズ | ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ€å¤§ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½) | +| キャッシュã•れãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æœ€å¤§ã‚µã‚¤ã‚º | キャッシュã•れãŸã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆä¸­ã§æœ€ã‚‚大ããªã‚‚ã® (ãƒã‚¤ãƒˆå˜ä½) | +| 使用キャッシュ | キャッシュ使用率 | +| キャッシュã•れã¦ã„るオブジェクト | キャッシュã•れã¦ã„ã‚‹ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•° (**ピクãƒãƒ£ãƒ¼ã‚’除ã**)。 | +| フィルターã•れãŸã‚ªãƒ–ジェクト | URL ã§ã‚«ã‚¦ãƒ³ãƒˆã•れãªã„キャッシュ中ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ•° (特ã«ãƒ”クãƒãƒ£ãƒ¼)。 | + + +### /4DCACHECLEAR + +*/4DCACHECLEAR* URLã¯ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã¨ã‚¤ãƒ¡ãƒ¼ã‚¸ã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’å³åº§ã«æ¶ˆåŽ»ã—ã¾ã™ã€‚ ãã®ãŸã‚ã€ä¿®æ­£ã•れãŸãƒšãƒ¼ã‚¸ã‚’ "強制的ã«" æ›´æ–°ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +### /4DWEBTEST + +*/4DWEBTEST* URLã¯ã€Webサーãƒãƒ¼ã®çŠ¶æ…‹ã‚’ç¢ºèªã™ã‚‹ãŸã‚ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ ã“ã®URLãŒå‘¼ã³å‡ºã•れるã¨ã€4D ã¯ä»¥ä¸‹ã® HTTPフィールドを記ã—ãŸãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイルを返ã—ã¾ã™ã€‚ + +| HTTPフィールド | 説明 | 例題 | +| ---------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| Date | RFC 822 フォーマットã§ã®ç¾åœ¨ã®æ—¥ä»˜ | Mon, 7 Dec 2020 13:12:50 GMT | +| Server | 4D/ãƒãƒ¼ã‚¸ãƒ§ãƒ³ç•ªå· | 4D/18.5.0 (Build 18R5.257368) | +| User-Agent | åå‰ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ @ IPクライアントアドレス | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1 | + + + +## ログ + +4Dã§ã¯ã€Webリクエストã®ãƒ­ã‚°ã‚’2種類作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: + +- Webサーãƒãƒ¼ã®é–‹ç™ºæ®µéšŽã§æœ‰ç”¨ãªãƒ‡ãƒãƒƒã‚°ãƒ­ã‚° (*HTTPDebugLog.txt*)。 +- ãŠã‚‚ã«çµ±è¨ˆç›®çš„ã§ä½¿ç”¨ã•ã‚Œã‚‹ã€æ¨™æº–化ã•れ㟠Webリクエストログ (*logweb.txt*)。 + +両方ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€ã‚¢ãƒ—リケーションプロジェクト㮠**Logs** フォルダーã«è‡ªå‹•çš„ã«ä½œæˆã•れã¾ã™ã€‚ + +### HTTPDebugLog.txt + +[`WebServer` オブジェクト](webServerObject.md) ã¾ãŸã¯ `WEB SET OPTION` コマンドを使ã£ã¦ã€[http デãƒãƒƒã‚°ãƒ•ァイル](webServerConfig.md#デãƒãƒƒã‚°ãƒ­ã‚°) を有効化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€å„ HTTPリクエストã¨ãれãžã‚Œã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’ rawモードã§è¨˜éŒ²ã—ã¾ã™ã€‚ ヘッダーをå«ã‚€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå…¨ä½“ãŒè¨˜éŒ²ã•れã€ã‚ªãƒ—ションã§ãƒœãƒ‡ã‚£éƒ¨åˆ†ã‚‚記録ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +リクエストã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ä¸¡æ–¹ã«å¯¾ã—ã¦ä»¥ä¸‹ã®ãƒ•ィールドãŒè¨˜éŒ²ã•れã¾ã™: + +| フィールドå | 説明 | +| -------------- | ----------------------------------- | +| SocketID | 通信ã«ä½¿ç”¨ã•れãŸã‚½ã‚±ãƒƒãƒˆã® ID | +| PeerIP | ホスト (ã‚ã‚‹ã„ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ã® IPv4アドレス | +| PeerPort | ホスト (ã‚ã‚‹ã„ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ) ãŒä½¿ç”¨ã—ãŸãƒãƒ¼ãƒˆç•ªå· | +| TimeStamp | (システムãŒé–‹å§‹ã•れã¦ã‹ã‚‰ã®) ミリ秒å˜ä½ã§ã®ã‚¿ã‚¤ãƒ ã‚¹ã‚¿ãƒ³ãƒ— | +| ConnectionID | 接続UUID (通信ã«ä½¿ç”¨ã•れ㟠VTCPSocket ã® UUID) | +| SequenceNumber | ログセッション内ã§å›ºæœ‰ã‹ã¤ã‚·ãƒ¼ã‚±ãƒ³ã‚·ãƒ£ãƒ«ãªã‚ªãƒšãƒ¬ãƒ¼ã‚·ãƒ§ãƒ³ç•ªå· | + + +### logweb.txt + +[`WebServer` オブジェクト](webServerObject.md)ã€`WEB SET OPTION` コマンドã€ã¾ãŸã¯ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **Web/ログ (タイプ)** ページを使ã£ã¦ã€[Webログファイル](webServerConfig.md#ログã®è¨˜éŒ²) を有効化ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ ログã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +#### CLF/DLF + +ãれãžã‚Œã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒè¡Œå˜ä½ã§ãƒ•ァイル内ã«è¡¨ç¤ºã•れã¾ã™: *host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length*。å„フィールドã¯ã‚¹ãƒšãƒ¼ã‚¹ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œã€å„行㯠CR/LF シーケンス (character 13ã€character 10) ã§çµ‚りã¾ã™ã€‚ + +DLF (Combined Log Format) フォーマット㯠CLF (Common Log Format) フォーマットã¨é¡žä¼¼ã—ã¦ã„ã¦ã€ã¾ã£ãŸãåŒã˜æ§‹é€ ã‚’使用ã—ã¾ã™ã€‚ ã•らã«ã€å„ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ€å¾Œã«2ã¤ã®HTTPフィールドã€Referer 㨠User-agent を追加ã—ã¾ã™ã€‚ CLF/DLF フォーマット (カスタマイズä¸å¯) ã«ã¤ã„ã¦ã®èª¬æ˜Žã§ã™: + +| フィールドå | 説明 | +| -------------------- | --------------------------------------------------------------------------------- | +| host | クライアント㮠IPアドレス (例: 192.100.100.10) | +| rfc931 | 4Dã«ã‚ˆã£ã¦ä½œæˆã•れãªã„情報。常㫠- (マイナス記å·) ã§ã™ã€‚ | +| user | èªè¨¼ã•れã¦ã„るユーザーåã€ã‚ã‚‹ã„ã¯ã€- (マイナス記å·) 。 ユーザーåã«ã‚¹ãƒšãƒ¼ã‚¹ãŒå«ã¾ã‚Œã‚‹ã¨ã€_ (下線) ã«ç½®ãæ›ã‚りã¾ã™ã€‚ | +| DD/MMM/YYYY:HH:MM:SS | DD: æ—¥ã€MMM: 月を表ã™3文字ã®ç•¥å· (Janã€Febãªã©)ã€YYYY: å¹´ã€HH: 時間ã€MM: 分ã€SS: 秒。 æ—¥ä»˜ã¨æ™‚é–“ã¯ã‚µãƒ¼ãƒãƒ¼ã®ãƒ­ãƒ¼ã‚«ãƒ«ã‚¿ã‚¤ãƒ ã€‚ | +| request | クライアントã«ã‚ˆã£ã¦é€ã‚‰ã‚ŒãŸãƒªã‚¯ã‚¨ã‚¹ãƒˆ (例: GET /index.htm HTTP/1.0) 。 | +| state | サーãƒãƒ¼ã®è¿”答。 | +| length | è¿”ã•れãŸãƒ‡ãƒ¼ã‚¿ (HTTPヘッダー以外) ã®ã‚µã‚¤ã‚ºã¾ãŸã¯ 0 | +| Referer | DLF ã®ã¿ - リクエストã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’指ã—ã¦ã„るページ㮠URL ã‚’å«ã¿ã¾ã™ã€‚ | +| User-agent | DLF ã®ã¿ - リクエストã®ã‚ªãƒªã‚¸ãƒ³ã«ãŠã‘るクライアントã®ãƒ–ラウザーã¾ãŸã¯ã‚½ãƒ•トウェアã®åå‰ã¨ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’å«ã¿ã¾ã™ã€‚ | + +#### ELF/WLF + +ELF (Extended Log Format) フォーマット㯠HTTPブラウザー界ã§åºƒãæ™®åŠã—ã¦ã„ã¾ã™ã€‚ ãã—ã¦ã€ç‰¹åˆ¥ãªãƒ‹ãƒ¼ã‚ºã«å¿œãˆã‚‹æ´—ç·´ã•れãŸãƒ­ã‚°ã‚’構築ã—ã¾ã™ã€‚ ã“ã®ç†ç”±ã«ã‚ˆã‚Šã€ELFフォーマットã¯ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•れã¾ã™ã€‚記録ã™ã‚‹ãƒ•ィールドやãã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’ãƒ•ã‚¡ã‚¤ãƒ«ã¸æŒ¿å…¥ã™ã‚‹é †ç•ªã‚’é¸æŠžã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ + +WLF (WebStar Log Format) フォーマット㯠4D WebSTAR サーãƒãƒ¼ç”¨ã¨ã—ã¦ç‰¹åˆ¥ã«é–‹ç™ºã•れã¾ã—ãŸã€‚ + +##### フィールドã®è¨­å®š + +ELF ã¾ãŸã¯ WLF ã‚’é¸æŠžã™ã‚‹ã¨ã€é¸æŠžã•れãŸãƒ•ォーマットã«å¯¾ã—ã¦åˆ©ç”¨å¯èƒ½ãªãƒ•ィールド㌠"Weg Log Token Selection" エリアã«è¡¨ç¤ºã•れã¾ã™ã€‚ ログã«å«ã‚€å„ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é¸æŠžã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ ã“れã«ã¯ã€é¸æŠžã™ã‚‹ãƒ•ィールドã«ãƒã‚§ãƒƒã‚¯ã‚’入れã¾ã™ã€‚ +> åŒã˜ãƒ•ィールドを 2åº¦é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + +å„フォーマットã§åˆ©ç”¨å¯èƒ½ãªãƒ•ィールド (アルファベット順) ã¨ãã®å†…容を以下ã®ãƒ†ãƒ¼ãƒ–ルã«ç¤ºã—ã¾ã™: + +| フィールド | ELF | WLF | 値 | +| -------------- | --- | --- | -------------- | +| BYTES_RECEIVED | | â—‹ | サーãƒãƒ¼ãŒå—ã‘å–ã£ãŸãƒã‚¤ãƒˆæ•° | + BYTES_SENT| X| X| サーãƒãƒ¼ãŒã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«é€ã£ãŸãƒã‚¤ãƒˆæ•°| C_DNS| X| X |DNS ã® IPアドレス (ELF: C_IP フィールドã¨åŒä¸€ã®ãƒ•ィールド)| C_IP| X| X| クライアント㮠IPアドレス (例: 192.100.100.10)| CONNECTION_ID| |X| 接続ID番å·| CS(COOKIE)| X| X| HTTPãƒªã‚¯ã‚¨ã‚¹ãƒˆã«æ ¼ç´ã•れã¦ã„ã‚‹ cookie ã«é–¢ã™ã‚‹æƒ…å ± | CS(HOST)| X| X| HTTPリクエスト㮠Hostフィールド | CS(REFERER)| X| X| リクエストã•れãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’指ã™ãƒšãƒ¼ã‚¸ã® URL| CS(USER_AGENT)| X| X| ソフトウェアã«é–¢ã™ã‚‹æƒ…å ±ã¨ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ã‚ªãƒšãƒ¬ãƒ¼ãƒ†ã‚£ãƒ³ã‚°ã‚·ã‚¹ãƒ†ãƒ  | CS_SIP| X| X| サーãƒãƒ¼ã® IPアドレス | CS_URI| X| X| リクエストãŒä½œæˆã•れる URI | CS_URI_QUERY| X| X| リクエストをクエリã™ã‚‹å¼•æ•°| CS_URI_STEM| X| X| エリ引数ã®ãªã„リクエストã®ãƒ‘ート | DATE| X| X| DD: æ—¥ã€MMM: 月を表ã™3文字ã®ç•¥å· (Janã€Febãªã©)ã€YYYY: å¹´| METHOD| X| X| サーãƒãƒ¼ã¸é€ã‚‰ã‚Œã‚‹ãƒªã‚¯ã‚¨ã‚¹ãƒˆç”¨ã® HTTPメソッド | PATH_ARGS| | X| CGI引数: “$†ã®å¾Œã«ç¶šã文字列| STATUS| X| X| サーãƒãƒ¼ã®è¿”ç­” | TIME| X| X| HH: 時間ã€MM: 分ã€SS: ç§’| TRANSFER_TIME| X| X| 返答を作æˆã™ã‚‹ãŸã‚ã«ã‚µãƒ¼ãƒãƒ¼ã«ã‚ˆã£ã¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã•ã‚ŒãŸæ™‚é–“| USER| X| X| èªè¨¼ã•れãŸå ´åˆã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼å。ãã®ä»–ã®å ´åˆã¯ - (マイナス記å·)。

          ユーザーåã«ã‚¹ãƒšãƒ¼ã‚¹ãŒã‚ã‚‹å ´åˆã€_ (アンダーライン) ã«ç½®ãæ›ãˆã‚‰ã‚Œã‚‹| URL | |X| クライアントãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã—㟠URL| +> æ—¥ä»˜ã¨æ™‚間㯠GMTã§è¡¨ã•れã¾ã™ã€‚ + + +#### 周期的ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ— + +*logweb.txt* ファイルã¯ã‹ãªã‚Šè†¨å¤§ã«ãªã‚‹ã“ã¨ãŒã‚ã‚‹ãŸã‚ã€è‡ªå‹•ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–メカニズムを構築ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã¯ã‚る周期 (æ™‚é–“ã€æ—¥ã€é€±ã€æœˆå˜ä½) ã¾ãŸã¯ã€ãƒ•ァイルã®ã‚µã‚¤ã‚ºã«åŸºã¥ã„ã¦èµ·å‹•ã—ã¾ã™ã€‚è¨­å®šã®æœŸé™ (ã¾ãŸã¯ãƒ•ァイルサイズ) ã«è¿‘ã¥ãã¨ã€4D ã¯è‡ªå‹•çš„ã«ã‚«ãƒ¬ãƒ³ãƒˆã®ãƒ­ã‚°ãƒ•ァイルを閉ã˜ã¦ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã—ã¾ã™ã€‚ãã—ã¦æ–°ãŸã«ãƒ•ァイルを作æˆã—ã¾ã™ã€‚ + +Web ã®ãƒ­ã‚°ãƒ•ァイル用ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒèµ·å‹•ã™ã‚‹ã¨ã€ãƒ­ã‚°ãƒ•ァイル㯠"Logweb Archives" ã¨ã„ã†åå‰ã®ãƒ•ォルダーã«ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã•れã¾ã™ã€‚ã“ã®ãƒ•ォルダーã¯ã€*logweb.txt* ファイルã¨åŒã˜éšŽå±¤ã«ä½œæˆã•れã¾ã™ã€‚ + +アーカイブã•れãŸãƒ•ァイルã¯ã€ä»¥ä¸‹ã®ä¾‹ã«åŸºã¥ã„ã¦å称変更ã•れã¾ã™: "DYYYY_MM_DD_Thh_mm_ss.txt"。 ãŸã¨ãˆã°ã€ãƒ•ァイルãŒã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã•ã‚ŒãŸæ™‚間㌠September 4, 2020 at 3:50 p.m. and 7 seconds ã§ã‚ã‚‹å ´åˆã€"D2020_09_04_T15_50_07.txt" ã«ãªã‚Šã¾ã™ã€‚ + +#### ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—パラメーター + +logweb.txt ã®è‡ªå‹•ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—パラメーターã¯ã€ã‚¹ãƒˆãƒ©ã‚¯ãƒãƒ£ãƒ¼è¨­å®šã® **Web/ログ (ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—)** ページã§è¨­å®šã—ã¾ã™: + +![](assets/en/WebServer/backup.png) + +最åˆã«ã€é »åº¦ (æ—¥ã€é€±ãªã©ã®å˜ä½) ã¾ãŸã¯ãƒ•ァイルサイズã®ä¸Šé™ã«å¯¾å¿œã™ã‚‹ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã‚’クリックã—ã¦é¸æŠžã—ã¾ã™ã€‚ å¿…è¦ã«å¿œã˜ã¦ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã™ã‚‹æ­£ç¢ºãªæ™‚間を指定ã—ã¾ã™ã€‚ + +* **ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã—ãªã„**: 周期的ãªãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—機能ãŒç„¡åйã«ãªã£ã¦ã„ã¾ã™ã€‚ + +* **X 時間ã”ã¨**: 1時間å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をプログラムã™ã‚‹éš›ã€ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ 1 ã‹ã‚‰ 24 ã®å€¤ã‚’入力ã—ã¾ã™ã€‚ + * **開始時刻**: 最åˆã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—開始時間ã®è¨­å®šã«ä½¿ç”¨ã—ã¾ã™ã€‚ + +* **X æ—¥ã”ã¨**: 1æ—¥å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をプログラムã™ã‚‹éš›ã€ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を毎日実行ã™ã‚‹ã«ã¯ã€1を入力ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã®é–‹å§‹æ™‚間を指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +* **X 週ã”ã¨**: 1週間å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をプログラムã™ã‚‹éš›ã€ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žé€±ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã†ã«ã¯ 1 ã¨è¨­å®šã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’é–‹å§‹ã™ã‚‹æ›œæ—¥ã¨æ™‚間を指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 è¤‡æ•°ã®æ›œæ—¥ã‚’é¸æŠžã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ°´æ›œæ—¥ã¨é‡‘曜日を é¸æŠžã—ã€2ã¤ã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—を設定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +* **X 月ã”ã¨**: 1ヶ月å˜ä½ã§ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をプログラムã™ã‚‹éš›ã€ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€æ¯Žæœˆãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ã‚’ãŠã“ãªã†ã«ã¯ 1 ã¨è¨­å®šã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションをãƒã‚§ãƒƒã‚¯ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—é–‹å§‹æœˆã®æ—¥æ™‚を指定ã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 + +* **X MB** (サイズ指定): カレントã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ­ã‚°ã®ãƒ•ァイルサイズã«åŸºã¥ã„ã¦ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—をプログラムã™ã‚‹éš›ã€ã“ã®ã‚ªãƒ—ションを使用ã—ã¾ã™ã€‚ ãƒ•ã‚¡ã‚¤ãƒ«ãŒæŒ‡å®šã‚µã‚¤ã‚ºã«é”ã™ã‚‹ã¨ã€ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—ãŒè‡ªå‹•çš„ã«èµ·å‹•ã—ã¾ã™ã€‚ サイズ制é™ã¯ 1ã€10ã€100 ã¾ãŸã¯ 1000MB ã”ã¨ã«è¨­å®šå¯èƒ½ã§ã™ã€‚ diff --git a/website/translated_docs/ja/WebServer/webServerConfig.md b/website/translated_docs/ja/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..a4d0d244c6a1af --- /dev/null +++ b/website/translated_docs/ja/WebServer/webServerConfig.md @@ -0,0 +1,650 @@ +--- +id: webServerConfig +title: 設定 +--- + +4D Webサーãƒãƒ¼ã®è¨­å®šã«ã¯ã€ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ‘ラメーターã€ãƒªã‚¹ãƒ‹ãƒ³ã‚°ãƒãƒ¼ãƒˆã€ãƒ‡ãƒ•ォルトã®ãƒ‘スã€ãŠã‚ˆã³ã‚µãƒ¼ãƒãƒ¼ã®æ©Ÿèƒ½ã‚’網羅ã™ã‚‹ã•ã¾ã–ã¾ãªã‚ªãƒ—ションãŒå«ã¾ã‚Œã¾ã™ã€‚ 4D ã§ã¯ã™ã¹ã¦ã®è¨­å®šã«ãƒ‡ãƒ•ォルト値を用æ„ã—ã¦ã„ã¾ã™ã€‚ + + +## 設定をãŠã“ãªã†å ´æ‰€ + +4D Webサーãƒãƒ¼ã®è¨­å®šã«ã¯ã€ã‚¹ã‚³ãƒ¼ãƒ—やサーãƒãƒ¼ã«å¿œã˜ãŸæ§˜ã€…ãªæ–¹æ³•ãŒã‚りã¾ã™: + +| 設定場所 | スコープ | 使用ã™ã‚‹ Webサーãƒãƒ¼ | +| -------------------------------------- | --------------------- | ------------------------------ | +| [webServer オブジェクト](webServerObject.md) | 一時的 (カレントセッション) | コンãƒãƒ¼ãƒãƒ³ãƒˆWebサーãƒãƒ¼ã‚’å«ã‚€ã€ã‚らゆる Webサーãƒãƒ¼ | +| `WEB SET OPTION` ã¾ãŸã¯ `WEB XXX` コマンド | 一時的 (カレントセッション) | メインサーãƒãƒ¼ | +| **ストラクãƒãƒ£ãƒ¼è¨­å®š** ダイアログボックス (**Web** ページ) | 永続的 (全セッションã€ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä¿å­˜) | メインサーãƒãƒ¼ | + +> 設定ã§ãる場所ãŒé™ã‚‰ã‚Œã‚‹è¨­å®šã‚‚一部存在ã—ã¾ã™ã€‚ + +## キャッシュ + +| 設定ã§ãる場所 | åç§° | コメント | +| ----------- | -------------------------------- | ---- | +| 設定ダイアログボックス | オプション (I) ページ / 4D Webキャッシュを使用ã™ã‚‹ | | +| 設定ダイアログボックス | オプション (I) ページ / ページキャッシュサイズ | | + +Webãƒšãƒ¼ã‚¸ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®æœ‰åŠ¹åŒ–ã¨è¨­å®šã‚’ãŠã“ãªã„ã¾ã™ã€‚ + +4D Webサーãƒãƒ¼ã«ã¯ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚りã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã€GIFã€JPEG (<512 kb)ã€ãã—ã¦ã‚¹ã‚¿ã‚¤ãƒ«ã‚·ãƒ¼ãƒˆ (.css ファイル) ãªã©ãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã•れるã¨ã€ãƒ¡ãƒ¢ãƒªã«ãƒ­ãƒ¼ãƒ‰ã•れã¾ã™ã€‚ キャッシュã®åˆ©ç”¨ã¯ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã®é€ä¿¡æ™‚ã« Webサーãƒãƒ¼ã®ãƒ‘フォーマンスを大幅ã«å‘上ã—ã¾ã™ã€‚ キャッシュã¯ã™ã¹ã¦ã® Webプロセスã§å…±æœ‰ã•れã¾ã™ã€‚ + +キャッシュã®ã‚µã‚¤ã‚ºã¯ã€**ページキャッシュサイズ** エリアã§å¤‰æ›´ã§ãã¾ã™ã€‚ 設定ã™ã‚‹å€¤ã¯ã€ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã®ã‚µã‚¤ã‚ºã‚„æ•°ã€ãŠã‚ˆã³ãƒ›ã‚¹ãƒˆãƒžã‚·ãƒ³ã§åˆ©ç”¨å¯èƒ½ãªãƒªã‚½ãƒ¼ã‚¹ã«ã‚ˆã‚Šã¾ã™ã€‚ +> Webデータベースを利用ã™ã‚‹é–“ã€`WEB GET STATISTICS` コマンドを使用ã—ã¦ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®ãƒ‘フォーマンスを検証ã§ãã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥åˆ©ç”¨çŽ‡ãŒ 100% ã«è¿‘ã„å ´åˆã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã«å‰²ã‚Šå½“ã¦ãŸãƒ¡ãƒ¢ãƒªé‡ã‚’増やã™ã“ã¨ã‚’考慮ã—ã¾ã™ã€‚ [/4DSTATS] 㨠[/4DHTMLSTATS] ã® URL ã‚‚ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã®çŠ¶æ…‹ã‚’çŸ¥ã‚‹ã®ã«ä½¿ç”¨ã§ãã¾ã™ã€‚ + + +## 証明書フォルダー + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------- | ------------------------------------------------------------------------------------------------- | +| webServer オブジェクト | `certificateFolder` | テキストプロパティ (`start()` 関数㮠*settings* パラメーターã¨ä½¿ç”¨ã™ã‚‹å ´åˆã¯ã€[`4D.Folder`](API/FolderClass.md) オブジェクトも使用å¯èƒ½) | + +Webサーãƒãƒ¼ç”¨ã® TLS証明書ファイルãŒç½®ã‹ã‚Œã¦ã„るフォルダーã§ã™ã€‚ + +4D ã¾ãŸã¯ 4D Server ã®ãƒ‡ãƒ•ォルトã§ã¯ã€ã“れらã®ãƒ•ァイルã¯[Project フォルダー](Project/architecture.md#project-フォルダー) ã®éš£ã«é…ç½®ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +4D をリモートモードã§ä½¿ç”¨ã™ã‚‹å ´åˆã€ã“れらã®ãƒ•ァイルã¯ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ä¸Šã®ãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã®ãƒ­ãƒ¼ã‚«ãƒ«ãƒªã‚½ãƒ¼ã‚¹ãƒ•ォルダーã«é…ç½®ã•れã¦ã„ã‚‹å¿…è¦ãŒã‚りã¾ã™ (`Get 4D folder` コマンド㮠`4D Client Database Folder` ã®é …ã‚’å‚ç…§ãã ã•ã„)。 ã“れらã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ãƒªãƒ¢ãƒ¼ãƒˆãƒžã‚·ãƒ³ã«æ‰‹å‹•ã§ã‚³ãƒ”ーã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> TLS 証明書ファイルã¯ã€*key.pem* (ç§˜å¯†ã®æš—å·éµã‚’å«ã‚€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ) 㨠*cert.pem* (証明書をå«ã‚€ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ) ã§ã™ã€‚ + + +## 文字コード + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------- | -------------------- | +| webServer オブジェクト | `characterSet` | MIBEnum æ•´æ•°ã€ã¾ãŸã¯åç§°ã®æ–‡å­—列 | +| `WEB SET OPTION` | `Web character set` | MIBEnum æ•´æ•°ã€ã¾ãŸã¯åç§°ã®æ–‡å­—列 | +| 設定ダイアログボックス | オプション (II) ページ / 文字コード | ãƒãƒƒãƒ—アップメニュー | + +4D Webサーãƒãƒ¼ãŒä½¿ç”¨ã™ã‚‹æ–‡å­—セットを定義ã—ã¾ã™ã€‚ デフォルト値㯠OS ã®è¨€èªžã«ä¾å­˜ã—ã¾ã™ã€‚ +> ã“ã®è¨­å®šã¯ã€ã‚¯ã‚¤ãƒƒã‚¯ãƒ¬ãƒãƒ¼ãƒˆã‚’ HTMLãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§æ›¸ã出ã™éš›ã«ã‚‚使用ã•れã¾ã™ã€‚ + + +## æš—å·ãƒªã‚¹ãƒˆ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | ---- | +| webServer オブジェクト | [`cipherSuite`](API/WebServerClass.md#ciphersuite) | テキスト | + +セキュアプロトコルã«ä½¿ç”¨ã•れる暗å·ãƒªã‚¹ãƒˆã§ã™ã€‚Webサーãƒãƒ¼ãŒå®Ÿè£…ã™ã‚‹æš—å·ã‚¢ãƒ«ã‚´ãƒªã‚ºãƒ ã®å„ªå…ˆé †ä½ã‚’設定ã—ã¾ã™ã€‚ ã‚³ãƒ­ãƒ³åŒºåˆ‡ã‚Šã®æ–‡å­—列ã¨ã—ã¦è¨­å®šã§ãã¾ã™ (例: "ECDHE-RSA-AES128-...")。 詳細㯠Open SSL サイト㮠[ciphers ページ](https://www.openssl.org/docs/manmaster/man1/ciphers.html) ã‚’å‚ç…§ãã ã•ã„。 + +> 4D ãŒä½¿ç”¨ã™ã‚‹ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®æš—å·ãƒªã‚¹ãƒˆã¯ã€`SET DATABASE PARAMETER` コマンドを使用ã—ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã”ã¨ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€å¤‰æ›´ã¯ 4Dアプリケーション全体ã«é©ç”¨ã•れã¾ã™ (Webサーãƒãƒ¼ãƒ»SQLサーãƒãƒ¼ãƒ»ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼æŽ¥ç¶šã€HTTPクライアントã€ã‚»ã‚­ãƒ¥ã‚¢ãƒ—ロトコルを使用ã™ã‚‹ã™ã¹ã¦ã® 4Dコマンドをå«ã‚€)。 + +## CORS設定 + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------- | ----------------------------------------- | +| webServer オブジェクト | [`CORSSettings`](API/WebServerClass.md#corssettings) | オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (CORSサービスã§è¨±å¯ã•れãŸãƒ›ã‚¹ãƒˆã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸€è¦§) | +| `WEB SET OPTION` | `Web CORS settings` | オブジェクトã®ã‚³ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ (CORSサービスã§è¨±å¯ã•れãŸãƒ›ã‚¹ãƒˆã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸€è¦§) | +| 設定ダイアログボックス | オプション (II) ページ / ドメインå ãŠã‚ˆã³ 許å¯ã•れãŸHTTPメソッド | æ–°ã—ã„ドメインã¨ãƒ¡ã‚½ãƒƒãƒ‰ã‚’許å¯ã™ã‚‹ã«ã¯ [+] ボタンをクリックã—ã¦è¿½åŠ ã—ã¾ã™ã€‚ | + +CORSサービスã§è¨±å¯ã•れãŸãƒ›ã‚¹ãƒˆã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®ä¸€è¦§ + +#### ドメインå (hostプロパティ) + +CORS を介ã—ãŸã‚µãƒ¼ãƒãƒ¼ã¸ã®ãƒ‡ãƒ¼ã‚¿ãƒªã‚¯ã‚¨ã‚¹ãƒˆé€ä¿¡ãŒè¨±å¯ã•れã¦ã„る外部ページã®ãƒ‰ãƒ¡ã‚¤ãƒ³åã¾ãŸã¯ IPアドレス。 複数ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’追加ã—ã¦ãƒ›ãƒ¯ã‚¤ãƒˆãƒªã‚¹ãƒˆã‚’作æˆã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 複数ã®ã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### 許å¯ã•れ㟠HTTPメソッド (methodsプロパティ) + +対応ã™ã‚‹ CORSホストã«å¯¾ã—ã¦è¨±å¯ã™ã‚‹ HTTPメソッド。 以下㮠HTTPメソッドãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +メソッドåã¯ã‚»ãƒŸã‚³ãƒ­ãƒ³åŒºåˆ‡ã‚Šã§æŒ‡å®šã—ã¾ã™(例: "post;get")。 methods ãŒç©ºã€nullã€ã‚ã‚‹ã„㯠undefined ã®å ´åˆã€ã™ã¹ã¦ã®ãƒ¡ã‚½ãƒƒãƒ‰ãŒè¨±å¯ã•れã¾ã™ã€‚ + +#### å‚ç…§ + +[CORSを有効化](#CORSを有効化) + + + +## デãƒãƒƒã‚°ãƒ­ã‚° + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | --------------- | ---- | +| webServer オブジェクト | `debugLog` | 数値 | +| `WEB SET OPTION` | `Web debug log` | 数値 | + +Webサーãƒãƒ¼ã® HTTPリクエストログファイル (アプリケーション㮠"Logs" ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã«æ ¼ç´ã•れã¦ã„ã‚‹ HTTPDebugLog_nn.txt (nn ã¯ãƒ•ァイル番å·)) ã®çŠ¶æ…‹ã‚’æŒ‡å®šã—ã¾ã™ã€‚ ã“ã®ãƒ­ã‚°ãƒ•ァイルã¯ã€Webサーãƒãƒ¼ã«é–¢é€£ã™ã‚‹å•題をデãƒãƒƒã‚°ã™ã‚‹ã®ã«ä¾¿åˆ©ã§ã™ã€‚ ログã«ã¯ã€å„リクエスト・レスãƒãƒ³ã‚¹ãŒ rawモードã§è¨˜éŒ²ã•れã¾ã™ã€‚ ヘッダーをå«ã‚€ãƒªã‚¯ã‚¨ã‚¹ãƒˆå…¨ä½“ãŒè¨˜éŒ²ã•れã€ã‚ªãƒ—ションã§ãƒœãƒ‡ã‚£éƒ¨åˆ†ã‚‚記録ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +| 値 | 定数 | 説明 | +| - | ----------- | ----------------------------- | +| 0 | wdl disable | Web HTTP debug log ã¯ç„¡åŠ¹åŒ–ã•れã¦ã„ã¾ã™ | + + + +|1|wdl enable without body|Web HTTP debug log ã¯ãƒœãƒ‡ã‚£éƒ¨ãªã—ã§æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã™ (ã“ã®å ´åˆãƒœãƒ‡ã‚£éƒ¨ã®ã‚µã‚¤ã‚ºã¯æä¾›ã•れã¾ã™)| |3|wdl enable with response body|Web HTTP debug log ã¯ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®ãƒœãƒ‡ã‚£éƒ¨ã®ã¿ã‚’å«ã‚ãŸçŠ¶æ…‹ã§æœ‰åŠ¹åŒ–ã•れã¦ã„ã¾ã™ã€‚| |5|wdl enable with request body|Web HTTP debug log ã¯ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒœãƒ‡ã‚£éƒ¨ã®ã¿å«ã‚ãŸçŠ¶æ…‹ã§æœ‰åŠ¹åŒ–ã•れã¾ã™| |7|wdl enable with all body parts|Web HTTP debug log ã¯ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã¨ãƒªã‚¯ã‚¨ã‚¹ãƒˆä¸¡æ–¹ã‚’ボディ部ã«å«ã‚ãŸçŠ¶æ…‹ã§æœ‰åŠ¹åŒ–ã•れã¾ã™| + + +## デフォルトホームページ + +| 設定ã§ãる場所 | åç§° | コメント | +| ------------------- | ---------------------------------------------------------- | ----------------- | +| webServer オブジェクト | [`defaultHomepage`](API/WebServerClass.md#defaulthomepage) | テキスト | +| `WEB SET HOME PAGE` | | Webプロセス毎ã«ç•°ãªã‚‹è¨­å®šãŒå¯èƒ½ | +| 設定ダイアログボックス | 設定ページ / デフォルトホームページ | | + +Webサーãƒãƒ¼ã®ãƒ‡ãƒ•ォルトホームページを指定ã—ã¾ã™ã€‚ ã“ã®ãƒšãƒ¼ã‚¸ã¯ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ã§ã‚‚セミダイナミックã§ã‚‚å¯èƒ½ã§ã™ã€‚ + +Webサーãƒãƒ¼ã®åˆå›žèµ·å‹•時ã«ã¯ã€4D ã¯ãƒ‡ãƒ•ォルト㧠"index.html" ã¨ã„ã†åå‰ã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã‚’作æˆã—ã€HTMLルートフォルダーã«ç½®ãã¾ã™ã€‚ ã“ã®è¨­å®šã‚’変更ã—ãªã„å ´åˆã€Webサーãƒãƒ¼ã«æŽ¥ç¶šã™ã‚‹ãƒ–ラウザーã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªãƒšãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¾ã™: + +![](assets/en/WebServer/defaultHomePage.png) + +デフォルトホームページを変更ã™ã‚‹ã«ã¯ã€ãƒ‘スを "デフォルトホームページ" エリアã«å…¥åŠ›ã—ã¾ã™ã€‚ + +- パスã¯ã€[デフォルトHTMLルート](#ルートフォルダー) ã‹ã‚‰ã®ç›¸å¯¾ãƒ‘スã§è¨­å®šã—ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 +- パス㯠POSIX シンタックスã§è¡¨ã—ã¾ã™ (フォルダーã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ ("/") ã§åŒºåˆ‡ã‚Šã¾ã™)。 +- パスã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ ("/") ã§å§‹ã¾ã£ãŸã‚Šçµ‚ã‚ã£ãŸã‚Šã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 + +ãŸã¨ãˆã°ã€ãƒ‡ãƒ•ォルトHTMLルートフォルダー内㮠"Web" サブフォルダーã«ã‚ã‚‹ "MyHome.htm" をデフォルトホームページã«ã™ã‚‹å ´åˆã€"Web/MyHome.htm" ã¨å…¥åŠ›ã—ã¾ã™ã€‚ + +デフォルトホームページを指定ã—ãªã„å ´åˆã€`On Web Connection` データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™ã€‚ ã“ã®å ´åˆã«ã¯ã€ãƒ—ロシージャーã§ãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’処ç†ã™ã‚‹ã®ã¯é–‹ç™ºè€…ã®å½¹å‰²ã§ã™ã€‚ + +## CORSを有効化 + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | -------------------------------------- | +| webServer オブジェクト | [`CORSEnabled`](API/WebServerClass.md#corsenabled) | ブール; CORSを有効化ã™ã‚‹ã«ã¯ true (デフォルト値㯠false) | +| `WEB SET OPTION` | `Web CORS enabled` | 0 (デフォルト値; 無効) ã¾ãŸã¯ 1 (有効) | +| 設定ダイアログボックス | オプション (II) ページ / CORSを有効化 | デフォルトã§ã¯ãƒã‚§ãƒƒã‚¯ãªã— | + +4D Webサーãƒãƒ¼ã¯ã€ã‚¯ãƒ­ã‚¹ã‚ªãƒªã‚¸ãƒ³ãƒªã‚½ãƒ¼ã‚¹ã‚·ã‚§ã‚¢ãƒªãƒ³ã‚° (CORS) を実装ã—ã¦ãŠã‚Šã€ã“れã«ã‚ˆã£ã¦åˆ¥ãƒ‰ãƒ¡ã‚¤ãƒ³ã«ã¦æä¾›ã•れã¦ã„る特定㮠WebページãŒã€REST ãªã©ã‚’使用ã—㟠XHRコールを介ã—ã¦ã‚«ãƒ¬ãƒ³ãƒˆWebアプリケーションã®ãƒªã‚½ãƒ¼ã‚¹ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãるよã†ã«ã™ã‚‹ã“ã¨ãŒå¯èƒ½ã§ã™ã€‚ セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€"ドメイン間" ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯ãƒ–ラウザーレベルã§ãƒ‡ãƒ•ォルトã§ç¦æ­¢ã•れã¦ã„ã¾ã™ã€‚ 有効化ã•れã¦ã„ã‚‹å ´åˆã€ãƒ‰ãƒ¡ã‚¤ãƒ³å¤– Webページã‹ã‚‰ã® XHRコール (RESTリクエストãªã©) をアプリケーションã«ãŠã„ã¦è¨±å¯ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ (CORSドメインリストã«è¨±å¯ã•れãŸã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒªã‚¹ãƒˆã‚’定義ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚[CORS設定](#CORS設定) å‚ç…§)。 有効時ã«ã€è¨±å¯ã•れã¦ã„ãªã„ドメインやメソッドãŒã‚µã‚¤ãƒˆé–“リクエストをé€ä¿¡ã—ãŸå ´åˆã€"403 - forbidden" エラーレスãƒãƒ³ã‚¹ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ + +無効化ã•れã¦ã„ã‚‹å ´åˆ (デフォルト) ã«ã¯ã€CORS ã§é€ä¿¡ã•れãŸã‚µã‚¤ãƒˆé–“リクエストã¯ã™ã¹ã¦ç„¡è¦–ã•れã¾ã™ã€‚ + +CORS ã«ã¤ã„ã¦ã®è©³ç´°ã¯ã€Wikipedia ã®[Cross-origin resource sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) ページをå‚ç…§ãã ã•ã„。 + +#### å‚ç…§ +[CORS設定](#CORS設定) + +## HTTPを有効化 + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | ------- | +| webServer オブジェクト | [`HTTPEnabled`](API/WebServerClass.md#httpenabled) | boolean | +| `WEB SET OPTION` | `Web HTTP enabled` | | +| 設定ダイアログボックス | 設定ページ / HTTPを有効化 | | + +安全ã§ãªã„接続を Webサーãƒãƒ¼ãŒå—ã‘入れるã‹ã©ã†ã‹ã‚’示ã—ã¾ã™ã€‚ + + +## HTTPSを有効ã«ã™ã‚‹ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------- | ------- | +| webServer オブジェクト | [`HTTPSEnabled`](API/WebServerClass.md#httpsenabled) | boolean | +| `WEB SET OPTION` | `Web HTTPS enabled` | | +| 設定ダイアログボックス | 設定ページ / HTTPSを有効ã«ã™ã‚‹ | | + +Webサーãƒãƒ¼ãŒã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šã‚’å—ã‘入れるã‹å—ã‘入れãªã„ã‹ã‚’指定ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ション㯠[TLSプロトコル](Admin/tls.md) ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ + + +## HSTSを有効ã«ã™ã‚‹ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | -------------------------------------- | +| webServer オブジェクト | [`HSTSEnabled`](API/WebServerClass.md#hstsenabled) | ブール; HSTSを有効化ã™ã‚‹ã«ã¯ true (デフォルト値㯠false) | +| `WEB SET OPTION` | `Web HSTS enabled` | 0 (デフォルト値; 無効) ã¾ãŸã¯ 1 (有効) | + +HTTP Strict Transport Security (HSTS) ã®çŠ¶æ…‹ã§ã™ã€‚ + +[HTTPSを有効](#httpsを有効ã«ã™ã‚‹) ã«ã—ãŸå ´åˆã€åŒæ™‚ã« [HTTPも有効](#httpを有効化)ã«ãªã£ã¦ã„ã‚‹ã¨ã€ãƒ–ラウザー上ã§ã¯ HTTPS 㨠HTTP を切り替ãˆã‚‹ã“ã¨ãŒã§ãã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ (ãŸã¨ãˆã°ã€ãƒ–ラウザーã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒãƒ¼ã§ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¯ "https" ã‚’ "http" ã«ç½®ãæ›ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™)。 HTTP ã¸ã®ãƒªãƒ€ã‚¤ãƒ¬ã‚¯ãƒˆã‚’ç¦æ­¢ã™ã‚‹ã«ã¯ã€[HTTPを無効](#httpを有効化) ã«ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ãŒã€ã“ã®å ´åˆã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã® HTTPリクエストã«å¯¾ã—ã¦ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•れã¦ã—ã¾ã„ã¾ã™ã€‚ + +HSTS ã«ã‚ˆã£ã¦ã€4D Webサーãƒãƒ¼ã¯ãƒ–ラウザーã«å¯¾ã—ã€ã‚»ã‚­ãƒ¥ã‚¢ãª HTTPS接続ã®ã¿ã‚’許å¯ã™ã‚‹ã¨å®£è¨€ã§ãã¾ã™ã€‚ HSTS を有効ã«ã™ã‚‹ã¨ã€4D Webサーãƒãƒ¼ã¯ã™ã¹ã¦ã®ãƒ¬ã‚¹ãƒãƒ³ã‚¹ãƒ˜ãƒƒãƒ€ãƒ¼ã« HSTS é–¢é€£ã®æƒ…報を自動的ã«è¿½åŠ ã—ã¾ã™ã€‚ 4D Webサーãƒãƒ¼ã‹ã‚‰ã®åˆå›žãƒ¬ã‚¹ãƒãƒ³ã‚¹ã‚’å—ã‘å–ã£ãŸéš›ã«ãƒ–ラウザー㯠HSTS情報を記録ã—ã€ä»¥é™ã® HTTPリクエストã¯è‡ªå‹•的㫠HTTPSリクエストã«å¤‰æ›ã•れã¾ã™ã€‚ ブラウザーå´ã§ã“ã®æƒ…å ±ãŒä¿å­˜ã•れる時間㯠**HSTS max age** 設定ã«ã‚ˆã£ã¦æŒ‡å®šã•れã¾ã™ã€‚ + +> HSTS ã®ãŸã‚ã«ã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§ [HTTPS ãŒæœ‰åй](httpsを有効ã«ã™ã‚‹)ã«ãªã£ã¦ã„ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 ã¾ãŸã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®åˆå›žæŽ¥ç¶šã‚’許å¯ã™ã‚‹ãŸã‚ã«ã€[HTTP も有効](httpを有効化) ã§ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“。 + +> ç¾åœ¨ã®æŽ¥ç¶šãƒ¢ãƒ¼ãƒ‰ã¯ã€`WEB Is secured connection` コマンドã§å–å¾—ã§ãã¾ã™ã€‚ + + +## HSTS Max Age + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------ | -------- | +| webServer オブジェクト | [`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage) | 数値 (ç§’å˜ä½) | +| `WEB SET OPTION` | `Web HSTS max age` | 数値 (ç§’å˜ä½) | + +æ–°è¦ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆæŽ¥ç¶šã”ã¨ã« HSTS ãŒã‚¢ã‚¯ãƒ†ã‚£ãƒ–ãªæœ€é•·æ™‚é–“ (ç§’å˜ä½) を指定ã—ã¾ã™ã€‚ ã“ã®æƒ…å ±ã¯ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã§æŒ‡å®šã•ã‚ŒãŸæ™‚é–“ã®ã‚ã„ã ä¿å­˜ã•れã¾ã™ã€‚ デフォルト値㯠63072000 (2å¹´)。 + +> **警告:** HSTSを有効ã«ã™ã‚‹ã¨æŒ‡å®šã•ã‚ŒãŸæœŸé–“中ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®æŽ¥ç¶šã¯ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã‚’使用ã—ç¶šã‘ã¾ã™ã€‚ アプリケーションをテストã™ã‚‹éš›ã«ã¯ã€ã‚»ã‚­ãƒ¥ã‚¢ãªæŽ¥ç¶šã¨ã‚»ã‚­ãƒ¥ã‚¢ã§ãªã„接続を必è¦ã«å¿œã˜ã¦åˆ‡ã‚Šæ›¿ãˆã‚‹ã“ã¨ãŒã§ãるよã†ã«ã€çŸ­ã„期間を設定ã™ã‚‹ã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + + + + + +## HTTP圧縮レベル + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------------------- | ---------------------- | +| webServer オブジェクト | [`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel) | | +| `WEB SET OPTION` | `Web HTTP compression level` | Web ãŠã‚ˆã³ Webサービスã«é©ç”¨ã•れã¾ã™ | + +4D Webサーãƒãƒ¼ã® HTTP圧縮通信 (クライアントリクエストã¾ãŸã¯ã‚µãƒ¼ãƒãƒ¼ãƒ¬ã‚¹ãƒãƒ³ã‚¹) ã«ãŠã‘る圧縮レベル。 ã“ã®è¨­å®šã‚’使ã£ã¦ã€å®Ÿè¡Œé€Ÿåº¦ã‚’優先ã™ã‚‹ã‹ (圧縮少)ã€ãれã¨ã‚‚圧縮レベルを優先ã™ã‚‹ã‹ (速度減) を指定ã—ã€é€šä¿¡ã‚’最é©åŒ–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ é©åˆ‡ãªå€¤ã¯ã€é€šä¿¡ãƒ‡ãƒ¼ã‚¿ã®ã‚µã‚¤ã‚ºã¨ã‚¿ã‚¤ãƒ—ã«ã‚ˆã£ã¦ç•°ãªã‚Šã¾ã™ã€‚ + +1 ã‹ã‚‰ 9 ã®å€¤ã‚’指定ã—ã¾ã™ (1 ãŒä½Žåœ§ç¸®ã€9 ãŒé«˜åœ§ç¸®)。 -1 を指定ã™ã‚‹ã¨ã€åœ§ç¸®é€Ÿåº¦ã¨åœ§ç¸®çއã®å¦¥å”点ãŒå¾—られã¾ã™ã€‚ デフォルトã®åœ§ç¸®ãƒ¬ãƒ™ãƒ«ã¯ 1 (低圧縮) ã§ã™ã€‚ + +## HTTP圧縮ã®ã—ãã„値 + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------------------------------- | ---- | +| webServer オブジェクト | [`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold) | | +| `WEB SET OPTION` | `Web HTTP compression threshold` | | + +最é©åŒ–ã•れãŸHTTP通信ã®ãƒ•レームワークã«ãŠã‘ã‚‹ã€HTTP圧縮ã®ã—ãã„値 (ãƒã‚¤ãƒˆå˜ä½)。ã“ã®ã‚µã‚¤ã‚ºæœªæº€ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã¤ã„ã¦ã¯ã€é€šä¿¡ãŒåœ§ç¸®ã•れã¾ã›ã‚“。 ã“ã®è¨­å®šã¯ã€é€šä¿¡ã‚µã‚¤ã‚ºãŒå°ã•ã„å ´åˆã€åœ§ç¸®ã«å‡¦ç†æ™‚é–“ãŒè²»ã‚„ã•れるã®ã‚’é¿ã‘ã‚‹ã®ã«æœ‰ç”¨ã§ã™ã€‚ + +サイズを数値 (ãƒã‚¤ãƒˆå˜ä½) ã§æŒ‡å®šã—ã¾ã™ã€‚ デフォルトã®ã—ãã„値㯠1024 ãƒã‚¤ãƒˆã«è¨­å®šã•れã¦ã„ã¾ã™ã€‚ + + +## HTTP ãƒãƒ¼ãƒˆ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------- | ------ | +| webServer オブジェクト | [`HTTPPort`](API/WebServerClass.md#httpport) | number | +| `WEB SET OPTION` | `Web port ID` | | +| 設定ダイアログボックス | 設定ページ / HTTPãƒãƒ¼ãƒˆ | | + +HTTP接続をå—ã‘付ã‘ã‚‹ IP (TCP) ãƒãƒ¼ãƒˆç•ªå·ã€‚ デフォルトã§ã€4D ã¯é€šå¸¸ã® Web HTTPãƒãƒ¼ãƒˆ (TCPãƒãƒ¼ãƒˆ) 番å·ã§ã‚ã‚‹ 80番を使用ã—㦠Webアプリケーションを公開ã—ã¾ã™ã€‚ ä»–ã® Webサービスã«ã‚ˆã£ã¦ã“ã®ãƒãƒ¼ãƒˆç•ªå·ãŒæ—¢ã«ä½¿ç”¨ã•れã¦ã„ã‚‹å ´åˆã€4D ãŒä½¿ç”¨ã™ã‚‹ HTTPãƒãƒ¼ãƒˆç•ªå·ã‚’変更ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> macOS ã§ã¯ã€HTTPãƒãƒ¼ãƒˆã‚’変更ã™ã‚‹ã“ã¨ã§ã€rootユーザーã§ãªãã¦ã‚‚ Webサーãƒãƒ¼ã‚’é–‹å§‹ã™ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã™ ([macOS ã§ã® Helperツール](#macos-ã§ã®-helperツール) å‚ç…§)。 + +デフォルトã§ãªã„ HTTPãƒãƒ¼ãƒˆç•ªå·ã‚’使用ã—ã¦å…¬é–‹ã•れ㟠Webã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã«æŽ¥ç¶šã™ã‚‹ã«ã¯ã€Webブラウザーã§å…¥åŠ›ã™ã‚‹ã‚¢ãƒ‰ãƒ¬ã‚¹ã«ãƒãƒ¼ãƒˆç•ªå·ã‚’å«ã‚ãªã‘れã°ãªã‚Šã¾ã›ã‚“。 アドレスã®å¾Œã«ã‚³ãƒ­ãƒ³ã«ç¶šã‘ã¦ãƒãƒ¼ãƒˆç•ªå·ã‚’指定ã—ã¾ã™ã€‚ ãŸã¨ãˆã°ã€HTTPãƒãƒ¼ãƒˆç•ªå· 8080を使用ã™ã‚‹å ´åˆã€"123.4.567.89:8080" ã®ã‚ˆã†ã«æ›¸ãã¾ã™ã€‚ +> **警告**: デフォルト㮠TCPãƒãƒ¼ãƒˆç•ªå· (標準モード㧠80ã€HTTPSモード㧠443) 以外を指定ã™ã‚‹å ´åˆã€åŒæ™‚ã«ä½¿ç”¨ã™ã‚‹ä»–ã®ã‚µãƒ¼ãƒ“スã®ãƒ‡ãƒ•ォルトãƒãƒ¼ãƒˆç•ªå·ã‚’使ã‚ãªã„ã‚ˆã†æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ ãŸã¨ãˆã°ã€Webサーãƒãƒ¼ãƒžã‚·ãƒ³ã§ FTPプロトコルを使用ã™ã‚‹è¨ˆç”»ã§ã‚ã‚‹å ´åˆã€ã“ã®ãƒ—ロトコルã®ãƒ‡ãƒ•ォルトã§ã‚ã‚‹ TCPãƒãƒ¼ãƒˆ 20 㨠21 を使用ã—ã¦ã¯ã„ã‘ã¾ã›ã‚“。 256 より下ã®ãƒãƒ¼ãƒˆç•ªå·ã¯ã€well-known サービスã«äºˆç´„ã•れã¦ã„ã¾ã™ã€‚ã¾ãŸã€256 ã‹ã‚‰ 1024 㯠UNIXプラットフォーム由æ¥ã®ã‚µãƒ¼ãƒ“スã«äºˆç´„ã•れã¦ã„ã¾ã™ã€‚ セキュリティã®ãŸã‚ã€ã“ã‚Œã‚‰ã®æ•°å€¤ã‚ˆã‚Šã‚‚上ã€ãŸã¨ãˆã° 2000å°ã‚„ 3000å°ãªã©ã‚’指定ã—ã¾ã™ã€‚ + +0 を指定ã™ã‚‹ã¨ã€4D ã¯ãƒ‡ãƒ•ォルト㮠HTTPãƒãƒ¼ãƒˆç•ªå· 80を使用ã—ã¾ã™ã€‚ + + +## HTTP Trace + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------- | ----------------- | +| webServer オブジェクト | [`HTTPTrace`](API/WebServerClass.md#httptrace) | ブール; デフォルト㯠false | +| `WEB SET OPTION` | `Web HTTP TRACE` | 数値; デフォルト㯠0 (無効) | + +4D Webサーãƒãƒ¼ã® HTTP TRACE メソッドを有効化ã—ã¾ã™ã€‚ セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€4D Webサーãƒãƒ¼ã¯ãƒ‡ãƒ•ォルト㧠HTTP TRACE リクエストをエラー405 ã§æ‹’å¦ã—ã¾ã™ã€‚ å¿…è¦ã«å¿œã˜ã¦æœ‰åŠ¹åŒ–ã•れãŸå ´åˆã€HTTP TRACE リクエストã«å¯¾ã—㦠Webサーãƒãƒ¼ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆè¡Œã€ãƒ˜ãƒƒãƒ€ãƒ¼ã€ãŠã‚ˆã³æœ¬æ–‡ã‚’è¿”ã—ã¾ã™ã€‚ + + + + +## HTTPS ãƒãƒ¼ãƒˆ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------- | ------ | +| webServer オブジェクト | [`HTTPSPort`](API/WebServerClass.md#httpsport) | number | +| `WEB SET OPTION` | `Web HTTPS port ID` | | +| 設定ダイアログボックス | 設定ページ / HTTPSãƒãƒ¼ãƒˆ | | + +TLS を介ã—㟠HTTPS接続をå—ã‘付ã‘ã‚‹ IPãƒãƒ¼ãƒˆç•ªå·ã€‚ デフォルト㧠HTTPSãƒãƒ¼ãƒˆç•ªå·ã¯ 443ã§ã™ã€‚ ãƒãƒ¼ãƒˆç•ªå·ã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦ã¯ã€[HTTP ãƒãƒ¼ãƒˆ](#http-ãƒãƒ¼ãƒˆ) ã‚’å‚ç…§ãã ã•ã„。 + + +## éžå‹•作プロセスã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------------------------------ | ----- | +| webServer オブジェクト | [`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout) | | +| `WEB SET OPTION` | `Web inactive process timeout` | | +| 設定ダイアログボックス | オプション (I) ページ / éžå‹•作プロセスã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆ | スライダー | + +セッションã¨ç´ã¥ã„ãŸéžã‚¢ã‚¯ãƒ†ã‚£ãƒ–Webプロセスã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚é–“ (分å˜ä½) を設定ã—ã¾ã™ã€‚ タイムアウト時間ãŒçµŒéŽã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯ãƒ—ロセスを終了ã—ã¾ã™ã€‚ã™ã‚‹ã¨ã€`On Web Close Process` データベースメソッドãŒå‘¼ã³å‡ºã•れã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã¯å‰Šé™¤ã•れã¾ã™ã€‚ + +デフォルト値: 480分 (ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æˆ»ã™ã«ã¯ 0 を指定ã—ã¾ã™) + + +## éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–セッションタイムアウト + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------------------------------ | ---- | +| webServer オブジェクト | [`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout) | | +| `WEB SET OPTION` | `Web inactive session timeout` | | + +éžã‚¢ã‚¯ãƒ†ã‚£ãƒ–セッションã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆæ™‚é–“ (分å˜ä½) ã‚’ cookie ã«è¨­å®šã—ã¾ã™ã€‚ タイムアウト時間ãŒçµŒéŽã™ã‚‹ã¨ã‚»ãƒƒã‚·ãƒ§ãƒ³cookie ãŒç„¡åйã«ãªã‚Šã€HTTPクライアントã«ã‚ˆã£ã¦é€ä¿¡ã•れãªããªã‚Šã¾ã™ã€‚ + +デフォルト値: 480分 (ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æˆ»ã™ã«ã¯ 0 を指定ã—ã¾ã™) + + +## リクエストをå—ã‘付ã‘ã‚‹ IPアドレス + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------------- | ---------- | +| webServer オブジェクト | [`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten) | | +| `WEB SET OPTION` | `Web IP address to listen` | | +| 設定ダイアログボックス | 設定ページ / IPアドレス | ãƒãƒƒãƒ—アップメニュー | + +4D Webサーãƒãƒ¼ãŒ HTTPリクエストをå—ã‘付ã‘ã‚‹ IPアドレスを指定ã§ãã¾ã™ (4DローカルãŠã‚ˆã³ 4D Server)。 + +デフォルトã§ã¯ã€ç‰¹å®šã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒå®šç¾©ã•れã¦ã„ãªã„ãŸã‚ (設定ダイアログボックスã§ã¯ **ä»»æ„** ã®å€¤)ã€ã‚µãƒ¼ãƒãƒ¼ã¯ã™ã¹ã¦ã® IPアドレスã«å¿œç­”ã—ã¾ã™ã€‚ 特定ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’指定ã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯ã“ã® IPアドレスã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã®ã¿å¿œç­”ã—ã¾ã™ã€‚ ã“ã®æ©Ÿèƒ½ã¯è¤‡æ•°ã® TCP/IPアドレスãŒè¨­å®šã•れãŸãƒžã‚·ãƒ³ä¸Šã§å‹•作ã™ã‚‹ 4D Webサーãƒãƒ¼ã®ãŸã‚ã®ã‚‚ã®ã§ã™ã€‚ ã“れã¯ã—ã°ã—ã°ã€ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆãƒ›ã‚¹ãƒˆãƒ—ロãƒã‚¤ãƒ€ãƒ¼ã§ä½¿ç”¨ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: IPアドレス文字列。 IPv6 文字列フォーマット (例: "2001:0db8:0000:0000:0000:ff00:0042:8329") 㨠IPv4 文字列フォーマット (例: "123.45.67.89") ã®ä¸¡æ–¹ãŒã‚µãƒãƒ¼ãƒˆã•れã¾ã™ã€‚ + +#### IPv6 ã®ã‚µãƒãƒ¼ãƒˆã«ã¤ã„㦠+ +* **TCPãƒãƒ¼ãƒˆãŒä½¿ç”¨æ¸ˆã¿ã§ã‚‚警告ã¯å‡ºã¾ã›ã‚“**
          サーãƒãƒ¼ãŒå¿œç­”ã™ã‚‹ IPアドレス㌠"ä»»æ„" ã«è¨­å®šã•れã¦ã„ãŸå ´åˆã€TCPãƒãƒ¼ãƒˆãŒä»–ã®ã‚¢ãƒ—リケーションã§ä½¿ç”¨ã•れã¦ã„ã¦ã‚‚ã€ãれã¯ã‚µãƒ¼ãƒãƒ¼èµ·å‹•æ™‚ã«æŒ‡æ‘˜ã•れã¾ã›ã‚“。 IPv6 アドレスã®ãƒãƒ¼ãƒˆãŒç©ºã„ã¦ã„ã‚‹ãŸã‚ã€ã“ã®å ´åˆ 4D Server ã¯ã©ã®ã‚ˆã†ãªã‚¨ãƒ©ãƒ¼ã‚‚検知ã—ã¾ã›ã‚“。 ã—ã‹ã—ãªãŒã‚‰ã€ãƒžã‚·ãƒ³ã® IPv4アドレスを使用ã€ã¾ãŸã¯ãƒ­ãƒ¼ã‚«ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ 127.0.0.1 を使用ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã“ã¨ã¯ä¸å¯èƒ½ã§ã™ã€‚

          定義ã•れãŸãƒãƒ¼ãƒˆã§ 4D Server ãŒå応ã—ã¦ã„ãªã„よã†ã§ã‚れã°ã€ã‚µãƒ¼ãƒãƒ¼ãƒžã‚·ãƒ³ã§ [::1] ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’試ã—ã¦ã¿ã¦ãã ã•ã„ (IPv6 ã«ãŠã‘ã‚‹ 127.0.0.1 ã¨åŒç¾©ã§ã™ã€‚ä»–ã®ãƒãƒ¼ãƒˆç•ªå·ã‚’テストã™ã‚‹ã«ã¯ [:portNum] を追加ã—ã¦ãã ã•ã„)。 4D ãŒå¿œç­”ã™ã‚‹ã‚ˆã†ã§ã‚れã°ã€IPv4 ã®ãƒãƒ¼ãƒˆã‚’ä»–ã®ã‚¢ãƒ—リケーションãŒä½¿ç”¨ã—ã¦ã„ã‚‹å¯èƒ½æ€§ãŒé«˜ã„ã§ã™ã€‚ + +* **IPv4-マップã•れ㟠IPv6アドレス**
          プロセスを標準化ã™ã‚‹ãŸã‚ã«ã€4D ã§ã¯ IPv4ã‚¢ãƒ‰ãƒ¬ã‚¹ã®æ¨™æº–ãƒã‚¤ãƒ–リッド表示を IPv6 ã§æä¾›ã—ã¦ã„ã¾ã™ã€‚ ã“れらã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã¯ IPv6フォーマットã«ãŠã„㦠96ãƒ“ãƒƒãƒˆã®æŽ¥é ­è¾žä»˜ãã§æ›¸ã‹ã‚Œã€ãã®å¾Œã« IPv4ãƒ‰ãƒƒãƒˆåŒºåˆ‡ã‚Šè¡¨è¨˜ã§æ›¸ã‹ã‚ŒãŸ 32ビットãŒç¶šãã¾ã™ã€‚ ãŸã¨ãˆã°ã€::ffff:192.168.2.34 ã¯ã€192.168.2.34 ã¨ã„ㆠIPv4アドレスを表ã—ã¾ã™ã€‚ + +* **ãƒãƒ¼ãƒˆç•ªå·ã®è¡¨è¨˜**
          IPv6 記法ã¯ã‚³ãƒ­ãƒ³ (:) を使用ã™ã‚‹ã®ã§ã€ãƒãƒ¼ãƒˆç•ªå·ã‚’追加ã™ã‚‹ã¨ãã«ã¯æ··ä¹±ã‚’æ‹›ãæã‚ŒãŒã‚ã‚‹ã“ã¨ã«æ³¨æ„ãŒå¿…è¦ã§ã™ã€‚ãŸã¨ãˆã°: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6アドレス + 2001:0DB8::85a3:0:ac1f:8001:8081 // ãƒãƒ¼ãƒˆ 8081 指定㮠IPv6アドレス +``` + +混乱をé¿ã‘ã‚‹ãŸã‚〠IPv6アドレスをãƒãƒ¼ãƒˆç•ªå·ã¨ä½µè¨˜ã™ã‚‹éš›ã«ã¯ã€ä»¥ä¸‹ã®æ§˜ã« [ ] ã§ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’囲ã†è¨˜æ³•ãŒæŽ¨å¥¨ã•れã¾ã™: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 // ãƒãƒ¼ãƒˆ 8081 指定㮠IPv6アドレス +``` + +## æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ (自動セッション管ç†) + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | ---- | +| webServer オブジェクト | [`keepSession`](API/WebServerClass.md#keepsession) | | +| `WEB SET OPTION` | `Web keep session` | | +| 設定ダイアログボックス | オプション (I) ページ / æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ (シングルプロセスセッション) | | + +4D Webサーãƒãƒ¼ã«ã‚ˆã‚‹ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®è‡ªå‹•管ç†ã‚’有効/無効ã«ã—ã¾ã™ã€‚ ã“ã®ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã«ã¤ã„ã¦ã¯ [セッション管ç†](sessions.md) ã§èª¬æ˜Žã—ã¦ã„ã¾ã™ã€‚ + +デフォルト値㯠true (有効化)。 + +> ã“ã®ã‚ªãƒ—ションãŒé¸æŠžã•れã¦ã„ã‚‹ã¨ã€"一時的ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å†åˆ©ç”¨ã™ã‚‹" オプションも自動ã§é¸æŠžã•れã€ãƒ­ãƒƒã‚¯ã•れã¾ã™ã€‚ + + +## ログã®è¨˜éŒ² + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------- | ---------- | +| webServer オブジェクト | [`logRecording`](API/WebServerClass.md#logrecording) | | +| `WEB SET OPTION` | `Web log recording` | | +| 設定ダイアログボックス | ログ (タイプ) ページ / ログフォーマット | ãƒãƒƒãƒ—アップメニュー | + +4D Web サーãƒãƒ¼ãŒå—ã‘å–るリクエストã®ãƒ­ã‚°ã‚’é–‹å§‹/åœæ­¢ã—ã¾ã™ã€‚ログã¯ã€*logweb.txt* ファイルã«è¨˜éŒ²ã•れã€ãã®ãƒ•ォーマットを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ デフォルトã§ã¯ã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯è¦å‰‡ã•れã¾ã›ã‚“ (0 / ログファイルãªã—)。 有効化ã•れるã¨ã€*logweb.txt* ファイル㌠Logs フォルダー内ã«è‡ªå‹•ã§ä¿å­˜ã•れã¾ã™ã€‚ + +ã“ã®ãƒ•ァイルã®ãƒ•ォーマットを指定ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ 使用å¯èƒ½ãªå€¤: + +| 値 | フォーマット | 説明 | +| - | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0 | ログファイルãªã— | デフォルト | +| 1 | CLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ | Common Log Format - ãれãžã‚Œã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒè¡Œå˜ä½ã§ãƒ•ァイル内ã«è¡¨ç¤ºã•れã¾ã™: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - å„フィールドã¯ã‚¹ãƒšãƒ¼ã‚¹ã«ã‚ˆã£ã¦åŒºåˆ‡ã‚‰ã‚Œã€å„行㯠CR/LF シーケンスã§çµ‚りã¾ã™ã€‚ | +| 2 | DLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ | Combined Log Format - CLFフォーマットを使ã„ãªãŒã‚‰ã€å„ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®æœ€å¾Œã« 2ã¤ã®HTTPフィールドã€Referer㨠User-agent を追加ã—ã¾ã™ã€‚ | +| 3 | ELFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ | Extended Log Format - 設定ダイアログボックスã«ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã—ã¾ã™ã€‚ | +| 4 | WLFå½¢å¼ã§è¨˜éŒ²ã™ã‚‹ | WebStar Log Format - 設定ダイアログボックスã«ã¦ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã—ã¾ã™ã€‚ | + +> フォーマット3ã€4ã¯ã‚«ã‚¹ã‚¿ãƒ ãƒ•ォーマットã§ã€ã‚らã‹ã˜ã‚設定ダイアログボックスã«ã¦å†…容を指定ã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ã€‚ ã“ã®ãƒšãƒ¼ã‚¸ã§ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰ã‚’é¸æŠžã›ãšã«ã“れらã®ãƒ•ォーマットを使用ã—ãŸå ´åˆã€ãƒ­ã‚°ãƒ•ァイルã¯ç”Ÿæˆã•れã¾ã›ã‚“。 + + +## æœ€å¤§åŒæ™‚Webプロセス + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------------------------------ | ---- | +| webServer オブジェクト | [`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses) | | +| `WEB SET OPTION` | `Web max concurrent processes` | | +| 設定ダイアログボックス | オプション (I) ページ / æœ€å¤§åŒæ™‚Webプロセス | | + +ã“ã®ã‚ªãƒ—ションã¯ã€ã‚µãƒ¼ãƒãƒ¼ä¸Šã§åŒæ™‚ã«é–‹ãã“ã¨ã®ã§ãã‚‹ã™ã¹ã¦ã® Webãƒ—ãƒ­ã‚»ã‚¹ã®æœ€å¤§åŒæ™‚接続数ã®åŽ³æ ¼ãªä¸Šé™ã‚’設定ã—ã¾ã™ã€‚ ã“ã®ãƒ‘ラメーターã¯ã€ç•°å¸¸ãªæ•°ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«ã‚ˆã‚‹ 4D Webサーãƒãƒ¼ã®é£½å’ŒçŠ¶æ…‹ã‚’é¿ã‘ã‚‹ãŸã‚ã«ä½¿ç”¨ã—ã¾ã™ã€‚ 最大WebåŒæ™‚接続数 (マイナス1) ã«é”ã™ã‚‹ã¨ã€4D ã¯æ–°ã—ã„プロセスを作æˆã›ãšã€HTTPステータス `503 - Service Unavailable` ã‚’æ–°è¦ãƒªã‚¯ã‚¨ã‚¹ãƒˆã«å¯¾ã—ã¦è¿”ä¿¡ã—ã¾ã™ã€‚ + +デフォルト値㯠100 ã§ã™ã€‚ 10ã‹ã‚‰32000ã¾ã§ã®å€¤ã‚’設定ã§ãã¾ã™ã€‚ + + +## 最大リクエストサイズ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------- | ---- | +| webServer オブジェクト | [`maxRequestSize`](API/WebServerClass.md#maxrequestsize) | | +| `WEB SET OPTION` | `Web maximum requests size` | | + +Webサーãƒãƒ¼ã«å‡¦ç†ã‚’許å¯ã™ã‚‹ HTTPリクエスト (POST) ã®æœ€å¤§ã‚µã‚¤ã‚º (ãƒã‚¤ãƒˆå˜ä½)。 デフォルト値㯠2,000,000 (2MBよりã€ã™ã“ã—å°‘ãªã„値) ã§ã™ã€‚ 最大値 (2,147,483,648) ã«è¨­å®šã—ãŸå ´åˆã€å®Ÿéš›ã«ã¯åˆ¶é™ç„¡ã—ã¨ã„ã†ã“ã¨ã«ãªã‚Šã¾ã™ã€‚ + +制é™ã‚’設ã‘ã‚‹ã“ã¨ã§ã€ã‚µã‚¤ã‚ºãŒéžå¸¸ã«å¤§ãã„リクエストã«ã‚ˆã£ã¦ Webサーãƒãƒ¼ãŒéŽè² è·çŠ¶æ…‹ã«é™¥ã‚‹ã“ã¨ã‚’防ãŽã¾ã™ã€‚ リクエストã®ã‚µã‚¤ã‚ºãŒåˆ¶é™ã«é”ã—ã¦ã„ã‚‹ã¨ã€4D Webサーãƒãƒ¼ã«ã‚ˆã£ã¦æ‹’å¦ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: 500,000 - 2,147,483,648。 + + +## æœ€å¤§åŒæ™‚セッション数 + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------- | ---- | +| webServer オブジェクト | [`maxSessions`](API/WebServerClass.md#maxsessions) | | +| `WEB SET OPTION` | `Web max sessions` | | + +åŒæ™‚ã‚»ãƒƒã‚·ãƒ§ãƒ³ä¸Šé™æ•°ã€‚ 上é™ã«é”ã™ã‚‹ã¨ã€Webサーãƒãƒ¼ãŒæ–°è¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã‚’作æˆã™ã‚‹ã¨ãã«ã€ä¸€ç•ªå¤ã„セッションãŒé–‰ã˜ã‚‰ã‚Œã¾ã™ (`On Web Close Process` データベースメソッドãŒå‘¼ã³å‡ºã•れã¾ã™)。 åŒæ™‚セッション数ã¯ã€[Webãƒ—ãƒ­ã‚»ã‚¹ã®æœ€å¤§å€¤](#æœ€å¤§åŒæ™‚Webプロセス)ã‚’è¶…ãˆã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (デフォルト㯠100)。 + +デフォルト値: 100 (ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå€¤ã«æˆ»ã™ã«ã¯ 0 を指定ã—ã¾ã™). + + +## 最低TLSãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------------ | ------ | +| webServer オブジェクト | [`minTLSVersion`](API/WebServerClass.md#mintlsversion) | number | + +接続ã«å¿…è¦ãªæœ€ä½ŽTLSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ ã“れよりも低ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã¿ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‹ã‚‰ã®æŽ¥ç¶šã¯æ‹’å¦ã•れã¾ã™ã€‚ + +ã¨ã‚Šã†ã‚‹å€¤: + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (デフォルト) +- 4 = TLSv1_3 + +変更ã—ãŸå ´åˆã€è¨­å®šã‚’åæ˜ ã™ã‚‹ã«ã¯ Webサーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +> 4D ãŒä½¿ç”¨ã™ã‚‹æœ€ä½ŽTLSãƒãƒ¼ã‚¸ãƒ§ãƒ³ã¯ã€`SET DATABASE PARAMETER` コマンドを使用ã—ã¦ã‚»ãƒƒã‚·ãƒ§ãƒ³ã”ã¨ã«å¤‰æ›´ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ã“ã®å ´åˆã€å¤‰æ›´ã¯ 4Dアプリケーション全体ã«é©ç”¨ã•れã¾ã™ (Webサーãƒãƒ¼ãƒ»SQLサーãƒãƒ¼ãƒ»ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆ/サーãƒãƒ¼æŽ¥ç¶šã‚’å«ã‚€)。 + + +## åç§° + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------ | ---- | +| webServer オブジェクト | [`name`](API/WebServerClass.md#name) | | + + +Webサーãƒãƒ¼ã‚¢ãƒ—リケーションã®å称。 コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ãŒèµ·å‹•ã•れã¦ã„ã‚‹ã¨ãã«ä¾¿åˆ©ã§ã™ã€‚ + +## OpenSSL ãƒãƒ¼ã‚¸ãƒ§ãƒ³ + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------- | ------ | +| webServer オブジェクト | [`openSSLVersion`](API/WebServerClass.md#opensslversion) | 読ã¿å–り専用 | + +使用ã•れã¦ã„ã‚‹ OpenSSLライブラリã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ + + +## Perfect Forward Secrecy (PFS) + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------------------------- | ----------- | +| webServer オブジェクト | [`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy) | ブール; 読ã¿å–り専用 | + +Webサーãƒãƒ¼ã® PFS利用å¯å¦çŠ¶æ³ ([TLS](Admin/tls.md#perfect-forward-secrecy-pfs) å‚ç…§)。 + + +## Robots.txt + +特定ã®ã‚¯ãƒ­ãƒ¼ãƒ©ãƒ¼ (クエリエンジンã€ã‚¹ãƒ‘イダー...) 㯠Webサーãƒãƒ¼ã‚„スタティックページをクロールã—ã¾ã™ã€‚ クローラーã«ã‚µã‚¤ãƒˆã¸ã‚¢ã‚¯ã‚»ã‚¹ã•ã›ãŸããªã„å ´åˆã€ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ URL を指定ã§ãã¾ã™ã€‚ + +ã“れã«ã¯ã€ROBOTS.TXT ファイルをサーãƒãƒ¼ã®ãƒ«ãƒ¼ãƒˆã«ç½®ãã¾ã™ã€‚ ã“ã®ãƒ•ァイルã®å†…容ã¯ä»¥ä¸‹ã®æ§‹é€ ã«ãªã£ã¦ã„ãªã‘れã°ãªã‚Šã¾ã›ã‚“: + +```4d + User-Agent: + Disallow: ã¾ãŸã¯ +``` + +ãŸã¨ãˆã°: + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* "User-Agent: *" ã¯ã€ã™ã¹ã¦ã®ã‚¯ãƒ­ãƒ¼ãƒ©ãƒ¼ãŒå¯¾è±¡ã§ã‚ã‚‹ã“ã¨ã‚’示ã—ã¾ã™ã€‚ +* "Disallow: /4D" ã¯ã€/4D ã‹ã‚‰å§‹ã¾ã‚‹ URL ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãªã„ã“ã¨ã‚’クローラーã«é€šçŸ¥ã—ã¾ã™ã€‚ +* "Disallow: /%23%23" ã¯ã€/%23%23 ã‹ã‚‰å§‹ã¾ã‚‹ URL ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãªã„ã“ã¨ã‚’クローラーã«é€šçŸ¥ã—ã¾ã™ã€‚ +* "Disallow: /GIFS/" ã¯ã€/GIFS/ フォルダーãŠã‚ˆã³ãã®ã‚µãƒ–フォルダーã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãªã„ã“ã¨ã‚’クローラーã«é€šçŸ¥ã—ã¾ã™ã€‚ + +ä»–ã®ä¾‹é¡Œ: + +```code4d + User-Agent: * + Disallow: / +``` + +ã“ã®å ´åˆã€ã‚¯ãƒ­ãƒ¼ãƒ©ãƒ¼ã«ã‚µã‚¤ãƒˆå…¨ä½“ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’許å¯ã—ãªã„ã“ã¨ã‚’通知ã—ã¾ã™ã€‚ + + +## ルートフォルダー + +| 設定ã§ãる場所 | åç§° | コメント | +| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| webServer オブジェクト | [`rootFolder`](API/WebServerClass.md#rootfolder) | テキストプロパティ (`start()` 関数㮠*settings* パラメーターã¨ä½¿ç”¨ã™ã‚‹å ´åˆã¯ã€[`4D.Folder`](API/FolderClass.md) オブジェクトも使用å¯èƒ½) | +| `WEB SET ROOT FOLDER` | | | +| 設定ダイアログボックス | 設定ページ / デフォルトHTMLルート | | + +4D ãŒãƒ–ラウザーã«é€ä¿¡ã™ã‚‹ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯/セミダイナミック㪠HTMLページã€ãƒ”クãƒãƒ£ãƒ¼ãªã©ã‚’検索ã™ã‚‹ãƒ•ォルダーを指定ã—ã¾ã™ã€‚ã“れãŒã€Webサーãƒãƒ¼ã®ãƒ«ãƒ¼ãƒˆãƒ•ォルダーã§ã™ã€‚ パスã¯ã€POSIXフルパスã®å½¢å¼ã§ã™ã€‚ ルートフォルダーã®å¤‰æ›´ã‚’åæ˜ ã™ã‚‹ã«ã¯ã€Webサーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ + +ã•ら㫠HTMLルートフォルダーã¯ã€Webサーãƒãƒ¼ã®ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã§ã€ãƒ•ァイルã«å¯¾ã™ã‚‹ã‚¢ã‚¯ã‚»ã‚¹ãŒã§ããªã„階層を定義ã™ã‚‹ã“ã¨ã«ã‚‚ãªã‚Šã¾ã™ã€‚ ブラウザーã‹ã‚‰é€ã‚‰ã‚ŒãŸ URL ã‚„ 4DコマンドãŒã€HTMLルートフォルダーよりも上ã®éšŽå±¤ã«ã‚¢ã‚¯ã‚»ã‚¹ã—よã†ã¨ã™ã‚‹ã¨ã€ãƒ•ァイルãŒå­˜åœ¨ã—ãªã„ã“ã¨ã‚’示ã™ã‚¨ãƒ©ãƒ¼ãŒè¿”ã•れã¾ã™ã€‚ + +デフォルトã§ã€4D 㯠**WebFolder** ã¨ã„ã†åå‰ã®ãƒ‡ãƒ•ォルトHTMLルートフォルダーを定義ã—ã¾ã™ã€‚ Webサーãƒãƒ¼ã®åˆå›žèµ·å‹•時ã«ã“ã®ãƒ•ォルダーãŒå­˜åœ¨ã—ãªã‘れã°ã€HTMLルートフォルダーã¯ç‰©ç†çš„ã«ãƒ‡ã‚£ã‚¹ã‚¯ä¸Šã«ä½œæˆã•れã¾ã™ã€‚ ルートフォルダーã¯ä»¥ä¸‹ã®å ´æ‰€ã«ä½œæˆã•れã¾ã™: +- 4D (ローカル) ãŠã‚ˆã³ 4D Server ã§ã¯ã€[Project フォルダー](Project/architecture.md#project-フォルダー) ã¨åŒéšŽå±¤ã€‚ +- 4Dリモートモードã§ã¯ã€ãƒ­ãƒ¼ã‚«ãƒ«ã®ãƒªã‚½ãƒ¼ã‚¹ãƒ•ォルダー内 + +デフォルトHTMLルートフォルダーを変更ã™ã‚‹ã«ã¯ã€ãƒ‘スを "デフォルトHTMLルート" ã«å…¥åŠ›ã—ã¾ã™ã€‚ + +- ã“ã®ã¨ãã€ç›¸å¯¾ãƒ‘スã®èµ·ç‚¹ã¯ [Projectフォルダー](Project/architecture.md#project-folder) (4DローカルãŠã‚ˆã³ 4D Server) ã€ã¾ãŸã¯ã€4Dアプリケーションやソフトウェアーパッケージをå«ã‚€ãƒ•ォルダーã§ã™ (4Dリモートモード)。 +- パス㯠POSIX シンタックスã§è¡¨ã—ã¾ã™ (フォルダーã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ ("/") ã§åŒºåˆ‡ã‚Šã¾ã™)。 +- フォルダー階層㧠1ã¤ä¸Šã«ã‚ãŒã‚‹ã«ã¯ã€ãƒ•ォルダーåã®å‰ã«ãƒ”リオドを2㤠“..†置ãã¾ã™ã€‚ +- パスã¯ã‚¹ãƒ©ãƒƒã‚·ãƒ¥ (“/â€) ã§å§‹ã¾ã£ã¦ã¯ã„ã‘ã¾ã›ã‚“ (HTMLルートフォルダーを Projectフォルダーや 4Dリモートフォルダーã«ã—ãªãŒã‚‰ã€ãれより上階層ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã—ãŸã„å ´åˆã«ã¯ã€"/" を入力ã—ã¾ã™)。 + +ãŸã¨ãˆã°ã€HTMLルートフォルダーを "MyWebApp" フォルダー㮠“Web†サブフォルダーã«ã—ãŸã„å ´åˆã€"MyWebApp/Web" ã¨å…¥åŠ›ã—ã¾ã™ã€‚ + +> HTMLルートフォルダーを変更ã™ã‚‹ã¨ã€ã‚¢ã‚¯ã‚»ã‚¹ãŒåˆ¶é™ã•れã¦ã„るファイルを格ç´ã—ãªã„よã†ã«ã™ã‚‹ãŸã‚ã€ã‚­ãƒ£ãƒƒã‚·ãƒ¥ãŒã‚¯ãƒªã‚¢ã•れã¾ã™ã€‚ + + + +## セッションcookieドメイン + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ------------------------------------------------------------------ | ---- | +| webServer オブジェクト | [`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain) | | +| `WEB SET OPTION` | `Web session cookie domain` | | + +セッションcookie ã® "domain" フィールドã®å€¤ã€‚ セッションcookie ã®ã‚¹ã‚³ãƒ¼ãƒ—を制御ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã“ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã« "/*.4d.fr" ã®å€¤ã‚’設定ã—ãŸå ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®å®›å…ˆãŒ ".4d.fr" ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã«é™ã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ cookie ã‚’é€ä¿¡ã—ã¾ã™ã€‚ã¤ã¾ã‚Šã€å¤–部ã®é™çš„データをホストã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã¯é™¤å¤–ã•れã¾ã™ã€‚ + + +## セッションcookieå + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------------- | ---- | +| webServer オブジェクト | [`sessionCookieName`](API/WebServerClass.md#sessioncookiename) | | +| `WEB SET OPTION` | `Web session cookie name` | | + +セッションID ã®ä¿å­˜ã«ä½¿ç”¨ã•れるセッションcookie ã®å称。 デフォルト = "4DSID"。 + + +## セッションcookieパス + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | -------------------------------------------------------------- | ---- | +| webServer オブジェクト | [`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath) | | +| `WEB SET OPTION` | `Web session cookie path` | | + +セッションcookie ã® "path" フィールド。 セッションcookie ã®ã‚¹ã‚³ãƒ¼ãƒ—を制御ã™ã‚‹ã®ã«ä½¿ç”¨ã•れã¾ã™ã€‚ ãŸã¨ãˆã°ã€ã“ã®ã‚»ãƒ¬ã‚¯ã‚¿ãƒ¼ã« "/4DACTION" ã¨ã„ã†å€¤ã‚’設定ã—ãŸå ´åˆã€4DACTION ã§å§‹ã¾ã‚‹å‹•的リクエストã®å ´åˆã«ã®ã¿ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯ cookie ã‚’é€ä¿¡ã—ã€ãƒ”クãƒãƒ£ãƒ¼ã‚„é™çš„ページã¸ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯é™¤å¤–ã•れã¾ã™ã€‚ + +## セッションcookie SameSite + +| 設定ã§ãる場所 | åç§° | コメント | +| ---------------- | ---------------------------------------------------------------------- | ---- | +| webServer オブジェクト | [`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite) | | + +セッションcookie ã® `SameSite` 属性ã®å€¤ã€‚ ã“ã®å±žæ€§ã¯ã€ä¸€éƒ¨ã®ã‚¯ãƒ­ã‚¹ã‚µã‚¤ãƒˆãƒªã‚¯ã‚¨ã‚¹ãƒˆãƒ•ォージェリ ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) 攻撃ã‹ã‚‰ã®ä¿è­·ã¨ã—ã¦ã€ãƒ•ァーストパーティーコンテキストã¾ãŸã¯åŒä¸€ã‚µã‚¤ãƒˆã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã®ã©ã¡ã‚‰ã‹ã« cookie ã‚’é™å®šã™ã‚‹ã‹ã‚’宣言ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ + +> `SameSite` 属性ã«é–¢ã™ã‚‹è©³ç´°ãªèª¬æ˜Žã¯ [Mozilla ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒ†ãƒ¼ã‚·ãƒ§ãƒ³](https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Set-Cookie/SameSite) ã¾ãŸã¯ [ã“ã¡ã‚‰ã® Web開発ページ (英語)](https://web.dev/samesite-cookies-explained/) ã‚’å‚ç…§ãã ã•ã„。 + +次ã®å€¤ãŒæä¾›ã•れã¦ã„ã¾ã™: + +- "Strict" (4Dセッションcookie ã® `SameSite` 属性ã®ãƒ‡ãƒ•ォルト値): ファーストパーティーã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã€ã™ãªã‚ã¡ç¾åœ¨ã®ã‚µã‚¤ãƒˆã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã«ä¸€è‡´ã™ã‚‹ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ã®ã¿ cookie ã¯é€ä¿¡ã•れã€ã‚µãƒ¼ãƒ‰ãƒ‘ーティー㮠Webサイトã«ã¯æ±ºã—ã¦é€ä¿¡ã•れã¾ã›ã‚“。 +- "Lax": クロスサイトã®ã‚µãƒ–リクエストã§ã¯ cookie ã¯é€ä¿¡ã•れã¾ã›ã‚“㌠(ãŸã¨ãˆã°ã€ç”»åƒã‚„フレームをサードパーティーã®ã‚µã‚¤ãƒˆã«ãƒ­ãƒ¼ãƒ‰ã™ã‚‹å ´åˆãªã©)ã€ãƒ¦ãƒ¼ã‚¶ãƒ¼ãŒã‚ªãƒªã‚¸ãƒ³ã®ã‚µã‚¤ãƒˆã«ç§»å‹•ã™ã‚‹ã¨ã (ã¤ã¾ã‚Šã€ãƒªãƒ³ã‚¯ã‚’辿ã£ã¦ã„ã‚‹ã¨ã) ã«ã¯é€ä¿¡ã•れã¾ã™ã€‚ +- "None": ファーストパーティーやオリジン間リクエストã«ã‹ã‹ã‚らãšã€ã™ã¹ã¦ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã«ãŠã„㦠cookie ãŒé€ä¿¡ã•れã¾ã™ã€‚ "None" を使用ã™ã‚‹å ´åˆã¯ã€cookie ã® `Secure` 属性も設定ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ (設定ã—ãªã„ã¨ã€cookie ãŒãƒ–ロックã•れã¾ã™)。 + +セッションcookie ã® `Secure` 属性値ã¯ã€HTTPS接続ã®å ´åˆã«ã¯ (`SameSite` 属性値ãŒä½•ã§ã‚れ)ã€è‡ªå‹•的㫠"True" ã«è¨­å®šã•れã¾ã™ã€‚ + +> HTTPサーãƒãƒ¼ã§ `SameSite=None` を設定ã™ã‚‹ã“ã¨ã¯ã€(HTTPS ã§ã®ã¿ä½¿ç”¨ã•れる) `Secure` å±žæ€§ãŒæ¬ è½ã—ã€cookie ãŒãƒ–ロックã•れるãŸã‚ã€æŽ¨å¥¨ã•れã¾ã›ã‚“。 + + + +## セッション IPアドレス検証 + +設定ã§ãる場所|åç§°|コメント| |---|---|---| |webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| |`WEB SET OPTION`|`Web session enable IP address validation`|| + +セッションcookie ã® IP アドレス検証ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ã€‚ セキュリティ上ã®ç†ç”±ã«ã‚ˆã‚Šã€ã‚»ãƒƒã‚·ãƒ§ãƒ³cookie ã‚’æŒã¤å„リクエストã«å¯¾ã—㦠4D Webサーãƒãƒ¼ã¯ãƒ‡ãƒ•ォルト㧠IPアドレスを検証ã—ã¾ã™ã€‚ã“ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ãŒã€cookieä½œæˆæ™‚ã® IPアドレスã¨åˆè‡´ã—ãªã„å ´åˆã€ãƒªã‚¯ã‚¨ã‚¹ãƒˆã¯æ‹’å¦ã•れã¾ã™ã€‚ アプリケーションã«ã‚ˆã£ã¦ã¯ã€ã“ã®æ¤œè¨¼æ©Ÿèƒ½ã‚’無効化ã—ã€IPアドレスãŒåˆè‡´ã—ãªãã¦ã‚‚セッションcookie ã‚’å—ã‘入れるよã†ã«ã—ãŸã„ã‹ã‚‚ã—れã¾ã›ã‚“。 ãŸã¨ãˆã°ã€ãƒ¢ãƒã‚¤ãƒ«ãƒ‡ãƒã‚¤ã‚¹ãŒ WiFi 㨠4G/5G ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’切り替ãˆãŸå ´åˆã€IPアドレスãŒå¤‰æ›´ã•れã¾ã™ã€‚ ã“ã®ã‚ˆã†ã« IPアドレスãŒå¤‰æ›´ã—ã¦ã‚‚ã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã«ã‚ˆã‚‹ Webセッションã®ç¶™ç¶šã‚’許å¯ã™ã‚‹ã«ã¯ã€ã“ã®ã‚ªãƒ—ション㫠0 を渡ã—ã¾ã™ã€‚ ã“ã®è¨­å®šã¯ã‚¢ãƒ—リケーションã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£ãƒ¬ãƒ™ãƒ«ã‚’下ã’ã‚‹ã“ã¨ã«ç•™æ„ãŒå¿…è¦ã§ã™ã€‚ + +ã“ã®è¨­å®šãŒå¤‰æ›´ã•れãŸéš›ã«ã¯ã€ãã®è¨­å®šã¯ç›´ã¡ã«å映ã•れã¾ã™ (HTTPサーãƒãƒ¼ã‚’å†èµ·å‹•ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“)。 + +ã¨ã‚Šå¾—る値: 0 (無効化) ã¾ãŸã¯ 1 (有効化)。 + + + + +## 廃止予定ã®è¨­å®š + +以下ã®è¨­å®šã¯ç¾åœ¨ã‚‚サãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ãŒã€å»ƒæ­¢äºˆå®šã®æ©Ÿèƒ½ã‚„技術ã«ä¾å­˜ã—ã¦ã„ã¾ã™ã€‚ 通常ã¯ãƒ‡ãƒ•ォルト値ã®ã¾ã¾ã«ã—ã¦ãŠãã“ã¨ãŒæŽ¨å¥¨ã•れã¾ã™ã€‚ + +#### "4DSYNC" URLを使用ã—ãŸãƒ‡ãƒ¼ã‚¿ãƒ™ãƒ¼ã‚¹ã‚¢ã‚¯ã‚»ã‚¹ã‚’è¨±å¯ + +ã“ã®ã‚ªãƒ—ションを使用ã—ã¦ã€å»ƒæ­¢äºˆå®šã® */4DSYNC* URL ã«ã‚ˆã‚‹ HTTPåŒæœŸã‚µãƒãƒ¼ãƒˆã‚’制御ã—ã¾ã™ã€‚ + + +#### 一時的ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å†åˆ©ç”¨ã™ã‚‹ (リモートモード) + +å‰ã® Webリクエストを処ç†ã™ã‚‹ãŸã‚ã«ä½œæˆã•れ㟠Webプロセスをå†åˆ©ç”¨ã™ã‚‹ã“ã¨ã«ã‚ˆã£ã¦ã€4Dリモートモードã§å®Ÿè¡Œã•れã¦ã„ã‚‹ 4D Webサーãƒãƒ¼ã®å‹•作を最é©åŒ–ã§ãã¾ã™ã€‚ 実際ã€4D Webサーãƒãƒ¼ã¯ãれãžã‚Œã® Webリクエストを処ç†ã™ã‚‹ãŸã‚ã«å°‚用㮠Webプロセスを必è¦ã¨ã—ã¾ã™ã€‚リモートモードã§ã¯ã€ã“ã®ãƒ—ロセスã¯å¿…è¦ã«å¿œã˜ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚„データベースエンジンã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ãŸã‚ã« 4D Server ã«æŽ¥ç¶šã—ã¾ã™ã€‚ ãã—ã¦ãƒ—ロセス独自ã®å¤‰æ•°ã‚„セレクションを使用ã—ã¦ã€ä¸€æ™‚çš„ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’作æˆã—ã¾ã™ã€‚ リクエストã®å‡¦ç†ãŒçµ‚了ã™ã‚‹ã¨ã€ã“ã®ãƒ—ロセスã¯å»ƒæ£„ã•れã¾ã™ã€‚ + +**一時的ãªã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã‚’å†åˆ©ç”¨ã™ã‚‹** オプションãŒãƒã‚§ãƒƒã‚¯ã•れã¦ã„ã‚‹ã¨ã€ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã® 4D ã¯ä½œæˆã•れãŸå›ºæœ‰ã® Webプロセスをä¿å®ˆã—ã€ãã®å¾Œã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§å†åˆ©ç”¨ã—ã¾ã™ã€‚ プロセスã®ä½œæˆå‡¦ç†ãŒçœç•¥ã•れるãŸã‚ã€Webサーãƒãƒ¼ã®ãƒ‘フォーマンスãŒå‘上ã—ã¾ã™ã€‚ + +ä»–æ–¹ã“ã®ã‚ªãƒ—ションを使用ã™ã‚‹å ´åˆã€ä¸æ­£ãªçµæžœãŒè¿”ã•れるã“ã¨ã‚’é¿ã‘ã‚‹ãŸã‚ã«ã€4Dメソッド内ã§ä½¿ç”¨ã•れる変数をシステマãƒãƒƒã‚¯ã«åˆæœŸåŒ–ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ åŒæ§˜ã«ã€ä»¥å‰ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã§ä½¿ç”¨ã•れãŸã‚«ãƒ¬ãƒ³ãƒˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„カレントレコードをアンロードã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ã€‚ +> * **æ—§å¼ã‚»ãƒƒã‚·ãƒ§ãƒ³** (自動セッション管ç†) ãŒæœ‰åйã«ã•れるã¨ã€ã“ã®ã‚ªãƒ—ションも自動的ã«é¸æŠžã•れロックã•れã¾ã™ã€‚ 実際ã®ã¨ã“ã‚ã€ã‚»ãƒƒã‚·ãƒ§ãƒ³ç®¡ç†ãƒ¡ã‚«ãƒ‹ã‚ºãƒ ã¯ Webプロセスã®å†åˆ©ç”¨ã®åŽŸå‰‡ã«åŸºã¥ã„ã¦ã„ã¾ã™: å„セッションã¯å½“è©²ã‚»ãƒƒã‚·ãƒ§ãƒ³ãŒæœ‰åйã§ã‚ã‚‹é–“ã€åŒã˜Webプロセスを使用ã—ã¦å‡¦ç†ã•れã¾ã™ã€‚ ç•°ãªã‚‹ã‚»ãƒƒã‚·ãƒ§ãƒ³ã§ セッションプロセスãŒå…±æœ‰ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。セッションãŒçµ‚了ã™ã‚‹ã¨ãƒ—ロセスã¯ç ´æ£„ã•れã€å†åˆ©ç”¨ã•れるã“ã¨ã¯ã‚りã¾ã›ã‚“。 ãã®ãŸã‚ã€ã“ã®å ´åˆã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³ã‚„å¤‰æ•°ã‚’åˆæœŸåŒ–ã™ã‚‹å¿…è¦ã¯ã‚りã¾ã›ã‚“。 +> +> * ã“ã®ã‚ªãƒ—ションã¯ãƒªãƒ¢ãƒ¼ãƒˆãƒ¢ãƒ¼ãƒ‰ã® 4D Webサーãƒãƒ¼ã§ã®ã¿åŠ¹æžœãŒã‚りã¾ã™ã€‚ ローカルモード㮠4D ã§ã¯ (セッション管ç†ã‚’ãŠã“ãªã†ãƒ—ロセスを除ã) ã™ã¹ã¦ã®WebプロセスãŒä½¿ç”¨å¾Œã«çµ‚了ã•れã¾ã™ã€‚ + + + +#### 拡張文字をãã®ã¾ã¾é€ä¿¡ + +ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€Webサーãƒãƒ¼ã¯ã‚»ãƒŸãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãƒšãƒ¼ã‚¸ã®æ‹¡å¼µæ–‡å­—ã‚’ã€HTML標準ã«åŸºã¥ã„ãŸå¤‰æ›ã‚’ãŠã“ãªã‚ãšã«ã€Œãã®ã¾ã¾ã€é€ä¿¡ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã«ã‚ˆã‚Šã€ã¨ãã« Shift_JISæ–‡å­—ã‚³ãƒ¼ãƒ‰åˆ©ç”¨æ™‚ã®æ—¥æœ¬èªžã®ã‚·ã‚¹ãƒ†ãƒ ã§é€Ÿåº¦ãŒå‘上ã—ã¾ã™ã€‚ + + +#### Keep-Alive接続を使用ã™ã‚‹ + +4D Webサーãƒãƒ¼ã¯ Keep-Alive接続を使用ã§ãã¾ã™ã€‚ keep-alive接続を使用ã™ã‚‹ã¨ã€Webブラウザーã¨ã‚µãƒ¼ãƒãƒ¼é–“ã®ä¸€é€£ã®ã‚„りå–りã«ã¤ã„ã¦å˜ä¸€ã® TCP接続を維æŒã—ã€ã‚·ã‚¹ãƒ†ãƒ ãƒªã‚½ãƒ¼ã‚¹ã®ç¯€ç´„ã¨é€šä¿¡ã®æœ€é©åŒ–を図るã“ã¨ãŒã§ãã¾ã™ã€‚ + +**Keep-Alive接続を使用ã™ã‚‹** オプションã¯ã€Webサーãƒãƒ¼ã® Keep-Alive接続を有効ãŠã‚ˆã³ç„¡åйã«ã—ã¾ã™ã€‚ ã“ã®ã‚ªãƒ—ションã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã§æœ‰åйã«ãªã£ã¦ã„ã¾ã™ã€‚ ã»ã¨ã‚“ã©ã®å ´åˆã€é€šä¿¡ãŒé«˜é€ŸåŒ–ã•れるãŸã‚ã€ã“ã®çŠ¶æ…‹ã‚’ãŠå‹§ã‚ã—ã¾ã™ã€‚ Webブラウザー㌠Keep-Alive接続をサ ãƒãƒ¼ãƒˆã—ãªã„å ´åˆã€4D Webサーãƒãƒ¼ã¯è‡ªå‹•ã§ HTTP/1.0 ã«åˆ‡ã‚Šæ›¿ãˆã¾ã™ã€‚ + +4D Webサーãƒãƒ¼ã® Keep-Alive機能ã¯ã™ã¹ã¦ã® TCP/IP接続 (HTTP, HTTPS) ã«é–¢é€£ã—ã¾ã™ã€‚ ã—ã‹ã—ãªãŒã‚‰ã€ã™ã¹ã¦ã® 4D Webプロセスã§å¸¸ã« Keep-Alive接続ãŒä½¿ç”¨ã•れるã‚ã‘ã§ã¯ãªã„ã“ã¨ã«ç•™æ„ã—ã¦ãã ã•ã„。 + +ã‚るケースã§ã¯ã€å†…部的ãªä»–ã®æœ€é©åŒ–機能ãŒå‘¼ã³å‡ºã•れるã“ã¨ãŒã‚りã¾ã™ã€‚ Keep-Alive接続ã¯ã€ãŠã‚‚ã«ã‚¹ã‚¿ãƒ†ã‚£ãƒƒã‚¯ãƒšãƒ¼ã‚¸ã§æœ‰åйã§ã™ã€‚ + +Keep-Alive接続を設定ã™ã‚‹ 2ã¤ã®ã‚ªãƒ—ションãŒã‚りã¾ã™: + +* **接続毎ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°**: ã²ã¨ã¤ã® Keep-Alive接続ã«ãŠã‘るリクエストã¨ãƒ¬ã‚¹ãƒãƒ³ã‚¹ã®æœ€å¤§æ•°ã‚’設定ã—ã¾ã™ã€‚ 接続ã‚ãŸã‚Šã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆæ•°ã‚’制é™ã™ã‚‹ã“ã¨ã§ã€ã‚µãƒ¼ãƒãƒ¼ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆéŽå¤šã‚’é¿ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã™ (攻撃者ãŒä½¿ç”¨ã™ã‚‹ãƒ†ã‚¯ãƒ‹ãƒƒã‚¯)。

          4D Webサーãƒãƒ¼ã‚’ホストã™ã‚‹ãƒžã‚·ãƒ³ã®ãƒªã‚½ãƒ¼ã‚¹ã«å¿œã˜ã¦ã€ãƒ‡ãƒ•ォルト値 (100) を増減ã§ãã¾ã™ã€‚ + +* **タイムアウト**: ã“ã®å€¤ã‚’使用ã—ã¦ã€Webブラウザーã‹ã‚‰ãƒªã‚¯ã‚¨ã‚¹ãƒˆãŒãŠã“ãªã‚れãªã„状態ã§ã€Webサーãƒãƒ¼ãŒé–‹ã‹ã‚ŒãŸæŽ¥ç¶šã‚’ä¿å®ˆã™ã‚‹æœ€å¤§ã®å¾…ã¡ç§’数を設定ã—ã¾ã™ã€‚ ã“ã®ç§’æ•°ãŒçµŒéŽã™ã‚‹ã¨ã€ã‚µãƒ¼ãƒãƒ¼ã¯æŽ¥ç¶šã‚’é–‰ã˜ã¾ã™ã€‚

          接続ãŒé–‰ã˜ã‚‰ã‚ŒãŸå¾Œã« WebブラウザーãŒãƒªã‚¯ã‚¨ã‚¹ãƒˆã‚’é€ä¿¡ã™ã‚‹ã¨ã€æ–°ã—ã„ TCP接続ãŒä½œæˆã•れã¾ã™ã€‚ ã“ã®å‹•作ã¯ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‹ã‚‰ã¯è¦‹ãˆã¾ã›ã‚“。 + diff --git a/website/translated_docs/ja/WebServer/webServerObject.md b/website/translated_docs/ja/WebServer/webServerObject.md index 36dfae3d88a2d6..22b345b492eb5d 100644 --- a/website/translated_docs/ja/WebServer/webServerObject.md +++ b/website/translated_docs/ja/WebServer/webServerObject.md @@ -1,286 +1,137 @@ --- id: webServerObject -title: Web Server object +title: Webサーãƒãƒ¼ã‚ªãƒ–ジェクト --- -## æ¦‚è¦ -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +4Dプロジェクトã¯ã€ãƒ¡ã‚¤ãƒ³ (ホスト) アプリケーションãŠã‚ˆã³ã€ãƒ›ã‚¹ãƒˆã•れãŸå„コンãƒãƒ¼ãƒãƒ³ãƒˆã® Webサーãƒãƒ¼ã‚’èµ·å‹•ã—ã¦ç›£è¦–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +ãŸã¨ãˆã°ã€ãƒ¡ã‚¤ãƒ³ã‚¢ãƒ—リケーション㫠2ã¤ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’インストールã—ã¦ã„ã‚‹å ´åˆã€ã‚¢ãƒ—リケーションã‹ã‚‰æœ€å¤§ 3ã¤ã®ç‹¬ç«‹ã—㟠Webサーãƒãƒ¼ã‚’èµ·å‹•ã—ã¦ç›£è¦–ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™: -- one web server for the host database, -- one web server for the component #1, -- one web server for the component #2. +- ホストアプリケーション㮠Webサーãƒãƒ¼ã‚’1㤠+- コンãƒãƒ¼ãƒãƒ³ãƒˆ#1 ã® Webサーãƒãƒ¼ã‚’1㤠+- コンãƒãƒ¼ãƒãƒ³ãƒˆ#2 ã® Webサーãƒãƒ¼ã‚’1㤠-Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +1ã¤ã® 4Dã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã«æŽ¥ç¶šã§ãるコンãƒãƒ¼ãƒãƒ³ãƒˆã®æ•°ã€ã¤ã¾ã‚Š Webサーãƒãƒ¼ã®æ•°ã«ã¯ã€ãƒ¡ãƒ¢ãƒªä»¥å¤–ã®åˆ¶é™ã¯ã‚りã¾ã›ã‚“。 -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +メインアプリケーション㮠Webサーãƒãƒ¼ã‚’å«ã‚€ã€å„ 4D Webサーãƒãƒ¼ã¯ã€`4D.WebServer` クラス㮠**オブジェクト** ã¨ã—ã¦å…¬é–‹ã•れã¾ã™ã€‚ インスタンス化ã•れ㟠Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã¯ã€[多数ã®ãƒ—ロパティや関数](API/WebServerClass.md) を使用ã—ã¦ã€ã‚«ãƒ¬ãƒ³ãƒˆã®ã‚¢ãƒ—リケーションã¾ãŸã¯ä»»æ„ã®ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰æ“作ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). +> 4Dランゲージã®å¾“æ¥ã® [WEBコマンド](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.ja.html) ã¯ã‚µãƒãƒ¼ãƒˆã•れã¦ã„ã¾ã™ãŒã€ãã®å¯¾è±¡ã¨ãªã‚‹ Webサーãƒãƒ¼ã‚’é¸æŠžã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“ (後述å‚ç…§)。 -Each web server (host database or component) can be used in its own separate context, including: +å„ Webサーãƒãƒ¼ (ホストアプリケーションã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆ) ã¯ã€å€‹åˆ¥ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ä½¿ç”¨ã§ãã¾ã™ã€‚ã“れã«ã¯ã€ä»¥ä¸‹ãŒå«ã¾ã‚Œã¾ã™: +- `On Web Authentication` ãŠã‚ˆã³ `On Web Connection` データベースメソッドã®å‘¼ã³å‡ºã— +- 4Dã‚¿ã‚°ã®å‡¦ç†ã¨ãƒ¡ã‚½ãƒƒãƒ‰ã®å‘¼ã³å‡ºã— +- Webセッションや TLSプロトコルã®ç®¡ç† -- `On Web Authentication` and `On Web Connection` database method calls -- 4D tags processing and method calls, -- managing web sessions and TLS protocols. +ã“れã«ã‚ˆã‚Šã€ç‹¬è‡ªã® Webインターフェースを備ãˆãŸç‹¬ç«‹ã—ãŸã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚„機能を開発ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -This feature allows you to develop independant components and features that come with their own web interfaces. -## Instantiating a web server object +## Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ– -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +ホストアプリケーション (デフォルトWebサーãƒãƒ¼) ã® Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã¯ã€4D 起動時ã«è‡ªå‹•çš„ã«èª­ã¿è¾¼ã¾ã‚Œã¾ã™ã€‚ ã—ãŸãŒã£ã¦ã€æ–°è¦ä½œæˆã—ãŸãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã«æ¬¡ã®ã‚ˆã†ã«æ›¸ã„ãŸå ´åˆ: ```4d $nbSrv:=WEB Server list.length -//$nbSrv value is 1 +//$nbSrv ã®å€¤ã¯ 1 ``` -To instantiate a web server object, call the `WEB Server` command: +Webサーãƒãƒ¼ã‚ªãƒ–ジェクトをインスタンス化ã™ã‚‹ã«ã¯ã€[`WEB Server`](API/WebServerClass.md#web-server) コマンドを呼ã³å‡ºã—ã¾ã™ã€‚ ```4d -C_OBJECT(webServer) - //call the web server from the current context + // 4D.WebServer クラスã®ã‚ªãƒ–ジェクト変数を作æˆã—ã¾ã™ã€‚ +var webServer : 4D.WebServer + // カレントコンテキストã‹ã‚‰ Webサーãƒãƒ¼ã‚’呼ã³å‡ºã—ã¾ã™ webServer:=WEB Server - //equivalent to + + // 以下ã¨åŒã˜ã§ã™ webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: - -- the host database's web server from a component or -- the server that received the request (whatever the server), +アプリケーションãŒã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã‚’使用ã—ã¦ã„ã‚‹å ´åˆã«: +- コンãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ãƒ›ã‚¹ãƒˆã‚¢ãƒ—リケーション㮠Webサーãƒãƒ¼ã‚’呼ã³å‡ºã™å ´åˆã‚„ +- リクエストをå—ã‘å–ã£ãŸã‚µãƒ¼ãƒãƒ¼ (ã©ã®ã‚µãƒ¼ãƒãƒ¼ã§ã‚‚) を呼ã³å‡ºã™å ´åˆ -you can also use: +次を使ã†ã“ã¨ã‚‚ã§ãã¾ã™: ```4d -C_OBJECT(webServer) - //call the host web server from a component +var webServer : 4D.WebServer + // コンãƒãƒ¼ãƒãƒ³ãƒˆã‹ã‚‰ãƒ›ã‚¹ãƒˆã® Webサーãƒãƒ¼ã‚’呼ã³å‡ºã™ webServer:=WEB Server(Web server host database) - //call the target web server + // ターゲット㮠Webサーãƒãƒ¼ã‚’呼ã³å‡ºã™ webServer:=WEB Server(Web server receiving request) ``` -## Web server methods -A web server object contains the following member methods: +## Webサーãƒãƒ¼é–¢æ•° -| メソッド | Parameter | Return value | 説明 | -| --------- | ----------------- | --------------- | --------------------- | -| `start()` | settings (object) | status (object) | Starts the web server | -| `stop()` | - | - | Stops the web server | +[Webサーãƒãƒ¼ã‚¯ãƒ©ã‚¹ã®ã‚ªãƒ–ジェクト](API/webServerClass.md#Webサーãƒãƒ¼ã‚ªãƒ–ジェクト) ã«ã¯ã€ä»¥ä¸‹ã®æ©Ÿèƒ½ãŒã‚りã¾ã™ã€‚ +| 関数 | 引数 | 戻り値 | 説明 | +| ---------------------------------------- | ----------------- | --------------- | ------------- | +| [`start()`](API/WebServerClass.md#start) | settings (オブジェクト) | status (オブジェクト) | Webサーãƒãƒ¼ã‚’é–‹å§‹ã—ã¾ã™ | +| [`stop()`](API/WebServerClass.md#start) | - | - | Webサーãƒãƒ¼ã‚’åœæ­¢ã—ã¾ã™ | -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +Webサーãƒãƒ¼ã‚’èµ·å‹•ãƒ»åœæ­¢ã™ã‚‹ã«ã¯ã€Webサーãƒãƒ¼ã‚ªãƒ–ジェクト㮠[`start()`](API/WebServerClass.md#start) ãŠã‚ˆã³ [`stop()`](API/WebServerClass.md#stop) 関数を呼ã³å‡ºã™ã ã‘ã§ã™ã€‚ ```4d -C_OBJECT($status) - //to start a web server with default settings +var $status : Object + // デフォルトã®è¨­å®šã§ Webサーãƒãƒ¼ã‚’èµ·å‹•ã™ã‚‹å ´åˆ $status:=webServer.start() - //to start the web server with custom settings - //$settings object contains web server properties + // カスタム設定㧠Webサーãƒãƒ¼ã‚’é–‹å§‹ã™ã‚‹å ´åˆ + // $settings オブジェクトã¯ã€Wevサーãƒãƒ¼ãƒ—ロパティを格ç´ã—ã¾ã™ webServer.start($settings) - //to stop the web server + // Webサーãƒãƒ¼ã‚’åœæ­¢ã—ã¾ã™ $status:=webServer.stop() ``` -## Web server properties - -A web server object contains the following properties. - -Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server: - -- 4 = ISO-8859-1 -- 12 = ISO-8859-9 -- 13 = ISO-8859-10 -- 17 = Shift-JIS -- 2024 = Windows-31J -- 2026 = Big5 -- 38 = euc-kr -- 106 = UTF-8 -- 2250 = Windows-1250 -- 2251 = Windows-1251 -- 2253 = Windows-1253 -- 2255 = Windows-1255 -- 2256 = Windows-1256 - - - < - - p> - - < - - p>Default value: 63072000 (2 years)| |HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). - - < - - p> - - < - - p>Possible values: - - - 1 to 9 (where 1 is the fastest compression and 9 the highest). - - -1 = set a compromise between speed and rate of compression. - - Default = 1 (faster compression).| |HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. - - < - - p> - - < - - p>Default compression threshold = 1024 bytes| |HTTPEnabled|boolean|HTTP protocol state| |HTTPPort|number|Listening IP port number for HTTP. - - < - - p> - - < - - p>Default = 80| |HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| |HTTPSEnabled|boolean|HTTPS protocol state| |HTTPSPort|number|Listening IP port number for HTTPS. - - < - - p> - - < - - p>Default = 443| |inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. - - < - - p> - - < - - p>Default = 480 minutes| |inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. - - < - - p> - - < - - p>Default = 480 minutes| |IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| |*isRunning*|boolean|Web server running state| |keepSession|boolean|Session management enabling status - - < - - p> - - < - - p>Default = true| |logRecording|number|Log requests (logweb.txt) recording value. - - - 0 = Do not record (default) - - 1 = Record in CLF format - - 2 = Record in DLF format - - 3 = Record in ELF format - - 4 = Record in WLF format| |maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. - - < - - p> - - < - - p>Possible values: 10 - 32000 - - < - - p> - - < - - p>Default = 100| |maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. - - < - - p> - - < - - p>Possible values: 500000 - 2147483648| |maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| |minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. - - < - - p> - - < - - p>Possible values: - - - 1 = `TLSv1_0` - - 2 = `TLSv1_1` - - 3 = `TLSv1_2` (default) - - < - - p> - - < - - p>If modified, the server must be restarted to use the new value.| |*name*|text|Name of the web server database| |*openSSLVersion*|text|Version of the OpenSSL library used| |*perfectForwardSecrecy*|boolean|PFS availability on the server| |rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| |sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| |sessionCookieName|text|Name of the cookie used for storing the session ID. - - < - - p> - - < - - p>Default = "4DSID"| |sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| |sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change. - - < - - p> - - < - - p>Note: this setting lowers the security level of your application| - - These properties are defined: - - 1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), - 2. if not used, using the `WEB SET OPTION` command (host databases only), - 3. if not used, in the database settings of the host database or the component. - - If the web server is not started, the properties contain the values that will be used at the next web server startup. - - If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. - - > *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. - - ## Scope of the 4D Web commands - - The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. - - | Command | Scope | - | ------------------------------- | ------------------------------------ | - | `SET DATABASE PARAMETER` | Host database web server | - | `WEB CLOSE SESSION` | Web server that received the request | - | `WEB GET BODY PART` | Web server that received the request | - | `WEB Get body part count` | Web server that received the request | - | `WEB Get Current Session ID` | Web server that received the request | - | `WEB GET HTTP BODY` | Web server that received the request | - | `WEB GET HTTP HEADER` | Web server that received the request | - | `WEB GET OPTION` | Host database web server | - | `WEB Get server info` | Host database web server | - | `WEB GET SESSION EXPIRATION` | Web server that received the request | - | `WEB Get session process count` | Web server that received the request | - | `WEB GET STATISTICS` | Host database web server | - | `WEB GET VARIABLES` | Web server that received the request | - | `WEB Is secured connection` | Web server that received the request | - | `WEB Is server running` | Host database web server | - | `WEB SEND BLOB` | Web server that received the request | - | `WEB SEND FILE` | Web server that received the request | - | `WEB SEND HTTP REDIRECT` | Web server that received the request | - | `WEB SEND RAW DATA` | Web server that received the request | - | `WEB SEND TEXT` | Web server that received the request | - | `WEB SET HOME PAGE` | Host database web server | - | `WEB SET HTTP HEADER` | Web server that received the request | - | `WEB SET OPTION` | Host database web server | - | `WEB SET ROOT FOLDER` | Host database web server | - | `WEB START SERVER` | Host database web server | - | `WEB STOP SERVER` | Host database web server | - | `WEB Validate digest` | Web server that received the request | \ No newline at end of file + +## Webサーãƒãƒ¼ãƒ—ロパティ + +Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã«ã¯ã€Webサーãƒãƒ¼ã‚’æ§‹æˆã™ã‚‹ [ã•ã¾ã–ã¾ãªãƒ—ロパティ](API/WebServerClass.md#webサーãƒãƒ¼ã‚ªãƒ–ジェクト) ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ + +ã“れらã®ãƒ—ロパティã¯ä»¥ä¸‹ã®ã‚ˆã†ã«å®šç¾©ã—ã¾ã™: + +1. [`.start()`](API/WebServerClass.md#start) 関数㮠`settings` パラメーターを使用ã—ã¦å®šç¾©ã—ã¾ã™ (読ã¿å–り専用ã®ãƒ—ロパティを除ãã€å¾Œè¿°å‚ç…§)。 +2. 上を使用ã—ãªã„å ´åˆã¯ã€`WEB SET OPTION` コマンドを使用ã—ã¦å®šç¾©ã—ã¾ã™ (ホストアプリケーションã®ã¿)。 +3. 上を使用ã—ãªã„å ´åˆã¯ã€ãƒ›ã‚¹ãƒˆã‚¢ãƒ—リケーションã¾ãŸã¯ã‚³ãƒ³ãƒãƒ¼ãƒãƒ³ãƒˆã®è¨­å®šã§å®šç¾©ã—ã¾ã™ã€‚ + +- Webサーãƒãƒ¼ã‚’èµ·å‹•ã—ã¦ã„ãªã„å ´åˆã€ãƒ—ロパティã«ã¯ Webサーãƒãƒ¼ã®æ¬¡å›žèµ·å‹•時ã«ä½¿ç”¨ã•れる値ãŒå«ã¾ã‚Œã¦ã„ã¾ã™ã€‚ +- Webサーãƒãƒ¼ãŒèµ·å‹•ã•れã¦ã„ã‚‹å ´åˆã€ãƒ—ロパティã«ã¯ Webサーãƒãƒ¼ã§ä½¿ç”¨ã•れる実際ã®å€¤ãŒå«ã¾ã‚Œã¾ã™ (デフォルトã®å®šã¯ [`.start()`](API/WebServerClass.md#start) 関数㮠`settings` パラメーターã«ã‚ˆã£ã¦ä¸Šæ›¸ãã•れã¦ã„ã‚‹å¯èƒ½æ€§ãŒã‚りã¾ã™)。 + +> *isRunning*ã€*name*ã€*openSSLVersion*ã€*perfectForwardSecrecy* ã¯èª­ã¿å–り専用ã®ãƒ—ロパティã§ã€[`start()`](API/WebServerClass.md#start)関数㮠`settings` オブジェクトパラメーターã§äº‹å‰ã«å®šç¾©ã™ã‚‹ã“ã¨ã¯ã§ãã¾ã›ã‚“。 + + +## 4D Webコマンドã®ã‚¹ã‚³ãƒ¼ãƒ— + +4Dランゲージã«ã¯ã€Webサーãƒãƒ¼ã®åˆ¶å¾¡ã«ä½¿ç”¨ã§ãã‚‹ [ã„ãã¤ã‹ã®ã‚³ãƒžãƒ³ãƒ‰](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.ja.html) ãŒã‚りã¾ã™ã€‚ ãŸã ã—ã€ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã¯ 1ã¤ã® (デフォルト) Webサーãƒãƒ¼ã§å‹•作ã™ã‚‹ã‚ˆã†ã«è¨­è¨ˆã•れã¦ã„ã¾ã™ã€‚ ã“れらã®ã‚³ãƒžãƒ³ãƒ‰ã‚’ Webサーãƒãƒ¼ã‚ªãƒ–ジェクトã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆã§ä½¿ç”¨ã™ã‚‹å ´åˆã¯ã€ãã®ã‚¹ã‚³ãƒ¼ãƒ—ãŒé©åˆ‡ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。 + +| コマンド | スコープ | +| ------------------------------- | ------------------- | +| `SET DATABASE PARAMETER` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB CLOSE SESSION` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB GET BODY PART` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB Get body part count` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB Get Current Session ID` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB GET HTTP BODY` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB GET HTTP HEADER` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB GET OPTION` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB Get server info` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB GET SESSION EXPIRATION` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB Get session process count` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB GET STATISTICS` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB GET VARIABLES` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB Is secured connection` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB Is server running` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB SEND BLOB` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SEND FILE` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SEND HTTP REDIRECT` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SEND RAW DATA` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SEND TEXT` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SET HOME PAGE` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB SET HTTP HEADER` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | +| `WEB SET OPTION` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB SET ROOT FOLDER` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB START SERVER` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB STOP SERVER` | ホストアプリケーション Webサーãƒãƒ¼ | +| `WEB Validate digest` | リクエストをå—ã‘å–ã£ãŸ Webサーãƒãƒ¼ | diff --git a/website/translated_docs/pt/API/BlobClass.md b/website/translated_docs/pt/API/BlobClass.md new file mode 100644 index 00000000000000..9d9768c2572c8a --- /dev/null +++ b/website/translated_docs/pt/API/BlobClass.md @@ -0,0 +1,77 @@ +--- +id: BlobClass +title: Blob +--- + +The Blob class lets you create and manipulate [blob objects](../Concepts/dt_blob.md#blob-types) (`4D.Blob`). + +### Summary + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**4D.Blob.new()** : 4D.Blob
          **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
          **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob](#4dblobnew)

              creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). | +| [**.size** : Real](#size)

              returns the size of a `4D.Blob`, expressed in bytes. | +| [**.slice()** : 4D.Blob
          **.slice**( *start* : Real ) : 4D.Blob
          **.slice**( *start* : Real; *end* : Real ) : 4D.Blob](#slice)

               creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. | + +## 4D.Blob.new() + +

          History +| Version | Changes | +| ------- | ------- | +| v19 R2 | Added | +
          + +**4D.Blob.new()** : 4D.Blob
          **4D.Blob.new**( *blobScal* : Blob ) : 4D.Blob
          **4D.Blob.new**( *blobObj* : 4D.Blob ) : 4D.Blob + +| Parameter | Type | | Description | +| --------- | --------------- |:--:| ------------ | +| blob | Blob or 4D.Blob | -> | Blob to copy | +| Result | 4D.Blob | <- | New 4D.Blob | + +#### Description + +`4D.Blob.new` creates a new `4D.Blob` object optionally encapsulating a copy of the data from another blob (scalar blob or `4D.Blob`). If the `blob` parameter is omitted, the method returns an empty 4D.Blob. + +## .size + +**.size** : Real +#### Description +The `.size` property returns the size of a `4D.Blob`, expressed in bytes. +## .slice() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 R2 | Added | +
          + +**.slice()** : 4D.Blob
          **.slice**( *start* : Real ) : 4D.Blob
          **.slice**( *start* : Real; *end* : Real ) : 4D.Blob +| Parameter | Type | | Description | +| --------- | ------- |:--:| ---------------------------------------------------------------------- | +| start | Real | -> | index of the first byte to include in the new `4D.Blob`. | +| end | Real | -> | index of the first byte that will not be included in the new `4D.Blob` | +| Result | 4D.Blob | <- | New `4D.Blob` | +#### Description + +`.slice()` creates and returns a `4D.Blob` that references data from a subset of the blob on which it's called. The original blob is not altered. The `start` parameter is an index into the blob indicating the first byte to include in the new `4D.Blob`. If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is 0. If you specify a value for start that is larger than the size of the source blob, the returned `4D.Blob`'s size is 0, and it contains no data. + +The `end` parameter is an index into the blob indicating the first byte that will not be included in the new `4D.Blob` (i.e. the byte exactly at this index is not included). If you specify a negative value, 4D treats it as an offset from the end of the blob toward the beginning. For example, -10 would be the 10th from last byte in the blob. The default value is the size of the blob. + +#### Example + +```4d +var $myBlob : 4D.Blob + +// Store text in a 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$is4DBlob:=OB Instance of($myBlob; 4D.Blob); //True + +$myString:=Convert to text($myBlob; "UTF-8") +// $myString contains "Hello, World!" + +// Create a new 4D.Blob from $myBlob +$myNewBlob:=$myBlob.slice(0; 5) + +$myString:=Convert to text($myNewBlob; "UTF-8") +// $myString contains "Hello" +``` diff --git a/website/translated_docs/pt/API/ClassClass.md b/website/translated_docs/pt/API/ClassClass.md new file mode 100644 index 00000000000000..b26630223f6f56 --- /dev/null +++ b/website/translated_docs/pt/API/ClassClass.md @@ -0,0 +1,132 @@ +--- +id: ClassClass +title: Class +--- + + +When a user class is [defined](Concepts/classes.md#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of "Class" class, which has properties and a function. + + + +### Summary + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.name** : Text](#name)

              contains the name of the `4D.Class` object | +| [**.new**( *param* : any { *;...paramN* } ) : 4D.Class](#new)

              creates and returns a `cs.className` object which is a new instance of the class on which it is called | +| [**.superclass** : 4D.Class](#superclass)

              returns the parent class of the class | + + + +## .name + +

          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
          + +**.name** : Text +#### Description + +The `.name` property contains the name of the `4D.Class` object. Class names are case sensitive. + +This property is **read-only**. + + + + +## .new() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
          + +**.new**( *param* : any { *;...paramN* } ) : 4D.Class +| Parameter | Type | | Description | +| --------- | -------- |:--:| ------------------------------------------------ | +| param | any | -> | Parameter(s) to pass to the constructor function | +| Result | 4D.Class | <- | New object of the class | + + +#### Description + +The `.new()` function creates and returns a `cs.className` object which is a new instance of the class on which it is called. This function is automatically available on all classes from the [`cs` class store](Concepts/classes.md#cs). + +You can pass one or more optional *param* parameters, which will be passed to the [class constructor](Concepts/classes.md#class-constructor) function (if any) in the className class definition. Within the constructor function, the [`This`](Concepts/classes.md#this) is bound to the new object being constructed. + +If `.new()` is called on a non-existing class, an error is returned. + +#### Examples + +To create a new instance of the Person class: + +```4d +var $person : cs.Person +$person:=cs.Person.new() //create the new instance +//$person contains functions of the class +``` + +To create a new instance of the Person class with parameters: + +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text; $age : Integer) + This.firstName:=$firstname + This.lastName:=$lastname + This.age:=$age +``` + +```4d +//In a method +var $person : cs.Person +$person:=cs.Person.new("John";"Doe";40) +//$person.firstName = "John" +//$person.lastName = "Doe" +//$person.age = 40 +``` + + + + + +## .superclass + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
          + +**.superclass** : 4D.Class +#### Description + +The `.superclass` property returns the parent class of the class. A superclass can be a `4D.Class` object, or a `cs.className` object. If the class does not have a parent class, the property returns **null**. + +A superclass of a user class is declared in a class by using the [`Class extends `](Concepts/classes.md#class-extends-classname) keyword. + +This property is **read-only**. + +#### Examples + +```4d +$sup:=4D.File.superclass //Document +$sup:=4D.Document.superclass //Object +$sup:=4D.Object.superclass //null + +// If you created a MyFile class +// with `Class extends File` +$sup:=cs.MyFile.superclass //File + +``` + + + +**See also:** [Super](Concepts/classes.md#super) + + diff --git a/website/translated_docs/pt/API/CollectionClass.md b/website/translated_docs/pt/API/CollectionClass.md new file mode 100644 index 00000000000000..14cc4874a51966 --- /dev/null +++ b/website/translated_docs/pt/API/CollectionClass.md @@ -0,0 +1,2582 @@ +--- +id: CollectionClass +title: Collection +--- + + +The Collection class manages [Collection](Concepts/dt_collection.md) type variables. + +A collection is initialized with: + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**New collection** {( *...value* : any )} : Collection](#new-collection)

               creates a new empty or prefilled collection | +| [**New shared collection** {( *...value* : any )} : Collection](#new-shared-collection)

               creates a new empty or prefilled shared collection | + + +### Example + +```4d + var $colVar : Collection //creation of collection type 4D variable + $colVar:=New collection //initialization of the collection and assignment to the 4D variable +``` + + +### Summary + + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.average**( {*propertyPath* : Text } ) : Real](#average)

              returns the arithmetic mean (average) of defined values in the collection instance | +| [**.clear()** : Collection](#clear)

              removes all elements from the collection instance and returns an empty collection | +| [**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection](#combine)

              inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection | +| [**.concat**( *value* : any { *;...valueN* } ) : Collection](#concat)

              returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end | +| [**.copy**() : Collection
          **.copy**( *option* : Integer ) : Collection
          **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
          **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection](#copy)

               returns a deep copy of the collection instance | +| [**.count**( { *propertyPath* : Text } ) : Real](#count)

              returns the number of non-null elements in the collection | +| [**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real](#countvalues)

              returns the number of times value is found in the collection | +| [**.distinct**( {*option* : Integer} ) : Collection
          **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection](#distinct)

              returns a collection containing only distinct (different) values from the original collection | +| [**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean](#equal)

              compares the collection with collection2 | +| [**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
          **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean](#every)

              returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method | +| [**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
          **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection](#extract)

              creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects | +| [**.fill**( *value* : any ) : Collection
          **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection](#fill)

              fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection | +| [**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection](#filter)

              returns a new collection containing all elements of the original collection for which *methodName* method result is **true** | +| [**.find**( *methodName* : Text { ; *...param* : any } ) : any
          **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any](#find)

              returns the first value in the collection for which *methodName*, applied on each element, returns **true** | +| [**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
          **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer](#find)

              returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true** | +| [**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#indexof)

              searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found | +| [**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection ](#indices)

              returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions | +| [**.insert**( *index* : Integer ; *element* : any ) : Collection ](#insert)

               inserts *element* at the specified *index* position in the collection instance and returns the edited collection | +| [**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text ](#join)

              converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator | +| [**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer ](#lastindexof)

              searches the *toSearch* expression among collection elements and returns the index of the last occurrence | +| [**.length** : Integer](#length)

              returns the number of elements in the collection | +| [**.map**( *methodName* : Text { ; *...param* : any } ) : Collection ](#map)

              creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection | +| [**.max**( { *propertyPath* : Text } ) : any ](#max)

              returns the element with the highest value in the collection | +| [**.min**( { *propertyPath* : Text } ) : any ](#min)

              returns the element with the smallest value in the collection | +| [**.orderBy**( ) : Collection
          **.orderBy**( *pathStrings* : Text ) : Collection
          **.orderBy**( *pathObjects* : Collection ) : Collection
          **.orderBy**( *ascOrDesc* : Integer ) : Collection ](#orderby)

              returns a new collection containing all elements of the collection in the specified order | +| [**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection ](#orderbymethod)

              returns a new collection containing all elements of the collection in the order defined through the *methodName* method | +| [**.pop()** : any ](#pop)

              removes the last element from the collection and returns it as the function result | +| [**.push**( *element* : any { ;...*elementN* } ) : Collection ](#push)

              appends one or more *element*(s) to the end of the collection instance and returns the edited collection | +| [**.query**( *queryString* : Text ; *...value* : any ) : Collection
          **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection ](#query)

              returns all elements of a collection of objects that match the search conditions | +| [**.reduce**( *methodName* : Text ) : any
          **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any ](#reduce)

              applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value | +| [**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection ](#remove)

              removes one or more element(s) from the specified *index* position in the collection and returns the edited collection | +| [**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection ](#resize)

              sets the collection length to the specified new size and returns the resized collection | +| [**.reverse( )** : Collection ](#reverse)

              returns a deep copy of the collection with all its elements in reverse order | +| [**.shift()** : any](#shift)

              removes the first element of the collection and returns it as the function result | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection](#slice)

              returns a portion of a collection into a new collection | +| [**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
          **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean](#some)

              returns true if at least one element in the collection successfully passed a test | +| [**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection ](#sort)

              sorts the elements of the original collection | +| [**.sum**( { *propertyPath* : Text } ) : Real](#sum)

              returns the sum for all values in the collection instance | +| [**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection](#unshift)

              inserts the given *value*(s) at the beginning of the collection | + + + +## `New collection` + + +**New collection** {( *...value* : any )} : Collection +| Parameter | Type | | Description | +| --------- | ----------------------------------------------------------------------- |:--:| --------------------- | +| value | Number, Text, Date, Time, Boolean, Object, Collection, Picture, Pointer | -> | Collection's value(s) | +| Result | Collection | <- | New collection | + + +#### Description + +The `New collection` command creates a new empty or prefilled collection and returns its reference. + +If you do not pass any parameters, `New collection` creates an empty collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. +> Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new collection by passing one or several *value*(s) as parameter(s). + +Otherwise, you can add or modify elements subsequently through assignment. For example: + +```4d + myCol[10]:="My new element" +``` + +If the new element index is beyond the last existing element of the collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of any supported type (number, text, date, picture, pointer, object, collection...). Unlike arrays, collections can mix data of different types. + +You must pay attention to the following conversion issues: + +* If you pass a pointer, it is kept "as is"; it is evaluated using the `JSON Stringify` command +* Dates are stored as "yyyy-mm-dd" dates or strings with the "YYYY-MM-DDTHH:mm:ss.SSSZ" format, according to the current "dates inside objects" database setting. When converting 4D dates into text prior to storing them in the collection, by default the program takes the local time zone into account. You can modify this behavior using the `Dates inside objects` selector of the `SET DATABASE PARAMETER` command. +* If you pass a time, it is stored as a number of milliseconds (Real). + +#### Example 1 + + + +You want to create a new empty collection and assign it to a 4D collection variable: + +```4d + var $myCol : Collection + $myCol:=New collection + //$myCol=[] +``` + +#### Example 2 + +You want to create a prefilled collection: + +```4d + var $filledColl : Collection + $filledColl:=New collection(33;"mike";"november";->myPtr;Current date) + //$filledColl=[33,"mike","november","->myPtr","2017-03-28T22:00:00.000Z"] +``` + +#### Example 3 + +You create a new collection and then add a new element: + +```4d + var $coll : Collection + $coll:=New collection("a";"b";"c") + //$coll=["a","b","c"] + $coll[9]:="z" //add a 10th element with value "z" + $vcolSize:=$coll.length //10 + //$coll=["a","b","c",null,null,null,null,null,null,"z"] +``` + + + + +## `New shared collection` + +

          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**New shared collection** {( *...value* : any )} : Collection +| Parameter | Type | | Description | +| --------- | ------------------------------------------------------------------- |:--:| ---------------------------- | +| value | Number, Text, Date, Time, Boolean, Shared object, Shared collection | -> | Shared collection's value(s) | +| Result | Collection | <- | New shared collection | + + +#### Description + +The `New shared collection` command creates a new empty or prefilled shared collection and returns its reference. + +Adding an element to this collection must be surrounded by the [`Use...End`](Concepts/shared.md#useend-use) use structure, otherwise an error is generated. Reading an element without a structure is, however, possible. +> For more information on shared collections, please refer to the [Shared objects and collections](Concepts/shared.md) page. + +If you do not pass any parameters, `New shared collection` creates an empty shared collection and returns its reference. + +You must assign the returned reference to a 4D variable of the Collection type. +> Keep in mind that `var : Collection` or `C_COLLECTION` statements declare a variable of the `Collection` type but does not create any collection. + +Optionally, you can prefill the new shared collection by passing one or several *value*(s) as parameter(s). Otherwise, you can add or modify elements subsequently through object notation assignment (see example). + +If the new element index is beyond the last existing element of the shared collection, the collection is automatically resized and all new intermediary elements are assigned a **null** value. + +You can pass any number of values of the following supported types: + +* number (real, longint...). Number values are always stored as reals. +* text +* boolean +* date +* time (stored as number of milliseconds - real) +* null +* shared object(*) +* shared collection(*) +> Unlike standard (not shared) collections, shared collections do not support pictures, pointers, and objects or collections that are not shared. + +(*)When a shared object or collection is added to a shared collection, they share the same *locking identifier*. For more information on this point, refer to the **4D Developer**'s guide. + +#### Example + +```4d + $mySharedCol:=New shared collection("alpha";"omega") + Use($mySharedCol) + $mySharedCol[1]:="beta" + End use +``` + + + +## .average() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.average**( {*propertyPath* : Text } ) : Real + +| Parameter | Type | | Description | +| ------------ | --------------- |:--:| ----------------------------------------------- | +| propertyPath | Text | -> | Object property path to be used for calculation | +| Result | Real, Undefined | <- | Arithmetic mean (average) of collection values | + + + +#### Description + +The `.average()` function returns the arithmetic mean (average) of defined values in the collection instance. + + + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.average()` returns `undefined` if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + + +#### Example 1 + +```4d + var $col : Collection + $col:=New collection(10;20;"Monday";True;6) + $vAvg:=$col.average() //12 +``` + +#### Example 2 + +```4d + var $col : Collection + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $vAvg:=$col.average("salary") //23500 +``` + + + + +## .clear() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.clear()** : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| --------------------------------------------- | +| Result | Collection | <- | Original collection with all elements removed | + + +#### Description + +The `.clear()` function removes all elements from the collection instance and returns an empty collection. +> This function modifies the original collection. + +#### Example + +```4d +var $col : Collection +$col:=New collection(1;2;5) +$col.clear() +$vSize:=$col.length //$vSize=0 +``` + + + + + + +## .combine() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.combine**( *col2* : Collection {; *index* : Integer } ) : Collection + +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ----------------------------------------------------------------------------- | +| col2 | Collection | -> | Collection to combine | +| index | Integer | -> | Position to which insert elements to combine in collection (default=length+1) | +| Result | Collection | <- | Original collection containing combined element(s) | + + +#### Description + +The `.combine()` function inserts *col2* elements at the end or at the specified *index* position in the collection instance and returns the edited collection. Unlike the `.insert()` function, `.combine()` adds each value of *col2* in the original collection, and not as a single collection element. +> This function modifies the original collection. + +By default, *col2* elements are added at the end of the orginal collection. You can pass in *index* the position where you want the *col2* elements to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, the actual starting *index* will be set to the length of the collection. +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, *index* is set to 0. + + +#### Example + +```4d +var $c; $fruits : Collection +$c:=New collection(1;2;3;4;5;6) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$c.combine($fruits;3) //[1,2,3,"Orange","Banana","Apple","Grape",4,5,6] +``` + + + + + + +## .concat() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.concat**( *value* : any { *;...valueN* } ) : Collection +| Parameter | Type | | Description | +| --------- | -------------------------------------------------------------- |:--:| ----------------------------------------------------------------------------------------------------------------- | +| value | Number, Text, Object, Collection, Date, Time, Boolean, Picture | -> | Value(s) to concatenate. If *value* is a collection, all collection elements are added to the original collection | +| Result | Collection | <- | New collection with value(s) added to the original collection | + + +#### Description + +The `.concat()` function returns a new collection containing the elements of the original collection with all elements of the *value* parameter added to the end. +> This function does not modify the original collection. + +If *value* is a collection, all its elements are added as new elements at the end of the original collection. If *value* is not a collection, it is added itself as a new element. + + +#### Example + +```4d +var $c : Collection +$c:=New collection(1;2;3;4;5) +$fruits:=New collection("Orange";"Banana";"Apple";"Grape") +$fruits.push(New object("Intruder";"Tomato")) +$c2:=$c.concat($fruits) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}] +$c2:=$c.concat(6;7;8) //[1,2,3,4,5,6,7,8] +``` + + + + + +## .copy() + +
          History +| Version | Changes | +| ------- | -------------------------------------------------- | +| v18 R3 | New *ck shared* option. New *groupWith* parameters | +| v16 R6 | Added | +
          + +**.copy**() : Collection
          **.copy**( *option* : Integer ) : Collection
          **.copy**( *option* : Integer ; *groupWithCol* : Collection ) : Collection
          **.copy**( *option* : Integer ; *groupWithObj* : Object ) : Collection + +| Parameter | Type | | Description | +| ------------ | ---------- |:--:| -------------------------------------------------------------------------------------------------------- | +| option | Integer | -> | `ck resolve pointers`: resolve pointers before copying,
          `ck shared`: return a shared collection | +| groupWithCol | Collection | -> | Shared collection to be grouped with the resulting collection | +| groupWithObj | Object | -> | Shared object to be grouped with the resulting collection | +| Result | Collection | <- | Deep copy of the original collection | + + +#### Description + +The `.copy()` function returns a deep copy of the collection instance.***Deep copy*** means that objects or collections within the original collection are duplicated and do not share any reference with the returned collection. +> This function does not modify the original collection. + +If passed, the *option* parameter can contain one of the following constants (or both): + +| option | Description | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ck resolve pointers` | If the original collection contains pointer type values, by default the copy also contains the pointers. However, you can resolve pointers when copying by passing the ck resolve pointers. In this case, each pointer present in the collection is evaluated when copying and its dereferenced value is used. | +| `ck shared` | By default, copy() returns a regular (not shared) collection, even if the command is applied to a shared collection. Pass the ck shared constant to create a shared collection. In this case, you can use the groupWith parameter to associate the shared collection with another collection or object (see below). | + +The *groupWithCol* or *groupWithObj* parameters allow you to designate a collection or an object with which the resulting collection should be associated. + + +#### Example 1 + +We want to copy the *$lastnames* regular (non shared) collection into the *$sharedObject* shared object. To do this, we must create a shared copy of the collection (*$sharedLastnames*). + +```4d +var $sharedObject : Object +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$sharedObject:=New shared object + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) //$sharedLastnames is a shared collection + +//Now we can put $sharedLastnames into $sharedObject +Use($sharedObject) + $sharedObject.lastnames:=$sharedLastnames +End use +``` + + +#### Example 2 + +We want to combine *$sharedColl1* and *$sharedColl2*. Since they belong to different shared groups, a direct combination would result in an error. Therefore, we must make a shared copy of *$sharedColl1* and designate *$sharedColl2* as a shared group for the copy. + +```4d +var $sharedColl1;$sharedColl2;$copyColl : Collection + +$sharedColl1:=New shared collection(New shared object("lastname";"Smith")) +$sharedColl2:=New shared collection(New shared object("lastname";"Brown")) + +//$copyColl belongs to the same shared group as $sharedColl2 + $copyColl:=$sharedColl1.copy(ck shared;$sharedColl2) + Use($sharedColl2) + $sharedColl2.combine($copyColl) + End use +``` + +#### Example 3 + +We have a regular collection (*$lastnames*) and we want to put it in the **Storage** of the application. To do this, we must create a shared copy beforehand (*$sharedLastnames*). + +```4d +var $lastnames;$sharedLastnames : Collection +var $text : Text + +$text:=Document to text(Get 4D folder(Current resources folder)+"lastnames.txt") +$lastnames:=JSON Parse($text) //$lastnames is a regular collection + +$sharedLastnames:=$lastnames.copy(ck shared) // shared copy + +Use(Storage) + Storage.lastnames:=$sharedLastnames +End use +``` + +#### Example 4 + +This example illustrates the use of the `ck resolve pointers` option: + +```4d + var $col : Collection + var $p : Pointer + $p:=->$what + + $col:=New collection + $col.push(New object("alpha";"Hello";"num";1)) + $col.push(New object("beta";"You";"what";$p)) + + $col2:=$col.copy() + $col2[1].beta:="World!" + ALERT($col[0].alpha+" "+$col2[1].beta) //displays "Hello World!" + + $what:="You!" + $col3:=$col2.copy(ck resolve pointers) + ALERT($col3[0].alpha+" "+$col3[1].what) //displays "Hello You!" +``` + + + + + + + +## .count() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.count**( { *propertyPath* : Text } ) : Real + +| Parameter | Type | | Description | +| ------------ | ---- |:--:| ----------------------------------------------- | +| propertyPath | Text | -> | Object property path to be used for calculation | +| Result | Real | <- | Number of elements in the collection | + + +#### Description + +The `.count()` function returns the number of non-null elements in the collection. + +If the collection contains objects, you can pass the *propertyPath* parameter. In this case, only elements that contain the *propertyPath* are taken into account. + +#### Example + +```4d + var $col : Collection + var $count1;$count2 : Real + $col:=New collection(20;30;Null;40) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500)) + $col.push(New object("lastName";"Henry";"salary";12000)) + $count1:=$col.count() //$count1=7 + $count2:=$col.count("name") //$count2=3 + +``` + + + + + + +## .countValues() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.countValues**( *value* : any {; *propertyPath* : Text } ) : Real + +| Parameter | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ----------------------------------------------- | +| value | Text, Number, Boolean, Date, Object, Collection | -> | Value to count | +| propertyPath | Text | -> | Object property path to be used for calculation | +| Result | Real | <- | Number of occurrences of the value | + + +#### Description + +The `.countValues()` function returns the number of times value is found in the collection. + +You can pass in *value*: + +* a scalar value (text, number, boolean, date), +* an object or a collection reference. + + +For an element to be found, the type of *value* must be equivalent to the type of the element; the method uses the equality operator. + +The optional *propertyPath* parameter allows you to count values inside a collection of objects: pass in *propertyPath* the path of the property whose values you want to count. +> This function does not modify the original collection. + +#### Example 1 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection(1;2;5;5;5;3;6;4) + $vCount:=$col.countValues(5) // $vCount=3 +``` + + +#### Example 2 + +```4d + var $col : Collection + var $vCount : Integer + $col:=New collection + $col.push(New object("name";"Smith";"age";5)) + $col.push(New object("name";"Wesson";"age";2)) + $col.push(New object("name";"Jones";"age";3)) + $col.push(New object("name";"Henry";"age";4)) + $col.push(New object("name";"Gross";"age";5)) + $vCount:=$col.countValues(5;"age") //$vCount=2 +``` + + +#### Example 3 + +```4d + var $numbers; $letters : Collection + var $vCount : Integer + + $letters:=New collection("a";"b";"c") + $numbers:=New collection(1;2;$letters;3;4;5) + + $vCount:=$numbers.countValues($letters) //$vCount=1 +``` + + + + + + + +## .distinct() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.distinct**( {*option* : Integer} ) : Collection
          **.distinct**( *propertyPath* : Text {; *option* : Integer } ) : Collection + +| Parameter | Type | | Description | +| ------------ | ---------- |:--:| ---------------------------------------------------------------- | +| option | Integer | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| propertyPath | Text | -> | Path of attribute whose distinct values you want to get | +| Result | Collection | <- | New collection with only distinct values | + + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the original collection. +> This function does not modify the original collection. + +The returned collection is automatically sorted. **Null** values are not returned. + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the *option* parameter. + +If the collection contains objects, you can pass the *propertyPath* parameter to indicate the object property whose distinct values you want to get. + + + +#### Example + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push("a";"b";"c";"A";"B";"c";"b";"b") + $c.push(New object("size";1)) + $c.push(New object("size";3)) + $c.push(New object("size";1)) + $c2:=$c.distinct() //$c2=["a","b","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct(ck diacritical) //$c2=["a","A","b","B","c",{"size":1},{"size":3},{"size":1}] + $c2:=$c.distinct("size") //$c2=[1,3] +``` + + + + + + +## .equal() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.equal**( *collection2* : Collection {; *option* : Integer } ) : Boolean +| Parameter | Type | | Description | +| ----------- | ---------- |:--:| ---------------------------------------------------------------- | +| collection2 | Collection | -> | Collection to compare | +| option | Integer | -> | `ck diacritical`: diacritical evaluation ("A" # "a" for example) | +| Result | Boolean | <- | True if collections are identical, false otherwise | + + +#### Description + +The `.equal()` function compares the collection with collection2 and returns **true** if they are identical (deep comparison). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `ck diacritical` constant in the option parameter. +> Elements with **Null** values are not equal to Undefined elements. + +#### Example + +```4d + var $c; $c2 : Collection + var $b : Boolean + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3;4) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("1";"a";"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"orange");2;3) + $b:=$c.equal($c2) // false + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2) // true + + $c:=New collection(New object("a";1;"b";"orange");2;3) + $c2:=New collection(New object("a";1;"b";"ORange");2;3) + $b:=$c.equal($c2;ck diacritical) //false +``` + + + + + +## .every() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.every**( *methodName* : Text { ;*...param* : any } ) : Boolean
          **.every**( *startFrom* : Integer ; *methodName* : Text { ;*...param* : any } ) : Boolean +| Parameter | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------- | +| startFrom | Integer | -> | Index to start the test at | +| methodName | Text | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to methodName | +| Result | Boolean | <- | True if all elements successfully passed the test | + + +#### Description + +The `.every()` function returns **true** if all elements in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to true for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: paramN... + +*methodName* sets the following parameter(s): + +* *$1.result* (Boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (Boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In all cases, at the point when the `.every()` function encounters the first collection element returning **false** in *$1.result*, it stops calling *methodName* and returns **false**. + +By default, `.every()` tests the whole collection. Optionally, you can pass in *startFrom* the index of the element from which to start the test. + +* If *startFrom* >= the collection's length, **false** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection ( *startFrom:=startFrom+length*). +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example 1 + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("NumberGreaterThan0") //returns true +$c.push(-1) +$b:=$c.every("NumberGreaterThan0") //returns false +``` + +With the following ***NumberGreaterThan0*** method: + +```4d +$1.result:=$1.value>0 +``` + +#### Example 2 + +This example tests that all elements of a collection are of the real type: + +```4d +var $c : Collection +var $b : Boolean +$c:=New collection +$c.push(5;3;1;4;6;2) +$b:=$c.every("TypeLookUp";Is real) //$b=true +$c:=$c.push(New object("name";"Cleveland";"zc";35049)) +$c:=$c.push(New object("name";"Blountsville";"zc";35031)) +$b:=$c.every("TypeLookUp";Is real) //$b=false +``` + +With the following ***TypeLookUp*** method: + +```4d +#DECLARE ($toEval : Object ; $param : Integer) //$1; $2 +If(Value type($toEval.value)=$param) + $toEval.result:=True +End if +``` + + + + + +## .extract() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.extract**( *propertyPath* : Text { ; *option* : Integer } ) : Collection
          **.extract**( *propertyPath* : Text ; *targetPath* : Text { ;...*propertyPathN* : Text ;... *targetPathN* : Text } ) : Collection + +| Parameter | Type | | Description | +| ------------ | ---------- |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| propertyPath | Text | -> | Object property path whose values must be extracted to the new collection | +| targetpath | Text | -> | Target property path or property name | +| option | Integer | -> | `ck keep null`: include null properties in the returned collection (ignored by default). Parameter ignored if *targetPath* passed. | +| Result | Collection | <- | New collection containing extracted values | + + +#### Description + +The `.extract()` function creates and returns a new collection containing *propertyPath* values extracted from the original collection of objects. +> This function does not modify the original collection. + +The contents of the returned collection depends on the *targetPath* parameter: + +* If the *targetPath* parameter is omitted, `.extract()` populates the new collection with the *propertyPath* values of the original collection. + + By default, elements for which *propertyPath* is null or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as null elements in the returned collection. + + +* If one or more *targetPath* parameter(s) are passed, `.extract()` populates the new collection with the *propertyPath* properties and each element of the new collection is an object with *targetPath* properties filled with the corresponding *propertyPath* properties. Null values are kept (*option* parameter is ignored with this syntax). + + +#### Example 1 + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("name";"Cleveland")) +$c.push(New object("zip";5321)) +$c.push(New object("name";"Blountsville")) +$c.push(42) +$c2:=$c.extract("name") // $c2=[Cleveland,Blountsville] +$c2:=$c.extract("name";ck keep null) //$c2=[Cleveland,null,Blountsville,null] +``` + + +#### Example 2 + + +```4d +var $c : Collection +$c:=New collection +$c.push(New object("zc";35060)) +$c.push(New object("name";Null;"zc";35049)) +$c.push(New object("name";"Cleveland";"zc";35049)) +$c.push(New object("name";"Blountsville";"zc";35031)) +$c.push(New object("name";"Adger";"zc";35006)) +$c.push(New object("name";"Clanton";"zc";35046)) +$c.push(New object("name";"Clanton";"zc";35045)) +$c2:=$c.extract("name";"City") //$c2=[{City:null},{City:Cleveland},{City:Blountsville},{City:Adger},{City:Clanton},{City:Clanton}] +$c2:=$c.extract("name";"City";"zc";"Zip") //$c2=[{Zip:35060},{City:null,Zip:35049},{City:Cleveland,Zip:35049},{City:Blountsville,Zip:35031},{City:Adger,Zip:35006},{City:Clanton,Zip:35046},{City:Clanton,Zip:35045}] +``` + + + + + + +## .fill() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.fill**( *value* : any ) : Collection
          **.fill**( *value* : any ; *startFrom* : Integer { ; *end* : Integer } ) : Collection + + +| Parameter | Type | | Description | +| --------- | ----------------------------------------------- |:--:| -------------------------------------- | +| value | number, Text, Collection, Object, Date, Boolean | -> | Filling value | +| startFrom | Integer | -> | Start index (included) | +| end | Integer | -> | End index (not included) | +| Result | collection | <- | Original collection with filled values | + + +#### Description + +The `.fill()` function fills the collection with the specified *value*, optionally from *startFrom* index to *end* index, and returns the resulting collection. +> This function modifies the original collection. + +* If the *startFrom* parameter is omitted, *value* is set to all collection elements (*startFrom*=0). +* If the *startFrom* parameter is passed and *end* omitted, *value* is set to collection elements starting at *startFrom* to the last element of the collection (*end*=length). +* If both the *startFrom* parameter and *end* are passed, *value* is set to collection elements starting at *startFrom* to the element *end*. + +In case of inconsistency, the following rules apply: + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end* < *startFrom* (passed or calculated values), the method does nothing. + + +#### Example + +```4d + var $c : Collection + $c:=New collection(1;2;3;"Lemon";Null;"";4;5) + $c.fill("2") // $c:=[2,2,2,2,2,2,2,2] + $c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello] + $c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello] + $c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello] +``` + + + + + + +## .filter() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.filter**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| ---------------------------------------------------------- | +| methodName | Text | -> | Name of the function to call to filter the collection | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Result | Collection | <- | New collection containing filtered elements (shallow copy) | + + +#### Description + +The `.filter()` function returns a new collection containing all elements of the original collection for which *methodName* method result is **true**. This function returns a ***shallow copy***, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in first parameter ($1) and must set *$1.result* to **true** for each element fulfilling the condition and thus, to push to the new collection. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be filtered +* in *$2*: *param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the filter condition and must be kept. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Example 1 + +You want to get the collection of text elements whose length is smaller than 6: + +```4d + var $col;$colNew : Collection + $col:=New collection("hello";"world";"red horse";66;"tim";"san jose";"miami") + $colNew:=$col.filter("LengthLessThan";6) + //$colNew=["hello","world","tim","miami"] +``` + +The code for ***LengthLessThan*** method is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Example 2 + +You want to filter elements according to their value type: + +```4d + var $c;$c2;$c3 : Collection + $c:=New collection(5;3;1;4;6;2) + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c2:=$c.filter("TypeLookUp";Is real) // $c2=[5,3,1,4,6,2] + $c3:=$c.filter("TypeLookUp";Is object) + // $c3=[{name:Cleveland,zc:35049},{name:Blountsville,zc:35031}] +``` + +The code for ***TypeLookUp*** is: + +```4d + C_OBJECT($1) + C_LONGINT($2) + If(OB Get type($1;"value")=$2) + + + $1.result:=True + End if +``` + + + + + + +## .find() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.find**( *methodName* : Text { ; *...param* : any } ) : any
          **.find**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : any + +| Parameter | Type | | Description | +| ---------- | ------- |:--:| -------------------------------------------- | +| startFrom | Integer | -> | Index to start the search at | +| methodName | Text | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Result | any | <- | First value found, or Undefined if not found | + + +#### Description + +The `.find()` function returns the first value in the collection for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` in the first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value:* element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.find()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example 1 + +You want to get the first element with a length smaller than 5: + +```4d + var $col : Collection + $col:=New collection("hello";"world";4;"red horse";"tim";"san jose") + $value:=$col.find("LengthLessThan";5) //$value="tim" +``` + +The code for ***LengthLessThan*** method is: + +```4d + var $1 : Object + var $2 : Integer + If(Value type($1.value)=Is text) + $1.result:=(Length($1.value))<$2 + End if +``` + +#### Example 2 + +You want to find a city name within a collection: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.find("FindCity";"Clanton") //$c2={name:Clanton,zc:35046} +``` + +The code for ***FindCity*** is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 //name is a property name of objects in the collection +``` + + + + + + +## .findIndex() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + + +**.findIndex**( *methodName* : Text { ; *...param* : any } ) : Integer
          **.findIndex**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Integer + + +| Parameter | Type | | Description | +| ---------- | ------- |:--:| ---------------------------------------------- | +| startFrom | Integer | -> | Index to start the search at | +| methodName | Text | -> | Name of the function to call for the find | +| param | any | -> | Parameter(s) to pass to *methodName* | +| Result | Integer | <- | Index of first value found, or -1 if not found | + + +#### Description + +The `.findIndex()` function returns the index, in the collection, of the first value for which *methodName*, applied on each element, returns **true**. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, using or not the parameter(s). This method receives an `Object` as first parameter ($1) and must set *$1.result* to **true** for the first element fulfilling the condition. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2: param* +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value matches the search condition. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +By default, `.findIndex()` searches in the whole collection. Optionally, you can pass in *startFrom* the index of element from which to start the search. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Example + +You want to find the position of the first city name within a collection: + +```4d + var $c : Collection + var $val2;$val3 : Integer + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $val2:=$c.findIndex("FindCity";"Clanton") // $val2=3 + $val3:=$c.findIndex($val2+1;"FindCity";"Clanton") //$val3=4 +``` + +The code for ***FindCity*** method is: + +```4d + var $1 : Object + var $2 : Text + $1.result:=$1.value.name=$2 +``` + + + + + + + +## .indexOf() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.indexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ---------------------------------------------------------------------------- | +| toSearch | expression | -> | Expression to search in the collection | +| startFrom | Integer | -> | Index to start the search at | +| Result | Integer | <- | Index of the first occurrence of toSearch in the collection, -1 if not found | + + +#### Description + +The `.indexOf()` function searches the *toSearch* expression among collection elements and returns the index of the first found occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator of the data type are applied). + +Optionally, you can pass the index of collection from which to start the search in *startFrom*. + +* If *startFrom* >= the collection's length, -1 is returned, which means the collection is not searched. +* If *startFrom* < 0, it is considered as the offset from the end of the collection (*startFrom:=startFrom+length*). **Note**: Even if *startFrom* is negative, the collection is still searched from left to right. +* If *startFrom* = 0, the whole collection is searched (default). + +#### Example + + + +```4d + var $col : Collection + var $i : Integer + $col:=New collection(1;2;"Henry";5;3;"Albert";6;4;"Alan";5) + $i:=$col.indexOf(3) //$i=4 + $i:=$col.indexOf(5;5) //$i=9 + $i:=$col.indexOf("al@") //$i=5 + $i:=$col.indexOf("Hello") //$i=-1 +``` + + + + + + +## .indices() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.indices**( *queryString* : Text { ; *...value* : any } ) : Collection + +| Parameter | Type | | Description | +| ----------- | ---------- |:--:| -------------------------------------------------------- | +| queryString | Text | -> | Search criteria | +| value | any | -> | Value(s) to compare when using placeholder(s) | +| Result | Collection | <- | Element index(es) matching queryString in the collection | + + +#### Description + +The `.indices()` function works exactly the same as the [`.query()`](#query) function but returns indexes, in the original collection, of object collection elements that match the *queryString* search conditions, and not elements themselves. Indexes are returned in ascending order. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For a detailed description of the *queryString* and *value* parameters, please refer to the `dataClass.query()` function. + +#### Example + + +```4d + var $c; $icol : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $icol:=$c.indices("name = :1";"Cleveland") // $icol=[0] + $icol:=$c.indices("zc > 35040") // $icol=[0,3,4] +``` + + + + + +## .insert() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.insert**( *index* : Integer ; *element* : any ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ----------------------------------------------- | +| index | Integer | -> | Where to insert the element | +| element | any | -> | Element to insert in the collection | +| Result | Collection | <- | Original collection containing inserted element | + + +#### Description + +The `.insert()` function inserts *element* at the specified *index* position in the collection instance and returns the edited collection. +> This function modifies the original collection. + +In *index*, pass the position where you want the element to be inserted in the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. + +* If *index* > the length of the collection, actual starting index will be set to the length of the collection. +* If *index* <0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value is negative, index is set to 0. + +Any type of element accepted by a collection can be inserted, even another collection. + +#### Example + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d") //$col=["a","b","c","d"] + $col.insert(2;"X") //$col=["a","b","X","c","d"] + $col.insert(-2;"Y") //$col=["a","b","X","Y","c","d"] + $col.insert(-10;"Hi") //$col=["Hi","a","b","X","Y","c","d"] +``` + + + + + + +## .join() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.join**( *delimiter* : Text { ; *option* : Integer } ) : Text +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------------------------ | +| delimiter | Text | -> | Separator to use between elements | +| option | Integer | -> | `ck ignore null or empty`: ignore null and empty strings in the result | +| Result | Text | <- | String containing all elements of the collection, separated by delimiter | + + +#### Description + +The `.join()` function converts all elements of the collection to strings and concatenates them using the specified *delimiter* string as separator.The function returns the resulting string. +> This function does not modify the original collection. + +By default, null or empty elements of the collection are returned in the resulting string. Pass the `ck ignore null or empty` constant in the *option* parameter if you want to remove them from the resulting string. + +#### Example + + +```4d + var $c : Collection + var $t1;$t2 : Text + $c:=New collection(1;2;3;"Paris";Null;"";4;5) + $t1:=$c.join("|") //1|2|3|Paris|null||4|5 + $t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5 +``` + + + + + +## .lastIndexOf() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.lastIndexOf**( *toSearch* : expression { ; *startFrom* : Integer } ) : Integer +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ----------------------------------------------------------------------- | +| toSearch | expression | -> | The element that is to be searched for within the collection | +| startFrom | Integer | -> | Index to start the search at | +| Result | Integer | <- | Index of last occurrence of toSearch in the collection, -1 if not found | + + +#### Description + +The `.lastIndexOf()` function searches the *toSearch* expression among collection elements and returns the index of the last occurrence, or -1 if it was not found. +> This function does not modify the original collection. + +In *toSearch*, pass the expression to find in the collection. You can pass: + +* a scalar value (text, number, boolean, date), +* the null value, +* an object or a collection reference. + +*toSearch* must match exactly the element to find (the same rules as for the equality operator are applied). + +Optionally, you can pass the index of collection from which to start a reverse search in *startFrom*. + +* If *startFrom* >= the collection's length minus one (coll.length-1), the whole collection is searched (default). +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). If the calculated value is negative, -1 is returned (the collection is not searched). **Note:** Even if *startFrom* is negative, the collection is still searched from right to left. +* If *startFrom* = 0, -1 is returned, which means the collection is not searched. + +#### Example + + +```4d + var $col : Collection + var $pos1;$pos2;$pos3;$pos4;$pos5 : Integer + $col:=Split string("a,b,c,d,e,f,g,h,i,j,e,k,e";",") //$col.length=13 + $pos1:=$col.lastIndexOf("e") //returns 12 + $pos2:=$col.lastIndexOf("e";6) //returns 4 + $pos3:=$col.lastIndexOf("e";15) //returns 12 + $pos4:=$col.lastIndexOf("e";-2) //returns 10 + $pos5:=$col.lastIndexOf("x") //returns -1 +``` + + + + + +## .length + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R5 | Added | +
          + +**.length** : Integer + + +#### Description + +The `.length` property returns the number of elements in the collection. + +The `.length` property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is **read-only** (you cannot use it to set the size of the collection). + +#### Example + + +```4d + var $col : Collection //$col.length initialized to 0 + $col:=New collection("one";"two";"three") //$col.length updated to 3 + $col[4]:="five" //$col.length updated to 5 + $vSize:=$col.remove(0;3).length //$vSize=2 +``` + + + + + +## .map() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.map**( *methodName* : Text { ; *...param* : any } ) : Collection + +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| -------------------------------------------------------- | +| methodName | Text | -> | Name of method used to transform the collection elements | +| param | any | -> | Parameter(s) for the method | +| Result | Collection | <- | Collection of transformed values | + + +#### Description + +The `.map()` function creates a new collection based upon the result of the call of the *methodName* method on each element of the original collection. Optionally, you can pass parameters to *methodName* using the *param* parameter(s). `.map()` always returns a collection with the same size as the original collection. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any operation, with or without the parameter(s). + +*methodName* receives the following parameters: + +* in *$1.value* (any type): element value to be mapped +* in *$2* (any type): *param* +* in *$N...* (any type): *paramN...* + +*methodName* sets the following parameter(s): + + +* *$1.result* (any type): new transformed value to add to the resulting collection +* *$1.stop* (boolean): **true** to stop the method callback. The returned value is the last calculated. + +#### Example + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;4;9;10;20) + $c2:=$c.map("Percentage";$c.sum()) + //$c2=[2.27,9.09,20.45,22.73,45.45] +``` + +Here is the ***Percentage*** method: + +```4d + var $1 : Object + var $2 : Real + $1.result:=Round(($1.value/$2)*100;2) +``` + + + + + + + +## .max() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.max**( { *propertyPath* : Text } ) : any +| Parameter | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Text | -> | Object property path to be used for evaluation | +| Result | Boolean, Text, Number, Collection, Object, Date | <- | Maximum value in the collection | + + +#### Description + +The `.max()` function returns the element with the highest value in the collection (the last element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.max()` function will return the maximum value within the last element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose maximum value you want to get. + +If the collection is empty, `.max()` returns *Undefined*. + +#### Example + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $max:=$col.max() //{name:Alabama,salary:10500} + $maxSal:=$col.max("salary") //50000 + $maxName:=$col.max("name") //"Wesson" +``` + + + + + +## .min() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.min**( { *propertyPath* : Text } ) : any +| Parameter | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------------------- | +| propertyPath | Text | -> | Object property path to be used for evaluation | +| Result | Boolean, Text, Number, Collection, Object, Date | <- | Minimum value in the collection | + + +#### Description + +The `.min()` function returns the element with the smallest value in the collection (the first element of the collection as it would be sorted in ascending order using the [`.sort()`](#sort) function). +> This function does not modify the original collection. + +If the collection contains different types of values, the `.min()` function will return the minimum value within the first element type in the type list order (see [`.sort()`](#sort) description). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property whose minimum value you want to get. + +If the collection is empty, `.min()` returns *Undefined*. + +#### Example + + +```4d + var $col : Collection + $col:=New collection(200;150;55) + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Alabama";"salary";10500)) + $min:=$col.min() //55 + $minSal:=$col.min("salary") //10000 + $minName:=$col.min("name") //"Alabama" +``` + + + + + +## .orderBy() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.orderBy**( ) : Collection
          **.orderBy**( *pathStrings* : Text ) : Collection
          **.orderBy**( *pathObjects* : Collection ) : Collection
          **.orderBy**( *ascOrDesc* : Integer ) : Collection + +| Parameter | Type | | Description | +| --------- | ---- |::| ----------- | +| | | | | + +|pathStrings|Text|->|Property path(s) on which to order the collection| |pathObjects|Collection|->|Collection of criteria objects| |ascOrDesc|Integer|->|`ck ascending` or `ck descending` (scalar values)| |Result|Collection |<-|Ordered copy of the collection (shallow copy)| + + +#### Description + +The `.orderBy()` function returns a new collection containing all elements of the collection in the specified order. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +If you pass no parameter, the function orders scalar values in the collection in ascending order (other element types such as objects or collections are returned unordered). You can modify this automatic order by passing the `ck ascending` or `ck descending` constants in the *ascOrDesc* parameter (see below). + +You can also pass a criteria parameter to define how the collection elements must be sorted. Three syntaxes are supported for this parameter: + +* *pathStrings* : Text (formula). **Syntax**: `propertyPath1 {desc or asc}, propertyPath2 {desc or asc},...` (default order: asc). *pathStrings* contains a formula made of 1 to x property paths and (optionally) sort orders, separated by commas. The order in which the properties are passed determines the sorting priority of the collection elements. By default, properties are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* : Collection. You can add as many objects in the *pathObjects* collection as necessary. By default, properties are sorted in ascending order ("descending" is false). Each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +* *ascOrDesc* : Integer. You pass one of the following constants from the **Objects and collections** theme: + + | Constant | Type | Value | Comment | + | ------------- | ------- | ----- | ------------------------------------------------- | + | ck ascending | Longint | 0 | Elements are ordered in ascending order (default) | + | ck descending | Longint | 1 | Elements are ordered in descending order | + + This syntax orders scalar values in the collection only (other element types such as objects or collections are returned unordered). + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Example 1 + +Ordering a collection of numbers in ascending and descending order: + +```4d + var $c; $c2; $3 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(Random) + End for + $c2:=$c.orderBy(ck ascending) + $c3:=$c.orderBy(ck descending) +``` + + +#### Example 2 + +Ordering a collection of objects based on a text formula with property names: + +```4d + var $c; $c2 : Collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $c2:=$c.orderBy("value desc") + $c2:=$c.orderBy("value desc, id") + $c2:=$c.orderBy("value desc, id asc") +``` + +Ordering a collection of objects with a property path: + +```4d + var $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + + $c2:=$c.orderBy("phones.p1 asc") +``` + + +#### Example 3 + +Ordering a collection of objects using a collection of criteria objects: + +```4d + var $crit; $c; $c2 : COllection + $crit:=New collection + $c:=New collection + For($vCounter;1;10) + $c.push(New object("id";$vCounter;"value";Random)) + End for + $crit.push(New object("propertyPath";"value";"descending";True)) + $crit.push(New object("propertyPath";"id";"descending";False)) + $c2:=$c.orderBy($crit) +``` + +Ordering with a property path: + +```4d + var $crit; $c; $c2 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"phones";New object("p1";"01";"p2";"02"))) + $c.push(New object("name";"Blountsville";"phones";New object("p1";"00";"p2";"03"))) + $crit:=New collection(New object("propertyPath";"phones.p2";"descending";True)) + $c2:=$c.orderBy($crit) +``` + + + + + + + +## .orderByMethod() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.orderByMethod**( *methodName* : Text { ; ...*extraParam* : expression } ) : Collection + +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| methodName | Text | -> | Name of method used to specify the sorting order | +| extraParam | expression | -> | Parameter(s) for the method | +| Result | Collection | <- | Sorted copy of the collection (shallow copy) | + + +#### Description + +The `.orderByMethod()` function returns a new collection containing all elements of the collection in the order defined through the *methodName* method. + +This function returns a *shallow copy*, which means that objects or collections in both collections share the same reference. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +In *methodName*, pass a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters +* *methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +#### Example 1 + +You want to sort a collection of strings in numerical order rather than alphabetical order: + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push("33";"4";"1111";"222") + $c2:=$c.orderBy() //$c2=["1111","222","33","4"], alphabetical order + $c3:=$c.orderByMethod("NumAscending") // $c3=["4","33","222","1111"] +``` + + Here is the code for ***NumAscending***: + + +```4d + $1.result:=Num($1.value)Length(String($1.value2)) +``` + +#### Example 3 + +You want to sort a collection by character code or language: + +```4d +var $strings1; $strings2 : Collection +$strings1:=New collection("Alpha";"Charlie";"alpha";"bravo";"Bravo";"charlie") + +//using the character code: +$strings2:=$strings1.orderByMethod("sortCollection";sk character codes) +// result : ["Alpha","Bravo","Charlie","alpha","bravo","charlie"] + +//using the language: +$strings2:=$string1s.orderByMethod("sortCollection";sk strict) +// result : ["alpha","Alpha","bravo","Bravo","charlie","Charlie"] +``` + +The ***sortCollection*** method: + +```4d +var$1Object +var$2Integer // sort option + +$1.result:=(Compare strings($1.value;$1.value2;$2)<0) +``` + + + + + + +## .pop() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + + +**.pop()** : any +| Parameter | Type | | Description | +| --------- | ---- |:--:| -------------------------- | +| Result | any | <- | Last element of collection | + + +#### Description + +The `.pop()` function removes the last element from the collection and returns it as the function result. +> This function modifies the original collection. + +When applied to an empty collection, `.pop()` returns ***undefined***. + +#### Example + +`.pop()`, used in conjunction with [`.push()`](#push), can be used to implement a first-in, last-out stack feature: + +```4d + var $stack : Collection + $stack:=New collection //$stack=[] + $stack.push(1;2) //$stack=[1,2] + $stack.pop() //$stack=[1] Returns 2 + $stack.push(New collection(4;5)) //$stack=[[1,[4,5]] + $stack.pop() //$stack=[1] Returns [4,5] + $stack.pop() //$stack=[] Returns 1 +``` + + + + + + + +## .push() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.push**( *element* : any { ;...*elementN* } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| --------------------------------------------- | +| element | Mixed | -> | Element(s) to add to the collection | +| Result | Collection | <- | Original collection containing added elements | + + +#### Description + +The `.push()` function appends one or more *element*(s) to the end of the collection instance and returns the edited collection. +> This function modifies the original collection. + + +#### Example 1 + +```4d + var $col : Collection + $col:=New collection(1;2) //$col=[1,2] + $col.push(3) //$col=[1,2,3] + $col.push(6;New object("firstname";"John";"lastname";"Smith")) + //$col=[1,2,3,6,{firstname:John,lastname:Smith} +``` + + + +#### Example 2 + +You want to sort the resutling collection: + +```4d + var $col; $sortedCol : Collection + $col:=New collection(5;3;9) //$col=[5,3,9] + $sortedCol:=$col.push(7;50).sort() + //$col=[5,3,9,7,50] + //$sortedCol=[3,5,7,9,50] +``` + + + + + + + + +## .query() + +
          History +| Version | Changes | +| ------- | ------------------------ | +| v17 R5 | Support of querySettings | +| v16 R6 | Added | +
          + +**.query**( *queryString* : Text ; *...value* : any ) : Collection
          **.query**( *queryString* : Text ; *querySettings* : Object ) : Collection + +| Parameter | Type | | Description | +| ------------- | ---------- |:--:| ------------------------------------------------- | +| queryString | Text | -> | Search criteria | +| value | Mixed | -> | Value(s) to compare when using placeholder(s) | +| querySettings | Object | -> | Query options: parameters, attributes | +| Result | Collection | <- | Element(s) matching queryString in the collection | + + +#### Description + +The `.query()` function returns all elements of a collection of objects that match the search conditions defined by *queryString* and (optionally) *value* or *querySettings*. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +The *queryString* parameter uses the following syntax: + +```4d +propertyPath comparator value {logicalOperator propertyPath comparator value} +``` + +For detailed information on how to build a query using *queryString*, *value* and *querySettings* parameters, please refer to the [`dataClass.query()`](DataClassClass.md#query) function description. + +> Formulas are not supported by the `collection.query()` function, neither in the *queryString* parameter nor as *formula* object parameter. + +#### Example 1 + +```4d + var $c; $c2; $c3 : Collection + $c:=New collection + $c.push(New object("name";"Cleveland";"zc";35049)) + $c.push(New object("name";"Blountsville";"zc";35031)) + $c.push(New object("name";"Adger";"zc";35006)) + $c.push(New object("name";"Clanton";"zc";35046)) + $c.push(New object("name";"Clanton";"zc";35045)) + $c2:=$c.query("name = :1";"Cleveland") //$c2=[{name:Cleveland,zc:35049}] + $c3:=$c.query("zc > 35040") //$c3=[{name:Cleveland,zc:35049},{name:Clanton,zc:35046},{name:Clanton,zc:35045}] +``` + + +#### Example 2 + + +```4d + var $c : Collection + $c:=New collection + $c.push(New object("name";"Smith";"dateHired";!22-05-2002!;"age";45)) + $c.push(New object("name";"Wesson";"dateHired";!30-11-2017!)) + $c.push(New object("name";"Winch";"dateHired";!16-05-2018!;"age";36)) + + $c.push(New object("name";"Sterling";"dateHired";!10-5-1999!;"age";Null)) + $c.push(New object("name";"Mark";"dateHired";!01-01-2002!)) +``` + +This example returns persons whose name contains "in": + +```4d + $col:=$c.query("name = :1";"@in@") + //$col=[{name:Winch...},{name:Sterling...}] +``` + +This example returns persons whose name does not begin with a string from a variable (entered by the user, for example): + +```4d + $col:=$c.query("name # :1";$aString+"@") + //if $astring="W" + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons whose age is not known (property set to null or undefined): + +```4d + $col:=$c.query("age=null") //placeholders not allowed with "null" + //$col=[{name:Wesson...},{name:Sterling...},{name:Mark...}] +``` + +This example returns persons hired more than 90 days ago: + +```4d + $col:=$c.query("dateHired < :1";(Current date-90)) + //$col=[{name:Smith...},{name:Sterling...},{name:Mark...}] if today is 01/10/2018 +``` + + +#### Example 3 + +More examples of queries can be found in the `dataClass.query()` page. + + + + + + +## .reduce() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.reduce**( *methodName* : Text ) : any
          **.reduce**( *methodName* : Text ; *initValue* : any { ; *...param* : expression } ) : any + +| Parameter | Type | | Description | +| ---------- | ----------------------------------------------- |:--:| -------------------------------------------------------------------- | +| methodName | Text | -> | Name of the function to call to process collection elements | +| initValue | Text, Number, Object, Collection, Date, Boolean | -> | Value to use as the first argument to the first call of *methodName* | +| param | expression | -> | Parameter(s) to pass to *methodName* | +| Result | Text, Number, Object, Collection, Date, Boolean | <- | Result of the accumulator value | + + +#### Description + + +The `.reduce()` function applies the *methodName* callback method against an accumulator and each element in the collection (from left to right) to reduce it to a single value. +> This function does not modify the original collection. + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in param (optional). *methodName* takes each collection element and performs any desired operation to accumulate the result into *$1.accumulator*, which is returned in *$1.value*. + +You can pass the value to initialize the accumulator in *initValue*. If omitted, *$1.accumulator* starts with *Undefined*. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be processed +* in *$2: param* +* in *$N...*: *paramN...* + +*methodName* sets the following parameter(s): + +* *$1.accumulator*: value to be modified by the function and which is initialized by *initValue*. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + + +#### Example 1 + + +```4d + C_COLLECTION($c) + $c:=New collection(5;3;5;1;3;4;4;6;2;2) + $r:=$c.reduce("Multiply";1) //returns 86400 +``` + +With the following ***Multiply*** method: + +```4d + If(Value type($1.value)=Is real) + $1.accumulator:=$1.accumulator*$1.value + End if +``` + +#### Example + +This example allows reducing several collection elements to a single one: + +```4d + var $c;$r : Collection + $c:=New collection + $c.push(New collection(0;1)) + $c.push(New collection(2;3)) + $c.push(New collection(4;5)) + $c.push(New collection(6;7)) + $r:=$c.reduce("Flatten") //$r=[0,1,2,3,4,5,6,7] +``` + +With the following ***Flatten*** method: + +```4d + If($1.accumulator=Null) + $1.accumulator:=New collection + End if + $1.accumulator.combine($1.value) +``` + + + + + +## .remove() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.remove**( *index* : Integer { ; *howMany* : Integer } ) : Collection + +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ----------------------------------------------------- | +| index | Integer | -> | Element at which to start removal | +| howMany | Integer | -> | Number of elements to remove, or 1 element if omitted | +| Result | Collection | <- | Original collection without removed element(s) | + + +#### Description + +The `.remove()` function removes one or more element(s) from the specified *index* position in the collection and returns the edited collection. +> This function modifies the original collection. + +In *index*, pass the position where you want the element to be removed from the collection. +> **Warning**: Keep in mind that collection elements are numbered from 0. If *index* is greater than the length of the collection, actual starting index will be set to the length of the collection. + +* If *index* < 0, it is recalculated as *index:=index+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *index* is set to 0. +* If the calculated value > the length of the collection, *index* is set to the length. + +In *howMany*, pass the number of elements to remove from *index*. If *howMany* is not specified, then one element is removed. + + + +If you try to remove an element from an empty collection, the method does nothing (no error is generated). + + +#### Example + + +```4d + var $col : Collection + $col:=New collection("a";"b";"c";"d";"e";"f";"g";"h") + $col.remove(3) // $col=["a","b","c","e","f","g","h"] + $col.remove(3;2) // $col=["a","b","c","g","h"] + $col.remove(-8;1) // $col=["b","c","g","h"] + $col.remove(-3;1) // $col=["b","g","h"] +``` + + + + + + + +## .resize() + + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + + + +**.resize**( *size* : Integer { ; *defaultValue* : any } ) : Collection +| Parameter | Type | | Description | +| ------------ | ----------------------------------------------- |:--:| ---------------------------------- | +| size | Integer | -> | New size of the collection | +| defaultValue | Number, Text, Object, Collection, Date, Boolean | -> | Default value to fill new elements | +| Result | Collection | <- | Resized original collection | + + +#### Description + +The `.resize()` function sets the collection length to the specified new size and returns the resized collection. +> This function modifies the original collection. + +* If *size* < collection length, exceeding elements are removed from the collection. +* If *size* > collection length, the collection length is increased to size. + +By default, new elements are filled will **null** values. You can specify the value to fill in added elements using the *defaultValue* parameter. + +#### Example + + +```4d + var $c : Collection + $c:=New collection + $c.resize(10) // $c=[null,null,null,null,null,null,null,null,null,null] + + $c:=New collection + $c.resize(10;0) // $c=[0,0,0,0,0,0,0,0,0,0] + + $c:=New collection(1;2;3;4;5) + $c.resize(10;New object("name";"X")) //$c=[1,2,3,4,5,{name:X},{name:X},{name:X},{name:X},{name:X}] + + $c:=New collection(1;2;3;4;5) + $c.resize(2) //$c=[1,2] + +``` + + + + + + + +## .reverse() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.reverse( )** : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------- | +| Result | Collection | <- | Inverted copy of the collection | + + +#### Description + +The `.reverse()` function returns a deep copy of the collection with all its elements in reverse order. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +#### Example + + +```4d + var $c; $c2 : Collection + $c:=New collection(1;3;5;2;4;6) + $c2:=$c.reverse() //$c2=[6,4,2,5,3,1] +``` + + + + + + +## .shift() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.shift()** : any +| Parameter | Type | | Description | +| --------- | ---- |:--:| --------------------------- | +| Result | any | <- | First element of collection | + + +#### Description + +The `.shift()` function removes the first element of the collection and returns it as the function result. +> This function modifies the original collection. + +If the collection is empty, this method does nothing. + +#### Example + + +```4d + var $c : Collection + var $val : Variant + $c:=New collection(1;2;4;5;6;7;8) + $val:=$c.shift() + // $val=1 + // $c=[2,4,5,6,7,8] +``` + + + + + + +## .slice() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| -------------------------------------------------------- | +| startFrom | Integer | -> | Index to start the search at (included) | +| end | Integer | -> | End index (not included) | +| Result | Collection | <- | New collection containing sliced elements (shallow copy) | + + +#### Description + +The `.slice()` function returns a portion of a collection into a new collection, selected from *startFrom* index to *end* index (end not included). This function returns a *shallow copy* of the collection. If the original collection is a shared collection, the returned collection is also a shared collection. +> This function does not modify the original collection. + +The returned collection contains the element specified by *startFrom* and all subsequent elements up to, but not including, the element specified by *end*. If only the *startFrom* parameter is specified, the returned collection contains all elements from *startFrom* to the last element of the original collection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the collection). +* If the calculated value < 0, *startFrom* is set to 0. +* If *end* < 0 , it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +#### Example + + +```4d + var $c; $nc : Collection + $c:=New collection(1;2;3;4;5) + $nc:=$c.slice(0;3) //$nc=[1,2,3] + $nc:=$c.slice(3) //$nc=[4,5] + $nc:=$c.slice(1;-1) //$nc=[2,3,4] + $nc:=$c.slice(-3;-2) //$nc=[3] +``` + + + + + + +## .some() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.some**( *methodName* : Text { ; *...param* : any } ) : Boolean
          **.some**( *startFrom* : Integer ; *methodName* : Text { ; *...param* : any } ) : Boolean + +| Parameter | Type | | Description | +| ---------- | ------- |:--:| --------------------------------------------------------- | +| startFrom | Integer | -> | Index to start the test at | +| methodName | Text | -> | Name of the method to call for the test | +| param | Mixed | -> | Parameter(s) to pass to *methodName* | +| Result | Boolean | <- | True if at least one element successfully passed the test | + + +#### Description + +The `.some()` function returns true if at least one element in the collection successfully passed a test implemented in the provided *methodName* method. + + +In *methodName*, pass the name of the method to use to evaluate collection elements, along with its parameter(s) in *param* (optional). *methodName* can perform any test, with or without the parameter(s). This method receives an `Object` as first parameter ($1) and must set *$1.result* to **True** for every element fulfilling the test. + +*methodName* receives the following parameters: + +* in *$1.value*: element value to be evaluated +* in *$2*: param +* in *$N...*: param2...paramN + +*methodName* sets the following parameter(s): + +* *$1.result* (boolean): **true** if the element value evaluation is successful, **false** otherwise. +* *$1.stop* (boolean, optional): **true** to stop the method callback. The returned value is the last calculated. + +In any case, at the point where `.some()` function encounters the first collection element returning true in *$1.result*, it stops calling *methodName* and returns **true**. + +By default, `.some()` tests the whole collection. Optionally, you can pass the index of an element from which to start the test in *startFrom*. + +* If *startFrom* >= the collection's length, **False** is returned, which means the collection is not tested. +* If *startFrom* < 0, it is considered as the offset from the end of the collection. +* If *startFrom* = 0, the whole collection is searched (default). + + +#### Example + + +```4d + var $c : Collection + var $b : Boolean + $c:=New collection + $c.push(-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") // returns false + $c.push(1) + $b:=$c.some("NumberGreaterThan0") // returns true + + $c:=New collection + $c.push(1;-5;-3;-1;-4;-6;-2) + $b:=$c.some("NumberGreaterThan0") //$b=true + $b:=$c.some(1;"NumberGreaterThan0") //$b=false +``` + +With the following *NumberGreaterThan0* method: + +```4d + $1.result:=$1.value>0 +``` + + + + + + + +## .sort() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.sort**( *methodName* : Text { ; *...extraParam* : any } ) : Collection + +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| ------------------------------------------------ | +| methodName | Text | -> | Name of method used to specify the sorting order | +| extraParam | any | -> | Parameter(s) for the method | +| Result | Collection | <- | Original collection sorted | + + +#### Description + +The `.sort()` function sorts the elements of the original collection and also returns the sorted collection. +> This function modifies the original collection. + +If `.sort()` is called with no parameters, only scalar values (number, text, date, booleans) are sorted. Elements are sorted by default in ascending order, according to their type. + +If you want to sort the collection elements in some other order or sort any type of element, you must supply in *methodName* a comparison method that compares two values and returns **true** in *$1.result* if the first value is lower than the second value. You can provide additional parameters to *methodName* if necessary. + +* *methodName* will receive the following parameters: + * $1 (object), where: + * *$1.value* (any type): first element value to be compared + * *$1.value2* (any type): second element value to be compared + * $2...$N (any type): extra parameters + +*methodName* sets the following parameter: + * *$1.result* (boolean): **true** if *$1.value < $1.value2*, **false** otherwise + +If the collection contains elements of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. null +2. booleans +3. strings +4. numbers +5. objects +6. collections +7. dates + +#### Example 1 + + +```4d + var $col; $col2 : Collection + $col:=New collection("Tom";5;"Mary";3;"Henry";1;"Jane";4;"Artie";6;"Chip";2) + $col2:=$col.sort() // $col2=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] + // $col=["Artie","Chip","Henry","Jane","Mary","Tom",1,2,3,4,5,6] +``` + +#### Example 2 + +```4d + var $col; $col2 : Collection + $col:=New collection(10;20) + $col2:=$col.push(5;3;1;4;6;2).sort() //$col2=[1,2,3,4,5,6,10,20] +``` + +#### Example 3 + +```4d + var $col; $col2; $col3 : Collection + $col:=New collection(33;4;66;1111;222) + $col2:=$col.sort() //numerical sort: [4,33,66,222,1111] + $col3:=$col.sort("numberOrder") //alphabetical sort: [1111,222,33,4,66] +``` + +```4d + //numberOrder project method + var $1 : Object + $1.result:=String($1.value)History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | + + +**.sum**( { *propertyPath* : Text } ) : Real +| Parameter | Type | | Description | +| ------------ | ---- |:--:| ----------------------------------------------- | +| propertyPath | Text | -> | Object property path to be used for calculation | +| Result | Real | <- | Sum of collection values | + + +#### Description + +The `.sum()` function returns the sum for all values in the collection instance. + +Only numerical elements are taken into account for the calculation (other element types are ignored). + +If the collection contains objects, pass the *propertyPath* parameter to indicate the object property to take into account. + +`.sum()` returns 0 if: + +* the collection is empty, +* the collection does not contain numerical elements, +* *propertyPath* is not found in the collection. + +#### Example 1 + + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection(10;20;"Monday";True;2) + $vSum:=$col.sum() //32 +``` + +#### Example 2 + +```4d + var $col : Collection + var $vSum : Real + $col:=New collection + $col.push(New object("name";"Smith";"salary";10000)) + $col.push(New object("name";"Wesson";"salary";50000)) + $col.push(New object("name";"Gross";"salary";10500,5)) + $vSum:=$col.sum("salary") //$vSum=70500,5 +``` + + + + + + +## .unshift() + +
          History +| Version | Changes | +| ------- | ------- | +| v16 R6 | Added | +
          + +**.unshift**( *value* : any { ;...*valueN* : any } ) : Collection +| Parameter | Type | | Description | +| --------- | -------------------------------------- |:--:| ----------------------------------------------------- | +| value | Text, Number, Object, Collection, Date | -> | Value(s) to insert at the beginning of the collection | +| Result | Real | <- | Collection containing added element(s) | + + +#### Description + +The `.unshift()` function inserts the given *value*(s) at the beginning of the collection and returns the modified collection. +> This function modifies the original collection. + +If several values are passed, they are inserted all at once, which means that they appear in the resulting collection in the same order as in the argument list. + + +#### Example + + +```4d + var $c : Collection + $c:=New collection(1;2) + $c.unshift(4) // $c=[4,1,2] + $c.unshift(5) //$c=[5,4,1,2] + $c.unshift(6;7) // $c=[6,7,5,4,1,2] +``` + + + + diff --git a/website/translated_docs/pt/API/CryptoKeyClass.md b/website/translated_docs/pt/API/CryptoKeyClass.md new file mode 100644 index 00000000000000..946bd05efbb0f0 --- /dev/null +++ b/website/translated_docs/pt/API/CryptoKeyClass.md @@ -0,0 +1,340 @@ +--- +id: CryptoKeyClass +title: CryptoKey +--- + + +The `CryptoKey` class in the 4D language encapsulates an asymetric encryption key pair. + +This class is available from the `4D` class store. + +### Example + +The following sample code signs and verifies a message using a new ECDSA key pair, for example in order to make a ES256 JSON Web token. + +```4d + // Generate a new ECDSA key pair +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) + + // Get signature as base64 +$message:="hello world" +$signature:=$key.sign($message;New object("hash";"SHA256")) + + // Verify signature +$status:=$key.verify($message;$signature;New object("hash";"SHA256")) +ASSERT($status.success) +``` + + +### Summary +| | +| --------------------------------------------------------------------------------------------------------------------- | +| [**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey](#4dcryptokeynew)

              creates a new `4D.CryptoKey` object encapsulating an encryption key pair

          | +| [**.curve** : Text](#curve)

              normalised curve name of the key.

          | +| [**.decrypt**( *message* : Text ; *options* : Object ) : Object](#decrypt)

              decrypts the *message* parameter using the **private** key

          | +| [**.encrypt**( *message* : Text ; *options* : Object ) : Text](#encrypt)

              encrypts the *message* parameter using the **public** key

          | +| [**.getPrivateKey()** : Text](#getprivatekey)

              returns the private key of the `CryptoKey` object

          | +| [**.getPublicKey( )** : Text](#getpublickey)

              returns the public key of the `CryptoKey` object

          | +| [.**sign** (*message* : Text ; *options* : Text) : Text](#sign)

              signs the utf8 representation of a *message* string

          | +| [**.size** : Integer](#size)

              the size of the key in bits

          | +| [**.type** : Text](#type)

              Name of the key type - "RSA", "ECDSA", "PEM"

          | +| [**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object](#verify)

              verifies the base64 signature against the utf8 representation of *message*

          | + + + + + + + + +## 4D.CryptoKey.new() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**4D.CryptoKey.new**( *settings* : Object ) : 4D.CryptoKey +| Parameter | Type | | Description | +| --------- | ------------ | -- | ------------------------------------------- | +| settings | Object | -> | Settings to generate or load a key pair | +| result | 4D.CryptoKey | <- | Object encapsulating an encryption key pair | + +The `4D.CryptoKey.new()` function creates a new `4D.CryptoKey` object encapsulating an encryption key pair, based upon the *settings* object parameter. It allows to generate a new RSA or ECDSA key, or to load an existing key pair from a PEM definition. + +#### *settings* + +| Property | Type | Description | +| --------------- | ------- | ---------------------------------------------- | +| [curve](#curve) | text | Name of ECDSA curve | +| [pem](#pem) | text | PEM definition of an encryption key to load | +| [size](#size) | integer | Size of RSA key in bits | +| [type](#type) | text | Type of the key: "RSA", "ECDSA", or "PEM"
        • | + + +#### *CryptoKey* + +The returned `CryptoKey` object encapsulates an encryption key pair. It is a shared object and can therefore be used by multiple 4D processes simultaneously. + + + +## .curve + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.curve** : Text + + + +Defined only for ECDSA keys: the normalised curve name of the key. Usually "prime256v1" for ES256 (default), "secp384r1" for ES384, "secp521r1" for ES512. + + +## .decrypt() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.decrypt**( *message* : Text ; *options* : Object ) : Object +| Parameter | Type | | Description | +| --------- | ------ | -- | ----------------------------------------------------------------------------- | +| message | Text | -> | Message string to be decoded using `options.encodingEncrypted` and decrypted. | +| options | Object | -> | Decoding options | +| Result | Object | <- | Status | + + + +The `.decrypt()` function decrypts the *message* parameter using the **private** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +#### *options* + +| Property | Type | Description | +| ----------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Encoding used to convert the `message` parameter into the binary representation to decrypt. Can be "Base64" or "Base64URL". Default is "Base64". | +| encodingDecrypted | text | Encoding used to convert the binary decrypted message into the result string. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8". | + + +#### *Result* + +The function returns a status object with `success` property set to `true` if the *message* could be successfully decrypted. + +| Property | Type | Description | +| -------- | ---------- | ------------------------------------------------------------------- | +| success | boolean | True if the message has been successfully decrypted | +| result | text | Message decrypted and decoded using the `options.encodingDecrypted` | +| errors | collection | If `success` is `false`, may contain a collection of errors | + + +In case the *message* couldn't be decrypted because it was not encrypted with the same key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + + +## .encrypt() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.encrypt**( *message* : Text ; *options* : Object ) : Text +| Parameter | Type | | Description | +| --------- | ------ | -- | ----------------------------------------------------------------------------- | +| message | Text | -> | Message string to be encoded using `options.encodingDecrypted` and encrypted. | +| options | Object | -> | Encoding options | +| Result | Text | <- | Message encrypted and encoded using the `options.encodingEncrypted` | + +The `.encrypt()` function encrypts the *message* parameter using the **public** key. The algorithm used depends on the type of the key. + +The key must be a RSA key, the algorithm is RSA-OAEP (see [RFC 3447](https://tools.ietf.org/html/rfc3447)). + +##### *options* + +| Property | Type | Description | +| ----------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". | +| encodingEncrypted | text | Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64". | +| encodingDecrypted | text | Encoding used to convert the `message` parameter into the binary representation to encrypt. Can be "UTF-8", "Base64", or "Base64URL". Default is "UTF-8". | + + +#### *Result* + +The returned value is an encrypted message. + + + + +## .getPrivateKey() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.getPrivateKey()** : Text + +| Parameter | Type | | Description | +| --------- | ---- | -- | ------------------------- | +| Result | Text | <- | Private key in PEM format | + +The `.getPrivateKey()` function returns the private key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Result* + +The returned value is the private key. + + + +## .getPublicKey() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.getPublicKey( )** : Text +| Parameter | Type | | Description | +| --------- | ---- | -- | ------------------------ | +| Result | Text | <- | Public key in PEM format | + + +The `.getPublicKey()` function returns the public key of the `CryptoKey` object in PEM format, or an empty string if none is available. + +#### *Result* + +The returned value is the public key. + +--- +## .pem + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.pem** : Text + +PEM definition of an encryption key to load. If the key is a private key, the RSA or ECDSA public key will be deduced from it. + + + +## .sign() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +.**sign** (*message* : Text ; *options* : Text) : Text +| Parameter | Type | | Description | +| --------- | ------ | -- | ------------------------------------------------------------------------------- | +| message | Text | -> | Message string to sign | +| options | Object | -> | Signing options | +| Result | Text | <- | Signature in Base64 or Base64URL representation, depending on "encoding" option | + +The `.sign()` function signs the utf8 representation of a *message* string using the `CryptoKey` object keys and provided *options*. It returns its signature in base64 or base64URL format, depending on the value of the `options.encoding` attribute you passed. + +The `CryptoKey` must contain a valid **private** key. + +#### *options* + +| Property | Type | Description | +| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". When used to produce a JWT, the hash size must match the PS@, ES@, RS@, or PS@ algorithm size | +| encodingEncrypted | text | Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64". | +| pss | boolean | Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when producing a JWT for PS@ algorithm | +| encoding | text | ERepresentation to be used for result signature. Possible values: "Base64" or "Base64URL". Default is "Base64". | + + +#### *Result* + +The utf8 representation of the *message* string. + + +## .size + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.size** : Integer + +Defined only for RSA keys: the size of the key in bits. Typically 2048 (default). + + +## .type + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + + +**.type** : Text +Name of the key type - "RSA", "ECDSA", "PEM"
        • "RSA": an RSA key pair, using `settings.size` as [.size](#size).
        • "ECDSA": an Elliptic Curve Digital Signature Algorithm key pair, using `settings.curve` as [.curve](#curve). Note that ECDSA keys cannot be used for encryption but only for signature.
        • "PEM": a key pair definition in PEM format, using `settings.pem` as [.pem](#pem). + + +## .verify() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : object +| Parameter | Type | | Description | +| --------- | ------ | -- | ------------------------------------------------------------------------------------------------- | +| message | Text | -> | Message string that was used to produce the signature | +| signature | Text | -> | Signature to verify, in Base64 or Base64URL representation, depending on `options.encoding` value | +| options | Object | -> | Signing options | +| Result | Object | <- | Status of the verification | + +The `.verify()` function verifies the base64 signature against the utf8 representation of *message* using the `CryptoKey` object keys and provided *options*. + +The `CryptoKey` must contain a valid **public** key. + + +#### *options* + +| Property | Type | Description | +| -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hash | text | Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". When used to produce a JWT, the hash size must match the PS@, ES@, RS@, or PS@ algorithm size | +| pss | boolean | Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when verifying a JWT for PS@ algorithm | +| encoding | text | Representation of provided signature. Possible values are "Base64" or "Base64URL". Default is "Base64". | + + +#### *Result* + +The function returns a status object with `success` property set to `true` if `message` could be successfully verified (i.e. the signature matches). + +In case the signature couldn't be verified because it was not signed with the same *message*, key or algorithm, the `status` object being returned contains an error collection in `status.errors`. + +| Property | Type | Description | +| -------- | ---------- | ----------------------------------------------------------- | +| success | boolean | True if the signature matches the message | +| errors | collection | If `success` is `false`, may contain a collection of errors | + + diff --git a/website/translated_docs/pt/API/DataClassAttributeClass.md b/website/translated_docs/pt/API/DataClassAttributeClass.md new file mode 100644 index 00000000000000..02c50052945fd2 --- /dev/null +++ b/website/translated_docs/pt/API/DataClassAttributeClass.md @@ -0,0 +1,394 @@ +--- +id: DataClassAttributeClass +title: DataClassAttribute +--- + +Dataclass attributes are available as properties of their respective classes. For example: + +```4d + nameAttribute:=ds.Company.name //reference to class attribute + revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to *nameAttribute* and *revenuesAttribute* references to the name and revenues attributes of the Company class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [**Entities**](EntityClass.md). + +`DataClassAttribute` objects have properties that you can read to get information about your dataclass attributes. + +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +### Summary + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.autoFilled** : Boolean](#autofilled)

              contains True if the attribute value is automatically filled by 4D | +| [**.exposed** : Boolean](#exposed)

              true if the attribute is exposed in REST | +| [**.fieldNumber** : Integer](#fieldnumber)

              contains the internal 4D field number of the attribute | +| [**.fieldType** : Integer](#fieldtype)

              contains the 4D database type of the attribute | +| [**.indexed** : Boolean](#indexed)

              contains **True** if there is a B-tree or a Cluster B-tree index on the attribute | +| [**.inverseName** : Text](#inversename)

              returns the name of the attribute which is at the other side of the relation | +| [**.keyWordIndexed** : Boolean](#keywordindexed)

              contains **True** if there is a keyword index on the attribute | +| [**.kind** : Text](#kind)

              returns the category of the attribute | +| [**.mandatory** : Boolean](#mandatory)

              contains True if Null value input is rejected for the attribute | +| [**.name** : Text](#name)

              returns the name of the `dataClassAttribute` object as string | +| [**.readOnly** : Boolean](#readonly)

              true if the attribute is read-only | +| [**.relatedDataClass** : Text](#relateddataclass)

              returns the name of the dataclass related to the attribute | +| [**.type** : Text](#type)

              contains the conceptual value type of the attribute | +| [**.unique** : Boolean](#unique)

              contains True if the attribute value must be unique | + + + +## .autoFilled + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.autoFilled** : Boolean + +#### Description + +The `.autoFilled` property contains True if the attribute value is automatically filled by 4D. This property corresponds to the following 4D field properties: + +* "Autoincrement", for numeric type fields +* "Auto UUID", for UUID (alpha type) fields. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.autoFilled) to get a valid value (false) even if `.autoFilled` is not returned. + + + +## .exposed + +
          History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | +
          + + +**.exposed** : Boolean + +#### Description + +The `.exposed` property is true if the attribute is exposed in REST. + + + + + +## .fieldNumber + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.fieldNumber** : Integer + +#### Description + +The `.fieldNumber` property contains the internal 4D field number of the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Num**(dataClassAttribute.fieldNumber) to get a valid value (0) even if `.fieldNumber` is not returned. + + + + + + +## .fieldType + +
          History +| Version | Changes | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
          + + +**.fieldType** : Integer + +#### Description + +The `.fieldType` property contains the 4D database type of the attribute. It depends on the attribute kind (see [`.kind`](#kind)). + +**Possible values:** + +| dataClassAttribute.kind | fieldType | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | +| storage | Corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html) | +| relatedEntity | 38 (`Is object`) | +| relatedEntities | 42 (`Is collection`) | +| calculated |
        • scalar: corresponding 4D field type, see [`Value type`](https://doc.4d.com/4dv19/help/command/en/page1509.html)
        • entity: 38 (`Is object`)
        • entity selection: 42 (`Is collection)` | + + + +#### See also + +[`.type`](#type) + +## .indexed + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.indexed** : Boolean + +#### Description + +The `.indexed` property contains **True** if there is a B-tree or a Cluster B-tree index on the attribute. + +This property is not returned if `.kind` = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.indexed) to get a valid value (false) even if `.indexed` is not returned. + + + + + +## .inverseName + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.inverseName** : Text + +#### Description + +The `.inverseName` property returns the name of the attribute which is at the other side of the relation. + +This property is not returned if `.kind` = "storage". It must be of the "relatedEntity" or "relatedEntities" kind. +> For generic programming, you can use **String**(dataClassAttribute.inverseName) to get a valid value ("") even if `.inverseName` is not returned. + + + + + +## .keyWordIndexed + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.keyWordIndexed** : Boolean + +#### Description + +The `.keyWordIndexed` property contains **True** if there is a keyword index on the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.keyWordIndexed) to get a valid value (false) even if `.keyWordIndexed` is not returned. + + + + +## .kind + +
          History +| Version | Changes | +| ------- | ------------------ | +| v19 R3 | Added "calculated" | +
          + + +**.kind** : Text + +#### Description + +The `.kind` property returns the category of the attribute. Returned value can be one of the following: + +* "storage": storage (or scalar) attribute, i.e. attribute storing a value, not a reference to another attribute +* "calculated": computed attribute, i.e. defined through a [`get` function](ORDA/ordaClasses.md#function-get-attributename). +* "relatedEntity": N -> 1 relation attribute (reference to an entity) +* "relatedEntities": 1 -> N relation attribute (reference to an entity selection) + + +#### Example + +Given the following table and relation: + +![](/assets/en/API/dataclassAttribute3.png) + +```4d + var $attKind : Text + $attKind:=ds.Employee.lastname.kind //$attKind="storage" + $attKind:=ds.Employee.manager.kind //$attKind="relatedEntity" + $attKind:=ds.Employee.directReports.kind //$attKind="relatedEntities" +``` + + + + + + +## .mandatory + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.mandatory** : Boolean + +#### Description + +The `.mandatory` property contains True if Null value input is rejected for the attribute. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.mandatory) to get a valid value (false) even if `.mandatory` is not returned. +> **Warning**: This property corresponds to the "Reject NULL value input" field property at the 4D database level. It is unrelated to the existing "Mandatory" property which is a data entry control option for a table. + + + + + +## .name + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the `dataClassAttribute` object as string. + +#### Example + +```4d + var $attName : Text + $attName:=ds.Employee.lastname.name //$attName="lastname" +``` + + + + +## .readOnly + +
          History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | + + +
          + + +**.readOnly** : Boolean + +#### Description + +The `.readOnly` property is true if the attribute is read-only. + +For example, computed attributes without [`set` function](ORDA/ordaClasses.md#function-set-attributename) are read-only. + + + + +## .relatedDataClass + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + + +
          + + +**.relatedDataClass** : Text + +#### Description +> This property is only available with attributes of the "relatedEntity" or "relatedEntities" [`.kind`](#kind) property. + +The `.relatedDataClass` property returns the name of the dataclass related to the attribute. + +#### Example + +Given the following tables and relations: + + +![](assets/en/API/dataclassAttribute4.png) + +```4d + var $relClass1; $relClassN : Text + $relClass1:=ds.Employee.employer.relatedDataClass //$relClass1="Company" + $relClassN:=ds.Employee.directReports.relatedDataClass //$relClassN="Employee" +``` + + + + +## .type + +
          History +| Version | Changes | +| ------- | ------------------------------ | +| v19 R3 | Support of computed attributes | +
          + + +**.type** : Text + +#### Description + +The `.type` property contains the conceptual value type of the attribute, useful for generic programming. + +The conceptual value type depends on the attribute [`.kind`](#kind). + +**Possible values:** + +| dataClassAttribute.kind | type | Comment | +| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| storage | "blob", "bool", "date", "image", "number", "object", or "string" | "number" is returned for any numeric types including duration. "string" is returned for uuid, alpha and text field types. "blob" attributes are [blob objects](Concepts/dt_blob.md#blob-type), they are handled using the [Blob class](BlobClass.md). | +| relatedEntity | related dataClass name | Ex: "Companies" | +| relatedEntities | related dataClass name + "Selection" suffix | Ex: "EmployeeSelection" | +| calculated |
        • storage: type ("blob", "number", etc.)
        • entity: dataClass name
        • entity selection: dataClass name + "Selection" | | + + +#### See also + +[`.fieldType`](#fieldtype) + + +## .unique + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.unique** : Boolean + +#### Description + +The `.unique` property contains True if the attribute value must be unique. This property corresponds to the "Unique" 4D field property. + +This property is not returned if [`.kind`](#kind) = "relatedEntity" or "relatedEntities". +> For generic programming, you can use **Bool**(dataClassAttribute.unique) to get a valid value (false) even if `.unique` is not returned. + + + diff --git a/website/translated_docs/pt/API/DataClassClass.md b/website/translated_docs/pt/API/DataClassClass.md new file mode 100644 index 00000000000000..af065654b5dde7 --- /dev/null +++ b/website/translated_docs/pt/API/DataClassClass.md @@ -0,0 +1,1189 @@ +--- +id: DataClassClass +title: DataClass +--- + + +A [DataClass](ORDA/dsMapping.md#dataclass) provides an object interface to a database table. All dataclasses in a 4D application are available as a property of the `ds` [datastore](ORDA/dsMapping.md#datastore). + + + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : DataClassAttribute](#attributename)

              objects that are available directly as properties | +| [**.all** ( { *settings* : Object } ) : 4D.EntitySelection](#all)

              queries the datastore to find all the entities related to the dataclass and returns them as an entity selection | +| [**.exposed** : Boolean](#exposed)

              true if the dataclass is exposed in REST | +| [**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection](#fromcollection)

              updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection | +| [**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
          **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity](#get)

              queries the dataclass to retrieve the entity matching the *primaryKey* parameter | +| [**.getDataStore()** : cs.DataStore](#getdatastore)

              returns the datastore for the specified dataclass | +| [**.getInfo()** : Object ](#getinfo)

              returns an object providing information about the dataclass | +| [**.new()** : 4D.Entity ](#new)

              creates in memory and returns a new blank entity related to the Dataclass | +| [**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection ](#newselection)

              creates a new, blank, non-shareable entity selection, related to the dataclass, in memory | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
          **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection ](#query)

              searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) | + + + +## .*attributeName* + +

          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +***.attributeName*** : DataClassAttribute + +#### Description + +The attributes of dataclasses are objects that are available directly as properties of these classes. + +The returned objects are of the [`DataClassAttribute`](DataClassAttributeClass.md) class. These objects have properties that you can read to get information about your dataclass attributes. +> Dataclass attribute objects can be modified, but the underlying database structure will not be altered. + +#### Example 1 + +```4d +$salary:=ds.Employee.salary //returns the salary attribute in the Employee dataclass +$compCity:=ds.Company["city"] //returns the city attribute in the Company dataclass +``` + + +#### Example 2 + +Considering the following database structure: + +![](assets/en/API/dataclassAttribute.png) + + +```4d +var $firstnameAtt;$employerAtt;$employeesAtt : Object + + $firstnameAtt:=ds.Employee.firstname + //{name:firstname,kind:storage,fieldType:0,type:string,fieldNumber:2,indexed:true, + //keyWordIndexed:false,autoFilled:false,mandatory:false,unique:false} + + $employerAtt:=ds.Employee.employer + //{name:employer,kind:relatedEntity,relatedDataClass:Company, + //fieldType:38,type:Company,inverseName:employees} + //38=Is object + + $employeesAtt:=ds.Company.employees + //{name:employees,kind:relatedEntities,relatedDataClass:Employee, + //fieldType:42,type:EmployeeSelection,inverseName:employer} + //42=Is collection +``` + +#### Example 3 + +Considering the following table properties: + +![](assets/en/API/dataclassAttribute2.png) + + +```4d + var $sequenceNumberAtt : Object + $sequenceNumberAtt=ds.Employee.sequenceNumber + //{name:sequenceNumber,kind:storage,fieldType:0,type:string,fieldNumber:13, + //indexed:true,keyWordIndexed:false,autoFilled:true,mandatory:false,unique:true} +``` + + + + +## .all() + +
          History +| Version | Changes | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Added | +
          + + +**.all** ( { *settings* : Object } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| settings | Object | -> | Build option: context | +| Result | 4D.EntitySelection | <- | References on all entities related to the Dataclass | + + +#### Description + +The `.all( )` function queries the datastore to find all the entities related to the dataclass and returns them as an entity selection. + +The entities are returned in the default order, which is initially the order in which they were created. Note however that, if entities have been deleted and new ones added, the default order does not reflect the creation order anymore. + +If no corresponding entity is found, an empty entity selection is returned. + +Lazy loading is applied. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Property | Type | Description | +| -------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Example + +```4d + var $allEmp : cs.EmployeeSelection + $allEmp:=ds.Employee.all() +``` + + + +## .exposed + +
          History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | +
          + + +**.exposed** : Boolean + +#### Description + +The `.exposed` property is true if the dataclass is exposed in REST. + + + +## .fromCollection() + +
          History +| Version | Changes | +| ------- | ----------------------------------- | +| v17 R5 | Support of the *settings* parameter | +| v17 | Added | +
          + +**.fromCollection**( *objectCol* : Collection { ; *settings* : Object } ) : 4D.EntitySelection + +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| ------------------------------------------------ | +| objectCol | Collection | -> | Collection of objects to be mapped with entities | +| settings | Object | -> | Build option: context | +| Result | 4D.EntitySelection | <- | Entity selection filled from the collection | + + +#### Description + +The `.fromCollection()` function updates or creates entities in the dataclass according to the *objectCol* collection of objects, and returns the corresponding entity selection. + +In the *objectCol* parameter, pass a collection of objects to create new or update existing entities of the dataclass. The property names must be the same as attribute names in the dataclass. If a property name does not exist in the dataclass, it is ignored. If an attribute value is not defined in the collection, its value is null. + +The mapping between the objects of the collection and the entities is done on the **attribute names** and **matching types**. If an object's property has the same name as an entity's attribute but their types do not match, the entity's attribute is not filled. + +**Create or update mode** + +For each object of *objectCol*: + +* If the object contains a boolean property "\_\_NEW" set to false (or does not contain a boolean "\_\_NEW" property), the entity is updated or created with the corresponding values of the properties from the object. No check is performed in regards to the primary key: + * If the primary key is given and exists, the entity is updated. In this case, the primary key can be given as is or with a "\_\_KEY" property (filled with the primary key value). + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary key is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +* If the object contains a boolean property "\_\_NEW" set to **true**, the entity is created with the corresponding values of the attributes from the object. A check is performed in regards to the primary key: + * If the primary key is given (as is) and exists, an error is sent + * If the primary key is given (as is) and does not exist, the entity is created + * If the primary is not given, the entity is created and the primary key value is assigned with respect to standard database rules. +> The "\_\_KEY" property containing a value is taken into account only when the "\_\_NEW" property is set to **false** (or is omitted) and a corresponding entity exists. In all other cases, the "\_\_KEY" property value is ignored, primary key value must be passed "as is". + +**Related entities** + +The objects of *objectCol* may contain one or more nested object(s) featuring one or more related entities, which can be useful to create or update links between entities. + +The nested objects featuring related entities must contain a "\_\_KEY" property (filled with the primary key value of the related entity) or the primary key attribute of the related entity itself. The use of a \_\_KEY property allows independence from the primary key attribute name. +> The content of the related entities cannot be created / updated through this mechanism. + +**Stamp** + +If a \_\_STAMP attribute is given, a check is performed with the stamp in the datastore and an error can be returned ("Given stamp does not match current one for record# XX of table XXXX"). For more information, see [Entity locking](ORDA/entities.md#entity-locking). + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Property | Type | Description | +| -------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + +#### Example 1 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is given and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=668 //Existing PK in Employee table + $emp.firstName:="Arthur" + $emp.lastName:="Martin" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 2 + +We want to update an existing entity. The \_\_NEW property is not given, the employee primary key is with the \_\_KEY attribute and exists: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.__KEY:=1720 //Existing PK in Employee table + $emp.firstName:="John" + $emp.lastName:="Boorman" + $emp.employer:=New object("ID";121) //Existing PK in the related dataClass Company + // For this employee, we can change the Company by using another existing PK in the related dataClass Company + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 3 + +We want to simply create a new entity from a collection: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Victor" + $emp.lastName:="Hugo" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 4 + +We want to create an entity. The \_\_NEW property is True, the employee primary key is not given: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.firstName:="Mary" + $emp.lastName:="Smith" + $emp.employer:=New object("__KEY";121) //Existing PK in the related dataClass Company + $emp.__NEW:=True + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) + + + + + + +``` + +#### Example 5 + +We want to create an entity. The \_\_NEW property is omitted, the employee primary key is given and does not exist: + +```4d + var $empsCollection : Collection + var $emp : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10000 //Unexisting primary key + $emp.firstName:="Françoise" + $emp.lastName:="Sagan" + $empsCollection.push($emp) + $employees:=ds.Employee.fromCollection($empsCollection) +``` + +#### Example 6 + +In this example, the first entity will be created and saved but the second will fail since they both use the same primary key: + +```4d + var $empsCollection : Collection + var $emp; $emp2 : Object + var $employees : cs.EmployeeSelection + + $empsCollection:=New collection + $emp:=New object + $emp.ID:=10001 // Unexisting primary key + $emp.firstName:="Simone" + $emp.lastName:="Martin" + $emp.__NEW:=True + $empsCollection.push($emp) + + $emp2:=New object + $emp2.ID:=10001 // Same primary key, already existing + $emp2.firstName:="Marc" + $emp2.lastName:="Smith" + $emp2.__NEW:=True + $empsCollection.push($emp2) + $employees:=ds.Employee.fromCollection($empsCollection) + //first entity is created + //duplicated key error for the second entity +``` + +#### See also + +[**.toCollection()**](EntitySelectionClass.md#tocollection) + + + +## .get() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.get**( *primaryKey* : Integer { ; *settings* : Object } ) : 4D.Entity
          **.get**( *primaryKey* : Text { ; *settings* : Object } ) : 4D.Entity + +| Parameter | Type | | Description | +| ---------- | --------------- |:--:| ------------------------------------------- | +| primaryKey | Integer OR Text | -> | Primary key value of the entity to retrieve | +| settings | Object | -> | Build option: context | +| Result | 4D.Entity | <- | Entity matching the designated primary key | + +#### Description + +The `.get()` function queries the dataclass to retrieve the entity matching the *primaryKey* parameter. + +In *primaryKey*, pass the primary key value of the entity to retrieve. The value type must match the primary key type set in the datastore (Integer or Text). You can also make sure that the primary key value is always returned as Text by using the [`.getKey()`](EntityClass.md#getkey) function with the `dk key as string` parameter. + +If no entity is found with *primaryKey*, a **Null** entity is returned. + +Lazy loading is applied, which means that related data is loaded from disk only when it is required. + +**settings** + +In the optional *settings* parameter, you can pass an object containing additional options. The following property is supported: + +| Property | Type | Description | +| -------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the automatic optimization context applied to the entity. This context will be used by the subsequent code that loads the entity so that it can benefit from the optimization. This feature is [designed for ORDA client/server processing](ORDA/entities.md#client-server-optimization). | + + + +#### Example 1 + +```4d + var $entity : cs.EmployeeEntity + var $entity2 : cs.InvoiceEntity + $entity:=ds.Employee.get(167) // return the entity whose primary key value is 167 + $entity2:=ds.Invoice.get("DGGX20030") // return the entity whose primary key value is "DGGX20030" +``` + +#### Example 2 + +This example illustrates the use of the *context* property: + +```4d + var $e1; $e2; $e3; $e4 : cs.EmployeeEntity + var $settings; $settings2 : Object + + $settings:=New object("context";"detail") + $settings2:=New object("context";"summary") + + $e1:=ds.Employee.get(1;$settings) + completeAllData($e1) // In completeAllData method, an optimization is triggered and associated to context "detail" + + $e2:=ds.Employee.get(2;$settings) + completeAllData($e2) // In completeAllData method, the optimization associated to context "detail" is applied + + $e3:=ds.Employee.get(3;$settings2) + completeSummary($e3) //In completeSummary method, an optimization is triggered and associated to context "summary" + + $e4:=ds.Employee.get(4;$settings2) + completeSummary($e4) //In completeSummary method, the optimization associated to context "summary" is applied +``` + + + + +## .getDataStore() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getDataStore()** : cs.DataStore +| Parameter | Type | | Description | +| --------- | ------------ |:--:| -------------------------- | +| Result | cs.DataStore | <- | Datastore of the dataclass | + + +#### Description + +The `.getDataStore( )` function returns the datastore for the specified dataclass. + +The datastore can be: + +* the main datastore, as returned by the `ds` command. +* a remote datastore, opened using the `Open datastore` command. + + +#### Example + +The ***SearchDuplicate*** project method searches for duplicated values in any dataclass. + +```4d + var $pet : cs.CatsEntity + $pet:=ds.Cats.all().first() //get an entity + SearchDuplicate($pet;"Dogs") +``` + +```4d + // SearchDuplicate method + // SearchDuplicate(entity_to_search;dataclass_name) + + #DECLARE ($pet : Object ; $dataClassName : Text) + var $dataStore; $duplicates : Object + + $dataStore:=$pet.getDataClass().getDataStore() + $duplicates:=$dataStore[$dataClassName].query("name=:1";$pet.name) +``` + + + + +## .getInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getInfo()** : Object +| Parameter | Type | | Description | +| --------- | ------ | -- | ---------------------------- | +| Result | Object | <- | Information on the dataclass | + + +#### Description + +The `.getInfo( )` function returns an object providing information about the dataclass. This function is useful for setting up generic code. + +**Returned object** + +| Property | Type | Description | +| ----------- | ------- | ---------------------------------------- | +| name | Text | Name of the dataclass | +| primaryKey | Text | Name of the primary key of the dataclass | +| tableNumber | Integer | Internal 4D table number | + + + +#### Example 1 + +```4d + #DECLARE ($entity : Object) + var $status : Object + + computeEmployeeNumber($entity) //do some actions on entity + + $status:=$entity.save() + if($status.success) + ALERT("Record updated in table "+$entity.getDataClass().getInfo().name) + End if +``` + +#### Example 2 + +```4d + var $settings : Object + var $es : cs.ClientsSelection + + $settings:=New object + $settings.parameters:=New object("receivedIds";getIds()) + $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey) + $es:=ds.Clients.query(":pk in :receivedIds";$settings) +``` + +#### Example 3 + +```4d + var $pk : Text + var $dataClassAttribute : Object + + $pk:=ds.Employee.getInfo().primaryKey + $dataClassAttribute:=ds.Employee[$pk] // If needed the attribute matching the primary key is accessible +``` + + + + +## .new() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +**.new()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- | -- | --------------------------------- | +| Result | 4D.Entity | <- | New entity matching the Dataclass | + + +#### Description + +The `.new( )` function creates in memory and returns a new blank entity related to the Dataclass. + +The entity object is created in memory and is not saved in the database until the [`.save( )`](EntityClass.md#save) function is called. If the entity is deleted before being saved, it cannot be recovered. + +**4D Server**: In client-server, if the primary key of the corresponding table is auto-incremented, it will be calculated when the entity is saved on the server. + +All attributes of the entity are initialized with the **null** value. + +> Attributes can be initialized with default values if the **Map NULL values to blank values** option is selected at the 4D database structure level. + +#### Example + +This example creates a new entity in the "Log" Dataclass and records information in the "info" attribute: + +```4d + var $entity : cs.LogEntity + $entity:=ds.Log.new() //create a reference + $entity.info:="New entry" //store some information + $entity.save() //save the entity +``` + + + + + +## .newSelection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +**.newSelection**( { *keepOrder* : Integer } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| keepOrder | Integer | -> | `dk keep ordered`: creates an ordered entity selection,
          `dk non ordered`: creates an unordered entity selection (default if omitted) | +| Result | 4D.EntitySelection | <- | New blank entity selection related to the dataclass | + + +#### Description + +The `.newSelection( )` function creates a new, blank, non-shareable entity selection, related to the dataclass, in memory. + +> For information on non-shareable entity selections, please refer to [this section](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + + +If you want to create an ordered entity selection, pass the `dk keep ordered` selector in the *keepOrder* parameter. By default if you omit this parameter, or if you pass the `dk non ordered` selector, the method creates an unordered entity selection. Unordered entity selections are faster but you cannot rely on entity positions. For more information, please see [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + +When created, the entity selection does not contain any entities (`mySelection.length` returns 0). This method lets you build entity selections gradually by making subsequent calls to the [`add()`](EntitySelectionClass.md#add) function. + + +#### Example + + +```4d + var $USelection; $OSelection : cs.EmployeeSelection + $USelection:=ds.Employee.newSelection() //create an unordered empty entity selection + $OSelection:=ds.Employee.newSelection(dk keep ordered) //create an ordered empty entity selection +``` + + + + + +## .query() + +
          History +| Version | Changes | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Added | +
          + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
          **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| ------------- | ------------------ | -- | --------------------------------------------------------------------------------------------------------------------------- | +| queryString | Text | -> | Search criteria as string | +| formula | Object | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Object | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Result | 4D.EntitySelection | <- | New entity selection made up of entities from dataclass meeting the search criteria specified in *queryString* or *formula* | + + +#### Description + +The `.query( )` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s), for all the entities in the dataclass, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. + +If no matching entities are found, an empty `EntitySelection` is returned. + +**queryString parameter** + +The *queryString* parameter uses the following syntax: + +```4d +attributePath|formula comparator value + {logicalOperator attributePath|formula comparator value} + {order by attributePath {desc | asc}} +``` + +where: + +* **attributePath**: path of attribute on which you want to execute the query. This parameter can be a simple name (for example "country") or any valid attribute path (for example "country.name".) In case of an attribute path whose type is `Collection`, \[ ] notation is used to handle all the occurences (for example "children\[ ].age"). You can also use a **placeholder** (see below). +> *You cannot use directly attributes whose name contains special characters such as ".", "\[ ]", or "=", ">", "#"..., because they will be incorrectly evaluated in the query string. If you need to query on such attributes, you must consider using placeholders, which allow an extended range of characters in attribute paths (see* **Using placeholders** *below).* + +* **formula**: a valid formula passed as `Text` or `Object`. The formula will be evaluated for each processed entity and must return a boolean value. Within the formula, the entity is available through the `This` object. + + * **Text**: the formula string must be preceeded by the `eval( )` statement, so that the query parser evaluates the expression correctly. For example: *"eval(length(This.lastname) >=30)"* + * **Object**: the [formula object](FunctionClass.md) is passed as a **placeholder** (see below). The formula must have been created using the [`Formula`](FunctionClass.md#formula) or [`Formula from string`](FunctionClass.md#formula-from-string) command. +> * Keep in mind that 4D formulas only support `&` and `|` symbols as logical operators. +> * If the formula is not the only search criteria, the query engine optimizer could prior process other criteria (e.g. indexed attributes) and thus, the formula could be evaluated for only a subset of entities. + + Formulas in queries can receive parameters through $1. This point is detailed in the **formula parameter** paragraph below. +> * You can also pass directy a `formula` parameter object instead of the `queryString` parameter (recommended when formulas are more complex). See **formula parameter** paragraph below. +> * For security reasons, formula calls within `query()` methods can be disallowed. See `querySettings` parameter description. + +* **comparator**: symbol that compares *attributePath* and *value*. The following symbols are supported: + + | Comparison | Symbol(s) | Comment | + | ------------------------------------ | ----------- | -------------------------------------------------------------------------------------------------------------- | + | Equal to | =, == | Gets matching data, supports the wildcard (@), neither case-sensitive nor diacritic. | + | | ===, IS | Gets matching data, considers the @ as a standard character, neither case-sensitive nor diacritic | + | Not equal to | #, != | Supports the wildcard (@) | + | | !==, IS NOT | Considers the @ as a standard character | + | Less than | < | | + | Greater than | > | | + | Less than or equal to | <= | | + | Greater than or equal to | >= | | + | Included in | IN | Gets data equal to at least one of the values in a collection or in a set of values, supports the wildcard (@) | + | Not condition applied on a statement | NOT | Parenthesis are mandatory when NOT is used before a statement containing several operators | + | Contains keyword | % | Keywords can be used in attributes of string or picture type | + +* **value**: the value to compare to the current value of the property of each entity in the entity selection or element in the collection. It can be a **placeholder** (see **Using placeholders** below) or any expression matching the data type property.

          When using a constant value, the following rules must be respected: + * **text** type constant can be passed with or without simple quotes (see **Using quotes** below). To query a string within a string (a "contains" query), use the wildcard symbol (@) in value to isolate the string to be searched for as shown in this example: "@Smith@". The following keywords are forbidden for text constants: true, false. + * **boolean** type constants: **true** or **false** (case sensitive). + * **numeric** type constants: decimals are separated by a '.' (period). date type constants: "YYYY-MM-DD" format + * **null** constant: using the "null" keyword will find **null** and **undefined** properties. + * in case of a query with an IN comparator, value must be a collection, or values matching the type of the attribute path between \[ ] separated by commas (for strings, " characters must be escaped with "\"). +* **logicalOperator**: used to join multiple conditions in the query (optional). You can use one of the following logical operators (either the name or the symbol can be used): + + | Conjunction | Symbol(s) | + | ----------- | ----------------------- | + | AND | &, &&, and | + | OR | |,||, or | + +* **order by attributePath**: you can include an order by *attributePath* statement in the query so that the resulting data will be sorted according to that statement. You can use multiple order by statements, separated by commas (e.g., order by *attributePath1* desc, *attributePath2* asc). By default, the order is ascending. Pass 'desc' to define a descending order and 'asc' to define an ascending order. +> *If you use this statement, the returned entity selection is ordered (for more information, please refer to [Ordered vs Unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection)). + +**Using quotes** + +When you use quotes within queries, you must use single quotes ' ' inside the query and double quotes " " to enclose the whole query, otherwise an error is returned. For example: + +```4d +"employee.name = 'smith' AND employee.firstname = 'john'" +``` +> Single quotes (') are not supported in searched values since they would break the query string. For example "comp.name = 'John's pizza' " will generate an error. If you need to search on values with single quotes, you may consider using placeholders (see below). + +**Using parenthesis** + +You can use parentheses in the query to give priority to the calculation. For example, you can organize a query as follows: + +```4d +"(employee.age >= 30 OR employee.age <= 65) AND (employee.salary <= 10000 OR employee.status = 'Manager')" +``` + + +**Using placeholders** + +4D allows you to use placeholders for *attributePath*, *formula* and *value* arguments within the *queryString* parameter. A placeholder is a parameter that you insert in query strings and that is replaced by another value when the query string is evaluated. The value of placeholders is evaluated once at the beginning of the query; it is not evaluated for each element. + +Two types of placeholders can be used: **indexed placeholders** and **named placeholders**: + +| - | Indexed placeholders | Named placeholders | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Definition | Parameters are inserted as :paramIndex (for example :1, :2...) in queryString and their corresponding values are provided by the sequence of value parameter(s). You can use up to 128 value parameters | Parameters are inserted as :paramName (for example :myparam) and their values are provided in the attributes and/or parameters objects in the querySettings parameter | +| Example | $r:=class.query(":1=:2";"city";"Chicago") | $o.attributes:=New object("att";"city")
          $o.parameters:=New object("name";"Chicago")
          $r:=class.query(":att=:name";$o) | + +You can mix all argument kinds in *queryString*. A *queryString* can contain, for *attributePath*, *formula* and *value* parameters: + + +* direct values (no placeholders), +* indexed placeholders and/or named placeholders. + +**Using placeholders in queries is recommended** for the following reasons: + +1. It prevents malicious code insertion: if you directly use user-filled variables within the query string, a user could modifiy the query conditions by entering additional query arguments. For example, imagine a query string like: + + ```4d + $vquery:="status = 'public' & name = "+myname //user enters their name + $result:=$col.query($vquery) + ``` + + This query seems secured since non-public data are filtered. However, if the user enters in the *myname* area something like *"smith OR status='private'*, the query string would be modified at the interpretation step and could return private data. + + When using placeholders, overriding security conditions is not possible: + + ```4d + $result:=$col.query("status='public' & name=:1";myname) + ``` + + In this case if the user enters *smith OR status='private'* in the *myname* area, it will not be interpreted in the query string, but only passed as a value. Looking for a person named "smith OR status='private'" will just fail. + +2. It prevents having to worry about formatting or character issues, especially when handling *attributePath* or *value* parameters that might contain non-alphanumeric characters such as ".", "['... + +3. It allows the use of variables or expressions in query arguments. Examples: + + ```4d + $result:=$col.query("address.city = :1 & name =:2";$city;$myVar+"@") + $result2:=$col.query("company.name = :1";"John's Pizzas") + ``` + +**Looking for null values** + +When you look for null values, you cannot use the placeholder syntax because the query engine considers null as an unexpected comparison value. For example, if you execute the following query: + +```4d +$vSingles:=ds.Person.query("spouse = :1";Null) // will NOT work +``` + +You will not get the expected result because the null value will be evaluated by 4D as an error resulting from the parameter evaluation (for example, an attribute coming from another query). For these kinds of queries, you must use the direct query syntax: + +```4d + $vSingles:=ds.Person.query("spouse = null") //correct syntax +``` + + +**Linking collection attribute query arguments** + +When searching in collections within object attributes using multiple query arguments joined by the AND operator, you may want to make sure that only entities containing elements that match all arguments are returned, and not entities where arguments can be found in different elements. To do this, you need to link query arguments to collection elements, so that only single elements containing linked arguments are found. + +For example, with the following two entities: + +``` +Entity 1: +ds.People.name: "martin" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"paris" + } ] } + +Entity 2: +ds.People.name: "smith" +ds.People.places: + { "locations" : [ { + "kind":"home", + "city":"lyon" + } , { + "kind":"office", + "city":"paris" + } ] } +``` + +You want to find people with a "home" location kind in the city "paris". If you write: + +```4d +ds.People.query("places.locations[].kind= :1 and places.locations[].city= :2";"home";"paris") +``` + +... the query will return "martin" **and** "smith" because "smith" has a "locations" element whose "kind" is "home" and a "locations" element whose "city" is "paris", even though they are different elements. + +If you want to only get entities where matching arguments are in the same collection element, you need to **link arguments**. To link query arguments: + +- Add a letter between the \[] in the first path to link and repeat the same letter in all linked arguments. For example: `locations[a].city and locations[a].kind`. You can use any letter of the Latin alphabet (not case sensitive). +- To add different linked criteria in the same query, use another letter. You can create up to 26 combinations of criteria in a single query. + +With the above entities, if you write: + +```4d +ds.People.query("places.locations[a].kind= :1 and places.locations[a].city= :2";"home";"paris") +``` + +... the query will only return "martin" because it has a "locations" element whose "kind" is "home" and whose "city" is "paris". The query will not return "smith" because the values "home" and "paris" are not in the same collection element. + + + +**formula parameter** + +As an alternative to formula insertion within the *queryString* parameter (see above), you can pass directly a formula object as a boolean search criteria. Using a formula object for queries is **recommended** since you benefit from tokenization, and code is easier to search/read. + +The formula must have been created using the `Formula` or `Formula from string` command. In this case: + +* the *formula* is evaluated for each entity and must return true or false. During the execution of the query, if the formula's result is not a boolean, it is considered as false. +* within the *formula*, the entity is available through the `This` object. +* if the `Formula` object is **null**, the errror 1626 ("Expecting a text or formula") is generated, that you call intercept using a method installed with `ON ERR CALL`. +> For security reasons, formula calls within `query(`) member methods can be disallowed. See *querySettings* parameter description. + +**Passing parameters to formulas** + +Any *formula* called by the `query()` class function can receive parameters: + +* Parameters must be passed through the **args** property (object) of the *querySettings* parameter. +* The formula receives this **args** object as a **$1** parameter. + +This small code shows the principles of how parameter are passed to methods: + +```4d + $settings:=New object("args";New object("exclude";"-")) //args object to pass parameters + $es:=ds.Students.query("eval(checkName($1.exclude))";$settings) //args is received in $1 +``` + +Additional examples are provided in example 3. + +**4D Server**: In client/server, formulas are executed on the server. In this context, only the `querySettings.args` object is sent to the formulas. + + + +**querySettings parameter** + +In the *querySettings* parameter, you can pass an object containing additional options. The following properties are supported: + +| Property | Type | Description | +| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| parameters | Object | **Named placeholders for values** used in the *queryString* or *formula*. Values are expressed as property / value pairs, where property is the placeholder name inserted for a value in the *queryString* or *formula* (":placeholder") and value is the value to compare. You can mix indexed placeholders (values directly passed in value parameters) and named placeholder values in the same query. | +| attributes | Object | **Named placeholders for attribute paths** used in the *queryString* or *formula*. Attributes are expressed as property / value pairs, where property is the placeholder name inserted for an attribute path in the *queryString* or *formula* (":placeholder"), and value can be a string or a collection of strings. Each value is a path that can designate either a scalar or a related attribute of the dataclass or a property in an object field of the dataclass

          TypeDescription
          StringattributePath expressed using the dot notation, e.g. "name" or "user.address.zipCode"
          Collection of stringsEach string of the collection represents a level of attributePath, e.g. \["name"] or \["user","address","zipCode"]. Using a collection allows querying on attributes with names that are not compliant with dot notation, e.g. \["4Dv17.1","en/fr"]
          You can mix indexed placeholders (values directly passed in *value* parameters) and named placeholder values in the same query. | +| args | Object | Parameter(s) to pass to formulas, if any. The **args** object will be received in $1 within formulas and thus its values will be available through *$1.property* (see example 3). | +| allowFormulas | Boolean | True to allow the formula calls in the query (default). Pass false to disallow formula execution. If set to false and `query()` is given a formula, an error is sent (1278 - Formula not allowed in this member method). | +| context | Text | Label for the automatic optimization context applied to the entity selection. This context will be used by the code that handles the entity selection so that it can benefit from the optimization. This feature is designed for client/server processing; for more information, please refer to the **Client/server optimization** section. | +| queryPlan | Boolean | In the resulting entity selection, returns or does not return the detailed description of the query just before it is executed, i.e. the planned query. The returned property is an object that includes each planned query and subquery (in the case of a complex query). This option is useful during the development phase of an application. It is usually used in conjunction with queryPath. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | +| queryPath | Boolean | In the resulting entity selection, returns or does not return the detailed description of the query as it is actually performed. The returned property is an object that contains the actual path used for the query (usually identical to that of the queryPlan, but may differ if the engine manages to optimize the query), as well as the processing time and the number of records found. This option is useful during the development phase of an application. Default if omitted: false. **Note**: This property is supported only by the `entitySelection.query( )` and `dataClass.query( )` functions. | + +**About queryPlan and queryPath** + +The information recorded in `queryPlan`/`queryPath` include 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(s). 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. + +For example, if you execute the following query: + +```4d + $sel:=ds.Employee.query("salary < :1 and employer.name = :2 or employer.revenues > :3";\ + 50000;"Lima West Kilo";10000000;New object("queryPath";True;"queryPlan";True)) +``` + +queryPlan: + +```4d +{Or:[{And:[{item:[index : Employee.salary ] < 50000}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.name ] = Lima West Kilo}]}]}, + {item:Join on Table : Company : Employee.employerID = Company.ID, + subquery:[{item:[index : Company.revenues ] > 10000000}]}]} +``` + +queryPath: + +```4d +{steps:[{description:OR,time:63,recordsfounds:1388132, + steps:[{description:AND,time:32,recordsfounds:131, + steps:[{description:[index : Employee.salary ] < 50000,time:16,recordsfounds:728260},{description:Join on Table : Company : Employee.employerID = Company.ID,time:0,recordsfounds:131, + steps:[{steps:[{description:[index : Company.name ] = Lima West Kilo,time:0,recordsfounds:1}]}]}]},{description:Join on Table : Company : Employee.employerID = Company.ID,time:31,recordsfounds:1388132, + steps:[{steps:[{description:[index : Company.revenues ] > 10000000,time:0,recordsfounds:933}]}]}]}]} +``` + +#### Example 1 + +This section provides various examples of queries. + +Query on a string: + +```4d +$entitySelection:=ds.Customer.query("firstName = 'S@'") +``` + +Query with a NOT statement: + +```4d +$entitySelection:=ds.Employee.query("not(firstName=Kim)") +``` + +Queries with dates: + +```4d +$entitySelection:=ds.Employee.query("birthDate > :1";"1970-01-01") +$entitySelection:=ds.Employee.query("birthDate <= :1";Current date-10950) +``` + +Query with indexed placeholders for values: + +```4d +$entitySelection:=ds.Customer.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@") +``` + +Query with indexed placeholders for values on a related dataclass: + +```4d +$entitySelection:=ds.Employee.query("lastName = :1 and manager.lastName = :2";"M@";"S@") +``` + +Query with indexed placeholder including a descending order by statement: + +```4d +$entitySelection:=ds.Student.query("nationality = :1 order by campus.name desc, lastname";"French") +``` + +Query with named placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings:=New object +$querySettings.parameters:=New object("userId";1234;"extraInfo";New object("name";"Smith")) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name = :extraInfo.name";$querySettings) +``` + +Query that uses both named and indexed placeholders for values: + +```4d +var $querySettings : Object +var $managedCustomers : cs.CustomerSelection +$querySettings.parameters:=New object("userId";1234) +$managedCustomers:=ds.Customer.query("salesperson.userId = :userId and name=:1";"Smith";$querySettings) +``` + +Query with queryPlan and queryPath objects: + +```4d +$entitySelection:=ds.Employee.query("(firstName = :1 or firstName = :2) and (lastName = :3 or lastName = :4)";"D@";"R@";"S@";"K@";New object("queryPlan";True;"queryPath";True)) + + //you can then get these properties in the resulting entity selection +var $queryPlan; $queryPath : Object +$queryPlan:=$entitySelection.queryPlan +$queryPath:=$entitySelection.queryPath +``` + +Query with an attribute path of Collection type: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[].name = :1";"horsebackriding") +``` + +Query with an attribute path of Collection type and linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and extraInfo.hobbies[a].level=:2";"horsebackriding";2) +``` + +Query with an attribute path of Collection type and multiple linked attributes: + +```4d +$entitySelection:=ds.Employee.query("extraInfo.hobbies[a].name = :1 and + extraInfo.hobbies[a].level = :2 and extraInfo.hobbies[b].name = :3 and + extraInfo.hobbies[b].level = :4";"horsebackriding";2;"Tennis";5) +``` + +Query with an attribute path of Object type: + +```4d +$entitySelection:=ds.Employee.query("extra.eyeColor = :1";"blue") +``` + +Query with an IN statement: + +```4d +$entitySelection:=ds.Employee.query("firstName in :1";New collection("Kim";"Dixie")) +``` + +Query with a NOT (IN) statement: + +```4d +$entitySelection:=ds.Employee.query("not (firstName in :1)";New collection("John";"Jane")) +``` + +Query with indexed placeholders for attributes: + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Employee.query(":1 = 1234 and :2 = 'Smith'";"salesperson.userId";"name") + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and named placeholders for values: + +```4d +var $es : cs.EmployeeSelection +var $querySettings : Object +$querySettings:=New object +$querySettings.parameters:=New object("customerName";"Smith") +$es:=ds.Customer.query(":1 = 1234 and :2 = :customerName";"salesperson.userId";"name";$querySettings) + //salesperson is a related entity +``` + +Query with indexed placeholders for attributes and values: + + +```4d +var $es : cs.EmployeeSelection +$es:=ds.Clients.query(":1 = 1234 and :2 = :3";"salesperson.userId";"name";"Smith") + //salesperson is a related entity +``` + +#### Example 2 + +This section illustrates queries with named placeholders for attributes. + +Given an Employee dataclass with 2 entities: + +Entity 1: + +```4d +name: "Marie" +number: 46 +softwares:{ +"Word 10.2": "Installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Entity 2: + +```4d +name: "Sophie" +number: 47 +softwares:{ +"Word 10.2": "Not installed", +"Excel 11.3": "To be upgraded", +"Powerpoint 12.4": "Not installed" +} +``` + +Query with named placeholders for attributes: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + $querySettings:=New object + $querySettings.attributes:=New object("attName";"name";"attWord";New collection("softwares";"Word 10.2")) + $es:=ds.Employee.query(":attName = 'Marie' and :attWord = 'Installed'";$querySettings) + //$es.length=1 (Employee Marie) +``` + +Query with named placeholders for attributes and values: + +```4d + var $querySettings : Object + var $es : cs.EmployeeSelection + var $name : Text + $querySettings:=New object + //Named placeholders for values + //The user is asked for a name + $name:=Request("Please enter the name to search:") + If(OK=1) + $querySettings.parameters:=New object("givenName";$name) + //Named placeholders for attribute paths + $querySettings.attributes:=New object("attName";"name") + $es:=ds.Employee.query(":attName= :givenName";$querySettings) + End if +``` + +#### Example 3 + +These examples illustrate the various ways to use formulas with or without parameters in your queries. + +The formula is given as text with `eval()` in the *queryString* parameter: + +```4d + var $es : cs.StudentsSelection + $es:=ds.Students.query("eval(length(This.lastname) >=30) and nationality='French'") +``` + +The formula is given as a `Formula` object through a placeholder: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query(":1 and nationality='French'";$formula) +``` + +Only a `Formula` object is given as criteria: + +```4d + var $es : cs.StudentsSelection + var $formula : Object + $formula:=Formula(Length(This.lastname)>=30) + $es:=ds.Students.query($formula) +``` + +Several formulas can be applied: + +```4d + var $formula1; $1; $formula2 ;$0 : Object + $formula1:=$1 + $formula2:=Formula(Length(This.firstname)>=30) + $0:=ds.Students.query(":1 and :2 and nationality='French'";$formula1;$formula2) +``` + + +A text formula in *queryString* receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query("eval(checkName($1.filter)) and nationality=:1";"French";$settings) +``` + +```4d + //checkName method + #DECLARE($exclude : Text) -> $result : Boolean + $result:=(Position($exclude;This.lastname)=0) +``` + +Using the same ***checkName*** method, a `Formula` object as placeholder receives a parameter: + +```4d + var $es : cs.StudentsSelection + var $settings; $formula : Object + $formula:=Formula(checkName($1.filter)) + $settings:=New object() + $settings.args:=New object("filter";"-") + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) + $settings.args.filter:="*" // change the parameters without updating the $formula object + $es:=ds.Students.query(":1 and nationality=:2";$formula;"French";$settings) +``` + +We want to disallow formulas, for example when the user enters their query: + +```4d + var $es : cs.StudentsSelection + var $settings : Object + var $queryString : Text + $queryString:=Request("Enter your query:") + if(OK=1) + $settings:=New object("allowFormulas";False) + $es:=ds.Students.query($queryString;$settings) //An error is raised if $queryString contains a formula + End if +``` + +#### See also + +[`.query()`](EntitySelectionClass.md#query) for entity selections + + diff --git a/website/translated_docs/pt/API/DataStoreClass.md b/website/translated_docs/pt/API/DataStoreClass.md new file mode 100644 index 00000000000000..b2518b5f3b4d81 --- /dev/null +++ b/website/translated_docs/pt/API/DataStoreClass.md @@ -0,0 +1,788 @@ +--- +id: DataStoreClass +title: DataStore +--- + +A [Datastore](ORDA/dsMapping.md#datastore) is the interface object provided by ORDA to reference and access a database. `Datastore` objects are returned by the following commands: + +* [ds](#ds): a shortcut to the main datastore +* [Open datastore](#open-datastore): to open any remote datastore + +### Summary + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cancelTransaction()**](#canceltransaction)

              cancels the transaction | +| [***.dataclassName*** : 4D.DataClass](#dataclassname)

              contains a description of the dataclass | +| [**.encryptionStatus()**: Object](#encryptionstatus)

              returns an object providing the encryption status for the current data file | +| [**.getInfo()**: Object](#getinfo)

              returns an object providing information about the datastore | +| [**.getRequestLog()** : Collection](#getrequestlog)

              returns the ORDA requests logged in memory on the client side | +| [**.makeSelectionsAlterable()**](#makeselectionsalterable)

              sets all entity selections as alterable by default in the current application datastores | +| [**.provideDataKey**( *curPassPhrase* : Text ) : Object
          **.provideDataKey**( *curDataKey* : Object ) : Object ](#providedatakey)

              allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data | +| [**.setAdminProtection**( *status* : Boolean )](#setadminprotection)

              allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions | +| [**.startRequestLog**()
          **.startRequestLog**( *file* : 4D.File )
          **.startRequestLog**( *reqNum* : Integer )](#startrequestlog)

              starts the logging of ORDA requests on the client side | +| [**.startTransaction()**](#starttransaction)

              starts a transaction in the current process on the database matching the datastore to which it applies | +| [**.stopRequestLog()** ](#stoprequestlog)

              stops any logging of ORDA requests on the client side | +| [**.validateTransaction()** ](#validatetransaction)

              accepts the transaction | + + + + + +## ds + +

          History +| Version | Changes | +| ------- | ---------------------------- | +| v18 | Support of localID parameter | +| v17 | Added | +
          + +**ds** { ( *localID* : Text ) } : cs.DataStore +| Parameter | Type | | Description | +| --------- | ------------ | -- | ------------------------------------------ | +| localID | Text | -> | Local ID of the remote datastore to return | +| Result | cs.DataStore | <- | Reference to the datastore | + + +#### Description + +The `ds` command returns a reference to the datastore matching the current 4D database or the database designated by *localID*. + +If you omit the *localID* parameter (or pass an empty string ""), the command returns a reference to the datastore matching the local 4D database (or the 4D Server database in case of opening a remote database on 4D Server). The datastore is opened automatically and available directly through `ds`. + +You can also get a reference on an open remote datastore by passing its local id in the *localID* parameter. The datastore must have been previously opened with the [`Open datastore`](#open-datastore) command by the current database (host or component). The local id is defined when using this command. +> The scope of the local id is the database where the datastore has been opened. + +If no *localID* datastore is found, the command returns **Null**. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +#### Example 1 + +Using the main datastore on the 4D database: + +```4d + $result:=ds.Employee.query("firstName = :1";"S@") +``` + +#### Example 2 + +```4d + var $connectTo; $firstFrench; $firstForeign : Object + + var $frenchStudents; $foreignStudents : cs.DataStore + + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + //... + //... + $firstFrench:=getFirst("french";"Students") + $firstForeign:=getFirst("foreign";"Students") +``` + +```4d + //getFirst method + //getFirst(localID;dataclass) -> entity + #DECLARE( $localId : Text; $dataClassName : Text ) -> $entity : 4D.Entity + + $0:=ds($localId)[$dataClassName].all().first() +``` + + + + +## Open datastore + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**Open datastore**( *connectionInfo* : Object ; *localID* : Text ) : cs.DataStore +| Parameter | Type | | Description | +| -------------- | ------------ | -- | ------------------------------------------------------------------------- | +| connectionInfo | Object | -> | Connection properties used to reach the remote datastore | +| localID | Text | -> | Id to assign to the opened datastore on the local application (mandatory) | +| Result | cs.DataStore | <- | Datastore object | + + +#### Description + +The `Open datastore` command connects the application to the 4D database identified by the *connectionInfo* parameter and returns a matching `cs.DataStore` object associated with the *localID* local alias. + +The *connectionInfo* 4D database must be available as a remote datastore, i.e.: + +* its web server must be launched with http and/or https enabled, +* its [**Expose as REST server**](REST/configuration.md#starting-the-rest-server) option must be checked, +* at least one client license is available. + +If no matching database is found, `Open datastore` returns **Null**. + +*localID* is a local alias for the session opened on remote datastore. If *localID* already exists on the application, it is used. Otherwise, a new *localID* session is created when the datastore object is used. + +Objects available in the `cs.Datastore` are mapped from the target database with respect to the [ORDA general rules](Concepts/dsMapping.md#general-rules). + +Once the session is opened, the following statements become equivalent and return a reference on the same datastore object: + +```4d + $myds:=Open datastore(connectionInfo;"myLocalId") + $myds2:=ds("myLocalId") + //$myds and $myds2 are equivalent +``` + +Pass in *connectionInfo* an object describing the remote datastore you want to connect to. It can contain the following properties (all properties are optional except *hostname*): + +| Property | Type | Description | +| ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| hostname | Text | Name or IP address of the remote database + ":" + port number (port number is mandatory) | +| user | Text | User name | +| password | Text | User password | +| idleTimeout | Longint | Inactivity session timeout (in minutes), after which the session is automatically closed by 4D. If omitted, default value is 60 (1h). The value cannot be < 60 (if a lower value is passed, the timeout is set to 60). For more information, see **Closing sessions**. | +| tls | Boolean | Use secured connection(*). If omitted, false by default. Using a secured connection is recommended whenever possible. | +| type | Text | Must be "4D Server" | + +(*) If tls is true, the HTTPS protocol is used if: + +* HTTPS is enabled on the remote datastore +* the given port is the right HTTPS port configured in the database settings +* a valid certificate and private encryption key are installed in the database. Otherwise, error "1610 - A remote request to host xxx has failed" is raised + +#### Example 1 + +Connection to a remote datastore without user / password: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";"192.168.18.11:8044") + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 2 + +Connection to a remote datastore with user / password / timeout / tls: + +```4d + var $connectTo : Object + var $remoteDS : cs.DataStore + $connectTo:=New object("type";"4D Server";"hostname";\"192.168.18.11:4443";\ + "user";"marie";"password";$pwd;"idleTimeout";70;"tls";True) + $remoteDS:=Open datastore($connectTo;"students") + ALERT("This remote datastore contains "+String($remoteDS.Students.all().length)+" students") +``` + +#### Example 3 + +Working with several remote datastores: + +```4d + var $connectTo : Object + var $frenchStudents; $foreignStudents : cs.DataStore + $connectTo:=New object("hostname";"192.168.18.11:8044") + $frenchStudents:=Open datastore($connectTo;"french") + $connectTo.hostname:="192.168.18.11:8050" + $foreignStudents:=Open datastore($connectTo;"foreign") + ALERT("They are "+String($frenchStudents.Students.all().length)+" French students") + ALERT("They are "+String($foreignStudents.Students.all().length)+" foreign students") +``` + +#### Error management + +In case of error, the command returns **Null**. If the remote datastore cannot be reached (wrong address, web server not started, http and https not enabled...), error 1610 "A remote request to host XXX has failed" is raised. You can intercept this error with a method installed by `ON ERR CALL`. + + + +## *.dataclassName* + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +***.dataclassName*** : 4D.DataClass + +#### Description + +Each dataclass in a datastore is available as a property of the [DataStore object](ORDA/dsMapping.md#datastore)data. The returned object contains a description of the dataclass. + + +#### Example + +```4d + var $emp : cs.Employee + var $sel : cs.EmployeeSelection + $emp:=ds.Employee //$emp contains the Employee dataclass + $sel:=$emp.all() //gets an entity selection of all employees + + //you could also write directly: + $sel:=ds.Employee.all() +``` + + + + + + +## .cancelTransaction() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + + +**.cancelTransaction()** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.cancelTransaction()` function cancels the transaction opened by the [`.startTransaction()`](#starttransaction) function at the corresponding level in the current process for the specified datastore. + +The `.cancelTransaction()` function cancels any changes made to the data during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using the [`.validateTransaction()`](#validatetransactions) function. + + +#### Example + +See example for the [`.startTransaction()`](#starttransaction) function. + + + + + +## .encryptionStatus() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.encryptionStatus()**: Object + +| Parameter | Type | | Description | +| --------- | ------ |:--:| --------------------------------------------------------------------------- | +| Result | Object | <- | Information about the encryption of the current datastore and of each table | + + +#### Description + +The `.encryptionStatus()` function returns an object providing the encryption status for the current data file (i.e., the data file of the `ds` datastore). The status for each table is also provided. +> Use the `Data file encryption status` command to determine the encryption status of any other data file. + + +**Returned value** + +The returned object contains the following properties: + +| Property | | | Type | Description | +| ----------- | ----------- | ------------- | ------- | ---------------------------------------------------------------------------------- | +| isEncrypted | | | Boolean | True if the data file is encrypted | +| keyProvided | | | Boolean | True if the encryption key matching the encrypted data file is provided(*). | +| tabelas | | | Object | Object containing as many properties as there are encryptable or encrypted tables. | +| | *tableName* | | Object | Encryptable or Encrypted table | +| | | name | Text | Name of the table | +| | | num | Number | Table number | +| | | isEncryptable | Boolean | True if the table is declared encryptable in the structure file | +| | | isEncrypted | Boolean | True if the records of the table are encrypted in the data file | + +(*) The encryption key can be provided: + +* with the `.provideDataKey()` command, +* at the root of a connected device before opening the datastore, +* with the `Discover data key` command. + +#### Example + +You want to know the number of encrypted tables in the current data file: + +```4d + var $status : Object + + $status:=dataStore.encryptionStatus() + + If($status.isEncrypted) //the database is encrypted + C_LONGINT($vcount) + C_TEXT($tabName) + For each($tabName;$status.tables) + If($status.tables[$tabName].isEncrypted) + $vcount:=$vcount+1 + End if + End for each + ALERT(String($vcount)+" encrypted table(s) in this datastore.") + Else + ALERT("This database is not encrypted.") + End if +``` + + + + +## .getInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.getInfo()**: Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| -------------------- | +| Result | Object | <- | Datastore properties | + +#### Description + +The `.getInfo()` function returns an object providing information about the datastore. This function is useful for setting up generic code. + +**Returned object** + +| Property | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | string |
        • "4D": main datastore, available through ds
        • "4D Server": remote datastore, open with Open datastore
        • | +| networked | boolean |
        • True: the datastore is reached through a network connection.
        • False: the datastore is not reached through a network connection (local database)
        • | +| localID | text | ID of the datastore on the machine. Corresponds to the localId string given with the `Open datastore` command. Empty string ("") for main datastore. | +| connection | object | Object describing the remote datastore connection (not returned for main datastore). Available properties:

          PropertyTypeDescription
          hostnametextIP address or name of the remote datastore + ":" + port number
          tlsbooleanTrue if secured connection is used with the remote datastore
          idleTimeoutnumberSession inactivity timeout (in minutes)
          usertextUser authenticated on the remote datastore
          | + +* If the `.getInfo()` function is executed on a 4D Server or 4D single-user, `networked` is False. +* If the `.getInfo()` function is executed on a remote 4D, `networked` is True + + +#### Example 1 + +```4d + var $info : Object + + $info:=ds.getInfo() //Executed on 4D Server or 4D + //{"type":"4D","networked":false,"localID":""} + + $info:=ds.getInfo() // Executed on 4D remote + //{"type":"4D","networked":true,"localID":""} +``` + +#### Example 2 + +On a remote datastore: + +```4d + var $remoteDS : cs.DataStore + var $info; $connectTo : Object + + $connectTo:=New object("hostname";"111.222.33.44:8044";"user";"marie";"password";"aaaa") + $remoteDS:=Open datastore($connectTo;"students") + $info:=$remoteDS.getInfo() + + //{"type":"4D Server", + //"localID":"students", + //"networked":true, + //"connection":{hostname:"111.222.33.44:8044","tls":false,"idleTimeout":2880,"user":"marie"}} +``` + + + + + +## .getRequestLog() + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
          + +**.getRequestLog()** : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------------------------------------ | +| Result | Collection | <- | Collection of objects, where each object describes a request | + + +#### Description + +The `.getRequestLog()` function returns the ORDA requests logged in memory on the client side. The ORDA request logging must have previously been enabled using the [`.startRequestLog()`](#startrequestlog) function. + +This function must be called on a remote 4D, otherwise it returns an empty collection. It is designed for debugging purposes in client/server configurations. + +**Returned value** + +Collection of stacked request objects. The most recent request has index 0. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + + +#### Example + +See Example 2 of [`.startRequestLog()`](#startrequestlog). + + + +## .isAdminProtected() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.isAdminProtected()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------------------------------ | +| Result | Boolean | <- | True if the Data Explorer access is disabled, False if it is enabled (default) | + + +#### Description + +The `.isAdminProtected()` function returns `True` if [Data Explorer](Admin/dataExplorer.md) access has been disabled for the working session. + +By default, the Data Explorer access is granted for `webAdmin` sessions, but it can be disabled to prevent any data access from administrators (see the [`.setAdminProtection()`](#setadminprotection) function). + +#### See also + +[`.setAdminProtection()`](#setadminprotection) + + + + + +## .makeSelectionsAlterable() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.makeSelectionsAlterable()** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.makeSelectionsAlterable()` function sets all entity selections as alterable by default in the current application datastores (including [remote datastores](ORDA/remoteDatastores.md)). It is intended to be used once, for example in the `On Startup` database method. + +When this function is not called, new entity selections can be shareable, depending on the nature of their "parent", or [how they are created](ORDA/entities.md#shareable-or-non-shareable-entity-selections). + +> This function does not modify entity selections created by [`.copy()`](#copy) or `OB Copy` when the explicit `ck shared` option is used. + + +> **Compatibility**: This function must only be used in projects converted from 4D versions prior to 4D v18 R5 and containing [.add()](EntitySelectionClass.md#add) calls. In this context, using `.makeSelectionsAlterable()` can save time by restoring instantaneously the previous 4D behavior in existing projects. On the other hand, using this method in new projects created in 4D v18 R5 and higher **is not recommended**, since it prevents entity selections to be shared, which provides greater performance and scalabitlity. + + + + +## .provideDataKey() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.provideDataKey**( *curPassPhrase* : Text ) : Object
          **.provideDataKey**( *curDataKey* : Object ) : Object + +| Parameter | Type | | Description | +| ------------- | ------ | -- | ------------------------------------- | +| curPassPhrase | Text | -> | Current encryption passphrase | +| curDataKey | Object | -> | Current data encryption key | +| Result | Object | <- | Result of the encryption key matching | + + +#### Description + +The `.provideDataKey()` function allows providing a data encryption key for the current data file of the datastore and detects if the key matches the encrypted data. This function can be used when opening an encrypted database, or when executing any encryption operation that requires the encryption key, such as re-encrypting the data file. +> * The `.provideDataKey()` function must be called in an encrypted database. If it is called in a non-encrypted database, the error 2003 (the encryption key does not match the data.) is returned. Use the `Data file encryption status` command to determine if the database is encrypted. +> * The `.provideDataKey()` function cannot be called from a remote 4D or an encrypted remote datastore. + +If you use the *curPassPhrase* parameter, pass the string used to generate the data encryption key. When you use this parameter, an encryption key is generated. + +If you use the *curDataKey* parameter, pass an object (with *encodedKey* property) that contains the data encryption key. This key may have been generated with the `New data key` command. + +If a valid data encryption key is provided, it is added to the *keyChain* in memory and the encryption mode is enabled: + +* all data modifications in encryptable tables are encrypted on disk (.4DD, .journal. 4Dindx files) +* all data loaded from encryptable tables is decrypted in memory + + +**Result** + +The result of the command is described in the returned object: + +| Property | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------- | +| success | | Boolean | True if the provided encryption key matches the encrypted data, False otherwise | +| | | | Properties below are returned only if success is *FALSE* | +| status | | Number | Error code (4 if the provided encryption key is wrong) | +| statusText | | Text | Error message | +| errors | | Collection | Stack of errors. The first error has the highest index | +| | \[ ].componentSignature | Text | Internal component name | +| | \[ ].errCode | Number | Error number | +| | \[ ].message | Text | Error message | + +If no *curPassphrase* or *curDataKey* is given, `.provideDataKey()` returns **null** (no error is generated). + + + +#### Example + +```4d + var $keyStatus : Object + var $passphrase : Text + + $passphrase:=Request("Enter the passphrase") + If(OK=1) + $keyStatus:=ds.provideDataKey($passphrase) + If($keyStatus.success) + ALERT("You have provided a valid encryption key") + Else + ALERT("You have provided an invalid encryption key, you will not be able to work with encrypted data") + End if + End if +``` + + + + +## .setAdminProtection() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.setAdminProtection**( *status* : Boolean ) + +| Parameter | Type | | Description | +| --------- | ------- | -- | ---------------------------------------------------------------------------------------------------- | +| status | Boolean | -> | True to disable Data Explorer access to data on the `webAdmin` port, False (default) to grant access | + + +#### Description + +The `.setAdminProtection()` function allows disabling any data access on the [web admin port](Admin/webAdmin.md#http-port), including for the [Data Explorer](Admin/dataExplorer.md) in `WebAdmin` sessions. + +By default when the function is not called, access to data is always granted on the web administration port for a session with `WebAdmin` privilege using the Data Explorer. In some configurations, for example when the application server is hosted on a third-party machine, you might not want the administrator to be able to view your data, although they can edit the server configuration, including the [access key](Admin/webAdmin.md#access-key) settings. + +In this case, you can call this function to disable the data access from Data Explorer on the web admin port of the machine, even if the user session has the `WebAdmin` privilege. When this function is executed, the data file is immediately protected and the status is stored on disk: the data file will be protected even if the application is restarted. + + +#### Example + +You create a *protectDataFile* project method to call before deployments for example: + +```4d + ds.setAdminProtection(True) //Disables the Data Explorer data access +``` + +#### See also + +[`.isAdminProtected()`](#isadminprotected) + + + +## .startRequestLog() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
          + +**.startRequestLog**()
          **.startRequestLog**( *file* : 4D.File )
          **.startRequestLog**( *reqNum* : Integer ) + +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------------------------------ | +| file | 4D.File | -> | File object | +| reqNum | Integer | -> | Number of requests to keep in memory | + + +#### Description + +The `.startRequestLog()` function starts the logging of ORDA requests on the client side. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + +The ORDA request log can be sent to a file or to memory, depending on the parameter type: + +* If you passed a *file* object created with the `File` command, the log data is written in this file as a collection of objects (JSON format). Each object represents a request.
          If the file does not already exist, it is created. Otherwise if the file already exists, the new log data is appended to it. If `.startRequestLog( )` is called with a file while a logging was previously started in memory, the memory log is stopped and emptied. +> A \] character must be manually appended at the end of the file to perform a JSON validation + +* If you passed a *reqNum* integer, the log in memory is emptied (if any) and a new log is initialized. It will keep *reqNum* requests in memory until the number is reached, in which case the oldest entries are emptied (FIFO stack).
          If `.startRequestLog()` is called with a *reqNum* while a logging was previously started in a file, the file logging is stopped. + +* If you did not pass any parameter, the log is started in memory. If `.startRequestLog()` was previously called with a *reqNum* (before a `.stopRequestLog()`), the log data is stacked in memory until the next time the log is emptied or `.stopRequestLog()` is called. + +For a description of the ORDA request log format, please refer to the [**ORDA client requests**](https://doc.4d.com/4Dv18/4D/18/Description-of-log-files.300-4575486.en.html#4385373) section. + +#### Example 1 + +You want to log ORDA client requests in a file and use the log sequence number: + +```4d + var $file : 4D.File + var $e : cs.PersonsEntity + + $file:=File("/LOGS/ORDARequests.txt") //logs folder + + SET DATABASE PARAMETER(Client Log Recording;1) //to trigger the global log sequence number + ds.startRequestLog($file) + $e:=ds.Persons.get(30001) //send a request + ds.stopRequestLog() + SET DATABASE PARAMETER(Client Log Recording;0) +``` + +#### Example 2 + +You want to log ORDA client requests in memory: + +```4d + var $es : cs.PersonsSelection + var $log : Collection + + ds.startRequestLog(3) //keep 3 requests in memory + + $es:=ds.Persons.query("name=:1";"Marie") + $es:=ds.Persons.query("name IN :1";New collection("Marie")) + $es:=ds.Persons.query("name=:1";"So@") + + $log:=ds.getRequestLog() + ALERT("The longest request lasted: "+String($log.max("duration"))+" ms") +``` + + + + + +## .startTransaction() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**.startTransaction()** +| Parameter | Type | | Description | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.startTransaction()` function starts a transaction in the current process on the database matching the datastore to which it applies. Any changes made to the datastore's entities in the transaction's process are temporarily stored until the transaction is either validated or cancelled. +> If this method is called on the main datastore (i.e. the datastore returned by the `ds` command), the transaction is applied to all operations performed on the main datastore and on the underlying database, thus including ORDA and classic languages. + +You can nest several transactions (sub-transactions). Each transaction or sub-transaction must eventually be cancelled or validated. Note that if the main transaction is cancelled, all of its sub-transactions are also cancelled even if they were validated individually using the `.validateTransaction()` function. + + +#### Example + + +```4d + var $connect; $status : Object + var $person : cs.PersonsEntity + var $ds : cs.DataStore + var $choice : Text + var $error : Boolean + + Case of + :($choice="local") + $ds:=ds + :($choice="remote") + $connect:=New object("hostname";"111.222.3.4:8044") + $ds:=Open datastore($connect;"myRemoteDS") + End case + + $ds.startTransaction() + $person:=$ds.Persons.query("lastname=:1";"Peters").first() + + If($person#Null) + $person.lastname:="Smith" + $status:=$person.save() + End if + ... + ... + If($error) + $ds.cancelTransaction() + Else + $ds.validateTransaction() + End if +``` + + + + + + + +## .stopRequestLog() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | +
          + +**.stopRequestLog()** +| Parameter | Type | | Description | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.stopRequestLog()` function stops any logging of ORDA requests on the client side (in file or in memory). It is particularly useful when logging in a file, since it actually closes the opened document on disk. + +This function must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations. + + +#### Example + +See examples for [`.startRequestLog()`](#startrequestlog). + + + + + +## .validateTransaction() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**.validateTransaction()** +| Parameter | Type | | Description | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.validateTransaction()` function accepts the transaction that was started with [`.startTransaction()`](#starttransaction) at the corresponding level on the specified datastore. + +The function saves the changes to the data on the datastore that occurred during the transaction. + +You can nest several transactions (sub-transactions). If the main transaction is cancelled, all of its sub-transactions are also cancelled, even if they were validated individually using this function. + + +#### Example + +See example for [`.startTransaction()`](#starttransaction). + + + diff --git a/website/translated_docs/pt/API/Directory.md b/website/translated_docs/pt/API/Directory.md new file mode 100644 index 00000000000000..a610c30c342b87 --- /dev/null +++ b/website/translated_docs/pt/API/Directory.md @@ -0,0 +1,599 @@ +--- +id: Directory +title: Directory Class +--- + +## Description + + +## .creationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the folder. + +This property is **read-only**. + + +--- + + ## .creationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationTime** : Time + + +#### Description + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + +--- + + +## .exists + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +This property is **read-only**. + + + +--- + + +## .extension + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.extension** : Text + +#### Description + +The `.extension` property returns the extension of the folder name (if any). An extension always starts with ".". The property returns an empty string if the folder name does not have an extension. + +This property is **read-only**. + + + +--- + +## .fullName + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.fullName** : Text + +#### Description + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +This property is **read-only**. + + + +--- + +## .hidden + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + +--- + + +## .isAlias + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isAlias** : Boolean + + +#### Description + +The `.isAlias` property returns always **false** for a `Folder` object. + +This property is **read-only**. + + +--- + +## .isFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always **false** for a folder. + +This property is **read-only**. + + +--- + +## .isFolder + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always **true** for a folder. + +This property is **read-only**. + + +--- + +## .isPackage + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isPackage** : Boolean + +#### Description + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Otherwise, it returns false. + +On Windows, `.isPackage` always returns **false**. + +This property is **read-only**. + + + +--- + +## .modificationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the folder's last modification. + +This property is **read-only**. + + + +--- + +## .modificationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationTime** : Time + +#### Description + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + +--- + +## .name + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the folder, without extension (if any). + +This property is **read-only**. + + +--- + +## .original + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.original** : 4D.Folder + +#### Description + +The `.original` property returns the same Folder object as the folder. + +This property is **read-only**. +> This property is available on folders to allow generic code to process folders or files. + + +--- + + +## .parent + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +This property is **read-only**. + + + +--- + +## .path + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + +--- + +## .platformPath + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +This property is **read-only**. + + + +--- + + + + + +## .copyTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Parameter | Type | | Description | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Name for the copy | +| overwrite | Integer | -> | `fk overwrite` to replace existing elements | +| Result | 4D.Folder | <- | Copied file or folder | + + +#### Description + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Value | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `Folder` object. + +#### Example + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + +--- + + +## .file() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.file**( *path* : Text ) : 4D.File +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------------------------------ | +| path | Text | -> | Relative POSIX file pathname | +| Result | 4D.File | <- | `File` object (null if invalid path) | + +#### Description + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `File` object or null if *path* is invalid. + +#### Example + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + +--- + +## .files() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.files**( { *options* : Integer } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- | -- | ----------------------------------- | +| options | Integer | -> | File list options | +| Result | Collection | <- | Collection of children file objects | + +#### Description + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Value | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `File` objects. + +#### Example 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Example 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + +--- + +## .folder() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.folder**( *path* : Text ) : 4D.Folder +| Parameter | Type | | Description | +| --------- | --------- | -- | ---------------------------------------------- | +| path | Text | -> | Relative POSIX file pathname | +| Result | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Description + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `Folder` object or null if *path* is invalid. + +#### Example + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + +--- + +## .folders() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.folders**( { *options* : Integer } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- | -- | ------------------------------------- | +| options | Integer | -> | Folder list options | +| Result | Collection | <- | Collection of children folder objects | + +#### Description + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Value | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `Folder` objects. + +#### Example + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + +--- + +## .getIcon() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Type | | Description | +| --------- | ------- | -- | --------------------------------------------- | +| size | Integer | -> | Side length for the returned picture (pixels) | +| Result | Picture | <- | Icon | + + +#### Description + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Returned value** + +Folder icon [picture](Concepts/dt_picture.md). + + + + diff --git a/website/translated_docs/pt/API/Document.md b/website/translated_docs/pt/API/Document.md new file mode 100644 index 00000000000000..db987d0afd1af4 --- /dev/null +++ b/website/translated_docs/pt/API/Document.md @@ -0,0 +1,578 @@ +--- +id: Document +title: Document Class +--- + +## Description + + +## .creationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the file. + +This property is **read-only**. + + + + ## .creationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationTime** : Time + +#### Description + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .exists + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +This property is **read-only**. + + + + + + + +## .extension + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.extension** : Text +#### Description + +The `.extension` property returns the extension of the file name (if any). An extension always starts with ".". The property returns an empty string if the file name does not have an extension. + +This property is **read-only**. + + + + + + +## .fullName + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.fullName** : Text +#### Description + +The `.fullName` property returns the full name of the file, including its extension (if any). + +This property is **read-only**. + + + + + +## .hidden + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + +## .isAlias + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isAlias** : Boolean + +#### Description + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +This property is **read-only**. + + + + +## .isFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always true for a file. + +This property is **read-only**. + + + + +## .isFolder + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always false for a file. + +This property is **read-only**. + + + + + +## .isWritable + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isWritable** : Boolean + +#### Description + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +This property is **read-only**. + +**Example** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + +## .modificationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the file's last modification. + +This property is **read-only**. + + + + + +## .modificationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationTime** : Time + +##### Description + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + +## .name + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.name** : Text + +#### Description + +The `.name` property returns the name of the file without extension (if any). + +This property is **read-only**. + + + +## .original + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.original** : 4D.File
          **.original** : 4D.Folder + +#### Description + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +This property is **read-only**. + + + + + +## .parent + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +This property is **read-only**. + + + + + +## .path + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + +## .platformPath + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +This property is **read-only**. + + + + + +## .size + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.size** : Real + +#### Description + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +This property is **read-only**. + + + + + + + + + + + +## .copyTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Parameter | Type | | Description | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Name for the copy | +| overwrite | Integer | -> | `fk overwrite` to replace existing elements | +| Result | 4D.File | <- | Copied file | + + +#### Description + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Value | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `File` object. + +#### Example + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + +## .getContent() + +
          History +| Version | Changes | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Added | +
          + +**.getContent( )** : 4D.Blob +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------ | +| Result | 4D.Blob | <- | File content | + + +#### Description + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Returned value** + +A `4D.Blob` object. + +#### Example + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + +## .getIcon() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Type | | Description | +| --------- | ------- | -- | --------------------------------------------- | +| size | Integer | -> | Side length for the returned picture (pixels) | +| Result | Picture | <- | Icon | + + +#### Description + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Returned value** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
          **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Parameter | Type | | Description | +| ----------- | ------- | -- | ------------------------------- | +| charSetName | Text | -> | Name of character set | +| charSetNum | Integer | -> | Number of character set | +| breakMode | Integer | -> | Processing mode for line breaks | +| Result | Text | <- | Text from the document | + + +#### Description +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Value | Comment | +| ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Returned value** + +Text of the file. + +#### Example + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + diff --git a/website/translated_docs/pt/API/EmailObjectClass.md b/website/translated_docs/pt/API/EmailObjectClass.md new file mode 100644 index 00000000000000..8df67711ba8f1c --- /dev/null +++ b/website/translated_docs/pt/API/EmailObjectClass.md @@ -0,0 +1,611 @@ +--- +id: EmailObjectClass +title: Email +--- + +Creating, sending or receiving emails in 4D is done by handling an `Email` object. + +`Email` objects are created when receiving mails through a *transporter* class function: + +- IMAP - [`.getMail()`](IMAPTransporterClass.md#getmail) and [`.getMails()`](IMAPTransporterClass.md#getmails) functions to get emails from an IMAP server +- POP3 - [`.getMail()`](POP3TransporterClass.md#getmail) function to get an email from a POP3 server. + +> You can also create a new, blank `Email` object by calling the [`New object`](https://doc.4d.com/4dv18/help/command/en/page1471.html) 4D command, and then fill it with [Email object properties](#email-object). + +You send `Email` objects using the SMTP [`.send()`](SMTPTransporterClass.md#send) function. + +[`MAIL Convert from MIME`](#mail-convert-from-mime) and [`MAIL Convert to MIME`](#mail-convert-to-mime) commands can be used to convert `Email` objects to and from MIME contents. + + +### Email Object + +Email objects provide the following properties: + +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the Email object. + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.attachments** : Collection](#attachments)

              collection of `4D.MailAttachment` object(s) | +| [**.bcc** : Text
          **.bcc** : Object
          **.bcc** : Collection](#bcc)

              Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email | +| [**.bodyStructure** : Object](#bodystructure)

              *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional) | +| [**.bodyValues** : Object](#bodyvalues)

              *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional) | +| [**.cc** : Text
          **.cc** : Object
          **.cc** : Collection](#cc)

              Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email | +| [**.comments** : Text](#comments)

              additional comments header | +| [**.from** : Text
          **.from** : Object
          **.from** : Collection](#from)

              Originating [address(es)](#email-addresses) of the email | +| [**.headers** : Collection](#headers)

              collection of `EmailHeader` objects, in the order they appear in the message | +| [**.htmlBody** : Text](#htmlbody)

              HTML representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.id** : Text](#id)

              unique ID from the IMAP server | +| [**.inReplyTo** : Text](#inreplyto)

              message identifier(s) of the original message(s) to which the current message is a reply | +| [**.keywords** : Object](#keywords)

              set of keywords as an object, where each property name is a keyword and each value is true | +| [**.messageId** : Text](#messageid)

              message identifier header ("message-id") | +| [**.receivedAt** : Text](#receivedat)

              timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z) | +| [**.references** : Collection](#references)

              Collection of all message-ids of messages in the preceding reply chain | +| [**.replyTo** : Text
          **.replyTo** : Object
          **.replyTo** : Collection](#replyto)

              [addresse(s)](#email-addresses) for responses | +| [**.sendAt** : Text](#sendat)

              Email timestamp in ISO 8601 UTC format | +| [**.sender** : Text
          **.sender** : Object
          **.sender** : Collection](#sender)

              email source [addresse(s)](#email-addresses) of the email | +| [**.size** : Integer](#size)

              size (expressed in bytes) of the Email object returned by the IMAP server | +| [**.subject** : Text](#subject)

              description of topic | +| [**.textBody** : Text](#textbody)

              Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only) | +| [**.to** : Text
          **.to** : Object
          **.to** : Collection](#to)

              primary recipient [addresse(s)](#email-addresses) of the email | + + +### Email Addresses + +All properties that contain email addresses ([`from`](#from), [`cc`](#cc), [`bcc`](#bcc), [`to`](#to), [`sender`](#sender), [`replyTo`](#replyto)) accept a value of text, object, or collection type. + +#### Text + +- single email: "somebody@domain.com" +- single display name+email: "Somebody " +- several emails: "Somebody ,me@home.org" + +#### Object + +An object with two properties: + +| Property | Type | Description | +| -------- | ---- | -------------------------- | +| name | Text | Display name (can be null) | +| email | Text | Email address | + +#### Collection + +A collection of address objects. + +### Handling body part + +The [`textBody`](#textbody) and [`htmlBody`](#htmlbody) properties are only used with the [SMTP.send()](SMTPTransporterClass.md#send) function to allow sending simple mails. When both property are filled, the MIME content-type multipart/alternative is used. The email client should then recognize the multipart/alternative part and display the text part or html part as necessary. + +[`bodyStructure`](#bodystructure) and [`bodyValues`](#bodyvalues) are used for [SMTP](SMTPTransporterClass.md) when the [Email object](email-object) is built from a MIME document, e.g. when generated by the `MAIL Convert from MIME` command. In this case, both `bodyStructure` and `bodyValues` properties must be passed together, and it is not recommended to use `textBody` and `htmlBody`. + +#### Example of bodyStructure and bodyValues objects + +```json +"bodyStructure": { + "type": "multipart/mixed", + "subParts": [ + { + "partId": "p0001", + "type": "text/plain" + }, + { + "partId": "p0002", + "type": "text/html" + } + ] +}, +"bodyValues": { + "p0001": { + "value": "I have the most brilliant plan. Let me tell you all about it." + }, + "p0002": { + "value": "

          I have the most brilliant plan. Let me tell you all about it.
          " + } +} +``` + + + + + + +## .attachments + +**.attachments** : Collection + +#### Description + + + +The `.attachments` property contains a collection of `4D.MailAttachment` object(s). + +Attachment objects are defined through the [`MAIL New attachment`](MailAttachmentClass.md#mail-new-attachment) command. Attachment objects have specific [properties and functions](MailAttachmentClass.md). + + + + +## .bcc + +**.bcc** : Text
          **.bcc** : Object
          **.bcc** : Collection + +#### Description + +The `.bcc` property contains the Blind Carbon Copy (BCC) hidden email recipient [addresse(s)](#email-addresses) of the email. + + + + +## .bodyStructure + +**.bodyStructure** : Object + +#### Description + +The `.bodyStructure` property contains the *EmailBodyPart* object, i.e. the full MIME structure of the message body (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyStructure` object contains the following properties: + +| Property | Type | Value | +| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| partID | Text | Identifies the part uniquely within the email | +| type | Text | (mandatory) Value of the Content-Type header field of the part | +| charset | Text | Value of the charset parameter of the Content-Type header field | +| encoding | Text | If `isEncodingProblem=true`, the Content-Transfer-Encoding value is added (by default undefined) | +| disposition | Text | Value of the Content-Disposition header field of the part | +| language | Collection of texts | List of language tags, as defined in [RFC3282](https://tools.ietf.org/html/rfc3282), in the Content-Language header field of the part, if present. | +| location | Text | URI, as defined in [RFC2557](https://tools.ietf.org/html/rfc2557), in the Content-Location header field of the part, if present. | +| subParts | Collection of objects | Body parts of each child (collection of *EmailBodyPart* objects) | +| headers | Collection of objects | List of all header fields in the part, in the order they appear in the message (collection of *EmailHeader* objects, see [headers](#headers-) property) | + + + + +## .bodyValues + +**.bodyValues** : Object + +#### Description + +The `.bodyValues` property contains the *EmailBodyValue* object, containing an object for each \ of `bodyStructure` (optional). See [Handling body part](#handling-body-part) section. + +The `.bodyValues` object contains the following properties: + +| Property | Type | Value | +| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| *partID*.value | text | Value of the body part | +| *partID*.isEncodingProblem | boolean | True if malformed sections are found while decoding the charset, or unknown charset, or unknown content transfer-encoding. False by default | + + + + +## .cc + +**.cc** : Text
          **.cc** : Object
          **.cc** : Collection + +#### Description + +The `.cc` property contains the Carbon Copy (CC) additional email recipient [addresse(s)](#email-addresses) of the email. + + + + + + +## .comments + +**.comments** : Text + +#### Description + +The `.comments` property contains an additional comments header. + +Comments only appear within the header section of the message (keeping the message's body untouched). + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .from + +**.from** : Text
          **.from** : Object
          **.from** : Collection + +#### Description + +The `.from` property contains the Originating [address(es)](#email-addresses) of the email. + + +Each email you send out has both the [sender](#sender) and **from** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .headers + +**.headers** : Collection + +#### Description + +The `.headers` property contains a collection of `EmailHeader` objects, in the order they appear in the message. This property allows users to add extended (registered) headers or user-defined (not registered, starting with "X") headers. + +> If an `EmailHeader` object property defines a header such as "from" or "cc" which is already set as a property at the mail level, the `EmailHeader` property is ignored. + +Every object of the headers collection can contain the following properties: + +| Property | Type | Value | +| -------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [].name | text | (mandatory) Header field name as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322). If null or undefined, the header field is not added to the MIME header. | +| [].value | text | Header field values as defined in [RFC#5322](https://tools.ietf.org/html/rfc5322) | + + + + + + + +## .htmlBody + +**.htmlBody** : Text + +#### Description + +The `.htmlBody` property contains the HTML representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + + + + + +## .id + +**.id** : Text + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.id` property contains the unique ID from the IMAP server. + + + + + + +## .inReplyTo + +**.inReplyTo** : Text + +#### Description + +The `.inReplyTo` property contains the message identifier(s) of the original message(s) to which the current message is a reply. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + + + +## .keywords + +**.keywords** : Object + +#### Description + +The `.keywords` property contains a set of keywords as an object, where each property name is a keyword and each value is true. + +This property is the "keywords" header (see [RFC#4021](https://tools.ietf.org/html/rfc4021)). + +| Property | Type | Value | +| -------------- | ------- | ----------------------------------- | +| .\ | boolean | Keyword to set (value must be true) | + +Reserved keywords: +* $draft - Indicates a message is a draft +* $seen - Indicates a message has been read +* $flagged - Indicates a message needs special attention (e.g., Urgent) +* $answered - Indicates a message has been replied to +* $deleted - Indicates a message to delete + +#### Example + +``` + $mail.keywords["$flagged"]:=True + $mail.keywords["4d"]:=True +``` + + + + +## .messageId + +**.messageId** : Text + +#### Description + +The `.messageId` property contains a message identifier header ("message-id"). + +This header is usually "lettersOrNumbers@domainname", e.g. "abcdef.123456@4d.com". This unique ID is used in particular on forums or public mailing lists. In general, mail servers automatically add this header to the messages they send. + + + +## .receivedAt + +**.receivedAt** : Text + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.receivedAt` property contains the timestamp of the email's arrival on the IMAP server in ISO 8601 UTC format (ex: 2020-09-13T16:11:53Z). + + + + + + +## .references + +**.references** : Collection + +#### Description + +The `.references` property contains the Collection of all message-ids of messages in the preceding reply chain. + +For specific formatting requirements, please consult the [RFC#5322](https://tools.ietf.org/html/rfc5322). + + + + +## .replyTo + +**.replyTo** : Text
          **.replyTo** : Object
          **.replyTo** : Collection + +#### Description + +The `.replyTo` property contains the [addresse(s)](#email-addresses) for responses. + + + + + +## .sendAt + +**.sendAt** : Text + +#### Description + +The `.sendAt` property contains the Email timestamp in ISO 8601 UTC format. + + + + +## .sender + +**.sender** : Text
          **.sender** : Object
          **.sender** : Collection + +#### Description + +The `.sender` property contains the email source [addresse(s)](#email-addresses) of the email. + + +Each email you send out has both the **sender** and **[from](#from)** addresses: + +- the sender domain is what the receiving email server gets when opening the session, +- the from address is what the recipient(s) will see. + +For better deliverability, it is recommended to use the same from and sender addresses. + + + + +## .size + +**.size** : Integer + +#### Description + +[IMAP transporter](IMAPTransporterClass.md) only. + +The `.size` property contains the size (expressed in bytes) of the Email object returned by the IMAP server. + + + + +## .subject + +**.subject** : Text + +#### Description + +The `.subject` property contains the description of topic. + + + + + +## .textBody + +**.textBody** : Text + +#### Description + +The `.textBody` property contains the Plain text representation of the email message (default charset is UTF-8) (optional, SMTP only). See [Handling body part](#handling-body-part) section. + + + +## .to + +**.to** : Text
          **.to** : Object
          **.to** : Collection + +#### Description + +The `.to` property contains the primary recipient [addresse(s)](#email-addresses) of the email. + + +## MAIL Convert from MIME + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**MAIL Convert from MIME**( *mime* : Blob ) : Object
          **MAIL Convert from MIME**( *mime* : Text ) : Object +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------- | +| mime | Blob, Text | -> | Email in MIME | +| Result | Object | <- | Email object | + +#### Description + +The `MAIL Convert from MIME` command converts a MIME document into a valid email object. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the returned email object. + +Pass in *mime* a valid MIME document to convert. It can be provided by any mail server or application. You can pass a BLOB or a text *mime* parameter. If the MIME comes from a file, it is recommended to use a BLOB parameter to avoid issues related to charset and line break conversions. + +#### Returned object + +Email object. + +#### Example 1 + +You want to load a mail template saved as MIME in a text document and send an email: + +```4d +C_BLOB($mime) +C_OBJECT($mail;$server;$transporter;$status) + +$mime:=File("/PACKAGE/Mails/templateMail.txt").getContent()) + +$mail:=[#current_title_incode]($mime) +$mail.to:="smith@mail.com" +$mail.subject:="Hello world" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="test@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($mail) +``` + +#### Example 2 + +In this example, you send directly a 4D Write Pro document containing pictures: + +```4d +C_TEXT($mime) +C_OBJECT($email;$server;$transporter;$status) + +// Mime export of the 4D Write Pro document +WP EXPORT VARIABLE(WParea;$mime;wk mime html) + +// convert 4D Write Pro Mime variable in mail object +$email:=MAIL Convert from MIME($mime) + +// Fill your mail object headers +$email.subject:="4D Write Pro HTML body" +$email.from:="YourEmail@gmail.com" +$email.to:="RecipientEmail@mail.com" + +$server:=New object +$server.host:="smtp.gmail.com" +$server.port:=465 +$server.user:="YourEmail@gmail.com" +$server.password:="XXXX" + +$transporter:=SMTP New transporter($server) +$status:=$transporter.send($email) +``` + + + + + +## MAIL Convert to MIME + +
          History +| Version | Changes | +| ------- | -------- | +| v17 R4 | Added | +| v17 R5 | Modified | +
          + +**MAIL Convert to MIME**( *mail* : Object { ; *options* : Object } ) : Text +| Parameter | Type | | Description | +| --------- | ------ |:--:| --------------------------------- | +| mail | Object | -> | Email object | +| options | Object | -> | Charset and encoding mail options | +| Result | Text | <- | Email object converted to MIME | + +#### Description + +The `MAIL Convert to MIME` command converts an email object into MIME text. This command is called internally by [SMTP_transporter.send( )](API/SMTPTransporterClass.md#send) to format the email object before sending it. It can be used to analyze the MIME format of the object. + +In *mail*, pass the content and the structure details of the email to convert. This includes information such as the email addresses (sender and recipient(s)), the message itself, and the type of display for the message. +> 4D follows the [JMAP specification](https://jmap.io/spec-mail.html) to format the email object. + +In *options*, you can set a specific charset and encoding configuration for the mail. The following properties are available: + +| Property | Type | Description | +| ------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| headerCharset | Text | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values:

          ConstantValueComment
          mail mode ISO2022JPUS-ASCII_ISO-2022-JP_UTF8_QP
          • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          mail mode ISO88591ISO-8859-1
          • headerCharset: ISO-8859-1 & Quoted-printable
          • bodyCharset: ISO-8859-1 & 8-bit
          mail mode UTF8US-ASCII_UTF8_QPheaderCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**)
          mail mode UTF8 in base64US-ASCII_UTF8_B64headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64
          | +| bodyCharset | Text | Charset and encoding used for the html and text body contents of the email. Possible values: Same as for headerCharset (see above) | + +If the *options* parameter is omitted, the mail mode UTF8 configuration is used for header and body parts. + + +#### Example + +```4d +C_OBJECT($mail) +C_TEXT($mime) +$mail:=New object + +// Creation of a mail +$mail.from:="tsales@massmarket.com" +$mail.subject:="Terrific Sale! This week only!" +$mail.textBody:="Text format email" +$mail.htmlBody:="HTML format email" +$mail.to:=New collection +$mail.to.push(New object ("email";"noreply@4d.com")) +$mail.to.push(New object ("email";"test@4d.com")) + +// transform the mail object in MIME +$mime:=[#current_title_incode]($mail) + +// Contents of $mime: +// MIME-Version: 1.0 +// Date: Thu, 11 Oct 2018 15:42:25 GMT +// Message-ID: <7CA5D25B2B5E0047A36F2E8CB30362E2> +// Sender: tsales@massmarket.com +// From: tsales@massmarket.com +// To: noreply@4d.com +// To: test@4d.com +// Content-Type: multipart/alternative; boundary="E0AE5773D5E95245BBBD80DD0687E218" +// Subject: Terrific Sale! This week only! +// +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/plain; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// Text format email +// --E0AE5773D5E95245BBBD80DD0687E218 +// Content-Type: text/html; charset="UTF-8" +// Content-Transfer-Encoding: quoted-printable +// +// HTML format email +// --E0AE5773D5E95245BBBD80DD0687E218-- +``` + + + diff --git a/website/translated_docs/pt/API/EntityClass.md b/website/translated_docs/pt/API/EntityClass.md new file mode 100644 index 00000000000000..0dae7710dd1293 --- /dev/null +++ b/website/translated_docs/pt/API/EntityClass.md @@ -0,0 +1,1618 @@ +--- +id: EntityClass +title: Entity +--- + +An [entity](ORDA/dsMapping.md#entity) is an instance of a [Dataclass](ORDA/dsMapping.md#dataclass), like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions. + + +### Summary + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [***.attributeName*** : any](#attributename)

              stores the attribute value for the entity | +| [**.clone()** : 4D.Entity](#clone)

              creates in memory a new entity referencing the same record as the original entity | +| [**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection](#diff)

              compares the contents of two entities and returns their differences | +| [**.drop**( {*mode* : Integer} ) : Object](#drop)

              deletes the data contained in the entity from the datastore | +| [**.first()**: 4D.Entity](#first)

              returns a reference to the entity in first position of the entity selection which the entity belongs to | +| [**.fromObject**( *filler* : Object )](#fromobject)

              fills an entity with the *filler* content | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

              returns the dataclass of the entity | +| [**.getKey**( { *mode* : Integer } ) : Text
          **.getKey**( { *mode* : Integer } ) : Integer](#getkey)

              returns the primary key value of the entity | +| [**.getSelection()**: 4D.EntitySelection](#getselection)

              returns the entity selection which the entity belongs to | +| [**.getStamp()** : Integer](#getstamp)

               returns the current value of the stamp of the entity | +| [**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer](#indexof)

              returns the position of the entity in an entity selection | +| [**.isNew()** : Boolean](#isnew)

               returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore | +| [**.last()** : 4D.Entity](#last)

              returns a reference to the entity in last position of the entity selection which the entity belongs to | +| [**.lock**( { *mode* : Integer } ) : Object](#lock)

              puts a pessimistic lock on the record referenced by the entity | +| [**.next()** : 4D.Entity](#next)

              returns a reference to the next entity in the entity selection which the entity belongs to | +| [**.previous()** : 4D.Entity](#previous)

               returns a reference to the previous entity in the entity selection which the entity belongs to | +| [**.reload()** : Object](#reload)

              reloads the content of the entity in memory | +| [**.save**( { *mode* : Integer } ) : Object](#save)

              saves the changes made to the entity | +| [**.toObject**() : Object
          **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
          **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object](#toobject)

              returns an object which has been built from the entity | +| [**.touched()** : Boolean](#touched)

              tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved | +| [**.touchedAttributes()** : Collection](#touchedattributes)

              returns the names of the attributes that have been modified since the entity was loaded into memory | +| [**.unlock()** : Object](#unlock)

              removes the pessimistic lock on the record matching the entity | + + + + + + +## .*attributeName* + +

          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +***.attributeName*** : any + +#### Description + +Any dataclass attribute is available as a property of an entity, which stores the attribute value for the entity. +> Dataclass attributes can also be reached using the alternate syntax with \[ ]. + +The attribute value type depends on the attribute [kind](DataClassAttributeClass.md#kind) (relation or storage): + +* If *attributeName* kind is **storage**: `.attributeName` returns a value of the same type as *attributeName*. +* If *attributeName* kind is **relatedEntity**: `.attributeName` returns the related entity. Values of the related entity are directly available through cascading properties, for example "myEntity.employer.employees\[0].lastname". +* If *attributeName* kind is **relatedEntities**: `.attributeName` returns a new entity selection of related entities. Duplications are removed (an unordered entity selection is returned). + + +#### Example + +```4d + var $myEntity : cs.EmployeeEntity + $myEntity:=ds.Employee.new() //Create a new entity + $myEntity.name:="Dupont" // assign 'Dupont' to the 'name' attribute + $myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute + $myEntity.save() //save the entity +``` + + + + + +## .clone() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + + +**.clone()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| --------------------------------- | +| Result | 4D.Entity | <- | New entity referencing the record | + + +#### Description + +The `.clone()` function creates in memory a new entity referencing the same record as the original entity. This function allows you to update entities separately. +> Keep in mind that any modifications done to entities will be saved in the referenced record only when the [`.save( )`](#save) function is executed. + +This function can only be used with entities already saved in the database. It cannot be called on a newly created entity (for which [`.isNew()`](#isnew) returns **True**). + + +#### Example + +```4d + var $emp; $empCloned : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $empCloned:=$emp.clone() + + $emp.lastName:="Smith" //Updates done on $emp are not done on $empCloned + +``` + + + + + + +## .diff() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +**.diff**( *entityToCompare* : 4D.Entity { ; *attributesToCompare* : Collection } ) : Collection + +| Parameter | Type | | Description | +| ------------------- | ---------- |:--:| ---------------------------------------------- | +| entityToCompare | 4D.Entity | -> | Entity to be compared with the original entity | +| attributesToCompare | Collection | -> | Name of attributes to be compared | +| Result | Collection | <- | Differences between the entities | + + +#### Description + +The `.diff()` function compares the contents of two entities and returns their differences. + +In *entityToCompare*, pass the entity to be compared to the original entity. + +In *attributesToCompare*, you can designate specific attributes to compare. If provided, the comparison is done only on the specified attributes. If not provided, all differences between the entities are returned. + +The differences are returned as a collection of objects whose properties are: + +| Property name | Type | Description | +| ------------- | ------------------------------- | ------------------------------------------- | +| attributeName | String | Name of the attribute | +| value | any - Depends on attribute type | Value of the attribute in the entity | +| otherValue | any - Depends on attribute type | Value of the attribute in *entityToCompare* | + +Only attributes with different values are included in the collection. If no differences are found, `.diff()` returns an empty collection. + +The function applies for properties whose [kind](DataClassAttributeClass.md#kind) is **storage** or **relatedEntity**. In case a related entity has been updated (meaning the foreign key), the name of the related entity and its primary key name are returned as *attributeName* properties (*value* and *otherValue* are empty for the related entity name). + +If one of the compared entities is **Null**, an error is raised. + +#### Example 1 + + +```4d + var $diff1; $diff2 : Collection + employee:=ds.Employee.query("ID=1001").first() + $clone:=employee.clone() + employee.firstName:="MARIE" + employee.lastName:="SOPHIE" + employee.salary:=500 + $diff1:=$clone.diff(employee) // All differences are returned + $diff2:=$clone.diff(employee;New collection"firstName";"lastName")) + // Only differences on firstName and lastName are returned +``` + +$diff1: + +```4d +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + }, + { + "attributeName": "salary", + "value": 66600, + "otherValue": 500 + } +] +$diff2: + +[ + { + "attributeName": "firstName", + "value": "Natasha", + "otherValue": "MARIE" + }, + { + "attributeName": "lastName", + "value": "Locke", + "otherValue": "SOPHIE" + } +] +``` + +#### Example 2 + +```4d + var vCompareResult1; vCompareResult2; vCompareResult3; $attributesToInspect : Collection + vCompareResult1:=New collection + vCompareResult2:=New collection + vCompareResult3:=New collection + $attributesToInspect:=New collection + + $e1:=ds.Employee.get(636) + $e2:=ds.Employee.get(636) + + $e1.firstName:=$e1.firstName+" update" + $e1.lastName:=$e1.lastName+" update" + + $c:=ds.Company.get(117) + $e1.employer:=$c + $e2.salary:=100 + + $attributesToInspect.push("firstName") + $attributesToInspect.push("lastName") + + vCompareResult1:=$e1.diff($e2) + vCompareResult2:=$e1.diff($e2;$attributesToInspect) + vCompareResult3:=$e1.diff($e2;$e1.touchedAttributes()) +``` + +vCompareResult1 (all differences are returned): + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "salary", + "value": 33500, + "otherValue": 100 + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + } +] +``` + +vCompareResult2 (only differences on $attributesToInspect are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + } +] +``` + +vCompareResult3 (only differences on $e1 touched attributes are returned) + +```4d +[ + { + "attributeName": "firstName", + "value": "Karla update", + "otherValue": "Karla" + }, + { + "attributeName": "lastName", + "value": "Marrero update", + "otherValue": "Marrero" + }, + { + "attributeName": "employerID", + "value": 117, + "otherValue": 118 + }, + { + "attributeName": "employer", + "value": "[object Entity]",// Entity 117 from Company + "otherValue": "[object Entity]"// Entity 118 from Company + + } +] +``` + + + + + +## .drop() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.drop**( {*mode* : Integer} ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------------------------------- | +| mode | Integer | -> | `dk force drop if stamp changed`: Forces the drop even if the stamp has changed | +| Result | Object | <- | Result of drop operation | + +#### Description + +The `.drop()` function deletes the data contained in the entity from the datastore, from the table related to its Dataclass. Note that the entity remains in memory. + +In a multi-user or multi-process application, the `.drop()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk force drop if stamp changed` option in the *mode* parameter: in this case, the entity is dropped even if the stamp has changed (and the primary key is still the same). + +**Result** + +The object returned by `.drop( )` contains the following properties: + +| Property | | Type | Description | +| ------------- | ------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | true if the drop action is successful, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(*) | | number | Error code, see below | +| statusText(*) | | text | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| LockKindText | | text | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | text | Session user name on the machine | +| | user4d_alias | text | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | text | Machine name | +| | task_name | text | Process name | +| | client_version | text | | +| | | | ***Available only in case of serious error (serious error can be trying to duplicate a primary key, disk full...):*** | +| errors | | collection of objects | | +| | message | text | Error message | +| | component signature | text | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Value | Comment | +| ----------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
        • the entity has been dropped (the stamp has changed and the memory space is now free)
        • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using entity.drop( ), this error can be returned when dk force drop if stamp changed option is used. When using entity.lock( ), this error can be returned when dk reload if stamp changed option is used
        • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.
          **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
          **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

        • with `.save( )`: error only if the `dk auto merge` option is not used
        • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
        • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used
        • **Associated statusText**: "Stamp has changed"
        • | + + +#### Example 1 + +Example without `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop() + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 2 + +Example with `dk force drop if stamp changed` option: + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $status : Object + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $status:=$employee.drop(dk force drop if stamp changed) + Case of + :($status.success) + ALERT("You have dropped "+$employee.firstName+" "+$employee.lastName) //The dropped entity remains in memory + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + + +## .first() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.first()**: 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| -------------------------------------------------------------------- | +| Result | 4D.Entity | <- | Reference to first entity of an entity selection (Null if not found) | + +#### Description + +The `.first()` function returns a reference to the entity in first position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $firstEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[2] + $firstEmployee:=$employee.first() //$firstEmployee is the first entity of the $employees entity selection +``` + + + + +## .fromObject() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.fromObject**( *filler* : Object ) +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------ | +| filler | Object | -> | Object from which to fill the entity | + +#### Description + +The `.fromObject()` function fills an entity with the *filler* content. +> This function modifies the original entity. + +The mapping between the object and the entity is done on the attribute names: + +* If a property of the object does not exist in the dataclass, it is ignored. +* Data types must be equivalent. If there is a type mismatch between the object and dataclass, 4D tries to convert the data whenever possible (see [`Converting data types`](Concepts/data-types.md#converting-data-types)), otherwise the attribute is left untouched. +* The primary key can be given as is or with a "__KEY" property (filled with the primary key value). If it does not already exist in the dataclass, the entity is created with the given value when [.save()](#save) is called. If the primary key is not given, the entity is created and the primary key value is assigned with respect to database rules. The auto-increment is only computed if the primary key is null. + +*filler* can handle a related entity under the following conditions: + +* *filler* contains the foreign key itself, or +* *filler* contains a property object with the same name as the related entity, containing a single property named "\_\_KEY". +* if the related entity does not exist, it is ignored. + +#### Example + +With the following $o object: + +```4d +{ + "firstName": "Mary", + "lastName": "Smith", + "salary": 36500, + "birthDate": "1958-10-27T00:00:00.000Z", + "woman": true, + "managerID": 411,// relatedEntity given with PK + "employerID": 20 // relatedEntity given with PK +} +``` + + +The following code will create an entity with manager and employer related entities. + + +```4d + var $o : Object + var $entity : cs.EmpEntity + $entity:=ds.Emp.new() + $entity.fromObject($o) + $entity.save() +``` + + +You could also use a related entity given as an object: + +```4d + +{ + "firstName": "Marie", + "lastName": "Lechat", + "salary": 68400, + "birthDate": "1971-09-03T00:00:00.000Z", + "woman": false, + "employer": {// relatedEntity given as an object + "__KEY": "21" + }, + "manager": {// relatedEntity given as an object + "__KEY": "411" + } +} +``` + + + + + + +## .getDataClass() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + +
          + +**.getDataClass()** : 4D.DataClass +| Parameter | Type | | Description | +| --------- | ------------ |:--:| -------------------------------------------- | +| Result | 4D.DataClass | <- | DataClass object to which the entity belongs | + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity. This function is useful when writing generic code. + + +#### Example + +The following generic code duplicates any entity: + +```4d + //duplicate_entity method + //duplicate_entity($entity) + + #DECLARE($entity : 4D.Entity) + var $entityNew : 4D.Entity + var $status : Object + + $entityNew:=$entity.getDataClass().new() //create a new entity in the parent dataclass + $entityNew.fromObject($entity.toObject()) //get all attributes + $entityNew[$entity.getDataClass().getInfo().primaryKey]:=Null //reset the primary key + $status:=$entityNew.save() //save the duplicated entity +``` + + + + + +## .getKey() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.getKey**( { *mode* : Integer } ) : Text
          **.getKey**( { *mode* : Integer } ) : Integer +| Parameter | Type | | Description | +| --------- | ------- |:--:| --------------------------------------------------------------------------------------- | +| mode | Integer | -> | `dk key as string`: primary key is returned as a string, no matter the primary key type | +| Result | Text | <- | Value of the text primary key of the entity | +| Result | Integer | <- | Value of the numeric primary key of the entity | + + +#### Description + +The `.getKey()` function returns the primary key value of the entity. + +Primary keys can be numbers (Integer) or strings. You can "force" the returned primary key value to be a string, no matter the actual primary key type, by passing the `dk key as string` option in the *mode* parameter. + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees[0] + ALERT("The primary key is "+$employee.getKey(dk key as string)) +``` + + + + + +## .getSelection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.getSelection()**: 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| ---------------------------------------------------------------- | +| Result | 4D.EntitySelection | <- | Entity selection to which the entity belongs (Null if not found) | + +#### Description + +The `.getSelection()` function returns the entity selection which the entity belongs to. + +If the entity does not belong to an entity selection, the function returns Null. + +#### Example + + +```4d + var $emp : cs.EmployeeEntity + var $employees; $employees2 : cs.EmployeeSelection + $emp:=ds.Employee.get(672) // This entity does not belong to any entity selection + $employees:=$emp.getSelection() // $employees is Null + + $employees2:=ds.Employee.query("lastName=:1";"Smith") //This entity selection contains 6 entities + $emp:=$employees2[0] // This entity belongs to an entity selection + + ALERT("The entity selection contains "+String($emp.getSelection().length)+" entities") +``` + + + + +## .getStamp() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.getStamp()** : Integer +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------- | +| Result | Integer | <- | Stamp of the entity (0 if entity has just been created) | + +#### Description + +The `.getStamp()` function returns the current value of the stamp of the entity. + +The internal stamp is automatically incremented by 4D each time the entity is saved. It manages concurrent user access and modifications to the same entities (see [**Entity locking**](ORDA/entities.md#entity-locking)). +> For a new entity (never saved), the function returns 0. To know if an entity has just been created, it is recommended to use [.isNew()](#isnew). + + +#### Example + + +```4d + var $entity : cs.EmployeeEntity + var $stamp : Integer + + $entity:=ds.Employee.new() + $entity.lastname:="Smith" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=1 + + $entity.lastname:="Wesson" + $entity.save() + $stamp:=$entity.getStamp() //$stamp=2 +``` + + + + + +## .indexOf() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.indexOf**( { *entitySelection* : 4D.EntitySelection } ) : Integer +| Parameter | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------ | +| entitySelection | 4D.EntitySelection | -> | Position of the entity is given according to this entity selection | +| Result | Integer | <- | Position of the entity in an entity selection | + +#### Description + +The `.indexOf()` function returns the position of the entity in an entity selection. + +By default if the *entitySelection* parameter is omitted, the function returns the entity's position within its own entity selection. Otherwise, it returns the position of the entity within the specified *entitySelection*. + +The resulting value is included between 0 and the length of the entity selection -1. + +* If the entity does not have an entity selection or does not belong to *entitySelection*, the function returns -1. +* If *entitySelection* is Null or does not belong to the same dataclass as the entity, an error is raised. + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] //This entity belongs to an entity selection + ALERT("The index of the entity in its own entity selection is "+String($employee.indexOf())) //1 + + $employee:=ds.Employee.get(725) //This entity does not belong to an entity selection + ALERT("The index of the entity is "+String($employee.indexOf())) // -1 +``` + + + + + +## .isNew() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.isNew()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------------------------- | +| Result | Boolean | <- | True if entity has just been created and not yet saved. Otherwise, False. | + +#### Description + +The `.isNew()` function returns True if the entity to which it is applied has just been created and has not yet been saved in the datastore. Otherwise, it returns False. + + +#### Example + + +```4d + var $emp : cs.EmployeeEntity + + $emp:=ds.Employee.new() + + If($emp.isNew()) + ALERT("This is a new entity") + End if +``` + + + + +## .last() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.last()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| ------------------------------------------------------------------- | +| Result | 4D.Entity | <- | Reference to last entity of an entity selection (Null if not found) | + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection( )](#getselection) returns Null), the function returns a Null value. + + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee; $lastEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $lastEmployee:=$employee.last() //$lastEmployee is the last entity of the $employees entity selection +``` + + + + +## .lock() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.lock**( { *mode* : Integer } ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| -------------------------------------------------------------------- | +| mode | Integer | -> | `dk reload if stamp changed`: Reload before locking if stamp changed | +| Result | Object | <- | Result of lock operation | + +#### Description + +The `.lock()` function puts a pessimistic lock on the record referenced by the entity. The [lock is set](ORDA/entities.md#entity-locking) for a record and all the references of the entity in the current process. + +Other processes will see this record as locked (the `result.success` property will contain False if they try to lock the same entity using this function). Only functions executed in the "locking" session are allowed to edit and save the attributes of the entity. The entity can be loaded as read-only by other sessions, but they will not be able to enter and save values. + +A locked record is unlocked: + +* when the [`unlock()`](#unlock) function is called on a matching entity in the same process +* automatically, when it is no longer referenced by any entities in memory. For example, if the lock is put only on one local reference of an entity, the entity is unlocked when the function ends. As long as there are references to the entity in memory, the record remains locked. + +By default, if the *mode* parameter is omitted, the function will return an error (see below) if the same entity was modified (i.e. the stamp has changed) by another process or user in the meantime. + +Otherwise, you can pass the `dk reload if stamp changed` option in the *mode* parameter: in this case, no error is returned and the entity is reloaded when the stamp has changed (if the entity still exists and the primary key is still the same). + +**Result** + +The object returned by `.lock( )` contains the following properties: + +| Property | | Type | Description | +| ---------------- | ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | true if the lock action is successful (or if the entity is already locked in the current process), false otherwise. | +| | | | ***Available only if `dk reload if stamp changed` option is used:*** | +| **wasReloaded** | | boolean | true if the entity was reloaded with success, false otherwise. | +| | | | ***Available only in case of error:*** | +| status(\*) | | number | Error code, see below | +| statusText(\*) | | text | Description of the error, see below | +| | | | ***Available only in case of pessimistic lock error:*** | +| lockKindText | | text | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process ID | +| | user_name | text | Session user name on the machine | +| | user4d_alias | text | Name or alias of the 4D user | +| | user4d_id | number | User id in the 4D database directory | +| | host_name | text | Machine name | +| | task_name | text | Process name | +| | client_version | text | | +| | | | ***Available only in case of serious error*** (primary key already exists, disk full...): | +| errors | | collection of objects | | +| | message | text | Error message | +| | component signature | text | internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + + +(\*) The following values can be returned in the *status* and *statusText* properties of the *Result* object in case of error: + +| Constant | Value | Comment | +| ----------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:
        • the entity has been dropped (the stamp has changed and the memory space is now free)
        • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when dk force drop if stamp changed option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

        • **Associated statusText**: "Entity does not exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

          **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

          **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

        • with `.save( )`: error only if the `dk auto merge` option is not used
        • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
        • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

        • **Associated statusText**: "Stamp has changed" | + + +#### Example 1 + +Example with error: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(716) + $status:=$employee.lock() + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + + +#### Example 2 + +Example with `dk reload if stamp changed` option: + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + $employee:=ds.Employee.get(717) + $status:=$employee.lock(dk reload if stamp changed) + Case of + :($status.success) + ALERT("You have locked "+$employee.firstName+" "+$employee.lastName) + :($status.status=dk status entity does not exist anymore) + ALERT($status.statusText) + End case +``` + + + + +## .next() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.next()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| -------------------------------------------------------------------- | +| Result | 4D.Entity | <- | Reference to next entity in the entity selection (Null if not found) | + +#### Description + +The `.next()` function returns a reference to the next entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid next entity in the entity selection (i.e. you are on the last entity of the selection), the function returns Null. If the next entity has been dropped, the function returns the next valid entity (and eventually Null). + + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $nextEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[0] + $nextEmployee:=$employee.next() //$nextEmployee is the second entity of the $employees entity selection + +``` + + + +## .previous() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.previous()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| ------------------------------------------------------------------------ | +| Result | 4D.Entity | <- | Reference to previous entity in the entity selection (Null if not found) | + +#### Description + +The `.previous()` function returns a reference to the previous entity in the entity selection which the entity belongs to. + +If the entity does not belong to any existing entity selection (i.e. [.getSelection()](#getselection) returns Null), the function returns a Null value. + +If there is no valid previous entity in the entity selection (i.e. you are on the first entity of the selection), the function returns Null. If the previous entity has been dropped, the function returns the previous valid entity (and eventually Null). + + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee; $previousEmployee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") //This entity selection contains 3 entities + $employee:=$employees[1] + $previousEmployee:=$employee.previous() //$previousEmployee is the first entity of the $employees entity selection +``` + + + + +## .reload( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.reload()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------- | +| Result | Object | <- | Status object | + +#### Description + +The `.reload()` function reloads the content of the entity in memory, according to information stored in the table related to the dataclass in the datastore. The reload is done only if the entity still exists with the same primary key. + +**Result** + +The object returned by `.reload( )` contains the following properties: + +| Property | Type | Description | +| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | boolean | True if the reload action is successful, False otherwise.

          ***Available only in case of error***: | +| status(\*) | number | Error code, see below | +| statusText(\*) | text | Description of the error, see below | + +(\*) The following values can be returned in the *status* and *statusText* properties of *Result* object in case of error: + +| Constant | Value | Comment | +| ----------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

        • the entity has been dropped (the stamp has changed and the memory space is now free)
        • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

        • ***Associated statusText***: "Entity does not exist anymore" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.
          ***Associated statusText***: "Other error" | + + +#### Example + +```4d + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + var $result : Object + + $employees:=ds.Employee.query("lastName=:1";"Hollis") + $employee:=$employees[0] + $employee.firstName:="Mary" + $result:=$employee.reload() + Case of + :($result.success) + ALERT("Reload has been done") + :($result.status=dk status entity does not exist anymore) + ALERT("The entity has been dropped") + End case +``` + + + +## .save() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.save**( { *mode* : Integer } ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------- | +| mode | Integer | -> | `dk auto merge`: Enables the automatic merge mode | +| Result | Object | <- | Result of save operation | + +#### Description + +The `.save()` function saves the changes made to the entity in the table related to its dataClass. You must call this method after creating or modifying an entity if you want to save the changes made to it. + +The save operation is executed only if at least one entity attribute has been "touched" (see the [`.touched()`](#touched) and [`.touchedAttributes()`](#touchedattributes) functions). Otherwise, the function does nothing (the trigger is not called). + +In a multi-user or multi-process application, the `.save()` function is executed under an ["optimistic lock"](ORDA/entities.md#entity-locking) mechanism, wherein an internal locking stamp is automatically incremented each time the record is saved. + +By default, if the *mode* parameter is omitted, the method will return an error (see below) whenever the same entity has been modified by another process or user in the meantime, no matter the modified attribute(s). + +Otherwise, you can pass the `dk auto merge` option in the *mode* parameter: when the automatic merge mode is enabled, a modification done concurrently by another process/user on the same entity but on a different attribute will not result in an error. The resulting data saved in the entity will be the combination (the "merge") of all non-concurrent modifications (if modifications were applied to the same attribute, the save fails and an error is returned, even with the auto merge mode). +> The automatic merge mode is not available for attributes of Picture, Object, and Text type when stored outside of the record. Concurrent changes in these attributes will result in a `dk status stamp has changed` error. + +**Result** + +The object returned by `.save()` contains the following properties: + +| Property | | Type | Description | +| ------------ | ------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| success | | boolean | True if the save action is successful, False otherwise. | +| | | | ***Available only if `dk auto merge` option is used***: | +| autoMerged | | boolean | True if an auto merge was done, False otherwise. | +| | | | ***Available only in case of error***: | +| status | | number | Error code, [see below](#status-and-statustext) | +| statusText | | text | Description of the error, [see below](#status-and-statustext) | +| | | | ***Available only in case of pessimistic lock error***: | +| lockKindText | | text | "Locked by record" | +| lockInfo | | object | Information about the lock origin | +| | task_id | number | Process id | +| | user_name | text | Session user name on the machine | +| | user4d_alias | text | User alias if defined by `SET USER ALIAS`, otherwise user name in the 4D directory | +| | host_name | text | Machine name | +| | task_name | text | Process name | +| | client_version | text | | +| | | | ***Available only in case of serious error*** (serious error - can be trying to duplicate a primary key, disk full...): | +| errors | | collection of objects | | +| | message | text | Error message | +| | componentSignature | text | Internal component signature (e.g. "dmbg" stands for the database component) | +| | errCode | number | Error code | + +##### status and statusText + +The following values can be returned in the `status` and `statusText` properties of Result object in case of error: + +| Constant | Value | Comment | +| ----------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dk status automerge failed` | 6 | (Only if the `dk auto merge` option is used) The automatic merge option failed when saving the entity.

          **Associated statusText**: "Auto merge failed" | +| `dk status entity does not exist anymore` | 5 | The entity no longer exists in the data. This error can occur in the following cases:

        • the entity has been dropped (the stamp has changed and the memory space is now free)
        • the entity has been dropped and replaced by another one with another primary key (the stamp has changed and a new entity now uses the memory space). When using `.drop( )`, this error can be returned when `dk force drop if stamp changed` option is used. When using `.lock( )`, this error can be returned when `dk reload if stamp changed` option is used

        • **Associated statusText**: "Entity doesnot exist anymore" | +| `dk status locked` | 3 | The entity is locked by a pessimistic lock.

          **Associated statusText**: "Already locked" | +| `dk status serious error` | 4 | A serious error is a low-level database error (e.g. duplicated key), a hardware error, etc.

          **Associated statusText**: "Other error" | +| `dk status stamp has changed` | 2 | The internal stamp value of the entity does not match the one of the entity stored in the data (optimistic lock).

        • with `.save( )`: error only if the `dk auto merge` option is not used
        • with `.drop( )`: error only if the `dk force drop if stamp changed` option is not used
        • with `.lock( )`: error only if the `dk reload if stamp changed` option is not used

        • **Associated statusText**: "Stamp has changed" | + + +#### Example 1 + +Creating a new entity: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + $employee:=ds.Employee.new() + $employee.firstName:="Mary" + $employee.lastName:="Smith" + $status:=$employee.save() + If($status.success) + ALERT("Employee created") + End if +``` + +#### Example 2 + +Updating an entity without `dk auto merge` option: + +```4d + var $status : Object + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save() + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status stamp has changed) + ALERT($status.statusText) + End case +``` + +#### Example 3 + +Updating an entity with `dk auto merge` option: + +```4d + var $status : Object + + var $employee : cs.EmployeeEntity + var $employees : cs.EmployeeSelection + + $employees:=ds.Employee.query("lastName=:1";"Smith") + $employee:=$employees.first() + $employee.lastName:="Mac Arthur" + $status:=$employee.save(dk auto merge) + Case of + :($status.success) + ALERT("Employee updated") + :($status.status=dk status automerge failed) + ALERT($status.statusText) + End case +``` + + + + +## .toObject() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.toObject**() : Object
          **.toObject**( *filterString* : Text { ; *options* : Integer} ) : Object
          **.toObject**( *filterCol* : Collection { ; *options* : Integer } ) : Object +| Parameter | Type | | Description | +| ------------ | ---------- |:--:| ------------------------------------------------------------------------------------------------------- | +| filterString | Text | -> | Attribute(s) to extract (comma-separated string) | +| filterCol | Collection | -> | Collection of attribute(s) to extract | +| options | Integer | -> | `dk with primary key`: adds the \_KEY property;
          `dk with stamp`: adds the \_STAMP property | +| Result | Object | <- | Object built from the entity | + +#### Description + +The `.toObject()` function returns an object which has been built from the entity. Property names in the object match attribute names of the entity. + +If no filter is specified, or if the *filterString* parameter contains an empty string or "*", the returned object will contain: + +* all storage entity attributes +* attributes of the `relatedEntity` [kind](DataClassAttributeClass.md#kind): you get a property with the same name as the related entity (name of the many-to-one link). Attribute is extracted with the simple form. +* attributes of the `relatedEntities` [kind](DataClassAttributeClass.md#kind): attribute is not returned. + + +In the first parameter, you pass the entity attribute(s) to extract. You can pass: + +* *filterString*: a string with property paths separated with commas: "propertyPath1, propertyPath2, ...", or +* *filterCol*: a collection of strings: \["propertyPath1","propertyPath2";...] + +If a filter is specified for attributes of the relatedEntity [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntity" -> it is extracted with simple form: an object with property \_\_KEY (primary key). +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1; relatedEntity.propertyName2; ..." -> only those properties are extracted + +If a filter is specified for attributes of the relatedEntities [kind](DataClassAttributeClass.md#kind): + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1; relatedEntities.propertyName2; ..." -> only those properties are extracted + +In the *options* parameter, you can pass the `dk with primary key` and/or`dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + + +#### Example 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Without filter parameter: + +```4d +employeeObject:=employeeSelected.toObject() +``` + +Returns: + +```4d +{ + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { // relatedEntity extracted with simple form + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + + + +#### Example 2 + +Extracting the primary key and the stamp: + +```4d +employeeObject:=employeeSelected.toObject("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +{ + "__KEY": 413, + "__STAMP": 1, + "ID": 413, + "firstName": "Greg", + "lastName": "Wahl", + "salary": 0, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } +} +``` + +#### Example 3 + +Expanding all the properties of `relatedEntities`: + +```4d +employeeObject:=employeeSelected.toObject("directReports.*") +``` + +```4d +{ + "directReports": [ + { + "ID": 418, + "firstName": "Lorena", + "lastName": "Boothe", + "salary": 44800, + "birthDate": "1970-10-02T00:00:00.000Z", + "woman": true, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 419, + "firstName": "Drew", + "lastName": "Caudill", + "salary": 41000, + "birthDate": "2030-01-12T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + }, + { + "ID": 420, + "firstName": "Nathan", + "lastName": "Gomes", + "salary": 46300, + "birthDate": "2010-05-29T00:00:00.000Z", + "woman": false, + "managerID": 413, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 413 + } + } + ] +} +``` + +#### Example 4 + +Extracting some properties of `relatedEntities`: + +```4d + employeeObject:=employeeSelected.toObject("firstName, directReports.lastName") +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "directReports": [ + { + "lastName": "Boothe" + }, + { + "lastName": "Caudill" + }, + { + "lastName": "Gomes" + } + ] +} +``` + +#### Example 5 + +Extracting a `relatedEntity` with simple form: + +```4d + $coll:=New collection("firstName";"employer") + employeeObject:=employeeSelected.toObject($coll) +``` + +Returns: + +```4d +{ + "firstName": "Greg", + "employer": { + "__KEY": 20 + } +} +``` + +#### Example 6 + +Extracting all the properties of a `relatedEntity`: + +```4d + employeeObject:=employeeSelected.toObject("employer.*") +``` + +Returns: + +```4d +{ + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } +} +``` + +#### Example 7 + +Extracting some properties of a `relatedEntity`: + +```4d + $col:=New collection + $col.push("employer.name") + $col.push("employer.revenues") + employeeObject:=employeeSelected.toObject($col) +``` + +Returns: + +```4d +{ + "employer": { + "name": "India Astral Secretary", + "revenues": 12000000 + } +} +``` + + + + +## .touched( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.touched()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------------------------------------------- | +| Result | Boolean | <- | True if at least one entity attribute has been modified and not yet saved, else False | + +#### Description + +The `.touched()` function tests whether or not an entity attribute has been modified since the entity was loaded into memory or saved. + +If an attribute has been modified or calculated, the function returns True, else it returns False. You can use this function to determine if you need to save the entity. + +This function returns False for a new entity that has just been created (with [`.new( )`](DataClassClass.md#new)). Note however that if you use a function which calculates an attribute of the entity, the `.touched()` function will then return True. For example, if you call [`.getKey()`](#getkey) to calculate the primary key, `.touched()` returns True. + +#### Example + +In this example, we check to see if it is necessary to save the entity: + +```4d + var $emp : cs.EmployeeEntity + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + + If($emp.touched()) //if at least one of the attributes has been changed + $emp.save() + End if // otherwise, no need to save the entity +``` + + + +## .touchedAttributes( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.touchedAttributes()** : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------------------------ | +| Result | Collection | <- | Names of touched attributes, or empty collection | + +#### Description + +The `.touchedAttributes()` function returns the names of the attributes that have been modified since the entity was loaded into memory. + +This applies for attributes of the [kind](DataClassAttributeClass.md#kind) `storage` or `relatedEntity`. + +In the case of a related entity having been touched (i.e., the foreign key), the name of the related entity and its primary key's name are returned. + +If no entity attribute has been touched, the method returns an empty collection. + +#### Example 1 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + + $touchedAttributes:=New collection + $emp:=ds.Employee.get(725) + $emp.firstName:=$emp.firstName //Even if updated with the same value, the attribute is marked as touched + $emp.lastName:="Martin" + $touchedAttributes:=$emp.touchedAttributes() + //$touchedAttributes: ["firstName","lastName"] +``` + + +#### Example 2 + + +```4d + var $touchedAttributes : Collection + var $emp : cs.EmployeeEntity + var $company : cs.CompanyEntity + + $touchedAttributes:=New collection + + $emp:=ds.Employee.get(672) + $emp.firstName:=$emp.firstName + $emp.lastName:="Martin" + + $company:=ds.Company.get(121) + $emp.employer:=$company + + $touchedAttributes:=$emp.touchedAttributes() + + //collection $touchedAttributes: ["firstName","lastName","employer","employerID"] +``` + +In this case: + +* firstName and lastName have a `storage` kind +* employer has a `relatedEntity` kind +* employerID is the foreign key of the employer related entity + + + +## .unlock() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.unlock()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------- | +| Result | Object | <- | Status object | + +#### Description + +The `.unlock()` function removes the pessimistic lock on the record matching the entity in the datastore and table related to its dataclass. + +> For more information, please refer to [Entity locking](ORDA/entities.md#entity-locking) section. + +A record is automatically unlocked when it is no longer referenced by any entities in the locking process (for example: if the lock is put only on one local reference of an entity, the entity and thus the record is unlocked when the process ends). +> When a record is locked, it must be unlocked from the locking process and on the entity reference which put the lock. For example: + +```4d + $e1:=ds.Emp.all()[0] + $e2:=ds.Emp.all()[0] + $res:=$e1.lock() //$res.success=true + $res:=$e2.unlock() //$res.success=false + $res:=$e1.unlock() //$res.success=true +``` + +**Result** + +The object returned by `.unlock()` contains the following property: + +| Property | Type | Description | +| -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| success | Boolean | True if the unlock action is successful, False otherwise. If the unlock is done on a dropped entity, on a non locked record, or on a record locked by another process or entity, success is False. | + +#### Example + +```4d + var $employee : cs.EmployeeEntity + var $status : Object + + $employee:=ds.Employee.get(725) + $status:=$employee.lock() + ... //processing + $status:=$employee.unlock() + If($status.success) + ALERT("The entity is now unlocked") + End if +``` + + + + + diff --git a/website/translated_docs/pt/API/EntitySelectionClass.md b/website/translated_docs/pt/API/EntitySelectionClass.md new file mode 100644 index 00000000000000..69ea66d3900d27 --- /dev/null +++ b/website/translated_docs/pt/API/EntitySelectionClass.md @@ -0,0 +1,2219 @@ +--- +id: EntitySelectionClass +title: EntitySelection +--- + + +An entity selection is an object containing one or more reference(s) to [entities](ORDA/dsMapping.md#entity) belonging to the same [Dataclass](ORDA/dsMapping.md#dataclass). An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Entity selections can be created from existing selections using various functions of the [`DataClass` class](DataClassClass.md) such as [`.all()`](DataClassClass.md#all) or [`.query()`](DataClassClass.md#query), or functions of the `EntityClass` class itself, such as [`.and()`](#and) or [`orderBy()`](#orderby). You can also create blank entity selections using the [`dataClass.newSelection()`](DataClassClass.md#newselection) function or the [`Create new selection`](#create-new-selection) command. + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [***[index]*** : 4D.Entity](#91index93)

              allows you to access entities within the entity selection using the standard collection syntax | +| [***.attributeName*** : Collection
          ***.attributeName*** : 4D.EntitySelection](#attributename)

              a "projection" of values for the attribute in the entity selection | +| [**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection](#add)

              adds the specified *entity* to the entity selection and returns the modified entity selection | +| [**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#and)

              combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator | +| [**.average**( *attributePath* : Text ) : Real](#average)

              returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection | +| [**.contains**( *entity* : 4D.Entity ) : Boolean](#contains)

              returns true if entity reference belongs to the entity selection | +| [**.count**( *attributePath* : Text ) : Real](#count)

              returns the number of entities in the entity selection with a non-null value in *attributePath* | +| [**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection](#distinct)

              returns a collection containing only distinct (different) values from the *attributePath* in the entity selection | +| [**.drop**( { *mode* : Integer } ) : 4D.EntitySelection](#drop)

              removes the entities belonging to the entity selection from the table related to its dataclass within the datastore | +| [**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
          **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection](#extract)

              returns a collection containing *attributePath* values extracted from the entity selection | +| [**.first()** : 4D.Entity](#first)

              returns a reference to the entity in the first position of the entity selection | +| [**.getDataClass()** : 4D.DataClass](#getdataclass)

              returns the dataclass of the entity selection | +| [**.isAlterable()** : Boolean](#isalterable)

              returns True if the entity selection is alterable | +| [**.isOrdered()** : Boolean](#isordered)

              returns True if the entity selection is ordered | +| [**.last()** : 4D.Entity](#last)

              returns a reference to the entity in last position of the entity selection | +| [**.length** : Integer](#length)

              returns the number of entities in the entity selection | +| [**.max**( *attributePath* : Text ) : any](#max)

              returns the highest (or maximum) value among all the values of *attributePath* in the entity selection | +| [**.min**( *attributePath* : Text ) : any](#min)

               returns the lowest (or minimum) value among all the values of attributePath in the entity selection | +| [**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#minus)

              excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection | +| [**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection](#or)

              combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator | +| [**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
          **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection](#orderby)

              returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria | +| [**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
          **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection](#orderbyformula)

              returns a new, ordered entity selection | +| [**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
          **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection](#query)

              searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection | +| [**.queryPath** : Text](#querypath)

              contains a detailed description of the query as it was actually performed by 4D | +| [**.queryPlan** : Text](#queryplan)

               contains a detailed description of the query just before it is executed (i.e., the planned query) | +| [**.refresh()**](#refresh)

              immediately "invalidates" the entity selection data in the local ORDA cache | +| [**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object](#selected)

              returns an object describing the position(s) of *selectedEntities* in the original entity selection | +| [**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection](#slice)

              returns a portion of an entity selection into a new entity selection | +| [**.sum**( *attributePath* : Text ) : Real](#sum)

              returns the sum for all *attributePath* values in the entity selection | +| [**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
          **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
          **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*](#tocollection)

              creates and returns a collection where each element is an object containing a set of properties and values | + + + +## Create entity selection + +**Create entity selection** ( *dsTable* : Table { ; *settings* : Object } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| ------------------------------------------------------------------------------------------- | +| dsTable | Table | -> | Table in the 4D database whose current selection will be used to build the entity selection | +| settings | Object | -> | Build option: context | +| Result | 4D.EntitySelection | <- | Entity selection matching the dataclass related to the given table | + + +#### Description + +The `Create entity selection` command builds and returns a new, [alterable](ORDA/entities.md#shareable-or-alterable-entity-selections) entity selection related to the dataclass matching the given *dsTable*, according to the current selection of this table. + +If the current selection is sorted, an [ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) entity selection is created (the order of the current selection is kept). If the current selection is unsorted, an unordered entity selection is created. + +If the *dsTable* is not exposed in [`ds`](API/DataStoreClass.md#ds), an error is returned. This command cannot be used with a Remote datastore. + +In the optional *settings* parameter, you can pass an object containing the following property: + +| Property | Type | Description | +| -------- | ---- | ----------------------------------------------------------------------------------------------------------------- | +| context | Text | Label for the [optimization context](ORDA/entities.md#clientserver-optimization) applied to the entity selection. | + + +#### Example + +```4d +var $employees : cs.EmployeeSelection +ALL RECORDS([Employee]) +$employees:=Create entity selection([Employee]) +// The $employees entity selection now contains a set of reference +// on all entities related to the Employee dataclass +``` + +#### See also + +[`dataClass.newSelection()`](DataClassClass.md#newselection) + +## [*index*] + +

          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +***[index]*** : 4D.Entity + +#### Description + +The `EntitySelection[index]` notation allows you to access entities within the entity selection using the standard collection syntax: pass the position of the entity you want to get in the *index* parameter. + +Note that the corresponding entity is reloaded from the datastore. + +*index* can be any number between 0 and `.length`-1. + +* If *index* is out of range, an error is returned. +* If *index* corresponds to a dropped entity, a Null value is returned. +> **Warning**: `EntitySelection[index]` is a non assignable expression, which means that it cannot be used as en editable entity reference with methods like [`.lock()`](EntityClass.md#lock) or [`.save()`](EntityClass.md#save). To work with the corresponding entity, you need to assign the returned expression to an assignable expression, such as a variable. Examples: + +```4d + $sel:=ds.Employee.all() //create the entity selection + //invalid statements: + $result:=$sel[0].lock() //will NOT work + $sel[0].lastName:="Smith" //will NOT work + $result:=$sel[0].save() //will NOT work + //valid code: + $entity:=$sel[0] //OK + $entity.lastName:="Smith" //OK + $entity.save() //OK +``` + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + $employee:=$employees[2] // The 3rd entity of the $employees entity selection is reloaded from the database +``` + + + + + +## .*attributeName* + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +***.attributeName*** : Collection
          ***.attributeName*** : 4D.EntitySelection + +#### Description + +Any dataclass attribute can be used as a property of an entity selection to return a "projection" of values for the attribute in the entity selection. Projected values can be a collection or a new entity selection, depending on the [kind](DataClassAttributeClass.md#kind) (`storage` or `relation`) of the attribute. + +* If *attributeName* kind is `storage`: `.attributeName` returns a collection of values of the same type as *attributeName*. +* If *attributeName* kind is `relatedEntity`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). +* If *attributeName* kind is `relatedEntities`: `.attributeName` returns a new entity selection of related values of the same type as *attributeName*. Duplications are removed (an unordered entity selection is returned). + + +When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. In this case, if no entities are returned, the result is an empty entity selection. + +If the attribute does not exist in the entity selection, an error is returned. + + + + + + +#### Example 1 + +Projection of storage values: + + +```4d + var $firstNames : Collection + $entitySelection:=ds.Employee.all() + $firstNames:=$entitySelection.firstName // firstName type is string +``` + +The resulting collection is a collection of strings, for example: + +```4d +[ + "Joanna", + "Alexandra", + "Rick" +] +``` + +#### Example 2 + +Projection of related entity: + +```4d + var $es; $entitySelection : cs.EmployeeSelection + $entitySelection:=ds.Employee.all() + $es:=$entitySelection.employer // employer is related to a Company dataClass +``` + +The resulting object is an entity selection of Company with duplications removed (if any). + +#### Example 3 + +Projection of related entities: + +```4d + var $es : cs.EmployeeSelection + $es:=ds.Employee.all().directReports // directReports is related to Employee dataclass +``` + +The resulting object is an entity selection of Employee with duplications removed (if any). + + + + + +## .add() + +
          History +| Version | Changes | +| ------- | ----------------------------------------- | +| v18 R5 | Only supports alterable entity selections | +| v17 | Added | +
          + + +**.add**( *entity* : 4D.Entity ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------- | +| entity | 4D.Entity | -> | Entity to be added to the entity selection | +| Result | 4D.EntitySelection | -> | Entity selection including the added *entity* | + + +#### Description + +The `.add()` function adds the specified *entity* to the entity selection and returns the modified entity selection. +> This function modifies the original entity selection. + +**Warning:** The entity selection must be *alterable*, i.e. it has been created for example by [`.newSelection()`](DataClassClass.md#newselection) or `Create entity selection`, otherwise `.add()` will return an error. Shareable entity selections do not accept the addition of entities. For more information, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + + +* If the entity selection is ordered, *entity* is added at the end of the selection. If a reference to the same entity already belongs to the entity selection, it is duplicated and a new reference is added. +* If the entity selection is unordered, *entity* is added anywhere in the selection, with no specific order. +> For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +The modified entity selection is returned by the function, so that function calls can be chained. + +An error occurs if *entity* and the entity selection are not related to the same Dataclass. If *entity* is Null, no error is raised. + +#### Example 1 + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"S@") + $employee:=ds.Employee.new() + $employee.lastName:="Smith" + $employee.save() + $employees.add($employee) //The $employee entity is added to the $employees entity selection +``` + +#### Example 2 + +Calls to the function can be chained: + +```4d + var $sel : cs.ProductSelection + var $p1;$p2;$p3 : cs.ProductEntity + + $p1:=ds.Product.get(10) + $p2:=ds.Product.get(11) + $p3:=ds.Product.get(12) + $sel:=ds.Product.query("ID > 50") + $sel:=$sel.add($p1).add($p2).add($p3) +``` + + + +## .and() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | +
          + +**.and**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.and**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection + +| Parameter | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Result | 4D.EntitySelection | <- | New entity selection with the result of intersection with logical AND operator | + + +#### Description + +The `.and()` function combines the entity selection with an *entity* or *entitySelection* parameter using the logical AND operator; it returns a new, unordered entity selection that contains only the entities that are referenced in both the entity selection and the parameter. + +* If you pass *entity* as parameter, you combine this entity with the entity selection. If the entity belongs to the entity selection, a new entity selection containing only the entity is returned. Otherwise, an empty entity selection is returned. +* If you pass *entitySelection* as parameter, you combine both entity selections. A new entity selection that contains only the entities that are referenced in both selections is returned. If there is no intersecting entity, an empty entity selection is returned. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or the *entitySelection* parameter is empty, or if the *entity* is Null, an empty entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") + //The $employees entity selection contains the entity + //with primary key 710 and other entities + //for ex. "Colin Hetrick" / "Grady Harness" / "Sherlock Holmes" (primary key 710) + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.and($employee) //$result is an entity selection containing + //only the entity with primary key 710 ("Sherlock Holmes") +``` + + +#### Example 2 + +We want to have a selection of employees named "Jones" who live in New York: + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2) +``` + + + +## .average() + +
          History +| Version | Changes | +| ------- | ------------------------------------------- | +| v18 R6 | Returns undefined if empty entity selection | +| v17 | Added | + +
          + +**.average**( *attributePath* : Text ) : Real +| Parameter | Type | | Description | +| ------------- | ---- |:--:| ------------------------------------------------------------------------------------------ | +| attributePath | Text | -> | Attribute path to be used for calculation | +| Result | Real | <- | Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection) | + +#### Description + +The `.average()` function returns the arithmetic mean (average) of all the non-null values of *attributePath* in the entity selection. + +Pass in the *attributePath* parameter the attribute path to evaluate. + +Only numerical values are taken into account for the calculation. Note however that, if the *attributePath* of the entity selection contains mixed value types, `.average()` takes all scalar elements into account to calculate the average value. +> Date values are converted to numerical values (seconds) and used to calculate the average. + +`.average()` returns **undefined** if the entity selection is empty or *attributePath* does not contain numerical values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Example + +We want to obtain a list of employees whose salary is higher than the average salary: + +```4d + var $averageSalary : Real + var $moreThanAv : cs.EmployeeSelection + $averageSalary:=ds.Employee.all().average("salary") + $moreThanAv:=ds.Employee.query("salary > :1";$averageSalary) +``` + + + + +## .contains() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.contains**( *entity* : 4D.Entity ) : Boolean +| Parameter | Type | | Description | +| --------- | --------- |:--:| -------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to evaluate | +| Result | Boolean | <- | True if the entity belongs to the entity selection, else False | + +#### Description + +The `.contains()` function returns true if entity reference belongs to the entity selection, and false otherwise. + +In *entity*, specify the entity to search for in the entity selection. If entity is Null, the function will return false. + +If *entity* and the entity selection do not belong to the same dataclass, an error is raised. + +#### Example + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName=:1";"H@") + $employee:=ds.Employee.get(610) + + If($employees.contains($employee)) + ALERT("The entity with primary key 610 has a last name beginning with H") + Else + ALERT("The entity with primary key 610 does not have a last name beginning with H") + End if +``` + + + + +## .count() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.count**( *attributePath* : Text ) : Real +| Parameter | Type | | Description | +| ------------- | ---- |:--:| ----------------------------------------------------------------- | +| attributePath | Text | -> | Path of the attribute to be used for calculation | +| Result | Real | <- | Number of non null *attributePath* values in the entity selection | + +#### Description + +The `.count()` function returns the number of entities in the entity selection with a non-null value in *attributePath*. +> Only scalar values are taken into account. Object or collection type values are considered as null values. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Example + +We want to find out the total number of employees for a company without counting any whose job title has not been specified: + +```4d + var $sel : cs.EmployeeSelection + var $count : Real + + $sel:=ds.Employee.query("employer = :1";"Acme, Inc") + $count:=$sel.count("jobtitle") +``` + + + +## .copy() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | + +
          + +**.copy**( { *option* : Integer } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| ------------------------------------------------ | +| option | Integer | -> | `ck shared`: return a shareable entity selection | +| Result | 4D.EntitySelection | <- | Copy of the entity selection | + +#### Description + +The `.copy()` function returns a copy of the original entity selection. + +> This function does not modify the original entity selection. + +By default, if the *option* parameter is omitted, the function returns a new, alterable entity selection (even if the function is applied to a shareable entity selection). Pass the `ck shared` constant in the *option* parameter if you want to create a shareable entity selection. + +> For information on the shareable property of entity selections, please refer to the [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections) section. + +#### Example + +You create a new, empty entity selection of products when the form is loaded: + +```4d + Case of + :(Form event code=On Load) + Form.products:=ds.Products.newSelection() + End case + +``` + +Then this entity selection is updated with products and you want to share the products between several processes. You copy the Form.products entity selection as a shareable one: + +```4d + ... + // The Form.products entity selection is updated + Form.products.add(Form.selectedProduct) + + Use(Storage) + If(Storage.products=Null) + Storage.products:=New shared object() + End if + + Use(Storage.products) + Storage.products:=Form.products.copy(ck shared) + End use + End use +``` + + + +## .distinct() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.distinct**( *attributePath* : Text { ; *option* : Integer } ) : Collection +| Parameter | Type | | Description | +| ------------- | ---------- |:--:| ---------------------------------------------------------------- | +| attributePath | Text | -> | Path of attribute whose distinct values you want to get | +| option | Integer | -> | `dk diacritical`: diacritical evaluation ("A" # "a" for example) | +| Result | Collection | <- | Collection with only distinct values | + +#### Description + +The `.distinct()` function returns a collection containing only distinct (different) values from the *attributePath* in the entity selection. + +The returned collection is automatically sorted. **Null** values are not returned. + +In the *attributePath* parameter, pass the entity attribute whose distinct values you want to get. Only scalar values (text, number, boolean, or date) can be handled. If the *attributePath* leads to an object property that contains values of different types, they are first grouped by type and sorted afterwards. Types are returned in the following order: + +1. booleans +2. strings +3. numbers +4. dates + +You can use the `[]` notation to designate a collection when *attributePath* is a path within an object (see examples). + +By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the `dk diacritical` constant in the *option* parameter. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + +#### Examples + +You want to get a collection containing a single element per country name: + +```4d + var $countries : Collection + $countries:=ds.Employee.all().distinct("address.country") +``` + +`nicknames` is a collection and `extra` is an object attribute: + +```4d +$values:=ds.Employee.all().distinct("extra.nicknames[].first") +``` + + + + +## .drop() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.drop**( { *mode* : Integer } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| ------------------------------------------------------------------------------------------------ | +| mode | Integer | -> | `dk stop dropping on first error`: stops method execution on first non-droppable entity | +| Result | 4D.EntitySelection | <- | Empty entity selection if successful, else entity selection containing non-droppable entity(ies) | + +#### Description + +The `.drop()` function removes the entities belonging to the entity selection from the table related to its dataclass within the datastore. The entity selection remains in memory. +> Removing entities is permanent and cannot be undone. It is recommended to call this action in a transaction in order to have a rollback option. + +If a locked entity is encountered during the execution of `.drop()`, it is not removed. By default, the method processes all entities of the entity selection and returns non-droppable entities in the entity selection. If you want the method to stop execution at the first encountered non-droppable entity, pass the `dk stop dropping on first error` constant in the *mode* parameter. + +#### Example + +Example without the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop() // $notDropped is an entity selection containing all the not dropped entities + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + +Example with the `dk stop dropping on first error` option: + +```4d + var $employees; $notDropped : cs.EmployeeSelection + $employees:=ds.Employee.query("firstName=:1";"S@") + $notDropped:=$employees.drop(dk stop dropping on first error) //$notDropped is an entity selection containing the first not dropped entity + If($notDropped.length=0) //The delete action is successful, all the entities have been deleted + ALERT("You have dropped "+String($employees.length)+" employees") //The dropped entity selection remains in memory + Else + ALERT("Problem during drop, try later") + End if +``` + + + + + +## .extract() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
          + + +**.extract**( *attributePath* : Text { ; *option* : Integer } ) : Collection
          **.extract**( *attributePath* { ; *targetPath* } { ; *...attributePathN* : Text ; *targetPathN* : Text } ) : Collection + +| Parameter | Type | | Description | +| ------------- | ---------- |:--:| --------------------------------------------------------------------------------------- | +| attributePath | Text | -> | Attribute path whose values must be extracted to the new collection | +| targetPath | Text | -> | Target attribute path or attribute name | +| option | Integer | -> | `ck keep null`: include null attributes in the returned collection (ignored by default) | +| Result | Collection | <- | Collection containing extracted values | + +#### Description + +The `.extract()` function returns a collection containing *attributePath* values extracted from the entity selection. + +*attributePath* can refer to: + +* a scalar dataclass attribute, +* related entity, +* related entities. + +If *attributePath* is invalid, an empty collection is returned. + +This function accepts two syntaxes. + +**.extract( attributePath : Text { ; option : Integer } ) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* values of the entity selection. + +By default, entities for which *attributePath* is *null* or undefined are ignored in the resulting collection. You can pass the `ck keep null` constant in the *option* parameter to include these values as **null** elements in the returned collection. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as a collection of entities (duplications are kept). +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as a collection of entity selections. + + +**.extract ( attributePath ; targetPath { ; ...attributePathN ; ... targetPathN}) : Collection** + +With this syntax, `.extract()` populates the returned collection with the *attributePath* properties. Each element of the returned collection is an object with *targetPath* properties filled with the corresponding *attributePath* properties. Null values are kept (*option* parameter is ignored with this syntax). + +If several *attributePath* are given, a *targetPath* must be given for each. Only valid pairs \[*attributePath*, *targetPath*] are extracted. + +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntity" are extracted as an entity. +* Dataclass attributes with [.kind](DataClassAttributeClass.md#kind) = "relatedEntities" are extracted as an entity selection. + +> Entities of a collection of entities accessed by \[ ] are not reloaded from the database. + + +#### Example + +Given the following table and relation: + +![](assets/en/API/entityselection.PNG) + +```4d + var $firstnames; $addresses; $mailing; $teachers : Collection + // + // + //$firstnames is a collection of Strings + + + $firstnames:=ds.Teachers.all().extract("firstname") + // + //$addresses is a collection of entities related to dataclass Address + //Null values for address are extracted + $addresses:=ds.Teachers.all().extract("address";ck keep null) + // + // + //$mailing is a collection of objects with properties "who" and "to" + //"who" property content is String type + //"to" property content is entity type (Address dataclass) + $mailing:=ds.Teachers.all().extract("lastname";"who";"address";"to") + // + // + //$mailing is a collection of objects with properties "who" and "city" + //"who" property content is String type + //"city" property content is String type + $mailing:=ds.Teachers.all().extract("lastname";"who";"address.city";"city") + // + //$teachers is a collection of objects with properties "where" and "who" + //"where" property content is String + //"who" property content is an entity selection (Teachers dataclass) + $teachers:=ds.Address.all().extract("city";"where";"teachers";"who") + // + //$teachers is a collection of entity selections + $teachers:=ds.Address.all().extract("teachers") +``` + + + + +## .first() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.first()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| ---------------------------------------------------------------------------------- | +| Result | 4D.Entity | <- | Reference to the first entity of the entity selection (Null if selection is empty) | + +#### Description + +The `.first()` function returns a reference to the entity in the first position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[0] +``` + +There is, however, a difference between both statements when the selection is empty: + + +```4d + var $entitySel : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySel:=ds.Emp.query("lastName = :1";"Nonexistentname") //no matching entity + //entity selection is then empty + $entity:=$entitySel.first() //returns Null + $entity:=$entitySel[0] //generates an error +``` + +#### Example + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary > :1";100000) + If($entitySelection.length#0) + $entity:=$entitySelection.first() + End if +``` + + + + +## .getDataClass() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | + +
          + +**.getDataClass()** : 4D.DataClass + +| Parameter | Type | | Description | +| --------- | ------------ |:--:| ------------------------------------------------------ | +| Result | 4D.DataClass | <- | Dataclass object to which the entity selection belongs | + +#### Description + +The `.getDataClass()` function returns the dataclass of the entity selection. + +This function is mainly useful in the context of generic code. + +#### Example + +The following generic code duplicates all entities of the entity selection: + +```4d + //duplicate_entities method + //duplicate_entities($entity_selection) + + #DECLARE ( $entitySelection : 4D.EntitySelection ) + var $dataClass : 4D.DataClass + var $entity; $duplicate : 4D.Entity + var $status : Object + $dataClass:=$entitySelection.getDataClass() + For each($entity;$entitySelection) + $duplicate:=$dataClass.new() + $duplicate.fromObject($entity.toObject()) + $duplicate[$dataClass.getInfo().primaryKey]:=Null //reset the primary key + $status:=$duplicate.save() + End for each +``` + + + +## .isAlterable() + +
          History + +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | + +
          + +**.isAlterable()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ---------------------------------------------------------- | +| Result | Boolean | <- | True if the entity selection is alterable, False otherwise | + +#### Description + +The `.isAlterable()` function returns True if the entity selection is alterable, and False if the entity selection is not alterable. + +For more information, please refer to [Shareable or alterable entity selections](ORDA/entities.md#shareable-or-alterable-entity-selections). + +#### Example + +You are about to display `Form.products` in a [list box](FormObjects/listbox_overview.md) to allow the user to add new products. You want to make sure it is alterable so that the user can add new products without error: + +```4d +If (Not(Form.products.isAlterable())) + Form.products:=Form.products.copy() +End if +... +Form.products.add(Form.product) +``` + + + + +## .isOrdered() + +
          History + +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.isOrdered()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| -------------------------------------------------------- | +| Result | Boolean | <- | True if the entity selection is ordered, False otherwise | + +#### Description + +The `.isOrdered()` function returns True if the entity selection is ordered, and False if it is unordered. +> This function always returns True when the entity selection comes from a remote datastore. + +For more information, please refer to [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). + + +#### Example + + +```4d + var $employees : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + var $isOrdered : Boolean + $employees:=ds.Employee.newSelection(dk keep ordered) + $employee:=ds.Employee.get(714) // Gets the entity with primary key 714 + + //In an ordered entity selection, we can add the same entity several times (duplications are kept) + $employees.add($employee) + $employees.add($employee) + $employees.add($employee) + + $isOrdered:=$employees.isOrdered() + If($isOrdered) + ALERT("The entity selection is ordered and contains "+String($employees.length)+" employees") + End if +``` + + + + + +## .last() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.last()** : 4D.Entity +| Parameter | Type | | Description | +| --------- | --------- |:--:| ------------------------------------------------------------------------------------- | +| Result | 4D.Entity | <- | Reference to the last entity of the entity selection (Null if empty entity selection) | + +#### Description + +The `.last()` function returns a reference to the entity in last position of the entity selection. + +The result of this function is similar to: + +```4d + $entity:=$entitySel[length-1] +``` + +If the entity selection is empty, the function returns Null. + + +#### Example + + +```4d + var $entitySelection : cs.EmpSelection + var $entity : cs.EmpEntity + $entitySelection:=ds.Emp.query("salary < :1";50000) + If($entitySelection.length#0) + $entity:=$entitySelection.last() + End if +``` + + + + +## .length + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.length** : Integer + +#### Description + +The `.length` property returns the number of entities in the entity selection. If the entity selection is empty, it returns 0. + +Entity selections always have a `.length` property. + + +#### Example + +```4d + var $vSize : Integer + $vSize:=ds.Employee.query("gender = :1";"male").length + ALERT(String(vSize)+" male employees found.") +``` + + + + +## .max() + +
          History +| Version | Changes | +| ------- | ------------------------------------------- | +| v17 | Added | +| v18 R6 | Returns undefined if empty entity selection | + +
          + +**.max**( *attributePath* : Text ) : any + +| Parameter | Type | | Description | +| ------------- | ---- |:--:| ------------------------------------------------ | +| attributePath | Text | -> | Path of the attribute to be used for calculation | +| Result | any | <- | Highest value of attribute | + +#### Description + +The `.max()` function returns the highest (or maximum) value among all the values of *attributePath* in the entity selection. It actually returns the value of the last entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function. + +If you pass in *attributePath* a path to an object property containing different types of values, the `.max()` function will return the maximum value within the first scalar type in the default 4D type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.max()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + + +#### Example + +We want to find the highest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $maxSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $maxSalary:=$sel.max("salary") +``` + + + +## .min() + +
          History +| Version | Changes | +| ------- | ------------------------------------------- | +| v17 | Added | +| v18 R6 | Returns undefined if empty entity selection | + + +
          + +**.min**( *attributePath* : Text ) : any +| Parameter | Type | | Description | +| ------------- | ---- |:--:| ------------------------------------------------ | +| attributePath | Text | -> | Path of the attribute to be used for calculation | +| Result | any | <- | Lowest value of attribute | + +#### Description + +The `.min()` function returns the lowest (or minimum) value among all the values of attributePath in the entity selection. It actually returns the first entity of the entity selection as it would be sorted in ascending order using the [`.orderBy()`](#orderby) function (excluding **null** values). + +If you pass in *attributePath* a path to an object property containing different types of values, the `.min()` function will return the minimum value within the first scalar value type in the type list order (see [`.sort()`](CollectionClass.md#sort) description). + +`.min()` returns **undefined** if the entity selection is empty or *attributePath* is not found in the object attribute. + +An error is returned if: + +* *attributePath* is a related attribute, +* *attributePath* designates an attribute that does not exist in the entity selection dataclass. + + +#### Example + +In this example, we want to find the lowest salary among all the female employees: + +```4d + var $sel : cs.EmpSelection + var $minSalary : Real + $sel:=ds.Employee.query("gender = :1";"female") + $minSalary:=$sel.min("salary") +``` + + + +## .minus() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.minus**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.minus**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------------- | ------------------ |:--:| ------------------------------------------------------------------------ | +| entity | 4D.Entity | -> | Entity to substract | +| entitySelection | 4D.EntitySelection | -> | Entity selection to substract | +| Result | 4D.EntitySelection | <- | New entity selection or a new reference on the existing entity selection | + +#### Description + +The `.minus()` function excludes from the entity selection to which it is applied the *entity* or the entities of *entitySelection* and returns the resulting entity selection. + +* If you pass *entity* as parameter, the function creates a new entity selection without *entity* (if *entity* belongs to the entity selection). If *entity* was not included in the original entity selection, a new reference to the entity selection is returned. +* If you pass *entitySelection* as parameter, the function returns an entity selection containing the entities belonging to the original entity selection without the entities belonging to *entitySelection*. +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection or both the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + + $employees:=ds.Employee.query("lastName = :1";"H@") + // The $employees entity selection contains the entity with primary key 710 and other entities + // for ex. "Colin Hetrick", "Grady Harness", "Sherlock Holmes" (primary key 710) + + $employee:=ds.Employee.get(710) // Returns "Sherlock Holmes" + + $result:=$employees.minus($employee) //$result contains "Colin Hetrick", "Grady Harness" +``` + + +#### Example 2 + +We want to have a selection of female employees named "Jones" who live in New York : + +```4d + var $sel1; $sel2; $sel3 : cs.EmployeeSelection + $sel1:=ds.Employee.query("name =:1";"Jones") + $sel2:=ds.Employee.query("city=:1";"New York") + $sel3:=$sel1.and($sel2).minus(ds.Employee.query("gender='male'")) +``` + + + +## .or() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.or**( *entity* : 4D.Entity ) : 4D.EntitySelection
          **.or**( *entitySelection* : 4D.EntitySelection ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------------- | ------------------ |:--:| ---------------------------------------------------------------------- | +| entity | 4D.Entity | -> | Entity to intersect with | +| entitySelection | 4D.EntitySelection | -> | Entity selection to intersect with | +| Result | 4D.EntitySelection | <- | New entity selection or new reference to the original entity selection | + +#### Description + +The `.or()` function combines the entity selection with the *entity* or *entitySelection* parameter using the logical (not exclusive) OR operator; it returns a new, unordered entity selection that contains all the entities from the entity selection and the parameter. + +* If you pass *entity* as parameter, you compare this entity with the entity selection. If the entity belongs to the entity selection, a new reference to the entity selection is returned. Otherwise, a new entity selection containing the original entity selection and the entity is returned. +* If you pass *entitySelection* as parameter, you compare entity selections. A new entity selection containing the entities belonging to the original entity selection or *entitySelection* is returned (or is not exclusive, entities referenced in both selections are not duplicated in the resulting selection). +> You can compare [ordered and/or unordered entity selections](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). The resulting selection is always unordered. + +If the original entity selection and the *entitySelection* parameter are empty, an empty entity selection is returned. If the original entity selection is empty, a reference to *entitySelection* or an entity selection containing only *entity* is returned. + +If *entitySelection* is empty or if *entity* is Null, a new reference to the original entity selection is returned. + +If the original entity selection and the parameter are not related to the same dataclass, an error is raised. + + +#### Example 1 + +```4d + var $employees1; $employees2; $result : cs.EmployeeSelection + $employees1:=ds.Employee.query("lastName = :1";"H@") //Returns "Colin Hetrick","Grady Harness" + $employees2:=ds.Employee.query("firstName = :1";"C@") //Returns "Colin Hetrick", "Cath Kidston" + $result:=$employees1.or($employees2) //$result contains "Colin Hetrick", "Grady Harness","Cath Kidston" +``` + +#### Example 2 + +```4d + var $employees; $result : cs.EmployeeSelection + var $employee : cs.EmployeeEntity + $employees:=ds.Employee.query("lastName = :1";"H@") // Returns "Colin Hetrick","Grady Harness", "Sherlock Holmes" + $employee:=ds.Employee.get(686) //the entity with primary key 686 does not belong to the $employees entity selection + //It matches the employee "Mary Smith" + + $result:=$employees.or($employee) //$result contains "Colin Hetrick", "Grady Harness", "Sherlock Holmes", "Mary Smith" +``` + + + +## .orderBy() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.orderBy**( *pathString* : Text ) : 4D.EntitySelection
          **.orderBy**( *pathObjects* : Collection ) : 4D.EntitySelection +| Parameter | Type | | Description | +| ----------- | ------------------ |:--:| --------------------------------------------------------------------- | +| pathString | Text | -> | Attribute path(s) and sorting instruction(s) for the entity selection | +| pathObjects | Collection | -> | Collection of criteria objects | +| Result | 4D.EntitySelection | <- | New entity selection in the specified order | + +#### Description + +The `.orderBy()` function returns a new ordered entity selection containing all entities of the entity selection in the order specified by *pathString* or *pathObjects* criteria. +> * This method does not modify the original entity selection. +* For more information, please refer to the [Ordered or unordered entity selection](ORDA/dsMapping.md#ordered-or-unordered-entity-selection) section. + +You must use a criteria parameter to define how the entities must be sorted. Two different parameters are supported: + +* *pathString* (Text) : This parameter contains a formula made of 1 to x attribute paths and (optionally) sort orders, separated by commas. The syntax is: + +```4d +"attributePath1 {desc or asc}, attributePath2 {desc or asc},..." +``` + +The order in which the attributes are passed determines the sorting priority of the entities. By default, attributes are sorted in ascending order. You can set the sort order of a property in the criteria string, separated from the property path by a single space: pass "asc" to sort in ascending order or "desc" in descending order. + +* *pathObjects* (collection): each element of the collection contains an object structured in the following way: + +```4d +{ + "propertyPath": string, + "descending": boolean +} +``` + +By default, attributes are sorted in ascending order ("descending" is false). + +You can add as many objects in the criteria collection as necessary. +> Null values are evaluated as less than other values. + +#### Example + + +```4d +// order by formula + $sortedEntitySelection:=$entitySelection.orderBy("firstName asc, salary desc") + $sortedEntitySelection:=$entitySelection.orderBy("firstName") + + // order by collection with or without sort orders + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"firstName";"descending";False)) + $orderColl.push(New object("propertyPath";"salary";"descending";True)) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) + + $orderColl:=New collection + $orderColl.push(New object("propertyPath";"manager.lastName")) + $orderColl.push(New object("propertyPath";"salary")) + $sortedEntitySelection:=$entitySelection.orderBy($orderColl) +``` + + + + +## .orderByFormula( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R6 | Added | + +
          + +**.orderByFormula**( *formulaString* : Text { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection
          **.orderByFormula**( *formulaObj* : Object { ; *sortOrder* : Integer } { ; *settings* : Object} ) : 4D.EntitySelection +| Parameter | Type | | Description | +| ------------- | ------------------ |:--:| ------------------------------------------- | +| formulaString | Text | -> | Formula string | +| formulaObj | Object | -> | Formula object | +| sortOrder | Integer | -> | `dk ascending` (default) or `dk descending` | +| settings | Object | -> | Parameter(s) for the formula | +| Result | 4D.EntitySelection | <- | New ordered entity selection | + +#### Description + +The `.orderByFormula()` function returns a new, ordered entity selection containing all entities of the entity selection in the order defined through the *formulaString* or *formulaObj* and, optionally, *sortOrder* and *settings* parameters. +> This function does not modify the original entity selection. + +You can use either a *formulaString* or a *formulaObj* parameter: + +- *formulaString*: you pass a 4D expression such as "Year of(this.birthDate)". +- *formulaObj*: pass a valid formula object created using the `Formula` or `Formula from string` command. + +The *formulaString* or *formulaObj* is executed for each entity of the entity selection and its result is used to define the position of the entity in the returned entity selection. The result must be of a sortable type (boolean, date, number, text, time, null). +> A null result is always the smallest value. + +By default if you omit the *sortOrder* parameter, the resulting entity selection is sorted in ascending order. Optionnally, you can pass one of the following values in the *sortOrder* parameter: + +| Constant | Value | Comment | +| ------------- | ----- | ------------------------------ | +| dk ascending | 0 | Ascending sort order (default) | +| dk descending | 1 | Descending sort order | + +Within the *formulaString* or *formulaObj*, the processed entity and thus its attributes are available through the `This` command (for example, `This.lastName`). + +You can pass parameter(s) to the formula using the `args` property (object) of the `settings` parameter: the formula receives the `settings.args` object in $1. + +#### Example 1 + +Sorting students using a formula provided as text: + +```4d + var $es1; $es2 : cs.StudentsSelection + $es1:=ds.Students.query("nationality=:1";"French") + $es2:=$es1.orderByFormula("length(this.lastname)") //ascending by default + $es2:=$es1.orderByFormula("length(this.lastname)";dk descending) +``` + +Same sort order but using a formula object: + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(Length(This.lastname)) + $es2:=$es1.orderByFormula($formula) // ascending by default + $es2:=$es1.orderByFormula($formula;dk descending) +``` + + +#### Example 2 + +A formula is given as a formula object with parameters; `settings.args` object is received as $1 in the ***computeAverage*** method. + +In this example, the "marks" object field in the **Students** dataClass contains students' grades for each subject. A single formula object is used to compute a student's average grade with different coefficients for schoolA and schoolB. + +```4d + var $es1; $es2 : cs.StudentsSelection + var $formula; $schoolA; $schoolB : Object + $es1:=ds.Students.query("nationality=:1";"French") + $formula:=Formula(computeAverage($1)) + + $schoolA:=New object() //settings object + $schoolA.args:=New object("english";1;"math";1;"history";1) // Coefficients to compute an average + + //Order students according to school A criteria + $es2:=$es1.entitySelection.orderByFormula($formula;$schoolA) + + $schoolB:=New object() //settings object + $schoolB.args:=New object("english";1;"math";2;"history";3) // Coefficients to compute an average + + //Order students according to school B criteria + $es2:=$es1.entitySelection.orderByFormula($formula;dk descending;$schoolB) +``` + +```4d + // + // computeAverage method + // ----------------------------- + #DECLARE ($coefList : Object) -> $result : Integer + var $subject : Text + var $average; $sum : Integer + + $average:=0 + $sum:=0 + + For each($subject;$coefList) + $sum:=$sum+$coefList[$subject] + End for each + + For each($subject;This.marks) + $average:=$average+(This.marks[$subject]*$coefList[$subject]) + End for each + + $result:=$average/$sum +``` + + + + +## .query() + +
          History +| Version | Changes | +| ------- | ---------------------------------- | +| v17 R6 | Support of Formula parameters | +| v17 R5 | Support of placeholders for values | +| v17 | Added | + +
          + +**.query**( *queryString* : Text { ; *...value* : any } { ; *querySettings* : Object } ) : 4D.EntitySelection
          **.query**( *formula* : Object { ; *querySettings* : Object } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| ------------- | ------------------ |:--:| ---------------------------------------------------------------------------------------------------------------------------------- | +| queryString | Text | -> | Search criteria as string | +| formula | Object | -> | Search criteria as formula object | +| value | any | -> | Value(s) to use for indexed placeholder(s) | +| querySettings | Object | -> | Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan | +| Result | 4D.EntitySelection | <- | New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula* | +#### Description + +The `.query()` function searches for entities that meet the search criteria specified in *queryString* or *formula* and (optionally) *value*(s) among all the entities in the entity selection, and returns a new object of type `EntitySelection` containing all the entities that are found. Lazy loading is applied. +> This function does not modify the original entity selection. + +If no matching entities are found, an empty `EntitySelection` is returned. + +For detailed information on how to build a query using *queryString*, *value*, and *querySettings* parameters, please refer to the DataClass [`.query()`](DataClassClass.md#query) function description. +> By default if you omit the **order by** statement in the *queryString*, the returned entity selection is [not ordered](ORDA/dsMapping.md#ordered-or-unordered-entity-selection). Note however that, in Client/Server mode, it behaves like an ordered entity selection (entities are added at the end of the selection). + +#### Example 1 + + +```4d + var $entitySelectionTemp : cs.EmployeeSelection + $entitySelectionTemp:=ds.Employee.query("lastName = :1";"M@") + Form.emps:=$entitySelectionTemp.query("manager.lastName = :1";"S@") +``` + + +#### Example 2 + +More examples of queries can be found in the DataClass [`.query()`](DataClassClass.md#query) page. + +#### See also + +[`.query()`](DataClassClass.md#query) for dataclass + + + + +## .queryPath + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.queryPath** : Text + +#### Description + +The `.queryPath` property contains a detailed description of the query as it was actually performed by 4D. This property is available for `EntitySelection` objects generated through queries if the `"queryPath":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + + +## .queryPlan + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.queryPlan** : Text + +#### Description + +The `.queryPlan` property contains a detailed description of the query just before it is executed (i.e., the planned query). This property is available for `EntitySelection` objects generated through queries if the `"queryPlan":true` property was passed in the *querySettings* parameter of the [`.query()`](#query) function. + +For more information, refer to the **querySettings parameter** paragraph in the Dataclass[`.query()`](DataClassClass.html#query) page. + + + +## .refresh() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | + +
          + +**.refresh()** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + +#### Description +> This function only works with a remote datastore (client / server or `Open datastore` connection). + +The `.refresh()` function immediately "invalidates" the entity selection data in the local ORDA cache so that the next time 4D requires the entity selection, it will be reloaded from the database. + +By default, the local ORDA cache is invalidated after 30 seconds. In the context of client / server applications using both ORDA and the classic language, this method allows you to make sure a remote application will always work with the latest data. + +#### Example 1 + +In this example, classic and ORDA code modify the same data simultaneously: + +```4d + //On a 4D remote + + var $selection : cs.StudentsSelection + var $student : cs.StudentsEntity + + $selection:=ds.Students.query("lastname=:1";"Collins") + //The first entity is loaded in the ORDA cache + $student:=$selection.first() + + //Update with classic 4D, ORDA cache is not aware of if + QUERY([Students];[Students]lastname="Collins") + [Students]lastname:="Colin" + SAVE RECORD([Students]) + + //to get the latest version, the ORDA cache must be invalidated + $selection.refresh() + // Even if cache is not expired, the first entity is reloaded from disk + $student:=$selection.first() + + //$student.lastname contains "Colin" +``` + + +#### Example 2 + +A list box displays the Form.students entity selection and several clients work on it. + +```4d +// Form method: + Case of + :(Form event code=On Load) + Form.students:=ds.Students.all() + End case + // + // + // On client #1, the user loads, updates, and saves the first entity + // On client #2, the user loads, updates, and saves the same entity + // + // + // On client #1: + Form.students.refresh() // Invalidates the ORDA cache for the Form.students entity selection + // The list box content is refreshed from the database with update made by client #2 +``` + + + + +## .selected() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 R3 | Added | + +
          + +**.selected**( *selectedEntities* : 4D.EntitySelection ) : Object +| Parameter | Type | | Description | +| ---------------- | ------------------ |:--:| --------------------------------------------------------------------------------- | +| selectedEntities | 4D.EntitySelection | -> | Entity selection with entities for which to know the rank in the entity selection | +| Result | Object | <- | Range(s) of selected entities in entity selection | + +#### Description + +The `.selected()` function returns an object describing the position(s) of *selectedEntities* in the original entity selection. +> This function does not modify the original entity selection. + +Pass in the *selectedEntities* parameter an entity selection containing entities for which you want to know the position in the original entity selection. *selectedEntities* must be an entity selection belonging to the same dataclass as the original entity selection, otherwise an error 1587 - "The entity selection comes from an incompatible dataclass" is raised. + +#### Result + +The returned object contains the following properties: + +| Property | Type | Description | +| -------------- | ---------- | ------------------------------- | +| ranges | Collection | Collection of range objects | +| ranges[].start | Integer | First entity index in the range | +| ranges[].end | Integer | Last entity index in the range | + +If a `ranges` property contains a single entity, `start` = `end`. Index starts at 0. + +The function returns an empty collection in the `ranges` property if the original entity selection or the *selectedEntities* entity selection is empty. + +#### Example + +```4d +var $invoices; $cashSel; $creditSel : cs.Invoices +var $result1; $result2 : Object + +$invoices:=ds.Invoices.all() + +$cashSelection:=ds.Invoices.query("payment = :1"; "Cash") +$creditSel:=ds.Invoices.query("payment IN :1"; New collection("Cash"; "Credit Card")) + +$result1:=$invoices.selected($cashSelection) +$result2:=$invoices.selected($creditSel) + +//$result1 = {ranges:[{start:0;end:0},{start:3;end:3},{start:6;end:6}]} +//$result2 = {ranges:[{start:0;end:1},{start:3;end:4},{start:6;end:7}]} + +``` + + + + + + + + +## .slice() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.slice**( *startFrom* : Integer { ; *end* : Integer } ) : 4D.EntitySelection +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| -------------------------------------------------------------- | +| startFrom | Integer | -> | Index to start the operation at (included) | +| end | Integer | -> | End index (not included) | +| Result | 4D.EntitySelection | <- | New entity selection containing sliced entities (shallow copy) | + +#### Description + +The `.slice()` function returns a portion of an entity selection into a new entity selection, selected from the *startFrom* index to the *end* index (*end* is not included) or to the last entity of the entity selection. This method returns a shallow copy of the entity selection (it uses the same entity references). +> This function does not modify the original entity selection. + +The returned entity selection contains the entities specified by *startFrom* and all subsequent entities up to, but not including, the entity specified by *end*. If only the *startFrom* parameter is specified, the returned entity selection contains all entities from *startFrom* to the last entity of the original entity selection. + +* If *startFrom* < 0, it is recalculated as *startFrom:=startFrom+length* (it is considered as the offset from the end of the entity selection). If the calculated value < 0, *startFrom* is set to 0. +* If *startFrom >= length*, the function returns an empty entity selection. +* If *end* < 0, it is recalculated as *end:=end+length*. +* If *end < startFrom* (passed or calculated values), the method does nothing. + +If the entity selection contains entities that were dropped in the meantime, they are also returned. + +#### Example 1 + +You want to get a selection of the first 9 entities of the entity selection: + +```4d +var $sel; $sliced : cs.EmployeeSelection +$sel:=ds.Employee.query("salary > :1";50000) +$sliced:=$sel.slice(0;9) // +``` + + +#### Example 2 + +Assuming we have ds.Employee.all().length = 10 + +```4d +var $slice : cs.EmployeeSelection +$slice:=ds.Employee.all().slice(-1;-2) //tries to return entities from index 9 to 8, but since 9 > 8, returns an empty entity selection + +``` + + + +## .sum( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + + +
          + +**.sum**( *attributePath* : Text ) : Real +| Parameter | Type | | Description | +| ------------- | ---- |:--:| ------------------------------------------------ | +| attributePath | Text | -> | Path of the attribute to be used for calculation | +| Result | Real | <- | Sum of entity selection values | + +#### Description + + +The `.sum()` function returns the sum for all *attributePath* values in the entity selection. + +`.sum()` returns 0 if the entity selection is empty. + +The sum can only be done on values of number type. If the *attributePath* is an object property, only numerical values are taken into account for the calculation (other value types are ignored). In this case, if *attributePath* leads to a property that does not exist in the object or does not contain any numeric values, `.sum()` returns 0. + +An error is returned if: + +* *attributePath* is not a numerical or an object attribute, +* *attributePath* is a related attribute, +* *attributePath* is not found in the entity selection dataclass. + + + +#### Example + +```4d +var $sel : cs.EmployeeSelection +var $sum : Real + +$sel:=ds.Employee.query("salary < :1";20000) +$sum:=$sel.sum("salary") +``` + + + +## .toCollection( ) + +
          History +| Version | Changes | +| ------- | ------- | +| v17 | Added | + +
          + +**.toCollection**( { *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer } } ) : *Collection*
          **.toCollection**( *filterString* : Text {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection*
          **.toCollection**( *filterCol* : Collection {; *options* : Integer { ; *begin* : Integer { ; *howMany* : Integer }}} ) : *Collection* +| Parameter | Type | | Description | +| ------------ | ---------- |:--:| ------------------------------------------------------------------------------------ | +| filterString | Text | -> | String with entity attribute path(s) to extract | +| filterCol | Collection | -> | Collection of entity attribute path(s) to extract | +| options | Integer | -> | `dk with primary key`: adds the primary key
          `dk with stamp`: adds the stamp | +| begin | Integer | -> | Designates the starting index | +| howMany | Integer | -> | Number of entities to extract | +| Result | Collection | <- | Collection of objects containing attributes and values of entity selection | + +#### Description + +The `.toCollection()` function creates and returns a collection where each element is an object containing a set of properties and values corresponding to the attribute names and values for the entity selection. + +If no filter parameter is passed or the first parameter contains an empty string or "*", all the attributes are extracted. Attributes with [kind](DataClassAttributeClass.md#kind) property as "relatedEntity" are extracted with the simple form: an object with property \_\_KEY (primary key). Attributes with kind property as "relatedEntities" are not extracted. + +Or, you can designate the entity attributes to extract using a filter parameter. You can use one of these two filters: + +* *filterString* --a string with property paths separated with commas: "propertyPath1, propertyPath2, ...". +* *filterCol* --a collection of strings containing property paths: \["propertyPath1","propertyPath2",...] + + +If a filter is specified for an attribute of the `relatedEntity` kind: + +* propertyPath = "relatedEntity" -> it is extracted with simple form +* propertyPath = "relatedEntity.*" -> all the properties are extracted +* propertyPath = "relatedEntity.propertyName1, relatedEntity.propertyName2, ..." -> only those properties are extracted + + +If a filter is specified for an attribute of the `relatedEntities` kind: + +* propertyPath = "relatedEntities.*" -> all the properties are extracted +* propertyPath = "relatedEntities.propertyName1, relatedEntities.propertyName2, ..." -> only those properties are extracted + + + +In the *options* parameter, you can pass the `dk with primary key` and/or `dk with stamp` selector(s) to add the entity's primary keys and/or stamps in extracted objects. + +The *begin* parameter allows you to indicate the starting index of the entities to extract. You can pass any value between 0 and entity selection length-1. + +The *howMany* parameter lets you specify the number of entities to extract, starting with the one specified in *begin*. Dropped entities are not returned but are taken into account according to *howMany*. For example, if *howMany*= 3 and there is 1 dropped entity, only 2 entities are extracted. + +If *howMany* > length of the entity selection, the method returns (length - *begin*) objects. + +An empty collection is returned if: + +* the entity selection is empty, or +* *begin* is greater than the length of the entity selection. + + +#### Example 1 + +The following structure will be used throughout all examples of this section: + +![](assets/en/API/dataclassAttribute4.png) + + +Example without filter or options parameter: + +```4d + var $employeesCollection : Collection + var $employees : cs.EmployeeSelection + + $employeesCollection:=New collection + $employees:=ds.Employee.all() + $employeesCollection:=$employees.toCollection() +``` + +Returns: + +```4d +[ + { + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + + } + }, + { + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + } +] +``` + +#### Example 2 + +Example with options: + +```4d +var $employeesCollection : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection("";dk with primary key+dk with stamp) +``` + +Returns: + +```4d +[ + { + "__KEY": 416, + "__STAMP": 1, + "ID": 416, + "firstName": "Gregg", + "lastName": "Wahl", + "salary": 79100, + "birthDate": "1963-02-01T00:00:00.000Z", + "woman": false, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }, + { + "__KEY": 417, + "__STAMP": 1, + "ID": 417, + "firstName": "Irma", + "lastName": "Durham", + "salary": 47000, + "birthDate": "1992-06-16T00:00:00.000Z", + "woman": true, + "managerID": 412, + "employerID": 20, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 20 + }, + "manager": { + "__KEY": 412 + } + }] +``` + +#### Example 3 + +Example with slicing and filtering on properties: + +```4d +var $employeesCollection; $filter : Collection +var $employees : cs.EmployeeSelection + +$employeesCollection:=New collection +$filter:=New collection +$filter.push("firstName") +$filter.push("lastName") + +$employees:=ds.Employee.all() +$employeesCollection:=$employees.toCollection($filter;0;0;2) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl" + }, + { + "firstName": "Irma", + "lastName": "Durham" + } +] + +``` + + +#### Example 4 + +Example with `relatedEntity` type with simple form: + + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName,lastName,employer") +``` + +returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "__KEY": 20 + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "__KEY": 20 + } + } + ] +``` + +#### Example 5 + +Example with *filterCol* parameter: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection("firstName";"lastName") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Joanna", + "lastName": "Cabrera" + }, + { + "firstName": "Alexandra", + "lastName": "Coleman" + } +] +``` + +#### Example 6 + +Example with extraction of all properties of a relatedEntity: + +```4d +var $employeesCollection; $coll : Collection +$employeesCollection:=New collection +$coll:=New collection +$coll.push("firstName") +$coll.push("lastName") +$coll.push("employer.*") +$employeesCollection:=$employees.toCollection($coll) +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "ID": 20, + "name": "India Astral Secretary", + "creationDate": "1984-08-25T00:00:00.000Z", + "revenues": 12000000, + "extra": null + } + } + ] +``` + +#### Example 7 + +Example with extraction of some properties of a relatedEntity: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, employer.name") +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Irma", + "lastName": "Durham", + "employer": { + "name": "India Astral Secretary" + } + }, + { + "firstName": "Lorena", + "lastName": "Boothe", + "employer": { + "name": "India Astral Secretary" + } + }] +``` + +#### Example 8 + +Example with extraction of some properties of `relatedEntities`: + +```4d + var $employeesCollection : Collection + $employeesCollection:=New collection + $employeesCollection:=$employees.toCollection("firstName, lastName, directReports.firstName") +``` + +Returns: + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "firstName": "Gary" + }, + { + "firstName": "Sadie" + }, + { + "firstName": "Christie" + } + ] + }, + { + "firstName": "Gary", + + "lastName": "Reichert", + "directReports": [ + { + "firstName": "Rex" + }, + { + "firstName": "Jenny" + }, + { + "firstName": "Lowell" + } + ] + }] +``` + +#### Example 9 + +Example with extraction of all properties of `relatedEntities`: + +```4d +var $employeesCollection : Collection +$employeesCollection:=New collection +$employeesCollection:=$employees.toCollection("firstName, lastName, directReports.*") + +``` + +```4d +[ + { + "firstName": "Gregg", + "lastName": "Wahl", + "directReports": [] + }, + { + "firstName": "Mike", + "lastName": "Phan", + "directReports": [ + { + "ID": 425, + "firstName": "Gary", + "lastName": "Reichert", + "salary": 65800, + "birthDate": "1957-12-23T00:00:00.000Z", + "woman": false, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + }, + { + "ID": 426, + "firstName": "Sadie", + "lastName": "Gallant", + "salary": 35200, + "birthDate": "2022-01-03T00:00:00.000Z", + "woman": true, + "managerID": 424, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 424 + } + } + ] + }, + { + "firstName": "Gary", + "lastName": "Reichert", + "directReports": [ + { + "ID": 428, + "firstName": "Rex", + "lastName": "Chance", + "salary": 71600, + "birthDate": "1968-08-09T00:00:00.000Z", + "woman": false, + + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + }, + { + "ID": 429, + "firstName": "Jenny", + "lastName": "Parks", + "salary": 51300, + "birthDate": "1984-05-25T00:00:00.000Z", + "woman": true, + "managerID": 425, + "employerID": 21, + "photo": "[object Picture]", + "extra": null, + "employer": { + "__KEY": 21 + }, + "manager": { + "__KEY": 425 + } + } + ] + } +] +``` + + + + + + + diff --git a/website/translated_docs/pt/API/FileClass.md b/website/translated_docs/pt/API/FileClass.md new file mode 100644 index 00000000000000..942bfaa6ed2b3a --- /dev/null +++ b/website/translated_docs/pt/API/FileClass.md @@ -0,0 +1,1168 @@ +--- +id: FileClass +title: File +--- + +`File` objects are created with the [`File`](#file) command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the `File` command to create a new file, a valid `File` object is created but nothing is actually stored on disk until you call the [`file.create( )`](#create) function. + +### Example + +The following example creates a preferences file in the project folder: + +```code4d +var $created : Boolean +$created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + +### File object + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](#copyto)

              copies the `File` object into the specified *destinationFolder* | +| [**.create()** : Boolean ](#create)

              creates a file on disk according to the properties of the `File` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

              creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

              the creation date of the file | +| [**.creationTime** : Time](#creationtime)

              the creation time of the file | +| [**.delete( )**](#delete)

              deletes the file | +| [**.exists** : Boolean](#exists)

              true if the file exists on disk | +| [**.extension** : Text](#extension)

              the extension of the file name (if any) | +| [**.fullName** : Text](#fullname)

              the full name of the file, including its extension (if any) | +| [**.getAppInfo**() : Object](#getappinfo)

              returns the contents of a **.exe**, **.dll** or **.plist** file information as an object | +| [**.getContent( )** : 4D.Blob](#getcontent)

          returns a `4D.Blob` object containing the entire content of a file | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

              the icon of the file | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
          **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](#gettext)

              returns the contents of the file as text | +| [**.hidden** : Boolean](#hidden)

              true if the file is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

              true if the file is an alias, a shortcut, or a symbolic link | +| [**.isFile** : Boolean](#isfile)

              always true for a file | +| [**.isFolder** : Boolean](#isfolder)

              always false for a file | +| [**.isWritable** : Boolean](#iswritable)

              true if the file exists on disk and is writable | +| [**.modificationDate** : Date](#modificationdate)

              the date of the file's last modification | +| [**.modificationTime** : Time](#modificationtime)

              the time of the file's last modification | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File](#moveto)

              moves or renames the `File` object into the specified *destinationFolder* | +| [**.name** : Text](#name)

              the name of the file without extension (if any) | +| [**.original** : 4D.File
          **.original** : 4D.Folder](#original)

              the target element for an alias, a shortcut, or a symbolic link file | +| [**.parent** : 4D.Folder](#parent)

              the parent folder object of the file | +| [**.path** : Text](#path)

              the POSIX path of the file | +| [**.platformPath** : Text](#platformpath)

              the path of the file expressed with the current platform syntax | +| [**.rename**( *newName* : Text ) : 4D.File](#rename)

              renames the file with the name you passed in *newName* and returns the renamed `File` object | +| [**.setAppInfo**( *info* : Object )](#setappinfo)

              writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file | +| [**.setContent** ( *content* : Blob ) ](#setcontent)

              rewrites the entire content of the file using the data stored in the *content* BLOB | +| [**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
          **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) ](#settext)

              writes *text* as the new contents of the file | +| [**.size** : Real](#size)

              the size of the file expressed in bytes | + + + +## File + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**File** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
          **File** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +| Parameter | Type | | Description | +| ------------ | ------- |:--:| ----------------------------------------------- | +| path | Text | -> | File path | +| fileConstant | Integer | -> | 4D file constant | +| pathType | Integer | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return file of host database | +| Result | 4D.File | <- | New file object | + + +#### Description + +The `File` command creates and returns a new object of the `4D.File` type. The command accepts two syntaxes: + +**File ( path { ; pathType } { ; \* })** + +In the *path* parameter, pass a file path string. You can use a custom string or a filesystem (e.g., "/DATA/myfile.txt"). + +> Only absolute pathnames are supported with the `File` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Value | Comment | +| ---------------- | ----- | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**File ( fileConstant { ; \* } )** + +In the *fileConstant* parameter, pass a 4D built-in or system file, using one of the following constants: + +| Constant | Value | Comment | +| --------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Backup history file | 19 | Backup history file (see Configuration and trace files). Stored in the backup destination folder. | +| Backup log file | 13 | Current backup journal file. Stored in the application Logs folder. | +| Backup settings file | 1 | Default backup.4DSettings file (xml format), stored in the Settings folder of the project | +| Backup settings file for data | 17 | backup.4DSettings file (xml format) for the data file, stored in the Settings folder of the data folder | +| Build application log file | 14 | Current log file in xml format of the application builder. Stored in the Logs folder. | +| Build application settings file | 20 | Default settings file of the application builder ("buildApp.4DSettings"). Stored in the Settings folder of the project. | +| Compacting log file | 6 | Log file of the most recent compacting done with the Compact data file command or the Maintenance and security center. Stored in the Logs folder. | +| Current backup settings file | 18 | backup.4DSettings file currently used by the application. It can be the backup settings file (default) or a custom user backup settings file defined for the data file | +| Debug log file | 12 | Log file created by the `SET DATABASE PARAMETER(Debug log recording)` command. Stored in the Logs folder. | +| Diagnostic log file | 11 | Log file created by the `SET DATABASE PARAMETER(Diagnostic log recording)` command. Stored in the Logs folder. | +| Directory file | 16 | directory.json file, containing the description of users and groups (if any) for the project application. It can be located either in the user settings folder (default, global to the project), or in the data settings folder (specific to a data file). | +| HTTP debug log file | 9 | Log file created by the `WEB SET OPTION(Web debug log)` command. Stored in the Logs folder. | +| HTTP log file | 8 | Log file created by the `WEB SET OPTION(Web log recording)` command. Stored in Logs folder. | +| IMAP Log file | 23 | Log file created by the `SET DATABASE PARAMETER(IMAP Log)` command. Stored in the Logs folder. | +| Last backup file | 2 | Last backup file, named \[bkpNum].4BK, stored at a custom location. | +| Last journal integration log file | 22 | Full pathname of the last journal integration log file (stored in the Logs folder of the restored application), if any. This file is created, in auto-repair mode, as soon as a log file integration occurred | +| Repair log file | 7 | Log file of database repairs made on the database in the Maintenance and Security Center (MSC). Stored in the Logs folder. | +| Request log file | 10 | Standard client/server request log file (excluding Web requests) created by the `SET DATABASE PARAMETER(4D Server log recording)` or `SET DATABASE PARAMETER(Client log recording)` commands. If executed on the server, the server log file is returned (stored in the Logs folder on the server). If executed on the client, the client log file is returned (stored in the client local Logs folder). | +| SMTP log file | 15 | Log file created by the `SET DATABASE PARAMETER(SMTP Log)` command. Stored in the Logs folder. | +| User settings file | 3 | settings.4DSettings file for all data files, stored in Preferences folder next to structure file if enabled. | +| User settings file for data | 4 | settings.4DSettings file for current data file, stored in Preferences folder next to the data file. | +| Verification log file | 5 | Log files created by the `VERIFY CURRENT DATA FILE` and `VERIFY DATA FILE` commands or the Maintenance and Security Center (MSC). Stored in the Logs folder. | + +If the target *fileConstant* does not exist, a null object is returned. No errors are raised. + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.File.new() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**4D.File.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.File
          **4D.File.new** ( *fileConstant* : Integer { ; *\** } ) : 4D.File + +#### Description + +The `4D.File.new()` function creates and returns a new object of the `4D.File` type. It is identical to the [`File`](#file) command (shortcut). + +> It is recommended to use the [`File`](#file) shortcut command instead of `4D.File.new()`. + + +## .copyTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File +| Parameter | Type | | Description | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Name for the copy | +| overwrite | Integer | -> | `fk overwrite` to replace existing elements | +| Result | 4D.File | <- | Copied file | + + +#### Description + +The `.copyTo()` function copies the `File` object into the specified *destinationFolder* . + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file is copied with the name of the original file. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a file with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Value | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `File` object. + +#### Example + +You want to copy a picture *file* from the user's document folder to the application folder: + +```4d +var $source; $copy : Object +$source:=Folder(fk documents folder).file("Pictures/photo.png") +$copy:=$source.copyTo(Folder("/PACKAGE");fk overwrite) +``` + + + + + +## .create() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**Not available for ZIP archives** + +**.create()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- | -- | ---------------------------------------------------------- | +| Result | Boolean | <- | True if the file was created successfully, false otherwise | + +#### Description + +The `.create()` function creates a file on disk according to the properties of the `File` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the file already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the file is created successfully; +* **False** if a file with the same name already exists or if an error occured. + +#### Example + +Creation of a preferences file in the database folder: + +```4d + var $created : Boolean + $created:=File("/PACKAGE/SpecialPrefs/"+Current user+".myPrefs").create() +``` + + + + + +## .createAlias() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File +| Parameter | Type | | Description | +| ----------------- | --------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Text | -> | Name of the alias or shortcut | +| aliasType | Integer | -> | Type of the alias link | +| Result | 4D.File | <- | Alias or shortcut file reference | + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the file with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Value | Comment | +| ------------------ | ----- | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Example + +You want to create an alias to a file in your database folder: + +```4d + $myFile:=Folder(fk documents folder).file("Archives/ReadMe.txt") + $aliasFile:=$myFile.createAlias(File("/PACKAGE");"ReadMe") +``` + + + + +## .creationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the file. + +This property is **read-only**. + + + + + + +## .creationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationTime** : Time + +#### Description + +The `.creationTime` property returns the creation time of the file (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .delete() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.delete( )** + +| Parameter | Type | | Description | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.delete()` function deletes the file. + +If the file is currently open, an error is generated. + +If the file does not exist on disk, the function does nothing (no error is generated). +> **WARNING**: `.delete( )` can delete any file on a disk. This includes documents created with other applications, as well as the applications themselves. `.delete( )` should be used with extreme caution. Deleting a file is a permanent operation and cannot be undone. + +#### Example + +You want to delete a specific file in the database folder: + +```4d + $tempo:=File("/PACKAGE/SpecialPrefs/"+Current user+".prefs") + If($tempo.exists) + $tempo.delete() + ALERT("User preference file deleted.") + End if +``` + + + + +## .exists + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the file exists on disk, and false otherwise. + +This property is **read-only**. + + + + + + + +## .extension + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.extension** : Text +#### Description + +The `.extension` property returns the extension of the file name (if any). An extension always starts with ".". The property returns an empty string if the file name does not have an extension. + +This property is **read-only**. + + + + + + +## .fullName + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.fullName** : Text +#### Description + +The `.fullName` property returns the full name of the file, including its extension (if any). + +This property is **read-only**. + + + + +## .getAppInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.getAppInfo**() : Object +| Parameter | Type | | Description | +| --------- | ------ | -- | ----------------------------------------------------- | +| Result | Object | <- | Contents of .exe/.dll version resource or .plist file | + + +#### Description + +The `.getAppInfo()` function returns the contents of a **.exe**, **.dll** or **.plist** file information as an object. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function returns an empty object (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +**Returned object with a .exe or .dll file** + +> Reading a .exe or .dll is only possible on Windows. + +All property values are Text. + +| Property | Type | +| ---------------- | ---- | +| InternalName | Text | +| ProductName | Text | +| CompanyName | Text | +| LegalCopyright | Text | +| ProductVersion | Text | +| FileDescription | Text | +| FileVersion | Text | +| OriginalFilename | Text | + +**Returned object with a .plist file** + +The xml file contents is parsed and keys are returned as properties of the object, preserving their types (text, boolean, number). `.plist dict` is returned as a JSON object and `.plist array` is returned as a JSON array. + +#### Example + +```4d + // display copyright info of application .exe file (windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=$exeFile.getAppInfo() +ALERT($info.LegalCopyright) + + // display copyright info of an info.plist (any platform) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=$infoPlistFile.getAppInfo() +ALERT($info.Copyright) +``` + +#### See also + +[.setAppInfo()](#setappinfo) + + + +## .getContent() + +
          History +| Version | Changes | +| ------- | --------------- | +| v19 R2 | Returns 4D.Blob | +| v17 R5 | Added | +
          + +**.getContent( )** : 4D.Blob +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------ | +| Result | 4D.Blob | <- | File content | + + +#### Description + +The `.getContent()` function returns a `4D.Blob` object containing the entire content of a file. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + +**Returned value** + +A `4D.Blob` object. + +#### Example + +To save a document's contents in a `BLOB` field: + +```4d + var $vPath : Text + $vPath:=Select document("";"*";"Select a document";0) + If(OK=1) //If a document has been chosen + [aTable]aBlobField:=File($vPath;fk platform path).getContent() + End if +``` + + + + + + +## .getIcon() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Type | | Description | +| --------- | ------- | -- | --------------------------------------------- | +| size | Integer | -> | Side length for the returned picture (pixels) | +| Result | Picture | <- | Icon | + + +#### Description + +The `.getIcon()` function returns the icon of the file. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels (“large iconsâ€) or 16x16 pixels (“small iconsâ€). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the file does not exist on disk, a default blank icon is returned. + +**Returned value** + +File icon [picture](../Concepts/picture.html). + + + + + + +## .getText() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
          **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text + +| Parameter | Type | | Description | +| ----------- | ------- | -- | ------------------------------- | +| charSetName | Text | -> | Name of character set | +| charSetNum | Integer | -> | Number of character set | +| breakMode | Integer | -> | Processing mode for line breaks | +| Result | Text | <- | Text from the document | + + +#### Description +The `.getText()` function returns the contents of the file as text . + +Optionally, you can designate the character set to be used for reading the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If the document contains a Byte Order Mark (BOM), 4D uses the character set that it has set instead of the one specified in *charSetName* or *charSetNum* (this parameter is then ignored). If the document does not contain a BOM and if *charSetName* or *charSetNum* is omitted, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters in the document. The following constants of the "System Documents" theme are available: + +| Constant | Value | Comment | +| ----------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: CR (carriage return) under OS X, CRLF (carriage return + line feed) under Windows | +| `Document with CRLF` | 2 | Line breaks are converted to Windows format: CRLF (carriage return + line feed) | +| `Document with CR` | 3 | Line breaks are converted to OS X format: CR (carriage return) | +| `Document with LF` | 4 | Line breaks are converted to Unix format: LF (line feed) | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +**Returned value** + +Text of the file. + +#### Example + +Given the following text document (fields are separated by tabs): + +```4d +id name price vat +3 thé 1.06€ 19.6 +2 café 1.05€ 19.6 +``` + +When you execute this code: + + +```4d + $myFile:=Folder(fk documents folder).file("Billing.txt") //UTF-8 by default + $txt:=$myFile.getText() +``` +... you get: + +```4d + // $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6" + // \t = tab + // \r = CR +``` + + + + + + + +## .hidden + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the file is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + +## .isAlias + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isAlias** : Boolean + +#### Description + +The `.isAlias` property returns true if the file is an alias, a shortcut, or a symbolic link, and false otherwise. + +This property is **read-only**. + + + + + +## .isFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always true for a file. + +This property is **read-only**. + + + + + + +## .isFolder + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always false for a file. + +This property is **read-only**. + + + + + + +## .isWritable + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isWritable** : Boolean + +#### Description + +The `.isWritable` property returns true if the file exists on disk and is writable. +> The property checks the ability of the 4D application to write on the disk (access rights), it does not solely rely on the *writable* attribute of the file. + +This property is **read-only**. + +**Example** + +```4d + $myFile:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + If($myFile.isWritable) + $myNewFile:=$myFile.setText("Added text") + End if +``` + + + + + + +## .modificationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the file's last modification. + +This property is **read-only**. + + + + + + +## .modificationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationTime** : Time + +##### Description + +The `.modificationTime` property returns the time of the file's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + +## .moveTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.File +| Parameter | Type | | Description | +| ----------------- | --------- | -- | ---------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Full name for the moved file | +| Result | 4D.File | <- | Moved file | + + +#### Description + +The `.moveTo()` function moves or renames the `File` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the file retains its name when moved. If you want to rename the moved file, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + + +**Returned object** + +The moved `File` object. + +#### Example + + +```4d +$DocFolder:=Folder(fk documents folder) +$myFile:=$DocFolder.file("Current/Infos.txt") +$myFile.moveTo($DocFolder.folder("Archives");"Infos_old.txt") +``` + + + + +## .name + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.name** : Text + +#### Description + +The `.name` property returns the name of the file without extension (if any). + +This property is **read-only**. + + + + + +## .original + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.original** : 4D.File
          **.original** : 4D.Folder + +#### Description + +The `.original` property returns the target element for an alias, a shortcut, or a symbolic link file. The target element can be: + +* a file object +* a folder object + +For non-alias files, the property returns the same file object as the file. + +This property is **read-only**. + + + + + +## .parent + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the file. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +This property is **read-only**. + + + + + +## .path + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the file. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + + +## .platformPath + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the file expressed with the current platform syntax. + +This property is **read-only**. + + + + + +## .rename() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.rename**( *newName* : Text ) : 4D.File +| Parameter | Type | | Description | +| --------- | ------- | -- | -------------------------- | +| newName | Text | -> | New full name for the file | +| Result | 4D.File | <- | Renamed file | + +#### Description + +The `.rename()` function renames the file with the name you passed in *newName* and returns the renamed `File` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + +Note that the function modifies the full name of the file, i.e. if you do not pass an extension in *newName*, the file will have a name without an extension. + + +**Returned object** + +The renamed `File` object. + +#### Example + +You want to rename "ReadMe.txt" in "ReadMe_new.txt": + +```4d + $toRename:=File("C:\\Documents\\Archives\\ReadMe.txt";fk platform path) + $newName:=$toRename.rename($toRename.name+"_new"+$toRename.extension) +``` + + +## .setAppInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.setAppInfo**( *info* : Object ) +| Parameter | Type | | Description | +| --------- | ------ | -- | ---------------------------------------------------------------- | +| info | Object | -> | Properties to write in .exe/.dll version resource or .plist file | + + +#### Description + +The `.setAppInfo()` function writes the *info* properties as information contents of a **.exe**, **.dll** or **.plist** file. + +The function must be used with an existing .exe, .dll or .plist file. If the file does not exist on disk or is not a valid .exe, .dll or .plist file, the function does nothing (no error is generated). + +> The function only supports .plist files in xml format (text-based). An error is returned if it is used with a .plist file in binary format. + +***info* parameter object with a .exe or .dll file** + +> Writing a .exe or .dll file information is only possible on Windows. + +Each valid property set in the *info* object parameter is written in the version resource of the .exe or .dll file. Available properties are (any other property will be ignored): + +| Property | Type | +| ---------------- | ---- | +| InternalName | Text | +| ProductName | Text | +| CompanyName | Text | +| LegalCopyright | Text | +| ProductVersion | Text | +| FileDescription | Text | +| FileVersion | Text | +| OriginalFilename | Text | + +If you pass a null or empty text as value, an empty string is written in the property. If you pass a value type different from text, it is stringified. + + +***info* parameter object with a .plist file** + +Each valid property set in the *info* object parameter is written in the .plist file as a key. Any key name is accepted. Value types are preserved when possible. + +If a key set in the *info* parameter is already defined in the .plist file, its value is updated while keeping its original type. Other existing keys in the .plist file are left untouched. + +> To define a Date type value, the format to use is a json timestamp string formated in ISO UTC without milliseconds ("2003-02-01T01:02:03Z") like in the Xcode plist editor. + +#### Example + +```4d + // set copyright and version of a .exe file (Windows) +var $exeFile : 4D.File +var $info : Object +$exeFile:=File(Application file; fk platform path) +$info:=New object +$info.LegalCopyright:="Copyright 4D 2021" +$info.ProductVersion:="1.0.0" +$exeFile.setAppInfo($info) +``` + +```4d + // set some keys in an info.plist file (all platforms) +var $infoPlistFile : 4D.File +var $info : Object +$infoPlistFile:=File("/RESOURCES/info.plist") +$info:=New object +$info.Copyright:="Copyright 4D 2021" //text +$info.ProductVersion:=12 //integer +$info.ShipmentDate:="2021-04-22T06:00:00Z" //timestamp +$infoPlistFile.setAppInfo($info) +``` + +#### See also + +[.getAppInfo()](#getappinfo) + +## .setContent() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.setContent** ( *content* : Blob ) +| Parameter | Type | | Description | +| --------- | ---- | -- | ------------------------- | +| content | BLOB | -> | New contents for the file | + + +#### Description + +The `.setContent( )` function rewrites the entire content of the file using the data stored in the *content* BLOB. For information on BLOBs, please refer to the [BLOB](Concepts/dt_blob.md) section. + + +#### Example + +```4d + $myFile:=Folder(fk documents folder).file("Archives/data.txt") + $myFile.setContent([aTable]aBlobField) +``` + + + + + +## .setText() + + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.setText** ( *text* : Text {; *charSetName* : Text { ; *breakMode* : Integer } } )
          **.setText** ( *text* : Text {; *charSetNum* : Integer { ; *breakMode* : Integer } } ) + +| Parameter | Type | | Description | +| ----------- | ------- | -- | ------------------------------- | +| text | Text | -> | Text to store in the file | +| charSetName | Text | -> | Name of character set | +| charSetNum | Integer | -> | Number of character set | +| breakMode | Integer | -> | Processing mode for line breaks | +#### Description + +The `.setText()` function writes *text* as the new contents of the file. + +If the file referenced in the `File` object does not exist on the disk, it is created by the function. When the file already exists on the disk, its prior contents are erased, except if it is already open, in which case, its contents are locked and an error is generated. + +In *text*, pass the text to write to the file. It can be a literal ("my text"), or a 4D text field or variable. + +Optionally, you can designate the character set to be used for writing the contents. You can pass either: + +- in *charSetName*, a string containing the standard set name (for example "ISO-8859-1" or ""UTF-8"), +- or in *charSetNum*, the MIBEnum ID (number) of the standard set name. + +> For the list of character sets supported by 4D, refer to the description of the `CONVERT FROM TEXT` command. + +If a Byte Order Mark (BOM) exists for the character set, 4D inserts it into the file unless the character set used contains the suffix "-no-bom" (e.g. "UTF-8-no-bom"). If you do not specify a character set, by default 4D uses the "UTF-8" character set. + +In *breakMode*, you can pass a number indicating the processing to apply to end-of-line characters before saving them in the file. The following constants, found in the **System Documents** theme, are available: + +| Constant | Value | Comment | +| ----------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Document unchanged` | 0 | No processing | +| `Document with native format` | 1 | (Default) Line breaks are converted to the native format of the operating system: LF (carriage return) on macOS, CRLF (carriage return + line feed) on Windows | +| `Document with CRLF` | 2 | Line breaks are converted to CRLF (carriage return + line feed), the default Windows format | +| `Document with CR` | 3 | Line breaks are converted to CR (carriage return), the default Classic Mac OS format | +| `Document with LF` | 4 | Line breaks are converted to LF (line feed), the default Unix and macOS format | + +By default, when you omit the *breakMode* parameter, line breaks are processed in native mode (1). + +> **Compatibility Note**: compatibility options are available for EOL and BOM management. See [Compatibility page](https://doc.4d.com/4dv19R/help/title/en/page3239.html) on doc.4d.com. + +#### Example + +```4d +$myFile:=File("C:\\Documents\\Hello.txt";fk platform path) +$myFile.setText("Hello world") +``` + + + + + +## .size + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.size** : Real + +#### Description + +The `.size` property returns the size of the file expressed in bytes. If the file does not exist on disk, the size is 0. + +This property is **read-only**. + + + + + + diff --git a/website/translated_docs/pt/API/FolderClass.md b/website/translated_docs/pt/API/FolderClass.md new file mode 100644 index 00000000000000..225c4f0e63ddf5 --- /dev/null +++ b/website/translated_docs/pt/API/FolderClass.md @@ -0,0 +1,957 @@ +--- +id: FolderClass +title: Folder +--- + + + +`Folder` objects are created with the [`Folder`](#folder) command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the `Folder` command to create a new folder, a valid `Folder` object is created but nothing is actually stored on disk until you call the [`folder.create( )`](#create-) function. + +### Example + +The following example creates a "JohnSmith" folder: + +```code4d +Form.curfolder:=Folder(fk database folder) +Form.curfolder:=Folder("C:\\Users\\JohnSmith\\";fk platform path) +``` + +### Folder object + +| | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](#copyto)

              copies the `Folder` object into the specified *destinationFolder* | +| [**.create()** : Boolean](#create)

              creates a folder on disk according to the properties of the `Folder` object | +| [**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File](#createalias)

              creates an alias (macOS) or a shortcut (Windows) | +| [**.creationDate** : Date](#creationdate)

              the creation date of the folder | +| [**.creationTime** : Time](#creationtime)

              the creation time of the folder | +| [**.delete**( { *option* : Integer } )](#delete)

              deletes the folder | +| [**.exists** : Boolean](#exists)

              true if the folder exists on disk | +| [**.extension** : Text](#extension)

              returns the extension of the folder name (if any) | +| [**.fullName** : Text](#fullname)

              returns the full name of the folder, including its extension (if any) | +| [**.getIcon**( { *size* : Integer } ) : Picture](#geticon)

              returns the icon of the folder | +| [**.hidden** : Boolean](#hidden)

               true if the folder is set as "hidden" at the system level | +| [**.isAlias** : Boolean](#isalias)

              always **false** for a `Folder` object | +| [**.isFile** : Boolean](#isfile)

              always **false** for a folder | +| [**.isFolder** : Boolean](#isfolder)

              always **true** for a folder | +| [**.isPackage** : Boolean](#ispackage)

              true if the folder is a package on macOS (and exists on disk) | +| [**.modificationDate** : Date](#modificationdate)

               the date of the folder's last modification | +| [**.modificationTime** : Time](#modificationtime)

              the time of the folder's last modification | +| [**.name** : Text](#name)

               the name of the folder, without extension (if any) | +| [**.original** : 4D.Folder](#original)

              the same Folder object as the folder | +| [**.parent** : 4D.Folder](#parent)

              the parent folder object of the folder | +| [**.path** : Text](#path)

              the POSIX path of the folder | +| [**.platformPath** : Text](#platformpath)

              the path of the folder expressed with the current platform syntax | +| [**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder](#moveto)

              moves or renames the `Folder` object (source folder) into the specified *destinationFolder* | +| [**.rename**( *newName* : Text ) : 4D.Folder](#rename)

              renames the folder with the name you passed in *newName* and returns the renamed `Folder` object | + + + +## Folder + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**Folder** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
          **Folder** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +| Parameter | Type | | Description | +| -------------- | --------- |:--:| ----------------------------------------------- | +| path | Text | -> | Folder path | +| folderConstant | Integer | -> | 4D folder constant | +| pathType | Integer | -> | `fk posix path` (default) or `fk platform path` | +| * | | -> | * to return folder of host database | +| Result | 4D.Folder | <- | New folder object | + + +#### Description + +The `Folder` command creates and returns a new object of the `4D.Folder` type. The command accepts two syntaxes: + +**Folder ( path { ; pathType } { ; \* } )** + +In the *path* parameter, pass a folder path string. You can use a custom string or a filesystem (e.g., "/DATA"). + +> Only absolute pathnames are supported with the `Folder` command. + +By default, 4D expects a path expressed with the POSIX syntax. If you work with platform pathnames (Windows or macOS), you must declare it using the *pathType* parameter. The following constants are available: + +| Constant | Value | Comment | +| ---------------- | ----- | --------------------------------------------------------------------------------------- | +| fk platform path | 1 | Path expressed with a platform-specific syntax (mandatory in case of platform pathname) | +| fk posix path | 0 | Path expressed with POSIX syntax (default) | + +**Folder ( folderConstant { ; \* } )** + +In the *folderConstant* parameter, pass a 4D built-in or system folder, using one of the following constants: + +| Constant | Value | Comment | +| -------------------------- | ----- | --------------------------------------------------------------------------------------------------- | +| fk applications folder | 116 | | +| fk data folder | 9 | Associated filesystem: "/DATA" | +| fk database folder | 4 | Associated filesystem: "/PACKAGE" | +| fk desktop folder | 115 | | +| fk documents folder | 117 | Document folder of the user | +| fk licenses folder | 1 | Folder containing the machine's 4D license files | +| fk logs folder | 7 | Associated filesystem: "/LOGS" | +| fk mobileApps folder | 10 | Associated filesystem: "/DATA" | +| fk remote database folder | 3 | 4D database folder created on each 4D remote machine | +| fk resources folder | 6 | Associated filesystem: "/RESOURCES" | +| fk system folder | 100 | | +| fk user preferences folder | 0 | 4D folder that stores user preference files within the \ directory. | +| fk web root folder | 8 | Current Web root folder of the database: if within the package "/PACKAGE/path", otherwise full path | + +If the command is called from a component, pass the optional * parameter to get the path of the host database. Otherwise, if you omit the * parameter, a null object is always returned. + + +## 4D.Folder.new() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**4D.Folder.new** ( *path* : Text { ; *pathType* : Integer }{ ; *\** } ) : 4D.Folder
          **4D.Folder.new** ( *folderConstant* : Integer { ; *\** } ) : 4D.Folder + +#### Description + +The `4D.Folder.new()` function creates and returns a new object of the `4D.Folder` type. It is identical to the [`Folder`](#folder) command (shortcut). + +> It is recommended to use the [`Folder`](#folder) shortcut command instead of `4D.Folder.new()`. + + +## .copyTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder +| Parameter | Type | | Description | +| ----------------- | --------- |:--:| ------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Name for the copy | +| overwrite | Integer | -> | `fk overwrite` to replace existing elements | +| Result | 4D.Folder | <- | Copied file or folder | + + +#### Description + +The `.copyTo()` function copies the `Folder` object into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder is copied with the name of the original folder. If you want to rename the copy, pass the new name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +If a folder with the same name already exists in the *destinationFolder*, by default 4D generates an error. You can pass the `fk overwrite` constant in the *overwrite* parameter to ignore and overwrite the existing file + +| Constant | Value | Comment | +| -------------- | ----- | ----------------------------------- | +| `fk overwrite` | 4 | Overwrite existing elements, if any | + + +**Returned value** + +The copied `Folder` object. + +#### Example + +You want to copy a Pictures *folder* from the user's Document folder to the Database folder: + +```4d +var $userImages; $copiedImages : 4D.Folder +$userImages:=Folder(fk documents folder+"/Pictures/") +$copiedImages:=$userImages.copyTo(Folder(fk database folder);fk overwrite) +``` + + + + + +## .create() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + + +**.create()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------------------------------------------------------ | +| Result | Boolean | <- | True if the folder was created successfully, false otherwise | + + + +#### Description + +The `.create()` function creates a folder on disk according to the properties of the `Folder` object. + +If necessary, the function creates the folder hierachy as described in the [platformPath](#platformpath) or [path](#path) properties. If the folder already exists on disk, the function does nothing (no error is thrown) and returns false. + +**Returned value** + +* **True** if the folder is created successfully; +* **False** if a folder with the same name already exists or if an error occured. + +#### Example 1 + +Create an empty folder in the database folder: + +```4d +var $created : Boolean +$created:=Folder("/PACKAGE/SpecialPrefs").create() +``` + +#### Example 2 + +Creation of the "/Archives2019/January/" folder in the database folder: + +```4d +$newFolder:=Folder("/PACKAGE/Archives2019/January") +If($newFolder.create()) + ALERT("The "+$newFolder.name+" folder was created.") +Else + ALERT("Impossible to create a "+$newFolder.name+" folder.") +End if +``` + + + + + +## .createAlias() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + + +**.createAlias**( *destinationFolder* : 4D.Folder ; *aliasName* : Text { ; *aliasType* : Integer } ) : 4D.File + +| Parameter | Type | | Description | +| ----------------- | --------- | -- | -------------------------------------------- | +| destinationFolder | 4D.Folder | -> | Destination folder for the alias or shortcut | +| aliasName | Text | -> | Name of the alias or shortcut | +| aliasType | Integer | -> | Type of the alias link | +| Result | 4D.File | <- | Alias or shortcut reference | + + +#### Description + +The `.createAlias()` function creates an alias (macOS) or a shortcut (Windows) to the folder with the specified *aliasName* name in the folder designated by the *destinationFolder* object. + +Pass the name of the alias or shortcut to create in the *aliasName* parameter. + +By default on macOS, the function creates a standard alias. You can also create a symbolic link by using the *aliasType* parameter. The following constants are available: + +| Constant | Value | Comment | +| ------------------ | ----- | -------------------------- | +| `fk alias link` | 0 | Alias link (default) | +| `fk symbolic link` | 1 | Symbolic link (macOS only) | + +On Windows, a shortcut (.lnk file) is always created (the *aliasType* parameter is ignored). + +**Returned object** + +A `4D.File` object with the `isAlias` property set to **true**. + +#### Example + +You want to create an alias to an archive folder in your database folder: + +```4d +$myFolder:=Folder("C:\\Documents\\Archives\\2019\\January";fk platform path) +$aliasFile:=$myFolder.createAlias(Folder("/PACKAGE");"Jan2019") +``` + + +## .creationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationDate** : Date + +#### Description + +The `.creationDate` property returns the creation date of the folder. + +This property is **read-only**. + + + + +## .creationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.creationTime** : Time + + +#### Description + +The `.creationTime` property returns the creation time of the folder (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + +## .delete() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + + +**.delete**( { *option* : Integer } ) + +| Parameter | Type | | Description | +| --------- | ------- | -- | ---------------------- | +| option | Integer | -> | Folder deletion option | + + + +#### Description + +The `.delete()` function deletes the folder. + +By default, for security reasons, if you omit the option parameter, `.delete( )` only allows empty folders to be deleted. If you want the command to be able to delete folders that are not empty, you must use the option parameter with one of the following constants: + +| Constant | Value | Comment | +| ---------------------- | ----- | ------------------------------------------------ | +| `Delete only if empty` | 0 | Deletes folder only when it is empty | +| `Delete with contents` | 1 | Deletes folder along with everything it contains | + +When `Delete only if empty` is passed or if you omit the option parameter: + +* The folder is only deleted if it is empty; otherwise, the command does nothing and an error -47 is generated. +* If the folder does not exist, the error -120 is generated. + +When `Delete with contents` is passed: + +* The folder, along with all of its contents, is deleted. **Warning**: Even when this folder and/or its contents are locked or set to read-only, if the current user has suitable access rights, the folder (and contents) is still deleted. +* If this folder, or any of the files it contains, cannot be deleted, deletion is aborted as soon as the first inaccessible element is detected, and an error(*) is returned. In this case, the folder may be only partially deleted. When deletion is aborted, you can use the `GET LAST ERROR STACK` command to retrieve the name and path of the offending file. +* If the folder does not exist, the command does nothing and no error is returned. (*) Windows: -54 (Attempt to open locked file for writing) macOS: -45 (The file is locked or the pathname is not correct) + + + + +## .exists + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.exists** : Boolean + +#### Description + +The `.exists` property returns true if the folder exists on disk, and false otherwise. + +This property is **read-only**. + + + + + +## .extension + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.extension** : Text + +#### Description + +The `.extension` property returns the extension of the folder name (if any). An extension always starts with ".". The property returns an empty string if the folder name does not have an extension. + +This property is **read-only**. + + + + + +## .file() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.file**( *path* : Text ) : 4D.File +| Parameter | Type | | Description | +| --------- | ------- | -- | ------------------------------------ | +| path | Text | -> | Relative POSIX file pathname | +| Result | 4D.File | <- | `File` object (null if invalid path) | + +#### Description + +The `.file()` function creates a `File` object inside the `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the file to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `File` object or null if *path* is invalid. + +#### Example + +```4d +var $myPDF : 4D.File +$myPDF:=Folder(fk documents folder).file("Pictures/info.pdf") +``` + + + + + +## .files() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.files**( { *options* : Integer } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- | -- | ----------------------------------- | +| options | Integer | -> | File list options | +| Result | Collection | <- | Collection of children file objects | + +#### Description + +The `.files()` function returns a collection of `File` objects contained in the folder. +> Aliases or symbolic links are not resolved. + +By default, if you omit the *options* parameter, only the files at the first level of the folder are returned in the collection, as well as invisible files or folders. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Value | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `File` objects. + +#### Example 1 + +You want to know if there are invisible files in the Database folder: + +```4d + var $all; $noInvisible : Collection + $all:=Folder(fk database folder).files() + $noInvisible:=Folder(fk database folder).files(fk ignore invisible) + If($all.length#$noInvisible.length) + ALERT("Database folder contains hidden files.") + End if +``` + +#### Example 2 + +You want to get all files that are not invisible in the Documents folder: + +```4d + var $recursive : Collection + $recursive:=Folder(fk documents folder).files(fk recursive+fk ignore invisible) +``` + + + + + +## .folder() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.folder**( *path* : Text ) : 4D.Folder +| Parameter | Type | | Description | +| --------- | --------- | -- | ---------------------------------------------- | +| path | Text | -> | Relative POSIX file pathname | +| Result | 4D.Folder | <- | Created folder object (null if invalid *path*) | + +#### Description + +The `.folder()` function creates a `Folder` object inside the parent `Folder` object and returns its reference. + +In *path*, pass a relative POSIX path to designate the folder to return. The path will be evaluated from the parent folder as root. + +**Returned value** + +A `Folder` object or null if *path* is invalid. + +#### Example + +```4d + var $mypicts : 4D.Folder + $mypicts:=Folder(fk documents folder).folder("Pictures") +``` + + + + + +## .folders() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.folders**( { *options* : Integer } ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- | -- | ------------------------------------- | +| options | Integer | -> | Folder list options | +| Result | Collection | <- | Collection of children folder objects | + +#### Description + +The `.folders()` function returns a collection of `Folder` objects contained in the parent folder. + +By default, if you omit the *options* parameter, only the folders at the first level of the folder are returned in the collection. You can modify this by passing, in the *options* parameter, one or more of the following constants: + +| Constant | Value | Comment | +| --------------------- | ----- | ----------------------------------------------------------------------------------- | +| `fk recursive` | 1 | The collection contains files or folders of the specified folder and its subfolders | +| `fk ignore invisible` | 8 | Invisible files or folders are not listed | + +**Returned value** + +Collection of `Folder` objects. + +#### Example + +You want the collection of all folders and subfolders of the database folder: + +```4d + var $allFolders : Collection + $allFolders:=Folder("/PACKAGE").folders(fk recursive) +``` + + + + + +## .fullName + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.fullName** : Text + +#### Description + +The `.fullName` property returns the full name of the folder, including its extension (if any). + +This property is **read-only**. + + + + + +## .getIcon() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.getIcon**( { *size* : Integer } ) : Picture +| Parameter | Type | | Description | +| --------- | ------- | -- | --------------------------------------------- | +| size | Integer | -> | Side length for the returned picture (pixels) | +| Result | Picture | <- | Icon | + + +#### Description + +The `.getIcon()` function returns the icon of the folder. + +The optional *size* parameter specifies the dimensions in pixels of the returned icon. This value actually represents the length of the side of the square containing the icon. Icons are usually defined in 32x32 pixels ("large icons") or 16x16 pixels ("small icons"). If you pass 0 or omit this parameter, the "large icon" version is returned. + +If the folder does not exist on disk, a default blank icon is returned. + +**Returned value** + +Folder icon [picture](Concepts/dt_picture.md). + + + + + +## .hidden + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.hidden** : Boolean + +#### Description + +The `.hidden` property returns true if the folder is set as "hidden" at the system level, and false otherwise. + +This property is **read-only**. + + + + + + +## .isAlias + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isAlias** : Boolean + + +#### Description + +The `.isAlias` property returns always **false** for a `Folder` object. + +This property is **read-only**. + + + + + + +## .isFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFile** : Boolean + +#### Description + +The `.isFile` property returns always **false** for a folder. + +This property is **read-only**. + + + + + + +## .isFolder + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isFolder** : Boolean + +#### Description + +The `.isFolder` property returns always **true** for a folder. + +This property is **read-only**. + + + + + + +## .isPackage + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.isPackage** : Boolean + +#### Description + +The `.isPackage` property returns true if the folder is a package on macOS (and exists on disk). Otherwise, it returns false. + +On Windows, `.isPackage` always returns **false**. + +This property is **read-only**. + + + + + + +## .modificationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationDate** : Date + +#### Description + +The `.modificationDate` property returns the date of the folder's last modification. + +This property is **read-only**. + + + + + + +## .modificationTime + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.modificationTime** : Time + +#### Description + +The `.modificationTime` property returns the time of the folder's last modification (expressed as a number of seconds beginning at 00:00). + +This property is **read-only**. + + + + + + +## .moveTo() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + +**.moveTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } ) : 4D.Folder +| Parameter | Type | | Description | +| ----------------- | --------- | -- | ------------------------------ | +| destinationFolder | 4D.Folder | -> | Destination folder | +| newName | Text | -> | Full name for the moved folder | +| Result | 4D.Folder | <- | Moved folder | + + +#### Description + +The `.moveTo( )` function moves or renames the `Folder` object (source folder) into the specified *destinationFolder*. + +The *destinationFolder* must exist on disk, otherwise an error is generated. + +By default, the folder retains its name when moved. If you want to rename the moved folder, pass the new full name in the *newName* parameter. The new name must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. + +**Returned object** + +The moved `Folder` object. + +#### Example + +You want to move and rename a folder: + +```4d + var $tomove; $moved : Object + $docs:=Folder(fk documents folder) + $tomove:=$docs.folder("Pictures") + $tomove2:=$tomove.moveTo($docs.folder("Archives");"Pic_Archives") +``` + + +## .name + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + + + +**.name** : Text + +#### Description + +The `.name` property returns the name of the folder, without extension (if any). + +This property is **read-only**. + + + + + + +## .original + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.original** : 4D.Folder + +#### Description + +The `.original` property returns the same Folder object as the folder. + +This property is **read-only**. +> This property is available on folders to allow generic code to process folders or files. + + + + + + +## .parent + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.parent** : 4D.Folder + +#### Description + +The `.parent` property returns the parent folder object of the folder. If the path represents a system path (e.g., "/DATA/"), the system path is returned. + +If the folder does not have a parent (root), the null value is returned. + +This property is **read-only**. + + + + + + +## .path + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.path** : Text + +#### Description + +The `.path` property returns the POSIX path of the folder. If the path represents a filesystem (e.g., "/DATA/"), the filesystem is returned. + +This property is **read-only**. + + + + + +## .platformPath + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the folder expressed with the current platform syntax. + +This property is **read-only**. + + + + + + +## .rename() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.rename**( *newName* : Text ) : 4D.Folder + +| Parameter | Type | | Description | +| --------- | --------- | -- | ---------------------------- | +| newName | Text | -> | New full name for the folder | +| Result | 4D.Folder | <- | Renamed folder | + + + +#### Description + +The `.rename()` function renames the folder with the name you passed in *newName* and returns the renamed `Folder` object. + +The *newName* parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a file with the same name already exists, an error is returned. + + +**Returned object** + +The renamed `Folder` object. + +#### Example + + +```4d + var $toRename : 4D.Folder + $toRename:=Folder("/RESOURCES/Pictures").rename("Images") +``` + + diff --git a/website/translated_docs/pt/API/FunctionClass.md b/website/translated_docs/pt/API/FunctionClass.md new file mode 100644 index 00000000000000..1242063386f6ed --- /dev/null +++ b/website/translated_docs/pt/API/FunctionClass.md @@ -0,0 +1,420 @@ +--- +id: FunctionClass +title: Formula +--- + + + +The [Formula](#formula) and [Formula from string](#formula-from-string) commands allow you to create native [`4D.Function` objects](#about-4dfunction-objects) to execute any 4D expression or code expressed as text. + + +### Formula Objects + +Formula objects can be encapsulated in object properties: + +```4d + var $f : 4D.Function + $f:=New object + $f.message:=Formula(ALERT("Hello world")) +``` + +This property is an "object function", i.e. a function which is bound to its parent object. To execute a function stored in an object property, use the **()** operator after the property name, such as: + +```4d + $f.message() //displays "Hello world" +``` + +Syntax with brackets is also supported: + +```4d + $f["message"]() //displays "Hello world" +``` + +Note that, even if it does not have parameters (see below), an object function 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 + $o:=$f.message //returns the formula object in $o +``` + +You can also execute a function using the [`apply()`](#apply) and [`call()`](#call) functions: + +```4d + $f.message.apply() //displays "Hello world" +``` + +#### Passing parameters + +You can pass parameters to your formulas using the [sequential parameter syntax](Concepts/parameters.md#sequential-parameters) based upon $1, $2...$n. For example, you can write: + +```4d + var $f : Object + $f:=New object + $f.message:=Formula(ALERT("Hello "+$1)) + $f.message("John") //displays "Hello John" +``` + +Or using the [.call()](#call) function: + +```4d + var $f : Object + $f:=Formula($1+" "+$2) + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call(Null;"Welcome to";String(Year of(Current date))) //returns "Welcome to 2019" (for example) +``` + +#### Parameters to a single method + +For more convenience, when the formula is made of a single project method, parameters can be omitted in the formula object initialization. They can just be passed when the formula is called. For example: + +```4d + var $f : 4D.Function + + $f:=Formula(myMethod) + //Writing Formula(myMethod($1;$2)) is not necessary + $text:=$f.call(Null;"Hello";"World") //returns "Hello World" + $text:=$f.call() //returns "How are you?" + + //myMethod + #DECLARE ($param1 : Text; $param2 : Text)->$return : Text + If(Count parameters=2) + $return:=$param1+" "+$param2 + Else + $return:="How are you?" + End if +``` + +Parameters are received within the method, in the order they are specified in the call. + +### About 4D.Function objects + +A `4D.Function` object contains a piece of code that can be executed from an object, either using the `()` operator, or using the [`apply()`](#apply) and [`call()`](#call) functions. 4D proposes three kinds of Function objects: + +- native functions, i.e. built-in functions from various 4D classes such as `collection.sort()` or `file.copyTo()`. +- user functions, created in user [classes](Concepts/classes.md) using the [Function keyword](Concepts/classes.md#function). +- formula functions, i.e. functions that can execute any 4D formula. + + + +### Summary + + +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.apply**() : any
          **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any](#apply)

              executes the `formula` object to which it is applied and returns the resulting value | +| [**.call**() : any
          **.call**( *thisObj* : Object { ; ...*params* : any } ) : any](#call)

              executes the `formula` object to which it is applied and returns the resulting value | +| [**.source** : Text ](#source)

              contains the source expression of the `formula` as text | + + + + +## Formula + +

          History +| Version | Changes | +| ------- | -------------------------------- | +| v17 R6 | Renamed (New formula -> Formula) | +| v17 R3 | Added | +
          + +**Formula** ( *formulaExp* : Expression ) : 4D.Function +| Parameter | Type | | Description | +| ---------- | ----------- |:--:| ----------------------------------------- | +| formulaExp | Expression | -> | Formula to be returned as object | +| Result | 4D.Function | <- | Native function encapsulating the formula | + + +#### Description + +The `Formula` command creates a `4D Function` object based upon the *formulaExp* expression. *formulaExp* can be as simple as a single value or complex, such as a project method with parameters. + +Having a formula as an object allows it to be passed as a parameter (calculated attribute) to commands or methods or to be executed from various components without needing to declare them as "shared by components and host database". When called, the formula object is evaluated within the context of the database or component that created it. + +The returned formula can be called with: + +* [`.call()`](#call) or [`.apply()`](#apply) methods, or +* object notation syntax (see [formula object](#formula-object)). + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + $o:=New object("myFormula";$f) + + //three different ways to call the formula + $f.call($o) //returns 3 + $f.apply($o) //returns 3 + $o.myFormula() //returns 3 +``` + +You can pass [parameters](#passing-parameters) to the `Formula`, as seen below in [example 4](#example-4). + +You can specify the object on which the formula is executed, as seen in [example 5](#example-5). The properties of the object can then be accessed via the `This` command. + +If *formulaExp* uses local variables, their values are copied and stored in the returned formula object when it is created. When executed, the formula uses these copied values rather than the current value of the local variables. Note that using arrays as local variables is not supported. + +The object created by `Formula` can be saved, for example, in a database field or in a blob document. + + +#### Example 1 + +A simple formula: + +```4d + var $f : 4D.Function + $f:=Formula(1+2) + + var $o : Object + $o:=New object("f";$f) + + $result:=$o.f() // returns 3 +``` + +#### Example 2 + +A formula using local variables: + +```4d + + + $value:=10 + $o:=New object("f";Formula($value)) + $value:=20 + + $result:=$o.f() // returns 10 +``` + + +#### Example 3 + +A simple formula using parameters: + +```4d + $o:=New object("f";Formula($1+$2)) + $result:=$o.f(10;20) //returns 30 +``` + + +#### Example 4 + +A formula using a project method with parameters: + +```4d + $o:=New object("f";Formula(myMethod)) + $result:=$o.f("param1";"param2") // equivalent to $result:=myMethod("param1";"param2") +``` + + +#### Example 5 + +Using `This`: + +```4d + $o:=New object("fullName";Formula(This.firstName+" "+This.lastName)) + $o.firstName:="John" + $o.lastName:="Smith" + $result:=$o.fullName() //returns "John Smith" +``` + +#### Example 6 + +Calling a formula using object notation: + +```4d + var $feta; $robot : Object + var $calc : 4D.Function + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + //sets the formula to object properties + $feta.calc:=$calc + $robot.calc:=$calc + + //call the formula + $feta.calc() // $feta={name:Feta,price:12.5,quantity:5,total:62.5,calc:"[object Formula]"} + $robot.calc() // $robot={name:Robot,price:543,quantity:2,total:1086,calc:"[object Formula]"} +``` + + + + +## Formula from string + +
          History +| Version | Changes | +| ------- | ------------------------------------------------------ | +| v17 R6 | Renamed New formula from string -> Formula from string | +| v17 R3 | Added | +
          + +**Formula from string**( *formulaString* : Text ) : 4D.Function +| Parameter | Type | | Description | +| ------------- | ----------- |:--:| --------------------------------------- | +| formulaString | Text | -> | Text formula to be returned as object | +| Result | 4D.Function | <- | Native object encapsulating the formula | + + +#### Description + +The `Formula from string` command creates a 4D.Function object based upon the *formulaString*. *formulaString* can be as simple as a single value or complex, such as a project method with parameters. + +This command is similar to [`Formula`](#formula), except that it handles a text-based formula. In most cases, it is recommended to use the `Formula` command. `Formula from string` should only be used when the original formula was expressed as text (e.g., stored externally in a JSON file). In this context, using syntax with tokens is highly advised. +> Because local variable contents can not be accessed by name in compiled mode, they can not be used in *formulaString*. An attempt to access a local variable with `Formula from string` will result in an error (-10737). + + +#### Example + +The following code will create a dialog accepting a formula in text format: + +```4d + var $textFormula : Text + var $f : 4D.Function + $textFormula:=Request("Please type a formula") + If(ok=1) + $f:=Formula from string($textFormula) + ALERT("Result = "+String($f.call())) + End if +``` + +![](assets/en/API/formulaDialog.png) + + +...and execute the formula: + + +![](assets/en/API/formulaAlert.png) + + + + + + +## .apply() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R3 | Added | +
          + +**.apply**() : any
          **.apply**( *thisObj* : Object { ; *formulaParams* : Collection } ) : any +| Parameter | Type | | Description | +| ------------- | ---------- |:--:| ----------------------------------------------------------------------- | +| thisObj | Object | -> | Object to be returned by the This command in the formula | +| formulaParams | Collection | -> | Collection of values to be passed as $1...$n when `formula` is executed | +| Result | any | <- | Value from formula execution | + + +#### Description + +The `.apply()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass a collection to be used as $1...$n parameters in the formula using the optional *formulaParams* parameter. + +Note that `.apply()` is similar to [`.call()`](#call) except that parameters are passed as a collection. This can be useful for passing calculated results. + + +#### Example 1 + +```4d + var $f : 4D.Function + $f:=Formula($1+$2+$3) + + $c:=New collection(10;20;30) + $result:=$f.apply(Null;$c) // returns 60 +``` + + +#### Example 2 + +```4d + var $calc : 4D.Function + var $feta; $robot : Object + $robot:=New object("name";"Robot";"price";543;"quantity";2) + $feta:=New object("name";"Feta";"price";12.5;"quantity";5) + + $calc:=Formula(This.total:=This.price*This.quantity) + + $calc.apply($feta) // $feta={name:Feta,price:12.5,quantity:5,total:62.5} + $calc.apply($robot) // $robot={name:Robot,price:543,quantity:2,total:1086} +``` + + + +## .call() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R3 | Added | +
          + +**.call**() : any
          **.call**( *thisObj* : Object { ; ...*params* : any } ) : any +| Parameter | Type | | Description | +| --------- | ------ | -- | --------------------------------------------------------- | +| thisObj | Object | -> | Object to be returned by the This command in the formula | +| params | any | -> | Value(s) to be passed as $1...$n when formula is executed | +| Result | any | <- | Value from formula execution | + + +#### Description + +The `.call()` function executes the `formula` object to which it is applied and returns the resulting value. The formula object can be created using the `Formula` or `Formula from string` commands. + +In the *thisObj* parameter, you can pass a reference to the object to be used as `This` within the formula. + +You can also pass values to be used as *$1...$n* parameters in the formula using the optional *params* parameter(s). + +Note that `.call()` is similar to [`.apply()`](#apply) except that parameters are passed directly. + +#### Example 1 + +```4d + var $f : 4D.Function + $f:=Formula(Uppercase($1)) + $result:=$f.call(Null;"hello") // returns "HELLO" +``` + +#### Example 2 + +```4d + $o:=New object("value";50) + $f:=Formula(This.value*2) + $result:=$f.call($o) // returns 100 +``` + + + + +## .source + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.source** : Text + +#### Description + +The `.source` property contains the source expression of the `formula` as text. + +This property is **read-only**. + +#### Example + +```4d + var $of : 4D.Function + var $tf : Text + $of:=Formula(String(Current time;HH MM AM PM)) + $tf:=$of.source //"String(Current time;HH MM AM PM)" +``` + + + + + diff --git a/website/translated_docs/pt/API/IMAPTransporterClass.md b/website/translated_docs/pt/API/IMAPTransporterClass.md new file mode 100644 index 00000000000000..0ac4388c3ffa52 --- /dev/null +++ b/website/translated_docs/pt/API/IMAPTransporterClass.md @@ -0,0 +1,1966 @@ +--- +id: IMAPTransporterClass +title: IMAPTransporter +--- + +The `IMAPTransporter` class allows you to retrieve messages from a IMAP email server. + + +### IMAP Transporter object + +IMAP Transporter objects are instantiated with the [IMAP New transporter](#imap-new-transporter) command. They provide the following properties and functions: + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | +| [**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
          **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
          **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#addflags)

              adds flags to the `msgIDs` for the specified `keywords` | +| [**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object](#append)

              appends a `mailObj` to the `destinationBox` | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

               checks the connection using information stored in the transporter object | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

              the maximum time (in seconds) allowed prior to checking the connection to the server | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
          **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#copy)

              copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server | +| [**.createBox**( *name* : Text ) : Object](#createbox)

              creates a mailbox with the given `name` | +| [**.delete**( *msgsIDs* : Collection ) : Object
          **.delete**( *allMsgs* : Integer ) : Object](#delete)

              sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs` | +| [**.deleteBox**( *name* : Text ) : Object](#deletebox)

              permanently removes the mailbox with the given `name` from the IMAP server | +| [**.expunge()** : Object](#expunge)

              removes all messages with the "deleted" flag from the IMAP mail server. | +| [**.getBoxInfo**( { *name* : Text }) : Object](#getboxinfo)

              returns a `boxInfo` object corresponding to the mailbox *name* | +| [**.getBoxList**( { *parameters* : Object } ) : Collection](#getboxlist)

              returns a collection of mailboxes describing all of the available mailboxes | +| [**.getDelimiter()** : Text](#getdelimiter)

              returns the character used to delimit levels of hierarchy in the mailbox name | +| [**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
          **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object](#getmail)

              returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
          **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object](#getmails)

              returns an object containing a collection of `Email` objects | +| [**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
          **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob](#getmimeasblob)

              returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter` | +| [**.host** : Text](#host)

              the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | +| [ | + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
          **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object](#move)

              moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server| |[**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection](#numtoid)

              converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg*| |[**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
          **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
          **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object](#removeflags)

              removes flags from the `msgIDs` for the specified `keywords`| |[**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object](#renamebox)

              changes the name of a mailbox on the IMAP server| |[**.port** : Integer](#port)

               the port number used for mail transactions| |[**.searchMails**( *searchCriteria* : Text ) : Collection](#searchmails)

              searches for messages that match the given *searchCriteria* in the current mailbox| |[**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object](#selectbox)

              selects the `name` mailbox as the current mailbox| |[**.subscribe**( *name* : Text ) : Object](#subscribe)

              allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes| |[**.unsubscribe**( *name* : Text ) : Object](#unsubscribe)

              removes a mailbox from a set of subscribed mailboxes| |[**.user** : Text](#user)

               the user name used for authentication on the mail server| + + + +## IMAP New transporter + +

          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**IMAP New transporter**( *server* : Object ) : 4D.IMAPTransporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Object | -> | Mail server information | +| Result | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + + +#### Description + +The `IMAP New transporter` command configures a new IMAP connection according to the *server* parameter and returns a new *transporter* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
          .**accessTokenOAuth2**: Object

          Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.checkConnectionDelay** : Integer](#checkconnectiondelay)

              the maximum time (in seconds) allowed prior to checking the connection to the server | 300 | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

              the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | none | +| .**password** : Text

          User password for authentication on the server. Not returned in *[IMAP transporter](#imap-transporter-object)* object. | none | +| [**.port** : Integer](#port)

               the port number used for mail transactions | 993 | +| [**.user** : Text](#user)

               the user name used for authentication on the mail server | none | +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + +#### Result + +The function returns an [**IMAP transporter object**](#imap-transporter-object). All returned properties are **read-only**. +> The IMAP connection is automatically closed when the transporter object is destroyed. + +#### Example + +```4d +$server:=New object +$server.host:="imap.gmail.com" //Mandatory +$server.port:=993 +$server.user:="4d@gmail.com" +$server.password:="XXXXXXXX" +$server.logFile:="LogTest.txt" //log to save in the Logs folder + +var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + +$status:=$transporter.checkConnection() +If(Not($status.success)) + ALERT("An error occurred: "+$status.statusText) +End if +``` + + +## 4D.IMAPTransporter.new() + + +**4D.IMAPTransporter.new**( *server* : Object ) : 4D.IMAPTransporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Object | -> | Mail server information | +| Result | 4D.IMAPTransporter | <- | [IMAP transporter object](#imap-transporter-object) | + +#### Description + +The `4D.IMAPTransporter.new()` function creates and returns a new object of the `4D.IMAPTransporter` type. It is identical to the [`IMAP New transporter`](#imap-new-transporter) command (shortcut). + +## .acceptUnsecureConnection + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + +## .addFlags() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.addFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
          **.addFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
          **.addFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Parameter | Type | | Description | +| --------- | ---------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Collection | -> | Collection of strings: Message unique IDs (text)
          Text: Unique ID of a message
          Longint (IMAP all): All messages in the selected mailbox | +| keywords | Object | -> | Keyword flags to add | +| Result | Object | <- | Status of the addFlags operation | + + +#### Description + +The `.addFlags()` function adds flags to the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Value | Comment | + | -------- | ----- | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to add to `msgIDs`. You can pass any of the following keywords: + +| Parameter | Type | Description | +| --------- | ------- | ---------------------------------------------- | +| $draft | Boolean | True to add the "draft" flag to the message | +| $seen | Boolean | True to add the "seen" flag to the message | +| $flagged | Boolean | True to add the "flagged" flag to the message | +| $answered | Boolean | True to add the "answered" flag to the message | +| $deleted | Boolean | True to add the "deleted" flag to the message | +> * False values are ignored. +> * The interpretation of keyword flags may vary per mail client. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as read/seen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.addFlags(IMAP all;$flags) +``` + + + +## .append() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.append**( *mailObj* : Object ; *destinationBox* : Text ; *options* : Object ) : Object +| Parameter | Type | | Description | +| -------------- | ------ |:--:| ------------------------------- | +| mailObj | Object | -> | Email object | +| destinationBox | Text | -> | Mailbox to receive Email object | +| options | Object | -> | Object containing charset info | +| Result | Object | <- | Status of the delete operation | + + +#### Description + +The `.append()` function appends a `mailObj` to the `destinationBox`. + +In the `mailObj` parameter, pass an Email object. For a comprehensive description of mail properties, see [Email object](emails.html#email-object). The `.append()` function supports keyword tags in the Email object's `keywords` attribute. + +The optional `destinationBox` parameter lets you pass the name of a mailbox where the `mailObj` will be appended. If omitted, the current mailbox is used. + +In the optional `options` parameter, you can pass an object to define the charset and encoding for specific parts of the email. Available properties: + +| Property | Type | Description | +| ------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| headerCharset | Text | Charset and encoding used for the following parts of the email: subject, attachment filenames, and email name attribute(s). Possible values: See possible charsets table below | +| bodyCharset | Text | Charset and encoding used for the html and text body contents of the email. Possible values: See possible charsets table below | + +Possible charsets: + +| Constant | Value | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
          • headerCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • bodyCharset: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          | +| mail mode ISO88591 | ISO-8859-1 |
          • headerCharset: ISO-8859-1 & Quoted-printable
          • bodyCharset: ISO-8859-1 & 8-bit
          | +| mail mode UTF8 | US-ASCII_UTF8_QP | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | headerCharset & bodyCharset: US-ASCII if possible, otherwise UTF-8 & base64 | + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Example + +To save an email in the Drafts mailbox: + +```4d +var $settings; $status; $msg; $imap: Object + +$settings:=New object("host"; "domain.com"; "user"; "xxxx"; "password"; "xxxx"; "port"; 993) + +$imap:=IMAP New transporter($settings) + +$msg:=New object +$msg.from:="xxxx@domain.com" +$msg.subject:="Lorem Ipsum" +$msg.textBody:="Lorem ipsum dolor sit amet, consectetur adipiscing elit." +$msg.keywords:=New object +$msg.keywords["$seen"]:=True//flag the message as read +$msg.keywords["$draft"]:=True//flag the message as a draft + +$status:=$imap.append($msg; "Drafts") +``` + + + + + + + + + + +## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.authenticationMode** : Text +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + + + + + + +## .checkConnection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.checkConnection()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------------- | +| Result | Object | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Property | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + + + +## .checkConnectionDelay + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.checkConnectionDelay** : Integer + +#### Description + +The `.checkConnectionDelay` property contains the maximum time (in seconds) allowed prior to checking the connection to the server. If this time is exceeded between two method calls, the connection to the server will be checked. By default, if the property has not been set in the *server* object, the value is 300. +> **Warning**: Make sure the defined timeout is lower than the server timeout, otherwise the client timeout will be useless. + + + +## .connectionTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + +## .copy() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.copy**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
          **.copy**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Parameter | Type | | Description | +| -------------- | ---------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Integer | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Text | -> | Mailbox to receive copied messages | +| Result | Object | <- | Status of the copy operation | + + +#### Description + +The `.copy()` function copies the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to copy, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to copy all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the copies of messages will be placed. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Example 1 + +To copy a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // copy found messages to the "documents" mailbox + $status:=$transporter.copy($mailIds;"documents") +``` + +#### Example 2 + +To copy all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + + $boxInfo:=$transporter.selectBox("inbox") + + // copy all messages to the "documents" mailbox + $status:=$transporter.copy(IMAP all;"documents") +``` + + + +## .createBox() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.createBox**( *name* : Text ) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ---------------------------------------- | +| name | Text | -> | Name of the new mailbox | +| Result | Object | <- | Status of the mailbox creation operation | + + +#### Description + +The `.createBox()` function creates a mailbox with the given `name`. If the IMAP server’s hierarchy separator character appears elsewhere in the mailbox name, the IMAP server will create any parent names needed to create the given mailbox. + +In other words, an attempt to create "Projects/IMAP/Doc" on a server in which "/" is the hierarchy separator character will create: + +* Only the "Doc" mailbox if "Projects" & "IMAP" already exist. +* "IMAP" & "Doc" mailboxes if only “Projects†already exists. +* "Projects" & “IMAP†& "Doc" mailboxes, if they do not already exist. + +In the `name` parameter, pass the name of the new mailbox. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Example + +To create a new “Invoices†mailbox: + + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") +If(OK=1) +$options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$status:=$transporter.createBox("Invoices") + +If ($status.success) +ALERT("Mailbox creation successful!") +Else +ALERT("Error: "+$status.statusText) +End if +End if +``` + + + + + + + +## .delete() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.delete**( *msgsIDs* : Collection ) : Object
          **.delete**( *allMsgs* : Integer ) : Object +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Integer | -> | `IMAP all`: All messages in the selected mailbox | +| Result | Object | <- | Status of the delete operation | + + +#### Description + +The `.delete()` function sets the "deleted" flag for the messages defined in `msgsIDs` or `allMsgs`. + +You can pass: + +- in the `msgsIDs` parameter, a collection containing the unique IDs of the specific messages to delete, or +- in the `allMsgs` parameter, the `IMAP all` constant (integer) to delete all messages in the selected mailbox. + +Executing this function does not actually remove messages. Messages with the "delete" flag can still be found by the [.searchMails()](#searchmails) function. Flagged messages are deleted from the IMAP server with the [`.expunge()`](#expunge) function or by selecting another mailbox or when the [transporter object](#imap-transporter-object) (created with [IMAP New transporter](#imap-new-transporter)) is destroyed. + + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Example 1 + +To delete a selection of messages: + + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"Reports\"") + + // Delete selected messages + $status:=$transporter.delete($mailIds) +``` + +#### Example 2 + +To delete all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Junk Email") + + // delete all messages in the current mailbox + $status:=$transporter.delete(IMAP all) +``` + + + +## .deleteBox() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.deleteBox**( *name* : Text ) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ---------------------------------------- | +| name | Text | -> | Name of the mailbox to delete | +| Result | Object | <- | Status of the mailbox deletion operation | + + +#### Description + +The `.deleteBox()` function permanently removes the mailbox with the given `name` from the IMAP server. Attempting to delete an INBOX or a mailbox that does not exist will generate an error. + +In the `name` parameter, pass the name of the mailbox to delete. +> * The function cannot delete a mailbox that has child mailboxes if the parent mailbox has the "\Noselect" attribute. +> * All messages in the deleted mailbox will also be deleted. +> * The ability to delete a mailbox depends on the mail server. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Example + +To delete the "Nova Orion Industries" child mailbox from the "Bills" mailbox hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// delete mailbox +$name:="Bills"+$transporter.getDelimiter()+"Nova Orion Industries" +$status:=$transporter.deleteBox($name) + +If ($status.success) + ALERT("Mailbox deletion successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .expunge() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.expunge()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------- | +| Result | Object | <- | Status of the expunge operation | + +#### Description + +The `.expunge()` function removes all messages with the "deleted" flag from the IMAP mail server. The "deleted" flag can be set with the [`.delete()`](#delete) or [`.addFlags()`](#addflags) methods. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object +var $ids : Collection + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Find and delete all seen messages in INBOX +$ids:=$transporter.searchMails("SEEN") +$status:=$transporter.delete($ids) + +// Purge all messages flagged as deleted +$status:=$transporter.expunge() +``` + + + +## .getBoxInfo() + +
          History +| Version | Changes | +| ------- | ---------------- | +| v18 R5 | name is optional | +| v18 R4 | Added | +
          + +**.getBoxInfo**( { *name* : Text }) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------- | +| name | Text | -> | Name of the mailbox | +| Result | Object | <- | boxInfo object | + + +#### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox *name*. This function returns the same information as [`.selectBox()`](#selectbox) without changing the current mailbox. + +In the optional *name* parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Property | Type | Description | +| ---------- | ------ | ------------------------------------------------------------------- | +| name | text | Name of the mailbox | +| mailCount | number | Number of messages in the mailbox | +| mailRecent | number | Number of messages with the "recent" flag (indicating new messages) | + + + +#### Example + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $info:=$transporter.getBoxInfo("INBOX") + ALERT("INBOX contains "+String($info.mailRecent)+" recent emails.") +``` + + + + + +## .getBoxList() + +
          History +| Version | Changes | +| ------- | ---------------------------- | +| v18 R4 | Added | +| v19 | Add `isSubscribed` parameter | +
          + +**.getBoxList**( { *parameters* : Object } ) : Collection +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| ----------------------------- | +| parameters | Object | -> | Parameter object | +| Result | Collection | <- | Collection of mailbox objects | + + +#### Description + +The `.getBoxList()` function returns a collection of mailboxes describing all of the available mailboxes. This function allows you to locally manage the list of messages located on the IMAP mail server. + +In the optional `parameters` parameter, pass an object containing values to filter the returned mailboxes. You can pass: + +| Property | Type | Description | +| ------------ | ------- | ---------------------------------------------------- | +| isSubscribed | Boolean |
        • **True** to return only subscribed mailboxes
        • **False** to return all available mailboxes
        • | + +#### Result + +Each object of the returned collection contains the following properties: + +| Property | Type | Description | +| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------- | +| \[].name | text | Name of the mailbox | +| \[].selectable | boolean | Indicates whether or not the access rights allow the mailbox to be selected:
          • true - the mailbox can be selected
          • false - the mailbox can not be selected
          | +| \[].inferior | boolean | Indicates whether or not the access rights allow creating a lower hierachy in the mailbox:
          • true - a lower level can be created
          • false - a lower level can not be created
          | +| \[].interesting | boolean | Indicates if the mailbox has been marked "interesting" by the server:
          • true - The mailbox has been marked "interesting" by the server. For example, it may contain new messages.
          • false - The mailbox has not been marked "interesting" by the server.
          | + + +If the account does not contain any mailboxes, an empty collection is returned. +> * If there is no open connection, `.getBoxList()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the `.checkConnection( )` function is automatically called. + + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getDelimiter() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.getDelimiter()** : Text +| Parameter | Type | | Description | +| --------- | ---- |:--:| ----------------------------- | +| Result | Text | <- | Hierarchy delimiter character | + + +#### Description + +The `.getDelimiter()` function returns the character used to delimit levels of hierarchy in the mailbox name. + +The delimiter is a character which can be used to: + +* create lower level (inferior) mailboxes +* search higher or lower within the mailbox hierarchy + + +#### Result + +Mailbox name delimiter character. +> * If there is no open connection, `.getDelimiter()` will open a connection. +> * If the connection has not been used since the [designated connection delay](#checkconnectiondelay), the [`.checkConnection()`](#checkconnection) function is automatically called. + + + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + + $boxList:=$transporter.getBoxList() + + For each($box;$boxList) + If($box.interesting) + $split:=Split string($box.name;$transporter.getDelimiter()) + ALERT("New emails are available in the box: "+$split[$split.length-1]) + End if + End for each +``` + + + + +## .getMail() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.getMail**( *msgNumber*: Integer { ; *options* : Object } ) : Object
          **.getMail**( *msgID*: Text { ; *options* : Object } ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------ | +| msgNumber | Integer | -> | Sequence number of the message | +| msgID | Text | -> | Unique ID of the message | +| options | Object | -> | Message handling instructions | +| Result | Object | <- | [Email object](EmailObjectClass.md#email-object) | + + +#### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. This function allows you to locally handle the email contents. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *options* parameter allows you pass an object defining additional instructions for handling the message. The following properties are available: + +| Property | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | boolean | If True, the message is marked as "seen" in the mailbox. If False, the message is not marked as "seen". Default value: True | +| withBody | boolean | Pass True to return the body of the message. If False, only the message header is returned. Default value: True | +> * The function generates an error and returns **Null** if *msgID* designates a non-existing message, +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) function, an error is generated, +> * If there is no open connection, `.getMail()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox)`. + + + +#### Result + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object) with the following specific IMAP properties: *id*, *receivedAt*, and *size*. + +#### Example + +You want to get the message with ID = 1: + +```4d + var $server : Object + var $info; $mail; $boxInfo : Variant + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get Email object with ID 1 + $mail:=$transporter.getMail(1) +``` + + + + +## .getMails() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.getMails**( *ids* : Collection { ; *options* : Object } ) : Object
          **.getMails**( *startMsg* : Integer ; *endMsg* : Integer { ; *options* : Object } ) : Object +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------------------------------ | +| ids | Collection | -> | Collection of message ID | +| startMsg | Integer | -> | Sequence number of the first message | +| endMsg | Integer | -> | Sequence number of the last message | +| options | Object | -> | Message handling instructions | +| Result | Object | <- | Object containing:
          • a collection of [Email objects](EmailObjectClass.md#email-object) and
          • a collection of IDs or numbers for missing messages, if any
          | + + +#### Description + +The `.getMails()` function returns an object containing a collection of `Email` objects. + +**First Syntax:** + +***.getMails( ids { ; options } ) -> result*** + +The first syntax allows you to retrieve messages based on their IDs. + +In the *ids* parameter, pass a collection of IDs for the messages to return. You can get the IDs with [`.getMail()`](#getmail). + +The optional *options* parameter allows you to define the parts of the messages to be returned. See the **Options** table below for a description of the available properties. + +**Second syntax:** + + ***.getMails( startMsg ; endMsg { ; options } ) -> result*** + +The second syntax allows you to retrieve messages based on a sequential range. The values passed represent the position of the messages in the mailbox. + +In the *startMsg* parameter, pass an *integer* value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an *integer* value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + +The optional *options* parameter allows you to define the parts of the messages to be returned. + +**Options** + +| Property | Type | Description | +| ---------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| updateSeen | Boolean | If True, the specified messages are marked as "seen" in the mailbox. If False, the messages are not marked as "seen". Default value: True | +| withBody | Boolean | Pass True to return the body of the specified messages. If False, only the message headers are returned. Default value: True | +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated. +> * If there is no open connection, `.getMails()` will open a connection the last mailbox specified with [`.selectBox()`](#selectbox). + + +#### Result + +`.getMails()` returns an object containing the following collections: + + +| Property | Type | Description | +| -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| list | Collection | Collection of [`Email` objects](EmailObjectClass.md#email-object). If no Email objects are found, an empty collection is returned. | + +|notFound |Collection| Collection of:
          • first syntax - previously passed message IDs that do not exist
          • second syntax - sequence numbers of messages between startMsg and endMsg that do not exist
          An empty collection is returned if all messages are found.| + + +#### Example + +You want to retrieve the 20 most recent emails without changing their "seen" status: + +```4d + var $server,$boxInfo,$result : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("INBOX") + + If($boxInfo.mailCount>0) + // retrieve the headers of the last 20 messages without marking them as read + $result:=$transporter.getMails($boxInfo.mailCount-20;$boxInfo.mailCount;\ + New object("withBody";False;"updateSeen";False)) + For each($mail;$result.list) + // ... + End for each + End if +``` + + + + +## .getMIMEAsBlob() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.getMIMEAsBlob**( *msgNumber* : Integer { ; *updateSeen* : Boolean } ) : Blob
          **.getMIMEAsBlob**( *msgID* : Text { ; *updateSeen* : Boolean } ) : Blob + +| Parameter | Type | | Description | +| ---------- | ------- |:--:| --------------------------------------------------------------------------------------------- | +| msgNumber | Integer | -> | Sequence number of the message | +| msgID | Text | -> | Unique ID of the message | +| updateSeen | Boolean | -> | If True, the message is marked "seen" in the mailbox. If False the message is left untouched. | +| Result | BLOB | <- | Blob of the MIME string returned from the mail server | + + + + +#### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* or *msgID* in the mailbox designated by the `IMAP_transporter`. + +In the first parameter, you can pass either: + +* *msgNumber*, an *integer* value indicating the sequence number of the message to retrieve or +* *msgID*, a *text* value indicating the unique ID of the message to retrieve. + +The optional *updateSeen* parameter allows you to specify if the message is marked as "seen" in the mailbox. You can pass: + +* **True** - to mark the message as "seen" (indicating the message has been read) +* **False** - to leave the message's "seen" status untouched +> * The function returns an empty BLOB if *msgNumber* or msgID* designates a non-existing message, +> * If no mailbox is selected with the [`.selectBox()`](#selectbox) command, an error is generated, +> * If there is no open connection, `.getMIMEAsBlob()` will open a connection the last mailbox specified with `.selectBox()`. + + +#### Result + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +#### Example + + +```4d + var $server : Object + var $boxInfo : Variant + var $blob : Blob + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + //create transporter + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("Inbox") + + //get BLOB + $blob:=$transporter.getMIMEAsBlob(1) +``` + + + + +## .host + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + +## .logFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .move() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + + +**.move**( *msgsIDs* : Collection ; *destinationBox* : Text ) : Object
          **.move**( *allMsgs* : Integer ; *destinationBox* : Text ) : Object +| Parameter | Type | | Description | +| -------------- | ---------- |:--:| ------------------------------------------------ | +| msgsIDs | Collection | -> | Collection of message unique IDs (strings) | +| allMsgs | Integer | -> | `IMAP all`: All messages in the selected mailbox | +| destinationBox | Text | -> | Mailbox to receive moved messages | +| Result | Object | <- | Status of the move operation | + + +#### Description + +The `.move()` function moves the messages defined by *msgsIDs* or *allMsgs* to the *destinationBox* on the IMAP server. + +You can pass: + +- in the *msgsIDs* parameter, a collection containing the unique IDs of the specific messages to move, or +- in the *allMsgs* parameter, the `IMAP all` constant (integer) to move all messages in the selected mailbox. + +The *destinationBox* parameter allows you to pass a text value with the name of the mailbox where the messages will be moved. + +> This function is only supported by IMAP servers compliant with RFC [8474](https://tools.ietf.org/html/rfc8474). + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + + +#### Example 1 + +To move a selection of messages: + +```4d + var $server;$boxInfo;$status : Object + var $mailIds : Collection + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get collection of message unique IDs + $mailIds:=$transporter.searchMails("subject \"4D new feature:\"") + + // Move found messages from the current mailbox to the "documents" mailbox + $status:=$transporter.move($mailIds;"documents") +``` + +#### Example 2 + +To move all messages in the current mailbox: + + +```4d + var $server;$boxInfo;$status : Object + var $transporter : 4D.IMAPTransporter + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + // move all messages in the current mailbox to the "documents" mailbox + $status:=$transporter.move(IMAP all;"documents") +``` + + + + +## .numToID() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.numToID**( *startMsg* : Integer ; *endMsg* : Integer ) : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| ------------------------------------ | +| startMsg | Integer | -> | Sequence number of the first message | +| endMsg | Integer | -> | Sequence number of the last message | +| Result | Collection | <- | Collection of unique IDs | + + +#### Description + +The `.numToID()` function converts the sequence numbers to IMAP unique IDs for the messages in the sequential range designated by *startMsg* and *endMsg* in the currently selected mailbox. + +In the *startMsg* parameter, pass an integer value corresponding to the number of the first message in a sequential range. If you pass a negative number (*startMsg* <= 0), the first message of the mailbox will be used as the beginning of the sequence. + +In the *endMsg* parameter, pass an integer value corresponding to the number of the last message to be included in a sequential range. If you pass a negative number (*endMsg* <= 0), the last message of the mailbox will be used as the end of the sequence. + + +#### Result + +The function returns a collection of strings (unique IDs). + +#### Example + + +```4d + var $transporter : 4D.IMAPTransporter + var $server;$boxInfo;$status : Object + var $mailIds : Collection + + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.port:=993 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=IMAP New transporter($server) + + //select mailbox + $boxInfo:=$transporter.selectBox("inbox") + + //get IDs for 5 last messages received + $mailIds:=$transporter.numToID(($boxInfo.mailCount-5);$boxInfo.mailCount) + + //delete the messages from the current mailbox + $status:=$transporter.delete($mailIds) +``` + + + +## .removeFlags() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.removeFlags**( *msgIDs* : Collection ; *keywords* : Object ) : Object
          **.removeFlags**( *msgIDs* : Text ; *keywords* : Object ) : Object
          **.removeFlags**( *msgIDs* : Longint ; *keywords* : Object ) : Object +| Parameter | Type | | Description | +| --------- | ---------- |:--:| -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| msgIDs | Collection | -> | Collection of strings: Message unique IDs (text)
          Text: Unique ID of a message
          Longint (IMAP all): All messages in the selected mailbox | +| keywords | Object | -> | Keyword flags to remove | +| Result | Object | <- | Status of the removeFlags operation | + + +#### Description + +The `.removeFlags()` function removes flags from the `msgIDs` for the specified `keywords`. + +In the `msgIDs` parameter, you can pass either: + +* a *collection* containing the unique IDs of specific messages or +* the unique ID (*text*) of a single message or +* the following constant (*longint*) for all messages in the selected mailbox: + + | Constant | Value | Comment | + | -------- | ----- | ------------------------------------------- | + | IMAP all | 1 | Select all messages in the selected mailbox | + +The `keywords` parameter lets you pass an object with keyword values for specific flags to remove from `msgIDs`. You can pass any of the following keywords: + +| Parameter | Type | Description | +| --------- | ------- | --------------------------------------------------- | +| $draft | Boolean | True to remove the "draft" flag from the message | +| $seen | Boolean | True to remove the "seen" flag from the message | +| $flagged | Boolean | True to remove the "flagged" flag from the message | +| $answered | Boolean | True to remove the "answered" flag from the message | +| $deleted | Boolean | True to remove the "deleted" flag from the message | + +Note that False values are ignored. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Example + +```4d +var $options;$transporter;$boxInfo;$status : Object + +$options:=New object +$options.host:="imap.gmail.com" +$options.port:=993 +$options.user:="4d@gmail.com" +$options.password:="xxxxx" + +// Create transporter +$transporter:=IMAP New transporter($options) + +// Select mailbox +$boxInfo:=$transporter.selectBox("INBOX") + +// Mark all messages from INBOX as unseen +$flags:=New object +$flags["$seen"]:=True +$status:=$transporter.removeFlags(IMAP all;$flags) +``` + + + +## .renameBox() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.renameBox**( *currentName* : Text ; *newName* : Text ) : Object +| Parameter | Type | | Description | +| ----------- | ------ |:--:| -------------------------------- | +| currentName | Text | -> | Name of the current mailbox | +| newName | Text | -> | New mailbox name | +| Result | Object | <- | Status of the renaming operation | + + +#### Description + +The `.renameBox()` function changes the name of a mailbox on the IMAP server. Attempting to rename a mailbox from a mailbox name that does not exist or to a mailbox name that already exists will generate an error. + +In the `currentName` parameter, pass the name of the mailbox to be renamed. + +Pass the new name for the mailbox in the `newName` parameter. + + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + +#### Example + +To to rename your “Invoices†mailbox to “Billsâ€: + +```4d +var $pw : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +// rename mailbox +$status:=$transporter.renameBox("Invoices"; "Bills") + +If ($status.success) + ALERT("Mailbox renaming successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + + + + + +## .port + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + +## .searchMails() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R5 | Added | +
          + +**.searchMails**( *searchCriteria* : Text ) : Collection +| Parameter | Type | | Description | +| -------------- | ---------- |:--:| ----------------------------- | +| searchCriteria | Text | -> | Search criteria | +| Result | Collection | <- | Collection of message numbers | + + +#### Description + +> This function is based upon the specification for the [IMAP protocol](https://en.wikipedia.org/wiki/Internet_Message_Access_Protocol). + +The `.searchMails()` function searches for messages that match the given *searchCriteria* in the current mailbox. *searchCriteria* consists of one or more search keys. + +*searchCriteria* is a text parameter listing one or more search keys (see [Authorized search-keys](#authorized-search-keys) below) associated or not with values to look for. A search key may be a single or multiple items. For example: + +``` +SearchKey1 = FLAGGED +SearchKey2 = NOT FLAGGED +SearchKey3 = FLAGGED DRAFT +``` + +> Matching is usually not case-sensitive + +- If the *searchCriteria* is a null string, the search will be equivalent to a “select allâ€. +- If the *searchCriteria* includes multiple search keys, the result is the intersection (AND function) of all the messages that match those keys. + +``` +searchCriteria = FLAGGED FROM "SMITH" +``` +... returns all messages with \Flagged flag set AND sent by Smith. +- You can use the **OR** or **NOT** operators as follows: + +``` +searchCriteria = OR SEEN FLAGGED +``` +... returns all messages with \Seen flag set OR \Flagged flag set + +``` +searchCriteria = NOT SEEN +``` +... returns all messages with \Seen flag not set. + +``` +searchCriteria = HEADER CONTENT-TYPE "MIXED" NOT HEADER CONTENT-TYPE "TEXT"... +``` +... returns message whose content-type header contains “Mixed†and does not contain “Textâ€. + +``` +searchCriteria = HEADER CONTENT-TYPE "E" NOT SUBJECT "o" NOT HEADER CONTENT-TYPE "MIXED" +``` +... returns message whose content-type header contains “ e †and whose Subject header does not contain “ o †and whose content-type header is not “ Mixed â€. + +As concerns the last two examples, notice that the result of the search is different when you remove the parentheses of the first search key list. + +- The *searchCriteria* may include the optional \[CHARSET] specification. This consists of the "CHARSET" word followed by a registered \[CHARSET] (US ASCII, ISO-8859). It indicates the charset of the *searchCriteria* string. Therefore, you must convert the *searchCriteria* string into the specified charset if you use the \[CHARSET] specification (see the `CONVERT FROM TEXT` or `Convert to text` commands). By default, 4D encodes in Quotable Printable the searchCriteria string if it contains extended characters. + +``` +searchCriteria = CHARSET "ISO-8859" BODY "Help" +``` +... means the search criteria uses the charset iso-8859 and the server will have to convert the search criteria before searching, if necessary. + + +#### Search value types + +Search-keys may request the value to search for: + +- **Search-keys with a date value**: the date is a string that must be formatted as follows: *date-day+"-"+date-month+"-"+date-year* where date-day indicates the number of the day of the month (max. 2 characters), date-month indicates the name of the month (Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Dec) and date-year indicates the year (4 characters). Example: `searchCriteria = SENTBEFORE 1-Feb-2020` (a date does not usually need to be quoted since it does not contain any special characters) + +- **Search-keys with a string value**: the string may contain any character and must be quoted. If the string does not contain any special characters, like the space character for instance, it does not need to be quoted. Quoting such strings will ensure that your string value will be correctly interpreted. Example: `searchCriteria = FROM "SMITH"` For all search keys that use strings, a message matches the key if the string is a substring of the field. Matching is not case-sensitive. + +- **Search-keys with a field-name value**: the field-name is the name of a header field. Example: `searchCriteria = HEADER CONTENT-TYPE "MIXED"` + +- **Search-keys with a flag value**: the flag may accept one or several keywords (including standard flags), separated by spaces. Example: `searchCriteria = KEYWORD \Flagged \Draft` + +- **Search-keys with a message set value**: Identifies a set of messages. For message sequence numbers, these are consecutive numbers from 1 to the total number of messages in the mailbox. A comma delimits individual numbers; a colon delimits between two numbers inclusive. Examples: `2,4:7,9,12:*` is `2,4,5,6,7,9,12,13,14,15` for a mailbox with 15 messages. `searchCriteria = 1:5 ANSWERED` search in message selection from message sequence number 1 to 5 for messages which have the \Answered flag set. `searchCriteria= 2,4 ANSWERED` search in the message selection (message numbers 2 and 4) for messages which have the \Answered flag set. + + +#### Authorized search-keys + +**ALL**: All messages in the mailbox. +**ANSWERED**: Messages with the \Answered flag set. +**UNANSWERED**: Messages that do not have the \Answered flag set. +**DELETED**: Messages with the \Deleted flag set. +**UNDELETED**: Messages that do not have the \Deleted flag set. +**DRAFT**: Messages with the \Draft flag set. +**UNDRAFT**: Messages that do not have the \Draft flag set. +**FLAGGED**: Messages with the \Flagged flag set. +**UNFLAGGED**: Messages that do not have the \Flagged flag set. +**RECENT**: Messages that have the \Recent flag set. +**OLD**: Messages that do not have the \Recent flag set. +**SEEN**: Messages that have the \Seen flag set. +**UNSEEN**: Messages that do not have the \Seen flag set. +**NEW**: Messages that have the \Recent flag set but not the \Seen flag. This is functionally equivalent to “(RECENT UNSEEN)â€. +**KEYWORD** : Messages with the specified keyword set. +**UNKEYWORD** : Messages that do not have the specified keyword set. +**BEFORE** : Messages whose internal date is earlier than the specified date. +**ON** : Messages whose internal date is within the specified date. +**SINCE** : Messages whose internal date is within or later than the specified date. +**SENTBEFORE** : Messages whose Date header is earlier than the specified date. +**SENTON** : Messages whose Date header is within the specified date. +**SENTSINCE** : Messages whose Date header is within or later than the specified date. +**TO** : Messages that contain the specified string in the TO header. +**FROM** : Messages that contain the specified string in the FROM header. +**CC** : Messages that contain the specified string in the CC header. +**BCC** : Messages that contain the specified string in the BCC header. +**SUBJECT** : Messages that contain the specified string in the Subject header. +**BODY** : Messages that contain the specified string in the message body. +**TEXT** : Messages that contain the specified string in the header or in the message body. +**HEADER** : Messages that have a header with the specified field-name and that contain the specified string in the field-body. +**UID** : Messages with unique identifiers corresponding to the specified unique identifier set. +**LARGER** : Messages with a size larger than the specified number of bytes. +**SMALLER** : Messages with a size smaller than the specified number of bytes. +**NOT** : Messages that do not match the specified search key. +**OR** : Messages that match either search key. + + + + +## .selectBox() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R4 | Added | +
          + +**.selectBox**( *name* : Text { ; *state* : Integer } ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| --------------------- | +| name | Text | -> | Name of the mailbox | +| state | Integer | -> | Mailbox access status | +| Result | Object | <- | boxInfo object | + + +#### Description + +The `.selectBox()` function selects the `name` mailbox as the current mailbox. This function allows you to retrieve information about the mailbox. +> To get the information from a mailbox without changing the current mailbox, use [`.getBoxInfo()`](#getboxinfo). + +In the `name` parameter, pass the name of the mailbox to access. The name represents an unambiguous left-to-right hierarchy with levels separated by a specific delimiter character. The delimiter can be found with the [`.getDelimiter()`](#getdelimiter) function. + +The optional `state` parameter defines the type of access to the mailbox. The possible values are: + +| Constant | Value | Comment | +| --------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IMAP read only state | 1 | The selected mailbox is accessed with read only privileges. Messages with a "recent" flag (indicating new messages) remain unchanged. | +| IMAP read write state | 0 | The selected mailbox is accessed with read and write privileges. Messages are considered "seen" and lose the "recent" flag (indicating new messages). (Default value) | +> * The function generates an error and returns **Null** if name designates a non-existing mailbox. +> * If there is no open connection, `.selectBox()` will open a connection. +> * If the connection has not been used since the designated connection delay (see `IMAP New transporter`), the [`.checkConnection()`](#checkconnection) function is automatically called. + +**Returned object** + +The `boxInfo` object returned contains the following properties: + +| Property | Type | Description | +| ---------- | ------ | ----------------------------------------- | +| name | Text | Name of the mailbox | +| mailCount | number | Number of messages in the mailbox | +| mailRecent | number | Number of messages with the "recent" flag | + + +#### Example + + +```4d + var $server; $boxinfo : Object + $server:=New object + $server.host:="imap.gmail.com" //Mandatory + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.IMAPTransporter + $transporter:=IMAP New transporter($server) + $boxInfo:=$transporter.selectBox("INBOX") +``` + + + + +## .subscribe() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.subscribe**( *name* : Text ) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| --------------------------------- | +| name | Text | -> | Name of the mailbox | +| Result | Object | <- | Status of the subscribe operation | + + +#### Description + +The `.subscribe()` function allows adding or removing of the specified mailbox to/from the IMAP server’s set of “subscribed†mailboxes. As such, you can choose to narrow down a large list of available mailboxes by subscribing to those you usually want to see. + +In the `name` parameter, pass the name of the mailbox to add (subscribe) to your "subscribed" mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + +#### Example + +To subscribe to the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.subscribe($name) + +If ($status.success) + ALERT("Mailbox subscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + +## .unsubscribe() + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.unsubscribe**( *name* : Text ) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ----------------------------------- | +| name | Text | -> | Name of the mailbox | +| Result | Object | <- | Status of the unsubscribe operation | + + +#### Description + +The `.unsubscribe()` function removes a mailbox from a set of subscribed mailboxes. This allows you reduce the number of mailboxes you usually see. + +In the `name` parameter, pass the name of the mailbox to remove (unsubscribe) from your active mailboxes. + +**Returned object** + +The function returns an object describing the IMAP status: + +| Property | | Type | Description | +| ---------- | ----------------------- | ---------- | ---------------------------------------------------------------------------------------- | +| success | | Boolean | True if the operation is successful, False otherwise | +| statusText | | Text | Status message returned by the IMAP server, or last error returned in the 4D error stack | +| errors | | Collection | 4D error stack (not returned if a IMAP server response is received) | +| | \[].errcode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | + + + +#### Example + +To unsubscribe from the "Atlas Corp†mailbox in the "Bills" hierarchy: + +```4d +var $pw; $name : text +var $options; $transporter; $status : object + +$options:=New object + +$pw:=Request("Please enter your password:") + +If(OK=1) $options.host:="imap.gmail.com" +$options.user:="test@gmail.com" +$options.password:=$pw + +$transporter:=IMAP New transporter($options) + +$name:="Bills"+$transporter.getDelimiter()+"Atlas Corp" +$status:=$transporter.unsubscribe($name) + +If ($status.success) + ALERT("Mailbox unsubscription successful!") + Else + ALERT("Error: "+$status.statusText) + End if +End if +``` + + + + +## .user + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + + + diff --git a/website/translated_docs/pt/API/MailAttachmentClass.md b/website/translated_docs/pt/API/MailAttachmentClass.md new file mode 100644 index 00000000000000..9acb27c51677a3 --- /dev/null +++ b/website/translated_docs/pt/API/MailAttachmentClass.md @@ -0,0 +1,271 @@ +--- +id: MailAttachmentClass +title: MailAttachment +--- + +Attachment objects allow referencing files within a [`Email`](EmailObjectClass.md) object. Attachment objects are created using the [`MAIL New attachment`](#mail-new-attachment) command. + + +### Attachment Object + +Attachment objects provide the following read-only properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.cid** : Text](#cid)

               the ID of the attachment | +| [**.disposition** : Text](#disposition)

              the value of the `Content-Disposition` header | +| [**.getContent()** : 4D.Blob](#getcontent)

              returns the contents of the attachment object in a `4D.Blob` object | +| [**.name** : Text](#name)

              the name and extension of the attachment | +| [**.path** : Text](#path)

              the POSIX path of the attachment file, if it exists | +| [**.platformPath** : Text](#platformpath)

              the path of the attachment file expressed with the current platform syntax | +| [**.type** : Text](#type)

              the `content-type` of the attachment file | + + +## MAIL New attachment + +

          History +| Version | Changes | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
          + +**MAIL New attachment**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **MAIL New attachment**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **MAIL New attachment**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **MAIL New attachment**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Parameter | Type | | Description | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Text | -> | Value of the content-disposition header: "inline" or "attachment". | +| Result | 4D.MailAttachment | <- | Attachment object | + + +#### Description + +The `MAIL New attachment` command allows you to create an attachment object that you can add to an [Email object](EmailObjectClass.md#email-object). + +To define the attachment, you can use: + +- a *file*, pass a `4D.File` object containing the attachment file. +- a *zipfile*, pass a `4D.ZipFile` object containing the attachment file. +- a *blob*, pass a `4D.Blob` object containing the attachment itself. +- a *path*, pass a **text** value containing the path of the attachment file, expressed with the system syntax. You can pass a full path name or a simple file name (in which case 4D will search for the file in the same directory as the project file). + +The optional *name* parameter lets you pass the name and extension to be used by the mail client to designate the attachment. If *name* is omitted and: + +* you passed a file path, the name and extension of the file is used, +* you passed a BLOB, a random name without extension is automatically generated. + +The optional *cid* parameter lets you pass an internal ID for the attachment. This ID is the value of the `Content-Id` header, it will be used in HTML messages only. The cid associates the attachment with a reference defined in the message body using an HTML tag such as `\`. This means that the contents of the attachment (e.g., a picture) should be displayed within the message on the mail client. The final result may vary depending on the mail client. You can pass an empty string in *cid* if you do not want to use this parameter. + +You can use the optional *type* parameter to explicitly set the `content-type` of the attachment file. For example, you can pass a string defining a MIME type ("video/mpeg"). This content-type value will be set for the attachment, regardless of its extension. For more information about MIME types, please refer to the [MIME type page on Wikipedia](https://en.wikipedia.org/wiki/MIME). + +By default, if the *type* parameter is omitted or contains an empty string, the `content-type` of the attachment file is based on its extension. The following rules are applied for the main MIME types: + +| Extension | Content Type | +| --------- | ----------------------------- | +| jpg, jpeg | image/jpeg | +| png | image/png | +| gif | image/gif | +| pdf | application/pdf | +| doc | application/msword | +| xls | application/vnd.ms-excel | +| ppt | application/vnd.ms-powerpoint | +| zip | application/zip | +| gz | application/gzip | +| json | application/json | +| js | application/javascript | +| ps | application/postscript | +| xml | application/xml | +| htm, html | text/html | +| mp3 | audio/mpeg | +| *other* | application/octet-stream | + +The optional *disposition* parameter lets you pass the `content-disposition` header of the attachment. You can pass one of the following constants from the "Mail" constant theme: + +| Constant | Value | Comment | +| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| mail disposition attachment | "attachment" | Set the Content-disposition header value to "attachment", which means that the attachment file must be provided as a link in the message. | +| mail disposition inline | "inline" | Set the Content-disposition header value to "inline", which means that the attachment must be rendered within the message contents, at the "cid" location. The rendering depends on the mail client. | + +By default, if the *disposition* parameter is omitted: + +* if the *cid* parameter is used, the `Content-disposition` header is set to "inline", +* if the *cid* parameter is not passed or empty, the `Content-disposition` header is set to "attachment". + +#### Example 1 + +You want to send an email with a user-selected file as an attachment and an image embedded in the HTML body: + +```4d +$doc:=Select document("";"*";"Please select a file to attach";0) +If (OK=1) //If a document was selected + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="test_user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="test_user@mail.com" +$email.to:="test_user@mail.com" +$email.subject:="This is a test message with attachments" + +//add a link to download file +$email.attachments:=New collection(MAIL New attachment(Document)) +//insert an inline picture (use a cid) +$email.attachments[1]:=MAIL New attachment("c:\\Pictures\\4D.jpg";"";"4D") + +$email.htmlBody:=""+\ +"Hello World!"+\ +""+\ +""+\ +""+\ +"" + +$transporter.send($email) //send mail + +End if +``` + +#### Example 2 + +You want to send an email with a 4D Write Pro area as an attachment: + +```4d +C_BLOB($blob) +WP EXPORT VARIABLE(WPArea;$blob;wk docx) + +C_OBJECT($email;$server;$transporter) + +$server:=New object +$server.host:="smtp.mail.com" +$server.user:="user@mail.com" +$server.password:="p@ssw@rd" +$transporter:=SMTP New transporter($server) + +$email:=New object +$email.from:="user@mail.com" +$email.to:="customer@mail.com" +$email.subject:="New annual report" +$email.textBody:="Please find enclosed our latest annual report." +$email.attachments:=New collection(MAIL New attachment($blob;"Annual report.docx")) + +$transporter.send($email) +``` + + +## 4D.MailAttachment.new() + +
          History +| Version | Changes | +| ------- | ------------------------------------ | +| v19 R2 | Accepts 4D.File, 4D.ZipFile, 4D.Blob | +
          + +**4D.MailAttachment.new**( *file* : 4D.File { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **4D.MailAttachment.new**( *zipFile* : 4D.ZipFile { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **4D.MailAttachment.new**( *blob* : 4D.Blob { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment
          **4D.MailAttachment.new**( *path* : Text { ; *name* : Text {; *cid* : Text{ ; *type* : Text { ; *disposition* :Text } } } } ) : 4D.MailAttachment + +| Parameter | Type | | Description | +| ----------- | ----------------- |:--:| -------------------------------------------------------------------- | +| file | 4D.File | -> | Attachment file | +| zipFile | 4D.ZipFile | -> | Attachment Zipfile | +| blob | 4D.Blob | -> | BLOB containing the attachment | +| path | Text | -> | Path of the attachment file | +| name | Text | -> | Name + extension used by the mail client to designate the attachment | +| cid | Text | -> | ID of attachment (HTML messages only), or " " if no cid is required | +| type | Text | -> | Value of the content-type header | +| disposition | Text | -> | Value of the content-disposition header: "inline" or "attachment". | +| Result | 4D.MailAttachment | <- | Attachment object | + + +#### Description + +The `4D.MailAttachment.new()` function creates and returns a new object of the `4D.MailAttachment` type. It is identical to the [`MAIL New attachment`](#mail-new-attachment) command (shortcut). + + +## .cid + +**.cid** : Text + +#### Description + +The `.cid` property contains the ID of the attachment. This property is used in HTML messages only. If this property is missing, the file is handled as a simple attachment (link). + + +## .disposition + +**.disposition** : Text + +#### Description + +The `.disposition` property contains the value of the `Content-Disposition` header. Two values are available: + +* "inline": the attachment is rendered within the message contents, at the "cid" location. The rendering depends on the mail client. +* "attachment": the attachment is provided as a link in the message. + + +## .getContent() + +**.getContent()** : 4D.Blob +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------- | +| Result | 4D.Blob | <- | Content of the attachment | + + +#### Description + +The `.getContent()` function returns the contents of the attachment object in a `4D.Blob` object. You can use this method with attachment objects received by the [`MAIL Convert from MIME`](#mail-convert-from-mime) command. + + + +## .name + +**.name** : Text + +#### Description + +The `.name` property contains the name and extension of the attachment. By default, it is the name of the file, unless another name was specified in the [`MAIL New attachment`](#mail-new-attachment) command. + +## .path + +**.path** : Text + +#### Description + +The `.path` property contains the POSIX path of the attachment file, if it exists. + + +## .platformPath + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.platformPath** : Text + +#### Description + +The `.platformPath` property returns the path of the attachment file expressed with the current platform syntax. + + +## .type + +**.type** : Text + +#### Description + +The `.type` property contains the `content-type` of the attachment file. If this type is not explicitly passed to the [`MAIL New attachment`](#mail-new-attachment) command, the `content-type` is based on its file extension. + + + + diff --git a/website/translated_docs/pt/API/POP3TransporterClass.md b/website/translated_docs/pt/API/POP3TransporterClass.md new file mode 100644 index 00000000000000..878bbe0c9b1c6f --- /dev/null +++ b/website/translated_docs/pt/API/POP3TransporterClass.md @@ -0,0 +1,694 @@ +--- +id: POP3TransporterClass +title: POP3Transporter +--- + +The `POP3Transporter` class allows you to retrieve messages from a POP3 email server. + + +### POP3 Transporter object + +POP3 Transporter objects are instantiated with the [POP3 New transporter](#pop3-new-transporter) command. They provide the following properties and functions: + + +| | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | +| [**.checkConnection()** : Object](#checkconnection)

               checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.delete**( *msgNumber* : Integer )](#delete)

              flags the *msgNumber* email for deletion from the POP3 server | +| [**.getBoxInfo()** : Object](#getboxinfo)

              returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMail**( *msgNumber* : Integer ) : Object](#getmail)

              returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfo**( *msgNumber* : Integer ) : Object](#getmailinfo)

              returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMailInfoList()** : Collection](#getmailinfolist)

              returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object) | +| [**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob](#getmimeasblob)

              returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object) | +| [**.host** : Text](#host)

              the name or the IP address of the host server | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

               the port number used for mail transactions | +| [**.undeleteAll()**](#undeleteall)

              removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object) | +| [**.user** : Text](#user)

               the user name used for authentication on the mail server | + + + +## POP3 New transporter + +

          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**POP3 New transporter**( *server* : Object ) : 4D.POP3Transporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | object | -> | Mail server information | +| Result | 4D.POP3Transporter | <- | [POP3 transporter object](#pop3-transporter-object) | + + +#### Description + +The `POP3 New transporter` command configures a new POP3 connectionaccording to the *server* parameter and returns a new *[POP3 transporter](#pop3-transporter-object)* object. The returned transporter object will then usually be used to receive emails. + +In the *server* parameter, pass an object containing the following properties: + + +| *server* | Default value (if omitted) | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
          .**accessTokenOAuth2**: Object

          Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.host** : Text](#host)

              the name or the IP address of the host server | *mandatory* | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | none | +| **.password** : Text

          User password for authentication on the server. Not returned in *[SMTP transporter](#smtptransporterobject)* object. | none | +| [**.port** : Integer](#port)

               the port number used for mail transactions | 995 | +| [**.user** : Text](#user)

               the user name used for authentication on the mail server | none | + + +#### Result + +The function returns a [**POP3 transporter object**](#pop3-transporter-object). All returned properties are **read-only**. +> The POP3 connection is automatically closed when the transporter object is destroyed. + +#### Example + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + $server.logFile:="LogTest.txt" //log to save in the Logs folder + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + $status:=$transporter.checkConnection() + If(Not($status.success)) + ALERT("An error occurred receiving the mail: "+$status.statusText) + End if +``` + + +## 4D.POP3Transporter.new() + + +**4D.POP3Transporter.new**( *server* : Object ) : 4D.POP3Transporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Object | -> | Mail server information | +| Result | 4D.POP3Transporter | <- | [POP3 transporter object](#pop3-transporter-object) | + +#### Description + +The `4D.POP3Transporter.new()` function creates and returns a new object of the `4D.POP3Transporter` type. It is identical to the [`POP3 New transporter`](#pop3-new-transporter) command (shortcut). + +## .acceptUnsecureConnection + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + + +## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + + + + +## .checkConnection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.checkConnection()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------------- | +| Result | Object | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Property | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + +#### Example + +```4d + var $pw : Text + var $options : Object + $options:=New object + + $pw:=Request("Please enter your password:") + if(OK=1) + $options.host:="pop3.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=POP3 New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success) + ALERT("POP3 connection check successful!") + Else + ALERT("Error: "+$status.statusText) + End if + End if +``` + + +## .connectionTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + +## .delete() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.delete**( *msgNumber* : Integer ) +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------- | +| msgNumber | Integer | -> | Number of the message to delete | + + +##### Description + +The `.delete( )` function flags the *msgNumber* email for deletion from the POP3 server. + +In the *msgNumber* parameter, pass the number of the email to delete. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +Executing this method does not actually remove any email. The flagged email will be deleted from the POP3 server only when the `POP3_transporter` object (created with `POP3 New transporter`) is destroyed. The flag could be also be removed using the `.undeleteAll()` method. +> If the current session unexpectedly terminates and the connection is closed (e.g., timeout, network failure, etc.), an error message is generated and messages marked for deletion will remain on the POP3 server. + +##### Example + +```4d + $mailInfoList:=$POP3_transporter.getMailInfoList() + For each($mailInfo;$mailInfoList) + // Mark your mail as "to be deleted at the end of the session" + $POP3_transporter.delete($mailInfo.number) + End for each + // Force the session closure to delete the mails marked for deletion + CONFIRM("Selected messages will be deleted.";"Delete";"Undo") + If(OK=1) //deletion confirmed + $POP3_transporter:=Null + Else + $POP3_transporter.undeleteAll() //remove deletion flags + End if +``` + + + + +## .getBoxInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.getBoxInfo()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| -------------- | +| Result | Object | <- | boxInfo object | + + +##### Description + +The `.getBoxInfo()` function returns a `boxInfo` object corresponding to the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the mailbox. + +The `boxInfo` object returned contains the following properties: + +| Property | Type | Description | +| --------- | ------ | --------------------------------- | +| mailCount | Number | Number of messages in the mailbox | +| size | Number | Message size in bytes | + + + +##### Example + +```4d + var $server; $boxinfo : Object + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + //mailbox info + $boxInfo:=$transporter.getBoxInfo() + ALERT("The mailbox contains "+String($boxInfo.mailCount)+" messages.") +``` + + + + +## .getMail() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.getMail**( *msgNumber* : Integer ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------ | +| msgNumber | Integer | -> | Number of the message in the list | +| Result | Object | <- | [Email object](EmailObjectClass.md#email-object) | + + +##### Description + +The `.getMail()` function returns the `Email` object corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally handle the email contents. + +Pass in *msgNumber* the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) function. + +The method returns Null if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +**Returned object** + +`.getMail()` returns an [`Email` object](EmailObjectClass.md#email-object). + + +##### Example + +You want to know the sender of the first mail of the mailbox: + +```4d + var $server; $transporter : Object + var $mailInfo : Collection + var $sender : Variant + + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $sender:=$transporter.getMail($mailInfo[0].number).from +``` + + + + +## .getMailInfo() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.getMailInfo**( *msgNumber* : Integer ) : Object +| Parameter | Type | | Description | +| --------- | ------- |:--:| --------------------------------- | +| msgNumber | Integer | -> | Number of the message in the list | +| Result | Object | <- | mailInfo object | + + +##### Description + +The `.getMailInfo()` function returns a `mailInfo` object corresponding corresponding to the *msgNumber* in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to retrieve information about the email. + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfo) method. + +The `mailInfo` object returned contains the following properties: + +| Property | Type | Description | +| -------- | ------ | ------------------------ | +| size | Number | Message size in bytes | +| id | Text | Unique ID of the message | + +The method returns **Null** if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete( )`. + + +##### Example + + +```4d + var $server; $mailInfo : Object + var $mailNumber : Integer + + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + //message info + $mailInfo:=$transporter.getMailInfo(1) //get the first mail + If($mailInfo #Null) + ALERT("First mail size is:"+String($mailInfo.size)+" bytes.") + End if +``` + + + + +## .getMailInfoList() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.getMailInfoList()** : Collection +| Parameter | Type | | Description | +| --------- | ---------- |:--:| -------------------------------- | +| Result | Collection | <- | Collection of `mailInfo` objects | + + +##### Description + +The `.getMailInfoList()` function returns a collection of `mailInfo` objects describing all messages in the mailbox designated by the [`POP3 transporter`](#pop3-transporter-object). This function allows you to locally manage the list of messages located on the POP3 mail server. + +Each `mailInfo` object in the returned collection contains the following properties: + +| Property | Type | Description | +| ------------ | ------ | ------------------------------------------------------------------ | +| \[ ].size | Number | Message size in bytes | +| \[ ].number | Number | Message number | +| \[ ].id | Text | Unique ID of the message (useful if you store the message locally) | + +If the mailbox does not contain a message, an empty collection is returned. + + + +#### number and ID properties + +*number* is the number of a message in the mailbox at the time the `POP3_transporter` was created. The *number* property is not a static value in relation to any specific message and will change from session to session dependent on its relation to other messages in the mailbox at the time the session was opened. The numbers assigned to the messages are only valid during the lifetime of the [`POP3_transporter`](#pop3-transporter-object). At the time the `POP3_transporter` is deleted any message marked for deletion will be removed. When the user logs back into the server, the current messages in the mailbox will be renumbered from 1 to x. + +The *id* however is a unique number assigned to the message when it was received by the server. This number is calculated using the time and date that the message is received and is a value assigned by your POP3 server. Unfortunately, POP3 servers do not use the *id* as the primary reference to their messages. Throughout the POP3 sessions you will need to specify the *number* as the reference to messages on the server. Developers may need to take some care if developing solutions which bring references to messages into a database but leave the body of the message on the server. + + +##### Example + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + $server:=New object + $server.host:="pop.gmail.com" //Mandatory + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + var $transporter : 4D.POP3Transporter + $transporter:=POP3 New transporter($server) + + C_COLLECTION($mailInfo) + C_LONGINT($vNum;$vSize) + + $mailInfo:=$transporter.getMailInfoList() + $vNum:=$mailInfo.length + $vSize:=$mailInfo.sum("size") + + ALERT("The mailbox contains "+String($vNum)+" message(s) for "+String($vSize)+" bytes.") +``` + + + + +## .getMIMEAsBlob() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
          + +**.getMIMEAsBlob**( *msgNumber* : Integer ) : Blob +| Parameter | Type | | Description | +| --------- | ------- |:--:| ----------------------------------------------------- | +| msgNumber | Integer | -> | Number of the message in the list | +| Result | Blob | <- | Blob of the MIME string returned from the mail server | + + +##### Description + +The `.getMIMEAsBlob()` function returns a BLOB containing the MIME contents for the message corresponding to the *msgNumber* in the mailbox designated by the [`POP3_transporter`](#pop3-transporter-object). + +In *msgNumber*, pass the number of the message to retrieve. This number is returned in the number property by the [`.getMailInfoList()`](#getmailinfolist) method. + +The method returns an empty BLOB if: + +* *msgNumber* designates a non-existing message, +* the message was marked for deletion using `.delete()`. + + +**Returned BLOB** + +`.getMIMEAsBlob()` returns a `BLOB` which can be archived in a database or converted to an [`Email` object](EmailObjectClass.md#email-object) with the `MAIL Convert from MIME` command. + + +##### Example + +You want to know the total number and size of emails in the mailbox: + +```4d + var $server : Object + var $mailInfo : Collection + var $blob : Blob + var $transporter : 4D.POP3Transporter + + $server:=New object + $server.host:="pop.gmail.com" + $server.port:=995 + $server.user:="4d@gmail.com" + $server.password:="XXXXXXXX" + + $transporter:=POP3 New transporter($server) + + $mailInfo:=$transporter.getMailInfoList() + $blob:=$transporter.getMIMEAsBlob($mailInfo[0].number) +``` + + + +## .host + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + + +## .logFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + +## .port + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + + +## .undeleteAll() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R2 | Added | +
          + +**.undeleteAll()** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +##### Description + +The `.undeleteAll()` function removes all delete flags set on the emails in the [`POP3_transporter`](#pop3-transporter-object). + + + + +## .user + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + + diff --git a/website/translated_docs/pt/API/SMTPTransporterClass.md b/website/translated_docs/pt/API/SMTPTransporterClass.md new file mode 100644 index 00000000000000..ab6cc232dc7daf --- /dev/null +++ b/website/translated_docs/pt/API/SMTPTransporterClass.md @@ -0,0 +1,523 @@ +--- +id: SMTPTransporterClass +title: SMTPTransporter +--- + +The `SMTPTransporter` class allows you to configure SMTP connections and send emails through *SMTP transporter* objects. + + + +### SMTP Transporter object + +SMTP Transporter objects are instantiated with the [SMTP New transporter](#smtp-new-transporter) command. They provide the following properties and functions: + + +| | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | +| [**.bodyCharset** : Text](#bodycharset)

               the charset and encoding used for the body part of the email | +| [**.checkConnection()** : Object](#checkconnection)

               checks the connection using information stored in the transporter object | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | +| [**.headerCharset** : Text](#headercharset)

               the charset and encoding used for the email header | +| [**.host** : Text](#host)

              the name or the IP address of the host server | +| [**.keepAlive** : Boolean](#keepalive)

              **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | +| [**.port** : Integer](#port)

               the port number used for mail transactions | +| [**.send**( *mail* : Object ) : Object](#send)

              sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object | +| [**.sendTimeOut** : Integer](#sendtimeout)

               the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | +| [**.user** : Text](#user)

               the user name used for authentication on the mail server | + + + +## SMTP New transporter + +

          History +| Version | Changes | +| ------- | -------------------------------------------- | +| v18 | New logFile property | +| v17 R5 | New bodyCharset and headerCharset properties | +| v17 R4 | Added | +
          + +**SMTP New transporter**( *server* : Object ) : 4D.SMTPTransporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Object | -> | Mail server information | +| Result | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + + +#### Description + +The `SMTP New transporter` command configures a new SMTP connection according to the *server* parameter and returns a new *[SMTP transporter](#smtp-transporter-object)* object. The returned transporter object will then usually be used to send emails. + +> This command does not open any connection to the SMTP server. The SMTP connection is actually opened when the [`.send()`](#send) function is executed. +> +> The SMTP connection is automatically closed: * when the transporter object is destroyed if the [`keepAlive`](#keepalive) property is true (default), * after each [`.send( )`](#send) function execution if the [`keepAlive`](#keepalive) property is set to false. + + + + +In the *server* parameter, pass an object containing the following properties: + +| *server* | Default value (if omitted) | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| [**.acceptUnsecureConnection** : Boolean](#acceptunsecureconnection)

              **True** if 4D is allowed to establish an unencrypted connection | False | +| .**accessTokenOAuth2**: Text
          .**accessTokenOAuth2**: Object

          Text string or token object representing OAuth2 authorization credentials. Used only with OAUTH2 `authenticationMode`. If `accessTokenOAuth2` is used but `authenticationMode` is omitted, the OAuth 2 protocol is used (if allowed by the server). Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.authenticationMode** : Text](#authenticationmode)

              the authentication mode used to open the session on the mail server | the most secure authentication mode supported by the server is used | +| [**.bodyCharset** : Text](#bodycharset)

               the charset and encoding used for the body part of the email | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.connectionTimeOut** : Integer](#connectiontimeout)

              the maximum wait time (in seconds) allowed to establish a connection to the server | 30 | +| [**.headerCharset** : Text](#headercharset)

               the charset and encoding used for the email header | `mail mode UTF8` (US-ASCII_UTF8_QP) | +| [**.host** : Text](#host)

              the name or the IP address of the host server | *mandatory* | +| [**.keepAlive** : Boolean](#keepalive)

              **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed | True | +| [**.logFile** : Text](#logfile)

              the path of the extended log file defined (if any) for the mail connection | none | +| **password** : Text

          User password for authentication on the server. Not returned in *[SMTP transporter](#smtp-transporter-object)* object. | none | +| [**.port** : Integer](#port)

               the port number used for mail transactions | 587 | +| [**.sendTimeOut** : Integer](#sendtimeout)

               the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs | 100 | +| [**.user** : Text](#user)

               the user name used for authentication on the mail server | none | + + + +#### Result + +The function returns a [**SMTP transporter object**](#smtp-transporter-object). All returned properties are **read-only**. + + +#### Example + +```4d + $server:=New object + $server.host:="smtp.gmail.com" //Mandatory + $server.port:=465 + $server.user:="4D@gmail.com" + $server.password:="XXXX" + $server.logFile:="LogTest.txt" //Extended log to save in the Logs folder + + var $transporter : 4D.SMTPTransporter + $transporter:=SMTP New transporter($server) + + $email:=New object + $email.subject:="my first mail " + $email.from:="4d@gmail.com" + $email.to:="4d@4d.com;test@4d.com" + $email.textBody:="Hello World" + $email.htmlBody:="

          Hello World

          'Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...'

          \ +

          There are many variations of passages of Lorem Ipsum available."\ + +"The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.

          " + + $status:=$transporter.send($email) + If(Not($status.success)) + ALERT("An error occurred sending the mail: "+$status.message) + End if +``` + + +## 4D.SMTPTransporter.new() + + +**4D.SMTPTransporter.new**( *server* : Object ) : 4D.SMTPTransporter +| Parameter | Type | | Description | +| --------- | ------------------ |:--:| --------------------------------------------------- | +| server | Object | -> | Mail server information | +| Result | 4D.SMTPTransporter | <- | [SMTP transporter object](#smtp-transporter-object) | + +#### Description + +The `4D.SMTPTransporter.new()` function creates and returns a new object of the `4D.SMTPTransporter` type. It is identical to the [`SMTP New transporter`](#smtp-new-transporter) command (shortcut). + + + +## .acceptUnsecureConnection + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + + + + +## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + + + + +## .bodyCharset + +
          History +| Version | Changes | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Added | +
          + +**.bodyCharset** : Text + +#### Description + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Value | Comment | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
          • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          | +| mail mode ISO88591 | ISO-8859-1 |
          • *headerCharset*: ISO-8859-1 & Quoted-printable
          • *bodyCharset*: ISO-8859-1 & 8-bit
          | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + + +## .checkConnection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.checkConnection()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------------- | +| Result | Object | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Property | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + +For information about SMTP status codes, please refer to [this page](https://www.usps.org/info/smtp_status.html). + +#### Example + +```4d + var $pw : Text + var $options : Object + var $transporter : 4D.SMTPTransporter + $options:=New object + + $pw:=Request("Please enter your password:") + $options.host:="smtp.gmail.com" + + $options.user:="test@gmail.com" + $options.password:=$pw + + $transporter:=SMTP New transporter($options) + + $status:=$transporter.checkConnection() + If($status.success=True) + ALERT("SMTP connection check successful!") + Else + ALERT("Error # "+String($status.status)+", "+$status.statusText) + End if +``` + + + +## .connectionTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + + + + + + +## .headerCharset + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.headerCharset** : Text + +#### Description + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Value | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
          • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          | +| mail mode ISO88591 | ISO-8859-1 |
          • *headerCharset*: ISO-8859-1 & Quoted-printable
          • *bodyCharset*: ISO-8859-1 & 8-bit
          | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + + + + + +## .host + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + + + + + + +## .keepAlive + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.keepAlive** : Boolean + +#### Description + +The `.keepAlive` property contains **True** if the SMTP connection must be kept alive until the `transporter` object is destroyed, and **False** otherwise. By default, if the `keepAlive` property has not been set in the `server` object (used to create the `transporter` object with `SMTP New transporter`), it is **True**. + +The SMTP connection is automatically closed: + +* when the `transporter` object is destroyed if the `.keepAlive` property is true, +* after each `.send( )` function execution if the `.keepAlive` property is set to false. + + + + + + +## .logFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + + + + +## .port + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + + + + +## .send() + +
          History +| Version | Changes | +| ------- | ------------------------ | +| v17 R5 | Support of mime contents | +| v17 R4 | Added | +
          + +**.send**( *mail* : Object ) : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------------------- | +| mail | Object | -> | [Email](EmailObjectClass.md#email-object) to send | +| Result | Object | <- | SMTP status | + + +#### Description + +The `.send()` function sends the [*mail* object](EmailObjectClass.md#email-object) to the SMTP server defined in the `transporter` object and returns a status object. +> The `transporter` object must have already been created using the `SMTP New transporter` command. + +The method creates the SMTP connection if it is not already alive. If the `.keepAlive` property of the `transporter` object is **false**, the SMTP connection is automatically closed after the execution of `.send()`, otherwise it stays alive until the `transporter` object is destroyed. For more information, please refer to the [`SMTP New transporter`](#smtp-new-transporter) command description. + +In *mail*, pass a valid [`Email` object](EmailObjectClass.md#email-object) to send. The origination (where the email is coming from) and destination (one or more recipients) properties must be included, the remaining properties are optional. + + +#### Returned object + +The function returns an object describing the SMTP status of the operation. This object can contain the following properties: + +| Property | Type | Description | +| ---------- | ------- | ------------------------------------------------------------------------------------------------ | +| success | boolean | True if the send is successful, False otherwise | +| status | number | Status code returned by the SMTP server (0 in case of an issue unrelated to the mail processing) | +| statusText | text | Status message returned by the SMTP server | + +In case of an issue unrelated to the SMTP processing (e.g. a mandatory property is missing in mail), 4D generates an error that you can intercept using a method installed by the `ON ERR CALL` command. Use the `GET LAST ERROR STACK` command for information about the error. + +In this case, the resulting status object contains the following values: + +| Property | Value | +| ---------- | ---------------------- | +| success | False | +| status | 0 | +| statusText | "Failed to send email" | + + +## .sendTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.sendTimeOut** : Integer + +#### Description +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + + + + + +## .user + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + + + + diff --git a/website/translated_docs/pt/API/SessionClass.md b/website/translated_docs/pt/API/SessionClass.md new file mode 100644 index 00000000000000..b9bec0545d3f9c --- /dev/null +++ b/website/translated_docs/pt/API/SessionClass.md @@ -0,0 +1,363 @@ +--- +id: SessionClass +title: Session +--- + +Session objects are returned by the [`Session`](#session) command when [scalable sessions are enabled in your project](WebServer/sessions.md#enabling-sessions). The Session object is automatically created and maintained by the 4D web server to control the session of a web client (e.g. a browser). This object provides the web developer with an interface to the user session, allowing to manage privileges, store contextual data, share information between processes, and launch session-related preemptive processes. + +For detailed information about the session implementation, please refer to the [web server Sessions](WebServer/sessions.md) section. + +### Summary + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.clearPrivileges()**](#clearprivileges)

              removes all the privileges associated to the session | +| [**.expirationDate** : Text](#expirationdate)

              the expiration date and time of the session cookie | +| [**.hasPrivilege**( *privilege* : Text ) : Boolean](#hasprivilege)

              returns True if the privilege is associated to the session, and False otherwise | +| [**.idleTimeout** : Integer](#idletimeout)

              the inactivity session timeout (in minutes), after which the session is automatically closed by 4D | +| [**.isGuest()** : Boolean](#isguest)

              returns True if the session is a Guest session (i.e. it has no privileges) | +| [**.setPrivileges**( *privilege* : Text )
          **.setPrivileges**( *privileges* : Collection )
          **.setPrivileges**( *settings* : Object )](#setprivileges)

              associates the privilege(s) defined in the parameter to the session | +| [**.storage** : Object](#storage)

              a shared object that can be used to store information available to all requests of the web client | +| [**.userName** : Text](#username)

              the user name associated to the session | + + + + +## Session + +

          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**Session** : 4D.Session + +| Parameter | Type | | Description | +| --------- | ---------- |:--:| -------------- | +| Result | 4D.Session | <- | Session object | + + +#### Description + +The `Session` command returns the `Session` object corresponding to the current scalable user web session. + +This command only works when [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions). It returns *Null* when sessions are disabled or when legacy sessions are used. + +When scalable sessions are enabled, the `Session` object is available from any web processes in the following contexts: + +- `On Web Authentication`, `On Web Connection`, and `On REST Authentication` database methods, +- ORDA [Data Model Class functions](ORDA/ordaClasses.md) called with REST requests, +- code processed through 4D tags in semi-dynamic pages (4DTEXT, 4DHTML, 4DEVAL, 4DSCRIPT/, 4DCODE) +- project methods with the "Available through 4D tags and URLs (4DACTION...)" attribute and called through 4DACTION/ urls. + + +#### Example + +You have defined the `action_Session` method with attribute "Available through 4D tags and URLs". You call the method by entering the following URL in your browser: + +``` +IP:port/4DACTION/action_Session +``` + +```4d + //action_Session method + Case of + :(Session#Null) + If(Session.hasPrivilege("WebAdmin")) //calling the hasPrivilege function + WEB SEND TEXT("4DACTION --> Session is WebAdmin") + Else + WEB SEND TEXT("4DACTION --> Session is not WebAdmin") + End if + Else + WEB SEND TEXT("4DACTION --> Sesion is null") + End case +``` + + + +## .clearPrivileges() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.clearPrivileges()** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.clearPrivileges()` function removes all the privileges associated to the session. As a result, the session automatically becomes a Guest session. + + +#### Example + +```4d +//Invalidate a session +var $isGuest : Boolean + +Session.clearPrivileges() +$isGuest:=Session.isGuest() //$isGuest is True +``` + + + + +## .expirationDate + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.expirationDate** : Text +#### Description + +The `.expirationDate` property contains the expiration date and time of the session cookie. The value is expressed as text in the ISO 8601 format: `YYYY-MM-DDTHH:MM:SS.mmmZ`. + +This property is **read-only**. It is automatically recomputed if the [`.idleTimeout`](#idletimeout) property value is modified. + +#### Example + +```4d +var $expiration : Text +$expiration:=Session.expirationDate //eg "2021-11-05T17:10:42Z" +``` + + + + + +## .hasPrivilege() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | +
          + +**.hasPrivilege**( *privilege* : Text ) : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ------------------------------------------------ | +| privilege | Text | <- | Name of the privilege to verify | +| Result | Boolean | <- | True if session has *privilege*, False otherwise | + + +#### Description + +The `.hasPrivilege()` function returns True if the privilege is associated to the session, and False otherwise. + + +#### Example + +You want to check if the "WebAdmin" privilege is associated to the session: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page + +End if +``` + + +## .idleTimeout + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.idleTimeout** : Integer +#### Description + +The `.idleTimeout` property contains the inactivity session timeout (in minutes), after which the session is automatically closed by 4D. + +If this property is not set, the default value is 60 (1h). + +When this property is set, the [`.expirationDate`](#expirationdate) property is updated accordingly. + +> The value cannot be less than 60: if a lower value is set, the timeout is raised up to 60. + + +This property is **read write**. + +#### Example + +```4d +If (Session.isGuest()) + // A Guest session will close after 60 minutes of inactivity + Session.idleTimeout:=60 +Else + // Other sessions will close after 120 minutes of inactivity + Session.idleTimeout:=120 +End if + +``` + + + +## .isGuest() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.isGuest()** : Boolean +| Parameter | Type | | Description | +| --------- | ------- |:--:| ----------------------------------------------- | +| Result | Boolean | <- | True if session is a Guest one, False otherwise | + +#### Description + +The `.isGuest()` function returns True if the session is a Guest session (i.e. it has no privileges). + + +#### Example + +In the `On Web Connection` database method: + +```4d +If (Session.isGuest()) + //Do something for Guest user +End if +``` + + + + +## .setPrivileges() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.setPrivileges**( *privilege* : Text )
          **.setPrivileges**( *privileges* : Collection )
          **.setPrivileges**( *settings* : Object ) +| Parameter | Type | | Description | +| ---------- | ---------- |:--:| ---------------------------------------------------------- | +| privilege | Text | -> | Privilege name | +| privileges | Collection | -> | Collection of privilege names | +| settings | Object | -> | Object with a "privileges" property (string or collection) | + +#### Description + +The `.setPrivileges()` function associates the privilege(s) defined in the parameter to the session. + +- In the *privilege* parameter, pass a string containing a privilege name (or several comma-separated privilege names). + +- In the *privileges* parameter, pass a collection of strings containing privilege names. + +- In the *settings* parameter, pass an object containing the following properties: + +| Property | Type | Description | +| ---------- | ------------------ | -------------------------------------------------- | +| privileges | Text or Collection |
        • String containing a privilege name, or
        • Collection of strings containing privilege names
        • | +| userName | Text | User name to associate to the session (optional) | + +If the `privileges` property contains an invalid privilege name, it is ignored. + +> In the current implementation, only the "WebAdmin" privilege is available. + +By default when no privilege is associated to the session, the session is a [Guest session](#isguest). + +The [`userName`](#username) property is available at session object level (read-only). + +#### Example + +In a custom authentication method, you set the "WebAdmin" privilege to the user: + +```4d +var $userOK : Boolean + +... //Authenticate the user + +If ($userOK) //The user has been approved + var $info : Object + $info:=New object() + $info.privileges:=New collection("WebAdmin") + Session.setPrivileges($info) +End if + +``` + + + +## .storage + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.storage** : Object +#### Description + +The `.storage` property contains a shared object that can be used to store information available to all requests of the web client. + +When a `Session` object is created, the `.storage` property is empty. Since it is a shared object, this property will be available in the `Storage` object of the server. + +> Like the `Storage` object of the server, the `.storage` property is always "single": adding a shared object or a shared collection to `.storage` does not create a shared group. + +This property is **read only** itself but it returns a read-write object. + +#### Example + +You want to store the client IP in the `.storage` property. You can write in the `On Web Authentication` database method: + +```4d +If (Session.storage.clientIP=Null) //first access + Use (Session.storage) + Session.storage.clientIP:=New shared object("value"; $clientIP) + End use +End if + +``` + + + + + + +## .userName + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R6 | Added | + +
          + +**.userName** : Text +#### Description + +The `.userName` property contains the user name associated to the session. You can use it to identify the user within your code. + +This property is an empty string by default. It can be set using the `privileges` property of the [`setPrivileges()`](#setprivileges) function. + +This property is **read only**. + + + + + + diff --git a/website/translated_docs/pt/API/SignalClass.md b/website/translated_docs/pt/API/SignalClass.md new file mode 100644 index 00000000000000..daaf9aa0c9c3ba --- /dev/null +++ b/website/translated_docs/pt/API/SignalClass.md @@ -0,0 +1,254 @@ +--- +id: SignalClass +title: Signal +--- + +Signals are tools provided by the 4D language to manage interactions and avoid conflicts between processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal. + +> Semaphores can also be used to manage interactions. Semaphores allow you to make sure that two or more processes do not modify the same resource (file, record...) at the same time. Only the process that sets the semaphore can remove it. + + +### Signal Object + +A signal is a shared object that must be passed as a parameter to commands that call or create workers or processes. + +A `4D.Signal` object contains the following built-in methods and properties: + +- [`.wait()`](#wait) +- [`.trigger()`](#trigger) +- [`.signaled`](#signaled) +- [`.description`](#description). + +Any worker/process calling the `.wait()` method will suspend its execution until the `.signaled` property is true. While waiting for a signal, the calling process does not use any CPU. This can be very interesting for performance in multiprocess applications. The `.signaled` property becomes true when any worker/process calls the `.trigger()` method. + +Note that to avoid blocking situations, the `.wait()` can also return after a defined timeout has been reached. + +Signal objects are created with the [New signal](#new-signal) command. + + +### Working with signals + +In 4D, you create a new signal object by calling the [`New signal`](#new-signal) command. Once created, this signal must be passed as a parameter to the `New process` or `CALL WORKER` commands so that they can modify it when they have finished the task you want to wait for. + +- `signal.wait()` must be called from the worker/process that needs another worker/process to finish a task in order to continue. +- `signal.trigger()` must be called from the worker/process that finished its execution in order to release all others. + + +![](assets/en/API/signal.png) + +Once a signal has been released using a `signal.trigger()` call, it cannot be reused again. If you want to set another signal, you need to call the `New signal` command again. + +Since a signal object is a [shared object](Concepts/shared.md), you can use it to return results from called workers/processes, provided that you do not forget to write values within a `Use...End use` structure (see example). + +### Example + +```4d + var $signal : 4D.Signal + + // Creation of a signal + $signal:=New signal + + // call main process and execute OpenForm method + CALL WORKER(1;"OpenForm";$signal) + // do another calculation + ... + // Waiting for the end of the process + $signaled:=$signal.wait() + + // Processing of the results + $calc:=$signal.result+... +``` + +***OpenForm*** method : + +```4d + #DECLARE ($signal : 4D.Signal) + var $form : Object + $form:=New object("value";0) + + // Open the form + $win:=Open form window("Information";Movable form dialog box) + DIALOG("Information";$form) + CLOSE WINDOW($win) + + // Add a new attribute to your $signal shared object to pass your result to the other process: + Use($signal) + $signal.result:=$form.value + End use + + // Trigger the signal to the waiting process + $signal.trigger() +``` + +### Summary + + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [**.description** : Text](#description)

              contains a custom description for the `Signal` object. | +| [**.signaled** : Boolean](#signaled)

              contains the current state of the `Signal` object | +| [**.trigger( )**](#trigger)

              sets the `signaled` property of the signal object to **true** | +| [**.wait**( { *timeout* : Real } ) : Boolean ](#wait)

              makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire | + + + + +## New signal + + +

          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**New signal** { ( *description* : Text ) } : 4D.Signal +| Parameter | Type | | Description | +| ----------- | --------- |:--:| -------------------------------------- | +| description | Text | -> | Description for the signal | +| Result | 4D.Signal | <- | Native object encapsulating the signal | + + +#### Description + +The `New signal` command creates a `4D.Signal` object. + +A signal is a shared object which can be passed as parameter from a worker or process to another worker or process, so that: + +* the called worker/process can update the signal object after specific processing has completed +* the calling worker/process can stop its execution and wait until the signal is updated, without consuming any CPU resources. + +Optionally, in the *description* parameter you can pass a custom text describing the signal. This text can also be defined after signal creation. + +Since the signal object is a shared object, it can also be used to maintain user properties, including the [`.description`](#description) property, by calling the `Use...End use` structure. + + +**Returned value** + +A new [`4D.Signal` object](#signal-object). + +#### Example + +Here is a typical example of a worker that sets a signal: + +```4d + var $signal : 4D.Signal + $signal:=New signal("This is my first signal") + + CALL WORKER("myworker";"doSomething";$signal) + $signaled:=$signal.wait(1) //wait for 1 second max + + If($signaled) + ALERT("myworker finished the work. Result: "+$signal.myresult) + Else + ALERT("myworker has not finished in less than 1s") + End if +``` + + +The ***doSomething*** method could be like: + +```4d + #DECLARE ($signal : 4D.Signal) + //any processing + //... + Use($signal) + $signal.myresult:=$processingResult //return the result + End use + $signal.trigger() // The work is finished +``` + + + +## .description + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.description** : Text +#### Description + +The `.description` property contains a custom description for the `Signal` object.. + +`.description` can be set at the creation of the signal object or at any moment. Note that since the `Signal` object is a shared object, any write-mode access to the `.description` property must be surrounded by a `Use...End use` structure. + +This property is **read-write**. + + + + +## .signaled + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | + +
          + +**.signaled** : Boolean +#### Description + +The `.signaled` property contains the current state of the `Signal` object. When the signal is created, `.signaled` is **False**. It becomes **True** when the `.trigger( )` is called on the object. + +This property is **read-only**. + + + + +## .trigger() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.trigger( )** +| Parameter | Type | | Description | +| --------- | ---- |::| ------------------------------- | +| | | | Does not require any parameters | + + +#### Description + +The `.trigger( )` function sets the `signaled` property of the signal object to **true** and awakens all workers or processes waiting for this signal. + +If the signal is already in the signaled state (i.e., the `signaled` property is already **true**), the function does nothing. + + + + +## .wait() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.wait**( { *timeout* : Real } ) : Boolean +| Parameter | Type | | Description | +| --------- | ------- | -- | ---------------------------------------------- | +| timeout | Real | -> | Maximum waiting time for the signal in seconds | +| Result | Boolean | <- | State of the `.signaled` property | + + +#### Description + +The `.wait( )` function makes the current process wait until the `.signaled` property of the signal object to become **true** or the optional *timeout* to expire. + +To prevent blocking code, you can pass a maximum waiting time in seconds in the *timeout* parameter (decimals are accepted). +> **Warning**: Calling `.wait( )` without a *timeout* in the 4D main process is not recommended because it could freeze the whole 4D application. + +If the signal is already in the signaled state (i.e. the `.signaled` property is already **true**), the function returns immediately, without waiting. + +The function returns the value of the `.signaled` property. Evaluating this value allows knowing if the function returned because the `.trigger( )` has been called (`.signaled` is **true**) or if the *timeout* expired (`.signaled` is **false**). +> The state of a process that waits for a signal is `Waiting for internal flag`. + + + + diff --git a/website/translated_docs/pt/API/Transporter.md b/website/translated_docs/pt/API/Transporter.md new file mode 100644 index 00000000000000..e48d59c298302d --- /dev/null +++ b/website/translated_docs/pt/API/Transporter.md @@ -0,0 +1,347 @@ +--- +id: Transporter +title: Transporter Class +--- + +## Description + + +## .acceptUnsecureConnection + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.acceptUnsecureConnection** : Boolean + +#### Description + +The `.acceptUnsecureConnection` property contains **True** if 4D is allowed to establish an unencrypted connection when encrypted connection is not possible. + +It contains **False** if unencrypted connections are unallowed, in which case an error in returned when encrypted connection is not possible. + +Available secured ports are: + +- SMTP + - 465: SMTPS + - 587 or 25: SMTP with STARTTLS upgrade if supported by the server. + +- IMAP + - 143: IMAP non-encrypted port + - 993: IMAP with STARTTLS upgrade if supported by the server + +- POP3 + - 110: POP3 non-encrypted port + - 995: POP3 with STARTTLS upgrade if supported by the server. + +--- + + ## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.authenticationMode** : Text +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `IMAP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `IMAP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `IMAP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `IMAP authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | ---------------------------------------------- | +| APOP | `POP3 authentication APOP` | Authentication using APOP protocol (POP3 only) | +| CRAM-MD5 | `POP3 authentication CRAM-MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `POP3 authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `POP3 authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `POP3 authentication plain` | Authentication using PLAIN protocol | + + +--- + + ## .authenticationMode + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + + +**.authenticationMode** : Text + +#### Description + +The `.authenticationMode` property contains the authentication mode used to open the session on the mail server. + +By default, the most secured mode supported by the server is used. + +Possible values are: + +| Value | Constants | Comment | +| -------- | ------------------------------ | -------------------------------------- | +| CRAM-MD5 | `SMTP authentication CRAM MD5` | Authentication using CRAM-MD5 protocol | +| LOGIN | `SMTP authentication login` | Authentication using LOGIN protocol | +| OAUTH2 | `SMTP authentication OAUTH2` | Authentication using OAuth2 protocol | +| PLAIN | `SMTP authentication plain` | Authentication using PLAIN protocol | + + +--- + +## .bodyCharset + +
          History +| Version | Changes | +| ------- | ----------------------- | +| v18 | Support for UTF8 base64 | +| v17 R5 | Added | +
          + +**.bodyCharset** : Text + +#### Description + +The `.bodyCharset` property contains the charset and encoding used for the body part of the email. + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Value | Comment | +| ------------------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
          • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          | +| mail mode ISO88591 | ISO-8859-1 |
          • *headerCharset*: ISO-8859-1 & Quoted-printable
          • *bodyCharset*: ISO-8859-1 & 8-bit
          | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (**default value**) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .connectionTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.connectionTimeOut** : Integer + + +#### Description + +The `.connectionTimeOut` property contains the maximum wait time (in seconds) allowed to establish a connection to the server. By default, if the property has not been set in the server object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, or `IMAP New transporter`), the value is 30. + + + +--- + +## .headerCharset + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.headerCharset** : Text + +#### Description + +The `.headerCharset` property contains the charset and encoding used for the email header. The header includes the following parts of the email: + +* subject, +* attachment filename(s), +* email name. + +**Possible values:** + +| Constant | Value | Comment | +| ------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------- | +| mail mode ISO2022JP | US-ASCII_ISO-2022-JP_UTF8_QP |
          • *headerCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & Quoted-printable if possible, otherwise UTF-8 & Quoted-printable
          • *bodyCharset*: US-ASCII if possible, Japanese (ISO-2022-JP) & 7-bit if possible, otherwise UTF-8 & Quoted-printable
          | +| mail mode ISO88591 | ISO-8859-1 |
          • *headerCharset*: ISO-8859-1 & Quoted-printable
          • *bodyCharset*: ISO-8859-1 & 8-bit
          | +| mail mode UTF8 | US-ASCII_UTF8_QP | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & Quoted-printable (default value) | +| mail mode UTF8 in base64 | US-ASCII_UTF8_B64 | *headerCharset* & *bodyCharset*: US-ASCII if possible, otherwise UTF-8 & base64 | + + +--- + + +## .host + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.host** : Text + +#### Description + +The `.host` property contains the name or the IP address of the host server. Used for mail transactions (SMTP, POP3, IMAP). + + +--- + +## .logFile + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R5 | Added | +
          + +**.logFile** : Text + +#### Description + +The `.logFile` property contains the path of the extended log file defined (if any) for the mail connection. It can be relative (to the current Logs folder) or absolute. + +Unlike regular log files (enabled via the `SET DATABASE PARAMETER` command), extended log files store MIME contents of all sent mails and do not have any size limit. For more information about extended log files, refer to: + +* **SMTP connections** - [4DSMTPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **POP3 connections** - [4DPOP3Log.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* **IMAP connections** - [4DIMAPLog.txt](Admin/debugLogFiles.md#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) + + + + + + +--- + +## .port + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.port** : Integer + +#### Description + +The `.port` property contains the port number used for mail transactions. By default, if the *port* property has not been set in the *server* object (used to create the transporter object with `SMTP New transporter`, `POP3 New transporter`, `IMAP New transporter`), the port used is: + +* **SMTP** - 587 +* **POP3** - 995 +* **IMAP** - 993 + + + + +--- + + +## .sendTimeOut + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.sendTimeOut** : Integer + +#### Description +The `.sendTimeOut` property contains the maximum wait time (in seconds) of a call to `.send( )` before a timeout occurs. By default, if the `.sendTimeOut` property has not been set in the `server` object, the value 100 is used. + + +--- + + +## .user + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.user** : Text + +#### Description +The `.user` property contains the user name used for authentication on the mail server. + + +--- + +## .checkConnection() + +
          History +| Version | Changes | +| ------- | ------- | +| v17 R4 | Added | +
          + +**.checkConnection()** : Object +| Parameter | Type | | Description | +| --------- | ------ |:--:| ------------------------------------------- | +| Result | Object | <- | Status of the transporter object connection | + + +#### Description + +The `.checkConnection()` function checks the connection using information stored in the transporter object, recreates the connection if necessary, and returns the status. This function allows you to verify that the values provided by the user are valid and consistent. + + +#### Returned object + +The function sends a request to the mail server and returns an object describing the mail status. This object can contain the following properties: + +| Property | | Type | Description | +| ---------- | ------------------------ | ---------- | ------------------------------------------------------------------------------------------------------------ | +| success | | boolean | True if the check is successful, False otherwise | +| status | | number | (SMTP only) Status code returned by the mail server (0 in case of an issue unrelated to the mail processing) | +| statusText | | text | Status message returned by the mail server, or last error returned in the 4D error stack | +| errors | | collection | 4D error stack (not returned if a mail server response is received) | +| | \[ ].errCode | number | 4D error code | +| | \[ ].message | text | Description of the 4D error | +| | \[ ].componentSignature | text | Signature of the internal component which returned the error | + + + + + + diff --git a/website/translated_docs/pt/API/WebServerClass.md b/website/translated_docs/pt/API/WebServerClass.md new file mode 100644 index 00000000000000..00ee6f0334e97f --- /dev/null +++ b/website/translated_docs/pt/API/WebServerClass.md @@ -0,0 +1,707 @@ +--- +id: WebServerClass +title: WebServer +--- + + +The `WebServer` class API allows you to start and monitor a web server for the main (host) application as well as each hosted component (see the [Web Server object](WebServer/webServerObject.md) overview). This class is available from the `4D` class store. + + + +### Web Server object + +Web server objects are instantiated with the [`WEB Server`](#web-server) command. + +They provide the following properties and functions: + + +### Summary +| | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.accessKeyDefined** : Boolean](#accesskeydefined)

              true if an access key is defined in the settings of the web server | +| [**.certificateFolder** : Text](#certificatefolder)

              folder where the certificate files are located | +| [**.characterSet** : Number
          **.characterSet** : Text](#characterset)

              character set that the 4D Web Server should use to communicate with browsers connecting to the application | +| [**.cipherSuite** : Text](#ciphersuite)

              cipher list used for the secure protocol | +| [**.CORSEnabled** : Boolean](#corsenabled)

              CORS (*Cross-origin resource sharing*) service status for the web server | +| [**.CORSSettings** : Collection](#corssettings)

              list of allowed hosts and methods for the CORS service | +| [**.debugLog** : Number](#debuglog)

              status of the HTTP request log file | +| [**.defaultHomepage** : Text](#defaulthomepage)

              name of the default home page | +| [**.HSTSEnabled** : Boolean](#hstsenabled)

              HTTP Strict Transport Security (HSTS) status | +| [**.HSTSMaxAge** : Number](#hstsmaxage)

              maximum length of time (in seconds) that HSTS is active for each new client connection | +| [**.HTTPCompressionLevel** : Number](#httpcompressionlevel)

              compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies) | +| [**.HTTPCompressionThreshold** : Number](#httpcompressionthreshold)

              size threshold (bytes) for requests below which exchanges should not be compressed | +| [**.HTTPEnabled** : Boolean](#httpenabled)

              HTTP protocol state | +| [**.HTTPPort** : Number](#httpport)

              listening IP port number for HTTP | +| [**.HTTPTrace** : Boolean](#httptrace)

              activation of `HTTP TRACE` | +| [**.HTTPSEnabled** : Boolean](#httpsenabled)

              HTTPS protocol state | +| [**.HTTPSPort** : Number](#httpsport)

              listening IP port number for HTTPS | +| [**.inactiveProcessTimeout** : Number](#inactiveprocesstimeout)

              life duration (in minutes) of the inactive legacy session processes | +| [**.inactiveSessionTimeout** : Number](#inactivesessiontimeout)

              life duration (in minutes) of inactive legacy sessions (duration set in cookie) | +| [**.IPAddressToListen** : Text](#ipaddresstolisten)

              IP address on which the 4D Web Server will receive HTTP requests | +| [**.isRunning** : Boolean](#isrunning)

              web server running state | +| [**.keepSession** : Boolean](#keepsession)

              True if legacy sessions are enabled in the web server, False otherwise | +| [**.logRecording** : Number](#logrecording)

              log requests (logweb.txt) recording value | +| [**.maxConcurrentProcesses** : Number](#maxconcurrentprocesses)

              maximum number of concurrent web processes supported by the web server | +| [**.maxRequestSize** : Number](#maxrequestsize)

              maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process | +| [**.maxSessions** : Number](#maxsessions)

              maximum number of simultaneous legacy sessions | +| [**.minTLSVersion** : Number](#mintlsversion)

              minimum TLS version accepted for connections | +| [**.name** : Text](#name)

              name of the web server application | +| [**.openSSLVersion** : Text](#opensslversion)

              version of the OpenSSL library used | +| [**.perfectForwardSecrecy** : Boolean](#perfectforwardsecrecy)

              PFS availability on the server | +| [**.rootFolder** : Text](#rootfolder)

              path of web server root folder | +| [**.scalableSession** : Boolean](#scalablesession)

              True if scalable sessions are used in the web server, and False otherwise | + + +[**.sessionCookieDomain** : Text](#sessioncookiedomain)

              "domain" field of the session cookie| |[**.sessionCookieName** : Text](#sessioncookiename)

              name of the cookie used for storing the session ID| |[**.sessionCookiePath** : Text](#sessioncookiepath)

              "path" field of the session cookie| |[**.sessionCookieSameSite** : Text](#sessioncookiesamesite)

              "SameSite" session cookie value| |[**.sessionIPAddressValidation** : Boolean](#sessionipaddressvalidation)

              IP address validation for session cookies| |[ **.start**() : Object
          **.start**( *settings* : Object ) : Object](#start)

              starts the web server on which it is applied| |[**.stop()** ](#stop)

              stops the web server on which it is applied| + + + +## WEB Server + +

          History +| Version | Changes | +| ------- | ---------------------------------- | +| v18 R3 | Added | +| v19 | support for .sessionCookieSameSite | + +
          + +**WEB Server** : 4D.WebServer
          **WEB Server**( *option* : Integer ) : 4D.WebServer + + +| Parameter | Type | | Description | +| --------- | ------------ | -- | -------------------------------------------------------------- | +| option | Integer | -> | Web server to get (default if omitted = `Web server database`) | +| Result | 4D.WebServer | <- | Web server object | + + +The `WEB Server` command returns the default Web server object, or the Web server object defined through the *option* parameter. + +By default, if the *option* parameter is omitted, the command returns a reference to the Web server of the database, i.e. the default Web server. To designate the Web server to return, you can pass one of the following constants in the *option* parameter: + +| Constant | Value | Comment | +| ------------------------------ | ----- | -------------------------------------------------------- | +| `Web server database` | 1 | Current database Web server (default if omitted) | +| `Web server host database` | 2 | Web server of the host database of a component | +| `Web server receiving request` | 3 | Web server that received the request (target Web server) | + +The returned Web server object contains the current values of the Web server properties. + +#### Example + +From your component, you want to know if the Web server of the host database is started: + +```4d + // Method of a component + var $hostWS : 4D.WebServer + $hostWS:=WEB Server(Web server host database) + If($hostWS.isRunning) + ... + End if +``` + +## WEB Server list + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
          + +**WEB Server list** : Collection + + +| Parameter | Type | | Description | +| --------- | ---------- | -- | ---------------------------------------------- | +| Result | Collection | <- | Collection of the available Web server objects | + + +The `WEB Server list` command returns a collection of all Web server objects available in the 4D application. + +A 4D application can contain anywhere from one to several Web servers: + +- one Web server for the host database (default Web server) +- one Web server for each component. + +All available Web servers are returned by the `WEB Server list` command, whether they are actually running or not. + +> The default Web server object is automatically loaded by 4D at startup. On the other hand, each component Web server that you want to use must be instantiated using the [`WEB Server`](#web-server) command. + +You can use the [.name](#name) property of the Web server object to identify the project or component to which each Web server object in the list is attached. + + +#### Example + +We want to know how many running web servers are available: + +```4d + var $wSList : Collection + var $vRun : Integer + + $wSList:=WEB Server list + $vRun:=$wSList.countValues(True;"isRunning") + ALERT(String($vRun)+" web server(s) running on "+String($wSList.length)+" available.") + +``` + + + + +## .accessKeyDefined + + +**.accessKeyDefined** : Boolean + +The **.accessKeyDefined** property contains true if an access key is defined in the settings of the web server. This property is used by the WebAdmin web server to validate the security configuration of the administration interface. + + + +## .certificateFolder + + + +**.certificateFolder** : Text + +Path of the folder where the certificate files are located. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter of the [`.start()`](#start) function, it can be a [`Folder` object](FolderClass.md). + + + + +## .characterSet + + +**.characterSet** : Number
          **.characterSet** : Text + +The character set that the 4D Web Server should use to communicate with browsers connecting to the application. The default value actually depends on the language of the OS. Can be a MIBEnum integer or a Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets/character-sets.xhtml). Here is the list of identifiers corresponding to the character sets supported by the 4D Web Server: + +* 4 = ISO-8859-1 +* 12 = ISO-8859-9 +* 13 = ISO-8859-10 +* 17 = Shift-JIS +* 2024 = Windows-31J +* 2026 = Big5 +* 38 = euc-kr +* 106 = UTF-8 +* 2250 = Windows-1250 +* 2251 = Windows-1251 +* 2253 = Windows-1253 +* 2255 = Windows-1255 +* 2256 = Windows-1256 + + + + +## .cipherSuite + + +**.cipherSuite** : Text + +The cipher list used for the secure protocol. Sets the priority of ciphering algorithms implemented by the 4D web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + + + + + +## .CORSEnabled + +**.CORSEnabled** : Boolean + +The CORS (*Cross-origin resource sharing*) service status for the web server. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled (True), XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see `CORSSettings` below). When disabled (False, default), all cross site requests sent with CORS are ignored. When enabled (True) and a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +Default: False (disabled) + +For more information about CORS, please refer to the [Cross-origin resource sharing page](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + + + + +## .CORSSettings + + +**.CORSSettings** : Collection + +A list of allowed hosts and methods for the CORS service (see [`CORSEnabled`](#corsenabled) property). Each object must contain a **host** property and, optionally, a **methods** property: + +* **host** (text, mandatory): Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. If *host* is not present or empty, the object is ignored. Several syntaxes are supported: + - 192.168.5.17:8081 + - 192.168.5.17 + - 192.168.* + - 192.168.*:8081 + - http://192.168.5.17:8081 + - http://*.myDomain.com + - http://myProject.myDomain.com + - *.myDomain.com + - myProject.myDomain.com + - \* + +* **methods** (text, optional): Accepted HTTP method(s) for the corresponding CORS host. Separate each method with a ";" (e,g,: "post;get"). If *methods* is empty, null, or undefined, all methods are enabled. + + + + +## .debugLog + + +**.debugLog** : Number + +The status of the HTTP request log file (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). + +* 0 = disabled +* 1 = enabled without body parts (body size is provided in this case) +* 3 = enabled with body parts in response only +* 5 = enabled with body parts in request only +* 7 = enabled with body parts in response and request + + + + +## .defaultHomepage + + +**.defaultHomepage** : Text + +The name of the default home page or "" to not send the custom home page. + + + + +## .HSTSEnabled + +**.HSTSEnabled** : Boolean + +The HTTP Strict Transport Security (HSTS) status. HSTS allows the Web server to declare that browsers should only interact with it via secure HTTPS connections. Browsers will record the HSTS information the first time they receive a response from the web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the `HSTSMaxAge` property. HSTS requires that HTTPS is enabled on the server. HTTP must also be enabled to allow initial client connections. + + + + +## .HSTSMaxAge + +**.HSTSMaxAge** : Number + +The maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. + +Default value: 63072000 (2 years). + + + + +## .HTTPCompressionLevel + +**.HTTPCompressionLevel** : Number + +The compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). + +Possible values: + +* 1 to 9 (where 1 is the fastest compression and 9 the highest). +* -1 = set a compromise between speed and rate of compression. + +Default = 1 (faster compression). + + + + +## .HTTPCompressionThreshold + +**.HTTPCompressionThreshold** : Number + +The size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Default compression threshold = 1024 bytes + + + + +## .HTTPEnabled + + +**.HTTPEnabled** : Boolean + +The HTTP protocol state. + + + + + +## .HTTPPort + + +**.HTTPPort** : Number + +The listening IP port number for HTTP. + +Default = 80 + + + + +## .HTTPTrace + +**.HTTPTrace** : Boolean + +The activation of `HTTP TRACE`. For security reasons, by default the Web server rejects `HTTP TRACE` requests with an error 405. When enabled, the web server replies to `HTTP TRACE` requests with the request line, header, and body. + + + + +## .HTTPSEnabled + + +**.HTTPSEnabled** : Boolean The HTTPS protocol state. + + + + +## .HTTPSPort + + +**.HTTPSPort** : Number The listening IP port number for HTTPS. + +Default = 443 + + + + +## .inactiveProcessTimeout + +**.inactiveProcessTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of the inactive legacy session processes. At the end of the timeout, the process is killed on the server, the `On Web Legacy Close Session` database method is called, then the legacy session context is destroyed. + +Default = 480 minutes + + + + +## .inactiveSessionTimeout + +**.inactiveSessionTimeout** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The life duration (in minutes) of inactive legacy sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default = 480 minutes + + + + +## .IPAddressToListen + + +**.IPAddressToListen** : Text + +The IP address on which the 4D Web Server will receive HTTP requests. By default, no specific address is defined. Both IPv6 string formats and IPv4 string formats are supported. + + + + + +## .isRunning + + +**.isRunning** : Boolean + +*Read-only property* + +The web server running state. + + + + +## .keepSession + +**.keepSession** : Boolean + +True if legacy sessions are enabled in the web server, False otherwise. + +##### See also: +[.scalableSession](#scalablesession) + + + + +## .logRecording + + +**.logRecording** : Number + +The log requests (logweb.txt) recording value. + +* 0 = Do not record (default) +* 1 = Record in CLF format +* 2 = Record in DLF format +* 3 = Record in ELF format +* 4 = Record in WLF format + + + + +## .maxConcurrentProcesses + + +**.maxConcurrentProcesses** : Number + +The maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. + +Possible values: 10 - 32000 + +Default = 100 + + + + +## .maxRequestSize + + +**.maxRequestSize** : Number + +The maximum size (in bytes) of incoming HTTP requests (POST) that the web server is allowed to process. Passing the maximum value (2147483647) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. + +Possible values: 500000 - 2147483647 + + + + +## .maxSessions + +**.maxSessions** : Number +> This property is not returned in [scalable sessions mode](#scalablesession). + +The maximum number of simultaneous legacy sessions. When you reach the limit, the oldest legacy session is closed (and `On Web Legacy Close Session` database method is called) if the web server needs to create a new one. The number of simultaneous legacy sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default) + + + + +## .minTLSVersion + +**.minTLSVersion** : Number + +The minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +* 1 = TLSv1_0 +* 2 = TLSv1_1 +* 3 = TLSv1_2 (default) +* 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + + + + +## .name + + +**.name** : Text + +*Read-only property* + +The name of the web server application. + + + + + +## .openSSLVersion + +**.openSSLVersion** : Text + +*Read-only property* + +The version of the OpenSSL library used. + + + + +## .perfectForwardSecrecy + + +**.perfectForwardSecrecy** : Boolean + +*Read-only property* + +The PFS availability on the server. + + + +## .rootFolder + + +**.rootFolder** : Text + +The path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object. + + +## .scalableSession + + +**.scalableSession** : Boolean + +True if scalable sessions are used in the web server, and False otherwise. + +##### See also: +[.keepSession](#keepsession) + + +## .sessionCookieDomain + + +**.sessionCookieDomain** : Text + +The "domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + + + +## .sessionCookieName + + +**.sessionCookieName** : Text + +The name of the cookie used for storing the session ID. + +*Read-only property* + + + + +## .sessionCookiePath + + +**.sessionCookiePath** : Text + +The "path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + + + +## .sessionCookieSameSite + +
          History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
          + +**.sessionCookieSameSite** : Text + +The "SameSite" session cookie value. Possible values (using constants): + +| Constant | Value | Description | +| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| Web SameSite Strict | "Strict" | *Default value* - Cookies are only sent in a first-party context | +| Web SameSite Lax | "Lax" | Cookies are also sent on cross-site subrequests but only when a user is navigating to the origin site (i.e. when following a link). | +| Web SameSite None | "None" | Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. | + +See the [Session Cookie SameSite](WebServer/webServerConfig.md#session-cookie-samesite) description for detailed information. + + + + +## .sessionIPAddressValidation + + +**.sessionIPAddressValidation** : Boolean + +The IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between WiFi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change (this setting lowers the security level of your application). + + + + +## .start() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
          + + +**.start**() : Object
          **.start**( *settings* : Object ) : Object + + + +| Parameter | Type | | Description | +| --------- | ------ | -- | ------------------------------------- | +| settings | Object | -> | Web server settings to set at startup | +| Result | Object | <- | Status of the web server startup | + + +The `.start()` function starts the web server on which it is applied, using properties set in the optional *settings* object parameter. + +The web server starts with default settings defined in the settings file of the project or (host database only) using the `WEB SET OPTION` command. However, using the *settings* parameter, you can define customized properties for the web server session. + +All settings of [Web Server objects](#web-server-object) can be customized, except read-only properties ([.isRunning](#isrunning), [.name](#name), [.openSSLVersion](#opensslversion), [.perfectForwardSecrecy](#perfectforwardsecrecy), and [.sessionCookieName(#sessioncookiename)]). + +Customized session settings will be reset when the [`.stop()`](#stop) function is called. + + +#### Returned object + +The function returns an object describing the Web server launch status. This object can contain the following properties: + +| Property | | Type | Description | +| -------- | ----------------------- | ---------- | -------------------------------------------------------------------- | +| success | | Boolean | True if the web server was correctly started, False otherwise | +| errors | | Collection | 4D error stack (not returned if the web server started successfully) | +| | \[].errCode | Number | 4D error code | +| | \[].message | Text | Description of the 4D error | +| | \[].componentSignature | Text | Signature of the internal component which returned the error | +> If the Web server was already launched, an error is returned. + +#### Example + +```4d + var $settings;$result : Object + var $webServer : 4D.WebServer + + $settings:=New object("HTTPPort";8080;"defaultHomepage";"myAdminHomepage.html") + + $webServer:=WEB Server + $result:=$webServer.start($settings) + If($result.success) + //... + End if +``` + + + + +## .stop() + +
          History +| Version | Changes | +| ------- | ------- | +| v18 R3 | Added | +
          + +**.stop()** + +| Parameter | Type | | Description | +| --------- | ---- | | ------------------------------- | +| | | | Does not require any parameters | + + +The `.stop()` function stops the web server on which it is applied. + +If the web server was started, all web connections and web processes are closed, once the currently handled requests are finished. If the web server was not started, the method does nothing. +> This function resets the customized web settings defined for the session using the *settings* parameter of the [`.start()`](#start) function, if any. + + +#### Example + +To stop the database Web server: + +```4d + var $webServer : 4D.WebServer + + $webServer:=WEB Server(Web server database) + $webServer.stop() +``` + + + + + + diff --git a/website/translated_docs/pt/API/ZipArchiveClass.md b/website/translated_docs/pt/API/ZipArchiveClass.md new file mode 100644 index 00000000000000..77e956c2b70cc1 --- /dev/null +++ b/website/translated_docs/pt/API/ZipArchiveClass.md @@ -0,0 +1,374 @@ +--- +id: ZipArchiveClass +title: ZIPArchive +--- + + +A 4D ZIP archive is a `File` or `Folder` object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save disk space or transfer files via mediums which may have size limitations (e.g., email or network). + +- You create a 4D ZIP archive with the [ZIP Create archive](#zip-create-archive) command. +- 4D [`ZIPFile`](ZipFileClass.md) and [`ZIPFolder`](ZipFolderClass.md) instances are available through the [`root`](#root) property (`ZIPFolder`) of the object returned by [ZIP Read archive](#zip-read-archive) command. + + +### Example + +To retrieve and view the contents of a ZIP file object: + +```4d +var $path; $archive : 4D.File +var $zipFile : 4D.ZipFile +var $zipFolder : 4D.ZipFolder +var $txt : Text + +$path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") +$archive:=ZIP Read archive($path) +$zipFolder:=$archive.root // store the zip main folder +$zipFile:=$zipFolder.files()[0] //read the first zipped file + +If($zipFile.extension=".txt") + $txt:=$zipFile.getText() +End if +``` + +### Summary + +| | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**.root** : 4D.ZipFolder](#root)

              a virtual folder providing access to the contents of the ZIP archive | + + +## ZIP Create archive + +

          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**ZIP Create archive** ( *fileToZip* : 4D.File ; *destinationFile* : 4D.File ) : Object
          **ZIP Create archive** ( *folderToZip* : 4D.Folder ; *destinationFile* : 4D.File { ; *options* : Integer }) : Object
          **ZIP Create archive** ( *zipStructure* : Object ; *destinationFile* : 4D.File ) : Object +| Parameter | Type | | Description | +| --------------- | --------- |:--:| ---------------------------------------------------- | +| fileToZip | 4D.File | -> | File or Folder object to compress | +| folderToZip | 4D.Folder | -> | File or Folder object to compress | +| zipStructure | Object | -> | File or Folder object to compress | +| destinationFile | 4D.File | -> | Destination file for the archive | +| options | Integer | -> | *folderToZip* option: `ZIP Without enclosing folder` | +| Result | Object | <- | Status object | + + +#### Description + +The `ZIP Create archive` command creates a compressed ZIP archive object and returns the status of the operation. + +You can pass a 4D.File, a 4D.Folder, or a zip structure object as first parameter: + +- *fileToZip*: You simply pass a `4D.File` to compress. + +- *folderToZip*: You pass a `4D.Folder` to compress. In this case, the *options* parameter allows you to compress only the contents of the folder (i.e., exclude the enclosing folder). By default, `ZIP Create archive` will compress the folder and its contents, so that the decompressing operation will recreate a folder. If you want the decompressing operation to restore only the contents of the folder, pass the `ZIP Without enclosing folder` constant in the *options* parameter. + +- *zipStructure*: You pass an object describing the ZIP archive object. The following properties are available to define the structure:
        • a collection of `4D.File` or `4D.Folder` objects or
        • a collection of objects with the following properties:
        • + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          + Property + + Type + + Description +
          + source + + 4D.File or 4D.Folder + + + File or Folder +
          + destination + + Text + + (optional) - Specify a relative filepath to change the organization of the contents of the archive +
          + option + + number + + (optional) - `ZIP Ignore invisible files` or 0 to compress all of the file +
          + + + + + + callback + + + + 4D.Function + + + + A callback formula that will receive the compression progress (0 - 100) in $1. + + + + +In the *destinationFile* parameter, pass a `4D.File` object describing the ZIP archive to create (name, location, etc.). It is advised to use the ".zip" extension if you want the ZIP archive to be processed automatically by any software. + +Once an archive is created, you can use the [ZIP Read archive](#zip-read-archive) command to access it. + +**Status object** + +The returned status object contains the following properties: + +| Property | Type | Description | +| ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| statusText | Text | Error message (if any):
        • Cannot open ZIP archive
        • Cannot create ZIP archive
        • Password is required for encryption | +| status | Integer | Status code | +| success | Boolean | True if archive created successfully, else false | + + + + + +#### Example 1 + +To compress a `4D.File`: + + + +```4d + var $file; $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/file.zip") + $file:=Folder(fk desktop folder).file("MyDocs/text.txt") + + $status:=ZIP Create archive($file;$destination) +``` + + + + + +#### Example 2 + +To compress a `4D.Folder` without the folder itself: + + + +```4D + var $folder : 4D.Folder + var $destination : 4D.File + var $status : Object + + $destination:=Folder(fk desktop folder).file("MyDocs/Images.zip") + $folder:=Folder(fk desktop folder).folder("MyDocs/Images") + + $status:=ZIP Create archive($folder;$destination;ZIP Without enclosing folder) +``` + + + + +#### Example 3 + +To compress a ZIP archive structure with a password and progress bar: + + + +```4d + var $destination : 4D.File + var $zip;$status : Object + var progID : Integer + + $destination:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + + $zip:=New object + $zip.files:=Folder(fk desktop folder).folder("MyDocs/Resources").folders() + $zip.password:="password" + $zip.callback:=Formula(myFormulaCompressingMethod($1)) + + progID:=Progress New //we use the 4D Progress component + + $status:=ZIP Create archive($zip;$destination) + + Progress QUIT(progID) +``` + + +`myFormulaCompressingMethod`: + + + +```4d + var $1 : Integer + Progress SET PROGRESS(progID;Num($1/100)) +``` + + + + + +#### Example 4 + +You want to pass a collection of folders and files to compress to the *zipStructure* object: + + + +```4d + var $destination : 4D.File + var $zip;$err : Object + $zip:=New object + $zip.files:=New collection + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Tests/text2.txt"))) + $zip.files.push(New object("source";Folder(fk desktop folder).file("Images/image.png"))) + + $destination:=Folder(fk desktop folder).file("file.zip") + $err:=ZIP Create archive($zip;$destination) +``` + + + + + + + +## ZIP Read archive + +
          History +| Version | Changes | +| ------- | ------- | +| v18 | Added | +
          + +**ZIP Read archive** ( *zipFile* : 4D.File { ; *password* : Text }) : 4D.ZipArchive + +| Parameter | Type | | Description | +| --------- | ------------- |:--:| --------------------------- | +| zipFile | 4D.File | -> | Zip archive file | +| password | Text | -> | ZIP archive password if any | +| Result | 4D.ZipArchive | <- | Archive object | + + + + + +#### Description + +The `ZIP Read archive` command retrieves the contents of *zipFile* and returns it as a `4D.ZipArchive` object. + + + +> This command does not uncompress the ZIP archive, it only provides a view of its contents. To extract the contents of an archive, you need to use methods such as [file.copyTo()](Document.md#copyto) or [folder.copyTo()](Directory.md#copyto). + +Pass a `4D.File` object referencing the compressed ZIP archive in the *zipFile* parameter. The target archive file will be opened until the `ZIP Read archive` has finished executing and all contents/references have been extracted/released, then it will be closed automatically. + +If the *zipFile* is password protected, you need to use the optional *password* parameter to provide a password. If a password is required but not passed when trying to read the contents of the archive, an error is generated. + +**Archive object** + +The returned `4D.ZipArchive` object contains a single [`root`](#root) property whose value is a `4D.ZipFolder` object. This folder describes the whole contents of the ZIP archive. + + + + + +#### Example + +To retrieve and view the contents of a ZIP file object: + + + +```4d + var $archive : 4D.ZipArchive + var $path : 4D.File + + $path:=Folder(fk desktop folder).file("MyDocs/Archive.zip") + $archive:=ZIP Read archive($path) +``` + + +To retrieve the list of the files and folders in the archive: + + + +```4d + $folders:=$archive.root.folders() + $files:=$archive.root.files() +``` + + +To read the contents of a file without extracting it from the root folder: + + + +```4d + + If($files[$i].extension=".txt") + $txt:=$files[$i].getText() + Else + $blob:=$files[$i].getContent() + End if +``` + + +To extract from the root folder: + + + +```4d + //extract a file + $folderResult:=$files[$i].copyTo(Folder(fk desktop folder).folder("MyDocs")) + + //extract all files + $folderResult:=$archive.root.copyTo(Folder(fk desktop folder).folder("MyDocs")) +``` + + + + + + +## .root + +**.root** : 4D.ZipFolder + + + +#### Description + +The `.root` property contains a virtual folder providing access to the contents of the ZIP archive. + +The `root` folder and its contents can be manipulated with the [ZipFile](ZipFileClass.md) and [ZipFolder](ZipFolderClass.md) functions and properties. + +This property is **read-only**. + + + diff --git a/website/translated_docs/pt/API/ZipFileClass.md b/website/translated_docs/pt/API/ZipFileClass.md new file mode 100644 index 00000000000000..763aab543a3954 --- /dev/null +++ b/website/translated_docs/pt/API/ZipFileClass.md @@ -0,0 +1,33 @@ +--- +id: ZipFileClass +title: ZIPFile +--- + +The following properties and functions from the [File](FileClass.md) class are available to `ZIPFile` objects: + +| Available [File](FileClass.md) APIs for ZIPFile | Comment | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D.File](FileClass.md#copyto) | | +| [**.creationDate** : Date](FileClass.md#creationdate) | | +| [**.creationTime** : Time](FileClass.md#creationtime) | | +| [**.exists** : Boolean](FileClass.md#exists) | | +| [**.extension** : Text](FileClass.md#extension) | | +| [**.fullName** : Text](FileClass.md#fullname) | | +| [**.getContent( )** : 4D.Blob](FileClass.md#getcontent) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FileClass.md#geticon) | | +| [**.getText**( { *charSetName* : Text } { ; } { *breakMode* : integer} ) : Text
          **.getText**( { *charSetNum* : integer } { ; } { *breakMode* : integer} ) : Text](FileClass.md#gettext) | | +| [**.hidden** : Boolean](FileClass.md#hidden) | | +| [**.isAlias** : Boolean](FileClass.md#isalias) | | +| [**.isFile** : Boolean](FileClass.md#isfile) | | +| [**.isFolder** : Boolean](FileClass.md#isfolder) | | +| [**.isWritable** : Boolean](FileClass.md#iswritable) | Always false with ZIP archive | +| [**.modificationDate** : Date](FileClass.md#modificationdate) | | +| [**.modificationTime** : Time](FileClass.md#modificationtime) | | +| [**.name** : Text](FileClass.md#name) | | +| [**.original** : 4D.File
          **.original** : 4D.Folder](FileClass.md#original) | | +| [**.parent** : 4D.Folder](FileClass.md#parent) | | +| [**.path** : Text](FileClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FileClass.md#platformpath) | | + + + diff --git a/website/translated_docs/pt/API/ZipFolderClass.md b/website/translated_docs/pt/API/ZipFolderClass.md new file mode 100644 index 00000000000000..7e6b7a913e731d --- /dev/null +++ b/website/translated_docs/pt/API/ZipFolderClass.md @@ -0,0 +1,37 @@ +--- +id: ZipFolderClass +title: ZIPFolder +--- + + +The following properties and functions from the [Folder](FolderClass.md) class are available to `ZIPFolder` objects: + + +| Available [Folder](FolderClass.md) APIs for ZIPFolder | Comment | +| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| [**.copyTo**( *destinationFolder* : 4D.Folder { ; *newName* : Text } { ; *overwrite* : Integer } ) : 4D Folder](FolderClass.md#copyto) | | +| [**.creationDate** : Date](FolderClass.md#creationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.creationTime** : Time](FolderClass.md#creationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.exists** : Boolean](FolderClass.md#exists) | | +| [**.extension** : Text](FolderClass.md#extension) | | +| [**.file**( *path* : Text ) : 4D.File](FolderClass.md#file) | | +| [**.files**( { *options* : Integer } ) : Collection](FolderClass.md#files) | | +| [**.folder**( *path* : Text ) : 4D.Folder](FolderClass.md#folder) | | +| [**.folders**( { *options* : Integer } ) : Collection](FolderClass.md#folders) | | +| [**.fullName** : Text](FolderClass.md#fullname) | | +| [**.getIcon**( { *size* : Integer } ) : Picture](FolderClass.md#geticon) | | +| [**.hidden** : Boolean](FolderClass.md#hidden) | | +| [**.isAlias** : Boolean](FolderClass.md#isalias) | | +| [**.isFile** : Boolean](FolderClass.md#isfile) | | +| [**.isFolder** : Boolean](FolderClass.md#isfolder) | | +| [**.isPackage** : Boolean](FolderClass.md#ispackage) | | +| [**.modificationDate** : Date](FolderClass.md#modificationdate) | Date may be different for the `root` folder from a folder within the archive | +| [**.modificationTime** : Time](FolderClass.md#modificationtime) | Time may be different for the `root` folder from a folder within the archive | +| [**.name** : Text](FolderClass.md#name) | | +| [**.original** : 4D.Folder](FolderClass.md#original) | | +| [**.parent** : 4D.Folder](FolderClass.md#parent) | The archive's virtual `root` folder has no parent. However, the folders within the archive may have a parent other than the root. | +| [**.path** : Text](FolderClass.md#path) | Returns a path relative to the archive | +| [**.platformPath** : Text](FolderClass.md#platformpath) | | + + + diff --git a/website/translated_docs/pt/API/overview.md b/website/translated_docs/pt/API/overview.md new file mode 100644 index 00000000000000..27e78bfc3d6b11 --- /dev/null +++ b/website/translated_docs/pt/API/overview.md @@ -0,0 +1,27 @@ +--- +id: visão Geral +title: Class API Overview +--- + +This section describes the built-in 4D class API as well as the associated constructor commands. 4D class functions and properties are available through class instance objects. + +- functions must be called on instances with the () operator. For example, `collection.sort()`. + +- properties are accessed without parentheses, for example `file.creationTime`. You can also use the \[] syntax, for example `file["creationTime"]`. + +## Writing conventions + +The following conventions are used in the function syntax: + +- the `{ }` characters (braces) indicate optional parameters. For example, `.delete( { option : Integer } )` means that the *option* parameter may be omitted when calling the function. +- the `{ ; ...param }` notation indicates an unlimited number of parameters. For example, `.concat( value : any { ;...valueN } ) : Collection` means that an unlimited number of values of any type can be passed to the function. +- the `any` keyword is used for parameters that can be of any type that can be stored within attributes (number, text, boolean, date, time, object, collection...). + +## Other resources + +For an overall presentation of the 4D Language basics and concepts, please go to the [4D Language Concepts](Concepts/about.md) section. + +For a description of the 4D "classic" language, please go to the *4D Language Reference* on [doc.4d.com](https://doc.4d.com). + + + diff --git a/website/translated_docs/pt/Admin/building.md b/website/translated_docs/pt/Admin/building.md new file mode 100644 index 00000000000000..a02ed2cc1baed6 --- /dev/null +++ b/website/translated_docs/pt/Admin/building.md @@ -0,0 +1,640 @@ +--- +id: building +title: Building a project package +--- + +4D includes a final application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. + +The application builder allows you to: + +* Build a compiled structure, 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 structure 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). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible in compiled applications. + + +## Build application overview + +Building a project package can be carried out using: + +- either the [BUILD APPLICATION](https://doc.4d.com/4Dv18R4/4D/18-R4/BUILD-APPLICATION.301-4982852.en.html) command, +- or the [Build Application window](#application-builder). + +To display the Build Application dialog, select **Design** > **Build Application...** from the menu bar. + +![](assets/en/Project/buildappProj.png) + +The Build Application dialog includes several pages that can be accessed using tabs: + +![](assets/en/Project/appbuilderProj.png) + + +Building can only be carried out once the project is compiled. If you select this command without having previously compiled the project, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the project must be (re)compiled. + + +### 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 project. + +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. + +XML keys provide additional options besides those displayed in the Build Application dialog box. The description of these keys are detailed in the [4D XML Keys BuildApplication](https://doc.4d.com/4Dv18R4/4D/18-R4/4D-XML-Keys-BuildApplication.100-5068211.en.html) manual. + +### Log file + +When an application is built, 4D generates a log file named *BuildApp.log.xml* in the **Logs** folder of the project. 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, +- Any signing issues (e.g. a non-signed plug-in). + +Checking this file may help you saving time during the subsequent deployment steps, for example if you intend to notarize your application. + +> Use the `Get 4D file(Build application log file)` command to get the log file location. + + + +## Application name and destination folder + +![](assets/en/Project/buidappstructureProj.png) + +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 an application containing only compiled code. + +This feature creates a *.4dz* file within a *Compiled Database/\* folder. For example, if you have named your application “MyProjectâ€, 4D will create: + +*\/Compiled Database/MyProject/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. 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 project are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to the [description of project architecture](Project/architecture.md). + + +### 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 project (the host application project), its functionalities are accessible from the host project. + +If you have named your application, *MyComponent*, 4D will create a *Components* folder containing *MyComponent.4dbase* folder: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +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). + + +## 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 application project. + +The following elements are required for the build: +- 4D Volume Desktop (the 4D database engine), +- an [appropriate license](#licenses) + +On Windows, this feature creates an executable file (.exe). On macOS, it handles the creation of software packages. + +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/). + +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). + +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). + +#### 4D Volume Desktop Location + +In order to build a stand-alone application, you must first designate the folder containing the 4D Volume Desktop file: + +* *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. + +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). + +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. + +> 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. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +#### Generated files + +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. + +If you have specified "MyProject" as the name of the application, you will find the following files in this subfolder (aka MyProject): + +* *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 project as well as the project 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 project. 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* + - 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/4Dv18R4/4D/18-R4/Application-file.301-4982855.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 + +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: + +* Install a 4D Volume Desktop version corresponding to a specific language; +* Add a custom *PlugIns* folder; +* Customize the contents of the *Resources* folder. +> 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 + +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: + +* *cert.pem* and *key.pem* files (optional): These files are used for TLS connections and by data encryption commands, +* default Web root folder. + +Items must be installed: + +- **on Windows**: in the *Final Application\MyProject\Database* subfolder. +- **on macOS**: next to the *MyProject.app* software package. + + + + + +## Client/Server page + +On this tab, you can build customized client-server applications that are homogenous, cross-platform and with an automatic update option. + +![](assets/en/Project/buildappCSProj.png) + +### What is a Client/Server application? + +A client/server application comes from the combination of three items: + +- A compiled 4D project, +- The 4D Server application, +- The 4D Volume Desktop application (macOS and/or Windows). + +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 project file 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 server 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)). + + + +### Build server application + +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). + +#### 4D Server location + +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. + +#### Current version + +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)). + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +### Build client application + +Checking this option generates the client part of your application during the building phase. + +#### 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). + +> 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. + +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. + +- **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. + +* **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). If you have followed the process for generating a cross-platform client application, a .*4darchive* update file is available for each platform: + +To trigger client application update notifications, simply replace the old version of the server application with the new one and then execute it. The rest of the process is automatic. + +On the client side, when the “old†client application tries to connect to the updated server application, a dialog box is displayed on the client machine, indicating that a new version is available. The user can either update their version or cancel the dialog box. + +* If the user clicks **OK**, the new version is downloaded to the client machine over the network. Once the download is complete, the old client application is closed and the new version is launched and connects to the server. The old version of the application is then placed in the machine’s recycle bin. +* If the user clicks **Cancel**, the update is cancelled; if the old version of the client application is not in the range of versions accepted by the server (please refer to the following paragraph), the application is closed and connection is impossible. Otherwise (by default), the connection is established. + +#### Forcing automatic updates + +In some cases, you may want to prevent client applications from being able to cancel the update download. For example, if you used a new version of the 4D Server source application, the new version of the client application must absolutely be installed on each client machine. + +To force the update, simply exclude the current version number of client applications (X-1 and earlier) in the version number range compatible with the server application. In this case, the update mechanism will not allow non-updated client applications to connect. For example, if the new version of the client-server application is 6, you can stipulate that any client application with a version number lower than 6 will not be allowed to connect. + +The [current version number](#current_version) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). + + +#### Update Error + +If 4D cannot carry out the update of the client application, the client machine displays the following error message: “The update of the client application failed. The application is now going to quit.†+ +There are many possible causes for this error. When you get this message, it is advisable to check the following parameters first off: + +* **Pathnames** - Check the validity of the pathnames set in the application project via the Application builder dialog box or via XML keys (for example *ClientMacFolderToWin*). More particularly, check the pathnames to the versions of 4D Volume Desktop. +* **Read/write privileges** - On the client machine, check that the current user has write access rights for the client application update. + + +### Generated files + +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*. +> 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. + +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. + +The contents of these folders vary depending on the current platform: + +* *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. + +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. + + +#### Location of Web files + +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* 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 application** - in the *Client Server executable\ \Client* subfolder. + +* **on macOS** + * **Server application** - next to the *\Server* software package. + * **Client application** - next to the *\Client* software package. + + +### Embedding a single-user client application + +4D allows you to embed a compiled structure in the Client application. This feature can be used, for example, to provide users with a "portal" application, that gives access to different server applications thanks to the `OPEN DATABASE` command executing a `.4dlink` file. + +To enable this feature, add the `DatabaseToEmbedInClientWinFolder` and/or `DatabaseToEmbedInClientMacFolder` keys in the *buildApp* settings file. When one of these keys is present, the client application building process generates a single-user application: the compiled structure, instead of the *EnginedServer.4Dlink* file, is placed in the "Database" folder. + +- If a default data folder exists in the single-user application, a licence is embedded. +- If no default data folder exists in the single-user application, it will be executed without data file and without licence. + +The basic scenario is: + +1. In the Build application dialog box, select the "Build compiled structure" option to produce a .4DZ or .4DC for the application to be used in single-user mode. +2. In the *buildApp.4DSettings* file of the client-server application, use following xml key(s) to indicate the path to the folder containing the compiled single user application: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Build the client-server application. This will have following effects: + - the whole folder of the single user application is copied inside the "Database" folder of the merged client + - the *EnginedServer.4Dlink* file of the "Database" folder is not generated + - the .4DC, .4DZ, .4DIndy files of the single user application copy are renamed using the name of the merged client + - the `PublishName` key is not copied in the *info.plist* of the merged client + - if the single-user application does not have a "Default data" folder, the merged client will run with no data. + +Automatic update 4D Server features ([Current version](#current-version) number, `SET UPDATE FOLDER` command...) work with single-user application as with standard remote application. At connection, the single-user application compares its `CurrentVers` key to the 4D Server version range. If outside the range, the updated client application is downloaded from the server and the Updater launches the local update process. + + +### Customizing client and/or server cache folder names + +Client and server cache folders are used to store shared elements such as resources or components. They are required to manage exchanges between server and remote clients. Client/server applications use default pathnames for both client and server system cache folders. + +In some specific cases, you might need to customize the names of these folders to implement specific architectures (see below). 4D provides you with the `ClientServerSystemFolderName` and `ServerStructureFolderName` keys to be set in the *buildApp* settings file. + + +#### Client cache folder + +Customizing the client-side cache folder name can be useful when your client application is used to connect to several merged servers which are similar but use different data sets. In this case, to save multiple unnecessary downloads of identical local resources, you can use the same custom local cache folder. + +- Default configuration (*for each connection to a server, a specific cache folder is downloaded/updated*): + +![](assets/en/Admin/cachea.png) + +- Using the `ClientServerSystemFolderName` key (*a single cache folder is used for all servers*): + +![](assets/en/Admin/cacheb.png) + + +#### Server cache folder + +Customizing the server-side cache folder name is useful when you run several identical server applications built with different 4D versions on the same computer. If you want each server to use its own set of resources, you need to customize the server cache folder. + +- Default configuration (*same server applications share the same cache folder*): + +![](assets/en/Admin/cacheServera.png) + +- Using the `ServerStructureFolderName` key (*a dedicated cache folder is used for each server application*): + +![](assets/en/Admin/cacheServerb.png) + + + + +## 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: + +![](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. + +* **Plugins and components** column - Displays the name of the plug-in/component. + +* **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: + +* 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/Admin/buildappCertif.png) + +### Licenses + +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. + +To remove or add a license, use the **[+]** and **[-]** buttons at the bottom of the window. + +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. + +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. + +Once you have selected a file, the list will indicate the characteristics of the license that it contains. + +* **License #** - Product license number +* **License** - Name of the product +* **Expiration date** - Expiration date of the license (if any) +* **Path** - Location on disk + +If a license is not valid, a message will warn you. + +You can designate as many valid files as you want. When building an executable application, 4D will use the most appropriate license available. +> Dedicated "R" licenses are required to build applications based upon "R-release" versions (license numbers for "R" products start with "R-4DDP"). + +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 + +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). + +- 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: + +![](assets/en/Admin/buildapposxcertProj.png) + +This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. + +* **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): + +![](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: [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). +> 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. + +* **Generate self-signed certificate** - runs the "Certificate Assistant" that allows you to generate a self-signed certificate. If you do not have an Apple developer certificate, you need to provide a self-signed certificate. With this certificate, no alert message is displayed if the application is deployed internally. If the application is deployed externally (i.e. through http or email), at launch macOS displays an alert message that the application's developer is unidentified. The user can "force" the opening of the application.

          In the "Certificate Assistant", be sure to select the appropriate options: ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> 4D recommends to subscribe to the Apple Developer Program to get access to Developer Certificates that are necessary to notarize applications (see below). + + + +#### 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. + +The **Sign application** option of the 4D application builder lets you generate applications that are compatible with this option by default. + + +#### About Notarization + +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. + +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. + +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). + +## Customizing application icons + +4D associates a default icon with stand-alone, server, and client applications, however you can customize the icon for each application. + +* **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** - 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. + +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: + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- 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. + +The opening sequence for launching a merged application is: + +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. + + +### Last data file opened + +#### Path of last 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: + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +The data file path is stored in a dedicated file, named *lastDataPath.xml*. + +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. + +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). + +#### Configuring the data linking mode + +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**. + +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. + +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**. + +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). + + +*Duplication when data linked by application name:* ![](assets/en/Project/datalinking1.png) + +*Duplication when data linked by application path:* ![](assets/en/Project/datalinking2.png) + +You can select the data linking mode during the build application process. You can either: + +- 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). + + +### Defining a default data folder + +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: + +- 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). + + +To define and use a default data file: + +- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the application project folder. This file must be provided along with all other necessary files, depending on the project 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. + +The following graphic illustrates this feature: + +![](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. + + +## 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. + +### Connection scenario + +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: + +- 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. + +### Storing the last server path + +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: + +```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. + +> - 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 + +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: + +- **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) + +- **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) diff --git a/website/translated_docs/pt/Admin/cli.md b/website/translated_docs/pt/Admin/cli.md new file mode 100644 index 00000000000000..8818d1a7db0edf --- /dev/null +++ b/website/translated_docs/pt/Admin/cli.md @@ -0,0 +1,190 @@ +--- +id: cli +title: Command Line Interface +--- + +You can use the macOS Terminal or the Windows console to drive your 4D applications (4D and 4D Server) using command lines. More particularly, this functionality allows you to: + +- launch a database remotely, which can be especially useful for administering Web servers. +- run automatic tests for your applications. + +## Basic information + +You can execute command lines for 4D applications using the macOS Terminal or the Windows Console. + +- Under macOS, you should use the `open` command. +- Under Windows, you can just pass the arguments directly. + +> Under macOS, you can pass the arguments directly by going to the folder where the application is found inside the package (Contents/MacOS path), which allows to address the stderr stream. For example, if the 4D package is located in the `MyFolder` folder, you must write the command line as follows: `/MyFolder/4D.app/Contents/MacOS/4D`. However, we recommend that you use the `open` command whenever you do not need to access the stderr stream. + +## Launch a 4D application + +Here is a description of command lines and the arguments supported to launch 4D applications. + +Syntax: +``` + [--version] [--help] [--project] [ [--data ]] +[--opening-mode interpreted | compiled] [--create-data] [--user-param ] [--headless] [--dataless] +[--webadmin-settings-file] [--webadmin-access-key] [--webadmin-auto-start] [--webadmin-store-settings] +``` +| Argument                               | Value | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `applicationPath` | Path of the 4D, 4D Server or merged application | Launches the application. Identical to double-clicking the 4D application. When called without structure file argument, the application is executed and the 'select database' dialog box appears. | +| `--version` | | Dispays application version and exits | +| `--help` | | Dispays help and exits. Alternate arguments: -?, -h | +| `--project` | projectPath | packagePath | 4dlinkPath | Project file to open with the current data file. No dialog box appears. | +| `--data` | dataPath | Data file to open with the designated project file. If not specified, 4D uses the last opened data file. | +| `--opening-mode` | interpreted | compiled | Requests database to open in interpreted or compiled mode. No error is thrown if the requested mode is unavailable. | +| `--create-data` | | Automatically creates a new data file if no valid data file is found. No dialog box appears. 4D uses the file name passed in the "--data" argument if any (generates an error if a file with the same name already exists). | +| `--user-param` | Custom user string | A string that will be available within the 4D application through the Get database parameter command (the string must not start with a "-" character, which is reserved). | +| `--headless` | | Launches the 4D, 4D Server or merged application without interface (headless mode). In this mode:

        • The Design mode is not available, database starts in Application mode
        • No toolbar, menu bar, MDI window or splash screen is displayed
        • No icon is displayed in the dock or task bar
        • The opened database is not registered in the "Recent databases" menu
        • The diagnostic log is automatically started (see [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html), selector 79)
        • Every call to a dialog box is intercepted and an automatic response it provided (e.g. OK for the [ALERT](https://doc.4d.com/4dv19/help/command/en/page41.html) command, Abort for an error dialog...). All intercepted commands(*) are logged in the diagnostic log.

        • For maintenance needs, you can send any text to standard output streams using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. Note that headless 4D applications can only be closed by a call to [QUIT 4D](https://doc.4d.com/4dv19/help/command/en/page291.html) or using the OS task manager. | +| `--dataless` | | Launches 4D, 4D Server or merged application in dataless mode. Dataless mode is useful when 4D runs tasks with no need for data (project compilation for example). In this mode:
        • No file containing data is opened, even if specified in the command line or the `.4DLink` file, or when using the `CREATE DATA FILE` and `OPEN DATA FILE` commands.
        • Commands that manipulate data will throw an error. For example, `CREATE RECORD` throws “no table to apply the command toâ€.

        • **Note**:
        • If passed in the command line, dataless mode applies to all databases opened in 4D, as long as the application is not closed.
        • If passed using the `.4DLink` file, dataless mode only applies to the database specified in the `.4DLink` file. For more information on `.4DLink` files, see [Project opening shortcuts](../Project/creating.md#project-opening-shortcuts).
        • | +| `--webadmin-settings-file` | File path | Path of the custom WebAdmin `.4DSettings` file for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-access-key` | String | Access key for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-auto-start` | Boolean | Status of the automatic startup for the [WebAdmin web server](webAdmin.md) | +| `--webadmin-store-settings` | | Store the access key and automatic starting parameters in the currently used settings file (i.e. the default [`WebAdmin.4DSettings`](webAdmin.md#webadmin-settings) file or a custom file designated with the `--webadmin-settings-path` parameter). Use the `--webadmin-store-settings` argument to save these settings if necessary | + (*) Some dialogs are displayed before the database is opened, so that it's impossible to write into the + +[Diagnostic log file](debugLogFiles.md#4ddiagnosticlogtxt) (licence alert, conversion dialog, database selection, data file selection). In such case, an error message is thrown both in the stderr stream and the system event log, and then the application quits. + +### Examples + +These examples assume that your 4D application is stored on the desktop and that the database to be opened is found in the "Documents" folder. + +> The current folder of the user is reached using the "~ " command under macOS and the "%HOMEPATH%" command under Windows. + +Launch application: + +* macOS: + + +```bash +open ~/Desktop/4D.app +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe +``` + +Launch application with a package file on macOS: + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myDB.4dbase +``` + +Launch application with a project file: + +* macOS: + + +```bash +yarn open ~/Desktop/4D.app --args ~/Documents/myProj/Project/myProj.4DProject +``` + + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myProj\Project\myProj.4DProject +``` + + + +Launch application with a project file and a data file: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD +or: +%HOMEPATH%\Desktop\4D\4D.exe /project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject /data %HOMEPATH%\Documents\data\myData.4DD +``` + +Launch application with a .4DLink file: + +* macOS: + + +```bash +open ~/Desktop/4D.app MyDatabase.4DLink +``` + +```bash +open "~/Desktop/4D Server.app" MyDatabase.4DLink +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D.exe MyDatabase.4DLink +``` + +```bash +%HOMEPATH%\Desktop\4D Server.exe" MyDatabase.4DLink +``` + +Launch application in compiled mode and create a data file if not available: + +* macOS: + + +```bash +open ~/Desktop/4D.app ~/Documents/myBase.4dbase --args --opening-mode compiled --create-data true +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe %HOMEPATH%\Documents\myBase.4dbase\myDB.4db --opening-mode compiled --create-data true +``` + +Launch application with a project file and a data file and pass a string as a user parameter: + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --user-param "Hello world" +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --user-param "Hello world" +``` + +Launch application without interface (headless mode): + +* macOS: + + +```bash +open ~/Desktop/4D.app --args --project ~/Documents/myProj/Project/myProj.4DProject --data ~/Documents/data/myData.4DD --headless +``` + +```bash +open ~/Desktop/MyBuiltRemoteApp −−headless +``` + +* Windows: + + +```bash +%HOMEPATH%\Desktop\4D\4D.exe --project %HOMEPATH%\Documents\myProj\Project\myProj.4DProject --data %HOMEPATH%\Documents\data\myData.4DD --headless +%HOMEPATH%\Desktop\4D\MyBuiltRemoteApp.exe --headless +``` diff --git a/website/translated_docs/pt/Admin/dataExplorer.md b/website/translated_docs/pt/Admin/dataExplorer.md new file mode 100644 index 00000000000000..faedc9766a85d8 --- /dev/null +++ b/website/translated_docs/pt/Admin/dataExplorer.md @@ -0,0 +1,190 @@ +--- +id: dataExplorer +title: Web Data Explorer +--- + +> **Preview**: The Web Data Explorer is provided as a preview feature. Using this feature in production is not recommended. The final implementation could be slightly different. + + +The Data Explorer provides a web interface to view and query data in your project datastore. Using this tool, you can easily browse among all your entities and search, order, or filter attribute values. It helps you to control data and quickly identify issues at any step of the development process. + +![alt-text](assets/en/Admin/dataExplorer1.png) + + +## Access Configuration + +The Data Explorer relies on the [`WebAdmin`](webAdmin.md) web server component for the configuration and authentication settings. + +- **configuration**: the Data Explorer configuration reuses the [`WebAdmin` web server settings](webAdmin.md#webadmin-settings), +- **authentication**: access to the Data Explorer is granted when the [session user is authenticated](webAdmin.md#authentication-and-session) and has the "WebAdmin" privilege. When the Data Explorer is accessed through the **Data Explorer** menu item (see below), an automatic authentication is provided. + +> The Data Explorer access can be disabled using the [`.setAdminProtection()`](API/DataStoreClass.md#setadminprotection) function. + + +## Opening the Data Explorer + +The Data Explorer page is automatically available when [the `WebAdmin` web server is started](webAdmin.md#starting-the-webadmin-web-server). + +To connect to the Data Explorer web page: + +- if you use a 4D application with interface, select **Data Explorer...** command from: + - the **Records** menu (in 4D stand-alone) + - the **Window** menu (in 4D Server) + +- whether you use a headless 4D application or not, you can open your web browser and enter the following address: + + `IPaddress:HTTPPort/dataexplorer` or `IPaddress:HTTPSPort/dataexplorer` + + In this context, you will be prompted to enter the [access key](webAdmin.md#access-key) to open a `WebAdmin` session on the server: + +![alt-text](assets/en/Admin/accessKeyEnter.png) + +> [HTTPPort](webAdmin.md#http-port) and [HTTPSPort](webAdmin.md#https-port) values are configured in the `WebAdmin` settings. + + + +## Using the Data Explorer + +In addition to a comprehensive and customizable view of your data, the Data Explorer allows you to query and order your data. + +### Requisitos + +The Data Explorer supports the following web browsers: + +- Chrome +- Safari +- Edge +- FireFox + +The minimum resolution to use the Data Explorer is 1280x720. Recommended resolution is 1920x1080. + +### Basics + +The Data Explorer provides an overall access to the ORDA data model with respect to the [ORDA mapping rules](ORDA/dsMapping.md#general-rules). + +You can switch to the **dark mode** display theme using the selector at the bottom of the page: + +![alt-text](assets/en/Admin/dark.png) + +![alt-text](assets/en/Admin/dataExplorer2.png) + +The page contains several areas: + +- On the left side are the **Dataclasses area** and **Attributes area**, allowing you can select the dataclasses and attributes to display. Attributes are ordered according to the underlying structure creation order. Primary key and indexed attributes have a specific icon. You can filter the list of proposed dataclass names and attribute names using the respective search areas. ![alt-text](assets/en/Admin/dataExplorer3.png) + +- The central part contains the **Search area** and the **Data grid** (list of entities of the selected dataclass). Each column of the grid represents a datastore attribute. + - By default, all entities are displayed. You can filter the displayed entities using the search area. Two query modes are available: [Query on attributes](#query-on-attributes) (selected by default), and the [Advanced query with expression](#advanced-query-with-expression). You select the query mode by clicking on the corresponding button (the **X** button allows you to reset the query area and thus stop filtering): ![alt-text](assets/en/Admin/dataExplorer4b.png) + + - The name of the selected dataclass is added as a tab above the data grid. Using these tabs, you can switch between dataclasses that have been already selected. You can remove a referenced dataclass by clicking the "remove" icon at the right of the dataclass name. + - You can reduce the number of columns by unchecking attributes in the left side. You can also switch the columns in the data grid using drag and drop. You can click on a column header to [sort entities](#ordering-entities) according to its values (when possible). + - If an operation requires a long time, a progress bar is displayed. You can stop the running operation at any moment by clicking on the red button: + +![alt-text](assets/en/Admin/dataExplorer5.png) + + + +- On the right side is the **Details area**: it displays the attribute values of the currently selected entity. All attribute types are displayed, including pictures and objects (expressed in json). You can browse between the entities of the dataclass by clicking the **First** / **Previous** / **Next** / **Last** links at the bottom of the area. + + + +### Updating contents + +When the ORDA model or data is modified on the database side (table added, record edited or deleted, etc.), you just need to refresh the Data Explorer page in the browser (using the F5 key, for example). + + +### Ordering entities + +You can reorder the displayed entity list according to attribute values. All types of attributes can be used for a sort, except picture and object. + +- Click on a column header to order entities according to the corresponding attribute values. By default, the sort is ascending. Click twice for a descending sort. A column used to sort entities is displayed with a small icon and its name is in *italics*. + +![alt-text](assets/en/Admin/dataExplorer7.png) + +- You can sort attributes on several levels. For example, you can sort employees by city and then by salary. To do that, hold down the **Shift** key and click sequentially on each column header to include in the sort order. + + +### Query on attributes + +In this mode, you can filter entities by entering values to find (or to exclude) in the areas above the attribute list. You can filter on one or several attributes. The entity list is automatically updated when you type in. + +![alt-text](assets/en/Admin/dataExplorer6.png) + +If you enter several attributes, a AND is automatically applied. For example, the following filter displays entities with *firstname* attribute starting with "flo" AND *salary* attribute value > 50000: + +![alt-text](assets/en/Admin/dataExplorer9.png) + +The **X** button allows you to remove entered attributes and thus stop filtering. + +Different operators and query options are available, depending on the data type of the attribute. + +> You cannot filter on picture or object attributes. + +#### Numeric operators + +With numeric, date, and time attributes, the "=" operator is selected by default. However, you can select another operator from the operator list (click on the "=" icon to display the list): + +![alt-text](assets/en/Admin/DEFilter1.png) + +#### Dates + +With date attributes, you can enter the date to use through a datepicker widget (click on the date area to display the calendar): + +![alt-text](assets/en/Admin/DEFilter2.png) + +#### Booleans + +When you click on a boolean attribute area, you can filter on **true**/**false** values but also on **null**/**not null** values: + +![alt-text](assets/en/Admin/DEFilter3.png) + +- **null** indicates that the attribute value was not defined +- **not null** indicates that the attribute value is defined (thus true or false). + +#### Text + +Text filters are not diacritic (a = A). + +The filter is of the "starts with" type. For example, entering "Jim" will show "Jim" and "Jimmy" values. + +You can also use the wildcard character (@) to replace one or more starting characters. For example: + +| A filter with | Finds | +| ------------- | -------------------------------------------------- | +| Bel | All values beginning with “Bel†| +| @do | All values containing “do†| +| Bel@do | All values starting with “Bel†and containing “do†| + +If you want to create more specific queries, such as "is exactly", you may need to use the advanced queries feature. + + +### Advanced queries with expression + +When you select this option, a query area is displayed above the entity list, allowing you to enter any expression to use to filter the contents: + +![alt-text](assets/en/Admin/dataExplorer8.png) + +You can enter advanced queries that are not available as attribute queries. For example, if you want to find entities with *firstname* attribute containing "Jim" but not "Jimmy", you can write: + +``` +firstname=="Jim" +``` + +You can use any ORDA query expression as [documented with the `query()` function](API/DataClassClass.md#query), with the following limitations or differences: + +- For security, you cannot execute formulas using `eval()`. +- Placeholders cannot be used; you have to write a *queryString* with values. +- String values containing space characters must be embedded in double quotes (""). + +For example, with the Employee dataclass, you can write: + +``` +firstname = "Marie Sophie" AND manager.lastname = "@th" +``` + +You can click on the `v` icon to display both [`queryPlan`](API/DataClassClass.md#queryplan) and [`queryPath`](API/DataClassClass.md#querypath). In the area, you can hover over the subquery blocks to have detailed information per subquery: + +![alt-text](assets/en/Admin/dataExplorer12.png) + +Right-click in the query area to display the previous valid queries: + +![alt-text](assets/en/Admin/dataExplorer11.png) diff --git a/website/translated_docs/pt/Admin/debugLogFiles.md b/website/translated_docs/pt/Admin/debugLogFiles.md new file mode 100644 index 00000000000000..1512f2e1c35e13 --- /dev/null +++ b/website/translated_docs/pt/Admin/debugLogFiles.md @@ -0,0 +1,509 @@ +--- +id: debugLogFiles +title: Description of log files +--- + +4D applications can generate several log files that are useful for debugging or optimizing their execution. Logs are usually started or stopped using selectors of the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) or [WEB SET OPTION](https://doc.4d.com/4dv19/help/command/en/page1210.html) commands and are stored in the [Logs folder](Project/architecture.md#logs-folder) of the database. + +Information logged needs to be analyzed to detect and fix issues. This section provides a comprehensive description of the following log files: + +* [4DRequestsLog.txt](#4drequestslogtxt) +* [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) +* [HTTPDebugLog.txt](#httpdebuglogtxt) +* 4DDebugLog.txt ([standard](#4ddebuglogtxt-standard) & [tabular](#4ddebuglogtxt-tabular)) +* [4DDiagnosticLog.txt](#4ddiagnosticlogtxt) +* [4DIMAPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DPOP3Log.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [4DSMTPLog.txt](#4dsmtplogtxt-4dpop3logtxt-and-4dimaplogtxt) +* [ORDA client requests log file](#orda-client-requests) + +> When a log file can be generated either on 4D Server or on the remote client, the word "Server" is added to the server-side log file name, for example "4DRequestsLogServer.txt" + +Log files share some fields so that you can establish a chronology and make connections between entries while debugging: + +* `sequence_number`: this number is unique over all debug logs and is incremented for each new entry whatever the log file, so that you can know the exact sequence of the operations. +* `connection_uuid`: for any 4D process created on a 4D client that connects to a server, this connection UUID is logged on both server and client side. It allows you to easily identify the remote client that launched each process. + +## 4DRequestsLog.txt + +This log file records standard requests carried out by the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) +//server side +``` + + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) +//remote side +``` +> This statement also starts the [4DRequestsLog_ProcessInfo.txt](l#4drequestslog_processinfotxt) log file. + +#### Headers + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + +#### Contents + +For each request, the following fields are logged: + +| Field name | Description | +| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: 'YYYY-MM-DDTHH:MM:SS.mmm' | +| systemid | System ID | +| component | Component signature (e.g., '4SQLS' or 'dbmg') | +| process\_info_ | index Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process. | +| request | Request ID in C/S or message string for SQL requests or `LOG EVENT` messages | +| bytes_in | Number of bytes received | +| bytes_out | Number of bytes sent | +| server\_duration | exec\_duration | Depends on where the log is generated:

        • *server\_duration* when generated on the client --Time taken in microseconds for the server to process the request and return a response. B to F in image below, OR
        • *exec\_duration* when generated on the server --Time taken in microseconds for the server to process the request. B to E in image below.
        • | +| write\_duration | Time taken in microseconds for sending the:

        • Request (when run on the client). A to B in image below.
        • Response (when run on the server). E to F in image below.
        • | +| task_kind | Preemptive or cooperative (respectively 'p' or 'c') | +| rtt | Time estimate in microseconds for the client to send the request and the server to acknowledge it. A to D and E to H in image below.

        • Only measured when using the ServerNet network layer, returns 0 when used with the legacy network layer.
        • For Windows versions prior to Windows 10 or Windows Server 2016, the call will return 0.
        • | + +Request flow: + +![](assets/en/Admin/logRequestFlow.PNG) + +## 4DRequestsLog_ProcessInfo.txt + +This log file records information on each process created on the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests). + +How to start this log: + +* on the server: + +```4d +SET DATABASE PARAMETER(4D Server log recording;1) //server side +``` + +* on a client: + +```4d +SET DATABASE PARAMETER(Client Log Recording;1) //remote side +``` +> This statement also starts the [4DRequestsLog.txt](#4drequestslogtxt) log file. + +#### Headers + +This file starts with the following headers: + +* Log Session Identifier +* Hostname of the server that hosts the application +* User Login Name: login on the OS of the user that ran the 4D application on the server. + + +#### Contents + +For each process, the following fields are logged: + +| Field name | Description | +| --------------------------------- | -------------------------------------------------------------- | +| sequence_number | Unique and sequential operation number in the logging session | +| time | Date and time using ISO 8601 format: "YYYY-MM-DDTHH:MM:SS.mmm" | +| process\_info_index | Unique and sequential process number | +| CDB4DBaseContext | DB4D component database context UUID | +| systemid | System ID | +| server\_process\_id | Process ID on Server | +| remote\_process\_id | Process ID on Client | +| process\_name | Process name | +| cID | Identifier of 4D Connection | +| uID | Identifier of 4D Client | +| IP Client | IPv4/IPv6 address | +| host_name | Client hostname | +| user_name | User Login Name on client | +| connection\_uuid | UUID identifier of process connection | +| server\_process\_unique\_id | Unique process ID on Server | + +## HTTPDebugLog.txt + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +How to start this log: + +```4d +WEB SET OPTION(Web debug log;wdl enable without body) +//other values are available +``` + +The following fields are logged for both Request and Response: + +| Field name | Description | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + +## 4DDebugLog.txt (standard) + +This log file records each event occurring at the 4D programming level. Standard mode provides a basic view of events. + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2) +//standard, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2) +//standard, current process only +``` + +The following fields are logged for each event: + +| Column # | Description | +| -------- | ------------------------------------------------------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| 3 | Process ID (p=xx) and unique process ID (puid=xx) | +| 4 | Stack level | +| 5 | Can be Command Name/ Method Name/Message/ Task Start Stop info/Plugin Name, event or Callback/Connection UUID | +| 6 | Time taken for logging operation in milliseconds | + +## 4DDebugLog.txt (tabular) + +This log file records each event occurring at the 4D programming level in a tabbed, compact format that includes additional information (compared to the standard format). + +How to start this log: + +```4d +SET DATABASE PARAMETER(Debug Log Recording;2+4) +//extended tabbed format, all processes + +SET DATABASE PARAMETER(Current process debug log recording;2+4) +//extended, current process only +``` + +The following fields are logged for each event: + +| Column # | Field name | Description | +| -------- | --------------- | ------------------------------------------------------------- | +| 1 | sequence_number | Unique and sequential operation number in the logging session | + +|2| time| Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | |3| ProcessID|Process ID| |4| unique_processID|Unique process ID| |5| stack_level|Stack level |6| operation_type| Log operation type. This value may be an absolute value:

          1. Command
          2. Method (project method, database method, etc.)
          3. Message (sent by [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command only)
          4. PluginMessage
          5. PluginEvent
          6. PluginCommand
          7. PluginCallback
          8. Task
          9. Member method (method attached to a collection or an object)

          When closing a stack level, the `operation_type`, `operation` and `operation_parameters` columns have the same value as the opening stack level logged in the `stack_opening_sequence_number` column. For example:

          1. 121 15:16:50:777 5 8 1 2 CallMethod Parameters 0
          2. 122 15:16:50:777 5 8 2 1 283 0
          3. 123 15:16:50:777 5 8 2 1 283 0 122 3
          4. 124 15:16:50:777 5 8 1 2 CallMethod Parameters 0 121 61

          The 1st and 2nd lines open a stack level, the 3rd and 4th lines close a stack level. Values in the columns 6, 7 and 8 are repeated in the closing stack level line. The column 10 contains the stack level opening sequence numbers, i.e. 122 for the 3rd line and 121 for the 4th.| |7|operation|May represent (depending on operation type):
        • a Language Command ID (when type=1)
        • a Method Name (when type=2)
        • a combination of pluginIndex;pluginCommand (when type=4, 5, 6 or 7). May contain something like '3;2'
        • a Task Connection UUID (when type=8)
        • +|8|operation_parameters|Parameters passed to commands, methods, or plugins| |9|form_event|Form event if any; empty in other cases (suppose that column is used when code is executed in a form method or object method)| |10|stack_opening_sequence_number|Only for the closing stack levels: Sequence number of the corresponding opening stack level| |11|stack_level_execution_time|Only for the closing stack levels: Elapsed time in micro seconds of the current logged action; only for the closing stack levels (see 10th columns in lines 123 and 124 in the log above)| + +## 4DDiagnosticLog.txt + +This log file records many events related to the internal application operation and is human-readable. You can include custom information in this file using the [LOG EVENT](https://doc.4d.com/4dv19/help/command/en/page667.html) command. + +How to start this log: + +```4d + SET DATABASE PARAMETER(Diagnostic log recording;1) //start recording +``` + +The following fields are logged for each event: + +| Field Name | Description | +| ------------------ | ------------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | +| timestamp | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | +| loggerID | Optional | +| componentSignature | Optional - internal component signature | +| messageLevel | Info, Warning, Error | +| message | Description of the log entry | + +Depending on the event, various other fields can also be logged, such as task, socket, etc. + +## 4DSMTPLog.txt, 4DPOP3Log.txt, and 4DIMAPLog.txt + +These log files record each exchange between the 4D application and the mail server (SMTP, POP3, IMAP) that has been initiated by the following commands: + +* SMTP - [SMTP New transporter](API/SMTPTransporterClass.md#smtp-new-transporter) +* POP3 - [POP3 New transporter](API/POP3TransporterClass.md#pop3-new-transporter) +* IMAP - [IMAP New transporter](API/IMAPTransporterClass.md#imap-new-transporter) + +The log files can be produced in two versions: + +* a regular version: + * named 4DSMTPLog.txt, 4DPOP3Log.txt, or 4DIMAPLog.txt + * no attachments + * uses an automatic circular file recycling each 10 MB + * intended for usual debugging + + To start this log: + + ```4d + SET DATABASE PARAMETER(SMTP Log;1) //start SMTP log + SET DATABASE PARAMETER(POP3 Log;1) //start POP3 log + SET DATABASE PARAMETER(IMAP Log;1) //start IMAP log + ``` + + 4D Server: Click on the **Start Request and Debug Logs** button in the [Maintenance Page](https://doc.4d.com/4Dv18R5/4D/18-R5/Maintenance-Page.300-5149308.en.html) of the 4D Server administration window. + + This log path is returned by the `Get 4D file` command. + +* an extended version: + * attachment(s) included no automatic recycling + * custom name + * reserved for specific purposes + + To start this log: + + ```4d + $server:=New object + ... + //SMTP + $server.logFile:="MySMTPAuthLog.txt" + $transporter:=SMTP New transporter($server) + + // POP3 + $server.logFile:="MyPOP3AuthLog.txt" + $transporter:=POP3 New transporter($server) + + //IMAP + $server.logFile:="MyIMAPAuthLog.txt" + $transporter:=IMAP New transporter($server) + ``` + +#### Contents + +For each request, the following fields are logged: + +| Column # | Description | +| -------- | ------------------------------------------------------------- | +| 1 | Unique and sequential operation number in the logging session | +| 2 | Date and time in RFC3339 format (yyyy-mm-ddThh:mm:ss.ms) | +| 3 | 4D Process ID | +| 4 | Unique process ID | +| 5 |
          • SMTP,POP3, or IMAP session startup information, including server host name, TCP port number used to connect to SMTP,POP3, or IMAP server and TLS status,or
          • data exchanged between server and client, starting with "S <" (data received from the SMTP,POP3, or IMAP server) or "C >" (data sent by the SMTP,POP3, or IMAP client): authentication mode list sent by the server and selected authentication mode, any error reported by the SMTP,POP3, or IMAP Server, header information of sent mail (standard version only) and if the mail is saved on the server,or
          • SMTP,POP3, or IMAP session closing information.
          | + +## ORDA client requests + +This log records each ORDA request sent from a remote machine. You can direct log information to memory or to a file on disk. The name and location of this log file are your choice. + +How to start this log: + +```4d +//to be executed on a remote machine +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory +``` + +If you want to use the unique sequence number in ORDA request log, you need to trigger it: + +```4d +//to be executed on a remote machine + +SET DATABASE PARAMETER(Client Log Recording;1) +//to enable log sequence number + +ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) +//can be also sent to memory + +SET DATABASE PARAMETER(Client Log Recording;0) +//disabling sequence number +``` + +The following fields are logged for each request: + +| Field name | Description | Example | +| -------------- | ------------------------------------------------------------- | --------------------------------------------------------- | +| sequenceNumber | Unique and sequential operation number in the logging session | 104 | +| url | Client ORDA request URL | "rest/Persons(30001)" | +| startTime | Starting date and time using ISO 8601 format | "2019-05-28T08:25:12.346Z" | +| endTime | Ending date and time using ISO 8601 format | "2019-05-28T08:25:12.371Z" | +| duration | Client processing duration (ms) | 25 | +| response | Server response object | {"status":200,"body":{"__entityModel":"Persons",\[...]}} | + + + +## Using a log configuration file + +You can use a **log configuration file** to easily manage log recording in a production environment. This file is preconfigured by the developer. Typically, it can be sent to customers so that they just need to select it or copy it in a local folder. Once enabled, the log configuration file triggers the recording of specific logs. + +### How to enable the file + +There are several ways to enable the log configuration file: + +- On 4D Server with interface, you can open the Maintenance page and click on the [Load logs configuration file](Admin/server-admin.md#load-logs-configuration-file) button, then select the file. In this case, you can use any name for the configuration file. It is immediately enabled on the server. +- You can copy the log configuration file in the [Settings folder](Project/architecture.md#settings-1) of the project. In this case, the file must be named `logConfig.json`. It is enabled at project startup (only on the server in client/server). +- With a built application, you can copy the `logConfig.json` file in the following folder: + + Windows: `Users\[userName]\AppData\Roaming\[application]` + + macOS: `/Users/[userName]/Library/ApplicationSupport/[application]` + +> If you want to enable the log configuration file for all projects in stand-alone, server and remote 4D applications, you can copy the `logConfig.json` file in the following folder: - Windows: `Users\[userName]\AppData\Roaming\4D or \4D Server` - macOS: `/Users/[userName]/Library/ApplicationSupport/4D or /4D Server` + +### JSON file description + +The log configuration file is a `.json` file that can contain the following properties: + +```json +{ + "$schema": "http://json-schema.org/draft-07/schema", + "title": "Logs Configuration File", + "description": "A file that controls the state of different types of logs in 4D clients and servers", + "type": "object", + "properties": { + "forceLoggingConfiguration": { + "description": "Forcing the logs configuration described in the file ingoring changes coming from code or user interface", + "type": "boolean", + "default": true + }, + "requestLogs": { + "description": "Configuration for request logs", + "type": "object", + "properties": { + "clientState": { + "description": "Enable/Disable client request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + }, + "serverState": { + "description": "Enable/Disable server request logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "debugLogs": { + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "commandList": { + "description": "Commands to log or not log", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "uniqueItems": true + }, + "state": { + "description": "integer to specify type of debuglog and options", + + "type": "integer", + "minimum": 0 + } + } + }, + "diagnosticLogs":{ + "description": "Configuration for debug logs", + "type": "object", + "properties": { + "state":{ + "description": "Enable/Disable diagnostic logs 0 or 1 (0 = do not record, 1 = record)", + "type": "integer", + "minimum": 0 + } + } + }, + "httpDebugLogs": { + "description": "Configuration for http debug logs", + "type": "object", + "properties": { + "level": { + "description": "Configure http request logs", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "state": { + "description": "Enable/Disable recording of web requests", + "type": "integer", + "minimum": 0, + "maximum": 4 + } + } + }, + "POP3Logs": { + "description": "Configuration for POP3 logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable POP3 logs (from 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "SMTPLogs": { + "description": "Configuration for SMTP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable SMTP log recording (form 0 to N)", + "type": "integer", + "minimum": 0 + } + } + }, + "IMAPLogs": { + "description": "Configuration for IMAP logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable IMAP log recording (form 0 to N)", + "type": "integer" + } + } + }, + "ORDALogs": { + "description": "Configuration for ORDA logs", + "type": "object", + "properties": { + "state": { + "description": "Enable/Disable ORDA logs (0 or 1)", + "type": "integer" + }, + "filename": { + "type": "string" + } + } + } + } +} +``` + +### Example + +Here is an example of log configuration file: + +```json +{ + "forceLoggingConfiguration": false, + "requestLogs": { + "clientState": 1, + "serverState": 1 + }, + "debugLogs": { + "commandList":["322","311","112"], + "state": 4 + }, + "diagnosticLogs":{ + "state" : 1 + }, + "httpDebugLogs": { + "level": 5, + "state" : 1 + }, + "POP3Logs": { + "state" : 1 + }, + "SMTPLogs": { + "state" : 1 + }, + "IMAPLogs": { + "state" : 1 + }, + "ORDALogs": { + "state" : 1, + "filename": "ORDALog.txt" + } +} +``` \ No newline at end of file diff --git a/website/translated_docs/pt/Admin/licenses.md b/website/translated_docs/pt/Admin/licenses.md new file mode 100644 index 00000000000000..b25ba357dceb7e --- /dev/null +++ b/website/translated_docs/pt/Admin/licenses.md @@ -0,0 +1,148 @@ +--- +id: licenses +title: Managing 4D Licenses +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/Installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example if: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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 application project with no access to the Design environment. + + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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 diff --git a/website/translated_docs/pt/Admin/server-admin.md b/website/translated_docs/pt/Admin/server-admin.md new file mode 100644 index 00000000000000..ba7b356258c09f --- /dev/null +++ b/website/translated_docs/pt/Admin/server-admin.md @@ -0,0 +1,526 @@ +--- +id: server-admin +title: 4D Server Administration Window +--- + + +When 4D Server is launched with interface under Windows or macOS, a graphical administration window is available, providing many analysis and control tools for the published 4D application. To display the 4D Server Administration window for the opened project, select the **Window > Administration** menu item, or press **Ctrl+U**. + +> The 4D Server administration window can be accessed from a remote 4D. For more information about this point, please refer to Administration from Remote Machines. + + +## Monitor Page + +The **Monitor** page displays dynamic information concerning database use as well as information about the system and the 4D Server application. + +![](assets/en/Admin/server-admin.png) + +> On Windows, some of the system information displayed on this page are retrieved via the Windows "Performance Analyzer" tools. These tools can only be accessed when the user that opened the session where 4D Server was launched has the necessary administration authorization. + +#### Graphic area + +The graphic area lets you see the evolution in real time of several parameters: the CPU usage, network traffic and memory. You select the parameter to be displayed via a menu found in the center of the window: + +![](assets/en/Admin/server-graphic.png) + +- **CPU Usage**: Overall CPU usage of the machine, for all applications taken together. The specific part of 4D Server in this usage rate is provided in the "Processors" information area. +- **Network**: Number of bytes received per second by the machine (server or client). The number of bytes sent is provided in the "Network" information area. +- **Physical memory**: Quantity of RAM memory of machine used by 4D Server. A more detailed view of memory use is provided in the "Memory" information area. +- **Virtual memory**: Quantity of virtual memory used by the 4D Server application. This memory is allocated by the system according to the application needs. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the maximum quantity of usable virtual memory. The maximum value is calculated dynamically according to the general memory settings of the application. +- **Cache**: Quantity of cache memory used by the 4D Server application. The value found at the bottom right of the area indicates the quantity of memory currently being used. The value found at the top left indicates the total size of the cache memory, as set via the Settings. + +Note that when this option is selected, the graph area scrolling is slowed down since an efficient analysis of the cache is generally carried out over a fairly long observation period. + + +#### Overview Area + +The "Overview" area provides various information concerning the system, application and licenses installed on the 4D Server machine. + +- **System Information**: Computer, system and IP address of server +- **Application Information**: Internal version number of 4D Server and Volume Shadow Copy status +- **Maximum connections**: Number of simultaneous connections allowed by type of server +- **License**: Description of license. When the product license or one of its attached expansions expires in less than 10 days, e.g. in case of a subscription-license, 4D Server tries to automatically renew the license from the 4D user account. In this case, if the automatic renewal failed for some reason (connection error, invalid account status, non-prolongated contract...), a warning icon is displayed next to the license to alert the server administrator. Additional information about the license renewal status can be displayed in a tip when you hover the mouse over the area: + +![](assets/en/Admin/server-licence-failed.png) + +Usually, you will need to check the [**Licences Manager**](licenses.md). + +#### Details Area + +The "Details" area repeats part of the information displayed in the graphic area and provides additional information as well. + +- **Hard drive**: Overall capacity of the hard disk and distribution of the space used by the database data (data file + data index), the space used by other files and the free space available. +- **Memory**: RAM memory installed on the machine and amount of memory used by 4D Server, by other applications or that is free. The memory used by 4D Server can also be displayed dynamically in the graphic area. +- **Processors**: Instant occupancy rate for processor(s) of the machine by 4D Server and by other applications. This rate is constantly recalculated. The occupancy rate by 4D Server can also be displayed dynamically in the graphic area. +- **Network**: Instantaneous number of bytes sent and received by the machine (server or client). This value is updated constantly. The number of bytes received by can also be displayed dynamically in the graphic area. + + +## Users Page + +The **Users** page lists the 4D users connected to the server. + + +![](assets/en/Admin/server-users.png) + +The "Users" button indicates, in parentheses, the total number of users connected to the server (this number does not take into account any display filters applied to the window). The page also contains a dynamic search area and control buttons. You can modify the order of the columns by dragging and dropping their header areas. + +You can also sort the list of column values by clicking on its header. Click several times to specify in turn an ascending/descending order. + +![](assets/en/Admin/server-users-sort.png) + +### List of Users + +For each user connected to the server, the list provides the following information: + +- System of the client machine (macOS or Windows) as an icon. +- **4D User**: Name of the 4D user, or alias if set with the [`SET USER ALIAS`](https://doc.4d.com/4dv19/help/command/en/page1666.html) command on the user machine. If passwords are not activated and no alias has been set, all users are named "Designer". +- **Machine name**: Name of the remote machine. +- **Session name**: Name of the session opened on the remote machine. +- **IP Address**: IP address of the remote machine. +- **Login date**: Date and time of the remote machine connection. +- **CPU Time**: CPU time consumed by this user since connecting. +- **Activity**: Ratio of time that 4D Server devotes to this user (dynamic display). "Sleeping" if the remote machine has switched to sleep mode (see below). + +#### Managing sleeping users + +4D Server specifically handles cases where a machine running a 4D remote application switches to sleep mode while its connection to the server machine is still active. In this case, the connected 4D remote application automatically notifies 4D Server of its imminent disconnection. On the server, the connected user changes to a **Sleeping** activity status: + +![](assets/en/Admin/server-sleeping.png) + +This status frees up resources on the server. In addition, the 4D remote application reconnects to 4D Server automatically after waking up from sleep mode. + +The following scenario is supported: a remote user stops working for awhile, for example during a lunch break, but keeps the connection to the server open. The machine switches to sleep mode. When the user returns, they wake the machine up and the 4D remote application automatically recovers its connection to the server as well as the session context. + +> A sleeping remote session is automatically dropped by the server after 48 hours of inactivity. You can modify this default timeout using the [`SET DATABASE PARAMETER`](https://doc.4d.com/4dv19/help/command/en/page642.html) command with the `Remote connection sleep timeout` selector. + + +### Search/filtering Area + +This feature can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The area indicates the columns where the search/filtering will be carried out. On the Users page, it will be the 4D User, Machine name and Session name columns. + +The list is updated in real time as you enter text in the area. It is possible to enter more than one value to be searched for: separate the values with a semi-colon. The `OR` type operator is used in this case. For example, if you enter "John;Mary;Peter," only rows with John OR Mary OR Peter in the target columns will be kept. + + +### Administration Buttons + +This page includes three control buttons. These are active if at least one row is selected. You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) key for a non-adjacent selection. + +#### Send message + +This button can be used to send a message to the 4D users selected in the window. If no user is selected, the button is not active. When you click on this button, a dialog box appears that lets you enter the message. The dialog box indicates the number of users that will receive this message: + +![](assets/en/Admin/server-message.png) + +The message will be displayed as an alert on the remote machines. + +> You can perfom the same action for remote users with the [`SEND MESSAGE TO REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1632.html) command. + + +#### Watch Processes + +This button can be used to directly show the processes of the user(s) selected on the [**Processes** page](#process-page) of the window. When you click on this button, 4D Server switches to the Processes page and enters the selected user names in the search/filtering area. + +#### Drop user + +This button can be used to force the selected user(s) to disconnect. When you click on this button, a warning dialog box appears so that you can confirm or cancel this operation (hold down **Alt** key while clicking on the **Drop user** button to disconnect the selected user(s) directly without displaying the confirmation dialog box). + +> You can perfom the same action for remote users with the [`DROP REMOTE USER`](https://doc.4d.com/4dv19/help/command/en/page1633.html) command. + + + +## Processes Page + +The **Processes** page lists all the processes underway. + +![](assets/en/Admin/server-admin-process-page.png) + + +The "Processes" button indicates, in parentheses, the total number of processes running in the server (this number does not take into account any display filters applied to the window nor the state of the **Display processes by groups** option). + +You can change the order of the columns by simply dragging and dropping the column header areas. You can also sort the list of column values by clicking on its header. + +Like the Users page, this page contains a dynamic [search/filtering area](#searchfiltering-area) that can be used to reduce the number of rows displayed in the list to those that correspond to the text entered in the search area. The search/filtering is carried out in the Session and Process name columns. + +There are also three shortcut buttons that can be used to filter by the type of process displayed in the window: + +![](assets/en/Admin/server-process-buttons.png) + +- **Users processes**: Processes generated by and for the user sessions. These processes are preceded by an icon in the form of a figure. +- **4D Processes**: Processes generated by the 4D Server engine. These processes are preceded by an icon in the form of a notched wheel. +- **Spare processes**: Processes that are inactive but kept temporarily and that can be reused at any time. This mechanism optimizes the reactivity of 4D Server. These processes are preceded by an icon in the form of a dimmed figure. + +The **Display processes by groups** option lets you group together the internal processes of 4D Server as well as the client processes, for better readability. When you check this option: + +- the "twinned" 4D client processes (main 4D client process and 4D client base process, see [Process Type](#process-type)) are grouped as one, +- a "Task managers" group is created; it includes the internal processes dedicated to dividing up tasks (Shared balancer, Net session manager, Exclusive pool worker), +- a "Client managers" group is created; it includes various client internal processes. + +The lower area of the window is used to display the graphic representation of the activity of the selected process(es). + +> You can select several rows by holding down the **Shift** key for an adjacent selection or **Ctrl** (Windows) / **Command** (macOS) for a non-adjacent selection. + +The activity of the process is the percentage of time that 4D Server has devoted to this process (ratio). The window provides the following information for each process: + +- Type of process (see below), +- Session/Info: + - 4D process - blank, + - User process - 4D user name, + - Web process - URL path, +- Name of the process, +- Number of the process (as returned by the [`New process`](https://doc.4d.com/4dv19/help/command/en/page317.html) command for example). The process number is the number assigned on the server. In the case of a global process, this number may be different from that assigned on the client machine. +- Current state of the process, +- Running time (in seconds) of the process since its creation, +- Percentage of time that 4D Server has devoted to this process (ratio). + +### Process Type + +Each process is identified by an icon as well as a type. The color and form of the icon indicates the type of process: + +| icon | type | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/Admin/server-icon-1.png) | Application server | +| ![](assets/en/Admin/server-icon-2.png) | SQL Server | +| ![](assets/en/Admin/server-icon-3.png) | DB4D Server (database engine) | +| ![](assets/en/Admin/server-icon-4.png) | Web Server | +| ![](assets/en/Admin/server-icon-5.png) | SOAP Server | +| ![](assets/en/Admin/server-icon-6.png) | Protected 4D client process (development process of a connected 4D) | +| ![](assets/en/Admin/server-icon-7.png) | Main 4D client process (main process of a connected 4D). Collaborative process, equivalent on the server of the process created on the client machine) | +| ![](assets/en/Admin/server-icon-8.png) | 4D client base process (process parallel to a 4D client process. Preemptive process responsible for controlling the corresponding main 4D client process) | +| ![](assets/en/Admin/server-icon-9.png) | Spare process (former or future "4D client database process") | +| ![](assets/en/Admin/server-icon-10.png) | SQL server worker process | +| ![](assets/en/Admin/server-icon-11.png) | HTTP server worker process | +| ![](assets/en/Admin/server-icon-12.png) | 4D client process (process running on the connected 4D) | +| ![](assets/en/Admin/server-icon-13.png) | Stored procedure (process launched by a connected 4D and running on the server) | +| ![](assets/en/Admin/server-icon-14.png) | Web method (launched by a 4DACTION for example) | +| ![](assets/en/Admin/server-icon-15.png) | Web method (preemptive) | +| ![](assets/en/Admin/server-icon-16.png) | SOAP method (launched by a Web Service) | +| ![](assets/en/Admin/server-icon-17.png) | SOAP method (preemptive) | +| ![](assets/en/Admin/server-icon-18.png) | Logger | +| ![](assets/en/Admin/server-icon-19.png) | TCP connection listener | +| ![](assets/en/Admin/server-icon-20.png) | TCP session manager | +| ![](assets/en/Admin/server-icon-21.png) | Other process | +| ![](assets/en/Admin/server-icon-22.png) | Worker process (cooperative) | +| ![](assets/en/Admin/server-icon-23.png) | 4D client process (preemptive) | +| ![](assets/en/Admin/server-icon-24.png) | Stored procedure (preemptive process) | +| ![](assets/en/Admin/server-icon-25.png) | Worker process (preemptive) | + +> Each main 4D client process and its "twinned" 4D client base process are grouped together when the **Display processes by groups** option is checked. + + +### Administration Buttons + +The page also has five control buttons that act on the selected process(es). Note that only user processes can be acted upon. + +![](assets/en/Admin/server-process-actions.png) + +- **Abort Process**: can be used to abort the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. + +> You can also abort the selected process(es) directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button, or by using the [`ABORT PROCESS BY ID`](https://doc.4d.com/4dv19/help/command/en/page1634.html) command. + +- **Pause Process**: can be used to pause the selected process(es). +- **Activate Process**: can be used to reactivate the selected process(es). The processes must have been paused previously (using the button above or by programming); otherwise, this button has no effect. +- **Debug Process**: can be used to open on the server machine one or more debugger windows for the selected process(es). When you click on this button, a warning dialog box appears so that you can confirm or cancel the operation. Note that the debugger window is only displayed when the 4D code is actually executed on the server machine (for example in a trigger or the execution of a method having the "Execute on Server" attribute). + +> You can also debug a process directly without displaying the confirmation dialog box by holding down the **Alt** key while clicking on this button. + +- **Watch users**: used to display, on the [Users page](#users-page), all the processes of the selected user(s). This button is active when at least one user process is selected. + + +## Maintenance Page + +The **Maintenance** page of the 4D Server Administration window provides information concerning the current operation of the application. It also provides access to basic maintenance functions: + +![](assets/en/Admin/server-maintenance.png) + + +### Last verification/compacting + +These areas indicate the date, time and status of the last [data verification](MSC/verify.md) and [compacting operation](MSC/compact.md) carried out on the database. + +#### Verify Records and Indexes + +This button can be used to launch the verification operation directly, without interrupting the server. Note that the server may be noticeably slowed down during the operation. + +All the records and all the indexes of the database are verified. If you want to be able to target the verification or have additional options available, you will need to use the [Maintenance and Security Center](MSC/overview.md) (MSC). + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +This area indicates the date, time and status of the last carried out on the database data. + +#### Compact Data... + +Thus button can be used to launch a data compacting operation directly. This operation requires stopping the server: when you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation: + +![](assets/en/Admin/server-shut.png) + +After the actual interruption of the application service, 4D Server carries out a standard compacting operation on the database data. If you want to have additional options available, you will need to use the [MSC](MSC/overview.md). + +Once the compacting is finished, 4D Server automatically restarts the application. The 4D users can then be reconnected. + +> If the request for compacting was carried out from a remote 4D remote machine, this machine is automatically reconnected by 4D Server. + +After verification, a report file is generated in XML format on the server in the [maintenance Logs](Project/architecture.md#logs) folder. The **View Report** button (named **Download Report** if the operation was carried out from a remote machine) lets you display the file in your browser. + + +### Uptime + +This area indicates the duration of the 4D Server application execution since the last time it was started (days, hours and minutes). + + +#### Restart server... + +This button can be used to immediately close and restart the project. When you click on this button, the 4D Server shutdown dialog box appears so that you can choose how to interrupt the operation. After validation, 4D Server automatically closes and reopens the project. The 4D users can then be reconnected. + +> If the request for restarting was carried out from a remote 4D machine, this machine is automatically reconnected by 4D Server. + +### Last backup + +This area indicates the date and time of the [last backup](MSC/backup.md) of the database and provides information about the next scheduled automatic backup (if any). Automatic backups are configured using the **Scheduler** page of the structure settings. + +- **Last backup**: date and time of last backup. +- **Next backup**: date and time of next scheduled backup. +- **Needed space**: estimated space needed for the backup. The actual size of the backup file may vary according to the settings (compression, etc.) and according to variations of the data file. +- **Available space**: space available on the backup volume. + + +The **Start backup** button can be used to backup the database immediately using the current backup parameters (files backed up, location of archives, options, etc.). You can view these parameters by clicking on the **Settings...** button. During a backup on the server, the client machines are "blocked" (but not disconnected) and it is not possible for any new clients to connect. + + +### Request and Debug logs + +This area indicates the server log files recording duration (when log files are activated) and allows you to control their activation. + +Refer to the [**Description of log files**](debugLogFiles.md) section for details on log files. + +#### Start/Stop Request and Debug Logs + +The **Start Request and Debug Logs** button starts log files. Since this may noticeably deteriorate server performance, it is to be reserved for the development phase of the application. + +> This button only logs operations that are executed on the server. + +When the logs have been activated, the button title changes to **Stop Request and Debug Logs**, so that you can stop recording requests at any time. Pay attention to the fact that restarting the log after stopping it "erases" the previous file. + +#### View Report + +The **View Report** button (named **Download report** if the operation was carried out from a remote desktop client) lets you open a system window displaying the request log file. + +#### Load logs configuration file + +This button allows you to load a special server [log configuration file](debugLogFiles.md#using-a-log-configuration-file) (`.json` file). Such a file can be provided by 4D technical services to monitor and study specific cases. + + +#### Pause logging + +This button suspends all currently logging operations started on the server. This feature can be useful to temporarily lighten the server tasks. + +When the logs have been paused, the button title changes to **Resume logging**, so that you can resume the logging operations. + +> You can pause and resume logging using the [SET DATABASE PARAMETER](https://doc.4d.com/4dv19/help/command/en/page642.html) command. + + +## Application Server Page + +The Application Server page groups together information about the desktop application published by 4D Server and can be used to manage this publication. + +![](assets/en/Admin/server-admin-application-page.png) + + +The upper part of the page provides information about the current status of the 4D Server application server. + +- **State**: Started or Stopped. +- **Starting time**: Date and time the application server was launched. This date corresponds to the opening of the project by 4D Server. +- **Uptime**: Time elapsed since last opening of the project by the server. + +### Accept/Reject New Connections + +This button toggles and can be used to manage the access of new desktop client machines to the application server. + +By default, when the project is published: +- The button is titled "Reject new connections." +- New desktop clients can connect freely (within the limit of the connections permitted by the license). +- The project name is published in the remote connection dialog box (if the "At Startup Publish Database Name in the Connection Dialog" option is checked in the Preferences). + +If you click on the **Reject new connections** button: +- The button title changes to "Accept new connections." +- No new desktop client can then connect. Clients attempting to connect will receive the following message: + +![](assets/en/Admin/server-error.png) + +- The project name no longer appears in the remote connection dialog box. +- Desktop clients that are already connected are not disconnected and can continue to work normally. + +> You can perform the same action with the [`REJECT NEW REMOTE CONNECTIONS`](https://doc.4d.com/4dv19/help/command/en/page1635.html) command. + +- If you click on the **Accept new connections button**, the application server returns to its default state. + +This feature permits, for example, an administrator to carry out various maintenance operations (verification, compacting, etc.) just after having started the server. If the administrator uses a remote connection, they can be certain to be the only one modifying the data. It is also possible to use this function in preparation of a maintenance operation which requires that there be no desktop client machine connected. + +### Information + +#### Configuration + +This area provides information about the 4D project published by the server: name and location of data and structure files and name of database log file. You can click on the structure or data file name in order to view its complete pathname. + +The **Mode** field indicates the current execution mode of the application: compiled or interpreted. + +The lower part of the area indicates the server configuration parameters (launched as service, port and IP address) and the enabling of TLS for client-server connections (does not concern SQL nor HTTP connections). + +#### Memory + +This area indicates the **Total cache memory** (parameter set in the settings) and the **Used cache memory** (dynamic allocation by 4D Server according to its needs). + + +#### Application Server Connections + +- **Maximum**: maximum number of simultaneous client connections allowed for the application server. This value depends on the license installed on the server machine. +- **Used**: actual number of connections currently being used. + + +## SQL Server Page + +The SQL Server page groups together information about the integrated SQL server of 4D Server. It also includes a button that can be used to control the activation of the server. + +![](assets/en/Admin/server-admin-sql-page.png) + + +The upper part of the page provides information about the current status of the SQL server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the SQL server was last launched. +- **Uptime**: Time elapsed since last startup of the SQL server. + +### Start / Stop SQL Server + +This button toggles and can be used to control the activation of the 4D Server SQL server. + +- When the SQL server state is "Started," the button is titled **Stop SQL Server**. If you click on this button, the 4D Server SQL server is immediately stopped; it no longer replies to any external SQL requests received on the designated TCP port. +- When the SQL server state is "Stopped," the button is titled **Start SQL Server**. If you click on this button, the 4D Server SQL server is immediately started; it replies to any external SQL queries received on the designated TCP port. Note that you will need a suitable license to be able to use the 4D SQL server. + +> The SQL server can also be launched automatically on application startup (option in the Settings) or by programming. + +### Information + +#### Configuration + +This area provides information about the SQL server configuration parameters: automatic launching on startup, listening IP address, TCP port (19812 by default) and enabling of SSL for SQL connections (does not concern 4D nor HTTP connections). + +These parameters can be modified via the 4D Settings. + +#### Connections + +Number of SQL connections currently open on 4D Server. + +#### Maximum Connections + +Maximum number of simultaneous SQL connections allowed. This value depends on the license installed on the server machine. + +## HTTP Server Page + +The HTTP Server page groups together information about the operation of the Web server and SOAP server of 4D Server. The Web server lets you publish Web content such as HTML pages or pictures for Web browsers, and to handle REST requests. The SOAP server manages the publication of Web Services. These servers rely on the internal HTTP server of 4D Server. + +![](assets/en/Admin/server-admin-web-page.png) + + +The upper part of the page provides information about the current status of the HTTP server of 4D Server. + +- **State**: Started or Stopped +- **Starting time**: Date and time the HTTP server was last launched. +- **Uptime**: Time elapsed since last startup of the HTTP server. +- **Total HTTP hits**: Number of (low level) HTTP hits received by the HTTP server since it was started. + + +### Start/Stop HTTP Server + +This button toggles and can be used to control the activation of the 4D Server HTTP server. + +- When the HTTP server state is "Started," the button is titled **Stop HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately stopped; the Web server, REST server, and SOAP server no longer accept any requests. +- When the HTTP server state is "Stopped," the button is titled **Start HTTP Server**. If you click on this button, the 4D Server HTTP server is immediately started; Web, REST, and SOAP requests are accepted. + +> You must have a suitable license in order to be able to start the HTTP server. +> +> The HTTP server can also be launched automatically on application startup (Settings) or by programming. + +### Web Information + +This area provides specific information about the Web server of 4D Server. + +- **Web requests**: Accepted or Rejected. This information indicates whether the Web server is activated. Since the Web server is directly linked to the HTTP server, Web requests are accepted when the HTTP server is started and rejected when it is stopped. +- **Maximum connections**: Maximum number of Web connections allowed. This value depends on the license installed on the server machine. + +### SOAP Information + +This area provides specific information about the SOAP server of 4D Server and includes a control button. + +- **SOAP requests**: Accepted or Rejected. This information indicates whether the SOAP server is activated. In order for SOAP requests to be accepted, the HTTP server must be started and the SOAP server must explicitly accept the requests (see the Accept/Reject button). +- **Maximum connections**: Maximum number of SOAP connections allowed. This value depends on the license installed on the server machine. +- **Accept/Reject SOAP requests** button: This button toggles and can be used to control the activation of the 4D Server SOAP server. This button modifies the value of the **Allow Web Services Requests** option on the "Web Services" page of the Settings (and vice versa). You can also use the [`SOAP REJECT NEW REQUESTS`](https://doc.4d.com/4dv19/help/command/en/page1636.html) command to refuse new SOAP requests, however this does not modify the value of the **Allow Web Services Requests** option. + +If you click on the **Accept SOAP requests** button and the HTTP server is stopped, 4D automatically starts it. + +### HTTP Server Configuration + +This area provides information about the configuration parameters and operation of the HTTP server: + +- **Auto-launched at startup**: parameter set via the Settings. +- **HTTP Server processes (used/total)**: number of HTTP processes created on the server (current number of processes / total of all processes created). +- **Cache memory**: size of HTTP server cache memory, when it is activated (size actually used by cache / maximum size theoretically allocated to the cache in the Settings). You can click on the **Clear Cache** button to empty the current cache. +- **Listening to IP**, **HTTP Port** (80 by default), **TLS enabled** for HTTP connections (does not concern 4D nor SQL connections) and **HTTPS Port** used: current [configuration parameters](WebServer/webServerConfig.md) of the HTTP server, specified through the Settings or by programming. +- **Log file information**: name, format and date of the next automatic log backup of the HTTP server (logweb.txt file). + + +## Real Time Monitor Page + +The Real Time Monitor page monitors the progress of "long" operations performed by the application in real time. These operations are, for example, sequential queries, execution of formulas, etc. + +![](assets/en/Admin/server-admin-monitor-page.png) +> This page is available in the administration window of the server machine and also from a remote 4D machine. In the case of a remote machine, this page displays data from operations performed on the server machine. + +A line is added for each long operation performed on the data. This line automatically disappears when the operation is complete (you can check the **Display operations at least 5 seconds** option to keep quick operations on screen for 5 seconds, see below). + +The following information is provided for each line: + +- **Start Time**: starting time of operation in the format: "dd/mm/yyyy - hh:mm:ss" +- **Duration** (ms): duration in milliseconds of operation in progress +- **Information**: title of operation. +- **Details**: this area displays detailed information which will vary according to the type of operation selected. More specifically: + + **Created on**: indidates whether the operation results from a client action (Created on client) or if it was started explicitly on the server by means of a stored procedure or the "Execute on server" option (Created on server). + + **Operation Details**: Operation type and (for query operations) query plan. + + **Sub-operations** (if any): Dependent operations of the selected operation (e.g. deleting related records before a parent record). + + **Process Details**: Additional information concerning the table, field, process or client, depending on the type of operation + +> Real-time monitoring page uses the [`GET ACTIVITY SNAPSHOT`](https://doc.4d.com/4dv19/help/command/en/page1277.html) command internally. More information can be found in this command description. + +The page is active and updated permanently as soon as it is displayed. It should be noted that its operation can significantly slow the execution of the application. It is possible to suspend the updating of this page in one of the following ways: + +- clicking on the **Pause** button, +- clicking in the list, +- pressing the space bar. + +When you pause the page, a "PAUSED" message appears and the button label changes to **Resume**. You can resume monitoring of the operations by performing the same action as for pausing. + +#### Advanced mode + +The RTM page can display additional information, if necessary, for each listed operation. + +To access the advanced mode for an operation, press **Shift** and select the desired operation. All available information is then displayed in the "Process Details" area without any filtering (as returned by the `GET ACTIVITY SNAPSHOT` command). Available information depends on the operation selected. + +Here is an example of information displayed in standard mode: + +![](assets/en/Admin/server-admin-monitor-adv1.png) + + +In advanced mode (**Shift+Click** on the operation), additional information is displayed: + +![](assets/en/Admin/server-admin-monitor-adv2.png) + +#### Snapshot button + +The **Snapshot** button allows you to copy to the clipboard all the operations displayed in the RTM panel, as well as their related details (process and sub-operation info): + +![](assets/en/Admin/server-admin-monitor-snapshot.png) + + +#### Display operations at least 5 seconds + +If you check the **Display operations at least 5 seconds** option, any listed operation will be displayed on the page for at least five seconds, even after its execution is finished. Retained operations appear dimmed in the operation list. This feature is useful for getting information about operations that execute very quickly. diff --git a/website/translated_docs/pt/Admin/tls.md b/website/translated_docs/pt/Admin/tls.md new file mode 100644 index 00000000000000..0d725c7161f4c7 --- /dev/null +++ b/website/translated_docs/pt/Admin/tls.md @@ -0,0 +1,106 @@ +--- +id: tls +title: TLS Protocol (HTTPS) +--- + +All 4D servers can communicate in secured mode through the TLS (Transport Layer Security) protocol: + +- the web server +- the application server (client-server desktop applications) +- the SQL server + +## Visão Geral + +The TLS protocol (successor of SSL) has been designed to secure data exchanges between two applications —mainly between a web server and a browser. This protocol is widely used and is compatible with most web browsers. + +At the network level, the security protocol is inserted between the TCP/IP layer (low level) and the HTTP high level protocol. It has been designed mainly to work with HTTP. + +Network configuration using TSL: + +![](assets/en/WebServer/tls1.png) + +The TLS protocol is designed to authenticate the sender and receiver and to guarantee the confidentiality and integrity of the exchanged information: + +* **Authentication**: The sender and receiver identities are confirmed. +* **Confidentiality**: The sent data is encrypted so that no third person can understand the message. +* **Integrity**: The received data has not been changed, by accident or malevolently. + +TLS uses a public key encryption technique based on a pair of asymmetric keys for encryption and decryption: a public key and a private key. The private key is used to encrypt data. The sender (the website) does not give it to anyone. The public key is used to decrypt the information and is sent to the receivers (web browsers) through a certificate. When using TLS with the Internet, the certificate is delivered through a certification authority, such as Verisign®. The website pays the Certificate Authority to deliver a certificate which guaranties the server authentication and contains the public key allowing to exchange data in a secured mode. +> For more information on the encryption method and the public and private key issues, refer to the `ENCRYPT BLOB` command description. + +## Minimum version + +By default, the minimum version of the secured protocol accepted by the server is TLS 1.2. You can modify this value by using the `Min TLS version` selector with the `SET DATABASE PARAMETER command`. + +You can control the level of security of your web server by defining the [minimum TLS version](WebServer/webServerConfig.md#minimum-tls-version) accepted for connections. + +## How to get a certificate? + +A server working in secured mode means that you need a digital certificate from a certification authority. This certificate contains various information such as the site ID as well as the public key used to communicate with the server. This certificate is transmitted to the clients (e.g. Web browsers) connecting to this server. Once the certificate has been identified and accepted, the communication is made in secured mode. +> Web browsers authorize only the certificates issued by a certification authority referenced in their properties. + +![](assets/en/WebServer/tls2.png) + +The certification authority is chosen according to several criteria. If the certification authority is well known, the certificate will be authorized by many browsers, however the price to pay will be expensive. + +To get a digital certificate: + +1. Generate a private key using the `GENERATE ENCRYPTION KEYPAIR` command. +> **Warning**: For security reasons, the private key should always be kept secret. Actually, it should always remain with the server machine. For the Web server, the Key.pem file must be placed in the Project folder. + +2. Use the `GENERATE CERTIFICATE REQUEST` command to issue a certificate request. + +3. Send the certificate request to the chosen certificate authority.

          To fill in a certificate request, you might need to contact the certification authority. The certification authority checks that the information transmitted are correct. The certificate request is generated in a BLOB using the PKCS format encoded in base64 (PEM format). This principle allows you to copy and paste the keys as text and to send them via E-mail without modifying the key content. For example, you can save the BLOB containing the certificate request in a text document (using the `BLOB TO DOCUMENT` command), then open and copy and paste its content in a mail or a Web form to be sent to the certification authority. + +4. Once you get your certificate, create a text file named “cert.pem†and paste the contents of the certificate into it.

          You can receive a certificate in different ways (usually by email or HTML form). 4D accepts all platform-related text formats for certificates (OS X, PC, Linux, etc.). However, the certificate must be in PEM format, *i.e.*, PKCS encoded in base64. +> CR line-ending characters are not supported on their own; you must use CRLF or LF. + +5. Place the “cert.pem†file in the [appropriate location](#installation-and-activation). + +The 4D server can now work in a secured mode. A certificate is valid between 3 months to a year. + +## Instalação e ativação + +### Installing `key.pem` and `cert.pem` files + +To be able to use the TLS protocol with the server, you must install the **key.pem** (document containing the private encryption key) and **cert.pem** (document containing the certificate) at the appropriate location(s). Different locations are required depending on the server on which you want to use TLS. +> Default *key.pem* and *cert.pem* files are provided with 4D. For a higher level of security, we strongly recommend that you replace these files with your own certificates. + +#### With the web server + +To be used by the 4D web server, the **key.pem** and **cert.pem** files must be placed: + +- with 4D in local mode or 4D Server, next to the [project folder](Project/architecture.md#project-folder) +- with 4D in remote mode, in the client database folder on the remote machine (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +You must copy these files manually on the remote machine. + +#### With the application server (client-server desktop applications) + +To be used by the 4D application server, the **key.pem** and **cert.pem** files must be placed: + +- in the [**Resources** folder](Project/architecture.md#resources) of the 4D Server application +- and in the **Resources** folder on each remote 4D application (for more information about the location of this folder, see the [`Get 4D folder`](https://doc.4d.com/4dv19/help/command/en/page485.html) command). + +#### With the SQL server + +To be used by the 4D SQL server, the **key.pem** and **cert.pem** files must be placed next to the [project folder](Project/architecture.md#project-folder). + + +### Enabling TLS + +The installation of **key.pem** and **cert.pem** files makes it possible to use TLS with the 4D server. However, in order for TLS connections to be accepted by the server, you must enable them: + +- With the 4D web server, you must [enable HTTPS](WebServer/webServerConfig.md#enable-https). You can set the [HSTS option](WebServer/webServerConfig.md#enable-hsts) to redirect browsers trying to connect in http mode. +- With the application server, you must select the **Encrypt Client-Server Communications** option in the "Client-server/Network options" page of the Settings dialog box. +- With the SQL server, you must select the **Enable TLS** option in the "SQL" page of the Settings dialog box. + +> The 4D web server also supports [HSTS option](WebServer/webServerConfig.md#enable-hsts) to declare that browsers should only interact with it via secure HTTPS connections. + +## Perfect Forward Secrecy (PFS) + +[PFS](https://en.wikipedia.org/wiki/Forward_secrecy) adds an additional layer of security to your communications. Rather than using pre-established exchange keys, PFS creates session keys cooperatively between the communicating parties using Diffie-Hellman (DH) algorithms. The joint manner in which the keys are constructed creates a "shared secret" which impedes outside parties from being able to compromise them. + +When TLS is enabled on the server, PFS is automatically enabled. If the *dhparams.pem* file (document containing the server's DH private key) does not already exist, 4D will automatically generate it with a key size of 2048. The initial generation of this file could take several minutes. The file is placed with the [*key.pem* and *cert.pem* files](#key-pem-and-cert-pem-files). + +If you use a [custom cipher list](WebServer/webServerConfig.md##cipher-list) and want to enable PFS, you must verify that it contains entries with DH or ECDH (Elliptic-curve Diffie–Hellman) algorithms. diff --git a/website/translated_docs/pt/Admin/webAdmin.md b/website/translated_docs/pt/Admin/webAdmin.md new file mode 100644 index 00000000000000..d318513b455f9c --- /dev/null +++ b/website/translated_docs/pt/Admin/webAdmin.md @@ -0,0 +1,156 @@ +--- +id: webAdmin +title: Web Administration +--- + + +An embedded web server component, named `WebAdmin`, is used by 4D and 4D Server to provide a secured web access to specific management features such as the [Data Explorer](dataExplorer.md). You can connect locally or remotely to this web server from a browser or any web application and access the associated 4D application. + +The WebAdmin handles the authentication of users with "WebAdmin" privileges, so that they can open administration sessions and access dedicated interfaces. + +This feature can be used in 4D applications running headless as well as 4D applications running with interfaces. + + +## Starting the WebAdmin web server + +By default, the `WebAdmin` web server is not launched. You need to configure the launch at startup, or (in versions with interface) launch it manually using a menu item. + + +### Launch at startup + +You can configure the `WebAdmin` web server to be launched at 4D or 4D Server application startup (before any project is loaded). + +- If you use a 4D application with interface, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +Check the **Web server administration automatic startup** option in the settings dialog box: + +![alt-text](assets/en/Admin/waSettings.png) + +- Whether you use 4D application which is headless or not, you can enable the automatic startup mode using the following *Command Line Interface* argument: + + +``` +open ~/Desktop/4D.app --webadmin-auto-start true +``` + +> If the TCP port used by the `WebAdmin` web server ([HTTPS](#https-port) or [HTTP](#http-port), depending on the settings) is not free at startup, 4D will try successively the 20 following ports, and use the first one that is available. If no port is available, the web server is not launched and an error is displayed or (headless application) logged in the console. + + +### Start and stop + +If you use a 4D application with interface, you can start or stop the `WebAdmin` web server for your project at any moment: + +Select the **File > Web Administration > Start Server** menu item. + +![alt-text](assets/en/Admin/waMenu2.png) + +The menu item becomes **Stop Server** when the server is launched; select **Stop Server** to stop the `WebAdmin` web server. + + + +## WebAdmin Settings + +Configuring the `WebAdmin` component is mandatory in particular to define the [**access key**](#access-key). By default when the access key is not set, access via a URL is not allowed. + +You can configure the `WebAdmin` component using the [Web Administration settings dialog box](#settings-dialog-box) (see below). + +> If you use a headless 4D application, you can use [*Command Line Interface* arguments](#webadmin-headless-configuration) to define basic settings. You will have to customize the settings file to define advanced parameters. + + +### Settings dialog box + +To open the Web Administration settings dialog box, select the **File > Web Administration > Settings...** menu item. + +![alt-text](assets/en/Admin/waMenu1.png) + +The following dialog box is displayed: + +![alt-text](assets/en/Admin/waSettings2.png) + +#### Web server administration automatic startup + +Check this option if you want the `WebAdmin` web server to be automatically launched when the 4D or 4D Server application starts ([see above](#launching-at-startup)). By default, this option is not checked. + +#### Accept HTTP connections on localhost + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTP on the same machine as the 4D application. By default, this option is checked. + +**Notes:** +- Connections with HTTP other than localhost are never accepted. +- Even if this option is checked, when [Accept HTTPS](#accept-https) is checked and the TLS configuration is valid, localhost connections use HTTPS. + + +#### HTTP Port + +Port number to use for connections through HTTP to the `WebAdmin` web server when the **Accept HTTP connections on localhost** option is checked. Default value is 7080. + + +#### Accept HTTPS + +When this option is checked, you will be able to connect to the `WebAdmin` web server through HTTPS. By default, this option is checked. + +#### HTTPS Port + +Port number to use for connections through HTTPS to the `WebAdmin` web server when the **Accept HTTPS** option is checked. Default value is 7443. + + +#### Certificate folder path + +Path of the folder where the TLS certificate files are located. By default, the certificate folder path is empty and 4D or 4D Server uses the certificate files embedded in the 4D application (custom certificates must be stored next to the project folder). + +#### Debug log mode + +Status or format of the HTTP request log file (HTTPDebugLog_*nn*.txt, stored in the "Logs" folder of the application -- *nn* is the file number). The following options are available: + +- **Disable** (default) +- **With all body parts** - enabled with body parts in response and request +- **Without body parts** - enabled without body parts (body size is provided) +- **With request body** - enabled with body part in request only +- **With response body** - enabled with body part in response only + +#### Access Key + +Defining an access key is mandatory to unlock access to the `WebAdmin` web server through a URL (access via a 4D menu command does not require an access key). When no access key is defined, no web client is allowed to connect through a URL to a web administration interface like the [Data Explorer page](dataExplorer.md). An error page is returned in case of connection request: + +![alt-text](assets/en/Admin/accessKey.png) + +An access key is similar to a password but not associated to a login. + +- To define a new access key: click the **Define** button, enter the access key string in the dialog box and click **OK**. The button label becomes **Modify**. +- To modify the access key: click the **Modify** button, enter the new access key string in the dialog box and click **OK**. +- To delete the access key: click the **Modify** button, let the access key area empty and click **OK**. + + +## WebAdmin Headless Configuration + +All [WebAdmin settings](#webadmin-settings) are stored in the `WebAdmin.4DSettings` file. There is one default `WebAdmin.4DSettings` file per 4D and 4D Server application, so that it is possible to deploy multiple applications on the same host machine. + +When running a 4D or 4D Server application headless, you can set and use the default `WebAdmin.4DSettings` file, or designate a custom `.4DSettings` file. + +To set the file contents, you can use the [WebAdmin settings dialog](#settings-dialog-box) of the 4D application with interface and run it headless afterwards. The default `WebAdmin.4DSettings` file is then used. + +Or, you can set a custom `.4DSettings` file (xml format) and use it instead of the default file. Several dedicated arguments are available in the [Command line interface](cli.md) to support this feature. + +> The access key is not stored in clear in the `.4DSettings` file. + +Example: + +``` +"%HOMEPATH%\Desktop\4D Server.exe" MyApp.4DLink --webadmin-access-key + "my Fabulous AccessKey" --webadmin-auto-start true + --webadmin-store-settings + +``` + + +## Authentication and Session + +- When a web management page is accessed by entering a URL and without prior identification, an authentication is required. The user must enter the [access key](#access-key) in an authentication dialog box. If the access key was not defined in the `WebAdmin` settings, no access via URL is possible. + +- When a web management page is accessed directly from a 4D or 4D Server menu item (such as **Records > Data Explorer** or **Window > Data Explorer** (4D Server)), access is granted without authentication, the user is automatically authenticated. + +Once the access is granted, a web [session](WebServer/sessions.md) with the "WebAdmin" privilege is created on the 4D application. As long as the current session has "WebAdmin" privilege, the `WebAdmin` component delivers requested pages. + + diff --git a/website/translated_docs/pt/Backup/backup.md b/website/translated_docs/pt/Backup/backup.md index e19eed131c5eaf..6debf98b223d8e 100644 --- a/website/translated_docs/pt/Backup/backup.md +++ b/website/translated_docs/pt/Backup/backup.md @@ -3,93 +3,93 @@ id: backup title: Backup --- +Uma cópia de segurança pode ser iniciada de três maneiras: -## Starting a backup +- 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 +- Por programação, utilizando o comando `BACKUP`. -A backup can be started in three ways: +> 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. -- 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. +## Cópia de segurança manual -> 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. +1. Selecione o comando **Backup...** no menu 4D **Arquivo**. + Aparece a janela de cópia de segurança: ![](assets/en/Backup/backup01.png) Pode ver a localização da pasta da cópia de segurança mediante o menu emergente situado junto à área "Destino da cópia de segurança". Esta localização é definida na página **Cópia de segurança/configuração** das Propriedades do banco de dados. -### Manual backup +- 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). -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. +O botão **Propriedades de Banco de Dados...** faz com que seja exibida a página Backup/Configuration das Configurações de Estrutura. -- You can also open the [Maintenance and Security Center](MSC/overview.md) of 4D and display the [Backup page](MSC/backup.md). + 2. Clique em **Backup/Cópia de segurança** para iniciar a cópia de segurança utilizando os parâmetros atuais. -The **Database properties...** button causes the Backup/Configuration page of the Database Settings to be displayed. -2. Click **Backup** to start the backup using current parameters. +## Backup automático periódico -### Scheduled automatic backup +As cópias de segurança programadas são iniciadas automaticamente. São configurados na página **Backup/Scheduler** na página **Configurações**. -Scheduled backups are started automatically. They are configured in the **Backup/Scheduler** page of the **Database Settings**. +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). -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). -### BACKUP command +## Comando BACKUP -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). +Quando o comando `BACKUP` da linguagem 4D for executado desde um método, a cópia de segurança se inicia utilizando os parâmetros atuais definidos nas propriedades. 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*). -## Managing the backup processing -Once a backup is started, 4D displays a dialog box with a thermometer indicating the progress of the backup: +## 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. + +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 **Stop** button lets the user interrupt the backup at any time (refer to [Handling backup issues](backup.md#handling-backup-issues) below). +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**. -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**. +### Acesso da aplicação durante o backup -### Accessing the database during backup +Durante a cópia de segurança, acesso à aplicação é 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. -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. +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 à aplicação são as seguintes: -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: +- Com a versão 4D monousuário, a aplicação é trancada tanto para leitura quanto escrita, todos os processos são congelados. Nenhuma ação é realizada. +- Com 4D Server, a aplicação está bloqueada 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 a aplicação for salva, a janela desaparece a ação é realizada. 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 nos 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). -- 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). +### Gestão dos problemas das cópias de segurança -### Handling backup issues +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. -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. +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 **Backup journal.txt**. -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. +- **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 anexo, 4D realiza uma cópia de segurança parcial (cópia de segurança dos arquivos da aplicação e dos arquivos adjuntos acessíveis e devolve um erro. +- **Copia de segurança impossível** (disco cheio ou protegido contra escrita, disco ausente, falha no disco, transação incompleta, aplicação não lançada no momento da cópia de segurança automática programada, etc.): se for um primeiro erro, 4D fará uma segunda tentativa de realizar a cópia de segurança. A espera entre duas tentativas é definida na página **Backup/Backup e Restauração** das Propriedades. 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`. -- **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. +## Histórico de cópias de segurança (Backup Journal) -## Backup Journal +Para facilitar o seguimento e a verificação das cópias de segurança, o módulo de cópia de segurança escreve um resumo de cada operação realizada em um arquivo especial, que é 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. -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. +O histórico de cópia de segurança é chamado "Backup Journal[001].txt" e está localizado na pasta "Logs" do projeto. O histórico de cópias de segurança pode ser aberto com o editor de texto. -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. +#### Gerenciamento do tamanho de histórico de cópias de segurança. -#### Management of backup journal size +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 registrada**: para isso, basta com modificar o valor da chave `VerboseMode` no arquivo *Backup.4DSettings* do projeto. 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** da aplicação. 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 d8aead277fe24d..55bd6eeda7b913 100644 --- a/website/translated_docs/pt/Backup/log.md +++ b/website/translated_docs/pt/Backup/log.md @@ -1,77 +1,81 @@ --- 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. +Uma aplicação de uso continuo sempre registra mudanças, adições ou eliminações. 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. -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. Qualquer mudança feita para os dados da aplicação são armazenados temporariamente na cache antes de serem escritas no disco rigido. 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 na aplicação 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 a aplicação 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 da aplicação. 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, 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 arquivo de dados (a instrução é executada normalmente) e a segunda é no arquivo de histórico ( a descrição da operação é registrada). O arquivo de historial se cria de forma independente, sem perturbar nem ralentar o trabalho do usuário. Uma aplicação só pode trabalhar com um arquivo de historial por vez. 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. +- Conservar os arquivos de historial correspondentes às copias de segurança para poder analisar o reparar uma aplicação em um momento posterior. A integração de um arquivo de historial só pode ser feita na aplicação à que 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, toda aplicação criada 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 sua aplicação 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 uma aplicação 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 projeto aplicação. Se o disco rígido da apllicação for perdido pode 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. -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, os dados devem 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 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, 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. Se 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. \ No newline at end of file diff --git a/website/translated_docs/pt/Backup/overview.md b/website/translated_docs/pt/Backup/overview.md index ddfd2050b102c8..b1a9951f6935a1 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 módulo completo backup e restauração da aplicação. -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 da aplicação atualmente em uso sem ter que sair dela. 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. -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. +Aplicações podem ser restauradas automaticamente quando uma aplicação danificada for aberta. -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 uma aplicação em uso, qualquer operação faltando no arquivo de dados são reintegrados automaticamente na próxima vez que a aplicação for aberta. 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: +> Pode implementar também soluções alternativas para replicar e sincronizar dados para manter versões idênticas de aplicações por razões de backup. 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 + + +> For a general overview of 4D's security features, see the [4D Security guide](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..e1c690cc8faa88 100644 --- a/website/translated_docs/pt/Backup/restore.md +++ b/website/translated_docs/pt/Backup/restore.md @@ -3,43 +3,51 @@ id: restore title: Restore --- -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 allows you to restore entire sets of application data in case of any incidents, regardless of the cause of the incident. Two primary categories of incidents can occur: -- 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. +- The unexpected stoppage of an application 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 application can require different operations: + - If the cache was empty, the application opens normally. Any changes made in the application 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. -> 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. +- The loss of application file(s). This incident can occur because of defective sectors on the disk containing the application, a virus, manipulation error, etc. The last backup must be restored and then the current log file must be integrated. To find out if an application was damaged following an incident, simply relaunch the application 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 application in the exact state it was in before the incident. + +> 4D can launch procedures automatically to recover applications following incidents. These mechanisms are managed using two options available on the **Backup/Backup & Restore** page of the 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 data file using the "rollback" function in the log file. This function is available on the [Rollback](MSC/rollback.md) page of the MSC. + ## Manually restoring a backup (standard dialog) 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. +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 application can be restored. -To restore a database manually via a standard dialog box: +To restore an application manually via a standard dialog box: -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. +1. Choose **Restore...** in the 4D application **File** menu. It is not mandatory that an application project 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: ![](assets/en/Backup/backup07.png) You can also click on the **[...]** button to specify a different location. +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 application. If the restore and integration were carried out correctly, 4D displays a dialog box indicating that the operation was successful. +5. 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. + +> Any content related to the data file (files and `Settings` folder) are automatically restored in a `Data` subfolder within the destination folder. -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. ## Manually restoring a backup (MSC) -You can manually restore an archive of the current database using the [Restore page](MSC/restore.md) of the Maintenance and Security Center (MSC). +You can manually restore an archive of the current application using the [Restore page](MSC/restore.md) of the Maintenance and Security Center (MSC). + ## Manually integrating the log -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. +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 application when 4D notices that the log file contains more operations than have been carried out in the data file. ![](assets/en/Backup/backup08.png) diff --git a/website/translated_docs/pt/Backup/settings.md b/website/translated_docs/pt/Backup/settings.md index b8b5d2e5a851bb..6e96febf0bef62 100644 --- a/website/translated_docs/pt/Backup/settings.md +++ b/website/translated_docs/pt/Backup/settings.md @@ -3,7 +3,7 @@ id: settings title: Backup Settings --- -Backup settings are defined through three pages in the Database Settings dialog box. You can set: +Backup settings are defined through three pages in the Settings dialog box. You can set: - the scheduler for automatic backups - the files to include in every backup @@ -13,47 +13,52 @@ Backup settings are defined through three pages in the Database Settings dialog ## Scheduler -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. +You can automate the backup of applications 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. -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)). +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 Settings (refer to [Handling backup issues](backup.md#handling-backup-issues)). -The scheduler backup settings are defined on the **Backup/Scheduler** page of the Database Settings: +The scheduler backup settings are defined on the **Backup/Scheduler** page of the Structure Settings: ![](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: +The options found on this tab let you set and configure scheduled automatic backups of the application. 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: - **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 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: +- **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. + - **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 -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. +The Backup/Configuration page of the Structure Settings lets you set the backup files and their location, as well as that of the log file. These parameters are specific to each application opened by 4D or 4D Server. ![](assets/en/Backup/backup03.png) > **4D Server:** These parameters can only be set from the 4D Server machine. ### Content - 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. +- **Data**: Application data file. When this option is checked, the following elements are automatically backed up at the same time as the data: + - the current log file of the application (if it exists), + - the full `Settings` folder located [next to the data file](Project/architecture.md#settings-folder) (if it exists), i.e. the *user settings for data*. +- **Structure**: Application project folders and files. In cases where projects are compiled, this option allows you to backup the .4dz file. When this option is checked, the full `Settings` folder located [at the same level as the Project folder](Project/architecture.md#settings-folder-1), i.e. the *user settings*, is automatically backed up. - **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. +- **Attachments**: This area allows you to specify a set of files and/or folders to be backed up at the same time as the application. 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 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 application files. - **Add file...**: Displays a dialog box that allows you to select a file to add to the backup. + ### Backup File Destination Folder This area lets you view and change the location where backup files as well as log backup files (where applicable) will be stored. @@ -64,11 +69,12 @@ To modify the location where these files are stored, click the **...** button. A ### Log management -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. +The **Use Log** option, when checked, indicates that the application uses a log file. Its pathname is specified below the option. When this option is checked, it is not possible to open the application without a log file. -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. +By default, any project created with 4D uses a log file (option **Use Log File** checked in the **General Page** of the **Preferences**). O arquivo de histórico é chamado *data.journal* e está na pasta Data. + +> Activating a new log file requires the data of the application 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 application. -> 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 @@ -79,49 +85,45 @@ Modifying backup and restore options is optional. Their default values correspon ### General settings - **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. +> This parameter concerns both application and log file backups. -- **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. +- **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 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 applications 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 application and log file backups. - **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. - **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 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. -> 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 considers a backup as failed if the application was not launched at the time when the scheduled automatic backup was set to be carried out. ### Archive - These options apply to main backup files and to log backup files. -- **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**). +- **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 MyApplication[xxxx-yyyy].4BK, where xxxx is the backup number and yyyy is the segment number. For example, the three segments of the MyApplication backup are called MyApplication[0006-0001].4BK, MyApplication[0006-0002].4BK and MyApplication[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**). - **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. + - **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. + +- **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 -- **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. +- **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 application, if an anomaly is detected (corrupted file, for example) during application launch. No intervention is required on the part of the user; however, the operation is logged in the backup journal. + +- **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 application. + - When opening an application, 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 an application, 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. -- **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. +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. -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 +> In the case of an automatic restore, only the following elements are restored: - .4DD file - .4DIndx file - .4DSyncData file - .4DSyncHeader file - External Data folder +> +> If you wish to get the attached files or the project files, you must perform a [manual restore](restore.md#manually-restoring-a-backup-standard-dialog). diff --git a/website/translated_docs/pt/Concepts/about.md b/website/translated_docs/pt/Concepts/about.md index 81a47c85f9c787..c68e64794a69c9 100644 --- a/website/translated_docs/pt/Concepts/about.md +++ b/website/translated_docs/pt/Concepts/about.md @@ -3,21 +3,22 @@ id: about title: About the 4D Language --- -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: +The 4D built-in language, consisting of more than 1300 commands, makes 4D a powerful development tool for web, mobile, or desktop applications. You can use the 4D language for many different tasks—from performing simple calculations to creating complex custom user interfaces. For example, you can: - 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, +- Send emails, - Manage documents and web pages, -- Import and export data between 4D databases and other applications, +- Import and export data between 4D applications and other applications, - Incorporate procedures written in other languages into the 4D programming language. -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. +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 applications. Experienced developers can use this powerful programming language to add sophisticated features and capabilities to their applications, including file transfer, communications, monitoring. Developers with programming experience in other languages can add their own commands to the 4D language. + ## 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. +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 application and data. 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. @@ -31,16 +32,16 @@ Then why do we need a 4D language? Here are some of its uses: - 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. +- Create applications: You can create easy-to-use, customized applications that run stand-alone. - Add functionality to the built-in 4D Web server: build and update dynamic web pages filled with your data. -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. +The language lets you take complete control over the design and operation of your application. 4D provides powerful “generic†editors, but the language lets you customize your application to whatever degree you require. ## Taking Control of Your Data -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. +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 application. -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. +The commands in the 4D language provide access to the standard record management editors. For example, when you use the `QUERY` 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, `QUERY([People];[People]Last Name="Smith")` will find all the people named Smith in your database. 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. @@ -54,8 +55,8 @@ If you are familiar with traditional computer languages, this section may be of 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. -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. +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 project. You may start by adding a method to a form, then later add a few more methods. As your application 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. -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. +Traditional languages force you to define and pre-declare interface 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. 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 diff --git a/website/translated_docs/pt/Concepts/arrays.md b/website/translated_docs/pt/Concepts/arrays.md index a88ee3e740013e..90bc5600270cc9 100644 --- a/website/translated_docs/pt/Concepts/arrays.md +++ b/website/translated_docs/pt/Concepts/arrays.md @@ -7,6 +7,7 @@ An **array** is an ordered series of **variables** of the same type. Each variab > 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 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. @@ -18,13 +19,11 @@ The following line of code creates (declares) an Integer array of 10 elements: ``` Then, the following code resizes that same array to 20 elements: - ```4d ARRAY INTEGER(aiAnArray;20) ``` Then, the following code resizes that same array to no elements: - ```4d ARRAY INTEGER(aiAnArray;0) ``` @@ -44,15 +43,15 @@ 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 ``` - 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. **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 +### Assigning an array to another 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 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. @@ -80,12 +79,13 @@ Here is another example: you want to initialize a form object with a text value (*) 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. + ## Two-dimensional Arrays Each of the array declaration commands can create or resize one-dimensional or two-dimensional arrays. Example: ```4d -

          ARRAY TEXT(atTopics;100;50) // Creates a text array composed of 100 rows of 50 columns + ARRAY TEXT(atTopics;100;50) // Creates a text array composed of 100 rows of 50 columns ``` Two-dimensional arrays are essentially language objects; you can neither display nor print them. @@ -153,7 +153,7 @@ Doing the same thing with arrays would be prohibitive for the following reasons: - 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. +- Again, because an array is always held in memory in its entirety, each time the application 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. **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. @@ -174,7 +174,6 @@ However, in some circumstances, you may need to work with arrays holding hundred | Time | (1+number of elements) * 4 | | Two-dimensional | (1+number of elements) * 16 + Sum of the size of each array | - **Notes:** - The size of a text in memory is calculated using this formula: ((Length + 1) * 2) diff --git a/website/translated_docs/pt/Concepts/cf_branching.md b/website/translated_docs/pt/Concepts/cf_branching.md index 5a0a37baa7cda4..7d782b65a48c79 100644 --- a/website/translated_docs/pt/Concepts/cf_branching.md +++ b/website/translated_docs/pt/Concepts/cf_branching.md @@ -3,9 +3,12 @@ id: branching title: Branching structures --- +A branching structure allows methods to test a condition and take alternative paths, depending on the result. + + ## 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 +18,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 +35,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,7 +45,7 @@ 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 @@ -57,7 +59,7 @@ The result is similar and *MethodB* is evaluated only if necessary. 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,7 +67,6 @@ The result is similar and *MethodB* is evaluated only if necessary. statement(s) End if ``` - or: ```4d @@ -77,8 +78,7 @@ or: ## Case of...Else...End case -The formal syntax of the `Case of...Else...End case` control flow structure is: - +A sintaxe da estrutura condicional `Case of...Else...End case` é: ```4d Case of :(Boolean_Expression) @@ -96,8 +96,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,22 +111,21 @@ Note that the `Else` part is optional; you can write: statement(s) End case ``` +Da mesma forma que a estrutura `If...Else...End if`, a estrutura `Case of...Else...End case` também deixa seu método escolher entre ações alternativas. Diferente da estrutura `If...Else...End` a estrutura `Case of...Else...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 -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 @@ -142,7 +140,7 @@ This example tests a numeric variable and displays an alert box with a word in i 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 @@ -160,9 +158,9 @@ For comparison, here is the `If...Else...End if` version of the same method: 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 @@ -173,7 +171,7 @@ Consequently, when you want to implement hierarchical tests, you should make sur 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 @@ -184,10 +182,9 @@ In the code above, the presence of the second condition is not detected since th End case ``` -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: ```4d Case of :(Boolean_Expression) @@ -202,7 +199,6 @@ Also, if you want to implement hierarchical testing, you may consider using hier ``` or: - ```4d Case of :(Boolean_Expression) @@ -217,10 +213,9 @@ or: ``` or: - ```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 e2b96c050d06d4..65e34701efd466 100644 --- a/website/translated_docs/pt/Concepts/cf_looping.md +++ b/website/translated_docs/pt/Concepts/cf_looping.md @@ -3,29 +3,29 @@ id: looping title: Looping structures --- -## While...End while +Looping structures repeat a sequence of statements until a condition is met or a number of times is reached. + -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 @@ -36,25 +36,23 @@ If you find yourself in such a situation, where a method is executing uncontroll End while //The loop always ends with 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: - +A sintaxe da estrutura condicional `Repeat...Until` é: ```4d Repeat statement(s) Until(Boolean_Expression) ``` +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. Assim, um loop `Repeat...Until` sempre executa o loop uma vez, enquanto que se a expressão booleana for inicialmente False, um loop `While...End while` não executa o loop em absoluto. -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. +A outra diferença com um loop `Repeat...Until` é que o loop continua até que a expressão seja TRUE. ### 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. +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 @@ -64,7 +62,7 @@ Compare the following example with the example for the `While...End while` loop. ## For...End for -The formal syntax of the `For...End for` control flow structure is: +A sintaxe da estrutura condicional `For...End for` é: ```4d For(Counter_Variable;Start_Expression;End_Expression{;Increment_Expression}) @@ -72,15 +70,15 @@ 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. -**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. @@ -129,11 +127,11 @@ The `For...End for` loop is a loop controlled by a counter variable: End for ``` -Most of the `For...End for` loops you will write in your databases will look like the ones listed in these examples. +Most of the `For...End for` loops you will write in your projects will look like the ones listed in these examples. ### Decrementing variable counter -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: @@ -178,7 +176,7 @@ In some cases, you may want to have a loop whose counter variable is decreasing ### Incrementing the counter variable by more than one -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: @@ -189,18 +187,17 @@ If you need to, you can use an *Increment_Expression* (positive or negative) who End for ``` -### Comparing looping structures -Let's go back to the first `For...End for` example. The following example executes 100 iterations: +### Comparing looping structures +Voltamos ao primeiro exemplo de `For...End for`. The following example executes 100 iterations: ```4d For(vCounter;1;100) //Do something 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: - +É interessante ver como o loop `While...End while` e o loop `Repeat...Until` realizariam a mesma ação. Aqui está o loop equivalente `While...End while`: ```4d $i:=1 //Initialize the counter While($i<=100) //Loop 100 times @@ -209,8 +206,7 @@ It is interesting to see how the `While...End while` loop and `Repeat...Until` l End while ``` -Here is the equivalent `Repeat...Until` loop: - +Aquí está o loop equivalente `Repeat...Until`: ```4d $i:=1 //Initialize the counter Repeat @@ -218,12 +214,11 @@ Here is the equivalent `Repeat...Until` loop: $i:=$i+1 //Need to increment the counter Until($i=100) //Loop 100 times ``` - -**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. +**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. ### Optimizing the execution of the For...End for loops -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: @@ -236,9 +231,9 @@ You can use Real and Long Integer variables as well as interprocess, process, an ### Nested For...End for looping structures -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: @@ -277,7 +272,7 @@ Here are two examples: ## For each...End for each -The formal syntax of the `For each...End for each` control flow structure is: +A sintaxe da estrutura condicional `For each...End for each` é: ```4d For each(Current_Item;Expression{;begin{;end}}){Until|While}(Boolean_Expression)} @@ -285,13 +280,13 @@ The formal syntax of the `For each...End for each` control flow structure is: 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: +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*: - 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 tabela abaixo compara os três tipos de `For each...End for each`: | | Loop through collections | Loop through entity selections | Loop through objects | | --------------------------------- | ------------------------------------------------ | ----------------------------------- | --------------------------- | @@ -300,30 +295,28 @@ The following table compares the three types of `For each...End for each`: | 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 | - - 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`). +- 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: +- 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. + - within the loop when only some elements/properties need to be modified and no integrity management is required. ### Loop through collections -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. +Quando `For each...End for each` for usado com uma _Expressão_ do tipo _Collection_ , o parâmetro _Elemento_atual_ é 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. -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. +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. -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: +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: -- 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). +- 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). #### Example -You want to compute some statistics for a collection of numbers: - +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) @@ -347,18 +340,17 @@ You want to compute some statistics for a collection of numbers: ### Loop through entity selections -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: - +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'")) @@ -369,14 +361,13 @@ You want to raise the salary of all British employees in an entity selection: ### 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. +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. -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. +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. #### Example -You want to switch the names to uppercase in the following object: - +Se quiser trocar os nomes para maiúsculas no objeto a seguir: ```4d { "firstname": "gregory", @@ -384,9 +375,7 @@ You want to switch the names to uppercase in the following object: "age": 20 } ``` - You can write: - ```4d For each(property;vObject) If(Value type(vObject[property])=Is text) @@ -394,30 +383,28 @@ You can write: End if End for each ``` - - { - "firstname": "GREGORY", - "lastname": "BADIKORA", - "age": 20 - } - - +``` +{ + "firstname": "GREGORY", + "lastname": "BADIKORA", + "age": 20 +} +``` ### begin / end parameters -You can define bounds to the iteration using the optional begin and end parameters. +Pode definir limites para a iteração usando os parâmetros opcionais inicio e fim. -**Note:** The *begin* and *end* parameters can only be used in iterations through collections and entity selections (they are ignored on object properties). +**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). - 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). +- In the *end* parameter, you can also pass the element position in *Expression* at which to stop the iteration (*end* is excluded). -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` +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` For example: - - 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. +- end=-2 -> end=-2+10=8 -> iteration stops before the 8th element (#7), i.e. at the 7th element. #### Example @@ -438,9 +425,9 @@ For example: ### Until and While conditions -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`. +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`. -You can pass either keyword depending on your needs: +Pode passar qualquer uma das duas palavras chave em função das suas necessidades: - 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. @@ -461,4 +448,5 @@ You can pass either keyword depending on your needs: $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/classes.md b/website/translated_docs/pt/Concepts/classes.md index b17c63ef373dd6..7f6adcb7523b2a 100644 --- a/website/translated_docs/pt/Concepts/classes.md +++ b/website/translated_docs/pt/Concepts/classes.md @@ -4,124 +4,72 @@ title: Classes --- -## Overview +## Visão Geral The 4D language supports the concept of **classes**. In a programming language, using a class allows you to define an object behaviour with associated properties and functions. -Once a class is defined, you can **instantiate** objects of this class anywhere in your code. Each object is an instance of its class. A class can `extend` another class, and then inherits from its functions. +Once a user class is defined, you can **instantiate** objects of this class anywhere in your code. Each object is an instance of its class. A class can [`extend`](#class-extends-classname) another class, and then inherits from its [functions](#function) and properties ([static](#class-constructor) and [computed](#function-get-and-function-set)). -The class model in 4D is similar to classes in JavaScript, and based on a chain of prototypes. +> The class model in 4D is similar to classes in JavaScript, and based on a chain of prototypes. -### Class object +For example, you could create a `Person` class with the following definition: -A class is an object itself, of "Class" class. A class object has the following properties and methods: - -- `name` which must be ECMAScript compliant -- `superclass` object (optional, null if none) -- `new()` method, allowing to instantiate class objects. - -In addtion, a class object can reference: - -- a `constructor` object (optional) -- a `prototype` object, containing named function objects (optional). - -A class object is a shared object and can therefore be accessed from different 4D processes simultaneously. - -### Property lookup and prototype - -All objects in 4D are internally linked to a class object. When 4D does not find a property in an object, it searches in the prototype object of its class; if not found, 4D continue searching in the prototype object of its superclass, and so on until there is no more superclass. - -All objects inherit from the class "Object" as their inheritance tree top class. - -```4d - //Class: Polygon -Class constructor -C_LONGINT($1;$2) -This.area:=$1*$2 - - //C_OBJECT($poly) -C_BOOLEAN($instance) -$poly:=cs.Polygon.new(4;3) - -$instance:=OB Instance of($poly;cs.Polygon) - // true -$instance:=OB Instance of($poly;4D.Object) - // true -``` - -When enumerating properties of an object, its class prototype is not enumerated. As a consequence, `For each` statement and `JSON Stringify` command do not return properties of the class prototype object. The prototype object property of a class is an internal hidden property. - -### Class definition - -A user class file defines a model of object that can be instantiated in the database code by calling the `new()` class member method. You will usually use specific [class keywords](#class-keywords) and [class commands](#class-commands) in the class file. +```4d +//Class: Person.4dm +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname -For example: +Function get fullName() -> $fullName : text + $fullName:=This.firstName+" "+This.lastName -```4d -//Class: Person.4dm -Class constructor - C_TEXT($1) // FirstName - C_TEXT($2) // LastName - This.firstName:=$1 - This.lastName:=$2 +Function sayHello()->$welcome : Text + $welcome:="Hello "+This.fullName ``` In a method, creating a "Person": - C_OBJECT($o) - $o:=cs.Person.new("John";"Doe") - // $o: {firstName: "John";lastName: "Doe" } - - -Note that you could create an empty class file, and instantiate empty objects. For example, if you create the following `Empty.4dm` class file: - -```4d -//Empty.4dm class file -//Nothing ``` - -You could write in a method: - -```4d -$o:=cs.Empty.new() -//$o : {} -$cName:=OB Class($o).name //"Empty" +var $person : cs.Person //object of Person class +var $hello : Text +$person:=cs.Person.new("John";"Doe") +// $person:{firstName: "John"; lastName: "Doe"; fullName: "John Doe"} +$hello:=$person.sayHello() //"Hello John Doe" ``` -## Class stores -Available classes are accessible from their class stores. The following class stores are available: -- a class store for built-in 4D classes. It is returned by the `4D` command. -- a class store for each opened database or component. It is returned by the `cs` command. These are "user classes". +## Managing classes -For example, you create a new instance of an object of myClass using the `cs.myClass.new()` statement (`cs` means *classtore*). +### Class definition -## Handling user classes +A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. -### Class files +When naming classes, you should keep in mind the following rules: -A user class in 4D is defined by a specific method file (.4dm), stored in the `/Project/Sources/Classes/` folder. The name of the file is the class name. +- A [class name](identifiers.md#classes) must be compliant with [property naming rules](identifiers.md#object-properties). +- Class names are case sensitive. +- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. For example, if you want to define a class named "Polygon", you need to create the following file: -- Database folder - + Project - * Sources - - Classes +- Project folder + + Project + * Sources + - Classes + Polygon.4dm -### Class names +### Deleting a class -When naming classes, you should keep in mind the following rules: +To delete an existing class, you can: + +- on your disk, remove the .4dm class file from the "Classes" folder, +- in the 4D Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. -- A class name must be ECMAScript compliant. -- Class names are case sensitive. -- Giving the same name to a class and a database table is not recommended, in order to prevent any conflict. -### 4D Developer interface +### Using 4D interface -Class files are automatically stored at the appropriate location when created through the 4D Developer interface, either via the **File** menu or the Explorer. +Class files are automatically stored at the appropriate location when created through the 4D interface, either via the **File** menu or the Explorer. #### File menu and toolbar @@ -137,144 +85,311 @@ To create a new class, you can: - select the **Classes** category and click on the ![](assets/en/Users/PlussNew.png) button. - select **New Class...** from the action menu at the bottom of the Explorer window, or from the contexual menu of the Classes group. ![](assets/en/Concepts/newClass.png) -- select **New > Class...** from the contexual menu of the Explorer's Home page. +- select **New > Class...** from the contexual menu of the Explorer's Home page. #### Class code support -In the various 4D Developer windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: +In the various 4D windows (code editor, compiler, debugger, runtime explorer), class code is basically handled like a project method with some specificities: -- In the code editor: +- In the code editor: - a class cannot be run - - a class function is a code block + - a class function is a code block - **Goto definition** on an object member searches for class Function declarations; for example, "$o.f()" will find "Function f". - **Search references** on class function declaration searches for the function used as object member; for example, "Function f" will find "$o.f()". -- In the Runtime explorer and Debugger, class functions are displayed with the \ constructor or \.\ format. +- In the Runtime explorer and Debugger, class functions are displayed with the \ constructor or \.\ format. -### Deleting a class +## Class stores -To delete an existing class, you can: +Available classes are accessible from their class stores. Two class stores are available: + +- `cs` for user class store +- `4D` for built-in class store + + + +### `cs` + +#### cs -> classStore + +| Parameter | Type | | Description | +| ---------- | ------ | -- | --------------------------------------------- | +| classStore | object | <- | User class store for the project or component | + +The `cs` command returns the user class store for the current project or component. It returns all user classes [defined](#class-definition) in the opened project or component. By default, only project [ORDA classes](ORDA/ordaClasses.md) are available. + +#### Example + +You want to create a new instance of an object of `myClass`: + +```4d +$instance:=cs.myClass.new() +``` + +### `4D` + +#### 4D -> classStore + +| Parameter | Type | | Description | +| ---------- | ------ | -- | -------------- | +| classStore | object | <- | 4D class store | + +The `4D` command returns the class store for available built-in 4D classes. It provides access to specific APIs such as [CryptoKey](API/CryptoKeyClass.md). + +#### Example + +You want to create a new key in the `CryptoKey` class: + +```4d +$key:=4D.CryptoKey.new(New object("type";"ECDSA";"curve";"prime256v1")) +``` + + + + +## Class object + +When a class is [defined](#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of ["Class" class](API/ClassClass.md). A class object has the following properties and function: + +- [`name`](API/ClassClass.md#name) string +- [`superclass`](API/ClassClass.md#superclass) object (null if none) +- [`new()`](API/ClassClass.md#new) function, allowing to instantiate class objects. + +In addition, a class object can reference a [`constructor`](#class-constructor) object (optional). + +A class object is a [shared object](shared.md) and can therefore be accessed from different 4D processes simultaneously. + +### Inheritance + +If a class inherits from another class (i.e. the [Class extends](classes.md#class-extends-classname) keyword is used in its definition), the parent class is its [`superclass`](API/ClassClass.md#superclass). + +When 4D does not find a function or a property in a class, it searches it in its [`superclass`](API/ClassClass.md#superclass); if not found, 4D continues searching in the superclass of the superclass, and so on until there is no more superclass (all objects inherit from the "Object" superclass). -- on your disk, remove the .4dm class file from the "Classes" folder, -- in the Explorer, select the class and click ![](assets/en/Users/MinussNew.png) or choose **Move to Trash** from the contextual menu. ## Class keywords Specific 4D keywords can be used in class definitions: -- `Function ` to define member methods of the objects. -- `Class constructor` to define the properties of the objects (i.e. the prototype). +- `Function ` to define class functions of the objects. +- `Function get ` and `Function set ` to define computed properties of the objects. +- `Class constructor` to define static properties of the objects. - `Class extends ` to define inheritance. -### Class Function + +### `Function` #### Syntax -```js -Function +```4d +Function ({$parameterName : type; ...}){->$parameterName : type} // code ``` -Class functions are properties of the prototype object of the owner class. They are objects of the "Function" class. +Class functions are specific properties of the class. They are objects of the [4D.Function](API/FunctionClass.md#about-4dfunction-objects) class. -In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be ECMAScript compliant. +In the class definition file, function declarations use the `Function` keyword, and the name of the function. The function name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). -> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features. For example, if you declare `Function _myPrivateFunction` in MyClass, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. +> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features in the 4D code editor. For example, if you declare `Function _myPrivateFunction` in `MyClass`, it will not be proposed in the code editor when you type in `"cs.MyClass. "`. -Within a class function, the `This` is used as the object instance. For example: +Immediately following the function name, [parameters](#parameters) for the function can be declared with an assigned name and data type, including the return parameter (optional). For example: ```4d -Function getFullName - C_TEXT($0) - $0:=This.firstName+" "+Uppercase(This.lastName) +Function computeArea($width : Integer; $height : Integer)->$area : Integer +``` -Function getAge - C_LONGINT($0) - $0:=(Current date-This.birthdate)/365.25 +Within a class function, the `This` command is used as the object instance. For example: + +```4d +Function setFullname($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function getFullname()->$fullname : Text + $fullname:=This.firstName+" "+Uppercase(This.lastName) ``` For a class function, the `Current method name` command returns: "*\.\*", for example "MyClass.myMethod". -In the database code, class functions are called as member methods of the object instance and can receive parameters if any. The following syntaxes are supported: +In the application code, class functions are called as member methods of the object instance and can receive [parameters](#class-function-parameters) if any. The following syntaxes are supported: + +- use of the `()` operator. For example, `myObject.methodName("hello")` +- use of a "4D.Function" class member method: + - [`apply()`](API/FunctionClass.md#apply) + - [`call()`](API/FunctionClass.md#call) + +> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: - the compiler does not generate any error (which is different compared to regular methods), - an error is thrown by 4D only at runtime. + + + + +#### Parameters + +Function parameters are declared using the parameter name and the parameter type, separated by a colon. The parameter name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). Multiple parameters (and types) are separated by semicolons (;). + +```4d +Function add($x; $y : Variant; $z : Integer; $xy : Object) +``` +> If the type is not stated, the parameter will be defined as `Variant`. -- use of the `()` operator. For example `myObject.methodName("hello")`. -- use of a "Function" class member method - - `apply()` - - `call()` +You declare the return parameter (optional) by adding an arrow (->) and the return parameter definition after the input parameter(s) list. For example: -> **Thread-safety warning:** If a class function is not thread-safe and called by a method with the "Can be run in preemptive process" attribute: -> - the compiler does not generate any error (which is different compared to regular methods), +```4d +Function add($x : Variant; $y : Integer)->$result : Integer +``` -< +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through $0. For example: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` +> The [classic 4D syntax](parameters.md#sequential-parameters) for method parameters can be used to declare class function parameters. Both syntaxes can be mixed. For example: +> +> ```4d +> Function add($x : Integer) +> var $2; $value : Integer +> var $0 : Text +> $value:=$x+$2 +> $0:=String($value) +> ``` -p> -> - an error is thrown by 4D only at runtime. #### Example ```4d // Class: Rectangle -Class Constructor - C_LONGINT($1;$2) +Class constructor($width : Integer; $height : Integer) This.name:="Rectangle" - This.height:=$1 - This.width:=$2 + This.height:=$height + This.width:=$width // Function definition -Function getArea - C_LONGINT($0) - $0:=(This.height)*(This.width) - +Function getArea()->$result : Integer + $result:=(This.height)*(This.width) ``` ```4d // In a project method -C_OBJECT($o) -C_REAL($area) -$o:=cs.Rectangle.new() -$area:=$o.getArea(50;100) //5000 +var $rect : cs.Rectangle +var $area : Real + +$rect:=cs.Rectangle.new(50;100) +$area:=$rect.getArea() //5000 ``` -### Class constructor + +### `Function get` and `Function set` #### Syntax -```js +```4d +Function get ()->$result : type +// code +``` + +```4d +Function set ($parameterName : type) +// code +``` + +`Function get` and `Function set` are accessors defining **computed properties** in the class. A computed property is a named property with a data type that masks a calculation. When a computed property value is accessed, 4D substitutes the corresponding accessor's code: + +- when the property is read, the `Function get` is executed, +- when the property is written, the `Function set` is executed. + +If the property is not accessed, the code never executes. + +Computed properties are designed to handle data that do not necessary need to be kept in memory. They are usually based upon persistent properties. For example, if a class object contains as persistent property the *gross price* and the *VAT rate*, the *net price* could be handled by a computed property. + +In the class definition file, computed property declarations use the `Function get` (the *getter*) and `Function set` (the *setter*) keywords, followed by the name of the property. The name must be compliant with [property naming rules](Concepts/identifiers.md#object-properties). + +`Function get` returns a value of the property type and `Function set` takes a parameter of the property type. Both arguments must comply with standard [function parameters](#parameters). + +When both functions are defined, the computed property is **read-write**. If only a `Function get` is defined, the computed property is **read-only**. In this case, an error is returned if the code tries to modify the property. If only a `Function set` is defined, 4D returns *undefined* when the property is read. + +The type of the computed property is defined by the `$return` type declaration of the *getter*. It can be of the following types: + +- Text +- Boolean +- Date +- Number +- Object +- Collection +- Image +- Blob + +> Assigning *undefined* to an object property clears its value while preserving its type. In order to do that, the `Function get` is first called to retrieve the value type, then the `Function set` is called with an empty value of that type. + +#### Examples + +```4d +//Class: Person.4dm + +Class constructor($firstname : Text; $lastname : Text) + This.firstName:=$firstname + This.lastName:=$lastname + +Function get fullName() -> $fullName : Text + $fullName:=This.firstName+" "+This.lastName + +Function set fullName( $fullName : text ) + $p:=Position(" "; $fullName) + This.firstName:=Substring($fullName; 1; $p-1) + This.lastName:=Substring($fullName; $p+1) + +``` + +```4d +//in a project method +$fullName:=$person.fullName // Function get fullName() is called +$person.fullName:="John Smith" // Function set fullName() is called +``` + + +### `Class Constructor` + +#### Syntax + +```4d // Class: MyClass -Class Constructor +Class Constructor({$parameterName : type; ...}) // code ``` -A class constructor function, which can accept parameters, can be used to define a user class. +A class constructor function, which can accept [parameters](#parameters), can be used to define a user class. + +In that case, when you call the [`new()`](API/ClassClass.md#new) function, the class constructor is called with the parameters optionally passed to the `new()` function. + +For a class constructor function, the `Current method name` command returns: "*\:constructor*", for example "MyClass:constructor". -In that case, when you call the `new()` class member method, the class constructor is called with the parameters optionnally passed to the `new()` function. -For a class constructor function, the `Current method name` command returns: "*\.constructor*", for example "MyClass.constructor". #### Example: ```4d // Class: MyClass // Class constructor of MyClass -Class Constructor -C_TEXT($1) -This.name:=$1 +Class Constructor ($name : Text) + This.name:=$name ``` ```4d // In a project method // You can instantiate an object -C_OBJECT($o) +var $o : cs.MyClass $o:=cs.MyClass.new("HelloWorld") // $o = {"name":"HelloWorld"} ``` -### Class extends \ + + + +### `Class extends ` #### Syntax -```js +```4d // Class: ChildClass Class extends ``` @@ -284,11 +399,11 @@ The `Class extends` keyword is used in class declaration to create a user class Class extension must respect the following rules: - A user class cannot extend a built-in class (except 4D.Object which is extended by default for user classes) -- A user class cannot extend a user class from another database or component. +- A user class cannot extend a user class from another project or component. - A user class cannot extend itself. -- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). +- It is not possible to extend classes in a circular way (i.e. "a" extends "b" that extends "a"). -Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax' will throw an error in this case. +Breaking such a rule is not detected by the code editor or the interpreter, only the compiler and `check syntax` will throw an error in this case. An extended class can call the constructor of its parent class using the [`Super`](#super) command. @@ -297,27 +412,28 @@ An extended class can call the constructor of its parent class using the [`Super This example creates a class called `Square` from a class called `Polygon`. ```4d - //Class: Square - //path: Classes/Square.4dm +//Class: Square - Class extends Polygon +//path: Classes/Square.4dm - Class constructor - C_LONGINT($1) +Class extends Polygon - // It calls the parent class's constructor with lengths - // provided for the Polygon's width and height -Super($1;$1) - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +Class constructor ($side : Integer) -Function getArea -C_LONGINT($0) -$0:=This.height*This.width + // It calls the parent class's constructor with lengths + // provided for the Polygon's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" + + Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` -### Super +### `Super` + #### Super {( param{;...;paramN} )} {-> Object} @@ -326,28 +442,28 @@ $0:=This.height*This.width | param | mixed | -> | Parameter(s) to pass to the parent constructor | | Result | object | <- | Object's parent | - The `Super` keyword allows calls to the `superclass`, i.e. the parent class. `Super` serves two different purposes: -- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. When used in a constructor, the `Super` command appears alone and must be used before the `This` keyword is used. - - If all class constructors in the inheritance tree are not properly called, error -10748 is generated. It's 4D developer to make sure calls are valid. - - If the `This` command is called on an object whose superclasses have not been constructed, error -10743 is generated. +- inside a [constructor code](#class-constructor), `Super` is a command that allows to call the constructor of the superclass. When used in a constructor, the `Super` command appears alone and must be used before the `This` keyword is used. + - If all class constructors in the inheritance tree are not properly called, error -10748 is generated. It's 4D developer to make sure calls are valid. + - If the `This` command is called on an object whose superclasses have not been constructed, error -10743 is generated. + - If `Super` is called out of an object scope, or on an object whose superclass constructor has already been called, error -10746 is generated. ```4d - // inside myClass constructor - C_TEXT($1;$2) - Super($1) //calls superclass constructor with a text param - This.param:=$2 // use second param +// inside myClass constructor +var $text1; $text2 : Text +Super($text1) //calls superclass constructor with a text param +This.param:=$text2 // use second param ``` - inside a [class member function](#class-function), `Super` designates the prototype of the superclass and allows to call a function of the superclass hierarchy. ```4d - Super.doSomething(42) //calls "doSomething" function - //declared in superclasses +Super.doSomething(42) //calls "doSomething" function +//declared in superclasses ``` #### Example 1 @@ -355,37 +471,39 @@ The `Super` keyword allows calls to the `superclass`, i.e. the parent class. This example illustrates the use of `Super` in a class constructor. The command is called to avoid duplicating the constructor parts that are common between `Rectangle` and `Square` classes. ```4d - //Class: Rectangle +// Class: Rectangle +Class constructor($width : Integer; $height : Integer) + This.name:="Rectangle" + This.height:=$height + This.width:=$width - Class constructor - C_LONGINT($1;$2) - This.name:="Rectangle" - This.height:=$1 - This.width:=$2 - Function sayName - ALERT("Hi, I am a "+This.name+".") +Function sayName() + ALERT("Hi, I am a "+This.name+".") - Function getArea - C_LONGINT($0) - $0:=This.height*This.width +// Function definition +Function getArea() + var $0 : Integer + $0:=(This.height)*(This.width) ``` ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Class constructor - C_LONGINT($1) +Class constructor ($side : Integer) - // It calls the parent class's constructor with lengths - // provided for the Rectangle's width and height - Super($1;$1) + // It calls the parent class's constructor with lengths + // provided for the Rectangle's width and height + Super($side;$side) + // In derived classes, Super must be called before you + // can use 'This' + This.name:="Square" - // In derived classes, Super must be called before you - // can use 'This' - This.name:="Square" +Function getArea() + C_LONGINT($0) + $0:=This.height*This.width ``` #### Example 2 @@ -393,35 +511,35 @@ This example illustrates the use of `Super` in a class constructor. The command This example illustrates the use of `Super` in a class member method. You created the `Rectangle` class with a function: ```4d - //Class: Rectangle +//Class: Rectangle - Function nbSides - C_TEXT($0) - $0:="I have 4 sides" +Function nbSides() + var $0 : Text + $0:="I have 4 sides" ``` You also created the `Square` class with a function calling the superclass function: ```4d - //Class: Square +//Class: Square - Class extends Rectangle +Class extends Rectangle - Function description - C_TEXT($0) - $0:=Super.nbSides()+" which are all equal" +Function description() + var $0 : Text + $0:=Super.nbSides()+" which are all equal" ``` Then you can write in a project method: ```4d - C_OBJECT($square) - C_TEXT($message) - $square:=cs.Square.new() - $message:=$square.description() //I have 4 sides which are all equal +var $square : Object +var $message : Text +$square:=cs.Square.new() +$message:=$square.description() //I have 4 sides which are all equal ``` -### This +### `This` #### This -> Object @@ -429,7 +547,6 @@ Then you can write in a project method: | --------- | ------ | -- | -------------- | | Result | object | <- | Current object | - The `This` keyword returns a reference to the currently processed object. In 4D, it can be used in [different contexts](https://doc.4d.com/4Dv18/4D/18/This.301-4504875.en.html). In most cases, the value of `This` is determined by how a function is called. It can't be set by assignment during execution, and it may be different each time the function is called. @@ -441,31 +558,33 @@ $o:=New object("prop";42;"f";Formula(This.prop)) $val:=$o.f() //42 ``` -When a [class constructor](#class-constructor) function is used (with the `new()` keyword), its `This` is bound to the new object being constructed. +When a [class constructor](#class-constructor) function is used (with the [`new()`](API/ClassClass.md#new) function), its `This` is bound to the new object being constructed. ```4d - //Class: ob +//Class: ob Class Constructor + // Create properties on This as // desired by assigning to them This.a:=42 ``` ```4d - // in a 4D method +// in a 4D method $o:=cs.ob.new() $val:=$o.a //42 ``` > When calling the superclass constructor in a constructor using the [Super](#super) keyword, keep in mind that `This` must not be called before the superclass constructor, otherwise an error is generated. See [this example](#example-1). + In any cases, `This` refers to the object the method was called on, as if the method were on the object. ```4d - //Class: ob +//Class: ob - Function f +Function f() $0:=This.a+This.b ``` @@ -477,21 +596,23 @@ $o.a:=5 $o.b:=3 $val:=$o.f() //8 ``` - In this example, the object assigned to the variable $o doesn't have its own *f* property, it inherits it from its class. Since *f* is called as a method of $o, its `This` refers to $o. + ## Class commands Several commands of the 4D language allows you to handle class features. -### OB Class + +### `OB Class` #### OB Class ( object ) -> Object | Null `OB Class` returns the class of the object passed in parameter. -### OB Instance of + +### `OB Instance of` #### OB Instance of ( object ; class ) -> Boolean -`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise. \ No newline at end of file +`OB Instance of` returns `true` if `object` belongs to `class` or to one of its inherited classes, and `false` otherwise. diff --git a/website/translated_docs/pt/Concepts/components.md b/website/translated_docs/pt/Concepts/components.md index 465d945c61f7e1..783a80d5b48431 100644 --- a/website/translated_docs/pt/Concepts/components.md +++ b/website/translated_docs/pt/Concepts/components.md @@ -3,55 +3,109 @@ id: components title: Components --- -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. +A 4D component is a set of 4D methods and forms representing one or more functionalities that can be installed in different applications. For example, you can develop a 4D e-mail component that manages every aspect of sending, receiving and storing e-mails in 4D applications. + +## Presentation + +### Definições + +- **Matrix Project**: 4D project used for developing the component. The matrix project is a standard project with no specific attributes. A matrix project forms a single component. +- **Host Project**: Application project in which a component is installed and used. +- **Component**: Matrix project, compiled or not, copied into the [`Components`](Project/architecture.md) folder of the host application and whose contents are used in the host application. + +### Principles 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: -- 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. +- A component consists of a regular 4D project file. +- To install a component, you simply need to copy it into the [`Components` folder of the project](Project/architecture.md). You can use aliases or shortcuts. +- A project can be both a “matrix†and a “host,†in other words, a matrix project can itself use one or more components. Entretanto um componente não pode usar por si mesmo "subcomponentes". +- A component can call on most of the 4D elements: project methods, project forms, menu bars, choice lists, and so on. 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. +- A host project running in interpreted mode can use either interpreted or compiled components. A host project running in compiled mode cannot use interpreted components. In this case, only compiled components can be used. + + + -## Definitions +## Escopo dos comandos de linguagem -The component management mechanisms in 4D require the implementation of the following terms and concepts: +Exceto pelos [Comandos não utilizáveis](#unusable-commands), um componente não pode usar qualquer comando da linguagem 4D. -- **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. +When commands are called from a component, they are executed in the context of the component, except for the `EXECUTE METHOD` or `EXECUTE FORMULA` command that use 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 project (a component does not have its own users and groups). -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. +The `SET DATABASE PARAMETER` and `Get database parameter` commands are an exception: their scope is global to the application. When these commands are called from a component, they are applied to the host application project. -### Protection of components: compilation +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 project. + + +### 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` +- `SET PICTURE TO LIBRARY` +- `REMOVE PICTURE FROM LIBRARY` +- `SAVE LIST` +- `ARRAY TO LIST` +- `EDIT FORM` +- `CREATE USER FORM` +- `DELETE USER FORM` +- `CHANGE PASSWORD` +- `EDIT ACCESS` +- `Set group properties` +- `Set user properties` +- `DELETE USER` +- `CHANGE LICENSES` +- `BLOB TO USERS` +- `SET PLUGIN ACCESS` -By default, all the project methods of a matrix database installed as a component are potentially visible from the host database. In particular: +**Notes:** -- 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. +- 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. +- SQL data definition language commands (`CREATE TABLE`, `DROP TABLE`, etc.) cannot be used on the component project. Entretanto são compatíveis com bancos de dados externos (ver o comando SQL`CREATE DATABASE`). -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: -- 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. -## Sharing of project methods +## Partilhar os métodos de projeto -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. +All the project methods of a matrix project are by definition included in the component (the project is the component), which means that they can be called and executed by the component. -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. +On the other hand, by default these project methods will not be visible, and they can't be called in the host project. In the matrix project, you must explicitly designate the methods that you want to share with the host project. These project methods can be called in the code of the host project (but they cannot be modified in the Method editor of the host project). Estes métodos formam os **pontos de entrada** no componente. -**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. +Conversely, for security reasons, by default a component cannot execute project methods belonging to the host project. In certain cases, you may need to allow a component to access the project methods of your host project. To do this, you must explicitly designate which project methods of the host project you want to make accessible to the components (in the method properties, check the **Shared by components and host project** box). ![](assets/en/Concepts/pict516563.en.png) -## Passing variables +Once the project methods of the host projects are available to the components, you can execute a host method from inside a component using the `EXECUTE FORMULA` or `EXECUTE METHOD` commands. For example: + +```4d +// Host Method +component_method("host_method_name") +``` + + +```4d +// component_method + C_TEXT($1) + EXECUTE METHOD($1) +``` + +> An interpreted host database that contains interpreted components can be compiled or syntax checked if it does not call methods of the interpreted component. Otherwise, a warning dialog box appears when you attempt to launch the compilation or a syntax check and it will not be possible to carry out the operation. +> Keep in mind that an interpreted method can call a compiled method, but not the reverse, except via the use of the `EXECUTE METHOD` and `EXECUTE FORMULA` commands. + -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. -Example using an array: +## Passar variáveis + +The local, process and interprocess variables are not shared between components and host projects. The only way to modify component variables from the host project and vice versa is using pointers. + +Exemplo usando um array: ```4d -//In the host database: +//In the host project: ARRAY INTEGER(MyArray;10) AMethod(->MyArray) @@ -59,52 +113,69 @@ Example using an array: APPEND TO ARRAY($1->;2) ``` -Examples using variables: +Exemplos usando variáveis: ```4d - C_TEXT(myvariable) - component_method1(->myvariable) - C_POINTER($p) - $p:=component_method2(...) +C_TEXT(myvariable) +component_method1(->myvariable) ``` -When you use pointers to allow components and the host database to communicate, you need to take the following specificities into account: +```4d +C_POINTER($p) +$p:=component_method2(...) +``` + +Without a pointer, a component can still access the value of a host database variable (but not the variable itself) and vice versa: + +```4d +//In the host database +C_TEXT($input_t) +$input_t:="DoSomething" +component_method($input_t) +// component_method gets "DoSomething" in $1 (but not the $input_t variable) +``` + + +When you use pointers to allow components and the host project 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. +- The `Get pointer` command will not return a pointer to a variable of the host project if it is called from a component and vice versa. -- 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. - +- The component architecture allows the coexistence, within the same interpreted project, of both interpreted and compiled components (conversely, only compiled components can be used in a compiled project). 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 project. - 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: + - 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 project (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: ```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 +## Error handling + +An [error-handling method](Concepts/error-handling.md) installed by the `ON ERR CALL` command only applies to the running application. In the case of an error generated by a component, the `ON ERR CALL` error-handling method of the host project is not called, and vice versa. + -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: +## Access to tables of the host project + +Although components cannot use tables, pointers can allow host projects and components to communicate with each other. 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_POINTER($1) //Pointer on a table in host project +C_POINTER($2) //Pointer on a field in host project C_TEXT($3) // Value to insert $tablepointer:=$1 @@ -115,74 +186,24 @@ $fieldpointer->:=$3 SAVE RECORD($tablepointer->) ``` -## Scope of language commands - -Except for [Unusable commands](#unusable-commands), a component can use any command of the 4D language. - -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). - -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. - -Furthermore, specific measures have been specified for the `Structure file` and `Get 4D folder` commands when they are used in the framework of components. - -The `COMPONENT LIST` command can be used to obtain the list of components that are loaded by the host database. - -### 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â€: - -- `ON EVENT CALL` -- `Method called on event` -- `SET PICTURE TO LIBRARY` -- `REMOVE PICTURE FROM LIBRARY` -- `SAVE LIST` -- `ARRAY TO LIST` -- `EDIT FORM` -- `CREATE USER FORM` -- `DELETE USER FORM` -- `CHANGE PASSWORD` -- `EDIT ACCESS` -- `Set group properties` -- `Set user properties` -- `DELETE USER` -- `CHANGE LICENSES` -- `BLOB TO USERS` -- `SET PLUGIN ACCESS` - -**Notes:** - -- 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). - -## Error handling - -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. - -## Use of forms - -- 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. +> In the context of a component, 4D assumes that a reference to a table form is a reference to the host table form (as components can't have tables.) -**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. +## Uso de tabelas e campos -- 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. - -## Use of tables and fields - -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. +A component cannot use the tables and fields defined in the 4D structure of the matrix project. 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. An external database is a 4D project that is independent from the main 4D project, but that you can work with from the main 4D project. 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 -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 +223,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 // retrieves data from the host project through pointers $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -224,10 +245,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 // accesses data of the host project through pointers $Ptr_2:=$3 $Ptr_3:=$4 $Ptr_4:=$5 @@ -246,18 +267,48 @@ Reading from an external database: End SQL ``` + +## Uso de formulários + +- Só os "formulários de projeto" (formulários que não estejam associados a nenhuma tabela específica) podem ser utilizados em um componente. Any project forms present in the matrix project can be used by the component. +- A component can call table forms of the host project. 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. + +> If a component uses the `ADD RECORD` command, the current Input form of the host project will be displayed, in the context of the host project. 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 projects. 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. + +> In the context of a component, any referenced project form must belong to the component. For example, inside a component, referencing a host project form using `DIALOG` or `Open form window` will throw an error. + + ## 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. +Components can use resources located in the Resources folder of the component. + +Mecanismos automáticos são operacionais: os arquivos XLIFF encontrados na pasta Resources de um componene serão carregados por esse componente. + +In a host project containing one or more components, each component as well as the host projects has its own “resources string.†Resources are partitioned between the different projects: it is not possible to access the resources of component A from component B or the host project. + + +## Executing initialization code + +A component can execute 4D code automatically when opening or closing the host database, for example in order to load and/or save the preferences or user states related to the operation of the host database. + +Executing initialization or closing code is done by means of the `On Host Database Event` database method. + +> For security reasons, you must explicitly authorize the execution of the `On Host Database Event` database method in the host database in order to be able to call it. To do this, you must check the **Execute "On Host Database Event" method of the components** option on the Security page the Settings. + + +## Proteção dos componentes: compilação + +By default, all the project methods of a matrix project installed as a component are potentially visible from the host project. Em particular: + +- The shared project methods are found on the Methods Page of the Explorer and can be called in the methods of the host project. Seu conteúdo pode ser selecionado e copiado na área de vista prévia do Explorador. Também podem ser vistos no depurador. However, it's not possible to open them in the Method editor or modify them. +- The other project methods of the matrix project do not appear in the Explorer but they too can be viewed in the debugger of the host project. -Automatic mechanisms are operational: the XLIFF files found in the Resources folder of a component will be loaded by this component. +To protect the project methods of a component effectively, simply compile the matrix project and provide it in the form of a .4dz file. When a compiled matrix project is installed as a component: -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. +- The shared project methods are shown on the Methods Page of the Explorer and can be called in the methods of the host project. However, their contents will not appear in the preview area and in the debugger. +- The other project methods of the matrix project will never appear. -## On-line help for components -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: -- 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 diff --git a/website/translated_docs/pt/Concepts/data-types.md b/website/translated_docs/pt/Concepts/data-types.md index 8ac39a33e22ca4..ff4964dd811f7d 100644 --- a/website/translated_docs/pt/Concepts/data-types.md +++ b/website/translated_docs/pt/Concepts/data-types.md @@ -7,26 +7,25 @@ In 4D, data are handled according to their type in two places: database fields a 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` | - +| Data Types | Database support(1) | Language support | [`var` declaration](variables.md#using-the-var-keyword) | [`C_` or `ARRAY` declaration](variables.md#using-a-c_-directive) | +| ------------------------------------------ | ------------------- | -------------------- | ------------------------------------------------------- | ---------------------------------------------------------------- | +| [Alphanumeric](dt_string.md) | Yes | Converted to text | - | - | +| [Text](Concepts/dt_string.md) | Yes | Yes | `Text` | `C_TEXT`, `ARRAY TEXTO` | +| [Date](Concepts/dt_date.md) | Yes | Yes | `Date` | `C_DATE`, `ARRAY DATE` | +| [Time](Concepts/dt_time.md) | Yes | Yes | `Time` | `C_TIME`, `ARRAY TIME` | +| [Boolean](Concepts/dt_boolean.md) | Yes | Yes | `Boolean` | `C_BOOLEAN`, `ARRAY BOOLEAN` | +| [Integer](Concepts/dt_number.md) | Yes | Converted to longint | `Integer` | `ARRAY INTEGER` | +| [Longint](Concepts/dt_number.md) | Yes | Yes | `Integer` | `C_LONGINT`, `ARRAY LONGINT` | +| [Longint 64 bits](Concepts/dt_number.md) | Yes (SQL) | Converted to real | - | - | +| [Real](Concepts/dt_number.md) | Yes | Yes | `Real` | `C_REAL`, `ARRAY REAL` | +| [Undefined](Concepts/dt_null_undefined.md) | - | Yes | - | - | +| [Null](Concepts/dt_null_undefined.md) | - | Yes | - | - | +| [Pointer](Concepts/dt_pointer.md) | - | Yes | `Pointer` | `C_POINTER`, `ARRAY POINTER` | +| [Picture](Concepts/dt_picture.md) | Yes | Yes | `Picture` | `C_PICTURE`, `ARRAY PICTURE` | +| [BLOB](Concepts/dt_blob.md) | Yes | Yes | `Blob`, `4D.Blob` | `C_BLOB`, `ARRAY BLOB` | +| [Object](Concepts/dt_object.md) | Yes | Yes | `Object` | `C_OBJECT`, `ARRAY OBJECT` | +| [Collection](Concepts/dt_collection.md) | - | Yes | `Collection` | `C_COLLECTION` | +| [Variant](Concepts/dt_variant.md)(2) | - | Yes | `Variant` | `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. @@ -39,9 +38,9 @@ When variables are typed by means of a compiler directive, they receive a defaul 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: +- Local variables are set: - in interpreted mode: to zero - - in compiled mode, depending on the **Initialize local variables** option of the Database settings: + - 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". @@ -72,15 +71,14 @@ The following table lists the basic data types, the data types to which they can | 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 | | | | - +| 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 +**Note:** In addition to the data conversions listed in this table, more sophisticated data conversions can be obtained by combining operators and other commands. diff --git a/website/translated_docs/pt/Concepts/dt_blob.md b/website/translated_docs/pt/Concepts/dt_blob.md index 5db336561d1294..480a7c306360ca 100644 --- a/website/translated_docs/pt/Concepts/dt_blob.md +++ b/website/translated_docs/pt/Concepts/dt_blob.md @@ -3,64 +3,184 @@ 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. +A BLOB (Binary Large OBject) field, variable or expression is a contiguous series of bytes that can be treated as one whole object, or whose bytes can be addressed individually. -## Parameter passing, Pointers and function results +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. -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. +Like 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. -To pass a BLOB to your own methods, you can also define a pointer to the BLOB and pass the pointer as parameter. +## Blob Types + +Using the 4D language, there are two ways to handle a blob: + +- **as a scalar value**: a blob can be stored in a Blob variable or field and altered. +- **as an object (`4D.Blob`)**: a `4D.Blob` is a blob object. You can encapsulate a blob or part of it in a `4D.Blob` without altering the original blob. This method is called [boxing](https://en.wikipedia.org/wiki/Object_type_(object-oriented_programming)#Boxing). For more info on how to instantiate a `4D.Blob`, see [Blob Class](../API/BlobClass.md). + +Each blob type has its advantages. Use the following table to determine which one suits your needs: + +| | Blob | 4D.Blob | +| ------------------------------------ |:----:|:-------:| +| Alterable | Yes | No | +| Shareable in objects and collections | No | Yes | +| Passed by reference\* | No | Yes | +| Performance when accessing bytes | + | - | +| Maximum size | 2GB | Memory | + +\*Unlike the 4D commands designed to take a scalar blob as a parameter, passing a scalar blob to a method duplicates it in memory. When working with methods, using blob objects (`4D.Blob`) is more efficient, as they are passed by reference. + +> By default, 4D sets the maximum size of scalar blobs to 2GB, but this size limit may be lower depending on your OS and how much space is available. + +You cannot use operators on blobs. + +## Checking if a variable holds a scalar blob or a `4D.Blob` + +Use the [Value type](https://doc.4d.com/4dv19R/help/command/en/page1509.html) command to determine if a value is of type Blob or Object. To check that an object is a blob object (`4D.Blob`), use [OB instance of](https://doc.4d.com/4dv19R/help/command/en/page1731.html): + +```4d +var $myBlob: Blob +var $myBlobObject: 4D.Blob + +$type:= Value type($myblobObject) // 38 (object) +$is4DBlob:= OB Instance of($myblobObject; 4D.Blob) //True +``` + +## Passing blobs as parameters + +Scalar blobs and blob objects can be passed as parameters to 4D commands or plug-in routines that expect blob parameters. + +### Passing blobs and blob objects to 4D commands + +You can pass a scalar blob or a `4D.Blob` to any 4D command that takes a blob as a parameter: + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text( $myBlob ; UTF8 text without length ) +``` + +Some 4D commands alter the original blob, and thus do not support the `4D.Blob` type: + +- [DELETE FROM BLOB](https://doc.4d.com/4dv19/help/command/en/page560.html) +- [INSERT IN BLOB](https://doc.4d.com/4dv19/help/command/en/page559.html) +- [INTEGER TO BLOB](https://doc.4d.com/4dv19/help/command/en/page548.html) +- [LONGINT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page550.html) +- [REAL TO BLOB](https://doc.4d.com/4dv19/help/command/en/page552.html) +- [SET BLOB SIZE](https://doc.4d.com/4dv19/help/command/en/page606.html) +- [TEXT TO BLOB](https://doc.4d.com/4dv19/help/command/en/page554.html) +- [VARIABLE TO BLOB](https://doc.4d.com/4dv19/help/command/en/page532.html) +- [LIST TO BLOB](https://doc.4d.com/4dv19/help/command/en/page556.html) +- [SOAP DECLARATION](https://doc.4d.com/4dv19/help/command/en/page782.html) +- [WEB SERVICE SET PARAMETER](https://doc.4d.com/4dv19/help/command/en/page777.html) + +### Passing blobs and blob objects to methods + +You can pass blobs and blob objects (`4D.Blob`) to methods. Keep in mind that unlike blob objects, which are passed by reference, scalar blobs are duplicated in memory when passed to methods. + +### Passing a scalar blob by reference using a pointer + +To pass a scalar blob to your own methods without duplicating it in memory, define a pointer to the variable that stores it and pass the pointer as a parameter. **Examples:** ```4d - ` Declare a variable of type BLOB - C_BLOB(anyBlobVar) - ` The BLOB is passed as parameter to a 4D command - SET BLOB SIZE(anyBlobVar;1024*1024) - ` The BLOB is passed as parameter to an external routine - $errCode:=Do Something With This BLOB(anyBlobVar) - ` The BLOB is passed as a parameter to a method that returns a BLOB - C_BLOB(retrieveBlob) - retrieveBlob:=Fill_Blob(anyBlobVar) - ` A pointer to the BLOB is passed as parameter to a user method - COMPUTE BLOB(->anyBlobVar) +// Declare a variable of type Blob +var $myBlobVar: Blob +// Pass the blob as parameter to a 4D command + SET BLOB SIZE($myBlobVar;1024*1024) ``` -**Note for Plug-in developers:** A BLOB parameter is declared as “&O†(the letter “Oâ€, not the digit “0â€). +```4d +// Pass the blob as parameter to an external routine + $errCode:=Do Something With This blob($myBlobVar) +``` -## Assignment operator +```4d +// Pass the blob as a parameter to a method that returns a blob + var $retrieveBlob: Blob + retrieveBlob:=Fill_Blob($myBlobVar) +``` + +```4d +// Pass a pointer to the blob as a parameter to your own method, +COMPUTE BLOB(->$myBlobVar) +``` + +**Nota para desenvolvedores de plugins:** um parâmetro BLOB se declara como "&O" (a letra "O", não o número "0"). + +## Assigning a blob variable to another -You can assign BLOBs to each other. +You can assign a Blob variable to another: **Example:** ```4d - ` Declare two variables of type BLOB - C_BLOB(vBlobA;vBlobB) - ` Set the size of the first BLOB to 10K - SET BLOB SIZE(vBlobA;10*1024) - ` Assign the first BLOB to the second one - vBlobB:=vBlobA +// Declare two variables of type Blob + var $vBlobA; $vBlobB : Blob +// Set the size of the first blob to 10K + SET BLOB SIZE($vBlobA;10*1024) +// Assign the first blob to the second one + $vBlobB:=$vBlobA ``` -However, no operator can be applied to BLOBs. +## Automatic conversion of blob type + +4D automatically converts scalar blobs to blob objects, and vice versa, when they're assigned to each other. For example: + +```4d +// Create a variable of type Blob and an object variable +var $myBlob: Blob +var $myObject : Object + +// Assign that blob to a property of $myObject named "blob" +$myObject:=New object("blob"; $myBlob) + +// The blob stored in $myBlob is automatically converted to a 4D.Blob +$type:= OB Instance of($myObject.blob; 4D.Blob) //True + +// Conversion from 4D.Blob to Blob +$myBlob:= $myObject.blob +$type:= Value type($myBlob) // Blob +``` -## Addressing BLOB contents +> When converting a `4D.Blob` to a scalar blob, if the size of the `4D.Blob` exceeds the maximum size for scalar blobs, the resulting scalar blob is empty. For example, when the maximum size for scalar blobs is 2GB, if you convert a `4D.Blob` of 2.5GB to a scalar blob, you obtain an empty blob. -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: +## Modifying a scalar blob + +Unlike blob objects, scalar blobs can be altered. For example: + +```4d +var $myBlob : Blob +SET BLOB SIZE ($myBlob ; 16*1024) +``` + +## Individually accessing bytes in a blob + +#### Accessing a scalar blob's bytes + +You can access individual bytes of a scalar blob using curly brackets. Within a blob, bytes are numbered from 0 to N-1, where N is the size of the BLOB: ```4d - ` Declare a variable of type BLOB - C_BLOB(vBlob) - ` Set the size of the BLOB to 256 bytes - SET BLOB SIZE(vBlob;256) - ` The loop below initializes the 256 bytes of the BLOB to zero - For(vByte;0;BLOB size(vBlob)-1) - vBlob{vByte}:=0 + // Declare a variable of type Blob + var $vBlob : Blob + // Set the size of the blob to 256 bytes + SET BLOB SIZE($vBlob;256) + // The following code loops through the blob to set each byte to 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 +Since you can address all the bytes of a blob individually, you can store whatever you want in a Blob variable or field. + +#### Accessing a `4D.Blob`'s bytes + +Use square brackets to directly access a specific byte in a `4D.Blob` + +```4d +var $myBlob: 4D.Blob +CONVERT FROM TEXT("Hello, World!"; "UTF-8"; $myBlob) +$myText:= BLOB to text ( $myBlob ; UTF8 text without length ) +$byte:=$myBlob[5] +``` + +Since a `4D.Blob` cannot be altered, you can read the bytes of a `4D.Blob` using this syntax, but not modify them. diff --git a/website/translated_docs/pt/Concepts/dt_boolean.md b/website/translated_docs/pt/Concepts/dt_boolean.md index 0d6ab9c850c7ee..e4c9e5e15c7902 100644 --- a/website/translated_docs/pt/Concepts/dt_boolean.md +++ b/website/translated_docs/pt/Concepts/dt_boolean.md @@ -31,15 +31,14 @@ myBoolean:=(myButton=1) 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: -| 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 | - +| 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 | The following is the truth table for the AND logical operator: @@ -50,7 +49,6 @@ 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: | 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: ```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 79186bb90f8038..f145bf47a282ff 100644 --- a/website/translated_docs/pt/Concepts/dt_collection.md +++ b/website/translated_docs/pt/Concepts/dt_collection.md @@ -3,9 +3,9 @@ id: collection title: Collection --- -Collections are ordered lists of values of similar or mixed types (text, number, object, boolean, collection, or null). +Collections are ordered lists of values of similar or mixed types (text, number, date, object, boolean, collection, or null). -To manage Collection type variables you must use object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). +Collection type variables are managed using object notation (see [Syntax basics](Concepts/dt_object.md#syntax-basics)). To access a collection element, you need to pass the element number inside square brackets: @@ -13,7 +13,7 @@ To access a collection element, you need to pass the element number inside squar collectionRef[expression] ``` -You can pass any valid 4D expression which returns a positive integer in expression. Examples: +You can pass any valid 4D expression which returns a positive integer in *expression*. Examples: ```4d myCollection[5] //access to 6th element of the collection @@ -22,7 +22,7 @@ You can pass any valid 4D expression which returns a positive integer in express **Warning:** Collection elements are numbered from 0. -You can assign a value to a collection element or get a collection element value using object notation: +You can assign a value to a collection element or get a collection element value: ```4d myCol[10]:="My new element" @@ -32,7 +32,7 @@ You can assign a value to a collection element or get a collection element value 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: ```4d - C_COLLECTION(myCol) + var myCol : Collection myCol:=New collection("A";"B") myCol[5]:="Z" //myCol[2]=null @@ -47,7 +47,7 @@ Collections must have been initialized, for example using the `New collection` c Example: ```4d - C_COLLECTION($colVar) //creation of collection type 4D variable + var $colVar : Collection //creation of collection type 4D variable $colVar:=New collection //initialization of the collection and assignment to the 4D variable ``` @@ -55,16 +55,14 @@ Example: You can create two types of collections: -- 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. +- regular (non-shared) collections, using the [`New collection`](API/CollectionClass.md#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`](API/CollectionClass.md#new-shared-collection) command. These collections can be shared between processes, including preemptive threads. Access to these collections is controlled by [`Use...End use`](Concepts/shared.md#useend-use) structures. -## Collection methods +For more information, refer to the [Shared objects and collections](Concepts/shared.md) section. -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: +## Collection functions -> {$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. +4D collection references benefit from special class functions (sometimes named *member functions*). Collection functions are listed in the [Class API Reference](API/CollectionClass.md) section. For example: @@ -73,21 +71,23 @@ $newCol:=$col.copy() //deep copy of $col to $newCol $col.push(10;100) //add 10 and 100 to the collection ``` -Some methods return the original collection after modification, so that you can run the calls in a sequence: +Some functions return the original collection after modification, so that you can run the calls in a sequence: ```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: + +Several functions accept a _propertyPath_ as parameter. This parameter stands for: - 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". -**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: +**Warning:** When using functions and propertyPath parameters, you cannot use ".", "[ ]", or spaces in property names since it will prevent 4D from correctly parsing the path: ```4d $vmin:=$col.min("My.special.property") //undefined diff --git a/website/translated_docs/pt/Concepts/dt_date.md b/website/translated_docs/pt/Concepts/dt_date.md index cf3e890c6e6d19..c6abde3b471af4 100644 --- a/website/translated_docs/pt/Concepts/dt_date.md +++ b/website/translated_docs/pt/Concepts/dt_date.md @@ -3,14 +3,15 @@ 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. -**Note:** In the 4D Language Reference manual, Date parameters in command descriptions are denoted as Date, except when marked otherwise. +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. + +**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 -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: ```4d !1976-01-01! @@ -18,14 +19,14 @@ 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!*. +Uma data nula é especificada por _!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. +**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.. **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. +- 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. ## Date operators @@ -45,4 +46,4 @@ A null date is specified by *!00-00-00!*. | 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 +| | | | !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..f1246301ec2d54 100644 --- a/website/translated_docs/pt/Concepts/dt_null_undefined.md +++ b/website/translated_docs/pt/Concepts/dt_null_undefined.md @@ -3,11 +3,13 @@ id: null-undefined title: Null and Undefined --- +Null and Undefined are data types that handle cases where the value of an expression is not known. + ## 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 @@ -15,11 +17,11 @@ In the 4D language and for object field attributes, null values are managed thro ## Undefined -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 -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 +37,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..bc06230b8a7019 100644 --- a/website/translated_docs/pt/Concepts/dt_number.md +++ b/website/translated_docs/pt/Concepts/dt_number.md @@ -5,8 +5,8 @@ title: Number (Real, Longint, Integer) Number is a generic term that stands for: -- 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. +- 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). **Note:** Integer field values are automatically converted in Long integers when used in the 4D Language. @@ -15,6 +15,7 @@ You can assign any Number data type to another; 4D does the conversion, truncati **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. + ## Number literals A numeric literal constant is written as a real number. Here are some examples of numeric constants: @@ -59,7 +60,6 @@ Negative numbers are specified with the minus sign (-). For example: | Less than or equal to | Number <= Number | Boolean | 10 <= 11 | True | | | | | 11 <= 10 | False | - The modulo operator % divides the first number by the second number and returns a whole number remainder. Here are some examples: - 10 % 2 returns 0 because 10 is evenly divided by 2. @@ -67,9 +67,8 @@ The modulo operator % divides the first number by the second number and returns - 10.5 % 2 returns 0 because the remainder is not a whole number. **WARNING:** - - 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. +- The longint division operator \ returns significant values with integer numbers only. ### Precedence @@ -91,6 +90,7 @@ returns 23 because the expression (4 * 5) is evaluated first, because of the par 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. @@ -114,72 +114,35 @@ An expression that uses a bitwise operator returns a Long Integer value, except | 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 +| Operation | Description | +| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Bitwise AND | Each resulting bit is the logical AND of the bits in the two operands.

          Here is the logical AND table:

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

          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.

          Here is the logical OR table:

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

          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.

          Here is the logical XOR table:

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

          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.

          **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.

          **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 | diff --git a/website/translated_docs/pt/Concepts/dt_object.md b/website/translated_docs/pt/Concepts/dt_object.md index 0d5a81bb262439..a9b5ea5492bcb0 100644 --- a/website/translated_docs/pt/Concepts/dt_object.md +++ b/website/translated_docs/pt/Concepts/dt_object.md @@ -5,38 +5,38 @@ title: Object 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: -- A property name is always a text, for example "Name". +- Um nome de uma propriedade é sempre um texto, por exemplo "nome". It must follow [specific rules](identifiers.md#object-properties). - A property value can be of the following type: - - number (Real, Integer, etc.) - text - null - - Boolean + - 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(*) + - object(1) (objects can be nested on several levels) + - picture(2) - collection -(*)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". +(1)ORDA objects such as [entities](ORDA/dsMapping.md#entity) or [entity selections](ORDA/dsMapping.md#entity-selection) cannot be stored in **object fields**; however, they are fully supported in **object variables** in memory. -**Warning:** Keep in mind that attribute names differentiate between upper and lower case. +(2)When exposed as text in the debugger or exported to JSON, picture object properties print "[object Picture]". -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. +**Atenção:** lembre que os nomes de atributos diferenciam entre maiúsculas e minúsculas. -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: +You manage Object type variables, fields or expressions using the [object notation](dt_object.md#syntax-basics) or the classic commands available in the **Objects (Language)** theme. 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. -- 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...), +Cada valor de propriedade acessado através da notação de objeto é considerado uma expressão. You can use such values wherever 4D expressions are expected: + +- 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). ## Initialization -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. +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. Example: - ```4d C_OBJECT($obVar) //creation of an object type 4D variable $obVar:=New object //initialization of the object and assignment to the 4D variable @@ -44,23 +44,23 @@ Example: ### Regular or shared object -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. +- 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. +A notação de objetos pode ser utilizada para acessar aos valores das propriedades de objetos através de uma string de tokens. ### Object properties -With object notation, object properties can be accessed in two ways: +Com a notação de objetos, pode acessar às propriedades dos objetos de duas maneiras: - using a "dot" symbol: > object.propertyName Example: - ```4d employee.name:="Smith" ``` @@ -68,7 +68,6 @@ Example: - using a string within square brackets: > object["propertyName"] Examples: - ```4d $vName:=employee["name"] //or also: @@ -78,12 +77,10 @@ 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: - ```4d $vAge:=employee.children[2].age ``` - -Object notation is available on any language element that can contains or returns an object, i.e: +A notação de objetos está disponível em qualquer elemento da lenguagem que possa conter ou devolver um objeto, ou seja: - **Objects** themselves (stored in variables, fields, object properties, object arrays, or collection elements). Examples: @@ -94,9 +91,9 @@ Object notation is available on any language element that can contains or return $pop:=$aObjCountries{2}.population //object array $val:=$myCollection[3].subvalue //collection element ``` - - **4D commands** that return objects. Example: + ```4d $measures:=Get database measures.DB.tables ``` @@ -120,17 +117,15 @@ Object notation is available on any language element that can contains or return ### 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. +**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 +> pointerOnObject->propertyName - Access by name: - - > pointerOnObject->["propertyName"] +> pointerOnObject->["propertyName"] Example: @@ -145,18 +140,18 @@ Example: ### Null value -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 -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 `CLEAR VARIABLE` with them: @@ -197,7 +192,7 @@ 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: +- 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 @@ -215,31 +210,19 @@ Evaluating an object property can sometimes produce an undefined value. Typicall - Assigning an undefined value to a non existing object property does nothing. -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. For example: ```4d $myString:=Lowercase(String($o.a.b)) //make sure you get a string value even if undefined //to avoid errors in the code ``` -## 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): - -- 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. - -**Note:** - -- 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. ## Examples -Using object notation simplifies the 4D code while handling objects. Note however that the command-based notation is still fully supported. +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 +242,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 +253,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 +270,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..965814ec29924b 100644 --- a/website/translated_docs/pt/Concepts/dt_picture.md +++ b/website/translated_docs/pt/Concepts/dt_picture.md @@ -7,8 +7,8 @@ A Picture field, variable or expression can be any Windows or Macintosh picture. 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,15 +16,17 @@ 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 | @@ -39,7 +41,6 @@ Most of the [4D picture management commands](https://doc.4d.com/4Dv18/4D/18/Pict | Horizontal scaling | Picture *+ Number | Picture | Resize Picture horizontally by Number ratio | | Vertical scaling | Picture *| Number | Picture | Resize Picture vertically by Number ratio | - **Notes :** - 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. @@ -47,49 +48,40 @@ Most of the [4D picture management commands](https://doc.4d.com/4Dv18/4D/18/Pict - 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 - ```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..1bf5c2050c7e4b 100644 --- a/website/translated_docs/pt/Concepts/dt_pointer.md +++ b/website/translated_docs/pt/Concepts/dt_pointer.md @@ -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" @@ -77,7 +69,6 @@ $MyVar:="Goodbye" ## Pointer operators With: - ```4d ` vPtrA and vPtrB point to the same object vPtrA:=->anObject @@ -93,45 +84,32 @@ With: | Inequality | Pointer # Pointer | Boolean | 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: @@ -241,14 +201,13 @@ Here is an explanation of each line of the example: - 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. 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..02fc86146e07b6 100644 --- a/website/translated_docs/pt/Concepts/dt_string.md +++ b/website/translated_docs/pt/Concepts/dt_string.md @@ -21,7 +21,6 @@ A string literal is enclosed in double, straight quotation marks ("..."). Here a 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,7 +31,6 @@ 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 @@ -57,7 +55,6 @@ The following escape sequences can be used within strings: | | | | "Alpha Bravo" % "ravo" | False | | | Picture % String | Boolean | Picture_expr % "Mer" | True (*) | - (*) If the keyword "Mer" is associated with the picture stored in the picture expression (field or variable). ## String comparisons @@ -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. @@ -185,10 +178,11 @@ 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: @@ -196,6 +190,7 @@ will trigger the Runtime Error shown here: ### Example + The following project method capitalizes the first character of each word of the text received as parameter and returns the resulting capitalized text: ```4d @@ -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..9b000f0940b624 100644 --- a/website/translated_docs/pt/Concepts/dt_time.md +++ b/website/translated_docs/pt/Concepts/dt_time.md @@ -3,19 +3,21 @@ id: time title: Time --- -- 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. -**Note:** In the 4D Language Reference manual, Time parameters in command descriptions are denoted as Time, except when marked otherwise. +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. ## Time literals -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 @@ -23,9 +25,9 @@ Here are some examples of time literals: ?13:01:59? ` 1 pm, 1 minute, and 59 seconds ``` -A null time is specified by ?00:00:00? +Uma hora nula se escreve ?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. +**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. ## Time operators @@ -53,12 +55,11 @@ A null time is specified by ?00:00:00? | 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`. +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`. -You can combine expressions of the time and number types using the `Time` or `Current time` functions: +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 @@ -68,7 +69,7 @@ $vlSeconds:=Current time+3600 $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 @@ -77,11 +78,12 @@ The second line could be written in a simpler way: ### Example 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 +``` + diff --git a/website/translated_docs/pt/Concepts/dt_variant.md b/website/translated_docs/pt/Concepts/dt_variant.md index 4895ad0482a0a6..4f26667396cb4e 100644 --- a/website/translated_docs/pt/Concepts/dt_variant.md +++ b/website/translated_docs/pt/Concepts/dt_variant.md @@ -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. \ No newline at end of file diff --git a/website/translated_docs/pt/Concepts/error-handling.md b/website/translated_docs/pt/Concepts/error-handling.md index 09da737d7955ac..f2dd669ff2d8ef 100644 --- a/website/translated_docs/pt/Concepts/error-handling.md +++ b/website/translated_docs/pt/Concepts/error-handling.md @@ -8,10 +8,17 @@ Error handling is the process of anticipating and responding to errors that migh Error handling meets two main needs: - 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. - +- 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. > 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. + +## Error or status + +Many 4D class functions, such as `entity.save()` or `transporter.send()`, return a *status* object. This object is used to store "predictable" errors in the runtime context, e.g. invalid password, locked entity, etc., that do not stop program execution. This category of errors can be handled by regular code. + +Other "unpredictable" errors include disk write error, network failure, or in general any unexpected interruption. This category of errors generates exceptions and needs to be handled through an error-handling method. + + ## Installing an error-handling method In 4D, all errors can be catched and handled in a specific project method, the **error-handling** (or **error-catching**) method. @@ -23,18 +30,11 @@ ON ERR CALL("IO_ERRORS") //Installs the error-handling method ``` To stop catching errors and give back hand to 4D, call `ON ERR CALL` with an empty string: - ```4d ON ERR CALL("") //gives back control to 4D ``` -### Scope and components - -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. - -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. - -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: +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 generic code because it enables you to temporarily change and then restore the error-catching method: ```4d $methCurrent:=Method called on error @@ -46,20 +46,29 @@ The `Method called on error` command allows to know the name of the method insta ``` +### Scope and components + +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. + +An error-handling method installed by the `ON ERR CALL` command only applies to the running application. In the case of an error generated by a **component**, the `ON ERR CALL` error-handling method of the host application is not called, and vice versa. + + ### Handling errors within the method Within the custom error method, you have access to several information that will help you identifying the error: - 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. + - `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 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 @@ -90,4 +99,6 @@ 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 5fa846b66ed35a..d91514dc381e4d 100644 --- a/website/translated_docs/pt/Concepts/flow-control.md +++ b/website/translated_docs/pt/Concepts/flow-control.md @@ -7,11 +7,10 @@ Regardless of the simplicity or complexity of a method, you will always use one - **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: +- **[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. + - `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. -**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..95247a7973d649 100644 --- a/website/translated_docs/pt/Concepts/identifiers.md +++ b/website/translated_docs/pt/Concepts/identifiers.md @@ -3,190 +3,45 @@ id: identifiers title: Identifiers --- -This section describes the conventions and rules for naming various elements in the 4D language (variables, tables, objects, forms, etc.). +This section describes the conventions and rules for naming various elements in the 4D language (variables, object properties, tables, forms, etc.). -## Basic Rules +> If non-Roman characters are used in the names of the identifiers, their maximum length may be smaller. -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). -- 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. - -### Additional rules for object property and ORDA names - -- Space characters are not allowed. -- Periods (".") and brackets ("[ ]") are not allowed. -- Names are case sensitive. - -### Additional rules for SQL - -- Only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted -- Names must not include any SQL keywords (command, attribute, etc.). - -**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 - -You designate a table by placing its name between brackets: [...]. A table name can contain up to 31 characters. - -Examples: - -```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. - -Examples: - -```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. - -The name of an interprocess variable can be up to 31 characters, not including the <> symbols. - -Examples: - -```4d -<>vlProcessID:=Current process -<>vsKey:=Char(KeyCode) -If(<>vtName#"") -``` - -## Process Variables - -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: - -```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. - -Examples: - -```4d -For($vlRecord;1;100) -If($vsTempVar="No") -$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. - -### Interprocess Arrays - -The name of an interprocess array is preceded by the symbols (<>) — a “less than†sign followed by a “greater than†sign. - -An interprocess array name can contain up to 31 characters, not including the <> symbols. - -Examples: - -```4d -ARRAY TEXT(<>atSubjects;Records in table([Topics])) -SORT ARRAY(<>asKeywords;>) -ARRAY INTEGER(<>aiBigArray;10000) -``` +Array names follow the same rules as [variables](#variables). -### 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. +## Classes -Examples: - -```4d -ARRAY TEXT(atSubjects;Records in table([Topics])) -SORT ARRAY(asKeywords;>) -ARRAY INTEGER(aiBigArray;10000) -``` +The name of a class can contain up to 31 characters. -### Local Arrays +A class name must be compliant with standard [property naming rules](#object-properties) for dot notation. -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. +> Giving the same name to a class and a [database table](#tables) is not recommended, in order to prevent any conflict. -Examples: -```4d -ARRAY TEXT($atSubjects;Records in table([Topics])) -SORT ARRAY($asKeywords;>) -ARRAY INTEGER($aiBigArray;10000) -``` -### Elements of arrays +## Funções -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. +Function names must be compliant with standard [property naming rules](#object-properties) for dot notation. -Examples: +> **Tip:** Starting the function name with an underscore character ("_") will exclude the function from the autocompletion features in the 4D code editor. -```4d - //Addressing an element of an interprocess array -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") -atSubjects{$vlElem}:=[Topics]Subject -$viNextValue:=aiBigArray{Size of array(aiBigArray)} - - //Addressing an element of a local array -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. +## Object properties -Examples: +The name of an object property (also called object *attribute*) can contain up to 255 characters. -```4d - //Addressing an element of a two-dimensional interprocess array -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") -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") -$atSubjects{10}{$vlElem}:=[Topics]Subject -$viNextValue:=$aiBigArray{$vlSet}{Size of array($aiBigArray{$vlSet})} -``` +Object properties can reference scalar values, ORDA elements, class functions, other objects, etc. Whatever their nature, object property names must follow the following rules **if you want to use the [dot notation](dt_object.md#object-properties)**: -## Object attributes +- A property name must begin with a letter, an underscore, or a dollar "$". +- Thereafter, the name can include any letter, digit, the underscore character ("_"), or the dollar character ("$"). +- Property names are case sensitive. -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: @@ -195,37 +50,31 @@ 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). +> If you use **string notation** within square brackets, property names can contain any characters (ex: `myObject["1. First property"]`). + +See also [ECMA Script standard](https://www.ecma-international.org/ecma-262/5.1/#sec-7.6). -## Forms +## Parameters -You designate a form by using a string expression that represents its name. A form name can contain up to 31 characters. +Parameter names must start with a `$` character and follow the same rules as [variable names](#variables). Examples: ```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. - -Example: +Function getArea($width : Integer; $height : Integer)-> $area : Integer -```4d -OBJECT SET FONT(*;"Binfo";"Times") +#DECLARE ($i : Integer ; $param : Date) -> $myResult : Object ``` -**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. -## 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. +The name of a project method name contain up to 31 characters. -**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. +- A project method name must begin with a letter, a digit, or an underscore +- Thereafter, the name can include any letter or digit, the underscore character ("_"), or the space character. +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Project method names are case insensitive. Examples: @@ -235,189 +84,95 @@ 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. +**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 uppercase characters for naming your methods; however if a method returns a value, capitalize the first character of its name. By doing so, when you reopen a project 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: + > 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 plug-in commands, expect the name of a method as a string when a method parameter is passed. Examples: ```4d - //This command expects a method (function) or formula + //Este comando espera um método (função) ou uma fórmula QUERY BY FORMULA([aTable];Special query) - //This command expects a method (procedure) or statement + //Este comando espera um método (procedimento) ou uma instrução APPLY TO SELECTION([Employees];INCREASE SALARIES) - //But this command expects a method name + //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. - -Inside a function, the $0 local variable contains the value to be returned. - -Examples: - -```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 -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. - -Examples: - -```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: +## Tables and Fields -- Client sets +You designate a table by placing its name between brackets: \[...]. You designate a field by first specifying the table to which it belongs (the field name immediately follows the table name). -### Interprocess Sets +A table name and field name can contain up to 31 characters. -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. +- A table or field name must begin with a letter, an underscore, or a dollar ("$") +- Depois disso, o nome pode incluir caracteres alfabéticos, numéricos, o caractere espaço e o caractere de sublinhado/traço baixo ("_") . +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Additional rules must be respected when the database must be handled via SQL: only the characters _0123456789abcdefghijklmnopqrstuvwxyz are accepted, and the name must not include any SQL keywords (command, attribute, etc.). -An interprocess set name can contain up to 255 characters, not including the <> symbols. - -### Process Sets - -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. - -### Client Sets - -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. - -**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. Examples: ```4d - //Interprocess sets -USE SET("<>Deleted Records") -CREATE SET([Customers];"<>Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Process sets -USE SET("Deleted Records") -CREATE SET([Customers];"Customer Orders") -If(Records in set("<>Selection"+String($i))>0) - //Client sets -USE SET("$Deleted Records") -CREATE SET([Customers];"$Customer Orders") -If(Records in set("$Selection"+String($i))>0) -``` - -## Named Selections - -From the scope point of view, there are two types of named selections: +FORM SET INPUT([Clients];"Entry") +ADD RECORD([Letters]) +[Orders]Total:=Sum([Line]Amount) +QUERY([Clients];[Clients]Name="Smith") +[Letters]Text:=Capitalize text([Letters]Text) -- Interprocess named selections -- Process named selections. +``` -### Interprocess Named Selections +> Giving the same name to a table and a [class](#classes) is not recommended, in order to prevent any conflict. -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. +## Variables -An interprocess named selection name can contain up to 255 characters, not including the <> symbols. +The name of a variable can be up to 31 characters, not including the scope symbols ($ or <>). -### Process Named Selections +- A variable name must begin with a letter, an underscore, or a dollar ("$") for [parameters](parameters.md) and [local variables](variables.md#local-variables), or "<>" for [interprocess variables](variables.md#interprocess-variables). +- A digit as first character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Thereafter, the name can include any letter or digit, and the underscore character ("_"). +- Space character is allowed but not recommended, and is not supported by the [`var` declaration syntax](variables.md#using-the-var-keyword). +- Do not use reserved names, i.e. 4D command names (`Date`, `Time`, etc), keywords (`If`, `For`, etc.), or constant names (`Euro`, `Black`, `Friday`, etc.). +- Variable names are case insensitive. -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: ```4d - //Interprocess Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") - //Process Named Selection -USE NAMED SELECTION([Customers];"<>ByZipcode") +For($vlRecord;1;100) //local variable +$vsMyString:="Hello there" //local variable +var $vName; $vJob : Text //local variales +If(bValidate=1) //process variable +<>vlProcessID:=Current process() //interprocess variable ``` -## Processes - -In the single-user version, or in Client/Server on the Client side, there are two types of processes: +## Other names -- Global processes -- Local processes. +In the 4D language, several elements have their names handled as strings: **forms**, **form objects**, **named selections**, **processes**, **sets**, **menu bars**, etc. -### Global Processes +Such string names can contain up to 255 characters, not including the "$" or "<>" characters (if any). -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. - -### Local Processes - -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. +- String names can contain any characters. +- String names are case insensitive. Examples: ```4d +DIALOG([Storage];"Note box"+String($vlStage)) +OBJECT SET FONT(*;"Binfo";"Times") +USE NAMED SELECTION([Customers];"Closed")//Process Named Selection +USE NAMED SELECTION([Customers];"<>ByZipcode") //Interprocess Named Selection //Starting the global process "Add Customers" $vlProcessID:=New process("P_ADD_CUSTOMERS";48*1024;"Add Customers") //Starting the local process "$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. +CREATE SET([Customers];"Customer Orders")//Process set +USE SET("<>Deleted Records") //Interprocess set +If(Records in set("$Selection"+String($i))>0) //Client set -| 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 diff --git a/website/translated_docs/pt/Concepts/interpreted.md b/website/translated_docs/pt/Concepts/interpreted.md index 9a015e7355cf20..523905cd50ff31 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. -- **Preemptive mode**: only compiled code can be executed in preemptive processes. +- **Speed**: Your application can run from 3 to 1,000 times faster. +- **Code checking**: Your application is scanned for the consistency of code. Both logical and syntactical conflicts are detected. +- **Protection**: Once your application is compiled, you can delete the interpreted code. Then, the compiled application 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 applications can also be transformed into stand-alone applications (.EXE files) with their own icon. +- **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. +Compiler directives are not required for uncompiled applications. The interpreter automatically types each variable according to how it is used in each statement, and a variable can be freely retyped throughout the application project. -Because of this flexibility, it is possible that a database can perform differently in interpreted and compiled modes. +Because of this flexibility, it is possible that an application can perform differently in interpreted and compiled modes. For example, if you write: @@ -44,8 +42,7 @@ For example, if you write: C_LONGINT(MyInt) ``` -and elsewhere in the database, you write: - +and elsewhere in the project, you write: ```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. +The order in which the two statements appear is irrelevant to the compiler, because it first scans the entire project 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 project so that your compiler directives are executed prior to any statements containing declared variables. + ## Using pointers to avoid retyping @@ -90,7 +88,6 @@ $0:=Length($result) ``` Then this method can be called: - ```4d $var1:="my text" $var2:=5.3 @@ -100,4 +97,4 @@ $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 +``` diff --git a/website/translated_docs/pt/Concepts/methods.md b/website/translated_docs/pt/Concepts/methods.md index 46f38a2651ceeb..9ead3a558457c0 100644 --- a/website/translated_docs/pt/Concepts/methods.md +++ b/website/translated_docs/pt/Concepts/methods.md @@ -4,35 +4,41 @@ title: Methods --- -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. 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. 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). -- **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. +The maximum size of a method is limited to 2 GB of text or 32,000 lines of code. -- **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. +## Method Types -**Note:** 4D also provides specific methods that are automatically executed depending on database or form events. See [Specialized methods](#specialized-methods). +In the 4D Language, there are several categories of methods. The category depends on how they can be called: -## Calling Project Methods +| Type | Calling context | Accepts parameters | Description | +| -------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Project method** | On demand, when the project method name is called (see [Calling project methods](#calling-project-methods)) | Yes | Can contain any code to execute any custom actions. Once a project method is created, it becomes part of the language of the project. | +| **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 | + + +> The 4D Language also supports **Class functions**, that can be called in the context of an object instance. Class functions can be built-in (*e.g.* `collection.orderBy()` or `entity.save()`), or [created by the 4D developer](classes.md#class-function). + + +## 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 +- Subroutine +- Object formula - Menu method - Process method - Event or Error catching method -### Subroutines and functions +### Subroutines 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. +When you create a project method, it becomes part of the language of the project in which you create it. You can then call the project method from another method (project method, object method...) in the same way that you call 4D’s built-in commands. A project method used in this way is called a subroutine. You use subroutines to: @@ -41,7 +47,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: +For example, let’s say you have a project of customers. As you customize the project, 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: ```4d // Look for a customer @@ -52,30 +58,31 @@ 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 there are ten places in your project 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 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: +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: ```4d - MODIFY CUSTOMER + 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. 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. -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. +If you need to change your method of finding customers in this example project, you will need to change only one method, not ten. 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. Consider the following code from a checking account project: ```4d - FIND CLEARED CHECKS ` Find the cleared checks - RECONCILE ACCOUNT ` Reconcile the account - PRINT CHECK BOOK REPORT ` Print a checkbook report + FIND_CLEARED_CHECKS //Find the cleared checks + RECONCILE_ACCOUNT //Reconcile the account + PRINT_CHECK_BOOK_REPORT //Print a checkbook report ``` -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. +Even for someone who doesn’t know the project, 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. -### Methods attached to objects + +### Object formulas You can encapsulate your project methods in **formula** objects and call them from your objects. @@ -139,6 +146,8 @@ $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,24 +155,23 @@ $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. By creating custom menus with menu methods that perform specific actions, you create custom interfaces for your desktop applications. 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. Using custom menus, you can automate task sequences and thus provide more guidance to users of the application. + ### 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: @@ -173,7 +181,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` @@ -239,14 +246,3 @@ Some typical uses of recursion in 4D are: - Browsing documents and folders on your disk, using the commands `FOLDER LIST` and `DOCUMENT LIST`. A folder may contain folders and documents, the subfolders can themselves contain folders and documents, and so on. **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: - -| Type | Calling context | Accepts parameters | Description | -| -------------------------------- | ---------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **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 diff --git a/website/translated_docs/pt/Concepts/parameters.md b/website/translated_docs/pt/Concepts/parameters.md index 080aaae3402f86..55609a0b6138fb 100644 --- a/website/translated_docs/pt/Concepts/parameters.md +++ b/website/translated_docs/pt/Concepts/parameters.md @@ -4,86 +4,190 @@ title: Parameters --- -## Using parameters +You'll often find that you need to pass data to your methods and functions. This is easily done with parameters. -You'll often find that you need to pass data to your methods. This is easily done with parameters. +## Visão Geral -**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: +**Parameters** (or **arguments**) are pieces of data that a method or a class function 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: ```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: +Parameters are passed to methods or class functions in the same way. For example, if a class function named `getArea()` accepts two parameters, a call to the class function might look like this: + +``` +$area:=$o.getArea(50;100) +``` + +Or, if a project method named `DO_SOMETHING` accepts three parameters, a call to the method might look like this: ```4d -DO SOMETHING(WithThis;AndThat;ThisWay) +DO_SOMETHING($WithThis;$AndThat;$ThisWay) ``` -The parameters are separated by semicolons (;). Their value is evaluated at the moment of the call. +The input parameters are separated by semicolons (;). -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. +Os mesmos princípios são usados quando métodos forem executados através de comandos dedicados, por exemplo: ```4d - //Code of the method DO SOMETHING - //Assuming all parameters are of the text type - 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 +EXECUTE METHOD IN SUBFORM("Cal2";"SetCalendarDate";*;!05/05/20!) +//pass the !05/05/20! date as parameter to the SetCalendarDate +//in the context of a subform +``` + +Data can also be **returned** from methods and class functions. For example, the following line is a statement that uses the built-in command, `Length`, to return the length of a 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?") ``` -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`). +Qualquer subrotina pode retornar um valor. Only one single output parameter can be declared per method or class function. -The same principles are used when methods are executed through dedicated commands, for example: +Input and output values are [evaluated](#values-or-references) at the moment of the call and copied into local variables within the called class function or method. Two syntaxes are proposed to declare variable parameters in the called code: + +- [named variables](#named-parameters) (recommended in most cases) or +- [sequentially numbered variables](#sequential-parameters). + + +Both [named](#named-parameters) and [sequential](#sequential-parameters) syntaxes can be mixed with no restriction to declare parameters. For example: ```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 +Function add($x : Integer) + var $0;$2 : Integer + $0:=$x+$2 ``` -**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). -### Supported expressions -You can use any [expression](Concepts/quick-tour.md#expression-types) as parameter, except: -- tables -- arrays +## Parâmetros com nomes + +Inside called methods or class functions, parameter values are assigned to local variables. You can declare parameters using a **parameter name** along with a **parameter type**, separated by colon. + +- For class functions, parameters are declared along with the `Function` keyword. +- For methods (project methods, form object methods, database methods, and triggers), parameters are declared using the `#DECLARE` keyword at the beginning of the method code. + +Examples: + +```4d +Function getArea($width : Integer; $height : Integer) -> $area : Integer +``` + +```4d + //myProjectMethod +#DECLARE ($i : Integer) -> $myResult : Object +``` -Tables or array expressions can only be passed [as reference using a pointer](Concepts/dt_pointer.md#pointers-as-parameters-to-methods). -## Functions +The following rules apply: -Data can be returned from methods. A method that returns a value is called a function. +- The declaration line must be the first line of the method or function code, otherwise an error is displayed (only comments or line breaks can precede the declaration). +- Parameter names must start with a `$` character and be compliant with [property naming rules](dt_object.md#object-property-identifiers). +- Multiple parameters (and types) are separated by semicolons (;). +- Multiline syntaxes are supported (using "\\" character). -4D or 4D Plug-in commands that return a value are also called functions. -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: +For example, when you call a `getArea()` function with two parameters: ```4d -MyLength:=Length("How did I get here?") +$area:=$o.getArea(50;100) +``` + +In the class function code, the value of each parameter is copied into the corresponding declared parameter: + +```4d +// Class: Polygon +Function getArea($width : Integer; $height : Integer)-> $area : Integer + $area:=$width*$height +``` +> If the type is not defined, the parameter will be defined as [`Variant`](dt_variant.md). + +All 4D method kinds support the `#DECLARE` keyword, including database methods. For example, in the `On Web Authentication` database method, you can declare named parameters: + +```4d + // On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean +$entitySelection:=ds.User.query("login=:1"; $user) +// Check hash password... +``` + +### Returned value + +You declare the return parameter of a function by adding an arrow (->) and the parameter definition after the input parameter(s) list. For example: + +```4d +Function add($x : Variant; $y : Integer) -> $result : Integer ``` -Any subroutine can return a value. The value to be returned is put into the local variable `$0`. +You can also declare the return parameter only by adding `: type`, in which case it will automatically be available through `$0` ([see sequential syntax below](#returned-value-1)). For example: + +```4d +Function add($x : Variant; $y : Integer): Integer + $0:=$x+$y +``` -For example, the following function, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: + +### Supported data types + +With named parameters, you can use the same data types as those which are [supported by the `var` keyword](variables.md#using-the-var-keyword), including class objects. For example: + +```4d +Function saveToFile($entity : cs.ShapesEntity; $file : 4D.File) +``` + + + + + +## Sequential parameters + +As an alternative to [named parameters](#named-parameters) syntax, you can declare parameters using sequentially numbered variables: **$1**, **$2**, **$3**, and so on. A numeração das variáveis locais representam a ordem dos parâmetros. + +> Although this syntax is supported by class functions, it is recommended to use [named parameters](#named-parameters) syntax in this case. + +For example, when you call a `DO_SOMETHING` project method with three parameters: + +```4d +DO_SOMETHING($WithThis;$AndThat;$ThisWay) +``` + +In the method code, the value of each parameter is automatically copied into $1, $2, $3 variables: + +```4d + //Code of the method DO_SOMETHING + //Assuming all parameters are of the text type + 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 +``` + + +### Returned value + +The value to be returned is automatically put into the local variable `$0`. + + +For example, the following method, called `Uppercase4`, returns a string with the first four characters of the string passed to it in uppercase: ```4d $0:=Uppercase(Substring($1;1;4))+Substring($1;5) ``` -The following is an example that uses the Uppercase4 function: +The following is an example that uses the Uppercase4 method: ```4d -NewPhrase:=Uppercase4("This is good.") +$NewPhrase:=Uppercase4("This is good.") ``` -In this example, the variable *NewPhrase* gets “THIS is good.†+In this example, the variable *$NewPhrase* gets “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, you can write: +The returned value, `$0`, is a local variable within the subroutine. Pode ser usado como tal dentro da subrotina. For example, you can write: ```4d // Do_something @@ -91,36 +195,109 @@ $0:=Uppercase($1) ALERT($0) ``` -In this example, `$0` is 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. +In this example, `$0` is first assigned the value of `$1`, then used as parameter to the `ALERT` command. 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. + + +### Supported data types + +You can use any [expression](quick-tour.md#expression-types) as sequential parameter, except: + +- tabelas +- arrays -## Declaring parameters +Tables or array expressions can only be passed [as reference using a pointer](dt_pointer.md#pointers-as-parameters-to-methods). -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. +## Parameter indirection (${N}) -In the following example, the `OneMethodAmongOthers` project method declares three parameters: +4D project methods accept a variable number of parameters. You can address those parameters with a `For...End for` loop, the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command and the **parameter indirection syntax**. Within the method, an indirection address is formatted `${N}`, where `N` is a numeric expression. `${N}` is called a **generic parameter**. + + + +### Using generic parameters + +For example, consider a method that adds values and returns the sum formatted according to a format that is passed as a parameter. 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. + +Here is the method, named `MySum`: ```4d - // OneMethodAmongOthers Project Method - // OneMethodAmongOthers ( Real ; Date { ; Long } ) - // OneMethodAmongOthers ( Amount ; Date { ; Ratio } ) + #DECLARE($format : Text) -> $result : Text + $sum:=0 + For($i;2;Count parameters) + $sum:=$sum+${$i} + End for + $result:=String($sum;$format) +``` + +The method's parameters must be passed in the correct order, first the format and then a variable number of values: - 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 +```4d + Result:=MySum("##0.00";125,2;33,5;24) //"182.70" + Result:=MySum("000";1;2;200) //"203" ``` -In the following example, the `Capitalize` project method accepts a text parameter and returns a text result: +Note that even if you declared 0, 1, or more parameters in the method, you can always pass the number of parameters that you want. Parameters are all available within the called method through the `${N}` syntax and extra parameters type is [Variant](dt_variant.md) by default (you can declare them using a [compiler directive](#declaring-generic-parameters)). You just need to make sure parameters exist, thanks to the [`Count parameters`](https://doc.4d.com/4dv19/help/command/en/page259.html) command. For example: ```4d - // Capitalize Project Method - // Capitalize ( Text ) -> Text - // Capitalize ( Source string ) -> Capitalized string +//foo method +#DECLARE($p1: Text;$p2 : Text; $p3 : Date) +For($i;1;Count parameters) + ALERT("param "+String($i)+" = "+String(${$i})) +End for +``` + +This method can be called: + +```4d +foo("hello";"world";!01/01/2021!;42;?12:00:00?) //extra parameters are passed +``` + +> 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. + + +### 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. Non-declared generic parameters automatically get the [Variant](dt_variant.md) type. + +To declare generic parameters, you use a compiler directive to which you pass ${N} as a parameter, where N specifies the first generic parameter. + +```4d + C_TEXT(${4}) +``` + +> Declaring generic parameters can only be done with the [sequential syntax](#sequential-parameters). + +This command means that starting with the fourth parameter (included), the method can receive a variable number of parameters of text type. $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. Thus, it will be of the data type text, even if for you it was, for instance, of the data type Real. + +> The number in the declaration has to be a constant and not a variable. + + + + + +## Declaring parameters for compiled mode + +Even if it is not mandatory in [interpreted mode](interpreted.md), you must declare each parameter in the called methods or functions to prevent any trouble. + +When using the [named variable syntax](#named-parameters), parameters are automatically declared through the `#DECLARE` keyword or `Function` prototype. For example: + +```4d +Function add($x : Variant; $y : Integer)-> $result : Integer + // all parameters are declared with their type +``` + + +When using the [sequential variable syntax](#sequential-parameters), you need to make sure all parameters are properly declared. No exemplo abaixo, o método projeto `Capitalize` aceita um parâmetro texto e devolve um resultado texto: + +```4d + // 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. For example: ```4d C_TEXT($string) @@ -130,7 +307,7 @@ 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 @@ -140,26 +317,27 @@ 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: - -```4d +> For compiled mode, you can group all local variable parameters for project methods in a specific method with a name starting with "Compiler". Dentro deste método, pode pré-declarar os parâmetros de cada método, por exemplo: +```4d + // Compiler_method C_REAL(OneMethodAmongOthers;$1) ``` +See [Interpreted and compiled modes](interpreted.md) page for more information. -See [Interpreted and compiled modes](Concepts/interpreted.md) page for more information. - -Parameter declaration is also mandatory in the following contexts (these contexts do not support declaration in a "Compiler" method): +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"): -- 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): +- Database methods - For example, the `On Web Connection Database Method` receives six parameters, $1 to $6, of the data type Text. 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) ``` -- 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. +> You can also use [named parameters](#named-parameters) with the `#DECLARE` keyword. + +- 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. Entretanto, se quiser declará-lo, deve fazer isso no próprio trigger. -- 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 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: +- 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. 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. For example: ```4d C_LONGINT($0) @@ -173,131 +351,87 @@ C_TEXT($1;$2;$3;$4;$5;$6) End if ``` -## Values or references -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: -```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) +## Wrong parameter type - //Here is the code of the method 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`. - -There are two ways to make the method `DO_SOMETHING` change the value of the field: - -1. Rather than passing the field to the method, you pass a pointer to it, so you would write: +Calling a parameter with an wrong type is an [error](error-handling.md) that prevents correct execution. For example, if you write the following methods: ```4d - //Here is some code from the method MY_METHOD - DO_SOMETHING(->[People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Last Name) - - //Here the code of the method DO_SOMETHING - $1->:=Uppercase($1->) - ALERT($1->) +// method1 +#DECLARE($value : Text) ``` -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". - -2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: - ```4d - //Here is some code from the method MY METHOD - [People]Name:=DO_SOMETHING([People]Name) //Let's say [People]Name value is "williams" - ALERT([People]Name) - - //Here the code of the method DO SOMETHING - $0:=Uppercase($1) - ALERT($0) +// method2 +method1(42) //wrong type, text expected ``` -This second technique of returning a value by a subroutine is called “using a function.†This is described in the [Functions](#functions) paragraph. +This case is handled by 4D depending on the context: -### Particular cases: objects and collections +- in [compiled projects](interpreted.md), an error is generated at the compilation step whenever possible. Otherwise, an error is generated when the method is called. +- in interpreted projects: + + if the parameter was declared using the [named syntax](#named-parameters) (`#DECLARE` or `Function`), an error is generated when the method is called. + + if the parameter was declared using the [sequential syntax](#sequential-parameters) (`C_XXX`), no error is generated, the called method receives an empty value of the expected type. -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*). -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. -For example, consider the `CreatePerson` method that creates an object and sends it as a parameter: -```4d - //CreatePerson - C_OBJECT($person) - $person:=New object("Name";"Smith";"Age";40) - ChangeAge($person) - ALERT(String($person.Age)) -``` -The `ChangeAge` method adds 10 to the Age attribute of the received object +## Input/Output variables -```4d - //ChangeAge - C_OBJECT($1) - $1.Age:=$1.Age+10 - ALERT(String($1.Age)) -``` +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`). -When you execute the `CreatePerson` method, both alert boxes will read "50" since the same object reference is handled by both methods. -**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 +## Using object properties as named parameters -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) + var $person : Object $person:=New object("Name";"Smith";"Age";40) ChangeAge($person) ALERT(String($person.Age)) ``` -In the `ChangeAge` method you can write: +No método `ChangeAge` pode escrever: ```4d //ChangeAge - C_OBJECT($1;$para) + var $1; $para : Object $para:=$1 $para.Age:=$para.Age+10 ALERT($para.Name+" is "+String($para.Age)+" years old.") ``` -This provides a powerful way to define [optional parameters](#optional-parameters) (see also below). To handle missing parameters, you can either: +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. -- check if all expected parameters are provided by comparing them to the `Null` value, or -- preset parameter values, or -- use them as empty values. - -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) + var $1; $para : Object $para:=$1 $para.Age:=Num($para.Age)+10 ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` +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) +var $1;$para : Object $para:=$1 If ($para.toAdd=Null) $para.toAdd:=10 @@ -306,111 +440,143 @@ $para.Age:=Num($para.Age)+$para.toAdd ALERT(String($para.Name)+" is "+String($para.Age)+" years old.") ``` -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. +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. + +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 parâmetros +ALERT("Time is over") //1 parâmetro +``` + +4D methods and functions also accept such optional parameters. The issue with optional parameters is how to handle the case where some of them are missing in the called code. By default, if you call a method or function with less parameters than declared, missing parameters are processed as default values in the called code, [according to their type](data-types.md#default-values). For example: + +```4d +// "concate" function of myClass +Function concate ($param1 : Text ; $param2 : Text)->$result : Text +$result:=$param1+" "+$param2 +``` ```4d -ALERT("Are you sure?";"Yes I am") //2 parameters -ALERT("Time is over") //1 parameter + // Calling method + $class:=cs.myClass.new() + $class.concate("Hello") // "Hello " + $class.concate() // Displays " " ``` -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. -> 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. +> When optional parameters are needed in your methods, you might also consider using [object properties as named parameters](#using-objects-properties-as-named-parameters) which provide a flexible way to handle variable numbers of parameters. -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 // APPEND TEXT ( Text { ; Text { ; Object } } ) // APPEND TEXT ( Message { ; Path { ; 4DWPArea } } ) - C_TEXT($1;$2) - C_OBJECT($3) + Method($message : Text; $path : Text; $wpArea : Object) - ALERT($1) + ALERT($message) If(Count parameters>=3) - WP SET TEXT($3;$1;wk append) + WP SET TEXT($wpArea;$1;wk append) Else If(Count parameters>=2) - TEXT TO DOCUMENT($2;$1) + TEXT TO DOCUMENT($path;$message) 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. -In the following example, the project method `SEND PACKETS` accepts a time parameter followed by a variable number of text parameters: -```4d - //SEND PACKETS Project Method - //SEND PACKETS ( Time ; Text { ; Text2... ; TextN } ) - //SEND PACKETS ( docRef ; Data { ; Data2... ; DataN } ) +## Valores ou referências - C_TIME($1) - C_TEXT(${2}) - C_LONGINT($vlPacket) +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 local variables in the class function or subroutine. 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. Since its scope is local, if the value of a parameter is modified in the class function/subroutine, it does not change the value in the calling method. For example: - For($vlPacket;2;Count parameters) - SEND PACKET($1;${$vlPacket}) - End for +```4d + //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) + + //Este é o código do método DO_SOMETHING + $1:=Uppercase($1) + ALERT($1) ``` -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 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`. -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. +Há duas formas de fazer com que o método `DO_SOMETHING` mude o valor de campo: -This function is called in the following manner: +1. Rather than passing the field to the method, you pass a pointer to it, so you would write: ```4d - Result:=MySum("##0.00";125,2;33,5;24) + //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) + //Este é o código do método DO_SOMETHING + $1->:=Uppercase($1->) + ALERT($1->) ``` -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. +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". -Here is the function, named `MySum`: +2. Rather than having the method `DO_SOMETHING` "doing something," you can rewrite the method so it returns a value. Thus you would write: ```4d - $Sum:=0 - For($i;2;Count parameters) - $Sum:=$Sum+${$i} - End for - $0:=String($Sum;$1) + //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) + + //Este é o código do método DO_SOMETHING + $0:=Uppercase($1) + ALERT($0) ``` -This function can now be called in various ways: +Esta segunda técnica de retornar um valor por uma subrotina se chama " utilizar uma função" This is described in the [Returning values](#returning-values) paragraph. + + +### Casos particulares: objetos e coleções + +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). + +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. This is the same principle as for [pointers](dt_pointer.md#pointers-as-parameters-to-methods), except that `$1, $2...` parameters do not need to be dereferenced in the subroutine. + +Por exemplo, considere o método `CreatePerson` que cria um objeto e o envia como parâmetro: ```4d - Result:=MySum("##0.00";125,2;33,5;24) - Result:=MySum("000";1;18;4;23;17) + //CreatePerson + var $person : Object + $person:=New object("Name";"Smith";"Age";40) + ChangeAge($person) + ALERT(String($person.Age)) ``` -### 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. +O método `ChangeAge` adiciona 10 ao atributo Age do objeto recebido ```4d - C_LONGINT(${4}) + //ChangeAge + #DECLARE ($person : Object) + $person.Age:=$person.Age+10 + ALERT(String($person.Age)) ``` -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. +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. + -**Note:** The number in the declaration has to be a constant and not a variable. \ No newline at end of file diff --git a/website/translated_docs/pt/Concepts/plug-ins.md b/website/translated_docs/pt/Concepts/plug-ins.md index 10de5810c8138f..0e62435acb5e9f 100644 --- a/website/translated_docs/pt/Concepts/plug-ins.md +++ b/website/translated_docs/pt/Concepts/plug-ins.md @@ -18,20 +18,19 @@ 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 A plug-in usually contains a set of routines given to the 4D Developer. It can handle an External Area and run an external process. -- A **plug-in routine** is a routine written in native language (usually C or C++) that causes an action. +- A **plug-in routine** is a routine written in native language (usually C or C++) that causes an action. - An **external area** is a part of a form that can display almost everything and interact with the user when necessary. -- An **external process** is a process that runs alone, usually in a loop, doing almost everything it wants. All process code belongs to the plug-in, 4D is simply present to receive/send events to the process. +- An **external process** is a process that runs alone, usually in a loop, doing almost everything it wants. All process code belongs to the plug-in, 4D is simply present to receive/send events to the process. ### 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. 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 application. ## How to create a plug-in? @@ -44,18 +43,17 @@ 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. 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. -You can put the PlugIns folder in two different places: +You can put the Plugins folder in two different places: -- 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. + - Under macOS: at the first level of the Contents folder inside the application package. In this case, plug-ins are available in every project opened by this application. +- At the same level as the Project folder. In this case, plug-ins are only available in this particular project. 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. Then open your project 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 diff --git a/website/translated_docs/pt/Concepts/quick-tour.md b/website/translated_docs/pt/Concepts/quick-tour.md index 3ec4f463f3e91b..93058fb83a68c5 100644 --- a/website/translated_docs/pt/Concepts/quick-tour.md +++ b/website/translated_docs/pt/Concepts/quick-tour.md @@ -6,7 +6,7 @@ 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: -```4d +```4d ALERT("Hello, World!") ``` @@ -16,6 +16,7 @@ This code will display a platform-standard alert dialog box with the "Hello, Wor 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! + ## Assigning Values 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. @@ -48,6 +49,7 @@ var myPerson : cs.Person //variable of the Person user class ``` + Even if it is usually not recommended, you can declare variables simply by using them; you do not necessarily need to formally define them. For example, if you want a variable that will hold the current date plus 30 days, you can write: ```4d @@ -58,7 +60,7 @@ The line of code reads “MyOtherDate gets the current date plus 30 days.†Thi ## Commands -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: +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: ```4d COPY DOCUMENT("folder1\\name1";"folder2\\" ; "new") @@ -88,7 +90,6 @@ PDF REMOVE PAGE(path;page) svgRef:=SVG_New objectRef:=SVG_New_arc(svgRef;100;100;90;90;180) ``` - 4D SVG is included in 4D. ## Constants @@ -135,6 +136,7 @@ ALERT($myText) //"HELLO" $0:=Uppercase($1) ``` + ## 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). @@ -149,7 +151,7 @@ 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). @@ -175,10 +177,11 @@ $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!" +``` To access a collection element, you have to pass the element number embedded in square brackets: @@ -194,14 +197,14 @@ The 4D language supports object classes. Add a `myClass.4dm` file in the Project To instantiate an object of the class in a method, call the user class from the *class store* (`cs`) and use the `new()` member function. You can pass parameters. -```4d +```4d // in a 4D method $o:=cs.myClass.new() ``` -In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. A class member method can receive and return parameters like any method, and use `This` as the object instance. +In the `myClass` class method, use the `Function ` statement to define the *methodName* class member method. A class member method can receive and return parameters like any method, and use `This` as the object instance. -```4d +```4d //in the myClass.4dm file Function hello C_TEXT($0) @@ -219,7 +222,7 @@ $message:=$o.myClass.hello() Optionally, use the `Class constructor` keyword to declare properties of the object. -```4d +```4d //in the Rectangle.4dm file Class constructor C_LONGINT($1;$2) @@ -228,9 +231,9 @@ This.width:=$2 This.name:="Rectangle" ``` -A class can inherit from another class by using `Class inherits `. Superclasses can be called using the `Super` command. For example: +A class can extend another class by using `Class extends `. Superclasses can be called using the `Super` command. For example: -```4d +```4d //in the Square.4dm file Class extends rectangle @@ -244,8 +247,8 @@ Super($1;$1) This.name:="Square" ``` -## Operators +## Operators 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 | @@ -255,7 +258,6 @@ When you use the language, it is rare that you will simply want a piece of data. | * | Multiplication | 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: @@ -281,8 +283,8 @@ 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 | @@ -310,12 +312,11 @@ You refer to an expression by the data type it returns. There are several expres | 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: -```4d +```4d //$myVar variable is assignable, you can write: $myVar:="Hello" //assign "Hello" to myVar //Form.pageNumber is assignable, you can write: @@ -323,9 +324,9 @@ 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 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. diff --git a/website/translated_docs/pt/Concepts/shared.md b/website/translated_docs/pt/Concepts/shared.md index 564c9c7762397f..bbcd3db723d952 100644 --- a/website/translated_docs/pt/Concepts/shared.md +++ b/website/translated_docs/pt/Concepts/shared.md @@ -3,8 +3,6 @@ id: shared title: Shared objects and collections --- -## Overview - **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: @@ -16,9 +14,9 @@ Shared objects and shared collections can be stored in variables declared with s 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. +A unique, global catalog returned by the `Storage` command is always available throughout the application and its components, and can be used to store all shared objects and collections. -## Using shared objects or collections +## 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. @@ -38,13 +36,13 @@ 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` locks the shared object/collection from other threads, while `End use` unlocks the shared object/collection (if the locking counter is at 0, see below). . 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. +- Calling `Use` on a shared object/collection belonging to a group locks properties/elements of all shared objects/collections of the group and increments its locking counter. Calling `End use` decrements the locking counter of the group and when the counter is at 0, all the linked shared objects/collections are unlocked. - 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. +- 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. Please refer to example 2 for an illustration of shared group rules. @@ -82,15 +80,16 @@ The `Use...End use` structure defines a sequence of statements that will execute 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. +- The **End use** line unlocks the _Shared_object_or_Shared_collection_ properties and all objects of the same group. +- Several **Use...End use** structures can be nested in the 4D code. In the case of a group, each **Use** increments the locking counter of the group and each **End use** decrements it; all properties/elements will be released only when the last **End use** call sets the locking counter to 0. **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 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: @@ -160,4 +159,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 7c19d22ca92d36..22221570b4e373 100644 --- a/website/translated_docs/pt/Concepts/variables.md +++ b/website/translated_docs/pt/Concepts/variables.md @@ -7,12 +7,13 @@ Data in 4D is stored in two fundamentally different ways. **Fields** store data When you set up your 4D database, you specify the names and types of fields that you want to use. Variables are much the same—you also give them names and different types (see [Data types](Concepts/data-types.md)). -Once created, you can use a variable wherever you need it in your database. For example, you might need to store a text variable in a field of same type: +Once created, you can use a variable wherever you need it in your application. For example, you might need to store a text variable in a field of same type: ```4d [MyTable]MyField:=MyText ``` + 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. ## Declaring Variables @@ -20,7 +21,7 @@ Variables are language objects; you can create and use variables that will never You create variables by declaring them. The 4D language offers two ways to declare variables: - using the `var` keyword (recommended, specially if your code uses objects and classes), -- using one of the "Compiler" or "Arrays" theme 4D language commands (deprecated, classic language only). +- using one of the "Compiler" or "Arrays" theme 4D language commands (classic language only). **Note:** Although it is usually not recommended, you can create basic variables simply by using them; you do not necessarily need to formally define them. For example, to declare a variable that will hold the current date plus 30 days, you can write: @@ -30,193 +31,59 @@ You create variables by declaring them. The 4D language offers two ways to decla // and assigns the current date plus 30 days ``` + ### Using the `var` keyword Declaring variables using the `var` keyword is recommended since this syntax allows you to bind object variables with classes. Using this syntax enhances code editor suggestions and type-ahead features. To declare a variable of any type with the `var` keyword, use the following syntax: -`var {, ,...}{ : }` +`var {; ;...}{ : }` For example: ```4d var $myText : Text //a text variable -var myDate1, myDate2 : Date //several date variables +var myDate1; myDate2 : Date //several date variables var $myFile : 4D.File //a file class object variable var $myVar //a variant variable ``` -`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. +`varName` is the variable name, it must comply with the [4D rules](Concepts/identifiers.md) about identifiers. This syntax only supports [local and process variables](#local-process-and-interprocess-variables) declarations, thus excluding [interprocess variables](#interprocess-variables) and [arrays](Concepts/arrays.md). `varType` can be: -- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, +- a [basic type](Concepts/data-types.md), in which case the variable contains a value of the declared type, - a [class reference](Concepts/classes.md) (4D class or user class), in which case the variable contains a reference to an object of the defined class. If `varType` is omitted, a variable of the **variant** type is created. The following table lists all supported `varType` values: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - varType - - Contents -
          - Text - - Text value -
          - Date - - Date value -
          - Time - - Time value -
          - Boolean - - Boolean value -
          - Integer - - Long integer value -
          - Real - - Real value -
          - Pointer - - Pointer value -
          - Picture - - Picture value -
          - Blob - - BLOB value -
          - Collection - - Collection value -
          - Variant - - Variant value -
          - Object - - Object with default class (4D.Object) -
          - 4D.\ - - Object of the 4D class name -
          - cs.\ - - Object of the user class name -
          +| varType | Contents | +| ---------------------- | ------------------------------------- | +| `Text` | Text value | +| `Date` | Date value | +| `Time` | Time value | +| `Boolean` | Boolean value | +| `Integer` | Long integer value | +| `Real` | Real value | +| `Pointer` | Pointer value | +| `Picture` | Picture value | +| `Blob` | BLOB value | +| `Collection` | Collection value | +| `Variant` | Variant value | +| `Object` | Object with default class (4D.Object) | +| `4D.` | Object of the 4D class name | +| `cs.` | Object of the user class name | #### Examples - To declare local and process basic variables: ```4d -var $myText, myText, $vt : Text +var $myText; myText; $vt : Text var myVar //variant var $o : Object @@ -240,9 +107,10 @@ var $dataclass : cs.Employee var $entity : cs.EmployeeEntity ``` + ### Using a C_ directive -> **Compatibility Note:** This feature is deprecated as of 4D v18 R3. It is now recommended to use the [var](#using-the-var-keyword) keyword. +> **Compatibility Note:** This feature is not recommended to declare variables inside methods. It is recommended to use the [var](#using-the-var-keyword) keyword. Directives from the "Compiler" theme commands allow you to declare variables of basic types. @@ -260,10 +128,10 @@ The following are some basic variable declarations: 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 ``` -**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). +**Note:** Arrays are a particular type of variables (an array is an ordered series of variables of the same type). Arrays are declared with specific commands, such as `ARRAY LONGINT(alAnArray;10)`. For more information, please refer to [Arrays](Concepts/arrays.md). + ## Assigning Data @@ -275,17 +143,17 @@ The assignment operator is a primary way to create a variable and to put data in 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. > It is usually not recommended to create variables without [declaring their type](#creating-variables). -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 ({...}): @@ -309,9 +177,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. +When you are working in an application project 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. -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: +Frequently, in an application, 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: ```4d $vsID:=Request("Please enter your ID:") @@ -342,10 +210,12 @@ 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. +Interprocess variables are available throughout the project and are shared across all cooperative processes. 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/Debugging/basics.md b/website/translated_docs/pt/Debugging/basics.md new file mode 100644 index 00000000000000..315278df4ba8d4 --- /dev/null +++ b/website/translated_docs/pt/Debugging/basics.md @@ -0,0 +1,97 @@ +--- +id: basics +title: Basics +--- + +Errors are common. It would be unusual to write a substantial number of lines of code without generating any errors. Conversely, treating and/or fixing errors is normal, too! + +The 4D development environment provides several debugging tools for all types of errors. + +## Error types + +### Typing errors + +Typing errors are detected by the Method editor. They are displayed in red and additional information is provided at the bottom of the window. Here's a typing error: + +![break-point](assets/en/Debugging/typing-error.png) + + +Such typing errors usually cause syntax errors (in the above image, the name of the table is unknown). You get the description of the error when you validate the line of code. When this occurs, fix the typing error and type Enter to validate the fix. + +### Syntax Errors + +Some errors can be caught only when you execute the method. The [Syntax Error Window](#syntax-error-window) appears when an error occurs during code execution. For example: + +![syntax-error](assets/en/Debugging/syntax-error.png) + +Expand the **Details** area to display the last error and its number. + +### Environmental Errors + +Occasionally, there may not be enough memory to create a BLOB. Or, when you access a document on disk, the document may not exist or may already be opened by another application. These environmental errors do not directly occur because of your code or the way you wrote it. Most of the time, these errors are easy to treat with an [error catching method](Concepts/error-handling.md) installed using the `ON ERR CALL` command. + +### Design or Logic Errors + +These are generally the most difficult type of error to find. Except for typing errors, all the error types listed above are to a certain extent covered by the expression "Design or logic error". Use the [Debugger](debugger.md) to detect them. For example: + +- A *syntax error* may occur when you try to use a variable that is not yet initialized. +- An *environmental error* can occur when you try to open a document, because that document's name is received by a subroutine that did not get the right value as a parameter. + +Design or logic errors also include such situations as: + +- A record is not properly updated because, while calling `SAVE RECORD`, you forgot to first test whether or not the record was locked. +- A method does not do exactly what you expect, because the presence of an optional parameter is not tested. + +Sometimes the piece of code that displays the error may be different than the code that is actually the origin of the problem. + +### Runtime Errors + +In Application mode, you might obtain errors that you don't see in interpreted mode. Here's an example: + +![runtime-error](assets/en/Debugging/runtimeError.png) + +To quickly find the origin of the problem, reopen the interpreted version of the structure file, open the method and go to the corresponding line. + +## Syntax Error Window + +The Syntax error window automatically appears when the execution of a method is interrupted. This can happen when: + +- an error prevents further code execution +- the method produces a false assertion (see the `ASSERT` command) + +![syntax-error](assets/en/Debugging/syntax-error.png) + +The upper text area displays a message describing the error. The lower text area shows the line that was executing when the error occurred; the area where the error occurred is highlighted. The expanded Details section contains the "stack" of errors related to the process. + +The syntax error window proposes several options: + +- **Edit**: Stops all method execution. 4D switches to the Design environment and the method with the error opens in the Method editor, allowing you to fix it. Use this option when you immediately recognize the mistake and can fix it without further investigation. + +- **Trace**: Enters Trace/Debugger mode. The [Debugger](debugger.md) window is displayed. If the current line has only executed partially, you may have to click the **Trace** button several times. + +- **Continue**: Execution continues. The line with the error may be partially executed, depending on where the error is located. Continue with caution: the error may prevent the rest of your method from executing properly. We recommend clicking **Continue** only if the error is in a trivial call (such as `SET WINDOW TITLE`) that does not prevent executing and testing the rest of your code. + +> Tip: To ignore an error that occurs repeatedly (for example, in loops), you can turn the **Continue** button into an **Ignore** button. Hold down **Alt** (Windows) or **Option** (macOS) key and click the **Continue** button the first time it appears. The button label changes to **Ignore** if the dialog is called again for the same error. + +- **Abort**: Stops method execution and returns to the state before the method started executing: + + - If a form method or object method is executing in response to an event, it is stopped and you return to the form. + - If the method is executing from within the Application environment, you return to that environment. + +- **Copy**: Copies the debugging information into the clipboard. The info describes the internal environment of the error (number, internal component, etc.). It is formatted as tabbed text. + +- **Save...**: Saves the contents of the syntax error window and the call chain in a `.txt` file. + +## Debugger + +A common beginner mistake in dealing with error detection is to click **Abort** in the Syntax Error Window, go back to the Method Editor, and try to figure out what's going by looking at the code. Do not do that! You will save plenty of time and energy by always using the **Debugger**. + +The Debugger allows you to step through methods slowly. It displays all the information you need in order to understand why an error occurred. Once you have this information, you know how to fix the error. + +Another reason to use the Debugger is for developing code. Sometimes you may write an algorithm that is more complex than usual. Despite all feelings of accomplishment, you can't be totally sure that your coding is 100% correct. Instead of running it "blind", you can use the `TRACE` command at the beginning of your code, then execute it step by step to keep an eye on what happens. + +## Breaks + +In the debugging process, you may need to skip the tracing of some parts of the code until a certain line. Or, you may want to trace the code when a given expression has a certain value (e.g. "$myVar > 1000"), or every time a specific 4D command is called. + +These needs are covered by **breakpoints** and **command catching** features. They can be configured from the method editor, the debugger, or the Runtime Explorer. \ No newline at end of file diff --git a/website/translated_docs/pt/Debugging/breakpoints.md b/website/translated_docs/pt/Debugging/breakpoints.md new file mode 100644 index 00000000000000..49372391420ba6 --- /dev/null +++ b/website/translated_docs/pt/Debugging/breakpoints.md @@ -0,0 +1,125 @@ +--- +id: breakpoints +title: Breakpoints and Command Catching +--- + +## Visão Geral + + +Breakpoints and command catching are very efficient debugging techniques. Both have the same effect: they pause the code execution (and display the debugger window if not already displayed) at a desired step. + +You set breakpoints on any line of code where you want the execution to be paused. You can associate a condition to the break point. + +Catching a command enables you to start tracing the execution of any process as soon as a command is called by that process. + + + +## Breakpoints + + +To create a break point, click in the left margin of the Source Code pane in the debugger or in the Method editor. + +In the following example, a break point (the red bullet) has been set, in the debugger, on the line `If ($in.dataClass#Null)`: + +![break-point](assets/en/Debugging/break.png) + +In the above example, clicking the [**No Trace**](./debugger.md/#no-trace) button resumes normal execution up to the line marked with the break point. That line is not executed itself — you are taken back to trace mode. Setting a break point beyond the program counter and clicking the **No Trace** button allows you to skip portions of the method being traced. + +To remove a break point, click the corresponding bullet. + + +### Breakpoint Properties + +You can edit the behavior of a breakpoint using the Breakpoint Properties window: + +![breakpoint-properties](assets/en/Debugging/breakpoint-properties.png) + +This window is available from the Method Editor or the [Source Code Pane](debugger.md#source-code-pane). You can: + +- right-click a line and select **Edit Breakpoint** in the contextual menu, or +- `Alt+click` (Windows) or `Option+click` (macOS) in the left margin. + +If a break point already exists, the window is displayed for that break point. Otherwise, a break point is created and the window is displayed for the newly created break point. + +Here is a description of the properties: + +* **Location**: indicates the name of the method and the line number attached to the breakpoint. +* **Break when following expression is true**: You can create **conditional breakpoints** by entering a 4D formula that returns `True` or `False`. For example, insert `Records in selection(\[aTable])=0` to make sure the break occurs only if there no record selected for the table \[aTable]. Breakpoint conditions are available in the **Condition** column of the [Break list](#break-list). +* **Number of times to skip before breaking**: You can attach a breakpoint to a line located in a loop structure (While, Repeat, or For) or located in subroutine or function called from within a loop. +* **Breakpoint is disabled**: If you currently do not need a break point, but might need it later, you can temporarily disable it. A disabled break point appears as a dash (-) instead of a bullet (•)| + + +### Breakpoints in remote debugging + +The break point list is stored locally. In remote debugging mode, if the attached debugger is a remote 4D, the remote break point list replaces temporarily the server break point list during the debugging session. + +The server break point list is automatically restored if it becomes again the attached debugger. + +### Break List + +The Break list is a page of the Runtime Explorer that lets you manage the breakpoints created in the Debugger Window or in the Method Editor. For more information on the Runtime Explorer, see its dedicated page in [the Design reference manual](https://doc.4d.com/4Dv19/4D/19/Runtime-Explorer.200-5416614.en.html). + +To open the Break list page: + +1. From the **Run menu**, click **Runtime Explorer...** + +2. Click the **Break** tab to display the Break list: + +![break-list-runtime-explorer](assets/en/Debugging/break-list.png) + +Using this window, you can: + +* Set conditions for breakpoints in the **Conditions** column +* Enable or disable breakpoints by clicking the bullets in the margin. Disabled breakpoints display transparent bullets +* Delete breakpoints by pressing the `Delete` or `Backspace` key, or click on the **Delete** button below the list. +* Open the methods where the breakpoint are located by double-clicking any line in the list + +You cannot add new breakpoints from this window. Breakpoints can only be created from within the Debugger window or the Method Editor. + + +## Catching Commands + +The **Catch** tab of the Runtime Explorer lets you add additional breaks to your code by catching calls to 4D commands. Unlike a break point, which is located in a particular project method (and therefore triggers a trace exception only when it is reached), the scope of catching a command includes all the processes that execute 4D code and call that command. + +Catching a command is a convenient way to trace large portions of code without setting break points at arbitrary locations. For example, if a record that should not be deleted is deleted after you've executed one or several processes, you can try to reduce the field of your investigation by catching commands such as `DELETE RECORD` and `DELETE SELECTION`. Each time these commands are called, you can check if the record in question has been deleted, and thus isolate the faulty part of the code. + +Feel free to combine breakpoints and command catching. + +To open the Caught Commands page: + +1. Choose **Run** > **Runtime explorer...** to open the Runtime Explorer. + +2. Click **Catch** to display the Caught Commands List: + +![runtime-explorer-window](assets/en/Debugging/catch-command.png) + +This page lists the commands to be caught during execution. It is composed of two columns: + +* The left column displays the Enable/Disable status of the caught command, followed by the name of the command +* The right column displays the condition associated with the caught command, if any + +To add a command to be caught: + +1. Click on the **Add New Catch** button (in the shape of a +) located below the list. A new entry is added to the list with the `ALERT` command as default +2. Click the **ALERT** label, type the name of the command you want to catch, then press **Enter**. + +To enable or disable a caught command, click on the bullet (•) in front of the command label. The bullet is transparent when the command is disabled. + +> Disabling a caught command has almost the same effect as deleting it. During execution, the debugger spends almost no time on the entry. The advantage of disabling an entry is that you do not have to recreate it when you need it again. + +To delete a caught command: + +1. Select a command in the list. +2. Press **Backspace** or **Delete** on your keyboard or click on the **Delete** button beneath the list (**Delete All** removes all commands in the list). + +### Setting a Condition for catching a command + +1. Click on the entry in the right column +2. Enter a 4D formula (expression, command call or project method) that returns a Boolean value. + +> To remove a condition, delete its formula. + +Adding conditions allows you to stop execution when the command is invoked only if the condition is met. For example, if you associate the condition `Records in selection(\[Emp]>10)` with the break point on the `DELETE SELECTION` command, the code will not be stopped during execution of the `DELETE SELECTION` command if the current selection of the \[Emp] table only contains 9 records (or less). + +Adding conditions to caught commands slows the execution, because the condition has to be evaluated each time an exception is met. On the other hand, adding conditions accelerates the debugging process, because 4D automatically skips occurrences that do not match the conditions. + diff --git a/website/translated_docs/pt/Debugging/debugger.md b/website/translated_docs/pt/Debugging/debugger.md new file mode 100644 index 00000000000000..846ccbc3ad1291 --- /dev/null +++ b/website/translated_docs/pt/Debugging/debugger.md @@ -0,0 +1,438 @@ +--- +id: debugger +title: Debugger +--- + +The debugger is useful when you need to spot errors or monitor the execution of methods. It allows you to step through methods slowly and examine the information. This process is called "tracing". + +![debugger-window-local](assets/en/Debugging/debugger-Window-local.png) + + +## Calling the Debugger + +There are multiple ways to get the Debugger to display: + +* Clicking the **Trace** button in the [Syntax Error window](basics.md#syntax-error-window) +* Using the [`TRACE`](https://doc.4d.com/4dv19/help/command/en/page157.html) command +* Clicking the **Debug** button in the Execute Method window or selecting **Run and debug...** button in the Method editor +* Using **Alt+Shift+Right click** (Windows) or **Ctrl+Option+Cmd+Click** (macOS) while a method is executing, then selecting the process to trace in the pop-up menu: + +![open-debugger](assets/en/Debugging/openDebugger.png) + +* Clicking the **Trace** button when a process is selected in the Process page of the Runtime Explorer. +* Adding a break point in the Method Editor window or in the Break and Catch pages of the Runtime Explorer. + +When called, the debugger window provides the name of the method or class function you're currently tracing, and the action causing the initial appearance of the Debugger window. For example, in the above debugger window: + +* *Clients_BuildLogo* is the method being traced +* The debugger window appeared because it detected a call to the `C_PICTURE` command and this command was one of the commands to be caught + + +Displaying a new debugger window uses the same configuration as the last window displayed in the same session. If you run several user processes, you can trace them independently and have one debugger window open for each process. + +The Debugger window is usually displayed on the machine where the code is executed. With a single-user application, it is always displayed on the machine running the application. With a client/server application, it is displayed: + +- on the remote 4D for code running locally +- on the server machine for code running on the server (for example, a method with the **execute on server** option). + +> If the server is running headless, no debugger window can be displayed on the server, you need to use the remote debugger. See [Debugging from remote machines](./debugging-remote.md). + +## Tool bar Buttons + +The debugger's tool bar includes several buttons, associated with default shortcuts: + +![execution-control-toolbar-buttons](assets/en/Debugging/executionToolbarButtons.png) + +> Default shortcuts can be customized in the Shortcuts Page of the Preferences dialog box. + +#### No Trace + +Tracing stops and normal method execution resumes. + +> **Shift** + **F5** or **Shift** + clicking the **No Trace** button resumes execution. It also disables all the subsequent TRACE calls for the current process. + +#### Step Over + +Executes the current method line, indicated by the program counter (the yellow arrow). The Debugger steps to the next line. + +The Step Over button does not step into subroutines and functions, it stays at the level of the method you're currently tracing. If you want to also trace subroutines and functions calls, use the **Step Into** button. + +In remote debugging, if the method executes on the server, the parent method is called after the last line of the child method executes. If the parent method is executed on the remote side, the **Step Over** button has the same effect as the **No Trace** button. + +#### Step Into + +When a line that calls another method (subroutine or function) is executed, click this button to display the the other method and step through it. + +The new method becomes the current (top) method in the [Call Chain Pane](#call-chain-pane) of the Debugger window. + +When executing a line that does not call another method, this button has the same effect as the **Step Over** button. + +#### Abort + +Stops method execution, and returns to the state before the method started executing: +* When tracing a form or object method executing in response to an event: Stops and returns to the form. +* When tracing a method executing from within the Application environment: Stops and returns to the environment. + +#### Abort and Edit + + +Pauses method execution. The method that is executing when you click the **Abort and Edit** button opens in the Method Editor. +> **Tip**: Use this button when you know which changes are required in your code, and when these changes are required to pursue the testing of your methods. After you're finished with the changes, rerun the method. + +#### Edit + +Pauses method execution. The method that is executing at the time you click the Edit button opens in the Method Editor. + +If you use this button to modify a method, the modifications are only effective the next time it executes. + +> **Tip:** Use this button when you know which changes are required in your code and when they don't interfere with the rest of the code to be executed or traced. + +#### Save Settings + +Saves the current configuration of the debugger window and makes it the default configuration. This includes: +* the size and position of the window +* the position of the division lines and the contents of the area that evaluates the expressions + +These parameters are stored in the project. + +This action is not available in remote debugging mode (see [Debugging from Remote Machines]()). + +## Watch Pane + +The **Watch pane** is displayed in the top left corner of the Debugger window, below the Execution Control Tool Bar. Here is an example: + +![watch-pane](assets/en/Debugging/watchPane.png) + +> This pane is not available in remote debugging mode. + +The **Watch Pane** displays useful general information about the system, the 4D environment, and the execution environment. + +The **Expression** column displays the names of the objects and expressions. The **Value** column displays their current corresponding values. Clicking on any value on the right side of the pane allows you to modify the value of the object, if this is permitted for that object. + +At any point, you can drag and drop themes, theme sublists (if any), and theme items to the [Custom Watch Pane](#custom-watch-pane). + +### Expression list + +#### Line Objects + +This theme lets you keep track of the values of the objects or expressions: + +* used in the line of code to be executed (the one marked with the program counter—the yellow arrow in the [Source Code Pane](#source-code-pane)), +* used in the previous line of code + +Since the previous line of code is the one that was just executed before, this theme therefore shows the objects or expressions of the current line before and after that the line was executed. Let's say you execute the following method: + +```4d +TRACE +$a:=1 +$b:=a+1 +$c:=a+b +``` + +1. A Debugger window opens with the program counter set to the line with `a:=1`. At this point the **Line Objects** theme displays: + + | $a | Undefined | + | -- | --------- | + | | | + + The `$a` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +2. You click the **Step Over** button. The program counter is now set to the line `b:=a+1`. At this point, the theme displays: + + | $a | 1 | + | -- | --------- | + | $b | Undefined | + + The value of the `$a` variable is now 1. The `$b` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +3. You click the **Step Over** button again. The program counter is now set on the line with c:=a+b. At this point the Line Objects theme displays: + + | $c | Undefined | + | -- | --------- | + | $a | 1 | + | $b | 2 | + + The value of the `$b` variable is now 2. The `$c` variable is not yet initialized, but it is displayed because it is used in the line to be executed. + +#### Variables + +This theme is composed of the following subthemes: + +| Subtheme | Description | Can the values be modified? | +| ------------ | ------------------------------------------------------------ | --------------------------- | +| Interprocess | List of interprocess variables being used at this point | Yes | +| Process | List of process variables used by the current process | Yes | +| Local | List of local variables used by the method being traced | Yes | +| Parameters | List of parameters received by the method | Yes | +| Self | Pointer to the current object, when tracing an Object Method | No | + +Arrays, like other variables, appear in the Interprocess, Process, and Local subthemes, depending on their scope. The debugger displays the first 100 elements. Inside the **Value** column, you can modify the values of array elements, but not the size of the arrays. + +To display the variable types and their internal names, right click and check the **Show Types** option in the context menu: + +![show-types-menu-item](assets/en/Debugging/showTypes.png) + +Here's the result: + +![dynamic-variable-names](assets/en/Debugging/dynamicVariableNames.png) + +#### Current Form Values + +This theme contains the name of each dynamic object included in the current form, as well as the value of its associated variable: + +![current-form-value](assets/en/Debugging/current-form-values.png) + +Some objects, such as list box arrays, can be presented as two distinct objects, the variable of the object itself and its data source. + +#### Constants + +Like the Constants page of the Explorer window, this theme displays predefined constants provided by 4D. The expressions from this theme cannot be modified. + +#### Semaphores + +This theme lists the local semaphores currently being set. For each semaphore, the Value column provides the name of the process that sets the semaphore. The expressions from this theme cannot be modified. Global semaphores are not displayed. + +#### Processos + +This theme lists the processes started since the beginning of the working session. The value column displays the time used and the current state for each process (i.e., Executing, Paused, and so on). The expressions from this theme cannot be modified. + +#### Tables and Fields + +This theme lists the tables and fields in the 4D database. For each Table item, the Value column displays the size of the current selection for the current process as well as the number of **locked records**. + +For each Field item, the Value column displays the value of the field for the current record (except picture and BLOB). You can modify the field values but not the the tables' information. + +#### Conjuntos + +This theme lists the sets defined in the current process (the one you're currently tracing) and the interprocess sets. For each set, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Seleções temporárias + +This theme lists the named selections that are defined in the current process (the one you’re currently tracing); it also lists the interprocess named selections. For each named selection, the Value column displays the number of records and the table name. The expressions from this theme cannot be modified. + +#### Information + +This theme contains general information regarding database operation, such as the current default table (if one exists), physical, virtual, free and used memory space, query destination, etc. + +#### Web + +This theme displays information regarding the main Web server of the application (only available if the Web server is active): + +* Web File To Send: name of Web file waiting to be sent (if any) +* Web Cache Usage: number of pages present in Web cache as well as its use percentage +* Web Server Elapsed Time: duration of Web server use in hours:minutes:seconds format +* Web Hits Count: total number of HTTP requests received since Web server launch, as well as the instantaneous number of requests per second +* Number of active Web processes: number of active Web processes, all Web processes together + +The expressions contained within this theme cannot be modified. + +### Contextual Menu + +Additional options are available from the contextual menu of the Watch pane. + +![context-menu](assets/en/Debugging/contextual-menu.png) + +* **Collapse All**: Collapses all levels of the hierarchical list. +* **Expand All**: Expand all levels of the hierarchical list. +* **Show Types**: Displays the type of each item (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field. Useful if you work with table or field numbers, or with pointers using commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the object type for each object. You can turn this option off in order to speed up the display, or just because you prefer to use only the **Show Types** option. +* **Sorted Tables and Fields**: Sorts the tables and fields in alphabetical order within their respective lists. +* **Show Integers in Hexadecimal**: Numbers are usually displayed in decimal notation. This option displays them in hexadecimal notation. Note: To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. +* **Enable activity monitoring**: Activates the monitoring of activity (advanced checking of internal activity of the application) and displays the information retrieved in the additional themes: **Scheduler**, **Web** and **Network**. + +## Call Chain Pane + +A method may call other methods or class functions, which may call other methods or functions. The Call Chain pane lets you keep track of that hierarchy. + +![call-chain-pane](assets/en/Debugging/call-chain-example.png) + +Each main level item is the name of a method or class function. The top item is the one you are currently tracing, the next main level item is the name of the caller (the method or function that called the one you are currently tracing), the next one is the caller's caller, and so on. + +In the image above: + +* `thirdMethod` has not received any parameter +* `$0` is currently undefined, as the method did not assign any value to `$0` (because it has not executed this assignment yet or because the method is a subroutine and not a function) +* `secondMethod` has received three parameters from `firstMethod`: + * $1 is a pointer to the `[Employee]` table + * $2 is a pointer to the `ID` field in the `[Employee]` table + * $3 is an alphanumeric parameter whose value is "Z" + +You can double-click the name of any method to display its contents in the [Source Code Pane](#source-code-pane). + +Clicking the icon next to a method or function name expands or collapses the parameters and the result (if any). Values appear on the right side of the pane. Clicking on any value on the right side allows you to change the value of any parameter or function result. + +To display the parameter type, check the **Show types** option in the contextual menu: + +![call-chain-show-types](assets/en/Debugging/callChainShowTypes.png) + +After you deploy the list of parameters, you can drag and drop parameters and function results to the [Custom Watch Pane](#custom-watch-pane). + +You can also use the [Get call chain](https://doc.4d.com/4dv19/help/command/en/page1662.html) command to retrieve the call chain programmatically. + +## Custom Watch Pane + +The Custom Watch Pane is useful for evaluating expressions. It is similar to the [Watch Pane](#watch-pane), except here you decide which expressions are displayed. Any type of expression can be evaluated: + +* field +* variable +* pointer +* calculation +* 4D command +* method +* and anything else that returns a value + +![custom-Watch-pane](assets/en/Debugging/custom-watch-pane.png) + +You can evaluate any expression that can be shown in text form. This does not cover picture and BLOB fields or variables. To display BLOB contents, you can use BLOB commands, such as [BLOB to text](https://doc.4d.com/4dv19/help/command/en/page555.html). + +### Handling expressions + +There are several ways to add expressions to the list: + +* Drag and drop an object or expression from the Watch Pane or the Call Chain Pane +* Select an expression in the [Source Code pane](#source-code-pane) and press **ctrl+D** (Windows) or **cmd+D** (macOS) +* Double-click somewhere in the empty space of the Custom Watch Pane (adds an expression with a placeholder name that you can edit) + +You can enter any formula that returns a result. + +To edit an expression, click on it to select it, then click again or press **Enter** on your keyboard. + +To delete an expression, click on it to select it, then press **Backspace** or **Delete** on your keyboard. +> **Warning:** Be careful when you evaluate a 4D expression modifying the value of one of the System Variables (for instance, the OK variable) because the execution of the rest of the method may be altered. + +### Contextual Menu + +The Custom Watch Pane’s context menu gives you access the 4D formula editor and other options: + +![custom-watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-context-menu.png) + +**New Expression**: This inserts a new expression and displays the 4D Formula Editor. + +![custom-Watch-pane-context-menu](assets/en/Debugging/custom-watch-pane-formula-editor.png) + +For more information on the Formula Editor, see the 4D Design Reference manual. + +* **Insert Command**: Shortcut for inserting a 4D command as a new expression. +* **Delete All**: Removes all expressions from the Custom Watch Pane. +* **Standard Expressions**: Copies the Watch Pane's list of expressions. +> This option is not available in remote debugging mode (see [Debugging from Remote Machines](https://doc.4d.com/4Dv19/4D/19/Debugging-from-Remote-Machines.300-5422483.en.html)). +* **Collapse All/Expand All**: Collapses or Expands all the hierarchical lists. +* **Show Types**: Displays the type of each item in the list (when appropriate). +* **Show Field and Table Numbers**: Displays the number of each table or field of the **Fields**. Useful if you work with tables, field numbers or pointers using the commands such as `Table` or `Field`. +* **Show Icons**: Displays an icon denoting the type of each item. +* **Sorted Tables and Fields**: Displays the table and fields in alphabetical order. +* **Show Integers in Hexadecimal**: Displays numbers using hexadecimal notation. To enter a numeric value in hexadecimal, type 0x (zero + "x"), followed by the hexadecimal digits. + +## Source Code Pane + +The Source Code Pane shows the source code of the method or function currently being traced. + +This area also allows you to add or remove [**break points**](breakpoints.md). + +### Tool tip + +Hover your pointer over any expression to display a tool tip that indicates: + +* the declared type of the expression +* the current value of the expression + +![source-code-pane](assets/en/Debugging/sourceCodePane.png) + +This also works with selections: + +![source-code-pane-tip](assets/en/Debugging/sourcePaneTip.png) + +### Adding expressions to the Custom Watch Pane + +You can copy any selected expression from the Source Code Pane to the [Custom Watch Pane](#custom-watch-pane). + +1. In the Source code pane, select the expression to evaluate +2. Do one of the following: + * Drag and drop the selected text to the Expression area of the Custom Watch Pane + * Press **Ctrl+D** (Windows) or **Cmd+D** (macOS) + * Right-click the selected text **>** **Copy to Expression Pane** + +### Program Counter + +The yellow arrow in the left margin of the Source Code pane is called the program counter. It marks the next line to be executed. + +By default, the program counter line (also called the running line) is highlighted in the debugger. You can customize the highlight color in the [Methods page of the Preferences](Preferences/methods.md). + +#### Moving the program counter + +For debugging purposes, you can move the program counter for the method at the top of the call chain (the method currently executing). To do so, click and drag the yellow arrow to another line. + +This only tells the debugger to pursue tracing or executing from a different point. It does not execute lines or cancel their execution. All current settings, fields, variables, etc. are not impacted. + +For example: + +```4d + // ... + If(This condition) + DO_SOMETHING + Else + DO_SOMETHING_ELSE + End if + // ... +``` + +Say the program counter is set to the line `If (This condition)`. When you click the **Step over** button, the program counter moves directly to the `DO_SOMETHING_ELSE` line. To examine the results of the `DO_SOMETHING` line, you can move the program counter to that line and execute it. + +### Contextual menu + +The contextual menu of the Source Code Pane provides access to several functions that are useful when executing methods in Trace mode: + +![source-code-pane-context-window](assets/en/Debugging/sourceCodePaneContext.png) + +* **Goto Definition**: Goes to where the selected object is defined. This command is available for: + * *Project methods:* displays method contents in a new window of the Method editor + * *Fields:* Displays field properties in the inspector of the Structure window + * *Tables:* Displays table properties in the inspector of the Structure window + * *Forms:* Displays form in the Form editor + * *Variables* (local, process, interprocess or $n parameter): displays the line in the current method or among the compiler methods where the variable is declared +* **Search References** (also available in Method editor): Searches all project objects (methods and forms) in which the current element of the method is referenced. The current element is the one selected or the one where the cursor is located. This can be the name of a field, variable, command, string, and so on. Search results are displayed in a new standard results window. +* **Copy**: Standard copy of the selected expression to the pasteboard. +* **Copy to Expression Pane**: Copy the selected expression to the Custom Watch Pane. +* **Run to Cursor**:Executes statements found between the program counter and the selected line of the method (where the cursor is found). +* **Set Next Statement**:Moves program counter to the selected line without executing this line or any intermediate ones. The designated line is only run if the user clicks on one of the execution buttons. +* **Toggle Breakpoint** (also available in Method editor): Alternately inserts or removes the breakpoint corresponding to the selected line. This modifies the breakpoint permanently: for instance, if you remove a breakpoint in the debugger, it no longer appears in the original method. +* **Edit Breakpoint** (also available in Method editor): Displays the Breakpoint Properties dialog box. Any changes made modify the breakpoint permanently. + +### Find Next/Previous + +Specific shortcuts allow you to find strings identical to the one selected: + +* To search for the next identical strings, press **Ctrl+E** (Windows) or **Cmd+E** (macOS) +* To search for the previous identical strings, press **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) + +The search is carried out only if you select at least one character in the Source code pane. + +## Shortcuts + +This section lists all the shortcuts available in the debugger window. + +> The tool bar also has [shortcuts](#tool-bar-buttons). + +#### Watch Pane & Custom Watch Pane + +* **Double-click** an item in the Watch Pane to copy it to the Custom Watch Pane +* **Double-Click** in the Custom Watch Pane to create a new expression + +#### Source Code Pane + +* Click in the left margin to set or remove break points. +* **Alt+Shift+Click** (Windows) or **Option+Shift+Click** (macOS) sets a temporary break point. +* **Alt-Click** (Windows) or **Option-Click** displays the Edit Break window for a new or existing break point. +* A selected expression or object can be copied to the Custom Watch Pane by simple drag and drop. +* **Ctrl+D** (Windows) or **Cmd+D** (macOS) key combinations copy the selected text to the Custom Watch Pane. +* **Ctrl+E** (Windows) or **Cmd+E** (macOS) key combinations find the next strings identical to the one selected. +* **Ctrl+Shift+E** (Windows) or **Cmd+Shift+E** (macOS) key combinations find the previous strings identical to the one selected. + +#### All Panes + +- **Ctrl** + **+/-** (Windows) or **Command** + **+/-** (macOS) increases or decreases the font size for a better readability. The modified font size is also applied to the Method editor and is stored in the Preferences. +- **Ctrl + \*** (Windows) or **Command + \*** (macOS) forces the updating of the Watch Pane. +- When no item is selected in any pane, press **Enter** to step over. +- When an item value is selected, use the arrows keys to navigate through the list. +- When editing an item, use the arrow keys to move the cursor. Use Ctrl-A/X/C/V (Windows) or Command-A/X/C/V (macOS) as shortcuts to the Select All/Cut/Copy/Paste menu commands of the Edit menu. \ No newline at end of file diff --git a/website/translated_docs/pt/Debugging/debugging-remote.md b/website/translated_docs/pt/Debugging/debugging-remote.md new file mode 100644 index 00000000000000..f5026a14dcdb05 --- /dev/null +++ b/website/translated_docs/pt/Debugging/debugging-remote.md @@ -0,0 +1,84 @@ +--- +id: debugging-remote +title: Debugging from remote machines +--- + +## Visão Geral + +When a 4D database is running on 4D Server, you can debug the 4D code running on the server from a remote 4D client logged to the project. You just need to attach the debugger to a specific remote machine, and the code execution can be monitored in the debugger directly on the remote machine. + +On a remote machine, the [debugger window](debugger.md) displays a specific server icon and a blue background color to indicate that you are debugging server code: + +![debugger-window-remote](assets/en/Debugging/debuggerWindowRemote.png) + +This feature is particularly useful when 4D Server runs in headless mode (see [Command Line Interface](../Admin/cli.md)), or when access to the server machine is not easy. + + +## Attached debugger + +Only one debugger can debug a 4D Server application at a given time. It is called the **attached debugger**. The attached debugger can be: + +* the local 4D Server debugger (default) - if the server is not running headless. +* the debugger of a remote 4D client - if the remote session has access to Design mode. + +The attached debugger is called whenever a 4D Server encounters: +* a break point +* a `TRACE` command +* a caught command +* an error + +Keep in mind that error messages are sent to the attached debugger machine. This means that in the case of a remote debugger, server error messages are displayed on the remote 4D client. + +Note that: +* The code executed in the `On Server Startup Database` Method cannot be debugged remotely. It can only be debugged on the server side +* If no debugger is attached, the running code is not stopped by debugging commands + +## Attaching the debugger to a remote 4D client + +By default, the debugger is not attached to a remote 4D client: +* If 4D Server is not running headless, the debugger is attached to the server +* If 4D Server is running headless, no debugger is attached + +You can attach the debugger to any remote 4D client allowed to connect to the 4D Server application. + +> The remote 4D client's user session must have access to the Design environment of the database. + +To attach the debugger to a remote 4D client: + +* In the 4D Server menu bar, select **Edit** > **Detach Debugger** so that the debugger becomes available to remote machines. + - This step is useless if the 4D Server is running headless. + - You can attach the debugger back to the server by selecting **Edit** > **Attach debugger** (if not attached to a remote 4D client, see [Rejected attachment requests](#rejected-attachment-requests)). +* In a remote 4D client connected to the server, select **Run** > **Attach Remote Debugger** + +If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the menu command becomes **Detach Remote Debugger**. + +The debugger is then attached to the remote 4D client: +* until the end of the user session +* until you select `Detach Remote Debugger` + +## Attach Debugger or Remote Debugger at Startup + +4D allows you to automatically attach the debugger to a remote 4D client or the server at startup: + +* On the server (if not headless), this option is named **Attach Debugger At Startup**. When the server is started, it automatically attaches the debugger (default). + +> **Warning**: If this option is selected for a server which is subsequently launched in headless mode, the debugger won't be available for this server. + +* On a remote 4D client, this option is named **Attach Remote Debugger At Startup**. When selected, the remote 4D client will automatically try to attach the remote debugger at each subsequent connection to the same 4D Server database. If the attachment is accepted (see [Rejected attachment requests](#rejected-attachment-requests)), the remote debugger is automatically attached to the remote 4D client and the **Detach Remote Debugger option is displayed**. + +> This setting is applied per project and is stored locally in the [`.4DPreferences`](Project/architecture.md#userpreferencesusername) file. + +## Rejected attachment requests + +While the debugger is already attached to a remote 4D client, or to 4D Server (default), no other machine can attach the debugger. + +If a machine tries to attach the debugger while it is already attached, the attachment is rejected and a dialog box appears: + +![attach-debugger-dialog](assets/en/Debugging/attach-debugger-dialog.png) + +![attach-debugger-dialog-2](assets/en/Debugging/attach-debugger-dialog-2.png) + +Attaching the debugger in this case requires that: + +* the attached debugger is detached from the remote 4D client using the **Detach remote debugger** menu command or from the server using the **Detach debugger** command +* the attached remote 4D client session is closed diff --git a/website/translated_docs/pt/Desktop/building.md b/website/translated_docs/pt/Desktop/building.md new file mode 100644 index 00000000000000..9ed836c60bcbf8 --- /dev/null +++ b/website/translated_docs/pt/Desktop/building.md @@ -0,0 +1,694 @@ +--- +id: building +title: Build Application +--- + +4D includes an application builder to create a project package (final build). This builder simplifies the finalization and deployment process for 4D compiled applications. It automatically handles the specific features of different operating systems and facilitates the deployment of client-server applications. + +The application builder allows you to: + +* Build a compiled structure, 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 structure 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). + +> Compiled applications are based upon [.4dz files](#build-compiled-structure) that are **read-only**. Keep in mind that using commands or functions that modify the source files (such as `CREATE INDEX` or `CREATE TABLE` (SQL)) is not possible by default in compiled applications. However, you can build specific applications that support local modifications by using the `PackProject` XML key (see [doc.4d.com](https://doc.4d.com)). + + +## Visão Geral + +Building a project package can be carried out using: + +- either the [`BUILD APPLICATION`](https://doc.4d.com/4dv19/help/command/en/page871.html) command, +- or the [Build Application dialog](#application-builder). + + +### Build application dialog + +To display the Build application dialog, select **Design** > **Build Application...** from the menu bar. + +![](assets/en/Project/buildappProj.png) + +The Build Application dialog includes several pages that can be accessed using tabs: + +![](assets/en/Project/appbuilderProj.png) + + +Building can only be carried out once the project is compiled. If you select this command without having previously compiled the project, or if the compiled code does not correspond to the interpreted code, a warning dialog box appears indicating that the project must be (re)compiled. + + +### 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 project. + +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/4dv19/help/command/en/page871.html) command. + +XML keys provide additional options besides those displayed in the Build Application dialog box. The description of these keys are detailed in the [4D XML Keys BuildApplication](https://doc.4d.com/4Dv19/4D/19/4D-XML-Keys-BuildApplication.100-5447429.en.html) manual. + +### Log file + +When an application is built, 4D generates a log file named *BuildApp.log.xml* in the **Logs** folder of the project. 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, +- Any signing issues (e.g. a non-signed plug-in). + +Checking this file may help you saving time during the subsequent deployment steps, for example if you intend to notarize your application. + +> Use the `Get 4D file(Build application log file)` command to get the log file location. + + +## Application name and destination folder + +![](assets/en/Project/buidappstructureProj.png) + +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 an application containing only compiled code. + +This feature creates a *.4dz* file within a *Compiled Database/\* folder. For example, if you have named your application “MyProjectâ€, 4D will create: + +*\/Compiled Database/MyProject/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. The compact and optimized size of .4dz files makes project packages easy to deploy. + +> When generating .4dz files, 4D uses a **standard** zip format by default. The advantage of this format is that it is easily readable by any unzip tool. If you do not want to use this standard format, add the `UseStandardZipFormat` XML key with value `False` in your [`buildApp.4DSettings`](#build-application-settings) file (for more information, see the *4D XML Keys Backup* manual on [doc.4d.com](https://doc.4d.com)). + + + + +#### Include related folders + +When you check this option, any folders related to the project are copied into the Build folder as *Components* and *Resources* folders. For more information about these folders, refer to the [description of project architecture](Project/architecture.md). + + +### 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 project (the host application project), its functionalities are accessible from the host project. + +If you have named your application, *MyComponent*, 4D will create a *Components* folder containing *MyComponent.4dbase* folder: + +*\/Components/MyComponent.4dbase/MyComponent.4DZ*. + +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). + + +## 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 application project. + +The following elements are required for the build: +- 4D Volume Desktop (the 4D database engine), +- an [appropriate license](#licenses) + +On Windows, this feature creates an executable file (.exe). On macOS, it handles the creation of software packages. + +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/). + +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). + +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). + +#### 4D Volume Desktop Location + +In order to build a stand-alone application, you must first designate the folder containing the 4D Volume Desktop file: + +* *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. + +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). + +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. + +> 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. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +#### Generated files + +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. + +If you have specified "MyProject" as the name of the application, you will find the following files in this subfolder (aka MyProject): + +* *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 project as well as the project 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 project. 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* + - 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/4Dv18R4/4D/18-R4/Application-file.301-4982855.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 + +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: + +* Install a 4D Volume Desktop version corresponding to a specific language; +* Add a custom *PlugIns* folder; +* Customize the contents of the *Resources* folder. +> 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 + +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: + +* *cert.pem* and *key.pem* files (optional): These files are used for TLS connections and by data encryption commands, +* default Web root folder. + +Items must be installed: + +- **on Windows**: in the *Final Application\MyProject\Database* subfolder. +- **on macOS**: next to the *MyProject.app* software package. + + + + + +## Client/Server page + +On this tab, you can build customized client-server applications that are homogenous, cross-platform and with an automatic update option. + +![](assets/en/Project/buildappCSProj.png) + +### What is a Client/Server application? + +A client/server application comes from the combination of three items: + +- A compiled 4D project, +- The 4D Server application, +- The 4D Volume Desktop application (macOS and/or Windows). + +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). + +> If you want to deploy a client/server application in an heterogeneous environment (client applications running on Intel/AMD and Apple Silicon machines), it is recommended to [compile the project for all processors](Project/compiler.md#compilation-target) on a macOS machine, so that all client applications will run natively. + +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 project file 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 server 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). You only need to create and distribute an initial version of the client application, subsequent updates are handled using the automatic update mechanism. +- 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/4dv19/help/command/en/page1291.html) and [RESTART 4D]((https://doc.4d.com/4dv19/help/command/en/page1292.html)). + + + +### Build server application + +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). + +#### 4D Server location + +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. + +#### Current version + +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)). + +#### Allow connection of Silicon Mac clients + +When building a server on Windows, check this option to allow Apple Silicon clients to connect to your server application. You can then specify a path to the structure compiled for Apple Silicon/Intel. + +To allow Apple Silicon clients to connect to a Server application built on Windows, you must first build a client application on macOS, with a project compiled for Apple Silicon and Intel. This automatically creates a compiled structure, identical to the one created with the **[Build compiled structure](#build-compiled-structure)** option (without the related folders). + +Then, you can copy that structure to your Windows machine, and use it to build the server application: + +![](assets/en/Desktop/allow-mac-clients.png) + +#### Compiled structure location + +Path to the compiled structure of the Apple Silicon/Intel client application. + +#### Data linking mode + +This option lets you choose the linking mode between the merged application and the local data file. Two data linking modes are available: + +* **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). + +For more information about the data linking mode, refer to the [Last data file opened](#last-data-file-opened) section. + + +### Build client application + +Checking this option generates the client part of your application during the building phase. + +You can check this option: + +- along with the [**Build server application**](#build-server-application) option to build matching server and client parts for the current platform and (optionally) include the automatic update archive files, +- without selecting the [**Build server application**](#build-server-application) option, usually to build the update archive file to be selected from the "concurrent" platform when building the server part. + +#### 4D Volume Desktop Location + +Designates the location on your disk of the 4D Volume Desktop application to be used to build the client part of your application. + +> The 4D Volume Desktop version number must match the 4D Developer Edition version number. For example, if you use 4D v19, you must select a 4D Volume Desktop v19. + +The 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 the "concurrent" platform, you must carry out an additional build operation using a 4D application running on that platform. + +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`](https://doc.4d.com/4dv19/help/command/en/page871.html) 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 inside the server application + +The options of this area set up the mechanism for updating the client part(s) of your client/server applications using the network each time a new version of the application is generated. These options are only enabled when the **Build client application** option is checked. + +- **Allow automatic update of Windows client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Windows platform in case of update. +- **Allow automatic update of Macintosh client application** - Check this option to build a `.4darchive` file that can be sent to your client applications on the Macintosh platform in case of update. + +The `.4darchive` is copied at the following location: + +``` +_Build/Client Server executable/Upgrade4DClient/ +``` + +#### Selecting client archive for the concurrent platform + + + + +You can check the **Allow automatic update...** option for client applications running on the concurrent platform. This option is only enabled if: + +- the **Build server application** option is checked, +- the **Allow automatic update...** option for client applications running on the current platform is checked. + +This feature requires that you click on the **[...]** button and designate the location on your disk of the file to use for the update. The file to select depends on the current server platform: + +| Current server platform | Required file | Details | +| ----------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| macOS | Windows 4D Volume Desktop *or* Windows client update archive | By default, you select the `4D Volume Desktop` application for Windows. To select a `.4darchive` file previously built on Windows, press **Shift** while clicking on [...] | +| Windows | macOS client update archive | Select a signed `.4darchive` file previously built on macOS | + +You can build specific a `.4darchive` file on the concurrent platform by selecting only the [**Build client application**](#build-client-application) and the appropriate [**Allow automatic update...**](#copy-of-client-applications-inside-the-server-application) option. + + +#### 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). If you have followed the process for generating a cross-platform client application, a .*4darchive* update file is available for each platform: + +To trigger client application update notifications, simply replace the old version of the server application with the new one and then execute it. The rest of the process is automatic. + +On the client side, when the “old†client application tries to connect to the updated server application, a dialog box is displayed on the client machine, indicating that a new version is available. The user can either update their version or cancel the dialog box. + +* If the user clicks **OK**, the new version is downloaded to the client machine over the network. Once the download is complete, the old client application is closed and the new version is launched and connects to the server. The old version of the application is then placed in the machine’s recycle bin. +* If the user clicks **Cancel**, the update is cancelled; if the old version of the client application is not in the range of versions accepted by the server (please refer to the following paragraph), the application is closed and connection is impossible. Otherwise (by default), the connection is established. + +#### Forcing automatic updates + +In some cases, you may want to prevent client applications from being able to cancel the update download. For example, if you used a new version of the 4D Server source application, the new version of the client application must absolutely be installed on each client machine. + +To force the update, simply exclude the current version number of client applications (X-1 and earlier) in the version number range compatible with the server application. In this case, the update mechanism will not allow non-updated client applications to connect. For example, if the new version of the client-server application is 6, you can stipulate that any client application with a version number lower than 6 will not be allowed to connect. + +The [current version number](#current_version) is set on the Client/Server page of the Build Application dialog box. The intervals of authorized numbers are set in the application project using specific [XML keys](#build-application-settings). + + +#### Update Error + +If 4D cannot carry out the update of the client application, the client machine displays the following error message: “The update of the client application failed. The application is now going to quit.†+ +There are many possible causes for this error. When you get this message, it is advisable to check the following parameters first off: + +* **Pathnames** - Check the validity of the pathnames set in the application project via the Application builder dialog box or via XML keys (for example *ClientMacFolderToWin*). More particularly, check the pathnames to the versions of 4D Volume Desktop. +* **Read/write privileges** - On the client machine, check that the current user has write access rights for the client application update. + + +### Generated files + +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*. +> 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. + +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. + +The contents of these folders vary depending on the current platform: + +* *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. + +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. + + +#### Location of Web files + +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* 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 application** - in the *Client Server executable\ \Client* subfolder. + +* **on macOS** + * **Server application** - next to the *\Server* software package. + * **Client application** - next to the *\Client* software package. + + +### Embedding a single-user client application + +4D allows you to embed a compiled structure in the Client application. This feature can be used, for example, to provide users with a "portal" application, that gives access to different server applications thanks to the `OPEN DATABASE` command executing a `.4dlink` file. + +To enable this feature, add the `DatabaseToEmbedInClientWinFolder` and/or `DatabaseToEmbedInClientMacFolder` keys in the *buildApp* settings file. When one of these keys is present, the client application building process generates a single-user application: the compiled structure, instead of the *EnginedServer.4Dlink* file, is placed in the "Database" folder. + +- If a default data folder exists in the single-user application, a licence is embedded. +- If no default data folder exists in the single-user application, it will be executed without data file and without licence. + +The basic scenario is: + +1. In the Build application dialog box, select the "Build compiled structure" option to produce a .4DZ or .4DC for the application to be used in single-user mode. +2. In the *buildApp.4DSettings* file of the client-server application, use following xml key(s) to indicate the path to the folder containing the compiled single user application: + - `DatabaseToEmbedInClientWinFolder` + - `DatabaseToEmbedInClientMacFolder` +3. Build the client-server application. This will have following effects: + - the whole folder of the single user application is copied inside the "Database" folder of the merged client + - the *EnginedServer.4Dlink* file of the "Database" folder is not generated + - the .4DC, .4DZ, .4DIndy files of the single user application copy are renamed using the name of the merged client + - the `PublishName` key is not copied in the *info.plist* of the merged client + - if the single-user application does not have a "Default data" folder, the merged client will run with no data. + +Automatic update 4D Server features ([Current version](#current-version) number, `SET UPDATE FOLDER` command...) work with single-user application as with standard remote application. At connection, the single-user application compares its `CurrentVers` key to the 4D Server version range. If outside the range, the updated client application is downloaded from the server and the Updater launches the local update process. + + +### Customizing client and/or server cache folder names + +Client and server cache folders are used to store shared elements such as resources or components. They are required to manage exchanges between server and remote clients. Client/server applications use default pathnames for both client and server system cache folders. + +In some specific cases, you might need to customize the names of these folders to implement specific architectures (see below). 4D provides you with the `ClientServerSystemFolderName` and `ServerStructureFolderName` keys to be set in the *buildApp* settings file. + + +#### Client cache folder + +Customizing the client-side cache folder name can be useful when your client application is used to connect to several merged servers which are similar but use different data sets. In this case, to save multiple unnecessary downloads of identical local resources, you can use the same custom local cache folder. + +- Default configuration (*for each connection to a server, a specific cache folder is downloaded/updated*): + +![](assets/en/Admin/cachea.png) + +- Using the `ClientServerSystemFolderName` key (*a single cache folder is used for all servers*): + +![](assets/en/Admin/cacheb.png) + + +#### Server cache folder + +Customizing the server-side cache folder name is useful when you run several identical server applications built with different 4D versions on the same computer. If you want each server to use its own set of resources, you need to customize the server cache folder. + +- Default configuration (*same server applications share the same cache folder*): + +![](assets/en/Admin/cacheServera.png) + +- Using the `ServerStructureFolderName` key (*a dedicated cache folder is used for each server application*): + +![](assets/en/Admin/cacheServerb.png) + + + + +## 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: + +![](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. + + + +* **Plugins and components** column - Displays the name of the plug-in/component. + +* **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: + +* 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/Admin/buildappCertif.png) + +### Licenses + +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. + +To remove or add a license, use the **[+]** and **[-]** buttons at the bottom of the window. + +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. + +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. + +Once you have selected a file, the list will indicate the characteristics of the license that it contains. + +* **License #** - Product license number +* **License** - Name of the product +* **Expiration date** - Expiration date of the license (if any) +* **Path** - Location on disk + +If a license is not valid, a message will warn you. + +You can designate as many valid files as you want. When building an executable application, 4D will use the most appropriate license available. +> Dedicated "R" licenses are required to build applications based upon "R-release" versions (license numbers for "R" products start with "R-4DDP"). + +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 + +The application builder can sign merged 4D applications under macOS (single-user applications, components, 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). + +- 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: + +![](assets/en/Admin/buildapposxcertProj.png) + +This option is displayed under both Windows and macOS, but it is only taken into account for macOS versions. + +* **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): + +![](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: [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). +> 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. + +* **Generate self-signed certificate** - runs the "Certificate Assistant" that allows you to generate a self-signed certificate. If you do not have an Apple developer certificate, you need to provide a self-signed certificate. With this certificate, no alert message is displayed if the application is deployed internally. If the application is deployed externally (i.e. through http or email), at launch macOS displays an alert message that the application's developer is unidentified. The user can "force" the opening of the application.

          In the "Certificate Assistant", be sure to select the appropriate options: ![](assets/en/Admin/Cert1.png) ![](assets/en/Admin/Cert2.png) + +> 4D recommends to subscribe to the Apple Developer Program to get access to Developer Certificates that are necessary to notarize applications (see below). + + +#### 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. + +> On Apple Silicon machines, 4D [components](#components) need to be actually signed. An unsigned component will generate an error at application startup ("lib4d-arm64.dylib can't be opened..."). + +The **Sign application** option of the 4D application builder lets you generate applications and components that are compatible with this option by default. + + +#### About Notarization + +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. + +The 4D [built-in signing features](#os-x-signing-certificate) have been adapted 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. + +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). + +## Customizing application icons + +4D associates a default icon with stand-alone, server, and client applications, however you can customize the icon for each application. + +* **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** - 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. + +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: + +- RuntimeVLIconWinPath +- RuntimeVLIconMacPath +- ServerIconWinPath +- ServerIconMacPath +- ClientMacIconForMacPath +- ClientWinIconForMacPath +- 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. + +The opening sequence for launching a merged application is: + +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. + + +### Last data file opened + +#### Path of last 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: + + +```4d +userPrefs:=Get 4D folder(Active 4D Folder) +``` + +The data file path is stored in a dedicated file, named *lastDataPath.xml*. + +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. + +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). + +#### Configuring the data linking mode + +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**. + +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. + +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**. + +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). + + +*Duplication when data linked by application name:* ![](assets/en/Project/datalinking1.png) + +*Duplication when data linked by application path:* ![](assets/en/Project/datalinking2.png) + +You can select the data linking mode during the build application process. You can either: + +- 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). + + +### Defining a default data folder + +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: + +- 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). + + +To define and use a default data file: + +- You provide a default data file (named "Default.4DD") and store it in a default folder (named "Default Data") inside the application project folder. This file must be provided along with all other necessary files, depending on the project 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. + +The following graphic illustrates this feature: + +![](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. + + +## 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. + +### Connection scenario + +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: + +- 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. + +### Storing the last server path + +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: + +```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. + +> - 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 + +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: + +- **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) + +- **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) diff --git a/website/translated_docs/pt/Desktop/clientServer.md b/website/translated_docs/pt/Desktop/clientServer.md new file mode 100644 index 00000000000000..2230ba9cbab9fd --- /dev/null +++ b/website/translated_docs/pt/Desktop/clientServer.md @@ -0,0 +1,96 @@ +--- +id: clientServer +title: Client/Server Management +--- + + +4D Desktop applications can be used in a Client/Server configuration, either as merged client/server applications or as remote projects. + +- **merged client/server applications** are generated by the [Build Application manager](building.md#clientserver-page). They are used for application deployments. + +- **remote projects** are [.4DProject](Project/architecture.md) files opened by 4D Server and accessed with 4D in remote mode. The server sends a .4dz version of the project ([compressed format](building.md#build-compiled-structure)) to the remote 4D, thus structure files are read-only. This configuration is usually used for application testing. + +![](assets/en/getStart/localremote.png) + +> Connecting to a remote projet from the **same machine as 4D Server** allows modifying the project files. This [specific feature](#using-4d-and-4d-server-on-the-same-machine) allows to develop a client/server application in the same context as the deployment context. + + + +## Opening a merged client/server application + +A merged client/server application is customized and its starting is simplified: + +- To launch the server portion, the user simply double-clicks on the server application. The project file 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. + +These principles are detailed in the [Build Application](building.md#what-is-a-clientserver-application) page. + + +## Opening a remote project + +The first time you connect to a 4D Server project via a remote 4D, you will usually use the standard connection dialog. Thereafter, you will be able to connect directly using the **Open Recent Projects** menu or a 4DLink shortcut file. + +To connect remotely to a 4D Server project: + +1. Select **Connect to 4D Server** in the Welcome Wizard dialog,

          OR

          Select **Open/Remote Project...** from the **File** menu or the **Open** toolbar button. + +The 4D Server connection dialog appears. This dialog has three tabs: **Recent**, **Available**, and **Custom**. + +If 4D Server is connected to the same network as the remote 4D, select **Available**. 4D Server includes a built-in TCP/IP broadcasting system that, by default, publishes the name of the 4D Server projects available over the network. The list is sorted by order of appearance and updated dynamically. + +![](assets/en/getStart/serverConnect.png) + +To connect to a server from the list, double-click on its name or select it and click the **OK** button. + +> A circumflex accent (^) is placed before the name of projects published with the encryption option enabled. + +If the published project is not displayed in the **Available** list, select **Custom**. The Custom page allows you to connect to a published server on the network using its network address and assigning it a customized name. + +![](assets/en/getStart/serverConnect2.png) + + +- **Project name**: Defines the local name of the 4D Server project. This name will be used in the **Recent** page when referring to the project. +- **Network address**: The IP address of the machine where the 4D Server was launched.

          If two servers are executed simultaneously on the same machine, the IP address must be followed by a colon and port number, for example: `192.168.92.104:19814`.

          By default, the publishing port of a 4D Server is 19813. This number can be modified in the Project settings. + +Once this page assigns a server, clicking the **OK** button will allow you to connect to the server. + +> If the project is published with the encryption option enabled, you must add a circumflex accent (^) before the name, otherwise the connection will be refused. For more information, refer to the Encrypting Client/Server Connections section. + +Once a connection to the server has been established, the remote project will be listed on the **Recent** tab. + +### Updating project files on the server + +4D Server automatically creates and sends the remote machines a [.4dz version](building.md#build-compiled-structure) of the *.4DProject* project file (not compressed) in interpreted mode. + +- An updated .4dz version of the project is automatically produced when necessary, *i.e.* when the project has been modified and reloaded by 4D Server. The project is reloaded: + - automatically, when the 4D Server application window comes to the front of the OS or when the 4D application on the same machine saves a modification (see below). + - when the `RELOAD PROJECT` command is executed. Calling this command is necessary for example when you have pulled a new version of the project from the source control platform. + + + + +### Updating project files on remote machines + +When an updated .4dz version of the project has been produced on 4D Server, connected remote 4D machines must log out and reconnect to 4D Server in order to benefit from the updated version. + + +## Using 4D and 4D Server on the same machine + +When 4D connects to a 4D Server on the same machine, the application behaves as 4D in single user mode and the design environment allows you to edit project files. This feature allows you to develop a client/server application in the same context as the deployment context. + +Each time 4D performs a **Save all** action from the design environment (explicitly from **File** menu or implicitly by switching to application mode for example), 4D Server synchronously reloads project files. 4D waits for 4D Server to finish reloading the project files before it continues. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](Project/architecture.md): + +- the userPreferences.{username} folder used by 4D is not the same folder used by 4D Server in the project folder. Instead, it is a dedicated folder, named "userPreferences", stored in the project system folder (i.e., the same location as when opening a .4dz project). +- the folder used by 4D for derived data is not the folder named "DerivedData" in the project folder. Instead it is a dedicated folder named "DerivedDataRemote" located in the project system folder. +- the catalog.4DCatalog file is not edited by 4D but by 4D Server. Catalog information is synchronised using client/server requests +- the directory.json file is not edited by 4D but by 4D Server. Directory information is synchronised using client/server requests +- 4D uses its own internal components and plug-ins instead of those in 4D Server. + +> It is not recommended to install plug-ins or components at the 4D or 4D Server application level. + + + + + diff --git a/website/translated_docs/pt/Events/onActivate.md b/website/translated_docs/pt/Events/onActivate.md index 6b75254206aa8c..1d604e2ad35440 100644 --- a/website/translated_docs/pt/Events/onActivate.md +++ b/website/translated_docs/pt/Events/onActivate.md @@ -3,13 +3,15 @@ id: onActivate title: On Activate --- -| Code | Can be called by | Definition | -| ---- | ---------------- | ---------------------------------------------- | -| 11 | Form | The form's window becomes the frontmost window | +| Code | Can be called by | Definition | +| ---- | ---------------- | ---------------------------------------------------------------------------------------- | +| 11 | Form | The form's window becomes the frontmost window or the subform's container gets the focus | ## Description If the window of a form was sent to the background, this event is called when the window becomes the frontmost window. -This event applies to the form as a whole and not to a particular object. Consequently, if the `On Activate` form event property is selected, only the form will have its form method called. \ No newline at end of file +This event applies to the form as a whole and not to a particular object. Consequently, if the `On Activate` form event property is selected, only the form will have its form method called. + +In the case of a subform, this event is passed to the subform when the container gets the focus (if it has the [focusable](FormObjects/properties_Entry.md#focusable) property). \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onAfterEdit.md b/website/translated_docs/pt/Events/onAfterEdit.md index 05c77ab50034fd..4c9580463ea7e5 100644 --- a/website/translated_docs/pt/Events/onAfterEdit.md +++ b/website/translated_docs/pt/Events/onAfterEdit.md @@ -33,7 +33,6 @@ The object returned by the `FORM Event` command contains: | sheetName | text | Name of the sheet of the event | | action | text | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" | - Depending on the `action` property value, the [event object](overview.md#event-object) will contain additional properties. #### action = editChange @@ -43,7 +42,6 @@ Depending on the `action` property value, the [event object](overview.md#event-o | range | object | Cell range | | editingText | variant | The value from the current editor | - #### action = valueChanged | Property | Type | Description | @@ -68,107 +66,43 @@ Depending on the `action` property value, the [event object](overview.md#event-o | Property | Type | Description | | --------- | ------ | ------------------- | | fillRange | object | Range used for fill | - autoFillType|longint|Value used for the fill. - -- 0: Cells are filled with all data (values, formatting, and formulas) - - 1: Cells are filled with automatically sequential data - - 2: Cells are filled with formatting only - - 3: Cells are filled with values but not formatting - - 4: Values are removed from the cells - - 5: Cells are filled automatically| |fillDirection|longint|Direction of the fill. - - 0: The cells to the left are filled - - 1: The cells to the right are filled - - 2: The cells above are filled - - 3: The cells below are filled| - #### action = formulaChanged - - | Property | Type | Description | - | -------- | ------ | ------------------- | - | range | object | Cell range | - | formula | text | The formula entered | - - - #### action = clipboardPasted - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - Property - - Type - - Description -
          - range - - object - - Cell range -
          - pasteOption - - longint - - Specifies what is pasted from the clipboard: - -
        • - 0: Everything is pasted (values, formatting, and formulas)
        • - 1: Only values are pasted
        • - 2: Only the formatting is pasted
        • - 3: Only formulas are pasted
        • - 4: Values and formatting are pasted (not formulas)
        • - 5: Formulas and formatting are pasted (not values)
        • - pasteData - - object - - The data from the clipboard to be pasted - -
        • - "text" (text): The text from the clipboard
        • - "html" (text): The HTML from the clipboard
        • - Example -

          -

          - Here is an example handling an On After Edit event: -

          -
           If(FORM Event.code=On After Edit)
          + autoFillType|longint|Value used for the fill.
        • 0: Cells are filled with all data (values, formatting, and formulas)
        • 1: Cells are filled with automatically sequential data
        • 2: Cells are filled with formatting only
        • 3: Cells are filled with values but not formatting
        • 4: Values are removed from the cells
        • 5: Cells are filled automatically| |fillDirection|longint|Direction of the fill.
        • 0: The cells to the left are filled
        • 1: The cells to the right are filled
        • 2: The cells above are filled
        • 3: The cells below are filled| + + +#### action = formulaChanged + +| Property | Type | Description | +| -------- | ------ | ------------------- | +| range | object | Cell range | +| formula | text | The formula entered | + +#### action = clipboardPasted + +| Property | Type | Description | +| ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| range | object | Cell range | +| pasteOption | longint | Specifies what is pasted from the clipboard:
        • 0: Everything is pasted (values, formatting, and formulas)
        • 1: Only values are pasted
        • 2: Only the formatting is pasted
        • 3: Only formulas are pasted
        • 4: Values and formatting are pasted (not formulas)
        • 5: Formulas and formatting are pasted (not values) | +| pasteData | object | The data from the clipboard to be pasted
        • "text" (text): The text from the clipboard
        • "html" (text): The HTML from the clipboard | + + +#### Example + +Here is an example handling an `On After Edit` event: + +```4d + If(FORM Event.code=On After Edit) If(FORM Event.action="valueChanged") ALERT("WARNING: You are currently changing the value\ from "+String(FORM Event.oldValue)+\ " to "+String(FORM Event.newValue)+"!") End if End if -
        • -

          - The above example could generate an event object like this: -

          -
          {
          +```
          +
          +The above example could generate an event object like this:
          +
          +```
          +{
           
           "code":45;
           "description":"On After Edit";
          @@ -179,4 +113,4 @@ Depending on the `action` property value, the [event object](overview.md#event-o
           "oldValue":"The quick brown fox";
           "newValue":"jumped over the lazy dog";
           }
          -
          \ No newline at end of file +``` \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onAfterKeystroke.md b/website/translated_docs/pt/Events/onAfterKeystroke.md index 5e3e551d49dd98..c17165a9b276c4 100644 --- a/website/translated_docs/pt/Events/onAfterKeystroke.md +++ b/website/translated_docs/pt/Events/onAfterKeystroke.md @@ -7,6 +7,13 @@ title: On After Keystroke | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | 28 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **including** this character. | +
          History + +| Version | Changes | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

          - The event is now triggered after IME validation | +

          + ## Description @@ -14,12 +21,21 @@ title: On After Keystroke After the [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` event properties are selected for an object, you can detect and handle the keystrokes within the object, using the `FORM event` command that will return `On Before Keystroke` and then `On After Keystroke` (for more information, please refer to the description of the `Get edited text` command). -These events are also activated by language commands that simulate a user action like `POST KEY`. +> These events are also activated by language commands that simulate a user action like `POST KEY`. -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +The `On After Keystroke` event is not generated: -> The [`On Before Keystroke`](onBeforeKeystroke.md) and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. +- in [list box columns](FormObjects/listbox_overview.md#list-box-columns) method except when a cell is being edited (however it is generated in any cases in the [list box](FormObjects/listbox_overview.md) method), +- when user modifications are not carried out using the keyboard (paste, drag-and-drop, checkbox, drop down list, combo box). To process these events, you must use [`On After Edit`](onAfterEdit.md). -### See also +### Keystroke sequence + +When an entry requires a sequence of keystrokes, the [`On Before Keystroke`](onBeforeKeystroke.md) and [`On After Keystroke event`] events are generated only when the entry is fully validaded by the user. The `Keystroke` command returns the validated character. This case mainly occurs: + +- when using "dead" keys such as ^ or ~: events are generated only when the extended character is eventuelly entered (e.g. "ê" or ñ), +- when an IME (Input method editor) displays an intermediary dialog box where the user can enter a combination of characters: events are generated only when the IME dialog is validated. + + +### See also [On Before Keystroke](onBeforeKeystroke.md). \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onAfterSort.md b/website/translated_docs/pt/Events/onAfterSort.md index e2918c033e1008..d600157ca3de50 100644 --- a/website/translated_docs/pt/Events/onAfterSort.md +++ b/website/translated_docs/pt/Events/onAfterSort.md @@ -10,4 +10,4 @@ title: On After Sort ## Description -This event is generated just after a standard sort is performed (*i.e.* it is NOT generated if $0 returns -1 in the [`On Header Click`](onHeaderClick.md) event). This mechanism is useful for storing the directions of the last sort performed by the user. In this event, the `Self` command returns a pointer to the variable of the sorted column header. \ No newline at end of file +This event is generated just after a standard sort is performed (*i.e.* it is NOT generated if $0 returns -1 in the [`On Header Click`](onHeaderClick.md) event). This mechanism is useful for storing the directions of the last sort performed by the user. In this event, the `Self` command returns a pointer to the variable of the sorted column header. diff --git a/website/translated_docs/pt/Events/onAlternativeClick.md b/website/translated_docs/pt/Events/onAlternativeClick.md index 4e3558f95a1f16..3b46475194327f 100644 --- a/website/translated_docs/pt/Events/onAlternativeClick.md +++ b/website/translated_docs/pt/Events/onAlternativeClick.md @@ -3,65 +3,28 @@ id: onAlternativeClick title: On Alternative Click --- - - - - - - - - - - - - - - -
          - Code - - Can be called by - - Definition -
          - 38 - - Button - List Box - List Box Column - -
        • - Buttons: The "arrow" area of a button is clicked
        • - List boxes: In a column of an object array, an ellipsis button ("alternateButton" attribute) is clicked
        • - Description -

          -

          - Buttons -

          -

          - Some button styles can be linked to a pop-up menu and display an triangle. Clicking on this triangle causes a selection pop-up to appear that provides a set of alternative actions in relation to the primary button action. -

          -

          - 4D allows you to manage this type of button using the On Alternative Click event. This event is generated when the user clicks on the triangle (as soon as the mouse button is held down): -

          -
            -
          • - If the pop-up menu is separated,the event is only generated when a click occurs on the portion of the button with the arrow. -
          • -
          • - If the pop-up menu is linked, the event is generated when a click occurs on any part of the button. Note that the On Long Click event cannot be generated with this type of button. -
          • -
          -

          - -

          -

          - List box -

          -

          - This event is generated in columns of object array type list boxes, when the user clicks on a widget ellipsis button ("alternateButton" attribute). -

          -

          - -

          -

          - See the description of the "alternateButton" attribute. -

          \ No newline at end of file +| Code | Can be called by | Definition | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 38 | [Button](FormObjects/button_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) |
        • Buttons: The "arrow" area of a button is clicked
        • List boxes: In a column of an object array, an ellipsis button ("alternateButton" attribute) is clicked | + + +## Description + +### Buttons + +Some button styles can be [linked to a pop-up menu](FormObjects/properties_TextAndPicture.md#with-pop-up-menu) and display an triangle. Clicking on this triangle causes a selection pop-up to appear that provides a set of alternative actions in relation to the primary button action. + +4D allows you to manage this type of button using the `On Alternative Click` event. This event is generated when the user clicks on the triangle (as soon as the mouse button is held down): + +- If the pop-up menu is **separated**,the event is only generated when a click occurs on the portion of the button with the arrow. +- If the pop-up menu is **linked**, the event is generated when a click occurs on any part of the button. Note that the [`On Long Click`](onLongClick.md) event cannot be generated with this type of button. + +![](assets/en/Events/clickevents.png) + +### List box + +This event is generated in columns of [object array type list boxes](FormObjects/listbox_overview.md#object-arrays-in-columns-4d-view-pro), when the user clicks on a widget ellipsis button ("alternateButton" attribute). + +![](assets/en/FormObjects/listbox_column_objectArray_alternateButton.png) + +See the [description of the "alternateButton" attribute](FormObjects/listbox_overview.md#alternatebutton). diff --git a/website/translated_docs/pt/Events/onBeforeKeystroke.md b/website/translated_docs/pt/Events/onBeforeKeystroke.md index bd8102ce2e8802..8ab487f8388995 100644 --- a/website/translated_docs/pt/Events/onBeforeKeystroke.md +++ b/website/translated_docs/pt/Events/onBeforeKeystroke.md @@ -7,16 +7,38 @@ title: On Before Keystroke | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | 17 | [4D Write Pro area](FormObjects/writeProArea_overview) - [Combo Box](FormObjects/comboBox_overview.md) - Form - [Input](FormObjects/input_overview.md) - [List Box](FormObjects/listbox_overview.md) - [List Box Column](FormObjects/listbox_overview.md#list-box-columns) | A character is about to be entered in the object that has the focus. `Get edited text` returns the object's text **without** this character. | +
          History + +| Version | Changes | +| ------- | ---------------------------------------------------------------------------------------------------------------- | +| v18 R5 | - Support in non-enterable list boxes

          - The event is now triggered after IME validation | +

          + ## Description -After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) properties are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). +After the `On Before Keystroke` and [`On After Keystroke event`](onAfterKeystroke.md) events are selected for an object, you can detect and handle the keystrokes within the object, using the `Form event code` command that will return `On Before Keystroke` and then [`On After Keystroke event`](onAfterKeystroke.md) (for more information, please refer to the description of the `Get edited text` command). Within the `On Before Keystroke` event, the `FILTER KEYSTROKE` command can be used to filter typed chars. + +> These events are also activated by language commands that simulate a user action like `POST KEY`. + +The `On Before Keystroke` event is not generated: + +- in a [list box column](FormObjects/listbox_overview.md#list-box-columns) method except when a cell is being edited (however it is generated in any cases in the [list box](FormObjects/listbox_overview.md) method), +- when user modifications are not carried out using the keyboard (paste, drag-and-drop, checkbox, drop down list, combo box). To process these events, you must use [`On After Edit`](onAfterEdit.md). + + +### Non-enterable objects + +The `On Before Keystroke` event can be generated in non-enterable objects, e.g. in a list box even if the list box cells are not enterable, or rows are not selectable. This allows you to build interfaces where the user can scroll dynamically to a specific row in a list box by entering the first letters of a value. In case where the list box cells are enterable, you can use the `Is editing text` command to know if the user is actually entering text in a cell or is using the type-ahead feature and then, execute appropriate code. + + +### Keystroke sequence -These events are also activated by language commands that simulate a user action like `POST KEY`. +When an entry requires a sequence of keystrokes, the `On Before Keystroke` and [`On After Keystroke`](onAfterKeystroke.md) events are generated only when the entry is fully validaded by the user. The `Keystroke` command returns the validated character. This case mainly occurs: -Keep in mind that user modifications that are not carried out using the keyboard (paste, drag-drop, etc.) are not taken into account. To process these events, you must use [`On After Edit`](onAfterEdit.md). +- when using "dead" keys such as ^ or ~: events are generated only when the extended character is eventuelly entered (e.g. "ê" or ñ), +- when an IME (Input method editor) displays an intermediary dialog box where the user can enter a combination of characters: events are generated only when the IME dialog is validated. -> The `On Before Keystroke` and `On After Keystroke` events are not generated when using an input method. An input method (or IME, Input Method Editor) is a program or a system component that can be used to enter complex characters or symbols (for example, Japanese or Chinese) using a Western keyboard. ### See also diff --git a/website/translated_docs/pt/Events/onBeginDragOver.md b/website/translated_docs/pt/Events/onBeginDragOver.md index 6217d30e98ecc0..1f729e35594611 100644 --- a/website/translated_docs/pt/Events/onBeginDragOver.md +++ b/website/translated_docs/pt/Events/onBeginDragOver.md @@ -18,9 +18,9 @@ The `On Begin Drag Over` event is useful for preparing of the drag action. It ca - Add data and signatures to the pasteboard (via the `APPEND DATA TO PASTEBOARD` command). - Use a custom icon during the drag action (via the `SET DRAG ICON` command). -- Accept or refuse dragging via $0 in the method of the dragged object. - - To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute `$0:=0`. - - To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute `$0:=-1`. +- Accept or refuse dragging via $0 in the method of the dragged object. + - To indicate that drag actions are accepted, the method of the source object must return 0 (zero); you must therefore execute `$0:=0`. + - To indicate that drag actions are refused, the method of the source object must return -1 (minus one); you must therefore execute `$0:=-1`. - If no result is returned, 4D considers that drag actions are accepted. 4D data are put in the pasteboard before calling the event. For example, in the case of dragging without the **Automatic Drag** action, the dragged text is already in the pasteboard when the event is called. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onClicked.md b/website/translated_docs/pt/Events/onClicked.md index d7bb95860d38da..0d83346b416fee 100644 --- a/website/translated_docs/pt/Events/onClicked.md +++ b/website/translated_docs/pt/Events/onClicked.md @@ -20,7 +20,7 @@ The `On Clicked` event usually occurs once the mouse button is released. However - [Rulers](FormObjects/ruler.md): If the [Execute object method](FormObjects/properties_Action.md#execute-object-method) option is set to **true**, the `On Clicked` event occurs as soon as the click is made. - [Combo boxes](FormObjects/comboBox_overview.md): The `On Clicked` event occurs only if the user selects another value in the associated menu. A [combo box](FormObjects/comboBox_overview.md) must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the `On Before Keystroke`, `On After Keystroke` and `On Data Change` events. - [Drop-down lists](FormObjects/dropdownList_Overview.md): The `On Clicked` event occurs only if the user selects another value in the menu. The `On Data Change` event allows you to detect the activation of the object when a value different from the current value is selected -- The `On Clicked` event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a list box [column](FormObjects/listbox_overview.md#list-box-columns) or [column header](FormObjects/listbox_overview.md#list-box-headers). +- When a list box input cell is [being edited](FormObjects/listbox_overview.md#managing-entry), the `On Clicked` event is generated when the mouse button is pressed, allowing to use the `Contextual click` command for example. In the context of an `On Clicked` event, you can test the number of clicks made by the user by means of the `Clickcount` command. @@ -42,7 +42,6 @@ This event is generated when the user clicks anywhere on a 4D View Pro document. | sheetName | text | Name of the sheet of the event | | range | object | Cell range | - #### Example ```4d diff --git a/website/translated_docs/pt/Events/onCloseDetail.md b/website/translated_docs/pt/Events/onCloseDetail.md index 5a456aceb2dd9e..aff0e4a7212340 100644 --- a/website/translated_docs/pt/Events/onCloseDetail.md +++ b/website/translated_docs/pt/Events/onCloseDetail.md @@ -12,5 +12,6 @@ title: On Close Detail The `On Close Detail` event can be used in the following contexts: -- **Output forms**: the detail form is closed and the user goes back to the list form. This event cannot be selected for project forms, it is only available with **table forms**. -- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record displayed in the [detail form](FormObjects/properties_ListBox.md#detail-form-name) associated with a selection type list box is about to be closed (regardless of whether or not the record was modified). \ No newline at end of file +- **Output forms**: the detail form is closed and the user goes back to the list form. This event cannot be selected for project forms, it is only available with **table forms**. +- List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record displayed in the [detail form](FormObjects/properties_ListBox.md#detail-form-name) associated with a selection type list box is about to be closed (regardless of whether or not the record was modified). + diff --git a/website/translated_docs/pt/Events/onCollapse.md b/website/translated_docs/pt/Events/onCollapse.md index 607d1aa470deab..74a61fccee969b 100644 --- a/website/translated_docs/pt/Events/onCollapse.md +++ b/website/translated_docs/pt/Events/onCollapse.md @@ -13,6 +13,6 @@ title: On Collapse - [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is collapsed with a mouse click or keystroke. - [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is collapsed. -### See also +### See also [On Expand](onExpand.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onColumnMoved.md b/website/translated_docs/pt/Events/onColumnMoved.md index 32332a0da0266f..3811e4eaf71094 100644 --- a/website/translated_docs/pt/Events/onColumnMoved.md +++ b/website/translated_docs/pt/Events/onColumnMoved.md @@ -12,4 +12,4 @@ title: On Column Moved This event is generated when a column of the list box is moved by the user using drag and drop ([if allowed](FormObjects/propertiesListBox.html#locked-columns-and-static-columns)). It is not generated if the column is dragged and then dropped in its initial location. -The `LISTBOX MOVED COLUMN NUMBER` command returns the new position of the column. \ No newline at end of file +The `LISTBOX MOVED COLUMN NUMBER` command returns the new position of the column. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onColumnResize.md b/website/translated_docs/pt/Events/onColumnResize.md index 7f9a282deb0ae2..e4093cd654ff0e 100644 --- a/website/translated_docs/pt/Events/onColumnResize.md +++ b/website/translated_docs/pt/Events/onColumnResize.md @@ -29,7 +29,6 @@ This event is generated when the width of a column is modified by a user. On thi | range | object | Cell range of the columns whose widths have changed | | header | boolean | True if the row header column (first column) is resized, else false | - #### Example ```4d diff --git a/website/translated_docs/pt/Events/onDataChange.md b/website/translated_docs/pt/Events/onDataChange.md index 42ad72458ee0dd..ba40af9de83cc5 100644 --- a/website/translated_docs/pt/Events/onDataChange.md +++ b/website/translated_docs/pt/Events/onDataChange.md @@ -14,4 +14,5 @@ When the `On Data Change` event property is selected for an object, you can dete The event is generated as soon as the variable associated with the object is updated internally by 4D (i.e., in general, when the entry area of the object loses the focus). -> With [subforms](FormObjects/subform_overview.md), the `On Data Change` event is triggered when the value of the variable of the subform object has been modified. \ No newline at end of file +> With [subforms](FormObjects/subform_overview.md), the `On Data Change` event is triggered when the value of the variable of the subform object has been modified. + diff --git a/website/translated_docs/pt/Events/onDeactivate.md b/website/translated_docs/pt/Events/onDeactivate.md index 46255c6142e223..2fe2c3badc2b41 100644 --- a/website/translated_docs/pt/Events/onDeactivate.md +++ b/website/translated_docs/pt/Events/onDeactivate.md @@ -15,5 +15,4 @@ If the window of a form was the frontmost window, this event is called when the This event applies to the form as a whole and not to a particular object. Consequently, if the `On Deactivate` form event property is selected, only the form will have its form method called. ### See also - [On Activate](onActivate.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onDeleteAction.md b/website/translated_docs/pt/Events/onDeleteAction.md index 08370f06f0c64c..7d73a4796bb9c5 100644 --- a/website/translated_docs/pt/Events/onDeleteAction.md +++ b/website/translated_docs/pt/Events/onDeleteAction.md @@ -12,4 +12,4 @@ title: On Delete Action This event is generated each time a user attempts to delete the selected item(s) by pressing a deletion key (**Delete** or **Backspace**) or selecting a menu item whose associated standard action is 'Clear' (such as the **Clear** command in the **Edit** menu). -Note that generating the event is the only action carried out by 4D: the program does not delete any items. It is up to the developer to handle the deletion and any prior warning messages that are displayed. \ No newline at end of file +Note that generating the event is the only action carried out by 4D: the program does not delete any items. It is up to the developer to handle the deletion and any prior warning messages that are displayed. diff --git a/website/translated_docs/pt/Events/onDisplayDetail.md b/website/translated_docs/pt/Events/onDisplayDetail.md index 2976e27a159561..cec66e005ee3fd 100644 --- a/website/translated_docs/pt/Events/onDisplayDetail.md +++ b/website/translated_docs/pt/Events/onDisplayDetail.md @@ -20,8 +20,8 @@ A record is about to be displayed in a list form displayed via `DISPLAY SELECTIO In this context, the following sequence of calls to methods and form events is triggered: -- For each record: - - For each object in the detail area: +- For each record: + - For each object in the detail area: - Object method with `On Display Detail` event - Form method with `On Display Detail` event @@ -29,10 +29,12 @@ In this context, the following sequence of calls to methods and form events is t Calling a 4D command that displays a dialog box from the `On Display Detail` event is not allowed and will cause a syntax error to occur. More particularly, the commands concerned are: `ALERT`, `DIALOG`, `CONFIRM`, `Request`, `ADD RECORD`, `MODIFY RECORD`, `DISPLAY SELECTION`, and `MODIFY SELECTION`. + ### Selection list box This event is generated when a row of a [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes) list box is displayed. + ### Displayed line number -The `Displayed line number` 4D command works with the `On Display Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +The `Displayed line number` 4D command works with the `On Display Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. diff --git a/website/translated_docs/pt/Events/onDoubleClicked.md b/website/translated_docs/pt/Events/onDoubleClicked.md index 33081b0fa91d48..cd39131cc29f66 100644 --- a/website/translated_docs/pt/Events/onDoubleClicked.md +++ b/website/translated_docs/pt/Events/onDoubleClicked.md @@ -28,7 +28,6 @@ This event is generated when the user doubl-clicks anywhere on a 4D View Pro doc | sheetName | text | Name of the sheet of the event | | range | object | Cell range | - #### Example ```4d diff --git a/website/translated_docs/pt/Events/onDragOver.md b/website/translated_docs/pt/Events/onDragOver.md index ec949d63a8fc21..fe990ca099f616 100644 --- a/website/translated_docs/pt/Events/onDragOver.md +++ b/website/translated_docs/pt/Events/onDragOver.md @@ -13,7 +13,7 @@ title: On Drag Over The `On Drag Over` event is repeatedly sent to the destination object when the mouse pointer is moved over the object. In response to this event, you usually: - Get the data and signatures found in the pasteboard (via the `GET PASTEBOARD DATA` command). -- Depending on the nature and type of data in the pasteboard, you **accept** or **reject** the drag and drop. +- Depending on the nature and type of data in the pasteboard, you **accept** or **reject** the drag and drop. To **accept** the drag, the destination object method must return 0 (zero), so you write `$0:=0`. To **reject** the drag, the object method must return -1 (minus one), so you write `$0:=-1`. During an `On Drag Over` event, 4D treats the object method as a function. If no result is returned, 4D assumes that the drag is accepted. @@ -25,6 +25,6 @@ The `On Drag Over` event is the means by which you control the first phase of a The code handling an `On Drag Over` event should be short and execute quickly, because that event is sent repeatedly to the current destination object, due to the movements of the mouse. -#### See also +#### See also [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onDrop.md b/website/translated_docs/pt/Events/onDrop.md index 7a8914c071042d..fc046d03379cbf 100644 --- a/website/translated_docs/pt/Events/onDrop.md +++ b/website/translated_docs/pt/Events/onDrop.md @@ -14,6 +14,7 @@ The `On Drop` event is sent once to the destination object when the mouse pointe This event is not sent to the object if the drag was not accepted during the [`On Drag Over`](onDragOver.md) events. If you process the `On Drag Over` event for an object and reject a drag, the `On Drop` event does not occur. Thus, if during the `On Drag Over` event you have tested the data type compatibility between the source and destination objects and have accepted a possible drop, you do not need to re-test the data during the `On Drop`. You already know that the data is suitable for the destination object. -#### See also + +#### See also [`On Begin Drag Over`](onBeginDragOver.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onEndUrlLoading.md b/website/translated_docs/pt/Events/onEndUrlLoading.md index 03e029d8a18fde..d709c273a971bb 100644 --- a/website/translated_docs/pt/Events/onEndUrlLoading.md +++ b/website/translated_docs/pt/Events/onEndUrlLoading.md @@ -10,4 +10,4 @@ title: On End URL Loading ## Description -This event is generated once the loading of all resources of the URL is complete. You can call the `WA Get current URL` command in order to find out the URL that was loaded. \ No newline at end of file +This event is generated once the loading of all resources of the URL is complete. You can call the `WA Get current URL` command in order to find out the URL that was loaded. diff --git a/website/translated_docs/pt/Events/onExpand.md b/website/translated_docs/pt/Events/onExpand.md index 67db2ebde546e7..1142965c13753f 100644 --- a/website/translated_docs/pt/Events/onExpand.md +++ b/website/translated_docs/pt/Events/onExpand.md @@ -13,6 +13,6 @@ title: On Expand - [Hierarchical list](FormObjects/list_overview.md): This event is generated every time an element of the hierarchical list is expanded with a mouse click or keystroke. - [Hierarchical list boxes](FormObjects/listbox_overview.md#hierarchical-list-boxes): This event is generated when a row of the hierarchical list box is expanded. -### See also +### See also [On Collapse](onCollapse.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onFooterClick.md b/website/translated_docs/pt/Events/onFooterClick.md index f015de2e130e02..12676680ed5491 100644 --- a/website/translated_docs/pt/Events/onFooterClick.md +++ b/website/translated_docs/pt/Events/onFooterClick.md @@ -12,4 +12,4 @@ title: On Footer Click This event is available for a list box or list box column object. It is generated when a click occurs in the footer of a list box column. In this context, the `OBJECT Get pointer` command returns a pointer to the variable of the footer that is clicked. The event is generated for both left and right clicks. -You can test the number of clicks made by the user by means of the `Clickcount` command. \ No newline at end of file +You can test the number of clicks made by the user by means of the `Clickcount` command. diff --git a/website/translated_docs/pt/Events/onGettingFocus.md b/website/translated_docs/pt/Events/onGettingFocus.md index 7063146ae5d77c..9c9306993ef087 100644 --- a/website/translated_docs/pt/Events/onGettingFocus.md +++ b/website/translated_docs/pt/Events/onGettingFocus.md @@ -12,4 +12,4 @@ title: On Getting focus The `On Getting Focus` event, along with the [`On losing Focus`](onLosingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. diff --git a/website/translated_docs/pt/Events/onHeader.md b/website/translated_docs/pt/Events/onHeader.md index f0f7bee62222a3..fb1708d2926e74 100644 --- a/website/translated_docs/pt/Events/onHeader.md +++ b/website/translated_docs/pt/Events/onHeader.md @@ -16,7 +16,7 @@ The `On Header` event is called when a record is about to be displayed in a list In this context, the following sequence of calls to methods and form events is triggered: -- For each object in the header area: +- For each object in the header area: - Object method with `On Header` event - Form method with `On Header` event diff --git a/website/translated_docs/pt/Events/onHeaderClick.md b/website/translated_docs/pt/Events/onHeaderClick.md index 9d74656f7f8a3e..dced112e6a9a63 100644 --- a/website/translated_docs/pt/Events/onHeaderClick.md +++ b/website/translated_docs/pt/Events/onHeaderClick.md @@ -14,8 +14,6 @@ title: On Header Click This event is generated when a click occurs on the header of a column in the list box. In this case, the `Self` command lets you find out the header of the column that was clicked. -> The [`On Clicked`](onClicked.md) event is generated when a right click (Windows) or Ctrl+click (macOS) occurs on a column or column header. You can test the number of clicks made by the user by means of the `Clickcount` command. - If the [Sortable](FormObjects/properties_Action.md#sortable) property was selected for the list box, you can decide whether or not to authorize a standard sort of the column by passing the value 0 or -1 in the `$0` variable: - If `$0` equals 0, a standard sort is performed. @@ -27,117 +25,14 @@ If the [Sortable](FormObjects/properties_Action.md#sortable) property is not sel This event is generated when the user clicks on a column or row header in a 4D View Pro document. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          - Property - - Type - - Description -
          - code - - longint - - 42 -
          - description - - text - - "On Header Click" -
          - objectName - - text - - 4D View Pro area name -
          - sheetName - - text - - Name of the sheet of the event -
          - range - - object - - Cell range -
          - sheetArea - - longint - - The sheet location where the event took place:
          - -
        • - 0: The crossing area between column number/letter headers (top left of the sheet) -
        • - -
        • - 1: The column headers (area indicating the column numbers/letters) -
        • - -
        • - 2: The row headers (area indicating the row numbers) -
        • -
          +| Property | Type | Description | +| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| code | longint | 42 | +| description | text | "On Header Click" | +| objectName | text | 4D View Pro area name | +| sheetName | text | Name of the sheet of the event | +| range | object | Cell range | +| sheetArea | longint | The sheet location where the event took place:
        • 0: The crossing area between column number/letter headers (top left of the sheet)
        • 1: The column headers (area indicating the column numbers/letters)
        • 2: The row headers (area indicating the row numbers)
        • | #### Example diff --git a/website/translated_docs/pt/Events/onLoad.md b/website/translated_docs/pt/Events/onLoad.md index 863e12e130562a..0a803c759a9503 100644 --- a/website/translated_docs/pt/Events/onLoad.md +++ b/website/translated_docs/pt/Events/onLoad.md @@ -16,10 +16,12 @@ All the objects of the form (from any page) whose `On Load` object event propert > The `On Load` and [`On Unload`](onUnload.md) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. + ### Subform The `On Load` event is generated when opening the subform (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is displayed (and not when the form is displayed). + ### See also [`On Unload`](onUnload.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onLoadRecord.md b/website/translated_docs/pt/Events/onLoadRecord.md index d7813d894670ff..1483bdf87ea0e7 100644 --- a/website/translated_docs/pt/Events/onLoadRecord.md +++ b/website/translated_docs/pt/Events/onLoadRecord.md @@ -12,4 +12,7 @@ title: On Load Record The `On Load Record` event can only be used in the context of an **output form**. It is triggered during data entry in list, after a record is highlighted and a field changes to editing mode. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file +> This event cannot be selected for project forms, it is only available with **table forms**. + + + diff --git a/website/translated_docs/pt/Events/onLongClick.md b/website/translated_docs/pt/Events/onLongClick.md index 2eb6ab55c59578..571bec0a32f038 100644 --- a/website/translated_docs/pt/Events/onLongClick.md +++ b/website/translated_docs/pt/Events/onLongClick.md @@ -27,5 +27,4 @@ This event can be generated for the following button styles: This event is generally used to display pop-up menus in case of long button clicks. The [`On Clicked`](onClicked.md) event, if enabled, is generated if the user releases the mouse button before the "long click" time limit. ### See also - [`On Alternative Click`](onAlternativeClick.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onLosingFocus.md b/website/translated_docs/pt/Events/onLosingFocus.md index daff4171a605d7..001aedae4d9742 100644 --- a/website/translated_docs/pt/Events/onLosingFocus.md +++ b/website/translated_docs/pt/Events/onLosingFocus.md @@ -12,4 +12,4 @@ title: On Losing focus The `On Losing Focus` event, along with the [`On Getting Focus`](onGettingFocus.md) event, are used to detect and handle the change of focus for [focusable](FormObjects/properties_Entry.md#focusable) objects. -With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. \ No newline at end of file +With [subform objects](FormObjects/subform_overview.md), this event is generated in the method of the subform object when they it is checked. It is sent to the form method of the subform, which means, for example, that you can manage the display of navigation buttons in the subform according to the focus. Note that subform objects can themselves have the focus. diff --git a/website/translated_docs/pt/Events/onMenuSelected.md b/website/translated_docs/pt/Events/onMenuSelected.md index fde928f8373807..990b04be42a2fe 100644 --- a/website/translated_docs/pt/Events/onMenuSelected.md +++ b/website/translated_docs/pt/Events/onMenuSelected.md @@ -12,4 +12,4 @@ title: On Menu Selected The `On Menu Selected` event is sent to the form method when a command of a menu bar associated to the form is selected. You can then call the `Menu selected` language command to test the selected menu. -> You can associate a menu bar with a form in the Form properties. The menus on a form menu bar are appended to the current menu bar when the form is displayed as an output form in the Application environment. \ No newline at end of file +> You can associate a menu bar with a form in the Form properties. The menus on a form menu bar are appended to the current menu bar when the form is displayed as an output form in the Application environment. diff --git a/website/translated_docs/pt/Events/onMouseEnter.md b/website/translated_docs/pt/Events/onMouseEnter.md index 150038ccbd21a4..a79babed0a2bc1 100644 --- a/website/translated_docs/pt/Events/onMouseEnter.md +++ b/website/translated_docs/pt/Events/onMouseEnter.md @@ -16,6 +16,7 @@ The `On Mouse Enter` event updates the *MouseX* and *MouseY* system variables. Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. + ### Calling stack If the `On Mouse Enter` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. diff --git a/website/translated_docs/pt/Events/onMouseLeave.md b/website/translated_docs/pt/Events/onMouseLeave.md index bd7f5522cbcee5..87a25bc45668e3 100644 --- a/website/translated_docs/pt/Events/onMouseLeave.md +++ b/website/translated_docs/pt/Events/onMouseLeave.md @@ -16,6 +16,7 @@ The `On Mouse Leave` event updates the *MouseX* and *MouseY* system variables. Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. + ### Calling stack If the `On Mouse Leave` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. diff --git a/website/translated_docs/pt/Events/onMouseMove.md b/website/translated_docs/pt/Events/onMouseMove.md index 042421a96b3ad6..3388210ea3152c 100644 --- a/website/translated_docs/pt/Events/onMouseMove.md +++ b/website/translated_docs/pt/Events/onMouseMove.md @@ -12,7 +12,7 @@ title: On Mouse Move This event is generated: -- when the mouse cursor moves at least one pixel +- when the mouse cursor moves at least one pixel - OR when a modifier key (**Shift**, **Alt/Option**, **Shift Lock**) was pressed. This makes it possible to manage copy- or move-type drag-and-drop operations. If the event is checked for an object only, it is generated only when the cursor is within the graphic area of the object. @@ -21,6 +21,7 @@ The `On Mouse Move` event updates the *MouseX* and *MouseY* system variables. Objects that are made invisible using the `OBJECT SET VISIBLE` command or the [Visibility](FormObjects/properties_Display.md#visibility) property do not generate this event. + ### Calling stack If the `On Mouse Move` event has been checked for the form, it is generated for each form object. If it is checked for an object, it is generated only for that object. When there are superimposed objects, the event is generated by the first object capable of managing it that is found going in order from top level to bottom. diff --git a/website/translated_docs/pt/Events/onMouseUp.md b/website/translated_docs/pt/Events/onMouseUp.md index f845d601984c58..a79ed6300ff914 100644 --- a/website/translated_docs/pt/Events/onMouseUp.md +++ b/website/translated_docs/pt/Events/onMouseUp.md @@ -16,4 +16,4 @@ When the `On Mouse Up` event is generated, you can get the local coordinates whe When using this event, you must also use the `Is waiting mouse up` command to handle cases where the "state manager" of the form is desynchronized, i.e. when the `On Mouse Up` event is not received after a click. This is the case for example when an alert dialog box is displayed above the form while the mouse button has not been released. For more information and an example of use of the `On Mouse Up` event, please refer to the description of the `Is waiting mouse up` command. -> If the [Draggable](FormObjects/properties_Action.md#draggable) option is enabled for the picture object, the `On Mouse Up` event is never generated. \ No newline at end of file +> If the [Draggable](FormObjects/properties_Action.md#draggable) option is enabled for the picture object, the `On Mouse Up` event is never generated. diff --git a/website/translated_docs/pt/Events/onOpenDetail.md b/website/translated_docs/pt/Events/onOpenDetail.md index d2481f342aecd1..755bf24a7a0516 100644 --- a/website/translated_docs/pt/Events/onOpenDetail.md +++ b/website/translated_docs/pt/Events/onOpenDetail.md @@ -12,9 +12,10 @@ title: On Open Detail The `On Open Detail` event can be used in the following contexts: -- **Output forms**: A record is about to be displayed in the detail form associated with the output form. This event cannot be selected for project forms, it is only available with **table forms**. +- **Output forms**: A record is about to be displayed in the detail form associated with the output form. This event cannot be selected for project forms, it is only available with **table forms**. - List box of the [**selection type**](FormObjects/listbox_overview.md#selection-list-boxes): This event is generated when a record is about to be displayed in the detail form associated with a list box of the selection type (and before this form is opened). + ### Displayed line number -The `Displayed line number` 4D command works with the `On Open Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. \ No newline at end of file +The `Displayed line number` 4D command works with the `On Open Detail` form event. It returns the number of the row being processed while a list of records or list box rows is displayed on screen. diff --git a/website/translated_docs/pt/Events/onOpenExternalLink.md b/website/translated_docs/pt/Events/onOpenExternalLink.md index 7b3377bc483f0f..120a009da05026 100644 --- a/website/translated_docs/pt/Events/onOpenExternalLink.md +++ b/website/translated_docs/pt/Events/onOpenExternalLink.md @@ -14,6 +14,6 @@ This event is generated when the loading of a URL was blocked by the Web area an You can find out the blocked URL using the `WA Get last filtered URL` command. -### See also +### See also [`On URL Filtering`](onUrlFiltering.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onOutsideCall.md b/website/translated_docs/pt/Events/onOutsideCall.md index 111ed9fd1ead48..8d2670c868671b 100644 --- a/website/translated_docs/pt/Events/onOutsideCall.md +++ b/website/translated_docs/pt/Events/onOutsideCall.md @@ -12,4 +12,5 @@ title: On Outside Call This event is called when the form is called from another process through the `POST OUTSIDE CALL` command. -> The `On Outside Call` event modifies the entry context of the receiving input form. In particular, if a field was being edited, the [`On Data Change`](onDataChange.md) event is generated. \ No newline at end of file +> The `On Outside Call` event modifies the entry context of the receiving input form. In particular, if a field was being edited, the [`On Data Change`](onDataChange.md) event is generated. + diff --git a/website/translated_docs/pt/Events/onPlugInArea.md b/website/translated_docs/pt/Events/onPlugInArea.md index 443881c322639d..1d594bf08673cd 100644 --- a/website/translated_docs/pt/Events/onPlugInArea.md +++ b/website/translated_docs/pt/Events/onPlugInArea.md @@ -10,4 +10,4 @@ title: On Plug in Area ## Description -The event is generated when a plug-in requested its form area to execute the associated object method. \ No newline at end of file +The event is generated when a plug-in requested its form area to execute the associated object method. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onPrintingBreak.md b/website/translated_docs/pt/Events/onPrintingBreak.md index ea1a28295ccf8a..d6fde44f7cd5f2 100644 --- a/website/translated_docs/pt/Events/onPrintingBreak.md +++ b/website/translated_docs/pt/Events/onPrintingBreak.md @@ -14,4 +14,7 @@ The `On Printing Break` event can only be used in the context of an **output for This event usually follows a call to the `Subtotal` command. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file +> This event cannot be selected for project forms, it is only available with **table forms**. + + + diff --git a/website/translated_docs/pt/Events/onPrintingDetail.md b/website/translated_docs/pt/Events/onPrintingDetail.md index b001d2c9b1a1b1..7770c6c6afad20 100644 --- a/website/translated_docs/pt/Events/onPrintingDetail.md +++ b/website/translated_docs/pt/Events/onPrintingDetail.md @@ -14,4 +14,5 @@ The `On Printing Detail` event can only be used in the context of an **output fo The `Print form` command generates only one `On Printing Detail` event for the form method. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file +> This event cannot be selected for project forms, it is only available with **table forms**. + diff --git a/website/translated_docs/pt/Events/onPrintingFooter.md b/website/translated_docs/pt/Events/onPrintingFooter.md index ea17387a26693a..940044383e1760 100644 --- a/website/translated_docs/pt/Events/onPrintingFooter.md +++ b/website/translated_docs/pt/Events/onPrintingFooter.md @@ -14,4 +14,5 @@ The `On Printing Footer` event can only be used in the context of an **output fo This event can be triggered in the context of a `PRINT SELECTION` command. -> This event cannot be selected for project forms, it is only available with **table forms**. \ No newline at end of file +> This event cannot be selected for project forms, it is only available with **table forms**. + diff --git a/website/translated_docs/pt/Events/onResize.md b/website/translated_docs/pt/Events/onResize.md index d571a1ff305858..074799843eca3f 100644 --- a/website/translated_docs/pt/Events/onResize.md +++ b/website/translated_docs/pt/Events/onResize.md @@ -13,4 +13,4 @@ title: On Resize This event is called: - when the window of the form is resized, -- in the context of subforms, when the size of the subform object in the parent form has changed. In this this case, this event is sent to the subform form method. \ No newline at end of file +- in the context of subforms, when the size of the subform object in the parent form has changed. In this this case, this event is sent to the subform form method. diff --git a/website/translated_docs/pt/Events/onRowMoved.md b/website/translated_docs/pt/Events/onRowMoved.md index 1caf328629a40f..88ed810ae1e5dc 100644 --- a/website/translated_docs/pt/Events/onRowMoved.md +++ b/website/translated_docs/pt/Events/onRowMoved.md @@ -12,4 +12,4 @@ title: On Row Moved This event is generated when a row of the list box ([array type only](FormObjects/listbox_overview.md#array-list-boxes)) is moved by the user using drag and drop ([if allowed](FormObjects/properties_Action.md#movable-rows). It is not generated if the row is dragged and then dropped in its initial location. -The `LISTBOX MOVED ROW NUMBER` command returns the new position of the row. \ No newline at end of file +The `LISTBOX MOVED ROW NUMBER` command returns the new position of the row. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onRowResize.md b/website/translated_docs/pt/Events/onRowResize.md index 91bd0a8779b2c9..85d571afe88df2 100644 --- a/website/translated_docs/pt/Events/onRowResize.md +++ b/website/translated_docs/pt/Events/onRowResize.md @@ -21,7 +21,6 @@ This event is generated when the height of a row is modified by a user in a 4D V | range | object | Cell range of the rows whose heights have changed | | header | boolean | True if the column header row (first row) is resized, else false | - #### Example ```4d diff --git a/website/translated_docs/pt/Events/onScroll.md b/website/translated_docs/pt/Events/onScroll.md index 6da7582a604698..4055a7961ab52b 100644 --- a/website/translated_docs/pt/Events/onScroll.md +++ b/website/translated_docs/pt/Events/onScroll.md @@ -16,10 +16,12 @@ This event is triggered after any other user event related to the scrolling acti The event is triggered when the scroll is the result of a user action: using the scroll bars and/or cursors, using the mouse wheel or [the keyboard](FormObjects/properties_Appearance.md#vertical-scroll-bar). It is not generated when the object is scrolled due to the execution of the `OBJECT SET SCROLL POSITION` command. + ### Picture input The event is generated as soon as a user scrolls a picture within the picture input (field or variable) that contains it. You can scroll the contents of a picture area when the size of the area is smaller than its contents and the [display format](FormObjects/properties_Display.md#picture-format) is "Truncated (non Centered)". + ### List box -The event is generated as soon as a user scrolls the rows or columns of the list box. \ No newline at end of file +The event is generated as soon as a user scrolls the rows or columns of the list box. diff --git a/website/translated_docs/pt/Events/onSelectionChange.md b/website/translated_docs/pt/Events/onSelectionChange.md index 6103bc391eef6d..8e87c6b355161e 100644 --- a/website/translated_docs/pt/Events/onSelectionChange.md +++ b/website/translated_docs/pt/Events/onSelectionChange.md @@ -12,8 +12,8 @@ title: On Selection Change This event can be generated in different contexts. -### 4D View Pro +### 4D View Pro The current selection of rows or columns is modified. In this context, the [event object](overview.md#event-object) returned by the `FORM Event` command contains: | Property | Type | Description | @@ -25,7 +25,6 @@ The current selection of rows or columns is modified. In this context, the [even | oldSelections | object | Cell range before change | | newSelections | object | Cell range after change | - #### Example ```4d @@ -39,14 +38,17 @@ The current selection of rows or columns is modified. In this context, the [even The current record or the current selection of rows is modified in a list form. + ### Hierarchical list This event is generated every time the selection in the hierarchical list is modified after a mouse click or keystroke. + ### Input & 4D Write Pro The text selection or the position of the cursor in the area is modified following a click or a keystroke. + ### List box +This event is generated each time the current selection of rows or columns of the list box is modified. -This event is generated each time the current selection of rows or columns of the list box is modified. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onUnload.md b/website/translated_docs/pt/Events/onUnload.md index 5a04e84e143eb5..eb978ff72d16ad 100644 --- a/website/translated_docs/pt/Events/onUnload.md +++ b/website/translated_docs/pt/Events/onUnload.md @@ -16,10 +16,13 @@ All the objects of the form (from any page) whose `On Unload` object event prope > The [`On Load`](onLoad.md) and [`On Unload`] events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. + + ### Subform The `On Unload` event is generated when the subform is closing (this event must also have been activated at the parent form level in order to be taken into account). The event is generated before those of the parent form. Also note that, in accordance with the operating principles of form events, if the subform is placed on a page other than page 0 or 1, this event will only be generated when that page is closed (and not when the form is closed). + ### See also [`On Load`](onLoad.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onUrlFiltering.md b/website/translated_docs/pt/Events/onUrlFiltering.md index 3841b27efd158a..4a950e58287b8a 100644 --- a/website/translated_docs/pt/Events/onUrlFiltering.md +++ b/website/translated_docs/pt/Events/onUrlFiltering.md @@ -15,5 +15,4 @@ This event is generated when the loading of a URL is blocked by the Web area bec You can find out the blocked URL using the `WA Get last filtered URL` command. ### See also - [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onUrlLoadingError.md b/website/translated_docs/pt/Events/onUrlLoadingError.md index e7dab76af90ff6..b5b6930770155a 100644 --- a/website/translated_docs/pt/Events/onUrlLoadingError.md +++ b/website/translated_docs/pt/Events/onUrlLoadingError.md @@ -14,6 +14,6 @@ This event is generated when an error is detected during the loading of a URL. You can call the `WA GET LAST URL ERROR` command in order to get information about the error. -### See also +### See also [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onUrlResourceLoading.md b/website/translated_docs/pt/Events/onUrlResourceLoading.md index 87b3770f412d40..529bff80d522be 100644 --- a/website/translated_docs/pt/Events/onUrlResourceLoading.md +++ b/website/translated_docs/pt/Events/onUrlResourceLoading.md @@ -14,6 +14,6 @@ This event is generated each time a new resource (picture, frame, etc.) is loade The [Progression](FormObjects/properties_WebArea.md#progression) variable associated with the area lets you find out the current state of the loading. -### See also +### See also [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onValidate.md b/website/translated_docs/pt/Events/onValidate.md index 38e7a257144279..ab9b6d99880dfd 100644 --- a/website/translated_docs/pt/Events/onValidate.md +++ b/website/translated_docs/pt/Events/onValidate.md @@ -12,6 +12,7 @@ title: On Validate This event is triggered when the record data entry has been validated, for example after a `SAVE RECORD` command call or an `accept` [standard action](FormObjects/properties_Action.md#standard-action). + ### Subform The `On Validate` event is triggered when data entry is validated in the subform. \ No newline at end of file diff --git a/website/translated_docs/pt/Events/onVpRangeChanged.md b/website/translated_docs/pt/Events/onVpRangeChanged.md new file mode 100644 index 00000000000000..dc6962fd57f24a --- /dev/null +++ b/website/translated_docs/pt/Events/onVpRangeChanged.md @@ -0,0 +1,27 @@ +--- +id: onVpRangeChanged +title: On VP Range Changed +--- + +| Code | Can be called by | Definition | +| ---- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| 61 | [4D View Pro Area](FormObjects/viewProArea_overview.md) | The 4D View Pro cell range has changed (e.g., a formula calculation, value removed from a cell, etc.) | + + +## Description + + +This event is generated when a change occurs within a cell range in the 4D View Pro document. + +The object returned by the FORM Event command contains: + +| Property | Type | Description | +| ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| objectName | text | 4D View Pro area name | +| code | longint | On VP Range Changed | +| description | text | "On VP Range Changed" | +| sheetName | text | Name of the sheet of the event | +| range | object | Cell range of the change | +| changedCells | object | Range containing only the changed cells. It can be a combined range. | +| action | text | The type of operation generating the event:

        • "clear" - A clear range value operation
        • "dragDrop" - A drag and drop operation
        • "dragFill" - A drag fill operation
        • "evaluateFormula" - Setting a formula in a specified cell range
        • "paste" - A paste operation
        • "setArrayFormula" - Setting a formula in a specified cell range
        • "sort" - Sorting a range of cells
        • | +> See also [On After Edit](onAfterEdit.md). diff --git a/website/translated_docs/pt/Events/onWindowOpeningDenied.md b/website/translated_docs/pt/Events/onWindowOpeningDenied.md index dc592b2d92ea28..baf5cec0a000a4 100644 --- a/website/translated_docs/pt/Events/onWindowOpeningDenied.md +++ b/website/translated_docs/pt/Events/onWindowOpeningDenied.md @@ -14,6 +14,6 @@ This event is generated when the opening of a pop-up window is blocked by the We You can find out the blocked URL using the `WA Get last filtered URL` command. -### See also +### See also [`On Open External Link`](onOpenExternalLink.md) \ No newline at end of file diff --git a/website/translated_docs/pt/Events/overview.md b/website/translated_docs/pt/Events/overview.md index b99a2817587fe6..f64927894d21d8 100644 --- a/website/translated_docs/pt/Events/overview.md +++ b/website/translated_docs/pt/Events/overview.md @@ -1,13 +1,13 @@ --- -id: overview -title: Overview +id: visão Geral +title: Visão Geral --- Form events are events that can lead to the execution of the form method and/or form object method(s). Form events allow you to control the flow of your application and to write code that is executed only when a specific event occurs. In your code, you control the events using the `FORM Event` command, that returns the triggered event. For example: -```4d +```4d //code of a button If(FORM Event.code=On Clicked) // do something when the button is clicked @@ -16,6 +16,7 @@ End if > Every form and every active object on the form can listen to a predefined set of events, but only the events that you enabled at the form level and/or at every object level will actually occur. + ## Event object Each event is returned as an object by the `FORM Event` command. By default, it contains the following properties: @@ -25,9 +26,13 @@ Each event is returned as an object by the `FORM Event` command. By default, it | | | | objectName|text|Name of the object triggering the event - Not included if the event is triggered by the form| |code|longint|Numeric value of the form event. Also returned by the -`Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| +`Form event code` command| |description|text|Name of the form event (e.g. "On After Edit")| + +Additional properties are returned when the event occurs on specific objects. Em particular: + +- [list boxes](FormObjects/listbox_overview.md#supported-form-events) and [list box columns](FormObjects/listbox_overview.md#supported-form-events-1) return [additional properties](FormObjects/listbox_overview.md#additional-properties) such as `columnName` or `isRowSelected`. +- [4D View Pro areas](FormObjects/viewProArea_overview.md) return for example `sheetName` or `action` properties in the [On After Edit](onAfterEdit.md) event object. -Additional properties are returned when the event occurs on specific objects. For example, the [On After Edit](onAfterEdit.md) event object returned by a [4D View Pro area](FormObjects/viewProArea_overview.md) contains `sheetName` or `action` properties. ## Events and Methods @@ -105,10 +110,11 @@ The following table summarizes how object and form methods are called for each e | On End URL Loading | Yes (Web Area) | Never | Involved object only | | On Open External Link | Yes (Web Area) | Never | Involved object only | | On Window Opening Denied | Yes (Web Area) | Never | Involved object only | +| On VP Range Changed | Yes (4D View Pro Area) | Never | Involved object only | | On VP Ready | Yes (4D View Pro Area) | Never | Involved object only | | On Row Resize | Yes (4D View Pro Area) | Never | Involved object only | - Always keep in mind that, for any event, the method of a form or an object is called if the corresponding event property is selected for the form or objects. The benefit of disabling events in the Design environment (using the Property List of the Form editor) is that you can reduce the number of calls to methods and therefore significantly optimize the execution speed of your forms. -> WARNING: The [On Load](onLoad) and [On Unload](onUnloas) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. \ No newline at end of file +> WARNING: The [On Load](onLoad) and [On Unload](onUnloas) events are generated for objects if they are enabled for both the objects and the form to which the objects belong. If the events are enabled for objects only, they will not occur; these two events must also be enabled at the form level. + diff --git a/website/translated_docs/pt/FormEditor/createStylesheet.md b/website/translated_docs/pt/FormEditor/createStylesheet.md index 8a8d0fb321996a..30ac18889dcc53 100644 --- a/website/translated_docs/pt/FormEditor/createStylesheet.md +++ b/website/translated_docs/pt/FormEditor/createStylesheet.md @@ -3,17 +3,16 @@ id: stylesheets title: Style sheets --- -## Overview -A style sheet groups together a combination of attributes for form objects — from text attributes to nearly any available object attribute. +A style sheet groups together a combination of attributes for form objects — from text attributes to nearly any available object attribute. In addition to harmonizing an application's interface, style sheets provide three major advantages: -* 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. +* 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. -### Style Sheet Files +## Arquivos folhas de estilo 4D accepts three, specific style sheet files: @@ -23,22 +22,25 @@ In addition to harmonizing an application's interface, style sheets provide thre | styleSheets_mac.css | For defining macOS only specific attribute styles | | styleSheets_windows.css | For defining Windows only specific attribute styles | +Estes arquivos se armazenam na pasta "/SOURCES" do projeto. They can also be accessed directly via the [CSS Preview](formEditor.md#css-preview) in the Form editor toobar. -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. +While adapted to meet the specific needs of 4D forms, style sheets for application projects generally follow CSS2 syntax and grammar. Every style rule in a style sheet contains two parts: -* 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* - A selector defines where to apply the style. 4D supports "object type", "object name", "class", "all objects", as well as "attribute value" selectors. -* 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. +* 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. -## Style Sheet Selectors -### Object Type + +## Seletores de folhas de estilo + + +### Tipo de objeto Corresponding to the CSS element selector, the object type defines the type of object to style. @@ -48,19 +50,21 @@ Specify the object type, then in curly braces, declare the style(s) to apply. In the following example, all objects of the *button* type will display text in the Helvetica Neue font, with a size of 20 pixels: - button { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +button { + font-family: Helvetica Neue; + font-size: 20px; +} +``` 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: - text, input { - text-align: left; - stroke: grey; - } - +``` +text, input { + text-align: left; + stroke: grey; +} +``` ### Object Name @@ -70,11 +74,14 @@ Designate the object with a "#" character before the object's name, then in curl 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: - #okButton { - font-family: Helvetica Neue; - font-size: 20px; - } - +``` +#okButton { + font-family: Helvetica Neue; + font-size: 20px; +} +``` + + ### Class @@ -84,27 +91,31 @@ You can specify the classes to use with a "." character followed by the name of 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; - } - +``` +.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. - text.center { - text-align: center; - stroke: red; - } - +``` +text.center { + text-align: center; + stroke: red; +} +``` 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: - class: "okButtons important" - +``` +class: "okButtons important" +``` + -### All Objects +### Todos os objetos Corresponding to the CSS **universal selector**, the "*" character indicates that the following style will be applied to all objects on the form. @@ -112,12 +123,14 @@ Designate that a style should apply to all form objects with the "*" character, In the following example, all objects will have a gray fill: - * { - fill: gray; - } - +``` +* { + fill: gray; +} +``` -### Specific Attribute + +### Atributos específicos Corresponding to the CSS **attribute selectors**, styles can be applied to all form objects with a specific attribute. @@ -132,97 +145,147 @@ Specify the attribute within brackets, then in curly braces, declare the style(s | [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" | - #### Examples All objects with the `borderStyle` attribute will have purple lines: - [borderStyle] - { - stroke: purple; - } - +``` +[borderStyle] +{ + stroke: purple; +} +``` All objects of the text type with a text attribute whose value is "Hello" will have blue letters: - text[text=Hello] - { - stroke: blue; - } - + +``` +text[text=Hello] +{ + stroke: blue; +} +``` All objects with a text attribute whose value contains "Hello" will have blue lines: - [text~=Hello] - { - stroke: blue; - } - - +``` +[text~=Hello] +{ + stroke: blue; +} + +``` All objects of the text type with a text attribute whose value starts with "Hello" will have yellow letters: - text[text|=Hello] - { - stroke: yellow; - } - +``` +text[text|=Hello] +{ + stroke: yellow; -## Style Sheet Declarations -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) -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. +## Declarações de folhas de estilo -### Attribute Mapping +### Media Queries -The attributes listed below are able to accept either the 4D name or the CSS name. +Media queries are used to apply color schemes to an application. + +A media query is composed of a media feature and a value (e.g., \:\ ). + + +Available media features: + +* `prefers-color-scheme` + + +Available media feature expressions: + +* **light**
          For using a light scheme +* **dark**
          For using a dark scheme + +> Color schemes are only supported on macOS. + +##### Example + +This CSS defines a color combination for text and text background in the light scheme (default) and another combination when the dark scheme is selected: + +``` +@media (prefers-color-scheme: light) { + .textScheme { + fill: LightGrey; + stroke: Black; + } +} + +@media (prefers-color-scheme: dark) { + .textScheme { + fill: DarkSlateGray; + stroke: LightGrey; + } +} +``` -| 4D | CSS | -| -------------- | ---------------- | -| borderStyle | border-style | -| fill | background-color | -| fontFamily | font-family | -| fontSize | font-size | -| fontStyle | font-style | -| fontWeight | font-weight | -| stroke | color | -| textAlign | text-align | -| textDecoration | text-decoration | -| verticalAlign | vertical-align | +### Object Attributes -> 4D-specific values (*e.g.*, "sunken") are not supported when using CSS attribute names. +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) + +Form object attributes can be declared with their [JSON name](FormObjects/properties_Reference.md) as CSS attributes (not including object types, methods, events, and lists). + +#### Mapa de atributos + +The attributes listed below are able to accept either the 4D name or the CSS name. + +| 4D | CSS | +| ---------------- | ------------------ | +| `borderStyle` | `border-style` | +| `fill` | `background-color` | +| `fontFamily` | `font-family` | +| `fontSize` | `font-size` | +| `fontStyle` | `font-style` | +| `fontWeight` | `font-weight` | +| `stroke` | `color` | +| `textAlign` | `text-align` | +| `textDecoration` | `text-decoration` | +| `verticalAlign` | `vertical-align` | +> 4D-specific values (*e.g.*, `sunken`) are not supported when using CSS attribute names. -### Specific Attribute Values + +#### Valores de atributos específicos - For `icon`, `picture`, and `customBackgroundPicture` attributes that support a path to an image, the syntax is: - icon: url("/RESOURCES/Images/Buttons/edit.png"); /* absolute path */ - icon: url("edit.png"); /* relative path to the form file */ - +``` +icon: url("/RESOURCES/Images/Buttons/edit.png"); /* absolute path */ +icon: url("edit.png"); /* relative path to the form file */ +``` - For `fill`, `stroke` , `alternateFill` , `horizontalLineStroke` and `verticalLineStroke`, three syntaxes are supported: - - - css color name: `fill: red;` - - hexa value: `fill: #FF0000;` + + - 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";` -## Priority Order + +## Ordem de prioridade 4D projects prioritizes conflicting style definitions first by the form definition, then by the style sheets. -### JSON vs Style Sheet + +### JSON vs Folha de estilo If an attribute is defined in the JSON form description and a style sheet, 4D will use the value in the JSON file. @@ -234,7 +297,6 @@ To override this behavior, the style value must be followed with an `!important` | --------------------- | ------------- | ----------- | | `"text": "Button",` | `text: Edit;` | `"Button"` | - **Example 2:** | JSON form description | Style Sheet | 4D displays | @@ -242,49 +304,53 @@ To override this behavior, the style value must be followed with an `!important` | `"text": "Button",` | `text: Edit !important;` | `"Edit"` | -### Multiple Style Sheets + + +### Folhas de estilo múltiplas 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") - -## Creating or Editing Style Sheets +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 You can create style sheets using your preferred text editor and saving the file with a ".css" extension in the project's "/SOURCES" folder. 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. 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. - +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. Select the type of style sheet to create and click on the **Create** or **Edit** button: ![](assets/en/FormEditor/createButton.png) -3. The style sheet will open in your default text editor. \ No newline at end of file +3. The style sheet will open in your default text editor. diff --git a/website/translated_docs/pt/FormEditor/formEditor.md b/website/translated_docs/pt/FormEditor/formEditor.md new file mode 100644 index 00000000000000..058f5e6c748162 --- /dev/null +++ b/website/translated_docs/pt/FormEditor/formEditor.md @@ -0,0 +1,778 @@ +--- +id: formEditor +title: Form Editor +--- + +4D provides a full-featured Form editor that allows you to modify your form until you achieve the effect that you want. With the Form editor, you can create and delete form objects, manipulate them directly, and set form and object properties. + + +## Interface + +The Form editor interface displays each JSON form in its own window, which has both an object and tool bar. You can have several forms open at the same time. + +### Display options + +You can show or hide several interface elements on the current page of the form: + +- **Inherited Form**: Inherited form objects (if there is an [inherited form](forms.md#inherited-forms)). +- **Page 0**: Objects from [page 0](forms.md#form-pages). This option allows you to distinguish between the objects on the form’s current page and those on page 0. +- **Paper**: Borders of the printing page, which are shown as gray lines. This element can only be displayed by default in ["for printing" type](properties_FormProperties.md#form-type) forms. +- **Rulers**: Rulers of the Form editor’s window. +- **Markers**: Output control lines and associated markers that show the limits of the form’s different areas. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Marker Labels**: Marker labels, available only when the output control lines are displayed. This element can only be displayed by default in [list forms](properties_FormProperties.md#form-type). +- **Limits**: Form’s limits. When this option is selected, the form is displayed in the Form editor as it appears in Application mode. This way you can adjust your form without having to switch to the Application mode in order to see the result. +> The [**Size Based on**](properties_FormSize.md#size-based-on), [**Hor. margin**](properties_FormSize.md#hor-margin) and [**Vert. margin**](properties_FormSize.md#vert-margin) settings of the form properties affect the form’s limits. When using these settings, the limits are based on the objects in the form. When you modify the size of an object that is located next to the form’s border, it is modified to reflect that change. + +#### Default display + +When a form is opened in the editor, interface elements are displayed or hidden by default, depending on: + +- the **New form default display** options set in the Preferences - unchecked options cannot be displayed by default. +- the current [form type](properties_FormProperties.md#form-type): + - Markers and marker labels are always displayed by default on list forms + - Paper is displayed by default on "for printing" forms. + +#### Display/Hide elements + +You can display or hide elements at any moment in the Form editor’s current window by selecting **Display** from the **Form** menu or the Form editor's context menu: + +![](assets/en/FormEditor/showHideElements.png) + + +### Rulers + +The rulers on the side and bottom help you position objects in the form. They can be [displayed or hidden](#display-options). + +Select **Ruler definition...** from the **Form** menu to change measurement units so that the form displays inches, centimeters, or pixels. + +### Toolbar + +The toolbar of the Form editor offers a set of tools to manipulate and modify the form. Each window has its own toolbar. + +![](assets/en/FormEditor/toolbar.png) + +The toolbar contains the following elements: + +| Icon | Name | Description | +| --------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/execute.png) | Execute the form | Used to test the execution of the form. When you click on this button, 4D opens a new window and displays the form in its context (list of records for a list form and current record page for a detail form). The form is executed in the main process. | +| ![](assets/en/FormEditor/selection.png) | [Selection tool](#selecting-objects) | Allows selecting, moving and resizing form objects.

          **Note**: When an object of the Text or Group Box type is selected, pressing the **Enter** key lets you switch to editing mode. | +| ![](assets/en/FormEditor/zOrder.png) | [Entry order](#data-entry-order) | Switches to “Entry order†mode, where it is possible to view and change the current entry order of the form. Note that shields allow viewing the current entry order, while still working in the form. | +| ![](assets/en/FormEditor/moving.png) | [Moving](#moving-objects) | Switches to “Move†mode, where it is possible to reach any part of the form quickly by using drag and drop in the window. The cursor takes the shape of a hand. This navigation mode is particularly useful when zooming in the form. | +| ![](assets/en/FormEditor/zoom.png) | [Zoom](#zoom) | Allows modifying the form display percentage (100% by default). You can switch to “Zoom†mode by clicking on the magnifying glass or by clicking directly on the desired bar. This feature is detailed in previous section. | +| ![](assets/en/FormEditor/alignment.png) | [Alignment](#aligning-objects) | This button is linked to a menu that allows aligning objects in the form. It is enabled (or not) depending on the objects selected.

          Available only with CSS Preview None | +| ![](assets/en/FormEditor/distribution.png) | [Distribution](#distributing-objects) | This button is linked to a menu that allows distributing objects in the form. It is enabled (or not) depending on the objects selected.

          Available only with CSS Preview None | +| ![](assets/en/FormEditor/level.png) | [Level](#layering-objects) | This button is linked to a menu that allows changing the level of objects in the form. It is enabled (or not) depending on the objects selected. | +| ![](assets/en/FormEditor/group.png) | [Group/Ungroup](#grouping-objects) | This button is linked to a menu that allows grouping and ungrouping selections of objects in the form. It is enabled (or not) depending on the objects selected. | +| ![](assets/en/FormEditor/displyAndPage.png) | [Display and page management](forms.html#form-pages) | This area allows passing from one form page to another and adding pages. To navigate among form pages, click the arrow buttons, or click the central area and choose the page to display from the menu that appears. If you click the right arrow button while the last form page is displayed, 4D allows you to add a page. | +| ![](assets/en/FormEditor/cssPreviewicon.png) | [CSS Preview](#css-preview) | This button is used to select the CSS Mode to use. | +| ![](assets/en/FormEditor/views.png) | [Managing views](#views) | This button displays or hides the views palette. This function is detailed in Using object views . | +| ![](assets/en/FormEditor/shields2.png) | [Displaying shields](#shields) | Each click on this button causes the successive display of each type of form shield. The button is also linked to a menu that allows directly selecting the type of shield to display. | +| ![](assets/en/FormEditor/library.png) | [Preconfigured object library](objectLibrary.html) | This button displays the preconfigured object library that provides numerous objects with certain properties that have been predefined. | +| ![](assets/en/FormEditor/listBoxBuilder1.png) | [List Box Builder](#list-box-builder) | This button creates new entity selection list boxes. | + +### Object bar + +The object bar contains all the active and inactive objects that can be used in 4D forms. Some objects are grouped together by themes. Each theme includes several alternatives that you can choose between. When the object bar has the focus, you can select the buttons using the keys of the keyboard. The following table describes the object groups available and their associated shortcut key. + +| Button | Group | Key | +| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |:---:| +| ![](assets/en/FormEditor/text.png) | [Text](FormObjects/text.md) / [Group Box](FormObjects/groupBox.md) | T | +| ![](assets/en/FormEditor/input.png) | [Input](FormObjects/input_overview.md) | F | +| ![](assets/en/FormEditor/listbox.png) | [Hierarchical List](FormObjects/list_overview.md) / [List Box](FormObjects/listbox_overview.md) | L | +| ![](assets/en/FormEditor/combo.png) | [Combo Box](FormObjects/comboBox_overview.md) / [Drop-down List](FormObjects/dropdownList_Overview.md) / [Picture Pop-up Menu](FormObjects/picturePopupMenu_overview.md) | P | +| ![](assets/en/FormEditor/button.png) | [Button](FormObjects/button_overview.md) / [Picture Button](FormObjects/pictureButton_overview.md) / [Button Grid](FormObjects/buttonGrid_overview.md) | B | +| ![](assets/en/FormEditor/radio.png) | [Radio Button](FormObjects/radio_overview.md) | R | +| ![](assets/en/FormEditor/checkbox.png) | [Check Box](FormObjects/checkbox_overview.md) | C | +| ![](assets/en/FormEditor/indicator.png) | [Progress Indicator](FormObjects/progressIndicator.md) / [Ruler](FormObjects/ruler.md) / [Stepper](FormObjects/stepper.md) / [Spinner](FormObjects/spinner.md) | I | +| ![](assets/en/FormEditor/rectangle.png) | [Rectangle](FormObjects/shapes_overview.md#rectangle) / [Line](FormObjects/shapes_overview.md#line) / [Oval](FormObjects/shapes_overview.md#oval) | S | +| ![](assets/en/FormEditor/splitter.png) | [Splitter](FormObjects/splitters.md) / [Tab Control](FormObjects/tabControl.md) | D | +| ![](assets/en/FormEditor/plugin.png) | [Plug-in Area](FormObjects/pluginArea_overview.md) / [Subform](FormObjects/subform_overview.md) / [Web Area](FormObjects/webArea_overview.md) / [4D Write Pro](FormObjects/writeProArea_overview.md) / [4D View Pro](FormObjects/viewProArea_overview.md) | X | + +To draw an object type, select the corresponding button and then trace the object in the form. After creating an object, you can modify its type using the Property List. Hold down the **Shift** key as you draw to constrain the object to a regular shape. Lines are constrained to horizontal, 45°, or vertical, rectangles are constrained to squares, and ovals are constrained to circles. + +The current variant of the theme is the object that will be inserted in the form. When you click the right side of a button, you access the variant menu: + +![](assets/en/FormEditor/objectBar.png) + +You can click twice on the button so that it remains selected even after you have traced an object in the form (continual selection). This function makes creating several successive objects of the same type easier. To cancel a continual selection, click on another object or tool. + +### Property List + +Both forms and form objects have properties that control access to the form, the appearance of the form, and the behavior of the form when it is used. Form properties include, for example, the form’s name, its menu bar, and its size. Object Properties include, for example, an object’s name, its dimensions, its background color, and its font. + +You can display and modify form and object properties using the Property List. It displays either form or objects properties depending on what you select in the editor window. + +To display/hide the Property List, choose **Property List** from the **Form** menu or from the context menu of the Form editor. You can also display it by double-clicking in an empty area of the form. + +#### Navigation shortcuts + +You can navigate in the Property List using the following shortcuts: + +* **Arrow key**s ↑ ↓: Used to go from one cell to another. +* **Arrow keys** ↠→: Used to expand/collapse themes or enter edit mode. +* **PgUp** and **PgDn**: Used to scroll the Property List contents. +* **Home** and **End**: Used to scroll the Property List so that the first or last cell is displayed. +* **Ctrl+click** (Windows) or **Command+click** (Mac OS) on an event: Used to select/deselect every event in the list, according to the initial state of the event on which you clicked. +* **Ctrl+click** (Windows) or **Command+click** (Mac OS) on a theme label: Used to Collapse/Expand every theme in the list. + + + +## Manipulating Form Objects + +### Adding objects + +You can add objects to forms in several ways: + +* By drawing the object directly in the form after selecting its type in the object bar (see [Using the object bar](#using-the-object-bar)) +* By dragging and dropping the object from the object bar +* By drag-and-drop or copy-paste operations on an object selected from the preconfigured [object library](objectLibrary.md), +* By dragging and dropping an object from another form, +* By dragging and dropping an object from the Explorer (fields) or from other editors in the Design environment (lists, pictures, etc.) + +Once the object is placed in the form, you can modify its characteristics using the Form editor. + +You can work with two types of objects in your forms: + +* **Static objects** (lines, frames, background pictures, etc.): These objects are generally used for setting the appearance of the form and its labels as well as for the graphic interface. They are available in the object bar of the Form editor. You can also set their graphic attributes (size, color, font, etc.) and their resizing properties using the Property List. Static objects do not have associated variables like active objects. However, you can insert dynamic objects into static objects. + +* **Active objects**: These objects perform tasks or functions in the interface and can take many forms: fields, buttons, scrollable lists, etc. Each active object is associated with either a field or a variable. + +### Selecting objects + +Before you can perform any operation on an object (such as changing a line width or font), you need to select the object that you want to modify. + +To select an object using the toolbar: + +1. Click the Arrow tool in the toolbar.

          ![](assets/en/FormEditor/selection.png)

          When you move the pointer into the form area, it becomes a standard arrow-shaped pointer. +2. Click the object you want to select. Resizing handles identify the selected object.

          ![](assets/en/FormEditor/selectResize.png) + +To select an object using the Property List: + +1. Choose the object’s name from the Object List drop-down list located at the top of the Property List.

          Using these two methods, you can select an object that is hidden by other objects or located outside the visible area of the current window. To deselect an object, click outside the object’s boundary or **Shift+click** the object. +> It is also possible to select objects by double-clicking them in the result window of ""Find in design" operation. + +### Selecting multiple objects + +You may want to perform the same operation on more than one form object — for example, to move the objects, align them, or change their appearance. 4D lets you select several objects at the same time. There are several ways to select multiple objects: + +* Choose **Select All** from the Edit menu to select all the objects. +* Right-click on the object and choose the **Select Similar Objects** command in the context menu. +* Hold down the **Shift** key and click the objects you want to select. +* Start at a location outside the group of objects you want to select and drag a marquee (sometimes called a selection rectangle) around the objects. When you release the mouse button, if any part of an object lies within or touches the boundaries of the selection rectangle, that object is selected. +* Hold down the **Alt** key (Windows) or the **Option** key (macOS) and draw a marquee. Any object that is completely enclosed by the marquee is selected. + +The figure below shows a marquee being drawn to select two objects: + +![](assets/en/FormEditor/selectMultiple.png) + +To deselect an object that is part of a set of selected objects, hold down the **Shift** key and click the object. The other objects remain selected. To deselect all the selected objects, click outside the boundaries of all the objects. + + +### Duplicating objects + +You can duplicate any object in the form, including active objects. Copies of active objects retain all the properties of the original, including name, type, standard action, display format, and object method. + +You can duplicate an object directly using the Duplicate tool in the Tools palette or use the Duplicate Many dialog box to duplicate an object more than once. Also, using this dialog box, you can set the distance between two copies. + +To duplicate one or more objects: + +1. Select the object or objects that you want to duplicate. +2. Choose **Duplicate** from the **Edit** menu. 4D creates a copy of each selected object and places the copy in front and slightly to the side of the original. +3. Move the copy (or copies) to the desired location. If you choose the Duplicate menu item again, 4D creates another copy of each object and moves it the exact same distance and direction from the first copy. If you need to distribute copies of the object along a line, you should use the following procedure. Duplicate the original object, move the copy to another location in the form, and then duplicate the copy. The second copy is automatically placed in the same relation to the first copy as the first copy was in relation to the original object. Subsequent copies are also placed in the same relation to their originals. The figure below shows how this relative placement of copies works: + +![](assets/en/FormEditor/duplicateObjects.png) + + +#### Duplicate Many + +The "Duplicate Many" dialog box appears when you select one or more object(s) and choose the **Duplicate Many...** command from the **Object** menu. + +![](assets/en/FormEditor/duplcateMany.png) + +* In the upper area, enter the number of columns and lines (rows) of objects you want to get.

          For example, if you want three columns and two lines of objects, enter 3 in the Column(s) area and 2 in the Line(s) area. If you want three horizontal new copies of an object, enter 4 in the Column(s) area and leave the default value, 1, in the Line(s) area. + +* For lines and columns, define the offset that you wish to leave between each copy.

          The value must be expressed in points. It will be applied to each copy, or copies, in relation to the original object.

          For example, if you want to leave a vertical offset of 20 points between each object and the height of the source object is 50 points, enter 70 in the column’s “Offset†area. + +* If you wish to create a matrix of variables, select the **Number Variables** option and select the direction in which the variables are to be numbered, either by line(s) or by column(s). This option is active only when the selected object is a variable. For more information on this option, refer to **Duplicating on a matrix** in the *Design Reference*. + + +### Moving objects + +You can move any graphic or active object in the form including fields and objects created with a template. When moving an object, you have the following options: + +* Move the object by dragging it, +* Move the object one pixel at a time using the arrow keys, +* Move the object by steps using the arrow keys (20-pixel steps by default), + +As you begin dragging the selected object, its handles disappear. 4D displays markers that show the location of the object’s boundaries in the rulers so that you can place the object exactly where you want it. Be careful not to drag a handle. Dragging a handle resizes the object. You can press the **Shift** key to carry out the move with a constraint. + +When the [Magnetic Grid](#using-the-magnetic-grid) is on, objects are moved in stages indicating noticeable locations. + +To move an object one pixel at a time: + +* Select the object or objects and use the arrow keys on the keyboard to move the object. Each time you press an arrow key, the object moves one pixel in the direction of the arrow. + +To move an object by steps: + +* Select the object or objects you want to move and hold down the **Shift** key and use the arrow keys to move the object by steps. By default, steps are 20 pixels at a time. You can change this value on the Forms Page of the Preferences. + + +### Grouping objects + +4D lets you group objects so that you can select, move, and modify the group as a single object. Objects that are grouped retain their position in relation to each other. You would typically group a field and its label, an invisible button and its icon, and so forth. + +When you resize a group, all the objects in the group are resized proportionally (except text areas, which are resized in steps according to their font sizes. + +You can ungroup a group of objects to treat them as individual objects again. + +An active object that has been grouped must be ungrouped before you can access its properties or method. However, it is possible to select an object belonging to a group without degrouping the set: to do this, **Ctrl+click** (Windows) or **Command+click** (macOS) on the object (the group must be selected beforehand). + +Grouping only affects objects in the Form editor. When the form is executed, all grouped objects act as if they were ungrouped. +> It is not possible to group objects belonging to different views and only those objects belonging to the current view can be grouped (see [Views](#views) ). + +To group objects: + +1. Select the objects that you want to group. +2. Choose **Group** from the Object menu.

          OR

          Click the Group button in the toolbar of the Form editor:

          ![](assets/en/FormEditor/group.png)

          4D marks the boundary of the newly grouped objects with handles. No handles mark the boundary of any of the individual objects within the group. Now, when you modify the grouped object, you change all the objects that make up the group. + +To ungroup an object: + +1. Select the grouped object that you want to ungroup. +2. Choose **Ungroup** from the **Object** menu.

          OR

          Click the **Ungroup** button (variant of the **Group** button) in the toolbar of the Form editor.

          If **Ungroup** is dimmed, this means that the selected object is already separated into its simplest form.

          4D marks the boundaries of the individual objects with handles. + + +### Aligning objects + +You can align objects with each other or using an invisible grid on the form. + +* When you align one object to another, you can align it to the top, bottom, side, or horizontal or vertical center of the other object. You can directly align a selection of objects using the alignment tools or apply more advanced alignment settings using the Alignment Assistant. The latter option allows you, for example, to set the object that will be used as the position reference and to preview the alignment in the form before applying it. +* When you use the invisible grid, each object can be aligned manually with others based on “noticeable†positions which are depicted with dotted lines that appear when the object being moved approaches other objects. + +#### Using the instantaneous alignment tools + +The alignment tools in the toolbar and in the Align submenu of the Object menu allow you to quickly align selected objects. + +![](assets/en/FormEditor/alignmentMenu.png) + +When 4D aligns objects, it leaves one selected object in place and aligns the remaining objects to that one. This object is the “anchor.†It uses the object that is the furthest in the alignment’s direction as the anchor and aligns the other objects to that object. For instance, if you want to perform a right alignment on a set of objects, the rightmost object will be used as the anchor. The figure below shows objects with no alignment, "aligned left", "aligned horizontally by centers", and "aligned right": + +![](assets/en/FormEditor/alignmentTools.png) + +#### Using the alignment assistant + +The Alignment Assistant allows you to perform any type of alignment and/or distribution of objects. + +![](assets/en/FormEditor/alignmentAssistant.png) + + +To display this dialog box, select the objects you want to align then choose the **Alignment** command from the **Align** submenu in the **Object** menu or from the context menu of the editor. + +* In the “Left/Right Alignment†and/or “Top/Bottom Alignment†areas, click the icon that corresponds to the alignment you want to perform.

          The example area displays the results of your selection. + +* To perform an alignment that uses the standard anchor scheme, click **Preview** or **Apply**.

          In this case 4D uses the object that is the furthest in the alignment’s direction as the anchor and aligns the other objects to that object. For instance, if you want to perform a right alignment on a set of objects, the rightmost object will be used as the anchor.

          OR:

          To align objects to a specific object, select the **Align on** option and select the object to which you want the other objects to be aligned from the object list. In this case, the position of the reference object will not be altered. + +You can preview the results of the alignment by clicking the **Preview** button. The objects are then aligned in the Form editor but since the dialog box does not go away, you can still cancel or apply the alignment. +> This dialog box allows you to align and distribute objects in one operation. For more information on how to distribute objects, refer to [Distributing objects](#distributing-objects). + +#### Using the Magnetic Grid + +The Form editor provides a virtual magnetic grid that can help you place and align objects in a form. Magnetic alignment of objects is based on their position in relation to each other. The magnetic grid can only be used when at least two objects are present in the form. + +This works as follows: When you move an object in the form, 4D indicates possible locations for this object based on noticeable alignments with other form objects. A noticeable alignment is established each time that: + +* Horizontally, the edges or centers of two objects coincide, +* Vertically, the edges of two objects coincide. + +When this happens, 4D places the object at the location and displays a red line indicating the noticeable alignment taken into account: + +![](assets/en/FormEditor/magneticGrid1.png) + +Concerning the distribution of objects, 4D proposes a distance based on interface standards. Like with magnetic alignment, red lines indicate the noticeable differences once they are reached. + +![](assets/en/FormEditor/magneticGrid2.png) + +This operation applies to all types of form objects. The Magnetic Grid can be enabled or disabled at any time using the **Magnetic Grid** command in the **Form** menu or in the editor context menu. It is also possible to set the activation of this feature by default on the **Preferences** > **Forms** page (**Activate auto alignment by default** option). You can manually activate or deactivate the magnetic grid when an object is selected by pressing the **Ctrl** (Windows) or **Control** (macOS) key . +> The Magnetic Grid also influences the manual resizing of objects. + +### Distributing objects + +You can distribute objects so that they are set out with an equal amount of space between them. To do this, you can distribute objects using either the Distribute tools in the Tools palette or the Alignment Assistant. The latter allows you to align and distribute objects in one operation. +> When the [Magnetic Grid](#using-the-magnetic-grid) is on, a visual guide is also provided for distribution when an object is moved manually. + +To distribute objects with equal spacing: + +1. Select three or more objects and click the desired Distribute tool. + +2. In the toolbar, click on the distribution tool that corresponds to the distribution you want to apply.

          ![](assets/en/FormEditor/distributionTool.png)

          OR

          Select a distribution menu command from the **Align** submenu in the **Object** menu or from the context menu of the editor.

          4D distributes the objects accordingly. Objects are distributed using the distance to their centers and the largest distance between two consecutive objects is used as a reference. + +To distribute objects using the Align and Distribute dialog box: + +1. Select the objects you want to distribute. + +2. Choose the **Alignment** command from the **Align** submenu in the **Object** menu or from the context menu of the editor.

          The following dialog box appears:![](assets/en/FormEditor/alignmentAssistant.png) + +3. In the Left/Right Alignment and/or Top/Bottom Alignment areas, click the standard distribution icon: ![](assets/en/FormEditor/horizontalDistribution.png)

          (Standard horizontal distribution icon)

          The example area displays the results of your selection. + +4. To perform a distribution that uses the standard scheme, click **Preview** or *Apply*.

          In this case 4D will perform a standard distribution, so that the objects are set out with an equal amount of space between them.

          OR:

          To execute a specific distribution, select the **Distribute** option (for example if you want to distribute the objects based on the distance to their right side). This option acts like a switch. If the Distribute check box is selected, the icons located below it perform a different function: + + * Horizontally, the icons correspond to the following distributions: evenly with respect to left sides, centers (hor.) and right sides of the selected objects. + * Vertically, the icons correspond to the following distributions: evenly with respect to top edges, centers (vert.) and bottom edges of the selected objects. + + You can preview the actual result of your settings by clicking on the **Preview** button: the operation is carried out in the Form editor but the dialog box stays in the foreground. You can then **Cancel** or **Apply** the modifications. +> This dialog box lets you combine object alignment and distribution. For more information about alignment, refer to [Aligning objects](#aligning-objects). + + +### Layering objects + +You will sometimes have to rearrange objects that are obstructing your view of other objects in the form. For example, you may have a graphic that you want to appear behind the fields in a form. 4D provides four menu items, **Move to Back**, **Move to Front**, **Up One Level** and **Down One Level** that let you “layer†objects on the form. These layers also determine the default entry order (see Modifying data entry order). The figure below shows objects in front of and behind other objects: + +![](assets/en/FormEditor/layering.png) + +To move an object to another level, select it and choose: + +* One of the **Move to Back**, **Move to Front**, **Up One Level** and **Down One Level** commands of the Object menu, +* One of the commands in the **Level>** submenu in the context menu of the editor, +* One of the commands associated with the level management button of the toolbar. + +![](assets/en/FormEditor/level2.png) +> When several objects are superimposed, the **Ctrl+Shift+click** / **Command+Shift+click** shortcut can be used to select each object successively by going down a layer with each click. + +When ordering different levels, 4D always goes from the background to the foreground. As a result, the previous level moves the selection of objects one level towards the background. The next level moves the selection one level towards the foreground of the form. + +### Data entry order + +The data entry order is the order in which fields, subforms, and other active objects are selected as you hit the **Tab** or the **Carriage return** key in an input form. It is possible to move through the form in the opposite direction (reverse data entry order) by pressing the **Shift+Tab** or **Shift+Carriage** return keys. + +> You can change the entry order at runtime using the `FORM SET ENTRY ORDER` and `FORM GET ENTRY ORDER` commands. + +Every object that supports the focusable property is included in the data entry order by default. + +Setting the entry order for a JSON form is done with the [`entryOrder`](properties_JSONref.md) property. + +If you don’t specify a custom entry order, by default 4D uses the layering of the objects to determine the entry order in the direction “background towards foreground.†The standard entry order thus corresponds to the order in which the objects were created in the form. + +In some forms, a custom data entry order is needed. Below, for example, additional fields related to the address have been added after the creation of the form. The resulting standard entry order thus becomes illogical and forces the user to enter the information in an awkward manner: + +![](assets/en/FormEditor/entryOrder1.png) + +In cases such as this, a custom data entry order allows you to enter the information in a more logical order: + +![](assets/en/FormEditor/entryOrder2.png) + +#### Viewing and changing the data entry order + +You can view the current entry order either using the “Entry order†shields, or by using the “Entry order†mode. However, you can only modify the entry order using the “Entry order†mode. + +This paragraph describes viewing and modifying the entry order using the “Entry order†mode. For more information about viewing the entry order using shields, refer to [Using shields](#using-shields). + +To view or change the entry order: + +1. Choose **Entry Order** from the **Form** menu or click on the Entry Order button in the toolbar of the window:

          ![](assets/en/FormEditor/zOrder.png)

          The pointer turns into an entry order pointer and 4D draws a line in the form showing the order in which it selects objects during data entry.

          Viewing and changing the data entry order are the only actions you can perform until you click any tool in the Tools palette. + +2. To change the data entry order, position the pointer on an object in the form and, while holding down the mouse button, drag the pointer to the object you want next in the data entry order.

          ![](assets/en/FormEditor/entryOrder3.png)

          4D will adjust the entry order accordingly. + +3. Repeat step 2 as many times as necessary to set the data entry order you want. + +4. When you are satisfied with the data entry order, click any unselected tool in the toolbar or choose **Entry Order** from the **Form** menu.

          4D returns to normal operation of the Form editor. + +> Only the entry order of the current page of the form is displayed. If the form contains enterable objects on page 0 or coming from an inherited form, the default entry order is as follows: Objects from page 0 of the inherited form > Objects from page 1 of the inherited form > Objects from page 0 of the open form > Objects from the current page of the open form. + + +#### Using a data entry group + +While you are changing the data entry order, you can select a group of objects in a form so that the standard data entry order applies to the objects within the group. This allows you to easily set the data entry order on forms in which fields are separated into groups or columns. + +To create a data entry group: + +1. Choose **Entry Order** from the *Form* menu or click the button in the toolbar. +2. Draw a marquee around the objects you want to group for data entry. + +When you release the mouse button, the objects enclosed or touched by the rectangle follow the standard data entry order. The data entry order for the remaining objects adjusts as necessary. + +#### Excluding an object from the entry order + +By default, all objects that support the focusable property are included in the entry order. To exclude an object from the entry order: + +1. Select the Entry order mode, then + +2. **shift-click** on the object + +3. **right-click** on the object and select **Remove from entry order** option from the context menu + + + +## CSS Preview + +The Form editor allows you to view your forms with or without applied CSS values. + +When [style sheets](createStylesheet.md) have been defined, forms (including inherited forms and subforms) are opened in the CSS Preview mode for your operating system by default. + + +### Selecting CSS Preview Mode + +The Form editor toolbar provides a CSS button for viewing styled objects: + +![](assets/en/FormEditor/cssToolbar.png) + +Select one of the following preview modes from the menu: + +| Toolbar Icon | CSS Preview Mode | Description | +| ------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------- | +| ![](assets/en/FormEditor/cssNo.png) | None | No CSS values are applied in the form and no CSS values or icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssWin.png) | Windows | CSS values for Windows platform are applied in the form. CSS values and icons displayed in the Property List. | +| ![](assets/en/FormEditor/cssMac.png) | macOS | CSS values for macOS platform are applied in the form. CSS values and icons displayed in the Property List. | +> If a font size too large for an object is defined in a style sheet or JSON, the object will automatically be rendered to accommodate the font, however the size of the object will not be changed. + +The CSS preview mode reflects the priority order applied to style sheets vs JSON attributes as defined in the [JSON vs Style Sheet](stylesheets.html#json-vs-style-sheet) section. + +Once a CSS preview mode is selected, objects are automatically displayed with the styles defined in a style sheet (if any). +> When copying or duplicating objects, only the CSS references (if any) and the JSON values are copied. + + +### CSS support in the Property List + +In CSS Preview mode, if the value of an attribute has been defined in a style sheet, the attribute's name will appear with a CSS icon displayed next to it in the Property List. For example, the attribute values defined in this style sheet: + +```4d +.myButton { +font-family: comic sans; +font-size: 14; +stroke: #800080; +} +``` + +are displayed with a CSS icon in the Property List: + +![](assets/en/FormEditor/cssPpropList.png) + +An attribute value defined in a style sheet can be overridden in the JSON form description (except if the CSS includes the `!important` declaration, see below). In this case, the Property List displays the JSON form value in **bold**. You can reset the value to its style sheet definition with the **Ctrl + click** (Windows) or **Command + click** (macOs) shortcuts. +> If an attribute has been defined with the `!important` declaration for a group, an object within a group, or any object within a selection of multiple objects, that attribute value is locked and cannot be changed in the Property List. + +#### Property List CSS Icons + +| Icon | Description | +| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/cssIcon.png) | Indicates that an attribute value has been defined in a style sheet | +| ![](assets/en/FormEditor/cssImportant.png) | Indicates that an attribute value has been defined in a style sheet with the `!important` declaration | +| ![](assets/en/FormEditor/cssIconMixed.png) | Displayed when an attribute value defined in a style sheet for at least one item in a group or a selection of multiple objects is different from the other objects | + + + +## List Box Builder + +You can create new entity selection list boxes quickly with the **List box builder**. The new list box can be used immediately or it can be edited via the Form Editor. + +The List box builder lets you create and fill entity selection list boxes in a few simple operations. + + + +### Using the List Box Builder + + +1. In the Form Editor toolbar, click on the List box builder icon: + + ![](assets/en/FormEditor/listboxBuilderIcon.png) + + The List box builder is displayed: + + ![](assets/en/FormEditor/listboxBuilder.png) + +2. Select a table from the **Table** dropdown list: + + ![](assets/en/FormEditor/listboxBuilderTable.png) + +3. Select the fields for the list box in the **Fields** area: + + ![](assets/en/FormEditor/listboxBuilderFields.png) + + By default, all fields are selected. You can select or deselect fields individually or use **Ctrl+click** (Windows) or **Cmd+click** (macOS) to select or deselect them all at once. + + You can change the order of the fields by dragging them and dropping them. + +4. The expression to fill the list box's rows from the entity selection is prefilled: + + ![](assets/en/FormEditor/listboxBuilderExpression.png) + + This expression can be changed if necessary. + +5. Clicking on the **Copy** button will copy the expression for loading all records into memory: + + ![](assets/en/FormEditor/listboxBuilderCode.png) + +6. Click the the **Build widget** button to create the list box. + + ![](assets/en/FormEditor/listboxBuilderBuild.png) + +The final list box: + +![](assets/en/FormEditor/listboxBuilderListbox.png) + + + + + + + + + +## Shields + +The 4D Form Editor uses shields to make viewing object properties easier. You can find them on the form toolbar: + +![](assets/en/FormEditor/shields.png) + + + + +This function works as follows: Each shield is associated with a property (for example, **Views**, which means the object “is in the current viewâ€). When you activate a shield, 4D displays a small icon (shield) in the upper left of each object of the form where the property is applied. + +![](assets/en/FormEditor/shield.png) + +### Using shields + +To activate a shield, click the *Shield* icon from the toolbar until the desired shield is selected. You can also click on the right side of the button and select the type of shield to display directly in the associated menu: + + +If you don't want to display shields, select **No Shields** in the selection menu. +> You can set which shields to display by default on the Forms Page of the application Preferences. + +### Shield descriptions + +Here is a description of each type of shield: + +| Icon | Name | Is displayed ... | +| -------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| ![](assets/en/FormEditor/objectMethod.png) | Object Method | For objects with an associated object method | +| ![](assets/en/FormEditor/standardAction.png) | Standard Action | For objects with an associated standard action | +| ![](assets/en/FormEditor/resizing.png) | Resizing | For objects with at least one resizing property, indicates the combination of current properties | +| ![](assets/en/FormEditor/entryOrder.png) | Entry Order | For enterable objects, indicates the number of entry order | +| ![](assets/en/FormEditor/viewNumber.png) | Current View | For all objects in the current view | +| ![](assets/en/FormEditor/cssShield.png) | [Style Sheet](stylesheets.html) | For objects with one or more attribute values overridden by a style sheet. | +| ![](assets/en/FormEditor/filter.png) | Filter | For enterable objects with an associated entry filter | +| ![](assets/en/FormEditor/helpTip.png) | Help Tip | For objects with an associated tip | +| ![](assets/en/FormEditor/localized.png) | Localized | For objects whose label comes from a reference (label beginning with “:â€). The reference can be of the resource (STR#) or XLIFF type | +| ![](assets/en/FormEditor/noShields.png) | No Shields | No shields appear | + +## Views + +The 4D Form Editor enables you to build complex forms by distributing form objects among separate views that can then be hidden or shown as needed. + +For example, you can distribute objects according to type (fields, variables, static objects, etc.). Any type of form object, including subforms and plug-in areas, can be included in views. + +There is no limit on the number of views per form. You can create as many different views as you need. Additionally, each view can be displayed, hidden, and/or locked. + + +View management is handled via the View palette. + +![](assets/en/FormEditor/viewEditor.png) + + +### Accessing the View palette + +There are three ways to access the View palette: + +* **Toolbar**: Click on the Views icon in the Form Editor toolbar. (This icon appears gray when at least one object belongs to a view other than the default view.) + + | Default view only | With additional views | + |:----------------------------------------------------:|:--------------------------------------------------:| + | ![](assets/en/FormEditor/icon.png "No views in use") | ![](assets/en/FormEditor/icon2.png "Views in use") | + +* **Context menu** (form or object): Right-click anywhere in the Form Editor or an object, and select **Current View** + + ![](assets/en/FormEditor/contextMenu.png) + +The current view is indicated with a check mark (*e.g.*, "Work Address" in the image above) + + +* **Form menu**: Click on the **Form** menu and select **View List** + +![](assets/en/FormEditor/formMenu.png) + + +### Before you begin + +Here are a few important things to know before you start working with views: + +* **Context of use**: Views are a purely graphic tool which can only be used in the Form Editor; you cannot access views programmatically or in the Application environment. + +* **Views and pages**: Objects of the same view can belong to different form pages; only objects of the current page (and of page 0 if it is visible) can be displayed, regardless of the view configuration. + +* **Views and levels**: Views are independent of object levels; there is no display hierarchy among different views. + +* **Views and groups**: Only objects belonging to the current view can be grouped. + +* **Current and Default** views: The Default view is the first view of a form and cannot be deleted; the Current view is the view that is being edited and the name is displayed in bold text. + + + +### Managing views + +#### Creating views + +Any object created in a form is placed in the first view ("View 1") of the form. The first view is **always** the default view, indicated by (Default) after the name. The view's name can be changed (see [Renaming views](#renaming-views)), however it remains the default view. + + +![](assets/en/FormEditor/createView.png) + +There are two ways to add additional views: + +* Click on the **Add a new view** button at the bottom of the View palette: + +![](assets/en/FormEditor/addView.png) + +* Right-click on an existing view and select **Insert view**: + +![](assets/en/FormEditor/addView2.png) + +There is no limitation on the number of views. + +#### Renaming views + +By default views are named as "View" + the view number, however you can change these names to improve readability and better suit your needs. + +To rename a view, you can use either: + +* Double-click directly on the view name (the selected view in this case). The name then becomes editable: + + ![](assets/en/FormEditor/rename.png) + +* Right-click on the view name. The name then becomes editable: + + ![](assets/en/FormEditor/rename2.png) + +#### Reordering views + +You can change the display order of views by dragging/dropping them within the View palette. + +Note that the Default view does not change: + +![](assets/en/FormEditor/reorderView.png) + + +#### Deleting views + +To rename a view, you can use either: + +* Click on the **Delete the selected view** button at the bottom of the View palette: + + ![](assets/en/FormEditor/deleteView.png) + + +* Right-click on the view name, and select **Delete View**: + + ![](assets/en/FormEditor/deleteView2.png) +> If a view is deleted, any objects in it are automatically moved to the Default view. + + + + +### Using views + +Once views are created, you can use the View palette to: + +* Add object to views, +* Move objects from one view to another, +* Select all objects of the same view in a single click, +* Display or hide objects for each view, +* Lock the objects of a view. + +#### Adding objects to views + +An object can only belong to a single view. + +To create an object in another view, simply select the view in the View palette (prior to creating the object) by clicking its name (an Edit icon is displayed for the [Current view](#before-you-begin) and the name appears in bold text): + +![](assets/en/FormEditor/addObject.png) + +#### Moving objects between views + +It's also possible to move one or more objects from one view to another. In the form, select the object(s) whose view you wish to change. The view list indicates, using a symbol, the view to which the selection belongs: + +![](assets/en/FormEditor/symbol.png) +> The selection can contain several objects belonging to different views. + +Simply select the destination view, right-click, and select **Move to**: + +![](assets/en/FormEditor/moveObject.png) + +OR + +Select the destination view of the selection and click **Move to** button at the bottom of the View palette: + +![](assets/en/FormEditor/moveObject3.png) + +The selection is then placed in the new view: + +![](assets/en/FormEditor/objNewView.png) + +You can also move an object to another view via the object's context menu. Right-click on the object, select **Move to view**, and select a view from the list of available views: + +![](assets/en/FormEditor/moveObject2.png) +> The [Current view](#before-you-begin) is shown in bold text. + + + +#### Select all objects of a view + +You can select all objects belong to the same view in the current page of the form. This function is useful for applying global changes to a set of objects. + +To do this, right-click on the view in which you wish to select all the objects, click on **Select All**: + +![](assets/en/FormEditor/selectAll.png) + +You can also use the button at the bottom of the View palette: + + +![](assets/en/FormEditor/selectAll2.png) + + +#### Show or hide objects of a view + +You can show or hide objects belonging to a view at any time in the form's current page. This way you can focus on certain objects when editing the form, for example. + +By default, all views are shown, as indicated by the *Show/Hide* icon: + +![](assets/en/FormEditor/showHide.png) + +To hide a view, click the *Show/Hide* icon. It is then dimmed and objects of the corresponding view are no longer shown in the form: + +![](assets/en/FormEditor/hidden.png) +> The [Current view](#before-you-begin) cannot be hidden. + +To show a view that is hidden, simply select it or click on the *Show/Hide* icon for that view. + + + +#### Locking objects of a view + +You can lock the objects of a view. This prevents them from being selected, changed, or deleted from the form. Once locked, an object cannot be selected by a click, a rectangle, or the **Select Similar Objects** command of the context menu. This function is useful for preventing handling errors. + +By default, all views are unlocked, as indicated by the *Lock/Unlock* icon next to each view: + +![](assets/en/FormEditor/lockUnlock.png) + +To lock the objects of a view, click the *Lock/Unlock* icon. The padlock is shut, which means that the view is now locked: + +![](assets/en/FormEditor/locked.png) +> The [Current view](#before-you-begin) cannot be locked. + +To unlock a view that is locked, simply select it or click on the *Lock/Unlock* icon for that view. + +## Zoom + +You can zoom in the current form. Switch to “Zoom†mode by clicking on the magnifying glass icon or clicking directly on the desired percentage bar (50%, 100%, 200%, 400% and 800%): + +![](assets/en/FormEditor/zoom.png) + +* When you click on the magnifying glass, the cursor changes into one. You can then click in the form to increase the display or hold down Shift and click to reduce the display percentage. +* When you click on a percentage bar, the display is immediately modified. + +In Zoom mode, all Form editor functions remain available(*). + +(*) For technical reasons, it is not possible to select list box elements (headers, columns, footers) when the Form editor is in Zoom mode. + + + + + diff --git a/website/translated_docs/pt/FormEditor/forms.md b/website/translated_docs/pt/FormEditor/forms.md index b8725367316464..9512a8e5deef29 100644 --- a/website/translated_docs/pt/FormEditor/forms.md +++ b/website/translated_docs/pt/FormEditor/forms.md @@ -3,7 +3,6 @@ id: forms title: About 4D Forms --- -## Overview Forms provide the interface through which information is entered, modified, and printed in a desktop application. Users interact with the data in a database using forms and print reports using forms. Forms can be used to create custom dialog boxes, palettes, or any featured custom window. @@ -14,67 +13,75 @@ Forms can also contain other forms through the following features: - [subform objects](FormObjects/subform_overview.md) - [inherited forms](properties_FormProperties.md#inherited-forms) + ## Creating forms You can add or modify 4D forms using the following elements: -- **4D Developer interface:** Create new forms from the **File** menu or the **Explorer** window. +- **4D Developer interface:** Create new forms from the **File** menu or the **Explorer** window. - **Form Editor**: Modify your forms using the **[Form Editor](FormEditor/formEditor.md)**. - **JSON code:** Create and design your forms using JSON and save the form files at the [appropriate location](Project/architecture.md#sources-folder). Example: - { - "windowTitle": "Hello World", - "windowMinWidth": 220, - "windowMinHeight": 80, - "method": "HWexample", - "pages": [ - null, - { - "objects": { - "text": { - "type": "text", - "text": "Hello World!", - "textAlign": "center", - "left": 50, - "top": 120, - "width": 120, - "height": 80 - }, - "image": { - "type": "picture", - "pictureFormat": "scaled", - "picture": "/RESOURCES/Images/HW.png", - "alignment":"center", - "left": 70, - "top": 20, - "width":75, - "height":75 - }, - "button": { - "type": "button", - "text": "OK", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } +``` +{ + "windowTitle": "Hello World", + "windowMinWidth": 220, + "windowMinHeight": 80, + "method": "HWexample", + "pages": [ + null, + { + "objects": { + "text": { + "type": "text", + "text": "Hello World!", + "textAlign": "center", + "left": 50, + "top": 120, + "width": 120, + "height": 80 + }, + "image": { + "type": "picture", + "pictureFormat": "scaled", + "picture": "/RESOURCES/Images/HW.png", + "alignment":"center", + "left": 70, + "top": 20, + "width":75, + "height":75 + }, + "button": { + "type": "button", + "text": "OK", + "action": "Cancel", + "left": 60, + "top": 160, + + + "width": 100, + "height": 20 } } - ] - } - + } + ] +} +``` + + ## Project form and Table form There are two categories of forms: -* **Project forms** - Independent forms that are not attached to any table. They are intended more particularly for creating interface dialog boxes as well as components. Project forms can be used to create interfaces that easily comply with OS standards. +* **Project forms** - Independent forms that are not attached to any table. They are intended more particularly for creating interface dialog boxes as well as components. Project forms can be used to create interfaces that easily comply with OS standards. + -* **Table forms** - Attached to specific tables and thus benefit from automatic functions useful for developing applications based on databases. Typically, a table has separate input and output forms. +* **Table forms** - Attached to specific tables and thus benefit from automatic functions useful for developing applications based on databases. Typically, a table has separate input and output forms. Typically, you select the form category when you create the form, but you can change it afterwards. + ## Form pages Each form has is made of at least two pages: @@ -86,7 +93,7 @@ You can create multiple pages for an input form. If you have more fields or vari - Place the most important information on the first page and less important information on other pages. - Organize each topic on its own page. -- Reduce or eliminate scrolling during data entry. +- Reduce or eliminate scrolling during data entry by setting the [entry order](../FormEditor/formEditor.html#data-entry-order). - Provide space around the form elements for an attractive screen design. Multiple pages are a convenience used for input forms only. They are not for printed output. When a multi-page form is printed, only the first page is printed. @@ -95,6 +102,7 @@ There are no restrictions on the number of pages a form can have. The same field A multi-page form has both a background page and several display pages. Objects that are placed on the background page may be visible on all display pages, but can be selected and edited only on the background page. In multi-page forms, you should put your button palette on the background page. You also need to include one or more objects on the background page that provide page navigation tools for the user. + ## Inherited Forms 4D forms can use and be used as "inherited forms," meaning that all of the objects from *Form A* can be used in *Form B*. In this case, *Form B* "inherits" the objects from *Form A*. @@ -105,12 +113,12 @@ All forms (table forms and project forms) can be designated as an inherited form When a form is executed, the objects are loaded and combined in the following order: -1. Page zero of the inherited form -2. Page 1 of the inherited form -3. Page zero of the open form -4. Current page of the open form. +1. Page zero of the inherited form +2. Page 1 of the inherited form +3. Page zero of the open form +4. Current page of the open form. -This order determines the default entry order of objects in the form. +This order determines the default [entry order](../FormEditor/formEditor.html#data-entry-order) of objects in the form. > Only pages 0 and 1 of an inherited form can appear in other forms. @@ -121,9 +129,9 @@ To define an inherited form, the [Inherited Form Name](properties_FormProperties A form can inherit from a project form, by setting the [Inherited Form Table](properties_FormProperties.md#inherited-form-table) property to **\** in the Property List (or " " in JSON). To stop inheriting a form, select **\** in the Property List (or " " in JSON) for the [Inherited Form Name](properties_FormProperties.md#inherited-form-name) property. - > It is possible to define an inherited form in a form that will eventually be used as an inherited form for a third form. The combining of objects takes place in a recursive manner. 4D detects recursive loops (for example, if form [table1]form1 is defined as the inherited form of [table1]form1, in other words, itself) and interrupts the form chain. + ## Supported Properties -[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) \ No newline at end of file +[Associated Menu Bar](properties_Menu.md#associated-menu-bar) - [Fixed Height](properties_WindowSize.md#fixed-height) - [Fixed Width](properties_WindowSize.md#fixed-width) - [Form Break](properties_Markers.md#form-break) - [Form Detail](properties_Markers.md#form-detail) - [Form Footer](properties_Markers.md#form-footer) - [Form Header](properties_Markers.md#form-header) - [Form Name](properties_FormProperties.md#form-name) - [Form Type](properties_FormProperties.md#form-type) - [Inherited Form Name](properties_FormProperties.md#inherited-form-name) - [Inherited Form Table](properties_FormProperties.md#inherited-form-table) - [Maximum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Maximum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Method](properties_Action.md#method) - [Minimum Height](properties_WindowSize.md#maximum-height-minimum-height) - [Minimum Width](properties_WindowSize.md#maximum-width-minimum-width) - [Pages](properties_FormProperties.md#pages) - [Print Settings](properties_Print.md#settings) - [Published as Subform](properties_FormProperties.md#published-as-subform) - [Save Geometry](properties_FormProperties.md#save-geometry) - [Window Title](properties_FormProperties.md#window-title) diff --git a/website/translated_docs/pt/FormEditor/macros.md b/website/translated_docs/pt/FormEditor/macros.md new file mode 100644 index 00000000000000..1d7ac3d530312a --- /dev/null +++ b/website/translated_docs/pt/FormEditor/macros.md @@ -0,0 +1,334 @@ +--- +id: macros +title: Form Editor Macros +--- + + +The 4D Form editor supports macros. A macro is a set of instructions to perform an action or a sequence of actions. When called upon, the macro will execute its instructions and automatically perform the action(s). + +For example if you have a recurring report with specific formatting (e.g., certain text must appear in red and certain text must appear in green), you can create a macro to automatically set the color. You can create macros for the 4D Form editor that can: + +* Create and execute 4D code +* Display dialogs +* Select form objects +* Add / delete / modify forms, form objects as well as their properties +* Modify project files (update, delete) + +Macros code supports [class functions](Concepts/classes.md) and [form object properties in JSON](FormObjects/properties_Reference.md) to let you define any custom feature in the Form editor. + +Macros can been defined for the host project or for components within the project. Usually, you will create a macro and install it within the components you use for development. + +When called, a macro overrides any previously specified behaviors. + +## Hands-on example + +In this short example, you'll see how to create and call a macro that adds a "Hello World!" alert button in the top left corner of your form. + +1. In a `formMacros.json` file within the `Sources` folder of your project, you write: + +```js +{ + "macros": { + "Add Hello World button": { + "class": "AddButton" + } + } +} +``` + +2. Create a 4D class named `AddButton`. + +3. Within the `AddButton` class, write the following function: + +```4d +Function onInvoke($editor : Object)->$result : Object + + var $btnHello : Object + + // Create a "Hello" button + $btnHello:=New object("type"; "button"; \ + "text"; "Hello World!"; \ + "method"; New object("source"; "ALERT(\"Hello World!\")"); \ + "events"; New collection("onClick"); \ + "width"; 120; \ + "height"; 20; \ + "top"; 0; \ + "left"; 0) + + // Add button in the current page + $editor.editor.currentPage.objects.btnHello:=$btnHello + + // Select the new button in the form editor + $editor.editor.currentSelection.clear() //unselect elements + $editor.editor.currentSelection.push("btnHello") + + // Notify the modification to the 4D Form editor + $result:=New object("currentSelection"; $editor.editor.currentSelection;\ + "currentPage"; $editor.editor.currentPage) +``` + +You can then call the macro: ![](assets/en/FormEditor/macroex1.png) ![](assets/en/FormEditor/macroex2.png) + + +## Calling macros in the Form editor + +When macros are defined in your 4D project, you can call a macro using the contextual menu of the Form editor: + +![](assets/en/FormEditor/macroSelect.png) + +This menu is built upon the `formMacros.json` [macro definition file(s)](#location-of-macros). Macro items are sorted in alphabetical order. + +This menu can be called in an empty area or a selection in the form. Selected object are passed to `$editor.currentSelection` or `$editor.target` in the [`onInvoke`](#oninvoke) function of the macro. + +A single macro can execute several operations. If selected, the **Undo** feature of the Form editor can be used to reverse macro operations globally. + +## Location of macro file + +All 4D Form Editor macros are defined within a single JSON file per project or component: `FormMacros.json`. + +This file must be located in the host or component's **Project** > **Sources** folder: + +![](assets/en/FormEditor/macroStructure.png) + + + +## Declaring macros + +The structure of the `formMacros.json` file is the following: + +```js +{ + "macros": { + : { + "class": , + : + } + } +} +``` + +Here is the description of the JSON file contents: + +| Attribute | | | Type | Description | +| --------- | ------------------- | ------------------------ | ------ | ------------------------------------------------------ | +| macros | | | object | list of defined macros | +| | `` | | object | macro definition | +| | | class | string | macro class name | +| | | `` | any | (optional) custom value to retrieve in the constructor | + +Custom properties, when used, are passed to the [constructor](#class-constructor) function of the macro. + +### Example + +```js +{ + "macros": { + "Open Macros file": { + "class": "OpenMacro" + }, + "Align to Right on Target Object": { + "class": "AlignOnTarget", + "myParam": "right" + }, + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + + + +## Instantiating macros in 4D + +Each macro you want to instantiate in your project or component must be declared as a [4D class](Concepts/classes.md). + +The class name must match the name defined using the [class](#creating-macros) attribute of the `formMacros.json` file. + +Macros are instantiated at application startup. Consequently, if you modify the macro class structure (add a function, modify a parameter...) or the [constructor](#class-constructor), you will have to restart the application to apply the changes. + + + + +## Macro Functions + +Every macro class can contain a `Class constructor` and two functions: `onInvoke()` and `onError()`. + + +### Class constructor + +#### Class constructor($macro : Object) + +| Parameter | Type | Description | +| --------- | ------ | -------------------------------------------------------- | +| $macro | Object | Macro declaration object (in the `formMacros.json` file) | + +Macros are instantiated using a [class constructor](Concepts/classes.md#class-constructor) function, if it exists. + +The class constructor is called once during class instantiation, which occurs at application startup. + +Custom properties added to the [macro declaration](#declaring-macros) are returned in the parameter of the class contructor function. + + + +#### Example + +In the `formMacros.json` file: + +```js +{ + "macros": { + "Align to Left on Target Object": { + "class": "AlignOnTarget", + "myParam": "left" + } + } +} +``` + +You can write: + +```4d +// Class "AlignOnTarget" +Class constructor($macro : Object) + This.myParameter:=$macro.myParam //left + ... +``` + + +### onInvoke() + +#### onInvoke($editor : Object) -> $result : Object + +| Parameter | Type | Description | +| --------- | ------ | ------------------------------------------------------------------------------------ | +| $editor | Object | Form Editor Macro Proxy object containing the form properties | +| $result | Object | Form Editor Macro Proxy object returning properties modified by the macro (optional) | + +The `onInvoke` function is automatically executed each time the macro is called. + +When the function is called, it receives in the `$editor.editor` property a copy of all the elements of the form with their current values. You can then execute any operation on these properties. + +Once operations are completed, if the macro results in modifying, adding, or removing objects, you can pass the resulting edited properties in `$result`. The macro processor will parse the returned properties and apply necessary operations in the form. Obviously, the less properties you return, the less time processing will require. + +Here are the properties returned in the *$editor* parameter: + +| Property | Type | Description | +| -------------------------------- | ---------- | --------------------------------------------------------------------------------- | +| $editor.editor.form | Object | The entire form | +| $editor.editor.file | File | File object of the form file | +| $editor.editor.name | String | Name of the form | +| $editor.editor.table | number | Table number of the form, 0 for project form | +| $editor.editor.currentPageNumber | number | The number of the current page | +| $editor.editor.currentPage | Object | The current page, containing all the form objects and the entry order of the page | +| $editor.editor.currentSelection | Collection | Collection of names of selected objects | +| $editor.editor.formProperties | Object | Properties of the current form | +| $editor.editor.target | string | Name of the object under the mouse when clicked on a macro | + +Here are the properties that you can pass in the `$result` object if you want the macro processor to execute a modification. All properties are optional: + +| Property | Type | Description | +| ----------------- | ---------- | ----------------------------------------------------------- | +| currentPage | Object | currentPage including objects modified by the macro, if any | +| currentSelection | Collection | currentSelection if modified by the macro | +| formProperties | Object | formProperties if modified by the macro | +| editor.groups | Object | group info, if groups are modified by the macro | +| editor.views | Object | view info, if views are modified by the macro | +| editor.activeView | String | Active view name | + + +For example, if objects of the current page and groups have been modified, you can write: + +```4d + $result:=New object("currentPage"; $editor.editor.currentPage ; \ + "editor"; New object("groups"; $editor.editor.form.editor.groups)) + +``` + + +#### `method` attribute + +When handling the `method` attribute of form objects, you can define the attribute value in two ways in macros: + +- Using a [string containing the method file name/path](FormObjects/properties_Action.md#method). + +- Using an object with the following structure: + +| Property | Type | Description | +| -------- | ---- | ----------- | +| | | | + source|String|method code| + +4D will create a file using the object name in the "objectMethods" folder with the content of `source` attribute. This feature is only available for macro code. + +#### `$4dId` property in `currentPage.objects` + +The `$4dId` property defines a unique ID for each object in the current page. This key is used by the macro processor to control changes in `$result.currentPage`: + +- if the `$4dId` key is missing in both the form and an object in `$result`, the object is created. +- if the `$4dId` key exists in the form but is missing in `$result`, the object is deleted. +- if the `$4dId` key exists in both the form and an object in `$result`, the object is modified. + + +#### Example + +You want to define a macro function that will apply the red color and italic font style to any selected object(s). + +```4d +Function onInvoke($editor : Object)->$result : Object + var $name : Text + + If ($editor.editor.currentSelection.length>0) + // Set stroke to red and style to italic for each selected object + For each ($name; $editor.editor.currentSelection) + $editor.editor.currentPage.objects[$name].stroke:="red" + $editor.editor.currentPage.objects[$name].fontStyle:="italic" + + End for each + + Else + ALERT("Please select a form object.") + End if + + // Notify to 4D the modification + $result:=New object("currentPage"; $editor.editor.currentPage) +``` + + +### onError() + +#### onError($editor : Object; $resultMacro : Object ; $error : Collection) + +| Parameter | | Type | Description | +| ------------ | --------------------- | ---------- | ---------------------------------------- | +| $editor | | Object | Object send to [onInvoke](#oninvoke) | +| $resultMacro | | Object | Object returned by [onInvoke](#oninvoke) | +| $error | | Collection | Error stack | +| | [].errCode | Number | Error code | +| | [].message | Text | Description of the error | +| | [].componentSignature | Text | Internal component signature | + +The `onError` function is executed when the macros processor encounters an error. + +When executing a macro, if 4D encounters an error which prevents the macro from being cancelled, it does not execute the macro. It is the case for example if executing a macro would result in: + +- deleting or modifying a script whose file is read-only. +- creating two objects with the same internal ID. + +#### Example + +In a macro class definition, you can write the following generic error code: + +```4d +Function onError($editor : Object; $resultMacro : Object; $error : Collection) + var $obj : Object + var $txt : Text + $txt:="" + + For each ($obj; $error) + $txt:=$txt+$obj.message+" \n" + End for each + + ALERT($txt) +``` diff --git a/website/translated_docs/pt/FormEditor/objectLibrary.md b/website/translated_docs/pt/FormEditor/objectLibrary.md index d829cb1d56cf82..1623d002d7cc00 100644 --- a/website/translated_docs/pt/FormEditor/objectLibrary.md +++ b/website/translated_docs/pt/FormEditor/objectLibrary.md @@ -3,16 +3,16 @@ id: objectLibrary title: Object libraries --- -## Overview 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. 4D proposes two kinds of object libraries: -- a standard, preconfigured object library, available in all your projects. +- 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,15 +25,16 @@ 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. + - or drag and drop the object from the library The object is then added to the form. This library is read-only. If you want to edit default objects or create your own library of preconfigured objects or project forms, you need to create a custom object library (see below). 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 + +## 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. @@ -41,6 +42,7 @@ Objects are stored with all their properties, including their object methods. Li 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 +55,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. +A given object library can only be opened by one project at a time. However, several different libraries can be opened in the same project. 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 +66,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. @@ -78,7 +80,8 @@ Basic operations are available in the context menu or the options menu of the wi - **Cut** or **Copy** to the pasteboard - **Paste** an object from the pasteboard - **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. +- **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: @@ -89,7 +92,6 @@ 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): @@ -98,4 +100,5 @@ The following is a list of dependent objects that will be pasted into the librar - Formats/Filters - Pictures - 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 new file mode 100644 index 00000000000000..5c25353029b25e --- /dev/null +++ b/website/translated_docs/pt/FormEditor/pictures.md @@ -0,0 +1,99 @@ +--- +id: pictures +title: Pictures +--- + +4D includes specific support for pictures used in your forms. + + +## Native Formats Supported + +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. + +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. + +> 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 + +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) + +O ícone é usado automaticamente onde a imagem precisar ser exibida: + +![](assets/en/FormEditor/picNoFormat2.png) + +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. + + +## High Resolution Pictures + +4D supports high resolution pictures on both macOS and Windows platforms. High resolution pictures can be defined by either scale factor or dpi. + +### Scale factor (macOS only) + +High resolution displays have a higher pixel density than traditional standard displays. For pictures to render correctly on high resolution displays, the number of pixels in the picture must be multiplied by the *scale factor* (*i.e.*, two times larger, three times larger, etc.). + +When using high resolution pictures, you can specify the scale factor by adding "@nx" in the picture's name (where *n* designates the scale factor). In the table below, you can see that the scale factor is indicated in the names of the high resolution pictures, *circle@2x.png* and *circle@3x.png*. + +| Display Type | Scale Factor | Example | +| ------------------- | ---------------------------------------------- | ------------------------------------------------------------------------ | +| Standard Resolution | 1:1 pixel density. | **1x**
          ![](assets/en/FormEditor/pictureScale1.png) *circle.png* | +| High Resolution | Pixel density increased by a factor of 2 or 3. |
          2x3x
          ![](assets/en/FormEditor/pictureScale2.png)*circle@2x.png*![](assets/en/FormEditor/pictureScale3.png)
          *circle@3x.png*
          | + + + +High resolution pictures with the @nx convention can be used in the following objects: + +* [Static pictures](FormObjects/staticPicture.md) +* [Buttons](FormObjects/button_overview.md)/[radio](FormObjects/radio_overview.md)/[check boxes](FormObjects/checkbox_overview.md) +* [Picture buttons](FormObjects/pictureButton_overview.md)/[Picture pop-ups](FormObjects/picturePopupMenu_overview.md) +* [Tab controls](FormObjects/tabControl.md) +* [List box headers](FormObjects/listbox_overview.md#list-box-headers) +* [Menu icons](Menus/properties.md#item-icon) + + + +4D automatically prioritizes pictures with the highest resolution.

          **Example**: When using two screens (one high resolution display, one standard display) and you move a form from one screen to another, 4D automatically renders the highest possible resolution of the picture. Even if a command or property specifies *circle.png*, *circle@3x.png* will be used (if it exists). +> Note that resolution prioritization occurs only for displaying pictures onscreen, there is no automatic prioritization made when printing. + + + +### DPI (macOS and Windows) + +While 4D automatically prioritizes the highest resolution, there are, however, some behavioral differences depending on screen and image dpi*(\*)*, and picture format: + +| Operation | Behavior | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | +| Drop or Paste | If the picture has:

          • **72dpi or 96dpi** - The picture is "[Center](FormObjects/properties_Picture.md#center--truncated-non-centered)" formatted and the object containing the picture has the same number of pixels.
          • **Other dpi** - The picture is "[Scaled to fit](FormObjects/properties_Picture.md#scaled-to-fit)" formatted and the object containing the picture is equal to (picture's number of pixels * screen dpi) / (picture's dpi)
          • **No dpi** - The picture is "[Scaled to fit](FormObjects/properties_Picture.md#scaled-to-fit)" formatted.
          • | +| [Automatic Size](https://doc.4d.com/4Dv18/4D/18/Setting-object-display-properties.300-4575725.en.html#148057) (Form Editor context menu) | If the picture's display format is:
            • **[Scaled](FormObjects/properties_Picture.md#scaled-to-fit)** - The object containing the picture is resized according to (picture's number of pixels * screen dpi) / (picture's dpi)
            • **Not scaled** - The object containing the picture has the same number of pixels as the picture.

            | + +*(\*) Typically, macOS = 72dpi, Windows = 96dpi* + + +## Dark mode pictures (macOS only) + +You can define specific pictures and icons to be used instead of standard pictures when [forms use the dark scheme](properties_FormProperties.md#color-scheme). + +A dark mode picture is defined in the following way: + +- dark mode picture has the same name as the standard (light scheme) version with the suffix "`_dark`" +- dark mode picture is stored next to the standard version. + +At runtime, 4D will automatically load the light or dark image according to the [current form color scheme](https://doc.4d.com/4dv19/help/command/en/1761.html). + +![](assets/en/FormEditor/darkicon.png) + + + +## Mouse Coordinates in a Picture + +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. + +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`](Events/onClicked.md), [`On Double Clicked`](Events/onDoubleClicked.md), [`On Mouse up`](Events/onMouseUp.md), [`On Mouse Enter`](Events/onMouseEnter.md), or [`On Mouse Move`](Events/onMouseMove.md) form events. diff --git a/website/translated_docs/pt/FormEditor/properties_Action.md b/website/translated_docs/pt/FormEditor/properties_Action.md index dbf4fe7c042303..88c6e0f0a7d513 100644 --- a/website/translated_docs/pt/FormEditor/properties_Action.md +++ b/website/translated_docs/pt/FormEditor/properties_Action.md @@ -13,17 +13,19 @@ You do not call a form method—4D calls it automatically when an event involves Several types of method references are supported: - a standard project method file path, i.e. that uses the following pattern: - `method.4dm` - This type of reference indicates that the method file is located at the default location ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). In this case, 4D automatically handles the form method when operations are executed on the form (renaming, duplication, copy/paste...) + `method.4dm` + This type of reference indicates that the method file is located at the default location ("sources/{TableForms/*numTable*} | {Forms}/*formName*/"). In this case, 4D automatically handles the form method when operations are executed on the form (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 form operations. - a custom method file path including the .4dm extension, e.g.: - `MyMethods/myFormMethod.4dm` You can also use a filesystem: - `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. + `MyMethods/myFormMethod.4dm` You can also use a filesystem: + `/RESOURCES/Forms/FormMethod.4dm` In this case, 4D does not provide automatic support for object operations. + #### JSON Grammar | Name | Data Type | Possible Values | | ------ | --------- | ---------------------------------------------------------------- | -| method | text | Form method standard or custom file path, or project method name | \ No newline at end of file +| method | text | Form method standard or custom file path, or project method name | + diff --git a/website/translated_docs/pt/FormEditor/properties_FormProperties.md b/website/translated_docs/pt/FormEditor/properties_FormProperties.md index b150a134e3e136..f7db27d25f6d59 100644 --- a/website/translated_docs/pt/FormEditor/properties_FormProperties.md +++ b/website/translated_docs/pt/FormEditor/properties_FormProperties.md @@ -3,7 +3,24 @@ id: propertiesForm title: Form Properties --- -* * * +--- + +## Color Scheme +> Color scheme property is only applied on macOS. + +This property defines the color scheme for the form. By default when the property is not set, the value for a color scheme is **inherited** (the form uses the scheme defined at the [application level](https://doc.4d.com/4dv19/help/command/en/page1762.html)). This can be changed for the form to one of the following two options: + +* dark - light text on a dark background +* light - dark text on a light background +> A defined color scheme can not be overridden by a CSS. + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ----------- | --------- | --------------- | +| colorScheme | string | "dark", "light" | + +--- ## Pages @@ -14,24 +31,26 @@ Each form has is made of at least two pages: For more information, please refer to [Form pages](forms.md#form-pages). + #### JSON Grammar | Name | Data Type | Possible Values | | ----- | ---------- | ------------------------------------------------------------------------ | | pages | collection | Collection of pages (each page is an object, page 0 is the first element | +--- -* * * ## Form Name This property is the name of the form itself and is used to refer to the form by name using the 4D language. The form name must comply with the [rules specified for identifiers](Concepts/identifiers.md) in 4D. + #### JSON Grammar The form name is defined by the name of the folder that contains the form.4Dform file. See [project architecture](Project/architecture.md#sources-folder) for more information. -* * * +--- ## Form Type @@ -43,8 +62,10 @@ Each table in a database generally has at least two table forms. One for listing - Input form - used for data entry. It displays a single record per screen and typically has buttons for saving and canceling modifications to the record and for navigating from record to record (*i.e.*, First Record, Last Record, Previous Record, Next Record). ![](assets/en/FormObjects/formInput.png) + Supported types depend on the form category: + | Form Type | JSON grammar | Description | Supported with | | ------------------------ | ---------------- | ------------------------------------------------------------- | --------------------------- | | Detail Form | detailScreen | A display form for data entry and modification | Project forms - Table forms | @@ -60,8 +81,7 @@ Supported types depend on the form category: | ----------- | --------- | ------------------------------------------------------------ | | destination | string | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | - -* * * +--- ## Inherited Form Name @@ -71,14 +91,15 @@ To inherit from a table form, set the table in the [Inherited Form Table](#inher To remove inheritance, select **\** in the Property List (or " " in JSON). + #### JSON Grammar | Name | Data Type | Possible Values | | ------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | | inheritedForm | string | Name of table or project form OR a POSIX path to a .json file describing the form OR an object describing the form | +--- -* * * ## Inherited Form Table @@ -86,6 +107,7 @@ This property specifies the database table from which to [inherit a form](forms. Set to **\** in the Property List (or " " in JSON) to inherited from a project form. + #### JSON Grammar | Name | Data Type | Possible Values | @@ -93,14 +115,16 @@ Set to **\** in the Property List (or " " in JSON) to inherited from a pro | inheritedFormTable | string or number | table name or table number | -* * * +--- ## Published as Subform -For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host database, it must have been explicitly shared. When this property is selected, the form will be published in the host database. +For a component form to be selected as a [subform](FormObjects/subform_overview.md) in a host application, it must have been explicitly shared. When this property is selected, the form will be published in the host application. Only project forms can be specified as published subforms. + + #### JSON Grammar | Name | Data Type | Possible Values | @@ -108,15 +132,14 @@ Only project forms can be specified as published subforms. | shared | boolean | true, false | -* * * +--- ## Save Geometry When the option is used, if the window is opened using the `Open form window` command with the `*` parameter, several form parameters are automatically saved by 4D when the window is closed, regardless of how they were modified during the session: -* the current page, -* the position, size and visibility of each form object (including the size and visibility of list box columns). - +* the current page, +* the position, size and visibility of each form object (including the size and visibility of list box columns). > This option does not take into account objects generated using the `OBJECT DUPLICATE` command. In order for a user to recover their environment when using this command, the developer must repeat the sequence of creation, definition and positioning of the objects. When this option is selected, the [Save Value](FormObjects/properties_Object.md#save-value) option is available for certain objects. @@ -127,12 +150,11 @@ When this option is selected, the [Save Value](FormObjects/properties_Object.md# | ---------------- | --------- | --------------- | | memorizeGeometry | boolean | true, false | - #### See also - [**Save Value**](FormObjects/properties_Object.md#save-value) -* * * + +--- ## Window Title @@ -140,12 +162,11 @@ The window title is used when the form is opened using the `Open form window` an You can use dynamic references to set the window titles for forms, *i.e.*: -* A standard XLIFF reference stored in the Resources folder. -* A table or field label: The syntax to apply is or - - . - -* A variable or a field: The syntax to apply is \ or <[TableName]FieldName>. The current value of the field or variable will be displayed in the window title. +* A standard XLIFF reference stored in the Resources folder. +* A table or field label: The syntax to apply is or + + . +* A variable or a field: The syntax to apply is \ or <[TableName]FieldName>. The current value of the field or variable will be displayed in the window title. > The number of characters for a window title is limited to 31. @@ -153,4 +174,6 @@ You can use dynamic references to set the window titles for forms, *i.e.*: | Name | Data Type | Possible Values | | ----------- | --------- | ------------------------------------------------------ | -| windowTitle | string | The name of the window as plain text or as a reference | \ No newline at end of file +| windowTitle | string | The name of the window as plain text or as a reference | + + diff --git a/website/translated_docs/pt/FormEditor/properties_FormSize.md b/website/translated_docs/pt/FormEditor/properties_FormSize.md index 03eb07023cfc73..3df46057873485 100644 --- a/website/translated_docs/pt/FormEditor/properties_FormSize.md +++ b/website/translated_docs/pt/FormEditor/properties_FormSize.md @@ -8,247 +8,75 @@ title: Form Size Size options depend on the value of the **Size based on** option. -* * * - +--- ## Size based on -* **Automatic Size**: The size of the form will be that necessary to display all the objects, to which will be added the margin values (in pixels) entered in the [**Hor. Margin**](#hor-margin) and [**Vert. Margin**](#vert-margin) fields. - -< - -p> You can choose this option when you want to use active objects placed in an offscreen area (*i.e.*, outside the bounding rectangle of the window) with an automatic size window. Thanks to this option, the presence of these objects will not modify the size of the window. - -* **Set Size**: The size of the form will be based on what you enter (in pixels) in the [**Width**](#width) and [**Height**](#height) fields. - -* **\ - - - : The size of the form will be based on the position of the selected form object. For example, if you choose an object that is placed in the bottom-right part of the area to be displayed, the form size will consist of a rectangle whose upper left corner will be the origin of the form and the lower right corner will correspond to that of the selected object, plus any margin values.

            - -
            -

            - For output forms, only the Hor. margin or Width fields are available. -

            -
            - -

            - JSON Grammar -

            - - - - - - - - - - - - - - - - - -
            - Name - - Data Type - - Possible Values -
            - formSizeAnchor - - string - - Name of object to use to defined the size of the form -
            - -
            - -

            - Height -

            - -

            - Height of the form (in pixels) when the form size is Set size. -

            - -

            - JSON Grammar -

            - - - - - - - - - - - - - - - - - -
            - Name - - Data Type - - Possible Values -
            - height - - number - - integer value -
            - -
            - -

            - Hor. Margin -

            - -

            - Value to add (in pixels) to the right margin of the form when the form size is Automatic size or \ - - -

            - -

            - This value also determines the right-hand margins of forms used in the Label editor. -

            - -

            - JSON Grammar -

            - - - - - - - - - - - - - - - - - -
            - Name - - Data Type - - Possible Values -
            - rightMargin - - number - - integer value -
            - -
            - -

            - Vert. Margin -

            - -

            - Value to add (in pixels) to the bottom margin of the form when the form size is Automatic size or \ - - - .

            - -

            - This value also determines the top margins of forms used in the Label editor. -

            - -

            - JSON Grammar -

            - - - - - - - - - - - - - - - - - -
            - Name - - Data Type - - Possible Values -
            - bottomMargin - - number - - integer value -
            - -
            - -

            - Width -

            - -

            - Width of the form (in pixels) when the form size is Set size. -

            - -

            - JSON Grammar -

            - - - - - - - - - - - - - - - - - -
            - Name - - Data Type - - Possible Values -
            - width - - number - - integer value -
            \ No newline at end of file + +* **Automatic Size**: The size of the form will be that necessary to display all the objects, to which will be added the margin values (in pixels) entered in the [**Hor. Margin**](#hor-margin) and [**Vert. Margin**](#vert-margin) fields.

            You can choose this option when you want to use active objects placed in an offscreen area (*i.e.*, outside the bounding rectangle of the window) with an automatic size window. Thanks to this option, the presence of these objects will not modify the size of the window. + + +* **Set Size**: The size of the form will be based on what you enter (in pixels) in the [**Width**](#width) and [**Height**](#height) fields. + +* **\**: The size of the form will be based on the position of the selected form object. For example, if you choose an object that is placed in the bottom-right part of the area to be displayed, the form size will consist of a rectangle whose upper left corner will be the origin of the form and the lower right corner will correspond to that of the selected object, plus any margin values. + + +> For output forms, only the [**Hor. margin**](#hor-margin) or [**Width**](width) fields are available. + + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| -------------- | --------- | ----------------------------------------------------- | +| formSizeAnchor | string | Name of object to use to defined the size of the form | + +--- +## Height + +Height of the form (in pixels) when the [form size](#size-based-on) is **Set size**. + + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ------ | --------- | --------------- | +| height | number | integer value | + + +--- +## Hor. Margin +Value to add (in pixels) to the right margin of the form when the [form size](#size-based-on) is **Automatic size** or **\** + +This value also determines the right-hand margins of forms used in the Label editor. + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ----------- | --------- | --------------- | +| rightMargin | number | integer value | + + +--- + +## Vert. Margin +Value to add (in pixels) to the bottom margin of the form when the [form size](#size-based-on) is **Automatic size** or **\**. + +This value also determines the top margins of forms used in the Label editor. + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ------------ | --------- | --------------- | +| bottomMargin | number | integer value | + + +--- +## Width + +Width of the form (in pixels) when the [form size](#size-based-on) is **Set size**. + + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ----- | --------- | --------------- | +| width | number | integer value | diff --git a/website/translated_docs/pt/FormEditor/properties_JSONref.md b/website/translated_docs/pt/FormEditor/properties_JSONref.md index 9b676c21e211c3..e2e4377f429f35 100644 --- a/website/translated_docs/pt/FormEditor/properties_JSONref.md +++ b/website/translated_docs/pt/FormEditor/properties_JSONref.md @@ -4,45 +4,49 @@ title: JSON property list --- This page provides a comprehensive list of all form properties, sorted by their JSON name. Click on a property name to access its detailed description. - > In the "Form Properties" chapter, properties are sorted according to their names and themes in the Property List. -| Property | Description | Possible Values | -| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -| a | | | -| [bottomMargin](properties_FormSize.md#vert-margin) | Vertical margin value (in pixels) | minimum: 0 | -| **d** | | | -| [destination](properties_FormProperties.md#form-type) | Form type | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | -| **e** | | | -| [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"...]. | -| **f** | | | -| [formSizeAnchor](properties_FormSize.md#form-size) | Name of the object whose position determines the size of the form. (minimum length: 1) | Name of a 4D object | -| **h** | | | -| [height](properties_FormSize.md#height) | Height of the form | minimum: 0 | -| **i** | | | -| [inheritedForm](properties_FormProperties.md#inherited-form-name) | Designates the form to inherit | Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form | -| [inheritedFormTable](properties_FormProperties.md#inherited-form-table) | Designates the table an inherited form will use | A table name or number | -| **m** | | | -| [markerBody](properties_Markers.md#form-detail) | Detail marker position | minimum: 0 | -| [markerBreak](properties_Markers.md#form-break) | Break marker position(s) | minimum: 0 | -| [markerFooter](properties_Markers.md#form-footer) | Footer marker position | minimum: 0 | -| [markerHeader](properties_Markers.md#forrm-header) | Header marker position(s) | integer minimum: 0; integer array minimum: 0 | -| [memorizeGeometry](properties_FormProperties.md#memorize-geometry) | Saves the form parameters when the form window is closed | true, false | -| [menuBar](properties_Menu.md#associated-menu-bar) | Menu bar to associate to the form | Name of a valid menu bar | -| [method](properties_Action.md#method) | A project method name. | The name of an existing project method | -| **p** | | | -| [pages](properties_FormProperties.md#pages) | Collection of pages (each page is an object) | Page objects | -| [pageFormat](properties_Print.md#settings) | object | Available print properties | -| **r** | | | -| [rightMargin](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | minimum: 0 | -| **s** | | | -| [shared](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | -| **w** | | | -| [width](properties_FormSize.md#width) | Width of the form | minimum: 0 | -| [windowMaxHeight](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | minimum: 0 | -| [windowMaxWidth](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | minimum: 0 | -| [windowMinHeight](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | minimum: 0 | -| [windowMinWidth](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | minimum: 0 | -| [windowSizingX](properties_WindowSize.md#fixed-width) | Form window's vertical sizing | "fixed", "variable" | -| [windowSizingY](properties_WindowSize.md#fixed-height) | Form window's horizontal sizing | "fixed", "variable" | -| [windowTitle](properties_FormProperties.md#window-title) | Designates a form window's title | A name for the form window | \ No newline at end of file +[a](#a) - [c](#c) - [d](#d) - [e](#e) - [f](#f) - [h](#h) - [i](#i) - [m](#m) - [p](#p) - [r](#r) - [s](#s) - [w](#w) + +| Property | Description | Possible Values | +| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| **a** | | | +| [`bottomMargin`](properties_FormSize.md#vert-margin) | Vertical margin value (in pixels) | minimum: 0 | +| **c** | | | +| [`colorScheme`](properties_FormProperties.md#color-scheme) | Color scheme for the form | "dark", "light" | +| **d** | | | +| [`destination`](properties_FormProperties.md#form-type) | Form type | "detailScreen", "listScreen", "detailPrinter", "listPrinter" | +| **e** | | | +| [`entryOrder`](formEditor.md#data-entry-order) | The order in which active objects are selected when the **Tab** or the **Carriage return** key is used in an input form | Collection of 4D Form object names | +| [`events`](Events/overview.md) | List of all events selected for the object or form | Collection of event names, e.g. ["onClick","onDataChange"...]. | +| **f** | | | +| [`formSizeAnchor`](properties_FormSize.md#form-size) | Name of the object whose position determines the size of the form. (minimum length: 1) | Name of a 4D object | +| **h** | | | +| [`height`](properties_FormSize.md#height) | Height of the form | minimum: 0 | +| **i** | | | +| [`inheritedForm`](properties_FormProperties.md#inherited-form-name) | Designates the form to inherit | Name (string) of table or project form OR a POSIX path (string) to a .json file describing the form OR an object describing the form | +| [`inheritedFormTable`](properties_FormProperties.md#inherited-form-table) | Designates the table an inherited form will use | A table name or number | +| **m** | | | +| [`markerBody`](properties_Markers.md#form-detail) | Detail marker position | minimum: 0 | +| [`markerBreak`](properties_Markers.md#form-break) | Break marker position(s) | minimum: 0 | +| [`markerFooter`](properties_Markers.md#form-footer) | Footer marker position | minimum: 0 | +| [`markerHeader`](properties_Markers.md#forrm-header) | Header marker position(s) | integer minimum: 0; integer array minimum: 0 | +| [`memorizeGeometry`](properties_FormProperties.md#memorize-geometry) | Saves the form parameters when the form window is closed | true, false | +| [`menuBar`](properties_Menu.md#associated-menu-bar) | Menu bar to associate to the form | Name of a valid menu bar | +| [`method`](properties_Action.md#method) | A project method name. | The name of an existing project method | +| **p** | | | +| [`pages`](properties_FormProperties.md#pages) | Collection of pages (each page is an object) | Page objects | +| [`pageFormat`](properties_Print.md#settings) | object | Available print properties | +| **r** | | | +| [`rightMargin`](properties_FormSize.md#hor-margin) | Horizontal margin value (in pixels) | minimum: 0 | +| **s** | | | +| [`shared`](properties_FormProperties.md#published-as-subform) | Specifies if a form can be used as a subform | true, false | +| **w** | | | +| [`width`](properties_FormSize.md#width) | Width of the form | minimum: 0 | +| [`windowMaxHeight`](properties_FormProperties.md#maximum-height) | Form window's largest allowable height | minimum: 0 | +| [`windowMaxWidth`](properties_FormProperties.md#maximum-width) | Form window's largest allowable width | minimum: 0 | +| [`windowMinHeight`](properties_FormProperties.md#minimum-height) | Form window's smallest allowable height | minimum: 0 | +| [`windowMinWidth`](properties_FormProperties.md#minimum-width) | Form window's smallest allowable width | minimum: 0 | +| [`windowSizingX`](properties_WindowSize.md#fixed-width) | Form window's vertical sizing | "fixed", "variable" | +| [`windowSizingY`](properties_WindowSize.md#fixed-height) | Form window's horizontal sizing | "fixed", "variable" | +| [`windowTitle`](properties_FormProperties.md#window-title) | Designates a form window's title | A name for the form window | \ No newline at end of file diff --git a/website/translated_docs/pt/FormEditor/properties_Markers.md b/website/translated_docs/pt/FormEditor/properties_Markers.md index 07f8e1dfe6a8c8..2c70c981fe6ab4 100644 --- a/website/translated_docs/pt/FormEditor/properties_Markers.md +++ b/website/translated_docs/pt/FormEditor/properties_Markers.md @@ -10,7 +10,7 @@ Whenever any form is used for output, either for screen display or printing, the Methods that are associated with objects in these areas are executed when the areas are printed or displayed as long as the appropriate events have been activated. For example, a object method placed in the Header area is executed when the `On Header` event takes place. -* * * +--- ## Form Break @@ -20,15 +20,14 @@ The Break area is defined as the area between the Detail control line and the Br You can make Break areas smaller or larger. You can use a Break area to display information that is not part of the records (instructions, current date, current time, etc.), or to display a line or other graphic element that concludes the screen display. In a printed report, you can use a Break area for calculating and printing subtotals and other summary calculations. -#### JSON Grammar -| Name | Data Type | Possible Values | -| ----------- | --------------------------------- | ------------------------------------------------------------------------------------------- | -| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels. -Minimum value: 0 | +#### JSON Grammar +| Name | Data Type | Possible Values | +| ----------- | --------------------------------- | -------------------------------------------------------------------------------------------------- | +| markerBreak | integer | integer collection | Break marker position or collection of break marker positions in pixels.
            Minimum value: 0 | -* * * +--- ## Form Detail @@ -42,18 +41,12 @@ You can make the Detail area smaller or larger. Whatever you place in the Detail | ---------- | --------- | ---------------------------------- | | markerBody | integer | Detail marker position. Minimum: 0 | - -* * * +--- ## Form Footer The Form Footer area is displayed on screen under the list of records. It is always printed at the bottom of every page of a report. The Footer area is defined as the area between the Break control line and the Footer control line. - -You make the Footer area smaller or larger. - -< - -p> +You make the Footer area smaller or larger.

            You can use the Footer area to print graphics, page numbers, the current date, or any text you want at the bottom of each page of a report. For output forms designed for use on screen, the Footer area typically contains buttons that give the user options such as doing a search or sort, printing records, or putting away the current report. Active objects are accepted. @@ -64,22 +57,17 @@ You can use the Footer area to print graphics, page numbers, the current date, o | markerFooter | integer | minimum: 0 | -* * * +--- ## Form Header The form Header area is displayed at the top of each screen and is printed at the top of each page of a report. The Header area is defined as the area above the Header control line. - -You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern. - -< - -p> +You can make the Header area smaller or larger. You can use the Header area for column names, for instructions, additional information, or even a graphic such as a company logo or a decorative pattern.

            You can also place and use active objects in the Header area of output forms displayed as subforms, in the records display window or using the `DISPLAY SELECTION` and `MODIFY SELECTION` commands. The following active objects can be inserted: - Buttons, picture buttons, -- Combo boxes, drop-down lists, picture pop-up menus, +- Combo boxes, drop-down lists, picture pop-up menus, - hierarchical lists, list boxes - Radio buttons, check boxes, 3D check boxes, - Progress indicators, rulers, steppers, spinners. @@ -88,15 +76,17 @@ Standard actions such as `Add Subrecord`, `Cancel` (lists displayed using `DISPL The form can contains [additional header areas](#additional-areas) to be associated with additional breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. + + #### JSON Grammar -| Name | Data Type | Possible Values | -| ------------ | --------------------------------- | --------------------------------------------------------------------------------------------- | -| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels. -Minimum value: 0 | +| Name | Data Type | Possible Values | +| ------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------- | +| markerHeader | integer | integer collection | Header marker position or collection of header marker positions in pixels.
            Minimum value: 0 | + -* * * +--- ## Additional areas @@ -112,16 +102,19 @@ Break at level 0 zero takes in all the records; it occurs after all the records A Break level 1 occurs after the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Break 1|Break at level 1|First sorted field Form Break 2|Break at level 2|Second sorted field Form Break 3|Break at level 3|Third sorted field| +| Label | Description | Prints after groups created by: | +| ------------ | ---------------- | ------------------------------- | +| Form Break 1 | Break at level 1 | First sorted field | +| Form Break 2 | Break at level 2 | Second sorted field | +| Form Break 3 | Break at level 3 | Third sorted field | Additional Header areas are associated with Breaks. A level 1 Header is printed just before the records grouped by the first sorted field are printed. -| Label | Description | Prints after groups created by: | -| ----- | ----------- | ------------------------------- | -| | | | - Form Header 1|Header at level 1|First sorted field Form Header 2|Header at level 2|Second sorted field Form Header 3|Header at level 3|Third sorted field| +| Label | Description | Prints after groups created by: | +| ------------- | ----------------- | ------------------------------- | +| Form Header 1 | Header at level 1 | First sorted field | +| Form Header 2 | Header at level 2 | Second sorted field | +| Form Header 3 | Header at level 3 | Third sorted field | + -If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. \ No newline at end of file +If you use the `Subtotal` function to initiate Break processing, you should create a Break area for every level of Break that will be generated by the sort order, minus one. If you do not need anything printed in one of the Break areas, you can reduce its size to nothing by placing its marker on top of another control line. If you have more sort levels than Break areas, the last Break area will be repeated during printing. diff --git a/website/translated_docs/pt/FormEditor/properties_Menu.md b/website/translated_docs/pt/FormEditor/properties_Menu.md index 8c6e7ec491cc28..cff6ffb7234a10 100644 --- a/website/translated_docs/pt/FormEditor/properties_Menu.md +++ b/website/translated_docs/pt/FormEditor/properties_Menu.md @@ -14,8 +14,10 @@ The selection of a menu command causes an `On Menu Selected` event to be sent to The form menu bar will operate for both input and output forms. + #### JSON Grammar | Name | Data Type | Possible Values | | ------- | --------- | ------------------ | -| menuBar | string | Name of a menu bar | \ No newline at end of file +| menuBar | string | Name of a menu bar | + diff --git a/website/translated_docs/pt/FormEditor/properties_Print.md b/website/translated_docs/pt/FormEditor/properties_Print.md index 2033e1a3aa7848..e6ad89b3ea0a97 100644 --- a/website/translated_docs/pt/FormEditor/properties_Print.md +++ b/website/translated_docs/pt/FormEditor/properties_Print.md @@ -12,12 +12,16 @@ Allows defining specific print settings for the form. This feature is useful to You can modify the following print settings: -* Paper format -* Paper orientation -* Page scaling +* Paper format +* Paper orientation +* Page scaling + > Available options depend on the system configuration. + + + #### JSON Grammar | Name | Data Type | Possible Values | @@ -30,4 +34,12 @@ You can modify the following print settings: | scale | number | minimum: 0 | -* * * \ No newline at end of file +--- + + + + + + + + diff --git a/website/translated_docs/pt/FormEditor/properties_WindowSize.md b/website/translated_docs/pt/FormEditor/properties_WindowSize.md index c72a3734480818..0fe3f1535d1440 100644 --- a/website/translated_docs/pt/FormEditor/properties_WindowSize.md +++ b/website/translated_docs/pt/FormEditor/properties_WindowSize.md @@ -6,10 +6,12 @@ title: Window Size ## Fixed Height + If you select this option, the window height will be locked and it will not be possible for the user to resize it. If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Height and Maximum Height](#maximum-height-minimum-height) properties can be used to determine the resizing limits. + #### JSON Grammar | Name | Data Type | Possible Values | @@ -17,22 +19,25 @@ If this option is not selected, the width of the form window can be modified. In | windowSizingY | string | "fixed", "variable" | -* * * +--- ## Fixed Width + If you select this option, the window width will be locked and it will not be possible for the user to resize it. If this option is not selected, the width of the form window can be modified. In this case, the [Minimum Width and Maximum Width](#maximum-width-minimum-width) properties can be used to determine the resizing limits. + #### JSON Grammar | Name | Data Type | Possible Values | | ------------- | --------- | ------------------- | | windowSizingX | string | "fixed", "variable" | +--- + -* * * ## Maximum Height, Minimum Height @@ -50,9 +55,11 @@ Maximum and minimum height (in pixels) of a resizeable form window if the [Fixed Maximum and minimum width (in pixels) of a resizeable form window if the [Fixed Width](#fixed-width) option is not set. + #### JSON Grammar | Name | Data Type | Possible Values | | -------------- | --------- | --------------- | | windowMinWidth | number | integer value | -| windowMaxWidth | number | integer value | \ No newline at end of file +| windowMaxWidth | number | integer value | + diff --git a/website/translated_docs/pt/FormObjects/buttonGrid_overview.md b/website/translated_docs/pt/FormObjects/buttonGrid_overview.md index 05b4c013ba041c..0336d8f5f17acd 100644 --- a/website/translated_docs/pt/FormObjects/buttonGrid_overview.md +++ b/website/translated_docs/pt/FormObjects/buttonGrid_overview.md @@ -3,15 +3,14 @@ id: buttonGridOverview title: Button Grid --- -## Overview - 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: ![](assets/en/FormObjects/buttonGrid_smileys.png) 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 +18,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 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 +[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) - [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 diff --git a/website/translated_docs/pt/FormObjects/button_overview.md b/website/translated_docs/pt/FormObjects/button_overview.md index 21d5a72396ca49..4f9eb63dcb9cf1 100644 --- a/website/translated_docs/pt/FormObjects/button_overview.md +++ b/website/translated_docs/pt/FormObjects/button_overview.md @@ -9,10 +9,6 @@ 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 The actions assigned to buttons can originate from predefined [standard actions](properties_Action.md#standard-action) or from custom object methods. Examples of typical actions include letting the user accept, cancel, or delete records, copy or paste data, move from page to page in a multi-page form, open, delete, or add records in a subform, handle font attributes in text areas, etc. @@ -23,8 +19,12 @@ If you want a button to perform an action that's not available as a standard act The [variable](properties_Object.md#variable-or-expression) associated with a button is automatically set to **0** when the form is executed for the first time in Design or Application mode. When the user clicks a button, its variable is set to **1**. + + > 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,6 +33,8 @@ With the exception of the [available properties](#supported-properties), many bu 4D provides buttons in the following predefined styles: + + ### Regular 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,6 +46,7 @@ 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 @@ -57,8 +60,10 @@ By default, the Regular style has a light gray background with a label in the ce } ``` + Only the Regular and Flat styles offer the [Default Button](properties_Appearance.md#default-button) property. + ### Flat 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 +75,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,6 +89,7 @@ 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 @@ -91,11 +98,11 @@ The Toolbar button style is primarily intended for integration in a toolbar. It 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 +120,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 +150,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. + + ![](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. + - *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 +180,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. +The OS X Gradient button style is nearly identical to the [Bevel](#bevel) style. 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 on the right side 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 +210,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. +The OS X Textured button style is nearly identical to the [Bevel](#bevel) style but with a smaller size (maximum size is the size of a standard macOS system button). 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. -- *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/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. #### JSON Example: @@ -225,17 +239,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,8 +269,11 @@ The colors (highlight and background) of a button with the Office XP style are b } ``` + + ### Help + 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. ![](assets/en/FormObjects/button_help.png) @@ -276,6 +295,7 @@ 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 The Circle button style appears as a round system button. This button style is designed for macOS. @@ -284,19 +304,23 @@ 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 @@ -304,6 +328,7 @@ The Custom button style accepts a personalized background picture and allows man ![](assets/en/FormObjects/button_custom.png) + #### JSON Example: ```code @@ -321,16 +346,22 @@ 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 +- [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) + diff --git a/website/translated_docs/pt/FormObjects/checkbox_overview.md b/website/translated_docs/pt/FormObjects/checkbox_overview.md index b4d594dacdff6a..d73f83e80890bd 100644 --- a/website/translated_docs/pt/FormObjects/checkbox_overview.md +++ b/website/translated_docs/pt/FormObjects/checkbox_overview.md @@ -3,28 +3,28 @@ id: checkboxOverview title: Check Box --- -## Overview - -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). +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](#three-states-check-box) can be defined. ![](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. +Check boxes are controlled by methods or [standard actions](#using-a-standard-action). The method associated with it executes when the check box is selected. Like all buttons, a check box variable is set to 0 when the form is first opened. 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)). -## Using check boxes + +## Utilizar caixas de seleção A check box can be associated to a [variable or expression](properties_Object.md#variable-or-expression) of type integer or boolean. - **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`. +- **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. Multiple check boxes allow the user to select multiple options. -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. ### Three-States check box -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. +Check box objects with [Regular](checkbox_overview.md#regular) and [Flat](checkbox_overview.md#flat) [button style](properties_TextAndPicture.md#button-style) 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) @@ -33,10 +33,10 @@ To enable this third state, you must select the [Three-States](properties_Displa 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). The variable associated with the check box returns the value 2 when the check box is in the third state. - > 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. -## Using a standard action + +## Usar uma ação padrão 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. @@ -73,119 +73,133 @@ Only actions that can represent a true/false status ("checkable" actions) are su | visibleReferences | | | widowAndOrphanControlEnabled | 4D Write Pro areas only | +For detailed information on these actions, please refer to the [Standard actions](properties_Action.md#standard-action) section. -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. +## Estilos de botão caixas de seleção -## Check box button styles - -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. +Check boxes use [button styles](properties_TextAndPicture.md#button-style) to 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. 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. -4D provides check boxes in the following predefined styles: +4D provides check boxes in the following predefined button styles: ### Regular -The Regular check box style is a standard system check box (*i.e.*, a rectangle with a descriptive title): +The Regular check box button style is a standard system check box (*i.e.*, a rectangle with a descriptive title): ![](assets/en/FormObjects/checkbox_regular.png) #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"regular", - "text": "Cancel", - "action": "Cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - "dataSourceTypeHint":"boolean" - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"regular", + "text": "Cancel", + "action": "Cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + "dataSourceTypeHint":"boolean" + } +``` + + ### 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. +The Flat check box button 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) #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"flat", - "text": "Cancel", - "action": "cancel", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"flat", + "text": "Cancel", + "action": "cancel", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + -### Toolbar button -The Toolbar button check box style is primarily intended for integration in a toolbar. +### Toolbar Button -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). +The Toolbar Button check box button style is primarily intended for integration in a toolbar. + +The Toolbar Button check box button style has a transparent background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example with states unchecked / checked / highlighted: ![](assets/en/FormObjects/checkbox_toolbar.png) + #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"toolbar", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"toolbar", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Bevel -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 check box button style combines the appearance of the [Regular](#regular) button style (*i.e.*, a rectangle with a descriptive title) with the [Toolbar Button](#toolbar-button) button 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). +The Bevel button style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example with states unchecked / checked / highlighted: ![](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 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"bevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Rounded Bevel -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. +The Rounded Bevel check box button style is nearly identical to the [Bevel](#bevel) button style except, depending on the OS, the corners of the button may be rounded. As with the Bevel button style, the Rounded Bevel button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -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). +The Rounded Bevel button style has a light gray background with a title. It is usually associated with a [4-state picture](properties_TextAndPicture.md#number-of-states). Example on macOS: -![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) + ![](assets/en/FormObjects/checkbox_roundedbevel_mac.png) + +> On Windows, the Rounded Bevel button style is identical to the [Bevel](#bevel) button style. -> on Windows, the Rounded Bevel style is identical to the [Bevel](#bevel) style. #### JSON Example: @@ -203,141 +217,162 @@ 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. +The OS X Gradient check box button style is nearly identical to the [Bevel](#bevel) button style. As with the Bevel button style, the OS X Gradient button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. -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). +The OS X Gradient button style has a light gray background with a title and may be 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) + ![](assets/en/FormObjects/checkbox_osxgradient_mac.png) + +> On Windows, this check box button style is identical to the [Bevel](#bevel) button style. -> On Windows, this style is identical to the [Bevel](#bevel) style. #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"gradientBevel", - "text": "Checkbox", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"gradientBevel", + "text": "Checkbox", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + + ### OS X Textured -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. +The OS X Textured button style is similar to the [Bevel](#bevel) button style but with a smaller size (maximum size is the size of a standard macOS system button). As with the Bevel button style, the OS X Textured button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button style's behavior. + +By default, the OS X Textured button style appears as: -By default, the OS X Textured style appears as: + - *Windows* - a standard system button with a light blue background with a title in the center. -- *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_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/checkbox_osxtextured_mac.png) + - *macOS* - a standard system button. Its height is predefined: it is not possible to enlarge or reduce it. + + ![](assets/en/FormObjects/checkbox_osxtextured_mac.png) #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"texturedBevel", - "text": "Checkbox", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"texturedBevel", + "text": "Checkbox", + "left": 60, + "top": 160, + "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 Office XP button style combines the appearance of the [Regular](#regular) button style with the [Toolbar Button](#toolbar-button) button 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: +The colors (highlight and background) of a check box with the Office XP button style are based on the system colors. The appearance of the check box 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) + - *Windows* - its background only appears when the mouse rolls over it. Example with states unchecked / checked / highlighted: -- *macOS* - its background is always displayed. Example with states unchecked / checked: - - ![](assets/en/FormObjects/checkbox_officexp_mac.png) + ![](assets/en/FormObjects/checkbox_officexp.png) + + - *macOS* - its background is always displayed. Example with states unchecked / checked: + + ![](assets/en/FormObjects/checkbox_officexp_mac.png) #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"office", - "text": "Checkbox", - "action": "fontBold", - "icon": "/RESOURCES/File.png", - "iconFrames": 4 - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"office", + "text": "Checkbox", + "action": "fontBold", + "icon": "/RESOURCES/File.png", + "iconFrames": 4 + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + + ### Collapse / Expand -This check box style can be used to add a standard collapse/expand icon. These buttons are used natively in hierarchical lists. +This check box button style can be used to add a standard collapse/expand icon. These icons are used natively in hierarchical lists. -- *Windows* - the button looks like a [+] or a [-] - - ![](assets/en/FormObjects/checkbox_collapse.png) + - *Windows* - the icon looks like a [+] or a [-] + + ![](assets/en/FormObjects/checkbox_collapse.png) + + - *macOS* - it looks like a triangle pointing right or down. + + ![](assets/en/FormObjects/checkbox_collapse_mac.png) -- *macOS* - it looks like a triangle pointing right or down. - - ![](assets/en/FormObjects/checkbox_collapse_mac.png) #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"disclosure", - "method": "m_collapse", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"disclosure", + "method": "m_collapse", + "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. +In macOS and Windows, a check box with the "Disclosure" button 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. + + - *Windows* -- *Windows* - ![](assets/en/FormObjects/checkbox_disclosure.png) -- *macOS* - + - *macOS* + ![](assets/en/FormObjects/checkbox_disclosure_mac.png) + #### JSON Example: - "myCheckBox": { - "type": "checkbox", - "style":"roundedDisclosure", - "method": "m_disclose", - "left": 60, - "top": 160, - "width": 100, - "height": 20 - } - +``` + "myCheckBox": { + "type": "checkbox", + "style":"roundedDisclosure", + "method": "m_disclose", + "left": 60, + "top": 160, + "width": 100, + "height": 20 + } +``` + ### Custom -The Custom check box style accepts a personalized background picture and allows managing specific properties: +The Custom button style accepts a personalized background picture and allows managing specific properties: - [Background pathname](properties_TextAndPicture.md#backgroundPathname) - [Icon Offset](properties_TextAndPicture.md#icon-offset) @@ -347,31 +382,37 @@ It is usually associated with a [4-state picture](properties_TextAndPicture.md#n #### JSON Example: - "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 - } - +``` + "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 + } +``` + + + ## Supported Properties All check boxes 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) - [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) - [Save value](properties_Object.md#save-value) - [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) + +[Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Button Style](properties_TextAndPicture.md#button-style) - [Class](properties_Object.md#css-class) - [Enterable](properties_Entry.md#enterable) - [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) - [Object Name](properties_Object.md#object-name) - [Right](properties_CoordinatesAndSizing.md#right) - [Save value](properties_Object.md#save-value) - [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): - [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 +- [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) diff --git a/website/translated_docs/pt/FormObjects/comboBox_overview.md b/website/translated_docs/pt/FormObjects/comboBox_overview.md index d2abe404cefec7..88899791a08228 100644 --- a/website/translated_docs/pt/FormObjects/comboBox_overview.md +++ b/website/translated_docs/pt/FormObjects/comboBox_overview.md @@ -3,25 +3,56 @@ id: comboBoxOverview title: Combo Box --- -## Overview - 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. ![](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. +Fundamentally, you treat a combo box as an enterable area that uses its object, array or a choice list as the set of default values. -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. +## Handling combo boxes -## Options for combo boxes +Use the [`On Data Change`](Events/onDataChange.md) event to manage entries into the enterable area, as you would for any input form object. -Combo box type objects accept two specific options concerning choice lists associated with them: +You initialize a combo box in exactly the same way as a [drop-down list](dropdownList_Overview.md#overview): using an object, an array, or a choice list. -- [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. +### Using an object -> 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. +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a combo box. The object must contain the following properties: -## Supported Properties +| Property | Type | Description | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Collection | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:

          • strings
          • numbers
          • dates
          • times
          • If empty or not defined, the combo box is empty | +| `currentValue` | same as Collection | Text entered by the user | + +If the object contains other properties, they are ignored. + +When the user enters text into the combo box, the `currentValue` property of the object gets the entered text. + +### Usar um array + +Please refer to **Using an array** in the [drop-down list page](dropdownList_Overview.md#using-an-array) for information about how to initialize the array. + +When the user enters text into the combo box, the 0th element of the array gets the entered text. + +### Utilizar uma lista de seleção + +If you want to use a combo box to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the form object's data source. This makes it easier to manage listed fields/variables. +> If you use a hierarchical list, only the first level is displayed and can be selected. -[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 +To associate 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 form object in the Property List. + +When the form is executed, 4D automatically manages the 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 combo box when the form is displayed: + +Please refer to **Using a choice** in the [drop-down list page](dropdownList_Overview.md#using-a-choice-list) for more information. + + +## Options + +Combo box type objects accept two specific options: + +- [Automatic insertion](properties_DataSource.md#automatic-insertion): enables automatically adding a value to the data source when a user enters a value that is not found in the 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. +> 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 [drop-down list](dropdownList_Overview.md#overview) object. + +## Supported Properties +[Alpha Format](properties_Display.md#alpha-format) - [Bold](properties_Text.md#bold) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [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) - [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) - [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 diff --git a/website/translated_docs/pt/FormObjects/dropdownList_Overview.md b/website/translated_docs/pt/FormObjects/dropdownList_Overview.md index 19f548a21446c6..61a79207ae8774 100644 --- a/website/translated_docs/pt/FormObjects/dropdownList_Overview.md +++ b/website/translated_docs/pt/FormObjects/dropdownList_Overview.md @@ -3,43 +3,102 @@ id: dropdownListOverview title: Drop-down List --- -## Overview - -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. +Drop-down lists are form objects that allow the user to select from a list. You manage the items displayed in the drop-down list using an object, an array, a choice list, or a standard action. 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: ![](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. +## Drop-down list types + +You can create different types of drop-down lists with different features. To define a type, select the appropriate **Expression Type** and **Data Type** values in the Property list, or use their JSON equivalent. + +| Type | Features | Expression Type | Data Type | JSON definition | +| ------------------------------ | ------------------------------------------------ | --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Object | Built upon a collection | Object | Numeric, Text, Date, or Time | `dataSourceTypeHint: object` + `numberFormat: ` or `textFormat: ` or `dateFormat: ` or `timeFormat: ` | +| Array | Built upon an array | Array | Numeric, Text, Date, or Time | `dataSourceTypeHint: arrayNumber` or `arrayText` or `arrayDate` or `arrayTime` | +| Choice list saved as value | Built upon a choice list (standard) | List | Selected item value | `dataSourceTypeHint: text` + `saveAs: value` | +| Choice list saved as reference | Built upon a choice list. Item position is saved | List | Selected item reference | `dataSourceTypeHint: integer` + `saveAs: reference` | +| Hierarchical choice list | Can display hierarchical contents | List | List reference | `dataSourceTypeHint: integer` | +| Standard action | Automatically built by the action | *any* | *any except List reference* | any definition + `action: ` (+ `focusable: false` for actions applying to other areas) | + + + +## Handling drop-down lists + +### Using an object + +An [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) can be used as the data source of a drop-down list. The object must contain the following properties: + +| Property | Type | Description | +| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `values` | Collection | Mandatory - Collection of scalar values. All values must be of the same type. Supported types:
          • strings
          • numbers
          • dates
          • times
          • If empty or not defined, the drop-down list is empty | +| `index` | number | Index of the currently selected item (value between 0 and `collection.length-1`). If you set -1, `currentValue` is displayed as a placeholder string | +| `currentValue` | same as Collection | Currently selected item (used as placeholder value if set by code) | + +If the object contains other properties, they are ignored. + +To initialize the object associated to the drop-down list, you can: + +* 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 object automatically. + +* Execute code that creates the object and its properties. For example, if "myList" is the [variable](properties_Object.md#variable-or-expression) associated to the drop-down list, you can write in the [On Load](Events/onLoad.md) form event: + +```4d +// Form.myDrop is the datasource of the form object + +Form.myDrop:=New object +Form.myDrop.values:=New collection("apples"; "nuts"; "pears"; "oranges"; "carrots") +Form.myDrop.index:=-1 //currentValue is a placeholder +Form.myDrop.currentValue:="Select a fruit" +``` + +The drop-down list is displayed with the placeholder string: + +![](assets/en/FormObjects/fruits2.png) -Drop-down list objects are initialized by loading a list of values into an array. You can do this in several ways: +After the user selects a value: + +![](assets/en/FormObjects/fruits3.png) + +```4d +Form.myDrop.values // ["apples","nuts","pears","oranges","carrots"] +Form.myDrop.currentValue //"oranges" +Form.myDrop.index //3 +``` + + + +### Usar um 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 can display an array as a list of values when you click on it. + +To initialize the array associated to the drop-down list, you can: * 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. * Before the object is displayed, execute code that assigns values to the array elements. For example: ```4d - ARRAY TEXT($aCities;6) - $aCities{1}:="Philadelphia" - $aCities{2}:="Pittsburg" - $aCities{3}:="Grand Blanc" - $aCities{4}:="Bad Axe" - $aCities{5}:="Frostbite Falls" - $aCities{6}:="Green Bay" + ARRAY TEXT(aCities;6) + aCities{1}:="Philadelphia" + aCities{2}:="Pittsburg" + aCities{3}:="Grand Blanc" + aCities{4}:="Bad Axe" + aCities{5}:="Frostbite Falls" + aCities{6}:="Green Bay" ``` -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. +In this case, the name of the [variable](properties_Object.md#variable-or-expression) 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: +* Before the object is displayed, load the values of a list into the array using the [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command. For example: ```4d - LIST TO ARRAY("Cities";$aCities) + 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. +In this case also, the name of the [variable](properties_Object.md#variable-or-expression) associated with the object in the form must be `aCities`. This code would be run in place of the assignment statements shown above. 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: @@ -61,34 +120,53 @@ 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. +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. -## 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. +If you want to use a drop-down list to manage the values of an input area (listed field or variable), 4D lets you reference the field or variable directly as the drop-down list's [data source](properties_Object.md#variable-or-expression). This makes it easier to manage listed fields/variables. -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. +For example, in the case of a "Color" field that can only contain the values "White", "Blue", "Green" or "Red", it is possible to create a list containing these values and associate it with a drop-down list that references the 4D "Color" field. 4D then automatically takes care of managing the input and display of the current value in the form. +> If you use a hierarchical list, only the first level is displayed and can be selected. If you want to display hierarchical contents, you need to use a [hierarchical choice list](#using-a-hierarchical-choice-list). -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. +To associate a drop-down list with a field or variable, enter the name of the field or variable directly as the [Variable or Expression](properties_Object.md#variable-or-expression) field of the drop-down list in the Property List. +> It is not possible to use this feature with an object or an array drop-down list. If you enter a field name in the "Variable or Expression" area, then you must use a choice list. -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: +When the form is executed, 4D automatically manages the drop-down list during input or display: when a user chooses a value, it is saved in the field; this field value is shown in the drop-down list when the form is displayed: ![](assets/en/FormObjects/popupDropdown_choiceList.png) -> 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 +#### Selected item value or Selected item reference + +When you have associated a drop-down list with a choice list and with a field or a variable, you can set the [**Data Type**](properties_DataSource.md#data-type) property to **Selected item value** or **Selected item reference**. This option lets you optimize the size of the data saved. + +### Using a hierarchical choice list + +A hierarchical drop-down list has a sublist associated with each item in the list. Here is an example of a hierarchical drop-down list: + +![](assets/en/FormObjects/popupDropdown_hierar.png) + +> In forms, hierarchical drop-down lists are limited to two levels. + +You can assign the hierarchical choice list to the drop-down list object using the [Choice List](properties_DataSource.md#choice-list) field of the Property List. + +You manage hierarchical drop-down lists using the **Hierarchical Lists** commands of the 4D Language. All commands that support the `(*; "name")` syntax can be used with hierarchical drop-down lists, e.g. [`List item parent`](https://doc.4d.com/4dv19/help/command/en/page633.html). + + +### Usar uma ação padrão -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. +You can build automatically a drop-down list using a [standard action](properties_Action.md#standard-action). This feature is supported in the following contexts: -## Using a standard action +- Use of the `gotoPage` standard action. In this case, 4D will automatically display the [page of the form](FormEditor/forms.md#form-pages) that corresponds to the number of the item that is selected. For example, if the user selects the 3rd item, 4D will display the third page of the current form (if it exists). At runtime, by default the drop-down list displays the page numbers (1, 2...). -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. +- Use of a standard action that displays a sublist of items, for example `backgroundColor`. This feature requires that: + - a styled text area ([4D Write Pro area](writeProArea_overview.md) or [input](input_overview.md) with [multistyle](properties_Text.md#multi-style) property) is present in the form as the standard action target. + - the [focusable](properties_Entry.md#focusable) property is not set to the drop-down list. At runtime the drop-down list will display an automatic list of values, e.g. background colors. You can override this automatic list by assigning in addition a choice list in which each item has been assigned a custom standard action. -For more information, please refer to the [Standard actions](https://doc.4d.com/4Dv17R5/4D/17-R5/Standard-actions.300-4163633.en.html) section. +> This feature cannot be used with a hierarchical drop-down list. ## 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) - [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) - [Save value](properties_Object.md#save-value) - [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 +[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) - [Data Type (expression type)](properties_DataSource.md#data-type-expression-type) - [Data Type (list)](properties_DataSource.md#data-type-list) - [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 value](properties_Object.md#save-value) - [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 diff --git a/website/translated_docs/pt/FormObjects/formObjects_overview.md b/website/translated_docs/pt/FormObjects/formObjects_overview.md index afc89d2fde1a80..88296fce3b951e 100644 --- a/website/translated_docs/pt/FormObjects/formObjects_overview.md +++ b/website/translated_docs/pt/FormObjects/formObjects_overview.md @@ -9,18 +9,20 @@ You build and customize your application forms by manipulating the objects on th 4D forms support a large number of built-in **active** and **static** objects: -- **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. +- **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](FormEditor/formEditor.md):** 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. +* **[Form Editor](FormEditor/formEditor.md):** 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. * **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 +* **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 } diff --git a/website/translated_docs/pt/FormObjects/groupBox.md b/website/translated_docs/pt/FormObjects/groupBox.md index acae66e73cf874..bf2dbb9ab43680 100644 --- a/website/translated_docs/pt/FormObjects/groupBox.md +++ b/website/translated_docs/pt/FormObjects/groupBox.md @@ -6,21 +6,22 @@ title: Group Box 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) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/input_overview.md b/website/translated_docs/pt/FormObjects/input_overview.md index ea72623251b44b..832a7f99e2702f 100644 --- a/website/translated_docs/pt/FormObjects/input_overview.md +++ b/website/translated_docs/pt/FormObjects/input_overview.md @@ -3,7 +3,6 @@ id: inputOverview title: Input --- -## Overview 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,6 +14,7 @@ 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 @@ -28,16 +28,17 @@ You can manage the data with object or form [methods](Concepts/methods.md). } ``` + ## 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) +[Allow font/color picker](properties_Text.md#allow-font-color-picker) - [Alpha Format](properties_Display.md#alpha-format) - [Auto Spellcheck](properties_Entry.md#auto-spellcheck) - [Bold](properties_Text.md#bold) - [Test when False/Text when True](properties_Display.md#text-when-false-text-when-true) - [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) - [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) - [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) -* * * -## 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. \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/list_overview.md b/website/translated_docs/pt/FormObjects/list_overview.md index 8777c196c59cad..a8b0f1e7618227 100644 --- a/website/translated_docs/pt/FormObjects/list_overview.md +++ b/website/translated_docs/pt/FormObjects/list_overview.md @@ -3,7 +3,6 @@ id: listOverview title: Hierarchical List --- -## Overview 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 +10,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. +- 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. 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,10 +29,10 @@ 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. For example, if you have associated the mylist [variable](properties_Object.md#variable-or-expression) to the form object, you can write: ```4d -$mylist:=New list +mylist:=New list ``` Each representation of the list has its own specific characteristics and shares common characteristics with all the other representations. The following characteristics are specific to each representation of the list: @@ -49,7 +50,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 +57,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,20 +65,21 @@ 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` - - `Get list item font` - - `GET LIST ITEM ICON` - - `GET LIST ITEM PARAMETER` - - `GET LIST ITEM PROPERTIES` + - `Get list item font` + - `GET LIST ITEM ICON` + - `GET LIST ITEM PARAMETER` + - `GET LIST ITEM PROPERTIES` - `List item parent` - `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 +95,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 +105,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 +124,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 +141,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 +150,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 +[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) - [Help Tip](properties_Help.md#help-tip) - [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 diff --git a/website/translated_docs/pt/FormObjects/listbox_overview.md b/website/translated_docs/pt/FormObjects/listbox_overview.md index 55167f4a4919d7..9a98b5c82aafdf 100644 --- a/website/translated_docs/pt/FormObjects/listbox_overview.md +++ b/website/translated_docs/pt/FormObjects/listbox_overview.md @@ -3,14 +3,15 @@ id: listboxOverview title: List Box --- -## Overview -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 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 management, customized appearance, moving of columns, 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). +## Visão Geral + ### Basic user features 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: @@ -25,14 +26,15 @@ It is also possible to resize each column, and the user can modify the order of 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. + ### List box parts A list box is composed of four distinct parts: -* the list box object in its entirety, -* columns, -* column headers, and -* column footers. +* the list box object in its entirety, +* columns, +* column headers, and +* column footers. ![](assets/en/FormObjects/listbox_parts.png) @@ -45,46 +47,51 @@ It is possible to add an object method to the list box object and/or to each col The column object method gets events that occur in its [header](#list-box-headers) and [footer](#list-box-footers). + + ### List box types 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**: 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). +- **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. - +- **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. + ### Managing list boxes You can completely configure a list box object through its properties, and you can also manage it dynamically through programming. 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 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. 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: ```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. + + + ### Selection list boxes 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. @@ -93,6 +100,7 @@ The contents of each row is then evaluated according to a selection of records: 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 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. @@ -107,10 +115,13 @@ When the data source is a collection, any modifications made in the list box val myCol:=myCol.push("new value") //display new value in 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 | @@ -186,126 +197,45 @@ Supported properties depend on the list box type. > List box columns, headers and footers support specific properties. - -### Supported Form Events - - - - - - - - - - - - - - - - - - - - - - - - - +### Supported Form Events -| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Compound formulas cannot be sorted. -(e.g., This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Arrays list boxes only* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Close Detail | - [row](#additional-properties) | *Current Selection & Named Selection list boxes only* | -| On Collapse | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Hierarchical list box only* | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Delete Action | - [row](#additional-properties) | | -| On Display Detail | - [isRowSelected](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Expand | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Hierarchical list box only* | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *Arrays, Current Selection & Named Selection list boxes only* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell has been completed* | -| On Mouse Enter | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Mouse Leave | | | -| On Mouse Move | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Open Detail | - [row](#additional-properties) | *Current Selection & Named Selection list boxes only* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Arrays list boxes only* | -| On Selection Change | | | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| On After Edit |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On After Keystroke |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On After Sort |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [headerName](#additional-properties)
          • | *Compound formulas cannot be sorted.
            (e.g., This.firstName + This.lastName)* | +| On Alternative Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Arrays list boxes only* | +| On Before Data Entry |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Before Keystroke |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Begin Drag Over |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Clicked |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Close Detail |
          • [row](#additional-properties)
          • | *Current Selection & Named Selection list boxes only* | +| On Collapse |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Hierarchical list box only* | +| On Column Moved |
          • [columnName](#additional-properties)
          • [newPosition](#additional-properties)
          • [oldPosition](#additional-properties)
          • | | +| On Column Resize |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [newSize](#additional-properties)
          • [oldSize](#additional-properties)
          • | | +| On Data Change |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Delete Action |
          • [row](#additional-properties)
          • | | +| On Display Detail |
          • [isRowSelected](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Double Clicked |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Drag Over |
          • [area](#additional-properties)
          • [areaName](#additional-properties)
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Drop |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Expand |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Hierarchical list box only* | +| On Footer Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [footerName](#additional-properties)
          • | *Arrays, Current Selection & Named Selection list boxes only* | +| On Getting Focus |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Additional properties returned only when editing a cell* | +| On Header Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [headerName](#additional-properties)
          • | | +| On Load | | | +| On Losing Focus |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Additional properties returned only when editing a cell has been completed* | +| On Mouse Enter |
          • [area](#additional-properties)
          • [areaName](#additional-properties)
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Mouse Leave | | | +| On Mouse Move |
          • [area](#additional-properties)
          • [areaName](#additional-properties)
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Open Detail |
          • [row](#additional-properties)
          • | *Current Selection & Named Selection list boxes only* | +| On Row Moved |
          • [newPosition](#additional-properties)
          • [oldPosition](#additional-properties)
          • | *Arrays list boxes only* | +| On Selection Change | | | +| On Scroll |
          • [horizontalScroll](#additional-properties)
          • [verticalScroll](#additional-properties)
          • | | +| On Unload | | | #### Additional Properties @@ -328,9 +258,12 @@ Form events on list box or list box column objects may return the following addi | oldSize | longint | Previous size (in pixels) of the column or row | | row | longint | Row number | | verticalScroll | longint | Positive if scroll is towards the bottom, negative if towards the top | +> If an event occurs on a "fake" column or row that doesn't exist, an empty string is typically returned. + + + -> If an event occurs on a "fake" column or row that doesn't exist, an empty string is typically returned. ## List box columns @@ -339,101 +272,39 @@ A list box is made of one or more column object(s) which have specific propertie ![](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. - > 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). + ### Column Specific Properties [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) ### Supported Form Events - - - - - - - - - - - - - - - - - - - - -| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | -| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| On After Edit | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On After Sort | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | *Compound formulas cannot be sorted. -(e.g., This.firstName + This.lastName)* | -| On Alternative Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Arrays list boxes only* | -| On Before Data Entry | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Before Keystroke | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Begin Drag Over | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Column Moved | - [columnName](#additional-properties) -- [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | | -| On Column Resize | - [column](#additional-properties) -- [columnName](#additional-properties) -- [newSize](#additional-properties) -- [oldSize](#additional-properties) | | -| On Data Change | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Double Clicked | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drag Over | - [area](#additional-properties) -- [areaName](#additional-properties) -- [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Drop | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | | -| On Footer Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [footerName](#additional-properties) | *Arrays, Current Selection & Named Selection list boxes only* | -| On Getting Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell* | -| On Header Click | - [column](#additional-properties) -- [columnName](#additional-properties) -- [headerName](#additional-properties) | | -| On Load | | | -| On Losing Focus | - [column](#additional-properties) -- [columnName](#additional-properties) -- [row](#additional-properties) | *Additional properties returned only when editing a cell has been completed* | -| On Row Moved | - [newPosition](#additional-properties) -- [oldPosition](#additional-properties) | *Arrays list boxes only* | -| On Scroll | - [horizontalScroll](#additional-properties) -- [verticalScroll](#additional-properties) | | -| On Unload | | | +| Form event | Additional Properties Returned (see [Form event](https://doc.4d.com/4Dv18/4D/18/FORM-Event.301-4522191.en.html) for main properties) | Comments | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| On After Edit |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On After Keystroke |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On After Sort |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [headerName](#additional-properties)
          • | *Compound formulas cannot be sorted.
            (e.g., This.firstName + This.lastName)* | +| On Alternative Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Arrays list boxes only* | +| On Before Data Entry |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Before Keystroke |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Begin Drag Over |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Clicked |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Column Moved |
          • [columnName](#additional-properties)
          • [newPosition](#additional-properties)
          • [oldPosition](#additional-properties)
          • | | +| On Column Resize |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [newSize](#additional-properties)
          • [oldSize](#additional-properties)
          • | | +| On Data Change |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Double Clicked |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Drag Over |
          • [area](#additional-properties)
          • [areaName](#additional-properties)
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Drop |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | | +| On Footer Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [footerName](#additional-properties)
          • | *Arrays, Current Selection & Named Selection list boxes only* | +| On Getting Focus |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Additional properties returned only when editing a cell* | +| On Header Click |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [headerName](#additional-properties)
          • | | +| On Load | | | +| On Losing Focus |
          • [column](#additional-properties)
          • [columnName](#additional-properties)
          • [row](#additional-properties)
          • | *Additional properties returned only when editing a cell has been completed* | +| On Row Moved |
          • [newPosition](#additional-properties)
          • [oldPosition](#additional-properties)
          • | *Arrays list boxes only* | +| On Scroll |
          • [horizontalScroll](#additional-properties)
          • [verticalScroll](#additional-properties)
          • | | +| On Unload | | | ## List box headers @@ -446,6 +317,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) @@ -458,8 +330,11 @@ When the `OBJECT SET VISIBLE` command is used with a header, it is applied to al [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 + + + +## 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. @@ -476,8 +351,10 @@ When the `OBJECT SET VISIBLE` command is used with a footer, it is applied to al ### 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: @@ -527,14 +404,14 @@ The typical sequence of events generated during data entry or modification is as | | Entity selection list boxes | Entity is saved with automerge option, optimistic lock (see entity.save( )). In case of successful save, the entity is refreshed with the last update done. If the save operation fails, an error is displayed | | | All | On Losing Focus | - (*) With entity selection list boxes, in the On Data Change event: - - 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 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: @@ -542,12 +419,11 @@ Selections are managed differently depending on whether the list box is based on - **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. - **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: +- **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: ```4d ARRAY BOOLEAN(tBListBox;10) //tBListBox is the name of the list box variable in the form @@ -560,6 +436,7 @@ Selections are managed differently depending on whether the list box is based on > The `OBJECT SET SCROLL POSITION` command scrolls the list box rows so that the first selected row or a specified row is displayed. + ### 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: @@ -576,19 +453,17 @@ You can then define specific background colors, font colors and/or font styles b 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). Keep in mind that expressions are automatically re-evaluated each time the: - - 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. -#### Array list boxes +#### 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. 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). 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: - - `On Getting Focus` (list box property) - `On Losing Focus` (list box property) - `On Activate` (form property) @@ -602,8 +477,9 @@ You have chosen to hide the system highlight and want to display list box select 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: - "rowFillSource": "_ListboxBackground", - +``` + "rowFillSource": "_ListboxBackground", +``` In the object method of the list box, you can write: @@ -626,10 +502,10 @@ For a selection type list box, to produce the same effect you can use a method t For example, in the JSON form, you have defined the following Highlight Set and Background Color Expression for the list box: - "highlightSet": "$SampleSet", - "rowFillSource": "UI_SetColor", - - +``` + "highlightSet": "$SampleSet", + "rowFillSource": "UI_SetColor", +``` You can write in the *UI_SetColor* method: ```4d @@ -644,30 +520,32 @@ You can write in the *UI_SetColor* method: > 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. + ## Managing sorts 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. You can prevent standard user sorts by deselecting the [Sortable](properties_Action.md#sortable) property of the 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. +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`](https://doc.4d.com/4dv19/help/command/en/page1606.html) command) and relevant 4D commands. -> 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. +> The [Sortable](properties_Action.md#sortable) property only affects the standard user sorts; the [`LISTBOX SORT COLUMNS`](https://doc.4d.com/4dv19/help/command/en/page916.html) command does not take this property into account. 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. -- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed; - ![](assets/en/FormObjects/sorticon0.png) +- If the variable is set to 0, the column is not sorted and the sort arrow is not displayed. + ![](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) + +- 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) -- 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) +> Only declared or dynamic [variables](Concepts/variables.md) can be used as header column variables. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.sortValue` are not supported. -- 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) +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. -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. +> The [`OBJECT SET FORMAT`](https://doc.4d.com/4dv19/help/command/en/page236.html) command offers specific support for icons in list box headers, which can be useful when you want to work with a customized sort icon. -> 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. ## Managing row colors, styles, and display @@ -678,6 +556,7 @@ There are several different ways to set background colors, font colors and font - 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)). + ### Priority & inheritance Priority and inheritance principles are observed when the same property is set at more than one level. @@ -691,7 +570,6 @@ Priority and inheritance principles are observed when the same property is set a | | List box properties | | low priority | Meta Info expression (for collection or entity selection list boxes) | - 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. For each attribute (style, color and background color), an **inheritance** is implemented when the default value is used: @@ -718,6 +596,7 @@ To restore the original appearance of the list box, you can: - 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. + ### Using arrays and expressions Depending of the list box type, you can use different properties to customize row colors, styles and display: @@ -728,7 +607,10 @@ Depending of the list box type, you can use different properties to customize ro | 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)|-|-| +[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 @@ -745,9 +627,13 @@ In this mode, the printing of list boxes is carried out by programming, via the In this mode: - 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. +- 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. + + + + ## Hierarchical list boxes 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). @@ -756,13 +642,15 @@ A hierarchical list box is a list box in which the contents of the first column 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: -* 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. +* 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 @@ -777,9 +665,9 @@ The last variable is never hierarchical even if several identical values exists ![](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. - > 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 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: @@ -788,20 +676,20 @@ When you select at least one column in addition to the first one in a list box o This command is a shortcut to define a hierarchy. When it is selected, the following actions are carried out: -* 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). +* 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). 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: ![](assets/en/FormObjects/listbox_hierarchy2.png) ##### Cancel hierarchy - 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: -* 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. +* 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 @@ -817,7 +705,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. @@ -829,7 +717,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: @@ -842,6 +730,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). @@ -888,6 +777,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. @@ -904,13 +794,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: ![](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. @@ -920,13 +810,14 @@ 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 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. @@ -935,6 +826,7 @@ The following list box was designed using an object array: ![](assets/en/FormObjects/listbox_column_objectArray.png) + ### Configuring an object array column To assign an object array to a list box column, you just need to set the object array name in either the Property list ("Variable Name" field), or using the [LISTBOX INSERT COLUMN](https://doc.4d.com/4Dv17R6/4D/17-R6/LISTBOX-INSERT-COLUMN.301-4311153.en.html) command, like with any array-based column. In the Property list, you can now select Object as a "Expression Type" for the column: @@ -947,7 +839,7 @@ 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) @@ -956,19 +848,18 @@ ARRAY OBJECT(obColumn;0) //column array ``` ![](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 \, <.>, 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. 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: @@ -982,7 +873,6 @@ When a list box column is associated with an object array, the way a cell is dis | 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 @@ -1000,7 +890,6 @@ You cannot set display formats or entry filters for columns of object-type list | color | N/A | N/A | | event | N/A | N/A | - ### Attributes Each element of the object array is an object that can contain one or more attributes that will define the cell contents and data display (see example above). @@ -1027,12 +916,11 @@ The only mandatory attribute is "valueType" and its supported values are "text", | 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 +````4d ARRAY OBJECT(obColumn;0) //column array C_OBJECT($ob1) $entry:="Hello world!" @@ -1048,10 +936,9 @@ Cell values are stored in the "value" attribute. This attribute is used for inpu APPEND TO ARRAY(obColumn;$ob1) APPEND TO ARRAY(obColumn;$ob2) APPEND TO ARRAY(obColumn;$ob3) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_helloWorld_value.png) - > Null values are supported and result in an empty cell. #### min and max @@ -1060,14 +947,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) @@ -1075,11 +962,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 | - +| 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 | ```4d C_OBJECT($ob3) @@ -1097,16 +982,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: -* 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) @@ -1117,10 +1001,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) @@ -1134,7 +1017,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 @@ -1142,13 +1024,12 @@ 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: -* 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) @@ -1159,10 +1040,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 @@ -1177,15 +1057,14 @@ 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". @@ -1195,26 +1074,27 @@ You want to display a combo box based on a "colors" list defined in the Tool box ![](assets/en/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.) @@ -1222,7 +1102,7 @@ Example: 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 +````4d ARRAY TEXT($_units;0) APPEND TO ARRAY($_units;"lines") APPEND TO ARRAY($_units;"pixels") @@ -1231,7 +1111,7 @@ OB SET($ob;"valueType";"integer") OB SET($ob;"value";2) // 2 "units" OB SET($ob;"unitReference";1) //"lines" OB SET ARRAY($ob;"unitsList";$_units) -``` +```` ![](assets/en/FormObjects/listbox_column_objectArray_unitList.png) @@ -1253,21 +1133,23 @@ OB SET($ob;"value";$entry) ![](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. Example: + + ````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 @@ -1277,23 +1159,26 @@ Optionally, you can pass a "label" attribute. Example: -```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..213cf37e3bdde6 100644 --- a/website/translated_docs/pt/FormObjects/pictureButton_overview.md +++ b/website/translated_docs/pt/FormObjects/pictureButton_overview.md @@ -3,40 +3,38 @@ id: pictureButtonOverview title: Picture Button --- -## Overview - 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. - -| 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 | +* 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 | -* 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,6 +42,7 @@ 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 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. @@ -51,16 +50,14 @@ In addition to the standard positioning and appearance settings, you can set som - 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. ## 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..6a18de6af251f8 100644 --- a/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md +++ b/website/translated_docs/pt/FormObjects/picturePopupMenu_overview.md @@ -3,11 +3,10 @@ id: picturePopupMenuOverview title: Picture Pop-up Menu --- -## Overview - 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 +16,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 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) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/pluginArea_overview.md b/website/translated_docs/pt/FormObjects/pluginArea_overview.md index 7b6ecd48c25e87..ba411454cf1074 100644 --- a/website/translated_docs/pt/FormObjects/pluginArea_overview.md +++ b/website/translated_docs/pt/FormObjects/pluginArea_overview.md @@ -3,11 +3,10 @@ id: pluginAreaOverview title: Plug-in Area --- -## Overview 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: +When opening an application, 4D creates an internal list of the plug-ins [installed in your application](#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: ![](assets/en/FormObjects/pluginArea.png) @@ -15,18 +14,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) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/progressIndicator.md b/website/translated_docs/pt/FormObjects/progressIndicator.md index a855d43dbd269c..d793870f74f271 100644 --- a/website/translated_docs/pt/FormObjects/progressIndicator.md +++ b/website/translated_docs/pt/FormObjects/progressIndicator.md @@ -3,32 +3,32 @@ id: progressIndicator title: Progress Indicator --- -## Overview 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. The variable associated with the indicator controls the display. You place values into, or use values from, the indicator using methods. For example, a method for a field or enterable object could be used to control a progress indicator: ```4d - $vTherm:=[Employees]Salary + 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. +This method assigns the value of the Salary field to the vTherm variable. 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: ```4d - [Employees]Salary:=$vTherm + [Employees]Salary:=vTherm ``` 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 +40,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) - [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") - [Font](properties_Text.md#font) - [Font Color](properties_Text.md#font-color) - [Font Size](properties_Text.md#font-size) - [Height](properties_CoordinatesAndSizing.md#height) - [Italic](properties_Text.md#italic) - [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) - [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) -[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. @@ -58,11 +57,11 @@ When the form is executed, the object is not animated. You manage the animation * 1 (or any value other than 0) = Start animation, * 0 = Stop animation. + ### Supported Properties +[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") - [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) - [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) -[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) +- [rulers](ruler.md) - [steppers](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/properties_Action.md b/website/translated_docs/pt/FormObjects/properties_Action.md index 42476014948ca9..2d561398772229 100644 --- a/website/translated_docs/pt/FormObjects/properties_Action.md +++ b/website/translated_docs/pt/FormObjects/properties_Action.md @@ -4,19 +4,18 @@ title: Action --- -* * * - +--- ## Draggable 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. @@ -31,43 +30,44 @@ For more information, refer to [Drag and Drop](https://doc.4d.com/4Dv18/4D/18/Dr [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 + + +#### See also [Droppable](#droppable) -* * * +--- ## Droppable 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. -- **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. +- **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) | - #### 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 +#### See also [Draggable](#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 @@ -76,13 +76,16 @@ When this option is enabled, the object method is executed with the `On Data Cha | ------------------- | --------- | --------------- | | continuousExecution | boolean | true, false | - #### Objects Supported [Progress bar](progressIndicator.md) - [Ruler](ruler.md) - [Stepper](stepper.md) -* * * + + + + +--- ## Method 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. @@ -90,14 +93,15 @@ Reference of a method attached to the object. Object methods generally "manage" 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 @@ -108,12 +112,13 @@ Several types of method references are supported: #### 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) - [Forms](forms.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) +[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) - [Forms](FormEditor/forms.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) -* * * -## Movable Rows + +--- +## Movable Rows `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). @@ -124,13 +129,15 @@ Authorizes the movement of rows during execution. This option is selected by def | ----------- | --------- | --------------- | | movableRows | boolean | 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). @@ -141,18 +148,21 @@ Allows the selection of multiple records/options in a [hierarchical list](list_o | ------------- | --------- | ---------------------------- | | selectionMode | text | "multiple", "single", "none" | - #### Objects Supported [Hierarchical List](list_overview.md) -* * * + + +--- ## Sortable 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. @@ -162,15 +172,16 @@ In other cases (list boxes based on named selections, columns associated with ex | -------- | --------- | --------------- | | sortable | boolean | true, false | - #### Objects Supported - [List Box](listbox_overview.md) -* * * -## Standard action + + + +--- +## Standard action 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. @@ -183,7 +194,6 @@ You can also set this property using the `OBJECT SET ACTION` command. | ------ | --------- | ---------------------------------------------------------------------------------------------------------------- | | 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..37fbdc363fc1d0 100644 --- a/website/translated_docs/pt/FormObjects/properties_Animation.md +++ b/website/translated_docs/pt/FormObjects/properties_Animation.md @@ -3,42 +3,45 @@ id: propertiesAnimation title: Animation --- -* * * - +--- ## 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 | - #### 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 | - #### 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. @@ -49,13 +52,14 @@ Allows the user to hold down the mouse button to display the pictures continuous | ------------------ | --------- | --------------- | | switchContinuously | boolean | 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. @@ -66,13 +70,15 @@ Enables cycling through the contents of the picture button at the specified spee | ---------- | --------- | --------------- | | frameDelay | integer | minimum: 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. @@ -83,17 +89,21 @@ Modifies the contents of the picture button when the mouse cursor passes over it | ------------------ | --------- | --------------- | | switchWhenRollover | boolean | 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 | @@ -103,4 +113,10 @@ Enables setting the last thumbnail as the one to display when the button is disa #### 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..deef16f5718ed4 100644 --- a/website/translated_docs/pt/FormObjects/properties_Appearance.md +++ b/website/translated_docs/pt/FormObjects/properties_Appearance.md @@ -3,8 +3,7 @@ id: propertiesAppearance title: Appearance --- -* * * - +--- ## 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. @@ -21,19 +20,22 @@ On Windows, the concept of "recommended choice" is not supported: only the focus ![](assets/en/FormObjects/property_defaultButtonWindows.en.png) + #### JSON Grammar | Name | Data Type | Possible Values | | ---- | --------- | --------------- | | | | | - defaultButton|boolean|true, false | + defaultButton|boolean|true, false | #### Objects Supported [Regular Button](button_overview.md#regular) - [Flat Button](button_overview.md#regular) -* * * + + +--- ## Hide focus rectangle 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. @@ -44,15 +46,14 @@ During execution, a field or any enterable area is outlined by a selection recta | ------------- | --------- | --------------- | | hideFocusRing | boolean | 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 +--- +## Hide selection highlight `Selection type list boxes` This property is used to disable the selection highlight in list boxes. @@ -61,19 +62,21 @@ 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 | - #### Objects Supported [List Box](listbox_overview.md) -* * * + + +--- ## Horizontal Scroll Bar An interface tool allowing the user to move the viewing area to the left or right. @@ -89,178 +92,188 @@ Available values: > 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" | - #### 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 - [Vertical scroll bar](#vertical-scroll-bar) -* * * - +--- ## Resolution 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 | + 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| + 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| + 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| + withFormulaBar|boolean|true (default), false| #### Objects Supported [4D View Pro area](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| + 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| + 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| + 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)| + 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| + 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 +288,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)| + 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| + 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. @@ -316,14 +330,14 @@ When tab controls with a custom direction are displayed under Windows, they auto | Name | Data Type | Possible Values | | ---- | --------- | --------------- | | | | | - labelsPlacement|boolean|"top", "bottom" | + 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**. @@ -333,18 +347,18 @@ You can add an interface to 4D View Pro areas to allow end users to perform basi | Name | Data Type | Possible Values | | ---- | --------- | --------------- | | | | | - userInterface|text|"none" (default), "ribbon", "toolbar" | + userInterface|text|"none" (default), "ribbon", "toolbar" | #### Objects Supported [4D View Pro area](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) -* * * - +--- ## Vertical Scroll Bar An interface tool allowing the user to move the viewing area up and down. @@ -357,18 +371,18 @@ Available values: | 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) | - > 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" | - #### 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) @@ -377,8 +391,7 @@ Available values: [Horizontal scroll bar](#horizontal-scroll-bar) -* * * - +--- ## View mode Sets the mode for displaying the 4D Write Pro document in the form area. Three values are available: @@ -389,30 +402,34 @@ Sets the mode for displaying the 4D Write Pro document in the form area. Three v > 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"| + 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 | + 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..e97fafa31d8bca 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 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" | - +| Name | Data Type | Possible Values | +| ------------- | --------- | --------------------------------------------------------------- | +| alternateFill | string | any css value; "transparent"; "automatic"; "automaticAlternate" | #### 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,21 +28,20 @@ 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" | - #### 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) -* * * +--- ## Background Color Expression `Selection and collection type list boxes` @@ -52,7 +49,6 @@ In the case of a list box, by default *Automatic* is selected: the column uses t 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 @@ -61,13 +57,15 @@ You can also set this property using the `LISTBOX SET PROPERTY` command with `lk | ------------- | --------- | ----------------------------------------- | | 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 Allows setting a standard style for the object border. @@ -78,13 +76,13 @@ Allows setting a standard style for the object border. | ----------- | --------- | ----------------------------------------------------------------- | | borderStyle | text | "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. @@ -95,13 +93,14 @@ Describes dotted line type as a sequence of black and white points. | --------------- | ---------------------- | ------------------------------------------------------------------------ | | strokeDashArray | number array or string | 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 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: @@ -112,19 +111,21 @@ You can remove these empty rows by selecting this option. The bottom of the list ![](assets/en/FormObjects/property_hideExtraBlankRows2.png) + #### JSON Grammar | Name | Data Type | Possible Values | | ------------------ | --------- | --------------- | | hideExtraBlankRows | boolean | true, false | - #### Objects Supported [List Box](listbox_overview.md#overview) -* * * + + +--- ## Line Color Designates the color of the object's lines. The color can be specified by: @@ -141,15 +142,15 @@ You can also set this property using the [**OBJECT SET RGB COLORS**](https://doc | ------ | --------- | ----------------------------------------- | | 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). #### Objects Supported [Line](shapes_overview.md#line) - [Oval](shapes_overview.md#oval) - [Rectangle](shapes_overview.md#rectangle) -* * * + +--- ## Line Width Designates the thickness of a line. @@ -160,13 +161,17 @@ Designates the thickness of a line. | ----------- | --------- | ----------------------------------------------------------------- | | 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 type list boxes` @@ -181,7 +186,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,24 +196,25 @@ 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. | - #### Objects Supported - [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + + + +--- ## Transparent 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. @@ -220,11 +225,8 @@ Sets the list box background to "Transparent". When set, any [alternate backgrou | ---- | --------- | --------------- | | fill | text | "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 diff --git a/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md b/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md index d1cfccd3d4b4c7..2772a4ee217472 100644 --- a/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md +++ b/website/translated_docs/pt/FormObjects/properties_CoordinatesAndSizing.md @@ -3,61 +3,62 @@ id: propertiesCoordinatesAndSizing title: Coordinates & Sizing --- -* * * - +--- ## Automatic Row Height 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. + + + #### JSON Grammar | Name | Data Type | Possible Values | | ------------- | --------- | --------------- | | rowHeightAuto | boolean | true, false | - #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * + + + +--- ## Bottom Bottom coordinate of the object in the form. + #### JSON Grammar | Name | Data Type | Possible Values | | ------ | --------- | --------------- | | bottom | number | minimum: 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 Left coordinate of the object on the form. @@ -73,8 +74,9 @@ Left coordinate of the object on the form. [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 Right coordinate of the object in the form. @@ -85,13 +87,14 @@ Right coordinate of the object in the form. | ----- | --------- | --------------- | | right | number | minimum: 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 Top coordinate of the object in the form. @@ -102,13 +105,14 @@ Top coordinate of the object in the form. | ---- | --------- | --------------- | | top | number | minimum: 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: @@ -125,17 +129,17 @@ You can also set this property using the [OBJECT Get corner radius](https://doc. | ------------ | --------- | --------------- | | borderRadius | integer | minimum: 0 | - #### Objects Supported [Rectangle](shapes_overview.md#rectangle) -* * * + + +--- ## Height This property designates an object's vertical size. - > Some objects may have a predefined height that cannot be altered. #### JSON Grammar @@ -144,93 +148,104 @@ This property designates an object's vertical size. | ------ | --------- | --------------- | | height | number | minimum: 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 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 | - #### 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 | - #### 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 | - #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * + + + + + + +--- ## Row Height + 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) | - #### Objects Supported [List Box](listbox_overview.md#overview) -#### See also +#### See also [Row Height Array](#row-height-array) -* * * + +--- ## Row Height Array 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). @@ -245,7 +260,6 @@ 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. @@ -255,11 +269,14 @@ Assuming that the unit of the rows is "lines," then the fifth row of the list bo | --------------- | --------- | ---------------------------- | | rowHeightSource | string | Name of a 4D array variable. | - #### Objects Supported [List Box](listbox_overview.md#overview) + #### See also +[Row Height](#row-height) + + + -[Row Height](#row-height) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/properties_Crop.md b/website/translated_docs/pt/FormObjects/properties_Crop.md index 18efd590218fae..d41b255e7f470d 100644 --- a/website/translated_docs/pt/FormObjects/properties_Crop.md +++ b/website/translated_docs/pt/FormObjects/properties_Crop.md @@ -3,8 +3,7 @@ id: propertiesCrop title: Crop --- -* * * - +--- ## Columns Sets the number of columns in a thumbnail table. @@ -15,13 +14,14 @@ Sets the number of columns in a thumbnail table. |:----------- |:---------:| --------------- | | columnCount | integer | minimum: 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. @@ -32,7 +32,16 @@ Sets the number of rows in a thumbnail table. |:-------- |:---------:| --------------- | | rowCount | integer | minimum: 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..7a2a557bd3acd4 100644 --- a/website/translated_docs/pt/FormObjects/properties_DataSource.md +++ b/website/translated_docs/pt/FormObjects/properties_DataSource.md @@ -3,25 +3,25 @@ id: propertiesDataSource title: Data Source --- -* * * - +--- ## 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: +When this option is selected, if a user enters a value that is not found in the list associated with the object, this value is automatically added to the list stored in memory. + +When the **automatic insertion** option is not set (default), the value entered is stored in the form object but not in the list in memory. -- 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. +This property is supported by: + +- [Combo box](comboBox_overview.md) and [list box column](listbox_overview.md#list-box-columns) form objects associated to a choice list. +- [Combo box](comboBox_overview.md) form objects whose associated list is filled by their array or object datasource. For example, given a choice list containing "France, Germany, Italy" that is associated with a "Countries" combo box: if the **automatic insertion** property is set and a user enters "Spain", then the value "Spain" is automatically added to the list in memory: ![](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 choice list was created from a list defined in Design mode, the original list is not modified. -> 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 @@ -29,17 +29,21 @@ When the **automatic insertion** option is not selected (default), the value ent | ------------------ | --------- | --------------- | | automaticInsertion | boolean | 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. +You can also associate choice lists to objects using the [OBJECT SET LIST BY NAME](https://doc.4d.com/4dv19/help/command/en/page237.html) or [OBJECT SET LIST BY REFERENCE](https://doc.4d.com/4dv19/help/command/en/page1266.html) commands. + + #### JSON Grammar | Name | Data Type | Possible Values | @@ -52,8 +56,9 @@ Associates a choice list with an object. It can be a choice list name (a list re [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) -* * * + +--- ## Choice List (static list) List of static values to use as labels for the tab control object. @@ -64,19 +69,16 @@ List of static values to use as labels for the tab control object. | ------ | ---------------- | ---------------------------------------- | | labels | list, collection | A list of values to fill the tab control | - #### Objects Supported [Tab Control](tabControl.md) -* * * +--- ## Current item - `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 @@ -85,23 +87,22 @@ Specifies a variable or expression that will be assigned the collection element/ | ----------------- | --------- | ----------------- | | currentItemSource | string | Object expression | - #### Objects Supported - [List Box ](listbox_overview.md#overview) -* * * -## Current item position + +--- + +## Current item position `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 @@ -110,22 +111,72 @@ Specifies a variable or expression that will be assigned a longint indicating th | ------------------------- | --------- | ----------------- | | currentItemPositionSource | string | Number expression | +#### Objects Supported +[List Box ](listbox_overview.md) + + + + + +--- +## Data Type (expression type) + +Defines the data type for the displayed expression. This property is used with: + +- [List box columns](listbox_overview.md#list-box-columns) of the selection and collection types. +- [Drop-down lists](dropdownList_Overview.md) associated to objects or arrays. + +See also [**Expression Type**](properties_Object.md#expression-type) section. + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ------------------ | --------- | -------------------------------------------------- | +| dataSourceTypeHint | string |
          • **list box columns:** "boolean", "number", "picture", "text", date", "time". *Array/selection list box only*: "integer", "object"
          • **drop-down lists:** "object", "arrayText", "arrayDate", "arrayTime", "arrayNumber"
          • | + #### Objects Supported -[List Box ](listbox_overview.md) +[Drop-down Lists](dropdownList_Overview.md) associated to objects or arrays - [List Box column](listbox_overview.md#list-box-columns) + + + +--- +## Data Type (list) -* * * +Defines the type of data to save in the field or variable associated to the [drop-down list](dropdownList_Overview.md). This property is used with: -## Data Type +- Drop-down lists [associated to a choice list](dropdownList_Overview.md#using-a-choice-list). +- Drop-down lists [associated to a hierarchical choice list](dropdownList_Overview.md#using-a-hierarchical-choice-list). + +Three options are available: + +- **List reference**: declares that the drop-down list is hierarchical. It means that the drop-down list can display up to two hierarchical levels and its contents can be managed by the 4D language commands of the **Hierarchical Lists** theme. +- **Selected item value** (default): the drop-down list is not hierarchical and the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. +- **Selected item reference**: the drop-down list is not hierarchical and the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. + +Using the **Selected item reference** option requires compliance with the following principles: +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. +- Valid and unique references must be associated with list items. +- The drop-down list must be associated with a field or a variable. + + +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ------ | --------- | -------------------- | +| saveAs | string | "value", "reference" | + + +> Setting only `"dataSourceTypeHint" : "integer"` with a `"type": "dropdown"` form object will declare a hierarchical drop-down list. -Please refer to [Expression Type](properties_Object.md#expression-type) section. #### Objects Supported -[List Box Column](listbox_overview.md#list-box-columns) +[Drop-down Lists](dropdownList_Overview.md) associated to lists -* * * + +--- ## Default (list of) values @@ -145,13 +196,14 @@ You must enter a list of values. In the Form editor, a specific dialog box allow | ------ | ---------- | ---------------------------------------------------------------- | | 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 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 +213,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 + * 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. 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. | - #### Objects Supported [List Box Column](listbox_overview.md#list-box-columns) -* * * -## Master Table + +--- + +## Master Table `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. @@ -214,12 +266,12 @@ All database tables can be used, regardless of whether the form is related to a | ----- | --------- | --------------- | | table | number | Table number | - #### Objects Supported - [List Box](listbox_overview.md#overview) -* * * + + +--- ## Save as @@ -231,15 +283,15 @@ This property is available in the following conditions: This property specifies, in the context of a field or variable associated with a list of values, the type of contents to save: - **Save as Value** (default option): the value of the item chosen in the list by the user is saved directly. For example, if the user chooses the value "Blue", then this value is saved in the field. -- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the `APPEND TO LIST` or `SET LIST ITEM` commands, or in the lists editor. +- **Save as Reference**: the reference of the choice list item is saved in the object. This reference is the numeric value associated with each item either through the *itemRef* parameter of the [`APPEND TO LIST`](https://doc.4d.com/4dv19/help/command/en/page376.html) or [`SET LIST ITEM`](https://doc.4d.com/4dv19/help/command/en/page385.html) commands, or in the list editor. This option lets you optimize memory usage: storing numeric values in fields uses less space than storing strings. It also makes it easier to translate applications: you just create multiple lists in different languages but with the same item references, then load the list based on the language of the application. Using this property requires compliance with the following principles: -- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). +- To be able to store the reference, the field or variable data source must be of the Number type (regardless of the type of value displayed in the list). The [expression](properties_Object.md#expression-type) property is automatically set. - 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 @@ -247,22 +299,19 @@ Using this property requires compliance with the following principles: | ------ | --------- | -------------------- | | saveAs | string | "value", "reference" | - #### Objects Supported +[Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -[Drop-down List](dropdownList_Overview.md) - [Input](input_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * +--- ## Selected Items - `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 @@ -271,15 +320,12 @@ Specifies a variable or expression that will be assigned the elements or entitie | ------------------- | --------- | --------------------- | | 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. @@ -292,7 +338,5 @@ Specifies the named selection to be used. You must enter the name of a valid nam | -------------- | --------- | -------------------- | | 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 c020c5e2883ef6..cbd13e0420f780 100644 --- a/website/translated_docs/pt/FormObjects/properties_Display.md +++ b/website/translated_docs/pt/FormObjects/properties_Display.md @@ -3,8 +3,7 @@ id: propertiesDisplay title: Display --- -* * * - +--- ## 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,24 +19,20 @@ 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: +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) - + (portion) The field actually contains "proportion". 4D accepts and stores the entire entry no matter what the display format. No information is lost. @@ -47,17 +42,25 @@ The field actually contains "proportion". 4D accepts and stores the entire entry | ---------- | --------- | ------------------------------------------------------------------------------------ | | 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) | - #### 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. @@ -115,40 +116,39 @@ In each of the number display formats, the number sign (#), zero (0), caret (^), | ^ | 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 #. +> 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 (,). -> 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 You can use a decimal point in a number display format. If you want the decimal to display regardless of whether the user types it in, it must be placed between zeros. -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: +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,47 +206,44 @@ 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 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 @@ -259,13 +251,16 @@ The following table shows how different formats affect the display of numbers. T | ------------ | --------- | -------------------------------------------------------------- | | 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,6 +298,7 @@ If you have applied the **Scaled to fit centered (proportional)** format, the pi ![](assets/en/FormObjects/property_pictureFormat_ScaledProportional.png) + ### Replicated `JSON grammar: "tiled"` @@ -320,17 +315,18 @@ If the field is reduced to a size smaller than that of the original picture, the | ------------- | --------- | ----------------------------------------------------------------------------------------------------- | | 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: @@ -346,11 +342,8 @@ 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 @@ -358,22 +351,21 @@ Windows: this format is the same as the System time short format | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 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" @@ -388,8 +380,10 @@ When a [boolean expression](properties_Object.md#expression-type) is displayed a [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,221 @@ 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 +| Name | Data Type | 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 + +| 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) + + + + + + diff --git a/website/translated_docs/pt/FormObjects/properties_Entry.md b/website/translated_docs/pt/FormObjects/properties_Entry.md index 9cacd628fffc02..49e261b202c9b2 100644 --- a/website/translated_docs/pt/FormObjects/properties_Entry.md +++ b/website/translated_docs/pt/FormObjects/properties_Entry.md @@ -3,14 +3,14 @@ id: propertiesEntry title: Entry --- -* * * - +--- ## 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 | @@ -22,8 +22,8 @@ The Auto Spellcheck property activates the spell-check for each object. When use [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" | - #### 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 | - #### 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) +[4D Write Pro areas](writeProArea_overview.md) - [Check Box](checkbox_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. @@ -87,10 +90,11 @@ Entry filters can also be used to display required formatting characters so that Most of the time, you can use one of the [built-in filters](#default-entry-filters) of 4D for what you need; however, you can also create and use custom filters: - you can directly enter a filter definition string -- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). +- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|). 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: @@ -119,196 +123,221 @@ Here is a table that explains each of the entry filter choices in the Entry Filt #### 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 +| Name | Data Type | Possible Values | +| ----------- | --------- | ---------------------------------------------------------------------------------------------------------------------------- | +| entryFilter | string |
          • Entry filter code or
          • Entry filter name (filter names start with | ) | + + +#### Objects Supported + +[Check Box](checkbox_overview.md) - [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 +

            +

            + +* ![](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 + +| Name | Data Type | Possible Values | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| shortcutAccel | boolean | true, false (Ctrl Windows/Command macOS) | +| shortcutAlt | boolean | true, false | +| shortcutCommand | boolean | true, false | +| shortcutControl | boolean | true, false (macOS Control) | +| shortcutShift | boolean | 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 + +[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) + + + + + + + diff --git a/website/translated_docs/pt/FormObjects/properties_Footers.md b/website/translated_docs/pt/FormObjects/properties_Footers.md index 9b9fcc266e017e..b9de67269ca9b2 100644 --- a/website/translated_docs/pt/FormObjects/properties_Footers.md +++ b/website/translated_docs/pt/FormObjects/properties_Footers.md @@ -3,8 +3,7 @@ id: propertiesFooters title: Footers --- -* * * - +--- ## Display Footers 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. @@ -15,43 +14,45 @@ This property is used to display or hide [list box column footers](listbox_overv | ----------- | --------- | --------------- | | showFooters | boolean | true, false | - #### Objects Supported [List Box](listbox_overview.md) -* * * + + +--- ## Height 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. - -* *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. +* *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 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". Note that converting back and forth may lead to an end result that is different from the starting value due to the automatic calculations made by 4D. This is illustrated in the following sequences: *(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 @@ -59,11 +60,11 @@ Note that converting back and forth may lead to an end result that is different | ------------ | --------- | ----------------------------- | | 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 diff --git a/website/translated_docs/pt/FormObjects/properties_Gridlines.md b/website/translated_docs/pt/FormObjects/properties_Gridlines.md index 292f12f6de8905..ffbcdaa2a01f39 100644 --- a/website/translated_docs/pt/FormObjects/properties_Gridlines.md +++ b/website/translated_docs/pt/FormObjects/properties_Gridlines.md @@ -3,8 +3,7 @@ id: propertiesGridlines title: Gridlines --- -* * * - +--- ## Horizontal Line Color Defines the color of the horizontal lines in a list box (gray by default). @@ -15,13 +14,14 @@ Defines the color of the horizontal lines in a list box (gray by default). | -------------------- | --------- | ------------------------------------------ | | horizontalLineStroke | color | any css value, "'transparent", "automatic" | - #### Objects Supported [List Box](listbox_overview.md) -* * * + + +--- ## Vertical Line Color Defines the color of the vertical lines in a list box (gray by default). @@ -32,7 +32,6 @@ Defines the color of the vertical lines in a list box (gray by default). | ------------------ | --------- | ------------------------------------------ | | verticalLineStroke | color | any css value, "'transparent", "automatic" | - #### Objects Supported [List Box](listbox_overview.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/properties_Headers.md b/website/translated_docs/pt/FormObjects/properties_Headers.md index 4a7648ab6eddb6..8949ac077f9a09 100644 --- a/website/translated_docs/pt/FormObjects/properties_Headers.md +++ b/website/translated_docs/pt/FormObjects/properties_Headers.md @@ -3,8 +3,7 @@ id: propertiesHeaders title: Headers --- -* * * - +--- ## Display Headers 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. @@ -15,26 +14,24 @@ This property is used to display or hide [list box column headers](listbox_overv | ----------- | --------- | --------------- | | showHeaders | boolean | 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. - -* *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. +* *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,13 +42,16 @@ 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 @@ -59,11 +59,11 @@ Note that converting back and forth may lead to an end result that is different | ------------ | --------- | ------------------------------- | | 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 diff --git a/website/translated_docs/pt/FormObjects/properties_Help.md b/website/translated_docs/pt/FormObjects/properties_Help.md index ba4451dbd01ce4..995397a25f1617 100644 --- a/website/translated_docs/pt/FormObjects/properties_Help.md +++ b/website/translated_docs/pt/FormObjects/properties_Help.md @@ -3,8 +3,7 @@ id: propertiesHelp title: Help --- -* * * - +--- ## Help Tip This property allows associating help messages with active objects in your forms. They can be displayed at runtime: @@ -16,21 +15,21 @@ This property allows associating help messages with active objects in your forms 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. +- 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. + #### JSON Grammar | Name | Data Type | Possible Values | |:-------:|:---------:| ------------------------------------- | | tooltip | text | 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,10 @@ 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 +[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..a87c6c4f1ffffd 100644 --- a/website/translated_docs/pt/FormObjects/properties_Hierarchy.md +++ b/website/translated_docs/pt/FormObjects/properties_Hierarchy.md @@ -3,10 +3,8 @@ id: propertiesHierarchy title: Hierarchy --- -* * * - +--- ## Hierarchical List Box - `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. @@ -15,13 +13,14 @@ Additional options (**Variable 1...10**) are available when the *Hierarchical Li 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 | - #### 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 492ae0c5128421..f4a8c0fbb46881 100644 --- a/website/translated_docs/pt/FormObjects/properties_ListBox.md +++ b/website/translated_docs/pt/FormObjects/properties_ListBox.md @@ -3,8 +3,7 @@ id: propertiesListBox title: List Box --- -* * * - +--- ## Columns Collection of columns of the list box. @@ -15,233 +14,236 @@ Collection of columns of the list box. | ------- | ---------------------------- | ------------------------------------------------ | | 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 - `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 + +| Name | Data Type | 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) + + + + + + +--- +## 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 (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 +| 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 diff --git a/website/translated_docs/pt/FormObjects/properties_Object.md b/website/translated_docs/pt/FormObjects/properties_Object.md index 068a7c5bbf7613..8b1769210f6644 100644 --- a/website/translated_docs/pt/FormObjects/properties_Object.md +++ b/website/translated_docs/pt/FormObjects/properties_Object.md @@ -3,14 +3,14 @@ id: propertiesObject title: Objects --- -* * * - +--- ## Type -`MANDATORY SETTING` + `MANDATORY SETTING` This property designates the type of the [active or inactive form object](formObjects_overview.md). + #### JSON Grammar | Name | Data Type | Possible Values | @@ -22,16 +22,17 @@ This property designates the type of the [active or inactive form object](formOb [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 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 @@ -40,13 +41,12 @@ For more information about naming rules for form objects, refer to [Identifiers] | ---- | --------- | -------------------------------------------------------------------- | | 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) -* * * +--- ## Save value This property is available when the [Save Geometry](FormEditor/properties_FormProperties.md#save-geometry) option is checked for the form. @@ -69,38 +69,48 @@ Here is the list of objects whose value can be saved: | ------------- | --------- | --------------- | | memorizeValue | boolean | true, false | - #### Objects Supported [Check Box](checkbox_overview.md) - [Drop-down List](dropdownList_Overview.md) - [Radio Button](radio_overview.md) - [Tab control](tabControl.md) -* * * + +--- ## Variable or Expression -> See also **[Expression](properties_DataSource#expression)** for Selection and collection type list box columns. +> See also **[Expression](properties_DataSource.md#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. Variables or expressions can be enterable or non-enterable and can receive data of the Text, Integer, Numeric, Date, Time, Picture, Boolean, or Object type. -### 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). +#### JSON Grammar + +| Name | Data Type | Possible Values | +| ---------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| dataSource | string, or string array |
          • 4D variable, field name, or any 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] | + + +### Expressions + +You can use an [expression](Concepts/quick-tour.md#expressions) as data source for an object. Any valid 4D expression is allowed: simple expression, object property, 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. When a variable is not named, when the form is loaded, 4D creates a new variable for the object, with a calculated name that is unique in the space of the process variables of the interpreter (which means that this mechanism can be used even in compiled mode). This temporary variable will be destroyed when the form is closed. In order for this principle to work in compiled mode, it is imperative that dynamic variables are explicitly typed. There are two ways to do this: -- You can set the type using the [Expression type](#expression-type) property. +- You can set the type using the [Expression type](#expression-type) property. - You can use a specific initialization code when the form is loaded that uses, for example, the `VARIABLE TO VARIABLE` command: ```4d @@ -125,205 +135,254 @@ 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). + + + + +#### 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**](properties_DataSource.md#data-type-expression-type) in the Property List for [selection](listbox_overview.md#selection-list-boxes) and [collection](listbox_overview.md#collection-or-entity-selection-list-boxes) type list box columns and for [Drop-down Lists](dropdownList_Overview.md) associated to an [object](FormObjects/dropdownList_Overview.md#using-an-object) or an [array](FormObjects/dropdownList_Overview.md#using-an-array). + + +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 project compilation, you must [declare the variable](Concepts/variables.md#declaring-variables). + +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 + +| Name | Data Type | 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", "time". *Array/selection list box only*: "integer", "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](FormEditor/createStylesheet.md#style-sheet-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 -- 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 +| 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 application 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`](https://doc.4d.com/4dv19/help/command/en/page1140.html) 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 | X | | Same as column type | +| Maximum | X | 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. + +> Only declared or dynamic [variables](Concepts/variables.md) can be used to display footer calculations. Other kinds of [expressions](Concepts/quick-tour.md#expressions) such as `Form.value` are not supported. + +Automatic calculations ignore the shown/hidden state of list box rows. If you want to restrict a calculation to only visible rows, you must use a custom calculation. + +*Null* values are not taken into account for any calculations. + +If the column contains different types of values (collection-based column for example): + +- Average and Sum only take numerical elements into account (other element types are ignored). +- Minimum and Maximum return a result according to the usual type list order as defined in the [collection.sort()](API/CollectionClass.md#sort) function. + +Using automatic calculations in footers of columns based upon expressions has the following limitations: + +- it is **supported** with all list box types when the expression is "simple" (such as `[table]field` or `this.attribute`), +- it is **supported but not recommended** for performance reasons with collection/entity selection list boxes when the expression is "complex" (other than `this.attribute`) and the list box contains a large number of rows, +- it is **not supported** with current selection/named selection list boxes when the expression is "complex". Precisa utilizar cálculos personalizados. + +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. + + +#### 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) + + + + + + + + + diff --git a/website/translated_docs/pt/FormObjects/properties_Picture.md b/website/translated_docs/pt/FormObjects/properties_Picture.md index 0edf708db43671..12ad0b1aa14f42 100644 --- a/website/translated_docs/pt/FormObjects/properties_Picture.md +++ b/website/translated_docs/pt/FormObjects/properties_Picture.md @@ -3,17 +3,17 @@ id: propertiesPicture title: Picture --- -* * * - +--- ## 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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 | @@ -25,10 +25,11 @@ Two main locations can be used for static picture path: [Picture button](pictureButton_overview.md) - [Picture Pop-up Menu](picturePopupMenu_overview.md) - [Static Picture](staticPicture.md) -* * * +--- ## Display + ### Scaled to fit `JSON grammar: "scaled"` @@ -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" | - #### Objects Supported [Static Picture](staticPicture.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/properties_Plugins.md b/website/translated_docs/pt/FormObjects/properties_Plugins.md index 14c009dad37524..3a39c7db45495e 100644 --- a/website/translated_docs/pt/FormObjects/properties_Plugins.md +++ b/website/translated_docs/pt/FormObjects/properties_Plugins.md @@ -3,14 +3,15 @@ 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 | @@ -20,4 +21,5 @@ Because the Advanced properties feature is under the control of the author of th #### 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..89f16c006d3f9f 100644 --- a/website/translated_docs/pt/FormObjects/properties_Print.md +++ b/website/translated_docs/pt/FormObjects/properties_Print.md @@ -3,8 +3,7 @@ id: propertiesPrint title: Print --- -* * * - +--- ## 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. @@ -13,6 +12,7 @@ You cannot place more than one variable frame object side-by-side on a form. You > 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,6 +23,7 @@ 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 | @@ -32,4 +33,4 @@ The print options are: #### 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..41f6be2cb6d239 100644 --- a/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md +++ b/website/translated_docs/pt/FormObjects/properties_RangeOfValues.md @@ -3,14 +3,12 @@ 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 @@ -25,7 +23,6 @@ The default value can only be used if the [data source type](properties_Object.m | #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. @@ -36,17 +33,17 @@ You can use a sequence number to create a unique number for each record in the t | ------------ | ----------------------------------- | ------------------------------------------ | | defaultValue | string, number, date, time, boolean | Any value and/or a stamp: "#D", "#H", "#N" | - #### Objects Supported [Input](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. - > If a specified list is hierarchical, only the items of the first level are taken into account. #### JSON Grammar @@ -55,19 +52,19 @@ Allows setting a list whose values cannot be entered in the object. If an exclud | ------------ | --------- | -------------------------------- | | excludedList | list | 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 @@ -76,7 +73,11 @@ Making a list required does not automatically display the list when the field is | ------------ | --------- | --------------------------- | | requiredList | list | 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 3b0c1743686c31..5e66051fcec11e 100644 --- a/website/translated_docs/pt/FormObjects/properties_Reference.md +++ b/website/translated_docs/pt/FormObjects/properties_Reference.md @@ -4,216 +4,201 @@ 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](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. | minimum: 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). | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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 | -| [entryFilter](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 + +| Property | Description | 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"; "automaticAlternate" | +| [`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. | minimum: 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). | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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. | minimum: 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-expression-type) (list box column, drop-down list) | Indicates the variable type. | "integer", "boolean", "number", "picture", "text", date", "time", "arrayText", "arrayDate", "arrayTime", "arrayNumber", "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 | +| [`entryFilter`](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`](Events/overview.md) | 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#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 | +| [`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) (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** | | | +| [`saveAs`](properties_DataSource.md#save-as) (list box column)
            [`saveAs`](properties_DataSource.md#data-type-list) (drop-down list) | The type of contents to save in the field or variable associated to the form object | "value", "reference" | +| [`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. | 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_Text.md#font-color) (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** | | | +| [`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) | diff --git a/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md b/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md index 745cb7cb83ee98..cd6e74cd96423c 100644 --- a/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md +++ b/website/translated_docs/pt/FormObjects/properties_ResizingOptions.md @@ -3,8 +3,7 @@ id: propertiesResizingOptions title: Resizing Options --- -* * * - +--- ## Column Auto-Resizing 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,19 +30,21 @@ 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" | - #### 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. @@ -55,8 +56,6 @@ Three options are available: | 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 works in conjunction with the [Vertical Sizing](#vertical-sizing) property. #### JSON Grammar @@ -65,13 +64,12 @@ Three options are available: | ------- | --------- | ----------------------- | | 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 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. @@ -83,8 +81,6 @@ Three options are available: | 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 | - - > This property works in conjunction with the [Horizontal Sizing](#horizontal-sizing) property. #### JSON Grammar @@ -93,13 +89,13 @@ Three options are available: | ------- | --------- | ----------------------- | | 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,19 +108,21 @@ 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) | - #### Objects Supported [Splitter](splitterTabControlOverview#splitters) -* * * + + +--- ## Resizable Designates if the size of the column can be modified by the user. @@ -135,7 +133,12 @@ Designates if the size of the column can be modified by the user. |:--------- |:---------:|:---------------:| | resizable | boolean | "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 972eb8c92fa8c5..c5fec5f7494574 100644 --- a/website/translated_docs/pt/FormObjects/properties_Scale.md +++ b/website/translated_docs/pt/FormObjects/properties_Scale.md @@ -3,8 +3,7 @@ id: propertiesScale title: Scale --- -* * * - +--- ## Barber shop Enables the "barber shop" variant for the thermometer. @@ -15,13 +14,13 @@ Enables the "barber shop" variant for the thermometer. |:---------------:|:---------:| ----------------------------------------------------------- | | [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. @@ -32,13 +31,13 @@ Displays/Hides the graduations next to the labels. |:---------------:|:---------:| --------------- | | showGraduations | boolean | "true", "false" | - #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Graduation step Scale display measurement. @@ -54,8 +53,9 @@ Scale display measurement. [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Label Location Specifies the location of an object's displayed text. @@ -70,19 +70,19 @@ Specifies the location of an object's displayed text. |:---------------:|:---------:| ---------------------------------------- | | labelsPlacement | string | "none", "top", "bottom", "left", "right" | - #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) -* * * + +--- ## Maximum Maximum 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. -- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. +- To enable [Barber shop thermometers](progressIndicator.md#barber-shop), this property must be omitted. #### JSON Grammar @@ -90,13 +90,13 @@ Maximum value of an indicator. |:----:|:---------------:| ----------------------------------- | | max | string / number | minimum: 0 (for numeric data types) | - #### Objects Supported [Thermometer](progressIndicator.md#thermometer) - [Ruler](ruler.md#ruler) - [Stepper](stepper.md#stepper) -* * * + +--- ## Minimum 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. @@ -107,13 +107,14 @@ Minimum value of an indicator. For numeric steppers, this property represent sec |:----:|:---------------:| ----------------------------------- | | 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. @@ -127,4 +128,10 @@ Minimum interval accepted between values during use. For numeric steppers, this #### 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 e6fd8e1cd46d13..9fd370f2ba2796 100644 --- a/website/translated_docs/pt/FormObjects/properties_Subform.md +++ b/website/translated_docs/pt/FormObjects/properties_Subform.md @@ -3,8 +3,7 @@ id: propertiesSubform title: Subform --- -* * * - +--- ## Allow Deletion Specifies if the user can delete subrecords in a list subform. @@ -15,70 +14,64 @@ Specifies if the user can delete subrecords in a list subform. | --------------- | --------- | --------------------------- | | deletableInList | boolean | true, false (default: true) | - #### Objects Supported [Subform](subform_overview.md) -* * * +--- ## Detail Form 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 | - #### 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 | - #### Objects Supported [Subform](subform_overview.md) #### See also - [Double click on row](#double-click-on-row) -* * * - +--- ## Double-click on row `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. @@ -90,23 +83,22 @@ For the last two actions, the On `Open Detail` form event is also generated. The | ---------------------- | --------- | ----------------------------------- | | doubleClickInRowAction | string | "editSubrecord", "displaySubrecord" | - #### Objects Supported [Subform](subform_overview.md) -#### See also +#### See also [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 | @@ -118,29 +110,27 @@ When a list subform has this property enabled, the user can modify record data d [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 | - #### Objects Supported [Subform](subform_overview.md) -* * * + +--- ## Source Specifies the table that the list subform belongs to (if any). @@ -151,32 +141,29 @@ Specifies the table that the list subform belongs to (if any). | ----- | --------- | --------------------------------- | | table | string | 4D table name, or "" if no table. | - #### Objects Supported [Subform](subform_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 [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. +- **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. + - 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" | - #### 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 4324942053b056..ba8b2afb152d56 100644 --- a/website/translated_docs/pt/FormObjects/properties_Text.md +++ b/website/translated_docs/pt/FormObjects/properties_Text.md @@ -3,33 +3,29 @@ id: propertiesText title: Text --- -* * * - +--- ## 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 | - #### Objects Supported [Input](input_overview.md) -* * * - +--- ## Bold 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 @@ -37,21 +33,18 @@ You can set this property using the [**OBJECT SET FONT STYLE**](https://doc.4d.c | ---------- | --------- | ---------------- | | fontWeight | text | "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 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 @@ -59,19 +52,17 @@ You can also set this property via the [**OBJECT SET FONT STYLE**](https://doc.4 | --------- | --------- | ------------------ | | 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. +--- +## Underline +Sets the text to have a line running beneath it. +> This is normal text.
            This is underlined text. #### JSON Grammar @@ -79,19 +70,22 @@ Sets the text to have a line running beneath it. | -------------- | --------- | --------------------- | | 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. - > **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,7 +97,6 @@ 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: @@ -111,6 +104,8 @@ Three font themes are available: > Font themes manage the font as well as its size and color. You can apply custom style properties (Bold, Italic or Underline) without altering its functioning. + + #### JSON Grammar | Name | Data Type | Possible Values | @@ -122,6 +117,9 @@ Three font themes are available: [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,25 +128,23 @@ 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 | - - > 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 Allows defining the object's font size in points. @@ -159,13 +155,12 @@ Allows defining the object's font size in points. | -------- | --------- | ------------------------------------- | | 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 Designates the font color. @@ -180,18 +175,20 @@ 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" | - #### 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 @@ -202,7 +199,6 @@ 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: @@ -218,13 +214,11 @@ Foreground color;Dark shadow color) | --------------- | --------- | --------------------- | | rowStrokeSource | string | Font color expression | - #### Objects Supported [List Box](listbox_overview.md#overview) -* * * - +--- ## Style Expression `Selection and collection/entity selection type list boxes` @@ -240,22 +234,25 @@ 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. | - #### Objects Supported [List Box](listbox_overview.md) - [List Box Column](listbox_overview.md#list-box-columns) -* * * + + + + +--- ## Horizontal Alignment Horizontal location of text within the area that contains it. @@ -266,39 +263,43 @@ Horizontal location of text within the area that contains it. | --------- | --------- | ------------------------------------------------- | | 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 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 +- `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" | - #### 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 + + + + + + +--- +## 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: @@ -314,28 +315,19 @@ Specifies an expression or a variable which will be evaluated for each row displ | 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: +**Example** -```4d -//form method -Case of - :(Form event=On Load) - Form.meta:=New object -End case -``` - -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: +//Método Cor +//Define a cor da fonte para certas linhas e a cor de fundo para uma coluna específica : C_OBJECT($0) -If(This.ID>5) //ID is an attribute of collection objects/entities +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 @@ -344,7 +336,29 @@ 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: + +```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 : + +```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 @@ -352,26 +366,33 @@ $0:=Form.meta | ---------- | --------- | ------------------------------------------------ | | 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.

            +Esta propriedade ativa a possibilidade de usar estilos específicos na área selecionada. Quando essa opção for marcada, 4D interpreta qualquer tag\ HTML encontrada nessa área.

            -

            +

            By default, this option is not enabled.

            -

            + + +

            JSON Grammar

            - +
            Name @@ -401,25 +422,31 @@ This property enables the possibility of using specific styles in the selected a
            -

            +

            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: +

            + 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 @@ -471,15 +498,18 @@ This property enables the possibility of using specific styles in the selected a
            -

            - 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. +

            + Além de áreas de texto estáticas, input os objetos de texto podem ser girados quando forem não-digitáveis. 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

            - +
            Name @@ -509,37 +539,40 @@ This property enables the possibility of using specific styles in the selected a
            -

            +

            Objects Supported

            -

            - Input (non-enterable) - Text Area +

            + Input (não-digitável) - Ãrea Texto

            -
            -

            + + + +
            +

            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. +

            + Permite estabelecer uma cor de fonte personalizada para cada linha do list box ou cada célula da coluna.

            -

            - 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. +

            + 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 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 @@ -569,37 +602,41 @@ This property enables the possibility of using specific styles in the selected a
            -

            +

            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. +

            + Permite estabelecer um estilo de fonte personalizado para cada linha do list box ou cada célula da coluna.

            -

            - 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. +

            + 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. 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

            - +
            Name @@ -629,51 +666,52 @@ This property enables the possibility of using specific styles in the selected a
            -

            +

            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. +

            + Essa propriedade só está disponível para a área input Multiestilo. 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.

            -

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

            + Por exemplo, aqui está um texto que inclui uma modificação de estilo:

            -

            +

            -

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

            + Quando a propriedade for desativada, a área só armazena a modificação. Os conteúdos armazenados são entretanto:

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

            - 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: +

            + 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:

            -
            <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>
            +
            <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">Que <SPAN STYLE="font-size:13.5pt">lindo</SPAN> dia!</SPAN>
             
            -

            +

            JSON Grammar

            - +
            Name @@ -703,10 +741,31 @@ This property enables the possibility of using specific styles in the selected a
            -

            +

            Objects Supported

            -

            +

            Input -

            \ No newline at end of file +

            + + + + + + + + + + + + + + + + + + + + + diff --git a/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md b/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md index e02ae54e7246cf..f106908f5563b5 100644 --- a/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md +++ b/website/translated_docs/pt/FormObjects/properties_TextAndPicture.md @@ -3,8 +3,7 @@ id: propertiesTextAndPicture title: Text and Picture --- -* * * - +--- ## Background pathname 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. @@ -22,12 +21,15 @@ The pathname to enter is similar as for the [Pathname property for static pictur [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 | @@ -39,8 +41,10 @@ General appearance of the button. The button style also plays a part in the avai [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. @@ -51,8 +55,6 @@ This parameter is useful, for example, when the background picture contains bord | -------------------- | --------------------------------------------------------- | | 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 @@ -61,12 +63,14 @@ This parameter is useful, for example, when the background picture contains bord | ------------- | --------- | --------------------------------------- | | 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 @@ -78,13 +82,15 @@ Designates the placement of an icon in relation to the form object. | ------------- | --------- | ----------------------- | | iconPlacement | string | "none", "left", "right" | - #### Objects Supported [List Box Header](listbox_overview.md#list-box-headers) -* * * + + + +--- ## Icon Offset Sets a custom offset value in pixels, which will be used when the button is clicked @@ -97,13 +103,13 @@ The title of the button will be shifted to the right and toward the bottom for t | ------------ | --------- | --------------- | | customOffset | number | minimum: 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 | - #### 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. @@ -146,13 +154,14 @@ The pathname to enter is similar as for the [Pathname property for static pictur | ---- | --------- | -------------------------------------------- | | icon | picture | 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. @@ -167,20 +176,20 @@ Here are the results using the various options for this property: | **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) | - #### JSON Grammar | Name | Data Type | 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. @@ -195,13 +204,14 @@ This parameter is useful, for example, when the background picture contains bord | ------------- | --------- | --------------------------------------- | | 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 + +| Name | Data Type | 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) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/properties_WebArea.md b/website/translated_docs/pt/FormObjects/properties_WebArea.md index 8f42001da5981d..c9194f6e2984a5 100644 --- a/website/translated_docs/pt/FormObjects/properties_WebArea.md +++ b/website/translated_docs/pt/FormObjects/properties_WebArea.md @@ -3,8 +3,7 @@ id: propertiesWebArea title: Web Area --- -* * * - +--- ## 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,19 +12,20 @@ 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" | - #### Objects Supported [Web Area](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. @@ -36,26 +36,26 @@ Name of a Longint type variable. This variable will receive a value between 0 an | -------------- | --------- | -------------------------- | | progressSource | string | Name of a Longint variable | - #### Objects Supported [Web Area](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. @@ -67,28 +67,27 @@ The URL variable produces the same effects as the [WA OPEN URL](https://doc.4d.c | --------- | --------- | --------------- | | urlSource | string | A URL. | - #### Objects Supported [Web Area](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 WebKit ones. +* **checked** - `JSON value: embedded`: In this case, 4D uses Blink engine from Google (CEF). 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. + +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): 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). +- 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. #### JSON Grammar @@ -96,7 +95,6 @@ This option allows choosing between two rendering engines for the Web area, depe | --------- | --------- | -------------------- | | webEngine | string | "embedded", "system" | - #### Objects Supported [Web Area](webArea_overview.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/radio_overview.md b/website/translated_docs/pt/FormObjects/radio_overview.md index eeb1f0619f8a23..e4700e421225e7 100644 --- a/website/translated_docs/pt/FormObjects/radio_overview.md +++ b/website/translated_docs/pt/FormObjects/radio_overview.md @@ -3,8 +3,6 @@ id: radiobuttonOverview title: Radio Button --- -## Overview - Radio buttons are objects that allow the user to select one of a group of buttons. Usually, a radio button shows a small bullseye with text. However, radio buttons can have [various appearances](#button-styles). @@ -12,11 +10,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,17 +24,20 @@ 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 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,6 +46,7 @@ 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 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 +55,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 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,23 +106,27 @@ 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. +The Office XP button style combines the appearance of the [Regular](#regular) style (standard system button) 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. - - ![](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 @@ -120,17 +134,21 @@ This button style can be used to add a standard collapse/expand icon. These butt ![](assets/en/FormObjects/checkbox_collapse.png) + + ### Disclosure Button 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 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: diff --git a/website/translated_docs/pt/FormObjects/ruler.md b/website/translated_docs/pt/FormObjects/ruler.md index 1797a2a42bbf8b..1eaaf3c6dc85ea 100644 --- a/website/translated_docs/pt/FormObjects/ruler.md +++ b/website/translated_docs/pt/FormObjects/ruler.md @@ -3,7 +3,6 @@ id: ruler title: Ruler --- -## Overview The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. @@ -19,5 +18,5 @@ For more information, please refer to [Using indicators](progressIndicator.md#us ## See also -- [progress indicators](progressIndicator.md) +- [progress indicators](progressIndicator.md) - [steppers](stepper.md) \ No newline at end of file diff --git a/website/translated_docs/pt/FormObjects/shapes_overview.md b/website/translated_docs/pt/FormObjects/shapes_overview.md index 24e9eb932b8426..4300a81e4c25e8 100644 --- a/website/translated_docs/pt/FormObjects/shapes_overview.md +++ b/website/translated_docs/pt/FormObjects/shapes_overview.md @@ -11,6 +11,7 @@ Shapes are [static objects](formObjects_overview.md#active-and-static-objects) t - lines - ovals + ## Rectangle A static rectangle is a decorative object for forms. Rectangles are constrained to squared shapes. @@ -32,8 +33,8 @@ 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 @@ -42,42 +43,46 @@ A static line is a decorative object for forms, drawn between two plots. Lines c 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 - } - +#### 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 - } - +``` + "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) -#### 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..8c5ef5ca8fe473 100644 --- a/website/translated_docs/pt/FormObjects/spinner.md +++ b/website/translated_docs/pt/FormObjects/spinner.md @@ -3,8 +3,6 @@ id: spinner title: Spinner --- -## Overview - The spinner is a circular indicator that displays a continuous animation, like the [Barber shop](progressIndicator.md#barber-shop). ![](assets/en/FormObjects/spinner.gif) @@ -18,4 +16,5 @@ When the form is executed, the object is not animated. You manage the 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..695ae4096cff03 100644 --- a/website/translated_docs/pt/FormObjects/splitters.md +++ b/website/translated_docs/pt/FormObjects/splitters.md @@ -3,20 +3,21 @@ id: splitters title: Splitter --- -## Overview -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. The splitter takes into account each object’s resizing properties, which means that you can completely customize your application's interface. 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,11 +34,12 @@ 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) +[Border Line Style](properties_BackgroundAndBorder.md##border-line-style-dotted-line-type) - [Bottom](properties_CoordinatesAndSizing.md#bottom) - [Class](properties_Object.md#css-class) - [Height](properties_CoordinatesAndSizing.md#height) - [Help Tip](properties_Help.md#help-tip) - [Horizontal Sizing](properties_ResizingOptions.md#horizontal-sizing) - [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) - [Top](properties_CoordinatesAndSizing.md#top) - [Type](properties_Object.md#type) - [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) -## 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: @@ -47,19 +49,18 @@ In a form, splitters interact with the objects that are around them according to | Resize | Keep original position(s), but are resized according to the splitter’s new position | | | | Move | 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..438538d8d5f97f 100644 --- a/website/translated_docs/pt/FormObjects/staticPicture.md +++ b/website/translated_docs/pt/FormObjects/staticPicture.md @@ -3,25 +3,28 @@ id: staticPicture title: Static picture --- -## Overview 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. Either way, your application will run faster than if the picture was pasted into each page. + -## 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/\". +- in the **Resources** folder of the project. Appropriate when you want to share static pictures between several forms in the project. 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..4b667a339e2c15 100644 --- a/website/translated_docs/pt/FormObjects/stepper.md +++ b/website/translated_docs/pt/FormObjects/stepper.md @@ -3,33 +3,35 @@ id: stepper title: Stepper --- -## Overview - 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: + * [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 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 more information, please refer to [Using indicators](progressIndicator.md#using-indicatire) in the "Progress Indicator" page. ## Supported Properties +[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) - [Maximum](properties_Scale.md#maximum) - [Minimum](properties_Scale.md#minimum) - [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) -[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) + + + + + -- [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..4730432d803319 100644 --- a/website/translated_docs/pt/FormObjects/subform_overview.md +++ b/website/translated_docs/pt/FormObjects/subform_overview.md @@ -3,20 +3,21 @@ id: subformOverview title: Subform --- -## Overview 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 +31,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 +40,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 +51,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 +76,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. @@ -102,8 +103,7 @@ You can modify the labels from the subform by assigning values to the *InvoiceAd ![](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 +112,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,7 +133,6 @@ 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. This mechanism is illustrated in the following diagram: @@ -143,9 +142,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 1ed8a61031346c..6e5c496e6f0e10 100644 --- a/website/translated_docs/pt/FormObjects/tabControl.md +++ b/website/translated_docs/pt/FormObjects/tabControl.md @@ -11,7 +11,7 @@ The following multi-page form uses a tab control object: To navigate from screen to screen, the user simply clicks the desired tab. -The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command or the `gotoPage` standard action would be used when a user clicks a tab. +The screens can represent pages in a multi-page form or an object that changes when the user clicks a tab. If the tab control is used as a page navigation tool, then the [`FORM GOTO` PAGE](https://doc.4d.com/4dv19/help/command/en/page247.html) command or the `gotoPage` standard action would be used when a user clicks a tab. Another use of the tab control is to control the data that is displayed in a subform. For example, a Rolodex could be implemented using a tab control. The tabs would display the letters of the alphabet and the tab control’s action would be to load the data corresponding to the letter that the user clicked. @@ -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,44 @@ 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: +To supply the labels for a tab control, you can use: + +- um objeto +- a choice list +- an array + +### Using an object + +You can assign an [object](Concepts/dt_object.md) encapsulating a [collection](Concepts/dt_collection) as the [data source](properties_Object.md#variable-or-expression) of the tab control. The object must contain the following properties: + +| Property | Type | Description | +| -------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `values` | Collection | Mandatory - Collection of scalar values. Only string values are supported. If invalid, empty or not defined, the tab control is empty | +| `index` | number | Index of the currently tab control page (value between 0 and `collection.length-1`) | +| `currentValue` | Text | Currently selected value | + +The initialization code must be executed before the form is presented to the user. + +In the following example, `Form.tabControl` has been defined as tab control [expression](properties_Object.md#variable-or-expression). You can associate the [`gotoPage` standard action](#goto-page-action) to the form object: -* 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 +Form.tabControl:=New object +Form.tabControl.values:=New collection("Page 1"; "Page 2"; "Page 3") +Form.tabControl.index:=2 //start on page 3 +``` + + +### Utilizar uma lista de seleção + +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 to a json list ("$ref"). Icons associated with list items in the Lists editor will be displayed in the tab control. + +### Using a Text array + +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,20 +84,20 @@ 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 [LIST TO ARRAY](https://doc.4d.com/4dv19/help/command/en/page288.html) command to load the values into the array. -> 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 +## Goto page features ### FORM GOTO PAGE command -You can use the [FORM GOTO PAGE](https://doc.4d.com/4Dv17R5/4D/17-R5/FORM-GOTO-PAGE.301-4128536.en.html) command in the tab control’s method: +You can use the [`FORM GOTO PAGE`](https://doc.4d.com/4dv19/help/command/en/page247.html) command in the tab control’s method: ```4d FORM GOTO PAGE(arrPages) ``` -The command is executed when the `On Clicked` event occurs. You should then clear the array when the `On Unload` event occurs. +The command is executed when the [`On Clicked`](Events/onClicked.md) event occurs. You should then clear the array when the [`On Unload`](Events/onUnload.md) event occurs. Here is an example object method: @@ -85,6 +118,8 @@ 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) - [Save value](properties_Object.md#save-value) - [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 +[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) - [Save value](properties_Object.md#save-value) - [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/website/translated_docs/pt/FormObjects/text.md b/website/translated_docs/pt/FormObjects/text.md index e9c3948f217aeb..db63633511d5a6 100644 --- a/website/translated_docs/pt/FormObjects/text.md +++ b/website/translated_docs/pt/FormObjects/text.md @@ -3,7 +3,6 @@ id: text title: Text --- -## Overview 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 +22,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 +39,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 +[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) - [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) - [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) diff --git a/website/translated_docs/pt/FormObjects/viewProArea_overview.md b/website/translated_docs/pt/FormObjects/viewProArea_overview.md index 187a82350f9e7f..0e0a565395139f 100644 --- a/website/translated_docs/pt/FormObjects/viewProArea_overview.md +++ b/website/translated_docs/pt/FormObjects/viewProArea_overview.md @@ -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 ce5e9a097117ba..599a1060ad1a75 100644 --- a/website/translated_docs/pt/FormObjects/webArea_overview.md +++ b/website/translated_docs/pt/FormObjects/webArea_overview.md @@ -3,24 +3,22 @@ id: webAreaOverview title: Web Area --- -## Overview 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). 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). 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. - > 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. +- [`Progression`](properties_WebArea.md#progression) -- to control the loading percentage of the page displayed in the web area. ### Web rendering engine @@ -32,18 +30,18 @@ Selecting the embedded web rendering engine allows you to call 4D methods from t When the [Access 4D methods](properties_WebArea.md#access-4d-methods) property is selected, you can call 4D methods from a web area. -> This property is only available if the web area [uses the embedded web rendering engine](#use-embedded-web-rendering-engine). +> This property is only available if the web area [uses the embedded web rendering engine](properties_WebArea.md#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. + +The [4D embedded web rendering engine](properties_WebArea.md#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. For example, to call the `HelloWorld` 4D method, you just execute the following statement: ```codeJS $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 +49,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. @@ -123,30 +120,33 @@ $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 -## Form events +Four specific standard actions are available for managing web areas automatically: `Open Back URL`, `Open Forward 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). + + +## Eventos formulário Specific form events are intended for programmed management of web areas, more particularly concerning the activation of links: -- `On Begin URL Loading` -- `On URL Resource Loading` -- `On End URL Loading` -- `On URL Loading Error` -- `On URL Filtering` -- `On Open External Link` -- `On Window Opening Denied` +- [`On Begin URL Loading`](Events/onBeginUrlLoading.md) +- [`On URL Resource Loading`](Events/onUrlResourceLoading.md) +- [`On End URL Loading`](Events/onEndUrlLoading.md) +- [`On URL Loading Error`](Events/onUrlLoadingError.md) +- [`On URL Filtering`](Events/onUrlFiltering.md) +- [`On Open External Link`](Events/onOpenExternalLink.md) +- [`On Window Opening Denied`](Events/onWindowOpeningDenied.md) In addition, web areas support the following generic form events: -- `On Load` -- `On Unload` -- `On Getting Focus` -- `On Losing Focus` +- [`On Load`](Events/onLoad.md) +- [`On Unload`](Events/onUnload.md) +- [`On Getting Focus`](Events/onGettingFocus.md) +- [`On Losing Focus`](Events/onLosingFocus.md) + -## Web area rules +## Regras das áreas web ### User interface @@ -165,18 +165,15 @@ For reasons related to window redrawing mechanisms, the insertion of a web area > Superimposing a web area on top of or beneath other form objects is not supported. + ### Web Area and Web server conflict (Windows) In 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 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. - ### Insertion of protocol (macOS) - The URLs handled by programming in web areas in 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 in your forms or in offscreen web areas. The web inspector is a debugger which is provided by the embedded Web engine. It allows parsing the code and the flow of information of the web pages. @@ -185,12 +182,9 @@ You can view and use a web inspector within web areas in your forms or in offscr To display the web inspector, you can either execute the `WA OPEN WEB INSPECTOR` command, or use the context menu of the web area. -- **Execute the `WA OPEN WEB INSPECTOR` command** - This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). +- **Execute the `WA OPEN WEB INSPECTOR` command**
            This command can be used directly with onscreen (form object) and offscreen web areas. In the case of an onscreen web area, you must have [selected 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). -- **Use the web area context menu** - This feature can only be used with onscreen web areas and requires that the following conditions are met: - +- **Use the web area context menu**
            This feature can only be used with onscreen web areas and requires that the following conditions are met: - the embedded web rendering engine is selected for the area - the [context menu](properties_Entry.md#context-menu) for the web area is enabled - the use of the inspector is expressly enabled in the area by means of the following statement: @@ -207,6 +201,14 @@ When you have done the settings as described above, you then have new options su > 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..c874987036b153 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 offers 4D users an advanced word-processing tool, fully integrated with your 4D application. 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 +[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) - [Draggable](properties_Action.md#draggable) - [Droppable](properties_Action.md#droppable) - [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 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) - [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) + diff --git a/website/translated_docs/pt/GettingStarted/Installation.md b/website/translated_docs/pt/GettingStarted/Installation.md new file mode 100644 index 00000000000000..a37fe892d1d25a --- /dev/null +++ b/website/translated_docs/pt/GettingStarted/Installation.md @@ -0,0 +1,48 @@ +--- +id: installation +title: Installation +--- + +Welcome to 4D! On this page, you will find all of the necessary information about installing and launching your 4D product. + + +## Required configuration + +The [Product Download](https://us.4d.com/product-download) page on the 4D website provides information about the minimum macOS / Windows system requirements for your 4D series. + +Additional technical details are available on the 4D website's [Resources page](https://us.4d.com/resources/feature-release). + + +## Installation on disk + +4D products are installed from the 4D website: + +1. Connect to the 4D website and go to the [Downloads](https://us.4d.com/product-download) page. + +2. Click on the download link for your 4D product and follow the on-screen instructions. + + +## Sign in + +Once you have completed the installation, you can start 4D and sign in. To do so, double-click on the 4D product icon. + +![](assets/en/getStart/logo4d.png) + +The Welcome Wizard then appears: + +![](assets/en/getStart/welcome2.png) + +- If you want to discover and explore 4D, click on the **free trial** link. You will only be asked to sign in or to create a 4D account. + +- If you already have a 4D account, click on the **Sign in** link in the upper right side of the Welcome Wizard dialog and enter your account information. Any already registered 4D licenses are automatically updated (or additional expansion packs loaded) on your machine. + +Expand the **Open or create project application** area and select the action you want to perform: + +- **Connect to 4D Server** - use 4D as a remote client and connect to an application that is already loaded by 4D Server. + +- **Open a local application project** - load an existing application project stored on your disk. + +- **Create a new application project** - create a new, empty application project on your disk. + +Enjoy your 4D experience! + diff --git a/website/translated_docs/pt/MSC/analysis.md b/website/translated_docs/pt/MSC/analysis.md index 842986803d7551..dfe013a5039a16 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. This function is useful for parsing the use of an application or detecting the operation(s) that caused errors or malfunctions. In the case of an application 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). ![](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. @@ -29,16 +27,17 @@ This information allows you to identify the source and context of each operation - Validation of Transaction: Transaction validated. - Cancellation of Transaction: Transaction cancelled. - Update context: Change in extra data (e.g. a call to `CHANGE CURRENT USER` or `SET USER ALIAS`). -- **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. - **System User**: System 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 session name of the user is displayed. -- **4D User**: 4D user name of the user that performed the operation. If an alias is defined for the user, the alias is displayed instead of the 4D user name. +- **4D User**: 4D user name of the user that performed the operation. If an alias is defined for the user, the alias is displayed instead of the 4D user name. - **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 +Click on **Analyze** to update the contents of the current log file of the selected application (named by default dataname.journal). The Browse button can be used to select and open another log file for the application. 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..07667b30a86882 100644 --- a/website/translated_docs/pt/MSC/backup.md +++ b/website/translated_docs/pt/MSC/backup.md @@ -10,8 +10,8 @@ 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. +- **Backup File Destination**: displays information about the location of the application 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 application. - **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. diff --git a/website/translated_docs/pt/MSC/compact.md b/website/translated_docs/pt/MSC/compact.md index 890fa636d3671e..6b5abb40ca8ab4 100644 --- a/website/translated_docs/pt/MSC/compact.md +++ b/website/translated_docs/pt/MSC/compact.md @@ -13,34 +13,32 @@ 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. - **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. If you attempt to carry out this operation in standard mode, a warning dialog box will inform you that the application will be closed and restarted in maintenance mode. You can compact a data file that is not opened by the application (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. ![](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. The application 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. **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: +After compacting is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Compact_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". 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 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). It will be saved automatically and a new journal file will have to be created the next time the application 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. diff --git a/website/translated_docs/pt/MSC/encrypt.md b/website/translated_docs/pt/MSC/encrypt.md index fcd769b8b0df16..0dc76b76e7259c 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. For detailed information about data encryption in 4D, please refer to the "Encrypting data" section in the *Design Reference* manual. 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). 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 +> 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 application 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. +- Encrypting a data file is a lengthy operation. It displays a progress indicator (which could be interrupted by the user). Note also that an application 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. ## 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). +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. + ![](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. If the MSC was opened in standard mode, the application is reopened in maintenance mode. 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. If you intend to deliver an encrypted data file, make sure to move/remove any unencrypted data file from the application folder beforehand. ## Encryption maintenance operations +When an application is encrypted (see above), the Encrypt page provides several encryption maintenance operations, corresponding to standard scenarios. ![](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**. OR -- connect a device such as a USB key and click the **Scan devices** button. +- 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. Storing this file on an external device such a USB key will facilitate the use of an encrypted application, since the user would only need to connect the device to provide the key before opening the application 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. +- when the application is encrypted for the first time, +- when the application is re-encrypted with a new passphrase. 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*". +After an encryption operation has been completed, 4D generates a file in the Logs folder of the application. It is created in XML format and named "*ApplicationName_Encrypt_Log_yyyy-mm-dd hh-mm-ss.xml*" or "*ApplicationName_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..ade0d827d2ee49 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). +The central part of the window indicates the name and location of the 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 current 4D user. - **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 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. * +- **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 MSC.* - **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) - > 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..380659ffd20874 100644 --- a/website/translated_docs/pt/MSC/overview.md +++ b/website/translated_docs/pt/MSC/overview.md @@ -1,40 +1,40 @@ --- -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. The way it is accessed also determines the way the application project is opened: in “maintenance†mode or “standard†mode. In maintenance mode, the project is not opened by 4D, only its reference is provided to the MSC. In standard mode, the project is opened by 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)). +In maintenance mode, only the MSC window is displayed (the project is not opened by the 4D application). This means that projects 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 project to be opened in maintenance mode (see [Feature availability](#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. +- **From the standard project opening dialog box** The standard Open 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 (project not open) + ![](assets/en/MSC/mscicon.png) + When you call this function, a standard Open file dialog appears so that you can select the *.4DProject* or *.4dz* file of the to be examined. The project will not be opened by 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: +In standard mode, a project 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). - -- Use the ```OPEN SECURITY CENTER``` language command. + ![](assets/en/MSC/mscicon.png) +- Use the “msc†standard action that it is possible to associate with a menu command or a form object. +- 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 +- Backup function is only available when the project 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 project 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. diff --git a/website/translated_docs/pt/MSC/repair.md b/website/translated_docs/pt/MSC/repair.md index 93479e5fd89eb5..1a58501739ddff 100644 --- a/website/translated_docs/pt/MSC/repair.md +++ b/website/translated_docs/pt/MSC/repair.md @@ -4,71 +4,68 @@ 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. If you attempt to carry out this operation in standard mode, a warning dialog will inform you that the application 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 - -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. 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. ### 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. It will be placed in a subfolder named “Replaced files (repairing)†in the application 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 (application folder by default). 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. If so, you can open the application immediately. ![](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**. +> If you have deselected the **Records definitively deleted** option in the properties of a table in the 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: ![](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: +After repair is completed, 4D generates a log file in the Logs folder of the project. This file allows you to view all the operations carried out. It is created in XML format and named: *ApplicationName**_Repair_Log_yyyy-mm-dd hh-mm-ss.xml*" where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". -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 13a16ed68befb1..c58d456733e703 100644 --- a/website/translated_docs/pt/MSC/restore.md +++ b/website/translated_docs/pt/MSC/restore.md @@ -4,45 +4,44 @@ title: Restore Page sidebar_label: Restore Page --- -## 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: +You can manually restore an archive of the current application using the **Restore** page. This page provides several options that can be used to control the restoration: ![](assets/en/MSC/MSC_restore.png) -> 4D automatic recovery systems restore databases and include data log file when necessary. +> 4D automatic recovery systems restore applications and include data log file when necessary. -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. +The list found in the left part of the window displays any existing backups of the application. 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. +- **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. +- **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 Project folder. 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. +The **Integrate one or more log file(s) after restore** option allows you to integrate several data log files successively into an application. If, for example, you have 4 journal file archives (.4BL) corresponding to 4 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. 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. +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 application. Matching encryption keys must always be provided. 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. +- 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. The following sequence illustrates the principles of a multi-key backup/restore operation: + | Operation | Generated files | Comment | | --------------------------- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| New database | | | +| New data file | | | | Add data (record # 1) | | | | Backup database | 0000.4BL and 0001.4BK | | | Add data (record # 2) | | | @@ -59,8 +58,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..ded1eb72f1edfa 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. +This function is only available when the application functions with a data log file. ![](assets/en/MSC/MSC_rollback1.png) diff --git a/website/translated_docs/pt/MSC/verify.md b/website/translated_docs/pt/MSC/verify.md index e3601bcc1c9912..5cd0434a37019e 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). + ## 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: +Regardless of the verification requested, 4D generates a log file in the `Logs` folder of the application. 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: *ApplicationName*_Verify_Log_*yyyy-mm-dd hh-mm-ss*.xml where: -- *DatabaseName* is the name of the project file without any extension, for example "Invoices", +- *ApplicationName* 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". 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 b378e78c2cb2eb..fcfcc4c0d99d5d 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,18 +18,18 @@ 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. +- 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. +> You can choose whether to display or hide this window using the **Display toolbar** option in the 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. @@ -36,4 +38,6 @@ 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..a6d7779decc98e 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. By default, when you create a new project, 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. +This allows the user to access the Application environment as soon as the project is created. 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). 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..1d028f4bd305ce 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. +You can create menu bars and menus for your 4D applications. Because pull-down menus are a standard feature of any desktop application, their addition will make your applications easier to use and will make them feel familiar to users. ![](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 have many separate menu bars for each application. For example, you can use one menu bar that contains menus for standard operations on the database 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: - - 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..f80aec70d202f0 100644 --- a/website/translated_docs/pt/Menus/properties.md +++ b/website/translated_docs/pt/Menus/properties.md @@ -5,6 +5,7 @@ title: Menu item properties You can set various properties for menu items such as action, font style, separator lines, keyboard shortcuts or icons. + ## Title The **Title** property contains the label of a menu or menu item as it will be displayed on the application interface. @@ -32,6 +33,7 @@ Control characters do not appear in the menu command labels. You should therefor | /+character | slash+character | Add character as shortcut | + ## Parameter You can associate a custom parameter with each menu item. A menu item parameter is a character string whose contents can be freely chosen. It can be set in the Menu editor, or through the `SET MENU ITEM PARAMETER` command. @@ -44,7 +46,7 @@ Each menu command can have a project method or a standard action attached to it. If you do not assign a method or a standard action to a menu command, choosing that menu command causes 4D to exit the Application environment and go to the Design environment. If only the Application environment is available, this means quitting to the Desktop. -Standard actions can be used to carry out various current operations linked to system functions (copy, quit, etc.) or to those of the 4D database (add record, select all, etc.). +Standard actions can be used to carry out various current operations linked to system functions (copy, quit, etc.) or to those of the database (add record, select all, etc.). You can assign both a standard action and a project method to a menu command. In this case, the standard action is never executed; however, 4D uses this action to enable/disable the menu command according to the current context and to associate a specific operation with it according to the platform. When a menu command is deactivated, the associated project method cannot be executed. @@ -53,14 +55,12 @@ The choice between associating a standard action or a project method with a menu ### Associating a project method or a standard action You can assign a project method and/or a standard action to a selected menu command in the Menu editor: - - **Method Name**: Select an existing project method name in the combo box. If the project method does not exist, enter its name in the "Method Name" combo box then click on the [...] button. 4D displays a project method creation dialog that is used to access the Method editor. - **Associated Standard Action**: Choose or write the action you want to assign in the "Associated Standard Action" combo box. You can enter any supported action and (optionally) parameter you want in the area. For a comprehensive list of standard actions, please refer to the **Standard actions** section in the *Design Reference*. **Note for macOS:** Under macOS, the custom menu commands associated with the *Quit* action are automatically placed in the application menu, in compliance with the platform interface standards. Using the 4D language, you can associate a project method using the `SET MENU ITEM METHOD` command, and a standard action using the `SET MENU ITEM PROPERTY` command. ### Start a new process - The **Start a New Process** option is available for menu commands associated to methods. It can be set through a check box in the Menu editor, or through the *property* parameter of the `SET MENU ITEM PROPERTY` command. When the **Start a New Process** option is enabled, a new process is created when the menu command is chosen. Normally, a method attached to a menu command executes within the current process unless you explicitly call a new process in your code. The **Start a New Process** option makes it easier to start a new process. When enabled, 4D will create a new process when the menu command is chosen. @@ -68,11 +68,11 @@ When the **Start a New Process** option is enabled, a new process is created whe In the Process list, 4D assigns the new process a default name using the format "ML_ProcessNumber". The names of processes started from a menu are created by combining the prefix "ML_" with the process number. ### Execute without validating - The **Execute without validating** option is available for menu commands associated to standard actions in the Menu editor only. When this option is checked, 4D does not trigger the "validation" of the field where the cursor is located before executing the associated action. This option is mainly intended for **Edit** menu commands. By default, 4D processes and "validates" the contents of a field before executing a standard action (via a menu command or a shortcut), which has the effect of generating an `On Data Change` form event. This can disrupt the functioning of copy or paste type commands because when they are called, the `On Data Change` form event is generated unexpectedly. In this case, it is useful to check the **Execute without validating** option. + ## Remote access privileges This Menu editor option allows defining a group to a menu command so that only users in that group can use the menu command from a 4D remote application (see Users and groups). @@ -91,6 +91,7 @@ In the Menu editor, instead of entering the menu command’s text in the title a In the 4D language, you insert a separator line by entering `-` or `(-` as itemText for `APPEND MENU ITEM`, `INSERT MENU ITEM`, or `SET MENU ITEM` commands. + ### Keyboard shortcuts You can add keyboard shortcuts to any menu command. If a menu command has one of these keyboard shortcuts, users will see it next to the menu command. For example, "Ctrl+C" (Windows) or "Command+C" (macOS) appears next to the **Copy** menu command in the **Edit** menu. @@ -98,13 +99,12 @@ You can add keyboard shortcuts to any menu command. If a menu command has one of You can also add the **Shift** key as well as the **Alt** key (Windows) or **Option** key (macOS) to the shortcut associated with a menu command. This multiplies the number of shortcuts that can be used. The following types of keyboard shortcuts can therefore be defined: - Under Windows: - - Ctrl+character - Ctrl+Shift+character - Ctrl+Alt+character - Ctrl+Shift+Alt+character + - Under macOS: - - Command+character - Command+Shift+character - Command+Option+character @@ -125,7 +125,6 @@ These reserved key combinations are listed in the following table: | Ctrl+Z | Command+Z | Undo | | Ctrl+. (period) | Command+. (period) | Stop action | - 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: @@ -140,12 +139,14 @@ To assign a keyboard shortcut using the 4D language, use the `SET ITEM SHORTCUT` > 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. If you select a picture file that is not already stored in the project resources folder, it is automatically copied in that folder. 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. \ No newline at end of file diff --git a/website/translated_docs/pt/Menus/sdi.md b/website/translated_docs/pt/Menus/sdi.md index 238ed0d429775c..5c1bc6e8f3666e 100644 --- a/website/translated_docs/pt/Menus/sdi.md +++ b/website/translated_docs/pt/Menus/sdi.md @@ -3,13 +3,12 @@ id: sdi title: SDI mode on Windows --- -## Overview 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 +## SDI mode availability The SDI mode is available in the following execution environment only: @@ -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. Check the **Use SDI mode on Windows** option in the "Interface" page of the Settings dialog box. 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. +- If the **Splash screen** interface option was selected in the 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. -### 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/Notes/updates.md b/website/translated_docs/pt/Notes/updates.md new file mode 100644 index 00000000000000..f1286ec8626425 --- /dev/null +++ b/website/translated_docs/pt/Notes/updates.md @@ -0,0 +1,35 @@ +--- +id: updates +title: Documentation updates +--- + +The list of main updates in this documentation. For general information about new features in the 4D products, see the **release notes** on [doc.4d.com](https://doc.4d.com). + +## 4D v19 R2 + +- A [default .gitignore file](Preferences/general.md#create-gitignore-file) can be created with new projects +- New [Blob class API](API/BlobClass.md) to handle new [`4D.Blob` objects](Concepts/dt_blob.md#blob-types) +- `no-bom` support and new default end-of-line characters in [`.setText()`](API/FileClass.md#settext) + + +## 4D v19 + +- [IMAPTransporter Class](API/IMAPTransporterClass.md): new `.createBox()`, `.deleteBox()`, `.renameBox()`, `.subscribe()`, and `.unsubscribe()` functions. +- [File Class](API/FileClass.md): new `setAppInfo()` and `getAppInfo()` functions. +- New [4DEACH](Tags/tags.md#4deach-and-4dendeach) transformation tag. +- Web Server: new [SameSite session cookie](WebServer/webServerConfig.md#session-cookie-samesite) setting. +- Dark and light color scheme support for [forms](FormEditor/properties_FormProperties.md#color-scheme) and [style sheets](FormEditor/createStylesheet.md#media-queries) +- New default dark and light themes in [method editor preferences](Preferences/methods.md#theme-list). +- [Native compilation](Project/compiler.md#compiler-methods-for) for Silicon processors. +- [Variable calculation](FormObjects/properties_Object.md#variable-calculation) property is now supported by entity selection list box columns. +- New, comprehensive [CLI](Admin/cli.md) page. + + +## 4D v18 R6 + +- [Entity Selection Class](API/EntitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/IMAPTransporterClass.md), [POP3 Mail](API/POP3TransporterClass.md) and [SMTP Mail](API/SMTPTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/IMAPTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/SessionClass.md). diff --git a/website/translated_docs/pt/ORDA/datastores.md b/website/translated_docs/pt/ORDA/datastores.md new file mode 100644 index 00000000000000..94c64792aec8e9 --- /dev/null +++ b/website/translated_docs/pt/ORDA/datastores.md @@ -0,0 +1,56 @@ +--- +id: datastores +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). \ No newline at end of file diff --git a/website/translated_docs/pt/ORDA/dsMapping.md b/website/translated_docs/pt/ORDA/dsMapping.md new file mode 100644 index 00000000000000..928f6f42eac9fd --- /dev/null +++ b/website/translated_docs/pt/ORDA/dsMapping.md @@ -0,0 +1,257 @@ +--- +id: dsmapping +title: Data Model Objects +--- + +The ORDA technology is based upon an automatic mapping of an underlying database structure. It also provides access to data through entity and entity selection objects. As a result, ORDA exposes the whole database as a set of data model objects. + + +## Structure mapping + +When you call a datastore using the [`ds`](API/DataStoreClass.md#ds) or the [`Open datastore`](API/DataStoreClass.md#open-datastore) command, 4D automatically references tables and fields of the corresponding 4D structure as properties of the returned [datastore](#datastore) object: + +* Tables are mapped to dataclasses. +* Fields are mapped to storage attributes. +* Relations are mapped to relation attributes - relation names, defined in the Structure editor, are used as relation attribute names. + +![](assets/en/ORDA/datastoreMapping.png) + + +### General rules + +The following rules are applied for any conversions: + +* Table, field, and relation names are mapped to object property names. Make sure that such names comply with general object naming rules, as explained in the [object naming conventions](Concepts/identifiers.md) section. +* A datastore only references tables with a single primary key. The following tables are not referenced: + * Tables without a primary key + * Tables with composite primary keys. +* BLOB fields are automatically available as attributes of the [Blob object](Concepts/dt_blob.md#blob-types) type. + +> ORDA mapping does not take into account: +> - the "Invisible" option for tables or fields, - the virtual structure defined through `SET TABLE TITLES` or `SET FIELD TITLES`, - the "Manual" or "Automatic" property of relations. + + +### Rules for remote access control + +When accessing a remote datastore through the `Open datastore` command or [REST requests](REST/gettingStarted.md), only tables and fields with the **Expose as REST resource** property are available remotely. + +This option must be selected at the 4D structure level for each table and each field that you want to be exposed as dataclass and attribute in the datastore: + +![](assets/en/ORDA/ExposeDataclass.png) + + +### Data model update + +Any modifications applied at the level of the database structure invalidate the current ORDA model layer. These modifications include: + +* adding or removing a table, a field, or a relation +* renaming of a table, a field, or a relation +* changing a core property of a field (type, unique, index, autoincrement, null value support) + +When the current ORDA model layer has been invalidated, it is automatically reloaded and updated in subsequent calls of the local `ds` datastore on 4D and 4D Server. Note that existing references to ORDA objects such as entities or entity selections will continue to use the model from which they have been created, until they are regenerated. + +However, the updated ORDA model layer is not automatically available in the following contexts: + +* a remote 4D application connected to 4D Server -- the remote application must reconnect to the server. +* a remote datastore opened using `Open datastore` or through [REST calls](REST/gettingStarted.md) -- a new session must be opened. + + +## Object definition + +### Datastore + +The datastore is the interface object to a database. It builds a representation of the whole database as object. A datastore is made of a **model** and **data**: + +- The model contains and describes all the dataclasses that make up the datastore. It is independant from the underlying database itself. +- Data refers to the information that is going to be used and stored in this model. For example, names, addresses, and birthdates of employees are pieces of data that you can work with in a datastore. + +When handled through the code, the datastore is an object whose properties are all of the [dataclasses](#dataclass) which have been specifically exposed. + +4D allows you to handle the following datastores: + +- the local datastore, based on the current 4D database, returned by the `ds` command (the main datastore). +- one or more remote datastore(s) exposed as REST resources in remote 4D databases, returned by the `Open datastore` command. + +A datastore references only a single local or remote database. + +The datastore object itself cannot be copied as an object: + +```4d +$mydatastore:=OB Copy(ds) //returns null +``` + + +The datastore properties are however enumerable: + + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds;$prop) + //$prop contains the names of all the dataclasses +``` + + + +The main (default) datastore is always available through the `ds` command, but the `Open datastore` command allows referencing any remote datastore. + +### Dataclass + +A dataclass is the equivalent of a table. It is used as an object model and references all fields as attributes, including relational attributes (attributes built upon relations between dataclasses). Relational attributes can be used in queries like any other attribute. + +All dataclasses in a 4D project are available as a property of the `ds` datastore. For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each exposed table that you want to be exposed as dataclass in the datastore. + +For example, consider the following table in the 4D structure: + +![](assets/en/ORDA/companyTable.png) + +The `Company` table is automatically available as a dataclass in the `ds` datastore. You can write: + +```4d +var $compClass : cs.Company //declares a $compClass object variable of the Company class +$compClass:=ds.Company //assigns the Company dataclass reference to $compClass +``` + +A dataclass object can contain: + +* attributes +* relation attributes + +The dataclass offers an abstraction of the physical database and allows handling a conceptual data model. The dataclass is the only means to query the datastore. A query is done from a single dataclass. Queries are built around attributes and relation attribute names of the dataclasses. So the relation attributes are the means to involve several linked tables in a query. + +The dataclass object itself cannot be copied as an object: + +```4d +$mydataclass:=OB Copy(ds.Employee) //returns null +``` + +The dataclass properties are however enumerable: + +```code4d +ARRAY TEXT($prop;0) +OB GET PROPERTY NAMES(ds.Employee;$prop) +//$prop contains the names of all the dataclass attributes +``` + + +### Attribute + +Dataclass properties are attribute objects describing the underlying fields or relations. For example: + +```4d + $nameAttribute:=ds.Company.name //reference to class attribute + $revenuesAttribute:=ds.Company["revenues"] //alternate way +``` + +This code assigns to `$nameAttribute` and `$revenuesAttribute` references to the name and revenues attributes of the `Company` class. This syntax does NOT return values held inside of the attribute, but instead returns references to the attributes themselves. To handle values, you need to go through [Entities](#entity). + +All eligible fields in a table are available as attributes of their parent [dataclass](#dataclass). For remote datastores accessed through `Open datastore` or [REST requests](REST/gettingStarted.md), the **Expose as REST resource** option must be selected at the 4D structure level for each field that you want to be exposed as a dataclass attribute. + + +#### Storage and Relation attributes + +Dataclass attributes come in several kinds: storage, relatedEntity, and relatedEntities. Attributes that are scalar (*i.e.*, provide only a single value) support all the standard 4D data types (integer, text, object, etc.). + +* A **storage attribute** is equivalent to a field in the 4D database and can be indexed. Values assigned to a storage attribute are stored as part of the entity when it is saved. When a storage attribute is accessed, its value comes directly from the datastore. Storage attributes are the most basic building block of an entity and are defined by name and data type. +* A **relation attribute** provides access to other entities. Relation attributes can result in either a single entity (or no entity) or an entity selection (0 to N entities). Relation attributes are built upon "classic" relations in the relational structure to provide direct access to related entity or related entities. Relation attributes are directy available in ORDA using their names. + +For example, consider the following partial database structure and the relation properties: + +![](assets/en/ORDA/relationProperties.png) + +All storage attributes will be automatically available: + +* in the Project dataclass: "ID", "name", and "companyID" +* in the Company dataclass: "ID", "name", and "discount" + +In addition, the following relation attributes will also be automatically available: + +* in the Project dataclass: **theClient** attribute, of the "relatedEntity" kind; there is at most one Company for each Project (the client) +* in the Company dataclass: **companyProjects** attribute, of the "relatedEntities" kind; for each Company there is any number of related Projects. +> The Manual or Automatic property of a database relation has no effect in ORDA. + +All dataclass attributes are exposed as properties of the dataclass: + +![](assets/en/ORDA/dataclassProperties.png) + +Keep in mind that these objects describe attributes, but do not give access to data. Reading or writing data is done through [entity objects](entities.md#using-entity-attributes). + +#### Computed attributes + +[Computed attributes](ordaClasses.md#computed-attributes) are declared using a `get ` function in the [Entity class definition](ordaClasses.md#entity-class). Their value is not stored but evaluated each time they are accessed. They do not belong to the underlying database structure, but are built upon it and can be used as any attribute of the data model. + + +### Entity + +An entity is the equivalent of a record. It is actually an object that references a record in the database. It can be seen as an instance of a [dataclass](#dataclass), like a record of the table matching the dataclass. However, an entity also contains data correlated to the database related to the datastore. + +The purpose of the entity is to manage data (create, update, delete). When an entity reference is obtained by means of an entity selection, it also retains information about the entity selection which allows iteration through the selection. + +The entity object itself cannot be copied as an object: + +```4d + $myentity:=OB Copy(ds.Employee.get(1)) //returns null +``` + +The entity properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.get(1);$prop) + //$prop contains the names of all the entity attributes +``` + + +### Entity selection + +An entity selection is an object containing one or more reference(s) to entities belonging to the same dataclass. It is usually created as a result of a query or returned from a relation attribute. An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass. + +Example: + +```4d +var $e : cs.EmployeeSelection //declares a $e object variable of the EmployeeSelection class type +$e:=ds.Employee.all() //assigns the resulting entity selection reference to the $e variable +``` + +Entity selections can be: + +- "shareable" or "non-shareable", +- "sorted" or "unsorted". + +These points are discussed below. + +The entity selection object itself cannot be copied as an object: + +```4d + $myentitysel:=OB Copy(ds.Employee.all()) //returns null +``` + +The entity selection properties are however enumerable: + +```4d + ARRAY TEXT($prop;0) + OB GET PROPERTY NAMES(ds.Employee.all();$prop) + //$prop contains the names of the entity selection properties + //("length", 00", "01"...) +``` + + +#### Ordered or unordered entity selection + +For optimization reasons, by default 4D ORDA usually creates unordered entity selections, except when you use the `orderBy( )` method or use specific options. In this documentation, unless specified, "entity selection" usually refers to an "unordered entity selection". + +Ordered entity selections are created only when necessary or when specifically requested using options, i.e. in the following cases: + +* result of an `orderBy()` on a selection (of any type) or an `orderBy()` on a dataclass +* result of the `newSelection()` method with the `dk keep ordered` option + +Unordered entity selections are created in the following cases: + +* result of a standard `query()` on a selection (of any type) or a `query()` on a dataclass, +* result of the `newSelection()` method without option, +* result of any of the comparison methods, whatever the input selection types: `or()`, `and()`, `minus()`. +> The following entity selections are always **ordered**: +> +> * entity selections returned by 4D Server to a remote client +> * entity selections built upon remote datastores. + +Note that when an ordered entity selection becomes an unordered entity selection, any repeated entity references are removed. diff --git a/website/translated_docs/pt/ORDA/entities.md b/website/translated_docs/pt/ORDA/entities.md new file mode 100644 index 00000000000000..3f67b740a08903 --- /dev/null +++ b/website/translated_docs/pt/ORDA/entities.md @@ -0,0 +1,495 @@ +--- +id: entities +title: Working with data +--- + +In ORDA, you access data through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). These objects allow you to create, update, query, or sort the data of the datastore. + + +## Creating an entity + +There are two ways to create a new entity in a dataclass: + +* Since entities are references to database records, you can create entities by creating records using the "classic" 4D language and then reference them with ORDA methods such as `entity.next( )` or `entitySelection.first( )`. +* You can also create an entity using the `dataClass.new( )` method. + +Keep in mind that the entity is only created in memory. If you want to add it to the datastore, you must call the `entity.save( )` method. + +Entity attributes are directly available as properties of the entity object. For more information, please refer to [Using entity attributes](#using-entity-attributes). + +For example, we want to create a new entity in the "Employee" dataclass in the current datastore with "John" and "Dupont" assigned to the firstname and name attributes: + +```4d +var $myEntity : cs.EmployeeEntity +$myEntity:=ds.Employee.new() //Create a new object of the entity type +$myEntity.name:="Dupont" //assign 'Dupont' to the 'name' attribute +$myEntity.firstname:="John" //assign 'John' to the 'firstname' attribute +$myEntity.save() //save the entity +``` +> An entity is defined only in the process where it was created. You cannot, for example, store a reference to an entity in an interprocess variable and use it in another process. + +## Entities and references + +An entity contains a reference to a 4D record. Different entities can reference the same 4D record. Also, since an entity can be stored in a 4D object variable, different variables can contain a reference to the same entity. + +If you execute the following code: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) //access the employee with ID 1 + $e2:=$e1 + $e1.name:="Hammer" + //both variables $e1 and $e2 share the reference to the same entity + //$e2.name contains "Hammer" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef1.png) + +Now if you execute: + +```4d + var $e1; $e2 : cs.EmployeeEntity + $e1:=ds.Employee.get(1) + $e2:=ds.Employee.get(1) + $e1.name:="Hammer" + //variable $e1 contains a reference to an entity + //variable $e2 contains another reference to another entity + //$e2.name contains "smith" +``` + +This is illustrated by the following graphic: + +![](assets/en/ORDA/entityRef2.png) + +Note however that entities refer to the same record. In all cases, if you call the `entity.save( )` method, the record will be updated (except in case of conflict, see [Entity locking](#entity-locking)). + +In fact, `$e1` and `$e2` are not the entity itself, but a reference to the entity. It means that you can pass them directly to any function or method, and it will act like a pointer, and faster than a 4D pointer. For example: + +```4d + For each($entity;$selection) + do_Capitalize($entity) + End for each +``` + +And the method is: + +```4d + $entity:=$1 + $name:=$entity.lastname + If(Not($name=Null)) + $name:=Uppercase(Substring($name;1;1))+Lowercase(Substring($name;2)) + End if + $entity.lastname:=$name +``` + +You can handle entities like any other object in 4D and pass their references directly as [parameters](Concepts/parameters.md). +> With the entities, there is no concept of "current record" as in the classic 4D language. You can use as many entities as you need, at the same time. There is also no automatic lock on an entity (see [Entity locking](#entity-locking)). When an entity is loaded, it uses the [lazy loading](glossary.md#lazy-loading) mechanism, which means that only the needed information is loaded. Nevertheless, in client/server, the entity can be automatically loaded directly if necessary. + + +## Using entity attributes + +Entity attributes store data and map corresponding fields in the corresponding table. Entity attributes of the storage kind can be set or get as simple properties of the entity object, while entity of the **relatedEntity** or **relatedEntities** kind will return an entity or an entity selection. +> For more information on the attribute kind, please refer to the [Storage and Relation attributes](dsMapping.md#storage-and-relation-attributes) paragraph. + +For example, to set a storage attribute: + +```4d + $entity:=ds.Employee.get(1) //get employee attribute with ID 1 + $name:=$entity.lastname //get the employee name, e.g. "Smith" + $entity.lastname:="Jones" //set the employee name + $entity.save() //save the modifications +``` + +> Database Blob fields ([scalar blobs](Concepts/blob.md) are automatically converted to and from blob object attributes ([`4D.Blob`](Concepts/blob.md)) when handled through ORDA. When saving a blob object attribute, keep in mind that, unlike blob object size which is only limited by the available memory, Blob field size is limited to 2GB. + +Accessing a related attribute depends on the attribute kind. For example, with the following structure: + +![](assets/en/ORDA/entityAttributes.png) + +You can access data through the related object(s): + +```4d + $entity:=ds.Project.all().first().theClient //get the Company entity associated to the project + $EntitySel:=ds.Company.all().first().companyProjects //get the selection of projects for the company +``` + +Note that both *theClient* and *companyProjects* in the above example are primary relation attributes and represent a direct relationship between the two dataclasses. However, relation attributes can also be built upon paths through relationships at several levels, including circular references. For example, consider the following structure: + +![](assets/en/ORDA/entityAttributes2.png) + +Each employee can be a manager and can have a manager. To get the manager of the manager of an employee, you can simply write: + +```4d + $myEmp:=ds.Employee.get(50) + $manLev2:=$myEmp.manager.manager.lastname +``` + +## Assigning values to relation attributes + +In the ORDA architecture, relation attributes directly contain data related to entities: + +* An N->1 type relation attribute (**relatedEntity** kind) contains an entity +* A 1->N type relation attribute (**relatedEntities** kind) contains an entity selection + +Let's look at the following (simplified) structure: + +![](assets/en/ORDA/entityAttributes3.png) + +In this example, an entity in the "Employee" dataclass contains an object of type Entity in the "employer" attribute (or a null value). An entity in the "Company" dataclass contains an object of type EntitySelection in the "staff" attribute (or a null value). +> In ORDA, the Automatic or Manual property of relations has no effect. + +To assign a value directly to the "employer" attribute, you must pass an existing entity from the "Company" dataclass. For example: + +```4d + $emp:=ds.Employee.new() // create an employee + $emp.lastname:="Smith" // assign a value to an attribute + $emp.employer:=ds.Company.query("name =:1";"4D")[0] //assign a company entity + $emp.save() +``` + +4D provides an additional facility for entering a relation attribute for an N entity related to a "1" entity: you pass the primary key of the "1" entity directly when assigning a value to the relation attribute. For this to work, you pass data of type Number or Text (the primary key value) to the relation attribute. 4D then automatically takes care of searching for the corresponding entity in the dataclass. For example: + +```4d + $emp:=ds.Employee.new() + $emp.lastname:="Wesson" + $emp.employer:=2 // assign a primary key to the relation attribute + //4D looks for the company whose primary key (in this case, its ID) is 2 + //and assigns it to the employee + $emp.save() +``` + +This is particularly useful when you are importing large amounts of data from a relational database. This type of import usually contains an "ID" column, which references a primary key that you can then assign directly to a relation attribute. + +This also means that you can assign primary keys in the N entities without corresponding entities having already been created in the 1 datastore class. If you assign a primary key that does not exist in the related datastore class, it is nevertheless stored and assigned by 4D as soon as this "1" entity is created. + +You can assign or modify the value of a "1" related entity attribute from the "N" dataclass directly through the related attribute. For example, if you want to modify the name attribute of a related Company entity of an Employee entity, you can write: + +```code4d + $emp:=ds.Employee.get(2) // load the Employee entity with primary key 2 + $emp.employer.name:="4D, Inc." //modify the name attribute of the related Company + $emp.employer.save() //save the related attribute + //the related entity is updated +``` + +## Creating an entity selection + +You can create an object of type [entity selection](dsMapping.md#entity-selection) as follows: + +* Querying the entities [in a dataclass](API/DataClassClass.md#query) or in an [existing entity selection](API/EntitySelectionClass.md#query); +* Using the [`.all()`](API/DataClassClass.md#all) dataclass function to select all the entities in a dataclass; +* Using the `Create entity selection` command or the [`.newSelection()`](API/DataClassClass.md#newselection) dataclass function to create a blank entity selection; +* Using the [`.copy()`](API/EntitySelectionClass.md#copy) function to duplicate an existing entity selection; +* Using one of the various functions from the [Entity selection class](API/EntitySelectionClass.md) that returns a new entity selection, such as [`.or()`](API/EntitySelectionClass.md#or); +* Using a relation attribute of type "related entities" (see below). + +You can simultaneously create and use as many different entity selections as you want for a dataclass. Keep in mind that an entity selection only contains references to entities. Different entity selections can contain references to the same entities. + +### Shareable or alterable entity selections + +An entity selection can be **shareable** (readable by multiple processes, but not alterable after creation) or **alterable** (supports the [`.add()`](API/EntitySelectionClass.md#add) function, but only usable by the current process). + +#### Properties + +A **shareable** entity selection has the following characteristics: + +- it can be stored in a shared object or shared collection, and can be passed as parameter between several processes or workers; +- it can be stored in several shared objects or collections, or in a shared object or collection which already belongs to a group (it does not have a *locking identifier*); +- it does not allow the addition of new entities. Trying to add an entity to a shareable entity selection will trigger an error (1637 - This entity selection cannot be altered). To add an entity to a shareable entity selection, you must first transform it into a non-shareable entity selection using the [`.copy()`](API/EntitySelectionClass.md#copy) function, before calling [`.add()`](API/EntitySelectionClass.md#add). + +> Most entity selection functions (such as [`.slice()`](API/EntitySelectionClass.md#slice), [`.and()`](API/EntitySelectionClass.md#and)...) support shareable entity selections since they do not need to alter the original entity selection (they return a new one). + +An **alterable** entity selection has the following characteristics: + +- it cannot be shared between processes, nor be stored in a shared object or collection. Trying to store a non-shareable entity selection in a shared object or collection will trigger an error (-10721 - Not supported value type in a shared object or shared collection); +- it accepts the addition of new entities, i.e. it is supports the [`.add()`](API/EntitySelectionClass.md#add) function. + + +#### How are they defined? + +The **shareable** or **alterable** nature of an entity selection is defined when the entity selection is created (it cannot be modified afterwards). You can know the nature of an entity selection using the [.isAlterable()](API/EntitySelectionClass.md#isalterable) function or the `OB Is shared` command. + + +A new entity selection is **shareable** in the following cases: + +- the new entity selection results from an ORDA class function applied to a dataClass: [dataClass.all()](API/DataClassClass.md#all), [dataClass.fromCollection()](API/DataClassClass.md#fromcollection), [dataClass.query()](API/DataClassClass.md#query), +- the new entity selection is based upon a relation [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute but the entity does not belong to an entity selection. +- the new entity selection is explicitely copied as shareable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. with the `ck shared` option). + +Example: +```4d +$myComp:=ds.Company.get(2) //$myComp does not belong to an entity selection +$employees:=$myComp.employees //$employees is shareable +``` + +A new entity selection is **alterable** in the following cases: + +- the new entity selection created blank using the [dataClass.newSelection()](API/DataClassClass.md#newselection) function or `Create entity selection` command, +- the new entity selection is explicitely copied as alterable with [entitySelection.copy()](API/EntitySelectionClass.md#copy) or `OB Copy` (i.e. without the `ck shared` option). + +Example: +```4d +$toModify:=ds.Company.all().copy() //$toModify is alterable +``` + + +A new entity selection **inherits** from the original entity selection nature in the following cases: + +- the new entity selection results from one of the various ORDA class functions applied to an existing entity selection ([.query()](API/EntitySelectionClass.md#query), [.slice()](API/EntitySelectionClass.md#slice), etc.) . +- the new entity selection is based upon a relation: + - [entity.*attributeName*](API/EntityClass.md#attributename) (e.g. "company.employees") when *attributeName* is a one-to-many related attribute and the entity belongs to an entity selection (same nature as [.getSelection()](API/EntityClass.md#getselection) entity selection), + - [entitySelection.*attributeName*](API/EntitySelectionClass.md#attributename) (e.g. "employees.employer") when *attributeName* is a related attribute (same nature as the entity selection), + - [.extract()](API/EntitySelectionClass.md#extract) when the resulting collection contains entity selections (same nature as the entity selection). + +Examples: + +```4d +$highSal:=ds.Employee.query("salary >= :1"; 1000000) + //$highSal is shareable because of the query on dataClass +$comp:=$highSal.employer //$comp is shareable because $highSal is shareable + +$lowSal:=ds.Employee.query("salary <= :1"; 10000).copy() + //$lowSal is alterable because of the copy() +$comp2:=$lowSal.employer //$comp2 is alterable because $lowSal is alterable +``` + + +#### Sharing an entity selection between processes (example) + +You work with two entity selections that you want to pass to a worker process so that it can send mails to appropriate persons: + +```4d + +var $paid; $unpaid : cs.InvoicesSelection +//We get entity selections for paid and unpaid invoices +$paid:=ds.Invoices.query("status=:1"; "Paid") +$unpaid:=ds.Invoices.query("status=:1"; "Unpaid") + +//We pass entity selection references as parameters to the worker +CALL WORKER("mailing"; "sendMails"; $paid; $unpaid) + +``` + +The `sendMails` method: + +```4d + + #DECLARE ($paid : cs.InvoicesSelection; $unpaid : cs.InvoicesSelection) + var $invoice : cs.InvoicesEntity + + var $server; $transporter; $email; $status : Object + + //Prepare emails + $server:=New object() + $server.host:="exchange.company.com" + $server.user:="myName@company.com" + $server.password:="my!!password" + $transporter:=SMTP New transporter($server) + $email:=New object() + $email.from:="myName@company.com" + + //Loops on entity selections + For each($invoice;$paid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Payment OK for invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each + + For each($invoice;$unpaid) + $email.to:=$invoice.customer.address // email address of the customer + $email.subject:="Please pay invoice # "+String($invoice.number) + $status:=$transporter.send($email) + End for each +``` + + +### Entity selections and Storage attributes + +All storage attributes (text, number, boolean, date) are available as properties of entity selections as well as entities. When used in conjunction with an entity selection, a scalar attribute returns a collection of scalar values. For example: + +```4d + $locals:=ds.Person.query("city = :1";"San Jose") //entity selection of people + $localEmails:=$locals.emailAddress //collection of email addresses (strings) +``` + +This code returns in *$localEmails* a collection of email addresses as strings. + +### Entity selections and Relation attributes + +In addition to the variety of ways you can query, you can also use relation attributes as properties of entity selections to return new entity selections. For example, consider the following structure: + +![](assets/en/ORDA/entitySelectionRelationAttributes.png) + +```4d + $myParts:=ds.Part.query("ID < 100") //Return parts with ID less than 100 + $myInvoices:=$myParts.invoiceItems.invoice + //All invoices with at least one line item related to a part in $myParts +``` + +The last line will return in $myInvoices an entity selection of all invoices that have at least one invoice item related to a part in the entity selection myParts. When a relation attribute is used as a property of an entity selection, the result is always another entity selection, even if only one entity is returned. When a relation attribute is used as a property of an entity selection and no entities are returned, the result is an empty entity selection, not null. + + +## Entity Locking + +You often need to manage possible conflicts that might arise when several users or processes load and attempt to modify the same entities at the same time. Record locking is a methodology used in relational databases to avoid inconsistent updates to data. The concept is to either lock a record upon read so that no other process can update it, or alternatively, to check when saving a record to verify that some other process hasn’t modified it since it was read. The former is referred to as **pessimistic record locking** and it ensures that a modified record can be written at the expense of locking records to other users. The latter is referred to as **optimistic record locking** and it trades the guarantee of write privileges to the record for the flexibility of deciding write privileges only if the record needs to be updated. In pessimistic record locking, the record is locked even if there is no need to update it. In optimistic record locking, the validity of a record’s modification is decided at update time. + +ORDA provides you with two entity locking modes: + +- an automatic "optimistic" mode, suitable for most applications, +- a "pessimistic" mode allowing you to lock entities prior to their access. + +### Automatic optimistic lock + +This automatic mechanism is based on the concept of "optimistic locking" which is particularly suited to the issues of web applications. This concept is characterized by the following operating principles: + +* All entities can always be loaded in read-write; there is no *a priori* "locking" of entities. +* Each entity has an internal locking stamp that is incremented each time it is saved. +* When a user or process tries to save an entity using the `entity.save( )` method, 4D compares the stamp value of the entity to be saved with that of the entity found in the data (in the case of a modification): + * When the values match, the entity is saved and the internal stamp value is incremented. + * When the values do not match, it means that another user has modified this entity in the meantime. The save is not performed and an error is returned. + +The following diagram illustrates optimistic locking: + +1. Two processes load the same entity.

            ![](assets/en/ORDA/optimisticLock1.png) + +2. The first process modifies the entity and validates the change. The `entity.save( )` method is called. The 4D engine automatically compares the internal stamp value of the modified entity with that of the entity stored in the data. Since they match, the entity is saved and its stamp value is incremented.

            ![](assets/en/ORDA/optimisticLock2.png) + +3. The second process also modifies the loaded entity and validates its changes. The `entity.save( )` method is called. Since the stamp value of the modified entity does not match the one of the entity stored in the data, the save is not performed and an error is returned.

            ![](assets/en/ORDA/optimisticLock3.png) + + +This can also be illustrated by the following code: + +```4d + $person1:=ds.Person.get(1) //Reference to entity + $person2:=ds.Person.get(1) //Other reference to same entity + $person1.name:="Bill" + $result:=$person1.save() //$result.success=true, change saved + $person2.name:="William" + $result:=$person2.save() //$result.success=false, change not saved +``` + +In this example, we assign to $person1 a reference to the person entity with a key of 1. Then, we assign another reference of the same entity to variable $person2. Using $person1, we change the first name of the person and save the entity. When we attempt to do the same thing with $person2, 4D checks to make sure the entity on disk is the same as when the reference in $person1 was first assigned. Since it isn't the same, it returns false in the success property and doesn’t save the second modification. + +When this situation occurs, you can, for example, reload the entity from the disk using the `entity.reload()` method so that you can try to make the modification again. The `entity.save()` method also proposes an "automerge" option to save the entity in case processes modified attributes that were not the same. + +> Record stamps are not used in **transactions** because only a single copy of a record exists in this context. Whatever the number of entities that reference a record, the same copy is modified thus `entity.save()` operations will never generate stamp errors. + +### Pessimistic lock + +You can lock and unlock entities on demand when accessing data. When an entity is getting locked by a process, it is loaded in read/write in this process but it is locked for all other processes. The entity can only be loaded in read-only mode in these processes; its values cannot be edited or saved. + +This feature is based upon two methods of the `Entity` class: + +* `entity.lock()` +* `entity.unlock()` + +For more information, please refer to the descriptions for these methods. + + +### Concurrent use of 4D classic locks and ORDA pessimistic locks + +Using both classic and ORDA commands to lock records is based upon the following principles: + +* A lock set with a classic 4D command on a record prevents ORDA to lock the entity matching the record. +* A lock set with ORDA on an entity prevents classic 4D commands to lock the record matching the entity. + +These principles are shown in the following diagram: + +![](assets/en/ORDA/concurrent1.png) + +**Transaction locks** also apply to both classic and ORDA commands. In a multiprocess or a multi-user application, a lock set within a transaction on a record by a classic command will result in preventing any other processes to lock entities related to this record (or conversely), until the transaction is validated or canceled. + +* Example with a lock set by a classic command:

            ![](assets/en/ORDA/concurrent2.png) +* Example with a lock set by an ORDA method:

            ![](assets/en/ORDA/concurrent3.png) + + + +## Client/server optimization + +4D provides an automatic optimization for ORDA requests that use entity selections or load entities in client/server configurations. This optimization speeds up the execution of your 4D application by reducing drastically the volume of information transmitted over the network. + +The following optimization mechanisms are implemented: + +* When a client requests an entity selection from the server, 4D automatically "learns" which attributes of the entity selection are actually used on the client side during the code execution, and builds a corresponding "optimization context". This context is attached to the entity selection and stores the used attributes. It will be dynamically updated if other attributes are used afterwards. + +* Subsequent requests sent to the server on the same entity selection automatically reuse the optimization context and only get necessary attributes from the server, which accelerates the processing. For example in an entity selection-based list box, the learning phase takes place during the display of the first rows, next rows display is very optimized. + +* An existing optimization context can be passed as a property to another entity selection of the same dataclass, thus bypassing the learning phase and accelerating the application (see [Using the context property](#using-the-context-property) below). + +The following methods automatically associate the optimization context of the source entity selection to the returned entity selection: + +* `entitySelection.and()` +* `entitySelection.minus()` +* `entitySelection.or()` +* `entitySelection.orderBy()` +* `entitySelection.slice()` +* `entitySelection.drop()` + + + +**Example** + +Given the following code: + +```4d + $sel:=$ds.Employee.query("firstname = ab@") + For each($e;$sel) + $s:=$e.firstname+" "+$e.lastname+" works for "+$e.employer.name // $e.employer refers to Company table + End for each +``` + +Thanks to the optimization, this request will only get data from used attributes (firstname, lastname, employer, employer.name) in *$sel* after a learning phase. + + + +### Using the context property + +You can increase the benefits of the optimization by using the **context** property. This property references an optimization context "learned" for an entity selection. It can be passed as parameter to ORDA methods that return new entity selections, so that entity selections directly request used attributes to the server and bypass the learning phase. + +A same optimization context property can be passed to unlimited number of entity selections on the same dataclass. All ORDA methods that handle entity selections support the **context** property (for example `dataClass.query( )` or `dataClass.all( )` method). Keep in mind, however, that a context is automatically updated when new attributes are used in other parts of the code. Reusing the same context in different codes could result in overloading the context and then, reduce its efficiency. +> A similar mechanism is implemented for entities that are loaded, so that only used attributes are requested (see the `dataClass.get( )` method). + + + +**Example with `dataClass.query( )` method:** + +```4d + var $sel1; $sel2; $sel3; $sel4; $querysettings; $querysettings2 : Object + var $data : Collection + $querysettings:=New object("context";"shortList") + $querysettings2:=New object("context";"longList") + + $sel1:=ds.Employee.query("lastname = S@";$querysettings) + $data:=extractData($sel1) // In extractData method an optimization is triggered and associated to context "shortList" + + $sel2:=ds.Employee.query("lastname = Sm@";$querysettings) + $data:=extractData($sel2) // In extractData method the optimization associated to context "shortList" is applied + + $sel3:=ds.Employee.query("lastname = Smith";$querysettings2) + $data:=extractDetailedData($sel3) // In extractDetailedData method an optimization is triggered and associated to context "longList" + + $sel4:=ds.Employee.query("lastname = Brown";$querysettings2) + $data:=extractDetailedData($sel4) // In extractDetailedData method the optimization associated to context "longList" is applied +``` + +### Entity selection-based list box + +Entity selection optimization is automatically applied to entity selection-based list boxes in client/server configurations, when displaying and scrolling a list box content: only the attributes displayed in the list box are requested from the server. + +A specific "page mode" context is also provided when loading the current entity through the **Current item** property expression of the list box (see [Collection or entity selection type list boxes](FormObjects/listbox_overview.md#list-box-types)). This feature allows you to not overload the list box initial context in this case, especially if the "page" requests additional attributes. Note that only the use of **Current item** expression will create/use the page context (access through `entitySelection\[index]` will alter the entity selection context). + +Subsequent requests to server sent by entity browsing methods will also support this optimization. The following methods automatically associate the optimization context of the source entity to the returned entity: + +* `entity.next( )` +* `entity.first( )` +* `entity.last( )` +* `entity.previous( )` + +For example, the following code loads the selected entity and allows browsing in the entity selection. Entities are loaded in a separate context and the list box initial context is left untouched: + +```4d + $myEntity:=Form.currentElement //current item expression + //... do something + $myEntity:=$myEntity.next() //loads the next entity using the same context +``` diff --git a/website/translated_docs/pt/ORDA/glossary.md b/website/translated_docs/pt/ORDA/glossary.md new file mode 100644 index 00000000000000..ae2df2ab84d468 --- /dev/null +++ b/website/translated_docs/pt/ORDA/glossary.md @@ -0,0 +1,210 @@ +--- +id: glossary +title: Glossary +--- + +## Main concepts at a glance + +![](assets/en/ORDA/mainConcepts.png) + + + +## Attribute + +An attribute is the smallest storage cell in a relational database (see also [Relation attribute](#relation-attribute)). Do not confuse dataclass attributes and entity attributes: + +* In a dataclass object, each property is a dataclass attribute that maps to a corresponding field in the corresponding table (same name and type). +* In an entity object, entity attributes are properties that contain values for the corresponding datastore attributes. +> *Attributes* and *properties* are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## AttributePath + +An attributePath is the path of an attribute inside a given dataclass or entity. See also [PropertyPath](#propertyPath). + + +## Class code + +Code for the user class function(s). + + +## Computed attribute + +A computed attribute doesn't actually store information. Instead, it determines its value based on other values from the same entity or from other entities, attributes or functions. When a computed attribute is referenced, the underlying "computation" is evaluated to determine the value. Computed attributes may even be assigned values where user-defined code determines what to do during the assignment. + +## Data model class + +Extended class available for a data model object. + +## Data model object + +Database objects available through the ORDA concept, i.e. datastore, dataclasses, entities and entity selections. + +## Data model function + +Function of an ORDA data model class. + +## Dataclass + +A dataclass is an object model that describes the data. Tables in the database provided by the datastore are handled through dataclasses. Each table in the database provided by the datastore has a corresponding dataclass with the same name. Each field of the table is an attribute of the dataclass. + +A dataclass is related to a single datastore. + + +## DataClass class + +Class for specific dataclass objects, in which you can add custom functions. + +## Datastore + +A datastore is the interface object provided by ORDA to reference a structure and access its data. The main database, returned by the `ds` command, is available as a datastore (the main datastore). + +A datastore provides: + +* a connection to the 4D database +* a set of dataclasses to work with the database + +The database can be a 4D local database (the Main datastore), or a 4D Server database exposed as REST resource (a Remote datastore). + +A datastore references only a single database. It is, however, possible to open several datastores to access several databases. + +## DataStore class + +Class for datastore objects, in which you can add custom functions. + + +## DataStoreImplementation + +Internal name of the generic DataStore class in the `4D` class store. + +## Deep copy + +A deep copy duplicates an object and all the references it contains. After a deep copy, a copied collection contains duplicated elements and thus, new references, of all of the orginal elements. See also Shallow copy. + +## ds + +`ds` is the 4D language command that returns a [datastore](dsMapping.md#datastore) object reference. It matches the datastore available upon the 4D main database. + +## Entity + +An entity is an object that corresponds to a dataclass model. An entity contains the same attributes as the dataclass. + +An entity can be seen as an instance of the dataclass, like a record of the table matching the dataclass in its associated datastore. However, an entity also contains related data. The purpose of the entity is to manage data (create, update, delete). + +For more information, see Entities. + +## Entity selection + +An entity selection is an object. When querying the datastore, an entity selection is returned. An entity selection is a set of references to entities related to the same dataclass. + +An entity selection contains: + +* a set of 0 to X entity references, +* a length property (always), +* queryPlan and queryPath properties (if asked while querying). + +An entity selection can also be empty. + + +## Generic class + +Built-in class for ORDA objects such as entities, or dataclasses. Functions and properties of generic classes are automatically available in user extended classes, e.g. `EmployeeEntity`. + + +## Lazy loading + +Since entities are managed as references, data is loaded only when necessary, i.e. when accessing it in the code or through interface widgets. This optimization principle is called lazy loading. + +## Main datastore + +The Datastore object matching the opened 4D database (standalone or client/server). The main datastore is returned by the ds command. + +## Method + +ORDA objects such as datastores, dataclasses, entity selections, and entities, define classes of objects. They provide specific methods to directly interact with them. These methods are also called member functions. Such methods are used by calling them on an instance of the object. + +For example, the `query()` method is a dataclass member function. If you have stored a dataclass object in the `$myClass` variable, you can write: + +```code4d +$myClass.query("name = smith") +``` + +## Mixed data type + +In this documentation, "Mixed" data type is used to designate the various type of values that can be stored within dataclass attributes. It includes: + +* number +* text +* null +* boolean +* date +* object +* collection +* picture(\*) + +*(\*) picture type is not supported by statistical methods such as* `entitySelection.max( )`. + +## Optimistic Lock + +In "optimistic lock" mode, entities are not locked explicitly before updating them. Each entity has an internal stamp that is automatically incremented each time the entity is saved on disk. The entity.save( ) or entity.drop( ) methods will return an error if the stamp of the loaded entity (in memory) and the stamp of the entity on disk do not match, or if the entity has been dropped. Optimistic locking is only available in ORDA implementation. See also "Pessimistic lock". + +## Pessimistic Lock + +A "pessimistic lock" means that an entity is locked prior to its being accessed, using the entity.lock( ) method. Other processes can neither update nor drop the entity until it is unlocked. The classic 4D language only allows pessimistic locks. See "Optimistic lock". + +## Property + +See [Attribute](#attribute). +> Attributes and properties are similar concepts. "Attribute" is used to designate dataclass properties that store data, while "property" is more generic and defines a piece of data stored within an object. + +## PropertyPath + +A propertyPath is the path to a property in a given object. If the property is nested in several levels, each level separated is by a dot ("."). + +## Regular class + +User class not related to an ORDA object. + +## Related dataclass + +These are dataclasses linked by relation attributes. + +## Relation attribute + +Relation attributes are used to conceptualize relations between dataclasses (many-to-one and one-to-many). + +* Many-to-one relation (dataclassA references an occurrence of dataclassB): a relation attribute is available in dataclassA and references one instance of dataclassB. +* One-to-many relation (an occurence of dataclassB references several occurrences of dataclassA): a relation attribute is available in dataclassB and references several instances of dataclassA. + +A dataclass can have recursive relation attributes. + +In an entity, the value of a relation attribute can be an entity or an entity selection. + +## Related entities + +A related entity can be seen as the instance of a relation attribute in a dataclass. + +Entity selections may refer to related entities according to the relation attributes defined in the corresponding dataclasses. + +## Remote datastore + +A 4D database opened on a 4D or 4D Server (available through HTTP) and exposed as a REST resource. This database can be referenced locally as a Datastore from other workstations, where it is assigned a locaID. The remote datastore can be used through ORDA concepts (datastore, dataclass, entity selection...). This use is submitted to a licencing system. + +## Session + +When the 4D application connects to a Remote datastore, a session is created on the 4D Server (HTTP). A session cookie is generated and associated to the local datastore id. + +Each time a new session is opened, a license is used. Each time a session is closed, the license is freed. + +Inactive sessions are automatically closed after a timeout. The default timeout is 48 hours, it can be set by the developer (it must be >= 60 minutes). + +## Shallow copy + +A shallow copy only duplicates the structure of elements, and keeps the same internal references. After a shallow copy, two collections will both share the individual elements. See also Deep copy. + +## Stamp + +Used in "optimistic" locking technology. All entities have an internal counter, the stamp, which is incremented each time the entity is saved. By automatically comparing stamps between an entity being saved and its version stored on disk, 4D can prevent concurrent modifications on the same entities. + +## Storage attribute + +A storage attribute (sometimes referred to as a scalar attribute) is the most basic type of attribute in a datastore class and most directly corresponds to a field in a relational database. A storage attribute holds a single value for each entity in the class. diff --git a/website/translated_docs/pt/ORDA/ordaClasses.md b/website/translated_docs/pt/ORDA/ordaClasses.md new file mode 100644 index 00000000000000..2f2410194fd8ca --- /dev/null +++ b/website/translated_docs/pt/ORDA/ordaClasses.md @@ -0,0 +1,821 @@ +--- +id: ordaClasses +title: Data Model Classes +--- + + + +ORDA allows you to create high-level class functions above the data model. This allows you to write business-oriented code and "publish" it just like an API. Datastore, dataclasses, entity selections, and entities are all available as class objects that can contain functions. + +For example, you could create a `getNextWithHigherSalary()` function in the `EmployeeEntity` class to return employees with a salary higher than the selected one. It would be as simple as calling: + +```4d +$nextHigh:=ds.Employee(1).getNextWithHigherSalary() +``` + +Developers can not only use these functions in local datastores, but also in client/server and remote architectures (see the full example [below](#example-with-remote-datastore)): + +```4d + //$cityManager is the reference of a remote datastore +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) +``` + +Thanks to this feature, the entire business logic of your 4D application can be stored as a independent layer so that it can be easily maintained and reused with a high level of security: + +- You can "hide" the overall complexity of the underlying physical structure and only expose understandable and ready-to-use functions. + +- If the physical structure evolves, you can simply adapt function code and client applications will continue to call them transparently. + +- By default, all of your data model class functions (including [computed attribute functions](#computed-attributes)) are **not exposed** to remote applications and cannot be called from REST requests. You must explicitly declare each public function with the [`exposed`](#exposed-vs-non-exposed-functions) keyword. + +![](assets/en/ORDA/api.png) + + +In addition, 4D [automatically pre-creates](#creating-classes) the classes for each available data model object. + + +## Architecture + +ORDA provides **generic classes** exposed through the **`4D`** [class store](Concepts/classes.md#class-stores), as well as **user classes** (extending generic classes) exposed in the **`cs`** [class store](Concepts/classes.md#class-stores): + +![](assets/en/ORDA/ClassDiagramImage.png) + +All ORDA data model classes are exposed as properties of the **`cs`** class store. The following ORDA classes are available: + +| Class | Example name | Instantiated by | +| --------------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cs.DataStore | cs.DataStore | [`ds`](API/DataStoreClass.md#ds) command | +| cs.*DataClassName* | cs.Employee | [`dataStore.DataClassName`](API/DataStoreClass.md#dataclassname), `dataStore[DataClassName]` | +| cs.*DataClassName*Entity | cs.EmployeeEntity | [`dataClass.get()`](API/DataClassClass.md#get), [`dataClass.new()`](API/DataClassClass.md#new), [`entitySelection.first()`](API/EntitySelectionClass.md#first), [`entitySelection.last()`](API/EntitySelectionClass.md#last), [`entity.previous()`](API/EntityClass.md#previous), [`entity.next()`](API/EntityClass.md#next), [`entity.first()`](API/EntityClass.md#first), [`entity.last()`](API/EntityClass.md#last), [`entity.clone()`](API/EntityClass.md#clone) | +| cs.*DataClassName*Selection | cs.EmployeeSelection | [`dataClass.query()`](API/DataClassClass.md#query), [`entitySelection.query()`](API/EntitySelectionClass.md#query), [`dataClass.all()`](API/DataClassClass.md#all), [`dataClass.fromCollection()`](API/DataClassClass.md#fromcollection), [`dataClass.newSelection()`](API/DataClassClass.md#newselection), [`entitySelection.drop()`](API/EntitySelectionClass.md#drop), [`entity.getSelection()`](API/EntityClass.md#getselection), [`entitySelection.and()`](API/EntitySelectionClass.md#and), [`entitySelection.minus()`](API/EntitySelectionClass.md#minus), [`entitySelection.or()`](API/EntitySelectionClass.md#or), [`entitySelection.orderBy()`](API/EntitySelectionClass.md#or), [`entitySelection.orderByFormula()`](API/EntitySelectionClass.md#orderbyformula), [`entitySelection.slice()`](API/EntitySelectionClass.md#slice), `Create entity selection` | + +> ORDA user classes are stored as regular class files (.4dm) in the Classes subfolder of the project [(see below)](#class-files). + +Also, object instances from ORDA data model user classes benefit from their parent's properties and functions: + +- a Datastore class object can call functions from the [ORDA Datastore generic class](API/DataStoreClass.md). +- a Dataclass class object can call functions from the [ORDA Dataclass generic class](API/DataClassClass.md). +- an Entity selection class object can call functions from the [ORDA Entity selection generic class](API/EntitySelectionClass.md). +- an Entity class object can call functions from the [ORDA Entity generic class](API/EntityClass.md). + + + +## Class Description + +

            History + +| Version | Changes | +| ------- | -------------------------------------------------------------------------------------------------- | +| v18 R5 | Data model class functions are not exposed to REST by default. New `exposed` and `local` keywords. | +
            + + +### DataStore Class + + +A 4D database exposes its own DataStore class in the `cs` class store. + +- **Extends**: 4D.DataStoreImplementation +- **Class name**: cs.DataStore + +You can create functions in the DataStore class that will be available through the `ds` object. + +#### Example + +```4d +// cs.DataStore class + +Class extends DataStoreImplementation + +Function getDesc + $0:="Database exposing employees and their companies" +``` + + +This function can then be called: + +```4d +$desc:=ds.getDesc() //"Database exposing..." +``` + + + +### DataClass Class + +Each table exposed with ORDA offers a DataClass class in the `cs` class store. + +- **Extends**: 4D.DataClass +- **Class name**: cs.*DataClassName* (where *DataClassName* is the table name) +- **Example name**: cs.Employee + + + +#### Example + +```4D +// cs.Company class + + +Class extends DataClass + +// Returns companies whose revenue is over the average +// Returns an entity selection related to the Company DataClass + +Function GetBestOnes() + $sel:=This.query("revenues >= :1";This.all().average("revenues")); + $0:=$sel +``` + +Then you can get an entity selection of the "best" companies by executing: + +```4d + var $best : cs.CompanySelection + $best:=ds.Company.GetBestOnes() +``` + +> [Computed attributes](#computed-attributes) are defined in the [Entity Class](#entity-class). + + +#### Example with a remote datastore + +The following *City* catalog is exposed in a remote datastore (partial view): + +![](assets/en/ORDA/Orda_example.png) + +The `City Class` provides an API: + +```4d +// cs.City class + +Class extends DataClass + +Function getCityName() + var $1; $zipcode : Integer + var $zip : 4D.Entity + var $0 : Text + + $zipcode:=$1 + $zip:=ds.ZipCode.get($zipcode) + $0:="" + + If ($zip#Null) + $0:=$zip.city.name + End if +``` + +The client application opens a session on the remote datastore: + +```4d +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +``` + +Then a client application can use the API to get the city matching a zip code (for example) from a form: + +```4d +Form.comp.city:=$cityManager.City.getCityName(Form.comp.zipcode) + +``` + + +### EntitySelection Class + +Each table exposed with ORDA offers an EntitySelection class in the `cs` class store. + +- **Extends**: 4D.EntitySelection +- **Class name**: *DataClassName*Selection (where *DataClassName* is the table name) +- **Example name**: cs.EmployeeSelection + + +#### Example + +```4d +// cs.EmployeeSelection class + + +Class extends EntitySelection + +//Extract the employees with a salary greater than the average from this entity selection + +Function withSalaryGreaterThanAverage + C_OBJECT($0) + $0:=This.query("salary > :1";This.average("salary")).orderBy("salary") + +``` + +Then you can get employees with a salary greater than the average in any entity selection by executing: + +```4d +$moreThanAvg:=ds.Company.all().employees.withSalaryGreaterThanAverage() +``` + +### Entity Class + +Each table exposed with ORDA offers an Entity class in the `cs` class store. + +- **Extends**: 4D.Entity +- **Class name**: *DataClassName*Entity (where *DataClassName* is the table name) +- **Example name**: cs.CityEntity + +Entity classes allow you to define **computed attributes** using specific keywords: + +- `Function get` *attributeName* +- `Function set` *attributeName* +- `Function query` *attributeName* +- `Function orderBy` *attributeName* + +For more information, please refer to the [Computed attributes](#computed-attributes) section. + +#### Example + +```4d +// cs.CityEntity class + +Class extends Entity + +Function getPopulation() + $0:=This.zips.sum("population") + + +Function isBigCity +C_BOOLEAN($0) +// The getPopulation() function is usable inside the class +$0:=This.getPopulation()>50000 +``` + +Then you can call this code: + +```4d +var $cityManager; $city : Object + +$cityManager:=Open datastore(New object("hostname";"127.0.0.1:8111");"CityManager") +$city:=$cityManager.City.getCity("Caguas") + +If ($city.isBigCity()) + ALERT($city.name + " is a big city") +End if +``` + +### Specific rules + +When creating or editing data model classes, you must pay attention to the following rules: + +- Since they are used to define automatic DataClass class names in the **cs** [class store](Concepts/classes.md#class-stores), 4D tables must be named in order to avoid any conflict in the **cs** namespace. Em particular: + - Do not give the same name to a 4D table and to a [user class name](Concepts/classes.md#class-names). If such a case occurs, the constructor of the user class becomes unusable (a warning is returned by the compiler). + - Do not use a reserved name for a 4D table (e.g., "DataClass"). + +- When defining a class, make sure the [`Class extends`](Concepts/classes.md#class-extends-classnameclass) statement exactly matches the parent class name (remember that they're case sensitive). For example, `Class extends EntitySelection` for an entity selection class. + +- You cannot instantiate a data model class object with the `new()` keyword (an error is returned). You must use a regular method as listed in the [`Instantiated by` column of the ORDA class table](#architecture). + +- You cannot override a native ORDA class function from the **`4D`** [class store](Concepts/classes.md#class-stores) with a data model user class function. + + +## Computed attributes + + +### Visão Geral + +A computed attribute is a dataclass attribute with a data type that masks a calculation. [Standard 4D classes](Concepts/classes.md) implement the concept of computed properties with `get` (*getter*) and `set` (*setter*) [accessor functions](Concepts/classes.md#function-get-and-function-set). ORDA dataclass attributes benefit from this feature and extend it with two additional functions: `query` and `orderBy`. + +At the very minimum, a computed attribute requires a `get` function that describes how its value will be calculated. When a *getter* function is supplied for an attribute, 4D does not create the underlying storage space in the datastore but instead substitutes the function's code each time the attribute is accessed. If the attribute is not accessed, the code never executes. + +A computed attribute can also implement a `set` function, which executes whenever a value is assigned to the attribute. The *setter* function describes what to do with the assigned value, usually redirecting it to one or more storage attributes or in some cases other entities. + +Just like storage attributes, computed attributes may be included in **queries**. Normally, when a computed attribute is used in a ORDA query, the attribute is calculated once per entity examined. In many cases this is sufficient. However, computed attributes can implement a `query` function that substitutes other attributes during the query. This allows computed attributes to be queried quickly by redirecting searches to other attributes, including indexed storage attributes. + +Similarly, computed attributes can be included in **sorts**. When a computed attribute is used in a ORDA sort, the attribute is calculated once per entity examined. Just like in queries, this is sufficient in many cases. However, computed attributes can implement an `orderBy` function that substitutes other attributes during the sort, thus increasing performance. + + +### How to define computed attributes + +You create a computed attribute by defining a `get` accessor in the [**entity class**](#entity-class) of the dataclass. The computed attribute will be automatically available in the dataclass attributes and in the entity attributes. + +Other computed attribute functions (`set`, `query`, and `orderBy`) can also be defined in the entity class. They are optional. + +Within computed attribute functions, [`This`](Concepts/classes.md#this) designates the entity. Computed attributes can be used and handled as any dataclass attribute, i.e. they will be processed by [entity class](API/EntityClass.md) or [entity selection class](API/EntitySelectionClass.md) functions. + +> ORDA computed attribute functions can be [**exposed**](#exposed-vs-non-exposed-functions) or not. + + +### `Function get ` + +#### Syntax + +```4d +Function get ({$event : Object}) -> $result : type +// code +``` +The *getter* function is mandatory to declare the *attributeName* computed attribute. Whenever the *attributeName* is accessed, 4D evaluates the `Function get` code and returns the *$result* value. Since this code becomes part of the attribute’s definition, it need not be referenced again in the application. + +> A computed attribute can use the value of other computed attribute(s). However, only one level is allowed, recursive calls generate errors. + +The *getter* function defines the data type of the computed attribute thanks to the *$result* parameter. The following resulting types are allowed: + +- Scalar (text, boolean, date, number) +- Object +- Image +- BLOB +- Entity class (i.e. cs.EmployeeEntity) +- Entity selection class (i.e. cs.EmployeeSelection) + +The *$event* parameter contains the following properties: + +| Property | Type | Description | +| ------------- | ------- | -------------------------------------------------------------------------- | +| attributeName | Text | Computed attribute name | +| dataClassName | Text | Dataclass name | +| kind | Text | "get" | +| result | Variant | Add this property with Null value if you want the attribute to return Null | + + +#### Examples + +- *fullName* computed attribute: + +```4d +Function get fullName($event : Object)-> $result : Text + + If (This.firstName=Null) & (This.lastName=Null) + $event.result:=Null //only way to return a null value + Else + If (This.firstName=Null) + $result:=This.lastName + Else + If (This.lastname=Null) + $result:=This.firstName + Else + $result:=This.firstName+" "+This.lastName + End if + End if +``` + +- A computed attribute can be based upon a related attribute: + +```4d +Function get bigBoss($event : Object)-> $result: cs.EmployeeEntity + If (This.manager.manager=Null) + $event.result:=Null + Else + $result:=This.manager.manager + End if + +``` + +- A computed attribute can be based upon related attributes: + +```4d +Function get coWorkers($event : Object)-> $result: cs.EmployeeSelection + If (This.manager.manager=Null) + $result:=ds.Employee.newSelection() + Else + $result:=This.manager.directReports.minus(this) + End if +``` + +### `Function set ` + +#### Syntax + +```4d +Function set ($value : Variant {; $event : Object}) +// code +``` + +The *setter* function executes whenever a value is assigned to the attribute. This function usually processes the input value(s) and the result is dispatched between one or more other attributes. + +The *$value* parameter receives the value assigned to the attribute. + +The *$event* parameter contains the following properties: + +| Property | Type | Description | +| ------------- | ------- | --------------------------------------------- | +| attributeName | Text | Computed attribute name | +| dataClassName | Text | Dataclass name | +| kind | Text | "set" | +| value | Variant | Value to be handled by the computed attribute | + +#### Example + +```4d +Function set fullName($value : Text; $event : Object) + var $vals : Collection + $vals:=Split string($value; " "; sk ignore empty strings) + If ($vals.length>0) + This.firstName:=$vals[0] + End if + If ($vals.length>1) + This.lastName:=$vals[1] + End if + End if +``` + + + +### `Function query ` + +#### Syntax + +```4d +Function query ($event : Object) +Function query ($event : Object) -> $result : Text +Function query ($event : Object) -> $result : Object +// code +``` + +This function supports three syntaxes: + +- With the first syntax, you handle the whole query through the `$event.result` object property. +- With the second and third syntaxes, the function returns a value in *$result*: + - If *$result* is a Text, it must be a valid query string + - If *$result* is an Object, it must contain two properties: + + | Property | Type | Description | + | ------------------ | ---------- | --------------------------------------------------- | + | $result.query | Text | Valid query string with placeholders (:1, :2, etc.) | + | $result.parameters | Collection | values for placeholders | + +The `query` function executes whenever a query using the computed attribute is launched. It is useful to customize and optimize queries by relying on indexed attributes. When the `query` function is not implemented for a computed attribute, the search is always sequential (based upon the evaluation of all values using the `get ` function). + +> The following features are not supported: - calling a `query` function on computed attributes of type Entity class or Entity selection class - using the `order by` keyword in the resulting query string. + +The *$event* parameter contains the following properties: + +| Property | Type | Description | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Text | Computed attribute name | +| dataClassName | Text | Dataclass name | +| kind | Text | "query" | +| value | Variant | Value to be handled by the computed attribute | +| operator | Text | Query operator (see also the [`query` class function](API/DataClassClass.md#query)). Possible values:
          • == (equal to, @ is wildcard)
          • === (equal to, @ is not wildcard)
          • != (not equal to, @ is wildcard)
          • !== (not equal to, @ is not wildcard)
          • < (less than)
          • <= (less than or equal to)
          • > (greater than)
          • >= (greater than or equal to)
          • IN (included in)
          • %% (contains keyword)
          • | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default query (always sequential for computed attributes). | + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + +#### Examples + +- Query on the *fullName* computed attribute. The result is returned as Text (query string). + +```4d +Function query fullName($event : Object)-> $result : Text + var $vals : Collection + var $oper; $result : Text + + $vals:=Split string($event.value; " "; sk ignore empty strings) + $oper:=$event.operator + $result:="" + + If (($oper="==") | ($oper="===")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" and lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName == '' and lastName == ''" + End if + + Else + If (($oper="!=") | ($oper="!==")) + + If ($vals.length>0) + $result:="firstName "+$oper+" '"+$vals[0]+"'" + If ($vals.length>1) + $result:=$result+" or lastName "+$oper+" '"+$vals[1]+"'" + End if + Else + $result:="firstName != '' or lastName != ''" + End if + Else + $result:="firstName "+$oper+" '"+$vals[0]+"'" + End if + + End if + +``` + +Calling code, for example: + +```4d +$emps:=ds.Employee.query("fullName = :1"; "Flora Pionsin") +``` + +- This function handles queries on the *age* computed attribute and returns an object with parameters: + +```4d +Function query age($event : Object)->$result : Object + + var $operator : Text + var $age : Integer + var $_ages : Collection + + $operator:=$event.operator + + If ($operator="in") + + Case of + : (Value type($event.value)=Is collection) + $_ages:=$event.value + + : (Value type($event.value)=Is text) + $_ages:=JSON Parse($event.value) + End case + + Else + + $age:=Num($event.value) // integer + $d1:=Add to date(Current date; -$age-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + $parameters:=New collection($d1; $d2) + End if + + Case of + + : ($operator="==") + $query:="birthday > :1 and birthday <= :2" // after d1 and before or egal d2 + + : ($operator=">=") + $query:="birthday <= :2" + + //... other operators + + : ($operator="in") + + If ($_ages.length<=3) + + $parameters:=New collection + $phIndex:=1 + + $query:="" + For ($i; 0; $_ages.length-1) + + $ph1:=":"+String($phIndex) //-> ":1" + $ph2:=":"+String($phIndex+1) //-> ":2" + + $phIndex:=$phIndex+2 // next will be :3 :4, :5 :6, etc. + + $d1:=Add to date(Current date; -$_ages[$i]-1; 0; 0) + $d2:=Add to date($d1; 1; 0; 0) + + $parameters.push($d1) + $parameters.push($d2) + + If ($i>0) + $query:=$query+" or " + End if + $query:=$query+"(birthday > "+$ph1+" and birthday <= "+$ph2+")" // > :1 and <= :2 + End for + + Else // let 4d do the job !!! + $event.result:=Null + End if + + Else + $event.result:=Null + End case + + + If (Undefined($event.result)) + $result:=New object + $result.query:=$query + $result.parameters:=$parameters + End if + +``` + +### `Function orderBy ` + +#### Syntax + +```4d +Function orderBy ($event : Object) +Function orderBy ($event : Object)-> $result : Text + +// code +``` + +The `orderBy` function executes whenever the computed attribute needs to be ordered. It allows sorting the computed attribute. For example, you can sort *fullName* on first names then last names, or conversely. When the `orderBy` function is not implemented for a computed attribute, the sort is always sequential (based upon the evaluation of all values using the `get ` function). + +> Calling an `orderBy` function on computed attributes of type Entity class or Entity selection class **is not supported**. + +The *$event* parameter contains the following properties: + +| Property | Type | Description | +| ------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | +| attributeName | Text | Computed attribute name | +| dataClassName | Text | Dataclass name | +| kind | Text | "orderBy" | +| value | Variant | Value to be handled by the computed attribute | +| descending | Booelan | `true` for descending order, `false` for ascending order | +| result | Variant | Value to be handled by the computed attribute. Pass `Null` in this property if you want to let 4D execute the default sort . | + +You can return the `orderBy` string either in the `$event.result` object property or in the *$result* function result. + +> If the function returns a value in *$result* and another value is assigned to the `$event.result` property, the priority is given to `$event.result`. + + +#### Example + +```4d +Function orderBy fullName($event : Object)-> $result : Text + + If ($event.descending=True) + $result:="firstName desc, lastName desc" + Else + $result:="firstName, lastName" + End if +``` + + +## Exposed vs non-exposed functions + +For security reasons, all of your data model class functions are **not exposed** (i.e., private) by default to remote requests. + +Remote requests include: + +- Requests sent by remote 4D applications connected through `Open datastore` +- REST requests + +> Regular 4D client/server requests are not impacted. Data model class functions are always available in this architecture. + +A function that is not exposed is not available on remote applications and cannot be called on any object instance from a REST request. If a remote application tries to access a non-exposed function, the "-10729 - Unknown member method" error is returned. + +To allow a data model class function to be called by a remote request, you must explicitly declare it using the `exposed` keyword. The formal syntax is: + +```4d +// declare an exposed function +exposed Function +``` + +> The `exposed` keyword can only be used with Data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +### Example + +You want an exposed function to use a private function in a dataclass class: + +```4d +Class extends DataClass + +//Public function +exposed Function registerNewStudent($student : Object) -> $status : Object + +var $entity : cs.StudentsEntity + +$entity:=ds.Students.new() +$entity.fromObject($student) +$entity.school:=This.query("name=:1"; $student.schoolName).first() +$entity.serialNumber:=This.computeSerialNumber() +$status:=$entity.save() + +//Not exposed (private) function +Function computeIDNumber()-> $id : Integer +//compute a new ID number +$id:=... + +``` + +When the code is called: + +```4d +var $remoteDS; $student; $status : Object +var $id : Integer + +$remoteDS:=Open datastore(New object("hostname"; "127.0.0.1:8044"); "students") +$student:=New object("firstname"; "Mary"; "lastname"; "Smith"; "schoolName"; "Math school") + +$status:=$remoteDS.Schools.registerNewStudent($student) // OK +$id:=$remoteDS.Schools.computeIDNumber() // Error "Unknown member method" +``` + + +## Local functions + +By default in client/server architecture, ORDA data model functions are executed **on the server**. It usually provides the best performance since only the function request and the result are sent over the network. + +However, it could happen that a function is fully executable on the client side (e.g., when it processes data that's already in the local cache). In this case, you can save requests to the server and thus, enhance the application performance by inserting the `local` keyword. The formal syntax is: + +```4d +// declare a function to execute locally in client/server +local Function +``` + +With this keyword, the function will always be executed on the client side. + +> The `local` keyword can only be used with data model class functions. If used with a [regular user class](Concepts/classes.md) function, it is ignored and an error is returned by the compiler. + +Note that the function will work even if it eventually requires to access the server (for example if the ORDA cache is expired). However, it is highly recommended to make sure that the local function does not access data on the server, otherwise the local execution could not bring any performance benefit. A local function that generates many requests to the server is less efficient than a function executed on the server that would only return the resulting values. For example, consider the following function on the Schools entity class: + +```4d +// Get the youngest students +// Inappropriate use of local keyword +local Function getYoungest + var $0 : Object + $0:=This.students.query("birthDate >= :1"; !2000-01-01!).orderBy("birthDate desc").slice(0; 5) +``` +- **without** the `local` keyword, the result is given using a single request +- **with** the `local` keyword, 4 requests are necessary: one to get the Schools entity students, one for the `query()`, one for the `orderBy()`, and one for the `slice()`. In this example, using the `local` keyword is inappropriate. + + +### Examples + +#### Calculating age + +Given an entity with a *birthDate* attribute, we want to define an `age()` function that would be called in a list box. This function can be executed on the client, which avoids triggering a request to the server for each line of the list box. + +On the *StudentsEntity* class: + +```4d +Class extends Entity + +local Function age() -> $age: Variant + +If (This.birthDate#!00-00-00!) + $age:=Year of(Current date)-Year of(This.birthDate) +Else + $age:=Null +End if +``` + +#### Checking attributes + +We want to check the consistency of the attributes of an entity loaded on the client and updated by the user before requesting the server to save them. + +On the *StudentsEntity* class, the local `checkData()` function checks the Student's age: + +```4d +Class extends Entity + +local Function checkData() -> $status : Object + +$status:=New object("success"; True) +Case of + : (This.age()=Null) + $status.success:=False + $status.statusText:="The birthdate is missing" + + :((This.age() <15) | (This.age()>30) ) + $status.success:=False + $status.statusText:="The student must be between 15 and 30 - This one is "+String(This.age()) +End case +``` + +Calling code: + +```4d +var $status : Object + +//Form.student is loaded with all its attributes and updated on a Form +$status:=Form.student.checkData() +If ($status.success) + $status:=Form.student.save() // call the server +End if +``` + + + +## Support in 4D projects + + +### Class files + +An ORDA data model user class is defined by adding, at the [same location as regular class files](Concepts/classes.md#class-files) (*i.e.* in the `/Sources/Classes` folder of the project folder), a .4dm file with the name of the class. For example, an entity class for the `Utilities` dataclass will be defined through a `UtilitiesEntity.4dm` file. + + +### Creating classes + +4D automatically pre-creates empty classes in memory for each available data model object. + +![](assets/en/ORDA/ORDA_Classes-3.png) + +> By default, empty ORDA classes are not displayed in the Explorer. To show them you need to select **Show all data classes** from the Explorer's options menu: ![](assets/en/ORDA/showClass.png) + +ORDA user classes have a different icon from regular classes. Empty classes are dimmed: + +![](assets/en/ORDA/classORDA2.png) + +To create an ORDA class file, you just need to double-click on the corresponding predefined class in the Explorer. 4D creates the class file and add the `extends` code. For example, for an Entity class: + +``` +Class extends Entity +``` + +Once a class is defined, its name is no longer dimmed in the Explorer. + + +### Editing classes + +To open a defined ORDA class in the 4D method editor, select or double-click on an ORDA class name and use **Edit...** from the contextual menu/options menu of the Explorer window: + +![](assets/en/ORDA/classORDA4.png) + +For ORDA classes based upon the local datastore (`ds`), you can directly access the class code from the 4D Structure window: + +![](assets/en/ORDA/classORDA5.png) + + +### Editor de método + +In the 4D method editor, variables typed as an ORDA class automatically benefit from autocompletion features. Example with an Entity class variable: + +![](assets/en/ORDA/AutoCompletionEntity.png) + diff --git a/website/translated_docs/pt/ORDA/overview.md b/website/translated_docs/pt/ORDA/overview.md new file mode 100644 index 00000000000000..c1ef40b4413542 --- /dev/null +++ b/website/translated_docs/pt/ORDA/overview.md @@ -0,0 +1,34 @@ +--- +id: visão Geral +title: What is ORDA? +--- + +ORDA stands for **Object Relational Data Access**. It is an enhanced technology allowing to access both the model and the data of a database through objects. + +Relations are transparently included in the concept, in combination with [lazy loading](glossary.md#lazy-loading), to remove all the typical hassles of data selection or transfer from the developer. + +With ORDA, data is accessed through an abstraction layer, the [datastore](dsMapping.md#datastore). A datastore is an object that provides an interface to the database model and data through objects and classes. For example, a table is mapped to a [dataclass](dsMapping.md#dataclass) object, a field is an [attribute](dsMapping.md##attribute) of a dataclass, and records are accessed through [entities](dsMapping.md#entity) and [entity selections](dsMapping.md#entity-selection). + + +## Why use ORDA? + +Instead of representing information as tables, records, and fields, ORDA uses an alternate approach that more accurately maps data to real-world concepts. + +Imagine the ability to denormalize a relational structure, yet not affect efficiency. Imagine describing everything about the business objects in your application in such a way that using the data becomes simple and straightforward and removes the need for a complete understanding of the relational structure. + +In the ORDA data model, a single dataclass can incorporate all of the elements that make up a traditional relational database table, but can also include values from related parent entities, and direct references to related entities and entity selections. + +A query returns a list of entities called an entity selection, which fulfills the role of a SQL query’s row set. The difference is that each entity "knows" where it belongs in the data model and "understands" its relationship to all other entities. This means that a developer does not need to explain in a query how to relate the various pieces of information, nor in an update how to write modified values back to the relational structure. + +In addition, ORDA objects such as entity selections or entities can be easily bound to UI objects such as list boxes or variables. Combined with powerful features such as the `This` and `Form` commands, they allow the building modern and modular interfaces based upon objects and collections. + +## How to use ORDA? + +Basically, ORDA handles objects. In ORDA, all main concepts, including the datastore itself, are available through objects. In 4D, the datastore is automatically [mapped upon the 4D structure](dsMapping.md). + +ORDA objects can be handled like 4D standard objects, but they automatically benefit from specific properties and methods. + +ORDA objects are created and instanciated when necessary by 4D methods (you do not need to create them). However, ORDA data model objects are associated with [classes where you can add custom functions](ordaClasses.md). + + + diff --git a/website/translated_docs/pt/ORDA/quickTour.md b/website/translated_docs/pt/ORDA/quickTour.md new file mode 100644 index 00000000000000..e6be52203e916f --- /dev/null +++ b/website/translated_docs/pt/ORDA/quickTour.md @@ -0,0 +1,194 @@ +--- +id: quickTour +title: A Quick Tour in ORDA +--- + +Since ORDA is object-based, using ORDA requires basic knowledge in object programmming. + +## Exploring the datastore + +The ORDA datastore is automatically based upon a 4D database structure, provided it complies with the [ORDA prerequisites](overview.md#orda-prerequisites). + +This example will use the following simple 4D database structure: + +![](assets/en/ORDA/struc.png) + +To know what is exposed as the datastore, create a new project method, write the following line: + +```code4d +TRACE +``` + +Execute the method -- it simply calls the debugger window. In the Expression area, double-click to insert an expression and enter `ds`. It returns the datastore object. Deploy the object, you can see that tables and fields are automatically exposed by ORDA as properties of the `ds` object: + +![](assets/en/ORDA/debug1.png) + +It means for example that, whenever you need to refer to the city field of the [Company] table, in ORDA you just need to write: + +```code4d +ds.Company.city //returns the name of the city +``` + +> In the ORDA world, ds.Company is a **dataclass**. ds.Company.city is an **attribute**. + +> ORDA is case sensitive. `ds.company.city` will not refer to the ds.Company.city attribute. + +You have also noticed the extra `hires` property in the ds.Company dataclass. It does not correspond to a field. `hires` is actually the name of the *One to many* relation between Company and Employee: + +![](assets/en/ORDA/struc2s.png) *Name of the relation as defined in the Inspector* + +It means that, whenever you need to access the list of employees working for a company, in ORDA you just need to write: + +```code4d +ds.Company.hires //returns the list of employees +``` + +But don't go too fast. Let's see now how to record data in ORDA dataclasses. + + +## Adding data + +In ORDA, you can add a record to a dataclass using the `new()` command. +> In the ORDA world, a record is an **entity** -- an entity is itself an object. A command that is attached to a specific object is called a **member method**. + +```code4d +$entity:=ds.Company.new() //create a new entity reference +//in the Company dataclass +//and assign it to the $entity variable +``` + +A new entity object contains a "copy" of all attributes of its parent dataclass, thus you can assign values to them: + +```code4d +$entity.name:="ACME, inc." +$entity.city:="London" +//$entity.ID is automatically filled +``` + +Right now, the entity only exists in memory. To store it in the data file, you need to save it using the `save()` member method: + +```code4d +$status:=$entity.save() +``` + + + + + + + + +The editor for users is located in the Toolbox of 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. 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. 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 adds a new user to the list, named "New userX" by default. + +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. 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. + +> 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. 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 + +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) + +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. + +### 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. + +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. + +> 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. + +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. + + +### 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. + +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. + +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. + +![](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. + + +### 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. + +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) + +- 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) + +- 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) + +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. diff --git a/website/translated_docs/pt/ORDA/remoteDatastore.md b/website/translated_docs/pt/ORDA/remoteDatastore.md new file mode 100644 index 00000000000000..649fb53ae416e7 --- /dev/null +++ b/website/translated_docs/pt/ORDA/remoteDatastore.md @@ -0,0 +1,58 @@ +--- +id: remoteDatastore +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different remote clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the [**HTTP REST server**](REST/gettingStarted.md). +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/Orda/sessions.png) + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/Orda/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/website/translated_docs/pt/ORDA/remoteDatastores.md b/website/translated_docs/pt/ORDA/remoteDatastores.md new file mode 100644 index 00000000000000..e79fdc8d455828 --- /dev/null +++ b/website/translated_docs/pt/ORDA/remoteDatastores.md @@ -0,0 +1,60 @@ +--- +id: datastores +title: Using a remote datastore +--- + +A [datastore](dsMapping.md#datastore) exposed on a 4D application can be accessed simultaneously through different clients: + +- 4D remote applications using ORDA to access the main datastore with the `ds` command. Note that the 4D remote application can still access the database in classic mode. These accesses are handled by the **4D application server**. +- Other 4D applications (4D remote, 4D Server) opening a session on the remote datastore through the `Open datastore` command. These accesses are handled by the **HTTP REST server**. +- 4D for iOS queries for updating iOS applications. These accesses are handled by the **HTTP server**. + + +When you work with a remote datastore referenced through calls to the `Open datastore` command, the connection between the requesting processes and the remote datastore is handled via sessions. + + +## Opening sessions + +When a 4D application (*i.e.* a process) opens an external datastore using the `Open datastore` command, a session in created on the remote datastore to handle the connection. This session is identified using a internal session ID which is associated to the `localID` on the 4D application. This session automatically manages access to data, entity selections, or entities. + +The `localID` is local to the machine that connects to the remote datastore, which means: + +* If other processes of the same application need to access the same remote datastore, they can use the same `localID` and thus, share the same session. +* If another process of the same application opens the same remote datastore but with another `localID`, it will create a new session on the remote datastore. +* If another machine connects to the same remote datastore with the same `localID`, it will create another session with another cookie. + +These principles are illustrated in the following graphics: + +![](assets/en/ORDA/sessions.png) + +> For sessions opened by REST requests, please refer to [Users and sessions](REST/authUsers.md). + +## Viewing sessions + +Processes that manage sessions for datastore access are shown in the 4D Server administration window: + +* name: "REST Handler: \" +* type: HTTP Server Worker type +* session: session name is the user name passed to the Open datastore command. + +In the following example, two processes are running for the same session: + +![](assets/en/ORDA/sessionAdmin.png) + +## Locking and transactions + +ORDA features related to entity locking and transaction are managed at process level in remote datastores, just like in ORDA client/server mode: + +* If a process locks an entity from a remote datastore, the entity is locked for all other processes, even when these processes share the same session (see [Entity locking](entities.md#entity-locking)). If several entities pointing to a same record have been locked in a process, they must be all unlocked in the process to remove the lock. If a lock has been put on an entity, the lock is removed when there is no more reference to this entity in memory. +* Transactions can be started, validated or cancelled separately on each remote datastore using the `dataStore.startTransaction()`, `dataStore.cancelTransaction()`, and `dataStore.validateTransaction()` functions. They do not impact other datastores. +* Classic 4D language commands (`START TRANSACTION`, `VALIDATE TRANSACTION`, `CANCEL TRANSACTION`) only apply to the main datastore (returned by `ds`). If an entity from a remote datastore is hold by a transaction in a process, other processes cannot update it, even if these processes share the same session. +* Locks on entities are removed and transactions are rollbacked: + * when the process is killed. + * when the session is closed on the server + * when the session is killed from the server administration window. + +## Closing sessions + +A session is automatically closed by 4D when there has been no activity during its timeout period. The default timeout is 60 mn, but this value can be modified using the `connectionInfo` parameter of the `Open datastore` command. + +If a request is sent to the remote datastore after the session has been closed, it is automatically re-created if possible (license available, server not stopped...). However, keep in mind that the context of the session regarding locks and transactions is lost (see above). diff --git a/website/translated_docs/pt/Preferences/forms.md b/website/translated_docs/pt/Preferences/forms.md new file mode 100644 index 00000000000000..bf9ddad1e9d0af --- /dev/null +++ b/website/translated_docs/pt/Preferences/forms.md @@ -0,0 +1,35 @@ +--- +id: forms +title: Forms Page +--- + + +This page lets you set the default operation and display of the 4D Form editor. + +## Move + +This group of options sets parameters for moving objects using the keyboard or the mouse in the Form editor. + +### Step using keyboard + +This option allows setting the value (in points) of the step used for moving or resizing an object using the keyboard and the **Shift** key. + +### When moving beyond window limits + +This option allows setting the behavior of the Form editor when moving an object using the mouse beyond window limits. + +* **Autoscroll**: When this option is checked, this action causes the scroll of the form in the window, as if you clicked on the scroll bars. This behavior is useful for moving objects in large forms. +* **Start drag and drop**: When this option is checked, this action is interpreted as a drag and drop. The form window is not modified and the moved object can be dropped in another window (if its contents are compatible), for example, in another form. This behavior is useful for recycling objects among several forms or using object libraries (see [Creating and using custom object libraries](FormEditor/objectLibrary.md#creating-and-using-custom-object-libraries)). + +You can configure this option depending on your work habits and development needs. + +### Activate auto alignment by default + +This option activates auto alignment by default in each new window of the Form editor. It is possible to modify this option individually in each window (refer to [Using the magnetic grid](FormEditor/formEditor.md#using-the-magnetic-grid)). + +## New form default display + +- **Limits**, **Rulers**, ...: check items that must be displayed by default in each new window of the Form editor. It is possible to modify the display of each window individually using the **Display** hierarchical menu of the Form editor. +- **Color for marker lines**: modifies the color of the marker lines used in the Form editor to define the different areas (header, breaks, detail and footer, etc.). For more information about markers, refer to [Using output control lines](https://doc.4d.com/4Dv18R6/4D/18-R6/Using-output-control-lines.300-5217678.en.html). +- **Default display shield**: sets which shields to display by default in each new window of the Form editor. For more information about shields, refer to [Using shields](FormEditor/formEditor.md#using-shields). + diff --git a/website/translated_docs/pt/Preferences/general.md b/website/translated_docs/pt/Preferences/general.md new file mode 100644 index 00000000000000..08e6c5f5e84d7a --- /dev/null +++ b/website/translated_docs/pt/Preferences/general.md @@ -0,0 +1,145 @@ +--- +id: general +title: General Page +--- + +This page contains various options to configure the general operation of your 4D application. + +## Options + +### At startup + +This option allows you to configure the default 4D display at startup, when the user launches only the application. + +* **Do nothing**: Only the application window appears, empty. +* **Open Local Project dialog**: 4D displays a standard open document dialog box, allowing you to select a local project. +* **Open last used project**: 4D directly opens the last project used; no opening dialog box appears. >To force the display of the opening dialog box when this option is selected, hold down the **Alt** (Windows) or **Option** (macOS) key while launching the project. +* **Open Remote Project dialog**: 4D displays the standard 4D Server logon dialog, allowing you to select a project published on the network. +* **Open Welcome Wizard dialog** (factory setting): 4D displays the Welcome Wizard dialog box. +> **4D Server**: The 4D Server application ignores this option. In this environment, the **Do nothing** mode is always used. + +### Automatic form creation + +> This option is only used in binary databases; it is ignored in project architecture. See doc.4d.com. + +### Window tabbing (macOS only) + +Starting with macOS Sierra, Mac applications can benefit from the Automatic Window Tabbing feature that helps organizing multiple windows: document windows are stacked into a single parent window and can be browsed through tabs. This feature is useful on small screens and/or when using a trackpad. + +You can benefit from this feature in the following environments (with 4D 64-bit versions only): + +* Method Editor windows +* Form Editor windows + +All windows from these editors can be put in tab form: + +![](assets/en/Preferences/general2.png) + +A set of commands in the **Window** menu allows managing the tabs: + +![](assets/en/Preferences/general3.png) + +In the 4D's Preferences dialog box, the **Window tabbing** option allows you to control this feature: + +![](assets/en/Preferences/general4.png) + +Three options are available: + +* **According to System Preferences** (default): 4D windows will behave like defined in the macOS System Preferences (In full screen, Always, or Manually). +* **Never**: Opening a new document in 4D form editor or method editor will always result in creating a new window (tabs are never created). +* **Always**: Opening a new document in 4D form editor or method editors will always result in creating a new tab. + +### Appearance (macOS only) + +This menu lets you select the color scheme to use for the **4D development** environment. The specified scheme will be applied to all editors and windows of the Design mode. + +> You can also set the color scheme to use in your **desktop applications** in the "Interface" page of the Settings dialog box. + +Three options are available: + +* **According to System Color Scheme Preferences** (default): Use the color scheme defined in the macOS System Preferences. +* **Light**: Use the Light Theme +* **Dark**: Use the Dark Theme + +> This preference is only supported on macOS. On Windows, the "Light" scheme is always used. + + +### Exit Design when going to Application Environment + +If this option is checked, when the user switches to the Application environment using the **Test Application** menu command, all the windows of the Design environment are closed. If this option is not checked (factory setting), the windows of the Design environment remain visible in the background of the Application environment. + + +### Enable binary database creation + +If you check this option, two items are added in the **File > New** menu and the **New** toolbar button: + +* **Database...** +* **Database from Structure Definition...** + +![](assets/en/Preferences/general5.png) + +These items allow you to create binary databases (see [Creating a new database](https://doc.4d.com/4Dv18R6/4D/18-R6/Creating-a-new-database.300-5217610.en.html) section). They are no longer proposed by default because 4D recommends using project-based architecture for new developments. + +## When creating a new project + +### Use Log File + +When this option is checked, a log file is automatically started and used when a new database is created. For more information, please refer to [Log file (.journal)](Backup/log.md). + +### Create package + +When this option is checked, 4D databases are automatically created in a folder suffixed .4dbase. + +Thanks to this principle, under macOS the database folders appear as packages having specific properties. Under Windows, this has no particular impact. + +### Create `.gitignore` file + +You might need or want git to ignore some files in your new projects. + +You can set this preference by checking the **Create .gitignore file** option. + +![](assets/en/Preferences/gitignore.png) + +When a project is created in 4D and that box is checked, 4D creates a `.gitignore` file at the same level as the `Project` folder (see [Architecture of a Project](Project/architecture.md#gitignore-file-optional)). + +You can define the default contents of the `.gitignore` file by clicking the pencil icon. This will open the .gitignore configuration file in your text editor. The contents of this file will be used to generate the `.gitignore` files in your new projects. + +The [official git documentation](https://git-scm.com/docs/gitignore) is a great resource to understand how `.gitignore` files work. + +### Language of text comparison + +This parameter configures the default language used for character string processing and comparison in new databases. The language choice has a direct influence on the sorting and searching of text, as well as the character case, but it has no effect on the translation of texts or on the date, time or currency formats, which remain in the system language. By default (factory setting), 4D uses the current user language set in the system. + +A 4D database can thus operate in a language different from that of the system. When a database is opened, the 4D engine detects the language used by the data file and provides it to the language (interpreter or compiled mode). Text comparisons, regardless of whether they are carried out by the database engine or the language, are done in the same language. + +When creating a new data file, 4D uses the language previously set in this menu. When opening a data file that is not in the same language as the structure, the data file language is used and the language code is copied into the structure. +> You can modify this parameter for the open database using the Database Settings (see [Text comparison](https://doc.4d.com/4Dv18R6/4D/18-R6/DatabaseData-storage-page.300-5217842.en.html#460252)). + +## Documentation Location + +This area configures access to the 4D HTML documentation displayed in your current browser: + +* When you hit the **F1** key while the cursor is inserted in a 4D class function or command name in the Method editor; +* When you double-click on a 4D command in the **Commands Page** of the Explorer. + + +### Documentation language + +Language of the HTML documentation to display. You can select a documentation in a different language from the application language. + +### Look in the local folder first + +> This option is only taken into account for command documentation access (excluding class functions). + +Sets where 4D will look for documentation pages. + +* When checked (default), 4D first looks for the page in the local folder (see below). If it is found, 4D displays the page in the current browser. If not, 4D automatically looks for it in the on-line documentation Web site. This makes it possible to access the documentation even when you are offline. +* When not checked, 4D looks for the desired page directly in the on-line documentation Web site and displays it in the current browser. If it is not found, 4D displays an error message in the browser. + +### Local folder + +> This option is only taken into account for command documentation access (excluding class functions). + +Indicates the location of the static HTML documentation. By default, this is the \Help\Command\language subfolder. You can view the location by clicking on the menu associated with the area. If this subfolder is not present, the location is shown in red. + +You can modify this location as desired, for example if you want to display the documentation in a language different from that of the application. The static HTML documentation can be located on another volume, on a web server, etc. To designate a different location, click on the **[...]** button next to the entry area and choose a documentation root folder (folder corresponding to the language: `fr`, `en`, `es`, `de` or `ja`). diff --git a/website/translated_docs/pt/Preferences/methods.md b/website/translated_docs/pt/Preferences/methods.md new file mode 100644 index 00000000000000..29082865d17082 --- /dev/null +++ b/website/translated_docs/pt/Preferences/methods.md @@ -0,0 +1,185 @@ +--- +id: methods +title: Methods Page +--- + +This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into two sections accessed using the Theme and Options tabs. + +## Themes + +This page allows selecting, creating, or configuring Method editor themes. A theme defines the font, font size, colors and styles of items displayed in the code editor. + +![](assets/en/Preferences/themes.png) + +### Theme list + +In this list, you select the theme to apply to the code editor. All available themes are displayed, including custom themes (if any). 4D provides two themes by default: + +* **Default Light Theme** +* **Default Dark Theme** + +> Default themes cannot be modified or deleted. + +A **myTheme** theme is automatically added if you already customized method editor styles in previous 4D releases. + +### Creating custom themes + +You can create themes that you can fully customize. To create a theme, select an existing theme and click on the **+** at the bottom of the theme list. You can also add customized themes by copying theme files in the `4D Editor Themes` folder (see below). + +### Custom theme files + +Each custom theme is stored in a single JSON file named *themeName.json* The JSON files for custom themes are stored in the `4D Editor Themes` folder located at the same level as the 4D [preferences file](overview.md#storage). + +If key values are not defined in a custom theme, they default to the values from the *Default Light Theme*. If a JSON theme file is invalid, the *Default Light Theme* is loaded and an error is generated. + +> When a theme file is modified by an external editor, 4D must be restarted to take the modification(s) into account. + +## Theme definition + +Defining a theme means: + +- setting a global font and font size for the whole code editor, +- assigning specific styles and colors to each 4D language element (fields, tables, variables, parameters, SQL, etc.), SQL language element (keywords, functions, etc.), and color backgrounds. + +Combining different colors and styles is particularly useful for code maintenance purposes. + +### Font and Font size + +The **font** and **font size** menus allows you to select the font name and size used in the Method editor entry area for all categories. + +### 4D Language and SQL Language + +You can set different font styles and colors (font color or background color) for each type of language element. You can select the element(s) to customize in the Category list. + + +### Other Styles + +These options configure the various colors used in the Method editor and debugger interfaces. + +![](assets/en/Preferences/categories.png) + + +| | Description | +| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Background color** | Background color of Method editor window. | +| **Border of the running line in the debugger** | Color of the border surrounding the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options) page. | +| **Cursor line background color** | Background color of line containing the cursor. | +| **Execution line background color** | Background color of line being executed in the debugger. | +| **Highlight of the found words** | Highlight color of words found in a search. | +| **Highlight of the parentheses** | Highlight color of corresponding parentheses (used when pairs of parentheses are signaled by highlighting, see [Options](#options)). | +| **Highlight of the blocks** | Highlight color for selected logical blocks when the "Highlight logical blocks" option is enabled in the [Options](#options). | +| **Highlight of the same variable or field** | Highlight color for other occurrences of the same variable or field text when one of the "Highlighting variables and text" option is enabled in the [Options](#options). | +| **Highlight of the running line in the debugger** | Highlight color of the line currently running in the debugger when the "Highlight line running" option is enabled in the [Options](#options). | +| **Selection back color** | Background color of selection. | +| **Suggested text** | Color of autocomplete text suggested by the Method editor. | + + + +## Options + + +This page configures Method editor display options. + +![](assets/en/Preferences/options.png) + + +### Options + + + +#### 4D Programming Language (Use regional system settings) + +Allows you to disable/enable the "international" code settings for the local 4D application. +- **unchecked** (default): English-US settings and the English programming language are used in 4D methods. +- **checked**: Regional settings are used in 4D methods. + +> If you modify this option, you need to restart the 4D application so that the change is taken into account. + +#### Indentation + +Changes the indentation value for the 4D code in the Method editor. The width must be specified in points (10 by default). + +4D code is automatically indented in order to reveal its structure: + +![](assets/en/Preferences/optionsIndent.png) + +Modifying this default value can be useful if your methods contain complex algorithms with many levels of embedding. Narrower indentation can be used in order to limit horizontal scrolling. + +#### Show Line Numbers + +Lets you display the line numbers by default in each window of the Method editor. You can also show/hide line numbers for the current window directly from the Method editor. + +#### Show Lists + +Lets you choose whether or not to show the lists of objects (Commands, Tables and fields, etc.) by default when the Method editor window is opened. You can also show or hide each list directly from the Method editor. + +#### Highlight the logical blocks + +When checked, the whole code belonging to a logical block (If/End if for example) is highlighted when the mouse is placed over the expanded node: + +![](assets/en/Preferences/optionsLogicalBlocks.png) + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Always show block lines + +Allows to hide vertical block lines permanently. The block lines are designed to visually connect nodes. By default, they are always displayed (except when collapse/expand icons are hidden, see below). + +![](assets/en/Preferences/optionsBlockLines.png) + +#### Hide collapse/expand icons + +Allows you to hide all expand/collapse icons by default when displaying code. When the option is checked, node icons (as well as local block lines, see above), are displayed temporarily when the mouse is placed over a node: + +![](assets/en/Preferences/optionsHideIcons.png) + +#### Insert () and closing } ) ] " + +Enables automatic insertion of () and closing braces while typing code. This option controls two automatic features: + +- **parentheses pair ()**: Added after a 4D command, keyword or project method inserted from a suggestion or completion list, if the inserted element requires one or more mandatory arguments. For example, if you type "C_OB" and press Tab, 4D writes "C_OBJECT()" and sets the insertion point inside the (). + +- **closing }, ), ], or "**: Character added when you type respectively an opening {, (, ], or ". This feature allows inserting matching pairs of symbols at the insertion point or surrounding a selected text. For example, if you highlight a string and type a single ", the whole selected string will be enclosed in "": + +![](assets/en/Preferences/optionsClosing.png) -> " -> ![](assets/en/Preferences/optionsClosing2.png) + +#### Matching [](){}"" + +Sets the graphic signaling of matching braces and double quotes in the code. This signaling appears whenever a square bracket, parenthesis, curly bracket, or double quote is selected. The following options are available: + +- **None**: No signaling +- **Rectangle** (default): Braces/double quotes surrounded by a black line + ![](assets/en/Preferences/optionsRectangle.png) +- **Background Color**: Braces/double quotes highlighted (the color is set in the [Theme](#theme-definition) page). +- **Bold**: Braces/double quotes displayed in bold. + +#### Highlighted variables and fields + +Allows to highlight all occurrences of the same variable or field in an open method window. + +![](assets/en/Preferences/optionsVariables.png) + +- **No**(default): No highlight +- **On cursor**: All occurrences are highlighted when the text is clicked +- **On selection**: All occurrences are highlighted when the text is selected + +The highlight color can be set in the [Theme](#theme-definition) page. + +#### Debug (Highlight the line running) + +Highlights the line that is currenty running in the debugger in addition to the regular yellow arrow indicator. + +![](assets/en/Preferences/optionsLine.png) + +If you deselect this option, only the yellow arrow is shown. + +### Suggestions + +This area lets you configure autocomplete mechanisms in the Method editor to adapt it to your own work habits. + +| | Description | +| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Automatic opening of window for | Triggers the automatic display of the suggestion window for:

            • Constants
            • Variables (local and interprocess) and object attributes
            • Tables
            • Prototypes (*i.e.*, class functions)

            For example, when the "Variables (local or interprocess) and object attributes" option is checked, a list of suggestions appears when you type the $ character:

            ![](assets/en/Preferences/suggestionsAutoOpen.png)

            You can disable this functioning for certain elements of the language by deselecting their corresponding option. | +| Validation of a suggestion for | Sets the entry context that allows the Method editor to validate automatically the current suggestion displayed in the autocomplete window.

            • **Tab and delimiters**
              When this option is selected, you can validate the current selection with the Tab key or any delimiter that is relevant to the context. For example, if you enter "ALE" and then "(", 4D automatically writes "ALERT(" in the editor. Here is the list of delimiters that are taken into account:
              ( ; : = < [ {
            • **Tab only**
              When this option is selected, you can only use the Tab key to insert the current suggestion. This can be used more particularly to facilitate the entry of delimiter characters in element names, such as ${1}.

              **Note**: You can also double-click in the window or press the Carriage return key to validate a suggestion.

            | + + diff --git a/website/translated_docs/pt/Preferences/overview.md b/website/translated_docs/pt/Preferences/overview.md new file mode 100644 index 00000000000000..2a3c6d936d1e6a --- /dev/null +++ b/website/translated_docs/pt/Preferences/overview.md @@ -0,0 +1,43 @@ +--- +id: visão Geral +title: Visão Geral +--- + +User preferences specify various settings affecting your working environment, e.g. default options, display themes, method editor features, shortcuts, etc. They are applied to all projects opened with your 4D or 4D Server application. + +**4D Server**: Object locking occurs when two or more users try to modify the settings in the Preferences dialog box at the same time. Only one user can use the Preferences dialog box at a time. +> 4D offers a different set of parameters specific to the open projet: **Settings** (available from the **Design** menu). For more information, refer to the Settings chapter. + +## Access + +You can access the Preferences dialog box from the **Edit > Preferences...** menu (Windows) or the **4D** Application menu (macOS): + +![](assets/en/Preferences/overviewAccess.png) + +This menu option is available even when there is no open project. + +You can also display the Preferences dialog box in Application mode using the "Preferences" standard action (associated with a menu item or a button) or using the `OPEN SETTINGS WINDOW` command. + +## Storage + +Settings made in the Preferences dialog box are saved in an XML format preferences file named **4D Preferences vXX.4DPreferences** that is stored in the active 4D folder of the current user, as returned by the [`Get 4D folder`](https://doc.4d.com/4Dv18R6/4D/18-R6/Get-4D-folder.301-5198423.en.html) command: + +* Windows: `{disk}\Users\{UserName}\AppData\Roaming\4D` +* macOS: `{disk}:Users:{UserName}:Library:Application Support:4D` + +## Customizing parameters and reset settings + +In settings dialog boxes, parameters whose values have been modified appear in bold: + +![](assets/en/Preferences/overviewUser.png) + +Preferences indicated as customized may have been modified directly in the dialog box, or may have been modified previously in the case of a converted database. + +A parameter still appears in bold even when its value is replaced manually with its default values. This way it is always possible to visually identify any parameters that have been customized. + +To reset the parameters to their default values and remove the bold style indicating that they have been customized, click on the **Reset to factory settings** button: + +![](assets/en/Preferences/overviewSettings.png) + +This button resets all the parameters of the current page. It becomes active when at least one parameter has been modified on the current page. + diff --git a/website/translated_docs/pt/Preferences/shortcuts.md b/website/translated_docs/pt/Preferences/shortcuts.md new file mode 100644 index 00000000000000..ce039b2d7f044c --- /dev/null +++ b/website/translated_docs/pt/Preferences/shortcuts.md @@ -0,0 +1,14 @@ +--- +id: shortcuts +title: Shortcuts Page +--- + +This page lists all the shortcuts used in the 4D Design environment (except for standard "system" shortcuts, such as Ctrl+C/Command+C for the Copy command). + +![](assets/en/Preferences/shortcuts.png) + +To modify a shortcut, you can select/deselect the item to modify (Shift, Alt or letter key) in the list. You can also double-click on a shortcut to configure it using a specific dialog box. + +Note that each shortcut implicitly includes the **Ctrl** (Windows) or **Command** (macOS) key. + +If you edit this list, your custom shortcuts settings are stored in a *4DShortcutsvXX.xml* file, created at the same level as the [user preferences file](overview.md#storage). Hence, each time 4D is updated your keyboard shortcut preferences remain. \ No newline at end of file diff --git a/website/translated_docs/pt/Preferences/structure.md b/website/translated_docs/pt/Preferences/structure.md new file mode 100644 index 00000000000000..e3884dc4ca10b4 --- /dev/null +++ b/website/translated_docs/pt/Preferences/structure.md @@ -0,0 +1,26 @@ +--- +id: structure +title: Structure Page +--- + +## Primary key + +These options in the preferences modify the default name and type of the primary key fields that are added automatically by 4D when new tables are created or by means of the [Primary key manager](https://doc.4d.com/4Dv18R6/4D/18-R6/Primary-key-manager.300-5217742.en.html)). + +The following options are available: + +* **Name** ("ID" by default): Sets the default name of primary key fields. You can use any name you want, as long as it respects the [4D naming rules](Concepts/identifiers.md#tables-and-fields). +* **Type** ([Longint](Concepts/dt_number.md) by default): Sets the default type of primary key fields. You can choose the UUID type. In this case, the primary key fields created by default are of the [Alpha type](Concepts/dt_string.md) and have the **UUID Format** and **Auto UUID** field properties checked. + +## Editor de estrutura + +This group of options configures the display of the 4D Structure editor. + +### Graphic quality of the structure + +This option varies the level of graphic detail in the Structure editor. By default, the quality is set to **High**. You can select Standard quality in order to give priority to display speed. The effect of this setting is mainly perceptible when using the zoom function (see the "Zoom" paragraph in [Structure editor](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html)). + +### When a folder is dimmed, its contents are: + +This option sets the appearance of dimmed tables in the Structure editor, when you carry out selections by folder (see [Highlight/dim tables by folder](https://doc.4d.com/4Dv18R6/4D/18-R6/Structure-editor.300-5217734.en.html#4592928)). The possible options are Dimmed (a shadow replaces the table image) and Invisible (the table disappears completely). + diff --git a/website/translated_docs/pt/Project/architecture.md b/website/translated_docs/pt/Project/architecture.md index 2d5d0a61110f2f..241abc818bac22 100644 --- a/website/translated_docs/pt/Project/architecture.md +++ b/website/translated_docs/pt/Project/architecture.md @@ -1,90 +1,91 @@ --- id: architecture -title: Architecture of a 4D project +title: Architecture of a project --- -A 4D project is made of several folders and files, stored within a single parent database folder (package folder). For example: - -- MyProject - - Components - - Data - - Logs - - Settings - - Documentation - - Plugins - - Project - - DerivedData - - Sources - - Trash - - Resources - - Settings - - userPreference.username - - WebFolder +A 4D project is made of several folders and files, stored within a single parent application folder (package folder). For example: + +- MyProject + - `Components` + - `Data` + - `Logs` + - `Settings` + - `Documentation` + - `Plugins` + - `Project` + - `DerivedData` + - `Sources` + - `Trash` + - `Resources` + - `Settings` + - `userPreferences.jSmith` + - `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 - + Classes - + DatabaseMethods - + Methods - + Forms - + TableForms - + Triggers -+ DerivedData -+ Trash (if any) +- `.4DProject` file +- `Sources` + + `Classes` + + `DatabaseMethods` + + `Methods` + + `Forms` + + `TableForms` + + `Triggers` +- `DerivedData` +- `Trash` (if any) -### *databaseName*.4DProject file -Project development file, used to designate and launch the project. This file can be opened by: +### `.4DProject` file -- 4D Developer -- 4D Server (read-only, see [Developing a project](developing.md)) +Project development file, used to designate and launch the project. This file can be opened by: -**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. +- 4D +- 4D Server (read-only, see [Opening a remote project](Desktop/clientServer.md#opening-a-remote-project)) -### Sources folder +> In 4D projects, development is done with 4D and multi-user development is managed through source control tools. 4D Server can open .4DProject files for testing purposes. -| 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 | +### `Sources` -#### DatabaseMethods 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. 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 | -| Contents | Description | Format | -| ------------------------ | ---------------------------------------------------------------------- | ------ | -| *databaseMethodName*.4dm | Database methods defined in the database. One file per database method | text | +#### `DatabaseMethods` -#### Methods folder +| Contents | Description | Format | +| ------------------------ | --------------------------------------------------------------------- | ------ | +| *databaseMethodName*.4dm | Database methods defined in the project. One file per database method | text | -| Contents | Description | Format | -| ---------------- | ------------------------------------------------------------ | ------ | -| *methodName*.4dm | Project methods defined in the database. One file per method | text | +#### `Methods` +| Contents | Description | Format | +| ---------------- | ----------------------------------------------------------- | ------ | +| *methodName*.4dm | Project methods defined in the project. One file per method | text | -#### Classes folder +#### `Classes` | 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 | -#### Forms folder +#### `Forms` | Contents | Description | Format | | ----------------------------------------- | ------------------------------------------ | ------- | @@ -93,8 +94,7 @@ Project development file, used to designate and launch the project. This file ca | *formName*/Images/*pictureName* | Project form static picture | picture | | *formName*/ObjectMethods/*objectName*.4dm | Object methods. One file per object method | text | - -#### TableForms folder +#### `TableForms` | Contents | Description | Format | | ---------------------------------------------------- | ------------------------------------------------------ | ------- | @@ -107,43 +107,49 @@ Project development file, used to designate and launch the project. This file ca | *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 | +#### `Triggers` -#### 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 | - +| Contents | Description | Format | +| ------------- | ------------------------------------------------------------------------------------------ | ------ | +| table_*n*.4dm | Trigger methods defined in the project. One trigger file per table (n is the table number) | text | **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 + +### `Trash` The Trash folder contains methods and forms that were deleted from the project (if any). It can contain the following folders: -- Methods -- Forms -- TableForms +- `Methods` +- `Forms` +- `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 + +### `DerivedData` 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 +## `Libraries` + +> This folder is used on macOS only. + +The Librairies folder contains the file resulting from a compilation with the [Silicon compiler](compiler.md#silicon-compiler) on macOS. -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*. +## `Resources` + +The Resources folder contains any custom project 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*. | Contents | Description | Format | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| *item* | Database resource files and folders | various | +| *item* | Project 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 | - (*) only if the project was exported from a .4db binary database. -## Data folder + +## `Data` The data folder contains the data file and all files and folders relating to the data. @@ -153,23 +159,22 @@ The data folder contains the data file and all files and folders relating to the | 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 | - (*) 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 +### `Settings` -This folder contains **user settings files for data** used for database administration. +This folder contains **user settings files for data** used for application administration. -> These settings take priority over **[user settings files](#settings-folder-1)** and **structure settings** files. +> These settings take priority over **[user settings files](#settings-folder-1)** and **[structure settings](#sources-folder)** files. -| 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 | +| Contents | Description | Format | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | +| directory.json | Description of 4D groups, users, and their access rights when the application is run with this data file. | JSON | +| 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 | -### Logs folder +### `Logs` The Logs folder contains all log files used by the project. Log files include, in particular: @@ -179,52 +184,59 @@ 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. +> An additional Logs folder is available in the system user preferences folder (active 4D folder, see [Get 4D folder](https://doc.4d.com/4Dv18R4/4D/18-R4/Get-4D-folder.301-4982857.en.html) command) for maintenance log files and in cases where data folder is read-only. -## Settings folder +## `Settings` -This folder contains **user settings files** used for database administration. File are added to the folder when necessary. +This folder contains **user settings files** used for application administration. -> If a data settings file exists in a Settings folder [in the data folder](#settings-folder), it takes priority over user settings file. +> These settings take priority over **[structure settings](#sources-folder)** files. However, if a **[user settings file for data](#settings-folder)** exists, it takes priority over user settings file. | 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 | +| directory.json | Description of 4D groups and users for the application, as well as their access rights | JSON | | 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.` +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: -## userPreferences.*userName* folder +| 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 | +| preferences.4DPreferences | Rota de dados atual e posições da janela principal | XML | +| CompilerIntermediateFiles | Intermediate files resulting from Apple Silicon compilation | Folder | -This folder contains files that memorize user configurations, e.g. break point positions. 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 | +## `Components` +This folder contains the components to be available in the application project. It must be stored at the same level as the Project folder. -## Components folder +> An application project can be used itself as a component: - for development: put an alias of the .4dproject file in the Components folder of the host project. - for deployment: [build the component](Desktop/building.md#build-component) and put the resulting .4dz file in a .4dbase folder in the Components folder of the host application. -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. -> 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` -## Plugins folder +This folder contains the plug-ins to be available in the application project. It must be stored at the same level as the Project 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. -## Documentation folder +## `Documentation` This folder contains all documentation files (.md) created for the project elements such as classes, methods, or forms. Documentation files are managed and displayed in the 4D Explorer. For more information, refer to [Documenting a project](Project/documentation.md). -## WebFolder +## `WebFolder` + +Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. + +## `.gitignore` file (optional) -Defaut root folder of the 4D Web server for pages, pictures, etc. It is automatically created when the Web server is launched for the first time. \ No newline at end of file +File that specifies which files will be ignored by git. You can include a gitignore file in your projects using the **Create .gitignore file** option on the **General** page of the preferences. To configure the contents of that file, see [Create `.gitignore` file](Preferences/general.md#create-gitignore-file). diff --git a/website/translated_docs/pt/Project/building.md b/website/translated_docs/pt/Project/building.md index f1555001c3f025..e514c243fec36a 100644 --- a/website/translated_docs/pt/Project/building.md +++ b/website/translated_docs/pt/Project/building.md @@ -82,11 +82,7 @@ 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. -If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: - -< - -p>*\/Components/name.4dbase/\.4DZ*. +If you have named your application, *MyComponent*, 4D will create a Components folder containing *MyComponent.4dbase* folder: *\/Components/name.4dbase/\.4DZ*. 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). diff --git a/website/translated_docs/pt/Project/compiler.md b/website/translated_docs/pt/Project/compiler.md new file mode 100644 index 00000000000000..f407097b8161a6 --- /dev/null +++ b/website/translated_docs/pt/Project/compiler.md @@ -0,0 +1,332 @@ +--- +id: compiler +title: Compilation +--- + +You can compile your projects, i.e., translate all of your methods into machine language. Compiling a project lets you check the consistency of the code and accelerate its execution, as well as making it possible to obfuscate the code in its entirety. Compilation is an indispensable step between the development of projects using 4D and their deployment as stand-alone applications. + + +## Compile + +The compilation is handled from your 4D application and is entirely automatic. + +> On macOS, the compilation requires that you install `Xcode`. See [this section](#silicon-compiler) for more information about this requirement. + +1. Open the compiler window by selecting the **Compiler...** command in the **Design** menu or the **Compiler** toolbar button. + + ![](assets/en/Project/compilerWin1.png) + + ![](assets/en/Project/comp1.png) + +> You can also launch directly the compilation by selecting the **Start Compilation** menu item from the **Design** menu. + +2. Click the **Compile** button to launch the compilation using the current [compilation settings](#compiler-settings). + +If no errors are detected, the actual compilation begins and the "Compilation successful" message is displayed at the bottom of the window when the compilation is completed: + +![](assets/en/Project/success.png) + +You can immediately [run your application in compiled mode](#run-compiled) and see how faster it is. + +If errors are detected, the process is stopped and the "Compilation failed" message is displayed. The information area of the window displays the method names and line numbers concerned in a hierarchical list: + +![](assets/en/Project/compilerWin2.png) + +Double-click on each error detected to open the method or class concerned directly in the 4D method editor. The line containing the error is highlighted and the type of error is displayed in the syntax area of the window. + +Use the **Previous Error** / **Next Error** commands of the **Method** menu to navigate from one error to the next. + +The number of errors found during your first compilations may be daunting, but do not let this put you off. You will soon discover that they often spring from the same source, i.e., non-compliance with certain project conventions. The compiler always provides a [precise diagnosis](#error-files) of the errors in order to help you correct them. + +> Compilation requires an appropriate license. Without this license, it is not possible to carry out a compilation (buttons are disabled). Nevertheless, it is still possible to check the syntax and generate Typing methods. + +## Run Compiled + +Once a project is compiled, it is possible to switch from [interpreted mode to compiled mode](Concepts/interpreted.md), and vice versa, at any time and without having to quit the 4D application (except when the interpreted code has been removed). To do this, use tge **Restart Interpreted** and **Restart Compiled** commands of the **Run** menu. The [Open project dialog box](creating.md#options) also offers a choice between interpreted or compiled mode for database startup. + +When you switch from one mode to the other, 4D closes the current mode and opens the new one. This is equivalent to exiting and reopening the application. Each time you change from one mode to another, 4D executes the two following database methods (if specified) in this order: `On Exit` -> `On Startup`. + +If you modify your project in interpreted mode, you must recompile it in order to have your edits taken into account in compiled mode. + +## Compiler window features + +In addition to the [**Compile** button](#compile), the Compiler window provides additional features that are useful during the project development phase. + +### Check Syntax + +The **Check Syntax** button starts the execution of the syntax-checking phase. At the end of the checking process, any errors detected are listed in the information area. You can double–click on an error line in order to display the corresponding method. + +Syntax checking can also be launched directly using the **Check Syntax** command associated with the **Compiler** toolbar button. This option is the only one available if you do not have a suitable license to allow the compilation of applications. + +### Generate Typing + +The **Generate Typing** button creates or updates typing compiler methods. Compiler methods are project methods that group together all the variable and array typing declarations (process and interprocess), as well as the method parameters. These methods, when they exist, are used directly by the compiler during code compilation, resulting in faster compilation times. + +The name of these methods must begin with `Compiler_`. You can set the default name for each of the 5 compiler methods in the [compiler settings window](#compiler-methods-for). The compiler methods that are generated and maintained by 4D automatically have the `Invisible` attribute: + +![](assets/en/Project/compilerWin3.png) + +Only the necessary compiler methods (i.e., those for which items already exist in the project) are generated. + +The information area indicates any errors found during method creation or updating. Double-clicking on an error line causes the method and line concerned to be displayed in the Method editor. + + +### Clear compiled code + +The **Clear compiled code** button deletes the compiled code of the project. When you click on it, all of the [code generated during compilation](#classic-compiler) is deleted, the **Restart Compiled** command of the **Run** menu is disabled and the "Compiled Project" option is not available at startup. + + +### Show/Hide Warnings + +Warnings are specific messages generated by the compiler when it checks the syntax. These messages are intended to draw your attention to statements that might lead to execution errors. They do not prevent compilation. + +Depending on circumstances and the programming style used, these warnings may be more or less relevant. You can toggle the warnings on or off by clicking the **Show/Hide Warnings** button: + +![](assets/en/Project/compilerWin4.png) + +When this option is checked, the warnings (if any) are displayed in the window, after the other error types. They appear in italics: + +![](assets/en/Project/compilerWin5.png) + +Double-clicking a warning opens the corresponding method. + +#### Disabling warnings during compilation + +You can selectively disable certain warnings during compilation by inserting the following into the code of a 4D method: + +```4d + //%W- +``` + +Only warnings with numbers can be disabled. Warning numbers are specified at the end of each message in the list of compilation errors. For example, to disable the following warning: + +*1: Pointer in an array declaration (518.5)* + +... you just need to write the following comment in a 4D method, preferably a `COMPILER_xxx` method (method compiled first): + +```4d + //%W-518.5 +``` + + + +## Compiler Settings + +The "Compiler" page of the Settings dialog box lets you set parameters related to project compilation. You can directly open this page from the [compiler window](#compiler-window) by clicking on the **Compiler Settings** button: + +![](assets/en/Project/compilerWin6.png) + + +### Compilation options + +This area groups the generic options used during the compilation process. + +#### Generate the symbol file + +Used to generate the symbol file (see [symbol file](#symbol-file)). The symbol file is created in the project folder with the name `ProjectName_symbols.txt`. + +#### Generate error file + +Used to generate the error file (see [error file](#symbol-file)) at the time of syntax checking. The error file is created in the project folder with the name `ProjectName_errors.xml`. + + +#### Compilation Path + +Used to set the number of passes (code parsing) performed by the compiler and thus the duration of compilation. + +- **Type the variables**: Passes by all the stages that make compilation possible. +- **Process and interprocess are typed**: The pass for typing process and interprocess variables is not carried out. This option can be used when you have already carried out the typing of all your process and interprocess variables either yourself or using the function for automatic generation of compiler methods. +- **All variables are typed**: The pass for typing local, process and interprocess variables is not carried out. Use this option when you are certain that all the process, interprocess and local variables have been clearly typed. + +#### Compilation Target + +

            History +| Version | Changes | +| ------- | ------- | +| v19 | Added | +
            + +This setting allows you to select the processor family for which your 4D project must be natively compiled. The 4D compiler can build native code for two processor families: + +- **Intel/AMD** processors (all machines), +- **Apple Silicon** processors. + +Two target options are proposed. The result depends on the processor of the machine on which 4D is running. + +| *Option* | *on Windows Intel/AMD* | *on macOS Intel* | *on macOS Silicon* | +| ------------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| **All processors (Intel/AMD and Apple Silicon)** | Code for Intel/AMD
            *It is not possible to produce Apple Silicon code on Windows* | Code for Apple Silicon + Code for Intel/AMD
            *Two compiled codes will be available* | Code for Apple Silicon + Code for Intel/AMD
            *Two compiled codes will be available* | +| **My processor (processor)** | Code for Intel/AMD | Code for Intel/AMD | Code for Apple Silicon | + +> Apple Silicon compiler target requires that the **Clang** application be installed on your machine. Clang comes with the latest version of Xcode. See the [Silicon compiler requirements](#requirements) for more information. + +### Default typing + +Use this area to set the default type for ambiguous database objects. + +- **Numeric**: Used to force numeric typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. You can optimize the running of your database by choosing the Longint type. +- **Button**: Used to force button typing in an unambiguous manner, either in real or longint. This will not override the directives you may have set in your project. This type applies to buttons as well as check boxes, picture buttons, button grids, radio buttons, picture pop-up menus and drop-down lists. + +### Compiler Methods for... + +This area lets you rename the Compiler methods that are generated automatically by the compiler when you click [Generate Typing](#generate-typing). + +Up to 5 compiler methods may be generated; a compiler method is only generated if the project contains the following items: + +- **Variables**: Groups together process variable declarations; +- **Interprocess Variables**: Groups together interprocess variable declarations; +- **Arrays**: Groups together process array declarations; +- **Interprocess Arrays**: Groups together interprocess array declarations; +- **Methods**: Groups together method parameter declarations (for instance, `C_LONGINT(mymethod;$1;$2)`). + +You can rename each of these methods in the corresponding areas, but they will always be preceded by the label `Compiler_` (non-modifiable). The name of each method (prefix included) must be no longer than 31 characters. It must also be unique and comply with [4D rules for naming methods](Concepts/identifiers.md#project-methods). + + +## Compilation tools + +### Symbol file + +If you check the [**Generate the symbol file**](#generate-the-symbol-file) option in the compiler settings, a symbol file called `ProjectName_symbols.txt` is created in the project folder during compilation. It is divided into several parts: + +#### List of process and interprocess variables + +These two lists contain four columns: + +- Names of process and interprocess variables and arrays used in your project. These variables are listed in alphabetical order. +- Type of the variable. Types are set by compiler directive commands or are determined by the compiler based on the use of the variable. If the type of a variable cannot be determined, the column is empty. +- Number of dimensions if the variable is an array. +- Reference to the context in which the compiler established the type of the variable. If the variable is used in several contexts, the context mentioned is the one used by the compiler to determine its type. + - If the variable was found in a database method, the database method name is given, preceded by (M)*. + - If the variable was found in a project method, the method is identified as it has been defined in 4D, preceded by (M). + - If the variable was found in a trigger, the table name is given, preceded by (TM). + - If the variable was found in a form method, the form name is given, preceded by the table name and (FM). + - If the variable was found in an object method, the object method’s name is given, preceded by the form name, table name, and by (OM). + - If the variable is an object in a form and does not appear in any project, form, object method, or trigger, the name of the form in which it appears is given, preceded by (F). At the end of each list, you can find the sizes of the process and interprocess variables in bytes. + +> When compiling, the compiler cannot determine in which process a given process variable is used. A process variable can have a different value in each process. Consequently, all process variables are systematically duplicated as each new process is launched: it is thus advisable to watch out for the amount of memory that they will take up. Also, keep in mind that the space for process variables is not related to the stack size for the process. + +#### List of local variables + +The list of local variables is sorted by database method, project method, trigger, form method, and object method, in the same order as in 4D. + +This list is divided into three columns: + +- list of local variables used in the method; +- type of the variable; +- number of dimensions if the variable is an array. + +#### Complete list of methods + +A complete list of your database and project methods is given at the end of the file with: + +- their type (procedure or function returning a value) +- the data types of their parameters and the returned result +- the number of calls +- the Thread Safe or Thread Unsafe property. + +This information appears as follows: + +``` +Procedure or Function (parameter data types): +result data type, number of calls, Thread Safe or Thread Unsafe +``` + +### Error file + +You can choose whether or not to generate an error file during compilation using the [**Generate error file**](#generate-error-file) option in the compiler settings. The error file is automatically named `projectName_errors.xml` and is placed in the project folder. + +Although the errors can be accessed directly via the [compiler window](#compile), it can be useful to have an error file that can be transmitted from one machine to another. The error file is generated in XML format in order to facilitate automatic parsing of its contents. It also allows the creation of customized error display interfaces. + +The length of the error file depends on the number of errors and warnings issued by the compiler. + +The structure of the error file is as follows: + +- At the top of the file is the list of errors and warnings, sorted by method and in their order of creation in 4D. In the ***General errors*** section, all the typing impossibilities and identity ambiguities are grouped together. These errors and warnings are listed using the following format: + - line number in the method (0 indicates general errors) + - warning attribute indicating whether the detected anomaly is a warning (warning="true") or an error (warning="false") + - diagnostic describing the error + +If your project does not have any general errors, the file will not have a *General errors* section. + +An error file may contain three types of messages: + +- **Errors linked to a specific line**: these errors are displayed in context — the line in which they were found — with an explanation. The compiler reports this type of error when it encounters an expression in which it sees an inconsistency related to data type or syntax. In the compiler window, double–click on each error detected in order to open the method concerned directly in the 4D Method editor, with the line containing the error highlighted. + +- **General errors**: These are errors that make it impossible to compile the project. There are two cases in which the compiler reports a general error: + - The data type of a process variable could not be determined. + - Two different kinds of objects have the same name. General errors are so named because they cannot be linked to any specific method. In the first case, the compiler could not perform a specified typing anywhere in the project. In the second, it was unable to decide whether to associate a given name with one object rather than with another. + +- **Warnings**: Warnings are not errors. They do not prevent the project from being compiled, but simply point out potential code errors. In the compiler window, warnings appear in italics. Double-click on each warning to open the method concerned directly in the 4D Method editor, with the line containing the warning highlighted. + + + + +### Range checking + +The code generated by the 4D compiler automatically checks that every access to an array element or a character reference is done within the actual range of array elements or string characters. Out of range accesses will provoke runtime execution errors. + +In some cases, you might prefer range checking not to apply to certain parts of the code that are considered to be reliable. More particularly, in the case of loops that are repeated a great number of times, and when running the compiled database on older machines, range checking can significantly slow down processing. If you are absolutely certain that the code concerned is reliable and cannot cause system errors, you can disable range checking locally. + +To do this, you must surround the code to be excluded from range checking with the special comments `//%R-` and `//%R+`. The `//%R-` comment disables range checking and `//%R+` enables it again: + +```4d + // %R- to disable range checking + + ... //Place the code to be excluded from range checking here + + // %R+ to enable range checking again for the rest +``` + +## About Compilers + +4D contains two compilers: + +- a "classic" compiler, used to compile native code for Intel/AMD processors; +- a Silicon compiler, used to compile native code for Apple Silicon processors. + +The classic compiler can be used on any platform, while the Silicon compiler can only be used on a Mac machine: + +| | Compile for Windows | Compile for Intel Mac | Compile for Silicon Mac | +| -------------- |:-------------------:|:---------------------:|:-----------------------:| +| On Windows | ✓ | ✓ | ✗ | +| On Intel Mac | ✓ | ✓ | ✓ | +| On Silicon Mac | ✓ | ✓ | ✓ | + + +Both compilers are integrated into 4D. The appropriate compiler is automatically selected depending on the [compilation target](#compilation-target) option. + + + +### Classic Compiler + +The classic compiler generates native compiled code for Intel/AMD processors on any machines. It does not require any specific configuration. + +Resulting compiled code is stored in the [DerivedData](architecture.md#deriveddata-folder) folder of the project. + + +### Silicon Compiler + +The Silicon compiler generates native compiled code for Apple Silicon processors, such as *Apple M1*. + +Resulting compiled code is stored in the [Libraries](architecture.md#libraries-folder), folder of the project. + + +#### Requisitos + +- **Apple machine**: The Silicon compiler can only be run from an Apple machine. +- **4D Project architecture**: The Silicon compiler is only available for 4D developments using [project architecture](architecture.md). +- **Xcode or Developer Tools**: The Silicon compiler calls the **Clang** open-source macOS compiler to compile the project from C++ code at the [second step](#two-step-incremental-compiler) of compilation. *clang* requires Apple native libraries, which are provided by either the **Xcode** or **Developer Tools** package. + - **If you already have** Xcode or Developer Tools installed on your computer, you only need to make sure that its version is compliant with 4D requirements. + - **If you do not have** any of these tools installed on your computer, you will need to download one of them from the Apple Developer web site. + +> We recommend to install **Xcode**, which is quite simple to install. You can decide to install **Developer Tools** which is more compact, however its installation is a little more complex. + +In any cases, the 4D Silicon compiler will warn you if your configuration does not comply with its requirements. + + +#### Incremental compiler + +The Silicon compiler is incremental, which means that: + +- During the very first compilation, **all 4D methods** are compiled. This step could take a certain time. However it only occurs once. +- During all subsequent compilations, only **new or modified methods** are processed, thus reducing drastically the compilation time. \ No newline at end of file diff --git a/website/translated_docs/pt/Project/components.md b/website/translated_docs/pt/Project/components.md new file mode 100644 index 00000000000000..95a3ed892cb231 --- /dev/null +++ b/website/translated_docs/pt/Project/components.md @@ -0,0 +1,29 @@ +--- +id: components +title: 4D Components Library +--- + +4D includes an extended library of built-in 4D components. A [component](Concepts/components.md) provides additional functionalities to your 4D projects. + +## List of 4D Components + +| Component Name | Description | Where to find documentation | +| --------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| 4D Mobile App Server | Set of utility classes and functions to authenticate, manage sessions, and develop mobile applications | [4d-go-mobile github repository](https://github.com/4d-go-mobile/4D-Mobile-App-Server) | +| 4D Progress | Open one or more progress bars in the same window | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Progress.100-5461799.en.html) | +| 4D SVG | Create and manipulate common svg graphic objects | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-SVG-Component.300-5462064.en.html) | +| 4D ViewPro | Spreadsheet features in your forms | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-View-Pro-Reference.100-5442901.en.html) | +| 4D Widgets | Manage DatePicker, TimePicker, SearchPicker 4D widgets | [doc.4d.com](https://doc.4d.com/4Dv19/4D/19/4D-Widgets.100-5462909.en.html) | +| 4D WritePro Interface | Manage 4D Write Pro palettes | [4d github repository](https://github.com/4d/4D-WritePro-Interface) | + + +> You can develop and install your own 4D components. See [this section](Concepts/components.md) for more information. + + +## Documentation in the Explorer + +When an installed component contains methods, they appear in the **Component Methods** theme of the Explorer's Methods page. + +Select a component method and click on the **Documentation** button of the Explorer to get information about it, [if any](documentation.md). + +![alt-text](assets/en/Project/compDoc.png) \ No newline at end of file diff --git a/website/translated_docs/pt/Project/creating.md b/website/translated_docs/pt/Project/creating.md index 950ab3572a10cb..235d62db194e62 100644 --- a/website/translated_docs/pt/Project/creating.md +++ b/website/translated_docs/pt/Project/creating.md @@ -1,27 +1,115 @@ --- id: creating -title: Creating a 4D project +title: Working with a project --- -## Requirements +4D projects are created and developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). **4D Server** can also create new, empty projects. -New 4D projects can only be created from **4D Developer** (see [Developing a project](developing.md)). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -**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). +## Creating a project -## Creating the project files +New 4D application projects can be created from **4D** or **4D Server**. In any case, project files are stored on the local machine. -To create a new database project: +To create a new project: -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. +1. Launch 4D or 4D Server. +2. Select **New > Project...** from the **File** menu:

            ![](assets/en/getStart/projectCreate1.png)

            OR

            (4D only) Select **Project...** from the **New** toolbar button:

            ![](assets/en/getStart/projectCreate2.png)

            A standard **Save** dialog appears so you can choose the name and location of the 4D project's main folder. -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). +3. Enter the name of your project folder and click **Save**.

            This name will be used: + - as the name of the entire project folder, + - as the name of the .4DProject file at the first level of the "Project" folder. -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 + You can choose any name allowed by your operating system. However, if your 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. + +When you validate the **Save** dialog, 4D closes the current project (if any), creates a project folder at the indicated location, and puts all files needed for the project into it. Para saber mais, consulte [Arquitetura de um projeto 4D](Project/architecture.md). + +You can then start developing your project. + +## Opening a project + +To open an existing project from 4D: + +1. Select **Open a local application project** in the Welcome Wizard dialog,

            OR

            Select **Open/Local Project...** from the **File** menu or the **Open** toolbar button.

            The standard Open dialog appears. + +2. Select the project's `.4dproject` file and click **Open**.

            By default, the project is opened with its current data file. Other file types are suggested: + + - *Packed project files*: `.4dz` extension - deployment projects + - *Shortcut files*: `.4DLink` extension - store additional parameters needed for opening projects or applications (addresses, identifiers, etc.) + - *Binary files*: `.4db` or `.4dc` extension - legacy 4D database formats + +### Options + +In addition to standard system options, the *Open* dialog in 4D provides two menus with specific options that are available using the **Open** button and the **Data file** menu. + +- **Open** - opening mode of the project: + - **Interpreted** or **Compiled**: These options are available when the selected project contains both [interpreted and compiled code](Concepts/interpreted.md). + - **[Maintenance Security Center](MSC/overview.md)**: Opening in secure mode allowing access to damaged projects in order to perform any necessary repairs. + +- **Data file** - specifies the data file to be used with the project. By default, the **Current data file** option is selected. + +## Project opening shortcuts + +4D offers several ways to open projects directly and bypass the Open dialog: + +- via menu options: + - *Menu bar* - **File** > **Open Recent Projects / {project name}** + - *4D Tool bar* - Select the project from the menu associated with the **Open** button + +- via preferences: + - Set the **At startup** general preference to **Open last used project**. + +- using a `.4DLink` file. + +### Opening a Project with a 4DLink file + +You can use a [`.4DLink` file](#about-4DLink-files) to launch the 4D application and open the target 4D project. There are two ways to do this: + +- double-click or drag and drop the `.4DLink` file onto the 4D application +- go to **File** > **Open Recent Projects** and select a project + +![open-recent-projects](assets/en/Project/4Dlinkfiles.png) + +A .4DLink file of "remote project" type can be copied and used on several machines. +> It's also possible to select a 4DLink file in the 4D and 4D Server opening dialog box (opening local project only). + +## About 4DLink Files + +Files with the `.4DLink` extension are XML files that contain parameters intended to automate and simplify opening local or remote 4D projects. + +`.4DLink` files can save the address of a 4D project as well as its connection identifiers and opening mode, saving you time when opening projects. + +4D automatically generates a `.4DLink` file when a local project is opened for the first time or when connecting to a server for the first time. The file is stored in the local preferences folder at the following location: + +- Windows 7 and higher: C:\Users\UserName\AppData\Roaming\4D\Favorites vXX\ +- OS X: Users/UserName/Library/Application Support/4D/Favorites vXX/ + +XX represents the version number of the application. For example, "Favorites v19" for 4D v19. + +That folder is divided into two subfolders: +- the **Local** folder contains the `.4DLink` files that can be used to open local projects +- the **Remote** folder contains the `.4DLink` files of recent remote projects + +`.4DLink` files can also be created with an XML editor. + +4D provides a DTD describing the XML keys that can be used to build a `.4DLink` file. This DTD is named database_link.dtd and is found in the \Resources\DTD\ subfolder of the 4D application. + + +## File saving + +When working on a project in 4D, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Modifications are saved to disk when you select a **Save** menu item, or when the editor's window loses or gets the focus. + +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 development framework includes a file access manager to control concurrent access: + +- if an open file 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 when trying to save the changes: + +![](assets/en/Project/projectReload.png) + - **Yes**: discard editor changes and reload the modified version + - **No**: save changes and overwrite the other version + - **Cancel**: do not save + +This feature is enabled for all built-in 4D editors (Structure, Form, Method, Settings, and Toolbox). \ No newline at end of file diff --git a/website/translated_docs/pt/Project/developing.md b/website/translated_docs/pt/Project/developing.md index 062c69a0b39e46..367541c61f7c4c 100644 --- a/website/translated_docs/pt/Project/developing.md +++ b/website/translated_docs/pt/Project/developing.md @@ -3,31 +3,81 @@ id: developing title: Developing a project --- -## Development tools +4D projects are developed using the **4D** application, which provides a comprehensive Integrated Development Environment (IDE). -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). +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -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. -Multi-user development is managed through standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. -## Project file access +## File saving -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. +When working on a project in 4D, you can use built-in 4D editors to create, modify, or save structure items, methods, forms, etc. Modifications are saved to disk when you select a **Save** menu item, or when the editor's window loses or gets the focus. -The 4D Developer framework includes a file access manager to control concurrent access: +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. -- 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 +The 4D development framework includes a file access manager to control concurrent access: + +- if an open file 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 when trying to save the changes: ![](assets/en/Project/projectReload.png) + - **Yes**: discard editor changes and reload the modified version - **No**: save changes and overwrite the other version - **Cancel**: do not save -This feature is enabled for all built-in editors: +This feature is enabled for all built-in 4D editors (Structure, Form, Method, Settings, and Toolbox). + + + +4D projects are developed using the **4D** application. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project manager, and an application runtime, allowing to develop, test, and debug any kind of project. + +> Because most of the 4D project files are text files, you can use any text editor to work in them. Concurrent file access is handled via a file access manager (see below). + +Multi-user development is managed via standard source control tools, which allow developers to work on different branches, and compare, merge, or revert modifications. + + +## Development configurations + +Interpreted projects (*applicationName.4DProject*, see [Architecture of a 4D project](architecture.md)) can be opened in the following configurations: + +- 4D opening **local project files** - in this case, all aspects of the project are available to the developer. Project files can be created, modified, compiled, etc. The result of the development can be tested at any moment by using the **Test application** menu command from 4D or using the [integrated web server](WebServer/webServerObject.md). +- 4D connection from the **same machine as 4D Server** - in this case, development is supported the same as local projects. This feature allows you to develop a client/server application in the same context as the deployment context ()[detailed below](#developing-projects-with-4d-server)). +- 4D connection from a **remote machine** - in this case, 4D Server sends a .4dz version of the project ([compressed format](Admin/building.md#build-compiled-structure)) to 4D. As a consequence, all structure files are read-only. This feature is useful for testing purposes. + + +## Developing projects with 4D Server + +### Updating project files on the server + +Developing a 4D Server project is based upon the following principles: + +- You create, test, and modify the project features in a local version of the files using 4D. To work directly with 4D Server, you can [use 4D on the same machine as 4D Server](#using-4d-on-the-same-machine). + +> It is recommended to use a standard source control tool (e.g. Git) in order to work with branches, to save projects at different steps, and/or to revert changes if necessary. + +- 4D Server can run the *.4DProject* project file (not compressed) in interpreted mode, so that remote 4D can connect and test the features. For this purpose, 4D Server automatically creates and sends the remote machines a [.4dz version](Admin/building.md#build-compiled-structure) of the project. + +- An updated .4dz version of the project is automatically produced when necessary, *i.e.* when the project has been modified and reloaded by 4D Server. The project is reloaded: + - automatically, when the 4D Server application window comes to the front of the OS or when the 4D application on the same machine saves a modification (see below). + - when the `RELOAD PROJECT` command is executed. Calling this command is necessary for example when you have pulled a new version of the project from the source control platform. + + +### Updating project files on remote machines + +When an updated .4dz version of the project has been produced on 4D Server, connected remote 4D machines must log out and reconnect to 4D Server in order to benefit from the updated version. + + + +### Using 4D on the same machine + +When 4D connects to a 4D Server on the same machine, the application behaves as 4D in single user mode and the design environment allows you to edit project files. Each time 4D performs a **Save all** action from the design environment (explicitly from **File** menu or implicitly by switching to application mode for example), 4D Server synchronously reloads project files. 4D waits for 4D Server to finish reloading the project files before it continues. + +However, you need to pay attention to the following behavior differences compared to [standard project architecture](architecture.md): + +- the userPreferences.{username} folder used by 4D is not the same folder used by 4D Server in the project folder. Instead, it is a dedicated folder, named "userPreferences", stored in the project system folder (i.e., the same location as when opening a .4dz project). +- the folder used by 4D for derived data is not the folder named "DerivedData" in the project folder. Instead it is a dedicated folder named "DerivedDataRemote" located in the project system folder. +- the catalog.4DCatalog file is not edited by 4D but by 4D Server. Catalog information is synchronised using client/server requests +- the directory.json file is not edited by 4D but by 4D Server. Directory information is synchronised using client/server requests +- 4D uses its own internal components and plug-ins instead of those in 4D Server. + +> It is not recommended to install plug-ins or components at the 4D or 4D Server application level. + -- Structure editor -- Form editor -- Method editor -- Settings editor -- Toolbox editor \ No newline at end of file diff --git a/website/translated_docs/pt/Project/documentation.md b/website/translated_docs/pt/Project/documentation.md index 9a6cb54a714bf6..272ee9578f00de 100644 --- a/website/translated_docs/pt/Project/documentation.md +++ b/website/translated_docs/pt/Project/documentation.md @@ -3,9 +3,9 @@ id: documentation title: Documenting a project --- -## Overview -In project databases, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for databases being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the database. + +In application projects, you can document your methods as well as your forms, tables, or fields. Creating documentation is particularly appropriate for projects being developed by multiple programmers and is generally good programming practice. Documentation can contain a description of an element as well as any information necessary to understand how the element functions in the application. The following project elements accept documentation: @@ -21,6 +21,7 @@ Documentation is displayed in the preview area (right-side panel) of the Explore It can also be partially exposed as [code editor tips](#viewing-documentation-in-the-code-editor). + ## Documentation files ### Documentation file name @@ -29,39 +30,40 @@ Documentation files have the same name as their attached element, with the ".md" In the Explorer, 4D automatically displays the documentation file with the same name as the selected element (see below). + ### Documentation file architecture All documentation files are stored in the `Documentation` folder, located at the first level of the package folder. The `Documentation` folder architecture is the following: -- **Documentation** - - + **Classes** +- `Documentation` + + `Classes` * myClass.md - * **DatabaseMethods** + + `DatabaseMethods` * onStartup.md * ... - * **Forms** + + `Forms` * loginDial.md * ... - * **Methods** + + `Methods` * myMethod.md * ... - * **TableForms** - * **1** + + `TableForms` + * **1** - input.md - ... - - ... - - **Triggers** + * ... + + `Triggers` * table1.md * ... -* A project form and its project form method share the same documentation file for form and method. -* A table form and its table form method share the same documentation file for form and method. +- A project form and its project form method share the same documentation file for form and method. +- A table form and its table form method share the same documentation file for form and method. > Renaming or deleting a documented element in your project will also rename or delete the element's associated Markdown file. + ## Documentation in the Explorer ### Viewing documentation @@ -93,6 +95,8 @@ If there is no documentation file for the selected element, you can: If a documentation file already exists for the selected element, you can open it with your Markdown editor by choosing the **Edit Documentation...** option in the contextual menu or options menu of the Explorer. + + ## Viewing documentation in the code editor The 4D code editor displays a part of a method's documentation in its help tip. @@ -104,10 +108,12 @@ If a file named "\.md" exists in "\/documentation" folder, - Any text entered in an HTML `comment` tag (*\*) at the top of the markdown file. - Or, if no html `comment` tag is used, the first sentence after a `# Description` tag of the markdown file. - In this case, the first line contains the **prototype** of the method, automatically generated by the 4D code parser. - + In this case, the first line contains the **prototype** of the method, automatically generated by the 4D code parser. + > Otherwise, the code editor displays [the block comment at the top of the method code](https://doc.4d.com/4Dv18R2/4D/18-R2/Writing-a-method.300-4824019.en.html#4618226). + + ## Documentation file definition 4D uses a basic template to create new documentation files. This template suggests specific features that allow you to [display information in the code editor](#viewing-documentation-in-the-code-editor). @@ -118,116 +124,78 @@ New documentation files are created with the following default contents: ![](assets/en/Project/comments-explo4.png) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            - Line - - Description -
            - \ - - HTML comment. Used in priority as the method description in the code editor tips -
            - ## Description - - Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used -
            - ## Example - - Heading level 2, you can use this area to show sample code -
            - ```4D
            Type your example here ``` -
            - Used to format 4D code examples (uses highlight.js library) -
            +| Line | Description | +| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| "\" | HTML comment. Used in priority as the method description in the [code editor tips](#viewing-documentation-in-the-code-editor) | +| ## Description | Heading level 2 in Markdown. The first sentence after this tag is used as the method description in the code editor tips if HTML comment is not used | +| ## Example | Heading level 2, you can use this area to show sample code | +| \``` 4D
            Type your example here \` `` | Used to format 4D code examples (uses highlight.js library) | -### Supported Markdown +### Supported Markdown - The title tag is supported: - - # Title 1 - ## Title 2 - ### Title 3 - +``` +# Title 1 +## Title 2 +### Title 3 +``` - The style tags (italic, bold, strikethrough) are supported: - _italic_ - **bold** - **_bold/italic_** - ~~strikethrough~~ - - -- The code block tag (```4d ...```) is supported with 4D code highlight: - - \ - - 4d - C_TEXT($txt) - $txt:="Hello world!" - \ +``` +_italic_ +**bold** +**_bold/italic_** +~~strikethrough~~ +``` + + +- The code block tag (\```4d ... ```) is supported with 4D code highlight: + + \``` 4d + C_TEXT($txt) + $txt:="Hello world!" + \` `` + - The table tag is supported: - | Parameter | Type | Description | - | --------- | ------ | ------------ | - | wpArea | String |Write pro area| - | toolbar | String |Toolbar name | - +``` +| Parameter | Type | Description | +| --------- | ------ | ------------ | +| wpArea | String |Write pro area| +| toolbar | String |Toolbar name | +``` + - The link tag is supported: - // Case 1 - The [documentation](https://doc.4d.com) of the command .... - - // Case 2 - [4D blog][1] - - [1]: https://blog.4d.com - +``` +// Case 1 +The [documentation](https://doc.4d.com) of the command .... + +// Case 2 +[4D blog][1] + +[1]: https://blog.4d.com +``` - The image tags are supported: - ![image info](pictures/image.png) - - ![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") - - [![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) - +``` +![image info](pictures/image.png) + +![logo 4D](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo") +[![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) +``` [![logo 4D blog with link](https://blog.4d.com/wp-content/uploads/2016/09/logoOrignal-1.png "4D blog logo")](https://blog.4d.com) > For more information, see the [GitHug Markdown guide](https://guides.github.com/features/mastering-markdown/). + + + ## Example In the `WP SwitchToolbar.md` file, you can write: @@ -261,4 +229,4 @@ $logo:=GetLogo(5) - Explorer view: ![](assets/en/Project/explorer_Doc.png) -- Code editor view: ![](assets/en/Project/comments-explo5.png) \ No newline at end of file +- Code editor view: ![](assets/en/Project/comments-explo5.png) diff --git a/website/translated_docs/pt/Project/licenses.md b/website/translated_docs/pt/Project/licenses.md new file mode 100644 index 00000000000000..f3d9185d7c56bc --- /dev/null +++ b/website/translated_docs/pt/Project/licenses.md @@ -0,0 +1,142 @@ +--- +id: licenses +title: Managing 4D Licenses +--- + +Once installed on your disk, you must activate your 4D products in order to be able to use them. Usually, the activation is automatic if you [sign in using your 4D account](GettingStarted/installation.md) in the Welcome Wizard. + +However, in specific cases you could need to activate your licenses manually, for example in the following cases: + +- your configuration does not allow the automatic activation, +- you have purchased additional licenses. + +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. + +## First activation + +With 4D, select the **License Manager...** command from the **Help** menu of the application. With 4D Server, just launch the 4D Server application. The dialog box for choosing the [activation mode](#activation-mode) appears. + +![](assets/en/getStart/server1.png) + +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: + + + +![](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 . +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: (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: +- Telephone: 1-408-557-4600 + +For the UK: + +- Web: +- Telephone: 01625 536178 \ No newline at end of file diff --git a/website/translated_docs/pt/Project/overview.md b/website/translated_docs/pt/Project/overview.md index f94cdde3c20ce3..47a23283f5c072 100644 --- a/website/translated_docs/pt/Project/overview.md +++ b/website/translated_docs/pt/Project/overview.md @@ -1,35 +1,33 @@ --- -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. +A 4D project contains all of the source code of a 4D application, whatever its deployement type (web, mobile, or desktop), from the database structure to the user interface, including code, forms, menus, user settings, or any required resources. A 4D project is primarily made of text-based files. -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... +4D project files are open and edited using regular 4D platform applications (4D or 4D Server). With 4D, full-featured editors are available to manage files, including a structure editor, a method editor, a form editor, a menu editor... -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. +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 +In addition, 4D project files make it easier to program generically, create application templates, and share code. Project are organized internally in [folders and files](Project/architecture.md). -4D project files make it easier to program generically, create application templates, and share code. -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: +## Development -- Versioning -- Revision comparisons -- Rollbacks +4D projects are developed using the **4D** application. It provides an Integrated Development Environment (IDE) for 4D projects as well as a web server, a mobile project generator, and an application runtime, allowing to develop, test, and debug any kind of project. -## Working with projects +Multi-user development is managed via standard **source control** repository tools (Perforce, Git, SVN, etc.), which allow developers to work on different branches, and compare, merge, or revert modifications. -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). +## Final application -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 files can be [compiled](compiler.md) and easily deployed. 4D allows you to create three types of applications from your projects: -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 +- [web](WebServer/webServer.md) applications, +- [mobile](https://developer.4d.com/4d-for-ios/) applications, +- [desktop](Desktop/building.md) applications (client/server or single-user). + +Back end applications can be deployed using 4D Server, 4D, or merged with 4D Volume license. \ No newline at end of file diff --git a/website/translated_docs/pt/REST/$asArray.md b/website/translated_docs/pt/REST/$asArray.md index 1ac99ac95615a5..a0b7b75b361e1e 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`). ## Example - 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..0632cd06fecb26 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 +## Description 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 +## Example 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..43ed080427ddf8 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 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..c07c9699a761c6 100644 --- a/website/translated_docs/pt/REST/$binary.md +++ b/website/translated_docs/pt/REST/$binary.md @@ -7,13 +7,15 @@ Pass "true" to save the BLOB as a document (must also pass `$expand={blobAttribu ## Description -`$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..b972f0a60f0eb8 100644 --- a/website/translated_docs/pt/REST/$catalog.md +++ b/website/translated_docs/pt/REST/$catalog.md @@ -6,6 +6,7 @@ title: '$catalog' The catalog describes all the dataclasses and attributes available in the datastore. + ## Available syntaxes | Syntax | Example | Description | @@ -16,9 +17,9 @@ 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 When you call `$catalog`, a list of the dataclasses is returned along with two URIs for each dataclass in your project's datastore. @@ -27,6 +28,7 @@ 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. | @@ -40,21 +42,23 @@ Here is a description of the properties returned for each dataclass in your proj **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 @@ -62,9 +66,10 @@ 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. +Chamando `$catalog/$all` pode reciber informação detalhada sobre os atributos de cada uma das classes de dados do modelo ativo de projeto. + +Para saber mais sobre o que se devolve para cada classe de dados e seus atributos, utilize [`$catalog/{dataClass}`](#catalogdataClass). -For more information about what is returned for each datastore class and its attributes, use [`$catalog/{dataClass}`](#catalogdataClass). ### Example @@ -72,107 +77,109 @@ For more information about what is returned for each datastore class and its att **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} @@ -180,150 +187,152 @@ 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. 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 | + +| 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 | 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.| - -### Method(s) +| 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 | 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 | Boolean | This property returns True if the attribute is the primary key. Otherwise, this property does not appear. | +| path | String | Name of the dataclass for a relatedEntity attribute, or name of the relation for a relatedEntities 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. | -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. +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. +### Example +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..9ad5e16db1960b 100644 --- a/website/translated_docs/pt/REST/$compute.md +++ b/website/translated_docs/pt/REST/$compute.md @@ -5,25 +5,27 @@ 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 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: -`GET /rest/Employee/objectAtt.property1/?$compute=$all` + `GET /rest/Employee/objectAtt.property1/?$compute=$all` You can use any of the following keywords: + | Keyword | Description | | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | $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 | @@ -33,48 +35,51 @@ You can use any of the following keywords: 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..be718c0b407608 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 - 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: @@ -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..6c6c98ab886a47 100644 --- a/website/translated_docs/pt/REST/$distinct.md +++ b/website/translated_docs/pt/REST/$distinct.md @@ -6,6 +6,7 @@ title: '$distinct' Returns the distinct values for a specific attribute in a collection (*e.g.*, `Company/name?$filter="name=a*"&$distinct=true`) + ## Description `$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. @@ -13,14 +14,16 @@ Returns the distinct values for a specific attribute in a collection (*e.g.*, `C 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 - 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..ae12bddebd462c 100644 --- a/website/translated_docs/pt/REST/$entityset.md +++ b/website/translated_docs/pt/REST/$entityset.md @@ -5,6 +5,7 @@ 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 | @@ -13,10 +14,13 @@ After [creating an entity set]($method.md#methodentityset) by using `$method=ent | [**$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 This syntax allows you to execute any operation on a defined entity set. @@ -29,7 +33,8 @@ When you retrieve an existing entity set stored in 4D Server's cache, you can al 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 @@ -41,9 +46,10 @@ Create another entity set based on previously created entity sets | $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. +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. @@ -55,8 +61,6 @@ Here are the logical operators: | 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) | - - > 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. @@ -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` ### Example - 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..73a0207a2c7aa1 100644 --- a/website/translated_docs/pt/REST/$filter.md +++ b/website/translated_docs/pt/REST/$filter.md @@ -7,6 +7,7 @@ title: '$filter' Allows to query the data in a dataclass or method *(e.g.*, `$filter="firstName!='' AND salary>30000"`) + ## Description 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"` + +## 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" +``` + +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..ef61f166a921f0 100644 --- a/website/translated_docs/pt/REST/$imageformat.md +++ b/website/translated_docs/pt/REST/$imageformat.md @@ -17,7 +17,6 @@ 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. @@ -26,4 +25,5 @@ If there is no image to be loaded or the format doesn't allow the image to be lo 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..f53b35dfc57017 100644 --- a/website/translated_docs/pt/REST/$info.md +++ b/website/translated_docs/pt/REST/$info.md @@ -6,7 +6,6 @@ title: '$info' Returns information about the entity sets currently stored in 4D Server's cache as well as user sessions ## Description - When you call this request for your project, you retrieve information in the following properties: | Property | Type | Description | @@ -18,25 +17,21 @@ When you call this request for your project, you retrieve information in the fol | ProgressInfo | Collection | A collection containing information about progress indicator information. | | sessionInfo | Collection | 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. | +| 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. | | 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 @@ -50,7 +45,6 @@ For each user session, the following information is returned in the *sessionInfo | 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. | - ## Example Retrieve information about the entity sets currently stored in 4D Server's cache as well as user sessions: @@ -59,65 +53,65 @@ Retrieve information about the entity sets currently stored in 4D Server's cache **Result**: +``` +{ +cacheSize: 209715200, +usedCache: 3136000, +entitySetCount: 4, +entitySet: [ { - 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: "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" +} +] +} +``` > 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..021752e1a1c87e 100644 --- a/website/translated_docs/pt/REST/$method.md +++ b/website/translated_docs/pt/REST/$method.md @@ -16,10 +16,14 @@ 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 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)). @@ -27,25 +31,27 @@ With `$method=delete`, you can delete an entity or an entire entity collection. You can also delete the entities in an entity set, by calling [`$entityset/{entitySetID}`]($entityset.md#entitysetentitysetid). ## Example - 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 @@ -61,20 +67,22 @@ If you have used `$savedfilter` and/or `$savedorderby` (in conjunction with `$fi 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. @@ -93,26 +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 `$method=subentityset` allows you to sort the data returned by the relation attribute defined in the REST request. @@ -129,49 +140,52 @@ 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 @@ -187,7 +201,6 @@ 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). @@ -198,114 +211,121 @@ If a problem arises while adding or modifying an entity, an error will be return 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..17481423abd973 100644 --- a/website/translated_docs/pt/REST/$orderby.md +++ b/website/translated_docs/pt/REST/$orderby.md @@ -10,38 +10,42 @@ Sorts the data returned by the attribute and sorting order defined (*e.g.*, `$or `$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"`. + ## Example 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..666c5dc9513b1c 100644 --- a/website/translated_docs/pt/REST/$querypath.md +++ b/website/translated_docs/pt/REST/$querypath.md @@ -20,12 +20,11 @@ In the steps collection, there is an object with the following properties defini | recordsfounds | Number | Number of records found | | steps | Collection | An collection with an object defining the subsequent step of the query path | - ## Example 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..6032a4a3aa2093 100644 --- a/website/translated_docs/pt/REST/$queryplan.md +++ b/website/translated_docs/pt/REST/$queryplan.md @@ -7,7 +7,6 @@ title: '$queryplan' Returns the query as it was passed to 4D Server (*e.g.*, `$queryplan=true`) ## Description - $queryplan returns the query plan as it was passed to 4D Server. | Property | Type | Description | @@ -15,29 +14,29 @@ $queryplan returns the query plan as it was passed to 4D Server. | 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 - 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..0c144247101d85 100644 --- a/website/translated_docs/pt/REST/$savedfilter.md +++ b/website/translated_docs/pt/REST/$savedfilter.md @@ -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..180b3ff16b7bce 100644 --- a/website/translated_docs/pt/REST/$savedorderby.md +++ b/website/translated_docs/pt/REST/$savedorderby.md @@ -14,11 +14,10 @@ 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 - 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..1feb4d28be386e 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 `$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 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/$upload.md b/website/translated_docs/pt/REST/$upload.md index 0e91db31a213c7..a1cb1dd5a54705 100644 --- a/website/translated_docs/pt/REST/$upload.md +++ b/website/translated_docs/pt/REST/$upload.md @@ -10,49 +10,98 @@ Returns an ID of the file uploaded to the server 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`. +You can modify the timeout, which by default is 120 seconds, by passing a value to the `$timeout` parameter. -## Image upload example +## Uploading scenario -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. +Imagine you want to upload an image to update the picture attribute of an entity. -Then, we upload the selected image to 4D Server: +To upload an image (or any binary file), you must first select the file from the client application. The file itlself must be passed in the **body** of the request. -`POST /rest/$upload?$rawPict=true` +Then, you upload the selected image to 4D Server using a request such as: -**Result**: + `POST /rest/$upload?$rawPict=true` + +As a result, the server returns an ID that identifies the file: + +**Response**: `{ "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. The request looks like: -`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 + } + },} +``` + +## Example with a 4D HTTP client + +The following example shows how to upload a *.pdf* file to the server using the 4D HTTP client. + +```4d +var $params : Text +var $response : Object +var $result : Integer +var $blob : Blob + + +ARRAY TEXT($headerNames; 1) +ARRAY TEXT($headerValues; 1) + +$url:="localhost:80/rest/$upload?$binary=true" //prepare the REST request + +$headerNames{1}:="Content-Type" +$headerValues{1}:="application/octet-stream" + +DOCUMENT TO BLOB("c:\\invoices\\inv003.pdf"; $blob) //Load the binary + + //Execute the first POST request to upload the file +$result:=HTTP Request(HTTP POST method; $url; $blob; $response; $headerNames; $headerValues) + +If ($result=200) + var $data : Object + $data:=New object + $data.__KEY:="3" + $data.__STAMP:="3" + $data.pdf:=New object("ID"; String($response.ID)) + + $url:="localhost:80/rest/Invoices?$method=update" //second request to update the entity + + $headerNames{1}:="Content-Type" + $headerValues{1}:="application/json" + + $result:=HTTP Request(HTTP POST method; $url; $data; $response; $headerNames; $headerValues) +Else + ALERT(String($result)+" Error") +End if +``` diff --git a/website/translated_docs/pt/REST/$version.md b/website/translated_docs/pt/REST/$version.md index 65ebdc2d1058ed..e80c60a3b08c92 100644 --- a/website/translated_docs/pt/REST/$version.md +++ b/website/translated_docs/pt/REST/$version.md @@ -15,4 +15,4 @@ The value of the image's version parameter is modified by the server. 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/ClassFunctions.md b/website/translated_docs/pt/REST/ClassFunctions.md new file mode 100644 index 00000000000000..b2f4960554b549 --- /dev/null +++ b/website/translated_docs/pt/REST/ClassFunctions.md @@ -0,0 +1,579 @@ +--- +id: classFunctions +title: Calling ORDA class functions +--- + + +You can call [data model class functions](ORDA/ordaClasses.md) defined for the ORDA Data Model through your REST requests, so that you can benefit from the exposed API of the targeted 4D application. + +Functions are simply called in POST requests on the appropriate ORDA interface, without (). For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: + +`/rest/City/getCity` + +with data in the body of the POST request: `["Aguada"]` + +In 4D language, this call is equivalent to, : + +```4d +$city:=ds.City.getCity("Aguada") +``` + +> Only functions with the `exposed` keyword can be directly called from REST requests. See [Exposed vs non-exposed functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) section. + +## Function calls + +Functions must always be called using REST **POST** requests (a GET request will receive an error). + +Functions are called on the corresponding object on the server datastore. + +| Class function | Syntax | +| ------------------------------------------------------------------ | --------------------------------------------------------------------------- | +| [datastore class](ORDA/ordaClasses.md#datastore-class) | `/rest/$catalog/DataStoreClassFunction` | +| [dataclass class](ORDA/ordaClasses.md#dataclass-class) | `/rest/{dataClass}/DataClassClassFunction` | +| [entitySelection class](ORDA/ordaClasses.md#entityselection-class) | `/rest/{dataClass}/EntitySelectionClassFunction` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$entityset/entitySetNumber` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$filter` | +| | `/rest/{dataClass}/EntitySelectionClassFunction/$orderby` | +| [entity class](ORDA/ordaClasses.md#entity-class) | `/rest/{dataClass}(key)/EntityClassFunction/` | + + + +> `/rest/{dataClass}/Function` can be used to call either a dataclass or an entity selection function (`/rest/{dataClass}` returns all entities of the DataClass as an entity selection). +> The function is searched in the entity selection class first. If not found, it is searched in the dataclass. In other words, if a function with the same name is defined in both the DataClass class and the EntitySelection class, the dataclass class function will never be executed. + + +## Parameters + + + +You can send parameters to functions defined in ORDA user classes. On the server side, they will be received in the class functions in regular $1, $2, etc. parameters. + +The following rules apply: + +- Parameters must be passed in the **body of the POST request** +- Parameters must be enclosed within a collection (JSON format) +- All scalar data types supported in JSON collections can be passed as parameters. +- Entity and entity selection can be passed as parameters. The JSON object must contain specific attributes used by the REST server to assign data to the corresponding ORDA objects: __DATACLASS, __ENTITY, __ENTITIES, __DATASET. + +See [this example](#request-receiving-an-entity-as-parameter) and [this example](#request-receiving-an-entity-selection-as-parameter). + + +### Scalar value parameter + +Parameter(s) must simply be enclosed in a collection defined in the body. For example, with a dataclass function `getCities()` receiving text parameters: `/rest/City/getCities` + +**Parameters in body:** ["Aguada","Paris"] + +All JSON data types are supported in parameters, including JSON pointers. Dates can be passed as strings in ISO 8601 date format (e.g. "2020-08-22T22:00:000Z"). + + +### Entity parameter + +Entities passed in parameters are referenced on the server through their key (*i.e.* __KEY property). If the key parameter is omitted in a request, a new entity is loaded in memory the server. You can also pass values for any attributes of the entity. These values will automatically be used for the entity handled on the server. + +> If the request sends modified attribute values for an existing entity on the server, the called ORDA data model function will be automatically executed on the server with modified values. This feature allows you, for example, to check the result of an operation on an entity, after applying all business rules, from the client application. You can then decide to save or not the entity on the server. + + +| Properties | Type | Description | +| ------------------------ | ------------------------------------ | -------------------------------------------------------------------------- | +| Attributes of the entity | mixed | Optional - Values to modify | +| __DATACLASS | String | Mandatory - Indicates the Dataclass of the entity | +| __ENTITY | Boolean | Mandatory - True to indicate to the server that the parameter is an entity | +| __KEY | mixed (same type as the primary key) | Optional - Primary key of the entity | + +- If __KEY is not provided, a new entity is created on the server with the given attributes. +- If __KEY is provided, the entity corresponding to __KEY is loaded on the server with the given attributes + +See examples for [creating](#creating-an-entity) or [updating](#updating-an-entity) entities. + +#### Related entity parameter + +Same properties as for an [entity parameter](#entity-parameter). In addition, the related entity must exist and is referenced by __KEY containing its primary key. + +See examples for [creating](#creating-an-entity-with-a-related-entity) or [updating](#updating-an-entity-with-a-related-entity) entities with related entities. + + +### Entity selection parameter + +The entity selection must have been defined beforehand using [$method=entityset]($method.md#methodentityset). + +> If the request sends a modified entity selection to the server, the called ORDA data model function will be automatically executed on the server with the modified entity selection. + + +| Properties | Type | Description | +| ------------------------ | ------- | ------------------------------------------------------------------------------------ | +| Attributes of the entity | mixed | Optional - Values to modify | +| __DATASET | String | Mandatory - entitySetID (UUID) of the entity selection | +| __ENTITIES | Boolean | Mandatory - True to indicate to the server that the parameter is an entity selection | + +See example for [receiving an entity selection](#receiving-an-entity-selection-as-parameter). + + +## Request examples + +This database is exposed as a remote datastore on localhost (port 8111): + +![alt-text](assets/en/REST/ordastructure.png) + +### Using a datastore class function + +The US_Cities `DataStore` class provides an API: + +``` +// DataStore class + +Class extends DataStoreImplementation + +exposed Function getName() + $0:="US cities and zip codes manager" +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/$catalog/getName` + +#### Result + +``` +{ +"result": "US cities and zip codes manager" +} +``` + +### Using a dataclass class function + +The Dataclass class `City` provides an API that returns a city entity from a name passed in parameter: + +``` +// City class + +Class extends DataClass + +exposed Function getCity() + var $0 : cs.CityEntity + var $1,$nameParam : text + $nameParam:=$1 + $0:=This.query("name = :1";$nameParam).first() +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getCity` + +Body of the request: ["Aguada"] + +#### Result + +The result is an entity: +``` +{ + "__entityModel": "City", + "__DATACLASS": "City", + "__KEY": "1", + "__TIMESTAMP": "2020-03-09T08:03:19.923Z", + "__STAMP": 1, + "ID": 1, + "name": "Aguada", + "countyFIPS": 72003, + "county": { + "__deferred": { + "uri": "/rest/County(72003)", + "__KEY": "72003" + } + }, + "zips": { + "__deferred": { + "uri": "/rest/City(1)/zips?$expand=zips" + } + } +} +``` + +### Using an entity class function + +The Entity class `CityEntity` provides an API: + +``` +// CityEntity class + +Class extends Entity + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City(2)/getPopulation` + +#### Result + +``` +{ + "result": 48814 +} +``` + + +### Using an entitySelection class function + +The EntitySelection class `CitySelection` provides an API: + +``` +// CitySelection class + +Class extends EntitySelection + +exposed Function getPopulation() + $0:=This.zips.sum("population") +``` + +You can then run this request: + +**POST** `127.0.0.1:8111/rest/City/getPopulation/?$filter="ID<3"` + +#### Result + +``` +{ + "result": 87256 +} +``` + +### Using an entitySelection class function and an entitySet + +The `StudentsSelection` class has a `getAgeAverage` function: + +``` +// StudentsSelection Class + +Class extends EntitySelection + +exposed Function getAgeAverage + C_LONGINT($sum;$0) + C_OBJECT($s) + + $sum:=0 + For each ($s;This) + $sum:=$sum+$s.age() + End for each + $0:=$sum/This.length +``` + +Once you have created an entityset, you can run this request: + +**POST** `127.0.0.1:8044/rest/Students/getAgeAverage/$entityset/17E83633FFB54ECDBF947E5C620BB532` + +#### Result + +``` +{ + "result": 34 +} +``` + +### Using an entitySelection class function and an orderBy + +The `StudentsSelection` class has a `getLastSummary` function: + +``` +// StudentsSelection Class + + +Class extends EntitySelection + +exposed Function getLastSummary + C_TEXT($0) + C_OBJECT($last) + + $last:=This.last() + $0:=$last.firstname+" - "+$last.lastname+" is ... "+String($last.age()) +``` + +You can then run this request: + +**POST** `127.0.0.1:8044/rest/Students/getLastSummary/$entityset/?$filter="lastname=b@"&$orderby="lastname"` + + +#### Result + +``` +{ + "result": "Wilbert - Bull is ... 21" +} +``` + + +### Using an entity to be created on the server + + +The Dataclass class `Students` has the function `pushData()` receiving an entity containing data from the client. The `checkData()` method runs some controls. If they are OK, the entity is saved and returned. + +``` +// Students Class + +Class extends DataClass + +exposed Function pushData + var $1, $entity, $status, $0 : Object + + $entity:=$1 + + $status:=checkData($entity) // $status is an object with a success boolean property + + $0:=$status + + If ($status.success) + $status:=$entity.save() + If ($status.success) + $0:=$entity + End if + End if + +``` + +You run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: + +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"Ann", +"lastname":"Brown" +}] +``` + +Since no `__KEY` is given, a new Students entity is loaded on the server **with the attributes received from the client**. Because the `pushData()` function runs a `save()` action, the new entity is created. + + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T10:54:41.805Z", + "__STAMP": 1, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWN", + "schoolID": null, + "school": null +} +``` + +### Using an entity to be updated on the server + +Same as above but with a __KEY attribute + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"lastname":"Brownie", +"__KEY":55 +}] +``` + +Since `__KEY` is given, the Students entity with primary key 55 is loaded **with the lastname value received from the client**. Because the function runs a `save()` action, the entity is updated. + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "55", + "__TIMESTAMP": "2020-06-16T11:10:21.679Z", + "__STAMP": 3, + "ID": 55, + "firstname": "Ann", + "lastname": "BROWNIE", + "schoolID": null, + "school": null +} +``` + +### Creating an entity with a related entity + +In this example, we create a new Students entity with the Schools entity having primary key 2. + +You run this request: + +**POST:**`http://127.0.0.1:8044/rest/Students/pushData` + +Body of the request: +``` +[{ +"__DATACLASS":"Students", +"__ENTITY":true, +"firstname":"John", +"lastname":"Smith", +"school":{"__KEY":2} +}] +``` + +#### Result + +``` +{ + "__entityModel": "Students", + "__DATACLASS": "Students", + "__KEY": "56", + "__TIMESTAMP": "2020-06-16T11:16:47.601Z", + "__STAMP": 1, + "ID": 56, + "firstname": "John", + "lastname": "SMITH", + "schoolID": 2, + "school": { + "__deferred": { + "uri": "/rest/Schools(2)", + "__KEY": "2" + } + } +} +``` + + +### Updating an entity with a related entity + +In this example, we associate an existing school to a Students entity. The `StudentsEntity` class has an API: + +``` +// StudentsEntity class + +Class extends Entity + +exposed Function putToSchool() + var $1, $school , $0, $status : Object + + //$1 is a Schools entity + $school:=$1 + //Associate the related entity school to the current Students entity + This.school:=$school + + $status:=This.save() + + $0:=$status +``` + +You run this request, called on a Students entity : **POST** `http://127.0.0.1:8044/rest/Students(1)/putToSchool` Body of the request: +``` +[{ +"__DATACLASS":"Schools", +"__ENTITY":true, +"__KEY":2 +}] +``` + +#### Result + +``` +{ + "result": { + "success": true + } +} +``` + + +### Receiving an entity selection as parameter + +In the `Students` Dataclass class, the `setFinalExam()` function updates a received entity selection ($1). It actually updates the *finalExam* attribute with the received value ($2). It returns the primary keys of the updated entities. + +``` +// Students class + +Class extends DataClass + +exposed Function setFinalExam() + + var $1, $es, $student, $status : Object + var $2, $examResult : Text + + var $keys, $0 : Collection + + //Entity selection + $es:=$1 + + $examResult:=$2 + + $keys:=New collection() + + //Loop on the entity selection + For each ($student;$es) + $student.finalExam:=$examResult + $status:=$student.save() + If ($status.success) + $keys.push($student.ID) + End if + End for each + + $0:=$keys +``` + +An entity set is first created with this request: + +`http://127.0.0.1:8044/rest/Students/?$filter="ID<3"&$method=entityset` + +Then you can run this request: + +**POST** `http://127.0.0.1:8044/rest/Students/setFinalExam` + +Body of the request: + +``` +[ +{ +"__ENTITIES":true, +"__DATASET":"9B9C053A111E4A288E9C1E48965FE671" +}, +"Passed" +] + +``` + +#### Result + +The entities with primary keys 1 and 2 have been updated. + +``` +{ + "result": [ + 1, + 2 + ] +} +``` + +### Using an entity selection updated on the client + +Using the `getAgeAverage()` function [defined above](#using-an-entityselection-class-function-and-an-entityset). + +```4d +var $remoteDS, $newStudent, $students : Object +var $ageAverage : Integer + +$remoteDS:=Open datastore(New object("hostname";"127.0.0.1:8044");"students") + +// $newStudent is a student entity to procees +$newStudent:=... +$students:=$remoteDS.Students.query("school.name = :1";"Math school") +// We add an entity to the $students entity selection on the client +$students.add($newStudent) + +// We call a function on the StudentsSelection class returning the age average of the students in the entity selection +// The function is executed on the server on the updated $students entity selection which included the student added from the client +$ageAverage:=$students.getAgeAverage() +``` \ 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..4a77abe8e7227f 100644 --- a/website/translated_docs/pt/REST/REST_requests.md +++ b/website/translated_docs/pt/REST/REST_requests.md @@ -6,38 +6,29 @@ title: About REST Requests The following structures are supported for REST requests: -| URI | Resource | {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) | -| | | | [$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | -| | | | [?$filter]($filter.md) | -| | | [{attribute}](manData.html#selecting-attributes-to-get)/ | [?$compute]($compute.md) | -| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey)/ | [{attribute1, attribute2, ...}](manData.html#selecting-attributes-to-get)/ | | -| | [{dataClass}:{attribute}(value)](%7BdataClass%7D%7Battribute%7D_value.html) | | | -| | [$catalog]($catalog.md) | | | -| | [$directory]($directory.md) | | | -| | [$info]($info.md) | | | - - -While all REST requests must contain the URI and Resource parameters, the Subresource (which filters the data returned) is optional. +| URI | Resource (Input) | /? or &{filter} (Output) | +| -------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| http://{servername}:{port}/rest/ | [{dataClass}](%7BdataClass%7D.html) | [$filter]($filter.md), [$attributes]($attributes.md), [$skip]($skip.md), [$method=...]($method.md)... | +| | [{dataClass}](%7BdataClass%7D.html)/[$entityset/{entitySetID}](entityset.html#entitysetentitysetid) | [$method=...]($method.md) | +| | [{dataClass}({key})](%7BdataClass%7D.html#dataclasskey) | [$attributes]($attributes.md) | +| | [{dataClass}:{attribute}(value)](%7BdataClass%7D.html#dataclassattributevalue) | | -As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. For example: +While all REST requests must contain the URI and Resource parameters, the Output (which filters the data returned) is optional. -`GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` +As with all URIs, the first parameter is delimited by a “?†and all subsequent parameters by a “&â€. For example: + `GET /rest/Person/?$filter="lastName!=Jones"&$method=entityset&$timeout=600` > 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. 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`. 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 Status and Response With each REST request, the server returns the status and a response (with or without an error). ### Request Status - With each REST request, you get the status along with the response. Below are a few of the statuses that can arise: | Status | Description | @@ -49,9 +40,11 @@ With each REST request, you get the status along with the response. Below are a | 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. | - ### 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 +If an error arises, it will be sent along with the response from the server or it will be the response from the server. + + + diff --git a/website/translated_docs/pt/REST/authUsers.md b/website/translated_docs/pt/REST/authUsers.md index fab3ebc1f758ff..ab40083f2354d2 100644 --- a/website/translated_docs/pt/REST/authUsers.md +++ b/website/translated_docs/pt/REST/authUsers.md @@ -3,83 +3,112 @@ id: authUsers title: Users and sessions --- +REST requests can benefit from [web user sessions](WebServer/sessions.md), providing extra features such as multiple requests handling, data sharing between the web client processes, and user privileges. + +Como primeiro passo para abrir uma sessão REST no servidor 4D, o usuário que envia a solicitude deve estar autenticado. -## Authenticating users -As a first step to open a REST session on the 4D server, the user sending the request must be authenticated. +## Authenticating users -You log in a user to your application by passing the user's name and password to [`$directory/login`]($directory.md#directorylogin). +You log in a user to your application by calling [`$directory/login`]($directory.md#directorylogin) in a POST request including the user's name and password in the header. This request calls the `On REST Authentication` database method (if it exists), where you can check the user's credentials (see example below). -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. +## Opening sessions -The session will automatically be closed once the timeout is reached. +When [scalable sessions are enabled](WebServer/sessions.md#enabling-sessions) (recommended), if the `On REST Authentication` database method returns `true`, a user session is then automatically opened and you can handle it through the `Session` object and the [Session API](API/SessionClass.md). Subsequent REST requests will reuse the same session cookie. -## Session cookie +If the `On REST Authentication` database method has not been defined, a `guest` session is opened. -Each REST request is handled through a specific session on the 4D server. -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: +## Example - WASID4D=EA0400C4D58FF04F94C0A4XXXXXX3 - +In this example, the user enters their email and password in an html page that requests [`$directory/login`]($directory.md#directorylogin) in a POST (it is recommended to use an HTTPS connection to send the html page). The `On REST Authentication` database method is called to validate the credentials and to set the session. -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. +The HTML login page: -### Example +![alt-text](assets/en/REST/login.png) -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. -```4d -// Creating headers -ARRAY TEXT(headerNames;0) -ARRAY TEXT(headerValues;0) +```html + -APPEND TO ARRAY(headerNames;"username-4D") -APPEND TO ARRAY(headerNames;"session-4D-length") -APPEND TO ARRAY(headerNames;"hashed-password-4D") +
            +
            +Email:
            +Password:
            + + +
            +
            -APPEND TO ARRAY(headerValues;"kind user") -APPEND TO ARRAY(headerValues;"60") -APPEND TO ARRAY(headerValues;Generate digest("test";4D digest)) + -//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;*) ``` +When the login page is sent to the server, the `On REST Authentication` database method is called: + ```4d -// buildHeader project method + //On REST Authentication + +#DECLARE($userId : Text; $password : Text) -> $Accepted : Boolean +var $sales : cs.SalesPersonsEntity + +$Accepted:=False + + //A '/rest' URL has been called with headers username-4D and password-4D +If ($userId#"") + $sales:=ds.SalesPersons.query("email = :1"; $userId).first() + If ($sales#Null) + If (Verify password hash($password; $sales.password)) + fillSession($sales) + $Accepted:=True + End if + End if +End if +``` -C_POINTER($pointerNames;$1;$pointerValues;$2) -ARRAY TEXT($headerNames;0) -ARRAY TEXT($headerValues;0) +> As soon as it has been called and returned `True`, the `On REST Authentication` database method is no longer called in the session. -COPY ARRAY($1->;$headerNames) -COPY ARRAY($2->;$headerValues) +The `fillSession` project method initializes the user session, for example: -$indexCookie:=Find in array($headerValues;"WASID4D@") -$cookie:=$headerValues{$indexCookie} -$start:=Position("WASID4D";$cookie) -$end:=Position(";";$cookie) -$uuid:= Substring($cookie;$start;$end-$start) +```4d +#DECLARE($sales : cs.SalesPersonsEntity) +var $info : Object -ARRAY TEXT($headerNames;1) -ARRAY TEXT($headerValues;1) +$info:=New object() +$info.userName:=$sales.firstname+" "+$sales.lastname -$headerNames{1}:="Cookie" -$headerValues{1}:=$uuid +Session.setPrivileges($info) -COPY ARRAY($headerNames;$1->) -COPY ARRAY($headerValues;$2->) -``` \ No newline at end of file +Use (Session.storage) + If (Session.storage.myTop3=Null) + Session.storage.myTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + End if +End use +``` diff --git a/website/translated_docs/pt/REST/configuration.md b/website/translated_docs/pt/REST/configuration.md index 74e38a86a6e29e..337842aef03785 100644 --- a/website/translated_docs/pt/REST/configuration.md +++ b/website/translated_docs/pt/REST/configuration.md @@ -3,18 +3,19 @@ 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. +Using standard HTTP requests, the 4D REST Server allows external applications to access the data of your application directly, *i.e.* to retrieve information about the dataclasses in your project, manipulate data, log into your web application, and much more. To start using the REST features, you need to start and configure the 4D REST server. -> - 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. +> - 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](authUsers.md) for your requesting application. + + ## 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. +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 structure settings in order for REST requests to be processed. ![alt-text](assets/en/REST/Settings.png) @@ -22,37 +23,39 @@ For security reasons, by default, 4D does not respond to REST requests. If you w 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. + ## Configuring REST access By default, REST accesses are open to all users which is obviously not recommended for security reasons, and also to control client licenses usage. 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; +- assigning a **Read/Write** user group to REST services in the "Web/REST resource" page of the Structure 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. +> 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 Structure Settings is ignored. -### Using the Database settings -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. +### Using the Structure Settings -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. +The **Read/Write** menu in the "Web/REST resource" page of the structure settings specifies a group of 4D users that is authorized to establish the link to the 4D application using REST queries. -> 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. +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. + +> 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 Structure 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 application 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). + -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 -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: +Once REST services are enabled in the 4D application, by default a REST session can access all tables and fields of the 4D database through the [datastore interface](ORDA/dsMapping.md#datastore). Thus, it can 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" +``` This request will return all employees whose salary field is higher than 10000. > 4D tables and/or fields that have the "Invisible" attribute are also exposed in REST by default. @@ -71,6 +74,7 @@ To remove the REST exposure for a table: 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. @@ -83,4 +87,4 @@ To remove the REST exposure for a field: 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. -> 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 +> 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. diff --git a/website/translated_docs/pt/REST/genInfo.md b/website/translated_docs/pt/REST/genInfo.md index 7c1fea10deeb26..d51140cc850c64 100644 --- a/website/translated_docs/pt/REST/genInfo.md +++ b/website/translated_docs/pt/REST/genInfo.md @@ -10,12 +10,13 @@ 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). +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: `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. @@ -29,7 +30,6 @@ For example: `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. diff --git a/website/translated_docs/pt/REST/gettingStarted.md b/website/translated_docs/pt/REST/gettingStarted.md index fa4aa595dd5b63..abc25c50c7872e 100644 --- a/website/translated_docs/pt/REST/gettingStarted.md +++ b/website/translated_docs/pt/REST/gettingStarted.md @@ -3,23 +3,23 @@ id: gettingStarted title: Getting Started --- -4D provides you with a powerful REST server, that allows direct access to data stored in your 4D databases. +4D provides you with a powerful REST server, that allows direct access to data stored in your 4D applications. -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). +The REST server is included in 4D and 4D Server, it is automatically available in your 4D applications [once it is configured](configuration.md). This section is intended to help familiarize you with REST functionality by means of a simple example. We are going to: +- create and configure a basic 4D application project +- access data from the 4D project through REST using a standard browser. -- create and configure a basic 4D database -- access data from the 4D database through REST using a standard browser. +To keep the example simple, we’re going to use 4D and a browser that are running on the same machine. Of course, you could also use a remote architecture. -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. +## Creating and configuring the 4D project + +1. Launch your 4D or 4D Server application and create a new project. You can name it "Emp4D", for example. 2. In the Structure editor, create an [Employees] table and add the following fields to it: - - Lastname (Alpha) - Firstname (Alpha) - Salary (Longint) @@ -32,99 +32,107 @@ To keep the example simple, we’re going to use a 4D application and a browser ![](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. +4. Display the **Web/REST resource** page of the 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 - +``` +http://127.0.0.1/rest/$catalog +``` The REST server replies: - { - "__UNIQID": "96A49F7EF2ABDE44BF32059D9ABC65C1", - "dataClasses": [ - { - "name": "Employees", - "uri": "/rest/$catalog/Employees", - "dataURI": "/rest/Employees" - } - ] - } - +``` +{ + "__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 - +``` +/rest/$catalog/Employees +``` If you want to get all entities of the Employee dataclass, you write: - /rest/Employees - +``` +/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 - } - +``` +{ + "__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 - +``` +/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 +``` +{ + "__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 applications. diff --git a/website/translated_docs/pt/REST/manData.md b/website/translated_docs/pt/REST/manData.md index 6944e030a71255..6ba45487f9d80c 100644 --- a/website/translated_docs/pt/REST/manData.md +++ b/website/translated_docs/pt/REST/manData.md @@ -3,7 +3,7 @@ id: manData title: Manipulating Data --- -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. +All [exposed dataclasses, attributes](configuration.md#exposing-tables-and-fields) and [functions](ClassFunctions.md) can be accessed through REST. Dataclass, attribute, and function names are case-sensitive; however, the data for queries is not. ## Querying data @@ -11,20 +11,26 @@ To query data directly, you can do so using the [`$filter`]($filter.md) function `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). +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 a single entity in a dataclass using [{dataClass}({key})](%7BdataClass%7D_%7Bkey%7D.html), you can also write a [class function](ClassFunctions.md#function-calls) that returns an entity selection (or a collection). -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 a selection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). -Before returning the collection, you can also sort it by using [`$orderby`]($orderby.md) one one or more attributes (even relation attributes). ## Navigating data 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. + + ## Creating and managing entity set 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. @@ -35,6 +41,7 @@ To access the entity set, you must use `$entityset/{entitySetID}`, for example: `/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). @@ -47,52 +54,32 @@ Using [`$entityset/{entitySetID}?$logicOperator... &$otherCollection`]($entityse 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. 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: `/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 - -The following example is a dataclass method that reveives parameters and returns an object: - -```4d -// 4D findPerson method -C_TEXT($1;$firstname;$2;$lastname) -$firstname:=$1 -$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: +## Calling Data model class functions -![alt-text](assets/en/REST/methodProp_ex.png) +You can call ORDA Data Model [user class functions](ClassFunctions.md) through POST requests, so that you can benefit from the exposed API of the targeted application. For example, if you have defined a `getCity()` function in the City dataclass class, you could call it using the following request: -Then you can send the following REST POST request, for example using the `HTTP Request` 4D command: +`/rest/City/getCity` -```4d -C_TEXT($content) -C_OBJECT($response) +with data in the body of the request: `["Paris"]` -$content:="[\"Toni\",\"Dickey\"]" -$statusCode:=HTTP Request(HTTP POST method;"127.0.0.1:8044/rest/Employee/findPerson";$content;$response) -``` +> Calls to 4D project methods that are exposed as REST Service are still supported but are deprecated. -Method calls are detailed in the [{dataClass}](%7BdataClass%7D.html#dataclassmethod-and-dataclasskeymethod) section. ## Selecting Attributes to get @@ -108,11 +95,10 @@ You can apply this filter in the following ways: | | {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 +### 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: @@ -123,118 +109,127 @@ 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`). +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/` -`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" - } - ] - } - +```` +{ + __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@'"/` **Result**: - { - __entityModel: "People", - __COUNT: 1, - __SENT: 1, - __FIRST: 0, - __ENTITIES: [ - { - __KEY: "4", - __STAMP: 4, - firstName: "Beth", - lastName: "Adams" - } - ] - } - +```` +{ + __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/` + `GET /rest/People(3)/firstName,lastName/` **Result**: - { - __entityModel: "People", - __KEY: "3", - __STAMP: 2, - firstName: "Pete", - lastName: "Marley" - } - +```` +{ + __entityModel: "People", + __KEY: "3", + __STAMP: 2, + firstName: "Pete", + lastName: "Marley" +} +```` + -`GET /rest/People(3)/` + `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" - } - }, - fullName: "Pete Marley", - employerName: "microsoft" - - } - +```` +{ + __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 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 + `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` For more information about the image formats, refer to [`$imageformat`]($imageformat.md). For more information about the version parameter, refer to [`$version`]($version.md). @@ -242,10 +237,13 @@ For more information about the image formats, refer to [`$imageformat`]($imagefo 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 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: -`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..46fec82f5ea40d 100644 --- a/website/translated_docs/pt/REST/{dataClass}.md +++ b/website/translated_docs/pt/REST/{dataClass}.md @@ -7,17 +7,21 @@ title: -Dataclass names can be used directly in the REST requests to work with entities, entity selections, or methods of the dataclass. +Dataclass names can be used directly in the REST requests to work with entities and entity selections, or class functions of the dataclass. ## 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 | +| 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}/{DataClassClassFunction}**](ClassFunctions.md#function-calls) | `/City/getCity` | Executes a dataclass class function | +| [**{dataClass}({EntitySelectionClassFunction}**](ClassFunctions.md#function-calls) | `/City/getPopulation/?$filter="ID<3"` | Executes an entity selection class function | +| [**{dataClass}({key})/{EntityClassFunction}**](ClassFunctions.md#function-calls) | `City(2)/getPopulation` | Executes an entity class function | + +> Function calls are detailed in the [Calling ORDA class functions](ClassFunctions.md) section. + ## {dataClass} @@ -32,109 +36,111 @@ 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 | Número de entidades na classe de dados. | | __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. | - Each entity contains the following properties: | Property | Type | Description | | ----------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| __KEY | String | Value of the primary key defined for the datastore class. | +| __KEY | String | Valor da chave primária definida para a classe de dados. | | __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`. | - 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` + `GET /rest/Company/name,address` + + ### Example -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**: - { - "__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}) @@ -142,45 +148,48 @@ 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. A chave é o valor no atributo definida como Chave Primária para sua classe de dados. 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). +For more information about the data returned, refer to [{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: -`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: -`GET /rest/Company(1)/name,address,staff?$expand=staff` + `GET /rest/Company(1)/name,address,staff?$expand=staff` ### Example -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**: - { - "__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) @@ -190,138 +199,19 @@ Returns the data for one entity in which the attribute's value is defined 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)` 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` 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` ### Example The following request returns all the public data of the employee named "Jones". -`GET /rest/Employee:lastname(Jones)` - -## {dataClass}/{method} and {dataClass}({key})/{method} - -Returns an object or a collection based on a project method. - -### Description - -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 - -![alt-text](assets/en/REST/MethodProp.png) - -### Passing Parameters to a Method - -You can also pass parameters to a method in a POST. - -`POST /rest/Employee/addEmployee` + `GET /rest/Employee:lastname(Jones)` -You can POST data in the body part of the request, for example: - -["John","Smith"] - -### Examples - -#### Table scope - -Call of a `getAverage` method: - -- on [Employee] table -- with **Table** scope - -```4d - //getAverage -ALL RECORDS([Employee]) -$0:=New object("ageAverage";Average([Employee]age)) -``` - -`POST /rest/Employee/getAverage` - -Result: - - { - "result": { - "ageAverage": 44.125 - } - } - - -#### Current record scope - -Call of a `getFullName` method: - -- on [Employee] table -- with **Current record** scope - -```4d - //getFullName -$0:=New object("fullName";[Employee]firstname+" "+[Employee]lastname) -``` - -`POST /rest/Employee(3)/getFullName` - -Result: - - { - "result": { - "fullName": "John Smith" - } - } - - -#### Current selection scope - -Call of a `updateSalary` method: - -- on [Employee] table -- with **Current selection** scope - -```4d - //updateSalary -C_REAL($1;$vCount) -READ WRITE([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]) -$0:=New object("updates";$vCount) -``` - -`POST /rest/Employee/updateSalary/?$filter="salary<1500"` - -POST data (in the request body): [1.5] - -Result: - - { - "result": { - "updated": 42 - } - } \ No newline at end of file diff --git a/website/translated_docs/pt/ReleaseNotes/whatsNew.md b/website/translated_docs/pt/ReleaseNotes/whatsNew.md new file mode 100644 index 00000000000000..2861cfd8570dee --- /dev/null +++ b/website/translated_docs/pt/ReleaseNotes/whatsNew.md @@ -0,0 +1,15 @@ +--- +id: whatsNew +title: What's New +--- + +The list of new or modified 4D features that are covered in this documentation. + +## 4D v18 R6 + +- [Entity Selection Class](API/entitySelectionClass.md): `.average()`, `.max()` and `.min()` functions now return *undefined* if the entity selection is empty. +- [IMAP Mail](API/imapTransporterClass.md), [POP3 Mail](API/pop3TransporterClass.md) and [SMTP Mail](API/smtpTransporterClass.md): `authenticationMode` property enables OAuth 2.0 +- [IMAP Mail](API/imapTransporterClass.md): new `.expunge()` and `.append()` functions +- New [WebAdmin](Admin/webAdmin.md) web server component +- New [DataExplorer](Admin/dataExplorer) interface +- New web [user sessions](WebServer/sessions.md) and [their API](API/sessionClass.md). \ No newline at end of file diff --git a/website/translated_docs/pt/Tags/tags.md b/website/translated_docs/pt/Tags/tags.md new file mode 100644 index 00000000000000..b278ed45e8c895 --- /dev/null +++ b/website/translated_docs/pt/Tags/tags.md @@ -0,0 +1,764 @@ +--- +id: tags +title: Transformation tags +--- + +4D provides a set of transformation tags which allow you to insert references to 4D variables or expressions, or to perform different types of processing within a source text, referred to as a "template". These tags are interpreted when the source text is executed and generate an output text. + +This principle is used in particular by the 4D Web server to build [web template pages](WebServer/templates.md). + +These tags are generally be inserted as HTML type comments (``) but an [xml-compliant alternative syntax](#alternative-syntax-for-4dtext-4dhtml-4deval) is available for some of them. + +It is possible to mix several types of tags. For example, the following HTML structure is entirely feasible: + +```html + + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + (Loop on the current selection) + (If [TABLE]ValNum>10) + (Subpage insertion) + (Else) + Value:
            (Field display) + + ](End for) + + +``` + + + +## Principles for using tags + +### Parsing + +Parsing the contents of a *template* source is done in two contexts: + +- Using the `PROCESS 4D TAGS` command; this command accepts a *template* as input, as well as optional parameters and returns a text resulting from the processing. + +- Using 4D's integrated HTTP server: [template pages](WebServer/templates.md) sent by means of the `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB), `WEB SEND TEXT` commands, or called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to parse HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, http://www.server.com/dir/page.shtm). + + +### Recursive processing + +4D tags are interpreted recursively: 4D always attempts to reinterpret the result of a transformation and, if a new transformation has taken place, an additional interpretation is performed, and so on until the product obtained no longer requires any further transformation. For example, given the following statement: + +```html + +``` + +If the `[Mail]Letter_type` text field itself contains a tag, for example ``, this tag will be evaluated recursively after the interpretation of the 4DHTML tag. + +This powerful principle meets most needs related to text transformation. Note, however, that in some cases this can also allow malicious code to be inserted in the web context, [which can be avoided](WebServer/templates.md#prevention-of-malicious-code-insertion). + + +### Identifiers with tokens + +To ensure the correct evaluation of expressions processed via tags, regardless of the language or 4D version, it's recommended to use the tokenized syntax for elements whose name may vary over versions (commands, tables, fields, constants). For example, to insert the `Current time` command, enter `Current time:C178`. + +### Using the "." as decimal separator + +4D always uses the period character (.) as a decimal separator when evaluating a numerical expression using a 4D tag `4DTEXT`, `4DHTML`, and `4DEVAL`. Regional settings are ignored. This feature facilitates code maintenance and compatibility between 4D languages and versions. + + +## 4DBASE + +#### Syntax: `` + +The `` tag designates the working directory to be used by the `` tag. + +When it is called in a Web page, the `` tag modifies all subsequent `` calls on this page, until the next `, if any. If the`` folder is modified from within an included file, it retrieves its original value from the parent file. + +The *folderPath* parameter must contain a pathname relative to the current page and it must end with a slash (/). The designated folder must be located inside the Web folder. + +Pass the "WEBFOLDER" keyword to restore the default path (relative to the page). + +The following code, which must specify a relative path for each call: + +```html + + + + + +``` +... is equivalent to: + +```html + + + + + + + + +``` + +For example, to set a directory for the home page: + +```html +/* Index.html */ + + + + + + + + +``` + +In the "head.html" file, the current folder is modified through ``, without this changing its value in "Index.html": + +```html +/* Head.htm */ +/* the working directory here is relative to the included file (FR/ or US/) */ + + + + + + +``` + + +## 4DCODE + +#### Syntax: `` + +The `4DCODE` tag allows you to insert a multi-line 4D code block in a template. + +When a `` sequence. The code block itself can contain carriage returns, line feeds, or both; it will be interpreted sequentially by 4D. + +For example, you can write in a template: + +```html + +``` + + +Here are the 4DCODE tag features: + +- The `TRACE` command is supported and activates the 4D debugger, thus allowing you to debug your template code. +- Any error will display the standard error dialog that lets the user stop code execution or enter debugging mode. +- The text in between `` is split into lines accepting any line-ending convention (cr, lf, or crlf). +- The text is tokenized within the context of the database that called `PROCESS 4D TAGS`. This is important for recognition of project methods for example. The [Available through tags and 4D URLs (4DACTION ...)](WebServer/allowProject.md) method property is not taken into account. +- Even if the text always uses English-US, it is recommended to use the token syntax (:Cxxx) for command and constant names to protect against potential problems due to commands or constants being renamed from one version of 4D to another. + +> The fact that 4DCODE tags can call any of the 4D language commands or project methods could be seen as a security issue, especially when the database is available through HTTP. However, since it executes server-side code called from your own template files, the tag itself does not represent a security issue. In this context, as for any Web server, security is mainly handled at the level of remote accesses to server files. + + +## 4DEACH and 4DENDEACH + +#### Syntax: `` `` + +The `` comment allows iterating a specified item over all values of the *expression*. The item is set to a *variable* whose type depends on the *expression* type. + +The `` comment can iterate through three expression types: + +- [collections](#--4deach-item-in-collection--): loop through each element of the collection, +- [entity selections](#--4deach-entity-in-entityselection--): loop through each entity, +- [objects](#--4deach-property-in-object--): loop through each object property. + +The number of iterations 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. + + +### `` + +This syntax iterates on each *item* of the *collection*. The code portion located between `` and `` is repeated for each collection element. + +The *item* parameter is a variable of the same type as the collection elements. + +The collection must contain only **elements of the same type**, otherwise an error is returned as soon as the *item* variable is assigned the first mismatched value type. + +The number of loops is based on the number of elements of the collection. At each iteration, the *item* variable is automatically filled with the matching element of the collection. Os pontos abaixo devem ser considerados: + +- If the *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 *item* variable gets the same type as the first collection element. If any collection element 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 is generated if the *item* variable type does not support Null values (such as longint variables). + +#### Example with a collection of scalar values + +*getNames* returns a collection of strings. The method has been declared as "[available through 4D tags and URLs](WebServer/allowProject.md)". + + +```html + + + + + + + + + +
            Name
            +``` + +#### Example with a collection of objects + +*getSalesPersons* returns a collection of objects. + +```html + + + + + + + + + + + +
            IDFirstnameLastname
            +``` + + +### `` + +This syntax iterates on each *entity* of the *entitySelection*. The code portion located between `` and `` is repeated for each entity of the entity selection. + +The *entity* parameter is an object variable of the entity selection class. + + +The number of loops is based on the number of entities of the entity selection. At each iteration, the *entity* object variable is automatically filled with the matching entity of the entity selection. + +#### Example with a html table + +```html + + + + + + + + + + + +
            IDNameTotal purchase
            +``` + +#### Example with `PROCESS 4D TAGS` + +```4d +var customers : cs.CustomersSelection +var $input; $output : Text + +customers:=ds.Customers.all() +$input:="" +$input:=$input+""+Char(Carriage return) +$input:=$input+"" +PROCESS 4D TAGS($input; $output) +TEXT TO DOCUMENT("customers.txt"; $output) +``` + +### `` + +This syntax iterates on each *property* of the *object*. The code portion located between `` and `` is repeated for each property of the object. + +The *property* parameter is a text variable automatically filled with the name of the currently processed property. + +The properties of the object are processed according to their creation order. 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. + +#### Example with the properties of an object + +*getGamers* is a project method that returns an object like ("Mary"; 10; "Ann"; 20; "John"; 40) to figure gamer scores. + +```html + + + + + + + + + + + +
            GamersScores
            +``` + + + + +## 4DEVAL + +#### Syntax: `` +#### Alternative syntax: `$4DEVAL(expression)` + +The `4DEVAL` tag allows you to assess a 4D variable or expression. Like the [`4DHTML`](#4dhtml) tag, `4DEVAL` does not escape HTML characters when returning text. However, unlike `4DHTML` or [`4DTEXT`](#4dtext), `4DEVAL` allows you to execute any valid 4D statement, including assignments and expressions that do not return any value. + +For example, you can execute: + +``` + $input:="" //assignment + $input:=$input+"" //calculation + PROCESS 4D TAGS($input;$output) + //$output = "43" +``` + +In case of an error during interpretation, the text inserted will be in the form: `: ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DHTML + +#### Syntax: `` +#### Alternative syntax: `$4DHTML(expression)` + + +Just like the `4DTEXT` tag, this tag lets you assess a 4D variable or expression that returns a value, and insert it as an HTML expression. Unlike the `4DTEXT` tag, this tag does not escape HTML special characters (e.g. ">"). + +For example, here are the processing results of the 4D text variable myvar with the available tags: + +| myvar Value | Tags | Result | +| -------------------- | ---------------------------- | ------------------- | +| `myvar:=""` | `` | `<B>` | +| `myvar:=""` | `` | `` | + +In case of an interpretation error, the inserted text will be ` : ## error # error code`. + +> For security reasons, it is recommended to use the [`4DTEXT`](#4dtext) tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + + +## 4DIF, 4DELSE, 4DELSEIF and 4DENDIF + +#### Syntax: `` {`...`} {``} `` + +Used with the `` (optional), `` (optional) and `` comments, the `` comment offers the possibility to execute portions of code conditionally. + +The *expression* parameter can contain any valid 4D expression returning a Boolean value. It must be indicated within parenthesis and comply with the 4D syntax rules. + +The `` ... `` blocks can be nested in several levels. Like in 4D, each `` must match a ``. + +In case of an interpretation error, the text "``: A Boolean expression was expected" is inserted instead of the contents located between `` and ``. Likewise, if there are not as many `` as ``, the text "``: 4DENDIF expected" is inserted instead of the contents located between `` and ``. + +Using the `` tag, you can test an unlimited number of conditions. Only the code that follows the first condition evaluated as `True` is executed. If no conditions are true, no statement is executed (if there is no final ``). You can use a tag after the last . If all the conditions are false, the statements following the are executed. + +The two following codes are equivalent. + +Code using 4DELSE only: + +```html + + /* Condition1 is true*/ + + + /* Condition2 is true*/ + + + /* Condition3 is true */ + + /*None of the conditions are true*/ + + + +``` + +Similar code using the `4DELSEIF` tag: + +``` + + /* Condition1 is true*/ + + /* Condition2 is true*/ + + /* Condition3 is true */ + + /* None of the conditions are true*/ + +``` + +This example of code inserted in a static HTML page displays a different label according the `vname#""` expression result: + +```html + +... + +Names starting with . + +No name has been found. + +... + +``` + +This example inserts different pages depending on which user is connected: + +```html + + + + + + + + + +``` + + +## 4DINCLUDE + +#### Syntax: `` + +This tag is mainly designed to include an HTML page (indicated by the *path* parameter) in another HTML page. By default, only the body of the specified HTML page, i.e. the contents found within the `` and `` tags, is included (the tags themselves are not included). This lets you avoid conflicts related to meta tags present in the headers. + +However, if the HTML page specified does not contain ```` tags, the entire page is included. It is up to you to verify the consistency of the meta tags. + +The `` comment is very useful for tests (``) or loops (``). It is very convenient to include banners according to a criteria or randomly. When including, regardless of the file name extension, 4D analyzes the called page and then inserts the contents (modified or not) in the page originating the `4DINCLUDE` call. + +An included page with the `` comment is loaded in the Web server cache the same way as pages called via a URL or sent with the `WEB SEND FILE` command. + +In *path*, put the path leading to the document to include. Warning: In the case of a `4DINCLUDE` call, the path is relative to the document being analyzed, that is, the "parent" document. Use the slash character (/) as a folder separator and the two dots (..) to go up one level (HTML syntax). When you use the `4DINCLUDE` tag with the `PROCESS 4D TAGS` command, the default folder is the project folder. + +> You can modify the default folder used by the `4DINCLUDE` tag in the current page, using the `` tag (see below). + +The number of `` within a page is unlimited. However, the `` calls can be made only at one level. This means that, for example, you cannot insert `` in the *mydoc2.html* body page, which is called by `` inserted in *mydoc1.html*. Furthermore, 4D verifies that inclusions are not recursive. + +In case of error, the inserted text is "`` :The document cannot be opened". + +Examples: + +```html + + + +``` + + + +## 4DLOOP and 4DENDLOOP + +#### Syntax: `` `` + +This comment allows repetition of a portion of code as long as the condition is fulfilled. The portion is delimited by `` and ``. + +The `` ... `` blocks can be nested. Like in 4D, each `` must match a ``. + +There are five kinds of conditions: + +### `` + +This syntax makes a loop for each record from the table current selection in the current process. The code portion located between the two comments is repeated for each current selection record. + +> When the `4DLOOP` tag is used with a table, records are loaded in "Read only" mode. + +The following code: + +```html + +
            + +``` + +... could be expressed in 4D language in the following way: + +```4d + FIRST RECORD([People]) + While(Not(End selec tion([People]))) + ... + NEXT RECORD([People]) + End while +``` + +### `` + +This syntax makes a loop for each array item. The array current item is increased when each code portion is repeated. + +> This syntax cannot be used with two dimension arrays. In this case, it is better to combine a method with nested loops. + +The following code example: + +```html + +
            + +``` + +... could be expressed in 4D language in the following way: + +```4d + For($Elem;1;Size of array(arr_names)) + arr_names:=$Elem + ... + End for +``` + +### `` + +This syntax makes a loop as long as the method returns `True`. The method takes a Long Integer parameter type. First it is called with the value 0 to allow an initialization stage (if necessary); it is then called with the values 1 ,then 2, then 3 and so on, as long as it returns `True`. + +For security reasons, within a Web process, the `On Web Authentication` database method can be called once just before the initialization stage (method execution with 0 as parameter). If the authentication is OK, the initialization stage will proceed. + +`C_BOOLEAN($0)` and `C_LONGINT($1)` MUST be declared within the method for compilation purposes. + +The following code example: + +```html + +
            + +``` + +... could be expressed in 4D language in the following way: + +```4d + If(AuthenticationWebOK) + If(my_method(0)) + $counter:=1 + While(my_method($counter)) + ... + $counter:=$counter+1 + End while + End if + End if +``` + +The `my_method` method can be as follows: + +```4d + C_LONGINT($1) + C_BOOLEAN($0) + If($1=0) `Initialisation + $0:=True + Else + If($1<50) + ... + var:=... + $0:=True + Else + $0:=False `Stops the loop + End if + End if +``` + +### `` + +With this syntax, the `4DLOOP` tag makes a loop as long as the *expression* returns `True`. The expression can be any valid Boolean expression and must contain a variable part to be evaluated in each loop to avoid infinite loops. + +For example, the following code: + +```html + + + + + +``` + +...produces the following result: + +``` +0 +1 +2 +3 +``` + +### `` + +In this case, the `4DLOOP` tag works like it does with an array: it makes a loop for each element of the array referenced by the pointer. The current array element is increased each time the portion of code is repeated. + +This syntax is useful when you pass an array pointer as a parameter to the `PROCESS 4D TAGS` command. + +Example: + +```4d + ARRAY TEXT($array;2) + $array{1}:="hello" + $array{2}:="world" + $input:="" + $input:=$input+"" + $input:=$input+" " + $input:=$input+"" + PROCESS 4D TAGS($input;$output;"elements = ";->$array) + // $output = "elements = hello world " +``` + +In case of an interpretation error, the text "``: description" is inserted instead of the contents located between `` and ``. + +The following messages can be displayed: + +- Unexpected expression type (standard error); +- Incorrect table name (error on the table name); +- An array was expected (the variable is not an array or is a two dimension array); +- The method does not exist; +- Syntax error (when the method is executing); +- Access error (you do not have the appropriate access privileges to access the table or the method). +- 4DENDLOOP expected (the `` number does not match the ``). + +## 4DSCRIPT/ + +#### Syntax: `` + +The `4DSCRIPT` tag allows you to execute 4D methods when processing the template. The presence of the `` tag as an HTML comment launches the execution of the `MyMethod` method with the `Param` parameter as a string in `$1`. + +> If the tag is called in the context of a Web process, when the page is loaded, 4D calls the `On Web Authentication` database method (if it exists). If it returns True, 4D executes the method. + +The method must return text in `$0`. If the string starts with the code character 1, it is considered as HTML (the same principle is true for the `4DHTML` tag). + +For example, let’s say that you insert the following comment `“Today is â€` into a template Web page. When loading the page, 4D calls the `On Web Authentication` database method, then calls the `MYMETH` method and passes the string “/MYPARAM†as the parameter `$1`. The method returns text in $0 (for example "12/31/21"); the expression "`Today is` comments as you want in a template. + + + +## 4DTEXT + +#### Syntax: `` +#### Alternative syntax: `$4DTEXT(expression)` + + +The tag `` allows you to insert a reference to a 4D variable or expression returning a value. For example, if you write (in an HTML page): + +```html +

            Welcome to !

            +``` + +The value of the 4D variable `vtSiteName` will be inserted in the HTML page when it is sent. This value is inserted as simple text, special HTML characters such as ">" are automatically escaped. + +You can also insert 4D expressions. You can for example directly insert the contents of a field (``), an array element (``) or a method returning a value (``). The expression conversion follows the same rules as the variable ones. Moreover, the expression must comply with 4D syntax rules. + +> For security reasons, it is recommended to use this tag when processing data introduced from outside the application, in order to prevent the [insertion of malicious code](#prevention-of-malicious-code-insertion). + +In case of an evaluation error, the inserted text will appear as ` : ## error # error code`. + +- You must use process variables. +- You can display the content of a picture field. However, it is not possible to display the content of a picture array item. +- It is possible to display the contents of an object field by means of a 4D formula. For example, you can write ``. +- You will usually work with Text variables. However, you can also use BLOB variables. You just need to generate BLOBs in `Text without length` mode. + + + + + + +## Alternative syntax for 4DTEXT, 4DHTML, 4DEVAL + +Several existing 4D transformation tags can be expressed using a $-based syntax: + +#### $4dtag (expression) +can be used instead of +#### `` + +This alternative syntax is available only for tags used to return processed values: + +- [4DTEXT](#4dtext) +- [4DHTML](#4dhtml) +- [4DEVAL](#4deval) + +(Other tags, such as 4DIF or 4DSCRIPT, must be written with the regular syntax). + +For example, you can write: + +```html +$4DEVAL(UserName) +``` + +instead of: + +```html + +``` + +The main advantage of this syntax is that it allows you to write XML-compliant templates. Some 4D developers need to create and validate XML-based templates using standard XML parser tools. Since the "<" character is invalid in an XML attribute value, it was not possible to use the "``" syntax of 4D tags without breaking the document syntax. On the other hand, escaping the "<" character will prevent 4D from interpreting the tags correctly. + +For example, the following code would cause an XML parsing error because of the first "<" character in the attribute value: + +```xml + +``` + +Using the $ syntax, the following code is validated by the parser: + +```xml + +``` + +Note that `$4dtag` and `<--#4dtag -->` are not strictly equivalent: unlike `<--#4dtag -->`, `$4dtag` processing does not interpret 4D tags [recursively](#recursive-processing). `$` tags are always evaluated once and the result is considered as plain text. + +The reason for this difference is to prevent malicious code injection. As [explained below](#prevention-of-malicious-code-insertion), it is strongly recommended to use `4DTEXT` tags instead of `4DHTML` tags when handling user text to protect against unwanted reinterpretation of tags: with `4DTEXT`, special characters such as "<" are escaped, thus any 4D tags using the `` syntax will lose their particular meaning. However, since `4DTEXT` does not escape the `$` symbol, we decided to break support for recursion in order to prevent malicious injection using the `$4dtag (expression)` syntax. + +The following examples show the result of processing depending on the syntax and tag used: + +```4d + // example 1 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //4D will quit! +``` +```4d + // example 2 + myName:="" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: " +``` +```4d + // example 3 + myName:="$4DEVAL(QUIT 4D)" //malicious injection + input:="My name is: " + PROCESS 4D TAGS(input;output) + //output is "My name is: $4DEVAL(QUIT 4D)" +``` + +Note that the `$4dtag` syntax supports matching pairs of enclosed quotes or parenthesis. For example, suppose that you need to evaluate the following complex (unrealistic) string: + +``` +String(1) + "\"(hello)\"" +``` + +You can write: + +```4d + input:="$4DEVAL( String(1)+\"\\\"(hello)\\\"\")" + PROCESS 4D TAGS(input;output) + -->output is 1"(hello)" +``` + + diff --git a/website/translated_docs/pt/Users/handling_users_groups.md b/website/translated_docs/pt/Users/handling_users_groups.md index 5300d323e1018c..a8c41fc4ea2ff7 100644 --- a/website/translated_docs/pt/Users/handling_users_groups.md +++ b/website/translated_docs/pt/Users/handling_users_groups.md @@ -3,39 +3,40 @@ id: editing title: Managing 4D users and groups --- -## 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. -The most powerful user is named **Designer**. No aspect of the database is closed to the Designer. The Designer can: -- 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. +## Designer and Administrator + +The most powerful user is named **Designer**. No aspect of the application is closed to the Designer. The Designer can: +- access all application 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. 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. The Administrator can: - -- create users and groups, -- access the 4D Server Administration window and monitor -- access the MSC window to monitor backup, restore, or server. +- 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: - - 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. +- by default, access to protected parts of the application. 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 application. The Administrator is placed in every new group, but you can remove the Administrator’s name from any group. -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: +Both the Designer and Administrator are available by default in all applications. 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. 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. @@ -48,7 +49,7 @@ You use the users editor to create user accounts, set their properties and assig To add a user from the Toolbox : -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. +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). @@ -58,11 +59,11 @@ The list of users displays all the users, including the [Designer and the Admini 4D adds a new user to the list, named "New userX" by default. -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. +3. Enter the user name. This name will be used by the user to open the application. 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. 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. -> 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. +> Users can change their password at any time according to the options in the "Security" page of the structure settings, or using the `CHANGE PASSWORD` command. 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. @@ -70,6 +71,7 @@ The membership of users to different groups can also be set by group on the [Gro ### Deleting a user + 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) 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. @@ -78,7 +80,8 @@ Deleted user names no longer appear in the Users editor. Note that the IDs for d - **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. +- **Startup Method**: Name of an associated method that will be automatically executed when the user opens the application (optional). This method can be used for example to load the user preferences. + ## Groups editor @@ -92,11 +95,11 @@ Keep in mind that once a group has been created, it cannot be deleted. If you wa 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. 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 application project. 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. + OR + Right-click in the list of groups and choose the **Add** or **Duplicate** command in the context menu. > The Duplicate command can be used to create several groups having the same characteristics quickly. @@ -104,6 +107,7 @@ To create a group: 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. + ### 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. @@ -120,7 +124,7 @@ To remove a user or group from another group, you just need to deselect the corr ### 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. +You can assign a group privileges to any plug-ins installed in the project. This includes all the 4D plug-ins and any third-party plug-ins. 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. @@ -132,9 +136,10 @@ 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. +The best way to ensure the security of your application 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. @@ -148,4 +153,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 13acd4f77cc987..9fd29621ee9718 100644 --- a/website/translated_docs/pt/Users/overview.md +++ b/website/translated_docs/pt/Users/overview.md @@ -1,37 +1,44 @@ --- -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. +If more than one person uses an application, 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 application or to application operations. > For an overview of 4D's security features, see the [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. +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 application. -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. +Groups can then be assigned access privileges to specific parts or features of the application (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: ![](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. +Until you give the Designer a password, all application access are done with the Designer's access rights, even if you have set up users and groups (when the application opens, no ID is required). Any part of the application can be opened. -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. +When a password is assigned to the Designer, all the access privileges take effect. In order to connect to the application, remote users must enter a password. To disable the password access system, you just need to remove the Designer password. + ## 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: +In project applications (.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 with 4D Server. The following table lists the main users and groups features and their availability: -| | 4D Developer (single-user) | 4D Server | +| | 4D (single-user) | 4D Server | | ------------------------------------------------------------- | ---------------------------- | --------- | | Adding/editing users and groups | yes | yes | | Assigning user/group access to servers | yes | yes | @@ -39,6 +46,9 @@ In project databases (.4DProject or .4dz files), 4D users and groups can be conf | Access control once the Designer has been assigned a password | no (all access are Designer) | yes | + + + ## 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. @@ -47,13 +57,16 @@ The editors for users and groups are located in the toolbox of 4D. These editors > 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. The whole users and groups configuration can also be edited during application execution using 4D language commands of the [Users and Groups](https://doc.4d.com/4Dv18R3/4D/18-R3/Users-and-Groups.201-4900438.en.html) theme. + + ## Directory.json file -Users, groups, as well as their access rights are stored in a specific database file named **directory.json**. +Users, groups, as well as their access rights are stored in a specific project file named **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. +- in the user settings folder, i.e. in the "Settings" folder at the same level as the "Project" folder. These settings are used by default for the application. +- 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 settings folder. This feature allows you to define custom/local Users and Groups configurations. The custom configuration will left untouched by an application upgrade. + +> If users and groups management is not active, the **directory.json** is not created. -> If users and groups management is not active, the directory.json is not created. \ No newline at end of file diff --git a/website/translated_docs/pt/WebServer/allowProject.md b/website/translated_docs/pt/WebServer/allowProject.md new file mode 100644 index 00000000000000..52edfc870af610 --- /dev/null +++ b/website/translated_docs/pt/WebServer/allowProject.md @@ -0,0 +1,23 @@ +--- +id: allowProject +title: Allowing project methods +--- + + +The 4D tags such as `4DEVAL`, `4DTEXT`, `4DHTML`... as well as the [`/4DACTION URL`](httpRequests.md#/4daction) allow you to trigger the execution of any project method of a 4D project published on the Web. For example, the request *http://www.server.com/4DACTION/login* causes the execution of the ***login*** project method, if it exists. + +This mechanism therefore presents a security risk for the application, in particular if an Internet user intentionally (or unintentionally) triggers a method not intended for execution via the web. You can avoid this risk in the following ways: + +* Filter the methods called via the URLS using the [`On Web Authentication`](authentication.md#on-web-authentication) database method. Drawbacks: If the database includes a great number of methods, this system may be difficult to manage. + +* Use the **Available through 4D tags and URLs (4DACTION...)** option found in the Method properties dialog box: + +![](assets/en/WebServer/methodProperties.png) + +This option is used to individually designate each project method that can be called using the `4DACTION` special URL, or the `4DTEXT`, `4DHTML`, `4DEVAL`, `4DSCRIPT`, `4DIF`, `4DELSEIF` or `4DLOOP` tags. When it is not checked, the project method concerned cannot be directly executed through an HTTP request. Conversely, it can be executed using other types of calls (formulas, other methods, etc.). + +This option is unchecked by default. Methods that can be executed through `4DACTION` or specific tags must be specifically indicated. + +In the Explorer, Project methods with this property are given a specific icon: + + ![](assets/en/WebServer/methodIcon.png) diff --git a/website/translated_docs/pt/WebServer/authentication.md b/website/translated_docs/pt/WebServer/authentication.md new file mode 100644 index 00000000000000..8740bf4bf1e3c0 --- /dev/null +++ b/website/translated_docs/pt/WebServer/authentication.md @@ -0,0 +1,199 @@ +--- +id: authentication +title: Authentication +--- + +Authenticating users is necessary when you want to provide specific access rights to web users. Authentication designates the way the information concerning the user credentials (usually name and password) are collected and processed. + + +## Authentication modes + +The 4D web server proposes three authentication modes, that you can select in the **Web**/**Options (I)** page of the Settings dialog box: + +![](assets/en/WebServer/authentication.png) + +> Using a **custom** authentication is recommended. + +### Visão Geral + +The operation of the 4D web server's access system is summarized in the following diagram: + +![](assets/en/WebServer/serverAccess.png) + +> Requests starting with `rest/` are directly handled by the [REST server](REST/configuration.md). + + +### Custom (default) + +Basically in this mode, it's up to the developer to define how to authenticate users. 4D only evaluates HTTP requests [that require an authentication](#method-calls). + +This authentication mode is the most flexible because it allows you to: + +- either, delegate the user authentication to a third-party application (e.g. a social network, SSO); +- or, provide an interface to the user (e.g. a web form) so that they can create their account in your customer database; then, you can authenticate users with any custom algorithm (see [this example](sessions.md#example) from the "User sessions" chapter). The important thing is that you never store the password in clear, using such code: + +```4d +//... user account creation +ds.webUser.password:=Generate password hash($password) +ds.webUser.save() +``` + +See also [this example](gettingStarted.md#authenticating-users) from the "Getting started" chapter. + +If no custom authentication is provided, 4D calls the [`On Web Authentication`](#on-web-authentication) database method (if it exists). In addition to $1 and $2, only the IP addresses of the browser and the server ($3 and $4) are provided, the user name and password ($5 and $6) are empty. The method must return **True** in $0 if the user is successfully authenticated, then the resquested resource is served, or **False** in $0 if the authentication failed. + +> **Warning:** If the `On Web Authentication` database method does not exist, connections are automatically accepted (test mode). + + +### Basic protocol + +When a user connects to the server, a standard dialog box appears on their browser in order for them to enter their user name and password. + +> The name and password entered by the user are sent unencrypted in the HTTP request header. This mode typically requires HTTPS to provide confidentiality. + +Entered values are then evaluated: + +- If the **Include 4D passwords** option is checked, user credentials will be first evaluated against the [internal 4D users table](Users/overview.md). + - If the user name sent by the browser exists in the table of 4D users and the password is correct, the connection is accepted. If the password is incorrect, the connection is refused. + - If the user name does not exist in the table of 4D users, the [`On Web Authentication`](#on-web-authentication) database method is called. If the `On Web Authentication` database method does not exist, connections are rejected. + +- If the **Include 4D passwords** option is not checked, user credentials are sent to the [`On Web Authentication`](#on-web-authentication) database method along with the other connection parameters (IP address and port, URL...) so that you can process them. If the `On Web Authentication` database method does not exist, connections are rejected. +> With the 4D Client web server, keep in mind that all the sites published by the 4D Client machines will share the same table of users. Validation of users/passwords is carried out by the 4D Server application. + +### DIGEST protocol + +This mode provides a greater level of security since the authentication information is processed by a one-way process called hashing which makes their contents impossible to decipher. + +As in BASIC mode, users must enter their name and password when they connect. The [`On Web Authentication`](#on-web-authentication) database method is then called. When the DIGEST mode is activated, the $6 parameter (password) is always returned empty. In fact, when using this mode, this information does not pass by the network as clear text (unencrypted). It is therefore imperative in this case to evaluate connection requests using the `WEB Validate digest` command. +> You must restart the web server in order for the changes made to these parameters to be taken into account. + + + +## On Web Authentication + +The `On Web Authentication` database method is in charge of managing web server engine access. It is called by 4D or 4D Server when a dynamic HTTP request is received. + +### Database method calls + +The `On Web Authentication` database method is automatically called when a request or processing requires the execution of some 4D code (except for REST calls). It is also called when the web server receives an invalid static URL (for example, if the static page requested does not exist). + +The `On Web Authentication` database method is therefore called: + +- when the web server receives a URL requesting a resource that does not exist +- when the web server receives a URL beginning with `4DACTION/`, `4DCGI/`... +- when the web server receives a root access URL and no home page has been set in the Settings or by means of the `WEB SET HOME PAGE` command +- when the web server processes a tag executing code (e.g `4DSCRIPT`) in a semi-dynamic page. + +The `On Web Authentication` database method is NOT called: + +- when the web server receives a URL requesting a valid static page. +- when the web server reveives a URL beginning with `rest/` and the REST server is launched (in this case, the authentication is handled through the [`On REST Authentication` database method](REST/configuration.md#using-the-on-rest-authentication-database-method) or [Structure settings](REST/configuration.md#using-the-structure-settings)). + + +### Syntax + +**On Web Authentication**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) -> $0 : Boolean + +| Parameters | Type | | Description | +| ---------- | ------- |:--:| ------------------------------------------------- | +| $1 | Text | <- | URL | +| $2 | Text | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Text | <- | IP address of the web client (browser) | +| $4 | Text | <- | IP address of the server | +| $5 | Text | <- | User name | +| $6 | Text | <- | Password | +| $0 | Boolean | -> | True = request accepted, False = request rejected | + +You must declare these parameters as follows: + +```4d +//On Web Authentication database method + + C_TEXT($1;$2;$3;$4;$5;$6) + C_BOOLEAN($0) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Authentication database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) \ + -> $RequestAccepted : Boolean + +``` +> All the `On Web Authentication` database method's parameters are not necessarily filled in. The information received by the database method depends on the selected [authentication mode](#authentication-mode)). + + +#### $1 - URL + +The first parameter (`$1`) is the URL received by the server, from which the host address has been removed. + +Let’s take the example of an Intranet connection. Suppose that the IP address of your 4D Web Server machine is 123.45.67.89. The following table shows the values of $1 depending on the URL entered in the Web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.45.67.89 | / | +| http://123.45.67.89 | / | +| 123.45.67.89/Customers | /Customers | +| http://123.45.67.89/Customers/Add | /Customers/Add | +| 123.45.67.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +#### $2 - Header and Body of the HTTP request + +The second parameter (`$2`) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Authentication` database method as it is. Its contents will vary depending on the nature of the web browser which is attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + +#### $3 - Web client IP address + +The `$3` parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + + +#### $4 - Server IP address + +The `$4` parameter receives the IP address used to call the web server. 4D allows for multi-homing, which allows you to exploit machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.md#ip-address-to-listen). + + +#### $5 and $6 - User Name and Password + +The `$5` and `$6` parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser. This dialog box appears for each connection, if [basic](#basic-protocol) or [digest](#digest-protocol) authentication is selected. +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + +#### $0 parameter + +The `On Web Authentication` database method returns a boolean in $0: + +* If $0 is True, the connection is accepted. + +* If $0 is False, the connection is refused. + +The `On Web Connection` database method is only executed if the connection has been accepted by `On Web Authentication`. +> **WARNING**
            If no value is set to $0 or if $0 is not defined in the `On Web Authentication` database method, the connection is considered as accepted and the `On Web Connection` database method is executed. +> * Do not call any interface elements in the `On Web Authentication` database method (`ALERT`, `DIALOG`, etc.) because otherwise its execution will be interrupted and the connection refused. The same thing will happen if an error occurs during its processing. + + +### Example + +Example of the `On Web Authentication` database method in [DIGEST mode](#digest-protocol): + +```4d + // On Web Authentication Database Method + #DECLARE ($url : Text; $header : Text; $ipB : Text; $ipS : Text; \ + $user : Text; $pw : Text) -> $valid : Boolean + + var $found : cs.WebUserSelection + $valid:=False + + $found:=ds.WebUser.query("User === :1";$user) + If($found.length=1) // User is found + $valid:=WEB Validate digest($user;[WebUser]password) + Else + $valid:=False // User does not exist + End if +``` diff --git a/website/translated_docs/pt/WebServer/errorPages.md b/website/translated_docs/pt/WebServer/errorPages.md new file mode 100644 index 00000000000000..8b63228c43faf1 --- /dev/null +++ b/website/translated_docs/pt/WebServer/errorPages.md @@ -0,0 +1,44 @@ +--- +id: errorPages +title: Custom HTTP Error Pages +--- + +The 4D Web Server allows you to customize HTTP error pages sent to clients, based on the status code of the server response. Error pages refer to: + +* status codes starting with 4 (client errors), for example 404 + +* status codes starting with 5 (server errors), for example 501. + +For a full description of HTTP error status codes, you can refer to the [List of HTTP status codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) (Wikipedia). + + +## Replacing default pages + +To replace default 4D Web Server error pages with your own pages you just need to: + +* put custom HTML pages at the first level of the application's web folder, + +* name the custom pages "{statusCode}.html" (for example, "404.html"). + +You can define one error page per status code and/or a generic error page for a range of errors, named "{number}xx.html". For example, you can create "4xx.html" for generic client errors. The 4D Web Server will first look for a {statusCode}.html page then, if it does not exist, a generic page. + +For example, when an HTTP response returns a status code 404: + +1. 4D Web Server tries to send a "404.html" page located in the application's web folder. + +2. If it is not found, 4D Web Server tries to send a "4xx.html" page located in the application's web folder. + +3. If not found, 4D Web Server then uses its default error page. + +## Example + +If you define the following custom pages in your web folder: + +![](assets/en/WebServer/errorPage.png) + +* the "403.html" or "404.html" pages will be served when 403 or 404 HTTP responses are returned respectively, + +* the "4xx.html" page will be served for any other 4xx error status (400, 401, etc.), + +* the "5xx.html" page will be served for any 5xx error status. + diff --git a/website/translated_docs/pt/WebServer/gettingStarted.md b/website/translated_docs/pt/WebServer/gettingStarted.md new file mode 100644 index 00000000000000..261da12b41f023 --- /dev/null +++ b/website/translated_docs/pt/WebServer/gettingStarted.md @@ -0,0 +1,285 @@ +--- +id: gettingStarted +title: Getting Started +--- + +This "Getting started" section is geared at first-time users who want an overall overview on how to go from zero to a 4D website that handles data from the database. Let's start! + + +## Hello World Example + +Let's start by making the web server send "Hello World" to the browser. The most simple way to do this is to create a project, start the web server and write a small code that returns a text in the `On Web Connection` database method. + +### Starting the web server + +To start the 4D web server: + +1. Launch your 4D application and create a new, empty 4D project. +2. In the **Run** menu, select **Start Web Server**. + +That's all! The web server is started (you can see that the menu item has become **Stop Web Server**). It is now ready to handle requests. To check it, we'll display the default home page. + +### Displaying the default home page + +The 4D web server creates automatically a default `index.html` page in the default `WebFolder` root folder, created at the same level as the Project folder. + +1. Launch a web browser and connect to the web server IP address (default http port for 4D web server is 80). If the web server and the browser are on the same machine, you can select **Test Web Server** in the **Run** menu. + +The default home page is displayed: + +![](assets/en/WebServer/defaultHomePage.png) + +### Displaying Hello World + +1. Open the Explorer, display the Database Methods list and double-click on `On Web Connection`. + +2. Enter the following code: + +```4d +Case of + : ($1="/hello") + WEB SEND TEXT("Hello World!") + Else + // Error 404 for example +End case +``` + +The [`On Web Connection`](httpRequests.md#on-web-connection) database method is called for incoming requests and receives the target URL in the `$1` parameter. This very simple code only sends the text to the browser. + +3. In your browser, enter the following URL: + +``` +http://localhost/hello +``` + +The web server handles the request and returns: + +![](assets/en/WebServer/hello.png) + + +## Getting data from the database + +Now we'll see how simple it is to get data from the database. First, we will create a table and fill it with some data. + +Create a basic database with, for example, a single table containing some records: + +![](assets/en/WebServer/hello2.png) ![](assets/en/WebServer/hello3.png) + +### Displaying data in a page + +The most simple solution to display data is to call a [template page](templates.md) containing tags. + +1. Using any text editor, create a file containing the following lines: + +```html + + + + +
            + + + +``` + +2. Name the file "friends.shtml" and save it in the **WebFolder** of your project. +3. In your browser, enter the following URL: + +``` +http://localhost/friends.shtml +``` + +`.shtml` pages are automatically processed by the web server. Your page filled with data is returned: + +![](assets/en/WebServer/hello3bis.png) + +### REST request + +If we not only want to *display* data, but to *use* it, we can use ORDA and the REST server. Thanks to the [ORDA concept](ORDA/overview.md), the `Friends` table is automatically mapped to a dataclass and is available through [REST](REST/gettingStarted.md). + + +1. We will use the REST server to access data: go the "Settings" dialog box, select the "Web/Rest resource" page, and check the **Expose as REST server** option. + +![](assets/en/WebServer/hello5.png) + +2. In your browser, enter the following URL: + +``` +http://localhost/rest/$catalog +``` + +The web server returns the results in JSON: + +```json +{ + "__UNIQID": "3F1B6ACFFE12B64493629AD76011922D", + "dataClasses": [ + { + "name": "Friends", + "uri": "/rest/$catalog/Friends", + "dataURI": "/rest/Friends" + } + ] +} +``` + +You get the catalog, i.e. the list of exposed dataclasses and attributes in the datastore. + +You can also get any data. + +3. Enter the following URL: + +``` +http://localhost/rest/Friends +``` + +The server returns the entities, i.e. the data, from the Friends dataclass: + +```json +{ + "__DATACLASS": "Friends", + "__entityModel": "Friends", + "__GlobalStamp": 0, + "__COUNT": 4, + "__FIRST": 0, + "__ENTITIES": [ + { + "__KEY": "1", + "__TIMESTAMP": "2020-10-27T14:29:01.914Z", + "__STAMP": 1, + "ID": 1, + "lastName": "Smith", + "firstName": "John" + }, + { + "__KEY": "2", + "__TIMESTAMP": "2020-10-27T14:29:16.035Z", + "__STAMP": 1, + "ID": 2, + "lastName": "Brown", + "firstName": "Danny" + }, + { + "__KEY": "3", + "__TIMESTAMP": "2020-10-27T14:29:43.945Z", + "__STAMP": 1, + "ID": 3, + "lastName": "Purple", + "firstName": "Mark" + }, + { + "__KEY": "4", + "__TIMESTAMP": "2020-10-27T14:34:58.457Z", + "__STAMP": 1, + "ID": 4, + "lastName": "Dupont", + "firstName": "Jenny" + } + ], + "__SENT": 4 +} +``` + +This very simple example shows how the web server interacts transparently with the [REST server](REST/gettingStarted.md) to return any requested data, provided it is exposed. In your web interfaces, you can easily bind the javascript or html code with returned data. See the built-in [Web Data Explorer](Admin/dataExplorer.md) to have an example of sophisticated web interface bound to dataclasses. + + + + +## Login and session + +In the above sections, we get free access to the application from web requests. However, in the world of web applications, data access security is the first priority. When connecting to the 4D web server, users must be authentified and their navigation controlled. + +### Creating a table of users + +The most simple and secured way to log a user on the 4D web server is based upon the following scenario: + +- Users are stored in a dedicated, unexposed table (named *WebUsers* for example) +- The *WebUsers* table could be [encrypted](MSC/encrypt.md) and stores the user login and a hash of their password. + +1. Create a table with some fields, for example: + +![](assets/en/WebServer/helloUsers.png) + +2. Write and execute the following code to create a user: + +```4d +var $webUser : cs.WebUsersEntity + +$webUser:=ds.WebUsers.new() +$webUser.firstName:="John" +$webUser.lastName:="Doe" +// the password would be entered by the user +$webUser.password:=Generate password hash("123") +$webUser.userId:="john@4d.com" +$webUser.save() +``` + + + +### Authenticating users + +> To be secure from end to end, it is necessary that the whole connection is established via [https](webServerConfig.md#enable-https). + +1. Open the Explorer and create a project method named "login". + +3. Write the following code: + +```4d +var $indexUserId; $indexPassword : Integer +var $userId; $password : Text +var $user; $info : Object +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +// get values sent in the header of the request +WEB GET VARIABLES($anames; $avalues) + +// look for header login fields +$indexUserId:=Find in array($anames; "userId") +$userId:=$avalues{$indexUserId} +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +//look for a user with the entered name in the users table +$user:=ds.WebUsers.query("userId = :1"; $userId).first() + +If ($user#Null) //a user was found + //check the password + If (Verify password hash($password; $user.password)) + //password ok, fill the session + $info:=New object() + $info.userName:=$user.firstName+" "+$user.lastName + Session.setPrivileges($info) + //You can use the user session to store any information + WEB SEND TEXT("Welcome "+Session.userName) + Else + WEB SEND TEXT("Wrong user name or password.") + End if +Else + WEB SEND TEXT("Wrong user name or password.") +End if +``` + +3. Display the method properties by clicking on the **[i]** button in the code editor, check the `4D tags and URLs (4DACTION...)` option and click **OK**. + +![](assets/en/WebServer/hello0.png) + + +4. In your browser, enter the following URL: + +``` +http://localhost/4DACTION/login/?userID=john@4d.com&password=123 +``` + +> Using such URLs is not recommended, it is only presented here to keep the example simple. A more realistic login request must be handled through a web form and a POST request. See [this page](sessions.md#example) for an example of form POST. + +Then you will be logged for the session: + +![](assets/en/WebServer/login1.png) + +Wrong credentials would be rejected: + +![](assets/en/WebServer/login2.png) + +Once a user is logged, you can handle the associated session using the `WEB Get Current Session ID` method. See the [User sessions](sessions.md) page. + diff --git a/website/translated_docs/pt/WebServer/httpRequests.md b/website/translated_docs/pt/WebServer/httpRequests.md new file mode 100644 index 00000000000000..3caeadacca79b9 --- /dev/null +++ b/website/translated_docs/pt/WebServer/httpRequests.md @@ -0,0 +1,353 @@ +--- +id: httpRequests +title: Processing HTTP requests +--- + +The 4D web server provides several features to handle HTTP requests: + +- the `On Web Connection` database method, a router for your web application, +- the `/4DACTION` URL to call server-side code +- `WEB GET VARIABLES` to get values from HTML objects sent to the server +- other commands such as `WEB GET HTTP BODY`, `WEB GET HTTP HEADER`, or `WEB GET BODY PART` allow to customize the request processing, including cookies. +- the *COMPILER_WEB* project method, to declare your variables. + + +## On Web Connection + +The `On Web Connection` database method can be used as the entry point for the 4D Web server. + +### Database method calls + +The `On Web Connection` database method is automatically called when the server reveives any URL that is not a path to an existing page on the server. The database method is called with the URL. + +For example, the URL "*a/b/c*" will call the database method, but "*a/b/c.html*" will not call the database method if the page "c.html" exists in the "a/b" subfolder of the [WebFolder](webServerConfig.md#root-folder). + +> The request should have previously been accepted by the [`On Web Authentication`](authentication.md#on-web-authentication) database method (if it exists) and the web server must be launched. + +### Syntax + +**On Web Connection**( *$1* : Text ; *$2* : Text ; *$3* : Text ; *$4* : Text ; *$5* : Text ; *$6* : Text ) + +| Parameters | Type | | Description | +| ---------- | ---- |:--:| -------------------------------------------- | +| $1 | Text | <- | URL | +| $2 | Text | <- | HTTP headers + HTTP body (up to 32 kb limit) | +| $3 | Text | <- | IP address of the web client (browser) | +| $4 | Text | <- | IP address of the server | +| $5 | Text | <- | User name | +| $6 | Text | <- | Password | + + +You must declare these parameters as shown below: + +```4d +//On Web Connection database method + + C_TEXT($1;$2;$3;$4;$5;$6) + +//Code for the method +``` + +Alternatively, you can use the [named parameters](Concepts/parameters.md#named-parameters) syntax: + +```4d +// On Web Connection database method +#DECLARE ($url : Text; $header : Text; \ + $BrowserIP : Text; $ServerIP : Text; \ + $user : Text; $password : Text) + +``` + + +> Calling a 4D command that displays an interface element (`DIALOG`, `ALERT`, etc.) is not allowed and ends the method processing. + + +### $1 - URL extra data + +The first parameter ($1) is the URL entered by users in the address area of their web browser, without the host address. + +Let’s use an intranet connection as an example. Suppose that the IP address of your 4D Web Server machine is 123.4.567.89. The following table shows the values of $1 depending on the URL entered in the web browser: + +| URL entered in web browser | Value of parameter $1 | +| ------------------------------------ | ------------------------ | +| 123.4.567.89 | / | +| http://123.4.567.89 | / | +| 123.4.567.89/Customers | /Customers | +| http://123.4.567.89/Customers/Add | /Customers/Add | +| 123.4.567.89/Do_This/If_OK/Do_That | /Do_This/If_OK/Do_That | + +Note that you are free to use this parameter at your convenience. 4D simply ignores the value passed beyond the host part of the URL. For example, you can establish a convention where the value "*/Customers/Add*" means “go directly to add a new record in the `[Customers]` table.†By supplying the web users with a list of possible values and/or default bookmarks, you can provide shortcuts to different parts of your application. This way, web users can quickly access resources of your website without going through the entire navigation path each time they make a new connection. + + +### $2 - Header and Body of the HTTP request + +The second parameter ($2) is the header and the body of the HTTP request sent by the web browser. Note that this information is passed to your `On Web Connection` database method "as is". Its contents will vary depending on the nature of the web browser attempting the connection. + +If your application uses this information, it is up to you to parse the header and the body. You can use the `WEB GET HTTP HEADER` and the `WEB GET HTTP BODY` commands. +> For performance reasons, the size of data passing through the $2 parameter must not exceed 32 KB. Beyond this size, they are truncated by the 4D HTTP server. + + +### $3 - Web client IP address + +The $3 parameter receives the IP address of the browser’s machine. This information can allow you to distinguish between intranet and internet connections. +> 4D returns IPv4 addresses in a hybrid IPv6/IPv4 format written with a 96-bit prefix, for example ::ffff:192.168.2.34 for the IPv4 address 192.168.2.34. For more information, refer to the [IPv6 Support](webServerConfig.md#about-ipv6-support) section. + +### $4 - Server IP address + +The $4 parameter receives the IP address requested by the 4D Web Server. 4D allows for multi-homing, which allows you to use machines with more than one IP address. For more information, please refer to the [Configuration page](webServerConfig.html#ip-address-to-listen). + +### $5 and $6 - User Name and Password + +The $5 and $6 parameters receive the user name and password entered by the user in the standard identification dialog box displayed by the browser, if applicable (see the [authentication page](authentication.md)). +> If the user name sent by the browser exists in 4D, the $6 parameter (the user’s password) is not returned for security reasons. + + + + +## /4DACTION + +***/4DACTION/***MethodName***
            **/4DACTION/******MethodName/Param* + +| Parameters | Type | | Description | +| ---------- | ---- |:--:| -------------------------------------------- | +| MethodName | Text | -> | Name of the 4D project method to be executed | +| Param | Text | -> | Text parameter to pass to the project method | + +**Usage:** URL or Form action. + +This URL allows you to call the *MethodName* 4D project method with an optional *Param* text parameter. The method will receive this parameter in *$1*. + +- The 4D project method must have been [allowed for web requests](allowProject.md): the “Available through 4D tags and URLs (4DACTION...)†attribute value must have been checked in the properties of the method. If the attribute is not checked, the web request is rejected. +- When 4D receives a `/4DACTION/MethodName/Param` request, the `On Web Authentication` database method (if it exists) is called. + +`4DACTION/` can be associated with a URL in a static Web page: + +```html +Do Something +``` + +The `MyMethod` project method should generally return a "reply" (sending of an HTML page using `WEB SEND FILE` or `WEB SEND TEXT`, etc.). Be sure to make the processing as short as possible in order not to block the browser. + +> A method called by `/4DACTION` must not call interface elements (`DIALOG`, `ALERT`, etc.). + +#### Example + +This example describes the association of the `/4DACTION` URL with an HTML picture object in order to dynamically display a picture in the page. You insert the following instructions in a static HTML page: + +```html + +``` + +The `getPhoto` method is as follows: + +```4d +C_TEXT($1) // This parameter must always be declared +var $path : Text +var $PictVar : Picture +var $BlobVar : Blob + + //find the picture in the Images folder within the Resources folder +$path:=Get 4D folder(Current resources folder)+"Images"+Folder separator+$1+".psd" + +READ PICTURE FILE($path;$PictVar) //put the picture in the picture variable +PICTURE TO BLOB($PictVar;$BLOB;".png") //convert the picture to ".png" format +WEB SEND BLOB($BLOB;"image/png") +``` + +### 4DACTION to post forms + +The 4D Web server also allows you to use “posted†forms, which are static HTML pages that send data to the Web server, and to easily retrieve all the values. The POST type must be associated to them and the form’s action must imperatively start with /4DACTION/MethodName. + +A form can be submitted through two methods (both can be used with 4D): +- POST, usually used to send data to the Web server, +- GET, usually used to request data from the Web server. + +> When the Web server receives a posted form, it calls the `On Web Authentication` database method (if it exists). + +In the called method, you must call the `WEB GET VARIABLES` command in order to [retrieve the names and values](#getting-values-from-the-requests) of all the fields included in an HTML page submitted to the server. + +Example to define the action of a form: + +```html +
            +``` + +#### Example + +In a Web application, we would like for the browsers to be able to search among the records by using a static HTML page. This page is called “search.htmâ€. The application contains other static pages that allow you to, for example, display the search result (“results.htmâ€). The POST type has been associated to the page, as well as the `/4DACTION/SEARCH` action. + +Here is the HTML code that corresponds to this page: + +```html + +
            +Whole word
            + +
            +``` + +During data entry, type “ABCD†in the data entry area, check the "Whole word" option and validate it by clicking the **Search** button. In the request sent to the Web server: + +``` +vName="ABCD" +vExact="Word" +OK="Search" +``` + +4D calls the `On Web Authentication` database method (if it exists), then the `processForm` project method is called, which is as follows: + +```4d + C_TEXT($1) //mandatory for compiled mode + C_LONGINT($vName) + C_TEXT(vName;vLIST) + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrVals;0) + WEB GET VARIABLES($arrNames;$arrVals) //we retrieve all the variables of the form + $vName:=Find in array($arrNames;"vName") + vName:=$arrVals{$vName} + If(Find in array($arrNames;"vExact")=-1) //If the option has not been checked + vName:=vName+"@" + End if + QUERY([Jockeys];[Jockeys]Name=vName) + FIRST RECORD([Jockeys]) + While(Not(End selection([Jockeys]))) + vLIST:=vLIST+[Jockeys]Name+" "+[Jockeys]Tel+"
            " + NEXT RECORD([Jockeys]) + End while + WEB SEND FILE("results.htm") //Send the list to the results.htm form + //which contains a reference to the variable vLIST, + //for example + //... +End if +``` + + + + +## Getting values from HTTP requests + +4D's Web server lets you recover data sent through POST or GET requests, using Web forms or URLs. + +When the Web server receives a request with data in the header or in the URL, 4D can retrieve the values of any HTML objects it contains. This principle can be implemented in the case of a Web form, sent for example using `WEB SEND FILE` or `WEB SEND BLOB`, where the user enters or modifies values, then clicks on the validation button. + +In this case, 4D can retrieve the values of the HTML objects found in the request using the `WEB GET VARIABLES` command. The `WEB GET VARIABLES` command retrieves the values as text. + +Consider the following HTML page source code: + +```html + + + Welcome + + + +
            +

            Welcome to Spiders United

            +

            Please enter your name: +

            +

            + + +

            +

            + + + +

            +
            + + +``` + +When 4D sends the page to a Web Browser, it looks like this: + +![](assets/en/WebServer/spiders.png) + +The main features of this page are: + +- It includes three **Submit** buttons: `vsbLogOn`, `vsbRegister` and `vsbInformation`. +- When you click **Log On**, the submission of the form is first processed by the JavaScript function `LogOn`. If no name is entered, the form is not even submitted to 4D, and a JavaScript alert is displayed. +- The form has a POST 4D method as well as a Submit script (*GetBrowserInformation*) that copies the browser properties to the four hidden objects whose names starts with *vtNav_App*. It also includes the `vtUserName` object. + +Let’s examine the 4D method `WWW_STD_FORM_POST` that is called when the user clicks on one of the buttons on the HTML form. + +```4d + // Retrieval of value of variables + ARRAY TEXT($arrNames;0) + ARRAY TEXT($arrValues;0) + WEB GET VARIABLES($arrNames;$arrValues) + C_TEXT($user) + + Case of + + // The Log On button was clicked + :(Find in array($arrNames;"vsbLogOn")#-1) + $user :=Find in array($arrNames;"vtUserName") + QUERY([WWW Users];[WWW Users]UserName=$arrValues{$user}) + $0:=(Records in selection([WWW Users])>0) + If($0) + WWW POST EVENT("Log On";WWW Log information) + // The WWW POST EVENT method saves the information in a database table + Else + + $0:=WWW Register + // The WWW Register method lets a new Web user register + End if + + // The Register button was clicked + :(Find in array($arrNames;"vsbRegister")#-1) + $0:=WWW Register + + // The Information button was clicked + :(Find in array($arrNames;"vsbInformation")#-1) + WEB SEND FILE("userinfos.html") + End case +``` + +The features of this method are: + +- The values of the variables *vtNav_appName*, *vtNav_appVersion*, *vtNav_appCodeName*, and *vtNav_userAgent* (bound to the HTML objects having the same names) are retrieved using the `WEB GET VARIABLES` command from HTML objects created by the *GetBrowserInformation* JavaScript script. +- Out of the *vsbLogOn*, *vsbRegister* and *vsbInformation* variables bound to the three Submit buttons, only the one corresponding to the button that was clicked will be retrieved by the `WEB GET VARIABLES` command. When the submit is performed by one of these buttons, the browser returns the value of the clicked button to 4D. This tells you which button was clicked. + +Keep in main that with HTML, all objects are text objects. If you use a SELECT object, it is the value of the highlighted element in the object that is returned in the `WEB GET VARIABLES` command, and not the position of the element in the array as in 4D. `WEB GET VARIABLES` always returns values of the Text type. + + +## Other Web Server Commands + +The 4D web server provides several low-level web commands allowing you to develop custom processing of requests: + +- the `WEB GET HTTP BODY` command returns the body as raw text, allowing any parsing you may need +- the `WEB GET HTTP HEADER` command return the headers of the request. It is useful to handle custom cookies, for example (along with the `WEB SET HTTP HEADER` command). +- the `WEB GET BODY PART` and `WEB Get body part count` commands to parse the body part of a multi-part request and retrieve text values, but also files posted, using BLOBs. + +These commands are summarized in the following graphic: + +![](assets/en/WebServer/httpCommands.png) + +The 4D web server supports files uploaded in chunked transfer encoding from any Web client. Chunked transfer encoding is a data transfer mechanism specified in HTTP/1.1. It allows data to be transferred in a series of "chunks" (parts) without knowing the final data size. The 4D Web Server also supports chunked transfer encoding from the server to Web clients (using `WEB SEND RAW DATA`). + +## COMPILER_WEB Project Method + +The COMPILER\_WEB method, if it exists, is systematically called when the HTTP server receives a dynamic request and calls the 4D engine. This is the case, for example, when the 4D Web server receives a posted form or a URL to process in [`On Web Connection`](#on-web-connection). This method is intended to contain typing and/or variable initialization directives used during Web exchanges. It is used by the compiler when the application is compiled. The COMPILER\_WEB method is common to all the Web forms. By default, the COMPILER_WEB method does not exist. You must explicitly create it. + +> The COMPILER_WEB project method is also called, if it exists, for each SOAP request accepted. + + diff --git a/website/translated_docs/pt/WebServer/preemptiveWeb.md b/website/translated_docs/pt/WebServer/preemptiveWeb.md new file mode 100644 index 00000000000000..97c2f4ef1625bb --- /dev/null +++ b/website/translated_docs/pt/WebServer/preemptiveWeb.md @@ -0,0 +1,95 @@ +--- +id: preemptiveWeb +title: Using preemptive web processes +--- + + +The 4D Web Server allows you to take full advantage of multi-core computers by using preemptive web processes in your compiled applications. You can configure your web-related code, including 4D tags and web database methods, to run simultaneously on as many cores as possible. + +For in-depth information on preemptive process in 4D, please refer to the *Preemptive 4D processes* section in the *Language Reference*. + +## Availability of preemptive mode for web processes + +The use of preemptive mode for web processes is only available in the following contexts: + +* use of 4D Server or 4D local mode (4D in remote mode does not support preemptive mode) + +* use of a compiled database + +* **Use preemptive processes** database setting checked (see below) + +* all web-related database methods and project methods are confirmed thread-safe by 4D Compiler + +If any requirement is missing, the web server will use cooperative processes. + +## Enabling the preemptive mode for the web server + +To enable the preemptive mode for your application's web server code, you must check the **Use preemptive processes** option on the "Web/Options (I)" page of the Database Settings dialog box: + +![](assets/en/WebServer/preemptive.png) + +When this option is checked, the 4D compiler will automatically evaluate the thread-safety property of each piece of web-related code (see below) and return errors in case of incompatibility. +> This option does not apply to web service processes (server or client). Preemptive mode is supported by web service processes at method level: you just have to select "Can be run in preemptive processes" property for published SOAP server methods (see *Publishing a Web Service with 4D*) or proxy client methods (see *Subscribing to a Web Service in 4D*) and make sure they are confirmed thread-safe by the compiler. + +## Writing thread-safe web server code + +All 4D code executed by the web server must be thread-safe if you want your web processes to be run in preemptive mode. When the **Use preemptive processes** option is checked in the Settings dialog box, the following parts of the application will be automatically evaluated by the 4D compiler: + +* All web-related database methods: + * [`On Web Authentication`](authentication.md#on-web-authentication) + * [`On Web Connection`](httpRequests.md#on-web-connection) + * [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) + * [`On Mobile App Authentication`](https://doc.4d.com/4Dv18/4D/18.4/On-Mobile-App-Authentication-database-method.301-5233127.en.html) + +* The `compiler_web` project method (regardless of its actual "Execution mode" property); + +* Basically any code processed by the `PROCESS 4D TAGS` command in the web context, for example through .shtml pages. + +* Any project method with the "Available through 4D tags and URLS (`4DACTION`, etc.)" attribute + +* Triggers for tables with "Expose as REST resource" attribute + +* Project methods available through REST ("REST Server" property checked) + +For each of these methods and code parts, the compiler will check if the thread-safety rules are respected, and will return errors in case of issues. For more information about thread-safety rules, please refer to the *Writing a thread-safe method* paragraph in the *Processes* chapter. + +## Thread-safety of 4D web code + +Most of the web-related 4D commands and functions, database methods and URLs are thread-safe and can be used in preemptive mode. + +### 4D commands and database methods + +All 4D web-related commands are thread-safe, *i.e.*: + +* all commands from the *Web Server* theme, +* all commands from the *HTTP Client* theme. + +The web-related database methods are thread-safe and can be used in preemptive mode (see below): `On Web Authentication`, `On Web Connection`, `On REST Authentication`...). + +Of course, the code executed by these methods must also be thread-safe. + + +### Web Server URLs + +The following 4D Web Server URLs are thread-safe and can be used in preemptive mode: + +* *4daction/* (the called project method must also be thread-safe) +* *4dcgi/* (the called database methods must also be thread-safe) +* *4dwebtest/* +* *4dblank/* +* *4dstats/* +* *4dhtmlstats/* +* *4dcacheclear/* +* *rest/* +* *4dimgfield/* (generated by `PROCESS 4D TAGS` for web request on picture fields) +* *4dimg/* (generated by `PROCESS 4D TAGS` for web request on picture variables) + +### Preemptive web process icon + +Both the Runtime Explorer and the 4D Server administration window display a specific icon for preemptive web processes: + +| Process type | Icon | +| --------------------- | ---------------------------------------- | +| Preemptive web method | ![](assets/en/WebServer/processIcon.png) | + + diff --git a/website/translated_docs/pt/WebServer/sessions.md b/website/translated_docs/pt/WebServer/sessions.md new file mode 100644 index 00000000000000..1bd4f61ea3afcf --- /dev/null +++ b/website/translated_docs/pt/WebServer/sessions.md @@ -0,0 +1,172 @@ +--- +id: sessions +title: User sessions +--- + +The 4D web server provides built-in features for managing **user sessions**. Creating and maintaining user sessions allows you to control and improve the user experience on your web application. When user sessions are enabled, web clients can reuse the same server context from one request to another. + +Web server user sessions allow to: + +- handle multiple requests simultaneously from the same web client through an unlimited number of preemptive processes (web server sessions are **scalable**), +- share data between the processes of a web client, +- associate privileges to user sessions, +- handle access through a `Session` object and the [Session API](API/SessionClass.md). + +> **Note:** The current implementation is only the first step of an upcoming comprehensive feature allowing developers to manage hierarchical user permissions through sessions in the whole web application. + + +## Enabling sessions + +The session management feature can be enabled and disabled on your 4D web server. There are different ways to enable session management: + +- Using the **Scalable sessions** option on the "Web/Options (I)" page of the Settings (permanent setting): ![alt-text](assets/en/WebServer/settingsSession.png) + +This option is selected by default in new projects. It can however be disabled by selecting the **No sessions** option, in which case the web session features are disabled (no `Session` object is available). + +- Using the [`.scalableSession`](API/WebServerClass.md#scalablesession) property of the Web Server object (to pass in the *settings* parameter of the [`.start()`](API/WebServerClass.md#start) function). In this case, this setting overrides the option defined in the Settings dialog box for the Web Server object (it is not stored on disk). + +> The `WEB SET OPTION` command can also set the session mode for the main Web server. + +In any cases, the setting is local to the machine; so it can be different on the 4D Server Web server and the Web servers of remote 4D machines. + +> **Compatibility**: A **Legacy sessions** option is available in projects created with a 4D version prior to 4D v18 R6 (for more information, please refer to the [doc.4d.com](https://doc.4d.com) web site). + + +## Session implementation + +When [sessions are enabled](#enabling-sessions), automatic mechanisms are implemented, based upon a private cookie set by 4D itself: "4DSID_*AppName*", where *AppName* is the name of the application project. This cookie references the current web session for the application. + +> The cookie name can be get using the [`.sessionCookieName`](API/WebServerClass.md#sessioncookiename) property. + +1. In each web client request, the Web server checks for the presence and the value of the private "4DSID_*AppName*" cookie. + +2. If the cookie has a value, 4D looks for the session that created this cookie among the existing sessions; if this session is found, it is reused for the call. + +2. If the client request does not correspond to an already opened session: + +- a new session with a private "4DSID_*AppName*" cookie is created on the web server +- a new Guest `Session` object is created and is dedicated to the scalable web session. + +The current `Session` object can then be accessed through the [`Session`](API/SessionClass.md#session) command in the code of any web processes. + +![alt-text](assets/en/WebServer/schemaSession.png) + +> Web processes usually do not end, they are recycled in a pool for efficiency. When a process finishes executing a request, it is put back in the pool and made available for the next request. Since a web process can be reused by any session, [process variables](Concepts/variables.md#process-variables) must be cleared by your code at the end of its execution (using [`CLEAR VARIABLE`](https://doc.4d.com/4dv18/help/command/en/page89.html) for example). This cleanup is necessary for any process related information, such as a reference to an opened file. This is the reason why **it is recommended** to use the [Session](API/SessionClass.md) object when you want to keep session related information. + + +## Sharing information + +Each `Session` object provides a [`.storage`](API/SessionClass.md#storage) property which is a [shared object](Concepts/shared.md). This property allows you to share information between all processes handled by the session. + +## Session lifetime + +A scalable web session is closed when: + +- the web server is stopped, +- the timeout of the session cookie has been reached. + +The lifespan of an inactive cookie is 60 minutes by default, which means that the web server will automatically close inactive sessions after 60 minutes. + +This timeout can be set using the [`.idleTimeout`](API/SessionClass.md#idletimeout) property of the `Session` object (the timeout cannot be less than 60 minutes). + +When a scalable web session is closed, if the [`Session`](API/SessionClass.md#session) command is called afterwards: + +- the `Session` object does not contain privileges (it is a Guest session) +- the [`.storage`](API/SessionClass.md#storage) property is empty +- a new session cookie is associated to the session + + +## Privileges + +Privileges can be associated to sessions. On the web server, you can provide specific access or features depending on the privileges of the session. + +You can assign privileges usign the [`.setPrivileges()`](API/SessionClass.md#setprivileges) function. In your code, you can check the session's privileges to allow or deny access using the [`.hasPrivilege()`](API/SessionClass.md#hasprivilege) function. By default, new sessions do not have any privilege: they are **guest** sessions ([`.isGuest()`](API/SessionClass.md#isguest) function returns true). + +> In the current implementation (v18 R6), only the "WebAdmin" privilege is available. + +Example: + +```4d +If (Session.hasPrivilege("WebAdmin")) + //Access is granted, do nothing +Else + //Display an authentication page +End if +``` + + +## Example + +In a CRM application, each salesperson manages their own client portfolio. The datastore contains at least two linked dataclasses: Customers and SalesPersons (a salesperson has several customers). + +![alt-text](assets/en/WebServer/exampleSession.png) + +We want a salesperson to authenticate, open a session on the web server, and have the top 3 customers be loaded in the session. + + +1. We run this URL to open a session: + +``` +http://localhost:8044/authenticate.shtml +``` + +> In a production environment, it it necessary to use a [HTTPS connection](API/WebServerClass.md#httpsenabled) to avoid any uncrypted information to circulate on the network. + + +2. The `authenticate.shtml` page is a form containing *userId* et *password* input fields and sending a 4DACTION POST action: + +```html + + + +
            + UserId:
            + Password:
            + +
            + + +``` + +![alt-text](assets/en/WebServer/authenticate.png) + +3. The authenticate project method looks for the *userID* person and validates the password against the hashed value already stored in the *SalesPersons* table: + +```4d +var $indexUserId; $indexPassword; $userId : Integer +var $password : Text +var $userTop3; $sales; $info : Object + + +ARRAY TEXT($anames; 0) +ARRAY TEXT($avalues; 0) + +WEB GET VARIABLES($anames; $avalues) + +$indexUserId:=Find in array($anames; "userId") +$userId:=Num($avalues{$indexUserId}) + +$indexPassword:=Find in array($anames; "password") +$password:=$avalues{$indexPassword} + +$sales:=ds.SalesPersons.query("userId = :1"; $userId).first() + +If ($sales#Null) + If (Verify password hash($password; $sales.password)) + $info:=New object() + $info.userName:=$sales.firstname+" "+$sales.lastname + Session.setPrivileges($info) + Use (Session.storage) + If (Session.storage.myTop3=Null) + $userTop3:=$sales.customers.orderBy("totalPurchase desc").slice(0; 3) + Session.storage.myTop3:=$userTop3 + End if + End use + WEB SEND HTTP REDIRECT("/authenticationOK.shtml") + Else + WEB SEND TEXT("This password is wrong") + End if +Else + WEB SEND TEXT("This userId is unknown") +End if +``` \ No newline at end of file diff --git a/website/translated_docs/pt/WebServer/templates.md b/website/translated_docs/pt/WebServer/templates.md new file mode 100644 index 00000000000000..39ad7b2fcc8189 --- /dev/null +++ b/website/translated_docs/pt/WebServer/templates.md @@ -0,0 +1,96 @@ +--- +id: templates +title: Template pages +--- + +4D's Web server allows you to use HTML template pages containing tags, i.e. a mix of static HTML code and 4D references added by means of [transformation tags](Tags/tags.md) such as 4DTEXT, 4DIF, or 4DINCLUDE. These tags are usually inserted as HTML type comments (``) into the HTML source code. + +When these pages are sent by the HTTP server, they are parsed and the tags they contain are executed and replaced with the resulting data. The pages received by the browsers are thus a combination of static elements and values coming from 4D processing. + +For example, if you write in an HTML page: + +```html +

            Welcome to !

            +``` + +The value of the 4D variable *vtSiteName* will be inserted in the HTML page. + + +## Tags for templates + +The following 4D tags are available: + +- 4DTEXT, to insert 4D variables and expressions as text, +- 4DHTML, to insert HTML code, +- 4DEVAL, to evaluate any 4D expression, +- 4DSCRIPT, to execute a 4D method, +- 4DINCLUDE, to include a page within another one, +- 4DBASE, to modify the default folder used by the 4DINCLUDE tag, +- 4DCODE, to insert 4D code, +- 4DIF, 4DELSE, 4DELSEIF and 4DENDIF, to insert conditions in the HTML code, +- 4DLOOP and 4DENDLOOP, to make loops in the HTML code, +- 4DEACH and 4DENDEACH, to loop in collections, entity selections, or object properties. + +These tags are described in the [Transformation Tags](Tags/tags.md) page. + +It is possible to mix tags. For example, the following HTML code is allowed: + +```html + +... + + (Method call) + (If condition) + (Subpage insertion) + (End if) + + + + + + (loop on the current selection) + (If [TABLE]ValNum>10) + (subpage insertion) + (Else) + Value:
            + (Field display) + + (End for) + + +``` + + +## Tag parsing + +For optimization reasons, the parsing of the HTML source code is not carried out by the 4D Web server when HTML pages are called using simple URLs that are suffixed with “.HTML†or “.HTMâ€. + +Parsing of the contents of template pages sent by 4D web server takes place when `WEB SEND FILE` (.htm, .html, .shtm, .shtml), `WEB SEND BLOB` (text/html type BLOB) or `WEB SEND TEXT` commands are called, as well as when sending pages called using URLs. In this last case, for reasons of optimization, pages that are suffixed with “.htm†and “.html†are NOT parsed. In order to "force" the parsing of HTML pages in this case, you must add the suffix “.shtm†or “.shtml†(for example, `http://www.server.com/dir/page.shtm`). An example of the use of this type of page is given in the description of the `WEB GET STATISTICS` command. XML pages (.xml, .xsl) are also supported and always parsed by 4D. + +You can also carry out parsing outside of the Web context when you use the `PROCESS 4D TAGS` command. + +Internally, the parser works with UTF-16 strings, but the data to parse may have been encoded differently. When tags contain text (for example `4DHTML`), 4D converts the data when necessary depending on its origin and the information available (charset). Below are the cases where 4D parses the tags contained in the HTML pages, as well as any conversions carried out: + +| Action / Command | Content analysis of the sent pages | Support of $ syntax(*) | Character set used for parsing tags | +| ---------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Pages called via URLs | X, except for pages with “.htm†or “.html†extensions | X, except for pages with “.htm†or “.html†extensions | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND FILE` | X | - | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `WEB SEND TEXT` | X | - | No conversion necessary | +| `WEB SEND BLOB` | X, if BLOB is of the “text/html†type | - | Use of charset set in the "Content-Type" header of the response. Otherwise, use of default character set for the HTTP server | +| Inclusion by the `` tag | X | X | Use of charset passed as parameter of the "Content-Type" header of the page. If there is none, search for a META-HTTP EQUIV tag with a charset. Otherwise, use of default character set for the HTTP server | +| `PROCESS 4D TAGS` | X | X | Text data: no conversion. BLOB data: automatic conversion from the Mac-Roman character set for compatibility | + +(*) The alternative $-based syntax is available for 4DHTML, 4DTEXT and 4DEVAL tags. + +## Accessing 4D methods via the Web + +Executing a 4D method with `4DEACH`, `4DELSEIF`, `4DEVAL`, `4DHTML`, `4DIF`, `4DLOOP`, `4DSCRIPT`, or `4DTEXT` from a web request is subject to the [Available through 4D tags and URLs (4DACTION...)](allowProject.md) attribute value defined in the properties of the method. If the attribute is not checked for the method, it can not be called from a web request. + + +## Prevention of malicious code insertion + +4D tags accept different types of data as parameters: text, variables, methods, command names, etc. When this data is provided by your own code, there is no risk of malicious code insertion since you control the input. However, your database code often works with data that was, at one time or another, introduced through an external source (user input, import, etc.). + +In this case, it is advisable to **not use** tags such as `4DEVAL` or `4DSCRIPT`, which evaluate parameters, directly with this sort of data. + +In addition, according to the [principle of recursion](Tags/tags.md#recursive-processing), malicious code may itself include transformation tags. In this case, it is imperative to use the `4DTEXT` tag. Imagine, for example, a Web form field named "Name", where users must enter their name. This name is then displayed using a `` tag in the page. If text of the "\" type is inserted instead of the name, interpreting this tag will cause the application to be exited. To avoid this risk, you can just use the `4DTEXT` tag systematically in this case. Since this tag escapes the special HTML characters, any malicious recursive code that may have been inserted will not be reinterpreted. To refer to the previous example, the "Name" field will contain, in this case, "`<!--#4DEVAL QUIT 4D-->`" which will not be transformed. diff --git a/website/translated_docs/pt/WebServer/webServer.md b/website/translated_docs/pt/WebServer/webServer.md new file mode 100644 index 00000000000000..196c14d035972e --- /dev/null +++ b/website/translated_docs/pt/WebServer/webServer.md @@ -0,0 +1,62 @@ +--- +id: webServer +title: Visão Geral +--- + +4D in local mode, 4D in remote mode and 4D Server include a web server engine (aka http server) that enables you to design and publish powerful web applications that can make the most of your 4D databases. + +## Easy Monitoring + +You can start or stop publication of the web application at any time. To do so, you just need to select a menu command or execute a single line of code. + +Monitoring the 4D web server is easy and can be done using the 4D Server administration window or through [special URLs](webServerAdmin.md#administration-urls). + +## Ready-to-use + +The 4D web server automatically creates a default root folder and a default home page for an instantaneous availability. + +## Security + +Data security is present at every stage of the 4D web server implementations. Security levels are scalable and default settings usually select the most secure options. The 4D web server security is based upon the following elements: + +* Extended support of the [**TLS Protocol (HTTPS)**](Admin/tls.md), + +* **Authentication**: flexible and customizable [authentication features](authentication.md) based upon built-it settings as well as fallback database methods ([`On Web Authentication`](authentication.md#on-web-authentication) for the web server and [`On REST Authentication`](REST/configuration.md#using-the-on-rest-authentication-database-method) for the REST server), + +* **Control of exposed contents**: only elements that you expose explicitely can be available from direct web or REST requests. You must declare: + - [Project methods](templates.md#allowing-project-methods) exposed through HTTP requests + - [ORDA functions](ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) exposed through REST requests + - [Tables and fields](REST/configuration.md#exposing-tables-and-fields) that you don't want to be available to REST requests. + +* **Sandboxing** through the definition of a [HTML Root](webServerConfig.md#root-folder) folder by default, + +* **Control of server resource usage** (e.g. [maximum concurrent web processes](webServerConfig.html#maximum-concurrent-web-processes) option). +> For a general overview of 4D's security features, see the [4D Security guide](https://blog.4d.com/4d-security-guide/). + + +## User Sessions + +The 4D web server includes complete automatic features for easily managing [web sessions](sessions.md) (user sessions) based on cookies. + + +## Gateway to REST Requests + +The 4D web server allows accessing data stored in your 4D applications through REST requests. REST requests provide direct access to any database operation such as adding, reading, editing, ordering, or searching data. + +REST requests are detailed in the [REST server](REST/gettingStarted.md) section. + +## Extended settings + +The 4D web server configuration is defined through a comprehensive set of application-level settings that can also be customized for the session using the `webServer` object properties or the `WEB SET OPTION` command. + +## Templates and URLs + +The 4D web server supports access to data stored in your 4D applications through template pages and specific URLs. + +- Template pages contain [special tags](templates.md) that initiate web server processing at the time when they are sent to browsers. + +- [specific URLs](httpRequests) enable 4D to be called in order to execute any action; these URLs can also be used as form actions to trigger processing when the user posts HTML forms. + +## Dedicated Database Methods + +`On Web Authentication`, `On Web Connection`, as well as `On REST Authentication` database methods are the entry points of requests in the web server; they can be used to evaluate and route any type of request. diff --git a/website/translated_docs/pt/WebServer/webServerAdmin.md b/website/translated_docs/pt/WebServer/webServerAdmin.md new file mode 100644 index 00000000000000..c5a2fac3654e29 --- /dev/null +++ b/website/translated_docs/pt/WebServer/webServerAdmin.md @@ -0,0 +1,231 @@ +--- +id: webServerAdmin +title: Administration +--- + +4D provides several integrated tools to start, stop, or monitor the integrated web server. + + +## Starting the 4D Web Server + +> To be able to launch the web server of 4D or 4D Server, you must have a "4D Web Application" license. For more information, please refer to the [4D Web site](https://www.4d.com). + + +A 4D project can start and monitor a web server for the main (host) application as well as for each hosted component. + +The main 4D web server can be started in different ways: + +* Using a button/menu command. + * 4D: **Run\>Start Web Server** menu
            ![](assets/en/WebServer/start1.png) + * 4D Server: **Start HTTP server** button of the HTTP Server page
            ![](assets/en/WebServer/start2.png) + +* Automatically starting it each time the 4D application is opened. To do this, display the **Web\/Configuration** page of the Settings and select the **Launch Web Server at Startup** check box:
            ![](assets/en/WebServer/config.png) + +* Programmatically, by calling the [`webServer.start()`](API/WebServerClass.md#start) function or `WEB START SERVER` command. + +The web server of any component can be launched by calling the [`webServer.start()`](API/WebServerClass.md#start) function on the component's web server object. +> You do not need to relaunch the 4D application to start or stop the web server. + +## Stopping the 4D Web Server + +The main 4D web server can be stopped in different ways: + +* Using the **Run\>Stop Web Server** menu of 4D or the **Stop HTTP server** button of the HTTP Server page of 4D Server (both items show **Start...** when the server is not already started). + +* Programmatically, by calling the [`webServer.stop()`](API/WebServerClass.md#stop) function or `WEB STOP SERVER` command. + +The web server of any component can be stopped by calling the `webServer.stop()` function on the component's web server object. + + +## Testing the 4D Web Server + +The **Test Web Server** command can be used to make sure the built-in web server is functioning correctly (4D only). This command is accessible in the **Run** menu when the web server is launched: + +![](assets/en/WebServer/test1.png) + + +When you select this command, the home page of the website published by the 4D application is displayed in a window of your default web browser: + +![](assets/en/WebServer/defaultHomePage.png) + + +This command lets you verify that the web server, home page display, etc. work correctly. The page is called using the *localhost* URL, which is the standard shortcut designating the IP address of the machine on which the web browser is executed. The command takes into account the [TCP publication port](#http-port) number specified in the settings. + + + +## Clearing the Cache + +At any moment, you can clear the cache of the pages and images that it contains (if, for example, you have modified a static page and you want to reload it in the cache). + +To do so, you can: + +- 4D: click on the **Clear Cache** button in the Web/Options (I) page of the Settings dialog box. +- 4D Server: click on the **Clear Cache** button in the HTTP page of the [4D Server Administration window](Admin/server-admin.md#http-server-page). + +The cache is then immediately cleared. +> You can also use the [/4DCACHECLEAR](#cacheclear) URL. + + + +## Runtime Explorer + +The **Watch** page (**Web** heading) in the Runtime Explorer displays web server information, particularly: + +* **Web Cache Usage**: indicates the number of pages present in the web cache as well as its use percentage. This information is only available if the web server is active and if the cache size is greater than 0. + +* **Web Server Elapsed Time**: indicates the duration of use (in hours:minutes:seconds format) of the Web server. This information is only available if the web server is active. + +* **Web Hits Count**: indicates the total number of HTTP requests received since the web server boot, as well as an instantaneous number of requests per second (measure taken between two Runtime Explorer updates). This information is only available if the web server is active. + + + + +## Administration URLs + +Website administration URLS allow you to control the website published on your server. 4D Web Server accepts four particular URLs: */4DSTATS*, */4DHTMLSTATS*, /*4DCACHECLEAR* and */4DWEBTEST*. + +> */4DSTATS*, */4DHTMLSTATS* and */4DCACHECLEAR* are only available to the Designer and Administrator of the database. If the 4D password system has not been activated, these URLs are available to all the users. /4DWEBTEST is always available. + + +### /4DSTATS + +The **/4DSTATS** URL returns several items of information in an HTML table (displayable in a browser): + +| Item | Description | +| ---------------------- | ------------------------------------------------------------ | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **including pictures** | + +This information can allow you to check the functioning of your server and eventually adapt the corresponding parameters. +> The `WEB GET STATISTICS` command allows you to also obtain information about how the cache is being used for static pages. + +### /4DHTMLSTATS + +The */4DHTMLSTATS* URL returns, also as an HTML table, the same information as the */4DSTATS* URL. The difference is that the **Cached Objects** field only counts HTML pages (without counting picture files). Moreover, this URL returns the **Filtered Objects** field. + +| Item | Description | +| ---------------------- | ---------------------------------------------------------------------- | +| Cache Current Size | Current size of web server cache (in bytes) | +| Cache Max Size | Maximum size of cache (in bytes) | +| Cached Object Max Size | Maximum size of each object in the cache (in bytes) | +| Cache Use | Percentage of cache used | +| Cached Objects | Number of objects found in the cache, **without pictures** | +| Filtered Objects | Number of objects in cache not counted by URL, in particular, pictures | + + +### /4DCACHECLEAR + +The */4DCACHECLEAR* URL immediately clears the cache of the static pages and images. It allows you to therefore “force†the update of the pages that have been modified. + +### /4DWEBTEST + +The */4DWEBTEST* URL is designed to check the web server status. When this URL is called, 4D returns a text file with the following HTTP fields filled: + +| HTTP Field | Description | Example | +| ---------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| Date | current date at the RFC 822 format | Mon, 7 Dec 2020 13:12:50 GMT | +| Server | 4D/version number | 4D/18.5.0 (Build 18R5.257368) | +| User-Agent | name and version @ IP client address | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36 @ 127.0.0.1 | + + + +## Logs + +4D allows you to generate two logs of web requests: + +- a debug log, useful in the web server development phase (*HTTPDebugLog.txt*), +- a standardized web request log, rather used for statistic purposes (*logweb.txt*). + +Both log files are automatically created in the **Logs** folder of the application project. + +### HTTPDebugLog.txt + +The [http debug file](webServerConfig.md#debug-log) can be enabled using the [`web server` object](webServerObject.md) or the `WEB SET OPTION` command. + +This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +The following fields are logged for both Request and Response: + +| Field name | Description | +| -------------- | ------------------------------------------------------------- | +| SocketID | ID of socket used for communication | +| PeerIP | IPv4 address of host (client) | +| PeerPort | Port used by host (client) | +| TimeStamp | Timestamp in milliseconds (since system startup) | +| ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) | +| SequenceNumber | Unique and sequential operation number in the logging session | + + +### logweb.txt + +The [web log recording file](webServerConfig.md#log-recording) can be enabled using the [`web server` object](webServerObject.md), the `WEB SET OPTION` command, or the **Web/Log (type)** page of the settings. You need to select the log format. + +#### CLF/DLF + +Each line of the file represents a request, such as: *host rfc931 user \[DD/MMM/YYYY:HH:MM:SS] "request" state length* Each field is separated by a space and each line ends by the CR/LF sequence (character 13, character 10). + +DLF (Combined Log Format) format is similar to CLF (Common Log Format) format and uses exactly the same structure. It simply adds two additional HTTP fields at the end of each request: Referer and User-agent. Here is the description of CLF/DLF formats (not customizable): + +| Field name | Description | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| host | IP address of the client (ex. 192.100.100.10) | +| rfc931 | information not generated by 4D, it’s always - (a minus sign | +| user | user name as it is authenticated, or else it is - (a minus sign). If the user name contains spaces, they will be replaced by _ (an underscore). | +| DD/MMM/YYYY:HH:MM:SS | DD: day, MMM: a 3-letter abbreviation for the month name (Jan, Feb,...), YYYY: year, HH: hour, MM: minutes, SS: seconds. The date and time are local to the server. | +| request | request sent by the client (ex. GET /index.htm HTTP/1.0 | +| state | reply given by the server | +| length | size of the data returned (except the HTTP header) or 0 | +| Referer | DLF only- Contains the URL of the page pointing to the requested document. | +| User-agent | DLF only- Contains the name and version of the browser or software of the client at the origin of the request | + +#### ELF/WLF + +The ELF (Extended Log Format) format is very widespread in the world of HTTP browsers. It can be used to build sophisticated logs that meet specific needs. For this reason, the ELF format can be customized: it is possible to choose the fields to be recorded as well as their order of insertion into the file. + +The WLF (WebStar Log Format) was developed specifically for the 4D WebSTAR server. + +##### Configuring the fields + +When you choose the ELF or WLF format, the “Web Log Token Selection†area displays the fields available for the chosen format. You will need to select each field to be included in the log. To do so, check the desired fields. +> You cannot select the same field twice. + +The following table lists the fields available for each format (in alphabetical order) and describes its contents: + +| Field | ELF | WLF | Value | +| -------------- | --- | --- | -------------------------------------- | +| BYTES_RECEIVED | | X | Number of bytes received by the server | + BYTES_SENT| X| X| Number of bytes sent by the server to the client| C_DNS| X| X |IP address of the DNS (ELF: field identical to the C_IP field)| C_IP| X| X| IP address of the client (for example 192.100.100.10)| CONNECTION_ID| |X| Connection ID number| CS(COOKIE)| X| X| Information about cookies contained in the HTTP request| CS(HOST)| X| X| Host field of the HTTP request| CS(REFERER)| X| X| URL of the page pointing to the requested document| CS(USER_AGENT)| X| X| Information about the software and operating system of the client| CS_SIP| X| X| IP address of the server| CS_URI| X| X| URI on which the request is made| CS_URI_QUERY| X| X| Request query parameters| CS_URI_STEM| X| X| Part of request without query parameters| DATE| X| X| DD: day, MMM: 3-letter abbreviation for month (Jan, Feb, etc.), YYYY: year| METHOD| X| X| HTTP method used for the request sent to the server| PATH_ARGS| | X| CGI parameters: string located after the “$†character| STATUS| X| X| Reply provided by the server| TIME| X| X| HH: hour, MM: minutes, SS: seconds| TRANSFER_TIME| X| X| Time requested by server to generate the reply| USER| X| X| User name if authenticated; otherwise - (minus sign).

            If the user name contains spaces, they are replaced by _ (underlines)| URL | |X| URL requested by the client| +> Dates and times are given in GMT. + + +#### Backup Frequency + +Since a *logweb.txt* file can become considerably large, it is possible to set up an automatic archiving mechanism. The triggering of a backup can be based on a certain period of time (expressed in hours, days, week or months), or based on the file size; when the set deadline (or file size) is reached, 4D automatically closes and archives the current log file and creates a new one. + +When the web log file backup is triggered, the log file is archived in a folder named "Logweb Archives," which is created at the same level as the *logweb.txt* file. + +The archived file is renamed based on the following example: “DYYYY_MM_DD_Thh_mm_ss.txt.†For instance, for a file archived on September 4, 2020 at 3:50 p.m. and 7 seconds: “D2020_09_04_T15_50_07.txt.†+ +#### Backup Parameters + +The automatic backup parameters for the logweb.txt are set on the **Web/Log (backup)** page of the Settings: + +![](assets/en/WebServer/backup.png) + +First you must choose the frequency (days, weeks, etc.) or the file size limit criterion by clicking on the corresponding radio button. You must then specify the precise moment of the backup if necessary. + +* **No Backup**: The scheduled backup function is deactivated. + +* **Every X hour(s)**: This option is used to program backups on an hourly basis. You can enter a value between 1 and 24 . + * **starting at**: Used to set the time at which the first back up will begin. + +* **Every X day(s) at X**: This option is used to program backups on a daily basis. Enter 1 if you want to perform a daily backup. When this option is checked, you must indicate the time when the backup must be started. + +* **Every X week(s), day at X**: This option is used to program backups on a weekly basis. Enter 1 if you want to perform a weekly backup. When this option is checked, you must indicate the day(s) of the week and the time when each backup must be started. You can select several days of the week if desired. For example, you can use this option to set two weekly backups: one on Wednesdays and one on Fridays. + +* **Every X month(s), Xth day at X**: This option is used to program 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 must be started. + +* **Every X MB**: This option is used to program backups based on the size of the current request log file. A backup is automatically triggered when the file reaches the set size. You can set a size limit of 1, 10, 100 or 1000 MB. diff --git a/website/translated_docs/pt/WebServer/webServerConfig.md b/website/translated_docs/pt/WebServer/webServerConfig.md new file mode 100644 index 00000000000000..7a748985ee0e52 --- /dev/null +++ b/website/translated_docs/pt/WebServer/webServerConfig.md @@ -0,0 +1,650 @@ +--- +id: webServerConfig +title: Configuration +--- + +The 4D web server settings include security parameters, listening ports, defaults paths, and various options covering all the server features. 4D provides default values for every settings. + + +## Where to configure settings? + +There are different ways to configure the 4D web server settings, depending on the scope and the server you want to set: + +| Setting location | Scope | Involved web server | +| --------------------------------------- | ---------------------------------------- | ----------------------------------------------- | +| [webServer object](webServerObject.md) | Temporary (current session) | Any web server, including component web servers | +| `WEB SET OPTION` or a `WEB XXX` command | Temporary (current session) | Main server | +| **Settings** dialog box (**Web** pages) | Permanent (all sessions, stored on disk) | Main server | + +> Some settings are not available from all locations. + +## Cache + +| Can be set with | Name | Comments | +| ------------------- | --------------------------------------- | -------- | +| Settings dialog box | Configuration page/Use the 4D Web cache | | +| Settings dialog box | Configuration page/Page Cache Size | | + +Enables and configures the web page cache. + +The 4D web server has a cache that allows you to load static pages, GIF images, JPEG images (<512 kb) and style sheets (.css files) in memory, as they are requested. Using the cache allows you to significantly increase the web server’s performance when sending static pages. The cache is shared between all the web processes. + +You can modify the size of the cache in the **Pages Cache Size** area. The value you set depends on the number and size of your website’s static pages, as well as the resources that the host machines has at its disposal. +> While using your web database, you can check the performance of the cache by using the `WEB GET STATISTICS` command. If, for example, you notice that the cache’s rate of use is close to 100%, you may want to consider increasing the size that has been allocated to it. The [/4DSTATS] and [/4DHTMLSTATS] URLs allow you to also obtain information about the cache’s state. + + +## Certificate folder + +| Can be set with | Name | Comments | +| ---------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | `certificateFolder` | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function. | + +Folder where the TLS certificate files for the web server are located. + +By default with 4D or 4D Server, these files must be placed next to the [project folder](Project/architecture.md#project-folder). + +With 4D in remote mode, these files must be located in the local resources folder of the database on the remote machine (see `4D Client Database Folder` paragraph of the `Get 4D folder` command). You must copy these files manually on the remote machine. + +> TLS certificate files are *key.pem* (document containing the private encryption key) and *cert.pem* (document containing the certificate). + + +## Character Set + +| Can be set with | Name | Comments | +| ------------------- | ------------------------------ | ------------------------------ | +| webServer object | `characterSet` | MIBEnum integer or Name string | +| `WEB SET OPTION` | `Web character set` | MIBEnum integer or Name string | +| Settings dialog box | Options (II) page/Standard Set | Pop up menu | + +Defines the set of characters to be used by the 4D web server. The default value actually depends on the language of the OS. +> This setting is also used for generating Quick Reports in HTML format . + + +## Cipher list + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------- | -------- | +| webServer object | [`cipherSuite`](API/WebServerClass.md#ciphersuite) | Text | + +Cipher list used for the secure protocol; sets the priority of ciphering algorithms implemented by the web server. Can be a sequence of strings separated by colons (for example "ECDHE-RSA-AES128-..."). See the [ciphers page](https://www.openssl.org/docs/manmaster/man1/ciphers.html) on the OpenSSL site. + +> The default cipher list used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server, client/server connections, as well as the HTTP client and all the 4D commands that make use of the secure protocol. + +## CORS Settings + +| Can be set with | Name | Comments | +| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------ | +| webServer object | [`CORSSettings`](API/WebServerClass.md#corssettings) | Collection of objects (List of allowed hosts and methods for the CORS service) | +| `WEB SET OPTION` | `Web CORS settings` | Collection of objects (List of allowed hosts and methods for the CORS service) | +| Settings dialog box | Options (II) page/Domain names and HTTP methods allowed | Click on the [+] button to add an allowed domain name and its method(s) | + +List of allowed hosts and methods for the CORS service. + +#### Domain names (host property) + +Domain name or IP address from where external pages are allowed to send data requests to the Server via CORS. Multiple domain attributes can be added to create a white list. Several syntaxes are supported: + +- 192.168.5.17:8081 +- 192.168.5.17 +- 192.168.* +- 192.168.*:8081 +- http://192.168.5.17:8081 +- http://*.myDomain.com +- http://myProject.myDomain.com +- *.myDomain.com +- myProject.myDomain.com +- \* + + +#### HTTP methods allowed (methods property) + +Accepted HTTP method(s) for the corresponding CORS host. The following HTTP methods are supported: + +- GET +- HEAD +- POST +- PUT +- DELETE +- OPTIONS +- TRACE +- PATCH + +Separate each method with a ";" (e,g,: "post;get"). If methods is empty, null, or undefined, all methods are enabled. + +#### See also + +[Enable CORS Service](#enable-cors-service) + + + +## Debug log + +| Can be set with | Name | Comments | +| ---------------- | --------------- | -------- | +| webServer object | `debugLog` | number | +| `WEB SET OPTION` | `Web debug log` | number | + +Status of the HTTP request log file of the web server (HTTPDebugLog_nn.txt, stored in the "Logs" folder of the application -- nn is the file number). It is useful for debugging issues related to the Web server. It records each request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well. + +| Value | Constant | Description | +| ----- | ----------- | ------------------------------ | +| 0 | wdl disable | Web HTTP debug log is disabled | + + + +|1|wdl enable without body|Web HTTP debug log is enabled without body parts (body size is provided in this case)| |3|wdl enable with response body|Web HTTP debug log is enabled with body part in response only| |5|wdl enable with request body|Web HTTP debug log is enabled with body part in request only| |7|wdl enable with all body parts|Web HTTP debug log is enabled with body parts in response and request| + + +## Defaut Home page + +| Can be set with | Name | Comments | +| ------------------- | ---------------------------------------------------------- | ------------------------------------- | +| webServer object | [`defaultHomepage`](API/WebServerClass.md#defaulthomepage) | Text | +| `WEB SET HOME PAGE` | | Can be different for each web process | +| Settings dialog box | Configuration page/Default Home Page | | + +Designate a default home page for the web server. This page can be static or [semi-dynamic]. + +By default, when the web server is launched for the first time, 4D creates a home page named "index.html" and puts it in the HTML root folder. If you do not modify this configuration, any browser connecting to the web server will obtain the following page: + +![](assets/en/WebServer/defaultHomePage.png) + +You can designate another default home page by entering its pathname. + +- The path is relative to the [default HTML root folder](#root-folder). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- The path must neither start not end with a slash. + +For example, if you want the default home page to be "MyHome.htm", and it is located in the "Web" folder (itself located in the default HTML root folder), use "Web/MyHome.htm". + +If you do not specify any default home page, the `On Web Connection` database method is called. It is up to you to process the request procedurally. + +## Enable CORS Service + +| Can be set with | Name | Comments | +| ------------------- | -------------------------------------------------- | --------------------------------------------------- | +| webServer object | [`CORSEnabled`](API/WebServerClass.md#corsenabled) | Boolean, true to enable the CORS (false by default) | +| `WEB SET OPTION` | `Web CORS enabled` | 0 (disabled, default) or 1 (enabled) | +| Settings dialog box | Options (II) page/Enable CORS | Unchecked by default | + +The 4D web server implements cross-origin resource sharing (CORS) to allow specific Web pages served from another domain to access the current Web application's resources via XHR calls, e.g., using REST. For security reasons, "cross-domain" requests are forbidden at the browser level by default. When enabled, XHR calls (e.g. REST requests) from Web pages outside the domain can be allowed in your application (you need to define the list of allowed addresses in the CORS domain list, see CORS Settings below). In this case, if a non-allowed domain or method sends a cross site request, it is rejected with a "403 - forbidden" error response. + +When disabled (default), all cross site requests sent with CORS are ignored. + +For more information about CORS, please refer to the [Cross-origin resource sharing page](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) on Wikipedia. + +#### See also +[CORS Settings](#cors-settings) + +## Enable HTTP + +| Can be set with | Name | Comments | +| ------------------- | -------------------------------------------------- | -------- | +| webServer object | [`HTTPEnabled`](API/WebServerClass.md#httpenabled) | boolean | +| `WEB SET OPTION` | `Web HTTP enabled` | | +| Settings dialog box | Configuration page/Enable HTTP | | + +Indicates whether or not the web server will accept non-secure connections. + + +## Enable HTTPS + +| Can be set with | Name | Comments | +| ------------------- | ---------------------------------------------------- | -------- | +| webServer object | [`HTTPSEnabled`](API/WebServerClass.md#httpsenabled) | boolean | +| `WEB SET OPTION` | `Web HTTPS enabled` | | +| Settings dialog box | Configuration page/Enable HTTPS | | + +Status for communication over HTTPS. This option is described in [this section](Admin/tls.md). + + +## Enable HSTS + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------- | ----------------------------------------------- | +| webServer object | [`HSTSEnabled`](API/WebServerClass.md#hstsenabled) | Boolean, true to enable HSTS (default is false) | +| `WEB SET OPTION` | `Web HSTS enabled` | 0 (disabled, default) or 1 (enabled) | + +HTTP Strict Transport Security (HSTS) status. + +When [HTTPS is enabled](#enable-https), keep in mind that if [HTTP is also enabled](#enable-http), the browser can still switch between HTTPS and HTTP (for example, in the browser URL area, the user can replace "https" by "http"). To forbid http redirections, you can [disable HTTP](#enable-http), however in this case an error message is displayed to client HTTP requests. + +HSTS allows the 4D web server to declare that browsers should only interact with it via secure HTTPS connections. Once activated, the 4D web server will automatically add HSTS-related information to all response headers. Browsers will record the HSTS information the first time they receive a response from the 4D web server, then any future HTTP requests will automatically be transformed into HTTPS requests. The length of time this information is stored by the browser is specified with the Web **HSTS max age** setting. + +> HSTS requires that HTTPS is [enabled](enable-https) on the server. [HTTP](enable-http) must also be enabled to allow client initial connections. + +> You can get the current connection mode using the `WEB Is secured connection` command. + + +## HSTS Max Age + +| Can be set with | Name | Comments | +| ---------------- | ------------------------------------------------ | ----------------- | +| webServer object | [`HSTSMaxAge`](API/WebServerClass.md#hstsmaxage) | number in seconds | +| `WEB SET OPTION` | `Web HSTS max age` | number in seconds | + +Specifies the maximum length of time (in seconds) that HSTS is active for each new client connection. This information is stored on the client side for the specified duration. Default value is 63072000 (2 years) + +> **Warning:** Once HSTS is enabled, client connections will continue to use this mechanism for the specified duration. When you are testing your applications, it is recommended to set a short duration to be able to switch between secured and non-secured connection modes if necessary. + + + + + +## HTTP Compression Level + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------------------------- | ------------------------------ | +| webServer object | [`HTTPCompressionLevel`](API/WebServerClass.md#httpcompressionlevel) | | +| `WEB SET OPTION` | `Web HTTP compression level` | Applies to Web and Web Service | + +Compression level for all compressed HTTP exchanges for the 4D web server (client requests or server replies). This setting lets you optimize exchanges by either privileging speed of execution (less compression) or the amount of compression (less speed). The choice of a value depends on the size and type of data exchanged. + +Pass 1 to 9 as value where 1 is the fastest compression and 9 the highest. You can also pass -1 to get a compromise between speed and rate of compression. By default, the compression level is 1 (faster compression). + +## HTTP Compression Threshold + +| Can be set with | Name | Comments | +| ---------------- | ---------------------------------------------------------------------------- | -------- | +| webServer object | [`HTTPCompressionThreshold`](API/WebServerClass.md#httpcompressionthreshold) | | +| `WEB SET OPTION` | `Web HTTP compression threshold` | | + +In the framework of optimized HTTP exchanges, size threshold for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. + +Pass the size expressed in bytes as value. By default, the compression threshold is set to 1024 bytes. + + +## HTTP Port + +| Can be set with | Name | Comments | +| ------------------- | -------------------------------------------- | -------- | +| webServer object | [`HTTPPort`](API/WebServerClass.md#httpport) | number | +| `WEB SET OPTION` | `Web port ID` | | +| Settings dialog box | Configuration page/HTTP Port | | + +Listening IP (TCP) port number for HTTP. By default, 4D publishes a web application on the regular Web HTTP Port (TCP port), which is port 80. If that port is already used by another web service, you need to change the HTTP Port used by 4D for this database. + +> In macOS, modifying the HTTP port allows you to start the 4D web server without being the root user of the machine (see [macOS HelperTool](#macos-helpertool)). + +From a web browser, you need to include the non-default HTTP port number into the address you enter for connecting to the web application. The address must have a suffix consisting of a colon followed by the port number. For example, if you are using the HTTP port number 8080, you will specify "123.4.567.89:8080". +> **Warning**: If you use TCP port numbers other than the default numbers (80 for standard HTTP and 443 for HTTPS), be careful not to use port numbers that are defaults for other services that you might want to use simultaneously. For example, if you also plan to use the FTP protocol on your web server machine, do not use the TCP port 20 and 21, which are the default ports for that protocol. Ports numbers below 256 are reserved for well known services and ports numbers from 256 to 1024 are reserved for specific services originated on the UNIX platforms. For maximum security, specify a port number beyond these intervals (for example, in the 2000's or 3000's). + +If you specify 0, 4D will use the default HTTP port number 80. + + +## HTTP Trace + +| Can be set with | Name | Comments | +| ---------------- | ---------------------------------------------- | ------------------------------- | +| webServer object | [`HTTPTrace`](API/WebServerClass.md#httptrace) | Boolean, default = false | +| `WEB SET OPTION` | `Web HTTP TRACE` | Integer, default = 0 (disabled) | + +HTTP TRACE method activation in the 4D web server. For security reasons, by default the 4D web server rejects HTTP TRACE requests with an error 405. If necessary, you can enable the HTTP TRACE method, in which case the 4D Web server replies to HTTP TRACE requests with the request line, header, and body. + + + + +## HTTPS Port + +| Can be set with | Name | Comments | +| ------------------- | ---------------------------------------------- | -------- | +| webServer object | [`HTTPSPort`](API/WebServerClass.md#httpsport) | number | +| `WEB SET OPTION` | `Web HTTPS port ID` | | +| Settings dialog box | Configuration page/HTTPS Port | | + +Listening IP port number for HTTPS connections via TLS. By default, the value is 443 (standard value). See also [HTTP Port](#http-port) for information on port numbers. + + +## Inactive Process Timeout + +| Can be set with | Name | Comments | +| ------------------- | ------------------------------------------------------------------------ | -------- | +| webServer object | [`inactiveProcessTimeout`](API/WebServerClass.md#inactiveprocesstimeout) | | +| `WEB SET OPTION` | `Web inactive process timeout` | | +| Settings dialog box | Options (I) page/Inactive Process Timeout | Slider | + +Life duration (in minutes) of inactive processes associated with sessions. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. + +Default: 480 minutes (pass 0 to restore the default value) + + +## Inactive Session Timeout + +| Can be set with | Name | Comments | +| ---------------- | ------------------------------------------------------------------------ | -------- | +| webServer object | [`inactiveSessionTimeout`](API/WebServerClass.md#inactivesessiontimeout) | | +| `WEB SET OPTION` | `Web inactive session timeout` | | + +Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. + +Default: 480 minutes (pass 0 to restore the default value) + + +## IP Address to listen + +| Can be set with | Name | Comments | +| ------------------- | -------------------------------------------------------------- | ----------- | +| webServer object | [`IPAddressToListen`](API/WebServerClass.md#ipaddresstolisten) | | +| `WEB SET OPTION` | `Web IP address to listen` | | +| Settings dialog box | Configuration page/IP Address | Pop up menu | + +IP address strings on which the 4D web server will receive HTTP requests (4D local and 4D Server). + +By default, no specific address is defined (**Any** value in the Settings dialog box), which means that the server responds to all IP addresses. When you designate a specific address, the server only responds to requests sent to this address. This feature is designed for 4D web servers located on machines with multiple TCP/IP addresses. It is, for example, frequently the case of most host providers. + +Possible values: IP address string. Both IPv6 string formats (e.g. "2001:0db8:0000:0000:0000:ff00:0042:8329") and IPv4 string formats (e.g. "123.45.67.89") are supported. + +#### About IPv6 support + +* **No warning when TCP port is occupied**
            When the server is set to respond on "Any" IP addresses, if the TCP port is being used by another application, this is not indicated when the server is started. In fact, 4D server does not detect any error in this case because the port remains free on the IPv6 address. However, it is not possible to access it using the IPv4 address of the machine, nor by means of the local address: 127.0.0.1.

            If your 4D server does not seem to be responding on the port defined, you can test the address [::1] on the server machine (equivalent to 127.0.0.1 for IPv6, add [:portNum] to test another port number). If 4D responds, it is likely that another application is using the port in IPv4. + +* **IPv4-mapped IPv6 addresses**
            To standardize processing, 4D provides a standard hybrid representation of IPv4 addresses in IPv6. These addresses are written with a 96-bit prefix in IPv6 format, followed by 32 bits written in the dot-decimal notation of IPv4. For example, ::ffff:192.168.2.34 represents the IPv4 address 192.168.2.34. + +* **Indication of port numbers**
            Since IPv6 notation uses colons (:), adding port numbers may lead to some confusion, for example: + +```code4d + 2001:0DB8::85a3:0:ac1f:8001 // IPv6 address + 2001:0DB8::85a3:0:ac1f:8001:8081 // IPv6 address with port 8081 +``` + +To avoid this confusion, we recommend using the [ ] notation whenever you combine an IPv6 address with a port number, for instance: + +```code4d + [2001:0DB8::85a3:0:ac1f:8001]:8081 //IPv6 address with port 8081 +``` + +## Keep Session + +| Can be set with | Name | Comments | +| ------------------- | -------------------------------------------------- | -------- | +| webServer object | [`keepSession`](API/WebServerClass.md#keepsession) | | +| `WEB SET OPTION` | `Web keep session` | | +| Settings dialog box | Options (I) page/Automatic Session Management | | + +Session management enabling status for the 4D web server. Session mechanism is described in the [Session Management](sessions.md) section. + +Default is true (enabled). + +> When this option is checked, the "Reuse Temporary Contexts" option is automatically checked (and locked). + + +## Log Recording + +| Can be set with | Name | Comments | +| ------------------- | ---------------------------------------------------- | ----------- | +| webServer object | [`logRecording`](API/WebServerClass.md#logrecording) | | +| `WEB SET OPTION` | `Web log recording` | | +| Settings dialog box | Log (type) page/Log Format | Pop up menu | + +Starts or stops the recording of requests received by the 4D web server in the *logweb.txt* file and sets its format. By default, requests are not recorded (0/No Log File). When enabled, the *logweb.txt* file is automatically placed in the Logs folder. + +This setting allows you to select the format of this file. Available values are: + +| Value | Format name | Description | +| ----- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 0 | No Log File | Default | +| 1 | Record in CLF format | Common Log Format - Each line of the file represents a request, such as: `host rfc931 user [DD/MMM/YYYY:HH:MM:SS] "request" state length` - Each field is separated by a space and each line ends by the CR/LF sequence. | +| 2 | Record in DLF format | Combined Log Format - Similar to CLF format but adds two additional HTTP fields at the end of each request: Referer and User-agent. | +| 3 | Record in ELF format | Extended Log Format - To be customized in the Settings dialog box | +| 4 | Record in WLF format | WebStar Log Format - To be customized in the Settings dialog box | + +> Formats 3 and 4 are custom formats whose contents must be set beforehand in the Settings dialog box. If you use one of these formats without any of its fields having been selected on this page, the log file will not be generated. + + +## Maximum Concurrent Web Processes + +| Can be set with | Name | Comments | +| ------------------- | ------------------------------------------------------------------------ | -------- | +| webServer object | [`maxConcurrentProcesses`](API/WebServerClass.md#maxconcurrentprocesses) | | +| `WEB SET OPTION` | `Web max concurrent processes` | | +| Settings dialog box | Options (I) page/Maximum Concurrent Web Processes | | + +Strictly high limit of concurrent web processes that can be simultaneously open on the server. This parameter allows prevention of server saturation as the result of massive number of requests. When the maximum number of concurrent Web processes (minus one) is reached, 4D no longer creates new processes and sends the HTTP status `503 - Service Unavailable` to all new requests. + +By default, the value is 100. You can set the number anywhere between 10 and 32000. + + +## Maximum Request Size + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------------- | -------- | +| webServer object | [`maxRequestSize`](API/WebServerClass.md#maxrequestsize) | | +| `WEB SET OPTION` | `Web maximum requests size` | | + +Maximum size (in bytes) of incoming HTTP requests (POST) that the web server is authorized to process. By default, the value is 2 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147 483 648) means that, in practice, no limit is set. + +This limit is used to avoid web server saturation due to incoming requests that are too large. When a request reaches this limit, the 4D web server rejects it. + +Possible values: 500 000 to 2 147 483 648. + + +## Maximum Session Number + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------- | -------- | +| webServer object | [`maxSessions`](API/WebServerClass.md#maxsessions) | | +| `WEB SET OPTION` | `Web max sessions` | | + +Maximum number of simultaneous sessions. When you reach the limit set, the oldest session is closed (and `On Web Close Process` database method is called) if the Web server needs to create a new one. The number of simultaneous sessions cannot exceed the [maximum number of Web processes](#maximum-concurrent-web-processes) (100 by default). + +Default value: 100 (pass 0 to restore the default value). + + +## Minimum TLS Version + +| Can be set with | Name | Comments | +| ---------------- | ------------------------------------------------------ | -------- | +| webServer object | [`minTLSVersion`](API/WebServerClass.md#mintlsversion) | number | + +Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. + +Possible values: + +- 1 = TLSv1_0 +- 2 = TLSv1_1 +- 3 = TLSv1_2 (default) +- 4 = TLSv1_3 + +If modified, the server must be restarted to use the new value. + +> The minimum TLS version used by 4D can be modified for the session using the `SET DATABASE PARAMETER` command, in which case the modification applies to the entire 4D application, including the web server, SQL server and client/server connections. + + +## Name + +| Can be set with | Name | Comments | +| ---------------- | ------------------------------------ | -------- | +| webServer object | [`name`](API/WebServerClass.md#name) | | + + +Name of the web server application. Useful when component web servers are started. + +## OpenSSL Version + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------------- | --------- | +| webServer object | [`openSSLVersion`](API/WebServerClass.md#opensslversion) | Read-only | + +Version of the OpenSSL library used. + + +## Perfect Forward Secrecy + +| Can be set with | Name | Comments | +| ---------------- | ---------------------------------------------------------------------- | ------------------ | +| webServer object | [`perfectForwardSecrecy`](API/WebServerClass.md#perfectforwardsecrecy) | Boolean, read-only | + +True if PFS is available on the web server (see [TLS](Admin/tls.md#perfect-forward-secrecy-pfs) section). + + +## Robots.txt + +Certain robots (query engines, spiders...) scroll through web servers and static pages. If you do not want robots to be able to access your entire site, you can define which URLs they are not allowed to access. + +To do so, put the ROBOTS.TXT file at the server's root. This file must be structured in the following manner: + +```4d + User-Agent: + Disallow: or +``` + +For example: + +```4d + User-Agent: * + Disallow: /4D + Disallow: /%23%23 + Disallow: /GIFS/ +``` + +* “User-Agent: *†- all robots are affected. +* “Disallow: /4D†- robots are not allowed to access URLs beginning with /4D. +* “Disallow: /%23%23†- robots are not allowed to access URLs beginning with /%23%23. +* “Disallow: /GIFS/’ - robots are not allowed to access the /GIFS/ folder or its subfolders. + +Another example: + +```code4d + User-Agent: * + Disallow: / +``` + +In this case, robots are not allowed to access the entire site. + + +## Root Folder + +| Can be set with | Name | Comments | +| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | +| webServer object | [`rootFolder`](API/WebServerClass.md#rootfolder) | Text property but can be a [`4D.Folder`](API/FolderClass.md) object when used with the *settings* parameter of the `start()` function | +| `WEB SET ROOT FOLDER` | | | +| Settings dialog box | Configuration page/Default HTML Root | | + +Path of web server root folder, i.e. the folder in which 4D will search for the static and semi-dynamic HTML pages, pictures, etc., to send to the browsers. The path is formatted in POSIX full path. The web server will need to be restarted in order for the new root folder to be taken into account. + +Moreover, the HTML root folder defines, on the web server hard drive, the hierarchical level above which the files will not be accessible. If a requested URL or a 4D command tries to access a file located above the HTML root folder, an error is returned indicating that the file has not been found. + +By default, 4D defines a HTML Root folder named **WebFolder**. If it does not already exist, the HTML root folder is physically created on disk at the moment the Web server is launched for the first time. The root folder is created: +- with 4D (local) and 4D Server, at the same level as the [Project folder](Project/architecture.md#project-folder). +- with 4D in remote mode, in the local resources folder. + +You can designate another default HTML root folder by entering its pathname. + +- The path is relative to the [Project folder](Project/architecture.md#project-folder) (4D local and 4D Server) or to the folder containing the 4D application or software package (4D in remote mode). +- The path is expressed with the POSIX syntax (folders are separated by a slash ("/")) +- To "go up" one level in the folder hierarchy, enter “..†(two periods) before the folder name +- The path must not start with a slash (except if you want the HTML root folder to be the Project or 4D remote folder, but for access to the folders above to be forbidden, in which case you can pass "/" as the root folder). + +For example, if you want the HTML root folder to be the "Web" subfolder in the "MyWebApp" folder, enter "MyWebApp/Web". + +> When the HTML root folder is modified, the cache is cleared so as to not store files whose access is restricted. + + + +## Session Cookie Domain + +| Can be set with | Name | Comments | +| ---------------- | ------------------------------------------------------------------ | -------- | +| webServer object | [`sessionCookieDomain`](API/WebServerClass.md#sessioncookiedomain) | | +| `WEB SET OPTION` | `Web session cookie domain` | | + +Value of the "domain" field of the session cookie. Useful for controlling the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data. + + +## Session Cookie Name + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------------------- | -------- | +| webServer object | [`sessionCookieName`](API/WebServerClass.md#sessioncookiename) | | +| `WEB SET OPTION` | `Web session cookie name` | | + +Name of the cookie used for saving the session ID. Default = "4DSID". + + +## Session Cookie Path + +| Can be set with | Name | Comments | +| ---------------- | -------------------------------------------------------------- | -------- | +| webServer object | [`sessionCookiePath`](API/WebServerClass.md#sessioncookiepath) | | +| `WEB SET OPTION` | `Web session cookie path` | | + +"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc. + +## Session Cookie SameSite + +| Can be set with | Name | Comments | +| ---------------- | ---------------------------------------------------------------------- | -------- | +| webServer object | [`sessionCookieSameSite`](API/WebServerClass.md#sessioncookiesamesite) | | + +Value of the `SameSite` attribute value of the session cookie. This attribute allows you to declare if your cookie should be restricted to a first-party or same-site context, as a protection from some cross-site request forgery ([CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF)) attacks. + +> For a detailed description of the `SameSite` attribute, please refer to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite) or [this web.dev page](https://web.dev/samesite-cookies-explained/). + +Three values are available: + +- "Strict" (default `SameSite` attribute value for 4D session cookies): cookies will only be sent in the first-party context, i.e. context matching the domain of the current site, and never to third-party websites. +- "Lax": Cookies are not sent on cross-site subrequests (for example to load images or frames into a third-party site), but are sent when a user is navigating to the origin site (i.e. they follow a link). +- "None": Cookies are sent in all contexts, i.e in responses to both first-party and cross-origin requests. When "None" value is used, the cookie `Secure` attribute must also be set (or the cookie will be blocked). + +The `Secure` attribute value of the session cookie is automatically set to "True" if the connection is HTTPS (whatever the `SameSite` attribute value). + +> It is not recommended to set `SameSite=None` on a HTTP server since the `Secure` attribute will be missing (used in HTTPS only) and cookies will be blocked. + + + +## Session IP Address Validation + +Can be set with|Name|Comments| |---|---|---| |webServer object|[`sessionIPAddressValidation`](API/WebServerClass.md#sessionipaddressvalidation)|| |`WEB SET OPTION`|`Web session enable IP address validation`|| + +IP address validation status for session cookies. For security reasons, by default the 4D web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 4G/5G networks, their IP address will change. In this case, you must pass 0 in this option to allow clients to be able to continue using their Web sessions even when the IP addresses change. Note that this setting lowers the security level of your application. + +When it is modified, this setting is effective immediately (you do not need to restart the HTTP server). + +Possible values: 0 (disabled) or 1 (enabled, default). + + + + +## Deprecated Settings + +The following settings are still supported but rely on deprecated features or technologies. It is usually recommended to keep default values. + +#### Allow database Access through 4DSYNC URLs + +This option controls the support of HTTP synchronization requests containing deprecated */4DSYNC* URLs. + + +#### Reuse temporary contexts (in remote mode) + +Allows you to optimize the operation of the 4D Web Server in remote mode by reusing web processes created for processing previous web requests. In fact, the web server in 4D needs a specific web process for the handling of each web request; in remote mode, when necessary, this process connects to the 4D Server machine in order to access the data and database engine. It thus generates a temporary context using its own variables, selections, etc. Once the request has been dealt with, this process is killed. + +When the **Reuse Temporary Contexts** option is checked, in remote mode 4D maintains the specific web processes and reuses them for subsequent requests. By removing the process creation stage, web server performance is improved. + +In return, you must make sure in this case to systematically initialize the variables used in 4D methods in order to avoid getting incorrect results. Similarly, it is necessary to erase any current selections or records defined during the previous request. +> * This option is checked (and locked) automatically when the **Automatic Session Management** option is checked. In fact, the session management mechanism is actually based on the principle of recycling web processes: each session uses the same process that is maintained during the lifespan of the session. However, note that session processes cannot be "shared" between different sessions: once the session is over, the process is automatically killed (and not reused). It is therefore unnecessary to reset the selections or variables in this case. +> +> * This option only has an effect with a 4D web server in remote mode. With a 4D in local mode, all web processes (other than session processes) are killed after their use. + + + +#### Send Extended Characters Directly + +When this option is checked, the web server sends extended characters “as is†in semi-dynamic pages, without converting them into HTML entities. This option has shown a speed increase on most foreign operating systems (especially the Japanese system). + + +#### Keep-Alive Connections + +The 4D Web Server can use keep-alive connections. The keep-alive option allows you to maintain a single open TCP connection for the set of exchanges between the web browser and the server to save system resources and to optimize transfers. + +The **Use Keep-Alive Connections** option enables or disables keep-alive TCP connections for the web server. This option is enabled by default. In most cases, it is advisable to keep this option check since it accelerates the exchanges. If the web browser does not support connection keep alive, the 4D Web Server automatically switches to HTTP/1.0. + +The 4D Web Server keep-alive function concerns all TCP/IP connections (HTTP, HTTPS). Note however that keep-alive connections are not always used for all 4D web processes. + +In some cases, other optimized internal functions may be invoked. Keep-alive connections are useful mainly for static pages. + +Two options allow you to set how the keep-alive connections work: + +* **Number of requests by connection**: Allows you to set the maximum number of requests and responses able to travel over a connection keep alive. Limiting the number of requests per connection allows you to prevent server flooding due to a large number of incoming requests (a technique used by hackers).

            The default value (100) can be increased or decreased depending on the resources of the machine hosting the 4D Web Server. + +* **Timeout**: This value defines the maximum wait period (in seconds) during which the web server maintains an open TCP connection without receiving any requests from the web browser. Once this period is over, the server closes the connection.

            If the web browser sends a request after the connection is closed, a new TCP connection is automatically created. This operation is not visible for the user. + diff --git a/website/translated_docs/pt/WebServer/webServerObject.md b/website/translated_docs/pt/WebServer/webServerObject.md index ed3864e1491e52..c7d3ba4236d346 100644 --- a/website/translated_docs/pt/WebServer/webServerObject.md +++ b/website/translated_docs/pt/WebServer/webServerObject.md @@ -3,78 +3,78 @@ id: webServerObject title: Web Server object --- -## Overview -A 4D project can start and monitor a web server for the main (host) database as well as each hosted component. +A 4D project can start and monitor a web server for the main (host) application as well as each hosted component. -For example, if you installed two components in your main database, you can start and monitor up to three independant web servers from your application: +For example, if you installed two components in your main application, you can start and monitor up to three independant web servers from your application: -- one web server for the host database, +- one web server for the host application, - one web server for the component #1, - one web server for the component #2. -Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D database project. +Other than memory, there is no limit to the number of components and thus, of web servers, that can be attached to a single 4D application project. -Each 4D web server, including the main database's web server, is exposed as a specific **object**. Once instantiated, a web server object can be handled from the current database or from any component. +Each 4D web server, including the main application's web server, is exposed as a specific **object** of the `4D.WebServer` class. Once instantiated, a web server object can be handled from the current application or from any component using a [large number of properties and functions](API/WebServerClass.md). -> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot control the web server to which they apply (see below). - -Each web server (host database or component) can be used in its own separate context, including: +> The legacy [WEB commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) of the 4D language are supported but cannot select the web server to which they apply (see below). +Each web server (host application or component) can be used in its own separate context, including: - `On Web Authentication` and `On Web Connection` database method calls - 4D tags processing and method calls, -- managing web sessions and TLS protocols. +- web sessions and TLS protocol management. + +This allows you to develop independant components and features that come with their own web interfaces. -This feature allows you to develop independant components and features that come with their own web interfaces. ## Instantiating a web server object -The web server object of the host database (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created database: +The web server object of the host application (default web server) is automatically loaded by 4D at startup. Thus, if you write in a newly created project: ```4d $nbSrv:=WEB Server list.length //$nbSrv value is 1 ``` -To instantiate a web server object, call the `WEB Server` command: +To instantiate a web server object, call the [`WEB Server`](API/WebServerClass.md#web-server) command: ```4d -C_OBJECT(webServer) + //create an object variable of the 4D.WebServer class +var webServer : 4D.WebServer //call the web server from the current context webServer:=WEB Server + //equivalent to webServer:=WEB Server(Web server database) ``` -If the database uses components and you want to call: - -- the host database's web server from a component or -- the server that received the request (whatever the server), +If the application uses components and you want to call: +- the host application's web server from a component or +- the server that received the request (whatever the server), you can also use: ```4d -C_OBJECT(webServer) +var webServer : 4D.WebServer //call the host web server from a component webServer:=WEB Server(Web server host database) //call the target web server webServer:=WEB Server(Web server receiving request) ``` -## Web server methods -A web server object contains the following member methods: +## Web server functions -| Method | Parameter | Return value | Description | -| --------- | ----------------- | --------------- | --------------------- | -| `start()` | settings (object) | status (object) | Starts the web server | -| `stop()` | - | - | Stops the web server | +A [web server class object](API/WebServerClass.md#web-server-object) contains the following functions: +| Funções | Parameter | Return value | Description | +| ---------------------------------------- | ----------------- | --------------- | --------------------- | +| [`start()`](API/WebServerClass.md#start) | settings (object) | status (object) | Starts the web server | +| [`stop()`](API/WebServerClass.md#start) | - | - | Stops the web server | -To start and stop a web server, just call the `start()` and `stop()` member methods of the web server object: +To start and stop a web server, just call the [`start()`](API/WebServerClass.md#start) and [`stop()`](API/WebServerClass.md#stop) functions of the web server object: ```4d -C_OBJECT($status) +var $status : Object //to start a web server with default settings $status:=webServer.start() //to start the web server with custom settings @@ -85,202 +85,53 @@ webServer.start($settings) $status:=webServer.stop() ``` + ## Web server properties -A web server object contains the following properties. - -Character set that the 4D Web Server should use to communicate with browsers connecting to the database. The default value actually depends on the language of the OS. Can be a MIBEnum longint or Name string, identifiers [defined by IANA](http://www.iana.org/assignments/character-sets) supported by the 4D Web Server: - -- 4 = ISO-8859-1 -- 12 = ISO-8859-9 -- 13 = ISO-8859-10 -- 17 = Shift-JIS -- 2024 = Windows-31J -- 2026 = Big5 -- 38 = euc-kr -- 106 = UTF-8 -- 2250 = Windows-1250 -- 2251 = Windows-1251 -- 2253 = Windows-1253 -- 2255 = Windows-1255 -- 2256 = Windows-1256 - - - < - - p> - - < - - p>Default value: 63072000 (2 years)| |HTTPCompressionLevel|number|Compression level for all compressed HTTP exchanges for the 4D HTTP server (client requests or server replies). This selector lets you optimize exchanges by either prioritizing speed of execution (less compression) or the amount of compression (less speed). - - < - - p> - - < - - p>Possible values: - - - 1 to 9 (where 1 is the fastest compression and 9 the highest). - - -1 = set a compromise between speed and rate of compression. - - Default = 1 (faster compression).| |HTTPCompressionThreshold|number|Size threshold (bytes) for requests below which exchanges should not be compressed. This setting is useful in order to avoid losing machine time by compressing small exchanges. - - < - - p> - - < - - p>Default compression threshold = 1024 bytes| |HTTPEnabled|boolean|HTTP protocol state| |HTTPPort|number|Listening IP port number for HTTP. - - < - - p> - - < - - p>Default = 80| |HTTPTrace|boolean|HTTP TRACE activation. For security reasons, by default the Web server rejects HTTP TRACE requests with an error 405. When enabled, the web server replies to HTTP TRACE requests with the request line, header, and body.| |HTTPSEnabled|boolean|HTTPS protocol state| |HTTPSPort|number|Listening IP port number for HTTPS. - - < - - p> - - < - - p>Default = 443| |inactiveProcessTimeout|number|Life duration (in minutes) of the inactive session processes. At the end of the timeout, the process is killed on the server, the `On Web Close Process` database method is called, then the session context is destroyed. - - < - - p> - - < - - p>Default = 480 minutes| |inactiveSessionTimeout|number|Life duration (in minutes) of inactive sessions (duration set in cookie). At the end of this period, the session cookie expires and is no longer sent by the HTTP client. - - < - - p> - - < - - p>Default = 480 minutes| |IPAddressToListen|text|IP address on which the 4D Web Server will receive HTTP requests. Both IPv6 string formats and IPv4 string formats are supported.| |*isRunning*|boolean|Web server running state| |keepSession|boolean|Session management enabling status - - < - - p> - - < - - p>Default = true| |logRecording|number|Log requests (logweb.txt) recording value. - - - 0 = Do not record (default) - - 1 = Record in CLF format - - 2 = Record in DLF format - - 3 = Record in ELF format - - 4 = Record in WLF format| |maxConcurrentProcesses|number|Maximum number of concurrent web processes supported by the web server. When this number (minus one) is reached, 4D will not create any other processes and returns the HTTP status 503 - Service Unavailable to all new requests. - - < - - p> - - < - - p>Possible values: 10 - 32000 - - < - - p> - - < - - p>Default = 100| |maxRequestSize|number|Maximum size (in bytes) of incoming HTTP requests (POST) that the Web server is allowed to process. Passing the maximum value (2147483648) means that, in practice, no limit is set. This limit is used to avoid web server saturation due to incoming requests that are too large. If a request reaches this limit, the web server rejects it. - - < - - p> - - < - - p>Possible values: 500000 - 2147483648| |maxSessions|number|Maximum number of simultaneous sessions. When you reach the limit, the oldest session is closed (and `On Web Close Process` database method is called) if the web server needs to create a new one. The number of simultaneous sessions cannot exceed the total number of web processes (`maxConcurrentProcesses` property, 100 by default)| |minTLSVersion|number|Minimum TLS version accepted for connections. Connection attempts from clients supporting only versions below the minimum will be rejected. - - < - - p> - - < - - p>Possible values: - - - 1 = `TLSv1_0` - - 2 = `TLSv1_1` - - 3 = `TLSv1_2` (default) - - < - - p> - - < - - p>If modified, the server must be restarted to use the new value.| |*name*|text|Name of the web server database| |*openSSLVersion*|text|Version of the OpenSSL library used| |*perfectForwardSecrecy*|boolean|PFS availability on the server| |rootFolder|text|Path of web server root folder. The path is formatted in POSIX full path using filesystems. When using this property in the `settings` parameter, it can be a `Folder` object.| |sessionCookieDomain|text|"domain" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/*.4d.fr" for this selector, the client will only send a cookie when the request is addressed to the domain ".4d.fr", which excludes servers hosting external static data.| |sessionCookieName|text|Name of the cookie used for storing the session ID. - - < - - p> - - < - - p>Default = "4DSID"| |sessionCookiePath|text|"path" field of the session cookie. Used to control the scope of the session cookies. If you set, for example, the value "/4DACTION" for this selector, the client will only send a cookie for dynamic requests beginning with 4DACTION, and not for pictures, static pages, etc.| |sessionIPAddressValidation|boolean|IP address validation for session cookies. For security reasons, by default the web server checks the IP address of each request containing a session cookie and rejects it if this address does not match the IP address used to create the cookie. In some specific applications, you may want to disable this validation and accept session cookies, even when their IP addresses do not match. For example when mobile devices switch between Wifi and 3G/4G networks, their IP address will change. In this case, you can allow clients to be able to continue using their web sessions even when the IP addresses change. - - < - - p> - - < - - p>Note: this setting lowers the security level of your application| - - These properties are defined: - - 1. using the `settings` parameter of the `webServer.start( )` method (except for read-only properties, see below), - 2. if not used, using the `WEB SET OPTION` command (host databases only), - 3. if not used, in the database settings of the host database or the component. - - If the web server is not started, the properties contain the values that will be used at the next web server startup. - - If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the `webServer.start()` method. - - > *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the `start()` method. - - ## Scope of the 4D Web commands - - The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. - - | Command | Scope | - | ------------------------------- | ------------------------------------ | - | `SET DATABASE PARAMETER` | Host database web server | - | `WEB CLOSE SESSION` | Web server that received the request | - | `WEB GET BODY PART` | Web server that received the request | - | `WEB Get body part count` | Web server that received the request | - | `WEB Get Current Session ID` | Web server that received the request | - | `WEB GET HTTP BODY` | Web server that received the request | - | `WEB GET HTTP HEADER` | Web server that received the request | - | `WEB GET OPTION` | Host database web server | - | `WEB Get server info` | Host database web server | - | `WEB GET SESSION EXPIRATION` | Web server that received the request | - | `WEB Get session process count` | Web server that received the request | - | `WEB GET STATISTICS` | Host database web server | - | `WEB GET VARIABLES` | Web server that received the request | - | `WEB Is secured connection` | Web server that received the request | - | `WEB Is server running` | Host database web server | - | `WEB SEND BLOB` | Web server that received the request | - | `WEB SEND FILE` | Web server that received the request | - | `WEB SEND HTTP REDIRECT` | Web server that received the request | - | `WEB SEND RAW DATA` | Web server that received the request | - | `WEB SEND TEXT` | Web server that received the request | - | `WEB SET HOME PAGE` | Host database web server | - | `WEB SET HTTP HEADER` | Web server that received the request | - | `WEB SET OPTION` | Host database web server | - | `WEB SET ROOT FOLDER` | Host database web server | - | `WEB START SERVER` | Host database web server | - | `WEB STOP SERVER` | Host database web server | - | `WEB Validate digest` | Web server that received the request | \ No newline at end of file +A web server object contains [various properties](API/WebServerClass.md#web-server-object) which configure the web server. + +These properties are defined: + +1. using the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function (except for read-only properties, see below), +2. if not used, using the `WEB SET OPTION` command (host applications only), +3. if not used, in the settings of the host application or the component. + +- If the web server is not started, the properties contain the values that will be used at the next web server startup. +- If the web server is started, the properties contain the actual values used by the web server (default settings could have been overriden by the `settings` parameter of the [`.start()`](API/WebServerClass.md#start) function. + +> *isRunning*, *name*, *openSSLVersion*, and *perfectForwardSecrecy* are read-only properties that cannot be predefined in the `settings` object parameter for the [`start()`](API/WebServerClass.md#start) function. + + +## Scope of the 4D Web commands + +The 4D Language contains [several commands](https://doc.4d.com/4Dv18/4D/18/Web-Server.201-4504301.en.html) that can be used to control the web server. However, these commands are designed to work with a single (default) web server. When using these commands in the context of web server objects, make sure their scope is appropriate. + +| Command | Scope | +| ------------------------------- | ------------------------------------ | +| `SET DATABASE PARAMETER` | Host application web server | +| `WEB CLOSE SESSION` | Web server that received the request | +| `WEB GET BODY PART` | Web server that received the request | +| `WEB Get body part count` | Web server that received the request | +| `WEB Get Current Session ID` | Web server that received the request | +| `WEB GET HTTP BODY` | Web server that received the request | +| `WEB GET HTTP HEADER` | Web server that received the request | +| `WEB GET OPTION` | Host application web server | +| `WEB Get server info` | Host application web server | +| `WEB GET SESSION EXPIRATION` | Web server that received the request | +| `WEB Get session process count` | Web server that received the request | +| `WEB GET STATISTICS` | Host application web server | +| `WEB GET VARIABLES` | Web server that received the request | +| `WEB Is secured connection` | Web server that received the request | +| `WEB Is server running` | Host application web server | +| `WEB SEND BLOB` | Web server that received the request | +| `WEB SEND FILE` | Web server that received the request | +| `WEB SEND HTTP REDIRECT` | Web server that received the request | +| `WEB SEND RAW DATA` | Web server that received the request | +| `WEB SEND TEXT` | Web server that received the request | +| `WEB SET HOME PAGE` | Host application web server | +| `WEB SET HTTP HEADER` | Web server that received the request | +| `WEB SET OPTION` | Host application web server | +| `WEB SET ROOT FOLDER` | Host application web server | +| `WEB START SERVER` | Host application web server | +| `WEB STOP SERVER` | Host application web server | +| `WEB Validate digest` | Web server that received the request | diff --git a/website/yarn-error.log b/website/yarn-error.log new file mode 100644 index 00000000000000..70c3b600146de0 --- /dev/null +++ b/website/yarn-error.log @@ -0,0 +1,6634 @@ +Arguments: + C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js update + +PATH: + C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Users\sloving\AppData\Local\Microsoft\WindowsApps;C:\Users\sloving\AppData\Local\GitHubDesktop\bin;C:\Users\sloving\AppData\Roaming\npm;C:\Users\sloving\AppData\Local\Yarn\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps; + +Yarn version: + 1.16.0 + +Node version: + 10.15.3 + +Platform: + win32 x64 + +Trace: + SyntaxError: C:\GitHub\docs\website\package.json: Unexpected string in JSON at position 670 + at JSON.parse () + at C:\Program Files (x86)\Yarn\lib\cli.js:1625:59 + at Generator.next () + at step (C:\Program Files (x86)\Yarn\lib\cli.js:304:30) + at C:\Program Files (x86)\Yarn\lib\cli.js:315:13 + +npm manifest: + { + "license": "CC-BY-4.0", + "scripts": { + "crowdin-upload": "crowdin --config ../crowdin.yaml upload sources --auto-update -b master", + "crowdin-download": "crowdin --config ../crowdin.yaml download -b master", + "examples": "docusaurus-examples", + "start": "doc_preprocess --path ../docs/ --output ../docsPostProcessed/ && docusaurus-start", + "build": "docusaurus-build", + "publish-gh-pages": "docusaurus-publish", + "write-translations": "docusaurus-write-translations", + "version": "docusaurus-version", + "rename-version": "docusaurus-rename-version" + }, + "devDependencies": { + "docusaurus": "^1.14.4", + "highlightjs-4d": "^1.0.0" + "@4dsas/doc_preprocessing": "^1.0.5" + } + } + +yarn manifest: + No manifest + +Lockfile: + # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + # yarn lockfile v1 + + + "@babel/code-frame@7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + + "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + + "@babel/compat-data@^7.8.0", "@babel/compat-data@^7.8.1": + version "7.8.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.1.tgz#fc0bbbb7991e4fb2b47e168e60f2cc2c41680be9" + integrity sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw== + dependencies: + browserslist "^4.8.2" + invariant "^2.2.4" + semver "^5.5.0" + + "@babel/core@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" + integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.3" + "@babel/helpers" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + + "@babel/generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03" + integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug== + dependencies: + "@babel/types" "^7.8.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + + "@babel/helper-annotate-as-pure@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" + integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-builder-binary-assignment-operator-visitor@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz#c84097a427a061ac56a1c30ebf54b7b22d241503" + integrity sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-builder-react-jsx@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.8.3.tgz#dee98d7d79cc1f003d80b76fe01c7f8945665ff6" + integrity sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ== + dependencies: + "@babel/types" "^7.8.3" + esutils "^2.0.0" + + "@babel/helper-call-delegate@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz#de82619898aa605d409c42be6ffb8d7204579692" + integrity sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A== + dependencies: + "@babel/helper-hoist-variables" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-compilation-targets@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz#2deedc816fd41dca7355ef39fd40c9ea69f0719a" + integrity sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw== + dependencies: + "@babel/compat-data" "^7.8.1" + browserslist "^4.8.2" + invariant "^2.2.4" + levenary "^1.1.0" + semver "^5.5.0" + + "@babel/helper-create-class-features-plugin@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz#5b94be88c255f140fd2c10dd151e7f98f4bff397" + integrity sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + + "@babel/helper-create-regexp-features-plugin@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79" + integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q== + dependencies: + "@babel/helper-regex" "^7.8.3" + regexpu-core "^4.6.0" + + "@babel/helper-define-map@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15" + integrity sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/types" "^7.8.3" + lodash "^4.17.13" + + "@babel/helper-explode-assignable-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz#a728dc5b4e89e30fc2dfc7d04fa28a930653f982" + integrity sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw== + dependencies: + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-hoist-variables@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz#1dbe9b6b55d78c9b4183fc8cdc6e30ceb83b7134" + integrity sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-member-expression-to-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" + integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-module-imports@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" + integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-module-transforms@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz#d305e35d02bee720fbc2c3c3623aa0c316c01590" + integrity sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-simple-access" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + lodash "^4.17.13" + + "@babel/helper-optimise-call-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" + integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + + "@babel/helper-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965" + integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ== + dependencies: + lodash "^4.17.13" + + "@babel/helper-remap-async-to-generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz#273c600d8b9bf5006142c1e35887d555c12edd86" + integrity sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-wrap-function" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-replace-supers@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc" + integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-simple-access@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" + integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== + dependencies: + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + + "@babel/helper-wrap-function@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610" + integrity sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/helpers@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.3.tgz#382fbb0382ce7c4ce905945ab9641d688336ce85" + integrity sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/highlight@^7.0.0", "@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + + "@babel/parser@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" + integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== + + "@babel/plugin-proposal-async-generator-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" + integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-remap-async-to-generator" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + + "@babel/plugin-proposal-class-properties@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" + integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-proposal-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" + integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + + "@babel/plugin-proposal-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b" + integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.0" + + "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" + integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + + "@babel/plugin-proposal-object-rest-spread@^7.7.4", "@babel/plugin-proposal-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz#eb5ae366118ddca67bed583b53d7554cad9951bb" + integrity sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + + "@babel/plugin-proposal-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9" + integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + + "@babel/plugin-proposal-optional-chaining@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz#ae10b3214cb25f7adb1f3bc87ba42ca10b7e2543" + integrity sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + + "@babel/plugin-proposal-unicode-property-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" + integrity sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-dynamic-import@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-jsx@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz#521b06c83c40480f1e58b4fd33b92eceb1d6ea94" + integrity sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-object-rest-spread@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-optional-catch-binding@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + + "@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391" + integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-arrow-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" + integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-async-to-generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086" + integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-remap-async-to-generator" "^7.8.3" + + "@babel/plugin-transform-block-scoped-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3" + integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-block-scoping@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a" + integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + lodash "^4.17.13" + + "@babel/plugin-transform-classes@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8" + integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-define-map" "^7.8.3" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + globals "^11.1.0" + + "@babel/plugin-transform-computed-properties@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b" + integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-destructuring@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz#20ddfbd9e4676906b1056ee60af88590cc7aaa0b" + integrity sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-dotall-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" + integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-duplicate-keys@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1" + integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-exponentiation-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7" + integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-for-of@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz#15f17bce2fc95c7d59a24b299e83e81cedc22e18" + integrity sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b" + integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1" + integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-member-expression-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410" + integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-modules-amd@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz#65606d44616b50225e76f5578f33c568a0b876a5" + integrity sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ== + dependencies: + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + + "@babel/plugin-transform-modules-commonjs@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz#df251706ec331bd058a34bdd72613915f82928a5" + integrity sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg== + dependencies: + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-simple-access" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + + "@babel/plugin-transform-modules-systemjs@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz#d8bbf222c1dbe3661f440f2f00c16e9bb7d0d420" + integrity sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg== + dependencies: + "@babel/helper-hoist-variables" "^7.8.3" + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + + "@babel/plugin-transform-modules-umd@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz#592d578ce06c52f5b98b02f913d653ffe972661a" + integrity sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw== + dependencies: + "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" + integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + + "@babel/plugin-transform-new-target@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43" + integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-object-super@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725" + integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.3" + + "@babel/plugin-transform-parameters@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz#7890576a13b17325d8b7d44cb37f21dc3bbdda59" + integrity sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q== + dependencies: + "@babel/helper-call-delegate" "^7.8.3" + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-property-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263" + integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-react-display-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz#70ded987c91609f78353dd76d2fb2a0bb991e8e5" + integrity sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-react-jsx-self@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.8.3.tgz#c4f178b2aa588ecfa8d077ea80d4194ee77ed702" + integrity sha512-01OT7s5oa0XTLf2I8XGsL8+KqV9lx3EZV+jxn/L2LQ97CGKila2YMroTkCEIE0HV/FF7CMSRsIAybopdN9NTdg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + + "@babel/plugin-transform-react-jsx-source@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.8.3.tgz#951e75a8af47f9f120db731be095d2b2c34920e0" + integrity sha512-PLMgdMGuVDtRS/SzjNEQYUT8f4z1xb2BAT54vM1X5efkVuYBf5WyGUMbpmARcfq3NaglIwz08UVQK4HHHbC6ag== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + + "@babel/plugin-transform-react-jsx@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.8.3.tgz#4220349c0390fdefa505365f68c103562ab2fc4a" + integrity sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g== + dependencies: + "@babel/helper-builder-react-jsx" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + + "@babel/plugin-transform-regenerator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz#b31031e8059c07495bf23614c97f3d9698bc6ec8" + integrity sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA== + dependencies: + regenerator-transform "^0.14.0" + + "@babel/plugin-transform-reserved-words@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5" + integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-shorthand-properties@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" + integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8" + integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-sticky-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100" + integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-regex" "^7.8.3" + + "@babel/plugin-transform-template-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80" + integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-typeof-symbol@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz#5cffb216fb25c8c64ba6bf5f76ce49d3ab079f4d" + integrity sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/plugin-transform-unicode-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" + integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + + "@babel/polyfill@^7.7.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.3.tgz#2333fc2144a542a7c07da39502ceeeb3abe4debd" + integrity sha512-0QEgn2zkCzqGIkSWWAEmvxD7e00Nm9asTtQvi7HdlYvMhjy/J38V/1Y9ode0zEJeIuxAI0uftiAzqc7nVeWUGg== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.2" + + "@babel/preset-env@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.3.tgz#dc0fb2938f52bbddd79b3c861a4b3427dd3a6c54" + integrity sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg== + dependencies: + "@babel/compat-data" "^7.8.0" + "@babel/helper-compilation-targets" "^7.8.3" + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-proposal-async-generator-functions" "^7.8.3" + "@babel/plugin-proposal-dynamic-import" "^7.8.3" + "@babel/plugin-proposal-json-strings" "^7.8.3" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread" "^7.8.3" + "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.8.3" + "@babel/plugin-transform-async-to-generator" "^7.8.3" + "@babel/plugin-transform-block-scoped-functions" "^7.8.3" + "@babel/plugin-transform-block-scoping" "^7.8.3" + "@babel/plugin-transform-classes" "^7.8.3" + "@babel/plugin-transform-computed-properties" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-dotall-regex" "^7.8.3" + "@babel/plugin-transform-duplicate-keys" "^7.8.3" + "@babel/plugin-transform-exponentiation-operator" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.8.3" + "@babel/plugin-transform-function-name" "^7.8.3" + "@babel/plugin-transform-literals" "^7.8.3" + "@babel/plugin-transform-member-expression-literals" "^7.8.3" + "@babel/plugin-transform-modules-amd" "^7.8.3" + "@babel/plugin-transform-modules-commonjs" "^7.8.3" + "@babel/plugin-transform-modules-systemjs" "^7.8.3" + "@babel/plugin-transform-modules-umd" "^7.8.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" + "@babel/plugin-transform-new-target" "^7.8.3" + "@babel/plugin-transform-object-super" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.3" + "@babel/plugin-transform-property-literals" "^7.8.3" + "@babel/plugin-transform-regenerator" "^7.8.3" + "@babel/plugin-transform-reserved-words" "^7.8.3" + "@babel/plugin-transform-shorthand-properties" "^7.8.3" + "@babel/plugin-transform-spread" "^7.8.3" + "@babel/plugin-transform-sticky-regex" "^7.8.3" + "@babel/plugin-transform-template-literals" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.3" + "@babel/plugin-transform-unicode-regex" "^7.8.3" + "@babel/types" "^7.8.3" + browserslist "^4.8.2" + core-js-compat "^3.6.2" + invariant "^2.2.2" + levenary "^1.1.0" + semver "^5.5.0" + + "@babel/preset-react@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.8.3.tgz#23dc63f1b5b0751283e04252e78cf1d6589273d2" + integrity sha512-9hx0CwZg92jGb7iHYQVgi0tOEHP/kM60CtWJQnmbATSPIQQ2xYzfoCI3EdqAhFBeeJwYMdWQuDUHMsuDbH9hyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-react-display-name" "^7.8.3" + "@babel/plugin-transform-react-jsx" "^7.8.3" + "@babel/plugin-transform-react-jsx-self" "^7.8.3" + "@babel/plugin-transform-react-jsx-source" "^7.8.3" + + "@babel/register@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.8.3.tgz#5d5d30cfcc918437535d724b8ac1e4a60c5db1f8" + integrity sha512-t7UqebaWwo9nXWClIPLPloa5pN33A2leVs8Hf0e9g9YwUP8/H9NeR7DJU+4CXo23QtjChQv5a3DjEtT83ih1rg== + dependencies: + find-cache-dir "^2.0.0" + lodash "^4.17.13" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + + "@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + + "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" + integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.3" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + + "@babel/types@^7.7.4", "@babel/types@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + + "@mrmlnc/readdir-enhanced@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== + dependencies: + call-me-maybe "^1.0.1" + glob-to-regexp "^0.3.0" + + "@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== + + "@sindresorhus/is@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" + integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== + + "@types/cheerio@^0.22.8": + version "0.22.15" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.15.tgz#69040ffa92c309beeeeb7e92db66ac3f80700c0b" + integrity sha512-UGiiVtJK5niCqMKYmLEFz1Wl/3L5zF/u78lu8CwoUywWXRr9LDimeYuOzXVLXBMO758fcTdFtgjvqlztMH90MA== + dependencies: + "@types/node" "*" + + "@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + + "@types/node@*": + version "13.1.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.6.tgz#076028d0b0400be8105b89a0a55550c86684ffec" + integrity sha512-Jg1F+bmxcpENHP23sVKkNuU3uaxPnsBMW0cLjleiikFKomJQbsn0Cqk2yDvQArqzZN6ABfBkZ0To7pQ8sLdWDg== + + "@types/q@^1.5.1": + version "1.5.2" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8" + integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw== + + accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + + address@1.1.2, address@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6" + integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== + + ajv@^6.5.5: + version "6.10.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" + integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + + alphanum-sort@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + + ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + + ansi-red@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" + integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= + dependencies: + ansi-wrap "0.1.0" + + ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + + ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + + ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + + ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + + ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + + ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + + ansi-wrap@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" + integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= + + anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + + arch@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" + integrity sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg== + + archive-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-4.0.0.tgz#f92e72233056dfc6969472749c267bdb046b1d70" + integrity sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA= + dependencies: + file-type "^4.2.0" + + argparse@^1.0.10, argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + + arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + + arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + + arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + + array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + + array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + + array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + + array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + + array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + + arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + + asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + + assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + + assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + + async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + + async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + + asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + + atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + + autolinker@^3.11.0: + version "3.11.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-3.11.1.tgz#aa4f910371df091b0d714d8d6e700d53f357ce95" + integrity sha512-6sAmetStorjXvwmV8MBxI5DGICHKD1B5EjdkIrq34X6YBDN6jj54EUHnoHgNqmNCclcf8c409zuVMNy449u80g== + dependencies: + tslib "^1.9.3" + + autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha1-BlK0kYgYefB3XazgzcoyM5QqTkc= + dependencies: + gulp-header "^1.7.1" + + autoprefixer@^9.7.2: + version "9.7.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.3.tgz#fd42ed03f53de9beb4ca0d61fb4f7268a9bb50b4" + integrity sha512-8T5Y1C5Iyj6PgkPSFd0ODvK9DIleuPKUPYniNxybS47g2k2wFgLZ46lGQHlBuGKIAEV8fbCDfKCCRS1tvOgc3Q== + dependencies: + browserslist "^4.8.0" + caniuse-lite "^1.0.30001012" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.23" + postcss-value-parser "^4.0.2" + + aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + + aws4@^1.8.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + + babel-code-frame@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + + babel-plugin-dynamic-import-node@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" + integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== + dependencies: + object.assign "^4.1.0" + + babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== + + balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + + base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + + base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + + bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + + big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + + bin-build@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-3.0.0.tgz#c5780a25a8a9f966d8244217e6c1f5082a143861" + integrity sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA== + dependencies: + decompress "^4.0.0" + download "^6.2.2" + execa "^0.7.0" + p-map-series "^1.0.0" + tempfile "^2.0.0" + + bin-check@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-4.1.0.tgz#fc495970bdc88bb1d5a35fc17e65c4a149fc4a49" + integrity sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA== + dependencies: + execa "^0.7.0" + executable "^4.1.0" + + bin-version-check@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-4.0.0.tgz#7d819c62496991f80d893e6e02a3032361608f71" + integrity sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ== + dependencies: + bin-version "^3.0.0" + semver "^5.6.0" + semver-truncate "^1.1.2" + + bin-version@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-3.1.0.tgz#5b09eb280752b1bd28f0c9db3f96f2f43b6c0839" + integrity sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ== + dependencies: + execa "^1.0.0" + find-versions "^3.0.0" + + bin-wrapper@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-4.1.0.tgz#99348f2cf85031e3ef7efce7e5300aeaae960605" + integrity sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q== + dependencies: + bin-check "^4.1.0" + bin-version-check "^4.0.0" + download "^7.1.0" + import-lazy "^3.1.0" + os-filter-obj "^2.0.0" + pify "^4.0.1" + + binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + + bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + + bl@^1.0.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" + integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + + body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + + body@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" + integrity sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk= + dependencies: + continuable-cache "^0.3.1" + error "^7.0.0" + raw-body "~1.1.0" + safe-json-parse "~1.0.1" + + boolbase@^1.0.0, boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + + brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + + braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + + browserslist@4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.7.0.tgz#9ee89225ffc07db03409f2fee524dc8227458a17" + integrity sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA== + dependencies: + caniuse-lite "^1.0.30000989" + electron-to-chromium "^1.3.247" + node-releases "^1.1.29" + + browserslist@^4.0.0, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3: + version "4.8.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" + integrity sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg== + dependencies: + caniuse-lite "^1.0.30001017" + electron-to-chromium "^1.3.322" + node-releases "^1.1.44" + + buffer-alloc-unsafe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" + integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== + + buffer-alloc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" + integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== + dependencies: + buffer-alloc-unsafe "^1.1.0" + buffer-fill "^1.0.0" + + buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + + buffer-fill@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" + integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= + + buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + + buffer@^5.2.1: + version "5.4.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.4.3.tgz#3fbc9c69eb713d323e3fc1a895eee0710c072115" + integrity sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + + bytes@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" + integrity sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g= + + bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + + cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + + cacheable-request@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" + integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= + dependencies: + clone-response "1.0.2" + get-stream "3.0.0" + http-cache-semantics "3.8.1" + keyv "3.0.0" + lowercase-keys "1.0.0" + normalize-url "2.0.1" + responselike "1.0.2" + + call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + + caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" + + caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + + callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + + camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + integrity sha1-MIvur/3ygRkFHvodkyITyRuPkuc= + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + + camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8= + + caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + + caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001017: + version "1.0.30001020" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001020.tgz#3f04c1737500ffda78be9beb0b5c1e2070e15926" + integrity sha512-yWIvwA68wRHKanAVS1GjN8vajAv7MBFshullKCeq/eKpK7pJBVDgFFEqvgWTkcP2+wIDeQGYFRXECjKZnLkUjA== + + caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + + caw@^2.0.0, caw@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/caw/-/caw-2.0.1.tgz#6c3ca071fc194720883c2dc5da9b074bfc7e9e95" + integrity sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA== + dependencies: + get-proxy "^2.0.0" + isurl "^1.0.0-alpha5" + tunnel-agent "^0.6.0" + url-to-options "^1.0.1" + + chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + + chalk@^1.0.0, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + + chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + + chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + + cheerio@0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + + chokidar@^2.0.4: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + + class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + + classnames@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== + + cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + + cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + + clipboard@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-2.0.4.tgz#836dafd66cf0fea5d71ce5d5b0bf6e958009112d" + integrity sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ== + dependencies: + good-listener "^1.2.2" + select "^1.1.2" + tiny-emitter "^2.0.0" + + clone-response@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + + coa@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== + dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" + q "^1.1.2" + + coffee-script@^1.12.4: + version "1.12.7" + resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.12.7.tgz#c05dae0cb79591d05b3070a8433a98c9a89ccc53" + integrity sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw== + + collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + + color-convert@^1.9.0, color-convert@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + + color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + + color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + + color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + + color-string@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" + integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + + color@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" + integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + + combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + + commander@^2.15.1, commander@~2.20.3: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + + commander@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.0.tgz#545983a0603fe425bc672d66c9e3c89c42121a83" + integrity sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw== + + commander@~2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ= + dependencies: + graceful-readlink ">= 1.0.0" + + commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + + component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + + concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + + concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + + concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + + config-chain@^1.1.11: + version "1.1.12" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + + console-stream@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" + integrity sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ= + + content-disposition@0.5.3, content-disposition@^0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + + content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + + continuable-cache@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" + integrity sha1-vXJ6f67XfnH/OYWskzUakSczrQ8= + + convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + + cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + + cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + + copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + + core-js-compat@^3.6.2: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.4.tgz#938476569ebb6cda80d339bcf199fae4f16fff17" + integrity sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA== + dependencies: + browserslist "^4.8.3" + semver "7.0.0" + + core-js@^2.6.5: + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== + + core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + + cosmiconfig@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + + cross-spawn@6.0.5, cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + + cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + + crowdin-cli@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/crowdin-cli/-/crowdin-cli-0.3.0.tgz#eac9989a6fe7feaaf33090397afc187c67b46191" + integrity sha1-6smYmm/n/qrzMJA5evwYfGe0YZE= + dependencies: + request "^2.53.0" + yamljs "^0.2.1" + yargs "^2.3.0" + + css-color-names@0.0.4, css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + + css-declaration-sorter@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" + integrity sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== + dependencies: + postcss "^7.0.1" + timsort "^0.3.0" + + css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== + + css-select@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== + dependencies: + boolbase "^1.0.0" + css-what "^3.2.1" + domutils "^1.7.0" + nth-check "^1.0.2" + + css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + + css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + + css-unit-converter@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.1.tgz#d9b9281adcfd8ced935bdbaba83786897f64e996" + integrity sha1-2bkoGtz9jO2TW9urqDeGiX9k6ZY= + + css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + + css-what@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-3.2.1.tgz#f4a8f12421064621b456755e34a03a2c22df5da1" + integrity sha512-WwOrosiQTvyms+Ti5ZC5vGEK0Vod3FTt1ca+payZqvKuGJF+dq7bG63DstxtN0dpm6FxY27a/zS3Wten+gEtGw== + + cssesc@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" + integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg== + + cssnano-preset-default@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz#51ec662ccfca0f88b396dcd9679cdb931be17f76" + integrity sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA== + dependencies: + css-declaration-sorter "^4.0.1" + cssnano-util-raw-cache "^4.0.1" + postcss "^7.0.0" + postcss-calc "^7.0.1" + postcss-colormin "^4.0.3" + postcss-convert-values "^4.0.1" + postcss-discard-comments "^4.0.2" + postcss-discard-duplicates "^4.0.2" + postcss-discard-empty "^4.0.1" + postcss-discard-overridden "^4.0.1" + postcss-merge-longhand "^4.0.11" + postcss-merge-rules "^4.0.3" + postcss-minify-font-values "^4.0.2" + postcss-minify-gradients "^4.0.2" + postcss-minify-params "^4.0.2" + postcss-minify-selectors "^4.0.2" + postcss-normalize-charset "^4.0.1" + postcss-normalize-display-values "^4.0.2" + postcss-normalize-positions "^4.0.2" + postcss-normalize-repeat-style "^4.0.2" + postcss-normalize-string "^4.0.2" + postcss-normalize-timing-functions "^4.0.2" + postcss-normalize-unicode "^4.0.1" + postcss-normalize-url "^4.0.1" + postcss-normalize-whitespace "^4.0.2" + postcss-ordered-values "^4.1.2" + postcss-reduce-initial "^4.0.3" + postcss-reduce-transforms "^4.0.2" + postcss-svgo "^4.0.2" + postcss-unique-selectors "^4.0.1" + + cssnano-util-get-arguments@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" + integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= + + cssnano-util-get-match@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= + + cssnano-util-raw-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" + integrity sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== + dependencies: + postcss "^7.0.0" + + cssnano-util-same-parent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" + integrity sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== + + cssnano@^4.1.10: + version "4.1.10" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" + integrity sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== + dependencies: + cosmiconfig "^5.0.0" + cssnano-preset-default "^4.0.7" + is-resolvable "^1.0.0" + postcss "^7.0.0" + + csso@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-4.0.2.tgz#e5f81ab3a56b8eefb7f0092ce7279329f454de3d" + integrity sha512-kS7/oeNVXkHWxby5tHVxlhjizRCSv8QdU7hB2FpdAibDU8FjTAolhNjKNTiLzXtUrKT6HwClE81yXwEk1309wg== + dependencies: + css-tree "1.0.0-alpha.37" + + currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + + dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + + debug@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + dependencies: + ms "^2.1.1" + + debug@^3.1.0, debug@^3.1.1, debug@^3.2.5: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + + debug@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + + decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + + decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + + decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + + decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" + integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== + dependencies: + file-type "^5.2.0" + is-stream "^1.1.0" + tar-stream "^1.5.2" + + decompress-tarbz2@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" + integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== + dependencies: + decompress-tar "^4.1.0" + file-type "^6.1.0" + is-stream "^1.1.0" + seek-bzip "^1.0.5" + unbzip2-stream "^1.0.9" + + decompress-targz@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" + integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== + dependencies: + decompress-tar "^4.1.1" + file-type "^5.2.0" + is-stream "^1.1.0" + + decompress-unzip@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" + integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= + dependencies: + file-type "^3.8.0" + get-stream "^2.2.0" + pify "^2.3.0" + yauzl "^2.4.2" + + decompress@^4.0.0, decompress@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.0.tgz#7aedd85427e5a92dacfe55674a7c505e96d01f9d" + integrity sha1-eu3YVCflqS2s/lVnSnxQXpbQH50= + dependencies: + decompress-tar "^4.0.0" + decompress-tarbz2 "^4.0.0" + decompress-targz "^4.0.0" + decompress-unzip "^4.0.1" + graceful-fs "^4.1.10" + make-dir "^1.0.0" + pify "^2.3.0" + strip-dirs "^2.0.0" + + deep-is@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + + define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + + define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + + define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + + define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + + delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + + delegate@^3.1.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166" + integrity sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw== + + depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + + destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + + detect-port-alt@1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/detect-port-alt/-/detect-port-alt-1.1.6.tgz#24707deabe932d4a3cf621302027c2b266568275" + integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== + dependencies: + address "^1.0.1" + debug "^2.6.0" + + diacritics-map@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/diacritics-map/-/diacritics-map-0.1.0.tgz#6dfc0ff9d01000a2edf2865371cac316e94977af" + integrity sha1-bfwP+dAQAKLt8oZTccrDFulJd68= + + dir-glob@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== + dependencies: + arrify "^1.0.1" + path-type "^3.0.0" + + docusaurus@^1.14.4: + version "1.14.4" + resolved "https://registry.yarnpkg.com/docusaurus/-/docusaurus-1.14.4.tgz#1ef3ebe8c2aaaf1dec6c2e0e177e83be78aeaca3" + integrity sha512-KALmrlZBc0E+AB0ITR4POGKv8WcrcSSxvmgq7nC3TdpS+S2hrlXN/2tV3tVOZ8q8m+zhcMs7l9mAIhGFQyQwIw== + dependencies: + "@babel/core" "^7.7.4" + "@babel/plugin-proposal-class-properties" "^7.7.4" + "@babel/plugin-proposal-object-rest-spread" "^7.7.4" + "@babel/polyfill" "^7.7.0" + "@babel/preset-env" "^7.7.4" + "@babel/preset-react" "^7.7.4" + "@babel/register" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@babel/types" "^7.7.4" + autoprefixer "^9.7.2" + babylon "^6.18.0" + chalk "^3.0.0" + classnames "^2.2.6" + commander "^4.0.1" + crowdin-cli "^0.3.0" + cssnano "^4.1.10" + escape-string-regexp "^2.0.0" + express "^4.17.1" + feed "^4.0.0" + fs-extra "^8.1.0" + gaze "^1.1.3" + github-slugger "^1.2.1" + glob "^7.1.6" + highlight.js "^9.16.2" + imagemin "^6.0.0" + imagemin-gifsicle "^6.0.1" + imagemin-jpegtran "^6.0.0" + imagemin-optipng "^6.0.0" + imagemin-svgo "^7.0.0" + lodash "^4.17.15" + markdown-toc "^1.2.0" + mkdirp "^0.5.1" + portfinder "^1.0.25" + postcss "^7.0.23" + prismjs "^1.17.1" + react "^16.8.4" + react-dev-utils "^9.1.0" + react-dom "^16.8.4" + remarkable "^2.0.0" + request "^2.88.0" + shelljs "^0.8.3" + sitemap "^3.2.2" + tcp-port-used "^1.0.1" + tiny-lr "^1.1.1" + tree-node-cli "^1.2.5" + truncate-html "^1.0.3" + + dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + + dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + + domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + + domelementtype@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" + integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== + + domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + + domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + + domutils@^1.5.1, domutils@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + + dot-prop@^4.1.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + dependencies: + is-obj "^1.0.0" + + download@^6.2.2: + version "6.2.5" + resolved "https://registry.yarnpkg.com/download/-/download-6.2.5.tgz#acd6a542e4cd0bb42ca70cfc98c9e43b07039714" + integrity sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA== + dependencies: + caw "^2.0.0" + content-disposition "^0.5.2" + decompress "^4.0.0" + ext-name "^5.0.0" + file-type "5.2.0" + filenamify "^2.0.0" + get-stream "^3.0.0" + got "^7.0.0" + make-dir "^1.0.0" + p-event "^1.0.0" + pify "^3.0.0" + + download@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/download/-/download-7.1.0.tgz#9059aa9d70b503ee76a132897be6dec8e5587233" + integrity sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ== + dependencies: + archive-type "^4.0.0" + caw "^2.0.1" + content-disposition "^0.5.2" + decompress "^4.2.0" + ext-name "^5.0.0" + file-type "^8.1.0" + filenamify "^2.0.0" + get-stream "^3.0.0" + got "^8.3.1" + make-dir "^1.2.0" + p-event "^2.1.0" + pify "^3.0.0" + + duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + + duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + + ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + + ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + + electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.322: + version "1.3.333" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.333.tgz#b835de183afbaaf8655a14f542db06d67a00cba1" + integrity sha512-7MJfCpa/tmhqYy2lZ1NEbkSxH7q3KiZiepiSs2ayTPAweAjdzGXotij+7OKPPb3OwJD2ZuBKPrA2HIuuSi6ahw== + + "emoji-regex@>=6.0.0 <=6.1.1": + version "6.1.1" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" + integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4= + + emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + + encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + + end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + + entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + + entities@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" + integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + + error-ex@^1.2.0, error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + + error@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" + integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== + dependencies: + string-template "~0.2.1" + + es-abstract@^1.17.0-next.1: + version "1.17.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" + integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + + es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + + escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + + escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + + escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + + esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + + esutils@^2.0.0, esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + + etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + + eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== + dependencies: + original "^1.0.0" + + exec-buffer@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.2.0.tgz#b1686dbd904c7cf982e652c1f5a79b1e5573082b" + integrity sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA== + dependencies: + execa "^0.7.0" + p-finally "^1.0.0" + pify "^3.0.0" + rimraf "^2.5.4" + tempfile "^2.0.0" + + execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + + execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + + executable@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" + integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== + dependencies: + pify "^2.2.0" + + expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + + express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + + ext-list@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ext-list/-/ext-list-2.2.2.tgz#0b98e64ed82f5acf0f2931babf69212ef52ddd37" + integrity sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA== + dependencies: + mime-db "^1.28.0" + + ext-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ext-name/-/ext-name-5.0.0.tgz#70781981d183ee15d13993c8822045c506c8f0a6" + integrity sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ== + dependencies: + ext-list "^2.0.0" + sort-keys-length "^1.0.0" + + extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + + extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + + extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + + external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + + extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + + extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + + fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + + fast-glob@^2.0.2: + version "2.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d" + integrity sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== + dependencies: + "@mrmlnc/readdir-enhanced" "^2.2.1" + "@nodelib/fs.stat" "^1.1.2" + glob-parent "^3.1.0" + is-glob "^4.0.0" + merge2 "^1.2.3" + micromatch "^3.1.10" + + fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + + faye-websocket@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= + dependencies: + websocket-driver ">=0.5.1" + + faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + dependencies: + websocket-driver ">=0.5.1" + + fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + + feed@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/feed/-/feed-4.1.0.tgz#58f1c9cc2b44715d14ac59234e1bf20c5d757aa7" + integrity sha512-dAXWXM8QMxZ1DRnAxDmy1MaWZFlh1Ku7TU3onbXgHrVJynsxkNGPUed1AxszVW8AXo43xExronVkIqK+ACsoBA== + dependencies: + xml-js "^1.6.11" + + figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + + figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + + file-type@5.2.0, file-type@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" + integrity sha1-LdvqfHP/42No365J3DOMBYwritY= + + file-type@^10.4.0, file-type@^10.7.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.11.0.tgz#2961d09e4675b9fb9a3ee6b69e9cd23f43fd1890" + integrity sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== + + file-type@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + + file-type@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.4.0.tgz#1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5" + integrity sha1-G2AOX8ofvcboDApwxxyNul95BsU= + + file-type@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" + integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== + + file-type@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-8.1.0.tgz#244f3b7ef641bbe0cca196c7276e4b332399f68c" + integrity sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ== + + file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + + filename-reserved-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" + integrity sha1-q/c9+rc10EVECr/qLZHzieu/oik= + + filenamify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-2.1.0.tgz#88faf495fb1b47abfd612300002a16228c677ee9" + integrity sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA== + dependencies: + filename-reserved-regex "^2.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + + filesize@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== + + fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + + fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + + finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + + find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + + find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + + find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + + find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + + find-versions@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" + integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== + dependencies: + semver-regex "^2.0.0" + + for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + + forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + + fork-ts-checker-webpack-plugin@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz#ce1d77190b44d81a761b10b6284a373795e41f0c" + integrity sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA== + dependencies: + babel-code-frame "^6.22.0" + chalk "^2.4.1" + chokidar "^2.0.4" + micromatch "^3.1.10" + minimatch "^3.0.4" + semver "^5.6.0" + tapable "^1.0.0" + worker-rpc "^0.1.0" + + form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + + forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + + fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + + fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + + from2@^2.1.1: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + + fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + + fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + + fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + + fsevents@^1.2.7: + version "1.2.11" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.11.tgz#67bf57f4758f02ede88fb2a1712fef4d15358be3" + integrity sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + + function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + + gaze@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" + integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== + dependencies: + globule "^1.0.0" + + gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + + get-proxy@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" + integrity sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw== + dependencies: + npm-conf "^1.1.0" + + get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= + + get-stream@3.0.0, get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + + get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + + get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + + get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + + getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + + gifsicle@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-4.0.1.tgz#30e1e61e3ee4884ef702641b2e98a15c2127b2e2" + integrity sha512-A/kiCLfDdV+ERV/UB+2O41mifd+RxH8jlRG8DMxZO84Bma/Fw0htqZ+hY2iaalLRNyUu7tYZQslqUBJxBggxbg== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + execa "^1.0.0" + logalot "^2.0.0" + + github-slugger@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.2.1.tgz#47e904e70bf2dccd0014748142d31126cfd49508" + integrity sha512-SsZUjg/P03KPzQBt7OxJPasGw6NRO5uOgiZ5RGXVud5iSIZ0eNZeNp5rTwCxtavrRUa/A77j8mePVc5lEvk0KQ== + dependencies: + emoji-regex ">=6.0.0 <=6.1.1" + + glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + + glob-to-regexp@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= + + glob@^7.0.0, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.1.1: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + + global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + + global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + + globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + + globby@8.0.2, globby@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d" + integrity sha512-yTzMmKygLp8RUpG1Ymu2VXPSJQZjNAZPD4ywgYEaG7e4tBJeUQBO8OpXrf1RCNcEs5alsoJYPAMiIHP0cmeC7w== + dependencies: + array-union "^1.0.1" + dir-glob "2.0.0" + fast-glob "^2.0.2" + glob "^7.1.2" + ignore "^3.3.5" + pify "^3.0.0" + slash "^1.0.0" + + globule@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.0.tgz#41d0e9fb44afd4b80d93a23263714f90b3dec904" + integrity sha512-YlD4kdMqRCQHrhVdonet4TdRtv1/sZKepvoxNT4Nrhrp5HI8XFfc8kFlGlBn2myBo80aGp8Eft259mbcUJhgSg== + dependencies: + glob "~7.1.1" + lodash "~4.17.10" + minimatch "~3.0.2" + + good-listener@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50" + integrity sha1-1TswzfkxPf+33JoNR3CWqm0UXFA= + dependencies: + delegate "^3.1.2" + + got@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + + got@^8.3.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" + integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== + dependencies: + "@sindresorhus/is" "^0.7.0" + cacheable-request "^2.1.1" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + into-stream "^3.1.0" + is-retry-allowed "^1.1.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + mimic-response "^1.0.0" + p-cancelable "^0.4.0" + p-timeout "^2.0.1" + pify "^3.0.0" + safe-buffer "^5.1.1" + timed-out "^4.0.1" + url-parse-lax "^3.0.0" + url-to-options "^1.0.1" + + graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + + "graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= + + gray-matter@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-2.1.1.tgz#3042d9adec2a1ded6a7707a9ed2380f8a17a430e" + integrity sha1-MELZrewqHe1qdwep7SOA+KF6Qw4= + dependencies: + ansi-red "^0.1.1" + coffee-script "^1.12.4" + extend-shallow "^2.0.1" + js-yaml "^3.8.1" + toml "^2.3.2" + + gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + + gzip-size@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + + handlebars@^4.5.3: + version "4.7.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.2.tgz#01127b3840156a0927058779482031afe0e730d7" + integrity sha512-4PwqDL2laXtTWZghzzCtunQUTLbo31pcCJrd/B/9JP8XbhVzpS5ZXuKqlOzsd1rtcaLo4KqAn8nl8mkknS4MHw== + dependencies: + neo-async "^2.6.0" + optimist "^0.6.1" + source-map "^0.6.1" + optionalDependencies: + uglify-js "^3.1.4" + + har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + + har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + + has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + + has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + + has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + + has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + + has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + + has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + + has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + + has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + + has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + + has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + + has@^1.0.0, has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + + hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== + + highlight.js@^9.16.2: + version "9.17.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.17.1.tgz#14a4eded23fd314b05886758bb906e39dd627f9a" + integrity sha512-TA2/doAur5Ol8+iM3Ov7qy3jYcr/QiJ2eDTdRF4dfbjG7AaaB99J5G+zSl11ljbl6cIcahgPY6SKb3sC3EJ0fw== + dependencies: + handlebars "^4.5.3" + + highlightjs-4d@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/highlightjs-4d/-/highlightjs-4d-1.0.3.tgz#e7bf0c54d0fb95c070163316cebb3d9ffe44fe5c" + integrity sha512-d8RvOmV7reciq5PXpMH1t8Z2rSum9lRiJD1zuhTGp281W//etT05mQ7DqOrQJE80mm8lBaWVmQn7h590Xs02fg== + + hosted-git-info@^2.1.4: + version "2.8.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + + hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + + hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hsla-regex/-/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + + html-comment-regex@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" + integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== + + htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + + http-cache-semantics@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + + http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + + http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + + "http-parser-js@>=0.4.0 <0.4.11": + version "0.4.10" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= + + http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + + iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + + ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + + ignore@^3.3.5: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + + imagemin-gifsicle@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-6.0.1.tgz#6abad4e95566d52e5a104aba1c24b4f3b48581b3" + integrity sha512-kuu47c6iKDQ6R9J10xCwL0lgs0+sMz3LRHqRcJ2CRBWdcNmo3T5hUaM8hSZfksptZXJLGKk8heSAvwtSdB1Fng== + dependencies: + exec-buffer "^3.0.0" + gifsicle "^4.0.0" + is-gif "^3.0.0" + + imagemin-jpegtran@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-6.0.0.tgz#c8d3bcfb6ec9c561c20a987142854be70d90b04f" + integrity sha512-Ih+NgThzqYfEWv9t58EItncaaXIHR0u9RuhKa8CtVBlMBvY0dCIxgQJQCfwImA4AV1PMfmUKlkyIHJjb7V4z1g== + dependencies: + exec-buffer "^3.0.0" + is-jpg "^2.0.0" + jpegtran-bin "^4.0.0" + + imagemin-optipng@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-6.0.0.tgz#a6bfc7b542fc08fc687e83dfb131249179a51a68" + integrity sha512-FoD2sMXvmoNm/zKPOWdhKpWdFdF9qiJmKC17MxZJPH42VMAp17/QENI/lIuP7LCUnLVAloO3AUoTSNzfhpyd8A== + dependencies: + exec-buffer "^3.0.0" + is-png "^1.0.0" + optipng-bin "^5.0.0" + + imagemin-svgo@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-7.0.0.tgz#a22d0a5917a0d0f37e436932c30f5e000fa91b1c" + integrity sha512-+iGJFaPIMx8TjFW6zN+EkOhlqcemdL7F3N3Y0wODvV2kCUBuUtZK7DRZc1+Zfu4U2W/lTMUyx2G8YMOrZntIWg== + dependencies: + is-svg "^3.0.0" + svgo "^1.0.5" + + imagemin@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-6.1.0.tgz#62508b465728fea36c03cdc07d915fe2d8cf9e13" + integrity sha512-8ryJBL1CN5uSHpiBMX0rJw79C9F9aJqMnjGnrd/1CafegpNuA81RBAAru/jQQEOWlOJJlpRnlcVFF6wq+Ist0A== + dependencies: + file-type "^10.7.0" + globby "^8.0.1" + make-dir "^1.0.0" + p-pipe "^1.1.0" + pify "^4.0.1" + replace-ext "^1.0.0" + + immer@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d" + integrity sha512-O3sR1/opvCDGLEVcvrGTMtLac8GJ5IwZC4puPrLuRj3l7ICKvkmA0vGuU9OW8mV9WIBRnaxp5GJh9IEAaNOoYg== + + import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + + import-lazy@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-3.1.0.tgz#891279202c8a2280fdbd6674dbd8da1a1dfc67cc" + integrity sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ== + + indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + integrity sha1-ji1INIdCEhtKghi3oTfppSBJ3IA= + dependencies: + repeating "^2.0.0" + + indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + + inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + + inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + + inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + + ini@^1.3.4, ini@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + + inquirer@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" + integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + + interpret@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + + into-stream@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" + integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= + dependencies: + from2 "^2.1.1" + p-is-promise "^1.1.0" + + invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + + ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + + ipaddr.js@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" + integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== + + is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + + is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + + is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + + is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + + is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + + is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + + is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + + is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + + is-color-stop@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-color-stop/-/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + + is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + + is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + + is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + + is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + + is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + + is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + + is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + + is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + + is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + + is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= + dependencies: + number-is-nan "^1.0.0" + + is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + + is-gif@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-3.0.0.tgz#c4be60b26a301d695bb833b20d9b5d66c6cf83b1" + integrity sha512-IqJ/jlbw5WJSNfwQ/lHEDXF8rxhRgF6ythk2oiEvhpG29F704eX9NO6TvPfMiq9DrbwgcEDnETYNcZDPewQoVw== + dependencies: + file-type "^10.4.0" + + is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + + is-glob@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + + is-jpg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-2.0.0.tgz#2e1997fa6e9166eaac0242daae443403e4ef1d97" + integrity sha1-LhmX+m6RZuqsAkLarkQ0A+TvHZc= + + is-natural-number@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" + integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= + + is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + + is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + + is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + + is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + + is-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" + integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= + + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + + is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + + is-png@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" + integrity sha1-1XSxK/J1wDUEVVcLDltXqwYgd84= + + is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + + is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + + is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== + + is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + + is-root@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" + integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== + + is-stream@^1.0.0, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + + is-svg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" + integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== + dependencies: + html-comment-regex "^1.1.0" + + is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + + is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + + is-url@^1.2.2: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" + integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== + + is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + + is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + + is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + + is2@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is2/-/is2-2.0.1.tgz#8ac355644840921ce435d94f05d3a94634d3481a" + integrity sha512-+WaJvnaA7aJySz2q/8sLjMb2Mw14KTplHmSwcSpZ/fWJPkUmqw3YTzSWbPJ7OAwRvdYTWF2Wg+yYJ1AdP5Z8CA== + dependencies: + deep-is "^0.1.3" + ip-regex "^2.1.0" + is-url "^1.2.2" + + isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + + isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + + isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + + isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + + isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + + isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + + jpegtran-bin@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-4.0.0.tgz#d00aed809fba7aa6f30817e59eee4ddf198f8f10" + integrity sha512-2cRl1ism+wJUoYAYFt6O/rLBfpXNWG2dUWbgcEkTt5WGMnqI46eEro8T4C5zGROxKRqyKpCBSdHPvt5UYCtxaQ== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + logalot "^2.0.0" + + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + + js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + + js-yaml@^3.13.1, js-yaml@^3.8.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + + jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + + jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + + jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + + json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + + json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + + json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + + json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + + json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + + json3@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== + + json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + + json5@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" + integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== + dependencies: + minimist "^1.2.0" + + jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + + jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + + keyv@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" + integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== + dependencies: + json-buffer "3.0.0" + + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + + kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + + kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + + kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + + lazy-cache@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-2.0.2.tgz#b9190a4f913354694840859f8a8f7084d8822264" + integrity sha1-uRkKT5EzVGlIQIWfio9whNiCImQ= + dependencies: + set-getter "^0.1.0" + + leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + + levenary@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.0.tgz#fc146fe75f32dc483a0a2c64aef720f602cd6210" + integrity sha512-VHcwhO0UTpUW7rLPN2/OiWJdgA1e9BqEDALhrgCe/F+uUJnep6CoUsTzMeP8Rh0NGr9uKquXxqe7lwLZo509nQ== + dependencies: + leven "^3.1.0" + + list-item@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/list-item/-/list-item-1.1.1.tgz#0c65d00e287cb663ccb3cb3849a77e89ec268a56" + integrity sha1-DGXQDih8tmPMs8s4Sad+iewmilY= + dependencies: + expand-range "^1.8.1" + extend-shallow "^2.0.1" + is-number "^2.1.0" + repeat-string "^1.5.2" + + livereload-js@^2.3.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" + integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== + + load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + + loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + + locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + + locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + + lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + + lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= + + lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= + + lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + integrity sha1-ZuXOH3btJ7QwPYxlEujRIW6BBrw= + + lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= + + lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= + + lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + + lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= + + lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= + + lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + + lodash.merge@^4.4.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + + lodash.padstart@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b" + integrity sha1-0uPuv/DZ05rVD1y9G1KnvOa7YRs= + + lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= + + lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= + + lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= + + lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= + + lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + + lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + + lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + + lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + + lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@~4.17.10: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + + logalot@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" + integrity sha1-X46MkNME7fElMJUaVVSruMXj9VI= + dependencies: + figures "^1.3.5" + squeak "^1.0.0" + + longest@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + + loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + + lowercase-keys@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= + + lowercase-keys@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + + lpad-align@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" + integrity sha1-IfYArBwwlcPG5JfuZyce4ISB/p4= + dependencies: + get-stdin "^4.0.1" + indent-string "^2.1.0" + longest "^1.0.0" + meow "^3.3.0" + + lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + + make-dir@^1.0.0, make-dir@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== + dependencies: + pify "^3.0.0" + + make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + + map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + + map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + + map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + + markdown-link@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/markdown-link/-/markdown-link-0.1.1.tgz#32c5c65199a6457316322d1e4229d13407c8c7cf" + integrity sha1-MsXGUZmmRXMWMi0eQinRNAfIx88= + + markdown-toc@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/markdown-toc/-/markdown-toc-1.2.0.tgz#44a15606844490314afc0444483f9e7b1122c339" + integrity sha512-eOsq7EGd3asV0oBfmyqngeEIhrbkc7XVP63OwcJBIhH2EpG2PzFcbZdhy1jutXSlRBBVMNXHvMtSr5LAxSUvUg== + dependencies: + concat-stream "^1.5.2" + diacritics-map "^0.1.0" + gray-matter "^2.1.0" + lazy-cache "^2.0.2" + list-item "^1.1.1" + markdown-link "^0.1.1" + minimist "^1.2.0" + mixin-deep "^1.1.3" + object.pick "^1.2.0" + remarkable "^1.7.1" + repeat-string "^1.6.1" + strip-color "^0.1.0" + + math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + + mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== + + media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + + meow@^3.3.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + integrity sha1-cstmi0JSKCkKu/qFaJJYcwioAfs= + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + + merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + + merge2@^1.2.3: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + + methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + + microevent.ts@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/microevent.ts/-/microevent.ts-0.1.1.tgz#70b09b83f43df5172d0205a63025bce0f7357fa0" + integrity sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g== + + micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + + mime-db@1.43.0, mime-db@^1.28.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + + mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + + mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + + mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + + mimic-response@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + + minimatch@3.0.4, minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + + minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + + minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + + minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= + + mixin-deep@^1.1.3, mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + + mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + + ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + + ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + + ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + + mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + + nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + + nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + + negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + + neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + + nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + + node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + + node-releases@^1.1.29, node-releases@^1.1.44: + version "1.1.45" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.45.tgz#4cf7e9175d71b1317f15ffd68ce63bce1d53e9f2" + integrity sha512-cXvGSfhITKI8qsV116u2FTzH5EWZJfgG7d4cpqwF8I8+1tWpD6AsvvGRKq2onR0DNj1jfqsjkXZsm14JMS7Cyg== + dependencies: + semver "^6.3.0" + + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + + normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + + normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + + normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + + normalize-url@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" + integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== + dependencies: + prepend-http "^2.0.0" + query-string "^5.0.1" + sort-keys "^2.0.0" + + normalize-url@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + + npm-conf@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9" + integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw== + dependencies: + config-chain "^1.1.11" + pify "^3.0.0" + + npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + + nth-check@^1.0.2, nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + + num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + + number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + + oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + + object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + + object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + + object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + + object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + + object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + + object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + + object.getownpropertydescriptors@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + + object.pick@^1.2.0, object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + + object.values@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + + on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + + once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + + onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + + open@^6.3.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" + integrity sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== + dependencies: + is-wsl "^1.1.0" + + optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + + optipng-bin@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-5.1.0.tgz#a7c7ab600a3ab5a177dae2f94c2d800aa386b5a9" + integrity sha512-9baoqZTNNmXQjq/PQTWEXbVV3AMO2sI/GaaqZJZ8SExfAzjijeAP7FEeT+TtyumSw7gr0PZtSUYB/Ke7iHQVKA== + dependencies: + bin-build "^3.0.0" + bin-wrapper "^4.0.0" + logalot "^2.0.0" + + original@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== + dependencies: + url-parse "^1.4.3" + + os-filter-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-2.0.0.tgz#1c0b62d5f3a2442749a2d139e6dddee6e81d8d16" + integrity sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg== + dependencies: + arch "^2.1.0" + + os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + + p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + + p-cancelable@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" + integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== + + p-event@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-1.3.0.tgz#8e6b4f4f65c72bc5b6fe28b75eda874f96a4a085" + integrity sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU= + dependencies: + p-timeout "^1.1.1" + + p-event@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" + integrity sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA== + dependencies: + p-timeout "^2.0.1" + + p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + + p-is-promise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + + p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + + p-limit@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== + dependencies: + p-try "^2.0.0" + + p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + + p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + + p-map-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" + integrity sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco= + dependencies: + p-reduce "^1.0.0" + + p-pipe@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + integrity sha1-SxoROZoRUgpneQ7loMHViB1r7+k= + + p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + + p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + + p-timeout@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" + integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== + dependencies: + p-finally "^1.0.0" + + p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + + p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + + parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + + parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + + parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + + pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + + path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + + path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + + path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + + path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + + path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + + path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + + path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + + path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + + path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + + pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + + performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + + pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + + pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + + pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + + pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + + pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + + pirates@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + + pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + + pkg-up@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + + portfinder@^1.0.25: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + + posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + + postcss-calc@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-7.0.1.tgz#36d77bab023b0ecbb9789d84dcb23c4941145436" + integrity sha512-oXqx0m6tb4N3JGdmeMSc/i91KppbYsFZKdH0xMOqK8V1rJlzrKlTdokz8ozUXLVejydRN6u2IddxpcijRj2FqQ== + dependencies: + css-unit-converter "^1.1.1" + postcss "^7.0.5" + postcss-selector-parser "^5.0.0-rc.4" + postcss-value-parser "^3.3.1" + + postcss-colormin@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" + integrity sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== + dependencies: + browserslist "^4.0.0" + color "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-convert-values@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" + integrity sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-discard-comments@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" + integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== + dependencies: + postcss "^7.0.0" + + postcss-discard-duplicates@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" + integrity sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== + dependencies: + postcss "^7.0.0" + + postcss-discard-empty@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" + integrity sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== + dependencies: + postcss "^7.0.0" + + postcss-discard-overridden@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" + integrity sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== + dependencies: + postcss "^7.0.0" + + postcss-merge-longhand@^4.0.11: + version "4.0.11" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" + integrity sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== + dependencies: + css-color-names "0.0.4" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + stylehacks "^4.0.0" + + postcss-merge-rules@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" + integrity sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + cssnano-util-same-parent "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + vendors "^1.0.0" + + postcss-minify-font-values@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" + integrity sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-minify-gradients@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" + integrity sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== + dependencies: + cssnano-util-get-arguments "^4.0.0" + is-color-stop "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-minify-params@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" + integrity sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== + dependencies: + alphanum-sort "^1.0.0" + browserslist "^4.0.0" + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + uniqs "^2.0.0" + + postcss-minify-selectors@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" + integrity sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== + dependencies: + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + + postcss-normalize-charset@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" + integrity sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== + dependencies: + postcss "^7.0.0" + + postcss-normalize-display-values@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" + integrity sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-positions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" + integrity sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== + dependencies: + cssnano-util-get-arguments "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-repeat-style@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" + integrity sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== + dependencies: + cssnano-util-get-arguments "^4.0.0" + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-string@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" + integrity sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== + dependencies: + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-timing-functions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" + integrity sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-unicode@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" + integrity sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-url@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" + integrity sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-normalize-whitespace@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" + integrity sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-ordered-values@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" + integrity sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== + dependencies: + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-reduce-initial@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" + integrity sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + + postcss-reduce-transforms@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" + integrity sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== + dependencies: + cssnano-util-get-match "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + + postcss-selector-parser@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865" + integrity sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU= + dependencies: + dot-prop "^4.1.1" + indexes-of "^1.0.1" + uniq "^1.0.1" + + postcss-selector-parser@^5.0.0-rc.4: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" + integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== + dependencies: + cssesc "^2.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + + postcss-svgo@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.2.tgz#17b997bc711b333bab143aaed3b8d3d6e3d38258" + integrity sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw== + dependencies: + is-svg "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + svgo "^1.0.0" + + postcss-unique-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" + integrity sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== + dependencies: + alphanum-sort "^1.0.0" + postcss "^7.0.0" + uniqs "^2.0.0" + + postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + + postcss-value-parser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" + integrity sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ== + + postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.23, postcss@^7.0.5: + version "7.0.26" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" + integrity sha512-IY4oRjpXWYshuTDFxMVkJDtWIk2LhsTlu8bZnbEJA4+bYT16Lvpo8Qv6EvDumhYRgzjZl489pmsY3qVgJQ08nA== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + + prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + + prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + + prismjs@^1.17.1: + version "1.19.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.19.0.tgz#713afbd45c3baca4b321569f2df39e17e729d4dc" + integrity sha512-IVFtbW9mCWm9eOIaEkNyo2Vl4NnEifis2GQ7/MLRG5TQe6t+4Sj9J5QWI9i3v+SS43uZBlCAOn+zYTVYQcPXJw== + optionalDependencies: + clipboard "^2.0.0" + + private@^0.1.6: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + + process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + + prop-types@^15.6.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + + proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= + + proxy-addr@~2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" + integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.0" + + pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + + psl@^1.1.24: + version "1.7.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" + integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== + + pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + + punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + + punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + + q@^1.1.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= + + qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + + qs@^6.4.0: + version "6.9.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9" + integrity sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA== + + qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + + query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + + querystringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== + + randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + + range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + + raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + + raw-body@~1.1.0: + version "1.1.7" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" + integrity sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU= + dependencies: + bytes "1" + string_decoder "0.10" + + react-dev-utils@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-9.1.0.tgz#3ad2bb8848a32319d760d0a84c56c14bdaae5e81" + integrity sha512-X2KYF/lIGyGwP/F/oXgGDF24nxDA2KC4b7AFto+eqzc/t838gpSGiaU8trTqHXOohuLxxc5qi1eDzsl9ucPDpg== + dependencies: + "@babel/code-frame" "7.5.5" + address "1.1.2" + browserslist "4.7.0" + chalk "2.4.2" + cross-spawn "6.0.5" + detect-port-alt "1.1.6" + escape-string-regexp "1.0.5" + filesize "3.6.1" + find-up "3.0.0" + fork-ts-checker-webpack-plugin "1.5.0" + global-modules "2.0.0" + globby "8.0.2" + gzip-size "5.1.1" + immer "1.10.0" + inquirer "6.5.0" + is-root "2.1.0" + loader-utils "1.2.3" + open "^6.3.0" + pkg-up "2.0.0" + react-error-overlay "^6.0.3" + recursive-readdir "2.2.2" + shell-quote "1.7.2" + sockjs-client "1.4.0" + strip-ansi "5.2.0" + text-table "0.2.0" + + react-dom@^16.8.4: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11" + integrity sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.18.0" + + react-error-overlay@^6.0.3: + version "6.0.4" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.4.tgz#0d165d6d27488e660bc08e57bdabaad741366f7a" + integrity sha512-ueZzLmHltszTshDMwyfELDq8zOA803wQ1ZuzCccXa1m57k1PxSHfflPD5W9YIiTXLs0JTLzoj6o1LuM5N6zzNA== + + react-is@^16.8.1: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" + integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + + react@^16.8.4: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83" + integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + + read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + + read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + + readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + + readable-stream@^3.1.1: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + + readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + + rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + + recursive-readdir@2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f" + integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== + dependencies: + minimatch "3.0.4" + + redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + integrity sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94= + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + + regenerate-unicode-properties@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== + dependencies: + regenerate "^1.4.0" + + regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + + regenerator-runtime@^0.13.2: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + + regenerator-transform@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" + integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== + dependencies: + private "^0.1.6" + + regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + + regexpu-core@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" + integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.1.0" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + + regjsgen@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== + + regjsparser@^0.6.0: + version "0.6.2" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.2.tgz#fd62c753991467d9d1ffe0a9f67f27a529024b96" + integrity sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q== + dependencies: + jsesc "~0.5.0" + + remarkable@^1.7.1: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + + remarkable@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-2.0.0.tgz#795f965bede8300362ce51a716edc322d9e7a4ca" + integrity sha512-3gvKFAgL4xmmVRKAMNm6UzDo/rO2gPVkZrWagp6AXEA4JvCcMcRx9aapYbb7AJAmLLvi/u06+EhzqoS7ha9qOg== + dependencies: + argparse "^1.0.10" + autolinker "^3.11.0" + + remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + + repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + + repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + + repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + dependencies: + is-finite "^1.0.0" + + replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= + + request@^2.53.0, request@^2.88.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + + requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + + resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + + resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: + version "1.14.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2" + integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ== + dependencies: + path-parse "^1.0.6" + + responselike@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + + restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + + ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + + rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/rgb-regex/-/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + + rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + + rimraf@^2.5.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + + run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + + rxjs@^6.4.0: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== + dependencies: + tslib "^1.9.0" + + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + + safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + + safe-json-parse@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" + integrity sha1-PnZyPjjf3aE8mx0poeB//uSzC1c= + + safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + + "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + + sax@^1.2.4, sax@~1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + + scheduler@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" + integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + + seek-bzip@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" + integrity sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w= + dependencies: + commander "~2.8.1" + + select@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" + integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= + + semver-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" + integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== + + semver-truncate@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" + integrity sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g= + dependencies: + semver "^5.3.0" + + "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + + semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + + semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + + send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + + serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + + set-getter@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/set-getter/-/set-getter-0.1.0.tgz#d769c182c9d5a51f409145f2fba82e5e86e80376" + integrity sha1-12nBgsnVpR9AkUXy+6guXoboA3Y= + dependencies: + to-object-path "^0.3.0" + + set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + + setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + + shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + + shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + + shell-quote@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== + + shelljs@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" + integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + + signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + + simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + + sitemap@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-3.2.2.tgz#3f77c358fa97b555c879e457098e39910095c62b" + integrity sha512-TModL/WU4m2q/mQcrDgNANn0P4LwprM9MMvG4hu5zP4c6IIKs2YLTu6nXXnNr8ODW/WFtxKggiJ1EGn2W0GNmg== + dependencies: + lodash.chunk "^4.2.0" + lodash.padstart "^4.6.1" + whatwg-url "^7.0.0" + xmlbuilder "^13.0.0" + + slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + + snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + + snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + + snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + + sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + + sort-keys-length@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sort-keys-length/-/sort-keys-length-1.0.1.tgz#9cb6f4f4e9e48155a6aa0671edd336ff1479a188" + integrity sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg= + dependencies: + sort-keys "^1.0.0" + + sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0= + dependencies: + is-plain-obj "^1.0.0" + + sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + + source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + + source-map-support@^0.5.16: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + + source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + + source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + + source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + + spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + + spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + + spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + + spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + + split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + + sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + + squeak@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" + integrity sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM= + dependencies: + chalk "^1.0.0" + console-stream "^0.1.1" + lpad-align "^1.0.1" + + sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + + stable@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== + + static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + + "statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + + strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + + string-template@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + integrity sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0= + + string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + + string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + + string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + + string_decoder@0.10: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + + string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + + string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + + strip-ansi@5.2.0, strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + + strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + + strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + + strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + dependencies: + is-utf8 "^0.2.0" + + strip-color@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/strip-color/-/strip-color-0.1.0.tgz#106f65d3d3e6a2d9401cac0eb0ce8b8a702b4f7b" + integrity sha1-EG9l09PmotlAHKwOsM6LinArT3s= + + strip-dirs@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" + integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== + dependencies: + is-natural-number "^4.0.1" + + strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + + strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + integrity sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI= + dependencies: + get-stdin "^4.0.1" + + strip-outer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" + integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== + dependencies: + escape-string-regexp "^1.0.2" + + stylehacks@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" + integrity sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + + supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + + supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + + supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + + supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + + svgo@^1.0.0, svgo@^1.0.5: + version "1.3.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== + dependencies: + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" + js-yaml "^3.13.1" + mkdirp "~0.5.1" + object.values "^1.1.0" + sax "~1.2.4" + stable "^0.1.8" + unquote "~1.1.1" + util.promisify "~1.0.0" + + tapable@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + + tar-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" + integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== + dependencies: + bl "^1.0.0" + buffer-alloc "^1.2.0" + end-of-stream "^1.0.0" + fs-constants "^1.0.0" + readable-stream "^2.3.0" + to-buffer "^1.1.1" + xtend "^4.0.0" + + tcp-port-used@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tcp-port-used/-/tcp-port-used-1.0.1.tgz#46061078e2d38c73979a2c2c12b5a674e6689d70" + integrity sha512-rwi5xJeU6utXoEIiMvVBMc9eJ2/ofzB+7nLOdnZuFTmNCLqRiQh2sMG9MqCxHU/69VC/Fwp5dV9306Qd54ll1Q== + dependencies: + debug "4.1.0" + is2 "2.0.1" + + temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= + + tempfile@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-2.0.0.tgz#6b0446856a9b1114d1856ffcbe509cccb0977265" + integrity sha1-awRGhWqbERTRhW/8vlCczLCXcmU= + dependencies: + temp-dir "^1.0.0" + uuid "^3.0.1" + + text-table@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + + through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + + through@^2.3.6, through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + + timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + + timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + + tiny-emitter@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" + integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== + + tiny-lr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" + integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== + dependencies: + body "^5.1.0" + debug "^3.1.0" + faye-websocket "~0.10.0" + livereload-js "^2.3.0" + object-assign "^4.1.0" + qs "^6.4.0" + + tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + + to-buffer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" + integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== + + to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + + to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + + to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + + to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + + toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + + toml@^2.3.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b" + integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ== + + tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + + tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + + tree-node-cli@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/tree-node-cli/-/tree-node-cli-1.2.5.tgz#afd75437976bbf2cc0c52b9949798e7530e8fd8c" + integrity sha512-Yhv4bfLa3WYdJLS4FkCj0h72duPGMUjC6Ld8eBlT9BA3CfjeQyHNBfgtzQvDrw1OkQva2JSpUyslZHuweCRtGQ== + dependencies: + commander "^2.15.1" + + trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + integrity sha1-WIeWa7WCpFA6QetST301ARgVphM= + + trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + integrity sha1-42RqLqTokTEr9+rObPsFOAvAHCE= + dependencies: + escape-string-regexp "^1.0.2" + + truncate-html@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.3.tgz#0166dfc7890626130c2e4174c6b73d4d63993e5f" + integrity sha512-1o1prdRv+iehXcGwn29YgXU17DotHkr+OK3ijVEG7FGMwHNG9RyobXwimw6djDvbIc24rhmz3tjNNvNESjkNkQ== + dependencies: + "@types/cheerio" "^0.22.8" + cheerio "0.22.0" + + tslib@^1.9.0, tslib@^1.9.3: + version "1.10.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" + integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== + + tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + + tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + + type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + + typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + + uglify-js@^3.1.4: + version "3.7.5" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.5.tgz#278c7c24927ac5a32d3336fc68fd4ae1177a486a" + integrity sha512-GFZ3EXRptKGvb/C1Sq6nO1iI7AGcjyqmIyOw0DrD0675e+NNbGO72xmMM2iEBdFbxaTLo70NbjM/Wy54uZIlsg== + dependencies: + commander "~2.20.3" + source-map "~0.6.1" + + unbzip2-stream@^1.0.9: + version "1.3.3" + resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a" + integrity sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg== + dependencies: + buffer "^5.2.1" + through "^2.3.8" + + unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + + unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + + unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + + unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + + union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + + uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + + uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + + universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + + unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + + unquote@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unquote/-/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + + unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + + upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + + uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + + urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + + url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + + url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + + url-parse@^1.4.3: + version "1.4.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + + url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + + use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + + util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + + util.promisify@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + + utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + + uuid@^3.0.1, uuid@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" + integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + + validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + + vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + + vendors@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0" + integrity sha512-fOi47nsJP5Wqefa43kyWSg80qF+Q3XA6MUkgi7Hp1HQaKDQW4cQrK2D0P7mmbFtsV1N89am55Yru/nyEwRubcw== + + verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + + webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + + websocket-driver@>=0.5.1: + version "0.7.3" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" + integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg== + dependencies: + http-parser-js ">=0.4.0 <0.4.11" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + + websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== + + whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + + which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + + wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + + wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= + + worker-rpc@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/worker-rpc/-/worker-rpc-0.1.1.tgz#cb565bd6d7071a8f16660686051e969ad32f54d5" + integrity sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg== + dependencies: + microevent.ts "~0.1.1" + + wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + + xml-js@^1.6.11: + version "1.6.11" + resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" + integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== + dependencies: + sax "^1.2.4" + + xmlbuilder@^13.0.0: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + + xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + + yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + + yamljs@^0.2.1: + version "0.2.10" + resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.2.10.tgz#481cc7c25ca73af59f591f0c96e3ce56c757a40f" + integrity sha1-SBzHwlynOvWfWR8MluPOVsdXpA8= + dependencies: + argparse "^1.0.7" + glob "^7.0.5" + + yargs@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-2.3.0.tgz#e900c87250ec5cd080db6009fe3dd63156f1d7fb" + integrity sha1-6QDIclDsXNCA22AJ/j3WMVbx1/s= + dependencies: + wordwrap "0.0.2" + + yauzl@^2.4.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0"